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

50083 lines
1.9 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 00014d18 080001b0 080001b0 000101b0 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .rodata 000032c4 08014ec8 08014ec8 00024ec8 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .ARM.extab 00000000 0801818c 0801818c 000309e0 2**0
CONTENTS
4 .ARM 00000008 0801818c 0801818c 0002818c 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .preinit_array 00000000 08018194 08018194 000309e0 2**0
CONTENTS, ALLOC, LOAD, DATA
6 .init_array 00000008 08018194 08018194 00028194 2**2
CONTENTS, ALLOC, LOAD, DATA
7 .fini_array 00000004 0801819c 0801819c 0002819c 2**2
CONTENTS, ALLOC, LOAD, DATA
8 .data 000009e0 20000000 080181a0 00030000 2**3
CONTENTS, ALLOC, LOAD, DATA
9 .ccmram 00000000 10000000 10000000 000309e0 2**0
CONTENTS
10 .bss 000083f0 200009e0 200009e0 000309e0 2**2
ALLOC
11 ._user_heap_stack 00000600 20008dd0 20008dd0 000309e0 2**0
ALLOC
12 .ARM.attributes 00000030 00000000 00000000 000309e0 2**0
CONTENTS, READONLY
13 .debug_info 0001b6f0 00000000 00000000 00030a10 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
14 .debug_abbrev 00004d9c 00000000 00000000 0004c100 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
15 .debug_aranges 000013a8 00000000 00000000 00050ea0 2**3
CONTENTS, READONLY, DEBUGGING, OCTETS
16 .debug_ranges 00001308 00000000 00000000 00052248 2**3
CONTENTS, READONLY, DEBUGGING, OCTETS
17 .debug_macro 0002ec5f 00000000 00000000 00053550 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
18 .debug_line 000202f9 00000000 00000000 000821af 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
19 .debug_str 000ec3f5 00000000 00000000 000a24a8 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
20 .comment 00000050 00000000 00000000 0018e89d 2**0
CONTENTS, READONLY
21 .debug_frame 00006304 00000000 00000000 0018e8f0 2**2
CONTENTS, READONLY, DEBUGGING, OCTETS
22 .stab 000000cc 00000000 00000000 00194bf4 2**2
CONTENTS, READONLY, DEBUGGING
23 .stabstr 000001b9 00000000 00000000 00194cc0 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: 08014eb0 .word 0x08014eb0
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: 08014eb0 .word 0x08014eb0
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
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
8000ed0: f000 fc00 bl 80016d4 <HAL_Init>
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
8000ed4: f000 f810 bl 8000ef8 <SystemClock_Config>
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
8000ed8: f000 f8f6 bl 80010c8 <MX_GPIO_Init>
MX_LWIP_Init();
8000edc: f002 fdb8 bl 8003a50 <MX_LWIP_Init>
MX_FMC_Init();
8000ee0: f000 f876 bl 8000fd0 <MX_FMC_Init>
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
MX_LWIP_Process();
8000ee4: f002 fe22 bl 8003b2c <MX_LWIP_Process>
//write_isa(0x100, 0x1111);
//write_isa(0x102, 0x1111);
//read_isa(0x1);
read_isa(0x1);
8000ee8: 2001 movs r0, #1
8000eea: f000 f977 bl 80011dc <read_isa>
read_isa(0x4);
8000eee: 2004 movs r0, #4
8000ef0: f000 f974 bl 80011dc <read_isa>
MX_LWIP_Process();
8000ef4: e7f6 b.n 8000ee4 <main+0x18>
...
08000ef8 <SystemClock_Config>:
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
8000ef8: b580 push {r7, lr}
8000efa: b094 sub sp, #80 ; 0x50
8000efc: af00 add r7, sp, #0
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
8000efe: f107 0320 add.w r3, r7, #32
8000f02: 2230 movs r2, #48 ; 0x30
8000f04: 2100 movs r1, #0
8000f06: 4618 mov r0, r3
8000f08: f00f fa5a bl 80103c0 <memset>
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
8000f0c: f107 030c add.w r3, r7, #12
8000f10: 2200 movs r2, #0
8000f12: 601a str r2, [r3, #0]
8000f14: 605a str r2, [r3, #4]
8000f16: 609a str r2, [r3, #8]
8000f18: 60da str r2, [r3, #12]
8000f1a: 611a str r2, [r3, #16]
/** Configure the main internal regulator output voltage
*/
__HAL_RCC_PWR_CLK_ENABLE();
8000f1c: 2300 movs r3, #0
8000f1e: 60bb str r3, [r7, #8]
8000f20: 4b29 ldr r3, [pc, #164] ; (8000fc8 <SystemClock_Config+0xd0>)
8000f22: 6c1b ldr r3, [r3, #64] ; 0x40
8000f24: 4a28 ldr r2, [pc, #160] ; (8000fc8 <SystemClock_Config+0xd0>)
8000f26: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
8000f2a: 6413 str r3, [r2, #64] ; 0x40
8000f2c: 4b26 ldr r3, [pc, #152] ; (8000fc8 <SystemClock_Config+0xd0>)
8000f2e: 6c1b ldr r3, [r3, #64] ; 0x40
8000f30: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8000f34: 60bb str r3, [r7, #8]
8000f36: 68bb ldr r3, [r7, #8]
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);
8000f38: 2300 movs r3, #0
8000f3a: 607b str r3, [r7, #4]
8000f3c: 4b23 ldr r3, [pc, #140] ; (8000fcc <SystemClock_Config+0xd4>)
8000f3e: 681b ldr r3, [r3, #0]
8000f40: f423 4340 bic.w r3, r3, #49152 ; 0xc000
8000f44: 4a21 ldr r2, [pc, #132] ; (8000fcc <SystemClock_Config+0xd4>)
8000f46: f443 4380 orr.w r3, r3, #16384 ; 0x4000
8000f4a: 6013 str r3, [r2, #0]
8000f4c: 4b1f ldr r3, [pc, #124] ; (8000fcc <SystemClock_Config+0xd4>)
8000f4e: 681b ldr r3, [r3, #0]
8000f50: f403 4340 and.w r3, r3, #49152 ; 0xc000
8000f54: 607b str r3, [r7, #4]
8000f56: 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;
8000f58: 2302 movs r3, #2
8000f5a: 623b str r3, [r7, #32]
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
8000f5c: 2301 movs r3, #1
8000f5e: 62fb str r3, [r7, #44] ; 0x2c
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
8000f60: 2310 movs r3, #16
8000f62: 633b str r3, [r7, #48] ; 0x30
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
8000f64: 2302 movs r3, #2
8000f66: 63bb str r3, [r7, #56] ; 0x38
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
8000f68: 2300 movs r3, #0
8000f6a: 63fb str r3, [r7, #60] ; 0x3c
RCC_OscInitStruct.PLL.PLLM = 8;
8000f6c: 2308 movs r3, #8
8000f6e: 643b str r3, [r7, #64] ; 0x40
RCC_OscInitStruct.PLL.PLLN = 100;
8000f70: 2364 movs r3, #100 ; 0x64
8000f72: 647b str r3, [r7, #68] ; 0x44
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
8000f74: 2302 movs r3, #2
8000f76: 64bb str r3, [r7, #72] ; 0x48
RCC_OscInitStruct.PLL.PLLQ = 4;
8000f78: 2304 movs r3, #4
8000f7a: 64fb str r3, [r7, #76] ; 0x4c
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
8000f7c: f107 0320 add.w r3, r7, #32
8000f80: 4618 mov r0, r3
8000f82: f001 ffdf bl 8002f44 <HAL_RCC_OscConfig>
8000f86: 4603 mov r3, r0
8000f88: 2b00 cmp r3, #0
8000f8a: d001 beq.n 8000f90 <SystemClock_Config+0x98>
{
Error_Handler();
8000f8c: f000 f935 bl 80011fa <Error_Handler>
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
8000f90: 230f movs r3, #15
8000f92: 60fb str r3, [r7, #12]
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
8000f94: 2302 movs r3, #2
8000f96: 613b str r3, [r7, #16]
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
8000f98: 2300 movs r3, #0
8000f9a: 617b str r3, [r7, #20]
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
8000f9c: f44f 53a0 mov.w r3, #5120 ; 0x1400
8000fa0: 61bb str r3, [r7, #24]
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
8000fa2: f44f 5380 mov.w r3, #4096 ; 0x1000
8000fa6: 61fb str r3, [r7, #28]
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK)
8000fa8: f107 030c add.w r3, r7, #12
8000fac: 2103 movs r1, #3
8000fae: 4618 mov r0, r3
8000fb0: f002 fa40 bl 8003434 <HAL_RCC_ClockConfig>
8000fb4: 4603 mov r3, r0
8000fb6: 2b00 cmp r3, #0
8000fb8: d001 beq.n 8000fbe <SystemClock_Config+0xc6>
{
Error_Handler();
8000fba: f000 f91e bl 80011fa <Error_Handler>
}
}
8000fbe: bf00 nop
8000fc0: 3750 adds r7, #80 ; 0x50
8000fc2: 46bd mov sp, r7
8000fc4: bd80 pop {r7, pc}
8000fc6: bf00 nop
8000fc8: 40023800 .word 0x40023800
8000fcc: 40007000 .word 0x40007000
08000fd0 <MX_FMC_Init>:
/* FMC initialization function */
static void MX_FMC_Init(void)
{
8000fd0: b580 push {r7, lr}
8000fd2: b08e sub sp, #56 ; 0x38
8000fd4: af00 add r7, sp, #0
/* USER CODE BEGIN FMC_Init 0 */
/* USER CODE END FMC_Init 0 */
FMC_NORSRAM_TimingTypeDef Timing = {0};
8000fd6: f107 031c add.w r3, r7, #28
8000fda: 2200 movs r2, #0
8000fdc: 601a str r2, [r3, #0]
8000fde: 605a str r2, [r3, #4]
8000fe0: 609a str r2, [r3, #8]
8000fe2: 60da str r2, [r3, #12]
8000fe4: 611a str r2, [r3, #16]
8000fe6: 615a str r2, [r3, #20]
8000fe8: 619a str r2, [r3, #24]
FMC_NORSRAM_TimingTypeDef ExtTiming = {0};
8000fea: 463b mov r3, r7
8000fec: 2200 movs r2, #0
8000fee: 601a str r2, [r3, #0]
8000ff0: 605a str r2, [r3, #4]
8000ff2: 609a str r2, [r3, #8]
8000ff4: 60da str r2, [r3, #12]
8000ff6: 611a str r2, [r3, #16]
8000ff8: 615a str r2, [r3, #20]
8000ffa: 619a str r2, [r3, #24]
/* USER CODE END FMC_Init 1 */
/** Perform the SRAM1 memory initialization sequence
*/
hsram1.Instance = FMC_NORSRAM_DEVICE;
8000ffc: 4b30 ldr r3, [pc, #192] ; (80010c0 <MX_FMC_Init+0xf0>)
8000ffe: f04f 4220 mov.w r2, #2684354560 ; 0xa0000000
8001002: 601a str r2, [r3, #0]
hsram1.Extended = FMC_NORSRAM_EXTENDED_DEVICE;
8001004: 4b2e ldr r3, [pc, #184] ; (80010c0 <MX_FMC_Init+0xf0>)
8001006: 4a2f ldr r2, [pc, #188] ; (80010c4 <MX_FMC_Init+0xf4>)
8001008: 605a str r2, [r3, #4]
/* hsram1.Init */
hsram1.Init.NSBank = FMC_NORSRAM_BANK1;
800100a: 4b2d ldr r3, [pc, #180] ; (80010c0 <MX_FMC_Init+0xf0>)
800100c: 2200 movs r2, #0
800100e: 609a str r2, [r3, #8]
hsram1.Init.DataAddressMux = FMC_DATA_ADDRESS_MUX_DISABLE;
8001010: 4b2b ldr r3, [pc, #172] ; (80010c0 <MX_FMC_Init+0xf0>)
8001012: 2200 movs r2, #0
8001014: 60da str r2, [r3, #12]
hsram1.Init.MemoryType = FMC_MEMORY_TYPE_SRAM;
8001016: 4b2a ldr r3, [pc, #168] ; (80010c0 <MX_FMC_Init+0xf0>)
8001018: 2200 movs r2, #0
800101a: 611a str r2, [r3, #16]
hsram1.Init.MemoryDataWidth = FMC_NORSRAM_MEM_BUS_WIDTH_16;
800101c: 4b28 ldr r3, [pc, #160] ; (80010c0 <MX_FMC_Init+0xf0>)
800101e: 2210 movs r2, #16
8001020: 615a str r2, [r3, #20]
hsram1.Init.BurstAccessMode = FMC_BURST_ACCESS_MODE_DISABLE;
8001022: 4b27 ldr r3, [pc, #156] ; (80010c0 <MX_FMC_Init+0xf0>)
8001024: 2200 movs r2, #0
8001026: 619a str r2, [r3, #24]
hsram1.Init.WaitSignalPolarity = FMC_WAIT_SIGNAL_POLARITY_LOW;
8001028: 4b25 ldr r3, [pc, #148] ; (80010c0 <MX_FMC_Init+0xf0>)
800102a: 2200 movs r2, #0
800102c: 61da str r2, [r3, #28]
hsram1.Init.WrapMode = FMC_WRAP_MODE_DISABLE;
800102e: 4b24 ldr r3, [pc, #144] ; (80010c0 <MX_FMC_Init+0xf0>)
8001030: 2200 movs r2, #0
8001032: 621a str r2, [r3, #32]
hsram1.Init.WaitSignalActive = FMC_WAIT_TIMING_BEFORE_WS;
8001034: 4b22 ldr r3, [pc, #136] ; (80010c0 <MX_FMC_Init+0xf0>)
8001036: 2200 movs r2, #0
8001038: 625a str r2, [r3, #36] ; 0x24
hsram1.Init.WriteOperation = FMC_WRITE_OPERATION_ENABLE;
800103a: 4b21 ldr r3, [pc, #132] ; (80010c0 <MX_FMC_Init+0xf0>)
800103c: f44f 5280 mov.w r2, #4096 ; 0x1000
8001040: 629a str r2, [r3, #40] ; 0x28
hsram1.Init.WaitSignal = FMC_WAIT_SIGNAL_DISABLE;
8001042: 4b1f ldr r3, [pc, #124] ; (80010c0 <MX_FMC_Init+0xf0>)
8001044: 2200 movs r2, #0
8001046: 62da str r2, [r3, #44] ; 0x2c
hsram1.Init.ExtendedMode = FMC_EXTENDED_MODE_ENABLE;
8001048: 4b1d ldr r3, [pc, #116] ; (80010c0 <MX_FMC_Init+0xf0>)
800104a: f44f 4280 mov.w r2, #16384 ; 0x4000
800104e: 631a str r2, [r3, #48] ; 0x30
hsram1.Init.AsynchronousWait = FMC_ASYNCHRONOUS_WAIT_DISABLE;
8001050: 4b1b ldr r3, [pc, #108] ; (80010c0 <MX_FMC_Init+0xf0>)
8001052: 2200 movs r2, #0
8001054: 635a str r2, [r3, #52] ; 0x34
hsram1.Init.WriteBurst = FMC_WRITE_BURST_DISABLE;
8001056: 4b1a ldr r3, [pc, #104] ; (80010c0 <MX_FMC_Init+0xf0>)
8001058: 2200 movs r2, #0
800105a: 639a str r2, [r3, #56] ; 0x38
hsram1.Init.ContinuousClock = FMC_CONTINUOUS_CLOCK_SYNC_ONLY;
800105c: 4b18 ldr r3, [pc, #96] ; (80010c0 <MX_FMC_Init+0xf0>)
800105e: 2200 movs r2, #0
8001060: 63da str r2, [r3, #60] ; 0x3c
hsram1.Init.PageSize = FMC_PAGE_SIZE_NONE;
8001062: 4b17 ldr r3, [pc, #92] ; (80010c0 <MX_FMC_Init+0xf0>)
8001064: 2200 movs r2, #0
8001066: 645a str r2, [r3, #68] ; 0x44
/* Timing */
Timing.AddressSetupTime = 15;
8001068: 230f movs r3, #15
800106a: 61fb str r3, [r7, #28]
Timing.AddressHoldTime = 15;
800106c: 230f movs r3, #15
800106e: 623b str r3, [r7, #32]
Timing.DataSetupTime = 255;
8001070: 23ff movs r3, #255 ; 0xff
8001072: 627b str r3, [r7, #36] ; 0x24
Timing.BusTurnAroundDuration = 15;
8001074: 230f movs r3, #15
8001076: 62bb str r3, [r7, #40] ; 0x28
Timing.CLKDivision = 16;
8001078: 2310 movs r3, #16
800107a: 62fb str r3, [r7, #44] ; 0x2c
Timing.DataLatency = 17;
800107c: 2311 movs r3, #17
800107e: 633b str r3, [r7, #48] ; 0x30
Timing.AccessMode = FMC_ACCESS_MODE_A;
8001080: 2300 movs r3, #0
8001082: 637b str r3, [r7, #52] ; 0x34
/* ExtTiming */
ExtTiming.AddressSetupTime = 15;
8001084: 230f movs r3, #15
8001086: 603b str r3, [r7, #0]
ExtTiming.AddressHoldTime = 15;
8001088: 230f movs r3, #15
800108a: 607b str r3, [r7, #4]
ExtTiming.DataSetupTime = 255;
800108c: 23ff movs r3, #255 ; 0xff
800108e: 60bb str r3, [r7, #8]
ExtTiming.BusTurnAroundDuration = 15;
8001090: 230f movs r3, #15
8001092: 60fb str r3, [r7, #12]
ExtTiming.CLKDivision = 16;
8001094: 2310 movs r3, #16
8001096: 613b str r3, [r7, #16]
ExtTiming.DataLatency = 17;
8001098: 2311 movs r3, #17
800109a: 617b str r3, [r7, #20]
ExtTiming.AccessMode = FMC_ACCESS_MODE_A;
800109c: 2300 movs r3, #0
800109e: 61bb str r3, [r7, #24]
if (HAL_SRAM_Init(&hsram1, &Timing, &ExtTiming) != HAL_OK)
80010a0: 463a mov r2, r7
80010a2: f107 031c add.w r3, r7, #28
80010a6: 4619 mov r1, r3
80010a8: 4805 ldr r0, [pc, #20] ; (80010c0 <MX_FMC_Init+0xf0>)
80010aa: f002 fb7b bl 80037a4 <HAL_SRAM_Init>
80010ae: 4603 mov r3, r0
80010b0: 2b00 cmp r3, #0
80010b2: d001 beq.n 80010b8 <MX_FMC_Init+0xe8>
{
Error_Handler( );
80010b4: f000 f8a1 bl 80011fa <Error_Handler>
}
/* USER CODE BEGIN FMC_Init 2 */
/* USER CODE END FMC_Init 2 */
}
80010b8: bf00 nop
80010ba: 3738 adds r7, #56 ; 0x38
80010bc: 46bd mov sp, r7
80010be: bd80 pop {r7, pc}
80010c0: 200009fc .word 0x200009fc
80010c4: a0000104 .word 0xa0000104
080010c8 <MX_GPIO_Init>:
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
80010c8: b580 push {r7, lr}
80010ca: b08c sub sp, #48 ; 0x30
80010cc: af00 add r7, sp, #0
GPIO_InitTypeDef GPIO_InitStruct = {0};
80010ce: f107 031c add.w r3, r7, #28
80010d2: 2200 movs r2, #0
80010d4: 601a str r2, [r3, #0]
80010d6: 605a str r2, [r3, #4]
80010d8: 609a str r2, [r3, #8]
80010da: 60da str r2, [r3, #12]
80010dc: 611a str r2, [r3, #16]
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOE_CLK_ENABLE();
80010de: 2300 movs r3, #0
80010e0: 61bb str r3, [r7, #24]
80010e2: 4b3c ldr r3, [pc, #240] ; (80011d4 <MX_GPIO_Init+0x10c>)
80010e4: 6b1b ldr r3, [r3, #48] ; 0x30
80010e6: 4a3b ldr r2, [pc, #236] ; (80011d4 <MX_GPIO_Init+0x10c>)
80010e8: f043 0310 orr.w r3, r3, #16
80010ec: 6313 str r3, [r2, #48] ; 0x30
80010ee: 4b39 ldr r3, [pc, #228] ; (80011d4 <MX_GPIO_Init+0x10c>)
80010f0: 6b1b ldr r3, [r3, #48] ; 0x30
80010f2: f003 0310 and.w r3, r3, #16
80010f6: 61bb str r3, [r7, #24]
80010f8: 69bb ldr r3, [r7, #24]
__HAL_RCC_GPIOC_CLK_ENABLE();
80010fa: 2300 movs r3, #0
80010fc: 617b str r3, [r7, #20]
80010fe: 4b35 ldr r3, [pc, #212] ; (80011d4 <MX_GPIO_Init+0x10c>)
8001100: 6b1b ldr r3, [r3, #48] ; 0x30
8001102: 4a34 ldr r2, [pc, #208] ; (80011d4 <MX_GPIO_Init+0x10c>)
8001104: f043 0304 orr.w r3, r3, #4
8001108: 6313 str r3, [r2, #48] ; 0x30
800110a: 4b32 ldr r3, [pc, #200] ; (80011d4 <MX_GPIO_Init+0x10c>)
800110c: 6b1b ldr r3, [r3, #48] ; 0x30
800110e: f003 0304 and.w r3, r3, #4
8001112: 617b str r3, [r7, #20]
8001114: 697b ldr r3, [r7, #20]
__HAL_RCC_GPIOF_CLK_ENABLE();
8001116: 2300 movs r3, #0
8001118: 613b str r3, [r7, #16]
800111a: 4b2e ldr r3, [pc, #184] ; (80011d4 <MX_GPIO_Init+0x10c>)
800111c: 6b1b ldr r3, [r3, #48] ; 0x30
800111e: 4a2d ldr r2, [pc, #180] ; (80011d4 <MX_GPIO_Init+0x10c>)
8001120: f043 0320 orr.w r3, r3, #32
8001124: 6313 str r3, [r2, #48] ; 0x30
8001126: 4b2b ldr r3, [pc, #172] ; (80011d4 <MX_GPIO_Init+0x10c>)
8001128: 6b1b ldr r3, [r3, #48] ; 0x30
800112a: f003 0320 and.w r3, r3, #32
800112e: 613b str r3, [r7, #16]
8001130: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOA_CLK_ENABLE();
8001132: 2300 movs r3, #0
8001134: 60fb str r3, [r7, #12]
8001136: 4b27 ldr r3, [pc, #156] ; (80011d4 <MX_GPIO_Init+0x10c>)
8001138: 6b1b ldr r3, [r3, #48] ; 0x30
800113a: 4a26 ldr r2, [pc, #152] ; (80011d4 <MX_GPIO_Init+0x10c>)
800113c: f043 0301 orr.w r3, r3, #1
8001140: 6313 str r3, [r2, #48] ; 0x30
8001142: 4b24 ldr r3, [pc, #144] ; (80011d4 <MX_GPIO_Init+0x10c>)
8001144: 6b1b ldr r3, [r3, #48] ; 0x30
8001146: f003 0301 and.w r3, r3, #1
800114a: 60fb str r3, [r7, #12]
800114c: 68fb ldr r3, [r7, #12]
__HAL_RCC_GPIOG_CLK_ENABLE();
800114e: 2300 movs r3, #0
8001150: 60bb str r3, [r7, #8]
8001152: 4b20 ldr r3, [pc, #128] ; (80011d4 <MX_GPIO_Init+0x10c>)
8001154: 6b1b ldr r3, [r3, #48] ; 0x30
8001156: 4a1f ldr r2, [pc, #124] ; (80011d4 <MX_GPIO_Init+0x10c>)
8001158: f043 0340 orr.w r3, r3, #64 ; 0x40
800115c: 6313 str r3, [r2, #48] ; 0x30
800115e: 4b1d ldr r3, [pc, #116] ; (80011d4 <MX_GPIO_Init+0x10c>)
8001160: 6b1b ldr r3, [r3, #48] ; 0x30
8001162: f003 0340 and.w r3, r3, #64 ; 0x40
8001166: 60bb str r3, [r7, #8]
8001168: 68bb ldr r3, [r7, #8]
__HAL_RCC_GPIOB_CLK_ENABLE();
800116a: 2300 movs r3, #0
800116c: 607b str r3, [r7, #4]
800116e: 4b19 ldr r3, [pc, #100] ; (80011d4 <MX_GPIO_Init+0x10c>)
8001170: 6b1b ldr r3, [r3, #48] ; 0x30
8001172: 4a18 ldr r2, [pc, #96] ; (80011d4 <MX_GPIO_Init+0x10c>)
8001174: f043 0302 orr.w r3, r3, #2
8001178: 6313 str r3, [r2, #48] ; 0x30
800117a: 4b16 ldr r3, [pc, #88] ; (80011d4 <MX_GPIO_Init+0x10c>)
800117c: 6b1b ldr r3, [r3, #48] ; 0x30
800117e: f003 0302 and.w r3, r3, #2
8001182: 607b str r3, [r7, #4]
8001184: 687b ldr r3, [r7, #4]
__HAL_RCC_GPIOD_CLK_ENABLE();
8001186: 2300 movs r3, #0
8001188: 603b str r3, [r7, #0]
800118a: 4b12 ldr r3, [pc, #72] ; (80011d4 <MX_GPIO_Init+0x10c>)
800118c: 6b1b ldr r3, [r3, #48] ; 0x30
800118e: 4a11 ldr r2, [pc, #68] ; (80011d4 <MX_GPIO_Init+0x10c>)
8001190: f043 0308 orr.w r3, r3, #8
8001194: 6313 str r3, [r2, #48] ; 0x30
8001196: 4b0f ldr r3, [pc, #60] ; (80011d4 <MX_GPIO_Init+0x10c>)
8001198: 6b1b ldr r3, [r3, #48] ; 0x30
800119a: f003 0308 and.w r3, r3, #8
800119e: 603b str r3, [r7, #0]
80011a0: 683b ldr r3, [r7, #0]
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_14, GPIO_PIN_RESET);
80011a2: 2200 movs r2, #0
80011a4: f44f 4180 mov.w r1, #16384 ; 0x4000
80011a8: 480b ldr r0, [pc, #44] ; (80011d8 <MX_GPIO_Init+0x110>)
80011aa: f001 feb1 bl 8002f10 <HAL_GPIO_WritePin>
/*Configure GPIO pin : PC14 */
GPIO_InitStruct.Pin = GPIO_PIN_14;
80011ae: f44f 4380 mov.w r3, #16384 ; 0x4000
80011b2: 61fb str r3, [r7, #28]
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
80011b4: 2301 movs r3, #1
80011b6: 623b str r3, [r7, #32]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80011b8: 2300 movs r3, #0
80011ba: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
80011bc: 2300 movs r3, #0
80011be: 62bb str r3, [r7, #40] ; 0x28
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
80011c0: f107 031c add.w r3, r7, #28
80011c4: 4619 mov r1, r3
80011c6: 4804 ldr r0, [pc, #16] ; (80011d8 <MX_GPIO_Init+0x110>)
80011c8: f001 fcf6 bl 8002bb8 <HAL_GPIO_Init>
}
80011cc: bf00 nop
80011ce: 3730 adds r7, #48 ; 0x30
80011d0: 46bd mov sp, r7
80011d2: bd80 pop {r7, pc}
80011d4: 40023800 .word 0x40023800
80011d8: 40020800 .word 0x40020800
080011dc <read_isa>:
/* USER CODE BEGIN 4 */
uint16_t read_isa(uint16_t addr)
{
80011dc: b480 push {r7}
80011de: b083 sub sp, #12
80011e0: af00 add r7, sp, #0
80011e2: 4603 mov r3, r0
80011e4: 80fb strh r3, [r7, #6]
return *(uint16_t*)(ISA_BASE_RD + addr);
80011e6: 88fb ldrh r3, [r7, #6]
80011e8: f103 43c0 add.w r3, r3, #1610612736 ; 0x60000000
80011ec: 881b ldrh r3, [r3, #0]
}
80011ee: 4618 mov r0, r3
80011f0: 370c adds r7, #12
80011f2: 46bd mov sp, r7
80011f4: f85d 7b04 ldr.w r7, [sp], #4
80011f8: 4770 bx lr
080011fa <Error_Handler>:
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
80011fa: b480 push {r7}
80011fc: 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");
80011fe: b672 cpsid i
}
8001200: 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)
8001202: e7fe b.n 8001202 <Error_Handler+0x8>
08001204 <HAL_MspInit>:
/* USER CODE END 0 */
/**
* Initializes the Global MSP.
*/
void HAL_MspInit(void)
{
8001204: b480 push {r7}
8001206: b083 sub sp, #12
8001208: af00 add r7, sp, #0
/* USER CODE BEGIN MspInit 0 */
/* USER CODE END MspInit 0 */
__HAL_RCC_SYSCFG_CLK_ENABLE();
800120a: 2300 movs r3, #0
800120c: 607b str r3, [r7, #4]
800120e: 4b10 ldr r3, [pc, #64] ; (8001250 <HAL_MspInit+0x4c>)
8001210: 6c5b ldr r3, [r3, #68] ; 0x44
8001212: 4a0f ldr r2, [pc, #60] ; (8001250 <HAL_MspInit+0x4c>)
8001214: f443 4380 orr.w r3, r3, #16384 ; 0x4000
8001218: 6453 str r3, [r2, #68] ; 0x44
800121a: 4b0d ldr r3, [pc, #52] ; (8001250 <HAL_MspInit+0x4c>)
800121c: 6c5b ldr r3, [r3, #68] ; 0x44
800121e: f403 4380 and.w r3, r3, #16384 ; 0x4000
8001222: 607b str r3, [r7, #4]
8001224: 687b ldr r3, [r7, #4]
__HAL_RCC_PWR_CLK_ENABLE();
8001226: 2300 movs r3, #0
8001228: 603b str r3, [r7, #0]
800122a: 4b09 ldr r3, [pc, #36] ; (8001250 <HAL_MspInit+0x4c>)
800122c: 6c1b ldr r3, [r3, #64] ; 0x40
800122e: 4a08 ldr r2, [pc, #32] ; (8001250 <HAL_MspInit+0x4c>)
8001230: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
8001234: 6413 str r3, [r2, #64] ; 0x40
8001236: 4b06 ldr r3, [pc, #24] ; (8001250 <HAL_MspInit+0x4c>)
8001238: 6c1b ldr r3, [r3, #64] ; 0x40
800123a: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
800123e: 603b str r3, [r7, #0]
8001240: 683b ldr r3, [r7, #0]
/* System interrupt init*/
/* USER CODE BEGIN MspInit 1 */
/* USER CODE END MspInit 1 */
}
8001242: bf00 nop
8001244: 370c adds r7, #12
8001246: 46bd mov sp, r7
8001248: f85d 7b04 ldr.w r7, [sp], #4
800124c: 4770 bx lr
800124e: bf00 nop
8001250: 40023800 .word 0x40023800
08001254 <HAL_FMC_MspInit>:
static uint32_t FMC_Initialized = 0;
static void HAL_FMC_MspInit(void){
8001254: b580 push {r7, lr}
8001256: b086 sub sp, #24
8001258: af00 add r7, sp, #0
/* USER CODE BEGIN FMC_MspInit 0 */
/* USER CODE END FMC_MspInit 0 */
GPIO_InitTypeDef GPIO_InitStruct ={0};
800125a: 1d3b adds r3, r7, #4
800125c: 2200 movs r2, #0
800125e: 601a str r2, [r3, #0]
8001260: 605a str r2, [r3, #4]
8001262: 609a str r2, [r3, #8]
8001264: 60da str r2, [r3, #12]
8001266: 611a str r2, [r3, #16]
if (FMC_Initialized) {
8001268: 4b2c ldr r3, [pc, #176] ; (800131c <HAL_FMC_MspInit+0xc8>)
800126a: 681b ldr r3, [r3, #0]
800126c: 2b00 cmp r3, #0
800126e: d150 bne.n 8001312 <HAL_FMC_MspInit+0xbe>
return;
}
FMC_Initialized = 1;
8001270: 4b2a ldr r3, [pc, #168] ; (800131c <HAL_FMC_MspInit+0xc8>)
8001272: 2201 movs r2, #1
8001274: 601a str r2, [r3, #0]
/* Peripheral clock enable */
__HAL_RCC_FMC_CLK_ENABLE();
8001276: 2300 movs r3, #0
8001278: 603b str r3, [r7, #0]
800127a: 4b29 ldr r3, [pc, #164] ; (8001320 <HAL_FMC_MspInit+0xcc>)
800127c: 6b9b ldr r3, [r3, #56] ; 0x38
800127e: 4a28 ldr r2, [pc, #160] ; (8001320 <HAL_FMC_MspInit+0xcc>)
8001280: f043 0301 orr.w r3, r3, #1
8001284: 6393 str r3, [r2, #56] ; 0x38
8001286: 4b26 ldr r3, [pc, #152] ; (8001320 <HAL_FMC_MspInit+0xcc>)
8001288: 6b9b ldr r3, [r3, #56] ; 0x38
800128a: f003 0301 and.w r3, r3, #1
800128e: 603b str r3, [r7, #0]
8001290: 683b ldr r3, [r7, #0]
PD1 ------> FMC_D3
PD4 ------> FMC_NOE
PD5 ------> FMC_NWE
PD7 ------> FMC_NE1
*/
GPIO_InitStruct.Pin = GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6
8001292: f64f 73f8 movw r3, #65528 ; 0xfff8
8001296: 607b str r3, [r7, #4]
|GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10
|GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14
|GPIO_PIN_15;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8001298: 2302 movs r3, #2
800129a: 60bb str r3, [r7, #8]
GPIO_InitStruct.Pull = GPIO_NOPULL;
800129c: 2300 movs r3, #0
800129e: 60fb str r3, [r7, #12]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
80012a0: 2303 movs r3, #3
80012a2: 613b str r3, [r7, #16]
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
80012a4: 230c movs r3, #12
80012a6: 617b str r3, [r7, #20]
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
80012a8: 1d3b adds r3, r7, #4
80012aa: 4619 mov r1, r3
80012ac: 481d ldr r0, [pc, #116] ; (8001324 <HAL_FMC_MspInit+0xd0>)
80012ae: f001 fc83 bl 8002bb8 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
80012b2: f24f 033f movw r3, #61503 ; 0xf03f
80012b6: 607b str r3, [r7, #4]
|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_12|GPIO_PIN_13
|GPIO_PIN_14|GPIO_PIN_15;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
80012b8: 2302 movs r3, #2
80012ba: 60bb str r3, [r7, #8]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80012bc: 2300 movs r3, #0
80012be: 60fb str r3, [r7, #12]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
80012c0: 2303 movs r3, #3
80012c2: 613b str r3, [r7, #16]
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
80012c4: 230c movs r3, #12
80012c6: 617b str r3, [r7, #20]
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
80012c8: 1d3b adds r3, r7, #4
80012ca: 4619 mov r1, r3
80012cc: 4816 ldr r0, [pc, #88] ; (8001328 <HAL_FMC_MspInit+0xd4>)
80012ce: f001 fc73 bl 8002bb8 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
80012d2: 233f movs r3, #63 ; 0x3f
80012d4: 607b str r3, [r7, #4]
|GPIO_PIN_4|GPIO_PIN_5;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
80012d6: 2302 movs r3, #2
80012d8: 60bb str r3, [r7, #8]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80012da: 2300 movs r3, #0
80012dc: 60fb str r3, [r7, #12]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
80012de: 2303 movs r3, #3
80012e0: 613b str r3, [r7, #16]
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
80012e2: 230c movs r3, #12
80012e4: 617b str r3, [r7, #20]
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
80012e6: 1d3b adds r3, r7, #4
80012e8: 4619 mov r1, r3
80012ea: 4810 ldr r0, [pc, #64] ; (800132c <HAL_FMC_MspInit+0xd8>)
80012ec: f001 fc64 bl 8002bb8 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11
80012f0: f64f 73b3 movw r3, #65459 ; 0xffb3
80012f4: 607b str r3, [r7, #4]
|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15
|GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5
|GPIO_PIN_7;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
80012f6: 2302 movs r3, #2
80012f8: 60bb str r3, [r7, #8]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80012fa: 2300 movs r3, #0
80012fc: 60fb str r3, [r7, #12]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
80012fe: 2303 movs r3, #3
8001300: 613b str r3, [r7, #16]
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
8001302: 230c movs r3, #12
8001304: 617b str r3, [r7, #20]
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
8001306: 1d3b adds r3, r7, #4
8001308: 4619 mov r1, r3
800130a: 4809 ldr r0, [pc, #36] ; (8001330 <HAL_FMC_MspInit+0xdc>)
800130c: f001 fc54 bl 8002bb8 <HAL_GPIO_Init>
8001310: e000 b.n 8001314 <HAL_FMC_MspInit+0xc0>
return;
8001312: bf00 nop
/* USER CODE BEGIN FMC_MspInit 1 */
/* USER CODE END FMC_MspInit 1 */
}
8001314: 3718 adds r7, #24
8001316: 46bd mov sp, r7
8001318: bd80 pop {r7, pc}
800131a: bf00 nop
800131c: 20000a4c .word 0x20000a4c
8001320: 40023800 .word 0x40023800
8001324: 40021000 .word 0x40021000
8001328: 40021400 .word 0x40021400
800132c: 40021800 .word 0x40021800
8001330: 40020c00 .word 0x40020c00
08001334 <HAL_SRAM_MspInit>:
void HAL_SRAM_MspInit(SRAM_HandleTypeDef* hsram){
8001334: b580 push {r7, lr}
8001336: b082 sub sp, #8
8001338: af00 add r7, sp, #0
800133a: 6078 str r0, [r7, #4]
/* USER CODE BEGIN SRAM_MspInit 0 */
/* USER CODE END SRAM_MspInit 0 */
HAL_FMC_MspInit();
800133c: f7ff ff8a bl 8001254 <HAL_FMC_MspInit>
/* USER CODE BEGIN SRAM_MspInit 1 */
/* USER CODE END SRAM_MspInit 1 */
}
8001340: bf00 nop
8001342: 3708 adds r7, #8
8001344: 46bd mov sp, r7
8001346: bd80 pop {r7, pc}
08001348 <NMI_Handler>:
/******************************************************************************/
/**
* @brief This function handles Non maskable interrupt.
*/
void NMI_Handler(void)
{
8001348: b480 push {r7}
800134a: 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)
800134c: e7fe b.n 800134c <NMI_Handler+0x4>
0800134e <HardFault_Handler>:
/**
* @brief This function handles Hard fault interrupt.
*/
void HardFault_Handler(void)
{
800134e: b480 push {r7}
8001350: af00 add r7, sp, #0
/* USER CODE BEGIN HardFault_IRQn 0 */
/* USER CODE END HardFault_IRQn 0 */
while (1)
8001352: e7fe b.n 8001352 <HardFault_Handler+0x4>
08001354 <MemManage_Handler>:
/**
* @brief This function handles Memory management fault.
*/
void MemManage_Handler(void)
{
8001354: b480 push {r7}
8001356: af00 add r7, sp, #0
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
/* USER CODE END MemoryManagement_IRQn 0 */
while (1)
8001358: e7fe b.n 8001358 <MemManage_Handler+0x4>
0800135a <BusFault_Handler>:
/**
* @brief This function handles Pre-fetch fault, memory access fault.
*/
void BusFault_Handler(void)
{
800135a: b480 push {r7}
800135c: af00 add r7, sp, #0
/* USER CODE BEGIN BusFault_IRQn 0 */
/* USER CODE END BusFault_IRQn 0 */
while (1)
800135e: e7fe b.n 800135e <BusFault_Handler+0x4>
08001360 <UsageFault_Handler>:
/**
* @brief This function handles Undefined instruction or illegal state.
*/
void UsageFault_Handler(void)
{
8001360: b480 push {r7}
8001362: af00 add r7, sp, #0
/* USER CODE BEGIN UsageFault_IRQn 0 */
/* USER CODE END UsageFault_IRQn 0 */
while (1)
8001364: e7fe b.n 8001364 <UsageFault_Handler+0x4>
08001366 <SVC_Handler>:
/**
* @brief This function handles System service call via SWI instruction.
*/
void SVC_Handler(void)
{
8001366: b480 push {r7}
8001368: af00 add r7, sp, #0
/* USER CODE END SVCall_IRQn 0 */
/* USER CODE BEGIN SVCall_IRQn 1 */
/* USER CODE END SVCall_IRQn 1 */
}
800136a: bf00 nop
800136c: 46bd mov sp, r7
800136e: f85d 7b04 ldr.w r7, [sp], #4
8001372: 4770 bx lr
08001374 <DebugMon_Handler>:
/**
* @brief This function handles Debug monitor.
*/
void DebugMon_Handler(void)
{
8001374: b480 push {r7}
8001376: af00 add r7, sp, #0
/* USER CODE END DebugMonitor_IRQn 0 */
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
/* USER CODE END DebugMonitor_IRQn 1 */
}
8001378: bf00 nop
800137a: 46bd mov sp, r7
800137c: f85d 7b04 ldr.w r7, [sp], #4
8001380: 4770 bx lr
08001382 <PendSV_Handler>:
/**
* @brief This function handles Pendable request for system service.
*/
void PendSV_Handler(void)
{
8001382: b480 push {r7}
8001384: af00 add r7, sp, #0
/* USER CODE END PendSV_IRQn 0 */
/* USER CODE BEGIN PendSV_IRQn 1 */
/* USER CODE END PendSV_IRQn 1 */
}
8001386: bf00 nop
8001388: 46bd mov sp, r7
800138a: f85d 7b04 ldr.w r7, [sp], #4
800138e: 4770 bx lr
08001390 <SysTick_Handler>:
/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
8001390: b580 push {r7, lr}
8001392: af00 add r7, sp, #0
/* USER CODE BEGIN SysTick_IRQn 0 */
/* USER CODE END SysTick_IRQn 0 */
HAL_IncTick();
8001394: f000 f9f0 bl 8001778 <HAL_IncTick>
/* USER CODE BEGIN SysTick_IRQn 1 */
/* USER CODE END SysTick_IRQn 1 */
}
8001398: bf00 nop
800139a: bd80 pop {r7, pc}
0800139c <SystemInit>:
* configuration.
* @param None
* @retval None
*/
void SystemInit(void)
{
800139c: b480 push {r7}
800139e: 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 */
80013a0: 4b06 ldr r3, [pc, #24] ; (80013bc <SystemInit+0x20>)
80013a2: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
80013a6: 4a05 ldr r2, [pc, #20] ; (80013bc <SystemInit+0x20>)
80013a8: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000
80013ac: 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 */
}
80013b0: bf00 nop
80013b2: 46bd mov sp, r7
80013b4: f85d 7b04 ldr.w r7, [sp], #4
80013b8: 4770 bx lr
80013ba: bf00 nop
80013bc: e000ed00 .word 0xe000ed00
080013c0 <Reset_Handler>:
.section .text.Reset_Handler
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
ldr r0, =_estack
80013c0: 480d ldr r0, [pc, #52] ; (80013f8 <LoopForever+0x2>)
mov sp, r0 /* set stack pointer */
80013c2: 4685 mov sp, r0
/* Call the clock system initialization function.*/
bl SystemInit
80013c4: f7ff ffea bl 800139c <SystemInit>
/* Copy the data segment initializers from flash to SRAM */
ldr r0, =_sdata
80013c8: 480c ldr r0, [pc, #48] ; (80013fc <LoopForever+0x6>)
ldr r1, =_edata
80013ca: 490d ldr r1, [pc, #52] ; (8001400 <LoopForever+0xa>)
ldr r2, =_sidata
80013cc: 4a0d ldr r2, [pc, #52] ; (8001404 <LoopForever+0xe>)
movs r3, #0
80013ce: 2300 movs r3, #0
b LoopCopyDataInit
80013d0: e002 b.n 80013d8 <LoopCopyDataInit>
080013d2 <CopyDataInit>:
CopyDataInit:
ldr r4, [r2, r3]
80013d2: 58d4 ldr r4, [r2, r3]
str r4, [r0, r3]
80013d4: 50c4 str r4, [r0, r3]
adds r3, r3, #4
80013d6: 3304 adds r3, #4
080013d8 <LoopCopyDataInit>:
LoopCopyDataInit:
adds r4, r0, r3
80013d8: 18c4 adds r4, r0, r3
cmp r4, r1
80013da: 428c cmp r4, r1
bcc CopyDataInit
80013dc: d3f9 bcc.n 80013d2 <CopyDataInit>
/* Zero fill the bss segment. */
ldr r2, =_sbss
80013de: 4a0a ldr r2, [pc, #40] ; (8001408 <LoopForever+0x12>)
ldr r4, =_ebss
80013e0: 4c0a ldr r4, [pc, #40] ; (800140c <LoopForever+0x16>)
movs r3, #0
80013e2: 2300 movs r3, #0
b LoopFillZerobss
80013e4: e001 b.n 80013ea <LoopFillZerobss>
080013e6 <FillZerobss>:
FillZerobss:
str r3, [r2]
80013e6: 6013 str r3, [r2, #0]
adds r2, r2, #4
80013e8: 3204 adds r2, #4
080013ea <LoopFillZerobss>:
LoopFillZerobss:
cmp r2, r4
80013ea: 42a2 cmp r2, r4
bcc FillZerobss
80013ec: d3fb bcc.n 80013e6 <FillZerobss>
/* Call static constructors */
bl __libc_init_array
80013ee: f00e ff8b bl 8010308 <__libc_init_array>
/* Call the application's entry point.*/
bl main
80013f2: f7ff fd6b bl 8000ecc <main>
080013f6 <LoopForever>:
LoopForever:
b LoopForever
80013f6: e7fe b.n 80013f6 <LoopForever>
ldr r0, =_estack
80013f8: 20030000 .word 0x20030000
ldr r0, =_sdata
80013fc: 20000000 .word 0x20000000
ldr r1, =_edata
8001400: 200009e0 .word 0x200009e0
ldr r2, =_sidata
8001404: 080181a0 .word 0x080181a0
ldr r2, =_sbss
8001408: 200009e0 .word 0x200009e0
ldr r4, =_ebss
800140c: 20008dd0 .word 0x20008dd0
08001410 <ADC_IRQHandler>:
* @retval : None
*/
.section .text.Default_Handler,"ax",%progbits
Default_Handler:
Infinite_Loop:
b Infinite_Loop
8001410: e7fe b.n 8001410 <ADC_IRQHandler>
08001412 <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)
{
8001412: b480 push {r7}
8001414: b083 sub sp, #12
8001416: af00 add r7, sp, #0
8001418: 6078 str r0, [r7, #4]
800141a: 6039 str r1, [r7, #0]
if(!pObj || !ioctx->ReadReg || !ioctx->WriteReg || !ioctx->GetTick)
800141c: 687b ldr r3, [r7, #4]
800141e: 2b00 cmp r3, #0
8001420: d00b beq.n 800143a <DP83848_RegisterBusIO+0x28>
8001422: 683b ldr r3, [r7, #0]
8001424: 68db ldr r3, [r3, #12]
8001426: 2b00 cmp r3, #0
8001428: d007 beq.n 800143a <DP83848_RegisterBusIO+0x28>
800142a: 683b ldr r3, [r7, #0]
800142c: 689b ldr r3, [r3, #8]
800142e: 2b00 cmp r3, #0
8001430: d003 beq.n 800143a <DP83848_RegisterBusIO+0x28>
8001432: 683b ldr r3, [r7, #0]
8001434: 691b ldr r3, [r3, #16]
8001436: 2b00 cmp r3, #0
8001438: d102 bne.n 8001440 <DP83848_RegisterBusIO+0x2e>
{
return DP83848_STATUS_ERROR;
800143a: f04f 33ff mov.w r3, #4294967295
800143e: e014 b.n 800146a <DP83848_RegisterBusIO+0x58>
}
pObj->IO.Init = ioctx->Init;
8001440: 683b ldr r3, [r7, #0]
8001442: 681a ldr r2, [r3, #0]
8001444: 687b ldr r3, [r7, #4]
8001446: 609a str r2, [r3, #8]
pObj->IO.DeInit = ioctx->DeInit;
8001448: 683b ldr r3, [r7, #0]
800144a: 685a ldr r2, [r3, #4]
800144c: 687b ldr r3, [r7, #4]
800144e: 60da str r2, [r3, #12]
pObj->IO.ReadReg = ioctx->ReadReg;
8001450: 683b ldr r3, [r7, #0]
8001452: 68da ldr r2, [r3, #12]
8001454: 687b ldr r3, [r7, #4]
8001456: 615a str r2, [r3, #20]
pObj->IO.WriteReg = ioctx->WriteReg;
8001458: 683b ldr r3, [r7, #0]
800145a: 689a ldr r2, [r3, #8]
800145c: 687b ldr r3, [r7, #4]
800145e: 611a str r2, [r3, #16]
pObj->IO.GetTick = ioctx->GetTick;
8001460: 683b ldr r3, [r7, #0]
8001462: 691a ldr r2, [r3, #16]
8001464: 687b ldr r3, [r7, #4]
8001466: 619a str r2, [r3, #24]
return DP83848_STATUS_OK;
8001468: 2300 movs r3, #0
}
800146a: 4618 mov r0, r3
800146c: 370c adds r7, #12
800146e: 46bd mov sp, r7
8001470: f85d 7b04 ldr.w r7, [sp], #4
8001474: 4770 bx lr
08001476 <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)
{
8001476: b580 push {r7, lr}
8001478: b086 sub sp, #24
800147a: af00 add r7, sp, #0
800147c: 6078 str r0, [r7, #4]
uint32_t tickstart = 0, regvalue = 0, addr = 0;
800147e: 2300 movs r3, #0
8001480: 60fb str r3, [r7, #12]
8001482: 2300 movs r3, #0
8001484: 60bb str r3, [r7, #8]
8001486: 2300 movs r3, #0
8001488: 617b str r3, [r7, #20]
int32_t status = DP83848_STATUS_OK;
800148a: 2300 movs r3, #0
800148c: 613b str r3, [r7, #16]
if(pObj->Is_Initialized == 0)
800148e: 687b ldr r3, [r7, #4]
8001490: 685b ldr r3, [r3, #4]
8001492: 2b00 cmp r3, #0
8001494: d17c bne.n 8001590 <DP83848_Init+0x11a>
{
if(pObj->IO.Init != 0)
8001496: 687b ldr r3, [r7, #4]
8001498: 689b ldr r3, [r3, #8]
800149a: 2b00 cmp r3, #0
800149c: d002 beq.n 80014a4 <DP83848_Init+0x2e>
{
/* GPIO and Clocks initialization */
pObj->IO.Init();
800149e: 687b ldr r3, [r7, #4]
80014a0: 689b ldr r3, [r3, #8]
80014a2: 4798 blx r3
}
/* for later check */
pObj->DevAddr = DP83848_MAX_DEV_ADDR + 1;
80014a4: 687b ldr r3, [r7, #4]
80014a6: 2220 movs r2, #32
80014a8: 601a str r2, [r3, #0]
/* Get the device address from special mode register */
for(addr = 0; addr <= DP83848_MAX_DEV_ADDR; addr ++)
80014aa: 2300 movs r3, #0
80014ac: 617b str r3, [r7, #20]
80014ae: e01c b.n 80014ea <DP83848_Init+0x74>
{
if(pObj->IO.ReadReg(addr, DP83848_SMR, &regvalue) < 0)
80014b0: 687b ldr r3, [r7, #4]
80014b2: 695b ldr r3, [r3, #20]
80014b4: f107 0208 add.w r2, r7, #8
80014b8: 2119 movs r1, #25
80014ba: 6978 ldr r0, [r7, #20]
80014bc: 4798 blx r3
80014be: 4603 mov r3, r0
80014c0: 2b00 cmp r3, #0
80014c2: da03 bge.n 80014cc <DP83848_Init+0x56>
{
status = DP83848_STATUS_READ_ERROR;
80014c4: f06f 0304 mvn.w r3, #4
80014c8: 613b str r3, [r7, #16]
/* Can't read from this device address
continue with next address */
continue;
80014ca: e00b b.n 80014e4 <DP83848_Init+0x6e>
}
if((regvalue & DP83848_SMR_PHY_ADDR) == addr)
80014cc: 68bb ldr r3, [r7, #8]
80014ce: f003 031f and.w r3, r3, #31
80014d2: 697a ldr r2, [r7, #20]
80014d4: 429a cmp r2, r3
80014d6: d105 bne.n 80014e4 <DP83848_Init+0x6e>
{
pObj->DevAddr = addr;
80014d8: 687b ldr r3, [r7, #4]
80014da: 697a ldr r2, [r7, #20]
80014dc: 601a str r2, [r3, #0]
status = DP83848_STATUS_OK;
80014de: 2300 movs r3, #0
80014e0: 613b str r3, [r7, #16]
break;
80014e2: e005 b.n 80014f0 <DP83848_Init+0x7a>
for(addr = 0; addr <= DP83848_MAX_DEV_ADDR; addr ++)
80014e4: 697b ldr r3, [r7, #20]
80014e6: 3301 adds r3, #1
80014e8: 617b str r3, [r7, #20]
80014ea: 697b ldr r3, [r7, #20]
80014ec: 2b1f cmp r3, #31
80014ee: d9df bls.n 80014b0 <DP83848_Init+0x3a>
}
}
if(pObj->DevAddr > DP83848_MAX_DEV_ADDR)
80014f0: 687b ldr r3, [r7, #4]
80014f2: 681b ldr r3, [r3, #0]
80014f4: 2b1f cmp r3, #31
80014f6: d902 bls.n 80014fe <DP83848_Init+0x88>
{
status = DP83848_STATUS_ADDRESS_ERROR;
80014f8: f06f 0302 mvn.w r3, #2
80014fc: 613b str r3, [r7, #16]
}
/* if device address is matched */
if(status == DP83848_STATUS_OK)
80014fe: 693b ldr r3, [r7, #16]
8001500: 2b00 cmp r3, #0
8001502: d145 bne.n 8001590 <DP83848_Init+0x11a>
{
/* set a software reset */
if(pObj->IO.WriteReg(pObj->DevAddr, DP83848_BCR, DP83848_BCR_SOFT_RESET) >= 0)
8001504: 687b ldr r3, [r7, #4]
8001506: 691b ldr r3, [r3, #16]
8001508: 687a ldr r2, [r7, #4]
800150a: 6810 ldr r0, [r2, #0]
800150c: f44f 4200 mov.w r2, #32768 ; 0x8000
8001510: 2100 movs r1, #0
8001512: 4798 blx r3
8001514: 4603 mov r3, r0
8001516: 2b00 cmp r3, #0
8001518: db37 blt.n 800158a <DP83848_Init+0x114>
{
/* get software reset status */
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BCR, &regvalue) >= 0)
800151a: 687b ldr r3, [r7, #4]
800151c: 695b ldr r3, [r3, #20]
800151e: 687a ldr r2, [r7, #4]
8001520: 6810 ldr r0, [r2, #0]
8001522: f107 0208 add.w r2, r7, #8
8001526: 2100 movs r1, #0
8001528: 4798 blx r3
800152a: 4603 mov r3, r0
800152c: 2b00 cmp r3, #0
800152e: db28 blt.n 8001582 <DP83848_Init+0x10c>
{
tickstart = pObj->IO.GetTick();
8001530: 687b ldr r3, [r7, #4]
8001532: 699b ldr r3, [r3, #24]
8001534: 4798 blx r3
8001536: 4603 mov r3, r0
8001538: 60fb str r3, [r7, #12]
/* wait until software reset is done or timeout occured */
while(regvalue & DP83848_BCR_SOFT_RESET)
800153a: e01c b.n 8001576 <DP83848_Init+0x100>
{
if((pObj->IO.GetTick() - tickstart) <= DP83848_SW_RESET_TO)
800153c: 687b ldr r3, [r7, #4]
800153e: 699b ldr r3, [r3, #24]
8001540: 4798 blx r3
8001542: 4603 mov r3, r0
8001544: 461a mov r2, r3
8001546: 68fb ldr r3, [r7, #12]
8001548: 1ad3 subs r3, r2, r3
800154a: f5b3 7ffa cmp.w r3, #500 ; 0x1f4
800154e: d80e bhi.n 800156e <DP83848_Init+0xf8>
{
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BCR, &regvalue) < 0)
8001550: 687b ldr r3, [r7, #4]
8001552: 695b ldr r3, [r3, #20]
8001554: 687a ldr r2, [r7, #4]
8001556: 6810 ldr r0, [r2, #0]
8001558: f107 0208 add.w r2, r7, #8
800155c: 2100 movs r1, #0
800155e: 4798 blx r3
8001560: 4603 mov r3, r0
8001562: 2b00 cmp r3, #0
8001564: da07 bge.n 8001576 <DP83848_Init+0x100>
{
status = DP83848_STATUS_READ_ERROR;
8001566: f06f 0304 mvn.w r3, #4
800156a: 613b str r3, [r7, #16]
break;
800156c: e010 b.n 8001590 <DP83848_Init+0x11a>
}
}
else
{
status = DP83848_STATUS_RESET_TIMEOUT;
800156e: f06f 0301 mvn.w r3, #1
8001572: 613b str r3, [r7, #16]
break;
8001574: e00c b.n 8001590 <DP83848_Init+0x11a>
while(regvalue & DP83848_BCR_SOFT_RESET)
8001576: 68bb ldr r3, [r7, #8]
8001578: f403 4300 and.w r3, r3, #32768 ; 0x8000
800157c: 2b00 cmp r3, #0
800157e: d1dd bne.n 800153c <DP83848_Init+0xc6>
8001580: e006 b.n 8001590 <DP83848_Init+0x11a>
}
}
}
else
{
status = DP83848_STATUS_READ_ERROR;
8001582: f06f 0304 mvn.w r3, #4
8001586: 613b str r3, [r7, #16]
8001588: e002 b.n 8001590 <DP83848_Init+0x11a>
}
}
else
{
status = DP83848_STATUS_WRITE_ERROR;
800158a: f06f 0303 mvn.w r3, #3
800158e: 613b str r3, [r7, #16]
}
}
}
if(status == DP83848_STATUS_OK)
8001590: 693b ldr r3, [r7, #16]
8001592: 2b00 cmp r3, #0
8001594: d112 bne.n 80015bc <DP83848_Init+0x146>
{
tickstart = pObj->IO.GetTick();
8001596: 687b ldr r3, [r7, #4]
8001598: 699b ldr r3, [r3, #24]
800159a: 4798 blx r3
800159c: 4603 mov r3, r0
800159e: 60fb str r3, [r7, #12]
/* Wait for 2s to perform initialization */
while((pObj->IO.GetTick() - tickstart) <= DP83848_INIT_TO)
80015a0: bf00 nop
80015a2: 687b ldr r3, [r7, #4]
80015a4: 699b ldr r3, [r3, #24]
80015a6: 4798 blx r3
80015a8: 4603 mov r3, r0
80015aa: 461a mov r2, r3
80015ac: 68fb ldr r3, [r7, #12]
80015ae: 1ad3 subs r3, r2, r3
80015b0: f5b3 6ffa cmp.w r3, #2000 ; 0x7d0
80015b4: d9f5 bls.n 80015a2 <DP83848_Init+0x12c>
{
}
pObj->Is_Initialized = 1;
80015b6: 687b ldr r3, [r7, #4]
80015b8: 2201 movs r2, #1
80015ba: 605a str r2, [r3, #4]
}
return status;
80015bc: 693b ldr r3, [r7, #16]
}
80015be: 4618 mov r0, r3
80015c0: 3718 adds r7, #24
80015c2: 46bd mov sp, r7
80015c4: bd80 pop {r7, pc}
080015c6 <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)
{
80015c6: b580 push {r7, lr}
80015c8: b084 sub sp, #16
80015ca: af00 add r7, sp, #0
80015cc: 6078 str r0, [r7, #4]
uint32_t readval = 0;
80015ce: 2300 movs r3, #0
80015d0: 60fb str r3, [r7, #12]
/* Read Status register */
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BSR, &readval) < 0)
80015d2: 687b ldr r3, [r7, #4]
80015d4: 695b ldr r3, [r3, #20]
80015d6: 687a ldr r2, [r7, #4]
80015d8: 6810 ldr r0, [r2, #0]
80015da: f107 020c add.w r2, r7, #12
80015de: 2101 movs r1, #1
80015e0: 4798 blx r3
80015e2: 4603 mov r3, r0
80015e4: 2b00 cmp r3, #0
80015e6: da02 bge.n 80015ee <DP83848_GetLinkState+0x28>
{
return DP83848_STATUS_READ_ERROR;
80015e8: f06f 0304 mvn.w r3, #4
80015ec: e06e b.n 80016cc <DP83848_GetLinkState+0x106>
}
/* Read Status register again */
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BSR, &readval) < 0)
80015ee: 687b ldr r3, [r7, #4]
80015f0: 695b ldr r3, [r3, #20]
80015f2: 687a ldr r2, [r7, #4]
80015f4: 6810 ldr r0, [r2, #0]
80015f6: f107 020c add.w r2, r7, #12
80015fa: 2101 movs r1, #1
80015fc: 4798 blx r3
80015fe: 4603 mov r3, r0
8001600: 2b00 cmp r3, #0
8001602: da02 bge.n 800160a <DP83848_GetLinkState+0x44>
{
return DP83848_STATUS_READ_ERROR;
8001604: f06f 0304 mvn.w r3, #4
8001608: e060 b.n 80016cc <DP83848_GetLinkState+0x106>
}
if((readval & DP83848_BSR_LINK_STATUS) == 0)
800160a: 68fb ldr r3, [r7, #12]
800160c: f003 0304 and.w r3, r3, #4
8001610: 2b00 cmp r3, #0
8001612: d101 bne.n 8001618 <DP83848_GetLinkState+0x52>
{
/* Return Link Down status */
return DP83848_STATUS_LINK_DOWN;
8001614: 2301 movs r3, #1
8001616: e059 b.n 80016cc <DP83848_GetLinkState+0x106>
}
/* Check Auto negotiaition */
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BCR, &readval) < 0)
8001618: 687b ldr r3, [r7, #4]
800161a: 695b ldr r3, [r3, #20]
800161c: 687a ldr r2, [r7, #4]
800161e: 6810 ldr r0, [r2, #0]
8001620: f107 020c add.w r2, r7, #12
8001624: 2100 movs r1, #0
8001626: 4798 blx r3
8001628: 4603 mov r3, r0
800162a: 2b00 cmp r3, #0
800162c: da02 bge.n 8001634 <DP83848_GetLinkState+0x6e>
{
return DP83848_STATUS_READ_ERROR;
800162e: f06f 0304 mvn.w r3, #4
8001632: e04b b.n 80016cc <DP83848_GetLinkState+0x106>
}
if((readval & DP83848_BCR_AUTONEGO_EN) != DP83848_BCR_AUTONEGO_EN)
8001634: 68fb ldr r3, [r7, #12]
8001636: f403 5380 and.w r3, r3, #4096 ; 0x1000
800163a: 2b00 cmp r3, #0
800163c: d11b bne.n 8001676 <DP83848_GetLinkState+0xb0>
{
if(((readval & DP83848_BCR_SPEED_SELECT) == DP83848_BCR_SPEED_SELECT) && ((readval & DP83848_BCR_DUPLEX_MODE) == DP83848_BCR_DUPLEX_MODE))
800163e: 68fb ldr r3, [r7, #12]
8001640: f403 5300 and.w r3, r3, #8192 ; 0x2000
8001644: 2b00 cmp r3, #0
8001646: d006 beq.n 8001656 <DP83848_GetLinkState+0x90>
8001648: 68fb ldr r3, [r7, #12]
800164a: f403 7380 and.w r3, r3, #256 ; 0x100
800164e: 2b00 cmp r3, #0
8001650: d001 beq.n 8001656 <DP83848_GetLinkState+0x90>
{
return DP83848_STATUS_100MBITS_FULLDUPLEX;
8001652: 2302 movs r3, #2
8001654: e03a b.n 80016cc <DP83848_GetLinkState+0x106>
}
else if ((readval & DP83848_BCR_SPEED_SELECT) == DP83848_BCR_SPEED_SELECT)
8001656: 68fb ldr r3, [r7, #12]
8001658: f403 5300 and.w r3, r3, #8192 ; 0x2000
800165c: 2b00 cmp r3, #0
800165e: d001 beq.n 8001664 <DP83848_GetLinkState+0x9e>
{
return DP83848_STATUS_100MBITS_HALFDUPLEX;
8001660: 2303 movs r3, #3
8001662: e033 b.n 80016cc <DP83848_GetLinkState+0x106>
}
else if ((readval & DP83848_BCR_DUPLEX_MODE) == DP83848_BCR_DUPLEX_MODE)
8001664: 68fb ldr r3, [r7, #12]
8001666: f403 7380 and.w r3, r3, #256 ; 0x100
800166a: 2b00 cmp r3, #0
800166c: d001 beq.n 8001672 <DP83848_GetLinkState+0xac>
{
return DP83848_STATUS_10MBITS_FULLDUPLEX;
800166e: 2304 movs r3, #4
8001670: e02c b.n 80016cc <DP83848_GetLinkState+0x106>
}
else
{
return DP83848_STATUS_10MBITS_HALFDUPLEX;
8001672: 2305 movs r3, #5
8001674: e02a b.n 80016cc <DP83848_GetLinkState+0x106>
}
}
else /* Auto Nego enabled */
{
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_PHYSCSR, &readval) < 0)
8001676: 687b ldr r3, [r7, #4]
8001678: 695b ldr r3, [r3, #20]
800167a: 687a ldr r2, [r7, #4]
800167c: 6810 ldr r0, [r2, #0]
800167e: f107 020c add.w r2, r7, #12
8001682: 2110 movs r1, #16
8001684: 4798 blx r3
8001686: 4603 mov r3, r0
8001688: 2b00 cmp r3, #0
800168a: da02 bge.n 8001692 <DP83848_GetLinkState+0xcc>
{
return DP83848_STATUS_READ_ERROR;
800168c: f06f 0304 mvn.w r3, #4
8001690: e01c b.n 80016cc <DP83848_GetLinkState+0x106>
}
/* Check if auto nego not done */
if((readval & DP83848_PHYSCSR_AUTONEGO_DONE) == 0)
8001692: 68fb ldr r3, [r7, #12]
8001694: f403 7380 and.w r3, r3, #256 ; 0x100
8001698: 2b00 cmp r3, #0
800169a: d101 bne.n 80016a0 <DP83848_GetLinkState+0xda>
{
return DP83848_STATUS_AUTONEGO_NOTDONE;
800169c: 2306 movs r3, #6
800169e: e015 b.n 80016cc <DP83848_GetLinkState+0x106>
}
if((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_100BTX_FD)
80016a0: 68fb ldr r3, [r7, #12]
80016a2: f003 0306 and.w r3, r3, #6
80016a6: 2b04 cmp r3, #4
80016a8: d101 bne.n 80016ae <DP83848_GetLinkState+0xe8>
{
return DP83848_STATUS_100MBITS_FULLDUPLEX;
80016aa: 2302 movs r3, #2
80016ac: e00e b.n 80016cc <DP83848_GetLinkState+0x106>
}
else if ((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_100BTX_HD)
80016ae: 68fb ldr r3, [r7, #12]
80016b0: f003 0306 and.w r3, r3, #6
80016b4: 2b00 cmp r3, #0
80016b6: d101 bne.n 80016bc <DP83848_GetLinkState+0xf6>
{
return DP83848_STATUS_100MBITS_HALFDUPLEX;
80016b8: 2303 movs r3, #3
80016ba: e007 b.n 80016cc <DP83848_GetLinkState+0x106>
}
else if ((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_10BT_FD)
80016bc: 68fb ldr r3, [r7, #12]
80016be: f003 0306 and.w r3, r3, #6
80016c2: 2b06 cmp r3, #6
80016c4: d101 bne.n 80016ca <DP83848_GetLinkState+0x104>
{
return DP83848_STATUS_10MBITS_FULLDUPLEX;
80016c6: 2304 movs r3, #4
80016c8: e000 b.n 80016cc <DP83848_GetLinkState+0x106>
}
else
{
return DP83848_STATUS_10MBITS_HALFDUPLEX;
80016ca: 2305 movs r3, #5
}
}
}
80016cc: 4618 mov r0, r3
80016ce: 3710 adds r7, #16
80016d0: 46bd mov sp, r7
80016d2: bd80 pop {r7, pc}
080016d4 <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)
{
80016d4: b580 push {r7, lr}
80016d6: af00 add r7, sp, #0
/* Configure Flash prefetch, Instruction cache, Data cache */
#if (INSTRUCTION_CACHE_ENABLE != 0U)
__HAL_FLASH_INSTRUCTION_CACHE_ENABLE();
80016d8: 4b0e ldr r3, [pc, #56] ; (8001714 <HAL_Init+0x40>)
80016da: 681b ldr r3, [r3, #0]
80016dc: 4a0d ldr r2, [pc, #52] ; (8001714 <HAL_Init+0x40>)
80016de: f443 7300 orr.w r3, r3, #512 ; 0x200
80016e2: 6013 str r3, [r2, #0]
#endif /* INSTRUCTION_CACHE_ENABLE */
#if (DATA_CACHE_ENABLE != 0U)
__HAL_FLASH_DATA_CACHE_ENABLE();
80016e4: 4b0b ldr r3, [pc, #44] ; (8001714 <HAL_Init+0x40>)
80016e6: 681b ldr r3, [r3, #0]
80016e8: 4a0a ldr r2, [pc, #40] ; (8001714 <HAL_Init+0x40>)
80016ea: f443 6380 orr.w r3, r3, #1024 ; 0x400
80016ee: 6013 str r3, [r2, #0]
#endif /* DATA_CACHE_ENABLE */
#if (PREFETCH_ENABLE != 0U)
__HAL_FLASH_PREFETCH_BUFFER_ENABLE();
80016f0: 4b08 ldr r3, [pc, #32] ; (8001714 <HAL_Init+0x40>)
80016f2: 681b ldr r3, [r3, #0]
80016f4: 4a07 ldr r2, [pc, #28] ; (8001714 <HAL_Init+0x40>)
80016f6: f443 7380 orr.w r3, r3, #256 ; 0x100
80016fa: 6013 str r3, [r2, #0]
#endif /* PREFETCH_ENABLE */
/* Set Interrupt Group Priority */
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
80016fc: 2003 movs r0, #3
80016fe: f000 f931 bl 8001964 <HAL_NVIC_SetPriorityGrouping>
/* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */
HAL_InitTick(TICK_INT_PRIORITY);
8001702: 200f movs r0, #15
8001704: f000 f808 bl 8001718 <HAL_InitTick>
/* Init the low level hardware */
HAL_MspInit();
8001708: f7ff fd7c bl 8001204 <HAL_MspInit>
/* Return function status */
return HAL_OK;
800170c: 2300 movs r3, #0
}
800170e: 4618 mov r0, r3
8001710: bd80 pop {r7, pc}
8001712: bf00 nop
8001714: 40023c00 .word 0x40023c00
08001718 <HAL_InitTick>:
* implementation in user file.
* @param TickPriority Tick interrupt priority.
* @retval HAL status
*/
__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{
8001718: b580 push {r7, lr}
800171a: b082 sub sp, #8
800171c: af00 add r7, sp, #0
800171e: 6078 str r0, [r7, #4]
/* Configure the SysTick to have interrupt in 1ms time basis*/
if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U)
8001720: 4b12 ldr r3, [pc, #72] ; (800176c <HAL_InitTick+0x54>)
8001722: 681a ldr r2, [r3, #0]
8001724: 4b12 ldr r3, [pc, #72] ; (8001770 <HAL_InitTick+0x58>)
8001726: 781b ldrb r3, [r3, #0]
8001728: 4619 mov r1, r3
800172a: f44f 737a mov.w r3, #1000 ; 0x3e8
800172e: fbb3 f3f1 udiv r3, r3, r1
8001732: fbb2 f3f3 udiv r3, r2, r3
8001736: 4618 mov r0, r3
8001738: f000 f93b bl 80019b2 <HAL_SYSTICK_Config>
800173c: 4603 mov r3, r0
800173e: 2b00 cmp r3, #0
8001740: d001 beq.n 8001746 <HAL_InitTick+0x2e>
{
return HAL_ERROR;
8001742: 2301 movs r3, #1
8001744: e00e b.n 8001764 <HAL_InitTick+0x4c>
}
/* Configure the SysTick IRQ priority */
if (TickPriority < (1UL << __NVIC_PRIO_BITS))
8001746: 687b ldr r3, [r7, #4]
8001748: 2b0f cmp r3, #15
800174a: d80a bhi.n 8001762 <HAL_InitTick+0x4a>
{
HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U);
800174c: 2200 movs r2, #0
800174e: 6879 ldr r1, [r7, #4]
8001750: f04f 30ff mov.w r0, #4294967295
8001754: f000 f911 bl 800197a <HAL_NVIC_SetPriority>
uwTickPrio = TickPriority;
8001758: 4a06 ldr r2, [pc, #24] ; (8001774 <HAL_InitTick+0x5c>)
800175a: 687b ldr r3, [r7, #4]
800175c: 6013 str r3, [r2, #0]
{
return HAL_ERROR;
}
/* Return function status */
return HAL_OK;
800175e: 2300 movs r3, #0
8001760: e000 b.n 8001764 <HAL_InitTick+0x4c>
return HAL_ERROR;
8001762: 2301 movs r3, #1
}
8001764: 4618 mov r0, r3
8001766: 3708 adds r7, #8
8001768: 46bd mov sp, r7
800176a: bd80 pop {r7, pc}
800176c: 20000000 .word 0x20000000
8001770: 20000008 .word 0x20000008
8001774: 20000004 .word 0x20000004
08001778 <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)
{
8001778: b480 push {r7}
800177a: af00 add r7, sp, #0
uwTick += uwTickFreq;
800177c: 4b06 ldr r3, [pc, #24] ; (8001798 <HAL_IncTick+0x20>)
800177e: 781b ldrb r3, [r3, #0]
8001780: 461a mov r2, r3
8001782: 4b06 ldr r3, [pc, #24] ; (800179c <HAL_IncTick+0x24>)
8001784: 681b ldr r3, [r3, #0]
8001786: 4413 add r3, r2
8001788: 4a04 ldr r2, [pc, #16] ; (800179c <HAL_IncTick+0x24>)
800178a: 6013 str r3, [r2, #0]
}
800178c: bf00 nop
800178e: 46bd mov sp, r7
8001790: f85d 7b04 ldr.w r7, [sp], #4
8001794: 4770 bx lr
8001796: bf00 nop
8001798: 20000008 .word 0x20000008
800179c: 20000a50 .word 0x20000a50
080017a0 <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)
{
80017a0: b480 push {r7}
80017a2: af00 add r7, sp, #0
return uwTick;
80017a4: 4b03 ldr r3, [pc, #12] ; (80017b4 <HAL_GetTick+0x14>)
80017a6: 681b ldr r3, [r3, #0]
}
80017a8: 4618 mov r0, r3
80017aa: 46bd mov sp, r7
80017ac: f85d 7b04 ldr.w r7, [sp], #4
80017b0: 4770 bx lr
80017b2: bf00 nop
80017b4: 20000a50 .word 0x20000a50
080017b8 <HAL_Delay>:
* implementations in user file.
* @param Delay specifies the delay time length, in milliseconds.
* @retval None
*/
__weak void HAL_Delay(uint32_t Delay)
{
80017b8: b580 push {r7, lr}
80017ba: b084 sub sp, #16
80017bc: af00 add r7, sp, #0
80017be: 6078 str r0, [r7, #4]
uint32_t tickstart = HAL_GetTick();
80017c0: f7ff ffee bl 80017a0 <HAL_GetTick>
80017c4: 60b8 str r0, [r7, #8]
uint32_t wait = Delay;
80017c6: 687b ldr r3, [r7, #4]
80017c8: 60fb str r3, [r7, #12]
/* Add a freq to guarantee minimum wait */
if (wait < HAL_MAX_DELAY)
80017ca: 68fb ldr r3, [r7, #12]
80017cc: f1b3 3fff cmp.w r3, #4294967295
80017d0: d005 beq.n 80017de <HAL_Delay+0x26>
{
wait += (uint32_t)(uwTickFreq);
80017d2: 4b0a ldr r3, [pc, #40] ; (80017fc <HAL_Delay+0x44>)
80017d4: 781b ldrb r3, [r3, #0]
80017d6: 461a mov r2, r3
80017d8: 68fb ldr r3, [r7, #12]
80017da: 4413 add r3, r2
80017dc: 60fb str r3, [r7, #12]
}
while((HAL_GetTick() - tickstart) < wait)
80017de: bf00 nop
80017e0: f7ff ffde bl 80017a0 <HAL_GetTick>
80017e4: 4602 mov r2, r0
80017e6: 68bb ldr r3, [r7, #8]
80017e8: 1ad3 subs r3, r2, r3
80017ea: 68fa ldr r2, [r7, #12]
80017ec: 429a cmp r2, r3
80017ee: d8f7 bhi.n 80017e0 <HAL_Delay+0x28>
{
}
}
80017f0: bf00 nop
80017f2: bf00 nop
80017f4: 3710 adds r7, #16
80017f6: 46bd mov sp, r7
80017f8: bd80 pop {r7, pc}
80017fa: bf00 nop
80017fc: 20000008 .word 0x20000008
08001800 <__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)
{
8001800: b480 push {r7}
8001802: b085 sub sp, #20
8001804: af00 add r7, sp, #0
8001806: 6078 str r0, [r7, #4]
uint32_t reg_value;
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
8001808: 687b ldr r3, [r7, #4]
800180a: f003 0307 and.w r3, r3, #7
800180e: 60fb str r3, [r7, #12]
reg_value = SCB->AIRCR; /* read old register configuration */
8001810: 4b0c ldr r3, [pc, #48] ; (8001844 <__NVIC_SetPriorityGrouping+0x44>)
8001812: 68db ldr r3, [r3, #12]
8001814: 60bb str r3, [r7, #8]
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
8001816: 68ba ldr r2, [r7, #8]
8001818: f64f 03ff movw r3, #63743 ; 0xf8ff
800181c: 4013 ands r3, r2
800181e: 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 */
8001820: 68fb ldr r3, [r7, #12]
8001822: 021a lsls r2, r3, #8
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
8001824: 68bb ldr r3, [r7, #8]
8001826: 4313 orrs r3, r2
reg_value = (reg_value |
8001828: f043 63bf orr.w r3, r3, #100139008 ; 0x5f80000
800182c: f443 3300 orr.w r3, r3, #131072 ; 0x20000
8001830: 60bb str r3, [r7, #8]
SCB->AIRCR = reg_value;
8001832: 4a04 ldr r2, [pc, #16] ; (8001844 <__NVIC_SetPriorityGrouping+0x44>)
8001834: 68bb ldr r3, [r7, #8]
8001836: 60d3 str r3, [r2, #12]
}
8001838: bf00 nop
800183a: 3714 adds r7, #20
800183c: 46bd mov sp, r7
800183e: f85d 7b04 ldr.w r7, [sp], #4
8001842: 4770 bx lr
8001844: e000ed00 .word 0xe000ed00
08001848 <__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)
{
8001848: b480 push {r7}
800184a: af00 add r7, sp, #0
return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
800184c: 4b04 ldr r3, [pc, #16] ; (8001860 <__NVIC_GetPriorityGrouping+0x18>)
800184e: 68db ldr r3, [r3, #12]
8001850: 0a1b lsrs r3, r3, #8
8001852: f003 0307 and.w r3, r3, #7
}
8001856: 4618 mov r0, r3
8001858: 46bd mov sp, r7
800185a: f85d 7b04 ldr.w r7, [sp], #4
800185e: 4770 bx lr
8001860: e000ed00 .word 0xe000ed00
08001864 <__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)
{
8001864: b480 push {r7}
8001866: b083 sub sp, #12
8001868: af00 add r7, sp, #0
800186a: 4603 mov r3, r0
800186c: 6039 str r1, [r7, #0]
800186e: 71fb strb r3, [r7, #7]
if ((int32_t)(IRQn) >= 0)
8001870: f997 3007 ldrsb.w r3, [r7, #7]
8001874: 2b00 cmp r3, #0
8001876: db0a blt.n 800188e <__NVIC_SetPriority+0x2a>
{
NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
8001878: 683b ldr r3, [r7, #0]
800187a: b2da uxtb r2, r3
800187c: 490c ldr r1, [pc, #48] ; (80018b0 <__NVIC_SetPriority+0x4c>)
800187e: f997 3007 ldrsb.w r3, [r7, #7]
8001882: 0112 lsls r2, r2, #4
8001884: b2d2 uxtb r2, r2
8001886: 440b add r3, r1
8001888: 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);
}
}
800188c: e00a b.n 80018a4 <__NVIC_SetPriority+0x40>
SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
800188e: 683b ldr r3, [r7, #0]
8001890: b2da uxtb r2, r3
8001892: 4908 ldr r1, [pc, #32] ; (80018b4 <__NVIC_SetPriority+0x50>)
8001894: 79fb ldrb r3, [r7, #7]
8001896: f003 030f and.w r3, r3, #15
800189a: 3b04 subs r3, #4
800189c: 0112 lsls r2, r2, #4
800189e: b2d2 uxtb r2, r2
80018a0: 440b add r3, r1
80018a2: 761a strb r2, [r3, #24]
}
80018a4: bf00 nop
80018a6: 370c adds r7, #12
80018a8: 46bd mov sp, r7
80018aa: f85d 7b04 ldr.w r7, [sp], #4
80018ae: 4770 bx lr
80018b0: e000e100 .word 0xe000e100
80018b4: e000ed00 .word 0xe000ed00
080018b8 <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)
{
80018b8: b480 push {r7}
80018ba: b089 sub sp, #36 ; 0x24
80018bc: af00 add r7, sp, #0
80018be: 60f8 str r0, [r7, #12]
80018c0: 60b9 str r1, [r7, #8]
80018c2: 607a str r2, [r7, #4]
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
80018c4: 68fb ldr r3, [r7, #12]
80018c6: f003 0307 and.w r3, r3, #7
80018ca: 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);
80018cc: 69fb ldr r3, [r7, #28]
80018ce: f1c3 0307 rsb r3, r3, #7
80018d2: 2b04 cmp r3, #4
80018d4: bf28 it cs
80018d6: 2304 movcs r3, #4
80018d8: 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));
80018da: 69fb ldr r3, [r7, #28]
80018dc: 3304 adds r3, #4
80018de: 2b06 cmp r3, #6
80018e0: d902 bls.n 80018e8 <NVIC_EncodePriority+0x30>
80018e2: 69fb ldr r3, [r7, #28]
80018e4: 3b03 subs r3, #3
80018e6: e000 b.n 80018ea <NVIC_EncodePriority+0x32>
80018e8: 2300 movs r3, #0
80018ea: 617b str r3, [r7, #20]
return (
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
80018ec: f04f 32ff mov.w r2, #4294967295
80018f0: 69bb ldr r3, [r7, #24]
80018f2: fa02 f303 lsl.w r3, r2, r3
80018f6: 43da mvns r2, r3
80018f8: 68bb ldr r3, [r7, #8]
80018fa: 401a ands r2, r3
80018fc: 697b ldr r3, [r7, #20]
80018fe: 409a lsls r2, r3
((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL)))
8001900: f04f 31ff mov.w r1, #4294967295
8001904: 697b ldr r3, [r7, #20]
8001906: fa01 f303 lsl.w r3, r1, r3
800190a: 43d9 mvns r1, r3
800190c: 687b ldr r3, [r7, #4]
800190e: 400b ands r3, r1
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
8001910: 4313 orrs r3, r2
);
}
8001912: 4618 mov r0, r3
8001914: 3724 adds r7, #36 ; 0x24
8001916: 46bd mov sp, r7
8001918: f85d 7b04 ldr.w r7, [sp], #4
800191c: 4770 bx lr
...
08001920 <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)
{
8001920: b580 push {r7, lr}
8001922: b082 sub sp, #8
8001924: af00 add r7, sp, #0
8001926: 6078 str r0, [r7, #4]
if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)
8001928: 687b ldr r3, [r7, #4]
800192a: 3b01 subs r3, #1
800192c: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000
8001930: d301 bcc.n 8001936 <SysTick_Config+0x16>
{
return (1UL); /* Reload value impossible */
8001932: 2301 movs r3, #1
8001934: e00f b.n 8001956 <SysTick_Config+0x36>
}
SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */
8001936: 4a0a ldr r2, [pc, #40] ; (8001960 <SysTick_Config+0x40>)
8001938: 687b ldr r3, [r7, #4]
800193a: 3b01 subs r3, #1
800193c: 6053 str r3, [r2, #4]
NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */
800193e: 210f movs r1, #15
8001940: f04f 30ff mov.w r0, #4294967295
8001944: f7ff ff8e bl 8001864 <__NVIC_SetPriority>
SysTick->VAL = 0UL; /* Load the SysTick Counter Value */
8001948: 4b05 ldr r3, [pc, #20] ; (8001960 <SysTick_Config+0x40>)
800194a: 2200 movs r2, #0
800194c: 609a str r2, [r3, #8]
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
800194e: 4b04 ldr r3, [pc, #16] ; (8001960 <SysTick_Config+0x40>)
8001950: 2207 movs r2, #7
8001952: 601a str r2, [r3, #0]
SysTick_CTRL_TICKINT_Msk |
SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
return (0UL); /* Function successful */
8001954: 2300 movs r3, #0
}
8001956: 4618 mov r0, r3
8001958: 3708 adds r7, #8
800195a: 46bd mov sp, r7
800195c: bd80 pop {r7, pc}
800195e: bf00 nop
8001960: e000e010 .word 0xe000e010
08001964 <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)
{
8001964: b580 push {r7, lr}
8001966: b082 sub sp, #8
8001968: af00 add r7, sp, #0
800196a: 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);
800196c: 6878 ldr r0, [r7, #4]
800196e: f7ff ff47 bl 8001800 <__NVIC_SetPriorityGrouping>
}
8001972: bf00 nop
8001974: 3708 adds r7, #8
8001976: 46bd mov sp, r7
8001978: bd80 pop {r7, pc}
0800197a <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)
{
800197a: b580 push {r7, lr}
800197c: b086 sub sp, #24
800197e: af00 add r7, sp, #0
8001980: 4603 mov r3, r0
8001982: 60b9 str r1, [r7, #8]
8001984: 607a str r2, [r7, #4]
8001986: 73fb strb r3, [r7, #15]
uint32_t prioritygroup = 0x00U;
8001988: 2300 movs r3, #0
800198a: 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();
800198c: f7ff ff5c bl 8001848 <__NVIC_GetPriorityGrouping>
8001990: 6178 str r0, [r7, #20]
NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority));
8001992: 687a ldr r2, [r7, #4]
8001994: 68b9 ldr r1, [r7, #8]
8001996: 6978 ldr r0, [r7, #20]
8001998: f7ff ff8e bl 80018b8 <NVIC_EncodePriority>
800199c: 4602 mov r2, r0
800199e: f997 300f ldrsb.w r3, [r7, #15]
80019a2: 4611 mov r1, r2
80019a4: 4618 mov r0, r3
80019a6: f7ff ff5d bl 8001864 <__NVIC_SetPriority>
}
80019aa: bf00 nop
80019ac: 3718 adds r7, #24
80019ae: 46bd mov sp, r7
80019b0: bd80 pop {r7, pc}
080019b2 <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)
{
80019b2: b580 push {r7, lr}
80019b4: b082 sub sp, #8
80019b6: af00 add r7, sp, #0
80019b8: 6078 str r0, [r7, #4]
return SysTick_Config(TicksNumb);
80019ba: 6878 ldr r0, [r7, #4]
80019bc: f7ff ffb0 bl 8001920 <SysTick_Config>
80019c0: 4603 mov r3, r0
}
80019c2: 4618 mov r0, r3
80019c4: 3708 adds r7, #8
80019c6: 46bd mov sp, r7
80019c8: bd80 pop {r7, pc}
...
080019cc <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)
{
80019cc: b580 push {r7, lr}
80019ce: b084 sub sp, #16
80019d0: af00 add r7, sp, #0
80019d2: 6078 str r0, [r7, #4]
uint32_t tickstart;
if (heth == NULL)
80019d4: 687b ldr r3, [r7, #4]
80019d6: 2b00 cmp r3, #0
80019d8: d101 bne.n 80019de <HAL_ETH_Init+0x12>
{
return HAL_ERROR;
80019da: 2301 movs r3, #1
80019dc: e06c b.n 8001ab8 <HAL_ETH_Init+0xec>
}
if (heth->gState == HAL_ETH_STATE_RESET)
80019de: 687b ldr r3, [r7, #4]
80019e0: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
80019e4: 2b00 cmp r3, #0
80019e6: d106 bne.n 80019f6 <HAL_ETH_Init+0x2a>
{
heth->gState = HAL_ETH_STATE_BUSY;
80019e8: 687b ldr r3, [r7, #4]
80019ea: 2223 movs r2, #35 ; 0x23
80019ec: 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);
80019f0: 6878 ldr r0, [r7, #4]
80019f2: f002 fa57 bl 8003ea4 <HAL_ETH_MspInit>
#endif /* (USE_HAL_ETH_REGISTER_CALLBACKS) */
}
__HAL_RCC_SYSCFG_CLK_ENABLE();
80019f6: 2300 movs r3, #0
80019f8: 60bb str r3, [r7, #8]
80019fa: 4b31 ldr r3, [pc, #196] ; (8001ac0 <HAL_ETH_Init+0xf4>)
80019fc: 6c5b ldr r3, [r3, #68] ; 0x44
80019fe: 4a30 ldr r2, [pc, #192] ; (8001ac0 <HAL_ETH_Init+0xf4>)
8001a00: f443 4380 orr.w r3, r3, #16384 ; 0x4000
8001a04: 6453 str r3, [r2, #68] ; 0x44
8001a06: 4b2e ldr r3, [pc, #184] ; (8001ac0 <HAL_ETH_Init+0xf4>)
8001a08: 6c5b ldr r3, [r3, #68] ; 0x44
8001a0a: f403 4380 and.w r3, r3, #16384 ; 0x4000
8001a0e: 60bb str r3, [r7, #8]
8001a10: 68bb ldr r3, [r7, #8]
/* Select MII or RMII Mode*/
SYSCFG->PMC &= ~(SYSCFG_PMC_MII_RMII_SEL);
8001a12: 4b2c ldr r3, [pc, #176] ; (8001ac4 <HAL_ETH_Init+0xf8>)
8001a14: 685b ldr r3, [r3, #4]
8001a16: 4a2b ldr r2, [pc, #172] ; (8001ac4 <HAL_ETH_Init+0xf8>)
8001a18: f423 0300 bic.w r3, r3, #8388608 ; 0x800000
8001a1c: 6053 str r3, [r2, #4]
SYSCFG->PMC |= (uint32_t)heth->Init.MediaInterface;
8001a1e: 4b29 ldr r3, [pc, #164] ; (8001ac4 <HAL_ETH_Init+0xf8>)
8001a20: 685a ldr r2, [r3, #4]
8001a22: 687b ldr r3, [r7, #4]
8001a24: 689b ldr r3, [r3, #8]
8001a26: 4927 ldr r1, [pc, #156] ; (8001ac4 <HAL_ETH_Init+0xf8>)
8001a28: 4313 orrs r3, r2
8001a2a: 604b str r3, [r1, #4]
/* Dummy read to sync SYSCFG with ETH */
(void)SYSCFG->PMC;
8001a2c: 4b25 ldr r3, [pc, #148] ; (8001ac4 <HAL_ETH_Init+0xf8>)
8001a2e: 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);
8001a30: 687b ldr r3, [r7, #4]
8001a32: 681b ldr r3, [r3, #0]
8001a34: f503 5380 add.w r3, r3, #4096 ; 0x1000
8001a38: 681b ldr r3, [r3, #0]
8001a3a: 687a ldr r2, [r7, #4]
8001a3c: 6812 ldr r2, [r2, #0]
8001a3e: f043 0301 orr.w r3, r3, #1
8001a42: f502 5280 add.w r2, r2, #4096 ; 0x1000
8001a46: 6013 str r3, [r2, #0]
/* Get tick */
tickstart = HAL_GetTick();
8001a48: f7ff feaa bl 80017a0 <HAL_GetTick>
8001a4c: 60f8 str r0, [r7, #12]
/* Wait for software reset */
while (READ_BIT(heth->Instance->DMABMR, ETH_DMABMR_SR) > 0U)
8001a4e: e011 b.n 8001a74 <HAL_ETH_Init+0xa8>
{
if (((HAL_GetTick() - tickstart) > ETH_SWRESET_TIMEOUT))
8001a50: f7ff fea6 bl 80017a0 <HAL_GetTick>
8001a54: 4602 mov r2, r0
8001a56: 68fb ldr r3, [r7, #12]
8001a58: 1ad3 subs r3, r2, r3
8001a5a: f5b3 7ffa cmp.w r3, #500 ; 0x1f4
8001a5e: d909 bls.n 8001a74 <HAL_ETH_Init+0xa8>
{
/* Set Error Code */
heth->ErrorCode = HAL_ETH_ERROR_TIMEOUT;
8001a60: 687b ldr r3, [r7, #4]
8001a62: 2204 movs r2, #4
8001a64: f8c3 2088 str.w r2, [r3, #136] ; 0x88
/* Set State as Error */
heth->gState = HAL_ETH_STATE_ERROR;
8001a68: 687b ldr r3, [r7, #4]
8001a6a: 22e0 movs r2, #224 ; 0xe0
8001a6c: f8c3 2084 str.w r2, [r3, #132] ; 0x84
/* Return Error */
return HAL_ERROR;
8001a70: 2301 movs r3, #1
8001a72: e021 b.n 8001ab8 <HAL_ETH_Init+0xec>
while (READ_BIT(heth->Instance->DMABMR, ETH_DMABMR_SR) > 0U)
8001a74: 687b ldr r3, [r7, #4]
8001a76: 681b ldr r3, [r3, #0]
8001a78: f503 5380 add.w r3, r3, #4096 ; 0x1000
8001a7c: 681b ldr r3, [r3, #0]
8001a7e: f003 0301 and.w r3, r3, #1
8001a82: 2b00 cmp r3, #0
8001a84: d1e4 bne.n 8001a50 <HAL_ETH_Init+0x84>
}
}
/*------------------ MAC, MTL and DMA default Configuration ----------------*/
ETH_MACDMAConfig(heth);
8001a86: 6878 ldr r0, [r7, #4]
8001a88: f000 fdf0 bl 800266c <ETH_MACDMAConfig>
/*------------------ DMA Tx Descriptors Configuration ----------------------*/
ETH_DMATxDescListInit(heth);
8001a8c: 6878 ldr r0, [r7, #4]
8001a8e: f000 fe97 bl 80027c0 <ETH_DMATxDescListInit>
/*------------------ DMA Rx Descriptors Configuration ----------------------*/
ETH_DMARxDescListInit(heth);
8001a92: 6878 ldr r0, [r7, #4]
8001a94: f000 feed bl 8002872 <ETH_DMARxDescListInit>
/*--------------------- ETHERNET MAC Address Configuration ------------------*/
ETH_MACAddressConfig(heth, ETH_MAC_ADDRESS0, heth->Init.MACAddr);
8001a98: 687b ldr r3, [r7, #4]
8001a9a: 685b ldr r3, [r3, #4]
8001a9c: 461a mov r2, r3
8001a9e: 2100 movs r1, #0
8001aa0: 6878 ldr r0, [r7, #4]
8001aa2: f000 fe55 bl 8002750 <ETH_MACAddressConfig>
heth->ErrorCode = HAL_ETH_ERROR_NONE;
8001aa6: 687b ldr r3, [r7, #4]
8001aa8: 2200 movs r2, #0
8001aaa: f8c3 2088 str.w r2, [r3, #136] ; 0x88
heth->gState = HAL_ETH_STATE_READY;
8001aae: 687b ldr r3, [r7, #4]
8001ab0: 2210 movs r2, #16
8001ab2: f8c3 2084 str.w r2, [r3, #132] ; 0x84
return HAL_OK;
8001ab6: 2300 movs r3, #0
}
8001ab8: 4618 mov r0, r3
8001aba: 3710 adds r7, #16
8001abc: 46bd mov sp, r7
8001abe: bd80 pop {r7, pc}
8001ac0: 40023800 .word 0x40023800
8001ac4: 40013800 .word 0x40013800
08001ac8 <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)
{
8001ac8: b580 push {r7, lr}
8001aca: b084 sub sp, #16
8001acc: af00 add r7, sp, #0
8001ace: 6078 str r0, [r7, #4]
uint32_t tmpreg1;
if (heth->gState == HAL_ETH_STATE_READY)
8001ad0: 687b ldr r3, [r7, #4]
8001ad2: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8001ad6: 2b10 cmp r3, #16
8001ad8: d150 bne.n 8001b7c <HAL_ETH_Start+0xb4>
{
heth->gState = HAL_ETH_STATE_BUSY;
8001ada: 687b ldr r3, [r7, #4]
8001adc: 2223 movs r2, #35 ; 0x23
8001ade: f8c3 2084 str.w r2, [r3, #132] ; 0x84
/* Set nombre of descriptors to build */
heth->RxDescList.RxBuildDescCnt = ETH_RX_DESC_CNT;
8001ae2: 687b ldr r3, [r7, #4]
8001ae4: 2204 movs r2, #4
8001ae6: 66da str r2, [r3, #108] ; 0x6c
/* Build all descriptors */
ETH_UpdateDescriptor(heth);
8001ae8: 6878 ldr r0, [r7, #4]
8001aea: f000 f9fd bl 8001ee8 <ETH_UpdateDescriptor>
/* Enable the MAC transmission */
SET_BIT(heth->Instance->MACCR, ETH_MACCR_TE);
8001aee: 687b ldr r3, [r7, #4]
8001af0: 681b ldr r3, [r3, #0]
8001af2: 681a ldr r2, [r3, #0]
8001af4: 687b ldr r3, [r7, #4]
8001af6: 681b ldr r3, [r3, #0]
8001af8: f042 0208 orr.w r2, r2, #8
8001afc: 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;
8001afe: 687b ldr r3, [r7, #4]
8001b00: 681b ldr r3, [r3, #0]
8001b02: 681b ldr r3, [r3, #0]
8001b04: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8001b06: 2001 movs r0, #1
8001b08: f7ff fe56 bl 80017b8 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg1;
8001b0c: 687b ldr r3, [r7, #4]
8001b0e: 681b ldr r3, [r3, #0]
8001b10: 68fa ldr r2, [r7, #12]
8001b12: 601a str r2, [r3, #0]
/* Enable the MAC reception */
SET_BIT(heth->Instance->MACCR, ETH_MACCR_RE);
8001b14: 687b ldr r3, [r7, #4]
8001b16: 681b ldr r3, [r3, #0]
8001b18: 681a ldr r2, [r3, #0]
8001b1a: 687b ldr r3, [r7, #4]
8001b1c: 681b ldr r3, [r3, #0]
8001b1e: f042 0204 orr.w r2, r2, #4
8001b22: 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;
8001b24: 687b ldr r3, [r7, #4]
8001b26: 681b ldr r3, [r3, #0]
8001b28: 681b ldr r3, [r3, #0]
8001b2a: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8001b2c: 2001 movs r0, #1
8001b2e: f7ff fe43 bl 80017b8 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg1;
8001b32: 687b ldr r3, [r7, #4]
8001b34: 681b ldr r3, [r3, #0]
8001b36: 68fa ldr r2, [r7, #12]
8001b38: 601a str r2, [r3, #0]
/* Flush Transmit FIFO */
ETH_FlushTransmitFIFO(heth);
8001b3a: 6878 ldr r0, [r7, #4]
8001b3c: f000 fc36 bl 80023ac <ETH_FlushTransmitFIFO>
/* Enable the DMA transmission */
SET_BIT(heth->Instance->DMAOMR, ETH_DMAOMR_ST);
8001b40: 687b ldr r3, [r7, #4]
8001b42: 681b ldr r3, [r3, #0]
8001b44: f503 5380 add.w r3, r3, #4096 ; 0x1000
8001b48: 699b ldr r3, [r3, #24]
8001b4a: 687a ldr r2, [r7, #4]
8001b4c: 6812 ldr r2, [r2, #0]
8001b4e: f443 5300 orr.w r3, r3, #8192 ; 0x2000
8001b52: f502 5280 add.w r2, r2, #4096 ; 0x1000
8001b56: 6193 str r3, [r2, #24]
/* Enable the DMA reception */
SET_BIT(heth->Instance->DMAOMR, ETH_DMAOMR_SR);
8001b58: 687b ldr r3, [r7, #4]
8001b5a: 681b ldr r3, [r3, #0]
8001b5c: f503 5380 add.w r3, r3, #4096 ; 0x1000
8001b60: 699b ldr r3, [r3, #24]
8001b62: 687a ldr r2, [r7, #4]
8001b64: 6812 ldr r2, [r2, #0]
8001b66: f043 0302 orr.w r3, r3, #2
8001b6a: f502 5280 add.w r2, r2, #4096 ; 0x1000
8001b6e: 6193 str r3, [r2, #24]
heth->gState = HAL_ETH_STATE_STARTED;
8001b70: 687b ldr r3, [r7, #4]
8001b72: 2223 movs r2, #35 ; 0x23
8001b74: f8c3 2084 str.w r2, [r3, #132] ; 0x84
return HAL_OK;
8001b78: 2300 movs r3, #0
8001b7a: e000 b.n 8001b7e <HAL_ETH_Start+0xb6>
}
else
{
return HAL_ERROR;
8001b7c: 2301 movs r3, #1
}
}
8001b7e: 4618 mov r0, r3
8001b80: 3710 adds r7, #16
8001b82: 46bd mov sp, r7
8001b84: bd80 pop {r7, pc}
08001b86 <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)
{
8001b86: b580 push {r7, lr}
8001b88: b084 sub sp, #16
8001b8a: af00 add r7, sp, #0
8001b8c: 6078 str r0, [r7, #4]
uint32_t tmpreg1;
if (heth->gState == HAL_ETH_STATE_STARTED)
8001b8e: 687b ldr r3, [r7, #4]
8001b90: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8001b94: 2b23 cmp r3, #35 ; 0x23
8001b96: d14a bne.n 8001c2e <HAL_ETH_Stop+0xa8>
{
/* Set the ETH peripheral state to BUSY */
heth->gState = HAL_ETH_STATE_BUSY;
8001b98: 687b ldr r3, [r7, #4]
8001b9a: 2223 movs r2, #35 ; 0x23
8001b9c: f8c3 2084 str.w r2, [r3, #132] ; 0x84
/* Disable the DMA transmission */
CLEAR_BIT(heth->Instance->DMAOMR, ETH_DMAOMR_ST);
8001ba0: 687b ldr r3, [r7, #4]
8001ba2: 681b ldr r3, [r3, #0]
8001ba4: f503 5380 add.w r3, r3, #4096 ; 0x1000
8001ba8: 699b ldr r3, [r3, #24]
8001baa: 687a ldr r2, [r7, #4]
8001bac: 6812 ldr r2, [r2, #0]
8001bae: f423 5300 bic.w r3, r3, #8192 ; 0x2000
8001bb2: f502 5280 add.w r2, r2, #4096 ; 0x1000
8001bb6: 6193 str r3, [r2, #24]
/* Disable the DMA reception */
CLEAR_BIT(heth->Instance->DMAOMR, ETH_DMAOMR_SR);
8001bb8: 687b ldr r3, [r7, #4]
8001bba: 681b ldr r3, [r3, #0]
8001bbc: f503 5380 add.w r3, r3, #4096 ; 0x1000
8001bc0: 699b ldr r3, [r3, #24]
8001bc2: 687a ldr r2, [r7, #4]
8001bc4: 6812 ldr r2, [r2, #0]
8001bc6: f023 0302 bic.w r3, r3, #2
8001bca: f502 5280 add.w r2, r2, #4096 ; 0x1000
8001bce: 6193 str r3, [r2, #24]
/* Disable the MAC reception */
CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_RE);
8001bd0: 687b ldr r3, [r7, #4]
8001bd2: 681b ldr r3, [r3, #0]
8001bd4: 681a ldr r2, [r3, #0]
8001bd6: 687b ldr r3, [r7, #4]
8001bd8: 681b ldr r3, [r3, #0]
8001bda: f022 0204 bic.w r2, r2, #4
8001bde: 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;
8001be0: 687b ldr r3, [r7, #4]
8001be2: 681b ldr r3, [r3, #0]
8001be4: 681b ldr r3, [r3, #0]
8001be6: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8001be8: 2001 movs r0, #1
8001bea: f7ff fde5 bl 80017b8 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg1;
8001bee: 687b ldr r3, [r7, #4]
8001bf0: 681b ldr r3, [r3, #0]
8001bf2: 68fa ldr r2, [r7, #12]
8001bf4: 601a str r2, [r3, #0]
/* Flush Transmit FIFO */
ETH_FlushTransmitFIFO(heth);
8001bf6: 6878 ldr r0, [r7, #4]
8001bf8: f000 fbd8 bl 80023ac <ETH_FlushTransmitFIFO>
/* Disable the MAC transmission */
CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_TE);
8001bfc: 687b ldr r3, [r7, #4]
8001bfe: 681b ldr r3, [r3, #0]
8001c00: 681a ldr r2, [r3, #0]
8001c02: 687b ldr r3, [r7, #4]
8001c04: 681b ldr r3, [r3, #0]
8001c06: f022 0208 bic.w r2, r2, #8
8001c0a: 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;
8001c0c: 687b ldr r3, [r7, #4]
8001c0e: 681b ldr r3, [r3, #0]
8001c10: 681b ldr r3, [r3, #0]
8001c12: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8001c14: 2001 movs r0, #1
8001c16: f7ff fdcf bl 80017b8 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg1;
8001c1a: 687b ldr r3, [r7, #4]
8001c1c: 681b ldr r3, [r3, #0]
8001c1e: 68fa ldr r2, [r7, #12]
8001c20: 601a str r2, [r3, #0]
heth->gState = HAL_ETH_STATE_READY;
8001c22: 687b ldr r3, [r7, #4]
8001c24: 2210 movs r2, #16
8001c26: f8c3 2084 str.w r2, [r3, #132] ; 0x84
/* Return function status */
return HAL_OK;
8001c2a: 2300 movs r3, #0
8001c2c: e000 b.n 8001c30 <HAL_ETH_Stop+0xaa>
}
else
{
return HAL_ERROR;
8001c2e: 2301 movs r3, #1
}
}
8001c30: 4618 mov r0, r3
8001c32: 3710 adds r7, #16
8001c34: 46bd mov sp, r7
8001c36: bd80 pop {r7, pc}
08001c38 <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)
{
8001c38: b580 push {r7, lr}
8001c3a: b086 sub sp, #24
8001c3c: af00 add r7, sp, #0
8001c3e: 60f8 str r0, [r7, #12]
8001c40: 60b9 str r1, [r7, #8]
8001c42: 607a str r2, [r7, #4]
uint32_t tickstart;
ETH_DMADescTypeDef *dmatxdesc;
if (pTxConfig == NULL)
8001c44: 68bb ldr r3, [r7, #8]
8001c46: 2b00 cmp r3, #0
8001c48: d109 bne.n 8001c5e <HAL_ETH_Transmit+0x26>
{
heth->ErrorCode |= HAL_ETH_ERROR_PARAM;
8001c4a: 68fb ldr r3, [r7, #12]
8001c4c: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8001c50: f043 0201 orr.w r2, r3, #1
8001c54: 68fb ldr r3, [r7, #12]
8001c56: f8c3 2088 str.w r2, [r3, #136] ; 0x88
return HAL_ERROR;
8001c5a: 2301 movs r3, #1
8001c5c: e07c b.n 8001d58 <HAL_ETH_Transmit+0x120>
}
if (heth->gState == HAL_ETH_STATE_STARTED)
8001c5e: 68fb ldr r3, [r7, #12]
8001c60: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8001c64: 2b23 cmp r3, #35 ; 0x23
8001c66: d176 bne.n 8001d56 <HAL_ETH_Transmit+0x11e>
{
/* Config DMA Tx descriptor by Tx Packet info */
if (ETH_Prepare_Tx_Descriptors(heth, pTxConfig, 0) != HAL_ETH_ERROR_NONE)
8001c68: 2200 movs r2, #0
8001c6a: 68b9 ldr r1, [r7, #8]
8001c6c: 68f8 ldr r0, [r7, #12]
8001c6e: f000 fe6d bl 800294c <ETH_Prepare_Tx_Descriptors>
8001c72: 4603 mov r3, r0
8001c74: 2b00 cmp r3, #0
8001c76: d009 beq.n 8001c8c <HAL_ETH_Transmit+0x54>
{
/* Set the ETH error code */
heth->ErrorCode |= HAL_ETH_ERROR_BUSY;
8001c78: 68fb ldr r3, [r7, #12]
8001c7a: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8001c7e: f043 0202 orr.w r2, r3, #2
8001c82: 68fb ldr r3, [r7, #12]
8001c84: f8c3 2088 str.w r2, [r3, #136] ; 0x88
return HAL_ERROR;
8001c88: 2301 movs r3, #1
8001c8a: e065 b.n 8001d58 <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");
8001c8c: f3bf 8f4f dsb sy
}
8001c90: bf00 nop
}
/* Ensure completion of descriptor preparation before transmission start */
__DSB();
dmatxdesc = (ETH_DMADescTypeDef *)(&heth->TxDescList)->TxDesc[heth->TxDescList.CurTxDesc];
8001c92: 68fb ldr r3, [r7, #12]
8001c94: 6a9a ldr r2, [r3, #40] ; 0x28
8001c96: 68fb ldr r3, [r7, #12]
8001c98: 3206 adds r2, #6
8001c9a: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8001c9e: 617b str r3, [r7, #20]
/* Incr current tx desc index */
INCR_TX_DESC_INDEX(heth->TxDescList.CurTxDesc, 1U);
8001ca0: 68fb ldr r3, [r7, #12]
8001ca2: 6a9b ldr r3, [r3, #40] ; 0x28
8001ca4: 1c5a adds r2, r3, #1
8001ca6: 68fb ldr r3, [r7, #12]
8001ca8: 629a str r2, [r3, #40] ; 0x28
8001caa: 68fb ldr r3, [r7, #12]
8001cac: 6a9b ldr r3, [r3, #40] ; 0x28
8001cae: 2b03 cmp r3, #3
8001cb0: d904 bls.n 8001cbc <HAL_ETH_Transmit+0x84>
8001cb2: 68fb ldr r3, [r7, #12]
8001cb4: 6a9b ldr r3, [r3, #40] ; 0x28
8001cb6: 1f1a subs r2, r3, #4
8001cb8: 68fb ldr r3, [r7, #12]
8001cba: 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]));
8001cbc: 68fb ldr r3, [r7, #12]
8001cbe: 6a99 ldr r1, [r3, #40] ; 0x28
8001cc0: 68fb ldr r3, [r7, #12]
8001cc2: 681a ldr r2, [r3, #0]
8001cc4: 68fb ldr r3, [r7, #12]
8001cc6: 3106 adds r1, #6
8001cc8: f853 3021 ldr.w r3, [r3, r1, lsl #2]
8001ccc: f502 5280 add.w r2, r2, #4096 ; 0x1000
8001cd0: 6053 str r3, [r2, #4]
tickstart = HAL_GetTick();
8001cd2: f7ff fd65 bl 80017a0 <HAL_GetTick>
8001cd6: 6138 str r0, [r7, #16]
/* Wait for data to be transmitted or timeout occurred */
while ((dmatxdesc->DESC0 & ETH_DMATXDESC_OWN) != (uint32_t)RESET)
8001cd8: e037 b.n 8001d4a <HAL_ETH_Transmit+0x112>
{
if ((heth->Instance->DMASR & ETH_DMASR_FBES) != (uint32_t)RESET)
8001cda: 68fb ldr r3, [r7, #12]
8001cdc: 681b ldr r3, [r3, #0]
8001cde: f503 5380 add.w r3, r3, #4096 ; 0x1000
8001ce2: 695b ldr r3, [r3, #20]
8001ce4: f403 5300 and.w r3, r3, #8192 ; 0x2000
8001ce8: 2b00 cmp r3, #0
8001cea: d011 beq.n 8001d10 <HAL_ETH_Transmit+0xd8>
{
heth->ErrorCode |= HAL_ETH_ERROR_DMA;
8001cec: 68fb ldr r3, [r7, #12]
8001cee: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8001cf2: f043 0208 orr.w r2, r3, #8
8001cf6: 68fb ldr r3, [r7, #12]
8001cf8: f8c3 2088 str.w r2, [r3, #136] ; 0x88
heth->DMAErrorCode = heth->Instance->DMASR;
8001cfc: 68fb ldr r3, [r7, #12]
8001cfe: 681b ldr r3, [r3, #0]
8001d00: f503 5380 add.w r3, r3, #4096 ; 0x1000
8001d04: 695a ldr r2, [r3, #20]
8001d06: 68fb ldr r3, [r7, #12]
8001d08: f8c3 208c str.w r2, [r3, #140] ; 0x8c
/* Return function status */
return HAL_ERROR;
8001d0c: 2301 movs r3, #1
8001d0e: e023 b.n 8001d58 <HAL_ETH_Transmit+0x120>
}
/* Check for the Timeout */
if (Timeout != HAL_MAX_DELAY)
8001d10: 687b ldr r3, [r7, #4]
8001d12: f1b3 3fff cmp.w r3, #4294967295
8001d16: d018 beq.n 8001d4a <HAL_ETH_Transmit+0x112>
{
if (((HAL_GetTick() - tickstart) > Timeout) || (Timeout == 0U))
8001d18: f7ff fd42 bl 80017a0 <HAL_GetTick>
8001d1c: 4602 mov r2, r0
8001d1e: 693b ldr r3, [r7, #16]
8001d20: 1ad3 subs r3, r2, r3
8001d22: 687a ldr r2, [r7, #4]
8001d24: 429a cmp r2, r3
8001d26: d302 bcc.n 8001d2e <HAL_ETH_Transmit+0xf6>
8001d28: 687b ldr r3, [r7, #4]
8001d2a: 2b00 cmp r3, #0
8001d2c: d10d bne.n 8001d4a <HAL_ETH_Transmit+0x112>
{
heth->ErrorCode |= HAL_ETH_ERROR_TIMEOUT;
8001d2e: 68fb ldr r3, [r7, #12]
8001d30: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8001d34: f043 0204 orr.w r2, r3, #4
8001d38: 68fb ldr r3, [r7, #12]
8001d3a: f8c3 2088 str.w r2, [r3, #136] ; 0x88
/* Clear TX descriptor so that we can proceed */
dmatxdesc->DESC0 = (ETH_DMATXDESC_FS | ETH_DMATXDESC_LS);
8001d3e: 697b ldr r3, [r7, #20]
8001d40: f04f 5240 mov.w r2, #805306368 ; 0x30000000
8001d44: 601a str r2, [r3, #0]
return HAL_ERROR;
8001d46: 2301 movs r3, #1
8001d48: e006 b.n 8001d58 <HAL_ETH_Transmit+0x120>
while ((dmatxdesc->DESC0 & ETH_DMATXDESC_OWN) != (uint32_t)RESET)
8001d4a: 697b ldr r3, [r7, #20]
8001d4c: 681b ldr r3, [r3, #0]
8001d4e: 2b00 cmp r3, #0
8001d50: dbc3 blt.n 8001cda <HAL_ETH_Transmit+0xa2>
}
}
}
/* Return function status */
return HAL_OK;
8001d52: 2300 movs r3, #0
8001d54: e000 b.n 8001d58 <HAL_ETH_Transmit+0x120>
}
else
{
return HAL_ERROR;
8001d56: 2301 movs r3, #1
}
}
8001d58: 4618 mov r0, r3
8001d5a: 3718 adds r7, #24
8001d5c: 46bd mov sp, r7
8001d5e: bd80 pop {r7, pc}
08001d60 <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)
{
8001d60: b580 push {r7, lr}
8001d62: b088 sub sp, #32
8001d64: af00 add r7, sp, #0
8001d66: 6078 str r0, [r7, #4]
8001d68: 6039 str r1, [r7, #0]
uint32_t descidx;
ETH_DMADescTypeDef *dmarxdesc;
uint32_t desccnt = 0U;
8001d6a: 2300 movs r3, #0
8001d6c: 617b str r3, [r7, #20]
uint32_t desccntmax;
uint32_t bufflength;
uint8_t rxdataready = 0U;
8001d6e: 2300 movs r3, #0
8001d70: 73fb strb r3, [r7, #15]
if (pAppBuff == NULL)
8001d72: 683b ldr r3, [r7, #0]
8001d74: 2b00 cmp r3, #0
8001d76: d109 bne.n 8001d8c <HAL_ETH_ReadData+0x2c>
{
heth->ErrorCode |= HAL_ETH_ERROR_PARAM;
8001d78: 687b ldr r3, [r7, #4]
8001d7a: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8001d7e: f043 0201 orr.w r2, r3, #1
8001d82: 687b ldr r3, [r7, #4]
8001d84: f8c3 2088 str.w r2, [r3, #136] ; 0x88
return HAL_ERROR;
8001d88: 2301 movs r3, #1
8001d8a: e0a8 b.n 8001ede <HAL_ETH_ReadData+0x17e>
}
if (heth->gState != HAL_ETH_STATE_STARTED)
8001d8c: 687b ldr r3, [r7, #4]
8001d8e: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8001d92: 2b23 cmp r3, #35 ; 0x23
8001d94: d001 beq.n 8001d9a <HAL_ETH_ReadData+0x3a>
{
return HAL_ERROR;
8001d96: 2301 movs r3, #1
8001d98: e0a1 b.n 8001ede <HAL_ETH_ReadData+0x17e>
}
descidx = heth->RxDescList.RxDescIdx;
8001d9a: 687b ldr r3, [r7, #4]
8001d9c: 6ddb ldr r3, [r3, #92] ; 0x5c
8001d9e: 61fb str r3, [r7, #28]
dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
8001da0: 687b ldr r3, [r7, #4]
8001da2: 69fa ldr r2, [r7, #28]
8001da4: 3212 adds r2, #18
8001da6: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8001daa: 61bb str r3, [r7, #24]
desccntmax = ETH_RX_DESC_CNT - heth->RxDescList.RxBuildDescCnt;
8001dac: 687b ldr r3, [r7, #4]
8001dae: 6edb ldr r3, [r3, #108] ; 0x6c
8001db0: f1c3 0304 rsb r3, r3, #4
8001db4: 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)
8001db6: e06a b.n 8001e8e <HAL_ETH_ReadData+0x12e>
&& (rxdataready == 0U))
{
if (READ_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_LS) != (uint32_t)RESET)
8001db8: 69bb ldr r3, [r7, #24]
8001dba: 681b ldr r3, [r3, #0]
8001dbc: f403 7380 and.w r3, r3, #256 ; 0x100
8001dc0: 2b00 cmp r3, #0
8001dc2: d007 beq.n 8001dd4 <HAL_ETH_ReadData+0x74>
{
/* Get timestamp high */
heth->RxDescList.TimeStamp.TimeStampHigh = dmarxdesc->DESC6;
8001dc4: 69bb ldr r3, [r7, #24]
8001dc6: 699a ldr r2, [r3, #24]
8001dc8: 687b ldr r3, [r7, #4]
8001dca: 679a str r2, [r3, #120] ; 0x78
/* Get timestamp low */
heth->RxDescList.TimeStamp.TimeStampLow = dmarxdesc->DESC7;
8001dcc: 69bb ldr r3, [r7, #24]
8001dce: 69da ldr r2, [r3, #28]
8001dd0: 687b ldr r3, [r7, #4]
8001dd2: 675a str r2, [r3, #116] ; 0x74
}
if ((READ_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_FS) != (uint32_t)RESET) || (heth->RxDescList.pRxStart != NULL))
8001dd4: 69bb ldr r3, [r7, #24]
8001dd6: 681b ldr r3, [r3, #0]
8001dd8: f403 7300 and.w r3, r3, #512 ; 0x200
8001ddc: 2b00 cmp r3, #0
8001dde: d103 bne.n 8001de8 <HAL_ETH_ReadData+0x88>
8001de0: 687b ldr r3, [r7, #4]
8001de2: 6fdb ldr r3, [r3, #124] ; 0x7c
8001de4: 2b00 cmp r3, #0
8001de6: d040 beq.n 8001e6a <HAL_ETH_ReadData+0x10a>
{
/* Check first descriptor */
if (READ_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_FS) != (uint32_t)RESET)
8001de8: 69bb ldr r3, [r7, #24]
8001dea: 681b ldr r3, [r3, #0]
8001dec: f403 7300 and.w r3, r3, #512 ; 0x200
8001df0: 2b00 cmp r3, #0
8001df2: d005 beq.n 8001e00 <HAL_ETH_ReadData+0xa0>
{
heth->RxDescList.RxDescCnt = 0;
8001df4: 687b ldr r3, [r7, #4]
8001df6: 2200 movs r2, #0
8001df8: 661a str r2, [r3, #96] ; 0x60
heth->RxDescList.RxDataLength = 0;
8001dfa: 687b ldr r3, [r7, #4]
8001dfc: 2200 movs r2, #0
8001dfe: 665a str r2, [r3, #100] ; 0x64
}
/* Check if last descriptor */
bufflength = heth->Init.RxBuffLen;
8001e00: 687b ldr r3, [r7, #4]
8001e02: 695b ldr r3, [r3, #20]
8001e04: 613b str r3, [r7, #16]
if (READ_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_LS) != (uint32_t)RESET)
8001e06: 69bb ldr r3, [r7, #24]
8001e08: 681b ldr r3, [r3, #0]
8001e0a: f403 7380 and.w r3, r3, #256 ; 0x100
8001e0e: 2b00 cmp r3, #0
8001e10: d00c beq.n 8001e2c <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;
8001e12: 69bb ldr r3, [r7, #24]
8001e14: 681b ldr r3, [r3, #0]
8001e16: 0c1b lsrs r3, r3, #16
8001e18: f3c3 030d ubfx r3, r3, #0, #14
8001e1c: 3b04 subs r3, #4
8001e1e: 613b str r3, [r7, #16]
/* Save Last descriptor index */
heth->RxDescList.pRxLastRxDesc = dmarxdesc->DESC0;
8001e20: 69bb ldr r3, [r7, #24]
8001e22: 681a ldr r2, [r3, #0]
8001e24: 687b ldr r3, [r7, #4]
8001e26: 671a str r2, [r3, #112] ; 0x70
/* Packet ready */
rxdataready = 1;
8001e28: 2301 movs r3, #1
8001e2a: 73fb strb r3, [r7, #15]
}
/* Link data */
WRITE_REG(dmarxdesc->BackupAddr0, dmarxdesc->DESC2);
8001e2c: 69bb ldr r3, [r7, #24]
8001e2e: 689a ldr r2, [r3, #8]
8001e30: 69bb ldr r3, [r7, #24]
8001e32: 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,
8001e34: 687b ldr r3, [r7, #4]
8001e36: f103 007c add.w r0, r3, #124 ; 0x7c
8001e3a: 687b ldr r3, [r7, #4]
8001e3c: f103 0180 add.w r1, r3, #128 ; 0x80
(uint8_t *)dmarxdesc->BackupAddr0, (uint16_t) bufflength);
8001e40: 69bb ldr r3, [r7, #24]
8001e42: 6a1b ldr r3, [r3, #32]
HAL_ETH_RxLinkCallback(&heth->RxDescList.pRxStart, &heth->RxDescList.pRxEnd,
8001e44: 461a mov r2, r3
8001e46: 693b ldr r3, [r7, #16]
8001e48: b29b uxth r3, r3
8001e4a: f002 f9fb bl 8004244 <HAL_ETH_RxLinkCallback>
#endif /* USE_HAL_ETH_REGISTER_CALLBACKS */
heth->RxDescList.RxDescCnt++;
8001e4e: 687b ldr r3, [r7, #4]
8001e50: 6e1b ldr r3, [r3, #96] ; 0x60
8001e52: 1c5a adds r2, r3, #1
8001e54: 687b ldr r3, [r7, #4]
8001e56: 661a str r2, [r3, #96] ; 0x60
heth->RxDescList.RxDataLength += bufflength;
8001e58: 687b ldr r3, [r7, #4]
8001e5a: 6e5a ldr r2, [r3, #100] ; 0x64
8001e5c: 693b ldr r3, [r7, #16]
8001e5e: 441a add r2, r3
8001e60: 687b ldr r3, [r7, #4]
8001e62: 665a str r2, [r3, #100] ; 0x64
/* Clear buffer pointer */
dmarxdesc->BackupAddr0 = 0;
8001e64: 69bb ldr r3, [r7, #24]
8001e66: 2200 movs r2, #0
8001e68: 621a str r2, [r3, #32]
}
/* Increment current rx descriptor index */
INCR_RX_DESC_INDEX(descidx, 1U);
8001e6a: 69fb ldr r3, [r7, #28]
8001e6c: 3301 adds r3, #1
8001e6e: 61fb str r3, [r7, #28]
8001e70: 69fb ldr r3, [r7, #28]
8001e72: 2b03 cmp r3, #3
8001e74: d902 bls.n 8001e7c <HAL_ETH_ReadData+0x11c>
8001e76: 69fb ldr r3, [r7, #28]
8001e78: 3b04 subs r3, #4
8001e7a: 61fb str r3, [r7, #28]
/* Get current descriptor address */
dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
8001e7c: 687b ldr r3, [r7, #4]
8001e7e: 69fa ldr r2, [r7, #28]
8001e80: 3212 adds r2, #18
8001e82: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8001e86: 61bb str r3, [r7, #24]
desccnt++;
8001e88: 697b ldr r3, [r7, #20]
8001e8a: 3301 adds r3, #1
8001e8c: 617b str r3, [r7, #20]
while ((READ_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_OWN) == (uint32_t)RESET) && (desccnt < desccntmax)
8001e8e: 69bb ldr r3, [r7, #24]
8001e90: 681b ldr r3, [r3, #0]
8001e92: 2b00 cmp r3, #0
8001e94: db06 blt.n 8001ea4 <HAL_ETH_ReadData+0x144>
8001e96: 697a ldr r2, [r7, #20]
8001e98: 68bb ldr r3, [r7, #8]
8001e9a: 429a cmp r2, r3
8001e9c: d202 bcs.n 8001ea4 <HAL_ETH_ReadData+0x144>
&& (rxdataready == 0U))
8001e9e: 7bfb ldrb r3, [r7, #15]
8001ea0: 2b00 cmp r3, #0
8001ea2: d089 beq.n 8001db8 <HAL_ETH_ReadData+0x58>
}
heth->RxDescList.RxBuildDescCnt += desccnt;
8001ea4: 687b ldr r3, [r7, #4]
8001ea6: 6eda ldr r2, [r3, #108] ; 0x6c
8001ea8: 697b ldr r3, [r7, #20]
8001eaa: 441a add r2, r3
8001eac: 687b ldr r3, [r7, #4]
8001eae: 66da str r2, [r3, #108] ; 0x6c
if ((heth->RxDescList.RxBuildDescCnt) != 0U)
8001eb0: 687b ldr r3, [r7, #4]
8001eb2: 6edb ldr r3, [r3, #108] ; 0x6c
8001eb4: 2b00 cmp r3, #0
8001eb6: d002 beq.n 8001ebe <HAL_ETH_ReadData+0x15e>
{
/* Update Descriptors */
ETH_UpdateDescriptor(heth);
8001eb8: 6878 ldr r0, [r7, #4]
8001eba: f000 f815 bl 8001ee8 <ETH_UpdateDescriptor>
}
heth->RxDescList.RxDescIdx = descidx;
8001ebe: 687b ldr r3, [r7, #4]
8001ec0: 69fa ldr r2, [r7, #28]
8001ec2: 65da str r2, [r3, #92] ; 0x5c
if (rxdataready == 1U)
8001ec4: 7bfb ldrb r3, [r7, #15]
8001ec6: 2b01 cmp r3, #1
8001ec8: d108 bne.n 8001edc <HAL_ETH_ReadData+0x17c>
{
/* Return received packet */
*pAppBuff = heth->RxDescList.pRxStart;
8001eca: 687b ldr r3, [r7, #4]
8001ecc: 6fda ldr r2, [r3, #124] ; 0x7c
8001ece: 683b ldr r3, [r7, #0]
8001ed0: 601a str r2, [r3, #0]
/* Reset first element */
heth->RxDescList.pRxStart = NULL;
8001ed2: 687b ldr r3, [r7, #4]
8001ed4: 2200 movs r2, #0
8001ed6: 67da str r2, [r3, #124] ; 0x7c
return HAL_OK;
8001ed8: 2300 movs r3, #0
8001eda: e000 b.n 8001ede <HAL_ETH_ReadData+0x17e>
}
/* Packet not ready */
return HAL_ERROR;
8001edc: 2301 movs r3, #1
}
8001ede: 4618 mov r0, r3
8001ee0: 3720 adds r7, #32
8001ee2: 46bd mov sp, r7
8001ee4: bd80 pop {r7, pc}
...
08001ee8 <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)
{
8001ee8: b580 push {r7, lr}
8001eea: b088 sub sp, #32
8001eec: af00 add r7, sp, #0
8001eee: 6078 str r0, [r7, #4]
uint32_t descidx;
uint32_t desccount;
ETH_DMADescTypeDef *dmarxdesc;
uint8_t *buff = NULL;
8001ef0: 2300 movs r3, #0
8001ef2: 60fb str r3, [r7, #12]
uint8_t allocStatus = 1U;
8001ef4: 2301 movs r3, #1
8001ef6: 74fb strb r3, [r7, #19]
descidx = heth->RxDescList.RxBuildDescIdx;
8001ef8: 687b ldr r3, [r7, #4]
8001efa: 6e9b ldr r3, [r3, #104] ; 0x68
8001efc: 61fb str r3, [r7, #28]
dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
8001efe: 687b ldr r3, [r7, #4]
8001f00: 69fa ldr r2, [r7, #28]
8001f02: 3212 adds r2, #18
8001f04: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8001f08: 617b str r3, [r7, #20]
desccount = heth->RxDescList.RxBuildDescCnt;
8001f0a: 687b ldr r3, [r7, #4]
8001f0c: 6edb ldr r3, [r3, #108] ; 0x6c
8001f0e: 61bb str r3, [r7, #24]
while ((desccount > 0U) && (allocStatus != 0U))
8001f10: e040 b.n 8001f94 <ETH_UpdateDescriptor+0xac>
{
/* Check if a buffer's attached the descriptor */
if (READ_REG(dmarxdesc->BackupAddr0) == 0U)
8001f12: 697b ldr r3, [r7, #20]
8001f14: 6a1b ldr r3, [r3, #32]
8001f16: 2b00 cmp r3, #0
8001f18: d112 bne.n 8001f40 <ETH_UpdateDescriptor+0x58>
#if (USE_HAL_ETH_REGISTER_CALLBACKS == 1)
/*Call registered Allocate callback*/
heth->rxAllocateCallback(&buff);
#else
/* Allocate callback */
HAL_ETH_RxAllocateCallback(&buff);
8001f1a: f107 030c add.w r3, r7, #12
8001f1e: 4618 mov r0, r3
8001f20: f002 f960 bl 80041e4 <HAL_ETH_RxAllocateCallback>
#endif /* USE_HAL_ETH_REGISTER_CALLBACKS */
if (buff == NULL)
8001f24: 68fb ldr r3, [r7, #12]
8001f26: 2b00 cmp r3, #0
8001f28: d102 bne.n 8001f30 <ETH_UpdateDescriptor+0x48>
{
allocStatus = 0U;
8001f2a: 2300 movs r3, #0
8001f2c: 74fb strb r3, [r7, #19]
8001f2e: e007 b.n 8001f40 <ETH_UpdateDescriptor+0x58>
}
else
{
WRITE_REG(dmarxdesc->BackupAddr0, (uint32_t)buff);
8001f30: 68fb ldr r3, [r7, #12]
8001f32: 461a mov r2, r3
8001f34: 697b ldr r3, [r7, #20]
8001f36: 621a str r2, [r3, #32]
WRITE_REG(dmarxdesc->DESC2, (uint32_t)buff);
8001f38: 68fb ldr r3, [r7, #12]
8001f3a: 461a mov r2, r3
8001f3c: 697b ldr r3, [r7, #20]
8001f3e: 609a str r2, [r3, #8]
}
}
if (allocStatus != 0U)
8001f40: 7cfb ldrb r3, [r7, #19]
8001f42: 2b00 cmp r3, #0
8001f44: d026 beq.n 8001f94 <ETH_UpdateDescriptor+0xac>
{
if (heth->RxDescList.ItMode == 0U)
8001f46: 687b ldr r3, [r7, #4]
8001f48: 6d9b ldr r3, [r3, #88] ; 0x58
8001f4a: 2b00 cmp r3, #0
8001f4c: d103 bne.n 8001f56 <ETH_UpdateDescriptor+0x6e>
{
WRITE_REG(dmarxdesc->DESC1, ETH_DMARXDESC_DIC | ETH_RX_BUF_SIZE | ETH_DMARXDESC_RCH);
8001f4e: 697b ldr r3, [r7, #20]
8001f50: 4a1e ldr r2, [pc, #120] ; (8001fcc <ETH_UpdateDescriptor+0xe4>)
8001f52: 605a str r2, [r3, #4]
8001f54: e003 b.n 8001f5e <ETH_UpdateDescriptor+0x76>
}
else
{
WRITE_REG(dmarxdesc->DESC1, ETH_RX_BUF_SIZE | ETH_DMARXDESC_RCH);
8001f56: 697b ldr r3, [r7, #20]
8001f58: f244 52f8 movw r2, #17912 ; 0x45f8
8001f5c: 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");
8001f5e: f3bf 8f5f dmb sy
}
8001f62: 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);
8001f64: 697b ldr r3, [r7, #20]
8001f66: 681b ldr r3, [r3, #0]
8001f68: f043 4200 orr.w r2, r3, #2147483648 ; 0x80000000
8001f6c: 697b ldr r3, [r7, #20]
8001f6e: 601a str r2, [r3, #0]
/* Increment current rx descriptor index */
INCR_RX_DESC_INDEX(descidx, 1U);
8001f70: 69fb ldr r3, [r7, #28]
8001f72: 3301 adds r3, #1
8001f74: 61fb str r3, [r7, #28]
8001f76: 69fb ldr r3, [r7, #28]
8001f78: 2b03 cmp r3, #3
8001f7a: d902 bls.n 8001f82 <ETH_UpdateDescriptor+0x9a>
8001f7c: 69fb ldr r3, [r7, #28]
8001f7e: 3b04 subs r3, #4
8001f80: 61fb str r3, [r7, #28]
/* Get current descriptor address */
dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
8001f82: 687b ldr r3, [r7, #4]
8001f84: 69fa ldr r2, [r7, #28]
8001f86: 3212 adds r2, #18
8001f88: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8001f8c: 617b str r3, [r7, #20]
desccount--;
8001f8e: 69bb ldr r3, [r7, #24]
8001f90: 3b01 subs r3, #1
8001f92: 61bb str r3, [r7, #24]
while ((desccount > 0U) && (allocStatus != 0U))
8001f94: 69bb ldr r3, [r7, #24]
8001f96: 2b00 cmp r3, #0
8001f98: d002 beq.n 8001fa0 <ETH_UpdateDescriptor+0xb8>
8001f9a: 7cfb ldrb r3, [r7, #19]
8001f9c: 2b00 cmp r3, #0
8001f9e: d1b8 bne.n 8001f12 <ETH_UpdateDescriptor+0x2a>
}
}
if (heth->RxDescList.RxBuildDescCnt != desccount)
8001fa0: 687b ldr r3, [r7, #4]
8001fa2: 6edb ldr r3, [r3, #108] ; 0x6c
8001fa4: 69ba ldr r2, [r7, #24]
8001fa6: 429a cmp r2, r3
8001fa8: d00c beq.n 8001fc4 <ETH_UpdateDescriptor+0xdc>
{
/* Set the Tail pointer address */
WRITE_REG(heth->Instance->DMARPDR, 0);
8001faa: 687b ldr r3, [r7, #4]
8001fac: 681b ldr r3, [r3, #0]
8001fae: f503 5380 add.w r3, r3, #4096 ; 0x1000
8001fb2: 461a mov r2, r3
8001fb4: 2300 movs r3, #0
8001fb6: 6093 str r3, [r2, #8]
heth->RxDescList.RxBuildDescIdx = descidx;
8001fb8: 687b ldr r3, [r7, #4]
8001fba: 69fa ldr r2, [r7, #28]
8001fbc: 669a str r2, [r3, #104] ; 0x68
heth->RxDescList.RxBuildDescCnt = desccount;
8001fbe: 687b ldr r3, [r7, #4]
8001fc0: 69ba ldr r2, [r7, #24]
8001fc2: 66da str r2, [r3, #108] ; 0x6c
}
}
8001fc4: bf00 nop
8001fc6: 3720 adds r7, #32
8001fc8: 46bd mov sp, r7
8001fca: bd80 pop {r7, pc}
8001fcc: 800045f8 .word 0x800045f8
08001fd0 <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)
{
8001fd0: b580 push {r7, lr}
8001fd2: b086 sub sp, #24
8001fd4: af00 add r7, sp, #0
8001fd6: 60f8 str r0, [r7, #12]
8001fd8: 60b9 str r1, [r7, #8]
8001fda: 607a str r2, [r7, #4]
8001fdc: 603b str r3, [r7, #0]
uint32_t tmpreg1;
uint32_t tickstart;
/* Get the ETHERNET MACMIIAR value */
tmpreg1 = heth->Instance->MACMIIAR;
8001fde: 68fb ldr r3, [r7, #12]
8001fe0: 681b ldr r3, [r3, #0]
8001fe2: 691b ldr r3, [r3, #16]
8001fe4: 617b str r3, [r7, #20]
/* Keep only the CSR Clock Range CR[2:0] bits value */
tmpreg1 &= ~ETH_MACMIIAR_CR_MASK;
8001fe6: 697b ldr r3, [r7, #20]
8001fe8: f003 031c and.w r3, r3, #28
8001fec: 617b str r3, [r7, #20]
/* Prepare the MII address register value */
tmpreg1 |= ((PHYAddr << 11U) & ETH_MACMIIAR_PA); /* Set the PHY device address */
8001fee: 68bb ldr r3, [r7, #8]
8001ff0: 02db lsls r3, r3, #11
8001ff2: b29b uxth r3, r3
8001ff4: 697a ldr r2, [r7, #20]
8001ff6: 4313 orrs r3, r2
8001ff8: 617b str r3, [r7, #20]
tmpreg1 |= (((uint32_t)PHYReg << 6U) & ETH_MACMIIAR_MR); /* Set the PHY register address */
8001ffa: 687b ldr r3, [r7, #4]
8001ffc: 019b lsls r3, r3, #6
8001ffe: f403 63f8 and.w r3, r3, #1984 ; 0x7c0
8002002: 697a ldr r2, [r7, #20]
8002004: 4313 orrs r3, r2
8002006: 617b str r3, [r7, #20]
tmpreg1 &= ~ETH_MACMIIAR_MW; /* Set the read mode */
8002008: 697b ldr r3, [r7, #20]
800200a: f023 0302 bic.w r3, r3, #2
800200e: 617b str r3, [r7, #20]
tmpreg1 |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */
8002010: 697b ldr r3, [r7, #20]
8002012: f043 0301 orr.w r3, r3, #1
8002016: 617b str r3, [r7, #20]
/* Write the result value into the MII Address register */
heth->Instance->MACMIIAR = tmpreg1;
8002018: 68fb ldr r3, [r7, #12]
800201a: 681b ldr r3, [r3, #0]
800201c: 697a ldr r2, [r7, #20]
800201e: 611a str r2, [r3, #16]
tickstart = HAL_GetTick();
8002020: f7ff fbbe bl 80017a0 <HAL_GetTick>
8002024: 6138 str r0, [r7, #16]
/* Check for the Busy flag */
while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
8002026: e00d b.n 8002044 <HAL_ETH_ReadPHYRegister+0x74>
{
/* Check for the Timeout */
if ((HAL_GetTick() - tickstart) > PHY_READ_TO)
8002028: f7ff fbba bl 80017a0 <HAL_GetTick>
800202c: 4602 mov r2, r0
800202e: 693b ldr r3, [r7, #16]
8002030: 1ad3 subs r3, r2, r3
8002032: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8002036: d301 bcc.n 800203c <HAL_ETH_ReadPHYRegister+0x6c>
{
return HAL_ERROR;
8002038: 2301 movs r3, #1
800203a: e010 b.n 800205e <HAL_ETH_ReadPHYRegister+0x8e>
}
tmpreg1 = heth->Instance->MACMIIAR;
800203c: 68fb ldr r3, [r7, #12]
800203e: 681b ldr r3, [r3, #0]
8002040: 691b ldr r3, [r3, #16]
8002042: 617b str r3, [r7, #20]
while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
8002044: 697b ldr r3, [r7, #20]
8002046: f003 0301 and.w r3, r3, #1
800204a: 2b00 cmp r3, #0
800204c: d1ec bne.n 8002028 <HAL_ETH_ReadPHYRegister+0x58>
}
/* Get MACMIIDR value */
*pRegValue = (uint16_t)(heth->Instance->MACMIIDR);
800204e: 68fb ldr r3, [r7, #12]
8002050: 681b ldr r3, [r3, #0]
8002052: 695b ldr r3, [r3, #20]
8002054: b29b uxth r3, r3
8002056: 461a mov r2, r3
8002058: 683b ldr r3, [r7, #0]
800205a: 601a str r2, [r3, #0]
return HAL_OK;
800205c: 2300 movs r3, #0
}
800205e: 4618 mov r0, r3
8002060: 3718 adds r7, #24
8002062: 46bd mov sp, r7
8002064: bd80 pop {r7, pc}
08002066 <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)
{
8002066: b580 push {r7, lr}
8002068: b086 sub sp, #24
800206a: af00 add r7, sp, #0
800206c: 60f8 str r0, [r7, #12]
800206e: 60b9 str r1, [r7, #8]
8002070: 607a str r2, [r7, #4]
8002072: 603b str r3, [r7, #0]
uint32_t tmpreg1;
uint32_t tickstart;
/* Get the ETHERNET MACMIIAR value */
tmpreg1 = heth->Instance->MACMIIAR;
8002074: 68fb ldr r3, [r7, #12]
8002076: 681b ldr r3, [r3, #0]
8002078: 691b ldr r3, [r3, #16]
800207a: 617b str r3, [r7, #20]
/* Keep only the CSR Clock Range CR[2:0] bits value */
tmpreg1 &= ~ETH_MACMIIAR_CR_MASK;
800207c: 697b ldr r3, [r7, #20]
800207e: f003 031c and.w r3, r3, #28
8002082: 617b str r3, [r7, #20]
/* Prepare the MII register address value */
tmpreg1 |= ((PHYAddr << 11U) & ETH_MACMIIAR_PA); /* Set the PHY device address */
8002084: 68bb ldr r3, [r7, #8]
8002086: 02db lsls r3, r3, #11
8002088: b29b uxth r3, r3
800208a: 697a ldr r2, [r7, #20]
800208c: 4313 orrs r3, r2
800208e: 617b str r3, [r7, #20]
tmpreg1 |= (((uint32_t)PHYReg << 6U) & ETH_MACMIIAR_MR); /* Set the PHY register address */
8002090: 687b ldr r3, [r7, #4]
8002092: 019b lsls r3, r3, #6
8002094: f403 63f8 and.w r3, r3, #1984 ; 0x7c0
8002098: 697a ldr r2, [r7, #20]
800209a: 4313 orrs r3, r2
800209c: 617b str r3, [r7, #20]
tmpreg1 |= ETH_MACMIIAR_MW; /* Set the write mode */
800209e: 697b ldr r3, [r7, #20]
80020a0: f043 0302 orr.w r3, r3, #2
80020a4: 617b str r3, [r7, #20]
tmpreg1 |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */
80020a6: 697b ldr r3, [r7, #20]
80020a8: f043 0301 orr.w r3, r3, #1
80020ac: 617b str r3, [r7, #20]
/* Give the value to the MII data register */
heth->Instance->MACMIIDR = (uint16_t)RegValue;
80020ae: 683b ldr r3, [r7, #0]
80020b0: b29a uxth r2, r3
80020b2: 68fb ldr r3, [r7, #12]
80020b4: 681b ldr r3, [r3, #0]
80020b6: 615a str r2, [r3, #20]
/* Write the result value into the MII Address register */
heth->Instance->MACMIIAR = tmpreg1;
80020b8: 68fb ldr r3, [r7, #12]
80020ba: 681b ldr r3, [r3, #0]
80020bc: 697a ldr r2, [r7, #20]
80020be: 611a str r2, [r3, #16]
/* Get tick */
tickstart = HAL_GetTick();
80020c0: f7ff fb6e bl 80017a0 <HAL_GetTick>
80020c4: 6138 str r0, [r7, #16]
/* Check for the Busy flag */
while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
80020c6: e00d b.n 80020e4 <HAL_ETH_WritePHYRegister+0x7e>
{
/* Check for the Timeout */
if ((HAL_GetTick() - tickstart) > PHY_WRITE_TO)
80020c8: f7ff fb6a bl 80017a0 <HAL_GetTick>
80020cc: 4602 mov r2, r0
80020ce: 693b ldr r3, [r7, #16]
80020d0: 1ad3 subs r3, r2, r3
80020d2: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
80020d6: d301 bcc.n 80020dc <HAL_ETH_WritePHYRegister+0x76>
{
return HAL_ERROR;
80020d8: 2301 movs r3, #1
80020da: e009 b.n 80020f0 <HAL_ETH_WritePHYRegister+0x8a>
}
tmpreg1 = heth->Instance->MACMIIAR;
80020dc: 68fb ldr r3, [r7, #12]
80020de: 681b ldr r3, [r3, #0]
80020e0: 691b ldr r3, [r3, #16]
80020e2: 617b str r3, [r7, #20]
while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
80020e4: 697b ldr r3, [r7, #20]
80020e6: f003 0301 and.w r3, r3, #1
80020ea: 2b00 cmp r3, #0
80020ec: d1ec bne.n 80020c8 <HAL_ETH_WritePHYRegister+0x62>
}
return HAL_OK;
80020ee: 2300 movs r3, #0
}
80020f0: 4618 mov r0, r3
80020f2: 3718 adds r7, #24
80020f4: 46bd mov sp, r7
80020f6: bd80 pop {r7, pc}
080020f8 <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)
{
80020f8: b480 push {r7}
80020fa: b083 sub sp, #12
80020fc: af00 add r7, sp, #0
80020fe: 6078 str r0, [r7, #4]
8002100: 6039 str r1, [r7, #0]
if (macconf == NULL)
8002102: 683b ldr r3, [r7, #0]
8002104: 2b00 cmp r3, #0
8002106: d101 bne.n 800210c <HAL_ETH_GetMACConfig+0x14>
{
return HAL_ERROR;
8002108: 2301 movs r3, #1
800210a: e0d9 b.n 80022c0 <HAL_ETH_GetMACConfig+0x1c8>
}
/* Get MAC parameters */
macconf->DeferralCheck = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DC) >> 4) > 0U) ? ENABLE : DISABLE;
800210c: 687b ldr r3, [r7, #4]
800210e: 681b ldr r3, [r3, #0]
8002110: 681b ldr r3, [r3, #0]
8002112: f003 0310 and.w r3, r3, #16
8002116: 2b00 cmp r3, #0
8002118: bf14 ite ne
800211a: 2301 movne r3, #1
800211c: 2300 moveq r3, #0
800211e: b2db uxtb r3, r3
8002120: 461a mov r2, r3
8002122: 683b ldr r3, [r7, #0]
8002124: f883 2028 strb.w r2, [r3, #40] ; 0x28
macconf->BackOffLimit = READ_BIT(heth->Instance->MACCR, ETH_MACCR_BL);
8002128: 687b ldr r3, [r7, #4]
800212a: 681b ldr r3, [r3, #0]
800212c: 681b ldr r3, [r3, #0]
800212e: f003 0260 and.w r2, r3, #96 ; 0x60
8002132: 683b ldr r3, [r7, #0]
8002134: 625a str r2, [r3, #36] ; 0x24
macconf->RetryTransmission = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_RD) >> 9) == 0U) ? ENABLE : DISABLE;
8002136: 687b ldr r3, [r7, #4]
8002138: 681b ldr r3, [r3, #0]
800213a: 681b ldr r3, [r3, #0]
800213c: f403 7300 and.w r3, r3, #512 ; 0x200
8002140: 2b00 cmp r3, #0
8002142: bf0c ite eq
8002144: 2301 moveq r3, #1
8002146: 2300 movne r3, #0
8002148: b2db uxtb r3, r3
800214a: 461a mov r2, r3
800214c: 683b ldr r3, [r7, #0]
800214e: f883 2020 strb.w r2, [r3, #32]
macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_CSD) >> 16) > 0U)
8002152: 687b ldr r3, [r7, #4]
8002154: 681b ldr r3, [r3, #0]
8002156: 681b ldr r3, [r3, #0]
8002158: f403 3380 and.w r3, r3, #65536 ; 0x10000
? ENABLE : DISABLE;
800215c: 2b00 cmp r3, #0
800215e: bf14 ite ne
8002160: 2301 movne r3, #1
8002162: 2300 moveq r3, #0
8002164: b2db uxtb r3, r3
8002166: 461a mov r2, r3
macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_CSD) >> 16) > 0U)
8002168: 683b ldr r3, [r7, #0]
800216a: 77da strb r2, [r3, #31]
macconf->ReceiveOwn = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_ROD) >> 13) == 0U) ? ENABLE : DISABLE;
800216c: 687b ldr r3, [r7, #4]
800216e: 681b ldr r3, [r3, #0]
8002170: 681b ldr r3, [r3, #0]
8002172: f403 5300 and.w r3, r3, #8192 ; 0x2000
8002176: 2b00 cmp r3, #0
8002178: bf0c ite eq
800217a: 2301 moveq r3, #1
800217c: 2300 movne r3, #0
800217e: b2db uxtb r3, r3
8002180: 461a mov r2, r3
8002182: 683b ldr r3, [r7, #0]
8002184: 779a strb r2, [r3, #30]
macconf->LoopbackMode = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_LM) >> 12) > 0U) ? ENABLE : DISABLE;
8002186: 687b ldr r3, [r7, #4]
8002188: 681b ldr r3, [r3, #0]
800218a: 681b ldr r3, [r3, #0]
800218c: f403 5380 and.w r3, r3, #4096 ; 0x1000
8002190: 2b00 cmp r3, #0
8002192: bf14 ite ne
8002194: 2301 movne r3, #1
8002196: 2300 moveq r3, #0
8002198: b2db uxtb r3, r3
800219a: 461a mov r2, r3
800219c: 683b ldr r3, [r7, #0]
800219e: 771a strb r2, [r3, #28]
macconf->DuplexMode = READ_BIT(heth->Instance->MACCR, ETH_MACCR_DM);
80021a0: 687b ldr r3, [r7, #4]
80021a2: 681b ldr r3, [r3, #0]
80021a4: 681b ldr r3, [r3, #0]
80021a6: f403 6200 and.w r2, r3, #2048 ; 0x800
80021aa: 683b ldr r3, [r7, #0]
80021ac: 619a str r2, [r3, #24]
macconf->Speed = READ_BIT(heth->Instance->MACCR, ETH_MACCR_FES);
80021ae: 687b ldr r3, [r7, #4]
80021b0: 681b ldr r3, [r3, #0]
80021b2: 681b ldr r3, [r3, #0]
80021b4: f403 4280 and.w r2, r3, #16384 ; 0x4000
80021b8: 683b ldr r3, [r7, #0]
80021ba: 615a str r2, [r3, #20]
macconf->Jabber = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_JD) >> 22) == 0U) ? ENABLE : DISABLE;
80021bc: 687b ldr r3, [r7, #4]
80021be: 681b ldr r3, [r3, #0]
80021c0: 681b ldr r3, [r3, #0]
80021c2: f403 0380 and.w r3, r3, #4194304 ; 0x400000
80021c6: 2b00 cmp r3, #0
80021c8: bf0c ite eq
80021ca: 2301 moveq r3, #1
80021cc: 2300 movne r3, #0
80021ce: b2db uxtb r3, r3
80021d0: 461a mov r2, r3
80021d2: 683b ldr r3, [r7, #0]
80021d4: 745a strb r2, [r3, #17]
macconf->Watchdog = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_WD) >> 23) == 0U) ? ENABLE : DISABLE;
80021d6: 687b ldr r3, [r7, #4]
80021d8: 681b ldr r3, [r3, #0]
80021da: 681b ldr r3, [r3, #0]
80021dc: f403 0300 and.w r3, r3, #8388608 ; 0x800000
80021e0: 2b00 cmp r3, #0
80021e2: bf0c ite eq
80021e4: 2301 moveq r3, #1
80021e6: 2300 movne r3, #0
80021e8: b2db uxtb r3, r3
80021ea: 461a mov r2, r3
80021ec: 683b ldr r3, [r7, #0]
80021ee: 741a strb r2, [r3, #16]
macconf->AutomaticPadCRCStrip = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_APCS) >> 7) > 0U) ? ENABLE : DISABLE;
80021f0: 687b ldr r3, [r7, #4]
80021f2: 681b ldr r3, [r3, #0]
80021f4: 681b ldr r3, [r3, #0]
80021f6: f003 0380 and.w r3, r3, #128 ; 0x80
80021fa: 2b00 cmp r3, #0
80021fc: bf14 ite ne
80021fe: 2301 movne r3, #1
8002200: 2300 moveq r3, #0
8002202: b2db uxtb r3, r3
8002204: 461a mov r2, r3
8002206: 683b ldr r3, [r7, #0]
8002208: 73da strb r2, [r3, #15]
macconf->InterPacketGapVal = READ_BIT(heth->Instance->MACCR, ETH_MACCR_IFG);
800220a: 687b ldr r3, [r7, #4]
800220c: 681b ldr r3, [r3, #0]
800220e: 681b ldr r3, [r3, #0]
8002210: f403 2260 and.w r2, r3, #917504 ; 0xe0000
8002214: 683b ldr r3, [r7, #0]
8002216: 609a str r2, [r3, #8]
macconf->ChecksumOffload = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_IPCO) >> 10U) > 0U) ? ENABLE : DISABLE;
8002218: 687b ldr r3, [r7, #4]
800221a: 681b ldr r3, [r3, #0]
800221c: 681b ldr r3, [r3, #0]
800221e: f403 6380 and.w r3, r3, #1024 ; 0x400
8002222: 2b00 cmp r3, #0
8002224: bf14 ite ne
8002226: 2301 movne r3, #1
8002228: 2300 moveq r3, #0
800222a: b2db uxtb r3, r3
800222c: 461a mov r2, r3
800222e: 683b ldr r3, [r7, #0]
8002230: 711a strb r2, [r3, #4]
macconf->TransmitFlowControl = ((READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_TFCE) >> 1) > 0U) ? ENABLE : DISABLE;
8002232: 687b ldr r3, [r7, #4]
8002234: 681b ldr r3, [r3, #0]
8002236: 699b ldr r3, [r3, #24]
8002238: f003 0302 and.w r3, r3, #2
800223c: 2b00 cmp r3, #0
800223e: bf14 ite ne
8002240: 2301 movne r3, #1
8002242: 2300 moveq r3, #0
8002244: b2db uxtb r3, r3
8002246: 461a mov r2, r3
8002248: 683b ldr r3, [r7, #0]
800224a: f883 2054 strb.w r2, [r3, #84] ; 0x54
macconf->ZeroQuantaPause = ((READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_ZQPD) >> 7) == 0U) ? ENABLE : DISABLE;
800224e: 687b ldr r3, [r7, #4]
8002250: 681b ldr r3, [r3, #0]
8002252: 699b ldr r3, [r3, #24]
8002254: f003 0380 and.w r3, r3, #128 ; 0x80
8002258: 2b00 cmp r3, #0
800225a: bf0c ite eq
800225c: 2301 moveq r3, #1
800225e: 2300 movne r3, #0
8002260: b2db uxtb r3, r3
8002262: 461a mov r2, r3
8002264: 683b ldr r3, [r7, #0]
8002266: f883 204c strb.w r2, [r3, #76] ; 0x4c
macconf->PauseLowThreshold = READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_PLT);
800226a: 687b ldr r3, [r7, #4]
800226c: 681b ldr r3, [r3, #0]
800226e: 699b ldr r3, [r3, #24]
8002270: f003 0230 and.w r2, r3, #48 ; 0x30
8002274: 683b ldr r3, [r7, #0]
8002276: 651a str r2, [r3, #80] ; 0x50
macconf->PauseTime = (READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_PT) >> 16);
8002278: 687b ldr r3, [r7, #4]
800227a: 681b ldr r3, [r3, #0]
800227c: 699b ldr r3, [r3, #24]
800227e: 0c1b lsrs r3, r3, #16
8002280: b29a uxth r2, r3
8002282: 683b ldr r3, [r7, #0]
8002284: 649a str r2, [r3, #72] ; 0x48
macconf->ReceiveFlowControl = ((READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_RFCE) >> 2U) > 0U) ? ENABLE : DISABLE;
8002286: 687b ldr r3, [r7, #4]
8002288: 681b ldr r3, [r3, #0]
800228a: 699b ldr r3, [r3, #24]
800228c: f003 0304 and.w r3, r3, #4
8002290: 2b00 cmp r3, #0
8002292: bf14 ite ne
8002294: 2301 movne r3, #1
8002296: 2300 moveq r3, #0
8002298: b2db uxtb r3, r3
800229a: 461a mov r2, r3
800229c: 683b ldr r3, [r7, #0]
800229e: f883 2056 strb.w r2, [r3, #86] ; 0x56
macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_UPFD) >> 3U) > 0U)
80022a2: 687b ldr r3, [r7, #4]
80022a4: 681b ldr r3, [r3, #0]
80022a6: 699b ldr r3, [r3, #24]
80022a8: f003 0308 and.w r3, r3, #8
? ENABLE : DISABLE;
80022ac: 2b00 cmp r3, #0
80022ae: bf14 ite ne
80022b0: 2301 movne r3, #1
80022b2: 2300 moveq r3, #0
80022b4: b2db uxtb r3, r3
80022b6: 461a mov r2, r3
macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_UPFD) >> 3U) > 0U)
80022b8: 683b ldr r3, [r7, #0]
80022ba: f883 2055 strb.w r2, [r3, #85] ; 0x55
return HAL_OK;
80022be: 2300 movs r3, #0
}
80022c0: 4618 mov r0, r3
80022c2: 370c adds r7, #12
80022c4: 46bd mov sp, r7
80022c6: f85d 7b04 ldr.w r7, [sp], #4
80022ca: 4770 bx lr
080022cc <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)
{
80022cc: b580 push {r7, lr}
80022ce: b082 sub sp, #8
80022d0: af00 add r7, sp, #0
80022d2: 6078 str r0, [r7, #4]
80022d4: 6039 str r1, [r7, #0]
if (macconf == NULL)
80022d6: 683b ldr r3, [r7, #0]
80022d8: 2b00 cmp r3, #0
80022da: d101 bne.n 80022e0 <HAL_ETH_SetMACConfig+0x14>
{
return HAL_ERROR;
80022dc: 2301 movs r3, #1
80022de: e00b b.n 80022f8 <HAL_ETH_SetMACConfig+0x2c>
}
if (heth->gState == HAL_ETH_STATE_READY)
80022e0: 687b ldr r3, [r7, #4]
80022e2: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
80022e6: 2b10 cmp r3, #16
80022e8: d105 bne.n 80022f6 <HAL_ETH_SetMACConfig+0x2a>
{
ETH_SetMACConfig(heth, macconf);
80022ea: 6839 ldr r1, [r7, #0]
80022ec: 6878 ldr r0, [r7, #4]
80022ee: f000 f883 bl 80023f8 <ETH_SetMACConfig>
return HAL_OK;
80022f2: 2300 movs r3, #0
80022f4: e000 b.n 80022f8 <HAL_ETH_SetMACConfig+0x2c>
}
else
{
return HAL_ERROR;
80022f6: 2301 movs r3, #1
}
}
80022f8: 4618 mov r0, r3
80022fa: 3708 adds r7, #8
80022fc: 46bd mov sp, r7
80022fe: bd80 pop {r7, pc}
08002300 <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)
{
8002300: b580 push {r7, lr}
8002302: b084 sub sp, #16
8002304: af00 add r7, sp, #0
8002306: 6078 str r0, [r7, #4]
uint32_t hclk;
uint32_t tmpreg;
/* Get the ETHERNET MACMIIAR value */
tmpreg = (heth->Instance)->MACMIIAR;
8002308: 687b ldr r3, [r7, #4]
800230a: 681b ldr r3, [r3, #0]
800230c: 691b ldr r3, [r3, #16]
800230e: 60fb str r3, [r7, #12]
/* Clear CSR Clock Range CR[2:0] bits */
tmpreg &= ETH_MACMIIAR_CR_MASK;
8002310: 68fb ldr r3, [r7, #12]
8002312: f023 031c bic.w r3, r3, #28
8002316: 60fb str r3, [r7, #12]
/* Get hclk frequency value */
hclk = HAL_RCC_GetHCLKFreq();
8002318: f001 fa38 bl 800378c <HAL_RCC_GetHCLKFreq>
800231c: 60b8 str r0, [r7, #8]
/* Set CR bits depending on hclk value */
if ((hclk >= 20000000U) && (hclk < 35000000U))
800231e: 68bb ldr r3, [r7, #8]
8002320: 4a1d ldr r2, [pc, #116] ; (8002398 <HAL_ETH_SetMDIOClockRange+0x98>)
8002322: 4293 cmp r3, r2
8002324: d908 bls.n 8002338 <HAL_ETH_SetMDIOClockRange+0x38>
8002326: 68bb ldr r3, [r7, #8]
8002328: 4a1c ldr r2, [pc, #112] ; (800239c <HAL_ETH_SetMDIOClockRange+0x9c>)
800232a: 4293 cmp r3, r2
800232c: d804 bhi.n 8002338 <HAL_ETH_SetMDIOClockRange+0x38>
{
/* CSR Clock Range between 20-35 MHz */
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div16;
800232e: 68fb ldr r3, [r7, #12]
8002330: f043 0308 orr.w r3, r3, #8
8002334: 60fb str r3, [r7, #12]
8002336: e027 b.n 8002388 <HAL_ETH_SetMDIOClockRange+0x88>
}
else if ((hclk >= 35000000U) && (hclk < 60000000U))
8002338: 68bb ldr r3, [r7, #8]
800233a: 4a18 ldr r2, [pc, #96] ; (800239c <HAL_ETH_SetMDIOClockRange+0x9c>)
800233c: 4293 cmp r3, r2
800233e: d908 bls.n 8002352 <HAL_ETH_SetMDIOClockRange+0x52>
8002340: 68bb ldr r3, [r7, #8]
8002342: 4a17 ldr r2, [pc, #92] ; (80023a0 <HAL_ETH_SetMDIOClockRange+0xa0>)
8002344: 4293 cmp r3, r2
8002346: d204 bcs.n 8002352 <HAL_ETH_SetMDIOClockRange+0x52>
{
/* CSR Clock Range between 35-60 MHz */
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div26;
8002348: 68fb ldr r3, [r7, #12]
800234a: f043 030c orr.w r3, r3, #12
800234e: 60fb str r3, [r7, #12]
8002350: e01a b.n 8002388 <HAL_ETH_SetMDIOClockRange+0x88>
}
else if ((hclk >= 60000000U) && (hclk < 100000000U))
8002352: 68bb ldr r3, [r7, #8]
8002354: 4a12 ldr r2, [pc, #72] ; (80023a0 <HAL_ETH_SetMDIOClockRange+0xa0>)
8002356: 4293 cmp r3, r2
8002358: d303 bcc.n 8002362 <HAL_ETH_SetMDIOClockRange+0x62>
800235a: 68bb ldr r3, [r7, #8]
800235c: 4a11 ldr r2, [pc, #68] ; (80023a4 <HAL_ETH_SetMDIOClockRange+0xa4>)
800235e: 4293 cmp r3, r2
8002360: d911 bls.n 8002386 <HAL_ETH_SetMDIOClockRange+0x86>
{
/* CSR Clock Range between 60-100 MHz */
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div42;
}
else if ((hclk >= 100000000U) && (hclk < 150000000U))
8002362: 68bb ldr r3, [r7, #8]
8002364: 4a0f ldr r2, [pc, #60] ; (80023a4 <HAL_ETH_SetMDIOClockRange+0xa4>)
8002366: 4293 cmp r3, r2
8002368: d908 bls.n 800237c <HAL_ETH_SetMDIOClockRange+0x7c>
800236a: 68bb ldr r3, [r7, #8]
800236c: 4a0e ldr r2, [pc, #56] ; (80023a8 <HAL_ETH_SetMDIOClockRange+0xa8>)
800236e: 4293 cmp r3, r2
8002370: d804 bhi.n 800237c <HAL_ETH_SetMDIOClockRange+0x7c>
{
/* CSR Clock Range between 100-150 MHz */
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div62;
8002372: 68fb ldr r3, [r7, #12]
8002374: f043 0304 orr.w r3, r3, #4
8002378: 60fb str r3, [r7, #12]
800237a: e005 b.n 8002388 <HAL_ETH_SetMDIOClockRange+0x88>
}
else /* ((hclk >= 150000000)&&(hclk <= 183000000))*/
{
/* CSR Clock Range between 150-183 MHz */
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div102;
800237c: 68fb ldr r3, [r7, #12]
800237e: f043 0310 orr.w r3, r3, #16
8002382: 60fb str r3, [r7, #12]
8002384: e000 b.n 8002388 <HAL_ETH_SetMDIOClockRange+0x88>
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div42;
8002386: bf00 nop
}
/* Write to ETHERNET MAC MIIAR: Configure the ETHERNET CSR Clock Range */
(heth->Instance)->MACMIIAR = (uint32_t)tmpreg;
8002388: 687b ldr r3, [r7, #4]
800238a: 681b ldr r3, [r3, #0]
800238c: 68fa ldr r2, [r7, #12]
800238e: 611a str r2, [r3, #16]
}
8002390: bf00 nop
8002392: 3710 adds r7, #16
8002394: 46bd mov sp, r7
8002396: bd80 pop {r7, pc}
8002398: 01312cff .word 0x01312cff
800239c: 02160ebf .word 0x02160ebf
80023a0: 03938700 .word 0x03938700
80023a4: 05f5e0ff .word 0x05f5e0ff
80023a8: 08f0d17f .word 0x08f0d17f
080023ac <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)
{
80023ac: b580 push {r7, lr}
80023ae: b084 sub sp, #16
80023b0: af00 add r7, sp, #0
80023b2: 6078 str r0, [r7, #4]
__IO uint32_t tmpreg = 0;
80023b4: 2300 movs r3, #0
80023b6: 60fb str r3, [r7, #12]
/* Set the Flush Transmit FIFO bit */
(heth->Instance)->DMAOMR |= ETH_DMAOMR_FTF;
80023b8: 687b ldr r3, [r7, #4]
80023ba: 681b ldr r3, [r3, #0]
80023bc: f503 5380 add.w r3, r3, #4096 ; 0x1000
80023c0: 699b ldr r3, [r3, #24]
80023c2: 687a ldr r2, [r7, #4]
80023c4: 6812 ldr r2, [r2, #0]
80023c6: f443 1380 orr.w r3, r3, #1048576 ; 0x100000
80023ca: f502 5280 add.w r2, r2, #4096 ; 0x1000
80023ce: 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;
80023d0: 687b ldr r3, [r7, #4]
80023d2: 681b ldr r3, [r3, #0]
80023d4: f503 5380 add.w r3, r3, #4096 ; 0x1000
80023d8: 699b ldr r3, [r3, #24]
80023da: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
80023dc: 2001 movs r0, #1
80023de: f7ff f9eb bl 80017b8 <HAL_Delay>
(heth->Instance)->DMAOMR = tmpreg;
80023e2: 687b ldr r3, [r7, #4]
80023e4: 681a ldr r2, [r3, #0]
80023e6: 68fb ldr r3, [r7, #12]
80023e8: f502 5280 add.w r2, r2, #4096 ; 0x1000
80023ec: 6193 str r3, [r2, #24]
}
80023ee: bf00 nop
80023f0: 3710 adds r7, #16
80023f2: 46bd mov sp, r7
80023f4: bd80 pop {r7, pc}
...
080023f8 <ETH_SetMACConfig>:
static void ETH_SetMACConfig(ETH_HandleTypeDef *heth, ETH_MACConfigTypeDef *macconf)
{
80023f8: b580 push {r7, lr}
80023fa: b084 sub sp, #16
80023fc: af00 add r7, sp, #0
80023fe: 6078 str r0, [r7, #4]
8002400: 6039 str r1, [r7, #0]
uint32_t tmpreg1;
/*------------------------ ETHERNET MACCR Configuration --------------------*/
/* Get the ETHERNET MACCR value */
tmpreg1 = (heth->Instance)->MACCR;
8002402: 687b ldr r3, [r7, #4]
8002404: 681b ldr r3, [r3, #0]
8002406: 681b ldr r3, [r3, #0]
8002408: 60fb str r3, [r7, #12]
/* Clear WD, PCE, PS, TE and RE bits */
tmpreg1 &= ETH_MACCR_CLEAR_MASK;
800240a: 68fa ldr r2, [r7, #12]
800240c: 4b51 ldr r3, [pc, #324] ; (8002554 <ETH_SetMACConfig+0x15c>)
800240e: 4013 ands r3, r2
8002410: 60fb str r3, [r7, #12]
tmpreg1 |= (uint32_t)(((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 23U) |
8002412: 683b ldr r3, [r7, #0]
8002414: 7c1b ldrb r3, [r3, #16]
8002416: 2b00 cmp r3, #0
8002418: d102 bne.n 8002420 <ETH_SetMACConfig+0x28>
800241a: f44f 0200 mov.w r2, #8388608 ; 0x800000
800241e: e000 b.n 8002422 <ETH_SetMACConfig+0x2a>
8002420: 2200 movs r2, #0
((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 22U) |
8002422: 683b ldr r3, [r7, #0]
8002424: 7c5b ldrb r3, [r3, #17]
8002426: 2b00 cmp r3, #0
8002428: d102 bne.n 8002430 <ETH_SetMACConfig+0x38>
800242a: f44f 0380 mov.w r3, #4194304 ; 0x400000
800242e: e000 b.n 8002432 <ETH_SetMACConfig+0x3a>
8002430: 2300 movs r3, #0
tmpreg1 |= (uint32_t)(((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 23U) |
8002432: 431a orrs r2, r3
(uint32_t)macconf->InterPacketGapVal |
8002434: 683b ldr r3, [r7, #0]
8002436: 689b ldr r3, [r3, #8]
((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 22U) |
8002438: 431a orrs r2, r3
((uint32_t)macconf->CarrierSenseDuringTransmit << 16U) |
800243a: 683b ldr r3, [r7, #0]
800243c: 7fdb ldrb r3, [r3, #31]
800243e: 041b lsls r3, r3, #16
(uint32_t)macconf->InterPacketGapVal |
8002440: 431a orrs r2, r3
macconf->Speed |
8002442: 683b ldr r3, [r7, #0]
8002444: 695b ldr r3, [r3, #20]
((uint32_t)macconf->CarrierSenseDuringTransmit << 16U) |
8002446: 4313 orrs r3, r2
((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 13U) |
8002448: 683a ldr r2, [r7, #0]
800244a: 7f92 ldrb r2, [r2, #30]
800244c: 2a00 cmp r2, #0
800244e: d102 bne.n 8002456 <ETH_SetMACConfig+0x5e>
8002450: f44f 5200 mov.w r2, #8192 ; 0x2000
8002454: e000 b.n 8002458 <ETH_SetMACConfig+0x60>
8002456: 2200 movs r2, #0
macconf->Speed |
8002458: 431a orrs r2, r3
((uint32_t)macconf->LoopbackMode << 12U) |
800245a: 683b ldr r3, [r7, #0]
800245c: 7f1b ldrb r3, [r3, #28]
800245e: 031b lsls r3, r3, #12
((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 13U) |
8002460: 431a orrs r2, r3
macconf->DuplexMode |
8002462: 683b ldr r3, [r7, #0]
8002464: 699b ldr r3, [r3, #24]
((uint32_t)macconf->LoopbackMode << 12U) |
8002466: 431a orrs r2, r3
((uint32_t)macconf->ChecksumOffload << 10U) |
8002468: 683b ldr r3, [r7, #0]
800246a: 791b ldrb r3, [r3, #4]
800246c: 029b lsls r3, r3, #10
macconf->DuplexMode |
800246e: 4313 orrs r3, r2
((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 9U) |
8002470: 683a ldr r2, [r7, #0]
8002472: f892 2020 ldrb.w r2, [r2, #32]
8002476: 2a00 cmp r2, #0
8002478: d102 bne.n 8002480 <ETH_SetMACConfig+0x88>
800247a: f44f 7200 mov.w r2, #512 ; 0x200
800247e: e000 b.n 8002482 <ETH_SetMACConfig+0x8a>
8002480: 2200 movs r2, #0
((uint32_t)macconf->ChecksumOffload << 10U) |
8002482: 431a orrs r2, r3
((uint32_t)macconf->AutomaticPadCRCStrip << 7U) |
8002484: 683b ldr r3, [r7, #0]
8002486: 7bdb ldrb r3, [r3, #15]
8002488: 01db lsls r3, r3, #7
((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 9U) |
800248a: 431a orrs r2, r3
macconf->BackOffLimit |
800248c: 683b ldr r3, [r7, #0]
800248e: 6a5b ldr r3, [r3, #36] ; 0x24
((uint32_t)macconf->AutomaticPadCRCStrip << 7U) |
8002490: 431a orrs r2, r3
((uint32_t)macconf->DeferralCheck << 4U));
8002492: 683b ldr r3, [r7, #0]
8002494: f893 3028 ldrb.w r3, [r3, #40] ; 0x28
8002498: 011b lsls r3, r3, #4
tmpreg1 |= (uint32_t)(((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 23U) |
800249a: 4313 orrs r3, r2
800249c: 68fa ldr r2, [r7, #12]
800249e: 4313 orrs r3, r2
80024a0: 60fb str r3, [r7, #12]
/* Write to ETHERNET MACCR */
(heth->Instance)->MACCR = (uint32_t)tmpreg1;
80024a2: 687b ldr r3, [r7, #4]
80024a4: 681b ldr r3, [r3, #0]
80024a6: 68fa ldr r2, [r7, #12]
80024a8: 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;
80024aa: 687b ldr r3, [r7, #4]
80024ac: 681b ldr r3, [r3, #0]
80024ae: 681b ldr r3, [r3, #0]
80024b0: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
80024b2: 2001 movs r0, #1
80024b4: f7ff f980 bl 80017b8 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg1;
80024b8: 687b ldr r3, [r7, #4]
80024ba: 681b ldr r3, [r3, #0]
80024bc: 68fa ldr r2, [r7, #12]
80024be: 601a str r2, [r3, #0]
/*----------------------- ETHERNET MACFCR Configuration --------------------*/
/* Get the ETHERNET MACFCR value */
tmpreg1 = (heth->Instance)->MACFCR;
80024c0: 687b ldr r3, [r7, #4]
80024c2: 681b ldr r3, [r3, #0]
80024c4: 699b ldr r3, [r3, #24]
80024c6: 60fb str r3, [r7, #12]
/* Clear xx bits */
tmpreg1 &= ETH_MACFCR_CLEAR_MASK;
80024c8: 68fa ldr r2, [r7, #12]
80024ca: f64f 7341 movw r3, #65345 ; 0xff41
80024ce: 4013 ands r3, r2
80024d0: 60fb str r3, [r7, #12]
tmpreg1 |= (uint32_t)((macconf->PauseTime << 16U) |
80024d2: 683b ldr r3, [r7, #0]
80024d4: 6c9b ldr r3, [r3, #72] ; 0x48
80024d6: 041b lsls r3, r3, #16
((uint32_t)((macconf->ZeroQuantaPause == DISABLE) ? 1U : 0U) << 7U) |
80024d8: 683a ldr r2, [r7, #0]
80024da: f892 204c ldrb.w r2, [r2, #76] ; 0x4c
80024de: 2a00 cmp r2, #0
80024e0: d101 bne.n 80024e6 <ETH_SetMACConfig+0xee>
80024e2: 2280 movs r2, #128 ; 0x80
80024e4: e000 b.n 80024e8 <ETH_SetMACConfig+0xf0>
80024e6: 2200 movs r2, #0
tmpreg1 |= (uint32_t)((macconf->PauseTime << 16U) |
80024e8: 431a orrs r2, r3
macconf->PauseLowThreshold |
80024ea: 683b ldr r3, [r7, #0]
80024ec: 6d1b ldr r3, [r3, #80] ; 0x50
((uint32_t)((macconf->ZeroQuantaPause == DISABLE) ? 1U : 0U) << 7U) |
80024ee: 4313 orrs r3, r2
((uint32_t)((macconf->UnicastPausePacketDetect == ENABLE) ? 1U : 0U) << 3U) |
80024f0: 683a ldr r2, [r7, #0]
80024f2: f892 2055 ldrb.w r2, [r2, #85] ; 0x55
80024f6: 2a01 cmp r2, #1
80024f8: d101 bne.n 80024fe <ETH_SetMACConfig+0x106>
80024fa: 2208 movs r2, #8
80024fc: e000 b.n 8002500 <ETH_SetMACConfig+0x108>
80024fe: 2200 movs r2, #0
macconf->PauseLowThreshold |
8002500: 4313 orrs r3, r2
((uint32_t)((macconf->ReceiveFlowControl == ENABLE) ? 1U : 0U) << 2U) |
8002502: 683a ldr r2, [r7, #0]
8002504: f892 2056 ldrb.w r2, [r2, #86] ; 0x56
8002508: 2a01 cmp r2, #1
800250a: d101 bne.n 8002510 <ETH_SetMACConfig+0x118>
800250c: 2204 movs r2, #4
800250e: e000 b.n 8002512 <ETH_SetMACConfig+0x11a>
8002510: 2200 movs r2, #0
((uint32_t)((macconf->UnicastPausePacketDetect == ENABLE) ? 1U : 0U) << 3U) |
8002512: 4313 orrs r3, r2
((uint32_t)((macconf->TransmitFlowControl == ENABLE) ? 1U : 0U) << 1U));
8002514: 683a ldr r2, [r7, #0]
8002516: f892 2054 ldrb.w r2, [r2, #84] ; 0x54
800251a: 2a01 cmp r2, #1
800251c: d101 bne.n 8002522 <ETH_SetMACConfig+0x12a>
800251e: 2202 movs r2, #2
8002520: e000 b.n 8002524 <ETH_SetMACConfig+0x12c>
8002522: 2200 movs r2, #0
tmpreg1 |= (uint32_t)((macconf->PauseTime << 16U) |
8002524: 4313 orrs r3, r2
8002526: 68fa ldr r2, [r7, #12]
8002528: 4313 orrs r3, r2
800252a: 60fb str r3, [r7, #12]
/* Write to ETHERNET MACFCR */
(heth->Instance)->MACFCR = (uint32_t)tmpreg1;
800252c: 687b ldr r3, [r7, #4]
800252e: 681b ldr r3, [r3, #0]
8002530: 68fa ldr r2, [r7, #12]
8002532: 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;
8002534: 687b ldr r3, [r7, #4]
8002536: 681b ldr r3, [r3, #0]
8002538: 699b ldr r3, [r3, #24]
800253a: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
800253c: 2001 movs r0, #1
800253e: f7ff f93b bl 80017b8 <HAL_Delay>
(heth->Instance)->MACFCR = tmpreg1;
8002542: 687b ldr r3, [r7, #4]
8002544: 681b ldr r3, [r3, #0]
8002546: 68fa ldr r2, [r7, #12]
8002548: 619a str r2, [r3, #24]
}
800254a: bf00 nop
800254c: 3710 adds r7, #16
800254e: 46bd mov sp, r7
8002550: bd80 pop {r7, pc}
8002552: bf00 nop
8002554: ff20810f .word 0xff20810f
08002558 <ETH_SetDMAConfig>:
static void ETH_SetDMAConfig(ETH_HandleTypeDef *heth, ETH_DMAConfigTypeDef *dmaconf)
{
8002558: b580 push {r7, lr}
800255a: b084 sub sp, #16
800255c: af00 add r7, sp, #0
800255e: 6078 str r0, [r7, #4]
8002560: 6039 str r1, [r7, #0]
uint32_t tmpreg1;
/*----------------------- ETHERNET DMAOMR Configuration --------------------*/
/* Get the ETHERNET DMAOMR value */
tmpreg1 = (heth->Instance)->DMAOMR;
8002562: 687b ldr r3, [r7, #4]
8002564: 681b ldr r3, [r3, #0]
8002566: f503 5380 add.w r3, r3, #4096 ; 0x1000
800256a: 699b ldr r3, [r3, #24]
800256c: 60fb str r3, [r7, #12]
/* Clear xx bits */
tmpreg1 &= ETH_DMAOMR_CLEAR_MASK;
800256e: 68fa ldr r2, [r7, #12]
8002570: 4b3d ldr r3, [pc, #244] ; (8002668 <ETH_SetDMAConfig+0x110>)
8002572: 4013 ands r3, r2
8002574: 60fb str r3, [r7, #12]
tmpreg1 |= (uint32_t)(((uint32_t)((dmaconf->DropTCPIPChecksumErrorFrame == DISABLE) ? 1U : 0U) << 26U) |
8002576: 683b ldr r3, [r7, #0]
8002578: 7b1b ldrb r3, [r3, #12]
800257a: 2b00 cmp r3, #0
800257c: d102 bne.n 8002584 <ETH_SetDMAConfig+0x2c>
800257e: f04f 6280 mov.w r2, #67108864 ; 0x4000000
8002582: e000 b.n 8002586 <ETH_SetDMAConfig+0x2e>
8002584: 2200 movs r2, #0
((uint32_t)dmaconf->ReceiveStoreForward << 25U) |
8002586: 683b ldr r3, [r7, #0]
8002588: 7b5b ldrb r3, [r3, #13]
800258a: 065b lsls r3, r3, #25
tmpreg1 |= (uint32_t)(((uint32_t)((dmaconf->DropTCPIPChecksumErrorFrame == DISABLE) ? 1U : 0U) << 26U) |
800258c: 4313 orrs r3, r2
((uint32_t)((dmaconf->FlushRxPacket == DISABLE) ? 1U : 0U) << 20U) |
800258e: 683a ldr r2, [r7, #0]
8002590: 7f52 ldrb r2, [r2, #29]
8002592: 2a00 cmp r2, #0
8002594: d102 bne.n 800259c <ETH_SetDMAConfig+0x44>
8002596: f44f 1280 mov.w r2, #1048576 ; 0x100000
800259a: e000 b.n 800259e <ETH_SetDMAConfig+0x46>
800259c: 2200 movs r2, #0
((uint32_t)dmaconf->ReceiveStoreForward << 25U) |
800259e: 431a orrs r2, r3
((uint32_t)dmaconf->TransmitStoreForward << 21U) |
80025a0: 683b ldr r3, [r7, #0]
80025a2: 7b9b ldrb r3, [r3, #14]
80025a4: 055b lsls r3, r3, #21
((uint32_t)((dmaconf->FlushRxPacket == DISABLE) ? 1U : 0U) << 20U) |
80025a6: 431a orrs r2, r3
dmaconf->TransmitThresholdControl |
80025a8: 683b ldr r3, [r7, #0]
80025aa: 695b ldr r3, [r3, #20]
((uint32_t)dmaconf->TransmitStoreForward << 21U) |
80025ac: 431a orrs r2, r3
((uint32_t)dmaconf->ForwardErrorFrames << 7U) |
80025ae: 683b ldr r3, [r7, #0]
80025b0: 7f1b ldrb r3, [r3, #28]
80025b2: 01db lsls r3, r3, #7
dmaconf->TransmitThresholdControl |
80025b4: 431a orrs r2, r3
((uint32_t)dmaconf->ForwardUndersizedGoodFrames << 6U) |
80025b6: 683b ldr r3, [r7, #0]
80025b8: 7f9b ldrb r3, [r3, #30]
80025ba: 019b lsls r3, r3, #6
((uint32_t)dmaconf->ForwardErrorFrames << 7U) |
80025bc: 431a orrs r2, r3
dmaconf->ReceiveThresholdControl |
80025be: 683b ldr r3, [r7, #0]
80025c0: 6a1b ldr r3, [r3, #32]
((uint32_t)dmaconf->ForwardUndersizedGoodFrames << 6U) |
80025c2: 431a orrs r2, r3
((uint32_t)dmaconf->SecondFrameOperate << 2U));
80025c4: 683b ldr r3, [r7, #0]
80025c6: f893 3024 ldrb.w r3, [r3, #36] ; 0x24
80025ca: 009b lsls r3, r3, #2
tmpreg1 |= (uint32_t)(((uint32_t)((dmaconf->DropTCPIPChecksumErrorFrame == DISABLE) ? 1U : 0U) << 26U) |
80025cc: 4313 orrs r3, r2
80025ce: 68fa ldr r2, [r7, #12]
80025d0: 4313 orrs r3, r2
80025d2: 60fb str r3, [r7, #12]
/* Write to ETHERNET DMAOMR */
(heth->Instance)->DMAOMR = (uint32_t)tmpreg1;
80025d4: 687b ldr r3, [r7, #4]
80025d6: 681b ldr r3, [r3, #0]
80025d8: f503 5380 add.w r3, r3, #4096 ; 0x1000
80025dc: 461a mov r2, r3
80025de: 68fb ldr r3, [r7, #12]
80025e0: 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;
80025e2: 687b ldr r3, [r7, #4]
80025e4: 681b ldr r3, [r3, #0]
80025e6: f503 5380 add.w r3, r3, #4096 ; 0x1000
80025ea: 699b ldr r3, [r3, #24]
80025ec: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
80025ee: 2001 movs r0, #1
80025f0: f7ff f8e2 bl 80017b8 <HAL_Delay>
(heth->Instance)->DMAOMR = tmpreg1;
80025f4: 687b ldr r3, [r7, #4]
80025f6: 681b ldr r3, [r3, #0]
80025f8: f503 5380 add.w r3, r3, #4096 ; 0x1000
80025fc: 461a mov r2, r3
80025fe: 68fb ldr r3, [r7, #12]
8002600: 6193 str r3, [r2, #24]
/*----------------------- ETHERNET DMABMR Configuration --------------------*/
(heth->Instance)->DMABMR = (uint32_t)(((uint32_t)dmaconf->AddressAlignedBeats << 25U) |
8002602: 683b ldr r3, [r7, #0]
8002604: 791b ldrb r3, [r3, #4]
8002606: 065a lsls r2, r3, #25
dmaconf->BurstMode |
8002608: 683b ldr r3, [r7, #0]
800260a: 689b ldr r3, [r3, #8]
(heth->Instance)->DMABMR = (uint32_t)(((uint32_t)dmaconf->AddressAlignedBeats << 25U) |
800260c: 431a orrs r2, r3
dmaconf->RxDMABurstLength | /* !! if 4xPBL is selected for Tx or
800260e: 683b ldr r3, [r7, #0]
8002610: 699b ldr r3, [r3, #24]
dmaconf->BurstMode |
8002612: 431a orrs r2, r3
Rx it is applied for the other */
dmaconf->TxDMABurstLength |
8002614: 683b ldr r3, [r7, #0]
8002616: 691b ldr r3, [r3, #16]
dmaconf->RxDMABurstLength | /* !! if 4xPBL is selected for Tx or
8002618: 431a orrs r2, r3
((uint32_t)dmaconf->EnhancedDescriptorFormat << 7U) |
800261a: 683b ldr r3, [r7, #0]
800261c: f893 3025 ldrb.w r3, [r3, #37] ; 0x25
8002620: 01db lsls r3, r3, #7
dmaconf->TxDMABurstLength |
8002622: 431a orrs r2, r3
(dmaconf->DescriptorSkipLength << 2U) |
8002624: 683b ldr r3, [r7, #0]
8002626: 6a9b ldr r3, [r3, #40] ; 0x28
8002628: 009b lsls r3, r3, #2
((uint32_t)dmaconf->EnhancedDescriptorFormat << 7U) |
800262a: 431a orrs r2, r3
dmaconf->DMAArbitration |
800262c: 683b ldr r3, [r7, #0]
800262e: 681b ldr r3, [r3, #0]
(dmaconf->DescriptorSkipLength << 2U) |
8002630: 4313 orrs r3, r2
(heth->Instance)->DMABMR = (uint32_t)(((uint32_t)dmaconf->AddressAlignedBeats << 25U) |
8002632: 687a ldr r2, [r7, #4]
8002634: 6812 ldr r2, [r2, #0]
8002636: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
800263a: f502 5280 add.w r2, r2, #4096 ; 0x1000
800263e: 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;
8002640: 687b ldr r3, [r7, #4]
8002642: 681b ldr r3, [r3, #0]
8002644: f503 5380 add.w r3, r3, #4096 ; 0x1000
8002648: 681b ldr r3, [r3, #0]
800264a: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
800264c: 2001 movs r0, #1
800264e: f7ff f8b3 bl 80017b8 <HAL_Delay>
(heth->Instance)->DMABMR = tmpreg1;
8002652: 687b ldr r3, [r7, #4]
8002654: 681b ldr r3, [r3, #0]
8002656: f503 5380 add.w r3, r3, #4096 ; 0x1000
800265a: 461a mov r2, r3
800265c: 68fb ldr r3, [r7, #12]
800265e: 6013 str r3, [r2, #0]
}
8002660: bf00 nop
8002662: 3710 adds r7, #16
8002664: 46bd mov sp, r7
8002666: bd80 pop {r7, pc}
8002668: f8de3f23 .word 0xf8de3f23
0800266c <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)
{
800266c: b580 push {r7, lr}
800266e: b0a6 sub sp, #152 ; 0x98
8002670: af00 add r7, sp, #0
8002672: 6078 str r0, [r7, #4]
ETH_MACConfigTypeDef macDefaultConf;
ETH_DMAConfigTypeDef dmaDefaultConf;
/*--------------- ETHERNET MAC registers default Configuration --------------*/
macDefaultConf.Watchdog = ENABLE;
8002674: 2301 movs r3, #1
8002676: f887 3044 strb.w r3, [r7, #68] ; 0x44
macDefaultConf.Jabber = ENABLE;
800267a: 2301 movs r3, #1
800267c: f887 3045 strb.w r3, [r7, #69] ; 0x45
macDefaultConf.InterPacketGapVal = ETH_INTERFRAMEGAP_96BIT;
8002680: 2300 movs r3, #0
8002682: 63fb str r3, [r7, #60] ; 0x3c
macDefaultConf.CarrierSenseDuringTransmit = DISABLE;
8002684: 2300 movs r3, #0
8002686: f887 3053 strb.w r3, [r7, #83] ; 0x53
macDefaultConf.ReceiveOwn = ENABLE;
800268a: 2301 movs r3, #1
800268c: f887 3052 strb.w r3, [r7, #82] ; 0x52
macDefaultConf.LoopbackMode = DISABLE;
8002690: 2300 movs r3, #0
8002692: f887 3050 strb.w r3, [r7, #80] ; 0x50
macDefaultConf.ChecksumOffload = ENABLE;
8002696: 2301 movs r3, #1
8002698: f887 3038 strb.w r3, [r7, #56] ; 0x38
macDefaultConf.RetryTransmission = DISABLE;
800269c: 2300 movs r3, #0
800269e: f887 3054 strb.w r3, [r7, #84] ; 0x54
macDefaultConf.AutomaticPadCRCStrip = DISABLE;
80026a2: 2300 movs r3, #0
80026a4: f887 3043 strb.w r3, [r7, #67] ; 0x43
macDefaultConf.BackOffLimit = ETH_BACKOFFLIMIT_10;
80026a8: 2300 movs r3, #0
80026aa: 65bb str r3, [r7, #88] ; 0x58
macDefaultConf.DeferralCheck = DISABLE;
80026ac: 2300 movs r3, #0
80026ae: f887 305c strb.w r3, [r7, #92] ; 0x5c
macDefaultConf.PauseTime = 0x0U;
80026b2: 2300 movs r3, #0
80026b4: 67fb str r3, [r7, #124] ; 0x7c
macDefaultConf.ZeroQuantaPause = DISABLE;
80026b6: 2300 movs r3, #0
80026b8: f887 3080 strb.w r3, [r7, #128] ; 0x80
macDefaultConf.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS4;
80026bc: 2300 movs r3, #0
80026be: f8c7 3084 str.w r3, [r7, #132] ; 0x84
macDefaultConf.ReceiveFlowControl = DISABLE;
80026c2: 2300 movs r3, #0
80026c4: f887 308a strb.w r3, [r7, #138] ; 0x8a
macDefaultConf.TransmitFlowControl = DISABLE;
80026c8: 2300 movs r3, #0
80026ca: f887 3088 strb.w r3, [r7, #136] ; 0x88
macDefaultConf.Speed = ETH_SPEED_100M;
80026ce: f44f 4380 mov.w r3, #16384 ; 0x4000
80026d2: 64bb str r3, [r7, #72] ; 0x48
macDefaultConf.DuplexMode = ETH_FULLDUPLEX_MODE;
80026d4: f44f 6300 mov.w r3, #2048 ; 0x800
80026d8: 64fb str r3, [r7, #76] ; 0x4c
macDefaultConf.UnicastPausePacketDetect = DISABLE;
80026da: 2300 movs r3, #0
80026dc: f887 3089 strb.w r3, [r7, #137] ; 0x89
/* MAC default configuration */
ETH_SetMACConfig(heth, &macDefaultConf);
80026e0: f107 0334 add.w r3, r7, #52 ; 0x34
80026e4: 4619 mov r1, r3
80026e6: 6878 ldr r0, [r7, #4]
80026e8: f7ff fe86 bl 80023f8 <ETH_SetMACConfig>
/*--------------- ETHERNET DMA registers default Configuration --------------*/
dmaDefaultConf.DropTCPIPChecksumErrorFrame = ENABLE;
80026ec: 2301 movs r3, #1
80026ee: 753b strb r3, [r7, #20]
dmaDefaultConf.ReceiveStoreForward = ENABLE;
80026f0: 2301 movs r3, #1
80026f2: 757b strb r3, [r7, #21]
dmaDefaultConf.FlushRxPacket = ENABLE;
80026f4: 2301 movs r3, #1
80026f6: f887 3025 strb.w r3, [r7, #37] ; 0x25
dmaDefaultConf.TransmitStoreForward = ENABLE;
80026fa: 2301 movs r3, #1
80026fc: 75bb strb r3, [r7, #22]
dmaDefaultConf.TransmitThresholdControl = ETH_TRANSMITTHRESHOLDCONTROL_64BYTES;
80026fe: 2300 movs r3, #0
8002700: 61fb str r3, [r7, #28]
dmaDefaultConf.ForwardErrorFrames = DISABLE;
8002702: 2300 movs r3, #0
8002704: f887 3024 strb.w r3, [r7, #36] ; 0x24
dmaDefaultConf.ForwardUndersizedGoodFrames = DISABLE;
8002708: 2300 movs r3, #0
800270a: f887 3026 strb.w r3, [r7, #38] ; 0x26
dmaDefaultConf.ReceiveThresholdControl = ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES;
800270e: 2300 movs r3, #0
8002710: 62bb str r3, [r7, #40] ; 0x28
dmaDefaultConf.SecondFrameOperate = ENABLE;
8002712: 2301 movs r3, #1
8002714: f887 302c strb.w r3, [r7, #44] ; 0x2c
dmaDefaultConf.AddressAlignedBeats = ENABLE;
8002718: 2301 movs r3, #1
800271a: 733b strb r3, [r7, #12]
dmaDefaultConf.BurstMode = ETH_BURSTLENGTH_FIXED;
800271c: f44f 3380 mov.w r3, #65536 ; 0x10000
8002720: 613b str r3, [r7, #16]
dmaDefaultConf.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT;
8002722: f44f 0380 mov.w r3, #4194304 ; 0x400000
8002726: 623b str r3, [r7, #32]
dmaDefaultConf.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT;
8002728: f44f 5300 mov.w r3, #8192 ; 0x2000
800272c: 61bb str r3, [r7, #24]
dmaDefaultConf.EnhancedDescriptorFormat = ENABLE;
800272e: 2301 movs r3, #1
8002730: f887 302d strb.w r3, [r7, #45] ; 0x2d
dmaDefaultConf.DescriptorSkipLength = 0x0U;
8002734: 2300 movs r3, #0
8002736: 633b str r3, [r7, #48] ; 0x30
dmaDefaultConf.DMAArbitration = ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1;
8002738: 2300 movs r3, #0
800273a: 60bb str r3, [r7, #8]
/* DMA default configuration */
ETH_SetDMAConfig(heth, &dmaDefaultConf);
800273c: f107 0308 add.w r3, r7, #8
8002740: 4619 mov r1, r3
8002742: 6878 ldr r0, [r7, #4]
8002744: f7ff ff08 bl 8002558 <ETH_SetDMAConfig>
}
8002748: bf00 nop
800274a: 3798 adds r7, #152 ; 0x98
800274c: 46bd mov sp, r7
800274e: bd80 pop {r7, pc}
08002750 <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)
{
8002750: b480 push {r7}
8002752: b087 sub sp, #28
8002754: af00 add r7, sp, #0
8002756: 60f8 str r0, [r7, #12]
8002758: 60b9 str r1, [r7, #8]
800275a: 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];
800275c: 687b ldr r3, [r7, #4]
800275e: 3305 adds r3, #5
8002760: 781b ldrb r3, [r3, #0]
8002762: 021b lsls r3, r3, #8
8002764: 687a ldr r2, [r7, #4]
8002766: 3204 adds r2, #4
8002768: 7812 ldrb r2, [r2, #0]
800276a: 4313 orrs r3, r2
800276c: 617b str r3, [r7, #20]
/* Load the selected MAC address high register */
(*(__IO uint32_t *)((uint32_t)(ETH_MAC_ADDR_HBASE + MacAddr))) = tmpreg1;
800276e: 68ba ldr r2, [r7, #8]
8002770: 4b11 ldr r3, [pc, #68] ; (80027b8 <ETH_MACAddressConfig+0x68>)
8002772: 4413 add r3, r2
8002774: 461a mov r2, r3
8002776: 697b ldr r3, [r7, #20]
8002778: 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];
800277a: 687b ldr r3, [r7, #4]
800277c: 3303 adds r3, #3
800277e: 781b ldrb r3, [r3, #0]
8002780: 061a lsls r2, r3, #24
8002782: 687b ldr r3, [r7, #4]
8002784: 3302 adds r3, #2
8002786: 781b ldrb r3, [r3, #0]
8002788: 041b lsls r3, r3, #16
800278a: 431a orrs r2, r3
800278c: 687b ldr r3, [r7, #4]
800278e: 3301 adds r3, #1
8002790: 781b ldrb r3, [r3, #0]
8002792: 021b lsls r3, r3, #8
8002794: 4313 orrs r3, r2
8002796: 687a ldr r2, [r7, #4]
8002798: 7812 ldrb r2, [r2, #0]
800279a: 4313 orrs r3, r2
800279c: 617b str r3, [r7, #20]
/* Load the selected MAC address low register */
(*(__IO uint32_t *)((uint32_t)(ETH_MAC_ADDR_LBASE + MacAddr))) = tmpreg1;
800279e: 68ba ldr r2, [r7, #8]
80027a0: 4b06 ldr r3, [pc, #24] ; (80027bc <ETH_MACAddressConfig+0x6c>)
80027a2: 4413 add r3, r2
80027a4: 461a mov r2, r3
80027a6: 697b ldr r3, [r7, #20]
80027a8: 6013 str r3, [r2, #0]
}
80027aa: bf00 nop
80027ac: 371c adds r7, #28
80027ae: 46bd mov sp, r7
80027b0: f85d 7b04 ldr.w r7, [sp], #4
80027b4: 4770 bx lr
80027b6: bf00 nop
80027b8: 40028040 .word 0x40028040
80027bc: 40028044 .word 0x40028044
080027c0 <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)
{
80027c0: b480 push {r7}
80027c2: b085 sub sp, #20
80027c4: af00 add r7, sp, #0
80027c6: 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++)
80027c8: 2300 movs r3, #0
80027ca: 60fb str r3, [r7, #12]
80027cc: e03e b.n 800284c <ETH_DMATxDescListInit+0x8c>
{
dmatxdesc = heth->Init.TxDesc + i;
80027ce: 687b ldr r3, [r7, #4]
80027d0: 68d9 ldr r1, [r3, #12]
80027d2: 68fa ldr r2, [r7, #12]
80027d4: 4613 mov r3, r2
80027d6: 009b lsls r3, r3, #2
80027d8: 4413 add r3, r2
80027da: 00db lsls r3, r3, #3
80027dc: 440b add r3, r1
80027de: 60bb str r3, [r7, #8]
WRITE_REG(dmatxdesc->DESC0, 0x0);
80027e0: 68bb ldr r3, [r7, #8]
80027e2: 2200 movs r2, #0
80027e4: 601a str r2, [r3, #0]
WRITE_REG(dmatxdesc->DESC1, 0x0);
80027e6: 68bb ldr r3, [r7, #8]
80027e8: 2200 movs r2, #0
80027ea: 605a str r2, [r3, #4]
WRITE_REG(dmatxdesc->DESC2, 0x0);
80027ec: 68bb ldr r3, [r7, #8]
80027ee: 2200 movs r2, #0
80027f0: 609a str r2, [r3, #8]
WRITE_REG(dmatxdesc->DESC3, 0x0);
80027f2: 68bb ldr r3, [r7, #8]
80027f4: 2200 movs r2, #0
80027f6: 60da str r2, [r3, #12]
WRITE_REG(heth->TxDescList.TxDesc[i], (uint32_t)dmatxdesc);
80027f8: 68b9 ldr r1, [r7, #8]
80027fa: 687b ldr r3, [r7, #4]
80027fc: 68fa ldr r2, [r7, #12]
80027fe: 3206 adds r2, #6
8002800: f843 1022 str.w r1, [r3, r2, lsl #2]
/* Set Second Address Chained bit */
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_TCH);
8002804: 68bb ldr r3, [r7, #8]
8002806: 681b ldr r3, [r3, #0]
8002808: f443 1280 orr.w r2, r3, #1048576 ; 0x100000
800280c: 68bb ldr r3, [r7, #8]
800280e: 601a str r2, [r3, #0]
if (i < ((uint32_t)ETH_TX_DESC_CNT - 1U))
8002810: 68fb ldr r3, [r7, #12]
8002812: 2b02 cmp r3, #2
8002814: d80c bhi.n 8002830 <ETH_DMATxDescListInit+0x70>
{
WRITE_REG(dmatxdesc->DESC3, (uint32_t)(heth->Init.TxDesc + i + 1U));
8002816: 687b ldr r3, [r7, #4]
8002818: 68d9 ldr r1, [r3, #12]
800281a: 68fb ldr r3, [r7, #12]
800281c: 1c5a adds r2, r3, #1
800281e: 4613 mov r3, r2
8002820: 009b lsls r3, r3, #2
8002822: 4413 add r3, r2
8002824: 00db lsls r3, r3, #3
8002826: 440b add r3, r1
8002828: 461a mov r2, r3
800282a: 68bb ldr r3, [r7, #8]
800282c: 60da str r2, [r3, #12]
800282e: e004 b.n 800283a <ETH_DMATxDescListInit+0x7a>
}
else
{
WRITE_REG(dmatxdesc->DESC3, (uint32_t)(heth->Init.TxDesc));
8002830: 687b ldr r3, [r7, #4]
8002832: 68db ldr r3, [r3, #12]
8002834: 461a mov r2, r3
8002836: 68bb ldr r3, [r7, #8]
8002838: 60da str r2, [r3, #12]
}
/* Set the DMA Tx descriptors checksum insertion */
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL);
800283a: 68bb ldr r3, [r7, #8]
800283c: 681b ldr r3, [r3, #0]
800283e: f443 0240 orr.w r2, r3, #12582912 ; 0xc00000
8002842: 68bb ldr r3, [r7, #8]
8002844: 601a str r2, [r3, #0]
for (i = 0; i < (uint32_t)ETH_TX_DESC_CNT; i++)
8002846: 68fb ldr r3, [r7, #12]
8002848: 3301 adds r3, #1
800284a: 60fb str r3, [r7, #12]
800284c: 68fb ldr r3, [r7, #12]
800284e: 2b03 cmp r3, #3
8002850: d9bd bls.n 80027ce <ETH_DMATxDescListInit+0xe>
}
heth->TxDescList.CurTxDesc = 0;
8002852: 687b ldr r3, [r7, #4]
8002854: 2200 movs r2, #0
8002856: 629a str r2, [r3, #40] ; 0x28
/* Set Transmit Descriptor List Address */
WRITE_REG(heth->Instance->DMATDLAR, (uint32_t) heth->Init.TxDesc);
8002858: 687b ldr r3, [r7, #4]
800285a: 68da ldr r2, [r3, #12]
800285c: 687b ldr r3, [r7, #4]
800285e: 681b ldr r3, [r3, #0]
8002860: f503 5380 add.w r3, r3, #4096 ; 0x1000
8002864: 611a str r2, [r3, #16]
}
8002866: bf00 nop
8002868: 3714 adds r7, #20
800286a: 46bd mov sp, r7
800286c: f85d 7b04 ldr.w r7, [sp], #4
8002870: 4770 bx lr
08002872 <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)
{
8002872: b480 push {r7}
8002874: b085 sub sp, #20
8002876: af00 add r7, sp, #0
8002878: 6078 str r0, [r7, #4]
ETH_DMADescTypeDef *dmarxdesc;
uint32_t i;
for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++)
800287a: 2300 movs r3, #0
800287c: 60fb str r3, [r7, #12]
800287e: e046 b.n 800290e <ETH_DMARxDescListInit+0x9c>
{
dmarxdesc = heth->Init.RxDesc + i;
8002880: 687b ldr r3, [r7, #4]
8002882: 6919 ldr r1, [r3, #16]
8002884: 68fa ldr r2, [r7, #12]
8002886: 4613 mov r3, r2
8002888: 009b lsls r3, r3, #2
800288a: 4413 add r3, r2
800288c: 00db lsls r3, r3, #3
800288e: 440b add r3, r1
8002890: 60bb str r3, [r7, #8]
WRITE_REG(dmarxdesc->DESC0, 0x0);
8002892: 68bb ldr r3, [r7, #8]
8002894: 2200 movs r2, #0
8002896: 601a str r2, [r3, #0]
WRITE_REG(dmarxdesc->DESC1, 0x0);
8002898: 68bb ldr r3, [r7, #8]
800289a: 2200 movs r2, #0
800289c: 605a str r2, [r3, #4]
WRITE_REG(dmarxdesc->DESC2, 0x0);
800289e: 68bb ldr r3, [r7, #8]
80028a0: 2200 movs r2, #0
80028a2: 609a str r2, [r3, #8]
WRITE_REG(dmarxdesc->DESC3, 0x0);
80028a4: 68bb ldr r3, [r7, #8]
80028a6: 2200 movs r2, #0
80028a8: 60da str r2, [r3, #12]
WRITE_REG(dmarxdesc->BackupAddr0, 0x0);
80028aa: 68bb ldr r3, [r7, #8]
80028ac: 2200 movs r2, #0
80028ae: 621a str r2, [r3, #32]
WRITE_REG(dmarxdesc->BackupAddr1, 0x0);
80028b0: 68bb ldr r3, [r7, #8]
80028b2: 2200 movs r2, #0
80028b4: 625a str r2, [r3, #36] ; 0x24
/* Set Own bit of the Rx descriptor Status */
dmarxdesc->DESC0 = ETH_DMARXDESC_OWN;
80028b6: 68bb ldr r3, [r7, #8]
80028b8: f04f 4200 mov.w r2, #2147483648 ; 0x80000000
80028bc: 601a str r2, [r3, #0]
/* Set Buffer1 size and Second Address Chained bit */
dmarxdesc->DESC1 = ETH_DMARXDESC_RCH | ETH_RX_BUF_SIZE;
80028be: 68bb ldr r3, [r7, #8]
80028c0: f244 52f8 movw r2, #17912 ; 0x45f8
80028c4: 605a str r2, [r3, #4]
/* Enable Ethernet DMA Rx Descriptor interrupt */
dmarxdesc->DESC1 &= ~ETH_DMARXDESC_DIC;
80028c6: 68bb ldr r3, [r7, #8]
80028c8: 685b ldr r3, [r3, #4]
80028ca: f023 4200 bic.w r2, r3, #2147483648 ; 0x80000000
80028ce: 68bb ldr r3, [r7, #8]
80028d0: 605a str r2, [r3, #4]
/* Set Rx descritors addresses */
WRITE_REG(heth->RxDescList.RxDesc[i], (uint32_t)dmarxdesc);
80028d2: 68b9 ldr r1, [r7, #8]
80028d4: 687b ldr r3, [r7, #4]
80028d6: 68fa ldr r2, [r7, #12]
80028d8: 3212 adds r2, #18
80028da: f843 1022 str.w r1, [r3, r2, lsl #2]
if (i < ((uint32_t)ETH_RX_DESC_CNT - 1U))
80028de: 68fb ldr r3, [r7, #12]
80028e0: 2b02 cmp r3, #2
80028e2: d80c bhi.n 80028fe <ETH_DMARxDescListInit+0x8c>
{
WRITE_REG(dmarxdesc->DESC3, (uint32_t)(heth->Init.RxDesc + i + 1U));
80028e4: 687b ldr r3, [r7, #4]
80028e6: 6919 ldr r1, [r3, #16]
80028e8: 68fb ldr r3, [r7, #12]
80028ea: 1c5a adds r2, r3, #1
80028ec: 4613 mov r3, r2
80028ee: 009b lsls r3, r3, #2
80028f0: 4413 add r3, r2
80028f2: 00db lsls r3, r3, #3
80028f4: 440b add r3, r1
80028f6: 461a mov r2, r3
80028f8: 68bb ldr r3, [r7, #8]
80028fa: 60da str r2, [r3, #12]
80028fc: e004 b.n 8002908 <ETH_DMARxDescListInit+0x96>
}
else
{
WRITE_REG(dmarxdesc->DESC3, (uint32_t)(heth->Init.RxDesc));
80028fe: 687b ldr r3, [r7, #4]
8002900: 691b ldr r3, [r3, #16]
8002902: 461a mov r2, r3
8002904: 68bb ldr r3, [r7, #8]
8002906: 60da str r2, [r3, #12]
for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++)
8002908: 68fb ldr r3, [r7, #12]
800290a: 3301 adds r3, #1
800290c: 60fb str r3, [r7, #12]
800290e: 68fb ldr r3, [r7, #12]
8002910: 2b03 cmp r3, #3
8002912: d9b5 bls.n 8002880 <ETH_DMARxDescListInit+0xe>
}
}
WRITE_REG(heth->RxDescList.RxDescIdx, 0);
8002914: 687b ldr r3, [r7, #4]
8002916: 2200 movs r2, #0
8002918: 65da str r2, [r3, #92] ; 0x5c
WRITE_REG(heth->RxDescList.RxDescCnt, 0);
800291a: 687b ldr r3, [r7, #4]
800291c: 2200 movs r2, #0
800291e: 661a str r2, [r3, #96] ; 0x60
WRITE_REG(heth->RxDescList.RxBuildDescIdx, 0);
8002920: 687b ldr r3, [r7, #4]
8002922: 2200 movs r2, #0
8002924: 669a str r2, [r3, #104] ; 0x68
WRITE_REG(heth->RxDescList.RxBuildDescCnt, 0);
8002926: 687b ldr r3, [r7, #4]
8002928: 2200 movs r2, #0
800292a: 66da str r2, [r3, #108] ; 0x6c
WRITE_REG(heth->RxDescList.ItMode, 0);
800292c: 687b ldr r3, [r7, #4]
800292e: 2200 movs r2, #0
8002930: 659a str r2, [r3, #88] ; 0x58
/* Set Receive Descriptor List Address */
WRITE_REG(heth->Instance->DMARDLAR, (uint32_t) heth->Init.RxDesc);
8002932: 687b ldr r3, [r7, #4]
8002934: 691a ldr r2, [r3, #16]
8002936: 687b ldr r3, [r7, #4]
8002938: 681b ldr r3, [r3, #0]
800293a: f503 5380 add.w r3, r3, #4096 ; 0x1000
800293e: 60da str r2, [r3, #12]
}
8002940: bf00 nop
8002942: 3714 adds r7, #20
8002944: 46bd mov sp, r7
8002946: f85d 7b04 ldr.w r7, [sp], #4
800294a: 4770 bx lr
0800294c <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)
{
800294c: b480 push {r7}
800294e: b08d sub sp, #52 ; 0x34
8002950: af00 add r7, sp, #0
8002952: 60f8 str r0, [r7, #12]
8002954: 60b9 str r1, [r7, #8]
8002956: 607a str r2, [r7, #4]
ETH_TxDescListTypeDef *dmatxdesclist = &heth->TxDescList;
8002958: 68fb ldr r3, [r7, #12]
800295a: 3318 adds r3, #24
800295c: 617b str r3, [r7, #20]
uint32_t descidx = dmatxdesclist->CurTxDesc;
800295e: 697b ldr r3, [r7, #20]
8002960: 691b ldr r3, [r3, #16]
8002962: 62fb str r3, [r7, #44] ; 0x2c
uint32_t firstdescidx = dmatxdesclist->CurTxDesc;
8002964: 697b ldr r3, [r7, #20]
8002966: 691b ldr r3, [r3, #16]
8002968: 613b str r3, [r7, #16]
uint32_t idx;
uint32_t descnbr = 0;
800296a: 2300 movs r3, #0
800296c: 627b str r3, [r7, #36] ; 0x24
ETH_DMADescTypeDef *dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
800296e: 697b ldr r3, [r7, #20]
8002970: 6afa ldr r2, [r7, #44] ; 0x2c
8002972: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8002976: 623b str r3, [r7, #32]
ETH_BufferTypeDef *txbuffer = pTxConfig->TxBuffer;
8002978: 68bb ldr r3, [r7, #8]
800297a: 689b ldr r3, [r3, #8]
800297c: 61fb str r3, [r7, #28]
uint32_t bd_count = 0;
800297e: 2300 movs r3, #0
8002980: 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)
8002982: 6a3b ldr r3, [r7, #32]
8002984: 681b ldr r3, [r3, #0]
8002986: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000
800298a: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000
800298e: d007 beq.n 80029a0 <ETH_Prepare_Tx_Descriptors+0x54>
|| (dmatxdesclist->PacketAddress[descidx] != NULL))
8002990: 697a ldr r2, [r7, #20]
8002992: 6afb ldr r3, [r7, #44] ; 0x2c
8002994: 3304 adds r3, #4
8002996: 009b lsls r3, r3, #2
8002998: 4413 add r3, r2
800299a: 685b ldr r3, [r3, #4]
800299c: 2b00 cmp r3, #0
800299e: d001 beq.n 80029a4 <ETH_Prepare_Tx_Descriptors+0x58>
{
return HAL_ETH_ERROR_BUSY;
80029a0: 2302 movs r3, #2
80029a2: e103 b.n 8002bac <ETH_Prepare_Tx_Descriptors+0x260>
}
descnbr += 1U;
80029a4: 6a7b ldr r3, [r7, #36] ; 0x24
80029a6: 3301 adds r3, #1
80029a8: 627b str r3, [r7, #36] ; 0x24
/* Set header or buffer 1 address */
WRITE_REG(dmatxdesc->DESC2, (uint32_t)txbuffer->buffer);
80029aa: 69fb ldr r3, [r7, #28]
80029ac: 681b ldr r3, [r3, #0]
80029ae: 461a mov r2, r3
80029b0: 6a3b ldr r3, [r7, #32]
80029b2: 609a str r2, [r3, #8]
/* Set header or buffer 1 Length */
MODIFY_REG(dmatxdesc->DESC1, ETH_DMATXDESC_TBS1, txbuffer->len);
80029b4: 6a3b ldr r3, [r7, #32]
80029b6: 685b ldr r3, [r3, #4]
80029b8: f423 53ff bic.w r3, r3, #8160 ; 0x1fe0
80029bc: f023 031f bic.w r3, r3, #31
80029c0: 69fa ldr r2, [r7, #28]
80029c2: 6852 ldr r2, [r2, #4]
80029c4: 431a orrs r2, r3
80029c6: 6a3b ldr r3, [r7, #32]
80029c8: 605a str r2, [r3, #4]
if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CSUM) != 0U)
80029ca: 68bb ldr r3, [r7, #8]
80029cc: 681b ldr r3, [r3, #0]
80029ce: f003 0301 and.w r3, r3, #1
80029d2: 2b00 cmp r3, #0
80029d4: d008 beq.n 80029e8 <ETH_Prepare_Tx_Descriptors+0x9c>
{
MODIFY_REG(dmatxdesc->DESC0, ETH_DMATXDESC_CIC, pTxConfig->ChecksumCtrl);
80029d6: 6a3b ldr r3, [r7, #32]
80029d8: 681b ldr r3, [r3, #0]
80029da: f423 0240 bic.w r2, r3, #12582912 ; 0xc00000
80029de: 68bb ldr r3, [r7, #8]
80029e0: 695b ldr r3, [r3, #20]
80029e2: 431a orrs r2, r3
80029e4: 6a3b ldr r3, [r7, #32]
80029e6: 601a str r2, [r3, #0]
}
if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CRCPAD) != 0U)
80029e8: 68bb ldr r3, [r7, #8]
80029ea: 681b ldr r3, [r3, #0]
80029ec: f003 0320 and.w r3, r3, #32
80029f0: 2b00 cmp r3, #0
80029f2: d008 beq.n 8002a06 <ETH_Prepare_Tx_Descriptors+0xba>
{
MODIFY_REG(dmatxdesc->DESC0, ETH_CRC_PAD_DISABLE, pTxConfig->CRCPadCtrl);
80029f4: 6a3b ldr r3, [r7, #32]
80029f6: 681b ldr r3, [r3, #0]
80029f8: f023 6240 bic.w r2, r3, #201326592 ; 0xc000000
80029fc: 68bb ldr r3, [r7, #8]
80029fe: 691b ldr r3, [r3, #16]
8002a00: 431a orrs r2, r3
8002a02: 6a3b ldr r3, [r7, #32]
8002a04: 601a str r2, [r3, #0]
}
if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != 0U)
8002a06: 68bb ldr r3, [r7, #8]
8002a08: 681b ldr r3, [r3, #0]
8002a0a: f003 0304 and.w r3, r3, #4
8002a0e: 2b00 cmp r3, #0
8002a10: d005 beq.n 8002a1e <ETH_Prepare_Tx_Descriptors+0xd2>
{
/* Set Vlan Type */
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_VF);
8002a12: 6a3b ldr r3, [r7, #32]
8002a14: 681b ldr r3, [r3, #0]
8002a16: f043 0280 orr.w r2, r3, #128 ; 0x80
8002a1a: 6a3b ldr r3, [r7, #32]
8002a1c: 601a str r2, [r3, #0]
}
/* Mark it as First Descriptor */
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_FS);
8002a1e: 6a3b ldr r3, [r7, #32]
8002a20: 681b ldr r3, [r3, #0]
8002a22: f043 5280 orr.w r2, r3, #268435456 ; 0x10000000
8002a26: 6a3b ldr r3, [r7, #32]
8002a28: 601a str r2, [r3, #0]
__ASM volatile ("dmb 0xF":::"memory");
8002a2a: f3bf 8f5f dmb sy
}
8002a2e: 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);
8002a30: 6a3b ldr r3, [r7, #32]
8002a32: 681b ldr r3, [r3, #0]
8002a34: f043 4200 orr.w r2, r3, #2147483648 ; 0x80000000
8002a38: 6a3b ldr r3, [r7, #32]
8002a3a: 601a str r2, [r3, #0]
/* only if the packet is split into more than one descriptors > 1 */
while (txbuffer->next != NULL)
8002a3c: e084 b.n 8002b48 <ETH_Prepare_Tx_Descriptors+0x1fc>
{
/* Clear the LD bit of previous descriptor */
CLEAR_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_LS);
8002a3e: 6a3b ldr r3, [r7, #32]
8002a40: 681b ldr r3, [r3, #0]
8002a42: f023 5200 bic.w r2, r3, #536870912 ; 0x20000000
8002a46: 6a3b ldr r3, [r7, #32]
8002a48: 601a str r2, [r3, #0]
if (ItMode != ((uint32_t)RESET))
8002a4a: 687b ldr r3, [r7, #4]
8002a4c: 2b00 cmp r3, #0
8002a4e: d006 beq.n 8002a5e <ETH_Prepare_Tx_Descriptors+0x112>
{
/* Set Interrupt on completion bit */
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_IC);
8002a50: 6a3b ldr r3, [r7, #32]
8002a52: 681b ldr r3, [r3, #0]
8002a54: f043 4280 orr.w r2, r3, #1073741824 ; 0x40000000
8002a58: 6a3b ldr r3, [r7, #32]
8002a5a: 601a str r2, [r3, #0]
8002a5c: e005 b.n 8002a6a <ETH_Prepare_Tx_Descriptors+0x11e>
}
else
{
/* Clear Interrupt on completion bit */
CLEAR_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_IC);
8002a5e: 6a3b ldr r3, [r7, #32]
8002a60: 681b ldr r3, [r3, #0]
8002a62: f023 4280 bic.w r2, r3, #1073741824 ; 0x40000000
8002a66: 6a3b ldr r3, [r7, #32]
8002a68: 601a str r2, [r3, #0]
}
/* Increment current tx descriptor index */
INCR_TX_DESC_INDEX(descidx, 1U);
8002a6a: 6afb ldr r3, [r7, #44] ; 0x2c
8002a6c: 3301 adds r3, #1
8002a6e: 62fb str r3, [r7, #44] ; 0x2c
8002a70: 6afb ldr r3, [r7, #44] ; 0x2c
8002a72: 2b03 cmp r3, #3
8002a74: d902 bls.n 8002a7c <ETH_Prepare_Tx_Descriptors+0x130>
8002a76: 6afb ldr r3, [r7, #44] ; 0x2c
8002a78: 3b04 subs r3, #4
8002a7a: 62fb str r3, [r7, #44] ; 0x2c
/* Get current descriptor address */
dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
8002a7c: 697b ldr r3, [r7, #20]
8002a7e: 6afa ldr r2, [r7, #44] ; 0x2c
8002a80: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8002a84: 623b str r3, [r7, #32]
/* Clear the FD bit of new Descriptor */
CLEAR_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_FS);
8002a86: 6a3b ldr r3, [r7, #32]
8002a88: 681b ldr r3, [r3, #0]
8002a8a: f023 5280 bic.w r2, r3, #268435456 ; 0x10000000
8002a8e: 6a3b ldr r3, [r7, #32]
8002a90: 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)
8002a92: 6a3b ldr r3, [r7, #32]
8002a94: 681b ldr r3, [r3, #0]
8002a96: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000
8002a9a: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000
8002a9e: d007 beq.n 8002ab0 <ETH_Prepare_Tx_Descriptors+0x164>
|| (dmatxdesclist->PacketAddress[descidx] != NULL))
8002aa0: 697a ldr r2, [r7, #20]
8002aa2: 6afb ldr r3, [r7, #44] ; 0x2c
8002aa4: 3304 adds r3, #4
8002aa6: 009b lsls r3, r3, #2
8002aa8: 4413 add r3, r2
8002aaa: 685b ldr r3, [r3, #4]
8002aac: 2b00 cmp r3, #0
8002aae: d029 beq.n 8002b04 <ETH_Prepare_Tx_Descriptors+0x1b8>
{
descidx = firstdescidx;
8002ab0: 693b ldr r3, [r7, #16]
8002ab2: 62fb str r3, [r7, #44] ; 0x2c
dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
8002ab4: 697b ldr r3, [r7, #20]
8002ab6: 6afa ldr r2, [r7, #44] ; 0x2c
8002ab8: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8002abc: 623b str r3, [r7, #32]
/* clear previous desc own bit */
for (idx = 0; idx < descnbr; idx ++)
8002abe: 2300 movs r3, #0
8002ac0: 62bb str r3, [r7, #40] ; 0x28
8002ac2: e019 b.n 8002af8 <ETH_Prepare_Tx_Descriptors+0x1ac>
__ASM volatile ("dmb 0xF":::"memory");
8002ac4: f3bf 8f5f dmb sy
}
8002ac8: bf00 nop
{
/* Ensure rest of descriptor is written to RAM before the OWN bit */
__DMB();
CLEAR_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_OWN);
8002aca: 6a3b ldr r3, [r7, #32]
8002acc: 681b ldr r3, [r3, #0]
8002ace: f023 4200 bic.w r2, r3, #2147483648 ; 0x80000000
8002ad2: 6a3b ldr r3, [r7, #32]
8002ad4: 601a str r2, [r3, #0]
/* Increment current tx descriptor index */
INCR_TX_DESC_INDEX(descidx, 1U);
8002ad6: 6afb ldr r3, [r7, #44] ; 0x2c
8002ad8: 3301 adds r3, #1
8002ada: 62fb str r3, [r7, #44] ; 0x2c
8002adc: 6afb ldr r3, [r7, #44] ; 0x2c
8002ade: 2b03 cmp r3, #3
8002ae0: d902 bls.n 8002ae8 <ETH_Prepare_Tx_Descriptors+0x19c>
8002ae2: 6afb ldr r3, [r7, #44] ; 0x2c
8002ae4: 3b04 subs r3, #4
8002ae6: 62fb str r3, [r7, #44] ; 0x2c
/* Get current descriptor address */
dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
8002ae8: 697b ldr r3, [r7, #20]
8002aea: 6afa ldr r2, [r7, #44] ; 0x2c
8002aec: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8002af0: 623b str r3, [r7, #32]
for (idx = 0; idx < descnbr; idx ++)
8002af2: 6abb ldr r3, [r7, #40] ; 0x28
8002af4: 3301 adds r3, #1
8002af6: 62bb str r3, [r7, #40] ; 0x28
8002af8: 6aba ldr r2, [r7, #40] ; 0x28
8002afa: 6a7b ldr r3, [r7, #36] ; 0x24
8002afc: 429a cmp r2, r3
8002afe: d3e1 bcc.n 8002ac4 <ETH_Prepare_Tx_Descriptors+0x178>
}
return HAL_ETH_ERROR_BUSY;
8002b00: 2302 movs r3, #2
8002b02: e053 b.n 8002bac <ETH_Prepare_Tx_Descriptors+0x260>
}
descnbr += 1U;
8002b04: 6a7b ldr r3, [r7, #36] ; 0x24
8002b06: 3301 adds r3, #1
8002b08: 627b str r3, [r7, #36] ; 0x24
/* Get the next Tx buffer in the list */
txbuffer = txbuffer->next;
8002b0a: 69fb ldr r3, [r7, #28]
8002b0c: 689b ldr r3, [r3, #8]
8002b0e: 61fb str r3, [r7, #28]
/* Set header or buffer 1 address */
WRITE_REG(dmatxdesc->DESC2, (uint32_t)txbuffer->buffer);
8002b10: 69fb ldr r3, [r7, #28]
8002b12: 681b ldr r3, [r3, #0]
8002b14: 461a mov r2, r3
8002b16: 6a3b ldr r3, [r7, #32]
8002b18: 609a str r2, [r3, #8]
/* Set header or buffer 1 Length */
MODIFY_REG(dmatxdesc->DESC1, ETH_DMATXDESC_TBS1, txbuffer->len);
8002b1a: 6a3b ldr r3, [r7, #32]
8002b1c: 685b ldr r3, [r3, #4]
8002b1e: f423 53ff bic.w r3, r3, #8160 ; 0x1fe0
8002b22: f023 031f bic.w r3, r3, #31
8002b26: 69fa ldr r2, [r7, #28]
8002b28: 6852 ldr r2, [r2, #4]
8002b2a: 431a orrs r2, r3
8002b2c: 6a3b ldr r3, [r7, #32]
8002b2e: 605a str r2, [r3, #4]
bd_count += 1U;
8002b30: 69bb ldr r3, [r7, #24]
8002b32: 3301 adds r3, #1
8002b34: 61bb str r3, [r7, #24]
__ASM volatile ("dmb 0xF":::"memory");
8002b36: f3bf 8f5f dmb sy
}
8002b3a: 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);
8002b3c: 6a3b ldr r3, [r7, #32]
8002b3e: 681b ldr r3, [r3, #0]
8002b40: f043 4200 orr.w r2, r3, #2147483648 ; 0x80000000
8002b44: 6a3b ldr r3, [r7, #32]
8002b46: 601a str r2, [r3, #0]
while (txbuffer->next != NULL)
8002b48: 69fb ldr r3, [r7, #28]
8002b4a: 689b ldr r3, [r3, #8]
8002b4c: 2b00 cmp r3, #0
8002b4e: f47f af76 bne.w 8002a3e <ETH_Prepare_Tx_Descriptors+0xf2>
}
if (ItMode != ((uint32_t)RESET))
8002b52: 687b ldr r3, [r7, #4]
8002b54: 2b00 cmp r3, #0
8002b56: d006 beq.n 8002b66 <ETH_Prepare_Tx_Descriptors+0x21a>
{
/* Set Interrupt on completion bit */
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_IC);
8002b58: 6a3b ldr r3, [r7, #32]
8002b5a: 681b ldr r3, [r3, #0]
8002b5c: f043 4280 orr.w r2, r3, #1073741824 ; 0x40000000
8002b60: 6a3b ldr r3, [r7, #32]
8002b62: 601a str r2, [r3, #0]
8002b64: e005 b.n 8002b72 <ETH_Prepare_Tx_Descriptors+0x226>
}
else
{
/* Clear Interrupt on completion bit */
CLEAR_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_IC);
8002b66: 6a3b ldr r3, [r7, #32]
8002b68: 681b ldr r3, [r3, #0]
8002b6a: f023 4280 bic.w r2, r3, #1073741824 ; 0x40000000
8002b6e: 6a3b ldr r3, [r7, #32]
8002b70: 601a str r2, [r3, #0]
}
/* Mark it as LAST descriptor */
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_LS);
8002b72: 6a3b ldr r3, [r7, #32]
8002b74: 681b ldr r3, [r3, #0]
8002b76: f043 5200 orr.w r2, r3, #536870912 ; 0x20000000
8002b7a: 6a3b ldr r3, [r7, #32]
8002b7c: 601a str r2, [r3, #0]
/* Save the current packet address to expose it to the application */
dmatxdesclist->PacketAddress[descidx] = dmatxdesclist->CurrentPacketAddress;
8002b7e: 697b ldr r3, [r7, #20]
8002b80: 6a5a ldr r2, [r3, #36] ; 0x24
8002b82: 6979 ldr r1, [r7, #20]
8002b84: 6afb ldr r3, [r7, #44] ; 0x2c
8002b86: 3304 adds r3, #4
8002b88: 009b lsls r3, r3, #2
8002b8a: 440b add r3, r1
8002b8c: 605a str r2, [r3, #4]
dmatxdesclist->CurTxDesc = descidx;
8002b8e: 697b ldr r3, [r7, #20]
8002b90: 6afa ldr r2, [r7, #44] ; 0x2c
8002b92: 611a str r2, [r3, #16]
__ASM volatile ("cpsid i" : : : "memory");
8002b94: b672 cpsid i
}
8002b96: bf00 nop
/* disable the interrupt */
__disable_irq();
dmatxdesclist->BuffersInUse += bd_count + 1U;
8002b98: 697b ldr r3, [r7, #20]
8002b9a: 6a9a ldr r2, [r3, #40] ; 0x28
8002b9c: 69bb ldr r3, [r7, #24]
8002b9e: 4413 add r3, r2
8002ba0: 1c5a adds r2, r3, #1
8002ba2: 697b ldr r3, [r7, #20]
8002ba4: 629a str r2, [r3, #40] ; 0x28
__ASM volatile ("cpsie i" : : : "memory");
8002ba6: b662 cpsie i
}
8002ba8: bf00 nop
/* Enable interrupts back */
__enable_irq();
/* Return function status */
return HAL_ETH_ERROR_NONE;
8002baa: 2300 movs r3, #0
}
8002bac: 4618 mov r0, r3
8002bae: 3734 adds r7, #52 ; 0x34
8002bb0: 46bd mov sp, r7
8002bb2: f85d 7b04 ldr.w r7, [sp], #4
8002bb6: 4770 bx lr
08002bb8 <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)
{
8002bb8: b480 push {r7}
8002bba: b089 sub sp, #36 ; 0x24
8002bbc: af00 add r7, sp, #0
8002bbe: 6078 str r0, [r7, #4]
8002bc0: 6039 str r1, [r7, #0]
uint32_t position;
uint32_t ioposition = 0x00U;
8002bc2: 2300 movs r3, #0
8002bc4: 617b str r3, [r7, #20]
uint32_t iocurrent = 0x00U;
8002bc6: 2300 movs r3, #0
8002bc8: 613b str r3, [r7, #16]
uint32_t temp = 0x00U;
8002bca: 2300 movs r3, #0
8002bcc: 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++)
8002bce: 2300 movs r3, #0
8002bd0: 61fb str r3, [r7, #28]
8002bd2: e177 b.n 8002ec4 <HAL_GPIO_Init+0x30c>
{
/* Get the IO position */
ioposition = 0x01U << position;
8002bd4: 2201 movs r2, #1
8002bd6: 69fb ldr r3, [r7, #28]
8002bd8: fa02 f303 lsl.w r3, r2, r3
8002bdc: 617b str r3, [r7, #20]
/* Get the current IO position */
iocurrent = (uint32_t)(GPIO_Init->Pin) & ioposition;
8002bde: 683b ldr r3, [r7, #0]
8002be0: 681b ldr r3, [r3, #0]
8002be2: 697a ldr r2, [r7, #20]
8002be4: 4013 ands r3, r2
8002be6: 613b str r3, [r7, #16]
if(iocurrent == ioposition)
8002be8: 693a ldr r2, [r7, #16]
8002bea: 697b ldr r3, [r7, #20]
8002bec: 429a cmp r2, r3
8002bee: f040 8166 bne.w 8002ebe <HAL_GPIO_Init+0x306>
{
/*--------------------- GPIO Mode Configuration ------------------------*/
/* In case of Output or Alternate function mode selection */
if(((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || \
8002bf2: 683b ldr r3, [r7, #0]
8002bf4: 685b ldr r3, [r3, #4]
8002bf6: f003 0303 and.w r3, r3, #3
8002bfa: 2b01 cmp r3, #1
8002bfc: d005 beq.n 8002c0a <HAL_GPIO_Init+0x52>
(GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
8002bfe: 683b ldr r3, [r7, #0]
8002c00: 685b ldr r3, [r3, #4]
8002c02: f003 0303 and.w r3, r3, #3
if(((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || \
8002c06: 2b02 cmp r3, #2
8002c08: d130 bne.n 8002c6c <HAL_GPIO_Init+0xb4>
{
/* Check the Speed parameter */
assert_param(IS_GPIO_SPEED(GPIO_Init->Speed));
/* Configure the IO Speed */
temp = GPIOx->OSPEEDR;
8002c0a: 687b ldr r3, [r7, #4]
8002c0c: 689b ldr r3, [r3, #8]
8002c0e: 61bb str r3, [r7, #24]
temp &= ~(GPIO_OSPEEDER_OSPEEDR0 << (position * 2U));
8002c10: 69fb ldr r3, [r7, #28]
8002c12: 005b lsls r3, r3, #1
8002c14: 2203 movs r2, #3
8002c16: fa02 f303 lsl.w r3, r2, r3
8002c1a: 43db mvns r3, r3
8002c1c: 69ba ldr r2, [r7, #24]
8002c1e: 4013 ands r3, r2
8002c20: 61bb str r3, [r7, #24]
temp |= (GPIO_Init->Speed << (position * 2U));
8002c22: 683b ldr r3, [r7, #0]
8002c24: 68da ldr r2, [r3, #12]
8002c26: 69fb ldr r3, [r7, #28]
8002c28: 005b lsls r3, r3, #1
8002c2a: fa02 f303 lsl.w r3, r2, r3
8002c2e: 69ba ldr r2, [r7, #24]
8002c30: 4313 orrs r3, r2
8002c32: 61bb str r3, [r7, #24]
GPIOx->OSPEEDR = temp;
8002c34: 687b ldr r3, [r7, #4]
8002c36: 69ba ldr r2, [r7, #24]
8002c38: 609a str r2, [r3, #8]
/* Configure the IO Output Type */
temp = GPIOx->OTYPER;
8002c3a: 687b ldr r3, [r7, #4]
8002c3c: 685b ldr r3, [r3, #4]
8002c3e: 61bb str r3, [r7, #24]
temp &= ~(GPIO_OTYPER_OT_0 << position) ;
8002c40: 2201 movs r2, #1
8002c42: 69fb ldr r3, [r7, #28]
8002c44: fa02 f303 lsl.w r3, r2, r3
8002c48: 43db mvns r3, r3
8002c4a: 69ba ldr r2, [r7, #24]
8002c4c: 4013 ands r3, r2
8002c4e: 61bb str r3, [r7, #24]
temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position);
8002c50: 683b ldr r3, [r7, #0]
8002c52: 685b ldr r3, [r3, #4]
8002c54: 091b lsrs r3, r3, #4
8002c56: f003 0201 and.w r2, r3, #1
8002c5a: 69fb ldr r3, [r7, #28]
8002c5c: fa02 f303 lsl.w r3, r2, r3
8002c60: 69ba ldr r2, [r7, #24]
8002c62: 4313 orrs r3, r2
8002c64: 61bb str r3, [r7, #24]
GPIOx->OTYPER = temp;
8002c66: 687b ldr r3, [r7, #4]
8002c68: 69ba ldr r2, [r7, #24]
8002c6a: 605a str r2, [r3, #4]
}
if((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG)
8002c6c: 683b ldr r3, [r7, #0]
8002c6e: 685b ldr r3, [r3, #4]
8002c70: f003 0303 and.w r3, r3, #3
8002c74: 2b03 cmp r3, #3
8002c76: d017 beq.n 8002ca8 <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;
8002c78: 687b ldr r3, [r7, #4]
8002c7a: 68db ldr r3, [r3, #12]
8002c7c: 61bb str r3, [r7, #24]
temp &= ~(GPIO_PUPDR_PUPDR0 << (position * 2U));
8002c7e: 69fb ldr r3, [r7, #28]
8002c80: 005b lsls r3, r3, #1
8002c82: 2203 movs r2, #3
8002c84: fa02 f303 lsl.w r3, r2, r3
8002c88: 43db mvns r3, r3
8002c8a: 69ba ldr r2, [r7, #24]
8002c8c: 4013 ands r3, r2
8002c8e: 61bb str r3, [r7, #24]
temp |= ((GPIO_Init->Pull) << (position * 2U));
8002c90: 683b ldr r3, [r7, #0]
8002c92: 689a ldr r2, [r3, #8]
8002c94: 69fb ldr r3, [r7, #28]
8002c96: 005b lsls r3, r3, #1
8002c98: fa02 f303 lsl.w r3, r2, r3
8002c9c: 69ba ldr r2, [r7, #24]
8002c9e: 4313 orrs r3, r2
8002ca0: 61bb str r3, [r7, #24]
GPIOx->PUPDR = temp;
8002ca2: 687b ldr r3, [r7, #4]
8002ca4: 69ba ldr r2, [r7, #24]
8002ca6: 60da str r2, [r3, #12]
}
/* In case of Alternate function mode selection */
if((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
8002ca8: 683b ldr r3, [r7, #0]
8002caa: 685b ldr r3, [r3, #4]
8002cac: f003 0303 and.w r3, r3, #3
8002cb0: 2b02 cmp r3, #2
8002cb2: d123 bne.n 8002cfc <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];
8002cb4: 69fb ldr r3, [r7, #28]
8002cb6: 08da lsrs r2, r3, #3
8002cb8: 687b ldr r3, [r7, #4]
8002cba: 3208 adds r2, #8
8002cbc: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8002cc0: 61bb str r3, [r7, #24]
temp &= ~(0xFU << ((uint32_t)(position & 0x07U) * 4U)) ;
8002cc2: 69fb ldr r3, [r7, #28]
8002cc4: f003 0307 and.w r3, r3, #7
8002cc8: 009b lsls r3, r3, #2
8002cca: 220f movs r2, #15
8002ccc: fa02 f303 lsl.w r3, r2, r3
8002cd0: 43db mvns r3, r3
8002cd2: 69ba ldr r2, [r7, #24]
8002cd4: 4013 ands r3, r2
8002cd6: 61bb str r3, [r7, #24]
temp |= ((uint32_t)(GPIO_Init->Alternate) << (((uint32_t)position & 0x07U) * 4U));
8002cd8: 683b ldr r3, [r7, #0]
8002cda: 691a ldr r2, [r3, #16]
8002cdc: 69fb ldr r3, [r7, #28]
8002cde: f003 0307 and.w r3, r3, #7
8002ce2: 009b lsls r3, r3, #2
8002ce4: fa02 f303 lsl.w r3, r2, r3
8002ce8: 69ba ldr r2, [r7, #24]
8002cea: 4313 orrs r3, r2
8002cec: 61bb str r3, [r7, #24]
GPIOx->AFR[position >> 3U] = temp;
8002cee: 69fb ldr r3, [r7, #28]
8002cf0: 08da lsrs r2, r3, #3
8002cf2: 687b ldr r3, [r7, #4]
8002cf4: 3208 adds r2, #8
8002cf6: 69b9 ldr r1, [r7, #24]
8002cf8: f843 1022 str.w r1, [r3, r2, lsl #2]
}
/* Configure IO Direction mode (Input, Output, Alternate or Analog) */
temp = GPIOx->MODER;
8002cfc: 687b ldr r3, [r7, #4]
8002cfe: 681b ldr r3, [r3, #0]
8002d00: 61bb str r3, [r7, #24]
temp &= ~(GPIO_MODER_MODER0 << (position * 2U));
8002d02: 69fb ldr r3, [r7, #28]
8002d04: 005b lsls r3, r3, #1
8002d06: 2203 movs r2, #3
8002d08: fa02 f303 lsl.w r3, r2, r3
8002d0c: 43db mvns r3, r3
8002d0e: 69ba ldr r2, [r7, #24]
8002d10: 4013 ands r3, r2
8002d12: 61bb str r3, [r7, #24]
temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2U));
8002d14: 683b ldr r3, [r7, #0]
8002d16: 685b ldr r3, [r3, #4]
8002d18: f003 0203 and.w r2, r3, #3
8002d1c: 69fb ldr r3, [r7, #28]
8002d1e: 005b lsls r3, r3, #1
8002d20: fa02 f303 lsl.w r3, r2, r3
8002d24: 69ba ldr r2, [r7, #24]
8002d26: 4313 orrs r3, r2
8002d28: 61bb str r3, [r7, #24]
GPIOx->MODER = temp;
8002d2a: 687b ldr r3, [r7, #4]
8002d2c: 69ba ldr r2, [r7, #24]
8002d2e: 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)
8002d30: 683b ldr r3, [r7, #0]
8002d32: 685b ldr r3, [r3, #4]
8002d34: f403 3340 and.w r3, r3, #196608 ; 0x30000
8002d38: 2b00 cmp r3, #0
8002d3a: f000 80c0 beq.w 8002ebe <HAL_GPIO_Init+0x306>
{
/* Enable SYSCFG Clock */
__HAL_RCC_SYSCFG_CLK_ENABLE();
8002d3e: 2300 movs r3, #0
8002d40: 60fb str r3, [r7, #12]
8002d42: 4b66 ldr r3, [pc, #408] ; (8002edc <HAL_GPIO_Init+0x324>)
8002d44: 6c5b ldr r3, [r3, #68] ; 0x44
8002d46: 4a65 ldr r2, [pc, #404] ; (8002edc <HAL_GPIO_Init+0x324>)
8002d48: f443 4380 orr.w r3, r3, #16384 ; 0x4000
8002d4c: 6453 str r3, [r2, #68] ; 0x44
8002d4e: 4b63 ldr r3, [pc, #396] ; (8002edc <HAL_GPIO_Init+0x324>)
8002d50: 6c5b ldr r3, [r3, #68] ; 0x44
8002d52: f403 4380 and.w r3, r3, #16384 ; 0x4000
8002d56: 60fb str r3, [r7, #12]
8002d58: 68fb ldr r3, [r7, #12]
temp = SYSCFG->EXTICR[position >> 2U];
8002d5a: 4a61 ldr r2, [pc, #388] ; (8002ee0 <HAL_GPIO_Init+0x328>)
8002d5c: 69fb ldr r3, [r7, #28]
8002d5e: 089b lsrs r3, r3, #2
8002d60: 3302 adds r3, #2
8002d62: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8002d66: 61bb str r3, [r7, #24]
temp &= ~(0x0FU << (4U * (position & 0x03U)));
8002d68: 69fb ldr r3, [r7, #28]
8002d6a: f003 0303 and.w r3, r3, #3
8002d6e: 009b lsls r3, r3, #2
8002d70: 220f movs r2, #15
8002d72: fa02 f303 lsl.w r3, r2, r3
8002d76: 43db mvns r3, r3
8002d78: 69ba ldr r2, [r7, #24]
8002d7a: 4013 ands r3, r2
8002d7c: 61bb str r3, [r7, #24]
temp |= ((uint32_t)(GPIO_GET_INDEX(GPIOx)) << (4U * (position & 0x03U)));
8002d7e: 687b ldr r3, [r7, #4]
8002d80: 4a58 ldr r2, [pc, #352] ; (8002ee4 <HAL_GPIO_Init+0x32c>)
8002d82: 4293 cmp r3, r2
8002d84: d037 beq.n 8002df6 <HAL_GPIO_Init+0x23e>
8002d86: 687b ldr r3, [r7, #4]
8002d88: 4a57 ldr r2, [pc, #348] ; (8002ee8 <HAL_GPIO_Init+0x330>)
8002d8a: 4293 cmp r3, r2
8002d8c: d031 beq.n 8002df2 <HAL_GPIO_Init+0x23a>
8002d8e: 687b ldr r3, [r7, #4]
8002d90: 4a56 ldr r2, [pc, #344] ; (8002eec <HAL_GPIO_Init+0x334>)
8002d92: 4293 cmp r3, r2
8002d94: d02b beq.n 8002dee <HAL_GPIO_Init+0x236>
8002d96: 687b ldr r3, [r7, #4]
8002d98: 4a55 ldr r2, [pc, #340] ; (8002ef0 <HAL_GPIO_Init+0x338>)
8002d9a: 4293 cmp r3, r2
8002d9c: d025 beq.n 8002dea <HAL_GPIO_Init+0x232>
8002d9e: 687b ldr r3, [r7, #4]
8002da0: 4a54 ldr r2, [pc, #336] ; (8002ef4 <HAL_GPIO_Init+0x33c>)
8002da2: 4293 cmp r3, r2
8002da4: d01f beq.n 8002de6 <HAL_GPIO_Init+0x22e>
8002da6: 687b ldr r3, [r7, #4]
8002da8: 4a53 ldr r2, [pc, #332] ; (8002ef8 <HAL_GPIO_Init+0x340>)
8002daa: 4293 cmp r3, r2
8002dac: d019 beq.n 8002de2 <HAL_GPIO_Init+0x22a>
8002dae: 687b ldr r3, [r7, #4]
8002db0: 4a52 ldr r2, [pc, #328] ; (8002efc <HAL_GPIO_Init+0x344>)
8002db2: 4293 cmp r3, r2
8002db4: d013 beq.n 8002dde <HAL_GPIO_Init+0x226>
8002db6: 687b ldr r3, [r7, #4]
8002db8: 4a51 ldr r2, [pc, #324] ; (8002f00 <HAL_GPIO_Init+0x348>)
8002dba: 4293 cmp r3, r2
8002dbc: d00d beq.n 8002dda <HAL_GPIO_Init+0x222>
8002dbe: 687b ldr r3, [r7, #4]
8002dc0: 4a50 ldr r2, [pc, #320] ; (8002f04 <HAL_GPIO_Init+0x34c>)
8002dc2: 4293 cmp r3, r2
8002dc4: d007 beq.n 8002dd6 <HAL_GPIO_Init+0x21e>
8002dc6: 687b ldr r3, [r7, #4]
8002dc8: 4a4f ldr r2, [pc, #316] ; (8002f08 <HAL_GPIO_Init+0x350>)
8002dca: 4293 cmp r3, r2
8002dcc: d101 bne.n 8002dd2 <HAL_GPIO_Init+0x21a>
8002dce: 2309 movs r3, #9
8002dd0: e012 b.n 8002df8 <HAL_GPIO_Init+0x240>
8002dd2: 230a movs r3, #10
8002dd4: e010 b.n 8002df8 <HAL_GPIO_Init+0x240>
8002dd6: 2308 movs r3, #8
8002dd8: e00e b.n 8002df8 <HAL_GPIO_Init+0x240>
8002dda: 2307 movs r3, #7
8002ddc: e00c b.n 8002df8 <HAL_GPIO_Init+0x240>
8002dde: 2306 movs r3, #6
8002de0: e00a b.n 8002df8 <HAL_GPIO_Init+0x240>
8002de2: 2305 movs r3, #5
8002de4: e008 b.n 8002df8 <HAL_GPIO_Init+0x240>
8002de6: 2304 movs r3, #4
8002de8: e006 b.n 8002df8 <HAL_GPIO_Init+0x240>
8002dea: 2303 movs r3, #3
8002dec: e004 b.n 8002df8 <HAL_GPIO_Init+0x240>
8002dee: 2302 movs r3, #2
8002df0: e002 b.n 8002df8 <HAL_GPIO_Init+0x240>
8002df2: 2301 movs r3, #1
8002df4: e000 b.n 8002df8 <HAL_GPIO_Init+0x240>
8002df6: 2300 movs r3, #0
8002df8: 69fa ldr r2, [r7, #28]
8002dfa: f002 0203 and.w r2, r2, #3
8002dfe: 0092 lsls r2, r2, #2
8002e00: 4093 lsls r3, r2
8002e02: 69ba ldr r2, [r7, #24]
8002e04: 4313 orrs r3, r2
8002e06: 61bb str r3, [r7, #24]
SYSCFG->EXTICR[position >> 2U] = temp;
8002e08: 4935 ldr r1, [pc, #212] ; (8002ee0 <HAL_GPIO_Init+0x328>)
8002e0a: 69fb ldr r3, [r7, #28]
8002e0c: 089b lsrs r3, r3, #2
8002e0e: 3302 adds r3, #2
8002e10: 69ba ldr r2, [r7, #24]
8002e12: f841 2023 str.w r2, [r1, r3, lsl #2]
/* Clear Rising Falling edge configuration */
temp = EXTI->RTSR;
8002e16: 4b3d ldr r3, [pc, #244] ; (8002f0c <HAL_GPIO_Init+0x354>)
8002e18: 689b ldr r3, [r3, #8]
8002e1a: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)iocurrent);
8002e1c: 693b ldr r3, [r7, #16]
8002e1e: 43db mvns r3, r3
8002e20: 69ba ldr r2, [r7, #24]
8002e22: 4013 ands r3, r2
8002e24: 61bb str r3, [r7, #24]
if((GPIO_Init->Mode & TRIGGER_RISING) != 0x00U)
8002e26: 683b ldr r3, [r7, #0]
8002e28: 685b ldr r3, [r3, #4]
8002e2a: f403 1380 and.w r3, r3, #1048576 ; 0x100000
8002e2e: 2b00 cmp r3, #0
8002e30: d003 beq.n 8002e3a <HAL_GPIO_Init+0x282>
{
temp |= iocurrent;
8002e32: 69ba ldr r2, [r7, #24]
8002e34: 693b ldr r3, [r7, #16]
8002e36: 4313 orrs r3, r2
8002e38: 61bb str r3, [r7, #24]
}
EXTI->RTSR = temp;
8002e3a: 4a34 ldr r2, [pc, #208] ; (8002f0c <HAL_GPIO_Init+0x354>)
8002e3c: 69bb ldr r3, [r7, #24]
8002e3e: 6093 str r3, [r2, #8]
temp = EXTI->FTSR;
8002e40: 4b32 ldr r3, [pc, #200] ; (8002f0c <HAL_GPIO_Init+0x354>)
8002e42: 68db ldr r3, [r3, #12]
8002e44: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)iocurrent);
8002e46: 693b ldr r3, [r7, #16]
8002e48: 43db mvns r3, r3
8002e4a: 69ba ldr r2, [r7, #24]
8002e4c: 4013 ands r3, r2
8002e4e: 61bb str r3, [r7, #24]
if((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00U)
8002e50: 683b ldr r3, [r7, #0]
8002e52: 685b ldr r3, [r3, #4]
8002e54: f403 1300 and.w r3, r3, #2097152 ; 0x200000
8002e58: 2b00 cmp r3, #0
8002e5a: d003 beq.n 8002e64 <HAL_GPIO_Init+0x2ac>
{
temp |= iocurrent;
8002e5c: 69ba ldr r2, [r7, #24]
8002e5e: 693b ldr r3, [r7, #16]
8002e60: 4313 orrs r3, r2
8002e62: 61bb str r3, [r7, #24]
}
EXTI->FTSR = temp;
8002e64: 4a29 ldr r2, [pc, #164] ; (8002f0c <HAL_GPIO_Init+0x354>)
8002e66: 69bb ldr r3, [r7, #24]
8002e68: 60d3 str r3, [r2, #12]
temp = EXTI->EMR;
8002e6a: 4b28 ldr r3, [pc, #160] ; (8002f0c <HAL_GPIO_Init+0x354>)
8002e6c: 685b ldr r3, [r3, #4]
8002e6e: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)iocurrent);
8002e70: 693b ldr r3, [r7, #16]
8002e72: 43db mvns r3, r3
8002e74: 69ba ldr r2, [r7, #24]
8002e76: 4013 ands r3, r2
8002e78: 61bb str r3, [r7, #24]
if((GPIO_Init->Mode & EXTI_EVT) != 0x00U)
8002e7a: 683b ldr r3, [r7, #0]
8002e7c: 685b ldr r3, [r3, #4]
8002e7e: f403 3300 and.w r3, r3, #131072 ; 0x20000
8002e82: 2b00 cmp r3, #0
8002e84: d003 beq.n 8002e8e <HAL_GPIO_Init+0x2d6>
{
temp |= iocurrent;
8002e86: 69ba ldr r2, [r7, #24]
8002e88: 693b ldr r3, [r7, #16]
8002e8a: 4313 orrs r3, r2
8002e8c: 61bb str r3, [r7, #24]
}
EXTI->EMR = temp;
8002e8e: 4a1f ldr r2, [pc, #124] ; (8002f0c <HAL_GPIO_Init+0x354>)
8002e90: 69bb ldr r3, [r7, #24]
8002e92: 6053 str r3, [r2, #4]
/* Clear EXTI line configuration */
temp = EXTI->IMR;
8002e94: 4b1d ldr r3, [pc, #116] ; (8002f0c <HAL_GPIO_Init+0x354>)
8002e96: 681b ldr r3, [r3, #0]
8002e98: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)iocurrent);
8002e9a: 693b ldr r3, [r7, #16]
8002e9c: 43db mvns r3, r3
8002e9e: 69ba ldr r2, [r7, #24]
8002ea0: 4013 ands r3, r2
8002ea2: 61bb str r3, [r7, #24]
if((GPIO_Init->Mode & EXTI_IT) != 0x00U)
8002ea4: 683b ldr r3, [r7, #0]
8002ea6: 685b ldr r3, [r3, #4]
8002ea8: f403 3380 and.w r3, r3, #65536 ; 0x10000
8002eac: 2b00 cmp r3, #0
8002eae: d003 beq.n 8002eb8 <HAL_GPIO_Init+0x300>
{
temp |= iocurrent;
8002eb0: 69ba ldr r2, [r7, #24]
8002eb2: 693b ldr r3, [r7, #16]
8002eb4: 4313 orrs r3, r2
8002eb6: 61bb str r3, [r7, #24]
}
EXTI->IMR = temp;
8002eb8: 4a14 ldr r2, [pc, #80] ; (8002f0c <HAL_GPIO_Init+0x354>)
8002eba: 69bb ldr r3, [r7, #24]
8002ebc: 6013 str r3, [r2, #0]
for(position = 0U; position < GPIO_NUMBER; position++)
8002ebe: 69fb ldr r3, [r7, #28]
8002ec0: 3301 adds r3, #1
8002ec2: 61fb str r3, [r7, #28]
8002ec4: 69fb ldr r3, [r7, #28]
8002ec6: 2b0f cmp r3, #15
8002ec8: f67f ae84 bls.w 8002bd4 <HAL_GPIO_Init+0x1c>
}
}
}
}
8002ecc: bf00 nop
8002ece: bf00 nop
8002ed0: 3724 adds r7, #36 ; 0x24
8002ed2: 46bd mov sp, r7
8002ed4: f85d 7b04 ldr.w r7, [sp], #4
8002ed8: 4770 bx lr
8002eda: bf00 nop
8002edc: 40023800 .word 0x40023800
8002ee0: 40013800 .word 0x40013800
8002ee4: 40020000 .word 0x40020000
8002ee8: 40020400 .word 0x40020400
8002eec: 40020800 .word 0x40020800
8002ef0: 40020c00 .word 0x40020c00
8002ef4: 40021000 .word 0x40021000
8002ef8: 40021400 .word 0x40021400
8002efc: 40021800 .word 0x40021800
8002f00: 40021c00 .word 0x40021c00
8002f04: 40022000 .word 0x40022000
8002f08: 40022400 .word 0x40022400
8002f0c: 40013c00 .word 0x40013c00
08002f10 <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)
{
8002f10: b480 push {r7}
8002f12: b083 sub sp, #12
8002f14: af00 add r7, sp, #0
8002f16: 6078 str r0, [r7, #4]
8002f18: 460b mov r3, r1
8002f1a: 807b strh r3, [r7, #2]
8002f1c: 4613 mov r3, r2
8002f1e: 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)
8002f20: 787b ldrb r3, [r7, #1]
8002f22: 2b00 cmp r3, #0
8002f24: d003 beq.n 8002f2e <HAL_GPIO_WritePin+0x1e>
{
GPIOx->BSRR = GPIO_Pin;
8002f26: 887a ldrh r2, [r7, #2]
8002f28: 687b ldr r3, [r7, #4]
8002f2a: 619a str r2, [r3, #24]
}
else
{
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16U;
}
}
8002f2c: e003 b.n 8002f36 <HAL_GPIO_WritePin+0x26>
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16U;
8002f2e: 887b ldrh r3, [r7, #2]
8002f30: 041a lsls r2, r3, #16
8002f32: 687b ldr r3, [r7, #4]
8002f34: 619a str r2, [r3, #24]
}
8002f36: bf00 nop
8002f38: 370c adds r7, #12
8002f3a: 46bd mov sp, r7
8002f3c: f85d 7b04 ldr.w r7, [sp], #4
8002f40: 4770 bx lr
...
08002f44 <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)
{
8002f44: b580 push {r7, lr}
8002f46: b086 sub sp, #24
8002f48: af00 add r7, sp, #0
8002f4a: 6078 str r0, [r7, #4]
uint32_t tickstart, pll_config;
/* Check Null pointer */
if(RCC_OscInitStruct == NULL)
8002f4c: 687b ldr r3, [r7, #4]
8002f4e: 2b00 cmp r3, #0
8002f50: d101 bne.n 8002f56 <HAL_RCC_OscConfig+0x12>
{
return HAL_ERROR;
8002f52: 2301 movs r3, #1
8002f54: e267 b.n 8003426 <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)
8002f56: 687b ldr r3, [r7, #4]
8002f58: 681b ldr r3, [r3, #0]
8002f5a: f003 0301 and.w r3, r3, #1
8002f5e: 2b00 cmp r3, #0
8002f60: d075 beq.n 800304e <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) ||\
8002f62: 4b88 ldr r3, [pc, #544] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8002f64: 689b ldr r3, [r3, #8]
8002f66: f003 030c and.w r3, r3, #12
8002f6a: 2b04 cmp r3, #4
8002f6c: d00c beq.n 8002f88 <HAL_RCC_OscConfig+0x44>
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
8002f6e: 4b85 ldr r3, [pc, #532] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8002f70: 689b ldr r3, [r3, #8]
8002f72: f003 030c and.w r3, r3, #12
if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE) ||\
8002f76: 2b08 cmp r3, #8
8002f78: d112 bne.n 8002fa0 <HAL_RCC_OscConfig+0x5c>
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
8002f7a: 4b82 ldr r3, [pc, #520] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8002f7c: 685b ldr r3, [r3, #4]
8002f7e: f403 0380 and.w r3, r3, #4194304 ; 0x400000
8002f82: f5b3 0f80 cmp.w r3, #4194304 ; 0x400000
8002f86: d10b bne.n 8002fa0 <HAL_RCC_OscConfig+0x5c>
{
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
8002f88: 4b7e ldr r3, [pc, #504] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8002f8a: 681b ldr r3, [r3, #0]
8002f8c: f403 3300 and.w r3, r3, #131072 ; 0x20000
8002f90: 2b00 cmp r3, #0
8002f92: d05b beq.n 800304c <HAL_RCC_OscConfig+0x108>
8002f94: 687b ldr r3, [r7, #4]
8002f96: 685b ldr r3, [r3, #4]
8002f98: 2b00 cmp r3, #0
8002f9a: d157 bne.n 800304c <HAL_RCC_OscConfig+0x108>
{
return HAL_ERROR;
8002f9c: 2301 movs r3, #1
8002f9e: e242 b.n 8003426 <HAL_RCC_OscConfig+0x4e2>
}
}
else
{
/* Set the new HSE configuration ---------------------------------------*/
__HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
8002fa0: 687b ldr r3, [r7, #4]
8002fa2: 685b ldr r3, [r3, #4]
8002fa4: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8002fa8: d106 bne.n 8002fb8 <HAL_RCC_OscConfig+0x74>
8002faa: 4b76 ldr r3, [pc, #472] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8002fac: 681b ldr r3, [r3, #0]
8002fae: 4a75 ldr r2, [pc, #468] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8002fb0: f443 3380 orr.w r3, r3, #65536 ; 0x10000
8002fb4: 6013 str r3, [r2, #0]
8002fb6: e01d b.n 8002ff4 <HAL_RCC_OscConfig+0xb0>
8002fb8: 687b ldr r3, [r7, #4]
8002fba: 685b ldr r3, [r3, #4]
8002fbc: f5b3 2fa0 cmp.w r3, #327680 ; 0x50000
8002fc0: d10c bne.n 8002fdc <HAL_RCC_OscConfig+0x98>
8002fc2: 4b70 ldr r3, [pc, #448] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8002fc4: 681b ldr r3, [r3, #0]
8002fc6: 4a6f ldr r2, [pc, #444] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8002fc8: f443 2380 orr.w r3, r3, #262144 ; 0x40000
8002fcc: 6013 str r3, [r2, #0]
8002fce: 4b6d ldr r3, [pc, #436] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8002fd0: 681b ldr r3, [r3, #0]
8002fd2: 4a6c ldr r2, [pc, #432] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8002fd4: f443 3380 orr.w r3, r3, #65536 ; 0x10000
8002fd8: 6013 str r3, [r2, #0]
8002fda: e00b b.n 8002ff4 <HAL_RCC_OscConfig+0xb0>
8002fdc: 4b69 ldr r3, [pc, #420] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8002fde: 681b ldr r3, [r3, #0]
8002fe0: 4a68 ldr r2, [pc, #416] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8002fe2: f423 3380 bic.w r3, r3, #65536 ; 0x10000
8002fe6: 6013 str r3, [r2, #0]
8002fe8: 4b66 ldr r3, [pc, #408] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8002fea: 681b ldr r3, [r3, #0]
8002fec: 4a65 ldr r2, [pc, #404] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8002fee: f423 2380 bic.w r3, r3, #262144 ; 0x40000
8002ff2: 6013 str r3, [r2, #0]
/* Check the HSE State */
if((RCC_OscInitStruct->HSEState) != RCC_HSE_OFF)
8002ff4: 687b ldr r3, [r7, #4]
8002ff6: 685b ldr r3, [r3, #4]
8002ff8: 2b00 cmp r3, #0
8002ffa: d013 beq.n 8003024 <HAL_RCC_OscConfig+0xe0>
{
/* Get Start Tick */
tickstart = HAL_GetTick();
8002ffc: f7fe fbd0 bl 80017a0 <HAL_GetTick>
8003000: 6138 str r0, [r7, #16]
/* Wait till HSE is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
8003002: e008 b.n 8003016 <HAL_RCC_OscConfig+0xd2>
{
if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
8003004: f7fe fbcc bl 80017a0 <HAL_GetTick>
8003008: 4602 mov r2, r0
800300a: 693b ldr r3, [r7, #16]
800300c: 1ad3 subs r3, r2, r3
800300e: 2b64 cmp r3, #100 ; 0x64
8003010: d901 bls.n 8003016 <HAL_RCC_OscConfig+0xd2>
{
return HAL_TIMEOUT;
8003012: 2303 movs r3, #3
8003014: e207 b.n 8003426 <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
8003016: 4b5b ldr r3, [pc, #364] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8003018: 681b ldr r3, [r3, #0]
800301a: f403 3300 and.w r3, r3, #131072 ; 0x20000
800301e: 2b00 cmp r3, #0
8003020: d0f0 beq.n 8003004 <HAL_RCC_OscConfig+0xc0>
8003022: e014 b.n 800304e <HAL_RCC_OscConfig+0x10a>
}
}
else
{
/* Get Start Tick */
tickstart = HAL_GetTick();
8003024: f7fe fbbc bl 80017a0 <HAL_GetTick>
8003028: 6138 str r0, [r7, #16]
/* Wait till HSE is bypassed or disabled */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
800302a: e008 b.n 800303e <HAL_RCC_OscConfig+0xfa>
{
if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
800302c: f7fe fbb8 bl 80017a0 <HAL_GetTick>
8003030: 4602 mov r2, r0
8003032: 693b ldr r3, [r7, #16]
8003034: 1ad3 subs r3, r2, r3
8003036: 2b64 cmp r3, #100 ; 0x64
8003038: d901 bls.n 800303e <HAL_RCC_OscConfig+0xfa>
{
return HAL_TIMEOUT;
800303a: 2303 movs r3, #3
800303c: e1f3 b.n 8003426 <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
800303e: 4b51 ldr r3, [pc, #324] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8003040: 681b ldr r3, [r3, #0]
8003042: f403 3300 and.w r3, r3, #131072 ; 0x20000
8003046: 2b00 cmp r3, #0
8003048: d1f0 bne.n 800302c <HAL_RCC_OscConfig+0xe8>
800304a: e000 b.n 800304e <HAL_RCC_OscConfig+0x10a>
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
800304c: bf00 nop
}
}
}
}
/*----------------------------- HSI Configuration --------------------------*/
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI)
800304e: 687b ldr r3, [r7, #4]
8003050: 681b ldr r3, [r3, #0]
8003052: f003 0302 and.w r3, r3, #2
8003056: 2b00 cmp r3, #0
8003058: d063 beq.n 8003122 <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) ||\
800305a: 4b4a ldr r3, [pc, #296] ; (8003184 <HAL_RCC_OscConfig+0x240>)
800305c: 689b ldr r3, [r3, #8]
800305e: f003 030c and.w r3, r3, #12
8003062: 2b00 cmp r3, #0
8003064: d00b beq.n 800307e <HAL_RCC_OscConfig+0x13a>
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
8003066: 4b47 ldr r3, [pc, #284] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8003068: 689b ldr r3, [r3, #8]
800306a: f003 030c and.w r3, r3, #12
if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI) ||\
800306e: 2b08 cmp r3, #8
8003070: d11c bne.n 80030ac <HAL_RCC_OscConfig+0x168>
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
8003072: 4b44 ldr r3, [pc, #272] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8003074: 685b ldr r3, [r3, #4]
8003076: f403 0380 and.w r3, r3, #4194304 ; 0x400000
800307a: 2b00 cmp r3, #0
800307c: d116 bne.n 80030ac <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))
800307e: 4b41 ldr r3, [pc, #260] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8003080: 681b ldr r3, [r3, #0]
8003082: f003 0302 and.w r3, r3, #2
8003086: 2b00 cmp r3, #0
8003088: d005 beq.n 8003096 <HAL_RCC_OscConfig+0x152>
800308a: 687b ldr r3, [r7, #4]
800308c: 68db ldr r3, [r3, #12]
800308e: 2b01 cmp r3, #1
8003090: d001 beq.n 8003096 <HAL_RCC_OscConfig+0x152>
{
return HAL_ERROR;
8003092: 2301 movs r3, #1
8003094: e1c7 b.n 8003426 <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);
8003096: 4b3b ldr r3, [pc, #236] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8003098: 681b ldr r3, [r3, #0]
800309a: f023 02f8 bic.w r2, r3, #248 ; 0xf8
800309e: 687b ldr r3, [r7, #4]
80030a0: 691b ldr r3, [r3, #16]
80030a2: 00db lsls r3, r3, #3
80030a4: 4937 ldr r1, [pc, #220] ; (8003184 <HAL_RCC_OscConfig+0x240>)
80030a6: 4313 orrs r3, r2
80030a8: 600b str r3, [r1, #0]
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
80030aa: e03a b.n 8003122 <HAL_RCC_OscConfig+0x1de>
}
}
else
{
/* Check the HSI State */
if((RCC_OscInitStruct->HSIState)!= RCC_HSI_OFF)
80030ac: 687b ldr r3, [r7, #4]
80030ae: 68db ldr r3, [r3, #12]
80030b0: 2b00 cmp r3, #0
80030b2: d020 beq.n 80030f6 <HAL_RCC_OscConfig+0x1b2>
{
/* Enable the Internal High Speed oscillator (HSI). */
__HAL_RCC_HSI_ENABLE();
80030b4: 4b34 ldr r3, [pc, #208] ; (8003188 <HAL_RCC_OscConfig+0x244>)
80030b6: 2201 movs r2, #1
80030b8: 601a str r2, [r3, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
80030ba: f7fe fb71 bl 80017a0 <HAL_GetTick>
80030be: 6138 str r0, [r7, #16]
/* Wait till HSI is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
80030c0: e008 b.n 80030d4 <HAL_RCC_OscConfig+0x190>
{
if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
80030c2: f7fe fb6d bl 80017a0 <HAL_GetTick>
80030c6: 4602 mov r2, r0
80030c8: 693b ldr r3, [r7, #16]
80030ca: 1ad3 subs r3, r2, r3
80030cc: 2b02 cmp r3, #2
80030ce: d901 bls.n 80030d4 <HAL_RCC_OscConfig+0x190>
{
return HAL_TIMEOUT;
80030d0: 2303 movs r3, #3
80030d2: e1a8 b.n 8003426 <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
80030d4: 4b2b ldr r3, [pc, #172] ; (8003184 <HAL_RCC_OscConfig+0x240>)
80030d6: 681b ldr r3, [r3, #0]
80030d8: f003 0302 and.w r3, r3, #2
80030dc: 2b00 cmp r3, #0
80030de: d0f0 beq.n 80030c2 <HAL_RCC_OscConfig+0x17e>
}
}
/* Adjusts the Internal High Speed oscillator (HSI) calibration value. */
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
80030e0: 4b28 ldr r3, [pc, #160] ; (8003184 <HAL_RCC_OscConfig+0x240>)
80030e2: 681b ldr r3, [r3, #0]
80030e4: f023 02f8 bic.w r2, r3, #248 ; 0xf8
80030e8: 687b ldr r3, [r7, #4]
80030ea: 691b ldr r3, [r3, #16]
80030ec: 00db lsls r3, r3, #3
80030ee: 4925 ldr r1, [pc, #148] ; (8003184 <HAL_RCC_OscConfig+0x240>)
80030f0: 4313 orrs r3, r2
80030f2: 600b str r3, [r1, #0]
80030f4: e015 b.n 8003122 <HAL_RCC_OscConfig+0x1de>
}
else
{
/* Disable the Internal High Speed oscillator (HSI). */
__HAL_RCC_HSI_DISABLE();
80030f6: 4b24 ldr r3, [pc, #144] ; (8003188 <HAL_RCC_OscConfig+0x244>)
80030f8: 2200 movs r2, #0
80030fa: 601a str r2, [r3, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
80030fc: f7fe fb50 bl 80017a0 <HAL_GetTick>
8003100: 6138 str r0, [r7, #16]
/* Wait till HSI is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
8003102: e008 b.n 8003116 <HAL_RCC_OscConfig+0x1d2>
{
if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
8003104: f7fe fb4c bl 80017a0 <HAL_GetTick>
8003108: 4602 mov r2, r0
800310a: 693b ldr r3, [r7, #16]
800310c: 1ad3 subs r3, r2, r3
800310e: 2b02 cmp r3, #2
8003110: d901 bls.n 8003116 <HAL_RCC_OscConfig+0x1d2>
{
return HAL_TIMEOUT;
8003112: 2303 movs r3, #3
8003114: e187 b.n 8003426 <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
8003116: 4b1b ldr r3, [pc, #108] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8003118: 681b ldr r3, [r3, #0]
800311a: f003 0302 and.w r3, r3, #2
800311e: 2b00 cmp r3, #0
8003120: d1f0 bne.n 8003104 <HAL_RCC_OscConfig+0x1c0>
}
}
}
}
/*------------------------------ LSI Configuration -------------------------*/
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI)
8003122: 687b ldr r3, [r7, #4]
8003124: 681b ldr r3, [r3, #0]
8003126: f003 0308 and.w r3, r3, #8
800312a: 2b00 cmp r3, #0
800312c: d036 beq.n 800319c <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)
800312e: 687b ldr r3, [r7, #4]
8003130: 695b ldr r3, [r3, #20]
8003132: 2b00 cmp r3, #0
8003134: d016 beq.n 8003164 <HAL_RCC_OscConfig+0x220>
{
/* Enable the Internal Low Speed oscillator (LSI). */
__HAL_RCC_LSI_ENABLE();
8003136: 4b15 ldr r3, [pc, #84] ; (800318c <HAL_RCC_OscConfig+0x248>)
8003138: 2201 movs r2, #1
800313a: 601a str r2, [r3, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
800313c: f7fe fb30 bl 80017a0 <HAL_GetTick>
8003140: 6138 str r0, [r7, #16]
/* Wait till LSI is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
8003142: e008 b.n 8003156 <HAL_RCC_OscConfig+0x212>
{
if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
8003144: f7fe fb2c bl 80017a0 <HAL_GetTick>
8003148: 4602 mov r2, r0
800314a: 693b ldr r3, [r7, #16]
800314c: 1ad3 subs r3, r2, r3
800314e: 2b02 cmp r3, #2
8003150: d901 bls.n 8003156 <HAL_RCC_OscConfig+0x212>
{
return HAL_TIMEOUT;
8003152: 2303 movs r3, #3
8003154: e167 b.n 8003426 <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
8003156: 4b0b ldr r3, [pc, #44] ; (8003184 <HAL_RCC_OscConfig+0x240>)
8003158: 6f5b ldr r3, [r3, #116] ; 0x74
800315a: f003 0302 and.w r3, r3, #2
800315e: 2b00 cmp r3, #0
8003160: d0f0 beq.n 8003144 <HAL_RCC_OscConfig+0x200>
8003162: e01b b.n 800319c <HAL_RCC_OscConfig+0x258>
}
}
else
{
/* Disable the Internal Low Speed oscillator (LSI). */
__HAL_RCC_LSI_DISABLE();
8003164: 4b09 ldr r3, [pc, #36] ; (800318c <HAL_RCC_OscConfig+0x248>)
8003166: 2200 movs r2, #0
8003168: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
800316a: f7fe fb19 bl 80017a0 <HAL_GetTick>
800316e: 6138 str r0, [r7, #16]
/* Wait till LSI is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
8003170: e00e b.n 8003190 <HAL_RCC_OscConfig+0x24c>
{
if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
8003172: f7fe fb15 bl 80017a0 <HAL_GetTick>
8003176: 4602 mov r2, r0
8003178: 693b ldr r3, [r7, #16]
800317a: 1ad3 subs r3, r2, r3
800317c: 2b02 cmp r3, #2
800317e: d907 bls.n 8003190 <HAL_RCC_OscConfig+0x24c>
{
return HAL_TIMEOUT;
8003180: 2303 movs r3, #3
8003182: e150 b.n 8003426 <HAL_RCC_OscConfig+0x4e2>
8003184: 40023800 .word 0x40023800
8003188: 42470000 .word 0x42470000
800318c: 42470e80 .word 0x42470e80
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
8003190: 4b88 ldr r3, [pc, #544] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
8003192: 6f5b ldr r3, [r3, #116] ; 0x74
8003194: f003 0302 and.w r3, r3, #2
8003198: 2b00 cmp r3, #0
800319a: d1ea bne.n 8003172 <HAL_RCC_OscConfig+0x22e>
}
}
}
}
/*------------------------------ LSE Configuration -------------------------*/
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE)
800319c: 687b ldr r3, [r7, #4]
800319e: 681b ldr r3, [r3, #0]
80031a0: f003 0304 and.w r3, r3, #4
80031a4: 2b00 cmp r3, #0
80031a6: f000 8097 beq.w 80032d8 <HAL_RCC_OscConfig+0x394>
{
FlagStatus pwrclkchanged = RESET;
80031aa: 2300 movs r3, #0
80031ac: 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())
80031ae: 4b81 ldr r3, [pc, #516] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
80031b0: 6c1b ldr r3, [r3, #64] ; 0x40
80031b2: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
80031b6: 2b00 cmp r3, #0
80031b8: d10f bne.n 80031da <HAL_RCC_OscConfig+0x296>
{
__HAL_RCC_PWR_CLK_ENABLE();
80031ba: 2300 movs r3, #0
80031bc: 60bb str r3, [r7, #8]
80031be: 4b7d ldr r3, [pc, #500] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
80031c0: 6c1b ldr r3, [r3, #64] ; 0x40
80031c2: 4a7c ldr r2, [pc, #496] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
80031c4: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
80031c8: 6413 str r3, [r2, #64] ; 0x40
80031ca: 4b7a ldr r3, [pc, #488] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
80031cc: 6c1b ldr r3, [r3, #64] ; 0x40
80031ce: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
80031d2: 60bb str r3, [r7, #8]
80031d4: 68bb ldr r3, [r7, #8]
pwrclkchanged = SET;
80031d6: 2301 movs r3, #1
80031d8: 75fb strb r3, [r7, #23]
}
if(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
80031da: 4b77 ldr r3, [pc, #476] ; (80033b8 <HAL_RCC_OscConfig+0x474>)
80031dc: 681b ldr r3, [r3, #0]
80031de: f403 7380 and.w r3, r3, #256 ; 0x100
80031e2: 2b00 cmp r3, #0
80031e4: d118 bne.n 8003218 <HAL_RCC_OscConfig+0x2d4>
{
/* Enable write access to Backup domain */
SET_BIT(PWR->CR, PWR_CR_DBP);
80031e6: 4b74 ldr r3, [pc, #464] ; (80033b8 <HAL_RCC_OscConfig+0x474>)
80031e8: 681b ldr r3, [r3, #0]
80031ea: 4a73 ldr r2, [pc, #460] ; (80033b8 <HAL_RCC_OscConfig+0x474>)
80031ec: f443 7380 orr.w r3, r3, #256 ; 0x100
80031f0: 6013 str r3, [r2, #0]
/* Wait for Backup domain Write protection disable */
tickstart = HAL_GetTick();
80031f2: f7fe fad5 bl 80017a0 <HAL_GetTick>
80031f6: 6138 str r0, [r7, #16]
while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
80031f8: e008 b.n 800320c <HAL_RCC_OscConfig+0x2c8>
{
if((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
80031fa: f7fe fad1 bl 80017a0 <HAL_GetTick>
80031fe: 4602 mov r2, r0
8003200: 693b ldr r3, [r7, #16]
8003202: 1ad3 subs r3, r2, r3
8003204: 2b02 cmp r3, #2
8003206: d901 bls.n 800320c <HAL_RCC_OscConfig+0x2c8>
{
return HAL_TIMEOUT;
8003208: 2303 movs r3, #3
800320a: e10c b.n 8003426 <HAL_RCC_OscConfig+0x4e2>
while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
800320c: 4b6a ldr r3, [pc, #424] ; (80033b8 <HAL_RCC_OscConfig+0x474>)
800320e: 681b ldr r3, [r3, #0]
8003210: f403 7380 and.w r3, r3, #256 ; 0x100
8003214: 2b00 cmp r3, #0
8003216: d0f0 beq.n 80031fa <HAL_RCC_OscConfig+0x2b6>
}
}
}
/* Set the new LSE configuration -----------------------------------------*/
__HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
8003218: 687b ldr r3, [r7, #4]
800321a: 689b ldr r3, [r3, #8]
800321c: 2b01 cmp r3, #1
800321e: d106 bne.n 800322e <HAL_RCC_OscConfig+0x2ea>
8003220: 4b64 ldr r3, [pc, #400] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
8003222: 6f1b ldr r3, [r3, #112] ; 0x70
8003224: 4a63 ldr r2, [pc, #396] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
8003226: f043 0301 orr.w r3, r3, #1
800322a: 6713 str r3, [r2, #112] ; 0x70
800322c: e01c b.n 8003268 <HAL_RCC_OscConfig+0x324>
800322e: 687b ldr r3, [r7, #4]
8003230: 689b ldr r3, [r3, #8]
8003232: 2b05 cmp r3, #5
8003234: d10c bne.n 8003250 <HAL_RCC_OscConfig+0x30c>
8003236: 4b5f ldr r3, [pc, #380] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
8003238: 6f1b ldr r3, [r3, #112] ; 0x70
800323a: 4a5e ldr r2, [pc, #376] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
800323c: f043 0304 orr.w r3, r3, #4
8003240: 6713 str r3, [r2, #112] ; 0x70
8003242: 4b5c ldr r3, [pc, #368] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
8003244: 6f1b ldr r3, [r3, #112] ; 0x70
8003246: 4a5b ldr r2, [pc, #364] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
8003248: f043 0301 orr.w r3, r3, #1
800324c: 6713 str r3, [r2, #112] ; 0x70
800324e: e00b b.n 8003268 <HAL_RCC_OscConfig+0x324>
8003250: 4b58 ldr r3, [pc, #352] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
8003252: 6f1b ldr r3, [r3, #112] ; 0x70
8003254: 4a57 ldr r2, [pc, #348] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
8003256: f023 0301 bic.w r3, r3, #1
800325a: 6713 str r3, [r2, #112] ; 0x70
800325c: 4b55 ldr r3, [pc, #340] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
800325e: 6f1b ldr r3, [r3, #112] ; 0x70
8003260: 4a54 ldr r2, [pc, #336] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
8003262: f023 0304 bic.w r3, r3, #4
8003266: 6713 str r3, [r2, #112] ; 0x70
/* Check the LSE State */
if((RCC_OscInitStruct->LSEState) != RCC_LSE_OFF)
8003268: 687b ldr r3, [r7, #4]
800326a: 689b ldr r3, [r3, #8]
800326c: 2b00 cmp r3, #0
800326e: d015 beq.n 800329c <HAL_RCC_OscConfig+0x358>
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
8003270: f7fe fa96 bl 80017a0 <HAL_GetTick>
8003274: 6138 str r0, [r7, #16]
/* Wait till LSE is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
8003276: e00a b.n 800328e <HAL_RCC_OscConfig+0x34a>
{
if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
8003278: f7fe fa92 bl 80017a0 <HAL_GetTick>
800327c: 4602 mov r2, r0
800327e: 693b ldr r3, [r7, #16]
8003280: 1ad3 subs r3, r2, r3
8003282: f241 3288 movw r2, #5000 ; 0x1388
8003286: 4293 cmp r3, r2
8003288: d901 bls.n 800328e <HAL_RCC_OscConfig+0x34a>
{
return HAL_TIMEOUT;
800328a: 2303 movs r3, #3
800328c: e0cb b.n 8003426 <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
800328e: 4b49 ldr r3, [pc, #292] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
8003290: 6f1b ldr r3, [r3, #112] ; 0x70
8003292: f003 0302 and.w r3, r3, #2
8003296: 2b00 cmp r3, #0
8003298: d0ee beq.n 8003278 <HAL_RCC_OscConfig+0x334>
800329a: e014 b.n 80032c6 <HAL_RCC_OscConfig+0x382>
}
}
else
{
/* Get Start Tick */
tickstart = HAL_GetTick();
800329c: f7fe fa80 bl 80017a0 <HAL_GetTick>
80032a0: 6138 str r0, [r7, #16]
/* Wait till LSE is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
80032a2: e00a b.n 80032ba <HAL_RCC_OscConfig+0x376>
{
if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
80032a4: f7fe fa7c bl 80017a0 <HAL_GetTick>
80032a8: 4602 mov r2, r0
80032aa: 693b ldr r3, [r7, #16]
80032ac: 1ad3 subs r3, r2, r3
80032ae: f241 3288 movw r2, #5000 ; 0x1388
80032b2: 4293 cmp r3, r2
80032b4: d901 bls.n 80032ba <HAL_RCC_OscConfig+0x376>
{
return HAL_TIMEOUT;
80032b6: 2303 movs r3, #3
80032b8: e0b5 b.n 8003426 <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
80032ba: 4b3e ldr r3, [pc, #248] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
80032bc: 6f1b ldr r3, [r3, #112] ; 0x70
80032be: f003 0302 and.w r3, r3, #2
80032c2: 2b00 cmp r3, #0
80032c4: d1ee bne.n 80032a4 <HAL_RCC_OscConfig+0x360>
}
}
}
/* Restore clock configuration if changed */
if(pwrclkchanged == SET)
80032c6: 7dfb ldrb r3, [r7, #23]
80032c8: 2b01 cmp r3, #1
80032ca: d105 bne.n 80032d8 <HAL_RCC_OscConfig+0x394>
{
__HAL_RCC_PWR_CLK_DISABLE();
80032cc: 4b39 ldr r3, [pc, #228] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
80032ce: 6c1b ldr r3, [r3, #64] ; 0x40
80032d0: 4a38 ldr r2, [pc, #224] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
80032d2: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000
80032d6: 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)
80032d8: 687b ldr r3, [r7, #4]
80032da: 699b ldr r3, [r3, #24]
80032dc: 2b00 cmp r3, #0
80032de: f000 80a1 beq.w 8003424 <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)
80032e2: 4b34 ldr r3, [pc, #208] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
80032e4: 689b ldr r3, [r3, #8]
80032e6: f003 030c and.w r3, r3, #12
80032ea: 2b08 cmp r3, #8
80032ec: d05c beq.n 80033a8 <HAL_RCC_OscConfig+0x464>
{
if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON)
80032ee: 687b ldr r3, [r7, #4]
80032f0: 699b ldr r3, [r3, #24]
80032f2: 2b02 cmp r3, #2
80032f4: d141 bne.n 800337a <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();
80032f6: 4b31 ldr r3, [pc, #196] ; (80033bc <HAL_RCC_OscConfig+0x478>)
80032f8: 2200 movs r2, #0
80032fa: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
80032fc: f7fe fa50 bl 80017a0 <HAL_GetTick>
8003300: 6138 str r0, [r7, #16]
/* Wait till PLL is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
8003302: e008 b.n 8003316 <HAL_RCC_OscConfig+0x3d2>
{
if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
8003304: f7fe fa4c bl 80017a0 <HAL_GetTick>
8003308: 4602 mov r2, r0
800330a: 693b ldr r3, [r7, #16]
800330c: 1ad3 subs r3, r2, r3
800330e: 2b02 cmp r3, #2
8003310: d901 bls.n 8003316 <HAL_RCC_OscConfig+0x3d2>
{
return HAL_TIMEOUT;
8003312: 2303 movs r3, #3
8003314: e087 b.n 8003426 <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
8003316: 4b27 ldr r3, [pc, #156] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
8003318: 681b ldr r3, [r3, #0]
800331a: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
800331e: 2b00 cmp r3, #0
8003320: d1f0 bne.n 8003304 <HAL_RCC_OscConfig+0x3c0>
}
}
/* Configure the main PLL clock source, multiplication and division factors. */
WRITE_REG(RCC->PLLCFGR, (RCC_OscInitStruct->PLL.PLLSource | \
8003322: 687b ldr r3, [r7, #4]
8003324: 69da ldr r2, [r3, #28]
8003326: 687b ldr r3, [r7, #4]
8003328: 6a1b ldr r3, [r3, #32]
800332a: 431a orrs r2, r3
800332c: 687b ldr r3, [r7, #4]
800332e: 6a5b ldr r3, [r3, #36] ; 0x24
8003330: 019b lsls r3, r3, #6
8003332: 431a orrs r2, r3
8003334: 687b ldr r3, [r7, #4]
8003336: 6a9b ldr r3, [r3, #40] ; 0x28
8003338: 085b lsrs r3, r3, #1
800333a: 3b01 subs r3, #1
800333c: 041b lsls r3, r3, #16
800333e: 431a orrs r2, r3
8003340: 687b ldr r3, [r7, #4]
8003342: 6adb ldr r3, [r3, #44] ; 0x2c
8003344: 061b lsls r3, r3, #24
8003346: 491b ldr r1, [pc, #108] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
8003348: 4313 orrs r3, r2
800334a: 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();
800334c: 4b1b ldr r3, [pc, #108] ; (80033bc <HAL_RCC_OscConfig+0x478>)
800334e: 2201 movs r2, #1
8003350: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8003352: f7fe fa25 bl 80017a0 <HAL_GetTick>
8003356: 6138 str r0, [r7, #16]
/* Wait till PLL is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
8003358: e008 b.n 800336c <HAL_RCC_OscConfig+0x428>
{
if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
800335a: f7fe fa21 bl 80017a0 <HAL_GetTick>
800335e: 4602 mov r2, r0
8003360: 693b ldr r3, [r7, #16]
8003362: 1ad3 subs r3, r2, r3
8003364: 2b02 cmp r3, #2
8003366: d901 bls.n 800336c <HAL_RCC_OscConfig+0x428>
{
return HAL_TIMEOUT;
8003368: 2303 movs r3, #3
800336a: e05c b.n 8003426 <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
800336c: 4b11 ldr r3, [pc, #68] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
800336e: 681b ldr r3, [r3, #0]
8003370: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
8003374: 2b00 cmp r3, #0
8003376: d0f0 beq.n 800335a <HAL_RCC_OscConfig+0x416>
8003378: e054 b.n 8003424 <HAL_RCC_OscConfig+0x4e0>
}
}
else
{
/* Disable the main PLL. */
__HAL_RCC_PLL_DISABLE();
800337a: 4b10 ldr r3, [pc, #64] ; (80033bc <HAL_RCC_OscConfig+0x478>)
800337c: 2200 movs r2, #0
800337e: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8003380: f7fe fa0e bl 80017a0 <HAL_GetTick>
8003384: 6138 str r0, [r7, #16]
/* Wait till PLL is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
8003386: e008 b.n 800339a <HAL_RCC_OscConfig+0x456>
{
if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
8003388: f7fe fa0a bl 80017a0 <HAL_GetTick>
800338c: 4602 mov r2, r0
800338e: 693b ldr r3, [r7, #16]
8003390: 1ad3 subs r3, r2, r3
8003392: 2b02 cmp r3, #2
8003394: d901 bls.n 800339a <HAL_RCC_OscConfig+0x456>
{
return HAL_TIMEOUT;
8003396: 2303 movs r3, #3
8003398: e045 b.n 8003426 <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
800339a: 4b06 ldr r3, [pc, #24] ; (80033b4 <HAL_RCC_OscConfig+0x470>)
800339c: 681b ldr r3, [r3, #0]
800339e: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
80033a2: 2b00 cmp r3, #0
80033a4: d1f0 bne.n 8003388 <HAL_RCC_OscConfig+0x444>
80033a6: e03d b.n 8003424 <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)
80033a8: 687b ldr r3, [r7, #4]
80033aa: 699b ldr r3, [r3, #24]
80033ac: 2b01 cmp r3, #1
80033ae: d107 bne.n 80033c0 <HAL_RCC_OscConfig+0x47c>
{
return HAL_ERROR;
80033b0: 2301 movs r3, #1
80033b2: e038 b.n 8003426 <HAL_RCC_OscConfig+0x4e2>
80033b4: 40023800 .word 0x40023800
80033b8: 40007000 .word 0x40007000
80033bc: 42470060 .word 0x42470060
}
else
{
/* Do not return HAL_ERROR if request repeats the current configuration */
pll_config = RCC->PLLCFGR;
80033c0: 4b1b ldr r3, [pc, #108] ; (8003430 <HAL_RCC_OscConfig+0x4ec>)
80033c2: 685b ldr r3, [r3, #4]
80033c4: 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) ||
80033c6: 687b ldr r3, [r7, #4]
80033c8: 699b ldr r3, [r3, #24]
80033ca: 2b01 cmp r3, #1
80033cc: d028 beq.n 8003420 <HAL_RCC_OscConfig+0x4dc>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
80033ce: 68fb ldr r3, [r7, #12]
80033d0: f403 0280 and.w r2, r3, #4194304 ; 0x400000
80033d4: 687b ldr r3, [r7, #4]
80033d6: 69db ldr r3, [r3, #28]
if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
80033d8: 429a cmp r2, r3
80033da: d121 bne.n 8003420 <HAL_RCC_OscConfig+0x4dc>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != (RCC_OscInitStruct->PLL.PLLM) << RCC_PLLCFGR_PLLM_Pos) ||
80033dc: 68fb ldr r3, [r7, #12]
80033de: f003 023f and.w r2, r3, #63 ; 0x3f
80033e2: 687b ldr r3, [r7, #4]
80033e4: 6a1b ldr r3, [r3, #32]
(READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
80033e6: 429a cmp r2, r3
80033e8: d11a bne.n 8003420 <HAL_RCC_OscConfig+0x4dc>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
80033ea: 68fa ldr r2, [r7, #12]
80033ec: f647 73c0 movw r3, #32704 ; 0x7fc0
80033f0: 4013 ands r3, r2
80033f2: 687a ldr r2, [r7, #4]
80033f4: 6a52 ldr r2, [r2, #36] ; 0x24
80033f6: 0192 lsls r2, r2, #6
(READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != (RCC_OscInitStruct->PLL.PLLM) << RCC_PLLCFGR_PLLM_Pos) ||
80033f8: 4293 cmp r3, r2
80033fa: d111 bne.n 8003420 <HAL_RCC_OscConfig+0x4dc>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
80033fc: 68fb ldr r3, [r7, #12]
80033fe: f403 3240 and.w r2, r3, #196608 ; 0x30000
8003402: 687b ldr r3, [r7, #4]
8003404: 6a9b ldr r3, [r3, #40] ; 0x28
8003406: 085b lsrs r3, r3, #1
8003408: 3b01 subs r3, #1
800340a: 041b lsls r3, r3, #16
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
800340c: 429a cmp r2, r3
800340e: d107 bne.n 8003420 <HAL_RCC_OscConfig+0x4dc>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)))
8003410: 68fb ldr r3, [r7, #12]
8003412: f003 6270 and.w r2, r3, #251658240 ; 0xf000000
8003416: 687b ldr r3, [r7, #4]
8003418: 6adb ldr r3, [r3, #44] ; 0x2c
800341a: 061b lsls r3, r3, #24
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
800341c: 429a cmp r2, r3
800341e: d001 beq.n 8003424 <HAL_RCC_OscConfig+0x4e0>
#endif
{
return HAL_ERROR;
8003420: 2301 movs r3, #1
8003422: e000 b.n 8003426 <HAL_RCC_OscConfig+0x4e2>
}
}
}
}
return HAL_OK;
8003424: 2300 movs r3, #0
}
8003426: 4618 mov r0, r3
8003428: 3718 adds r7, #24
800342a: 46bd mov sp, r7
800342c: bd80 pop {r7, pc}
800342e: bf00 nop
8003430: 40023800 .word 0x40023800
08003434 <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)
{
8003434: b580 push {r7, lr}
8003436: b084 sub sp, #16
8003438: af00 add r7, sp, #0
800343a: 6078 str r0, [r7, #4]
800343c: 6039 str r1, [r7, #0]
uint32_t tickstart;
/* Check Null pointer */
if(RCC_ClkInitStruct == NULL)
800343e: 687b ldr r3, [r7, #4]
8003440: 2b00 cmp r3, #0
8003442: d101 bne.n 8003448 <HAL_RCC_ClockConfig+0x14>
{
return HAL_ERROR;
8003444: 2301 movs r3, #1
8003446: e0cc b.n 80035e2 <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())
8003448: 4b68 ldr r3, [pc, #416] ; (80035ec <HAL_RCC_ClockConfig+0x1b8>)
800344a: 681b ldr r3, [r3, #0]
800344c: f003 030f and.w r3, r3, #15
8003450: 683a ldr r2, [r7, #0]
8003452: 429a cmp r2, r3
8003454: d90c bls.n 8003470 <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);
8003456: 4b65 ldr r3, [pc, #404] ; (80035ec <HAL_RCC_ClockConfig+0x1b8>)
8003458: 683a ldr r2, [r7, #0]
800345a: b2d2 uxtb r2, r2
800345c: 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)
800345e: 4b63 ldr r3, [pc, #396] ; (80035ec <HAL_RCC_ClockConfig+0x1b8>)
8003460: 681b ldr r3, [r3, #0]
8003462: f003 030f and.w r3, r3, #15
8003466: 683a ldr r2, [r7, #0]
8003468: 429a cmp r2, r3
800346a: d001 beq.n 8003470 <HAL_RCC_ClockConfig+0x3c>
{
return HAL_ERROR;
800346c: 2301 movs r3, #1
800346e: e0b8 b.n 80035e2 <HAL_RCC_ClockConfig+0x1ae>
}
}
/*-------------------------- HCLK Configuration --------------------------*/
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
8003470: 687b ldr r3, [r7, #4]
8003472: 681b ldr r3, [r3, #0]
8003474: f003 0302 and.w r3, r3, #2
8003478: 2b00 cmp r3, #0
800347a: d020 beq.n 80034be <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)
800347c: 687b ldr r3, [r7, #4]
800347e: 681b ldr r3, [r3, #0]
8003480: f003 0304 and.w r3, r3, #4
8003484: 2b00 cmp r3, #0
8003486: d005 beq.n 8003494 <HAL_RCC_ClockConfig+0x60>
{
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_HCLK_DIV16);
8003488: 4b59 ldr r3, [pc, #356] ; (80035f0 <HAL_RCC_ClockConfig+0x1bc>)
800348a: 689b ldr r3, [r3, #8]
800348c: 4a58 ldr r2, [pc, #352] ; (80035f0 <HAL_RCC_ClockConfig+0x1bc>)
800348e: f443 53e0 orr.w r3, r3, #7168 ; 0x1c00
8003492: 6093 str r3, [r2, #8]
}
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
8003494: 687b ldr r3, [r7, #4]
8003496: 681b ldr r3, [r3, #0]
8003498: f003 0308 and.w r3, r3, #8
800349c: 2b00 cmp r3, #0
800349e: d005 beq.n 80034ac <HAL_RCC_ClockConfig+0x78>
{
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, (RCC_HCLK_DIV16 << 3));
80034a0: 4b53 ldr r3, [pc, #332] ; (80035f0 <HAL_RCC_ClockConfig+0x1bc>)
80034a2: 689b ldr r3, [r3, #8]
80034a4: 4a52 ldr r2, [pc, #328] ; (80035f0 <HAL_RCC_ClockConfig+0x1bc>)
80034a6: f443 4360 orr.w r3, r3, #57344 ; 0xe000
80034aa: 6093 str r3, [r2, #8]
}
assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider);
80034ac: 4b50 ldr r3, [pc, #320] ; (80035f0 <HAL_RCC_ClockConfig+0x1bc>)
80034ae: 689b ldr r3, [r3, #8]
80034b0: f023 02f0 bic.w r2, r3, #240 ; 0xf0
80034b4: 687b ldr r3, [r7, #4]
80034b6: 689b ldr r3, [r3, #8]
80034b8: 494d ldr r1, [pc, #308] ; (80035f0 <HAL_RCC_ClockConfig+0x1bc>)
80034ba: 4313 orrs r3, r2
80034bc: 608b str r3, [r1, #8]
}
/*------------------------- SYSCLK Configuration ---------------------------*/
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK)
80034be: 687b ldr r3, [r7, #4]
80034c0: 681b ldr r3, [r3, #0]
80034c2: f003 0301 and.w r3, r3, #1
80034c6: 2b00 cmp r3, #0
80034c8: d044 beq.n 8003554 <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)
80034ca: 687b ldr r3, [r7, #4]
80034cc: 685b ldr r3, [r3, #4]
80034ce: 2b01 cmp r3, #1
80034d0: d107 bne.n 80034e2 <HAL_RCC_ClockConfig+0xae>
{
/* Check the HSE ready flag */
if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
80034d2: 4b47 ldr r3, [pc, #284] ; (80035f0 <HAL_RCC_ClockConfig+0x1bc>)
80034d4: 681b ldr r3, [r3, #0]
80034d6: f403 3300 and.w r3, r3, #131072 ; 0x20000
80034da: 2b00 cmp r3, #0
80034dc: d119 bne.n 8003512 <HAL_RCC_ClockConfig+0xde>
{
return HAL_ERROR;
80034de: 2301 movs r3, #1
80034e0: e07f b.n 80035e2 <HAL_RCC_ClockConfig+0x1ae>
}
}
/* PLL is selected as System Clock Source */
else if((RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) ||
80034e2: 687b ldr r3, [r7, #4]
80034e4: 685b ldr r3, [r3, #4]
80034e6: 2b02 cmp r3, #2
80034e8: d003 beq.n 80034f2 <HAL_RCC_ClockConfig+0xbe>
(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLRCLK))
80034ea: 687b ldr r3, [r7, #4]
80034ec: 685b ldr r3, [r3, #4]
else if((RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) ||
80034ee: 2b03 cmp r3, #3
80034f0: d107 bne.n 8003502 <HAL_RCC_ClockConfig+0xce>
{
/* Check the PLL ready flag */
if(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
80034f2: 4b3f ldr r3, [pc, #252] ; (80035f0 <HAL_RCC_ClockConfig+0x1bc>)
80034f4: 681b ldr r3, [r3, #0]
80034f6: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
80034fa: 2b00 cmp r3, #0
80034fc: d109 bne.n 8003512 <HAL_RCC_ClockConfig+0xde>
{
return HAL_ERROR;
80034fe: 2301 movs r3, #1
8003500: e06f b.n 80035e2 <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)
8003502: 4b3b ldr r3, [pc, #236] ; (80035f0 <HAL_RCC_ClockConfig+0x1bc>)
8003504: 681b ldr r3, [r3, #0]
8003506: f003 0302 and.w r3, r3, #2
800350a: 2b00 cmp r3, #0
800350c: d101 bne.n 8003512 <HAL_RCC_ClockConfig+0xde>
{
return HAL_ERROR;
800350e: 2301 movs r3, #1
8003510: e067 b.n 80035e2 <HAL_RCC_ClockConfig+0x1ae>
}
}
__HAL_RCC_SYSCLK_CONFIG(RCC_ClkInitStruct->SYSCLKSource);
8003512: 4b37 ldr r3, [pc, #220] ; (80035f0 <HAL_RCC_ClockConfig+0x1bc>)
8003514: 689b ldr r3, [r3, #8]
8003516: f023 0203 bic.w r2, r3, #3
800351a: 687b ldr r3, [r7, #4]
800351c: 685b ldr r3, [r3, #4]
800351e: 4934 ldr r1, [pc, #208] ; (80035f0 <HAL_RCC_ClockConfig+0x1bc>)
8003520: 4313 orrs r3, r2
8003522: 608b str r3, [r1, #8]
/* Get Start Tick */
tickstart = HAL_GetTick();
8003524: f7fe f93c bl 80017a0 <HAL_GetTick>
8003528: 60f8 str r0, [r7, #12]
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
800352a: e00a b.n 8003542 <HAL_RCC_ClockConfig+0x10e>
{
if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE)
800352c: f7fe f938 bl 80017a0 <HAL_GetTick>
8003530: 4602 mov r2, r0
8003532: 68fb ldr r3, [r7, #12]
8003534: 1ad3 subs r3, r2, r3
8003536: f241 3288 movw r2, #5000 ; 0x1388
800353a: 4293 cmp r3, r2
800353c: d901 bls.n 8003542 <HAL_RCC_ClockConfig+0x10e>
{
return HAL_TIMEOUT;
800353e: 2303 movs r3, #3
8003540: e04f b.n 80035e2 <HAL_RCC_ClockConfig+0x1ae>
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
8003542: 4b2b ldr r3, [pc, #172] ; (80035f0 <HAL_RCC_ClockConfig+0x1bc>)
8003544: 689b ldr r3, [r3, #8]
8003546: f003 020c and.w r2, r3, #12
800354a: 687b ldr r3, [r7, #4]
800354c: 685b ldr r3, [r3, #4]
800354e: 009b lsls r3, r3, #2
8003550: 429a cmp r2, r3
8003552: d1eb bne.n 800352c <HAL_RCC_ClockConfig+0xf8>
}
}
}
/* Decreasing the number of wait states because of lower CPU frequency */
if(FLatency < __HAL_FLASH_GET_LATENCY())
8003554: 4b25 ldr r3, [pc, #148] ; (80035ec <HAL_RCC_ClockConfig+0x1b8>)
8003556: 681b ldr r3, [r3, #0]
8003558: f003 030f and.w r3, r3, #15
800355c: 683a ldr r2, [r7, #0]
800355e: 429a cmp r2, r3
8003560: d20c bcs.n 800357c <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);
8003562: 4b22 ldr r3, [pc, #136] ; (80035ec <HAL_RCC_ClockConfig+0x1b8>)
8003564: 683a ldr r2, [r7, #0]
8003566: b2d2 uxtb r2, r2
8003568: 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)
800356a: 4b20 ldr r3, [pc, #128] ; (80035ec <HAL_RCC_ClockConfig+0x1b8>)
800356c: 681b ldr r3, [r3, #0]
800356e: f003 030f and.w r3, r3, #15
8003572: 683a ldr r2, [r7, #0]
8003574: 429a cmp r2, r3
8003576: d001 beq.n 800357c <HAL_RCC_ClockConfig+0x148>
{
return HAL_ERROR;
8003578: 2301 movs r3, #1
800357a: e032 b.n 80035e2 <HAL_RCC_ClockConfig+0x1ae>
}
}
/*-------------------------- PCLK1 Configuration ---------------------------*/
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
800357c: 687b ldr r3, [r7, #4]
800357e: 681b ldr r3, [r3, #0]
8003580: f003 0304 and.w r3, r3, #4
8003584: 2b00 cmp r3, #0
8003586: d008 beq.n 800359a <HAL_RCC_ClockConfig+0x166>
{
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_ClkInitStruct->APB1CLKDivider);
8003588: 4b19 ldr r3, [pc, #100] ; (80035f0 <HAL_RCC_ClockConfig+0x1bc>)
800358a: 689b ldr r3, [r3, #8]
800358c: f423 52e0 bic.w r2, r3, #7168 ; 0x1c00
8003590: 687b ldr r3, [r7, #4]
8003592: 68db ldr r3, [r3, #12]
8003594: 4916 ldr r1, [pc, #88] ; (80035f0 <HAL_RCC_ClockConfig+0x1bc>)
8003596: 4313 orrs r3, r2
8003598: 608b str r3, [r1, #8]
}
/*-------------------------- PCLK2 Configuration ---------------------------*/
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
800359a: 687b ldr r3, [r7, #4]
800359c: 681b ldr r3, [r3, #0]
800359e: f003 0308 and.w r3, r3, #8
80035a2: 2b00 cmp r3, #0
80035a4: d009 beq.n 80035ba <HAL_RCC_ClockConfig+0x186>
{
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB2CLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, ((RCC_ClkInitStruct->APB2CLKDivider) << 3U));
80035a6: 4b12 ldr r3, [pc, #72] ; (80035f0 <HAL_RCC_ClockConfig+0x1bc>)
80035a8: 689b ldr r3, [r3, #8]
80035aa: f423 4260 bic.w r2, r3, #57344 ; 0xe000
80035ae: 687b ldr r3, [r7, #4]
80035b0: 691b ldr r3, [r3, #16]
80035b2: 00db lsls r3, r3, #3
80035b4: 490e ldr r1, [pc, #56] ; (80035f0 <HAL_RCC_ClockConfig+0x1bc>)
80035b6: 4313 orrs r3, r2
80035b8: 608b str r3, [r1, #8]
}
/* Update the SystemCoreClock global variable */
SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE)>> RCC_CFGR_HPRE_Pos];
80035ba: f000 f821 bl 8003600 <HAL_RCC_GetSysClockFreq>
80035be: 4602 mov r2, r0
80035c0: 4b0b ldr r3, [pc, #44] ; (80035f0 <HAL_RCC_ClockConfig+0x1bc>)
80035c2: 689b ldr r3, [r3, #8]
80035c4: 091b lsrs r3, r3, #4
80035c6: f003 030f and.w r3, r3, #15
80035ca: 490a ldr r1, [pc, #40] ; (80035f4 <HAL_RCC_ClockConfig+0x1c0>)
80035cc: 5ccb ldrb r3, [r1, r3]
80035ce: fa22 f303 lsr.w r3, r2, r3
80035d2: 4a09 ldr r2, [pc, #36] ; (80035f8 <HAL_RCC_ClockConfig+0x1c4>)
80035d4: 6013 str r3, [r2, #0]
/* Configure the source of time base considering new system clocks settings */
HAL_InitTick (uwTickPrio);
80035d6: 4b09 ldr r3, [pc, #36] ; (80035fc <HAL_RCC_ClockConfig+0x1c8>)
80035d8: 681b ldr r3, [r3, #0]
80035da: 4618 mov r0, r3
80035dc: f7fe f89c bl 8001718 <HAL_InitTick>
return HAL_OK;
80035e0: 2300 movs r3, #0
}
80035e2: 4618 mov r0, r3
80035e4: 3710 adds r7, #16
80035e6: 46bd mov sp, r7
80035e8: bd80 pop {r7, pc}
80035ea: bf00 nop
80035ec: 40023c00 .word 0x40023c00
80035f0: 40023800 .word 0x40023800
80035f4: 08017ce0 .word 0x08017ce0
80035f8: 20000000 .word 0x20000000
80035fc: 20000004 .word 0x20000004
08003600 <HAL_RCC_GetSysClockFreq>:
*
*
* @retval SYSCLK frequency
*/
__weak uint32_t HAL_RCC_GetSysClockFreq(void)
{
8003600: e92d 4fb0 stmdb sp!, {r4, r5, r7, r8, r9, sl, fp, lr}
8003604: b090 sub sp, #64 ; 0x40
8003606: af00 add r7, sp, #0
uint32_t pllm = 0U, pllvco = 0U, pllp = 0U;
8003608: 2300 movs r3, #0
800360a: 637b str r3, [r7, #52] ; 0x34
800360c: 2300 movs r3, #0
800360e: 63fb str r3, [r7, #60] ; 0x3c
8003610: 2300 movs r3, #0
8003612: 633b str r3, [r7, #48] ; 0x30
uint32_t sysclockfreq = 0U;
8003614: 2300 movs r3, #0
8003616: 63bb str r3, [r7, #56] ; 0x38
/* Get SYSCLK source -------------------------------------------------------*/
switch (RCC->CFGR & RCC_CFGR_SWS)
8003618: 4b59 ldr r3, [pc, #356] ; (8003780 <HAL_RCC_GetSysClockFreq+0x180>)
800361a: 689b ldr r3, [r3, #8]
800361c: f003 030c and.w r3, r3, #12
8003620: 2b08 cmp r3, #8
8003622: d00d beq.n 8003640 <HAL_RCC_GetSysClockFreq+0x40>
8003624: 2b08 cmp r3, #8
8003626: f200 80a1 bhi.w 800376c <HAL_RCC_GetSysClockFreq+0x16c>
800362a: 2b00 cmp r3, #0
800362c: d002 beq.n 8003634 <HAL_RCC_GetSysClockFreq+0x34>
800362e: 2b04 cmp r3, #4
8003630: d003 beq.n 800363a <HAL_RCC_GetSysClockFreq+0x3a>
8003632: e09b b.n 800376c <HAL_RCC_GetSysClockFreq+0x16c>
{
case RCC_CFGR_SWS_HSI: /* HSI used as system clock source */
{
sysclockfreq = HSI_VALUE;
8003634: 4b53 ldr r3, [pc, #332] ; (8003784 <HAL_RCC_GetSysClockFreq+0x184>)
8003636: 63bb str r3, [r7, #56] ; 0x38
break;
8003638: e09b b.n 8003772 <HAL_RCC_GetSysClockFreq+0x172>
}
case RCC_CFGR_SWS_HSE: /* HSE used as system clock source */
{
sysclockfreq = HSE_VALUE;
800363a: 4b53 ldr r3, [pc, #332] ; (8003788 <HAL_RCC_GetSysClockFreq+0x188>)
800363c: 63bb str r3, [r7, #56] ; 0x38
break;
800363e: e098 b.n 8003772 <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;
8003640: 4b4f ldr r3, [pc, #316] ; (8003780 <HAL_RCC_GetSysClockFreq+0x180>)
8003642: 685b ldr r3, [r3, #4]
8003644: f003 033f and.w r3, r3, #63 ; 0x3f
8003648: 637b str r3, [r7, #52] ; 0x34
if(__HAL_RCC_GET_PLL_OSCSOURCE() != RCC_PLLSOURCE_HSI)
800364a: 4b4d ldr r3, [pc, #308] ; (8003780 <HAL_RCC_GetSysClockFreq+0x180>)
800364c: 685b ldr r3, [r3, #4]
800364e: f403 0380 and.w r3, r3, #4194304 ; 0x400000
8003652: 2b00 cmp r3, #0
8003654: d028 beq.n 80036a8 <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);
8003656: 4b4a ldr r3, [pc, #296] ; (8003780 <HAL_RCC_GetSysClockFreq+0x180>)
8003658: 685b ldr r3, [r3, #4]
800365a: 099b lsrs r3, r3, #6
800365c: 2200 movs r2, #0
800365e: 623b str r3, [r7, #32]
8003660: 627a str r2, [r7, #36] ; 0x24
8003662: 6a3b ldr r3, [r7, #32]
8003664: f3c3 0008 ubfx r0, r3, #0, #9
8003668: 2100 movs r1, #0
800366a: 4b47 ldr r3, [pc, #284] ; (8003788 <HAL_RCC_GetSysClockFreq+0x188>)
800366c: fb03 f201 mul.w r2, r3, r1
8003670: 2300 movs r3, #0
8003672: fb00 f303 mul.w r3, r0, r3
8003676: 4413 add r3, r2
8003678: 4a43 ldr r2, [pc, #268] ; (8003788 <HAL_RCC_GetSysClockFreq+0x188>)
800367a: fba0 1202 umull r1, r2, r0, r2
800367e: 62fa str r2, [r7, #44] ; 0x2c
8003680: 460a mov r2, r1
8003682: 62ba str r2, [r7, #40] ; 0x28
8003684: 6afa ldr r2, [r7, #44] ; 0x2c
8003686: 4413 add r3, r2
8003688: 62fb str r3, [r7, #44] ; 0x2c
800368a: 6b7b ldr r3, [r7, #52] ; 0x34
800368c: 2200 movs r2, #0
800368e: 61bb str r3, [r7, #24]
8003690: 61fa str r2, [r7, #28]
8003692: e9d7 2306 ldrd r2, r3, [r7, #24]
8003696: e9d7 010a ldrd r0, r1, [r7, #40] ; 0x28
800369a: f7fd fa95 bl 8000bc8 <__aeabi_uldivmod>
800369e: 4602 mov r2, r0
80036a0: 460b mov r3, r1
80036a2: 4613 mov r3, r2
80036a4: 63fb str r3, [r7, #60] ; 0x3c
80036a6: e053 b.n 8003750 <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);
80036a8: 4b35 ldr r3, [pc, #212] ; (8003780 <HAL_RCC_GetSysClockFreq+0x180>)
80036aa: 685b ldr r3, [r3, #4]
80036ac: 099b lsrs r3, r3, #6
80036ae: 2200 movs r2, #0
80036b0: 613b str r3, [r7, #16]
80036b2: 617a str r2, [r7, #20]
80036b4: 693b ldr r3, [r7, #16]
80036b6: f3c3 0a08 ubfx sl, r3, #0, #9
80036ba: f04f 0b00 mov.w fp, #0
80036be: 4652 mov r2, sl
80036c0: 465b mov r3, fp
80036c2: f04f 0000 mov.w r0, #0
80036c6: f04f 0100 mov.w r1, #0
80036ca: 0159 lsls r1, r3, #5
80036cc: ea41 61d2 orr.w r1, r1, r2, lsr #27
80036d0: 0150 lsls r0, r2, #5
80036d2: 4602 mov r2, r0
80036d4: 460b mov r3, r1
80036d6: ebb2 080a subs.w r8, r2, sl
80036da: eb63 090b sbc.w r9, r3, fp
80036de: f04f 0200 mov.w r2, #0
80036e2: f04f 0300 mov.w r3, #0
80036e6: ea4f 1389 mov.w r3, r9, lsl #6
80036ea: ea43 6398 orr.w r3, r3, r8, lsr #26
80036ee: ea4f 1288 mov.w r2, r8, lsl #6
80036f2: ebb2 0408 subs.w r4, r2, r8
80036f6: eb63 0509 sbc.w r5, r3, r9
80036fa: f04f 0200 mov.w r2, #0
80036fe: f04f 0300 mov.w r3, #0
8003702: 00eb lsls r3, r5, #3
8003704: ea43 7354 orr.w r3, r3, r4, lsr #29
8003708: 00e2 lsls r2, r4, #3
800370a: 4614 mov r4, r2
800370c: 461d mov r5, r3
800370e: eb14 030a adds.w r3, r4, sl
8003712: 603b str r3, [r7, #0]
8003714: eb45 030b adc.w r3, r5, fp
8003718: 607b str r3, [r7, #4]
800371a: f04f 0200 mov.w r2, #0
800371e: f04f 0300 mov.w r3, #0
8003722: e9d7 4500 ldrd r4, r5, [r7]
8003726: 4629 mov r1, r5
8003728: 028b lsls r3, r1, #10
800372a: 4621 mov r1, r4
800372c: ea43 5391 orr.w r3, r3, r1, lsr #22
8003730: 4621 mov r1, r4
8003732: 028a lsls r2, r1, #10
8003734: 4610 mov r0, r2
8003736: 4619 mov r1, r3
8003738: 6b7b ldr r3, [r7, #52] ; 0x34
800373a: 2200 movs r2, #0
800373c: 60bb str r3, [r7, #8]
800373e: 60fa str r2, [r7, #12]
8003740: e9d7 2302 ldrd r2, r3, [r7, #8]
8003744: f7fd fa40 bl 8000bc8 <__aeabi_uldivmod>
8003748: 4602 mov r2, r0
800374a: 460b mov r3, r1
800374c: 4613 mov r3, r2
800374e: 63fb str r3, [r7, #60] ; 0x3c
}
pllp = ((((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >> RCC_PLLCFGR_PLLP_Pos) + 1U) *2U);
8003750: 4b0b ldr r3, [pc, #44] ; (8003780 <HAL_RCC_GetSysClockFreq+0x180>)
8003752: 685b ldr r3, [r3, #4]
8003754: 0c1b lsrs r3, r3, #16
8003756: f003 0303 and.w r3, r3, #3
800375a: 3301 adds r3, #1
800375c: 005b lsls r3, r3, #1
800375e: 633b str r3, [r7, #48] ; 0x30
sysclockfreq = pllvco/pllp;
8003760: 6bfa ldr r2, [r7, #60] ; 0x3c
8003762: 6b3b ldr r3, [r7, #48] ; 0x30
8003764: fbb2 f3f3 udiv r3, r2, r3
8003768: 63bb str r3, [r7, #56] ; 0x38
break;
800376a: e002 b.n 8003772 <HAL_RCC_GetSysClockFreq+0x172>
}
default:
{
sysclockfreq = HSI_VALUE;
800376c: 4b05 ldr r3, [pc, #20] ; (8003784 <HAL_RCC_GetSysClockFreq+0x184>)
800376e: 63bb str r3, [r7, #56] ; 0x38
break;
8003770: bf00 nop
}
}
return sysclockfreq;
8003772: 6bbb ldr r3, [r7, #56] ; 0x38
}
8003774: 4618 mov r0, r3
8003776: 3740 adds r7, #64 ; 0x40
8003778: 46bd mov sp, r7
800377a: e8bd 8fb0 ldmia.w sp!, {r4, r5, r7, r8, r9, sl, fp, pc}
800377e: bf00 nop
8003780: 40023800 .word 0x40023800
8003784: 00f42400 .word 0x00f42400
8003788: 017d7840 .word 0x017d7840
0800378c <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)
{
800378c: b480 push {r7}
800378e: af00 add r7, sp, #0
return SystemCoreClock;
8003790: 4b03 ldr r3, [pc, #12] ; (80037a0 <HAL_RCC_GetHCLKFreq+0x14>)
8003792: 681b ldr r3, [r3, #0]
}
8003794: 4618 mov r0, r3
8003796: 46bd mov sp, r7
8003798: f85d 7b04 ldr.w r7, [sp], #4
800379c: 4770 bx lr
800379e: bf00 nop
80037a0: 20000000 .word 0x20000000
080037a4 <HAL_SRAM_Init>:
* @param ExtTiming Pointer to SRAM extended mode timing structure
* @retval HAL status
*/
HAL_StatusTypeDef HAL_SRAM_Init(SRAM_HandleTypeDef *hsram, FMC_NORSRAM_TimingTypeDef *Timing,
FMC_NORSRAM_TimingTypeDef *ExtTiming)
{
80037a4: b580 push {r7, lr}
80037a6: b084 sub sp, #16
80037a8: af00 add r7, sp, #0
80037aa: 60f8 str r0, [r7, #12]
80037ac: 60b9 str r1, [r7, #8]
80037ae: 607a str r2, [r7, #4]
/* Check the SRAM handle parameter */
if (hsram == NULL)
80037b0: 68fb ldr r3, [r7, #12]
80037b2: 2b00 cmp r3, #0
80037b4: d101 bne.n 80037ba <HAL_SRAM_Init+0x16>
{
return HAL_ERROR;
80037b6: 2301 movs r3, #1
80037b8: e038 b.n 800382c <HAL_SRAM_Init+0x88>
}
if (hsram->State == HAL_SRAM_STATE_RESET)
80037ba: 68fb ldr r3, [r7, #12]
80037bc: f893 3049 ldrb.w r3, [r3, #73] ; 0x49
80037c0: b2db uxtb r3, r3
80037c2: 2b00 cmp r3, #0
80037c4: d106 bne.n 80037d4 <HAL_SRAM_Init+0x30>
{
/* Allocate lock resource and initialize it */
hsram->Lock = HAL_UNLOCKED;
80037c6: 68fb ldr r3, [r7, #12]
80037c8: 2200 movs r2, #0
80037ca: f883 2048 strb.w r2, [r3, #72] ; 0x48
/* Init the low level hardware */
hsram->MspInitCallback(hsram);
#else
/* Initialize the low level hardware (MSP) */
HAL_SRAM_MspInit(hsram);
80037ce: 68f8 ldr r0, [r7, #12]
80037d0: f7fd fdb0 bl 8001334 <HAL_SRAM_MspInit>
#endif /* USE_HAL_SRAM_REGISTER_CALLBACKS */
}
/* Initialize SRAM control Interface */
(void)FMC_NORSRAM_Init(hsram->Instance, &(hsram->Init));
80037d4: 68fb ldr r3, [r7, #12]
80037d6: 681a ldr r2, [r3, #0]
80037d8: 68fb ldr r3, [r7, #12]
80037da: 3308 adds r3, #8
80037dc: 4619 mov r1, r3
80037de: 4610 mov r0, r2
80037e0: f000 f828 bl 8003834 <FMC_NORSRAM_Init>
/* Initialize SRAM timing Interface */
(void)FMC_NORSRAM_Timing_Init(hsram->Instance, Timing, hsram->Init.NSBank);
80037e4: 68fb ldr r3, [r7, #12]
80037e6: 6818 ldr r0, [r3, #0]
80037e8: 68fb ldr r3, [r7, #12]
80037ea: 689b ldr r3, [r3, #8]
80037ec: 461a mov r2, r3
80037ee: 68b9 ldr r1, [r7, #8]
80037f0: f000 f8a6 bl 8003940 <FMC_NORSRAM_Timing_Init>
/* Initialize SRAM extended mode timing Interface */
(void)FMC_NORSRAM_Extended_Timing_Init(hsram->Extended, ExtTiming, hsram->Init.NSBank,
80037f4: 68fb ldr r3, [r7, #12]
80037f6: 6858 ldr r0, [r3, #4]
80037f8: 68fb ldr r3, [r7, #12]
80037fa: 689a ldr r2, [r3, #8]
80037fc: 68fb ldr r3, [r7, #12]
80037fe: 6b1b ldr r3, [r3, #48] ; 0x30
8003800: 6879 ldr r1, [r7, #4]
8003802: f000 f8ed bl 80039e0 <FMC_NORSRAM_Extended_Timing_Init>
hsram->Init.ExtendedMode);
/* Enable the NORSRAM device */
__FMC_NORSRAM_ENABLE(hsram->Instance, hsram->Init.NSBank);
8003806: 68fb ldr r3, [r7, #12]
8003808: 681b ldr r3, [r3, #0]
800380a: 68fa ldr r2, [r7, #12]
800380c: 6892 ldr r2, [r2, #8]
800380e: f853 1022 ldr.w r1, [r3, r2, lsl #2]
8003812: 68fb ldr r3, [r7, #12]
8003814: 681b ldr r3, [r3, #0]
8003816: 68fa ldr r2, [r7, #12]
8003818: 6892 ldr r2, [r2, #8]
800381a: f041 0101 orr.w r1, r1, #1
800381e: f843 1022 str.w r1, [r3, r2, lsl #2]
/* Initialize the SRAM controller state */
hsram->State = HAL_SRAM_STATE_READY;
8003822: 68fb ldr r3, [r7, #12]
8003824: 2201 movs r2, #1
8003826: f883 2049 strb.w r2, [r3, #73] ; 0x49
return HAL_OK;
800382a: 2300 movs r3, #0
}
800382c: 4618 mov r0, r3
800382e: 3710 adds r7, #16
8003830: 46bd mov sp, r7
8003832: bd80 pop {r7, pc}
08003834 <FMC_NORSRAM_Init>:
* @param Init Pointer to NORSRAM Initialization structure
* @retval HAL status
*/
HAL_StatusTypeDef FMC_NORSRAM_Init(FMC_NORSRAM_TypeDef *Device,
FMC_NORSRAM_InitTypeDef *Init)
{
8003834: b480 push {r7}
8003836: b087 sub sp, #28
8003838: af00 add r7, sp, #0
800383a: 6078 str r0, [r7, #4]
800383c: 6039 str r1, [r7, #0]
assert_param(IS_FMC_WRITE_FIFO(Init->WriteFifo));
#endif /* FMC_BCR1_WFDIS */
assert_param(IS_FMC_PAGESIZE(Init->PageSize));
/* Disable NORSRAM Device */
__FMC_NORSRAM_DISABLE(Device, Init->NSBank);
800383e: 683b ldr r3, [r7, #0]
8003840: 681a ldr r2, [r3, #0]
8003842: 687b ldr r3, [r7, #4]
8003844: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8003848: 683a ldr r2, [r7, #0]
800384a: 6812 ldr r2, [r2, #0]
800384c: f023 0101 bic.w r1, r3, #1
8003850: 687b ldr r3, [r7, #4]
8003852: f843 1022 str.w r1, [r3, r2, lsl #2]
/* Set NORSRAM device control parameters */
if (Init->MemoryType == FMC_MEMORY_TYPE_NOR)
8003856: 683b ldr r3, [r7, #0]
8003858: 689b ldr r3, [r3, #8]
800385a: 2b08 cmp r3, #8
800385c: d102 bne.n 8003864 <FMC_NORSRAM_Init+0x30>
{
flashaccess = FMC_NORSRAM_FLASH_ACCESS_ENABLE;
800385e: 2340 movs r3, #64 ; 0x40
8003860: 617b str r3, [r7, #20]
8003862: e001 b.n 8003868 <FMC_NORSRAM_Init+0x34>
}
else
{
flashaccess = FMC_NORSRAM_FLASH_ACCESS_DISABLE;
8003864: 2300 movs r3, #0
8003866: 617b str r3, [r7, #20]
}
btcr_reg = (flashaccess | \
Init->DataAddressMux | \
8003868: 683b ldr r3, [r7, #0]
800386a: 685a ldr r2, [r3, #4]
btcr_reg = (flashaccess | \
800386c: 697b ldr r3, [r7, #20]
800386e: 431a orrs r2, r3
Init->MemoryType | \
8003870: 683b ldr r3, [r7, #0]
8003872: 689b ldr r3, [r3, #8]
Init->DataAddressMux | \
8003874: 431a orrs r2, r3
Init->MemoryDataWidth | \
8003876: 683b ldr r3, [r7, #0]
8003878: 68db ldr r3, [r3, #12]
Init->MemoryType | \
800387a: 431a orrs r2, r3
Init->BurstAccessMode | \
800387c: 683b ldr r3, [r7, #0]
800387e: 691b ldr r3, [r3, #16]
Init->MemoryDataWidth | \
8003880: 431a orrs r2, r3
Init->WaitSignalPolarity | \
8003882: 683b ldr r3, [r7, #0]
8003884: 695b ldr r3, [r3, #20]
Init->BurstAccessMode | \
8003886: 431a orrs r2, r3
Init->WaitSignalActive | \
8003888: 683b ldr r3, [r7, #0]
800388a: 69db ldr r3, [r3, #28]
Init->WaitSignalPolarity | \
800388c: 431a orrs r2, r3
Init->WriteOperation | \
800388e: 683b ldr r3, [r7, #0]
8003890: 6a1b ldr r3, [r3, #32]
Init->WaitSignalActive | \
8003892: 431a orrs r2, r3
Init->WaitSignal | \
8003894: 683b ldr r3, [r7, #0]
8003896: 6a5b ldr r3, [r3, #36] ; 0x24
Init->WriteOperation | \
8003898: 431a orrs r2, r3
Init->ExtendedMode | \
800389a: 683b ldr r3, [r7, #0]
800389c: 6a9b ldr r3, [r3, #40] ; 0x28
Init->WaitSignal | \
800389e: 431a orrs r2, r3
Init->AsynchronousWait | \
80038a0: 683b ldr r3, [r7, #0]
80038a2: 6adb ldr r3, [r3, #44] ; 0x2c
Init->ExtendedMode | \
80038a4: 431a orrs r2, r3
Init->WriteBurst);
80038a6: 683b ldr r3, [r7, #0]
80038a8: 6b1b ldr r3, [r3, #48] ; 0x30
btcr_reg = (flashaccess | \
80038aa: 4313 orrs r3, r2
80038ac: 613b str r3, [r7, #16]
#if defined(FMC_BCR1_WRAPMOD)
btcr_reg |= Init->WrapMode;
80038ae: 683b ldr r3, [r7, #0]
80038b0: 699b ldr r3, [r3, #24]
80038b2: 693a ldr r2, [r7, #16]
80038b4: 4313 orrs r3, r2
80038b6: 613b str r3, [r7, #16]
#endif /* FMC_BCR1_WRAPMOD */
#if defined(FMC_BCR1_CCLKEN)
btcr_reg |= Init->ContinuousClock;
80038b8: 683b ldr r3, [r7, #0]
80038ba: 6b5b ldr r3, [r3, #52] ; 0x34
80038bc: 693a ldr r2, [r7, #16]
80038be: 4313 orrs r3, r2
80038c0: 613b str r3, [r7, #16]
#endif /* FMC_BCR1_CCLKEN */
#if defined(FMC_BCR1_WFDIS)
btcr_reg |= Init->WriteFifo;
#endif /* FMC_BCR1_WFDIS */
btcr_reg |= Init->PageSize;
80038c2: 683b ldr r3, [r7, #0]
80038c4: 6bdb ldr r3, [r3, #60] ; 0x3c
80038c6: 693a ldr r2, [r7, #16]
80038c8: 4313 orrs r3, r2
80038ca: 613b str r3, [r7, #16]
mask = (FMC_BCR1_MBKEN |
80038cc: 4b1b ldr r3, [pc, #108] ; (800393c <FMC_NORSRAM_Init+0x108>)
80038ce: 60fb str r3, [r7, #12]
FMC_BCR1_EXTMOD |
FMC_BCR1_ASYNCWAIT |
FMC_BCR1_CBURSTRW);
#if defined(FMC_BCR1_WRAPMOD)
mask |= FMC_BCR1_WRAPMOD;
80038d0: 68fb ldr r3, [r7, #12]
80038d2: f443 6380 orr.w r3, r3, #1024 ; 0x400
80038d6: 60fb str r3, [r7, #12]
#endif /* FMC_BCR1_WRAPMOD */
#if defined(FMC_BCR1_CCLKEN)
mask |= FMC_BCR1_CCLKEN;
80038d8: 68fb ldr r3, [r7, #12]
80038da: f443 1380 orr.w r3, r3, #1048576 ; 0x100000
80038de: 60fb str r3, [r7, #12]
#endif
#if defined(FMC_BCR1_WFDIS)
mask |= FMC_BCR1_WFDIS;
#endif /* FMC_BCR1_WFDIS */
mask |= FMC_BCR1_CPSIZE;
80038e0: 68fb ldr r3, [r7, #12]
80038e2: f443 23e0 orr.w r3, r3, #458752 ; 0x70000
80038e6: 60fb str r3, [r7, #12]
MODIFY_REG(Device->BTCR[Init->NSBank], mask, btcr_reg);
80038e8: 683b ldr r3, [r7, #0]
80038ea: 681a ldr r2, [r3, #0]
80038ec: 687b ldr r3, [r7, #4]
80038ee: f853 2022 ldr.w r2, [r3, r2, lsl #2]
80038f2: 68fb ldr r3, [r7, #12]
80038f4: 43db mvns r3, r3
80038f6: ea02 0103 and.w r1, r2, r3
80038fa: 683b ldr r3, [r7, #0]
80038fc: 681a ldr r2, [r3, #0]
80038fe: 693b ldr r3, [r7, #16]
8003900: 4319 orrs r1, r3
8003902: 687b ldr r3, [r7, #4]
8003904: f843 1022 str.w r1, [r3, r2, lsl #2]
#if defined(FMC_BCR1_CCLKEN)
/* Configure synchronous mode when Continuous clock is enabled for bank2..4 */
if ((Init->ContinuousClock == FMC_CONTINUOUS_CLOCK_SYNC_ASYNC) && (Init->NSBank != FMC_NORSRAM_BANK1))
8003908: 683b ldr r3, [r7, #0]
800390a: 6b5b ldr r3, [r3, #52] ; 0x34
800390c: f5b3 1f80 cmp.w r3, #1048576 ; 0x100000
8003910: d10c bne.n 800392c <FMC_NORSRAM_Init+0xf8>
8003912: 683b ldr r3, [r7, #0]
8003914: 681b ldr r3, [r3, #0]
8003916: 2b00 cmp r3, #0
8003918: d008 beq.n 800392c <FMC_NORSRAM_Init+0xf8>
{
MODIFY_REG(Device->BTCR[FMC_NORSRAM_BANK1], FMC_BCR1_CCLKEN, Init->ContinuousClock);
800391a: 687b ldr r3, [r7, #4]
800391c: 681b ldr r3, [r3, #0]
800391e: f423 1280 bic.w r2, r3, #1048576 ; 0x100000
8003922: 683b ldr r3, [r7, #0]
8003924: 6b5b ldr r3, [r3, #52] ; 0x34
8003926: 431a orrs r2, r3
8003928: 687b ldr r3, [r7, #4]
800392a: 601a str r2, [r3, #0]
/* Configure Write FIFO mode when Write Fifo is enabled for bank2..4 */
SET_BIT(Device->BTCR[FMC_NORSRAM_BANK1], (uint32_t)(Init->WriteFifo));
}
#endif /* FMC_BCR1_WFDIS */
return HAL_OK;
800392c: 2300 movs r3, #0
}
800392e: 4618 mov r0, r3
8003930: 371c adds r7, #28
8003932: 46bd mov sp, r7
8003934: f85d 7b04 ldr.w r7, [sp], #4
8003938: 4770 bx lr
800393a: bf00 nop
800393c: 0008fb7f .word 0x0008fb7f
08003940 <FMC_NORSRAM_Timing_Init>:
* @param Bank NORSRAM bank number
* @retval HAL status
*/
HAL_StatusTypeDef FMC_NORSRAM_Timing_Init(FMC_NORSRAM_TypeDef *Device,
FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank)
{
8003940: b480 push {r7}
8003942: b087 sub sp, #28
8003944: af00 add r7, sp, #0
8003946: 60f8 str r0, [r7, #12]
8003948: 60b9 str r1, [r7, #8]
800394a: 607a str r2, [r7, #4]
assert_param(IS_FMC_DATA_LATENCY(Timing->DataLatency));
assert_param(IS_FMC_ACCESS_MODE(Timing->AccessMode));
assert_param(IS_FMC_NORSRAM_BANK(Bank));
/* Set FMC_NORSRAM device timing parameters */
MODIFY_REG(Device->BTCR[Bank + 1U], BTR_CLEAR_MASK, (Timing->AddressSetupTime |
800394c: 687b ldr r3, [r7, #4]
800394e: 1c5a adds r2, r3, #1
8003950: 68fb ldr r3, [r7, #12]
8003952: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8003956: f003 4140 and.w r1, r3, #3221225472 ; 0xc0000000
800395a: 68bb ldr r3, [r7, #8]
800395c: 681a ldr r2, [r3, #0]
800395e: 68bb ldr r3, [r7, #8]
8003960: 685b ldr r3, [r3, #4]
8003962: 011b lsls r3, r3, #4
8003964: 431a orrs r2, r3
8003966: 68bb ldr r3, [r7, #8]
8003968: 689b ldr r3, [r3, #8]
800396a: 021b lsls r3, r3, #8
800396c: 431a orrs r2, r3
800396e: 68bb ldr r3, [r7, #8]
8003970: 68db ldr r3, [r3, #12]
8003972: 041b lsls r3, r3, #16
8003974: 431a orrs r2, r3
8003976: 68bb ldr r3, [r7, #8]
8003978: 691b ldr r3, [r3, #16]
800397a: 3b01 subs r3, #1
800397c: 051b lsls r3, r3, #20
800397e: 431a orrs r2, r3
8003980: 68bb ldr r3, [r7, #8]
8003982: 695b ldr r3, [r3, #20]
8003984: 3b02 subs r3, #2
8003986: 061b lsls r3, r3, #24
8003988: 431a orrs r2, r3
800398a: 68bb ldr r3, [r7, #8]
800398c: 699b ldr r3, [r3, #24]
800398e: 4313 orrs r3, r2
8003990: 687a ldr r2, [r7, #4]
8003992: 3201 adds r2, #1
8003994: 4319 orrs r1, r3
8003996: 68fb ldr r3, [r7, #12]
8003998: f843 1022 str.w r1, [r3, r2, lsl #2]
(((Timing->DataLatency) - 2U) << FMC_BTR1_DATLAT_Pos) |
(Timing->AccessMode)));
#if defined(FMC_BCR1_CCLKEN)
/* Configure Clock division value (in NORSRAM bank 1) when continuous clock is enabled */
if (HAL_IS_BIT_SET(Device->BTCR[FMC_NORSRAM_BANK1], FMC_BCR1_CCLKEN))
800399c: 68fb ldr r3, [r7, #12]
800399e: 681b ldr r3, [r3, #0]
80039a0: f403 1380 and.w r3, r3, #1048576 ; 0x100000
80039a4: f5b3 1f80 cmp.w r3, #1048576 ; 0x100000
80039a8: d113 bne.n 80039d2 <FMC_NORSRAM_Timing_Init+0x92>
{
tmpr = (uint32_t)(Device->BTCR[FMC_NORSRAM_BANK1 + 1U] & ~((0x0FU) << FMC_BTR1_CLKDIV_Pos));
80039aa: 68fb ldr r3, [r7, #12]
80039ac: 685b ldr r3, [r3, #4]
80039ae: f423 0370 bic.w r3, r3, #15728640 ; 0xf00000
80039b2: 617b str r3, [r7, #20]
tmpr |= (uint32_t)(((Timing->CLKDivision) - 1U) << FMC_BTR1_CLKDIV_Pos);
80039b4: 68bb ldr r3, [r7, #8]
80039b6: 691b ldr r3, [r3, #16]
80039b8: 3b01 subs r3, #1
80039ba: 051b lsls r3, r3, #20
80039bc: 697a ldr r2, [r7, #20]
80039be: 4313 orrs r3, r2
80039c0: 617b str r3, [r7, #20]
MODIFY_REG(Device->BTCR[FMC_NORSRAM_BANK1 + 1U], FMC_BTR1_CLKDIV, tmpr);
80039c2: 68fb ldr r3, [r7, #12]
80039c4: 685b ldr r3, [r3, #4]
80039c6: f423 0270 bic.w r2, r3, #15728640 ; 0xf00000
80039ca: 697b ldr r3, [r7, #20]
80039cc: 431a orrs r2, r3
80039ce: 68fb ldr r3, [r7, #12]
80039d0: 605a str r2, [r3, #4]
}
#endif
return HAL_OK;
80039d2: 2300 movs r3, #0
}
80039d4: 4618 mov r0, r3
80039d6: 371c adds r7, #28
80039d8: 46bd mov sp, r7
80039da: f85d 7b04 ldr.w r7, [sp], #4
80039de: 4770 bx lr
080039e0 <FMC_NORSRAM_Extended_Timing_Init>:
* @retval HAL status
*/
HAL_StatusTypeDef FMC_NORSRAM_Extended_Timing_Init(FMC_NORSRAM_EXTENDED_TypeDef *Device,
FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank,
uint32_t ExtendedMode)
{
80039e0: b480 push {r7}
80039e2: b085 sub sp, #20
80039e4: af00 add r7, sp, #0
80039e6: 60f8 str r0, [r7, #12]
80039e8: 60b9 str r1, [r7, #8]
80039ea: 607a str r2, [r7, #4]
80039ec: 603b str r3, [r7, #0]
/* Check the parameters */
assert_param(IS_FMC_EXTENDED_MODE(ExtendedMode));
/* Set NORSRAM device timing register for write configuration, if extended mode is used */
if (ExtendedMode == FMC_EXTENDED_MODE_ENABLE)
80039ee: 683b ldr r3, [r7, #0]
80039f0: f5b3 4f80 cmp.w r3, #16384 ; 0x4000
80039f4: d11d bne.n 8003a32 <FMC_NORSRAM_Extended_Timing_Init+0x52>
assert_param(IS_FMC_TURNAROUND_TIME(Timing->BusTurnAroundDuration));
assert_param(IS_FMC_ACCESS_MODE(Timing->AccessMode));
assert_param(IS_FMC_NORSRAM_BANK(Bank));
/* Set NORSRAM device timing register for write configuration, if extended mode is used */
MODIFY_REG(Device->BWTR[Bank], BWTR_CLEAR_MASK, (Timing->AddressSetupTime |
80039f6: 68fb ldr r3, [r7, #12]
80039f8: 687a ldr r2, [r7, #4]
80039fa: f853 2022 ldr.w r2, [r3, r2, lsl #2]
80039fe: 4b13 ldr r3, [pc, #76] ; (8003a4c <FMC_NORSRAM_Extended_Timing_Init+0x6c>)
8003a00: 4013 ands r3, r2
8003a02: 68ba ldr r2, [r7, #8]
8003a04: 6811 ldr r1, [r2, #0]
8003a06: 68ba ldr r2, [r7, #8]
8003a08: 6852 ldr r2, [r2, #4]
8003a0a: 0112 lsls r2, r2, #4
8003a0c: 4311 orrs r1, r2
8003a0e: 68ba ldr r2, [r7, #8]
8003a10: 6892 ldr r2, [r2, #8]
8003a12: 0212 lsls r2, r2, #8
8003a14: 4311 orrs r1, r2
8003a16: 68ba ldr r2, [r7, #8]
8003a18: 6992 ldr r2, [r2, #24]
8003a1a: 4311 orrs r1, r2
8003a1c: 68ba ldr r2, [r7, #8]
8003a1e: 68d2 ldr r2, [r2, #12]
8003a20: 0412 lsls r2, r2, #16
8003a22: 430a orrs r2, r1
8003a24: ea43 0102 orr.w r1, r3, r2
8003a28: 68fb ldr r3, [r7, #12]
8003a2a: 687a ldr r2, [r7, #4]
8003a2c: f843 1022 str.w r1, [r3, r2, lsl #2]
8003a30: e005 b.n 8003a3e <FMC_NORSRAM_Extended_Timing_Init+0x5e>
Timing->AccessMode |
((Timing->BusTurnAroundDuration) << FMC_BWTR1_BUSTURN_Pos)));
}
else
{
Device->BWTR[Bank] = 0x0FFFFFFFU;
8003a32: 68fb ldr r3, [r7, #12]
8003a34: 687a ldr r2, [r7, #4]
8003a36: f06f 4170 mvn.w r1, #4026531840 ; 0xf0000000
8003a3a: f843 1022 str.w r1, [r3, r2, lsl #2]
}
return HAL_OK;
8003a3e: 2300 movs r3, #0
}
8003a40: 4618 mov r0, r3
8003a42: 3714 adds r7, #20
8003a44: 46bd mov sp, r7
8003a46: f85d 7b04 ldr.w r7, [sp], #4
8003a4a: 4770 bx lr
8003a4c: cff00000 .word 0xcff00000
08003a50 <MX_LWIP_Init>:
/**
* LwIP initialization function
*/
void MX_LWIP_Init(void)
{
8003a50: b580 push {r7, lr}
8003a52: b084 sub sp, #16
8003a54: af04 add r7, sp, #16
/* Initilialize the LwIP stack without RTOS */
lwip_init();
8003a56: f000 fc63 bl 8004320 <lwip_init>
/* IP addresses initialization with DHCP (IPv4) */
ipaddr.addr = ipaddr_addr("10.1.1.69");
8003a5a: 481d ldr r0, [pc, #116] ; (8003ad0 <MX_LWIP_Init+0x80>)
8003a5c: f00b fc01 bl 800f262 <ipaddr_addr>
8003a60: 4603 mov r3, r0
8003a62: 4a1c ldr r2, [pc, #112] ; (8003ad4 <MX_LWIP_Init+0x84>)
8003a64: 6013 str r3, [r2, #0]
netmask.addr = ipaddr_addr("255.255.255.0");
8003a66: 481c ldr r0, [pc, #112] ; (8003ad8 <MX_LWIP_Init+0x88>)
8003a68: f00b fbfb bl 800f262 <ipaddr_addr>
8003a6c: 4603 mov r3, r0
8003a6e: 4a1b ldr r2, [pc, #108] ; (8003adc <MX_LWIP_Init+0x8c>)
8003a70: 6013 str r3, [r2, #0]
gw.addr = ipaddr_addr("10.1.1.1");
8003a72: 481b ldr r0, [pc, #108] ; (8003ae0 <MX_LWIP_Init+0x90>)
8003a74: f00b fbf5 bl 800f262 <ipaddr_addr>
8003a78: 4603 mov r3, r0
8003a7a: 4a1a ldr r2, [pc, #104] ; (8003ae4 <MX_LWIP_Init+0x94>)
8003a7c: 6013 str r3, [r2, #0]
/* add the network interface (IPv4/IPv6) without RTOS */
netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, &ethernetif_init, &ethernet_input);
8003a7e: 4b1a ldr r3, [pc, #104] ; (8003ae8 <MX_LWIP_Init+0x98>)
8003a80: 9302 str r3, [sp, #8]
8003a82: 4b1a ldr r3, [pc, #104] ; (8003aec <MX_LWIP_Init+0x9c>)
8003a84: 9301 str r3, [sp, #4]
8003a86: 2300 movs r3, #0
8003a88: 9300 str r3, [sp, #0]
8003a8a: 4b16 ldr r3, [pc, #88] ; (8003ae4 <MX_LWIP_Init+0x94>)
8003a8c: 4a13 ldr r2, [pc, #76] ; (8003adc <MX_LWIP_Init+0x8c>)
8003a8e: 4911 ldr r1, [pc, #68] ; (8003ad4 <MX_LWIP_Init+0x84>)
8003a90: 4817 ldr r0, [pc, #92] ; (8003af0 <MX_LWIP_Init+0xa0>)
8003a92: f001 f931 bl 8004cf8 <netif_add>
/* Registers the default network interface */
netif_set_default(&gnetif);
8003a96: 4816 ldr r0, [pc, #88] ; (8003af0 <MX_LWIP_Init+0xa0>)
8003a98: f001 fae8 bl 800506c <netif_set_default>
if (netif_is_link_up(&gnetif))
8003a9c: 4b14 ldr r3, [pc, #80] ; (8003af0 <MX_LWIP_Init+0xa0>)
8003a9e: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8003aa2: 089b lsrs r3, r3, #2
8003aa4: f003 0301 and.w r3, r3, #1
8003aa8: b2db uxtb r3, r3
8003aaa: 2b00 cmp r3, #0
8003aac: d003 beq.n 8003ab6 <MX_LWIP_Init+0x66>
{
/* When the netif is fully configured this function must be called */
netif_set_up(&gnetif);
8003aae: 4810 ldr r0, [pc, #64] ; (8003af0 <MX_LWIP_Init+0xa0>)
8003ab0: f001 faec bl 800508c <netif_set_up>
8003ab4: e002 b.n 8003abc <MX_LWIP_Init+0x6c>
}
else
{
/* When the netif link is down this function must be called */
netif_set_down(&gnetif);
8003ab6: 480e ldr r0, [pc, #56] ; (8003af0 <MX_LWIP_Init+0xa0>)
8003ab8: f001 fb54 bl 8005164 <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);
8003abc: 490d ldr r1, [pc, #52] ; (8003af4 <MX_LWIP_Init+0xa4>)
8003abe: 480c ldr r0, [pc, #48] ; (8003af0 <MX_LWIP_Init+0xa0>)
8003ac0: f001 fbea bl 8005298 <netif_set_link_callback>
/* Create the Ethernet link handler thread */
/* Start DHCP negotiation for a network interface (IPv4) */
dhcp_start(&gnetif);
8003ac4: 480a ldr r0, [pc, #40] ; (8003af0 <MX_LWIP_Init+0xa0>)
8003ac6: f008 fce3 bl 800c490 <dhcp_start>
/* USER CODE BEGIN 3 */
/* USER CODE END 3 */
}
8003aca: bf00 nop
8003acc: 46bd mov sp, r7
8003ace: bd80 pop {r7, pc}
8003ad0: 08014ec8 .word 0x08014ec8
8003ad4: 20000a90 .word 0x20000a90
8003ad8: 08014ed4 .word 0x08014ed4
8003adc: 20000a94 .word 0x20000a94
8003ae0: 08014ee4 .word 0x08014ee4
8003ae4: 20000a98 .word 0x20000a98
8003ae8: 0801015d .word 0x0801015d
8003aec: 08003e05 .word 0x08003e05
8003af0: 20000a58 .word 0x20000a58
8003af4: 08003b49 .word 0x08003b49
08003af8 <Ethernet_Link_Periodic_Handle>:
* @brief Ethernet Link periodic check
* @param netif
* @retval None
*/
static void Ethernet_Link_Periodic_Handle(struct netif *netif)
{
8003af8: b580 push {r7, lr}
8003afa: b082 sub sp, #8
8003afc: af00 add r7, sp, #0
8003afe: 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)
8003b00: f7fd fe4e bl 80017a0 <HAL_GetTick>
8003b04: 4602 mov r2, r0
8003b06: 4b08 ldr r3, [pc, #32] ; (8003b28 <Ethernet_Link_Periodic_Handle+0x30>)
8003b08: 681b ldr r3, [r3, #0]
8003b0a: 1ad3 subs r3, r2, r3
8003b0c: 2b63 cmp r3, #99 ; 0x63
8003b0e: d907 bls.n 8003b20 <Ethernet_Link_Periodic_Handle+0x28>
{
EthernetLinkTimer = HAL_GetTick();
8003b10: f7fd fe46 bl 80017a0 <HAL_GetTick>
8003b14: 4603 mov r3, r0
8003b16: 4a04 ldr r2, [pc, #16] ; (8003b28 <Ethernet_Link_Periodic_Handle+0x30>)
8003b18: 6013 str r3, [r2, #0]
ethernet_link_check_state(netif);
8003b1a: 6878 ldr r0, [r7, #4]
8003b1c: f000 fad6 bl 80040cc <ethernet_link_check_state>
}
/* USER CODE BEGIN 4_4 */
/* USER CODE END 4_4 */
}
8003b20: bf00 nop
8003b22: 3708 adds r7, #8
8003b24: 46bd mov sp, r7
8003b26: bd80 pop {r7, pc}
8003b28: 20000a54 .word 0x20000a54
08003b2c <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)
{
8003b2c: b580 push {r7, lr}
8003b2e: af00 add r7, sp, #0
/* USER CODE BEGIN 4_1 */
/* USER CODE END 4_1 */
ethernetif_input(&gnetif);
8003b30: 4804 ldr r0, [pc, #16] ; (8003b44 <MX_LWIP_Process+0x18>)
8003b32: f000 f947 bl 8003dc4 <ethernetif_input>
/* USER CODE BEGIN 4_2 */
/* USER CODE END 4_2 */
/* Handle timeouts */
sys_check_timeouts();
8003b36: f007 fc31 bl 800b39c <sys_check_timeouts>
Ethernet_Link_Periodic_Handle(&gnetif);
8003b3a: 4802 ldr r0, [pc, #8] ; (8003b44 <MX_LWIP_Process+0x18>)
8003b3c: f7ff ffdc bl 8003af8 <Ethernet_Link_Periodic_Handle>
/* USER CODE BEGIN 4_3 */
/* USER CODE END 4_3 */
}
8003b40: bf00 nop
8003b42: bd80 pop {r7, pc}
8003b44: 20000a58 .word 0x20000a58
08003b48 <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)
{
8003b48: b480 push {r7}
8003b4a: b083 sub sp, #12
8003b4c: af00 add r7, sp, #0
8003b4e: 6078 str r0, [r7, #4]
else /* netif is down */
{
/* USER CODE BEGIN 6 */
/* USER CODE END 6 */
}
}
8003b50: bf00 nop
8003b52: 370c adds r7, #12
8003b54: 46bd mov sp, r7
8003b56: f85d 7b04 ldr.w r7, [sp], #4
8003b5a: 4770 bx lr
08003b5c <low_level_init>:
*
* @param netif the already initialized lwip network interface structure
* for this ethernetif
*/
static void low_level_init(struct netif *netif)
{
8003b5c: b580 push {r7, lr}
8003b5e: b084 sub sp, #16
8003b60: af00 add r7, sp, #0
8003b62: 6078 str r0, [r7, #4]
HAL_StatusTypeDef hal_eth_init_status = HAL_OK;
8003b64: 2300 movs r3, #0
8003b66: 73fb strb r3, [r7, #15]
/* Start ETH HAL Init */
uint8_t MACAddr[6] ;
heth.Instance = ETH;
8003b68: 4b40 ldr r3, [pc, #256] ; (8003c6c <low_level_init+0x110>)
8003b6a: 4a41 ldr r2, [pc, #260] ; (8003c70 <low_level_init+0x114>)
8003b6c: 601a str r2, [r3, #0]
MACAddr[0] = 0xFB;
8003b6e: 23fb movs r3, #251 ; 0xfb
8003b70: 723b strb r3, [r7, #8]
MACAddr[1] = 0x80;
8003b72: 2380 movs r3, #128 ; 0x80
8003b74: 727b strb r3, [r7, #9]
MACAddr[2] = 0xE1;
8003b76: 23e1 movs r3, #225 ; 0xe1
8003b78: 72bb strb r3, [r7, #10]
MACAddr[3] = 0x15;
8003b7a: 2315 movs r3, #21
8003b7c: 72fb strb r3, [r7, #11]
MACAddr[4] = 0x85;
8003b7e: 2385 movs r3, #133 ; 0x85
8003b80: 733b strb r3, [r7, #12]
MACAddr[5] = 0xA3;
8003b82: 23a3 movs r3, #163 ; 0xa3
8003b84: 737b strb r3, [r7, #13]
heth.Init.MACAddr = &MACAddr[0];
8003b86: 4a39 ldr r2, [pc, #228] ; (8003c6c <low_level_init+0x110>)
8003b88: f107 0308 add.w r3, r7, #8
8003b8c: 6053 str r3, [r2, #4]
heth.Init.MediaInterface = HAL_ETH_RMII_MODE;
8003b8e: 4b37 ldr r3, [pc, #220] ; (8003c6c <low_level_init+0x110>)
8003b90: f44f 0200 mov.w r2, #8388608 ; 0x800000
8003b94: 609a str r2, [r3, #8]
heth.Init.TxDesc = DMATxDscrTab;
8003b96: 4b35 ldr r3, [pc, #212] ; (8003c6c <low_level_init+0x110>)
8003b98: 4a36 ldr r2, [pc, #216] ; (8003c74 <low_level_init+0x118>)
8003b9a: 60da str r2, [r3, #12]
heth.Init.RxDesc = DMARxDscrTab;
8003b9c: 4b33 ldr r3, [pc, #204] ; (8003c6c <low_level_init+0x110>)
8003b9e: 4a36 ldr r2, [pc, #216] ; (8003c78 <low_level_init+0x11c>)
8003ba0: 611a str r2, [r3, #16]
heth.Init.RxBuffLen = 1536;
8003ba2: 4b32 ldr r3, [pc, #200] ; (8003c6c <low_level_init+0x110>)
8003ba4: f44f 62c0 mov.w r2, #1536 ; 0x600
8003ba8: 615a str r2, [r3, #20]
/* USER CODE BEGIN MACADDRESS */
/* USER CODE END MACADDRESS */
hal_eth_init_status = HAL_ETH_Init(&heth);
8003baa: 4830 ldr r0, [pc, #192] ; (8003c6c <low_level_init+0x110>)
8003bac: f7fd ff0e bl 80019cc <HAL_ETH_Init>
8003bb0: 4603 mov r3, r0
8003bb2: 73fb strb r3, [r7, #15]
memset(&TxConfig, 0 , sizeof(ETH_TxPacketConfig));
8003bb4: 2238 movs r2, #56 ; 0x38
8003bb6: 2100 movs r1, #0
8003bb8: 4830 ldr r0, [pc, #192] ; (8003c7c <low_level_init+0x120>)
8003bba: f00c fc01 bl 80103c0 <memset>
TxConfig.Attributes = ETH_TX_PACKETS_FEATURES_CSUM | ETH_TX_PACKETS_FEATURES_CRCPAD;
8003bbe: 4b2f ldr r3, [pc, #188] ; (8003c7c <low_level_init+0x120>)
8003bc0: 2221 movs r2, #33 ; 0x21
8003bc2: 601a str r2, [r3, #0]
TxConfig.ChecksumCtrl = ETH_CHECKSUM_IPHDR_PAYLOAD_INSERT_PHDR_CALC;
8003bc4: 4b2d ldr r3, [pc, #180] ; (8003c7c <low_level_init+0x120>)
8003bc6: f44f 0240 mov.w r2, #12582912 ; 0xc00000
8003bca: 615a str r2, [r3, #20]
TxConfig.CRCPadCtrl = ETH_CRC_PAD_INSERT;
8003bcc: 4b2b ldr r3, [pc, #172] ; (8003c7c <low_level_init+0x120>)
8003bce: 2200 movs r2, #0
8003bd0: 611a str r2, [r3, #16]
/* End ETH HAL Init */
/* Initialize the RX POOL */
LWIP_MEMPOOL_INIT(RX_POOL);
8003bd2: 482b ldr r0, [pc, #172] ; (8003c80 <low_level_init+0x124>)
8003bd4: f000 ff58 bl 8004a88 <memp_init_pool>
#if LWIP_ARP || LWIP_ETHERNET
/* set MAC hardware address length */
netif->hwaddr_len = ETH_HWADDR_LEN;
8003bd8: 687b ldr r3, [r7, #4]
8003bda: 2206 movs r2, #6
8003bdc: f883 2030 strb.w r2, [r3, #48] ; 0x30
/* set MAC hardware address */
netif->hwaddr[0] = heth.Init.MACAddr[0];
8003be0: 4b22 ldr r3, [pc, #136] ; (8003c6c <low_level_init+0x110>)
8003be2: 685b ldr r3, [r3, #4]
8003be4: 781a ldrb r2, [r3, #0]
8003be6: 687b ldr r3, [r7, #4]
8003be8: f883 202a strb.w r2, [r3, #42] ; 0x2a
netif->hwaddr[1] = heth.Init.MACAddr[1];
8003bec: 4b1f ldr r3, [pc, #124] ; (8003c6c <low_level_init+0x110>)
8003bee: 685b ldr r3, [r3, #4]
8003bf0: 785a ldrb r2, [r3, #1]
8003bf2: 687b ldr r3, [r7, #4]
8003bf4: f883 202b strb.w r2, [r3, #43] ; 0x2b
netif->hwaddr[2] = heth.Init.MACAddr[2];
8003bf8: 4b1c ldr r3, [pc, #112] ; (8003c6c <low_level_init+0x110>)
8003bfa: 685b ldr r3, [r3, #4]
8003bfc: 789a ldrb r2, [r3, #2]
8003bfe: 687b ldr r3, [r7, #4]
8003c00: f883 202c strb.w r2, [r3, #44] ; 0x2c
netif->hwaddr[3] = heth.Init.MACAddr[3];
8003c04: 4b19 ldr r3, [pc, #100] ; (8003c6c <low_level_init+0x110>)
8003c06: 685b ldr r3, [r3, #4]
8003c08: 78da ldrb r2, [r3, #3]
8003c0a: 687b ldr r3, [r7, #4]
8003c0c: f883 202d strb.w r2, [r3, #45] ; 0x2d
netif->hwaddr[4] = heth.Init.MACAddr[4];
8003c10: 4b16 ldr r3, [pc, #88] ; (8003c6c <low_level_init+0x110>)
8003c12: 685b ldr r3, [r3, #4]
8003c14: 791a ldrb r2, [r3, #4]
8003c16: 687b ldr r3, [r7, #4]
8003c18: f883 202e strb.w r2, [r3, #46] ; 0x2e
netif->hwaddr[5] = heth.Init.MACAddr[5];
8003c1c: 4b13 ldr r3, [pc, #76] ; (8003c6c <low_level_init+0x110>)
8003c1e: 685b ldr r3, [r3, #4]
8003c20: 795a ldrb r2, [r3, #5]
8003c22: 687b ldr r3, [r7, #4]
8003c24: f883 202f strb.w r2, [r3, #47] ; 0x2f
/* maximum transfer unit */
netif->mtu = ETH_MAX_PAYLOAD;
8003c28: 687b ldr r3, [r7, #4]
8003c2a: f240 52dc movw r2, #1500 ; 0x5dc
8003c2e: 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;
8003c30: 687b ldr r3, [r7, #4]
8003c32: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8003c36: f043 030a orr.w r3, r3, #10
8003c3a: b2da uxtb r2, r3
8003c3c: 687b ldr r3, [r7, #4]
8003c3e: 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);
8003c42: 4910 ldr r1, [pc, #64] ; (8003c84 <low_level_init+0x128>)
8003c44: 4810 ldr r0, [pc, #64] ; (8003c88 <low_level_init+0x12c>)
8003c46: f7fd fbe4 bl 8001412 <DP83848_RegisterBusIO>
/* Initialize the DP83848 ETH PHY */
DP83848_Init(&DP83848);
8003c4a: 480f ldr r0, [pc, #60] ; (8003c88 <low_level_init+0x12c>)
8003c4c: f7fd fc13 bl 8001476 <DP83848_Init>
if (hal_eth_init_status == HAL_OK)
8003c50: 7bfb ldrb r3, [r7, #15]
8003c52: 2b00 cmp r3, #0
8003c54: d103 bne.n 8003c5e <low_level_init+0x102>
{
/* Get link state */
ethernet_link_check_state(netif);
8003c56: 6878 ldr r0, [r7, #4]
8003c58: f000 fa38 bl 80040cc <ethernet_link_check_state>
#endif /* LWIP_ARP || LWIP_ETHERNET */
/* USER CODE BEGIN LOW_LEVEL_INIT */
/* USER CODE END LOW_LEVEL_INIT */
}
8003c5c: e001 b.n 8003c62 <low_level_init+0x106>
Error_Handler();
8003c5e: f7fd facc bl 80011fa <Error_Handler>
}
8003c62: bf00 nop
8003c64: 3710 adds r7, #16
8003c66: 46bd mov sp, r7
8003c68: bd80 pop {r7, pc}
8003c6a: bf00 nop
8003c6c: 20005568 .word 0x20005568
8003c70: 40028000 .word 0x40028000
8003c74: 200054c8 .word 0x200054c8
8003c78: 20005428 .word 0x20005428
8003c7c: 20005618 .word 0x20005618
8003c80: 08017cf0 .word 0x08017cf0
8003c84: 2000000c .word 0x2000000c
8003c88: 20005650 .word 0x20005650
08003c8c <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)
{
8003c8c: b580 push {r7, lr}
8003c8e: b092 sub sp, #72 ; 0x48
8003c90: af00 add r7, sp, #0
8003c92: 6078 str r0, [r7, #4]
8003c94: 6039 str r1, [r7, #0]
uint32_t i = 0U;
8003c96: 2300 movs r3, #0
8003c98: 647b str r3, [r7, #68] ; 0x44
struct pbuf *q = NULL;
8003c9a: 2300 movs r3, #0
8003c9c: 643b str r3, [r7, #64] ; 0x40
err_t errval = ERR_OK;
8003c9e: 2300 movs r3, #0
8003ca0: f887 303f strb.w r3, [r7, #63] ; 0x3f
ETH_BufferTypeDef Txbuffer[ETH_TX_DESC_CNT] = {0};
8003ca4: f107 030c add.w r3, r7, #12
8003ca8: 2230 movs r2, #48 ; 0x30
8003caa: 2100 movs r1, #0
8003cac: 4618 mov r0, r3
8003cae: f00c fb87 bl 80103c0 <memset>
memset(Txbuffer, 0 , ETH_TX_DESC_CNT*sizeof(ETH_BufferTypeDef));
8003cb2: f107 030c add.w r3, r7, #12
8003cb6: 2230 movs r2, #48 ; 0x30
8003cb8: 2100 movs r1, #0
8003cba: 4618 mov r0, r3
8003cbc: f00c fb80 bl 80103c0 <memset>
for(q = p; q != NULL; q = q->next)
8003cc0: 683b ldr r3, [r7, #0]
8003cc2: 643b str r3, [r7, #64] ; 0x40
8003cc4: e045 b.n 8003d52 <low_level_output+0xc6>
{
if(i >= ETH_TX_DESC_CNT)
8003cc6: 6c7b ldr r3, [r7, #68] ; 0x44
8003cc8: 2b03 cmp r3, #3
8003cca: d902 bls.n 8003cd2 <low_level_output+0x46>
return ERR_IF;
8003ccc: f06f 030b mvn.w r3, #11
8003cd0: e055 b.n 8003d7e <low_level_output+0xf2>
Txbuffer[i].buffer = q->payload;
8003cd2: 6c3b ldr r3, [r7, #64] ; 0x40
8003cd4: 6859 ldr r1, [r3, #4]
8003cd6: 6c7a ldr r2, [r7, #68] ; 0x44
8003cd8: 4613 mov r3, r2
8003cda: 005b lsls r3, r3, #1
8003cdc: 4413 add r3, r2
8003cde: 009b lsls r3, r3, #2
8003ce0: 3348 adds r3, #72 ; 0x48
8003ce2: 443b add r3, r7
8003ce4: 3b3c subs r3, #60 ; 0x3c
8003ce6: 6019 str r1, [r3, #0]
Txbuffer[i].len = q->len;
8003ce8: 6c3b ldr r3, [r7, #64] ; 0x40
8003cea: 895b ldrh r3, [r3, #10]
8003cec: 4619 mov r1, r3
8003cee: 6c7a ldr r2, [r7, #68] ; 0x44
8003cf0: 4613 mov r3, r2
8003cf2: 005b lsls r3, r3, #1
8003cf4: 4413 add r3, r2
8003cf6: 009b lsls r3, r3, #2
8003cf8: 3348 adds r3, #72 ; 0x48
8003cfa: 443b add r3, r7
8003cfc: 3b38 subs r3, #56 ; 0x38
8003cfe: 6019 str r1, [r3, #0]
if(i>0)
8003d00: 6c7b ldr r3, [r7, #68] ; 0x44
8003d02: 2b00 cmp r3, #0
8003d04: d011 beq.n 8003d2a <low_level_output+0x9e>
{
Txbuffer[i-1].next = &Txbuffer[i];
8003d06: 6c7b ldr r3, [r7, #68] ; 0x44
8003d08: 1e5a subs r2, r3, #1
8003d0a: f107 000c add.w r0, r7, #12
8003d0e: 6c79 ldr r1, [r7, #68] ; 0x44
8003d10: 460b mov r3, r1
8003d12: 005b lsls r3, r3, #1
8003d14: 440b add r3, r1
8003d16: 009b lsls r3, r3, #2
8003d18: 18c1 adds r1, r0, r3
8003d1a: 4613 mov r3, r2
8003d1c: 005b lsls r3, r3, #1
8003d1e: 4413 add r3, r2
8003d20: 009b lsls r3, r3, #2
8003d22: 3348 adds r3, #72 ; 0x48
8003d24: 443b add r3, r7
8003d26: 3b34 subs r3, #52 ; 0x34
8003d28: 6019 str r1, [r3, #0]
}
if(q->next == NULL)
8003d2a: 6c3b ldr r3, [r7, #64] ; 0x40
8003d2c: 681b ldr r3, [r3, #0]
8003d2e: 2b00 cmp r3, #0
8003d30: d109 bne.n 8003d46 <low_level_output+0xba>
{
Txbuffer[i].next = NULL;
8003d32: 6c7a ldr r2, [r7, #68] ; 0x44
8003d34: 4613 mov r3, r2
8003d36: 005b lsls r3, r3, #1
8003d38: 4413 add r3, r2
8003d3a: 009b lsls r3, r3, #2
8003d3c: 3348 adds r3, #72 ; 0x48
8003d3e: 443b add r3, r7
8003d40: 3b34 subs r3, #52 ; 0x34
8003d42: 2200 movs r2, #0
8003d44: 601a str r2, [r3, #0]
}
i++;
8003d46: 6c7b ldr r3, [r7, #68] ; 0x44
8003d48: 3301 adds r3, #1
8003d4a: 647b str r3, [r7, #68] ; 0x44
for(q = p; q != NULL; q = q->next)
8003d4c: 6c3b ldr r3, [r7, #64] ; 0x40
8003d4e: 681b ldr r3, [r3, #0]
8003d50: 643b str r3, [r7, #64] ; 0x40
8003d52: 6c3b ldr r3, [r7, #64] ; 0x40
8003d54: 2b00 cmp r3, #0
8003d56: d1b6 bne.n 8003cc6 <low_level_output+0x3a>
}
TxConfig.Length = p->tot_len;
8003d58: 683b ldr r3, [r7, #0]
8003d5a: 891b ldrh r3, [r3, #8]
8003d5c: 461a mov r2, r3
8003d5e: 4b0a ldr r3, [pc, #40] ; (8003d88 <low_level_output+0xfc>)
8003d60: 605a str r2, [r3, #4]
TxConfig.TxBuffer = Txbuffer;
8003d62: 4a09 ldr r2, [pc, #36] ; (8003d88 <low_level_output+0xfc>)
8003d64: f107 030c add.w r3, r7, #12
8003d68: 6093 str r3, [r2, #8]
TxConfig.pData = p;
8003d6a: 4a07 ldr r2, [pc, #28] ; (8003d88 <low_level_output+0xfc>)
8003d6c: 683b ldr r3, [r7, #0]
8003d6e: 6353 str r3, [r2, #52] ; 0x34
HAL_ETH_Transmit(&heth, &TxConfig, ETH_DMA_TRANSMIT_TIMEOUT);
8003d70: 2214 movs r2, #20
8003d72: 4905 ldr r1, [pc, #20] ; (8003d88 <low_level_output+0xfc>)
8003d74: 4805 ldr r0, [pc, #20] ; (8003d8c <low_level_output+0x100>)
8003d76: f7fd ff5f bl 8001c38 <HAL_ETH_Transmit>
return errval;
8003d7a: f997 303f ldrsb.w r3, [r7, #63] ; 0x3f
}
8003d7e: 4618 mov r0, r3
8003d80: 3748 adds r7, #72 ; 0x48
8003d82: 46bd mov sp, r7
8003d84: bd80 pop {r7, pc}
8003d86: bf00 nop
8003d88: 20005618 .word 0x20005618
8003d8c: 20005568 .word 0x20005568
08003d90 <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)
{
8003d90: b580 push {r7, lr}
8003d92: b084 sub sp, #16
8003d94: af00 add r7, sp, #0
8003d96: 6078 str r0, [r7, #4]
struct pbuf *p = NULL;
8003d98: 2300 movs r3, #0
8003d9a: 60fb str r3, [r7, #12]
if(RxAllocStatus == RX_ALLOC_OK)
8003d9c: 4b07 ldr r3, [pc, #28] ; (8003dbc <low_level_input+0x2c>)
8003d9e: 781b ldrb r3, [r3, #0]
8003da0: 2b00 cmp r3, #0
8003da2: d105 bne.n 8003db0 <low_level_input+0x20>
{
HAL_ETH_ReadData(&heth, (void **)&p);
8003da4: f107 030c add.w r3, r7, #12
8003da8: 4619 mov r1, r3
8003daa: 4805 ldr r0, [pc, #20] ; (8003dc0 <low_level_input+0x30>)
8003dac: f7fd ffd8 bl 8001d60 <HAL_ETH_ReadData>
}
return p;
8003db0: 68fb ldr r3, [r7, #12]
}
8003db2: 4618 mov r0, r3
8003db4: 3710 adds r7, #16
8003db6: 46bd mov sp, r7
8003db8: bd80 pop {r7, pc}
8003dba: bf00 nop
8003dbc: 20005424 .word 0x20005424
8003dc0: 20005568 .word 0x20005568
08003dc4 <ethernetif_input>:
* the appropriate input function is called.
*
* @param netif the lwip network interface structure for this ethernetif
*/
void ethernetif_input(struct netif *netif)
{
8003dc4: b580 push {r7, lr}
8003dc6: b084 sub sp, #16
8003dc8: af00 add r7, sp, #0
8003dca: 6078 str r0, [r7, #4]
struct pbuf *p = NULL;
8003dcc: 2300 movs r3, #0
8003dce: 60fb str r3, [r7, #12]
do
{
p = low_level_input( netif );
8003dd0: 6878 ldr r0, [r7, #4]
8003dd2: f7ff ffdd bl 8003d90 <low_level_input>
8003dd6: 60f8 str r0, [r7, #12]
if (p != NULL)
8003dd8: 68fb ldr r3, [r7, #12]
8003dda: 2b00 cmp r3, #0
8003ddc: d00a beq.n 8003df4 <ethernetif_input+0x30>
{
if (netif->input( p, netif) != ERR_OK )
8003dde: 687b ldr r3, [r7, #4]
8003de0: 691b ldr r3, [r3, #16]
8003de2: 6879 ldr r1, [r7, #4]
8003de4: 68f8 ldr r0, [r7, #12]
8003de6: 4798 blx r3
8003de8: 4603 mov r3, r0
8003dea: 2b00 cmp r3, #0
8003dec: d002 beq.n 8003df4 <ethernetif_input+0x30>
{
pbuf_free(p);
8003dee: 68f8 ldr r0, [r7, #12]
8003df0: f001 fdd2 bl 8005998 <pbuf_free>
}
}
} while(p!=NULL);
8003df4: 68fb ldr r3, [r7, #12]
8003df6: 2b00 cmp r3, #0
8003df8: d1ea bne.n 8003dd0 <ethernetif_input+0xc>
}
8003dfa: bf00 nop
8003dfc: bf00 nop
8003dfe: 3710 adds r7, #16
8003e00: 46bd mov sp, r7
8003e02: bd80 pop {r7, pc}
08003e04 <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)
{
8003e04: b580 push {r7, lr}
8003e06: b082 sub sp, #8
8003e08: af00 add r7, sp, #0
8003e0a: 6078 str r0, [r7, #4]
LWIP_ASSERT("netif != NULL", (netif != NULL));
8003e0c: 687b ldr r3, [r7, #4]
8003e0e: 2b00 cmp r3, #0
8003e10: d106 bne.n 8003e20 <ethernetif_init+0x1c>
8003e12: 4b0e ldr r3, [pc, #56] ; (8003e4c <ethernetif_init+0x48>)
8003e14: f240 126b movw r2, #363 ; 0x16b
8003e18: 490d ldr r1, [pc, #52] ; (8003e50 <ethernetif_init+0x4c>)
8003e1a: 480e ldr r0, [pc, #56] ; (8003e54 <ethernetif_init+0x50>)
8003e1c: f00c fad8 bl 80103d0 <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;
8003e20: 687b ldr r3, [r7, #4]
8003e22: 2273 movs r2, #115 ; 0x73
8003e24: f883 2032 strb.w r2, [r3, #50] ; 0x32
netif->name[1] = IFNAME1;
8003e28: 687b ldr r3, [r7, #4]
8003e2a: 2274 movs r2, #116 ; 0x74
8003e2c: 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;
8003e30: 687b ldr r3, [r7, #4]
8003e32: 4a09 ldr r2, [pc, #36] ; (8003e58 <ethernetif_init+0x54>)
8003e34: 615a str r2, [r3, #20]
#if LWIP_IPV6
netif->output_ip6 = ethip6_output;
#endif /* LWIP_IPV6 */
netif->linkoutput = low_level_output;
8003e36: 687b ldr r3, [r7, #4]
8003e38: 4a08 ldr r2, [pc, #32] ; (8003e5c <ethernetif_init+0x58>)
8003e3a: 619a str r2, [r3, #24]
/* initialize the hardware */
low_level_init(netif);
8003e3c: 6878 ldr r0, [r7, #4]
8003e3e: f7ff fe8d bl 8003b5c <low_level_init>
return ERR_OK;
8003e42: 2300 movs r3, #0
}
8003e44: 4618 mov r0, r3
8003e46: 3708 adds r7, #8
8003e48: 46bd mov sp, r7
8003e4a: bd80 pop {r7, pc}
8003e4c: 08014ef0 .word 0x08014ef0
8003e50: 08014f0c .word 0x08014f0c
8003e54: 08014f1c .word 0x08014f1c
8003e58: 0800e35d .word 0x0800e35d
8003e5c: 08003c8d .word 0x08003c8d
08003e60 <pbuf_free_custom>:
* @brief Custom Rx pbuf free callback
* @param pbuf: pbuf to be freed
* @retval None
*/
void pbuf_free_custom(struct pbuf *p)
{
8003e60: b580 push {r7, lr}
8003e62: b084 sub sp, #16
8003e64: af00 add r7, sp, #0
8003e66: 6078 str r0, [r7, #4]
struct pbuf_custom* custom_pbuf = (struct pbuf_custom*)p;
8003e68: 687b ldr r3, [r7, #4]
8003e6a: 60fb str r3, [r7, #12]
LWIP_MEMPOOL_FREE(RX_POOL, custom_pbuf);
8003e6c: 68f9 ldr r1, [r7, #12]
8003e6e: 4807 ldr r0, [pc, #28] ; (8003e8c <pbuf_free_custom+0x2c>)
8003e70: f000 feec bl 8004c4c <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)
8003e74: 4b06 ldr r3, [pc, #24] ; (8003e90 <pbuf_free_custom+0x30>)
8003e76: 781b ldrb r3, [r3, #0]
8003e78: 2b01 cmp r3, #1
8003e7a: d102 bne.n 8003e82 <pbuf_free_custom+0x22>
{
RxAllocStatus = RX_ALLOC_OK;
8003e7c: 4b04 ldr r3, [pc, #16] ; (8003e90 <pbuf_free_custom+0x30>)
8003e7e: 2200 movs r2, #0
8003e80: 701a strb r2, [r3, #0]
}
}
8003e82: bf00 nop
8003e84: 3710 adds r7, #16
8003e86: 46bd mov sp, r7
8003e88: bd80 pop {r7, pc}
8003e8a: bf00 nop
8003e8c: 08017cf0 .word 0x08017cf0
8003e90: 20005424 .word 0x20005424
08003e94 <sys_now>:
* when LWIP_TIMERS == 1 and NO_SYS == 1
* @param None
* @retval Current Time value
*/
u32_t sys_now(void)
{
8003e94: b580 push {r7, lr}
8003e96: af00 add r7, sp, #0
return HAL_GetTick();
8003e98: f7fd fc82 bl 80017a0 <HAL_GetTick>
8003e9c: 4603 mov r3, r0
}
8003e9e: 4618 mov r0, r3
8003ea0: bd80 pop {r7, pc}
...
08003ea4 <HAL_ETH_MspInit>:
* @param ethHandle: ETH handle
* @retval None
*/
void HAL_ETH_MspInit(ETH_HandleTypeDef* ethHandle)
{
8003ea4: b580 push {r7, lr}
8003ea6: b08e sub sp, #56 ; 0x38
8003ea8: af00 add r7, sp, #0
8003eaa: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
8003eac: f107 0324 add.w r3, r7, #36 ; 0x24
8003eb0: 2200 movs r2, #0
8003eb2: 601a str r2, [r3, #0]
8003eb4: 605a str r2, [r3, #4]
8003eb6: 609a str r2, [r3, #8]
8003eb8: 60da str r2, [r3, #12]
8003eba: 611a str r2, [r3, #16]
if(ethHandle->Instance==ETH)
8003ebc: 687b ldr r3, [r7, #4]
8003ebe: 681b ldr r3, [r3, #0]
8003ec0: 4a55 ldr r2, [pc, #340] ; (8004018 <HAL_ETH_MspInit+0x174>)
8003ec2: 4293 cmp r3, r2
8003ec4: f040 80a4 bne.w 8004010 <HAL_ETH_MspInit+0x16c>
{
/* USER CODE BEGIN ETH_MspInit 0 */
/* USER CODE END ETH_MspInit 0 */
/* Enable Peripheral clock */
__HAL_RCC_ETH_CLK_ENABLE();
8003ec8: 2300 movs r3, #0
8003eca: 623b str r3, [r7, #32]
8003ecc: 4b53 ldr r3, [pc, #332] ; (800401c <HAL_ETH_MspInit+0x178>)
8003ece: 6b1b ldr r3, [r3, #48] ; 0x30
8003ed0: 4a52 ldr r2, [pc, #328] ; (800401c <HAL_ETH_MspInit+0x178>)
8003ed2: f043 7300 orr.w r3, r3, #33554432 ; 0x2000000
8003ed6: 6313 str r3, [r2, #48] ; 0x30
8003ed8: 4b50 ldr r3, [pc, #320] ; (800401c <HAL_ETH_MspInit+0x178>)
8003eda: 6b1b ldr r3, [r3, #48] ; 0x30
8003edc: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
8003ee0: 623b str r3, [r7, #32]
8003ee2: 6a3b ldr r3, [r7, #32]
8003ee4: 2300 movs r3, #0
8003ee6: 61fb str r3, [r7, #28]
8003ee8: 4b4c ldr r3, [pc, #304] ; (800401c <HAL_ETH_MspInit+0x178>)
8003eea: 6b1b ldr r3, [r3, #48] ; 0x30
8003eec: 4a4b ldr r2, [pc, #300] ; (800401c <HAL_ETH_MspInit+0x178>)
8003eee: f043 6380 orr.w r3, r3, #67108864 ; 0x4000000
8003ef2: 6313 str r3, [r2, #48] ; 0x30
8003ef4: 4b49 ldr r3, [pc, #292] ; (800401c <HAL_ETH_MspInit+0x178>)
8003ef6: 6b1b ldr r3, [r3, #48] ; 0x30
8003ef8: f003 6380 and.w r3, r3, #67108864 ; 0x4000000
8003efc: 61fb str r3, [r7, #28]
8003efe: 69fb ldr r3, [r7, #28]
8003f00: 2300 movs r3, #0
8003f02: 61bb str r3, [r7, #24]
8003f04: 4b45 ldr r3, [pc, #276] ; (800401c <HAL_ETH_MspInit+0x178>)
8003f06: 6b1b ldr r3, [r3, #48] ; 0x30
8003f08: 4a44 ldr r2, [pc, #272] ; (800401c <HAL_ETH_MspInit+0x178>)
8003f0a: f043 6300 orr.w r3, r3, #134217728 ; 0x8000000
8003f0e: 6313 str r3, [r2, #48] ; 0x30
8003f10: 4b42 ldr r3, [pc, #264] ; (800401c <HAL_ETH_MspInit+0x178>)
8003f12: 6b1b ldr r3, [r3, #48] ; 0x30
8003f14: f003 6300 and.w r3, r3, #134217728 ; 0x8000000
8003f18: 61bb str r3, [r7, #24]
8003f1a: 69bb ldr r3, [r7, #24]
__HAL_RCC_GPIOC_CLK_ENABLE();
8003f1c: 2300 movs r3, #0
8003f1e: 617b str r3, [r7, #20]
8003f20: 4b3e ldr r3, [pc, #248] ; (800401c <HAL_ETH_MspInit+0x178>)
8003f22: 6b1b ldr r3, [r3, #48] ; 0x30
8003f24: 4a3d ldr r2, [pc, #244] ; (800401c <HAL_ETH_MspInit+0x178>)
8003f26: f043 0304 orr.w r3, r3, #4
8003f2a: 6313 str r3, [r2, #48] ; 0x30
8003f2c: 4b3b ldr r3, [pc, #236] ; (800401c <HAL_ETH_MspInit+0x178>)
8003f2e: 6b1b ldr r3, [r3, #48] ; 0x30
8003f30: f003 0304 and.w r3, r3, #4
8003f34: 617b str r3, [r7, #20]
8003f36: 697b ldr r3, [r7, #20]
__HAL_RCC_GPIOA_CLK_ENABLE();
8003f38: 2300 movs r3, #0
8003f3a: 613b str r3, [r7, #16]
8003f3c: 4b37 ldr r3, [pc, #220] ; (800401c <HAL_ETH_MspInit+0x178>)
8003f3e: 6b1b ldr r3, [r3, #48] ; 0x30
8003f40: 4a36 ldr r2, [pc, #216] ; (800401c <HAL_ETH_MspInit+0x178>)
8003f42: f043 0301 orr.w r3, r3, #1
8003f46: 6313 str r3, [r2, #48] ; 0x30
8003f48: 4b34 ldr r3, [pc, #208] ; (800401c <HAL_ETH_MspInit+0x178>)
8003f4a: 6b1b ldr r3, [r3, #48] ; 0x30
8003f4c: f003 0301 and.w r3, r3, #1
8003f50: 613b str r3, [r7, #16]
8003f52: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOB_CLK_ENABLE();
8003f54: 2300 movs r3, #0
8003f56: 60fb str r3, [r7, #12]
8003f58: 4b30 ldr r3, [pc, #192] ; (800401c <HAL_ETH_MspInit+0x178>)
8003f5a: 6b1b ldr r3, [r3, #48] ; 0x30
8003f5c: 4a2f ldr r2, [pc, #188] ; (800401c <HAL_ETH_MspInit+0x178>)
8003f5e: f043 0302 orr.w r3, r3, #2
8003f62: 6313 str r3, [r2, #48] ; 0x30
8003f64: 4b2d ldr r3, [pc, #180] ; (800401c <HAL_ETH_MspInit+0x178>)
8003f66: 6b1b ldr r3, [r3, #48] ; 0x30
8003f68: f003 0302 and.w r3, r3, #2
8003f6c: 60fb str r3, [r7, #12]
8003f6e: 68fb ldr r3, [r7, #12]
__HAL_RCC_GPIOG_CLK_ENABLE();
8003f70: 2300 movs r3, #0
8003f72: 60bb str r3, [r7, #8]
8003f74: 4b29 ldr r3, [pc, #164] ; (800401c <HAL_ETH_MspInit+0x178>)
8003f76: 6b1b ldr r3, [r3, #48] ; 0x30
8003f78: 4a28 ldr r2, [pc, #160] ; (800401c <HAL_ETH_MspInit+0x178>)
8003f7a: f043 0340 orr.w r3, r3, #64 ; 0x40
8003f7e: 6313 str r3, [r2, #48] ; 0x30
8003f80: 4b26 ldr r3, [pc, #152] ; (800401c <HAL_ETH_MspInit+0x178>)
8003f82: 6b1b ldr r3, [r3, #48] ; 0x30
8003f84: f003 0340 and.w r3, r3, #64 ; 0x40
8003f88: 60bb str r3, [r7, #8]
8003f8a: 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;
8003f8c: 2332 movs r3, #50 ; 0x32
8003f8e: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8003f90: 2302 movs r3, #2
8003f92: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
8003f94: 2300 movs r3, #0
8003f96: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8003f98: 2303 movs r3, #3
8003f9a: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
8003f9c: 230b movs r3, #11
8003f9e: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
8003fa0: f107 0324 add.w r3, r7, #36 ; 0x24
8003fa4: 4619 mov r1, r3
8003fa6: 481e ldr r0, [pc, #120] ; (8004020 <HAL_ETH_MspInit+0x17c>)
8003fa8: f7fe fe06 bl 8002bb8 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_7;
8003fac: 2386 movs r3, #134 ; 0x86
8003fae: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8003fb0: 2302 movs r3, #2
8003fb2: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
8003fb4: 2300 movs r3, #0
8003fb6: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8003fb8: 2303 movs r3, #3
8003fba: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
8003fbc: 230b movs r3, #11
8003fbe: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
8003fc0: f107 0324 add.w r3, r7, #36 ; 0x24
8003fc4: 4619 mov r1, r3
8003fc6: 4817 ldr r0, [pc, #92] ; (8004024 <HAL_ETH_MspInit+0x180>)
8003fc8: f7fe fdf6 bl 8002bb8 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12;
8003fcc: f44f 53c0 mov.w r3, #6144 ; 0x1800
8003fd0: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8003fd2: 2302 movs r3, #2
8003fd4: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
8003fd6: 2300 movs r3, #0
8003fd8: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8003fda: 2303 movs r3, #3
8003fdc: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
8003fde: 230b movs r3, #11
8003fe0: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
8003fe2: f107 0324 add.w r3, r7, #36 ; 0x24
8003fe6: 4619 mov r1, r3
8003fe8: 480f ldr r0, [pc, #60] ; (8004028 <HAL_ETH_MspInit+0x184>)
8003fea: f7fe fde5 bl 8002bb8 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_14;
8003fee: f44f 4380 mov.w r3, #16384 ; 0x4000
8003ff2: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8003ff4: 2302 movs r3, #2
8003ff6: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
8003ff8: 2300 movs r3, #0
8003ffa: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8003ffc: 2303 movs r3, #3
8003ffe: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
8004000: 230b movs r3, #11
8004002: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
8004004: f107 0324 add.w r3, r7, #36 ; 0x24
8004008: 4619 mov r1, r3
800400a: 4808 ldr r0, [pc, #32] ; (800402c <HAL_ETH_MspInit+0x188>)
800400c: f7fe fdd4 bl 8002bb8 <HAL_GPIO_Init>
/* USER CODE BEGIN ETH_MspInit 1 */
/* USER CODE END ETH_MspInit 1 */
}
}
8004010: bf00 nop
8004012: 3738 adds r7, #56 ; 0x38
8004014: 46bd mov sp, r7
8004016: bd80 pop {r7, pc}
8004018: 40028000 .word 0x40028000
800401c: 40023800 .word 0x40023800
8004020: 40020800 .word 0x40020800
8004024: 40020000 .word 0x40020000
8004028: 40020400 .word 0x40020400
800402c: 40021800 .word 0x40021800
08004030 <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)
{
8004030: b580 push {r7, lr}
8004032: 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);
8004034: 4802 ldr r0, [pc, #8] ; (8004040 <ETH_PHY_IO_Init+0x10>)
8004036: f7fe f963 bl 8002300 <HAL_ETH_SetMDIOClockRange>
return 0;
800403a: 2300 movs r3, #0
}
800403c: 4618 mov r0, r3
800403e: bd80 pop {r7, pc}
8004040: 20005568 .word 0x20005568
08004044 <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)
{
8004044: b480 push {r7}
8004046: af00 add r7, sp, #0
return 0;
8004048: 2300 movs r3, #0
}
800404a: 4618 mov r0, r3
800404c: 46bd mov sp, r7
800404e: f85d 7b04 ldr.w r7, [sp], #4
8004052: 4770 bx lr
08004054 <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)
{
8004054: b580 push {r7, lr}
8004056: b084 sub sp, #16
8004058: af00 add r7, sp, #0
800405a: 60f8 str r0, [r7, #12]
800405c: 60b9 str r1, [r7, #8]
800405e: 607a str r2, [r7, #4]
if(HAL_ETH_ReadPHYRegister(&heth, DevAddr, RegAddr, pRegVal) != HAL_OK)
8004060: 687b ldr r3, [r7, #4]
8004062: 68ba ldr r2, [r7, #8]
8004064: 68f9 ldr r1, [r7, #12]
8004066: 4807 ldr r0, [pc, #28] ; (8004084 <ETH_PHY_IO_ReadReg+0x30>)
8004068: f7fd ffb2 bl 8001fd0 <HAL_ETH_ReadPHYRegister>
800406c: 4603 mov r3, r0
800406e: 2b00 cmp r3, #0
8004070: d002 beq.n 8004078 <ETH_PHY_IO_ReadReg+0x24>
{
return -1;
8004072: f04f 33ff mov.w r3, #4294967295
8004076: e000 b.n 800407a <ETH_PHY_IO_ReadReg+0x26>
}
return 0;
8004078: 2300 movs r3, #0
}
800407a: 4618 mov r0, r3
800407c: 3710 adds r7, #16
800407e: 46bd mov sp, r7
8004080: bd80 pop {r7, pc}
8004082: bf00 nop
8004084: 20005568 .word 0x20005568
08004088 <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)
{
8004088: b580 push {r7, lr}
800408a: b084 sub sp, #16
800408c: af00 add r7, sp, #0
800408e: 60f8 str r0, [r7, #12]
8004090: 60b9 str r1, [r7, #8]
8004092: 607a str r2, [r7, #4]
if(HAL_ETH_WritePHYRegister(&heth, DevAddr, RegAddr, RegVal) != HAL_OK)
8004094: 687b ldr r3, [r7, #4]
8004096: 68ba ldr r2, [r7, #8]
8004098: 68f9 ldr r1, [r7, #12]
800409a: 4807 ldr r0, [pc, #28] ; (80040b8 <ETH_PHY_IO_WriteReg+0x30>)
800409c: f7fd ffe3 bl 8002066 <HAL_ETH_WritePHYRegister>
80040a0: 4603 mov r3, r0
80040a2: 2b00 cmp r3, #0
80040a4: d002 beq.n 80040ac <ETH_PHY_IO_WriteReg+0x24>
{
return -1;
80040a6: f04f 33ff mov.w r3, #4294967295
80040aa: e000 b.n 80040ae <ETH_PHY_IO_WriteReg+0x26>
}
return 0;
80040ac: 2300 movs r3, #0
}
80040ae: 4618 mov r0, r3
80040b0: 3710 adds r7, #16
80040b2: 46bd mov sp, r7
80040b4: bd80 pop {r7, pc}
80040b6: bf00 nop
80040b8: 20005568 .word 0x20005568
080040bc <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)
{
80040bc: b580 push {r7, lr}
80040be: af00 add r7, sp, #0
return HAL_GetTick();
80040c0: f7fd fb6e bl 80017a0 <HAL_GetTick>
80040c4: 4603 mov r3, r0
}
80040c6: 4618 mov r0, r3
80040c8: bd80 pop {r7, pc}
...
080040cc <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)
{
80040cc: b580 push {r7, lr}
80040ce: b0a0 sub sp, #128 ; 0x80
80040d0: af00 add r7, sp, #0
80040d2: 6078 str r0, [r7, #4]
ETH_MACConfigTypeDef MACConf = {0};
80040d4: f107 030c add.w r3, r7, #12
80040d8: 2264 movs r2, #100 ; 0x64
80040da: 2100 movs r1, #0
80040dc: 4618 mov r0, r3
80040de: f00c f96f bl 80103c0 <memset>
int32_t PHYLinkState = 0;
80040e2: 2300 movs r3, #0
80040e4: 673b str r3, [r7, #112] ; 0x70
uint32_t linkchanged = 0U, speed = 0U, duplex = 0U;
80040e6: 2300 movs r3, #0
80040e8: 67fb str r3, [r7, #124] ; 0x7c
80040ea: 2300 movs r3, #0
80040ec: 67bb str r3, [r7, #120] ; 0x78
80040ee: 2300 movs r3, #0
80040f0: 677b str r3, [r7, #116] ; 0x74
PHYLinkState = DP83848_GetLinkState(&DP83848);
80040f2: 483a ldr r0, [pc, #232] ; (80041dc <ethernet_link_check_state+0x110>)
80040f4: f7fd fa67 bl 80015c6 <DP83848_GetLinkState>
80040f8: 6738 str r0, [r7, #112] ; 0x70
if(netif_is_link_up(netif) && (PHYLinkState <= DP83848_STATUS_LINK_DOWN))
80040fa: 687b ldr r3, [r7, #4]
80040fc: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8004100: 089b lsrs r3, r3, #2
8004102: f003 0301 and.w r3, r3, #1
8004106: b2db uxtb r3, r3
8004108: 2b00 cmp r3, #0
800410a: d00c beq.n 8004126 <ethernet_link_check_state+0x5a>
800410c: 6f3b ldr r3, [r7, #112] ; 0x70
800410e: 2b01 cmp r3, #1
8004110: dc09 bgt.n 8004126 <ethernet_link_check_state+0x5a>
{
HAL_ETH_Stop(&heth);
8004112: 4833 ldr r0, [pc, #204] ; (80041e0 <ethernet_link_check_state+0x114>)
8004114: f7fd fd37 bl 8001b86 <HAL_ETH_Stop>
netif_set_down(netif);
8004118: 6878 ldr r0, [r7, #4]
800411a: f001 f823 bl 8005164 <netif_set_down>
netif_set_link_down(netif);
800411e: 6878 ldr r0, [r7, #4]
8004120: f001 f88a bl 8005238 <netif_set_link_down>
netif_set_up(netif);
netif_set_link_up(netif);
}
}
}
8004124: e055 b.n 80041d2 <ethernet_link_check_state+0x106>
else if(!netif_is_link_up(netif) && (PHYLinkState > DP83848_STATUS_LINK_DOWN))
8004126: 687b ldr r3, [r7, #4]
8004128: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800412c: f003 0304 and.w r3, r3, #4
8004130: 2b00 cmp r3, #0
8004132: d14e bne.n 80041d2 <ethernet_link_check_state+0x106>
8004134: 6f3b ldr r3, [r7, #112] ; 0x70
8004136: 2b01 cmp r3, #1
8004138: dd4b ble.n 80041d2 <ethernet_link_check_state+0x106>
switch (PHYLinkState)
800413a: 6f3b ldr r3, [r7, #112] ; 0x70
800413c: 3b02 subs r3, #2
800413e: 2b03 cmp r3, #3
8004140: d82a bhi.n 8004198 <ethernet_link_check_state+0xcc>
8004142: a201 add r2, pc, #4 ; (adr r2, 8004148 <ethernet_link_check_state+0x7c>)
8004144: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8004148: 08004159 .word 0x08004159
800414c: 0800416b .word 0x0800416b
8004150: 0800417b .word 0x0800417b
8004154: 0800418b .word 0x0800418b
duplex = ETH_FULLDUPLEX_MODE;
8004158: f44f 6300 mov.w r3, #2048 ; 0x800
800415c: 677b str r3, [r7, #116] ; 0x74
speed = ETH_SPEED_100M;
800415e: f44f 4380 mov.w r3, #16384 ; 0x4000
8004162: 67bb str r3, [r7, #120] ; 0x78
linkchanged = 1;
8004164: 2301 movs r3, #1
8004166: 67fb str r3, [r7, #124] ; 0x7c
break;
8004168: e017 b.n 800419a <ethernet_link_check_state+0xce>
duplex = ETH_HALFDUPLEX_MODE;
800416a: 2300 movs r3, #0
800416c: 677b str r3, [r7, #116] ; 0x74
speed = ETH_SPEED_100M;
800416e: f44f 4380 mov.w r3, #16384 ; 0x4000
8004172: 67bb str r3, [r7, #120] ; 0x78
linkchanged = 1;
8004174: 2301 movs r3, #1
8004176: 67fb str r3, [r7, #124] ; 0x7c
break;
8004178: e00f b.n 800419a <ethernet_link_check_state+0xce>
duplex = ETH_FULLDUPLEX_MODE;
800417a: f44f 6300 mov.w r3, #2048 ; 0x800
800417e: 677b str r3, [r7, #116] ; 0x74
speed = ETH_SPEED_10M;
8004180: 2300 movs r3, #0
8004182: 67bb str r3, [r7, #120] ; 0x78
linkchanged = 1;
8004184: 2301 movs r3, #1
8004186: 67fb str r3, [r7, #124] ; 0x7c
break;
8004188: e007 b.n 800419a <ethernet_link_check_state+0xce>
duplex = ETH_HALFDUPLEX_MODE;
800418a: 2300 movs r3, #0
800418c: 677b str r3, [r7, #116] ; 0x74
speed = ETH_SPEED_10M;
800418e: 2300 movs r3, #0
8004190: 67bb str r3, [r7, #120] ; 0x78
linkchanged = 1;
8004192: 2301 movs r3, #1
8004194: 67fb str r3, [r7, #124] ; 0x7c
break;
8004196: e000 b.n 800419a <ethernet_link_check_state+0xce>
break;
8004198: bf00 nop
if(linkchanged)
800419a: 6ffb ldr r3, [r7, #124] ; 0x7c
800419c: 2b00 cmp r3, #0
800419e: d018 beq.n 80041d2 <ethernet_link_check_state+0x106>
HAL_ETH_GetMACConfig(&heth, &MACConf);
80041a0: f107 030c add.w r3, r7, #12
80041a4: 4619 mov r1, r3
80041a6: 480e ldr r0, [pc, #56] ; (80041e0 <ethernet_link_check_state+0x114>)
80041a8: f7fd ffa6 bl 80020f8 <HAL_ETH_GetMACConfig>
MACConf.DuplexMode = duplex;
80041ac: 6f7b ldr r3, [r7, #116] ; 0x74
80041ae: 627b str r3, [r7, #36] ; 0x24
MACConf.Speed = speed;
80041b0: 6fbb ldr r3, [r7, #120] ; 0x78
80041b2: 623b str r3, [r7, #32]
HAL_ETH_SetMACConfig(&heth, &MACConf);
80041b4: f107 030c add.w r3, r7, #12
80041b8: 4619 mov r1, r3
80041ba: 4809 ldr r0, [pc, #36] ; (80041e0 <ethernet_link_check_state+0x114>)
80041bc: f7fe f886 bl 80022cc <HAL_ETH_SetMACConfig>
HAL_ETH_Start(&heth);
80041c0: 4807 ldr r0, [pc, #28] ; (80041e0 <ethernet_link_check_state+0x114>)
80041c2: f7fd fc81 bl 8001ac8 <HAL_ETH_Start>
netif_set_up(netif);
80041c6: 6878 ldr r0, [r7, #4]
80041c8: f000 ff60 bl 800508c <netif_set_up>
netif_set_link_up(netif);
80041cc: 6878 ldr r0, [r7, #4]
80041ce: f000 fffb bl 80051c8 <netif_set_link_up>
}
80041d2: bf00 nop
80041d4: 3780 adds r7, #128 ; 0x80
80041d6: 46bd mov sp, r7
80041d8: bd80 pop {r7, pc}
80041da: bf00 nop
80041dc: 20005650 .word 0x20005650
80041e0: 20005568 .word 0x20005568
080041e4 <HAL_ETH_RxAllocateCallback>:
void HAL_ETH_RxAllocateCallback(uint8_t **buff)
{
80041e4: b580 push {r7, lr}
80041e6: b086 sub sp, #24
80041e8: af02 add r7, sp, #8
80041ea: 6078 str r0, [r7, #4]
/* USER CODE BEGIN HAL ETH RxAllocateCallback */
struct pbuf_custom *p = LWIP_MEMPOOL_ALLOC(RX_POOL);
80041ec: 4812 ldr r0, [pc, #72] ; (8004238 <HAL_ETH_RxAllocateCallback+0x54>)
80041ee: f000 fcbf bl 8004b70 <memp_malloc_pool>
80041f2: 60f8 str r0, [r7, #12]
if (p)
80041f4: 68fb ldr r3, [r7, #12]
80041f6: 2b00 cmp r3, #0
80041f8: d014 beq.n 8004224 <HAL_ETH_RxAllocateCallback+0x40>
{
/* Get the buff from the struct pbuf address. */
*buff = (uint8_t *)p + offsetof(RxBuff_t, buff);
80041fa: 68fb ldr r3, [r7, #12]
80041fc: f103 0220 add.w r2, r3, #32
8004200: 687b ldr r3, [r7, #4]
8004202: 601a str r2, [r3, #0]
p->custom_free_function = pbuf_free_custom;
8004204: 68fb ldr r3, [r7, #12]
8004206: 4a0d ldr r2, [pc, #52] ; (800423c <HAL_ETH_RxAllocateCallback+0x58>)
8004208: 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);
800420a: 687b ldr r3, [r7, #4]
800420c: 681b ldr r3, [r3, #0]
800420e: f44f 62c0 mov.w r2, #1536 ; 0x600
8004212: 9201 str r2, [sp, #4]
8004214: 9300 str r3, [sp, #0]
8004216: 68fb ldr r3, [r7, #12]
8004218: 2241 movs r2, #65 ; 0x41
800421a: 2100 movs r1, #0
800421c: 2000 movs r0, #0
800421e: f001 fa01 bl 8005624 <pbuf_alloced_custom>
{
RxAllocStatus = RX_ALLOC_ERROR;
*buff = NULL;
}
/* USER CODE END HAL ETH RxAllocateCallback */
}
8004222: e005 b.n 8004230 <HAL_ETH_RxAllocateCallback+0x4c>
RxAllocStatus = RX_ALLOC_ERROR;
8004224: 4b06 ldr r3, [pc, #24] ; (8004240 <HAL_ETH_RxAllocateCallback+0x5c>)
8004226: 2201 movs r2, #1
8004228: 701a strb r2, [r3, #0]
*buff = NULL;
800422a: 687b ldr r3, [r7, #4]
800422c: 2200 movs r2, #0
800422e: 601a str r2, [r3, #0]
}
8004230: bf00 nop
8004232: 3710 adds r7, #16
8004234: 46bd mov sp, r7
8004236: bd80 pop {r7, pc}
8004238: 08017cf0 .word 0x08017cf0
800423c: 08003e61 .word 0x08003e61
8004240: 20005424 .word 0x20005424
08004244 <HAL_ETH_RxLinkCallback>:
void HAL_ETH_RxLinkCallback(void **pStart, void **pEnd, uint8_t *buff, uint16_t Length)
{
8004244: b480 push {r7}
8004246: b089 sub sp, #36 ; 0x24
8004248: af00 add r7, sp, #0
800424a: 60f8 str r0, [r7, #12]
800424c: 60b9 str r1, [r7, #8]
800424e: 607a str r2, [r7, #4]
8004250: 807b strh r3, [r7, #2]
/* USER CODE BEGIN HAL ETH RxLinkCallback */
struct pbuf **ppStart = (struct pbuf **)pStart;
8004252: 68fb ldr r3, [r7, #12]
8004254: 61bb str r3, [r7, #24]
struct pbuf **ppEnd = (struct pbuf **)pEnd;
8004256: 68bb ldr r3, [r7, #8]
8004258: 617b str r3, [r7, #20]
struct pbuf *p = NULL;
800425a: 2300 movs r3, #0
800425c: 61fb str r3, [r7, #28]
/* Get the struct pbuf from the buff address. */
p = (struct pbuf *)(buff - offsetof(RxBuff_t, buff));
800425e: 687b ldr r3, [r7, #4]
8004260: 3b20 subs r3, #32
8004262: 61fb str r3, [r7, #28]
p->next = NULL;
8004264: 69fb ldr r3, [r7, #28]
8004266: 2200 movs r2, #0
8004268: 601a str r2, [r3, #0]
p->tot_len = 0;
800426a: 69fb ldr r3, [r7, #28]
800426c: 2200 movs r2, #0
800426e: 811a strh r2, [r3, #8]
p->len = Length;
8004270: 69fb ldr r3, [r7, #28]
8004272: 887a ldrh r2, [r7, #2]
8004274: 815a strh r2, [r3, #10]
/* Chain the buffer. */
if (!*ppStart)
8004276: 69bb ldr r3, [r7, #24]
8004278: 681b ldr r3, [r3, #0]
800427a: 2b00 cmp r3, #0
800427c: d103 bne.n 8004286 <HAL_ETH_RxLinkCallback+0x42>
{
/* The first buffer of the packet. */
*ppStart = p;
800427e: 69bb ldr r3, [r7, #24]
8004280: 69fa ldr r2, [r7, #28]
8004282: 601a str r2, [r3, #0]
8004284: e003 b.n 800428e <HAL_ETH_RxLinkCallback+0x4a>
}
else
{
/* Chain the buffer to the end of the packet. */
(*ppEnd)->next = p;
8004286: 697b ldr r3, [r7, #20]
8004288: 681b ldr r3, [r3, #0]
800428a: 69fa ldr r2, [r7, #28]
800428c: 601a str r2, [r3, #0]
}
*ppEnd = p;
800428e: 697b ldr r3, [r7, #20]
8004290: 69fa ldr r2, [r7, #28]
8004292: 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)
8004294: 69bb ldr r3, [r7, #24]
8004296: 681b ldr r3, [r3, #0]
8004298: 61fb str r3, [r7, #28]
800429a: e009 b.n 80042b0 <HAL_ETH_RxLinkCallback+0x6c>
{
p->tot_len += Length;
800429c: 69fb ldr r3, [r7, #28]
800429e: 891a ldrh r2, [r3, #8]
80042a0: 887b ldrh r3, [r7, #2]
80042a2: 4413 add r3, r2
80042a4: b29a uxth r2, r3
80042a6: 69fb ldr r3, [r7, #28]
80042a8: 811a strh r2, [r3, #8]
for (p = *ppStart; p != NULL; p = p->next)
80042aa: 69fb ldr r3, [r7, #28]
80042ac: 681b ldr r3, [r3, #0]
80042ae: 61fb str r3, [r7, #28]
80042b0: 69fb ldr r3, [r7, #28]
80042b2: 2b00 cmp r3, #0
80042b4: d1f2 bne.n 800429c <HAL_ETH_RxLinkCallback+0x58>
}
/* USER CODE END HAL ETH RxLinkCallback */
}
80042b6: bf00 nop
80042b8: bf00 nop
80042ba: 3724 adds r7, #36 ; 0x24
80042bc: 46bd mov sp, r7
80042be: f85d 7b04 ldr.w r7, [sp], #4
80042c2: 4770 bx lr
080042c4 <lwip_htons>:
* @param n u16_t in host byte order
* @return n in network byte order
*/
u16_t
lwip_htons(u16_t n)
{
80042c4: b480 push {r7}
80042c6: b083 sub sp, #12
80042c8: af00 add r7, sp, #0
80042ca: 4603 mov r3, r0
80042cc: 80fb strh r3, [r7, #6]
return PP_HTONS(n);
80042ce: 88fb ldrh r3, [r7, #6]
80042d0: 021b lsls r3, r3, #8
80042d2: b21a sxth r2, r3
80042d4: 88fb ldrh r3, [r7, #6]
80042d6: 0a1b lsrs r3, r3, #8
80042d8: b29b uxth r3, r3
80042da: b21b sxth r3, r3
80042dc: 4313 orrs r3, r2
80042de: b21b sxth r3, r3
80042e0: b29b uxth r3, r3
}
80042e2: 4618 mov r0, r3
80042e4: 370c adds r7, #12
80042e6: 46bd mov sp, r7
80042e8: f85d 7b04 ldr.w r7, [sp], #4
80042ec: 4770 bx lr
080042ee <lwip_htonl>:
* @param n u32_t in host byte order
* @return n in network byte order
*/
u32_t
lwip_htonl(u32_t n)
{
80042ee: b480 push {r7}
80042f0: b083 sub sp, #12
80042f2: af00 add r7, sp, #0
80042f4: 6078 str r0, [r7, #4]
return PP_HTONL(n);
80042f6: 687b ldr r3, [r7, #4]
80042f8: 061a lsls r2, r3, #24
80042fa: 687b ldr r3, [r7, #4]
80042fc: 021b lsls r3, r3, #8
80042fe: f403 037f and.w r3, r3, #16711680 ; 0xff0000
8004302: 431a orrs r2, r3
8004304: 687b ldr r3, [r7, #4]
8004306: 0a1b lsrs r3, r3, #8
8004308: f403 437f and.w r3, r3, #65280 ; 0xff00
800430c: 431a orrs r2, r3
800430e: 687b ldr r3, [r7, #4]
8004310: 0e1b lsrs r3, r3, #24
8004312: 4313 orrs r3, r2
}
8004314: 4618 mov r0, r3
8004316: 370c adds r7, #12
8004318: 46bd mov sp, r7
800431a: f85d 7b04 ldr.w r7, [sp], #4
800431e: 4770 bx lr
08004320 <lwip_init>:
* Initialize all modules.
* Use this in NO_SYS mode. Use tcpip_init() otherwise.
*/
void
lwip_init(void)
{
8004320: b580 push {r7, lr}
8004322: b082 sub sp, #8
8004324: af00 add r7, sp, #0
#ifndef LWIP_SKIP_CONST_CHECK
int a = 0;
8004326: 2300 movs r3, #0
8004328: 607b str r3, [r7, #4]
/* Modules initialization */
stats_init();
#if !NO_SYS
sys_init();
#endif /* !NO_SYS */
mem_init();
800432a: f000 f8d5 bl 80044d8 <mem_init>
memp_init();
800432e: f000 fbdb bl 8004ae8 <memp_init>
pbuf_init();
netif_init();
8004332: f000 fcd9 bl 8004ce8 <netif_init>
#endif /* LWIP_IPV4 */
#if LWIP_RAW
raw_init();
#endif /* LWIP_RAW */
#if LWIP_UDP
udp_init();
8004336: f007 f873 bl 800b420 <udp_init>
#endif /* LWIP_UDP */
#if LWIP_TCP
tcp_init();
800433a: f001 fdcb bl 8005ed4 <tcp_init>
#if PPP_SUPPORT
ppp_init();
#endif
#if LWIP_TIMERS
sys_timeouts_init();
800433e: f006 ffe5 bl 800b30c <sys_timeouts_init>
#endif /* LWIP_TIMERS */
}
8004342: bf00 nop
8004344: 3708 adds r7, #8
8004346: 46bd mov sp, r7
8004348: bd80 pop {r7, pc}
...
0800434c <ptr_to_mem>:
#define mem_overflow_check_element(mem)
#endif /* MEM_OVERFLOW_CHECK */
static struct mem *
ptr_to_mem(mem_size_t ptr)
{
800434c: b480 push {r7}
800434e: b083 sub sp, #12
8004350: af00 add r7, sp, #0
8004352: 4603 mov r3, r0
8004354: 80fb strh r3, [r7, #6]
return (struct mem *)(void *)&ram[ptr];
8004356: 4b05 ldr r3, [pc, #20] ; (800436c <ptr_to_mem+0x20>)
8004358: 681a ldr r2, [r3, #0]
800435a: 88fb ldrh r3, [r7, #6]
800435c: 4413 add r3, r2
}
800435e: 4618 mov r0, r3
8004360: 370c adds r7, #12
8004362: 46bd mov sp, r7
8004364: f85d 7b04 ldr.w r7, [sp], #4
8004368: 4770 bx lr
800436a: bf00 nop
800436c: 20005cdc .word 0x20005cdc
08004370 <mem_to_ptr>:
static mem_size_t
mem_to_ptr(void *mem)
{
8004370: b480 push {r7}
8004372: b083 sub sp, #12
8004374: af00 add r7, sp, #0
8004376: 6078 str r0, [r7, #4]
return (mem_size_t)((u8_t *)mem - ram);
8004378: 4b05 ldr r3, [pc, #20] ; (8004390 <mem_to_ptr+0x20>)
800437a: 681b ldr r3, [r3, #0]
800437c: 687a ldr r2, [r7, #4]
800437e: 1ad3 subs r3, r2, r3
8004380: b29b uxth r3, r3
}
8004382: 4618 mov r0, r3
8004384: 370c adds r7, #12
8004386: 46bd mov sp, r7
8004388: f85d 7b04 ldr.w r7, [sp], #4
800438c: 4770 bx lr
800438e: bf00 nop
8004390: 20005cdc .word 0x20005cdc
08004394 <plug_holes>:
* This assumes access to the heap is protected by the calling function
* already.
*/
static void
plug_holes(struct mem *mem)
{
8004394: b590 push {r4, r7, lr}
8004396: b085 sub sp, #20
8004398: af00 add r7, sp, #0
800439a: 6078 str r0, [r7, #4]
struct mem *nmem;
struct mem *pmem;
LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram);
800439c: 4b45 ldr r3, [pc, #276] ; (80044b4 <plug_holes+0x120>)
800439e: 681b ldr r3, [r3, #0]
80043a0: 687a ldr r2, [r7, #4]
80043a2: 429a cmp r2, r3
80043a4: d206 bcs.n 80043b4 <plug_holes+0x20>
80043a6: 4b44 ldr r3, [pc, #272] ; (80044b8 <plug_holes+0x124>)
80043a8: f240 12df movw r2, #479 ; 0x1df
80043ac: 4943 ldr r1, [pc, #268] ; (80044bc <plug_holes+0x128>)
80043ae: 4844 ldr r0, [pc, #272] ; (80044c0 <plug_holes+0x12c>)
80043b0: f00c f80e bl 80103d0 <printf>
LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end);
80043b4: 4b43 ldr r3, [pc, #268] ; (80044c4 <plug_holes+0x130>)
80043b6: 681b ldr r3, [r3, #0]
80043b8: 687a ldr r2, [r7, #4]
80043ba: 429a cmp r2, r3
80043bc: d306 bcc.n 80043cc <plug_holes+0x38>
80043be: 4b3e ldr r3, [pc, #248] ; (80044b8 <plug_holes+0x124>)
80043c0: f44f 72f0 mov.w r2, #480 ; 0x1e0
80043c4: 4940 ldr r1, [pc, #256] ; (80044c8 <plug_holes+0x134>)
80043c6: 483e ldr r0, [pc, #248] ; (80044c0 <plug_holes+0x12c>)
80043c8: f00c f802 bl 80103d0 <printf>
LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0);
80043cc: 687b ldr r3, [r7, #4]
80043ce: 791b ldrb r3, [r3, #4]
80043d0: 2b00 cmp r3, #0
80043d2: d006 beq.n 80043e2 <plug_holes+0x4e>
80043d4: 4b38 ldr r3, [pc, #224] ; (80044b8 <plug_holes+0x124>)
80043d6: f240 12e1 movw r2, #481 ; 0x1e1
80043da: 493c ldr r1, [pc, #240] ; (80044cc <plug_holes+0x138>)
80043dc: 4838 ldr r0, [pc, #224] ; (80044c0 <plug_holes+0x12c>)
80043de: f00b fff7 bl 80103d0 <printf>
/* plug hole forward */
LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED);
80043e2: 687b ldr r3, [r7, #4]
80043e4: 881b ldrh r3, [r3, #0]
80043e6: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
80043ea: d906 bls.n 80043fa <plug_holes+0x66>
80043ec: 4b32 ldr r3, [pc, #200] ; (80044b8 <plug_holes+0x124>)
80043ee: f44f 72f2 mov.w r2, #484 ; 0x1e4
80043f2: 4937 ldr r1, [pc, #220] ; (80044d0 <plug_holes+0x13c>)
80043f4: 4832 ldr r0, [pc, #200] ; (80044c0 <plug_holes+0x12c>)
80043f6: f00b ffeb bl 80103d0 <printf>
nmem = ptr_to_mem(mem->next);
80043fa: 687b ldr r3, [r7, #4]
80043fc: 881b ldrh r3, [r3, #0]
80043fe: 4618 mov r0, r3
8004400: f7ff ffa4 bl 800434c <ptr_to_mem>
8004404: 60f8 str r0, [r7, #12]
if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) {
8004406: 687a ldr r2, [r7, #4]
8004408: 68fb ldr r3, [r7, #12]
800440a: 429a cmp r2, r3
800440c: d024 beq.n 8004458 <plug_holes+0xc4>
800440e: 68fb ldr r3, [r7, #12]
8004410: 791b ldrb r3, [r3, #4]
8004412: 2b00 cmp r3, #0
8004414: d120 bne.n 8004458 <plug_holes+0xc4>
8004416: 4b2b ldr r3, [pc, #172] ; (80044c4 <plug_holes+0x130>)
8004418: 681b ldr r3, [r3, #0]
800441a: 68fa ldr r2, [r7, #12]
800441c: 429a cmp r2, r3
800441e: d01b beq.n 8004458 <plug_holes+0xc4>
/* if mem->next is unused and not end of ram, combine mem and mem->next */
if (lfree == nmem) {
8004420: 4b2c ldr r3, [pc, #176] ; (80044d4 <plug_holes+0x140>)
8004422: 681b ldr r3, [r3, #0]
8004424: 68fa ldr r2, [r7, #12]
8004426: 429a cmp r2, r3
8004428: d102 bne.n 8004430 <plug_holes+0x9c>
lfree = mem;
800442a: 4a2a ldr r2, [pc, #168] ; (80044d4 <plug_holes+0x140>)
800442c: 687b ldr r3, [r7, #4]
800442e: 6013 str r3, [r2, #0]
}
mem->next = nmem->next;
8004430: 68fb ldr r3, [r7, #12]
8004432: 881a ldrh r2, [r3, #0]
8004434: 687b ldr r3, [r7, #4]
8004436: 801a strh r2, [r3, #0]
if (nmem->next != MEM_SIZE_ALIGNED) {
8004438: 68fb ldr r3, [r7, #12]
800443a: 881b ldrh r3, [r3, #0]
800443c: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8004440: d00a beq.n 8004458 <plug_holes+0xc4>
ptr_to_mem(nmem->next)->prev = mem_to_ptr(mem);
8004442: 68fb ldr r3, [r7, #12]
8004444: 881b ldrh r3, [r3, #0]
8004446: 4618 mov r0, r3
8004448: f7ff ff80 bl 800434c <ptr_to_mem>
800444c: 4604 mov r4, r0
800444e: 6878 ldr r0, [r7, #4]
8004450: f7ff ff8e bl 8004370 <mem_to_ptr>
8004454: 4603 mov r3, r0
8004456: 8063 strh r3, [r4, #2]
}
}
/* plug hole backward */
pmem = ptr_to_mem(mem->prev);
8004458: 687b ldr r3, [r7, #4]
800445a: 885b ldrh r3, [r3, #2]
800445c: 4618 mov r0, r3
800445e: f7ff ff75 bl 800434c <ptr_to_mem>
8004462: 60b8 str r0, [r7, #8]
if (pmem != mem && pmem->used == 0) {
8004464: 68ba ldr r2, [r7, #8]
8004466: 687b ldr r3, [r7, #4]
8004468: 429a cmp r2, r3
800446a: d01f beq.n 80044ac <plug_holes+0x118>
800446c: 68bb ldr r3, [r7, #8]
800446e: 791b ldrb r3, [r3, #4]
8004470: 2b00 cmp r3, #0
8004472: d11b bne.n 80044ac <plug_holes+0x118>
/* if mem->prev is unused, combine mem and mem->prev */
if (lfree == mem) {
8004474: 4b17 ldr r3, [pc, #92] ; (80044d4 <plug_holes+0x140>)
8004476: 681b ldr r3, [r3, #0]
8004478: 687a ldr r2, [r7, #4]
800447a: 429a cmp r2, r3
800447c: d102 bne.n 8004484 <plug_holes+0xf0>
lfree = pmem;
800447e: 4a15 ldr r2, [pc, #84] ; (80044d4 <plug_holes+0x140>)
8004480: 68bb ldr r3, [r7, #8]
8004482: 6013 str r3, [r2, #0]
}
pmem->next = mem->next;
8004484: 687b ldr r3, [r7, #4]
8004486: 881a ldrh r2, [r3, #0]
8004488: 68bb ldr r3, [r7, #8]
800448a: 801a strh r2, [r3, #0]
if (mem->next != MEM_SIZE_ALIGNED) {
800448c: 687b ldr r3, [r7, #4]
800448e: 881b ldrh r3, [r3, #0]
8004490: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8004494: d00a beq.n 80044ac <plug_holes+0x118>
ptr_to_mem(mem->next)->prev = mem_to_ptr(pmem);
8004496: 687b ldr r3, [r7, #4]
8004498: 881b ldrh r3, [r3, #0]
800449a: 4618 mov r0, r3
800449c: f7ff ff56 bl 800434c <ptr_to_mem>
80044a0: 4604 mov r4, r0
80044a2: 68b8 ldr r0, [r7, #8]
80044a4: f7ff ff64 bl 8004370 <mem_to_ptr>
80044a8: 4603 mov r3, r0
80044aa: 8063 strh r3, [r4, #2]
}
}
}
80044ac: bf00 nop
80044ae: 3714 adds r7, #20
80044b0: 46bd mov sp, r7
80044b2: bd90 pop {r4, r7, pc}
80044b4: 20005cdc .word 0x20005cdc
80044b8: 08014f44 .word 0x08014f44
80044bc: 08014f74 .word 0x08014f74
80044c0: 08014f8c .word 0x08014f8c
80044c4: 20005ce0 .word 0x20005ce0
80044c8: 08014fb4 .word 0x08014fb4
80044cc: 08014fd0 .word 0x08014fd0
80044d0: 08014fec .word 0x08014fec
80044d4: 20005ce4 .word 0x20005ce4
080044d8 <mem_init>:
/**
* Zero the heap and initialize start, end and lowest-free
*/
void
mem_init(void)
{
80044d8: b580 push {r7, lr}
80044da: b082 sub sp, #8
80044dc: 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);
80044de: 4b18 ldr r3, [pc, #96] ; (8004540 <mem_init+0x68>)
80044e0: 3303 adds r3, #3
80044e2: f023 0303 bic.w r3, r3, #3
80044e6: 461a mov r2, r3
80044e8: 4b16 ldr r3, [pc, #88] ; (8004544 <mem_init+0x6c>)
80044ea: 601a str r2, [r3, #0]
/* initialize the start of the heap */
mem = (struct mem *)(void *)ram;
80044ec: 4b15 ldr r3, [pc, #84] ; (8004544 <mem_init+0x6c>)
80044ee: 681b ldr r3, [r3, #0]
80044f0: 607b str r3, [r7, #4]
mem->next = MEM_SIZE_ALIGNED;
80044f2: 687b ldr r3, [r7, #4]
80044f4: f44f 62c8 mov.w r2, #1600 ; 0x640
80044f8: 801a strh r2, [r3, #0]
mem->prev = 0;
80044fa: 687b ldr r3, [r7, #4]
80044fc: 2200 movs r2, #0
80044fe: 805a strh r2, [r3, #2]
mem->used = 0;
8004500: 687b ldr r3, [r7, #4]
8004502: 2200 movs r2, #0
8004504: 711a strb r2, [r3, #4]
/* initialize the end of the heap */
ram_end = ptr_to_mem(MEM_SIZE_ALIGNED);
8004506: f44f 60c8 mov.w r0, #1600 ; 0x640
800450a: f7ff ff1f bl 800434c <ptr_to_mem>
800450e: 4603 mov r3, r0
8004510: 4a0d ldr r2, [pc, #52] ; (8004548 <mem_init+0x70>)
8004512: 6013 str r3, [r2, #0]
ram_end->used = 1;
8004514: 4b0c ldr r3, [pc, #48] ; (8004548 <mem_init+0x70>)
8004516: 681b ldr r3, [r3, #0]
8004518: 2201 movs r2, #1
800451a: 711a strb r2, [r3, #4]
ram_end->next = MEM_SIZE_ALIGNED;
800451c: 4b0a ldr r3, [pc, #40] ; (8004548 <mem_init+0x70>)
800451e: 681b ldr r3, [r3, #0]
8004520: f44f 62c8 mov.w r2, #1600 ; 0x640
8004524: 801a strh r2, [r3, #0]
ram_end->prev = MEM_SIZE_ALIGNED;
8004526: 4b08 ldr r3, [pc, #32] ; (8004548 <mem_init+0x70>)
8004528: 681b ldr r3, [r3, #0]
800452a: f44f 62c8 mov.w r2, #1600 ; 0x640
800452e: 805a strh r2, [r3, #2]
MEM_SANITY();
/* initialize the lowest-free pointer to the start of the heap */
lfree = (struct mem *)(void *)ram;
8004530: 4b04 ldr r3, [pc, #16] ; (8004544 <mem_init+0x6c>)
8004532: 681b ldr r3, [r3, #0]
8004534: 4a05 ldr r2, [pc, #20] ; (800454c <mem_init+0x74>)
8004536: 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);
}
}
8004538: bf00 nop
800453a: 3708 adds r7, #8
800453c: 46bd mov sp, r7
800453e: bd80 pop {r7, pc}
8004540: 20005688 .word 0x20005688
8004544: 20005cdc .word 0x20005cdc
8004548: 20005ce0 .word 0x20005ce0
800454c: 20005ce4 .word 0x20005ce4
08004550 <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)
{
8004550: b580 push {r7, lr}
8004552: b086 sub sp, #24
8004554: af00 add r7, sp, #0
8004556: 6078 str r0, [r7, #4]
struct mem *nmem, *pmem;
mem_size_t rmem_idx;
rmem_idx = mem_to_ptr(mem);
8004558: 6878 ldr r0, [r7, #4]
800455a: f7ff ff09 bl 8004370 <mem_to_ptr>
800455e: 4603 mov r3, r0
8004560: 82fb strh r3, [r7, #22]
nmem = ptr_to_mem(mem->next);
8004562: 687b ldr r3, [r7, #4]
8004564: 881b ldrh r3, [r3, #0]
8004566: 4618 mov r0, r3
8004568: f7ff fef0 bl 800434c <ptr_to_mem>
800456c: 6138 str r0, [r7, #16]
pmem = ptr_to_mem(mem->prev);
800456e: 687b ldr r3, [r7, #4]
8004570: 885b ldrh r3, [r3, #2]
8004572: 4618 mov r0, r3
8004574: f7ff feea bl 800434c <ptr_to_mem>
8004578: 60f8 str r0, [r7, #12]
if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) ||
800457a: 687b ldr r3, [r7, #4]
800457c: 881b ldrh r3, [r3, #0]
800457e: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8004582: d818 bhi.n 80045b6 <mem_link_valid+0x66>
8004584: 687b ldr r3, [r7, #4]
8004586: 885b ldrh r3, [r3, #2]
8004588: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
800458c: d813 bhi.n 80045b6 <mem_link_valid+0x66>
((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
800458e: 687b ldr r3, [r7, #4]
8004590: 885b ldrh r3, [r3, #2]
if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) ||
8004592: 8afa ldrh r2, [r7, #22]
8004594: 429a cmp r2, r3
8004596: d004 beq.n 80045a2 <mem_link_valid+0x52>
((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
8004598: 68fb ldr r3, [r7, #12]
800459a: 881b ldrh r3, [r3, #0]
800459c: 8afa ldrh r2, [r7, #22]
800459e: 429a cmp r2, r3
80045a0: d109 bne.n 80045b6 <mem_link_valid+0x66>
((nmem != ram_end) && (nmem->prev != rmem_idx))) {
80045a2: 4b08 ldr r3, [pc, #32] ; (80045c4 <mem_link_valid+0x74>)
80045a4: 681b ldr r3, [r3, #0]
((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
80045a6: 693a ldr r2, [r7, #16]
80045a8: 429a cmp r2, r3
80045aa: d006 beq.n 80045ba <mem_link_valid+0x6a>
((nmem != ram_end) && (nmem->prev != rmem_idx))) {
80045ac: 693b ldr r3, [r7, #16]
80045ae: 885b ldrh r3, [r3, #2]
80045b0: 8afa ldrh r2, [r7, #22]
80045b2: 429a cmp r2, r3
80045b4: d001 beq.n 80045ba <mem_link_valid+0x6a>
return 0;
80045b6: 2300 movs r3, #0
80045b8: e000 b.n 80045bc <mem_link_valid+0x6c>
}
return 1;
80045ba: 2301 movs r3, #1
}
80045bc: 4618 mov r0, r3
80045be: 3718 adds r7, #24
80045c0: 46bd mov sp, r7
80045c2: bd80 pop {r7, pc}
80045c4: 20005ce0 .word 0x20005ce0
080045c8 <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)
{
80045c8: b580 push {r7, lr}
80045ca: b084 sub sp, #16
80045cc: af00 add r7, sp, #0
80045ce: 6078 str r0, [r7, #4]
struct mem *mem;
LWIP_MEM_FREE_DECL_PROTECT();
if (rmem == NULL) {
80045d0: 687b ldr r3, [r7, #4]
80045d2: 2b00 cmp r3, #0
80045d4: d04c beq.n 8004670 <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) {
80045d6: 687b ldr r3, [r7, #4]
80045d8: f003 0303 and.w r3, r3, #3
80045dc: 2b00 cmp r3, #0
80045de: d007 beq.n 80045f0 <mem_free+0x28>
LWIP_MEM_ILLEGAL_FREE("mem_free: sanity check alignment");
80045e0: 4b25 ldr r3, [pc, #148] ; (8004678 <mem_free+0xb0>)
80045e2: f240 2273 movw r2, #627 ; 0x273
80045e6: 4925 ldr r1, [pc, #148] ; (800467c <mem_free+0xb4>)
80045e8: 4825 ldr r0, [pc, #148] ; (8004680 <mem_free+0xb8>)
80045ea: f00b fef1 bl 80103d0 <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;
80045ee: e040 b.n 8004672 <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));
80045f0: 687b ldr r3, [r7, #4]
80045f2: 3b08 subs r3, #8
80045f4: 60fb str r3, [r7, #12]
if ((u8_t *)mem < ram || (u8_t *)rmem + MIN_SIZE_ALIGNED > (u8_t *)ram_end) {
80045f6: 4b23 ldr r3, [pc, #140] ; (8004684 <mem_free+0xbc>)
80045f8: 681b ldr r3, [r3, #0]
80045fa: 68fa ldr r2, [r7, #12]
80045fc: 429a cmp r2, r3
80045fe: d306 bcc.n 800460e <mem_free+0x46>
8004600: 687b ldr r3, [r7, #4]
8004602: f103 020c add.w r2, r3, #12
8004606: 4b20 ldr r3, [pc, #128] ; (8004688 <mem_free+0xc0>)
8004608: 681b ldr r3, [r3, #0]
800460a: 429a cmp r2, r3
800460c: d907 bls.n 800461e <mem_free+0x56>
LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory");
800460e: 4b1a ldr r3, [pc, #104] ; (8004678 <mem_free+0xb0>)
8004610: f240 227f movw r2, #639 ; 0x27f
8004614: 491d ldr r1, [pc, #116] ; (800468c <mem_free+0xc4>)
8004616: 481a ldr r0, [pc, #104] ; (8004680 <mem_free+0xb8>)
8004618: f00b feda bl 80103d0 <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;
800461c: e029 b.n 8004672 <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) {
800461e: 68fb ldr r3, [r7, #12]
8004620: 791b ldrb r3, [r3, #4]
8004622: 2b00 cmp r3, #0
8004624: d107 bne.n 8004636 <mem_free+0x6e>
LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: double free");
8004626: 4b14 ldr r3, [pc, #80] ; (8004678 <mem_free+0xb0>)
8004628: f44f 7223 mov.w r2, #652 ; 0x28c
800462c: 4918 ldr r1, [pc, #96] ; (8004690 <mem_free+0xc8>)
800462e: 4814 ldr r0, [pc, #80] ; (8004680 <mem_free+0xb8>)
8004630: f00b fece bl 80103d0 <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;
8004634: e01d b.n 8004672 <mem_free+0xaa>
}
if (!mem_link_valid(mem)) {
8004636: 68f8 ldr r0, [r7, #12]
8004638: f7ff ff8a bl 8004550 <mem_link_valid>
800463c: 4603 mov r3, r0
800463e: 2b00 cmp r3, #0
8004640: d107 bne.n 8004652 <mem_free+0x8a>
LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: non-linked: double free");
8004642: 4b0d ldr r3, [pc, #52] ; (8004678 <mem_free+0xb0>)
8004644: f240 2295 movw r2, #661 ; 0x295
8004648: 4912 ldr r1, [pc, #72] ; (8004694 <mem_free+0xcc>)
800464a: 480d ldr r0, [pc, #52] ; (8004680 <mem_free+0xb8>)
800464c: f00b fec0 bl 80103d0 <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;
8004650: e00f b.n 8004672 <mem_free+0xaa>
}
/* mem is now unused. */
mem->used = 0;
8004652: 68fb ldr r3, [r7, #12]
8004654: 2200 movs r2, #0
8004656: 711a strb r2, [r3, #4]
if (mem < lfree) {
8004658: 4b0f ldr r3, [pc, #60] ; (8004698 <mem_free+0xd0>)
800465a: 681b ldr r3, [r3, #0]
800465c: 68fa ldr r2, [r7, #12]
800465e: 429a cmp r2, r3
8004660: d202 bcs.n 8004668 <mem_free+0xa0>
/* the newly freed struct is now the lowest */
lfree = mem;
8004662: 4a0d ldr r2, [pc, #52] ; (8004698 <mem_free+0xd0>)
8004664: 68fb ldr r3, [r7, #12]
8004666: 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);
8004668: 68f8 ldr r0, [r7, #12]
800466a: f7ff fe93 bl 8004394 <plug_holes>
800466e: e000 b.n 8004672 <mem_free+0xaa>
return;
8004670: 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();
}
8004672: 3710 adds r7, #16
8004674: 46bd mov sp, r7
8004676: bd80 pop {r7, pc}
8004678: 08014f44 .word 0x08014f44
800467c: 08015018 .word 0x08015018
8004680: 08014f8c .word 0x08014f8c
8004684: 20005cdc .word 0x20005cdc
8004688: 20005ce0 .word 0x20005ce0
800468c: 0801503c .word 0x0801503c
8004690: 08015058 .word 0x08015058
8004694: 08015080 .word 0x08015080
8004698: 20005ce4 .word 0x20005ce4
0800469c <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)
{
800469c: b580 push {r7, lr}
800469e: b088 sub sp, #32
80046a0: af00 add r7, sp, #0
80046a2: 6078 str r0, [r7, #4]
80046a4: 460b mov r3, r1
80046a6: 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);
80046a8: 887b ldrh r3, [r7, #2]
80046aa: 3303 adds r3, #3
80046ac: b29b uxth r3, r3
80046ae: f023 0303 bic.w r3, r3, #3
80046b2: 83fb strh r3, [r7, #30]
if (newsize < MIN_SIZE_ALIGNED) {
80046b4: 8bfb ldrh r3, [r7, #30]
80046b6: 2b0b cmp r3, #11
80046b8: d801 bhi.n 80046be <mem_trim+0x22>
/* every data block must be at least MIN_SIZE_ALIGNED long */
newsize = MIN_SIZE_ALIGNED;
80046ba: 230c movs r3, #12
80046bc: 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)) {
80046be: 8bfb ldrh r3, [r7, #30]
80046c0: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
80046c4: d803 bhi.n 80046ce <mem_trim+0x32>
80046c6: 8bfa ldrh r2, [r7, #30]
80046c8: 887b ldrh r3, [r7, #2]
80046ca: 429a cmp r2, r3
80046cc: d201 bcs.n 80046d2 <mem_trim+0x36>
return NULL;
80046ce: 2300 movs r3, #0
80046d0: e0cc b.n 800486c <mem_trim+0x1d0>
}
LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram &&
80046d2: 4b68 ldr r3, [pc, #416] ; (8004874 <mem_trim+0x1d8>)
80046d4: 681b ldr r3, [r3, #0]
80046d6: 687a ldr r2, [r7, #4]
80046d8: 429a cmp r2, r3
80046da: d304 bcc.n 80046e6 <mem_trim+0x4a>
80046dc: 4b66 ldr r3, [pc, #408] ; (8004878 <mem_trim+0x1dc>)
80046de: 681b ldr r3, [r3, #0]
80046e0: 687a ldr r2, [r7, #4]
80046e2: 429a cmp r2, r3
80046e4: d306 bcc.n 80046f4 <mem_trim+0x58>
80046e6: 4b65 ldr r3, [pc, #404] ; (800487c <mem_trim+0x1e0>)
80046e8: f240 22d1 movw r2, #721 ; 0x2d1
80046ec: 4964 ldr r1, [pc, #400] ; (8004880 <mem_trim+0x1e4>)
80046ee: 4865 ldr r0, [pc, #404] ; (8004884 <mem_trim+0x1e8>)
80046f0: f00b fe6e bl 80103d0 <printf>
(u8_t *)rmem < (u8_t *)ram_end);
if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) {
80046f4: 4b5f ldr r3, [pc, #380] ; (8004874 <mem_trim+0x1d8>)
80046f6: 681b ldr r3, [r3, #0]
80046f8: 687a ldr r2, [r7, #4]
80046fa: 429a cmp r2, r3
80046fc: d304 bcc.n 8004708 <mem_trim+0x6c>
80046fe: 4b5e ldr r3, [pc, #376] ; (8004878 <mem_trim+0x1dc>)
8004700: 681b ldr r3, [r3, #0]
8004702: 687a ldr r2, [r7, #4]
8004704: 429a cmp r2, r3
8004706: d301 bcc.n 800470c <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;
8004708: 687b ldr r3, [r7, #4]
800470a: e0af b.n 800486c <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));
800470c: 687b ldr r3, [r7, #4]
800470e: 3b08 subs r3, #8
8004710: 61bb str r3, [r7, #24]
#if MEM_OVERFLOW_CHECK
mem_overflow_check_element(mem);
#endif
/* ... and its offset pointer */
ptr = mem_to_ptr(mem);
8004712: 69b8 ldr r0, [r7, #24]
8004714: f7ff fe2c bl 8004370 <mem_to_ptr>
8004718: 4603 mov r3, r0
800471a: 82fb strh r3, [r7, #22]
size = (mem_size_t)((mem_size_t)(mem->next - ptr) - (SIZEOF_STRUCT_MEM + MEM_SANITY_OVERHEAD));
800471c: 69bb ldr r3, [r7, #24]
800471e: 881a ldrh r2, [r3, #0]
8004720: 8afb ldrh r3, [r7, #22]
8004722: 1ad3 subs r3, r2, r3
8004724: b29b uxth r3, r3
8004726: 3b08 subs r3, #8
8004728: 82bb strh r3, [r7, #20]
LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size);
800472a: 8bfa ldrh r2, [r7, #30]
800472c: 8abb ldrh r3, [r7, #20]
800472e: 429a cmp r2, r3
8004730: d906 bls.n 8004740 <mem_trim+0xa4>
8004732: 4b52 ldr r3, [pc, #328] ; (800487c <mem_trim+0x1e0>)
8004734: f44f 7239 mov.w r2, #740 ; 0x2e4
8004738: 4953 ldr r1, [pc, #332] ; (8004888 <mem_trim+0x1ec>)
800473a: 4852 ldr r0, [pc, #328] ; (8004884 <mem_trim+0x1e8>)
800473c: f00b fe48 bl 80103d0 <printf>
if (newsize > size) {
8004740: 8bfa ldrh r2, [r7, #30]
8004742: 8abb ldrh r3, [r7, #20]
8004744: 429a cmp r2, r3
8004746: d901 bls.n 800474c <mem_trim+0xb0>
/* not supported */
return NULL;
8004748: 2300 movs r3, #0
800474a: e08f b.n 800486c <mem_trim+0x1d0>
}
if (newsize == size) {
800474c: 8bfa ldrh r2, [r7, #30]
800474e: 8abb ldrh r3, [r7, #20]
8004750: 429a cmp r2, r3
8004752: d101 bne.n 8004758 <mem_trim+0xbc>
/* No change in size, simply return */
return rmem;
8004754: 687b ldr r3, [r7, #4]
8004756: e089 b.n 800486c <mem_trim+0x1d0>
}
/* protect the heap from concurrent access */
LWIP_MEM_FREE_PROTECT();
mem2 = ptr_to_mem(mem->next);
8004758: 69bb ldr r3, [r7, #24]
800475a: 881b ldrh r3, [r3, #0]
800475c: 4618 mov r0, r3
800475e: f7ff fdf5 bl 800434c <ptr_to_mem>
8004762: 6138 str r0, [r7, #16]
if (mem2->used == 0) {
8004764: 693b ldr r3, [r7, #16]
8004766: 791b ldrb r3, [r3, #4]
8004768: 2b00 cmp r3, #0
800476a: d13f bne.n 80047ec <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);
800476c: 69bb ldr r3, [r7, #24]
800476e: 881b ldrh r3, [r3, #0]
8004770: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8004774: d106 bne.n 8004784 <mem_trim+0xe8>
8004776: 4b41 ldr r3, [pc, #260] ; (800487c <mem_trim+0x1e0>)
8004778: f240 22f5 movw r2, #757 ; 0x2f5
800477c: 4943 ldr r1, [pc, #268] ; (800488c <mem_trim+0x1f0>)
800477e: 4841 ldr r0, [pc, #260] ; (8004884 <mem_trim+0x1e8>)
8004780: f00b fe26 bl 80103d0 <printf>
/* remember the old next pointer */
next = mem2->next;
8004784: 693b ldr r3, [r7, #16]
8004786: 881b ldrh r3, [r3, #0]
8004788: 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);
800478a: 8afa ldrh r2, [r7, #22]
800478c: 8bfb ldrh r3, [r7, #30]
800478e: 4413 add r3, r2
8004790: b29b uxth r3, r3
8004792: 3308 adds r3, #8
8004794: 81fb strh r3, [r7, #14]
if (lfree == mem2) {
8004796: 4b3e ldr r3, [pc, #248] ; (8004890 <mem_trim+0x1f4>)
8004798: 681b ldr r3, [r3, #0]
800479a: 693a ldr r2, [r7, #16]
800479c: 429a cmp r2, r3
800479e: d106 bne.n 80047ae <mem_trim+0x112>
lfree = ptr_to_mem(ptr2);
80047a0: 89fb ldrh r3, [r7, #14]
80047a2: 4618 mov r0, r3
80047a4: f7ff fdd2 bl 800434c <ptr_to_mem>
80047a8: 4603 mov r3, r0
80047aa: 4a39 ldr r2, [pc, #228] ; (8004890 <mem_trim+0x1f4>)
80047ac: 6013 str r3, [r2, #0]
}
mem2 = ptr_to_mem(ptr2);
80047ae: 89fb ldrh r3, [r7, #14]
80047b0: 4618 mov r0, r3
80047b2: f7ff fdcb bl 800434c <ptr_to_mem>
80047b6: 6138 str r0, [r7, #16]
mem2->used = 0;
80047b8: 693b ldr r3, [r7, #16]
80047ba: 2200 movs r2, #0
80047bc: 711a strb r2, [r3, #4]
/* restore the next pointer */
mem2->next = next;
80047be: 693b ldr r3, [r7, #16]
80047c0: 89ba ldrh r2, [r7, #12]
80047c2: 801a strh r2, [r3, #0]
/* link it back to mem */
mem2->prev = ptr;
80047c4: 693b ldr r3, [r7, #16]
80047c6: 8afa ldrh r2, [r7, #22]
80047c8: 805a strh r2, [r3, #2]
/* link mem to it */
mem->next = ptr2;
80047ca: 69bb ldr r3, [r7, #24]
80047cc: 89fa ldrh r2, [r7, #14]
80047ce: 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) {
80047d0: 693b ldr r3, [r7, #16]
80047d2: 881b ldrh r3, [r3, #0]
80047d4: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
80047d8: d047 beq.n 800486a <mem_trim+0x1ce>
ptr_to_mem(mem2->next)->prev = ptr2;
80047da: 693b ldr r3, [r7, #16]
80047dc: 881b ldrh r3, [r3, #0]
80047de: 4618 mov r0, r3
80047e0: f7ff fdb4 bl 800434c <ptr_to_mem>
80047e4: 4602 mov r2, r0
80047e6: 89fb ldrh r3, [r7, #14]
80047e8: 8053 strh r3, [r2, #2]
80047ea: e03e b.n 800486a <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) {
80047ec: 8bfb ldrh r3, [r7, #30]
80047ee: f103 0214 add.w r2, r3, #20
80047f2: 8abb ldrh r3, [r7, #20]
80047f4: 429a cmp r2, r3
80047f6: d838 bhi.n 800486a <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);
80047f8: 8afa ldrh r2, [r7, #22]
80047fa: 8bfb ldrh r3, [r7, #30]
80047fc: 4413 add r3, r2
80047fe: b29b uxth r3, r3
8004800: 3308 adds r3, #8
8004802: 81fb strh r3, [r7, #14]
LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED);
8004804: 69bb ldr r3, [r7, #24]
8004806: 881b ldrh r3, [r3, #0]
8004808: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
800480c: d106 bne.n 800481c <mem_trim+0x180>
800480e: 4b1b ldr r3, [pc, #108] ; (800487c <mem_trim+0x1e0>)
8004810: f240 3216 movw r2, #790 ; 0x316
8004814: 491d ldr r1, [pc, #116] ; (800488c <mem_trim+0x1f0>)
8004816: 481b ldr r0, [pc, #108] ; (8004884 <mem_trim+0x1e8>)
8004818: f00b fdda bl 80103d0 <printf>
mem2 = ptr_to_mem(ptr2);
800481c: 89fb ldrh r3, [r7, #14]
800481e: 4618 mov r0, r3
8004820: f7ff fd94 bl 800434c <ptr_to_mem>
8004824: 6138 str r0, [r7, #16]
if (mem2 < lfree) {
8004826: 4b1a ldr r3, [pc, #104] ; (8004890 <mem_trim+0x1f4>)
8004828: 681b ldr r3, [r3, #0]
800482a: 693a ldr r2, [r7, #16]
800482c: 429a cmp r2, r3
800482e: d202 bcs.n 8004836 <mem_trim+0x19a>
lfree = mem2;
8004830: 4a17 ldr r2, [pc, #92] ; (8004890 <mem_trim+0x1f4>)
8004832: 693b ldr r3, [r7, #16]
8004834: 6013 str r3, [r2, #0]
}
mem2->used = 0;
8004836: 693b ldr r3, [r7, #16]
8004838: 2200 movs r2, #0
800483a: 711a strb r2, [r3, #4]
mem2->next = mem->next;
800483c: 69bb ldr r3, [r7, #24]
800483e: 881a ldrh r2, [r3, #0]
8004840: 693b ldr r3, [r7, #16]
8004842: 801a strh r2, [r3, #0]
mem2->prev = ptr;
8004844: 693b ldr r3, [r7, #16]
8004846: 8afa ldrh r2, [r7, #22]
8004848: 805a strh r2, [r3, #2]
mem->next = ptr2;
800484a: 69bb ldr r3, [r7, #24]
800484c: 89fa ldrh r2, [r7, #14]
800484e: 801a strh r2, [r3, #0]
if (mem2->next != MEM_SIZE_ALIGNED) {
8004850: 693b ldr r3, [r7, #16]
8004852: 881b ldrh r3, [r3, #0]
8004854: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8004858: d007 beq.n 800486a <mem_trim+0x1ce>
ptr_to_mem(mem2->next)->prev = ptr2;
800485a: 693b ldr r3, [r7, #16]
800485c: 881b ldrh r3, [r3, #0]
800485e: 4618 mov r0, r3
8004860: f7ff fd74 bl 800434c <ptr_to_mem>
8004864: 4602 mov r2, r0
8004866: 89fb ldrh r3, [r7, #14]
8004868: 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;
800486a: 687b ldr r3, [r7, #4]
}
800486c: 4618 mov r0, r3
800486e: 3720 adds r7, #32
8004870: 46bd mov sp, r7
8004872: bd80 pop {r7, pc}
8004874: 20005cdc .word 0x20005cdc
8004878: 20005ce0 .word 0x20005ce0
800487c: 08014f44 .word 0x08014f44
8004880: 080150b4 .word 0x080150b4
8004884: 08014f8c .word 0x08014f8c
8004888: 080150cc .word 0x080150cc
800488c: 080150ec .word 0x080150ec
8004890: 20005ce4 .word 0x20005ce4
08004894 <mem_malloc>:
*
* Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT).
*/
void *
mem_malloc(mem_size_t size_in)
{
8004894: b580 push {r7, lr}
8004896: b088 sub sp, #32
8004898: af00 add r7, sp, #0
800489a: 4603 mov r3, r0
800489c: 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) {
800489e: 88fb ldrh r3, [r7, #6]
80048a0: 2b00 cmp r3, #0
80048a2: d101 bne.n 80048a8 <mem_malloc+0x14>
return NULL;
80048a4: 2300 movs r3, #0
80048a6: e0d9 b.n 8004a5c <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);
80048a8: 88fb ldrh r3, [r7, #6]
80048aa: 3303 adds r3, #3
80048ac: b29b uxth r3, r3
80048ae: f023 0303 bic.w r3, r3, #3
80048b2: 83bb strh r3, [r7, #28]
if (size < MIN_SIZE_ALIGNED) {
80048b4: 8bbb ldrh r3, [r7, #28]
80048b6: 2b0b cmp r3, #11
80048b8: d801 bhi.n 80048be <mem_malloc+0x2a>
/* every data block must be at least MIN_SIZE_ALIGNED long */
size = MIN_SIZE_ALIGNED;
80048ba: 230c movs r3, #12
80048bc: 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)) {
80048be: 8bbb ldrh r3, [r7, #28]
80048c0: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
80048c4: d803 bhi.n 80048ce <mem_malloc+0x3a>
80048c6: 8bba ldrh r2, [r7, #28]
80048c8: 88fb ldrh r3, [r7, #6]
80048ca: 429a cmp r2, r3
80048cc: d201 bcs.n 80048d2 <mem_malloc+0x3e>
return NULL;
80048ce: 2300 movs r3, #0
80048d0: e0c4 b.n 8004a5c <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;
80048d2: 4b64 ldr r3, [pc, #400] ; (8004a64 <mem_malloc+0x1d0>)
80048d4: 681b ldr r3, [r3, #0]
80048d6: 4618 mov r0, r3
80048d8: f7ff fd4a bl 8004370 <mem_to_ptr>
80048dc: 4603 mov r3, r0
80048de: 83fb strh r3, [r7, #30]
80048e0: e0b4 b.n 8004a4c <mem_malloc+0x1b8>
ptr = ptr_to_mem(ptr)->next) {
mem = ptr_to_mem(ptr);
80048e2: 8bfb ldrh r3, [r7, #30]
80048e4: 4618 mov r0, r3
80048e6: f7ff fd31 bl 800434c <ptr_to_mem>
80048ea: 6178 str r0, [r7, #20]
local_mem_free_count = 1;
break;
}
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
if ((!mem->used) &&
80048ec: 697b ldr r3, [r7, #20]
80048ee: 791b ldrb r3, [r3, #4]
80048f0: 2b00 cmp r3, #0
80048f2: f040 80a4 bne.w 8004a3e <mem_malloc+0x1aa>
(mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) {
80048f6: 697b ldr r3, [r7, #20]
80048f8: 881b ldrh r3, [r3, #0]
80048fa: 461a mov r2, r3
80048fc: 8bfb ldrh r3, [r7, #30]
80048fe: 1ad3 subs r3, r2, r3
8004900: f1a3 0208 sub.w r2, r3, #8
8004904: 8bbb ldrh r3, [r7, #28]
if ((!mem->used) &&
8004906: 429a cmp r2, r3
8004908: f0c0 8099 bcc.w 8004a3e <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)) {
800490c: 697b ldr r3, [r7, #20]
800490e: 881b ldrh r3, [r3, #0]
8004910: 461a mov r2, r3
8004912: 8bfb ldrh r3, [r7, #30]
8004914: 1ad3 subs r3, r2, r3
8004916: f1a3 0208 sub.w r2, r3, #8
800491a: 8bbb ldrh r3, [r7, #28]
800491c: 3314 adds r3, #20
800491e: 429a cmp r2, r3
8004920: d333 bcc.n 800498a <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);
8004922: 8bfa ldrh r2, [r7, #30]
8004924: 8bbb ldrh r3, [r7, #28]
8004926: 4413 add r3, r2
8004928: b29b uxth r3, r3
800492a: 3308 adds r3, #8
800492c: 827b strh r3, [r7, #18]
LWIP_ASSERT("invalid next ptr",ptr2 != MEM_SIZE_ALIGNED);
800492e: 8a7b ldrh r3, [r7, #18]
8004930: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8004934: d106 bne.n 8004944 <mem_malloc+0xb0>
8004936: 4b4c ldr r3, [pc, #304] ; (8004a68 <mem_malloc+0x1d4>)
8004938: f240 3287 movw r2, #903 ; 0x387
800493c: 494b ldr r1, [pc, #300] ; (8004a6c <mem_malloc+0x1d8>)
800493e: 484c ldr r0, [pc, #304] ; (8004a70 <mem_malloc+0x1dc>)
8004940: f00b fd46 bl 80103d0 <printf>
/* create mem2 struct */
mem2 = ptr_to_mem(ptr2);
8004944: 8a7b ldrh r3, [r7, #18]
8004946: 4618 mov r0, r3
8004948: f7ff fd00 bl 800434c <ptr_to_mem>
800494c: 60f8 str r0, [r7, #12]
mem2->used = 0;
800494e: 68fb ldr r3, [r7, #12]
8004950: 2200 movs r2, #0
8004952: 711a strb r2, [r3, #4]
mem2->next = mem->next;
8004954: 697b ldr r3, [r7, #20]
8004956: 881a ldrh r2, [r3, #0]
8004958: 68fb ldr r3, [r7, #12]
800495a: 801a strh r2, [r3, #0]
mem2->prev = ptr;
800495c: 68fb ldr r3, [r7, #12]
800495e: 8bfa ldrh r2, [r7, #30]
8004960: 805a strh r2, [r3, #2]
/* and insert it between mem and mem->next */
mem->next = ptr2;
8004962: 697b ldr r3, [r7, #20]
8004964: 8a7a ldrh r2, [r7, #18]
8004966: 801a strh r2, [r3, #0]
mem->used = 1;
8004968: 697b ldr r3, [r7, #20]
800496a: 2201 movs r2, #1
800496c: 711a strb r2, [r3, #4]
if (mem2->next != MEM_SIZE_ALIGNED) {
800496e: 68fb ldr r3, [r7, #12]
8004970: 881b ldrh r3, [r3, #0]
8004972: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8004976: d00b beq.n 8004990 <mem_malloc+0xfc>
ptr_to_mem(mem2->next)->prev = ptr2;
8004978: 68fb ldr r3, [r7, #12]
800497a: 881b ldrh r3, [r3, #0]
800497c: 4618 mov r0, r3
800497e: f7ff fce5 bl 800434c <ptr_to_mem>
8004982: 4602 mov r2, r0
8004984: 8a7b ldrh r3, [r7, #18]
8004986: 8053 strh r3, [r2, #2]
8004988: e002 b.n 8004990 <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;
800498a: 697b ldr r3, [r7, #20]
800498c: 2201 movs r2, #1
800498e: 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) {
8004990: 4b34 ldr r3, [pc, #208] ; (8004a64 <mem_malloc+0x1d0>)
8004992: 681b ldr r3, [r3, #0]
8004994: 697a ldr r2, [r7, #20]
8004996: 429a cmp r2, r3
8004998: d127 bne.n 80049ea <mem_malloc+0x156>
struct mem *cur = lfree;
800499a: 4b32 ldr r3, [pc, #200] ; (8004a64 <mem_malloc+0x1d0>)
800499c: 681b ldr r3, [r3, #0]
800499e: 61bb str r3, [r7, #24]
/* Find next free block after mem and update lowest free pointer */
while (cur->used && cur != ram_end) {
80049a0: e005 b.n 80049ae <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);
80049a2: 69bb ldr r3, [r7, #24]
80049a4: 881b ldrh r3, [r3, #0]
80049a6: 4618 mov r0, r3
80049a8: f7ff fcd0 bl 800434c <ptr_to_mem>
80049ac: 61b8 str r0, [r7, #24]
while (cur->used && cur != ram_end) {
80049ae: 69bb ldr r3, [r7, #24]
80049b0: 791b ldrb r3, [r3, #4]
80049b2: 2b00 cmp r3, #0
80049b4: d004 beq.n 80049c0 <mem_malloc+0x12c>
80049b6: 4b2f ldr r3, [pc, #188] ; (8004a74 <mem_malloc+0x1e0>)
80049b8: 681b ldr r3, [r3, #0]
80049ba: 69ba ldr r2, [r7, #24]
80049bc: 429a cmp r2, r3
80049be: d1f0 bne.n 80049a2 <mem_malloc+0x10e>
}
lfree = cur;
80049c0: 4a28 ldr r2, [pc, #160] ; (8004a64 <mem_malloc+0x1d0>)
80049c2: 69bb ldr r3, [r7, #24]
80049c4: 6013 str r3, [r2, #0]
LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used)));
80049c6: 4b27 ldr r3, [pc, #156] ; (8004a64 <mem_malloc+0x1d0>)
80049c8: 681a ldr r2, [r3, #0]
80049ca: 4b2a ldr r3, [pc, #168] ; (8004a74 <mem_malloc+0x1e0>)
80049cc: 681b ldr r3, [r3, #0]
80049ce: 429a cmp r2, r3
80049d0: d00b beq.n 80049ea <mem_malloc+0x156>
80049d2: 4b24 ldr r3, [pc, #144] ; (8004a64 <mem_malloc+0x1d0>)
80049d4: 681b ldr r3, [r3, #0]
80049d6: 791b ldrb r3, [r3, #4]
80049d8: 2b00 cmp r3, #0
80049da: d006 beq.n 80049ea <mem_malloc+0x156>
80049dc: 4b22 ldr r3, [pc, #136] ; (8004a68 <mem_malloc+0x1d4>)
80049de: f240 32b5 movw r2, #949 ; 0x3b5
80049e2: 4925 ldr r1, [pc, #148] ; (8004a78 <mem_malloc+0x1e4>)
80049e4: 4822 ldr r0, [pc, #136] ; (8004a70 <mem_malloc+0x1dc>)
80049e6: f00b fcf3 bl 80103d0 <printf>
}
LWIP_MEM_ALLOC_UNPROTECT();
sys_mutex_unlock(&mem_mutex);
LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.",
80049ea: 8bba ldrh r2, [r7, #28]
80049ec: 697b ldr r3, [r7, #20]
80049ee: 4413 add r3, r2
80049f0: 3308 adds r3, #8
80049f2: 4a20 ldr r2, [pc, #128] ; (8004a74 <mem_malloc+0x1e0>)
80049f4: 6812 ldr r2, [r2, #0]
80049f6: 4293 cmp r3, r2
80049f8: d906 bls.n 8004a08 <mem_malloc+0x174>
80049fa: 4b1b ldr r3, [pc, #108] ; (8004a68 <mem_malloc+0x1d4>)
80049fc: f240 32b9 movw r2, #953 ; 0x3b9
8004a00: 491e ldr r1, [pc, #120] ; (8004a7c <mem_malloc+0x1e8>)
8004a02: 481b ldr r0, [pc, #108] ; (8004a70 <mem_malloc+0x1dc>)
8004a04: f00b fce4 bl 80103d0 <printf>
(mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end);
LWIP_ASSERT("mem_malloc: allocated memory properly aligned.",
8004a08: 697b ldr r3, [r7, #20]
8004a0a: f003 0303 and.w r3, r3, #3
8004a0e: 2b00 cmp r3, #0
8004a10: d006 beq.n 8004a20 <mem_malloc+0x18c>
8004a12: 4b15 ldr r3, [pc, #84] ; (8004a68 <mem_malloc+0x1d4>)
8004a14: f240 32bb movw r2, #955 ; 0x3bb
8004a18: 4919 ldr r1, [pc, #100] ; (8004a80 <mem_malloc+0x1ec>)
8004a1a: 4815 ldr r0, [pc, #84] ; (8004a70 <mem_malloc+0x1dc>)
8004a1c: f00b fcd8 bl 80103d0 <printf>
((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0);
LWIP_ASSERT("mem_malloc: sanity check alignment",
8004a20: 697b ldr r3, [r7, #20]
8004a22: f003 0303 and.w r3, r3, #3
8004a26: 2b00 cmp r3, #0
8004a28: d006 beq.n 8004a38 <mem_malloc+0x1a4>
8004a2a: 4b0f ldr r3, [pc, #60] ; (8004a68 <mem_malloc+0x1d4>)
8004a2c: f240 32bd movw r2, #957 ; 0x3bd
8004a30: 4914 ldr r1, [pc, #80] ; (8004a84 <mem_malloc+0x1f0>)
8004a32: 480f ldr r0, [pc, #60] ; (8004a70 <mem_malloc+0x1dc>)
8004a34: f00b fccc bl 80103d0 <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;
8004a38: 697b ldr r3, [r7, #20]
8004a3a: 3308 adds r3, #8
8004a3c: e00e b.n 8004a5c <mem_malloc+0x1c8>
ptr = ptr_to_mem(ptr)->next) {
8004a3e: 8bfb ldrh r3, [r7, #30]
8004a40: 4618 mov r0, r3
8004a42: f7ff fc83 bl 800434c <ptr_to_mem>
8004a46: 4603 mov r3, r0
8004a48: 881b ldrh r3, [r3, #0]
8004a4a: 83fb strh r3, [r7, #30]
for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size;
8004a4c: 8bfa ldrh r2, [r7, #30]
8004a4e: 8bbb ldrh r3, [r7, #28]
8004a50: f5c3 63c8 rsb r3, r3, #1600 ; 0x640
8004a54: 429a cmp r2, r3
8004a56: f4ff af44 bcc.w 80048e2 <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;
8004a5a: 2300 movs r3, #0
}
8004a5c: 4618 mov r0, r3
8004a5e: 3720 adds r7, #32
8004a60: 46bd mov sp, r7
8004a62: bd80 pop {r7, pc}
8004a64: 20005ce4 .word 0x20005ce4
8004a68: 08014f44 .word 0x08014f44
8004a6c: 080150ec .word 0x080150ec
8004a70: 08014f8c .word 0x08014f8c
8004a74: 20005ce0 .word 0x20005ce0
8004a78: 08015100 .word 0x08015100
8004a7c: 0801511c .word 0x0801511c
8004a80: 0801514c .word 0x0801514c
8004a84: 0801517c .word 0x0801517c
08004a88 <memp_init_pool>:
*
* @param desc pool to initialize
*/
void
memp_init_pool(const struct memp_desc *desc)
{
8004a88: b480 push {r7}
8004a8a: b085 sub sp, #20
8004a8c: af00 add r7, sp, #0
8004a8e: 6078 str r0, [r7, #4]
LWIP_UNUSED_ARG(desc);
#else
int i;
struct memp *memp;
*desc->tab = NULL;
8004a90: 687b ldr r3, [r7, #4]
8004a92: 689b ldr r3, [r3, #8]
8004a94: 2200 movs r2, #0
8004a96: 601a str r2, [r3, #0]
memp = (struct memp *)LWIP_MEM_ALIGN(desc->base);
8004a98: 687b ldr r3, [r7, #4]
8004a9a: 685b ldr r3, [r3, #4]
8004a9c: 3303 adds r3, #3
8004a9e: f023 0303 bic.w r3, r3, #3
8004aa2: 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) {
8004aa4: 2300 movs r3, #0
8004aa6: 60fb str r3, [r7, #12]
8004aa8: e011 b.n 8004ace <memp_init_pool+0x46>
memp->next = *desc->tab;
8004aaa: 687b ldr r3, [r7, #4]
8004aac: 689b ldr r3, [r3, #8]
8004aae: 681a ldr r2, [r3, #0]
8004ab0: 68bb ldr r3, [r7, #8]
8004ab2: 601a str r2, [r3, #0]
*desc->tab = memp;
8004ab4: 687b ldr r3, [r7, #4]
8004ab6: 689b ldr r3, [r3, #8]
8004ab8: 68ba ldr r2, [r7, #8]
8004aba: 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
8004abc: 687b ldr r3, [r7, #4]
8004abe: 881b ldrh r3, [r3, #0]
8004ac0: 461a mov r2, r3
8004ac2: 68bb ldr r3, [r7, #8]
8004ac4: 4413 add r3, r2
8004ac6: 60bb str r3, [r7, #8]
for (i = 0; i < desc->num; ++i) {
8004ac8: 68fb ldr r3, [r7, #12]
8004aca: 3301 adds r3, #1
8004acc: 60fb str r3, [r7, #12]
8004ace: 687b ldr r3, [r7, #4]
8004ad0: 885b ldrh r3, [r3, #2]
8004ad2: 461a mov r2, r3
8004ad4: 68fb ldr r3, [r7, #12]
8004ad6: 4293 cmp r3, r2
8004ad8: dbe7 blt.n 8004aaa <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) */
}
8004ada: bf00 nop
8004adc: bf00 nop
8004ade: 3714 adds r7, #20
8004ae0: 46bd mov sp, r7
8004ae2: f85d 7b04 ldr.w r7, [sp], #4
8004ae6: 4770 bx lr
08004ae8 <memp_init>:
*
* Carves out memp_memory into linked lists for each pool-type.
*/
void
memp_init(void)
{
8004ae8: b580 push {r7, lr}
8004aea: b082 sub sp, #8
8004aec: af00 add r7, sp, #0
u16_t i;
/* for every pool: */
for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) {
8004aee: 2300 movs r3, #0
8004af0: 80fb strh r3, [r7, #6]
8004af2: e009 b.n 8004b08 <memp_init+0x20>
memp_init_pool(memp_pools[i]);
8004af4: 88fb ldrh r3, [r7, #6]
8004af6: 4a08 ldr r2, [pc, #32] ; (8004b18 <memp_init+0x30>)
8004af8: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8004afc: 4618 mov r0, r3
8004afe: f7ff ffc3 bl 8004a88 <memp_init_pool>
for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) {
8004b02: 88fb ldrh r3, [r7, #6]
8004b04: 3301 adds r3, #1
8004b06: 80fb strh r3, [r7, #6]
8004b08: 88fb ldrh r3, [r7, #6]
8004b0a: 2b08 cmp r3, #8
8004b0c: d9f2 bls.n 8004af4 <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 */
}
8004b0e: bf00 nop
8004b10: bf00 nop
8004b12: 3708 adds r7, #8
8004b14: 46bd mov sp, r7
8004b16: bd80 pop {r7, pc}
8004b18: 08017d68 .word 0x08017d68
08004b1c <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
{
8004b1c: b580 push {r7, lr}
8004b1e: b084 sub sp, #16
8004b20: af00 add r7, sp, #0
8004b22: 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;
8004b24: 687b ldr r3, [r7, #4]
8004b26: 689b ldr r3, [r3, #8]
8004b28: 681b ldr r3, [r3, #0]
8004b2a: 60fb str r3, [r7, #12]
#endif /* MEMP_MEM_MALLOC */
if (memp != NULL) {
8004b2c: 68fb ldr r3, [r7, #12]
8004b2e: 2b00 cmp r3, #0
8004b30: d012 beq.n 8004b58 <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;
8004b32: 687b ldr r3, [r7, #4]
8004b34: 689b ldr r3, [r3, #8]
8004b36: 68fa ldr r2, [r7, #12]
8004b38: 6812 ldr r2, [r2, #0]
8004b3a: 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",
8004b3c: 68fb ldr r3, [r7, #12]
8004b3e: f003 0303 and.w r3, r3, #3
8004b42: 2b00 cmp r3, #0
8004b44: d006 beq.n 8004b54 <do_memp_malloc_pool+0x38>
8004b46: 4b07 ldr r3, [pc, #28] ; (8004b64 <do_memp_malloc_pool+0x48>)
8004b48: f44f 728c mov.w r2, #280 ; 0x118
8004b4c: 4906 ldr r1, [pc, #24] ; (8004b68 <do_memp_malloc_pool+0x4c>)
8004b4e: 4807 ldr r0, [pc, #28] ; (8004b6c <do_memp_malloc_pool+0x50>)
8004b50: f00b fc3e bl 80103d0 <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);
8004b54: 68fb ldr r3, [r7, #12]
8004b56: e000 b.n 8004b5a <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;
8004b58: 2300 movs r3, #0
}
8004b5a: 4618 mov r0, r3
8004b5c: 3710 adds r7, #16
8004b5e: 46bd mov sp, r7
8004b60: bd80 pop {r7, pc}
8004b62: bf00 nop
8004b64: 080151a0 .word 0x080151a0
8004b68: 080151d0 .word 0x080151d0
8004b6c: 080151f4 .word 0x080151f4
08004b70 <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
{
8004b70: b580 push {r7, lr}
8004b72: b082 sub sp, #8
8004b74: af00 add r7, sp, #0
8004b76: 6078 str r0, [r7, #4]
LWIP_ASSERT("invalid pool desc", desc != NULL);
8004b78: 687b ldr r3, [r7, #4]
8004b7a: 2b00 cmp r3, #0
8004b7c: d106 bne.n 8004b8c <memp_malloc_pool+0x1c>
8004b7e: 4b0a ldr r3, [pc, #40] ; (8004ba8 <memp_malloc_pool+0x38>)
8004b80: f44f 729e mov.w r2, #316 ; 0x13c
8004b84: 4909 ldr r1, [pc, #36] ; (8004bac <memp_malloc_pool+0x3c>)
8004b86: 480a ldr r0, [pc, #40] ; (8004bb0 <memp_malloc_pool+0x40>)
8004b88: f00b fc22 bl 80103d0 <printf>
if (desc == NULL) {
8004b8c: 687b ldr r3, [r7, #4]
8004b8e: 2b00 cmp r3, #0
8004b90: d101 bne.n 8004b96 <memp_malloc_pool+0x26>
return NULL;
8004b92: 2300 movs r3, #0
8004b94: e003 b.n 8004b9e <memp_malloc_pool+0x2e>
}
#if !MEMP_OVERFLOW_CHECK
return do_memp_malloc_pool(desc);
8004b96: 6878 ldr r0, [r7, #4]
8004b98: f7ff ffc0 bl 8004b1c <do_memp_malloc_pool>
8004b9c: 4603 mov r3, r0
#else
return do_memp_malloc_pool_fn(desc, file, line);
#endif
}
8004b9e: 4618 mov r0, r3
8004ba0: 3708 adds r7, #8
8004ba2: 46bd mov sp, r7
8004ba4: bd80 pop {r7, pc}
8004ba6: bf00 nop
8004ba8: 080151a0 .word 0x080151a0
8004bac: 0801521c .word 0x0801521c
8004bb0: 080151f4 .word 0x080151f4
08004bb4 <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
{
8004bb4: b580 push {r7, lr}
8004bb6: b084 sub sp, #16
8004bb8: af00 add r7, sp, #0
8004bba: 4603 mov r3, r0
8004bbc: 71fb strb r3, [r7, #7]
void *memp;
LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;);
8004bbe: 79fb ldrb r3, [r7, #7]
8004bc0: 2b08 cmp r3, #8
8004bc2: d908 bls.n 8004bd6 <memp_malloc+0x22>
8004bc4: 4b0a ldr r3, [pc, #40] ; (8004bf0 <memp_malloc+0x3c>)
8004bc6: f240 1257 movw r2, #343 ; 0x157
8004bca: 490a ldr r1, [pc, #40] ; (8004bf4 <memp_malloc+0x40>)
8004bcc: 480a ldr r0, [pc, #40] ; (8004bf8 <memp_malloc+0x44>)
8004bce: f00b fbff bl 80103d0 <printf>
8004bd2: 2300 movs r3, #0
8004bd4: e008 b.n 8004be8 <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]);
8004bd6: 79fb ldrb r3, [r7, #7]
8004bd8: 4a08 ldr r2, [pc, #32] ; (8004bfc <memp_malloc+0x48>)
8004bda: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8004bde: 4618 mov r0, r3
8004be0: f7ff ff9c bl 8004b1c <do_memp_malloc_pool>
8004be4: 60f8 str r0, [r7, #12]
#else
memp = do_memp_malloc_pool_fn(memp_pools[type], file, line);
#endif
return memp;
8004be6: 68fb ldr r3, [r7, #12]
}
8004be8: 4618 mov r0, r3
8004bea: 3710 adds r7, #16
8004bec: 46bd mov sp, r7
8004bee: bd80 pop {r7, pc}
8004bf0: 080151a0 .word 0x080151a0
8004bf4: 08015230 .word 0x08015230
8004bf8: 080151f4 .word 0x080151f4
8004bfc: 08017d68 .word 0x08017d68
08004c00 <do_memp_free_pool>:
static void
do_memp_free_pool(const struct memp_desc *desc, void *mem)
{
8004c00: b580 push {r7, lr}
8004c02: b084 sub sp, #16
8004c04: af00 add r7, sp, #0
8004c06: 6078 str r0, [r7, #4]
8004c08: 6039 str r1, [r7, #0]
struct memp *memp;
SYS_ARCH_DECL_PROTECT(old_level);
LWIP_ASSERT("memp_free: mem properly aligned",
8004c0a: 683b ldr r3, [r7, #0]
8004c0c: f003 0303 and.w r3, r3, #3
8004c10: 2b00 cmp r3, #0
8004c12: d006 beq.n 8004c22 <do_memp_free_pool+0x22>
8004c14: 4b0a ldr r3, [pc, #40] ; (8004c40 <do_memp_free_pool+0x40>)
8004c16: f44f 72b6 mov.w r2, #364 ; 0x16c
8004c1a: 490a ldr r1, [pc, #40] ; (8004c44 <do_memp_free_pool+0x44>)
8004c1c: 480a ldr r0, [pc, #40] ; (8004c48 <do_memp_free_pool+0x48>)
8004c1e: f00b fbd7 bl 80103d0 <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);
8004c22: 683b ldr r3, [r7, #0]
8004c24: 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;
8004c26: 687b ldr r3, [r7, #4]
8004c28: 689b ldr r3, [r3, #8]
8004c2a: 681a ldr r2, [r3, #0]
8004c2c: 68fb ldr r3, [r7, #12]
8004c2e: 601a str r2, [r3, #0]
*desc->tab = memp;
8004c30: 687b ldr r3, [r7, #4]
8004c32: 689b ldr r3, [r3, #8]
8004c34: 68fa ldr r2, [r7, #12]
8004c36: 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 */
}
8004c38: bf00 nop
8004c3a: 3710 adds r7, #16
8004c3c: 46bd mov sp, r7
8004c3e: bd80 pop {r7, pc}
8004c40: 080151a0 .word 0x080151a0
8004c44: 08015250 .word 0x08015250
8004c48: 080151f4 .word 0x080151f4
08004c4c <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)
{
8004c4c: b580 push {r7, lr}
8004c4e: b082 sub sp, #8
8004c50: af00 add r7, sp, #0
8004c52: 6078 str r0, [r7, #4]
8004c54: 6039 str r1, [r7, #0]
LWIP_ASSERT("invalid pool desc", desc != NULL);
8004c56: 687b ldr r3, [r7, #4]
8004c58: 2b00 cmp r3, #0
8004c5a: d106 bne.n 8004c6a <memp_free_pool+0x1e>
8004c5c: 4b0a ldr r3, [pc, #40] ; (8004c88 <memp_free_pool+0x3c>)
8004c5e: f240 1295 movw r2, #405 ; 0x195
8004c62: 490a ldr r1, [pc, #40] ; (8004c8c <memp_free_pool+0x40>)
8004c64: 480a ldr r0, [pc, #40] ; (8004c90 <memp_free_pool+0x44>)
8004c66: f00b fbb3 bl 80103d0 <printf>
if ((desc == NULL) || (mem == NULL)) {
8004c6a: 687b ldr r3, [r7, #4]
8004c6c: 2b00 cmp r3, #0
8004c6e: d007 beq.n 8004c80 <memp_free_pool+0x34>
8004c70: 683b ldr r3, [r7, #0]
8004c72: 2b00 cmp r3, #0
8004c74: d004 beq.n 8004c80 <memp_free_pool+0x34>
return;
}
do_memp_free_pool(desc, mem);
8004c76: 6839 ldr r1, [r7, #0]
8004c78: 6878 ldr r0, [r7, #4]
8004c7a: f7ff ffc1 bl 8004c00 <do_memp_free_pool>
8004c7e: e000 b.n 8004c82 <memp_free_pool+0x36>
return;
8004c80: bf00 nop
}
8004c82: 3708 adds r7, #8
8004c84: 46bd mov sp, r7
8004c86: bd80 pop {r7, pc}
8004c88: 080151a0 .word 0x080151a0
8004c8c: 0801521c .word 0x0801521c
8004c90: 080151f4 .word 0x080151f4
08004c94 <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)
{
8004c94: b580 push {r7, lr}
8004c96: b082 sub sp, #8
8004c98: af00 add r7, sp, #0
8004c9a: 4603 mov r3, r0
8004c9c: 6039 str r1, [r7, #0]
8004c9e: 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;);
8004ca0: 79fb ldrb r3, [r7, #7]
8004ca2: 2b08 cmp r3, #8
8004ca4: d907 bls.n 8004cb6 <memp_free+0x22>
8004ca6: 4b0c ldr r3, [pc, #48] ; (8004cd8 <memp_free+0x44>)
8004ca8: f44f 72d5 mov.w r2, #426 ; 0x1aa
8004cac: 490b ldr r1, [pc, #44] ; (8004cdc <memp_free+0x48>)
8004cae: 480c ldr r0, [pc, #48] ; (8004ce0 <memp_free+0x4c>)
8004cb0: f00b fb8e bl 80103d0 <printf>
8004cb4: e00c b.n 8004cd0 <memp_free+0x3c>
if (mem == NULL) {
8004cb6: 683b ldr r3, [r7, #0]
8004cb8: 2b00 cmp r3, #0
8004cba: d008 beq.n 8004cce <memp_free+0x3a>
#ifdef LWIP_HOOK_MEMP_AVAILABLE
old_first = *memp_pools[type]->tab;
#endif
do_memp_free_pool(memp_pools[type], mem);
8004cbc: 79fb ldrb r3, [r7, #7]
8004cbe: 4a09 ldr r2, [pc, #36] ; (8004ce4 <memp_free+0x50>)
8004cc0: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8004cc4: 6839 ldr r1, [r7, #0]
8004cc6: 4618 mov r0, r3
8004cc8: f7ff ff9a bl 8004c00 <do_memp_free_pool>
8004ccc: e000 b.n 8004cd0 <memp_free+0x3c>
return;
8004cce: bf00 nop
#ifdef LWIP_HOOK_MEMP_AVAILABLE
if (old_first == NULL) {
LWIP_HOOK_MEMP_AVAILABLE(type);
}
#endif
}
8004cd0: 3708 adds r7, #8
8004cd2: 46bd mov sp, r7
8004cd4: bd80 pop {r7, pc}
8004cd6: bf00 nop
8004cd8: 080151a0 .word 0x080151a0
8004cdc: 08015270 .word 0x08015270
8004ce0: 080151f4 .word 0x080151f4
8004ce4: 08017d68 .word 0x08017d68
08004ce8 <netif_init>:
}
#endif /* LWIP_HAVE_LOOPIF */
void
netif_init(void)
{
8004ce8: b480 push {r7}
8004cea: af00 add r7, sp, #0
netif_set_link_up(&loop_netif);
netif_set_up(&loop_netif);
#endif /* LWIP_HAVE_LOOPIF */
}
8004cec: bf00 nop
8004cee: 46bd mov sp, r7
8004cf0: f85d 7b04 ldr.w r7, [sp], #4
8004cf4: 4770 bx lr
...
08004cf8 <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)
{
8004cf8: b580 push {r7, lr}
8004cfa: b086 sub sp, #24
8004cfc: af00 add r7, sp, #0
8004cfe: 60f8 str r0, [r7, #12]
8004d00: 60b9 str r1, [r7, #8]
8004d02: 607a str r2, [r7, #4]
8004d04: 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);
8004d06: 68fb ldr r3, [r7, #12]
8004d08: 2b00 cmp r3, #0
8004d0a: d108 bne.n 8004d1e <netif_add+0x26>
8004d0c: 4b5b ldr r3, [pc, #364] ; (8004e7c <netif_add+0x184>)
8004d0e: f240 1227 movw r2, #295 ; 0x127
8004d12: 495b ldr r1, [pc, #364] ; (8004e80 <netif_add+0x188>)
8004d14: 485b ldr r0, [pc, #364] ; (8004e84 <netif_add+0x18c>)
8004d16: f00b fb5b bl 80103d0 <printf>
8004d1a: 2300 movs r3, #0
8004d1c: e0a9 b.n 8004e72 <netif_add+0x17a>
LWIP_ERROR("netif_add: No init function given", init != NULL, return NULL);
8004d1e: 6a7b ldr r3, [r7, #36] ; 0x24
8004d20: 2b00 cmp r3, #0
8004d22: d108 bne.n 8004d36 <netif_add+0x3e>
8004d24: 4b55 ldr r3, [pc, #340] ; (8004e7c <netif_add+0x184>)
8004d26: f44f 7294 mov.w r2, #296 ; 0x128
8004d2a: 4957 ldr r1, [pc, #348] ; (8004e88 <netif_add+0x190>)
8004d2c: 4855 ldr r0, [pc, #340] ; (8004e84 <netif_add+0x18c>)
8004d2e: f00b fb4f bl 80103d0 <printf>
8004d32: 2300 movs r3, #0
8004d34: e09d b.n 8004e72 <netif_add+0x17a>
#if LWIP_IPV4
if (ipaddr == NULL) {
8004d36: 68bb ldr r3, [r7, #8]
8004d38: 2b00 cmp r3, #0
8004d3a: d101 bne.n 8004d40 <netif_add+0x48>
ipaddr = ip_2_ip4(IP4_ADDR_ANY);
8004d3c: 4b53 ldr r3, [pc, #332] ; (8004e8c <netif_add+0x194>)
8004d3e: 60bb str r3, [r7, #8]
}
if (netmask == NULL) {
8004d40: 687b ldr r3, [r7, #4]
8004d42: 2b00 cmp r3, #0
8004d44: d101 bne.n 8004d4a <netif_add+0x52>
netmask = ip_2_ip4(IP4_ADDR_ANY);
8004d46: 4b51 ldr r3, [pc, #324] ; (8004e8c <netif_add+0x194>)
8004d48: 607b str r3, [r7, #4]
}
if (gw == NULL) {
8004d4a: 683b ldr r3, [r7, #0]
8004d4c: 2b00 cmp r3, #0
8004d4e: d101 bne.n 8004d54 <netif_add+0x5c>
gw = ip_2_ip4(IP4_ADDR_ANY);
8004d50: 4b4e ldr r3, [pc, #312] ; (8004e8c <netif_add+0x194>)
8004d52: 603b str r3, [r7, #0]
}
/* reset new interface configuration state */
ip_addr_set_zero_ip4(&netif->ip_addr);
8004d54: 68fb ldr r3, [r7, #12]
8004d56: 2200 movs r2, #0
8004d58: 605a str r2, [r3, #4]
ip_addr_set_zero_ip4(&netif->netmask);
8004d5a: 68fb ldr r3, [r7, #12]
8004d5c: 2200 movs r2, #0
8004d5e: 609a str r2, [r3, #8]
ip_addr_set_zero_ip4(&netif->gw);
8004d60: 68fb ldr r3, [r7, #12]
8004d62: 2200 movs r2, #0
8004d64: 60da str r2, [r3, #12]
netif->output = netif_null_output_ip4;
8004d66: 68fb ldr r3, [r7, #12]
8004d68: 4a49 ldr r2, [pc, #292] ; (8004e90 <netif_add+0x198>)
8004d6a: 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;
8004d6c: 68fb ldr r3, [r7, #12]
8004d6e: 2200 movs r2, #0
8004d70: 851a strh r2, [r3, #40] ; 0x28
netif->flags = 0;
8004d72: 68fb ldr r3, [r7, #12]
8004d74: 2200 movs r2, #0
8004d76: f883 2031 strb.w r2, [r3, #49] ; 0x31
#ifdef netif_get_client_data
memset(netif->client_data, 0, sizeof(netif->client_data));
8004d7a: 68fb ldr r3, [r7, #12]
8004d7c: 3324 adds r3, #36 ; 0x24
8004d7e: 2204 movs r2, #4
8004d80: 2100 movs r1, #0
8004d82: 4618 mov r0, r3
8004d84: f00b fb1c bl 80103c0 <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;
8004d88: 68fb ldr r3, [r7, #12]
8004d8a: 2200 movs r2, #0
8004d8c: 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;
8004d8e: 68fb ldr r3, [r7, #12]
8004d90: 6a3a ldr r2, [r7, #32]
8004d92: 621a str r2, [r3, #32]
netif->num = netif_num;
8004d94: 4b3f ldr r3, [pc, #252] ; (8004e94 <netif_add+0x19c>)
8004d96: 781a ldrb r2, [r3, #0]
8004d98: 68fb ldr r3, [r7, #12]
8004d9a: f883 2034 strb.w r2, [r3, #52] ; 0x34
netif->input = input;
8004d9e: 68fb ldr r3, [r7, #12]
8004da0: 6aba ldr r2, [r7, #40] ; 0x28
8004da2: 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);
8004da4: 683b ldr r3, [r7, #0]
8004da6: 687a ldr r2, [r7, #4]
8004da8: 68b9 ldr r1, [r7, #8]
8004daa: 68f8 ldr r0, [r7, #12]
8004dac: f000 f914 bl 8004fd8 <netif_set_addr>
#endif /* LWIP_IPV4 */
/* call user specified initialization function for netif */
if (init(netif) != ERR_OK) {
8004db0: 6a7b ldr r3, [r7, #36] ; 0x24
8004db2: 68f8 ldr r0, [r7, #12]
8004db4: 4798 blx r3
8004db6: 4603 mov r3, r0
8004db8: 2b00 cmp r3, #0
8004dba: d001 beq.n 8004dc0 <netif_add+0xc8>
return NULL;
8004dbc: 2300 movs r3, #0
8004dbe: e058 b.n 8004e72 <netif_add+0x17a>
*/
{
struct netif *netif2;
int num_netifs;
do {
if (netif->num == 255) {
8004dc0: 68fb ldr r3, [r7, #12]
8004dc2: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8004dc6: 2bff cmp r3, #255 ; 0xff
8004dc8: d103 bne.n 8004dd2 <netif_add+0xda>
netif->num = 0;
8004dca: 68fb ldr r3, [r7, #12]
8004dcc: 2200 movs r2, #0
8004dce: f883 2034 strb.w r2, [r3, #52] ; 0x34
}
num_netifs = 0;
8004dd2: 2300 movs r3, #0
8004dd4: 613b str r3, [r7, #16]
for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) {
8004dd6: 4b30 ldr r3, [pc, #192] ; (8004e98 <netif_add+0x1a0>)
8004dd8: 681b ldr r3, [r3, #0]
8004dda: 617b str r3, [r7, #20]
8004ddc: e02b b.n 8004e36 <netif_add+0x13e>
LWIP_ASSERT("netif already added", netif2 != netif);
8004dde: 697a ldr r2, [r7, #20]
8004de0: 68fb ldr r3, [r7, #12]
8004de2: 429a cmp r2, r3
8004de4: d106 bne.n 8004df4 <netif_add+0xfc>
8004de6: 4b25 ldr r3, [pc, #148] ; (8004e7c <netif_add+0x184>)
8004de8: f240 128b movw r2, #395 ; 0x18b
8004dec: 492b ldr r1, [pc, #172] ; (8004e9c <netif_add+0x1a4>)
8004dee: 4825 ldr r0, [pc, #148] ; (8004e84 <netif_add+0x18c>)
8004df0: f00b faee bl 80103d0 <printf>
num_netifs++;
8004df4: 693b ldr r3, [r7, #16]
8004df6: 3301 adds r3, #1
8004df8: 613b str r3, [r7, #16]
LWIP_ASSERT("too many netifs, max. supported number is 255", num_netifs <= 255);
8004dfa: 693b ldr r3, [r7, #16]
8004dfc: 2bff cmp r3, #255 ; 0xff
8004dfe: dd06 ble.n 8004e0e <netif_add+0x116>
8004e00: 4b1e ldr r3, [pc, #120] ; (8004e7c <netif_add+0x184>)
8004e02: f240 128d movw r2, #397 ; 0x18d
8004e06: 4926 ldr r1, [pc, #152] ; (8004ea0 <netif_add+0x1a8>)
8004e08: 481e ldr r0, [pc, #120] ; (8004e84 <netif_add+0x18c>)
8004e0a: f00b fae1 bl 80103d0 <printf>
if (netif2->num == netif->num) {
8004e0e: 697b ldr r3, [r7, #20]
8004e10: f893 2034 ldrb.w r2, [r3, #52] ; 0x34
8004e14: 68fb ldr r3, [r7, #12]
8004e16: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8004e1a: 429a cmp r2, r3
8004e1c: d108 bne.n 8004e30 <netif_add+0x138>
netif->num++;
8004e1e: 68fb ldr r3, [r7, #12]
8004e20: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8004e24: 3301 adds r3, #1
8004e26: b2da uxtb r2, r3
8004e28: 68fb ldr r3, [r7, #12]
8004e2a: f883 2034 strb.w r2, [r3, #52] ; 0x34
break;
8004e2e: e005 b.n 8004e3c <netif_add+0x144>
for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) {
8004e30: 697b ldr r3, [r7, #20]
8004e32: 681b ldr r3, [r3, #0]
8004e34: 617b str r3, [r7, #20]
8004e36: 697b ldr r3, [r7, #20]
8004e38: 2b00 cmp r3, #0
8004e3a: d1d0 bne.n 8004dde <netif_add+0xe6>
}
}
} while (netif2 != NULL);
8004e3c: 697b ldr r3, [r7, #20]
8004e3e: 2b00 cmp r3, #0
8004e40: d1be bne.n 8004dc0 <netif_add+0xc8>
}
if (netif->num == 254) {
8004e42: 68fb ldr r3, [r7, #12]
8004e44: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8004e48: 2bfe cmp r3, #254 ; 0xfe
8004e4a: d103 bne.n 8004e54 <netif_add+0x15c>
netif_num = 0;
8004e4c: 4b11 ldr r3, [pc, #68] ; (8004e94 <netif_add+0x19c>)
8004e4e: 2200 movs r2, #0
8004e50: 701a strb r2, [r3, #0]
8004e52: e006 b.n 8004e62 <netif_add+0x16a>
} else {
netif_num = (u8_t)(netif->num + 1);
8004e54: 68fb ldr r3, [r7, #12]
8004e56: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8004e5a: 3301 adds r3, #1
8004e5c: b2da uxtb r2, r3
8004e5e: 4b0d ldr r3, [pc, #52] ; (8004e94 <netif_add+0x19c>)
8004e60: 701a strb r2, [r3, #0]
}
/* add this netif to the list */
netif->next = netif_list;
8004e62: 4b0d ldr r3, [pc, #52] ; (8004e98 <netif_add+0x1a0>)
8004e64: 681a ldr r2, [r3, #0]
8004e66: 68fb ldr r3, [r7, #12]
8004e68: 601a str r2, [r3, #0]
netif_list = netif;
8004e6a: 4a0b ldr r2, [pc, #44] ; (8004e98 <netif_add+0x1a0>)
8004e6c: 68fb ldr r3, [r7, #12]
8004e6e: 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;
8004e70: 68fb ldr r3, [r7, #12]
}
8004e72: 4618 mov r0, r3
8004e74: 3718 adds r7, #24
8004e76: 46bd mov sp, r7
8004e78: bd80 pop {r7, pc}
8004e7a: bf00 nop
8004e7c: 0801528c .word 0x0801528c
8004e80: 08015320 .word 0x08015320
8004e84: 080152dc .word 0x080152dc
8004e88: 0801533c .word 0x0801533c
8004e8c: 08017ddc .word 0x08017ddc
8004e90: 080052bb .word 0x080052bb
8004e94: 20008bfc .word 0x20008bfc
8004e98: 20008bf4 .word 0x20008bf4
8004e9c: 08015360 .word 0x08015360
8004ea0: 08015374 .word 0x08015374
08004ea4 <netif_do_ip_addr_changed>:
static void
netif_do_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr)
{
8004ea4: b580 push {r7, lr}
8004ea6: b082 sub sp, #8
8004ea8: af00 add r7, sp, #0
8004eaa: 6078 str r0, [r7, #4]
8004eac: 6039 str r1, [r7, #0]
#if LWIP_TCP
tcp_netif_ip_addr_changed(old_addr, new_addr);
8004eae: 6839 ldr r1, [r7, #0]
8004eb0: 6878 ldr r0, [r7, #4]
8004eb2: f002 fb57 bl 8007564 <tcp_netif_ip_addr_changed>
#endif /* LWIP_TCP */
#if LWIP_UDP
udp_netif_ip_addr_changed(old_addr, new_addr);
8004eb6: 6839 ldr r1, [r7, #0]
8004eb8: 6878 ldr r0, [r7, #4]
8004eba: f006 ff3d bl 800bd38 <udp_netif_ip_addr_changed>
#endif /* LWIP_UDP */
#if LWIP_RAW
raw_netif_ip_addr_changed(old_addr, new_addr);
#endif /* LWIP_RAW */
}
8004ebe: bf00 nop
8004ec0: 3708 adds r7, #8
8004ec2: 46bd mov sp, r7
8004ec4: bd80 pop {r7, pc}
...
08004ec8 <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)
{
8004ec8: b580 push {r7, lr}
8004eca: b086 sub sp, #24
8004ecc: af00 add r7, sp, #0
8004ece: 60f8 str r0, [r7, #12]
8004ed0: 60b9 str r1, [r7, #8]
8004ed2: 607a str r2, [r7, #4]
LWIP_ASSERT("invalid pointer", ipaddr != NULL);
8004ed4: 68bb ldr r3, [r7, #8]
8004ed6: 2b00 cmp r3, #0
8004ed8: d106 bne.n 8004ee8 <netif_do_set_ipaddr+0x20>
8004eda: 4b1d ldr r3, [pc, #116] ; (8004f50 <netif_do_set_ipaddr+0x88>)
8004edc: f240 12cb movw r2, #459 ; 0x1cb
8004ee0: 491c ldr r1, [pc, #112] ; (8004f54 <netif_do_set_ipaddr+0x8c>)
8004ee2: 481d ldr r0, [pc, #116] ; (8004f58 <netif_do_set_ipaddr+0x90>)
8004ee4: f00b fa74 bl 80103d0 <printf>
LWIP_ASSERT("invalid pointer", old_addr != NULL);
8004ee8: 687b ldr r3, [r7, #4]
8004eea: 2b00 cmp r3, #0
8004eec: d106 bne.n 8004efc <netif_do_set_ipaddr+0x34>
8004eee: 4b18 ldr r3, [pc, #96] ; (8004f50 <netif_do_set_ipaddr+0x88>)
8004ef0: f44f 72e6 mov.w r2, #460 ; 0x1cc
8004ef4: 4917 ldr r1, [pc, #92] ; (8004f54 <netif_do_set_ipaddr+0x8c>)
8004ef6: 4818 ldr r0, [pc, #96] ; (8004f58 <netif_do_set_ipaddr+0x90>)
8004ef8: f00b fa6a bl 80103d0 <printf>
/* address is actually being changed? */
if (ip4_addr_cmp(ipaddr, netif_ip4_addr(netif)) == 0) {
8004efc: 68bb ldr r3, [r7, #8]
8004efe: 681a ldr r2, [r3, #0]
8004f00: 68fb ldr r3, [r7, #12]
8004f02: 3304 adds r3, #4
8004f04: 681b ldr r3, [r3, #0]
8004f06: 429a cmp r2, r3
8004f08: d01c beq.n 8004f44 <netif_do_set_ipaddr+0x7c>
ip_addr_t new_addr;
*ip_2_ip4(&new_addr) = *ipaddr;
8004f0a: 68bb ldr r3, [r7, #8]
8004f0c: 681b ldr r3, [r3, #0]
8004f0e: 617b str r3, [r7, #20]
IP_SET_TYPE_VAL(new_addr, IPADDR_TYPE_V4);
ip_addr_copy(*old_addr, *netif_ip_addr4(netif));
8004f10: 68fb ldr r3, [r7, #12]
8004f12: 3304 adds r3, #4
8004f14: 681a ldr r2, [r3, #0]
8004f16: 687b ldr r3, [r7, #4]
8004f18: 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);
8004f1a: f107 0314 add.w r3, r7, #20
8004f1e: 4619 mov r1, r3
8004f20: 6878 ldr r0, [r7, #4]
8004f22: f7ff ffbf bl 8004ea4 <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);
8004f26: 68bb ldr r3, [r7, #8]
8004f28: 2b00 cmp r3, #0
8004f2a: d002 beq.n 8004f32 <netif_do_set_ipaddr+0x6a>
8004f2c: 68bb ldr r3, [r7, #8]
8004f2e: 681b ldr r3, [r3, #0]
8004f30: e000 b.n 8004f34 <netif_do_set_ipaddr+0x6c>
8004f32: 2300 movs r3, #0
8004f34: 68fa ldr r2, [r7, #12]
8004f36: 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);
8004f38: 2101 movs r1, #1
8004f3a: 68f8 ldr r0, [r7, #12]
8004f3c: f000 f8d2 bl 80050e4 <netif_issue_reports>
NETIF_STATUS_CALLBACK(netif);
return 1; /* address changed */
8004f40: 2301 movs r3, #1
8004f42: e000 b.n 8004f46 <netif_do_set_ipaddr+0x7e>
}
return 0; /* address unchanged */
8004f44: 2300 movs r3, #0
}
8004f46: 4618 mov r0, r3
8004f48: 3718 adds r7, #24
8004f4a: 46bd mov sp, r7
8004f4c: bd80 pop {r7, pc}
8004f4e: bf00 nop
8004f50: 0801528c .word 0x0801528c
8004f54: 080153a4 .word 0x080153a4
8004f58: 080152dc .word 0x080152dc
08004f5c <netif_do_set_netmask>:
}
}
static int
netif_do_set_netmask(struct netif *netif, const ip4_addr_t *netmask, ip_addr_t *old_nm)
{
8004f5c: b480 push {r7}
8004f5e: b085 sub sp, #20
8004f60: af00 add r7, sp, #0
8004f62: 60f8 str r0, [r7, #12]
8004f64: 60b9 str r1, [r7, #8]
8004f66: 607a str r2, [r7, #4]
/* address is actually being changed? */
if (ip4_addr_cmp(netmask, netif_ip4_netmask(netif)) == 0) {
8004f68: 68bb ldr r3, [r7, #8]
8004f6a: 681a ldr r2, [r3, #0]
8004f6c: 68fb ldr r3, [r7, #12]
8004f6e: 3308 adds r3, #8
8004f70: 681b ldr r3, [r3, #0]
8004f72: 429a cmp r2, r3
8004f74: d00a beq.n 8004f8c <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);
8004f76: 68bb ldr r3, [r7, #8]
8004f78: 2b00 cmp r3, #0
8004f7a: d002 beq.n 8004f82 <netif_do_set_netmask+0x26>
8004f7c: 68bb ldr r3, [r7, #8]
8004f7e: 681b ldr r3, [r3, #0]
8004f80: e000 b.n 8004f84 <netif_do_set_netmask+0x28>
8004f82: 2300 movs r3, #0
8004f84: 68fa ldr r2, [r7, #12]
8004f86: 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 */
8004f88: 2301 movs r3, #1
8004f8a: e000 b.n 8004f8e <netif_do_set_netmask+0x32>
}
return 0; /* netmask unchanged */
8004f8c: 2300 movs r3, #0
}
8004f8e: 4618 mov r0, r3
8004f90: 3714 adds r7, #20
8004f92: 46bd mov sp, r7
8004f94: f85d 7b04 ldr.w r7, [sp], #4
8004f98: 4770 bx lr
08004f9a <netif_do_set_gw>:
}
}
static int
netif_do_set_gw(struct netif *netif, const ip4_addr_t *gw, ip_addr_t *old_gw)
{
8004f9a: b480 push {r7}
8004f9c: b085 sub sp, #20
8004f9e: af00 add r7, sp, #0
8004fa0: 60f8 str r0, [r7, #12]
8004fa2: 60b9 str r1, [r7, #8]
8004fa4: 607a str r2, [r7, #4]
/* address is actually being changed? */
if (ip4_addr_cmp(gw, netif_ip4_gw(netif)) == 0) {
8004fa6: 68bb ldr r3, [r7, #8]
8004fa8: 681a ldr r2, [r3, #0]
8004faa: 68fb ldr r3, [r7, #12]
8004fac: 330c adds r3, #12
8004fae: 681b ldr r3, [r3, #0]
8004fb0: 429a cmp r2, r3
8004fb2: d00a beq.n 8004fca <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);
8004fb4: 68bb ldr r3, [r7, #8]
8004fb6: 2b00 cmp r3, #0
8004fb8: d002 beq.n 8004fc0 <netif_do_set_gw+0x26>
8004fba: 68bb ldr r3, [r7, #8]
8004fbc: 681b ldr r3, [r3, #0]
8004fbe: e000 b.n 8004fc2 <netif_do_set_gw+0x28>
8004fc0: 2300 movs r3, #0
8004fc2: 68fa ldr r2, [r7, #12]
8004fc4: 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 */
8004fc6: 2301 movs r3, #1
8004fc8: e000 b.n 8004fcc <netif_do_set_gw+0x32>
}
return 0; /* gateway unchanged */
8004fca: 2300 movs r3, #0
}
8004fcc: 4618 mov r0, r3
8004fce: 3714 adds r7, #20
8004fd0: 46bd mov sp, r7
8004fd2: f85d 7b04 ldr.w r7, [sp], #4
8004fd6: 4770 bx lr
08004fd8 <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)
{
8004fd8: b580 push {r7, lr}
8004fda: b088 sub sp, #32
8004fdc: af00 add r7, sp, #0
8004fde: 60f8 str r0, [r7, #12]
8004fe0: 60b9 str r1, [r7, #8]
8004fe2: 607a str r2, [r7, #4]
8004fe4: 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;
8004fe6: 2300 movs r3, #0
8004fe8: 61fb str r3, [r7, #28]
ip_addr_t *old_gw = NULL;
8004fea: 2300 movs r3, #0
8004fec: 61bb str r3, [r7, #24]
int remove;
LWIP_ASSERT_CORE_LOCKED();
/* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */
if (ipaddr == NULL) {
8004fee: 68bb ldr r3, [r7, #8]
8004ff0: 2b00 cmp r3, #0
8004ff2: d101 bne.n 8004ff8 <netif_set_addr+0x20>
ipaddr = IP4_ADDR_ANY4;
8004ff4: 4b1c ldr r3, [pc, #112] ; (8005068 <netif_set_addr+0x90>)
8004ff6: 60bb str r3, [r7, #8]
}
if (netmask == NULL) {
8004ff8: 687b ldr r3, [r7, #4]
8004ffa: 2b00 cmp r3, #0
8004ffc: d101 bne.n 8005002 <netif_set_addr+0x2a>
netmask = IP4_ADDR_ANY4;
8004ffe: 4b1a ldr r3, [pc, #104] ; (8005068 <netif_set_addr+0x90>)
8005000: 607b str r3, [r7, #4]
}
if (gw == NULL) {
8005002: 683b ldr r3, [r7, #0]
8005004: 2b00 cmp r3, #0
8005006: d101 bne.n 800500c <netif_set_addr+0x34>
gw = IP4_ADDR_ANY4;
8005008: 4b17 ldr r3, [pc, #92] ; (8005068 <netif_set_addr+0x90>)
800500a: 603b str r3, [r7, #0]
}
remove = ip4_addr_isany(ipaddr);
800500c: 68bb ldr r3, [r7, #8]
800500e: 2b00 cmp r3, #0
8005010: d003 beq.n 800501a <netif_set_addr+0x42>
8005012: 68bb ldr r3, [r7, #8]
8005014: 681b ldr r3, [r3, #0]
8005016: 2b00 cmp r3, #0
8005018: d101 bne.n 800501e <netif_set_addr+0x46>
800501a: 2301 movs r3, #1
800501c: e000 b.n 8005020 <netif_set_addr+0x48>
800501e: 2300 movs r3, #0
8005020: 617b str r3, [r7, #20]
if (remove) {
8005022: 697b ldr r3, [r7, #20]
8005024: 2b00 cmp r3, #0
8005026: d006 beq.n 8005036 <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)) {
8005028: f107 0310 add.w r3, r7, #16
800502c: 461a mov r2, r3
800502e: 68b9 ldr r1, [r7, #8]
8005030: 68f8 ldr r0, [r7, #12]
8005032: f7ff ff49 bl 8004ec8 <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)) {
8005036: 69fa ldr r2, [r7, #28]
8005038: 6879 ldr r1, [r7, #4]
800503a: 68f8 ldr r0, [r7, #12]
800503c: f7ff ff8e bl 8004f5c <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)) {
8005040: 69ba ldr r2, [r7, #24]
8005042: 6839 ldr r1, [r7, #0]
8005044: 68f8 ldr r0, [r7, #12]
8005046: f7ff ffa8 bl 8004f9a <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) {
800504a: 697b ldr r3, [r7, #20]
800504c: 2b00 cmp r3, #0
800504e: d106 bne.n 800505e <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)) {
8005050: f107 0310 add.w r3, r7, #16
8005054: 461a mov r2, r3
8005056: 68b9 ldr r1, [r7, #8]
8005058: 68f8 ldr r0, [r7, #12]
800505a: f7ff ff35 bl 8004ec8 <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
}
800505e: bf00 nop
8005060: 3720 adds r7, #32
8005062: 46bd mov sp, r7
8005064: bd80 pop {r7, pc}
8005066: bf00 nop
8005068: 08017ddc .word 0x08017ddc
0800506c <netif_set_default>:
*
* @param netif the default network interface
*/
void
netif_set_default(struct netif *netif)
{
800506c: b480 push {r7}
800506e: b083 sub sp, #12
8005070: af00 add r7, sp, #0
8005072: 6078 str r0, [r7, #4]
mib2_remove_route_ip4(1, netif);
} else {
/* install default route */
mib2_add_route_ip4(1, netif);
}
netif_default = netif;
8005074: 4a04 ldr r2, [pc, #16] ; (8005088 <netif_set_default+0x1c>)
8005076: 687b ldr r3, [r7, #4]
8005078: 6013 str r3, [r2, #0]
LWIP_DEBUGF(NETIF_DEBUG, ("netif: setting default interface %c%c\n",
netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\''));
}
800507a: bf00 nop
800507c: 370c adds r7, #12
800507e: 46bd mov sp, r7
8005080: f85d 7b04 ldr.w r7, [sp], #4
8005084: 4770 bx lr
8005086: bf00 nop
8005088: 20008bf8 .word 0x20008bf8
0800508c <netif_set_up>:
* Bring an interface up, available for processing
* traffic.
*/
void
netif_set_up(struct netif *netif)
{
800508c: b580 push {r7, lr}
800508e: b082 sub sp, #8
8005090: af00 add r7, sp, #0
8005092: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif_set_up: invalid netif", netif != NULL, return);
8005094: 687b ldr r3, [r7, #4]
8005096: 2b00 cmp r3, #0
8005098: d107 bne.n 80050aa <netif_set_up+0x1e>
800509a: 4b0f ldr r3, [pc, #60] ; (80050d8 <netif_set_up+0x4c>)
800509c: f44f 7254 mov.w r2, #848 ; 0x350
80050a0: 490e ldr r1, [pc, #56] ; (80050dc <netif_set_up+0x50>)
80050a2: 480f ldr r0, [pc, #60] ; (80050e0 <netif_set_up+0x54>)
80050a4: f00b f994 bl 80103d0 <printf>
80050a8: e013 b.n 80050d2 <netif_set_up+0x46>
if (!(netif->flags & NETIF_FLAG_UP)) {
80050aa: 687b ldr r3, [r7, #4]
80050ac: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
80050b0: f003 0301 and.w r3, r3, #1
80050b4: 2b00 cmp r3, #0
80050b6: d10c bne.n 80050d2 <netif_set_up+0x46>
netif_set_flags(netif, NETIF_FLAG_UP);
80050b8: 687b ldr r3, [r7, #4]
80050ba: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
80050be: f043 0301 orr.w r3, r3, #1
80050c2: b2da uxtb r2, r3
80050c4: 687b ldr r3, [r7, #4]
80050c6: 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);
80050ca: 2103 movs r1, #3
80050cc: 6878 ldr r0, [r7, #4]
80050ce: f000 f809 bl 80050e4 <netif_issue_reports>
#if LWIP_IPV6
nd6_restart_netif(netif);
#endif /* LWIP_IPV6 */
}
}
80050d2: 3708 adds r7, #8
80050d4: 46bd mov sp, r7
80050d6: bd80 pop {r7, pc}
80050d8: 0801528c .word 0x0801528c
80050dc: 08015414 .word 0x08015414
80050e0: 080152dc .word 0x080152dc
080050e4 <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)
{
80050e4: b580 push {r7, lr}
80050e6: b082 sub sp, #8
80050e8: af00 add r7, sp, #0
80050ea: 6078 str r0, [r7, #4]
80050ec: 460b mov r3, r1
80050ee: 70fb strb r3, [r7, #3]
LWIP_ASSERT("netif_issue_reports: invalid netif", netif != NULL);
80050f0: 687b ldr r3, [r7, #4]
80050f2: 2b00 cmp r3, #0
80050f4: d106 bne.n 8005104 <netif_issue_reports+0x20>
80050f6: 4b18 ldr r3, [pc, #96] ; (8005158 <netif_issue_reports+0x74>)
80050f8: f240 326d movw r2, #877 ; 0x36d
80050fc: 4917 ldr r1, [pc, #92] ; (800515c <netif_issue_reports+0x78>)
80050fe: 4818 ldr r0, [pc, #96] ; (8005160 <netif_issue_reports+0x7c>)
8005100: f00b f966 bl 80103d0 <printf>
/* Only send reports when both link and admin states are up */
if (!(netif->flags & NETIF_FLAG_LINK_UP) ||
8005104: 687b ldr r3, [r7, #4]
8005106: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800510a: f003 0304 and.w r3, r3, #4
800510e: 2b00 cmp r3, #0
8005110: d01e beq.n 8005150 <netif_issue_reports+0x6c>
!(netif->flags & NETIF_FLAG_UP)) {
8005112: 687b ldr r3, [r7, #4]
8005114: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8005118: f003 0301 and.w r3, r3, #1
if (!(netif->flags & NETIF_FLAG_LINK_UP) ||
800511c: 2b00 cmp r3, #0
800511e: d017 beq.n 8005150 <netif_issue_reports+0x6c>
return;
}
#if LWIP_IPV4
if ((report_type & NETIF_REPORT_TYPE_IPV4) &&
8005120: 78fb ldrb r3, [r7, #3]
8005122: f003 0301 and.w r3, r3, #1
8005126: 2b00 cmp r3, #0
8005128: d013 beq.n 8005152 <netif_issue_reports+0x6e>
!ip4_addr_isany_val(*netif_ip4_addr(netif))) {
800512a: 687b ldr r3, [r7, #4]
800512c: 3304 adds r3, #4
800512e: 681b ldr r3, [r3, #0]
if ((report_type & NETIF_REPORT_TYPE_IPV4) &&
8005130: 2b00 cmp r3, #0
8005132: d00e beq.n 8005152 <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)) {
8005134: 687b ldr r3, [r7, #4]
8005136: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800513a: f003 0308 and.w r3, r3, #8
800513e: 2b00 cmp r3, #0
8005140: d007 beq.n 8005152 <netif_issue_reports+0x6e>
etharp_gratuitous(netif);
8005142: 687b ldr r3, [r7, #4]
8005144: 3304 adds r3, #4
8005146: 4619 mov r1, r3
8005148: 6878 ldr r0, [r7, #4]
800514a: f009 fbf5 bl 800e938 <etharp_request>
800514e: e000 b.n 8005152 <netif_issue_reports+0x6e>
return;
8005150: bf00 nop
/* send mld memberships */
mld6_report_groups(netif);
#endif /* LWIP_IPV6_MLD */
}
#endif /* LWIP_IPV6 */
}
8005152: 3708 adds r7, #8
8005154: 46bd mov sp, r7
8005156: bd80 pop {r7, pc}
8005158: 0801528c .word 0x0801528c
800515c: 08015430 .word 0x08015430
8005160: 080152dc .word 0x080152dc
08005164 <netif_set_down>:
* @ingroup netif
* Bring an interface down, disabling any traffic processing.
*/
void
netif_set_down(struct netif *netif)
{
8005164: b580 push {r7, lr}
8005166: b082 sub sp, #8
8005168: af00 add r7, sp, #0
800516a: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif_set_down: invalid netif", netif != NULL, return);
800516c: 687b ldr r3, [r7, #4]
800516e: 2b00 cmp r3, #0
8005170: d107 bne.n 8005182 <netif_set_down+0x1e>
8005172: 4b12 ldr r3, [pc, #72] ; (80051bc <netif_set_down+0x58>)
8005174: f240 329b movw r2, #923 ; 0x39b
8005178: 4911 ldr r1, [pc, #68] ; (80051c0 <netif_set_down+0x5c>)
800517a: 4812 ldr r0, [pc, #72] ; (80051c4 <netif_set_down+0x60>)
800517c: f00b f928 bl 80103d0 <printf>
8005180: e019 b.n 80051b6 <netif_set_down+0x52>
if (netif->flags & NETIF_FLAG_UP) {
8005182: 687b ldr r3, [r7, #4]
8005184: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8005188: f003 0301 and.w r3, r3, #1
800518c: 2b00 cmp r3, #0
800518e: d012 beq.n 80051b6 <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);
8005190: 687b ldr r3, [r7, #4]
8005192: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8005196: f023 0301 bic.w r3, r3, #1
800519a: b2da uxtb r2, r3
800519c: 687b ldr r3, [r7, #4]
800519e: 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) {
80051a2: 687b ldr r3, [r7, #4]
80051a4: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
80051a8: f003 0308 and.w r3, r3, #8
80051ac: 2b00 cmp r3, #0
80051ae: d002 beq.n 80051b6 <netif_set_down+0x52>
etharp_cleanup_netif(netif);
80051b0: 6878 ldr r0, [r7, #4]
80051b2: f008 ff7b bl 800e0ac <etharp_cleanup_netif>
nd6_cleanup_netif(netif);
#endif /* LWIP_IPV6 */
NETIF_STATUS_CALLBACK(netif);
}
}
80051b6: 3708 adds r7, #8
80051b8: 46bd mov sp, r7
80051ba: bd80 pop {r7, pc}
80051bc: 0801528c .word 0x0801528c
80051c0: 08015454 .word 0x08015454
80051c4: 080152dc .word 0x080152dc
080051c8 <netif_set_link_up>:
* @ingroup netif
* Called by a driver when its link goes up
*/
void
netif_set_link_up(struct netif *netif)
{
80051c8: b580 push {r7, lr}
80051ca: b082 sub sp, #8
80051cc: af00 add r7, sp, #0
80051ce: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif_set_link_up: invalid netif", netif != NULL, return);
80051d0: 687b ldr r3, [r7, #4]
80051d2: 2b00 cmp r3, #0
80051d4: d107 bne.n 80051e6 <netif_set_link_up+0x1e>
80051d6: 4b15 ldr r3, [pc, #84] ; (800522c <netif_set_link_up+0x64>)
80051d8: f44f 7278 mov.w r2, #992 ; 0x3e0
80051dc: 4914 ldr r1, [pc, #80] ; (8005230 <netif_set_link_up+0x68>)
80051de: 4815 ldr r0, [pc, #84] ; (8005234 <netif_set_link_up+0x6c>)
80051e0: f00b f8f6 bl 80103d0 <printf>
80051e4: e01e b.n 8005224 <netif_set_link_up+0x5c>
if (!(netif->flags & NETIF_FLAG_LINK_UP)) {
80051e6: 687b ldr r3, [r7, #4]
80051e8: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
80051ec: f003 0304 and.w r3, r3, #4
80051f0: 2b00 cmp r3, #0
80051f2: d117 bne.n 8005224 <netif_set_link_up+0x5c>
netif_set_flags(netif, NETIF_FLAG_LINK_UP);
80051f4: 687b ldr r3, [r7, #4]
80051f6: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
80051fa: f043 0304 orr.w r3, r3, #4
80051fe: b2da uxtb r2, r3
8005200: 687b ldr r3, [r7, #4]
8005202: f883 2031 strb.w r2, [r3, #49] ; 0x31
#if LWIP_DHCP
dhcp_network_changed(netif);
8005206: 6878 ldr r0, [r7, #4]
8005208: f007 f9c0 bl 800c58c <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);
800520c: 2103 movs r1, #3
800520e: 6878 ldr r0, [r7, #4]
8005210: f7ff ff68 bl 80050e4 <netif_issue_reports>
#if LWIP_IPV6
nd6_restart_netif(netif);
#endif /* LWIP_IPV6 */
NETIF_LINK_CALLBACK(netif);
8005214: 687b ldr r3, [r7, #4]
8005216: 69db ldr r3, [r3, #28]
8005218: 2b00 cmp r3, #0
800521a: d003 beq.n 8005224 <netif_set_link_up+0x5c>
800521c: 687b ldr r3, [r7, #4]
800521e: 69db ldr r3, [r3, #28]
8005220: 6878 ldr r0, [r7, #4]
8005222: 4798 blx r3
args.link_changed.state = 1;
netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args);
}
#endif
}
}
8005224: 3708 adds r7, #8
8005226: 46bd mov sp, r7
8005228: bd80 pop {r7, pc}
800522a: bf00 nop
800522c: 0801528c .word 0x0801528c
8005230: 08015474 .word 0x08015474
8005234: 080152dc .word 0x080152dc
08005238 <netif_set_link_down>:
* @ingroup netif
* Called by a driver when its link goes down
*/
void
netif_set_link_down(struct netif *netif)
{
8005238: b580 push {r7, lr}
800523a: b082 sub sp, #8
800523c: af00 add r7, sp, #0
800523e: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif_set_link_down: invalid netif", netif != NULL, return);
8005240: 687b ldr r3, [r7, #4]
8005242: 2b00 cmp r3, #0
8005244: d107 bne.n 8005256 <netif_set_link_down+0x1e>
8005246: 4b11 ldr r3, [pc, #68] ; (800528c <netif_set_link_down+0x54>)
8005248: f240 4206 movw r2, #1030 ; 0x406
800524c: 4910 ldr r1, [pc, #64] ; (8005290 <netif_set_link_down+0x58>)
800524e: 4811 ldr r0, [pc, #68] ; (8005294 <netif_set_link_down+0x5c>)
8005250: f00b f8be bl 80103d0 <printf>
8005254: e017 b.n 8005286 <netif_set_link_down+0x4e>
if (netif->flags & NETIF_FLAG_LINK_UP) {
8005256: 687b ldr r3, [r7, #4]
8005258: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800525c: f003 0304 and.w r3, r3, #4
8005260: 2b00 cmp r3, #0
8005262: d010 beq.n 8005286 <netif_set_link_down+0x4e>
netif_clear_flags(netif, NETIF_FLAG_LINK_UP);
8005264: 687b ldr r3, [r7, #4]
8005266: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800526a: f023 0304 bic.w r3, r3, #4
800526e: b2da uxtb r2, r3
8005270: 687b ldr r3, [r7, #4]
8005272: f883 2031 strb.w r2, [r3, #49] ; 0x31
NETIF_LINK_CALLBACK(netif);
8005276: 687b ldr r3, [r7, #4]
8005278: 69db ldr r3, [r3, #28]
800527a: 2b00 cmp r3, #0
800527c: d003 beq.n 8005286 <netif_set_link_down+0x4e>
800527e: 687b ldr r3, [r7, #4]
8005280: 69db ldr r3, [r3, #28]
8005282: 6878 ldr r0, [r7, #4]
8005284: 4798 blx r3
args.link_changed.state = 0;
netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args);
}
#endif
}
}
8005286: 3708 adds r7, #8
8005288: 46bd mov sp, r7
800528a: bd80 pop {r7, pc}
800528c: 0801528c .word 0x0801528c
8005290: 08015498 .word 0x08015498
8005294: 080152dc .word 0x080152dc
08005298 <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)
{
8005298: b480 push {r7}
800529a: b083 sub sp, #12
800529c: af00 add r7, sp, #0
800529e: 6078 str r0, [r7, #4]
80052a0: 6039 str r1, [r7, #0]
LWIP_ASSERT_CORE_LOCKED();
if (netif) {
80052a2: 687b ldr r3, [r7, #4]
80052a4: 2b00 cmp r3, #0
80052a6: d002 beq.n 80052ae <netif_set_link_callback+0x16>
netif->link_callback = link_callback;
80052a8: 687b ldr r3, [r7, #4]
80052aa: 683a ldr r2, [r7, #0]
80052ac: 61da str r2, [r3, #28]
}
}
80052ae: bf00 nop
80052b0: 370c adds r7, #12
80052b2: 46bd mov sp, r7
80052b4: f85d 7b04 ldr.w r7, [sp], #4
80052b8: 4770 bx lr
080052ba <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)
{
80052ba: b480 push {r7}
80052bc: b085 sub sp, #20
80052be: af00 add r7, sp, #0
80052c0: 60f8 str r0, [r7, #12]
80052c2: 60b9 str r1, [r7, #8]
80052c4: 607a str r2, [r7, #4]
LWIP_UNUSED_ARG(netif);
LWIP_UNUSED_ARG(p);
LWIP_UNUSED_ARG(ipaddr);
return ERR_IF;
80052c6: f06f 030b mvn.w r3, #11
}
80052ca: 4618 mov r0, r3
80052cc: 3714 adds r7, #20
80052ce: 46bd mov sp, r7
80052d0: f85d 7b04 ldr.w r7, [sp], #4
80052d4: 4770 bx lr
...
080052d8 <netif_get_by_index>:
*
* @param idx index of netif to find
*/
struct netif *
netif_get_by_index(u8_t idx)
{
80052d8: b480 push {r7}
80052da: b085 sub sp, #20
80052dc: af00 add r7, sp, #0
80052de: 4603 mov r3, r0
80052e0: 71fb strb r3, [r7, #7]
struct netif *netif;
LWIP_ASSERT_CORE_LOCKED();
if (idx != NETIF_NO_INDEX) {
80052e2: 79fb ldrb r3, [r7, #7]
80052e4: 2b00 cmp r3, #0
80052e6: d013 beq.n 8005310 <netif_get_by_index+0x38>
NETIF_FOREACH(netif) {
80052e8: 4b0d ldr r3, [pc, #52] ; (8005320 <netif_get_by_index+0x48>)
80052ea: 681b ldr r3, [r3, #0]
80052ec: 60fb str r3, [r7, #12]
80052ee: e00c b.n 800530a <netif_get_by_index+0x32>
if (idx == netif_get_index(netif)) {
80052f0: 68fb ldr r3, [r7, #12]
80052f2: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
80052f6: 3301 adds r3, #1
80052f8: b2db uxtb r3, r3
80052fa: 79fa ldrb r2, [r7, #7]
80052fc: 429a cmp r2, r3
80052fe: d101 bne.n 8005304 <netif_get_by_index+0x2c>
return netif; /* found! */
8005300: 68fb ldr r3, [r7, #12]
8005302: e006 b.n 8005312 <netif_get_by_index+0x3a>
NETIF_FOREACH(netif) {
8005304: 68fb ldr r3, [r7, #12]
8005306: 681b ldr r3, [r3, #0]
8005308: 60fb str r3, [r7, #12]
800530a: 68fb ldr r3, [r7, #12]
800530c: 2b00 cmp r3, #0
800530e: d1ef bne.n 80052f0 <netif_get_by_index+0x18>
}
}
}
return NULL;
8005310: 2300 movs r3, #0
}
8005312: 4618 mov r0, r3
8005314: 3714 adds r7, #20
8005316: 46bd mov sp, r7
8005318: f85d 7b04 ldr.w r7, [sp], #4
800531c: 4770 bx lr
800531e: bf00 nop
8005320: 20008bf4 .word 0x20008bf4
08005324 <pbuf_free_ooseq>:
#if !NO_SYS
static
#endif /* !NO_SYS */
void
pbuf_free_ooseq(void)
{
8005324: b580 push {r7, lr}
8005326: b082 sub sp, #8
8005328: af00 add r7, sp, #0
struct tcp_pcb *pcb;
SYS_ARCH_SET(pbuf_free_ooseq_pending, 0);
800532a: 4b0c ldr r3, [pc, #48] ; (800535c <pbuf_free_ooseq+0x38>)
800532c: 2200 movs r2, #0
800532e: 701a strb r2, [r3, #0]
for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) {
8005330: 4b0b ldr r3, [pc, #44] ; (8005360 <pbuf_free_ooseq+0x3c>)
8005332: 681b ldr r3, [r3, #0]
8005334: 607b str r3, [r7, #4]
8005336: e00a b.n 800534e <pbuf_free_ooseq+0x2a>
if (pcb->ooseq != NULL) {
8005338: 687b ldr r3, [r7, #4]
800533a: 6f5b ldr r3, [r3, #116] ; 0x74
800533c: 2b00 cmp r3, #0
800533e: d003 beq.n 8005348 <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);
8005340: 6878 ldr r0, [r7, #4]
8005342: f002 f94d bl 80075e0 <tcp_free_ooseq>
return;
8005346: e005 b.n 8005354 <pbuf_free_ooseq+0x30>
for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) {
8005348: 687b ldr r3, [r7, #4]
800534a: 68db ldr r3, [r3, #12]
800534c: 607b str r3, [r7, #4]
800534e: 687b ldr r3, [r7, #4]
8005350: 2b00 cmp r3, #0
8005352: d1f1 bne.n 8005338 <pbuf_free_ooseq+0x14>
}
}
}
8005354: 3708 adds r7, #8
8005356: 46bd mov sp, r7
8005358: bd80 pop {r7, pc}
800535a: bf00 nop
800535c: 20008bfd .word 0x20008bfd
8005360: 20008c0c .word 0x20008c0c
08005364 <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)
{
8005364: b480 push {r7}
8005366: af00 add r7, sp, #0
#ifndef PBUF_POOL_FREE_OOSEQ_QUEUE_CALL
SYS_ARCH_SET(pbuf_free_ooseq_pending, 1);
8005368: 4b03 ldr r3, [pc, #12] ; (8005378 <pbuf_pool_is_empty+0x14>)
800536a: 2201 movs r2, #1
800536c: 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 */
}
800536e: bf00 nop
8005370: 46bd mov sp, r7
8005372: f85d 7b04 ldr.w r7, [sp], #4
8005376: 4770 bx lr
8005378: 20008bfd .word 0x20008bfd
0800537c <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)
{
800537c: b480 push {r7}
800537e: b085 sub sp, #20
8005380: af00 add r7, sp, #0
8005382: 60f8 str r0, [r7, #12]
8005384: 60b9 str r1, [r7, #8]
8005386: 4611 mov r1, r2
8005388: 461a mov r2, r3
800538a: 460b mov r3, r1
800538c: 80fb strh r3, [r7, #6]
800538e: 4613 mov r3, r2
8005390: 80bb strh r3, [r7, #4]
p->next = NULL;
8005392: 68fb ldr r3, [r7, #12]
8005394: 2200 movs r2, #0
8005396: 601a str r2, [r3, #0]
p->payload = payload;
8005398: 68fb ldr r3, [r7, #12]
800539a: 68ba ldr r2, [r7, #8]
800539c: 605a str r2, [r3, #4]
p->tot_len = tot_len;
800539e: 68fb ldr r3, [r7, #12]
80053a0: 88fa ldrh r2, [r7, #6]
80053a2: 811a strh r2, [r3, #8]
p->len = len;
80053a4: 68fb ldr r3, [r7, #12]
80053a6: 88ba ldrh r2, [r7, #4]
80053a8: 815a strh r2, [r3, #10]
p->type_internal = (u8_t)type;
80053aa: 8b3b ldrh r3, [r7, #24]
80053ac: b2da uxtb r2, r3
80053ae: 68fb ldr r3, [r7, #12]
80053b0: 731a strb r2, [r3, #12]
p->flags = flags;
80053b2: 68fb ldr r3, [r7, #12]
80053b4: 7f3a ldrb r2, [r7, #28]
80053b6: 735a strb r2, [r3, #13]
p->ref = 1;
80053b8: 68fb ldr r3, [r7, #12]
80053ba: 2201 movs r2, #1
80053bc: 739a strb r2, [r3, #14]
p->if_idx = NETIF_NO_INDEX;
80053be: 68fb ldr r3, [r7, #12]
80053c0: 2200 movs r2, #0
80053c2: 73da strb r2, [r3, #15]
}
80053c4: bf00 nop
80053c6: 3714 adds r7, #20
80053c8: 46bd mov sp, r7
80053ca: f85d 7b04 ldr.w r7, [sp], #4
80053ce: 4770 bx lr
080053d0 <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)
{
80053d0: b580 push {r7, lr}
80053d2: b08c sub sp, #48 ; 0x30
80053d4: af02 add r7, sp, #8
80053d6: 4603 mov r3, r0
80053d8: 71fb strb r3, [r7, #7]
80053da: 460b mov r3, r1
80053dc: 80bb strh r3, [r7, #4]
80053de: 4613 mov r3, r2
80053e0: 807b strh r3, [r7, #2]
struct pbuf *p;
u16_t offset = (u16_t)layer;
80053e2: 79fb ldrb r3, [r7, #7]
80053e4: 847b strh r3, [r7, #34] ; 0x22
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length));
switch (type) {
80053e6: 887b ldrh r3, [r7, #2]
80053e8: f5b3 7f20 cmp.w r3, #640 ; 0x280
80053ec: d07f beq.n 80054ee <pbuf_alloc+0x11e>
80053ee: f5b3 7f20 cmp.w r3, #640 ; 0x280
80053f2: f300 80c8 bgt.w 8005586 <pbuf_alloc+0x1b6>
80053f6: f5b3 7fc1 cmp.w r3, #386 ; 0x182
80053fa: d010 beq.n 800541e <pbuf_alloc+0x4e>
80053fc: f5b3 7fc1 cmp.w r3, #386 ; 0x182
8005400: f300 80c1 bgt.w 8005586 <pbuf_alloc+0x1b6>
8005404: 2b01 cmp r3, #1
8005406: d002 beq.n 800540e <pbuf_alloc+0x3e>
8005408: 2b41 cmp r3, #65 ; 0x41
800540a: f040 80bc bne.w 8005586 <pbuf_alloc+0x1b6>
case PBUF_REF: /* fall through */
case PBUF_ROM:
p = pbuf_alloc_reference(NULL, length, type);
800540e: 887a ldrh r2, [r7, #2]
8005410: 88bb ldrh r3, [r7, #4]
8005412: 4619 mov r1, r3
8005414: 2000 movs r0, #0
8005416: f000 f8d1 bl 80055bc <pbuf_alloc_reference>
800541a: 6278 str r0, [r7, #36] ; 0x24
break;
800541c: e0bd b.n 800559a <pbuf_alloc+0x1ca>
case PBUF_POOL: {
struct pbuf *q, *last;
u16_t rem_len; /* remaining length */
p = NULL;
800541e: 2300 movs r3, #0
8005420: 627b str r3, [r7, #36] ; 0x24
last = NULL;
8005422: 2300 movs r3, #0
8005424: 61fb str r3, [r7, #28]
rem_len = length;
8005426: 88bb ldrh r3, [r7, #4]
8005428: 837b strh r3, [r7, #26]
do {
u16_t qlen;
q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL);
800542a: 2008 movs r0, #8
800542c: f7ff fbc2 bl 8004bb4 <memp_malloc>
8005430: 6138 str r0, [r7, #16]
if (q == NULL) {
8005432: 693b ldr r3, [r7, #16]
8005434: 2b00 cmp r3, #0
8005436: d109 bne.n 800544c <pbuf_alloc+0x7c>
PBUF_POOL_IS_EMPTY();
8005438: f7ff ff94 bl 8005364 <pbuf_pool_is_empty>
/* free chain so far allocated */
if (p) {
800543c: 6a7b ldr r3, [r7, #36] ; 0x24
800543e: 2b00 cmp r3, #0
8005440: d002 beq.n 8005448 <pbuf_alloc+0x78>
pbuf_free(p);
8005442: 6a78 ldr r0, [r7, #36] ; 0x24
8005444: f000 faa8 bl 8005998 <pbuf_free>
}
/* bail out unsuccessfully */
return NULL;
8005448: 2300 movs r3, #0
800544a: e0a7 b.n 800559c <pbuf_alloc+0x1cc>
}
qlen = LWIP_MIN(rem_len, (u16_t)(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)));
800544c: 8c7b ldrh r3, [r7, #34] ; 0x22
800544e: 3303 adds r3, #3
8005450: b29b uxth r3, r3
8005452: f023 0303 bic.w r3, r3, #3
8005456: b29b uxth r3, r3
8005458: f5c3 7314 rsb r3, r3, #592 ; 0x250
800545c: b29b uxth r3, r3
800545e: 8b7a ldrh r2, [r7, #26]
8005460: 4293 cmp r3, r2
8005462: bf28 it cs
8005464: 4613 movcs r3, r2
8005466: 81fb strh r3, [r7, #14]
pbuf_init_alloced_pbuf(q, LWIP_MEM_ALIGN((void *)((u8_t *)q + SIZEOF_STRUCT_PBUF + offset)),
8005468: 8c7b ldrh r3, [r7, #34] ; 0x22
800546a: 3310 adds r3, #16
800546c: 693a ldr r2, [r7, #16]
800546e: 4413 add r3, r2
8005470: 3303 adds r3, #3
8005472: f023 0303 bic.w r3, r3, #3
8005476: 4618 mov r0, r3
8005478: 89f9 ldrh r1, [r7, #14]
800547a: 8b7a ldrh r2, [r7, #26]
800547c: 2300 movs r3, #0
800547e: 9301 str r3, [sp, #4]
8005480: 887b ldrh r3, [r7, #2]
8005482: 9300 str r3, [sp, #0]
8005484: 460b mov r3, r1
8005486: 4601 mov r1, r0
8005488: 6938 ldr r0, [r7, #16]
800548a: f7ff ff77 bl 800537c <pbuf_init_alloced_pbuf>
rem_len, qlen, type, 0);
LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned",
800548e: 693b ldr r3, [r7, #16]
8005490: 685b ldr r3, [r3, #4]
8005492: f003 0303 and.w r3, r3, #3
8005496: 2b00 cmp r3, #0
8005498: d006 beq.n 80054a8 <pbuf_alloc+0xd8>
800549a: 4b42 ldr r3, [pc, #264] ; (80055a4 <pbuf_alloc+0x1d4>)
800549c: f44f 7280 mov.w r2, #256 ; 0x100
80054a0: 4941 ldr r1, [pc, #260] ; (80055a8 <pbuf_alloc+0x1d8>)
80054a2: 4842 ldr r0, [pc, #264] ; (80055ac <pbuf_alloc+0x1dc>)
80054a4: f00a ff94 bl 80103d0 <printf>
((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0);
LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT",
80054a8: 8c7b ldrh r3, [r7, #34] ; 0x22
80054aa: 3303 adds r3, #3
80054ac: f023 0303 bic.w r3, r3, #3
80054b0: f5b3 7f14 cmp.w r3, #592 ; 0x250
80054b4: d106 bne.n 80054c4 <pbuf_alloc+0xf4>
80054b6: 4b3b ldr r3, [pc, #236] ; (80055a4 <pbuf_alloc+0x1d4>)
80054b8: f44f 7281 mov.w r2, #258 ; 0x102
80054bc: 493c ldr r1, [pc, #240] ; (80055b0 <pbuf_alloc+0x1e0>)
80054be: 483b ldr r0, [pc, #236] ; (80055ac <pbuf_alloc+0x1dc>)
80054c0: f00a ff86 bl 80103d0 <printf>
(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 );
if (p == NULL) {
80054c4: 6a7b ldr r3, [r7, #36] ; 0x24
80054c6: 2b00 cmp r3, #0
80054c8: d102 bne.n 80054d0 <pbuf_alloc+0x100>
/* allocated head of pbuf chain (into p) */
p = q;
80054ca: 693b ldr r3, [r7, #16]
80054cc: 627b str r3, [r7, #36] ; 0x24
80054ce: e002 b.n 80054d6 <pbuf_alloc+0x106>
} else {
/* make previous pbuf point to this pbuf */
last->next = q;
80054d0: 69fb ldr r3, [r7, #28]
80054d2: 693a ldr r2, [r7, #16]
80054d4: 601a str r2, [r3, #0]
}
last = q;
80054d6: 693b ldr r3, [r7, #16]
80054d8: 61fb str r3, [r7, #28]
rem_len = (u16_t)(rem_len - qlen);
80054da: 8b7a ldrh r2, [r7, #26]
80054dc: 89fb ldrh r3, [r7, #14]
80054de: 1ad3 subs r3, r2, r3
80054e0: 837b strh r3, [r7, #26]
offset = 0;
80054e2: 2300 movs r3, #0
80054e4: 847b strh r3, [r7, #34] ; 0x22
} while (rem_len > 0);
80054e6: 8b7b ldrh r3, [r7, #26]
80054e8: 2b00 cmp r3, #0
80054ea: d19e bne.n 800542a <pbuf_alloc+0x5a>
break;
80054ec: e055 b.n 800559a <pbuf_alloc+0x1ca>
}
case PBUF_RAM: {
u16_t payload_len = (u16_t)(LWIP_MEM_ALIGN_SIZE(offset) + LWIP_MEM_ALIGN_SIZE(length));
80054ee: 8c7b ldrh r3, [r7, #34] ; 0x22
80054f0: 3303 adds r3, #3
80054f2: b29b uxth r3, r3
80054f4: f023 0303 bic.w r3, r3, #3
80054f8: b29a uxth r2, r3
80054fa: 88bb ldrh r3, [r7, #4]
80054fc: 3303 adds r3, #3
80054fe: b29b uxth r3, r3
8005500: f023 0303 bic.w r3, r3, #3
8005504: b29b uxth r3, r3
8005506: 4413 add r3, r2
8005508: 833b strh r3, [r7, #24]
mem_size_t alloc_len = (mem_size_t)(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF) + payload_len);
800550a: 8b3b ldrh r3, [r7, #24]
800550c: 3310 adds r3, #16
800550e: 82fb strh r3, [r7, #22]
/* bug #50040: Check for integer overflow when calculating alloc_len */
if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) ||
8005510: 8b3a ldrh r2, [r7, #24]
8005512: 88bb ldrh r3, [r7, #4]
8005514: 3303 adds r3, #3
8005516: f023 0303 bic.w r3, r3, #3
800551a: 429a cmp r2, r3
800551c: d306 bcc.n 800552c <pbuf_alloc+0x15c>
(alloc_len < LWIP_MEM_ALIGN_SIZE(length))) {
800551e: 8afa ldrh r2, [r7, #22]
8005520: 88bb ldrh r3, [r7, #4]
8005522: 3303 adds r3, #3
8005524: f023 0303 bic.w r3, r3, #3
if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) ||
8005528: 429a cmp r2, r3
800552a: d201 bcs.n 8005530 <pbuf_alloc+0x160>
return NULL;
800552c: 2300 movs r3, #0
800552e: e035 b.n 800559c <pbuf_alloc+0x1cc>
}
/* If pbuf is to be allocated in RAM, allocate memory for it. */
p = (struct pbuf *)mem_malloc(alloc_len);
8005530: 8afb ldrh r3, [r7, #22]
8005532: 4618 mov r0, r3
8005534: f7ff f9ae bl 8004894 <mem_malloc>
8005538: 6278 str r0, [r7, #36] ; 0x24
if (p == NULL) {
800553a: 6a7b ldr r3, [r7, #36] ; 0x24
800553c: 2b00 cmp r3, #0
800553e: d101 bne.n 8005544 <pbuf_alloc+0x174>
return NULL;
8005540: 2300 movs r3, #0
8005542: e02b b.n 800559c <pbuf_alloc+0x1cc>
}
pbuf_init_alloced_pbuf(p, LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)),
8005544: 8c7b ldrh r3, [r7, #34] ; 0x22
8005546: 3310 adds r3, #16
8005548: 6a7a ldr r2, [r7, #36] ; 0x24
800554a: 4413 add r3, r2
800554c: 3303 adds r3, #3
800554e: f023 0303 bic.w r3, r3, #3
8005552: 4618 mov r0, r3
8005554: 88b9 ldrh r1, [r7, #4]
8005556: 88ba ldrh r2, [r7, #4]
8005558: 2300 movs r3, #0
800555a: 9301 str r3, [sp, #4]
800555c: 887b ldrh r3, [r7, #2]
800555e: 9300 str r3, [sp, #0]
8005560: 460b mov r3, r1
8005562: 4601 mov r1, r0
8005564: 6a78 ldr r0, [r7, #36] ; 0x24
8005566: f7ff ff09 bl 800537c <pbuf_init_alloced_pbuf>
length, length, type, 0);
LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned",
800556a: 6a7b ldr r3, [r7, #36] ; 0x24
800556c: 685b ldr r3, [r3, #4]
800556e: f003 0303 and.w r3, r3, #3
8005572: 2b00 cmp r3, #0
8005574: d010 beq.n 8005598 <pbuf_alloc+0x1c8>
8005576: 4b0b ldr r3, [pc, #44] ; (80055a4 <pbuf_alloc+0x1d4>)
8005578: f44f 7291 mov.w r2, #290 ; 0x122
800557c: 490d ldr r1, [pc, #52] ; (80055b4 <pbuf_alloc+0x1e4>)
800557e: 480b ldr r0, [pc, #44] ; (80055ac <pbuf_alloc+0x1dc>)
8005580: f00a ff26 bl 80103d0 <printf>
((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0);
break;
8005584: e008 b.n 8005598 <pbuf_alloc+0x1c8>
}
default:
LWIP_ASSERT("pbuf_alloc: erroneous type", 0);
8005586: 4b07 ldr r3, [pc, #28] ; (80055a4 <pbuf_alloc+0x1d4>)
8005588: f240 1227 movw r2, #295 ; 0x127
800558c: 490a ldr r1, [pc, #40] ; (80055b8 <pbuf_alloc+0x1e8>)
800558e: 4807 ldr r0, [pc, #28] ; (80055ac <pbuf_alloc+0x1dc>)
8005590: f00a ff1e bl 80103d0 <printf>
return NULL;
8005594: 2300 movs r3, #0
8005596: e001 b.n 800559c <pbuf_alloc+0x1cc>
break;
8005598: bf00 nop
}
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p));
return p;
800559a: 6a7b ldr r3, [r7, #36] ; 0x24
}
800559c: 4618 mov r0, r3
800559e: 3728 adds r7, #40 ; 0x28
80055a0: 46bd mov sp, r7
80055a2: bd80 pop {r7, pc}
80055a4: 080154bc .word 0x080154bc
80055a8: 080154ec .word 0x080154ec
80055ac: 0801551c .word 0x0801551c
80055b0: 08015544 .word 0x08015544
80055b4: 08015578 .word 0x08015578
80055b8: 080155a4 .word 0x080155a4
080055bc <pbuf_alloc_reference>:
*
* @return the allocated pbuf.
*/
struct pbuf *
pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type)
{
80055bc: b580 push {r7, lr}
80055be: b086 sub sp, #24
80055c0: af02 add r7, sp, #8
80055c2: 6078 str r0, [r7, #4]
80055c4: 460b mov r3, r1
80055c6: 807b strh r3, [r7, #2]
80055c8: 4613 mov r3, r2
80055ca: 803b strh r3, [r7, #0]
struct pbuf *p;
LWIP_ASSERT("invalid pbuf_type", (type == PBUF_REF) || (type == PBUF_ROM));
80055cc: 883b ldrh r3, [r7, #0]
80055ce: 2b41 cmp r3, #65 ; 0x41
80055d0: d009 beq.n 80055e6 <pbuf_alloc_reference+0x2a>
80055d2: 883b ldrh r3, [r7, #0]
80055d4: 2b01 cmp r3, #1
80055d6: d006 beq.n 80055e6 <pbuf_alloc_reference+0x2a>
80055d8: 4b0f ldr r3, [pc, #60] ; (8005618 <pbuf_alloc_reference+0x5c>)
80055da: f44f 72a5 mov.w r2, #330 ; 0x14a
80055de: 490f ldr r1, [pc, #60] ; (800561c <pbuf_alloc_reference+0x60>)
80055e0: 480f ldr r0, [pc, #60] ; (8005620 <pbuf_alloc_reference+0x64>)
80055e2: f00a fef5 bl 80103d0 <printf>
/* only allocate memory for the pbuf structure */
p = (struct pbuf *)memp_malloc(MEMP_PBUF);
80055e6: 2007 movs r0, #7
80055e8: f7ff fae4 bl 8004bb4 <memp_malloc>
80055ec: 60f8 str r0, [r7, #12]
if (p == NULL) {
80055ee: 68fb ldr r3, [r7, #12]
80055f0: 2b00 cmp r3, #0
80055f2: d101 bne.n 80055f8 <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;
80055f4: 2300 movs r3, #0
80055f6: e00b b.n 8005610 <pbuf_alloc_reference+0x54>
}
pbuf_init_alloced_pbuf(p, payload, length, length, type, 0);
80055f8: 8879 ldrh r1, [r7, #2]
80055fa: 887a ldrh r2, [r7, #2]
80055fc: 2300 movs r3, #0
80055fe: 9301 str r3, [sp, #4]
8005600: 883b ldrh r3, [r7, #0]
8005602: 9300 str r3, [sp, #0]
8005604: 460b mov r3, r1
8005606: 6879 ldr r1, [r7, #4]
8005608: 68f8 ldr r0, [r7, #12]
800560a: f7ff feb7 bl 800537c <pbuf_init_alloced_pbuf>
return p;
800560e: 68fb ldr r3, [r7, #12]
}
8005610: 4618 mov r0, r3
8005612: 3710 adds r7, #16
8005614: 46bd mov sp, r7
8005616: bd80 pop {r7, pc}
8005618: 080154bc .word 0x080154bc
800561c: 080155c0 .word 0x080155c0
8005620: 0801551c .word 0x0801551c
08005624 <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)
{
8005624: b580 push {r7, lr}
8005626: b088 sub sp, #32
8005628: af02 add r7, sp, #8
800562a: 607b str r3, [r7, #4]
800562c: 4603 mov r3, r0
800562e: 73fb strb r3, [r7, #15]
8005630: 460b mov r3, r1
8005632: 81bb strh r3, [r7, #12]
8005634: 4613 mov r3, r2
8005636: 817b strh r3, [r7, #10]
u16_t offset = (u16_t)l;
8005638: 7bfb ldrb r3, [r7, #15]
800563a: 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) {
800563c: 8a7b ldrh r3, [r7, #18]
800563e: 3303 adds r3, #3
8005640: f023 0203 bic.w r2, r3, #3
8005644: 89bb ldrh r3, [r7, #12]
8005646: 441a add r2, r3
8005648: 8cbb ldrh r3, [r7, #36] ; 0x24
800564a: 429a cmp r2, r3
800564c: d901 bls.n 8005652 <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;
800564e: 2300 movs r3, #0
8005650: e018 b.n 8005684 <pbuf_alloced_custom+0x60>
}
if (payload_mem != NULL) {
8005652: 6a3b ldr r3, [r7, #32]
8005654: 2b00 cmp r3, #0
8005656: d007 beq.n 8005668 <pbuf_alloced_custom+0x44>
payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset);
8005658: 8a7b ldrh r3, [r7, #18]
800565a: 3303 adds r3, #3
800565c: f023 0303 bic.w r3, r3, #3
8005660: 6a3a ldr r2, [r7, #32]
8005662: 4413 add r3, r2
8005664: 617b str r3, [r7, #20]
8005666: e001 b.n 800566c <pbuf_alloced_custom+0x48>
} else {
payload = NULL;
8005668: 2300 movs r3, #0
800566a: 617b str r3, [r7, #20]
}
pbuf_init_alloced_pbuf(&p->pbuf, payload, length, length, type, PBUF_FLAG_IS_CUSTOM);
800566c: 6878 ldr r0, [r7, #4]
800566e: 89b9 ldrh r1, [r7, #12]
8005670: 89ba ldrh r2, [r7, #12]
8005672: 2302 movs r3, #2
8005674: 9301 str r3, [sp, #4]
8005676: 897b ldrh r3, [r7, #10]
8005678: 9300 str r3, [sp, #0]
800567a: 460b mov r3, r1
800567c: 6979 ldr r1, [r7, #20]
800567e: f7ff fe7d bl 800537c <pbuf_init_alloced_pbuf>
return &p->pbuf;
8005682: 687b ldr r3, [r7, #4]
}
8005684: 4618 mov r0, r3
8005686: 3718 adds r7, #24
8005688: 46bd mov sp, r7
800568a: bd80 pop {r7, pc}
0800568c <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)
{
800568c: b580 push {r7, lr}
800568e: b084 sub sp, #16
8005690: af00 add r7, sp, #0
8005692: 6078 str r0, [r7, #4]
8005694: 460b mov r3, r1
8005696: 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);
8005698: 687b ldr r3, [r7, #4]
800569a: 2b00 cmp r3, #0
800569c: d106 bne.n 80056ac <pbuf_realloc+0x20>
800569e: 4b3a ldr r3, [pc, #232] ; (8005788 <pbuf_realloc+0xfc>)
80056a0: f44f 72cc mov.w r2, #408 ; 0x198
80056a4: 4939 ldr r1, [pc, #228] ; (800578c <pbuf_realloc+0x100>)
80056a6: 483a ldr r0, [pc, #232] ; (8005790 <pbuf_realloc+0x104>)
80056a8: f00a fe92 bl 80103d0 <printf>
/* desired length larger than current length? */
if (new_len >= p->tot_len) {
80056ac: 687b ldr r3, [r7, #4]
80056ae: 891b ldrh r3, [r3, #8]
80056b0: 887a ldrh r2, [r7, #2]
80056b2: 429a cmp r2, r3
80056b4: d263 bcs.n 800577e <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);
80056b6: 687b ldr r3, [r7, #4]
80056b8: 891a ldrh r2, [r3, #8]
80056ba: 887b ldrh r3, [r7, #2]
80056bc: 1ad3 subs r3, r2, r3
80056be: 813b strh r3, [r7, #8]
/* first, step over any pbufs that should remain in the chain */
rem_len = new_len;
80056c0: 887b ldrh r3, [r7, #2]
80056c2: 817b strh r3, [r7, #10]
q = p;
80056c4: 687b ldr r3, [r7, #4]
80056c6: 60fb str r3, [r7, #12]
/* should this pbuf be kept? */
while (rem_len > q->len) {
80056c8: e018 b.n 80056fc <pbuf_realloc+0x70>
/* decrease remaining length by pbuf length */
rem_len = (u16_t)(rem_len - q->len);
80056ca: 68fb ldr r3, [r7, #12]
80056cc: 895b ldrh r3, [r3, #10]
80056ce: 897a ldrh r2, [r7, #10]
80056d0: 1ad3 subs r3, r2, r3
80056d2: 817b strh r3, [r7, #10]
/* decrease total length indicator */
q->tot_len = (u16_t)(q->tot_len - shrink);
80056d4: 68fb ldr r3, [r7, #12]
80056d6: 891a ldrh r2, [r3, #8]
80056d8: 893b ldrh r3, [r7, #8]
80056da: 1ad3 subs r3, r2, r3
80056dc: b29a uxth r2, r3
80056de: 68fb ldr r3, [r7, #12]
80056e0: 811a strh r2, [r3, #8]
/* proceed to next pbuf in chain */
q = q->next;
80056e2: 68fb ldr r3, [r7, #12]
80056e4: 681b ldr r3, [r3, #0]
80056e6: 60fb str r3, [r7, #12]
LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL);
80056e8: 68fb ldr r3, [r7, #12]
80056ea: 2b00 cmp r3, #0
80056ec: d106 bne.n 80056fc <pbuf_realloc+0x70>
80056ee: 4b26 ldr r3, [pc, #152] ; (8005788 <pbuf_realloc+0xfc>)
80056f0: f240 12af movw r2, #431 ; 0x1af
80056f4: 4927 ldr r1, [pc, #156] ; (8005794 <pbuf_realloc+0x108>)
80056f6: 4826 ldr r0, [pc, #152] ; (8005790 <pbuf_realloc+0x104>)
80056f8: f00a fe6a bl 80103d0 <printf>
while (rem_len > q->len) {
80056fc: 68fb ldr r3, [r7, #12]
80056fe: 895b ldrh r3, [r3, #10]
8005700: 897a ldrh r2, [r7, #10]
8005702: 429a cmp r2, r3
8005704: d8e1 bhi.n 80056ca <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)
8005706: 68fb ldr r3, [r7, #12]
8005708: 7b1b ldrb r3, [r3, #12]
800570a: f003 030f and.w r3, r3, #15
800570e: 2b00 cmp r3, #0
8005710: d121 bne.n 8005756 <pbuf_realloc+0xca>
8005712: 68fb ldr r3, [r7, #12]
8005714: 895b ldrh r3, [r3, #10]
8005716: 897a ldrh r2, [r7, #10]
8005718: 429a cmp r2, r3
800571a: d01c beq.n 8005756 <pbuf_realloc+0xca>
#if LWIP_SUPPORT_CUSTOM_PBUF
&& ((q->flags & PBUF_FLAG_IS_CUSTOM) == 0)
800571c: 68fb ldr r3, [r7, #12]
800571e: 7b5b ldrb r3, [r3, #13]
8005720: f003 0302 and.w r3, r3, #2
8005724: 2b00 cmp r3, #0
8005726: d116 bne.n 8005756 <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));
8005728: 68fb ldr r3, [r7, #12]
800572a: 685a ldr r2, [r3, #4]
800572c: 68fb ldr r3, [r7, #12]
800572e: 1ad3 subs r3, r2, r3
8005730: b29a uxth r2, r3
8005732: 897b ldrh r3, [r7, #10]
8005734: 4413 add r3, r2
8005736: b29b uxth r3, r3
8005738: 4619 mov r1, r3
800573a: 68f8 ldr r0, [r7, #12]
800573c: f7fe ffae bl 800469c <mem_trim>
8005740: 60f8 str r0, [r7, #12]
LWIP_ASSERT("mem_trim returned q == NULL", q != NULL);
8005742: 68fb ldr r3, [r7, #12]
8005744: 2b00 cmp r3, #0
8005746: d106 bne.n 8005756 <pbuf_realloc+0xca>
8005748: 4b0f ldr r3, [pc, #60] ; (8005788 <pbuf_realloc+0xfc>)
800574a: f240 12bd movw r2, #445 ; 0x1bd
800574e: 4912 ldr r1, [pc, #72] ; (8005798 <pbuf_realloc+0x10c>)
8005750: 480f ldr r0, [pc, #60] ; (8005790 <pbuf_realloc+0x104>)
8005752: f00a fe3d bl 80103d0 <printf>
}
/* adjust length fields for new last pbuf */
q->len = rem_len;
8005756: 68fb ldr r3, [r7, #12]
8005758: 897a ldrh r2, [r7, #10]
800575a: 815a strh r2, [r3, #10]
q->tot_len = q->len;
800575c: 68fb ldr r3, [r7, #12]
800575e: 895a ldrh r2, [r3, #10]
8005760: 68fb ldr r3, [r7, #12]
8005762: 811a strh r2, [r3, #8]
/* any remaining pbufs in chain? */
if (q->next != NULL) {
8005764: 68fb ldr r3, [r7, #12]
8005766: 681b ldr r3, [r3, #0]
8005768: 2b00 cmp r3, #0
800576a: d004 beq.n 8005776 <pbuf_realloc+0xea>
/* free remaining pbufs in chain */
pbuf_free(q->next);
800576c: 68fb ldr r3, [r7, #12]
800576e: 681b ldr r3, [r3, #0]
8005770: 4618 mov r0, r3
8005772: f000 f911 bl 8005998 <pbuf_free>
}
/* q is last packet in chain */
q->next = NULL;
8005776: 68fb ldr r3, [r7, #12]
8005778: 2200 movs r2, #0
800577a: 601a str r2, [r3, #0]
800577c: e000 b.n 8005780 <pbuf_realloc+0xf4>
return;
800577e: bf00 nop
}
8005780: 3710 adds r7, #16
8005782: 46bd mov sp, r7
8005784: bd80 pop {r7, pc}
8005786: bf00 nop
8005788: 080154bc .word 0x080154bc
800578c: 080155d4 .word 0x080155d4
8005790: 0801551c .word 0x0801551c
8005794: 080155ec .word 0x080155ec
8005798: 08015604 .word 0x08015604
0800579c <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)
{
800579c: b580 push {r7, lr}
800579e: b086 sub sp, #24
80057a0: af00 add r7, sp, #0
80057a2: 60f8 str r0, [r7, #12]
80057a4: 60b9 str r1, [r7, #8]
80057a6: 4613 mov r3, r2
80057a8: 71fb strb r3, [r7, #7]
u16_t type_internal;
void *payload;
u16_t increment_magnitude;
LWIP_ASSERT("p != NULL", p != NULL);
80057aa: 68fb ldr r3, [r7, #12]
80057ac: 2b00 cmp r3, #0
80057ae: d106 bne.n 80057be <pbuf_add_header_impl+0x22>
80057b0: 4b2b ldr r3, [pc, #172] ; (8005860 <pbuf_add_header_impl+0xc4>)
80057b2: f240 12df movw r2, #479 ; 0x1df
80057b6: 492b ldr r1, [pc, #172] ; (8005864 <pbuf_add_header_impl+0xc8>)
80057b8: 482b ldr r0, [pc, #172] ; (8005868 <pbuf_add_header_impl+0xcc>)
80057ba: f00a fe09 bl 80103d0 <printf>
if ((p == NULL) || (header_size_increment > 0xFFFF)) {
80057be: 68fb ldr r3, [r7, #12]
80057c0: 2b00 cmp r3, #0
80057c2: d003 beq.n 80057cc <pbuf_add_header_impl+0x30>
80057c4: 68bb ldr r3, [r7, #8]
80057c6: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
80057ca: d301 bcc.n 80057d0 <pbuf_add_header_impl+0x34>
return 1;
80057cc: 2301 movs r3, #1
80057ce: e043 b.n 8005858 <pbuf_add_header_impl+0xbc>
}
if (header_size_increment == 0) {
80057d0: 68bb ldr r3, [r7, #8]
80057d2: 2b00 cmp r3, #0
80057d4: d101 bne.n 80057da <pbuf_add_header_impl+0x3e>
return 0;
80057d6: 2300 movs r3, #0
80057d8: e03e b.n 8005858 <pbuf_add_header_impl+0xbc>
}
increment_magnitude = (u16_t)header_size_increment;
80057da: 68bb ldr r3, [r7, #8]
80057dc: 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) {
80057de: 68fb ldr r3, [r7, #12]
80057e0: 891a ldrh r2, [r3, #8]
80057e2: 8a7b ldrh r3, [r7, #18]
80057e4: 4413 add r3, r2
80057e6: b29b uxth r3, r3
80057e8: 8a7a ldrh r2, [r7, #18]
80057ea: 429a cmp r2, r3
80057ec: d901 bls.n 80057f2 <pbuf_add_header_impl+0x56>
return 1;
80057ee: 2301 movs r3, #1
80057f0: e032 b.n 8005858 <pbuf_add_header_impl+0xbc>
}
type_internal = p->type_internal;
80057f2: 68fb ldr r3, [r7, #12]
80057f4: 7b1b ldrb r3, [r3, #12]
80057f6: 823b strh r3, [r7, #16]
/* pbuf types containing payloads? */
if (type_internal & PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS) {
80057f8: 8a3b ldrh r3, [r7, #16]
80057fa: f003 0380 and.w r3, r3, #128 ; 0x80
80057fe: 2b00 cmp r3, #0
8005800: d00c beq.n 800581c <pbuf_add_header_impl+0x80>
/* set new payload pointer */
payload = (u8_t *)p->payload - header_size_increment;
8005802: 68fb ldr r3, [r7, #12]
8005804: 685a ldr r2, [r3, #4]
8005806: 68bb ldr r3, [r7, #8]
8005808: 425b negs r3, r3
800580a: 4413 add r3, r2
800580c: 617b str r3, [r7, #20]
/* boundary check fails? */
if ((u8_t *)payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) {
800580e: 68fb ldr r3, [r7, #12]
8005810: 3310 adds r3, #16
8005812: 697a ldr r2, [r7, #20]
8005814: 429a cmp r2, r3
8005816: d20d bcs.n 8005834 <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;
8005818: 2301 movs r3, #1
800581a: e01d b.n 8005858 <pbuf_add_header_impl+0xbc>
}
/* pbuf types referring to external payloads? */
} else {
/* hide a header in the payload? */
if (force) {
800581c: 79fb ldrb r3, [r7, #7]
800581e: 2b00 cmp r3, #0
8005820: d006 beq.n 8005830 <pbuf_add_header_impl+0x94>
payload = (u8_t *)p->payload - header_size_increment;
8005822: 68fb ldr r3, [r7, #12]
8005824: 685a ldr r2, [r3, #4]
8005826: 68bb ldr r3, [r7, #8]
8005828: 425b negs r3, r3
800582a: 4413 add r3, r2
800582c: 617b str r3, [r7, #20]
800582e: e001 b.n 8005834 <pbuf_add_header_impl+0x98>
} else {
/* cannot expand payload to front (yet!)
* bail out unsuccessfully */
return 1;
8005830: 2301 movs r3, #1
8005832: e011 b.n 8005858 <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;
8005834: 68fb ldr r3, [r7, #12]
8005836: 697a ldr r2, [r7, #20]
8005838: 605a str r2, [r3, #4]
p->len = (u16_t)(p->len + increment_magnitude);
800583a: 68fb ldr r3, [r7, #12]
800583c: 895a ldrh r2, [r3, #10]
800583e: 8a7b ldrh r3, [r7, #18]
8005840: 4413 add r3, r2
8005842: b29a uxth r2, r3
8005844: 68fb ldr r3, [r7, #12]
8005846: 815a strh r2, [r3, #10]
p->tot_len = (u16_t)(p->tot_len + increment_magnitude);
8005848: 68fb ldr r3, [r7, #12]
800584a: 891a ldrh r2, [r3, #8]
800584c: 8a7b ldrh r3, [r7, #18]
800584e: 4413 add r3, r2
8005850: b29a uxth r2, r3
8005852: 68fb ldr r3, [r7, #12]
8005854: 811a strh r2, [r3, #8]
return 0;
8005856: 2300 movs r3, #0
}
8005858: 4618 mov r0, r3
800585a: 3718 adds r7, #24
800585c: 46bd mov sp, r7
800585e: bd80 pop {r7, pc}
8005860: 080154bc .word 0x080154bc
8005864: 08015620 .word 0x08015620
8005868: 0801551c .word 0x0801551c
0800586c <pbuf_add_header>:
* @return non-zero on failure, zero on success.
*
*/
u8_t
pbuf_add_header(struct pbuf *p, size_t header_size_increment)
{
800586c: b580 push {r7, lr}
800586e: b082 sub sp, #8
8005870: af00 add r7, sp, #0
8005872: 6078 str r0, [r7, #4]
8005874: 6039 str r1, [r7, #0]
return pbuf_add_header_impl(p, header_size_increment, 0);
8005876: 2200 movs r2, #0
8005878: 6839 ldr r1, [r7, #0]
800587a: 6878 ldr r0, [r7, #4]
800587c: f7ff ff8e bl 800579c <pbuf_add_header_impl>
8005880: 4603 mov r3, r0
}
8005882: 4618 mov r0, r3
8005884: 3708 adds r7, #8
8005886: 46bd mov sp, r7
8005888: bd80 pop {r7, pc}
...
0800588c <pbuf_remove_header>:
* @return non-zero on failure, zero on success.
*
*/
u8_t
pbuf_remove_header(struct pbuf *p, size_t header_size_decrement)
{
800588c: b580 push {r7, lr}
800588e: b084 sub sp, #16
8005890: af00 add r7, sp, #0
8005892: 6078 str r0, [r7, #4]
8005894: 6039 str r1, [r7, #0]
void *payload;
u16_t increment_magnitude;
LWIP_ASSERT("p != NULL", p != NULL);
8005896: 687b ldr r3, [r7, #4]
8005898: 2b00 cmp r3, #0
800589a: d106 bne.n 80058aa <pbuf_remove_header+0x1e>
800589c: 4b20 ldr r3, [pc, #128] ; (8005920 <pbuf_remove_header+0x94>)
800589e: f240 224b movw r2, #587 ; 0x24b
80058a2: 4920 ldr r1, [pc, #128] ; (8005924 <pbuf_remove_header+0x98>)
80058a4: 4820 ldr r0, [pc, #128] ; (8005928 <pbuf_remove_header+0x9c>)
80058a6: f00a fd93 bl 80103d0 <printf>
if ((p == NULL) || (header_size_decrement > 0xFFFF)) {
80058aa: 687b ldr r3, [r7, #4]
80058ac: 2b00 cmp r3, #0
80058ae: d003 beq.n 80058b8 <pbuf_remove_header+0x2c>
80058b0: 683b ldr r3, [r7, #0]
80058b2: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
80058b6: d301 bcc.n 80058bc <pbuf_remove_header+0x30>
return 1;
80058b8: 2301 movs r3, #1
80058ba: e02c b.n 8005916 <pbuf_remove_header+0x8a>
}
if (header_size_decrement == 0) {
80058bc: 683b ldr r3, [r7, #0]
80058be: 2b00 cmp r3, #0
80058c0: d101 bne.n 80058c6 <pbuf_remove_header+0x3a>
return 0;
80058c2: 2300 movs r3, #0
80058c4: e027 b.n 8005916 <pbuf_remove_header+0x8a>
}
increment_magnitude = (u16_t)header_size_decrement;
80058c6: 683b ldr r3, [r7, #0]
80058c8: 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;);
80058ca: 687b ldr r3, [r7, #4]
80058cc: 895b ldrh r3, [r3, #10]
80058ce: 89fa ldrh r2, [r7, #14]
80058d0: 429a cmp r2, r3
80058d2: d908 bls.n 80058e6 <pbuf_remove_header+0x5a>
80058d4: 4b12 ldr r3, [pc, #72] ; (8005920 <pbuf_remove_header+0x94>)
80058d6: f240 2255 movw r2, #597 ; 0x255
80058da: 4914 ldr r1, [pc, #80] ; (800592c <pbuf_remove_header+0xa0>)
80058dc: 4812 ldr r0, [pc, #72] ; (8005928 <pbuf_remove_header+0x9c>)
80058de: f00a fd77 bl 80103d0 <printf>
80058e2: 2301 movs r3, #1
80058e4: e017 b.n 8005916 <pbuf_remove_header+0x8a>
/* remember current payload pointer */
payload = p->payload;
80058e6: 687b ldr r3, [r7, #4]
80058e8: 685b ldr r3, [r3, #4]
80058ea: 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;
80058ec: 687b ldr r3, [r7, #4]
80058ee: 685a ldr r2, [r3, #4]
80058f0: 683b ldr r3, [r7, #0]
80058f2: 441a add r2, r3
80058f4: 687b ldr r3, [r7, #4]
80058f6: 605a str r2, [r3, #4]
/* modify pbuf length fields */
p->len = (u16_t)(p->len - increment_magnitude);
80058f8: 687b ldr r3, [r7, #4]
80058fa: 895a ldrh r2, [r3, #10]
80058fc: 89fb ldrh r3, [r7, #14]
80058fe: 1ad3 subs r3, r2, r3
8005900: b29a uxth r2, r3
8005902: 687b ldr r3, [r7, #4]
8005904: 815a strh r2, [r3, #10]
p->tot_len = (u16_t)(p->tot_len - increment_magnitude);
8005906: 687b ldr r3, [r7, #4]
8005908: 891a ldrh r2, [r3, #8]
800590a: 89fb ldrh r3, [r7, #14]
800590c: 1ad3 subs r3, r2, r3
800590e: b29a uxth r2, r3
8005910: 687b ldr r3, [r7, #4]
8005912: 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;
8005914: 2300 movs r3, #0
}
8005916: 4618 mov r0, r3
8005918: 3710 adds r7, #16
800591a: 46bd mov sp, r7
800591c: bd80 pop {r7, pc}
800591e: bf00 nop
8005920: 080154bc .word 0x080154bc
8005924: 08015620 .word 0x08015620
8005928: 0801551c .word 0x0801551c
800592c: 0801562c .word 0x0801562c
08005930 <pbuf_header_impl>:
static u8_t
pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force)
{
8005930: b580 push {r7, lr}
8005932: b082 sub sp, #8
8005934: af00 add r7, sp, #0
8005936: 6078 str r0, [r7, #4]
8005938: 460b mov r3, r1
800593a: 807b strh r3, [r7, #2]
800593c: 4613 mov r3, r2
800593e: 707b strb r3, [r7, #1]
if (header_size_increment < 0) {
8005940: f9b7 3002 ldrsh.w r3, [r7, #2]
8005944: 2b00 cmp r3, #0
8005946: da08 bge.n 800595a <pbuf_header_impl+0x2a>
return pbuf_remove_header(p, (size_t) - header_size_increment);
8005948: f9b7 3002 ldrsh.w r3, [r7, #2]
800594c: 425b negs r3, r3
800594e: 4619 mov r1, r3
8005950: 6878 ldr r0, [r7, #4]
8005952: f7ff ff9b bl 800588c <pbuf_remove_header>
8005956: 4603 mov r3, r0
8005958: e007 b.n 800596a <pbuf_header_impl+0x3a>
} else {
return pbuf_add_header_impl(p, (size_t)header_size_increment, force);
800595a: f9b7 3002 ldrsh.w r3, [r7, #2]
800595e: 787a ldrb r2, [r7, #1]
8005960: 4619 mov r1, r3
8005962: 6878 ldr r0, [r7, #4]
8005964: f7ff ff1a bl 800579c <pbuf_add_header_impl>
8005968: 4603 mov r3, r0
}
}
800596a: 4618 mov r0, r3
800596c: 3708 adds r7, #8
800596e: 46bd mov sp, r7
8005970: bd80 pop {r7, pc}
08005972 <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)
{
8005972: b580 push {r7, lr}
8005974: b082 sub sp, #8
8005976: af00 add r7, sp, #0
8005978: 6078 str r0, [r7, #4]
800597a: 460b mov r3, r1
800597c: 807b strh r3, [r7, #2]
return pbuf_header_impl(p, header_size_increment, 1);
800597e: f9b7 3002 ldrsh.w r3, [r7, #2]
8005982: 2201 movs r2, #1
8005984: 4619 mov r1, r3
8005986: 6878 ldr r0, [r7, #4]
8005988: f7ff ffd2 bl 8005930 <pbuf_header_impl>
800598c: 4603 mov r3, r0
}
800598e: 4618 mov r0, r3
8005990: 3708 adds r7, #8
8005992: 46bd mov sp, r7
8005994: bd80 pop {r7, pc}
...
08005998 <pbuf_free>:
* 1->1->1 becomes .......
*
*/
u8_t
pbuf_free(struct pbuf *p)
{
8005998: b580 push {r7, lr}
800599a: b086 sub sp, #24
800599c: af00 add r7, sp, #0
800599e: 6078 str r0, [r7, #4]
u8_t alloc_src;
struct pbuf *q;
u8_t count;
if (p == NULL) {
80059a0: 687b ldr r3, [r7, #4]
80059a2: 2b00 cmp r3, #0
80059a4: d10b bne.n 80059be <pbuf_free+0x26>
LWIP_ASSERT("p != NULL", p != NULL);
80059a6: 687b ldr r3, [r7, #4]
80059a8: 2b00 cmp r3, #0
80059aa: d106 bne.n 80059ba <pbuf_free+0x22>
80059ac: 4b38 ldr r3, [pc, #224] ; (8005a90 <pbuf_free+0xf8>)
80059ae: f44f 7237 mov.w r2, #732 ; 0x2dc
80059b2: 4938 ldr r1, [pc, #224] ; (8005a94 <pbuf_free+0xfc>)
80059b4: 4838 ldr r0, [pc, #224] ; (8005a98 <pbuf_free+0x100>)
80059b6: f00a fd0b bl 80103d0 <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;
80059ba: 2300 movs r3, #0
80059bc: e063 b.n 8005a86 <pbuf_free+0xee>
}
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free(%p)\n", (void *)p));
PERF_START;
count = 0;
80059be: 2300 movs r3, #0
80059c0: 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) {
80059c2: e05c b.n 8005a7e <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);
80059c4: 687b ldr r3, [r7, #4]
80059c6: 7b9b ldrb r3, [r3, #14]
80059c8: 2b00 cmp r3, #0
80059ca: d106 bne.n 80059da <pbuf_free+0x42>
80059cc: 4b30 ldr r3, [pc, #192] ; (8005a90 <pbuf_free+0xf8>)
80059ce: f240 22f1 movw r2, #753 ; 0x2f1
80059d2: 4932 ldr r1, [pc, #200] ; (8005a9c <pbuf_free+0x104>)
80059d4: 4830 ldr r0, [pc, #192] ; (8005a98 <pbuf_free+0x100>)
80059d6: f00a fcfb bl 80103d0 <printf>
/* decrease reference count (number of pointers to pbuf) */
ref = --(p->ref);
80059da: 687b ldr r3, [r7, #4]
80059dc: 7b9b ldrb r3, [r3, #14]
80059de: 3b01 subs r3, #1
80059e0: b2da uxtb r2, r3
80059e2: 687b ldr r3, [r7, #4]
80059e4: 739a strb r2, [r3, #14]
80059e6: 687b ldr r3, [r7, #4]
80059e8: 7b9b ldrb r3, [r3, #14]
80059ea: 75bb strb r3, [r7, #22]
SYS_ARCH_UNPROTECT(old_level);
/* this pbuf is no longer referenced to? */
if (ref == 0) {
80059ec: 7dbb ldrb r3, [r7, #22]
80059ee: 2b00 cmp r3, #0
80059f0: d143 bne.n 8005a7a <pbuf_free+0xe2>
/* remember next pbuf in chain for next iteration */
q = p->next;
80059f2: 687b ldr r3, [r7, #4]
80059f4: 681b ldr r3, [r3, #0]
80059f6: 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);
80059f8: 687b ldr r3, [r7, #4]
80059fa: 7b1b ldrb r3, [r3, #12]
80059fc: f003 030f and.w r3, r3, #15
8005a00: 73fb strb r3, [r7, #15]
#if LWIP_SUPPORT_CUSTOM_PBUF
/* is this a custom pbuf? */
if ((p->flags & PBUF_FLAG_IS_CUSTOM) != 0) {
8005a02: 687b ldr r3, [r7, #4]
8005a04: 7b5b ldrb r3, [r3, #13]
8005a06: f003 0302 and.w r3, r3, #2
8005a0a: 2b00 cmp r3, #0
8005a0c: d011 beq.n 8005a32 <pbuf_free+0x9a>
struct pbuf_custom *pc = (struct pbuf_custom *)p;
8005a0e: 687b ldr r3, [r7, #4]
8005a10: 60bb str r3, [r7, #8]
LWIP_ASSERT("pc->custom_free_function != NULL", pc->custom_free_function != NULL);
8005a12: 68bb ldr r3, [r7, #8]
8005a14: 691b ldr r3, [r3, #16]
8005a16: 2b00 cmp r3, #0
8005a18: d106 bne.n 8005a28 <pbuf_free+0x90>
8005a1a: 4b1d ldr r3, [pc, #116] ; (8005a90 <pbuf_free+0xf8>)
8005a1c: f240 22ff movw r2, #767 ; 0x2ff
8005a20: 491f ldr r1, [pc, #124] ; (8005aa0 <pbuf_free+0x108>)
8005a22: 481d ldr r0, [pc, #116] ; (8005a98 <pbuf_free+0x100>)
8005a24: f00a fcd4 bl 80103d0 <printf>
pc->custom_free_function(p);
8005a28: 68bb ldr r3, [r7, #8]
8005a2a: 691b ldr r3, [r3, #16]
8005a2c: 6878 ldr r0, [r7, #4]
8005a2e: 4798 blx r3
8005a30: e01d b.n 8005a6e <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) {
8005a32: 7bfb ldrb r3, [r7, #15]
8005a34: 2b02 cmp r3, #2
8005a36: d104 bne.n 8005a42 <pbuf_free+0xaa>
memp_free(MEMP_PBUF_POOL, p);
8005a38: 6879 ldr r1, [r7, #4]
8005a3a: 2008 movs r0, #8
8005a3c: f7ff f92a bl 8004c94 <memp_free>
8005a40: e015 b.n 8005a6e <pbuf_free+0xd6>
/* is this a ROM or RAM referencing pbuf? */
} else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF) {
8005a42: 7bfb ldrb r3, [r7, #15]
8005a44: 2b01 cmp r3, #1
8005a46: d104 bne.n 8005a52 <pbuf_free+0xba>
memp_free(MEMP_PBUF, p);
8005a48: 6879 ldr r1, [r7, #4]
8005a4a: 2007 movs r0, #7
8005a4c: f7ff f922 bl 8004c94 <memp_free>
8005a50: e00d b.n 8005a6e <pbuf_free+0xd6>
/* type == PBUF_RAM */
} else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) {
8005a52: 7bfb ldrb r3, [r7, #15]
8005a54: 2b00 cmp r3, #0
8005a56: d103 bne.n 8005a60 <pbuf_free+0xc8>
mem_free(p);
8005a58: 6878 ldr r0, [r7, #4]
8005a5a: f7fe fdb5 bl 80045c8 <mem_free>
8005a5e: e006 b.n 8005a6e <pbuf_free+0xd6>
} else {
/* @todo: support freeing other types */
LWIP_ASSERT("invalid pbuf type", 0);
8005a60: 4b0b ldr r3, [pc, #44] ; (8005a90 <pbuf_free+0xf8>)
8005a62: f240 320f movw r2, #783 ; 0x30f
8005a66: 490f ldr r1, [pc, #60] ; (8005aa4 <pbuf_free+0x10c>)
8005a68: 480b ldr r0, [pc, #44] ; (8005a98 <pbuf_free+0x100>)
8005a6a: f00a fcb1 bl 80103d0 <printf>
}
}
count++;
8005a6e: 7dfb ldrb r3, [r7, #23]
8005a70: 3301 adds r3, #1
8005a72: 75fb strb r3, [r7, #23]
/* proceed to next pbuf */
p = q;
8005a74: 693b ldr r3, [r7, #16]
8005a76: 607b str r3, [r7, #4]
8005a78: e001 b.n 8005a7e <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;
8005a7a: 2300 movs r3, #0
8005a7c: 607b str r3, [r7, #4]
while (p != NULL) {
8005a7e: 687b ldr r3, [r7, #4]
8005a80: 2b00 cmp r3, #0
8005a82: d19f bne.n 80059c4 <pbuf_free+0x2c>
}
}
PERF_STOP("pbuf_free");
/* return number of de-allocated pbufs */
return count;
8005a84: 7dfb ldrb r3, [r7, #23]
}
8005a86: 4618 mov r0, r3
8005a88: 3718 adds r7, #24
8005a8a: 46bd mov sp, r7
8005a8c: bd80 pop {r7, pc}
8005a8e: bf00 nop
8005a90: 080154bc .word 0x080154bc
8005a94: 08015620 .word 0x08015620
8005a98: 0801551c .word 0x0801551c
8005a9c: 0801564c .word 0x0801564c
8005aa0: 08015664 .word 0x08015664
8005aa4: 08015688 .word 0x08015688
08005aa8 <pbuf_clen>:
* @param p first pbuf of chain
* @return the number of pbufs in a chain
*/
u16_t
pbuf_clen(const struct pbuf *p)
{
8005aa8: b480 push {r7}
8005aaa: b085 sub sp, #20
8005aac: af00 add r7, sp, #0
8005aae: 6078 str r0, [r7, #4]
u16_t len;
len = 0;
8005ab0: 2300 movs r3, #0
8005ab2: 81fb strh r3, [r7, #14]
while (p != NULL) {
8005ab4: e005 b.n 8005ac2 <pbuf_clen+0x1a>
++len;
8005ab6: 89fb ldrh r3, [r7, #14]
8005ab8: 3301 adds r3, #1
8005aba: 81fb strh r3, [r7, #14]
p = p->next;
8005abc: 687b ldr r3, [r7, #4]
8005abe: 681b ldr r3, [r3, #0]
8005ac0: 607b str r3, [r7, #4]
while (p != NULL) {
8005ac2: 687b ldr r3, [r7, #4]
8005ac4: 2b00 cmp r3, #0
8005ac6: d1f6 bne.n 8005ab6 <pbuf_clen+0xe>
}
return len;
8005ac8: 89fb ldrh r3, [r7, #14]
}
8005aca: 4618 mov r0, r3
8005acc: 3714 adds r7, #20
8005ace: 46bd mov sp, r7
8005ad0: f85d 7b04 ldr.w r7, [sp], #4
8005ad4: 4770 bx lr
...
08005ad8 <pbuf_ref>:
* @param p pbuf to increase reference counter of
*
*/
void
pbuf_ref(struct pbuf *p)
{
8005ad8: b580 push {r7, lr}
8005ada: b082 sub sp, #8
8005adc: af00 add r7, sp, #0
8005ade: 6078 str r0, [r7, #4]
/* pbuf given? */
if (p != NULL) {
8005ae0: 687b ldr r3, [r7, #4]
8005ae2: 2b00 cmp r3, #0
8005ae4: d010 beq.n 8005b08 <pbuf_ref+0x30>
SYS_ARCH_SET(p->ref, (LWIP_PBUF_REF_T)(p->ref + 1));
8005ae6: 687b ldr r3, [r7, #4]
8005ae8: 7b9b ldrb r3, [r3, #14]
8005aea: 3301 adds r3, #1
8005aec: b2da uxtb r2, r3
8005aee: 687b ldr r3, [r7, #4]
8005af0: 739a strb r2, [r3, #14]
LWIP_ASSERT("pbuf ref overflow", p->ref > 0);
8005af2: 687b ldr r3, [r7, #4]
8005af4: 7b9b ldrb r3, [r3, #14]
8005af6: 2b00 cmp r3, #0
8005af8: d106 bne.n 8005b08 <pbuf_ref+0x30>
8005afa: 4b05 ldr r3, [pc, #20] ; (8005b10 <pbuf_ref+0x38>)
8005afc: f240 3242 movw r2, #834 ; 0x342
8005b00: 4904 ldr r1, [pc, #16] ; (8005b14 <pbuf_ref+0x3c>)
8005b02: 4805 ldr r0, [pc, #20] ; (8005b18 <pbuf_ref+0x40>)
8005b04: f00a fc64 bl 80103d0 <printf>
}
}
8005b08: bf00 nop
8005b0a: 3708 adds r7, #8
8005b0c: 46bd mov sp, r7
8005b0e: bd80 pop {r7, pc}
8005b10: 080154bc .word 0x080154bc
8005b14: 0801569c .word 0x0801569c
8005b18: 0801551c .word 0x0801551c
08005b1c <pbuf_cat>:
*
* @see pbuf_chain()
*/
void
pbuf_cat(struct pbuf *h, struct pbuf *t)
{
8005b1c: b580 push {r7, lr}
8005b1e: b084 sub sp, #16
8005b20: af00 add r7, sp, #0
8005b22: 6078 str r0, [r7, #4]
8005b24: 6039 str r1, [r7, #0]
struct pbuf *p;
LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)",
8005b26: 687b ldr r3, [r7, #4]
8005b28: 2b00 cmp r3, #0
8005b2a: d002 beq.n 8005b32 <pbuf_cat+0x16>
8005b2c: 683b ldr r3, [r7, #0]
8005b2e: 2b00 cmp r3, #0
8005b30: d107 bne.n 8005b42 <pbuf_cat+0x26>
8005b32: 4b20 ldr r3, [pc, #128] ; (8005bb4 <pbuf_cat+0x98>)
8005b34: f240 3259 movw r2, #857 ; 0x359
8005b38: 491f ldr r1, [pc, #124] ; (8005bb8 <pbuf_cat+0x9c>)
8005b3a: 4820 ldr r0, [pc, #128] ; (8005bbc <pbuf_cat+0xa0>)
8005b3c: f00a fc48 bl 80103d0 <printf>
8005b40: e034 b.n 8005bac <pbuf_cat+0x90>
((h != NULL) && (t != NULL)), return;);
/* proceed to last pbuf of chain */
for (p = h; p->next != NULL; p = p->next) {
8005b42: 687b ldr r3, [r7, #4]
8005b44: 60fb str r3, [r7, #12]
8005b46: e00a b.n 8005b5e <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);
8005b48: 68fb ldr r3, [r7, #12]
8005b4a: 891a ldrh r2, [r3, #8]
8005b4c: 683b ldr r3, [r7, #0]
8005b4e: 891b ldrh r3, [r3, #8]
8005b50: 4413 add r3, r2
8005b52: b29a uxth r2, r3
8005b54: 68fb ldr r3, [r7, #12]
8005b56: 811a strh r2, [r3, #8]
for (p = h; p->next != NULL; p = p->next) {
8005b58: 68fb ldr r3, [r7, #12]
8005b5a: 681b ldr r3, [r3, #0]
8005b5c: 60fb str r3, [r7, #12]
8005b5e: 68fb ldr r3, [r7, #12]
8005b60: 681b ldr r3, [r3, #0]
8005b62: 2b00 cmp r3, #0
8005b64: d1f0 bne.n 8005b48 <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);
8005b66: 68fb ldr r3, [r7, #12]
8005b68: 891a ldrh r2, [r3, #8]
8005b6a: 68fb ldr r3, [r7, #12]
8005b6c: 895b ldrh r3, [r3, #10]
8005b6e: 429a cmp r2, r3
8005b70: d006 beq.n 8005b80 <pbuf_cat+0x64>
8005b72: 4b10 ldr r3, [pc, #64] ; (8005bb4 <pbuf_cat+0x98>)
8005b74: f240 3262 movw r2, #866 ; 0x362
8005b78: 4911 ldr r1, [pc, #68] ; (8005bc0 <pbuf_cat+0xa4>)
8005b7a: 4810 ldr r0, [pc, #64] ; (8005bbc <pbuf_cat+0xa0>)
8005b7c: f00a fc28 bl 80103d0 <printf>
LWIP_ASSERT("p->next == NULL", p->next == NULL);
8005b80: 68fb ldr r3, [r7, #12]
8005b82: 681b ldr r3, [r3, #0]
8005b84: 2b00 cmp r3, #0
8005b86: d006 beq.n 8005b96 <pbuf_cat+0x7a>
8005b88: 4b0a ldr r3, [pc, #40] ; (8005bb4 <pbuf_cat+0x98>)
8005b8a: f240 3263 movw r2, #867 ; 0x363
8005b8e: 490d ldr r1, [pc, #52] ; (8005bc4 <pbuf_cat+0xa8>)
8005b90: 480a ldr r0, [pc, #40] ; (8005bbc <pbuf_cat+0xa0>)
8005b92: f00a fc1d bl 80103d0 <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);
8005b96: 68fb ldr r3, [r7, #12]
8005b98: 891a ldrh r2, [r3, #8]
8005b9a: 683b ldr r3, [r7, #0]
8005b9c: 891b ldrh r3, [r3, #8]
8005b9e: 4413 add r3, r2
8005ba0: b29a uxth r2, r3
8005ba2: 68fb ldr r3, [r7, #12]
8005ba4: 811a strh r2, [r3, #8]
/* chain last pbuf of head (p) with first of tail (t) */
p->next = t;
8005ba6: 68fb ldr r3, [r7, #12]
8005ba8: 683a ldr r2, [r7, #0]
8005baa: 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.
*/
}
8005bac: 3710 adds r7, #16
8005bae: 46bd mov sp, r7
8005bb0: bd80 pop {r7, pc}
8005bb2: bf00 nop
8005bb4: 080154bc .word 0x080154bc
8005bb8: 080156b0 .word 0x080156b0
8005bbc: 0801551c .word 0x0801551c
8005bc0: 080156e8 .word 0x080156e8
8005bc4: 08015718 .word 0x08015718
08005bc8 <pbuf_chain>:
* The ->ref field of the first pbuf of the tail chain is adjusted.
*
*/
void
pbuf_chain(struct pbuf *h, struct pbuf *t)
{
8005bc8: b580 push {r7, lr}
8005bca: b082 sub sp, #8
8005bcc: af00 add r7, sp, #0
8005bce: 6078 str r0, [r7, #4]
8005bd0: 6039 str r1, [r7, #0]
pbuf_cat(h, t);
8005bd2: 6839 ldr r1, [r7, #0]
8005bd4: 6878 ldr r0, [r7, #4]
8005bd6: f7ff ffa1 bl 8005b1c <pbuf_cat>
/* t is now referenced by h */
pbuf_ref(t);
8005bda: 6838 ldr r0, [r7, #0]
8005bdc: f7ff ff7c bl 8005ad8 <pbuf_ref>
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t));
}
8005be0: bf00 nop
8005be2: 3708 adds r7, #8
8005be4: 46bd mov sp, r7
8005be6: bd80 pop {r7, pc}
08005be8 <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)
{
8005be8: b580 push {r7, lr}
8005bea: b086 sub sp, #24
8005bec: af00 add r7, sp, #0
8005bee: 6078 str r0, [r7, #4]
8005bf0: 6039 str r1, [r7, #0]
size_t offset_to = 0, offset_from = 0, len;
8005bf2: 2300 movs r3, #0
8005bf4: 617b str r3, [r7, #20]
8005bf6: 2300 movs r3, #0
8005bf8: 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) &&
8005bfa: 687b ldr r3, [r7, #4]
8005bfc: 2b00 cmp r3, #0
8005bfe: d008 beq.n 8005c12 <pbuf_copy+0x2a>
8005c00: 683b ldr r3, [r7, #0]
8005c02: 2b00 cmp r3, #0
8005c04: d005 beq.n 8005c12 <pbuf_copy+0x2a>
8005c06: 687b ldr r3, [r7, #4]
8005c08: 891a ldrh r2, [r3, #8]
8005c0a: 683b ldr r3, [r7, #0]
8005c0c: 891b ldrh r3, [r3, #8]
8005c0e: 429a cmp r2, r3
8005c10: d209 bcs.n 8005c26 <pbuf_copy+0x3e>
8005c12: 4b57 ldr r3, [pc, #348] ; (8005d70 <pbuf_copy+0x188>)
8005c14: f240 32c9 movw r2, #969 ; 0x3c9
8005c18: 4956 ldr r1, [pc, #344] ; (8005d74 <pbuf_copy+0x18c>)
8005c1a: 4857 ldr r0, [pc, #348] ; (8005d78 <pbuf_copy+0x190>)
8005c1c: f00a fbd8 bl 80103d0 <printf>
8005c20: f06f 030f mvn.w r3, #15
8005c24: e09f b.n 8005d66 <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)) {
8005c26: 687b ldr r3, [r7, #4]
8005c28: 895b ldrh r3, [r3, #10]
8005c2a: 461a mov r2, r3
8005c2c: 697b ldr r3, [r7, #20]
8005c2e: 1ad2 subs r2, r2, r3
8005c30: 683b ldr r3, [r7, #0]
8005c32: 895b ldrh r3, [r3, #10]
8005c34: 4619 mov r1, r3
8005c36: 693b ldr r3, [r7, #16]
8005c38: 1acb subs r3, r1, r3
8005c3a: 429a cmp r2, r3
8005c3c: d306 bcc.n 8005c4c <pbuf_copy+0x64>
/* complete current p_from fits into current p_to */
len = p_from->len - offset_from;
8005c3e: 683b ldr r3, [r7, #0]
8005c40: 895b ldrh r3, [r3, #10]
8005c42: 461a mov r2, r3
8005c44: 693b ldr r3, [r7, #16]
8005c46: 1ad3 subs r3, r2, r3
8005c48: 60fb str r3, [r7, #12]
8005c4a: e005 b.n 8005c58 <pbuf_copy+0x70>
} else {
/* current p_from does not fit into current p_to */
len = p_to->len - offset_to;
8005c4c: 687b ldr r3, [r7, #4]
8005c4e: 895b ldrh r3, [r3, #10]
8005c50: 461a mov r2, r3
8005c52: 697b ldr r3, [r7, #20]
8005c54: 1ad3 subs r3, r2, r3
8005c56: 60fb str r3, [r7, #12]
}
MEMCPY((u8_t *)p_to->payload + offset_to, (u8_t *)p_from->payload + offset_from, len);
8005c58: 687b ldr r3, [r7, #4]
8005c5a: 685a ldr r2, [r3, #4]
8005c5c: 697b ldr r3, [r7, #20]
8005c5e: 18d0 adds r0, r2, r3
8005c60: 683b ldr r3, [r7, #0]
8005c62: 685a ldr r2, [r3, #4]
8005c64: 693b ldr r3, [r7, #16]
8005c66: 4413 add r3, r2
8005c68: 68fa ldr r2, [r7, #12]
8005c6a: 4619 mov r1, r3
8005c6c: f00a fb80 bl 8010370 <memcpy>
offset_to += len;
8005c70: 697a ldr r2, [r7, #20]
8005c72: 68fb ldr r3, [r7, #12]
8005c74: 4413 add r3, r2
8005c76: 617b str r3, [r7, #20]
offset_from += len;
8005c78: 693a ldr r2, [r7, #16]
8005c7a: 68fb ldr r3, [r7, #12]
8005c7c: 4413 add r3, r2
8005c7e: 613b str r3, [r7, #16]
LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len);
8005c80: 687b ldr r3, [r7, #4]
8005c82: 895b ldrh r3, [r3, #10]
8005c84: 461a mov r2, r3
8005c86: 697b ldr r3, [r7, #20]
8005c88: 4293 cmp r3, r2
8005c8a: d906 bls.n 8005c9a <pbuf_copy+0xb2>
8005c8c: 4b38 ldr r3, [pc, #224] ; (8005d70 <pbuf_copy+0x188>)
8005c8e: f240 32d9 movw r2, #985 ; 0x3d9
8005c92: 493a ldr r1, [pc, #232] ; (8005d7c <pbuf_copy+0x194>)
8005c94: 4838 ldr r0, [pc, #224] ; (8005d78 <pbuf_copy+0x190>)
8005c96: f00a fb9b bl 80103d0 <printf>
LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len);
8005c9a: 683b ldr r3, [r7, #0]
8005c9c: 895b ldrh r3, [r3, #10]
8005c9e: 461a mov r2, r3
8005ca0: 693b ldr r3, [r7, #16]
8005ca2: 4293 cmp r3, r2
8005ca4: d906 bls.n 8005cb4 <pbuf_copy+0xcc>
8005ca6: 4b32 ldr r3, [pc, #200] ; (8005d70 <pbuf_copy+0x188>)
8005ca8: f240 32da movw r2, #986 ; 0x3da
8005cac: 4934 ldr r1, [pc, #208] ; (8005d80 <pbuf_copy+0x198>)
8005cae: 4832 ldr r0, [pc, #200] ; (8005d78 <pbuf_copy+0x190>)
8005cb0: f00a fb8e bl 80103d0 <printf>
if (offset_from >= p_from->len) {
8005cb4: 683b ldr r3, [r7, #0]
8005cb6: 895b ldrh r3, [r3, #10]
8005cb8: 461a mov r2, r3
8005cba: 693b ldr r3, [r7, #16]
8005cbc: 4293 cmp r3, r2
8005cbe: d304 bcc.n 8005cca <pbuf_copy+0xe2>
/* on to next p_from (if any) */
offset_from = 0;
8005cc0: 2300 movs r3, #0
8005cc2: 613b str r3, [r7, #16]
p_from = p_from->next;
8005cc4: 683b ldr r3, [r7, #0]
8005cc6: 681b ldr r3, [r3, #0]
8005cc8: 603b str r3, [r7, #0]
}
if (offset_to == p_to->len) {
8005cca: 687b ldr r3, [r7, #4]
8005ccc: 895b ldrh r3, [r3, #10]
8005cce: 461a mov r2, r3
8005cd0: 697b ldr r3, [r7, #20]
8005cd2: 4293 cmp r3, r2
8005cd4: d114 bne.n 8005d00 <pbuf_copy+0x118>
/* on to next p_to (if any) */
offset_to = 0;
8005cd6: 2300 movs r3, #0
8005cd8: 617b str r3, [r7, #20]
p_to = p_to->next;
8005cda: 687b ldr r3, [r7, #4]
8005cdc: 681b ldr r3, [r3, #0]
8005cde: 607b str r3, [r7, #4]
LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL), return ERR_ARG;);
8005ce0: 687b ldr r3, [r7, #4]
8005ce2: 2b00 cmp r3, #0
8005ce4: d10c bne.n 8005d00 <pbuf_copy+0x118>
8005ce6: 683b ldr r3, [r7, #0]
8005ce8: 2b00 cmp r3, #0
8005cea: d009 beq.n 8005d00 <pbuf_copy+0x118>
8005cec: 4b20 ldr r3, [pc, #128] ; (8005d70 <pbuf_copy+0x188>)
8005cee: f44f 7279 mov.w r2, #996 ; 0x3e4
8005cf2: 4924 ldr r1, [pc, #144] ; (8005d84 <pbuf_copy+0x19c>)
8005cf4: 4820 ldr r0, [pc, #128] ; (8005d78 <pbuf_copy+0x190>)
8005cf6: f00a fb6b bl 80103d0 <printf>
8005cfa: f06f 030f mvn.w r3, #15
8005cfe: e032 b.n 8005d66 <pbuf_copy+0x17e>
}
if ((p_from != NULL) && (p_from->len == p_from->tot_len)) {
8005d00: 683b ldr r3, [r7, #0]
8005d02: 2b00 cmp r3, #0
8005d04: d013 beq.n 8005d2e <pbuf_copy+0x146>
8005d06: 683b ldr r3, [r7, #0]
8005d08: 895a ldrh r2, [r3, #10]
8005d0a: 683b ldr r3, [r7, #0]
8005d0c: 891b ldrh r3, [r3, #8]
8005d0e: 429a cmp r2, r3
8005d10: d10d bne.n 8005d2e <pbuf_copy+0x146>
/* don't copy more than one packet! */
LWIP_ERROR("pbuf_copy() does not allow packet queues!",
8005d12: 683b ldr r3, [r7, #0]
8005d14: 681b ldr r3, [r3, #0]
8005d16: 2b00 cmp r3, #0
8005d18: d009 beq.n 8005d2e <pbuf_copy+0x146>
8005d1a: 4b15 ldr r3, [pc, #84] ; (8005d70 <pbuf_copy+0x188>)
8005d1c: f240 32e9 movw r2, #1001 ; 0x3e9
8005d20: 4919 ldr r1, [pc, #100] ; (8005d88 <pbuf_copy+0x1a0>)
8005d22: 4815 ldr r0, [pc, #84] ; (8005d78 <pbuf_copy+0x190>)
8005d24: f00a fb54 bl 80103d0 <printf>
8005d28: f06f 0305 mvn.w r3, #5
8005d2c: e01b b.n 8005d66 <pbuf_copy+0x17e>
(p_from->next == NULL), return ERR_VAL;);
}
if ((p_to != NULL) && (p_to->len == p_to->tot_len)) {
8005d2e: 687b ldr r3, [r7, #4]
8005d30: 2b00 cmp r3, #0
8005d32: d013 beq.n 8005d5c <pbuf_copy+0x174>
8005d34: 687b ldr r3, [r7, #4]
8005d36: 895a ldrh r2, [r3, #10]
8005d38: 687b ldr r3, [r7, #4]
8005d3a: 891b ldrh r3, [r3, #8]
8005d3c: 429a cmp r2, r3
8005d3e: d10d bne.n 8005d5c <pbuf_copy+0x174>
/* don't copy more than one packet! */
LWIP_ERROR("pbuf_copy() does not allow packet queues!",
8005d40: 687b ldr r3, [r7, #4]
8005d42: 681b ldr r3, [r3, #0]
8005d44: 2b00 cmp r3, #0
8005d46: d009 beq.n 8005d5c <pbuf_copy+0x174>
8005d48: 4b09 ldr r3, [pc, #36] ; (8005d70 <pbuf_copy+0x188>)
8005d4a: f240 32ee movw r2, #1006 ; 0x3ee
8005d4e: 490e ldr r1, [pc, #56] ; (8005d88 <pbuf_copy+0x1a0>)
8005d50: 4809 ldr r0, [pc, #36] ; (8005d78 <pbuf_copy+0x190>)
8005d52: f00a fb3d bl 80103d0 <printf>
8005d56: f06f 0305 mvn.w r3, #5
8005d5a: e004 b.n 8005d66 <pbuf_copy+0x17e>
(p_to->next == NULL), return ERR_VAL;);
}
} while (p_from);
8005d5c: 683b ldr r3, [r7, #0]
8005d5e: 2b00 cmp r3, #0
8005d60: f47f af61 bne.w 8005c26 <pbuf_copy+0x3e>
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n"));
return ERR_OK;
8005d64: 2300 movs r3, #0
}
8005d66: 4618 mov r0, r3
8005d68: 3718 adds r7, #24
8005d6a: 46bd mov sp, r7
8005d6c: bd80 pop {r7, pc}
8005d6e: bf00 nop
8005d70: 080154bc .word 0x080154bc
8005d74: 08015764 .word 0x08015764
8005d78: 0801551c .word 0x0801551c
8005d7c: 08015794 .word 0x08015794
8005d80: 080157ac .word 0x080157ac
8005d84: 080157c8 .word 0x080157c8
8005d88: 080157d8 .word 0x080157d8
08005d8c <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)
{
8005d8c: b580 push {r7, lr}
8005d8e: b088 sub sp, #32
8005d90: af00 add r7, sp, #0
8005d92: 60f8 str r0, [r7, #12]
8005d94: 60b9 str r1, [r7, #8]
8005d96: 4611 mov r1, r2
8005d98: 461a mov r2, r3
8005d9a: 460b mov r3, r1
8005d9c: 80fb strh r3, [r7, #6]
8005d9e: 4613 mov r3, r2
8005da0: 80bb strh r3, [r7, #4]
const struct pbuf *p;
u16_t left = 0;
8005da2: 2300 movs r3, #0
8005da4: 837b strh r3, [r7, #26]
u16_t buf_copy_len;
u16_t copied_total = 0;
8005da6: 2300 movs r3, #0
8005da8: 82fb strh r3, [r7, #22]
LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;);
8005daa: 68fb ldr r3, [r7, #12]
8005dac: 2b00 cmp r3, #0
8005dae: d108 bne.n 8005dc2 <pbuf_copy_partial+0x36>
8005db0: 4b2b ldr r3, [pc, #172] ; (8005e60 <pbuf_copy_partial+0xd4>)
8005db2: f240 420a movw r2, #1034 ; 0x40a
8005db6: 492b ldr r1, [pc, #172] ; (8005e64 <pbuf_copy_partial+0xd8>)
8005db8: 482b ldr r0, [pc, #172] ; (8005e68 <pbuf_copy_partial+0xdc>)
8005dba: f00a fb09 bl 80103d0 <printf>
8005dbe: 2300 movs r3, #0
8005dc0: e04a b.n 8005e58 <pbuf_copy_partial+0xcc>
LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;);
8005dc2: 68bb ldr r3, [r7, #8]
8005dc4: 2b00 cmp r3, #0
8005dc6: d108 bne.n 8005dda <pbuf_copy_partial+0x4e>
8005dc8: 4b25 ldr r3, [pc, #148] ; (8005e60 <pbuf_copy_partial+0xd4>)
8005dca: f240 420b movw r2, #1035 ; 0x40b
8005dce: 4927 ldr r1, [pc, #156] ; (8005e6c <pbuf_copy_partial+0xe0>)
8005dd0: 4825 ldr r0, [pc, #148] ; (8005e68 <pbuf_copy_partial+0xdc>)
8005dd2: f00a fafd bl 80103d0 <printf>
8005dd6: 2300 movs r3, #0
8005dd8: e03e b.n 8005e58 <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) {
8005dda: 68fb ldr r3, [r7, #12]
8005ddc: 61fb str r3, [r7, #28]
8005dde: e034 b.n 8005e4a <pbuf_copy_partial+0xbe>
if ((offset != 0) && (offset >= p->len)) {
8005de0: 88bb ldrh r3, [r7, #4]
8005de2: 2b00 cmp r3, #0
8005de4: d00a beq.n 8005dfc <pbuf_copy_partial+0x70>
8005de6: 69fb ldr r3, [r7, #28]
8005de8: 895b ldrh r3, [r3, #10]
8005dea: 88ba ldrh r2, [r7, #4]
8005dec: 429a cmp r2, r3
8005dee: d305 bcc.n 8005dfc <pbuf_copy_partial+0x70>
/* don't copy from this buffer -> on to the next */
offset = (u16_t)(offset - p->len);
8005df0: 69fb ldr r3, [r7, #28]
8005df2: 895b ldrh r3, [r3, #10]
8005df4: 88ba ldrh r2, [r7, #4]
8005df6: 1ad3 subs r3, r2, r3
8005df8: 80bb strh r3, [r7, #4]
8005dfa: e023 b.n 8005e44 <pbuf_copy_partial+0xb8>
} else {
/* copy from this buffer. maybe only partially. */
buf_copy_len = (u16_t)(p->len - offset);
8005dfc: 69fb ldr r3, [r7, #28]
8005dfe: 895a ldrh r2, [r3, #10]
8005e00: 88bb ldrh r3, [r7, #4]
8005e02: 1ad3 subs r3, r2, r3
8005e04: 833b strh r3, [r7, #24]
if (buf_copy_len > len) {
8005e06: 8b3a ldrh r2, [r7, #24]
8005e08: 88fb ldrh r3, [r7, #6]
8005e0a: 429a cmp r2, r3
8005e0c: d901 bls.n 8005e12 <pbuf_copy_partial+0x86>
buf_copy_len = len;
8005e0e: 88fb ldrh r3, [r7, #6]
8005e10: 833b strh r3, [r7, #24]
}
/* copy the necessary parts of the buffer */
MEMCPY(&((char *)dataptr)[left], &((char *)p->payload)[offset], buf_copy_len);
8005e12: 8b7b ldrh r3, [r7, #26]
8005e14: 68ba ldr r2, [r7, #8]
8005e16: 18d0 adds r0, r2, r3
8005e18: 69fb ldr r3, [r7, #28]
8005e1a: 685a ldr r2, [r3, #4]
8005e1c: 88bb ldrh r3, [r7, #4]
8005e1e: 4413 add r3, r2
8005e20: 8b3a ldrh r2, [r7, #24]
8005e22: 4619 mov r1, r3
8005e24: f00a faa4 bl 8010370 <memcpy>
copied_total = (u16_t)(copied_total + buf_copy_len);
8005e28: 8afa ldrh r2, [r7, #22]
8005e2a: 8b3b ldrh r3, [r7, #24]
8005e2c: 4413 add r3, r2
8005e2e: 82fb strh r3, [r7, #22]
left = (u16_t)(left + buf_copy_len);
8005e30: 8b7a ldrh r2, [r7, #26]
8005e32: 8b3b ldrh r3, [r7, #24]
8005e34: 4413 add r3, r2
8005e36: 837b strh r3, [r7, #26]
len = (u16_t)(len - buf_copy_len);
8005e38: 88fa ldrh r2, [r7, #6]
8005e3a: 8b3b ldrh r3, [r7, #24]
8005e3c: 1ad3 subs r3, r2, r3
8005e3e: 80fb strh r3, [r7, #6]
offset = 0;
8005e40: 2300 movs r3, #0
8005e42: 80bb strh r3, [r7, #4]
for (p = buf; len != 0 && p != NULL; p = p->next) {
8005e44: 69fb ldr r3, [r7, #28]
8005e46: 681b ldr r3, [r3, #0]
8005e48: 61fb str r3, [r7, #28]
8005e4a: 88fb ldrh r3, [r7, #6]
8005e4c: 2b00 cmp r3, #0
8005e4e: d002 beq.n 8005e56 <pbuf_copy_partial+0xca>
8005e50: 69fb ldr r3, [r7, #28]
8005e52: 2b00 cmp r3, #0
8005e54: d1c4 bne.n 8005de0 <pbuf_copy_partial+0x54>
}
}
return copied_total;
8005e56: 8afb ldrh r3, [r7, #22]
}
8005e58: 4618 mov r0, r3
8005e5a: 3720 adds r7, #32
8005e5c: 46bd mov sp, r7
8005e5e: bd80 pop {r7, pc}
8005e60: 080154bc .word 0x080154bc
8005e64: 08015804 .word 0x08015804
8005e68: 0801551c .word 0x0801551c
8005e6c: 08015824 .word 0x08015824
08005e70 <pbuf_clone>:
*
* @return a new pbuf or NULL if allocation fails
*/
struct pbuf *
pbuf_clone(pbuf_layer layer, pbuf_type type, struct pbuf *p)
{
8005e70: b580 push {r7, lr}
8005e72: b084 sub sp, #16
8005e74: af00 add r7, sp, #0
8005e76: 4603 mov r3, r0
8005e78: 603a str r2, [r7, #0]
8005e7a: 71fb strb r3, [r7, #7]
8005e7c: 460b mov r3, r1
8005e7e: 80bb strh r3, [r7, #4]
struct pbuf *q;
err_t err;
q = pbuf_alloc(layer, p->tot_len, type);
8005e80: 683b ldr r3, [r7, #0]
8005e82: 8919 ldrh r1, [r3, #8]
8005e84: 88ba ldrh r2, [r7, #4]
8005e86: 79fb ldrb r3, [r7, #7]
8005e88: 4618 mov r0, r3
8005e8a: f7ff faa1 bl 80053d0 <pbuf_alloc>
8005e8e: 60f8 str r0, [r7, #12]
if (q == NULL) {
8005e90: 68fb ldr r3, [r7, #12]
8005e92: 2b00 cmp r3, #0
8005e94: d101 bne.n 8005e9a <pbuf_clone+0x2a>
return NULL;
8005e96: 2300 movs r3, #0
8005e98: e011 b.n 8005ebe <pbuf_clone+0x4e>
}
err = pbuf_copy(q, p);
8005e9a: 6839 ldr r1, [r7, #0]
8005e9c: 68f8 ldr r0, [r7, #12]
8005e9e: f7ff fea3 bl 8005be8 <pbuf_copy>
8005ea2: 4603 mov r3, r0
8005ea4: 72fb strb r3, [r7, #11]
LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */
LWIP_ASSERT("pbuf_copy failed", err == ERR_OK);
8005ea6: f997 300b ldrsb.w r3, [r7, #11]
8005eaa: 2b00 cmp r3, #0
8005eac: d006 beq.n 8005ebc <pbuf_clone+0x4c>
8005eae: 4b06 ldr r3, [pc, #24] ; (8005ec8 <pbuf_clone+0x58>)
8005eb0: f240 5224 movw r2, #1316 ; 0x524
8005eb4: 4905 ldr r1, [pc, #20] ; (8005ecc <pbuf_clone+0x5c>)
8005eb6: 4806 ldr r0, [pc, #24] ; (8005ed0 <pbuf_clone+0x60>)
8005eb8: f00a fa8a bl 80103d0 <printf>
return q;
8005ebc: 68fb ldr r3, [r7, #12]
}
8005ebe: 4618 mov r0, r3
8005ec0: 3710 adds r7, #16
8005ec2: 46bd mov sp, r7
8005ec4: bd80 pop {r7, pc}
8005ec6: bf00 nop
8005ec8: 080154bc .word 0x080154bc
8005ecc: 08015930 .word 0x08015930
8005ed0: 0801551c .word 0x0801551c
08005ed4 <tcp_init>:
/**
* Initialize this module.
*/
void
tcp_init(void)
{
8005ed4: b580 push {r7, lr}
8005ed6: af00 add r7, sp, #0
#ifdef LWIP_RAND
tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());
8005ed8: f00a fa8c bl 80103f4 <rand>
8005edc: 4603 mov r3, r0
8005ede: b29b uxth r3, r3
8005ee0: f3c3 030d ubfx r3, r3, #0, #14
8005ee4: b29b uxth r3, r3
8005ee6: f5a3 4380 sub.w r3, r3, #16384 ; 0x4000
8005eea: b29a uxth r2, r3
8005eec: 4b01 ldr r3, [pc, #4] ; (8005ef4 <tcp_init+0x20>)
8005eee: 801a strh r2, [r3, #0]
#endif /* LWIP_RAND */
}
8005ef0: bf00 nop
8005ef2: bd80 pop {r7, pc}
8005ef4: 20000020 .word 0x20000020
08005ef8 <tcp_free>:
/** Free a tcp pcb */
void
tcp_free(struct tcp_pcb *pcb)
{
8005ef8: b580 push {r7, lr}
8005efa: b082 sub sp, #8
8005efc: af00 add r7, sp, #0
8005efe: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN);
8005f00: 687b ldr r3, [r7, #4]
8005f02: 7d1b ldrb r3, [r3, #20]
8005f04: 2b01 cmp r3, #1
8005f06: d105 bne.n 8005f14 <tcp_free+0x1c>
8005f08: 4b06 ldr r3, [pc, #24] ; (8005f24 <tcp_free+0x2c>)
8005f0a: 22d4 movs r2, #212 ; 0xd4
8005f0c: 4906 ldr r1, [pc, #24] ; (8005f28 <tcp_free+0x30>)
8005f0e: 4807 ldr r0, [pc, #28] ; (8005f2c <tcp_free+0x34>)
8005f10: f00a fa5e bl 80103d0 <printf>
#if LWIP_TCP_PCB_NUM_EXT_ARGS
tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args);
#endif
memp_free(MEMP_TCP_PCB, pcb);
8005f14: 6879 ldr r1, [r7, #4]
8005f16: 2001 movs r0, #1
8005f18: f7fe febc bl 8004c94 <memp_free>
}
8005f1c: bf00 nop
8005f1e: 3708 adds r7, #8
8005f20: 46bd mov sp, r7
8005f22: bd80 pop {r7, pc}
8005f24: 080159bc .word 0x080159bc
8005f28: 080159ec .word 0x080159ec
8005f2c: 08015a00 .word 0x08015a00
08005f30 <tcp_free_listen>:
/** Free a tcp listen pcb */
static void
tcp_free_listen(struct tcp_pcb *pcb)
{
8005f30: b580 push {r7, lr}
8005f32: b082 sub sp, #8
8005f34: af00 add r7, sp, #0
8005f36: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN);
8005f38: 687b ldr r3, [r7, #4]
8005f3a: 7d1b ldrb r3, [r3, #20]
8005f3c: 2b01 cmp r3, #1
8005f3e: d105 bne.n 8005f4c <tcp_free_listen+0x1c>
8005f40: 4b06 ldr r3, [pc, #24] ; (8005f5c <tcp_free_listen+0x2c>)
8005f42: 22df movs r2, #223 ; 0xdf
8005f44: 4906 ldr r1, [pc, #24] ; (8005f60 <tcp_free_listen+0x30>)
8005f46: 4807 ldr r0, [pc, #28] ; (8005f64 <tcp_free_listen+0x34>)
8005f48: f00a fa42 bl 80103d0 <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);
8005f4c: 6879 ldr r1, [r7, #4]
8005f4e: 2002 movs r0, #2
8005f50: f7fe fea0 bl 8004c94 <memp_free>
}
8005f54: bf00 nop
8005f56: 3708 adds r7, #8
8005f58: 46bd mov sp, r7
8005f5a: bd80 pop {r7, pc}
8005f5c: 080159bc .word 0x080159bc
8005f60: 08015a28 .word 0x08015a28
8005f64: 08015a00 .word 0x08015a00
08005f68 <tcp_tmr>:
/**
* Called periodically to dispatch TCP timers.
*/
void
tcp_tmr(void)
{
8005f68: b580 push {r7, lr}
8005f6a: af00 add r7, sp, #0
/* Call tcp_fasttmr() every 250 ms */
tcp_fasttmr();
8005f6c: f000 fea2 bl 8006cb4 <tcp_fasttmr>
if (++tcp_timer & 1) {
8005f70: 4b07 ldr r3, [pc, #28] ; (8005f90 <tcp_tmr+0x28>)
8005f72: 781b ldrb r3, [r3, #0]
8005f74: 3301 adds r3, #1
8005f76: b2da uxtb r2, r3
8005f78: 4b05 ldr r3, [pc, #20] ; (8005f90 <tcp_tmr+0x28>)
8005f7a: 701a strb r2, [r3, #0]
8005f7c: 4b04 ldr r3, [pc, #16] ; (8005f90 <tcp_tmr+0x28>)
8005f7e: 781b ldrb r3, [r3, #0]
8005f80: f003 0301 and.w r3, r3, #1
8005f84: 2b00 cmp r3, #0
8005f86: d001 beq.n 8005f8c <tcp_tmr+0x24>
/* Call tcp_slowtmr() every 500 ms, i.e., every other timer
tcp_tmr() is called. */
tcp_slowtmr();
8005f88: f000 fb54 bl 8006634 <tcp_slowtmr>
}
}
8005f8c: bf00 nop
8005f8e: bd80 pop {r7, pc}
8005f90: 20008c15 .word 0x20008c15
08005f94 <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)
{
8005f94: b580 push {r7, lr}
8005f96: b084 sub sp, #16
8005f98: af00 add r7, sp, #0
8005f9a: 6078 str r0, [r7, #4]
8005f9c: 6039 str r1, [r7, #0]
struct tcp_pcb *pcb;
LWIP_ASSERT("tcp_remove_listener: invalid listener", lpcb != NULL);
8005f9e: 683b ldr r3, [r7, #0]
8005fa0: 2b00 cmp r3, #0
8005fa2: d105 bne.n 8005fb0 <tcp_remove_listener+0x1c>
8005fa4: 4b0d ldr r3, [pc, #52] ; (8005fdc <tcp_remove_listener+0x48>)
8005fa6: 22ff movs r2, #255 ; 0xff
8005fa8: 490d ldr r1, [pc, #52] ; (8005fe0 <tcp_remove_listener+0x4c>)
8005faa: 480e ldr r0, [pc, #56] ; (8005fe4 <tcp_remove_listener+0x50>)
8005fac: f00a fa10 bl 80103d0 <printf>
for (pcb = list; pcb != NULL; pcb = pcb->next) {
8005fb0: 687b ldr r3, [r7, #4]
8005fb2: 60fb str r3, [r7, #12]
8005fb4: e00a b.n 8005fcc <tcp_remove_listener+0x38>
if (pcb->listener == lpcb) {
8005fb6: 68fb ldr r3, [r7, #12]
8005fb8: 6fdb ldr r3, [r3, #124] ; 0x7c
8005fba: 683a ldr r2, [r7, #0]
8005fbc: 429a cmp r2, r3
8005fbe: d102 bne.n 8005fc6 <tcp_remove_listener+0x32>
pcb->listener = NULL;
8005fc0: 68fb ldr r3, [r7, #12]
8005fc2: 2200 movs r2, #0
8005fc4: 67da str r2, [r3, #124] ; 0x7c
for (pcb = list; pcb != NULL; pcb = pcb->next) {
8005fc6: 68fb ldr r3, [r7, #12]
8005fc8: 68db ldr r3, [r3, #12]
8005fca: 60fb str r3, [r7, #12]
8005fcc: 68fb ldr r3, [r7, #12]
8005fce: 2b00 cmp r3, #0
8005fd0: d1f1 bne.n 8005fb6 <tcp_remove_listener+0x22>
}
}
}
8005fd2: bf00 nop
8005fd4: bf00 nop
8005fd6: 3710 adds r7, #16
8005fd8: 46bd mov sp, r7
8005fda: bd80 pop {r7, pc}
8005fdc: 080159bc .word 0x080159bc
8005fe0: 08015a44 .word 0x08015a44
8005fe4: 08015a00 .word 0x08015a00
08005fe8 <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)
{
8005fe8: b580 push {r7, lr}
8005fea: b084 sub sp, #16
8005fec: af00 add r7, sp, #0
8005fee: 6078 str r0, [r7, #4]
#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG
size_t i;
LWIP_ASSERT("pcb != NULL", pcb != NULL);
8005ff0: 687b ldr r3, [r7, #4]
8005ff2: 2b00 cmp r3, #0
8005ff4: d106 bne.n 8006004 <tcp_listen_closed+0x1c>
8005ff6: 4b14 ldr r3, [pc, #80] ; (8006048 <tcp_listen_closed+0x60>)
8005ff8: f240 1211 movw r2, #273 ; 0x111
8005ffc: 4913 ldr r1, [pc, #76] ; (800604c <tcp_listen_closed+0x64>)
8005ffe: 4814 ldr r0, [pc, #80] ; (8006050 <tcp_listen_closed+0x68>)
8006000: f00a f9e6 bl 80103d0 <printf>
LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN);
8006004: 687b ldr r3, [r7, #4]
8006006: 7d1b ldrb r3, [r3, #20]
8006008: 2b01 cmp r3, #1
800600a: d006 beq.n 800601a <tcp_listen_closed+0x32>
800600c: 4b0e ldr r3, [pc, #56] ; (8006048 <tcp_listen_closed+0x60>)
800600e: f44f 7289 mov.w r2, #274 ; 0x112
8006012: 4910 ldr r1, [pc, #64] ; (8006054 <tcp_listen_closed+0x6c>)
8006014: 480e ldr r0, [pc, #56] ; (8006050 <tcp_listen_closed+0x68>)
8006016: f00a f9db bl 80103d0 <printf>
for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) {
800601a: 2301 movs r3, #1
800601c: 60fb str r3, [r7, #12]
800601e: e00b b.n 8006038 <tcp_listen_closed+0x50>
tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen *)pcb);
8006020: 4a0d ldr r2, [pc, #52] ; (8006058 <tcp_listen_closed+0x70>)
8006022: 68fb ldr r3, [r7, #12]
8006024: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8006028: 681b ldr r3, [r3, #0]
800602a: 6879 ldr r1, [r7, #4]
800602c: 4618 mov r0, r3
800602e: f7ff ffb1 bl 8005f94 <tcp_remove_listener>
for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) {
8006032: 68fb ldr r3, [r7, #12]
8006034: 3301 adds r3, #1
8006036: 60fb str r3, [r7, #12]
8006038: 68fb ldr r3, [r7, #12]
800603a: 2b03 cmp r3, #3
800603c: d9f0 bls.n 8006020 <tcp_listen_closed+0x38>
}
#endif
LWIP_UNUSED_ARG(pcb);
}
800603e: bf00 nop
8006040: bf00 nop
8006042: 3710 adds r7, #16
8006044: 46bd mov sp, r7
8006046: bd80 pop {r7, pc}
8006048: 080159bc .word 0x080159bc
800604c: 08015a6c .word 0x08015a6c
8006050: 08015a00 .word 0x08015a00
8006054: 08015a78 .word 0x08015a78
8006058: 08017da4 .word 0x08017da4
0800605c <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)
{
800605c: b5b0 push {r4, r5, r7, lr}
800605e: b088 sub sp, #32
8006060: af04 add r7, sp, #16
8006062: 6078 str r0, [r7, #4]
8006064: 460b mov r3, r1
8006066: 70fb strb r3, [r7, #3]
LWIP_ASSERT("tcp_close_shutdown: invalid pcb", pcb != NULL);
8006068: 687b ldr r3, [r7, #4]
800606a: 2b00 cmp r3, #0
800606c: d106 bne.n 800607c <tcp_close_shutdown+0x20>
800606e: 4b63 ldr r3, [pc, #396] ; (80061fc <tcp_close_shutdown+0x1a0>)
8006070: f44f 72af mov.w r2, #350 ; 0x15e
8006074: 4962 ldr r1, [pc, #392] ; (8006200 <tcp_close_shutdown+0x1a4>)
8006076: 4863 ldr r0, [pc, #396] ; (8006204 <tcp_close_shutdown+0x1a8>)
8006078: f00a f9aa bl 80103d0 <printf>
if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) {
800607c: 78fb ldrb r3, [r7, #3]
800607e: 2b00 cmp r3, #0
8006080: d066 beq.n 8006150 <tcp_close_shutdown+0xf4>
8006082: 687b ldr r3, [r7, #4]
8006084: 7d1b ldrb r3, [r3, #20]
8006086: 2b04 cmp r3, #4
8006088: d003 beq.n 8006092 <tcp_close_shutdown+0x36>
800608a: 687b ldr r3, [r7, #4]
800608c: 7d1b ldrb r3, [r3, #20]
800608e: 2b07 cmp r3, #7
8006090: d15e bne.n 8006150 <tcp_close_shutdown+0xf4>
if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) {
8006092: 687b ldr r3, [r7, #4]
8006094: 6f9b ldr r3, [r3, #120] ; 0x78
8006096: 2b00 cmp r3, #0
8006098: d104 bne.n 80060a4 <tcp_close_shutdown+0x48>
800609a: 687b ldr r3, [r7, #4]
800609c: 8d1b ldrh r3, [r3, #40] ; 0x28
800609e: f5b3 6f06 cmp.w r3, #2144 ; 0x860
80060a2: d055 beq.n 8006150 <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);
80060a4: 687b ldr r3, [r7, #4]
80060a6: 8b5b ldrh r3, [r3, #26]
80060a8: f003 0310 and.w r3, r3, #16
80060ac: 2b00 cmp r3, #0
80060ae: d106 bne.n 80060be <tcp_close_shutdown+0x62>
80060b0: 4b52 ldr r3, [pc, #328] ; (80061fc <tcp_close_shutdown+0x1a0>)
80060b2: f44f 72b2 mov.w r2, #356 ; 0x164
80060b6: 4954 ldr r1, [pc, #336] ; (8006208 <tcp_close_shutdown+0x1ac>)
80060b8: 4852 ldr r0, [pc, #328] ; (8006204 <tcp_close_shutdown+0x1a8>)
80060ba: f00a f989 bl 80103d0 <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,
80060be: 687b ldr r3, [r7, #4]
80060c0: 6d18 ldr r0, [r3, #80] ; 0x50
80060c2: 687b ldr r3, [r7, #4]
80060c4: 6a5c ldr r4, [r3, #36] ; 0x24
80060c6: 687d ldr r5, [r7, #4]
80060c8: 687b ldr r3, [r7, #4]
80060ca: 3304 adds r3, #4
80060cc: 687a ldr r2, [r7, #4]
80060ce: 8ad2 ldrh r2, [r2, #22]
80060d0: 6879 ldr r1, [r7, #4]
80060d2: 8b09 ldrh r1, [r1, #24]
80060d4: 9102 str r1, [sp, #8]
80060d6: 9201 str r2, [sp, #4]
80060d8: 9300 str r3, [sp, #0]
80060da: 462b mov r3, r5
80060dc: 4622 mov r2, r4
80060de: 4601 mov r1, r0
80060e0: 6878 ldr r0, [r7, #4]
80060e2: f004 fe91 bl 800ae08 <tcp_rst>
pcb->local_port, pcb->remote_port);
tcp_pcb_purge(pcb);
80060e6: 6878 ldr r0, [r7, #4]
80060e8: f001 f8c6 bl 8007278 <tcp_pcb_purge>
TCP_RMV_ACTIVE(pcb);
80060ec: 4b47 ldr r3, [pc, #284] ; (800620c <tcp_close_shutdown+0x1b0>)
80060ee: 681b ldr r3, [r3, #0]
80060f0: 687a ldr r2, [r7, #4]
80060f2: 429a cmp r2, r3
80060f4: d105 bne.n 8006102 <tcp_close_shutdown+0xa6>
80060f6: 4b45 ldr r3, [pc, #276] ; (800620c <tcp_close_shutdown+0x1b0>)
80060f8: 681b ldr r3, [r3, #0]
80060fa: 68db ldr r3, [r3, #12]
80060fc: 4a43 ldr r2, [pc, #268] ; (800620c <tcp_close_shutdown+0x1b0>)
80060fe: 6013 str r3, [r2, #0]
8006100: e013 b.n 800612a <tcp_close_shutdown+0xce>
8006102: 4b42 ldr r3, [pc, #264] ; (800620c <tcp_close_shutdown+0x1b0>)
8006104: 681b ldr r3, [r3, #0]
8006106: 60fb str r3, [r7, #12]
8006108: e00c b.n 8006124 <tcp_close_shutdown+0xc8>
800610a: 68fb ldr r3, [r7, #12]
800610c: 68db ldr r3, [r3, #12]
800610e: 687a ldr r2, [r7, #4]
8006110: 429a cmp r2, r3
8006112: d104 bne.n 800611e <tcp_close_shutdown+0xc2>
8006114: 687b ldr r3, [r7, #4]
8006116: 68da ldr r2, [r3, #12]
8006118: 68fb ldr r3, [r7, #12]
800611a: 60da str r2, [r3, #12]
800611c: e005 b.n 800612a <tcp_close_shutdown+0xce>
800611e: 68fb ldr r3, [r7, #12]
8006120: 68db ldr r3, [r3, #12]
8006122: 60fb str r3, [r7, #12]
8006124: 68fb ldr r3, [r7, #12]
8006126: 2b00 cmp r3, #0
8006128: d1ef bne.n 800610a <tcp_close_shutdown+0xae>
800612a: 687b ldr r3, [r7, #4]
800612c: 2200 movs r2, #0
800612e: 60da str r2, [r3, #12]
8006130: 4b37 ldr r3, [pc, #220] ; (8006210 <tcp_close_shutdown+0x1b4>)
8006132: 2201 movs r2, #1
8006134: 701a strb r2, [r3, #0]
/* Deallocate the pcb since we already sent a RST for it */
if (tcp_input_pcb == pcb) {
8006136: 4b37 ldr r3, [pc, #220] ; (8006214 <tcp_close_shutdown+0x1b8>)
8006138: 681b ldr r3, [r3, #0]
800613a: 687a ldr r2, [r7, #4]
800613c: 429a cmp r2, r3
800613e: d102 bne.n 8006146 <tcp_close_shutdown+0xea>
/* prevent using a deallocated pcb: free it from tcp_input later */
tcp_trigger_input_pcb_close();
8006140: f003 fd5e bl 8009c00 <tcp_trigger_input_pcb_close>
8006144: e002 b.n 800614c <tcp_close_shutdown+0xf0>
} else {
tcp_free(pcb);
8006146: 6878 ldr r0, [r7, #4]
8006148: f7ff fed6 bl 8005ef8 <tcp_free>
}
return ERR_OK;
800614c: 2300 movs r3, #0
800614e: e050 b.n 80061f2 <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) {
8006150: 687b ldr r3, [r7, #4]
8006152: 7d1b ldrb r3, [r3, #20]
8006154: 2b02 cmp r3, #2
8006156: d03b beq.n 80061d0 <tcp_close_shutdown+0x174>
8006158: 2b02 cmp r3, #2
800615a: dc44 bgt.n 80061e6 <tcp_close_shutdown+0x18a>
800615c: 2b00 cmp r3, #0
800615e: d002 beq.n 8006166 <tcp_close_shutdown+0x10a>
8006160: 2b01 cmp r3, #1
8006162: d02a beq.n 80061ba <tcp_close_shutdown+0x15e>
8006164: e03f b.n 80061e6 <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) {
8006166: 687b ldr r3, [r7, #4]
8006168: 8adb ldrh r3, [r3, #22]
800616a: 2b00 cmp r3, #0
800616c: d021 beq.n 80061b2 <tcp_close_shutdown+0x156>
TCP_RMV(&tcp_bound_pcbs, pcb);
800616e: 4b2a ldr r3, [pc, #168] ; (8006218 <tcp_close_shutdown+0x1bc>)
8006170: 681b ldr r3, [r3, #0]
8006172: 687a ldr r2, [r7, #4]
8006174: 429a cmp r2, r3
8006176: d105 bne.n 8006184 <tcp_close_shutdown+0x128>
8006178: 4b27 ldr r3, [pc, #156] ; (8006218 <tcp_close_shutdown+0x1bc>)
800617a: 681b ldr r3, [r3, #0]
800617c: 68db ldr r3, [r3, #12]
800617e: 4a26 ldr r2, [pc, #152] ; (8006218 <tcp_close_shutdown+0x1bc>)
8006180: 6013 str r3, [r2, #0]
8006182: e013 b.n 80061ac <tcp_close_shutdown+0x150>
8006184: 4b24 ldr r3, [pc, #144] ; (8006218 <tcp_close_shutdown+0x1bc>)
8006186: 681b ldr r3, [r3, #0]
8006188: 60bb str r3, [r7, #8]
800618a: e00c b.n 80061a6 <tcp_close_shutdown+0x14a>
800618c: 68bb ldr r3, [r7, #8]
800618e: 68db ldr r3, [r3, #12]
8006190: 687a ldr r2, [r7, #4]
8006192: 429a cmp r2, r3
8006194: d104 bne.n 80061a0 <tcp_close_shutdown+0x144>
8006196: 687b ldr r3, [r7, #4]
8006198: 68da ldr r2, [r3, #12]
800619a: 68bb ldr r3, [r7, #8]
800619c: 60da str r2, [r3, #12]
800619e: e005 b.n 80061ac <tcp_close_shutdown+0x150>
80061a0: 68bb ldr r3, [r7, #8]
80061a2: 68db ldr r3, [r3, #12]
80061a4: 60bb str r3, [r7, #8]
80061a6: 68bb ldr r3, [r7, #8]
80061a8: 2b00 cmp r3, #0
80061aa: d1ef bne.n 800618c <tcp_close_shutdown+0x130>
80061ac: 687b ldr r3, [r7, #4]
80061ae: 2200 movs r2, #0
80061b0: 60da str r2, [r3, #12]
}
tcp_free(pcb);
80061b2: 6878 ldr r0, [r7, #4]
80061b4: f7ff fea0 bl 8005ef8 <tcp_free>
break;
80061b8: e01a b.n 80061f0 <tcp_close_shutdown+0x194>
case LISTEN:
tcp_listen_closed(pcb);
80061ba: 6878 ldr r0, [r7, #4]
80061bc: f7ff ff14 bl 8005fe8 <tcp_listen_closed>
tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb);
80061c0: 6879 ldr r1, [r7, #4]
80061c2: 4816 ldr r0, [pc, #88] ; (800621c <tcp_close_shutdown+0x1c0>)
80061c4: f001 f8a8 bl 8007318 <tcp_pcb_remove>
tcp_free_listen(pcb);
80061c8: 6878 ldr r0, [r7, #4]
80061ca: f7ff feb1 bl 8005f30 <tcp_free_listen>
break;
80061ce: e00f b.n 80061f0 <tcp_close_shutdown+0x194>
case SYN_SENT:
TCP_PCB_REMOVE_ACTIVE(pcb);
80061d0: 6879 ldr r1, [r7, #4]
80061d2: 480e ldr r0, [pc, #56] ; (800620c <tcp_close_shutdown+0x1b0>)
80061d4: f001 f8a0 bl 8007318 <tcp_pcb_remove>
80061d8: 4b0d ldr r3, [pc, #52] ; (8006210 <tcp_close_shutdown+0x1b4>)
80061da: 2201 movs r2, #1
80061dc: 701a strb r2, [r3, #0]
tcp_free(pcb);
80061de: 6878 ldr r0, [r7, #4]
80061e0: f7ff fe8a bl 8005ef8 <tcp_free>
MIB2_STATS_INC(mib2.tcpattemptfails);
break;
80061e4: e004 b.n 80061f0 <tcp_close_shutdown+0x194>
default:
return tcp_close_shutdown_fin(pcb);
80061e6: 6878 ldr r0, [r7, #4]
80061e8: f000 f81a bl 8006220 <tcp_close_shutdown_fin>
80061ec: 4603 mov r3, r0
80061ee: e000 b.n 80061f2 <tcp_close_shutdown+0x196>
}
return ERR_OK;
80061f0: 2300 movs r3, #0
}
80061f2: 4618 mov r0, r3
80061f4: 3710 adds r7, #16
80061f6: 46bd mov sp, r7
80061f8: bdb0 pop {r4, r5, r7, pc}
80061fa: bf00 nop
80061fc: 080159bc .word 0x080159bc
8006200: 08015a90 .word 0x08015a90
8006204: 08015a00 .word 0x08015a00
8006208: 08015ab0 .word 0x08015ab0
800620c: 20008c0c .word 0x20008c0c
8006210: 20008c14 .word 0x20008c14
8006214: 20008c4c .word 0x20008c4c
8006218: 20008c04 .word 0x20008c04
800621c: 20008c08 .word 0x20008c08
08006220 <tcp_close_shutdown_fin>:
static err_t
tcp_close_shutdown_fin(struct tcp_pcb *pcb)
{
8006220: b580 push {r7, lr}
8006222: b084 sub sp, #16
8006224: af00 add r7, sp, #0
8006226: 6078 str r0, [r7, #4]
err_t err;
LWIP_ASSERT("pcb != NULL", pcb != NULL);
8006228: 687b ldr r3, [r7, #4]
800622a: 2b00 cmp r3, #0
800622c: d106 bne.n 800623c <tcp_close_shutdown_fin+0x1c>
800622e: 4b2e ldr r3, [pc, #184] ; (80062e8 <tcp_close_shutdown_fin+0xc8>)
8006230: f44f 72ce mov.w r2, #412 ; 0x19c
8006234: 492d ldr r1, [pc, #180] ; (80062ec <tcp_close_shutdown_fin+0xcc>)
8006236: 482e ldr r0, [pc, #184] ; (80062f0 <tcp_close_shutdown_fin+0xd0>)
8006238: f00a f8ca bl 80103d0 <printf>
switch (pcb->state) {
800623c: 687b ldr r3, [r7, #4]
800623e: 7d1b ldrb r3, [r3, #20]
8006240: 2b07 cmp r3, #7
8006242: d020 beq.n 8006286 <tcp_close_shutdown_fin+0x66>
8006244: 2b07 cmp r3, #7
8006246: dc2b bgt.n 80062a0 <tcp_close_shutdown_fin+0x80>
8006248: 2b03 cmp r3, #3
800624a: d002 beq.n 8006252 <tcp_close_shutdown_fin+0x32>
800624c: 2b04 cmp r3, #4
800624e: d00d beq.n 800626c <tcp_close_shutdown_fin+0x4c>
8006250: e026 b.n 80062a0 <tcp_close_shutdown_fin+0x80>
case SYN_RCVD:
err = tcp_send_fin(pcb);
8006252: 6878 ldr r0, [r7, #4]
8006254: f003 fee6 bl 800a024 <tcp_send_fin>
8006258: 4603 mov r3, r0
800625a: 73fb strb r3, [r7, #15]
if (err == ERR_OK) {
800625c: f997 300f ldrsb.w r3, [r7, #15]
8006260: 2b00 cmp r3, #0
8006262: d11f bne.n 80062a4 <tcp_close_shutdown_fin+0x84>
tcp_backlog_accepted(pcb);
MIB2_STATS_INC(mib2.tcpattemptfails);
pcb->state = FIN_WAIT_1;
8006264: 687b ldr r3, [r7, #4]
8006266: 2205 movs r2, #5
8006268: 751a strb r2, [r3, #20]
}
break;
800626a: e01b b.n 80062a4 <tcp_close_shutdown_fin+0x84>
case ESTABLISHED:
err = tcp_send_fin(pcb);
800626c: 6878 ldr r0, [r7, #4]
800626e: f003 fed9 bl 800a024 <tcp_send_fin>
8006272: 4603 mov r3, r0
8006274: 73fb strb r3, [r7, #15]
if (err == ERR_OK) {
8006276: f997 300f ldrsb.w r3, [r7, #15]
800627a: 2b00 cmp r3, #0
800627c: d114 bne.n 80062a8 <tcp_close_shutdown_fin+0x88>
MIB2_STATS_INC(mib2.tcpestabresets);
pcb->state = FIN_WAIT_1;
800627e: 687b ldr r3, [r7, #4]
8006280: 2205 movs r2, #5
8006282: 751a strb r2, [r3, #20]
}
break;
8006284: e010 b.n 80062a8 <tcp_close_shutdown_fin+0x88>
case CLOSE_WAIT:
err = tcp_send_fin(pcb);
8006286: 6878 ldr r0, [r7, #4]
8006288: f003 fecc bl 800a024 <tcp_send_fin>
800628c: 4603 mov r3, r0
800628e: 73fb strb r3, [r7, #15]
if (err == ERR_OK) {
8006290: f997 300f ldrsb.w r3, [r7, #15]
8006294: 2b00 cmp r3, #0
8006296: d109 bne.n 80062ac <tcp_close_shutdown_fin+0x8c>
MIB2_STATS_INC(mib2.tcpestabresets);
pcb->state = LAST_ACK;
8006298: 687b ldr r3, [r7, #4]
800629a: 2209 movs r2, #9
800629c: 751a strb r2, [r3, #20]
}
break;
800629e: e005 b.n 80062ac <tcp_close_shutdown_fin+0x8c>
default:
/* Has already been closed, do nothing. */
return ERR_OK;
80062a0: 2300 movs r3, #0
80062a2: e01c b.n 80062de <tcp_close_shutdown_fin+0xbe>
break;
80062a4: bf00 nop
80062a6: e002 b.n 80062ae <tcp_close_shutdown_fin+0x8e>
break;
80062a8: bf00 nop
80062aa: e000 b.n 80062ae <tcp_close_shutdown_fin+0x8e>
break;
80062ac: bf00 nop
}
if (err == ERR_OK) {
80062ae: f997 300f ldrsb.w r3, [r7, #15]
80062b2: 2b00 cmp r3, #0
80062b4: d103 bne.n 80062be <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);
80062b6: 6878 ldr r0, [r7, #4]
80062b8: f003 fff2 bl 800a2a0 <tcp_output>
80062bc: e00d b.n 80062da <tcp_close_shutdown_fin+0xba>
} else if (err == ERR_MEM) {
80062be: f997 300f ldrsb.w r3, [r7, #15]
80062c2: f1b3 3fff cmp.w r3, #4294967295
80062c6: d108 bne.n 80062da <tcp_close_shutdown_fin+0xba>
/* Mark this pcb for closing. Closing is retried from tcp_tmr. */
tcp_set_flags(pcb, TF_CLOSEPEND);
80062c8: 687b ldr r3, [r7, #4]
80062ca: 8b5b ldrh r3, [r3, #26]
80062cc: f043 0308 orr.w r3, r3, #8
80062d0: b29a uxth r2, r3
80062d2: 687b ldr r3, [r7, #4]
80062d4: 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;
80062d6: 2300 movs r3, #0
80062d8: e001 b.n 80062de <tcp_close_shutdown_fin+0xbe>
}
return err;
80062da: f997 300f ldrsb.w r3, [r7, #15]
}
80062de: 4618 mov r0, r3
80062e0: 3710 adds r7, #16
80062e2: 46bd mov sp, r7
80062e4: bd80 pop {r7, pc}
80062e6: bf00 nop
80062e8: 080159bc .word 0x080159bc
80062ec: 08015a6c .word 0x08015a6c
80062f0: 08015a00 .word 0x08015a00
080062f4 <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)
{
80062f4: b580 push {r7, lr}
80062f6: b082 sub sp, #8
80062f8: af00 add r7, sp, #0
80062fa: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("tcp_close: invalid pcb", pcb != NULL, return ERR_ARG);
80062fc: 687b ldr r3, [r7, #4]
80062fe: 2b00 cmp r3, #0
8006300: d109 bne.n 8006316 <tcp_close+0x22>
8006302: 4b0f ldr r3, [pc, #60] ; (8006340 <tcp_close+0x4c>)
8006304: f44f 72f4 mov.w r2, #488 ; 0x1e8
8006308: 490e ldr r1, [pc, #56] ; (8006344 <tcp_close+0x50>)
800630a: 480f ldr r0, [pc, #60] ; (8006348 <tcp_close+0x54>)
800630c: f00a f860 bl 80103d0 <printf>
8006310: f06f 030f mvn.w r3, #15
8006314: e00f b.n 8006336 <tcp_close+0x42>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in "));
tcp_debug_print_state(pcb->state);
if (pcb->state != LISTEN) {
8006316: 687b ldr r3, [r7, #4]
8006318: 7d1b ldrb r3, [r3, #20]
800631a: 2b01 cmp r3, #1
800631c: d006 beq.n 800632c <tcp_close+0x38>
/* Set a flag not to receive any more data... */
tcp_set_flags(pcb, TF_RXCLOSED);
800631e: 687b ldr r3, [r7, #4]
8006320: 8b5b ldrh r3, [r3, #26]
8006322: f043 0310 orr.w r3, r3, #16
8006326: b29a uxth r2, r3
8006328: 687b ldr r3, [r7, #4]
800632a: 835a strh r2, [r3, #26]
}
/* ... and close */
return tcp_close_shutdown(pcb, 1);
800632c: 2101 movs r1, #1
800632e: 6878 ldr r0, [r7, #4]
8006330: f7ff fe94 bl 800605c <tcp_close_shutdown>
8006334: 4603 mov r3, r0
}
8006336: 4618 mov r0, r3
8006338: 3708 adds r7, #8
800633a: 46bd mov sp, r7
800633c: bd80 pop {r7, pc}
800633e: bf00 nop
8006340: 080159bc .word 0x080159bc
8006344: 08015acc .word 0x08015acc
8006348: 08015a00 .word 0x08015a00
0800634c <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)
{
800634c: b580 push {r7, lr}
800634e: b08e sub sp, #56 ; 0x38
8006350: af04 add r7, sp, #16
8006352: 6078 str r0, [r7, #4]
8006354: 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);
8006356: 687b ldr r3, [r7, #4]
8006358: 2b00 cmp r3, #0
800635a: d107 bne.n 800636c <tcp_abandon+0x20>
800635c: 4b52 ldr r3, [pc, #328] ; (80064a8 <tcp_abandon+0x15c>)
800635e: f240 223d movw r2, #573 ; 0x23d
8006362: 4952 ldr r1, [pc, #328] ; (80064ac <tcp_abandon+0x160>)
8006364: 4852 ldr r0, [pc, #328] ; (80064b0 <tcp_abandon+0x164>)
8006366: f00a f833 bl 80103d0 <printf>
800636a: e099 b.n 80064a0 <tcp_abandon+0x154>
/* pcb->state LISTEN not allowed here */
LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs",
800636c: 687b ldr r3, [r7, #4]
800636e: 7d1b ldrb r3, [r3, #20]
8006370: 2b01 cmp r3, #1
8006372: d106 bne.n 8006382 <tcp_abandon+0x36>
8006374: 4b4c ldr r3, [pc, #304] ; (80064a8 <tcp_abandon+0x15c>)
8006376: f44f 7210 mov.w r2, #576 ; 0x240
800637a: 494e ldr r1, [pc, #312] ; (80064b4 <tcp_abandon+0x168>)
800637c: 484c ldr r0, [pc, #304] ; (80064b0 <tcp_abandon+0x164>)
800637e: f00a f827 bl 80103d0 <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) {
8006382: 687b ldr r3, [r7, #4]
8006384: 7d1b ldrb r3, [r3, #20]
8006386: 2b0a cmp r3, #10
8006388: d107 bne.n 800639a <tcp_abandon+0x4e>
tcp_pcb_remove(&tcp_tw_pcbs, pcb);
800638a: 6879 ldr r1, [r7, #4]
800638c: 484a ldr r0, [pc, #296] ; (80064b8 <tcp_abandon+0x16c>)
800638e: f000 ffc3 bl 8007318 <tcp_pcb_remove>
tcp_free(pcb);
8006392: 6878 ldr r0, [r7, #4]
8006394: f7ff fdb0 bl 8005ef8 <tcp_free>
8006398: e082 b.n 80064a0 <tcp_abandon+0x154>
} else {
int send_rst = 0;
800639a: 2300 movs r3, #0
800639c: 627b str r3, [r7, #36] ; 0x24
u16_t local_port = 0;
800639e: 2300 movs r3, #0
80063a0: 847b strh r3, [r7, #34] ; 0x22
enum tcp_state last_state;
seqno = pcb->snd_nxt;
80063a2: 687b ldr r3, [r7, #4]
80063a4: 6d1b ldr r3, [r3, #80] ; 0x50
80063a6: 61bb str r3, [r7, #24]
ackno = pcb->rcv_nxt;
80063a8: 687b ldr r3, [r7, #4]
80063aa: 6a5b ldr r3, [r3, #36] ; 0x24
80063ac: 617b str r3, [r7, #20]
#if LWIP_CALLBACK_API
errf = pcb->errf;
80063ae: 687b ldr r3, [r7, #4]
80063b0: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
80063b4: 613b str r3, [r7, #16]
#endif /* LWIP_CALLBACK_API */
errf_arg = pcb->callback_arg;
80063b6: 687b ldr r3, [r7, #4]
80063b8: 691b ldr r3, [r3, #16]
80063ba: 60fb str r3, [r7, #12]
if (pcb->state == CLOSED) {
80063bc: 687b ldr r3, [r7, #4]
80063be: 7d1b ldrb r3, [r3, #20]
80063c0: 2b00 cmp r3, #0
80063c2: d126 bne.n 8006412 <tcp_abandon+0xc6>
if (pcb->local_port != 0) {
80063c4: 687b ldr r3, [r7, #4]
80063c6: 8adb ldrh r3, [r3, #22]
80063c8: 2b00 cmp r3, #0
80063ca: d02e beq.n 800642a <tcp_abandon+0xde>
/* bound, not yet opened */
TCP_RMV(&tcp_bound_pcbs, pcb);
80063cc: 4b3b ldr r3, [pc, #236] ; (80064bc <tcp_abandon+0x170>)
80063ce: 681b ldr r3, [r3, #0]
80063d0: 687a ldr r2, [r7, #4]
80063d2: 429a cmp r2, r3
80063d4: d105 bne.n 80063e2 <tcp_abandon+0x96>
80063d6: 4b39 ldr r3, [pc, #228] ; (80064bc <tcp_abandon+0x170>)
80063d8: 681b ldr r3, [r3, #0]
80063da: 68db ldr r3, [r3, #12]
80063dc: 4a37 ldr r2, [pc, #220] ; (80064bc <tcp_abandon+0x170>)
80063de: 6013 str r3, [r2, #0]
80063e0: e013 b.n 800640a <tcp_abandon+0xbe>
80063e2: 4b36 ldr r3, [pc, #216] ; (80064bc <tcp_abandon+0x170>)
80063e4: 681b ldr r3, [r3, #0]
80063e6: 61fb str r3, [r7, #28]
80063e8: e00c b.n 8006404 <tcp_abandon+0xb8>
80063ea: 69fb ldr r3, [r7, #28]
80063ec: 68db ldr r3, [r3, #12]
80063ee: 687a ldr r2, [r7, #4]
80063f0: 429a cmp r2, r3
80063f2: d104 bne.n 80063fe <tcp_abandon+0xb2>
80063f4: 687b ldr r3, [r7, #4]
80063f6: 68da ldr r2, [r3, #12]
80063f8: 69fb ldr r3, [r7, #28]
80063fa: 60da str r2, [r3, #12]
80063fc: e005 b.n 800640a <tcp_abandon+0xbe>
80063fe: 69fb ldr r3, [r7, #28]
8006400: 68db ldr r3, [r3, #12]
8006402: 61fb str r3, [r7, #28]
8006404: 69fb ldr r3, [r7, #28]
8006406: 2b00 cmp r3, #0
8006408: d1ef bne.n 80063ea <tcp_abandon+0x9e>
800640a: 687b ldr r3, [r7, #4]
800640c: 2200 movs r2, #0
800640e: 60da str r2, [r3, #12]
8006410: e00b b.n 800642a <tcp_abandon+0xde>
}
} else {
send_rst = reset;
8006412: 683b ldr r3, [r7, #0]
8006414: 627b str r3, [r7, #36] ; 0x24
local_port = pcb->local_port;
8006416: 687b ldr r3, [r7, #4]
8006418: 8adb ldrh r3, [r3, #22]
800641a: 847b strh r3, [r7, #34] ; 0x22
TCP_PCB_REMOVE_ACTIVE(pcb);
800641c: 6879 ldr r1, [r7, #4]
800641e: 4828 ldr r0, [pc, #160] ; (80064c0 <tcp_abandon+0x174>)
8006420: f000 ff7a bl 8007318 <tcp_pcb_remove>
8006424: 4b27 ldr r3, [pc, #156] ; (80064c4 <tcp_abandon+0x178>)
8006426: 2201 movs r2, #1
8006428: 701a strb r2, [r3, #0]
}
if (pcb->unacked != NULL) {
800642a: 687b ldr r3, [r7, #4]
800642c: 6f1b ldr r3, [r3, #112] ; 0x70
800642e: 2b00 cmp r3, #0
8006430: d004 beq.n 800643c <tcp_abandon+0xf0>
tcp_segs_free(pcb->unacked);
8006432: 687b ldr r3, [r7, #4]
8006434: 6f1b ldr r3, [r3, #112] ; 0x70
8006436: 4618 mov r0, r3
8006438: f000 fd1c bl 8006e74 <tcp_segs_free>
}
if (pcb->unsent != NULL) {
800643c: 687b ldr r3, [r7, #4]
800643e: 6edb ldr r3, [r3, #108] ; 0x6c
8006440: 2b00 cmp r3, #0
8006442: d004 beq.n 800644e <tcp_abandon+0x102>
tcp_segs_free(pcb->unsent);
8006444: 687b ldr r3, [r7, #4]
8006446: 6edb ldr r3, [r3, #108] ; 0x6c
8006448: 4618 mov r0, r3
800644a: f000 fd13 bl 8006e74 <tcp_segs_free>
}
#if TCP_QUEUE_OOSEQ
if (pcb->ooseq != NULL) {
800644e: 687b ldr r3, [r7, #4]
8006450: 6f5b ldr r3, [r3, #116] ; 0x74
8006452: 2b00 cmp r3, #0
8006454: d004 beq.n 8006460 <tcp_abandon+0x114>
tcp_segs_free(pcb->ooseq);
8006456: 687b ldr r3, [r7, #4]
8006458: 6f5b ldr r3, [r3, #116] ; 0x74
800645a: 4618 mov r0, r3
800645c: f000 fd0a bl 8006e74 <tcp_segs_free>
}
#endif /* TCP_QUEUE_OOSEQ */
tcp_backlog_accepted(pcb);
if (send_rst) {
8006460: 6a7b ldr r3, [r7, #36] ; 0x24
8006462: 2b00 cmp r3, #0
8006464: d00e beq.n 8006484 <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);
8006466: 6879 ldr r1, [r7, #4]
8006468: 687b ldr r3, [r7, #4]
800646a: 3304 adds r3, #4
800646c: 687a ldr r2, [r7, #4]
800646e: 8b12 ldrh r2, [r2, #24]
8006470: 9202 str r2, [sp, #8]
8006472: 8c7a ldrh r2, [r7, #34] ; 0x22
8006474: 9201 str r2, [sp, #4]
8006476: 9300 str r3, [sp, #0]
8006478: 460b mov r3, r1
800647a: 697a ldr r2, [r7, #20]
800647c: 69b9 ldr r1, [r7, #24]
800647e: 6878 ldr r0, [r7, #4]
8006480: f004 fcc2 bl 800ae08 <tcp_rst>
}
last_state = pcb->state;
8006484: 687b ldr r3, [r7, #4]
8006486: 7d1b ldrb r3, [r3, #20]
8006488: 72fb strb r3, [r7, #11]
tcp_free(pcb);
800648a: 6878 ldr r0, [r7, #4]
800648c: f7ff fd34 bl 8005ef8 <tcp_free>
TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT);
8006490: 693b ldr r3, [r7, #16]
8006492: 2b00 cmp r3, #0
8006494: d004 beq.n 80064a0 <tcp_abandon+0x154>
8006496: 693b ldr r3, [r7, #16]
8006498: f06f 010c mvn.w r1, #12
800649c: 68f8 ldr r0, [r7, #12]
800649e: 4798 blx r3
}
}
80064a0: 3728 adds r7, #40 ; 0x28
80064a2: 46bd mov sp, r7
80064a4: bd80 pop {r7, pc}
80064a6: bf00 nop
80064a8: 080159bc .word 0x080159bc
80064ac: 08015b00 .word 0x08015b00
80064b0: 08015a00 .word 0x08015a00
80064b4: 08015b1c .word 0x08015b1c
80064b8: 20008c10 .word 0x20008c10
80064bc: 20008c04 .word 0x20008c04
80064c0: 20008c0c .word 0x20008c0c
80064c4: 20008c14 .word 0x20008c14
080064c8 <tcp_abort>:
*
* @param pcb the tcp pcb to abort
*/
void
tcp_abort(struct tcp_pcb *pcb)
{
80064c8: b580 push {r7, lr}
80064ca: b082 sub sp, #8
80064cc: af00 add r7, sp, #0
80064ce: 6078 str r0, [r7, #4]
tcp_abandon(pcb, 1);
80064d0: 2101 movs r1, #1
80064d2: 6878 ldr r0, [r7, #4]
80064d4: f7ff ff3a bl 800634c <tcp_abandon>
}
80064d8: bf00 nop
80064da: 3708 adds r7, #8
80064dc: 46bd mov sp, r7
80064de: bd80 pop {r7, pc}
080064e0 <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)
{
80064e0: b580 push {r7, lr}
80064e2: b084 sub sp, #16
80064e4: af00 add r7, sp, #0
80064e6: 6078 str r0, [r7, #4]
u32_t new_right_edge;
LWIP_ASSERT("tcp_update_rcv_ann_wnd: invalid pcb", pcb != NULL);
80064e8: 687b ldr r3, [r7, #4]
80064ea: 2b00 cmp r3, #0
80064ec: d106 bne.n 80064fc <tcp_update_rcv_ann_wnd+0x1c>
80064ee: 4b25 ldr r3, [pc, #148] ; (8006584 <tcp_update_rcv_ann_wnd+0xa4>)
80064f0: f240 32a6 movw r2, #934 ; 0x3a6
80064f4: 4924 ldr r1, [pc, #144] ; (8006588 <tcp_update_rcv_ann_wnd+0xa8>)
80064f6: 4825 ldr r0, [pc, #148] ; (800658c <tcp_update_rcv_ann_wnd+0xac>)
80064f8: f009 ff6a bl 80103d0 <printf>
new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd;
80064fc: 687b ldr r3, [r7, #4]
80064fe: 6a5b ldr r3, [r3, #36] ; 0x24
8006500: 687a ldr r2, [r7, #4]
8006502: 8d12 ldrh r2, [r2, #40] ; 0x28
8006504: 4413 add r3, r2
8006506: 60fb str r3, [r7, #12]
if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) {
8006508: 687b ldr r3, [r7, #4]
800650a: 6adb ldr r3, [r3, #44] ; 0x2c
800650c: 687a ldr r2, [r7, #4]
800650e: 8e52 ldrh r2, [r2, #50] ; 0x32
8006510: f5b2 6f86 cmp.w r2, #1072 ; 0x430
8006514: bf28 it cs
8006516: f44f 6286 movcs.w r2, #1072 ; 0x430
800651a: b292 uxth r2, r2
800651c: 4413 add r3, r2
800651e: 68fa ldr r2, [r7, #12]
8006520: 1ad3 subs r3, r2, r3
8006522: 2b00 cmp r3, #0
8006524: db08 blt.n 8006538 <tcp_update_rcv_ann_wnd+0x58>
/* we can advertise more window */
pcb->rcv_ann_wnd = pcb->rcv_wnd;
8006526: 687b ldr r3, [r7, #4]
8006528: 8d1a ldrh r2, [r3, #40] ; 0x28
800652a: 687b ldr r3, [r7, #4]
800652c: 855a strh r2, [r3, #42] ; 0x2a
return new_right_edge - pcb->rcv_ann_right_edge;
800652e: 687b ldr r3, [r7, #4]
8006530: 6adb ldr r3, [r3, #44] ; 0x2c
8006532: 68fa ldr r2, [r7, #12]
8006534: 1ad3 subs r3, r2, r3
8006536: e020 b.n 800657a <tcp_update_rcv_ann_wnd+0x9a>
} else {
if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) {
8006538: 687b ldr r3, [r7, #4]
800653a: 6a5a ldr r2, [r3, #36] ; 0x24
800653c: 687b ldr r3, [r7, #4]
800653e: 6adb ldr r3, [r3, #44] ; 0x2c
8006540: 1ad3 subs r3, r2, r3
8006542: 2b00 cmp r3, #0
8006544: dd03 ble.n 800654e <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;
8006546: 687b ldr r3, [r7, #4]
8006548: 2200 movs r2, #0
800654a: 855a strh r2, [r3, #42] ; 0x2a
800654c: e014 b.n 8006578 <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;
800654e: 687b ldr r3, [r7, #4]
8006550: 6ada ldr r2, [r3, #44] ; 0x2c
8006552: 687b ldr r3, [r7, #4]
8006554: 6a5b ldr r3, [r3, #36] ; 0x24
8006556: 1ad3 subs r3, r2, r3
8006558: 60bb str r3, [r7, #8]
#if !LWIP_WND_SCALE
LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff);
800655a: 68bb ldr r3, [r7, #8]
800655c: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8006560: d306 bcc.n 8006570 <tcp_update_rcv_ann_wnd+0x90>
8006562: 4b08 ldr r3, [pc, #32] ; (8006584 <tcp_update_rcv_ann_wnd+0xa4>)
8006564: f240 32b6 movw r2, #950 ; 0x3b6
8006568: 4909 ldr r1, [pc, #36] ; (8006590 <tcp_update_rcv_ann_wnd+0xb0>)
800656a: 4808 ldr r0, [pc, #32] ; (800658c <tcp_update_rcv_ann_wnd+0xac>)
800656c: f009 ff30 bl 80103d0 <printf>
#endif
pcb->rcv_ann_wnd = (tcpwnd_size_t)new_rcv_ann_wnd;
8006570: 68bb ldr r3, [r7, #8]
8006572: b29a uxth r2, r3
8006574: 687b ldr r3, [r7, #4]
8006576: 855a strh r2, [r3, #42] ; 0x2a
}
return 0;
8006578: 2300 movs r3, #0
}
}
800657a: 4618 mov r0, r3
800657c: 3710 adds r7, #16
800657e: 46bd mov sp, r7
8006580: bd80 pop {r7, pc}
8006582: bf00 nop
8006584: 080159bc .word 0x080159bc
8006588: 08015c18 .word 0x08015c18
800658c: 08015a00 .word 0x08015a00
8006590: 08015c3c .word 0x08015c3c
08006594 <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)
{
8006594: b580 push {r7, lr}
8006596: b084 sub sp, #16
8006598: af00 add r7, sp, #0
800659a: 6078 str r0, [r7, #4]
800659c: 460b mov r3, r1
800659e: 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);
80065a0: 687b ldr r3, [r7, #4]
80065a2: 2b00 cmp r3, #0
80065a4: d107 bne.n 80065b6 <tcp_recved+0x22>
80065a6: 4b1f ldr r3, [pc, #124] ; (8006624 <tcp_recved+0x90>)
80065a8: f240 32cf movw r2, #975 ; 0x3cf
80065ac: 491e ldr r1, [pc, #120] ; (8006628 <tcp_recved+0x94>)
80065ae: 481f ldr r0, [pc, #124] ; (800662c <tcp_recved+0x98>)
80065b0: f009 ff0e bl 80103d0 <printf>
80065b4: e032 b.n 800661c <tcp_recved+0x88>
/* pcb->state LISTEN not allowed here */
LWIP_ASSERT("don't call tcp_recved for listen-pcbs",
80065b6: 687b ldr r3, [r7, #4]
80065b8: 7d1b ldrb r3, [r3, #20]
80065ba: 2b01 cmp r3, #1
80065bc: d106 bne.n 80065cc <tcp_recved+0x38>
80065be: 4b19 ldr r3, [pc, #100] ; (8006624 <tcp_recved+0x90>)
80065c0: f240 32d2 movw r2, #978 ; 0x3d2
80065c4: 491a ldr r1, [pc, #104] ; (8006630 <tcp_recved+0x9c>)
80065c6: 4819 ldr r0, [pc, #100] ; (800662c <tcp_recved+0x98>)
80065c8: f009 ff02 bl 80103d0 <printf>
pcb->state != LISTEN);
rcv_wnd = (tcpwnd_size_t)(pcb->rcv_wnd + len);
80065cc: 687b ldr r3, [r7, #4]
80065ce: 8d1a ldrh r2, [r3, #40] ; 0x28
80065d0: 887b ldrh r3, [r7, #2]
80065d2: 4413 add r3, r2
80065d4: 81fb strh r3, [r7, #14]
if ((rcv_wnd > TCP_WND_MAX(pcb)) || (rcv_wnd < pcb->rcv_wnd)) {
80065d6: 89fb ldrh r3, [r7, #14]
80065d8: f5b3 6f06 cmp.w r3, #2144 ; 0x860
80065dc: d804 bhi.n 80065e8 <tcp_recved+0x54>
80065de: 687b ldr r3, [r7, #4]
80065e0: 8d1b ldrh r3, [r3, #40] ; 0x28
80065e2: 89fa ldrh r2, [r7, #14]
80065e4: 429a cmp r2, r3
80065e6: d204 bcs.n 80065f2 <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);
80065e8: 687b ldr r3, [r7, #4]
80065ea: f44f 6206 mov.w r2, #2144 ; 0x860
80065ee: 851a strh r2, [r3, #40] ; 0x28
80065f0: e002 b.n 80065f8 <tcp_recved+0x64>
} else {
pcb->rcv_wnd = rcv_wnd;
80065f2: 687b ldr r3, [r7, #4]
80065f4: 89fa ldrh r2, [r7, #14]
80065f6: 851a strh r2, [r3, #40] ; 0x28
}
wnd_inflation = tcp_update_rcv_ann_wnd(pcb);
80065f8: 6878 ldr r0, [r7, #4]
80065fa: f7ff ff71 bl 80064e0 <tcp_update_rcv_ann_wnd>
80065fe: 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) {
8006600: 68bb ldr r3, [r7, #8]
8006602: f5b3 7f06 cmp.w r3, #536 ; 0x218
8006606: d309 bcc.n 800661c <tcp_recved+0x88>
tcp_ack_now(pcb);
8006608: 687b ldr r3, [r7, #4]
800660a: 8b5b ldrh r3, [r3, #26]
800660c: f043 0302 orr.w r3, r3, #2
8006610: b29a uxth r2, r3
8006612: 687b ldr r3, [r7, #4]
8006614: 835a strh r2, [r3, #26]
tcp_output(pcb);
8006616: 6878 ldr r0, [r7, #4]
8006618: f003 fe42 bl 800a2a0 <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)));
}
800661c: 3710 adds r7, #16
800661e: 46bd mov sp, r7
8006620: bd80 pop {r7, pc}
8006622: bf00 nop
8006624: 080159bc .word 0x080159bc
8006628: 08015c58 .word 0x08015c58
800662c: 08015a00 .word 0x08015a00
8006630: 08015c70 .word 0x08015c70
08006634 <tcp_slowtmr>:
*
* Automatically called from tcp_tmr().
*/
void
tcp_slowtmr(void)
{
8006634: b5b0 push {r4, r5, r7, lr}
8006636: b090 sub sp, #64 ; 0x40
8006638: 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;
800663a: 2300 movs r3, #0
800663c: f887 3025 strb.w r3, [r7, #37] ; 0x25
++tcp_ticks;
8006640: 4b94 ldr r3, [pc, #592] ; (8006894 <tcp_slowtmr+0x260>)
8006642: 681b ldr r3, [r3, #0]
8006644: 3301 adds r3, #1
8006646: 4a93 ldr r2, [pc, #588] ; (8006894 <tcp_slowtmr+0x260>)
8006648: 6013 str r3, [r2, #0]
++tcp_timer_ctr;
800664a: 4b93 ldr r3, [pc, #588] ; (8006898 <tcp_slowtmr+0x264>)
800664c: 781b ldrb r3, [r3, #0]
800664e: 3301 adds r3, #1
8006650: b2da uxtb r2, r3
8006652: 4b91 ldr r3, [pc, #580] ; (8006898 <tcp_slowtmr+0x264>)
8006654: 701a strb r2, [r3, #0]
tcp_slowtmr_start:
/* Steps through all of the active PCBs. */
prev = NULL;
8006656: 2300 movs r3, #0
8006658: 62bb str r3, [r7, #40] ; 0x28
pcb = tcp_active_pcbs;
800665a: 4b90 ldr r3, [pc, #576] ; (800689c <tcp_slowtmr+0x268>)
800665c: 681b ldr r3, [r3, #0]
800665e: 62fb str r3, [r7, #44] ; 0x2c
if (pcb == NULL) {
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n"));
}
while (pcb != NULL) {
8006660: e29f b.n 8006ba2 <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);
8006662: 6afb ldr r3, [r7, #44] ; 0x2c
8006664: 7d1b ldrb r3, [r3, #20]
8006666: 2b00 cmp r3, #0
8006668: d106 bne.n 8006678 <tcp_slowtmr+0x44>
800666a: 4b8d ldr r3, [pc, #564] ; (80068a0 <tcp_slowtmr+0x26c>)
800666c: f240 42be movw r2, #1214 ; 0x4be
8006670: 498c ldr r1, [pc, #560] ; (80068a4 <tcp_slowtmr+0x270>)
8006672: 488d ldr r0, [pc, #564] ; (80068a8 <tcp_slowtmr+0x274>)
8006674: f009 feac bl 80103d0 <printf>
LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN);
8006678: 6afb ldr r3, [r7, #44] ; 0x2c
800667a: 7d1b ldrb r3, [r3, #20]
800667c: 2b01 cmp r3, #1
800667e: d106 bne.n 800668e <tcp_slowtmr+0x5a>
8006680: 4b87 ldr r3, [pc, #540] ; (80068a0 <tcp_slowtmr+0x26c>)
8006682: f240 42bf movw r2, #1215 ; 0x4bf
8006686: 4989 ldr r1, [pc, #548] ; (80068ac <tcp_slowtmr+0x278>)
8006688: 4887 ldr r0, [pc, #540] ; (80068a8 <tcp_slowtmr+0x274>)
800668a: f009 fea1 bl 80103d0 <printf>
LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT);
800668e: 6afb ldr r3, [r7, #44] ; 0x2c
8006690: 7d1b ldrb r3, [r3, #20]
8006692: 2b0a cmp r3, #10
8006694: d106 bne.n 80066a4 <tcp_slowtmr+0x70>
8006696: 4b82 ldr r3, [pc, #520] ; (80068a0 <tcp_slowtmr+0x26c>)
8006698: f44f 6298 mov.w r2, #1216 ; 0x4c0
800669c: 4984 ldr r1, [pc, #528] ; (80068b0 <tcp_slowtmr+0x27c>)
800669e: 4882 ldr r0, [pc, #520] ; (80068a8 <tcp_slowtmr+0x274>)
80066a0: f009 fe96 bl 80103d0 <printf>
if (pcb->last_timer == tcp_timer_ctr) {
80066a4: 6afb ldr r3, [r7, #44] ; 0x2c
80066a6: 7f9a ldrb r2, [r3, #30]
80066a8: 4b7b ldr r3, [pc, #492] ; (8006898 <tcp_slowtmr+0x264>)
80066aa: 781b ldrb r3, [r3, #0]
80066ac: 429a cmp r2, r3
80066ae: d105 bne.n 80066bc <tcp_slowtmr+0x88>
/* skip this pcb, we have already processed it */
prev = pcb;
80066b0: 6afb ldr r3, [r7, #44] ; 0x2c
80066b2: 62bb str r3, [r7, #40] ; 0x28
pcb = pcb->next;
80066b4: 6afb ldr r3, [r7, #44] ; 0x2c
80066b6: 68db ldr r3, [r3, #12]
80066b8: 62fb str r3, [r7, #44] ; 0x2c
continue;
80066ba: e272 b.n 8006ba2 <tcp_slowtmr+0x56e>
}
pcb->last_timer = tcp_timer_ctr;
80066bc: 4b76 ldr r3, [pc, #472] ; (8006898 <tcp_slowtmr+0x264>)
80066be: 781a ldrb r2, [r3, #0]
80066c0: 6afb ldr r3, [r7, #44] ; 0x2c
80066c2: 779a strb r2, [r3, #30]
pcb_remove = 0;
80066c4: 2300 movs r3, #0
80066c6: f887 3027 strb.w r3, [r7, #39] ; 0x27
pcb_reset = 0;
80066ca: 2300 movs r3, #0
80066cc: f887 3026 strb.w r3, [r7, #38] ; 0x26
if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) {
80066d0: 6afb ldr r3, [r7, #44] ; 0x2c
80066d2: 7d1b ldrb r3, [r3, #20]
80066d4: 2b02 cmp r3, #2
80066d6: d10a bne.n 80066ee <tcp_slowtmr+0xba>
80066d8: 6afb ldr r3, [r7, #44] ; 0x2c
80066da: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
80066de: 2b05 cmp r3, #5
80066e0: d905 bls.n 80066ee <tcp_slowtmr+0xba>
++pcb_remove;
80066e2: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
80066e6: 3301 adds r3, #1
80066e8: f887 3027 strb.w r3, [r7, #39] ; 0x27
80066ec: e11e b.n 800692c <tcp_slowtmr+0x2f8>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n"));
} else if (pcb->nrtx >= TCP_MAXRTX) {
80066ee: 6afb ldr r3, [r7, #44] ; 0x2c
80066f0: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
80066f4: 2b0b cmp r3, #11
80066f6: d905 bls.n 8006704 <tcp_slowtmr+0xd0>
++pcb_remove;
80066f8: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
80066fc: 3301 adds r3, #1
80066fe: f887 3027 strb.w r3, [r7, #39] ; 0x27
8006702: e113 b.n 800692c <tcp_slowtmr+0x2f8>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n"));
} else {
if (pcb->persist_backoff > 0) {
8006704: 6afb ldr r3, [r7, #44] ; 0x2c
8006706: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
800670a: 2b00 cmp r3, #0
800670c: d075 beq.n 80067fa <tcp_slowtmr+0x1c6>
LWIP_ASSERT("tcp_slowtimr: persist ticking with in-flight data", pcb->unacked == NULL);
800670e: 6afb ldr r3, [r7, #44] ; 0x2c
8006710: 6f1b ldr r3, [r3, #112] ; 0x70
8006712: 2b00 cmp r3, #0
8006714: d006 beq.n 8006724 <tcp_slowtmr+0xf0>
8006716: 4b62 ldr r3, [pc, #392] ; (80068a0 <tcp_slowtmr+0x26c>)
8006718: f240 42d4 movw r2, #1236 ; 0x4d4
800671c: 4965 ldr r1, [pc, #404] ; (80068b4 <tcp_slowtmr+0x280>)
800671e: 4862 ldr r0, [pc, #392] ; (80068a8 <tcp_slowtmr+0x274>)
8006720: f009 fe56 bl 80103d0 <printf>
LWIP_ASSERT("tcp_slowtimr: persist ticking with empty send buffer", pcb->unsent != NULL);
8006724: 6afb ldr r3, [r7, #44] ; 0x2c
8006726: 6edb ldr r3, [r3, #108] ; 0x6c
8006728: 2b00 cmp r3, #0
800672a: d106 bne.n 800673a <tcp_slowtmr+0x106>
800672c: 4b5c ldr r3, [pc, #368] ; (80068a0 <tcp_slowtmr+0x26c>)
800672e: f240 42d5 movw r2, #1237 ; 0x4d5
8006732: 4961 ldr r1, [pc, #388] ; (80068b8 <tcp_slowtmr+0x284>)
8006734: 485c ldr r0, [pc, #368] ; (80068a8 <tcp_slowtmr+0x274>)
8006736: f009 fe4b bl 80103d0 <printf>
if (pcb->persist_probe >= TCP_MAXRTX) {
800673a: 6afb ldr r3, [r7, #44] ; 0x2c
800673c: f893 309a ldrb.w r3, [r3, #154] ; 0x9a
8006740: 2b0b cmp r3, #11
8006742: d905 bls.n 8006750 <tcp_slowtmr+0x11c>
++pcb_remove; /* max probes reached */
8006744: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8006748: 3301 adds r3, #1
800674a: f887 3027 strb.w r3, [r7, #39] ; 0x27
800674e: e0ed b.n 800692c <tcp_slowtmr+0x2f8>
} else {
u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff - 1];
8006750: 6afb ldr r3, [r7, #44] ; 0x2c
8006752: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
8006756: 3b01 subs r3, #1
8006758: 4a58 ldr r2, [pc, #352] ; (80068bc <tcp_slowtmr+0x288>)
800675a: 5cd3 ldrb r3, [r2, r3]
800675c: 747b strb r3, [r7, #17]
if (pcb->persist_cnt < backoff_cnt) {
800675e: 6afb ldr r3, [r7, #44] ; 0x2c
8006760: f893 3098 ldrb.w r3, [r3, #152] ; 0x98
8006764: 7c7a ldrb r2, [r7, #17]
8006766: 429a cmp r2, r3
8006768: d907 bls.n 800677a <tcp_slowtmr+0x146>
pcb->persist_cnt++;
800676a: 6afb ldr r3, [r7, #44] ; 0x2c
800676c: f893 3098 ldrb.w r3, [r3, #152] ; 0x98
8006770: 3301 adds r3, #1
8006772: b2da uxtb r2, r3
8006774: 6afb ldr r3, [r7, #44] ; 0x2c
8006776: f883 2098 strb.w r2, [r3, #152] ; 0x98
}
if (pcb->persist_cnt >= backoff_cnt) {
800677a: 6afb ldr r3, [r7, #44] ; 0x2c
800677c: f893 3098 ldrb.w r3, [r3, #152] ; 0x98
8006780: 7c7a ldrb r2, [r7, #17]
8006782: 429a cmp r2, r3
8006784: f200 80d2 bhi.w 800692c <tcp_slowtmr+0x2f8>
int next_slot = 1; /* increment timer to next slot */
8006788: 2301 movs r3, #1
800678a: 623b str r3, [r7, #32]
/* If snd_wnd is zero, send 1 byte probes */
if (pcb->snd_wnd == 0) {
800678c: 6afb ldr r3, [r7, #44] ; 0x2c
800678e: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8006792: 2b00 cmp r3, #0
8006794: d108 bne.n 80067a8 <tcp_slowtmr+0x174>
if (tcp_zero_window_probe(pcb) != ERR_OK) {
8006796: 6af8 ldr r0, [r7, #44] ; 0x2c
8006798: f004 fc2a bl 800aff0 <tcp_zero_window_probe>
800679c: 4603 mov r3, r0
800679e: 2b00 cmp r3, #0
80067a0: d014 beq.n 80067cc <tcp_slowtmr+0x198>
next_slot = 0; /* try probe again with current slot */
80067a2: 2300 movs r3, #0
80067a4: 623b str r3, [r7, #32]
80067a6: e011 b.n 80067cc <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) {
80067a8: 6afb ldr r3, [r7, #44] ; 0x2c
80067aa: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
80067ae: 4619 mov r1, r3
80067b0: 6af8 ldr r0, [r7, #44] ; 0x2c
80067b2: f003 faef bl 8009d94 <tcp_split_unsent_seg>
80067b6: 4603 mov r3, r0
80067b8: 2b00 cmp r3, #0
80067ba: d107 bne.n 80067cc <tcp_slowtmr+0x198>
if (tcp_output(pcb) == ERR_OK) {
80067bc: 6af8 ldr r0, [r7, #44] ; 0x2c
80067be: f003 fd6f bl 800a2a0 <tcp_output>
80067c2: 4603 mov r3, r0
80067c4: 2b00 cmp r3, #0
80067c6: d101 bne.n 80067cc <tcp_slowtmr+0x198>
/* sending will cancel persist timer, else retry with current slot */
next_slot = 0;
80067c8: 2300 movs r3, #0
80067ca: 623b str r3, [r7, #32]
}
}
}
if (next_slot) {
80067cc: 6a3b ldr r3, [r7, #32]
80067ce: 2b00 cmp r3, #0
80067d0: f000 80ac beq.w 800692c <tcp_slowtmr+0x2f8>
pcb->persist_cnt = 0;
80067d4: 6afb ldr r3, [r7, #44] ; 0x2c
80067d6: 2200 movs r2, #0
80067d8: f883 2098 strb.w r2, [r3, #152] ; 0x98
if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) {
80067dc: 6afb ldr r3, [r7, #44] ; 0x2c
80067de: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
80067e2: 2b06 cmp r3, #6
80067e4: f200 80a2 bhi.w 800692c <tcp_slowtmr+0x2f8>
pcb->persist_backoff++;
80067e8: 6afb ldr r3, [r7, #44] ; 0x2c
80067ea: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
80067ee: 3301 adds r3, #1
80067f0: b2da uxtb r2, r3
80067f2: 6afb ldr r3, [r7, #44] ; 0x2c
80067f4: f883 2099 strb.w r2, [r3, #153] ; 0x99
80067f8: e098 b.n 800692c <tcp_slowtmr+0x2f8>
}
}
}
} else {
/* Increase the retransmission timer if it is running */
if ((pcb->rtime >= 0) && (pcb->rtime < 0x7FFF)) {
80067fa: 6afb ldr r3, [r7, #44] ; 0x2c
80067fc: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
8006800: 2b00 cmp r3, #0
8006802: db0f blt.n 8006824 <tcp_slowtmr+0x1f0>
8006804: 6afb ldr r3, [r7, #44] ; 0x2c
8006806: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
800680a: f647 72ff movw r2, #32767 ; 0x7fff
800680e: 4293 cmp r3, r2
8006810: d008 beq.n 8006824 <tcp_slowtmr+0x1f0>
++pcb->rtime;
8006812: 6afb ldr r3, [r7, #44] ; 0x2c
8006814: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
8006818: b29b uxth r3, r3
800681a: 3301 adds r3, #1
800681c: b29b uxth r3, r3
800681e: b21a sxth r2, r3
8006820: 6afb ldr r3, [r7, #44] ; 0x2c
8006822: 861a strh r2, [r3, #48] ; 0x30
}
if (pcb->rtime >= pcb->rto) {
8006824: 6afb ldr r3, [r7, #44] ; 0x2c
8006826: f9b3 2030 ldrsh.w r2, [r3, #48] ; 0x30
800682a: 6afb ldr r3, [r7, #44] ; 0x2c
800682c: f9b3 3040 ldrsh.w r3, [r3, #64] ; 0x40
8006830: 429a cmp r2, r3
8006832: db7b blt.n 800692c <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))) {
8006834: 6af8 ldr r0, [r7, #44] ; 0x2c
8006836: f004 f825 bl 800a884 <tcp_rexmit_rto_prepare>
800683a: 4603 mov r3, r0
800683c: 2b00 cmp r3, #0
800683e: d007 beq.n 8006850 <tcp_slowtmr+0x21c>
8006840: 6afb ldr r3, [r7, #44] ; 0x2c
8006842: 6f1b ldr r3, [r3, #112] ; 0x70
8006844: 2b00 cmp r3, #0
8006846: d171 bne.n 800692c <tcp_slowtmr+0x2f8>
8006848: 6afb ldr r3, [r7, #44] ; 0x2c
800684a: 6edb ldr r3, [r3, #108] ; 0x6c
800684c: 2b00 cmp r3, #0
800684e: d06d beq.n 800692c <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) {
8006850: 6afb ldr r3, [r7, #44] ; 0x2c
8006852: 7d1b ldrb r3, [r3, #20]
8006854: 2b02 cmp r3, #2
8006856: d03a beq.n 80068ce <tcp_slowtmr+0x29a>
u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff) - 1);
8006858: 6afb ldr r3, [r7, #44] ; 0x2c
800685a: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
800685e: 2b0c cmp r3, #12
8006860: bf28 it cs
8006862: 230c movcs r3, #12
8006864: 76fb strb r3, [r7, #27]
int calc_rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx];
8006866: 6afb ldr r3, [r7, #44] ; 0x2c
8006868: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
800686c: 10db asrs r3, r3, #3
800686e: b21b sxth r3, r3
8006870: 461a mov r2, r3
8006872: 6afb ldr r3, [r7, #44] ; 0x2c
8006874: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
8006878: 4413 add r3, r2
800687a: 7efa ldrb r2, [r7, #27]
800687c: 4910 ldr r1, [pc, #64] ; (80068c0 <tcp_slowtmr+0x28c>)
800687e: 5c8a ldrb r2, [r1, r2]
8006880: 4093 lsls r3, r2
8006882: 617b str r3, [r7, #20]
pcb->rto = (s16_t)LWIP_MIN(calc_rto, 0x7FFF);
8006884: 697b ldr r3, [r7, #20]
8006886: f647 72fe movw r2, #32766 ; 0x7ffe
800688a: 4293 cmp r3, r2
800688c: dc1a bgt.n 80068c4 <tcp_slowtmr+0x290>
800688e: 697b ldr r3, [r7, #20]
8006890: b21a sxth r2, r3
8006892: e019 b.n 80068c8 <tcp_slowtmr+0x294>
8006894: 20008c00 .word 0x20008c00
8006898: 20008c16 .word 0x20008c16
800689c: 20008c0c .word 0x20008c0c
80068a0: 080159bc .word 0x080159bc
80068a4: 08015d00 .word 0x08015d00
80068a8: 08015a00 .word 0x08015a00
80068ac: 08015d2c .word 0x08015d2c
80068b0: 08015d58 .word 0x08015d58
80068b4: 08015d88 .word 0x08015d88
80068b8: 08015dbc .word 0x08015dbc
80068bc: 08017d9c .word 0x08017d9c
80068c0: 08017d8c .word 0x08017d8c
80068c4: f647 72ff movw r2, #32767 ; 0x7fff
80068c8: 6afb ldr r3, [r7, #44] ; 0x2c
80068ca: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
}
/* Reset the retransmission timer. */
pcb->rtime = 0;
80068ce: 6afb ldr r3, [r7, #44] ; 0x2c
80068d0: 2200 movs r2, #0
80068d2: 861a strh r2, [r3, #48] ; 0x30
/* Reduce congestion window and ssthresh. */
eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd);
80068d4: 6afb ldr r3, [r7, #44] ; 0x2c
80068d6: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
80068da: 6afb ldr r3, [r7, #44] ; 0x2c
80068dc: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
80068e0: 4293 cmp r3, r2
80068e2: bf28 it cs
80068e4: 4613 movcs r3, r2
80068e6: 827b strh r3, [r7, #18]
pcb->ssthresh = eff_wnd >> 1;
80068e8: 8a7b ldrh r3, [r7, #18]
80068ea: 085b lsrs r3, r3, #1
80068ec: b29a uxth r2, r3
80068ee: 6afb ldr r3, [r7, #44] ; 0x2c
80068f0: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) {
80068f4: 6afb ldr r3, [r7, #44] ; 0x2c
80068f6: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a
80068fa: 6afb ldr r3, [r7, #44] ; 0x2c
80068fc: 8e5b ldrh r3, [r3, #50] ; 0x32
80068fe: 005b lsls r3, r3, #1
8006900: b29b uxth r3, r3
8006902: 429a cmp r2, r3
8006904: d206 bcs.n 8006914 <tcp_slowtmr+0x2e0>
pcb->ssthresh = (tcpwnd_size_t)(pcb->mss << 1);
8006906: 6afb ldr r3, [r7, #44] ; 0x2c
8006908: 8e5b ldrh r3, [r3, #50] ; 0x32
800690a: 005b lsls r3, r3, #1
800690c: b29a uxth r2, r3
800690e: 6afb ldr r3, [r7, #44] ; 0x2c
8006910: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
}
pcb->cwnd = pcb->mss;
8006914: 6afb ldr r3, [r7, #44] ; 0x2c
8006916: 8e5a ldrh r2, [r3, #50] ; 0x32
8006918: 6afb ldr r3, [r7, #44] ; 0x2c
800691a: 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;
800691e: 6afb ldr r3, [r7, #44] ; 0x2c
8006920: 2200 movs r2, #0
8006922: 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);
8006926: 6af8 ldr r0, [r7, #44] ; 0x2c
8006928: f004 f81c bl 800a964 <tcp_rexmit_rto_commit>
}
}
}
}
/* Check if this PCB has stayed too long in FIN-WAIT-2 */
if (pcb->state == FIN_WAIT_2) {
800692c: 6afb ldr r3, [r7, #44] ; 0x2c
800692e: 7d1b ldrb r3, [r3, #20]
8006930: 2b06 cmp r3, #6
8006932: d111 bne.n 8006958 <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) {
8006934: 6afb ldr r3, [r7, #44] ; 0x2c
8006936: 8b5b ldrh r3, [r3, #26]
8006938: f003 0310 and.w r3, r3, #16
800693c: 2b00 cmp r3, #0
800693e: d00b beq.n 8006958 <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) >
8006940: 4b9d ldr r3, [pc, #628] ; (8006bb8 <tcp_slowtmr+0x584>)
8006942: 681a ldr r2, [r3, #0]
8006944: 6afb ldr r3, [r7, #44] ; 0x2c
8006946: 6a1b ldr r3, [r3, #32]
8006948: 1ad3 subs r3, r2, r3
800694a: 2b28 cmp r3, #40 ; 0x28
800694c: d904 bls.n 8006958 <tcp_slowtmr+0x324>
TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) {
++pcb_remove;
800694e: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8006952: 3301 adds r3, #1
8006954: f887 3027 strb.w r3, [r7, #39] ; 0x27
}
}
}
/* Check if KEEPALIVE should be sent */
if (ip_get_option(pcb, SOF_KEEPALIVE) &&
8006958: 6afb ldr r3, [r7, #44] ; 0x2c
800695a: 7a5b ldrb r3, [r3, #9]
800695c: f003 0308 and.w r3, r3, #8
8006960: 2b00 cmp r3, #0
8006962: d04c beq.n 80069fe <tcp_slowtmr+0x3ca>
((pcb->state == ESTABLISHED) ||
8006964: 6afb ldr r3, [r7, #44] ; 0x2c
8006966: 7d1b ldrb r3, [r3, #20]
if (ip_get_option(pcb, SOF_KEEPALIVE) &&
8006968: 2b04 cmp r3, #4
800696a: d003 beq.n 8006974 <tcp_slowtmr+0x340>
(pcb->state == CLOSE_WAIT))) {
800696c: 6afb ldr r3, [r7, #44] ; 0x2c
800696e: 7d1b ldrb r3, [r3, #20]
((pcb->state == ESTABLISHED) ||
8006970: 2b07 cmp r3, #7
8006972: d144 bne.n 80069fe <tcp_slowtmr+0x3ca>
if ((u32_t)(tcp_ticks - pcb->tmr) >
8006974: 4b90 ldr r3, [pc, #576] ; (8006bb8 <tcp_slowtmr+0x584>)
8006976: 681a ldr r2, [r3, #0]
8006978: 6afb ldr r3, [r7, #44] ; 0x2c
800697a: 6a1b ldr r3, [r3, #32]
800697c: 1ad2 subs r2, r2, r3
(pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) {
800697e: 6afb ldr r3, [r7, #44] ; 0x2c
8006980: f8d3 3094 ldr.w r3, [r3, #148] ; 0x94
8006984: f503 2324 add.w r3, r3, #671744 ; 0xa4000
8006988: f603 43b8 addw r3, r3, #3256 ; 0xcb8
800698c: 498b ldr r1, [pc, #556] ; (8006bbc <tcp_slowtmr+0x588>)
800698e: fba1 1303 umull r1, r3, r1, r3
8006992: 095b lsrs r3, r3, #5
if ((u32_t)(tcp_ticks - pcb->tmr) >
8006994: 429a cmp r2, r3
8006996: d90a bls.n 80069ae <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;
8006998: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800699c: 3301 adds r3, #1
800699e: f887 3027 strb.w r3, [r7, #39] ; 0x27
++pcb_reset;
80069a2: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
80069a6: 3301 adds r3, #1
80069a8: f887 3026 strb.w r3, [r7, #38] ; 0x26
80069ac: e027 b.n 80069fe <tcp_slowtmr+0x3ca>
} else if ((u32_t)(tcp_ticks - pcb->tmr) >
80069ae: 4b82 ldr r3, [pc, #520] ; (8006bb8 <tcp_slowtmr+0x584>)
80069b0: 681a ldr r2, [r3, #0]
80069b2: 6afb ldr r3, [r7, #44] ; 0x2c
80069b4: 6a1b ldr r3, [r3, #32]
80069b6: 1ad2 subs r2, r2, r3
(pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb))
80069b8: 6afb ldr r3, [r7, #44] ; 0x2c
80069ba: f8d3 1094 ldr.w r1, [r3, #148] ; 0x94
80069be: 6afb ldr r3, [r7, #44] ; 0x2c
80069c0: f893 309b ldrb.w r3, [r3, #155] ; 0x9b
80069c4: 4618 mov r0, r3
80069c6: 4b7e ldr r3, [pc, #504] ; (8006bc0 <tcp_slowtmr+0x58c>)
80069c8: fb00 f303 mul.w r3, r0, r3
80069cc: 440b add r3, r1
/ TCP_SLOW_INTERVAL) {
80069ce: 497b ldr r1, [pc, #492] ; (8006bbc <tcp_slowtmr+0x588>)
80069d0: fba1 1303 umull r1, r3, r1, r3
80069d4: 095b lsrs r3, r3, #5
} else if ((u32_t)(tcp_ticks - pcb->tmr) >
80069d6: 429a cmp r2, r3
80069d8: d911 bls.n 80069fe <tcp_slowtmr+0x3ca>
err = tcp_keepalive(pcb);
80069da: 6af8 ldr r0, [r7, #44] ; 0x2c
80069dc: f004 fac8 bl 800af70 <tcp_keepalive>
80069e0: 4603 mov r3, r0
80069e2: f887 3025 strb.w r3, [r7, #37] ; 0x25
if (err == ERR_OK) {
80069e6: f997 3025 ldrsb.w r3, [r7, #37] ; 0x25
80069ea: 2b00 cmp r3, #0
80069ec: d107 bne.n 80069fe <tcp_slowtmr+0x3ca>
pcb->keep_cnt_sent++;
80069ee: 6afb ldr r3, [r7, #44] ; 0x2c
80069f0: f893 309b ldrb.w r3, [r3, #155] ; 0x9b
80069f4: 3301 adds r3, #1
80069f6: b2da uxtb r2, r3
80069f8: 6afb ldr r3, [r7, #44] ; 0x2c
80069fa: 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 &&
80069fe: 6afb ldr r3, [r7, #44] ; 0x2c
8006a00: 6f5b ldr r3, [r3, #116] ; 0x74
8006a02: 2b00 cmp r3, #0
8006a04: d011 beq.n 8006a2a <tcp_slowtmr+0x3f6>
(tcp_ticks - pcb->tmr >= (u32_t)pcb->rto * TCP_OOSEQ_TIMEOUT)) {
8006a06: 4b6c ldr r3, [pc, #432] ; (8006bb8 <tcp_slowtmr+0x584>)
8006a08: 681a ldr r2, [r3, #0]
8006a0a: 6afb ldr r3, [r7, #44] ; 0x2c
8006a0c: 6a1b ldr r3, [r3, #32]
8006a0e: 1ad2 subs r2, r2, r3
8006a10: 6afb ldr r3, [r7, #44] ; 0x2c
8006a12: f9b3 3040 ldrsh.w r3, [r3, #64] ; 0x40
8006a16: 4619 mov r1, r3
8006a18: 460b mov r3, r1
8006a1a: 005b lsls r3, r3, #1
8006a1c: 440b add r3, r1
8006a1e: 005b lsls r3, r3, #1
if (pcb->ooseq != NULL &&
8006a20: 429a cmp r2, r3
8006a22: d302 bcc.n 8006a2a <tcp_slowtmr+0x3f6>
LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: dropping OOSEQ queued data\n"));
tcp_free_ooseq(pcb);
8006a24: 6af8 ldr r0, [r7, #44] ; 0x2c
8006a26: f000 fddb bl 80075e0 <tcp_free_ooseq>
}
#endif /* TCP_QUEUE_OOSEQ */
/* Check if this PCB has stayed too long in SYN-RCVD */
if (pcb->state == SYN_RCVD) {
8006a2a: 6afb ldr r3, [r7, #44] ; 0x2c
8006a2c: 7d1b ldrb r3, [r3, #20]
8006a2e: 2b03 cmp r3, #3
8006a30: d10b bne.n 8006a4a <tcp_slowtmr+0x416>
if ((u32_t)(tcp_ticks - pcb->tmr) >
8006a32: 4b61 ldr r3, [pc, #388] ; (8006bb8 <tcp_slowtmr+0x584>)
8006a34: 681a ldr r2, [r3, #0]
8006a36: 6afb ldr r3, [r7, #44] ; 0x2c
8006a38: 6a1b ldr r3, [r3, #32]
8006a3a: 1ad3 subs r3, r2, r3
8006a3c: 2b28 cmp r3, #40 ; 0x28
8006a3e: d904 bls.n 8006a4a <tcp_slowtmr+0x416>
TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) {
++pcb_remove;
8006a40: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8006a44: 3301 adds r3, #1
8006a46: 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) {
8006a4a: 6afb ldr r3, [r7, #44] ; 0x2c
8006a4c: 7d1b ldrb r3, [r3, #20]
8006a4e: 2b09 cmp r3, #9
8006a50: d10b bne.n 8006a6a <tcp_slowtmr+0x436>
if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) {
8006a52: 4b59 ldr r3, [pc, #356] ; (8006bb8 <tcp_slowtmr+0x584>)
8006a54: 681a ldr r2, [r3, #0]
8006a56: 6afb ldr r3, [r7, #44] ; 0x2c
8006a58: 6a1b ldr r3, [r3, #32]
8006a5a: 1ad3 subs r3, r2, r3
8006a5c: 2bf0 cmp r3, #240 ; 0xf0
8006a5e: d904 bls.n 8006a6a <tcp_slowtmr+0x436>
++pcb_remove;
8006a60: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8006a64: 3301 adds r3, #1
8006a66: 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) {
8006a6a: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8006a6e: 2b00 cmp r3, #0
8006a70: d060 beq.n 8006b34 <tcp_slowtmr+0x500>
struct tcp_pcb *pcb2;
#if LWIP_CALLBACK_API
tcp_err_fn err_fn = pcb->errf;
8006a72: 6afb ldr r3, [r7, #44] ; 0x2c
8006a74: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8006a78: 60fb str r3, [r7, #12]
#endif /* LWIP_CALLBACK_API */
void *err_arg;
enum tcp_state last_state;
tcp_pcb_purge(pcb);
8006a7a: 6af8 ldr r0, [r7, #44] ; 0x2c
8006a7c: f000 fbfc bl 8007278 <tcp_pcb_purge>
/* Remove PCB from tcp_active_pcbs list. */
if (prev != NULL) {
8006a80: 6abb ldr r3, [r7, #40] ; 0x28
8006a82: 2b00 cmp r3, #0
8006a84: d010 beq.n 8006aa8 <tcp_slowtmr+0x474>
LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs);
8006a86: 4b4f ldr r3, [pc, #316] ; (8006bc4 <tcp_slowtmr+0x590>)
8006a88: 681b ldr r3, [r3, #0]
8006a8a: 6afa ldr r2, [r7, #44] ; 0x2c
8006a8c: 429a cmp r2, r3
8006a8e: d106 bne.n 8006a9e <tcp_slowtmr+0x46a>
8006a90: 4b4d ldr r3, [pc, #308] ; (8006bc8 <tcp_slowtmr+0x594>)
8006a92: f240 526d movw r2, #1389 ; 0x56d
8006a96: 494d ldr r1, [pc, #308] ; (8006bcc <tcp_slowtmr+0x598>)
8006a98: 484d ldr r0, [pc, #308] ; (8006bd0 <tcp_slowtmr+0x59c>)
8006a9a: f009 fc99 bl 80103d0 <printf>
prev->next = pcb->next;
8006a9e: 6afb ldr r3, [r7, #44] ; 0x2c
8006aa0: 68da ldr r2, [r3, #12]
8006aa2: 6abb ldr r3, [r7, #40] ; 0x28
8006aa4: 60da str r2, [r3, #12]
8006aa6: e00f b.n 8006ac8 <tcp_slowtmr+0x494>
} else {
/* This PCB was the first. */
LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb);
8006aa8: 4b46 ldr r3, [pc, #280] ; (8006bc4 <tcp_slowtmr+0x590>)
8006aaa: 681b ldr r3, [r3, #0]
8006aac: 6afa ldr r2, [r7, #44] ; 0x2c
8006aae: 429a cmp r2, r3
8006ab0: d006 beq.n 8006ac0 <tcp_slowtmr+0x48c>
8006ab2: 4b45 ldr r3, [pc, #276] ; (8006bc8 <tcp_slowtmr+0x594>)
8006ab4: f240 5271 movw r2, #1393 ; 0x571
8006ab8: 4946 ldr r1, [pc, #280] ; (8006bd4 <tcp_slowtmr+0x5a0>)
8006aba: 4845 ldr r0, [pc, #276] ; (8006bd0 <tcp_slowtmr+0x59c>)
8006abc: f009 fc88 bl 80103d0 <printf>
tcp_active_pcbs = pcb->next;
8006ac0: 6afb ldr r3, [r7, #44] ; 0x2c
8006ac2: 68db ldr r3, [r3, #12]
8006ac4: 4a3f ldr r2, [pc, #252] ; (8006bc4 <tcp_slowtmr+0x590>)
8006ac6: 6013 str r3, [r2, #0]
}
if (pcb_reset) {
8006ac8: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
8006acc: 2b00 cmp r3, #0
8006ace: d013 beq.n 8006af8 <tcp_slowtmr+0x4c4>
tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip,
8006ad0: 6afb ldr r3, [r7, #44] ; 0x2c
8006ad2: 6d18 ldr r0, [r3, #80] ; 0x50
8006ad4: 6afb ldr r3, [r7, #44] ; 0x2c
8006ad6: 6a5c ldr r4, [r3, #36] ; 0x24
8006ad8: 6afd ldr r5, [r7, #44] ; 0x2c
8006ada: 6afb ldr r3, [r7, #44] ; 0x2c
8006adc: 3304 adds r3, #4
8006ade: 6afa ldr r2, [r7, #44] ; 0x2c
8006ae0: 8ad2 ldrh r2, [r2, #22]
8006ae2: 6af9 ldr r1, [r7, #44] ; 0x2c
8006ae4: 8b09 ldrh r1, [r1, #24]
8006ae6: 9102 str r1, [sp, #8]
8006ae8: 9201 str r2, [sp, #4]
8006aea: 9300 str r3, [sp, #0]
8006aec: 462b mov r3, r5
8006aee: 4622 mov r2, r4
8006af0: 4601 mov r1, r0
8006af2: 6af8 ldr r0, [r7, #44] ; 0x2c
8006af4: f004 f988 bl 800ae08 <tcp_rst>
pcb->local_port, pcb->remote_port);
}
err_arg = pcb->callback_arg;
8006af8: 6afb ldr r3, [r7, #44] ; 0x2c
8006afa: 691b ldr r3, [r3, #16]
8006afc: 60bb str r3, [r7, #8]
last_state = pcb->state;
8006afe: 6afb ldr r3, [r7, #44] ; 0x2c
8006b00: 7d1b ldrb r3, [r3, #20]
8006b02: 71fb strb r3, [r7, #7]
pcb2 = pcb;
8006b04: 6afb ldr r3, [r7, #44] ; 0x2c
8006b06: 603b str r3, [r7, #0]
pcb = pcb->next;
8006b08: 6afb ldr r3, [r7, #44] ; 0x2c
8006b0a: 68db ldr r3, [r3, #12]
8006b0c: 62fb str r3, [r7, #44] ; 0x2c
tcp_free(pcb2);
8006b0e: 6838 ldr r0, [r7, #0]
8006b10: f7ff f9f2 bl 8005ef8 <tcp_free>
tcp_active_pcbs_changed = 0;
8006b14: 4b30 ldr r3, [pc, #192] ; (8006bd8 <tcp_slowtmr+0x5a4>)
8006b16: 2200 movs r2, #0
8006b18: 701a strb r2, [r3, #0]
TCP_EVENT_ERR(last_state, err_fn, err_arg, ERR_ABRT);
8006b1a: 68fb ldr r3, [r7, #12]
8006b1c: 2b00 cmp r3, #0
8006b1e: d004 beq.n 8006b2a <tcp_slowtmr+0x4f6>
8006b20: 68fb ldr r3, [r7, #12]
8006b22: f06f 010c mvn.w r1, #12
8006b26: 68b8 ldr r0, [r7, #8]
8006b28: 4798 blx r3
if (tcp_active_pcbs_changed) {
8006b2a: 4b2b ldr r3, [pc, #172] ; (8006bd8 <tcp_slowtmr+0x5a4>)
8006b2c: 781b ldrb r3, [r3, #0]
8006b2e: 2b00 cmp r3, #0
8006b30: d037 beq.n 8006ba2 <tcp_slowtmr+0x56e>
goto tcp_slowtmr_start;
8006b32: e590 b.n 8006656 <tcp_slowtmr+0x22>
}
} else {
/* get the 'next' element now and work with 'prev' below (in case of abort) */
prev = pcb;
8006b34: 6afb ldr r3, [r7, #44] ; 0x2c
8006b36: 62bb str r3, [r7, #40] ; 0x28
pcb = pcb->next;
8006b38: 6afb ldr r3, [r7, #44] ; 0x2c
8006b3a: 68db ldr r3, [r3, #12]
8006b3c: 62fb str r3, [r7, #44] ; 0x2c
/* We check if we should poll the connection. */
++prev->polltmr;
8006b3e: 6abb ldr r3, [r7, #40] ; 0x28
8006b40: 7f1b ldrb r3, [r3, #28]
8006b42: 3301 adds r3, #1
8006b44: b2da uxtb r2, r3
8006b46: 6abb ldr r3, [r7, #40] ; 0x28
8006b48: 771a strb r2, [r3, #28]
if (prev->polltmr >= prev->pollinterval) {
8006b4a: 6abb ldr r3, [r7, #40] ; 0x28
8006b4c: 7f1a ldrb r2, [r3, #28]
8006b4e: 6abb ldr r3, [r7, #40] ; 0x28
8006b50: 7f5b ldrb r3, [r3, #29]
8006b52: 429a cmp r2, r3
8006b54: d325 bcc.n 8006ba2 <tcp_slowtmr+0x56e>
prev->polltmr = 0;
8006b56: 6abb ldr r3, [r7, #40] ; 0x28
8006b58: 2200 movs r2, #0
8006b5a: 771a strb r2, [r3, #28]
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n"));
tcp_active_pcbs_changed = 0;
8006b5c: 4b1e ldr r3, [pc, #120] ; (8006bd8 <tcp_slowtmr+0x5a4>)
8006b5e: 2200 movs r2, #0
8006b60: 701a strb r2, [r3, #0]
TCP_EVENT_POLL(prev, err);
8006b62: 6abb ldr r3, [r7, #40] ; 0x28
8006b64: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
8006b68: 2b00 cmp r3, #0
8006b6a: d00b beq.n 8006b84 <tcp_slowtmr+0x550>
8006b6c: 6abb ldr r3, [r7, #40] ; 0x28
8006b6e: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
8006b72: 6aba ldr r2, [r7, #40] ; 0x28
8006b74: 6912 ldr r2, [r2, #16]
8006b76: 6ab9 ldr r1, [r7, #40] ; 0x28
8006b78: 4610 mov r0, r2
8006b7a: 4798 blx r3
8006b7c: 4603 mov r3, r0
8006b7e: f887 3025 strb.w r3, [r7, #37] ; 0x25
8006b82: e002 b.n 8006b8a <tcp_slowtmr+0x556>
8006b84: 2300 movs r3, #0
8006b86: f887 3025 strb.w r3, [r7, #37] ; 0x25
if (tcp_active_pcbs_changed) {
8006b8a: 4b13 ldr r3, [pc, #76] ; (8006bd8 <tcp_slowtmr+0x5a4>)
8006b8c: 781b ldrb r3, [r3, #0]
8006b8e: 2b00 cmp r3, #0
8006b90: d000 beq.n 8006b94 <tcp_slowtmr+0x560>
goto tcp_slowtmr_start;
8006b92: e560 b.n 8006656 <tcp_slowtmr+0x22>
}
/* if err == ERR_ABRT, 'prev' is already deallocated */
if (err == ERR_OK) {
8006b94: f997 3025 ldrsb.w r3, [r7, #37] ; 0x25
8006b98: 2b00 cmp r3, #0
8006b9a: d102 bne.n 8006ba2 <tcp_slowtmr+0x56e>
tcp_output(prev);
8006b9c: 6ab8 ldr r0, [r7, #40] ; 0x28
8006b9e: f003 fb7f bl 800a2a0 <tcp_output>
while (pcb != NULL) {
8006ba2: 6afb ldr r3, [r7, #44] ; 0x2c
8006ba4: 2b00 cmp r3, #0
8006ba6: f47f ad5c bne.w 8006662 <tcp_slowtmr+0x2e>
}
}
/* Steps through all of the TIME-WAIT PCBs. */
prev = NULL;
8006baa: 2300 movs r3, #0
8006bac: 62bb str r3, [r7, #40] ; 0x28
pcb = tcp_tw_pcbs;
8006bae: 4b0b ldr r3, [pc, #44] ; (8006bdc <tcp_slowtmr+0x5a8>)
8006bb0: 681b ldr r3, [r3, #0]
8006bb2: 62fb str r3, [r7, #44] ; 0x2c
while (pcb != NULL) {
8006bb4: e067 b.n 8006c86 <tcp_slowtmr+0x652>
8006bb6: bf00 nop
8006bb8: 20008c00 .word 0x20008c00
8006bbc: 10624dd3 .word 0x10624dd3
8006bc0: 000124f8 .word 0x000124f8
8006bc4: 20008c0c .word 0x20008c0c
8006bc8: 080159bc .word 0x080159bc
8006bcc: 08015df4 .word 0x08015df4
8006bd0: 08015a00 .word 0x08015a00
8006bd4: 08015e20 .word 0x08015e20
8006bd8: 20008c14 .word 0x20008c14
8006bdc: 20008c10 .word 0x20008c10
LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
8006be0: 6afb ldr r3, [r7, #44] ; 0x2c
8006be2: 7d1b ldrb r3, [r3, #20]
8006be4: 2b0a cmp r3, #10
8006be6: d006 beq.n 8006bf6 <tcp_slowtmr+0x5c2>
8006be8: 4b2b ldr r3, [pc, #172] ; (8006c98 <tcp_slowtmr+0x664>)
8006bea: f240 52a1 movw r2, #1441 ; 0x5a1
8006bee: 492b ldr r1, [pc, #172] ; (8006c9c <tcp_slowtmr+0x668>)
8006bf0: 482b ldr r0, [pc, #172] ; (8006ca0 <tcp_slowtmr+0x66c>)
8006bf2: f009 fbed bl 80103d0 <printf>
pcb_remove = 0;
8006bf6: 2300 movs r3, #0
8006bf8: 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) {
8006bfc: 4b29 ldr r3, [pc, #164] ; (8006ca4 <tcp_slowtmr+0x670>)
8006bfe: 681a ldr r2, [r3, #0]
8006c00: 6afb ldr r3, [r7, #44] ; 0x2c
8006c02: 6a1b ldr r3, [r3, #32]
8006c04: 1ad3 subs r3, r2, r3
8006c06: 2bf0 cmp r3, #240 ; 0xf0
8006c08: d904 bls.n 8006c14 <tcp_slowtmr+0x5e0>
++pcb_remove;
8006c0a: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8006c0e: 3301 adds r3, #1
8006c10: f887 3027 strb.w r3, [r7, #39] ; 0x27
}
/* If the PCB should be removed, do it. */
if (pcb_remove) {
8006c14: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8006c18: 2b00 cmp r3, #0
8006c1a: d02f beq.n 8006c7c <tcp_slowtmr+0x648>
struct tcp_pcb *pcb2;
tcp_pcb_purge(pcb);
8006c1c: 6af8 ldr r0, [r7, #44] ; 0x2c
8006c1e: f000 fb2b bl 8007278 <tcp_pcb_purge>
/* Remove PCB from tcp_tw_pcbs list. */
if (prev != NULL) {
8006c22: 6abb ldr r3, [r7, #40] ; 0x28
8006c24: 2b00 cmp r3, #0
8006c26: d010 beq.n 8006c4a <tcp_slowtmr+0x616>
LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs);
8006c28: 4b1f ldr r3, [pc, #124] ; (8006ca8 <tcp_slowtmr+0x674>)
8006c2a: 681b ldr r3, [r3, #0]
8006c2c: 6afa ldr r2, [r7, #44] ; 0x2c
8006c2e: 429a cmp r2, r3
8006c30: d106 bne.n 8006c40 <tcp_slowtmr+0x60c>
8006c32: 4b19 ldr r3, [pc, #100] ; (8006c98 <tcp_slowtmr+0x664>)
8006c34: f240 52af movw r2, #1455 ; 0x5af
8006c38: 491c ldr r1, [pc, #112] ; (8006cac <tcp_slowtmr+0x678>)
8006c3a: 4819 ldr r0, [pc, #100] ; (8006ca0 <tcp_slowtmr+0x66c>)
8006c3c: f009 fbc8 bl 80103d0 <printf>
prev->next = pcb->next;
8006c40: 6afb ldr r3, [r7, #44] ; 0x2c
8006c42: 68da ldr r2, [r3, #12]
8006c44: 6abb ldr r3, [r7, #40] ; 0x28
8006c46: 60da str r2, [r3, #12]
8006c48: e00f b.n 8006c6a <tcp_slowtmr+0x636>
} else {
/* This PCB was the first. */
LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb);
8006c4a: 4b17 ldr r3, [pc, #92] ; (8006ca8 <tcp_slowtmr+0x674>)
8006c4c: 681b ldr r3, [r3, #0]
8006c4e: 6afa ldr r2, [r7, #44] ; 0x2c
8006c50: 429a cmp r2, r3
8006c52: d006 beq.n 8006c62 <tcp_slowtmr+0x62e>
8006c54: 4b10 ldr r3, [pc, #64] ; (8006c98 <tcp_slowtmr+0x664>)
8006c56: f240 52b3 movw r2, #1459 ; 0x5b3
8006c5a: 4915 ldr r1, [pc, #84] ; (8006cb0 <tcp_slowtmr+0x67c>)
8006c5c: 4810 ldr r0, [pc, #64] ; (8006ca0 <tcp_slowtmr+0x66c>)
8006c5e: f009 fbb7 bl 80103d0 <printf>
tcp_tw_pcbs = pcb->next;
8006c62: 6afb ldr r3, [r7, #44] ; 0x2c
8006c64: 68db ldr r3, [r3, #12]
8006c66: 4a10 ldr r2, [pc, #64] ; (8006ca8 <tcp_slowtmr+0x674>)
8006c68: 6013 str r3, [r2, #0]
}
pcb2 = pcb;
8006c6a: 6afb ldr r3, [r7, #44] ; 0x2c
8006c6c: 61fb str r3, [r7, #28]
pcb = pcb->next;
8006c6e: 6afb ldr r3, [r7, #44] ; 0x2c
8006c70: 68db ldr r3, [r3, #12]
8006c72: 62fb str r3, [r7, #44] ; 0x2c
tcp_free(pcb2);
8006c74: 69f8 ldr r0, [r7, #28]
8006c76: f7ff f93f bl 8005ef8 <tcp_free>
8006c7a: e004 b.n 8006c86 <tcp_slowtmr+0x652>
} else {
prev = pcb;
8006c7c: 6afb ldr r3, [r7, #44] ; 0x2c
8006c7e: 62bb str r3, [r7, #40] ; 0x28
pcb = pcb->next;
8006c80: 6afb ldr r3, [r7, #44] ; 0x2c
8006c82: 68db ldr r3, [r3, #12]
8006c84: 62fb str r3, [r7, #44] ; 0x2c
while (pcb != NULL) {
8006c86: 6afb ldr r3, [r7, #44] ; 0x2c
8006c88: 2b00 cmp r3, #0
8006c8a: d1a9 bne.n 8006be0 <tcp_slowtmr+0x5ac>
}
}
}
8006c8c: bf00 nop
8006c8e: bf00 nop
8006c90: 3730 adds r7, #48 ; 0x30
8006c92: 46bd mov sp, r7
8006c94: bdb0 pop {r4, r5, r7, pc}
8006c96: bf00 nop
8006c98: 080159bc .word 0x080159bc
8006c9c: 08015e4c .word 0x08015e4c
8006ca0: 08015a00 .word 0x08015a00
8006ca4: 20008c00 .word 0x20008c00
8006ca8: 20008c10 .word 0x20008c10
8006cac: 08015e7c .word 0x08015e7c
8006cb0: 08015ea4 .word 0x08015ea4
08006cb4 <tcp_fasttmr>:
*
* Automatically called from tcp_tmr().
*/
void
tcp_fasttmr(void)
{
8006cb4: b580 push {r7, lr}
8006cb6: b082 sub sp, #8
8006cb8: af00 add r7, sp, #0
struct tcp_pcb *pcb;
++tcp_timer_ctr;
8006cba: 4b2d ldr r3, [pc, #180] ; (8006d70 <tcp_fasttmr+0xbc>)
8006cbc: 781b ldrb r3, [r3, #0]
8006cbe: 3301 adds r3, #1
8006cc0: b2da uxtb r2, r3
8006cc2: 4b2b ldr r3, [pc, #172] ; (8006d70 <tcp_fasttmr+0xbc>)
8006cc4: 701a strb r2, [r3, #0]
tcp_fasttmr_start:
pcb = tcp_active_pcbs;
8006cc6: 4b2b ldr r3, [pc, #172] ; (8006d74 <tcp_fasttmr+0xc0>)
8006cc8: 681b ldr r3, [r3, #0]
8006cca: 607b str r3, [r7, #4]
while (pcb != NULL) {
8006ccc: e048 b.n 8006d60 <tcp_fasttmr+0xac>
if (pcb->last_timer != tcp_timer_ctr) {
8006cce: 687b ldr r3, [r7, #4]
8006cd0: 7f9a ldrb r2, [r3, #30]
8006cd2: 4b27 ldr r3, [pc, #156] ; (8006d70 <tcp_fasttmr+0xbc>)
8006cd4: 781b ldrb r3, [r3, #0]
8006cd6: 429a cmp r2, r3
8006cd8: d03f beq.n 8006d5a <tcp_fasttmr+0xa6>
struct tcp_pcb *next;
pcb->last_timer = tcp_timer_ctr;
8006cda: 4b25 ldr r3, [pc, #148] ; (8006d70 <tcp_fasttmr+0xbc>)
8006cdc: 781a ldrb r2, [r3, #0]
8006cde: 687b ldr r3, [r7, #4]
8006ce0: 779a strb r2, [r3, #30]
/* send delayed ACKs */
if (pcb->flags & TF_ACK_DELAY) {
8006ce2: 687b ldr r3, [r7, #4]
8006ce4: 8b5b ldrh r3, [r3, #26]
8006ce6: f003 0301 and.w r3, r3, #1
8006cea: 2b00 cmp r3, #0
8006cec: d010 beq.n 8006d10 <tcp_fasttmr+0x5c>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n"));
tcp_ack_now(pcb);
8006cee: 687b ldr r3, [r7, #4]
8006cf0: 8b5b ldrh r3, [r3, #26]
8006cf2: f043 0302 orr.w r3, r3, #2
8006cf6: b29a uxth r2, r3
8006cf8: 687b ldr r3, [r7, #4]
8006cfa: 835a strh r2, [r3, #26]
tcp_output(pcb);
8006cfc: 6878 ldr r0, [r7, #4]
8006cfe: f003 facf bl 800a2a0 <tcp_output>
tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
8006d02: 687b ldr r3, [r7, #4]
8006d04: 8b5b ldrh r3, [r3, #26]
8006d06: f023 0303 bic.w r3, r3, #3
8006d0a: b29a uxth r2, r3
8006d0c: 687b ldr r3, [r7, #4]
8006d0e: 835a strh r2, [r3, #26]
}
/* send pending FIN */
if (pcb->flags & TF_CLOSEPEND) {
8006d10: 687b ldr r3, [r7, #4]
8006d12: 8b5b ldrh r3, [r3, #26]
8006d14: f003 0308 and.w r3, r3, #8
8006d18: 2b00 cmp r3, #0
8006d1a: d009 beq.n 8006d30 <tcp_fasttmr+0x7c>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: pending FIN\n"));
tcp_clear_flags(pcb, TF_CLOSEPEND);
8006d1c: 687b ldr r3, [r7, #4]
8006d1e: 8b5b ldrh r3, [r3, #26]
8006d20: f023 0308 bic.w r3, r3, #8
8006d24: b29a uxth r2, r3
8006d26: 687b ldr r3, [r7, #4]
8006d28: 835a strh r2, [r3, #26]
tcp_close_shutdown_fin(pcb);
8006d2a: 6878 ldr r0, [r7, #4]
8006d2c: f7ff fa78 bl 8006220 <tcp_close_shutdown_fin>
}
next = pcb->next;
8006d30: 687b ldr r3, [r7, #4]
8006d32: 68db ldr r3, [r3, #12]
8006d34: 603b str r3, [r7, #0]
/* If there is data which was previously "refused" by upper layer */
if (pcb->refused_data != NULL) {
8006d36: 687b ldr r3, [r7, #4]
8006d38: 6f9b ldr r3, [r3, #120] ; 0x78
8006d3a: 2b00 cmp r3, #0
8006d3c: d00a beq.n 8006d54 <tcp_fasttmr+0xa0>
tcp_active_pcbs_changed = 0;
8006d3e: 4b0e ldr r3, [pc, #56] ; (8006d78 <tcp_fasttmr+0xc4>)
8006d40: 2200 movs r2, #0
8006d42: 701a strb r2, [r3, #0]
tcp_process_refused_data(pcb);
8006d44: 6878 ldr r0, [r7, #4]
8006d46: f000 f819 bl 8006d7c <tcp_process_refused_data>
if (tcp_active_pcbs_changed) {
8006d4a: 4b0b ldr r3, [pc, #44] ; (8006d78 <tcp_fasttmr+0xc4>)
8006d4c: 781b ldrb r3, [r3, #0]
8006d4e: 2b00 cmp r3, #0
8006d50: d000 beq.n 8006d54 <tcp_fasttmr+0xa0>
/* application callback has changed the pcb list: restart the loop */
goto tcp_fasttmr_start;
8006d52: e7b8 b.n 8006cc6 <tcp_fasttmr+0x12>
}
}
pcb = next;
8006d54: 683b ldr r3, [r7, #0]
8006d56: 607b str r3, [r7, #4]
8006d58: e002 b.n 8006d60 <tcp_fasttmr+0xac>
} else {
pcb = pcb->next;
8006d5a: 687b ldr r3, [r7, #4]
8006d5c: 68db ldr r3, [r3, #12]
8006d5e: 607b str r3, [r7, #4]
while (pcb != NULL) {
8006d60: 687b ldr r3, [r7, #4]
8006d62: 2b00 cmp r3, #0
8006d64: d1b3 bne.n 8006cce <tcp_fasttmr+0x1a>
}
}
}
8006d66: bf00 nop
8006d68: bf00 nop
8006d6a: 3708 adds r7, #8
8006d6c: 46bd mov sp, r7
8006d6e: bd80 pop {r7, pc}
8006d70: 20008c16 .word 0x20008c16
8006d74: 20008c0c .word 0x20008c0c
8006d78: 20008c14 .word 0x20008c14
08006d7c <tcp_process_refused_data>:
}
/** Pass pcb->refused_data to the recv callback */
err_t
tcp_process_refused_data(struct tcp_pcb *pcb)
{
8006d7c: b590 push {r4, r7, lr}
8006d7e: b085 sub sp, #20
8006d80: af00 add r7, sp, #0
8006d82: 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);
8006d84: 687b ldr r3, [r7, #4]
8006d86: 2b00 cmp r3, #0
8006d88: d109 bne.n 8006d9e <tcp_process_refused_data+0x22>
8006d8a: 4b37 ldr r3, [pc, #220] ; (8006e68 <tcp_process_refused_data+0xec>)
8006d8c: f240 6209 movw r2, #1545 ; 0x609
8006d90: 4936 ldr r1, [pc, #216] ; (8006e6c <tcp_process_refused_data+0xf0>)
8006d92: 4837 ldr r0, [pc, #220] ; (8006e70 <tcp_process_refused_data+0xf4>)
8006d94: f009 fb1c bl 80103d0 <printf>
8006d98: f06f 030f mvn.w r3, #15
8006d9c: e060 b.n 8006e60 <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;
8006d9e: 687b ldr r3, [r7, #4]
8006da0: 6f9b ldr r3, [r3, #120] ; 0x78
8006da2: 7b5b ldrb r3, [r3, #13]
8006da4: 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;
8006da6: 687b ldr r3, [r7, #4]
8006da8: 6f9b ldr r3, [r3, #120] ; 0x78
8006daa: 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;
8006dac: 687b ldr r3, [r7, #4]
8006dae: 2200 movs r2, #0
8006db0: 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);
8006db2: 687b ldr r3, [r7, #4]
8006db4: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8006db8: 2b00 cmp r3, #0
8006dba: d00b beq.n 8006dd4 <tcp_process_refused_data+0x58>
8006dbc: 687b ldr r3, [r7, #4]
8006dbe: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
8006dc2: 687b ldr r3, [r7, #4]
8006dc4: 6918 ldr r0, [r3, #16]
8006dc6: 2300 movs r3, #0
8006dc8: 68ba ldr r2, [r7, #8]
8006dca: 6879 ldr r1, [r7, #4]
8006dcc: 47a0 blx r4
8006dce: 4603 mov r3, r0
8006dd0: 73fb strb r3, [r7, #15]
8006dd2: e007 b.n 8006de4 <tcp_process_refused_data+0x68>
8006dd4: 2300 movs r3, #0
8006dd6: 68ba ldr r2, [r7, #8]
8006dd8: 6879 ldr r1, [r7, #4]
8006dda: 2000 movs r0, #0
8006ddc: f000 f8a4 bl 8006f28 <tcp_recv_null>
8006de0: 4603 mov r3, r0
8006de2: 73fb strb r3, [r7, #15]
if (err == ERR_OK) {
8006de4: f997 300f ldrsb.w r3, [r7, #15]
8006de8: 2b00 cmp r3, #0
8006dea: d12a bne.n 8006e42 <tcp_process_refused_data+0xc6>
/* did refused_data include a FIN? */
if ((refused_flags & PBUF_FLAG_TCP_FIN)
8006dec: 7bbb ldrb r3, [r7, #14]
8006dee: f003 0320 and.w r3, r3, #32
8006df2: 2b00 cmp r3, #0
8006df4: d033 beq.n 8006e5e <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)) {
8006df6: 687b ldr r3, [r7, #4]
8006df8: 8d1b ldrh r3, [r3, #40] ; 0x28
8006dfa: f5b3 6f06 cmp.w r3, #2144 ; 0x860
8006dfe: d005 beq.n 8006e0c <tcp_process_refused_data+0x90>
pcb->rcv_wnd++;
8006e00: 687b ldr r3, [r7, #4]
8006e02: 8d1b ldrh r3, [r3, #40] ; 0x28
8006e04: 3301 adds r3, #1
8006e06: b29a uxth r2, r3
8006e08: 687b ldr r3, [r7, #4]
8006e0a: 851a strh r2, [r3, #40] ; 0x28
}
TCP_EVENT_CLOSED(pcb, err);
8006e0c: 687b ldr r3, [r7, #4]
8006e0e: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8006e12: 2b00 cmp r3, #0
8006e14: d00b beq.n 8006e2e <tcp_process_refused_data+0xb2>
8006e16: 687b ldr r3, [r7, #4]
8006e18: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
8006e1c: 687b ldr r3, [r7, #4]
8006e1e: 6918 ldr r0, [r3, #16]
8006e20: 2300 movs r3, #0
8006e22: 2200 movs r2, #0
8006e24: 6879 ldr r1, [r7, #4]
8006e26: 47a0 blx r4
8006e28: 4603 mov r3, r0
8006e2a: 73fb strb r3, [r7, #15]
8006e2c: e001 b.n 8006e32 <tcp_process_refused_data+0xb6>
8006e2e: 2300 movs r3, #0
8006e30: 73fb strb r3, [r7, #15]
if (err == ERR_ABRT) {
8006e32: f997 300f ldrsb.w r3, [r7, #15]
8006e36: f113 0f0d cmn.w r3, #13
8006e3a: d110 bne.n 8006e5e <tcp_process_refused_data+0xe2>
return ERR_ABRT;
8006e3c: f06f 030c mvn.w r3, #12
8006e40: e00e b.n 8006e60 <tcp_process_refused_data+0xe4>
}
}
} else if (err == ERR_ABRT) {
8006e42: f997 300f ldrsb.w r3, [r7, #15]
8006e46: f113 0f0d cmn.w r3, #13
8006e4a: d102 bne.n 8006e52 <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;
8006e4c: f06f 030c mvn.w r3, #12
8006e50: e006 b.n 8006e60 <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;
8006e52: 687b ldr r3, [r7, #4]
8006e54: 68ba ldr r2, [r7, #8]
8006e56: 679a str r2, [r3, #120] ; 0x78
return ERR_INPROGRESS;
8006e58: f06f 0304 mvn.w r3, #4
8006e5c: e000 b.n 8006e60 <tcp_process_refused_data+0xe4>
}
}
return ERR_OK;
8006e5e: 2300 movs r3, #0
}
8006e60: 4618 mov r0, r3
8006e62: 3714 adds r7, #20
8006e64: 46bd mov sp, r7
8006e66: bd90 pop {r4, r7, pc}
8006e68: 080159bc .word 0x080159bc
8006e6c: 08015ecc .word 0x08015ecc
8006e70: 08015a00 .word 0x08015a00
08006e74 <tcp_segs_free>:
*
* @param seg tcp_seg list of TCP segments to free
*/
void
tcp_segs_free(struct tcp_seg *seg)
{
8006e74: b580 push {r7, lr}
8006e76: b084 sub sp, #16
8006e78: af00 add r7, sp, #0
8006e7a: 6078 str r0, [r7, #4]
while (seg != NULL) {
8006e7c: e007 b.n 8006e8e <tcp_segs_free+0x1a>
struct tcp_seg *next = seg->next;
8006e7e: 687b ldr r3, [r7, #4]
8006e80: 681b ldr r3, [r3, #0]
8006e82: 60fb str r3, [r7, #12]
tcp_seg_free(seg);
8006e84: 6878 ldr r0, [r7, #4]
8006e86: f000 f80a bl 8006e9e <tcp_seg_free>
seg = next;
8006e8a: 68fb ldr r3, [r7, #12]
8006e8c: 607b str r3, [r7, #4]
while (seg != NULL) {
8006e8e: 687b ldr r3, [r7, #4]
8006e90: 2b00 cmp r3, #0
8006e92: d1f4 bne.n 8006e7e <tcp_segs_free+0xa>
}
}
8006e94: bf00 nop
8006e96: bf00 nop
8006e98: 3710 adds r7, #16
8006e9a: 46bd mov sp, r7
8006e9c: bd80 pop {r7, pc}
08006e9e <tcp_seg_free>:
*
* @param seg single tcp_seg to free
*/
void
tcp_seg_free(struct tcp_seg *seg)
{
8006e9e: b580 push {r7, lr}
8006ea0: b082 sub sp, #8
8006ea2: af00 add r7, sp, #0
8006ea4: 6078 str r0, [r7, #4]
if (seg != NULL) {
8006ea6: 687b ldr r3, [r7, #4]
8006ea8: 2b00 cmp r3, #0
8006eaa: d00c beq.n 8006ec6 <tcp_seg_free+0x28>
if (seg->p != NULL) {
8006eac: 687b ldr r3, [r7, #4]
8006eae: 685b ldr r3, [r3, #4]
8006eb0: 2b00 cmp r3, #0
8006eb2: d004 beq.n 8006ebe <tcp_seg_free+0x20>
pbuf_free(seg->p);
8006eb4: 687b ldr r3, [r7, #4]
8006eb6: 685b ldr r3, [r3, #4]
8006eb8: 4618 mov r0, r3
8006eba: f7fe fd6d bl 8005998 <pbuf_free>
#if TCP_DEBUG
seg->p = NULL;
#endif /* TCP_DEBUG */
}
memp_free(MEMP_TCP_SEG, seg);
8006ebe: 6879 ldr r1, [r7, #4]
8006ec0: 2003 movs r0, #3
8006ec2: f7fd fee7 bl 8004c94 <memp_free>
}
}
8006ec6: bf00 nop
8006ec8: 3708 adds r7, #8
8006eca: 46bd mov sp, r7
8006ecc: bd80 pop {r7, pc}
...
08006ed0 <tcp_seg_copy>:
* @param seg the old tcp_seg
* @return a copy of seg
*/
struct tcp_seg *
tcp_seg_copy(struct tcp_seg *seg)
{
8006ed0: b580 push {r7, lr}
8006ed2: b084 sub sp, #16
8006ed4: af00 add r7, sp, #0
8006ed6: 6078 str r0, [r7, #4]
struct tcp_seg *cseg;
LWIP_ASSERT("tcp_seg_copy: invalid seg", seg != NULL);
8006ed8: 687b ldr r3, [r7, #4]
8006eda: 2b00 cmp r3, #0
8006edc: d106 bne.n 8006eec <tcp_seg_copy+0x1c>
8006ede: 4b0f ldr r3, [pc, #60] ; (8006f1c <tcp_seg_copy+0x4c>)
8006ee0: f240 6282 movw r2, #1666 ; 0x682
8006ee4: 490e ldr r1, [pc, #56] ; (8006f20 <tcp_seg_copy+0x50>)
8006ee6: 480f ldr r0, [pc, #60] ; (8006f24 <tcp_seg_copy+0x54>)
8006ee8: f009 fa72 bl 80103d0 <printf>
cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG);
8006eec: 2003 movs r0, #3
8006eee: f7fd fe61 bl 8004bb4 <memp_malloc>
8006ef2: 60f8 str r0, [r7, #12]
if (cseg == NULL) {
8006ef4: 68fb ldr r3, [r7, #12]
8006ef6: 2b00 cmp r3, #0
8006ef8: d101 bne.n 8006efe <tcp_seg_copy+0x2e>
return NULL;
8006efa: 2300 movs r3, #0
8006efc: e00a b.n 8006f14 <tcp_seg_copy+0x44>
}
SMEMCPY((u8_t *)cseg, (const u8_t *)seg, sizeof(struct tcp_seg));
8006efe: 2210 movs r2, #16
8006f00: 6879 ldr r1, [r7, #4]
8006f02: 68f8 ldr r0, [r7, #12]
8006f04: f009 fa34 bl 8010370 <memcpy>
pbuf_ref(cseg->p);
8006f08: 68fb ldr r3, [r7, #12]
8006f0a: 685b ldr r3, [r3, #4]
8006f0c: 4618 mov r0, r3
8006f0e: f7fe fde3 bl 8005ad8 <pbuf_ref>
return cseg;
8006f12: 68fb ldr r3, [r7, #12]
}
8006f14: 4618 mov r0, r3
8006f16: 3710 adds r7, #16
8006f18: 46bd mov sp, r7
8006f1a: bd80 pop {r7, pc}
8006f1c: 080159bc .word 0x080159bc
8006f20: 08015f10 .word 0x08015f10
8006f24: 08015a00 .word 0x08015a00
08006f28 <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)
{
8006f28: b580 push {r7, lr}
8006f2a: b084 sub sp, #16
8006f2c: af00 add r7, sp, #0
8006f2e: 60f8 str r0, [r7, #12]
8006f30: 60b9 str r1, [r7, #8]
8006f32: 607a str r2, [r7, #4]
8006f34: 70fb strb r3, [r7, #3]
LWIP_UNUSED_ARG(arg);
LWIP_ERROR("tcp_recv_null: invalid pcb", pcb != NULL, return ERR_ARG);
8006f36: 68bb ldr r3, [r7, #8]
8006f38: 2b00 cmp r3, #0
8006f3a: d109 bne.n 8006f50 <tcp_recv_null+0x28>
8006f3c: 4b12 ldr r3, [pc, #72] ; (8006f88 <tcp_recv_null+0x60>)
8006f3e: f44f 62d3 mov.w r2, #1688 ; 0x698
8006f42: 4912 ldr r1, [pc, #72] ; (8006f8c <tcp_recv_null+0x64>)
8006f44: 4812 ldr r0, [pc, #72] ; (8006f90 <tcp_recv_null+0x68>)
8006f46: f009 fa43 bl 80103d0 <printf>
8006f4a: f06f 030f mvn.w r3, #15
8006f4e: e016 b.n 8006f7e <tcp_recv_null+0x56>
if (p != NULL) {
8006f50: 687b ldr r3, [r7, #4]
8006f52: 2b00 cmp r3, #0
8006f54: d009 beq.n 8006f6a <tcp_recv_null+0x42>
tcp_recved(pcb, p->tot_len);
8006f56: 687b ldr r3, [r7, #4]
8006f58: 891b ldrh r3, [r3, #8]
8006f5a: 4619 mov r1, r3
8006f5c: 68b8 ldr r0, [r7, #8]
8006f5e: f7ff fb19 bl 8006594 <tcp_recved>
pbuf_free(p);
8006f62: 6878 ldr r0, [r7, #4]
8006f64: f7fe fd18 bl 8005998 <pbuf_free>
8006f68: e008 b.n 8006f7c <tcp_recv_null+0x54>
} else if (err == ERR_OK) {
8006f6a: f997 3003 ldrsb.w r3, [r7, #3]
8006f6e: 2b00 cmp r3, #0
8006f70: d104 bne.n 8006f7c <tcp_recv_null+0x54>
return tcp_close(pcb);
8006f72: 68b8 ldr r0, [r7, #8]
8006f74: f7ff f9be bl 80062f4 <tcp_close>
8006f78: 4603 mov r3, r0
8006f7a: e000 b.n 8006f7e <tcp_recv_null+0x56>
}
return ERR_OK;
8006f7c: 2300 movs r3, #0
}
8006f7e: 4618 mov r0, r3
8006f80: 3710 adds r7, #16
8006f82: 46bd mov sp, r7
8006f84: bd80 pop {r7, pc}
8006f86: bf00 nop
8006f88: 080159bc .word 0x080159bc
8006f8c: 08015f2c .word 0x08015f2c
8006f90: 08015a00 .word 0x08015a00
08006f94 <tcp_kill_prio>:
*
* @param prio minimum priority
*/
static void
tcp_kill_prio(u8_t prio)
{
8006f94: b580 push {r7, lr}
8006f96: b086 sub sp, #24
8006f98: af00 add r7, sp, #0
8006f9a: 4603 mov r3, r0
8006f9c: 71fb strb r3, [r7, #7]
struct tcp_pcb *pcb, *inactive;
u32_t inactivity;
u8_t mprio;
mprio = LWIP_MIN(TCP_PRIO_MAX, prio);
8006f9e: f997 3007 ldrsb.w r3, [r7, #7]
8006fa2: 2b00 cmp r3, #0
8006fa4: db01 blt.n 8006faa <tcp_kill_prio+0x16>
8006fa6: 79fb ldrb r3, [r7, #7]
8006fa8: e000 b.n 8006fac <tcp_kill_prio+0x18>
8006faa: 237f movs r3, #127 ; 0x7f
8006fac: 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) {
8006fae: 7afb ldrb r3, [r7, #11]
8006fb0: 2b00 cmp r3, #0
8006fb2: d034 beq.n 800701e <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--;
8006fb4: 7afb ldrb r3, [r7, #11]
8006fb6: 3b01 subs r3, #1
8006fb8: 72fb strb r3, [r7, #11]
inactivity = 0;
8006fba: 2300 movs r3, #0
8006fbc: 60fb str r3, [r7, #12]
inactive = NULL;
8006fbe: 2300 movs r3, #0
8006fc0: 613b str r3, [r7, #16]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
8006fc2: 4b19 ldr r3, [pc, #100] ; (8007028 <tcp_kill_prio+0x94>)
8006fc4: 681b ldr r3, [r3, #0]
8006fc6: 617b str r3, [r7, #20]
8006fc8: e01f b.n 800700a <tcp_kill_prio+0x76>
/* lower prio is always a kill candidate */
if ((pcb->prio < mprio) ||
8006fca: 697b ldr r3, [r7, #20]
8006fcc: 7d5b ldrb r3, [r3, #21]
8006fce: 7afa ldrb r2, [r7, #11]
8006fd0: 429a cmp r2, r3
8006fd2: d80c bhi.n 8006fee <tcp_kill_prio+0x5a>
/* longer inactivity is also a kill candidate */
((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) {
8006fd4: 697b ldr r3, [r7, #20]
8006fd6: 7d5b ldrb r3, [r3, #21]
if ((pcb->prio < mprio) ||
8006fd8: 7afa ldrb r2, [r7, #11]
8006fda: 429a cmp r2, r3
8006fdc: d112 bne.n 8007004 <tcp_kill_prio+0x70>
((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) {
8006fde: 4b13 ldr r3, [pc, #76] ; (800702c <tcp_kill_prio+0x98>)
8006fe0: 681a ldr r2, [r3, #0]
8006fe2: 697b ldr r3, [r7, #20]
8006fe4: 6a1b ldr r3, [r3, #32]
8006fe6: 1ad3 subs r3, r2, r3
8006fe8: 68fa ldr r2, [r7, #12]
8006fea: 429a cmp r2, r3
8006fec: d80a bhi.n 8007004 <tcp_kill_prio+0x70>
inactivity = tcp_ticks - pcb->tmr;
8006fee: 4b0f ldr r3, [pc, #60] ; (800702c <tcp_kill_prio+0x98>)
8006ff0: 681a ldr r2, [r3, #0]
8006ff2: 697b ldr r3, [r7, #20]
8006ff4: 6a1b ldr r3, [r3, #32]
8006ff6: 1ad3 subs r3, r2, r3
8006ff8: 60fb str r3, [r7, #12]
inactive = pcb;
8006ffa: 697b ldr r3, [r7, #20]
8006ffc: 613b str r3, [r7, #16]
mprio = pcb->prio;
8006ffe: 697b ldr r3, [r7, #20]
8007000: 7d5b ldrb r3, [r3, #21]
8007002: 72fb strb r3, [r7, #11]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
8007004: 697b ldr r3, [r7, #20]
8007006: 68db ldr r3, [r3, #12]
8007008: 617b str r3, [r7, #20]
800700a: 697b ldr r3, [r7, #20]
800700c: 2b00 cmp r3, #0
800700e: d1dc bne.n 8006fca <tcp_kill_prio+0x36>
}
}
if (inactive != NULL) {
8007010: 693b ldr r3, [r7, #16]
8007012: 2b00 cmp r3, #0
8007014: d004 beq.n 8007020 <tcp_kill_prio+0x8c>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n",
(void *)inactive, inactivity));
tcp_abort(inactive);
8007016: 6938 ldr r0, [r7, #16]
8007018: f7ff fa56 bl 80064c8 <tcp_abort>
800701c: e000 b.n 8007020 <tcp_kill_prio+0x8c>
return;
800701e: bf00 nop
}
}
8007020: 3718 adds r7, #24
8007022: 46bd mov sp, r7
8007024: bd80 pop {r7, pc}
8007026: bf00 nop
8007028: 20008c0c .word 0x20008c0c
800702c: 20008c00 .word 0x20008c00
08007030 <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)
{
8007030: b580 push {r7, lr}
8007032: b086 sub sp, #24
8007034: af00 add r7, sp, #0
8007036: 4603 mov r3, r0
8007038: 71fb strb r3, [r7, #7]
struct tcp_pcb *pcb, *inactive;
u32_t inactivity;
LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK));
800703a: 79fb ldrb r3, [r7, #7]
800703c: 2b08 cmp r3, #8
800703e: d009 beq.n 8007054 <tcp_kill_state+0x24>
8007040: 79fb ldrb r3, [r7, #7]
8007042: 2b09 cmp r3, #9
8007044: d006 beq.n 8007054 <tcp_kill_state+0x24>
8007046: 4b1a ldr r3, [pc, #104] ; (80070b0 <tcp_kill_state+0x80>)
8007048: f240 62dd movw r2, #1757 ; 0x6dd
800704c: 4919 ldr r1, [pc, #100] ; (80070b4 <tcp_kill_state+0x84>)
800704e: 481a ldr r0, [pc, #104] ; (80070b8 <tcp_kill_state+0x88>)
8007050: f009 f9be bl 80103d0 <printf>
inactivity = 0;
8007054: 2300 movs r3, #0
8007056: 60fb str r3, [r7, #12]
inactive = NULL;
8007058: 2300 movs r3, #0
800705a: 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) {
800705c: 4b17 ldr r3, [pc, #92] ; (80070bc <tcp_kill_state+0x8c>)
800705e: 681b ldr r3, [r3, #0]
8007060: 617b str r3, [r7, #20]
8007062: e017 b.n 8007094 <tcp_kill_state+0x64>
if (pcb->state == state) {
8007064: 697b ldr r3, [r7, #20]
8007066: 7d1b ldrb r3, [r3, #20]
8007068: 79fa ldrb r2, [r7, #7]
800706a: 429a cmp r2, r3
800706c: d10f bne.n 800708e <tcp_kill_state+0x5e>
if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) {
800706e: 4b14 ldr r3, [pc, #80] ; (80070c0 <tcp_kill_state+0x90>)
8007070: 681a ldr r2, [r3, #0]
8007072: 697b ldr r3, [r7, #20]
8007074: 6a1b ldr r3, [r3, #32]
8007076: 1ad3 subs r3, r2, r3
8007078: 68fa ldr r2, [r7, #12]
800707a: 429a cmp r2, r3
800707c: d807 bhi.n 800708e <tcp_kill_state+0x5e>
inactivity = tcp_ticks - pcb->tmr;
800707e: 4b10 ldr r3, [pc, #64] ; (80070c0 <tcp_kill_state+0x90>)
8007080: 681a ldr r2, [r3, #0]
8007082: 697b ldr r3, [r7, #20]
8007084: 6a1b ldr r3, [r3, #32]
8007086: 1ad3 subs r3, r2, r3
8007088: 60fb str r3, [r7, #12]
inactive = pcb;
800708a: 697b ldr r3, [r7, #20]
800708c: 613b str r3, [r7, #16]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
800708e: 697b ldr r3, [r7, #20]
8007090: 68db ldr r3, [r3, #12]
8007092: 617b str r3, [r7, #20]
8007094: 697b ldr r3, [r7, #20]
8007096: 2b00 cmp r3, #0
8007098: d1e4 bne.n 8007064 <tcp_kill_state+0x34>
}
}
}
if (inactive != NULL) {
800709a: 693b ldr r3, [r7, #16]
800709c: 2b00 cmp r3, #0
800709e: d003 beq.n 80070a8 <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);
80070a0: 2100 movs r1, #0
80070a2: 6938 ldr r0, [r7, #16]
80070a4: f7ff f952 bl 800634c <tcp_abandon>
}
}
80070a8: bf00 nop
80070aa: 3718 adds r7, #24
80070ac: 46bd mov sp, r7
80070ae: bd80 pop {r7, pc}
80070b0: 080159bc .word 0x080159bc
80070b4: 08015f48 .word 0x08015f48
80070b8: 08015a00 .word 0x08015a00
80070bc: 20008c0c .word 0x20008c0c
80070c0: 20008c00 .word 0x20008c00
080070c4 <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)
{
80070c4: b580 push {r7, lr}
80070c6: b084 sub sp, #16
80070c8: af00 add r7, sp, #0
struct tcp_pcb *pcb, *inactive;
u32_t inactivity;
inactivity = 0;
80070ca: 2300 movs r3, #0
80070cc: 607b str r3, [r7, #4]
inactive = NULL;
80070ce: 2300 movs r3, #0
80070d0: 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) {
80070d2: 4b12 ldr r3, [pc, #72] ; (800711c <tcp_kill_timewait+0x58>)
80070d4: 681b ldr r3, [r3, #0]
80070d6: 60fb str r3, [r7, #12]
80070d8: e012 b.n 8007100 <tcp_kill_timewait+0x3c>
if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) {
80070da: 4b11 ldr r3, [pc, #68] ; (8007120 <tcp_kill_timewait+0x5c>)
80070dc: 681a ldr r2, [r3, #0]
80070de: 68fb ldr r3, [r7, #12]
80070e0: 6a1b ldr r3, [r3, #32]
80070e2: 1ad3 subs r3, r2, r3
80070e4: 687a ldr r2, [r7, #4]
80070e6: 429a cmp r2, r3
80070e8: d807 bhi.n 80070fa <tcp_kill_timewait+0x36>
inactivity = tcp_ticks - pcb->tmr;
80070ea: 4b0d ldr r3, [pc, #52] ; (8007120 <tcp_kill_timewait+0x5c>)
80070ec: 681a ldr r2, [r3, #0]
80070ee: 68fb ldr r3, [r7, #12]
80070f0: 6a1b ldr r3, [r3, #32]
80070f2: 1ad3 subs r3, r2, r3
80070f4: 607b str r3, [r7, #4]
inactive = pcb;
80070f6: 68fb ldr r3, [r7, #12]
80070f8: 60bb str r3, [r7, #8]
for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
80070fa: 68fb ldr r3, [r7, #12]
80070fc: 68db ldr r3, [r3, #12]
80070fe: 60fb str r3, [r7, #12]
8007100: 68fb ldr r3, [r7, #12]
8007102: 2b00 cmp r3, #0
8007104: d1e9 bne.n 80070da <tcp_kill_timewait+0x16>
}
}
if (inactive != NULL) {
8007106: 68bb ldr r3, [r7, #8]
8007108: 2b00 cmp r3, #0
800710a: d002 beq.n 8007112 <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);
800710c: 68b8 ldr r0, [r7, #8]
800710e: f7ff f9db bl 80064c8 <tcp_abort>
}
}
8007112: bf00 nop
8007114: 3710 adds r7, #16
8007116: 46bd mov sp, r7
8007118: bd80 pop {r7, pc}
800711a: bf00 nop
800711c: 20008c10 .word 0x20008c10
8007120: 20008c00 .word 0x20008c00
08007124 <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)
{
8007124: b580 push {r7, lr}
8007126: b082 sub sp, #8
8007128: af00 add r7, sp, #0
struct tcp_pcb *pcb = tcp_active_pcbs;
800712a: 4b10 ldr r3, [pc, #64] ; (800716c <tcp_handle_closepend+0x48>)
800712c: 681b ldr r3, [r3, #0]
800712e: 607b str r3, [r7, #4]
while (pcb != NULL) {
8007130: e014 b.n 800715c <tcp_handle_closepend+0x38>
struct tcp_pcb *next = pcb->next;
8007132: 687b ldr r3, [r7, #4]
8007134: 68db ldr r3, [r3, #12]
8007136: 603b str r3, [r7, #0]
/* send pending FIN */
if (pcb->flags & TF_CLOSEPEND) {
8007138: 687b ldr r3, [r7, #4]
800713a: 8b5b ldrh r3, [r3, #26]
800713c: f003 0308 and.w r3, r3, #8
8007140: 2b00 cmp r3, #0
8007142: d009 beq.n 8007158 <tcp_handle_closepend+0x34>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_handle_closepend: pending FIN\n"));
tcp_clear_flags(pcb, TF_CLOSEPEND);
8007144: 687b ldr r3, [r7, #4]
8007146: 8b5b ldrh r3, [r3, #26]
8007148: f023 0308 bic.w r3, r3, #8
800714c: b29a uxth r2, r3
800714e: 687b ldr r3, [r7, #4]
8007150: 835a strh r2, [r3, #26]
tcp_close_shutdown_fin(pcb);
8007152: 6878 ldr r0, [r7, #4]
8007154: f7ff f864 bl 8006220 <tcp_close_shutdown_fin>
}
pcb = next;
8007158: 683b ldr r3, [r7, #0]
800715a: 607b str r3, [r7, #4]
while (pcb != NULL) {
800715c: 687b ldr r3, [r7, #4]
800715e: 2b00 cmp r3, #0
8007160: d1e7 bne.n 8007132 <tcp_handle_closepend+0xe>
}
}
8007162: bf00 nop
8007164: bf00 nop
8007166: 3708 adds r7, #8
8007168: 46bd mov sp, r7
800716a: bd80 pop {r7, pc}
800716c: 20008c0c .word 0x20008c0c
08007170 <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)
{
8007170: b580 push {r7, lr}
8007172: b084 sub sp, #16
8007174: af00 add r7, sp, #0
8007176: 4603 mov r3, r0
8007178: 71fb strb r3, [r7, #7]
struct tcp_pcb *pcb;
LWIP_ASSERT_CORE_LOCKED();
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
800717a: 2001 movs r0, #1
800717c: f7fd fd1a bl 8004bb4 <memp_malloc>
8007180: 60f8 str r0, [r7, #12]
if (pcb == NULL) {
8007182: 68fb ldr r3, [r7, #12]
8007184: 2b00 cmp r3, #0
8007186: d126 bne.n 80071d6 <tcp_alloc+0x66>
/* Try to send FIN for all pcbs stuck in TF_CLOSEPEND first */
tcp_handle_closepend();
8007188: f7ff ffcc bl 8007124 <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();
800718c: f7ff ff9a bl 80070c4 <tcp_kill_timewait>
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
8007190: 2001 movs r0, #1
8007192: f7fd fd0f bl 8004bb4 <memp_malloc>
8007196: 60f8 str r0, [r7, #12]
if (pcb == NULL) {
8007198: 68fb ldr r3, [r7, #12]
800719a: 2b00 cmp r3, #0
800719c: d11b bne.n 80071d6 <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);
800719e: 2009 movs r0, #9
80071a0: f7ff ff46 bl 8007030 <tcp_kill_state>
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
80071a4: 2001 movs r0, #1
80071a6: f7fd fd05 bl 8004bb4 <memp_malloc>
80071aa: 60f8 str r0, [r7, #12]
if (pcb == NULL) {
80071ac: 68fb ldr r3, [r7, #12]
80071ae: 2b00 cmp r3, #0
80071b0: d111 bne.n 80071d6 <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);
80071b2: 2008 movs r0, #8
80071b4: f7ff ff3c bl 8007030 <tcp_kill_state>
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
80071b8: 2001 movs r0, #1
80071ba: f7fd fcfb bl 8004bb4 <memp_malloc>
80071be: 60f8 str r0, [r7, #12]
if (pcb == NULL) {
80071c0: 68fb ldr r3, [r7, #12]
80071c2: 2b00 cmp r3, #0
80071c4: d107 bne.n 80071d6 <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);
80071c6: 79fb ldrb r3, [r7, #7]
80071c8: 4618 mov r0, r3
80071ca: f7ff fee3 bl 8006f94 <tcp_kill_prio>
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
80071ce: 2001 movs r0, #1
80071d0: f7fd fcf0 bl 8004bb4 <memp_malloc>
80071d4: 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) {
80071d6: 68fb ldr r3, [r7, #12]
80071d8: 2b00 cmp r3, #0
80071da: d03f beq.n 800725c <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));
80071dc: 229c movs r2, #156 ; 0x9c
80071de: 2100 movs r1, #0
80071e0: 68f8 ldr r0, [r7, #12]
80071e2: f009 f8ed bl 80103c0 <memset>
pcb->prio = prio;
80071e6: 68fb ldr r3, [r7, #12]
80071e8: 79fa ldrb r2, [r7, #7]
80071ea: 755a strb r2, [r3, #21]
pcb->snd_buf = TCP_SND_BUF;
80071ec: 68fb ldr r3, [r7, #12]
80071ee: f44f 6286 mov.w r2, #1072 ; 0x430
80071f2: 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);
80071f6: 68fb ldr r3, [r7, #12]
80071f8: f44f 6206 mov.w r2, #2144 ; 0x860
80071fc: 855a strh r2, [r3, #42] ; 0x2a
80071fe: 68fb ldr r3, [r7, #12]
8007200: 8d5a ldrh r2, [r3, #42] ; 0x2a
8007202: 68fb ldr r3, [r7, #12]
8007204: 851a strh r2, [r3, #40] ; 0x28
pcb->ttl = TCP_TTL;
8007206: 68fb ldr r3, [r7, #12]
8007208: 22ff movs r2, #255 ; 0xff
800720a: 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;
800720c: 68fb ldr r3, [r7, #12]
800720e: f44f 7206 mov.w r2, #536 ; 0x218
8007212: 865a strh r2, [r3, #50] ; 0x32
pcb->rto = 3000 / TCP_SLOW_INTERVAL;
8007214: 68fb ldr r3, [r7, #12]
8007216: 2206 movs r2, #6
8007218: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
pcb->sv = 3000 / TCP_SLOW_INTERVAL;
800721c: 68fb ldr r3, [r7, #12]
800721e: 2206 movs r2, #6
8007220: 87da strh r2, [r3, #62] ; 0x3e
pcb->rtime = -1;
8007222: 68fb ldr r3, [r7, #12]
8007224: f64f 72ff movw r2, #65535 ; 0xffff
8007228: 861a strh r2, [r3, #48] ; 0x30
pcb->cwnd = 1;
800722a: 68fb ldr r3, [r7, #12]
800722c: 2201 movs r2, #1
800722e: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
pcb->tmr = tcp_ticks;
8007232: 4b0d ldr r3, [pc, #52] ; (8007268 <tcp_alloc+0xf8>)
8007234: 681a ldr r2, [r3, #0]
8007236: 68fb ldr r3, [r7, #12]
8007238: 621a str r2, [r3, #32]
pcb->last_timer = tcp_timer_ctr;
800723a: 4b0c ldr r3, [pc, #48] ; (800726c <tcp_alloc+0xfc>)
800723c: 781a ldrb r2, [r3, #0]
800723e: 68fb ldr r3, [r7, #12]
8007240: 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;
8007242: 68fb ldr r3, [r7, #12]
8007244: f44f 6286 mov.w r2, #1072 ; 0x430
8007248: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
#if LWIP_CALLBACK_API
pcb->recv = tcp_recv_null;
800724c: 68fb ldr r3, [r7, #12]
800724e: 4a08 ldr r2, [pc, #32] ; (8007270 <tcp_alloc+0x100>)
8007250: f8c3 2084 str.w r2, [r3, #132] ; 0x84
#endif /* LWIP_CALLBACK_API */
/* Init KEEPALIVE timer */
pcb->keep_idle = TCP_KEEPIDLE_DEFAULT;
8007254: 68fb ldr r3, [r7, #12]
8007256: 4a07 ldr r2, [pc, #28] ; (8007274 <tcp_alloc+0x104>)
8007258: 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;
800725c: 68fb ldr r3, [r7, #12]
}
800725e: 4618 mov r0, r3
8007260: 3710 adds r7, #16
8007262: 46bd mov sp, r7
8007264: bd80 pop {r7, pc}
8007266: bf00 nop
8007268: 20008c00 .word 0x20008c00
800726c: 20008c16 .word 0x20008c16
8007270: 08006f29 .word 0x08006f29
8007274: 006ddd00 .word 0x006ddd00
08007278 <tcp_pcb_purge>:
*
* @param pcb tcp_pcb to purge. The pcb itself is not deallocated!
*/
void
tcp_pcb_purge(struct tcp_pcb *pcb)
{
8007278: b580 push {r7, lr}
800727a: b082 sub sp, #8
800727c: af00 add r7, sp, #0
800727e: 6078 str r0, [r7, #4]
LWIP_ERROR("tcp_pcb_purge: invalid pcb", pcb != NULL, return);
8007280: 687b ldr r3, [r7, #4]
8007282: 2b00 cmp r3, #0
8007284: d107 bne.n 8007296 <tcp_pcb_purge+0x1e>
8007286: 4b21 ldr r3, [pc, #132] ; (800730c <tcp_pcb_purge+0x94>)
8007288: f640 0251 movw r2, #2129 ; 0x851
800728c: 4920 ldr r1, [pc, #128] ; (8007310 <tcp_pcb_purge+0x98>)
800728e: 4821 ldr r0, [pc, #132] ; (8007314 <tcp_pcb_purge+0x9c>)
8007290: f009 f89e bl 80103d0 <printf>
8007294: e037 b.n 8007306 <tcp_pcb_purge+0x8e>
if (pcb->state != CLOSED &&
8007296: 687b ldr r3, [r7, #4]
8007298: 7d1b ldrb r3, [r3, #20]
800729a: 2b00 cmp r3, #0
800729c: d033 beq.n 8007306 <tcp_pcb_purge+0x8e>
pcb->state != TIME_WAIT &&
800729e: 687b ldr r3, [r7, #4]
80072a0: 7d1b ldrb r3, [r3, #20]
if (pcb->state != CLOSED &&
80072a2: 2b0a cmp r3, #10
80072a4: d02f beq.n 8007306 <tcp_pcb_purge+0x8e>
pcb->state != LISTEN) {
80072a6: 687b ldr r3, [r7, #4]
80072a8: 7d1b ldrb r3, [r3, #20]
pcb->state != TIME_WAIT &&
80072aa: 2b01 cmp r3, #1
80072ac: d02b beq.n 8007306 <tcp_pcb_purge+0x8e>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge\n"));
tcp_backlog_accepted(pcb);
if (pcb->refused_data != NULL) {
80072ae: 687b ldr r3, [r7, #4]
80072b0: 6f9b ldr r3, [r3, #120] ; 0x78
80072b2: 2b00 cmp r3, #0
80072b4: d007 beq.n 80072c6 <tcp_pcb_purge+0x4e>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n"));
pbuf_free(pcb->refused_data);
80072b6: 687b ldr r3, [r7, #4]
80072b8: 6f9b ldr r3, [r3, #120] ; 0x78
80072ba: 4618 mov r0, r3
80072bc: f7fe fb6c bl 8005998 <pbuf_free>
pcb->refused_data = NULL;
80072c0: 687b ldr r3, [r7, #4]
80072c2: 2200 movs r2, #0
80072c4: 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) {
80072c6: 687b ldr r3, [r7, #4]
80072c8: 6f5b ldr r3, [r3, #116] ; 0x74
80072ca: 2b00 cmp r3, #0
80072cc: d002 beq.n 80072d4 <tcp_pcb_purge+0x5c>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->ooseq\n"));
tcp_free_ooseq(pcb);
80072ce: 6878 ldr r0, [r7, #4]
80072d0: f000 f986 bl 80075e0 <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;
80072d4: 687b ldr r3, [r7, #4]
80072d6: f64f 72ff movw r2, #65535 ; 0xffff
80072da: 861a strh r2, [r3, #48] ; 0x30
tcp_segs_free(pcb->unsent);
80072dc: 687b ldr r3, [r7, #4]
80072de: 6edb ldr r3, [r3, #108] ; 0x6c
80072e0: 4618 mov r0, r3
80072e2: f7ff fdc7 bl 8006e74 <tcp_segs_free>
tcp_segs_free(pcb->unacked);
80072e6: 687b ldr r3, [r7, #4]
80072e8: 6f1b ldr r3, [r3, #112] ; 0x70
80072ea: 4618 mov r0, r3
80072ec: f7ff fdc2 bl 8006e74 <tcp_segs_free>
pcb->unacked = pcb->unsent = NULL;
80072f0: 687b ldr r3, [r7, #4]
80072f2: 2200 movs r2, #0
80072f4: 66da str r2, [r3, #108] ; 0x6c
80072f6: 687b ldr r3, [r7, #4]
80072f8: 6eda ldr r2, [r3, #108] ; 0x6c
80072fa: 687b ldr r3, [r7, #4]
80072fc: 671a str r2, [r3, #112] ; 0x70
#if TCP_OVERSIZE
pcb->unsent_oversize = 0;
80072fe: 687b ldr r3, [r7, #4]
8007300: 2200 movs r2, #0
8007302: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
#endif /* TCP_OVERSIZE */
}
}
8007306: 3708 adds r7, #8
8007308: 46bd mov sp, r7
800730a: bd80 pop {r7, pc}
800730c: 080159bc .word 0x080159bc
8007310: 08016008 .word 0x08016008
8007314: 08015a00 .word 0x08015a00
08007318 <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)
{
8007318: b580 push {r7, lr}
800731a: b084 sub sp, #16
800731c: af00 add r7, sp, #0
800731e: 6078 str r0, [r7, #4]
8007320: 6039 str r1, [r7, #0]
LWIP_ASSERT("tcp_pcb_remove: invalid pcb", pcb != NULL);
8007322: 683b ldr r3, [r7, #0]
8007324: 2b00 cmp r3, #0
8007326: d106 bne.n 8007336 <tcp_pcb_remove+0x1e>
8007328: 4b3e ldr r3, [pc, #248] ; (8007424 <tcp_pcb_remove+0x10c>)
800732a: f640 0283 movw r2, #2179 ; 0x883
800732e: 493e ldr r1, [pc, #248] ; (8007428 <tcp_pcb_remove+0x110>)
8007330: 483e ldr r0, [pc, #248] ; (800742c <tcp_pcb_remove+0x114>)
8007332: f009 f84d bl 80103d0 <printf>
LWIP_ASSERT("tcp_pcb_remove: invalid pcblist", pcblist != NULL);
8007336: 687b ldr r3, [r7, #4]
8007338: 2b00 cmp r3, #0
800733a: d106 bne.n 800734a <tcp_pcb_remove+0x32>
800733c: 4b39 ldr r3, [pc, #228] ; (8007424 <tcp_pcb_remove+0x10c>)
800733e: f640 0284 movw r2, #2180 ; 0x884
8007342: 493b ldr r1, [pc, #236] ; (8007430 <tcp_pcb_remove+0x118>)
8007344: 4839 ldr r0, [pc, #228] ; (800742c <tcp_pcb_remove+0x114>)
8007346: f009 f843 bl 80103d0 <printf>
TCP_RMV(pcblist, pcb);
800734a: 687b ldr r3, [r7, #4]
800734c: 681b ldr r3, [r3, #0]
800734e: 683a ldr r2, [r7, #0]
8007350: 429a cmp r2, r3
8007352: d105 bne.n 8007360 <tcp_pcb_remove+0x48>
8007354: 687b ldr r3, [r7, #4]
8007356: 681b ldr r3, [r3, #0]
8007358: 68da ldr r2, [r3, #12]
800735a: 687b ldr r3, [r7, #4]
800735c: 601a str r2, [r3, #0]
800735e: e013 b.n 8007388 <tcp_pcb_remove+0x70>
8007360: 687b ldr r3, [r7, #4]
8007362: 681b ldr r3, [r3, #0]
8007364: 60fb str r3, [r7, #12]
8007366: e00c b.n 8007382 <tcp_pcb_remove+0x6a>
8007368: 68fb ldr r3, [r7, #12]
800736a: 68db ldr r3, [r3, #12]
800736c: 683a ldr r2, [r7, #0]
800736e: 429a cmp r2, r3
8007370: d104 bne.n 800737c <tcp_pcb_remove+0x64>
8007372: 683b ldr r3, [r7, #0]
8007374: 68da ldr r2, [r3, #12]
8007376: 68fb ldr r3, [r7, #12]
8007378: 60da str r2, [r3, #12]
800737a: e005 b.n 8007388 <tcp_pcb_remove+0x70>
800737c: 68fb ldr r3, [r7, #12]
800737e: 68db ldr r3, [r3, #12]
8007380: 60fb str r3, [r7, #12]
8007382: 68fb ldr r3, [r7, #12]
8007384: 2b00 cmp r3, #0
8007386: d1ef bne.n 8007368 <tcp_pcb_remove+0x50>
8007388: 683b ldr r3, [r7, #0]
800738a: 2200 movs r2, #0
800738c: 60da str r2, [r3, #12]
tcp_pcb_purge(pcb);
800738e: 6838 ldr r0, [r7, #0]
8007390: f7ff ff72 bl 8007278 <tcp_pcb_purge>
/* if there is an outstanding delayed ACKs, send it */
if ((pcb->state != TIME_WAIT) &&
8007394: 683b ldr r3, [r7, #0]
8007396: 7d1b ldrb r3, [r3, #20]
8007398: 2b0a cmp r3, #10
800739a: d013 beq.n 80073c4 <tcp_pcb_remove+0xac>
(pcb->state != LISTEN) &&
800739c: 683b ldr r3, [r7, #0]
800739e: 7d1b ldrb r3, [r3, #20]
if ((pcb->state != TIME_WAIT) &&
80073a0: 2b01 cmp r3, #1
80073a2: d00f beq.n 80073c4 <tcp_pcb_remove+0xac>
(pcb->flags & TF_ACK_DELAY)) {
80073a4: 683b ldr r3, [r7, #0]
80073a6: 8b5b ldrh r3, [r3, #26]
80073a8: f003 0301 and.w r3, r3, #1
(pcb->state != LISTEN) &&
80073ac: 2b00 cmp r3, #0
80073ae: d009 beq.n 80073c4 <tcp_pcb_remove+0xac>
tcp_ack_now(pcb);
80073b0: 683b ldr r3, [r7, #0]
80073b2: 8b5b ldrh r3, [r3, #26]
80073b4: f043 0302 orr.w r3, r3, #2
80073b8: b29a uxth r2, r3
80073ba: 683b ldr r3, [r7, #0]
80073bc: 835a strh r2, [r3, #26]
tcp_output(pcb);
80073be: 6838 ldr r0, [r7, #0]
80073c0: f002 ff6e bl 800a2a0 <tcp_output>
}
if (pcb->state != LISTEN) {
80073c4: 683b ldr r3, [r7, #0]
80073c6: 7d1b ldrb r3, [r3, #20]
80073c8: 2b01 cmp r3, #1
80073ca: d020 beq.n 800740e <tcp_pcb_remove+0xf6>
LWIP_ASSERT("unsent segments leaking", pcb->unsent == NULL);
80073cc: 683b ldr r3, [r7, #0]
80073ce: 6edb ldr r3, [r3, #108] ; 0x6c
80073d0: 2b00 cmp r3, #0
80073d2: d006 beq.n 80073e2 <tcp_pcb_remove+0xca>
80073d4: 4b13 ldr r3, [pc, #76] ; (8007424 <tcp_pcb_remove+0x10c>)
80073d6: f640 0293 movw r2, #2195 ; 0x893
80073da: 4916 ldr r1, [pc, #88] ; (8007434 <tcp_pcb_remove+0x11c>)
80073dc: 4813 ldr r0, [pc, #76] ; (800742c <tcp_pcb_remove+0x114>)
80073de: f008 fff7 bl 80103d0 <printf>
LWIP_ASSERT("unacked segments leaking", pcb->unacked == NULL);
80073e2: 683b ldr r3, [r7, #0]
80073e4: 6f1b ldr r3, [r3, #112] ; 0x70
80073e6: 2b00 cmp r3, #0
80073e8: d006 beq.n 80073f8 <tcp_pcb_remove+0xe0>
80073ea: 4b0e ldr r3, [pc, #56] ; (8007424 <tcp_pcb_remove+0x10c>)
80073ec: f640 0294 movw r2, #2196 ; 0x894
80073f0: 4911 ldr r1, [pc, #68] ; (8007438 <tcp_pcb_remove+0x120>)
80073f2: 480e ldr r0, [pc, #56] ; (800742c <tcp_pcb_remove+0x114>)
80073f4: f008 ffec bl 80103d0 <printf>
#if TCP_QUEUE_OOSEQ
LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL);
80073f8: 683b ldr r3, [r7, #0]
80073fa: 6f5b ldr r3, [r3, #116] ; 0x74
80073fc: 2b00 cmp r3, #0
80073fe: d006 beq.n 800740e <tcp_pcb_remove+0xf6>
8007400: 4b08 ldr r3, [pc, #32] ; (8007424 <tcp_pcb_remove+0x10c>)
8007402: f640 0296 movw r2, #2198 ; 0x896
8007406: 490d ldr r1, [pc, #52] ; (800743c <tcp_pcb_remove+0x124>)
8007408: 4808 ldr r0, [pc, #32] ; (800742c <tcp_pcb_remove+0x114>)
800740a: f008 ffe1 bl 80103d0 <printf>
#endif /* TCP_QUEUE_OOSEQ */
}
pcb->state = CLOSED;
800740e: 683b ldr r3, [r7, #0]
8007410: 2200 movs r2, #0
8007412: 751a strb r2, [r3, #20]
/* reset the local port to prevent the pcb from being 'bound' */
pcb->local_port = 0;
8007414: 683b ldr r3, [r7, #0]
8007416: 2200 movs r2, #0
8007418: 82da strh r2, [r3, #22]
LWIP_ASSERT("tcp_pcb_remove: tcp_pcbs_sane()", tcp_pcbs_sane());
}
800741a: bf00 nop
800741c: 3710 adds r7, #16
800741e: 46bd mov sp, r7
8007420: bd80 pop {r7, pc}
8007422: bf00 nop
8007424: 080159bc .word 0x080159bc
8007428: 08016024 .word 0x08016024
800742c: 08015a00 .word 0x08015a00
8007430: 08016040 .word 0x08016040
8007434: 08016060 .word 0x08016060
8007438: 08016078 .word 0x08016078
800743c: 08016094 .word 0x08016094
08007440 <tcp_next_iss>:
*
* @return u32_t pseudo random sequence number
*/
u32_t
tcp_next_iss(struct tcp_pcb *pcb)
{
8007440: b580 push {r7, lr}
8007442: b082 sub sp, #8
8007444: af00 add r7, sp, #0
8007446: 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);
8007448: 687b ldr r3, [r7, #4]
800744a: 2b00 cmp r3, #0
800744c: d106 bne.n 800745c <tcp_next_iss+0x1c>
800744e: 4b0a ldr r3, [pc, #40] ; (8007478 <tcp_next_iss+0x38>)
8007450: f640 02af movw r2, #2223 ; 0x8af
8007454: 4909 ldr r1, [pc, #36] ; (800747c <tcp_next_iss+0x3c>)
8007456: 480a ldr r0, [pc, #40] ; (8007480 <tcp_next_iss+0x40>)
8007458: f008 ffba bl 80103d0 <printf>
LWIP_UNUSED_ARG(pcb);
iss += tcp_ticks; /* XXX */
800745c: 4b09 ldr r3, [pc, #36] ; (8007484 <tcp_next_iss+0x44>)
800745e: 681a ldr r2, [r3, #0]
8007460: 4b09 ldr r3, [pc, #36] ; (8007488 <tcp_next_iss+0x48>)
8007462: 681b ldr r3, [r3, #0]
8007464: 4413 add r3, r2
8007466: 4a07 ldr r2, [pc, #28] ; (8007484 <tcp_next_iss+0x44>)
8007468: 6013 str r3, [r2, #0]
return iss;
800746a: 4b06 ldr r3, [pc, #24] ; (8007484 <tcp_next_iss+0x44>)
800746c: 681b ldr r3, [r3, #0]
#endif /* LWIP_HOOK_TCP_ISN */
}
800746e: 4618 mov r0, r3
8007470: 3708 adds r7, #8
8007472: 46bd mov sp, r7
8007474: bd80 pop {r7, pc}
8007476: bf00 nop
8007478: 080159bc .word 0x080159bc
800747c: 080160ac .word 0x080160ac
8007480: 08015a00 .word 0x08015a00
8007484: 20000024 .word 0x20000024
8007488: 20008c00 .word 0x20008c00
0800748c <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)
{
800748c: b580 push {r7, lr}
800748e: b086 sub sp, #24
8007490: af00 add r7, sp, #0
8007492: 4603 mov r3, r0
8007494: 60b9 str r1, [r7, #8]
8007496: 607a str r2, [r7, #4]
8007498: 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);
800749a: 687b ldr r3, [r7, #4]
800749c: 2b00 cmp r3, #0
800749e: d106 bne.n 80074ae <tcp_eff_send_mss_netif+0x22>
80074a0: 4b14 ldr r3, [pc, #80] ; (80074f4 <tcp_eff_send_mss_netif+0x68>)
80074a2: f640 02c5 movw r2, #2245 ; 0x8c5
80074a6: 4914 ldr r1, [pc, #80] ; (80074f8 <tcp_eff_send_mss_netif+0x6c>)
80074a8: 4814 ldr r0, [pc, #80] ; (80074fc <tcp_eff_send_mss_netif+0x70>)
80074aa: f008 ff91 bl 80103d0 <printf>
else
#endif /* LWIP_IPV4 */
#endif /* LWIP_IPV6 */
#if LWIP_IPV4
{
if (outif == NULL) {
80074ae: 68bb ldr r3, [r7, #8]
80074b0: 2b00 cmp r3, #0
80074b2: d101 bne.n 80074b8 <tcp_eff_send_mss_netif+0x2c>
return sendmss;
80074b4: 89fb ldrh r3, [r7, #14]
80074b6: e019 b.n 80074ec <tcp_eff_send_mss_netif+0x60>
}
mtu = outif->mtu;
80074b8: 68bb ldr r3, [r7, #8]
80074ba: 8d1b ldrh r3, [r3, #40] ; 0x28
80074bc: 82fb strh r3, [r7, #22]
}
#endif /* LWIP_IPV4 */
if (mtu != 0) {
80074be: 8afb ldrh r3, [r7, #22]
80074c0: 2b00 cmp r3, #0
80074c2: d012 beq.n 80074ea <tcp_eff_send_mss_netif+0x5e>
else
#endif /* LWIP_IPV4 */
#endif /* LWIP_IPV6 */
#if LWIP_IPV4
{
offset = IP_HLEN + TCP_HLEN;
80074c4: 2328 movs r3, #40 ; 0x28
80074c6: 82bb strh r3, [r7, #20]
}
#endif /* LWIP_IPV4 */
mss_s = (mtu > offset) ? (u16_t)(mtu - offset) : 0;
80074c8: 8afa ldrh r2, [r7, #22]
80074ca: 8abb ldrh r3, [r7, #20]
80074cc: 429a cmp r2, r3
80074ce: d904 bls.n 80074da <tcp_eff_send_mss_netif+0x4e>
80074d0: 8afa ldrh r2, [r7, #22]
80074d2: 8abb ldrh r3, [r7, #20]
80074d4: 1ad3 subs r3, r2, r3
80074d6: b29b uxth r3, r3
80074d8: e000 b.n 80074dc <tcp_eff_send_mss_netif+0x50>
80074da: 2300 movs r3, #0
80074dc: 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);
80074de: 8a7a ldrh r2, [r7, #18]
80074e0: 89fb ldrh r3, [r7, #14]
80074e2: 4293 cmp r3, r2
80074e4: bf28 it cs
80074e6: 4613 movcs r3, r2
80074e8: 81fb strh r3, [r7, #14]
}
return sendmss;
80074ea: 89fb ldrh r3, [r7, #14]
}
80074ec: 4618 mov r0, r3
80074ee: 3718 adds r7, #24
80074f0: 46bd mov sp, r7
80074f2: bd80 pop {r7, pc}
80074f4: 080159bc .word 0x080159bc
80074f8: 080160c8 .word 0x080160c8
80074fc: 08015a00 .word 0x08015a00
08007500 <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)
{
8007500: b580 push {r7, lr}
8007502: b084 sub sp, #16
8007504: af00 add r7, sp, #0
8007506: 6078 str r0, [r7, #4]
8007508: 6039 str r1, [r7, #0]
struct tcp_pcb *pcb;
pcb = pcb_list;
800750a: 683b ldr r3, [r7, #0]
800750c: 60fb str r3, [r7, #12]
LWIP_ASSERT("tcp_netif_ip_addr_changed_pcblist: invalid old_addr", old_addr != NULL);
800750e: 687b ldr r3, [r7, #4]
8007510: 2b00 cmp r3, #0
8007512: d119 bne.n 8007548 <tcp_netif_ip_addr_changed_pcblist+0x48>
8007514: 4b10 ldr r3, [pc, #64] ; (8007558 <tcp_netif_ip_addr_changed_pcblist+0x58>)
8007516: f44f 6210 mov.w r2, #2304 ; 0x900
800751a: 4910 ldr r1, [pc, #64] ; (800755c <tcp_netif_ip_addr_changed_pcblist+0x5c>)
800751c: 4810 ldr r0, [pc, #64] ; (8007560 <tcp_netif_ip_addr_changed_pcblist+0x60>)
800751e: f008 ff57 bl 80103d0 <printf>
while (pcb != NULL) {
8007522: e011 b.n 8007548 <tcp_netif_ip_addr_changed_pcblist+0x48>
/* PCB bound to current local interface address? */
if (ip_addr_cmp(&pcb->local_ip, old_addr)
8007524: 68fb ldr r3, [r7, #12]
8007526: 681a ldr r2, [r3, #0]
8007528: 687b ldr r3, [r7, #4]
800752a: 681b ldr r3, [r3, #0]
800752c: 429a cmp r2, r3
800752e: d108 bne.n 8007542 <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;
8007530: 68fb ldr r3, [r7, #12]
8007532: 68db ldr r3, [r3, #12]
8007534: 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);
8007536: 68f8 ldr r0, [r7, #12]
8007538: f7fe ffc6 bl 80064c8 <tcp_abort>
pcb = next;
800753c: 68bb ldr r3, [r7, #8]
800753e: 60fb str r3, [r7, #12]
8007540: e002 b.n 8007548 <tcp_netif_ip_addr_changed_pcblist+0x48>
} else {
pcb = pcb->next;
8007542: 68fb ldr r3, [r7, #12]
8007544: 68db ldr r3, [r3, #12]
8007546: 60fb str r3, [r7, #12]
while (pcb != NULL) {
8007548: 68fb ldr r3, [r7, #12]
800754a: 2b00 cmp r3, #0
800754c: d1ea bne.n 8007524 <tcp_netif_ip_addr_changed_pcblist+0x24>
}
}
}
800754e: bf00 nop
8007550: bf00 nop
8007552: 3710 adds r7, #16
8007554: 46bd mov sp, r7
8007556: bd80 pop {r7, pc}
8007558: 080159bc .word 0x080159bc
800755c: 080160f0 .word 0x080160f0
8007560: 08015a00 .word 0x08015a00
08007564 <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)
{
8007564: b580 push {r7, lr}
8007566: b084 sub sp, #16
8007568: af00 add r7, sp, #0
800756a: 6078 str r0, [r7, #4]
800756c: 6039 str r1, [r7, #0]
struct tcp_pcb_listen *lpcb;
if (!ip_addr_isany(old_addr)) {
800756e: 687b ldr r3, [r7, #4]
8007570: 2b00 cmp r3, #0
8007572: d02a beq.n 80075ca <tcp_netif_ip_addr_changed+0x66>
8007574: 687b ldr r3, [r7, #4]
8007576: 681b ldr r3, [r3, #0]
8007578: 2b00 cmp r3, #0
800757a: d026 beq.n 80075ca <tcp_netif_ip_addr_changed+0x66>
tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs);
800757c: 4b15 ldr r3, [pc, #84] ; (80075d4 <tcp_netif_ip_addr_changed+0x70>)
800757e: 681b ldr r3, [r3, #0]
8007580: 4619 mov r1, r3
8007582: 6878 ldr r0, [r7, #4]
8007584: f7ff ffbc bl 8007500 <tcp_netif_ip_addr_changed_pcblist>
tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_bound_pcbs);
8007588: 4b13 ldr r3, [pc, #76] ; (80075d8 <tcp_netif_ip_addr_changed+0x74>)
800758a: 681b ldr r3, [r3, #0]
800758c: 4619 mov r1, r3
800758e: 6878 ldr r0, [r7, #4]
8007590: f7ff ffb6 bl 8007500 <tcp_netif_ip_addr_changed_pcblist>
if (!ip_addr_isany(new_addr)) {
8007594: 683b ldr r3, [r7, #0]
8007596: 2b00 cmp r3, #0
8007598: d017 beq.n 80075ca <tcp_netif_ip_addr_changed+0x66>
800759a: 683b ldr r3, [r7, #0]
800759c: 681b ldr r3, [r3, #0]
800759e: 2b00 cmp r3, #0
80075a0: d013 beq.n 80075ca <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) {
80075a2: 4b0e ldr r3, [pc, #56] ; (80075dc <tcp_netif_ip_addr_changed+0x78>)
80075a4: 681b ldr r3, [r3, #0]
80075a6: 60fb str r3, [r7, #12]
80075a8: e00c b.n 80075c4 <tcp_netif_ip_addr_changed+0x60>
/* PCB bound to current local interface address? */
if (ip_addr_cmp(&lpcb->local_ip, old_addr)) {
80075aa: 68fb ldr r3, [r7, #12]
80075ac: 681a ldr r2, [r3, #0]
80075ae: 687b ldr r3, [r7, #4]
80075b0: 681b ldr r3, [r3, #0]
80075b2: 429a cmp r2, r3
80075b4: d103 bne.n 80075be <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);
80075b6: 683b ldr r3, [r7, #0]
80075b8: 681a ldr r2, [r3, #0]
80075ba: 68fb ldr r3, [r7, #12]
80075bc: 601a str r2, [r3, #0]
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
80075be: 68fb ldr r3, [r7, #12]
80075c0: 68db ldr r3, [r3, #12]
80075c2: 60fb str r3, [r7, #12]
80075c4: 68fb ldr r3, [r7, #12]
80075c6: 2b00 cmp r3, #0
80075c8: d1ef bne.n 80075aa <tcp_netif_ip_addr_changed+0x46>
}
}
}
}
}
80075ca: bf00 nop
80075cc: 3710 adds r7, #16
80075ce: 46bd mov sp, r7
80075d0: bd80 pop {r7, pc}
80075d2: bf00 nop
80075d4: 20008c0c .word 0x20008c0c
80075d8: 20008c04 .word 0x20008c04
80075dc: 20008c08 .word 0x20008c08
080075e0 <tcp_free_ooseq>:
#if TCP_QUEUE_OOSEQ
/* Free all ooseq pbufs (and possibly reset SACK state) */
void
tcp_free_ooseq(struct tcp_pcb *pcb)
{
80075e0: b580 push {r7, lr}
80075e2: b082 sub sp, #8
80075e4: af00 add r7, sp, #0
80075e6: 6078 str r0, [r7, #4]
if (pcb->ooseq) {
80075e8: 687b ldr r3, [r7, #4]
80075ea: 6f5b ldr r3, [r3, #116] ; 0x74
80075ec: 2b00 cmp r3, #0
80075ee: d007 beq.n 8007600 <tcp_free_ooseq+0x20>
tcp_segs_free(pcb->ooseq);
80075f0: 687b ldr r3, [r7, #4]
80075f2: 6f5b ldr r3, [r3, #116] ; 0x74
80075f4: 4618 mov r0, r3
80075f6: f7ff fc3d bl 8006e74 <tcp_segs_free>
pcb->ooseq = NULL;
80075fa: 687b ldr r3, [r7, #4]
80075fc: 2200 movs r2, #0
80075fe: 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 */
}
}
8007600: bf00 nop
8007602: 3708 adds r7, #8
8007604: 46bd mov sp, r7
8007606: bd80 pop {r7, pc}
08007608 <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)
{
8007608: b590 push {r4, r7, lr}
800760a: b08d sub sp, #52 ; 0x34
800760c: af04 add r7, sp, #16
800760e: 6078 str r0, [r7, #4]
8007610: 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);
8007612: 687b ldr r3, [r7, #4]
8007614: 2b00 cmp r3, #0
8007616: d105 bne.n 8007624 <tcp_input+0x1c>
8007618: 4b9b ldr r3, [pc, #620] ; (8007888 <tcp_input+0x280>)
800761a: 2283 movs r2, #131 ; 0x83
800761c: 499b ldr r1, [pc, #620] ; (800788c <tcp_input+0x284>)
800761e: 489c ldr r0, [pc, #624] ; (8007890 <tcp_input+0x288>)
8007620: f008 fed6 bl 80103d0 <printf>
PERF_START;
TCP_STATS_INC(tcp.recv);
MIB2_STATS_INC(mib2.tcpinsegs);
tcphdr = (struct tcp_hdr *)p->payload;
8007624: 687b ldr r3, [r7, #4]
8007626: 685b ldr r3, [r3, #4]
8007628: 4a9a ldr r2, [pc, #616] ; (8007894 <tcp_input+0x28c>)
800762a: 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) {
800762c: 687b ldr r3, [r7, #4]
800762e: 895b ldrh r3, [r3, #10]
8007630: 2b13 cmp r3, #19
8007632: f240 83d1 bls.w 8007dd8 <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()) ||
8007636: 4b98 ldr r3, [pc, #608] ; (8007898 <tcp_input+0x290>)
8007638: 695b ldr r3, [r3, #20]
800763a: 4a97 ldr r2, [pc, #604] ; (8007898 <tcp_input+0x290>)
800763c: 6812 ldr r2, [r2, #0]
800763e: 4611 mov r1, r2
8007640: 4618 mov r0, r3
8007642: f007 fdcd bl 800f1e0 <ip4_addr_isbroadcast_u32>
8007646: 4603 mov r3, r0
8007648: 2b00 cmp r3, #0
800764a: f040 83c7 bne.w 8007ddc <tcp_input+0x7d4>
ip_addr_ismulticast(ip_current_dest_addr())) {
800764e: 4b92 ldr r3, [pc, #584] ; (8007898 <tcp_input+0x290>)
8007650: 695b ldr r3, [r3, #20]
8007652: f003 03f0 and.w r3, r3, #240 ; 0xf0
if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) ||
8007656: 2be0 cmp r3, #224 ; 0xe0
8007658: f000 83c0 beq.w 8007ddc <tcp_input+0x7d4>
}
}
#endif /* CHECKSUM_CHECK_TCP */
/* sanity-check header length */
hdrlen_bytes = TCPH_HDRLEN_BYTES(tcphdr);
800765c: 4b8d ldr r3, [pc, #564] ; (8007894 <tcp_input+0x28c>)
800765e: 681b ldr r3, [r3, #0]
8007660: 899b ldrh r3, [r3, #12]
8007662: b29b uxth r3, r3
8007664: 4618 mov r0, r3
8007666: f7fc fe2d bl 80042c4 <lwip_htons>
800766a: 4603 mov r3, r0
800766c: 0b1b lsrs r3, r3, #12
800766e: b29b uxth r3, r3
8007670: b2db uxtb r3, r3
8007672: 009b lsls r3, r3, #2
8007674: 74bb strb r3, [r7, #18]
if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) {
8007676: 7cbb ldrb r3, [r7, #18]
8007678: 2b13 cmp r3, #19
800767a: f240 83b1 bls.w 8007de0 <tcp_input+0x7d8>
800767e: 7cbb ldrb r3, [r7, #18]
8007680: b29a uxth r2, r3
8007682: 687b ldr r3, [r7, #4]
8007684: 891b ldrh r3, [r3, #8]
8007686: 429a cmp r2, r3
8007688: f200 83aa bhi.w 8007de0 <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);
800768c: 7cbb ldrb r3, [r7, #18]
800768e: b29b uxth r3, r3
8007690: 3b14 subs r3, #20
8007692: b29a uxth r2, r3
8007694: 4b81 ldr r3, [pc, #516] ; (800789c <tcp_input+0x294>)
8007696: 801a strh r2, [r3, #0]
tcphdr_opt2 = NULL;
8007698: 4b81 ldr r3, [pc, #516] ; (80078a0 <tcp_input+0x298>)
800769a: 2200 movs r2, #0
800769c: 601a str r2, [r3, #0]
if (p->len >= hdrlen_bytes) {
800769e: 687b ldr r3, [r7, #4]
80076a0: 895a ldrh r2, [r3, #10]
80076a2: 7cbb ldrb r3, [r7, #18]
80076a4: b29b uxth r3, r3
80076a6: 429a cmp r2, r3
80076a8: d309 bcc.n 80076be <tcp_input+0xb6>
/* all options are in the first pbuf */
tcphdr_opt1len = tcphdr_optlen;
80076aa: 4b7c ldr r3, [pc, #496] ; (800789c <tcp_input+0x294>)
80076ac: 881a ldrh r2, [r3, #0]
80076ae: 4b7d ldr r3, [pc, #500] ; (80078a4 <tcp_input+0x29c>)
80076b0: 801a strh r2, [r3, #0]
pbuf_remove_header(p, hdrlen_bytes); /* cannot fail */
80076b2: 7cbb ldrb r3, [r7, #18]
80076b4: 4619 mov r1, r3
80076b6: 6878 ldr r0, [r7, #4]
80076b8: f7fe f8e8 bl 800588c <pbuf_remove_header>
80076bc: e04e b.n 800775c <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);
80076be: 687b ldr r3, [r7, #4]
80076c0: 681b ldr r3, [r3, #0]
80076c2: 2b00 cmp r3, #0
80076c4: d105 bne.n 80076d2 <tcp_input+0xca>
80076c6: 4b70 ldr r3, [pc, #448] ; (8007888 <tcp_input+0x280>)
80076c8: 22c2 movs r2, #194 ; 0xc2
80076ca: 4977 ldr r1, [pc, #476] ; (80078a8 <tcp_input+0x2a0>)
80076cc: 4870 ldr r0, [pc, #448] ; (8007890 <tcp_input+0x288>)
80076ce: f008 fe7f bl 80103d0 <printf>
/* advance over the TCP header (cannot fail) */
pbuf_remove_header(p, TCP_HLEN);
80076d2: 2114 movs r1, #20
80076d4: 6878 ldr r0, [r7, #4]
80076d6: f7fe f8d9 bl 800588c <pbuf_remove_header>
/* determine how long the first and second parts of the options are */
tcphdr_opt1len = p->len;
80076da: 687b ldr r3, [r7, #4]
80076dc: 895a ldrh r2, [r3, #10]
80076de: 4b71 ldr r3, [pc, #452] ; (80078a4 <tcp_input+0x29c>)
80076e0: 801a strh r2, [r3, #0]
opt2len = (u16_t)(tcphdr_optlen - tcphdr_opt1len);
80076e2: 4b6e ldr r3, [pc, #440] ; (800789c <tcp_input+0x294>)
80076e4: 881a ldrh r2, [r3, #0]
80076e6: 4b6f ldr r3, [pc, #444] ; (80078a4 <tcp_input+0x29c>)
80076e8: 881b ldrh r3, [r3, #0]
80076ea: 1ad3 subs r3, r2, r3
80076ec: 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);
80076ee: 4b6d ldr r3, [pc, #436] ; (80078a4 <tcp_input+0x29c>)
80076f0: 881b ldrh r3, [r3, #0]
80076f2: 4619 mov r1, r3
80076f4: 6878 ldr r0, [r7, #4]
80076f6: f7fe f8c9 bl 800588c <pbuf_remove_header>
/* check that the options fit in the second pbuf */
if (opt2len > p->next->len) {
80076fa: 687b ldr r3, [r7, #4]
80076fc: 681b ldr r3, [r3, #0]
80076fe: 895b ldrh r3, [r3, #10]
8007700: 8a3a ldrh r2, [r7, #16]
8007702: 429a cmp r2, r3
8007704: f200 836e bhi.w 8007de4 <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;
8007708: 687b ldr r3, [r7, #4]
800770a: 681b ldr r3, [r3, #0]
800770c: 685b ldr r3, [r3, #4]
800770e: 4a64 ldr r2, [pc, #400] ; (80078a0 <tcp_input+0x298>)
8007710: 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);
8007712: 687b ldr r3, [r7, #4]
8007714: 681b ldr r3, [r3, #0]
8007716: 8a3a ldrh r2, [r7, #16]
8007718: 4611 mov r1, r2
800771a: 4618 mov r0, r3
800771c: f7fe f8b6 bl 800588c <pbuf_remove_header>
p->tot_len = (u16_t)(p->tot_len - opt2len);
8007720: 687b ldr r3, [r7, #4]
8007722: 891a ldrh r2, [r3, #8]
8007724: 8a3b ldrh r3, [r7, #16]
8007726: 1ad3 subs r3, r2, r3
8007728: b29a uxth r2, r3
800772a: 687b ldr r3, [r7, #4]
800772c: 811a strh r2, [r3, #8]
LWIP_ASSERT("p->len == 0", p->len == 0);
800772e: 687b ldr r3, [r7, #4]
8007730: 895b ldrh r3, [r3, #10]
8007732: 2b00 cmp r3, #0
8007734: d005 beq.n 8007742 <tcp_input+0x13a>
8007736: 4b54 ldr r3, [pc, #336] ; (8007888 <tcp_input+0x280>)
8007738: 22df movs r2, #223 ; 0xdf
800773a: 495c ldr r1, [pc, #368] ; (80078ac <tcp_input+0x2a4>)
800773c: 4854 ldr r0, [pc, #336] ; (8007890 <tcp_input+0x288>)
800773e: f008 fe47 bl 80103d0 <printf>
LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len);
8007742: 687b ldr r3, [r7, #4]
8007744: 891a ldrh r2, [r3, #8]
8007746: 687b ldr r3, [r7, #4]
8007748: 681b ldr r3, [r3, #0]
800774a: 891b ldrh r3, [r3, #8]
800774c: 429a cmp r2, r3
800774e: d005 beq.n 800775c <tcp_input+0x154>
8007750: 4b4d ldr r3, [pc, #308] ; (8007888 <tcp_input+0x280>)
8007752: 22e0 movs r2, #224 ; 0xe0
8007754: 4956 ldr r1, [pc, #344] ; (80078b0 <tcp_input+0x2a8>)
8007756: 484e ldr r0, [pc, #312] ; (8007890 <tcp_input+0x288>)
8007758: f008 fe3a bl 80103d0 <printf>
}
/* Convert fields in TCP header to host byte order. */
tcphdr->src = lwip_ntohs(tcphdr->src);
800775c: 4b4d ldr r3, [pc, #308] ; (8007894 <tcp_input+0x28c>)
800775e: 681b ldr r3, [r3, #0]
8007760: 881b ldrh r3, [r3, #0]
8007762: b29b uxth r3, r3
8007764: 4a4b ldr r2, [pc, #300] ; (8007894 <tcp_input+0x28c>)
8007766: 6814 ldr r4, [r2, #0]
8007768: 4618 mov r0, r3
800776a: f7fc fdab bl 80042c4 <lwip_htons>
800776e: 4603 mov r3, r0
8007770: 8023 strh r3, [r4, #0]
tcphdr->dest = lwip_ntohs(tcphdr->dest);
8007772: 4b48 ldr r3, [pc, #288] ; (8007894 <tcp_input+0x28c>)
8007774: 681b ldr r3, [r3, #0]
8007776: 885b ldrh r3, [r3, #2]
8007778: b29b uxth r3, r3
800777a: 4a46 ldr r2, [pc, #280] ; (8007894 <tcp_input+0x28c>)
800777c: 6814 ldr r4, [r2, #0]
800777e: 4618 mov r0, r3
8007780: f7fc fda0 bl 80042c4 <lwip_htons>
8007784: 4603 mov r3, r0
8007786: 8063 strh r3, [r4, #2]
seqno = tcphdr->seqno = lwip_ntohl(tcphdr->seqno);
8007788: 4b42 ldr r3, [pc, #264] ; (8007894 <tcp_input+0x28c>)
800778a: 681b ldr r3, [r3, #0]
800778c: 685b ldr r3, [r3, #4]
800778e: 4a41 ldr r2, [pc, #260] ; (8007894 <tcp_input+0x28c>)
8007790: 6814 ldr r4, [r2, #0]
8007792: 4618 mov r0, r3
8007794: f7fc fdab bl 80042ee <lwip_htonl>
8007798: 4603 mov r3, r0
800779a: 6063 str r3, [r4, #4]
800779c: 6863 ldr r3, [r4, #4]
800779e: 4a45 ldr r2, [pc, #276] ; (80078b4 <tcp_input+0x2ac>)
80077a0: 6013 str r3, [r2, #0]
ackno = tcphdr->ackno = lwip_ntohl(tcphdr->ackno);
80077a2: 4b3c ldr r3, [pc, #240] ; (8007894 <tcp_input+0x28c>)
80077a4: 681b ldr r3, [r3, #0]
80077a6: 689b ldr r3, [r3, #8]
80077a8: 4a3a ldr r2, [pc, #232] ; (8007894 <tcp_input+0x28c>)
80077aa: 6814 ldr r4, [r2, #0]
80077ac: 4618 mov r0, r3
80077ae: f7fc fd9e bl 80042ee <lwip_htonl>
80077b2: 4603 mov r3, r0
80077b4: 60a3 str r3, [r4, #8]
80077b6: 68a3 ldr r3, [r4, #8]
80077b8: 4a3f ldr r2, [pc, #252] ; (80078b8 <tcp_input+0x2b0>)
80077ba: 6013 str r3, [r2, #0]
tcphdr->wnd = lwip_ntohs(tcphdr->wnd);
80077bc: 4b35 ldr r3, [pc, #212] ; (8007894 <tcp_input+0x28c>)
80077be: 681b ldr r3, [r3, #0]
80077c0: 89db ldrh r3, [r3, #14]
80077c2: b29b uxth r3, r3
80077c4: 4a33 ldr r2, [pc, #204] ; (8007894 <tcp_input+0x28c>)
80077c6: 6814 ldr r4, [r2, #0]
80077c8: 4618 mov r0, r3
80077ca: f7fc fd7b bl 80042c4 <lwip_htons>
80077ce: 4603 mov r3, r0
80077d0: 81e3 strh r3, [r4, #14]
flags = TCPH_FLAGS(tcphdr);
80077d2: 4b30 ldr r3, [pc, #192] ; (8007894 <tcp_input+0x28c>)
80077d4: 681b ldr r3, [r3, #0]
80077d6: 899b ldrh r3, [r3, #12]
80077d8: b29b uxth r3, r3
80077da: 4618 mov r0, r3
80077dc: f7fc fd72 bl 80042c4 <lwip_htons>
80077e0: 4603 mov r3, r0
80077e2: b2db uxtb r3, r3
80077e4: f003 033f and.w r3, r3, #63 ; 0x3f
80077e8: b2da uxtb r2, r3
80077ea: 4b34 ldr r3, [pc, #208] ; (80078bc <tcp_input+0x2b4>)
80077ec: 701a strb r2, [r3, #0]
tcplen = p->tot_len;
80077ee: 687b ldr r3, [r7, #4]
80077f0: 891a ldrh r2, [r3, #8]
80077f2: 4b33 ldr r3, [pc, #204] ; (80078c0 <tcp_input+0x2b8>)
80077f4: 801a strh r2, [r3, #0]
if (flags & (TCP_FIN | TCP_SYN)) {
80077f6: 4b31 ldr r3, [pc, #196] ; (80078bc <tcp_input+0x2b4>)
80077f8: 781b ldrb r3, [r3, #0]
80077fa: f003 0303 and.w r3, r3, #3
80077fe: 2b00 cmp r3, #0
8007800: d00c beq.n 800781c <tcp_input+0x214>
tcplen++;
8007802: 4b2f ldr r3, [pc, #188] ; (80078c0 <tcp_input+0x2b8>)
8007804: 881b ldrh r3, [r3, #0]
8007806: 3301 adds r3, #1
8007808: b29a uxth r2, r3
800780a: 4b2d ldr r3, [pc, #180] ; (80078c0 <tcp_input+0x2b8>)
800780c: 801a strh r2, [r3, #0]
if (tcplen < p->tot_len) {
800780e: 687b ldr r3, [r7, #4]
8007810: 891a ldrh r2, [r3, #8]
8007812: 4b2b ldr r3, [pc, #172] ; (80078c0 <tcp_input+0x2b8>)
8007814: 881b ldrh r3, [r3, #0]
8007816: 429a cmp r2, r3
8007818: f200 82e6 bhi.w 8007de8 <tcp_input+0x7e0>
}
}
/* Demultiplex an incoming segment. First, we check if it is destined
for an active connection. */
prev = NULL;
800781c: 2300 movs r3, #0
800781e: 61bb str r3, [r7, #24]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
8007820: 4b28 ldr r3, [pc, #160] ; (80078c4 <tcp_input+0x2bc>)
8007822: 681b ldr r3, [r3, #0]
8007824: 61fb str r3, [r7, #28]
8007826: e09d b.n 8007964 <tcp_input+0x35c>
LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED);
8007828: 69fb ldr r3, [r7, #28]
800782a: 7d1b ldrb r3, [r3, #20]
800782c: 2b00 cmp r3, #0
800782e: d105 bne.n 800783c <tcp_input+0x234>
8007830: 4b15 ldr r3, [pc, #84] ; (8007888 <tcp_input+0x280>)
8007832: 22fb movs r2, #251 ; 0xfb
8007834: 4924 ldr r1, [pc, #144] ; (80078c8 <tcp_input+0x2c0>)
8007836: 4816 ldr r0, [pc, #88] ; (8007890 <tcp_input+0x288>)
8007838: f008 fdca bl 80103d0 <printf>
LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT);
800783c: 69fb ldr r3, [r7, #28]
800783e: 7d1b ldrb r3, [r3, #20]
8007840: 2b0a cmp r3, #10
8007842: d105 bne.n 8007850 <tcp_input+0x248>
8007844: 4b10 ldr r3, [pc, #64] ; (8007888 <tcp_input+0x280>)
8007846: 22fc movs r2, #252 ; 0xfc
8007848: 4920 ldr r1, [pc, #128] ; (80078cc <tcp_input+0x2c4>)
800784a: 4811 ldr r0, [pc, #68] ; (8007890 <tcp_input+0x288>)
800784c: f008 fdc0 bl 80103d0 <printf>
LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN);
8007850: 69fb ldr r3, [r7, #28]
8007852: 7d1b ldrb r3, [r3, #20]
8007854: 2b01 cmp r3, #1
8007856: d105 bne.n 8007864 <tcp_input+0x25c>
8007858: 4b0b ldr r3, [pc, #44] ; (8007888 <tcp_input+0x280>)
800785a: 22fd movs r2, #253 ; 0xfd
800785c: 491c ldr r1, [pc, #112] ; (80078d0 <tcp_input+0x2c8>)
800785e: 480c ldr r0, [pc, #48] ; (8007890 <tcp_input+0x288>)
8007860: f008 fdb6 bl 80103d0 <printf>
/* check if PCB is bound to specific netif */
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
8007864: 69fb ldr r3, [r7, #28]
8007866: 7a1b ldrb r3, [r3, #8]
8007868: 2b00 cmp r3, #0
800786a: d033 beq.n 80078d4 <tcp_input+0x2cc>
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
800786c: 69fb ldr r3, [r7, #28]
800786e: 7a1a ldrb r2, [r3, #8]
8007870: 4b09 ldr r3, [pc, #36] ; (8007898 <tcp_input+0x290>)
8007872: 685b ldr r3, [r3, #4]
8007874: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8007878: 3301 adds r3, #1
800787a: b2db uxtb r3, r3
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
800787c: 429a cmp r2, r3
800787e: d029 beq.n 80078d4 <tcp_input+0x2cc>
prev = pcb;
8007880: 69fb ldr r3, [r7, #28]
8007882: 61bb str r3, [r7, #24]
continue;
8007884: e06b b.n 800795e <tcp_input+0x356>
8007886: bf00 nop
8007888: 08016124 .word 0x08016124
800788c: 08016158 .word 0x08016158
8007890: 08016170 .word 0x08016170
8007894: 20008c28 .word 0x20008c28
8007898: 20005670 .word 0x20005670
800789c: 20008c2c .word 0x20008c2c
80078a0: 20008c30 .word 0x20008c30
80078a4: 20008c2e .word 0x20008c2e
80078a8: 08016198 .word 0x08016198
80078ac: 080161a8 .word 0x080161a8
80078b0: 080161b4 .word 0x080161b4
80078b4: 20008c38 .word 0x20008c38
80078b8: 20008c3c .word 0x20008c3c
80078bc: 20008c44 .word 0x20008c44
80078c0: 20008c42 .word 0x20008c42
80078c4: 20008c0c .word 0x20008c0c
80078c8: 080161d4 .word 0x080161d4
80078cc: 080161fc .word 0x080161fc
80078d0: 08016228 .word 0x08016228
}
if (pcb->remote_port == tcphdr->src &&
80078d4: 69fb ldr r3, [r7, #28]
80078d6: 8b1a ldrh r2, [r3, #24]
80078d8: 4b72 ldr r3, [pc, #456] ; (8007aa4 <tcp_input+0x49c>)
80078da: 681b ldr r3, [r3, #0]
80078dc: 881b ldrh r3, [r3, #0]
80078de: b29b uxth r3, r3
80078e0: 429a cmp r2, r3
80078e2: d13a bne.n 800795a <tcp_input+0x352>
pcb->local_port == tcphdr->dest &&
80078e4: 69fb ldr r3, [r7, #28]
80078e6: 8ada ldrh r2, [r3, #22]
80078e8: 4b6e ldr r3, [pc, #440] ; (8007aa4 <tcp_input+0x49c>)
80078ea: 681b ldr r3, [r3, #0]
80078ec: 885b ldrh r3, [r3, #2]
80078ee: b29b uxth r3, r3
if (pcb->remote_port == tcphdr->src &&
80078f0: 429a cmp r2, r3
80078f2: d132 bne.n 800795a <tcp_input+0x352>
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
80078f4: 69fb ldr r3, [r7, #28]
80078f6: 685a ldr r2, [r3, #4]
80078f8: 4b6b ldr r3, [pc, #428] ; (8007aa8 <tcp_input+0x4a0>)
80078fa: 691b ldr r3, [r3, #16]
pcb->local_port == tcphdr->dest &&
80078fc: 429a cmp r2, r3
80078fe: d12c bne.n 800795a <tcp_input+0x352>
ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
8007900: 69fb ldr r3, [r7, #28]
8007902: 681a ldr r2, [r3, #0]
8007904: 4b68 ldr r3, [pc, #416] ; (8007aa8 <tcp_input+0x4a0>)
8007906: 695b ldr r3, [r3, #20]
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
8007908: 429a cmp r2, r3
800790a: d126 bne.n 800795a <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);
800790c: 69fb ldr r3, [r7, #28]
800790e: 68db ldr r3, [r3, #12]
8007910: 69fa ldr r2, [r7, #28]
8007912: 429a cmp r2, r3
8007914: d106 bne.n 8007924 <tcp_input+0x31c>
8007916: 4b65 ldr r3, [pc, #404] ; (8007aac <tcp_input+0x4a4>)
8007918: f240 120d movw r2, #269 ; 0x10d
800791c: 4964 ldr r1, [pc, #400] ; (8007ab0 <tcp_input+0x4a8>)
800791e: 4865 ldr r0, [pc, #404] ; (8007ab4 <tcp_input+0x4ac>)
8007920: f008 fd56 bl 80103d0 <printf>
if (prev != NULL) {
8007924: 69bb ldr r3, [r7, #24]
8007926: 2b00 cmp r3, #0
8007928: d00a beq.n 8007940 <tcp_input+0x338>
prev->next = pcb->next;
800792a: 69fb ldr r3, [r7, #28]
800792c: 68da ldr r2, [r3, #12]
800792e: 69bb ldr r3, [r7, #24]
8007930: 60da str r2, [r3, #12]
pcb->next = tcp_active_pcbs;
8007932: 4b61 ldr r3, [pc, #388] ; (8007ab8 <tcp_input+0x4b0>)
8007934: 681a ldr r2, [r3, #0]
8007936: 69fb ldr r3, [r7, #28]
8007938: 60da str r2, [r3, #12]
tcp_active_pcbs = pcb;
800793a: 4a5f ldr r2, [pc, #380] ; (8007ab8 <tcp_input+0x4b0>)
800793c: 69fb ldr r3, [r7, #28]
800793e: 6013 str r3, [r2, #0]
} else {
TCP_STATS_INC(tcp.cachehit);
}
LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb);
8007940: 69fb ldr r3, [r7, #28]
8007942: 68db ldr r3, [r3, #12]
8007944: 69fa ldr r2, [r7, #28]
8007946: 429a cmp r2, r3
8007948: d111 bne.n 800796e <tcp_input+0x366>
800794a: 4b58 ldr r3, [pc, #352] ; (8007aac <tcp_input+0x4a4>)
800794c: f240 1215 movw r2, #277 ; 0x115
8007950: 495a ldr r1, [pc, #360] ; (8007abc <tcp_input+0x4b4>)
8007952: 4858 ldr r0, [pc, #352] ; (8007ab4 <tcp_input+0x4ac>)
8007954: f008 fd3c bl 80103d0 <printf>
break;
8007958: e009 b.n 800796e <tcp_input+0x366>
}
prev = pcb;
800795a: 69fb ldr r3, [r7, #28]
800795c: 61bb str r3, [r7, #24]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
800795e: 69fb ldr r3, [r7, #28]
8007960: 68db ldr r3, [r3, #12]
8007962: 61fb str r3, [r7, #28]
8007964: 69fb ldr r3, [r7, #28]
8007966: 2b00 cmp r3, #0
8007968: f47f af5e bne.w 8007828 <tcp_input+0x220>
800796c: e000 b.n 8007970 <tcp_input+0x368>
break;
800796e: bf00 nop
}
if (pcb == NULL) {
8007970: 69fb ldr r3, [r7, #28]
8007972: 2b00 cmp r3, #0
8007974: f040 80aa bne.w 8007acc <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) {
8007978: 4b51 ldr r3, [pc, #324] ; (8007ac0 <tcp_input+0x4b8>)
800797a: 681b ldr r3, [r3, #0]
800797c: 61fb str r3, [r7, #28]
800797e: e03f b.n 8007a00 <tcp_input+0x3f8>
LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
8007980: 69fb ldr r3, [r7, #28]
8007982: 7d1b ldrb r3, [r3, #20]
8007984: 2b0a cmp r3, #10
8007986: d006 beq.n 8007996 <tcp_input+0x38e>
8007988: 4b48 ldr r3, [pc, #288] ; (8007aac <tcp_input+0x4a4>)
800798a: f240 121f movw r2, #287 ; 0x11f
800798e: 494d ldr r1, [pc, #308] ; (8007ac4 <tcp_input+0x4bc>)
8007990: 4848 ldr r0, [pc, #288] ; (8007ab4 <tcp_input+0x4ac>)
8007992: f008 fd1d bl 80103d0 <printf>
/* check if PCB is bound to specific netif */
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
8007996: 69fb ldr r3, [r7, #28]
8007998: 7a1b ldrb r3, [r3, #8]
800799a: 2b00 cmp r3, #0
800799c: d009 beq.n 80079b2 <tcp_input+0x3aa>
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
800799e: 69fb ldr r3, [r7, #28]
80079a0: 7a1a ldrb r2, [r3, #8]
80079a2: 4b41 ldr r3, [pc, #260] ; (8007aa8 <tcp_input+0x4a0>)
80079a4: 685b ldr r3, [r3, #4]
80079a6: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
80079aa: 3301 adds r3, #1
80079ac: b2db uxtb r3, r3
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
80079ae: 429a cmp r2, r3
80079b0: d122 bne.n 80079f8 <tcp_input+0x3f0>
continue;
}
if (pcb->remote_port == tcphdr->src &&
80079b2: 69fb ldr r3, [r7, #28]
80079b4: 8b1a ldrh r2, [r3, #24]
80079b6: 4b3b ldr r3, [pc, #236] ; (8007aa4 <tcp_input+0x49c>)
80079b8: 681b ldr r3, [r3, #0]
80079ba: 881b ldrh r3, [r3, #0]
80079bc: b29b uxth r3, r3
80079be: 429a cmp r2, r3
80079c0: d11b bne.n 80079fa <tcp_input+0x3f2>
pcb->local_port == tcphdr->dest &&
80079c2: 69fb ldr r3, [r7, #28]
80079c4: 8ada ldrh r2, [r3, #22]
80079c6: 4b37 ldr r3, [pc, #220] ; (8007aa4 <tcp_input+0x49c>)
80079c8: 681b ldr r3, [r3, #0]
80079ca: 885b ldrh r3, [r3, #2]
80079cc: b29b uxth r3, r3
if (pcb->remote_port == tcphdr->src &&
80079ce: 429a cmp r2, r3
80079d0: d113 bne.n 80079fa <tcp_input+0x3f2>
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
80079d2: 69fb ldr r3, [r7, #28]
80079d4: 685a ldr r2, [r3, #4]
80079d6: 4b34 ldr r3, [pc, #208] ; (8007aa8 <tcp_input+0x4a0>)
80079d8: 691b ldr r3, [r3, #16]
pcb->local_port == tcphdr->dest &&
80079da: 429a cmp r2, r3
80079dc: d10d bne.n 80079fa <tcp_input+0x3f2>
ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
80079de: 69fb ldr r3, [r7, #28]
80079e0: 681a ldr r2, [r3, #0]
80079e2: 4b31 ldr r3, [pc, #196] ; (8007aa8 <tcp_input+0x4a0>)
80079e4: 695b ldr r3, [r3, #20]
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
80079e6: 429a cmp r2, r3
80079e8: d107 bne.n 80079fa <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);
80079ea: 69f8 ldr r0, [r7, #28]
80079ec: f000 fb56 bl 800809c <tcp_timewait_input>
}
pbuf_free(p);
80079f0: 6878 ldr r0, [r7, #4]
80079f2: f7fd ffd1 bl 8005998 <pbuf_free>
return;
80079f6: e1fd b.n 8007df4 <tcp_input+0x7ec>
continue;
80079f8: bf00 nop
for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
80079fa: 69fb ldr r3, [r7, #28]
80079fc: 68db ldr r3, [r3, #12]
80079fe: 61fb str r3, [r7, #28]
8007a00: 69fb ldr r3, [r7, #28]
8007a02: 2b00 cmp r3, #0
8007a04: d1bc bne.n 8007980 <tcp_input+0x378>
}
}
/* Finally, if we still did not get a match, we check all PCBs that
are LISTENing for incoming connections. */
prev = NULL;
8007a06: 2300 movs r3, #0
8007a08: 61bb str r3, [r7, #24]
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
8007a0a: 4b2f ldr r3, [pc, #188] ; (8007ac8 <tcp_input+0x4c0>)
8007a0c: 681b ldr r3, [r3, #0]
8007a0e: 617b str r3, [r7, #20]
8007a10: e02a b.n 8007a68 <tcp_input+0x460>
/* check if PCB is bound to specific netif */
if ((lpcb->netif_idx != NETIF_NO_INDEX) &&
8007a12: 697b ldr r3, [r7, #20]
8007a14: 7a1b ldrb r3, [r3, #8]
8007a16: 2b00 cmp r3, #0
8007a18: d00c beq.n 8007a34 <tcp_input+0x42c>
(lpcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
8007a1a: 697b ldr r3, [r7, #20]
8007a1c: 7a1a ldrb r2, [r3, #8]
8007a1e: 4b22 ldr r3, [pc, #136] ; (8007aa8 <tcp_input+0x4a0>)
8007a20: 685b ldr r3, [r3, #4]
8007a22: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8007a26: 3301 adds r3, #1
8007a28: b2db uxtb r3, r3
if ((lpcb->netif_idx != NETIF_NO_INDEX) &&
8007a2a: 429a cmp r2, r3
8007a2c: d002 beq.n 8007a34 <tcp_input+0x42c>
prev = (struct tcp_pcb *)lpcb;
8007a2e: 697b ldr r3, [r7, #20]
8007a30: 61bb str r3, [r7, #24]
continue;
8007a32: e016 b.n 8007a62 <tcp_input+0x45a>
}
if (lpcb->local_port == tcphdr->dest) {
8007a34: 697b ldr r3, [r7, #20]
8007a36: 8ada ldrh r2, [r3, #22]
8007a38: 4b1a ldr r3, [pc, #104] ; (8007aa4 <tcp_input+0x49c>)
8007a3a: 681b ldr r3, [r3, #0]
8007a3c: 885b ldrh r3, [r3, #2]
8007a3e: b29b uxth r3, r3
8007a40: 429a cmp r2, r3
8007a42: d10c bne.n 8007a5e <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())) {
8007a44: 697b ldr r3, [r7, #20]
8007a46: 681a ldr r2, [r3, #0]
8007a48: 4b17 ldr r3, [pc, #92] ; (8007aa8 <tcp_input+0x4a0>)
8007a4a: 695b ldr r3, [r3, #20]
8007a4c: 429a cmp r2, r3
8007a4e: d00f beq.n 8007a70 <tcp_input+0x468>
/* found an exact match */
break;
} else if (ip_addr_isany(&lpcb->local_ip)) {
8007a50: 697b ldr r3, [r7, #20]
8007a52: 2b00 cmp r3, #0
8007a54: d00d beq.n 8007a72 <tcp_input+0x46a>
8007a56: 697b ldr r3, [r7, #20]
8007a58: 681b ldr r3, [r3, #0]
8007a5a: 2b00 cmp r3, #0
8007a5c: d009 beq.n 8007a72 <tcp_input+0x46a>
break;
#endif /* SO_REUSE */
}
}
}
prev = (struct tcp_pcb *)lpcb;
8007a5e: 697b ldr r3, [r7, #20]
8007a60: 61bb str r3, [r7, #24]
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
8007a62: 697b ldr r3, [r7, #20]
8007a64: 68db ldr r3, [r3, #12]
8007a66: 617b str r3, [r7, #20]
8007a68: 697b ldr r3, [r7, #20]
8007a6a: 2b00 cmp r3, #0
8007a6c: d1d1 bne.n 8007a12 <tcp_input+0x40a>
8007a6e: e000 b.n 8007a72 <tcp_input+0x46a>
break;
8007a70: 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) {
8007a72: 697b ldr r3, [r7, #20]
8007a74: 2b00 cmp r3, #0
8007a76: d029 beq.n 8007acc <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) {
8007a78: 69bb ldr r3, [r7, #24]
8007a7a: 2b00 cmp r3, #0
8007a7c: d00a beq.n 8007a94 <tcp_input+0x48c>
((struct tcp_pcb_listen *)prev)->next = lpcb->next;
8007a7e: 697b ldr r3, [r7, #20]
8007a80: 68da ldr r2, [r3, #12]
8007a82: 69bb ldr r3, [r7, #24]
8007a84: 60da str r2, [r3, #12]
/* our successor is the remainder of the listening list */
lpcb->next = tcp_listen_pcbs.listen_pcbs;
8007a86: 4b10 ldr r3, [pc, #64] ; (8007ac8 <tcp_input+0x4c0>)
8007a88: 681a ldr r2, [r3, #0]
8007a8a: 697b ldr r3, [r7, #20]
8007a8c: 60da str r2, [r3, #12]
/* put this listening pcb at the head of the listening list */
tcp_listen_pcbs.listen_pcbs = lpcb;
8007a8e: 4a0e ldr r2, [pc, #56] ; (8007ac8 <tcp_input+0x4c0>)
8007a90: 697b ldr r3, [r7, #20]
8007a92: 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);
8007a94: 6978 ldr r0, [r7, #20]
8007a96: f000 fa03 bl 8007ea0 <tcp_listen_input>
}
pbuf_free(p);
8007a9a: 6878 ldr r0, [r7, #4]
8007a9c: f7fd ff7c bl 8005998 <pbuf_free>
return;
8007aa0: e1a8 b.n 8007df4 <tcp_input+0x7ec>
8007aa2: bf00 nop
8007aa4: 20008c28 .word 0x20008c28
8007aa8: 20005670 .word 0x20005670
8007aac: 08016124 .word 0x08016124
8007ab0: 08016250 .word 0x08016250
8007ab4: 08016170 .word 0x08016170
8007ab8: 20008c0c .word 0x20008c0c
8007abc: 0801627c .word 0x0801627c
8007ac0: 20008c10 .word 0x20008c10
8007ac4: 080162a8 .word 0x080162a8
8007ac8: 20008c08 .word 0x20008c08
tcphdr_opt1len, tcphdr_opt2, p) != ERR_OK) {
pbuf_free(p);
return;
}
#endif
if (pcb != NULL) {
8007acc: 69fb ldr r3, [r7, #28]
8007ace: 2b00 cmp r3, #0
8007ad0: f000 8158 beq.w 8007d84 <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;
8007ad4: 4b95 ldr r3, [pc, #596] ; (8007d2c <tcp_input+0x724>)
8007ad6: 2200 movs r2, #0
8007ad8: 601a str r2, [r3, #0]
inseg.len = p->tot_len;
8007ada: 687b ldr r3, [r7, #4]
8007adc: 891a ldrh r2, [r3, #8]
8007ade: 4b93 ldr r3, [pc, #588] ; (8007d2c <tcp_input+0x724>)
8007ae0: 811a strh r2, [r3, #8]
inseg.p = p;
8007ae2: 4a92 ldr r2, [pc, #584] ; (8007d2c <tcp_input+0x724>)
8007ae4: 687b ldr r3, [r7, #4]
8007ae6: 6053 str r3, [r2, #4]
inseg.tcphdr = tcphdr;
8007ae8: 4b91 ldr r3, [pc, #580] ; (8007d30 <tcp_input+0x728>)
8007aea: 681b ldr r3, [r3, #0]
8007aec: 4a8f ldr r2, [pc, #572] ; (8007d2c <tcp_input+0x724>)
8007aee: 60d3 str r3, [r2, #12]
recv_data = NULL;
8007af0: 4b90 ldr r3, [pc, #576] ; (8007d34 <tcp_input+0x72c>)
8007af2: 2200 movs r2, #0
8007af4: 601a str r2, [r3, #0]
recv_flags = 0;
8007af6: 4b90 ldr r3, [pc, #576] ; (8007d38 <tcp_input+0x730>)
8007af8: 2200 movs r2, #0
8007afa: 701a strb r2, [r3, #0]
recv_acked = 0;
8007afc: 4b8f ldr r3, [pc, #572] ; (8007d3c <tcp_input+0x734>)
8007afe: 2200 movs r2, #0
8007b00: 801a strh r2, [r3, #0]
if (flags & TCP_PSH) {
8007b02: 4b8f ldr r3, [pc, #572] ; (8007d40 <tcp_input+0x738>)
8007b04: 781b ldrb r3, [r3, #0]
8007b06: f003 0308 and.w r3, r3, #8
8007b0a: 2b00 cmp r3, #0
8007b0c: d006 beq.n 8007b1c <tcp_input+0x514>
p->flags |= PBUF_FLAG_PUSH;
8007b0e: 687b ldr r3, [r7, #4]
8007b10: 7b5b ldrb r3, [r3, #13]
8007b12: f043 0301 orr.w r3, r3, #1
8007b16: b2da uxtb r2, r3
8007b18: 687b ldr r3, [r7, #4]
8007b1a: 735a strb r2, [r3, #13]
}
/* If there is data which was previously "refused" by upper layer */
if (pcb->refused_data != NULL) {
8007b1c: 69fb ldr r3, [r7, #28]
8007b1e: 6f9b ldr r3, [r3, #120] ; 0x78
8007b20: 2b00 cmp r3, #0
8007b22: d017 beq.n 8007b54 <tcp_input+0x54c>
if ((tcp_process_refused_data(pcb) == ERR_ABRT) ||
8007b24: 69f8 ldr r0, [r7, #28]
8007b26: f7ff f929 bl 8006d7c <tcp_process_refused_data>
8007b2a: 4603 mov r3, r0
8007b2c: f113 0f0d cmn.w r3, #13
8007b30: d007 beq.n 8007b42 <tcp_input+0x53a>
((pcb->refused_data != NULL) && (tcplen > 0))) {
8007b32: 69fb ldr r3, [r7, #28]
8007b34: 6f9b ldr r3, [r3, #120] ; 0x78
if ((tcp_process_refused_data(pcb) == ERR_ABRT) ||
8007b36: 2b00 cmp r3, #0
8007b38: d00c beq.n 8007b54 <tcp_input+0x54c>
((pcb->refused_data != NULL) && (tcplen > 0))) {
8007b3a: 4b82 ldr r3, [pc, #520] ; (8007d44 <tcp_input+0x73c>)
8007b3c: 881b ldrh r3, [r3, #0]
8007b3e: 2b00 cmp r3, #0
8007b40: d008 beq.n 8007b54 <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) {
8007b42: 69fb ldr r3, [r7, #28]
8007b44: 8d5b ldrh r3, [r3, #42] ; 0x2a
8007b46: 2b00 cmp r3, #0
8007b48: f040 80e3 bne.w 8007d12 <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);
8007b4c: 69f8 ldr r0, [r7, #28]
8007b4e: f003 f9ad bl 800aeac <tcp_send_empty_ack>
}
TCP_STATS_INC(tcp.drop);
MIB2_STATS_INC(mib2.tcpinerrs);
goto aborted;
8007b52: e0de b.n 8007d12 <tcp_input+0x70a>
}
}
tcp_input_pcb = pcb;
8007b54: 4a7c ldr r2, [pc, #496] ; (8007d48 <tcp_input+0x740>)
8007b56: 69fb ldr r3, [r7, #28]
8007b58: 6013 str r3, [r2, #0]
err = tcp_process(pcb);
8007b5a: 69f8 ldr r0, [r7, #28]
8007b5c: f000 fb18 bl 8008190 <tcp_process>
8007b60: 4603 mov r3, r0
8007b62: 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) {
8007b64: f997 3013 ldrsb.w r3, [r7, #19]
8007b68: f113 0f0d cmn.w r3, #13
8007b6c: f000 80d3 beq.w 8007d16 <tcp_input+0x70e>
if (recv_flags & TF_RESET) {
8007b70: 4b71 ldr r3, [pc, #452] ; (8007d38 <tcp_input+0x730>)
8007b72: 781b ldrb r3, [r3, #0]
8007b74: f003 0308 and.w r3, r3, #8
8007b78: 2b00 cmp r3, #0
8007b7a: d015 beq.n 8007ba8 <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);
8007b7c: 69fb ldr r3, [r7, #28]
8007b7e: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8007b82: 2b00 cmp r3, #0
8007b84: d008 beq.n 8007b98 <tcp_input+0x590>
8007b86: 69fb ldr r3, [r7, #28]
8007b88: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8007b8c: 69fa ldr r2, [r7, #28]
8007b8e: 6912 ldr r2, [r2, #16]
8007b90: f06f 010d mvn.w r1, #13
8007b94: 4610 mov r0, r2
8007b96: 4798 blx r3
tcp_pcb_remove(&tcp_active_pcbs, pcb);
8007b98: 69f9 ldr r1, [r7, #28]
8007b9a: 486c ldr r0, [pc, #432] ; (8007d4c <tcp_input+0x744>)
8007b9c: f7ff fbbc bl 8007318 <tcp_pcb_remove>
tcp_free(pcb);
8007ba0: 69f8 ldr r0, [r7, #28]
8007ba2: f7fe f9a9 bl 8005ef8 <tcp_free>
8007ba6: e0da b.n 8007d5e <tcp_input+0x756>
} else {
err = ERR_OK;
8007ba8: 2300 movs r3, #0
8007baa: 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) {
8007bac: 4b63 ldr r3, [pc, #396] ; (8007d3c <tcp_input+0x734>)
8007bae: 881b ldrh r3, [r3, #0]
8007bb0: 2b00 cmp r3, #0
8007bb2: d01d beq.n 8007bf0 <tcp_input+0x5e8>
while (acked > 0) {
acked16 = (u16_t)LWIP_MIN(acked, 0xffffu);
acked -= acked16;
#else
{
acked16 = recv_acked;
8007bb4: 4b61 ldr r3, [pc, #388] ; (8007d3c <tcp_input+0x734>)
8007bb6: 881b ldrh r3, [r3, #0]
8007bb8: 81fb strh r3, [r7, #14]
#endif
TCP_EVENT_SENT(pcb, (u16_t)acked16, err);
8007bba: 69fb ldr r3, [r7, #28]
8007bbc: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80
8007bc0: 2b00 cmp r3, #0
8007bc2: d00a beq.n 8007bda <tcp_input+0x5d2>
8007bc4: 69fb ldr r3, [r7, #28]
8007bc6: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80
8007bca: 69fa ldr r2, [r7, #28]
8007bcc: 6910 ldr r0, [r2, #16]
8007bce: 89fa ldrh r2, [r7, #14]
8007bd0: 69f9 ldr r1, [r7, #28]
8007bd2: 4798 blx r3
8007bd4: 4603 mov r3, r0
8007bd6: 74fb strb r3, [r7, #19]
8007bd8: e001 b.n 8007bde <tcp_input+0x5d6>
8007bda: 2300 movs r3, #0
8007bdc: 74fb strb r3, [r7, #19]
if (err == ERR_ABRT) {
8007bde: f997 3013 ldrsb.w r3, [r7, #19]
8007be2: f113 0f0d cmn.w r3, #13
8007be6: f000 8098 beq.w 8007d1a <tcp_input+0x712>
goto aborted;
}
}
recv_acked = 0;
8007bea: 4b54 ldr r3, [pc, #336] ; (8007d3c <tcp_input+0x734>)
8007bec: 2200 movs r2, #0
8007bee: 801a strh r2, [r3, #0]
}
if (tcp_input_delayed_close(pcb)) {
8007bf0: 69f8 ldr r0, [r7, #28]
8007bf2: f000 f915 bl 8007e20 <tcp_input_delayed_close>
8007bf6: 4603 mov r3, r0
8007bf8: 2b00 cmp r3, #0
8007bfa: f040 8090 bne.w 8007d1e <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) {
8007bfe: 4b4d ldr r3, [pc, #308] ; (8007d34 <tcp_input+0x72c>)
8007c00: 681b ldr r3, [r3, #0]
8007c02: 2b00 cmp r3, #0
8007c04: d041 beq.n 8007c8a <tcp_input+0x682>
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL);
8007c06: 69fb ldr r3, [r7, #28]
8007c08: 6f9b ldr r3, [r3, #120] ; 0x78
8007c0a: 2b00 cmp r3, #0
8007c0c: d006 beq.n 8007c1c <tcp_input+0x614>
8007c0e: 4b50 ldr r3, [pc, #320] ; (8007d50 <tcp_input+0x748>)
8007c10: f44f 72f3 mov.w r2, #486 ; 0x1e6
8007c14: 494f ldr r1, [pc, #316] ; (8007d54 <tcp_input+0x74c>)
8007c16: 4850 ldr r0, [pc, #320] ; (8007d58 <tcp_input+0x750>)
8007c18: f008 fbda bl 80103d0 <printf>
if (pcb->flags & TF_RXCLOSED) {
8007c1c: 69fb ldr r3, [r7, #28]
8007c1e: 8b5b ldrh r3, [r3, #26]
8007c20: f003 0310 and.w r3, r3, #16
8007c24: 2b00 cmp r3, #0
8007c26: d008 beq.n 8007c3a <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);
8007c28: 4b42 ldr r3, [pc, #264] ; (8007d34 <tcp_input+0x72c>)
8007c2a: 681b ldr r3, [r3, #0]
8007c2c: 4618 mov r0, r3
8007c2e: f7fd feb3 bl 8005998 <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);
8007c32: 69f8 ldr r0, [r7, #28]
8007c34: f7fe fc48 bl 80064c8 <tcp_abort>
goto aborted;
8007c38: e091 b.n 8007d5e <tcp_input+0x756>
}
/* Notify application that data has been received. */
TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err);
8007c3a: 69fb ldr r3, [r7, #28]
8007c3c: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8007c40: 2b00 cmp r3, #0
8007c42: d00c beq.n 8007c5e <tcp_input+0x656>
8007c44: 69fb ldr r3, [r7, #28]
8007c46: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
8007c4a: 69fb ldr r3, [r7, #28]
8007c4c: 6918 ldr r0, [r3, #16]
8007c4e: 4b39 ldr r3, [pc, #228] ; (8007d34 <tcp_input+0x72c>)
8007c50: 681a ldr r2, [r3, #0]
8007c52: 2300 movs r3, #0
8007c54: 69f9 ldr r1, [r7, #28]
8007c56: 47a0 blx r4
8007c58: 4603 mov r3, r0
8007c5a: 74fb strb r3, [r7, #19]
8007c5c: e008 b.n 8007c70 <tcp_input+0x668>
8007c5e: 4b35 ldr r3, [pc, #212] ; (8007d34 <tcp_input+0x72c>)
8007c60: 681a ldr r2, [r3, #0]
8007c62: 2300 movs r3, #0
8007c64: 69f9 ldr r1, [r7, #28]
8007c66: 2000 movs r0, #0
8007c68: f7ff f95e bl 8006f28 <tcp_recv_null>
8007c6c: 4603 mov r3, r0
8007c6e: 74fb strb r3, [r7, #19]
if (err == ERR_ABRT) {
8007c70: f997 3013 ldrsb.w r3, [r7, #19]
8007c74: f113 0f0d cmn.w r3, #13
8007c78: d053 beq.n 8007d22 <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) {
8007c7a: f997 3013 ldrsb.w r3, [r7, #19]
8007c7e: 2b00 cmp r3, #0
8007c80: d003 beq.n 8007c8a <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;
8007c82: 4b2c ldr r3, [pc, #176] ; (8007d34 <tcp_input+0x72c>)
8007c84: 681a ldr r2, [r3, #0]
8007c86: 69fb ldr r3, [r7, #28]
8007c88: 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) {
8007c8a: 4b2b ldr r3, [pc, #172] ; (8007d38 <tcp_input+0x730>)
8007c8c: 781b ldrb r3, [r3, #0]
8007c8e: f003 0320 and.w r3, r3, #32
8007c92: 2b00 cmp r3, #0
8007c94: d030 beq.n 8007cf8 <tcp_input+0x6f0>
if (pcb->refused_data != NULL) {
8007c96: 69fb ldr r3, [r7, #28]
8007c98: 6f9b ldr r3, [r3, #120] ; 0x78
8007c9a: 2b00 cmp r3, #0
8007c9c: d009 beq.n 8007cb2 <tcp_input+0x6aa>
/* Delay this if we have refused data. */
pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN;
8007c9e: 69fb ldr r3, [r7, #28]
8007ca0: 6f9b ldr r3, [r3, #120] ; 0x78
8007ca2: 7b5a ldrb r2, [r3, #13]
8007ca4: 69fb ldr r3, [r7, #28]
8007ca6: 6f9b ldr r3, [r3, #120] ; 0x78
8007ca8: f042 0220 orr.w r2, r2, #32
8007cac: b2d2 uxtb r2, r2
8007cae: 735a strb r2, [r3, #13]
8007cb0: e022 b.n 8007cf8 <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)) {
8007cb2: 69fb ldr r3, [r7, #28]
8007cb4: 8d1b ldrh r3, [r3, #40] ; 0x28
8007cb6: f5b3 6f06 cmp.w r3, #2144 ; 0x860
8007cba: d005 beq.n 8007cc8 <tcp_input+0x6c0>
pcb->rcv_wnd++;
8007cbc: 69fb ldr r3, [r7, #28]
8007cbe: 8d1b ldrh r3, [r3, #40] ; 0x28
8007cc0: 3301 adds r3, #1
8007cc2: b29a uxth r2, r3
8007cc4: 69fb ldr r3, [r7, #28]
8007cc6: 851a strh r2, [r3, #40] ; 0x28
}
TCP_EVENT_CLOSED(pcb, err);
8007cc8: 69fb ldr r3, [r7, #28]
8007cca: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8007cce: 2b00 cmp r3, #0
8007cd0: d00b beq.n 8007cea <tcp_input+0x6e2>
8007cd2: 69fb ldr r3, [r7, #28]
8007cd4: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
8007cd8: 69fb ldr r3, [r7, #28]
8007cda: 6918 ldr r0, [r3, #16]
8007cdc: 2300 movs r3, #0
8007cde: 2200 movs r2, #0
8007ce0: 69f9 ldr r1, [r7, #28]
8007ce2: 47a0 blx r4
8007ce4: 4603 mov r3, r0
8007ce6: 74fb strb r3, [r7, #19]
8007ce8: e001 b.n 8007cee <tcp_input+0x6e6>
8007cea: 2300 movs r3, #0
8007cec: 74fb strb r3, [r7, #19]
if (err == ERR_ABRT) {
8007cee: f997 3013 ldrsb.w r3, [r7, #19]
8007cf2: f113 0f0d cmn.w r3, #13
8007cf6: d016 beq.n 8007d26 <tcp_input+0x71e>
goto aborted;
}
}
}
tcp_input_pcb = NULL;
8007cf8: 4b13 ldr r3, [pc, #76] ; (8007d48 <tcp_input+0x740>)
8007cfa: 2200 movs r2, #0
8007cfc: 601a str r2, [r3, #0]
if (tcp_input_delayed_close(pcb)) {
8007cfe: 69f8 ldr r0, [r7, #28]
8007d00: f000 f88e bl 8007e20 <tcp_input_delayed_close>
8007d04: 4603 mov r3, r0
8007d06: 2b00 cmp r3, #0
8007d08: d128 bne.n 8007d5c <tcp_input+0x754>
goto aborted;
}
/* Try to send something out. */
tcp_output(pcb);
8007d0a: 69f8 ldr r0, [r7, #28]
8007d0c: f002 fac8 bl 800a2a0 <tcp_output>
8007d10: e025 b.n 8007d5e <tcp_input+0x756>
goto aborted;
8007d12: bf00 nop
8007d14: e023 b.n 8007d5e <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:
8007d16: bf00 nop
8007d18: e021 b.n 8007d5e <tcp_input+0x756>
goto aborted;
8007d1a: bf00 nop
8007d1c: e01f b.n 8007d5e <tcp_input+0x756>
goto aborted;
8007d1e: bf00 nop
8007d20: e01d b.n 8007d5e <tcp_input+0x756>
goto aborted;
8007d22: bf00 nop
8007d24: e01b b.n 8007d5e <tcp_input+0x756>
goto aborted;
8007d26: bf00 nop
8007d28: e019 b.n 8007d5e <tcp_input+0x756>
8007d2a: bf00 nop
8007d2c: 20008c18 .word 0x20008c18
8007d30: 20008c28 .word 0x20008c28
8007d34: 20008c48 .word 0x20008c48
8007d38: 20008c45 .word 0x20008c45
8007d3c: 20008c40 .word 0x20008c40
8007d40: 20008c44 .word 0x20008c44
8007d44: 20008c42 .word 0x20008c42
8007d48: 20008c4c .word 0x20008c4c
8007d4c: 20008c0c .word 0x20008c0c
8007d50: 08016124 .word 0x08016124
8007d54: 080162d8 .word 0x080162d8
8007d58: 08016170 .word 0x08016170
goto aborted;
8007d5c: bf00 nop
tcp_input_pcb = NULL;
8007d5e: 4b27 ldr r3, [pc, #156] ; (8007dfc <tcp_input+0x7f4>)
8007d60: 2200 movs r2, #0
8007d62: 601a str r2, [r3, #0]
recv_data = NULL;
8007d64: 4b26 ldr r3, [pc, #152] ; (8007e00 <tcp_input+0x7f8>)
8007d66: 2200 movs r2, #0
8007d68: 601a str r2, [r3, #0]
/* give up our reference to inseg.p */
if (inseg.p != NULL) {
8007d6a: 4b26 ldr r3, [pc, #152] ; (8007e04 <tcp_input+0x7fc>)
8007d6c: 685b ldr r3, [r3, #4]
8007d6e: 2b00 cmp r3, #0
8007d70: d03f beq.n 8007df2 <tcp_input+0x7ea>
pbuf_free(inseg.p);
8007d72: 4b24 ldr r3, [pc, #144] ; (8007e04 <tcp_input+0x7fc>)
8007d74: 685b ldr r3, [r3, #4]
8007d76: 4618 mov r0, r3
8007d78: f7fd fe0e bl 8005998 <pbuf_free>
inseg.p = NULL;
8007d7c: 4b21 ldr r3, [pc, #132] ; (8007e04 <tcp_input+0x7fc>)
8007d7e: 2200 movs r2, #0
8007d80: 605a str r2, [r3, #4]
pbuf_free(p);
}
LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane());
PERF_STOP("tcp_input");
return;
8007d82: e036 b.n 8007df2 <tcp_input+0x7ea>
if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) {
8007d84: 4b20 ldr r3, [pc, #128] ; (8007e08 <tcp_input+0x800>)
8007d86: 681b ldr r3, [r3, #0]
8007d88: 899b ldrh r3, [r3, #12]
8007d8a: b29b uxth r3, r3
8007d8c: 4618 mov r0, r3
8007d8e: f7fc fa99 bl 80042c4 <lwip_htons>
8007d92: 4603 mov r3, r0
8007d94: b2db uxtb r3, r3
8007d96: f003 0304 and.w r3, r3, #4
8007d9a: 2b00 cmp r3, #0
8007d9c: d118 bne.n 8007dd0 <tcp_input+0x7c8>
tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(),
8007d9e: 4b1b ldr r3, [pc, #108] ; (8007e0c <tcp_input+0x804>)
8007da0: 6819 ldr r1, [r3, #0]
8007da2: 4b1b ldr r3, [pc, #108] ; (8007e10 <tcp_input+0x808>)
8007da4: 881b ldrh r3, [r3, #0]
8007da6: 461a mov r2, r3
8007da8: 4b1a ldr r3, [pc, #104] ; (8007e14 <tcp_input+0x80c>)
8007daa: 681b ldr r3, [r3, #0]
8007dac: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8007dae: 4b16 ldr r3, [pc, #88] ; (8007e08 <tcp_input+0x800>)
8007db0: 681b ldr r3, [r3, #0]
tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(),
8007db2: 885b ldrh r3, [r3, #2]
8007db4: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8007db6: 4a14 ldr r2, [pc, #80] ; (8007e08 <tcp_input+0x800>)
8007db8: 6812 ldr r2, [r2, #0]
tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(),
8007dba: 8812 ldrh r2, [r2, #0]
8007dbc: b292 uxth r2, r2
8007dbe: 9202 str r2, [sp, #8]
8007dc0: 9301 str r3, [sp, #4]
8007dc2: 4b15 ldr r3, [pc, #84] ; (8007e18 <tcp_input+0x810>)
8007dc4: 9300 str r3, [sp, #0]
8007dc6: 4b15 ldr r3, [pc, #84] ; (8007e1c <tcp_input+0x814>)
8007dc8: 4602 mov r2, r0
8007dca: 2000 movs r0, #0
8007dcc: f003 f81c bl 800ae08 <tcp_rst>
pbuf_free(p);
8007dd0: 6878 ldr r0, [r7, #4]
8007dd2: f7fd fde1 bl 8005998 <pbuf_free>
return;
8007dd6: e00c b.n 8007df2 <tcp_input+0x7ea>
goto dropped;
8007dd8: bf00 nop
8007dda: e006 b.n 8007dea <tcp_input+0x7e2>
goto dropped;
8007ddc: bf00 nop
8007dde: e004 b.n 8007dea <tcp_input+0x7e2>
goto dropped;
8007de0: bf00 nop
8007de2: e002 b.n 8007dea <tcp_input+0x7e2>
goto dropped;
8007de4: bf00 nop
8007de6: e000 b.n 8007dea <tcp_input+0x7e2>
goto dropped;
8007de8: bf00 nop
dropped:
TCP_STATS_INC(tcp.drop);
MIB2_STATS_INC(mib2.tcpinerrs);
pbuf_free(p);
8007dea: 6878 ldr r0, [r7, #4]
8007dec: f7fd fdd4 bl 8005998 <pbuf_free>
8007df0: e000 b.n 8007df4 <tcp_input+0x7ec>
return;
8007df2: bf00 nop
}
8007df4: 3724 adds r7, #36 ; 0x24
8007df6: 46bd mov sp, r7
8007df8: bd90 pop {r4, r7, pc}
8007dfa: bf00 nop
8007dfc: 20008c4c .word 0x20008c4c
8007e00: 20008c48 .word 0x20008c48
8007e04: 20008c18 .word 0x20008c18
8007e08: 20008c28 .word 0x20008c28
8007e0c: 20008c3c .word 0x20008c3c
8007e10: 20008c42 .word 0x20008c42
8007e14: 20008c38 .word 0x20008c38
8007e18: 20005680 .word 0x20005680
8007e1c: 20005684 .word 0x20005684
08007e20 <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)
{
8007e20: b580 push {r7, lr}
8007e22: b082 sub sp, #8
8007e24: af00 add r7, sp, #0
8007e26: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_input_delayed_close: invalid pcb", pcb != NULL);
8007e28: 687b ldr r3, [r7, #4]
8007e2a: 2b00 cmp r3, #0
8007e2c: d106 bne.n 8007e3c <tcp_input_delayed_close+0x1c>
8007e2e: 4b17 ldr r3, [pc, #92] ; (8007e8c <tcp_input_delayed_close+0x6c>)
8007e30: f240 225a movw r2, #602 ; 0x25a
8007e34: 4916 ldr r1, [pc, #88] ; (8007e90 <tcp_input_delayed_close+0x70>)
8007e36: 4817 ldr r0, [pc, #92] ; (8007e94 <tcp_input_delayed_close+0x74>)
8007e38: f008 faca bl 80103d0 <printf>
if (recv_flags & TF_CLOSED) {
8007e3c: 4b16 ldr r3, [pc, #88] ; (8007e98 <tcp_input_delayed_close+0x78>)
8007e3e: 781b ldrb r3, [r3, #0]
8007e40: f003 0310 and.w r3, r3, #16
8007e44: 2b00 cmp r3, #0
8007e46: d01c beq.n 8007e82 <tcp_input_delayed_close+0x62>
/* The connection has been closed and we will deallocate the
PCB. */
if (!(pcb->flags & TF_RXCLOSED)) {
8007e48: 687b ldr r3, [r7, #4]
8007e4a: 8b5b ldrh r3, [r3, #26]
8007e4c: f003 0310 and.w r3, r3, #16
8007e50: 2b00 cmp r3, #0
8007e52: d10d bne.n 8007e70 <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);
8007e54: 687b ldr r3, [r7, #4]
8007e56: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8007e5a: 2b00 cmp r3, #0
8007e5c: d008 beq.n 8007e70 <tcp_input_delayed_close+0x50>
8007e5e: 687b ldr r3, [r7, #4]
8007e60: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8007e64: 687a ldr r2, [r7, #4]
8007e66: 6912 ldr r2, [r2, #16]
8007e68: f06f 010e mvn.w r1, #14
8007e6c: 4610 mov r0, r2
8007e6e: 4798 blx r3
}
tcp_pcb_remove(&tcp_active_pcbs, pcb);
8007e70: 6879 ldr r1, [r7, #4]
8007e72: 480a ldr r0, [pc, #40] ; (8007e9c <tcp_input_delayed_close+0x7c>)
8007e74: f7ff fa50 bl 8007318 <tcp_pcb_remove>
tcp_free(pcb);
8007e78: 6878 ldr r0, [r7, #4]
8007e7a: f7fe f83d bl 8005ef8 <tcp_free>
return 1;
8007e7e: 2301 movs r3, #1
8007e80: e000 b.n 8007e84 <tcp_input_delayed_close+0x64>
}
return 0;
8007e82: 2300 movs r3, #0
}
8007e84: 4618 mov r0, r3
8007e86: 3708 adds r7, #8
8007e88: 46bd mov sp, r7
8007e8a: bd80 pop {r7, pc}
8007e8c: 08016124 .word 0x08016124
8007e90: 080162f4 .word 0x080162f4
8007e94: 08016170 .word 0x08016170
8007e98: 20008c45 .word 0x20008c45
8007e9c: 20008c0c .word 0x20008c0c
08007ea0 <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)
{
8007ea0: b590 push {r4, r7, lr}
8007ea2: b08b sub sp, #44 ; 0x2c
8007ea4: af04 add r7, sp, #16
8007ea6: 6078 str r0, [r7, #4]
struct tcp_pcb *npcb;
u32_t iss;
err_t rc;
if (flags & TCP_RST) {
8007ea8: 4b6f ldr r3, [pc, #444] ; (8008068 <tcp_listen_input+0x1c8>)
8007eaa: 781b ldrb r3, [r3, #0]
8007eac: f003 0304 and.w r3, r3, #4
8007eb0: 2b00 cmp r3, #0
8007eb2: f040 80d2 bne.w 800805a <tcp_listen_input+0x1ba>
/* An incoming RST should be ignored. Return. */
return;
}
LWIP_ASSERT("tcp_listen_input: invalid pcb", pcb != NULL);
8007eb6: 687b ldr r3, [r7, #4]
8007eb8: 2b00 cmp r3, #0
8007eba: d106 bne.n 8007eca <tcp_listen_input+0x2a>
8007ebc: 4b6b ldr r3, [pc, #428] ; (800806c <tcp_listen_input+0x1cc>)
8007ebe: f240 2281 movw r2, #641 ; 0x281
8007ec2: 496b ldr r1, [pc, #428] ; (8008070 <tcp_listen_input+0x1d0>)
8007ec4: 486b ldr r0, [pc, #428] ; (8008074 <tcp_listen_input+0x1d4>)
8007ec6: f008 fa83 bl 80103d0 <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) {
8007eca: 4b67 ldr r3, [pc, #412] ; (8008068 <tcp_listen_input+0x1c8>)
8007ecc: 781b ldrb r3, [r3, #0]
8007ece: f003 0310 and.w r3, r3, #16
8007ed2: 2b00 cmp r3, #0
8007ed4: d019 beq.n 8007f0a <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(),
8007ed6: 4b68 ldr r3, [pc, #416] ; (8008078 <tcp_listen_input+0x1d8>)
8007ed8: 6819 ldr r1, [r3, #0]
8007eda: 4b68 ldr r3, [pc, #416] ; (800807c <tcp_listen_input+0x1dc>)
8007edc: 881b ldrh r3, [r3, #0]
8007ede: 461a mov r2, r3
8007ee0: 4b67 ldr r3, [pc, #412] ; (8008080 <tcp_listen_input+0x1e0>)
8007ee2: 681b ldr r3, [r3, #0]
8007ee4: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8007ee6: 4b67 ldr r3, [pc, #412] ; (8008084 <tcp_listen_input+0x1e4>)
8007ee8: 681b ldr r3, [r3, #0]
tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8007eea: 885b ldrh r3, [r3, #2]
8007eec: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8007eee: 4a65 ldr r2, [pc, #404] ; (8008084 <tcp_listen_input+0x1e4>)
8007ef0: 6812 ldr r2, [r2, #0]
tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8007ef2: 8812 ldrh r2, [r2, #0]
8007ef4: b292 uxth r2, r2
8007ef6: 9202 str r2, [sp, #8]
8007ef8: 9301 str r3, [sp, #4]
8007efa: 4b63 ldr r3, [pc, #396] ; (8008088 <tcp_listen_input+0x1e8>)
8007efc: 9300 str r3, [sp, #0]
8007efe: 4b63 ldr r3, [pc, #396] ; (800808c <tcp_listen_input+0x1ec>)
8007f00: 4602 mov r2, r0
8007f02: 6878 ldr r0, [r7, #4]
8007f04: f002 ff80 bl 800ae08 <tcp_rst>
tcp_abandon(npcb, 0);
return;
}
tcp_output(npcb);
}
return;
8007f08: e0a9 b.n 800805e <tcp_listen_input+0x1be>
} else if (flags & TCP_SYN) {
8007f0a: 4b57 ldr r3, [pc, #348] ; (8008068 <tcp_listen_input+0x1c8>)
8007f0c: 781b ldrb r3, [r3, #0]
8007f0e: f003 0302 and.w r3, r3, #2
8007f12: 2b00 cmp r3, #0
8007f14: f000 80a3 beq.w 800805e <tcp_listen_input+0x1be>
npcb = tcp_alloc(pcb->prio);
8007f18: 687b ldr r3, [r7, #4]
8007f1a: 7d5b ldrb r3, [r3, #21]
8007f1c: 4618 mov r0, r3
8007f1e: f7ff f927 bl 8007170 <tcp_alloc>
8007f22: 6178 str r0, [r7, #20]
if (npcb == NULL) {
8007f24: 697b ldr r3, [r7, #20]
8007f26: 2b00 cmp r3, #0
8007f28: d111 bne.n 8007f4e <tcp_listen_input+0xae>
TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err);
8007f2a: 687b ldr r3, [r7, #4]
8007f2c: 699b ldr r3, [r3, #24]
8007f2e: 2b00 cmp r3, #0
8007f30: d00a beq.n 8007f48 <tcp_listen_input+0xa8>
8007f32: 687b ldr r3, [r7, #4]
8007f34: 699b ldr r3, [r3, #24]
8007f36: 687a ldr r2, [r7, #4]
8007f38: 6910 ldr r0, [r2, #16]
8007f3a: f04f 32ff mov.w r2, #4294967295
8007f3e: 2100 movs r1, #0
8007f40: 4798 blx r3
8007f42: 4603 mov r3, r0
8007f44: 73bb strb r3, [r7, #14]
return;
8007f46: e08b b.n 8008060 <tcp_listen_input+0x1c0>
TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err);
8007f48: 23f0 movs r3, #240 ; 0xf0
8007f4a: 73bb strb r3, [r7, #14]
return;
8007f4c: e088 b.n 8008060 <tcp_listen_input+0x1c0>
ip_addr_copy(npcb->local_ip, *ip_current_dest_addr());
8007f4e: 4b50 ldr r3, [pc, #320] ; (8008090 <tcp_listen_input+0x1f0>)
8007f50: 695a ldr r2, [r3, #20]
8007f52: 697b ldr r3, [r7, #20]
8007f54: 601a str r2, [r3, #0]
ip_addr_copy(npcb->remote_ip, *ip_current_src_addr());
8007f56: 4b4e ldr r3, [pc, #312] ; (8008090 <tcp_listen_input+0x1f0>)
8007f58: 691a ldr r2, [r3, #16]
8007f5a: 697b ldr r3, [r7, #20]
8007f5c: 605a str r2, [r3, #4]
npcb->local_port = pcb->local_port;
8007f5e: 687b ldr r3, [r7, #4]
8007f60: 8ada ldrh r2, [r3, #22]
8007f62: 697b ldr r3, [r7, #20]
8007f64: 82da strh r2, [r3, #22]
npcb->remote_port = tcphdr->src;
8007f66: 4b47 ldr r3, [pc, #284] ; (8008084 <tcp_listen_input+0x1e4>)
8007f68: 681b ldr r3, [r3, #0]
8007f6a: 881b ldrh r3, [r3, #0]
8007f6c: b29a uxth r2, r3
8007f6e: 697b ldr r3, [r7, #20]
8007f70: 831a strh r2, [r3, #24]
npcb->state = SYN_RCVD;
8007f72: 697b ldr r3, [r7, #20]
8007f74: 2203 movs r2, #3
8007f76: 751a strb r2, [r3, #20]
npcb->rcv_nxt = seqno + 1;
8007f78: 4b41 ldr r3, [pc, #260] ; (8008080 <tcp_listen_input+0x1e0>)
8007f7a: 681b ldr r3, [r3, #0]
8007f7c: 1c5a adds r2, r3, #1
8007f7e: 697b ldr r3, [r7, #20]
8007f80: 625a str r2, [r3, #36] ; 0x24
npcb->rcv_ann_right_edge = npcb->rcv_nxt;
8007f82: 697b ldr r3, [r7, #20]
8007f84: 6a5a ldr r2, [r3, #36] ; 0x24
8007f86: 697b ldr r3, [r7, #20]
8007f88: 62da str r2, [r3, #44] ; 0x2c
iss = tcp_next_iss(npcb);
8007f8a: 6978 ldr r0, [r7, #20]
8007f8c: f7ff fa58 bl 8007440 <tcp_next_iss>
8007f90: 6138 str r0, [r7, #16]
npcb->snd_wl2 = iss;
8007f92: 697b ldr r3, [r7, #20]
8007f94: 693a ldr r2, [r7, #16]
8007f96: 659a str r2, [r3, #88] ; 0x58
npcb->snd_nxt = iss;
8007f98: 697b ldr r3, [r7, #20]
8007f9a: 693a ldr r2, [r7, #16]
8007f9c: 651a str r2, [r3, #80] ; 0x50
npcb->lastack = iss;
8007f9e: 697b ldr r3, [r7, #20]
8007fa0: 693a ldr r2, [r7, #16]
8007fa2: 645a str r2, [r3, #68] ; 0x44
npcb->snd_lbb = iss;
8007fa4: 697b ldr r3, [r7, #20]
8007fa6: 693a ldr r2, [r7, #16]
8007fa8: 65da str r2, [r3, #92] ; 0x5c
npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */
8007faa: 4b35 ldr r3, [pc, #212] ; (8008080 <tcp_listen_input+0x1e0>)
8007fac: 681b ldr r3, [r3, #0]
8007fae: 1e5a subs r2, r3, #1
8007fb0: 697b ldr r3, [r7, #20]
8007fb2: 655a str r2, [r3, #84] ; 0x54
npcb->callback_arg = pcb->callback_arg;
8007fb4: 687b ldr r3, [r7, #4]
8007fb6: 691a ldr r2, [r3, #16]
8007fb8: 697b ldr r3, [r7, #20]
8007fba: 611a str r2, [r3, #16]
npcb->listener = pcb;
8007fbc: 697b ldr r3, [r7, #20]
8007fbe: 687a ldr r2, [r7, #4]
8007fc0: 67da str r2, [r3, #124] ; 0x7c
npcb->so_options = pcb->so_options & SOF_INHERITED;
8007fc2: 687b ldr r3, [r7, #4]
8007fc4: 7a5b ldrb r3, [r3, #9]
8007fc6: f003 030c and.w r3, r3, #12
8007fca: b2da uxtb r2, r3
8007fcc: 697b ldr r3, [r7, #20]
8007fce: 725a strb r2, [r3, #9]
npcb->netif_idx = pcb->netif_idx;
8007fd0: 687b ldr r3, [r7, #4]
8007fd2: 7a1a ldrb r2, [r3, #8]
8007fd4: 697b ldr r3, [r7, #20]
8007fd6: 721a strb r2, [r3, #8]
TCP_REG_ACTIVE(npcb);
8007fd8: 4b2e ldr r3, [pc, #184] ; (8008094 <tcp_listen_input+0x1f4>)
8007fda: 681a ldr r2, [r3, #0]
8007fdc: 697b ldr r3, [r7, #20]
8007fde: 60da str r2, [r3, #12]
8007fe0: 4a2c ldr r2, [pc, #176] ; (8008094 <tcp_listen_input+0x1f4>)
8007fe2: 697b ldr r3, [r7, #20]
8007fe4: 6013 str r3, [r2, #0]
8007fe6: f003 f8d1 bl 800b18c <tcp_timer_needed>
8007fea: 4b2b ldr r3, [pc, #172] ; (8008098 <tcp_listen_input+0x1f8>)
8007fec: 2201 movs r2, #1
8007fee: 701a strb r2, [r3, #0]
tcp_parseopt(npcb);
8007ff0: 6978 ldr r0, [r7, #20]
8007ff2: f001 fd8f bl 8009b14 <tcp_parseopt>
npcb->snd_wnd = tcphdr->wnd;
8007ff6: 4b23 ldr r3, [pc, #140] ; (8008084 <tcp_listen_input+0x1e4>)
8007ff8: 681b ldr r3, [r3, #0]
8007ffa: 89db ldrh r3, [r3, #14]
8007ffc: b29a uxth r2, r3
8007ffe: 697b ldr r3, [r7, #20]
8008000: f8a3 2060 strh.w r2, [r3, #96] ; 0x60
npcb->snd_wnd_max = npcb->snd_wnd;
8008004: 697b ldr r3, [r7, #20]
8008006: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
800800a: 697b ldr r3, [r7, #20]
800800c: f8a3 2062 strh.w r2, [r3, #98] ; 0x62
npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, &npcb->remote_ip);
8008010: 697b ldr r3, [r7, #20]
8008012: 8e5c ldrh r4, [r3, #50] ; 0x32
8008014: 697b ldr r3, [r7, #20]
8008016: 3304 adds r3, #4
8008018: 4618 mov r0, r3
800801a: f006 fe2d bl 800ec78 <ip4_route>
800801e: 4601 mov r1, r0
8008020: 697b ldr r3, [r7, #20]
8008022: 3304 adds r3, #4
8008024: 461a mov r2, r3
8008026: 4620 mov r0, r4
8008028: f7ff fa30 bl 800748c <tcp_eff_send_mss_netif>
800802c: 4603 mov r3, r0
800802e: 461a mov r2, r3
8008030: 697b ldr r3, [r7, #20]
8008032: 865a strh r2, [r3, #50] ; 0x32
rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK);
8008034: 2112 movs r1, #18
8008036: 6978 ldr r0, [r7, #20]
8008038: f002 f844 bl 800a0c4 <tcp_enqueue_flags>
800803c: 4603 mov r3, r0
800803e: 73fb strb r3, [r7, #15]
if (rc != ERR_OK) {
8008040: f997 300f ldrsb.w r3, [r7, #15]
8008044: 2b00 cmp r3, #0
8008046: d004 beq.n 8008052 <tcp_listen_input+0x1b2>
tcp_abandon(npcb, 0);
8008048: 2100 movs r1, #0
800804a: 6978 ldr r0, [r7, #20]
800804c: f7fe f97e bl 800634c <tcp_abandon>
return;
8008050: e006 b.n 8008060 <tcp_listen_input+0x1c0>
tcp_output(npcb);
8008052: 6978 ldr r0, [r7, #20]
8008054: f002 f924 bl 800a2a0 <tcp_output>
return;
8008058: e001 b.n 800805e <tcp_listen_input+0x1be>
return;
800805a: bf00 nop
800805c: e000 b.n 8008060 <tcp_listen_input+0x1c0>
return;
800805e: bf00 nop
}
8008060: 371c adds r7, #28
8008062: 46bd mov sp, r7
8008064: bd90 pop {r4, r7, pc}
8008066: bf00 nop
8008068: 20008c44 .word 0x20008c44
800806c: 08016124 .word 0x08016124
8008070: 0801631c .word 0x0801631c
8008074: 08016170 .word 0x08016170
8008078: 20008c3c .word 0x20008c3c
800807c: 20008c42 .word 0x20008c42
8008080: 20008c38 .word 0x20008c38
8008084: 20008c28 .word 0x20008c28
8008088: 20005680 .word 0x20005680
800808c: 20005684 .word 0x20005684
8008090: 20005670 .word 0x20005670
8008094: 20008c0c .word 0x20008c0c
8008098: 20008c14 .word 0x20008c14
0800809c <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)
{
800809c: b580 push {r7, lr}
800809e: b086 sub sp, #24
80080a0: af04 add r7, sp, #16
80080a2: 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) {
80080a4: 4b2f ldr r3, [pc, #188] ; (8008164 <tcp_timewait_input+0xc8>)
80080a6: 781b ldrb r3, [r3, #0]
80080a8: f003 0304 and.w r3, r3, #4
80080ac: 2b00 cmp r3, #0
80080ae: d153 bne.n 8008158 <tcp_timewait_input+0xbc>
return;
}
LWIP_ASSERT("tcp_timewait_input: invalid pcb", pcb != NULL);
80080b0: 687b ldr r3, [r7, #4]
80080b2: 2b00 cmp r3, #0
80080b4: d106 bne.n 80080c4 <tcp_timewait_input+0x28>
80080b6: 4b2c ldr r3, [pc, #176] ; (8008168 <tcp_timewait_input+0xcc>)
80080b8: f240 22ee movw r2, #750 ; 0x2ee
80080bc: 492b ldr r1, [pc, #172] ; (800816c <tcp_timewait_input+0xd0>)
80080be: 482c ldr r0, [pc, #176] ; (8008170 <tcp_timewait_input+0xd4>)
80080c0: f008 f986 bl 80103d0 <printf>
/* - fourth, check the SYN bit, */
if (flags & TCP_SYN) {
80080c4: 4b27 ldr r3, [pc, #156] ; (8008164 <tcp_timewait_input+0xc8>)
80080c6: 781b ldrb r3, [r3, #0]
80080c8: f003 0302 and.w r3, r3, #2
80080cc: 2b00 cmp r3, #0
80080ce: d02a beq.n 8008126 <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)) {
80080d0: 4b28 ldr r3, [pc, #160] ; (8008174 <tcp_timewait_input+0xd8>)
80080d2: 681a ldr r2, [r3, #0]
80080d4: 687b ldr r3, [r7, #4]
80080d6: 6a5b ldr r3, [r3, #36] ; 0x24
80080d8: 1ad3 subs r3, r2, r3
80080da: 2b00 cmp r3, #0
80080dc: db2d blt.n 800813a <tcp_timewait_input+0x9e>
80080de: 4b25 ldr r3, [pc, #148] ; (8008174 <tcp_timewait_input+0xd8>)
80080e0: 681a ldr r2, [r3, #0]
80080e2: 687b ldr r3, [r7, #4]
80080e4: 6a5b ldr r3, [r3, #36] ; 0x24
80080e6: 6879 ldr r1, [r7, #4]
80080e8: 8d09 ldrh r1, [r1, #40] ; 0x28
80080ea: 440b add r3, r1
80080ec: 1ad3 subs r3, r2, r3
80080ee: 2b00 cmp r3, #0
80080f0: dc23 bgt.n 800813a <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(),
80080f2: 4b21 ldr r3, [pc, #132] ; (8008178 <tcp_timewait_input+0xdc>)
80080f4: 6819 ldr r1, [r3, #0]
80080f6: 4b21 ldr r3, [pc, #132] ; (800817c <tcp_timewait_input+0xe0>)
80080f8: 881b ldrh r3, [r3, #0]
80080fa: 461a mov r2, r3
80080fc: 4b1d ldr r3, [pc, #116] ; (8008174 <tcp_timewait_input+0xd8>)
80080fe: 681b ldr r3, [r3, #0]
8008100: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8008102: 4b1f ldr r3, [pc, #124] ; (8008180 <tcp_timewait_input+0xe4>)
8008104: 681b ldr r3, [r3, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8008106: 885b ldrh r3, [r3, #2]
8008108: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
800810a: 4a1d ldr r2, [pc, #116] ; (8008180 <tcp_timewait_input+0xe4>)
800810c: 6812 ldr r2, [r2, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
800810e: 8812 ldrh r2, [r2, #0]
8008110: b292 uxth r2, r2
8008112: 9202 str r2, [sp, #8]
8008114: 9301 str r3, [sp, #4]
8008116: 4b1b ldr r3, [pc, #108] ; (8008184 <tcp_timewait_input+0xe8>)
8008118: 9300 str r3, [sp, #0]
800811a: 4b1b ldr r3, [pc, #108] ; (8008188 <tcp_timewait_input+0xec>)
800811c: 4602 mov r2, r0
800811e: 6878 ldr r0, [r7, #4]
8008120: f002 fe72 bl 800ae08 <tcp_rst>
return;
8008124: e01b b.n 800815e <tcp_timewait_input+0xc2>
}
} else if (flags & TCP_FIN) {
8008126: 4b0f ldr r3, [pc, #60] ; (8008164 <tcp_timewait_input+0xc8>)
8008128: 781b ldrb r3, [r3, #0]
800812a: f003 0301 and.w r3, r3, #1
800812e: 2b00 cmp r3, #0
8008130: d003 beq.n 800813a <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;
8008132: 4b16 ldr r3, [pc, #88] ; (800818c <tcp_timewait_input+0xf0>)
8008134: 681a ldr r2, [r3, #0]
8008136: 687b ldr r3, [r7, #4]
8008138: 621a str r2, [r3, #32]
}
if ((tcplen > 0)) {
800813a: 4b10 ldr r3, [pc, #64] ; (800817c <tcp_timewait_input+0xe0>)
800813c: 881b ldrh r3, [r3, #0]
800813e: 2b00 cmp r3, #0
8008140: d00c beq.n 800815c <tcp_timewait_input+0xc0>
/* Acknowledge data, FIN or out-of-window SYN */
tcp_ack_now(pcb);
8008142: 687b ldr r3, [r7, #4]
8008144: 8b5b ldrh r3, [r3, #26]
8008146: f043 0302 orr.w r3, r3, #2
800814a: b29a uxth r2, r3
800814c: 687b ldr r3, [r7, #4]
800814e: 835a strh r2, [r3, #26]
tcp_output(pcb);
8008150: 6878 ldr r0, [r7, #4]
8008152: f002 f8a5 bl 800a2a0 <tcp_output>
}
return;
8008156: e001 b.n 800815c <tcp_timewait_input+0xc0>
return;
8008158: bf00 nop
800815a: e000 b.n 800815e <tcp_timewait_input+0xc2>
return;
800815c: bf00 nop
}
800815e: 3708 adds r7, #8
8008160: 46bd mov sp, r7
8008162: bd80 pop {r7, pc}
8008164: 20008c44 .word 0x20008c44
8008168: 08016124 .word 0x08016124
800816c: 0801633c .word 0x0801633c
8008170: 08016170 .word 0x08016170
8008174: 20008c38 .word 0x20008c38
8008178: 20008c3c .word 0x20008c3c
800817c: 20008c42 .word 0x20008c42
8008180: 20008c28 .word 0x20008c28
8008184: 20005680 .word 0x20005680
8008188: 20005684 .word 0x20005684
800818c: 20008c00 .word 0x20008c00
08008190 <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)
{
8008190: b590 push {r4, r7, lr}
8008192: b08d sub sp, #52 ; 0x34
8008194: af04 add r7, sp, #16
8008196: 6078 str r0, [r7, #4]
struct tcp_seg *rseg;
u8_t acceptable = 0;
8008198: 2300 movs r3, #0
800819a: 76fb strb r3, [r7, #27]
err_t err;
err = ERR_OK;
800819c: 2300 movs r3, #0
800819e: 76bb strb r3, [r7, #26]
LWIP_ASSERT("tcp_process: invalid pcb", pcb != NULL);
80081a0: 687b ldr r3, [r7, #4]
80081a2: 2b00 cmp r3, #0
80081a4: d106 bne.n 80081b4 <tcp_process+0x24>
80081a6: 4b9d ldr r3, [pc, #628] ; (800841c <tcp_process+0x28c>)
80081a8: f44f 7247 mov.w r2, #796 ; 0x31c
80081ac: 499c ldr r1, [pc, #624] ; (8008420 <tcp_process+0x290>)
80081ae: 489d ldr r0, [pc, #628] ; (8008424 <tcp_process+0x294>)
80081b0: f008 f90e bl 80103d0 <printf>
/* Process incoming RST segments. */
if (flags & TCP_RST) {
80081b4: 4b9c ldr r3, [pc, #624] ; (8008428 <tcp_process+0x298>)
80081b6: 781b ldrb r3, [r3, #0]
80081b8: f003 0304 and.w r3, r3, #4
80081bc: 2b00 cmp r3, #0
80081be: d04e beq.n 800825e <tcp_process+0xce>
/* First, determine if the reset is acceptable. */
if (pcb->state == SYN_SENT) {
80081c0: 687b ldr r3, [r7, #4]
80081c2: 7d1b ldrb r3, [r3, #20]
80081c4: 2b02 cmp r3, #2
80081c6: d108 bne.n 80081da <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) {
80081c8: 687b ldr r3, [r7, #4]
80081ca: 6d1a ldr r2, [r3, #80] ; 0x50
80081cc: 4b97 ldr r3, [pc, #604] ; (800842c <tcp_process+0x29c>)
80081ce: 681b ldr r3, [r3, #0]
80081d0: 429a cmp r2, r3
80081d2: d123 bne.n 800821c <tcp_process+0x8c>
acceptable = 1;
80081d4: 2301 movs r3, #1
80081d6: 76fb strb r3, [r7, #27]
80081d8: e020 b.n 800821c <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) {
80081da: 687b ldr r3, [r7, #4]
80081dc: 6a5a ldr r2, [r3, #36] ; 0x24
80081de: 4b94 ldr r3, [pc, #592] ; (8008430 <tcp_process+0x2a0>)
80081e0: 681b ldr r3, [r3, #0]
80081e2: 429a cmp r2, r3
80081e4: d102 bne.n 80081ec <tcp_process+0x5c>
acceptable = 1;
80081e6: 2301 movs r3, #1
80081e8: 76fb strb r3, [r7, #27]
80081ea: e017 b.n 800821c <tcp_process+0x8c>
} else if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
80081ec: 4b90 ldr r3, [pc, #576] ; (8008430 <tcp_process+0x2a0>)
80081ee: 681a ldr r2, [r3, #0]
80081f0: 687b ldr r3, [r7, #4]
80081f2: 6a5b ldr r3, [r3, #36] ; 0x24
80081f4: 1ad3 subs r3, r2, r3
80081f6: 2b00 cmp r3, #0
80081f8: db10 blt.n 800821c <tcp_process+0x8c>
80081fa: 4b8d ldr r3, [pc, #564] ; (8008430 <tcp_process+0x2a0>)
80081fc: 681a ldr r2, [r3, #0]
80081fe: 687b ldr r3, [r7, #4]
8008200: 6a5b ldr r3, [r3, #36] ; 0x24
8008202: 6879 ldr r1, [r7, #4]
8008204: 8d09 ldrh r1, [r1, #40] ; 0x28
8008206: 440b add r3, r1
8008208: 1ad3 subs r3, r2, r3
800820a: 2b00 cmp r3, #0
800820c: dc06 bgt.n 800821c <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);
800820e: 687b ldr r3, [r7, #4]
8008210: 8b5b ldrh r3, [r3, #26]
8008212: f043 0302 orr.w r3, r3, #2
8008216: b29a uxth r2, r3
8008218: 687b ldr r3, [r7, #4]
800821a: 835a strh r2, [r3, #26]
}
}
if (acceptable) {
800821c: 7efb ldrb r3, [r7, #27]
800821e: 2b00 cmp r3, #0
8008220: d01b beq.n 800825a <tcp_process+0xca>
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: Connection RESET\n"));
LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED);
8008222: 687b ldr r3, [r7, #4]
8008224: 7d1b ldrb r3, [r3, #20]
8008226: 2b00 cmp r3, #0
8008228: d106 bne.n 8008238 <tcp_process+0xa8>
800822a: 4b7c ldr r3, [pc, #496] ; (800841c <tcp_process+0x28c>)
800822c: f44f 724e mov.w r2, #824 ; 0x338
8008230: 4980 ldr r1, [pc, #512] ; (8008434 <tcp_process+0x2a4>)
8008232: 487c ldr r0, [pc, #496] ; (8008424 <tcp_process+0x294>)
8008234: f008 f8cc bl 80103d0 <printf>
recv_flags |= TF_RESET;
8008238: 4b7f ldr r3, [pc, #508] ; (8008438 <tcp_process+0x2a8>)
800823a: 781b ldrb r3, [r3, #0]
800823c: f043 0308 orr.w r3, r3, #8
8008240: b2da uxtb r2, r3
8008242: 4b7d ldr r3, [pc, #500] ; (8008438 <tcp_process+0x2a8>)
8008244: 701a strb r2, [r3, #0]
tcp_clear_flags(pcb, TF_ACK_DELAY);
8008246: 687b ldr r3, [r7, #4]
8008248: 8b5b ldrh r3, [r3, #26]
800824a: f023 0301 bic.w r3, r3, #1
800824e: b29a uxth r2, r3
8008250: 687b ldr r3, [r7, #4]
8008252: 835a strh r2, [r3, #26]
return ERR_RST;
8008254: f06f 030d mvn.w r3, #13
8008258: e37a b.n 8008950 <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;
800825a: 2300 movs r3, #0
800825c: e378 b.n 8008950 <tcp_process+0x7c0>
}
}
if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) {
800825e: 4b72 ldr r3, [pc, #456] ; (8008428 <tcp_process+0x298>)
8008260: 781b ldrb r3, [r3, #0]
8008262: f003 0302 and.w r3, r3, #2
8008266: 2b00 cmp r3, #0
8008268: d010 beq.n 800828c <tcp_process+0xfc>
800826a: 687b ldr r3, [r7, #4]
800826c: 7d1b ldrb r3, [r3, #20]
800826e: 2b02 cmp r3, #2
8008270: d00c beq.n 800828c <tcp_process+0xfc>
8008272: 687b ldr r3, [r7, #4]
8008274: 7d1b ldrb r3, [r3, #20]
8008276: 2b03 cmp r3, #3
8008278: d008 beq.n 800828c <tcp_process+0xfc>
/* Cope with new connection attempt after remote end crashed */
tcp_ack_now(pcb);
800827a: 687b ldr r3, [r7, #4]
800827c: 8b5b ldrh r3, [r3, #26]
800827e: f043 0302 orr.w r3, r3, #2
8008282: b29a uxth r2, r3
8008284: 687b ldr r3, [r7, #4]
8008286: 835a strh r2, [r3, #26]
return ERR_OK;
8008288: 2300 movs r3, #0
800828a: e361 b.n 8008950 <tcp_process+0x7c0>
}
if ((pcb->flags & TF_RXCLOSED) == 0) {
800828c: 687b ldr r3, [r7, #4]
800828e: 8b5b ldrh r3, [r3, #26]
8008290: f003 0310 and.w r3, r3, #16
8008294: 2b00 cmp r3, #0
8008296: d103 bne.n 80082a0 <tcp_process+0x110>
/* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */
pcb->tmr = tcp_ticks;
8008298: 4b68 ldr r3, [pc, #416] ; (800843c <tcp_process+0x2ac>)
800829a: 681a ldr r2, [r3, #0]
800829c: 687b ldr r3, [r7, #4]
800829e: 621a str r2, [r3, #32]
}
pcb->keep_cnt_sent = 0;
80082a0: 687b ldr r3, [r7, #4]
80082a2: 2200 movs r2, #0
80082a4: f883 209b strb.w r2, [r3, #155] ; 0x9b
pcb->persist_probe = 0;
80082a8: 687b ldr r3, [r7, #4]
80082aa: 2200 movs r2, #0
80082ac: f883 209a strb.w r2, [r3, #154] ; 0x9a
tcp_parseopt(pcb);
80082b0: 6878 ldr r0, [r7, #4]
80082b2: f001 fc2f bl 8009b14 <tcp_parseopt>
/* Do different things depending on the TCP state. */
switch (pcb->state) {
80082b6: 687b ldr r3, [r7, #4]
80082b8: 7d1b ldrb r3, [r3, #20]
80082ba: 3b02 subs r3, #2
80082bc: 2b07 cmp r3, #7
80082be: f200 8337 bhi.w 8008930 <tcp_process+0x7a0>
80082c2: a201 add r2, pc, #4 ; (adr r2, 80082c8 <tcp_process+0x138>)
80082c4: f852 f023 ldr.w pc, [r2, r3, lsl #2]
80082c8: 080082e9 .word 0x080082e9
80082cc: 08008519 .word 0x08008519
80082d0: 08008691 .word 0x08008691
80082d4: 080086bb .word 0x080086bb
80082d8: 080087df .word 0x080087df
80082dc: 08008691 .word 0x08008691
80082e0: 0800886b .word 0x0800886b
80082e4: 080088fb .word 0x080088fb
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)
80082e8: 4b4f ldr r3, [pc, #316] ; (8008428 <tcp_process+0x298>)
80082ea: 781b ldrb r3, [r3, #0]
80082ec: f003 0310 and.w r3, r3, #16
80082f0: 2b00 cmp r3, #0
80082f2: f000 80e4 beq.w 80084be <tcp_process+0x32e>
80082f6: 4b4c ldr r3, [pc, #304] ; (8008428 <tcp_process+0x298>)
80082f8: 781b ldrb r3, [r3, #0]
80082fa: f003 0302 and.w r3, r3, #2
80082fe: 2b00 cmp r3, #0
8008300: f000 80dd beq.w 80084be <tcp_process+0x32e>
&& (ackno == pcb->lastack + 1)) {
8008304: 687b ldr r3, [r7, #4]
8008306: 6c5b ldr r3, [r3, #68] ; 0x44
8008308: 1c5a adds r2, r3, #1
800830a: 4b48 ldr r3, [pc, #288] ; (800842c <tcp_process+0x29c>)
800830c: 681b ldr r3, [r3, #0]
800830e: 429a cmp r2, r3
8008310: f040 80d5 bne.w 80084be <tcp_process+0x32e>
pcb->rcv_nxt = seqno + 1;
8008314: 4b46 ldr r3, [pc, #280] ; (8008430 <tcp_process+0x2a0>)
8008316: 681b ldr r3, [r3, #0]
8008318: 1c5a adds r2, r3, #1
800831a: 687b ldr r3, [r7, #4]
800831c: 625a str r2, [r3, #36] ; 0x24
pcb->rcv_ann_right_edge = pcb->rcv_nxt;
800831e: 687b ldr r3, [r7, #4]
8008320: 6a5a ldr r2, [r3, #36] ; 0x24
8008322: 687b ldr r3, [r7, #4]
8008324: 62da str r2, [r3, #44] ; 0x2c
pcb->lastack = ackno;
8008326: 4b41 ldr r3, [pc, #260] ; (800842c <tcp_process+0x29c>)
8008328: 681a ldr r2, [r3, #0]
800832a: 687b ldr r3, [r7, #4]
800832c: 645a str r2, [r3, #68] ; 0x44
pcb->snd_wnd = tcphdr->wnd;
800832e: 4b44 ldr r3, [pc, #272] ; (8008440 <tcp_process+0x2b0>)
8008330: 681b ldr r3, [r3, #0]
8008332: 89db ldrh r3, [r3, #14]
8008334: b29a uxth r2, r3
8008336: 687b ldr r3, [r7, #4]
8008338: f8a3 2060 strh.w r2, [r3, #96] ; 0x60
pcb->snd_wnd_max = pcb->snd_wnd;
800833c: 687b ldr r3, [r7, #4]
800833e: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
8008342: 687b ldr r3, [r7, #4]
8008344: f8a3 2062 strh.w r2, [r3, #98] ; 0x62
pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */
8008348: 4b39 ldr r3, [pc, #228] ; (8008430 <tcp_process+0x2a0>)
800834a: 681b ldr r3, [r3, #0]
800834c: 1e5a subs r2, r3, #1
800834e: 687b ldr r3, [r7, #4]
8008350: 655a str r2, [r3, #84] ; 0x54
pcb->state = ESTABLISHED;
8008352: 687b ldr r3, [r7, #4]
8008354: 2204 movs r2, #4
8008356: 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);
8008358: 687b ldr r3, [r7, #4]
800835a: 8e5c ldrh r4, [r3, #50] ; 0x32
800835c: 687b ldr r3, [r7, #4]
800835e: 3304 adds r3, #4
8008360: 4618 mov r0, r3
8008362: f006 fc89 bl 800ec78 <ip4_route>
8008366: 4601 mov r1, r0
8008368: 687b ldr r3, [r7, #4]
800836a: 3304 adds r3, #4
800836c: 461a mov r2, r3
800836e: 4620 mov r0, r4
8008370: f7ff f88c bl 800748c <tcp_eff_send_mss_netif>
8008374: 4603 mov r3, r0
8008376: 461a mov r2, r3
8008378: 687b ldr r3, [r7, #4]
800837a: 865a strh r2, [r3, #50] ; 0x32
#endif /* TCP_CALCULATE_EFF_SEND_MSS */
pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
800837c: 687b ldr r3, [r7, #4]
800837e: 8e5b ldrh r3, [r3, #50] ; 0x32
8008380: 009a lsls r2, r3, #2
8008382: 687b ldr r3, [r7, #4]
8008384: 8e5b ldrh r3, [r3, #50] ; 0x32
8008386: 005b lsls r3, r3, #1
8008388: f241 111c movw r1, #4380 ; 0x111c
800838c: 428b cmp r3, r1
800838e: bf38 it cc
8008390: 460b movcc r3, r1
8008392: 429a cmp r2, r3
8008394: d204 bcs.n 80083a0 <tcp_process+0x210>
8008396: 687b ldr r3, [r7, #4]
8008398: 8e5b ldrh r3, [r3, #50] ; 0x32
800839a: 009b lsls r3, r3, #2
800839c: b29b uxth r3, r3
800839e: e00d b.n 80083bc <tcp_process+0x22c>
80083a0: 687b ldr r3, [r7, #4]
80083a2: 8e5b ldrh r3, [r3, #50] ; 0x32
80083a4: 005b lsls r3, r3, #1
80083a6: f241 121c movw r2, #4380 ; 0x111c
80083aa: 4293 cmp r3, r2
80083ac: d904 bls.n 80083b8 <tcp_process+0x228>
80083ae: 687b ldr r3, [r7, #4]
80083b0: 8e5b ldrh r3, [r3, #50] ; 0x32
80083b2: 005b lsls r3, r3, #1
80083b4: b29b uxth r3, r3
80083b6: e001 b.n 80083bc <tcp_process+0x22c>
80083b8: f241 131c movw r3, #4380 ; 0x111c
80083bc: 687a ldr r2, [r7, #4]
80083be: 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));
80083c2: 687b ldr r3, [r7, #4]
80083c4: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
80083c8: 2b00 cmp r3, #0
80083ca: d106 bne.n 80083da <tcp_process+0x24a>
80083cc: 4b13 ldr r3, [pc, #76] ; (800841c <tcp_process+0x28c>)
80083ce: f44f 725b mov.w r2, #876 ; 0x36c
80083d2: 491c ldr r1, [pc, #112] ; (8008444 <tcp_process+0x2b4>)
80083d4: 4813 ldr r0, [pc, #76] ; (8008424 <tcp_process+0x294>)
80083d6: f007 fffb bl 80103d0 <printf>
--pcb->snd_queuelen;
80083da: 687b ldr r3, [r7, #4]
80083dc: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
80083e0: 3b01 subs r3, #1
80083e2: b29a uxth r2, r3
80083e4: 687b ldr r3, [r7, #4]
80083e6: 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;
80083ea: 687b ldr r3, [r7, #4]
80083ec: 6f1b ldr r3, [r3, #112] ; 0x70
80083ee: 61fb str r3, [r7, #28]
if (rseg == NULL) {
80083f0: 69fb ldr r3, [r7, #28]
80083f2: 2b00 cmp r3, #0
80083f4: d12a bne.n 800844c <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;
80083f6: 687b ldr r3, [r7, #4]
80083f8: 6edb ldr r3, [r3, #108] ; 0x6c
80083fa: 61fb str r3, [r7, #28]
LWIP_ASSERT("no segment to free", rseg != NULL);
80083fc: 69fb ldr r3, [r7, #28]
80083fe: 2b00 cmp r3, #0
8008400: d106 bne.n 8008410 <tcp_process+0x280>
8008402: 4b06 ldr r3, [pc, #24] ; (800841c <tcp_process+0x28c>)
8008404: f44f 725d mov.w r2, #884 ; 0x374
8008408: 490f ldr r1, [pc, #60] ; (8008448 <tcp_process+0x2b8>)
800840a: 4806 ldr r0, [pc, #24] ; (8008424 <tcp_process+0x294>)
800840c: f007 ffe0 bl 80103d0 <printf>
pcb->unsent = rseg->next;
8008410: 69fb ldr r3, [r7, #28]
8008412: 681a ldr r2, [r3, #0]
8008414: 687b ldr r3, [r7, #4]
8008416: 66da str r2, [r3, #108] ; 0x6c
8008418: e01c b.n 8008454 <tcp_process+0x2c4>
800841a: bf00 nop
800841c: 08016124 .word 0x08016124
8008420: 0801635c .word 0x0801635c
8008424: 08016170 .word 0x08016170
8008428: 20008c44 .word 0x20008c44
800842c: 20008c3c .word 0x20008c3c
8008430: 20008c38 .word 0x20008c38
8008434: 08016378 .word 0x08016378
8008438: 20008c45 .word 0x20008c45
800843c: 20008c00 .word 0x20008c00
8008440: 20008c28 .word 0x20008c28
8008444: 08016398 .word 0x08016398
8008448: 080163b0 .word 0x080163b0
} else {
pcb->unacked = rseg->next;
800844c: 69fb ldr r3, [r7, #28]
800844e: 681a ldr r2, [r3, #0]
8008450: 687b ldr r3, [r7, #4]
8008452: 671a str r2, [r3, #112] ; 0x70
}
tcp_seg_free(rseg);
8008454: 69f8 ldr r0, [r7, #28]
8008456: f7fe fd22 bl 8006e9e <tcp_seg_free>
/* If there's nothing left to acknowledge, stop the retransmit
timer, otherwise reset it to start again */
if (pcb->unacked == NULL) {
800845a: 687b ldr r3, [r7, #4]
800845c: 6f1b ldr r3, [r3, #112] ; 0x70
800845e: 2b00 cmp r3, #0
8008460: d104 bne.n 800846c <tcp_process+0x2dc>
pcb->rtime = -1;
8008462: 687b ldr r3, [r7, #4]
8008464: f64f 72ff movw r2, #65535 ; 0xffff
8008468: 861a strh r2, [r3, #48] ; 0x30
800846a: e006 b.n 800847a <tcp_process+0x2ea>
} else {
pcb->rtime = 0;
800846c: 687b ldr r3, [r7, #4]
800846e: 2200 movs r2, #0
8008470: 861a strh r2, [r3, #48] ; 0x30
pcb->nrtx = 0;
8008472: 687b ldr r3, [r7, #4]
8008474: 2200 movs r2, #0
8008476: 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);
800847a: 687b ldr r3, [r7, #4]
800847c: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8008480: 2b00 cmp r3, #0
8008482: d00a beq.n 800849a <tcp_process+0x30a>
8008484: 687b ldr r3, [r7, #4]
8008486: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
800848a: 687a ldr r2, [r7, #4]
800848c: 6910 ldr r0, [r2, #16]
800848e: 2200 movs r2, #0
8008490: 6879 ldr r1, [r7, #4]
8008492: 4798 blx r3
8008494: 4603 mov r3, r0
8008496: 76bb strb r3, [r7, #26]
8008498: e001 b.n 800849e <tcp_process+0x30e>
800849a: 2300 movs r3, #0
800849c: 76bb strb r3, [r7, #26]
if (err == ERR_ABRT) {
800849e: f997 301a ldrsb.w r3, [r7, #26]
80084a2: f113 0f0d cmn.w r3, #13
80084a6: d102 bne.n 80084ae <tcp_process+0x31e>
return ERR_ABRT;
80084a8: f06f 030c mvn.w r3, #12
80084ac: e250 b.n 8008950 <tcp_process+0x7c0>
}
tcp_ack_now(pcb);
80084ae: 687b ldr r3, [r7, #4]
80084b0: 8b5b ldrh r3, [r3, #26]
80084b2: f043 0302 orr.w r3, r3, #2
80084b6: b29a uxth r2, r3
80084b8: 687b ldr r3, [r7, #4]
80084ba: 835a strh r2, [r3, #26]
if (pcb->nrtx < TCP_SYNMAXRTX) {
pcb->rtime = 0;
tcp_rexmit_rto(pcb);
}
}
break;
80084bc: e23a b.n 8008934 <tcp_process+0x7a4>
else if (flags & TCP_ACK) {
80084be: 4b98 ldr r3, [pc, #608] ; (8008720 <tcp_process+0x590>)
80084c0: 781b ldrb r3, [r3, #0]
80084c2: f003 0310 and.w r3, r3, #16
80084c6: 2b00 cmp r3, #0
80084c8: f000 8234 beq.w 8008934 <tcp_process+0x7a4>
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
80084cc: 4b95 ldr r3, [pc, #596] ; (8008724 <tcp_process+0x594>)
80084ce: 6819 ldr r1, [r3, #0]
80084d0: 4b95 ldr r3, [pc, #596] ; (8008728 <tcp_process+0x598>)
80084d2: 881b ldrh r3, [r3, #0]
80084d4: 461a mov r2, r3
80084d6: 4b95 ldr r3, [pc, #596] ; (800872c <tcp_process+0x59c>)
80084d8: 681b ldr r3, [r3, #0]
80084da: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
80084dc: 4b94 ldr r3, [pc, #592] ; (8008730 <tcp_process+0x5a0>)
80084de: 681b ldr r3, [r3, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
80084e0: 885b ldrh r3, [r3, #2]
80084e2: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
80084e4: 4a92 ldr r2, [pc, #584] ; (8008730 <tcp_process+0x5a0>)
80084e6: 6812 ldr r2, [r2, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
80084e8: 8812 ldrh r2, [r2, #0]
80084ea: b292 uxth r2, r2
80084ec: 9202 str r2, [sp, #8]
80084ee: 9301 str r3, [sp, #4]
80084f0: 4b90 ldr r3, [pc, #576] ; (8008734 <tcp_process+0x5a4>)
80084f2: 9300 str r3, [sp, #0]
80084f4: 4b90 ldr r3, [pc, #576] ; (8008738 <tcp_process+0x5a8>)
80084f6: 4602 mov r2, r0
80084f8: 6878 ldr r0, [r7, #4]
80084fa: f002 fc85 bl 800ae08 <tcp_rst>
if (pcb->nrtx < TCP_SYNMAXRTX) {
80084fe: 687b ldr r3, [r7, #4]
8008500: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
8008504: 2b05 cmp r3, #5
8008506: f200 8215 bhi.w 8008934 <tcp_process+0x7a4>
pcb->rtime = 0;
800850a: 687b ldr r3, [r7, #4]
800850c: 2200 movs r2, #0
800850e: 861a strh r2, [r3, #48] ; 0x30
tcp_rexmit_rto(pcb);
8008510: 6878 ldr r0, [r7, #4]
8008512: f002 fa4f bl 800a9b4 <tcp_rexmit_rto>
break;
8008516: e20d b.n 8008934 <tcp_process+0x7a4>
case SYN_RCVD:
if (flags & TCP_ACK) {
8008518: 4b81 ldr r3, [pc, #516] ; (8008720 <tcp_process+0x590>)
800851a: 781b ldrb r3, [r3, #0]
800851c: f003 0310 and.w r3, r3, #16
8008520: 2b00 cmp r3, #0
8008522: f000 80a1 beq.w 8008668 <tcp_process+0x4d8>
/* expected ACK number? */
if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
8008526: 4b7f ldr r3, [pc, #508] ; (8008724 <tcp_process+0x594>)
8008528: 681a ldr r2, [r3, #0]
800852a: 687b ldr r3, [r7, #4]
800852c: 6c5b ldr r3, [r3, #68] ; 0x44
800852e: 1ad3 subs r3, r2, r3
8008530: 3b01 subs r3, #1
8008532: 2b00 cmp r3, #0
8008534: db7e blt.n 8008634 <tcp_process+0x4a4>
8008536: 4b7b ldr r3, [pc, #492] ; (8008724 <tcp_process+0x594>)
8008538: 681a ldr r2, [r3, #0]
800853a: 687b ldr r3, [r7, #4]
800853c: 6d1b ldr r3, [r3, #80] ; 0x50
800853e: 1ad3 subs r3, r2, r3
8008540: 2b00 cmp r3, #0
8008542: dc77 bgt.n 8008634 <tcp_process+0x4a4>
pcb->state = ESTABLISHED;
8008544: 687b ldr r3, [r7, #4]
8008546: 2204 movs r2, #4
8008548: 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) {
800854a: 687b ldr r3, [r7, #4]
800854c: 6fdb ldr r3, [r3, #124] ; 0x7c
800854e: 2b00 cmp r3, #0
8008550: d102 bne.n 8008558 <tcp_process+0x3c8>
/* listen pcb might be closed by now */
err = ERR_VAL;
8008552: 23fa movs r3, #250 ; 0xfa
8008554: 76bb strb r3, [r7, #26]
8008556: e01d b.n 8008594 <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);
8008558: 687b ldr r3, [r7, #4]
800855a: 6fdb ldr r3, [r3, #124] ; 0x7c
800855c: 699b ldr r3, [r3, #24]
800855e: 2b00 cmp r3, #0
8008560: d106 bne.n 8008570 <tcp_process+0x3e0>
8008562: 4b76 ldr r3, [pc, #472] ; (800873c <tcp_process+0x5ac>)
8008564: f44f 726a mov.w r2, #936 ; 0x3a8
8008568: 4975 ldr r1, [pc, #468] ; (8008740 <tcp_process+0x5b0>)
800856a: 4876 ldr r0, [pc, #472] ; (8008744 <tcp_process+0x5b4>)
800856c: f007 ff30 bl 80103d0 <printf>
#endif
tcp_backlog_accepted(pcb);
/* Call the accept function. */
TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err);
8008570: 687b ldr r3, [r7, #4]
8008572: 6fdb ldr r3, [r3, #124] ; 0x7c
8008574: 699b ldr r3, [r3, #24]
8008576: 2b00 cmp r3, #0
8008578: d00a beq.n 8008590 <tcp_process+0x400>
800857a: 687b ldr r3, [r7, #4]
800857c: 6fdb ldr r3, [r3, #124] ; 0x7c
800857e: 699b ldr r3, [r3, #24]
8008580: 687a ldr r2, [r7, #4]
8008582: 6910 ldr r0, [r2, #16]
8008584: 2200 movs r2, #0
8008586: 6879 ldr r1, [r7, #4]
8008588: 4798 blx r3
800858a: 4603 mov r3, r0
800858c: 76bb strb r3, [r7, #26]
800858e: e001 b.n 8008594 <tcp_process+0x404>
8008590: 23f0 movs r3, #240 ; 0xf0
8008592: 76bb strb r3, [r7, #26]
}
if (err != ERR_OK) {
8008594: f997 301a ldrsb.w r3, [r7, #26]
8008598: 2b00 cmp r3, #0
800859a: d00a beq.n 80085b2 <tcp_process+0x422>
/* If the accept function returns with an error, we abort
* the connection. */
/* Already aborted? */
if (err != ERR_ABRT) {
800859c: f997 301a ldrsb.w r3, [r7, #26]
80085a0: f113 0f0d cmn.w r3, #13
80085a4: d002 beq.n 80085ac <tcp_process+0x41c>
tcp_abort(pcb);
80085a6: 6878 ldr r0, [r7, #4]
80085a8: f7fd ff8e bl 80064c8 <tcp_abort>
}
return ERR_ABRT;
80085ac: f06f 030c mvn.w r3, #12
80085b0: e1ce b.n 8008950 <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);
80085b2: 6878 ldr r0, [r7, #4]
80085b4: f000 fae0 bl 8008b78 <tcp_receive>
/* Prevent ACK for SYN to generate a sent event */
if (recv_acked != 0) {
80085b8: 4b63 ldr r3, [pc, #396] ; (8008748 <tcp_process+0x5b8>)
80085ba: 881b ldrh r3, [r3, #0]
80085bc: 2b00 cmp r3, #0
80085be: d005 beq.n 80085cc <tcp_process+0x43c>
recv_acked--;
80085c0: 4b61 ldr r3, [pc, #388] ; (8008748 <tcp_process+0x5b8>)
80085c2: 881b ldrh r3, [r3, #0]
80085c4: 3b01 subs r3, #1
80085c6: b29a uxth r2, r3
80085c8: 4b5f ldr r3, [pc, #380] ; (8008748 <tcp_process+0x5b8>)
80085ca: 801a strh r2, [r3, #0]
}
pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
80085cc: 687b ldr r3, [r7, #4]
80085ce: 8e5b ldrh r3, [r3, #50] ; 0x32
80085d0: 009a lsls r2, r3, #2
80085d2: 687b ldr r3, [r7, #4]
80085d4: 8e5b ldrh r3, [r3, #50] ; 0x32
80085d6: 005b lsls r3, r3, #1
80085d8: f241 111c movw r1, #4380 ; 0x111c
80085dc: 428b cmp r3, r1
80085de: bf38 it cc
80085e0: 460b movcc r3, r1
80085e2: 429a cmp r2, r3
80085e4: d204 bcs.n 80085f0 <tcp_process+0x460>
80085e6: 687b ldr r3, [r7, #4]
80085e8: 8e5b ldrh r3, [r3, #50] ; 0x32
80085ea: 009b lsls r3, r3, #2
80085ec: b29b uxth r3, r3
80085ee: e00d b.n 800860c <tcp_process+0x47c>
80085f0: 687b ldr r3, [r7, #4]
80085f2: 8e5b ldrh r3, [r3, #50] ; 0x32
80085f4: 005b lsls r3, r3, #1
80085f6: f241 121c movw r2, #4380 ; 0x111c
80085fa: 4293 cmp r3, r2
80085fc: d904 bls.n 8008608 <tcp_process+0x478>
80085fe: 687b ldr r3, [r7, #4]
8008600: 8e5b ldrh r3, [r3, #50] ; 0x32
8008602: 005b lsls r3, r3, #1
8008604: b29b uxth r3, r3
8008606: e001 b.n 800860c <tcp_process+0x47c>
8008608: f241 131c movw r3, #4380 ; 0x111c
800860c: 687a ldr r2, [r7, #4]
800860e: 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) {
8008612: 4b4e ldr r3, [pc, #312] ; (800874c <tcp_process+0x5bc>)
8008614: 781b ldrb r3, [r3, #0]
8008616: f003 0320 and.w r3, r3, #32
800861a: 2b00 cmp r3, #0
800861c: d037 beq.n 800868e <tcp_process+0x4fe>
tcp_ack_now(pcb);
800861e: 687b ldr r3, [r7, #4]
8008620: 8b5b ldrh r3, [r3, #26]
8008622: f043 0302 orr.w r3, r3, #2
8008626: b29a uxth r2, r3
8008628: 687b ldr r3, [r7, #4]
800862a: 835a strh r2, [r3, #26]
pcb->state = CLOSE_WAIT;
800862c: 687b ldr r3, [r7, #4]
800862e: 2207 movs r2, #7
8008630: 751a strb r2, [r3, #20]
if (recv_flags & TF_GOT_FIN) {
8008632: e02c b.n 800868e <tcp_process+0x4fe>
}
} else {
/* incorrect ACK number, send RST */
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8008634: 4b3b ldr r3, [pc, #236] ; (8008724 <tcp_process+0x594>)
8008636: 6819 ldr r1, [r3, #0]
8008638: 4b3b ldr r3, [pc, #236] ; (8008728 <tcp_process+0x598>)
800863a: 881b ldrh r3, [r3, #0]
800863c: 461a mov r2, r3
800863e: 4b3b ldr r3, [pc, #236] ; (800872c <tcp_process+0x59c>)
8008640: 681b ldr r3, [r3, #0]
8008642: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8008644: 4b3a ldr r3, [pc, #232] ; (8008730 <tcp_process+0x5a0>)
8008646: 681b ldr r3, [r3, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8008648: 885b ldrh r3, [r3, #2]
800864a: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
800864c: 4a38 ldr r2, [pc, #224] ; (8008730 <tcp_process+0x5a0>)
800864e: 6812 ldr r2, [r2, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8008650: 8812 ldrh r2, [r2, #0]
8008652: b292 uxth r2, r2
8008654: 9202 str r2, [sp, #8]
8008656: 9301 str r3, [sp, #4]
8008658: 4b36 ldr r3, [pc, #216] ; (8008734 <tcp_process+0x5a4>)
800865a: 9300 str r3, [sp, #0]
800865c: 4b36 ldr r3, [pc, #216] ; (8008738 <tcp_process+0x5a8>)
800865e: 4602 mov r2, r0
8008660: 6878 ldr r0, [r7, #4]
8008662: f002 fbd1 bl 800ae08 <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;
8008666: e167 b.n 8008938 <tcp_process+0x7a8>
} else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) {
8008668: 4b2d ldr r3, [pc, #180] ; (8008720 <tcp_process+0x590>)
800866a: 781b ldrb r3, [r3, #0]
800866c: f003 0302 and.w r3, r3, #2
8008670: 2b00 cmp r3, #0
8008672: f000 8161 beq.w 8008938 <tcp_process+0x7a8>
8008676: 687b ldr r3, [r7, #4]
8008678: 6a5b ldr r3, [r3, #36] ; 0x24
800867a: 1e5a subs r2, r3, #1
800867c: 4b2b ldr r3, [pc, #172] ; (800872c <tcp_process+0x59c>)
800867e: 681b ldr r3, [r3, #0]
8008680: 429a cmp r2, r3
8008682: f040 8159 bne.w 8008938 <tcp_process+0x7a8>
tcp_rexmit(pcb);
8008686: 6878 ldr r0, [r7, #4]
8008688: f002 f9b6 bl 800a9f8 <tcp_rexmit>
break;
800868c: e154 b.n 8008938 <tcp_process+0x7a8>
800868e: e153 b.n 8008938 <tcp_process+0x7a8>
case CLOSE_WAIT:
/* FALLTHROUGH */
case ESTABLISHED:
tcp_receive(pcb);
8008690: 6878 ldr r0, [r7, #4]
8008692: f000 fa71 bl 8008b78 <tcp_receive>
if (recv_flags & TF_GOT_FIN) { /* passive close */
8008696: 4b2d ldr r3, [pc, #180] ; (800874c <tcp_process+0x5bc>)
8008698: 781b ldrb r3, [r3, #0]
800869a: f003 0320 and.w r3, r3, #32
800869e: 2b00 cmp r3, #0
80086a0: f000 814c beq.w 800893c <tcp_process+0x7ac>
tcp_ack_now(pcb);
80086a4: 687b ldr r3, [r7, #4]
80086a6: 8b5b ldrh r3, [r3, #26]
80086a8: f043 0302 orr.w r3, r3, #2
80086ac: b29a uxth r2, r3
80086ae: 687b ldr r3, [r7, #4]
80086b0: 835a strh r2, [r3, #26]
pcb->state = CLOSE_WAIT;
80086b2: 687b ldr r3, [r7, #4]
80086b4: 2207 movs r2, #7
80086b6: 751a strb r2, [r3, #20]
}
break;
80086b8: e140 b.n 800893c <tcp_process+0x7ac>
case FIN_WAIT_1:
tcp_receive(pcb);
80086ba: 6878 ldr r0, [r7, #4]
80086bc: f000 fa5c bl 8008b78 <tcp_receive>
if (recv_flags & TF_GOT_FIN) {
80086c0: 4b22 ldr r3, [pc, #136] ; (800874c <tcp_process+0x5bc>)
80086c2: 781b ldrb r3, [r3, #0]
80086c4: f003 0320 and.w r3, r3, #32
80086c8: 2b00 cmp r3, #0
80086ca: d071 beq.n 80087b0 <tcp_process+0x620>
if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
80086cc: 4b14 ldr r3, [pc, #80] ; (8008720 <tcp_process+0x590>)
80086ce: 781b ldrb r3, [r3, #0]
80086d0: f003 0310 and.w r3, r3, #16
80086d4: 2b00 cmp r3, #0
80086d6: d060 beq.n 800879a <tcp_process+0x60a>
80086d8: 687b ldr r3, [r7, #4]
80086da: 6d1a ldr r2, [r3, #80] ; 0x50
80086dc: 4b11 ldr r3, [pc, #68] ; (8008724 <tcp_process+0x594>)
80086de: 681b ldr r3, [r3, #0]
80086e0: 429a cmp r2, r3
80086e2: d15a bne.n 800879a <tcp_process+0x60a>
pcb->unsent == NULL) {
80086e4: 687b ldr r3, [r7, #4]
80086e6: 6edb ldr r3, [r3, #108] ; 0x6c
if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
80086e8: 2b00 cmp r3, #0
80086ea: d156 bne.n 800879a <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);
80086ec: 687b ldr r3, [r7, #4]
80086ee: 8b5b ldrh r3, [r3, #26]
80086f0: f043 0302 orr.w r3, r3, #2
80086f4: b29a uxth r2, r3
80086f6: 687b ldr r3, [r7, #4]
80086f8: 835a strh r2, [r3, #26]
tcp_pcb_purge(pcb);
80086fa: 6878 ldr r0, [r7, #4]
80086fc: f7fe fdbc bl 8007278 <tcp_pcb_purge>
TCP_RMV_ACTIVE(pcb);
8008700: 4b13 ldr r3, [pc, #76] ; (8008750 <tcp_process+0x5c0>)
8008702: 681b ldr r3, [r3, #0]
8008704: 687a ldr r2, [r7, #4]
8008706: 429a cmp r2, r3
8008708: d105 bne.n 8008716 <tcp_process+0x586>
800870a: 4b11 ldr r3, [pc, #68] ; (8008750 <tcp_process+0x5c0>)
800870c: 681b ldr r3, [r3, #0]
800870e: 68db ldr r3, [r3, #12]
8008710: 4a0f ldr r2, [pc, #60] ; (8008750 <tcp_process+0x5c0>)
8008712: 6013 str r3, [r2, #0]
8008714: e02e b.n 8008774 <tcp_process+0x5e4>
8008716: 4b0e ldr r3, [pc, #56] ; (8008750 <tcp_process+0x5c0>)
8008718: 681b ldr r3, [r3, #0]
800871a: 617b str r3, [r7, #20]
800871c: e027 b.n 800876e <tcp_process+0x5de>
800871e: bf00 nop
8008720: 20008c44 .word 0x20008c44
8008724: 20008c3c .word 0x20008c3c
8008728: 20008c42 .word 0x20008c42
800872c: 20008c38 .word 0x20008c38
8008730: 20008c28 .word 0x20008c28
8008734: 20005680 .word 0x20005680
8008738: 20005684 .word 0x20005684
800873c: 08016124 .word 0x08016124
8008740: 080163c4 .word 0x080163c4
8008744: 08016170 .word 0x08016170
8008748: 20008c40 .word 0x20008c40
800874c: 20008c45 .word 0x20008c45
8008750: 20008c0c .word 0x20008c0c
8008754: 697b ldr r3, [r7, #20]
8008756: 68db ldr r3, [r3, #12]
8008758: 687a ldr r2, [r7, #4]
800875a: 429a cmp r2, r3
800875c: d104 bne.n 8008768 <tcp_process+0x5d8>
800875e: 687b ldr r3, [r7, #4]
8008760: 68da ldr r2, [r3, #12]
8008762: 697b ldr r3, [r7, #20]
8008764: 60da str r2, [r3, #12]
8008766: e005 b.n 8008774 <tcp_process+0x5e4>
8008768: 697b ldr r3, [r7, #20]
800876a: 68db ldr r3, [r3, #12]
800876c: 617b str r3, [r7, #20]
800876e: 697b ldr r3, [r7, #20]
8008770: 2b00 cmp r3, #0
8008772: d1ef bne.n 8008754 <tcp_process+0x5c4>
8008774: 687b ldr r3, [r7, #4]
8008776: 2200 movs r2, #0
8008778: 60da str r2, [r3, #12]
800877a: 4b77 ldr r3, [pc, #476] ; (8008958 <tcp_process+0x7c8>)
800877c: 2201 movs r2, #1
800877e: 701a strb r2, [r3, #0]
pcb->state = TIME_WAIT;
8008780: 687b ldr r3, [r7, #4]
8008782: 220a movs r2, #10
8008784: 751a strb r2, [r3, #20]
TCP_REG(&tcp_tw_pcbs, pcb);
8008786: 4b75 ldr r3, [pc, #468] ; (800895c <tcp_process+0x7cc>)
8008788: 681a ldr r2, [r3, #0]
800878a: 687b ldr r3, [r7, #4]
800878c: 60da str r2, [r3, #12]
800878e: 4a73 ldr r2, [pc, #460] ; (800895c <tcp_process+0x7cc>)
8008790: 687b ldr r3, [r7, #4]
8008792: 6013 str r3, [r2, #0]
8008794: f002 fcfa bl 800b18c <tcp_timer_needed>
}
} else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
pcb->unsent == NULL) {
pcb->state = FIN_WAIT_2;
}
break;
8008798: e0d2 b.n 8008940 <tcp_process+0x7b0>
tcp_ack_now(pcb);
800879a: 687b ldr r3, [r7, #4]
800879c: 8b5b ldrh r3, [r3, #26]
800879e: f043 0302 orr.w r3, r3, #2
80087a2: b29a uxth r2, r3
80087a4: 687b ldr r3, [r7, #4]
80087a6: 835a strh r2, [r3, #26]
pcb->state = CLOSING;
80087a8: 687b ldr r3, [r7, #4]
80087aa: 2208 movs r2, #8
80087ac: 751a strb r2, [r3, #20]
break;
80087ae: e0c7 b.n 8008940 <tcp_process+0x7b0>
} else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
80087b0: 4b6b ldr r3, [pc, #428] ; (8008960 <tcp_process+0x7d0>)
80087b2: 781b ldrb r3, [r3, #0]
80087b4: f003 0310 and.w r3, r3, #16
80087b8: 2b00 cmp r3, #0
80087ba: f000 80c1 beq.w 8008940 <tcp_process+0x7b0>
80087be: 687b ldr r3, [r7, #4]
80087c0: 6d1a ldr r2, [r3, #80] ; 0x50
80087c2: 4b68 ldr r3, [pc, #416] ; (8008964 <tcp_process+0x7d4>)
80087c4: 681b ldr r3, [r3, #0]
80087c6: 429a cmp r2, r3
80087c8: f040 80ba bne.w 8008940 <tcp_process+0x7b0>
pcb->unsent == NULL) {
80087cc: 687b ldr r3, [r7, #4]
80087ce: 6edb ldr r3, [r3, #108] ; 0x6c
} else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
80087d0: 2b00 cmp r3, #0
80087d2: f040 80b5 bne.w 8008940 <tcp_process+0x7b0>
pcb->state = FIN_WAIT_2;
80087d6: 687b ldr r3, [r7, #4]
80087d8: 2206 movs r2, #6
80087da: 751a strb r2, [r3, #20]
break;
80087dc: e0b0 b.n 8008940 <tcp_process+0x7b0>
case FIN_WAIT_2:
tcp_receive(pcb);
80087de: 6878 ldr r0, [r7, #4]
80087e0: f000 f9ca bl 8008b78 <tcp_receive>
if (recv_flags & TF_GOT_FIN) {
80087e4: 4b60 ldr r3, [pc, #384] ; (8008968 <tcp_process+0x7d8>)
80087e6: 781b ldrb r3, [r3, #0]
80087e8: f003 0320 and.w r3, r3, #32
80087ec: 2b00 cmp r3, #0
80087ee: f000 80a9 beq.w 8008944 <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);
80087f2: 687b ldr r3, [r7, #4]
80087f4: 8b5b ldrh r3, [r3, #26]
80087f6: f043 0302 orr.w r3, r3, #2
80087fa: b29a uxth r2, r3
80087fc: 687b ldr r3, [r7, #4]
80087fe: 835a strh r2, [r3, #26]
tcp_pcb_purge(pcb);
8008800: 6878 ldr r0, [r7, #4]
8008802: f7fe fd39 bl 8007278 <tcp_pcb_purge>
TCP_RMV_ACTIVE(pcb);
8008806: 4b59 ldr r3, [pc, #356] ; (800896c <tcp_process+0x7dc>)
8008808: 681b ldr r3, [r3, #0]
800880a: 687a ldr r2, [r7, #4]
800880c: 429a cmp r2, r3
800880e: d105 bne.n 800881c <tcp_process+0x68c>
8008810: 4b56 ldr r3, [pc, #344] ; (800896c <tcp_process+0x7dc>)
8008812: 681b ldr r3, [r3, #0]
8008814: 68db ldr r3, [r3, #12]
8008816: 4a55 ldr r2, [pc, #340] ; (800896c <tcp_process+0x7dc>)
8008818: 6013 str r3, [r2, #0]
800881a: e013 b.n 8008844 <tcp_process+0x6b4>
800881c: 4b53 ldr r3, [pc, #332] ; (800896c <tcp_process+0x7dc>)
800881e: 681b ldr r3, [r3, #0]
8008820: 613b str r3, [r7, #16]
8008822: e00c b.n 800883e <tcp_process+0x6ae>
8008824: 693b ldr r3, [r7, #16]
8008826: 68db ldr r3, [r3, #12]
8008828: 687a ldr r2, [r7, #4]
800882a: 429a cmp r2, r3
800882c: d104 bne.n 8008838 <tcp_process+0x6a8>
800882e: 687b ldr r3, [r7, #4]
8008830: 68da ldr r2, [r3, #12]
8008832: 693b ldr r3, [r7, #16]
8008834: 60da str r2, [r3, #12]
8008836: e005 b.n 8008844 <tcp_process+0x6b4>
8008838: 693b ldr r3, [r7, #16]
800883a: 68db ldr r3, [r3, #12]
800883c: 613b str r3, [r7, #16]
800883e: 693b ldr r3, [r7, #16]
8008840: 2b00 cmp r3, #0
8008842: d1ef bne.n 8008824 <tcp_process+0x694>
8008844: 687b ldr r3, [r7, #4]
8008846: 2200 movs r2, #0
8008848: 60da str r2, [r3, #12]
800884a: 4b43 ldr r3, [pc, #268] ; (8008958 <tcp_process+0x7c8>)
800884c: 2201 movs r2, #1
800884e: 701a strb r2, [r3, #0]
pcb->state = TIME_WAIT;
8008850: 687b ldr r3, [r7, #4]
8008852: 220a movs r2, #10
8008854: 751a strb r2, [r3, #20]
TCP_REG(&tcp_tw_pcbs, pcb);
8008856: 4b41 ldr r3, [pc, #260] ; (800895c <tcp_process+0x7cc>)
8008858: 681a ldr r2, [r3, #0]
800885a: 687b ldr r3, [r7, #4]
800885c: 60da str r2, [r3, #12]
800885e: 4a3f ldr r2, [pc, #252] ; (800895c <tcp_process+0x7cc>)
8008860: 687b ldr r3, [r7, #4]
8008862: 6013 str r3, [r2, #0]
8008864: f002 fc92 bl 800b18c <tcp_timer_needed>
}
break;
8008868: e06c b.n 8008944 <tcp_process+0x7b4>
case CLOSING:
tcp_receive(pcb);
800886a: 6878 ldr r0, [r7, #4]
800886c: f000 f984 bl 8008b78 <tcp_receive>
if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
8008870: 4b3b ldr r3, [pc, #236] ; (8008960 <tcp_process+0x7d0>)
8008872: 781b ldrb r3, [r3, #0]
8008874: f003 0310 and.w r3, r3, #16
8008878: 2b00 cmp r3, #0
800887a: d065 beq.n 8008948 <tcp_process+0x7b8>
800887c: 687b ldr r3, [r7, #4]
800887e: 6d1a ldr r2, [r3, #80] ; 0x50
8008880: 4b38 ldr r3, [pc, #224] ; (8008964 <tcp_process+0x7d4>)
8008882: 681b ldr r3, [r3, #0]
8008884: 429a cmp r2, r3
8008886: d15f bne.n 8008948 <tcp_process+0x7b8>
8008888: 687b ldr r3, [r7, #4]
800888a: 6edb ldr r3, [r3, #108] ; 0x6c
800888c: 2b00 cmp r3, #0
800888e: d15b bne.n 8008948 <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);
8008890: 6878 ldr r0, [r7, #4]
8008892: f7fe fcf1 bl 8007278 <tcp_pcb_purge>
TCP_RMV_ACTIVE(pcb);
8008896: 4b35 ldr r3, [pc, #212] ; (800896c <tcp_process+0x7dc>)
8008898: 681b ldr r3, [r3, #0]
800889a: 687a ldr r2, [r7, #4]
800889c: 429a cmp r2, r3
800889e: d105 bne.n 80088ac <tcp_process+0x71c>
80088a0: 4b32 ldr r3, [pc, #200] ; (800896c <tcp_process+0x7dc>)
80088a2: 681b ldr r3, [r3, #0]
80088a4: 68db ldr r3, [r3, #12]
80088a6: 4a31 ldr r2, [pc, #196] ; (800896c <tcp_process+0x7dc>)
80088a8: 6013 str r3, [r2, #0]
80088aa: e013 b.n 80088d4 <tcp_process+0x744>
80088ac: 4b2f ldr r3, [pc, #188] ; (800896c <tcp_process+0x7dc>)
80088ae: 681b ldr r3, [r3, #0]
80088b0: 60fb str r3, [r7, #12]
80088b2: e00c b.n 80088ce <tcp_process+0x73e>
80088b4: 68fb ldr r3, [r7, #12]
80088b6: 68db ldr r3, [r3, #12]
80088b8: 687a ldr r2, [r7, #4]
80088ba: 429a cmp r2, r3
80088bc: d104 bne.n 80088c8 <tcp_process+0x738>
80088be: 687b ldr r3, [r7, #4]
80088c0: 68da ldr r2, [r3, #12]
80088c2: 68fb ldr r3, [r7, #12]
80088c4: 60da str r2, [r3, #12]
80088c6: e005 b.n 80088d4 <tcp_process+0x744>
80088c8: 68fb ldr r3, [r7, #12]
80088ca: 68db ldr r3, [r3, #12]
80088cc: 60fb str r3, [r7, #12]
80088ce: 68fb ldr r3, [r7, #12]
80088d0: 2b00 cmp r3, #0
80088d2: d1ef bne.n 80088b4 <tcp_process+0x724>
80088d4: 687b ldr r3, [r7, #4]
80088d6: 2200 movs r2, #0
80088d8: 60da str r2, [r3, #12]
80088da: 4b1f ldr r3, [pc, #124] ; (8008958 <tcp_process+0x7c8>)
80088dc: 2201 movs r2, #1
80088de: 701a strb r2, [r3, #0]
pcb->state = TIME_WAIT;
80088e0: 687b ldr r3, [r7, #4]
80088e2: 220a movs r2, #10
80088e4: 751a strb r2, [r3, #20]
TCP_REG(&tcp_tw_pcbs, pcb);
80088e6: 4b1d ldr r3, [pc, #116] ; (800895c <tcp_process+0x7cc>)
80088e8: 681a ldr r2, [r3, #0]
80088ea: 687b ldr r3, [r7, #4]
80088ec: 60da str r2, [r3, #12]
80088ee: 4a1b ldr r2, [pc, #108] ; (800895c <tcp_process+0x7cc>)
80088f0: 687b ldr r3, [r7, #4]
80088f2: 6013 str r3, [r2, #0]
80088f4: f002 fc4a bl 800b18c <tcp_timer_needed>
}
break;
80088f8: e026 b.n 8008948 <tcp_process+0x7b8>
case LAST_ACK:
tcp_receive(pcb);
80088fa: 6878 ldr r0, [r7, #4]
80088fc: f000 f93c bl 8008b78 <tcp_receive>
if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
8008900: 4b17 ldr r3, [pc, #92] ; (8008960 <tcp_process+0x7d0>)
8008902: 781b ldrb r3, [r3, #0]
8008904: f003 0310 and.w r3, r3, #16
8008908: 2b00 cmp r3, #0
800890a: d01f beq.n 800894c <tcp_process+0x7bc>
800890c: 687b ldr r3, [r7, #4]
800890e: 6d1a ldr r2, [r3, #80] ; 0x50
8008910: 4b14 ldr r3, [pc, #80] ; (8008964 <tcp_process+0x7d4>)
8008912: 681b ldr r3, [r3, #0]
8008914: 429a cmp r2, r3
8008916: d119 bne.n 800894c <tcp_process+0x7bc>
8008918: 687b ldr r3, [r7, #4]
800891a: 6edb ldr r3, [r3, #108] ; 0x6c
800891c: 2b00 cmp r3, #0
800891e: d115 bne.n 800894c <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;
8008920: 4b11 ldr r3, [pc, #68] ; (8008968 <tcp_process+0x7d8>)
8008922: 781b ldrb r3, [r3, #0]
8008924: f043 0310 orr.w r3, r3, #16
8008928: b2da uxtb r2, r3
800892a: 4b0f ldr r3, [pc, #60] ; (8008968 <tcp_process+0x7d8>)
800892c: 701a strb r2, [r3, #0]
}
break;
800892e: e00d b.n 800894c <tcp_process+0x7bc>
default:
break;
8008930: bf00 nop
8008932: e00c b.n 800894e <tcp_process+0x7be>
break;
8008934: bf00 nop
8008936: e00a b.n 800894e <tcp_process+0x7be>
break;
8008938: bf00 nop
800893a: e008 b.n 800894e <tcp_process+0x7be>
break;
800893c: bf00 nop
800893e: e006 b.n 800894e <tcp_process+0x7be>
break;
8008940: bf00 nop
8008942: e004 b.n 800894e <tcp_process+0x7be>
break;
8008944: bf00 nop
8008946: e002 b.n 800894e <tcp_process+0x7be>
break;
8008948: bf00 nop
800894a: e000 b.n 800894e <tcp_process+0x7be>
break;
800894c: bf00 nop
}
return ERR_OK;
800894e: 2300 movs r3, #0
}
8008950: 4618 mov r0, r3
8008952: 3724 adds r7, #36 ; 0x24
8008954: 46bd mov sp, r7
8008956: bd90 pop {r4, r7, pc}
8008958: 20008c14 .word 0x20008c14
800895c: 20008c10 .word 0x20008c10
8008960: 20008c44 .word 0x20008c44
8008964: 20008c3c .word 0x20008c3c
8008968: 20008c45 .word 0x20008c45
800896c: 20008c0c .word 0x20008c0c
08008970 <tcp_oos_insert_segment>:
*
* Called from tcp_receive()
*/
static void
tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next)
{
8008970: b590 push {r4, r7, lr}
8008972: b085 sub sp, #20
8008974: af00 add r7, sp, #0
8008976: 6078 str r0, [r7, #4]
8008978: 6039 str r1, [r7, #0]
struct tcp_seg *old_seg;
LWIP_ASSERT("tcp_oos_insert_segment: invalid cseg", cseg != NULL);
800897a: 687b ldr r3, [r7, #4]
800897c: 2b00 cmp r3, #0
800897e: d106 bne.n 800898e <tcp_oos_insert_segment+0x1e>
8008980: 4b3b ldr r3, [pc, #236] ; (8008a70 <tcp_oos_insert_segment+0x100>)
8008982: f240 421f movw r2, #1055 ; 0x41f
8008986: 493b ldr r1, [pc, #236] ; (8008a74 <tcp_oos_insert_segment+0x104>)
8008988: 483b ldr r0, [pc, #236] ; (8008a78 <tcp_oos_insert_segment+0x108>)
800898a: f007 fd21 bl 80103d0 <printf>
if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) {
800898e: 687b ldr r3, [r7, #4]
8008990: 68db ldr r3, [r3, #12]
8008992: 899b ldrh r3, [r3, #12]
8008994: b29b uxth r3, r3
8008996: 4618 mov r0, r3
8008998: f7fb fc94 bl 80042c4 <lwip_htons>
800899c: 4603 mov r3, r0
800899e: b2db uxtb r3, r3
80089a0: f003 0301 and.w r3, r3, #1
80089a4: 2b00 cmp r3, #0
80089a6: d028 beq.n 80089fa <tcp_oos_insert_segment+0x8a>
/* received segment overlaps all following segments */
tcp_segs_free(next);
80089a8: 6838 ldr r0, [r7, #0]
80089aa: f7fe fa63 bl 8006e74 <tcp_segs_free>
next = NULL;
80089ae: 2300 movs r3, #0
80089b0: 603b str r3, [r7, #0]
80089b2: e056 b.n 8008a62 <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) {
80089b4: 683b ldr r3, [r7, #0]
80089b6: 68db ldr r3, [r3, #12]
80089b8: 899b ldrh r3, [r3, #12]
80089ba: b29b uxth r3, r3
80089bc: 4618 mov r0, r3
80089be: f7fb fc81 bl 80042c4 <lwip_htons>
80089c2: 4603 mov r3, r0
80089c4: b2db uxtb r3, r3
80089c6: f003 0301 and.w r3, r3, #1
80089ca: 2b00 cmp r3, #0
80089cc: d00d beq.n 80089ea <tcp_oos_insert_segment+0x7a>
TCPH_SET_FLAG(cseg->tcphdr, TCP_FIN);
80089ce: 687b ldr r3, [r7, #4]
80089d0: 68db ldr r3, [r3, #12]
80089d2: 899b ldrh r3, [r3, #12]
80089d4: b29c uxth r4, r3
80089d6: 2001 movs r0, #1
80089d8: f7fb fc74 bl 80042c4 <lwip_htons>
80089dc: 4603 mov r3, r0
80089de: 461a mov r2, r3
80089e0: 687b ldr r3, [r7, #4]
80089e2: 68db ldr r3, [r3, #12]
80089e4: 4322 orrs r2, r4
80089e6: b292 uxth r2, r2
80089e8: 819a strh r2, [r3, #12]
}
old_seg = next;
80089ea: 683b ldr r3, [r7, #0]
80089ec: 60fb str r3, [r7, #12]
next = next->next;
80089ee: 683b ldr r3, [r7, #0]
80089f0: 681b ldr r3, [r3, #0]
80089f2: 603b str r3, [r7, #0]
tcp_seg_free(old_seg);
80089f4: 68f8 ldr r0, [r7, #12]
80089f6: f7fe fa52 bl 8006e9e <tcp_seg_free>
while (next &&
80089fa: 683b ldr r3, [r7, #0]
80089fc: 2b00 cmp r3, #0
80089fe: d00e beq.n 8008a1e <tcp_oos_insert_segment+0xae>
TCP_SEQ_GEQ((seqno + cseg->len),
8008a00: 687b ldr r3, [r7, #4]
8008a02: 891b ldrh r3, [r3, #8]
8008a04: 461a mov r2, r3
8008a06: 4b1d ldr r3, [pc, #116] ; (8008a7c <tcp_oos_insert_segment+0x10c>)
8008a08: 681b ldr r3, [r3, #0]
8008a0a: 441a add r2, r3
8008a0c: 683b ldr r3, [r7, #0]
8008a0e: 68db ldr r3, [r3, #12]
8008a10: 685b ldr r3, [r3, #4]
8008a12: 6839 ldr r1, [r7, #0]
8008a14: 8909 ldrh r1, [r1, #8]
8008a16: 440b add r3, r1
8008a18: 1ad3 subs r3, r2, r3
while (next &&
8008a1a: 2b00 cmp r3, #0
8008a1c: daca bge.n 80089b4 <tcp_oos_insert_segment+0x44>
}
if (next &&
8008a1e: 683b ldr r3, [r7, #0]
8008a20: 2b00 cmp r3, #0
8008a22: d01e beq.n 8008a62 <tcp_oos_insert_segment+0xf2>
TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) {
8008a24: 687b ldr r3, [r7, #4]
8008a26: 891b ldrh r3, [r3, #8]
8008a28: 461a mov r2, r3
8008a2a: 4b14 ldr r3, [pc, #80] ; (8008a7c <tcp_oos_insert_segment+0x10c>)
8008a2c: 681b ldr r3, [r3, #0]
8008a2e: 441a add r2, r3
8008a30: 683b ldr r3, [r7, #0]
8008a32: 68db ldr r3, [r3, #12]
8008a34: 685b ldr r3, [r3, #4]
8008a36: 1ad3 subs r3, r2, r3
if (next &&
8008a38: 2b00 cmp r3, #0
8008a3a: dd12 ble.n 8008a62 <tcp_oos_insert_segment+0xf2>
/* We need to trim the incoming segment. */
cseg->len = (u16_t)(next->tcphdr->seqno - seqno);
8008a3c: 683b ldr r3, [r7, #0]
8008a3e: 68db ldr r3, [r3, #12]
8008a40: 685b ldr r3, [r3, #4]
8008a42: b29a uxth r2, r3
8008a44: 4b0d ldr r3, [pc, #52] ; (8008a7c <tcp_oos_insert_segment+0x10c>)
8008a46: 681b ldr r3, [r3, #0]
8008a48: b29b uxth r3, r3
8008a4a: 1ad3 subs r3, r2, r3
8008a4c: b29a uxth r2, r3
8008a4e: 687b ldr r3, [r7, #4]
8008a50: 811a strh r2, [r3, #8]
pbuf_realloc(cseg->p, cseg->len);
8008a52: 687b ldr r3, [r7, #4]
8008a54: 685a ldr r2, [r3, #4]
8008a56: 687b ldr r3, [r7, #4]
8008a58: 891b ldrh r3, [r3, #8]
8008a5a: 4619 mov r1, r3
8008a5c: 4610 mov r0, r2
8008a5e: f7fc fe15 bl 800568c <pbuf_realloc>
}
}
cseg->next = next;
8008a62: 687b ldr r3, [r7, #4]
8008a64: 683a ldr r2, [r7, #0]
8008a66: 601a str r2, [r3, #0]
}
8008a68: bf00 nop
8008a6a: 3714 adds r7, #20
8008a6c: 46bd mov sp, r7
8008a6e: bd90 pop {r4, r7, pc}
8008a70: 08016124 .word 0x08016124
8008a74: 080163e4 .word 0x080163e4
8008a78: 08016170 .word 0x08016170
8008a7c: 20008c38 .word 0x20008c38
08008a80 <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)
{
8008a80: b5b0 push {r4, r5, r7, lr}
8008a82: b086 sub sp, #24
8008a84: af00 add r7, sp, #0
8008a86: 60f8 str r0, [r7, #12]
8008a88: 60b9 str r1, [r7, #8]
8008a8a: 607a str r2, [r7, #4]
8008a8c: 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 &&
8008a8e: e03e b.n 8008b0e <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;
8008a90: 68bb ldr r3, [r7, #8]
8008a92: 617b str r3, [r7, #20]
seg_list = seg_list->next;
8008a94: 68bb ldr r3, [r7, #8]
8008a96: 681b ldr r3, [r3, #0]
8008a98: 60bb str r3, [r7, #8]
clen = pbuf_clen(next->p);
8008a9a: 697b ldr r3, [r7, #20]
8008a9c: 685b ldr r3, [r3, #4]
8008a9e: 4618 mov r0, r3
8008aa0: f7fd f802 bl 8005aa8 <pbuf_clen>
8008aa4: 4603 mov r3, r0
8008aa6: 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));
8008aa8: 68fb ldr r3, [r7, #12]
8008aaa: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8008aae: 8a7a ldrh r2, [r7, #18]
8008ab0: 429a cmp r2, r3
8008ab2: d906 bls.n 8008ac2 <tcp_free_acked_segments+0x42>
8008ab4: 4b2a ldr r3, [pc, #168] ; (8008b60 <tcp_free_acked_segments+0xe0>)
8008ab6: f240 4257 movw r2, #1111 ; 0x457
8008aba: 492a ldr r1, [pc, #168] ; (8008b64 <tcp_free_acked_segments+0xe4>)
8008abc: 482a ldr r0, [pc, #168] ; (8008b68 <tcp_free_acked_segments+0xe8>)
8008abe: f007 fc87 bl 80103d0 <printf>
pcb->snd_queuelen = (u16_t)(pcb->snd_queuelen - clen);
8008ac2: 68fb ldr r3, [r7, #12]
8008ac4: f8b3 2066 ldrh.w r2, [r3, #102] ; 0x66
8008ac8: 8a7b ldrh r3, [r7, #18]
8008aca: 1ad3 subs r3, r2, r3
8008acc: b29a uxth r2, r3
8008ace: 68fb ldr r3, [r7, #12]
8008ad0: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
recv_acked = (tcpwnd_size_t)(recv_acked + next->len);
8008ad4: 697b ldr r3, [r7, #20]
8008ad6: 891a ldrh r2, [r3, #8]
8008ad8: 4b24 ldr r3, [pc, #144] ; (8008b6c <tcp_free_acked_segments+0xec>)
8008ada: 881b ldrh r3, [r3, #0]
8008adc: 4413 add r3, r2
8008ade: b29a uxth r2, r3
8008ae0: 4b22 ldr r3, [pc, #136] ; (8008b6c <tcp_free_acked_segments+0xec>)
8008ae2: 801a strh r2, [r3, #0]
tcp_seg_free(next);
8008ae4: 6978 ldr r0, [r7, #20]
8008ae6: f7fe f9da bl 8006e9e <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) {
8008aea: 68fb ldr r3, [r7, #12]
8008aec: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8008af0: 2b00 cmp r3, #0
8008af2: d00c beq.n 8008b0e <tcp_free_acked_segments+0x8e>
LWIP_ASSERT("tcp_receive: valid queue length",
8008af4: 68bb ldr r3, [r7, #8]
8008af6: 2b00 cmp r3, #0
8008af8: d109 bne.n 8008b0e <tcp_free_acked_segments+0x8e>
8008afa: 683b ldr r3, [r7, #0]
8008afc: 2b00 cmp r3, #0
8008afe: d106 bne.n 8008b0e <tcp_free_acked_segments+0x8e>
8008b00: 4b17 ldr r3, [pc, #92] ; (8008b60 <tcp_free_acked_segments+0xe0>)
8008b02: f240 4261 movw r2, #1121 ; 0x461
8008b06: 491a ldr r1, [pc, #104] ; (8008b70 <tcp_free_acked_segments+0xf0>)
8008b08: 4817 ldr r0, [pc, #92] ; (8008b68 <tcp_free_acked_segments+0xe8>)
8008b0a: f007 fc61 bl 80103d0 <printf>
while (seg_list != NULL &&
8008b0e: 68bb ldr r3, [r7, #8]
8008b10: 2b00 cmp r3, #0
8008b12: d020 beq.n 8008b56 <tcp_free_acked_segments+0xd6>
TCP_SEQ_LEQ(lwip_ntohl(seg_list->tcphdr->seqno) +
8008b14: 68bb ldr r3, [r7, #8]
8008b16: 68db ldr r3, [r3, #12]
8008b18: 685b ldr r3, [r3, #4]
8008b1a: 4618 mov r0, r3
8008b1c: f7fb fbe7 bl 80042ee <lwip_htonl>
8008b20: 4604 mov r4, r0
8008b22: 68bb ldr r3, [r7, #8]
8008b24: 891b ldrh r3, [r3, #8]
8008b26: 461d mov r5, r3
8008b28: 68bb ldr r3, [r7, #8]
8008b2a: 68db ldr r3, [r3, #12]
8008b2c: 899b ldrh r3, [r3, #12]
8008b2e: b29b uxth r3, r3
8008b30: 4618 mov r0, r3
8008b32: f7fb fbc7 bl 80042c4 <lwip_htons>
8008b36: 4603 mov r3, r0
8008b38: b2db uxtb r3, r3
8008b3a: f003 0303 and.w r3, r3, #3
8008b3e: 2b00 cmp r3, #0
8008b40: d001 beq.n 8008b46 <tcp_free_acked_segments+0xc6>
8008b42: 2301 movs r3, #1
8008b44: e000 b.n 8008b48 <tcp_free_acked_segments+0xc8>
8008b46: 2300 movs r3, #0
8008b48: 442b add r3, r5
8008b4a: 18e2 adds r2, r4, r3
8008b4c: 4b09 ldr r3, [pc, #36] ; (8008b74 <tcp_free_acked_segments+0xf4>)
8008b4e: 681b ldr r3, [r3, #0]
8008b50: 1ad3 subs r3, r2, r3
while (seg_list != NULL &&
8008b52: 2b00 cmp r3, #0
8008b54: dd9c ble.n 8008a90 <tcp_free_acked_segments+0x10>
seg_list != NULL || dbg_other_seg_list != NULL);
}
}
return seg_list;
8008b56: 68bb ldr r3, [r7, #8]
}
8008b58: 4618 mov r0, r3
8008b5a: 3718 adds r7, #24
8008b5c: 46bd mov sp, r7
8008b5e: bdb0 pop {r4, r5, r7, pc}
8008b60: 08016124 .word 0x08016124
8008b64: 0801640c .word 0x0801640c
8008b68: 08016170 .word 0x08016170
8008b6c: 20008c40 .word 0x20008c40
8008b70: 08016434 .word 0x08016434
8008b74: 20008c3c .word 0x20008c3c
08008b78 <tcp_receive>:
*
* Called from tcp_process().
*/
static void
tcp_receive(struct tcp_pcb *pcb)
{
8008b78: b5b0 push {r4, r5, r7, lr}
8008b7a: b094 sub sp, #80 ; 0x50
8008b7c: af00 add r7, sp, #0
8008b7e: 6078 str r0, [r7, #4]
s16_t m;
u32_t right_wnd_edge;
int found_dupack = 0;
8008b80: 2300 movs r3, #0
8008b82: 64bb str r3, [r7, #72] ; 0x48
LWIP_ASSERT("tcp_receive: invalid pcb", pcb != NULL);
8008b84: 687b ldr r3, [r7, #4]
8008b86: 2b00 cmp r3, #0
8008b88: d106 bne.n 8008b98 <tcp_receive+0x20>
8008b8a: 4b91 ldr r3, [pc, #580] ; (8008dd0 <tcp_receive+0x258>)
8008b8c: f240 427b movw r2, #1147 ; 0x47b
8008b90: 4990 ldr r1, [pc, #576] ; (8008dd4 <tcp_receive+0x25c>)
8008b92: 4891 ldr r0, [pc, #580] ; (8008dd8 <tcp_receive+0x260>)
8008b94: f007 fc1c bl 80103d0 <printf>
LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED);
8008b98: 687b ldr r3, [r7, #4]
8008b9a: 7d1b ldrb r3, [r3, #20]
8008b9c: 2b03 cmp r3, #3
8008b9e: d806 bhi.n 8008bae <tcp_receive+0x36>
8008ba0: 4b8b ldr r3, [pc, #556] ; (8008dd0 <tcp_receive+0x258>)
8008ba2: f240 427c movw r2, #1148 ; 0x47c
8008ba6: 498d ldr r1, [pc, #564] ; (8008ddc <tcp_receive+0x264>)
8008ba8: 488b ldr r0, [pc, #556] ; (8008dd8 <tcp_receive+0x260>)
8008baa: f007 fc11 bl 80103d0 <printf>
if (flags & TCP_ACK) {
8008bae: 4b8c ldr r3, [pc, #560] ; (8008de0 <tcp_receive+0x268>)
8008bb0: 781b ldrb r3, [r3, #0]
8008bb2: f003 0310 and.w r3, r3, #16
8008bb6: 2b00 cmp r3, #0
8008bb8: f000 8264 beq.w 8009084 <tcp_receive+0x50c>
right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2;
8008bbc: 687b ldr r3, [r7, #4]
8008bbe: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8008bc2: 461a mov r2, r3
8008bc4: 687b ldr r3, [r7, #4]
8008bc6: 6d9b ldr r3, [r3, #88] ; 0x58
8008bc8: 4413 add r3, r2
8008bca: 633b str r3, [r7, #48] ; 0x30
/* Update window. */
if (TCP_SEQ_LT(pcb->snd_wl1, seqno) ||
8008bcc: 687b ldr r3, [r7, #4]
8008bce: 6d5a ldr r2, [r3, #84] ; 0x54
8008bd0: 4b84 ldr r3, [pc, #528] ; (8008de4 <tcp_receive+0x26c>)
8008bd2: 681b ldr r3, [r3, #0]
8008bd4: 1ad3 subs r3, r2, r3
8008bd6: 2b00 cmp r3, #0
8008bd8: db1b blt.n 8008c12 <tcp_receive+0x9a>
(pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
8008bda: 687b ldr r3, [r7, #4]
8008bdc: 6d5a ldr r2, [r3, #84] ; 0x54
8008bde: 4b81 ldr r3, [pc, #516] ; (8008de4 <tcp_receive+0x26c>)
8008be0: 681b ldr r3, [r3, #0]
if (TCP_SEQ_LT(pcb->snd_wl1, seqno) ||
8008be2: 429a cmp r2, r3
8008be4: d106 bne.n 8008bf4 <tcp_receive+0x7c>
(pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
8008be6: 687b ldr r3, [r7, #4]
8008be8: 6d9a ldr r2, [r3, #88] ; 0x58
8008bea: 4b7f ldr r3, [pc, #508] ; (8008de8 <tcp_receive+0x270>)
8008bec: 681b ldr r3, [r3, #0]
8008bee: 1ad3 subs r3, r2, r3
8008bf0: 2b00 cmp r3, #0
8008bf2: db0e blt.n 8008c12 <tcp_receive+0x9a>
(pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) {
8008bf4: 687b ldr r3, [r7, #4]
8008bf6: 6d9a ldr r2, [r3, #88] ; 0x58
8008bf8: 4b7b ldr r3, [pc, #492] ; (8008de8 <tcp_receive+0x270>)
8008bfa: 681b ldr r3, [r3, #0]
(pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
8008bfc: 429a cmp r2, r3
8008bfe: d125 bne.n 8008c4c <tcp_receive+0xd4>
(pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) {
8008c00: 4b7a ldr r3, [pc, #488] ; (8008dec <tcp_receive+0x274>)
8008c02: 681b ldr r3, [r3, #0]
8008c04: 89db ldrh r3, [r3, #14]
8008c06: b29a uxth r2, r3
8008c08: 687b ldr r3, [r7, #4]
8008c0a: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8008c0e: 429a cmp r2, r3
8008c10: d91c bls.n 8008c4c <tcp_receive+0xd4>
pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd);
8008c12: 4b76 ldr r3, [pc, #472] ; (8008dec <tcp_receive+0x274>)
8008c14: 681b ldr r3, [r3, #0]
8008c16: 89db ldrh r3, [r3, #14]
8008c18: b29a uxth r2, r3
8008c1a: 687b ldr r3, [r7, #4]
8008c1c: 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) {
8008c20: 687b ldr r3, [r7, #4]
8008c22: f8b3 2062 ldrh.w r2, [r3, #98] ; 0x62
8008c26: 687b ldr r3, [r7, #4]
8008c28: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8008c2c: 429a cmp r2, r3
8008c2e: d205 bcs.n 8008c3c <tcp_receive+0xc4>
pcb->snd_wnd_max = pcb->snd_wnd;
8008c30: 687b ldr r3, [r7, #4]
8008c32: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
8008c36: 687b ldr r3, [r7, #4]
8008c38: f8a3 2062 strh.w r2, [r3, #98] ; 0x62
}
pcb->snd_wl1 = seqno;
8008c3c: 4b69 ldr r3, [pc, #420] ; (8008de4 <tcp_receive+0x26c>)
8008c3e: 681a ldr r2, [r3, #0]
8008c40: 687b ldr r3, [r7, #4]
8008c42: 655a str r2, [r3, #84] ; 0x54
pcb->snd_wl2 = ackno;
8008c44: 4b68 ldr r3, [pc, #416] ; (8008de8 <tcp_receive+0x270>)
8008c46: 681a ldr r2, [r3, #0]
8008c48: 687b ldr r3, [r7, #4]
8008c4a: 659a str r2, [r3, #88] ; 0x58
* If it only passes 1, should reset dupack counter
*
*/
/* Clause 1 */
if (TCP_SEQ_LEQ(ackno, pcb->lastack)) {
8008c4c: 4b66 ldr r3, [pc, #408] ; (8008de8 <tcp_receive+0x270>)
8008c4e: 681a ldr r2, [r3, #0]
8008c50: 687b ldr r3, [r7, #4]
8008c52: 6c5b ldr r3, [r3, #68] ; 0x44
8008c54: 1ad3 subs r3, r2, r3
8008c56: 2b00 cmp r3, #0
8008c58: dc58 bgt.n 8008d0c <tcp_receive+0x194>
/* Clause 2 */
if (tcplen == 0) {
8008c5a: 4b65 ldr r3, [pc, #404] ; (8008df0 <tcp_receive+0x278>)
8008c5c: 881b ldrh r3, [r3, #0]
8008c5e: 2b00 cmp r3, #0
8008c60: d14b bne.n 8008cfa <tcp_receive+0x182>
/* Clause 3 */
if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge) {
8008c62: 687b ldr r3, [r7, #4]
8008c64: 6d9b ldr r3, [r3, #88] ; 0x58
8008c66: 687a ldr r2, [r7, #4]
8008c68: f8b2 2060 ldrh.w r2, [r2, #96] ; 0x60
8008c6c: 4413 add r3, r2
8008c6e: 6b3a ldr r2, [r7, #48] ; 0x30
8008c70: 429a cmp r2, r3
8008c72: d142 bne.n 8008cfa <tcp_receive+0x182>
/* Clause 4 */
if (pcb->rtime >= 0) {
8008c74: 687b ldr r3, [r7, #4]
8008c76: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
8008c7a: 2b00 cmp r3, #0
8008c7c: db3d blt.n 8008cfa <tcp_receive+0x182>
/* Clause 5 */
if (pcb->lastack == ackno) {
8008c7e: 687b ldr r3, [r7, #4]
8008c80: 6c5a ldr r2, [r3, #68] ; 0x44
8008c82: 4b59 ldr r3, [pc, #356] ; (8008de8 <tcp_receive+0x270>)
8008c84: 681b ldr r3, [r3, #0]
8008c86: 429a cmp r2, r3
8008c88: d137 bne.n 8008cfa <tcp_receive+0x182>
found_dupack = 1;
8008c8a: 2301 movs r3, #1
8008c8c: 64bb str r3, [r7, #72] ; 0x48
if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) {
8008c8e: 687b ldr r3, [r7, #4]
8008c90: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
8008c94: 2bff cmp r3, #255 ; 0xff
8008c96: d007 beq.n 8008ca8 <tcp_receive+0x130>
++pcb->dupacks;
8008c98: 687b ldr r3, [r7, #4]
8008c9a: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
8008c9e: 3301 adds r3, #1
8008ca0: b2da uxtb r2, r3
8008ca2: 687b ldr r3, [r7, #4]
8008ca4: f883 2043 strb.w r2, [r3, #67] ; 0x43
}
if (pcb->dupacks > 3) {
8008ca8: 687b ldr r3, [r7, #4]
8008caa: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
8008cae: 2b03 cmp r3, #3
8008cb0: d91b bls.n 8008cea <tcp_receive+0x172>
/* Inflate the congestion window */
TCP_WND_INC(pcb->cwnd, pcb->mss);
8008cb2: 687b ldr r3, [r7, #4]
8008cb4: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8008cb8: 687b ldr r3, [r7, #4]
8008cba: 8e5b ldrh r3, [r3, #50] ; 0x32
8008cbc: 4413 add r3, r2
8008cbe: b29a uxth r2, r3
8008cc0: 687b ldr r3, [r7, #4]
8008cc2: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8008cc6: 429a cmp r2, r3
8008cc8: d30a bcc.n 8008ce0 <tcp_receive+0x168>
8008cca: 687b ldr r3, [r7, #4]
8008ccc: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8008cd0: 687b ldr r3, [r7, #4]
8008cd2: 8e5b ldrh r3, [r3, #50] ; 0x32
8008cd4: 4413 add r3, r2
8008cd6: b29a uxth r2, r3
8008cd8: 687b ldr r3, [r7, #4]
8008cda: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
8008cde: e004 b.n 8008cea <tcp_receive+0x172>
8008ce0: 687b ldr r3, [r7, #4]
8008ce2: f64f 72ff movw r2, #65535 ; 0xffff
8008ce6: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
}
if (pcb->dupacks >= 3) {
8008cea: 687b ldr r3, [r7, #4]
8008cec: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
8008cf0: 2b02 cmp r3, #2
8008cf2: d902 bls.n 8008cfa <tcp_receive+0x182>
/* Do fast retransmit (checked via TF_INFR, not via dupacks count) */
tcp_rexmit_fast(pcb);
8008cf4: 6878 ldr r0, [r7, #4]
8008cf6: f001 feeb bl 800aad0 <tcp_rexmit_fast>
}
}
}
/* If Clause (1) or more is true, but not a duplicate ack, reset
* count of consecutive duplicate acks */
if (!found_dupack) {
8008cfa: 6cbb ldr r3, [r7, #72] ; 0x48
8008cfc: 2b00 cmp r3, #0
8008cfe: f040 8161 bne.w 8008fc4 <tcp_receive+0x44c>
pcb->dupacks = 0;
8008d02: 687b ldr r3, [r7, #4]
8008d04: 2200 movs r2, #0
8008d06: f883 2043 strb.w r2, [r3, #67] ; 0x43
8008d0a: e15b b.n 8008fc4 <tcp_receive+0x44c>
}
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
8008d0c: 4b36 ldr r3, [pc, #216] ; (8008de8 <tcp_receive+0x270>)
8008d0e: 681a ldr r2, [r3, #0]
8008d10: 687b ldr r3, [r7, #4]
8008d12: 6c5b ldr r3, [r3, #68] ; 0x44
8008d14: 1ad3 subs r3, r2, r3
8008d16: 3b01 subs r3, #1
8008d18: 2b00 cmp r3, #0
8008d1a: f2c0 814e blt.w 8008fba <tcp_receive+0x442>
8008d1e: 4b32 ldr r3, [pc, #200] ; (8008de8 <tcp_receive+0x270>)
8008d20: 681a ldr r2, [r3, #0]
8008d22: 687b ldr r3, [r7, #4]
8008d24: 6d1b ldr r3, [r3, #80] ; 0x50
8008d26: 1ad3 subs r3, r2, r3
8008d28: 2b00 cmp r3, #0
8008d2a: f300 8146 bgt.w 8008fba <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) {
8008d2e: 687b ldr r3, [r7, #4]
8008d30: 8b5b ldrh r3, [r3, #26]
8008d32: f003 0304 and.w r3, r3, #4
8008d36: 2b00 cmp r3, #0
8008d38: d010 beq.n 8008d5c <tcp_receive+0x1e4>
tcp_clear_flags(pcb, TF_INFR);
8008d3a: 687b ldr r3, [r7, #4]
8008d3c: 8b5b ldrh r3, [r3, #26]
8008d3e: f023 0304 bic.w r3, r3, #4
8008d42: b29a uxth r2, r3
8008d44: 687b ldr r3, [r7, #4]
8008d46: 835a strh r2, [r3, #26]
pcb->cwnd = pcb->ssthresh;
8008d48: 687b ldr r3, [r7, #4]
8008d4a: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a
8008d4e: 687b ldr r3, [r7, #4]
8008d50: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
pcb->bytes_acked = 0;
8008d54: 687b ldr r3, [r7, #4]
8008d56: 2200 movs r2, #0
8008d58: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
}
/* Reset the number of retransmissions. */
pcb->nrtx = 0;
8008d5c: 687b ldr r3, [r7, #4]
8008d5e: 2200 movs r2, #0
8008d60: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Reset the retransmission time-out. */
pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv);
8008d64: 687b ldr r3, [r7, #4]
8008d66: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
8008d6a: 10db asrs r3, r3, #3
8008d6c: b21b sxth r3, r3
8008d6e: b29a uxth r2, r3
8008d70: 687b ldr r3, [r7, #4]
8008d72: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
8008d76: b29b uxth r3, r3
8008d78: 4413 add r3, r2
8008d7a: b29b uxth r3, r3
8008d7c: b21a sxth r2, r3
8008d7e: 687b ldr r3, [r7, #4]
8008d80: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
/* Record how much data this ACK acks */
acked = (tcpwnd_size_t)(ackno - pcb->lastack);
8008d84: 4b18 ldr r3, [pc, #96] ; (8008de8 <tcp_receive+0x270>)
8008d86: 681b ldr r3, [r3, #0]
8008d88: b29a uxth r2, r3
8008d8a: 687b ldr r3, [r7, #4]
8008d8c: 6c5b ldr r3, [r3, #68] ; 0x44
8008d8e: b29b uxth r3, r3
8008d90: 1ad3 subs r3, r2, r3
8008d92: 85fb strh r3, [r7, #46] ; 0x2e
/* Reset the fast retransmit variables. */
pcb->dupacks = 0;
8008d94: 687b ldr r3, [r7, #4]
8008d96: 2200 movs r2, #0
8008d98: f883 2043 strb.w r2, [r3, #67] ; 0x43
pcb->lastack = ackno;
8008d9c: 4b12 ldr r3, [pc, #72] ; (8008de8 <tcp_receive+0x270>)
8008d9e: 681a ldr r2, [r3, #0]
8008da0: 687b ldr r3, [r7, #4]
8008da2: 645a str r2, [r3, #68] ; 0x44
/* Update the congestion control variables (cwnd and
ssthresh). */
if (pcb->state >= ESTABLISHED) {
8008da4: 687b ldr r3, [r7, #4]
8008da6: 7d1b ldrb r3, [r3, #20]
8008da8: 2b03 cmp r3, #3
8008daa: f240 8097 bls.w 8008edc <tcp_receive+0x364>
if (pcb->cwnd < pcb->ssthresh) {
8008dae: 687b ldr r3, [r7, #4]
8008db0: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8008db4: 687b ldr r3, [r7, #4]
8008db6: f8b3 304a ldrh.w r3, [r3, #74] ; 0x4a
8008dba: 429a cmp r2, r3
8008dbc: d245 bcs.n 8008e4a <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;
8008dbe: 687b ldr r3, [r7, #4]
8008dc0: 8b5b ldrh r3, [r3, #26]
8008dc2: f403 6300 and.w r3, r3, #2048 ; 0x800
8008dc6: 2b00 cmp r3, #0
8008dc8: d014 beq.n 8008df4 <tcp_receive+0x27c>
8008dca: 2301 movs r3, #1
8008dcc: e013 b.n 8008df6 <tcp_receive+0x27e>
8008dce: bf00 nop
8008dd0: 08016124 .word 0x08016124
8008dd4: 08016454 .word 0x08016454
8008dd8: 08016170 .word 0x08016170
8008ddc: 08016470 .word 0x08016470
8008de0: 20008c44 .word 0x20008c44
8008de4: 20008c38 .word 0x20008c38
8008de8: 20008c3c .word 0x20008c3c
8008dec: 20008c28 .word 0x20008c28
8008df0: 20008c42 .word 0x20008c42
8008df4: 2302 movs r3, #2
8008df6: 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));
8008dfa: f897 302d ldrb.w r3, [r7, #45] ; 0x2d
8008dfe: b29a uxth r2, r3
8008e00: 687b ldr r3, [r7, #4]
8008e02: 8e5b ldrh r3, [r3, #50] ; 0x32
8008e04: fb12 f303 smulbb r3, r2, r3
8008e08: b29b uxth r3, r3
8008e0a: 8dfa ldrh r2, [r7, #46] ; 0x2e
8008e0c: 4293 cmp r3, r2
8008e0e: bf28 it cs
8008e10: 4613 movcs r3, r2
8008e12: 857b strh r3, [r7, #42] ; 0x2a
TCP_WND_INC(pcb->cwnd, increase);
8008e14: 687b ldr r3, [r7, #4]
8008e16: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8008e1a: 8d7b ldrh r3, [r7, #42] ; 0x2a
8008e1c: 4413 add r3, r2
8008e1e: b29a uxth r2, r3
8008e20: 687b ldr r3, [r7, #4]
8008e22: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8008e26: 429a cmp r2, r3
8008e28: d309 bcc.n 8008e3e <tcp_receive+0x2c6>
8008e2a: 687b ldr r3, [r7, #4]
8008e2c: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8008e30: 8d7b ldrh r3, [r7, #42] ; 0x2a
8008e32: 4413 add r3, r2
8008e34: b29a uxth r2, r3
8008e36: 687b ldr r3, [r7, #4]
8008e38: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
8008e3c: e04e b.n 8008edc <tcp_receive+0x364>
8008e3e: 687b ldr r3, [r7, #4]
8008e40: f64f 72ff movw r2, #65535 ; 0xffff
8008e44: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
8008e48: e048 b.n 8008edc <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);
8008e4a: 687b ldr r3, [r7, #4]
8008e4c: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
8008e50: 8dfb ldrh r3, [r7, #46] ; 0x2e
8008e52: 4413 add r3, r2
8008e54: b29a uxth r2, r3
8008e56: 687b ldr r3, [r7, #4]
8008e58: f8b3 306a ldrh.w r3, [r3, #106] ; 0x6a
8008e5c: 429a cmp r2, r3
8008e5e: d309 bcc.n 8008e74 <tcp_receive+0x2fc>
8008e60: 687b ldr r3, [r7, #4]
8008e62: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
8008e66: 8dfb ldrh r3, [r7, #46] ; 0x2e
8008e68: 4413 add r3, r2
8008e6a: b29a uxth r2, r3
8008e6c: 687b ldr r3, [r7, #4]
8008e6e: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
8008e72: e004 b.n 8008e7e <tcp_receive+0x306>
8008e74: 687b ldr r3, [r7, #4]
8008e76: f64f 72ff movw r2, #65535 ; 0xffff
8008e7a: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
if (pcb->bytes_acked >= pcb->cwnd) {
8008e7e: 687b ldr r3, [r7, #4]
8008e80: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
8008e84: 687b ldr r3, [r7, #4]
8008e86: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8008e8a: 429a cmp r2, r3
8008e8c: d326 bcc.n 8008edc <tcp_receive+0x364>
pcb->bytes_acked = (tcpwnd_size_t)(pcb->bytes_acked - pcb->cwnd);
8008e8e: 687b ldr r3, [r7, #4]
8008e90: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
8008e94: 687b ldr r3, [r7, #4]
8008e96: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8008e9a: 1ad3 subs r3, r2, r3
8008e9c: b29a uxth r2, r3
8008e9e: 687b ldr r3, [r7, #4]
8008ea0: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
TCP_WND_INC(pcb->cwnd, pcb->mss);
8008ea4: 687b ldr r3, [r7, #4]
8008ea6: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8008eaa: 687b ldr r3, [r7, #4]
8008eac: 8e5b ldrh r3, [r3, #50] ; 0x32
8008eae: 4413 add r3, r2
8008eb0: b29a uxth r2, r3
8008eb2: 687b ldr r3, [r7, #4]
8008eb4: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8008eb8: 429a cmp r2, r3
8008eba: d30a bcc.n 8008ed2 <tcp_receive+0x35a>
8008ebc: 687b ldr r3, [r7, #4]
8008ebe: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8008ec2: 687b ldr r3, [r7, #4]
8008ec4: 8e5b ldrh r3, [r3, #50] ; 0x32
8008ec6: 4413 add r3, r2
8008ec8: b29a uxth r2, r3
8008eca: 687b ldr r3, [r7, #4]
8008ecc: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
8008ed0: e004 b.n 8008edc <tcp_receive+0x364>
8008ed2: 687b ldr r3, [r7, #4]
8008ed4: f64f 72ff movw r2, #65535 ; 0xffff
8008ed8: 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);
8008edc: 687b ldr r3, [r7, #4]
8008ede: 6f19 ldr r1, [r3, #112] ; 0x70
8008ee0: 687b ldr r3, [r7, #4]
8008ee2: 6edb ldr r3, [r3, #108] ; 0x6c
8008ee4: 4a98 ldr r2, [pc, #608] ; (8009148 <tcp_receive+0x5d0>)
8008ee6: 6878 ldr r0, [r7, #4]
8008ee8: f7ff fdca bl 8008a80 <tcp_free_acked_segments>
8008eec: 4602 mov r2, r0
8008eee: 687b ldr r3, [r7, #4]
8008ef0: 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);
8008ef2: 687b ldr r3, [r7, #4]
8008ef4: 6ed9 ldr r1, [r3, #108] ; 0x6c
8008ef6: 687b ldr r3, [r7, #4]
8008ef8: 6f1b ldr r3, [r3, #112] ; 0x70
8008efa: 4a94 ldr r2, [pc, #592] ; (800914c <tcp_receive+0x5d4>)
8008efc: 6878 ldr r0, [r7, #4]
8008efe: f7ff fdbf bl 8008a80 <tcp_free_acked_segments>
8008f02: 4602 mov r2, r0
8008f04: 687b ldr r3, [r7, #4]
8008f06: 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) {
8008f08: 687b ldr r3, [r7, #4]
8008f0a: 6f1b ldr r3, [r3, #112] ; 0x70
8008f0c: 2b00 cmp r3, #0
8008f0e: d104 bne.n 8008f1a <tcp_receive+0x3a2>
pcb->rtime = -1;
8008f10: 687b ldr r3, [r7, #4]
8008f12: f64f 72ff movw r2, #65535 ; 0xffff
8008f16: 861a strh r2, [r3, #48] ; 0x30
8008f18: e002 b.n 8008f20 <tcp_receive+0x3a8>
} else {
pcb->rtime = 0;
8008f1a: 687b ldr r3, [r7, #4]
8008f1c: 2200 movs r2, #0
8008f1e: 861a strh r2, [r3, #48] ; 0x30
}
pcb->polltmr = 0;
8008f20: 687b ldr r3, [r7, #4]
8008f22: 2200 movs r2, #0
8008f24: 771a strb r2, [r3, #28]
#if TCP_OVERSIZE
if (pcb->unsent == NULL) {
8008f26: 687b ldr r3, [r7, #4]
8008f28: 6edb ldr r3, [r3, #108] ; 0x6c
8008f2a: 2b00 cmp r3, #0
8008f2c: d103 bne.n 8008f36 <tcp_receive+0x3be>
pcb->unsent_oversize = 0;
8008f2e: 687b ldr r3, [r7, #4]
8008f30: 2200 movs r2, #0
8008f32: 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);
8008f36: 687b ldr r3, [r7, #4]
8008f38: f8b3 2064 ldrh.w r2, [r3, #100] ; 0x64
8008f3c: 4b84 ldr r3, [pc, #528] ; (8009150 <tcp_receive+0x5d8>)
8008f3e: 881b ldrh r3, [r3, #0]
8008f40: 4413 add r3, r2
8008f42: b29a uxth r2, r3
8008f44: 687b ldr r3, [r7, #4]
8008f46: f8a3 2064 strh.w r2, [r3, #100] ; 0x64
/* check if this ACK ends our retransmission of in-flight data */
if (pcb->flags & TF_RTO) {
8008f4a: 687b ldr r3, [r7, #4]
8008f4c: 8b5b ldrh r3, [r3, #26]
8008f4e: f403 6300 and.w r3, r3, #2048 ; 0x800
8008f52: 2b00 cmp r3, #0
8008f54: d035 beq.n 8008fc2 <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) {
8008f56: 687b ldr r3, [r7, #4]
8008f58: 6f1b ldr r3, [r3, #112] ; 0x70
8008f5a: 2b00 cmp r3, #0
8008f5c: d118 bne.n 8008f90 <tcp_receive+0x418>
if ((pcb->unsent == NULL) ||
8008f5e: 687b ldr r3, [r7, #4]
8008f60: 6edb ldr r3, [r3, #108] ; 0x6c
8008f62: 2b00 cmp r3, #0
8008f64: d00c beq.n 8008f80 <tcp_receive+0x408>
(TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unsent->tcphdr->seqno)))) {
8008f66: 687b ldr r3, [r7, #4]
8008f68: 6cdc ldr r4, [r3, #76] ; 0x4c
8008f6a: 687b ldr r3, [r7, #4]
8008f6c: 6edb ldr r3, [r3, #108] ; 0x6c
8008f6e: 68db ldr r3, [r3, #12]
8008f70: 685b ldr r3, [r3, #4]
8008f72: 4618 mov r0, r3
8008f74: f7fb f9bb bl 80042ee <lwip_htonl>
8008f78: 4603 mov r3, r0
8008f7a: 1ae3 subs r3, r4, r3
if ((pcb->unsent == NULL) ||
8008f7c: 2b00 cmp r3, #0
8008f7e: dc20 bgt.n 8008fc2 <tcp_receive+0x44a>
tcp_clear_flags(pcb, TF_RTO);
8008f80: 687b ldr r3, [r7, #4]
8008f82: 8b5b ldrh r3, [r3, #26]
8008f84: f423 6300 bic.w r3, r3, #2048 ; 0x800
8008f88: b29a uxth r2, r3
8008f8a: 687b ldr r3, [r7, #4]
8008f8c: 835a strh r2, [r3, #26]
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
8008f8e: e018 b.n 8008fc2 <tcp_receive+0x44a>
}
} else if (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unacked->tcphdr->seqno))) {
8008f90: 687b ldr r3, [r7, #4]
8008f92: 6cdc ldr r4, [r3, #76] ; 0x4c
8008f94: 687b ldr r3, [r7, #4]
8008f96: 6f1b ldr r3, [r3, #112] ; 0x70
8008f98: 68db ldr r3, [r3, #12]
8008f9a: 685b ldr r3, [r3, #4]
8008f9c: 4618 mov r0, r3
8008f9e: f7fb f9a6 bl 80042ee <lwip_htonl>
8008fa2: 4603 mov r3, r0
8008fa4: 1ae3 subs r3, r4, r3
8008fa6: 2b00 cmp r3, #0
8008fa8: dc0b bgt.n 8008fc2 <tcp_receive+0x44a>
tcp_clear_flags(pcb, TF_RTO);
8008faa: 687b ldr r3, [r7, #4]
8008fac: 8b5b ldrh r3, [r3, #26]
8008fae: f423 6300 bic.w r3, r3, #2048 ; 0x800
8008fb2: b29a uxth r2, r3
8008fb4: 687b ldr r3, [r7, #4]
8008fb6: 835a strh r2, [r3, #26]
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
8008fb8: e003 b.n 8008fc2 <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);
8008fba: 6878 ldr r0, [r7, #4]
8008fbc: f001 ff76 bl 800aeac <tcp_send_empty_ack>
8008fc0: e000 b.n 8008fc4 <tcp_receive+0x44c>
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
8008fc2: 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)) {
8008fc4: 687b ldr r3, [r7, #4]
8008fc6: 6b5b ldr r3, [r3, #52] ; 0x34
8008fc8: 2b00 cmp r3, #0
8008fca: d05b beq.n 8009084 <tcp_receive+0x50c>
8008fcc: 687b ldr r3, [r7, #4]
8008fce: 6b9a ldr r2, [r3, #56] ; 0x38
8008fd0: 4b60 ldr r3, [pc, #384] ; (8009154 <tcp_receive+0x5dc>)
8008fd2: 681b ldr r3, [r3, #0]
8008fd4: 1ad3 subs r3, r2, r3
8008fd6: 2b00 cmp r3, #0
8008fd8: da54 bge.n 8009084 <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);
8008fda: 4b5f ldr r3, [pc, #380] ; (8009158 <tcp_receive+0x5e0>)
8008fdc: 681b ldr r3, [r3, #0]
8008fde: b29a uxth r2, r3
8008fe0: 687b ldr r3, [r7, #4]
8008fe2: 6b5b ldr r3, [r3, #52] ; 0x34
8008fe4: b29b uxth r3, r3
8008fe6: 1ad3 subs r3, r2, r3
8008fe8: b29b uxth r3, r3
8008fea: 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));
8008fee: f8b7 204e ldrh.w r2, [r7, #78] ; 0x4e
8008ff2: 687b ldr r3, [r7, #4]
8008ff4: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
8008ff8: 10db asrs r3, r3, #3
8008ffa: b21b sxth r3, r3
8008ffc: b29b uxth r3, r3
8008ffe: 1ad3 subs r3, r2, r3
8009000: b29b uxth r3, r3
8009002: f8a7 304e strh.w r3, [r7, #78] ; 0x4e
pcb->sa = (s16_t)(pcb->sa + m);
8009006: 687b ldr r3, [r7, #4]
8009008: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
800900c: b29a uxth r2, r3
800900e: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e
8009012: 4413 add r3, r2
8009014: b29b uxth r3, r3
8009016: b21a sxth r2, r3
8009018: 687b ldr r3, [r7, #4]
800901a: 879a strh r2, [r3, #60] ; 0x3c
if (m < 0) {
800901c: f9b7 304e ldrsh.w r3, [r7, #78] ; 0x4e
8009020: 2b00 cmp r3, #0
8009022: da05 bge.n 8009030 <tcp_receive+0x4b8>
m = (s16_t) - m;
8009024: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e
8009028: 425b negs r3, r3
800902a: b29b uxth r3, r3
800902c: f8a7 304e strh.w r3, [r7, #78] ; 0x4e
}
m = (s16_t)(m - (pcb->sv >> 2));
8009030: f8b7 204e ldrh.w r2, [r7, #78] ; 0x4e
8009034: 687b ldr r3, [r7, #4]
8009036: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
800903a: 109b asrs r3, r3, #2
800903c: b21b sxth r3, r3
800903e: b29b uxth r3, r3
8009040: 1ad3 subs r3, r2, r3
8009042: b29b uxth r3, r3
8009044: f8a7 304e strh.w r3, [r7, #78] ; 0x4e
pcb->sv = (s16_t)(pcb->sv + m);
8009048: 687b ldr r3, [r7, #4]
800904a: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
800904e: b29a uxth r2, r3
8009050: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e
8009054: 4413 add r3, r2
8009056: b29b uxth r3, r3
8009058: b21a sxth r2, r3
800905a: 687b ldr r3, [r7, #4]
800905c: 87da strh r2, [r3, #62] ; 0x3e
pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv);
800905e: 687b ldr r3, [r7, #4]
8009060: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
8009064: 10db asrs r3, r3, #3
8009066: b21b sxth r3, r3
8009068: b29a uxth r2, r3
800906a: 687b ldr r3, [r7, #4]
800906c: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
8009070: b29b uxth r3, r3
8009072: 4413 add r3, r2
8009074: b29b uxth r3, r3
8009076: b21a sxth r2, r3
8009078: 687b ldr r3, [r7, #4]
800907a: 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;
800907e: 687b ldr r3, [r7, #4]
8009080: 2200 movs r2, #0
8009082: 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)) {
8009084: 4b35 ldr r3, [pc, #212] ; (800915c <tcp_receive+0x5e4>)
8009086: 881b ldrh r3, [r3, #0]
8009088: 2b00 cmp r3, #0
800908a: f000 84e2 beq.w 8009a52 <tcp_receive+0xeda>
800908e: 687b ldr r3, [r7, #4]
8009090: 7d1b ldrb r3, [r3, #20]
8009092: 2b06 cmp r3, #6
8009094: f200 84dd bhi.w 8009a52 <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)) {
8009098: 687b ldr r3, [r7, #4]
800909a: 6a5a ldr r2, [r3, #36] ; 0x24
800909c: 4b30 ldr r3, [pc, #192] ; (8009160 <tcp_receive+0x5e8>)
800909e: 681b ldr r3, [r3, #0]
80090a0: 1ad3 subs r3, r2, r3
80090a2: 3b01 subs r3, #1
80090a4: 2b00 cmp r3, #0
80090a6: f2c0 808f blt.w 80091c8 <tcp_receive+0x650>
80090aa: 687b ldr r3, [r7, #4]
80090ac: 6a5a ldr r2, [r3, #36] ; 0x24
80090ae: 4b2b ldr r3, [pc, #172] ; (800915c <tcp_receive+0x5e4>)
80090b0: 881b ldrh r3, [r3, #0]
80090b2: 4619 mov r1, r3
80090b4: 4b2a ldr r3, [pc, #168] ; (8009160 <tcp_receive+0x5e8>)
80090b6: 681b ldr r3, [r3, #0]
80090b8: 440b add r3, r1
80090ba: 1ad3 subs r3, r2, r3
80090bc: 3301 adds r3, #1
80090be: 2b00 cmp r3, #0
80090c0: f300 8082 bgt.w 80091c8 <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;
80090c4: 4b27 ldr r3, [pc, #156] ; (8009164 <tcp_receive+0x5ec>)
80090c6: 685b ldr r3, [r3, #4]
80090c8: 647b str r3, [r7, #68] ; 0x44
u32_t off32 = pcb->rcv_nxt - seqno;
80090ca: 687b ldr r3, [r7, #4]
80090cc: 6a5a ldr r2, [r3, #36] ; 0x24
80090ce: 4b24 ldr r3, [pc, #144] ; (8009160 <tcp_receive+0x5e8>)
80090d0: 681b ldr r3, [r3, #0]
80090d2: 1ad3 subs r3, r2, r3
80090d4: 627b str r3, [r7, #36] ; 0x24
u16_t new_tot_len, off;
LWIP_ASSERT("inseg.p != NULL", inseg.p);
80090d6: 4b23 ldr r3, [pc, #140] ; (8009164 <tcp_receive+0x5ec>)
80090d8: 685b ldr r3, [r3, #4]
80090da: 2b00 cmp r3, #0
80090dc: d106 bne.n 80090ec <tcp_receive+0x574>
80090de: 4b22 ldr r3, [pc, #136] ; (8009168 <tcp_receive+0x5f0>)
80090e0: f240 5294 movw r2, #1428 ; 0x594
80090e4: 4921 ldr r1, [pc, #132] ; (800916c <tcp_receive+0x5f4>)
80090e6: 4822 ldr r0, [pc, #136] ; (8009170 <tcp_receive+0x5f8>)
80090e8: f007 f972 bl 80103d0 <printf>
LWIP_ASSERT("insane offset!", (off32 < 0xffff));
80090ec: 6a7b ldr r3, [r7, #36] ; 0x24
80090ee: f64f 72fe movw r2, #65534 ; 0xfffe
80090f2: 4293 cmp r3, r2
80090f4: d906 bls.n 8009104 <tcp_receive+0x58c>
80090f6: 4b1c ldr r3, [pc, #112] ; (8009168 <tcp_receive+0x5f0>)
80090f8: f240 5295 movw r2, #1429 ; 0x595
80090fc: 491d ldr r1, [pc, #116] ; (8009174 <tcp_receive+0x5fc>)
80090fe: 481c ldr r0, [pc, #112] ; (8009170 <tcp_receive+0x5f8>)
8009100: f007 f966 bl 80103d0 <printf>
off = (u16_t)off32;
8009104: 6a7b ldr r3, [r7, #36] ; 0x24
8009106: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off));
800910a: 4b16 ldr r3, [pc, #88] ; (8009164 <tcp_receive+0x5ec>)
800910c: 685b ldr r3, [r3, #4]
800910e: 891b ldrh r3, [r3, #8]
8009110: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
8009114: 429a cmp r2, r3
8009116: d906 bls.n 8009126 <tcp_receive+0x5ae>
8009118: 4b13 ldr r3, [pc, #76] ; (8009168 <tcp_receive+0x5f0>)
800911a: f240 5297 movw r2, #1431 ; 0x597
800911e: 4916 ldr r1, [pc, #88] ; (8009178 <tcp_receive+0x600>)
8009120: 4813 ldr r0, [pc, #76] ; (8009170 <tcp_receive+0x5f8>)
8009122: f007 f955 bl 80103d0 <printf>
inseg.len -= off;
8009126: 4b0f ldr r3, [pc, #60] ; (8009164 <tcp_receive+0x5ec>)
8009128: 891a ldrh r2, [r3, #8]
800912a: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
800912e: 1ad3 subs r3, r2, r3
8009130: b29a uxth r2, r3
8009132: 4b0c ldr r3, [pc, #48] ; (8009164 <tcp_receive+0x5ec>)
8009134: 811a strh r2, [r3, #8]
new_tot_len = (u16_t)(inseg.p->tot_len - off);
8009136: 4b0b ldr r3, [pc, #44] ; (8009164 <tcp_receive+0x5ec>)
8009138: 685b ldr r3, [r3, #4]
800913a: 891a ldrh r2, [r3, #8]
800913c: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
8009140: 1ad3 subs r3, r2, r3
8009142: 847b strh r3, [r7, #34] ; 0x22
while (p->len < off) {
8009144: e02a b.n 800919c <tcp_receive+0x624>
8009146: bf00 nop
8009148: 0801648c .word 0x0801648c
800914c: 08016494 .word 0x08016494
8009150: 20008c40 .word 0x20008c40
8009154: 20008c3c .word 0x20008c3c
8009158: 20008c00 .word 0x20008c00
800915c: 20008c42 .word 0x20008c42
8009160: 20008c38 .word 0x20008c38
8009164: 20008c18 .word 0x20008c18
8009168: 08016124 .word 0x08016124
800916c: 0801649c .word 0x0801649c
8009170: 08016170 .word 0x08016170
8009174: 080164ac .word 0x080164ac
8009178: 080164bc .word 0x080164bc
off -= p->len;
800917c: 6c7b ldr r3, [r7, #68] ; 0x44
800917e: 895b ldrh r3, [r3, #10]
8009180: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
8009184: 1ad3 subs r3, r2, r3
8009186: 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;
800918a: 6c7b ldr r3, [r7, #68] ; 0x44
800918c: 8c7a ldrh r2, [r7, #34] ; 0x22
800918e: 811a strh r2, [r3, #8]
p->len = 0;
8009190: 6c7b ldr r3, [r7, #68] ; 0x44
8009192: 2200 movs r2, #0
8009194: 815a strh r2, [r3, #10]
p = p->next;
8009196: 6c7b ldr r3, [r7, #68] ; 0x44
8009198: 681b ldr r3, [r3, #0]
800919a: 647b str r3, [r7, #68] ; 0x44
while (p->len < off) {
800919c: 6c7b ldr r3, [r7, #68] ; 0x44
800919e: 895b ldrh r3, [r3, #10]
80091a0: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
80091a4: 429a cmp r2, r3
80091a6: d8e9 bhi.n 800917c <tcp_receive+0x604>
}
/* cannot fail... */
pbuf_remove_header(p, off);
80091a8: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
80091ac: 4619 mov r1, r3
80091ae: 6c78 ldr r0, [r7, #68] ; 0x44
80091b0: f7fc fb6c bl 800588c <pbuf_remove_header>
inseg.tcphdr->seqno = seqno = pcb->rcv_nxt;
80091b4: 687b ldr r3, [r7, #4]
80091b6: 6a5b ldr r3, [r3, #36] ; 0x24
80091b8: 4a91 ldr r2, [pc, #580] ; (8009400 <tcp_receive+0x888>)
80091ba: 6013 str r3, [r2, #0]
80091bc: 4b91 ldr r3, [pc, #580] ; (8009404 <tcp_receive+0x88c>)
80091be: 68db ldr r3, [r3, #12]
80091c0: 4a8f ldr r2, [pc, #572] ; (8009400 <tcp_receive+0x888>)
80091c2: 6812 ldr r2, [r2, #0]
80091c4: 605a str r2, [r3, #4]
if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) {
80091c6: e00d b.n 80091e4 <tcp_receive+0x66c>
} else {
if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) {
80091c8: 4b8d ldr r3, [pc, #564] ; (8009400 <tcp_receive+0x888>)
80091ca: 681a ldr r2, [r3, #0]
80091cc: 687b ldr r3, [r7, #4]
80091ce: 6a5b ldr r3, [r3, #36] ; 0x24
80091d0: 1ad3 subs r3, r2, r3
80091d2: 2b00 cmp r3, #0
80091d4: da06 bge.n 80091e4 <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);
80091d6: 687b ldr r3, [r7, #4]
80091d8: 8b5b ldrh r3, [r3, #26]
80091da: f043 0302 orr.w r3, r3, #2
80091de: b29a uxth r2, r3
80091e0: 687b ldr r3, [r7, #4]
80091e2: 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,
80091e4: 4b86 ldr r3, [pc, #536] ; (8009400 <tcp_receive+0x888>)
80091e6: 681a ldr r2, [r3, #0]
80091e8: 687b ldr r3, [r7, #4]
80091ea: 6a5b ldr r3, [r3, #36] ; 0x24
80091ec: 1ad3 subs r3, r2, r3
80091ee: 2b00 cmp r3, #0
80091f0: f2c0 842a blt.w 8009a48 <tcp_receive+0xed0>
80091f4: 4b82 ldr r3, [pc, #520] ; (8009400 <tcp_receive+0x888>)
80091f6: 681a ldr r2, [r3, #0]
80091f8: 687b ldr r3, [r7, #4]
80091fa: 6a5b ldr r3, [r3, #36] ; 0x24
80091fc: 6879 ldr r1, [r7, #4]
80091fe: 8d09 ldrh r1, [r1, #40] ; 0x28
8009200: 440b add r3, r1
8009202: 1ad3 subs r3, r2, r3
8009204: 3301 adds r3, #1
8009206: 2b00 cmp r3, #0
8009208: f300 841e bgt.w 8009a48 <tcp_receive+0xed0>
pcb->rcv_nxt + pcb->rcv_wnd - 1)) {
if (pcb->rcv_nxt == seqno) {
800920c: 687b ldr r3, [r7, #4]
800920e: 6a5a ldr r2, [r3, #36] ; 0x24
8009210: 4b7b ldr r3, [pc, #492] ; (8009400 <tcp_receive+0x888>)
8009212: 681b ldr r3, [r3, #0]
8009214: 429a cmp r2, r3
8009216: f040 829a bne.w 800974e <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);
800921a: 4b7a ldr r3, [pc, #488] ; (8009404 <tcp_receive+0x88c>)
800921c: 891c ldrh r4, [r3, #8]
800921e: 4b79 ldr r3, [pc, #484] ; (8009404 <tcp_receive+0x88c>)
8009220: 68db ldr r3, [r3, #12]
8009222: 899b ldrh r3, [r3, #12]
8009224: b29b uxth r3, r3
8009226: 4618 mov r0, r3
8009228: f7fb f84c bl 80042c4 <lwip_htons>
800922c: 4603 mov r3, r0
800922e: b2db uxtb r3, r3
8009230: f003 0303 and.w r3, r3, #3
8009234: 2b00 cmp r3, #0
8009236: d001 beq.n 800923c <tcp_receive+0x6c4>
8009238: 2301 movs r3, #1
800923a: e000 b.n 800923e <tcp_receive+0x6c6>
800923c: 2300 movs r3, #0
800923e: 4423 add r3, r4
8009240: b29a uxth r2, r3
8009242: 4b71 ldr r3, [pc, #452] ; (8009408 <tcp_receive+0x890>)
8009244: 801a strh r2, [r3, #0]
if (tcplen > pcb->rcv_wnd) {
8009246: 687b ldr r3, [r7, #4]
8009248: 8d1a ldrh r2, [r3, #40] ; 0x28
800924a: 4b6f ldr r3, [pc, #444] ; (8009408 <tcp_receive+0x890>)
800924c: 881b ldrh r3, [r3, #0]
800924e: 429a cmp r2, r3
8009250: d275 bcs.n 800933e <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) {
8009252: 4b6c ldr r3, [pc, #432] ; (8009404 <tcp_receive+0x88c>)
8009254: 68db ldr r3, [r3, #12]
8009256: 899b ldrh r3, [r3, #12]
8009258: b29b uxth r3, r3
800925a: 4618 mov r0, r3
800925c: f7fb f832 bl 80042c4 <lwip_htons>
8009260: 4603 mov r3, r0
8009262: b2db uxtb r3, r3
8009264: f003 0301 and.w r3, r3, #1
8009268: 2b00 cmp r3, #0
800926a: d01f beq.n 80092ac <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);
800926c: 4b65 ldr r3, [pc, #404] ; (8009404 <tcp_receive+0x88c>)
800926e: 68db ldr r3, [r3, #12]
8009270: 899b ldrh r3, [r3, #12]
8009272: b29b uxth r3, r3
8009274: b21b sxth r3, r3
8009276: f423 537c bic.w r3, r3, #16128 ; 0x3f00
800927a: b21c sxth r4, r3
800927c: 4b61 ldr r3, [pc, #388] ; (8009404 <tcp_receive+0x88c>)
800927e: 68db ldr r3, [r3, #12]
8009280: 899b ldrh r3, [r3, #12]
8009282: b29b uxth r3, r3
8009284: 4618 mov r0, r3
8009286: f7fb f81d bl 80042c4 <lwip_htons>
800928a: 4603 mov r3, r0
800928c: b2db uxtb r3, r3
800928e: b29b uxth r3, r3
8009290: f003 033e and.w r3, r3, #62 ; 0x3e
8009294: b29b uxth r3, r3
8009296: 4618 mov r0, r3
8009298: f7fb f814 bl 80042c4 <lwip_htons>
800929c: 4603 mov r3, r0
800929e: b21b sxth r3, r3
80092a0: 4323 orrs r3, r4
80092a2: b21a sxth r2, r3
80092a4: 4b57 ldr r3, [pc, #348] ; (8009404 <tcp_receive+0x88c>)
80092a6: 68db ldr r3, [r3, #12]
80092a8: b292 uxth r2, r2
80092aa: 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;
80092ac: 687b ldr r3, [r7, #4]
80092ae: 8d1a ldrh r2, [r3, #40] ; 0x28
80092b0: 4b54 ldr r3, [pc, #336] ; (8009404 <tcp_receive+0x88c>)
80092b2: 811a strh r2, [r3, #8]
if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) {
80092b4: 4b53 ldr r3, [pc, #332] ; (8009404 <tcp_receive+0x88c>)
80092b6: 68db ldr r3, [r3, #12]
80092b8: 899b ldrh r3, [r3, #12]
80092ba: b29b uxth r3, r3
80092bc: 4618 mov r0, r3
80092be: f7fb f801 bl 80042c4 <lwip_htons>
80092c2: 4603 mov r3, r0
80092c4: b2db uxtb r3, r3
80092c6: f003 0302 and.w r3, r3, #2
80092ca: 2b00 cmp r3, #0
80092cc: d005 beq.n 80092da <tcp_receive+0x762>
inseg.len -= 1;
80092ce: 4b4d ldr r3, [pc, #308] ; (8009404 <tcp_receive+0x88c>)
80092d0: 891b ldrh r3, [r3, #8]
80092d2: 3b01 subs r3, #1
80092d4: b29a uxth r2, r3
80092d6: 4b4b ldr r3, [pc, #300] ; (8009404 <tcp_receive+0x88c>)
80092d8: 811a strh r2, [r3, #8]
}
pbuf_realloc(inseg.p, inseg.len);
80092da: 4b4a ldr r3, [pc, #296] ; (8009404 <tcp_receive+0x88c>)
80092dc: 685b ldr r3, [r3, #4]
80092de: 4a49 ldr r2, [pc, #292] ; (8009404 <tcp_receive+0x88c>)
80092e0: 8912 ldrh r2, [r2, #8]
80092e2: 4611 mov r1, r2
80092e4: 4618 mov r0, r3
80092e6: f7fc f9d1 bl 800568c <pbuf_realloc>
tcplen = TCP_TCPLEN(&inseg);
80092ea: 4b46 ldr r3, [pc, #280] ; (8009404 <tcp_receive+0x88c>)
80092ec: 891c ldrh r4, [r3, #8]
80092ee: 4b45 ldr r3, [pc, #276] ; (8009404 <tcp_receive+0x88c>)
80092f0: 68db ldr r3, [r3, #12]
80092f2: 899b ldrh r3, [r3, #12]
80092f4: b29b uxth r3, r3
80092f6: 4618 mov r0, r3
80092f8: f7fa ffe4 bl 80042c4 <lwip_htons>
80092fc: 4603 mov r3, r0
80092fe: b2db uxtb r3, r3
8009300: f003 0303 and.w r3, r3, #3
8009304: 2b00 cmp r3, #0
8009306: d001 beq.n 800930c <tcp_receive+0x794>
8009308: 2301 movs r3, #1
800930a: e000 b.n 800930e <tcp_receive+0x796>
800930c: 2300 movs r3, #0
800930e: 4423 add r3, r4
8009310: b29a uxth r2, r3
8009312: 4b3d ldr r3, [pc, #244] ; (8009408 <tcp_receive+0x890>)
8009314: 801a strh r2, [r3, #0]
LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n",
8009316: 4b3c ldr r3, [pc, #240] ; (8009408 <tcp_receive+0x890>)
8009318: 881b ldrh r3, [r3, #0]
800931a: 461a mov r2, r3
800931c: 4b38 ldr r3, [pc, #224] ; (8009400 <tcp_receive+0x888>)
800931e: 681b ldr r3, [r3, #0]
8009320: 441a add r2, r3
8009322: 687b ldr r3, [r7, #4]
8009324: 6a5b ldr r3, [r3, #36] ; 0x24
8009326: 6879 ldr r1, [r7, #4]
8009328: 8d09 ldrh r1, [r1, #40] ; 0x28
800932a: 440b add r3, r1
800932c: 429a cmp r2, r3
800932e: d006 beq.n 800933e <tcp_receive+0x7c6>
8009330: 4b36 ldr r3, [pc, #216] ; (800940c <tcp_receive+0x894>)
8009332: f240 52cb movw r2, #1483 ; 0x5cb
8009336: 4936 ldr r1, [pc, #216] ; (8009410 <tcp_receive+0x898>)
8009338: 4836 ldr r0, [pc, #216] ; (8009414 <tcp_receive+0x89c>)
800933a: f007 f849 bl 80103d0 <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) {
800933e: 687b ldr r3, [r7, #4]
8009340: 6f5b ldr r3, [r3, #116] ; 0x74
8009342: 2b00 cmp r3, #0
8009344: f000 80e7 beq.w 8009516 <tcp_receive+0x99e>
if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
8009348: 4b2e ldr r3, [pc, #184] ; (8009404 <tcp_receive+0x88c>)
800934a: 68db ldr r3, [r3, #12]
800934c: 899b ldrh r3, [r3, #12]
800934e: b29b uxth r3, r3
8009350: 4618 mov r0, r3
8009352: f7fa ffb7 bl 80042c4 <lwip_htons>
8009356: 4603 mov r3, r0
8009358: b2db uxtb r3, r3
800935a: f003 0301 and.w r3, r3, #1
800935e: 2b00 cmp r3, #0
8009360: d010 beq.n 8009384 <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) {
8009362: e00a b.n 800937a <tcp_receive+0x802>
struct tcp_seg *old_ooseq = pcb->ooseq;
8009364: 687b ldr r3, [r7, #4]
8009366: 6f5b ldr r3, [r3, #116] ; 0x74
8009368: 60fb str r3, [r7, #12]
pcb->ooseq = pcb->ooseq->next;
800936a: 687b ldr r3, [r7, #4]
800936c: 6f5b ldr r3, [r3, #116] ; 0x74
800936e: 681a ldr r2, [r3, #0]
8009370: 687b ldr r3, [r7, #4]
8009372: 675a str r2, [r3, #116] ; 0x74
tcp_seg_free(old_ooseq);
8009374: 68f8 ldr r0, [r7, #12]
8009376: f7fd fd92 bl 8006e9e <tcp_seg_free>
while (pcb->ooseq != NULL) {
800937a: 687b ldr r3, [r7, #4]
800937c: 6f5b ldr r3, [r3, #116] ; 0x74
800937e: 2b00 cmp r3, #0
8009380: d1f0 bne.n 8009364 <tcp_receive+0x7ec>
8009382: e0c8 b.n 8009516 <tcp_receive+0x99e>
}
} else {
struct tcp_seg *next = pcb->ooseq;
8009384: 687b ldr r3, [r7, #4]
8009386: 6f5b ldr r3, [r3, #116] ; 0x74
8009388: 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 &&
800938a: e052 b.n 8009432 <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 &&
800938c: 6bfb ldr r3, [r7, #60] ; 0x3c
800938e: 68db ldr r3, [r3, #12]
8009390: 899b ldrh r3, [r3, #12]
8009392: b29b uxth r3, r3
8009394: 4618 mov r0, r3
8009396: f7fa ff95 bl 80042c4 <lwip_htons>
800939a: 4603 mov r3, r0
800939c: b2db uxtb r3, r3
800939e: f003 0301 and.w r3, r3, #1
80093a2: 2b00 cmp r3, #0
80093a4: d03d beq.n 8009422 <tcp_receive+0x8aa>
(TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) == 0) {
80093a6: 4b17 ldr r3, [pc, #92] ; (8009404 <tcp_receive+0x88c>)
80093a8: 68db ldr r3, [r3, #12]
80093aa: 899b ldrh r3, [r3, #12]
80093ac: b29b uxth r3, r3
80093ae: 4618 mov r0, r3
80093b0: f7fa ff88 bl 80042c4 <lwip_htons>
80093b4: 4603 mov r3, r0
80093b6: b2db uxtb r3, r3
80093b8: f003 0302 and.w r3, r3, #2
if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 &&
80093bc: 2b00 cmp r3, #0
80093be: d130 bne.n 8009422 <tcp_receive+0x8aa>
TCPH_SET_FLAG(inseg.tcphdr, TCP_FIN);
80093c0: 4b10 ldr r3, [pc, #64] ; (8009404 <tcp_receive+0x88c>)
80093c2: 68db ldr r3, [r3, #12]
80093c4: 899b ldrh r3, [r3, #12]
80093c6: b29c uxth r4, r3
80093c8: 2001 movs r0, #1
80093ca: f7fa ff7b bl 80042c4 <lwip_htons>
80093ce: 4603 mov r3, r0
80093d0: 461a mov r2, r3
80093d2: 4b0c ldr r3, [pc, #48] ; (8009404 <tcp_receive+0x88c>)
80093d4: 68db ldr r3, [r3, #12]
80093d6: 4322 orrs r2, r4
80093d8: b292 uxth r2, r2
80093da: 819a strh r2, [r3, #12]
tcplen = TCP_TCPLEN(&inseg);
80093dc: 4b09 ldr r3, [pc, #36] ; (8009404 <tcp_receive+0x88c>)
80093de: 891c ldrh r4, [r3, #8]
80093e0: 4b08 ldr r3, [pc, #32] ; (8009404 <tcp_receive+0x88c>)
80093e2: 68db ldr r3, [r3, #12]
80093e4: 899b ldrh r3, [r3, #12]
80093e6: b29b uxth r3, r3
80093e8: 4618 mov r0, r3
80093ea: f7fa ff6b bl 80042c4 <lwip_htons>
80093ee: 4603 mov r3, r0
80093f0: b2db uxtb r3, r3
80093f2: f003 0303 and.w r3, r3, #3
80093f6: 2b00 cmp r3, #0
80093f8: d00e beq.n 8009418 <tcp_receive+0x8a0>
80093fa: 2301 movs r3, #1
80093fc: e00d b.n 800941a <tcp_receive+0x8a2>
80093fe: bf00 nop
8009400: 20008c38 .word 0x20008c38
8009404: 20008c18 .word 0x20008c18
8009408: 20008c42 .word 0x20008c42
800940c: 08016124 .word 0x08016124
8009410: 080164cc .word 0x080164cc
8009414: 08016170 .word 0x08016170
8009418: 2300 movs r3, #0
800941a: 4423 add r3, r4
800941c: b29a uxth r2, r3
800941e: 4b98 ldr r3, [pc, #608] ; (8009680 <tcp_receive+0xb08>)
8009420: 801a strh r2, [r3, #0]
}
tmp = next;
8009422: 6bfb ldr r3, [r7, #60] ; 0x3c
8009424: 613b str r3, [r7, #16]
next = next->next;
8009426: 6bfb ldr r3, [r7, #60] ; 0x3c
8009428: 681b ldr r3, [r3, #0]
800942a: 63fb str r3, [r7, #60] ; 0x3c
tcp_seg_free(tmp);
800942c: 6938 ldr r0, [r7, #16]
800942e: f7fd fd36 bl 8006e9e <tcp_seg_free>
while (next &&
8009432: 6bfb ldr r3, [r7, #60] ; 0x3c
8009434: 2b00 cmp r3, #0
8009436: d00e beq.n 8009456 <tcp_receive+0x8de>
TCP_SEQ_GEQ(seqno + tcplen,
8009438: 4b91 ldr r3, [pc, #580] ; (8009680 <tcp_receive+0xb08>)
800943a: 881b ldrh r3, [r3, #0]
800943c: 461a mov r2, r3
800943e: 4b91 ldr r3, [pc, #580] ; (8009684 <tcp_receive+0xb0c>)
8009440: 681b ldr r3, [r3, #0]
8009442: 441a add r2, r3
8009444: 6bfb ldr r3, [r7, #60] ; 0x3c
8009446: 68db ldr r3, [r3, #12]
8009448: 685b ldr r3, [r3, #4]
800944a: 6bf9 ldr r1, [r7, #60] ; 0x3c
800944c: 8909 ldrh r1, [r1, #8]
800944e: 440b add r3, r1
8009450: 1ad3 subs r3, r2, r3
while (next &&
8009452: 2b00 cmp r3, #0
8009454: da9a bge.n 800938c <tcp_receive+0x814>
}
/* Now trim right side of inseg if it overlaps with the first
* segment on ooseq */
if (next &&
8009456: 6bfb ldr r3, [r7, #60] ; 0x3c
8009458: 2b00 cmp r3, #0
800945a: d059 beq.n 8009510 <tcp_receive+0x998>
TCP_SEQ_GT(seqno + tcplen,
800945c: 4b88 ldr r3, [pc, #544] ; (8009680 <tcp_receive+0xb08>)
800945e: 881b ldrh r3, [r3, #0]
8009460: 461a mov r2, r3
8009462: 4b88 ldr r3, [pc, #544] ; (8009684 <tcp_receive+0xb0c>)
8009464: 681b ldr r3, [r3, #0]
8009466: 441a add r2, r3
8009468: 6bfb ldr r3, [r7, #60] ; 0x3c
800946a: 68db ldr r3, [r3, #12]
800946c: 685b ldr r3, [r3, #4]
800946e: 1ad3 subs r3, r2, r3
if (next &&
8009470: 2b00 cmp r3, #0
8009472: dd4d ble.n 8009510 <tcp_receive+0x998>
next->tcphdr->seqno)) {
/* inseg cannot have FIN here (already processed above) */
inseg.len = (u16_t)(next->tcphdr->seqno - seqno);
8009474: 6bfb ldr r3, [r7, #60] ; 0x3c
8009476: 68db ldr r3, [r3, #12]
8009478: 685b ldr r3, [r3, #4]
800947a: b29a uxth r2, r3
800947c: 4b81 ldr r3, [pc, #516] ; (8009684 <tcp_receive+0xb0c>)
800947e: 681b ldr r3, [r3, #0]
8009480: b29b uxth r3, r3
8009482: 1ad3 subs r3, r2, r3
8009484: b29a uxth r2, r3
8009486: 4b80 ldr r3, [pc, #512] ; (8009688 <tcp_receive+0xb10>)
8009488: 811a strh r2, [r3, #8]
if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) {
800948a: 4b7f ldr r3, [pc, #508] ; (8009688 <tcp_receive+0xb10>)
800948c: 68db ldr r3, [r3, #12]
800948e: 899b ldrh r3, [r3, #12]
8009490: b29b uxth r3, r3
8009492: 4618 mov r0, r3
8009494: f7fa ff16 bl 80042c4 <lwip_htons>
8009498: 4603 mov r3, r0
800949a: b2db uxtb r3, r3
800949c: f003 0302 and.w r3, r3, #2
80094a0: 2b00 cmp r3, #0
80094a2: d005 beq.n 80094b0 <tcp_receive+0x938>
inseg.len -= 1;
80094a4: 4b78 ldr r3, [pc, #480] ; (8009688 <tcp_receive+0xb10>)
80094a6: 891b ldrh r3, [r3, #8]
80094a8: 3b01 subs r3, #1
80094aa: b29a uxth r2, r3
80094ac: 4b76 ldr r3, [pc, #472] ; (8009688 <tcp_receive+0xb10>)
80094ae: 811a strh r2, [r3, #8]
}
pbuf_realloc(inseg.p, inseg.len);
80094b0: 4b75 ldr r3, [pc, #468] ; (8009688 <tcp_receive+0xb10>)
80094b2: 685b ldr r3, [r3, #4]
80094b4: 4a74 ldr r2, [pc, #464] ; (8009688 <tcp_receive+0xb10>)
80094b6: 8912 ldrh r2, [r2, #8]
80094b8: 4611 mov r1, r2
80094ba: 4618 mov r0, r3
80094bc: f7fc f8e6 bl 800568c <pbuf_realloc>
tcplen = TCP_TCPLEN(&inseg);
80094c0: 4b71 ldr r3, [pc, #452] ; (8009688 <tcp_receive+0xb10>)
80094c2: 891c ldrh r4, [r3, #8]
80094c4: 4b70 ldr r3, [pc, #448] ; (8009688 <tcp_receive+0xb10>)
80094c6: 68db ldr r3, [r3, #12]
80094c8: 899b ldrh r3, [r3, #12]
80094ca: b29b uxth r3, r3
80094cc: 4618 mov r0, r3
80094ce: f7fa fef9 bl 80042c4 <lwip_htons>
80094d2: 4603 mov r3, r0
80094d4: b2db uxtb r3, r3
80094d6: f003 0303 and.w r3, r3, #3
80094da: 2b00 cmp r3, #0
80094dc: d001 beq.n 80094e2 <tcp_receive+0x96a>
80094de: 2301 movs r3, #1
80094e0: e000 b.n 80094e4 <tcp_receive+0x96c>
80094e2: 2300 movs r3, #0
80094e4: 4423 add r3, r4
80094e6: b29a uxth r2, r3
80094e8: 4b65 ldr r3, [pc, #404] ; (8009680 <tcp_receive+0xb08>)
80094ea: 801a strh r2, [r3, #0]
LWIP_ASSERT("tcp_receive: segment not trimmed correctly to ooseq queue\n",
80094ec: 4b64 ldr r3, [pc, #400] ; (8009680 <tcp_receive+0xb08>)
80094ee: 881b ldrh r3, [r3, #0]
80094f0: 461a mov r2, r3
80094f2: 4b64 ldr r3, [pc, #400] ; (8009684 <tcp_receive+0xb0c>)
80094f4: 681b ldr r3, [r3, #0]
80094f6: 441a add r2, r3
80094f8: 6bfb ldr r3, [r7, #60] ; 0x3c
80094fa: 68db ldr r3, [r3, #12]
80094fc: 685b ldr r3, [r3, #4]
80094fe: 429a cmp r2, r3
8009500: d006 beq.n 8009510 <tcp_receive+0x998>
8009502: 4b62 ldr r3, [pc, #392] ; (800968c <tcp_receive+0xb14>)
8009504: f240 52fc movw r2, #1532 ; 0x5fc
8009508: 4961 ldr r1, [pc, #388] ; (8009690 <tcp_receive+0xb18>)
800950a: 4862 ldr r0, [pc, #392] ; (8009694 <tcp_receive+0xb1c>)
800950c: f006 ff60 bl 80103d0 <printf>
(seqno + tcplen) == next->tcphdr->seqno);
}
pcb->ooseq = next;
8009510: 687b ldr r3, [r7, #4]
8009512: 6bfa ldr r2, [r7, #60] ; 0x3c
8009514: 675a str r2, [r3, #116] ; 0x74
}
}
#endif /* TCP_QUEUE_OOSEQ */
pcb->rcv_nxt = seqno + tcplen;
8009516: 4b5a ldr r3, [pc, #360] ; (8009680 <tcp_receive+0xb08>)
8009518: 881b ldrh r3, [r3, #0]
800951a: 461a mov r2, r3
800951c: 4b59 ldr r3, [pc, #356] ; (8009684 <tcp_receive+0xb0c>)
800951e: 681b ldr r3, [r3, #0]
8009520: 441a add r2, r3
8009522: 687b ldr r3, [r7, #4]
8009524: 625a str r2, [r3, #36] ; 0x24
/* Update the receiver's (our) window. */
LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen);
8009526: 687b ldr r3, [r7, #4]
8009528: 8d1a ldrh r2, [r3, #40] ; 0x28
800952a: 4b55 ldr r3, [pc, #340] ; (8009680 <tcp_receive+0xb08>)
800952c: 881b ldrh r3, [r3, #0]
800952e: 429a cmp r2, r3
8009530: d206 bcs.n 8009540 <tcp_receive+0x9c8>
8009532: 4b56 ldr r3, [pc, #344] ; (800968c <tcp_receive+0xb14>)
8009534: f240 6207 movw r2, #1543 ; 0x607
8009538: 4957 ldr r1, [pc, #348] ; (8009698 <tcp_receive+0xb20>)
800953a: 4856 ldr r0, [pc, #344] ; (8009694 <tcp_receive+0xb1c>)
800953c: f006 ff48 bl 80103d0 <printf>
pcb->rcv_wnd -= tcplen;
8009540: 687b ldr r3, [r7, #4]
8009542: 8d1a ldrh r2, [r3, #40] ; 0x28
8009544: 4b4e ldr r3, [pc, #312] ; (8009680 <tcp_receive+0xb08>)
8009546: 881b ldrh r3, [r3, #0]
8009548: 1ad3 subs r3, r2, r3
800954a: b29a uxth r2, r3
800954c: 687b ldr r3, [r7, #4]
800954e: 851a strh r2, [r3, #40] ; 0x28
tcp_update_rcv_ann_wnd(pcb);
8009550: 6878 ldr r0, [r7, #4]
8009552: f7fc ffc5 bl 80064e0 <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) {
8009556: 4b4c ldr r3, [pc, #304] ; (8009688 <tcp_receive+0xb10>)
8009558: 685b ldr r3, [r3, #4]
800955a: 891b ldrh r3, [r3, #8]
800955c: 2b00 cmp r3, #0
800955e: d006 beq.n 800956e <tcp_receive+0x9f6>
recv_data = inseg.p;
8009560: 4b49 ldr r3, [pc, #292] ; (8009688 <tcp_receive+0xb10>)
8009562: 685b ldr r3, [r3, #4]
8009564: 4a4d ldr r2, [pc, #308] ; (800969c <tcp_receive+0xb24>)
8009566: 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;
8009568: 4b47 ldr r3, [pc, #284] ; (8009688 <tcp_receive+0xb10>)
800956a: 2200 movs r2, #0
800956c: 605a str r2, [r3, #4]
}
if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
800956e: 4b46 ldr r3, [pc, #280] ; (8009688 <tcp_receive+0xb10>)
8009570: 68db ldr r3, [r3, #12]
8009572: 899b ldrh r3, [r3, #12]
8009574: b29b uxth r3, r3
8009576: 4618 mov r0, r3
8009578: f7fa fea4 bl 80042c4 <lwip_htons>
800957c: 4603 mov r3, r0
800957e: b2db uxtb r3, r3
8009580: f003 0301 and.w r3, r3, #1
8009584: 2b00 cmp r3, #0
8009586: f000 80b8 beq.w 80096fa <tcp_receive+0xb82>
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n"));
recv_flags |= TF_GOT_FIN;
800958a: 4b45 ldr r3, [pc, #276] ; (80096a0 <tcp_receive+0xb28>)
800958c: 781b ldrb r3, [r3, #0]
800958e: f043 0320 orr.w r3, r3, #32
8009592: b2da uxtb r2, r3
8009594: 4b42 ldr r3, [pc, #264] ; (80096a0 <tcp_receive+0xb28>)
8009596: 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 &&
8009598: e0af b.n 80096fa <tcp_receive+0xb82>
pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) {
struct tcp_seg *cseg = pcb->ooseq;
800959a: 687b ldr r3, [r7, #4]
800959c: 6f5b ldr r3, [r3, #116] ; 0x74
800959e: 60bb str r3, [r7, #8]
seqno = pcb->ooseq->tcphdr->seqno;
80095a0: 687b ldr r3, [r7, #4]
80095a2: 6f5b ldr r3, [r3, #116] ; 0x74
80095a4: 68db ldr r3, [r3, #12]
80095a6: 685b ldr r3, [r3, #4]
80095a8: 4a36 ldr r2, [pc, #216] ; (8009684 <tcp_receive+0xb0c>)
80095aa: 6013 str r3, [r2, #0]
pcb->rcv_nxt += TCP_TCPLEN(cseg);
80095ac: 68bb ldr r3, [r7, #8]
80095ae: 891b ldrh r3, [r3, #8]
80095b0: 461c mov r4, r3
80095b2: 68bb ldr r3, [r7, #8]
80095b4: 68db ldr r3, [r3, #12]
80095b6: 899b ldrh r3, [r3, #12]
80095b8: b29b uxth r3, r3
80095ba: 4618 mov r0, r3
80095bc: f7fa fe82 bl 80042c4 <lwip_htons>
80095c0: 4603 mov r3, r0
80095c2: b2db uxtb r3, r3
80095c4: f003 0303 and.w r3, r3, #3
80095c8: 2b00 cmp r3, #0
80095ca: d001 beq.n 80095d0 <tcp_receive+0xa58>
80095cc: 2301 movs r3, #1
80095ce: e000 b.n 80095d2 <tcp_receive+0xa5a>
80095d0: 2300 movs r3, #0
80095d2: 191a adds r2, r3, r4
80095d4: 687b ldr r3, [r7, #4]
80095d6: 6a5b ldr r3, [r3, #36] ; 0x24
80095d8: 441a add r2, r3
80095da: 687b ldr r3, [r7, #4]
80095dc: 625a str r2, [r3, #36] ; 0x24
LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n",
80095de: 687b ldr r3, [r7, #4]
80095e0: 8d1b ldrh r3, [r3, #40] ; 0x28
80095e2: 461c mov r4, r3
80095e4: 68bb ldr r3, [r7, #8]
80095e6: 891b ldrh r3, [r3, #8]
80095e8: 461d mov r5, r3
80095ea: 68bb ldr r3, [r7, #8]
80095ec: 68db ldr r3, [r3, #12]
80095ee: 899b ldrh r3, [r3, #12]
80095f0: b29b uxth r3, r3
80095f2: 4618 mov r0, r3
80095f4: f7fa fe66 bl 80042c4 <lwip_htons>
80095f8: 4603 mov r3, r0
80095fa: b2db uxtb r3, r3
80095fc: f003 0303 and.w r3, r3, #3
8009600: 2b00 cmp r3, #0
8009602: d001 beq.n 8009608 <tcp_receive+0xa90>
8009604: 2301 movs r3, #1
8009606: e000 b.n 800960a <tcp_receive+0xa92>
8009608: 2300 movs r3, #0
800960a: 442b add r3, r5
800960c: 429c cmp r4, r3
800960e: d206 bcs.n 800961e <tcp_receive+0xaa6>
8009610: 4b1e ldr r3, [pc, #120] ; (800968c <tcp_receive+0xb14>)
8009612: f240 622b movw r2, #1579 ; 0x62b
8009616: 4923 ldr r1, [pc, #140] ; (80096a4 <tcp_receive+0xb2c>)
8009618: 481e ldr r0, [pc, #120] ; (8009694 <tcp_receive+0xb1c>)
800961a: f006 fed9 bl 80103d0 <printf>
pcb->rcv_wnd >= TCP_TCPLEN(cseg));
pcb->rcv_wnd -= TCP_TCPLEN(cseg);
800961e: 68bb ldr r3, [r7, #8]
8009620: 891b ldrh r3, [r3, #8]
8009622: 461c mov r4, r3
8009624: 68bb ldr r3, [r7, #8]
8009626: 68db ldr r3, [r3, #12]
8009628: 899b ldrh r3, [r3, #12]
800962a: b29b uxth r3, r3
800962c: 4618 mov r0, r3
800962e: f7fa fe49 bl 80042c4 <lwip_htons>
8009632: 4603 mov r3, r0
8009634: b2db uxtb r3, r3
8009636: f003 0303 and.w r3, r3, #3
800963a: 2b00 cmp r3, #0
800963c: d001 beq.n 8009642 <tcp_receive+0xaca>
800963e: 2301 movs r3, #1
8009640: e000 b.n 8009644 <tcp_receive+0xacc>
8009642: 2300 movs r3, #0
8009644: 1919 adds r1, r3, r4
8009646: 687b ldr r3, [r7, #4]
8009648: 8d1a ldrh r2, [r3, #40] ; 0x28
800964a: b28b uxth r3, r1
800964c: 1ad3 subs r3, r2, r3
800964e: b29a uxth r2, r3
8009650: 687b ldr r3, [r7, #4]
8009652: 851a strh r2, [r3, #40] ; 0x28
tcp_update_rcv_ann_wnd(pcb);
8009654: 6878 ldr r0, [r7, #4]
8009656: f7fc ff43 bl 80064e0 <tcp_update_rcv_ann_wnd>
if (cseg->p->tot_len > 0) {
800965a: 68bb ldr r3, [r7, #8]
800965c: 685b ldr r3, [r3, #4]
800965e: 891b ldrh r3, [r3, #8]
8009660: 2b00 cmp r3, #0
8009662: d028 beq.n 80096b6 <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) {
8009664: 4b0d ldr r3, [pc, #52] ; (800969c <tcp_receive+0xb24>)
8009666: 681b ldr r3, [r3, #0]
8009668: 2b00 cmp r3, #0
800966a: d01d beq.n 80096a8 <tcp_receive+0xb30>
pbuf_cat(recv_data, cseg->p);
800966c: 4b0b ldr r3, [pc, #44] ; (800969c <tcp_receive+0xb24>)
800966e: 681a ldr r2, [r3, #0]
8009670: 68bb ldr r3, [r7, #8]
8009672: 685b ldr r3, [r3, #4]
8009674: 4619 mov r1, r3
8009676: 4610 mov r0, r2
8009678: f7fc fa50 bl 8005b1c <pbuf_cat>
800967c: e018 b.n 80096b0 <tcp_receive+0xb38>
800967e: bf00 nop
8009680: 20008c42 .word 0x20008c42
8009684: 20008c38 .word 0x20008c38
8009688: 20008c18 .word 0x20008c18
800968c: 08016124 .word 0x08016124
8009690: 08016504 .word 0x08016504
8009694: 08016170 .word 0x08016170
8009698: 08016540 .word 0x08016540
800969c: 20008c48 .word 0x20008c48
80096a0: 20008c45 .word 0x20008c45
80096a4: 08016560 .word 0x08016560
} else {
recv_data = cseg->p;
80096a8: 68bb ldr r3, [r7, #8]
80096aa: 685b ldr r3, [r3, #4]
80096ac: 4a70 ldr r2, [pc, #448] ; (8009870 <tcp_receive+0xcf8>)
80096ae: 6013 str r3, [r2, #0]
}
cseg->p = NULL;
80096b0: 68bb ldr r3, [r7, #8]
80096b2: 2200 movs r2, #0
80096b4: 605a str r2, [r3, #4]
}
if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) {
80096b6: 68bb ldr r3, [r7, #8]
80096b8: 68db ldr r3, [r3, #12]
80096ba: 899b ldrh r3, [r3, #12]
80096bc: b29b uxth r3, r3
80096be: 4618 mov r0, r3
80096c0: f7fa fe00 bl 80042c4 <lwip_htons>
80096c4: 4603 mov r3, r0
80096c6: b2db uxtb r3, r3
80096c8: f003 0301 and.w r3, r3, #1
80096cc: 2b00 cmp r3, #0
80096ce: d00d beq.n 80096ec <tcp_receive+0xb74>
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: dequeued FIN.\n"));
recv_flags |= TF_GOT_FIN;
80096d0: 4b68 ldr r3, [pc, #416] ; (8009874 <tcp_receive+0xcfc>)
80096d2: 781b ldrb r3, [r3, #0]
80096d4: f043 0320 orr.w r3, r3, #32
80096d8: b2da uxtb r2, r3
80096da: 4b66 ldr r3, [pc, #408] ; (8009874 <tcp_receive+0xcfc>)
80096dc: 701a strb r2, [r3, #0]
if (pcb->state == ESTABLISHED) { /* force passive close or we can move to active close */
80096de: 687b ldr r3, [r7, #4]
80096e0: 7d1b ldrb r3, [r3, #20]
80096e2: 2b04 cmp r3, #4
80096e4: d102 bne.n 80096ec <tcp_receive+0xb74>
pcb->state = CLOSE_WAIT;
80096e6: 687b ldr r3, [r7, #4]
80096e8: 2207 movs r2, #7
80096ea: 751a strb r2, [r3, #20]
}
}
pcb->ooseq = cseg->next;
80096ec: 68bb ldr r3, [r7, #8]
80096ee: 681a ldr r2, [r3, #0]
80096f0: 687b ldr r3, [r7, #4]
80096f2: 675a str r2, [r3, #116] ; 0x74
tcp_seg_free(cseg);
80096f4: 68b8 ldr r0, [r7, #8]
80096f6: f7fd fbd2 bl 8006e9e <tcp_seg_free>
while (pcb->ooseq != NULL &&
80096fa: 687b ldr r3, [r7, #4]
80096fc: 6f5b ldr r3, [r3, #116] ; 0x74
80096fe: 2b00 cmp r3, #0
8009700: d008 beq.n 8009714 <tcp_receive+0xb9c>
pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) {
8009702: 687b ldr r3, [r7, #4]
8009704: 6f5b ldr r3, [r3, #116] ; 0x74
8009706: 68db ldr r3, [r3, #12]
8009708: 685a ldr r2, [r3, #4]
800970a: 687b ldr r3, [r7, #4]
800970c: 6a5b ldr r3, [r3, #36] ; 0x24
while (pcb->ooseq != NULL &&
800970e: 429a cmp r2, r3
8009710: f43f af43 beq.w 800959a <tcp_receive+0xa22>
#endif /* LWIP_TCP_SACK_OUT */
#endif /* TCP_QUEUE_OOSEQ */
/* Acknowledge the segment(s). */
tcp_ack(pcb);
8009714: 687b ldr r3, [r7, #4]
8009716: 8b5b ldrh r3, [r3, #26]
8009718: f003 0301 and.w r3, r3, #1
800971c: 2b00 cmp r3, #0
800971e: d00e beq.n 800973e <tcp_receive+0xbc6>
8009720: 687b ldr r3, [r7, #4]
8009722: 8b5b ldrh r3, [r3, #26]
8009724: f023 0301 bic.w r3, r3, #1
8009728: b29a uxth r2, r3
800972a: 687b ldr r3, [r7, #4]
800972c: 835a strh r2, [r3, #26]
800972e: 687b ldr r3, [r7, #4]
8009730: 8b5b ldrh r3, [r3, #26]
8009732: f043 0302 orr.w r3, r3, #2
8009736: b29a uxth r2, r3
8009738: 687b ldr r3, [r7, #4]
800973a: 835a strh r2, [r3, #26]
if (pcb->rcv_nxt == seqno) {
800973c: e188 b.n 8009a50 <tcp_receive+0xed8>
tcp_ack(pcb);
800973e: 687b ldr r3, [r7, #4]
8009740: 8b5b ldrh r3, [r3, #26]
8009742: f043 0301 orr.w r3, r3, #1
8009746: b29a uxth r2, r3
8009748: 687b ldr r3, [r7, #4]
800974a: 835a strh r2, [r3, #26]
if (pcb->rcv_nxt == seqno) {
800974c: e180 b.n 8009a50 <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) {
800974e: 687b ldr r3, [r7, #4]
8009750: 6f5b ldr r3, [r3, #116] ; 0x74
8009752: 2b00 cmp r3, #0
8009754: d106 bne.n 8009764 <tcp_receive+0xbec>
pcb->ooseq = tcp_seg_copy(&inseg);
8009756: 4848 ldr r0, [pc, #288] ; (8009878 <tcp_receive+0xd00>)
8009758: f7fd fbba bl 8006ed0 <tcp_seg_copy>
800975c: 4602 mov r2, r0
800975e: 687b ldr r3, [r7, #4]
8009760: 675a str r2, [r3, #116] ; 0x74
8009762: e16d b.n 8009a40 <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;
8009764: 2300 movs r3, #0
8009766: 637b str r3, [r7, #52] ; 0x34
for (next = pcb->ooseq; next != NULL; next = next->next) {
8009768: 687b ldr r3, [r7, #4]
800976a: 6f5b ldr r3, [r3, #116] ; 0x74
800976c: 63bb str r3, [r7, #56] ; 0x38
800976e: e157 b.n 8009a20 <tcp_receive+0xea8>
if (seqno == next->tcphdr->seqno) {
8009770: 6bbb ldr r3, [r7, #56] ; 0x38
8009772: 68db ldr r3, [r3, #12]
8009774: 685a ldr r2, [r3, #4]
8009776: 4b41 ldr r3, [pc, #260] ; (800987c <tcp_receive+0xd04>)
8009778: 681b ldr r3, [r3, #0]
800977a: 429a cmp r2, r3
800977c: d11d bne.n 80097ba <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) {
800977e: 4b3e ldr r3, [pc, #248] ; (8009878 <tcp_receive+0xd00>)
8009780: 891a ldrh r2, [r3, #8]
8009782: 6bbb ldr r3, [r7, #56] ; 0x38
8009784: 891b ldrh r3, [r3, #8]
8009786: 429a cmp r2, r3
8009788: f240 814f bls.w 8009a2a <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);
800978c: 483a ldr r0, [pc, #232] ; (8009878 <tcp_receive+0xd00>)
800978e: f7fd fb9f bl 8006ed0 <tcp_seg_copy>
8009792: 6178 str r0, [r7, #20]
if (cseg != NULL) {
8009794: 697b ldr r3, [r7, #20]
8009796: 2b00 cmp r3, #0
8009798: f000 8149 beq.w 8009a2e <tcp_receive+0xeb6>
if (prev != NULL) {
800979c: 6b7b ldr r3, [r7, #52] ; 0x34
800979e: 2b00 cmp r3, #0
80097a0: d003 beq.n 80097aa <tcp_receive+0xc32>
prev->next = cseg;
80097a2: 6b7b ldr r3, [r7, #52] ; 0x34
80097a4: 697a ldr r2, [r7, #20]
80097a6: 601a str r2, [r3, #0]
80097a8: e002 b.n 80097b0 <tcp_receive+0xc38>
} else {
pcb->ooseq = cseg;
80097aa: 687b ldr r3, [r7, #4]
80097ac: 697a ldr r2, [r7, #20]
80097ae: 675a str r2, [r3, #116] ; 0x74
}
tcp_oos_insert_segment(cseg, next);
80097b0: 6bb9 ldr r1, [r7, #56] ; 0x38
80097b2: 6978 ldr r0, [r7, #20]
80097b4: f7ff f8dc bl 8008970 <tcp_oos_insert_segment>
}
break;
80097b8: e139 b.n 8009a2e <tcp_receive+0xeb6>
segment was smaller than the old one; in either
case, we ditch the incoming segment. */
break;
}
} else {
if (prev == NULL) {
80097ba: 6b7b ldr r3, [r7, #52] ; 0x34
80097bc: 2b00 cmp r3, #0
80097be: d117 bne.n 80097f0 <tcp_receive+0xc78>
if (TCP_SEQ_LT(seqno, next->tcphdr->seqno)) {
80097c0: 4b2e ldr r3, [pc, #184] ; (800987c <tcp_receive+0xd04>)
80097c2: 681a ldr r2, [r3, #0]
80097c4: 6bbb ldr r3, [r7, #56] ; 0x38
80097c6: 68db ldr r3, [r3, #12]
80097c8: 685b ldr r3, [r3, #4]
80097ca: 1ad3 subs r3, r2, r3
80097cc: 2b00 cmp r3, #0
80097ce: da57 bge.n 8009880 <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);
80097d0: 4829 ldr r0, [pc, #164] ; (8009878 <tcp_receive+0xd00>)
80097d2: f7fd fb7d bl 8006ed0 <tcp_seg_copy>
80097d6: 61b8 str r0, [r7, #24]
if (cseg != NULL) {
80097d8: 69bb ldr r3, [r7, #24]
80097da: 2b00 cmp r3, #0
80097dc: f000 8129 beq.w 8009a32 <tcp_receive+0xeba>
pcb->ooseq = cseg;
80097e0: 687b ldr r3, [r7, #4]
80097e2: 69ba ldr r2, [r7, #24]
80097e4: 675a str r2, [r3, #116] ; 0x74
tcp_oos_insert_segment(cseg, next);
80097e6: 6bb9 ldr r1, [r7, #56] ; 0x38
80097e8: 69b8 ldr r0, [r7, #24]
80097ea: f7ff f8c1 bl 8008970 <tcp_oos_insert_segment>
}
break;
80097ee: e120 b.n 8009a32 <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)) {
80097f0: 4b22 ldr r3, [pc, #136] ; (800987c <tcp_receive+0xd04>)
80097f2: 681a ldr r2, [r3, #0]
80097f4: 6b7b ldr r3, [r7, #52] ; 0x34
80097f6: 68db ldr r3, [r3, #12]
80097f8: 685b ldr r3, [r3, #4]
80097fa: 1ad3 subs r3, r2, r3
80097fc: 3b01 subs r3, #1
80097fe: 2b00 cmp r3, #0
8009800: db3e blt.n 8009880 <tcp_receive+0xd08>
8009802: 4b1e ldr r3, [pc, #120] ; (800987c <tcp_receive+0xd04>)
8009804: 681a ldr r2, [r3, #0]
8009806: 6bbb ldr r3, [r7, #56] ; 0x38
8009808: 68db ldr r3, [r3, #12]
800980a: 685b ldr r3, [r3, #4]
800980c: 1ad3 subs r3, r2, r3
800980e: 3301 adds r3, #1
8009810: 2b00 cmp r3, #0
8009812: dc35 bgt.n 8009880 <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);
8009814: 4818 ldr r0, [pc, #96] ; (8009878 <tcp_receive+0xd00>)
8009816: f7fd fb5b bl 8006ed0 <tcp_seg_copy>
800981a: 61f8 str r0, [r7, #28]
if (cseg != NULL) {
800981c: 69fb ldr r3, [r7, #28]
800981e: 2b00 cmp r3, #0
8009820: f000 8109 beq.w 8009a36 <tcp_receive+0xebe>
if (TCP_SEQ_GT(prev->tcphdr->seqno + prev->len, seqno)) {
8009824: 6b7b ldr r3, [r7, #52] ; 0x34
8009826: 68db ldr r3, [r3, #12]
8009828: 685b ldr r3, [r3, #4]
800982a: 6b7a ldr r2, [r7, #52] ; 0x34
800982c: 8912 ldrh r2, [r2, #8]
800982e: 441a add r2, r3
8009830: 4b12 ldr r3, [pc, #72] ; (800987c <tcp_receive+0xd04>)
8009832: 681b ldr r3, [r3, #0]
8009834: 1ad3 subs r3, r2, r3
8009836: 2b00 cmp r3, #0
8009838: dd12 ble.n 8009860 <tcp_receive+0xce8>
/* We need to trim the prev segment. */
prev->len = (u16_t)(seqno - prev->tcphdr->seqno);
800983a: 4b10 ldr r3, [pc, #64] ; (800987c <tcp_receive+0xd04>)
800983c: 681b ldr r3, [r3, #0]
800983e: b29a uxth r2, r3
8009840: 6b7b ldr r3, [r7, #52] ; 0x34
8009842: 68db ldr r3, [r3, #12]
8009844: 685b ldr r3, [r3, #4]
8009846: b29b uxth r3, r3
8009848: 1ad3 subs r3, r2, r3
800984a: b29a uxth r2, r3
800984c: 6b7b ldr r3, [r7, #52] ; 0x34
800984e: 811a strh r2, [r3, #8]
pbuf_realloc(prev->p, prev->len);
8009850: 6b7b ldr r3, [r7, #52] ; 0x34
8009852: 685a ldr r2, [r3, #4]
8009854: 6b7b ldr r3, [r7, #52] ; 0x34
8009856: 891b ldrh r3, [r3, #8]
8009858: 4619 mov r1, r3
800985a: 4610 mov r0, r2
800985c: f7fb ff16 bl 800568c <pbuf_realloc>
}
prev->next = cseg;
8009860: 6b7b ldr r3, [r7, #52] ; 0x34
8009862: 69fa ldr r2, [r7, #28]
8009864: 601a str r2, [r3, #0]
tcp_oos_insert_segment(cseg, next);
8009866: 6bb9 ldr r1, [r7, #56] ; 0x38
8009868: 69f8 ldr r0, [r7, #28]
800986a: f7ff f881 bl 8008970 <tcp_oos_insert_segment>
}
break;
800986e: e0e2 b.n 8009a36 <tcp_receive+0xebe>
8009870: 20008c48 .word 0x20008c48
8009874: 20008c45 .word 0x20008c45
8009878: 20008c18 .word 0x20008c18
800987c: 20008c38 .word 0x20008c38
#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;
8009880: 6bbb ldr r3, [r7, #56] ; 0x38
8009882: 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 &&
8009884: 6bbb ldr r3, [r7, #56] ; 0x38
8009886: 681b ldr r3, [r3, #0]
8009888: 2b00 cmp r3, #0
800988a: f040 80c6 bne.w 8009a1a <tcp_receive+0xea2>
TCP_SEQ_GT(seqno, next->tcphdr->seqno)) {
800988e: 4b80 ldr r3, [pc, #512] ; (8009a90 <tcp_receive+0xf18>)
8009890: 681a ldr r2, [r3, #0]
8009892: 6bbb ldr r3, [r7, #56] ; 0x38
8009894: 68db ldr r3, [r3, #12]
8009896: 685b ldr r3, [r3, #4]
8009898: 1ad3 subs r3, r2, r3
if (next->next == NULL &&
800989a: 2b00 cmp r3, #0
800989c: f340 80bd ble.w 8009a1a <tcp_receive+0xea2>
if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) {
80098a0: 6bbb ldr r3, [r7, #56] ; 0x38
80098a2: 68db ldr r3, [r3, #12]
80098a4: 899b ldrh r3, [r3, #12]
80098a6: b29b uxth r3, r3
80098a8: 4618 mov r0, r3
80098aa: f7fa fd0b bl 80042c4 <lwip_htons>
80098ae: 4603 mov r3, r0
80098b0: b2db uxtb r3, r3
80098b2: f003 0301 and.w r3, r3, #1
80098b6: 2b00 cmp r3, #0
80098b8: f040 80bf bne.w 8009a3a <tcp_receive+0xec2>
/* segment "next" already contains all data */
break;
}
next->next = tcp_seg_copy(&inseg);
80098bc: 4875 ldr r0, [pc, #468] ; (8009a94 <tcp_receive+0xf1c>)
80098be: f7fd fb07 bl 8006ed0 <tcp_seg_copy>
80098c2: 4602 mov r2, r0
80098c4: 6bbb ldr r3, [r7, #56] ; 0x38
80098c6: 601a str r2, [r3, #0]
if (next->next != NULL) {
80098c8: 6bbb ldr r3, [r7, #56] ; 0x38
80098ca: 681b ldr r3, [r3, #0]
80098cc: 2b00 cmp r3, #0
80098ce: f000 80b6 beq.w 8009a3e <tcp_receive+0xec6>
if (TCP_SEQ_GT(next->tcphdr->seqno + next->len, seqno)) {
80098d2: 6bbb ldr r3, [r7, #56] ; 0x38
80098d4: 68db ldr r3, [r3, #12]
80098d6: 685b ldr r3, [r3, #4]
80098d8: 6bba ldr r2, [r7, #56] ; 0x38
80098da: 8912 ldrh r2, [r2, #8]
80098dc: 441a add r2, r3
80098de: 4b6c ldr r3, [pc, #432] ; (8009a90 <tcp_receive+0xf18>)
80098e0: 681b ldr r3, [r3, #0]
80098e2: 1ad3 subs r3, r2, r3
80098e4: 2b00 cmp r3, #0
80098e6: dd12 ble.n 800990e <tcp_receive+0xd96>
/* We need to trim the last segment. */
next->len = (u16_t)(seqno - next->tcphdr->seqno);
80098e8: 4b69 ldr r3, [pc, #420] ; (8009a90 <tcp_receive+0xf18>)
80098ea: 681b ldr r3, [r3, #0]
80098ec: b29a uxth r2, r3
80098ee: 6bbb ldr r3, [r7, #56] ; 0x38
80098f0: 68db ldr r3, [r3, #12]
80098f2: 685b ldr r3, [r3, #4]
80098f4: b29b uxth r3, r3
80098f6: 1ad3 subs r3, r2, r3
80098f8: b29a uxth r2, r3
80098fa: 6bbb ldr r3, [r7, #56] ; 0x38
80098fc: 811a strh r2, [r3, #8]
pbuf_realloc(next->p, next->len);
80098fe: 6bbb ldr r3, [r7, #56] ; 0x38
8009900: 685a ldr r2, [r3, #4]
8009902: 6bbb ldr r3, [r7, #56] ; 0x38
8009904: 891b ldrh r3, [r3, #8]
8009906: 4619 mov r1, r3
8009908: 4610 mov r0, r2
800990a: f7fb febf bl 800568c <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)) {
800990e: 4b62 ldr r3, [pc, #392] ; (8009a98 <tcp_receive+0xf20>)
8009910: 881b ldrh r3, [r3, #0]
8009912: 461a mov r2, r3
8009914: 4b5e ldr r3, [pc, #376] ; (8009a90 <tcp_receive+0xf18>)
8009916: 681b ldr r3, [r3, #0]
8009918: 441a add r2, r3
800991a: 687b ldr r3, [r7, #4]
800991c: 6a5b ldr r3, [r3, #36] ; 0x24
800991e: 6879 ldr r1, [r7, #4]
8009920: 8d09 ldrh r1, [r1, #40] ; 0x28
8009922: 440b add r3, r1
8009924: 1ad3 subs r3, r2, r3
8009926: 2b00 cmp r3, #0
8009928: f340 8089 ble.w 8009a3e <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) {
800992c: 6bbb ldr r3, [r7, #56] ; 0x38
800992e: 681b ldr r3, [r3, #0]
8009930: 68db ldr r3, [r3, #12]
8009932: 899b ldrh r3, [r3, #12]
8009934: b29b uxth r3, r3
8009936: 4618 mov r0, r3
8009938: f7fa fcc4 bl 80042c4 <lwip_htons>
800993c: 4603 mov r3, r0
800993e: b2db uxtb r3, r3
8009940: f003 0301 and.w r3, r3, #1
8009944: 2b00 cmp r3, #0
8009946: d022 beq.n 800998e <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);
8009948: 6bbb ldr r3, [r7, #56] ; 0x38
800994a: 681b ldr r3, [r3, #0]
800994c: 68db ldr r3, [r3, #12]
800994e: 899b ldrh r3, [r3, #12]
8009950: b29b uxth r3, r3
8009952: b21b sxth r3, r3
8009954: f423 537c bic.w r3, r3, #16128 ; 0x3f00
8009958: b21c sxth r4, r3
800995a: 6bbb ldr r3, [r7, #56] ; 0x38
800995c: 681b ldr r3, [r3, #0]
800995e: 68db ldr r3, [r3, #12]
8009960: 899b ldrh r3, [r3, #12]
8009962: b29b uxth r3, r3
8009964: 4618 mov r0, r3
8009966: f7fa fcad bl 80042c4 <lwip_htons>
800996a: 4603 mov r3, r0
800996c: b2db uxtb r3, r3
800996e: b29b uxth r3, r3
8009970: f003 033e and.w r3, r3, #62 ; 0x3e
8009974: b29b uxth r3, r3
8009976: 4618 mov r0, r3
8009978: f7fa fca4 bl 80042c4 <lwip_htons>
800997c: 4603 mov r3, r0
800997e: b21b sxth r3, r3
8009980: 4323 orrs r3, r4
8009982: b21a sxth r2, r3
8009984: 6bbb ldr r3, [r7, #56] ; 0x38
8009986: 681b ldr r3, [r3, #0]
8009988: 68db ldr r3, [r3, #12]
800998a: b292 uxth r2, r2
800998c: 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);
800998e: 687b ldr r3, [r7, #4]
8009990: 6a5b ldr r3, [r3, #36] ; 0x24
8009992: b29a uxth r2, r3
8009994: 687b ldr r3, [r7, #4]
8009996: 8d1b ldrh r3, [r3, #40] ; 0x28
8009998: 4413 add r3, r2
800999a: b299 uxth r1, r3
800999c: 4b3c ldr r3, [pc, #240] ; (8009a90 <tcp_receive+0xf18>)
800999e: 681b ldr r3, [r3, #0]
80099a0: b29a uxth r2, r3
80099a2: 6bbb ldr r3, [r7, #56] ; 0x38
80099a4: 681b ldr r3, [r3, #0]
80099a6: 1a8a subs r2, r1, r2
80099a8: b292 uxth r2, r2
80099aa: 811a strh r2, [r3, #8]
pbuf_realloc(next->next->p, next->next->len);
80099ac: 6bbb ldr r3, [r7, #56] ; 0x38
80099ae: 681b ldr r3, [r3, #0]
80099b0: 685a ldr r2, [r3, #4]
80099b2: 6bbb ldr r3, [r7, #56] ; 0x38
80099b4: 681b ldr r3, [r3, #0]
80099b6: 891b ldrh r3, [r3, #8]
80099b8: 4619 mov r1, r3
80099ba: 4610 mov r0, r2
80099bc: f7fb fe66 bl 800568c <pbuf_realloc>
tcplen = TCP_TCPLEN(next->next);
80099c0: 6bbb ldr r3, [r7, #56] ; 0x38
80099c2: 681b ldr r3, [r3, #0]
80099c4: 891c ldrh r4, [r3, #8]
80099c6: 6bbb ldr r3, [r7, #56] ; 0x38
80099c8: 681b ldr r3, [r3, #0]
80099ca: 68db ldr r3, [r3, #12]
80099cc: 899b ldrh r3, [r3, #12]
80099ce: b29b uxth r3, r3
80099d0: 4618 mov r0, r3
80099d2: f7fa fc77 bl 80042c4 <lwip_htons>
80099d6: 4603 mov r3, r0
80099d8: b2db uxtb r3, r3
80099da: f003 0303 and.w r3, r3, #3
80099de: 2b00 cmp r3, #0
80099e0: d001 beq.n 80099e6 <tcp_receive+0xe6e>
80099e2: 2301 movs r3, #1
80099e4: e000 b.n 80099e8 <tcp_receive+0xe70>
80099e6: 2300 movs r3, #0
80099e8: 4423 add r3, r4
80099ea: b29a uxth r2, r3
80099ec: 4b2a ldr r3, [pc, #168] ; (8009a98 <tcp_receive+0xf20>)
80099ee: 801a strh r2, [r3, #0]
LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n",
80099f0: 4b29 ldr r3, [pc, #164] ; (8009a98 <tcp_receive+0xf20>)
80099f2: 881b ldrh r3, [r3, #0]
80099f4: 461a mov r2, r3
80099f6: 4b26 ldr r3, [pc, #152] ; (8009a90 <tcp_receive+0xf18>)
80099f8: 681b ldr r3, [r3, #0]
80099fa: 441a add r2, r3
80099fc: 687b ldr r3, [r7, #4]
80099fe: 6a5b ldr r3, [r3, #36] ; 0x24
8009a00: 6879 ldr r1, [r7, #4]
8009a02: 8d09 ldrh r1, [r1, #40] ; 0x28
8009a04: 440b add r3, r1
8009a06: 429a cmp r2, r3
8009a08: d019 beq.n 8009a3e <tcp_receive+0xec6>
8009a0a: 4b24 ldr r3, [pc, #144] ; (8009a9c <tcp_receive+0xf24>)
8009a0c: f44f 62df mov.w r2, #1784 ; 0x6f8
8009a10: 4923 ldr r1, [pc, #140] ; (8009aa0 <tcp_receive+0xf28>)
8009a12: 4824 ldr r0, [pc, #144] ; (8009aa4 <tcp_receive+0xf2c>)
8009a14: f006 fcdc bl 80103d0 <printf>
(seqno + tcplen) == (pcb->rcv_nxt + pcb->rcv_wnd));
}
}
break;
8009a18: e011 b.n 8009a3e <tcp_receive+0xec6>
for (next = pcb->ooseq; next != NULL; next = next->next) {
8009a1a: 6bbb ldr r3, [r7, #56] ; 0x38
8009a1c: 681b ldr r3, [r3, #0]
8009a1e: 63bb str r3, [r7, #56] ; 0x38
8009a20: 6bbb ldr r3, [r7, #56] ; 0x38
8009a22: 2b00 cmp r3, #0
8009a24: f47f aea4 bne.w 8009770 <tcp_receive+0xbf8>
8009a28: e00a b.n 8009a40 <tcp_receive+0xec8>
break;
8009a2a: bf00 nop
8009a2c: e008 b.n 8009a40 <tcp_receive+0xec8>
break;
8009a2e: bf00 nop
8009a30: e006 b.n 8009a40 <tcp_receive+0xec8>
break;
8009a32: bf00 nop
8009a34: e004 b.n 8009a40 <tcp_receive+0xec8>
break;
8009a36: bf00 nop
8009a38: e002 b.n 8009a40 <tcp_receive+0xec8>
break;
8009a3a: bf00 nop
8009a3c: e000 b.n 8009a40 <tcp_receive+0xec8>
break;
8009a3e: 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);
8009a40: 6878 ldr r0, [r7, #4]
8009a42: f001 fa33 bl 800aeac <tcp_send_empty_ack>
if (pcb->rcv_nxt == seqno) {
8009a46: e003 b.n 8009a50 <tcp_receive+0xed8>
}
} else {
/* The incoming segment is not within the window. */
tcp_send_empty_ack(pcb);
8009a48: 6878 ldr r0, [r7, #4]
8009a4a: f001 fa2f bl 800aeac <tcp_send_empty_ack>
if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
8009a4e: e01a b.n 8009a86 <tcp_receive+0xf0e>
8009a50: e019 b.n 8009a86 <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)) {
8009a52: 4b0f ldr r3, [pc, #60] ; (8009a90 <tcp_receive+0xf18>)
8009a54: 681a ldr r2, [r3, #0]
8009a56: 687b ldr r3, [r7, #4]
8009a58: 6a5b ldr r3, [r3, #36] ; 0x24
8009a5a: 1ad3 subs r3, r2, r3
8009a5c: 2b00 cmp r3, #0
8009a5e: db0a blt.n 8009a76 <tcp_receive+0xefe>
8009a60: 4b0b ldr r3, [pc, #44] ; (8009a90 <tcp_receive+0xf18>)
8009a62: 681a ldr r2, [r3, #0]
8009a64: 687b ldr r3, [r7, #4]
8009a66: 6a5b ldr r3, [r3, #36] ; 0x24
8009a68: 6879 ldr r1, [r7, #4]
8009a6a: 8d09 ldrh r1, [r1, #40] ; 0x28
8009a6c: 440b add r3, r1
8009a6e: 1ad3 subs r3, r2, r3
8009a70: 3301 adds r3, #1
8009a72: 2b00 cmp r3, #0
8009a74: dd07 ble.n 8009a86 <tcp_receive+0xf0e>
tcp_ack_now(pcb);
8009a76: 687b ldr r3, [r7, #4]
8009a78: 8b5b ldrh r3, [r3, #26]
8009a7a: f043 0302 orr.w r3, r3, #2
8009a7e: b29a uxth r2, r3
8009a80: 687b ldr r3, [r7, #4]
8009a82: 835a strh r2, [r3, #26]
}
}
}
8009a84: e7ff b.n 8009a86 <tcp_receive+0xf0e>
8009a86: bf00 nop
8009a88: 3750 adds r7, #80 ; 0x50
8009a8a: 46bd mov sp, r7
8009a8c: bdb0 pop {r4, r5, r7, pc}
8009a8e: bf00 nop
8009a90: 20008c38 .word 0x20008c38
8009a94: 20008c18 .word 0x20008c18
8009a98: 20008c42 .word 0x20008c42
8009a9c: 08016124 .word 0x08016124
8009aa0: 080164cc .word 0x080164cc
8009aa4: 08016170 .word 0x08016170
08009aa8 <tcp_get_next_optbyte>:
static u8_t
tcp_get_next_optbyte(void)
{
8009aa8: b480 push {r7}
8009aaa: b083 sub sp, #12
8009aac: af00 add r7, sp, #0
u16_t optidx = tcp_optidx++;
8009aae: 4b15 ldr r3, [pc, #84] ; (8009b04 <tcp_get_next_optbyte+0x5c>)
8009ab0: 881b ldrh r3, [r3, #0]
8009ab2: 1c5a adds r2, r3, #1
8009ab4: b291 uxth r1, r2
8009ab6: 4a13 ldr r2, [pc, #76] ; (8009b04 <tcp_get_next_optbyte+0x5c>)
8009ab8: 8011 strh r1, [r2, #0]
8009aba: 80fb strh r3, [r7, #6]
if ((tcphdr_opt2 == NULL) || (optidx < tcphdr_opt1len)) {
8009abc: 4b12 ldr r3, [pc, #72] ; (8009b08 <tcp_get_next_optbyte+0x60>)
8009abe: 681b ldr r3, [r3, #0]
8009ac0: 2b00 cmp r3, #0
8009ac2: d004 beq.n 8009ace <tcp_get_next_optbyte+0x26>
8009ac4: 4b11 ldr r3, [pc, #68] ; (8009b0c <tcp_get_next_optbyte+0x64>)
8009ac6: 881b ldrh r3, [r3, #0]
8009ac8: 88fa ldrh r2, [r7, #6]
8009aca: 429a cmp r2, r3
8009acc: d208 bcs.n 8009ae0 <tcp_get_next_optbyte+0x38>
u8_t *opts = (u8_t *)tcphdr + TCP_HLEN;
8009ace: 4b10 ldr r3, [pc, #64] ; (8009b10 <tcp_get_next_optbyte+0x68>)
8009ad0: 681b ldr r3, [r3, #0]
8009ad2: 3314 adds r3, #20
8009ad4: 603b str r3, [r7, #0]
return opts[optidx];
8009ad6: 88fb ldrh r3, [r7, #6]
8009ad8: 683a ldr r2, [r7, #0]
8009ada: 4413 add r3, r2
8009adc: 781b ldrb r3, [r3, #0]
8009ade: e00b b.n 8009af8 <tcp_get_next_optbyte+0x50>
} else {
u8_t idx = (u8_t)(optidx - tcphdr_opt1len);
8009ae0: 88fb ldrh r3, [r7, #6]
8009ae2: b2da uxtb r2, r3
8009ae4: 4b09 ldr r3, [pc, #36] ; (8009b0c <tcp_get_next_optbyte+0x64>)
8009ae6: 881b ldrh r3, [r3, #0]
8009ae8: b2db uxtb r3, r3
8009aea: 1ad3 subs r3, r2, r3
8009aec: 717b strb r3, [r7, #5]
return tcphdr_opt2[idx];
8009aee: 4b06 ldr r3, [pc, #24] ; (8009b08 <tcp_get_next_optbyte+0x60>)
8009af0: 681a ldr r2, [r3, #0]
8009af2: 797b ldrb r3, [r7, #5]
8009af4: 4413 add r3, r2
8009af6: 781b ldrb r3, [r3, #0]
}
}
8009af8: 4618 mov r0, r3
8009afa: 370c adds r7, #12
8009afc: 46bd mov sp, r7
8009afe: f85d 7b04 ldr.w r7, [sp], #4
8009b02: 4770 bx lr
8009b04: 20008c34 .word 0x20008c34
8009b08: 20008c30 .word 0x20008c30
8009b0c: 20008c2e .word 0x20008c2e
8009b10: 20008c28 .word 0x20008c28
08009b14 <tcp_parseopt>:
*
* @param pcb the tcp_pcb for which a segment arrived
*/
static void
tcp_parseopt(struct tcp_pcb *pcb)
{
8009b14: b580 push {r7, lr}
8009b16: b084 sub sp, #16
8009b18: af00 add r7, sp, #0
8009b1a: 6078 str r0, [r7, #4]
u16_t mss;
#if LWIP_TCP_TIMESTAMPS
u32_t tsval;
#endif
LWIP_ASSERT("tcp_parseopt: invalid pcb", pcb != NULL);
8009b1c: 687b ldr r3, [r7, #4]
8009b1e: 2b00 cmp r3, #0
8009b20: d106 bne.n 8009b30 <tcp_parseopt+0x1c>
8009b22: 4b32 ldr r3, [pc, #200] ; (8009bec <tcp_parseopt+0xd8>)
8009b24: f240 727d movw r2, #1917 ; 0x77d
8009b28: 4931 ldr r1, [pc, #196] ; (8009bf0 <tcp_parseopt+0xdc>)
8009b2a: 4832 ldr r0, [pc, #200] ; (8009bf4 <tcp_parseopt+0xe0>)
8009b2c: f006 fc50 bl 80103d0 <printf>
/* Parse the TCP MSS option, if present. */
if (tcphdr_optlen != 0) {
8009b30: 4b31 ldr r3, [pc, #196] ; (8009bf8 <tcp_parseopt+0xe4>)
8009b32: 881b ldrh r3, [r3, #0]
8009b34: 2b00 cmp r3, #0
8009b36: d055 beq.n 8009be4 <tcp_parseopt+0xd0>
for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) {
8009b38: 4b30 ldr r3, [pc, #192] ; (8009bfc <tcp_parseopt+0xe8>)
8009b3a: 2200 movs r2, #0
8009b3c: 801a strh r2, [r3, #0]
8009b3e: e045 b.n 8009bcc <tcp_parseopt+0xb8>
u8_t opt = tcp_get_next_optbyte();
8009b40: f7ff ffb2 bl 8009aa8 <tcp_get_next_optbyte>
8009b44: 4603 mov r3, r0
8009b46: 73fb strb r3, [r7, #15]
switch (opt) {
8009b48: 7bfb ldrb r3, [r7, #15]
8009b4a: 2b02 cmp r3, #2
8009b4c: d006 beq.n 8009b5c <tcp_parseopt+0x48>
8009b4e: 2b02 cmp r3, #2
8009b50: dc2b bgt.n 8009baa <tcp_parseopt+0x96>
8009b52: 2b00 cmp r3, #0
8009b54: d041 beq.n 8009bda <tcp_parseopt+0xc6>
8009b56: 2b01 cmp r3, #1
8009b58: d127 bne.n 8009baa <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;
8009b5a: e037 b.n 8009bcc <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) {
8009b5c: f7ff ffa4 bl 8009aa8 <tcp_get_next_optbyte>
8009b60: 4603 mov r3, r0
8009b62: 2b04 cmp r3, #4
8009b64: d13b bne.n 8009bde <tcp_parseopt+0xca>
8009b66: 4b25 ldr r3, [pc, #148] ; (8009bfc <tcp_parseopt+0xe8>)
8009b68: 881b ldrh r3, [r3, #0]
8009b6a: 3301 adds r3, #1
8009b6c: 4a22 ldr r2, [pc, #136] ; (8009bf8 <tcp_parseopt+0xe4>)
8009b6e: 8812 ldrh r2, [r2, #0]
8009b70: 4293 cmp r3, r2
8009b72: da34 bge.n 8009bde <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);
8009b74: f7ff ff98 bl 8009aa8 <tcp_get_next_optbyte>
8009b78: 4603 mov r3, r0
8009b7a: b29b uxth r3, r3
8009b7c: 021b lsls r3, r3, #8
8009b7e: 81bb strh r3, [r7, #12]
mss |= tcp_get_next_optbyte();
8009b80: f7ff ff92 bl 8009aa8 <tcp_get_next_optbyte>
8009b84: 4603 mov r3, r0
8009b86: b29a uxth r2, r3
8009b88: 89bb ldrh r3, [r7, #12]
8009b8a: 4313 orrs r3, r2
8009b8c: 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;
8009b8e: 89bb ldrh r3, [r7, #12]
8009b90: f5b3 7f06 cmp.w r3, #536 ; 0x218
8009b94: d804 bhi.n 8009ba0 <tcp_parseopt+0x8c>
8009b96: 89bb ldrh r3, [r7, #12]
8009b98: 2b00 cmp r3, #0
8009b9a: d001 beq.n 8009ba0 <tcp_parseopt+0x8c>
8009b9c: 89ba ldrh r2, [r7, #12]
8009b9e: e001 b.n 8009ba4 <tcp_parseopt+0x90>
8009ba0: f44f 7206 mov.w r2, #536 ; 0x218
8009ba4: 687b ldr r3, [r7, #4]
8009ba6: 865a strh r2, [r3, #50] ; 0x32
break;
8009ba8: e010 b.n 8009bcc <tcp_parseopt+0xb8>
}
break;
#endif /* LWIP_TCP_SACK_OUT */
default:
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n"));
data = tcp_get_next_optbyte();
8009baa: f7ff ff7d bl 8009aa8 <tcp_get_next_optbyte>
8009bae: 4603 mov r3, r0
8009bb0: 72fb strb r3, [r7, #11]
if (data < 2) {
8009bb2: 7afb ldrb r3, [r7, #11]
8009bb4: 2b01 cmp r3, #1
8009bb6: d914 bls.n 8009be2 <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;
8009bb8: 7afb ldrb r3, [r7, #11]
8009bba: b29a uxth r2, r3
8009bbc: 4b0f ldr r3, [pc, #60] ; (8009bfc <tcp_parseopt+0xe8>)
8009bbe: 881b ldrh r3, [r3, #0]
8009bc0: 4413 add r3, r2
8009bc2: b29b uxth r3, r3
8009bc4: 3b02 subs r3, #2
8009bc6: b29a uxth r2, r3
8009bc8: 4b0c ldr r3, [pc, #48] ; (8009bfc <tcp_parseopt+0xe8>)
8009bca: 801a strh r2, [r3, #0]
for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) {
8009bcc: 4b0b ldr r3, [pc, #44] ; (8009bfc <tcp_parseopt+0xe8>)
8009bce: 881a ldrh r2, [r3, #0]
8009bd0: 4b09 ldr r3, [pc, #36] ; (8009bf8 <tcp_parseopt+0xe4>)
8009bd2: 881b ldrh r3, [r3, #0]
8009bd4: 429a cmp r2, r3
8009bd6: d3b3 bcc.n 8009b40 <tcp_parseopt+0x2c>
8009bd8: e004 b.n 8009be4 <tcp_parseopt+0xd0>
return;
8009bda: bf00 nop
8009bdc: e002 b.n 8009be4 <tcp_parseopt+0xd0>
return;
8009bde: bf00 nop
8009be0: e000 b.n 8009be4 <tcp_parseopt+0xd0>
return;
8009be2: bf00 nop
}
}
}
}
8009be4: 3710 adds r7, #16
8009be6: 46bd mov sp, r7
8009be8: bd80 pop {r7, pc}
8009bea: bf00 nop
8009bec: 08016124 .word 0x08016124
8009bf0: 08016588 .word 0x08016588
8009bf4: 08016170 .word 0x08016170
8009bf8: 20008c2c .word 0x20008c2c
8009bfc: 20008c34 .word 0x20008c34
08009c00 <tcp_trigger_input_pcb_close>:
void
tcp_trigger_input_pcb_close(void)
{
8009c00: b480 push {r7}
8009c02: af00 add r7, sp, #0
recv_flags |= TF_CLOSED;
8009c04: 4b05 ldr r3, [pc, #20] ; (8009c1c <tcp_trigger_input_pcb_close+0x1c>)
8009c06: 781b ldrb r3, [r3, #0]
8009c08: f043 0310 orr.w r3, r3, #16
8009c0c: b2da uxtb r2, r3
8009c0e: 4b03 ldr r3, [pc, #12] ; (8009c1c <tcp_trigger_input_pcb_close+0x1c>)
8009c10: 701a strb r2, [r3, #0]
}
8009c12: bf00 nop
8009c14: 46bd mov sp, r7
8009c16: f85d 7b04 ldr.w r7, [sp], #4
8009c1a: 4770 bx lr
8009c1c: 20008c45 .word 0x20008c45
08009c20 <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)
{
8009c20: b580 push {r7, lr}
8009c22: b084 sub sp, #16
8009c24: af00 add r7, sp, #0
8009c26: 60f8 str r0, [r7, #12]
8009c28: 60b9 str r1, [r7, #8]
8009c2a: 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)) {
8009c2c: 68fb ldr r3, [r7, #12]
8009c2e: 2b00 cmp r3, #0
8009c30: d00a beq.n 8009c48 <tcp_route+0x28>
8009c32: 68fb ldr r3, [r7, #12]
8009c34: 7a1b ldrb r3, [r3, #8]
8009c36: 2b00 cmp r3, #0
8009c38: d006 beq.n 8009c48 <tcp_route+0x28>
return netif_get_by_index(pcb->netif_idx);
8009c3a: 68fb ldr r3, [r7, #12]
8009c3c: 7a1b ldrb r3, [r3, #8]
8009c3e: 4618 mov r0, r3
8009c40: f7fb fb4a bl 80052d8 <netif_get_by_index>
8009c44: 4603 mov r3, r0
8009c46: e003 b.n 8009c50 <tcp_route+0x30>
} else {
return ip_route(src, dst);
8009c48: 6878 ldr r0, [r7, #4]
8009c4a: f005 f815 bl 800ec78 <ip4_route>
8009c4e: 4603 mov r3, r0
}
}
8009c50: 4618 mov r0, r3
8009c52: 3710 adds r7, #16
8009c54: 46bd mov sp, r7
8009c56: bd80 pop {r7, pc}
08009c58 <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)
{
8009c58: b590 push {r4, r7, lr}
8009c5a: b087 sub sp, #28
8009c5c: af00 add r7, sp, #0
8009c5e: 60f8 str r0, [r7, #12]
8009c60: 60b9 str r1, [r7, #8]
8009c62: 603b str r3, [r7, #0]
8009c64: 4613 mov r3, r2
8009c66: 71fb strb r3, [r7, #7]
struct tcp_seg *seg;
u8_t optlen;
LWIP_ASSERT("tcp_create_segment: invalid pcb", pcb != NULL);
8009c68: 68fb ldr r3, [r7, #12]
8009c6a: 2b00 cmp r3, #0
8009c6c: d105 bne.n 8009c7a <tcp_create_segment+0x22>
8009c6e: 4b44 ldr r3, [pc, #272] ; (8009d80 <tcp_create_segment+0x128>)
8009c70: 22a3 movs r2, #163 ; 0xa3
8009c72: 4944 ldr r1, [pc, #272] ; (8009d84 <tcp_create_segment+0x12c>)
8009c74: 4844 ldr r0, [pc, #272] ; (8009d88 <tcp_create_segment+0x130>)
8009c76: f006 fbab bl 80103d0 <printf>
LWIP_ASSERT("tcp_create_segment: invalid pbuf", p != NULL);
8009c7a: 68bb ldr r3, [r7, #8]
8009c7c: 2b00 cmp r3, #0
8009c7e: d105 bne.n 8009c8c <tcp_create_segment+0x34>
8009c80: 4b3f ldr r3, [pc, #252] ; (8009d80 <tcp_create_segment+0x128>)
8009c82: 22a4 movs r2, #164 ; 0xa4
8009c84: 4941 ldr r1, [pc, #260] ; (8009d8c <tcp_create_segment+0x134>)
8009c86: 4840 ldr r0, [pc, #256] ; (8009d88 <tcp_create_segment+0x130>)
8009c88: f006 fba2 bl 80103d0 <printf>
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb);
8009c8c: f897 3028 ldrb.w r3, [r7, #40] ; 0x28
8009c90: 009b lsls r3, r3, #2
8009c92: b2db uxtb r3, r3
8009c94: f003 0304 and.w r3, r3, #4
8009c98: 75fb strb r3, [r7, #23]
if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) {
8009c9a: 2003 movs r0, #3
8009c9c: f7fa ff8a bl 8004bb4 <memp_malloc>
8009ca0: 6138 str r0, [r7, #16]
8009ca2: 693b ldr r3, [r7, #16]
8009ca4: 2b00 cmp r3, #0
8009ca6: d104 bne.n 8009cb2 <tcp_create_segment+0x5a>
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no memory.\n"));
pbuf_free(p);
8009ca8: 68b8 ldr r0, [r7, #8]
8009caa: f7fb fe75 bl 8005998 <pbuf_free>
return NULL;
8009cae: 2300 movs r3, #0
8009cb0: e061 b.n 8009d76 <tcp_create_segment+0x11e>
}
seg->flags = optflags;
8009cb2: 693b ldr r3, [r7, #16]
8009cb4: f897 2028 ldrb.w r2, [r7, #40] ; 0x28
8009cb8: 729a strb r2, [r3, #10]
seg->next = NULL;
8009cba: 693b ldr r3, [r7, #16]
8009cbc: 2200 movs r2, #0
8009cbe: 601a str r2, [r3, #0]
seg->p = p;
8009cc0: 693b ldr r3, [r7, #16]
8009cc2: 68ba ldr r2, [r7, #8]
8009cc4: 605a str r2, [r3, #4]
LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen);
8009cc6: 68bb ldr r3, [r7, #8]
8009cc8: 891a ldrh r2, [r3, #8]
8009cca: 7dfb ldrb r3, [r7, #23]
8009ccc: b29b uxth r3, r3
8009cce: 429a cmp r2, r3
8009cd0: d205 bcs.n 8009cde <tcp_create_segment+0x86>
8009cd2: 4b2b ldr r3, [pc, #172] ; (8009d80 <tcp_create_segment+0x128>)
8009cd4: 22b0 movs r2, #176 ; 0xb0
8009cd6: 492e ldr r1, [pc, #184] ; (8009d90 <tcp_create_segment+0x138>)
8009cd8: 482b ldr r0, [pc, #172] ; (8009d88 <tcp_create_segment+0x130>)
8009cda: f006 fb79 bl 80103d0 <printf>
seg->len = p->tot_len - optlen;
8009cde: 68bb ldr r3, [r7, #8]
8009ce0: 891a ldrh r2, [r3, #8]
8009ce2: 7dfb ldrb r3, [r7, #23]
8009ce4: b29b uxth r3, r3
8009ce6: 1ad3 subs r3, r2, r3
8009ce8: b29a uxth r2, r3
8009cea: 693b ldr r3, [r7, #16]
8009cec: 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)) {
8009cee: 2114 movs r1, #20
8009cf0: 68b8 ldr r0, [r7, #8]
8009cf2: f7fb fdbb bl 800586c <pbuf_add_header>
8009cf6: 4603 mov r3, r0
8009cf8: 2b00 cmp r3, #0
8009cfa: d004 beq.n 8009d06 <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);
8009cfc: 6938 ldr r0, [r7, #16]
8009cfe: f7fd f8ce bl 8006e9e <tcp_seg_free>
return NULL;
8009d02: 2300 movs r3, #0
8009d04: e037 b.n 8009d76 <tcp_create_segment+0x11e>
}
seg->tcphdr = (struct tcp_hdr *)seg->p->payload;
8009d06: 693b ldr r3, [r7, #16]
8009d08: 685b ldr r3, [r3, #4]
8009d0a: 685a ldr r2, [r3, #4]
8009d0c: 693b ldr r3, [r7, #16]
8009d0e: 60da str r2, [r3, #12]
seg->tcphdr->src = lwip_htons(pcb->local_port);
8009d10: 68fb ldr r3, [r7, #12]
8009d12: 8ada ldrh r2, [r3, #22]
8009d14: 693b ldr r3, [r7, #16]
8009d16: 68dc ldr r4, [r3, #12]
8009d18: 4610 mov r0, r2
8009d1a: f7fa fad3 bl 80042c4 <lwip_htons>
8009d1e: 4603 mov r3, r0
8009d20: 8023 strh r3, [r4, #0]
seg->tcphdr->dest = lwip_htons(pcb->remote_port);
8009d22: 68fb ldr r3, [r7, #12]
8009d24: 8b1a ldrh r2, [r3, #24]
8009d26: 693b ldr r3, [r7, #16]
8009d28: 68dc ldr r4, [r3, #12]
8009d2a: 4610 mov r0, r2
8009d2c: f7fa faca bl 80042c4 <lwip_htons>
8009d30: 4603 mov r3, r0
8009d32: 8063 strh r3, [r4, #2]
seg->tcphdr->seqno = lwip_htonl(seqno);
8009d34: 693b ldr r3, [r7, #16]
8009d36: 68dc ldr r4, [r3, #12]
8009d38: 6838 ldr r0, [r7, #0]
8009d3a: f7fa fad8 bl 80042ee <lwip_htonl>
8009d3e: 4603 mov r3, r0
8009d40: 6063 str r3, [r4, #4]
/* ackno is set in tcp_output */
TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), hdrflags);
8009d42: 7dfb ldrb r3, [r7, #23]
8009d44: 089b lsrs r3, r3, #2
8009d46: b2db uxtb r3, r3
8009d48: b29b uxth r3, r3
8009d4a: 3305 adds r3, #5
8009d4c: b29b uxth r3, r3
8009d4e: 031b lsls r3, r3, #12
8009d50: b29a uxth r2, r3
8009d52: 79fb ldrb r3, [r7, #7]
8009d54: b29b uxth r3, r3
8009d56: 4313 orrs r3, r2
8009d58: b29a uxth r2, r3
8009d5a: 693b ldr r3, [r7, #16]
8009d5c: 68dc ldr r4, [r3, #12]
8009d5e: 4610 mov r0, r2
8009d60: f7fa fab0 bl 80042c4 <lwip_htons>
8009d64: 4603 mov r3, r0
8009d66: 81a3 strh r3, [r4, #12]
/* wnd and chksum are set in tcp_output */
seg->tcphdr->urgp = 0;
8009d68: 693b ldr r3, [r7, #16]
8009d6a: 68db ldr r3, [r3, #12]
8009d6c: 2200 movs r2, #0
8009d6e: 749a strb r2, [r3, #18]
8009d70: 2200 movs r2, #0
8009d72: 74da strb r2, [r3, #19]
return seg;
8009d74: 693b ldr r3, [r7, #16]
}
8009d76: 4618 mov r0, r3
8009d78: 371c adds r7, #28
8009d7a: 46bd mov sp, r7
8009d7c: bd90 pop {r4, r7, pc}
8009d7e: bf00 nop
8009d80: 080165a4 .word 0x080165a4
8009d84: 080165d8 .word 0x080165d8
8009d88: 080165f8 .word 0x080165f8
8009d8c: 08016620 .word 0x08016620
8009d90: 08016644 .word 0x08016644
08009d94 <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)
{
8009d94: b590 push {r4, r7, lr}
8009d96: b08b sub sp, #44 ; 0x2c
8009d98: af02 add r7, sp, #8
8009d9a: 6078 str r0, [r7, #4]
8009d9c: 460b mov r3, r1
8009d9e: 807b strh r3, [r7, #2]
struct tcp_seg *seg = NULL, *useg = NULL;
8009da0: 2300 movs r3, #0
8009da2: 61fb str r3, [r7, #28]
8009da4: 2300 movs r3, #0
8009da6: 617b str r3, [r7, #20]
struct pbuf *p = NULL;
8009da8: 2300 movs r3, #0
8009daa: 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);
8009dac: 687b ldr r3, [r7, #4]
8009dae: 2b00 cmp r3, #0
8009db0: d106 bne.n 8009dc0 <tcp_split_unsent_seg+0x2c>
8009db2: 4b95 ldr r3, [pc, #596] ; (800a008 <tcp_split_unsent_seg+0x274>)
8009db4: f240 324b movw r2, #843 ; 0x34b
8009db8: 4994 ldr r1, [pc, #592] ; (800a00c <tcp_split_unsent_seg+0x278>)
8009dba: 4895 ldr r0, [pc, #596] ; (800a010 <tcp_split_unsent_seg+0x27c>)
8009dbc: f006 fb08 bl 80103d0 <printf>
useg = pcb->unsent;
8009dc0: 687b ldr r3, [r7, #4]
8009dc2: 6edb ldr r3, [r3, #108] ; 0x6c
8009dc4: 617b str r3, [r7, #20]
if (useg == NULL) {
8009dc6: 697b ldr r3, [r7, #20]
8009dc8: 2b00 cmp r3, #0
8009dca: d102 bne.n 8009dd2 <tcp_split_unsent_seg+0x3e>
return ERR_MEM;
8009dcc: f04f 33ff mov.w r3, #4294967295
8009dd0: e116 b.n 800a000 <tcp_split_unsent_seg+0x26c>
}
if (split == 0) {
8009dd2: 887b ldrh r3, [r7, #2]
8009dd4: 2b00 cmp r3, #0
8009dd6: d109 bne.n 8009dec <tcp_split_unsent_seg+0x58>
LWIP_ASSERT("Can't split segment into length 0", 0);
8009dd8: 4b8b ldr r3, [pc, #556] ; (800a008 <tcp_split_unsent_seg+0x274>)
8009dda: f240 3253 movw r2, #851 ; 0x353
8009dde: 498d ldr r1, [pc, #564] ; (800a014 <tcp_split_unsent_seg+0x280>)
8009de0: 488b ldr r0, [pc, #556] ; (800a010 <tcp_split_unsent_seg+0x27c>)
8009de2: f006 faf5 bl 80103d0 <printf>
return ERR_VAL;
8009de6: f06f 0305 mvn.w r3, #5
8009dea: e109 b.n 800a000 <tcp_split_unsent_seg+0x26c>
}
if (useg->len <= split) {
8009dec: 697b ldr r3, [r7, #20]
8009dee: 891b ldrh r3, [r3, #8]
8009df0: 887a ldrh r2, [r7, #2]
8009df2: 429a cmp r2, r3
8009df4: d301 bcc.n 8009dfa <tcp_split_unsent_seg+0x66>
return ERR_OK;
8009df6: 2300 movs r3, #0
8009df8: e102 b.n 800a000 <tcp_split_unsent_seg+0x26c>
}
LWIP_ASSERT("split <= mss", split <= pcb->mss);
8009dfa: 687b ldr r3, [r7, #4]
8009dfc: 8e5b ldrh r3, [r3, #50] ; 0x32
8009dfe: 887a ldrh r2, [r7, #2]
8009e00: 429a cmp r2, r3
8009e02: d906 bls.n 8009e12 <tcp_split_unsent_seg+0x7e>
8009e04: 4b80 ldr r3, [pc, #512] ; (800a008 <tcp_split_unsent_seg+0x274>)
8009e06: f240 325b movw r2, #859 ; 0x35b
8009e0a: 4983 ldr r1, [pc, #524] ; (800a018 <tcp_split_unsent_seg+0x284>)
8009e0c: 4880 ldr r0, [pc, #512] ; (800a010 <tcp_split_unsent_seg+0x27c>)
8009e0e: f006 fadf bl 80103d0 <printf>
LWIP_ASSERT("useg->len > 0", useg->len > 0);
8009e12: 697b ldr r3, [r7, #20]
8009e14: 891b ldrh r3, [r3, #8]
8009e16: 2b00 cmp r3, #0
8009e18: d106 bne.n 8009e28 <tcp_split_unsent_seg+0x94>
8009e1a: 4b7b ldr r3, [pc, #492] ; (800a008 <tcp_split_unsent_seg+0x274>)
8009e1c: f44f 7257 mov.w r2, #860 ; 0x35c
8009e20: 497e ldr r1, [pc, #504] ; (800a01c <tcp_split_unsent_seg+0x288>)
8009e22: 487b ldr r0, [pc, #492] ; (800a010 <tcp_split_unsent_seg+0x27c>)
8009e24: f006 fad4 bl 80103d0 <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;
8009e28: 697b ldr r3, [r7, #20]
8009e2a: 7a9b ldrb r3, [r3, #10]
8009e2c: 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);
8009e2e: 7bfb ldrb r3, [r7, #15]
8009e30: 009b lsls r3, r3, #2
8009e32: b2db uxtb r3, r3
8009e34: f003 0304 and.w r3, r3, #4
8009e38: 73bb strb r3, [r7, #14]
remainder = useg->len - split;
8009e3a: 697b ldr r3, [r7, #20]
8009e3c: 891a ldrh r2, [r3, #8]
8009e3e: 887b ldrh r3, [r7, #2]
8009e40: 1ad3 subs r3, r2, r3
8009e42: 81bb strh r3, [r7, #12]
/* Create new pbuf for the remainder of the split */
p = pbuf_alloc(PBUF_TRANSPORT, remainder + optlen, PBUF_RAM);
8009e44: 7bbb ldrb r3, [r7, #14]
8009e46: b29a uxth r2, r3
8009e48: 89bb ldrh r3, [r7, #12]
8009e4a: 4413 add r3, r2
8009e4c: b29b uxth r3, r3
8009e4e: f44f 7220 mov.w r2, #640 ; 0x280
8009e52: 4619 mov r1, r3
8009e54: 2036 movs r0, #54 ; 0x36
8009e56: f7fb fabb bl 80053d0 <pbuf_alloc>
8009e5a: 6138 str r0, [r7, #16]
if (p == NULL) {
8009e5c: 693b ldr r3, [r7, #16]
8009e5e: 2b00 cmp r3, #0
8009e60: f000 80b7 beq.w 8009fd2 <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;
8009e64: 697b ldr r3, [r7, #20]
8009e66: 685b ldr r3, [r3, #4]
8009e68: 891a ldrh r2, [r3, #8]
8009e6a: 697b ldr r3, [r7, #20]
8009e6c: 891b ldrh r3, [r3, #8]
8009e6e: 1ad3 subs r3, r2, r3
8009e70: b29a uxth r2, r3
8009e72: 887b ldrh r3, [r7, #2]
8009e74: 4413 add r3, r2
8009e76: 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) {
8009e78: 697b ldr r3, [r7, #20]
8009e7a: 6858 ldr r0, [r3, #4]
8009e7c: 693b ldr r3, [r7, #16]
8009e7e: 685a ldr r2, [r3, #4]
8009e80: 7bbb ldrb r3, [r7, #14]
8009e82: 18d1 adds r1, r2, r3
8009e84: 897b ldrh r3, [r7, #10]
8009e86: 89ba ldrh r2, [r7, #12]
8009e88: f7fb ff80 bl 8005d8c <pbuf_copy_partial>
8009e8c: 4603 mov r3, r0
8009e8e: 461a mov r2, r3
8009e90: 89bb ldrh r3, [r7, #12]
8009e92: 4293 cmp r3, r2
8009e94: f040 809f bne.w 8009fd6 <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);
8009e98: 697b ldr r3, [r7, #20]
8009e9a: 68db ldr r3, [r3, #12]
8009e9c: 899b ldrh r3, [r3, #12]
8009e9e: b29b uxth r3, r3
8009ea0: 4618 mov r0, r3
8009ea2: f7fa fa0f bl 80042c4 <lwip_htons>
8009ea6: 4603 mov r3, r0
8009ea8: b2db uxtb r3, r3
8009eaa: f003 033f and.w r3, r3, #63 ; 0x3f
8009eae: 76fb strb r3, [r7, #27]
remainder_flags = 0; /* ACK added in tcp_output() */
8009eb0: 2300 movs r3, #0
8009eb2: 76bb strb r3, [r7, #26]
if (split_flags & TCP_PSH) {
8009eb4: 7efb ldrb r3, [r7, #27]
8009eb6: f003 0308 and.w r3, r3, #8
8009eba: 2b00 cmp r3, #0
8009ebc: d007 beq.n 8009ece <tcp_split_unsent_seg+0x13a>
split_flags &= ~TCP_PSH;
8009ebe: 7efb ldrb r3, [r7, #27]
8009ec0: f023 0308 bic.w r3, r3, #8
8009ec4: 76fb strb r3, [r7, #27]
remainder_flags |= TCP_PSH;
8009ec6: 7ebb ldrb r3, [r7, #26]
8009ec8: f043 0308 orr.w r3, r3, #8
8009ecc: 76bb strb r3, [r7, #26]
}
if (split_flags & TCP_FIN) {
8009ece: 7efb ldrb r3, [r7, #27]
8009ed0: f003 0301 and.w r3, r3, #1
8009ed4: 2b00 cmp r3, #0
8009ed6: d007 beq.n 8009ee8 <tcp_split_unsent_seg+0x154>
split_flags &= ~TCP_FIN;
8009ed8: 7efb ldrb r3, [r7, #27]
8009eda: f023 0301 bic.w r3, r3, #1
8009ede: 76fb strb r3, [r7, #27]
remainder_flags |= TCP_FIN;
8009ee0: 7ebb ldrb r3, [r7, #26]
8009ee2: f043 0301 orr.w r3, r3, #1
8009ee6: 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);
8009ee8: 697b ldr r3, [r7, #20]
8009eea: 68db ldr r3, [r3, #12]
8009eec: 685b ldr r3, [r3, #4]
8009eee: 4618 mov r0, r3
8009ef0: f7fa f9fd bl 80042ee <lwip_htonl>
8009ef4: 4602 mov r2, r0
8009ef6: 887b ldrh r3, [r7, #2]
8009ef8: 18d1 adds r1, r2, r3
8009efa: 7eba ldrb r2, [r7, #26]
8009efc: 7bfb ldrb r3, [r7, #15]
8009efe: 9300 str r3, [sp, #0]
8009f00: 460b mov r3, r1
8009f02: 6939 ldr r1, [r7, #16]
8009f04: 6878 ldr r0, [r7, #4]
8009f06: f7ff fea7 bl 8009c58 <tcp_create_segment>
8009f0a: 61f8 str r0, [r7, #28]
if (seg == NULL) {
8009f0c: 69fb ldr r3, [r7, #28]
8009f0e: 2b00 cmp r3, #0
8009f10: d063 beq.n 8009fda <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);
8009f12: 697b ldr r3, [r7, #20]
8009f14: 685b ldr r3, [r3, #4]
8009f16: 4618 mov r0, r3
8009f18: f7fb fdc6 bl 8005aa8 <pbuf_clen>
8009f1c: 4603 mov r3, r0
8009f1e: 461a mov r2, r3
8009f20: 687b ldr r3, [r7, #4]
8009f22: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8009f26: 1a9b subs r3, r3, r2
8009f28: b29a uxth r2, r3
8009f2a: 687b ldr r3, [r7, #4]
8009f2c: 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);
8009f30: 697b ldr r3, [r7, #20]
8009f32: 6858 ldr r0, [r3, #4]
8009f34: 697b ldr r3, [r7, #20]
8009f36: 685b ldr r3, [r3, #4]
8009f38: 891a ldrh r2, [r3, #8]
8009f3a: 89bb ldrh r3, [r7, #12]
8009f3c: 1ad3 subs r3, r2, r3
8009f3e: b29b uxth r3, r3
8009f40: 4619 mov r1, r3
8009f42: f7fb fba3 bl 800568c <pbuf_realloc>
useg->len -= remainder;
8009f46: 697b ldr r3, [r7, #20]
8009f48: 891a ldrh r2, [r3, #8]
8009f4a: 89bb ldrh r3, [r7, #12]
8009f4c: 1ad3 subs r3, r2, r3
8009f4e: b29a uxth r2, r3
8009f50: 697b ldr r3, [r7, #20]
8009f52: 811a strh r2, [r3, #8]
TCPH_SET_FLAG(useg->tcphdr, split_flags);
8009f54: 697b ldr r3, [r7, #20]
8009f56: 68db ldr r3, [r3, #12]
8009f58: 899b ldrh r3, [r3, #12]
8009f5a: b29c uxth r4, r3
8009f5c: 7efb ldrb r3, [r7, #27]
8009f5e: b29b uxth r3, r3
8009f60: 4618 mov r0, r3
8009f62: f7fa f9af bl 80042c4 <lwip_htons>
8009f66: 4603 mov r3, r0
8009f68: 461a mov r2, r3
8009f6a: 697b ldr r3, [r7, #20]
8009f6c: 68db ldr r3, [r3, #12]
8009f6e: 4322 orrs r2, r4
8009f70: b292 uxth r2, r2
8009f72: 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);
8009f74: 697b ldr r3, [r7, #20]
8009f76: 685b ldr r3, [r3, #4]
8009f78: 4618 mov r0, r3
8009f7a: f7fb fd95 bl 8005aa8 <pbuf_clen>
8009f7e: 4603 mov r3, r0
8009f80: 461a mov r2, r3
8009f82: 687b ldr r3, [r7, #4]
8009f84: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8009f88: 4413 add r3, r2
8009f8a: b29a uxth r2, r3
8009f8c: 687b ldr r3, [r7, #4]
8009f8e: 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);
8009f92: 69fb ldr r3, [r7, #28]
8009f94: 685b ldr r3, [r3, #4]
8009f96: 4618 mov r0, r3
8009f98: f7fb fd86 bl 8005aa8 <pbuf_clen>
8009f9c: 4603 mov r3, r0
8009f9e: 461a mov r2, r3
8009fa0: 687b ldr r3, [r7, #4]
8009fa2: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8009fa6: 4413 add r3, r2
8009fa8: b29a uxth r2, r3
8009faa: 687b ldr r3, [r7, #4]
8009fac: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
/* Finally insert remainder into queue after split (which stays head) */
seg->next = useg->next;
8009fb0: 697b ldr r3, [r7, #20]
8009fb2: 681a ldr r2, [r3, #0]
8009fb4: 69fb ldr r3, [r7, #28]
8009fb6: 601a str r2, [r3, #0]
useg->next = seg;
8009fb8: 697b ldr r3, [r7, #20]
8009fba: 69fa ldr r2, [r7, #28]
8009fbc: 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) {
8009fbe: 69fb ldr r3, [r7, #28]
8009fc0: 681b ldr r3, [r3, #0]
8009fc2: 2b00 cmp r3, #0
8009fc4: d103 bne.n 8009fce <tcp_split_unsent_seg+0x23a>
pcb->unsent_oversize = 0;
8009fc6: 687b ldr r3, [r7, #4]
8009fc8: 2200 movs r2, #0
8009fca: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
}
#endif /* TCP_OVERSIZE */
return ERR_OK;
8009fce: 2300 movs r3, #0
8009fd0: e016 b.n 800a000 <tcp_split_unsent_seg+0x26c>
goto memerr;
8009fd2: bf00 nop
8009fd4: e002 b.n 8009fdc <tcp_split_unsent_seg+0x248>
goto memerr;
8009fd6: bf00 nop
8009fd8: e000 b.n 8009fdc <tcp_split_unsent_seg+0x248>
goto memerr;
8009fda: bf00 nop
memerr:
TCP_STATS_INC(tcp.memerr);
LWIP_ASSERT("seg == NULL", seg == NULL);
8009fdc: 69fb ldr r3, [r7, #28]
8009fde: 2b00 cmp r3, #0
8009fe0: d006 beq.n 8009ff0 <tcp_split_unsent_seg+0x25c>
8009fe2: 4b09 ldr r3, [pc, #36] ; (800a008 <tcp_split_unsent_seg+0x274>)
8009fe4: f44f 7276 mov.w r2, #984 ; 0x3d8
8009fe8: 490d ldr r1, [pc, #52] ; (800a020 <tcp_split_unsent_seg+0x28c>)
8009fea: 4809 ldr r0, [pc, #36] ; (800a010 <tcp_split_unsent_seg+0x27c>)
8009fec: f006 f9f0 bl 80103d0 <printf>
if (p != NULL) {
8009ff0: 693b ldr r3, [r7, #16]
8009ff2: 2b00 cmp r3, #0
8009ff4: d002 beq.n 8009ffc <tcp_split_unsent_seg+0x268>
pbuf_free(p);
8009ff6: 6938 ldr r0, [r7, #16]
8009ff8: f7fb fcce bl 8005998 <pbuf_free>
}
return ERR_MEM;
8009ffc: f04f 33ff mov.w r3, #4294967295
}
800a000: 4618 mov r0, r3
800a002: 3724 adds r7, #36 ; 0x24
800a004: 46bd mov sp, r7
800a006: bd90 pop {r4, r7, pc}
800a008: 080165a4 .word 0x080165a4
800a00c: 08016938 .word 0x08016938
800a010: 080165f8 .word 0x080165f8
800a014: 0801695c .word 0x0801695c
800a018: 08016980 .word 0x08016980
800a01c: 08016990 .word 0x08016990
800a020: 080169a0 .word 0x080169a0
0800a024 <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)
{
800a024: b590 push {r4, r7, lr}
800a026: b085 sub sp, #20
800a028: af00 add r7, sp, #0
800a02a: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_send_fin: invalid pcb", pcb != NULL);
800a02c: 687b ldr r3, [r7, #4]
800a02e: 2b00 cmp r3, #0
800a030: d106 bne.n 800a040 <tcp_send_fin+0x1c>
800a032: 4b21 ldr r3, [pc, #132] ; (800a0b8 <tcp_send_fin+0x94>)
800a034: f240 32eb movw r2, #1003 ; 0x3eb
800a038: 4920 ldr r1, [pc, #128] ; (800a0bc <tcp_send_fin+0x98>)
800a03a: 4821 ldr r0, [pc, #132] ; (800a0c0 <tcp_send_fin+0x9c>)
800a03c: f006 f9c8 bl 80103d0 <printf>
/* first, try to add the fin to the last unsent segment */
if (pcb->unsent != NULL) {
800a040: 687b ldr r3, [r7, #4]
800a042: 6edb ldr r3, [r3, #108] ; 0x6c
800a044: 2b00 cmp r3, #0
800a046: d02e beq.n 800a0a6 <tcp_send_fin+0x82>
struct tcp_seg *last_unsent;
for (last_unsent = pcb->unsent; last_unsent->next != NULL;
800a048: 687b ldr r3, [r7, #4]
800a04a: 6edb ldr r3, [r3, #108] ; 0x6c
800a04c: 60fb str r3, [r7, #12]
800a04e: e002 b.n 800a056 <tcp_send_fin+0x32>
last_unsent = last_unsent->next);
800a050: 68fb ldr r3, [r7, #12]
800a052: 681b ldr r3, [r3, #0]
800a054: 60fb str r3, [r7, #12]
for (last_unsent = pcb->unsent; last_unsent->next != NULL;
800a056: 68fb ldr r3, [r7, #12]
800a058: 681b ldr r3, [r3, #0]
800a05a: 2b00 cmp r3, #0
800a05c: d1f8 bne.n 800a050 <tcp_send_fin+0x2c>
if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) {
800a05e: 68fb ldr r3, [r7, #12]
800a060: 68db ldr r3, [r3, #12]
800a062: 899b ldrh r3, [r3, #12]
800a064: b29b uxth r3, r3
800a066: 4618 mov r0, r3
800a068: f7fa f92c bl 80042c4 <lwip_htons>
800a06c: 4603 mov r3, r0
800a06e: b2db uxtb r3, r3
800a070: f003 0307 and.w r3, r3, #7
800a074: 2b00 cmp r3, #0
800a076: d116 bne.n 800a0a6 <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);
800a078: 68fb ldr r3, [r7, #12]
800a07a: 68db ldr r3, [r3, #12]
800a07c: 899b ldrh r3, [r3, #12]
800a07e: b29c uxth r4, r3
800a080: 2001 movs r0, #1
800a082: f7fa f91f bl 80042c4 <lwip_htons>
800a086: 4603 mov r3, r0
800a088: 461a mov r2, r3
800a08a: 68fb ldr r3, [r7, #12]
800a08c: 68db ldr r3, [r3, #12]
800a08e: 4322 orrs r2, r4
800a090: b292 uxth r2, r2
800a092: 819a strh r2, [r3, #12]
tcp_set_flags(pcb, TF_FIN);
800a094: 687b ldr r3, [r7, #4]
800a096: 8b5b ldrh r3, [r3, #26]
800a098: f043 0320 orr.w r3, r3, #32
800a09c: b29a uxth r2, r3
800a09e: 687b ldr r3, [r7, #4]
800a0a0: 835a strh r2, [r3, #26]
return ERR_OK;
800a0a2: 2300 movs r3, #0
800a0a4: e004 b.n 800a0b0 <tcp_send_fin+0x8c>
}
}
/* no data, no length, flags, copy=1, no optdata */
return tcp_enqueue_flags(pcb, TCP_FIN);
800a0a6: 2101 movs r1, #1
800a0a8: 6878 ldr r0, [r7, #4]
800a0aa: f000 f80b bl 800a0c4 <tcp_enqueue_flags>
800a0ae: 4603 mov r3, r0
}
800a0b0: 4618 mov r0, r3
800a0b2: 3714 adds r7, #20
800a0b4: 46bd mov sp, r7
800a0b6: bd90 pop {r4, r7, pc}
800a0b8: 080165a4 .word 0x080165a4
800a0bc: 080169ac .word 0x080169ac
800a0c0: 080165f8 .word 0x080165f8
0800a0c4 <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)
{
800a0c4: b580 push {r7, lr}
800a0c6: b08a sub sp, #40 ; 0x28
800a0c8: af02 add r7, sp, #8
800a0ca: 6078 str r0, [r7, #4]
800a0cc: 460b mov r3, r1
800a0ce: 70fb strb r3, [r7, #3]
struct pbuf *p;
struct tcp_seg *seg;
u8_t optflags = 0;
800a0d0: 2300 movs r3, #0
800a0d2: 77fb strb r3, [r7, #31]
u8_t optlen = 0;
800a0d4: 2300 movs r3, #0
800a0d6: 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)",
800a0d8: 78fb ldrb r3, [r7, #3]
800a0da: f003 0303 and.w r3, r3, #3
800a0de: 2b00 cmp r3, #0
800a0e0: d106 bne.n 800a0f0 <tcp_enqueue_flags+0x2c>
800a0e2: 4b67 ldr r3, [pc, #412] ; (800a280 <tcp_enqueue_flags+0x1bc>)
800a0e4: f240 4211 movw r2, #1041 ; 0x411
800a0e8: 4966 ldr r1, [pc, #408] ; (800a284 <tcp_enqueue_flags+0x1c0>)
800a0ea: 4867 ldr r0, [pc, #412] ; (800a288 <tcp_enqueue_flags+0x1c4>)
800a0ec: f006 f970 bl 80103d0 <printf>
(flags & (TCP_SYN | TCP_FIN)) != 0);
LWIP_ASSERT("tcp_enqueue_flags: invalid pcb", pcb != NULL);
800a0f0: 687b ldr r3, [r7, #4]
800a0f2: 2b00 cmp r3, #0
800a0f4: d106 bne.n 800a104 <tcp_enqueue_flags+0x40>
800a0f6: 4b62 ldr r3, [pc, #392] ; (800a280 <tcp_enqueue_flags+0x1bc>)
800a0f8: f240 4213 movw r2, #1043 ; 0x413
800a0fc: 4963 ldr r1, [pc, #396] ; (800a28c <tcp_enqueue_flags+0x1c8>)
800a0fe: 4862 ldr r0, [pc, #392] ; (800a288 <tcp_enqueue_flags+0x1c4>)
800a100: f006 f966 bl 80103d0 <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) {
800a104: 78fb ldrb r3, [r7, #3]
800a106: f003 0302 and.w r3, r3, #2
800a10a: 2b00 cmp r3, #0
800a10c: d001 beq.n 800a112 <tcp_enqueue_flags+0x4e>
optflags = TF_SEG_OPTS_MSS;
800a10e: 2301 movs r3, #1
800a110: 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);
800a112: 7ffb ldrb r3, [r7, #31]
800a114: 009b lsls r3, r3, #2
800a116: b2db uxtb r3, r3
800a118: f003 0304 and.w r3, r3, #4
800a11c: 75fb strb r3, [r7, #23]
/* Allocate pbuf with room for TCP header + options */
if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) {
800a11e: 7dfb ldrb r3, [r7, #23]
800a120: b29b uxth r3, r3
800a122: f44f 7220 mov.w r2, #640 ; 0x280
800a126: 4619 mov r1, r3
800a128: 2036 movs r0, #54 ; 0x36
800a12a: f7fb f951 bl 80053d0 <pbuf_alloc>
800a12e: 6138 str r0, [r7, #16]
800a130: 693b ldr r3, [r7, #16]
800a132: 2b00 cmp r3, #0
800a134: d109 bne.n 800a14a <tcp_enqueue_flags+0x86>
tcp_set_flags(pcb, TF_NAGLEMEMERR);
800a136: 687b ldr r3, [r7, #4]
800a138: 8b5b ldrh r3, [r3, #26]
800a13a: f043 0380 orr.w r3, r3, #128 ; 0x80
800a13e: b29a uxth r2, r3
800a140: 687b ldr r3, [r7, #4]
800a142: 835a strh r2, [r3, #26]
TCP_STATS_INC(tcp.memerr);
return ERR_MEM;
800a144: f04f 33ff mov.w r3, #4294967295
800a148: e095 b.n 800a276 <tcp_enqueue_flags+0x1b2>
}
LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen",
800a14a: 693b ldr r3, [r7, #16]
800a14c: 895a ldrh r2, [r3, #10]
800a14e: 7dfb ldrb r3, [r7, #23]
800a150: b29b uxth r3, r3
800a152: 429a cmp r2, r3
800a154: d206 bcs.n 800a164 <tcp_enqueue_flags+0xa0>
800a156: 4b4a ldr r3, [pc, #296] ; (800a280 <tcp_enqueue_flags+0x1bc>)
800a158: f240 4239 movw r2, #1081 ; 0x439
800a15c: 494c ldr r1, [pc, #304] ; (800a290 <tcp_enqueue_flags+0x1cc>)
800a15e: 484a ldr r0, [pc, #296] ; (800a288 <tcp_enqueue_flags+0x1c4>)
800a160: f006 f936 bl 80103d0 <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) {
800a164: 687b ldr r3, [r7, #4]
800a166: 6dd9 ldr r1, [r3, #92] ; 0x5c
800a168: 78fa ldrb r2, [r7, #3]
800a16a: 7ffb ldrb r3, [r7, #31]
800a16c: 9300 str r3, [sp, #0]
800a16e: 460b mov r3, r1
800a170: 6939 ldr r1, [r7, #16]
800a172: 6878 ldr r0, [r7, #4]
800a174: f7ff fd70 bl 8009c58 <tcp_create_segment>
800a178: 60f8 str r0, [r7, #12]
800a17a: 68fb ldr r3, [r7, #12]
800a17c: 2b00 cmp r3, #0
800a17e: d109 bne.n 800a194 <tcp_enqueue_flags+0xd0>
tcp_set_flags(pcb, TF_NAGLEMEMERR);
800a180: 687b ldr r3, [r7, #4]
800a182: 8b5b ldrh r3, [r3, #26]
800a184: f043 0380 orr.w r3, r3, #128 ; 0x80
800a188: b29a uxth r2, r3
800a18a: 687b ldr r3, [r7, #4]
800a18c: 835a strh r2, [r3, #26]
TCP_STATS_INC(tcp.memerr);
return ERR_MEM;
800a18e: f04f 33ff mov.w r3, #4294967295
800a192: e070 b.n 800a276 <tcp_enqueue_flags+0x1b2>
}
LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0);
800a194: 68fb ldr r3, [r7, #12]
800a196: 68db ldr r3, [r3, #12]
800a198: f003 0303 and.w r3, r3, #3
800a19c: 2b00 cmp r3, #0
800a19e: d006 beq.n 800a1ae <tcp_enqueue_flags+0xea>
800a1a0: 4b37 ldr r3, [pc, #220] ; (800a280 <tcp_enqueue_flags+0x1bc>)
800a1a2: f240 4242 movw r2, #1090 ; 0x442
800a1a6: 493b ldr r1, [pc, #236] ; (800a294 <tcp_enqueue_flags+0x1d0>)
800a1a8: 4837 ldr r0, [pc, #220] ; (800a288 <tcp_enqueue_flags+0x1c4>)
800a1aa: f006 f911 bl 80103d0 <printf>
LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0);
800a1ae: 68fb ldr r3, [r7, #12]
800a1b0: 891b ldrh r3, [r3, #8]
800a1b2: 2b00 cmp r3, #0
800a1b4: d006 beq.n 800a1c4 <tcp_enqueue_flags+0x100>
800a1b6: 4b32 ldr r3, [pc, #200] ; (800a280 <tcp_enqueue_flags+0x1bc>)
800a1b8: f240 4243 movw r2, #1091 ; 0x443
800a1bc: 4936 ldr r1, [pc, #216] ; (800a298 <tcp_enqueue_flags+0x1d4>)
800a1be: 4832 ldr r0, [pc, #200] ; (800a288 <tcp_enqueue_flags+0x1c4>)
800a1c0: f006 f906 bl 80103d0 <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) {
800a1c4: 687b ldr r3, [r7, #4]
800a1c6: 6edb ldr r3, [r3, #108] ; 0x6c
800a1c8: 2b00 cmp r3, #0
800a1ca: d103 bne.n 800a1d4 <tcp_enqueue_flags+0x110>
pcb->unsent = seg;
800a1cc: 687b ldr r3, [r7, #4]
800a1ce: 68fa ldr r2, [r7, #12]
800a1d0: 66da str r2, [r3, #108] ; 0x6c
800a1d2: e00d b.n 800a1f0 <tcp_enqueue_flags+0x12c>
} else {
struct tcp_seg *useg;
for (useg = pcb->unsent; useg->next != NULL; useg = useg->next);
800a1d4: 687b ldr r3, [r7, #4]
800a1d6: 6edb ldr r3, [r3, #108] ; 0x6c
800a1d8: 61bb str r3, [r7, #24]
800a1da: e002 b.n 800a1e2 <tcp_enqueue_flags+0x11e>
800a1dc: 69bb ldr r3, [r7, #24]
800a1de: 681b ldr r3, [r3, #0]
800a1e0: 61bb str r3, [r7, #24]
800a1e2: 69bb ldr r3, [r7, #24]
800a1e4: 681b ldr r3, [r3, #0]
800a1e6: 2b00 cmp r3, #0
800a1e8: d1f8 bne.n 800a1dc <tcp_enqueue_flags+0x118>
useg->next = seg;
800a1ea: 69bb ldr r3, [r7, #24]
800a1ec: 68fa ldr r2, [r7, #12]
800a1ee: 601a str r2, [r3, #0]
}
#if TCP_OVERSIZE
/* The new unsent tail has no space */
pcb->unsent_oversize = 0;
800a1f0: 687b ldr r3, [r7, #4]
800a1f2: 2200 movs r2, #0
800a1f4: 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)) {
800a1f8: 78fb ldrb r3, [r7, #3]
800a1fa: f003 0302 and.w r3, r3, #2
800a1fe: 2b00 cmp r3, #0
800a200: d104 bne.n 800a20c <tcp_enqueue_flags+0x148>
800a202: 78fb ldrb r3, [r7, #3]
800a204: f003 0301 and.w r3, r3, #1
800a208: 2b00 cmp r3, #0
800a20a: d004 beq.n 800a216 <tcp_enqueue_flags+0x152>
pcb->snd_lbb++;
800a20c: 687b ldr r3, [r7, #4]
800a20e: 6ddb ldr r3, [r3, #92] ; 0x5c
800a210: 1c5a adds r2, r3, #1
800a212: 687b ldr r3, [r7, #4]
800a214: 65da str r2, [r3, #92] ; 0x5c
/* optlen does not influence snd_buf */
}
if (flags & TCP_FIN) {
800a216: 78fb ldrb r3, [r7, #3]
800a218: f003 0301 and.w r3, r3, #1
800a21c: 2b00 cmp r3, #0
800a21e: d006 beq.n 800a22e <tcp_enqueue_flags+0x16a>
tcp_set_flags(pcb, TF_FIN);
800a220: 687b ldr r3, [r7, #4]
800a222: 8b5b ldrh r3, [r3, #26]
800a224: f043 0320 orr.w r3, r3, #32
800a228: b29a uxth r2, r3
800a22a: 687b ldr r3, [r7, #4]
800a22c: 835a strh r2, [r3, #26]
}
/* update number of segments on the queues */
pcb->snd_queuelen += pbuf_clen(seg->p);
800a22e: 68fb ldr r3, [r7, #12]
800a230: 685b ldr r3, [r3, #4]
800a232: 4618 mov r0, r3
800a234: f7fb fc38 bl 8005aa8 <pbuf_clen>
800a238: 4603 mov r3, r0
800a23a: 461a mov r2, r3
800a23c: 687b ldr r3, [r7, #4]
800a23e: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
800a242: 4413 add r3, r2
800a244: b29a uxth r2, r3
800a246: 687b ldr r3, [r7, #4]
800a248: 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) {
800a24c: 687b ldr r3, [r7, #4]
800a24e: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
800a252: 2b00 cmp r3, #0
800a254: d00e beq.n 800a274 <tcp_enqueue_flags+0x1b0>
LWIP_ASSERT("tcp_enqueue_flags: invalid queue length",
800a256: 687b ldr r3, [r7, #4]
800a258: 6f1b ldr r3, [r3, #112] ; 0x70
800a25a: 2b00 cmp r3, #0
800a25c: d10a bne.n 800a274 <tcp_enqueue_flags+0x1b0>
800a25e: 687b ldr r3, [r7, #4]
800a260: 6edb ldr r3, [r3, #108] ; 0x6c
800a262: 2b00 cmp r3, #0
800a264: d106 bne.n 800a274 <tcp_enqueue_flags+0x1b0>
800a266: 4b06 ldr r3, [pc, #24] ; (800a280 <tcp_enqueue_flags+0x1bc>)
800a268: f240 4265 movw r2, #1125 ; 0x465
800a26c: 490b ldr r1, [pc, #44] ; (800a29c <tcp_enqueue_flags+0x1d8>)
800a26e: 4806 ldr r0, [pc, #24] ; (800a288 <tcp_enqueue_flags+0x1c4>)
800a270: f006 f8ae bl 80103d0 <printf>
pcb->unacked != NULL || pcb->unsent != NULL);
}
return ERR_OK;
800a274: 2300 movs r3, #0
}
800a276: 4618 mov r0, r3
800a278: 3720 adds r7, #32
800a27a: 46bd mov sp, r7
800a27c: bd80 pop {r7, pc}
800a27e: bf00 nop
800a280: 080165a4 .word 0x080165a4
800a284: 080169c8 .word 0x080169c8
800a288: 080165f8 .word 0x080165f8
800a28c: 08016a20 .word 0x08016a20
800a290: 08016a40 .word 0x08016a40
800a294: 08016a7c .word 0x08016a7c
800a298: 08016a94 .word 0x08016a94
800a29c: 08016ac0 .word 0x08016ac0
0800a2a0 <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)
{
800a2a0: b5b0 push {r4, r5, r7, lr}
800a2a2: b08a sub sp, #40 ; 0x28
800a2a4: af00 add r7, sp, #0
800a2a6: 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);
800a2a8: 687b ldr r3, [r7, #4]
800a2aa: 2b00 cmp r3, #0
800a2ac: d106 bne.n 800a2bc <tcp_output+0x1c>
800a2ae: 4b8a ldr r3, [pc, #552] ; (800a4d8 <tcp_output+0x238>)
800a2b0: f240 42e1 movw r2, #1249 ; 0x4e1
800a2b4: 4989 ldr r1, [pc, #548] ; (800a4dc <tcp_output+0x23c>)
800a2b6: 488a ldr r0, [pc, #552] ; (800a4e0 <tcp_output+0x240>)
800a2b8: f006 f88a bl 80103d0 <printf>
/* pcb->state LISTEN not allowed here */
LWIP_ASSERT("don't call tcp_output for listen-pcbs",
800a2bc: 687b ldr r3, [r7, #4]
800a2be: 7d1b ldrb r3, [r3, #20]
800a2c0: 2b01 cmp r3, #1
800a2c2: d106 bne.n 800a2d2 <tcp_output+0x32>
800a2c4: 4b84 ldr r3, [pc, #528] ; (800a4d8 <tcp_output+0x238>)
800a2c6: f240 42e3 movw r2, #1251 ; 0x4e3
800a2ca: 4986 ldr r1, [pc, #536] ; (800a4e4 <tcp_output+0x244>)
800a2cc: 4884 ldr r0, [pc, #528] ; (800a4e0 <tcp_output+0x240>)
800a2ce: f006 f87f bl 80103d0 <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) {
800a2d2: 4b85 ldr r3, [pc, #532] ; (800a4e8 <tcp_output+0x248>)
800a2d4: 681b ldr r3, [r3, #0]
800a2d6: 687a ldr r2, [r7, #4]
800a2d8: 429a cmp r2, r3
800a2da: d101 bne.n 800a2e0 <tcp_output+0x40>
return ERR_OK;
800a2dc: 2300 movs r3, #0
800a2de: e1ce b.n 800a67e <tcp_output+0x3de>
}
wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd);
800a2e0: 687b ldr r3, [r7, #4]
800a2e2: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
800a2e6: 687b ldr r3, [r7, #4]
800a2e8: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
800a2ec: 4293 cmp r3, r2
800a2ee: bf28 it cs
800a2f0: 4613 movcs r3, r2
800a2f2: b29b uxth r3, r3
800a2f4: 61bb str r3, [r7, #24]
seg = pcb->unsent;
800a2f6: 687b ldr r3, [r7, #4]
800a2f8: 6edb ldr r3, [r3, #108] ; 0x6c
800a2fa: 627b str r3, [r7, #36] ; 0x24
if (seg == NULL) {
800a2fc: 6a7b ldr r3, [r7, #36] ; 0x24
800a2fe: 2b00 cmp r3, #0
800a300: d10b bne.n 800a31a <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) {
800a302: 687b ldr r3, [r7, #4]
800a304: 8b5b ldrh r3, [r3, #26]
800a306: f003 0302 and.w r3, r3, #2
800a30a: 2b00 cmp r3, #0
800a30c: f000 81aa beq.w 800a664 <tcp_output+0x3c4>
return tcp_send_empty_ack(pcb);
800a310: 6878 ldr r0, [r7, #4]
800a312: f000 fdcb bl 800aeac <tcp_send_empty_ack>
800a316: 4603 mov r3, r0
800a318: e1b1 b.n 800a67e <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);
800a31a: 6879 ldr r1, [r7, #4]
800a31c: 687b ldr r3, [r7, #4]
800a31e: 3304 adds r3, #4
800a320: 461a mov r2, r3
800a322: 6878 ldr r0, [r7, #4]
800a324: f7ff fc7c bl 8009c20 <tcp_route>
800a328: 6178 str r0, [r7, #20]
if (netif == NULL) {
800a32a: 697b ldr r3, [r7, #20]
800a32c: 2b00 cmp r3, #0
800a32e: d102 bne.n 800a336 <tcp_output+0x96>
return ERR_RTE;
800a330: f06f 0303 mvn.w r3, #3
800a334: e1a3 b.n 800a67e <tcp_output+0x3de>
}
/* If we don't have a local IP address, we get one from netif */
if (ip_addr_isany(&pcb->local_ip)) {
800a336: 687b ldr r3, [r7, #4]
800a338: 2b00 cmp r3, #0
800a33a: d003 beq.n 800a344 <tcp_output+0xa4>
800a33c: 687b ldr r3, [r7, #4]
800a33e: 681b ldr r3, [r3, #0]
800a340: 2b00 cmp r3, #0
800a342: d111 bne.n 800a368 <tcp_output+0xc8>
const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, &pcb->remote_ip);
800a344: 697b ldr r3, [r7, #20]
800a346: 2b00 cmp r3, #0
800a348: d002 beq.n 800a350 <tcp_output+0xb0>
800a34a: 697b ldr r3, [r7, #20]
800a34c: 3304 adds r3, #4
800a34e: e000 b.n 800a352 <tcp_output+0xb2>
800a350: 2300 movs r3, #0
800a352: 613b str r3, [r7, #16]
if (local_ip == NULL) {
800a354: 693b ldr r3, [r7, #16]
800a356: 2b00 cmp r3, #0
800a358: d102 bne.n 800a360 <tcp_output+0xc0>
return ERR_RTE;
800a35a: f06f 0303 mvn.w r3, #3
800a35e: e18e b.n 800a67e <tcp_output+0x3de>
}
ip_addr_copy(pcb->local_ip, *local_ip);
800a360: 693b ldr r3, [r7, #16]
800a362: 681a ldr r2, [r3, #0]
800a364: 687b ldr r3, [r7, #4]
800a366: 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) {
800a368: 6a7b ldr r3, [r7, #36] ; 0x24
800a36a: 68db ldr r3, [r3, #12]
800a36c: 685b ldr r3, [r3, #4]
800a36e: 4618 mov r0, r3
800a370: f7f9 ffbd bl 80042ee <lwip_htonl>
800a374: 4602 mov r2, r0
800a376: 687b ldr r3, [r7, #4]
800a378: 6c5b ldr r3, [r3, #68] ; 0x44
800a37a: 1ad3 subs r3, r2, r3
800a37c: 6a7a ldr r2, [r7, #36] ; 0x24
800a37e: 8912 ldrh r2, [r2, #8]
800a380: 4413 add r3, r2
800a382: 69ba ldr r2, [r7, #24]
800a384: 429a cmp r2, r3
800a386: d227 bcs.n 800a3d8 <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) {
800a388: 687b ldr r3, [r7, #4]
800a38a: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
800a38e: 461a mov r2, r3
800a390: 69bb ldr r3, [r7, #24]
800a392: 4293 cmp r3, r2
800a394: d114 bne.n 800a3c0 <tcp_output+0x120>
800a396: 687b ldr r3, [r7, #4]
800a398: 6f1b ldr r3, [r3, #112] ; 0x70
800a39a: 2b00 cmp r3, #0
800a39c: d110 bne.n 800a3c0 <tcp_output+0x120>
800a39e: 687b ldr r3, [r7, #4]
800a3a0: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
800a3a4: 2b00 cmp r3, #0
800a3a6: d10b bne.n 800a3c0 <tcp_output+0x120>
pcb->persist_cnt = 0;
800a3a8: 687b ldr r3, [r7, #4]
800a3aa: 2200 movs r2, #0
800a3ac: f883 2098 strb.w r2, [r3, #152] ; 0x98
pcb->persist_backoff = 1;
800a3b0: 687b ldr r3, [r7, #4]
800a3b2: 2201 movs r2, #1
800a3b4: f883 2099 strb.w r2, [r3, #153] ; 0x99
pcb->persist_probe = 0;
800a3b8: 687b ldr r3, [r7, #4]
800a3ba: 2200 movs r2, #0
800a3bc: 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) {
800a3c0: 687b ldr r3, [r7, #4]
800a3c2: 8b5b ldrh r3, [r3, #26]
800a3c4: f003 0302 and.w r3, r3, #2
800a3c8: 2b00 cmp r3, #0
800a3ca: f000 814d beq.w 800a668 <tcp_output+0x3c8>
return tcp_send_empty_ack(pcb);
800a3ce: 6878 ldr r0, [r7, #4]
800a3d0: f000 fd6c bl 800aeac <tcp_send_empty_ack>
800a3d4: 4603 mov r3, r0
800a3d6: e152 b.n 800a67e <tcp_output+0x3de>
}
goto output_done;
}
/* Stop persist timer, above conditions are not active */
pcb->persist_backoff = 0;
800a3d8: 687b ldr r3, [r7, #4]
800a3da: 2200 movs r2, #0
800a3dc: f883 2099 strb.w r2, [r3, #153] ; 0x99
/* useg should point to last segment on unacked queue */
useg = pcb->unacked;
800a3e0: 687b ldr r3, [r7, #4]
800a3e2: 6f1b ldr r3, [r3, #112] ; 0x70
800a3e4: 623b str r3, [r7, #32]
if (useg != NULL) {
800a3e6: 6a3b ldr r3, [r7, #32]
800a3e8: 2b00 cmp r3, #0
800a3ea: f000 811c beq.w 800a626 <tcp_output+0x386>
for (; useg->next != NULL; useg = useg->next);
800a3ee: e002 b.n 800a3f6 <tcp_output+0x156>
800a3f0: 6a3b ldr r3, [r7, #32]
800a3f2: 681b ldr r3, [r3, #0]
800a3f4: 623b str r3, [r7, #32]
800a3f6: 6a3b ldr r3, [r7, #32]
800a3f8: 681b ldr r3, [r3, #0]
800a3fa: 2b00 cmp r3, #0
800a3fc: d1f8 bne.n 800a3f0 <tcp_output+0x150>
}
/* data available and window allows it to be sent? */
while (seg != NULL &&
800a3fe: e112 b.n 800a626 <tcp_output+0x386>
lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) {
LWIP_ASSERT("RST not expected here!",
800a400: 6a7b ldr r3, [r7, #36] ; 0x24
800a402: 68db ldr r3, [r3, #12]
800a404: 899b ldrh r3, [r3, #12]
800a406: b29b uxth r3, r3
800a408: 4618 mov r0, r3
800a40a: f7f9 ff5b bl 80042c4 <lwip_htons>
800a40e: 4603 mov r3, r0
800a410: b2db uxtb r3, r3
800a412: f003 0304 and.w r3, r3, #4
800a416: 2b00 cmp r3, #0
800a418: d006 beq.n 800a428 <tcp_output+0x188>
800a41a: 4b2f ldr r3, [pc, #188] ; (800a4d8 <tcp_output+0x238>)
800a41c: f240 5236 movw r2, #1334 ; 0x536
800a420: 4932 ldr r1, [pc, #200] ; (800a4ec <tcp_output+0x24c>)
800a422: 482f ldr r0, [pc, #188] ; (800a4e0 <tcp_output+0x240>)
800a424: f005 ffd4 bl 80103d0 <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) &&
800a428: 687b ldr r3, [r7, #4]
800a42a: 6f1b ldr r3, [r3, #112] ; 0x70
800a42c: 2b00 cmp r3, #0
800a42e: d01f beq.n 800a470 <tcp_output+0x1d0>
800a430: 687b ldr r3, [r7, #4]
800a432: 8b5b ldrh r3, [r3, #26]
800a434: f003 0344 and.w r3, r3, #68 ; 0x44
800a438: 2b00 cmp r3, #0
800a43a: d119 bne.n 800a470 <tcp_output+0x1d0>
800a43c: 687b ldr r3, [r7, #4]
800a43e: 6edb ldr r3, [r3, #108] ; 0x6c
800a440: 2b00 cmp r3, #0
800a442: d00b beq.n 800a45c <tcp_output+0x1bc>
800a444: 687b ldr r3, [r7, #4]
800a446: 6edb ldr r3, [r3, #108] ; 0x6c
800a448: 681b ldr r3, [r3, #0]
800a44a: 2b00 cmp r3, #0
800a44c: d110 bne.n 800a470 <tcp_output+0x1d0>
800a44e: 687b ldr r3, [r7, #4]
800a450: 6edb ldr r3, [r3, #108] ; 0x6c
800a452: 891a ldrh r2, [r3, #8]
800a454: 687b ldr r3, [r7, #4]
800a456: 8e5b ldrh r3, [r3, #50] ; 0x32
800a458: 429a cmp r2, r3
800a45a: d209 bcs.n 800a470 <tcp_output+0x1d0>
800a45c: 687b ldr r3, [r7, #4]
800a45e: f8b3 3064 ldrh.w r3, [r3, #100] ; 0x64
800a462: 2b00 cmp r3, #0
800a464: d004 beq.n 800a470 <tcp_output+0x1d0>
800a466: 687b ldr r3, [r7, #4]
800a468: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
800a46c: 2b08 cmp r3, #8
800a46e: d901 bls.n 800a474 <tcp_output+0x1d4>
800a470: 2301 movs r3, #1
800a472: e000 b.n 800a476 <tcp_output+0x1d6>
800a474: 2300 movs r3, #0
800a476: 2b00 cmp r3, #0
800a478: d106 bne.n 800a488 <tcp_output+0x1e8>
((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)) {
800a47a: 687b ldr r3, [r7, #4]
800a47c: 8b5b ldrh r3, [r3, #26]
800a47e: f003 03a0 and.w r3, r3, #160 ; 0xa0
if ((tcp_do_output_nagle(pcb) == 0) &&
800a482: 2b00 cmp r3, #0
800a484: f000 80e4 beq.w 800a650 <tcp_output+0x3b0>
pcb->lastack,
lwip_ntohl(seg->tcphdr->seqno), pcb->lastack, i));
++i;
#endif /* TCP_CWND_DEBUG */
if (pcb->state != SYN_SENT) {
800a488: 687b ldr r3, [r7, #4]
800a48a: 7d1b ldrb r3, [r3, #20]
800a48c: 2b02 cmp r3, #2
800a48e: d00d beq.n 800a4ac <tcp_output+0x20c>
TCPH_SET_FLAG(seg->tcphdr, TCP_ACK);
800a490: 6a7b ldr r3, [r7, #36] ; 0x24
800a492: 68db ldr r3, [r3, #12]
800a494: 899b ldrh r3, [r3, #12]
800a496: b29c uxth r4, r3
800a498: 2010 movs r0, #16
800a49a: f7f9 ff13 bl 80042c4 <lwip_htons>
800a49e: 4603 mov r3, r0
800a4a0: 461a mov r2, r3
800a4a2: 6a7b ldr r3, [r7, #36] ; 0x24
800a4a4: 68db ldr r3, [r3, #12]
800a4a6: 4322 orrs r2, r4
800a4a8: b292 uxth r2, r2
800a4aa: 819a strh r2, [r3, #12]
}
err = tcp_output_segment(seg, pcb, netif);
800a4ac: 697a ldr r2, [r7, #20]
800a4ae: 6879 ldr r1, [r7, #4]
800a4b0: 6a78 ldr r0, [r7, #36] ; 0x24
800a4b2: f000 f909 bl 800a6c8 <tcp_output_segment>
800a4b6: 4603 mov r3, r0
800a4b8: 73fb strb r3, [r7, #15]
if (err != ERR_OK) {
800a4ba: f997 300f ldrsb.w r3, [r7, #15]
800a4be: 2b00 cmp r3, #0
800a4c0: d016 beq.n 800a4f0 <tcp_output+0x250>
/* segment could not be sent, for whatever reason */
tcp_set_flags(pcb, TF_NAGLEMEMERR);
800a4c2: 687b ldr r3, [r7, #4]
800a4c4: 8b5b ldrh r3, [r3, #26]
800a4c6: f043 0380 orr.w r3, r3, #128 ; 0x80
800a4ca: b29a uxth r2, r3
800a4cc: 687b ldr r3, [r7, #4]
800a4ce: 835a strh r2, [r3, #26]
return err;
800a4d0: f997 300f ldrsb.w r3, [r7, #15]
800a4d4: e0d3 b.n 800a67e <tcp_output+0x3de>
800a4d6: bf00 nop
800a4d8: 080165a4 .word 0x080165a4
800a4dc: 08016ae8 .word 0x08016ae8
800a4e0: 080165f8 .word 0x080165f8
800a4e4: 08016b00 .word 0x08016b00
800a4e8: 20008c4c .word 0x20008c4c
800a4ec: 08016b28 .word 0x08016b28
}
#if TCP_OVERSIZE_DBGCHECK
seg->oversize_left = 0;
#endif /* TCP_OVERSIZE_DBGCHECK */
pcb->unsent = seg->next;
800a4f0: 6a7b ldr r3, [r7, #36] ; 0x24
800a4f2: 681a ldr r2, [r3, #0]
800a4f4: 687b ldr r3, [r7, #4]
800a4f6: 66da str r2, [r3, #108] ; 0x6c
if (pcb->state != SYN_SENT) {
800a4f8: 687b ldr r3, [r7, #4]
800a4fa: 7d1b ldrb r3, [r3, #20]
800a4fc: 2b02 cmp r3, #2
800a4fe: d006 beq.n 800a50e <tcp_output+0x26e>
tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
800a500: 687b ldr r3, [r7, #4]
800a502: 8b5b ldrh r3, [r3, #26]
800a504: f023 0303 bic.w r3, r3, #3
800a508: b29a uxth r2, r3
800a50a: 687b ldr r3, [r7, #4]
800a50c: 835a strh r2, [r3, #26]
}
snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
800a50e: 6a7b ldr r3, [r7, #36] ; 0x24
800a510: 68db ldr r3, [r3, #12]
800a512: 685b ldr r3, [r3, #4]
800a514: 4618 mov r0, r3
800a516: f7f9 feea bl 80042ee <lwip_htonl>
800a51a: 4604 mov r4, r0
800a51c: 6a7b ldr r3, [r7, #36] ; 0x24
800a51e: 891b ldrh r3, [r3, #8]
800a520: 461d mov r5, r3
800a522: 6a7b ldr r3, [r7, #36] ; 0x24
800a524: 68db ldr r3, [r3, #12]
800a526: 899b ldrh r3, [r3, #12]
800a528: b29b uxth r3, r3
800a52a: 4618 mov r0, r3
800a52c: f7f9 feca bl 80042c4 <lwip_htons>
800a530: 4603 mov r3, r0
800a532: b2db uxtb r3, r3
800a534: f003 0303 and.w r3, r3, #3
800a538: 2b00 cmp r3, #0
800a53a: d001 beq.n 800a540 <tcp_output+0x2a0>
800a53c: 2301 movs r3, #1
800a53e: e000 b.n 800a542 <tcp_output+0x2a2>
800a540: 2300 movs r3, #0
800a542: 442b add r3, r5
800a544: 4423 add r3, r4
800a546: 60bb str r3, [r7, #8]
if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) {
800a548: 687b ldr r3, [r7, #4]
800a54a: 6d1a ldr r2, [r3, #80] ; 0x50
800a54c: 68bb ldr r3, [r7, #8]
800a54e: 1ad3 subs r3, r2, r3
800a550: 2b00 cmp r3, #0
800a552: da02 bge.n 800a55a <tcp_output+0x2ba>
pcb->snd_nxt = snd_nxt;
800a554: 687b ldr r3, [r7, #4]
800a556: 68ba ldr r2, [r7, #8]
800a558: 651a str r2, [r3, #80] ; 0x50
}
/* put segment on unacknowledged list if length > 0 */
if (TCP_TCPLEN(seg) > 0) {
800a55a: 6a7b ldr r3, [r7, #36] ; 0x24
800a55c: 891b ldrh r3, [r3, #8]
800a55e: 461c mov r4, r3
800a560: 6a7b ldr r3, [r7, #36] ; 0x24
800a562: 68db ldr r3, [r3, #12]
800a564: 899b ldrh r3, [r3, #12]
800a566: b29b uxth r3, r3
800a568: 4618 mov r0, r3
800a56a: f7f9 feab bl 80042c4 <lwip_htons>
800a56e: 4603 mov r3, r0
800a570: b2db uxtb r3, r3
800a572: f003 0303 and.w r3, r3, #3
800a576: 2b00 cmp r3, #0
800a578: d001 beq.n 800a57e <tcp_output+0x2de>
800a57a: 2301 movs r3, #1
800a57c: e000 b.n 800a580 <tcp_output+0x2e0>
800a57e: 2300 movs r3, #0
800a580: 4423 add r3, r4
800a582: 2b00 cmp r3, #0
800a584: d049 beq.n 800a61a <tcp_output+0x37a>
seg->next = NULL;
800a586: 6a7b ldr r3, [r7, #36] ; 0x24
800a588: 2200 movs r2, #0
800a58a: 601a str r2, [r3, #0]
/* unacked list is empty? */
if (pcb->unacked == NULL) {
800a58c: 687b ldr r3, [r7, #4]
800a58e: 6f1b ldr r3, [r3, #112] ; 0x70
800a590: 2b00 cmp r3, #0
800a592: d105 bne.n 800a5a0 <tcp_output+0x300>
pcb->unacked = seg;
800a594: 687b ldr r3, [r7, #4]
800a596: 6a7a ldr r2, [r7, #36] ; 0x24
800a598: 671a str r2, [r3, #112] ; 0x70
useg = seg;
800a59a: 6a7b ldr r3, [r7, #36] ; 0x24
800a59c: 623b str r3, [r7, #32]
800a59e: e03f b.n 800a620 <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))) {
800a5a0: 6a7b ldr r3, [r7, #36] ; 0x24
800a5a2: 68db ldr r3, [r3, #12]
800a5a4: 685b ldr r3, [r3, #4]
800a5a6: 4618 mov r0, r3
800a5a8: f7f9 fea1 bl 80042ee <lwip_htonl>
800a5ac: 4604 mov r4, r0
800a5ae: 6a3b ldr r3, [r7, #32]
800a5b0: 68db ldr r3, [r3, #12]
800a5b2: 685b ldr r3, [r3, #4]
800a5b4: 4618 mov r0, r3
800a5b6: f7f9 fe9a bl 80042ee <lwip_htonl>
800a5ba: 4603 mov r3, r0
800a5bc: 1ae3 subs r3, r4, r3
800a5be: 2b00 cmp r3, #0
800a5c0: da24 bge.n 800a60c <tcp_output+0x36c>
/* add segment to before tail of unacked list, keeping the list sorted */
struct tcp_seg **cur_seg = &(pcb->unacked);
800a5c2: 687b ldr r3, [r7, #4]
800a5c4: 3370 adds r3, #112 ; 0x70
800a5c6: 61fb str r3, [r7, #28]
while (*cur_seg &&
800a5c8: e002 b.n 800a5d0 <tcp_output+0x330>
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
cur_seg = &((*cur_seg)->next );
800a5ca: 69fb ldr r3, [r7, #28]
800a5cc: 681b ldr r3, [r3, #0]
800a5ce: 61fb str r3, [r7, #28]
while (*cur_seg &&
800a5d0: 69fb ldr r3, [r7, #28]
800a5d2: 681b ldr r3, [r3, #0]
800a5d4: 2b00 cmp r3, #0
800a5d6: d011 beq.n 800a5fc <tcp_output+0x35c>
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
800a5d8: 69fb ldr r3, [r7, #28]
800a5da: 681b ldr r3, [r3, #0]
800a5dc: 68db ldr r3, [r3, #12]
800a5de: 685b ldr r3, [r3, #4]
800a5e0: 4618 mov r0, r3
800a5e2: f7f9 fe84 bl 80042ee <lwip_htonl>
800a5e6: 4604 mov r4, r0
800a5e8: 6a7b ldr r3, [r7, #36] ; 0x24
800a5ea: 68db ldr r3, [r3, #12]
800a5ec: 685b ldr r3, [r3, #4]
800a5ee: 4618 mov r0, r3
800a5f0: f7f9 fe7d bl 80042ee <lwip_htonl>
800a5f4: 4603 mov r3, r0
800a5f6: 1ae3 subs r3, r4, r3
while (*cur_seg &&
800a5f8: 2b00 cmp r3, #0
800a5fa: dbe6 blt.n 800a5ca <tcp_output+0x32a>
}
seg->next = (*cur_seg);
800a5fc: 69fb ldr r3, [r7, #28]
800a5fe: 681a ldr r2, [r3, #0]
800a600: 6a7b ldr r3, [r7, #36] ; 0x24
800a602: 601a str r2, [r3, #0]
(*cur_seg) = seg;
800a604: 69fb ldr r3, [r7, #28]
800a606: 6a7a ldr r2, [r7, #36] ; 0x24
800a608: 601a str r2, [r3, #0]
800a60a: e009 b.n 800a620 <tcp_output+0x380>
} else {
/* add segment to tail of unacked list */
useg->next = seg;
800a60c: 6a3b ldr r3, [r7, #32]
800a60e: 6a7a ldr r2, [r7, #36] ; 0x24
800a610: 601a str r2, [r3, #0]
useg = useg->next;
800a612: 6a3b ldr r3, [r7, #32]
800a614: 681b ldr r3, [r3, #0]
800a616: 623b str r3, [r7, #32]
800a618: e002 b.n 800a620 <tcp_output+0x380>
}
}
/* do not queue empty segments on the unacked list */
} else {
tcp_seg_free(seg);
800a61a: 6a78 ldr r0, [r7, #36] ; 0x24
800a61c: f7fc fc3f bl 8006e9e <tcp_seg_free>
}
seg = pcb->unsent;
800a620: 687b ldr r3, [r7, #4]
800a622: 6edb ldr r3, [r3, #108] ; 0x6c
800a624: 627b str r3, [r7, #36] ; 0x24
while (seg != NULL &&
800a626: 6a7b ldr r3, [r7, #36] ; 0x24
800a628: 2b00 cmp r3, #0
800a62a: d012 beq.n 800a652 <tcp_output+0x3b2>
lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) {
800a62c: 6a7b ldr r3, [r7, #36] ; 0x24
800a62e: 68db ldr r3, [r3, #12]
800a630: 685b ldr r3, [r3, #4]
800a632: 4618 mov r0, r3
800a634: f7f9 fe5b bl 80042ee <lwip_htonl>
800a638: 4602 mov r2, r0
800a63a: 687b ldr r3, [r7, #4]
800a63c: 6c5b ldr r3, [r3, #68] ; 0x44
800a63e: 1ad3 subs r3, r2, r3
800a640: 6a7a ldr r2, [r7, #36] ; 0x24
800a642: 8912 ldrh r2, [r2, #8]
800a644: 4413 add r3, r2
while (seg != NULL &&
800a646: 69ba ldr r2, [r7, #24]
800a648: 429a cmp r2, r3
800a64a: f4bf aed9 bcs.w 800a400 <tcp_output+0x160>
800a64e: e000 b.n 800a652 <tcp_output+0x3b2>
break;
800a650: bf00 nop
}
#if TCP_OVERSIZE
if (pcb->unsent == NULL) {
800a652: 687b ldr r3, [r7, #4]
800a654: 6edb ldr r3, [r3, #108] ; 0x6c
800a656: 2b00 cmp r3, #0
800a658: d108 bne.n 800a66c <tcp_output+0x3cc>
/* last unsent has been removed, reset unsent_oversize */
pcb->unsent_oversize = 0;
800a65a: 687b ldr r3, [r7, #4]
800a65c: 2200 movs r2, #0
800a65e: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
800a662: e004 b.n 800a66e <tcp_output+0x3ce>
goto output_done;
800a664: bf00 nop
800a666: e002 b.n 800a66e <tcp_output+0x3ce>
goto output_done;
800a668: bf00 nop
800a66a: e000 b.n 800a66e <tcp_output+0x3ce>
}
#endif /* TCP_OVERSIZE */
output_done:
800a66c: bf00 nop
tcp_clear_flags(pcb, TF_NAGLEMEMERR);
800a66e: 687b ldr r3, [r7, #4]
800a670: 8b5b ldrh r3, [r3, #26]
800a672: f023 0380 bic.w r3, r3, #128 ; 0x80
800a676: b29a uxth r2, r3
800a678: 687b ldr r3, [r7, #4]
800a67a: 835a strh r2, [r3, #26]
return ERR_OK;
800a67c: 2300 movs r3, #0
}
800a67e: 4618 mov r0, r3
800a680: 3728 adds r7, #40 ; 0x28
800a682: 46bd mov sp, r7
800a684: bdb0 pop {r4, r5, r7, pc}
800a686: bf00 nop
0800a688 <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)
{
800a688: b580 push {r7, lr}
800a68a: b082 sub sp, #8
800a68c: af00 add r7, sp, #0
800a68e: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_output_segment_busy: invalid seg", seg != NULL);
800a690: 687b ldr r3, [r7, #4]
800a692: 2b00 cmp r3, #0
800a694: d106 bne.n 800a6a4 <tcp_output_segment_busy+0x1c>
800a696: 4b09 ldr r3, [pc, #36] ; (800a6bc <tcp_output_segment_busy+0x34>)
800a698: f240 529a movw r2, #1434 ; 0x59a
800a69c: 4908 ldr r1, [pc, #32] ; (800a6c0 <tcp_output_segment_busy+0x38>)
800a69e: 4809 ldr r0, [pc, #36] ; (800a6c4 <tcp_output_segment_busy+0x3c>)
800a6a0: f005 fe96 bl 80103d0 <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) {
800a6a4: 687b ldr r3, [r7, #4]
800a6a6: 685b ldr r3, [r3, #4]
800a6a8: 7b9b ldrb r3, [r3, #14]
800a6aa: 2b01 cmp r3, #1
800a6ac: d001 beq.n 800a6b2 <tcp_output_segment_busy+0x2a>
/* other reference found */
return 1;
800a6ae: 2301 movs r3, #1
800a6b0: e000 b.n 800a6b4 <tcp_output_segment_busy+0x2c>
}
/* no other references found */
return 0;
800a6b2: 2300 movs r3, #0
}
800a6b4: 4618 mov r0, r3
800a6b6: 3708 adds r7, #8
800a6b8: 46bd mov sp, r7
800a6ba: bd80 pop {r7, pc}
800a6bc: 080165a4 .word 0x080165a4
800a6c0: 08016b40 .word 0x08016b40
800a6c4: 080165f8 .word 0x080165f8
0800a6c8 <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)
{
800a6c8: b5b0 push {r4, r5, r7, lr}
800a6ca: b08c sub sp, #48 ; 0x30
800a6cc: af04 add r7, sp, #16
800a6ce: 60f8 str r0, [r7, #12]
800a6d0: 60b9 str r1, [r7, #8]
800a6d2: 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);
800a6d4: 68fb ldr r3, [r7, #12]
800a6d6: 2b00 cmp r3, #0
800a6d8: d106 bne.n 800a6e8 <tcp_output_segment+0x20>
800a6da: 4b63 ldr r3, [pc, #396] ; (800a868 <tcp_output_segment+0x1a0>)
800a6dc: f44f 62b7 mov.w r2, #1464 ; 0x5b8
800a6e0: 4962 ldr r1, [pc, #392] ; (800a86c <tcp_output_segment+0x1a4>)
800a6e2: 4863 ldr r0, [pc, #396] ; (800a870 <tcp_output_segment+0x1a8>)
800a6e4: f005 fe74 bl 80103d0 <printf>
LWIP_ASSERT("tcp_output_segment: invalid pcb", pcb != NULL);
800a6e8: 68bb ldr r3, [r7, #8]
800a6ea: 2b00 cmp r3, #0
800a6ec: d106 bne.n 800a6fc <tcp_output_segment+0x34>
800a6ee: 4b5e ldr r3, [pc, #376] ; (800a868 <tcp_output_segment+0x1a0>)
800a6f0: f240 52b9 movw r2, #1465 ; 0x5b9
800a6f4: 495f ldr r1, [pc, #380] ; (800a874 <tcp_output_segment+0x1ac>)
800a6f6: 485e ldr r0, [pc, #376] ; (800a870 <tcp_output_segment+0x1a8>)
800a6f8: f005 fe6a bl 80103d0 <printf>
LWIP_ASSERT("tcp_output_segment: invalid netif", netif != NULL);
800a6fc: 687b ldr r3, [r7, #4]
800a6fe: 2b00 cmp r3, #0
800a700: d106 bne.n 800a710 <tcp_output_segment+0x48>
800a702: 4b59 ldr r3, [pc, #356] ; (800a868 <tcp_output_segment+0x1a0>)
800a704: f240 52ba movw r2, #1466 ; 0x5ba
800a708: 495b ldr r1, [pc, #364] ; (800a878 <tcp_output_segment+0x1b0>)
800a70a: 4859 ldr r0, [pc, #356] ; (800a870 <tcp_output_segment+0x1a8>)
800a70c: f005 fe60 bl 80103d0 <printf>
if (tcp_output_segment_busy(seg)) {
800a710: 68f8 ldr r0, [r7, #12]
800a712: f7ff ffb9 bl 800a688 <tcp_output_segment_busy>
800a716: 4603 mov r3, r0
800a718: 2b00 cmp r3, #0
800a71a: d001 beq.n 800a720 <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;
800a71c: 2300 movs r3, #0
800a71e: e09f b.n 800a860 <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);
800a720: 68bb ldr r3, [r7, #8]
800a722: 6a5a ldr r2, [r3, #36] ; 0x24
800a724: 68fb ldr r3, [r7, #12]
800a726: 68dc ldr r4, [r3, #12]
800a728: 4610 mov r0, r2
800a72a: f7f9 fde0 bl 80042ee <lwip_htonl>
800a72e: 4603 mov r3, r0
800a730: 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)));
800a732: 68bb ldr r3, [r7, #8]
800a734: 8d5a ldrh r2, [r3, #42] ; 0x2a
800a736: 68fb ldr r3, [r7, #12]
800a738: 68dc ldr r4, [r3, #12]
800a73a: 4610 mov r0, r2
800a73c: f7f9 fdc2 bl 80042c4 <lwip_htons>
800a740: 4603 mov r3, r0
800a742: 81e3 strh r3, [r4, #14]
}
pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd;
800a744: 68bb ldr r3, [r7, #8]
800a746: 6a5b ldr r3, [r3, #36] ; 0x24
800a748: 68ba ldr r2, [r7, #8]
800a74a: 8d52 ldrh r2, [r2, #42] ; 0x2a
800a74c: 441a add r2, r3
800a74e: 68bb ldr r3, [r7, #8]
800a750: 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);
800a752: 68fb ldr r3, [r7, #12]
800a754: 68db ldr r3, [r3, #12]
800a756: 3314 adds r3, #20
800a758: 61fb str r3, [r7, #28]
if (seg->flags & TF_SEG_OPTS_MSS) {
800a75a: 68fb ldr r3, [r7, #12]
800a75c: 7a9b ldrb r3, [r3, #10]
800a75e: f003 0301 and.w r3, r3, #1
800a762: 2b00 cmp r3, #0
800a764: d015 beq.n 800a792 <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);
800a766: 68bb ldr r3, [r7, #8]
800a768: 3304 adds r3, #4
800a76a: 461a mov r2, r3
800a76c: 6879 ldr r1, [r7, #4]
800a76e: f44f 7006 mov.w r0, #536 ; 0x218
800a772: f7fc fe8b bl 800748c <tcp_eff_send_mss_netif>
800a776: 4603 mov r3, r0
800a778: 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);
800a77a: 8b7b ldrh r3, [r7, #26]
800a77c: f043 7301 orr.w r3, r3, #33816576 ; 0x2040000
800a780: 4618 mov r0, r3
800a782: f7f9 fdb4 bl 80042ee <lwip_htonl>
800a786: 4602 mov r2, r0
800a788: 69fb ldr r3, [r7, #28]
800a78a: 601a str r2, [r3, #0]
opts += 1;
800a78c: 69fb ldr r3, [r7, #28]
800a78e: 3304 adds r3, #4
800a790: 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) {
800a792: 68bb ldr r3, [r7, #8]
800a794: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
800a798: 2b00 cmp r3, #0
800a79a: da02 bge.n 800a7a2 <tcp_output_segment+0xda>
pcb->rtime = 0;
800a79c: 68bb ldr r3, [r7, #8]
800a79e: 2200 movs r2, #0
800a7a0: 861a strh r2, [r3, #48] ; 0x30
}
if (pcb->rttest == 0) {
800a7a2: 68bb ldr r3, [r7, #8]
800a7a4: 6b5b ldr r3, [r3, #52] ; 0x34
800a7a6: 2b00 cmp r3, #0
800a7a8: d10c bne.n 800a7c4 <tcp_output_segment+0xfc>
pcb->rttest = tcp_ticks;
800a7aa: 4b34 ldr r3, [pc, #208] ; (800a87c <tcp_output_segment+0x1b4>)
800a7ac: 681a ldr r2, [r3, #0]
800a7ae: 68bb ldr r3, [r7, #8]
800a7b0: 635a str r2, [r3, #52] ; 0x34
pcb->rtseq = lwip_ntohl(seg->tcphdr->seqno);
800a7b2: 68fb ldr r3, [r7, #12]
800a7b4: 68db ldr r3, [r3, #12]
800a7b6: 685b ldr r3, [r3, #4]
800a7b8: 4618 mov r0, r3
800a7ba: f7f9 fd98 bl 80042ee <lwip_htonl>
800a7be: 4602 mov r2, r0
800a7c0: 68bb ldr r3, [r7, #8]
800a7c2: 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);
800a7c4: 68fb ldr r3, [r7, #12]
800a7c6: 68da ldr r2, [r3, #12]
800a7c8: 68fb ldr r3, [r7, #12]
800a7ca: 685b ldr r3, [r3, #4]
800a7cc: 685b ldr r3, [r3, #4]
800a7ce: 1ad3 subs r3, r2, r3
800a7d0: 833b strh r3, [r7, #24]
if (len == 0) {
/** Exclude retransmitted segments from this count. */
MIB2_STATS_INC(mib2.tcpoutsegs);
}
seg->p->len -= len;
800a7d2: 68fb ldr r3, [r7, #12]
800a7d4: 685b ldr r3, [r3, #4]
800a7d6: 8959 ldrh r1, [r3, #10]
800a7d8: 68fb ldr r3, [r7, #12]
800a7da: 685b ldr r3, [r3, #4]
800a7dc: 8b3a ldrh r2, [r7, #24]
800a7de: 1a8a subs r2, r1, r2
800a7e0: b292 uxth r2, r2
800a7e2: 815a strh r2, [r3, #10]
seg->p->tot_len -= len;
800a7e4: 68fb ldr r3, [r7, #12]
800a7e6: 685b ldr r3, [r3, #4]
800a7e8: 8919 ldrh r1, [r3, #8]
800a7ea: 68fb ldr r3, [r7, #12]
800a7ec: 685b ldr r3, [r3, #4]
800a7ee: 8b3a ldrh r2, [r7, #24]
800a7f0: 1a8a subs r2, r1, r2
800a7f2: b292 uxth r2, r2
800a7f4: 811a strh r2, [r3, #8]
seg->p->payload = seg->tcphdr;
800a7f6: 68fb ldr r3, [r7, #12]
800a7f8: 685b ldr r3, [r3, #4]
800a7fa: 68fa ldr r2, [r7, #12]
800a7fc: 68d2 ldr r2, [r2, #12]
800a7fe: 605a str r2, [r3, #4]
seg->tcphdr->chksum = 0;
800a800: 68fb ldr r3, [r7, #12]
800a802: 68db ldr r3, [r3, #12]
800a804: 2200 movs r2, #0
800a806: 741a strb r2, [r3, #16]
800a808: 2200 movs r2, #0
800a80a: 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));
800a80c: 68fb ldr r3, [r7, #12]
800a80e: 68db ldr r3, [r3, #12]
800a810: f103 0214 add.w r2, r3, #20
800a814: 68fb ldr r3, [r7, #12]
800a816: 7a9b ldrb r3, [r3, #10]
800a818: 009b lsls r3, r3, #2
800a81a: f003 0304 and.w r3, r3, #4
800a81e: 4413 add r3, r2
800a820: 69fa ldr r2, [r7, #28]
800a822: 429a cmp r2, r3
800a824: d006 beq.n 800a834 <tcp_output_segment+0x16c>
800a826: 4b10 ldr r3, [pc, #64] ; (800a868 <tcp_output_segment+0x1a0>)
800a828: f240 621c movw r2, #1564 ; 0x61c
800a82c: 4914 ldr r1, [pc, #80] ; (800a880 <tcp_output_segment+0x1b8>)
800a82e: 4810 ldr r0, [pc, #64] ; (800a870 <tcp_output_segment+0x1a8>)
800a830: f005 fdce bl 80103d0 <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,
800a834: 68fb ldr r3, [r7, #12]
800a836: 6858 ldr r0, [r3, #4]
800a838: 68b9 ldr r1, [r7, #8]
800a83a: 68bb ldr r3, [r7, #8]
800a83c: 1d1c adds r4, r3, #4
800a83e: 68bb ldr r3, [r7, #8]
800a840: 7add ldrb r5, [r3, #11]
800a842: 68bb ldr r3, [r7, #8]
800a844: 7a9b ldrb r3, [r3, #10]
800a846: 687a ldr r2, [r7, #4]
800a848: 9202 str r2, [sp, #8]
800a84a: 2206 movs r2, #6
800a84c: 9201 str r2, [sp, #4]
800a84e: 9300 str r3, [sp, #0]
800a850: 462b mov r3, r5
800a852: 4622 mov r2, r4
800a854: f004 fbec bl 800f030 <ip4_output_if>
800a858: 4603 mov r3, r0
800a85a: 75fb strb r3, [r7, #23]
seg->chksum = SWAP_BYTES_IN_WORD(seg->chksum);
seg->chksum_swapped = 1;
}
#endif
return err;
800a85c: f997 3017 ldrsb.w r3, [r7, #23]
}
800a860: 4618 mov r0, r3
800a862: 3720 adds r7, #32
800a864: 46bd mov sp, r7
800a866: bdb0 pop {r4, r5, r7, pc}
800a868: 080165a4 .word 0x080165a4
800a86c: 08016b68 .word 0x08016b68
800a870: 080165f8 .word 0x080165f8
800a874: 08016b88 .word 0x08016b88
800a878: 08016ba8 .word 0x08016ba8
800a87c: 20008c00 .word 0x20008c00
800a880: 08016bcc .word 0x08016bcc
0800a884 <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)
{
800a884: b5b0 push {r4, r5, r7, lr}
800a886: b084 sub sp, #16
800a888: af00 add r7, sp, #0
800a88a: 6078 str r0, [r7, #4]
struct tcp_seg *seg;
LWIP_ASSERT("tcp_rexmit_rto_prepare: invalid pcb", pcb != NULL);
800a88c: 687b ldr r3, [r7, #4]
800a88e: 2b00 cmp r3, #0
800a890: d106 bne.n 800a8a0 <tcp_rexmit_rto_prepare+0x1c>
800a892: 4b31 ldr r3, [pc, #196] ; (800a958 <tcp_rexmit_rto_prepare+0xd4>)
800a894: f240 6263 movw r2, #1635 ; 0x663
800a898: 4930 ldr r1, [pc, #192] ; (800a95c <tcp_rexmit_rto_prepare+0xd8>)
800a89a: 4831 ldr r0, [pc, #196] ; (800a960 <tcp_rexmit_rto_prepare+0xdc>)
800a89c: f005 fd98 bl 80103d0 <printf>
if (pcb->unacked == NULL) {
800a8a0: 687b ldr r3, [r7, #4]
800a8a2: 6f1b ldr r3, [r3, #112] ; 0x70
800a8a4: 2b00 cmp r3, #0
800a8a6: d102 bne.n 800a8ae <tcp_rexmit_rto_prepare+0x2a>
return ERR_VAL;
800a8a8: f06f 0305 mvn.w r3, #5
800a8ac: e050 b.n 800a950 <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) {
800a8ae: 687b ldr r3, [r7, #4]
800a8b0: 6f1b ldr r3, [r3, #112] ; 0x70
800a8b2: 60fb str r3, [r7, #12]
800a8b4: e00b b.n 800a8ce <tcp_rexmit_rto_prepare+0x4a>
if (tcp_output_segment_busy(seg)) {
800a8b6: 68f8 ldr r0, [r7, #12]
800a8b8: f7ff fee6 bl 800a688 <tcp_output_segment_busy>
800a8bc: 4603 mov r3, r0
800a8be: 2b00 cmp r3, #0
800a8c0: d002 beq.n 800a8c8 <tcp_rexmit_rto_prepare+0x44>
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n"));
return ERR_VAL;
800a8c2: f06f 0305 mvn.w r3, #5
800a8c6: e043 b.n 800a950 <tcp_rexmit_rto_prepare+0xcc>
for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) {
800a8c8: 68fb ldr r3, [r7, #12]
800a8ca: 681b ldr r3, [r3, #0]
800a8cc: 60fb str r3, [r7, #12]
800a8ce: 68fb ldr r3, [r7, #12]
800a8d0: 681b ldr r3, [r3, #0]
800a8d2: 2b00 cmp r3, #0
800a8d4: d1ef bne.n 800a8b6 <tcp_rexmit_rto_prepare+0x32>
}
}
if (tcp_output_segment_busy(seg)) {
800a8d6: 68f8 ldr r0, [r7, #12]
800a8d8: f7ff fed6 bl 800a688 <tcp_output_segment_busy>
800a8dc: 4603 mov r3, r0
800a8de: 2b00 cmp r3, #0
800a8e0: d002 beq.n 800a8e8 <tcp_rexmit_rto_prepare+0x64>
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n"));
return ERR_VAL;
800a8e2: f06f 0305 mvn.w r3, #5
800a8e6: e033 b.n 800a950 <tcp_rexmit_rto_prepare+0xcc>
}
/* concatenate unsent queue after unacked queue */
seg->next = pcb->unsent;
800a8e8: 687b ldr r3, [r7, #4]
800a8ea: 6eda ldr r2, [r3, #108] ; 0x6c
800a8ec: 68fb ldr r3, [r7, #12]
800a8ee: 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;
800a8f0: 687b ldr r3, [r7, #4]
800a8f2: 6f1a ldr r2, [r3, #112] ; 0x70
800a8f4: 687b ldr r3, [r7, #4]
800a8f6: 66da str r2, [r3, #108] ; 0x6c
/* unacked queue is now empty */
pcb->unacked = NULL;
800a8f8: 687b ldr r3, [r7, #4]
800a8fa: 2200 movs r2, #0
800a8fc: 671a str r2, [r3, #112] ; 0x70
/* Mark RTO in-progress */
tcp_set_flags(pcb, TF_RTO);
800a8fe: 687b ldr r3, [r7, #4]
800a900: 8b5b ldrh r3, [r3, #26]
800a902: f443 6300 orr.w r3, r3, #2048 ; 0x800
800a906: b29a uxth r2, r3
800a908: 687b ldr r3, [r7, #4]
800a90a: 835a strh r2, [r3, #26]
/* Record the next byte following retransmit */
pcb->rto_end = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
800a90c: 68fb ldr r3, [r7, #12]
800a90e: 68db ldr r3, [r3, #12]
800a910: 685b ldr r3, [r3, #4]
800a912: 4618 mov r0, r3
800a914: f7f9 fceb bl 80042ee <lwip_htonl>
800a918: 4604 mov r4, r0
800a91a: 68fb ldr r3, [r7, #12]
800a91c: 891b ldrh r3, [r3, #8]
800a91e: 461d mov r5, r3
800a920: 68fb ldr r3, [r7, #12]
800a922: 68db ldr r3, [r3, #12]
800a924: 899b ldrh r3, [r3, #12]
800a926: b29b uxth r3, r3
800a928: 4618 mov r0, r3
800a92a: f7f9 fccb bl 80042c4 <lwip_htons>
800a92e: 4603 mov r3, r0
800a930: b2db uxtb r3, r3
800a932: f003 0303 and.w r3, r3, #3
800a936: 2b00 cmp r3, #0
800a938: d001 beq.n 800a93e <tcp_rexmit_rto_prepare+0xba>
800a93a: 2301 movs r3, #1
800a93c: e000 b.n 800a940 <tcp_rexmit_rto_prepare+0xbc>
800a93e: 2300 movs r3, #0
800a940: 442b add r3, r5
800a942: 18e2 adds r2, r4, r3
800a944: 687b ldr r3, [r7, #4]
800a946: 64da str r2, [r3, #76] ; 0x4c
/* Don't take any RTT measurements after retransmitting. */
pcb->rttest = 0;
800a948: 687b ldr r3, [r7, #4]
800a94a: 2200 movs r2, #0
800a94c: 635a str r2, [r3, #52] ; 0x34
return ERR_OK;
800a94e: 2300 movs r3, #0
}
800a950: 4618 mov r0, r3
800a952: 3710 adds r7, #16
800a954: 46bd mov sp, r7
800a956: bdb0 pop {r4, r5, r7, pc}
800a958: 080165a4 .word 0x080165a4
800a95c: 08016be0 .word 0x08016be0
800a960: 080165f8 .word 0x080165f8
0800a964 <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)
{
800a964: b580 push {r7, lr}
800a966: b082 sub sp, #8
800a968: af00 add r7, sp, #0
800a96a: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_rexmit_rto_commit: invalid pcb", pcb != NULL);
800a96c: 687b ldr r3, [r7, #4]
800a96e: 2b00 cmp r3, #0
800a970: d106 bne.n 800a980 <tcp_rexmit_rto_commit+0x1c>
800a972: 4b0d ldr r3, [pc, #52] ; (800a9a8 <tcp_rexmit_rto_commit+0x44>)
800a974: f44f 62d3 mov.w r2, #1688 ; 0x698
800a978: 490c ldr r1, [pc, #48] ; (800a9ac <tcp_rexmit_rto_commit+0x48>)
800a97a: 480d ldr r0, [pc, #52] ; (800a9b0 <tcp_rexmit_rto_commit+0x4c>)
800a97c: f005 fd28 bl 80103d0 <printf>
/* increment number of retransmissions */
if (pcb->nrtx < 0xFF) {
800a980: 687b ldr r3, [r7, #4]
800a982: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
800a986: 2bff cmp r3, #255 ; 0xff
800a988: d007 beq.n 800a99a <tcp_rexmit_rto_commit+0x36>
++pcb->nrtx;
800a98a: 687b ldr r3, [r7, #4]
800a98c: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
800a990: 3301 adds r3, #1
800a992: b2da uxtb r2, r3
800a994: 687b ldr r3, [r7, #4]
800a996: f883 2042 strb.w r2, [r3, #66] ; 0x42
}
/* Do the actual retransmission */
tcp_output(pcb);
800a99a: 6878 ldr r0, [r7, #4]
800a99c: f7ff fc80 bl 800a2a0 <tcp_output>
}
800a9a0: bf00 nop
800a9a2: 3708 adds r7, #8
800a9a4: 46bd mov sp, r7
800a9a6: bd80 pop {r7, pc}
800a9a8: 080165a4 .word 0x080165a4
800a9ac: 08016c04 .word 0x08016c04
800a9b0: 080165f8 .word 0x080165f8
0800a9b4 <tcp_rexmit_rto>:
*
* @param pcb the tcp_pcb for which to re-enqueue all unacked segments
*/
void
tcp_rexmit_rto(struct tcp_pcb *pcb)
{
800a9b4: b580 push {r7, lr}
800a9b6: b082 sub sp, #8
800a9b8: af00 add r7, sp, #0
800a9ba: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_rexmit_rto: invalid pcb", pcb != NULL);
800a9bc: 687b ldr r3, [r7, #4]
800a9be: 2b00 cmp r3, #0
800a9c0: d106 bne.n 800a9d0 <tcp_rexmit_rto+0x1c>
800a9c2: 4b0a ldr r3, [pc, #40] ; (800a9ec <tcp_rexmit_rto+0x38>)
800a9c4: f240 62ad movw r2, #1709 ; 0x6ad
800a9c8: 4909 ldr r1, [pc, #36] ; (800a9f0 <tcp_rexmit_rto+0x3c>)
800a9ca: 480a ldr r0, [pc, #40] ; (800a9f4 <tcp_rexmit_rto+0x40>)
800a9cc: f005 fd00 bl 80103d0 <printf>
if (tcp_rexmit_rto_prepare(pcb) == ERR_OK) {
800a9d0: 6878 ldr r0, [r7, #4]
800a9d2: f7ff ff57 bl 800a884 <tcp_rexmit_rto_prepare>
800a9d6: 4603 mov r3, r0
800a9d8: 2b00 cmp r3, #0
800a9da: d102 bne.n 800a9e2 <tcp_rexmit_rto+0x2e>
tcp_rexmit_rto_commit(pcb);
800a9dc: 6878 ldr r0, [r7, #4]
800a9de: f7ff ffc1 bl 800a964 <tcp_rexmit_rto_commit>
}
}
800a9e2: bf00 nop
800a9e4: 3708 adds r7, #8
800a9e6: 46bd mov sp, r7
800a9e8: bd80 pop {r7, pc}
800a9ea: bf00 nop
800a9ec: 080165a4 .word 0x080165a4
800a9f0: 08016c28 .word 0x08016c28
800a9f4: 080165f8 .word 0x080165f8
0800a9f8 <tcp_rexmit>:
*
* @param pcb the tcp_pcb for which to retransmit the first unacked segment
*/
err_t
tcp_rexmit(struct tcp_pcb *pcb)
{
800a9f8: b590 push {r4, r7, lr}
800a9fa: b085 sub sp, #20
800a9fc: af00 add r7, sp, #0
800a9fe: 6078 str r0, [r7, #4]
struct tcp_seg *seg;
struct tcp_seg **cur_seg;
LWIP_ASSERT("tcp_rexmit: invalid pcb", pcb != NULL);
800aa00: 687b ldr r3, [r7, #4]
800aa02: 2b00 cmp r3, #0
800aa04: d106 bne.n 800aa14 <tcp_rexmit+0x1c>
800aa06: 4b2f ldr r3, [pc, #188] ; (800aac4 <tcp_rexmit+0xcc>)
800aa08: f240 62c1 movw r2, #1729 ; 0x6c1
800aa0c: 492e ldr r1, [pc, #184] ; (800aac8 <tcp_rexmit+0xd0>)
800aa0e: 482f ldr r0, [pc, #188] ; (800aacc <tcp_rexmit+0xd4>)
800aa10: f005 fcde bl 80103d0 <printf>
if (pcb->unacked == NULL) {
800aa14: 687b ldr r3, [r7, #4]
800aa16: 6f1b ldr r3, [r3, #112] ; 0x70
800aa18: 2b00 cmp r3, #0
800aa1a: d102 bne.n 800aa22 <tcp_rexmit+0x2a>
return ERR_VAL;
800aa1c: f06f 0305 mvn.w r3, #5
800aa20: e04c b.n 800aabc <tcp_rexmit+0xc4>
}
seg = pcb->unacked;
800aa22: 687b ldr r3, [r7, #4]
800aa24: 6f1b ldr r3, [r3, #112] ; 0x70
800aa26: 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)) {
800aa28: 68b8 ldr r0, [r7, #8]
800aa2a: f7ff fe2d bl 800a688 <tcp_output_segment_busy>
800aa2e: 4603 mov r3, r0
800aa30: 2b00 cmp r3, #0
800aa32: d002 beq.n 800aa3a <tcp_rexmit+0x42>
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit busy\n"));
return ERR_VAL;
800aa34: f06f 0305 mvn.w r3, #5
800aa38: e040 b.n 800aabc <tcp_rexmit+0xc4>
}
/* Move the first unacked segment to the unsent queue */
/* Keep the unsent queue sorted. */
pcb->unacked = seg->next;
800aa3a: 68bb ldr r3, [r7, #8]
800aa3c: 681a ldr r2, [r3, #0]
800aa3e: 687b ldr r3, [r7, #4]
800aa40: 671a str r2, [r3, #112] ; 0x70
cur_seg = &(pcb->unsent);
800aa42: 687b ldr r3, [r7, #4]
800aa44: 336c adds r3, #108 ; 0x6c
800aa46: 60fb str r3, [r7, #12]
while (*cur_seg &&
800aa48: e002 b.n 800aa50 <tcp_rexmit+0x58>
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
cur_seg = &((*cur_seg)->next );
800aa4a: 68fb ldr r3, [r7, #12]
800aa4c: 681b ldr r3, [r3, #0]
800aa4e: 60fb str r3, [r7, #12]
while (*cur_seg &&
800aa50: 68fb ldr r3, [r7, #12]
800aa52: 681b ldr r3, [r3, #0]
800aa54: 2b00 cmp r3, #0
800aa56: d011 beq.n 800aa7c <tcp_rexmit+0x84>
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
800aa58: 68fb ldr r3, [r7, #12]
800aa5a: 681b ldr r3, [r3, #0]
800aa5c: 68db ldr r3, [r3, #12]
800aa5e: 685b ldr r3, [r3, #4]
800aa60: 4618 mov r0, r3
800aa62: f7f9 fc44 bl 80042ee <lwip_htonl>
800aa66: 4604 mov r4, r0
800aa68: 68bb ldr r3, [r7, #8]
800aa6a: 68db ldr r3, [r3, #12]
800aa6c: 685b ldr r3, [r3, #4]
800aa6e: 4618 mov r0, r3
800aa70: f7f9 fc3d bl 80042ee <lwip_htonl>
800aa74: 4603 mov r3, r0
800aa76: 1ae3 subs r3, r4, r3
while (*cur_seg &&
800aa78: 2b00 cmp r3, #0
800aa7a: dbe6 blt.n 800aa4a <tcp_rexmit+0x52>
}
seg->next = *cur_seg;
800aa7c: 68fb ldr r3, [r7, #12]
800aa7e: 681a ldr r2, [r3, #0]
800aa80: 68bb ldr r3, [r7, #8]
800aa82: 601a str r2, [r3, #0]
*cur_seg = seg;
800aa84: 68fb ldr r3, [r7, #12]
800aa86: 68ba ldr r2, [r7, #8]
800aa88: 601a str r2, [r3, #0]
#if TCP_OVERSIZE
if (seg->next == NULL) {
800aa8a: 68bb ldr r3, [r7, #8]
800aa8c: 681b ldr r3, [r3, #0]
800aa8e: 2b00 cmp r3, #0
800aa90: d103 bne.n 800aa9a <tcp_rexmit+0xa2>
/* the retransmitted segment is last in unsent, so reset unsent_oversize */
pcb->unsent_oversize = 0;
800aa92: 687b ldr r3, [r7, #4]
800aa94: 2200 movs r2, #0
800aa96: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
}
#endif /* TCP_OVERSIZE */
if (pcb->nrtx < 0xFF) {
800aa9a: 687b ldr r3, [r7, #4]
800aa9c: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
800aaa0: 2bff cmp r3, #255 ; 0xff
800aaa2: d007 beq.n 800aab4 <tcp_rexmit+0xbc>
++pcb->nrtx;
800aaa4: 687b ldr r3, [r7, #4]
800aaa6: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
800aaaa: 3301 adds r3, #1
800aaac: b2da uxtb r2, r3
800aaae: 687b ldr r3, [r7, #4]
800aab0: f883 2042 strb.w r2, [r3, #66] ; 0x42
}
/* Don't take any rtt measurements after retransmitting. */
pcb->rttest = 0;
800aab4: 687b ldr r3, [r7, #4]
800aab6: 2200 movs r2, #0
800aab8: 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;
800aaba: 2300 movs r3, #0
}
800aabc: 4618 mov r0, r3
800aabe: 3714 adds r7, #20
800aac0: 46bd mov sp, r7
800aac2: bd90 pop {r4, r7, pc}
800aac4: 080165a4 .word 0x080165a4
800aac8: 08016c44 .word 0x08016c44
800aacc: 080165f8 .word 0x080165f8
0800aad0 <tcp_rexmit_fast>:
*
* @param pcb the tcp_pcb for which to retransmit the first unacked segment
*/
void
tcp_rexmit_fast(struct tcp_pcb *pcb)
{
800aad0: b580 push {r7, lr}
800aad2: b082 sub sp, #8
800aad4: af00 add r7, sp, #0
800aad6: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_rexmit_fast: invalid pcb", pcb != NULL);
800aad8: 687b ldr r3, [r7, #4]
800aada: 2b00 cmp r3, #0
800aadc: d106 bne.n 800aaec <tcp_rexmit_fast+0x1c>
800aade: 4b2a ldr r3, [pc, #168] ; (800ab88 <tcp_rexmit_fast+0xb8>)
800aae0: f240 62f9 movw r2, #1785 ; 0x6f9
800aae4: 4929 ldr r1, [pc, #164] ; (800ab8c <tcp_rexmit_fast+0xbc>)
800aae6: 482a ldr r0, [pc, #168] ; (800ab90 <tcp_rexmit_fast+0xc0>)
800aae8: f005 fc72 bl 80103d0 <printf>
if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) {
800aaec: 687b ldr r3, [r7, #4]
800aaee: 6f1b ldr r3, [r3, #112] ; 0x70
800aaf0: 2b00 cmp r3, #0
800aaf2: d044 beq.n 800ab7e <tcp_rexmit_fast+0xae>
800aaf4: 687b ldr r3, [r7, #4]
800aaf6: 8b5b ldrh r3, [r3, #26]
800aaf8: f003 0304 and.w r3, r3, #4
800aafc: 2b00 cmp r3, #0
800aafe: d13e bne.n 800ab7e <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) {
800ab00: 6878 ldr r0, [r7, #4]
800ab02: f7ff ff79 bl 800a9f8 <tcp_rexmit>
800ab06: 4603 mov r3, r0
800ab08: 2b00 cmp r3, #0
800ab0a: d138 bne.n 800ab7e <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;
800ab0c: 687b ldr r3, [r7, #4]
800ab0e: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
800ab12: 687b ldr r3, [r7, #4]
800ab14: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
800ab18: 4293 cmp r3, r2
800ab1a: bf28 it cs
800ab1c: 4613 movcs r3, r2
800ab1e: b29b uxth r3, r3
800ab20: 0fda lsrs r2, r3, #31
800ab22: 4413 add r3, r2
800ab24: 105b asrs r3, r3, #1
800ab26: b29a uxth r2, r3
800ab28: 687b ldr r3, [r7, #4]
800ab2a: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
/* The minimum value for ssthresh should be 2 MSS */
if (pcb->ssthresh < (2U * pcb->mss)) {
800ab2e: 687b ldr r3, [r7, #4]
800ab30: f8b3 304a ldrh.w r3, [r3, #74] ; 0x4a
800ab34: 461a mov r2, r3
800ab36: 687b ldr r3, [r7, #4]
800ab38: 8e5b ldrh r3, [r3, #50] ; 0x32
800ab3a: 005b lsls r3, r3, #1
800ab3c: 429a cmp r2, r3
800ab3e: d206 bcs.n 800ab4e <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;
800ab40: 687b ldr r3, [r7, #4]
800ab42: 8e5b ldrh r3, [r3, #50] ; 0x32
800ab44: 005b lsls r3, r3, #1
800ab46: b29a uxth r2, r3
800ab48: 687b ldr r3, [r7, #4]
800ab4a: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
}
pcb->cwnd = pcb->ssthresh + 3 * pcb->mss;
800ab4e: 687b ldr r3, [r7, #4]
800ab50: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a
800ab54: 687b ldr r3, [r7, #4]
800ab56: 8e5b ldrh r3, [r3, #50] ; 0x32
800ab58: 4619 mov r1, r3
800ab5a: 0049 lsls r1, r1, #1
800ab5c: 440b add r3, r1
800ab5e: b29b uxth r3, r3
800ab60: 4413 add r3, r2
800ab62: b29a uxth r2, r3
800ab64: 687b ldr r3, [r7, #4]
800ab66: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
tcp_set_flags(pcb, TF_INFR);
800ab6a: 687b ldr r3, [r7, #4]
800ab6c: 8b5b ldrh r3, [r3, #26]
800ab6e: f043 0304 orr.w r3, r3, #4
800ab72: b29a uxth r2, r3
800ab74: 687b ldr r3, [r7, #4]
800ab76: 835a strh r2, [r3, #26]
/* Reset the retransmission timer to prevent immediate rto retransmissions */
pcb->rtime = 0;
800ab78: 687b ldr r3, [r7, #4]
800ab7a: 2200 movs r2, #0
800ab7c: 861a strh r2, [r3, #48] ; 0x30
}
}
}
800ab7e: bf00 nop
800ab80: 3708 adds r7, #8
800ab82: 46bd mov sp, r7
800ab84: bd80 pop {r7, pc}
800ab86: bf00 nop
800ab88: 080165a4 .word 0x080165a4
800ab8c: 08016c5c .word 0x08016c5c
800ab90: 080165f8 .word 0x080165f8
0800ab94 <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)
{
800ab94: b580 push {r7, lr}
800ab96: b086 sub sp, #24
800ab98: af00 add r7, sp, #0
800ab9a: 60f8 str r0, [r7, #12]
800ab9c: 607b str r3, [r7, #4]
800ab9e: 460b mov r3, r1
800aba0: 817b strh r3, [r7, #10]
800aba2: 4613 mov r3, r2
800aba4: 813b strh r3, [r7, #8]
struct tcp_hdr *tcphdr;
struct pbuf *p;
p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM);
800aba6: 897a ldrh r2, [r7, #10]
800aba8: 893b ldrh r3, [r7, #8]
800abaa: 4413 add r3, r2
800abac: b29b uxth r3, r3
800abae: 3314 adds r3, #20
800abb0: b29b uxth r3, r3
800abb2: f44f 7220 mov.w r2, #640 ; 0x280
800abb6: 4619 mov r1, r3
800abb8: 2022 movs r0, #34 ; 0x22
800abba: f7fa fc09 bl 80053d0 <pbuf_alloc>
800abbe: 6178 str r0, [r7, #20]
if (p != NULL) {
800abc0: 697b ldr r3, [r7, #20]
800abc2: 2b00 cmp r3, #0
800abc4: d04d beq.n 800ac62 <tcp_output_alloc_header_common+0xce>
LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr",
800abc6: 897b ldrh r3, [r7, #10]
800abc8: 3313 adds r3, #19
800abca: 697a ldr r2, [r7, #20]
800abcc: 8952 ldrh r2, [r2, #10]
800abce: 4293 cmp r3, r2
800abd0: db06 blt.n 800abe0 <tcp_output_alloc_header_common+0x4c>
800abd2: 4b26 ldr r3, [pc, #152] ; (800ac6c <tcp_output_alloc_header_common+0xd8>)
800abd4: f240 7223 movw r2, #1827 ; 0x723
800abd8: 4925 ldr r1, [pc, #148] ; (800ac70 <tcp_output_alloc_header_common+0xdc>)
800abda: 4826 ldr r0, [pc, #152] ; (800ac74 <tcp_output_alloc_header_common+0xe0>)
800abdc: f005 fbf8 bl 80103d0 <printf>
(p->len >= TCP_HLEN + optlen));
tcphdr = (struct tcp_hdr *)p->payload;
800abe0: 697b ldr r3, [r7, #20]
800abe2: 685b ldr r3, [r3, #4]
800abe4: 613b str r3, [r7, #16]
tcphdr->src = lwip_htons(src_port);
800abe6: 8c3b ldrh r3, [r7, #32]
800abe8: 4618 mov r0, r3
800abea: f7f9 fb6b bl 80042c4 <lwip_htons>
800abee: 4603 mov r3, r0
800abf0: 461a mov r2, r3
800abf2: 693b ldr r3, [r7, #16]
800abf4: 801a strh r2, [r3, #0]
tcphdr->dest = lwip_htons(dst_port);
800abf6: 8cbb ldrh r3, [r7, #36] ; 0x24
800abf8: 4618 mov r0, r3
800abfa: f7f9 fb63 bl 80042c4 <lwip_htons>
800abfe: 4603 mov r3, r0
800ac00: 461a mov r2, r3
800ac02: 693b ldr r3, [r7, #16]
800ac04: 805a strh r2, [r3, #2]
tcphdr->seqno = seqno_be;
800ac06: 693b ldr r3, [r7, #16]
800ac08: 687a ldr r2, [r7, #4]
800ac0a: 605a str r2, [r3, #4]
tcphdr->ackno = lwip_htonl(ackno);
800ac0c: 68f8 ldr r0, [r7, #12]
800ac0e: f7f9 fb6e bl 80042ee <lwip_htonl>
800ac12: 4602 mov r2, r0
800ac14: 693b ldr r3, [r7, #16]
800ac16: 609a str r2, [r3, #8]
TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), flags);
800ac18: 897b ldrh r3, [r7, #10]
800ac1a: 089b lsrs r3, r3, #2
800ac1c: b29b uxth r3, r3
800ac1e: 3305 adds r3, #5
800ac20: b29b uxth r3, r3
800ac22: 031b lsls r3, r3, #12
800ac24: b29a uxth r2, r3
800ac26: f897 3028 ldrb.w r3, [r7, #40] ; 0x28
800ac2a: b29b uxth r3, r3
800ac2c: 4313 orrs r3, r2
800ac2e: b29b uxth r3, r3
800ac30: 4618 mov r0, r3
800ac32: f7f9 fb47 bl 80042c4 <lwip_htons>
800ac36: 4603 mov r3, r0
800ac38: 461a mov r2, r3
800ac3a: 693b ldr r3, [r7, #16]
800ac3c: 819a strh r2, [r3, #12]
tcphdr->wnd = lwip_htons(wnd);
800ac3e: 8dbb ldrh r3, [r7, #44] ; 0x2c
800ac40: 4618 mov r0, r3
800ac42: f7f9 fb3f bl 80042c4 <lwip_htons>
800ac46: 4603 mov r3, r0
800ac48: 461a mov r2, r3
800ac4a: 693b ldr r3, [r7, #16]
800ac4c: 81da strh r2, [r3, #14]
tcphdr->chksum = 0;
800ac4e: 693b ldr r3, [r7, #16]
800ac50: 2200 movs r2, #0
800ac52: 741a strb r2, [r3, #16]
800ac54: 2200 movs r2, #0
800ac56: 745a strb r2, [r3, #17]
tcphdr->urgp = 0;
800ac58: 693b ldr r3, [r7, #16]
800ac5a: 2200 movs r2, #0
800ac5c: 749a strb r2, [r3, #18]
800ac5e: 2200 movs r2, #0
800ac60: 74da strb r2, [r3, #19]
}
return p;
800ac62: 697b ldr r3, [r7, #20]
}
800ac64: 4618 mov r0, r3
800ac66: 3718 adds r7, #24
800ac68: 46bd mov sp, r7
800ac6a: bd80 pop {r7, pc}
800ac6c: 080165a4 .word 0x080165a4
800ac70: 08016c7c .word 0x08016c7c
800ac74: 080165f8 .word 0x080165f8
0800ac78 <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 */)
{
800ac78: b5b0 push {r4, r5, r7, lr}
800ac7a: b08a sub sp, #40 ; 0x28
800ac7c: af04 add r7, sp, #16
800ac7e: 60f8 str r0, [r7, #12]
800ac80: 607b str r3, [r7, #4]
800ac82: 460b mov r3, r1
800ac84: 817b strh r3, [r7, #10]
800ac86: 4613 mov r3, r2
800ac88: 813b strh r3, [r7, #8]
struct pbuf *p;
LWIP_ASSERT("tcp_output_alloc_header: invalid pcb", pcb != NULL);
800ac8a: 68fb ldr r3, [r7, #12]
800ac8c: 2b00 cmp r3, #0
800ac8e: d106 bne.n 800ac9e <tcp_output_alloc_header+0x26>
800ac90: 4b15 ldr r3, [pc, #84] ; (800ace8 <tcp_output_alloc_header+0x70>)
800ac92: f240 7242 movw r2, #1858 ; 0x742
800ac96: 4915 ldr r1, [pc, #84] ; (800acec <tcp_output_alloc_header+0x74>)
800ac98: 4815 ldr r0, [pc, #84] ; (800acf0 <tcp_output_alloc_header+0x78>)
800ac9a: f005 fb99 bl 80103d0 <printf>
p = tcp_output_alloc_header_common(pcb->rcv_nxt, optlen, datalen,
800ac9e: 68fb ldr r3, [r7, #12]
800aca0: 6a58 ldr r0, [r3, #36] ; 0x24
800aca2: 68fb ldr r3, [r7, #12]
800aca4: 8adb ldrh r3, [r3, #22]
800aca6: 68fa ldr r2, [r7, #12]
800aca8: 8b12 ldrh r2, [r2, #24]
800acaa: 68f9 ldr r1, [r7, #12]
800acac: 8d49 ldrh r1, [r1, #42] ; 0x2a
800acae: 893d ldrh r5, [r7, #8]
800acb0: 897c ldrh r4, [r7, #10]
800acb2: 9103 str r1, [sp, #12]
800acb4: 2110 movs r1, #16
800acb6: 9102 str r1, [sp, #8]
800acb8: 9201 str r2, [sp, #4]
800acba: 9300 str r3, [sp, #0]
800acbc: 687b ldr r3, [r7, #4]
800acbe: 462a mov r2, r5
800acc0: 4621 mov r1, r4
800acc2: f7ff ff67 bl 800ab94 <tcp_output_alloc_header_common>
800acc6: 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) {
800acc8: 697b ldr r3, [r7, #20]
800acca: 2b00 cmp r3, #0
800accc: d006 beq.n 800acdc <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;
800acce: 68fb ldr r3, [r7, #12]
800acd0: 6a5b ldr r3, [r3, #36] ; 0x24
800acd2: 68fa ldr r2, [r7, #12]
800acd4: 8d52 ldrh r2, [r2, #42] ; 0x2a
800acd6: 441a add r2, r3
800acd8: 68fb ldr r3, [r7, #12]
800acda: 62da str r2, [r3, #44] ; 0x2c
}
return p;
800acdc: 697b ldr r3, [r7, #20]
}
800acde: 4618 mov r0, r3
800ace0: 3718 adds r7, #24
800ace2: 46bd mov sp, r7
800ace4: bdb0 pop {r4, r5, r7, pc}
800ace6: bf00 nop
800ace8: 080165a4 .word 0x080165a4
800acec: 08016cac .word 0x08016cac
800acf0: 080165f8 .word 0x080165f8
0800acf4 <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)
{
800acf4: b580 push {r7, lr}
800acf6: b088 sub sp, #32
800acf8: af00 add r7, sp, #0
800acfa: 60f8 str r0, [r7, #12]
800acfc: 60b9 str r1, [r7, #8]
800acfe: 4611 mov r1, r2
800ad00: 461a mov r2, r3
800ad02: 460b mov r3, r1
800ad04: 71fb strb r3, [r7, #7]
800ad06: 4613 mov r3, r2
800ad08: 71bb strb r3, [r7, #6]
struct tcp_hdr *tcphdr;
u32_t *opts;
u16_t sacks_len = 0;
800ad0a: 2300 movs r3, #0
800ad0c: 83fb strh r3, [r7, #30]
LWIP_ASSERT("tcp_output_fill_options: invalid pbuf", p != NULL);
800ad0e: 68bb ldr r3, [r7, #8]
800ad10: 2b00 cmp r3, #0
800ad12: d106 bne.n 800ad22 <tcp_output_fill_options+0x2e>
800ad14: 4b13 ldr r3, [pc, #76] ; (800ad64 <tcp_output_fill_options+0x70>)
800ad16: f240 7256 movw r2, #1878 ; 0x756
800ad1a: 4913 ldr r1, [pc, #76] ; (800ad68 <tcp_output_fill_options+0x74>)
800ad1c: 4813 ldr r0, [pc, #76] ; (800ad6c <tcp_output_fill_options+0x78>)
800ad1e: f005 fb57 bl 80103d0 <printf>
tcphdr = (struct tcp_hdr *)p->payload;
800ad22: 68bb ldr r3, [r7, #8]
800ad24: 685b ldr r3, [r3, #4]
800ad26: 61bb str r3, [r7, #24]
opts = (u32_t *)(void *)(tcphdr + 1);
800ad28: 69bb ldr r3, [r7, #24]
800ad2a: 3314 adds r3, #20
800ad2c: 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));
800ad2e: 69bb ldr r3, [r7, #24]
800ad30: f103 0214 add.w r2, r3, #20
800ad34: 8bfb ldrh r3, [r7, #30]
800ad36: 009b lsls r3, r3, #2
800ad38: 4619 mov r1, r3
800ad3a: 79fb ldrb r3, [r7, #7]
800ad3c: 009b lsls r3, r3, #2
800ad3e: f003 0304 and.w r3, r3, #4
800ad42: 440b add r3, r1
800ad44: 4413 add r3, r2
800ad46: 697a ldr r2, [r7, #20]
800ad48: 429a cmp r2, r3
800ad4a: d006 beq.n 800ad5a <tcp_output_fill_options+0x66>
800ad4c: 4b05 ldr r3, [pc, #20] ; (800ad64 <tcp_output_fill_options+0x70>)
800ad4e: f240 7275 movw r2, #1909 ; 0x775
800ad52: 4907 ldr r1, [pc, #28] ; (800ad70 <tcp_output_fill_options+0x7c>)
800ad54: 4805 ldr r0, [pc, #20] ; (800ad6c <tcp_output_fill_options+0x78>)
800ad56: f005 fb3b bl 80103d0 <printf>
LWIP_UNUSED_ARG(optflags); /* for LWIP_NOASSERT */
LWIP_UNUSED_ARG(opts); /* for LWIP_NOASSERT */
}
800ad5a: bf00 nop
800ad5c: 3720 adds r7, #32
800ad5e: 46bd mov sp, r7
800ad60: bd80 pop {r7, pc}
800ad62: bf00 nop
800ad64: 080165a4 .word 0x080165a4
800ad68: 08016cd4 .word 0x08016cd4
800ad6c: 080165f8 .word 0x080165f8
800ad70: 08016bcc .word 0x08016bcc
0800ad74 <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)
{
800ad74: b580 push {r7, lr}
800ad76: b08a sub sp, #40 ; 0x28
800ad78: af04 add r7, sp, #16
800ad7a: 60f8 str r0, [r7, #12]
800ad7c: 60b9 str r1, [r7, #8]
800ad7e: 607a str r2, [r7, #4]
800ad80: 603b str r3, [r7, #0]
err_t err;
struct netif *netif;
LWIP_ASSERT("tcp_output_control_segment: invalid pbuf", p != NULL);
800ad82: 68bb ldr r3, [r7, #8]
800ad84: 2b00 cmp r3, #0
800ad86: d106 bne.n 800ad96 <tcp_output_control_segment+0x22>
800ad88: 4b1c ldr r3, [pc, #112] ; (800adfc <tcp_output_control_segment+0x88>)
800ad8a: f240 7287 movw r2, #1927 ; 0x787
800ad8e: 491c ldr r1, [pc, #112] ; (800ae00 <tcp_output_control_segment+0x8c>)
800ad90: 481c ldr r0, [pc, #112] ; (800ae04 <tcp_output_control_segment+0x90>)
800ad92: f005 fb1d bl 80103d0 <printf>
netif = tcp_route(pcb, src, dst);
800ad96: 683a ldr r2, [r7, #0]
800ad98: 6879 ldr r1, [r7, #4]
800ad9a: 68f8 ldr r0, [r7, #12]
800ad9c: f7fe ff40 bl 8009c20 <tcp_route>
800ada0: 6138 str r0, [r7, #16]
if (netif == NULL) {
800ada2: 693b ldr r3, [r7, #16]
800ada4: 2b00 cmp r3, #0
800ada6: d102 bne.n 800adae <tcp_output_control_segment+0x3a>
err = ERR_RTE;
800ada8: 23fc movs r3, #252 ; 0xfc
800adaa: 75fb strb r3, [r7, #23]
800adac: e01c b.n 800ade8 <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) {
800adae: 68fb ldr r3, [r7, #12]
800adb0: 2b00 cmp r3, #0
800adb2: d006 beq.n 800adc2 <tcp_output_control_segment+0x4e>
NETIF_SET_HINTS(netif, LWIP_CONST_CAST(struct netif_hint*, &(pcb->netif_hints)));
ttl = pcb->ttl;
800adb4: 68fb ldr r3, [r7, #12]
800adb6: 7adb ldrb r3, [r3, #11]
800adb8: 75bb strb r3, [r7, #22]
tos = pcb->tos;
800adba: 68fb ldr r3, [r7, #12]
800adbc: 7a9b ldrb r3, [r3, #10]
800adbe: 757b strb r3, [r7, #21]
800adc0: e003 b.n 800adca <tcp_output_control_segment+0x56>
} else {
/* Send output with hardcoded TTL/HL since we have no access to the pcb */
ttl = TCP_TTL;
800adc2: 23ff movs r3, #255 ; 0xff
800adc4: 75bb strb r3, [r7, #22]
tos = 0;
800adc6: 2300 movs r3, #0
800adc8: 757b strb r3, [r7, #21]
}
TCP_STATS_INC(tcp.xmit);
err = ip_output_if(p, src, dst, ttl, tos, IP_PROTO_TCP, netif);
800adca: 7dba ldrb r2, [r7, #22]
800adcc: 693b ldr r3, [r7, #16]
800adce: 9302 str r3, [sp, #8]
800add0: 2306 movs r3, #6
800add2: 9301 str r3, [sp, #4]
800add4: 7d7b ldrb r3, [r7, #21]
800add6: 9300 str r3, [sp, #0]
800add8: 4613 mov r3, r2
800adda: 683a ldr r2, [r7, #0]
800addc: 6879 ldr r1, [r7, #4]
800adde: 68b8 ldr r0, [r7, #8]
800ade0: f004 f926 bl 800f030 <ip4_output_if>
800ade4: 4603 mov r3, r0
800ade6: 75fb strb r3, [r7, #23]
NETIF_RESET_HINTS(netif);
}
pbuf_free(p);
800ade8: 68b8 ldr r0, [r7, #8]
800adea: f7fa fdd5 bl 8005998 <pbuf_free>
return err;
800adee: f997 3017 ldrsb.w r3, [r7, #23]
}
800adf2: 4618 mov r0, r3
800adf4: 3718 adds r7, #24
800adf6: 46bd mov sp, r7
800adf8: bd80 pop {r7, pc}
800adfa: bf00 nop
800adfc: 080165a4 .word 0x080165a4
800ae00: 08016cfc .word 0x08016cfc
800ae04: 080165f8 .word 0x080165f8
0800ae08 <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)
{
800ae08: b590 push {r4, r7, lr}
800ae0a: b08b sub sp, #44 ; 0x2c
800ae0c: af04 add r7, sp, #16
800ae0e: 60f8 str r0, [r7, #12]
800ae10: 60b9 str r1, [r7, #8]
800ae12: 607a str r2, [r7, #4]
800ae14: 603b str r3, [r7, #0]
struct pbuf *p;
u16_t wnd;
u8_t optlen;
LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL);
800ae16: 683b ldr r3, [r7, #0]
800ae18: 2b00 cmp r3, #0
800ae1a: d106 bne.n 800ae2a <tcp_rst+0x22>
800ae1c: 4b1f ldr r3, [pc, #124] ; (800ae9c <tcp_rst+0x94>)
800ae1e: f240 72c4 movw r2, #1988 ; 0x7c4
800ae22: 491f ldr r1, [pc, #124] ; (800aea0 <tcp_rst+0x98>)
800ae24: 481f ldr r0, [pc, #124] ; (800aea4 <tcp_rst+0x9c>)
800ae26: f005 fad3 bl 80103d0 <printf>
LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL);
800ae2a: 6abb ldr r3, [r7, #40] ; 0x28
800ae2c: 2b00 cmp r3, #0
800ae2e: d106 bne.n 800ae3e <tcp_rst+0x36>
800ae30: 4b1a ldr r3, [pc, #104] ; (800ae9c <tcp_rst+0x94>)
800ae32: f240 72c5 movw r2, #1989 ; 0x7c5
800ae36: 491c ldr r1, [pc, #112] ; (800aea8 <tcp_rst+0xa0>)
800ae38: 481a ldr r0, [pc, #104] ; (800aea4 <tcp_rst+0x9c>)
800ae3a: f005 fac9 bl 80103d0 <printf>
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);
800ae3e: 2300 movs r3, #0
800ae40: 75fb strb r3, [r7, #23]
#if LWIP_WND_SCALE
wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF));
#else
wnd = PP_HTONS(TCP_WND);
800ae42: f246 0308 movw r3, #24584 ; 0x6008
800ae46: 82bb strh r3, [r7, #20]
#endif
p = tcp_output_alloc_header_common(ackno, optlen, 0, lwip_htonl(seqno), local_port,
800ae48: 7dfb ldrb r3, [r7, #23]
800ae4a: b29c uxth r4, r3
800ae4c: 68b8 ldr r0, [r7, #8]
800ae4e: f7f9 fa4e bl 80042ee <lwip_htonl>
800ae52: 4602 mov r2, r0
800ae54: 8abb ldrh r3, [r7, #20]
800ae56: 9303 str r3, [sp, #12]
800ae58: 2314 movs r3, #20
800ae5a: 9302 str r3, [sp, #8]
800ae5c: 8e3b ldrh r3, [r7, #48] ; 0x30
800ae5e: 9301 str r3, [sp, #4]
800ae60: 8dbb ldrh r3, [r7, #44] ; 0x2c
800ae62: 9300 str r3, [sp, #0]
800ae64: 4613 mov r3, r2
800ae66: 2200 movs r2, #0
800ae68: 4621 mov r1, r4
800ae6a: 6878 ldr r0, [r7, #4]
800ae6c: f7ff fe92 bl 800ab94 <tcp_output_alloc_header_common>
800ae70: 6138 str r0, [r7, #16]
remote_port, TCP_RST | TCP_ACK, wnd);
if (p == NULL) {
800ae72: 693b ldr r3, [r7, #16]
800ae74: 2b00 cmp r3, #0
800ae76: d00c beq.n 800ae92 <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);
800ae78: 7dfb ldrb r3, [r7, #23]
800ae7a: 2200 movs r2, #0
800ae7c: 6939 ldr r1, [r7, #16]
800ae7e: 68f8 ldr r0, [r7, #12]
800ae80: f7ff ff38 bl 800acf4 <tcp_output_fill_options>
MIB2_STATS_INC(mib2.tcpoutrsts);
tcp_output_control_segment(pcb, p, local_ip, remote_ip);
800ae84: 6abb ldr r3, [r7, #40] ; 0x28
800ae86: 683a ldr r2, [r7, #0]
800ae88: 6939 ldr r1, [r7, #16]
800ae8a: 68f8 ldr r0, [r7, #12]
800ae8c: f7ff ff72 bl 800ad74 <tcp_output_control_segment>
800ae90: e000 b.n 800ae94 <tcp_rst+0x8c>
return;
800ae92: bf00 nop
LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno));
}
800ae94: 371c adds r7, #28
800ae96: 46bd mov sp, r7
800ae98: bd90 pop {r4, r7, pc}
800ae9a: bf00 nop
800ae9c: 080165a4 .word 0x080165a4
800aea0: 08016d28 .word 0x08016d28
800aea4: 080165f8 .word 0x080165f8
800aea8: 08016d44 .word 0x08016d44
0800aeac <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)
{
800aeac: b590 push {r4, r7, lr}
800aeae: b087 sub sp, #28
800aeb0: af00 add r7, sp, #0
800aeb2: 6078 str r0, [r7, #4]
err_t err;
struct pbuf *p;
u8_t optlen, optflags = 0;
800aeb4: 2300 movs r3, #0
800aeb6: 75fb strb r3, [r7, #23]
u8_t num_sacks = 0;
800aeb8: 2300 movs r3, #0
800aeba: 75bb strb r3, [r7, #22]
LWIP_ASSERT("tcp_send_empty_ack: invalid pcb", pcb != NULL);
800aebc: 687b ldr r3, [r7, #4]
800aebe: 2b00 cmp r3, #0
800aec0: d106 bne.n 800aed0 <tcp_send_empty_ack+0x24>
800aec2: 4b28 ldr r3, [pc, #160] ; (800af64 <tcp_send_empty_ack+0xb8>)
800aec4: f240 72ea movw r2, #2026 ; 0x7ea
800aec8: 4927 ldr r1, [pc, #156] ; (800af68 <tcp_send_empty_ack+0xbc>)
800aeca: 4828 ldr r0, [pc, #160] ; (800af6c <tcp_send_empty_ack+0xc0>)
800aecc: f005 fa80 bl 80103d0 <printf>
#if LWIP_TCP_TIMESTAMPS
if (pcb->flags & TF_TIMESTAMP) {
optflags = TF_SEG_OPTS_TS;
}
#endif
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb);
800aed0: 7dfb ldrb r3, [r7, #23]
800aed2: 009b lsls r3, r3, #2
800aed4: b2db uxtb r3, r3
800aed6: f003 0304 and.w r3, r3, #4
800aeda: 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));
800aedc: 7d7b ldrb r3, [r7, #21]
800aede: b29c uxth r4, r3
800aee0: 687b ldr r3, [r7, #4]
800aee2: 6d1b ldr r3, [r3, #80] ; 0x50
800aee4: 4618 mov r0, r3
800aee6: f7f9 fa02 bl 80042ee <lwip_htonl>
800aeea: 4603 mov r3, r0
800aeec: 2200 movs r2, #0
800aeee: 4621 mov r1, r4
800aef0: 6878 ldr r0, [r7, #4]
800aef2: f7ff fec1 bl 800ac78 <tcp_output_alloc_header>
800aef6: 6138 str r0, [r7, #16]
if (p == NULL) {
800aef8: 693b ldr r3, [r7, #16]
800aefa: 2b00 cmp r3, #0
800aefc: d109 bne.n 800af12 <tcp_send_empty_ack+0x66>
/* let tcp_fasttmr retry sending this ACK */
tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
800aefe: 687b ldr r3, [r7, #4]
800af00: 8b5b ldrh r3, [r3, #26]
800af02: f043 0303 orr.w r3, r3, #3
800af06: b29a uxth r2, r3
800af08: 687b ldr r3, [r7, #4]
800af0a: 835a strh r2, [r3, #26]
LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n"));
return ERR_BUF;
800af0c: f06f 0301 mvn.w r3, #1
800af10: e023 b.n 800af5a <tcp_send_empty_ack+0xae>
}
tcp_output_fill_options(pcb, p, optflags, num_sacks);
800af12: 7dbb ldrb r3, [r7, #22]
800af14: 7dfa ldrb r2, [r7, #23]
800af16: 6939 ldr r1, [r7, #16]
800af18: 6878 ldr r0, [r7, #4]
800af1a: f7ff feeb bl 800acf4 <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);
800af1e: 687a ldr r2, [r7, #4]
800af20: 687b ldr r3, [r7, #4]
800af22: 3304 adds r3, #4
800af24: 6939 ldr r1, [r7, #16]
800af26: 6878 ldr r0, [r7, #4]
800af28: f7ff ff24 bl 800ad74 <tcp_output_control_segment>
800af2c: 4603 mov r3, r0
800af2e: 73fb strb r3, [r7, #15]
if (err != ERR_OK) {
800af30: f997 300f ldrsb.w r3, [r7, #15]
800af34: 2b00 cmp r3, #0
800af36: d007 beq.n 800af48 <tcp_send_empty_ack+0x9c>
/* let tcp_fasttmr retry sending this ACK */
tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
800af38: 687b ldr r3, [r7, #4]
800af3a: 8b5b ldrh r3, [r3, #26]
800af3c: f043 0303 orr.w r3, r3, #3
800af40: b29a uxth r2, r3
800af42: 687b ldr r3, [r7, #4]
800af44: 835a strh r2, [r3, #26]
800af46: e006 b.n 800af56 <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);
800af48: 687b ldr r3, [r7, #4]
800af4a: 8b5b ldrh r3, [r3, #26]
800af4c: f023 0303 bic.w r3, r3, #3
800af50: b29a uxth r2, r3
800af52: 687b ldr r3, [r7, #4]
800af54: 835a strh r2, [r3, #26]
}
return err;
800af56: f997 300f ldrsb.w r3, [r7, #15]
}
800af5a: 4618 mov r0, r3
800af5c: 371c adds r7, #28
800af5e: 46bd mov sp, r7
800af60: bd90 pop {r4, r7, pc}
800af62: bf00 nop
800af64: 080165a4 .word 0x080165a4
800af68: 08016d60 .word 0x08016d60
800af6c: 080165f8 .word 0x080165f8
0800af70 <tcp_keepalive>:
*
* @param pcb the tcp_pcb for which to send a keepalive packet
*/
err_t
tcp_keepalive(struct tcp_pcb *pcb)
{
800af70: b590 push {r4, r7, lr}
800af72: b087 sub sp, #28
800af74: af00 add r7, sp, #0
800af76: 6078 str r0, [r7, #4]
err_t err;
struct pbuf *p;
u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);
800af78: 2300 movs r3, #0
800af7a: 75fb strb r3, [r7, #23]
LWIP_ASSERT("tcp_keepalive: invalid pcb", pcb != NULL);
800af7c: 687b ldr r3, [r7, #4]
800af7e: 2b00 cmp r3, #0
800af80: d106 bne.n 800af90 <tcp_keepalive+0x20>
800af82: 4b18 ldr r3, [pc, #96] ; (800afe4 <tcp_keepalive+0x74>)
800af84: f640 0224 movw r2, #2084 ; 0x824
800af88: 4917 ldr r1, [pc, #92] ; (800afe8 <tcp_keepalive+0x78>)
800af8a: 4818 ldr r0, [pc, #96] ; (800afec <tcp_keepalive+0x7c>)
800af8c: f005 fa20 bl 80103d0 <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));
800af90: 7dfb ldrb r3, [r7, #23]
800af92: b29c uxth r4, r3
800af94: 687b ldr r3, [r7, #4]
800af96: 6d1b ldr r3, [r3, #80] ; 0x50
800af98: 3b01 subs r3, #1
800af9a: 4618 mov r0, r3
800af9c: f7f9 f9a7 bl 80042ee <lwip_htonl>
800afa0: 4603 mov r3, r0
800afa2: 2200 movs r2, #0
800afa4: 4621 mov r1, r4
800afa6: 6878 ldr r0, [r7, #4]
800afa8: f7ff fe66 bl 800ac78 <tcp_output_alloc_header>
800afac: 6138 str r0, [r7, #16]
if (p == NULL) {
800afae: 693b ldr r3, [r7, #16]
800afb0: 2b00 cmp r3, #0
800afb2: d102 bne.n 800afba <tcp_keepalive+0x4a>
LWIP_DEBUGF(TCP_DEBUG,
("tcp_keepalive: could not allocate memory for pbuf\n"));
return ERR_MEM;
800afb4: f04f 33ff mov.w r3, #4294967295
800afb8: e010 b.n 800afdc <tcp_keepalive+0x6c>
}
tcp_output_fill_options(pcb, p, 0, optlen);
800afba: 7dfb ldrb r3, [r7, #23]
800afbc: 2200 movs r2, #0
800afbe: 6939 ldr r1, [r7, #16]
800afc0: 6878 ldr r0, [r7, #4]
800afc2: f7ff fe97 bl 800acf4 <tcp_output_fill_options>
err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
800afc6: 687a ldr r2, [r7, #4]
800afc8: 687b ldr r3, [r7, #4]
800afca: 3304 adds r3, #4
800afcc: 6939 ldr r1, [r7, #16]
800afce: 6878 ldr r0, [r7, #4]
800afd0: f7ff fed0 bl 800ad74 <tcp_output_control_segment>
800afd4: 4603 mov r3, r0
800afd6: 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;
800afd8: f997 300f ldrsb.w r3, [r7, #15]
}
800afdc: 4618 mov r0, r3
800afde: 371c adds r7, #28
800afe0: 46bd mov sp, r7
800afe2: bd90 pop {r4, r7, pc}
800afe4: 080165a4 .word 0x080165a4
800afe8: 08016d80 .word 0x08016d80
800afec: 080165f8 .word 0x080165f8
0800aff0 <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)
{
800aff0: b590 push {r4, r7, lr}
800aff2: b08b sub sp, #44 ; 0x2c
800aff4: af00 add r7, sp, #0
800aff6: 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);
800aff8: 2300 movs r3, #0
800affa: f887 3027 strb.w r3, [r7, #39] ; 0x27
LWIP_ASSERT("tcp_zero_window_probe: invalid pcb", pcb != NULL);
800affe: 687b ldr r3, [r7, #4]
800b000: 2b00 cmp r3, #0
800b002: d106 bne.n 800b012 <tcp_zero_window_probe+0x22>
800b004: 4b4c ldr r3, [pc, #304] ; (800b138 <tcp_zero_window_probe+0x148>)
800b006: f640 024f movw r2, #2127 ; 0x84f
800b00a: 494c ldr r1, [pc, #304] ; (800b13c <tcp_zero_window_probe+0x14c>)
800b00c: 484c ldr r0, [pc, #304] ; (800b140 <tcp_zero_window_probe+0x150>)
800b00e: f005 f9df bl 80103d0 <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;
800b012: 687b ldr r3, [r7, #4]
800b014: 6edb ldr r3, [r3, #108] ; 0x6c
800b016: 623b str r3, [r7, #32]
if (seg == NULL) {
800b018: 6a3b ldr r3, [r7, #32]
800b01a: 2b00 cmp r3, #0
800b01c: d101 bne.n 800b022 <tcp_zero_window_probe+0x32>
/* Not expected, persist timer should be off when the send buffer is empty */
return ERR_OK;
800b01e: 2300 movs r3, #0
800b020: e086 b.n 800b130 <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) {
800b022: 687b ldr r3, [r7, #4]
800b024: f893 309a ldrb.w r3, [r3, #154] ; 0x9a
800b028: 2bff cmp r3, #255 ; 0xff
800b02a: d007 beq.n 800b03c <tcp_zero_window_probe+0x4c>
++pcb->persist_probe;
800b02c: 687b ldr r3, [r7, #4]
800b02e: f893 309a ldrb.w r3, [r3, #154] ; 0x9a
800b032: 3301 adds r3, #1
800b034: b2da uxtb r2, r3
800b036: 687b ldr r3, [r7, #4]
800b038: f883 209a strb.w r2, [r3, #154] ; 0x9a
}
is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0);
800b03c: 6a3b ldr r3, [r7, #32]
800b03e: 68db ldr r3, [r3, #12]
800b040: 899b ldrh r3, [r3, #12]
800b042: b29b uxth r3, r3
800b044: 4618 mov r0, r3
800b046: f7f9 f93d bl 80042c4 <lwip_htons>
800b04a: 4603 mov r3, r0
800b04c: b2db uxtb r3, r3
800b04e: f003 0301 and.w r3, r3, #1
800b052: 2b00 cmp r3, #0
800b054: d005 beq.n 800b062 <tcp_zero_window_probe+0x72>
800b056: 6a3b ldr r3, [r7, #32]
800b058: 891b ldrh r3, [r3, #8]
800b05a: 2b00 cmp r3, #0
800b05c: d101 bne.n 800b062 <tcp_zero_window_probe+0x72>
800b05e: 2301 movs r3, #1
800b060: e000 b.n 800b064 <tcp_zero_window_probe+0x74>
800b062: 2300 movs r3, #0
800b064: 77fb strb r3, [r7, #31]
/* we want to send one seqno: either FIN or data (no options) */
len = is_fin ? 0 : 1;
800b066: 7ffb ldrb r3, [r7, #31]
800b068: 2b00 cmp r3, #0
800b06a: bf0c ite eq
800b06c: 2301 moveq r3, #1
800b06e: 2300 movne r3, #0
800b070: b2db uxtb r3, r3
800b072: 83bb strh r3, [r7, #28]
p = tcp_output_alloc_header(pcb, optlen, len, seg->tcphdr->seqno);
800b074: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800b078: b299 uxth r1, r3
800b07a: 6a3b ldr r3, [r7, #32]
800b07c: 68db ldr r3, [r3, #12]
800b07e: 685b ldr r3, [r3, #4]
800b080: 8bba ldrh r2, [r7, #28]
800b082: 6878 ldr r0, [r7, #4]
800b084: f7ff fdf8 bl 800ac78 <tcp_output_alloc_header>
800b088: 61b8 str r0, [r7, #24]
if (p == NULL) {
800b08a: 69bb ldr r3, [r7, #24]
800b08c: 2b00 cmp r3, #0
800b08e: d102 bne.n 800b096 <tcp_zero_window_probe+0xa6>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n"));
return ERR_MEM;
800b090: f04f 33ff mov.w r3, #4294967295
800b094: e04c b.n 800b130 <tcp_zero_window_probe+0x140>
}
tcphdr = (struct tcp_hdr *)p->payload;
800b096: 69bb ldr r3, [r7, #24]
800b098: 685b ldr r3, [r3, #4]
800b09a: 617b str r3, [r7, #20]
if (is_fin) {
800b09c: 7ffb ldrb r3, [r7, #31]
800b09e: 2b00 cmp r3, #0
800b0a0: d011 beq.n 800b0c6 <tcp_zero_window_probe+0xd6>
/* FIN segment, no data */
TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN);
800b0a2: 697b ldr r3, [r7, #20]
800b0a4: 899b ldrh r3, [r3, #12]
800b0a6: b29b uxth r3, r3
800b0a8: b21b sxth r3, r3
800b0aa: f423 537c bic.w r3, r3, #16128 ; 0x3f00
800b0ae: b21c sxth r4, r3
800b0b0: 2011 movs r0, #17
800b0b2: f7f9 f907 bl 80042c4 <lwip_htons>
800b0b6: 4603 mov r3, r0
800b0b8: b21b sxth r3, r3
800b0ba: 4323 orrs r3, r4
800b0bc: b21b sxth r3, r3
800b0be: b29a uxth r2, r3
800b0c0: 697b ldr r3, [r7, #20]
800b0c2: 819a strh r2, [r3, #12]
800b0c4: e010 b.n 800b0e8 <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);
800b0c6: 69bb ldr r3, [r7, #24]
800b0c8: 685b ldr r3, [r3, #4]
800b0ca: 3314 adds r3, #20
800b0cc: 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);
800b0ce: 6a3b ldr r3, [r7, #32]
800b0d0: 6858 ldr r0, [r3, #4]
800b0d2: 6a3b ldr r3, [r7, #32]
800b0d4: 685b ldr r3, [r3, #4]
800b0d6: 891a ldrh r2, [r3, #8]
800b0d8: 6a3b ldr r3, [r7, #32]
800b0da: 891b ldrh r3, [r3, #8]
800b0dc: 1ad3 subs r3, r2, r3
800b0de: b29b uxth r3, r3
800b0e0: 2201 movs r2, #1
800b0e2: 6939 ldr r1, [r7, #16]
800b0e4: f7fa fe52 bl 8005d8c <pbuf_copy_partial>
}
/* The byte may be acknowledged without the window being opened. */
snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + 1;
800b0e8: 6a3b ldr r3, [r7, #32]
800b0ea: 68db ldr r3, [r3, #12]
800b0ec: 685b ldr r3, [r3, #4]
800b0ee: 4618 mov r0, r3
800b0f0: f7f9 f8fd bl 80042ee <lwip_htonl>
800b0f4: 4603 mov r3, r0
800b0f6: 3301 adds r3, #1
800b0f8: 60fb str r3, [r7, #12]
if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) {
800b0fa: 687b ldr r3, [r7, #4]
800b0fc: 6d1a ldr r2, [r3, #80] ; 0x50
800b0fe: 68fb ldr r3, [r7, #12]
800b100: 1ad3 subs r3, r2, r3
800b102: 2b00 cmp r3, #0
800b104: da02 bge.n 800b10c <tcp_zero_window_probe+0x11c>
pcb->snd_nxt = snd_nxt;
800b106: 687b ldr r3, [r7, #4]
800b108: 68fa ldr r2, [r7, #12]
800b10a: 651a str r2, [r3, #80] ; 0x50
}
tcp_output_fill_options(pcb, p, 0, optlen);
800b10c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800b110: 2200 movs r2, #0
800b112: 69b9 ldr r1, [r7, #24]
800b114: 6878 ldr r0, [r7, #4]
800b116: f7ff fded bl 800acf4 <tcp_output_fill_options>
err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
800b11a: 687a ldr r2, [r7, #4]
800b11c: 687b ldr r3, [r7, #4]
800b11e: 3304 adds r3, #4
800b120: 69b9 ldr r1, [r7, #24]
800b122: 6878 ldr r0, [r7, #4]
800b124: f7ff fe26 bl 800ad74 <tcp_output_control_segment>
800b128: 4603 mov r3, r0
800b12a: 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;
800b12c: f997 300b ldrsb.w r3, [r7, #11]
}
800b130: 4618 mov r0, r3
800b132: 372c adds r7, #44 ; 0x2c
800b134: 46bd mov sp, r7
800b136: bd90 pop {r4, r7, pc}
800b138: 080165a4 .word 0x080165a4
800b13c: 08016d9c .word 0x08016d9c
800b140: 080165f8 .word 0x080165f8
0800b144 <tcpip_tcp_timer>:
*
* @param arg unused argument
*/
static void
tcpip_tcp_timer(void *arg)
{
800b144: b580 push {r7, lr}
800b146: b082 sub sp, #8
800b148: af00 add r7, sp, #0
800b14a: 6078 str r0, [r7, #4]
LWIP_UNUSED_ARG(arg);
/* call TCP timer handler */
tcp_tmr();
800b14c: f7fa ff0c bl 8005f68 <tcp_tmr>
/* timer still needed? */
if (tcp_active_pcbs || tcp_tw_pcbs) {
800b150: 4b0a ldr r3, [pc, #40] ; (800b17c <tcpip_tcp_timer+0x38>)
800b152: 681b ldr r3, [r3, #0]
800b154: 2b00 cmp r3, #0
800b156: d103 bne.n 800b160 <tcpip_tcp_timer+0x1c>
800b158: 4b09 ldr r3, [pc, #36] ; (800b180 <tcpip_tcp_timer+0x3c>)
800b15a: 681b ldr r3, [r3, #0]
800b15c: 2b00 cmp r3, #0
800b15e: d005 beq.n 800b16c <tcpip_tcp_timer+0x28>
/* restart timer */
sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);
800b160: 2200 movs r2, #0
800b162: 4908 ldr r1, [pc, #32] ; (800b184 <tcpip_tcp_timer+0x40>)
800b164: 20fa movs r0, #250 ; 0xfa
800b166: f000 f8f3 bl 800b350 <sys_timeout>
800b16a: e003 b.n 800b174 <tcpip_tcp_timer+0x30>
} else {
/* disable timer */
tcpip_tcp_timer_active = 0;
800b16c: 4b06 ldr r3, [pc, #24] ; (800b188 <tcpip_tcp_timer+0x44>)
800b16e: 2200 movs r2, #0
800b170: 601a str r2, [r3, #0]
}
}
800b172: bf00 nop
800b174: bf00 nop
800b176: 3708 adds r7, #8
800b178: 46bd mov sp, r7
800b17a: bd80 pop {r7, pc}
800b17c: 20008c0c .word 0x20008c0c
800b180: 20008c10 .word 0x20008c10
800b184: 0800b145 .word 0x0800b145
800b188: 20008c58 .word 0x20008c58
0800b18c <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)
{
800b18c: b580 push {r7, lr}
800b18e: 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)) {
800b190: 4b0a ldr r3, [pc, #40] ; (800b1bc <tcp_timer_needed+0x30>)
800b192: 681b ldr r3, [r3, #0]
800b194: 2b00 cmp r3, #0
800b196: d10f bne.n 800b1b8 <tcp_timer_needed+0x2c>
800b198: 4b09 ldr r3, [pc, #36] ; (800b1c0 <tcp_timer_needed+0x34>)
800b19a: 681b ldr r3, [r3, #0]
800b19c: 2b00 cmp r3, #0
800b19e: d103 bne.n 800b1a8 <tcp_timer_needed+0x1c>
800b1a0: 4b08 ldr r3, [pc, #32] ; (800b1c4 <tcp_timer_needed+0x38>)
800b1a2: 681b ldr r3, [r3, #0]
800b1a4: 2b00 cmp r3, #0
800b1a6: d007 beq.n 800b1b8 <tcp_timer_needed+0x2c>
/* enable and start timer */
tcpip_tcp_timer_active = 1;
800b1a8: 4b04 ldr r3, [pc, #16] ; (800b1bc <tcp_timer_needed+0x30>)
800b1aa: 2201 movs r2, #1
800b1ac: 601a str r2, [r3, #0]
sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);
800b1ae: 2200 movs r2, #0
800b1b0: 4905 ldr r1, [pc, #20] ; (800b1c8 <tcp_timer_needed+0x3c>)
800b1b2: 20fa movs r0, #250 ; 0xfa
800b1b4: f000 f8cc bl 800b350 <sys_timeout>
}
}
800b1b8: bf00 nop
800b1ba: bd80 pop {r7, pc}
800b1bc: 20008c58 .word 0x20008c58
800b1c0: 20008c0c .word 0x20008c0c
800b1c4: 20008c10 .word 0x20008c10
800b1c8: 0800b145 .word 0x0800b145
0800b1cc <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
{
800b1cc: b580 push {r7, lr}
800b1ce: b086 sub sp, #24
800b1d0: af00 add r7, sp, #0
800b1d2: 60f8 str r0, [r7, #12]
800b1d4: 60b9 str r1, [r7, #8]
800b1d6: 607a str r2, [r7, #4]
struct sys_timeo *timeout, *t;
timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT);
800b1d8: 2006 movs r0, #6
800b1da: f7f9 fceb bl 8004bb4 <memp_malloc>
800b1de: 6138 str r0, [r7, #16]
if (timeout == NULL) {
800b1e0: 693b ldr r3, [r7, #16]
800b1e2: 2b00 cmp r3, #0
800b1e4: d109 bne.n 800b1fa <sys_timeout_abs+0x2e>
LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL);
800b1e6: 693b ldr r3, [r7, #16]
800b1e8: 2b00 cmp r3, #0
800b1ea: d151 bne.n 800b290 <sys_timeout_abs+0xc4>
800b1ec: 4b2a ldr r3, [pc, #168] ; (800b298 <sys_timeout_abs+0xcc>)
800b1ee: 22be movs r2, #190 ; 0xbe
800b1f0: 492a ldr r1, [pc, #168] ; (800b29c <sys_timeout_abs+0xd0>)
800b1f2: 482b ldr r0, [pc, #172] ; (800b2a0 <sys_timeout_abs+0xd4>)
800b1f4: f005 f8ec bl 80103d0 <printf>
return;
800b1f8: e04a b.n 800b290 <sys_timeout_abs+0xc4>
}
timeout->next = NULL;
800b1fa: 693b ldr r3, [r7, #16]
800b1fc: 2200 movs r2, #0
800b1fe: 601a str r2, [r3, #0]
timeout->h = handler;
800b200: 693b ldr r3, [r7, #16]
800b202: 68ba ldr r2, [r7, #8]
800b204: 609a str r2, [r3, #8]
timeout->arg = arg;
800b206: 693b ldr r3, [r7, #16]
800b208: 687a ldr r2, [r7, #4]
800b20a: 60da str r2, [r3, #12]
timeout->time = abs_time;
800b20c: 693b ldr r3, [r7, #16]
800b20e: 68fa ldr r2, [r7, #12]
800b210: 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) {
800b212: 4b24 ldr r3, [pc, #144] ; (800b2a4 <sys_timeout_abs+0xd8>)
800b214: 681b ldr r3, [r3, #0]
800b216: 2b00 cmp r3, #0
800b218: d103 bne.n 800b222 <sys_timeout_abs+0x56>
next_timeout = timeout;
800b21a: 4a22 ldr r2, [pc, #136] ; (800b2a4 <sys_timeout_abs+0xd8>)
800b21c: 693b ldr r3, [r7, #16]
800b21e: 6013 str r3, [r2, #0]
return;
800b220: e037 b.n 800b292 <sys_timeout_abs+0xc6>
}
if (TIME_LESS_THAN(timeout->time, next_timeout->time)) {
800b222: 693b ldr r3, [r7, #16]
800b224: 685a ldr r2, [r3, #4]
800b226: 4b1f ldr r3, [pc, #124] ; (800b2a4 <sys_timeout_abs+0xd8>)
800b228: 681b ldr r3, [r3, #0]
800b22a: 685b ldr r3, [r3, #4]
800b22c: 1ad3 subs r3, r2, r3
800b22e: 0fdb lsrs r3, r3, #31
800b230: f003 0301 and.w r3, r3, #1
800b234: b2db uxtb r3, r3
800b236: 2b00 cmp r3, #0
800b238: d007 beq.n 800b24a <sys_timeout_abs+0x7e>
timeout->next = next_timeout;
800b23a: 4b1a ldr r3, [pc, #104] ; (800b2a4 <sys_timeout_abs+0xd8>)
800b23c: 681a ldr r2, [r3, #0]
800b23e: 693b ldr r3, [r7, #16]
800b240: 601a str r2, [r3, #0]
next_timeout = timeout;
800b242: 4a18 ldr r2, [pc, #96] ; (800b2a4 <sys_timeout_abs+0xd8>)
800b244: 693b ldr r3, [r7, #16]
800b246: 6013 str r3, [r2, #0]
800b248: e023 b.n 800b292 <sys_timeout_abs+0xc6>
} else {
for (t = next_timeout; t != NULL; t = t->next) {
800b24a: 4b16 ldr r3, [pc, #88] ; (800b2a4 <sys_timeout_abs+0xd8>)
800b24c: 681b ldr r3, [r3, #0]
800b24e: 617b str r3, [r7, #20]
800b250: e01a b.n 800b288 <sys_timeout_abs+0xbc>
if ((t->next == NULL) || TIME_LESS_THAN(timeout->time, t->next->time)) {
800b252: 697b ldr r3, [r7, #20]
800b254: 681b ldr r3, [r3, #0]
800b256: 2b00 cmp r3, #0
800b258: d00b beq.n 800b272 <sys_timeout_abs+0xa6>
800b25a: 693b ldr r3, [r7, #16]
800b25c: 685a ldr r2, [r3, #4]
800b25e: 697b ldr r3, [r7, #20]
800b260: 681b ldr r3, [r3, #0]
800b262: 685b ldr r3, [r3, #4]
800b264: 1ad3 subs r3, r2, r3
800b266: 0fdb lsrs r3, r3, #31
800b268: f003 0301 and.w r3, r3, #1
800b26c: b2db uxtb r3, r3
800b26e: 2b00 cmp r3, #0
800b270: d007 beq.n 800b282 <sys_timeout_abs+0xb6>
timeout->next = t->next;
800b272: 697b ldr r3, [r7, #20]
800b274: 681a ldr r2, [r3, #0]
800b276: 693b ldr r3, [r7, #16]
800b278: 601a str r2, [r3, #0]
t->next = timeout;
800b27a: 697b ldr r3, [r7, #20]
800b27c: 693a ldr r2, [r7, #16]
800b27e: 601a str r2, [r3, #0]
break;
800b280: e007 b.n 800b292 <sys_timeout_abs+0xc6>
for (t = next_timeout; t != NULL; t = t->next) {
800b282: 697b ldr r3, [r7, #20]
800b284: 681b ldr r3, [r3, #0]
800b286: 617b str r3, [r7, #20]
800b288: 697b ldr r3, [r7, #20]
800b28a: 2b00 cmp r3, #0
800b28c: d1e1 bne.n 800b252 <sys_timeout_abs+0x86>
800b28e: e000 b.n 800b292 <sys_timeout_abs+0xc6>
return;
800b290: bf00 nop
}
}
}
}
800b292: 3718 adds r7, #24
800b294: 46bd mov sp, r7
800b296: bd80 pop {r7, pc}
800b298: 08016dc0 .word 0x08016dc0
800b29c: 08016df4 .word 0x08016df4
800b2a0: 08016e34 .word 0x08016e34
800b2a4: 20008c50 .word 0x20008c50
0800b2a8 <lwip_cyclic_timer>:
#if !LWIP_TESTMODE
static
#endif
void
lwip_cyclic_timer(void *arg)
{
800b2a8: b580 push {r7, lr}
800b2aa: b086 sub sp, #24
800b2ac: af00 add r7, sp, #0
800b2ae: 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;
800b2b0: 687b ldr r3, [r7, #4]
800b2b2: 617b str r3, [r7, #20]
#if LWIP_DEBUG_TIMERNAMES
LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: %s()\n", cyclic->handler_name));
#endif
cyclic->handler();
800b2b4: 697b ldr r3, [r7, #20]
800b2b6: 685b ldr r3, [r3, #4]
800b2b8: 4798 blx r3
now = sys_now();
800b2ba: f7f8 fdeb bl 8003e94 <sys_now>
800b2be: 6138 str r0, [r7, #16]
next_timeout_time = (u32_t)(current_timeout_due_time + cyclic->interval_ms); /* overflow handled by TIME_LESS_THAN macro */
800b2c0: 697b ldr r3, [r7, #20]
800b2c2: 681a ldr r2, [r3, #0]
800b2c4: 4b0f ldr r3, [pc, #60] ; (800b304 <lwip_cyclic_timer+0x5c>)
800b2c6: 681b ldr r3, [r3, #0]
800b2c8: 4413 add r3, r2
800b2ca: 60fb str r3, [r7, #12]
if (TIME_LESS_THAN(next_timeout_time, now)) {
800b2cc: 68fa ldr r2, [r7, #12]
800b2ce: 693b ldr r3, [r7, #16]
800b2d0: 1ad3 subs r3, r2, r3
800b2d2: 0fdb lsrs r3, r3, #31
800b2d4: f003 0301 and.w r3, r3, #1
800b2d8: b2db uxtb r3, r3
800b2da: 2b00 cmp r3, #0
800b2dc: d009 beq.n 800b2f2 <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);
800b2de: 697b ldr r3, [r7, #20]
800b2e0: 681a ldr r2, [r3, #0]
800b2e2: 693b ldr r3, [r7, #16]
800b2e4: 4413 add r3, r2
800b2e6: 687a ldr r2, [r7, #4]
800b2e8: 4907 ldr r1, [pc, #28] ; (800b308 <lwip_cyclic_timer+0x60>)
800b2ea: 4618 mov r0, r3
800b2ec: f7ff ff6e bl 800b1cc <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
}
}
800b2f0: e004 b.n 800b2fc <lwip_cyclic_timer+0x54>
sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg);
800b2f2: 687a ldr r2, [r7, #4]
800b2f4: 4904 ldr r1, [pc, #16] ; (800b308 <lwip_cyclic_timer+0x60>)
800b2f6: 68f8 ldr r0, [r7, #12]
800b2f8: f7ff ff68 bl 800b1cc <sys_timeout_abs>
}
800b2fc: bf00 nop
800b2fe: 3718 adds r7, #24
800b300: 46bd mov sp, r7
800b302: bd80 pop {r7, pc}
800b304: 20008c54 .word 0x20008c54
800b308: 0800b2a9 .word 0x0800b2a9
0800b30c <sys_timeouts_init>:
/** Initialize this module */
void sys_timeouts_init(void)
{
800b30c: b580 push {r7, lr}
800b30e: b082 sub sp, #8
800b310: 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++) {
800b312: 2301 movs r3, #1
800b314: 607b str r3, [r7, #4]
800b316: e00e b.n 800b336 <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]));
800b318: 4a0b ldr r2, [pc, #44] ; (800b348 <sys_timeouts_init+0x3c>)
800b31a: 687b ldr r3, [r7, #4]
800b31c: f852 0033 ldr.w r0, [r2, r3, lsl #3]
800b320: 687b ldr r3, [r7, #4]
800b322: 00db lsls r3, r3, #3
800b324: 4a08 ldr r2, [pc, #32] ; (800b348 <sys_timeouts_init+0x3c>)
800b326: 4413 add r3, r2
800b328: 461a mov r2, r3
800b32a: 4908 ldr r1, [pc, #32] ; (800b34c <sys_timeouts_init+0x40>)
800b32c: f000 f810 bl 800b350 <sys_timeout>
for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) {
800b330: 687b ldr r3, [r7, #4]
800b332: 3301 adds r3, #1
800b334: 607b str r3, [r7, #4]
800b336: 687b ldr r3, [r7, #4]
800b338: 2b04 cmp r3, #4
800b33a: d9ed bls.n 800b318 <sys_timeouts_init+0xc>
}
}
800b33c: bf00 nop
800b33e: bf00 nop
800b340: 3708 adds r7, #8
800b342: 46bd mov sp, r7
800b344: bd80 pop {r7, pc}
800b346: bf00 nop
800b348: 08017db4 .word 0x08017db4
800b34c: 0800b2a9 .word 0x0800b2a9
0800b350 <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 */
{
800b350: b580 push {r7, lr}
800b352: b086 sub sp, #24
800b354: af00 add r7, sp, #0
800b356: 60f8 str r0, [r7, #12]
800b358: 60b9 str r1, [r7, #8]
800b35a: 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));
800b35c: 68fb ldr r3, [r7, #12]
800b35e: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
800b362: d306 bcc.n 800b372 <sys_timeout+0x22>
800b364: 4b0a ldr r3, [pc, #40] ; (800b390 <sys_timeout+0x40>)
800b366: f240 1229 movw r2, #297 ; 0x129
800b36a: 490a ldr r1, [pc, #40] ; (800b394 <sys_timeout+0x44>)
800b36c: 480a ldr r0, [pc, #40] ; (800b398 <sys_timeout+0x48>)
800b36e: f005 f82f bl 80103d0 <printf>
next_timeout_time = (u32_t)(sys_now() + msecs); /* overflow handled by TIME_LESS_THAN macro */
800b372: f7f8 fd8f bl 8003e94 <sys_now>
800b376: 4602 mov r2, r0
800b378: 68fb ldr r3, [r7, #12]
800b37a: 4413 add r3, r2
800b37c: 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);
800b37e: 687a ldr r2, [r7, #4]
800b380: 68b9 ldr r1, [r7, #8]
800b382: 6978 ldr r0, [r7, #20]
800b384: f7ff ff22 bl 800b1cc <sys_timeout_abs>
#endif
}
800b388: bf00 nop
800b38a: 3718 adds r7, #24
800b38c: 46bd mov sp, r7
800b38e: bd80 pop {r7, pc}
800b390: 08016dc0 .word 0x08016dc0
800b394: 08016e5c .word 0x08016e5c
800b398: 08016e34 .word 0x08016e34
0800b39c <sys_check_timeouts>:
*
* Must be called periodically from your main loop.
*/
void
sys_check_timeouts(void)
{
800b39c: b580 push {r7, lr}
800b39e: b084 sub sp, #16
800b3a0: 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();
800b3a2: f7f8 fd77 bl 8003e94 <sys_now>
800b3a6: 60f8 str r0, [r7, #12]
do {
struct sys_timeo *tmptimeout;
sys_timeout_handler handler;
void *arg;
PBUF_CHECK_FREE_OOSEQ();
800b3a8: 4b1a ldr r3, [pc, #104] ; (800b414 <sys_check_timeouts+0x78>)
800b3aa: 781b ldrb r3, [r3, #0]
800b3ac: b2db uxtb r3, r3
800b3ae: 2b00 cmp r3, #0
800b3b0: d001 beq.n 800b3b6 <sys_check_timeouts+0x1a>
800b3b2: f7f9 ffb7 bl 8005324 <pbuf_free_ooseq>
tmptimeout = next_timeout;
800b3b6: 4b18 ldr r3, [pc, #96] ; (800b418 <sys_check_timeouts+0x7c>)
800b3b8: 681b ldr r3, [r3, #0]
800b3ba: 60bb str r3, [r7, #8]
if (tmptimeout == NULL) {
800b3bc: 68bb ldr r3, [r7, #8]
800b3be: 2b00 cmp r3, #0
800b3c0: d022 beq.n 800b408 <sys_check_timeouts+0x6c>
return;
}
if (TIME_LESS_THAN(now, tmptimeout->time)) {
800b3c2: 68bb ldr r3, [r7, #8]
800b3c4: 685b ldr r3, [r3, #4]
800b3c6: 68fa ldr r2, [r7, #12]
800b3c8: 1ad3 subs r3, r2, r3
800b3ca: 0fdb lsrs r3, r3, #31
800b3cc: f003 0301 and.w r3, r3, #1
800b3d0: b2db uxtb r3, r3
800b3d2: 2b00 cmp r3, #0
800b3d4: d11a bne.n 800b40c <sys_check_timeouts+0x70>
return;
}
/* Timeout has expired */
next_timeout = tmptimeout->next;
800b3d6: 68bb ldr r3, [r7, #8]
800b3d8: 681b ldr r3, [r3, #0]
800b3da: 4a0f ldr r2, [pc, #60] ; (800b418 <sys_check_timeouts+0x7c>)
800b3dc: 6013 str r3, [r2, #0]
handler = tmptimeout->h;
800b3de: 68bb ldr r3, [r7, #8]
800b3e0: 689b ldr r3, [r3, #8]
800b3e2: 607b str r3, [r7, #4]
arg = tmptimeout->arg;
800b3e4: 68bb ldr r3, [r7, #8]
800b3e6: 68db ldr r3, [r3, #12]
800b3e8: 603b str r3, [r7, #0]
current_timeout_due_time = tmptimeout->time;
800b3ea: 68bb ldr r3, [r7, #8]
800b3ec: 685b ldr r3, [r3, #4]
800b3ee: 4a0b ldr r2, [pc, #44] ; (800b41c <sys_check_timeouts+0x80>)
800b3f0: 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);
800b3f2: 68b9 ldr r1, [r7, #8]
800b3f4: 2006 movs r0, #6
800b3f6: f7f9 fc4d bl 8004c94 <memp_free>
if (handler != NULL) {
800b3fa: 687b ldr r3, [r7, #4]
800b3fc: 2b00 cmp r3, #0
800b3fe: d0d3 beq.n 800b3a8 <sys_check_timeouts+0xc>
handler(arg);
800b400: 687b ldr r3, [r7, #4]
800b402: 6838 ldr r0, [r7, #0]
800b404: 4798 blx r3
do {
800b406: e7cf b.n 800b3a8 <sys_check_timeouts+0xc>
return;
800b408: bf00 nop
800b40a: e000 b.n 800b40e <sys_check_timeouts+0x72>
return;
800b40c: bf00 nop
}
LWIP_TCPIP_THREAD_ALIVE();
/* Repeat until all expired timers have been called */
} while (1);
}
800b40e: 3710 adds r7, #16
800b410: 46bd mov sp, r7
800b412: bd80 pop {r7, pc}
800b414: 20008bfd .word 0x20008bfd
800b418: 20008c50 .word 0x20008c50
800b41c: 20008c54 .word 0x20008c54
0800b420 <udp_init>:
/**
* Initialize this module.
*/
void
udp_init(void)
{
800b420: b580 push {r7, lr}
800b422: af00 add r7, sp, #0
#ifdef LWIP_RAND
udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());
800b424: f004 ffe6 bl 80103f4 <rand>
800b428: 4603 mov r3, r0
800b42a: b29b uxth r3, r3
800b42c: f3c3 030d ubfx r3, r3, #0, #14
800b430: b29b uxth r3, r3
800b432: f5a3 4380 sub.w r3, r3, #16384 ; 0x4000
800b436: b29a uxth r2, r3
800b438: 4b01 ldr r3, [pc, #4] ; (800b440 <udp_init+0x20>)
800b43a: 801a strh r2, [r3, #0]
#endif /* LWIP_RAND */
}
800b43c: bf00 nop
800b43e: bd80 pop {r7, pc}
800b440: 20000028 .word 0x20000028
0800b444 <udp_new_port>:
*
* @return a new (free) local UDP port number
*/
static u16_t
udp_new_port(void)
{
800b444: b480 push {r7}
800b446: b083 sub sp, #12
800b448: af00 add r7, sp, #0
u16_t n = 0;
800b44a: 2300 movs r3, #0
800b44c: 80fb strh r3, [r7, #6]
struct udp_pcb *pcb;
again:
if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) {
800b44e: 4b17 ldr r3, [pc, #92] ; (800b4ac <udp_new_port+0x68>)
800b450: 881b ldrh r3, [r3, #0]
800b452: 1c5a adds r2, r3, #1
800b454: b291 uxth r1, r2
800b456: 4a15 ldr r2, [pc, #84] ; (800b4ac <udp_new_port+0x68>)
800b458: 8011 strh r1, [r2, #0]
800b45a: f64f 72ff movw r2, #65535 ; 0xffff
800b45e: 4293 cmp r3, r2
800b460: d103 bne.n 800b46a <udp_new_port+0x26>
udp_port = UDP_LOCAL_PORT_RANGE_START;
800b462: 4b12 ldr r3, [pc, #72] ; (800b4ac <udp_new_port+0x68>)
800b464: f44f 4240 mov.w r2, #49152 ; 0xc000
800b468: 801a strh r2, [r3, #0]
}
/* Check all PCBs. */
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
800b46a: 4b11 ldr r3, [pc, #68] ; (800b4b0 <udp_new_port+0x6c>)
800b46c: 681b ldr r3, [r3, #0]
800b46e: 603b str r3, [r7, #0]
800b470: e011 b.n 800b496 <udp_new_port+0x52>
if (pcb->local_port == udp_port) {
800b472: 683b ldr r3, [r7, #0]
800b474: 8a5a ldrh r2, [r3, #18]
800b476: 4b0d ldr r3, [pc, #52] ; (800b4ac <udp_new_port+0x68>)
800b478: 881b ldrh r3, [r3, #0]
800b47a: 429a cmp r2, r3
800b47c: d108 bne.n 800b490 <udp_new_port+0x4c>
if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) {
800b47e: 88fb ldrh r3, [r7, #6]
800b480: 3301 adds r3, #1
800b482: 80fb strh r3, [r7, #6]
800b484: 88fb ldrh r3, [r7, #6]
800b486: f5b3 4f80 cmp.w r3, #16384 ; 0x4000
800b48a: d3e0 bcc.n 800b44e <udp_new_port+0xa>
return 0;
800b48c: 2300 movs r3, #0
800b48e: e007 b.n 800b4a0 <udp_new_port+0x5c>
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
800b490: 683b ldr r3, [r7, #0]
800b492: 68db ldr r3, [r3, #12]
800b494: 603b str r3, [r7, #0]
800b496: 683b ldr r3, [r7, #0]
800b498: 2b00 cmp r3, #0
800b49a: d1ea bne.n 800b472 <udp_new_port+0x2e>
}
goto again;
}
}
return udp_port;
800b49c: 4b03 ldr r3, [pc, #12] ; (800b4ac <udp_new_port+0x68>)
800b49e: 881b ldrh r3, [r3, #0]
}
800b4a0: 4618 mov r0, r3
800b4a2: 370c adds r7, #12
800b4a4: 46bd mov sp, r7
800b4a6: f85d 7b04 ldr.w r7, [sp], #4
800b4aa: 4770 bx lr
800b4ac: 20000028 .word 0x20000028
800b4b0: 20008c5c .word 0x20008c5c
0800b4b4 <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)
{
800b4b4: b580 push {r7, lr}
800b4b6: b084 sub sp, #16
800b4b8: af00 add r7, sp, #0
800b4ba: 60f8 str r0, [r7, #12]
800b4bc: 60b9 str r1, [r7, #8]
800b4be: 4613 mov r3, r2
800b4c0: 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);
800b4c2: 68fb ldr r3, [r7, #12]
800b4c4: 2b00 cmp r3, #0
800b4c6: d105 bne.n 800b4d4 <udp_input_local_match+0x20>
800b4c8: 4b27 ldr r3, [pc, #156] ; (800b568 <udp_input_local_match+0xb4>)
800b4ca: 2287 movs r2, #135 ; 0x87
800b4cc: 4927 ldr r1, [pc, #156] ; (800b56c <udp_input_local_match+0xb8>)
800b4ce: 4828 ldr r0, [pc, #160] ; (800b570 <udp_input_local_match+0xbc>)
800b4d0: f004 ff7e bl 80103d0 <printf>
LWIP_ASSERT("udp_input_local_match: invalid netif", inp != NULL);
800b4d4: 68bb ldr r3, [r7, #8]
800b4d6: 2b00 cmp r3, #0
800b4d8: d105 bne.n 800b4e6 <udp_input_local_match+0x32>
800b4da: 4b23 ldr r3, [pc, #140] ; (800b568 <udp_input_local_match+0xb4>)
800b4dc: 2288 movs r2, #136 ; 0x88
800b4de: 4925 ldr r1, [pc, #148] ; (800b574 <udp_input_local_match+0xc0>)
800b4e0: 4823 ldr r0, [pc, #140] ; (800b570 <udp_input_local_match+0xbc>)
800b4e2: f004 ff75 bl 80103d0 <printf>
/* check if PCB is bound to specific netif */
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
800b4e6: 68fb ldr r3, [r7, #12]
800b4e8: 7a1b ldrb r3, [r3, #8]
800b4ea: 2b00 cmp r3, #0
800b4ec: d00b beq.n 800b506 <udp_input_local_match+0x52>
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
800b4ee: 68fb ldr r3, [r7, #12]
800b4f0: 7a1a ldrb r2, [r3, #8]
800b4f2: 4b21 ldr r3, [pc, #132] ; (800b578 <udp_input_local_match+0xc4>)
800b4f4: 685b ldr r3, [r3, #4]
800b4f6: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
800b4fa: 3301 adds r3, #1
800b4fc: b2db uxtb r3, r3
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
800b4fe: 429a cmp r2, r3
800b500: d001 beq.n 800b506 <udp_input_local_match+0x52>
return 0;
800b502: 2300 movs r3, #0
800b504: e02b b.n 800b55e <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) {
800b506: 79fb ldrb r3, [r7, #7]
800b508: 2b00 cmp r3, #0
800b50a: d018 beq.n 800b53e <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)) ||
800b50c: 68fb ldr r3, [r7, #12]
800b50e: 2b00 cmp r3, #0
800b510: d013 beq.n 800b53a <udp_input_local_match+0x86>
800b512: 68fb ldr r3, [r7, #12]
800b514: 681b ldr r3, [r3, #0]
800b516: 2b00 cmp r3, #0
800b518: d00f beq.n 800b53a <udp_input_local_match+0x86>
((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) ||
800b51a: 4b17 ldr r3, [pc, #92] ; (800b578 <udp_input_local_match+0xc4>)
800b51c: 695b ldr r3, [r3, #20]
if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
800b51e: f1b3 3fff cmp.w r3, #4294967295
800b522: d00a beq.n 800b53a <udp_input_local_match+0x86>
ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) {
800b524: 68fb ldr r3, [r7, #12]
800b526: 681a ldr r2, [r3, #0]
800b528: 4b13 ldr r3, [pc, #76] ; (800b578 <udp_input_local_match+0xc4>)
800b52a: 695b ldr r3, [r3, #20]
800b52c: 405a eors r2, r3
800b52e: 68bb ldr r3, [r7, #8]
800b530: 3308 adds r3, #8
800b532: 681b ldr r3, [r3, #0]
800b534: 4013 ands r3, r2
((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) ||
800b536: 2b00 cmp r3, #0
800b538: d110 bne.n 800b55c <udp_input_local_match+0xa8>
return 1;
800b53a: 2301 movs r3, #1
800b53c: e00f b.n 800b55e <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())) {
800b53e: 68fb ldr r3, [r7, #12]
800b540: 2b00 cmp r3, #0
800b542: d009 beq.n 800b558 <udp_input_local_match+0xa4>
800b544: 68fb ldr r3, [r7, #12]
800b546: 681b ldr r3, [r3, #0]
800b548: 2b00 cmp r3, #0
800b54a: d005 beq.n 800b558 <udp_input_local_match+0xa4>
800b54c: 68fb ldr r3, [r7, #12]
800b54e: 681a ldr r2, [r3, #0]
800b550: 4b09 ldr r3, [pc, #36] ; (800b578 <udp_input_local_match+0xc4>)
800b552: 695b ldr r3, [r3, #20]
800b554: 429a cmp r2, r3
800b556: d101 bne.n 800b55c <udp_input_local_match+0xa8>
return 1;
800b558: 2301 movs r3, #1
800b55a: e000 b.n 800b55e <udp_input_local_match+0xaa>
}
}
return 0;
800b55c: 2300 movs r3, #0
}
800b55e: 4618 mov r0, r3
800b560: 3710 adds r7, #16
800b562: 46bd mov sp, r7
800b564: bd80 pop {r7, pc}
800b566: bf00 nop
800b568: 08016ea8 .word 0x08016ea8
800b56c: 08016ed8 .word 0x08016ed8
800b570: 08016efc .word 0x08016efc
800b574: 08016f24 .word 0x08016f24
800b578: 20005670 .word 0x20005670
0800b57c <udp_input>:
* @param inp network interface on which the datagram was received.
*
*/
void
udp_input(struct pbuf *p, struct netif *inp)
{
800b57c: b590 push {r4, r7, lr}
800b57e: b08d sub sp, #52 ; 0x34
800b580: af02 add r7, sp, #8
800b582: 6078 str r0, [r7, #4]
800b584: 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;
800b586: 2300 movs r3, #0
800b588: 76fb strb r3, [r7, #27]
LWIP_UNUSED_ARG(inp);
LWIP_ASSERT_CORE_LOCKED();
LWIP_ASSERT("udp_input: invalid pbuf", p != NULL);
800b58a: 687b ldr r3, [r7, #4]
800b58c: 2b00 cmp r3, #0
800b58e: d105 bne.n 800b59c <udp_input+0x20>
800b590: 4b7c ldr r3, [pc, #496] ; (800b784 <udp_input+0x208>)
800b592: 22cf movs r2, #207 ; 0xcf
800b594: 497c ldr r1, [pc, #496] ; (800b788 <udp_input+0x20c>)
800b596: 487d ldr r0, [pc, #500] ; (800b78c <udp_input+0x210>)
800b598: f004 ff1a bl 80103d0 <printf>
LWIP_ASSERT("udp_input: invalid netif", inp != NULL);
800b59c: 683b ldr r3, [r7, #0]
800b59e: 2b00 cmp r3, #0
800b5a0: d105 bne.n 800b5ae <udp_input+0x32>
800b5a2: 4b78 ldr r3, [pc, #480] ; (800b784 <udp_input+0x208>)
800b5a4: 22d0 movs r2, #208 ; 0xd0
800b5a6: 497a ldr r1, [pc, #488] ; (800b790 <udp_input+0x214>)
800b5a8: 4878 ldr r0, [pc, #480] ; (800b78c <udp_input+0x210>)
800b5aa: f004 ff11 bl 80103d0 <printf>
PERF_START;
UDP_STATS_INC(udp.recv);
/* Check minimum length (UDP header) */
if (p->len < UDP_HLEN) {
800b5ae: 687b ldr r3, [r7, #4]
800b5b0: 895b ldrh r3, [r3, #10]
800b5b2: 2b07 cmp r3, #7
800b5b4: d803 bhi.n 800b5be <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);
800b5b6: 6878 ldr r0, [r7, #4]
800b5b8: f7fa f9ee bl 8005998 <pbuf_free>
goto end;
800b5bc: e0de b.n 800b77c <udp_input+0x200>
}
udphdr = (struct udp_hdr *)p->payload;
800b5be: 687b ldr r3, [r7, #4]
800b5c0: 685b ldr r3, [r3, #4]
800b5c2: 617b str r3, [r7, #20]
/* is broadcast packet ? */
broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif());
800b5c4: 4b73 ldr r3, [pc, #460] ; (800b794 <udp_input+0x218>)
800b5c6: 695b ldr r3, [r3, #20]
800b5c8: 4a72 ldr r2, [pc, #456] ; (800b794 <udp_input+0x218>)
800b5ca: 6812 ldr r2, [r2, #0]
800b5cc: 4611 mov r1, r2
800b5ce: 4618 mov r0, r3
800b5d0: f003 fe06 bl 800f1e0 <ip4_addr_isbroadcast_u32>
800b5d4: 4603 mov r3, r0
800b5d6: 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);
800b5d8: 697b ldr r3, [r7, #20]
800b5da: 881b ldrh r3, [r3, #0]
800b5dc: b29b uxth r3, r3
800b5de: 4618 mov r0, r3
800b5e0: f7f8 fe70 bl 80042c4 <lwip_htons>
800b5e4: 4603 mov r3, r0
800b5e6: 823b strh r3, [r7, #16]
dest = lwip_ntohs(udphdr->dest);
800b5e8: 697b ldr r3, [r7, #20]
800b5ea: 885b ldrh r3, [r3, #2]
800b5ec: b29b uxth r3, r3
800b5ee: 4618 mov r0, r3
800b5f0: f7f8 fe68 bl 80042c4 <lwip_htons>
800b5f4: 4603 mov r3, r0
800b5f6: 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;
800b5f8: 2300 movs r3, #0
800b5fa: 627b str r3, [r7, #36] ; 0x24
prev = NULL;
800b5fc: 2300 movs r3, #0
800b5fe: 623b str r3, [r7, #32]
uncon_pcb = NULL;
800b600: 2300 movs r3, #0
800b602: 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) {
800b604: 4b64 ldr r3, [pc, #400] ; (800b798 <udp_input+0x21c>)
800b606: 681b ldr r3, [r3, #0]
800b608: 627b str r3, [r7, #36] ; 0x24
800b60a: e054 b.n 800b6b6 <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) &&
800b60c: 6a7b ldr r3, [r7, #36] ; 0x24
800b60e: 8a5b ldrh r3, [r3, #18]
800b610: 89fa ldrh r2, [r7, #14]
800b612: 429a cmp r2, r3
800b614: d14a bne.n 800b6ac <udp_input+0x130>
(udp_input_local_match(pcb, inp, broadcast) != 0)) {
800b616: 7cfb ldrb r3, [r7, #19]
800b618: 461a mov r2, r3
800b61a: 6839 ldr r1, [r7, #0]
800b61c: 6a78 ldr r0, [r7, #36] ; 0x24
800b61e: f7ff ff49 bl 800b4b4 <udp_input_local_match>
800b622: 4603 mov r3, r0
if ((pcb->local_port == dest) &&
800b624: 2b00 cmp r3, #0
800b626: d041 beq.n 800b6ac <udp_input+0x130>
if ((pcb->flags & UDP_FLAGS_CONNECTED) == 0) {
800b628: 6a7b ldr r3, [r7, #36] ; 0x24
800b62a: 7c1b ldrb r3, [r3, #16]
800b62c: f003 0304 and.w r3, r3, #4
800b630: 2b00 cmp r3, #0
800b632: d11d bne.n 800b670 <udp_input+0xf4>
if (uncon_pcb == NULL) {
800b634: 69fb ldr r3, [r7, #28]
800b636: 2b00 cmp r3, #0
800b638: d102 bne.n 800b640 <udp_input+0xc4>
/* the first unconnected matching PCB */
uncon_pcb = pcb;
800b63a: 6a7b ldr r3, [r7, #36] ; 0x24
800b63c: 61fb str r3, [r7, #28]
800b63e: e017 b.n 800b670 <udp_input+0xf4>
#if LWIP_IPV4
} else if (broadcast && ip4_current_dest_addr()->addr == IPADDR_BROADCAST) {
800b640: 7cfb ldrb r3, [r7, #19]
800b642: 2b00 cmp r3, #0
800b644: d014 beq.n 800b670 <udp_input+0xf4>
800b646: 4b53 ldr r3, [pc, #332] ; (800b794 <udp_input+0x218>)
800b648: 695b ldr r3, [r3, #20]
800b64a: f1b3 3fff cmp.w r3, #4294967295
800b64e: d10f bne.n 800b670 <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))) {
800b650: 69fb ldr r3, [r7, #28]
800b652: 681a ldr r2, [r3, #0]
800b654: 683b ldr r3, [r7, #0]
800b656: 3304 adds r3, #4
800b658: 681b ldr r3, [r3, #0]
800b65a: 429a cmp r2, r3
800b65c: d008 beq.n 800b670 <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))) {
800b65e: 6a7b ldr r3, [r7, #36] ; 0x24
800b660: 681a ldr r2, [r3, #0]
800b662: 683b ldr r3, [r7, #0]
800b664: 3304 adds r3, #4
800b666: 681b ldr r3, [r3, #0]
800b668: 429a cmp r2, r3
800b66a: d101 bne.n 800b670 <udp_input+0xf4>
/* better match */
uncon_pcb = pcb;
800b66c: 6a7b ldr r3, [r7, #36] ; 0x24
800b66e: 61fb str r3, [r7, #28]
}
#endif /* SO_REUSE */
}
/* compare PCB remote addr+port to UDP source addr+port */
if ((pcb->remote_port == src) &&
800b670: 6a7b ldr r3, [r7, #36] ; 0x24
800b672: 8a9b ldrh r3, [r3, #20]
800b674: 8a3a ldrh r2, [r7, #16]
800b676: 429a cmp r2, r3
800b678: d118 bne.n 800b6ac <udp_input+0x130>
(ip_addr_isany_val(pcb->remote_ip) ||
800b67a: 6a7b ldr r3, [r7, #36] ; 0x24
800b67c: 685b ldr r3, [r3, #4]
if ((pcb->remote_port == src) &&
800b67e: 2b00 cmp r3, #0
800b680: d005 beq.n 800b68e <udp_input+0x112>
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) {
800b682: 6a7b ldr r3, [r7, #36] ; 0x24
800b684: 685a ldr r2, [r3, #4]
800b686: 4b43 ldr r3, [pc, #268] ; (800b794 <udp_input+0x218>)
800b688: 691b ldr r3, [r3, #16]
(ip_addr_isany_val(pcb->remote_ip) ||
800b68a: 429a cmp r2, r3
800b68c: d10e bne.n 800b6ac <udp_input+0x130>
/* the first fully matching PCB */
if (prev != NULL) {
800b68e: 6a3b ldr r3, [r7, #32]
800b690: 2b00 cmp r3, #0
800b692: d014 beq.n 800b6be <udp_input+0x142>
/* move the pcb to the front of udp_pcbs so that is
found faster next time */
prev->next = pcb->next;
800b694: 6a7b ldr r3, [r7, #36] ; 0x24
800b696: 68da ldr r2, [r3, #12]
800b698: 6a3b ldr r3, [r7, #32]
800b69a: 60da str r2, [r3, #12]
pcb->next = udp_pcbs;
800b69c: 4b3e ldr r3, [pc, #248] ; (800b798 <udp_input+0x21c>)
800b69e: 681a ldr r2, [r3, #0]
800b6a0: 6a7b ldr r3, [r7, #36] ; 0x24
800b6a2: 60da str r2, [r3, #12]
udp_pcbs = pcb;
800b6a4: 4a3c ldr r2, [pc, #240] ; (800b798 <udp_input+0x21c>)
800b6a6: 6a7b ldr r3, [r7, #36] ; 0x24
800b6a8: 6013 str r3, [r2, #0]
} else {
UDP_STATS_INC(udp.cachehit);
}
break;
800b6aa: e008 b.n 800b6be <udp_input+0x142>
}
}
prev = pcb;
800b6ac: 6a7b ldr r3, [r7, #36] ; 0x24
800b6ae: 623b str r3, [r7, #32]
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
800b6b0: 6a7b ldr r3, [r7, #36] ; 0x24
800b6b2: 68db ldr r3, [r3, #12]
800b6b4: 627b str r3, [r7, #36] ; 0x24
800b6b6: 6a7b ldr r3, [r7, #36] ; 0x24
800b6b8: 2b00 cmp r3, #0
800b6ba: d1a7 bne.n 800b60c <udp_input+0x90>
800b6bc: e000 b.n 800b6c0 <udp_input+0x144>
break;
800b6be: bf00 nop
}
/* no fully matching pcb found? then look for an unconnected pcb */
if (pcb == NULL) {
800b6c0: 6a7b ldr r3, [r7, #36] ; 0x24
800b6c2: 2b00 cmp r3, #0
800b6c4: d101 bne.n 800b6ca <udp_input+0x14e>
pcb = uncon_pcb;
800b6c6: 69fb ldr r3, [r7, #28]
800b6c8: 627b str r3, [r7, #36] ; 0x24
}
/* Check checksum if this is a match or if it was directed at us. */
if (pcb != NULL) {
800b6ca: 6a7b ldr r3, [r7, #36] ; 0x24
800b6cc: 2b00 cmp r3, #0
800b6ce: d002 beq.n 800b6d6 <udp_input+0x15a>
for_us = 1;
800b6d0: 2301 movs r3, #1
800b6d2: 76fb strb r3, [r7, #27]
800b6d4: e00a b.n 800b6ec <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());
800b6d6: 683b ldr r3, [r7, #0]
800b6d8: 3304 adds r3, #4
800b6da: 681a ldr r2, [r3, #0]
800b6dc: 4b2d ldr r3, [pc, #180] ; (800b794 <udp_input+0x218>)
800b6de: 695b ldr r3, [r3, #20]
800b6e0: 429a cmp r2, r3
800b6e2: bf0c ite eq
800b6e4: 2301 moveq r3, #1
800b6e6: 2300 movne r3, #0
800b6e8: b2db uxtb r3, r3
800b6ea: 76fb strb r3, [r7, #27]
}
#endif /* LWIP_IPV4 */
}
if (for_us) {
800b6ec: 7efb ldrb r3, [r7, #27]
800b6ee: 2b00 cmp r3, #0
800b6f0: d041 beq.n 800b776 <udp_input+0x1fa>
}
}
}
}
#endif /* CHECKSUM_CHECK_UDP */
if (pbuf_remove_header(p, UDP_HLEN)) {
800b6f2: 2108 movs r1, #8
800b6f4: 6878 ldr r0, [r7, #4]
800b6f6: f7fa f8c9 bl 800588c <pbuf_remove_header>
800b6fa: 4603 mov r3, r0
800b6fc: 2b00 cmp r3, #0
800b6fe: d00a beq.n 800b716 <udp_input+0x19a>
/* Can we cope with this failing? Just assert for now */
LWIP_ASSERT("pbuf_remove_header failed\n", 0);
800b700: 4b20 ldr r3, [pc, #128] ; (800b784 <udp_input+0x208>)
800b702: f44f 72b8 mov.w r2, #368 ; 0x170
800b706: 4925 ldr r1, [pc, #148] ; (800b79c <udp_input+0x220>)
800b708: 4820 ldr r0, [pc, #128] ; (800b78c <udp_input+0x210>)
800b70a: f004 fe61 bl 80103d0 <printf>
UDP_STATS_INC(udp.drop);
MIB2_STATS_INC(mib2.udpinerrors);
pbuf_free(p);
800b70e: 6878 ldr r0, [r7, #4]
800b710: f7fa f942 bl 8005998 <pbuf_free>
goto end;
800b714: e032 b.n 800b77c <udp_input+0x200>
}
if (pcb != NULL) {
800b716: 6a7b ldr r3, [r7, #36] ; 0x24
800b718: 2b00 cmp r3, #0
800b71a: d012 beq.n 800b742 <udp_input+0x1c6>
}
}
}
#endif /* SO_REUSE && SO_REUSE_RXTOALL */
/* callback */
if (pcb->recv != NULL) {
800b71c: 6a7b ldr r3, [r7, #36] ; 0x24
800b71e: 699b ldr r3, [r3, #24]
800b720: 2b00 cmp r3, #0
800b722: d00a beq.n 800b73a <udp_input+0x1be>
/* now the recv function is responsible for freeing p */
pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src);
800b724: 6a7b ldr r3, [r7, #36] ; 0x24
800b726: 699c ldr r4, [r3, #24]
800b728: 6a7b ldr r3, [r7, #36] ; 0x24
800b72a: 69d8 ldr r0, [r3, #28]
800b72c: 8a3b ldrh r3, [r7, #16]
800b72e: 9300 str r3, [sp, #0]
800b730: 4b1b ldr r3, [pc, #108] ; (800b7a0 <udp_input+0x224>)
800b732: 687a ldr r2, [r7, #4]
800b734: 6a79 ldr r1, [r7, #36] ; 0x24
800b736: 47a0 blx r4
} else {
pbuf_free(p);
}
end:
PERF_STOP("udp_input");
return;
800b738: e021 b.n 800b77e <udp_input+0x202>
pbuf_free(p);
800b73a: 6878 ldr r0, [r7, #4]
800b73c: f7fa f92c bl 8005998 <pbuf_free>
goto end;
800b740: e01c b.n 800b77c <udp_input+0x200>
if (!broadcast && !ip_addr_ismulticast(ip_current_dest_addr())) {
800b742: 7cfb ldrb r3, [r7, #19]
800b744: 2b00 cmp r3, #0
800b746: d112 bne.n 800b76e <udp_input+0x1f2>
800b748: 4b12 ldr r3, [pc, #72] ; (800b794 <udp_input+0x218>)
800b74a: 695b ldr r3, [r3, #20]
800b74c: f003 03f0 and.w r3, r3, #240 ; 0xf0
800b750: 2be0 cmp r3, #224 ; 0xe0
800b752: d00c beq.n 800b76e <udp_input+0x1f2>
pbuf_header_force(p, (s16_t)(ip_current_header_tot_len() + UDP_HLEN));
800b754: 4b0f ldr r3, [pc, #60] ; (800b794 <udp_input+0x218>)
800b756: 899b ldrh r3, [r3, #12]
800b758: 3308 adds r3, #8
800b75a: b29b uxth r3, r3
800b75c: b21b sxth r3, r3
800b75e: 4619 mov r1, r3
800b760: 6878 ldr r0, [r7, #4]
800b762: f7fa f906 bl 8005972 <pbuf_header_force>
icmp_port_unreach(ip_current_is_v6(), p);
800b766: 2103 movs r1, #3
800b768: 6878 ldr r0, [r7, #4]
800b76a: f003 f9fb bl 800eb64 <icmp_dest_unreach>
pbuf_free(p);
800b76e: 6878 ldr r0, [r7, #4]
800b770: f7fa f912 bl 8005998 <pbuf_free>
return;
800b774: e003 b.n 800b77e <udp_input+0x202>
pbuf_free(p);
800b776: 6878 ldr r0, [r7, #4]
800b778: f7fa f90e bl 8005998 <pbuf_free>
return;
800b77c: bf00 nop
UDP_STATS_INC(udp.drop);
MIB2_STATS_INC(mib2.udpinerrors);
pbuf_free(p);
PERF_STOP("udp_input");
#endif /* CHECKSUM_CHECK_UDP */
}
800b77e: 372c adds r7, #44 ; 0x2c
800b780: 46bd mov sp, r7
800b782: bd90 pop {r4, r7, pc}
800b784: 08016ea8 .word 0x08016ea8
800b788: 08016f4c .word 0x08016f4c
800b78c: 08016efc .word 0x08016efc
800b790: 08016f64 .word 0x08016f64
800b794: 20005670 .word 0x20005670
800b798: 20008c5c .word 0x20008c5c
800b79c: 08016f80 .word 0x08016f80
800b7a0: 20005680 .word 0x20005680
0800b7a4 <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)
{
800b7a4: b580 push {r7, lr}
800b7a6: b088 sub sp, #32
800b7a8: af02 add r7, sp, #8
800b7aa: 60f8 str r0, [r7, #12]
800b7ac: 60b9 str r1, [r7, #8]
800b7ae: 607a str r2, [r7, #4]
800b7b0: 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);
800b7b2: 68fb ldr r3, [r7, #12]
800b7b4: 2b00 cmp r3, #0
800b7b6: d109 bne.n 800b7cc <udp_sendto_if+0x28>
800b7b8: 4b2e ldr r3, [pc, #184] ; (800b874 <udp_sendto_if+0xd0>)
800b7ba: f44f 7220 mov.w r2, #640 ; 0x280
800b7be: 492e ldr r1, [pc, #184] ; (800b878 <udp_sendto_if+0xd4>)
800b7c0: 482e ldr r0, [pc, #184] ; (800b87c <udp_sendto_if+0xd8>)
800b7c2: f004 fe05 bl 80103d0 <printf>
800b7c6: f06f 030f mvn.w r3, #15
800b7ca: e04f b.n 800b86c <udp_sendto_if+0xc8>
LWIP_ERROR("udp_sendto_if: invalid pbuf", p != NULL, return ERR_ARG);
800b7cc: 68bb ldr r3, [r7, #8]
800b7ce: 2b00 cmp r3, #0
800b7d0: d109 bne.n 800b7e6 <udp_sendto_if+0x42>
800b7d2: 4b28 ldr r3, [pc, #160] ; (800b874 <udp_sendto_if+0xd0>)
800b7d4: f240 2281 movw r2, #641 ; 0x281
800b7d8: 4929 ldr r1, [pc, #164] ; (800b880 <udp_sendto_if+0xdc>)
800b7da: 4828 ldr r0, [pc, #160] ; (800b87c <udp_sendto_if+0xd8>)
800b7dc: f004 fdf8 bl 80103d0 <printf>
800b7e0: f06f 030f mvn.w r3, #15
800b7e4: e042 b.n 800b86c <udp_sendto_if+0xc8>
LWIP_ERROR("udp_sendto_if: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
800b7e6: 687b ldr r3, [r7, #4]
800b7e8: 2b00 cmp r3, #0
800b7ea: d109 bne.n 800b800 <udp_sendto_if+0x5c>
800b7ec: 4b21 ldr r3, [pc, #132] ; (800b874 <udp_sendto_if+0xd0>)
800b7ee: f240 2282 movw r2, #642 ; 0x282
800b7f2: 4924 ldr r1, [pc, #144] ; (800b884 <udp_sendto_if+0xe0>)
800b7f4: 4821 ldr r0, [pc, #132] ; (800b87c <udp_sendto_if+0xd8>)
800b7f6: f004 fdeb bl 80103d0 <printf>
800b7fa: f06f 030f mvn.w r3, #15
800b7fe: e035 b.n 800b86c <udp_sendto_if+0xc8>
LWIP_ERROR("udp_sendto_if: invalid netif", netif != NULL, return ERR_ARG);
800b800: 6a3b ldr r3, [r7, #32]
800b802: 2b00 cmp r3, #0
800b804: d109 bne.n 800b81a <udp_sendto_if+0x76>
800b806: 4b1b ldr r3, [pc, #108] ; (800b874 <udp_sendto_if+0xd0>)
800b808: f240 2283 movw r2, #643 ; 0x283
800b80c: 491e ldr r1, [pc, #120] ; (800b888 <udp_sendto_if+0xe4>)
800b80e: 481b ldr r0, [pc, #108] ; (800b87c <udp_sendto_if+0xd8>)
800b810: f004 fdde bl 80103d0 <printf>
800b814: f06f 030f mvn.w r3, #15
800b818: e028 b.n 800b86c <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)) ||
800b81a: 68fb ldr r3, [r7, #12]
800b81c: 2b00 cmp r3, #0
800b81e: d009 beq.n 800b834 <udp_sendto_if+0x90>
800b820: 68fb ldr r3, [r7, #12]
800b822: 681b ldr r3, [r3, #0]
800b824: 2b00 cmp r3, #0
800b826: d005 beq.n 800b834 <udp_sendto_if+0x90>
ip4_addr_ismulticast(ip_2_ip4(&pcb->local_ip))) {
800b828: 68fb ldr r3, [r7, #12]
800b82a: 681b ldr r3, [r3, #0]
800b82c: f003 03f0 and.w r3, r3, #240 ; 0xf0
if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
800b830: 2be0 cmp r3, #224 ; 0xe0
800b832: d103 bne.n 800b83c <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);
800b834: 6a3b ldr r3, [r7, #32]
800b836: 3304 adds r3, #4
800b838: 617b str r3, [r7, #20]
800b83a: e00b b.n 800b854 <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))) {
800b83c: 68fb ldr r3, [r7, #12]
800b83e: 681a ldr r2, [r3, #0]
800b840: 6a3b ldr r3, [r7, #32]
800b842: 3304 adds r3, #4
800b844: 681b ldr r3, [r3, #0]
800b846: 429a cmp r2, r3
800b848: d002 beq.n 800b850 <udp_sendto_if+0xac>
/* local_ip doesn't match, drop the packet */
return ERR_RTE;
800b84a: f06f 0303 mvn.w r3, #3
800b84e: e00d b.n 800b86c <udp_sendto_if+0xc8>
}
/* use UDP PCB local IP address as source address */
src_ip = &pcb->local_ip;
800b850: 68fb ldr r3, [r7, #12]
800b852: 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);
800b854: 887a ldrh r2, [r7, #2]
800b856: 697b ldr r3, [r7, #20]
800b858: 9301 str r3, [sp, #4]
800b85a: 6a3b ldr r3, [r7, #32]
800b85c: 9300 str r3, [sp, #0]
800b85e: 4613 mov r3, r2
800b860: 687a ldr r2, [r7, #4]
800b862: 68b9 ldr r1, [r7, #8]
800b864: 68f8 ldr r0, [r7, #12]
800b866: f000 f811 bl 800b88c <udp_sendto_if_src>
800b86a: 4603 mov r3, r0
#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */
}
800b86c: 4618 mov r0, r3
800b86e: 3718 adds r7, #24
800b870: 46bd mov sp, r7
800b872: bd80 pop {r7, pc}
800b874: 08016ea8 .word 0x08016ea8
800b878: 0801701c .word 0x0801701c
800b87c: 08016efc .word 0x08016efc
800b880: 08017038 .word 0x08017038
800b884: 08017054 .word 0x08017054
800b888: 08017074 .word 0x08017074
0800b88c <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)
{
800b88c: b580 push {r7, lr}
800b88e: b08c sub sp, #48 ; 0x30
800b890: af04 add r7, sp, #16
800b892: 60f8 str r0, [r7, #12]
800b894: 60b9 str r1, [r7, #8]
800b896: 607a str r2, [r7, #4]
800b898: 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);
800b89a: 68fb ldr r3, [r7, #12]
800b89c: 2b00 cmp r3, #0
800b89e: d109 bne.n 800b8b4 <udp_sendto_if_src+0x28>
800b8a0: 4b65 ldr r3, [pc, #404] ; (800ba38 <udp_sendto_if_src+0x1ac>)
800b8a2: f240 22d1 movw r2, #721 ; 0x2d1
800b8a6: 4965 ldr r1, [pc, #404] ; (800ba3c <udp_sendto_if_src+0x1b0>)
800b8a8: 4865 ldr r0, [pc, #404] ; (800ba40 <udp_sendto_if_src+0x1b4>)
800b8aa: f004 fd91 bl 80103d0 <printf>
800b8ae: f06f 030f mvn.w r3, #15
800b8b2: e0bc b.n 800ba2e <udp_sendto_if_src+0x1a2>
LWIP_ERROR("udp_sendto_if_src: invalid pbuf", p != NULL, return ERR_ARG);
800b8b4: 68bb ldr r3, [r7, #8]
800b8b6: 2b00 cmp r3, #0
800b8b8: d109 bne.n 800b8ce <udp_sendto_if_src+0x42>
800b8ba: 4b5f ldr r3, [pc, #380] ; (800ba38 <udp_sendto_if_src+0x1ac>)
800b8bc: f240 22d2 movw r2, #722 ; 0x2d2
800b8c0: 4960 ldr r1, [pc, #384] ; (800ba44 <udp_sendto_if_src+0x1b8>)
800b8c2: 485f ldr r0, [pc, #380] ; (800ba40 <udp_sendto_if_src+0x1b4>)
800b8c4: f004 fd84 bl 80103d0 <printf>
800b8c8: f06f 030f mvn.w r3, #15
800b8cc: e0af b.n 800ba2e <udp_sendto_if_src+0x1a2>
LWIP_ERROR("udp_sendto_if_src: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
800b8ce: 687b ldr r3, [r7, #4]
800b8d0: 2b00 cmp r3, #0
800b8d2: d109 bne.n 800b8e8 <udp_sendto_if_src+0x5c>
800b8d4: 4b58 ldr r3, [pc, #352] ; (800ba38 <udp_sendto_if_src+0x1ac>)
800b8d6: f240 22d3 movw r2, #723 ; 0x2d3
800b8da: 495b ldr r1, [pc, #364] ; (800ba48 <udp_sendto_if_src+0x1bc>)
800b8dc: 4858 ldr r0, [pc, #352] ; (800ba40 <udp_sendto_if_src+0x1b4>)
800b8de: f004 fd77 bl 80103d0 <printf>
800b8e2: f06f 030f mvn.w r3, #15
800b8e6: e0a2 b.n 800ba2e <udp_sendto_if_src+0x1a2>
LWIP_ERROR("udp_sendto_if_src: invalid src_ip", src_ip != NULL, return ERR_ARG);
800b8e8: 6afb ldr r3, [r7, #44] ; 0x2c
800b8ea: 2b00 cmp r3, #0
800b8ec: d109 bne.n 800b902 <udp_sendto_if_src+0x76>
800b8ee: 4b52 ldr r3, [pc, #328] ; (800ba38 <udp_sendto_if_src+0x1ac>)
800b8f0: f44f 7235 mov.w r2, #724 ; 0x2d4
800b8f4: 4955 ldr r1, [pc, #340] ; (800ba4c <udp_sendto_if_src+0x1c0>)
800b8f6: 4852 ldr r0, [pc, #328] ; (800ba40 <udp_sendto_if_src+0x1b4>)
800b8f8: f004 fd6a bl 80103d0 <printf>
800b8fc: f06f 030f mvn.w r3, #15
800b900: e095 b.n 800ba2e <udp_sendto_if_src+0x1a2>
LWIP_ERROR("udp_sendto_if_src: invalid netif", netif != NULL, return ERR_ARG);
800b902: 6abb ldr r3, [r7, #40] ; 0x28
800b904: 2b00 cmp r3, #0
800b906: d109 bne.n 800b91c <udp_sendto_if_src+0x90>
800b908: 4b4b ldr r3, [pc, #300] ; (800ba38 <udp_sendto_if_src+0x1ac>)
800b90a: f240 22d5 movw r2, #725 ; 0x2d5
800b90e: 4950 ldr r1, [pc, #320] ; (800ba50 <udp_sendto_if_src+0x1c4>)
800b910: 484b ldr r0, [pc, #300] ; (800ba40 <udp_sendto_if_src+0x1b4>)
800b912: f004 fd5d bl 80103d0 <printf>
800b916: f06f 030f mvn.w r3, #15
800b91a: e088 b.n 800ba2e <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) {
800b91c: 68fb ldr r3, [r7, #12]
800b91e: 8a5b ldrh r3, [r3, #18]
800b920: 2b00 cmp r3, #0
800b922: d10f bne.n 800b944 <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);
800b924: 68f9 ldr r1, [r7, #12]
800b926: 68fb ldr r3, [r7, #12]
800b928: 8a5b ldrh r3, [r3, #18]
800b92a: 461a mov r2, r3
800b92c: 68f8 ldr r0, [r7, #12]
800b92e: f000 f893 bl 800ba58 <udp_bind>
800b932: 4603 mov r3, r0
800b934: 76fb strb r3, [r7, #27]
if (err != ERR_OK) {
800b936: f997 301b ldrsb.w r3, [r7, #27]
800b93a: 2b00 cmp r3, #0
800b93c: d002 beq.n 800b944 <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;
800b93e: f997 301b ldrsb.w r3, [r7, #27]
800b942: e074 b.n 800ba2e <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) {
800b944: 68bb ldr r3, [r7, #8]
800b946: 891b ldrh r3, [r3, #8]
800b948: f64f 72f7 movw r2, #65527 ; 0xfff7
800b94c: 4293 cmp r3, r2
800b94e: d902 bls.n 800b956 <udp_sendto_if_src+0xca>
return ERR_MEM;
800b950: f04f 33ff mov.w r3, #4294967295
800b954: e06b b.n 800ba2e <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)) {
800b956: 2108 movs r1, #8
800b958: 68b8 ldr r0, [r7, #8]
800b95a: f7f9 ff87 bl 800586c <pbuf_add_header>
800b95e: 4603 mov r3, r0
800b960: 2b00 cmp r3, #0
800b962: d015 beq.n 800b990 <udp_sendto_if_src+0x104>
/* allocate header in a separate new pbuf */
q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM);
800b964: f44f 7220 mov.w r2, #640 ; 0x280
800b968: 2108 movs r1, #8
800b96a: 2022 movs r0, #34 ; 0x22
800b96c: f7f9 fd30 bl 80053d0 <pbuf_alloc>
800b970: 61f8 str r0, [r7, #28]
/* new header pbuf could not be allocated? */
if (q == NULL) {
800b972: 69fb ldr r3, [r7, #28]
800b974: 2b00 cmp r3, #0
800b976: d102 bne.n 800b97e <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;
800b978: f04f 33ff mov.w r3, #4294967295
800b97c: e057 b.n 800ba2e <udp_sendto_if_src+0x1a2>
}
if (p->tot_len != 0) {
800b97e: 68bb ldr r3, [r7, #8]
800b980: 891b ldrh r3, [r3, #8]
800b982: 2b00 cmp r3, #0
800b984: d006 beq.n 800b994 <udp_sendto_if_src+0x108>
/* chain header q in front of given pbuf p (only if p contains data) */
pbuf_chain(q, p);
800b986: 68b9 ldr r1, [r7, #8]
800b988: 69f8 ldr r0, [r7, #28]
800b98a: f7fa f91d bl 8005bc8 <pbuf_chain>
800b98e: e001 b.n 800b994 <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;
800b990: 68bb ldr r3, [r7, #8]
800b992: 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",
800b994: 69fb ldr r3, [r7, #28]
800b996: 895b ldrh r3, [r3, #10]
800b998: 2b07 cmp r3, #7
800b99a: d806 bhi.n 800b9aa <udp_sendto_if_src+0x11e>
800b99c: 4b26 ldr r3, [pc, #152] ; (800ba38 <udp_sendto_if_src+0x1ac>)
800b99e: f240 320d movw r2, #781 ; 0x30d
800b9a2: 492c ldr r1, [pc, #176] ; (800ba54 <udp_sendto_if_src+0x1c8>)
800b9a4: 4826 ldr r0, [pc, #152] ; (800ba40 <udp_sendto_if_src+0x1b4>)
800b9a6: f004 fd13 bl 80103d0 <printf>
(q->len >= sizeof(struct udp_hdr)));
/* q now represents the packet to be sent */
udphdr = (struct udp_hdr *)q->payload;
800b9aa: 69fb ldr r3, [r7, #28]
800b9ac: 685b ldr r3, [r3, #4]
800b9ae: 617b str r3, [r7, #20]
udphdr->src = lwip_htons(pcb->local_port);
800b9b0: 68fb ldr r3, [r7, #12]
800b9b2: 8a5b ldrh r3, [r3, #18]
800b9b4: 4618 mov r0, r3
800b9b6: f7f8 fc85 bl 80042c4 <lwip_htons>
800b9ba: 4603 mov r3, r0
800b9bc: 461a mov r2, r3
800b9be: 697b ldr r3, [r7, #20]
800b9c0: 801a strh r2, [r3, #0]
udphdr->dest = lwip_htons(dst_port);
800b9c2: 887b ldrh r3, [r7, #2]
800b9c4: 4618 mov r0, r3
800b9c6: f7f8 fc7d bl 80042c4 <lwip_htons>
800b9ca: 4603 mov r3, r0
800b9cc: 461a mov r2, r3
800b9ce: 697b ldr r3, [r7, #20]
800b9d0: 805a strh r2, [r3, #2]
/* in UDP, 0 checksum means 'no checksum' */
udphdr->chksum = 0x0000;
800b9d2: 697b ldr r3, [r7, #20]
800b9d4: 2200 movs r2, #0
800b9d6: 719a strb r2, [r3, #6]
800b9d8: 2200 movs r2, #0
800b9da: 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);
800b9dc: 69fb ldr r3, [r7, #28]
800b9de: 891b ldrh r3, [r3, #8]
800b9e0: 4618 mov r0, r3
800b9e2: f7f8 fc6f bl 80042c4 <lwip_htons>
800b9e6: 4603 mov r3, r0
800b9e8: 461a mov r2, r3
800b9ea: 697b ldr r3, [r7, #20]
800b9ec: 809a strh r2, [r3, #4]
}
udphdr->chksum = udpchksum;
}
}
#endif /* CHECKSUM_GEN_UDP */
ip_proto = IP_PROTO_UDP;
800b9ee: 2311 movs r3, #17
800b9f0: 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;
800b9f2: 68fb ldr r3, [r7, #12]
800b9f4: 7adb ldrb r3, [r3, #11]
800b9f6: 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);
800b9f8: 68fb ldr r3, [r7, #12]
800b9fa: 7a9b ldrb r3, [r3, #10]
800b9fc: 7cb9 ldrb r1, [r7, #18]
800b9fe: 6aba ldr r2, [r7, #40] ; 0x28
800ba00: 9202 str r2, [sp, #8]
800ba02: 7cfa ldrb r2, [r7, #19]
800ba04: 9201 str r2, [sp, #4]
800ba06: 9300 str r3, [sp, #0]
800ba08: 460b mov r3, r1
800ba0a: 687a ldr r2, [r7, #4]
800ba0c: 6af9 ldr r1, [r7, #44] ; 0x2c
800ba0e: 69f8 ldr r0, [r7, #28]
800ba10: f003 fb38 bl 800f084 <ip4_output_if_src>
800ba14: 4603 mov r3, r0
800ba16: 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) {
800ba18: 69fa ldr r2, [r7, #28]
800ba1a: 68bb ldr r3, [r7, #8]
800ba1c: 429a cmp r2, r3
800ba1e: d004 beq.n 800ba2a <udp_sendto_if_src+0x19e>
/* free the header pbuf */
pbuf_free(q);
800ba20: 69f8 ldr r0, [r7, #28]
800ba22: f7f9 ffb9 bl 8005998 <pbuf_free>
q = NULL;
800ba26: 2300 movs r3, #0
800ba28: 61fb str r3, [r7, #28]
/* p is still referenced by the caller, and will live on */
}
UDP_STATS_INC(udp.xmit);
return err;
800ba2a: f997 301b ldrsb.w r3, [r7, #27]
}
800ba2e: 4618 mov r0, r3
800ba30: 3720 adds r7, #32
800ba32: 46bd mov sp, r7
800ba34: bd80 pop {r7, pc}
800ba36: bf00 nop
800ba38: 08016ea8 .word 0x08016ea8
800ba3c: 08017094 .word 0x08017094
800ba40: 08016efc .word 0x08016efc
800ba44: 080170b4 .word 0x080170b4
800ba48: 080170d4 .word 0x080170d4
800ba4c: 080170f8 .word 0x080170f8
800ba50: 0801711c .word 0x0801711c
800ba54: 08017140 .word 0x08017140
0800ba58 <udp_bind>:
*
* @see udp_disconnect()
*/
err_t
udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
{
800ba58: b580 push {r7, lr}
800ba5a: b086 sub sp, #24
800ba5c: af00 add r7, sp, #0
800ba5e: 60f8 str r0, [r7, #12]
800ba60: 60b9 str r1, [r7, #8]
800ba62: 4613 mov r3, r2
800ba64: 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) {
800ba66: 68bb ldr r3, [r7, #8]
800ba68: 2b00 cmp r3, #0
800ba6a: d101 bne.n 800ba70 <udp_bind+0x18>
ipaddr = IP4_ADDR_ANY;
800ba6c: 4b39 ldr r3, [pc, #228] ; (800bb54 <udp_bind+0xfc>)
800ba6e: 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);
800ba70: 68fb ldr r3, [r7, #12]
800ba72: 2b00 cmp r3, #0
800ba74: d109 bne.n 800ba8a <udp_bind+0x32>
800ba76: 4b38 ldr r3, [pc, #224] ; (800bb58 <udp_bind+0x100>)
800ba78: f240 32b7 movw r2, #951 ; 0x3b7
800ba7c: 4937 ldr r1, [pc, #220] ; (800bb5c <udp_bind+0x104>)
800ba7e: 4838 ldr r0, [pc, #224] ; (800bb60 <udp_bind+0x108>)
800ba80: f004 fca6 bl 80103d0 <printf>
800ba84: f06f 030f mvn.w r3, #15
800ba88: e060 b.n 800bb4c <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;
800ba8a: 2300 movs r3, #0
800ba8c: 74fb strb r3, [r7, #19]
/* Check for double bind and rebind of the same pcb */
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
800ba8e: 4b35 ldr r3, [pc, #212] ; (800bb64 <udp_bind+0x10c>)
800ba90: 681b ldr r3, [r3, #0]
800ba92: 617b str r3, [r7, #20]
800ba94: e009 b.n 800baaa <udp_bind+0x52>
/* is this UDP PCB already on active list? */
if (pcb == ipcb) {
800ba96: 68fa ldr r2, [r7, #12]
800ba98: 697b ldr r3, [r7, #20]
800ba9a: 429a cmp r2, r3
800ba9c: d102 bne.n 800baa4 <udp_bind+0x4c>
rebind = 1;
800ba9e: 2301 movs r3, #1
800baa0: 74fb strb r3, [r7, #19]
break;
800baa2: e005 b.n 800bab0 <udp_bind+0x58>
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
800baa4: 697b ldr r3, [r7, #20]
800baa6: 68db ldr r3, [r3, #12]
800baa8: 617b str r3, [r7, #20]
800baaa: 697b ldr r3, [r7, #20]
800baac: 2b00 cmp r3, #0
800baae: d1f2 bne.n 800ba96 <udp_bind+0x3e>
ipaddr = &zoned_ipaddr;
}
#endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */
/* no port specified? */
if (port == 0) {
800bab0: 88fb ldrh r3, [r7, #6]
800bab2: 2b00 cmp r3, #0
800bab4: d109 bne.n 800baca <udp_bind+0x72>
port = udp_new_port();
800bab6: f7ff fcc5 bl 800b444 <udp_new_port>
800baba: 4603 mov r3, r0
800babc: 80fb strh r3, [r7, #6]
if (port == 0) {
800babe: 88fb ldrh r3, [r7, #6]
800bac0: 2b00 cmp r3, #0
800bac2: d12c bne.n 800bb1e <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;
800bac4: f06f 0307 mvn.w r3, #7
800bac8: e040 b.n 800bb4c <udp_bind+0xf4>
}
} else {
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
800baca: 4b26 ldr r3, [pc, #152] ; (800bb64 <udp_bind+0x10c>)
800bacc: 681b ldr r3, [r3, #0]
800bace: 617b str r3, [r7, #20]
800bad0: e022 b.n 800bb18 <udp_bind+0xc0>
if (pcb != ipcb) {
800bad2: 68fa ldr r2, [r7, #12]
800bad4: 697b ldr r3, [r7, #20]
800bad6: 429a cmp r2, r3
800bad8: d01b beq.n 800bb12 <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) &&
800bada: 697b ldr r3, [r7, #20]
800badc: 8a5b ldrh r3, [r3, #18]
800bade: 88fa ldrh r2, [r7, #6]
800bae0: 429a cmp r2, r3
800bae2: d116 bne.n 800bb12 <udp_bind+0xba>
/* IP address matches or any IP used? */
(ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
800bae4: 697b ldr r3, [r7, #20]
800bae6: 681a ldr r2, [r3, #0]
800bae8: 68bb ldr r3, [r7, #8]
800baea: 681b ldr r3, [r3, #0]
if ((ipcb->local_port == port) &&
800baec: 429a cmp r2, r3
800baee: d00d beq.n 800bb0c <udp_bind+0xb4>
(ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
800baf0: 68bb ldr r3, [r7, #8]
800baf2: 2b00 cmp r3, #0
800baf4: d00a beq.n 800bb0c <udp_bind+0xb4>
800baf6: 68bb ldr r3, [r7, #8]
800baf8: 681b ldr r3, [r3, #0]
800bafa: 2b00 cmp r3, #0
800bafc: d006 beq.n 800bb0c <udp_bind+0xb4>
ip_addr_isany(&ipcb->local_ip))) {
800bafe: 697b ldr r3, [r7, #20]
(ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
800bb00: 2b00 cmp r3, #0
800bb02: d003 beq.n 800bb0c <udp_bind+0xb4>
ip_addr_isany(&ipcb->local_ip))) {
800bb04: 697b ldr r3, [r7, #20]
800bb06: 681b ldr r3, [r3, #0]
800bb08: 2b00 cmp r3, #0
800bb0a: d102 bne.n 800bb12 <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;
800bb0c: f06f 0307 mvn.w r3, #7
800bb10: e01c b.n 800bb4c <udp_bind+0xf4>
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
800bb12: 697b ldr r3, [r7, #20]
800bb14: 68db ldr r3, [r3, #12]
800bb16: 617b str r3, [r7, #20]
800bb18: 697b ldr r3, [r7, #20]
800bb1a: 2b00 cmp r3, #0
800bb1c: d1d9 bne.n 800bad2 <udp_bind+0x7a>
}
}
}
}
ip_addr_set_ipaddr(&pcb->local_ip, ipaddr);
800bb1e: 68bb ldr r3, [r7, #8]
800bb20: 2b00 cmp r3, #0
800bb22: d002 beq.n 800bb2a <udp_bind+0xd2>
800bb24: 68bb ldr r3, [r7, #8]
800bb26: 681b ldr r3, [r3, #0]
800bb28: e000 b.n 800bb2c <udp_bind+0xd4>
800bb2a: 2300 movs r3, #0
800bb2c: 68fa ldr r2, [r7, #12]
800bb2e: 6013 str r3, [r2, #0]
pcb->local_port = port;
800bb30: 68fb ldr r3, [r7, #12]
800bb32: 88fa ldrh r2, [r7, #6]
800bb34: 825a strh r2, [r3, #18]
mib2_udp_bind(pcb);
/* pcb not active yet? */
if (rebind == 0) {
800bb36: 7cfb ldrb r3, [r7, #19]
800bb38: 2b00 cmp r3, #0
800bb3a: d106 bne.n 800bb4a <udp_bind+0xf2>
/* place the PCB on the active list if not already there */
pcb->next = udp_pcbs;
800bb3c: 4b09 ldr r3, [pc, #36] ; (800bb64 <udp_bind+0x10c>)
800bb3e: 681a ldr r2, [r3, #0]
800bb40: 68fb ldr r3, [r7, #12]
800bb42: 60da str r2, [r3, #12]
udp_pcbs = pcb;
800bb44: 4a07 ldr r2, [pc, #28] ; (800bb64 <udp_bind+0x10c>)
800bb46: 68fb ldr r3, [r7, #12]
800bb48: 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;
800bb4a: 2300 movs r3, #0
}
800bb4c: 4618 mov r0, r3
800bb4e: 3718 adds r7, #24
800bb50: 46bd mov sp, r7
800bb52: bd80 pop {r7, pc}
800bb54: 08017ddc .word 0x08017ddc
800bb58: 08016ea8 .word 0x08016ea8
800bb5c: 08017170 .word 0x08017170
800bb60: 08016efc .word 0x08016efc
800bb64: 20008c5c .word 0x20008c5c
0800bb68 <udp_connect>:
*
* @see udp_disconnect()
*/
err_t
udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
{
800bb68: b580 push {r7, lr}
800bb6a: b086 sub sp, #24
800bb6c: af00 add r7, sp, #0
800bb6e: 60f8 str r0, [r7, #12]
800bb70: 60b9 str r1, [r7, #8]
800bb72: 4613 mov r3, r2
800bb74: 80fb strh r3, [r7, #6]
struct udp_pcb *ipcb;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("udp_connect: invalid pcb", pcb != NULL, return ERR_ARG);
800bb76: 68fb ldr r3, [r7, #12]
800bb78: 2b00 cmp r3, #0
800bb7a: d109 bne.n 800bb90 <udp_connect+0x28>
800bb7c: 4b2c ldr r3, [pc, #176] ; (800bc30 <udp_connect+0xc8>)
800bb7e: f240 4235 movw r2, #1077 ; 0x435
800bb82: 492c ldr r1, [pc, #176] ; (800bc34 <udp_connect+0xcc>)
800bb84: 482c ldr r0, [pc, #176] ; (800bc38 <udp_connect+0xd0>)
800bb86: f004 fc23 bl 80103d0 <printf>
800bb8a: f06f 030f mvn.w r3, #15
800bb8e: e04b b.n 800bc28 <udp_connect+0xc0>
LWIP_ERROR("udp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
800bb90: 68bb ldr r3, [r7, #8]
800bb92: 2b00 cmp r3, #0
800bb94: d109 bne.n 800bbaa <udp_connect+0x42>
800bb96: 4b26 ldr r3, [pc, #152] ; (800bc30 <udp_connect+0xc8>)
800bb98: f240 4236 movw r2, #1078 ; 0x436
800bb9c: 4927 ldr r1, [pc, #156] ; (800bc3c <udp_connect+0xd4>)
800bb9e: 4826 ldr r0, [pc, #152] ; (800bc38 <udp_connect+0xd0>)
800bba0: f004 fc16 bl 80103d0 <printf>
800bba4: f06f 030f mvn.w r3, #15
800bba8: e03e b.n 800bc28 <udp_connect+0xc0>
if (pcb->local_port == 0) {
800bbaa: 68fb ldr r3, [r7, #12]
800bbac: 8a5b ldrh r3, [r3, #18]
800bbae: 2b00 cmp r3, #0
800bbb0: d10f bne.n 800bbd2 <udp_connect+0x6a>
err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port);
800bbb2: 68f9 ldr r1, [r7, #12]
800bbb4: 68fb ldr r3, [r7, #12]
800bbb6: 8a5b ldrh r3, [r3, #18]
800bbb8: 461a mov r2, r3
800bbba: 68f8 ldr r0, [r7, #12]
800bbbc: f7ff ff4c bl 800ba58 <udp_bind>
800bbc0: 4603 mov r3, r0
800bbc2: 74fb strb r3, [r7, #19]
if (err != ERR_OK) {
800bbc4: f997 3013 ldrsb.w r3, [r7, #19]
800bbc8: 2b00 cmp r3, #0
800bbca: d002 beq.n 800bbd2 <udp_connect+0x6a>
return err;
800bbcc: f997 3013 ldrsb.w r3, [r7, #19]
800bbd0: e02a b.n 800bc28 <udp_connect+0xc0>
}
}
ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr);
800bbd2: 68bb ldr r3, [r7, #8]
800bbd4: 2b00 cmp r3, #0
800bbd6: d002 beq.n 800bbde <udp_connect+0x76>
800bbd8: 68bb ldr r3, [r7, #8]
800bbda: 681b ldr r3, [r3, #0]
800bbdc: e000 b.n 800bbe0 <udp_connect+0x78>
800bbde: 2300 movs r3, #0
800bbe0: 68fa ldr r2, [r7, #12]
800bbe2: 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;
800bbe4: 68fb ldr r3, [r7, #12]
800bbe6: 88fa ldrh r2, [r7, #6]
800bbe8: 829a strh r2, [r3, #20]
pcb->flags |= UDP_FLAGS_CONNECTED;
800bbea: 68fb ldr r3, [r7, #12]
800bbec: 7c1b ldrb r3, [r3, #16]
800bbee: f043 0304 orr.w r3, r3, #4
800bbf2: b2da uxtb r2, r3
800bbf4: 68fb ldr r3, [r7, #12]
800bbf6: 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) {
800bbf8: 4b11 ldr r3, [pc, #68] ; (800bc40 <udp_connect+0xd8>)
800bbfa: 681b ldr r3, [r3, #0]
800bbfc: 617b str r3, [r7, #20]
800bbfe: e008 b.n 800bc12 <udp_connect+0xaa>
if (pcb == ipcb) {
800bc00: 68fa ldr r2, [r7, #12]
800bc02: 697b ldr r3, [r7, #20]
800bc04: 429a cmp r2, r3
800bc06: d101 bne.n 800bc0c <udp_connect+0xa4>
/* already on the list, just return */
return ERR_OK;
800bc08: 2300 movs r3, #0
800bc0a: e00d b.n 800bc28 <udp_connect+0xc0>
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
800bc0c: 697b ldr r3, [r7, #20]
800bc0e: 68db ldr r3, [r3, #12]
800bc10: 617b str r3, [r7, #20]
800bc12: 697b ldr r3, [r7, #20]
800bc14: 2b00 cmp r3, #0
800bc16: d1f3 bne.n 800bc00 <udp_connect+0x98>
}
}
/* PCB not yet on the list, add PCB now */
pcb->next = udp_pcbs;
800bc18: 4b09 ldr r3, [pc, #36] ; (800bc40 <udp_connect+0xd8>)
800bc1a: 681a ldr r2, [r3, #0]
800bc1c: 68fb ldr r3, [r7, #12]
800bc1e: 60da str r2, [r3, #12]
udp_pcbs = pcb;
800bc20: 4a07 ldr r2, [pc, #28] ; (800bc40 <udp_connect+0xd8>)
800bc22: 68fb ldr r3, [r7, #12]
800bc24: 6013 str r3, [r2, #0]
return ERR_OK;
800bc26: 2300 movs r3, #0
}
800bc28: 4618 mov r0, r3
800bc2a: 3718 adds r7, #24
800bc2c: 46bd mov sp, r7
800bc2e: bd80 pop {r7, pc}
800bc30: 08016ea8 .word 0x08016ea8
800bc34: 08017188 .word 0x08017188
800bc38: 08016efc .word 0x08016efc
800bc3c: 080171a4 .word 0x080171a4
800bc40: 20008c5c .word 0x20008c5c
0800bc44 <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)
{
800bc44: b580 push {r7, lr}
800bc46: b084 sub sp, #16
800bc48: af00 add r7, sp, #0
800bc4a: 60f8 str r0, [r7, #12]
800bc4c: 60b9 str r1, [r7, #8]
800bc4e: 607a str r2, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("udp_recv: invalid pcb", pcb != NULL, return);
800bc50: 68fb ldr r3, [r7, #12]
800bc52: 2b00 cmp r3, #0
800bc54: d107 bne.n 800bc66 <udp_recv+0x22>
800bc56: 4b08 ldr r3, [pc, #32] ; (800bc78 <udp_recv+0x34>)
800bc58: f240 428a movw r2, #1162 ; 0x48a
800bc5c: 4907 ldr r1, [pc, #28] ; (800bc7c <udp_recv+0x38>)
800bc5e: 4808 ldr r0, [pc, #32] ; (800bc80 <udp_recv+0x3c>)
800bc60: f004 fbb6 bl 80103d0 <printf>
800bc64: e005 b.n 800bc72 <udp_recv+0x2e>
/* remember recv() callback and user data */
pcb->recv = recv;
800bc66: 68fb ldr r3, [r7, #12]
800bc68: 68ba ldr r2, [r7, #8]
800bc6a: 619a str r2, [r3, #24]
pcb->recv_arg = recv_arg;
800bc6c: 68fb ldr r3, [r7, #12]
800bc6e: 687a ldr r2, [r7, #4]
800bc70: 61da str r2, [r3, #28]
}
800bc72: 3710 adds r7, #16
800bc74: 46bd mov sp, r7
800bc76: bd80 pop {r7, pc}
800bc78: 08016ea8 .word 0x08016ea8
800bc7c: 080171dc .word 0x080171dc
800bc80: 08016efc .word 0x08016efc
0800bc84 <udp_remove>:
*
* @see udp_new()
*/
void
udp_remove(struct udp_pcb *pcb)
{
800bc84: b580 push {r7, lr}
800bc86: b084 sub sp, #16
800bc88: af00 add r7, sp, #0
800bc8a: 6078 str r0, [r7, #4]
struct udp_pcb *pcb2;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("udp_remove: invalid pcb", pcb != NULL, return);
800bc8c: 687b ldr r3, [r7, #4]
800bc8e: 2b00 cmp r3, #0
800bc90: d107 bne.n 800bca2 <udp_remove+0x1e>
800bc92: 4b19 ldr r3, [pc, #100] ; (800bcf8 <udp_remove+0x74>)
800bc94: f240 42a1 movw r2, #1185 ; 0x4a1
800bc98: 4918 ldr r1, [pc, #96] ; (800bcfc <udp_remove+0x78>)
800bc9a: 4819 ldr r0, [pc, #100] ; (800bd00 <udp_remove+0x7c>)
800bc9c: f004 fb98 bl 80103d0 <printf>
800bca0: e026 b.n 800bcf0 <udp_remove+0x6c>
mib2_udp_unbind(pcb);
/* pcb to be removed is first in list? */
if (udp_pcbs == pcb) {
800bca2: 4b18 ldr r3, [pc, #96] ; (800bd04 <udp_remove+0x80>)
800bca4: 681b ldr r3, [r3, #0]
800bca6: 687a ldr r2, [r7, #4]
800bca8: 429a cmp r2, r3
800bcaa: d105 bne.n 800bcb8 <udp_remove+0x34>
/* make list start at 2nd pcb */
udp_pcbs = udp_pcbs->next;
800bcac: 4b15 ldr r3, [pc, #84] ; (800bd04 <udp_remove+0x80>)
800bcae: 681b ldr r3, [r3, #0]
800bcb0: 68db ldr r3, [r3, #12]
800bcb2: 4a14 ldr r2, [pc, #80] ; (800bd04 <udp_remove+0x80>)
800bcb4: 6013 str r3, [r2, #0]
800bcb6: e017 b.n 800bce8 <udp_remove+0x64>
/* pcb not 1st in list */
} else {
for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) {
800bcb8: 4b12 ldr r3, [pc, #72] ; (800bd04 <udp_remove+0x80>)
800bcba: 681b ldr r3, [r3, #0]
800bcbc: 60fb str r3, [r7, #12]
800bcbe: e010 b.n 800bce2 <udp_remove+0x5e>
/* find pcb in udp_pcbs list */
if (pcb2->next != NULL && pcb2->next == pcb) {
800bcc0: 68fb ldr r3, [r7, #12]
800bcc2: 68db ldr r3, [r3, #12]
800bcc4: 2b00 cmp r3, #0
800bcc6: d009 beq.n 800bcdc <udp_remove+0x58>
800bcc8: 68fb ldr r3, [r7, #12]
800bcca: 68db ldr r3, [r3, #12]
800bccc: 687a ldr r2, [r7, #4]
800bcce: 429a cmp r2, r3
800bcd0: d104 bne.n 800bcdc <udp_remove+0x58>
/* remove pcb from list */
pcb2->next = pcb->next;
800bcd2: 687b ldr r3, [r7, #4]
800bcd4: 68da ldr r2, [r3, #12]
800bcd6: 68fb ldr r3, [r7, #12]
800bcd8: 60da str r2, [r3, #12]
break;
800bcda: e005 b.n 800bce8 <udp_remove+0x64>
for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) {
800bcdc: 68fb ldr r3, [r7, #12]
800bcde: 68db ldr r3, [r3, #12]
800bce0: 60fb str r3, [r7, #12]
800bce2: 68fb ldr r3, [r7, #12]
800bce4: 2b00 cmp r3, #0
800bce6: d1eb bne.n 800bcc0 <udp_remove+0x3c>
}
}
}
memp_free(MEMP_UDP_PCB, pcb);
800bce8: 6879 ldr r1, [r7, #4]
800bcea: 2000 movs r0, #0
800bcec: f7f8 ffd2 bl 8004c94 <memp_free>
}
800bcf0: 3710 adds r7, #16
800bcf2: 46bd mov sp, r7
800bcf4: bd80 pop {r7, pc}
800bcf6: bf00 nop
800bcf8: 08016ea8 .word 0x08016ea8
800bcfc: 080171f4 .word 0x080171f4
800bd00: 08016efc .word 0x08016efc
800bd04: 20008c5c .word 0x20008c5c
0800bd08 <udp_new>:
*
* @see udp_remove()
*/
struct udp_pcb *
udp_new(void)
{
800bd08: b580 push {r7, lr}
800bd0a: b082 sub sp, #8
800bd0c: af00 add r7, sp, #0
struct udp_pcb *pcb;
LWIP_ASSERT_CORE_LOCKED();
pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB);
800bd0e: 2000 movs r0, #0
800bd10: f7f8 ff50 bl 8004bb4 <memp_malloc>
800bd14: 6078 str r0, [r7, #4]
/* could allocate UDP PCB? */
if (pcb != NULL) {
800bd16: 687b ldr r3, [r7, #4]
800bd18: 2b00 cmp r3, #0
800bd1a: d007 beq.n 800bd2c <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));
800bd1c: 2220 movs r2, #32
800bd1e: 2100 movs r1, #0
800bd20: 6878 ldr r0, [r7, #4]
800bd22: f004 fb4d bl 80103c0 <memset>
pcb->ttl = UDP_TTL;
800bd26: 687b ldr r3, [r7, #4]
800bd28: 22ff movs r2, #255 ; 0xff
800bd2a: 72da strb r2, [r3, #11]
#if LWIP_MULTICAST_TX_OPTIONS
udp_set_multicast_ttl(pcb, UDP_TTL);
#endif /* LWIP_MULTICAST_TX_OPTIONS */
}
return pcb;
800bd2c: 687b ldr r3, [r7, #4]
}
800bd2e: 4618 mov r0, r3
800bd30: 3708 adds r7, #8
800bd32: 46bd mov sp, r7
800bd34: bd80 pop {r7, pc}
...
0800bd38 <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)
{
800bd38: b480 push {r7}
800bd3a: b085 sub sp, #20
800bd3c: af00 add r7, sp, #0
800bd3e: 6078 str r0, [r7, #4]
800bd40: 6039 str r1, [r7, #0]
struct udp_pcb *upcb;
if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) {
800bd42: 687b ldr r3, [r7, #4]
800bd44: 2b00 cmp r3, #0
800bd46: d01e beq.n 800bd86 <udp_netif_ip_addr_changed+0x4e>
800bd48: 687b ldr r3, [r7, #4]
800bd4a: 681b ldr r3, [r3, #0]
800bd4c: 2b00 cmp r3, #0
800bd4e: d01a beq.n 800bd86 <udp_netif_ip_addr_changed+0x4e>
800bd50: 683b ldr r3, [r7, #0]
800bd52: 2b00 cmp r3, #0
800bd54: d017 beq.n 800bd86 <udp_netif_ip_addr_changed+0x4e>
800bd56: 683b ldr r3, [r7, #0]
800bd58: 681b ldr r3, [r3, #0]
800bd5a: 2b00 cmp r3, #0
800bd5c: d013 beq.n 800bd86 <udp_netif_ip_addr_changed+0x4e>
for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) {
800bd5e: 4b0d ldr r3, [pc, #52] ; (800bd94 <udp_netif_ip_addr_changed+0x5c>)
800bd60: 681b ldr r3, [r3, #0]
800bd62: 60fb str r3, [r7, #12]
800bd64: e00c b.n 800bd80 <udp_netif_ip_addr_changed+0x48>
/* PCB bound to current local interface address? */
if (ip_addr_cmp(&upcb->local_ip, old_addr)) {
800bd66: 68fb ldr r3, [r7, #12]
800bd68: 681a ldr r2, [r3, #0]
800bd6a: 687b ldr r3, [r7, #4]
800bd6c: 681b ldr r3, [r3, #0]
800bd6e: 429a cmp r2, r3
800bd70: d103 bne.n 800bd7a <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);
800bd72: 683b ldr r3, [r7, #0]
800bd74: 681a ldr r2, [r3, #0]
800bd76: 68fb ldr r3, [r7, #12]
800bd78: 601a str r2, [r3, #0]
for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) {
800bd7a: 68fb ldr r3, [r7, #12]
800bd7c: 68db ldr r3, [r3, #12]
800bd7e: 60fb str r3, [r7, #12]
800bd80: 68fb ldr r3, [r7, #12]
800bd82: 2b00 cmp r3, #0
800bd84: d1ef bne.n 800bd66 <udp_netif_ip_addr_changed+0x2e>
}
}
}
}
800bd86: bf00 nop
800bd88: 3714 adds r7, #20
800bd8a: 46bd mov sp, r7
800bd8c: f85d 7b04 ldr.w r7, [sp], #4
800bd90: 4770 bx lr
800bd92: bf00 nop
800bd94: 20008c5c .word 0x20008c5c
0800bd98 <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)
{
800bd98: b580 push {r7, lr}
800bd9a: af00 add r7, sp, #0
if (dhcp_pcb_refcount == 0) {
800bd9c: 4b20 ldr r3, [pc, #128] ; (800be20 <dhcp_inc_pcb_refcount+0x88>)
800bd9e: 781b ldrb r3, [r3, #0]
800bda0: 2b00 cmp r3, #0
800bda2: d133 bne.n 800be0c <dhcp_inc_pcb_refcount+0x74>
LWIP_ASSERT("dhcp_inc_pcb_refcount(): memory leak", dhcp_pcb == NULL);
800bda4: 4b1f ldr r3, [pc, #124] ; (800be24 <dhcp_inc_pcb_refcount+0x8c>)
800bda6: 681b ldr r3, [r3, #0]
800bda8: 2b00 cmp r3, #0
800bdaa: d005 beq.n 800bdb8 <dhcp_inc_pcb_refcount+0x20>
800bdac: 4b1e ldr r3, [pc, #120] ; (800be28 <dhcp_inc_pcb_refcount+0x90>)
800bdae: 22e5 movs r2, #229 ; 0xe5
800bdb0: 491e ldr r1, [pc, #120] ; (800be2c <dhcp_inc_pcb_refcount+0x94>)
800bdb2: 481f ldr r0, [pc, #124] ; (800be30 <dhcp_inc_pcb_refcount+0x98>)
800bdb4: f004 fb0c bl 80103d0 <printf>
/* allocate UDP PCB */
dhcp_pcb = udp_new();
800bdb8: f7ff ffa6 bl 800bd08 <udp_new>
800bdbc: 4603 mov r3, r0
800bdbe: 4a19 ldr r2, [pc, #100] ; (800be24 <dhcp_inc_pcb_refcount+0x8c>)
800bdc0: 6013 str r3, [r2, #0]
if (dhcp_pcb == NULL) {
800bdc2: 4b18 ldr r3, [pc, #96] ; (800be24 <dhcp_inc_pcb_refcount+0x8c>)
800bdc4: 681b ldr r3, [r3, #0]
800bdc6: 2b00 cmp r3, #0
800bdc8: d102 bne.n 800bdd0 <dhcp_inc_pcb_refcount+0x38>
return ERR_MEM;
800bdca: f04f 33ff mov.w r3, #4294967295
800bdce: e024 b.n 800be1a <dhcp_inc_pcb_refcount+0x82>
}
ip_set_option(dhcp_pcb, SOF_BROADCAST);
800bdd0: 4b14 ldr r3, [pc, #80] ; (800be24 <dhcp_inc_pcb_refcount+0x8c>)
800bdd2: 681b ldr r3, [r3, #0]
800bdd4: 7a5a ldrb r2, [r3, #9]
800bdd6: 4b13 ldr r3, [pc, #76] ; (800be24 <dhcp_inc_pcb_refcount+0x8c>)
800bdd8: 681b ldr r3, [r3, #0]
800bdda: f042 0220 orr.w r2, r2, #32
800bdde: b2d2 uxtb r2, r2
800bde0: 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);
800bde2: 4b10 ldr r3, [pc, #64] ; (800be24 <dhcp_inc_pcb_refcount+0x8c>)
800bde4: 681b ldr r3, [r3, #0]
800bde6: 2244 movs r2, #68 ; 0x44
800bde8: 4912 ldr r1, [pc, #72] ; (800be34 <dhcp_inc_pcb_refcount+0x9c>)
800bdea: 4618 mov r0, r3
800bdec: f7ff fe34 bl 800ba58 <udp_bind>
udp_connect(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_SERVER);
800bdf0: 4b0c ldr r3, [pc, #48] ; (800be24 <dhcp_inc_pcb_refcount+0x8c>)
800bdf2: 681b ldr r3, [r3, #0]
800bdf4: 2243 movs r2, #67 ; 0x43
800bdf6: 490f ldr r1, [pc, #60] ; (800be34 <dhcp_inc_pcb_refcount+0x9c>)
800bdf8: 4618 mov r0, r3
800bdfa: f7ff feb5 bl 800bb68 <udp_connect>
udp_recv(dhcp_pcb, dhcp_recv, NULL);
800bdfe: 4b09 ldr r3, [pc, #36] ; (800be24 <dhcp_inc_pcb_refcount+0x8c>)
800be00: 681b ldr r3, [r3, #0]
800be02: 2200 movs r2, #0
800be04: 490c ldr r1, [pc, #48] ; (800be38 <dhcp_inc_pcb_refcount+0xa0>)
800be06: 4618 mov r0, r3
800be08: f7ff ff1c bl 800bc44 <udp_recv>
}
dhcp_pcb_refcount++;
800be0c: 4b04 ldr r3, [pc, #16] ; (800be20 <dhcp_inc_pcb_refcount+0x88>)
800be0e: 781b ldrb r3, [r3, #0]
800be10: 3301 adds r3, #1
800be12: b2da uxtb r2, r3
800be14: 4b02 ldr r3, [pc, #8] ; (800be20 <dhcp_inc_pcb_refcount+0x88>)
800be16: 701a strb r2, [r3, #0]
return ERR_OK;
800be18: 2300 movs r3, #0
}
800be1a: 4618 mov r0, r3
800be1c: bd80 pop {r7, pc}
800be1e: bf00 nop
800be20: 20008c8c .word 0x20008c8c
800be24: 20008c88 .word 0x20008c88
800be28: 0801720c .word 0x0801720c
800be2c: 08017244 .word 0x08017244
800be30: 0801726c .word 0x0801726c
800be34: 08017ddc .word 0x08017ddc
800be38: 0800d6cd .word 0x0800d6cd
0800be3c <dhcp_dec_pcb_refcount>:
/** Free DHCP PCB if the last netif stops using it */
static void
dhcp_dec_pcb_refcount(void)
{
800be3c: b580 push {r7, lr}
800be3e: af00 add r7, sp, #0
LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0));
800be40: 4b0e ldr r3, [pc, #56] ; (800be7c <dhcp_dec_pcb_refcount+0x40>)
800be42: 781b ldrb r3, [r3, #0]
800be44: 2b00 cmp r3, #0
800be46: d105 bne.n 800be54 <dhcp_dec_pcb_refcount+0x18>
800be48: 4b0d ldr r3, [pc, #52] ; (800be80 <dhcp_dec_pcb_refcount+0x44>)
800be4a: 22ff movs r2, #255 ; 0xff
800be4c: 490d ldr r1, [pc, #52] ; (800be84 <dhcp_dec_pcb_refcount+0x48>)
800be4e: 480e ldr r0, [pc, #56] ; (800be88 <dhcp_dec_pcb_refcount+0x4c>)
800be50: f004 fabe bl 80103d0 <printf>
dhcp_pcb_refcount--;
800be54: 4b09 ldr r3, [pc, #36] ; (800be7c <dhcp_dec_pcb_refcount+0x40>)
800be56: 781b ldrb r3, [r3, #0]
800be58: 3b01 subs r3, #1
800be5a: b2da uxtb r2, r3
800be5c: 4b07 ldr r3, [pc, #28] ; (800be7c <dhcp_dec_pcb_refcount+0x40>)
800be5e: 701a strb r2, [r3, #0]
if (dhcp_pcb_refcount == 0) {
800be60: 4b06 ldr r3, [pc, #24] ; (800be7c <dhcp_dec_pcb_refcount+0x40>)
800be62: 781b ldrb r3, [r3, #0]
800be64: 2b00 cmp r3, #0
800be66: d107 bne.n 800be78 <dhcp_dec_pcb_refcount+0x3c>
udp_remove(dhcp_pcb);
800be68: 4b08 ldr r3, [pc, #32] ; (800be8c <dhcp_dec_pcb_refcount+0x50>)
800be6a: 681b ldr r3, [r3, #0]
800be6c: 4618 mov r0, r3
800be6e: f7ff ff09 bl 800bc84 <udp_remove>
dhcp_pcb = NULL;
800be72: 4b06 ldr r3, [pc, #24] ; (800be8c <dhcp_dec_pcb_refcount+0x50>)
800be74: 2200 movs r2, #0
800be76: 601a str r2, [r3, #0]
}
}
800be78: bf00 nop
800be7a: bd80 pop {r7, pc}
800be7c: 20008c8c .word 0x20008c8c
800be80: 0801720c .word 0x0801720c
800be84: 08017294 .word 0x08017294
800be88: 0801726c .word 0x0801726c
800be8c: 20008c88 .word 0x20008c88
0800be90 <dhcp_handle_nak>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_handle_nak(struct netif *netif)
{
800be90: b580 push {r7, lr}
800be92: b084 sub sp, #16
800be94: af00 add r7, sp, #0
800be96: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800be98: 687b ldr r3, [r7, #4]
800be9a: 6a5b ldr r3, [r3, #36] ; 0x24
800be9c: 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);
800be9e: 210c movs r1, #12
800bea0: 68f8 ldr r0, [r7, #12]
800bea2: f001 f855 bl 800cf50 <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);
800bea6: 4b06 ldr r3, [pc, #24] ; (800bec0 <dhcp_handle_nak+0x30>)
800bea8: 4a05 ldr r2, [pc, #20] ; (800bec0 <dhcp_handle_nak+0x30>)
800beaa: 4905 ldr r1, [pc, #20] ; (800bec0 <dhcp_handle_nak+0x30>)
800beac: 6878 ldr r0, [r7, #4]
800beae: f7f9 f893 bl 8004fd8 <netif_set_addr>
/* We can immediately restart discovery */
dhcp_discover(netif);
800beb2: 6878 ldr r0, [r7, #4]
800beb4: f000 fc48 bl 800c748 <dhcp_discover>
}
800beb8: bf00 nop
800beba: 3710 adds r7, #16
800bebc: 46bd mov sp, r7
800bebe: bd80 pop {r7, pc}
800bec0: 08017ddc .word 0x08017ddc
0800bec4 <dhcp_check>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_check(struct netif *netif)
{
800bec4: b580 push {r7, lr}
800bec6: b084 sub sp, #16
800bec8: af00 add r7, sp, #0
800beca: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800becc: 687b ldr r3, [r7, #4]
800bece: 6a5b ldr r3, [r3, #36] ; 0x24
800bed0: 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);
800bed2: 2108 movs r1, #8
800bed4: 68f8 ldr r0, [r7, #12]
800bed6: f001 f83b bl 800cf50 <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);
800beda: 68fb ldr r3, [r7, #12]
800bedc: 331c adds r3, #28
800bede: 2200 movs r2, #0
800bee0: 4619 mov r1, r3
800bee2: 6878 ldr r0, [r7, #4]
800bee4: f002 fb3c bl 800e560 <etharp_query>
800bee8: 4603 mov r3, r0
800beea: 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) {
800beec: 68fb ldr r3, [r7, #12]
800beee: 799b ldrb r3, [r3, #6]
800bef0: 2bff cmp r3, #255 ; 0xff
800bef2: d005 beq.n 800bf00 <dhcp_check+0x3c>
dhcp->tries++;
800bef4: 68fb ldr r3, [r7, #12]
800bef6: 799b ldrb r3, [r3, #6]
800bef8: 3301 adds r3, #1
800befa: b2da uxtb r2, r3
800befc: 68fb ldr r3, [r7, #12]
800befe: 719a strb r2, [r3, #6]
}
msecs = 500;
800bf00: f44f 73fa mov.w r3, #500 ; 0x1f4
800bf04: 813b strh r3, [r7, #8]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
800bf06: 893b ldrh r3, [r7, #8]
800bf08: f203 13f3 addw r3, r3, #499 ; 0x1f3
800bf0c: 4a06 ldr r2, [pc, #24] ; (800bf28 <dhcp_check+0x64>)
800bf0e: fb82 1203 smull r1, r2, r2, r3
800bf12: 1152 asrs r2, r2, #5
800bf14: 17db asrs r3, r3, #31
800bf16: 1ad3 subs r3, r2, r3
800bf18: b29a uxth r2, r3
800bf1a: 68fb ldr r3, [r7, #12]
800bf1c: 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));
}
800bf1e: bf00 nop
800bf20: 3710 adds r7, #16
800bf22: 46bd mov sp, r7
800bf24: bd80 pop {r7, pc}
800bf26: bf00 nop
800bf28: 10624dd3 .word 0x10624dd3
0800bf2c <dhcp_handle_offer>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_handle_offer(struct netif *netif, struct dhcp_msg *msg_in)
{
800bf2c: b580 push {r7, lr}
800bf2e: b084 sub sp, #16
800bf30: af00 add r7, sp, #0
800bf32: 6078 str r0, [r7, #4]
800bf34: 6039 str r1, [r7, #0]
struct dhcp *dhcp = netif_dhcp_data(netif);
800bf36: 687b ldr r3, [r7, #4]
800bf38: 6a5b ldr r3, [r3, #36] ; 0x24
800bf3a: 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)) {
800bf3c: 4b0c ldr r3, [pc, #48] ; (800bf70 <dhcp_handle_offer+0x44>)
800bf3e: 789b ldrb r3, [r3, #2]
800bf40: 2b00 cmp r3, #0
800bf42: d011 beq.n 800bf68 <dhcp_handle_offer+0x3c>
dhcp->request_timeout = 0; /* stop timer */
800bf44: 68fb ldr r3, [r7, #12]
800bf46: 2200 movs r2, #0
800bf48: 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)));
800bf4a: 4b0a ldr r3, [pc, #40] ; (800bf74 <dhcp_handle_offer+0x48>)
800bf4c: 689b ldr r3, [r3, #8]
800bf4e: 4618 mov r0, r3
800bf50: f7f8 f9cd bl 80042ee <lwip_htonl>
800bf54: 4602 mov r2, r0
800bf56: 68fb ldr r3, [r7, #12]
800bf58: 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);
800bf5a: 683b ldr r3, [r7, #0]
800bf5c: 691a ldr r2, [r3, #16]
800bf5e: 68fb ldr r3, [r7, #12]
800bf60: 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);
800bf62: 6878 ldr r0, [r7, #4]
800bf64: f000 f808 bl 800bf78 <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));
}
}
800bf68: bf00 nop
800bf6a: 3710 adds r7, #16
800bf6c: 46bd mov sp, r7
800bf6e: bd80 pop {r7, pc}
800bf70: 20008c80 .word 0x20008c80
800bf74: 20008c60 .word 0x20008c60
0800bf78 <dhcp_select>:
* @param netif the netif under DHCP control
* @return lwIP specific error (see error.h)
*/
static err_t
dhcp_select(struct netif *netif)
{
800bf78: b5b0 push {r4, r5, r7, lr}
800bf7a: b08a sub sp, #40 ; 0x28
800bf7c: af02 add r7, sp, #8
800bf7e: 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;);
800bf80: 687b ldr r3, [r7, #4]
800bf82: 2b00 cmp r3, #0
800bf84: d109 bne.n 800bf9a <dhcp_select+0x22>
800bf86: 4b71 ldr r3, [pc, #452] ; (800c14c <dhcp_select+0x1d4>)
800bf88: f240 1277 movw r2, #375 ; 0x177
800bf8c: 4970 ldr r1, [pc, #448] ; (800c150 <dhcp_select+0x1d8>)
800bf8e: 4871 ldr r0, [pc, #452] ; (800c154 <dhcp_select+0x1dc>)
800bf90: f004 fa1e bl 80103d0 <printf>
800bf94: f06f 030f mvn.w r3, #15
800bf98: e0d3 b.n 800c142 <dhcp_select+0x1ca>
dhcp = netif_dhcp_data(netif);
800bf9a: 687b ldr r3, [r7, #4]
800bf9c: 6a5b ldr r3, [r3, #36] ; 0x24
800bf9e: 61bb str r3, [r7, #24]
LWIP_ERROR("dhcp_select: dhcp != NULL", (dhcp != NULL), return ERR_VAL;);
800bfa0: 69bb ldr r3, [r7, #24]
800bfa2: 2b00 cmp r3, #0
800bfa4: d109 bne.n 800bfba <dhcp_select+0x42>
800bfa6: 4b69 ldr r3, [pc, #420] ; (800c14c <dhcp_select+0x1d4>)
800bfa8: f240 1279 movw r2, #377 ; 0x179
800bfac: 496a ldr r1, [pc, #424] ; (800c158 <dhcp_select+0x1e0>)
800bfae: 4869 ldr r0, [pc, #420] ; (800c154 <dhcp_select+0x1dc>)
800bfb0: f004 fa0e bl 80103d0 <printf>
800bfb4: f06f 0305 mvn.w r3, #5
800bfb8: e0c3 b.n 800c142 <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);
800bfba: 2101 movs r1, #1
800bfbc: 69b8 ldr r0, [r7, #24]
800bfbe: f000 ffc7 bl 800cf50 <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
800bfc2: f107 030c add.w r3, r7, #12
800bfc6: 2203 movs r2, #3
800bfc8: 69b9 ldr r1, [r7, #24]
800bfca: 6878 ldr r0, [r7, #4]
800bfcc: f001 fc4c bl 800d868 <dhcp_create_msg>
800bfd0: 6178 str r0, [r7, #20]
if (p_out != NULL) {
800bfd2: 697b ldr r3, [r7, #20]
800bfd4: 2b00 cmp r3, #0
800bfd6: f000 8085 beq.w 800c0e4 <dhcp_select+0x16c>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
800bfda: 697b ldr r3, [r7, #20]
800bfdc: 685b ldr r3, [r3, #4]
800bfde: 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);
800bfe0: 89b8 ldrh r0, [r7, #12]
800bfe2: 693b ldr r3, [r7, #16]
800bfe4: f103 01f0 add.w r1, r3, #240 ; 0xf0
800bfe8: 2302 movs r3, #2
800bfea: 2239 movs r2, #57 ; 0x39
800bfec: f000 ffca bl 800cf84 <dhcp_option>
800bff0: 4603 mov r3, r0
800bff2: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
800bff4: 89b8 ldrh r0, [r7, #12]
800bff6: 693b ldr r3, [r7, #16]
800bff8: f103 01f0 add.w r1, r3, #240 ; 0xf0
800bffc: 687b ldr r3, [r7, #4]
800bffe: 8d1b ldrh r3, [r3, #40] ; 0x28
800c000: 461a mov r2, r3
800c002: f001 f819 bl 800d038 <dhcp_option_short>
800c006: 4603 mov r3, r0
800c008: 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);
800c00a: 89b8 ldrh r0, [r7, #12]
800c00c: 693b ldr r3, [r7, #16]
800c00e: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c012: 2304 movs r3, #4
800c014: 2232 movs r2, #50 ; 0x32
800c016: f000 ffb5 bl 800cf84 <dhcp_option>
800c01a: 4603 mov r3, r0
800c01c: 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)));
800c01e: 89bc ldrh r4, [r7, #12]
800c020: 693b ldr r3, [r7, #16]
800c022: f103 05f0 add.w r5, r3, #240 ; 0xf0
800c026: 69bb ldr r3, [r7, #24]
800c028: 69db ldr r3, [r3, #28]
800c02a: 4618 mov r0, r3
800c02c: f7f8 f95f bl 80042ee <lwip_htonl>
800c030: 4603 mov r3, r0
800c032: 461a mov r2, r3
800c034: 4629 mov r1, r5
800c036: 4620 mov r0, r4
800c038: f001 f830 bl 800d09c <dhcp_option_long>
800c03c: 4603 mov r3, r0
800c03e: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4);
800c040: 89b8 ldrh r0, [r7, #12]
800c042: 693b ldr r3, [r7, #16]
800c044: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c048: 2304 movs r3, #4
800c04a: 2236 movs r2, #54 ; 0x36
800c04c: f000 ff9a bl 800cf84 <dhcp_option>
800c050: 4603 mov r3, r0
800c052: 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))));
800c054: 89bc ldrh r4, [r7, #12]
800c056: 693b ldr r3, [r7, #16]
800c058: f103 05f0 add.w r5, r3, #240 ; 0xf0
800c05c: 69bb ldr r3, [r7, #24]
800c05e: 699b ldr r3, [r3, #24]
800c060: 4618 mov r0, r3
800c062: f7f8 f944 bl 80042ee <lwip_htonl>
800c066: 4603 mov r3, r0
800c068: 461a mov r2, r3
800c06a: 4629 mov r1, r5
800c06c: 4620 mov r0, r4
800c06e: f001 f815 bl 800d09c <dhcp_option_long>
800c072: 4603 mov r3, r0
800c074: 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));
800c076: 89b8 ldrh r0, [r7, #12]
800c078: 693b ldr r3, [r7, #16]
800c07a: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c07e: 2303 movs r3, #3
800c080: 2237 movs r2, #55 ; 0x37
800c082: f000 ff7f bl 800cf84 <dhcp_option>
800c086: 4603 mov r3, r0
800c088: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800c08a: 2300 movs r3, #0
800c08c: 77bb strb r3, [r7, #30]
800c08e: e00e b.n 800c0ae <dhcp_select+0x136>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
800c090: 89b8 ldrh r0, [r7, #12]
800c092: 693b ldr r3, [r7, #16]
800c094: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c098: 7fbb ldrb r3, [r7, #30]
800c09a: 4a30 ldr r2, [pc, #192] ; (800c15c <dhcp_select+0x1e4>)
800c09c: 5cd3 ldrb r3, [r2, r3]
800c09e: 461a mov r2, r3
800c0a0: f000 ffa4 bl 800cfec <dhcp_option_byte>
800c0a4: 4603 mov r3, r0
800c0a6: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800c0a8: 7fbb ldrb r3, [r7, #30]
800c0aa: 3301 adds r3, #1
800c0ac: 77bb strb r3, [r7, #30]
800c0ae: 7fbb ldrb r3, [r7, #30]
800c0b0: 2b02 cmp r3, #2
800c0b2: d9ed bls.n 800c090 <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);
800c0b4: 89b8 ldrh r0, [r7, #12]
800c0b6: 693b ldr r3, [r7, #16]
800c0b8: 33f0 adds r3, #240 ; 0xf0
800c0ba: 697a ldr r2, [r7, #20]
800c0bc: 4619 mov r1, r3
800c0be: f001 fca9 bl 800da14 <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);
800c0c2: 4b27 ldr r3, [pc, #156] ; (800c160 <dhcp_select+0x1e8>)
800c0c4: 6818 ldr r0, [r3, #0]
800c0c6: 4b27 ldr r3, [pc, #156] ; (800c164 <dhcp_select+0x1ec>)
800c0c8: 9301 str r3, [sp, #4]
800c0ca: 687b ldr r3, [r7, #4]
800c0cc: 9300 str r3, [sp, #0]
800c0ce: 2343 movs r3, #67 ; 0x43
800c0d0: 4a25 ldr r2, [pc, #148] ; (800c168 <dhcp_select+0x1f0>)
800c0d2: 6979 ldr r1, [r7, #20]
800c0d4: f7ff fbda bl 800b88c <udp_sendto_if_src>
800c0d8: 4603 mov r3, r0
800c0da: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
800c0dc: 6978 ldr r0, [r7, #20]
800c0de: f7f9 fc5b bl 8005998 <pbuf_free>
800c0e2: e001 b.n 800c0e8 <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;
800c0e4: 23ff movs r3, #255 ; 0xff
800c0e6: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
800c0e8: 69bb ldr r3, [r7, #24]
800c0ea: 799b ldrb r3, [r3, #6]
800c0ec: 2bff cmp r3, #255 ; 0xff
800c0ee: d005 beq.n 800c0fc <dhcp_select+0x184>
dhcp->tries++;
800c0f0: 69bb ldr r3, [r7, #24]
800c0f2: 799b ldrb r3, [r3, #6]
800c0f4: 3301 adds r3, #1
800c0f6: b2da uxtb r2, r3
800c0f8: 69bb ldr r3, [r7, #24]
800c0fa: 719a strb r2, [r3, #6]
}
msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000);
800c0fc: 69bb ldr r3, [r7, #24]
800c0fe: 799b ldrb r3, [r3, #6]
800c100: 2b05 cmp r3, #5
800c102: d80d bhi.n 800c120 <dhcp_select+0x1a8>
800c104: 69bb ldr r3, [r7, #24]
800c106: 799b ldrb r3, [r3, #6]
800c108: 461a mov r2, r3
800c10a: 2301 movs r3, #1
800c10c: 4093 lsls r3, r2
800c10e: b29b uxth r3, r3
800c110: 461a mov r2, r3
800c112: 0152 lsls r2, r2, #5
800c114: 1ad2 subs r2, r2, r3
800c116: 0092 lsls r2, r2, #2
800c118: 4413 add r3, r2
800c11a: 00db lsls r3, r3, #3
800c11c: b29b uxth r3, r3
800c11e: e001 b.n 800c124 <dhcp_select+0x1ac>
800c120: f64e 2360 movw r3, #60000 ; 0xea60
800c124: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
800c126: 89fb ldrh r3, [r7, #14]
800c128: f203 13f3 addw r3, r3, #499 ; 0x1f3
800c12c: 4a0f ldr r2, [pc, #60] ; (800c16c <dhcp_select+0x1f4>)
800c12e: fb82 1203 smull r1, r2, r2, r3
800c132: 1152 asrs r2, r2, #5
800c134: 17db asrs r3, r3, #31
800c136: 1ad3 subs r3, r2, r3
800c138: b29a uxth r2, r3
800c13a: 69bb ldr r3, [r7, #24]
800c13c: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs));
return result;
800c13e: f997 301f ldrsb.w r3, [r7, #31]
}
800c142: 4618 mov r0, r3
800c144: 3720 adds r7, #32
800c146: 46bd mov sp, r7
800c148: bdb0 pop {r4, r5, r7, pc}
800c14a: bf00 nop
800c14c: 0801720c .word 0x0801720c
800c150: 080172b8 .word 0x080172b8
800c154: 0801726c .word 0x0801726c
800c158: 080172d4 .word 0x080172d4
800c15c: 2000002c .word 0x2000002c
800c160: 20008c88 .word 0x20008c88
800c164: 08017ddc .word 0x08017ddc
800c168: 08017de0 .word 0x08017de0
800c16c: 10624dd3 .word 0x10624dd3
0800c170 <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)
{
800c170: b580 push {r7, lr}
800c172: b082 sub sp, #8
800c174: 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) {
800c176: 4b27 ldr r3, [pc, #156] ; (800c214 <dhcp_coarse_tmr+0xa4>)
800c178: 681b ldr r3, [r3, #0]
800c17a: 607b str r3, [r7, #4]
800c17c: e042 b.n 800c204 <dhcp_coarse_tmr+0x94>
/* only act on DHCP configured interfaces */
struct dhcp *dhcp = netif_dhcp_data(netif);
800c17e: 687b ldr r3, [r7, #4]
800c180: 6a5b ldr r3, [r3, #36] ; 0x24
800c182: 603b str r3, [r7, #0]
if ((dhcp != NULL) && (dhcp->state != DHCP_STATE_OFF)) {
800c184: 683b ldr r3, [r7, #0]
800c186: 2b00 cmp r3, #0
800c188: d039 beq.n 800c1fe <dhcp_coarse_tmr+0x8e>
800c18a: 683b ldr r3, [r7, #0]
800c18c: 795b ldrb r3, [r3, #5]
800c18e: 2b00 cmp r3, #0
800c190: d035 beq.n 800c1fe <dhcp_coarse_tmr+0x8e>
/* compare lease time to expire timeout */
if (dhcp->t0_timeout && (++dhcp->lease_used == dhcp->t0_timeout)) {
800c192: 683b ldr r3, [r7, #0]
800c194: 8a9b ldrh r3, [r3, #20]
800c196: 2b00 cmp r3, #0
800c198: d012 beq.n 800c1c0 <dhcp_coarse_tmr+0x50>
800c19a: 683b ldr r3, [r7, #0]
800c19c: 8a5b ldrh r3, [r3, #18]
800c19e: 3301 adds r3, #1
800c1a0: b29a uxth r2, r3
800c1a2: 683b ldr r3, [r7, #0]
800c1a4: 825a strh r2, [r3, #18]
800c1a6: 683b ldr r3, [r7, #0]
800c1a8: 8a5a ldrh r2, [r3, #18]
800c1aa: 683b ldr r3, [r7, #0]
800c1ac: 8a9b ldrh r3, [r3, #20]
800c1ae: 429a cmp r2, r3
800c1b0: d106 bne.n 800c1c0 <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);
800c1b2: 6878 ldr r0, [r7, #4]
800c1b4: f000 fe32 bl 800ce1c <dhcp_release_and_stop>
dhcp_start(netif);
800c1b8: 6878 ldr r0, [r7, #4]
800c1ba: f000 f969 bl 800c490 <dhcp_start>
800c1be: e01e b.n 800c1fe <dhcp_coarse_tmr+0x8e>
/* timer is active (non zero), and triggers (zeroes) now? */
} else if (dhcp->t2_rebind_time && (dhcp->t2_rebind_time-- == 1)) {
800c1c0: 683b ldr r3, [r7, #0]
800c1c2: 8a1b ldrh r3, [r3, #16]
800c1c4: 2b00 cmp r3, #0
800c1c6: d00b beq.n 800c1e0 <dhcp_coarse_tmr+0x70>
800c1c8: 683b ldr r3, [r7, #0]
800c1ca: 8a1b ldrh r3, [r3, #16]
800c1cc: 1e5a subs r2, r3, #1
800c1ce: b291 uxth r1, r2
800c1d0: 683a ldr r2, [r7, #0]
800c1d2: 8211 strh r1, [r2, #16]
800c1d4: 2b01 cmp r3, #1
800c1d6: d103 bne.n 800c1e0 <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);
800c1d8: 6878 ldr r0, [r7, #4]
800c1da: f000 f8c6 bl 800c36a <dhcp_t2_timeout>
800c1de: e00e b.n 800c1fe <dhcp_coarse_tmr+0x8e>
/* timer is active (non zero), and triggers (zeroes) now */
} else if (dhcp->t1_renew_time && (dhcp->t1_renew_time-- == 1)) {
800c1e0: 683b ldr r3, [r7, #0]
800c1e2: 89db ldrh r3, [r3, #14]
800c1e4: 2b00 cmp r3, #0
800c1e6: d00a beq.n 800c1fe <dhcp_coarse_tmr+0x8e>
800c1e8: 683b ldr r3, [r7, #0]
800c1ea: 89db ldrh r3, [r3, #14]
800c1ec: 1e5a subs r2, r3, #1
800c1ee: b291 uxth r1, r2
800c1f0: 683a ldr r2, [r7, #0]
800c1f2: 81d1 strh r1, [r2, #14]
800c1f4: 2b01 cmp r3, #1
800c1f6: d102 bne.n 800c1fe <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);
800c1f8: 6878 ldr r0, [r7, #4]
800c1fa: f000 f888 bl 800c30e <dhcp_t1_timeout>
NETIF_FOREACH(netif) {
800c1fe: 687b ldr r3, [r7, #4]
800c200: 681b ldr r3, [r3, #0]
800c202: 607b str r3, [r7, #4]
800c204: 687b ldr r3, [r7, #4]
800c206: 2b00 cmp r3, #0
800c208: d1b9 bne.n 800c17e <dhcp_coarse_tmr+0xe>
}
}
}
}
800c20a: bf00 nop
800c20c: bf00 nop
800c20e: 3708 adds r7, #8
800c210: 46bd mov sp, r7
800c212: bd80 pop {r7, pc}
800c214: 20008bf4 .word 0x20008bf4
0800c218 <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)
{
800c218: b580 push {r7, lr}
800c21a: b082 sub sp, #8
800c21c: af00 add r7, sp, #0
struct netif *netif;
/* loop through netif's */
NETIF_FOREACH(netif) {
800c21e: 4b16 ldr r3, [pc, #88] ; (800c278 <dhcp_fine_tmr+0x60>)
800c220: 681b ldr r3, [r3, #0]
800c222: 607b str r3, [r7, #4]
800c224: e020 b.n 800c268 <dhcp_fine_tmr+0x50>
struct dhcp *dhcp = netif_dhcp_data(netif);
800c226: 687b ldr r3, [r7, #4]
800c228: 6a5b ldr r3, [r3, #36] ; 0x24
800c22a: 603b str r3, [r7, #0]
/* only act on DHCP configured interfaces */
if (dhcp != NULL) {
800c22c: 683b ldr r3, [r7, #0]
800c22e: 2b00 cmp r3, #0
800c230: d017 beq.n 800c262 <dhcp_fine_tmr+0x4a>
/* timer is active (non zero), and is about to trigger now */
if (dhcp->request_timeout > 1) {
800c232: 683b ldr r3, [r7, #0]
800c234: 891b ldrh r3, [r3, #8]
800c236: 2b01 cmp r3, #1
800c238: d906 bls.n 800c248 <dhcp_fine_tmr+0x30>
dhcp->request_timeout--;
800c23a: 683b ldr r3, [r7, #0]
800c23c: 891b ldrh r3, [r3, #8]
800c23e: 3b01 subs r3, #1
800c240: b29a uxth r2, r3
800c242: 683b ldr r3, [r7, #0]
800c244: 811a strh r2, [r3, #8]
800c246: e00c b.n 800c262 <dhcp_fine_tmr+0x4a>
} else if (dhcp->request_timeout == 1) {
800c248: 683b ldr r3, [r7, #0]
800c24a: 891b ldrh r3, [r3, #8]
800c24c: 2b01 cmp r3, #1
800c24e: d108 bne.n 800c262 <dhcp_fine_tmr+0x4a>
dhcp->request_timeout--;
800c250: 683b ldr r3, [r7, #0]
800c252: 891b ldrh r3, [r3, #8]
800c254: 3b01 subs r3, #1
800c256: b29a uxth r2, r3
800c258: 683b ldr r3, [r7, #0]
800c25a: 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);
800c25c: 6878 ldr r0, [r7, #4]
800c25e: f000 f80d bl 800c27c <dhcp_timeout>
NETIF_FOREACH(netif) {
800c262: 687b ldr r3, [r7, #4]
800c264: 681b ldr r3, [r3, #0]
800c266: 607b str r3, [r7, #4]
800c268: 687b ldr r3, [r7, #4]
800c26a: 2b00 cmp r3, #0
800c26c: d1db bne.n 800c226 <dhcp_fine_tmr+0xe>
}
}
}
}
800c26e: bf00 nop
800c270: bf00 nop
800c272: 3708 adds r7, #8
800c274: 46bd mov sp, r7
800c276: bd80 pop {r7, pc}
800c278: 20008bf4 .word 0x20008bf4
0800c27c <dhcp_timeout>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_timeout(struct netif *netif)
{
800c27c: b580 push {r7, lr}
800c27e: b084 sub sp, #16
800c280: af00 add r7, sp, #0
800c282: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800c284: 687b ldr r3, [r7, #4]
800c286: 6a5b ldr r3, [r3, #36] ; 0x24
800c288: 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)) {
800c28a: 68fb ldr r3, [r7, #12]
800c28c: 795b ldrb r3, [r3, #5]
800c28e: 2b0c cmp r3, #12
800c290: d003 beq.n 800c29a <dhcp_timeout+0x1e>
800c292: 68fb ldr r3, [r7, #12]
800c294: 795b ldrb r3, [r3, #5]
800c296: 2b06 cmp r3, #6
800c298: d103 bne.n 800c2a2 <dhcp_timeout+0x26>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout(): restarting discovery\n"));
dhcp_discover(netif);
800c29a: 6878 ldr r0, [r7, #4]
800c29c: f000 fa54 bl 800c748 <dhcp_discover>
dhcp_reboot(netif);
} else {
dhcp_discover(netif);
}
}
}
800c2a0: e031 b.n 800c306 <dhcp_timeout+0x8a>
} else if (dhcp->state == DHCP_STATE_REQUESTING) {
800c2a2: 68fb ldr r3, [r7, #12]
800c2a4: 795b ldrb r3, [r3, #5]
800c2a6: 2b01 cmp r3, #1
800c2a8: d10e bne.n 800c2c8 <dhcp_timeout+0x4c>
if (dhcp->tries <= 5) {
800c2aa: 68fb ldr r3, [r7, #12]
800c2ac: 799b ldrb r3, [r3, #6]
800c2ae: 2b05 cmp r3, #5
800c2b0: d803 bhi.n 800c2ba <dhcp_timeout+0x3e>
dhcp_select(netif);
800c2b2: 6878 ldr r0, [r7, #4]
800c2b4: f7ff fe60 bl 800bf78 <dhcp_select>
}
800c2b8: e025 b.n 800c306 <dhcp_timeout+0x8a>
dhcp_release_and_stop(netif);
800c2ba: 6878 ldr r0, [r7, #4]
800c2bc: f000 fdae bl 800ce1c <dhcp_release_and_stop>
dhcp_start(netif);
800c2c0: 6878 ldr r0, [r7, #4]
800c2c2: f000 f8e5 bl 800c490 <dhcp_start>
}
800c2c6: e01e b.n 800c306 <dhcp_timeout+0x8a>
} else if (dhcp->state == DHCP_STATE_CHECKING) {
800c2c8: 68fb ldr r3, [r7, #12]
800c2ca: 795b ldrb r3, [r3, #5]
800c2cc: 2b08 cmp r3, #8
800c2ce: d10b bne.n 800c2e8 <dhcp_timeout+0x6c>
if (dhcp->tries <= 1) {
800c2d0: 68fb ldr r3, [r7, #12]
800c2d2: 799b ldrb r3, [r3, #6]
800c2d4: 2b01 cmp r3, #1
800c2d6: d803 bhi.n 800c2e0 <dhcp_timeout+0x64>
dhcp_check(netif);
800c2d8: 6878 ldr r0, [r7, #4]
800c2da: f7ff fdf3 bl 800bec4 <dhcp_check>
}
800c2de: e012 b.n 800c306 <dhcp_timeout+0x8a>
dhcp_bind(netif);
800c2e0: 6878 ldr r0, [r7, #4]
800c2e2: f000 fad3 bl 800c88c <dhcp_bind>
}
800c2e6: e00e b.n 800c306 <dhcp_timeout+0x8a>
} else if (dhcp->state == DHCP_STATE_REBOOTING) {
800c2e8: 68fb ldr r3, [r7, #12]
800c2ea: 795b ldrb r3, [r3, #5]
800c2ec: 2b03 cmp r3, #3
800c2ee: d10a bne.n 800c306 <dhcp_timeout+0x8a>
if (dhcp->tries < REBOOT_TRIES) {
800c2f0: 68fb ldr r3, [r7, #12]
800c2f2: 799b ldrb r3, [r3, #6]
800c2f4: 2b01 cmp r3, #1
800c2f6: d803 bhi.n 800c300 <dhcp_timeout+0x84>
dhcp_reboot(netif);
800c2f8: 6878 ldr r0, [r7, #4]
800c2fa: f000 fcd9 bl 800ccb0 <dhcp_reboot>
}
800c2fe: e002 b.n 800c306 <dhcp_timeout+0x8a>
dhcp_discover(netif);
800c300: 6878 ldr r0, [r7, #4]
800c302: f000 fa21 bl 800c748 <dhcp_discover>
}
800c306: bf00 nop
800c308: 3710 adds r7, #16
800c30a: 46bd mov sp, r7
800c30c: bd80 pop {r7, pc}
0800c30e <dhcp_t1_timeout>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_t1_timeout(struct netif *netif)
{
800c30e: b580 push {r7, lr}
800c310: b084 sub sp, #16
800c312: af00 add r7, sp, #0
800c314: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800c316: 687b ldr r3, [r7, #4]
800c318: 6a5b ldr r3, [r3, #36] ; 0x24
800c31a: 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) ||
800c31c: 68fb ldr r3, [r7, #12]
800c31e: 795b ldrb r3, [r3, #5]
800c320: 2b01 cmp r3, #1
800c322: d007 beq.n 800c334 <dhcp_t1_timeout+0x26>
800c324: 68fb ldr r3, [r7, #12]
800c326: 795b ldrb r3, [r3, #5]
800c328: 2b0a cmp r3, #10
800c32a: d003 beq.n 800c334 <dhcp_t1_timeout+0x26>
(dhcp->state == DHCP_STATE_RENEWING)) {
800c32c: 68fb ldr r3, [r7, #12]
800c32e: 795b ldrb r3, [r3, #5]
if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
800c330: 2b05 cmp r3, #5
800c332: d116 bne.n 800c362 <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);
800c334: 6878 ldr r0, [r7, #4]
800c336: f000 fb83 bl 800ca40 <dhcp_renew>
/* Calculate next timeout */
if (((dhcp->t2_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) {
800c33a: 68fb ldr r3, [r7, #12]
800c33c: 899b ldrh r3, [r3, #12]
800c33e: 461a mov r2, r3
800c340: 68fb ldr r3, [r7, #12]
800c342: 8a5b ldrh r3, [r3, #18]
800c344: 1ad3 subs r3, r2, r3
800c346: 2b01 cmp r3, #1
800c348: dd0b ble.n 800c362 <dhcp_t1_timeout+0x54>
dhcp->t1_renew_time = (u16_t)((dhcp->t2_timeout - dhcp->lease_used) / 2);
800c34a: 68fb ldr r3, [r7, #12]
800c34c: 899b ldrh r3, [r3, #12]
800c34e: 461a mov r2, r3
800c350: 68fb ldr r3, [r7, #12]
800c352: 8a5b ldrh r3, [r3, #18]
800c354: 1ad3 subs r3, r2, r3
800c356: 0fda lsrs r2, r3, #31
800c358: 4413 add r3, r2
800c35a: 105b asrs r3, r3, #1
800c35c: b29a uxth r2, r3
800c35e: 68fb ldr r3, [r7, #12]
800c360: 81da strh r2, [r3, #14]
}
}
}
800c362: bf00 nop
800c364: 3710 adds r7, #16
800c366: 46bd mov sp, r7
800c368: bd80 pop {r7, pc}
0800c36a <dhcp_t2_timeout>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_t2_timeout(struct netif *netif)
{
800c36a: b580 push {r7, lr}
800c36c: b084 sub sp, #16
800c36e: af00 add r7, sp, #0
800c370: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800c372: 687b ldr r3, [r7, #4]
800c374: 6a5b ldr r3, [r3, #36] ; 0x24
800c376: 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) ||
800c378: 68fb ldr r3, [r7, #12]
800c37a: 795b ldrb r3, [r3, #5]
800c37c: 2b01 cmp r3, #1
800c37e: d00b beq.n 800c398 <dhcp_t2_timeout+0x2e>
800c380: 68fb ldr r3, [r7, #12]
800c382: 795b ldrb r3, [r3, #5]
800c384: 2b0a cmp r3, #10
800c386: d007 beq.n 800c398 <dhcp_t2_timeout+0x2e>
(dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) {
800c388: 68fb ldr r3, [r7, #12]
800c38a: 795b ldrb r3, [r3, #5]
if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
800c38c: 2b05 cmp r3, #5
800c38e: d003 beq.n 800c398 <dhcp_t2_timeout+0x2e>
(dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) {
800c390: 68fb ldr r3, [r7, #12]
800c392: 795b ldrb r3, [r3, #5]
800c394: 2b04 cmp r3, #4
800c396: d116 bne.n 800c3c6 <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);
800c398: 6878 ldr r0, [r7, #4]
800c39a: f000 fbed bl 800cb78 <dhcp_rebind>
/* Calculate next timeout */
if (((dhcp->t0_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) {
800c39e: 68fb ldr r3, [r7, #12]
800c3a0: 8a9b ldrh r3, [r3, #20]
800c3a2: 461a mov r2, r3
800c3a4: 68fb ldr r3, [r7, #12]
800c3a6: 8a5b ldrh r3, [r3, #18]
800c3a8: 1ad3 subs r3, r2, r3
800c3aa: 2b01 cmp r3, #1
800c3ac: dd0b ble.n 800c3c6 <dhcp_t2_timeout+0x5c>
dhcp->t2_rebind_time = (u16_t)((dhcp->t0_timeout - dhcp->lease_used) / 2);
800c3ae: 68fb ldr r3, [r7, #12]
800c3b0: 8a9b ldrh r3, [r3, #20]
800c3b2: 461a mov r2, r3
800c3b4: 68fb ldr r3, [r7, #12]
800c3b6: 8a5b ldrh r3, [r3, #18]
800c3b8: 1ad3 subs r3, r2, r3
800c3ba: 0fda lsrs r2, r3, #31
800c3bc: 4413 add r3, r2
800c3be: 105b asrs r3, r3, #1
800c3c0: b29a uxth r2, r3
800c3c2: 68fb ldr r3, [r7, #12]
800c3c4: 821a strh r2, [r3, #16]
}
}
}
800c3c6: bf00 nop
800c3c8: 3710 adds r7, #16
800c3ca: 46bd mov sp, r7
800c3cc: bd80 pop {r7, pc}
...
0800c3d0 <dhcp_handle_ack>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_handle_ack(struct netif *netif, struct dhcp_msg *msg_in)
{
800c3d0: b580 push {r7, lr}
800c3d2: b084 sub sp, #16
800c3d4: af00 add r7, sp, #0
800c3d6: 6078 str r0, [r7, #4]
800c3d8: 6039 str r1, [r7, #0]
struct dhcp *dhcp = netif_dhcp_data(netif);
800c3da: 687b ldr r3, [r7, #4]
800c3dc: 6a5b ldr r3, [r3, #36] ; 0x24
800c3de: 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);
800c3e0: 68fb ldr r3, [r7, #12]
800c3e2: 2200 movs r2, #0
800c3e4: 621a str r2, [r3, #32]
ip4_addr_set_zero(&dhcp->offered_gw_addr);
800c3e6: 68fb ldr r3, [r7, #12]
800c3e8: 2200 movs r2, #0
800c3ea: 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)) {
800c3ec: 4b26 ldr r3, [pc, #152] ; (800c488 <dhcp_handle_ack+0xb8>)
800c3ee: 78db ldrb r3, [r3, #3]
800c3f0: 2b00 cmp r3, #0
800c3f2: d003 beq.n 800c3fc <dhcp_handle_ack+0x2c>
/* remember offered lease time */
dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME);
800c3f4: 4b25 ldr r3, [pc, #148] ; (800c48c <dhcp_handle_ack+0xbc>)
800c3f6: 68da ldr r2, [r3, #12]
800c3f8: 68fb ldr r3, [r7, #12]
800c3fa: 629a str r2, [r3, #40] ; 0x28
}
/* renewal period given? */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) {
800c3fc: 4b22 ldr r3, [pc, #136] ; (800c488 <dhcp_handle_ack+0xb8>)
800c3fe: 791b ldrb r3, [r3, #4]
800c400: 2b00 cmp r3, #0
800c402: d004 beq.n 800c40e <dhcp_handle_ack+0x3e>
/* remember given renewal period */
dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1);
800c404: 4b21 ldr r3, [pc, #132] ; (800c48c <dhcp_handle_ack+0xbc>)
800c406: 691a ldr r2, [r3, #16]
800c408: 68fb ldr r3, [r7, #12]
800c40a: 62da str r2, [r3, #44] ; 0x2c
800c40c: e004 b.n 800c418 <dhcp_handle_ack+0x48>
} else {
/* calculate safe periods for renewal */
dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2;
800c40e: 68fb ldr r3, [r7, #12]
800c410: 6a9b ldr r3, [r3, #40] ; 0x28
800c412: 085a lsrs r2, r3, #1
800c414: 68fb ldr r3, [r7, #12]
800c416: 62da str r2, [r3, #44] ; 0x2c
}
/* renewal period given? */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) {
800c418: 4b1b ldr r3, [pc, #108] ; (800c488 <dhcp_handle_ack+0xb8>)
800c41a: 795b ldrb r3, [r3, #5]
800c41c: 2b00 cmp r3, #0
800c41e: d004 beq.n 800c42a <dhcp_handle_ack+0x5a>
/* remember given rebind period */
dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2);
800c420: 4b1a ldr r3, [pc, #104] ; (800c48c <dhcp_handle_ack+0xbc>)
800c422: 695a ldr r2, [r3, #20]
800c424: 68fb ldr r3, [r7, #12]
800c426: 631a str r2, [r3, #48] ; 0x30
800c428: e007 b.n 800c43a <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;
800c42a: 68fb ldr r3, [r7, #12]
800c42c: 6a9a ldr r2, [r3, #40] ; 0x28
800c42e: 4613 mov r3, r2
800c430: 00db lsls r3, r3, #3
800c432: 1a9b subs r3, r3, r2
800c434: 08da lsrs r2, r3, #3
800c436: 68fb ldr r3, [r7, #12]
800c438: 631a str r2, [r3, #48] ; 0x30
}
/* (y)our internet address */
ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr);
800c43a: 683b ldr r3, [r7, #0]
800c43c: 691a ldr r2, [r3, #16]
800c43e: 68fb ldr r3, [r7, #12]
800c440: 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)) {
800c442: 4b11 ldr r3, [pc, #68] ; (800c488 <dhcp_handle_ack+0xb8>)
800c444: 799b ldrb r3, [r3, #6]
800c446: 2b00 cmp r3, #0
800c448: d00b beq.n 800c462 <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)));
800c44a: 4b10 ldr r3, [pc, #64] ; (800c48c <dhcp_handle_ack+0xbc>)
800c44c: 699b ldr r3, [r3, #24]
800c44e: 4618 mov r0, r3
800c450: f7f7 ff4d bl 80042ee <lwip_htonl>
800c454: 4602 mov r2, r0
800c456: 68fb ldr r3, [r7, #12]
800c458: 621a str r2, [r3, #32]
dhcp->subnet_mask_given = 1;
800c45a: 68fb ldr r3, [r7, #12]
800c45c: 2201 movs r2, #1
800c45e: 71da strb r2, [r3, #7]
800c460: e002 b.n 800c468 <dhcp_handle_ack+0x98>
} else {
dhcp->subnet_mask_given = 0;
800c462: 68fb ldr r3, [r7, #12]
800c464: 2200 movs r2, #0
800c466: 71da strb r2, [r3, #7]
}
/* gateway router */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) {
800c468: 4b07 ldr r3, [pc, #28] ; (800c488 <dhcp_handle_ack+0xb8>)
800c46a: 79db ldrb r3, [r3, #7]
800c46c: 2b00 cmp r3, #0
800c46e: d007 beq.n 800c480 <dhcp_handle_ack+0xb0>
ip4_addr_set_u32(&dhcp->offered_gw_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER)));
800c470: 4b06 ldr r3, [pc, #24] ; (800c48c <dhcp_handle_ack+0xbc>)
800c472: 69db ldr r3, [r3, #28]
800c474: 4618 mov r0, r3
800c476: f7f7 ff3a bl 80042ee <lwip_htonl>
800c47a: 4602 mov r2, r0
800c47c: 68fb ldr r3, [r7, #12]
800c47e: 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 */
}
800c480: bf00 nop
800c482: 3710 adds r7, #16
800c484: 46bd mov sp, r7
800c486: bd80 pop {r7, pc}
800c488: 20008c80 .word 0x20008c80
800c48c: 20008c60 .word 0x20008c60
0800c490 <dhcp_start>:
* - ERR_OK - No error
* - ERR_MEM - Out of memory
*/
err_t
dhcp_start(struct netif *netif)
{
800c490: b580 push {r7, lr}
800c492: b084 sub sp, #16
800c494: af00 add r7, sp, #0
800c496: 6078 str r0, [r7, #4]
struct dhcp *dhcp;
err_t result;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;);
800c498: 687b ldr r3, [r7, #4]
800c49a: 2b00 cmp r3, #0
800c49c: d109 bne.n 800c4b2 <dhcp_start+0x22>
800c49e: 4b37 ldr r3, [pc, #220] ; (800c57c <dhcp_start+0xec>)
800c4a0: f240 22e7 movw r2, #743 ; 0x2e7
800c4a4: 4936 ldr r1, [pc, #216] ; (800c580 <dhcp_start+0xf0>)
800c4a6: 4837 ldr r0, [pc, #220] ; (800c584 <dhcp_start+0xf4>)
800c4a8: f003 ff92 bl 80103d0 <printf>
800c4ac: f06f 030f mvn.w r3, #15
800c4b0: e060 b.n 800c574 <dhcp_start+0xe4>
LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;);
800c4b2: 687b ldr r3, [r7, #4]
800c4b4: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800c4b8: f003 0301 and.w r3, r3, #1
800c4bc: 2b00 cmp r3, #0
800c4be: d109 bne.n 800c4d4 <dhcp_start+0x44>
800c4c0: 4b2e ldr r3, [pc, #184] ; (800c57c <dhcp_start+0xec>)
800c4c2: f44f 723a mov.w r2, #744 ; 0x2e8
800c4c6: 4930 ldr r1, [pc, #192] ; (800c588 <dhcp_start+0xf8>)
800c4c8: 482e ldr r0, [pc, #184] ; (800c584 <dhcp_start+0xf4>)
800c4ca: f003 ff81 bl 80103d0 <printf>
800c4ce: f06f 030f mvn.w r3, #15
800c4d2: e04f b.n 800c574 <dhcp_start+0xe4>
dhcp = netif_dhcp_data(netif);
800c4d4: 687b ldr r3, [r7, #4]
800c4d6: 6a5b ldr r3, [r3, #36] ; 0x24
800c4d8: 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) {
800c4da: 687b ldr r3, [r7, #4]
800c4dc: 8d1b ldrh r3, [r3, #40] ; 0x28
800c4de: f5b3 7f10 cmp.w r3, #576 ; 0x240
800c4e2: d202 bcs.n 800c4ea <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;
800c4e4: f04f 33ff mov.w r3, #4294967295
800c4e8: e044 b.n 800c574 <dhcp_start+0xe4>
}
/* no DHCP client attached yet? */
if (dhcp == NULL) {
800c4ea: 68fb ldr r3, [r7, #12]
800c4ec: 2b00 cmp r3, #0
800c4ee: d10d bne.n 800c50c <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));
800c4f0: 2034 movs r0, #52 ; 0x34
800c4f2: f7f8 f9cf bl 8004894 <mem_malloc>
800c4f6: 60f8 str r0, [r7, #12]
if (dhcp == NULL) {
800c4f8: 68fb ldr r3, [r7, #12]
800c4fa: 2b00 cmp r3, #0
800c4fc: d102 bne.n 800c504 <dhcp_start+0x74>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not allocate dhcp\n"));
return ERR_MEM;
800c4fe: f04f 33ff mov.w r3, #4294967295
800c502: e037 b.n 800c574 <dhcp_start+0xe4>
}
/* store this dhcp client in the netif */
netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp);
800c504: 687b ldr r3, [r7, #4]
800c506: 68fa ldr r2, [r7, #12]
800c508: 625a str r2, [r3, #36] ; 0x24
800c50a: e005 b.n 800c518 <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) {
800c50c: 68fb ldr r3, [r7, #12]
800c50e: 791b ldrb r3, [r3, #4]
800c510: 2b00 cmp r3, #0
800c512: d001 beq.n 800c518 <dhcp_start+0x88>
dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */
800c514: f7ff fc92 bl 800be3c <dhcp_dec_pcb_refcount>
}
/* dhcp is cleared below, no need to reset flag*/
}
/* clear data structure */
memset(dhcp, 0, sizeof(struct dhcp));
800c518: 2234 movs r2, #52 ; 0x34
800c51a: 2100 movs r1, #0
800c51c: 68f8 ldr r0, [r7, #12]
800c51e: f003 ff4f bl 80103c0 <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 */
800c522: f7ff fc39 bl 800bd98 <dhcp_inc_pcb_refcount>
800c526: 4603 mov r3, r0
800c528: 2b00 cmp r3, #0
800c52a: d002 beq.n 800c532 <dhcp_start+0xa2>
return ERR_MEM;
800c52c: f04f 33ff mov.w r3, #4294967295
800c530: e020 b.n 800c574 <dhcp_start+0xe4>
}
dhcp->pcb_allocated = 1;
800c532: 68fb ldr r3, [r7, #12]
800c534: 2201 movs r2, #1
800c536: 711a strb r2, [r3, #4]
if (!netif_is_link_up(netif)) {
800c538: 687b ldr r3, [r7, #4]
800c53a: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800c53e: f003 0304 and.w r3, r3, #4
800c542: 2b00 cmp r3, #0
800c544: d105 bne.n 800c552 <dhcp_start+0xc2>
/* set state INIT and wait for dhcp_network_changed() to call dhcp_discover() */
dhcp_set_state(dhcp, DHCP_STATE_INIT);
800c546: 2102 movs r1, #2
800c548: 68f8 ldr r0, [r7, #12]
800c54a: f000 fd01 bl 800cf50 <dhcp_set_state>
return ERR_OK;
800c54e: 2300 movs r3, #0
800c550: e010 b.n 800c574 <dhcp_start+0xe4>
}
/* (re)start the DHCP negotiation */
result = dhcp_discover(netif);
800c552: 6878 ldr r0, [r7, #4]
800c554: f000 f8f8 bl 800c748 <dhcp_discover>
800c558: 4603 mov r3, r0
800c55a: 72fb strb r3, [r7, #11]
if (result != ERR_OK) {
800c55c: f997 300b ldrsb.w r3, [r7, #11]
800c560: 2b00 cmp r3, #0
800c562: d005 beq.n 800c570 <dhcp_start+0xe0>
/* free resources allocated above */
dhcp_release_and_stop(netif);
800c564: 6878 ldr r0, [r7, #4]
800c566: f000 fc59 bl 800ce1c <dhcp_release_and_stop>
return ERR_MEM;
800c56a: f04f 33ff mov.w r3, #4294967295
800c56e: e001 b.n 800c574 <dhcp_start+0xe4>
}
return result;
800c570: f997 300b ldrsb.w r3, [r7, #11]
}
800c574: 4618 mov r0, r3
800c576: 3710 adds r7, #16
800c578: 46bd mov sp, r7
800c57a: bd80 pop {r7, pc}
800c57c: 0801720c .word 0x0801720c
800c580: 080172f0 .word 0x080172f0
800c584: 0801726c .word 0x0801726c
800c588: 08017334 .word 0x08017334
0800c58c <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)
{
800c58c: b580 push {r7, lr}
800c58e: b084 sub sp, #16
800c590: af00 add r7, sp, #0
800c592: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800c594: 687b ldr r3, [r7, #4]
800c596: 6a5b ldr r3, [r3, #36] ; 0x24
800c598: 60fb str r3, [r7, #12]
if (!dhcp) {
800c59a: 68fb ldr r3, [r7, #12]
800c59c: 2b00 cmp r3, #0
800c59e: d025 beq.n 800c5ec <dhcp_network_changed+0x60>
return;
}
switch (dhcp->state) {
800c5a0: 68fb ldr r3, [r7, #12]
800c5a2: 795b ldrb r3, [r3, #5]
800c5a4: 2b0a cmp r3, #10
800c5a6: d008 beq.n 800c5ba <dhcp_network_changed+0x2e>
800c5a8: 2b0a cmp r3, #10
800c5aa: dc0d bgt.n 800c5c8 <dhcp_network_changed+0x3c>
800c5ac: 2b00 cmp r3, #0
800c5ae: d01f beq.n 800c5f0 <dhcp_network_changed+0x64>
800c5b0: 2b00 cmp r3, #0
800c5b2: db09 blt.n 800c5c8 <dhcp_network_changed+0x3c>
800c5b4: 3b03 subs r3, #3
800c5b6: 2b02 cmp r3, #2
800c5b8: d806 bhi.n 800c5c8 <dhcp_network_changed+0x3c>
case DHCP_STATE_REBINDING:
case DHCP_STATE_RENEWING:
case DHCP_STATE_BOUND:
case DHCP_STATE_REBOOTING:
dhcp->tries = 0;
800c5ba: 68fb ldr r3, [r7, #12]
800c5bc: 2200 movs r2, #0
800c5be: 719a strb r2, [r3, #6]
dhcp_reboot(netif);
800c5c0: 6878 ldr r0, [r7, #4]
800c5c2: f000 fb75 bl 800ccb0 <dhcp_reboot>
break;
800c5c6: e014 b.n 800c5f2 <dhcp_network_changed+0x66>
case DHCP_STATE_OFF:
/* stay off */
break;
default:
LWIP_ASSERT("invalid dhcp->state", dhcp->state <= DHCP_STATE_BACKING_OFF);
800c5c8: 68fb ldr r3, [r7, #12]
800c5ca: 795b ldrb r3, [r3, #5]
800c5cc: 2b0c cmp r3, #12
800c5ce: d906 bls.n 800c5de <dhcp_network_changed+0x52>
800c5d0: 4b09 ldr r3, [pc, #36] ; (800c5f8 <dhcp_network_changed+0x6c>)
800c5d2: f240 326d movw r2, #877 ; 0x36d
800c5d6: 4909 ldr r1, [pc, #36] ; (800c5fc <dhcp_network_changed+0x70>)
800c5d8: 4809 ldr r0, [pc, #36] ; (800c600 <dhcp_network_changed+0x74>)
800c5da: f003 fef9 bl 80103d0 <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;
800c5de: 68fb ldr r3, [r7, #12]
800c5e0: 2200 movs r2, #0
800c5e2: 719a strb r2, [r3, #6]
dhcp_discover(netif);
800c5e4: 6878 ldr r0, [r7, #4]
800c5e6: f000 f8af bl 800c748 <dhcp_discover>
break;
800c5ea: e002 b.n 800c5f2 <dhcp_network_changed+0x66>
return;
800c5ec: bf00 nop
800c5ee: e000 b.n 800c5f2 <dhcp_network_changed+0x66>
break;
800c5f0: bf00 nop
}
}
800c5f2: 3710 adds r7, #16
800c5f4: 46bd mov sp, r7
800c5f6: bd80 pop {r7, pc}
800c5f8: 0801720c .word 0x0801720c
800c5fc: 08017358 .word 0x08017358
800c600: 0801726c .word 0x0801726c
0800c604 <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)
{
800c604: b580 push {r7, lr}
800c606: b084 sub sp, #16
800c608: af00 add r7, sp, #0
800c60a: 6078 str r0, [r7, #4]
800c60c: 6039 str r1, [r7, #0]
struct dhcp *dhcp;
LWIP_ERROR("netif != NULL", (netif != NULL), return;);
800c60e: 687b ldr r3, [r7, #4]
800c610: 2b00 cmp r3, #0
800c612: d107 bne.n 800c624 <dhcp_arp_reply+0x20>
800c614: 4b0e ldr r3, [pc, #56] ; (800c650 <dhcp_arp_reply+0x4c>)
800c616: f240 328b movw r2, #907 ; 0x38b
800c61a: 490e ldr r1, [pc, #56] ; (800c654 <dhcp_arp_reply+0x50>)
800c61c: 480e ldr r0, [pc, #56] ; (800c658 <dhcp_arp_reply+0x54>)
800c61e: f003 fed7 bl 80103d0 <printf>
800c622: e012 b.n 800c64a <dhcp_arp_reply+0x46>
dhcp = netif_dhcp_data(netif);
800c624: 687b ldr r3, [r7, #4]
800c626: 6a5b ldr r3, [r3, #36] ; 0x24
800c628: 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)) {
800c62a: 68fb ldr r3, [r7, #12]
800c62c: 2b00 cmp r3, #0
800c62e: d00c beq.n 800c64a <dhcp_arp_reply+0x46>
800c630: 68fb ldr r3, [r7, #12]
800c632: 795b ldrb r3, [r3, #5]
800c634: 2b08 cmp r3, #8
800c636: d108 bne.n 800c64a <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)) {
800c638: 683b ldr r3, [r7, #0]
800c63a: 681a ldr r2, [r3, #0]
800c63c: 68fb ldr r3, [r7, #12]
800c63e: 69db ldr r3, [r3, #28]
800c640: 429a cmp r2, r3
800c642: d102 bne.n 800c64a <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);
800c644: 6878 ldr r0, [r7, #4]
800c646: f000 f809 bl 800c65c <dhcp_decline>
}
}
}
800c64a: 3710 adds r7, #16
800c64c: 46bd mov sp, r7
800c64e: bd80 pop {r7, pc}
800c650: 0801720c .word 0x0801720c
800c654: 080172f0 .word 0x080172f0
800c658: 0801726c .word 0x0801726c
0800c65c <dhcp_decline>:
*
* @param netif the netif under DHCP control
*/
static err_t
dhcp_decline(struct netif *netif)
{
800c65c: b5b0 push {r4, r5, r7, lr}
800c65e: b08a sub sp, #40 ; 0x28
800c660: af02 add r7, sp, #8
800c662: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800c664: 687b ldr r3, [r7, #4]
800c666: 6a5b ldr r3, [r3, #36] ; 0x24
800c668: 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);
800c66a: 210c movs r1, #12
800c66c: 69b8 ldr r0, [r7, #24]
800c66e: f000 fc6f bl 800cf50 <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_DECLINE, &options_out_len);
800c672: f107 030c add.w r3, r7, #12
800c676: 2204 movs r2, #4
800c678: 69b9 ldr r1, [r7, #24]
800c67a: 6878 ldr r0, [r7, #4]
800c67c: f001 f8f4 bl 800d868 <dhcp_create_msg>
800c680: 6178 str r0, [r7, #20]
if (p_out != NULL) {
800c682: 697b ldr r3, [r7, #20]
800c684: 2b00 cmp r3, #0
800c686: d035 beq.n 800c6f4 <dhcp_decline+0x98>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
800c688: 697b ldr r3, [r7, #20]
800c68a: 685b ldr r3, [r3, #4]
800c68c: 613b str r3, [r7, #16]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
800c68e: 89b8 ldrh r0, [r7, #12]
800c690: 693b ldr r3, [r7, #16]
800c692: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c696: 2304 movs r3, #4
800c698: 2232 movs r2, #50 ; 0x32
800c69a: f000 fc73 bl 800cf84 <dhcp_option>
800c69e: 4603 mov r3, r0
800c6a0: 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)));
800c6a2: 89bc ldrh r4, [r7, #12]
800c6a4: 693b ldr r3, [r7, #16]
800c6a6: f103 05f0 add.w r5, r3, #240 ; 0xf0
800c6aa: 69bb ldr r3, [r7, #24]
800c6ac: 69db ldr r3, [r3, #28]
800c6ae: 4618 mov r0, r3
800c6b0: f7f7 fe1d bl 80042ee <lwip_htonl>
800c6b4: 4603 mov r3, r0
800c6b6: 461a mov r2, r3
800c6b8: 4629 mov r1, r5
800c6ba: 4620 mov r0, r4
800c6bc: f000 fcee bl 800d09c <dhcp_option_long>
800c6c0: 4603 mov r3, r0
800c6c2: 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);
800c6c4: 89b8 ldrh r0, [r7, #12]
800c6c6: 693b ldr r3, [r7, #16]
800c6c8: 33f0 adds r3, #240 ; 0xf0
800c6ca: 697a ldr r2, [r7, #20]
800c6cc: 4619 mov r1, r3
800c6ce: f001 f9a1 bl 800da14 <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);
800c6d2: 4b19 ldr r3, [pc, #100] ; (800c738 <dhcp_decline+0xdc>)
800c6d4: 6818 ldr r0, [r3, #0]
800c6d6: 4b19 ldr r3, [pc, #100] ; (800c73c <dhcp_decline+0xe0>)
800c6d8: 9301 str r3, [sp, #4]
800c6da: 687b ldr r3, [r7, #4]
800c6dc: 9300 str r3, [sp, #0]
800c6de: 2343 movs r3, #67 ; 0x43
800c6e0: 4a17 ldr r2, [pc, #92] ; (800c740 <dhcp_decline+0xe4>)
800c6e2: 6979 ldr r1, [r7, #20]
800c6e4: f7ff f8d2 bl 800b88c <udp_sendto_if_src>
800c6e8: 4603 mov r3, r0
800c6ea: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
800c6ec: 6978 ldr r0, [r7, #20]
800c6ee: f7f9 f953 bl 8005998 <pbuf_free>
800c6f2: e001 b.n 800c6f8 <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;
800c6f4: 23ff movs r3, #255 ; 0xff
800c6f6: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
800c6f8: 69bb ldr r3, [r7, #24]
800c6fa: 799b ldrb r3, [r3, #6]
800c6fc: 2bff cmp r3, #255 ; 0xff
800c6fe: d005 beq.n 800c70c <dhcp_decline+0xb0>
dhcp->tries++;
800c700: 69bb ldr r3, [r7, #24]
800c702: 799b ldrb r3, [r3, #6]
800c704: 3301 adds r3, #1
800c706: b2da uxtb r2, r3
800c708: 69bb ldr r3, [r7, #24]
800c70a: 719a strb r2, [r3, #6]
}
msecs = 10 * 1000;
800c70c: f242 7310 movw r3, #10000 ; 0x2710
800c710: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
800c712: 89fb ldrh r3, [r7, #14]
800c714: f203 13f3 addw r3, r3, #499 ; 0x1f3
800c718: 4a0a ldr r2, [pc, #40] ; (800c744 <dhcp_decline+0xe8>)
800c71a: fb82 1203 smull r1, r2, r2, r3
800c71e: 1152 asrs r2, r2, #5
800c720: 17db asrs r3, r3, #31
800c722: 1ad3 subs r3, r2, r3
800c724: b29a uxth r2, r3
800c726: 69bb ldr r3, [r7, #24]
800c728: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline(): set request timeout %"U16_F" msecs\n", msecs));
return result;
800c72a: f997 301f ldrsb.w r3, [r7, #31]
}
800c72e: 4618 mov r0, r3
800c730: 3720 adds r7, #32
800c732: 46bd mov sp, r7
800c734: bdb0 pop {r4, r5, r7, pc}
800c736: bf00 nop
800c738: 20008c88 .word 0x20008c88
800c73c: 08017ddc .word 0x08017ddc
800c740: 08017de0 .word 0x08017de0
800c744: 10624dd3 .word 0x10624dd3
0800c748 <dhcp_discover>:
*
* @param netif the netif under DHCP control
*/
static err_t
dhcp_discover(struct netif *netif)
{
800c748: b580 push {r7, lr}
800c74a: b08a sub sp, #40 ; 0x28
800c74c: af02 add r7, sp, #8
800c74e: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800c750: 687b ldr r3, [r7, #4]
800c752: 6a5b ldr r3, [r3, #36] ; 0x24
800c754: 61bb str r3, [r7, #24]
err_t result = ERR_OK;
800c756: 2300 movs r3, #0
800c758: 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);
800c75a: 69bb ldr r3, [r7, #24]
800c75c: 2200 movs r2, #0
800c75e: 61da str r2, [r3, #28]
dhcp_set_state(dhcp, DHCP_STATE_SELECTING);
800c760: 2106 movs r1, #6
800c762: 69b8 ldr r0, [r7, #24]
800c764: f000 fbf4 bl 800cf50 <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER, &options_out_len);
800c768: f107 0308 add.w r3, r7, #8
800c76c: 2201 movs r2, #1
800c76e: 69b9 ldr r1, [r7, #24]
800c770: 6878 ldr r0, [r7, #4]
800c772: f001 f879 bl 800d868 <dhcp_create_msg>
800c776: 6138 str r0, [r7, #16]
if (p_out != NULL) {
800c778: 693b ldr r3, [r7, #16]
800c77a: 2b00 cmp r3, #0
800c77c: d04b beq.n 800c816 <dhcp_discover+0xce>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
800c77e: 693b ldr r3, [r7, #16]
800c780: 685b ldr r3, [r3, #4]
800c782: 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);
800c784: 8938 ldrh r0, [r7, #8]
800c786: 68fb ldr r3, [r7, #12]
800c788: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c78c: 2302 movs r3, #2
800c78e: 2239 movs r2, #57 ; 0x39
800c790: f000 fbf8 bl 800cf84 <dhcp_option>
800c794: 4603 mov r3, r0
800c796: 813b strh r3, [r7, #8]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
800c798: 8938 ldrh r0, [r7, #8]
800c79a: 68fb ldr r3, [r7, #12]
800c79c: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c7a0: 687b ldr r3, [r7, #4]
800c7a2: 8d1b ldrh r3, [r3, #40] ; 0x28
800c7a4: 461a mov r2, r3
800c7a6: f000 fc47 bl 800d038 <dhcp_option_short>
800c7aa: 4603 mov r3, r0
800c7ac: 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));
800c7ae: 8938 ldrh r0, [r7, #8]
800c7b0: 68fb ldr r3, [r7, #12]
800c7b2: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c7b6: 2303 movs r3, #3
800c7b8: 2237 movs r2, #55 ; 0x37
800c7ba: f000 fbe3 bl 800cf84 <dhcp_option>
800c7be: 4603 mov r3, r0
800c7c0: 813b strh r3, [r7, #8]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800c7c2: 2300 movs r3, #0
800c7c4: 77fb strb r3, [r7, #31]
800c7c6: e00e b.n 800c7e6 <dhcp_discover+0x9e>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
800c7c8: 8938 ldrh r0, [r7, #8]
800c7ca: 68fb ldr r3, [r7, #12]
800c7cc: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c7d0: 7ffb ldrb r3, [r7, #31]
800c7d2: 4a29 ldr r2, [pc, #164] ; (800c878 <dhcp_discover+0x130>)
800c7d4: 5cd3 ldrb r3, [r2, r3]
800c7d6: 461a mov r2, r3
800c7d8: f000 fc08 bl 800cfec <dhcp_option_byte>
800c7dc: 4603 mov r3, r0
800c7de: 813b strh r3, [r7, #8]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800c7e0: 7ffb ldrb r3, [r7, #31]
800c7e2: 3301 adds r3, #1
800c7e4: 77fb strb r3, [r7, #31]
800c7e6: 7ffb ldrb r3, [r7, #31]
800c7e8: 2b02 cmp r3, #2
800c7ea: d9ed bls.n 800c7c8 <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);
800c7ec: 8938 ldrh r0, [r7, #8]
800c7ee: 68fb ldr r3, [r7, #12]
800c7f0: 33f0 adds r3, #240 ; 0xf0
800c7f2: 693a ldr r2, [r7, #16]
800c7f4: 4619 mov r1, r3
800c7f6: f001 f90d bl 800da14 <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);
800c7fa: 4b20 ldr r3, [pc, #128] ; (800c87c <dhcp_discover+0x134>)
800c7fc: 6818 ldr r0, [r3, #0]
800c7fe: 4b20 ldr r3, [pc, #128] ; (800c880 <dhcp_discover+0x138>)
800c800: 9301 str r3, [sp, #4]
800c802: 687b ldr r3, [r7, #4]
800c804: 9300 str r3, [sp, #0]
800c806: 2343 movs r3, #67 ; 0x43
800c808: 4a1e ldr r2, [pc, #120] ; (800c884 <dhcp_discover+0x13c>)
800c80a: 6939 ldr r1, [r7, #16]
800c80c: f7ff f83e bl 800b88c <udp_sendto_if_src>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n"));
pbuf_free(p_out);
800c810: 6938 ldr r0, [r7, #16]
800c812: f7f9 f8c1 bl 8005998 <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) {
800c816: 69bb ldr r3, [r7, #24]
800c818: 799b ldrb r3, [r3, #6]
800c81a: 2bff cmp r3, #255 ; 0xff
800c81c: d005 beq.n 800c82a <dhcp_discover+0xe2>
dhcp->tries++;
800c81e: 69bb ldr r3, [r7, #24]
800c820: 799b ldrb r3, [r3, #6]
800c822: 3301 adds r3, #1
800c824: b2da uxtb r2, r3
800c826: 69bb ldr r3, [r7, #24]
800c828: 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);
800c82a: 69bb ldr r3, [r7, #24]
800c82c: 799b ldrb r3, [r3, #6]
800c82e: 2b05 cmp r3, #5
800c830: d80d bhi.n 800c84e <dhcp_discover+0x106>
800c832: 69bb ldr r3, [r7, #24]
800c834: 799b ldrb r3, [r3, #6]
800c836: 461a mov r2, r3
800c838: 2301 movs r3, #1
800c83a: 4093 lsls r3, r2
800c83c: b29b uxth r3, r3
800c83e: 461a mov r2, r3
800c840: 0152 lsls r2, r2, #5
800c842: 1ad2 subs r2, r2, r3
800c844: 0092 lsls r2, r2, #2
800c846: 4413 add r3, r2
800c848: 00db lsls r3, r3, #3
800c84a: b29b uxth r3, r3
800c84c: e001 b.n 800c852 <dhcp_discover+0x10a>
800c84e: f64e 2360 movw r3, #60000 ; 0xea60
800c852: 817b strh r3, [r7, #10]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
800c854: 897b ldrh r3, [r7, #10]
800c856: f203 13f3 addw r3, r3, #499 ; 0x1f3
800c85a: 4a0b ldr r2, [pc, #44] ; (800c888 <dhcp_discover+0x140>)
800c85c: fb82 1203 smull r1, r2, r2, r3
800c860: 1152 asrs r2, r2, #5
800c862: 17db asrs r3, r3, #31
800c864: 1ad3 subs r3, r2, r3
800c866: b29a uxth r2, r3
800c868: 69bb ldr r3, [r7, #24]
800c86a: 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;
800c86c: f997 3017 ldrsb.w r3, [r7, #23]
}
800c870: 4618 mov r0, r3
800c872: 3720 adds r7, #32
800c874: 46bd mov sp, r7
800c876: bd80 pop {r7, pc}
800c878: 2000002c .word 0x2000002c
800c87c: 20008c88 .word 0x20008c88
800c880: 08017ddc .word 0x08017ddc
800c884: 08017de0 .word 0x08017de0
800c888: 10624dd3 .word 0x10624dd3
0800c88c <dhcp_bind>:
*
* @param netif network interface to bind to the offered address
*/
static void
dhcp_bind(struct netif *netif)
{
800c88c: b580 push {r7, lr}
800c88e: b088 sub sp, #32
800c890: af00 add r7, sp, #0
800c892: 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;);
800c894: 687b ldr r3, [r7, #4]
800c896: 2b00 cmp r3, #0
800c898: d107 bne.n 800c8aa <dhcp_bind+0x1e>
800c89a: 4b64 ldr r3, [pc, #400] ; (800ca2c <dhcp_bind+0x1a0>)
800c89c: f240 4215 movw r2, #1045 ; 0x415
800c8a0: 4963 ldr r1, [pc, #396] ; (800ca30 <dhcp_bind+0x1a4>)
800c8a2: 4864 ldr r0, [pc, #400] ; (800ca34 <dhcp_bind+0x1a8>)
800c8a4: f003 fd94 bl 80103d0 <printf>
800c8a8: e0bc b.n 800ca24 <dhcp_bind+0x198>
dhcp = netif_dhcp_data(netif);
800c8aa: 687b ldr r3, [r7, #4]
800c8ac: 6a5b ldr r3, [r3, #36] ; 0x24
800c8ae: 61bb str r3, [r7, #24]
LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;);
800c8b0: 69bb ldr r3, [r7, #24]
800c8b2: 2b00 cmp r3, #0
800c8b4: d107 bne.n 800c8c6 <dhcp_bind+0x3a>
800c8b6: 4b5d ldr r3, [pc, #372] ; (800ca2c <dhcp_bind+0x1a0>)
800c8b8: f240 4217 movw r2, #1047 ; 0x417
800c8bc: 495e ldr r1, [pc, #376] ; (800ca38 <dhcp_bind+0x1ac>)
800c8be: 485d ldr r0, [pc, #372] ; (800ca34 <dhcp_bind+0x1a8>)
800c8c0: f003 fd86 bl 80103d0 <printf>
800c8c4: e0ae b.n 800ca24 <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;
800c8c6: 69bb ldr r3, [r7, #24]
800c8c8: 2200 movs r2, #0
800c8ca: 825a strh r2, [r3, #18]
if (dhcp->offered_t0_lease != 0xffffffffUL) {
800c8cc: 69bb ldr r3, [r7, #24]
800c8ce: 6a9b ldr r3, [r3, #40] ; 0x28
800c8d0: f1b3 3fff cmp.w r3, #4294967295
800c8d4: d019 beq.n 800c90a <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;
800c8d6: 69bb ldr r3, [r7, #24]
800c8d8: 6a9b ldr r3, [r3, #40] ; 0x28
800c8da: 331e adds r3, #30
800c8dc: 4a57 ldr r2, [pc, #348] ; (800ca3c <dhcp_bind+0x1b0>)
800c8de: fba2 2303 umull r2, r3, r2, r3
800c8e2: 095b lsrs r3, r3, #5
800c8e4: 61fb str r3, [r7, #28]
if (timeout > 0xffff) {
800c8e6: 69fb ldr r3, [r7, #28]
800c8e8: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800c8ec: d302 bcc.n 800c8f4 <dhcp_bind+0x68>
timeout = 0xffff;
800c8ee: f64f 73ff movw r3, #65535 ; 0xffff
800c8f2: 61fb str r3, [r7, #28]
}
dhcp->t0_timeout = (u16_t)timeout;
800c8f4: 69fb ldr r3, [r7, #28]
800c8f6: b29a uxth r2, r3
800c8f8: 69bb ldr r3, [r7, #24]
800c8fa: 829a strh r2, [r3, #20]
if (dhcp->t0_timeout == 0) {
800c8fc: 69bb ldr r3, [r7, #24]
800c8fe: 8a9b ldrh r3, [r3, #20]
800c900: 2b00 cmp r3, #0
800c902: d102 bne.n 800c90a <dhcp_bind+0x7e>
dhcp->t0_timeout = 1;
800c904: 69bb ldr r3, [r7, #24]
800c906: 2201 movs r2, #1
800c908: 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) {
800c90a: 69bb ldr r3, [r7, #24]
800c90c: 6adb ldr r3, [r3, #44] ; 0x2c
800c90e: f1b3 3fff cmp.w r3, #4294967295
800c912: d01d beq.n 800c950 <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;
800c914: 69bb ldr r3, [r7, #24]
800c916: 6adb ldr r3, [r3, #44] ; 0x2c
800c918: 331e adds r3, #30
800c91a: 4a48 ldr r2, [pc, #288] ; (800ca3c <dhcp_bind+0x1b0>)
800c91c: fba2 2303 umull r2, r3, r2, r3
800c920: 095b lsrs r3, r3, #5
800c922: 61fb str r3, [r7, #28]
if (timeout > 0xffff) {
800c924: 69fb ldr r3, [r7, #28]
800c926: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800c92a: d302 bcc.n 800c932 <dhcp_bind+0xa6>
timeout = 0xffff;
800c92c: f64f 73ff movw r3, #65535 ; 0xffff
800c930: 61fb str r3, [r7, #28]
}
dhcp->t1_timeout = (u16_t)timeout;
800c932: 69fb ldr r3, [r7, #28]
800c934: b29a uxth r2, r3
800c936: 69bb ldr r3, [r7, #24]
800c938: 815a strh r2, [r3, #10]
if (dhcp->t1_timeout == 0) {
800c93a: 69bb ldr r3, [r7, #24]
800c93c: 895b ldrh r3, [r3, #10]
800c93e: 2b00 cmp r3, #0
800c940: d102 bne.n 800c948 <dhcp_bind+0xbc>
dhcp->t1_timeout = 1;
800c942: 69bb ldr r3, [r7, #24]
800c944: 2201 movs r2, #1
800c946: 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;
800c948: 69bb ldr r3, [r7, #24]
800c94a: 895a ldrh r2, [r3, #10]
800c94c: 69bb ldr r3, [r7, #24]
800c94e: 81da strh r2, [r3, #14]
}
/* set renewal period timer */
if (dhcp->offered_t2_rebind != 0xffffffffUL) {
800c950: 69bb ldr r3, [r7, #24]
800c952: 6b1b ldr r3, [r3, #48] ; 0x30
800c954: f1b3 3fff cmp.w r3, #4294967295
800c958: d01d beq.n 800c996 <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;
800c95a: 69bb ldr r3, [r7, #24]
800c95c: 6b1b ldr r3, [r3, #48] ; 0x30
800c95e: 331e adds r3, #30
800c960: 4a36 ldr r2, [pc, #216] ; (800ca3c <dhcp_bind+0x1b0>)
800c962: fba2 2303 umull r2, r3, r2, r3
800c966: 095b lsrs r3, r3, #5
800c968: 61fb str r3, [r7, #28]
if (timeout > 0xffff) {
800c96a: 69fb ldr r3, [r7, #28]
800c96c: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800c970: d302 bcc.n 800c978 <dhcp_bind+0xec>
timeout = 0xffff;
800c972: f64f 73ff movw r3, #65535 ; 0xffff
800c976: 61fb str r3, [r7, #28]
}
dhcp->t2_timeout = (u16_t)timeout;
800c978: 69fb ldr r3, [r7, #28]
800c97a: b29a uxth r2, r3
800c97c: 69bb ldr r3, [r7, #24]
800c97e: 819a strh r2, [r3, #12]
if (dhcp->t2_timeout == 0) {
800c980: 69bb ldr r3, [r7, #24]
800c982: 899b ldrh r3, [r3, #12]
800c984: 2b00 cmp r3, #0
800c986: d102 bne.n 800c98e <dhcp_bind+0x102>
dhcp->t2_timeout = 1;
800c988: 69bb ldr r3, [r7, #24]
800c98a: 2201 movs r2, #1
800c98c: 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;
800c98e: 69bb ldr r3, [r7, #24]
800c990: 899a ldrh r2, [r3, #12]
800c992: 69bb ldr r3, [r7, #24]
800c994: 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)) {
800c996: 69bb ldr r3, [r7, #24]
800c998: 895a ldrh r2, [r3, #10]
800c99a: 69bb ldr r3, [r7, #24]
800c99c: 899b ldrh r3, [r3, #12]
800c99e: 429a cmp r2, r3
800c9a0: d306 bcc.n 800c9b0 <dhcp_bind+0x124>
800c9a2: 69bb ldr r3, [r7, #24]
800c9a4: 899b ldrh r3, [r3, #12]
800c9a6: 2b00 cmp r3, #0
800c9a8: d002 beq.n 800c9b0 <dhcp_bind+0x124>
dhcp->t1_timeout = 0;
800c9aa: 69bb ldr r3, [r7, #24]
800c9ac: 2200 movs r2, #0
800c9ae: 815a strh r2, [r3, #10]
}
if (dhcp->subnet_mask_given) {
800c9b0: 69bb ldr r3, [r7, #24]
800c9b2: 79db ldrb r3, [r3, #7]
800c9b4: 2b00 cmp r3, #0
800c9b6: d003 beq.n 800c9c0 <dhcp_bind+0x134>
/* copy offered network mask */
ip4_addr_copy(sn_mask, dhcp->offered_sn_mask);
800c9b8: 69bb ldr r3, [r7, #24]
800c9ba: 6a1b ldr r3, [r3, #32]
800c9bc: 613b str r3, [r7, #16]
800c9be: e014 b.n 800c9ea <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);
800c9c0: 69bb ldr r3, [r7, #24]
800c9c2: 331c adds r3, #28
800c9c4: 781b ldrb r3, [r3, #0]
800c9c6: 75fb strb r3, [r7, #23]
if (first_octet <= 127) {
800c9c8: f997 3017 ldrsb.w r3, [r7, #23]
800c9cc: 2b00 cmp r3, #0
800c9ce: db02 blt.n 800c9d6 <dhcp_bind+0x14a>
ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL));
800c9d0: 23ff movs r3, #255 ; 0xff
800c9d2: 613b str r3, [r7, #16]
800c9d4: e009 b.n 800c9ea <dhcp_bind+0x15e>
} else if (first_octet >= 192) {
800c9d6: 7dfb ldrb r3, [r7, #23]
800c9d8: 2bbf cmp r3, #191 ; 0xbf
800c9da: d903 bls.n 800c9e4 <dhcp_bind+0x158>
ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL));
800c9dc: f06f 437f mvn.w r3, #4278190080 ; 0xff000000
800c9e0: 613b str r3, [r7, #16]
800c9e2: e002 b.n 800c9ea <dhcp_bind+0x15e>
} else {
ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL));
800c9e4: f64f 73ff movw r3, #65535 ; 0xffff
800c9e8: 613b str r3, [r7, #16]
}
}
ip4_addr_copy(gw_addr, dhcp->offered_gw_addr);
800c9ea: 69bb ldr r3, [r7, #24]
800c9ec: 6a5b ldr r3, [r3, #36] ; 0x24
800c9ee: 60fb str r3, [r7, #12]
/* gateway address not given? */
if (ip4_addr_isany_val(gw_addr)) {
800c9f0: 68fb ldr r3, [r7, #12]
800c9f2: 2b00 cmp r3, #0
800c9f4: d108 bne.n 800ca08 <dhcp_bind+0x17c>
/* copy network address */
ip4_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask);
800c9f6: 69bb ldr r3, [r7, #24]
800c9f8: 69da ldr r2, [r3, #28]
800c9fa: 693b ldr r3, [r7, #16]
800c9fc: 4013 ands r3, r2
800c9fe: 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));
800ca00: 68fb ldr r3, [r7, #12]
800ca02: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000
800ca06: 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);
800ca08: 210a movs r1, #10
800ca0a: 69b8 ldr r0, [r7, #24]
800ca0c: f000 faa0 bl 800cf50 <dhcp_set_state>
netif_set_addr(netif, &dhcp->offered_ip_addr, &sn_mask, &gw_addr);
800ca10: 69bb ldr r3, [r7, #24]
800ca12: f103 011c add.w r1, r3, #28
800ca16: f107 030c add.w r3, r7, #12
800ca1a: f107 0210 add.w r2, r7, #16
800ca1e: 6878 ldr r0, [r7, #4]
800ca20: f7f8 fada bl 8004fd8 <netif_set_addr>
/* interface is used by routing now that an address is set */
}
800ca24: 3720 adds r7, #32
800ca26: 46bd mov sp, r7
800ca28: bd80 pop {r7, pc}
800ca2a: bf00 nop
800ca2c: 0801720c .word 0x0801720c
800ca30: 0801736c .word 0x0801736c
800ca34: 0801726c .word 0x0801726c
800ca38: 08017388 .word 0x08017388
800ca3c: 88888889 .word 0x88888889
0800ca40 <dhcp_renew>:
*
* @param netif network interface which must renew its lease
*/
err_t
dhcp_renew(struct netif *netif)
{
800ca40: b580 push {r7, lr}
800ca42: b08a sub sp, #40 ; 0x28
800ca44: af02 add r7, sp, #8
800ca46: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800ca48: 687b ldr r3, [r7, #4]
800ca4a: 6a5b ldr r3, [r3, #36] ; 0x24
800ca4c: 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);
800ca4e: 2105 movs r1, #5
800ca50: 69b8 ldr r0, [r7, #24]
800ca52: f000 fa7d bl 800cf50 <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
800ca56: f107 030c add.w r3, r7, #12
800ca5a: 2203 movs r2, #3
800ca5c: 69b9 ldr r1, [r7, #24]
800ca5e: 6878 ldr r0, [r7, #4]
800ca60: f000 ff02 bl 800d868 <dhcp_create_msg>
800ca64: 6178 str r0, [r7, #20]
if (p_out != NULL) {
800ca66: 697b ldr r3, [r7, #20]
800ca68: 2b00 cmp r3, #0
800ca6a: d04e beq.n 800cb0a <dhcp_renew+0xca>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
800ca6c: 697b ldr r3, [r7, #20]
800ca6e: 685b ldr r3, [r3, #4]
800ca70: 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);
800ca72: 89b8 ldrh r0, [r7, #12]
800ca74: 693b ldr r3, [r7, #16]
800ca76: f103 01f0 add.w r1, r3, #240 ; 0xf0
800ca7a: 2302 movs r3, #2
800ca7c: 2239 movs r2, #57 ; 0x39
800ca7e: f000 fa81 bl 800cf84 <dhcp_option>
800ca82: 4603 mov r3, r0
800ca84: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
800ca86: 89b8 ldrh r0, [r7, #12]
800ca88: 693b ldr r3, [r7, #16]
800ca8a: f103 01f0 add.w r1, r3, #240 ; 0xf0
800ca8e: 687b ldr r3, [r7, #4]
800ca90: 8d1b ldrh r3, [r3, #40] ; 0x28
800ca92: 461a mov r2, r3
800ca94: f000 fad0 bl 800d038 <dhcp_option_short>
800ca98: 4603 mov r3, r0
800ca9a: 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));
800ca9c: 89b8 ldrh r0, [r7, #12]
800ca9e: 693b ldr r3, [r7, #16]
800caa0: f103 01f0 add.w r1, r3, #240 ; 0xf0
800caa4: 2303 movs r3, #3
800caa6: 2237 movs r2, #55 ; 0x37
800caa8: f000 fa6c bl 800cf84 <dhcp_option>
800caac: 4603 mov r3, r0
800caae: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800cab0: 2300 movs r3, #0
800cab2: 77bb strb r3, [r7, #30]
800cab4: e00e b.n 800cad4 <dhcp_renew+0x94>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
800cab6: 89b8 ldrh r0, [r7, #12]
800cab8: 693b ldr r3, [r7, #16]
800caba: f103 01f0 add.w r1, r3, #240 ; 0xf0
800cabe: 7fbb ldrb r3, [r7, #30]
800cac0: 4a2a ldr r2, [pc, #168] ; (800cb6c <dhcp_renew+0x12c>)
800cac2: 5cd3 ldrb r3, [r2, r3]
800cac4: 461a mov r2, r3
800cac6: f000 fa91 bl 800cfec <dhcp_option_byte>
800caca: 4603 mov r3, r0
800cacc: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800cace: 7fbb ldrb r3, [r7, #30]
800cad0: 3301 adds r3, #1
800cad2: 77bb strb r3, [r7, #30]
800cad4: 7fbb ldrb r3, [r7, #30]
800cad6: 2b02 cmp r3, #2
800cad8: d9ed bls.n 800cab6 <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);
800cada: 89b8 ldrh r0, [r7, #12]
800cadc: 693b ldr r3, [r7, #16]
800cade: 33f0 adds r3, #240 ; 0xf0
800cae0: 697a ldr r2, [r7, #20]
800cae2: 4619 mov r1, r3
800cae4: f000 ff96 bl 800da14 <dhcp_option_trailer>
result = udp_sendto_if(dhcp_pcb, p_out, &dhcp->server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif);
800cae8: 4b21 ldr r3, [pc, #132] ; (800cb70 <dhcp_renew+0x130>)
800caea: 6818 ldr r0, [r3, #0]
800caec: 69bb ldr r3, [r7, #24]
800caee: f103 0218 add.w r2, r3, #24
800caf2: 687b ldr r3, [r7, #4]
800caf4: 9300 str r3, [sp, #0]
800caf6: 2343 movs r3, #67 ; 0x43
800caf8: 6979 ldr r1, [r7, #20]
800cafa: f7fe fe53 bl 800b7a4 <udp_sendto_if>
800cafe: 4603 mov r3, r0
800cb00: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
800cb02: 6978 ldr r0, [r7, #20]
800cb04: f7f8 ff48 bl 8005998 <pbuf_free>
800cb08: e001 b.n 800cb0e <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;
800cb0a: 23ff movs r3, #255 ; 0xff
800cb0c: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
800cb0e: 69bb ldr r3, [r7, #24]
800cb10: 799b ldrb r3, [r3, #6]
800cb12: 2bff cmp r3, #255 ; 0xff
800cb14: d005 beq.n 800cb22 <dhcp_renew+0xe2>
dhcp->tries++;
800cb16: 69bb ldr r3, [r7, #24]
800cb18: 799b ldrb r3, [r3, #6]
800cb1a: 3301 adds r3, #1
800cb1c: b2da uxtb r2, r3
800cb1e: 69bb ldr r3, [r7, #24]
800cb20: 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);
800cb22: 69bb ldr r3, [r7, #24]
800cb24: 799b ldrb r3, [r3, #6]
800cb26: 2b09 cmp r3, #9
800cb28: d80a bhi.n 800cb40 <dhcp_renew+0x100>
800cb2a: 69bb ldr r3, [r7, #24]
800cb2c: 799b ldrb r3, [r3, #6]
800cb2e: b29b uxth r3, r3
800cb30: 461a mov r2, r3
800cb32: 0152 lsls r2, r2, #5
800cb34: 1ad2 subs r2, r2, r3
800cb36: 0092 lsls r2, r2, #2
800cb38: 4413 add r3, r2
800cb3a: 011b lsls r3, r3, #4
800cb3c: b29b uxth r3, r3
800cb3e: e001 b.n 800cb44 <dhcp_renew+0x104>
800cb40: f644 6320 movw r3, #20000 ; 0x4e20
800cb44: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
800cb46: 89fb ldrh r3, [r7, #14]
800cb48: f203 13f3 addw r3, r3, #499 ; 0x1f3
800cb4c: 4a09 ldr r2, [pc, #36] ; (800cb74 <dhcp_renew+0x134>)
800cb4e: fb82 1203 smull r1, r2, r2, r3
800cb52: 1152 asrs r2, r2, #5
800cb54: 17db asrs r3, r3, #31
800cb56: 1ad3 subs r3, r2, r3
800cb58: b29a uxth r2, r3
800cb5a: 69bb ldr r3, [r7, #24]
800cb5c: 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;
800cb5e: f997 301f ldrsb.w r3, [r7, #31]
}
800cb62: 4618 mov r0, r3
800cb64: 3720 adds r7, #32
800cb66: 46bd mov sp, r7
800cb68: bd80 pop {r7, pc}
800cb6a: bf00 nop
800cb6c: 2000002c .word 0x2000002c
800cb70: 20008c88 .word 0x20008c88
800cb74: 10624dd3 .word 0x10624dd3
0800cb78 <dhcp_rebind>:
*
* @param netif network interface which must rebind with a DHCP server
*/
static err_t
dhcp_rebind(struct netif *netif)
{
800cb78: b580 push {r7, lr}
800cb7a: b08a sub sp, #40 ; 0x28
800cb7c: af02 add r7, sp, #8
800cb7e: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800cb80: 687b ldr r3, [r7, #4]
800cb82: 6a5b ldr r3, [r3, #36] ; 0x24
800cb84: 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);
800cb86: 2104 movs r1, #4
800cb88: 69b8 ldr r0, [r7, #24]
800cb8a: f000 f9e1 bl 800cf50 <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
800cb8e: f107 030c add.w r3, r7, #12
800cb92: 2203 movs r2, #3
800cb94: 69b9 ldr r1, [r7, #24]
800cb96: 6878 ldr r0, [r7, #4]
800cb98: f000 fe66 bl 800d868 <dhcp_create_msg>
800cb9c: 6178 str r0, [r7, #20]
if (p_out != NULL) {
800cb9e: 697b ldr r3, [r7, #20]
800cba0: 2b00 cmp r3, #0
800cba2: d04c beq.n 800cc3e <dhcp_rebind+0xc6>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
800cba4: 697b ldr r3, [r7, #20]
800cba6: 685b ldr r3, [r3, #4]
800cba8: 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);
800cbaa: 89b8 ldrh r0, [r7, #12]
800cbac: 693b ldr r3, [r7, #16]
800cbae: f103 01f0 add.w r1, r3, #240 ; 0xf0
800cbb2: 2302 movs r3, #2
800cbb4: 2239 movs r2, #57 ; 0x39
800cbb6: f000 f9e5 bl 800cf84 <dhcp_option>
800cbba: 4603 mov r3, r0
800cbbc: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
800cbbe: 89b8 ldrh r0, [r7, #12]
800cbc0: 693b ldr r3, [r7, #16]
800cbc2: f103 01f0 add.w r1, r3, #240 ; 0xf0
800cbc6: 687b ldr r3, [r7, #4]
800cbc8: 8d1b ldrh r3, [r3, #40] ; 0x28
800cbca: 461a mov r2, r3
800cbcc: f000 fa34 bl 800d038 <dhcp_option_short>
800cbd0: 4603 mov r3, r0
800cbd2: 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));
800cbd4: 89b8 ldrh r0, [r7, #12]
800cbd6: 693b ldr r3, [r7, #16]
800cbd8: f103 01f0 add.w r1, r3, #240 ; 0xf0
800cbdc: 2303 movs r3, #3
800cbde: 2237 movs r2, #55 ; 0x37
800cbe0: f000 f9d0 bl 800cf84 <dhcp_option>
800cbe4: 4603 mov r3, r0
800cbe6: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800cbe8: 2300 movs r3, #0
800cbea: 77bb strb r3, [r7, #30]
800cbec: e00e b.n 800cc0c <dhcp_rebind+0x94>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
800cbee: 89b8 ldrh r0, [r7, #12]
800cbf0: 693b ldr r3, [r7, #16]
800cbf2: f103 01f0 add.w r1, r3, #240 ; 0xf0
800cbf6: 7fbb ldrb r3, [r7, #30]
800cbf8: 4a29 ldr r2, [pc, #164] ; (800cca0 <dhcp_rebind+0x128>)
800cbfa: 5cd3 ldrb r3, [r2, r3]
800cbfc: 461a mov r2, r3
800cbfe: f000 f9f5 bl 800cfec <dhcp_option_byte>
800cc02: 4603 mov r3, r0
800cc04: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800cc06: 7fbb ldrb r3, [r7, #30]
800cc08: 3301 adds r3, #1
800cc0a: 77bb strb r3, [r7, #30]
800cc0c: 7fbb ldrb r3, [r7, #30]
800cc0e: 2b02 cmp r3, #2
800cc10: d9ed bls.n 800cbee <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);
800cc12: 89b8 ldrh r0, [r7, #12]
800cc14: 693b ldr r3, [r7, #16]
800cc16: 33f0 adds r3, #240 ; 0xf0
800cc18: 697a ldr r2, [r7, #20]
800cc1a: 4619 mov r1, r3
800cc1c: f000 fefa bl 800da14 <dhcp_option_trailer>
/* broadcast to server */
result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif);
800cc20: 4b20 ldr r3, [pc, #128] ; (800cca4 <dhcp_rebind+0x12c>)
800cc22: 6818 ldr r0, [r3, #0]
800cc24: 687b ldr r3, [r7, #4]
800cc26: 9300 str r3, [sp, #0]
800cc28: 2343 movs r3, #67 ; 0x43
800cc2a: 4a1f ldr r2, [pc, #124] ; (800cca8 <dhcp_rebind+0x130>)
800cc2c: 6979 ldr r1, [r7, #20]
800cc2e: f7fe fdb9 bl 800b7a4 <udp_sendto_if>
800cc32: 4603 mov r3, r0
800cc34: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
800cc36: 6978 ldr r0, [r7, #20]
800cc38: f7f8 feae bl 8005998 <pbuf_free>
800cc3c: e001 b.n 800cc42 <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;
800cc3e: 23ff movs r3, #255 ; 0xff
800cc40: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
800cc42: 69bb ldr r3, [r7, #24]
800cc44: 799b ldrb r3, [r3, #6]
800cc46: 2bff cmp r3, #255 ; 0xff
800cc48: d005 beq.n 800cc56 <dhcp_rebind+0xde>
dhcp->tries++;
800cc4a: 69bb ldr r3, [r7, #24]
800cc4c: 799b ldrb r3, [r3, #6]
800cc4e: 3301 adds r3, #1
800cc50: b2da uxtb r2, r3
800cc52: 69bb ldr r3, [r7, #24]
800cc54: 719a strb r2, [r3, #6]
}
msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
800cc56: 69bb ldr r3, [r7, #24]
800cc58: 799b ldrb r3, [r3, #6]
800cc5a: 2b09 cmp r3, #9
800cc5c: d80a bhi.n 800cc74 <dhcp_rebind+0xfc>
800cc5e: 69bb ldr r3, [r7, #24]
800cc60: 799b ldrb r3, [r3, #6]
800cc62: b29b uxth r3, r3
800cc64: 461a mov r2, r3
800cc66: 0152 lsls r2, r2, #5
800cc68: 1ad2 subs r2, r2, r3
800cc6a: 0092 lsls r2, r2, #2
800cc6c: 4413 add r3, r2
800cc6e: 00db lsls r3, r3, #3
800cc70: b29b uxth r3, r3
800cc72: e001 b.n 800cc78 <dhcp_rebind+0x100>
800cc74: f242 7310 movw r3, #10000 ; 0x2710
800cc78: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
800cc7a: 89fb ldrh r3, [r7, #14]
800cc7c: f203 13f3 addw r3, r3, #499 ; 0x1f3
800cc80: 4a0a ldr r2, [pc, #40] ; (800ccac <dhcp_rebind+0x134>)
800cc82: fb82 1203 smull r1, r2, r2, r3
800cc86: 1152 asrs r2, r2, #5
800cc88: 17db asrs r3, r3, #31
800cc8a: 1ad3 subs r3, r2, r3
800cc8c: b29a uxth r2, r3
800cc8e: 69bb ldr r3, [r7, #24]
800cc90: 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;
800cc92: f997 301f ldrsb.w r3, [r7, #31]
}
800cc96: 4618 mov r0, r3
800cc98: 3720 adds r7, #32
800cc9a: 46bd mov sp, r7
800cc9c: bd80 pop {r7, pc}
800cc9e: bf00 nop
800cca0: 2000002c .word 0x2000002c
800cca4: 20008c88 .word 0x20008c88
800cca8: 08017de0 .word 0x08017de0
800ccac: 10624dd3 .word 0x10624dd3
0800ccb0 <dhcp_reboot>:
*
* @param netif network interface which must reboot
*/
static err_t
dhcp_reboot(struct netif *netif)
{
800ccb0: b5b0 push {r4, r5, r7, lr}
800ccb2: b08a sub sp, #40 ; 0x28
800ccb4: af02 add r7, sp, #8
800ccb6: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800ccb8: 687b ldr r3, [r7, #4]
800ccba: 6a5b ldr r3, [r3, #36] ; 0x24
800ccbc: 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);
800ccbe: 2103 movs r1, #3
800ccc0: 69b8 ldr r0, [r7, #24]
800ccc2: f000 f945 bl 800cf50 <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
800ccc6: f107 030c add.w r3, r7, #12
800ccca: 2203 movs r2, #3
800cccc: 69b9 ldr r1, [r7, #24]
800ccce: 6878 ldr r0, [r7, #4]
800ccd0: f000 fdca bl 800d868 <dhcp_create_msg>
800ccd4: 6178 str r0, [r7, #20]
if (p_out != NULL) {
800ccd6: 697b ldr r3, [r7, #20]
800ccd8: 2b00 cmp r3, #0
800ccda: d066 beq.n 800cdaa <dhcp_reboot+0xfa>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
800ccdc: 697b ldr r3, [r7, #20]
800ccde: 685b ldr r3, [r3, #4]
800cce0: 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);
800cce2: 89b8 ldrh r0, [r7, #12]
800cce4: 693b ldr r3, [r7, #16]
800cce6: f103 01f0 add.w r1, r3, #240 ; 0xf0
800ccea: 2302 movs r3, #2
800ccec: 2239 movs r2, #57 ; 0x39
800ccee: f000 f949 bl 800cf84 <dhcp_option>
800ccf2: 4603 mov r3, r0
800ccf4: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN_MIN_REQUIRED);
800ccf6: 89b8 ldrh r0, [r7, #12]
800ccf8: 693b ldr r3, [r7, #16]
800ccfa: 33f0 adds r3, #240 ; 0xf0
800ccfc: f44f 7210 mov.w r2, #576 ; 0x240
800cd00: 4619 mov r1, r3
800cd02: f000 f999 bl 800d038 <dhcp_option_short>
800cd06: 4603 mov r3, r0
800cd08: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
800cd0a: 89b8 ldrh r0, [r7, #12]
800cd0c: 693b ldr r3, [r7, #16]
800cd0e: f103 01f0 add.w r1, r3, #240 ; 0xf0
800cd12: 2304 movs r3, #4
800cd14: 2232 movs r2, #50 ; 0x32
800cd16: f000 f935 bl 800cf84 <dhcp_option>
800cd1a: 4603 mov r3, r0
800cd1c: 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)));
800cd1e: 89bc ldrh r4, [r7, #12]
800cd20: 693b ldr r3, [r7, #16]
800cd22: f103 05f0 add.w r5, r3, #240 ; 0xf0
800cd26: 69bb ldr r3, [r7, #24]
800cd28: 69db ldr r3, [r3, #28]
800cd2a: 4618 mov r0, r3
800cd2c: f7f7 fadf bl 80042ee <lwip_htonl>
800cd30: 4603 mov r3, r0
800cd32: 461a mov r2, r3
800cd34: 4629 mov r1, r5
800cd36: 4620 mov r0, r4
800cd38: f000 f9b0 bl 800d09c <dhcp_option_long>
800cd3c: 4603 mov r3, r0
800cd3e: 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));
800cd40: 89b8 ldrh r0, [r7, #12]
800cd42: 693b ldr r3, [r7, #16]
800cd44: f103 01f0 add.w r1, r3, #240 ; 0xf0
800cd48: 2303 movs r3, #3
800cd4a: 2237 movs r2, #55 ; 0x37
800cd4c: f000 f91a bl 800cf84 <dhcp_option>
800cd50: 4603 mov r3, r0
800cd52: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800cd54: 2300 movs r3, #0
800cd56: 77bb strb r3, [r7, #30]
800cd58: e00e b.n 800cd78 <dhcp_reboot+0xc8>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
800cd5a: 89b8 ldrh r0, [r7, #12]
800cd5c: 693b ldr r3, [r7, #16]
800cd5e: f103 01f0 add.w r1, r3, #240 ; 0xf0
800cd62: 7fbb ldrb r3, [r7, #30]
800cd64: 4a29 ldr r2, [pc, #164] ; (800ce0c <dhcp_reboot+0x15c>)
800cd66: 5cd3 ldrb r3, [r2, r3]
800cd68: 461a mov r2, r3
800cd6a: f000 f93f bl 800cfec <dhcp_option_byte>
800cd6e: 4603 mov r3, r0
800cd70: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800cd72: 7fbb ldrb r3, [r7, #30]
800cd74: 3301 adds r3, #1
800cd76: 77bb strb r3, [r7, #30]
800cd78: 7fbb ldrb r3, [r7, #30]
800cd7a: 2b02 cmp r3, #2
800cd7c: d9ed bls.n 800cd5a <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);
800cd7e: 89b8 ldrh r0, [r7, #12]
800cd80: 693b ldr r3, [r7, #16]
800cd82: 33f0 adds r3, #240 ; 0xf0
800cd84: 697a ldr r2, [r7, #20]
800cd86: 4619 mov r1, r3
800cd88: f000 fe44 bl 800da14 <dhcp_option_trailer>
/* broadcast to server */
result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif);
800cd8c: 4b20 ldr r3, [pc, #128] ; (800ce10 <dhcp_reboot+0x160>)
800cd8e: 6818 ldr r0, [r3, #0]
800cd90: 687b ldr r3, [r7, #4]
800cd92: 9300 str r3, [sp, #0]
800cd94: 2343 movs r3, #67 ; 0x43
800cd96: 4a1f ldr r2, [pc, #124] ; (800ce14 <dhcp_reboot+0x164>)
800cd98: 6979 ldr r1, [r7, #20]
800cd9a: f7fe fd03 bl 800b7a4 <udp_sendto_if>
800cd9e: 4603 mov r3, r0
800cda0: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
800cda2: 6978 ldr r0, [r7, #20]
800cda4: f7f8 fdf8 bl 8005998 <pbuf_free>
800cda8: e001 b.n 800cdae <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;
800cdaa: 23ff movs r3, #255 ; 0xff
800cdac: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
800cdae: 69bb ldr r3, [r7, #24]
800cdb0: 799b ldrb r3, [r3, #6]
800cdb2: 2bff cmp r3, #255 ; 0xff
800cdb4: d005 beq.n 800cdc2 <dhcp_reboot+0x112>
dhcp->tries++;
800cdb6: 69bb ldr r3, [r7, #24]
800cdb8: 799b ldrb r3, [r3, #6]
800cdba: 3301 adds r3, #1
800cdbc: b2da uxtb r2, r3
800cdbe: 69bb ldr r3, [r7, #24]
800cdc0: 719a strb r2, [r3, #6]
}
msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
800cdc2: 69bb ldr r3, [r7, #24]
800cdc4: 799b ldrb r3, [r3, #6]
800cdc6: 2b09 cmp r3, #9
800cdc8: d80a bhi.n 800cde0 <dhcp_reboot+0x130>
800cdca: 69bb ldr r3, [r7, #24]
800cdcc: 799b ldrb r3, [r3, #6]
800cdce: b29b uxth r3, r3
800cdd0: 461a mov r2, r3
800cdd2: 0152 lsls r2, r2, #5
800cdd4: 1ad2 subs r2, r2, r3
800cdd6: 0092 lsls r2, r2, #2
800cdd8: 4413 add r3, r2
800cdda: 00db lsls r3, r3, #3
800cddc: b29b uxth r3, r3
800cdde: e001 b.n 800cde4 <dhcp_reboot+0x134>
800cde0: f242 7310 movw r3, #10000 ; 0x2710
800cde4: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
800cde6: 89fb ldrh r3, [r7, #14]
800cde8: f203 13f3 addw r3, r3, #499 ; 0x1f3
800cdec: 4a0a ldr r2, [pc, #40] ; (800ce18 <dhcp_reboot+0x168>)
800cdee: fb82 1203 smull r1, r2, r2, r3
800cdf2: 1152 asrs r2, r2, #5
800cdf4: 17db asrs r3, r3, #31
800cdf6: 1ad3 subs r3, r2, r3
800cdf8: b29a uxth r2, r3
800cdfa: 69bb ldr r3, [r7, #24]
800cdfc: 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;
800cdfe: f997 301f ldrsb.w r3, [r7, #31]
}
800ce02: 4618 mov r0, r3
800ce04: 3720 adds r7, #32
800ce06: 46bd mov sp, r7
800ce08: bdb0 pop {r4, r5, r7, pc}
800ce0a: bf00 nop
800ce0c: 2000002c .word 0x2000002c
800ce10: 20008c88 .word 0x20008c88
800ce14: 08017de0 .word 0x08017de0
800ce18: 10624dd3 .word 0x10624dd3
0800ce1c <dhcp_release_and_stop>:
*
* @param netif network interface
*/
void
dhcp_release_and_stop(struct netif *netif)
{
800ce1c: b5b0 push {r4, r5, r7, lr}
800ce1e: b08a sub sp, #40 ; 0x28
800ce20: af02 add r7, sp, #8
800ce22: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800ce24: 687b ldr r3, [r7, #4]
800ce26: 6a5b ldr r3, [r3, #36] ; 0x24
800ce28: 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) {
800ce2a: 69fb ldr r3, [r7, #28]
800ce2c: 2b00 cmp r3, #0
800ce2e: f000 8084 beq.w 800cf3a <dhcp_release_and_stop+0x11e>
return;
}
/* already off? -> nothing to do */
if (dhcp->state == DHCP_STATE_OFF) {
800ce32: 69fb ldr r3, [r7, #28]
800ce34: 795b ldrb r3, [r3, #5]
800ce36: 2b00 cmp r3, #0
800ce38: f000 8081 beq.w 800cf3e <dhcp_release_and_stop+0x122>
return;
}
ip_addr_copy(server_ip_addr, dhcp->server_ip_addr);
800ce3c: 69fb ldr r3, [r7, #28]
800ce3e: 699b ldr r3, [r3, #24]
800ce40: 613b str r3, [r7, #16]
/* clean old DHCP offer */
ip_addr_set_zero_ip4(&dhcp->server_ip_addr);
800ce42: 69fb ldr r3, [r7, #28]
800ce44: 2200 movs r2, #0
800ce46: 619a str r2, [r3, #24]
ip4_addr_set_zero(&dhcp->offered_ip_addr);
800ce48: 69fb ldr r3, [r7, #28]
800ce4a: 2200 movs r2, #0
800ce4c: 61da str r2, [r3, #28]
ip4_addr_set_zero(&dhcp->offered_sn_mask);
800ce4e: 69fb ldr r3, [r7, #28]
800ce50: 2200 movs r2, #0
800ce52: 621a str r2, [r3, #32]
ip4_addr_set_zero(&dhcp->offered_gw_addr);
800ce54: 69fb ldr r3, [r7, #28]
800ce56: 2200 movs r2, #0
800ce58: 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;
800ce5a: 69fb ldr r3, [r7, #28]
800ce5c: 2200 movs r2, #0
800ce5e: 631a str r2, [r3, #48] ; 0x30
800ce60: 69fb ldr r3, [r7, #28]
800ce62: 6b1a ldr r2, [r3, #48] ; 0x30
800ce64: 69fb ldr r3, [r7, #28]
800ce66: 62da str r2, [r3, #44] ; 0x2c
800ce68: 69fb ldr r3, [r7, #28]
800ce6a: 6ada ldr r2, [r3, #44] ; 0x2c
800ce6c: 69fb ldr r3, [r7, #28]
800ce6e: 629a str r2, [r3, #40] ; 0x28
dhcp->t1_renew_time = dhcp->t2_rebind_time = dhcp->lease_used = dhcp->t0_timeout = 0;
800ce70: 69fb ldr r3, [r7, #28]
800ce72: 2200 movs r2, #0
800ce74: 829a strh r2, [r3, #20]
800ce76: 69fb ldr r3, [r7, #28]
800ce78: 8a9a ldrh r2, [r3, #20]
800ce7a: 69fb ldr r3, [r7, #28]
800ce7c: 825a strh r2, [r3, #18]
800ce7e: 69fb ldr r3, [r7, #28]
800ce80: 8a5a ldrh r2, [r3, #18]
800ce82: 69fb ldr r3, [r7, #28]
800ce84: 821a strh r2, [r3, #16]
800ce86: 69fb ldr r3, [r7, #28]
800ce88: 8a1a ldrh r2, [r3, #16]
800ce8a: 69fb ldr r3, [r7, #28]
800ce8c: 81da strh r2, [r3, #14]
/* send release message when current IP was assigned via DHCP */
if (dhcp_supplied_address(netif)) {
800ce8e: 6878 ldr r0, [r7, #4]
800ce90: f000 fdee bl 800da70 <dhcp_supplied_address>
800ce94: 4603 mov r3, r0
800ce96: 2b00 cmp r3, #0
800ce98: d03b beq.n 800cf12 <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);
800ce9a: f107 030e add.w r3, r7, #14
800ce9e: 2207 movs r2, #7
800cea0: 69f9 ldr r1, [r7, #28]
800cea2: 6878 ldr r0, [r7, #4]
800cea4: f000 fce0 bl 800d868 <dhcp_create_msg>
800cea8: 61b8 str r0, [r7, #24]
if (p_out != NULL) {
800ceaa: 69bb ldr r3, [r7, #24]
800ceac: 2b00 cmp r3, #0
800ceae: d030 beq.n 800cf12 <dhcp_release_and_stop+0xf6>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
800ceb0: 69bb ldr r3, [r7, #24]
800ceb2: 685b ldr r3, [r3, #4]
800ceb4: 617b str r3, [r7, #20]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4);
800ceb6: 89f8 ldrh r0, [r7, #14]
800ceb8: 697b ldr r3, [r7, #20]
800ceba: f103 01f0 add.w r1, r3, #240 ; 0xf0
800cebe: 2304 movs r3, #4
800cec0: 2236 movs r2, #54 ; 0x36
800cec2: f000 f85f bl 800cf84 <dhcp_option>
800cec6: 4603 mov r3, r0
800cec8: 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))));
800ceca: 89fc ldrh r4, [r7, #14]
800cecc: 697b ldr r3, [r7, #20]
800cece: f103 05f0 add.w r5, r3, #240 ; 0xf0
800ced2: 693b ldr r3, [r7, #16]
800ced4: 4618 mov r0, r3
800ced6: f7f7 fa0a bl 80042ee <lwip_htonl>
800ceda: 4603 mov r3, r0
800cedc: 461a mov r2, r3
800cede: 4629 mov r1, r5
800cee0: 4620 mov r0, r4
800cee2: f000 f8db bl 800d09c <dhcp_option_long>
800cee6: 4603 mov r3, r0
800cee8: 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);
800ceea: 89f8 ldrh r0, [r7, #14]
800ceec: 697b ldr r3, [r7, #20]
800ceee: 33f0 adds r3, #240 ; 0xf0
800cef0: 69ba ldr r2, [r7, #24]
800cef2: 4619 mov r1, r3
800cef4: f000 fd8e bl 800da14 <dhcp_option_trailer>
udp_sendto_if(dhcp_pcb, p_out, &server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif);
800cef8: 4b13 ldr r3, [pc, #76] ; (800cf48 <dhcp_release_and_stop+0x12c>)
800cefa: 6818 ldr r0, [r3, #0]
800cefc: f107 0210 add.w r2, r7, #16
800cf00: 687b ldr r3, [r7, #4]
800cf02: 9300 str r3, [sp, #0]
800cf04: 2343 movs r3, #67 ; 0x43
800cf06: 69b9 ldr r1, [r7, #24]
800cf08: f7fe fc4c bl 800b7a4 <udp_sendto_if>
pbuf_free(p_out);
800cf0c: 69b8 ldr r0, [r7, #24]
800cf0e: f7f8 fd43 bl 8005998 <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);
800cf12: 4b0e ldr r3, [pc, #56] ; (800cf4c <dhcp_release_and_stop+0x130>)
800cf14: 4a0d ldr r2, [pc, #52] ; (800cf4c <dhcp_release_and_stop+0x130>)
800cf16: 490d ldr r1, [pc, #52] ; (800cf4c <dhcp_release_and_stop+0x130>)
800cf18: 6878 ldr r0, [r7, #4]
800cf1a: f7f8 f85d bl 8004fd8 <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);
800cf1e: 2100 movs r1, #0
800cf20: 69f8 ldr r0, [r7, #28]
800cf22: f000 f815 bl 800cf50 <dhcp_set_state>
if (dhcp->pcb_allocated != 0) {
800cf26: 69fb ldr r3, [r7, #28]
800cf28: 791b ldrb r3, [r3, #4]
800cf2a: 2b00 cmp r3, #0
800cf2c: d008 beq.n 800cf40 <dhcp_release_and_stop+0x124>
dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */
800cf2e: f7fe ff85 bl 800be3c <dhcp_dec_pcb_refcount>
dhcp->pcb_allocated = 0;
800cf32: 69fb ldr r3, [r7, #28]
800cf34: 2200 movs r2, #0
800cf36: 711a strb r2, [r3, #4]
800cf38: e002 b.n 800cf40 <dhcp_release_and_stop+0x124>
return;
800cf3a: bf00 nop
800cf3c: e000 b.n 800cf40 <dhcp_release_and_stop+0x124>
return;
800cf3e: bf00 nop
}
}
800cf40: 3720 adds r7, #32
800cf42: 46bd mov sp, r7
800cf44: bdb0 pop {r4, r5, r7, pc}
800cf46: bf00 nop
800cf48: 20008c88 .word 0x20008c88
800cf4c: 08017ddc .word 0x08017ddc
0800cf50 <dhcp_set_state>:
*
* If the state changed, reset the number of tries.
*/
static void
dhcp_set_state(struct dhcp *dhcp, u8_t new_state)
{
800cf50: b480 push {r7}
800cf52: b083 sub sp, #12
800cf54: af00 add r7, sp, #0
800cf56: 6078 str r0, [r7, #4]
800cf58: 460b mov r3, r1
800cf5a: 70fb strb r3, [r7, #3]
if (new_state != dhcp->state) {
800cf5c: 687b ldr r3, [r7, #4]
800cf5e: 795b ldrb r3, [r3, #5]
800cf60: 78fa ldrb r2, [r7, #3]
800cf62: 429a cmp r2, r3
800cf64: d008 beq.n 800cf78 <dhcp_set_state+0x28>
dhcp->state = new_state;
800cf66: 687b ldr r3, [r7, #4]
800cf68: 78fa ldrb r2, [r7, #3]
800cf6a: 715a strb r2, [r3, #5]
dhcp->tries = 0;
800cf6c: 687b ldr r3, [r7, #4]
800cf6e: 2200 movs r2, #0
800cf70: 719a strb r2, [r3, #6]
dhcp->request_timeout = 0;
800cf72: 687b ldr r3, [r7, #4]
800cf74: 2200 movs r2, #0
800cf76: 811a strh r2, [r3, #8]
}
}
800cf78: bf00 nop
800cf7a: 370c adds r7, #12
800cf7c: 46bd mov sp, r7
800cf7e: f85d 7b04 ldr.w r7, [sp], #4
800cf82: 4770 bx lr
0800cf84 <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)
{
800cf84: b580 push {r7, lr}
800cf86: b082 sub sp, #8
800cf88: af00 add r7, sp, #0
800cf8a: 6039 str r1, [r7, #0]
800cf8c: 4611 mov r1, r2
800cf8e: 461a mov r2, r3
800cf90: 4603 mov r3, r0
800cf92: 80fb strh r3, [r7, #6]
800cf94: 460b mov r3, r1
800cf96: 717b strb r3, [r7, #5]
800cf98: 4613 mov r3, r2
800cf9a: 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);
800cf9c: 88fa ldrh r2, [r7, #6]
800cf9e: 793b ldrb r3, [r7, #4]
800cfa0: 4413 add r3, r2
800cfa2: 3302 adds r3, #2
800cfa4: 2b44 cmp r3, #68 ; 0x44
800cfa6: d906 bls.n 800cfb6 <dhcp_option+0x32>
800cfa8: 4b0d ldr r3, [pc, #52] ; (800cfe0 <dhcp_option+0x5c>)
800cfaa: f240 529a movw r2, #1434 ; 0x59a
800cfae: 490d ldr r1, [pc, #52] ; (800cfe4 <dhcp_option+0x60>)
800cfb0: 480d ldr r0, [pc, #52] ; (800cfe8 <dhcp_option+0x64>)
800cfb2: f003 fa0d bl 80103d0 <printf>
options[options_out_len++] = option_type;
800cfb6: 88fb ldrh r3, [r7, #6]
800cfb8: 1c5a adds r2, r3, #1
800cfba: 80fa strh r2, [r7, #6]
800cfbc: 461a mov r2, r3
800cfbe: 683b ldr r3, [r7, #0]
800cfc0: 4413 add r3, r2
800cfc2: 797a ldrb r2, [r7, #5]
800cfc4: 701a strb r2, [r3, #0]
options[options_out_len++] = option_len;
800cfc6: 88fb ldrh r3, [r7, #6]
800cfc8: 1c5a adds r2, r3, #1
800cfca: 80fa strh r2, [r7, #6]
800cfcc: 461a mov r2, r3
800cfce: 683b ldr r3, [r7, #0]
800cfd0: 4413 add r3, r2
800cfd2: 793a ldrb r2, [r7, #4]
800cfd4: 701a strb r2, [r3, #0]
return options_out_len;
800cfd6: 88fb ldrh r3, [r7, #6]
}
800cfd8: 4618 mov r0, r3
800cfda: 3708 adds r7, #8
800cfdc: 46bd mov sp, r7
800cfde: bd80 pop {r7, pc}
800cfe0: 0801720c .word 0x0801720c
800cfe4: 080173a0 .word 0x080173a0
800cfe8: 0801726c .word 0x0801726c
0800cfec <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)
{
800cfec: b580 push {r7, lr}
800cfee: b082 sub sp, #8
800cff0: af00 add r7, sp, #0
800cff2: 4603 mov r3, r0
800cff4: 6039 str r1, [r7, #0]
800cff6: 80fb strh r3, [r7, #6]
800cff8: 4613 mov r3, r2
800cffa: 717b strb r3, [r7, #5]
LWIP_ASSERT("dhcp_option_byte: options_out_len < DHCP_OPTIONS_LEN", options_out_len < DHCP_OPTIONS_LEN);
800cffc: 88fb ldrh r3, [r7, #6]
800cffe: 2b43 cmp r3, #67 ; 0x43
800d000: d906 bls.n 800d010 <dhcp_option_byte+0x24>
800d002: 4b0a ldr r3, [pc, #40] ; (800d02c <dhcp_option_byte+0x40>)
800d004: f240 52a6 movw r2, #1446 ; 0x5a6
800d008: 4909 ldr r1, [pc, #36] ; (800d030 <dhcp_option_byte+0x44>)
800d00a: 480a ldr r0, [pc, #40] ; (800d034 <dhcp_option_byte+0x48>)
800d00c: f003 f9e0 bl 80103d0 <printf>
options[options_out_len++] = value;
800d010: 88fb ldrh r3, [r7, #6]
800d012: 1c5a adds r2, r3, #1
800d014: 80fa strh r2, [r7, #6]
800d016: 461a mov r2, r3
800d018: 683b ldr r3, [r7, #0]
800d01a: 4413 add r3, r2
800d01c: 797a ldrb r2, [r7, #5]
800d01e: 701a strb r2, [r3, #0]
return options_out_len;
800d020: 88fb ldrh r3, [r7, #6]
}
800d022: 4618 mov r0, r3
800d024: 3708 adds r7, #8
800d026: 46bd mov sp, r7
800d028: bd80 pop {r7, pc}
800d02a: bf00 nop
800d02c: 0801720c .word 0x0801720c
800d030: 080173e4 .word 0x080173e4
800d034: 0801726c .word 0x0801726c
0800d038 <dhcp_option_short>:
static u16_t
dhcp_option_short(u16_t options_out_len, u8_t *options, u16_t value)
{
800d038: b580 push {r7, lr}
800d03a: b082 sub sp, #8
800d03c: af00 add r7, sp, #0
800d03e: 4603 mov r3, r0
800d040: 6039 str r1, [r7, #0]
800d042: 80fb strh r3, [r7, #6]
800d044: 4613 mov r3, r2
800d046: 80bb strh r3, [r7, #4]
LWIP_ASSERT("dhcp_option_short: options_out_len + 2 <= DHCP_OPTIONS_LEN", options_out_len + 2U <= DHCP_OPTIONS_LEN);
800d048: 88fb ldrh r3, [r7, #6]
800d04a: 3302 adds r3, #2
800d04c: 2b44 cmp r3, #68 ; 0x44
800d04e: d906 bls.n 800d05e <dhcp_option_short+0x26>
800d050: 4b0f ldr r3, [pc, #60] ; (800d090 <dhcp_option_short+0x58>)
800d052: f240 52ae movw r2, #1454 ; 0x5ae
800d056: 490f ldr r1, [pc, #60] ; (800d094 <dhcp_option_short+0x5c>)
800d058: 480f ldr r0, [pc, #60] ; (800d098 <dhcp_option_short+0x60>)
800d05a: f003 f9b9 bl 80103d0 <printf>
options[options_out_len++] = (u8_t)((value & 0xff00U) >> 8);
800d05e: 88bb ldrh r3, [r7, #4]
800d060: 0a1b lsrs r3, r3, #8
800d062: b29a uxth r2, r3
800d064: 88fb ldrh r3, [r7, #6]
800d066: 1c59 adds r1, r3, #1
800d068: 80f9 strh r1, [r7, #6]
800d06a: 4619 mov r1, r3
800d06c: 683b ldr r3, [r7, #0]
800d06e: 440b add r3, r1
800d070: b2d2 uxtb r2, r2
800d072: 701a strb r2, [r3, #0]
options[options_out_len++] = (u8_t) (value & 0x00ffU);
800d074: 88fb ldrh r3, [r7, #6]
800d076: 1c5a adds r2, r3, #1
800d078: 80fa strh r2, [r7, #6]
800d07a: 461a mov r2, r3
800d07c: 683b ldr r3, [r7, #0]
800d07e: 4413 add r3, r2
800d080: 88ba ldrh r2, [r7, #4]
800d082: b2d2 uxtb r2, r2
800d084: 701a strb r2, [r3, #0]
return options_out_len;
800d086: 88fb ldrh r3, [r7, #6]
}
800d088: 4618 mov r0, r3
800d08a: 3708 adds r7, #8
800d08c: 46bd mov sp, r7
800d08e: bd80 pop {r7, pc}
800d090: 0801720c .word 0x0801720c
800d094: 0801741c .word 0x0801741c
800d098: 0801726c .word 0x0801726c
0800d09c <dhcp_option_long>:
static u16_t
dhcp_option_long(u16_t options_out_len, u8_t *options, u32_t value)
{
800d09c: b580 push {r7, lr}
800d09e: b084 sub sp, #16
800d0a0: af00 add r7, sp, #0
800d0a2: 4603 mov r3, r0
800d0a4: 60b9 str r1, [r7, #8]
800d0a6: 607a str r2, [r7, #4]
800d0a8: 81fb strh r3, [r7, #14]
LWIP_ASSERT("dhcp_option_long: options_out_len + 4 <= DHCP_OPTIONS_LEN", options_out_len + 4U <= DHCP_OPTIONS_LEN);
800d0aa: 89fb ldrh r3, [r7, #14]
800d0ac: 3304 adds r3, #4
800d0ae: 2b44 cmp r3, #68 ; 0x44
800d0b0: d906 bls.n 800d0c0 <dhcp_option_long+0x24>
800d0b2: 4b19 ldr r3, [pc, #100] ; (800d118 <dhcp_option_long+0x7c>)
800d0b4: f240 52b7 movw r2, #1463 ; 0x5b7
800d0b8: 4918 ldr r1, [pc, #96] ; (800d11c <dhcp_option_long+0x80>)
800d0ba: 4819 ldr r0, [pc, #100] ; (800d120 <dhcp_option_long+0x84>)
800d0bc: f003 f988 bl 80103d0 <printf>
options[options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24);
800d0c0: 687b ldr r3, [r7, #4]
800d0c2: 0e1a lsrs r2, r3, #24
800d0c4: 89fb ldrh r3, [r7, #14]
800d0c6: 1c59 adds r1, r3, #1
800d0c8: 81f9 strh r1, [r7, #14]
800d0ca: 4619 mov r1, r3
800d0cc: 68bb ldr r3, [r7, #8]
800d0ce: 440b add r3, r1
800d0d0: b2d2 uxtb r2, r2
800d0d2: 701a strb r2, [r3, #0]
options[options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16);
800d0d4: 687b ldr r3, [r7, #4]
800d0d6: 0c1a lsrs r2, r3, #16
800d0d8: 89fb ldrh r3, [r7, #14]
800d0da: 1c59 adds r1, r3, #1
800d0dc: 81f9 strh r1, [r7, #14]
800d0de: 4619 mov r1, r3
800d0e0: 68bb ldr r3, [r7, #8]
800d0e2: 440b add r3, r1
800d0e4: b2d2 uxtb r2, r2
800d0e6: 701a strb r2, [r3, #0]
options[options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8);
800d0e8: 687b ldr r3, [r7, #4]
800d0ea: 0a1a lsrs r2, r3, #8
800d0ec: 89fb ldrh r3, [r7, #14]
800d0ee: 1c59 adds r1, r3, #1
800d0f0: 81f9 strh r1, [r7, #14]
800d0f2: 4619 mov r1, r3
800d0f4: 68bb ldr r3, [r7, #8]
800d0f6: 440b add r3, r1
800d0f8: b2d2 uxtb r2, r2
800d0fa: 701a strb r2, [r3, #0]
options[options_out_len++] = (u8_t)((value & 0x000000ffUL));
800d0fc: 89fb ldrh r3, [r7, #14]
800d0fe: 1c5a adds r2, r3, #1
800d100: 81fa strh r2, [r7, #14]
800d102: 461a mov r2, r3
800d104: 68bb ldr r3, [r7, #8]
800d106: 4413 add r3, r2
800d108: 687a ldr r2, [r7, #4]
800d10a: b2d2 uxtb r2, r2
800d10c: 701a strb r2, [r3, #0]
return options_out_len;
800d10e: 89fb ldrh r3, [r7, #14]
}
800d110: 4618 mov r0, r3
800d112: 3710 adds r7, #16
800d114: 46bd mov sp, r7
800d116: bd80 pop {r7, pc}
800d118: 0801720c .word 0x0801720c
800d11c: 08017458 .word 0x08017458
800d120: 0801726c .word 0x0801726c
0800d124 <dhcp_parse_reply>:
* use that further on.
*
*/
static err_t
dhcp_parse_reply(struct pbuf *p, struct dhcp *dhcp)
{
800d124: b580 push {r7, lr}
800d126: b090 sub sp, #64 ; 0x40
800d128: af00 add r7, sp, #0
800d12a: 6078 str r0, [r7, #4]
800d12c: 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;
800d12e: 2300 movs r3, #0
800d130: 62fb str r3, [r7, #44] ; 0x2c
int parse_sname_as_options = 0;
800d132: 2300 movs r3, #0
800d134: 62bb str r3, [r7, #40] ; 0x28
#endif
LWIP_UNUSED_ARG(dhcp);
/* clear received options */
dhcp_clear_all_options(dhcp);
800d136: 2208 movs r2, #8
800d138: 2100 movs r1, #0
800d13a: 48b5 ldr r0, [pc, #724] ; (800d410 <dhcp_parse_reply+0x2ec>)
800d13c: f003 f940 bl 80103c0 <memset>
/* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */
if (p->len < DHCP_SNAME_OFS) {
800d140: 687b ldr r3, [r7, #4]
800d142: 895b ldrh r3, [r3, #10]
800d144: 2b2b cmp r3, #43 ; 0x2b
800d146: d802 bhi.n 800d14e <dhcp_parse_reply+0x2a>
return ERR_BUF;
800d148: f06f 0301 mvn.w r3, #1
800d14c: e2a7 b.n 800d69e <dhcp_parse_reply+0x57a>
}
msg_in = (struct dhcp_msg *)p->payload;
800d14e: 687b ldr r3, [r7, #4]
800d150: 685b ldr r3, [r3, #4]
800d152: 61bb str r3, [r7, #24]
#endif /* LWIP_DHCP_BOOTP_FILE */
/* parse options */
/* start with options field */
options_idx = DHCP_OPTIONS_OFS;
800d154: 23f0 movs r3, #240 ; 0xf0
800d156: 86fb strh r3, [r7, #54] ; 0x36
/* parse options to the end of the received packet */
options_idx_max = p->tot_len;
800d158: 687b ldr r3, [r7, #4]
800d15a: 891b ldrh r3, [r3, #8]
800d15c: 86bb strh r3, [r7, #52] ; 0x34
again:
q = p;
800d15e: 687b ldr r3, [r7, #4]
800d160: 633b str r3, [r7, #48] ; 0x30
while ((q != NULL) && (options_idx >= q->len)) {
800d162: e00c b.n 800d17e <dhcp_parse_reply+0x5a>
options_idx = (u16_t)(options_idx - q->len);
800d164: 6b3b ldr r3, [r7, #48] ; 0x30
800d166: 895b ldrh r3, [r3, #10]
800d168: 8efa ldrh r2, [r7, #54] ; 0x36
800d16a: 1ad3 subs r3, r2, r3
800d16c: 86fb strh r3, [r7, #54] ; 0x36
options_idx_max = (u16_t)(options_idx_max - q->len);
800d16e: 6b3b ldr r3, [r7, #48] ; 0x30
800d170: 895b ldrh r3, [r3, #10]
800d172: 8eba ldrh r2, [r7, #52] ; 0x34
800d174: 1ad3 subs r3, r2, r3
800d176: 86bb strh r3, [r7, #52] ; 0x34
q = q->next;
800d178: 6b3b ldr r3, [r7, #48] ; 0x30
800d17a: 681b ldr r3, [r3, #0]
800d17c: 633b str r3, [r7, #48] ; 0x30
while ((q != NULL) && (options_idx >= q->len)) {
800d17e: 6b3b ldr r3, [r7, #48] ; 0x30
800d180: 2b00 cmp r3, #0
800d182: d004 beq.n 800d18e <dhcp_parse_reply+0x6a>
800d184: 6b3b ldr r3, [r7, #48] ; 0x30
800d186: 895b ldrh r3, [r3, #10]
800d188: 8efa ldrh r2, [r7, #54] ; 0x36
800d18a: 429a cmp r2, r3
800d18c: d2ea bcs.n 800d164 <dhcp_parse_reply+0x40>
}
if (q == NULL) {
800d18e: 6b3b ldr r3, [r7, #48] ; 0x30
800d190: 2b00 cmp r3, #0
800d192: d102 bne.n 800d19a <dhcp_parse_reply+0x76>
return ERR_BUF;
800d194: f06f 0301 mvn.w r3, #1
800d198: e281 b.n 800d69e <dhcp_parse_reply+0x57a>
}
offset = options_idx;
800d19a: 8efb ldrh r3, [r7, #54] ; 0x36
800d19c: 877b strh r3, [r7, #58] ; 0x3a
offset_max = options_idx_max;
800d19e: 8ebb ldrh r3, [r7, #52] ; 0x34
800d1a0: 873b strh r3, [r7, #56] ; 0x38
options = (u8_t *)q->payload;
800d1a2: 6b3b ldr r3, [r7, #48] ; 0x30
800d1a4: 685b ldr r3, [r3, #4]
800d1a6: 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)) {
800d1a8: e239 b.n 800d61e <dhcp_parse_reply+0x4fa>
u8_t op = options[offset];
800d1aa: 8f7b ldrh r3, [r7, #58] ; 0x3a
800d1ac: 6bfa ldr r2, [r7, #60] ; 0x3c
800d1ae: 4413 add r3, r2
800d1b0: 781b ldrb r3, [r3, #0]
800d1b2: 75fb strb r3, [r7, #23]
u8_t len;
u8_t decode_len = 0;
800d1b4: 2300 movs r3, #0
800d1b6: f887 3026 strb.w r3, [r7, #38] ; 0x26
int decode_idx = -1;
800d1ba: f04f 33ff mov.w r3, #4294967295
800d1be: 623b str r3, [r7, #32]
u16_t val_offset = (u16_t)(offset + 2);
800d1c0: 8f7b ldrh r3, [r7, #58] ; 0x3a
800d1c2: 3302 adds r3, #2
800d1c4: 83fb strh r3, [r7, #30]
if (val_offset < offset) {
800d1c6: 8bfa ldrh r2, [r7, #30]
800d1c8: 8f7b ldrh r3, [r7, #58] ; 0x3a
800d1ca: 429a cmp r2, r3
800d1cc: d202 bcs.n 800d1d4 <dhcp_parse_reply+0xb0>
/* overflow */
return ERR_BUF;
800d1ce: f06f 0301 mvn.w r3, #1
800d1d2: e264 b.n 800d69e <dhcp_parse_reply+0x57a>
}
/* len byte might be in the next pbuf */
if ((offset + 1) < q->len) {
800d1d4: 8f7b ldrh r3, [r7, #58] ; 0x3a
800d1d6: 3301 adds r3, #1
800d1d8: 6b3a ldr r2, [r7, #48] ; 0x30
800d1da: 8952 ldrh r2, [r2, #10]
800d1dc: 4293 cmp r3, r2
800d1de: da07 bge.n 800d1f0 <dhcp_parse_reply+0xcc>
len = options[offset + 1];
800d1e0: 8f7b ldrh r3, [r7, #58] ; 0x3a
800d1e2: 3301 adds r3, #1
800d1e4: 6bfa ldr r2, [r7, #60] ; 0x3c
800d1e6: 4413 add r3, r2
800d1e8: 781b ldrb r3, [r3, #0]
800d1ea: f887 3027 strb.w r3, [r7, #39] ; 0x27
800d1ee: e00b b.n 800d208 <dhcp_parse_reply+0xe4>
} else {
len = (q->next != NULL ? ((u8_t *)q->next->payload)[0] : 0);
800d1f0: 6b3b ldr r3, [r7, #48] ; 0x30
800d1f2: 681b ldr r3, [r3, #0]
800d1f4: 2b00 cmp r3, #0
800d1f6: d004 beq.n 800d202 <dhcp_parse_reply+0xde>
800d1f8: 6b3b ldr r3, [r7, #48] ; 0x30
800d1fa: 681b ldr r3, [r3, #0]
800d1fc: 685b ldr r3, [r3, #4]
800d1fe: 781b ldrb r3, [r3, #0]
800d200: e000 b.n 800d204 <dhcp_parse_reply+0xe0>
800d202: 2300 movs r3, #0
800d204: 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;
800d208: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d20c: f887 3026 strb.w r3, [r7, #38] ; 0x26
switch (op) {
800d210: 7dfb ldrb r3, [r7, #23]
800d212: 2b3b cmp r3, #59 ; 0x3b
800d214: f200 812c bhi.w 800d470 <dhcp_parse_reply+0x34c>
800d218: a201 add r2, pc, #4 ; (adr r2, 800d220 <dhcp_parse_reply+0xfc>)
800d21a: f852 f023 ldr.w pc, [r2, r3, lsl #2]
800d21e: bf00 nop
800d220: 0800d311 .word 0x0800d311
800d224: 0800d321 .word 0x0800d321
800d228: 0800d471 .word 0x0800d471
800d22c: 0800d343 .word 0x0800d343
800d230: 0800d471 .word 0x0800d471
800d234: 0800d471 .word 0x0800d471
800d238: 0800d471 .word 0x0800d471
800d23c: 0800d471 .word 0x0800d471
800d240: 0800d471 .word 0x0800d471
800d244: 0800d471 .word 0x0800d471
800d248: 0800d471 .word 0x0800d471
800d24c: 0800d471 .word 0x0800d471
800d250: 0800d471 .word 0x0800d471
800d254: 0800d471 .word 0x0800d471
800d258: 0800d471 .word 0x0800d471
800d25c: 0800d471 .word 0x0800d471
800d260: 0800d471 .word 0x0800d471
800d264: 0800d471 .word 0x0800d471
800d268: 0800d471 .word 0x0800d471
800d26c: 0800d471 .word 0x0800d471
800d270: 0800d471 .word 0x0800d471
800d274: 0800d471 .word 0x0800d471
800d278: 0800d471 .word 0x0800d471
800d27c: 0800d471 .word 0x0800d471
800d280: 0800d471 .word 0x0800d471
800d284: 0800d471 .word 0x0800d471
800d288: 0800d471 .word 0x0800d471
800d28c: 0800d471 .word 0x0800d471
800d290: 0800d471 .word 0x0800d471
800d294: 0800d471 .word 0x0800d471
800d298: 0800d471 .word 0x0800d471
800d29c: 0800d471 .word 0x0800d471
800d2a0: 0800d471 .word 0x0800d471
800d2a4: 0800d471 .word 0x0800d471
800d2a8: 0800d471 .word 0x0800d471
800d2ac: 0800d471 .word 0x0800d471
800d2b0: 0800d471 .word 0x0800d471
800d2b4: 0800d471 .word 0x0800d471
800d2b8: 0800d471 .word 0x0800d471
800d2bc: 0800d471 .word 0x0800d471
800d2c0: 0800d471 .word 0x0800d471
800d2c4: 0800d471 .word 0x0800d471
800d2c8: 0800d471 .word 0x0800d471
800d2cc: 0800d471 .word 0x0800d471
800d2d0: 0800d471 .word 0x0800d471
800d2d4: 0800d471 .word 0x0800d471
800d2d8: 0800d471 .word 0x0800d471
800d2dc: 0800d471 .word 0x0800d471
800d2e0: 0800d471 .word 0x0800d471
800d2e4: 0800d471 .word 0x0800d471
800d2e8: 0800d471 .word 0x0800d471
800d2ec: 0800d36f .word 0x0800d36f
800d2f0: 0800d391 .word 0x0800d391
800d2f4: 0800d3cd .word 0x0800d3cd
800d2f8: 0800d3ef .word 0x0800d3ef
800d2fc: 0800d471 .word 0x0800d471
800d300: 0800d471 .word 0x0800d471
800d304: 0800d471 .word 0x0800d471
800d308: 0800d42d .word 0x0800d42d
800d30c: 0800d44f .word 0x0800d44f
/* case(DHCP_OPTION_END): handled above */
case (DHCP_OPTION_PAD):
/* special option: no len encoded */
decode_len = len = 0;
800d310: 2300 movs r3, #0
800d312: f887 3027 strb.w r3, [r7, #39] ; 0x27
800d316: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d31a: f887 3026 strb.w r3, [r7, #38] ; 0x26
/* will be increased below */
break;
800d31e: e0ab b.n 800d478 <dhcp_parse_reply+0x354>
case (DHCP_OPTION_SUBNET_MASK):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
800d320: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d324: 2b04 cmp r3, #4
800d326: d009 beq.n 800d33c <dhcp_parse_reply+0x218>
800d328: 4b3a ldr r3, [pc, #232] ; (800d414 <dhcp_parse_reply+0x2f0>)
800d32a: f240 622e movw r2, #1582 ; 0x62e
800d32e: 493a ldr r1, [pc, #232] ; (800d418 <dhcp_parse_reply+0x2f4>)
800d330: 483a ldr r0, [pc, #232] ; (800d41c <dhcp_parse_reply+0x2f8>)
800d332: f003 f84d bl 80103d0 <printf>
800d336: f06f 0305 mvn.w r3, #5
800d33a: e1b0 b.n 800d69e <dhcp_parse_reply+0x57a>
decode_idx = DHCP_OPTION_IDX_SUBNET_MASK;
800d33c: 2306 movs r3, #6
800d33e: 623b str r3, [r7, #32]
break;
800d340: e09a b.n 800d478 <dhcp_parse_reply+0x354>
case (DHCP_OPTION_ROUTER):
decode_len = 4; /* only copy the first given router */
800d342: 2304 movs r3, #4
800d344: f887 3026 strb.w r3, [r7, #38] ; 0x26
LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;);
800d348: f897 2027 ldrb.w r2, [r7, #39] ; 0x27
800d34c: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
800d350: 429a cmp r2, r3
800d352: d209 bcs.n 800d368 <dhcp_parse_reply+0x244>
800d354: 4b2f ldr r3, [pc, #188] ; (800d414 <dhcp_parse_reply+0x2f0>)
800d356: f240 6233 movw r2, #1587 ; 0x633
800d35a: 4931 ldr r1, [pc, #196] ; (800d420 <dhcp_parse_reply+0x2fc>)
800d35c: 482f ldr r0, [pc, #188] ; (800d41c <dhcp_parse_reply+0x2f8>)
800d35e: f003 f837 bl 80103d0 <printf>
800d362: f06f 0305 mvn.w r3, #5
800d366: e19a b.n 800d69e <dhcp_parse_reply+0x57a>
decode_idx = DHCP_OPTION_IDX_ROUTER;
800d368: 2307 movs r3, #7
800d36a: 623b str r3, [r7, #32]
break;
800d36c: e084 b.n 800d478 <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;);
800d36e: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d372: 2b04 cmp r3, #4
800d374: d009 beq.n 800d38a <dhcp_parse_reply+0x266>
800d376: 4b27 ldr r3, [pc, #156] ; (800d414 <dhcp_parse_reply+0x2f0>)
800d378: f240 6241 movw r2, #1601 ; 0x641
800d37c: 4926 ldr r1, [pc, #152] ; (800d418 <dhcp_parse_reply+0x2f4>)
800d37e: 4827 ldr r0, [pc, #156] ; (800d41c <dhcp_parse_reply+0x2f8>)
800d380: f003 f826 bl 80103d0 <printf>
800d384: f06f 0305 mvn.w r3, #5
800d388: e189 b.n 800d69e <dhcp_parse_reply+0x57a>
decode_idx = DHCP_OPTION_IDX_LEASE_TIME;
800d38a: 2303 movs r3, #3
800d38c: 623b str r3, [r7, #32]
break;
800d38e: e073 b.n 800d478 <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;);
800d390: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d394: 2b01 cmp r3, #1
800d396: d009 beq.n 800d3ac <dhcp_parse_reply+0x288>
800d398: 4b1e ldr r3, [pc, #120] ; (800d414 <dhcp_parse_reply+0x2f0>)
800d39a: f240 624f movw r2, #1615 ; 0x64f
800d39e: 4921 ldr r1, [pc, #132] ; (800d424 <dhcp_parse_reply+0x300>)
800d3a0: 481e ldr r0, [pc, #120] ; (800d41c <dhcp_parse_reply+0x2f8>)
800d3a2: f003 f815 bl 80103d0 <printf>
800d3a6: f06f 0305 mvn.w r3, #5
800d3aa: e178 b.n 800d69e <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;);
800d3ac: 8efb ldrh r3, [r7, #54] ; 0x36
800d3ae: 2bf0 cmp r3, #240 ; 0xf0
800d3b0: d009 beq.n 800d3c6 <dhcp_parse_reply+0x2a2>
800d3b2: 4b18 ldr r3, [pc, #96] ; (800d414 <dhcp_parse_reply+0x2f0>)
800d3b4: f240 6251 movw r2, #1617 ; 0x651
800d3b8: 491b ldr r1, [pc, #108] ; (800d428 <dhcp_parse_reply+0x304>)
800d3ba: 4818 ldr r0, [pc, #96] ; (800d41c <dhcp_parse_reply+0x2f8>)
800d3bc: f003 f808 bl 80103d0 <printf>
800d3c0: f06f 0305 mvn.w r3, #5
800d3c4: e16b b.n 800d69e <dhcp_parse_reply+0x57a>
decode_idx = DHCP_OPTION_IDX_OVERLOAD;
800d3c6: 2300 movs r3, #0
800d3c8: 623b str r3, [r7, #32]
break;
800d3ca: e055 b.n 800d478 <dhcp_parse_reply+0x354>
case (DHCP_OPTION_MESSAGE_TYPE):
LWIP_ERROR("len == 1", len == 1, return ERR_VAL;);
800d3cc: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d3d0: 2b01 cmp r3, #1
800d3d2: d009 beq.n 800d3e8 <dhcp_parse_reply+0x2c4>
800d3d4: 4b0f ldr r3, [pc, #60] ; (800d414 <dhcp_parse_reply+0x2f0>)
800d3d6: f240 6255 movw r2, #1621 ; 0x655
800d3da: 4912 ldr r1, [pc, #72] ; (800d424 <dhcp_parse_reply+0x300>)
800d3dc: 480f ldr r0, [pc, #60] ; (800d41c <dhcp_parse_reply+0x2f8>)
800d3de: f002 fff7 bl 80103d0 <printf>
800d3e2: f06f 0305 mvn.w r3, #5
800d3e6: e15a b.n 800d69e <dhcp_parse_reply+0x57a>
decode_idx = DHCP_OPTION_IDX_MSG_TYPE;
800d3e8: 2301 movs r3, #1
800d3ea: 623b str r3, [r7, #32]
break;
800d3ec: e044 b.n 800d478 <dhcp_parse_reply+0x354>
case (DHCP_OPTION_SERVER_ID):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
800d3ee: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d3f2: 2b04 cmp r3, #4
800d3f4: d009 beq.n 800d40a <dhcp_parse_reply+0x2e6>
800d3f6: 4b07 ldr r3, [pc, #28] ; (800d414 <dhcp_parse_reply+0x2f0>)
800d3f8: f240 6259 movw r2, #1625 ; 0x659
800d3fc: 4906 ldr r1, [pc, #24] ; (800d418 <dhcp_parse_reply+0x2f4>)
800d3fe: 4807 ldr r0, [pc, #28] ; (800d41c <dhcp_parse_reply+0x2f8>)
800d400: f002 ffe6 bl 80103d0 <printf>
800d404: f06f 0305 mvn.w r3, #5
800d408: e149 b.n 800d69e <dhcp_parse_reply+0x57a>
decode_idx = DHCP_OPTION_IDX_SERVER_ID;
800d40a: 2302 movs r3, #2
800d40c: 623b str r3, [r7, #32]
break;
800d40e: e033 b.n 800d478 <dhcp_parse_reply+0x354>
800d410: 20008c80 .word 0x20008c80
800d414: 0801720c .word 0x0801720c
800d418: 08017494 .word 0x08017494
800d41c: 0801726c .word 0x0801726c
800d420: 080174a0 .word 0x080174a0
800d424: 080174b4 .word 0x080174b4
800d428: 080174c0 .word 0x080174c0
case (DHCP_OPTION_T1):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
800d42c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d430: 2b04 cmp r3, #4
800d432: d009 beq.n 800d448 <dhcp_parse_reply+0x324>
800d434: 4b9c ldr r3, [pc, #624] ; (800d6a8 <dhcp_parse_reply+0x584>)
800d436: f240 625d movw r2, #1629 ; 0x65d
800d43a: 499c ldr r1, [pc, #624] ; (800d6ac <dhcp_parse_reply+0x588>)
800d43c: 489c ldr r0, [pc, #624] ; (800d6b0 <dhcp_parse_reply+0x58c>)
800d43e: f002 ffc7 bl 80103d0 <printf>
800d442: f06f 0305 mvn.w r3, #5
800d446: e12a b.n 800d69e <dhcp_parse_reply+0x57a>
decode_idx = DHCP_OPTION_IDX_T1;
800d448: 2304 movs r3, #4
800d44a: 623b str r3, [r7, #32]
break;
800d44c: e014 b.n 800d478 <dhcp_parse_reply+0x354>
case (DHCP_OPTION_T2):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
800d44e: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d452: 2b04 cmp r3, #4
800d454: d009 beq.n 800d46a <dhcp_parse_reply+0x346>
800d456: 4b94 ldr r3, [pc, #592] ; (800d6a8 <dhcp_parse_reply+0x584>)
800d458: f240 6261 movw r2, #1633 ; 0x661
800d45c: 4993 ldr r1, [pc, #588] ; (800d6ac <dhcp_parse_reply+0x588>)
800d45e: 4894 ldr r0, [pc, #592] ; (800d6b0 <dhcp_parse_reply+0x58c>)
800d460: f002 ffb6 bl 80103d0 <printf>
800d464: f06f 0305 mvn.w r3, #5
800d468: e119 b.n 800d69e <dhcp_parse_reply+0x57a>
decode_idx = DHCP_OPTION_IDX_T2;
800d46a: 2305 movs r3, #5
800d46c: 623b str r3, [r7, #32]
break;
800d46e: e003 b.n 800d478 <dhcp_parse_reply+0x354>
default:
decode_len = 0;
800d470: 2300 movs r3, #0
800d472: 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;
800d476: bf00 nop
}
if (op == DHCP_OPTION_PAD) {
800d478: 7dfb ldrb r3, [r7, #23]
800d47a: 2b00 cmp r3, #0
800d47c: d103 bne.n 800d486 <dhcp_parse_reply+0x362>
offset++;
800d47e: 8f7b ldrh r3, [r7, #58] ; 0x3a
800d480: 3301 adds r3, #1
800d482: 877b strh r3, [r7, #58] ; 0x3a
800d484: e0a1 b.n 800d5ca <dhcp_parse_reply+0x4a6>
} else {
if (offset + len + 2 > 0xFFFF) {
800d486: 8f7a ldrh r2, [r7, #58] ; 0x3a
800d488: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d48c: 4413 add r3, r2
800d48e: f64f 72fd movw r2, #65533 ; 0xfffd
800d492: 4293 cmp r3, r2
800d494: dd02 ble.n 800d49c <dhcp_parse_reply+0x378>
/* overflow */
return ERR_BUF;
800d496: f06f 0301 mvn.w r3, #1
800d49a: e100 b.n 800d69e <dhcp_parse_reply+0x57a>
}
offset = (u16_t)(offset + len + 2);
800d49c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d4a0: b29a uxth r2, r3
800d4a2: 8f7b ldrh r3, [r7, #58] ; 0x3a
800d4a4: 4413 add r3, r2
800d4a6: b29b uxth r3, r3
800d4a8: 3302 adds r3, #2
800d4aa: 877b strh r3, [r7, #58] ; 0x3a
if (decode_len > 0) {
800d4ac: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
800d4b0: 2b00 cmp r3, #0
800d4b2: f000 808a beq.w 800d5ca <dhcp_parse_reply+0x4a6>
u32_t value = 0;
800d4b6: 2300 movs r3, #0
800d4b8: 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);
800d4ba: 6a3b ldr r3, [r7, #32]
800d4bc: 2b00 cmp r3, #0
800d4be: db02 blt.n 800d4c6 <dhcp_parse_reply+0x3a2>
800d4c0: 6a3b ldr r3, [r7, #32]
800d4c2: 2b07 cmp r3, #7
800d4c4: dd06 ble.n 800d4d4 <dhcp_parse_reply+0x3b0>
800d4c6: 4b78 ldr r3, [pc, #480] ; (800d6a8 <dhcp_parse_reply+0x584>)
800d4c8: f44f 62cf mov.w r2, #1656 ; 0x678
800d4cc: 4979 ldr r1, [pc, #484] ; (800d6b4 <dhcp_parse_reply+0x590>)
800d4ce: 4878 ldr r0, [pc, #480] ; (800d6b0 <dhcp_parse_reply+0x58c>)
800d4d0: f002 ff7e bl 80103d0 <printf>
if (!dhcp_option_given(dhcp, decode_idx)) {
800d4d4: 4a78 ldr r2, [pc, #480] ; (800d6b8 <dhcp_parse_reply+0x594>)
800d4d6: 6a3b ldr r3, [r7, #32]
800d4d8: 4413 add r3, r2
800d4da: 781b ldrb r3, [r3, #0]
800d4dc: 2b00 cmp r3, #0
800d4de: d174 bne.n 800d5ca <dhcp_parse_reply+0x4a6>
copy_len = LWIP_MIN(decode_len, 4);
800d4e0: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
800d4e4: 2b04 cmp r3, #4
800d4e6: bf28 it cs
800d4e8: 2304 movcs r3, #4
800d4ea: b2db uxtb r3, r3
800d4ec: 82bb strh r3, [r7, #20]
if (pbuf_copy_partial(q, &value, copy_len, val_offset) != copy_len) {
800d4ee: 8bfb ldrh r3, [r7, #30]
800d4f0: 8aba ldrh r2, [r7, #20]
800d4f2: f107 0108 add.w r1, r7, #8
800d4f6: 6b38 ldr r0, [r7, #48] ; 0x30
800d4f8: f7f8 fc48 bl 8005d8c <pbuf_copy_partial>
800d4fc: 4603 mov r3, r0
800d4fe: 461a mov r2, r3
800d500: 8abb ldrh r3, [r7, #20]
800d502: 4293 cmp r3, r2
800d504: d002 beq.n 800d50c <dhcp_parse_reply+0x3e8>
return ERR_BUF;
800d506: f06f 0301 mvn.w r3, #1
800d50a: e0c8 b.n 800d69e <dhcp_parse_reply+0x57a>
}
if (decode_len > 4) {
800d50c: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
800d510: 2b04 cmp r3, #4
800d512: d933 bls.n 800d57c <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;);
800d514: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
800d518: f003 0303 and.w r3, r3, #3
800d51c: b2db uxtb r3, r3
800d51e: 2b00 cmp r3, #0
800d520: d009 beq.n 800d536 <dhcp_parse_reply+0x412>
800d522: 4b61 ldr r3, [pc, #388] ; (800d6a8 <dhcp_parse_reply+0x584>)
800d524: f240 6281 movw r2, #1665 ; 0x681
800d528: 4964 ldr r1, [pc, #400] ; (800d6bc <dhcp_parse_reply+0x598>)
800d52a: 4861 ldr r0, [pc, #388] ; (800d6b0 <dhcp_parse_reply+0x58c>)
800d52c: f002 ff50 bl 80103d0 <printf>
800d530: f06f 0305 mvn.w r3, #5
800d534: e0b3 b.n 800d69e <dhcp_parse_reply+0x57a>
dhcp_got_option(dhcp, decode_idx);
800d536: 4a60 ldr r2, [pc, #384] ; (800d6b8 <dhcp_parse_reply+0x594>)
800d538: 6a3b ldr r3, [r7, #32]
800d53a: 4413 add r3, r2
800d53c: 2201 movs r2, #1
800d53e: 701a strb r2, [r3, #0]
dhcp_set_option_value(dhcp, decode_idx, lwip_htonl(value));
800d540: 68bb ldr r3, [r7, #8]
800d542: 4618 mov r0, r3
800d544: f7f6 fed3 bl 80042ee <lwip_htonl>
800d548: 4602 mov r2, r0
800d54a: 495d ldr r1, [pc, #372] ; (800d6c0 <dhcp_parse_reply+0x59c>)
800d54c: 6a3b ldr r3, [r7, #32]
800d54e: f841 2023 str.w r2, [r1, r3, lsl #2]
decode_len = (u8_t)(decode_len - 4);
800d552: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
800d556: 3b04 subs r3, #4
800d558: f887 3026 strb.w r3, [r7, #38] ; 0x26
next_val_offset = (u16_t)(val_offset + 4);
800d55c: 8bfb ldrh r3, [r7, #30]
800d55e: 3304 adds r3, #4
800d560: 827b strh r3, [r7, #18]
if (next_val_offset < val_offset) {
800d562: 8a7a ldrh r2, [r7, #18]
800d564: 8bfb ldrh r3, [r7, #30]
800d566: 429a cmp r2, r3
800d568: d202 bcs.n 800d570 <dhcp_parse_reply+0x44c>
/* overflow */
return ERR_BUF;
800d56a: f06f 0301 mvn.w r3, #1
800d56e: e096 b.n 800d69e <dhcp_parse_reply+0x57a>
}
val_offset = next_val_offset;
800d570: 8a7b ldrh r3, [r7, #18]
800d572: 83fb strh r3, [r7, #30]
decode_idx++;
800d574: 6a3b ldr r3, [r7, #32]
800d576: 3301 adds r3, #1
800d578: 623b str r3, [r7, #32]
goto decode_next;
800d57a: e79e b.n 800d4ba <dhcp_parse_reply+0x396>
} else if (decode_len == 4) {
800d57c: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
800d580: 2b04 cmp r3, #4
800d582: d106 bne.n 800d592 <dhcp_parse_reply+0x46e>
value = lwip_ntohl(value);
800d584: 68bb ldr r3, [r7, #8]
800d586: 4618 mov r0, r3
800d588: f7f6 feb1 bl 80042ee <lwip_htonl>
800d58c: 4603 mov r3, r0
800d58e: 60bb str r3, [r7, #8]
800d590: e011 b.n 800d5b6 <dhcp_parse_reply+0x492>
} else {
LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;);
800d592: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
800d596: 2b01 cmp r3, #1
800d598: d009 beq.n 800d5ae <dhcp_parse_reply+0x48a>
800d59a: 4b43 ldr r3, [pc, #268] ; (800d6a8 <dhcp_parse_reply+0x584>)
800d59c: f44f 62d2 mov.w r2, #1680 ; 0x690
800d5a0: 4948 ldr r1, [pc, #288] ; (800d6c4 <dhcp_parse_reply+0x5a0>)
800d5a2: 4843 ldr r0, [pc, #268] ; (800d6b0 <dhcp_parse_reply+0x58c>)
800d5a4: f002 ff14 bl 80103d0 <printf>
800d5a8: f06f 0305 mvn.w r3, #5
800d5ac: e077 b.n 800d69e <dhcp_parse_reply+0x57a>
value = ((u8_t *)&value)[0];
800d5ae: f107 0308 add.w r3, r7, #8
800d5b2: 781b ldrb r3, [r3, #0]
800d5b4: 60bb str r3, [r7, #8]
}
dhcp_got_option(dhcp, decode_idx);
800d5b6: 4a40 ldr r2, [pc, #256] ; (800d6b8 <dhcp_parse_reply+0x594>)
800d5b8: 6a3b ldr r3, [r7, #32]
800d5ba: 4413 add r3, r2
800d5bc: 2201 movs r2, #1
800d5be: 701a strb r2, [r3, #0]
dhcp_set_option_value(dhcp, decode_idx, value);
800d5c0: 68ba ldr r2, [r7, #8]
800d5c2: 493f ldr r1, [pc, #252] ; (800d6c0 <dhcp_parse_reply+0x59c>)
800d5c4: 6a3b ldr r3, [r7, #32]
800d5c6: f841 2023 str.w r2, [r1, r3, lsl #2]
}
}
}
if (offset >= q->len) {
800d5ca: 6b3b ldr r3, [r7, #48] ; 0x30
800d5cc: 895b ldrh r3, [r3, #10]
800d5ce: 8f7a ldrh r2, [r7, #58] ; 0x3a
800d5d0: 429a cmp r2, r3
800d5d2: d324 bcc.n 800d61e <dhcp_parse_reply+0x4fa>
offset = (u16_t)(offset - q->len);
800d5d4: 6b3b ldr r3, [r7, #48] ; 0x30
800d5d6: 895b ldrh r3, [r3, #10]
800d5d8: 8f7a ldrh r2, [r7, #58] ; 0x3a
800d5da: 1ad3 subs r3, r2, r3
800d5dc: 877b strh r3, [r7, #58] ; 0x3a
offset_max = (u16_t)(offset_max - q->len);
800d5de: 6b3b ldr r3, [r7, #48] ; 0x30
800d5e0: 895b ldrh r3, [r3, #10]
800d5e2: 8f3a ldrh r2, [r7, #56] ; 0x38
800d5e4: 1ad3 subs r3, r2, r3
800d5e6: 873b strh r3, [r7, #56] ; 0x38
if (offset < offset_max) {
800d5e8: 8f7a ldrh r2, [r7, #58] ; 0x3a
800d5ea: 8f3b ldrh r3, [r7, #56] ; 0x38
800d5ec: 429a cmp r2, r3
800d5ee: d213 bcs.n 800d618 <dhcp_parse_reply+0x4f4>
q = q->next;
800d5f0: 6b3b ldr r3, [r7, #48] ; 0x30
800d5f2: 681b ldr r3, [r3, #0]
800d5f4: 633b str r3, [r7, #48] ; 0x30
LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;);
800d5f6: 6b3b ldr r3, [r7, #48] ; 0x30
800d5f8: 2b00 cmp r3, #0
800d5fa: d109 bne.n 800d610 <dhcp_parse_reply+0x4ec>
800d5fc: 4b2a ldr r3, [pc, #168] ; (800d6a8 <dhcp_parse_reply+0x584>)
800d5fe: f240 629d movw r2, #1693 ; 0x69d
800d602: 4931 ldr r1, [pc, #196] ; (800d6c8 <dhcp_parse_reply+0x5a4>)
800d604: 482a ldr r0, [pc, #168] ; (800d6b0 <dhcp_parse_reply+0x58c>)
800d606: f002 fee3 bl 80103d0 <printf>
800d60a: f06f 0305 mvn.w r3, #5
800d60e: e046 b.n 800d69e <dhcp_parse_reply+0x57a>
options = (u8_t *)q->payload;
800d610: 6b3b ldr r3, [r7, #48] ; 0x30
800d612: 685b ldr r3, [r3, #4]
800d614: 63fb str r3, [r7, #60] ; 0x3c
800d616: e002 b.n 800d61e <dhcp_parse_reply+0x4fa>
} else {
/* We've run out of bytes, probably no end marker. Don't proceed. */
return ERR_BUF;
800d618: f06f 0301 mvn.w r3, #1
800d61c: e03f b.n 800d69e <dhcp_parse_reply+0x57a>
while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) {
800d61e: 6b3b ldr r3, [r7, #48] ; 0x30
800d620: 2b00 cmp r3, #0
800d622: d00a beq.n 800d63a <dhcp_parse_reply+0x516>
800d624: 8f7a ldrh r2, [r7, #58] ; 0x3a
800d626: 8f3b ldrh r3, [r7, #56] ; 0x38
800d628: 429a cmp r2, r3
800d62a: d206 bcs.n 800d63a <dhcp_parse_reply+0x516>
800d62c: 8f7b ldrh r3, [r7, #58] ; 0x3a
800d62e: 6bfa ldr r2, [r7, #60] ; 0x3c
800d630: 4413 add r3, r2
800d632: 781b ldrb r3, [r3, #0]
800d634: 2bff cmp r3, #255 ; 0xff
800d636: f47f adb8 bne.w 800d1aa <dhcp_parse_reply+0x86>
}
}
}
/* is this an overloaded message? */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) {
800d63a: 4b1f ldr r3, [pc, #124] ; (800d6b8 <dhcp_parse_reply+0x594>)
800d63c: 781b ldrb r3, [r3, #0]
800d63e: 2b00 cmp r3, #0
800d640: d018 beq.n 800d674 <dhcp_parse_reply+0x550>
u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD);
800d642: 4b1f ldr r3, [pc, #124] ; (800d6c0 <dhcp_parse_reply+0x59c>)
800d644: 681b ldr r3, [r3, #0]
800d646: 60fb str r3, [r7, #12]
dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD);
800d648: 4b1b ldr r3, [pc, #108] ; (800d6b8 <dhcp_parse_reply+0x594>)
800d64a: 2200 movs r2, #0
800d64c: 701a strb r2, [r3, #0]
if (overload == DHCP_OVERLOAD_FILE) {
800d64e: 68fb ldr r3, [r7, #12]
800d650: 2b01 cmp r3, #1
800d652: d102 bne.n 800d65a <dhcp_parse_reply+0x536>
parse_file_as_options = 1;
800d654: 2301 movs r3, #1
800d656: 62fb str r3, [r7, #44] ; 0x2c
800d658: e00c b.n 800d674 <dhcp_parse_reply+0x550>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n"));
} else if (overload == DHCP_OVERLOAD_SNAME) {
800d65a: 68fb ldr r3, [r7, #12]
800d65c: 2b02 cmp r3, #2
800d65e: d102 bne.n 800d666 <dhcp_parse_reply+0x542>
parse_sname_as_options = 1;
800d660: 2301 movs r3, #1
800d662: 62bb str r3, [r7, #40] ; 0x28
800d664: e006 b.n 800d674 <dhcp_parse_reply+0x550>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n"));
} else if (overload == DHCP_OVERLOAD_SNAME_FILE) {
800d666: 68fb ldr r3, [r7, #12]
800d668: 2b03 cmp r3, #3
800d66a: d103 bne.n 800d674 <dhcp_parse_reply+0x550>
parse_sname_as_options = 1;
800d66c: 2301 movs r3, #1
800d66e: 62bb str r3, [r7, #40] ; 0x28
parse_file_as_options = 1;
800d670: 2301 movs r3, #1
800d672: 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) {
800d674: 6afb ldr r3, [r7, #44] ; 0x2c
800d676: 2b00 cmp r3, #0
800d678: d006 beq.n 800d688 <dhcp_parse_reply+0x564>
/* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */
parse_file_as_options = 0;
800d67a: 2300 movs r3, #0
800d67c: 62fb str r3, [r7, #44] ; 0x2c
options_idx = DHCP_FILE_OFS;
800d67e: 236c movs r3, #108 ; 0x6c
800d680: 86fb strh r3, [r7, #54] ; 0x36
options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN;
800d682: 23ec movs r3, #236 ; 0xec
800d684: 86bb strh r3, [r7, #52] ; 0x34
#if LWIP_DHCP_BOOTP_FILE
file_overloaded = 1;
#endif
goto again;
800d686: e56a b.n 800d15e <dhcp_parse_reply+0x3a>
} else if (parse_sname_as_options) {
800d688: 6abb ldr r3, [r7, #40] ; 0x28
800d68a: 2b00 cmp r3, #0
800d68c: d006 beq.n 800d69c <dhcp_parse_reply+0x578>
parse_sname_as_options = 0;
800d68e: 2300 movs r3, #0
800d690: 62bb str r3, [r7, #40] ; 0x28
options_idx = DHCP_SNAME_OFS;
800d692: 232c movs r3, #44 ; 0x2c
800d694: 86fb strh r3, [r7, #54] ; 0x36
options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN;
800d696: 236c movs r3, #108 ; 0x6c
800d698: 86bb strh r3, [r7, #52] ; 0x34
goto again;
800d69a: e560 b.n 800d15e <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;
800d69c: 2300 movs r3, #0
}
800d69e: 4618 mov r0, r3
800d6a0: 3740 adds r7, #64 ; 0x40
800d6a2: 46bd mov sp, r7
800d6a4: bd80 pop {r7, pc}
800d6a6: bf00 nop
800d6a8: 0801720c .word 0x0801720c
800d6ac: 08017494 .word 0x08017494
800d6b0: 0801726c .word 0x0801726c
800d6b4: 080174d8 .word 0x080174d8
800d6b8: 20008c80 .word 0x20008c80
800d6bc: 080174ec .word 0x080174ec
800d6c0: 20008c60 .word 0x20008c60
800d6c4: 08017504 .word 0x08017504
800d6c8: 08017518 .word 0x08017518
0800d6cc <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)
{
800d6cc: b580 push {r7, lr}
800d6ce: b08a sub sp, #40 ; 0x28
800d6d0: af00 add r7, sp, #0
800d6d2: 60f8 str r0, [r7, #12]
800d6d4: 60b9 str r1, [r7, #8]
800d6d6: 607a str r2, [r7, #4]
800d6d8: 603b str r3, [r7, #0]
struct netif *netif = ip_current_input_netif();
800d6da: 4b60 ldr r3, [pc, #384] ; (800d85c <dhcp_recv+0x190>)
800d6dc: 685b ldr r3, [r3, #4]
800d6de: 623b str r3, [r7, #32]
struct dhcp *dhcp = netif_dhcp_data(netif);
800d6e0: 6a3b ldr r3, [r7, #32]
800d6e2: 6a5b ldr r3, [r3, #36] ; 0x24
800d6e4: 61fb str r3, [r7, #28]
struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload;
800d6e6: 687b ldr r3, [r7, #4]
800d6e8: 685b ldr r3, [r3, #4]
800d6ea: 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)) {
800d6ec: 69fb ldr r3, [r7, #28]
800d6ee: 2b00 cmp r3, #0
800d6f0: f000 809d beq.w 800d82e <dhcp_recv+0x162>
800d6f4: 69fb ldr r3, [r7, #28]
800d6f6: 791b ldrb r3, [r3, #4]
800d6f8: 2b00 cmp r3, #0
800d6fa: f000 8098 beq.w 800d82e <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) {
800d6fe: 687b ldr r3, [r7, #4]
800d700: 895b ldrh r3, [r3, #10]
800d702: 2b2b cmp r3, #43 ; 0x2b
800d704: f240 8095 bls.w 800d832 <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) {
800d708: 69bb ldr r3, [r7, #24]
800d70a: 781b ldrb r3, [r3, #0]
800d70c: 2b02 cmp r3, #2
800d70e: f040 8092 bne.w 800d836 <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++) {
800d712: 2300 movs r3, #0
800d714: f887 3027 strb.w r3, [r7, #39] ; 0x27
800d718: e012 b.n 800d740 <dhcp_recv+0x74>
if (netif->hwaddr[i] != reply_msg->chaddr[i]) {
800d71a: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d71e: 6a3a ldr r2, [r7, #32]
800d720: 4413 add r3, r2
800d722: f893 202a ldrb.w r2, [r3, #42] ; 0x2a
800d726: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d72a: 69b9 ldr r1, [r7, #24]
800d72c: 440b add r3, r1
800d72e: 7f1b ldrb r3, [r3, #28]
800d730: 429a cmp r2, r3
800d732: f040 8082 bne.w 800d83a <dhcp_recv+0x16e>
for (i = 0; i < netif->hwaddr_len && i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
800d736: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d73a: 3301 adds r3, #1
800d73c: f887 3027 strb.w r3, [r7, #39] ; 0x27
800d740: 6a3b ldr r3, [r7, #32]
800d742: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
800d746: f897 2027 ldrb.w r2, [r7, #39] ; 0x27
800d74a: 429a cmp r2, r3
800d74c: d203 bcs.n 800d756 <dhcp_recv+0x8a>
800d74e: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d752: 2b05 cmp r3, #5
800d754: d9e1 bls.n 800d71a <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) {
800d756: 69bb ldr r3, [r7, #24]
800d758: 685b ldr r3, [r3, #4]
800d75a: 4618 mov r0, r3
800d75c: f7f6 fdc7 bl 80042ee <lwip_htonl>
800d760: 4602 mov r2, r0
800d762: 69fb ldr r3, [r7, #28]
800d764: 681b ldr r3, [r3, #0]
800d766: 429a cmp r2, r3
800d768: d169 bne.n 800d83e <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) {
800d76a: 69f9 ldr r1, [r7, #28]
800d76c: 6878 ldr r0, [r7, #4]
800d76e: f7ff fcd9 bl 800d124 <dhcp_parse_reply>
800d772: 4603 mov r3, r0
800d774: 2b00 cmp r3, #0
800d776: d164 bne.n 800d842 <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)) {
800d778: 4b39 ldr r3, [pc, #228] ; (800d860 <dhcp_recv+0x194>)
800d77a: 785b ldrb r3, [r3, #1]
800d77c: 2b00 cmp r3, #0
800d77e: d062 beq.n 800d846 <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;
800d780: 687b ldr r3, [r7, #4]
800d782: 685b ldr r3, [r3, #4]
800d784: 617b str r3, [r7, #20]
/* read DHCP message type */
msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE);
800d786: 4b37 ldr r3, [pc, #220] ; (800d864 <dhcp_recv+0x198>)
800d788: 685b ldr r3, [r3, #4]
800d78a: 74fb strb r3, [r7, #19]
/* message type is DHCP ACK? */
if (msg_type == DHCP_ACK) {
800d78c: 7cfb ldrb r3, [r7, #19]
800d78e: 2b05 cmp r3, #5
800d790: d12a bne.n 800d7e8 <dhcp_recv+0x11c>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n"));
/* in requesting state? */
if (dhcp->state == DHCP_STATE_REQUESTING) {
800d792: 69fb ldr r3, [r7, #28]
800d794: 795b ldrb r3, [r3, #5]
800d796: 2b01 cmp r3, #1
800d798: d112 bne.n 800d7c0 <dhcp_recv+0xf4>
dhcp_handle_ack(netif, msg_in);
800d79a: 6979 ldr r1, [r7, #20]
800d79c: 6a38 ldr r0, [r7, #32]
800d79e: f7fe fe17 bl 800c3d0 <dhcp_handle_ack>
#if DHCP_DOES_ARP_CHECK
if ((netif->flags & NETIF_FLAG_ETHARP) != 0) {
800d7a2: 6a3b ldr r3, [r7, #32]
800d7a4: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800d7a8: f003 0308 and.w r3, r3, #8
800d7ac: 2b00 cmp r3, #0
800d7ae: d003 beq.n 800d7b8 <dhcp_recv+0xec>
/* check if the acknowledged lease address is already in use */
dhcp_check(netif);
800d7b0: 6a38 ldr r0, [r7, #32]
800d7b2: f7fe fb87 bl 800bec4 <dhcp_check>
800d7b6: e049 b.n 800d84c <dhcp_recv+0x180>
} else {
/* bind interface to the acknowledged lease address */
dhcp_bind(netif);
800d7b8: 6a38 ldr r0, [r7, #32]
800d7ba: f7ff f867 bl 800c88c <dhcp_bind>
800d7be: e045 b.n 800d84c <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) ||
800d7c0: 69fb ldr r3, [r7, #28]
800d7c2: 795b ldrb r3, [r3, #5]
800d7c4: 2b03 cmp r3, #3
800d7c6: d007 beq.n 800d7d8 <dhcp_recv+0x10c>
800d7c8: 69fb ldr r3, [r7, #28]
800d7ca: 795b ldrb r3, [r3, #5]
800d7cc: 2b04 cmp r3, #4
800d7ce: d003 beq.n 800d7d8 <dhcp_recv+0x10c>
(dhcp->state == DHCP_STATE_RENEWING)) {
800d7d0: 69fb ldr r3, [r7, #28]
800d7d2: 795b ldrb r3, [r3, #5]
else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) ||
800d7d4: 2b05 cmp r3, #5
800d7d6: d139 bne.n 800d84c <dhcp_recv+0x180>
dhcp_handle_ack(netif, msg_in);
800d7d8: 6979 ldr r1, [r7, #20]
800d7da: 6a38 ldr r0, [r7, #32]
800d7dc: f7fe fdf8 bl 800c3d0 <dhcp_handle_ack>
dhcp_bind(netif);
800d7e0: 6a38 ldr r0, [r7, #32]
800d7e2: f7ff f853 bl 800c88c <dhcp_bind>
800d7e6: e031 b.n 800d84c <dhcp_recv+0x180>
}
}
/* received a DHCP_NAK in appropriate state? */
else if ((msg_type == DHCP_NAK) &&
800d7e8: 7cfb ldrb r3, [r7, #19]
800d7ea: 2b06 cmp r3, #6
800d7ec: d113 bne.n 800d816 <dhcp_recv+0x14a>
((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
800d7ee: 69fb ldr r3, [r7, #28]
800d7f0: 795b ldrb r3, [r3, #5]
else if ((msg_type == DHCP_NAK) &&
800d7f2: 2b03 cmp r3, #3
800d7f4: d00b beq.n 800d80e <dhcp_recv+0x142>
((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
800d7f6: 69fb ldr r3, [r7, #28]
800d7f8: 795b ldrb r3, [r3, #5]
800d7fa: 2b01 cmp r3, #1
800d7fc: d007 beq.n 800d80e <dhcp_recv+0x142>
(dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) {
800d7fe: 69fb ldr r3, [r7, #28]
800d800: 795b ldrb r3, [r3, #5]
((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
800d802: 2b04 cmp r3, #4
800d804: d003 beq.n 800d80e <dhcp_recv+0x142>
(dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) {
800d806: 69fb ldr r3, [r7, #28]
800d808: 795b ldrb r3, [r3, #5]
800d80a: 2b05 cmp r3, #5
800d80c: d103 bne.n 800d816 <dhcp_recv+0x14a>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_NAK received\n"));
dhcp_handle_nak(netif);
800d80e: 6a38 ldr r0, [r7, #32]
800d810: f7fe fb3e bl 800be90 <dhcp_handle_nak>
800d814: e01a b.n 800d84c <dhcp_recv+0x180>
}
/* received a DHCP_OFFER in DHCP_STATE_SELECTING state? */
else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_STATE_SELECTING)) {
800d816: 7cfb ldrb r3, [r7, #19]
800d818: 2b02 cmp r3, #2
800d81a: d116 bne.n 800d84a <dhcp_recv+0x17e>
800d81c: 69fb ldr r3, [r7, #28]
800d81e: 795b ldrb r3, [r3, #5]
800d820: 2b06 cmp r3, #6
800d822: d112 bne.n 800d84a <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);
800d824: 6979 ldr r1, [r7, #20]
800d826: 6a38 ldr r0, [r7, #32]
800d828: f7fe fb80 bl 800bf2c <dhcp_handle_offer>
800d82c: e00e b.n 800d84c <dhcp_recv+0x180>
goto free_pbuf_and_return;
800d82e: bf00 nop
800d830: e00c b.n 800d84c <dhcp_recv+0x180>
goto free_pbuf_and_return;
800d832: bf00 nop
800d834: e00a b.n 800d84c <dhcp_recv+0x180>
goto free_pbuf_and_return;
800d836: bf00 nop
800d838: e008 b.n 800d84c <dhcp_recv+0x180>
goto free_pbuf_and_return;
800d83a: bf00 nop
800d83c: e006 b.n 800d84c <dhcp_recv+0x180>
goto free_pbuf_and_return;
800d83e: bf00 nop
800d840: e004 b.n 800d84c <dhcp_recv+0x180>
goto free_pbuf_and_return;
800d842: bf00 nop
800d844: e002 b.n 800d84c <dhcp_recv+0x180>
goto free_pbuf_and_return;
800d846: bf00 nop
800d848: e000 b.n 800d84c <dhcp_recv+0x180>
}
free_pbuf_and_return:
800d84a: bf00 nop
pbuf_free(p);
800d84c: 6878 ldr r0, [r7, #4]
800d84e: f7f8 f8a3 bl 8005998 <pbuf_free>
}
800d852: bf00 nop
800d854: 3728 adds r7, #40 ; 0x28
800d856: 46bd mov sp, r7
800d858: bd80 pop {r7, pc}
800d85a: bf00 nop
800d85c: 20005670 .word 0x20005670
800d860: 20008c80 .word 0x20008c80
800d864: 20008c60 .word 0x20008c60
0800d868 <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)
{
800d868: b580 push {r7, lr}
800d86a: b088 sub sp, #32
800d86c: af00 add r7, sp, #0
800d86e: 60f8 str r0, [r7, #12]
800d870: 60b9 str r1, [r7, #8]
800d872: 603b str r3, [r7, #0]
800d874: 4613 mov r3, r2
800d876: 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;);
800d878: 68fb ldr r3, [r7, #12]
800d87a: 2b00 cmp r3, #0
800d87c: d108 bne.n 800d890 <dhcp_create_msg+0x28>
800d87e: 4b5f ldr r3, [pc, #380] ; (800d9fc <dhcp_create_msg+0x194>)
800d880: f240 7269 movw r2, #1897 ; 0x769
800d884: 495e ldr r1, [pc, #376] ; (800da00 <dhcp_create_msg+0x198>)
800d886: 485f ldr r0, [pc, #380] ; (800da04 <dhcp_create_msg+0x19c>)
800d888: f002 fda2 bl 80103d0 <printf>
800d88c: 2300 movs r3, #0
800d88e: e0b1 b.n 800d9f4 <dhcp_create_msg+0x18c>
LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return NULL;);
800d890: 68bb ldr r3, [r7, #8]
800d892: 2b00 cmp r3, #0
800d894: d108 bne.n 800d8a8 <dhcp_create_msg+0x40>
800d896: 4b59 ldr r3, [pc, #356] ; (800d9fc <dhcp_create_msg+0x194>)
800d898: f240 726a movw r2, #1898 ; 0x76a
800d89c: 495a ldr r1, [pc, #360] ; (800da08 <dhcp_create_msg+0x1a0>)
800d89e: 4859 ldr r0, [pc, #356] ; (800da04 <dhcp_create_msg+0x19c>)
800d8a0: f002 fd96 bl 80103d0 <printf>
800d8a4: 2300 movs r3, #0
800d8a6: e0a5 b.n 800d9f4 <dhcp_create_msg+0x18c>
p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM);
800d8a8: f44f 7220 mov.w r2, #640 ; 0x280
800d8ac: f44f 719a mov.w r1, #308 ; 0x134
800d8b0: 2036 movs r0, #54 ; 0x36
800d8b2: f7f7 fd8d bl 80053d0 <pbuf_alloc>
800d8b6: 61b8 str r0, [r7, #24]
if (p_out == NULL) {
800d8b8: 69bb ldr r3, [r7, #24]
800d8ba: 2b00 cmp r3, #0
800d8bc: d101 bne.n 800d8c2 <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;
800d8be: 2300 movs r3, #0
800d8c0: e098 b.n 800d9f4 <dhcp_create_msg+0x18c>
}
LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg",
800d8c2: 69bb ldr r3, [r7, #24]
800d8c4: 895b ldrh r3, [r3, #10]
800d8c6: f5b3 7f9a cmp.w r3, #308 ; 0x134
800d8ca: d206 bcs.n 800d8da <dhcp_create_msg+0x72>
800d8cc: 4b4b ldr r3, [pc, #300] ; (800d9fc <dhcp_create_msg+0x194>)
800d8ce: f240 7271 movw r2, #1905 ; 0x771
800d8d2: 494e ldr r1, [pc, #312] ; (800da0c <dhcp_create_msg+0x1a4>)
800d8d4: 484b ldr r0, [pc, #300] ; (800da04 <dhcp_create_msg+0x19c>)
800d8d6: f002 fd7b bl 80103d0 <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)) {
800d8da: 79fb ldrb r3, [r7, #7]
800d8dc: 2b03 cmp r3, #3
800d8de: d103 bne.n 800d8e8 <dhcp_create_msg+0x80>
800d8e0: 68bb ldr r3, [r7, #8]
800d8e2: 795b ldrb r3, [r3, #5]
800d8e4: 2b03 cmp r3, #3
800d8e6: d10d bne.n 800d904 <dhcp_create_msg+0x9c>
/* reuse transaction identifier in retransmissions */
if (dhcp->tries == 0) {
800d8e8: 68bb ldr r3, [r7, #8]
800d8ea: 799b ldrb r3, [r3, #6]
800d8ec: 2b00 cmp r3, #0
800d8ee: d105 bne.n 800d8fc <dhcp_create_msg+0x94>
#if DHCP_CREATE_RAND_XID && defined(LWIP_RAND)
xid = LWIP_RAND();
800d8f0: f002 fd80 bl 80103f4 <rand>
800d8f4: 4603 mov r3, r0
800d8f6: 461a mov r2, r3
800d8f8: 4b45 ldr r3, [pc, #276] ; (800da10 <dhcp_create_msg+0x1a8>)
800d8fa: 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;
800d8fc: 4b44 ldr r3, [pc, #272] ; (800da10 <dhcp_create_msg+0x1a8>)
800d8fe: 681a ldr r2, [r3, #0]
800d900: 68bb ldr r3, [r7, #8]
800d902: 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;
800d904: 69bb ldr r3, [r7, #24]
800d906: 685b ldr r3, [r3, #4]
800d908: 617b str r3, [r7, #20]
memset(msg_out, 0, sizeof(struct dhcp_msg));
800d90a: f44f 729a mov.w r2, #308 ; 0x134
800d90e: 2100 movs r1, #0
800d910: 6978 ldr r0, [r7, #20]
800d912: f002 fd55 bl 80103c0 <memset>
msg_out->op = DHCP_BOOTREQUEST;
800d916: 697b ldr r3, [r7, #20]
800d918: 2201 movs r2, #1
800d91a: 701a strb r2, [r3, #0]
/* @todo: make link layer independent */
msg_out->htype = LWIP_IANA_HWTYPE_ETHERNET;
800d91c: 697b ldr r3, [r7, #20]
800d91e: 2201 movs r2, #1
800d920: 705a strb r2, [r3, #1]
msg_out->hlen = netif->hwaddr_len;
800d922: 68fb ldr r3, [r7, #12]
800d924: f893 2030 ldrb.w r2, [r3, #48] ; 0x30
800d928: 697b ldr r3, [r7, #20]
800d92a: 709a strb r2, [r3, #2]
msg_out->xid = lwip_htonl(dhcp->xid);
800d92c: 68bb ldr r3, [r7, #8]
800d92e: 681b ldr r3, [r3, #0]
800d930: 4618 mov r0, r3
800d932: f7f6 fcdc bl 80042ee <lwip_htonl>
800d936: 4602 mov r2, r0
800d938: 697b ldr r3, [r7, #20]
800d93a: 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) ||
800d93c: 79fb ldrb r3, [r7, #7]
800d93e: 2b08 cmp r3, #8
800d940: d010 beq.n 800d964 <dhcp_create_msg+0xfc>
800d942: 79fb ldrb r3, [r7, #7]
800d944: 2b04 cmp r3, #4
800d946: d00d beq.n 800d964 <dhcp_create_msg+0xfc>
800d948: 79fb ldrb r3, [r7, #7]
800d94a: 2b07 cmp r3, #7
800d94c: d00a beq.n 800d964 <dhcp_create_msg+0xfc>
800d94e: 79fb ldrb r3, [r7, #7]
800d950: 2b03 cmp r3, #3
800d952: d10c bne.n 800d96e <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))) {
800d954: 68bb ldr r3, [r7, #8]
800d956: 795b ldrb r3, [r3, #5]
((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */
800d958: 2b05 cmp r3, #5
800d95a: d003 beq.n 800d964 <dhcp_create_msg+0xfc>
((dhcp->state == DHCP_STATE_RENEWING) || dhcp->state == DHCP_STATE_REBINDING))) {
800d95c: 68bb ldr r3, [r7, #8]
800d95e: 795b ldrb r3, [r3, #5]
800d960: 2b04 cmp r3, #4
800d962: d104 bne.n 800d96e <dhcp_create_msg+0x106>
ip4_addr_copy(msg_out->ciaddr, *netif_ip4_addr(netif));
800d964: 68fb ldr r3, [r7, #12]
800d966: 3304 adds r3, #4
800d968: 681a ldr r2, [r3, #0]
800d96a: 697b ldr r3, [r7, #20]
800d96c: 60da str r2, [r3, #12]
}
for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
800d96e: 2300 movs r3, #0
800d970: 83fb strh r3, [r7, #30]
800d972: e00c b.n 800d98e <dhcp_create_msg+0x126>
/* copy netif hardware address (padded with zeroes through memset already) */
msg_out->chaddr[i] = netif->hwaddr[i];
800d974: 8bfa ldrh r2, [r7, #30]
800d976: 8bfb ldrh r3, [r7, #30]
800d978: 68f9 ldr r1, [r7, #12]
800d97a: 440a add r2, r1
800d97c: f892 102a ldrb.w r1, [r2, #42] ; 0x2a
800d980: 697a ldr r2, [r7, #20]
800d982: 4413 add r3, r2
800d984: 460a mov r2, r1
800d986: 771a strb r2, [r3, #28]
for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
800d988: 8bfb ldrh r3, [r7, #30]
800d98a: 3301 adds r3, #1
800d98c: 83fb strh r3, [r7, #30]
800d98e: 8bfb ldrh r3, [r7, #30]
800d990: 2b05 cmp r3, #5
800d992: d9ef bls.n 800d974 <dhcp_create_msg+0x10c>
}
msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE);
800d994: 697b ldr r3, [r7, #20]
800d996: 2200 movs r2, #0
800d998: f042 0263 orr.w r2, r2, #99 ; 0x63
800d99c: f883 20ec strb.w r2, [r3, #236] ; 0xec
800d9a0: 2200 movs r2, #0
800d9a2: f062 027d orn r2, r2, #125 ; 0x7d
800d9a6: f883 20ed strb.w r2, [r3, #237] ; 0xed
800d9aa: 2200 movs r2, #0
800d9ac: f042 0253 orr.w r2, r2, #83 ; 0x53
800d9b0: f883 20ee strb.w r2, [r3, #238] ; 0xee
800d9b4: 2200 movs r2, #0
800d9b6: f042 0263 orr.w r2, r2, #99 ; 0x63
800d9ba: 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);
800d9be: 697b ldr r3, [r7, #20]
800d9c0: f103 01f0 add.w r1, r3, #240 ; 0xf0
800d9c4: 2301 movs r3, #1
800d9c6: 2235 movs r2, #53 ; 0x35
800d9c8: 2000 movs r0, #0
800d9ca: f7ff fadb bl 800cf84 <dhcp_option>
800d9ce: 4603 mov r3, r0
800d9d0: 827b strh r3, [r7, #18]
options_out_len_loc = dhcp_option_byte(options_out_len_loc, msg_out->options, message_type);
800d9d2: 697b ldr r3, [r7, #20]
800d9d4: f103 01f0 add.w r1, r3, #240 ; 0xf0
800d9d8: 79fa ldrb r2, [r7, #7]
800d9da: 8a7b ldrh r3, [r7, #18]
800d9dc: 4618 mov r0, r3
800d9de: f7ff fb05 bl 800cfec <dhcp_option_byte>
800d9e2: 4603 mov r3, r0
800d9e4: 827b strh r3, [r7, #18]
if (options_out_len) {
800d9e6: 683b ldr r3, [r7, #0]
800d9e8: 2b00 cmp r3, #0
800d9ea: d002 beq.n 800d9f2 <dhcp_create_msg+0x18a>
*options_out_len = options_out_len_loc;
800d9ec: 683b ldr r3, [r7, #0]
800d9ee: 8a7a ldrh r2, [r7, #18]
800d9f0: 801a strh r2, [r3, #0]
}
return p_out;
800d9f2: 69bb ldr r3, [r7, #24]
}
800d9f4: 4618 mov r0, r3
800d9f6: 3720 adds r7, #32
800d9f8: 46bd mov sp, r7
800d9fa: bd80 pop {r7, pc}
800d9fc: 0801720c .word 0x0801720c
800da00: 0801752c .word 0x0801752c
800da04: 0801726c .word 0x0801726c
800da08: 0801754c .word 0x0801754c
800da0c: 0801756c .word 0x0801756c
800da10: 20008c90 .word 0x20008c90
0800da14 <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)
{
800da14: b580 push {r7, lr}
800da16: b084 sub sp, #16
800da18: af00 add r7, sp, #0
800da1a: 4603 mov r3, r0
800da1c: 60b9 str r1, [r7, #8]
800da1e: 607a str r2, [r7, #4]
800da20: 81fb strh r3, [r7, #14]
options[options_out_len++] = DHCP_OPTION_END;
800da22: 89fb ldrh r3, [r7, #14]
800da24: 1c5a adds r2, r3, #1
800da26: 81fa strh r2, [r7, #14]
800da28: 461a mov r2, r3
800da2a: 68bb ldr r3, [r7, #8]
800da2c: 4413 add r3, r2
800da2e: 22ff movs r2, #255 ; 0xff
800da30: 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)) &&
800da32: e007 b.n 800da44 <dhcp_option_trailer+0x30>
(options_out_len < DHCP_OPTIONS_LEN)) {
/* add a fill/padding byte */
options[options_out_len++] = 0;
800da34: 89fb ldrh r3, [r7, #14]
800da36: 1c5a adds r2, r3, #1
800da38: 81fa strh r2, [r7, #14]
800da3a: 461a mov r2, r3
800da3c: 68bb ldr r3, [r7, #8]
800da3e: 4413 add r3, r2
800da40: 2200 movs r2, #0
800da42: 701a strb r2, [r3, #0]
while (((options_out_len < DHCP_MIN_OPTIONS_LEN) || (options_out_len & 3)) &&
800da44: 89fb ldrh r3, [r7, #14]
800da46: 2b43 cmp r3, #67 ; 0x43
800da48: d904 bls.n 800da54 <dhcp_option_trailer+0x40>
800da4a: 89fb ldrh r3, [r7, #14]
800da4c: f003 0303 and.w r3, r3, #3
800da50: 2b00 cmp r3, #0
800da52: d002 beq.n 800da5a <dhcp_option_trailer+0x46>
800da54: 89fb ldrh r3, [r7, #14]
800da56: 2b43 cmp r3, #67 ; 0x43
800da58: d9ec bls.n 800da34 <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));
800da5a: 89fb ldrh r3, [r7, #14]
800da5c: 33f0 adds r3, #240 ; 0xf0
800da5e: b29b uxth r3, r3
800da60: 4619 mov r1, r3
800da62: 6878 ldr r0, [r7, #4]
800da64: f7f7 fe12 bl 800568c <pbuf_realloc>
}
800da68: bf00 nop
800da6a: 3710 adds r7, #16
800da6c: 46bd mov sp, r7
800da6e: bd80 pop {r7, pc}
0800da70 <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)
{
800da70: b480 push {r7}
800da72: b085 sub sp, #20
800da74: af00 add r7, sp, #0
800da76: 6078 str r0, [r7, #4]
if ((netif != NULL) && (netif_dhcp_data(netif) != NULL)) {
800da78: 687b ldr r3, [r7, #4]
800da7a: 2b00 cmp r3, #0
800da7c: d017 beq.n 800daae <dhcp_supplied_address+0x3e>
800da7e: 687b ldr r3, [r7, #4]
800da80: 6a5b ldr r3, [r3, #36] ; 0x24
800da82: 2b00 cmp r3, #0
800da84: d013 beq.n 800daae <dhcp_supplied_address+0x3e>
struct dhcp *dhcp = netif_dhcp_data(netif);
800da86: 687b ldr r3, [r7, #4]
800da88: 6a5b ldr r3, [r3, #36] ; 0x24
800da8a: 60fb str r3, [r7, #12]
return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) ||
800da8c: 68fb ldr r3, [r7, #12]
800da8e: 795b ldrb r3, [r3, #5]
800da90: 2b0a cmp r3, #10
800da92: d007 beq.n 800daa4 <dhcp_supplied_address+0x34>
800da94: 68fb ldr r3, [r7, #12]
800da96: 795b ldrb r3, [r3, #5]
800da98: 2b05 cmp r3, #5
800da9a: d003 beq.n 800daa4 <dhcp_supplied_address+0x34>
(dhcp->state == DHCP_STATE_REBINDING);
800da9c: 68fb ldr r3, [r7, #12]
800da9e: 795b ldrb r3, [r3, #5]
return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) ||
800daa0: 2b04 cmp r3, #4
800daa2: d101 bne.n 800daa8 <dhcp_supplied_address+0x38>
800daa4: 2301 movs r3, #1
800daa6: e000 b.n 800daaa <dhcp_supplied_address+0x3a>
800daa8: 2300 movs r3, #0
800daaa: b2db uxtb r3, r3
800daac: e000 b.n 800dab0 <dhcp_supplied_address+0x40>
}
return 0;
800daae: 2300 movs r3, #0
}
800dab0: 4618 mov r0, r3
800dab2: 3714 adds r7, #20
800dab4: 46bd mov sp, r7
800dab6: f85d 7b04 ldr.w r7, [sp], #4
800daba: 4770 bx lr
0800dabc <etharp_free_entry>:
#endif /* ARP_QUEUEING */
/** Clean up ARP table entries */
static void
etharp_free_entry(int i)
{
800dabc: b580 push {r7, lr}
800dabe: b082 sub sp, #8
800dac0: af00 add r7, sp, #0
800dac2: 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) {
800dac4: 4915 ldr r1, [pc, #84] ; (800db1c <etharp_free_entry+0x60>)
800dac6: 687a ldr r2, [r7, #4]
800dac8: 4613 mov r3, r2
800daca: 005b lsls r3, r3, #1
800dacc: 4413 add r3, r2
800dace: 00db lsls r3, r3, #3
800dad0: 440b add r3, r1
800dad2: 681b ldr r3, [r3, #0]
800dad4: 2b00 cmp r3, #0
800dad6: d013 beq.n 800db00 <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);
800dad8: 4910 ldr r1, [pc, #64] ; (800db1c <etharp_free_entry+0x60>)
800dada: 687a ldr r2, [r7, #4]
800dadc: 4613 mov r3, r2
800dade: 005b lsls r3, r3, #1
800dae0: 4413 add r3, r2
800dae2: 00db lsls r3, r3, #3
800dae4: 440b add r3, r1
800dae6: 681b ldr r3, [r3, #0]
800dae8: 4618 mov r0, r3
800daea: f7f7 ff55 bl 8005998 <pbuf_free>
arp_table[i].q = NULL;
800daee: 490b ldr r1, [pc, #44] ; (800db1c <etharp_free_entry+0x60>)
800daf0: 687a ldr r2, [r7, #4]
800daf2: 4613 mov r3, r2
800daf4: 005b lsls r3, r3, #1
800daf6: 4413 add r3, r2
800daf8: 00db lsls r3, r3, #3
800dafa: 440b add r3, r1
800dafc: 2200 movs r2, #0
800dafe: 601a str r2, [r3, #0]
}
/* recycle entry for re-use */
arp_table[i].state = ETHARP_STATE_EMPTY;
800db00: 4906 ldr r1, [pc, #24] ; (800db1c <etharp_free_entry+0x60>)
800db02: 687a ldr r2, [r7, #4]
800db04: 4613 mov r3, r2
800db06: 005b lsls r3, r3, #1
800db08: 4413 add r3, r2
800db0a: 00db lsls r3, r3, #3
800db0c: 440b add r3, r1
800db0e: 3314 adds r3, #20
800db10: 2200 movs r2, #0
800db12: 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 */
}
800db14: bf00 nop
800db16: 3708 adds r7, #8
800db18: 46bd mov sp, r7
800db1a: bd80 pop {r7, pc}
800db1c: 20008c94 .word 0x20008c94
0800db20 <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)
{
800db20: b580 push {r7, lr}
800db22: b082 sub sp, #8
800db24: 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) {
800db26: 2300 movs r3, #0
800db28: 607b str r3, [r7, #4]
800db2a: e096 b.n 800dc5a <etharp_tmr+0x13a>
u8_t state = arp_table[i].state;
800db2c: 494f ldr r1, [pc, #316] ; (800dc6c <etharp_tmr+0x14c>)
800db2e: 687a ldr r2, [r7, #4]
800db30: 4613 mov r3, r2
800db32: 005b lsls r3, r3, #1
800db34: 4413 add r3, r2
800db36: 00db lsls r3, r3, #3
800db38: 440b add r3, r1
800db3a: 3314 adds r3, #20
800db3c: 781b ldrb r3, [r3, #0]
800db3e: 70fb strb r3, [r7, #3]
if (state != ETHARP_STATE_EMPTY
800db40: 78fb ldrb r3, [r7, #3]
800db42: 2b00 cmp r3, #0
800db44: f000 8086 beq.w 800dc54 <etharp_tmr+0x134>
#if ETHARP_SUPPORT_STATIC_ENTRIES
&& (state != ETHARP_STATE_STATIC)
#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
) {
arp_table[i].ctime++;
800db48: 4948 ldr r1, [pc, #288] ; (800dc6c <etharp_tmr+0x14c>)
800db4a: 687a ldr r2, [r7, #4]
800db4c: 4613 mov r3, r2
800db4e: 005b lsls r3, r3, #1
800db50: 4413 add r3, r2
800db52: 00db lsls r3, r3, #3
800db54: 440b add r3, r1
800db56: 3312 adds r3, #18
800db58: 881b ldrh r3, [r3, #0]
800db5a: 3301 adds r3, #1
800db5c: b298 uxth r0, r3
800db5e: 4943 ldr r1, [pc, #268] ; (800dc6c <etharp_tmr+0x14c>)
800db60: 687a ldr r2, [r7, #4]
800db62: 4613 mov r3, r2
800db64: 005b lsls r3, r3, #1
800db66: 4413 add r3, r2
800db68: 00db lsls r3, r3, #3
800db6a: 440b add r3, r1
800db6c: 3312 adds r3, #18
800db6e: 4602 mov r2, r0
800db70: 801a strh r2, [r3, #0]
if ((arp_table[i].ctime >= ARP_MAXAGE) ||
800db72: 493e ldr r1, [pc, #248] ; (800dc6c <etharp_tmr+0x14c>)
800db74: 687a ldr r2, [r7, #4]
800db76: 4613 mov r3, r2
800db78: 005b lsls r3, r3, #1
800db7a: 4413 add r3, r2
800db7c: 00db lsls r3, r3, #3
800db7e: 440b add r3, r1
800db80: 3312 adds r3, #18
800db82: 881b ldrh r3, [r3, #0]
800db84: f5b3 7f96 cmp.w r3, #300 ; 0x12c
800db88: d215 bcs.n 800dbb6 <etharp_tmr+0x96>
((arp_table[i].state == ETHARP_STATE_PENDING) &&
800db8a: 4938 ldr r1, [pc, #224] ; (800dc6c <etharp_tmr+0x14c>)
800db8c: 687a ldr r2, [r7, #4]
800db8e: 4613 mov r3, r2
800db90: 005b lsls r3, r3, #1
800db92: 4413 add r3, r2
800db94: 00db lsls r3, r3, #3
800db96: 440b add r3, r1
800db98: 3314 adds r3, #20
800db9a: 781b ldrb r3, [r3, #0]
if ((arp_table[i].ctime >= ARP_MAXAGE) ||
800db9c: 2b01 cmp r3, #1
800db9e: d10e bne.n 800dbbe <etharp_tmr+0x9e>
(arp_table[i].ctime >= ARP_MAXPENDING))) {
800dba0: 4932 ldr r1, [pc, #200] ; (800dc6c <etharp_tmr+0x14c>)
800dba2: 687a ldr r2, [r7, #4]
800dba4: 4613 mov r3, r2
800dba6: 005b lsls r3, r3, #1
800dba8: 4413 add r3, r2
800dbaa: 00db lsls r3, r3, #3
800dbac: 440b add r3, r1
800dbae: 3312 adds r3, #18
800dbb0: 881b ldrh r3, [r3, #0]
((arp_table[i].state == ETHARP_STATE_PENDING) &&
800dbb2: 2b04 cmp r3, #4
800dbb4: d903 bls.n 800dbbe <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);
800dbb6: 6878 ldr r0, [r7, #4]
800dbb8: f7ff ff80 bl 800dabc <etharp_free_entry>
800dbbc: e04a b.n 800dc54 <etharp_tmr+0x134>
} else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_1) {
800dbbe: 492b ldr r1, [pc, #172] ; (800dc6c <etharp_tmr+0x14c>)
800dbc0: 687a ldr r2, [r7, #4]
800dbc2: 4613 mov r3, r2
800dbc4: 005b lsls r3, r3, #1
800dbc6: 4413 add r3, r2
800dbc8: 00db lsls r3, r3, #3
800dbca: 440b add r3, r1
800dbcc: 3314 adds r3, #20
800dbce: 781b ldrb r3, [r3, #0]
800dbd0: 2b03 cmp r3, #3
800dbd2: d10a bne.n 800dbea <etharp_tmr+0xca>
/* Don't send more than one request every 2 seconds. */
arp_table[i].state = ETHARP_STATE_STABLE_REREQUESTING_2;
800dbd4: 4925 ldr r1, [pc, #148] ; (800dc6c <etharp_tmr+0x14c>)
800dbd6: 687a ldr r2, [r7, #4]
800dbd8: 4613 mov r3, r2
800dbda: 005b lsls r3, r3, #1
800dbdc: 4413 add r3, r2
800dbde: 00db lsls r3, r3, #3
800dbe0: 440b add r3, r1
800dbe2: 3314 adds r3, #20
800dbe4: 2204 movs r2, #4
800dbe6: 701a strb r2, [r3, #0]
800dbe8: e034 b.n 800dc54 <etharp_tmr+0x134>
} else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_2) {
800dbea: 4920 ldr r1, [pc, #128] ; (800dc6c <etharp_tmr+0x14c>)
800dbec: 687a ldr r2, [r7, #4]
800dbee: 4613 mov r3, r2
800dbf0: 005b lsls r3, r3, #1
800dbf2: 4413 add r3, r2
800dbf4: 00db lsls r3, r3, #3
800dbf6: 440b add r3, r1
800dbf8: 3314 adds r3, #20
800dbfa: 781b ldrb r3, [r3, #0]
800dbfc: 2b04 cmp r3, #4
800dbfe: d10a bne.n 800dc16 <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;
800dc00: 491a ldr r1, [pc, #104] ; (800dc6c <etharp_tmr+0x14c>)
800dc02: 687a ldr r2, [r7, #4]
800dc04: 4613 mov r3, r2
800dc06: 005b lsls r3, r3, #1
800dc08: 4413 add r3, r2
800dc0a: 00db lsls r3, r3, #3
800dc0c: 440b add r3, r1
800dc0e: 3314 adds r3, #20
800dc10: 2202 movs r2, #2
800dc12: 701a strb r2, [r3, #0]
800dc14: e01e b.n 800dc54 <etharp_tmr+0x134>
} else if (arp_table[i].state == ETHARP_STATE_PENDING) {
800dc16: 4915 ldr r1, [pc, #84] ; (800dc6c <etharp_tmr+0x14c>)
800dc18: 687a ldr r2, [r7, #4]
800dc1a: 4613 mov r3, r2
800dc1c: 005b lsls r3, r3, #1
800dc1e: 4413 add r3, r2
800dc20: 00db lsls r3, r3, #3
800dc22: 440b add r3, r1
800dc24: 3314 adds r3, #20
800dc26: 781b ldrb r3, [r3, #0]
800dc28: 2b01 cmp r3, #1
800dc2a: d113 bne.n 800dc54 <etharp_tmr+0x134>
/* still pending, resend an ARP query */
etharp_request(arp_table[i].netif, &arp_table[i].ipaddr);
800dc2c: 490f ldr r1, [pc, #60] ; (800dc6c <etharp_tmr+0x14c>)
800dc2e: 687a ldr r2, [r7, #4]
800dc30: 4613 mov r3, r2
800dc32: 005b lsls r3, r3, #1
800dc34: 4413 add r3, r2
800dc36: 00db lsls r3, r3, #3
800dc38: 440b add r3, r1
800dc3a: 3308 adds r3, #8
800dc3c: 6818 ldr r0, [r3, #0]
800dc3e: 687a ldr r2, [r7, #4]
800dc40: 4613 mov r3, r2
800dc42: 005b lsls r3, r3, #1
800dc44: 4413 add r3, r2
800dc46: 00db lsls r3, r3, #3
800dc48: 4a08 ldr r2, [pc, #32] ; (800dc6c <etharp_tmr+0x14c>)
800dc4a: 4413 add r3, r2
800dc4c: 3304 adds r3, #4
800dc4e: 4619 mov r1, r3
800dc50: f000 fe72 bl 800e938 <etharp_request>
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
800dc54: 687b ldr r3, [r7, #4]
800dc56: 3301 adds r3, #1
800dc58: 607b str r3, [r7, #4]
800dc5a: 687b ldr r3, [r7, #4]
800dc5c: 2b09 cmp r3, #9
800dc5e: f77f af65 ble.w 800db2c <etharp_tmr+0xc>
}
}
}
}
800dc62: bf00 nop
800dc64: bf00 nop
800dc66: 3708 adds r7, #8
800dc68: 46bd mov sp, r7
800dc6a: bd80 pop {r7, pc}
800dc6c: 20008c94 .word 0x20008c94
0800dc70 <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)
{
800dc70: b580 push {r7, lr}
800dc72: b08a sub sp, #40 ; 0x28
800dc74: af00 add r7, sp, #0
800dc76: 60f8 str r0, [r7, #12]
800dc78: 460b mov r3, r1
800dc7a: 607a str r2, [r7, #4]
800dc7c: 72fb strb r3, [r7, #11]
s16_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE;
800dc7e: 230a movs r3, #10
800dc80: 84fb strh r3, [r7, #38] ; 0x26
800dc82: 230a movs r3, #10
800dc84: 84bb strh r3, [r7, #36] ; 0x24
s16_t empty = ARP_TABLE_SIZE;
800dc86: 230a movs r3, #10
800dc88: 847b strh r3, [r7, #34] ; 0x22
s16_t i = 0;
800dc8a: 2300 movs r3, #0
800dc8c: 843b strh r3, [r7, #32]
/* oldest entry with packets on queue */
s16_t old_queue = ARP_TABLE_SIZE;
800dc8e: 230a movs r3, #10
800dc90: 83fb strh r3, [r7, #30]
/* its age */
u16_t age_queue = 0, age_pending = 0, age_stable = 0;
800dc92: 2300 movs r3, #0
800dc94: 83bb strh r3, [r7, #28]
800dc96: 2300 movs r3, #0
800dc98: 837b strh r3, [r7, #26]
800dc9a: 2300 movs r3, #0
800dc9c: 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) {
800dc9e: 2300 movs r3, #0
800dca0: 843b strh r3, [r7, #32]
800dca2: e0ae b.n 800de02 <etharp_find_entry+0x192>
u8_t state = arp_table[i].state;
800dca4: f9b7 2020 ldrsh.w r2, [r7, #32]
800dca8: 49a6 ldr r1, [pc, #664] ; (800df44 <etharp_find_entry+0x2d4>)
800dcaa: 4613 mov r3, r2
800dcac: 005b lsls r3, r3, #1
800dcae: 4413 add r3, r2
800dcb0: 00db lsls r3, r3, #3
800dcb2: 440b add r3, r1
800dcb4: 3314 adds r3, #20
800dcb6: 781b ldrb r3, [r3, #0]
800dcb8: 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)) {
800dcba: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22
800dcbe: 2b0a cmp r3, #10
800dcc0: d105 bne.n 800dcce <etharp_find_entry+0x5e>
800dcc2: 7dfb ldrb r3, [r7, #23]
800dcc4: 2b00 cmp r3, #0
800dcc6: d102 bne.n 800dcce <etharp_find_entry+0x5e>
LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %d\n", (int)i));
/* remember first empty entry */
empty = i;
800dcc8: 8c3b ldrh r3, [r7, #32]
800dcca: 847b strh r3, [r7, #34] ; 0x22
800dccc: e095 b.n 800ddfa <etharp_find_entry+0x18a>
} else if (state != ETHARP_STATE_EMPTY) {
800dcce: 7dfb ldrb r3, [r7, #23]
800dcd0: 2b00 cmp r3, #0
800dcd2: f000 8092 beq.w 800ddfa <etharp_find_entry+0x18a>
LWIP_ASSERT("state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE",
800dcd6: 7dfb ldrb r3, [r7, #23]
800dcd8: 2b01 cmp r3, #1
800dcda: d009 beq.n 800dcf0 <etharp_find_entry+0x80>
800dcdc: 7dfb ldrb r3, [r7, #23]
800dcde: 2b01 cmp r3, #1
800dce0: d806 bhi.n 800dcf0 <etharp_find_entry+0x80>
800dce2: 4b99 ldr r3, [pc, #612] ; (800df48 <etharp_find_entry+0x2d8>)
800dce4: f240 1223 movw r2, #291 ; 0x123
800dce8: 4998 ldr r1, [pc, #608] ; (800df4c <etharp_find_entry+0x2dc>)
800dcea: 4899 ldr r0, [pc, #612] ; (800df50 <etharp_find_entry+0x2e0>)
800dcec: f002 fb70 bl 80103d0 <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)
800dcf0: 68fb ldr r3, [r7, #12]
800dcf2: 2b00 cmp r3, #0
800dcf4: d020 beq.n 800dd38 <etharp_find_entry+0xc8>
800dcf6: 68fb ldr r3, [r7, #12]
800dcf8: 6819 ldr r1, [r3, #0]
800dcfa: f9b7 2020 ldrsh.w r2, [r7, #32]
800dcfe: 4891 ldr r0, [pc, #580] ; (800df44 <etharp_find_entry+0x2d4>)
800dd00: 4613 mov r3, r2
800dd02: 005b lsls r3, r3, #1
800dd04: 4413 add r3, r2
800dd06: 00db lsls r3, r3, #3
800dd08: 4403 add r3, r0
800dd0a: 3304 adds r3, #4
800dd0c: 681b ldr r3, [r3, #0]
800dd0e: 4299 cmp r1, r3
800dd10: d112 bne.n 800dd38 <etharp_find_entry+0xc8>
#if ETHARP_TABLE_MATCH_NETIF
&& ((netif == NULL) || (netif == arp_table[i].netif))
800dd12: 687b ldr r3, [r7, #4]
800dd14: 2b00 cmp r3, #0
800dd16: d00c beq.n 800dd32 <etharp_find_entry+0xc2>
800dd18: f9b7 2020 ldrsh.w r2, [r7, #32]
800dd1c: 4989 ldr r1, [pc, #548] ; (800df44 <etharp_find_entry+0x2d4>)
800dd1e: 4613 mov r3, r2
800dd20: 005b lsls r3, r3, #1
800dd22: 4413 add r3, r2
800dd24: 00db lsls r3, r3, #3
800dd26: 440b add r3, r1
800dd28: 3308 adds r3, #8
800dd2a: 681b ldr r3, [r3, #0]
800dd2c: 687a ldr r2, [r7, #4]
800dd2e: 429a cmp r2, r3
800dd30: d102 bne.n 800dd38 <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;
800dd32: f9b7 3020 ldrsh.w r3, [r7, #32]
800dd36: e100 b.n 800df3a <etharp_find_entry+0x2ca>
}
/* pending entry? */
if (state == ETHARP_STATE_PENDING) {
800dd38: 7dfb ldrb r3, [r7, #23]
800dd3a: 2b01 cmp r3, #1
800dd3c: d140 bne.n 800ddc0 <etharp_find_entry+0x150>
/* pending with queued packets? */
if (arp_table[i].q != NULL) {
800dd3e: f9b7 2020 ldrsh.w r2, [r7, #32]
800dd42: 4980 ldr r1, [pc, #512] ; (800df44 <etharp_find_entry+0x2d4>)
800dd44: 4613 mov r3, r2
800dd46: 005b lsls r3, r3, #1
800dd48: 4413 add r3, r2
800dd4a: 00db lsls r3, r3, #3
800dd4c: 440b add r3, r1
800dd4e: 681b ldr r3, [r3, #0]
800dd50: 2b00 cmp r3, #0
800dd52: d01a beq.n 800dd8a <etharp_find_entry+0x11a>
if (arp_table[i].ctime >= age_queue) {
800dd54: f9b7 2020 ldrsh.w r2, [r7, #32]
800dd58: 497a ldr r1, [pc, #488] ; (800df44 <etharp_find_entry+0x2d4>)
800dd5a: 4613 mov r3, r2
800dd5c: 005b lsls r3, r3, #1
800dd5e: 4413 add r3, r2
800dd60: 00db lsls r3, r3, #3
800dd62: 440b add r3, r1
800dd64: 3312 adds r3, #18
800dd66: 881b ldrh r3, [r3, #0]
800dd68: 8bba ldrh r2, [r7, #28]
800dd6a: 429a cmp r2, r3
800dd6c: d845 bhi.n 800ddfa <etharp_find_entry+0x18a>
old_queue = i;
800dd6e: 8c3b ldrh r3, [r7, #32]
800dd70: 83fb strh r3, [r7, #30]
age_queue = arp_table[i].ctime;
800dd72: f9b7 2020 ldrsh.w r2, [r7, #32]
800dd76: 4973 ldr r1, [pc, #460] ; (800df44 <etharp_find_entry+0x2d4>)
800dd78: 4613 mov r3, r2
800dd7a: 005b lsls r3, r3, #1
800dd7c: 4413 add r3, r2
800dd7e: 00db lsls r3, r3, #3
800dd80: 440b add r3, r1
800dd82: 3312 adds r3, #18
800dd84: 881b ldrh r3, [r3, #0]
800dd86: 83bb strh r3, [r7, #28]
800dd88: e037 b.n 800ddfa <etharp_find_entry+0x18a>
}
} else
/* pending without queued packets? */
{
if (arp_table[i].ctime >= age_pending) {
800dd8a: f9b7 2020 ldrsh.w r2, [r7, #32]
800dd8e: 496d ldr r1, [pc, #436] ; (800df44 <etharp_find_entry+0x2d4>)
800dd90: 4613 mov r3, r2
800dd92: 005b lsls r3, r3, #1
800dd94: 4413 add r3, r2
800dd96: 00db lsls r3, r3, #3
800dd98: 440b add r3, r1
800dd9a: 3312 adds r3, #18
800dd9c: 881b ldrh r3, [r3, #0]
800dd9e: 8b7a ldrh r2, [r7, #26]
800dda0: 429a cmp r2, r3
800dda2: d82a bhi.n 800ddfa <etharp_find_entry+0x18a>
old_pending = i;
800dda4: 8c3b ldrh r3, [r7, #32]
800dda6: 84fb strh r3, [r7, #38] ; 0x26
age_pending = arp_table[i].ctime;
800dda8: f9b7 2020 ldrsh.w r2, [r7, #32]
800ddac: 4965 ldr r1, [pc, #404] ; (800df44 <etharp_find_entry+0x2d4>)
800ddae: 4613 mov r3, r2
800ddb0: 005b lsls r3, r3, #1
800ddb2: 4413 add r3, r2
800ddb4: 00db lsls r3, r3, #3
800ddb6: 440b add r3, r1
800ddb8: 3312 adds r3, #18
800ddba: 881b ldrh r3, [r3, #0]
800ddbc: 837b strh r3, [r7, #26]
800ddbe: e01c b.n 800ddfa <etharp_find_entry+0x18a>
}
}
/* stable entry? */
} else if (state >= ETHARP_STATE_STABLE) {
800ddc0: 7dfb ldrb r3, [r7, #23]
800ddc2: 2b01 cmp r3, #1
800ddc4: d919 bls.n 800ddfa <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) {
800ddc6: f9b7 2020 ldrsh.w r2, [r7, #32]
800ddca: 495e ldr r1, [pc, #376] ; (800df44 <etharp_find_entry+0x2d4>)
800ddcc: 4613 mov r3, r2
800ddce: 005b lsls r3, r3, #1
800ddd0: 4413 add r3, r2
800ddd2: 00db lsls r3, r3, #3
800ddd4: 440b add r3, r1
800ddd6: 3312 adds r3, #18
800ddd8: 881b ldrh r3, [r3, #0]
800ddda: 8b3a ldrh r2, [r7, #24]
800dddc: 429a cmp r2, r3
800ddde: d80c bhi.n 800ddfa <etharp_find_entry+0x18a>
old_stable = i;
800dde0: 8c3b ldrh r3, [r7, #32]
800dde2: 84bb strh r3, [r7, #36] ; 0x24
age_stable = arp_table[i].ctime;
800dde4: f9b7 2020 ldrsh.w r2, [r7, #32]
800dde8: 4956 ldr r1, [pc, #344] ; (800df44 <etharp_find_entry+0x2d4>)
800ddea: 4613 mov r3, r2
800ddec: 005b lsls r3, r3, #1
800ddee: 4413 add r3, r2
800ddf0: 00db lsls r3, r3, #3
800ddf2: 440b add r3, r1
800ddf4: 3312 adds r3, #18
800ddf6: 881b ldrh r3, [r3, #0]
800ddf8: 833b strh r3, [r7, #24]
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
800ddfa: 8c3b ldrh r3, [r7, #32]
800ddfc: 3301 adds r3, #1
800ddfe: b29b uxth r3, r3
800de00: 843b strh r3, [r7, #32]
800de02: f9b7 3020 ldrsh.w r3, [r7, #32]
800de06: 2b09 cmp r3, #9
800de08: f77f af4c ble.w 800dca4 <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) ||
800de0c: 7afb ldrb r3, [r7, #11]
800de0e: f003 0302 and.w r3, r3, #2
800de12: 2b00 cmp r3, #0
800de14: d108 bne.n 800de28 <etharp_find_entry+0x1b8>
800de16: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22
800de1a: 2b0a cmp r3, #10
800de1c: d107 bne.n 800de2e <etharp_find_entry+0x1be>
/* or no empty entry found and not allowed to recycle? */
((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) {
800de1e: 7afb ldrb r3, [r7, #11]
800de20: f003 0301 and.w r3, r3, #1
800de24: 2b00 cmp r3, #0
800de26: d102 bne.n 800de2e <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;
800de28: f04f 33ff mov.w r3, #4294967295
800de2c: e085 b.n 800df3a <etharp_find_entry+0x2ca>
*
* { ETHARP_FLAG_TRY_HARD is set at this point }
*/
/* 1) empty entry available? */
if (empty < ARP_TABLE_SIZE) {
800de2e: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22
800de32: 2b09 cmp r3, #9
800de34: dc02 bgt.n 800de3c <etharp_find_entry+0x1cc>
i = empty;
800de36: 8c7b ldrh r3, [r7, #34] ; 0x22
800de38: 843b strh r3, [r7, #32]
800de3a: e039 b.n 800deb0 <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) {
800de3c: f9b7 3024 ldrsh.w r3, [r7, #36] ; 0x24
800de40: 2b09 cmp r3, #9
800de42: dc14 bgt.n 800de6e <etharp_find_entry+0x1fe>
/* recycle oldest stable*/
i = old_stable;
800de44: 8cbb ldrh r3, [r7, #36] ; 0x24
800de46: 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);
800de48: f9b7 2020 ldrsh.w r2, [r7, #32]
800de4c: 493d ldr r1, [pc, #244] ; (800df44 <etharp_find_entry+0x2d4>)
800de4e: 4613 mov r3, r2
800de50: 005b lsls r3, r3, #1
800de52: 4413 add r3, r2
800de54: 00db lsls r3, r3, #3
800de56: 440b add r3, r1
800de58: 681b ldr r3, [r3, #0]
800de5a: 2b00 cmp r3, #0
800de5c: d018 beq.n 800de90 <etharp_find_entry+0x220>
800de5e: 4b3a ldr r3, [pc, #232] ; (800df48 <etharp_find_entry+0x2d8>)
800de60: f240 126d movw r2, #365 ; 0x16d
800de64: 493b ldr r1, [pc, #236] ; (800df54 <etharp_find_entry+0x2e4>)
800de66: 483a ldr r0, [pc, #232] ; (800df50 <etharp_find_entry+0x2e0>)
800de68: f002 fab2 bl 80103d0 <printf>
800de6c: e010 b.n 800de90 <etharp_find_entry+0x220>
/* 3) found recyclable pending entry without queued packets? */
} else if (old_pending < ARP_TABLE_SIZE) {
800de6e: f9b7 3026 ldrsh.w r3, [r7, #38] ; 0x26
800de72: 2b09 cmp r3, #9
800de74: dc02 bgt.n 800de7c <etharp_find_entry+0x20c>
/* recycle oldest pending */
i = old_pending;
800de76: 8cfb ldrh r3, [r7, #38] ; 0x26
800de78: 843b strh r3, [r7, #32]
800de7a: e009 b.n 800de90 <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) {
800de7c: f9b7 301e ldrsh.w r3, [r7, #30]
800de80: 2b09 cmp r3, #9
800de82: dc02 bgt.n 800de8a <etharp_find_entry+0x21a>
/* recycle oldest pending (queued packets are free in etharp_free_entry) */
i = old_queue;
800de84: 8bfb ldrh r3, [r7, #30]
800de86: 843b strh r3, [r7, #32]
800de88: e002 b.n 800de90 <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;
800de8a: f04f 33ff mov.w r3, #4294967295
800de8e: e054 b.n 800df3a <etharp_find_entry+0x2ca>
}
/* { empty or recyclable entry found } */
LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE);
800de90: f9b7 3020 ldrsh.w r3, [r7, #32]
800de94: 2b09 cmp r3, #9
800de96: dd06 ble.n 800dea6 <etharp_find_entry+0x236>
800de98: 4b2b ldr r3, [pc, #172] ; (800df48 <etharp_find_entry+0x2d8>)
800de9a: f240 127f movw r2, #383 ; 0x17f
800de9e: 492e ldr r1, [pc, #184] ; (800df58 <etharp_find_entry+0x2e8>)
800dea0: 482b ldr r0, [pc, #172] ; (800df50 <etharp_find_entry+0x2e0>)
800dea2: f002 fa95 bl 80103d0 <printf>
etharp_free_entry(i);
800dea6: f9b7 3020 ldrsh.w r3, [r7, #32]
800deaa: 4618 mov r0, r3
800deac: f7ff fe06 bl 800dabc <etharp_free_entry>
}
LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE);
800deb0: f9b7 3020 ldrsh.w r3, [r7, #32]
800deb4: 2b09 cmp r3, #9
800deb6: dd06 ble.n 800dec6 <etharp_find_entry+0x256>
800deb8: 4b23 ldr r3, [pc, #140] ; (800df48 <etharp_find_entry+0x2d8>)
800deba: f240 1283 movw r2, #387 ; 0x183
800debe: 4926 ldr r1, [pc, #152] ; (800df58 <etharp_find_entry+0x2e8>)
800dec0: 4823 ldr r0, [pc, #140] ; (800df50 <etharp_find_entry+0x2e0>)
800dec2: f002 fa85 bl 80103d0 <printf>
LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY",
800dec6: f9b7 2020 ldrsh.w r2, [r7, #32]
800deca: 491e ldr r1, [pc, #120] ; (800df44 <etharp_find_entry+0x2d4>)
800decc: 4613 mov r3, r2
800dece: 005b lsls r3, r3, #1
800ded0: 4413 add r3, r2
800ded2: 00db lsls r3, r3, #3
800ded4: 440b add r3, r1
800ded6: 3314 adds r3, #20
800ded8: 781b ldrb r3, [r3, #0]
800deda: 2b00 cmp r3, #0
800dedc: d006 beq.n 800deec <etharp_find_entry+0x27c>
800dede: 4b1a ldr r3, [pc, #104] ; (800df48 <etharp_find_entry+0x2d8>)
800dee0: f44f 72c2 mov.w r2, #388 ; 0x184
800dee4: 491d ldr r1, [pc, #116] ; (800df5c <etharp_find_entry+0x2ec>)
800dee6: 481a ldr r0, [pc, #104] ; (800df50 <etharp_find_entry+0x2e0>)
800dee8: f002 fa72 bl 80103d0 <printf>
arp_table[i].state == ETHARP_STATE_EMPTY);
/* IP address given? */
if (ipaddr != NULL) {
800deec: 68fb ldr r3, [r7, #12]
800deee: 2b00 cmp r3, #0
800def0: d00b beq.n 800df0a <etharp_find_entry+0x29a>
/* set IP address */
ip4_addr_copy(arp_table[i].ipaddr, *ipaddr);
800def2: f9b7 2020 ldrsh.w r2, [r7, #32]
800def6: 68fb ldr r3, [r7, #12]
800def8: 6819 ldr r1, [r3, #0]
800defa: 4812 ldr r0, [pc, #72] ; (800df44 <etharp_find_entry+0x2d4>)
800defc: 4613 mov r3, r2
800defe: 005b lsls r3, r3, #1
800df00: 4413 add r3, r2
800df02: 00db lsls r3, r3, #3
800df04: 4403 add r3, r0
800df06: 3304 adds r3, #4
800df08: 6019 str r1, [r3, #0]
}
arp_table[i].ctime = 0;
800df0a: f9b7 2020 ldrsh.w r2, [r7, #32]
800df0e: 490d ldr r1, [pc, #52] ; (800df44 <etharp_find_entry+0x2d4>)
800df10: 4613 mov r3, r2
800df12: 005b lsls r3, r3, #1
800df14: 4413 add r3, r2
800df16: 00db lsls r3, r3, #3
800df18: 440b add r3, r1
800df1a: 3312 adds r3, #18
800df1c: 2200 movs r2, #0
800df1e: 801a strh r2, [r3, #0]
#if ETHARP_TABLE_MATCH_NETIF
arp_table[i].netif = netif;
800df20: f9b7 2020 ldrsh.w r2, [r7, #32]
800df24: 4907 ldr r1, [pc, #28] ; (800df44 <etharp_find_entry+0x2d4>)
800df26: 4613 mov r3, r2
800df28: 005b lsls r3, r3, #1
800df2a: 4413 add r3, r2
800df2c: 00db lsls r3, r3, #3
800df2e: 440b add r3, r1
800df30: 3308 adds r3, #8
800df32: 687a ldr r2, [r7, #4]
800df34: 601a str r2, [r3, #0]
#endif /* ETHARP_TABLE_MATCH_NETIF */
return (s16_t)i;
800df36: f9b7 3020 ldrsh.w r3, [r7, #32]
}
800df3a: 4618 mov r0, r3
800df3c: 3728 adds r7, #40 ; 0x28
800df3e: 46bd mov sp, r7
800df40: bd80 pop {r7, pc}
800df42: bf00 nop
800df44: 20008c94 .word 0x20008c94
800df48: 080175ac .word 0x080175ac
800df4c: 080175e4 .word 0x080175e4
800df50: 08017624 .word 0x08017624
800df54: 0801764c .word 0x0801764c
800df58: 08017664 .word 0x08017664
800df5c: 08017678 .word 0x08017678
0800df60 <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)
{
800df60: b580 push {r7, lr}
800df62: b088 sub sp, #32
800df64: af02 add r7, sp, #8
800df66: 60f8 str r0, [r7, #12]
800df68: 60b9 str r1, [r7, #8]
800df6a: 607a str r2, [r7, #4]
800df6c: 70fb strb r3, [r7, #3]
s16_t i;
LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN);
800df6e: 68fb ldr r3, [r7, #12]
800df70: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
800df74: 2b06 cmp r3, #6
800df76: d006 beq.n 800df86 <etharp_update_arp_entry+0x26>
800df78: 4b48 ldr r3, [pc, #288] ; (800e09c <etharp_update_arp_entry+0x13c>)
800df7a: f240 12a9 movw r2, #425 ; 0x1a9
800df7e: 4948 ldr r1, [pc, #288] ; (800e0a0 <etharp_update_arp_entry+0x140>)
800df80: 4848 ldr r0, [pc, #288] ; (800e0a4 <etharp_update_arp_entry+0x144>)
800df82: f002 fa25 bl 80103d0 <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) ||
800df86: 68bb ldr r3, [r7, #8]
800df88: 2b00 cmp r3, #0
800df8a: d012 beq.n 800dfb2 <etharp_update_arp_entry+0x52>
800df8c: 68bb ldr r3, [r7, #8]
800df8e: 681b ldr r3, [r3, #0]
800df90: 2b00 cmp r3, #0
800df92: d00e beq.n 800dfb2 <etharp_update_arp_entry+0x52>
ip4_addr_isbroadcast(ipaddr, netif) ||
800df94: 68bb ldr r3, [r7, #8]
800df96: 681b ldr r3, [r3, #0]
800df98: 68f9 ldr r1, [r7, #12]
800df9a: 4618 mov r0, r3
800df9c: f001 f920 bl 800f1e0 <ip4_addr_isbroadcast_u32>
800dfa0: 4603 mov r3, r0
if (ip4_addr_isany(ipaddr) ||
800dfa2: 2b00 cmp r3, #0
800dfa4: d105 bne.n 800dfb2 <etharp_update_arp_entry+0x52>
ip4_addr_ismulticast(ipaddr)) {
800dfa6: 68bb ldr r3, [r7, #8]
800dfa8: 681b ldr r3, [r3, #0]
800dfaa: f003 03f0 and.w r3, r3, #240 ; 0xf0
ip4_addr_isbroadcast(ipaddr, netif) ||
800dfae: 2be0 cmp r3, #224 ; 0xe0
800dfb0: d102 bne.n 800dfb8 <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;
800dfb2: f06f 030f mvn.w r3, #15
800dfb6: e06c b.n 800e092 <etharp_update_arp_entry+0x132>
}
/* find or create ARP entry */
i = etharp_find_entry(ipaddr, flags, netif);
800dfb8: 78fb ldrb r3, [r7, #3]
800dfba: 68fa ldr r2, [r7, #12]
800dfbc: 4619 mov r1, r3
800dfbe: 68b8 ldr r0, [r7, #8]
800dfc0: f7ff fe56 bl 800dc70 <etharp_find_entry>
800dfc4: 4603 mov r3, r0
800dfc6: 82fb strh r3, [r7, #22]
/* bail out if no entry could be found */
if (i < 0) {
800dfc8: f9b7 3016 ldrsh.w r3, [r7, #22]
800dfcc: 2b00 cmp r3, #0
800dfce: da02 bge.n 800dfd6 <etharp_update_arp_entry+0x76>
return (err_t)i;
800dfd0: 8afb ldrh r3, [r7, #22]
800dfd2: b25b sxtb r3, r3
800dfd4: e05d b.n 800e092 <etharp_update_arp_entry+0x132>
return ERR_VAL;
} else
#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
{
/* mark it stable */
arp_table[i].state = ETHARP_STATE_STABLE;
800dfd6: f9b7 2016 ldrsh.w r2, [r7, #22]
800dfda: 4933 ldr r1, [pc, #204] ; (800e0a8 <etharp_update_arp_entry+0x148>)
800dfdc: 4613 mov r3, r2
800dfde: 005b lsls r3, r3, #1
800dfe0: 4413 add r3, r2
800dfe2: 00db lsls r3, r3, #3
800dfe4: 440b add r3, r1
800dfe6: 3314 adds r3, #20
800dfe8: 2202 movs r2, #2
800dfea: 701a strb r2, [r3, #0]
}
/* record network interface */
arp_table[i].netif = netif;
800dfec: f9b7 2016 ldrsh.w r2, [r7, #22]
800dff0: 492d ldr r1, [pc, #180] ; (800e0a8 <etharp_update_arp_entry+0x148>)
800dff2: 4613 mov r3, r2
800dff4: 005b lsls r3, r3, #1
800dff6: 4413 add r3, r2
800dff8: 00db lsls r3, r3, #3
800dffa: 440b add r3, r1
800dffc: 3308 adds r3, #8
800dffe: 68fa ldr r2, [r7, #12]
800e000: 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);
800e002: f9b7 2016 ldrsh.w r2, [r7, #22]
800e006: 4613 mov r3, r2
800e008: 005b lsls r3, r3, #1
800e00a: 4413 add r3, r2
800e00c: 00db lsls r3, r3, #3
800e00e: 3308 adds r3, #8
800e010: 4a25 ldr r2, [pc, #148] ; (800e0a8 <etharp_update_arp_entry+0x148>)
800e012: 4413 add r3, r2
800e014: 3304 adds r3, #4
800e016: 2206 movs r2, #6
800e018: 6879 ldr r1, [r7, #4]
800e01a: 4618 mov r0, r3
800e01c: f002 f9a8 bl 8010370 <memcpy>
/* reset time stamp */
arp_table[i].ctime = 0;
800e020: f9b7 2016 ldrsh.w r2, [r7, #22]
800e024: 4920 ldr r1, [pc, #128] ; (800e0a8 <etharp_update_arp_entry+0x148>)
800e026: 4613 mov r3, r2
800e028: 005b lsls r3, r3, #1
800e02a: 4413 add r3, r2
800e02c: 00db lsls r3, r3, #3
800e02e: 440b add r3, r1
800e030: 3312 adds r3, #18
800e032: 2200 movs r2, #0
800e034: 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) {
800e036: f9b7 2016 ldrsh.w r2, [r7, #22]
800e03a: 491b ldr r1, [pc, #108] ; (800e0a8 <etharp_update_arp_entry+0x148>)
800e03c: 4613 mov r3, r2
800e03e: 005b lsls r3, r3, #1
800e040: 4413 add r3, r2
800e042: 00db lsls r3, r3, #3
800e044: 440b add r3, r1
800e046: 681b ldr r3, [r3, #0]
800e048: 2b00 cmp r3, #0
800e04a: d021 beq.n 800e090 <etharp_update_arp_entry+0x130>
struct pbuf *p = arp_table[i].q;
800e04c: f9b7 2016 ldrsh.w r2, [r7, #22]
800e050: 4915 ldr r1, [pc, #84] ; (800e0a8 <etharp_update_arp_entry+0x148>)
800e052: 4613 mov r3, r2
800e054: 005b lsls r3, r3, #1
800e056: 4413 add r3, r2
800e058: 00db lsls r3, r3, #3
800e05a: 440b add r3, r1
800e05c: 681b ldr r3, [r3, #0]
800e05e: 613b str r3, [r7, #16]
arp_table[i].q = NULL;
800e060: f9b7 2016 ldrsh.w r2, [r7, #22]
800e064: 4910 ldr r1, [pc, #64] ; (800e0a8 <etharp_update_arp_entry+0x148>)
800e066: 4613 mov r3, r2
800e068: 005b lsls r3, r3, #1
800e06a: 4413 add r3, r2
800e06c: 00db lsls r3, r3, #3
800e06e: 440b add r3, r1
800e070: 2200 movs r2, #0
800e072: 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);
800e074: 68fb ldr r3, [r7, #12]
800e076: f103 022a add.w r2, r3, #42 ; 0x2a
800e07a: f44f 6300 mov.w r3, #2048 ; 0x800
800e07e: 9300 str r3, [sp, #0]
800e080: 687b ldr r3, [r7, #4]
800e082: 6939 ldr r1, [r7, #16]
800e084: 68f8 ldr r0, [r7, #12]
800e086: f002 f8f7 bl 8010278 <ethernet_output>
/* free the queued IP packet */
pbuf_free(p);
800e08a: 6938 ldr r0, [r7, #16]
800e08c: f7f7 fc84 bl 8005998 <pbuf_free>
}
return ERR_OK;
800e090: 2300 movs r3, #0
}
800e092: 4618 mov r0, r3
800e094: 3718 adds r7, #24
800e096: 46bd mov sp, r7
800e098: bd80 pop {r7, pc}
800e09a: bf00 nop
800e09c: 080175ac .word 0x080175ac
800e0a0: 080176a4 .word 0x080176a4
800e0a4: 08017624 .word 0x08017624
800e0a8: 20008c94 .word 0x20008c94
0800e0ac <etharp_cleanup_netif>:
*
* @param netif points to a network interface
*/
void
etharp_cleanup_netif(struct netif *netif)
{
800e0ac: b580 push {r7, lr}
800e0ae: b084 sub sp, #16
800e0b0: af00 add r7, sp, #0
800e0b2: 6078 str r0, [r7, #4]
int i;
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
800e0b4: 2300 movs r3, #0
800e0b6: 60fb str r3, [r7, #12]
800e0b8: e01e b.n 800e0f8 <etharp_cleanup_netif+0x4c>
u8_t state = arp_table[i].state;
800e0ba: 4913 ldr r1, [pc, #76] ; (800e108 <etharp_cleanup_netif+0x5c>)
800e0bc: 68fa ldr r2, [r7, #12]
800e0be: 4613 mov r3, r2
800e0c0: 005b lsls r3, r3, #1
800e0c2: 4413 add r3, r2
800e0c4: 00db lsls r3, r3, #3
800e0c6: 440b add r3, r1
800e0c8: 3314 adds r3, #20
800e0ca: 781b ldrb r3, [r3, #0]
800e0cc: 72fb strb r3, [r7, #11]
if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) {
800e0ce: 7afb ldrb r3, [r7, #11]
800e0d0: 2b00 cmp r3, #0
800e0d2: d00e beq.n 800e0f2 <etharp_cleanup_netif+0x46>
800e0d4: 490c ldr r1, [pc, #48] ; (800e108 <etharp_cleanup_netif+0x5c>)
800e0d6: 68fa ldr r2, [r7, #12]
800e0d8: 4613 mov r3, r2
800e0da: 005b lsls r3, r3, #1
800e0dc: 4413 add r3, r2
800e0de: 00db lsls r3, r3, #3
800e0e0: 440b add r3, r1
800e0e2: 3308 adds r3, #8
800e0e4: 681b ldr r3, [r3, #0]
800e0e6: 687a ldr r2, [r7, #4]
800e0e8: 429a cmp r2, r3
800e0ea: d102 bne.n 800e0f2 <etharp_cleanup_netif+0x46>
etharp_free_entry(i);
800e0ec: 68f8 ldr r0, [r7, #12]
800e0ee: f7ff fce5 bl 800dabc <etharp_free_entry>
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
800e0f2: 68fb ldr r3, [r7, #12]
800e0f4: 3301 adds r3, #1
800e0f6: 60fb str r3, [r7, #12]
800e0f8: 68fb ldr r3, [r7, #12]
800e0fa: 2b09 cmp r3, #9
800e0fc: dddd ble.n 800e0ba <etharp_cleanup_netif+0xe>
}
}
}
800e0fe: bf00 nop
800e100: bf00 nop
800e102: 3710 adds r7, #16
800e104: 46bd mov sp, r7
800e106: bd80 pop {r7, pc}
800e108: 20008c94 .word 0x20008c94
0800e10c <etharp_input>:
*
* @see pbuf_free()
*/
void
etharp_input(struct pbuf *p, struct netif *netif)
{
800e10c: b5b0 push {r4, r5, r7, lr}
800e10e: b08a sub sp, #40 ; 0x28
800e110: af04 add r7, sp, #16
800e112: 6078 str r0, [r7, #4]
800e114: 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;);
800e116: 683b ldr r3, [r7, #0]
800e118: 2b00 cmp r3, #0
800e11a: d107 bne.n 800e12c <etharp_input+0x20>
800e11c: 4b3f ldr r3, [pc, #252] ; (800e21c <etharp_input+0x110>)
800e11e: f240 228a movw r2, #650 ; 0x28a
800e122: 493f ldr r1, [pc, #252] ; (800e220 <etharp_input+0x114>)
800e124: 483f ldr r0, [pc, #252] ; (800e224 <etharp_input+0x118>)
800e126: f002 f953 bl 80103d0 <printf>
800e12a: e074 b.n 800e216 <etharp_input+0x10a>
hdr = (struct etharp_hdr *)p->payload;
800e12c: 687b ldr r3, [r7, #4]
800e12e: 685b ldr r3, [r3, #4]
800e130: 613b str r3, [r7, #16]
/* RFC 826 "Packet Reception": */
if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) ||
800e132: 693b ldr r3, [r7, #16]
800e134: 881b ldrh r3, [r3, #0]
800e136: b29b uxth r3, r3
800e138: f5b3 7f80 cmp.w r3, #256 ; 0x100
800e13c: d10c bne.n 800e158 <etharp_input+0x4c>
(hdr->hwlen != ETH_HWADDR_LEN) ||
800e13e: 693b ldr r3, [r7, #16]
800e140: 791b ldrb r3, [r3, #4]
if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) ||
800e142: 2b06 cmp r3, #6
800e144: d108 bne.n 800e158 <etharp_input+0x4c>
(hdr->protolen != sizeof(ip4_addr_t)) ||
800e146: 693b ldr r3, [r7, #16]
800e148: 795b ldrb r3, [r3, #5]
(hdr->hwlen != ETH_HWADDR_LEN) ||
800e14a: 2b04 cmp r3, #4
800e14c: d104 bne.n 800e158 <etharp_input+0x4c>
(hdr->proto != PP_HTONS(ETHTYPE_IP))) {
800e14e: 693b ldr r3, [r7, #16]
800e150: 885b ldrh r3, [r3, #2]
800e152: b29b uxth r3, r3
(hdr->protolen != sizeof(ip4_addr_t)) ||
800e154: 2b08 cmp r3, #8
800e156: d003 beq.n 800e160 <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);
800e158: 6878 ldr r0, [r7, #4]
800e15a: f7f7 fc1d bl 8005998 <pbuf_free>
return;
800e15e: e05a b.n 800e216 <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);
800e160: 693b ldr r3, [r7, #16]
800e162: 330e adds r3, #14
800e164: 681b ldr r3, [r3, #0]
800e166: 60fb str r3, [r7, #12]
IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&dipaddr, &hdr->dipaddr);
800e168: 693b ldr r3, [r7, #16]
800e16a: 3318 adds r3, #24
800e16c: 681b ldr r3, [r3, #0]
800e16e: 60bb str r3, [r7, #8]
/* this interface is not configured? */
if (ip4_addr_isany_val(*netif_ip4_addr(netif))) {
800e170: 683b ldr r3, [r7, #0]
800e172: 3304 adds r3, #4
800e174: 681b ldr r3, [r3, #0]
800e176: 2b00 cmp r3, #0
800e178: d102 bne.n 800e180 <etharp_input+0x74>
for_us = 0;
800e17a: 2300 movs r3, #0
800e17c: 75fb strb r3, [r7, #23]
800e17e: e009 b.n 800e194 <etharp_input+0x88>
} else {
/* ARP packet directed to us? */
for_us = (u8_t)ip4_addr_cmp(&dipaddr, netif_ip4_addr(netif));
800e180: 68ba ldr r2, [r7, #8]
800e182: 683b ldr r3, [r7, #0]
800e184: 3304 adds r3, #4
800e186: 681b ldr r3, [r3, #0]
800e188: 429a cmp r2, r3
800e18a: bf0c ite eq
800e18c: 2301 moveq r3, #1
800e18e: 2300 movne r3, #0
800e190: b2db uxtb r3, r3
800e192: 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),
800e194: 693b ldr r3, [r7, #16]
800e196: f103 0208 add.w r2, r3, #8
800e19a: 7dfb ldrb r3, [r7, #23]
800e19c: 2b00 cmp r3, #0
800e19e: d001 beq.n 800e1a4 <etharp_input+0x98>
800e1a0: 2301 movs r3, #1
800e1a2: e000 b.n 800e1a6 <etharp_input+0x9a>
800e1a4: 2302 movs r3, #2
800e1a6: f107 010c add.w r1, r7, #12
800e1aa: 6838 ldr r0, [r7, #0]
800e1ac: f7ff fed8 bl 800df60 <etharp_update_arp_entry>
for_us ? ETHARP_FLAG_TRY_HARD : ETHARP_FLAG_FIND_ONLY);
/* now act on the message itself */
switch (hdr->opcode) {
800e1b0: 693b ldr r3, [r7, #16]
800e1b2: 88db ldrh r3, [r3, #6]
800e1b4: b29b uxth r3, r3
800e1b6: f5b3 7f80 cmp.w r3, #256 ; 0x100
800e1ba: d003 beq.n 800e1c4 <etharp_input+0xb8>
800e1bc: f5b3 7f00 cmp.w r3, #512 ; 0x200
800e1c0: d01e beq.n 800e200 <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;
800e1c2: e025 b.n 800e210 <etharp_input+0x104>
if (for_us) {
800e1c4: 7dfb ldrb r3, [r7, #23]
800e1c6: 2b00 cmp r3, #0
800e1c8: d021 beq.n 800e20e <etharp_input+0x102>
(struct eth_addr *)netif->hwaddr, &hdr->shwaddr,
800e1ca: 683b ldr r3, [r7, #0]
800e1cc: f103 002a add.w r0, r3, #42 ; 0x2a
800e1d0: 693b ldr r3, [r7, #16]
800e1d2: f103 0408 add.w r4, r3, #8
(struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif),
800e1d6: 683b ldr r3, [r7, #0]
800e1d8: f103 052a add.w r5, r3, #42 ; 0x2a
800e1dc: 683b ldr r3, [r7, #0]
800e1de: 3304 adds r3, #4
&hdr->shwaddr, &sipaddr,
800e1e0: 693a ldr r2, [r7, #16]
800e1e2: 3208 adds r2, #8
etharp_raw(netif,
800e1e4: 2102 movs r1, #2
800e1e6: 9103 str r1, [sp, #12]
800e1e8: f107 010c add.w r1, r7, #12
800e1ec: 9102 str r1, [sp, #8]
800e1ee: 9201 str r2, [sp, #4]
800e1f0: 9300 str r3, [sp, #0]
800e1f2: 462b mov r3, r5
800e1f4: 4622 mov r2, r4
800e1f6: 4601 mov r1, r0
800e1f8: 6838 ldr r0, [r7, #0]
800e1fa: f000 faef bl 800e7dc <etharp_raw>
break;
800e1fe: e006 b.n 800e20e <etharp_input+0x102>
dhcp_arp_reply(netif, &sipaddr);
800e200: f107 030c add.w r3, r7, #12
800e204: 4619 mov r1, r3
800e206: 6838 ldr r0, [r7, #0]
800e208: f7fe f9fc bl 800c604 <dhcp_arp_reply>
break;
800e20c: e000 b.n 800e210 <etharp_input+0x104>
break;
800e20e: bf00 nop
}
/* free ARP packet */
pbuf_free(p);
800e210: 6878 ldr r0, [r7, #4]
800e212: f7f7 fbc1 bl 8005998 <pbuf_free>
}
800e216: 3718 adds r7, #24
800e218: 46bd mov sp, r7
800e21a: bdb0 pop {r4, r5, r7, pc}
800e21c: 080175ac .word 0x080175ac
800e220: 080176fc .word 0x080176fc
800e224: 08017624 .word 0x08017624
0800e228 <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)
{
800e228: b580 push {r7, lr}
800e22a: b086 sub sp, #24
800e22c: af02 add r7, sp, #8
800e22e: 60f8 str r0, [r7, #12]
800e230: 60b9 str r1, [r7, #8]
800e232: 4613 mov r3, r2
800e234: 71fb strb r3, [r7, #7]
LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE",
800e236: 79fa ldrb r2, [r7, #7]
800e238: 4944 ldr r1, [pc, #272] ; (800e34c <etharp_output_to_arp_index+0x124>)
800e23a: 4613 mov r3, r2
800e23c: 005b lsls r3, r3, #1
800e23e: 4413 add r3, r2
800e240: 00db lsls r3, r3, #3
800e242: 440b add r3, r1
800e244: 3314 adds r3, #20
800e246: 781b ldrb r3, [r3, #0]
800e248: 2b01 cmp r3, #1
800e24a: d806 bhi.n 800e25a <etharp_output_to_arp_index+0x32>
800e24c: 4b40 ldr r3, [pc, #256] ; (800e350 <etharp_output_to_arp_index+0x128>)
800e24e: f240 22ee movw r2, #750 ; 0x2ee
800e252: 4940 ldr r1, [pc, #256] ; (800e354 <etharp_output_to_arp_index+0x12c>)
800e254: 4840 ldr r0, [pc, #256] ; (800e358 <etharp_output_to_arp_index+0x130>)
800e256: f002 f8bb bl 80103d0 <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) {
800e25a: 79fa ldrb r2, [r7, #7]
800e25c: 493b ldr r1, [pc, #236] ; (800e34c <etharp_output_to_arp_index+0x124>)
800e25e: 4613 mov r3, r2
800e260: 005b lsls r3, r3, #1
800e262: 4413 add r3, r2
800e264: 00db lsls r3, r3, #3
800e266: 440b add r3, r1
800e268: 3314 adds r3, #20
800e26a: 781b ldrb r3, [r3, #0]
800e26c: 2b02 cmp r3, #2
800e26e: d153 bne.n 800e318 <etharp_output_to_arp_index+0xf0>
if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_BROADCAST) {
800e270: 79fa ldrb r2, [r7, #7]
800e272: 4936 ldr r1, [pc, #216] ; (800e34c <etharp_output_to_arp_index+0x124>)
800e274: 4613 mov r3, r2
800e276: 005b lsls r3, r3, #1
800e278: 4413 add r3, r2
800e27a: 00db lsls r3, r3, #3
800e27c: 440b add r3, r1
800e27e: 3312 adds r3, #18
800e280: 881b ldrh r3, [r3, #0]
800e282: f5b3 7f8e cmp.w r3, #284 ; 0x11c
800e286: d919 bls.n 800e2bc <etharp_output_to_arp_index+0x94>
/* issue a standard request using broadcast */
if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) {
800e288: 79fa ldrb r2, [r7, #7]
800e28a: 4613 mov r3, r2
800e28c: 005b lsls r3, r3, #1
800e28e: 4413 add r3, r2
800e290: 00db lsls r3, r3, #3
800e292: 4a2e ldr r2, [pc, #184] ; (800e34c <etharp_output_to_arp_index+0x124>)
800e294: 4413 add r3, r2
800e296: 3304 adds r3, #4
800e298: 4619 mov r1, r3
800e29a: 68f8 ldr r0, [r7, #12]
800e29c: f000 fb4c bl 800e938 <etharp_request>
800e2a0: 4603 mov r3, r0
800e2a2: 2b00 cmp r3, #0
800e2a4: d138 bne.n 800e318 <etharp_output_to_arp_index+0xf0>
arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1;
800e2a6: 79fa ldrb r2, [r7, #7]
800e2a8: 4928 ldr r1, [pc, #160] ; (800e34c <etharp_output_to_arp_index+0x124>)
800e2aa: 4613 mov r3, r2
800e2ac: 005b lsls r3, r3, #1
800e2ae: 4413 add r3, r2
800e2b0: 00db lsls r3, r3, #3
800e2b2: 440b add r3, r1
800e2b4: 3314 adds r3, #20
800e2b6: 2203 movs r2, #3
800e2b8: 701a strb r2, [r3, #0]
800e2ba: e02d b.n 800e318 <etharp_output_to_arp_index+0xf0>
}
} else if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_UNICAST) {
800e2bc: 79fa ldrb r2, [r7, #7]
800e2be: 4923 ldr r1, [pc, #140] ; (800e34c <etharp_output_to_arp_index+0x124>)
800e2c0: 4613 mov r3, r2
800e2c2: 005b lsls r3, r3, #1
800e2c4: 4413 add r3, r2
800e2c6: 00db lsls r3, r3, #3
800e2c8: 440b add r3, r1
800e2ca: 3312 adds r3, #18
800e2cc: 881b ldrh r3, [r3, #0]
800e2ce: f5b3 7f87 cmp.w r3, #270 ; 0x10e
800e2d2: d321 bcc.n 800e318 <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) {
800e2d4: 79fa ldrb r2, [r7, #7]
800e2d6: 4613 mov r3, r2
800e2d8: 005b lsls r3, r3, #1
800e2da: 4413 add r3, r2
800e2dc: 00db lsls r3, r3, #3
800e2de: 4a1b ldr r2, [pc, #108] ; (800e34c <etharp_output_to_arp_index+0x124>)
800e2e0: 4413 add r3, r2
800e2e2: 1d19 adds r1, r3, #4
800e2e4: 79fa ldrb r2, [r7, #7]
800e2e6: 4613 mov r3, r2
800e2e8: 005b lsls r3, r3, #1
800e2ea: 4413 add r3, r2
800e2ec: 00db lsls r3, r3, #3
800e2ee: 3308 adds r3, #8
800e2f0: 4a16 ldr r2, [pc, #88] ; (800e34c <etharp_output_to_arp_index+0x124>)
800e2f2: 4413 add r3, r2
800e2f4: 3304 adds r3, #4
800e2f6: 461a mov r2, r3
800e2f8: 68f8 ldr r0, [r7, #12]
800e2fa: f000 fafb bl 800e8f4 <etharp_request_dst>
800e2fe: 4603 mov r3, r0
800e300: 2b00 cmp r3, #0
800e302: d109 bne.n 800e318 <etharp_output_to_arp_index+0xf0>
arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1;
800e304: 79fa ldrb r2, [r7, #7]
800e306: 4911 ldr r1, [pc, #68] ; (800e34c <etharp_output_to_arp_index+0x124>)
800e308: 4613 mov r3, r2
800e30a: 005b lsls r3, r3, #1
800e30c: 4413 add r3, r2
800e30e: 00db lsls r3, r3, #3
800e310: 440b add r3, r1
800e312: 3314 adds r3, #20
800e314: 2203 movs r2, #3
800e316: 701a strb r2, [r3, #0]
}
}
}
return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP);
800e318: 68fb ldr r3, [r7, #12]
800e31a: f103 012a add.w r1, r3, #42 ; 0x2a
800e31e: 79fa ldrb r2, [r7, #7]
800e320: 4613 mov r3, r2
800e322: 005b lsls r3, r3, #1
800e324: 4413 add r3, r2
800e326: 00db lsls r3, r3, #3
800e328: 3308 adds r3, #8
800e32a: 4a08 ldr r2, [pc, #32] ; (800e34c <etharp_output_to_arp_index+0x124>)
800e32c: 4413 add r3, r2
800e32e: 3304 adds r3, #4
800e330: f44f 6200 mov.w r2, #2048 ; 0x800
800e334: 9200 str r2, [sp, #0]
800e336: 460a mov r2, r1
800e338: 68b9 ldr r1, [r7, #8]
800e33a: 68f8 ldr r0, [r7, #12]
800e33c: f001 ff9c bl 8010278 <ethernet_output>
800e340: 4603 mov r3, r0
}
800e342: 4618 mov r0, r3
800e344: 3710 adds r7, #16
800e346: 46bd mov sp, r7
800e348: bd80 pop {r7, pc}
800e34a: bf00 nop
800e34c: 20008c94 .word 0x20008c94
800e350: 080175ac .word 0x080175ac
800e354: 0801771c .word 0x0801771c
800e358: 08017624 .word 0x08017624
0800e35c <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)
{
800e35c: b580 push {r7, lr}
800e35e: b08a sub sp, #40 ; 0x28
800e360: af02 add r7, sp, #8
800e362: 60f8 str r0, [r7, #12]
800e364: 60b9 str r1, [r7, #8]
800e366: 607a str r2, [r7, #4]
const struct eth_addr *dest;
struct eth_addr mcastaddr;
const ip4_addr_t *dst_addr = ipaddr;
800e368: 687b ldr r3, [r7, #4]
800e36a: 61bb str r3, [r7, #24]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ASSERT("netif != NULL", netif != NULL);
800e36c: 68fb ldr r3, [r7, #12]
800e36e: 2b00 cmp r3, #0
800e370: d106 bne.n 800e380 <etharp_output+0x24>
800e372: 4b73 ldr r3, [pc, #460] ; (800e540 <etharp_output+0x1e4>)
800e374: f240 321e movw r2, #798 ; 0x31e
800e378: 4972 ldr r1, [pc, #456] ; (800e544 <etharp_output+0x1e8>)
800e37a: 4873 ldr r0, [pc, #460] ; (800e548 <etharp_output+0x1ec>)
800e37c: f002 f828 bl 80103d0 <printf>
LWIP_ASSERT("q != NULL", q != NULL);
800e380: 68bb ldr r3, [r7, #8]
800e382: 2b00 cmp r3, #0
800e384: d106 bne.n 800e394 <etharp_output+0x38>
800e386: 4b6e ldr r3, [pc, #440] ; (800e540 <etharp_output+0x1e4>)
800e388: f240 321f movw r2, #799 ; 0x31f
800e38c: 496f ldr r1, [pc, #444] ; (800e54c <etharp_output+0x1f0>)
800e38e: 486e ldr r0, [pc, #440] ; (800e548 <etharp_output+0x1ec>)
800e390: f002 f81e bl 80103d0 <printf>
LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL);
800e394: 687b ldr r3, [r7, #4]
800e396: 2b00 cmp r3, #0
800e398: d106 bne.n 800e3a8 <etharp_output+0x4c>
800e39a: 4b69 ldr r3, [pc, #420] ; (800e540 <etharp_output+0x1e4>)
800e39c: f44f 7248 mov.w r2, #800 ; 0x320
800e3a0: 496b ldr r1, [pc, #428] ; (800e550 <etharp_output+0x1f4>)
800e3a2: 4869 ldr r0, [pc, #420] ; (800e548 <etharp_output+0x1ec>)
800e3a4: f002 f814 bl 80103d0 <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)) {
800e3a8: 687b ldr r3, [r7, #4]
800e3aa: 681b ldr r3, [r3, #0]
800e3ac: 68f9 ldr r1, [r7, #12]
800e3ae: 4618 mov r0, r3
800e3b0: f000 ff16 bl 800f1e0 <ip4_addr_isbroadcast_u32>
800e3b4: 4603 mov r3, r0
800e3b6: 2b00 cmp r3, #0
800e3b8: d002 beq.n 800e3c0 <etharp_output+0x64>
/* broadcast on Ethernet also */
dest = (const struct eth_addr *)&ethbroadcast;
800e3ba: 4b66 ldr r3, [pc, #408] ; (800e554 <etharp_output+0x1f8>)
800e3bc: 61fb str r3, [r7, #28]
800e3be: e0af b.n 800e520 <etharp_output+0x1c4>
/* multicast destination IP address? */
} else if (ip4_addr_ismulticast(ipaddr)) {
800e3c0: 687b ldr r3, [r7, #4]
800e3c2: 681b ldr r3, [r3, #0]
800e3c4: f003 03f0 and.w r3, r3, #240 ; 0xf0
800e3c8: 2be0 cmp r3, #224 ; 0xe0
800e3ca: d118 bne.n 800e3fe <etharp_output+0xa2>
/* Hash IP multicast address to MAC address.*/
mcastaddr.addr[0] = LL_IP4_MULTICAST_ADDR_0;
800e3cc: 2301 movs r3, #1
800e3ce: 743b strb r3, [r7, #16]
mcastaddr.addr[1] = LL_IP4_MULTICAST_ADDR_1;
800e3d0: 2300 movs r3, #0
800e3d2: 747b strb r3, [r7, #17]
mcastaddr.addr[2] = LL_IP4_MULTICAST_ADDR_2;
800e3d4: 235e movs r3, #94 ; 0x5e
800e3d6: 74bb strb r3, [r7, #18]
mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f;
800e3d8: 687b ldr r3, [r7, #4]
800e3da: 3301 adds r3, #1
800e3dc: 781b ldrb r3, [r3, #0]
800e3de: f003 037f and.w r3, r3, #127 ; 0x7f
800e3e2: b2db uxtb r3, r3
800e3e4: 74fb strb r3, [r7, #19]
mcastaddr.addr[4] = ip4_addr3(ipaddr);
800e3e6: 687b ldr r3, [r7, #4]
800e3e8: 3302 adds r3, #2
800e3ea: 781b ldrb r3, [r3, #0]
800e3ec: 753b strb r3, [r7, #20]
mcastaddr.addr[5] = ip4_addr4(ipaddr);
800e3ee: 687b ldr r3, [r7, #4]
800e3f0: 3303 adds r3, #3
800e3f2: 781b ldrb r3, [r3, #0]
800e3f4: 757b strb r3, [r7, #21]
/* destination Ethernet address is multicast */
dest = &mcastaddr;
800e3f6: f107 0310 add.w r3, r7, #16
800e3fa: 61fb str r3, [r7, #28]
800e3fc: e090 b.n 800e520 <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)) &&
800e3fe: 687b ldr r3, [r7, #4]
800e400: 681a ldr r2, [r3, #0]
800e402: 68fb ldr r3, [r7, #12]
800e404: 3304 adds r3, #4
800e406: 681b ldr r3, [r3, #0]
800e408: 405a eors r2, r3
800e40a: 68fb ldr r3, [r7, #12]
800e40c: 3308 adds r3, #8
800e40e: 681b ldr r3, [r3, #0]
800e410: 4013 ands r3, r2
800e412: 2b00 cmp r3, #0
800e414: d012 beq.n 800e43c <etharp_output+0xe0>
!ip4_addr_islinklocal(ipaddr)) {
800e416: 687b ldr r3, [r7, #4]
800e418: 681b ldr r3, [r3, #0]
800e41a: b29b uxth r3, r3
if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) &&
800e41c: f64f 62a9 movw r2, #65193 ; 0xfea9
800e420: 4293 cmp r3, r2
800e422: d00b beq.n 800e43c <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))) {
800e424: 68fb ldr r3, [r7, #12]
800e426: 330c adds r3, #12
800e428: 681b ldr r3, [r3, #0]
800e42a: 2b00 cmp r3, #0
800e42c: d003 beq.n 800e436 <etharp_output+0xda>
/* send to hardware address of default gateway IP address */
dst_addr = netif_ip4_gw(netif);
800e42e: 68fb ldr r3, [r7, #12]
800e430: 330c adds r3, #12
800e432: 61bb str r3, [r7, #24]
800e434: e002 b.n 800e43c <etharp_output+0xe0>
/* no default gateway available */
} else {
/* no route to destination error (default gateway missing) */
return ERR_RTE;
800e436: f06f 0303 mvn.w r3, #3
800e43a: e07d b.n 800e538 <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) &&
800e43c: 4b46 ldr r3, [pc, #280] ; (800e558 <etharp_output+0x1fc>)
800e43e: 781b ldrb r3, [r3, #0]
800e440: 4619 mov r1, r3
800e442: 4a46 ldr r2, [pc, #280] ; (800e55c <etharp_output+0x200>)
800e444: 460b mov r3, r1
800e446: 005b lsls r3, r3, #1
800e448: 440b add r3, r1
800e44a: 00db lsls r3, r3, #3
800e44c: 4413 add r3, r2
800e44e: 3314 adds r3, #20
800e450: 781b ldrb r3, [r3, #0]
800e452: 2b01 cmp r3, #1
800e454: d925 bls.n 800e4a2 <etharp_output+0x146>
#if ETHARP_TABLE_MATCH_NETIF
(arp_table[etharp_cached_entry].netif == netif) &&
800e456: 4b40 ldr r3, [pc, #256] ; (800e558 <etharp_output+0x1fc>)
800e458: 781b ldrb r3, [r3, #0]
800e45a: 4619 mov r1, r3
800e45c: 4a3f ldr r2, [pc, #252] ; (800e55c <etharp_output+0x200>)
800e45e: 460b mov r3, r1
800e460: 005b lsls r3, r3, #1
800e462: 440b add r3, r1
800e464: 00db lsls r3, r3, #3
800e466: 4413 add r3, r2
800e468: 3308 adds r3, #8
800e46a: 681b ldr r3, [r3, #0]
if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) &&
800e46c: 68fa ldr r2, [r7, #12]
800e46e: 429a cmp r2, r3
800e470: d117 bne.n 800e4a2 <etharp_output+0x146>
#endif
(ip4_addr_cmp(dst_addr, &arp_table[etharp_cached_entry].ipaddr))) {
800e472: 69bb ldr r3, [r7, #24]
800e474: 681a ldr r2, [r3, #0]
800e476: 4b38 ldr r3, [pc, #224] ; (800e558 <etharp_output+0x1fc>)
800e478: 781b ldrb r3, [r3, #0]
800e47a: 4618 mov r0, r3
800e47c: 4937 ldr r1, [pc, #220] ; (800e55c <etharp_output+0x200>)
800e47e: 4603 mov r3, r0
800e480: 005b lsls r3, r3, #1
800e482: 4403 add r3, r0
800e484: 00db lsls r3, r3, #3
800e486: 440b add r3, r1
800e488: 3304 adds r3, #4
800e48a: 681b ldr r3, [r3, #0]
(arp_table[etharp_cached_entry].netif == netif) &&
800e48c: 429a cmp r2, r3
800e48e: d108 bne.n 800e4a2 <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);
800e490: 4b31 ldr r3, [pc, #196] ; (800e558 <etharp_output+0x1fc>)
800e492: 781b ldrb r3, [r3, #0]
800e494: 461a mov r2, r3
800e496: 68b9 ldr r1, [r7, #8]
800e498: 68f8 ldr r0, [r7, #12]
800e49a: f7ff fec5 bl 800e228 <etharp_output_to_arp_index>
800e49e: 4603 mov r3, r0
800e4a0: e04a b.n 800e538 <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++) {
800e4a2: 2300 movs r3, #0
800e4a4: 75fb strb r3, [r7, #23]
800e4a6: e031 b.n 800e50c <etharp_output+0x1b0>
if ((arp_table[i].state >= ETHARP_STATE_STABLE) &&
800e4a8: 7dfa ldrb r2, [r7, #23]
800e4aa: 492c ldr r1, [pc, #176] ; (800e55c <etharp_output+0x200>)
800e4ac: 4613 mov r3, r2
800e4ae: 005b lsls r3, r3, #1
800e4b0: 4413 add r3, r2
800e4b2: 00db lsls r3, r3, #3
800e4b4: 440b add r3, r1
800e4b6: 3314 adds r3, #20
800e4b8: 781b ldrb r3, [r3, #0]
800e4ba: 2b01 cmp r3, #1
800e4bc: d923 bls.n 800e506 <etharp_output+0x1aa>
#if ETHARP_TABLE_MATCH_NETIF
(arp_table[i].netif == netif) &&
800e4be: 7dfa ldrb r2, [r7, #23]
800e4c0: 4926 ldr r1, [pc, #152] ; (800e55c <etharp_output+0x200>)
800e4c2: 4613 mov r3, r2
800e4c4: 005b lsls r3, r3, #1
800e4c6: 4413 add r3, r2
800e4c8: 00db lsls r3, r3, #3
800e4ca: 440b add r3, r1
800e4cc: 3308 adds r3, #8
800e4ce: 681b ldr r3, [r3, #0]
if ((arp_table[i].state >= ETHARP_STATE_STABLE) &&
800e4d0: 68fa ldr r2, [r7, #12]
800e4d2: 429a cmp r2, r3
800e4d4: d117 bne.n 800e506 <etharp_output+0x1aa>
#endif
(ip4_addr_cmp(dst_addr, &arp_table[i].ipaddr))) {
800e4d6: 69bb ldr r3, [r7, #24]
800e4d8: 6819 ldr r1, [r3, #0]
800e4da: 7dfa ldrb r2, [r7, #23]
800e4dc: 481f ldr r0, [pc, #124] ; (800e55c <etharp_output+0x200>)
800e4de: 4613 mov r3, r2
800e4e0: 005b lsls r3, r3, #1
800e4e2: 4413 add r3, r2
800e4e4: 00db lsls r3, r3, #3
800e4e6: 4403 add r3, r0
800e4e8: 3304 adds r3, #4
800e4ea: 681b ldr r3, [r3, #0]
(arp_table[i].netif == netif) &&
800e4ec: 4299 cmp r1, r3
800e4ee: d10a bne.n 800e506 <etharp_output+0x1aa>
/* found an existing, stable entry */
ETHARP_SET_ADDRHINT(netif, i);
800e4f0: 4a19 ldr r2, [pc, #100] ; (800e558 <etharp_output+0x1fc>)
800e4f2: 7dfb ldrb r3, [r7, #23]
800e4f4: 7013 strb r3, [r2, #0]
return etharp_output_to_arp_index(netif, q, i);
800e4f6: 7dfb ldrb r3, [r7, #23]
800e4f8: 461a mov r2, r3
800e4fa: 68b9 ldr r1, [r7, #8]
800e4fc: 68f8 ldr r0, [r7, #12]
800e4fe: f7ff fe93 bl 800e228 <etharp_output_to_arp_index>
800e502: 4603 mov r3, r0
800e504: e018 b.n 800e538 <etharp_output+0x1dc>
for (i = 0; i < ARP_TABLE_SIZE; i++) {
800e506: 7dfb ldrb r3, [r7, #23]
800e508: 3301 adds r3, #1
800e50a: 75fb strb r3, [r7, #23]
800e50c: 7dfb ldrb r3, [r7, #23]
800e50e: 2b09 cmp r3, #9
800e510: d9ca bls.n 800e4a8 <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);
800e512: 68ba ldr r2, [r7, #8]
800e514: 69b9 ldr r1, [r7, #24]
800e516: 68f8 ldr r0, [r7, #12]
800e518: f000 f822 bl 800e560 <etharp_query>
800e51c: 4603 mov r3, r0
800e51e: e00b b.n 800e538 <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);
800e520: 68fb ldr r3, [r7, #12]
800e522: f103 022a add.w r2, r3, #42 ; 0x2a
800e526: f44f 6300 mov.w r3, #2048 ; 0x800
800e52a: 9300 str r3, [sp, #0]
800e52c: 69fb ldr r3, [r7, #28]
800e52e: 68b9 ldr r1, [r7, #8]
800e530: 68f8 ldr r0, [r7, #12]
800e532: f001 fea1 bl 8010278 <ethernet_output>
800e536: 4603 mov r3, r0
}
800e538: 4618 mov r0, r3
800e53a: 3720 adds r7, #32
800e53c: 46bd mov sp, r7
800e53e: bd80 pop {r7, pc}
800e540: 080175ac .word 0x080175ac
800e544: 080176fc .word 0x080176fc
800e548: 08017624 .word 0x08017624
800e54c: 0801774c .word 0x0801774c
800e550: 080176ec .word 0x080176ec
800e554: 08017de4 .word 0x08017de4
800e558: 20008d84 .word 0x20008d84
800e55c: 20008c94 .word 0x20008c94
0800e560 <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)
{
800e560: b580 push {r7, lr}
800e562: b08c sub sp, #48 ; 0x30
800e564: af02 add r7, sp, #8
800e566: 60f8 str r0, [r7, #12]
800e568: 60b9 str r1, [r7, #8]
800e56a: 607a str r2, [r7, #4]
struct eth_addr *srcaddr = (struct eth_addr *)netif->hwaddr;
800e56c: 68fb ldr r3, [r7, #12]
800e56e: 332a adds r3, #42 ; 0x2a
800e570: 617b str r3, [r7, #20]
err_t result = ERR_MEM;
800e572: 23ff movs r3, #255 ; 0xff
800e574: f887 3027 strb.w r3, [r7, #39] ; 0x27
int is_new_entry = 0;
800e578: 2300 movs r3, #0
800e57a: 623b str r3, [r7, #32]
s16_t i_err;
netif_addr_idx_t i;
/* non-unicast address? */
if (ip4_addr_isbroadcast(ipaddr, netif) ||
800e57c: 68bb ldr r3, [r7, #8]
800e57e: 681b ldr r3, [r3, #0]
800e580: 68f9 ldr r1, [r7, #12]
800e582: 4618 mov r0, r3
800e584: f000 fe2c bl 800f1e0 <ip4_addr_isbroadcast_u32>
800e588: 4603 mov r3, r0
800e58a: 2b00 cmp r3, #0
800e58c: d10c bne.n 800e5a8 <etharp_query+0x48>
ip4_addr_ismulticast(ipaddr) ||
800e58e: 68bb ldr r3, [r7, #8]
800e590: 681b ldr r3, [r3, #0]
800e592: f003 03f0 and.w r3, r3, #240 ; 0xf0
if (ip4_addr_isbroadcast(ipaddr, netif) ||
800e596: 2be0 cmp r3, #224 ; 0xe0
800e598: d006 beq.n 800e5a8 <etharp_query+0x48>
ip4_addr_ismulticast(ipaddr) ||
800e59a: 68bb ldr r3, [r7, #8]
800e59c: 2b00 cmp r3, #0
800e59e: d003 beq.n 800e5a8 <etharp_query+0x48>
ip4_addr_isany(ipaddr)) {
800e5a0: 68bb ldr r3, [r7, #8]
800e5a2: 681b ldr r3, [r3, #0]
800e5a4: 2b00 cmp r3, #0
800e5a6: d102 bne.n 800e5ae <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;
800e5a8: f06f 030f mvn.w r3, #15
800e5ac: e101 b.n 800e7b2 <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);
800e5ae: 68fa ldr r2, [r7, #12]
800e5b0: 2101 movs r1, #1
800e5b2: 68b8 ldr r0, [r7, #8]
800e5b4: f7ff fb5c bl 800dc70 <etharp_find_entry>
800e5b8: 4603 mov r3, r0
800e5ba: 827b strh r3, [r7, #18]
/* could not find or create entry? */
if (i_err < 0) {
800e5bc: f9b7 3012 ldrsh.w r3, [r7, #18]
800e5c0: 2b00 cmp r3, #0
800e5c2: da02 bge.n 800e5ca <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;
800e5c4: 8a7b ldrh r3, [r7, #18]
800e5c6: b25b sxtb r3, r3
800e5c8: e0f3 b.n 800e7b2 <etharp_query+0x252>
}
LWIP_ASSERT("type overflow", (size_t)i_err < NETIF_ADDR_IDX_MAX);
800e5ca: 8a7b ldrh r3, [r7, #18]
800e5cc: 2b7e cmp r3, #126 ; 0x7e
800e5ce: d906 bls.n 800e5de <etharp_query+0x7e>
800e5d0: 4b7a ldr r3, [pc, #488] ; (800e7bc <etharp_query+0x25c>)
800e5d2: f240 32c1 movw r2, #961 ; 0x3c1
800e5d6: 497a ldr r1, [pc, #488] ; (800e7c0 <etharp_query+0x260>)
800e5d8: 487a ldr r0, [pc, #488] ; (800e7c4 <etharp_query+0x264>)
800e5da: f001 fef9 bl 80103d0 <printf>
i = (netif_addr_idx_t)i_err;
800e5de: 8a7b ldrh r3, [r7, #18]
800e5e0: 747b strb r3, [r7, #17]
/* mark a fresh entry as pending (we just sent a request) */
if (arp_table[i].state == ETHARP_STATE_EMPTY) {
800e5e2: 7c7a ldrb r2, [r7, #17]
800e5e4: 4978 ldr r1, [pc, #480] ; (800e7c8 <etharp_query+0x268>)
800e5e6: 4613 mov r3, r2
800e5e8: 005b lsls r3, r3, #1
800e5ea: 4413 add r3, r2
800e5ec: 00db lsls r3, r3, #3
800e5ee: 440b add r3, r1
800e5f0: 3314 adds r3, #20
800e5f2: 781b ldrb r3, [r3, #0]
800e5f4: 2b00 cmp r3, #0
800e5f6: d115 bne.n 800e624 <etharp_query+0xc4>
is_new_entry = 1;
800e5f8: 2301 movs r3, #1
800e5fa: 623b str r3, [r7, #32]
arp_table[i].state = ETHARP_STATE_PENDING;
800e5fc: 7c7a ldrb r2, [r7, #17]
800e5fe: 4972 ldr r1, [pc, #456] ; (800e7c8 <etharp_query+0x268>)
800e600: 4613 mov r3, r2
800e602: 005b lsls r3, r3, #1
800e604: 4413 add r3, r2
800e606: 00db lsls r3, r3, #3
800e608: 440b add r3, r1
800e60a: 3314 adds r3, #20
800e60c: 2201 movs r2, #1
800e60e: 701a strb r2, [r3, #0]
/* record network interface for re-sending arp request in etharp_tmr */
arp_table[i].netif = netif;
800e610: 7c7a ldrb r2, [r7, #17]
800e612: 496d ldr r1, [pc, #436] ; (800e7c8 <etharp_query+0x268>)
800e614: 4613 mov r3, r2
800e616: 005b lsls r3, r3, #1
800e618: 4413 add r3, r2
800e61a: 00db lsls r3, r3, #3
800e61c: 440b add r3, r1
800e61e: 3308 adds r3, #8
800e620: 68fa ldr r2, [r7, #12]
800e622: 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",
800e624: 7c7a ldrb r2, [r7, #17]
800e626: 4968 ldr r1, [pc, #416] ; (800e7c8 <etharp_query+0x268>)
800e628: 4613 mov r3, r2
800e62a: 005b lsls r3, r3, #1
800e62c: 4413 add r3, r2
800e62e: 00db lsls r3, r3, #3
800e630: 440b add r3, r1
800e632: 3314 adds r3, #20
800e634: 781b ldrb r3, [r3, #0]
800e636: 2b01 cmp r3, #1
800e638: d011 beq.n 800e65e <etharp_query+0xfe>
800e63a: 7c7a ldrb r2, [r7, #17]
800e63c: 4962 ldr r1, [pc, #392] ; (800e7c8 <etharp_query+0x268>)
800e63e: 4613 mov r3, r2
800e640: 005b lsls r3, r3, #1
800e642: 4413 add r3, r2
800e644: 00db lsls r3, r3, #3
800e646: 440b add r3, r1
800e648: 3314 adds r3, #20
800e64a: 781b ldrb r3, [r3, #0]
800e64c: 2b01 cmp r3, #1
800e64e: d806 bhi.n 800e65e <etharp_query+0xfe>
800e650: 4b5a ldr r3, [pc, #360] ; (800e7bc <etharp_query+0x25c>)
800e652: f240 32cd movw r2, #973 ; 0x3cd
800e656: 495d ldr r1, [pc, #372] ; (800e7cc <etharp_query+0x26c>)
800e658: 485a ldr r0, [pc, #360] ; (800e7c4 <etharp_query+0x264>)
800e65a: f001 feb9 bl 80103d0 <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)) {
800e65e: 6a3b ldr r3, [r7, #32]
800e660: 2b00 cmp r3, #0
800e662: d102 bne.n 800e66a <etharp_query+0x10a>
800e664: 687b ldr r3, [r7, #4]
800e666: 2b00 cmp r3, #0
800e668: d10c bne.n 800e684 <etharp_query+0x124>
/* try to resolve it; send out ARP request */
result = etharp_request(netif, ipaddr);
800e66a: 68b9 ldr r1, [r7, #8]
800e66c: 68f8 ldr r0, [r7, #12]
800e66e: f000 f963 bl 800e938 <etharp_request>
800e672: 4603 mov r3, r0
800e674: 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) {
800e678: 687b ldr r3, [r7, #4]
800e67a: 2b00 cmp r3, #0
800e67c: d102 bne.n 800e684 <etharp_query+0x124>
return result;
800e67e: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27
800e682: e096 b.n 800e7b2 <etharp_query+0x252>
}
}
/* packet given? */
LWIP_ASSERT("q != NULL", q != NULL);
800e684: 687b ldr r3, [r7, #4]
800e686: 2b00 cmp r3, #0
800e688: d106 bne.n 800e698 <etharp_query+0x138>
800e68a: 4b4c ldr r3, [pc, #304] ; (800e7bc <etharp_query+0x25c>)
800e68c: f240 32e1 movw r2, #993 ; 0x3e1
800e690: 494f ldr r1, [pc, #316] ; (800e7d0 <etharp_query+0x270>)
800e692: 484c ldr r0, [pc, #304] ; (800e7c4 <etharp_query+0x264>)
800e694: f001 fe9c bl 80103d0 <printf>
/* stable entry? */
if (arp_table[i].state >= ETHARP_STATE_STABLE) {
800e698: 7c7a ldrb r2, [r7, #17]
800e69a: 494b ldr r1, [pc, #300] ; (800e7c8 <etharp_query+0x268>)
800e69c: 4613 mov r3, r2
800e69e: 005b lsls r3, r3, #1
800e6a0: 4413 add r3, r2
800e6a2: 00db lsls r3, r3, #3
800e6a4: 440b add r3, r1
800e6a6: 3314 adds r3, #20
800e6a8: 781b ldrb r3, [r3, #0]
800e6aa: 2b01 cmp r3, #1
800e6ac: d917 bls.n 800e6de <etharp_query+0x17e>
/* we have a valid IP->Ethernet address mapping */
ETHARP_SET_ADDRHINT(netif, i);
800e6ae: 4a49 ldr r2, [pc, #292] ; (800e7d4 <etharp_query+0x274>)
800e6b0: 7c7b ldrb r3, [r7, #17]
800e6b2: 7013 strb r3, [r2, #0]
/* send the packet */
result = ethernet_output(netif, q, srcaddr, &(arp_table[i].ethaddr), ETHTYPE_IP);
800e6b4: 7c7a ldrb r2, [r7, #17]
800e6b6: 4613 mov r3, r2
800e6b8: 005b lsls r3, r3, #1
800e6ba: 4413 add r3, r2
800e6bc: 00db lsls r3, r3, #3
800e6be: 3308 adds r3, #8
800e6c0: 4a41 ldr r2, [pc, #260] ; (800e7c8 <etharp_query+0x268>)
800e6c2: 4413 add r3, r2
800e6c4: 3304 adds r3, #4
800e6c6: f44f 6200 mov.w r2, #2048 ; 0x800
800e6ca: 9200 str r2, [sp, #0]
800e6cc: 697a ldr r2, [r7, #20]
800e6ce: 6879 ldr r1, [r7, #4]
800e6d0: 68f8 ldr r0, [r7, #12]
800e6d2: f001 fdd1 bl 8010278 <ethernet_output>
800e6d6: 4603 mov r3, r0
800e6d8: f887 3027 strb.w r3, [r7, #39] ; 0x27
800e6dc: e067 b.n 800e7ae <etharp_query+0x24e>
/* pending entry? (either just created or already pending */
} else if (arp_table[i].state == ETHARP_STATE_PENDING) {
800e6de: 7c7a ldrb r2, [r7, #17]
800e6e0: 4939 ldr r1, [pc, #228] ; (800e7c8 <etharp_query+0x268>)
800e6e2: 4613 mov r3, r2
800e6e4: 005b lsls r3, r3, #1
800e6e6: 4413 add r3, r2
800e6e8: 00db lsls r3, r3, #3
800e6ea: 440b add r3, r1
800e6ec: 3314 adds r3, #20
800e6ee: 781b ldrb r3, [r3, #0]
800e6f0: 2b01 cmp r3, #1
800e6f2: d15c bne.n 800e7ae <etharp_query+0x24e>
/* entry is still pending, queue the given packet 'q' */
struct pbuf *p;
int copy_needed = 0;
800e6f4: 2300 movs r3, #0
800e6f6: 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;
800e6f8: 687b ldr r3, [r7, #4]
800e6fa: 61fb str r3, [r7, #28]
while (p) {
800e6fc: e01c b.n 800e738 <etharp_query+0x1d8>
LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0));
800e6fe: 69fb ldr r3, [r7, #28]
800e700: 895a ldrh r2, [r3, #10]
800e702: 69fb ldr r3, [r7, #28]
800e704: 891b ldrh r3, [r3, #8]
800e706: 429a cmp r2, r3
800e708: d10a bne.n 800e720 <etharp_query+0x1c0>
800e70a: 69fb ldr r3, [r7, #28]
800e70c: 681b ldr r3, [r3, #0]
800e70e: 2b00 cmp r3, #0
800e710: d006 beq.n 800e720 <etharp_query+0x1c0>
800e712: 4b2a ldr r3, [pc, #168] ; (800e7bc <etharp_query+0x25c>)
800e714: f240 32f1 movw r2, #1009 ; 0x3f1
800e718: 492f ldr r1, [pc, #188] ; (800e7d8 <etharp_query+0x278>)
800e71a: 482a ldr r0, [pc, #168] ; (800e7c4 <etharp_query+0x264>)
800e71c: f001 fe58 bl 80103d0 <printf>
if (PBUF_NEEDS_COPY(p)) {
800e720: 69fb ldr r3, [r7, #28]
800e722: 7b1b ldrb r3, [r3, #12]
800e724: f003 0340 and.w r3, r3, #64 ; 0x40
800e728: 2b00 cmp r3, #0
800e72a: d002 beq.n 800e732 <etharp_query+0x1d2>
copy_needed = 1;
800e72c: 2301 movs r3, #1
800e72e: 61bb str r3, [r7, #24]
break;
800e730: e005 b.n 800e73e <etharp_query+0x1de>
}
p = p->next;
800e732: 69fb ldr r3, [r7, #28]
800e734: 681b ldr r3, [r3, #0]
800e736: 61fb str r3, [r7, #28]
while (p) {
800e738: 69fb ldr r3, [r7, #28]
800e73a: 2b00 cmp r3, #0
800e73c: d1df bne.n 800e6fe <etharp_query+0x19e>
}
if (copy_needed) {
800e73e: 69bb ldr r3, [r7, #24]
800e740: 2b00 cmp r3, #0
800e742: d007 beq.n 800e754 <etharp_query+0x1f4>
/* copy the whole packet into new pbufs */
p = pbuf_clone(PBUF_LINK, PBUF_RAM, q);
800e744: 687a ldr r2, [r7, #4]
800e746: f44f 7120 mov.w r1, #640 ; 0x280
800e74a: 200e movs r0, #14
800e74c: f7f7 fb90 bl 8005e70 <pbuf_clone>
800e750: 61f8 str r0, [r7, #28]
800e752: e004 b.n 800e75e <etharp_query+0x1fe>
} else {
/* referencing the old pbuf is enough */
p = q;
800e754: 687b ldr r3, [r7, #4]
800e756: 61fb str r3, [r7, #28]
pbuf_ref(p);
800e758: 69f8 ldr r0, [r7, #28]
800e75a: f7f7 f9bd bl 8005ad8 <pbuf_ref>
}
/* packet could be taken over? */
if (p != NULL) {
800e75e: 69fb ldr r3, [r7, #28]
800e760: 2b00 cmp r3, #0
800e762: d021 beq.n 800e7a8 <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) {
800e764: 7c7a ldrb r2, [r7, #17]
800e766: 4918 ldr r1, [pc, #96] ; (800e7c8 <etharp_query+0x268>)
800e768: 4613 mov r3, r2
800e76a: 005b lsls r3, r3, #1
800e76c: 4413 add r3, r2
800e76e: 00db lsls r3, r3, #3
800e770: 440b add r3, r1
800e772: 681b ldr r3, [r3, #0]
800e774: 2b00 cmp r3, #0
800e776: d00a beq.n 800e78e <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);
800e778: 7c7a ldrb r2, [r7, #17]
800e77a: 4913 ldr r1, [pc, #76] ; (800e7c8 <etharp_query+0x268>)
800e77c: 4613 mov r3, r2
800e77e: 005b lsls r3, r3, #1
800e780: 4413 add r3, r2
800e782: 00db lsls r3, r3, #3
800e784: 440b add r3, r1
800e786: 681b ldr r3, [r3, #0]
800e788: 4618 mov r0, r3
800e78a: f7f7 f905 bl 8005998 <pbuf_free>
}
arp_table[i].q = p;
800e78e: 7c7a ldrb r2, [r7, #17]
800e790: 490d ldr r1, [pc, #52] ; (800e7c8 <etharp_query+0x268>)
800e792: 4613 mov r3, r2
800e794: 005b lsls r3, r3, #1
800e796: 4413 add r3, r2
800e798: 00db lsls r3, r3, #3
800e79a: 440b add r3, r1
800e79c: 69fa ldr r2, [r7, #28]
800e79e: 601a str r2, [r3, #0]
result = ERR_OK;
800e7a0: 2300 movs r3, #0
800e7a2: f887 3027 strb.w r3, [r7, #39] ; 0x27
800e7a6: e002 b.n 800e7ae <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;
800e7a8: 23ff movs r3, #255 ; 0xff
800e7aa: f887 3027 strb.w r3, [r7, #39] ; 0x27
}
}
return result;
800e7ae: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27
}
800e7b2: 4618 mov r0, r3
800e7b4: 3728 adds r7, #40 ; 0x28
800e7b6: 46bd mov sp, r7
800e7b8: bd80 pop {r7, pc}
800e7ba: bf00 nop
800e7bc: 080175ac .word 0x080175ac
800e7c0: 08017758 .word 0x08017758
800e7c4: 08017624 .word 0x08017624
800e7c8: 20008c94 .word 0x20008c94
800e7cc: 08017768 .word 0x08017768
800e7d0: 0801774c .word 0x0801774c
800e7d4: 20008d84 .word 0x20008d84
800e7d8: 08017790 .word 0x08017790
0800e7dc <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)
{
800e7dc: b580 push {r7, lr}
800e7de: b08a sub sp, #40 ; 0x28
800e7e0: af02 add r7, sp, #8
800e7e2: 60f8 str r0, [r7, #12]
800e7e4: 60b9 str r1, [r7, #8]
800e7e6: 607a str r2, [r7, #4]
800e7e8: 603b str r3, [r7, #0]
struct pbuf *p;
err_t result = ERR_OK;
800e7ea: 2300 movs r3, #0
800e7ec: 77fb strb r3, [r7, #31]
struct etharp_hdr *hdr;
LWIP_ASSERT("netif != NULL", netif != NULL);
800e7ee: 68fb ldr r3, [r7, #12]
800e7f0: 2b00 cmp r3, #0
800e7f2: d106 bne.n 800e802 <etharp_raw+0x26>
800e7f4: 4b3a ldr r3, [pc, #232] ; (800e8e0 <etharp_raw+0x104>)
800e7f6: f240 4257 movw r2, #1111 ; 0x457
800e7fa: 493a ldr r1, [pc, #232] ; (800e8e4 <etharp_raw+0x108>)
800e7fc: 483a ldr r0, [pc, #232] ; (800e8e8 <etharp_raw+0x10c>)
800e7fe: f001 fde7 bl 80103d0 <printf>
/* allocate a pbuf for the outgoing ARP request packet */
p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_HDR, PBUF_RAM);
800e802: f44f 7220 mov.w r2, #640 ; 0x280
800e806: 211c movs r1, #28
800e808: 200e movs r0, #14
800e80a: f7f6 fde1 bl 80053d0 <pbuf_alloc>
800e80e: 61b8 str r0, [r7, #24]
/* could allocate a pbuf for an ARP request? */
if (p == NULL) {
800e810: 69bb ldr r3, [r7, #24]
800e812: 2b00 cmp r3, #0
800e814: d102 bne.n 800e81c <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;
800e816: f04f 33ff mov.w r3, #4294967295
800e81a: e05d b.n 800e8d8 <etharp_raw+0xfc>
}
LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr",
800e81c: 69bb ldr r3, [r7, #24]
800e81e: 895b ldrh r3, [r3, #10]
800e820: 2b1b cmp r3, #27
800e822: d806 bhi.n 800e832 <etharp_raw+0x56>
800e824: 4b2e ldr r3, [pc, #184] ; (800e8e0 <etharp_raw+0x104>)
800e826: f240 4262 movw r2, #1122 ; 0x462
800e82a: 4930 ldr r1, [pc, #192] ; (800e8ec <etharp_raw+0x110>)
800e82c: 482e ldr r0, [pc, #184] ; (800e8e8 <etharp_raw+0x10c>)
800e82e: f001 fdcf bl 80103d0 <printf>
(p->len >= SIZEOF_ETHARP_HDR));
hdr = (struct etharp_hdr *)p->payload;
800e832: 69bb ldr r3, [r7, #24]
800e834: 685b ldr r3, [r3, #4]
800e836: 617b str r3, [r7, #20]
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n"));
hdr->opcode = lwip_htons(opcode);
800e838: 8ebb ldrh r3, [r7, #52] ; 0x34
800e83a: 4618 mov r0, r3
800e83c: f7f5 fd42 bl 80042c4 <lwip_htons>
800e840: 4603 mov r3, r0
800e842: 461a mov r2, r3
800e844: 697b ldr r3, [r7, #20]
800e846: 80da strh r2, [r3, #6]
LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!",
800e848: 68fb ldr r3, [r7, #12]
800e84a: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
800e84e: 2b06 cmp r3, #6
800e850: d006 beq.n 800e860 <etharp_raw+0x84>
800e852: 4b23 ldr r3, [pc, #140] ; (800e8e0 <etharp_raw+0x104>)
800e854: f240 4269 movw r2, #1129 ; 0x469
800e858: 4925 ldr r1, [pc, #148] ; (800e8f0 <etharp_raw+0x114>)
800e85a: 4823 ldr r0, [pc, #140] ; (800e8e8 <etharp_raw+0x10c>)
800e85c: f001 fdb8 bl 80103d0 <printf>
(netif->hwaddr_len == ETH_HWADDR_LEN));
/* Write the ARP MAC-Addresses */
SMEMCPY(&hdr->shwaddr, hwsrc_addr, ETH_HWADDR_LEN);
800e860: 697b ldr r3, [r7, #20]
800e862: 3308 adds r3, #8
800e864: 2206 movs r2, #6
800e866: 6839 ldr r1, [r7, #0]
800e868: 4618 mov r0, r3
800e86a: f001 fd81 bl 8010370 <memcpy>
SMEMCPY(&hdr->dhwaddr, hwdst_addr, ETH_HWADDR_LEN);
800e86e: 697b ldr r3, [r7, #20]
800e870: 3312 adds r3, #18
800e872: 2206 movs r2, #6
800e874: 6af9 ldr r1, [r7, #44] ; 0x2c
800e876: 4618 mov r0, r3
800e878: f001 fd7a bl 8010370 <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);
800e87c: 697b ldr r3, [r7, #20]
800e87e: 330e adds r3, #14
800e880: 6aba ldr r2, [r7, #40] ; 0x28
800e882: 6812 ldr r2, [r2, #0]
800e884: 601a str r2, [r3, #0]
IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->dipaddr, ipdst_addr);
800e886: 697b ldr r3, [r7, #20]
800e888: 3318 adds r3, #24
800e88a: 6b3a ldr r2, [r7, #48] ; 0x30
800e88c: 6812 ldr r2, [r2, #0]
800e88e: 601a str r2, [r3, #0]
hdr->hwtype = PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET);
800e890: 697b ldr r3, [r7, #20]
800e892: 2200 movs r2, #0
800e894: 701a strb r2, [r3, #0]
800e896: 2200 movs r2, #0
800e898: f042 0201 orr.w r2, r2, #1
800e89c: 705a strb r2, [r3, #1]
hdr->proto = PP_HTONS(ETHTYPE_IP);
800e89e: 697b ldr r3, [r7, #20]
800e8a0: 2200 movs r2, #0
800e8a2: f042 0208 orr.w r2, r2, #8
800e8a6: 709a strb r2, [r3, #2]
800e8a8: 2200 movs r2, #0
800e8aa: 70da strb r2, [r3, #3]
/* set hwlen and protolen */
hdr->hwlen = ETH_HWADDR_LEN;
800e8ac: 697b ldr r3, [r7, #20]
800e8ae: 2206 movs r2, #6
800e8b0: 711a strb r2, [r3, #4]
hdr->protolen = sizeof(ip4_addr_t);
800e8b2: 697b ldr r3, [r7, #20]
800e8b4: 2204 movs r2, #4
800e8b6: 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);
800e8b8: f640 0306 movw r3, #2054 ; 0x806
800e8bc: 9300 str r3, [sp, #0]
800e8be: 687b ldr r3, [r7, #4]
800e8c0: 68ba ldr r2, [r7, #8]
800e8c2: 69b9 ldr r1, [r7, #24]
800e8c4: 68f8 ldr r0, [r7, #12]
800e8c6: f001 fcd7 bl 8010278 <ethernet_output>
}
ETHARP_STATS_INC(etharp.xmit);
/* free ARP query packet */
pbuf_free(p);
800e8ca: 69b8 ldr r0, [r7, #24]
800e8cc: f7f7 f864 bl 8005998 <pbuf_free>
p = NULL;
800e8d0: 2300 movs r3, #0
800e8d2: 61bb str r3, [r7, #24]
/* could not allocate pbuf for ARP request */
return result;
800e8d4: f997 301f ldrsb.w r3, [r7, #31]
}
800e8d8: 4618 mov r0, r3
800e8da: 3720 adds r7, #32
800e8dc: 46bd mov sp, r7
800e8de: bd80 pop {r7, pc}
800e8e0: 080175ac .word 0x080175ac
800e8e4: 080176fc .word 0x080176fc
800e8e8: 08017624 .word 0x08017624
800e8ec: 080177ac .word 0x080177ac
800e8f0: 080177e0 .word 0x080177e0
0800e8f4 <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)
{
800e8f4: b580 push {r7, lr}
800e8f6: b088 sub sp, #32
800e8f8: af04 add r7, sp, #16
800e8fa: 60f8 str r0, [r7, #12]
800e8fc: 60b9 str r1, [r7, #8]
800e8fe: 607a str r2, [r7, #4]
return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr,
800e900: 68fb ldr r3, [r7, #12]
800e902: f103 012a add.w r1, r3, #42 ; 0x2a
(struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), &ethzero,
800e906: 68fb ldr r3, [r7, #12]
800e908: f103 002a add.w r0, r3, #42 ; 0x2a
800e90c: 68fb ldr r3, [r7, #12]
800e90e: 3304 adds r3, #4
return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr,
800e910: 2201 movs r2, #1
800e912: 9203 str r2, [sp, #12]
800e914: 68ba ldr r2, [r7, #8]
800e916: 9202 str r2, [sp, #8]
800e918: 4a06 ldr r2, [pc, #24] ; (800e934 <etharp_request_dst+0x40>)
800e91a: 9201 str r2, [sp, #4]
800e91c: 9300 str r3, [sp, #0]
800e91e: 4603 mov r3, r0
800e920: 687a ldr r2, [r7, #4]
800e922: 68f8 ldr r0, [r7, #12]
800e924: f7ff ff5a bl 800e7dc <etharp_raw>
800e928: 4603 mov r3, r0
ipaddr, ARP_REQUEST);
}
800e92a: 4618 mov r0, r3
800e92c: 3710 adds r7, #16
800e92e: 46bd mov sp, r7
800e930: bd80 pop {r7, pc}
800e932: bf00 nop
800e934: 08017dec .word 0x08017dec
0800e938 <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)
{
800e938: b580 push {r7, lr}
800e93a: b082 sub sp, #8
800e93c: af00 add r7, sp, #0
800e93e: 6078 str r0, [r7, #4]
800e940: 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);
800e942: 4a05 ldr r2, [pc, #20] ; (800e958 <etharp_request+0x20>)
800e944: 6839 ldr r1, [r7, #0]
800e946: 6878 ldr r0, [r7, #4]
800e948: f7ff ffd4 bl 800e8f4 <etharp_request_dst>
800e94c: 4603 mov r3, r0
}
800e94e: 4618 mov r0, r3
800e950: 3708 adds r7, #8
800e952: 46bd mov sp, r7
800e954: bd80 pop {r7, pc}
800e956: bf00 nop
800e958: 08017de4 .word 0x08017de4
0800e95c <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)
{
800e95c: b580 push {r7, lr}
800e95e: b08e sub sp, #56 ; 0x38
800e960: af04 add r7, sp, #16
800e962: 6078 str r0, [r7, #4]
800e964: 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();
800e966: 4b79 ldr r3, [pc, #484] ; (800eb4c <icmp_input+0x1f0>)
800e968: 689b ldr r3, [r3, #8]
800e96a: 627b str r3, [r7, #36] ; 0x24
hlen = IPH_HL_BYTES(iphdr_in);
800e96c: 6a7b ldr r3, [r7, #36] ; 0x24
800e96e: 781b ldrb r3, [r3, #0]
800e970: f003 030f and.w r3, r3, #15
800e974: b2db uxtb r3, r3
800e976: 009b lsls r3, r3, #2
800e978: b2db uxtb r3, r3
800e97a: 847b strh r3, [r7, #34] ; 0x22
if (hlen < IP_HLEN) {
800e97c: 8c7b ldrh r3, [r7, #34] ; 0x22
800e97e: 2b13 cmp r3, #19
800e980: f240 80cd bls.w 800eb1e <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) {
800e984: 687b ldr r3, [r7, #4]
800e986: 895b ldrh r3, [r3, #10]
800e988: 2b03 cmp r3, #3
800e98a: f240 80ca bls.w 800eb22 <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);
800e98e: 687b ldr r3, [r7, #4]
800e990: 685b ldr r3, [r3, #4]
800e992: 781b ldrb r3, [r3, #0]
800e994: 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) {
800e998: f897 3021 ldrb.w r3, [r7, #33] ; 0x21
800e99c: 2b00 cmp r3, #0
800e99e: f000 80b7 beq.w 800eb10 <icmp_input+0x1b4>
800e9a2: 2b08 cmp r3, #8
800e9a4: f040 80b7 bne.w 800eb16 <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();
800e9a8: 4b69 ldr r3, [pc, #420] ; (800eb50 <icmp_input+0x1f4>)
800e9aa: 61fb str r3, [r7, #28]
/* multicast destination address? */
if (ip4_addr_ismulticast(ip4_current_dest_addr())) {
800e9ac: 4b67 ldr r3, [pc, #412] ; (800eb4c <icmp_input+0x1f0>)
800e9ae: 695b ldr r3, [r3, #20]
800e9b0: f003 03f0 and.w r3, r3, #240 ; 0xf0
800e9b4: 2be0 cmp r3, #224 ; 0xe0
800e9b6: f000 80bb beq.w 800eb30 <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())) {
800e9ba: 4b64 ldr r3, [pc, #400] ; (800eb4c <icmp_input+0x1f0>)
800e9bc: 695b ldr r3, [r3, #20]
800e9be: 4a63 ldr r2, [pc, #396] ; (800eb4c <icmp_input+0x1f0>)
800e9c0: 6812 ldr r2, [r2, #0]
800e9c2: 4611 mov r1, r2
800e9c4: 4618 mov r0, r3
800e9c6: f000 fc0b bl 800f1e0 <ip4_addr_isbroadcast_u32>
800e9ca: 4603 mov r3, r0
800e9cc: 2b00 cmp r3, #0
800e9ce: f040 80b1 bne.w 800eb34 <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)) {
800e9d2: 687b ldr r3, [r7, #4]
800e9d4: 891b ldrh r3, [r3, #8]
800e9d6: 2b07 cmp r3, #7
800e9d8: f240 80a5 bls.w 800eb26 <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)) {
800e9dc: 8c7b ldrh r3, [r7, #34] ; 0x22
800e9de: 330e adds r3, #14
800e9e0: 4619 mov r1, r3
800e9e2: 6878 ldr r0, [r7, #4]
800e9e4: f7f6 ff42 bl 800586c <pbuf_add_header>
800e9e8: 4603 mov r3, r0
800e9ea: 2b00 cmp r3, #0
800e9ec: d04b beq.n 800ea86 <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);
800e9ee: 687b ldr r3, [r7, #4]
800e9f0: 891a ldrh r2, [r3, #8]
800e9f2: 8c7b ldrh r3, [r7, #34] ; 0x22
800e9f4: 4413 add r3, r2
800e9f6: 837b strh r3, [r7, #26]
if (alloc_len < p->tot_len) {
800e9f8: 687b ldr r3, [r7, #4]
800e9fa: 891b ldrh r3, [r3, #8]
800e9fc: 8b7a ldrh r2, [r7, #26]
800e9fe: 429a cmp r2, r3
800ea00: f0c0 809a bcc.w 800eb38 <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);
800ea04: 8b7b ldrh r3, [r7, #26]
800ea06: f44f 7220 mov.w r2, #640 ; 0x280
800ea0a: 4619 mov r1, r3
800ea0c: 200e movs r0, #14
800ea0e: f7f6 fcdf bl 80053d0 <pbuf_alloc>
800ea12: 6178 str r0, [r7, #20]
if (r == NULL) {
800ea14: 697b ldr r3, [r7, #20]
800ea16: 2b00 cmp r3, #0
800ea18: f000 8090 beq.w 800eb3c <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)) {
800ea1c: 697b ldr r3, [r7, #20]
800ea1e: 895b ldrh r3, [r3, #10]
800ea20: 461a mov r2, r3
800ea22: 8c7b ldrh r3, [r7, #34] ; 0x22
800ea24: 3308 adds r3, #8
800ea26: 429a cmp r2, r3
800ea28: d203 bcs.n 800ea32 <icmp_input+0xd6>
LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("first pbuf cannot hold the ICMP header"));
pbuf_free(r);
800ea2a: 6978 ldr r0, [r7, #20]
800ea2c: f7f6 ffb4 bl 8005998 <pbuf_free>
goto icmperr;
800ea30: e085 b.n 800eb3e <icmp_input+0x1e2>
}
/* copy the ip header */
MEMCPY(r->payload, iphdr_in, hlen);
800ea32: 697b ldr r3, [r7, #20]
800ea34: 685b ldr r3, [r3, #4]
800ea36: 8c7a ldrh r2, [r7, #34] ; 0x22
800ea38: 6a79 ldr r1, [r7, #36] ; 0x24
800ea3a: 4618 mov r0, r3
800ea3c: f001 fc98 bl 8010370 <memcpy>
/* switch r->payload back to icmp header (cannot fail) */
if (pbuf_remove_header(r, hlen)) {
800ea40: 8c7b ldrh r3, [r7, #34] ; 0x22
800ea42: 4619 mov r1, r3
800ea44: 6978 ldr r0, [r7, #20]
800ea46: f7f6 ff21 bl 800588c <pbuf_remove_header>
800ea4a: 4603 mov r3, r0
800ea4c: 2b00 cmp r3, #0
800ea4e: d009 beq.n 800ea64 <icmp_input+0x108>
LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0);
800ea50: 4b40 ldr r3, [pc, #256] ; (800eb54 <icmp_input+0x1f8>)
800ea52: 22b6 movs r2, #182 ; 0xb6
800ea54: 4940 ldr r1, [pc, #256] ; (800eb58 <icmp_input+0x1fc>)
800ea56: 4841 ldr r0, [pc, #260] ; (800eb5c <icmp_input+0x200>)
800ea58: f001 fcba bl 80103d0 <printf>
pbuf_free(r);
800ea5c: 6978 ldr r0, [r7, #20]
800ea5e: f7f6 ff9b bl 8005998 <pbuf_free>
goto icmperr;
800ea62: e06c b.n 800eb3e <icmp_input+0x1e2>
}
/* copy the rest of the packet without ip header */
if (pbuf_copy(r, p) != ERR_OK) {
800ea64: 6879 ldr r1, [r7, #4]
800ea66: 6978 ldr r0, [r7, #20]
800ea68: f7f7 f8be bl 8005be8 <pbuf_copy>
800ea6c: 4603 mov r3, r0
800ea6e: 2b00 cmp r3, #0
800ea70: d003 beq.n 800ea7a <icmp_input+0x11e>
LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("icmp_input: copying to new pbuf failed"));
pbuf_free(r);
800ea72: 6978 ldr r0, [r7, #20]
800ea74: f7f6 ff90 bl 8005998 <pbuf_free>
goto icmperr;
800ea78: e061 b.n 800eb3e <icmp_input+0x1e2>
}
/* free the original p */
pbuf_free(p);
800ea7a: 6878 ldr r0, [r7, #4]
800ea7c: f7f6 ff8c bl 8005998 <pbuf_free>
/* we now have an identical copy of p that has room for link headers */
p = r;
800ea80: 697b ldr r3, [r7, #20]
800ea82: 607b str r3, [r7, #4]
800ea84: e00f b.n 800eaa6 <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)) {
800ea86: 8c7b ldrh r3, [r7, #34] ; 0x22
800ea88: 330e adds r3, #14
800ea8a: 4619 mov r1, r3
800ea8c: 6878 ldr r0, [r7, #4]
800ea8e: f7f6 fefd bl 800588c <pbuf_remove_header>
800ea92: 4603 mov r3, r0
800ea94: 2b00 cmp r3, #0
800ea96: d006 beq.n 800eaa6 <icmp_input+0x14a>
LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0);
800ea98: 4b2e ldr r3, [pc, #184] ; (800eb54 <icmp_input+0x1f8>)
800ea9a: 22c7 movs r2, #199 ; 0xc7
800ea9c: 4930 ldr r1, [pc, #192] ; (800eb60 <icmp_input+0x204>)
800ea9e: 482f ldr r0, [pc, #188] ; (800eb5c <icmp_input+0x200>)
800eaa0: f001 fc96 bl 80103d0 <printf>
goto icmperr;
800eaa4: e04b b.n 800eb3e <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;
800eaa6: 687b ldr r3, [r7, #4]
800eaa8: 685b ldr r3, [r3, #4]
800eaaa: 613b str r3, [r7, #16]
if (pbuf_add_header(p, hlen)) {
800eaac: 8c7b ldrh r3, [r7, #34] ; 0x22
800eaae: 4619 mov r1, r3
800eab0: 6878 ldr r0, [r7, #4]
800eab2: f7f6 fedb bl 800586c <pbuf_add_header>
800eab6: 4603 mov r3, r0
800eab8: 2b00 cmp r3, #0
800eaba: d12b bne.n 800eb14 <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;
800eabc: 687b ldr r3, [r7, #4]
800eabe: 685b ldr r3, [r3, #4]
800eac0: 60fb str r3, [r7, #12]
ip4_addr_copy(iphdr->src, *src);
800eac2: 69fb ldr r3, [r7, #28]
800eac4: 681a ldr r2, [r3, #0]
800eac6: 68fb ldr r3, [r7, #12]
800eac8: 60da str r2, [r3, #12]
ip4_addr_copy(iphdr->dest, *ip4_current_src_addr());
800eaca: 4b20 ldr r3, [pc, #128] ; (800eb4c <icmp_input+0x1f0>)
800eacc: 691a ldr r2, [r3, #16]
800eace: 68fb ldr r3, [r7, #12]
800ead0: 611a str r2, [r3, #16]
ICMPH_TYPE_SET(iecho, ICMP_ER);
800ead2: 693b ldr r3, [r7, #16]
800ead4: 2200 movs r2, #0
800ead6: 701a strb r2, [r3, #0]
else {
iecho->chksum = 0;
}
#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */
#else /* CHECKSUM_GEN_ICMP */
iecho->chksum = 0;
800ead8: 693b ldr r3, [r7, #16]
800eada: 2200 movs r2, #0
800eadc: 709a strb r2, [r3, #2]
800eade: 2200 movs r2, #0
800eae0: 70da strb r2, [r3, #3]
#endif /* CHECKSUM_GEN_ICMP */
/* Set the correct TTL and recalculate the header checksum. */
IPH_TTL_SET(iphdr, ICMP_TTL);
800eae2: 68fb ldr r3, [r7, #12]
800eae4: 22ff movs r2, #255 ; 0xff
800eae6: 721a strb r2, [r3, #8]
IPH_CHKSUM_SET(iphdr, 0);
800eae8: 68fb ldr r3, [r7, #12]
800eaea: 2200 movs r2, #0
800eaec: 729a strb r2, [r3, #10]
800eaee: 2200 movs r2, #0
800eaf0: 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,
800eaf2: 683b ldr r3, [r7, #0]
800eaf4: 9302 str r3, [sp, #8]
800eaf6: 2301 movs r3, #1
800eaf8: 9301 str r3, [sp, #4]
800eafa: 2300 movs r3, #0
800eafc: 9300 str r3, [sp, #0]
800eafe: 23ff movs r3, #255 ; 0xff
800eb00: 2200 movs r2, #0
800eb02: 69f9 ldr r1, [r7, #28]
800eb04: 6878 ldr r0, [r7, #4]
800eb06: f000 fa93 bl 800f030 <ip4_output_if>
800eb0a: 4603 mov r3, r0
800eb0c: 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;
800eb0e: e001 b.n 800eb14 <icmp_input+0x1b8>
break;
800eb10: bf00 nop
800eb12: e000 b.n 800eb16 <icmp_input+0x1ba>
break;
800eb14: 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);
800eb16: 6878 ldr r0, [r7, #4]
800eb18: f7f6 ff3e bl 8005998 <pbuf_free>
return;
800eb1c: e013 b.n 800eb46 <icmp_input+0x1ea>
goto lenerr;
800eb1e: bf00 nop
800eb20: e002 b.n 800eb28 <icmp_input+0x1cc>
goto lenerr;
800eb22: bf00 nop
800eb24: e000 b.n 800eb28 <icmp_input+0x1cc>
goto lenerr;
800eb26: bf00 nop
lenerr:
pbuf_free(p);
800eb28: 6878 ldr r0, [r7, #4]
800eb2a: f7f6 ff35 bl 8005998 <pbuf_free>
ICMP_STATS_INC(icmp.lenerr);
MIB2_STATS_INC(mib2.icmpinerrors);
return;
800eb2e: e00a b.n 800eb46 <icmp_input+0x1ea>
goto icmperr;
800eb30: bf00 nop
800eb32: e004 b.n 800eb3e <icmp_input+0x1e2>
goto icmperr;
800eb34: bf00 nop
800eb36: e002 b.n 800eb3e <icmp_input+0x1e2>
goto icmperr;
800eb38: bf00 nop
800eb3a: e000 b.n 800eb3e <icmp_input+0x1e2>
goto icmperr;
800eb3c: bf00 nop
#if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING
icmperr:
pbuf_free(p);
800eb3e: 6878 ldr r0, [r7, #4]
800eb40: f7f6 ff2a bl 8005998 <pbuf_free>
ICMP_STATS_INC(icmp.err);
MIB2_STATS_INC(mib2.icmpinerrors);
return;
800eb44: bf00 nop
#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING */
}
800eb46: 3728 adds r7, #40 ; 0x28
800eb48: 46bd mov sp, r7
800eb4a: bd80 pop {r7, pc}
800eb4c: 20005670 .word 0x20005670
800eb50: 20005684 .word 0x20005684
800eb54: 08017824 .word 0x08017824
800eb58: 0801785c .word 0x0801785c
800eb5c: 08017894 .word 0x08017894
800eb60: 080178bc .word 0x080178bc
0800eb64 <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)
{
800eb64: b580 push {r7, lr}
800eb66: b082 sub sp, #8
800eb68: af00 add r7, sp, #0
800eb6a: 6078 str r0, [r7, #4]
800eb6c: 460b mov r3, r1
800eb6e: 70fb strb r3, [r7, #3]
MIB2_STATS_INC(mib2.icmpoutdestunreachs);
icmp_send_response(p, ICMP_DUR, t);
800eb70: 78fb ldrb r3, [r7, #3]
800eb72: 461a mov r2, r3
800eb74: 2103 movs r1, #3
800eb76: 6878 ldr r0, [r7, #4]
800eb78: f000 f814 bl 800eba4 <icmp_send_response>
}
800eb7c: bf00 nop
800eb7e: 3708 adds r7, #8
800eb80: 46bd mov sp, r7
800eb82: bd80 pop {r7, pc}
0800eb84 <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)
{
800eb84: b580 push {r7, lr}
800eb86: b082 sub sp, #8
800eb88: af00 add r7, sp, #0
800eb8a: 6078 str r0, [r7, #4]
800eb8c: 460b mov r3, r1
800eb8e: 70fb strb r3, [r7, #3]
MIB2_STATS_INC(mib2.icmpouttimeexcds);
icmp_send_response(p, ICMP_TE, t);
800eb90: 78fb ldrb r3, [r7, #3]
800eb92: 461a mov r2, r3
800eb94: 210b movs r1, #11
800eb96: 6878 ldr r0, [r7, #4]
800eb98: f000 f804 bl 800eba4 <icmp_send_response>
}
800eb9c: bf00 nop
800eb9e: 3708 adds r7, #8
800eba0: 46bd mov sp, r7
800eba2: bd80 pop {r7, pc}
0800eba4 <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)
{
800eba4: b580 push {r7, lr}
800eba6: b08c sub sp, #48 ; 0x30
800eba8: af04 add r7, sp, #16
800ebaa: 6078 str r0, [r7, #4]
800ebac: 460b mov r3, r1
800ebae: 70fb strb r3, [r7, #3]
800ebb0: 4613 mov r3, r2
800ebb2: 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,
800ebb4: f44f 7220 mov.w r2, #640 ; 0x280
800ebb8: 2124 movs r1, #36 ; 0x24
800ebba: 2022 movs r0, #34 ; 0x22
800ebbc: f7f6 fc08 bl 80053d0 <pbuf_alloc>
800ebc0: 61f8 str r0, [r7, #28]
PBUF_RAM);
if (q == NULL) {
800ebc2: 69fb ldr r3, [r7, #28]
800ebc4: 2b00 cmp r3, #0
800ebc6: d04c beq.n 800ec62 <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",
800ebc8: 69fb ldr r3, [r7, #28]
800ebca: 895b ldrh r3, [r3, #10]
800ebcc: 2b23 cmp r3, #35 ; 0x23
800ebce: d806 bhi.n 800ebde <icmp_send_response+0x3a>
800ebd0: 4b26 ldr r3, [pc, #152] ; (800ec6c <icmp_send_response+0xc8>)
800ebd2: f44f 72b4 mov.w r2, #360 ; 0x168
800ebd6: 4926 ldr r1, [pc, #152] ; (800ec70 <icmp_send_response+0xcc>)
800ebd8: 4826 ldr r0, [pc, #152] ; (800ec74 <icmp_send_response+0xd0>)
800ebda: f001 fbf9 bl 80103d0 <printf>
(q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE)));
iphdr = (struct ip_hdr *)p->payload;
800ebde: 687b ldr r3, [r7, #4]
800ebe0: 685b ldr r3, [r3, #4]
800ebe2: 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;
800ebe4: 69fb ldr r3, [r7, #28]
800ebe6: 685b ldr r3, [r3, #4]
800ebe8: 617b str r3, [r7, #20]
icmphdr->type = type;
800ebea: 697b ldr r3, [r7, #20]
800ebec: 78fa ldrb r2, [r7, #3]
800ebee: 701a strb r2, [r3, #0]
icmphdr->code = code;
800ebf0: 697b ldr r3, [r7, #20]
800ebf2: 78ba ldrb r2, [r7, #2]
800ebf4: 705a strb r2, [r3, #1]
icmphdr->id = 0;
800ebf6: 697b ldr r3, [r7, #20]
800ebf8: 2200 movs r2, #0
800ebfa: 711a strb r2, [r3, #4]
800ebfc: 2200 movs r2, #0
800ebfe: 715a strb r2, [r3, #5]
icmphdr->seqno = 0;
800ec00: 697b ldr r3, [r7, #20]
800ec02: 2200 movs r2, #0
800ec04: 719a strb r2, [r3, #6]
800ec06: 2200 movs r2, #0
800ec08: 71da strb r2, [r3, #7]
/* copy fields from original packet */
SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload,
800ec0a: 69fb ldr r3, [r7, #28]
800ec0c: 685b ldr r3, [r3, #4]
800ec0e: f103 0008 add.w r0, r3, #8
800ec12: 687b ldr r3, [r7, #4]
800ec14: 685b ldr r3, [r3, #4]
800ec16: 221c movs r2, #28
800ec18: 4619 mov r1, r3
800ec1a: f001 fba9 bl 8010370 <memcpy>
IP_HLEN + ICMP_DEST_UNREACH_DATASIZE);
ip4_addr_copy(iphdr_src, iphdr->src);
800ec1e: 69bb ldr r3, [r7, #24]
800ec20: 68db ldr r3, [r3, #12]
800ec22: 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);
800ec24: f107 030c add.w r3, r7, #12
800ec28: 4618 mov r0, r3
800ec2a: f000 f825 bl 800ec78 <ip4_route>
800ec2e: 6138 str r0, [r7, #16]
#endif
if (netif != NULL) {
800ec30: 693b ldr r3, [r7, #16]
800ec32: 2b00 cmp r3, #0
800ec34: d011 beq.n 800ec5a <icmp_send_response+0xb6>
/* calculate checksum */
icmphdr->chksum = 0;
800ec36: 697b ldr r3, [r7, #20]
800ec38: 2200 movs r2, #0
800ec3a: 709a strb r2, [r3, #2]
800ec3c: 2200 movs r2, #0
800ec3e: 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);
800ec40: f107 020c add.w r2, r7, #12
800ec44: 693b ldr r3, [r7, #16]
800ec46: 9302 str r3, [sp, #8]
800ec48: 2301 movs r3, #1
800ec4a: 9301 str r3, [sp, #4]
800ec4c: 2300 movs r3, #0
800ec4e: 9300 str r3, [sp, #0]
800ec50: 23ff movs r3, #255 ; 0xff
800ec52: 2100 movs r1, #0
800ec54: 69f8 ldr r0, [r7, #28]
800ec56: f000 f9eb bl 800f030 <ip4_output_if>
}
pbuf_free(q);
800ec5a: 69f8 ldr r0, [r7, #28]
800ec5c: f7f6 fe9c bl 8005998 <pbuf_free>
800ec60: e000 b.n 800ec64 <icmp_send_response+0xc0>
return;
800ec62: bf00 nop
}
800ec64: 3720 adds r7, #32
800ec66: 46bd mov sp, r7
800ec68: bd80 pop {r7, pc}
800ec6a: bf00 nop
800ec6c: 08017824 .word 0x08017824
800ec70: 080178f0 .word 0x080178f0
800ec74: 08017894 .word 0x08017894
0800ec78 <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)
{
800ec78: b480 push {r7}
800ec7a: b085 sub sp, #20
800ec7c: af00 add r7, sp, #0
800ec7e: 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) {
800ec80: 4b33 ldr r3, [pc, #204] ; (800ed50 <ip4_route+0xd8>)
800ec82: 681b ldr r3, [r3, #0]
800ec84: 60fb str r3, [r7, #12]
800ec86: e036 b.n 800ecf6 <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))) {
800ec88: 68fb ldr r3, [r7, #12]
800ec8a: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800ec8e: f003 0301 and.w r3, r3, #1
800ec92: b2db uxtb r3, r3
800ec94: 2b00 cmp r3, #0
800ec96: d02b beq.n 800ecf0 <ip4_route+0x78>
800ec98: 68fb ldr r3, [r7, #12]
800ec9a: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800ec9e: 089b lsrs r3, r3, #2
800eca0: f003 0301 and.w r3, r3, #1
800eca4: b2db uxtb r3, r3
800eca6: 2b00 cmp r3, #0
800eca8: d022 beq.n 800ecf0 <ip4_route+0x78>
800ecaa: 68fb ldr r3, [r7, #12]
800ecac: 3304 adds r3, #4
800ecae: 681b ldr r3, [r3, #0]
800ecb0: 2b00 cmp r3, #0
800ecb2: d01d beq.n 800ecf0 <ip4_route+0x78>
/* network mask matches? */
if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) {
800ecb4: 687b ldr r3, [r7, #4]
800ecb6: 681a ldr r2, [r3, #0]
800ecb8: 68fb ldr r3, [r7, #12]
800ecba: 3304 adds r3, #4
800ecbc: 681b ldr r3, [r3, #0]
800ecbe: 405a eors r2, r3
800ecc0: 68fb ldr r3, [r7, #12]
800ecc2: 3308 adds r3, #8
800ecc4: 681b ldr r3, [r3, #0]
800ecc6: 4013 ands r3, r2
800ecc8: 2b00 cmp r3, #0
800ecca: d101 bne.n 800ecd0 <ip4_route+0x58>
/* return netif on which to forward IP packet */
return netif;
800eccc: 68fb ldr r3, [r7, #12]
800ecce: e038 b.n 800ed42 <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))) {
800ecd0: 68fb ldr r3, [r7, #12]
800ecd2: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800ecd6: f003 0302 and.w r3, r3, #2
800ecda: 2b00 cmp r3, #0
800ecdc: d108 bne.n 800ecf0 <ip4_route+0x78>
800ecde: 687b ldr r3, [r7, #4]
800ece0: 681a ldr r2, [r3, #0]
800ece2: 68fb ldr r3, [r7, #12]
800ece4: 330c adds r3, #12
800ece6: 681b ldr r3, [r3, #0]
800ece8: 429a cmp r2, r3
800ecea: d101 bne.n 800ecf0 <ip4_route+0x78>
/* return netif on which to forward IP packet */
return netif;
800ecec: 68fb ldr r3, [r7, #12]
800ecee: e028 b.n 800ed42 <ip4_route+0xca>
NETIF_FOREACH(netif) {
800ecf0: 68fb ldr r3, [r7, #12]
800ecf2: 681b ldr r3, [r3, #0]
800ecf4: 60fb str r3, [r7, #12]
800ecf6: 68fb ldr r3, [r7, #12]
800ecf8: 2b00 cmp r3, #0
800ecfa: d1c5 bne.n 800ec88 <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) ||
800ecfc: 4b15 ldr r3, [pc, #84] ; (800ed54 <ip4_route+0xdc>)
800ecfe: 681b ldr r3, [r3, #0]
800ed00: 2b00 cmp r3, #0
800ed02: d01a beq.n 800ed3a <ip4_route+0xc2>
800ed04: 4b13 ldr r3, [pc, #76] ; (800ed54 <ip4_route+0xdc>)
800ed06: 681b ldr r3, [r3, #0]
800ed08: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800ed0c: f003 0301 and.w r3, r3, #1
800ed10: 2b00 cmp r3, #0
800ed12: d012 beq.n 800ed3a <ip4_route+0xc2>
800ed14: 4b0f ldr r3, [pc, #60] ; (800ed54 <ip4_route+0xdc>)
800ed16: 681b ldr r3, [r3, #0]
800ed18: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800ed1c: f003 0304 and.w r3, r3, #4
800ed20: 2b00 cmp r3, #0
800ed22: d00a beq.n 800ed3a <ip4_route+0xc2>
ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) {
800ed24: 4b0b ldr r3, [pc, #44] ; (800ed54 <ip4_route+0xdc>)
800ed26: 681b ldr r3, [r3, #0]
800ed28: 3304 adds r3, #4
800ed2a: 681b ldr r3, [r3, #0]
if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) ||
800ed2c: 2b00 cmp r3, #0
800ed2e: d004 beq.n 800ed3a <ip4_route+0xc2>
ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) {
800ed30: 687b ldr r3, [r7, #4]
800ed32: 681b ldr r3, [r3, #0]
800ed34: b2db uxtb r3, r3
800ed36: 2b7f cmp r3, #127 ; 0x7f
800ed38: d101 bne.n 800ed3e <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;
800ed3a: 2300 movs r3, #0
800ed3c: e001 b.n 800ed42 <ip4_route+0xca>
}
return netif_default;
800ed3e: 4b05 ldr r3, [pc, #20] ; (800ed54 <ip4_route+0xdc>)
800ed40: 681b ldr r3, [r3, #0]
}
800ed42: 4618 mov r0, r3
800ed44: 3714 adds r7, #20
800ed46: 46bd mov sp, r7
800ed48: f85d 7b04 ldr.w r7, [sp], #4
800ed4c: 4770 bx lr
800ed4e: bf00 nop
800ed50: 20008bf4 .word 0x20008bf4
800ed54: 20008bf8 .word 0x20008bf8
0800ed58 <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)
{
800ed58: b580 push {r7, lr}
800ed5a: b082 sub sp, #8
800ed5c: af00 add r7, sp, #0
800ed5e: 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)))) {
800ed60: 687b ldr r3, [r7, #4]
800ed62: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800ed66: f003 0301 and.w r3, r3, #1
800ed6a: b2db uxtb r3, r3
800ed6c: 2b00 cmp r3, #0
800ed6e: d016 beq.n 800ed9e <ip4_input_accept+0x46>
800ed70: 687b ldr r3, [r7, #4]
800ed72: 3304 adds r3, #4
800ed74: 681b ldr r3, [r3, #0]
800ed76: 2b00 cmp r3, #0
800ed78: d011 beq.n 800ed9e <ip4_input_accept+0x46>
/* unicast to this interface address? */
if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) ||
800ed7a: 4b0b ldr r3, [pc, #44] ; (800eda8 <ip4_input_accept+0x50>)
800ed7c: 695a ldr r2, [r3, #20]
800ed7e: 687b ldr r3, [r7, #4]
800ed80: 3304 adds r3, #4
800ed82: 681b ldr r3, [r3, #0]
800ed84: 429a cmp r2, r3
800ed86: d008 beq.n 800ed9a <ip4_input_accept+0x42>
/* or broadcast on this interface network address? */
ip4_addr_isbroadcast(ip4_current_dest_addr(), netif)
800ed88: 4b07 ldr r3, [pc, #28] ; (800eda8 <ip4_input_accept+0x50>)
800ed8a: 695b ldr r3, [r3, #20]
800ed8c: 6879 ldr r1, [r7, #4]
800ed8e: 4618 mov r0, r3
800ed90: f000 fa26 bl 800f1e0 <ip4_addr_isbroadcast_u32>
800ed94: 4603 mov r3, r0
if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) ||
800ed96: 2b00 cmp r3, #0
800ed98: d001 beq.n 800ed9e <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;
800ed9a: 2301 movs r3, #1
800ed9c: e000 b.n 800eda0 <ip4_input_accept+0x48>
/* accept on this netif */
return 1;
}
#endif /* LWIP_AUTOIP */
}
return 0;
800ed9e: 2300 movs r3, #0
}
800eda0: 4618 mov r0, r3
800eda2: 3708 adds r7, #8
800eda4: 46bd mov sp, r7
800eda6: bd80 pop {r7, pc}
800eda8: 20005670 .word 0x20005670
0800edac <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)
{
800edac: b580 push {r7, lr}
800edae: b088 sub sp, #32
800edb0: af00 add r7, sp, #0
800edb2: 6078 str r0, [r7, #4]
800edb4: 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;
800edb6: 2301 movs r3, #1
800edb8: 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;
800edba: 687b ldr r3, [r7, #4]
800edbc: 685b ldr r3, [r3, #4]
800edbe: 61fb str r3, [r7, #28]
if (IPH_V(iphdr) != 4) {
800edc0: 69fb ldr r3, [r7, #28]
800edc2: 781b ldrb r3, [r3, #0]
800edc4: 091b lsrs r3, r3, #4
800edc6: b2db uxtb r3, r3
800edc8: 2b04 cmp r3, #4
800edca: d004 beq.n 800edd6 <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);
800edcc: 6878 ldr r0, [r7, #4]
800edce: f7f6 fde3 bl 8005998 <pbuf_free>
IP_STATS_INC(ip.err);
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipinhdrerrors);
return ERR_OK;
800edd2: 2300 movs r3, #0
800edd4: e123 b.n 800f01e <ip4_input+0x272>
return ERR_OK;
}
#endif
/* obtain IP header length in bytes */
iphdr_hlen = IPH_HL_BYTES(iphdr);
800edd6: 69fb ldr r3, [r7, #28]
800edd8: 781b ldrb r3, [r3, #0]
800edda: f003 030f and.w r3, r3, #15
800edde: b2db uxtb r3, r3
800ede0: 009b lsls r3, r3, #2
800ede2: b2db uxtb r3, r3
800ede4: 827b strh r3, [r7, #18]
/* obtain ip length in bytes */
iphdr_len = lwip_ntohs(IPH_LEN(iphdr));
800ede6: 69fb ldr r3, [r7, #28]
800ede8: 885b ldrh r3, [r3, #2]
800edea: b29b uxth r3, r3
800edec: 4618 mov r0, r3
800edee: f7f5 fa69 bl 80042c4 <lwip_htons>
800edf2: 4603 mov r3, r0
800edf4: 823b strh r3, [r7, #16]
/* Trim pbuf. This is especially required for packets < 60 bytes. */
if (iphdr_len < p->tot_len) {
800edf6: 687b ldr r3, [r7, #4]
800edf8: 891b ldrh r3, [r3, #8]
800edfa: 8a3a ldrh r2, [r7, #16]
800edfc: 429a cmp r2, r3
800edfe: d204 bcs.n 800ee0a <ip4_input+0x5e>
pbuf_realloc(p, iphdr_len);
800ee00: 8a3b ldrh r3, [r7, #16]
800ee02: 4619 mov r1, r3
800ee04: 6878 ldr r0, [r7, #4]
800ee06: f7f6 fc41 bl 800568c <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)) {
800ee0a: 687b ldr r3, [r7, #4]
800ee0c: 895b ldrh r3, [r3, #10]
800ee0e: 8a7a ldrh r2, [r7, #18]
800ee10: 429a cmp r2, r3
800ee12: d807 bhi.n 800ee24 <ip4_input+0x78>
800ee14: 687b ldr r3, [r7, #4]
800ee16: 891b ldrh r3, [r3, #8]
800ee18: 8a3a ldrh r2, [r7, #16]
800ee1a: 429a cmp r2, r3
800ee1c: d802 bhi.n 800ee24 <ip4_input+0x78>
800ee1e: 8a7b ldrh r3, [r7, #18]
800ee20: 2b13 cmp r3, #19
800ee22: d804 bhi.n 800ee2e <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);
800ee24: 6878 ldr r0, [r7, #4]
800ee26: f7f6 fdb7 bl 8005998 <pbuf_free>
IP_STATS_INC(ip.lenerr);
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipindiscards);
return ERR_OK;
800ee2a: 2300 movs r3, #0
800ee2c: e0f7 b.n 800f01e <ip4_input+0x272>
}
}
#endif
/* copy IP addresses to aligned ip_addr_t */
ip_addr_copy_from_ip4(ip_data.current_iphdr_dest, iphdr->dest);
800ee2e: 69fb ldr r3, [r7, #28]
800ee30: 691b ldr r3, [r3, #16]
800ee32: 4a7d ldr r2, [pc, #500] ; (800f028 <ip4_input+0x27c>)
800ee34: 6153 str r3, [r2, #20]
ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src);
800ee36: 69fb ldr r3, [r7, #28]
800ee38: 68db ldr r3, [r3, #12]
800ee3a: 4a7b ldr r2, [pc, #492] ; (800f028 <ip4_input+0x27c>)
800ee3c: 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())) {
800ee3e: 4b7a ldr r3, [pc, #488] ; (800f028 <ip4_input+0x27c>)
800ee40: 695b ldr r3, [r3, #20]
800ee42: f003 03f0 and.w r3, r3, #240 ; 0xf0
800ee46: 2be0 cmp r3, #224 ; 0xe0
800ee48: d112 bne.n 800ee70 <ip4_input+0xc4>
netif = inp;
} else {
netif = NULL;
}
#else /* LWIP_IGMP */
if ((netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) {
800ee4a: 683b ldr r3, [r7, #0]
800ee4c: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800ee50: f003 0301 and.w r3, r3, #1
800ee54: b2db uxtb r3, r3
800ee56: 2b00 cmp r3, #0
800ee58: d007 beq.n 800ee6a <ip4_input+0xbe>
800ee5a: 683b ldr r3, [r7, #0]
800ee5c: 3304 adds r3, #4
800ee5e: 681b ldr r3, [r3, #0]
800ee60: 2b00 cmp r3, #0
800ee62: d002 beq.n 800ee6a <ip4_input+0xbe>
netif = inp;
800ee64: 683b ldr r3, [r7, #0]
800ee66: 61bb str r3, [r7, #24]
800ee68: e02a b.n 800eec0 <ip4_input+0x114>
} else {
netif = NULL;
800ee6a: 2300 movs r3, #0
800ee6c: 61bb str r3, [r7, #24]
800ee6e: e027 b.n 800eec0 <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)) {
800ee70: 6838 ldr r0, [r7, #0]
800ee72: f7ff ff71 bl 800ed58 <ip4_input_accept>
800ee76: 4603 mov r3, r0
800ee78: 2b00 cmp r3, #0
800ee7a: d002 beq.n 800ee82 <ip4_input+0xd6>
netif = inp;
800ee7c: 683b ldr r3, [r7, #0]
800ee7e: 61bb str r3, [r7, #24]
800ee80: e01e b.n 800eec0 <ip4_input+0x114>
} else {
netif = NULL;
800ee82: 2300 movs r3, #0
800ee84: 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()))
800ee86: 4b68 ldr r3, [pc, #416] ; (800f028 <ip4_input+0x27c>)
800ee88: 695b ldr r3, [r3, #20]
800ee8a: b2db uxtb r3, r3
800ee8c: 2b7f cmp r3, #127 ; 0x7f
800ee8e: d017 beq.n 800eec0 <ip4_input+0x114>
#endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */
{
#if !LWIP_SINGLE_NETIF
NETIF_FOREACH(netif) {
800ee90: 4b66 ldr r3, [pc, #408] ; (800f02c <ip4_input+0x280>)
800ee92: 681b ldr r3, [r3, #0]
800ee94: 61bb str r3, [r7, #24]
800ee96: e00e b.n 800eeb6 <ip4_input+0x10a>
if (netif == inp) {
800ee98: 69ba ldr r2, [r7, #24]
800ee9a: 683b ldr r3, [r7, #0]
800ee9c: 429a cmp r2, r3
800ee9e: d006 beq.n 800eeae <ip4_input+0x102>
/* we checked that before already */
continue;
}
if (ip4_input_accept(netif)) {
800eea0: 69b8 ldr r0, [r7, #24]
800eea2: f7ff ff59 bl 800ed58 <ip4_input_accept>
800eea6: 4603 mov r3, r0
800eea8: 2b00 cmp r3, #0
800eeaa: d108 bne.n 800eebe <ip4_input+0x112>
800eeac: e000 b.n 800eeb0 <ip4_input+0x104>
continue;
800eeae: bf00 nop
NETIF_FOREACH(netif) {
800eeb0: 69bb ldr r3, [r7, #24]
800eeb2: 681b ldr r3, [r3, #0]
800eeb4: 61bb str r3, [r7, #24]
800eeb6: 69bb ldr r3, [r7, #24]
800eeb8: 2b00 cmp r3, #0
800eeba: d1ed bne.n 800ee98 <ip4_input+0xec>
800eebc: e000 b.n 800eec0 <ip4_input+0x114>
break;
800eebe: 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) {
800eec0: 69bb ldr r3, [r7, #24]
800eec2: 2b00 cmp r3, #0
800eec4: d111 bne.n 800eeea <ip4_input+0x13e>
/* remote port is DHCP server? */
if (IPH_PROTO(iphdr) == IP_PROTO_UDP) {
800eec6: 69fb ldr r3, [r7, #28]
800eec8: 7a5b ldrb r3, [r3, #9]
800eeca: 2b11 cmp r3, #17
800eecc: d10d bne.n 800eeea <ip4_input+0x13e>
const struct udp_hdr *udphdr = (const struct udp_hdr *)((const u8_t *)iphdr + iphdr_hlen);
800eece: 8a7b ldrh r3, [r7, #18]
800eed0: 69fa ldr r2, [r7, #28]
800eed2: 4413 add r3, r2
800eed4: 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)) {
800eed6: 68fb ldr r3, [r7, #12]
800eed8: 885b ldrh r3, [r3, #2]
800eeda: b29b uxth r3, r3
800eedc: f5b3 4f88 cmp.w r3, #17408 ; 0x4400
800eee0: d103 bne.n 800eeea <ip4_input+0x13e>
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: DHCP packet accepted.\n"));
netif = inp;
800eee2: 683b ldr r3, [r7, #0]
800eee4: 61bb str r3, [r7, #24]
check_ip_src = 0;
800eee6: 2300 movs r3, #0
800eee8: 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
800eeea: 697b ldr r3, [r7, #20]
800eeec: 2b00 cmp r3, #0
800eeee: d017 beq.n 800ef20 <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())
800eef0: 4b4d ldr r3, [pc, #308] ; (800f028 <ip4_input+0x27c>)
800eef2: 691b ldr r3, [r3, #16]
800eef4: 2b00 cmp r3, #0
800eef6: d013 beq.n 800ef20 <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)) ||
800eef8: 4b4b ldr r3, [pc, #300] ; (800f028 <ip4_input+0x27c>)
800eefa: 691b ldr r3, [r3, #16]
800eefc: 6839 ldr r1, [r7, #0]
800eefe: 4618 mov r0, r3
800ef00: f000 f96e bl 800f1e0 <ip4_addr_isbroadcast_u32>
800ef04: 4603 mov r3, r0
800ef06: 2b00 cmp r3, #0
800ef08: d105 bne.n 800ef16 <ip4_input+0x16a>
(ip4_addr_ismulticast(ip4_current_src_addr()))) {
800ef0a: 4b47 ldr r3, [pc, #284] ; (800f028 <ip4_input+0x27c>)
800ef0c: 691b ldr r3, [r3, #16]
800ef0e: f003 03f0 and.w r3, r3, #240 ; 0xf0
if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) ||
800ef12: 2be0 cmp r3, #224 ; 0xe0
800ef14: d104 bne.n 800ef20 <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);
800ef16: 6878 ldr r0, [r7, #4]
800ef18: f7f6 fd3e bl 8005998 <pbuf_free>
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipinaddrerrors);
MIB2_STATS_INC(mib2.ipindiscards);
return ERR_OK;
800ef1c: 2300 movs r3, #0
800ef1e: e07e b.n 800f01e <ip4_input+0x272>
}
}
/* packet not for us? */
if (netif == NULL) {
800ef20: 69bb ldr r3, [r7, #24]
800ef22: 2b00 cmp r3, #0
800ef24: d104 bne.n 800ef30 <ip4_input+0x184>
{
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipinaddrerrors);
MIB2_STATS_INC(mib2.ipindiscards);
}
pbuf_free(p);
800ef26: 6878 ldr r0, [r7, #4]
800ef28: f7f6 fd36 bl 8005998 <pbuf_free>
return ERR_OK;
800ef2c: 2300 movs r3, #0
800ef2e: e076 b.n 800f01e <ip4_input+0x272>
}
/* packet consists of multiple fragments? */
if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) {
800ef30: 69fb ldr r3, [r7, #28]
800ef32: 88db ldrh r3, [r3, #6]
800ef34: b29b uxth r3, r3
800ef36: 461a mov r2, r3
800ef38: f64f 733f movw r3, #65343 ; 0xff3f
800ef3c: 4013 ands r3, r2
800ef3e: 2b00 cmp r3, #0
800ef40: d00b beq.n 800ef5a <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);
800ef42: 6878 ldr r0, [r7, #4]
800ef44: f000 fdd0 bl 800fae8 <ip4_reass>
800ef48: 6078 str r0, [r7, #4]
/* packet not fully reassembled yet? */
if (p == NULL) {
800ef4a: 687b ldr r3, [r7, #4]
800ef4c: 2b00 cmp r3, #0
800ef4e: d101 bne.n 800ef54 <ip4_input+0x1a8>
return ERR_OK;
800ef50: 2300 movs r3, #0
800ef52: e064 b.n 800f01e <ip4_input+0x272>
}
iphdr = (const struct ip_hdr *)p->payload;
800ef54: 687b ldr r3, [r7, #4]
800ef56: 685b ldr r3, [r3, #4]
800ef58: 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;
800ef5a: 4a33 ldr r2, [pc, #204] ; (800f028 <ip4_input+0x27c>)
800ef5c: 69bb ldr r3, [r7, #24]
800ef5e: 6013 str r3, [r2, #0]
ip_data.current_input_netif = inp;
800ef60: 4a31 ldr r2, [pc, #196] ; (800f028 <ip4_input+0x27c>)
800ef62: 683b ldr r3, [r7, #0]
800ef64: 6053 str r3, [r2, #4]
ip_data.current_ip4_header = iphdr;
800ef66: 4a30 ldr r2, [pc, #192] ; (800f028 <ip4_input+0x27c>)
800ef68: 69fb ldr r3, [r7, #28]
800ef6a: 6093 str r3, [r2, #8]
ip_data.current_ip_header_tot_len = IPH_HL_BYTES(iphdr);
800ef6c: 69fb ldr r3, [r7, #28]
800ef6e: 781b ldrb r3, [r3, #0]
800ef70: f003 030f and.w r3, r3, #15
800ef74: b2db uxtb r3, r3
800ef76: 009b lsls r3, r3, #2
800ef78: b2db uxtb r3, r3
800ef7a: b29a uxth r2, r3
800ef7c: 4b2a ldr r3, [pc, #168] ; (800f028 <ip4_input+0x27c>)
800ef7e: 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. */
800ef80: 8a7b ldrh r3, [r7, #18]
800ef82: 4619 mov r1, r3
800ef84: 6878 ldr r0, [r7, #4]
800ef86: f7f6 fc81 bl 800588c <pbuf_remove_header>
switch (IPH_PROTO(iphdr)) {
800ef8a: 69fb ldr r3, [r7, #28]
800ef8c: 7a5b ldrb r3, [r3, #9]
800ef8e: 2b11 cmp r3, #17
800ef90: d006 beq.n 800efa0 <ip4_input+0x1f4>
800ef92: 2b11 cmp r3, #17
800ef94: dc13 bgt.n 800efbe <ip4_input+0x212>
800ef96: 2b01 cmp r3, #1
800ef98: d00c beq.n 800efb4 <ip4_input+0x208>
800ef9a: 2b06 cmp r3, #6
800ef9c: d005 beq.n 800efaa <ip4_input+0x1fe>
800ef9e: e00e b.n 800efbe <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);
800efa0: 6839 ldr r1, [r7, #0]
800efa2: 6878 ldr r0, [r7, #4]
800efa4: f7fc faea bl 800b57c <udp_input>
break;
800efa8: e026 b.n 800eff8 <ip4_input+0x24c>
#endif /* LWIP_UDP */
#if LWIP_TCP
case IP_PROTO_TCP:
MIB2_STATS_INC(mib2.ipindelivers);
tcp_input(p, inp);
800efaa: 6839 ldr r1, [r7, #0]
800efac: 6878 ldr r0, [r7, #4]
800efae: f7f8 fb2b bl 8007608 <tcp_input>
break;
800efb2: e021 b.n 800eff8 <ip4_input+0x24c>
#endif /* LWIP_TCP */
#if LWIP_ICMP
case IP_PROTO_ICMP:
MIB2_STATS_INC(mib2.ipindelivers);
icmp_input(p, inp);
800efb4: 6839 ldr r1, [r7, #0]
800efb6: 6878 ldr r0, [r7, #4]
800efb8: f7ff fcd0 bl 800e95c <icmp_input>
break;
800efbc: e01c b.n 800eff8 <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) &&
800efbe: 4b1a ldr r3, [pc, #104] ; (800f028 <ip4_input+0x27c>)
800efc0: 695b ldr r3, [r3, #20]
800efc2: 69b9 ldr r1, [r7, #24]
800efc4: 4618 mov r0, r3
800efc6: f000 f90b bl 800f1e0 <ip4_addr_isbroadcast_u32>
800efca: 4603 mov r3, r0
800efcc: 2b00 cmp r3, #0
800efce: d10f bne.n 800eff0 <ip4_input+0x244>
!ip4_addr_ismulticast(ip4_current_dest_addr())) {
800efd0: 4b15 ldr r3, [pc, #84] ; (800f028 <ip4_input+0x27c>)
800efd2: 695b ldr r3, [r3, #20]
800efd4: f003 03f0 and.w r3, r3, #240 ; 0xf0
if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) &&
800efd8: 2be0 cmp r3, #224 ; 0xe0
800efda: d009 beq.n 800eff0 <ip4_input+0x244>
pbuf_header_force(p, (s16_t)iphdr_hlen); /* Move to ip header, no check necessary. */
800efdc: f9b7 3012 ldrsh.w r3, [r7, #18]
800efe0: 4619 mov r1, r3
800efe2: 6878 ldr r0, [r7, #4]
800efe4: f7f6 fcc5 bl 8005972 <pbuf_header_force>
icmp_dest_unreach(p, ICMP_DUR_PROTO);
800efe8: 2102 movs r1, #2
800efea: 6878 ldr r0, [r7, #4]
800efec: f7ff fdba bl 800eb64 <icmp_dest_unreach>
IP_STATS_INC(ip.proterr);
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipinunknownprotos);
}
pbuf_free(p);
800eff0: 6878 ldr r0, [r7, #4]
800eff2: f7f6 fcd1 bl 8005998 <pbuf_free>
break;
800eff6: bf00 nop
}
}
/* @todo: this is not really necessary... */
ip_data.current_netif = NULL;
800eff8: 4b0b ldr r3, [pc, #44] ; (800f028 <ip4_input+0x27c>)
800effa: 2200 movs r2, #0
800effc: 601a str r2, [r3, #0]
ip_data.current_input_netif = NULL;
800effe: 4b0a ldr r3, [pc, #40] ; (800f028 <ip4_input+0x27c>)
800f000: 2200 movs r2, #0
800f002: 605a str r2, [r3, #4]
ip_data.current_ip4_header = NULL;
800f004: 4b08 ldr r3, [pc, #32] ; (800f028 <ip4_input+0x27c>)
800f006: 2200 movs r2, #0
800f008: 609a str r2, [r3, #8]
ip_data.current_ip_header_tot_len = 0;
800f00a: 4b07 ldr r3, [pc, #28] ; (800f028 <ip4_input+0x27c>)
800f00c: 2200 movs r2, #0
800f00e: 819a strh r2, [r3, #12]
ip4_addr_set_any(ip4_current_src_addr());
800f010: 4b05 ldr r3, [pc, #20] ; (800f028 <ip4_input+0x27c>)
800f012: 2200 movs r2, #0
800f014: 611a str r2, [r3, #16]
ip4_addr_set_any(ip4_current_dest_addr());
800f016: 4b04 ldr r3, [pc, #16] ; (800f028 <ip4_input+0x27c>)
800f018: 2200 movs r2, #0
800f01a: 615a str r2, [r3, #20]
return ERR_OK;
800f01c: 2300 movs r3, #0
}
800f01e: 4618 mov r0, r3
800f020: 3720 adds r7, #32
800f022: 46bd mov sp, r7
800f024: bd80 pop {r7, pc}
800f026: bf00 nop
800f028: 20005670 .word 0x20005670
800f02c: 20008bf4 .word 0x20008bf4
0800f030 <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)
{
800f030: b580 push {r7, lr}
800f032: b08a sub sp, #40 ; 0x28
800f034: af04 add r7, sp, #16
800f036: 60f8 str r0, [r7, #12]
800f038: 60b9 str r1, [r7, #8]
800f03a: 607a str r2, [r7, #4]
800f03c: 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;
800f03e: 68bb ldr r3, [r7, #8]
800f040: 617b str r3, [r7, #20]
if (dest != LWIP_IP_HDRINCL) {
800f042: 687b ldr r3, [r7, #4]
800f044: 2b00 cmp r3, #0
800f046: d009 beq.n 800f05c <ip4_output_if+0x2c>
if (ip4_addr_isany(src)) {
800f048: 68bb ldr r3, [r7, #8]
800f04a: 2b00 cmp r3, #0
800f04c: d003 beq.n 800f056 <ip4_output_if+0x26>
800f04e: 68bb ldr r3, [r7, #8]
800f050: 681b ldr r3, [r3, #0]
800f052: 2b00 cmp r3, #0
800f054: d102 bne.n 800f05c <ip4_output_if+0x2c>
src_used = netif_ip4_addr(netif);
800f056: 6abb ldr r3, [r7, #40] ; 0x28
800f058: 3304 adds r3, #4
800f05a: 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);
800f05c: 78fa ldrb r2, [r7, #3]
800f05e: 6abb ldr r3, [r7, #40] ; 0x28
800f060: 9302 str r3, [sp, #8]
800f062: f897 3024 ldrb.w r3, [r7, #36] ; 0x24
800f066: 9301 str r3, [sp, #4]
800f068: f897 3020 ldrb.w r3, [r7, #32]
800f06c: 9300 str r3, [sp, #0]
800f06e: 4613 mov r3, r2
800f070: 687a ldr r2, [r7, #4]
800f072: 6979 ldr r1, [r7, #20]
800f074: 68f8 ldr r0, [r7, #12]
800f076: f000 f805 bl 800f084 <ip4_output_if_src>
800f07a: 4603 mov r3, r0
#endif /* IP_OPTIONS_SEND */
}
800f07c: 4618 mov r0, r3
800f07e: 3718 adds r7, #24
800f080: 46bd mov sp, r7
800f082: bd80 pop {r7, pc}
0800f084 <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)
{
800f084: b580 push {r7, lr}
800f086: b088 sub sp, #32
800f088: af00 add r7, sp, #0
800f08a: 60f8 str r0, [r7, #12]
800f08c: 60b9 str r1, [r7, #8]
800f08e: 607a str r2, [r7, #4]
800f090: 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);
800f092: 68fb ldr r3, [r7, #12]
800f094: 7b9b ldrb r3, [r3, #14]
800f096: 2b01 cmp r3, #1
800f098: d006 beq.n 800f0a8 <ip4_output_if_src+0x24>
800f09a: 4b4b ldr r3, [pc, #300] ; (800f1c8 <ip4_output_if_src+0x144>)
800f09c: f44f 7255 mov.w r2, #852 ; 0x354
800f0a0: 494a ldr r1, [pc, #296] ; (800f1cc <ip4_output_if_src+0x148>)
800f0a2: 484b ldr r0, [pc, #300] ; (800f1d0 <ip4_output_if_src+0x14c>)
800f0a4: f001 f994 bl 80103d0 <printf>
MIB2_STATS_INC(mib2.ipoutrequests);
/* Should the IP header be generated or is it already included in p? */
if (dest != LWIP_IP_HDRINCL) {
800f0a8: 687b ldr r3, [r7, #4]
800f0aa: 2b00 cmp r3, #0
800f0ac: d060 beq.n 800f170 <ip4_output_if_src+0xec>
u16_t ip_hlen = IP_HLEN;
800f0ae: 2314 movs r3, #20
800f0b0: 837b strh r3, [r7, #26]
}
#endif /* CHECKSUM_GEN_IP_INLINE */
}
#endif /* IP_OPTIONS_SEND */
/* generate IP header */
if (pbuf_add_header(p, IP_HLEN)) {
800f0b2: 2114 movs r1, #20
800f0b4: 68f8 ldr r0, [r7, #12]
800f0b6: f7f6 fbd9 bl 800586c <pbuf_add_header>
800f0ba: 4603 mov r3, r0
800f0bc: 2b00 cmp r3, #0
800f0be: d002 beq.n 800f0c6 <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;
800f0c0: f06f 0301 mvn.w r3, #1
800f0c4: e07c b.n 800f1c0 <ip4_output_if_src+0x13c>
}
iphdr = (struct ip_hdr *)p->payload;
800f0c6: 68fb ldr r3, [r7, #12]
800f0c8: 685b ldr r3, [r3, #4]
800f0ca: 61fb str r3, [r7, #28]
LWIP_ASSERT("check that first pbuf can hold struct ip_hdr",
800f0cc: 68fb ldr r3, [r7, #12]
800f0ce: 895b ldrh r3, [r3, #10]
800f0d0: 2b13 cmp r3, #19
800f0d2: d806 bhi.n 800f0e2 <ip4_output_if_src+0x5e>
800f0d4: 4b3c ldr r3, [pc, #240] ; (800f1c8 <ip4_output_if_src+0x144>)
800f0d6: f44f 7262 mov.w r2, #904 ; 0x388
800f0da: 493e ldr r1, [pc, #248] ; (800f1d4 <ip4_output_if_src+0x150>)
800f0dc: 483c ldr r0, [pc, #240] ; (800f1d0 <ip4_output_if_src+0x14c>)
800f0de: f001 f977 bl 80103d0 <printf>
(p->len >= sizeof(struct ip_hdr)));
IPH_TTL_SET(iphdr, ttl);
800f0e2: 69fb ldr r3, [r7, #28]
800f0e4: 78fa ldrb r2, [r7, #3]
800f0e6: 721a strb r2, [r3, #8]
IPH_PROTO_SET(iphdr, proto);
800f0e8: 69fb ldr r3, [r7, #28]
800f0ea: f897 202c ldrb.w r2, [r7, #44] ; 0x2c
800f0ee: 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);
800f0f0: 687b ldr r3, [r7, #4]
800f0f2: 681a ldr r2, [r3, #0]
800f0f4: 69fb ldr r3, [r7, #28]
800f0f6: 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);
800f0f8: 8b7b ldrh r3, [r7, #26]
800f0fa: 089b lsrs r3, r3, #2
800f0fc: b29b uxth r3, r3
800f0fe: b2db uxtb r3, r3
800f100: f043 0340 orr.w r3, r3, #64 ; 0x40
800f104: b2da uxtb r2, r3
800f106: 69fb ldr r3, [r7, #28]
800f108: 701a strb r2, [r3, #0]
IPH_TOS_SET(iphdr, tos);
800f10a: 69fb ldr r3, [r7, #28]
800f10c: f897 2028 ldrb.w r2, [r7, #40] ; 0x28
800f110: 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));
800f112: 68fb ldr r3, [r7, #12]
800f114: 891b ldrh r3, [r3, #8]
800f116: 4618 mov r0, r3
800f118: f7f5 f8d4 bl 80042c4 <lwip_htons>
800f11c: 4603 mov r3, r0
800f11e: 461a mov r2, r3
800f120: 69fb ldr r3, [r7, #28]
800f122: 805a strh r2, [r3, #2]
#if CHECKSUM_GEN_IP_INLINE
chk_sum += iphdr->_len;
#endif /* CHECKSUM_GEN_IP_INLINE */
IPH_OFFSET_SET(iphdr, 0);
800f124: 69fb ldr r3, [r7, #28]
800f126: 2200 movs r2, #0
800f128: 719a strb r2, [r3, #6]
800f12a: 2200 movs r2, #0
800f12c: 71da strb r2, [r3, #7]
IPH_ID_SET(iphdr, lwip_htons(ip_id));
800f12e: 4b2a ldr r3, [pc, #168] ; (800f1d8 <ip4_output_if_src+0x154>)
800f130: 881b ldrh r3, [r3, #0]
800f132: 4618 mov r0, r3
800f134: f7f5 f8c6 bl 80042c4 <lwip_htons>
800f138: 4603 mov r3, r0
800f13a: 461a mov r2, r3
800f13c: 69fb ldr r3, [r7, #28]
800f13e: 809a strh r2, [r3, #4]
#if CHECKSUM_GEN_IP_INLINE
chk_sum += iphdr->_id;
#endif /* CHECKSUM_GEN_IP_INLINE */
++ip_id;
800f140: 4b25 ldr r3, [pc, #148] ; (800f1d8 <ip4_output_if_src+0x154>)
800f142: 881b ldrh r3, [r3, #0]
800f144: 3301 adds r3, #1
800f146: b29a uxth r2, r3
800f148: 4b23 ldr r3, [pc, #140] ; (800f1d8 <ip4_output_if_src+0x154>)
800f14a: 801a strh r2, [r3, #0]
if (src == NULL) {
800f14c: 68bb ldr r3, [r7, #8]
800f14e: 2b00 cmp r3, #0
800f150: d104 bne.n 800f15c <ip4_output_if_src+0xd8>
ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4);
800f152: 4b22 ldr r3, [pc, #136] ; (800f1dc <ip4_output_if_src+0x158>)
800f154: 681a ldr r2, [r3, #0]
800f156: 69fb ldr r3, [r7, #28]
800f158: 60da str r2, [r3, #12]
800f15a: e003 b.n 800f164 <ip4_output_if_src+0xe0>
} else {
/* src cannot be NULL here */
ip4_addr_copy(iphdr->src, *src);
800f15c: 68bb ldr r3, [r7, #8]
800f15e: 681a ldr r2, [r3, #0]
800f160: 69fb ldr r3, [r7, #28]
800f162: 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);
800f164: 69fb ldr r3, [r7, #28]
800f166: 2200 movs r2, #0
800f168: 729a strb r2, [r3, #10]
800f16a: 2200 movs r2, #0
800f16c: 72da strb r2, [r3, #11]
800f16e: e00f b.n 800f190 <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) {
800f170: 68fb ldr r3, [r7, #12]
800f172: 895b ldrh r3, [r3, #10]
800f174: 2b13 cmp r3, #19
800f176: d802 bhi.n 800f17e <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;
800f178: f06f 0301 mvn.w r3, #1
800f17c: e020 b.n 800f1c0 <ip4_output_if_src+0x13c>
}
iphdr = (struct ip_hdr *)p->payload;
800f17e: 68fb ldr r3, [r7, #12]
800f180: 685b ldr r3, [r3, #4]
800f182: 61fb str r3, [r7, #28]
ip4_addr_copy(dest_addr, iphdr->dest);
800f184: 69fb ldr r3, [r7, #28]
800f186: 691b ldr r3, [r3, #16]
800f188: 617b str r3, [r7, #20]
dest = &dest_addr;
800f18a: f107 0314 add.w r3, r7, #20
800f18e: 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)) {
800f190: 6b3b ldr r3, [r7, #48] ; 0x30
800f192: 8d1b ldrh r3, [r3, #40] ; 0x28
800f194: 2b00 cmp r3, #0
800f196: d00c beq.n 800f1b2 <ip4_output_if_src+0x12e>
800f198: 68fb ldr r3, [r7, #12]
800f19a: 891a ldrh r2, [r3, #8]
800f19c: 6b3b ldr r3, [r7, #48] ; 0x30
800f19e: 8d1b ldrh r3, [r3, #40] ; 0x28
800f1a0: 429a cmp r2, r3
800f1a2: d906 bls.n 800f1b2 <ip4_output_if_src+0x12e>
return ip4_frag(p, netif, dest);
800f1a4: 687a ldr r2, [r7, #4]
800f1a6: 6b39 ldr r1, [r7, #48] ; 0x30
800f1a8: 68f8 ldr r0, [r7, #12]
800f1aa: f000 fe91 bl 800fed0 <ip4_frag>
800f1ae: 4603 mov r3, r0
800f1b0: e006 b.n 800f1c0 <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);
800f1b2: 6b3b ldr r3, [r7, #48] ; 0x30
800f1b4: 695b ldr r3, [r3, #20]
800f1b6: 687a ldr r2, [r7, #4]
800f1b8: 68f9 ldr r1, [r7, #12]
800f1ba: 6b38 ldr r0, [r7, #48] ; 0x30
800f1bc: 4798 blx r3
800f1be: 4603 mov r3, r0
}
800f1c0: 4618 mov r0, r3
800f1c2: 3720 adds r7, #32
800f1c4: 46bd mov sp, r7
800f1c6: bd80 pop {r7, pc}
800f1c8: 0801791c .word 0x0801791c
800f1cc: 08017950 .word 0x08017950
800f1d0: 0801795c .word 0x0801795c
800f1d4: 08017984 .word 0x08017984
800f1d8: 20008d86 .word 0x20008d86
800f1dc: 08017ddc .word 0x08017ddc
0800f1e0 <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)
{
800f1e0: b480 push {r7}
800f1e2: b085 sub sp, #20
800f1e4: af00 add r7, sp, #0
800f1e6: 6078 str r0, [r7, #4]
800f1e8: 6039 str r1, [r7, #0]
ip4_addr_t ipaddr;
ip4_addr_set_u32(&ipaddr, addr);
800f1ea: 687b ldr r3, [r7, #4]
800f1ec: 60fb str r3, [r7, #12]
/* all ones (broadcast) or all zeroes (old skool broadcast) */
if ((~addr == IPADDR_ANY) ||
800f1ee: 687b ldr r3, [r7, #4]
800f1f0: f1b3 3fff cmp.w r3, #4294967295
800f1f4: d002 beq.n 800f1fc <ip4_addr_isbroadcast_u32+0x1c>
800f1f6: 687b ldr r3, [r7, #4]
800f1f8: 2b00 cmp r3, #0
800f1fa: d101 bne.n 800f200 <ip4_addr_isbroadcast_u32+0x20>
(addr == IPADDR_ANY)) {
return 1;
800f1fc: 2301 movs r3, #1
800f1fe: e02a b.n 800f256 <ip4_addr_isbroadcast_u32+0x76>
/* no broadcast support on this network interface? */
} else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) {
800f200: 683b ldr r3, [r7, #0]
800f202: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800f206: f003 0302 and.w r3, r3, #2
800f20a: 2b00 cmp r3, #0
800f20c: d101 bne.n 800f212 <ip4_addr_isbroadcast_u32+0x32>
/* the given address cannot be a broadcast address
* nor can we check against any broadcast addresses */
return 0;
800f20e: 2300 movs r3, #0
800f210: e021 b.n 800f256 <ip4_addr_isbroadcast_u32+0x76>
/* address matches network interface address exactly? => no broadcast */
} else if (addr == ip4_addr_get_u32(netif_ip4_addr(netif))) {
800f212: 683b ldr r3, [r7, #0]
800f214: 3304 adds r3, #4
800f216: 681b ldr r3, [r3, #0]
800f218: 687a ldr r2, [r7, #4]
800f21a: 429a cmp r2, r3
800f21c: d101 bne.n 800f222 <ip4_addr_isbroadcast_u32+0x42>
return 0;
800f21e: 2300 movs r3, #0
800f220: e019 b.n 800f256 <ip4_addr_isbroadcast_u32+0x76>
/* on the same (sub) network... */
} else if (ip4_addr_netcmp(&ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif))
800f222: 68fa ldr r2, [r7, #12]
800f224: 683b ldr r3, [r7, #0]
800f226: 3304 adds r3, #4
800f228: 681b ldr r3, [r3, #0]
800f22a: 405a eors r2, r3
800f22c: 683b ldr r3, [r7, #0]
800f22e: 3308 adds r3, #8
800f230: 681b ldr r3, [r3, #0]
800f232: 4013 ands r3, r2
800f234: 2b00 cmp r3, #0
800f236: d10d bne.n 800f254 <ip4_addr_isbroadcast_u32+0x74>
/* ...and host identifier bits are all ones? =>... */
&& ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) ==
800f238: 683b ldr r3, [r7, #0]
800f23a: 3308 adds r3, #8
800f23c: 681b ldr r3, [r3, #0]
800f23e: 43da mvns r2, r3
800f240: 687b ldr r3, [r7, #4]
800f242: 401a ands r2, r3
(IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) {
800f244: 683b ldr r3, [r7, #0]
800f246: 3308 adds r3, #8
800f248: 681b ldr r3, [r3, #0]
800f24a: 43db mvns r3, r3
&& ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) ==
800f24c: 429a cmp r2, r3
800f24e: d101 bne.n 800f254 <ip4_addr_isbroadcast_u32+0x74>
/* => network broadcast address */
return 1;
800f250: 2301 movs r3, #1
800f252: e000 b.n 800f256 <ip4_addr_isbroadcast_u32+0x76>
} else {
return 0;
800f254: 2300 movs r3, #0
}
}
800f256: 4618 mov r0, r3
800f258: 3714 adds r7, #20
800f25a: 46bd mov sp, r7
800f25c: f85d 7b04 ldr.w r7, [sp], #4
800f260: 4770 bx lr
0800f262 <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)
{
800f262: b580 push {r7, lr}
800f264: b084 sub sp, #16
800f266: af00 add r7, sp, #0
800f268: 6078 str r0, [r7, #4]
ip4_addr_t val;
if (ip4addr_aton(cp, &val)) {
800f26a: f107 030c add.w r3, r7, #12
800f26e: 4619 mov r1, r3
800f270: 6878 ldr r0, [r7, #4]
800f272: f000 f80b bl 800f28c <ip4addr_aton>
800f276: 4603 mov r3, r0
800f278: 2b00 cmp r3, #0
800f27a: d001 beq.n 800f280 <ipaddr_addr+0x1e>
return ip4_addr_get_u32(&val);
800f27c: 68fb ldr r3, [r7, #12]
800f27e: e001 b.n 800f284 <ipaddr_addr+0x22>
}
return (IPADDR_NONE);
800f280: f04f 33ff mov.w r3, #4294967295
}
800f284: 4618 mov r0, r3
800f286: 3710 adds r7, #16
800f288: 46bd mov sp, r7
800f28a: bd80 pop {r7, pc}
0800f28c <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)
{
800f28c: b580 push {r7, lr}
800f28e: b08a sub sp, #40 ; 0x28
800f290: af00 add r7, sp, #0
800f292: 6078 str r0, [r7, #4]
800f294: 6039 str r1, [r7, #0]
u32_t val;
u8_t base;
char c;
u32_t parts[4];
u32_t *pp = parts;
800f296: f107 030c add.w r3, r7, #12
800f29a: 61fb str r3, [r7, #28]
c = *cp;
800f29c: 687b ldr r3, [r7, #4]
800f29e: 781b ldrb r3, [r3, #0]
800f2a0: 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)) {
800f2a4: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800f2a8: 3301 adds r3, #1
800f2aa: 4a89 ldr r2, [pc, #548] ; (800f4d0 <ip4addr_aton+0x244>)
800f2ac: 4413 add r3, r2
800f2ae: 781b ldrb r3, [r3, #0]
800f2b0: f003 0304 and.w r3, r3, #4
800f2b4: 2b00 cmp r3, #0
800f2b6: d101 bne.n 800f2bc <ip4addr_aton+0x30>
return 0;
800f2b8: 2300 movs r3, #0
800f2ba: e105 b.n 800f4c8 <ip4addr_aton+0x23c>
}
val = 0;
800f2bc: 2300 movs r3, #0
800f2be: 627b str r3, [r7, #36] ; 0x24
base = 10;
800f2c0: 230a movs r3, #10
800f2c2: f887 3023 strb.w r3, [r7, #35] ; 0x23
if (c == '0') {
800f2c6: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800f2ca: 2b30 cmp r3, #48 ; 0x30
800f2cc: d11c bne.n 800f308 <ip4addr_aton+0x7c>
c = *++cp;
800f2ce: 687b ldr r3, [r7, #4]
800f2d0: 3301 adds r3, #1
800f2d2: 607b str r3, [r7, #4]
800f2d4: 687b ldr r3, [r7, #4]
800f2d6: 781b ldrb r3, [r3, #0]
800f2d8: f887 3022 strb.w r3, [r7, #34] ; 0x22
if (c == 'x' || c == 'X') {
800f2dc: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800f2e0: 2b78 cmp r3, #120 ; 0x78
800f2e2: d003 beq.n 800f2ec <ip4addr_aton+0x60>
800f2e4: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800f2e8: 2b58 cmp r3, #88 ; 0x58
800f2ea: d10a bne.n 800f302 <ip4addr_aton+0x76>
base = 16;
800f2ec: 2310 movs r3, #16
800f2ee: f887 3023 strb.w r3, [r7, #35] ; 0x23
c = *++cp;
800f2f2: 687b ldr r3, [r7, #4]
800f2f4: 3301 adds r3, #1
800f2f6: 607b str r3, [r7, #4]
800f2f8: 687b ldr r3, [r7, #4]
800f2fa: 781b ldrb r3, [r3, #0]
800f2fc: f887 3022 strb.w r3, [r7, #34] ; 0x22
800f300: e002 b.n 800f308 <ip4addr_aton+0x7c>
} else {
base = 8;
800f302: 2308 movs r3, #8
800f304: f887 3023 strb.w r3, [r7, #35] ; 0x23
}
}
for (;;) {
if (lwip_isdigit(c)) {
800f308: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800f30c: 3301 adds r3, #1
800f30e: 4a70 ldr r2, [pc, #448] ; (800f4d0 <ip4addr_aton+0x244>)
800f310: 4413 add r3, r2
800f312: 781b ldrb r3, [r3, #0]
800f314: f003 0304 and.w r3, r3, #4
800f318: 2b00 cmp r3, #0
800f31a: d011 beq.n 800f340 <ip4addr_aton+0xb4>
val = (val * base) + (u32_t)(c - '0');
800f31c: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
800f320: 6a7a ldr r2, [r7, #36] ; 0x24
800f322: fb03 f202 mul.w r2, r3, r2
800f326: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800f32a: 4413 add r3, r2
800f32c: 3b30 subs r3, #48 ; 0x30
800f32e: 627b str r3, [r7, #36] ; 0x24
c = *++cp;
800f330: 687b ldr r3, [r7, #4]
800f332: 3301 adds r3, #1
800f334: 607b str r3, [r7, #4]
800f336: 687b ldr r3, [r7, #4]
800f338: 781b ldrb r3, [r3, #0]
800f33a: f887 3022 strb.w r3, [r7, #34] ; 0x22
800f33e: e7e3 b.n 800f308 <ip4addr_aton+0x7c>
} else if (base == 16 && lwip_isxdigit(c)) {
800f340: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
800f344: 2b10 cmp r3, #16
800f346: d127 bne.n 800f398 <ip4addr_aton+0x10c>
800f348: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800f34c: 3301 adds r3, #1
800f34e: 4a60 ldr r2, [pc, #384] ; (800f4d0 <ip4addr_aton+0x244>)
800f350: 4413 add r3, r2
800f352: 781b ldrb r3, [r3, #0]
800f354: f003 0344 and.w r3, r3, #68 ; 0x44
800f358: 2b00 cmp r3, #0
800f35a: d01d beq.n 800f398 <ip4addr_aton+0x10c>
val = (val << 4) | (u32_t)(c + 10 - (lwip_islower(c) ? 'a' : 'A'));
800f35c: 6a7b ldr r3, [r7, #36] ; 0x24
800f35e: 011b lsls r3, r3, #4
800f360: f897 2022 ldrb.w r2, [r7, #34] ; 0x22
800f364: f102 010a add.w r1, r2, #10
800f368: f897 2022 ldrb.w r2, [r7, #34] ; 0x22
800f36c: 3201 adds r2, #1
800f36e: 4858 ldr r0, [pc, #352] ; (800f4d0 <ip4addr_aton+0x244>)
800f370: 4402 add r2, r0
800f372: 7812 ldrb r2, [r2, #0]
800f374: f002 0203 and.w r2, r2, #3
800f378: 2a02 cmp r2, #2
800f37a: d101 bne.n 800f380 <ip4addr_aton+0xf4>
800f37c: 2261 movs r2, #97 ; 0x61
800f37e: e000 b.n 800f382 <ip4addr_aton+0xf6>
800f380: 2241 movs r2, #65 ; 0x41
800f382: 1a8a subs r2, r1, r2
800f384: 4313 orrs r3, r2
800f386: 627b str r3, [r7, #36] ; 0x24
c = *++cp;
800f388: 687b ldr r3, [r7, #4]
800f38a: 3301 adds r3, #1
800f38c: 607b str r3, [r7, #4]
800f38e: 687b ldr r3, [r7, #4]
800f390: 781b ldrb r3, [r3, #0]
800f392: f887 3022 strb.w r3, [r7, #34] ; 0x22
if (lwip_isdigit(c)) {
800f396: e7b7 b.n 800f308 <ip4addr_aton+0x7c>
} else {
break;
}
}
if (c == '.') {
800f398: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800f39c: 2b2e cmp r3, #46 ; 0x2e
800f39e: d114 bne.n 800f3ca <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) {
800f3a0: f107 030c add.w r3, r7, #12
800f3a4: 330c adds r3, #12
800f3a6: 69fa ldr r2, [r7, #28]
800f3a8: 429a cmp r2, r3
800f3aa: d301 bcc.n 800f3b0 <ip4addr_aton+0x124>
return 0;
800f3ac: 2300 movs r3, #0
800f3ae: e08b b.n 800f4c8 <ip4addr_aton+0x23c>
}
*pp++ = val;
800f3b0: 69fb ldr r3, [r7, #28]
800f3b2: 1d1a adds r2, r3, #4
800f3b4: 61fa str r2, [r7, #28]
800f3b6: 6a7a ldr r2, [r7, #36] ; 0x24
800f3b8: 601a str r2, [r3, #0]
c = *++cp;
800f3ba: 687b ldr r3, [r7, #4]
800f3bc: 3301 adds r3, #1
800f3be: 607b str r3, [r7, #4]
800f3c0: 687b ldr r3, [r7, #4]
800f3c2: 781b ldrb r3, [r3, #0]
800f3c4: f887 3022 strb.w r3, [r7, #34] ; 0x22
if (!lwip_isdigit(c)) {
800f3c8: e76c b.n 800f2a4 <ip4addr_aton+0x18>
} else {
break;
800f3ca: bf00 nop
}
}
/*
* Check for trailing characters.
*/
if (c != '\0' && !lwip_isspace(c)) {
800f3cc: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800f3d0: 2b00 cmp r3, #0
800f3d2: d00b beq.n 800f3ec <ip4addr_aton+0x160>
800f3d4: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800f3d8: 3301 adds r3, #1
800f3da: 4a3d ldr r2, [pc, #244] ; (800f4d0 <ip4addr_aton+0x244>)
800f3dc: 4413 add r3, r2
800f3de: 781b ldrb r3, [r3, #0]
800f3e0: f003 0308 and.w r3, r3, #8
800f3e4: 2b00 cmp r3, #0
800f3e6: d101 bne.n 800f3ec <ip4addr_aton+0x160>
return 0;
800f3e8: 2300 movs r3, #0
800f3ea: e06d b.n 800f4c8 <ip4addr_aton+0x23c>
}
/*
* Concoct the address according to
* the number of parts specified.
*/
switch (pp - parts + 1) {
800f3ec: f107 030c add.w r3, r7, #12
800f3f0: 69fa ldr r2, [r7, #28]
800f3f2: 1ad3 subs r3, r2, r3
800f3f4: 109b asrs r3, r3, #2
800f3f6: 3301 adds r3, #1
800f3f8: 2b04 cmp r3, #4
800f3fa: d853 bhi.n 800f4a4 <ip4addr_aton+0x218>
800f3fc: a201 add r2, pc, #4 ; (adr r2, 800f404 <ip4addr_aton+0x178>)
800f3fe: f852 f023 ldr.w pc, [r2, r3, lsl #2]
800f402: bf00 nop
800f404: 0800f419 .word 0x0800f419
800f408: 0800f4b3 .word 0x0800f4b3
800f40c: 0800f41d .word 0x0800f41d
800f410: 0800f43f .word 0x0800f43f
800f414: 0800f46d .word 0x0800f46d
case 0:
return 0; /* initial nondigit */
800f418: 2300 movs r3, #0
800f41a: e055 b.n 800f4c8 <ip4addr_aton+0x23c>
case 1: /* a -- 32 bits */
break;
case 2: /* a.b -- 8.24 bits */
if (val > 0xffffffUL) {
800f41c: 6a7b ldr r3, [r7, #36] ; 0x24
800f41e: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000
800f422: d301 bcc.n 800f428 <ip4addr_aton+0x19c>
return 0;
800f424: 2300 movs r3, #0
800f426: e04f b.n 800f4c8 <ip4addr_aton+0x23c>
}
if (parts[0] > 0xff) {
800f428: 68fb ldr r3, [r7, #12]
800f42a: 2bff cmp r3, #255 ; 0xff
800f42c: d901 bls.n 800f432 <ip4addr_aton+0x1a6>
return 0;
800f42e: 2300 movs r3, #0
800f430: e04a b.n 800f4c8 <ip4addr_aton+0x23c>
}
val |= parts[0] << 24;
800f432: 68fb ldr r3, [r7, #12]
800f434: 061b lsls r3, r3, #24
800f436: 6a7a ldr r2, [r7, #36] ; 0x24
800f438: 4313 orrs r3, r2
800f43a: 627b str r3, [r7, #36] ; 0x24
break;
800f43c: e03a b.n 800f4b4 <ip4addr_aton+0x228>
case 3: /* a.b.c -- 8.8.16 bits */
if (val > 0xffff) {
800f43e: 6a7b ldr r3, [r7, #36] ; 0x24
800f440: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800f444: d301 bcc.n 800f44a <ip4addr_aton+0x1be>
return 0;
800f446: 2300 movs r3, #0
800f448: e03e b.n 800f4c8 <ip4addr_aton+0x23c>
}
if ((parts[0] > 0xff) || (parts[1] > 0xff)) {
800f44a: 68fb ldr r3, [r7, #12]
800f44c: 2bff cmp r3, #255 ; 0xff
800f44e: d802 bhi.n 800f456 <ip4addr_aton+0x1ca>
800f450: 693b ldr r3, [r7, #16]
800f452: 2bff cmp r3, #255 ; 0xff
800f454: d901 bls.n 800f45a <ip4addr_aton+0x1ce>
return 0;
800f456: 2300 movs r3, #0
800f458: e036 b.n 800f4c8 <ip4addr_aton+0x23c>
}
val |= (parts[0] << 24) | (parts[1] << 16);
800f45a: 68fb ldr r3, [r7, #12]
800f45c: 061a lsls r2, r3, #24
800f45e: 693b ldr r3, [r7, #16]
800f460: 041b lsls r3, r3, #16
800f462: 4313 orrs r3, r2
800f464: 6a7a ldr r2, [r7, #36] ; 0x24
800f466: 4313 orrs r3, r2
800f468: 627b str r3, [r7, #36] ; 0x24
break;
800f46a: e023 b.n 800f4b4 <ip4addr_aton+0x228>
case 4: /* a.b.c.d -- 8.8.8.8 bits */
if (val > 0xff) {
800f46c: 6a7b ldr r3, [r7, #36] ; 0x24
800f46e: 2bff cmp r3, #255 ; 0xff
800f470: d901 bls.n 800f476 <ip4addr_aton+0x1ea>
return 0;
800f472: 2300 movs r3, #0
800f474: e028 b.n 800f4c8 <ip4addr_aton+0x23c>
}
if ((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff)) {
800f476: 68fb ldr r3, [r7, #12]
800f478: 2bff cmp r3, #255 ; 0xff
800f47a: d805 bhi.n 800f488 <ip4addr_aton+0x1fc>
800f47c: 693b ldr r3, [r7, #16]
800f47e: 2bff cmp r3, #255 ; 0xff
800f480: d802 bhi.n 800f488 <ip4addr_aton+0x1fc>
800f482: 697b ldr r3, [r7, #20]
800f484: 2bff cmp r3, #255 ; 0xff
800f486: d901 bls.n 800f48c <ip4addr_aton+0x200>
return 0;
800f488: 2300 movs r3, #0
800f48a: e01d b.n 800f4c8 <ip4addr_aton+0x23c>
}
val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
800f48c: 68fb ldr r3, [r7, #12]
800f48e: 061a lsls r2, r3, #24
800f490: 693b ldr r3, [r7, #16]
800f492: 041b lsls r3, r3, #16
800f494: 431a orrs r2, r3
800f496: 697b ldr r3, [r7, #20]
800f498: 021b lsls r3, r3, #8
800f49a: 4313 orrs r3, r2
800f49c: 6a7a ldr r2, [r7, #36] ; 0x24
800f49e: 4313 orrs r3, r2
800f4a0: 627b str r3, [r7, #36] ; 0x24
break;
800f4a2: e007 b.n 800f4b4 <ip4addr_aton+0x228>
default:
LWIP_ASSERT("unhandled", 0);
800f4a4: 4b0b ldr r3, [pc, #44] ; (800f4d4 <ip4addr_aton+0x248>)
800f4a6: 22f9 movs r2, #249 ; 0xf9
800f4a8: 490b ldr r1, [pc, #44] ; (800f4d8 <ip4addr_aton+0x24c>)
800f4aa: 480c ldr r0, [pc, #48] ; (800f4dc <ip4addr_aton+0x250>)
800f4ac: f000 ff90 bl 80103d0 <printf>
break;
800f4b0: e000 b.n 800f4b4 <ip4addr_aton+0x228>
break;
800f4b2: bf00 nop
}
if (addr) {
800f4b4: 683b ldr r3, [r7, #0]
800f4b6: 2b00 cmp r3, #0
800f4b8: d005 beq.n 800f4c6 <ip4addr_aton+0x23a>
ip4_addr_set_u32(addr, lwip_htonl(val));
800f4ba: 6a78 ldr r0, [r7, #36] ; 0x24
800f4bc: f7f4 ff17 bl 80042ee <lwip_htonl>
800f4c0: 4602 mov r2, r0
800f4c2: 683b ldr r3, [r7, #0]
800f4c4: 601a str r2, [r3, #0]
}
return 1;
800f4c6: 2301 movs r3, #1
}
800f4c8: 4618 mov r0, r3
800f4ca: 3728 adds r7, #40 ; 0x28
800f4cc: 46bd mov sp, r7
800f4ce: bd80 pop {r7, pc}
800f4d0: 08017df2 .word 0x08017df2
800f4d4: 080179b4 .word 0x080179b4
800f4d8: 080179f0 .word 0x080179f0
800f4dc: 080179fc .word 0x080179fc
0800f4e0 <ip_reass_tmr>:
*
* Should be called every 1000 msec (defined by IP_TMR_INTERVAL).
*/
void
ip_reass_tmr(void)
{
800f4e0: b580 push {r7, lr}
800f4e2: b084 sub sp, #16
800f4e4: af00 add r7, sp, #0
struct ip_reassdata *r, *prev = NULL;
800f4e6: 2300 movs r3, #0
800f4e8: 60bb str r3, [r7, #8]
r = reassdatagrams;
800f4ea: 4b12 ldr r3, [pc, #72] ; (800f534 <ip_reass_tmr+0x54>)
800f4ec: 681b ldr r3, [r3, #0]
800f4ee: 60fb str r3, [r7, #12]
while (r != NULL) {
800f4f0: e018 b.n 800f524 <ip_reass_tmr+0x44>
/* Decrement the timer. Once it reaches 0,
* clean up the incomplete fragment assembly */
if (r->timer > 0) {
800f4f2: 68fb ldr r3, [r7, #12]
800f4f4: 7fdb ldrb r3, [r3, #31]
800f4f6: 2b00 cmp r3, #0
800f4f8: d00b beq.n 800f512 <ip_reass_tmr+0x32>
r->timer--;
800f4fa: 68fb ldr r3, [r7, #12]
800f4fc: 7fdb ldrb r3, [r3, #31]
800f4fe: 3b01 subs r3, #1
800f500: b2da uxtb r2, r3
800f502: 68fb ldr r3, [r7, #12]
800f504: 77da strb r2, [r3, #31]
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer dec %"U16_F"\n", (u16_t)r->timer));
prev = r;
800f506: 68fb ldr r3, [r7, #12]
800f508: 60bb str r3, [r7, #8]
r = r->next;
800f50a: 68fb ldr r3, [r7, #12]
800f50c: 681b ldr r3, [r3, #0]
800f50e: 60fb str r3, [r7, #12]
800f510: e008 b.n 800f524 <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;
800f512: 68fb ldr r3, [r7, #12]
800f514: 607b str r3, [r7, #4]
/* get the next pointer before freeing */
r = r->next;
800f516: 68fb ldr r3, [r7, #12]
800f518: 681b ldr r3, [r3, #0]
800f51a: 60fb str r3, [r7, #12]
/* free the helper struct and all enqueued pbufs */
ip_reass_free_complete_datagram(tmp, prev);
800f51c: 68b9 ldr r1, [r7, #8]
800f51e: 6878 ldr r0, [r7, #4]
800f520: f000 f80a bl 800f538 <ip_reass_free_complete_datagram>
while (r != NULL) {
800f524: 68fb ldr r3, [r7, #12]
800f526: 2b00 cmp r3, #0
800f528: d1e3 bne.n 800f4f2 <ip_reass_tmr+0x12>
}
}
}
800f52a: bf00 nop
800f52c: bf00 nop
800f52e: 3710 adds r7, #16
800f530: 46bd mov sp, r7
800f532: bd80 pop {r7, pc}
800f534: 20008d88 .word 0x20008d88
0800f538 <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)
{
800f538: b580 push {r7, lr}
800f53a: b088 sub sp, #32
800f53c: af00 add r7, sp, #0
800f53e: 6078 str r0, [r7, #4]
800f540: 6039 str r1, [r7, #0]
u16_t pbufs_freed = 0;
800f542: 2300 movs r3, #0
800f544: 83fb strh r3, [r7, #30]
u16_t clen;
struct pbuf *p;
struct ip_reass_helper *iprh;
LWIP_ASSERT("prev != ipr", prev != ipr);
800f546: 683a ldr r2, [r7, #0]
800f548: 687b ldr r3, [r7, #4]
800f54a: 429a cmp r2, r3
800f54c: d105 bne.n 800f55a <ip_reass_free_complete_datagram+0x22>
800f54e: 4b45 ldr r3, [pc, #276] ; (800f664 <ip_reass_free_complete_datagram+0x12c>)
800f550: 22ab movs r2, #171 ; 0xab
800f552: 4945 ldr r1, [pc, #276] ; (800f668 <ip_reass_free_complete_datagram+0x130>)
800f554: 4845 ldr r0, [pc, #276] ; (800f66c <ip_reass_free_complete_datagram+0x134>)
800f556: f000 ff3b bl 80103d0 <printf>
if (prev != NULL) {
800f55a: 683b ldr r3, [r7, #0]
800f55c: 2b00 cmp r3, #0
800f55e: d00a beq.n 800f576 <ip_reass_free_complete_datagram+0x3e>
LWIP_ASSERT("prev->next == ipr", prev->next == ipr);
800f560: 683b ldr r3, [r7, #0]
800f562: 681b ldr r3, [r3, #0]
800f564: 687a ldr r2, [r7, #4]
800f566: 429a cmp r2, r3
800f568: d005 beq.n 800f576 <ip_reass_free_complete_datagram+0x3e>
800f56a: 4b3e ldr r3, [pc, #248] ; (800f664 <ip_reass_free_complete_datagram+0x12c>)
800f56c: 22ad movs r2, #173 ; 0xad
800f56e: 4940 ldr r1, [pc, #256] ; (800f670 <ip_reass_free_complete_datagram+0x138>)
800f570: 483e ldr r0, [pc, #248] ; (800f66c <ip_reass_free_complete_datagram+0x134>)
800f572: f000 ff2d bl 80103d0 <printf>
}
MIB2_STATS_INC(mib2.ipreasmfails);
#if LWIP_ICMP
iprh = (struct ip_reass_helper *)ipr->p->payload;
800f576: 687b ldr r3, [r7, #4]
800f578: 685b ldr r3, [r3, #4]
800f57a: 685b ldr r3, [r3, #4]
800f57c: 617b str r3, [r7, #20]
if (iprh->start == 0) {
800f57e: 697b ldr r3, [r7, #20]
800f580: 889b ldrh r3, [r3, #4]
800f582: b29b uxth r3, r3
800f584: 2b00 cmp r3, #0
800f586: d12a bne.n 800f5de <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;
800f588: 687b ldr r3, [r7, #4]
800f58a: 685b ldr r3, [r3, #4]
800f58c: 61bb str r3, [r7, #24]
ipr->p = iprh->next_pbuf;
800f58e: 697b ldr r3, [r7, #20]
800f590: 681a ldr r2, [r3, #0]
800f592: 687b ldr r3, [r7, #4]
800f594: 605a str r2, [r3, #4]
/* Then, copy the original header into it. */
SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN);
800f596: 69bb ldr r3, [r7, #24]
800f598: 6858 ldr r0, [r3, #4]
800f59a: 687b ldr r3, [r7, #4]
800f59c: 3308 adds r3, #8
800f59e: 2214 movs r2, #20
800f5a0: 4619 mov r1, r3
800f5a2: f000 fee5 bl 8010370 <memcpy>
icmp_time_exceeded(p, ICMP_TE_FRAG);
800f5a6: 2101 movs r1, #1
800f5a8: 69b8 ldr r0, [r7, #24]
800f5aa: f7ff faeb bl 800eb84 <icmp_time_exceeded>
clen = pbuf_clen(p);
800f5ae: 69b8 ldr r0, [r7, #24]
800f5b0: f7f6 fa7a bl 8005aa8 <pbuf_clen>
800f5b4: 4603 mov r3, r0
800f5b6: 827b strh r3, [r7, #18]
LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
800f5b8: 8bfa ldrh r2, [r7, #30]
800f5ba: 8a7b ldrh r3, [r7, #18]
800f5bc: 4413 add r3, r2
800f5be: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800f5c2: db05 blt.n 800f5d0 <ip_reass_free_complete_datagram+0x98>
800f5c4: 4b27 ldr r3, [pc, #156] ; (800f664 <ip_reass_free_complete_datagram+0x12c>)
800f5c6: 22bc movs r2, #188 ; 0xbc
800f5c8: 492a ldr r1, [pc, #168] ; (800f674 <ip_reass_free_complete_datagram+0x13c>)
800f5ca: 4828 ldr r0, [pc, #160] ; (800f66c <ip_reass_free_complete_datagram+0x134>)
800f5cc: f000 ff00 bl 80103d0 <printf>
pbufs_freed = (u16_t)(pbufs_freed + clen);
800f5d0: 8bfa ldrh r2, [r7, #30]
800f5d2: 8a7b ldrh r3, [r7, #18]
800f5d4: 4413 add r3, r2
800f5d6: 83fb strh r3, [r7, #30]
pbuf_free(p);
800f5d8: 69b8 ldr r0, [r7, #24]
800f5da: f7f6 f9dd bl 8005998 <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;
800f5de: 687b ldr r3, [r7, #4]
800f5e0: 685b ldr r3, [r3, #4]
800f5e2: 61bb str r3, [r7, #24]
while (p != NULL) {
800f5e4: e01f b.n 800f626 <ip_reass_free_complete_datagram+0xee>
struct pbuf *pcur;
iprh = (struct ip_reass_helper *)p->payload;
800f5e6: 69bb ldr r3, [r7, #24]
800f5e8: 685b ldr r3, [r3, #4]
800f5ea: 617b str r3, [r7, #20]
pcur = p;
800f5ec: 69bb ldr r3, [r7, #24]
800f5ee: 60fb str r3, [r7, #12]
/* get the next pointer before freeing */
p = iprh->next_pbuf;
800f5f0: 697b ldr r3, [r7, #20]
800f5f2: 681b ldr r3, [r3, #0]
800f5f4: 61bb str r3, [r7, #24]
clen = pbuf_clen(pcur);
800f5f6: 68f8 ldr r0, [r7, #12]
800f5f8: f7f6 fa56 bl 8005aa8 <pbuf_clen>
800f5fc: 4603 mov r3, r0
800f5fe: 827b strh r3, [r7, #18]
LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
800f600: 8bfa ldrh r2, [r7, #30]
800f602: 8a7b ldrh r3, [r7, #18]
800f604: 4413 add r3, r2
800f606: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800f60a: db05 blt.n 800f618 <ip_reass_free_complete_datagram+0xe0>
800f60c: 4b15 ldr r3, [pc, #84] ; (800f664 <ip_reass_free_complete_datagram+0x12c>)
800f60e: 22cc movs r2, #204 ; 0xcc
800f610: 4918 ldr r1, [pc, #96] ; (800f674 <ip_reass_free_complete_datagram+0x13c>)
800f612: 4816 ldr r0, [pc, #88] ; (800f66c <ip_reass_free_complete_datagram+0x134>)
800f614: f000 fedc bl 80103d0 <printf>
pbufs_freed = (u16_t)(pbufs_freed + clen);
800f618: 8bfa ldrh r2, [r7, #30]
800f61a: 8a7b ldrh r3, [r7, #18]
800f61c: 4413 add r3, r2
800f61e: 83fb strh r3, [r7, #30]
pbuf_free(pcur);
800f620: 68f8 ldr r0, [r7, #12]
800f622: f7f6 f9b9 bl 8005998 <pbuf_free>
while (p != NULL) {
800f626: 69bb ldr r3, [r7, #24]
800f628: 2b00 cmp r3, #0
800f62a: d1dc bne.n 800f5e6 <ip_reass_free_complete_datagram+0xae>
}
/* Then, unchain the struct ip_reassdata from the list and free it. */
ip_reass_dequeue_datagram(ipr, prev);
800f62c: 6839 ldr r1, [r7, #0]
800f62e: 6878 ldr r0, [r7, #4]
800f630: f000 f8c2 bl 800f7b8 <ip_reass_dequeue_datagram>
LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed);
800f634: 4b10 ldr r3, [pc, #64] ; (800f678 <ip_reass_free_complete_datagram+0x140>)
800f636: 881b ldrh r3, [r3, #0]
800f638: 8bfa ldrh r2, [r7, #30]
800f63a: 429a cmp r2, r3
800f63c: d905 bls.n 800f64a <ip_reass_free_complete_datagram+0x112>
800f63e: 4b09 ldr r3, [pc, #36] ; (800f664 <ip_reass_free_complete_datagram+0x12c>)
800f640: 22d2 movs r2, #210 ; 0xd2
800f642: 490e ldr r1, [pc, #56] ; (800f67c <ip_reass_free_complete_datagram+0x144>)
800f644: 4809 ldr r0, [pc, #36] ; (800f66c <ip_reass_free_complete_datagram+0x134>)
800f646: f000 fec3 bl 80103d0 <printf>
ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - pbufs_freed);
800f64a: 4b0b ldr r3, [pc, #44] ; (800f678 <ip_reass_free_complete_datagram+0x140>)
800f64c: 881a ldrh r2, [r3, #0]
800f64e: 8bfb ldrh r3, [r7, #30]
800f650: 1ad3 subs r3, r2, r3
800f652: b29a uxth r2, r3
800f654: 4b08 ldr r3, [pc, #32] ; (800f678 <ip_reass_free_complete_datagram+0x140>)
800f656: 801a strh r2, [r3, #0]
return pbufs_freed;
800f658: 8bfb ldrh r3, [r7, #30]
}
800f65a: 4618 mov r0, r3
800f65c: 3720 adds r7, #32
800f65e: 46bd mov sp, r7
800f660: bd80 pop {r7, pc}
800f662: bf00 nop
800f664: 08017a24 .word 0x08017a24
800f668: 08017a60 .word 0x08017a60
800f66c: 08017a6c .word 0x08017a6c
800f670: 08017a94 .word 0x08017a94
800f674: 08017aa8 .word 0x08017aa8
800f678: 20008d8c .word 0x20008d8c
800f67c: 08017ac8 .word 0x08017ac8
0800f680 <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)
{
800f680: b580 push {r7, lr}
800f682: b08a sub sp, #40 ; 0x28
800f684: af00 add r7, sp, #0
800f686: 6078 str r0, [r7, #4]
800f688: 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;
800f68a: 2300 movs r3, #0
800f68c: 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;
800f68e: 2300 movs r3, #0
800f690: 623b str r3, [r7, #32]
prev = NULL;
800f692: 2300 movs r3, #0
800f694: 61fb str r3, [r7, #28]
oldest_prev = NULL;
800f696: 2300 movs r3, #0
800f698: 61bb str r3, [r7, #24]
other_datagrams = 0;
800f69a: 2300 movs r3, #0
800f69c: 613b str r3, [r7, #16]
r = reassdatagrams;
800f69e: 4b28 ldr r3, [pc, #160] ; (800f740 <ip_reass_remove_oldest_datagram+0xc0>)
800f6a0: 681b ldr r3, [r3, #0]
800f6a2: 627b str r3, [r7, #36] ; 0x24
while (r != NULL) {
800f6a4: e030 b.n 800f708 <ip_reass_remove_oldest_datagram+0x88>
if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) {
800f6a6: 6a7b ldr r3, [r7, #36] ; 0x24
800f6a8: 695a ldr r2, [r3, #20]
800f6aa: 687b ldr r3, [r7, #4]
800f6ac: 68db ldr r3, [r3, #12]
800f6ae: 429a cmp r2, r3
800f6b0: d10c bne.n 800f6cc <ip_reass_remove_oldest_datagram+0x4c>
800f6b2: 6a7b ldr r3, [r7, #36] ; 0x24
800f6b4: 699a ldr r2, [r3, #24]
800f6b6: 687b ldr r3, [r7, #4]
800f6b8: 691b ldr r3, [r3, #16]
800f6ba: 429a cmp r2, r3
800f6bc: d106 bne.n 800f6cc <ip_reass_remove_oldest_datagram+0x4c>
800f6be: 6a7b ldr r3, [r7, #36] ; 0x24
800f6c0: 899a ldrh r2, [r3, #12]
800f6c2: 687b ldr r3, [r7, #4]
800f6c4: 889b ldrh r3, [r3, #4]
800f6c6: b29b uxth r3, r3
800f6c8: 429a cmp r2, r3
800f6ca: d014 beq.n 800f6f6 <ip_reass_remove_oldest_datagram+0x76>
/* Not the same datagram as fraghdr */
other_datagrams++;
800f6cc: 693b ldr r3, [r7, #16]
800f6ce: 3301 adds r3, #1
800f6d0: 613b str r3, [r7, #16]
if (oldest == NULL) {
800f6d2: 6a3b ldr r3, [r7, #32]
800f6d4: 2b00 cmp r3, #0
800f6d6: d104 bne.n 800f6e2 <ip_reass_remove_oldest_datagram+0x62>
oldest = r;
800f6d8: 6a7b ldr r3, [r7, #36] ; 0x24
800f6da: 623b str r3, [r7, #32]
oldest_prev = prev;
800f6dc: 69fb ldr r3, [r7, #28]
800f6de: 61bb str r3, [r7, #24]
800f6e0: e009 b.n 800f6f6 <ip_reass_remove_oldest_datagram+0x76>
} else if (r->timer <= oldest->timer) {
800f6e2: 6a7b ldr r3, [r7, #36] ; 0x24
800f6e4: 7fda ldrb r2, [r3, #31]
800f6e6: 6a3b ldr r3, [r7, #32]
800f6e8: 7fdb ldrb r3, [r3, #31]
800f6ea: 429a cmp r2, r3
800f6ec: d803 bhi.n 800f6f6 <ip_reass_remove_oldest_datagram+0x76>
/* older than the previous oldest */
oldest = r;
800f6ee: 6a7b ldr r3, [r7, #36] ; 0x24
800f6f0: 623b str r3, [r7, #32]
oldest_prev = prev;
800f6f2: 69fb ldr r3, [r7, #28]
800f6f4: 61bb str r3, [r7, #24]
}
}
if (r->next != NULL) {
800f6f6: 6a7b ldr r3, [r7, #36] ; 0x24
800f6f8: 681b ldr r3, [r3, #0]
800f6fa: 2b00 cmp r3, #0
800f6fc: d001 beq.n 800f702 <ip_reass_remove_oldest_datagram+0x82>
prev = r;
800f6fe: 6a7b ldr r3, [r7, #36] ; 0x24
800f700: 61fb str r3, [r7, #28]
}
r = r->next;
800f702: 6a7b ldr r3, [r7, #36] ; 0x24
800f704: 681b ldr r3, [r3, #0]
800f706: 627b str r3, [r7, #36] ; 0x24
while (r != NULL) {
800f708: 6a7b ldr r3, [r7, #36] ; 0x24
800f70a: 2b00 cmp r3, #0
800f70c: d1cb bne.n 800f6a6 <ip_reass_remove_oldest_datagram+0x26>
}
if (oldest != NULL) {
800f70e: 6a3b ldr r3, [r7, #32]
800f710: 2b00 cmp r3, #0
800f712: d008 beq.n 800f726 <ip_reass_remove_oldest_datagram+0xa6>
pbufs_freed_current = ip_reass_free_complete_datagram(oldest, oldest_prev);
800f714: 69b9 ldr r1, [r7, #24]
800f716: 6a38 ldr r0, [r7, #32]
800f718: f7ff ff0e bl 800f538 <ip_reass_free_complete_datagram>
800f71c: 60f8 str r0, [r7, #12]
pbufs_freed += pbufs_freed_current;
800f71e: 697a ldr r2, [r7, #20]
800f720: 68fb ldr r3, [r7, #12]
800f722: 4413 add r3, r2
800f724: 617b str r3, [r7, #20]
}
} while ((pbufs_freed < pbufs_needed) && (other_datagrams > 1));
800f726: 697a ldr r2, [r7, #20]
800f728: 683b ldr r3, [r7, #0]
800f72a: 429a cmp r2, r3
800f72c: da02 bge.n 800f734 <ip_reass_remove_oldest_datagram+0xb4>
800f72e: 693b ldr r3, [r7, #16]
800f730: 2b01 cmp r3, #1
800f732: dcac bgt.n 800f68e <ip_reass_remove_oldest_datagram+0xe>
return pbufs_freed;
800f734: 697b ldr r3, [r7, #20]
}
800f736: 4618 mov r0, r3
800f738: 3728 adds r7, #40 ; 0x28
800f73a: 46bd mov sp, r7
800f73c: bd80 pop {r7, pc}
800f73e: bf00 nop
800f740: 20008d88 .word 0x20008d88
0800f744 <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)
{
800f744: b580 push {r7, lr}
800f746: b084 sub sp, #16
800f748: af00 add r7, sp, #0
800f74a: 6078 str r0, [r7, #4]
800f74c: 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);
800f74e: 2004 movs r0, #4
800f750: f7f5 fa30 bl 8004bb4 <memp_malloc>
800f754: 60f8 str r0, [r7, #12]
if (ipr == NULL) {
800f756: 68fb ldr r3, [r7, #12]
800f758: 2b00 cmp r3, #0
800f75a: d110 bne.n 800f77e <ip_reass_enqueue_new_datagram+0x3a>
#if IP_REASS_FREE_OLDEST
if (ip_reass_remove_oldest_datagram(fraghdr, clen) >= clen) {
800f75c: 6839 ldr r1, [r7, #0]
800f75e: 6878 ldr r0, [r7, #4]
800f760: f7ff ff8e bl 800f680 <ip_reass_remove_oldest_datagram>
800f764: 4602 mov r2, r0
800f766: 683b ldr r3, [r7, #0]
800f768: 4293 cmp r3, r2
800f76a: dc03 bgt.n 800f774 <ip_reass_enqueue_new_datagram+0x30>
ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA);
800f76c: 2004 movs r0, #4
800f76e: f7f5 fa21 bl 8004bb4 <memp_malloc>
800f772: 60f8 str r0, [r7, #12]
}
if (ipr == NULL)
800f774: 68fb ldr r3, [r7, #12]
800f776: 2b00 cmp r3, #0
800f778: d101 bne.n 800f77e <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;
800f77a: 2300 movs r3, #0
800f77c: e016 b.n 800f7ac <ip_reass_enqueue_new_datagram+0x68>
}
}
memset(ipr, 0, sizeof(struct ip_reassdata));
800f77e: 2220 movs r2, #32
800f780: 2100 movs r1, #0
800f782: 68f8 ldr r0, [r7, #12]
800f784: f000 fe1c bl 80103c0 <memset>
ipr->timer = IP_REASS_MAXAGE;
800f788: 68fb ldr r3, [r7, #12]
800f78a: 220f movs r2, #15
800f78c: 77da strb r2, [r3, #31]
/* enqueue the new structure to the front of the list */
ipr->next = reassdatagrams;
800f78e: 4b09 ldr r3, [pc, #36] ; (800f7b4 <ip_reass_enqueue_new_datagram+0x70>)
800f790: 681a ldr r2, [r3, #0]
800f792: 68fb ldr r3, [r7, #12]
800f794: 601a str r2, [r3, #0]
reassdatagrams = ipr;
800f796: 4a07 ldr r2, [pc, #28] ; (800f7b4 <ip_reass_enqueue_new_datagram+0x70>)
800f798: 68fb ldr r3, [r7, #12]
800f79a: 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);
800f79c: 68fb ldr r3, [r7, #12]
800f79e: 3308 adds r3, #8
800f7a0: 2214 movs r2, #20
800f7a2: 6879 ldr r1, [r7, #4]
800f7a4: 4618 mov r0, r3
800f7a6: f000 fde3 bl 8010370 <memcpy>
return ipr;
800f7aa: 68fb ldr r3, [r7, #12]
}
800f7ac: 4618 mov r0, r3
800f7ae: 3710 adds r7, #16
800f7b0: 46bd mov sp, r7
800f7b2: bd80 pop {r7, pc}
800f7b4: 20008d88 .word 0x20008d88
0800f7b8 <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)
{
800f7b8: b580 push {r7, lr}
800f7ba: b082 sub sp, #8
800f7bc: af00 add r7, sp, #0
800f7be: 6078 str r0, [r7, #4]
800f7c0: 6039 str r1, [r7, #0]
/* dequeue the reass struct */
if (reassdatagrams == ipr) {
800f7c2: 4b10 ldr r3, [pc, #64] ; (800f804 <ip_reass_dequeue_datagram+0x4c>)
800f7c4: 681b ldr r3, [r3, #0]
800f7c6: 687a ldr r2, [r7, #4]
800f7c8: 429a cmp r2, r3
800f7ca: d104 bne.n 800f7d6 <ip_reass_dequeue_datagram+0x1e>
/* it was the first in the list */
reassdatagrams = ipr->next;
800f7cc: 687b ldr r3, [r7, #4]
800f7ce: 681b ldr r3, [r3, #0]
800f7d0: 4a0c ldr r2, [pc, #48] ; (800f804 <ip_reass_dequeue_datagram+0x4c>)
800f7d2: 6013 str r3, [r2, #0]
800f7d4: e00d b.n 800f7f2 <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);
800f7d6: 683b ldr r3, [r7, #0]
800f7d8: 2b00 cmp r3, #0
800f7da: d106 bne.n 800f7ea <ip_reass_dequeue_datagram+0x32>
800f7dc: 4b0a ldr r3, [pc, #40] ; (800f808 <ip_reass_dequeue_datagram+0x50>)
800f7de: f240 1245 movw r2, #325 ; 0x145
800f7e2: 490a ldr r1, [pc, #40] ; (800f80c <ip_reass_dequeue_datagram+0x54>)
800f7e4: 480a ldr r0, [pc, #40] ; (800f810 <ip_reass_dequeue_datagram+0x58>)
800f7e6: f000 fdf3 bl 80103d0 <printf>
prev->next = ipr->next;
800f7ea: 687b ldr r3, [r7, #4]
800f7ec: 681a ldr r2, [r3, #0]
800f7ee: 683b ldr r3, [r7, #0]
800f7f0: 601a str r2, [r3, #0]
}
/* now we can free the ip_reassdata struct */
memp_free(MEMP_REASSDATA, ipr);
800f7f2: 6879 ldr r1, [r7, #4]
800f7f4: 2004 movs r0, #4
800f7f6: f7f5 fa4d bl 8004c94 <memp_free>
}
800f7fa: bf00 nop
800f7fc: 3708 adds r7, #8
800f7fe: 46bd mov sp, r7
800f800: bd80 pop {r7, pc}
800f802: bf00 nop
800f804: 20008d88 .word 0x20008d88
800f808: 08017a24 .word 0x08017a24
800f80c: 08017aec .word 0x08017aec
800f810: 08017a6c .word 0x08017a6c
0800f814 <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)
{
800f814: b580 push {r7, lr}
800f816: b08c sub sp, #48 ; 0x30
800f818: af00 add r7, sp, #0
800f81a: 60f8 str r0, [r7, #12]
800f81c: 60b9 str r1, [r7, #8]
800f81e: 607a str r2, [r7, #4]
struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev = NULL;
800f820: 2300 movs r3, #0
800f822: 62bb str r3, [r7, #40] ; 0x28
struct pbuf *q;
u16_t offset, len;
u8_t hlen;
struct ip_hdr *fraghdr;
int valid = 1;
800f824: 2301 movs r3, #1
800f826: 623b str r3, [r7, #32]
/* Extract length and fragment offset from current fragment */
fraghdr = (struct ip_hdr *)new_p->payload;
800f828: 68bb ldr r3, [r7, #8]
800f82a: 685b ldr r3, [r3, #4]
800f82c: 61fb str r3, [r7, #28]
len = lwip_ntohs(IPH_LEN(fraghdr));
800f82e: 69fb ldr r3, [r7, #28]
800f830: 885b ldrh r3, [r3, #2]
800f832: b29b uxth r3, r3
800f834: 4618 mov r0, r3
800f836: f7f4 fd45 bl 80042c4 <lwip_htons>
800f83a: 4603 mov r3, r0
800f83c: 837b strh r3, [r7, #26]
hlen = IPH_HL_BYTES(fraghdr);
800f83e: 69fb ldr r3, [r7, #28]
800f840: 781b ldrb r3, [r3, #0]
800f842: f003 030f and.w r3, r3, #15
800f846: b2db uxtb r3, r3
800f848: 009b lsls r3, r3, #2
800f84a: 767b strb r3, [r7, #25]
if (hlen > len) {
800f84c: 7e7b ldrb r3, [r7, #25]
800f84e: b29b uxth r3, r3
800f850: 8b7a ldrh r2, [r7, #26]
800f852: 429a cmp r2, r3
800f854: d202 bcs.n 800f85c <ip_reass_chain_frag_into_datagram_and_validate+0x48>
/* invalid datagram */
return IP_REASS_VALIDATE_PBUF_DROPPED;
800f856: f04f 33ff mov.w r3, #4294967295
800f85a: e135 b.n 800fac8 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
}
len = (u16_t)(len - hlen);
800f85c: 7e7b ldrb r3, [r7, #25]
800f85e: b29b uxth r3, r3
800f860: 8b7a ldrh r2, [r7, #26]
800f862: 1ad3 subs r3, r2, r3
800f864: 837b strh r3, [r7, #26]
offset = IPH_OFFSET_BYTES(fraghdr);
800f866: 69fb ldr r3, [r7, #28]
800f868: 88db ldrh r3, [r3, #6]
800f86a: b29b uxth r3, r3
800f86c: 4618 mov r0, r3
800f86e: f7f4 fd29 bl 80042c4 <lwip_htons>
800f872: 4603 mov r3, r0
800f874: f3c3 030c ubfx r3, r3, #0, #13
800f878: b29b uxth r3, r3
800f87a: 00db lsls r3, r3, #3
800f87c: 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;
800f87e: 68bb ldr r3, [r7, #8]
800f880: 685b ldr r3, [r3, #4]
800f882: 62fb str r3, [r7, #44] ; 0x2c
iprh->next_pbuf = NULL;
800f884: 6afb ldr r3, [r7, #44] ; 0x2c
800f886: 2200 movs r2, #0
800f888: 701a strb r2, [r3, #0]
800f88a: 2200 movs r2, #0
800f88c: 705a strb r2, [r3, #1]
800f88e: 2200 movs r2, #0
800f890: 709a strb r2, [r3, #2]
800f892: 2200 movs r2, #0
800f894: 70da strb r2, [r3, #3]
iprh->start = offset;
800f896: 6afb ldr r3, [r7, #44] ; 0x2c
800f898: 8afa ldrh r2, [r7, #22]
800f89a: 809a strh r2, [r3, #4]
iprh->end = (u16_t)(offset + len);
800f89c: 8afa ldrh r2, [r7, #22]
800f89e: 8b7b ldrh r3, [r7, #26]
800f8a0: 4413 add r3, r2
800f8a2: b29a uxth r2, r3
800f8a4: 6afb ldr r3, [r7, #44] ; 0x2c
800f8a6: 80da strh r2, [r3, #6]
if (iprh->end < offset) {
800f8a8: 6afb ldr r3, [r7, #44] ; 0x2c
800f8aa: 88db ldrh r3, [r3, #6]
800f8ac: b29b uxth r3, r3
800f8ae: 8afa ldrh r2, [r7, #22]
800f8b0: 429a cmp r2, r3
800f8b2: d902 bls.n 800f8ba <ip_reass_chain_frag_into_datagram_and_validate+0xa6>
/* u16_t overflow, cannot handle this */
return IP_REASS_VALIDATE_PBUF_DROPPED;
800f8b4: f04f 33ff mov.w r3, #4294967295
800f8b8: e106 b.n 800fac8 <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;) {
800f8ba: 68fb ldr r3, [r7, #12]
800f8bc: 685b ldr r3, [r3, #4]
800f8be: 627b str r3, [r7, #36] ; 0x24
800f8c0: e068 b.n 800f994 <ip_reass_chain_frag_into_datagram_and_validate+0x180>
iprh_tmp = (struct ip_reass_helper *)q->payload;
800f8c2: 6a7b ldr r3, [r7, #36] ; 0x24
800f8c4: 685b ldr r3, [r3, #4]
800f8c6: 613b str r3, [r7, #16]
if (iprh->start < iprh_tmp->start) {
800f8c8: 6afb ldr r3, [r7, #44] ; 0x2c
800f8ca: 889b ldrh r3, [r3, #4]
800f8cc: b29a uxth r2, r3
800f8ce: 693b ldr r3, [r7, #16]
800f8d0: 889b ldrh r3, [r3, #4]
800f8d2: b29b uxth r3, r3
800f8d4: 429a cmp r2, r3
800f8d6: d235 bcs.n 800f944 <ip_reass_chain_frag_into_datagram_and_validate+0x130>
/* the new pbuf should be inserted before this */
iprh->next_pbuf = q;
800f8d8: 6afb ldr r3, [r7, #44] ; 0x2c
800f8da: 6a7a ldr r2, [r7, #36] ; 0x24
800f8dc: 601a str r2, [r3, #0]
if (iprh_prev != NULL) {
800f8de: 6abb ldr r3, [r7, #40] ; 0x28
800f8e0: 2b00 cmp r3, #0
800f8e2: d020 beq.n 800f926 <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)) {
800f8e4: 6afb ldr r3, [r7, #44] ; 0x2c
800f8e6: 889b ldrh r3, [r3, #4]
800f8e8: b29a uxth r2, r3
800f8ea: 6abb ldr r3, [r7, #40] ; 0x28
800f8ec: 88db ldrh r3, [r3, #6]
800f8ee: b29b uxth r3, r3
800f8f0: 429a cmp r2, r3
800f8f2: d307 bcc.n 800f904 <ip_reass_chain_frag_into_datagram_and_validate+0xf0>
800f8f4: 6afb ldr r3, [r7, #44] ; 0x2c
800f8f6: 88db ldrh r3, [r3, #6]
800f8f8: b29a uxth r2, r3
800f8fa: 693b ldr r3, [r7, #16]
800f8fc: 889b ldrh r3, [r3, #4]
800f8fe: b29b uxth r3, r3
800f900: 429a cmp r2, r3
800f902: d902 bls.n 800f90a <ip_reass_chain_frag_into_datagram_and_validate+0xf6>
/* fragment overlaps with previous or following, throw away */
return IP_REASS_VALIDATE_PBUF_DROPPED;
800f904: f04f 33ff mov.w r3, #4294967295
800f908: e0de b.n 800fac8 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
}
#endif /* IP_REASS_CHECK_OVERLAP */
iprh_prev->next_pbuf = new_p;
800f90a: 6abb ldr r3, [r7, #40] ; 0x28
800f90c: 68ba ldr r2, [r7, #8]
800f90e: 601a str r2, [r3, #0]
if (iprh_prev->end != iprh->start) {
800f910: 6abb ldr r3, [r7, #40] ; 0x28
800f912: 88db ldrh r3, [r3, #6]
800f914: b29a uxth r2, r3
800f916: 6afb ldr r3, [r7, #44] ; 0x2c
800f918: 889b ldrh r3, [r3, #4]
800f91a: b29b uxth r3, r3
800f91c: 429a cmp r2, r3
800f91e: d03d beq.n 800f99c <ip_reass_chain_frag_into_datagram_and_validate+0x188>
/* There is a fragment missing between the current
* and the previous fragment */
valid = 0;
800f920: 2300 movs r3, #0
800f922: 623b str r3, [r7, #32]
}
#endif /* IP_REASS_CHECK_OVERLAP */
/* fragment with the lowest offset */
ipr->p = new_p;
}
break;
800f924: e03a b.n 800f99c <ip_reass_chain_frag_into_datagram_and_validate+0x188>
if (iprh->end > iprh_tmp->start) {
800f926: 6afb ldr r3, [r7, #44] ; 0x2c
800f928: 88db ldrh r3, [r3, #6]
800f92a: b29a uxth r2, r3
800f92c: 693b ldr r3, [r7, #16]
800f92e: 889b ldrh r3, [r3, #4]
800f930: b29b uxth r3, r3
800f932: 429a cmp r2, r3
800f934: d902 bls.n 800f93c <ip_reass_chain_frag_into_datagram_and_validate+0x128>
return IP_REASS_VALIDATE_PBUF_DROPPED;
800f936: f04f 33ff mov.w r3, #4294967295
800f93a: e0c5 b.n 800fac8 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
ipr->p = new_p;
800f93c: 68fb ldr r3, [r7, #12]
800f93e: 68ba ldr r2, [r7, #8]
800f940: 605a str r2, [r3, #4]
break;
800f942: e02b b.n 800f99c <ip_reass_chain_frag_into_datagram_and_validate+0x188>
} else if (iprh->start == iprh_tmp->start) {
800f944: 6afb ldr r3, [r7, #44] ; 0x2c
800f946: 889b ldrh r3, [r3, #4]
800f948: b29a uxth r2, r3
800f94a: 693b ldr r3, [r7, #16]
800f94c: 889b ldrh r3, [r3, #4]
800f94e: b29b uxth r3, r3
800f950: 429a cmp r2, r3
800f952: d102 bne.n 800f95a <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;
800f954: f04f 33ff mov.w r3, #4294967295
800f958: e0b6 b.n 800fac8 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
#if IP_REASS_CHECK_OVERLAP
} else if (iprh->start < iprh_tmp->end) {
800f95a: 6afb ldr r3, [r7, #44] ; 0x2c
800f95c: 889b ldrh r3, [r3, #4]
800f95e: b29a uxth r2, r3
800f960: 693b ldr r3, [r7, #16]
800f962: 88db ldrh r3, [r3, #6]
800f964: b29b uxth r3, r3
800f966: 429a cmp r2, r3
800f968: d202 bcs.n 800f970 <ip_reass_chain_frag_into_datagram_and_validate+0x15c>
/* overlap: no need to keep the new datagram */
return IP_REASS_VALIDATE_PBUF_DROPPED;
800f96a: f04f 33ff mov.w r3, #4294967295
800f96e: e0ab b.n 800fac8 <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) {
800f970: 6abb ldr r3, [r7, #40] ; 0x28
800f972: 2b00 cmp r3, #0
800f974: d009 beq.n 800f98a <ip_reass_chain_frag_into_datagram_and_validate+0x176>
if (iprh_prev->end != iprh_tmp->start) {
800f976: 6abb ldr r3, [r7, #40] ; 0x28
800f978: 88db ldrh r3, [r3, #6]
800f97a: b29a uxth r2, r3
800f97c: 693b ldr r3, [r7, #16]
800f97e: 889b ldrh r3, [r3, #4]
800f980: b29b uxth r3, r3
800f982: 429a cmp r2, r3
800f984: d001 beq.n 800f98a <ip_reass_chain_frag_into_datagram_and_validate+0x176>
/* There is a fragment missing between the current
* and the previous fragment */
valid = 0;
800f986: 2300 movs r3, #0
800f988: 623b str r3, [r7, #32]
}
}
}
q = iprh_tmp->next_pbuf;
800f98a: 693b ldr r3, [r7, #16]
800f98c: 681b ldr r3, [r3, #0]
800f98e: 627b str r3, [r7, #36] ; 0x24
iprh_prev = iprh_tmp;
800f990: 693b ldr r3, [r7, #16]
800f992: 62bb str r3, [r7, #40] ; 0x28
for (q = ipr->p; q != NULL;) {
800f994: 6a7b ldr r3, [r7, #36] ; 0x24
800f996: 2b00 cmp r3, #0
800f998: d193 bne.n 800f8c2 <ip_reass_chain_frag_into_datagram_and_validate+0xae>
800f99a: e000 b.n 800f99e <ip_reass_chain_frag_into_datagram_and_validate+0x18a>
break;
800f99c: bf00 nop
}
/* If q is NULL, then we made it to the end of the list. Determine what to do now */
if (q == NULL) {
800f99e: 6a7b ldr r3, [r7, #36] ; 0x24
800f9a0: 2b00 cmp r3, #0
800f9a2: d12d bne.n 800fa00 <ip_reass_chain_frag_into_datagram_and_validate+0x1ec>
if (iprh_prev != NULL) {
800f9a4: 6abb ldr r3, [r7, #40] ; 0x28
800f9a6: 2b00 cmp r3, #0
800f9a8: d01c beq.n 800f9e4 <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);
800f9aa: 6abb ldr r3, [r7, #40] ; 0x28
800f9ac: 88db ldrh r3, [r3, #6]
800f9ae: b29a uxth r2, r3
800f9b0: 6afb ldr r3, [r7, #44] ; 0x2c
800f9b2: 889b ldrh r3, [r3, #4]
800f9b4: b29b uxth r3, r3
800f9b6: 429a cmp r2, r3
800f9b8: d906 bls.n 800f9c8 <ip_reass_chain_frag_into_datagram_and_validate+0x1b4>
800f9ba: 4b45 ldr r3, [pc, #276] ; (800fad0 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
800f9bc: f44f 72db mov.w r2, #438 ; 0x1b6
800f9c0: 4944 ldr r1, [pc, #272] ; (800fad4 <ip_reass_chain_frag_into_datagram_and_validate+0x2c0>)
800f9c2: 4845 ldr r0, [pc, #276] ; (800fad8 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
800f9c4: f000 fd04 bl 80103d0 <printf>
#endif /* IP_REASS_CHECK_OVERLAP */
iprh_prev->next_pbuf = new_p;
800f9c8: 6abb ldr r3, [r7, #40] ; 0x28
800f9ca: 68ba ldr r2, [r7, #8]
800f9cc: 601a str r2, [r3, #0]
if (iprh_prev->end != iprh->start) {
800f9ce: 6abb ldr r3, [r7, #40] ; 0x28
800f9d0: 88db ldrh r3, [r3, #6]
800f9d2: b29a uxth r2, r3
800f9d4: 6afb ldr r3, [r7, #44] ; 0x2c
800f9d6: 889b ldrh r3, [r3, #4]
800f9d8: b29b uxth r3, r3
800f9da: 429a cmp r2, r3
800f9dc: d010 beq.n 800fa00 <ip_reass_chain_frag_into_datagram_and_validate+0x1ec>
valid = 0;
800f9de: 2300 movs r3, #0
800f9e0: 623b str r3, [r7, #32]
800f9e2: e00d b.n 800fa00 <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!",
800f9e4: 68fb ldr r3, [r7, #12]
800f9e6: 685b ldr r3, [r3, #4]
800f9e8: 2b00 cmp r3, #0
800f9ea: d006 beq.n 800f9fa <ip_reass_chain_frag_into_datagram_and_validate+0x1e6>
800f9ec: 4b38 ldr r3, [pc, #224] ; (800fad0 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
800f9ee: f44f 72df mov.w r2, #446 ; 0x1be
800f9f2: 493a ldr r1, [pc, #232] ; (800fadc <ip_reass_chain_frag_into_datagram_and_validate+0x2c8>)
800f9f4: 4838 ldr r0, [pc, #224] ; (800fad8 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
800f9f6: f000 fceb bl 80103d0 <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;
800f9fa: 68fb ldr r3, [r7, #12]
800f9fc: 68ba ldr r2, [r7, #8]
800f9fe: 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)) {
800fa00: 687b ldr r3, [r7, #4]
800fa02: 2b00 cmp r3, #0
800fa04: d105 bne.n 800fa12 <ip_reass_chain_frag_into_datagram_and_validate+0x1fe>
800fa06: 68fb ldr r3, [r7, #12]
800fa08: 7f9b ldrb r3, [r3, #30]
800fa0a: f003 0301 and.w r3, r3, #1
800fa0e: 2b00 cmp r3, #0
800fa10: d059 beq.n 800fac6 <ip_reass_chain_frag_into_datagram_and_validate+0x2b2>
/* and had no holes so far */
if (valid) {
800fa12: 6a3b ldr r3, [r7, #32]
800fa14: 2b00 cmp r3, #0
800fa16: d04f beq.n 800fab8 <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)) {
800fa18: 68fb ldr r3, [r7, #12]
800fa1a: 685b ldr r3, [r3, #4]
800fa1c: 2b00 cmp r3, #0
800fa1e: d006 beq.n 800fa2e <ip_reass_chain_frag_into_datagram_and_validate+0x21a>
800fa20: 68fb ldr r3, [r7, #12]
800fa22: 685b ldr r3, [r3, #4]
800fa24: 685b ldr r3, [r3, #4]
800fa26: 889b ldrh r3, [r3, #4]
800fa28: b29b uxth r3, r3
800fa2a: 2b00 cmp r3, #0
800fa2c: d002 beq.n 800fa34 <ip_reass_chain_frag_into_datagram_and_validate+0x220>
valid = 0;
800fa2e: 2300 movs r3, #0
800fa30: 623b str r3, [r7, #32]
800fa32: e041 b.n 800fab8 <ip_reass_chain_frag_into_datagram_and_validate+0x2a4>
} else {
/* and check that there are no holes after this datagram */
iprh_prev = iprh;
800fa34: 6afb ldr r3, [r7, #44] ; 0x2c
800fa36: 62bb str r3, [r7, #40] ; 0x28
q = iprh->next_pbuf;
800fa38: 6afb ldr r3, [r7, #44] ; 0x2c
800fa3a: 681b ldr r3, [r3, #0]
800fa3c: 627b str r3, [r7, #36] ; 0x24
while (q != NULL) {
800fa3e: e012 b.n 800fa66 <ip_reass_chain_frag_into_datagram_and_validate+0x252>
iprh = (struct ip_reass_helper *)q->payload;
800fa40: 6a7b ldr r3, [r7, #36] ; 0x24
800fa42: 685b ldr r3, [r3, #4]
800fa44: 62fb str r3, [r7, #44] ; 0x2c
if (iprh_prev->end != iprh->start) {
800fa46: 6abb ldr r3, [r7, #40] ; 0x28
800fa48: 88db ldrh r3, [r3, #6]
800fa4a: b29a uxth r2, r3
800fa4c: 6afb ldr r3, [r7, #44] ; 0x2c
800fa4e: 889b ldrh r3, [r3, #4]
800fa50: b29b uxth r3, r3
800fa52: 429a cmp r2, r3
800fa54: d002 beq.n 800fa5c <ip_reass_chain_frag_into_datagram_and_validate+0x248>
valid = 0;
800fa56: 2300 movs r3, #0
800fa58: 623b str r3, [r7, #32]
break;
800fa5a: e007 b.n 800fa6c <ip_reass_chain_frag_into_datagram_and_validate+0x258>
}
iprh_prev = iprh;
800fa5c: 6afb ldr r3, [r7, #44] ; 0x2c
800fa5e: 62bb str r3, [r7, #40] ; 0x28
q = iprh->next_pbuf;
800fa60: 6afb ldr r3, [r7, #44] ; 0x2c
800fa62: 681b ldr r3, [r3, #0]
800fa64: 627b str r3, [r7, #36] ; 0x24
while (q != NULL) {
800fa66: 6a7b ldr r3, [r7, #36] ; 0x24
800fa68: 2b00 cmp r3, #0
800fa6a: d1e9 bne.n 800fa40 <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) {
800fa6c: 6a3b ldr r3, [r7, #32]
800fa6e: 2b00 cmp r3, #0
800fa70: d022 beq.n 800fab8 <ip_reass_chain_frag_into_datagram_and_validate+0x2a4>
LWIP_ASSERT("sanity check", ipr->p != NULL);
800fa72: 68fb ldr r3, [r7, #12]
800fa74: 685b ldr r3, [r3, #4]
800fa76: 2b00 cmp r3, #0
800fa78: d106 bne.n 800fa88 <ip_reass_chain_frag_into_datagram_and_validate+0x274>
800fa7a: 4b15 ldr r3, [pc, #84] ; (800fad0 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
800fa7c: f240 12df movw r2, #479 ; 0x1df
800fa80: 4917 ldr r1, [pc, #92] ; (800fae0 <ip_reass_chain_frag_into_datagram_and_validate+0x2cc>)
800fa82: 4815 ldr r0, [pc, #84] ; (800fad8 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
800fa84: f000 fca4 bl 80103d0 <printf>
LWIP_ASSERT("sanity check",
800fa88: 68fb ldr r3, [r7, #12]
800fa8a: 685b ldr r3, [r3, #4]
800fa8c: 685b ldr r3, [r3, #4]
800fa8e: 6afa ldr r2, [r7, #44] ; 0x2c
800fa90: 429a cmp r2, r3
800fa92: d106 bne.n 800faa2 <ip_reass_chain_frag_into_datagram_and_validate+0x28e>
800fa94: 4b0e ldr r3, [pc, #56] ; (800fad0 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
800fa96: f44f 72f0 mov.w r2, #480 ; 0x1e0
800fa9a: 4911 ldr r1, [pc, #68] ; (800fae0 <ip_reass_chain_frag_into_datagram_and_validate+0x2cc>)
800fa9c: 480e ldr r0, [pc, #56] ; (800fad8 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
800fa9e: f000 fc97 bl 80103d0 <printf>
((struct ip_reass_helper *)ipr->p->payload) != iprh);
LWIP_ASSERT("validate_datagram:next_pbuf!=NULL",
800faa2: 6afb ldr r3, [r7, #44] ; 0x2c
800faa4: 681b ldr r3, [r3, #0]
800faa6: 2b00 cmp r3, #0
800faa8: d006 beq.n 800fab8 <ip_reass_chain_frag_into_datagram_and_validate+0x2a4>
800faaa: 4b09 ldr r3, [pc, #36] ; (800fad0 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
800faac: f44f 72f1 mov.w r2, #482 ; 0x1e2
800fab0: 490c ldr r1, [pc, #48] ; (800fae4 <ip_reass_chain_frag_into_datagram_and_validate+0x2d0>)
800fab2: 4809 ldr r0, [pc, #36] ; (800fad8 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
800fab4: f000 fc8c bl 80103d0 <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;
800fab8: 6a3b ldr r3, [r7, #32]
800faba: 2b00 cmp r3, #0
800fabc: bf14 ite ne
800fabe: 2301 movne r3, #1
800fac0: 2300 moveq r3, #0
800fac2: b2db uxtb r3, r3
800fac4: e000 b.n 800fac8 <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! */
800fac6: 2300 movs r3, #0
}
800fac8: 4618 mov r0, r3
800faca: 3730 adds r7, #48 ; 0x30
800facc: 46bd mov sp, r7
800face: bd80 pop {r7, pc}
800fad0: 08017a24 .word 0x08017a24
800fad4: 08017b08 .word 0x08017b08
800fad8: 08017a6c .word 0x08017a6c
800fadc: 08017b28 .word 0x08017b28
800fae0: 08017b60 .word 0x08017b60
800fae4: 08017b70 .word 0x08017b70
0800fae8 <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)
{
800fae8: b580 push {r7, lr}
800faea: b08e sub sp, #56 ; 0x38
800faec: af00 add r7, sp, #0
800faee: 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;
800faf0: 687b ldr r3, [r7, #4]
800faf2: 685b ldr r3, [r3, #4]
800faf4: 62bb str r3, [r7, #40] ; 0x28
if (IPH_HL_BYTES(fraghdr) != IP_HLEN) {
800faf6: 6abb ldr r3, [r7, #40] ; 0x28
800faf8: 781b ldrb r3, [r3, #0]
800fafa: f003 030f and.w r3, r3, #15
800fafe: b2db uxtb r3, r3
800fb00: 009b lsls r3, r3, #2
800fb02: b2db uxtb r3, r3
800fb04: 2b14 cmp r3, #20
800fb06: f040 8171 bne.w 800fdec <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);
800fb0a: 6abb ldr r3, [r7, #40] ; 0x28
800fb0c: 88db ldrh r3, [r3, #6]
800fb0e: b29b uxth r3, r3
800fb10: 4618 mov r0, r3
800fb12: f7f4 fbd7 bl 80042c4 <lwip_htons>
800fb16: 4603 mov r3, r0
800fb18: f3c3 030c ubfx r3, r3, #0, #13
800fb1c: b29b uxth r3, r3
800fb1e: 00db lsls r3, r3, #3
800fb20: 84fb strh r3, [r7, #38] ; 0x26
len = lwip_ntohs(IPH_LEN(fraghdr));
800fb22: 6abb ldr r3, [r7, #40] ; 0x28
800fb24: 885b ldrh r3, [r3, #2]
800fb26: b29b uxth r3, r3
800fb28: 4618 mov r0, r3
800fb2a: f7f4 fbcb bl 80042c4 <lwip_htons>
800fb2e: 4603 mov r3, r0
800fb30: 84bb strh r3, [r7, #36] ; 0x24
hlen = IPH_HL_BYTES(fraghdr);
800fb32: 6abb ldr r3, [r7, #40] ; 0x28
800fb34: 781b ldrb r3, [r3, #0]
800fb36: f003 030f and.w r3, r3, #15
800fb3a: b2db uxtb r3, r3
800fb3c: 009b lsls r3, r3, #2
800fb3e: f887 3023 strb.w r3, [r7, #35] ; 0x23
if (hlen > len) {
800fb42: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
800fb46: b29b uxth r3, r3
800fb48: 8cba ldrh r2, [r7, #36] ; 0x24
800fb4a: 429a cmp r2, r3
800fb4c: f0c0 8150 bcc.w 800fdf0 <ip4_reass+0x308>
/* invalid datagram */
goto nullreturn;
}
len = (u16_t)(len - hlen);
800fb50: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
800fb54: b29b uxth r3, r3
800fb56: 8cba ldrh r2, [r7, #36] ; 0x24
800fb58: 1ad3 subs r3, r2, r3
800fb5a: 84bb strh r3, [r7, #36] ; 0x24
/* Check if we are allowed to enqueue more datagrams. */
clen = pbuf_clen(p);
800fb5c: 6878 ldr r0, [r7, #4]
800fb5e: f7f5 ffa3 bl 8005aa8 <pbuf_clen>
800fb62: 4603 mov r3, r0
800fb64: 843b strh r3, [r7, #32]
if ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) {
800fb66: 4b8c ldr r3, [pc, #560] ; (800fd98 <ip4_reass+0x2b0>)
800fb68: 881b ldrh r3, [r3, #0]
800fb6a: 461a mov r2, r3
800fb6c: 8c3b ldrh r3, [r7, #32]
800fb6e: 4413 add r3, r2
800fb70: 2b0a cmp r3, #10
800fb72: dd10 ble.n 800fb96 <ip4_reass+0xae>
#if IP_REASS_FREE_OLDEST
if (!ip_reass_remove_oldest_datagram(fraghdr, clen) ||
800fb74: 8c3b ldrh r3, [r7, #32]
800fb76: 4619 mov r1, r3
800fb78: 6ab8 ldr r0, [r7, #40] ; 0x28
800fb7a: f7ff fd81 bl 800f680 <ip_reass_remove_oldest_datagram>
800fb7e: 4603 mov r3, r0
800fb80: 2b00 cmp r3, #0
800fb82: f000 8137 beq.w 800fdf4 <ip4_reass+0x30c>
((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS))
800fb86: 4b84 ldr r3, [pc, #528] ; (800fd98 <ip4_reass+0x2b0>)
800fb88: 881b ldrh r3, [r3, #0]
800fb8a: 461a mov r2, r3
800fb8c: 8c3b ldrh r3, [r7, #32]
800fb8e: 4413 add r3, r2
if (!ip_reass_remove_oldest_datagram(fraghdr, clen) ||
800fb90: 2b0a cmp r3, #10
800fb92: f300 812f bgt.w 800fdf4 <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) {
800fb96: 4b81 ldr r3, [pc, #516] ; (800fd9c <ip4_reass+0x2b4>)
800fb98: 681b ldr r3, [r3, #0]
800fb9a: 633b str r3, [r7, #48] ; 0x30
800fb9c: e015 b.n 800fbca <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)) {
800fb9e: 6b3b ldr r3, [r7, #48] ; 0x30
800fba0: 695a ldr r2, [r3, #20]
800fba2: 6abb ldr r3, [r7, #40] ; 0x28
800fba4: 68db ldr r3, [r3, #12]
800fba6: 429a cmp r2, r3
800fba8: d10c bne.n 800fbc4 <ip4_reass+0xdc>
800fbaa: 6b3b ldr r3, [r7, #48] ; 0x30
800fbac: 699a ldr r2, [r3, #24]
800fbae: 6abb ldr r3, [r7, #40] ; 0x28
800fbb0: 691b ldr r3, [r3, #16]
800fbb2: 429a cmp r2, r3
800fbb4: d106 bne.n 800fbc4 <ip4_reass+0xdc>
800fbb6: 6b3b ldr r3, [r7, #48] ; 0x30
800fbb8: 899a ldrh r2, [r3, #12]
800fbba: 6abb ldr r3, [r7, #40] ; 0x28
800fbbc: 889b ldrh r3, [r3, #4]
800fbbe: b29b uxth r3, r3
800fbc0: 429a cmp r2, r3
800fbc2: d006 beq.n 800fbd2 <ip4_reass+0xea>
for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) {
800fbc4: 6b3b ldr r3, [r7, #48] ; 0x30
800fbc6: 681b ldr r3, [r3, #0]
800fbc8: 633b str r3, [r7, #48] ; 0x30
800fbca: 6b3b ldr r3, [r7, #48] ; 0x30
800fbcc: 2b00 cmp r3, #0
800fbce: d1e6 bne.n 800fb9e <ip4_reass+0xb6>
800fbd0: e000 b.n 800fbd4 <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;
800fbd2: bf00 nop
}
}
if (ipr == NULL) {
800fbd4: 6b3b ldr r3, [r7, #48] ; 0x30
800fbd6: 2b00 cmp r3, #0
800fbd8: d109 bne.n 800fbee <ip4_reass+0x106>
/* Enqueue a new datagram into the datagram queue */
ipr = ip_reass_enqueue_new_datagram(fraghdr, clen);
800fbda: 8c3b ldrh r3, [r7, #32]
800fbdc: 4619 mov r1, r3
800fbde: 6ab8 ldr r0, [r7, #40] ; 0x28
800fbe0: f7ff fdb0 bl 800f744 <ip_reass_enqueue_new_datagram>
800fbe4: 6338 str r0, [r7, #48] ; 0x30
/* Bail if unable to enqueue */
if (ipr == NULL) {
800fbe6: 6b3b ldr r3, [r7, #48] ; 0x30
800fbe8: 2b00 cmp r3, #0
800fbea: d11c bne.n 800fc26 <ip4_reass+0x13e>
goto nullreturn;
800fbec: e105 b.n 800fdfa <ip4_reass+0x312>
}
} else {
if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) &&
800fbee: 6abb ldr r3, [r7, #40] ; 0x28
800fbf0: 88db ldrh r3, [r3, #6]
800fbf2: b29b uxth r3, r3
800fbf4: 4618 mov r0, r3
800fbf6: f7f4 fb65 bl 80042c4 <lwip_htons>
800fbfa: 4603 mov r3, r0
800fbfc: f3c3 030c ubfx r3, r3, #0, #13
800fc00: 2b00 cmp r3, #0
800fc02: d110 bne.n 800fc26 <ip4_reass+0x13e>
((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) {
800fc04: 6b3b ldr r3, [r7, #48] ; 0x30
800fc06: 89db ldrh r3, [r3, #14]
800fc08: 4618 mov r0, r3
800fc0a: f7f4 fb5b bl 80042c4 <lwip_htons>
800fc0e: 4603 mov r3, r0
800fc10: f3c3 030c ubfx r3, r3, #0, #13
if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) &&
800fc14: 2b00 cmp r3, #0
800fc16: d006 beq.n 800fc26 <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);
800fc18: 6b3b ldr r3, [r7, #48] ; 0x30
800fc1a: 3308 adds r3, #8
800fc1c: 2214 movs r2, #20
800fc1e: 6ab9 ldr r1, [r7, #40] ; 0x28
800fc20: 4618 mov r0, r3
800fc22: f000 fba5 bl 8010370 <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;
800fc26: 6abb ldr r3, [r7, #40] ; 0x28
800fc28: 88db ldrh r3, [r3, #6]
800fc2a: b29b uxth r3, r3
800fc2c: f003 0320 and.w r3, r3, #32
800fc30: 2b00 cmp r3, #0
800fc32: bf0c ite eq
800fc34: 2301 moveq r3, #1
800fc36: 2300 movne r3, #0
800fc38: b2db uxtb r3, r3
800fc3a: 61fb str r3, [r7, #28]
if (is_last) {
800fc3c: 69fb ldr r3, [r7, #28]
800fc3e: 2b00 cmp r3, #0
800fc40: d00e beq.n 800fc60 <ip4_reass+0x178>
u16_t datagram_len = (u16_t)(offset + len);
800fc42: 8cfa ldrh r2, [r7, #38] ; 0x26
800fc44: 8cbb ldrh r3, [r7, #36] ; 0x24
800fc46: 4413 add r3, r2
800fc48: 837b strh r3, [r7, #26]
if ((datagram_len < offset) || (datagram_len > (0xFFFF - IP_HLEN))) {
800fc4a: 8b7a ldrh r2, [r7, #26]
800fc4c: 8cfb ldrh r3, [r7, #38] ; 0x26
800fc4e: 429a cmp r2, r3
800fc50: f0c0 80a0 bcc.w 800fd94 <ip4_reass+0x2ac>
800fc54: 8b7b ldrh r3, [r7, #26]
800fc56: f64f 72eb movw r2, #65515 ; 0xffeb
800fc5a: 4293 cmp r3, r2
800fc5c: f200 809a bhi.w 800fd94 <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);
800fc60: 69fa ldr r2, [r7, #28]
800fc62: 6879 ldr r1, [r7, #4]
800fc64: 6b38 ldr r0, [r7, #48] ; 0x30
800fc66: f7ff fdd5 bl 800f814 <ip_reass_chain_frag_into_datagram_and_validate>
800fc6a: 6178 str r0, [r7, #20]
if (valid == IP_REASS_VALIDATE_PBUF_DROPPED) {
800fc6c: 697b ldr r3, [r7, #20]
800fc6e: f1b3 3fff cmp.w r3, #4294967295
800fc72: f000 809b beq.w 800fdac <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);
800fc76: 4b48 ldr r3, [pc, #288] ; (800fd98 <ip4_reass+0x2b0>)
800fc78: 881a ldrh r2, [r3, #0]
800fc7a: 8c3b ldrh r3, [r7, #32]
800fc7c: 4413 add r3, r2
800fc7e: b29a uxth r2, r3
800fc80: 4b45 ldr r3, [pc, #276] ; (800fd98 <ip4_reass+0x2b0>)
800fc82: 801a strh r2, [r3, #0]
if (is_last) {
800fc84: 69fb ldr r3, [r7, #28]
800fc86: 2b00 cmp r3, #0
800fc88: d00d beq.n 800fca6 <ip4_reass+0x1be>
u16_t datagram_len = (u16_t)(offset + len);
800fc8a: 8cfa ldrh r2, [r7, #38] ; 0x26
800fc8c: 8cbb ldrh r3, [r7, #36] ; 0x24
800fc8e: 4413 add r3, r2
800fc90: 827b strh r3, [r7, #18]
ipr->datagram_len = datagram_len;
800fc92: 6b3b ldr r3, [r7, #48] ; 0x30
800fc94: 8a7a ldrh r2, [r7, #18]
800fc96: 839a strh r2, [r3, #28]
ipr->flags |= IP_REASS_FLAG_LASTFRAG;
800fc98: 6b3b ldr r3, [r7, #48] ; 0x30
800fc9a: 7f9b ldrb r3, [r3, #30]
800fc9c: f043 0301 orr.w r3, r3, #1
800fca0: b2da uxtb r2, r3
800fca2: 6b3b ldr r3, [r7, #48] ; 0x30
800fca4: 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) {
800fca6: 697b ldr r3, [r7, #20]
800fca8: 2b01 cmp r3, #1
800fcaa: d171 bne.n 800fd90 <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);
800fcac: 6b3b ldr r3, [r7, #48] ; 0x30
800fcae: 8b9b ldrh r3, [r3, #28]
800fcb0: 3314 adds r3, #20
800fcb2: 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;
800fcb4: 6b3b ldr r3, [r7, #48] ; 0x30
800fcb6: 685b ldr r3, [r3, #4]
800fcb8: 685b ldr r3, [r3, #4]
800fcba: 681b ldr r3, [r3, #0]
800fcbc: 637b str r3, [r7, #52] ; 0x34
/* copy the original ip header back to the first pbuf */
fraghdr = (struct ip_hdr *)(ipr->p->payload);
800fcbe: 6b3b ldr r3, [r7, #48] ; 0x30
800fcc0: 685b ldr r3, [r3, #4]
800fcc2: 685b ldr r3, [r3, #4]
800fcc4: 62bb str r3, [r7, #40] ; 0x28
SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN);
800fcc6: 6b3b ldr r3, [r7, #48] ; 0x30
800fcc8: 3308 adds r3, #8
800fcca: 2214 movs r2, #20
800fccc: 4619 mov r1, r3
800fcce: 6ab8 ldr r0, [r7, #40] ; 0x28
800fcd0: f000 fb4e bl 8010370 <memcpy>
IPH_LEN_SET(fraghdr, lwip_htons(datagram_len));
800fcd4: 8a3b ldrh r3, [r7, #16]
800fcd6: 4618 mov r0, r3
800fcd8: f7f4 faf4 bl 80042c4 <lwip_htons>
800fcdc: 4603 mov r3, r0
800fcde: 461a mov r2, r3
800fce0: 6abb ldr r3, [r7, #40] ; 0x28
800fce2: 805a strh r2, [r3, #2]
IPH_OFFSET_SET(fraghdr, 0);
800fce4: 6abb ldr r3, [r7, #40] ; 0x28
800fce6: 2200 movs r2, #0
800fce8: 719a strb r2, [r3, #6]
800fcea: 2200 movs r2, #0
800fcec: 71da strb r2, [r3, #7]
IPH_CHKSUM_SET(fraghdr, 0);
800fcee: 6abb ldr r3, [r7, #40] ; 0x28
800fcf0: 2200 movs r2, #0
800fcf2: 729a strb r2, [r3, #10]
800fcf4: 2200 movs r2, #0
800fcf6: 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;
800fcf8: 6b3b ldr r3, [r7, #48] ; 0x30
800fcfa: 685b ldr r3, [r3, #4]
800fcfc: 607b str r3, [r7, #4]
/* chain together the pbufs contained within the reass_data list. */
while (r != NULL) {
800fcfe: e00d b.n 800fd1c <ip4_reass+0x234>
iprh = (struct ip_reass_helper *)r->payload;
800fd00: 6b7b ldr r3, [r7, #52] ; 0x34
800fd02: 685b ldr r3, [r3, #4]
800fd04: 60fb str r3, [r7, #12]
/* hide the ip header for every succeeding fragment */
pbuf_remove_header(r, IP_HLEN);
800fd06: 2114 movs r1, #20
800fd08: 6b78 ldr r0, [r7, #52] ; 0x34
800fd0a: f7f5 fdbf bl 800588c <pbuf_remove_header>
pbuf_cat(p, r);
800fd0e: 6b79 ldr r1, [r7, #52] ; 0x34
800fd10: 6878 ldr r0, [r7, #4]
800fd12: f7f5 ff03 bl 8005b1c <pbuf_cat>
r = iprh->next_pbuf;
800fd16: 68fb ldr r3, [r7, #12]
800fd18: 681b ldr r3, [r3, #0]
800fd1a: 637b str r3, [r7, #52] ; 0x34
while (r != NULL) {
800fd1c: 6b7b ldr r3, [r7, #52] ; 0x34
800fd1e: 2b00 cmp r3, #0
800fd20: d1ee bne.n 800fd00 <ip4_reass+0x218>
}
/* find the previous entry in the linked list */
if (ipr == reassdatagrams) {
800fd22: 4b1e ldr r3, [pc, #120] ; (800fd9c <ip4_reass+0x2b4>)
800fd24: 681b ldr r3, [r3, #0]
800fd26: 6b3a ldr r2, [r7, #48] ; 0x30
800fd28: 429a cmp r2, r3
800fd2a: d102 bne.n 800fd32 <ip4_reass+0x24a>
ipr_prev = NULL;
800fd2c: 2300 movs r3, #0
800fd2e: 62fb str r3, [r7, #44] ; 0x2c
800fd30: e010 b.n 800fd54 <ip4_reass+0x26c>
} else {
for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) {
800fd32: 4b1a ldr r3, [pc, #104] ; (800fd9c <ip4_reass+0x2b4>)
800fd34: 681b ldr r3, [r3, #0]
800fd36: 62fb str r3, [r7, #44] ; 0x2c
800fd38: e007 b.n 800fd4a <ip4_reass+0x262>
if (ipr_prev->next == ipr) {
800fd3a: 6afb ldr r3, [r7, #44] ; 0x2c
800fd3c: 681b ldr r3, [r3, #0]
800fd3e: 6b3a ldr r2, [r7, #48] ; 0x30
800fd40: 429a cmp r2, r3
800fd42: d006 beq.n 800fd52 <ip4_reass+0x26a>
for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) {
800fd44: 6afb ldr r3, [r7, #44] ; 0x2c
800fd46: 681b ldr r3, [r3, #0]
800fd48: 62fb str r3, [r7, #44] ; 0x2c
800fd4a: 6afb ldr r3, [r7, #44] ; 0x2c
800fd4c: 2b00 cmp r3, #0
800fd4e: d1f4 bne.n 800fd3a <ip4_reass+0x252>
800fd50: e000 b.n 800fd54 <ip4_reass+0x26c>
break;
800fd52: bf00 nop
}
}
}
/* release the sources allocate for the fragment queue entry */
ip_reass_dequeue_datagram(ipr, ipr_prev);
800fd54: 6af9 ldr r1, [r7, #44] ; 0x2c
800fd56: 6b38 ldr r0, [r7, #48] ; 0x30
800fd58: f7ff fd2e bl 800f7b8 <ip_reass_dequeue_datagram>
/* and adjust the number of pbufs currently queued for reassembly. */
clen = pbuf_clen(p);
800fd5c: 6878 ldr r0, [r7, #4]
800fd5e: f7f5 fea3 bl 8005aa8 <pbuf_clen>
800fd62: 4603 mov r3, r0
800fd64: 843b strh r3, [r7, #32]
LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen);
800fd66: 4b0c ldr r3, [pc, #48] ; (800fd98 <ip4_reass+0x2b0>)
800fd68: 881b ldrh r3, [r3, #0]
800fd6a: 8c3a ldrh r2, [r7, #32]
800fd6c: 429a cmp r2, r3
800fd6e: d906 bls.n 800fd7e <ip4_reass+0x296>
800fd70: 4b0b ldr r3, [pc, #44] ; (800fda0 <ip4_reass+0x2b8>)
800fd72: f240 229b movw r2, #667 ; 0x29b
800fd76: 490b ldr r1, [pc, #44] ; (800fda4 <ip4_reass+0x2bc>)
800fd78: 480b ldr r0, [pc, #44] ; (800fda8 <ip4_reass+0x2c0>)
800fd7a: f000 fb29 bl 80103d0 <printf>
ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - clen);
800fd7e: 4b06 ldr r3, [pc, #24] ; (800fd98 <ip4_reass+0x2b0>)
800fd80: 881a ldrh r2, [r3, #0]
800fd82: 8c3b ldrh r3, [r7, #32]
800fd84: 1ad3 subs r3, r2, r3
800fd86: b29a uxth r2, r3
800fd88: 4b03 ldr r3, [pc, #12] ; (800fd98 <ip4_reass+0x2b0>)
800fd8a: 801a strh r2, [r3, #0]
MIB2_STATS_INC(mib2.ipreasmoks);
/* Return the pbuf chain */
return p;
800fd8c: 687b ldr r3, [r7, #4]
800fd8e: e038 b.n 800fe02 <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;
800fd90: 2300 movs r3, #0
800fd92: e036 b.n 800fe02 <ip4_reass+0x31a>
goto nullreturn_ipr;
800fd94: bf00 nop
800fd96: e00a b.n 800fdae <ip4_reass+0x2c6>
800fd98: 20008d8c .word 0x20008d8c
800fd9c: 20008d88 .word 0x20008d88
800fda0: 08017a24 .word 0x08017a24
800fda4: 08017b94 .word 0x08017b94
800fda8: 08017a6c .word 0x08017a6c
goto nullreturn_ipr;
800fdac: bf00 nop
nullreturn_ipr:
LWIP_ASSERT("ipr != NULL", ipr != NULL);
800fdae: 6b3b ldr r3, [r7, #48] ; 0x30
800fdb0: 2b00 cmp r3, #0
800fdb2: d106 bne.n 800fdc2 <ip4_reass+0x2da>
800fdb4: 4b15 ldr r3, [pc, #84] ; (800fe0c <ip4_reass+0x324>)
800fdb6: f44f 722a mov.w r2, #680 ; 0x2a8
800fdba: 4915 ldr r1, [pc, #84] ; (800fe10 <ip4_reass+0x328>)
800fdbc: 4815 ldr r0, [pc, #84] ; (800fe14 <ip4_reass+0x32c>)
800fdbe: f000 fb07 bl 80103d0 <printf>
if (ipr->p == NULL) {
800fdc2: 6b3b ldr r3, [r7, #48] ; 0x30
800fdc4: 685b ldr r3, [r3, #4]
800fdc6: 2b00 cmp r3, #0
800fdc8: d116 bne.n 800fdf8 <ip4_reass+0x310>
/* dropped pbuf after creating a new datagram entry: remove the entry, too */
LWIP_ASSERT("not firstalthough just enqueued", ipr == reassdatagrams);
800fdca: 4b13 ldr r3, [pc, #76] ; (800fe18 <ip4_reass+0x330>)
800fdcc: 681b ldr r3, [r3, #0]
800fdce: 6b3a ldr r2, [r7, #48] ; 0x30
800fdd0: 429a cmp r2, r3
800fdd2: d006 beq.n 800fde2 <ip4_reass+0x2fa>
800fdd4: 4b0d ldr r3, [pc, #52] ; (800fe0c <ip4_reass+0x324>)
800fdd6: f240 22ab movw r2, #683 ; 0x2ab
800fdda: 4910 ldr r1, [pc, #64] ; (800fe1c <ip4_reass+0x334>)
800fddc: 480d ldr r0, [pc, #52] ; (800fe14 <ip4_reass+0x32c>)
800fdde: f000 faf7 bl 80103d0 <printf>
ip_reass_dequeue_datagram(ipr, NULL);
800fde2: 2100 movs r1, #0
800fde4: 6b38 ldr r0, [r7, #48] ; 0x30
800fde6: f7ff fce7 bl 800f7b8 <ip_reass_dequeue_datagram>
800fdea: e006 b.n 800fdfa <ip4_reass+0x312>
goto nullreturn;
800fdec: bf00 nop
800fdee: e004 b.n 800fdfa <ip4_reass+0x312>
goto nullreturn;
800fdf0: bf00 nop
800fdf2: e002 b.n 800fdfa <ip4_reass+0x312>
goto nullreturn;
800fdf4: bf00 nop
800fdf6: e000 b.n 800fdfa <ip4_reass+0x312>
}
nullreturn:
800fdf8: bf00 nop
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: nullreturn\n"));
IPFRAG_STATS_INC(ip_frag.drop);
pbuf_free(p);
800fdfa: 6878 ldr r0, [r7, #4]
800fdfc: f7f5 fdcc bl 8005998 <pbuf_free>
return NULL;
800fe00: 2300 movs r3, #0
}
800fe02: 4618 mov r0, r3
800fe04: 3738 adds r7, #56 ; 0x38
800fe06: 46bd mov sp, r7
800fe08: bd80 pop {r7, pc}
800fe0a: bf00 nop
800fe0c: 08017a24 .word 0x08017a24
800fe10: 08017bb0 .word 0x08017bb0
800fe14: 08017a6c .word 0x08017a6c
800fe18: 20008d88 .word 0x20008d88
800fe1c: 08017bbc .word 0x08017bbc
0800fe20 <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)
{
800fe20: b580 push {r7, lr}
800fe22: af00 add r7, sp, #0
return (struct pbuf_custom_ref *)memp_malloc(MEMP_FRAG_PBUF);
800fe24: 2005 movs r0, #5
800fe26: f7f4 fec5 bl 8004bb4 <memp_malloc>
800fe2a: 4603 mov r3, r0
}
800fe2c: 4618 mov r0, r3
800fe2e: bd80 pop {r7, pc}
0800fe30 <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)
{
800fe30: b580 push {r7, lr}
800fe32: b082 sub sp, #8
800fe34: af00 add r7, sp, #0
800fe36: 6078 str r0, [r7, #4]
LWIP_ASSERT("p != NULL", p != NULL);
800fe38: 687b ldr r3, [r7, #4]
800fe3a: 2b00 cmp r3, #0
800fe3c: d106 bne.n 800fe4c <ip_frag_free_pbuf_custom_ref+0x1c>
800fe3e: 4b07 ldr r3, [pc, #28] ; (800fe5c <ip_frag_free_pbuf_custom_ref+0x2c>)
800fe40: f44f 7231 mov.w r2, #708 ; 0x2c4
800fe44: 4906 ldr r1, [pc, #24] ; (800fe60 <ip_frag_free_pbuf_custom_ref+0x30>)
800fe46: 4807 ldr r0, [pc, #28] ; (800fe64 <ip_frag_free_pbuf_custom_ref+0x34>)
800fe48: f000 fac2 bl 80103d0 <printf>
memp_free(MEMP_FRAG_PBUF, p);
800fe4c: 6879 ldr r1, [r7, #4]
800fe4e: 2005 movs r0, #5
800fe50: f7f4 ff20 bl 8004c94 <memp_free>
}
800fe54: bf00 nop
800fe56: 3708 adds r7, #8
800fe58: 46bd mov sp, r7
800fe5a: bd80 pop {r7, pc}
800fe5c: 08017a24 .word 0x08017a24
800fe60: 08017bdc .word 0x08017bdc
800fe64: 08017a6c .word 0x08017a6c
0800fe68 <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)
{
800fe68: b580 push {r7, lr}
800fe6a: b084 sub sp, #16
800fe6c: af00 add r7, sp, #0
800fe6e: 6078 str r0, [r7, #4]
struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref *)p;
800fe70: 687b ldr r3, [r7, #4]
800fe72: 60fb str r3, [r7, #12]
LWIP_ASSERT("pcr != NULL", pcr != NULL);
800fe74: 68fb ldr r3, [r7, #12]
800fe76: 2b00 cmp r3, #0
800fe78: d106 bne.n 800fe88 <ipfrag_free_pbuf_custom+0x20>
800fe7a: 4b11 ldr r3, [pc, #68] ; (800fec0 <ipfrag_free_pbuf_custom+0x58>)
800fe7c: f240 22ce movw r2, #718 ; 0x2ce
800fe80: 4910 ldr r1, [pc, #64] ; (800fec4 <ipfrag_free_pbuf_custom+0x5c>)
800fe82: 4811 ldr r0, [pc, #68] ; (800fec8 <ipfrag_free_pbuf_custom+0x60>)
800fe84: f000 faa4 bl 80103d0 <printf>
LWIP_ASSERT("pcr == p", (void *)pcr == (void *)p);
800fe88: 68fa ldr r2, [r7, #12]
800fe8a: 687b ldr r3, [r7, #4]
800fe8c: 429a cmp r2, r3
800fe8e: d006 beq.n 800fe9e <ipfrag_free_pbuf_custom+0x36>
800fe90: 4b0b ldr r3, [pc, #44] ; (800fec0 <ipfrag_free_pbuf_custom+0x58>)
800fe92: f240 22cf movw r2, #719 ; 0x2cf
800fe96: 490d ldr r1, [pc, #52] ; (800fecc <ipfrag_free_pbuf_custom+0x64>)
800fe98: 480b ldr r0, [pc, #44] ; (800fec8 <ipfrag_free_pbuf_custom+0x60>)
800fe9a: f000 fa99 bl 80103d0 <printf>
if (pcr->original != NULL) {
800fe9e: 68fb ldr r3, [r7, #12]
800fea0: 695b ldr r3, [r3, #20]
800fea2: 2b00 cmp r3, #0
800fea4: d004 beq.n 800feb0 <ipfrag_free_pbuf_custom+0x48>
pbuf_free(pcr->original);
800fea6: 68fb ldr r3, [r7, #12]
800fea8: 695b ldr r3, [r3, #20]
800feaa: 4618 mov r0, r3
800feac: f7f5 fd74 bl 8005998 <pbuf_free>
}
ip_frag_free_pbuf_custom_ref(pcr);
800feb0: 68f8 ldr r0, [r7, #12]
800feb2: f7ff ffbd bl 800fe30 <ip_frag_free_pbuf_custom_ref>
}
800feb6: bf00 nop
800feb8: 3710 adds r7, #16
800feba: 46bd mov sp, r7
800febc: bd80 pop {r7, pc}
800febe: bf00 nop
800fec0: 08017a24 .word 0x08017a24
800fec4: 08017be8 .word 0x08017be8
800fec8: 08017a6c .word 0x08017a6c
800fecc: 08017bf4 .word 0x08017bf4
0800fed0 <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)
{
800fed0: b580 push {r7, lr}
800fed2: b094 sub sp, #80 ; 0x50
800fed4: af02 add r7, sp, #8
800fed6: 60f8 str r0, [r7, #12]
800fed8: 60b9 str r1, [r7, #8]
800feda: 607a str r2, [r7, #4]
struct pbuf *rambuf;
#if !LWIP_NETIF_TX_SINGLE_PBUF
struct pbuf *newpbuf;
u16_t newpbuflen = 0;
800fedc: 2300 movs r3, #0
800fede: 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);
800fee2: 68bb ldr r3, [r7, #8]
800fee4: 8d1b ldrh r3, [r3, #40] ; 0x28
800fee6: 3b14 subs r3, #20
800fee8: 2b00 cmp r3, #0
800feea: da00 bge.n 800feee <ip4_frag+0x1e>
800feec: 3307 adds r3, #7
800feee: 10db asrs r3, r3, #3
800fef0: 877b strh r3, [r7, #58] ; 0x3a
u16_t left, fragsize;
u16_t ofo;
int last;
u16_t poff = IP_HLEN;
800fef2: 2314 movs r3, #20
800fef4: 87fb strh r3, [r7, #62] ; 0x3e
u16_t tmp;
int mf_set;
original_iphdr = (struct ip_hdr *)p->payload;
800fef6: 68fb ldr r3, [r7, #12]
800fef8: 685b ldr r3, [r3, #4]
800fefa: 637b str r3, [r7, #52] ; 0x34
iphdr = original_iphdr;
800fefc: 6b7b ldr r3, [r7, #52] ; 0x34
800fefe: 633b str r3, [r7, #48] ; 0x30
if (IPH_HL_BYTES(iphdr) != IP_HLEN) {
800ff00: 6b3b ldr r3, [r7, #48] ; 0x30
800ff02: 781b ldrb r3, [r3, #0]
800ff04: f003 030f and.w r3, r3, #15
800ff08: b2db uxtb r3, r3
800ff0a: 009b lsls r3, r3, #2
800ff0c: b2db uxtb r3, r3
800ff0e: 2b14 cmp r3, #20
800ff10: d002 beq.n 800ff18 <ip4_frag+0x48>
/* ip4_frag() does not support IP options */
return ERR_VAL;
800ff12: f06f 0305 mvn.w r3, #5
800ff16: e110 b.n 801013a <ip4_frag+0x26a>
}
LWIP_ERROR("ip4_frag(): pbuf too short", p->len >= IP_HLEN, return ERR_VAL);
800ff18: 68fb ldr r3, [r7, #12]
800ff1a: 895b ldrh r3, [r3, #10]
800ff1c: 2b13 cmp r3, #19
800ff1e: d809 bhi.n 800ff34 <ip4_frag+0x64>
800ff20: 4b88 ldr r3, [pc, #544] ; (8010144 <ip4_frag+0x274>)
800ff22: f44f 723f mov.w r2, #764 ; 0x2fc
800ff26: 4988 ldr r1, [pc, #544] ; (8010148 <ip4_frag+0x278>)
800ff28: 4888 ldr r0, [pc, #544] ; (801014c <ip4_frag+0x27c>)
800ff2a: f000 fa51 bl 80103d0 <printf>
800ff2e: f06f 0305 mvn.w r3, #5
800ff32: e102 b.n 801013a <ip4_frag+0x26a>
/* Save original offset */
tmp = lwip_ntohs(IPH_OFFSET(iphdr));
800ff34: 6b3b ldr r3, [r7, #48] ; 0x30
800ff36: 88db ldrh r3, [r3, #6]
800ff38: b29b uxth r3, r3
800ff3a: 4618 mov r0, r3
800ff3c: f7f4 f9c2 bl 80042c4 <lwip_htons>
800ff40: 4603 mov r3, r0
800ff42: 87bb strh r3, [r7, #60] ; 0x3c
ofo = tmp & IP_OFFMASK;
800ff44: 8fbb ldrh r3, [r7, #60] ; 0x3c
800ff46: f3c3 030c ubfx r3, r3, #0, #13
800ff4a: 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;
800ff4e: 8fbb ldrh r3, [r7, #60] ; 0x3c
800ff50: f403 5300 and.w r3, r3, #8192 ; 0x2000
800ff54: 62fb str r3, [r7, #44] ; 0x2c
left = (u16_t)(p->tot_len - IP_HLEN);
800ff56: 68fb ldr r3, [r7, #12]
800ff58: 891b ldrh r3, [r3, #8]
800ff5a: 3b14 subs r3, #20
800ff5c: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
while (left) {
800ff60: e0e1 b.n 8010126 <ip4_frag+0x256>
/* Fill this fragment */
fragsize = LWIP_MIN(left, (u16_t)(nfb * 8));
800ff62: 8f7b ldrh r3, [r7, #58] ; 0x3a
800ff64: 00db lsls r3, r3, #3
800ff66: b29b uxth r3, r3
800ff68: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
800ff6c: 4293 cmp r3, r2
800ff6e: bf28 it cs
800ff70: 4613 movcs r3, r2
800ff72: 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);
800ff74: f44f 7220 mov.w r2, #640 ; 0x280
800ff78: 2114 movs r1, #20
800ff7a: 200e movs r0, #14
800ff7c: f7f5 fa28 bl 80053d0 <pbuf_alloc>
800ff80: 6278 str r0, [r7, #36] ; 0x24
if (rambuf == NULL) {
800ff82: 6a7b ldr r3, [r7, #36] ; 0x24
800ff84: 2b00 cmp r3, #0
800ff86: f000 80d5 beq.w 8010134 <ip4_frag+0x264>
goto memerr;
}
LWIP_ASSERT("this needs a pbuf in one piece!",
800ff8a: 6a7b ldr r3, [r7, #36] ; 0x24
800ff8c: 895b ldrh r3, [r3, #10]
800ff8e: 2b13 cmp r3, #19
800ff90: d806 bhi.n 800ffa0 <ip4_frag+0xd0>
800ff92: 4b6c ldr r3, [pc, #432] ; (8010144 <ip4_frag+0x274>)
800ff94: f44f 7249 mov.w r2, #804 ; 0x324
800ff98: 496d ldr r1, [pc, #436] ; (8010150 <ip4_frag+0x280>)
800ff9a: 486c ldr r0, [pc, #432] ; (801014c <ip4_frag+0x27c>)
800ff9c: f000 fa18 bl 80103d0 <printf>
(rambuf->len >= (IP_HLEN)));
SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN);
800ffa0: 6a7b ldr r3, [r7, #36] ; 0x24
800ffa2: 685b ldr r3, [r3, #4]
800ffa4: 2214 movs r2, #20
800ffa6: 6b79 ldr r1, [r7, #52] ; 0x34
800ffa8: 4618 mov r0, r3
800ffaa: f000 f9e1 bl 8010370 <memcpy>
iphdr = (struct ip_hdr *)rambuf->payload;
800ffae: 6a7b ldr r3, [r7, #36] ; 0x24
800ffb0: 685b ldr r3, [r3, #4]
800ffb2: 633b str r3, [r7, #48] ; 0x30
left_to_copy = fragsize;
800ffb4: 8d7b ldrh r3, [r7, #42] ; 0x2a
800ffb6: f8a7 3044 strh.w r3, [r7, #68] ; 0x44
while (left_to_copy) {
800ffba: e064 b.n 8010086 <ip4_frag+0x1b6>
struct pbuf_custom_ref *pcr;
u16_t plen = (u16_t)(p->len - poff);
800ffbc: 68fb ldr r3, [r7, #12]
800ffbe: 895a ldrh r2, [r3, #10]
800ffc0: 8ffb ldrh r3, [r7, #62] ; 0x3e
800ffc2: 1ad3 subs r3, r2, r3
800ffc4: 83fb strh r3, [r7, #30]
LWIP_ASSERT("p->len >= poff", p->len >= poff);
800ffc6: 68fb ldr r3, [r7, #12]
800ffc8: 895b ldrh r3, [r3, #10]
800ffca: 8ffa ldrh r2, [r7, #62] ; 0x3e
800ffcc: 429a cmp r2, r3
800ffce: d906 bls.n 800ffde <ip4_frag+0x10e>
800ffd0: 4b5c ldr r3, [pc, #368] ; (8010144 <ip4_frag+0x274>)
800ffd2: f240 322d movw r2, #813 ; 0x32d
800ffd6: 495f ldr r1, [pc, #380] ; (8010154 <ip4_frag+0x284>)
800ffd8: 485c ldr r0, [pc, #368] ; (801014c <ip4_frag+0x27c>)
800ffda: f000 f9f9 bl 80103d0 <printf>
newpbuflen = LWIP_MIN(left_to_copy, plen);
800ffde: 8bfa ldrh r2, [r7, #30]
800ffe0: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
800ffe4: 4293 cmp r3, r2
800ffe6: bf28 it cs
800ffe8: 4613 movcs r3, r2
800ffea: f8a7 3046 strh.w r3, [r7, #70] ; 0x46
/* Is this pbuf already empty? */
if (!newpbuflen) {
800ffee: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46
800fff2: 2b00 cmp r3, #0
800fff4: d105 bne.n 8010002 <ip4_frag+0x132>
poff = 0;
800fff6: 2300 movs r3, #0
800fff8: 87fb strh r3, [r7, #62] ; 0x3e
p = p->next;
800fffa: 68fb ldr r3, [r7, #12]
800fffc: 681b ldr r3, [r3, #0]
800fffe: 60fb str r3, [r7, #12]
continue;
8010000: e041 b.n 8010086 <ip4_frag+0x1b6>
}
pcr = ip_frag_alloc_pbuf_custom_ref();
8010002: f7ff ff0d bl 800fe20 <ip_frag_alloc_pbuf_custom_ref>
8010006: 61b8 str r0, [r7, #24]
if (pcr == NULL) {
8010008: 69bb ldr r3, [r7, #24]
801000a: 2b00 cmp r3, #0
801000c: d103 bne.n 8010016 <ip4_frag+0x146>
pbuf_free(rambuf);
801000e: 6a78 ldr r0, [r7, #36] ; 0x24
8010010: f7f5 fcc2 bl 8005998 <pbuf_free>
goto memerr;
8010014: e08f b.n 8010136 <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,
8010016: 69b8 ldr r0, [r7, #24]
(u8_t *)p->payload + poff, newpbuflen);
8010018: 68fb ldr r3, [r7, #12]
801001a: 685a ldr r2, [r3, #4]
newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc,
801001c: 8ffb ldrh r3, [r7, #62] ; 0x3e
801001e: 4413 add r3, r2
8010020: f8b7 1046 ldrh.w r1, [r7, #70] ; 0x46
8010024: f8b7 2046 ldrh.w r2, [r7, #70] ; 0x46
8010028: 9201 str r2, [sp, #4]
801002a: 9300 str r3, [sp, #0]
801002c: 4603 mov r3, r0
801002e: 2241 movs r2, #65 ; 0x41
8010030: 2000 movs r0, #0
8010032: f7f5 faf7 bl 8005624 <pbuf_alloced_custom>
8010036: 6178 str r0, [r7, #20]
if (newpbuf == NULL) {
8010038: 697b ldr r3, [r7, #20]
801003a: 2b00 cmp r3, #0
801003c: d106 bne.n 801004c <ip4_frag+0x17c>
ip_frag_free_pbuf_custom_ref(pcr);
801003e: 69b8 ldr r0, [r7, #24]
8010040: f7ff fef6 bl 800fe30 <ip_frag_free_pbuf_custom_ref>
pbuf_free(rambuf);
8010044: 6a78 ldr r0, [r7, #36] ; 0x24
8010046: f7f5 fca7 bl 8005998 <pbuf_free>
goto memerr;
801004a: e074 b.n 8010136 <ip4_frag+0x266>
}
pbuf_ref(p);
801004c: 68f8 ldr r0, [r7, #12]
801004e: f7f5 fd43 bl 8005ad8 <pbuf_ref>
pcr->original = p;
8010052: 69bb ldr r3, [r7, #24]
8010054: 68fa ldr r2, [r7, #12]
8010056: 615a str r2, [r3, #20]
pcr->pc.custom_free_function = ipfrag_free_pbuf_custom;
8010058: 69bb ldr r3, [r7, #24]
801005a: 4a3f ldr r2, [pc, #252] ; (8010158 <ip4_frag+0x288>)
801005c: 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);
801005e: 6979 ldr r1, [r7, #20]
8010060: 6a78 ldr r0, [r7, #36] ; 0x24
8010062: f7f5 fd5b bl 8005b1c <pbuf_cat>
left_to_copy = (u16_t)(left_to_copy - newpbuflen);
8010066: f8b7 2044 ldrh.w r2, [r7, #68] ; 0x44
801006a: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46
801006e: 1ad3 subs r3, r2, r3
8010070: f8a7 3044 strh.w r3, [r7, #68] ; 0x44
if (left_to_copy) {
8010074: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
8010078: 2b00 cmp r3, #0
801007a: d004 beq.n 8010086 <ip4_frag+0x1b6>
poff = 0;
801007c: 2300 movs r3, #0
801007e: 87fb strh r3, [r7, #62] ; 0x3e
p = p->next;
8010080: 68fb ldr r3, [r7, #12]
8010082: 681b ldr r3, [r3, #0]
8010084: 60fb str r3, [r7, #12]
while (left_to_copy) {
8010086: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
801008a: 2b00 cmp r3, #0
801008c: d196 bne.n 800ffbc <ip4_frag+0xec>
}
}
poff = (u16_t)(poff + newpbuflen);
801008e: 8ffa ldrh r2, [r7, #62] ; 0x3e
8010090: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46
8010094: 4413 add r3, r2
8010096: 87fb strh r3, [r7, #62] ; 0x3e
#endif /* LWIP_NETIF_TX_SINGLE_PBUF */
/* Correct header */
last = (left <= netif->mtu - IP_HLEN);
8010098: 68bb ldr r3, [r7, #8]
801009a: 8d1b ldrh r3, [r3, #40] ; 0x28
801009c: f1a3 0213 sub.w r2, r3, #19
80100a0: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
80100a4: 429a cmp r2, r3
80100a6: bfcc ite gt
80100a8: 2301 movgt r3, #1
80100aa: 2300 movle r3, #0
80100ac: b2db uxtb r3, r3
80100ae: 623b str r3, [r7, #32]
/* Set new offset and MF flag */
tmp = (IP_OFFMASK & (ofo));
80100b0: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40
80100b4: f3c3 030c ubfx r3, r3, #0, #13
80100b8: 87bb strh r3, [r7, #60] ; 0x3c
if (!last || mf_set) {
80100ba: 6a3b ldr r3, [r7, #32]
80100bc: 2b00 cmp r3, #0
80100be: d002 beq.n 80100c6 <ip4_frag+0x1f6>
80100c0: 6afb ldr r3, [r7, #44] ; 0x2c
80100c2: 2b00 cmp r3, #0
80100c4: d003 beq.n 80100ce <ip4_frag+0x1fe>
/* the last fragment has MF set if the input frame had it */
tmp = tmp | IP_MF;
80100c6: 8fbb ldrh r3, [r7, #60] ; 0x3c
80100c8: f443 5300 orr.w r3, r3, #8192 ; 0x2000
80100cc: 87bb strh r3, [r7, #60] ; 0x3c
}
IPH_OFFSET_SET(iphdr, lwip_htons(tmp));
80100ce: 8fbb ldrh r3, [r7, #60] ; 0x3c
80100d0: 4618 mov r0, r3
80100d2: f7f4 f8f7 bl 80042c4 <lwip_htons>
80100d6: 4603 mov r3, r0
80100d8: 461a mov r2, r3
80100da: 6b3b ldr r3, [r7, #48] ; 0x30
80100dc: 80da strh r2, [r3, #6]
IPH_LEN_SET(iphdr, lwip_htons((u16_t)(fragsize + IP_HLEN)));
80100de: 8d7b ldrh r3, [r7, #42] ; 0x2a
80100e0: 3314 adds r3, #20
80100e2: b29b uxth r3, r3
80100e4: 4618 mov r0, r3
80100e6: f7f4 f8ed bl 80042c4 <lwip_htons>
80100ea: 4603 mov r3, r0
80100ec: 461a mov r2, r3
80100ee: 6b3b ldr r3, [r7, #48] ; 0x30
80100f0: 805a strh r2, [r3, #2]
IPH_CHKSUM_SET(iphdr, 0);
80100f2: 6b3b ldr r3, [r7, #48] ; 0x30
80100f4: 2200 movs r2, #0
80100f6: 729a strb r2, [r3, #10]
80100f8: 2200 movs r2, #0
80100fa: 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);
80100fc: 68bb ldr r3, [r7, #8]
80100fe: 695b ldr r3, [r3, #20]
8010100: 687a ldr r2, [r7, #4]
8010102: 6a79 ldr r1, [r7, #36] ; 0x24
8010104: 68b8 ldr r0, [r7, #8]
8010106: 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);
8010108: 6a78 ldr r0, [r7, #36] ; 0x24
801010a: f7f5 fc45 bl 8005998 <pbuf_free>
left = (u16_t)(left - fragsize);
801010e: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
8010112: 8d7b ldrh r3, [r7, #42] ; 0x2a
8010114: 1ad3 subs r3, r2, r3
8010116: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
ofo = (u16_t)(ofo + nfb);
801011a: f8b7 2040 ldrh.w r2, [r7, #64] ; 0x40
801011e: 8f7b ldrh r3, [r7, #58] ; 0x3a
8010120: 4413 add r3, r2
8010122: f8a7 3040 strh.w r3, [r7, #64] ; 0x40
while (left) {
8010126: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
801012a: 2b00 cmp r3, #0
801012c: f47f af19 bne.w 800ff62 <ip4_frag+0x92>
}
MIB2_STATS_INC(mib2.ipfragoks);
return ERR_OK;
8010130: 2300 movs r3, #0
8010132: e002 b.n 801013a <ip4_frag+0x26a>
goto memerr;
8010134: bf00 nop
memerr:
MIB2_STATS_INC(mib2.ipfragfails);
return ERR_MEM;
8010136: f04f 33ff mov.w r3, #4294967295
}
801013a: 4618 mov r0, r3
801013c: 3748 adds r7, #72 ; 0x48
801013e: 46bd mov sp, r7
8010140: bd80 pop {r7, pc}
8010142: bf00 nop
8010144: 08017a24 .word 0x08017a24
8010148: 08017c00 .word 0x08017c00
801014c: 08017a6c .word 0x08017a6c
8010150: 08017c1c .word 0x08017c1c
8010154: 08017c3c .word 0x08017c3c
8010158: 0800fe69 .word 0x0800fe69
0801015c <ethernet_input>:
* @see ETHARP_SUPPORT_VLAN
* @see LWIP_HOOK_VLAN_CHECK
*/
err_t
ethernet_input(struct pbuf *p, struct netif *netif)
{
801015c: b580 push {r7, lr}
801015e: b086 sub sp, #24
8010160: af00 add r7, sp, #0
8010162: 6078 str r0, [r7, #4]
8010164: 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;
8010166: 230e movs r3, #14
8010168: 82fb strh r3, [r7, #22]
#endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */
LWIP_ASSERT_CORE_LOCKED();
if (p->len <= SIZEOF_ETH_HDR) {
801016a: 687b ldr r3, [r7, #4]
801016c: 895b ldrh r3, [r3, #10]
801016e: 2b0e cmp r3, #14
8010170: d96e bls.n 8010250 <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) {
8010172: 687b ldr r3, [r7, #4]
8010174: 7bdb ldrb r3, [r3, #15]
8010176: 2b00 cmp r3, #0
8010178: d106 bne.n 8010188 <ethernet_input+0x2c>
p->if_idx = netif_get_index(netif);
801017a: 683b ldr r3, [r7, #0]
801017c: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8010180: 3301 adds r3, #1
8010182: b2da uxtb r2, r3
8010184: 687b ldr r3, [r7, #4]
8010186: 73da strb r2, [r3, #15]
}
/* points to packet payload, which starts with an Ethernet header */
ethhdr = (struct eth_hdr *)p->payload;
8010188: 687b ldr r3, [r7, #4]
801018a: 685b ldr r3, [r3, #4]
801018c: 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;
801018e: 693b ldr r3, [r7, #16]
8010190: 7b1a ldrb r2, [r3, #12]
8010192: 7b5b ldrb r3, [r3, #13]
8010194: 021b lsls r3, r3, #8
8010196: 4313 orrs r3, r2
8010198: 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) {
801019a: 693b ldr r3, [r7, #16]
801019c: 781b ldrb r3, [r3, #0]
801019e: f003 0301 and.w r3, r3, #1
80101a2: 2b00 cmp r3, #0
80101a4: d023 beq.n 80101ee <ethernet_input+0x92>
/* this might be a multicast or broadcast packet */
if (ethhdr->dest.addr[0] == LL_IP4_MULTICAST_ADDR_0) {
80101a6: 693b ldr r3, [r7, #16]
80101a8: 781b ldrb r3, [r3, #0]
80101aa: 2b01 cmp r3, #1
80101ac: d10f bne.n 80101ce <ethernet_input+0x72>
#if LWIP_IPV4
if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) &&
80101ae: 693b ldr r3, [r7, #16]
80101b0: 785b ldrb r3, [r3, #1]
80101b2: 2b00 cmp r3, #0
80101b4: d11b bne.n 80101ee <ethernet_input+0x92>
(ethhdr->dest.addr[2] == LL_IP4_MULTICAST_ADDR_2)) {
80101b6: 693b ldr r3, [r7, #16]
80101b8: 789b ldrb r3, [r3, #2]
if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) &&
80101ba: 2b5e cmp r3, #94 ; 0x5e
80101bc: d117 bne.n 80101ee <ethernet_input+0x92>
/* mark the pbuf as link-layer multicast */
p->flags |= PBUF_FLAG_LLMCAST;
80101be: 687b ldr r3, [r7, #4]
80101c0: 7b5b ldrb r3, [r3, #13]
80101c2: f043 0310 orr.w r3, r3, #16
80101c6: b2da uxtb r2, r3
80101c8: 687b ldr r3, [r7, #4]
80101ca: 735a strb r2, [r3, #13]
80101cc: e00f b.n 80101ee <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)) {
80101ce: 693b ldr r3, [r7, #16]
80101d0: 2206 movs r2, #6
80101d2: 4928 ldr r1, [pc, #160] ; (8010274 <ethernet_input+0x118>)
80101d4: 4618 mov r0, r3
80101d6: f000 f8bb bl 8010350 <memcmp>
80101da: 4603 mov r3, r0
80101dc: 2b00 cmp r3, #0
80101de: d106 bne.n 80101ee <ethernet_input+0x92>
/* mark the pbuf as link-layer broadcast */
p->flags |= PBUF_FLAG_LLBCAST;
80101e0: 687b ldr r3, [r7, #4]
80101e2: 7b5b ldrb r3, [r3, #13]
80101e4: f043 0308 orr.w r3, r3, #8
80101e8: b2da uxtb r2, r3
80101ea: 687b ldr r3, [r7, #4]
80101ec: 735a strb r2, [r3, #13]
}
}
switch (type) {
80101ee: 89fb ldrh r3, [r7, #14]
80101f0: 2b08 cmp r3, #8
80101f2: d003 beq.n 80101fc <ethernet_input+0xa0>
80101f4: f5b3 6fc1 cmp.w r3, #1544 ; 0x608
80101f8: d014 beq.n 8010224 <ethernet_input+0xc8>
}
#endif
ETHARP_STATS_INC(etharp.proterr);
ETHARP_STATS_INC(etharp.drop);
MIB2_STATS_NETIF_INC(netif, ifinunknownprotos);
goto free_and_return;
80101fa: e032 b.n 8010262 <ethernet_input+0x106>
if (!(netif->flags & NETIF_FLAG_ETHARP)) {
80101fc: 683b ldr r3, [r7, #0]
80101fe: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8010202: f003 0308 and.w r3, r3, #8
8010206: 2b00 cmp r3, #0
8010208: d024 beq.n 8010254 <ethernet_input+0xf8>
if (pbuf_remove_header(p, next_hdr_offset)) {
801020a: 8afb ldrh r3, [r7, #22]
801020c: 4619 mov r1, r3
801020e: 6878 ldr r0, [r7, #4]
8010210: f7f5 fb3c bl 800588c <pbuf_remove_header>
8010214: 4603 mov r3, r0
8010216: 2b00 cmp r3, #0
8010218: d11e bne.n 8010258 <ethernet_input+0xfc>
ip4_input(p, netif);
801021a: 6839 ldr r1, [r7, #0]
801021c: 6878 ldr r0, [r7, #4]
801021e: f7fe fdc5 bl 800edac <ip4_input>
break;
8010222: e013 b.n 801024c <ethernet_input+0xf0>
if (!(netif->flags & NETIF_FLAG_ETHARP)) {
8010224: 683b ldr r3, [r7, #0]
8010226: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801022a: f003 0308 and.w r3, r3, #8
801022e: 2b00 cmp r3, #0
8010230: d014 beq.n 801025c <ethernet_input+0x100>
if (pbuf_remove_header(p, next_hdr_offset)) {
8010232: 8afb ldrh r3, [r7, #22]
8010234: 4619 mov r1, r3
8010236: 6878 ldr r0, [r7, #4]
8010238: f7f5 fb28 bl 800588c <pbuf_remove_header>
801023c: 4603 mov r3, r0
801023e: 2b00 cmp r3, #0
8010240: d10e bne.n 8010260 <ethernet_input+0x104>
etharp_input(p, netif);
8010242: 6839 ldr r1, [r7, #0]
8010244: 6878 ldr r0, [r7, #4]
8010246: f7fd ff61 bl 800e10c <etharp_input>
break;
801024a: bf00 nop
}
/* This means the pbuf is freed or consumed,
so the caller doesn't have to free it again */
return ERR_OK;
801024c: 2300 movs r3, #0
801024e: e00c b.n 801026a <ethernet_input+0x10e>
goto free_and_return;
8010250: bf00 nop
8010252: e006 b.n 8010262 <ethernet_input+0x106>
goto free_and_return;
8010254: bf00 nop
8010256: e004 b.n 8010262 <ethernet_input+0x106>
goto free_and_return;
8010258: bf00 nop
801025a: e002 b.n 8010262 <ethernet_input+0x106>
goto free_and_return;
801025c: bf00 nop
801025e: e000 b.n 8010262 <ethernet_input+0x106>
goto free_and_return;
8010260: bf00 nop
free_and_return:
pbuf_free(p);
8010262: 6878 ldr r0, [r7, #4]
8010264: f7f5 fb98 bl 8005998 <pbuf_free>
return ERR_OK;
8010268: 2300 movs r3, #0
}
801026a: 4618 mov r0, r3
801026c: 3718 adds r7, #24
801026e: 46bd mov sp, r7
8010270: bd80 pop {r7, pc}
8010272: bf00 nop
8010274: 08017de4 .word 0x08017de4
08010278 <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) {
8010278: b580 push {r7, lr}
801027a: b086 sub sp, #24
801027c: af00 add r7, sp, #0
801027e: 60f8 str r0, [r7, #12]
8010280: 60b9 str r1, [r7, #8]
8010282: 607a str r2, [r7, #4]
8010284: 603b str r3, [r7, #0]
struct eth_hdr *ethhdr;
u16_t eth_type_be = lwip_htons(eth_type);
8010286: 8c3b ldrh r3, [r7, #32]
8010288: 4618 mov r0, r3
801028a: f7f4 f81b bl 80042c4 <lwip_htons>
801028e: 4603 mov r3, r0
8010290: 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) {
8010292: 210e movs r1, #14
8010294: 68b8 ldr r0, [r7, #8]
8010296: f7f5 fae9 bl 800586c <pbuf_add_header>
801029a: 4603 mov r3, r0
801029c: 2b00 cmp r3, #0
801029e: d125 bne.n 80102ec <ethernet_output+0x74>
}
}
LWIP_ASSERT_CORE_LOCKED();
ethhdr = (struct eth_hdr *)p->payload;
80102a0: 68bb ldr r3, [r7, #8]
80102a2: 685b ldr r3, [r3, #4]
80102a4: 613b str r3, [r7, #16]
ethhdr->type = eth_type_be;
80102a6: 693b ldr r3, [r7, #16]
80102a8: 8afa ldrh r2, [r7, #22]
80102aa: 819a strh r2, [r3, #12]
SMEMCPY(&ethhdr->dest, dst, ETH_HWADDR_LEN);
80102ac: 693b ldr r3, [r7, #16]
80102ae: 2206 movs r2, #6
80102b0: 6839 ldr r1, [r7, #0]
80102b2: 4618 mov r0, r3
80102b4: f000 f85c bl 8010370 <memcpy>
SMEMCPY(&ethhdr->src, src, ETH_HWADDR_LEN);
80102b8: 693b ldr r3, [r7, #16]
80102ba: 3306 adds r3, #6
80102bc: 2206 movs r2, #6
80102be: 6879 ldr r1, [r7, #4]
80102c0: 4618 mov r0, r3
80102c2: f000 f855 bl 8010370 <memcpy>
LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!",
80102c6: 68fb ldr r3, [r7, #12]
80102c8: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
80102cc: 2b06 cmp r3, #6
80102ce: d006 beq.n 80102de <ethernet_output+0x66>
80102d0: 4b0a ldr r3, [pc, #40] ; (80102fc <ethernet_output+0x84>)
80102d2: f44f 7299 mov.w r2, #306 ; 0x132
80102d6: 490a ldr r1, [pc, #40] ; (8010300 <ethernet_output+0x88>)
80102d8: 480a ldr r0, [pc, #40] ; (8010304 <ethernet_output+0x8c>)
80102da: f000 f879 bl 80103d0 <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);
80102de: 68fb ldr r3, [r7, #12]
80102e0: 699b ldr r3, [r3, #24]
80102e2: 68b9 ldr r1, [r7, #8]
80102e4: 68f8 ldr r0, [r7, #12]
80102e6: 4798 blx r3
80102e8: 4603 mov r3, r0
80102ea: e002 b.n 80102f2 <ethernet_output+0x7a>
goto pbuf_header_failed;
80102ec: 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;
80102ee: f06f 0301 mvn.w r3, #1
}
80102f2: 4618 mov r0, r3
80102f4: 3718 adds r7, #24
80102f6: 46bd mov sp, r7
80102f8: bd80 pop {r7, pc}
80102fa: bf00 nop
80102fc: 08017c4c .word 0x08017c4c
8010300: 08017c84 .word 0x08017c84
8010304: 08017cb8 .word 0x08017cb8
08010308 <__libc_init_array>:
8010308: b570 push {r4, r5, r6, lr}
801030a: 4d0d ldr r5, [pc, #52] ; (8010340 <__libc_init_array+0x38>)
801030c: 4c0d ldr r4, [pc, #52] ; (8010344 <__libc_init_array+0x3c>)
801030e: 1b64 subs r4, r4, r5
8010310: 10a4 asrs r4, r4, #2
8010312: 2600 movs r6, #0
8010314: 42a6 cmp r6, r4
8010316: d109 bne.n 801032c <__libc_init_array+0x24>
8010318: 4d0b ldr r5, [pc, #44] ; (8010348 <__libc_init_array+0x40>)
801031a: 4c0c ldr r4, [pc, #48] ; (801034c <__libc_init_array+0x44>)
801031c: f004 fdc8 bl 8014eb0 <_init>
8010320: 1b64 subs r4, r4, r5
8010322: 10a4 asrs r4, r4, #2
8010324: 2600 movs r6, #0
8010326: 42a6 cmp r6, r4
8010328: d105 bne.n 8010336 <__libc_init_array+0x2e>
801032a: bd70 pop {r4, r5, r6, pc}
801032c: f855 3b04 ldr.w r3, [r5], #4
8010330: 4798 blx r3
8010332: 3601 adds r6, #1
8010334: e7ee b.n 8010314 <__libc_init_array+0xc>
8010336: f855 3b04 ldr.w r3, [r5], #4
801033a: 4798 blx r3
801033c: 3601 adds r6, #1
801033e: e7f2 b.n 8010326 <__libc_init_array+0x1e>
8010340: 08018194 .word 0x08018194
8010344: 08018194 .word 0x08018194
8010348: 08018194 .word 0x08018194
801034c: 0801819c .word 0x0801819c
08010350 <memcmp>:
8010350: b510 push {r4, lr}
8010352: 3901 subs r1, #1
8010354: 4402 add r2, r0
8010356: 4290 cmp r0, r2
8010358: d101 bne.n 801035e <memcmp+0xe>
801035a: 2000 movs r0, #0
801035c: e005 b.n 801036a <memcmp+0x1a>
801035e: 7803 ldrb r3, [r0, #0]
8010360: f811 4f01 ldrb.w r4, [r1, #1]!
8010364: 42a3 cmp r3, r4
8010366: d001 beq.n 801036c <memcmp+0x1c>
8010368: 1b18 subs r0, r3, r4
801036a: bd10 pop {r4, pc}
801036c: 3001 adds r0, #1
801036e: e7f2 b.n 8010356 <memcmp+0x6>
08010370 <memcpy>:
8010370: 440a add r2, r1
8010372: 4291 cmp r1, r2
8010374: f100 33ff add.w r3, r0, #4294967295
8010378: d100 bne.n 801037c <memcpy+0xc>
801037a: 4770 bx lr
801037c: b510 push {r4, lr}
801037e: f811 4b01 ldrb.w r4, [r1], #1
8010382: f803 4f01 strb.w r4, [r3, #1]!
8010386: 4291 cmp r1, r2
8010388: d1f9 bne.n 801037e <memcpy+0xe>
801038a: bd10 pop {r4, pc}
0801038c <memmove>:
801038c: 4288 cmp r0, r1
801038e: b510 push {r4, lr}
8010390: eb01 0402 add.w r4, r1, r2
8010394: d902 bls.n 801039c <memmove+0x10>
8010396: 4284 cmp r4, r0
8010398: 4623 mov r3, r4
801039a: d807 bhi.n 80103ac <memmove+0x20>
801039c: 1e43 subs r3, r0, #1
801039e: 42a1 cmp r1, r4
80103a0: d008 beq.n 80103b4 <memmove+0x28>
80103a2: f811 2b01 ldrb.w r2, [r1], #1
80103a6: f803 2f01 strb.w r2, [r3, #1]!
80103aa: e7f8 b.n 801039e <memmove+0x12>
80103ac: 4402 add r2, r0
80103ae: 4601 mov r1, r0
80103b0: 428a cmp r2, r1
80103b2: d100 bne.n 80103b6 <memmove+0x2a>
80103b4: bd10 pop {r4, pc}
80103b6: f813 4d01 ldrb.w r4, [r3, #-1]!
80103ba: f802 4d01 strb.w r4, [r2, #-1]!
80103be: e7f7 b.n 80103b0 <memmove+0x24>
080103c0 <memset>:
80103c0: 4402 add r2, r0
80103c2: 4603 mov r3, r0
80103c4: 4293 cmp r3, r2
80103c6: d100 bne.n 80103ca <memset+0xa>
80103c8: 4770 bx lr
80103ca: f803 1b01 strb.w r1, [r3], #1
80103ce: e7f9 b.n 80103c4 <memset+0x4>
080103d0 <printf>:
80103d0: b40f push {r0, r1, r2, r3}
80103d2: b507 push {r0, r1, r2, lr}
80103d4: 4906 ldr r1, [pc, #24] ; (80103f0 <printf+0x20>)
80103d6: ab04 add r3, sp, #16
80103d8: 6808 ldr r0, [r1, #0]
80103da: f853 2b04 ldr.w r2, [r3], #4
80103de: 6881 ldr r1, [r0, #8]
80103e0: 9301 str r3, [sp, #4]
80103e2: f000 f825 bl 8010430 <_vfprintf_r>
80103e6: b003 add sp, #12
80103e8: f85d eb04 ldr.w lr, [sp], #4
80103ec: b004 add sp, #16
80103ee: 4770 bx lr
80103f0: 20000030 .word 0x20000030
080103f4 <rand>:
80103f4: 4b0a ldr r3, [pc, #40] ; (8010420 <rand+0x2c>)
80103f6: 4a0b ldr r2, [pc, #44] ; (8010424 <rand+0x30>)
80103f8: 490b ldr r1, [pc, #44] ; (8010428 <rand+0x34>)
80103fa: b510 push {r4, lr}
80103fc: 681c ldr r4, [r3, #0]
80103fe: f8d4 00a8 ldr.w r0, [r4, #168] ; 0xa8
8010402: f8d4 30ac ldr.w r3, [r4, #172] ; 0xac
8010406: 4342 muls r2, r0
8010408: fb01 2203 mla r2, r1, r3, r2
801040c: fba0 0101 umull r0, r1, r0, r1
8010410: 1c43 adds r3, r0, #1
8010412: eb42 0001 adc.w r0, r2, r1
8010416: e9c4 302a strd r3, r0, [r4, #168] ; 0xa8
801041a: f020 4000 bic.w r0, r0, #2147483648 ; 0x80000000
801041e: bd10 pop {r4, pc}
8010420: 20000030 .word 0x20000030
8010424: 5851f42d .word 0x5851f42d
8010428: 4c957f2d .word 0x4c957f2d
801042c: 00000000 .word 0x00000000
08010430 <_vfprintf_r>:
8010430: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
8010434: ed2d 8b04 vpush {d8-d9}
8010438: b0cf sub sp, #316 ; 0x13c
801043a: 4689 mov r9, r1
801043c: 4690 mov r8, r2
801043e: 461c mov r4, r3
8010440: 461e mov r6, r3
8010442: 4682 mov sl, r0
8010444: f002 fbaa bl 8012b9c <_localeconv_r>
8010448: 6803 ldr r3, [r0, #0]
801044a: 9313 str r3, [sp, #76] ; 0x4c
801044c: 4618 mov r0, r3
801044e: f7ef fecf bl 80001f0 <strlen>
8010452: 900e str r0, [sp, #56] ; 0x38
8010454: f1ba 0f00 cmp.w sl, #0
8010458: d005 beq.n 8010466 <_vfprintf_r+0x36>
801045a: f8da 3038 ldr.w r3, [sl, #56] ; 0x38
801045e: b913 cbnz r3, 8010466 <_vfprintf_r+0x36>
8010460: 4650 mov r0, sl
8010462: f002 fa2b bl 80128bc <__sinit>
8010466: f8d9 3064 ldr.w r3, [r9, #100] ; 0x64
801046a: 07d8 lsls r0, r3, #31
801046c: d407 bmi.n 801047e <_vfprintf_r+0x4e>
801046e: f8b9 300c ldrh.w r3, [r9, #12]
8010472: 0599 lsls r1, r3, #22
8010474: d403 bmi.n 801047e <_vfprintf_r+0x4e>
8010476: f8d9 0058 ldr.w r0, [r9, #88] ; 0x58
801047a: f002 fb95 bl 8012ba8 <__retarget_lock_acquire_recursive>
801047e: f9b9 300c ldrsh.w r3, [r9, #12]
8010482: 049a lsls r2, r3, #18
8010484: d409 bmi.n 801049a <_vfprintf_r+0x6a>
8010486: f443 5300 orr.w r3, r3, #8192 ; 0x2000
801048a: f8a9 300c strh.w r3, [r9, #12]
801048e: f8d9 3064 ldr.w r3, [r9, #100] ; 0x64
8010492: f423 5300 bic.w r3, r3, #8192 ; 0x2000
8010496: f8c9 3064 str.w r3, [r9, #100] ; 0x64
801049a: f8b9 300c ldrh.w r3, [r9, #12]
801049e: 071b lsls r3, r3, #28
80104a0: d502 bpl.n 80104a8 <_vfprintf_r+0x78>
80104a2: f8d9 3010 ldr.w r3, [r9, #16]
80104a6: b9d3 cbnz r3, 80104de <_vfprintf_r+0xae>
80104a8: 4649 mov r1, r9
80104aa: 4650 mov r0, sl
80104ac: f001 fa3a bl 8011924 <__swsetup_r>
80104b0: b1a8 cbz r0, 80104de <_vfprintf_r+0xae>
80104b2: f8d9 3064 ldr.w r3, [r9, #100] ; 0x64
80104b6: 07df lsls r7, r3, #31
80104b8: d508 bpl.n 80104cc <_vfprintf_r+0x9c>
80104ba: f04f 33ff mov.w r3, #4294967295
80104be: 930f str r3, [sp, #60] ; 0x3c
80104c0: 980f ldr r0, [sp, #60] ; 0x3c
80104c2: b04f add sp, #316 ; 0x13c
80104c4: ecbd 8b04 vpop {d8-d9}
80104c8: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
80104cc: f8b9 300c ldrh.w r3, [r9, #12]
80104d0: 059e lsls r6, r3, #22
80104d2: d4f2 bmi.n 80104ba <_vfprintf_r+0x8a>
80104d4: f8d9 0058 ldr.w r0, [r9, #88] ; 0x58
80104d8: f002 fb67 bl 8012baa <__retarget_lock_release_recursive>
80104dc: e7ed b.n 80104ba <_vfprintf_r+0x8a>
80104de: f8b9 300c ldrh.w r3, [r9, #12]
80104e2: f003 021a and.w r2, r3, #26
80104e6: 2a0a cmp r2, #10
80104e8: d118 bne.n 801051c <_vfprintf_r+0xec>
80104ea: f9b9 200e ldrsh.w r2, [r9, #14]
80104ee: 2a00 cmp r2, #0
80104f0: db14 blt.n 801051c <_vfprintf_r+0xec>
80104f2: f8d9 2064 ldr.w r2, [r9, #100] ; 0x64
80104f6: 07d5 lsls r5, r2, #31
80104f8: d405 bmi.n 8010506 <_vfprintf_r+0xd6>
80104fa: 0598 lsls r0, r3, #22
80104fc: d403 bmi.n 8010506 <_vfprintf_r+0xd6>
80104fe: f8d9 0058 ldr.w r0, [r9, #88] ; 0x58
8010502: f002 fb52 bl 8012baa <__retarget_lock_release_recursive>
8010506: 4623 mov r3, r4
8010508: 4642 mov r2, r8
801050a: 4649 mov r1, r9
801050c: 4650 mov r0, sl
801050e: b04f add sp, #316 ; 0x13c
8010510: ecbd 8b04 vpop {d8-d9}
8010514: e8bd 4ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
8010518: f001 b9c4 b.w 80118a4 <__sbprintf>
801051c: ed9f 7b92 vldr d7, [pc, #584] ; 8010768 <_vfprintf_r+0x338>
8010520: 2500 movs r5, #0
8010522: e9cd 5523 strd r5, r5, [sp, #140] ; 0x8c
8010526: ed8d 7b0c vstr d7, [sp, #48] ; 0x30
801052a: e9cd 5515 strd r5, r5, [sp, #84] ; 0x54
801052e: ac25 add r4, sp, #148 ; 0x94
8010530: 9422 str r4, [sp, #136] ; 0x88
8010532: 9505 str r5, [sp, #20]
8010534: 950a str r5, [sp, #40] ; 0x28
8010536: 9512 str r5, [sp, #72] ; 0x48
8010538: 9514 str r5, [sp, #80] ; 0x50
801053a: 950f str r5, [sp, #60] ; 0x3c
801053c: 4643 mov r3, r8
801053e: 461d mov r5, r3
8010540: f813 2b01 ldrb.w r2, [r3], #1
8010544: b10a cbz r2, 801054a <_vfprintf_r+0x11a>
8010546: 2a25 cmp r2, #37 ; 0x25
8010548: d1f9 bne.n 801053e <_vfprintf_r+0x10e>
801054a: ebb5 0708 subs.w r7, r5, r8
801054e: d00d beq.n 801056c <_vfprintf_r+0x13c>
8010550: 9b24 ldr r3, [sp, #144] ; 0x90
8010552: 443b add r3, r7
8010554: 9324 str r3, [sp, #144] ; 0x90
8010556: 9b23 ldr r3, [sp, #140] ; 0x8c
8010558: 3301 adds r3, #1
801055a: 2b07 cmp r3, #7
801055c: e9c4 8700 strd r8, r7, [r4]
8010560: 9323 str r3, [sp, #140] ; 0x8c
8010562: dc79 bgt.n 8010658 <_vfprintf_r+0x228>
8010564: 3408 adds r4, #8
8010566: 9b0f ldr r3, [sp, #60] ; 0x3c
8010568: 443b add r3, r7
801056a: 930f str r3, [sp, #60] ; 0x3c
801056c: 782b ldrb r3, [r5, #0]
801056e: 2b00 cmp r3, #0
8010570: f001 8154 beq.w 801181c <_vfprintf_r+0x13ec>
8010574: 2300 movs r3, #0
8010576: f04f 32ff mov.w r2, #4294967295
801057a: 3501 adds r5, #1
801057c: f88d 306b strb.w r3, [sp, #107] ; 0x6b
8010580: 9204 str r2, [sp, #16]
8010582: 9310 str r3, [sp, #64] ; 0x40
8010584: 469b mov fp, r3
8010586: 270a movs r7, #10
8010588: 212b movs r1, #43 ; 0x2b
801058a: 462b mov r3, r5
801058c: f813 2b01 ldrb.w r2, [r3], #1
8010590: 9206 str r2, [sp, #24]
8010592: 930b str r3, [sp, #44] ; 0x2c
8010594: 9b06 ldr r3, [sp, #24]
8010596: 3b20 subs r3, #32
8010598: 2b5a cmp r3, #90 ; 0x5a
801059a: f200 85c8 bhi.w 801112e <_vfprintf_r+0xcfe>
801059e: e8df f013 tbh [pc, r3, lsl #1]
80105a2: 007e .short 0x007e
80105a4: 05c605c6 .word 0x05c605c6
80105a8: 05c60086 .word 0x05c60086
80105ac: 05c605c6 .word 0x05c605c6
80105b0: 05c60065 .word 0x05c60065
80105b4: 008905c6 .word 0x008905c6
80105b8: 05c60093 .word 0x05c60093
80105bc: 00960090 .word 0x00960090
80105c0: 00b205c6 .word 0x00b205c6
80105c4: 00b500b5 .word 0x00b500b5
80105c8: 00b500b5 .word 0x00b500b5
80105cc: 00b500b5 .word 0x00b500b5
80105d0: 00b500b5 .word 0x00b500b5
80105d4: 05c600b5 .word 0x05c600b5
80105d8: 05c605c6 .word 0x05c605c6
80105dc: 05c605c6 .word 0x05c605c6
80105e0: 05c605c6 .word 0x05c605c6
80105e4: 05c6012a .word 0x05c6012a
80105e8: 00fa00e7 .word 0x00fa00e7
80105ec: 012a012a .word 0x012a012a
80105f0: 05c6012a .word 0x05c6012a
80105f4: 05c605c6 .word 0x05c605c6
80105f8: 00c505c6 .word 0x00c505c6
80105fc: 05c605c6 .word 0x05c605c6
8010600: 05c604a0 .word 0x05c604a0
8010604: 05c605c6 .word 0x05c605c6
8010608: 05c604ea .word 0x05c604ea
801060c: 05c6050b .word 0x05c6050b
8010610: 052d05c6 .word 0x052d05c6
8010614: 05c605c6 .word 0x05c605c6
8010618: 05c605c6 .word 0x05c605c6
801061c: 05c605c6 .word 0x05c605c6
8010620: 05c605c6 .word 0x05c605c6
8010624: 05c6012a .word 0x05c6012a
8010628: 00fc00e7 .word 0x00fc00e7
801062c: 012a012a .word 0x012a012a
8010630: 00c8012a .word 0x00c8012a
8010634: 00dc00fc .word 0x00dc00fc
8010638: 00d505c6 .word 0x00d505c6
801063c: 047b05c6 .word 0x047b05c6
8010640: 04d804a2 .word 0x04d804a2
8010644: 05c600dc .word 0x05c600dc
8010648: 007c04ea .word 0x007c04ea
801064c: 05c6050d .word 0x05c6050d
8010650: 054c05c6 .word 0x054c05c6
8010654: 007c05c6 .word 0x007c05c6
8010658: aa22 add r2, sp, #136 ; 0x88
801065a: 4649 mov r1, r9
801065c: 4650 mov r0, sl
801065e: f003 f93a bl 80138d6 <__sprint_r>
8010662: 2800 cmp r0, #0
8010664: f040 8135 bne.w 80108d2 <_vfprintf_r+0x4a2>
8010668: ac25 add r4, sp, #148 ; 0x94
801066a: e77c b.n 8010566 <_vfprintf_r+0x136>
801066c: 4650 mov r0, sl
801066e: f002 fa95 bl 8012b9c <_localeconv_r>
8010672: 6843 ldr r3, [r0, #4]
8010674: 9314 str r3, [sp, #80] ; 0x50
8010676: 4618 mov r0, r3
8010678: f7ef fdba bl 80001f0 <strlen>
801067c: 9012 str r0, [sp, #72] ; 0x48
801067e: 4650 mov r0, sl
8010680: f002 fa8c bl 8012b9c <_localeconv_r>
8010684: 6883 ldr r3, [r0, #8]
8010686: 930a str r3, [sp, #40] ; 0x28
8010688: 9b12 ldr r3, [sp, #72] ; 0x48
801068a: 212b movs r1, #43 ; 0x2b
801068c: b12b cbz r3, 801069a <_vfprintf_r+0x26a>
801068e: 9b0a ldr r3, [sp, #40] ; 0x28
8010690: b11b cbz r3, 801069a <_vfprintf_r+0x26a>
8010692: 781b ldrb r3, [r3, #0]
8010694: b10b cbz r3, 801069a <_vfprintf_r+0x26a>
8010696: f44b 6b80 orr.w fp, fp, #1024 ; 0x400
801069a: 9d0b ldr r5, [sp, #44] ; 0x2c
801069c: e775 b.n 801058a <_vfprintf_r+0x15a>
801069e: f89d 306b ldrb.w r3, [sp, #107] ; 0x6b
80106a2: 2b00 cmp r3, #0
80106a4: d1f9 bne.n 801069a <_vfprintf_r+0x26a>
80106a6: 2320 movs r3, #32
80106a8: f88d 306b strb.w r3, [sp, #107] ; 0x6b
80106ac: e7f5 b.n 801069a <_vfprintf_r+0x26a>
80106ae: f04b 0b01 orr.w fp, fp, #1
80106b2: e7f2 b.n 801069a <_vfprintf_r+0x26a>
80106b4: f856 3b04 ldr.w r3, [r6], #4
80106b8: 9310 str r3, [sp, #64] ; 0x40
80106ba: 2b00 cmp r3, #0
80106bc: daed bge.n 801069a <_vfprintf_r+0x26a>
80106be: 425b negs r3, r3
80106c0: 9310 str r3, [sp, #64] ; 0x40
80106c2: f04b 0b04 orr.w fp, fp, #4
80106c6: e7e8 b.n 801069a <_vfprintf_r+0x26a>
80106c8: f88d 106b strb.w r1, [sp, #107] ; 0x6b
80106cc: e7e5 b.n 801069a <_vfprintf_r+0x26a>
80106ce: 9b0b ldr r3, [sp, #44] ; 0x2c
80106d0: f813 2b01 ldrb.w r2, [r3], #1
80106d4: 9206 str r2, [sp, #24]
80106d6: 2a2a cmp r2, #42 ; 0x2a
80106d8: d112 bne.n 8010700 <_vfprintf_r+0x2d0>
80106da: f856 0b04 ldr.w r0, [r6], #4
80106de: 930b str r3, [sp, #44] ; 0x2c
80106e0: ea40 72e0 orr.w r2, r0, r0, asr #31
80106e4: 9204 str r2, [sp, #16]
80106e6: e7d8 b.n 801069a <_vfprintf_r+0x26a>
80106e8: 9804 ldr r0, [sp, #16]
80106ea: fb07 2200 mla r2, r7, r0, r2
80106ee: 9204 str r2, [sp, #16]
80106f0: f813 2b01 ldrb.w r2, [r3], #1
80106f4: 9206 str r2, [sp, #24]
80106f6: 9a06 ldr r2, [sp, #24]
80106f8: 3a30 subs r2, #48 ; 0x30
80106fa: 2a09 cmp r2, #9
80106fc: d9f4 bls.n 80106e8 <_vfprintf_r+0x2b8>
80106fe: e748 b.n 8010592 <_vfprintf_r+0x162>
8010700: 2200 movs r2, #0
8010702: 9204 str r2, [sp, #16]
8010704: e7f7 b.n 80106f6 <_vfprintf_r+0x2c6>
8010706: f04b 0b80 orr.w fp, fp, #128 ; 0x80
801070a: e7c6 b.n 801069a <_vfprintf_r+0x26a>
801070c: 2200 movs r2, #0
801070e: 9b0b ldr r3, [sp, #44] ; 0x2c
8010710: 9210 str r2, [sp, #64] ; 0x40
8010712: 9a06 ldr r2, [sp, #24]
8010714: 9810 ldr r0, [sp, #64] ; 0x40
8010716: 3a30 subs r2, #48 ; 0x30
8010718: fb07 2200 mla r2, r7, r0, r2
801071c: 9210 str r2, [sp, #64] ; 0x40
801071e: f813 2b01 ldrb.w r2, [r3], #1
8010722: 9206 str r2, [sp, #24]
8010724: 3a30 subs r2, #48 ; 0x30
8010726: 2a09 cmp r2, #9
8010728: d9f3 bls.n 8010712 <_vfprintf_r+0x2e2>
801072a: e732 b.n 8010592 <_vfprintf_r+0x162>
801072c: f04b 0b08 orr.w fp, fp, #8
8010730: e7b3 b.n 801069a <_vfprintf_r+0x26a>
8010732: 9b0b ldr r3, [sp, #44] ; 0x2c
8010734: 781b ldrb r3, [r3, #0]
8010736: 2b68 cmp r3, #104 ; 0x68
8010738: bf01 itttt eq
801073a: 9b0b ldreq r3, [sp, #44] ; 0x2c
801073c: 3301 addeq r3, #1
801073e: 930b streq r3, [sp, #44] ; 0x2c
8010740: f44b 7b00 orreq.w fp, fp, #512 ; 0x200
8010744: bf18 it ne
8010746: f04b 0b40 orrne.w fp, fp, #64 ; 0x40
801074a: e7a6 b.n 801069a <_vfprintf_r+0x26a>
801074c: 9b0b ldr r3, [sp, #44] ; 0x2c
801074e: 781b ldrb r3, [r3, #0]
8010750: 2b6c cmp r3, #108 ; 0x6c
8010752: d105 bne.n 8010760 <_vfprintf_r+0x330>
8010754: 9b0b ldr r3, [sp, #44] ; 0x2c
8010756: 3301 adds r3, #1
8010758: 930b str r3, [sp, #44] ; 0x2c
801075a: f04b 0b20 orr.w fp, fp, #32
801075e: e79c b.n 801069a <_vfprintf_r+0x26a>
8010760: f04b 0b10 orr.w fp, fp, #16
8010764: e799 b.n 801069a <_vfprintf_r+0x26a>
8010766: bf00 nop
...
8010770: 4632 mov r2, r6
8010772: 2000 movs r0, #0
8010774: f852 3b04 ldr.w r3, [r2], #4
8010778: 9207 str r2, [sp, #28]
801077a: f88d 30d4 strb.w r3, [sp, #212] ; 0xd4
801077e: f88d 006b strb.w r0, [sp, #107] ; 0x6b
8010782: 2301 movs r3, #1
8010784: e9cd 0008 strd r0, r0, [sp, #32]
8010788: 9003 str r0, [sp, #12]
801078a: 9304 str r3, [sp, #16]
801078c: 4606 mov r6, r0
801078e: 4605 mov r5, r0
8010790: f10d 08d4 add.w r8, sp, #212 ; 0xd4
8010794: e1c6 b.n 8010b24 <_vfprintf_r+0x6f4>
8010796: f04b 0b10 orr.w fp, fp, #16
801079a: f01b 0f20 tst.w fp, #32
801079e: d012 beq.n 80107c6 <_vfprintf_r+0x396>
80107a0: 3607 adds r6, #7
80107a2: f026 0307 bic.w r3, r6, #7
80107a6: 461a mov r2, r3
80107a8: 685d ldr r5, [r3, #4]
80107aa: f852 6b08 ldr.w r6, [r2], #8
80107ae: 9207 str r2, [sp, #28]
80107b0: 2d00 cmp r5, #0
80107b2: da06 bge.n 80107c2 <_vfprintf_r+0x392>
80107b4: 4276 negs r6, r6
80107b6: f04f 032d mov.w r3, #45 ; 0x2d
80107ba: eb65 0545 sbc.w r5, r5, r5, lsl #1
80107be: f88d 306b strb.w r3, [sp, #107] ; 0x6b
80107c2: 2301 movs r3, #1
80107c4: e3a0 b.n 8010f08 <_vfprintf_r+0xad8>
80107c6: 4633 mov r3, r6
80107c8: f01b 0f10 tst.w fp, #16
80107cc: f853 5b04 ldr.w r5, [r3], #4
80107d0: 9307 str r3, [sp, #28]
80107d2: d002 beq.n 80107da <_vfprintf_r+0x3aa>
80107d4: 462e mov r6, r5
80107d6: 17ed asrs r5, r5, #31
80107d8: e7ea b.n 80107b0 <_vfprintf_r+0x380>
80107da: f01b 0f40 tst.w fp, #64 ; 0x40
80107de: d003 beq.n 80107e8 <_vfprintf_r+0x3b8>
80107e0: b22e sxth r6, r5
80107e2: f345 35c0 sbfx r5, r5, #15, #1
80107e6: e7e3 b.n 80107b0 <_vfprintf_r+0x380>
80107e8: f41b 7f00 tst.w fp, #512 ; 0x200
80107ec: d0f2 beq.n 80107d4 <_vfprintf_r+0x3a4>
80107ee: b26e sxtb r6, r5
80107f0: f345 15c0 sbfx r5, r5, #7, #1
80107f4: e7dc b.n 80107b0 <_vfprintf_r+0x380>
80107f6: 3607 adds r6, #7
80107f8: f026 0307 bic.w r3, r6, #7
80107fc: ecb3 7b02 vldmia r3!, {d7}
8010800: ed8d 7b0c vstr d7, [sp, #48] ; 0x30
8010804: 9307 str r3, [sp, #28]
8010806: 9b0c ldr r3, [sp, #48] ; 0x30
8010808: ee09 3a10 vmov s18, r3
801080c: 9b0d ldr r3, [sp, #52] ; 0x34
801080e: f023 4300 bic.w r3, r3, #2147483648 ; 0x80000000
8010812: ee09 3a90 vmov s19, r3
8010816: f04f 32ff mov.w r2, #4294967295
801081a: 4b3f ldr r3, [pc, #252] ; (8010918 <_vfprintf_r+0x4e8>)
801081c: ec51 0b19 vmov r0, r1, d9
8010820: f7f0 f994 bl 8000b4c <__aeabi_dcmpun>
8010824: bb10 cbnz r0, 801086c <_vfprintf_r+0x43c>
8010826: 4b3c ldr r3, [pc, #240] ; (8010918 <_vfprintf_r+0x4e8>)
8010828: ec51 0b19 vmov r0, r1, d9
801082c: f04f 32ff mov.w r2, #4294967295
8010830: f7f0 f96e bl 8000b10 <__aeabi_dcmple>
8010834: b9d0 cbnz r0, 801086c <_vfprintf_r+0x43c>
8010836: e9dd 010c ldrd r0, r1, [sp, #48] ; 0x30
801083a: 2200 movs r2, #0
801083c: 2300 movs r3, #0
801083e: f7f0 f95d bl 8000afc <__aeabi_dcmplt>
8010842: b110 cbz r0, 801084a <_vfprintf_r+0x41a>
8010844: 232d movs r3, #45 ; 0x2d
8010846: f88d 306b strb.w r3, [sp, #107] ; 0x6b
801084a: 4a34 ldr r2, [pc, #208] ; (801091c <_vfprintf_r+0x4ec>)
801084c: 4834 ldr r0, [pc, #208] ; (8010920 <_vfprintf_r+0x4f0>)
801084e: 9b06 ldr r3, [sp, #24]
8010850: 2100 movs r1, #0
8010852: 2b47 cmp r3, #71 ; 0x47
8010854: bfd4 ite le
8010856: 4690 movle r8, r2
8010858: 4680 movgt r8, r0
801085a: 2303 movs r3, #3
801085c: e9cd 1303 strd r1, r3, [sp, #12]
8010860: f02b 0b80 bic.w fp, fp, #128 ; 0x80
8010864: 2600 movs r6, #0
8010866: 4633 mov r3, r6
8010868: f001 b812 b.w 8011890 <_vfprintf_r+0x1460>
801086c: e9dd 230c ldrd r2, r3, [sp, #48] ; 0x30
8010870: 4610 mov r0, r2
8010872: 4619 mov r1, r3
8010874: f7f0 f96a bl 8000b4c <__aeabi_dcmpun>
8010878: b140 cbz r0, 801088c <_vfprintf_r+0x45c>
801087a: 9b0d ldr r3, [sp, #52] ; 0x34
801087c: 4a29 ldr r2, [pc, #164] ; (8010924 <_vfprintf_r+0x4f4>)
801087e: 482a ldr r0, [pc, #168] ; (8010928 <_vfprintf_r+0x4f8>)
8010880: 2b00 cmp r3, #0
8010882: bfbc itt lt
8010884: 232d movlt r3, #45 ; 0x2d
8010886: f88d 306b strblt.w r3, [sp, #107] ; 0x6b
801088a: e7e0 b.n 801084e <_vfprintf_r+0x41e>
801088c: 9b06 ldr r3, [sp, #24]
801088e: f023 0320 bic.w r3, r3, #32
8010892: 2b41 cmp r3, #65 ; 0x41
8010894: 9308 str r3, [sp, #32]
8010896: d12e bne.n 80108f6 <_vfprintf_r+0x4c6>
8010898: 2330 movs r3, #48 ; 0x30
801089a: f88d 306c strb.w r3, [sp, #108] ; 0x6c
801089e: 9b06 ldr r3, [sp, #24]
80108a0: 2b61 cmp r3, #97 ; 0x61
80108a2: bf0c ite eq
80108a4: 2378 moveq r3, #120 ; 0x78
80108a6: 2358 movne r3, #88 ; 0x58
80108a8: f88d 306d strb.w r3, [sp, #109] ; 0x6d
80108ac: 9b04 ldr r3, [sp, #16]
80108ae: 2b63 cmp r3, #99 ; 0x63
80108b0: f04b 0b02 orr.w fp, fp, #2
80108b4: dd3a ble.n 801092c <_vfprintf_r+0x4fc>
80108b6: 1c59 adds r1, r3, #1
80108b8: 4650 mov r0, sl
80108ba: f002 f9e3 bl 8012c84 <_malloc_r>
80108be: 4680 mov r8, r0
80108c0: 2800 cmp r0, #0
80108c2: f040 8207 bne.w 8010cd4 <_vfprintf_r+0x8a4>
80108c6: f8b9 300c ldrh.w r3, [r9, #12]
80108ca: f043 0340 orr.w r3, r3, #64 ; 0x40
80108ce: f8a9 300c strh.w r3, [r9, #12]
80108d2: f8d9 3064 ldr.w r3, [r9, #100] ; 0x64
80108d6: 07d9 lsls r1, r3, #31
80108d8: d407 bmi.n 80108ea <_vfprintf_r+0x4ba>
80108da: f8b9 300c ldrh.w r3, [r9, #12]
80108de: 059a lsls r2, r3, #22
80108e0: d403 bmi.n 80108ea <_vfprintf_r+0x4ba>
80108e2: f8d9 0058 ldr.w r0, [r9, #88] ; 0x58
80108e6: f002 f960 bl 8012baa <__retarget_lock_release_recursive>
80108ea: f8b9 300c ldrh.w r3, [r9, #12]
80108ee: 065b lsls r3, r3, #25
80108f0: f57f ade6 bpl.w 80104c0 <_vfprintf_r+0x90>
80108f4: e5e1 b.n 80104ba <_vfprintf_r+0x8a>
80108f6: 9b04 ldr r3, [sp, #16]
80108f8: 3301 adds r3, #1
80108fa: f000 81ed beq.w 8010cd8 <_vfprintf_r+0x8a8>
80108fe: 9b08 ldr r3, [sp, #32]
8010900: 2b47 cmp r3, #71 ; 0x47
8010902: f040 81ec bne.w 8010cde <_vfprintf_r+0x8ae>
8010906: 9b04 ldr r3, [sp, #16]
8010908: 2b00 cmp r3, #0
801090a: f040 81e8 bne.w 8010cde <_vfprintf_r+0x8ae>
801090e: 9303 str r3, [sp, #12]
8010910: 2301 movs r3, #1
8010912: 9304 str r3, [sp, #16]
8010914: e00d b.n 8010932 <_vfprintf_r+0x502>
8010916: bf00 nop
8010918: 7fefffff .word 0x7fefffff
801091c: 08017ef8 .word 0x08017ef8
8010920: 08017efc .word 0x08017efc
8010924: 08017f00 .word 0x08017f00
8010928: 08017f04 .word 0x08017f04
801092c: 9003 str r0, [sp, #12]
801092e: f10d 08d4 add.w r8, sp, #212 ; 0xd4
8010932: f44b 7380 orr.w r3, fp, #256 ; 0x100
8010936: 9311 str r3, [sp, #68] ; 0x44
8010938: 9b0d ldr r3, [sp, #52] ; 0x34
801093a: 2b00 cmp r3, #0
801093c: f280 81d1 bge.w 8010ce2 <_vfprintf_r+0x8b2>
8010940: 9b0c ldr r3, [sp, #48] ; 0x30
8010942: ee08 3a10 vmov s16, r3
8010946: 9b0d ldr r3, [sp, #52] ; 0x34
8010948: f103 4300 add.w r3, r3, #2147483648 ; 0x80000000
801094c: ee08 3a90 vmov s17, r3
8010950: 232d movs r3, #45 ; 0x2d
8010952: 9318 str r3, [sp, #96] ; 0x60
8010954: 9b08 ldr r3, [sp, #32]
8010956: 2b41 cmp r3, #65 ; 0x41
8010958: f040 81e1 bne.w 8010d1e <_vfprintf_r+0x8ee>
801095c: eeb0 0a48 vmov.f32 s0, s16
8010960: eef0 0a68 vmov.f32 s1, s17
8010964: a81c add r0, sp, #112 ; 0x70
8010966: f002 ff0b bl 8013780 <frexp>
801096a: 2200 movs r2, #0
801096c: f04f 537f mov.w r3, #1069547520 ; 0x3fc00000
8010970: ec51 0b10 vmov r0, r1, d0
8010974: f7ef fe50 bl 8000618 <__aeabi_dmul>
8010978: 2200 movs r2, #0
801097a: 2300 movs r3, #0
801097c: 4606 mov r6, r0
801097e: 460f mov r7, r1
8010980: f7f0 f8b2 bl 8000ae8 <__aeabi_dcmpeq>
8010984: b108 cbz r0, 801098a <_vfprintf_r+0x55a>
8010986: 2301 movs r3, #1
8010988: 931c str r3, [sp, #112] ; 0x70
801098a: 4ba7 ldr r3, [pc, #668] ; (8010c28 <_vfprintf_r+0x7f8>)
801098c: 4aa7 ldr r2, [pc, #668] ; (8010c2c <_vfprintf_r+0x7fc>)
801098e: 9906 ldr r1, [sp, #24]
8010990: 2961 cmp r1, #97 ; 0x61
8010992: bf18 it ne
8010994: 461a movne r2, r3
8010996: 9b04 ldr r3, [sp, #16]
8010998: 9217 str r2, [sp, #92] ; 0x5c
801099a: 3b01 subs r3, #1
801099c: 9305 str r3, [sp, #20]
801099e: 4645 mov r5, r8
80109a0: 4ba3 ldr r3, [pc, #652] ; (8010c30 <_vfprintf_r+0x800>)
80109a2: 2200 movs r2, #0
80109a4: 4630 mov r0, r6
80109a6: 4639 mov r1, r7
80109a8: f7ef fe36 bl 8000618 <__aeabi_dmul>
80109ac: 460f mov r7, r1
80109ae: 4606 mov r6, r0
80109b0: f7f0 f8e2 bl 8000b78 <__aeabi_d2iz>
80109b4: 9019 str r0, [sp, #100] ; 0x64
80109b6: f7ef fdc5 bl 8000544 <__aeabi_i2d>
80109ba: 4602 mov r2, r0
80109bc: 460b mov r3, r1
80109be: 4630 mov r0, r6
80109c0: 4639 mov r1, r7
80109c2: f7ef fc71 bl 80002a8 <__aeabi_dsub>
80109c6: 9a19 ldr r2, [sp, #100] ; 0x64
80109c8: 9b17 ldr r3, [sp, #92] ; 0x5c
80109ca: 5c9b ldrb r3, [r3, r2]
80109cc: f805 3b01 strb.w r3, [r5], #1
80109d0: 9b05 ldr r3, [sp, #20]
80109d2: 9309 str r3, [sp, #36] ; 0x24
80109d4: 1c5a adds r2, r3, #1
80109d6: 4606 mov r6, r0
80109d8: 460f mov r7, r1
80109da: d007 beq.n 80109ec <_vfprintf_r+0x5bc>
80109dc: 3b01 subs r3, #1
80109de: 9305 str r3, [sp, #20]
80109e0: 2200 movs r2, #0
80109e2: 2300 movs r3, #0
80109e4: f7f0 f880 bl 8000ae8 <__aeabi_dcmpeq>
80109e8: 2800 cmp r0, #0
80109ea: d0d9 beq.n 80109a0 <_vfprintf_r+0x570>
80109ec: 4b91 ldr r3, [pc, #580] ; (8010c34 <_vfprintf_r+0x804>)
80109ee: 2200 movs r2, #0
80109f0: 4630 mov r0, r6
80109f2: 4639 mov r1, r7
80109f4: f7f0 f8a0 bl 8000b38 <__aeabi_dcmpgt>
80109f8: b960 cbnz r0, 8010a14 <_vfprintf_r+0x5e4>
80109fa: 4b8e ldr r3, [pc, #568] ; (8010c34 <_vfprintf_r+0x804>)
80109fc: 2200 movs r2, #0
80109fe: 4630 mov r0, r6
8010a00: 4639 mov r1, r7
8010a02: f7f0 f871 bl 8000ae8 <__aeabi_dcmpeq>
8010a06: 2800 cmp r0, #0
8010a08: f000 8184 beq.w 8010d14 <_vfprintf_r+0x8e4>
8010a0c: 9b19 ldr r3, [sp, #100] ; 0x64
8010a0e: 07da lsls r2, r3, #31
8010a10: f140 8180 bpl.w 8010d14 <_vfprintf_r+0x8e4>
8010a14: 9b17 ldr r3, [sp, #92] ; 0x5c
8010a16: 9520 str r5, [sp, #128] ; 0x80
8010a18: 7bd9 ldrb r1, [r3, #15]
8010a1a: 2030 movs r0, #48 ; 0x30
8010a1c: 9a20 ldr r2, [sp, #128] ; 0x80
8010a1e: 1e53 subs r3, r2, #1
8010a20: 9320 str r3, [sp, #128] ; 0x80
8010a22: f812 3c01 ldrb.w r3, [r2, #-1]
8010a26: 428b cmp r3, r1
8010a28: f000 8163 beq.w 8010cf2 <_vfprintf_r+0x8c2>
8010a2c: 2b39 cmp r3, #57 ; 0x39
8010a2e: bf0b itete eq
8010a30: 9b17 ldreq r3, [sp, #92] ; 0x5c
8010a32: 3301 addne r3, #1
8010a34: 7a9b ldrbeq r3, [r3, #10]
8010a36: b2db uxtbne r3, r3
8010a38: f802 3c01 strb.w r3, [r2, #-1]
8010a3c: eba5 0308 sub.w r3, r5, r8
8010a40: 9305 str r3, [sp, #20]
8010a42: 9b08 ldr r3, [sp, #32]
8010a44: 9d1c ldr r5, [sp, #112] ; 0x70
8010a46: 2b47 cmp r3, #71 ; 0x47
8010a48: f040 81b1 bne.w 8010dae <_vfprintf_r+0x97e>
8010a4c: 1ceb adds r3, r5, #3
8010a4e: db03 blt.n 8010a58 <_vfprintf_r+0x628>
8010a50: 9b04 ldr r3, [sp, #16]
8010a52: 42ab cmp r3, r5
8010a54: f280 81d6 bge.w 8010e04 <_vfprintf_r+0x9d4>
8010a58: 9b06 ldr r3, [sp, #24]
8010a5a: 3b02 subs r3, #2
8010a5c: 9306 str r3, [sp, #24]
8010a5e: 9906 ldr r1, [sp, #24]
8010a60: f89d 2018 ldrb.w r2, [sp, #24]
8010a64: f021 0120 bic.w r1, r1, #32
8010a68: 2941 cmp r1, #65 ; 0x41
8010a6a: bf08 it eq
8010a6c: 320f addeq r2, #15
8010a6e: f105 33ff add.w r3, r5, #4294967295
8010a72: bf06 itte eq
8010a74: b2d2 uxtbeq r2, r2
8010a76: 2101 moveq r1, #1
8010a78: 2100 movne r1, #0
8010a7a: 2b00 cmp r3, #0
8010a7c: 931c str r3, [sp, #112] ; 0x70
8010a7e: bfb8 it lt
8010a80: f1c5 0301 rsblt r3, r5, #1
8010a84: f88d 2078 strb.w r2, [sp, #120] ; 0x78
8010a88: bfb4 ite lt
8010a8a: 222d movlt r2, #45 ; 0x2d
8010a8c: 222b movge r2, #43 ; 0x2b
8010a8e: 2b09 cmp r3, #9
8010a90: f88d 2079 strb.w r2, [sp, #121] ; 0x79
8010a94: f340 81a4 ble.w 8010de0 <_vfprintf_r+0x9b0>
8010a98: f10d 0287 add.w r2, sp, #135 ; 0x87
8010a9c: 260a movs r6, #10
8010a9e: 4611 mov r1, r2
8010aa0: fb93 f5f6 sdiv r5, r3, r6
8010aa4: fb06 3015 mls r0, r6, r5, r3
8010aa8: 3030 adds r0, #48 ; 0x30
8010aaa: f801 0c01 strb.w r0, [r1, #-1]
8010aae: 4618 mov r0, r3
8010ab0: 2863 cmp r0, #99 ; 0x63
8010ab2: f102 32ff add.w r2, r2, #4294967295
8010ab6: 462b mov r3, r5
8010ab8: dcf1 bgt.n 8010a9e <_vfprintf_r+0x66e>
8010aba: 3330 adds r3, #48 ; 0x30
8010abc: 1e88 subs r0, r1, #2
8010abe: f802 3c01 strb.w r3, [r2, #-1]
8010ac2: f10d 0587 add.w r5, sp, #135 ; 0x87
8010ac6: f10d 027a add.w r2, sp, #122 ; 0x7a
8010aca: 4603 mov r3, r0
8010acc: 42ab cmp r3, r5
8010ace: f0c0 8182 bcc.w 8010dd6 <_vfprintf_r+0x9a6>
8010ad2: f10d 0289 add.w r2, sp, #137 ; 0x89
8010ad6: 1a52 subs r2, r2, r1
8010ad8: 42a8 cmp r0, r5
8010ada: bf88 it hi
8010adc: 2200 movhi r2, #0
8010ade: f10d 037a add.w r3, sp, #122 ; 0x7a
8010ae2: 441a add r2, r3
8010ae4: ab1e add r3, sp, #120 ; 0x78
8010ae6: 1ad3 subs r3, r2, r3
8010ae8: 9a05 ldr r2, [sp, #20]
8010aea: 9315 str r3, [sp, #84] ; 0x54
8010aec: 2a01 cmp r2, #1
8010aee: 4413 add r3, r2
8010af0: 9304 str r3, [sp, #16]
8010af2: dc02 bgt.n 8010afa <_vfprintf_r+0x6ca>
8010af4: f01b 0f01 tst.w fp, #1
8010af8: d003 beq.n 8010b02 <_vfprintf_r+0x6d2>
8010afa: 9b04 ldr r3, [sp, #16]
8010afc: 9a0e ldr r2, [sp, #56] ; 0x38
8010afe: 4413 add r3, r2
8010b00: 9304 str r3, [sp, #16]
8010b02: f42b 6380 bic.w r3, fp, #1024 ; 0x400
8010b06: f443 7380 orr.w r3, r3, #256 ; 0x100
8010b0a: 9311 str r3, [sp, #68] ; 0x44
8010b0c: 2300 movs r3, #0
8010b0e: e9cd 3308 strd r3, r3, [sp, #32]
8010b12: 461d mov r5, r3
8010b14: 9b18 ldr r3, [sp, #96] ; 0x60
8010b16: b113 cbz r3, 8010b1e <_vfprintf_r+0x6ee>
8010b18: 232d movs r3, #45 ; 0x2d
8010b1a: f88d 306b strb.w r3, [sp, #107] ; 0x6b
8010b1e: f8dd b044 ldr.w fp, [sp, #68] ; 0x44
8010b22: 2600 movs r6, #0
8010b24: 9b04 ldr r3, [sp, #16]
8010b26: 42b3 cmp r3, r6
8010b28: bfb8 it lt
8010b2a: 4633 movlt r3, r6
8010b2c: 9311 str r3, [sp, #68] ; 0x44
8010b2e: f89d 306b ldrb.w r3, [sp, #107] ; 0x6b
8010b32: b113 cbz r3, 8010b3a <_vfprintf_r+0x70a>
8010b34: 9b11 ldr r3, [sp, #68] ; 0x44
8010b36: 3301 adds r3, #1
8010b38: 9311 str r3, [sp, #68] ; 0x44
8010b3a: f01b 0302 ands.w r3, fp, #2
8010b3e: 9317 str r3, [sp, #92] ; 0x5c
8010b40: bf1e ittt ne
8010b42: 9b11 ldrne r3, [sp, #68] ; 0x44
8010b44: 3302 addne r3, #2
8010b46: 9311 strne r3, [sp, #68] ; 0x44
8010b48: f01b 0384 ands.w r3, fp, #132 ; 0x84
8010b4c: 9318 str r3, [sp, #96] ; 0x60
8010b4e: d11f bne.n 8010b90 <_vfprintf_r+0x760>
8010b50: e9dd 3210 ldrd r3, r2, [sp, #64] ; 0x40
8010b54: 1a9f subs r7, r3, r2
8010b56: 2f00 cmp r7, #0
8010b58: dd1a ble.n 8010b90 <_vfprintf_r+0x760>
8010b5a: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
8010b5e: 4836 ldr r0, [pc, #216] ; (8010c38 <_vfprintf_r+0x808>)
8010b60: 6020 str r0, [r4, #0]
8010b62: 2f10 cmp r7, #16
8010b64: f103 0301 add.w r3, r3, #1
8010b68: f104 0108 add.w r1, r4, #8
8010b6c: f300 82ee bgt.w 801114c <_vfprintf_r+0xd1c>
8010b70: 443a add r2, r7
8010b72: 2b07 cmp r3, #7
8010b74: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
8010b78: 6067 str r7, [r4, #4]
8010b7a: f340 82fa ble.w 8011172 <_vfprintf_r+0xd42>
8010b7e: aa22 add r2, sp, #136 ; 0x88
8010b80: 4649 mov r1, r9
8010b82: 4650 mov r0, sl
8010b84: f002 fea7 bl 80138d6 <__sprint_r>
8010b88: 2800 cmp r0, #0
8010b8a: f040 8625 bne.w 80117d8 <_vfprintf_r+0x13a8>
8010b8e: ac25 add r4, sp, #148 ; 0x94
8010b90: f89d 306b ldrb.w r3, [sp, #107] ; 0x6b
8010b94: b173 cbz r3, 8010bb4 <_vfprintf_r+0x784>
8010b96: f10d 036b add.w r3, sp, #107 ; 0x6b
8010b9a: 6023 str r3, [r4, #0]
8010b9c: 2301 movs r3, #1
8010b9e: 6063 str r3, [r4, #4]
8010ba0: 9b24 ldr r3, [sp, #144] ; 0x90
8010ba2: 3301 adds r3, #1
8010ba4: 9324 str r3, [sp, #144] ; 0x90
8010ba6: 9b23 ldr r3, [sp, #140] ; 0x8c
8010ba8: 3301 adds r3, #1
8010baa: 2b07 cmp r3, #7
8010bac: 9323 str r3, [sp, #140] ; 0x8c
8010bae: f300 82e2 bgt.w 8011176 <_vfprintf_r+0xd46>
8010bb2: 3408 adds r4, #8
8010bb4: 9b17 ldr r3, [sp, #92] ; 0x5c
8010bb6: b16b cbz r3, 8010bd4 <_vfprintf_r+0x7a4>
8010bb8: ab1b add r3, sp, #108 ; 0x6c
8010bba: 6023 str r3, [r4, #0]
8010bbc: 2302 movs r3, #2
8010bbe: 6063 str r3, [r4, #4]
8010bc0: 9b24 ldr r3, [sp, #144] ; 0x90
8010bc2: 3302 adds r3, #2
8010bc4: 9324 str r3, [sp, #144] ; 0x90
8010bc6: 9b23 ldr r3, [sp, #140] ; 0x8c
8010bc8: 3301 adds r3, #1
8010bca: 2b07 cmp r3, #7
8010bcc: 9323 str r3, [sp, #140] ; 0x8c
8010bce: f300 82dc bgt.w 801118a <_vfprintf_r+0xd5a>
8010bd2: 3408 adds r4, #8
8010bd4: 9b18 ldr r3, [sp, #96] ; 0x60
8010bd6: 2b80 cmp r3, #128 ; 0x80
8010bd8: d11f bne.n 8010c1a <_vfprintf_r+0x7ea>
8010bda: e9dd 3210 ldrd r3, r2, [sp, #64] ; 0x40
8010bde: 1a9f subs r7, r3, r2
8010be0: 2f00 cmp r7, #0
8010be2: dd1a ble.n 8010c1a <_vfprintf_r+0x7ea>
8010be4: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
8010be8: 4814 ldr r0, [pc, #80] ; (8010c3c <_vfprintf_r+0x80c>)
8010bea: 6020 str r0, [r4, #0]
8010bec: 2f10 cmp r7, #16
8010bee: f103 0301 add.w r3, r3, #1
8010bf2: f104 0108 add.w r1, r4, #8
8010bf6: f300 82d2 bgt.w 801119e <_vfprintf_r+0xd6e>
8010bfa: 6067 str r7, [r4, #4]
8010bfc: 2b07 cmp r3, #7
8010bfe: 4417 add r7, r2
8010c00: e9cd 3723 strd r3, r7, [sp, #140] ; 0x8c
8010c04: f340 82de ble.w 80111c4 <_vfprintf_r+0xd94>
8010c08: aa22 add r2, sp, #136 ; 0x88
8010c0a: 4649 mov r1, r9
8010c0c: 4650 mov r0, sl
8010c0e: f002 fe62 bl 80138d6 <__sprint_r>
8010c12: 2800 cmp r0, #0
8010c14: f040 85e0 bne.w 80117d8 <_vfprintf_r+0x13a8>
8010c18: ac25 add r4, sp, #148 ; 0x94
8010c1a: 9b04 ldr r3, [sp, #16]
8010c1c: 1af6 subs r6, r6, r3
8010c1e: 2e00 cmp r6, #0
8010c20: dd28 ble.n 8010c74 <_vfprintf_r+0x844>
8010c22: 4f06 ldr r7, [pc, #24] ; (8010c3c <_vfprintf_r+0x80c>)
8010c24: e00c b.n 8010c40 <_vfprintf_r+0x810>
8010c26: bf00 nop
8010c28: 08017f19 .word 0x08017f19
8010c2c: 08017f08 .word 0x08017f08
8010c30: 40300000 .word 0x40300000
8010c34: 3fe00000 .word 0x3fe00000
8010c38: 08017f2c .word 0x08017f2c
8010c3c: 08017f3c .word 0x08017f3c
8010c40: 6027 str r7, [r4, #0]
8010c42: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
8010c46: 2e10 cmp r6, #16
8010c48: f103 0301 add.w r3, r3, #1
8010c4c: f104 0108 add.w r1, r4, #8
8010c50: f300 82ba bgt.w 80111c8 <_vfprintf_r+0xd98>
8010c54: 6066 str r6, [r4, #4]
8010c56: 2b07 cmp r3, #7
8010c58: 4416 add r6, r2
8010c5a: e9cd 3623 strd r3, r6, [sp, #140] ; 0x8c
8010c5e: f340 82c6 ble.w 80111ee <_vfprintf_r+0xdbe>
8010c62: aa22 add r2, sp, #136 ; 0x88
8010c64: 4649 mov r1, r9
8010c66: 4650 mov r0, sl
8010c68: f002 fe35 bl 80138d6 <__sprint_r>
8010c6c: 2800 cmp r0, #0
8010c6e: f040 85b3 bne.w 80117d8 <_vfprintf_r+0x13a8>
8010c72: ac25 add r4, sp, #148 ; 0x94
8010c74: f41b 7f80 tst.w fp, #256 ; 0x100
8010c78: 9e24 ldr r6, [sp, #144] ; 0x90
8010c7a: f040 82bf bne.w 80111fc <_vfprintf_r+0xdcc>
8010c7e: 9b04 ldr r3, [sp, #16]
8010c80: f8c4 8000 str.w r8, [r4]
8010c84: 441e add r6, r3
8010c86: 6063 str r3, [r4, #4]
8010c88: 9624 str r6, [sp, #144] ; 0x90
8010c8a: 9b23 ldr r3, [sp, #140] ; 0x8c
8010c8c: 3301 adds r3, #1
8010c8e: 2b07 cmp r3, #7
8010c90: 9323 str r3, [sp, #140] ; 0x8c
8010c92: f300 82f8 bgt.w 8011286 <_vfprintf_r+0xe56>
8010c96: 3408 adds r4, #8
8010c98: f01b 0f04 tst.w fp, #4
8010c9c: f040 857e bne.w 801179c <_vfprintf_r+0x136c>
8010ca0: e9dd 320f ldrd r3, r2, [sp, #60] ; 0x3c
8010ca4: 9911 ldr r1, [sp, #68] ; 0x44
8010ca6: 428a cmp r2, r1
8010ca8: bfac ite ge
8010caa: 189b addge r3, r3, r2
8010cac: 185b addlt r3, r3, r1
8010cae: 930f str r3, [sp, #60] ; 0x3c
8010cb0: 9b24 ldr r3, [sp, #144] ; 0x90
8010cb2: b13b cbz r3, 8010cc4 <_vfprintf_r+0x894>
8010cb4: aa22 add r2, sp, #136 ; 0x88
8010cb6: 4649 mov r1, r9
8010cb8: 4650 mov r0, sl
8010cba: f002 fe0c bl 80138d6 <__sprint_r>
8010cbe: 2800 cmp r0, #0
8010cc0: f040 858a bne.w 80117d8 <_vfprintf_r+0x13a8>
8010cc4: 2300 movs r3, #0
8010cc6: 9323 str r3, [sp, #140] ; 0x8c
8010cc8: 9b03 ldr r3, [sp, #12]
8010cca: 2b00 cmp r3, #0
8010ccc: f040 85a0 bne.w 8011810 <_vfprintf_r+0x13e0>
8010cd0: ac25 add r4, sp, #148 ; 0x94
8010cd2: e0ec b.n 8010eae <_vfprintf_r+0xa7e>
8010cd4: 9003 str r0, [sp, #12]
8010cd6: e62c b.n 8010932 <_vfprintf_r+0x502>
8010cd8: 9003 str r0, [sp, #12]
8010cda: 2306 movs r3, #6
8010cdc: e619 b.n 8010912 <_vfprintf_r+0x4e2>
8010cde: 9003 str r0, [sp, #12]
8010ce0: e627 b.n 8010932 <_vfprintf_r+0x502>
8010ce2: ed9d 7b0c vldr d7, [sp, #48] ; 0x30
8010ce6: 2300 movs r3, #0
8010ce8: eeb0 8a47 vmov.f32 s16, s14
8010cec: eef0 8a67 vmov.f32 s17, s15
8010cf0: e62f b.n 8010952 <_vfprintf_r+0x522>
8010cf2: f802 0c01 strb.w r0, [r2, #-1]
8010cf6: e691 b.n 8010a1c <_vfprintf_r+0x5ec>
8010cf8: f803 0b01 strb.w r0, [r3], #1
8010cfc: 1aca subs r2, r1, r3
8010cfe: 2a00 cmp r2, #0
8010d00: dafa bge.n 8010cf8 <_vfprintf_r+0x8c8>
8010d02: 9a09 ldr r2, [sp, #36] ; 0x24
8010d04: 9b09 ldr r3, [sp, #36] ; 0x24
8010d06: 3201 adds r2, #1
8010d08: f103 0301 add.w r3, r3, #1
8010d0c: bfb8 it lt
8010d0e: 2300 movlt r3, #0
8010d10: 441d add r5, r3
8010d12: e693 b.n 8010a3c <_vfprintf_r+0x60c>
8010d14: 9a09 ldr r2, [sp, #36] ; 0x24
8010d16: 462b mov r3, r5
8010d18: 18a9 adds r1, r5, r2
8010d1a: 2030 movs r0, #48 ; 0x30
8010d1c: e7ee b.n 8010cfc <_vfprintf_r+0x8cc>
8010d1e: 9b08 ldr r3, [sp, #32]
8010d20: 2b46 cmp r3, #70 ; 0x46
8010d22: d005 beq.n 8010d30 <_vfprintf_r+0x900>
8010d24: 2b45 cmp r3, #69 ; 0x45
8010d26: d11b bne.n 8010d60 <_vfprintf_r+0x930>
8010d28: 9b04 ldr r3, [sp, #16]
8010d2a: 1c5d adds r5, r3, #1
8010d2c: 2102 movs r1, #2
8010d2e: e001 b.n 8010d34 <_vfprintf_r+0x904>
8010d30: 9d04 ldr r5, [sp, #16]
8010d32: 2103 movs r1, #3
8010d34: ab20 add r3, sp, #128 ; 0x80
8010d36: 9301 str r3, [sp, #4]
8010d38: ab1d add r3, sp, #116 ; 0x74
8010d3a: 9300 str r3, [sp, #0]
8010d3c: 462a mov r2, r5
8010d3e: ab1c add r3, sp, #112 ; 0x70
8010d40: 4650 mov r0, sl
8010d42: eeb0 0a48 vmov.f32 s0, s16
8010d46: eef0 0a68 vmov.f32 s1, s17
8010d4a: f000 fee1 bl 8011b10 <_dtoa_r>
8010d4e: 9b08 ldr r3, [sp, #32]
8010d50: 2b47 cmp r3, #71 ; 0x47
8010d52: 4680 mov r8, r0
8010d54: d106 bne.n 8010d64 <_vfprintf_r+0x934>
8010d56: f01b 0f01 tst.w fp, #1
8010d5a: d103 bne.n 8010d64 <_vfprintf_r+0x934>
8010d5c: 9d20 ldr r5, [sp, #128] ; 0x80
8010d5e: e66d b.n 8010a3c <_vfprintf_r+0x60c>
8010d60: 9d04 ldr r5, [sp, #16]
8010d62: e7e3 b.n 8010d2c <_vfprintf_r+0x8fc>
8010d64: 9b08 ldr r3, [sp, #32]
8010d66: 2b46 cmp r3, #70 ; 0x46
8010d68: eb08 0605 add.w r6, r8, r5
8010d6c: d10f bne.n 8010d8e <_vfprintf_r+0x95e>
8010d6e: f898 3000 ldrb.w r3, [r8]
8010d72: 2b30 cmp r3, #48 ; 0x30
8010d74: d109 bne.n 8010d8a <_vfprintf_r+0x95a>
8010d76: ec51 0b18 vmov r0, r1, d8
8010d7a: 2200 movs r2, #0
8010d7c: 2300 movs r3, #0
8010d7e: f7ef feb3 bl 8000ae8 <__aeabi_dcmpeq>
8010d82: b910 cbnz r0, 8010d8a <_vfprintf_r+0x95a>
8010d84: f1c5 0501 rsb r5, r5, #1
8010d88: 951c str r5, [sp, #112] ; 0x70
8010d8a: 9b1c ldr r3, [sp, #112] ; 0x70
8010d8c: 441e add r6, r3
8010d8e: ec51 0b18 vmov r0, r1, d8
8010d92: 2200 movs r2, #0
8010d94: 2300 movs r3, #0
8010d96: f7ef fea7 bl 8000ae8 <__aeabi_dcmpeq>
8010d9a: b100 cbz r0, 8010d9e <_vfprintf_r+0x96e>
8010d9c: 9620 str r6, [sp, #128] ; 0x80
8010d9e: 2230 movs r2, #48 ; 0x30
8010da0: 9b20 ldr r3, [sp, #128] ; 0x80
8010da2: 429e cmp r6, r3
8010da4: d9da bls.n 8010d5c <_vfprintf_r+0x92c>
8010da6: 1c59 adds r1, r3, #1
8010da8: 9120 str r1, [sp, #128] ; 0x80
8010daa: 701a strb r2, [r3, #0]
8010dac: e7f8 b.n 8010da0 <_vfprintf_r+0x970>
8010dae: 9b08 ldr r3, [sp, #32]
8010db0: 2b46 cmp r3, #70 ; 0x46
8010db2: f47f ae54 bne.w 8010a5e <_vfprintf_r+0x62e>
8010db6: 9a04 ldr r2, [sp, #16]
8010db8: f00b 0301 and.w r3, fp, #1
8010dbc: 2d00 cmp r5, #0
8010dbe: ea43 0302 orr.w r3, r3, r2
8010dc2: dd1a ble.n 8010dfa <_vfprintf_r+0x9ca>
8010dc4: 2b00 cmp r3, #0
8010dc6: d034 beq.n 8010e32 <_vfprintf_r+0xa02>
8010dc8: 9b0e ldr r3, [sp, #56] ; 0x38
8010dca: 18eb adds r3, r5, r3
8010dcc: 441a add r2, r3
8010dce: 9204 str r2, [sp, #16]
8010dd0: 2366 movs r3, #102 ; 0x66
8010dd2: 9306 str r3, [sp, #24]
8010dd4: e033 b.n 8010e3e <_vfprintf_r+0xa0e>
8010dd6: f813 6b01 ldrb.w r6, [r3], #1
8010dda: f802 6b01 strb.w r6, [r2], #1
8010dde: e675 b.n 8010acc <_vfprintf_r+0x69c>
8010de0: b941 cbnz r1, 8010df4 <_vfprintf_r+0x9c4>
8010de2: 2230 movs r2, #48 ; 0x30
8010de4: f88d 207a strb.w r2, [sp, #122] ; 0x7a
8010de8: f10d 027b add.w r2, sp, #123 ; 0x7b
8010dec: 3330 adds r3, #48 ; 0x30
8010dee: f802 3b01 strb.w r3, [r2], #1
8010df2: e677 b.n 8010ae4 <_vfprintf_r+0x6b4>
8010df4: f10d 027a add.w r2, sp, #122 ; 0x7a
8010df8: e7f8 b.n 8010dec <_vfprintf_r+0x9bc>
8010dfa: b1e3 cbz r3, 8010e36 <_vfprintf_r+0xa06>
8010dfc: 9b0e ldr r3, [sp, #56] ; 0x38
8010dfe: 9a04 ldr r2, [sp, #16]
8010e00: 3301 adds r3, #1
8010e02: e7e3 b.n 8010dcc <_vfprintf_r+0x99c>
8010e04: 9b05 ldr r3, [sp, #20]
8010e06: 42ab cmp r3, r5
8010e08: dc07 bgt.n 8010e1a <_vfprintf_r+0x9ea>
8010e0a: f01b 0f01 tst.w fp, #1
8010e0e: d02d beq.n 8010e6c <_vfprintf_r+0xa3c>
8010e10: 9b0e ldr r3, [sp, #56] ; 0x38
8010e12: 18eb adds r3, r5, r3
8010e14: 9304 str r3, [sp, #16]
8010e16: 2367 movs r3, #103 ; 0x67
8010e18: e7db b.n 8010dd2 <_vfprintf_r+0x9a2>
8010e1a: 9b05 ldr r3, [sp, #20]
8010e1c: 9a0e ldr r2, [sp, #56] ; 0x38
8010e1e: 2d00 cmp r5, #0
8010e20: 4413 add r3, r2
8010e22: 9304 str r3, [sp, #16]
8010e24: dcf7 bgt.n 8010e16 <_vfprintf_r+0x9e6>
8010e26: 9a04 ldr r2, [sp, #16]
8010e28: f1c5 0301 rsb r3, r5, #1
8010e2c: 441a add r2, r3
8010e2e: 9204 str r2, [sp, #16]
8010e30: e7f1 b.n 8010e16 <_vfprintf_r+0x9e6>
8010e32: 9504 str r5, [sp, #16]
8010e34: e7cc b.n 8010dd0 <_vfprintf_r+0x9a0>
8010e36: 2366 movs r3, #102 ; 0x66
8010e38: 9306 str r3, [sp, #24]
8010e3a: 2301 movs r3, #1
8010e3c: 9304 str r3, [sp, #16]
8010e3e: f41b 6380 ands.w r3, fp, #1024 ; 0x400
8010e42: 9309 str r3, [sp, #36] ; 0x24
8010e44: d025 beq.n 8010e92 <_vfprintf_r+0xa62>
8010e46: 2300 movs r3, #0
8010e48: 2d00 cmp r5, #0
8010e4a: e9cd 3308 strd r3, r3, [sp, #32]
8010e4e: f77f ae61 ble.w 8010b14 <_vfprintf_r+0x6e4>
8010e52: 9b0a ldr r3, [sp, #40] ; 0x28
8010e54: 781b ldrb r3, [r3, #0]
8010e56: 2bff cmp r3, #255 ; 0xff
8010e58: d10a bne.n 8010e70 <_vfprintf_r+0xa40>
8010e5a: e9dd 2308 ldrd r2, r3, [sp, #32]
8010e5e: 9912 ldr r1, [sp, #72] ; 0x48
8010e60: 4413 add r3, r2
8010e62: 9a04 ldr r2, [sp, #16]
8010e64: fb01 2303 mla r3, r1, r3, r2
8010e68: 9304 str r3, [sp, #16]
8010e6a: e653 b.n 8010b14 <_vfprintf_r+0x6e4>
8010e6c: 9504 str r5, [sp, #16]
8010e6e: e7d2 b.n 8010e16 <_vfprintf_r+0x9e6>
8010e70: 42ab cmp r3, r5
8010e72: daf2 bge.n 8010e5a <_vfprintf_r+0xa2a>
8010e74: 1aed subs r5, r5, r3
8010e76: 9b0a ldr r3, [sp, #40] ; 0x28
8010e78: 785b ldrb r3, [r3, #1]
8010e7a: b133 cbz r3, 8010e8a <_vfprintf_r+0xa5a>
8010e7c: 9b09 ldr r3, [sp, #36] ; 0x24
8010e7e: 3301 adds r3, #1
8010e80: 9309 str r3, [sp, #36] ; 0x24
8010e82: 9b0a ldr r3, [sp, #40] ; 0x28
8010e84: 3301 adds r3, #1
8010e86: 930a str r3, [sp, #40] ; 0x28
8010e88: e7e3 b.n 8010e52 <_vfprintf_r+0xa22>
8010e8a: 9b08 ldr r3, [sp, #32]
8010e8c: 3301 adds r3, #1
8010e8e: 9308 str r3, [sp, #32]
8010e90: e7df b.n 8010e52 <_vfprintf_r+0xa22>
8010e92: 9b09 ldr r3, [sp, #36] ; 0x24
8010e94: 9308 str r3, [sp, #32]
8010e96: e63d b.n 8010b14 <_vfprintf_r+0x6e4>
8010e98: 1d33 adds r3, r6, #4
8010e9a: f01b 0f20 tst.w fp, #32
8010e9e: 9307 str r3, [sp, #28]
8010ea0: d00a beq.n 8010eb8 <_vfprintf_r+0xa88>
8010ea2: 9a0f ldr r2, [sp, #60] ; 0x3c
8010ea4: 6833 ldr r3, [r6, #0]
8010ea6: 990f ldr r1, [sp, #60] ; 0x3c
8010ea8: 17d2 asrs r2, r2, #31
8010eaa: e9c3 1200 strd r1, r2, [r3]
8010eae: 9e07 ldr r6, [sp, #28]
8010eb0: f8dd 802c ldr.w r8, [sp, #44] ; 0x2c
8010eb4: f7ff bb42 b.w 801053c <_vfprintf_r+0x10c>
8010eb8: f01b 0f10 tst.w fp, #16
8010ebc: d003 beq.n 8010ec6 <_vfprintf_r+0xa96>
8010ebe: 6833 ldr r3, [r6, #0]
8010ec0: 9a0f ldr r2, [sp, #60] ; 0x3c
8010ec2: 601a str r2, [r3, #0]
8010ec4: e7f3 b.n 8010eae <_vfprintf_r+0xa7e>
8010ec6: f01b 0f40 tst.w fp, #64 ; 0x40
8010eca: d003 beq.n 8010ed4 <_vfprintf_r+0xaa4>
8010ecc: 6833 ldr r3, [r6, #0]
8010ece: 9a0f ldr r2, [sp, #60] ; 0x3c
8010ed0: 801a strh r2, [r3, #0]
8010ed2: e7ec b.n 8010eae <_vfprintf_r+0xa7e>
8010ed4: f41b 7f00 tst.w fp, #512 ; 0x200
8010ed8: d0f1 beq.n 8010ebe <_vfprintf_r+0xa8e>
8010eda: 6833 ldr r3, [r6, #0]
8010edc: 9a0f ldr r2, [sp, #60] ; 0x3c
8010ede: 701a strb r2, [r3, #0]
8010ee0: e7e5 b.n 8010eae <_vfprintf_r+0xa7e>
8010ee2: f04b 0b10 orr.w fp, fp, #16
8010ee6: f01b 0320 ands.w r3, fp, #32
8010eea: d01f beq.n 8010f2c <_vfprintf_r+0xafc>
8010eec: 3607 adds r6, #7
8010eee: f026 0307 bic.w r3, r6, #7
8010ef2: 461a mov r2, r3
8010ef4: 685d ldr r5, [r3, #4]
8010ef6: f852 6b08 ldr.w r6, [r2], #8
8010efa: 9207 str r2, [sp, #28]
8010efc: f42b 6b80 bic.w fp, fp, #1024 ; 0x400
8010f00: 2300 movs r3, #0
8010f02: 2200 movs r2, #0
8010f04: f88d 206b strb.w r2, [sp, #107] ; 0x6b
8010f08: 9a04 ldr r2, [sp, #16]
8010f0a: 3201 adds r2, #1
8010f0c: f000 8495 beq.w 801183a <_vfprintf_r+0x140a>
8010f10: ea56 0205 orrs.w r2, r6, r5
8010f14: f02b 0780 bic.w r7, fp, #128 ; 0x80
8010f18: f040 8494 bne.w 8011844 <_vfprintf_r+0x1414>
8010f1c: 9a04 ldr r2, [sp, #16]
8010f1e: 2a00 cmp r2, #0
8010f20: f000 80fa beq.w 8011118 <_vfprintf_r+0xce8>
8010f24: 2b01 cmp r3, #1
8010f26: f040 8490 bne.w 801184a <_vfprintf_r+0x141a>
8010f2a: e09f b.n 801106c <_vfprintf_r+0xc3c>
8010f2c: 4632 mov r2, r6
8010f2e: f01b 0510 ands.w r5, fp, #16
8010f32: f852 6b04 ldr.w r6, [r2], #4
8010f36: 9207 str r2, [sp, #28]
8010f38: d001 beq.n 8010f3e <_vfprintf_r+0xb0e>
8010f3a: 461d mov r5, r3
8010f3c: e7de b.n 8010efc <_vfprintf_r+0xacc>
8010f3e: f01b 0340 ands.w r3, fp, #64 ; 0x40
8010f42: d001 beq.n 8010f48 <_vfprintf_r+0xb18>
8010f44: b2b6 uxth r6, r6
8010f46: e7d9 b.n 8010efc <_vfprintf_r+0xacc>
8010f48: f41b 7500 ands.w r5, fp, #512 ; 0x200
8010f4c: d0d6 beq.n 8010efc <_vfprintf_r+0xacc>
8010f4e: b2f6 uxtb r6, r6
8010f50: e7f3 b.n 8010f3a <_vfprintf_r+0xb0a>
8010f52: 4633 mov r3, r6
8010f54: 2278 movs r2, #120 ; 0x78
8010f56: f853 6b04 ldr.w r6, [r3], #4
8010f5a: 9307 str r3, [sp, #28]
8010f5c: 2330 movs r3, #48 ; 0x30
8010f5e: f88d 306c strb.w r3, [sp, #108] ; 0x6c
8010f62: 4ba4 ldr r3, [pc, #656] ; (80111f4 <_vfprintf_r+0xdc4>)
8010f64: 9316 str r3, [sp, #88] ; 0x58
8010f66: 2500 movs r5, #0
8010f68: f04b 0b02 orr.w fp, fp, #2
8010f6c: f88d 206d strb.w r2, [sp, #109] ; 0x6d
8010f70: 2302 movs r3, #2
8010f72: 9206 str r2, [sp, #24]
8010f74: e7c5 b.n 8010f02 <_vfprintf_r+0xad2>
8010f76: 4633 mov r3, r6
8010f78: 2500 movs r5, #0
8010f7a: f853 8b04 ldr.w r8, [r3], #4
8010f7e: 9307 str r3, [sp, #28]
8010f80: 9b04 ldr r3, [sp, #16]
8010f82: f88d 506b strb.w r5, [sp, #107] ; 0x6b
8010f86: 1c5e adds r6, r3, #1
8010f88: d010 beq.n 8010fac <_vfprintf_r+0xb7c>
8010f8a: 461a mov r2, r3
8010f8c: 4629 mov r1, r5
8010f8e: 4640 mov r0, r8
8010f90: f7ef f936 bl 8000200 <memchr>
8010f94: 9003 str r0, [sp, #12]
8010f96: 2800 cmp r0, #0
8010f98: f000 80d5 beq.w 8011146 <_vfprintf_r+0xd16>
8010f9c: eba0 0308 sub.w r3, r0, r8
8010fa0: e9cd 5303 strd r5, r3, [sp, #12]
8010fa4: e9cd 5508 strd r5, r5, [sp, #32]
8010fa8: 462e mov r6, r5
8010faa: e5bb b.n 8010b24 <_vfprintf_r+0x6f4>
8010fac: 4640 mov r0, r8
8010fae: f7ef f91f bl 80001f0 <strlen>
8010fb2: e9cd 5003 strd r5, r0, [sp, #12]
8010fb6: e455 b.n 8010864 <_vfprintf_r+0x434>
8010fb8: f04b 0b10 orr.w fp, fp, #16
8010fbc: f01b 0320 ands.w r3, fp, #32
8010fc0: d009 beq.n 8010fd6 <_vfprintf_r+0xba6>
8010fc2: 3607 adds r6, #7
8010fc4: f026 0307 bic.w r3, r6, #7
8010fc8: 461a mov r2, r3
8010fca: 685d ldr r5, [r3, #4]
8010fcc: f852 6b08 ldr.w r6, [r2], #8
8010fd0: 9207 str r2, [sp, #28]
8010fd2: 2301 movs r3, #1
8010fd4: e795 b.n 8010f02 <_vfprintf_r+0xad2>
8010fd6: 4632 mov r2, r6
8010fd8: f01b 0510 ands.w r5, fp, #16
8010fdc: f852 6b04 ldr.w r6, [r2], #4
8010fe0: 9207 str r2, [sp, #28]
8010fe2: d001 beq.n 8010fe8 <_vfprintf_r+0xbb8>
8010fe4: 461d mov r5, r3
8010fe6: e7f4 b.n 8010fd2 <_vfprintf_r+0xba2>
8010fe8: f01b 0340 ands.w r3, fp, #64 ; 0x40
8010fec: d001 beq.n 8010ff2 <_vfprintf_r+0xbc2>
8010fee: b2b6 uxth r6, r6
8010ff0: e7ef b.n 8010fd2 <_vfprintf_r+0xba2>
8010ff2: f41b 7500 ands.w r5, fp, #512 ; 0x200
8010ff6: d0ec beq.n 8010fd2 <_vfprintf_r+0xba2>
8010ff8: b2f6 uxtb r6, r6
8010ffa: e7f3 b.n 8010fe4 <_vfprintf_r+0xbb4>
8010ffc: 4b7e ldr r3, [pc, #504] ; (80111f8 <_vfprintf_r+0xdc8>)
8010ffe: 9316 str r3, [sp, #88] ; 0x58
8011000: f01b 0320 ands.w r3, fp, #32
8011004: d01b beq.n 801103e <_vfprintf_r+0xc0e>
8011006: 3607 adds r6, #7
8011008: f026 0307 bic.w r3, r6, #7
801100c: 461a mov r2, r3
801100e: 685d ldr r5, [r3, #4]
8011010: f852 6b08 ldr.w r6, [r2], #8
8011014: 9207 str r2, [sp, #28]
8011016: f01b 0f01 tst.w fp, #1
801101a: d00a beq.n 8011032 <_vfprintf_r+0xc02>
801101c: ea56 0305 orrs.w r3, r6, r5
8011020: d007 beq.n 8011032 <_vfprintf_r+0xc02>
8011022: 2330 movs r3, #48 ; 0x30
8011024: f88d 306c strb.w r3, [sp, #108] ; 0x6c
8011028: 9b06 ldr r3, [sp, #24]
801102a: f88d 306d strb.w r3, [sp, #109] ; 0x6d
801102e: f04b 0b02 orr.w fp, fp, #2
8011032: f42b 6b80 bic.w fp, fp, #1024 ; 0x400
8011036: 2302 movs r3, #2
8011038: e763 b.n 8010f02 <_vfprintf_r+0xad2>
801103a: 4b6e ldr r3, [pc, #440] ; (80111f4 <_vfprintf_r+0xdc4>)
801103c: e7df b.n 8010ffe <_vfprintf_r+0xbce>
801103e: 4632 mov r2, r6
8011040: f01b 0510 ands.w r5, fp, #16
8011044: f852 6b04 ldr.w r6, [r2], #4
8011048: 9207 str r2, [sp, #28]
801104a: d001 beq.n 8011050 <_vfprintf_r+0xc20>
801104c: 461d mov r5, r3
801104e: e7e2 b.n 8011016 <_vfprintf_r+0xbe6>
8011050: f01b 0340 ands.w r3, fp, #64 ; 0x40
8011054: d001 beq.n 801105a <_vfprintf_r+0xc2a>
8011056: b2b6 uxth r6, r6
8011058: e7dd b.n 8011016 <_vfprintf_r+0xbe6>
801105a: f41b 7500 ands.w r5, fp, #512 ; 0x200
801105e: d0da beq.n 8011016 <_vfprintf_r+0xbe6>
8011060: b2f6 uxtb r6, r6
8011062: e7f3 b.n 801104c <_vfprintf_r+0xc1c>
8011064: 2e0a cmp r6, #10
8011066: f175 0300 sbcs.w r3, r5, #0
801106a: d206 bcs.n 801107a <_vfprintf_r+0xc4a>
801106c: 3630 adds r6, #48 ; 0x30
801106e: f88d 6137 strb.w r6, [sp, #311] ; 0x137
8011072: f20d 1837 addw r8, sp, #311 ; 0x137
8011076: f000 bc03 b.w 8011880 <_vfprintf_r+0x1450>
801107a: 2300 movs r3, #0
801107c: 9305 str r3, [sp, #20]
801107e: f407 6380 and.w r3, r7, #1024 ; 0x400
8011082: f50d 7b9c add.w fp, sp, #312 ; 0x138
8011086: 9303 str r3, [sp, #12]
8011088: 220a movs r2, #10
801108a: 2300 movs r3, #0
801108c: 4630 mov r0, r6
801108e: 4629 mov r1, r5
8011090: f7ef fd9a bl 8000bc8 <__aeabi_uldivmod>
8011094: 9b05 ldr r3, [sp, #20]
8011096: 3301 adds r3, #1
8011098: 9305 str r3, [sp, #20]
801109a: 9b03 ldr r3, [sp, #12]
801109c: 3230 adds r2, #48 ; 0x30
801109e: f10b 38ff add.w r8, fp, #4294967295
80110a2: f80b 2c01 strb.w r2, [fp, #-1]
80110a6: b1d3 cbz r3, 80110de <_vfprintf_r+0xcae>
80110a8: 9b0a ldr r3, [sp, #40] ; 0x28
80110aa: 9a05 ldr r2, [sp, #20]
80110ac: 781b ldrb r3, [r3, #0]
80110ae: 429a cmp r2, r3
80110b0: d115 bne.n 80110de <_vfprintf_r+0xcae>
80110b2: 2aff cmp r2, #255 ; 0xff
80110b4: d013 beq.n 80110de <_vfprintf_r+0xcae>
80110b6: 2e0a cmp r6, #10
80110b8: f175 0300 sbcs.w r3, r5, #0
80110bc: d30f bcc.n 80110de <_vfprintf_r+0xcae>
80110be: 9b12 ldr r3, [sp, #72] ; 0x48
80110c0: 9914 ldr r1, [sp, #80] ; 0x50
80110c2: eba8 0803 sub.w r8, r8, r3
80110c6: 461a mov r2, r3
80110c8: 4640 mov r0, r8
80110ca: f002 fbe4 bl 8013896 <strncpy>
80110ce: 9b0a ldr r3, [sp, #40] ; 0x28
80110d0: 785b ldrb r3, [r3, #1]
80110d2: b11b cbz r3, 80110dc <_vfprintf_r+0xcac>
80110d4: 9b0a ldr r3, [sp, #40] ; 0x28
80110d6: 3301 adds r3, #1
80110d8: 930a str r3, [sp, #40] ; 0x28
80110da: 2300 movs r3, #0
80110dc: 9305 str r3, [sp, #20]
80110de: 2300 movs r3, #0
80110e0: 220a movs r2, #10
80110e2: 4630 mov r0, r6
80110e4: 4629 mov r1, r5
80110e6: f7ef fd6f bl 8000bc8 <__aeabi_uldivmod>
80110ea: 2e0a cmp r6, #10
80110ec: f175 0300 sbcs.w r3, r5, #0
80110f0: f0c0 83c6 bcc.w 8011880 <_vfprintf_r+0x1450>
80110f4: 4606 mov r6, r0
80110f6: 460d mov r5, r1
80110f8: 46c3 mov fp, r8
80110fa: e7c5 b.n 8011088 <_vfprintf_r+0xc58>
80110fc: f006 030f and.w r3, r6, #15
8011100: 9a16 ldr r2, [sp, #88] ; 0x58
8011102: 0936 lsrs r6, r6, #4
8011104: 5cd3 ldrb r3, [r2, r3]
8011106: f808 3d01 strb.w r3, [r8, #-1]!
801110a: ea46 7605 orr.w r6, r6, r5, lsl #28
801110e: 092d lsrs r5, r5, #4
8011110: ea56 0305 orrs.w r3, r6, r5
8011114: d1f2 bne.n 80110fc <_vfprintf_r+0xccc>
8011116: e3b3 b.n 8011880 <_vfprintf_r+0x1450>
8011118: b933 cbnz r3, 8011128 <_vfprintf_r+0xcf8>
801111a: f01b 0f01 tst.w fp, #1
801111e: d003 beq.n 8011128 <_vfprintf_r+0xcf8>
8011120: 2330 movs r3, #48 ; 0x30
8011122: f88d 3137 strb.w r3, [sp, #311] ; 0x137
8011126: e7a4 b.n 8011072 <_vfprintf_r+0xc42>
8011128: f50d 789c add.w r8, sp, #312 ; 0x138
801112c: e3a8 b.n 8011880 <_vfprintf_r+0x1450>
801112e: 9b06 ldr r3, [sp, #24]
8011130: 2b00 cmp r3, #0
8011132: f000 8373 beq.w 801181c <_vfprintf_r+0x13ec>
8011136: 2000 movs r0, #0
8011138: f88d 30d4 strb.w r3, [sp, #212] ; 0xd4
801113c: f88d 006b strb.w r0, [sp, #107] ; 0x6b
8011140: 9607 str r6, [sp, #28]
8011142: f7ff bb1e b.w 8010782 <_vfprintf_r+0x352>
8011146: 9e03 ldr r6, [sp, #12]
8011148: f7ff bb8d b.w 8010866 <_vfprintf_r+0x436>
801114c: 2010 movs r0, #16
801114e: 4402 add r2, r0
8011150: 2b07 cmp r3, #7
8011152: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
8011156: 6060 str r0, [r4, #4]
8011158: dd08 ble.n 801116c <_vfprintf_r+0xd3c>
801115a: aa22 add r2, sp, #136 ; 0x88
801115c: 4649 mov r1, r9
801115e: 4650 mov r0, sl
8011160: f002 fbb9 bl 80138d6 <__sprint_r>
8011164: 2800 cmp r0, #0
8011166: f040 8337 bne.w 80117d8 <_vfprintf_r+0x13a8>
801116a: a925 add r1, sp, #148 ; 0x94
801116c: 3f10 subs r7, #16
801116e: 460c mov r4, r1
8011170: e4f3 b.n 8010b5a <_vfprintf_r+0x72a>
8011172: 460c mov r4, r1
8011174: e50c b.n 8010b90 <_vfprintf_r+0x760>
8011176: aa22 add r2, sp, #136 ; 0x88
8011178: 4649 mov r1, r9
801117a: 4650 mov r0, sl
801117c: f002 fbab bl 80138d6 <__sprint_r>
8011180: 2800 cmp r0, #0
8011182: f040 8329 bne.w 80117d8 <_vfprintf_r+0x13a8>
8011186: ac25 add r4, sp, #148 ; 0x94
8011188: e514 b.n 8010bb4 <_vfprintf_r+0x784>
801118a: aa22 add r2, sp, #136 ; 0x88
801118c: 4649 mov r1, r9
801118e: 4650 mov r0, sl
8011190: f002 fba1 bl 80138d6 <__sprint_r>
8011194: 2800 cmp r0, #0
8011196: f040 831f bne.w 80117d8 <_vfprintf_r+0x13a8>
801119a: ac25 add r4, sp, #148 ; 0x94
801119c: e51a b.n 8010bd4 <_vfprintf_r+0x7a4>
801119e: 2010 movs r0, #16
80111a0: 4402 add r2, r0
80111a2: 2b07 cmp r3, #7
80111a4: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
80111a8: 6060 str r0, [r4, #4]
80111aa: dd08 ble.n 80111be <_vfprintf_r+0xd8e>
80111ac: aa22 add r2, sp, #136 ; 0x88
80111ae: 4649 mov r1, r9
80111b0: 4650 mov r0, sl
80111b2: f002 fb90 bl 80138d6 <__sprint_r>
80111b6: 2800 cmp r0, #0
80111b8: f040 830e bne.w 80117d8 <_vfprintf_r+0x13a8>
80111bc: a925 add r1, sp, #148 ; 0x94
80111be: 3f10 subs r7, #16
80111c0: 460c mov r4, r1
80111c2: e50f b.n 8010be4 <_vfprintf_r+0x7b4>
80111c4: 460c mov r4, r1
80111c6: e528 b.n 8010c1a <_vfprintf_r+0x7ea>
80111c8: 2010 movs r0, #16
80111ca: 4402 add r2, r0
80111cc: 2b07 cmp r3, #7
80111ce: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
80111d2: 6060 str r0, [r4, #4]
80111d4: dd08 ble.n 80111e8 <_vfprintf_r+0xdb8>
80111d6: aa22 add r2, sp, #136 ; 0x88
80111d8: 4649 mov r1, r9
80111da: 4650 mov r0, sl
80111dc: f002 fb7b bl 80138d6 <__sprint_r>
80111e0: 2800 cmp r0, #0
80111e2: f040 82f9 bne.w 80117d8 <_vfprintf_r+0x13a8>
80111e6: a925 add r1, sp, #148 ; 0x94
80111e8: 3e10 subs r6, #16
80111ea: 460c mov r4, r1
80111ec: e528 b.n 8010c40 <_vfprintf_r+0x810>
80111ee: 460c mov r4, r1
80111f0: e540 b.n 8010c74 <_vfprintf_r+0x844>
80111f2: bf00 nop
80111f4: 08017f08 .word 0x08017f08
80111f8: 08017f19 .word 0x08017f19
80111fc: 9b06 ldr r3, [sp, #24]
80111fe: 2b65 cmp r3, #101 ; 0x65
8011200: f340 8232 ble.w 8011668 <_vfprintf_r+0x1238>
8011204: e9dd 010c ldrd r0, r1, [sp, #48] ; 0x30
8011208: 2200 movs r2, #0
801120a: 2300 movs r3, #0
801120c: f7ef fc6c bl 8000ae8 <__aeabi_dcmpeq>
8011210: 2800 cmp r0, #0
8011212: d068 beq.n 80112e6 <_vfprintf_r+0xeb6>
8011214: 4b6d ldr r3, [pc, #436] ; (80113cc <_vfprintf_r+0xf9c>)
8011216: 6023 str r3, [r4, #0]
8011218: 2301 movs r3, #1
801121a: 441e add r6, r3
801121c: 6063 str r3, [r4, #4]
801121e: 9b23 ldr r3, [sp, #140] ; 0x8c
8011220: 9624 str r6, [sp, #144] ; 0x90
8011222: 3301 adds r3, #1
8011224: 2b07 cmp r3, #7
8011226: 9323 str r3, [sp, #140] ; 0x8c
8011228: dc37 bgt.n 801129a <_vfprintf_r+0xe6a>
801122a: 3408 adds r4, #8
801122c: 9b1c ldr r3, [sp, #112] ; 0x70
801122e: 9a05 ldr r2, [sp, #20]
8011230: 4293 cmp r3, r2
8011232: db03 blt.n 801123c <_vfprintf_r+0xe0c>
8011234: f01b 0f01 tst.w fp, #1
8011238: f43f ad2e beq.w 8010c98 <_vfprintf_r+0x868>
801123c: 9b13 ldr r3, [sp, #76] ; 0x4c
801123e: 6023 str r3, [r4, #0]
8011240: 9b0e ldr r3, [sp, #56] ; 0x38
8011242: 9a0e ldr r2, [sp, #56] ; 0x38
8011244: 6063 str r3, [r4, #4]
8011246: 9b24 ldr r3, [sp, #144] ; 0x90
8011248: 4413 add r3, r2
801124a: 9324 str r3, [sp, #144] ; 0x90
801124c: 9b23 ldr r3, [sp, #140] ; 0x8c
801124e: 3301 adds r3, #1
8011250: 2b07 cmp r3, #7
8011252: 9323 str r3, [sp, #140] ; 0x8c
8011254: dc2b bgt.n 80112ae <_vfprintf_r+0xe7e>
8011256: 3408 adds r4, #8
8011258: 9b05 ldr r3, [sp, #20]
801125a: 1e5d subs r5, r3, #1
801125c: 2d00 cmp r5, #0
801125e: f77f ad1b ble.w 8010c98 <_vfprintf_r+0x868>
8011262: 4e5b ldr r6, [pc, #364] ; (80113d0 <_vfprintf_r+0xfa0>)
8011264: 2710 movs r7, #16
8011266: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
801126a: 2d10 cmp r5, #16
801126c: f103 0301 add.w r3, r3, #1
8011270: f104 0108 add.w r1, r4, #8
8011274: 6026 str r6, [r4, #0]
8011276: dc24 bgt.n 80112c2 <_vfprintf_r+0xe92>
8011278: 442a add r2, r5
801127a: 6065 str r5, [r4, #4]
801127c: 9224 str r2, [sp, #144] ; 0x90
801127e: 2b07 cmp r3, #7
8011280: 9323 str r3, [sp, #140] ; 0x8c
8011282: f340 8288 ble.w 8011796 <_vfprintf_r+0x1366>
8011286: aa22 add r2, sp, #136 ; 0x88
8011288: 4649 mov r1, r9
801128a: 4650 mov r0, sl
801128c: f002 fb23 bl 80138d6 <__sprint_r>
8011290: 2800 cmp r0, #0
8011292: f040 82a1 bne.w 80117d8 <_vfprintf_r+0x13a8>
8011296: ac25 add r4, sp, #148 ; 0x94
8011298: e4fe b.n 8010c98 <_vfprintf_r+0x868>
801129a: aa22 add r2, sp, #136 ; 0x88
801129c: 4649 mov r1, r9
801129e: 4650 mov r0, sl
80112a0: f002 fb19 bl 80138d6 <__sprint_r>
80112a4: 2800 cmp r0, #0
80112a6: f040 8297 bne.w 80117d8 <_vfprintf_r+0x13a8>
80112aa: ac25 add r4, sp, #148 ; 0x94
80112ac: e7be b.n 801122c <_vfprintf_r+0xdfc>
80112ae: aa22 add r2, sp, #136 ; 0x88
80112b0: 4649 mov r1, r9
80112b2: 4650 mov r0, sl
80112b4: f002 fb0f bl 80138d6 <__sprint_r>
80112b8: 2800 cmp r0, #0
80112ba: f040 828d bne.w 80117d8 <_vfprintf_r+0x13a8>
80112be: ac25 add r4, sp, #148 ; 0x94
80112c0: e7ca b.n 8011258 <_vfprintf_r+0xe28>
80112c2: 3210 adds r2, #16
80112c4: 2b07 cmp r3, #7
80112c6: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
80112ca: 6067 str r7, [r4, #4]
80112cc: dd08 ble.n 80112e0 <_vfprintf_r+0xeb0>
80112ce: aa22 add r2, sp, #136 ; 0x88
80112d0: 4649 mov r1, r9
80112d2: 4650 mov r0, sl
80112d4: f002 faff bl 80138d6 <__sprint_r>
80112d8: 2800 cmp r0, #0
80112da: f040 827d bne.w 80117d8 <_vfprintf_r+0x13a8>
80112de: a925 add r1, sp, #148 ; 0x94
80112e0: 3d10 subs r5, #16
80112e2: 460c mov r4, r1
80112e4: e7bf b.n 8011266 <_vfprintf_r+0xe36>
80112e6: 9b1c ldr r3, [sp, #112] ; 0x70
80112e8: 2b00 cmp r3, #0
80112ea: dc73 bgt.n 80113d4 <_vfprintf_r+0xfa4>
80112ec: 4b37 ldr r3, [pc, #220] ; (80113cc <_vfprintf_r+0xf9c>)
80112ee: 6023 str r3, [r4, #0]
80112f0: 2301 movs r3, #1
80112f2: 441e add r6, r3
80112f4: 6063 str r3, [r4, #4]
80112f6: 9b23 ldr r3, [sp, #140] ; 0x8c
80112f8: 9624 str r6, [sp, #144] ; 0x90
80112fa: 3301 adds r3, #1
80112fc: 2b07 cmp r3, #7
80112fe: 9323 str r3, [sp, #140] ; 0x8c
8011300: dc3d bgt.n 801137e <_vfprintf_r+0xf4e>
8011302: 3408 adds r4, #8
8011304: 9905 ldr r1, [sp, #20]
8011306: 9a1c ldr r2, [sp, #112] ; 0x70
8011308: 9b24 ldr r3, [sp, #144] ; 0x90
801130a: 430a orrs r2, r1
801130c: f00b 0101 and.w r1, fp, #1
8011310: 430a orrs r2, r1
8011312: f43f acc1 beq.w 8010c98 <_vfprintf_r+0x868>
8011316: 9a13 ldr r2, [sp, #76] ; 0x4c
8011318: 6022 str r2, [r4, #0]
801131a: 9a0e ldr r2, [sp, #56] ; 0x38
801131c: 6062 str r2, [r4, #4]
801131e: 4413 add r3, r2
8011320: 9324 str r3, [sp, #144] ; 0x90
8011322: 9b23 ldr r3, [sp, #140] ; 0x8c
8011324: 3301 adds r3, #1
8011326: 2b07 cmp r3, #7
8011328: 9323 str r3, [sp, #140] ; 0x8c
801132a: dc32 bgt.n 8011392 <_vfprintf_r+0xf62>
801132c: 3408 adds r4, #8
801132e: 9d1c ldr r5, [sp, #112] ; 0x70
8011330: 2d00 cmp r5, #0
8011332: da1b bge.n 801136c <_vfprintf_r+0xf3c>
8011334: 4e26 ldr r6, [pc, #152] ; (80113d0 <_vfprintf_r+0xfa0>)
8011336: 426d negs r5, r5
8011338: 4623 mov r3, r4
801133a: 2710 movs r7, #16
801133c: e9dd 2123 ldrd r2, r1, [sp, #140] ; 0x8c
8011340: 2d10 cmp r5, #16
8011342: f102 0201 add.w r2, r2, #1
8011346: f104 0408 add.w r4, r4, #8
801134a: 601e str r6, [r3, #0]
801134c: dc2b bgt.n 80113a6 <_vfprintf_r+0xf76>
801134e: 605d str r5, [r3, #4]
8011350: 2a07 cmp r2, #7
8011352: 440d add r5, r1
8011354: e9cd 2523 strd r2, r5, [sp, #140] ; 0x8c
8011358: dd08 ble.n 801136c <_vfprintf_r+0xf3c>
801135a: aa22 add r2, sp, #136 ; 0x88
801135c: 4649 mov r1, r9
801135e: 4650 mov r0, sl
8011360: f002 fab9 bl 80138d6 <__sprint_r>
8011364: 2800 cmp r0, #0
8011366: f040 8237 bne.w 80117d8 <_vfprintf_r+0x13a8>
801136a: ac25 add r4, sp, #148 ; 0x94
801136c: 9b05 ldr r3, [sp, #20]
801136e: 9a05 ldr r2, [sp, #20]
8011370: 6063 str r3, [r4, #4]
8011372: 9b24 ldr r3, [sp, #144] ; 0x90
8011374: f8c4 8000 str.w r8, [r4]
8011378: 4413 add r3, r2
801137a: 9324 str r3, [sp, #144] ; 0x90
801137c: e485 b.n 8010c8a <_vfprintf_r+0x85a>
801137e: aa22 add r2, sp, #136 ; 0x88
8011380: 4649 mov r1, r9
8011382: 4650 mov r0, sl
8011384: f002 faa7 bl 80138d6 <__sprint_r>
8011388: 2800 cmp r0, #0
801138a: f040 8225 bne.w 80117d8 <_vfprintf_r+0x13a8>
801138e: ac25 add r4, sp, #148 ; 0x94
8011390: e7b8 b.n 8011304 <_vfprintf_r+0xed4>
8011392: aa22 add r2, sp, #136 ; 0x88
8011394: 4649 mov r1, r9
8011396: 4650 mov r0, sl
8011398: f002 fa9d bl 80138d6 <__sprint_r>
801139c: 2800 cmp r0, #0
801139e: f040 821b bne.w 80117d8 <_vfprintf_r+0x13a8>
80113a2: ac25 add r4, sp, #148 ; 0x94
80113a4: e7c3 b.n 801132e <_vfprintf_r+0xefe>
80113a6: 3110 adds r1, #16
80113a8: 2a07 cmp r2, #7
80113aa: e9cd 2123 strd r2, r1, [sp, #140] ; 0x8c
80113ae: 605f str r7, [r3, #4]
80113b0: dd08 ble.n 80113c4 <_vfprintf_r+0xf94>
80113b2: aa22 add r2, sp, #136 ; 0x88
80113b4: 4649 mov r1, r9
80113b6: 4650 mov r0, sl
80113b8: f002 fa8d bl 80138d6 <__sprint_r>
80113bc: 2800 cmp r0, #0
80113be: f040 820b bne.w 80117d8 <_vfprintf_r+0x13a8>
80113c2: ac25 add r4, sp, #148 ; 0x94
80113c4: 3d10 subs r5, #16
80113c6: 4623 mov r3, r4
80113c8: e7b8 b.n 801133c <_vfprintf_r+0xf0c>
80113ca: bf00 nop
80113cc: 08017f2a .word 0x08017f2a
80113d0: 08017f3c .word 0x08017f3c
80113d4: 9f05 ldr r7, [sp, #20]
80113d6: 42af cmp r7, r5
80113d8: bfa8 it ge
80113da: 462f movge r7, r5
80113dc: 2f00 cmp r7, #0
80113de: dd09 ble.n 80113f4 <_vfprintf_r+0xfc4>
80113e0: 9b23 ldr r3, [sp, #140] ; 0x8c
80113e2: 3301 adds r3, #1
80113e4: 443e add r6, r7
80113e6: 2b07 cmp r3, #7
80113e8: e9c4 8700 strd r8, r7, [r4]
80113ec: 9624 str r6, [sp, #144] ; 0x90
80113ee: 9323 str r3, [sp, #140] ; 0x8c
80113f0: dc75 bgt.n 80114de <_vfprintf_r+0x10ae>
80113f2: 3408 adds r4, #8
80113f4: 2f00 cmp r7, #0
80113f6: bfac ite ge
80113f8: 1bee subge r6, r5, r7
80113fa: 462e movlt r6, r5
80113fc: 2e00 cmp r6, #0
80113fe: dd18 ble.n 8011432 <_vfprintf_r+0x1002>
8011400: 4f98 ldr r7, [pc, #608] ; (8011664 <_vfprintf_r+0x1234>)
8011402: 6027 str r7, [r4, #0]
8011404: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
8011408: 2e10 cmp r6, #16
801140a: f103 0301 add.w r3, r3, #1
801140e: f104 0108 add.w r1, r4, #8
8011412: dc6e bgt.n 80114f2 <_vfprintf_r+0x10c2>
8011414: 6066 str r6, [r4, #4]
8011416: 2b07 cmp r3, #7
8011418: 4416 add r6, r2
801141a: e9cd 3623 strd r3, r6, [sp, #140] ; 0x8c
801141e: dd7b ble.n 8011518 <_vfprintf_r+0x10e8>
8011420: aa22 add r2, sp, #136 ; 0x88
8011422: 4649 mov r1, r9
8011424: 4650 mov r0, sl
8011426: f002 fa56 bl 80138d6 <__sprint_r>
801142a: 2800 cmp r0, #0
801142c: f040 81d4 bne.w 80117d8 <_vfprintf_r+0x13a8>
8011430: ac25 add r4, sp, #148 ; 0x94
8011432: f41b 6f80 tst.w fp, #1024 ; 0x400
8011436: 4445 add r5, r8
8011438: d00a beq.n 8011450 <_vfprintf_r+0x1020>
801143a: 9b09 ldr r3, [sp, #36] ; 0x24
801143c: 2b00 cmp r3, #0
801143e: d16d bne.n 801151c <_vfprintf_r+0x10ec>
8011440: 9b08 ldr r3, [sp, #32]
8011442: 2b00 cmp r3, #0
8011444: d16d bne.n 8011522 <_vfprintf_r+0x10f2>
8011446: 9b05 ldr r3, [sp, #20]
8011448: 4443 add r3, r8
801144a: 429d cmp r5, r3
801144c: bf28 it cs
801144e: 461d movcs r5, r3
8011450: 9b1c ldr r3, [sp, #112] ; 0x70
8011452: 9a05 ldr r2, [sp, #20]
8011454: 4293 cmp r3, r2
8011456: db02 blt.n 801145e <_vfprintf_r+0x102e>
8011458: f01b 0f01 tst.w fp, #1
801145c: d00e beq.n 801147c <_vfprintf_r+0x104c>
801145e: 9b13 ldr r3, [sp, #76] ; 0x4c
8011460: 6023 str r3, [r4, #0]
8011462: 9b0e ldr r3, [sp, #56] ; 0x38
8011464: 9a0e ldr r2, [sp, #56] ; 0x38
8011466: 6063 str r3, [r4, #4]
8011468: 9b24 ldr r3, [sp, #144] ; 0x90
801146a: 4413 add r3, r2
801146c: 9324 str r3, [sp, #144] ; 0x90
801146e: 9b23 ldr r3, [sp, #140] ; 0x8c
8011470: 3301 adds r3, #1
8011472: 2b07 cmp r3, #7
8011474: 9323 str r3, [sp, #140] ; 0x8c
8011476: f300 80cf bgt.w 8011618 <_vfprintf_r+0x11e8>
801147a: 3408 adds r4, #8
801147c: 9b05 ldr r3, [sp, #20]
801147e: 9e1c ldr r6, [sp, #112] ; 0x70
8011480: eb08 0203 add.w r2, r8, r3
8011484: 1b9e subs r6, r3, r6
8011486: 1b52 subs r2, r2, r5
8011488: 4296 cmp r6, r2
801148a: bfa8 it ge
801148c: 4616 movge r6, r2
801148e: 2e00 cmp r6, #0
8011490: dd0b ble.n 80114aa <_vfprintf_r+0x107a>
8011492: 9b24 ldr r3, [sp, #144] ; 0x90
8011494: 4433 add r3, r6
8011496: 9324 str r3, [sp, #144] ; 0x90
8011498: 9b23 ldr r3, [sp, #140] ; 0x8c
801149a: 3301 adds r3, #1
801149c: 2b07 cmp r3, #7
801149e: e9c4 5600 strd r5, r6, [r4]
80114a2: 9323 str r3, [sp, #140] ; 0x8c
80114a4: f300 80c2 bgt.w 801162c <_vfprintf_r+0x11fc>
80114a8: 3408 adds r4, #8
80114aa: 9d1c ldr r5, [sp, #112] ; 0x70
80114ac: 9b05 ldr r3, [sp, #20]
80114ae: 2e00 cmp r6, #0
80114b0: eba3 0505 sub.w r5, r3, r5
80114b4: bfa8 it ge
80114b6: 1bad subge r5, r5, r6
80114b8: 2d00 cmp r5, #0
80114ba: f77f abed ble.w 8010c98 <_vfprintf_r+0x868>
80114be: 4e69 ldr r6, [pc, #420] ; (8011664 <_vfprintf_r+0x1234>)
80114c0: 2710 movs r7, #16
80114c2: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
80114c6: 2d10 cmp r5, #16
80114c8: f103 0301 add.w r3, r3, #1
80114cc: f104 0108 add.w r1, r4, #8
80114d0: 6026 str r6, [r4, #0]
80114d2: f300 80b5 bgt.w 8011640 <_vfprintf_r+0x1210>
80114d6: 6065 str r5, [r4, #4]
80114d8: 4415 add r5, r2
80114da: 9524 str r5, [sp, #144] ; 0x90
80114dc: e6cf b.n 801127e <_vfprintf_r+0xe4e>
80114de: aa22 add r2, sp, #136 ; 0x88
80114e0: 4649 mov r1, r9
80114e2: 4650 mov r0, sl
80114e4: f002 f9f7 bl 80138d6 <__sprint_r>
80114e8: 2800 cmp r0, #0
80114ea: f040 8175 bne.w 80117d8 <_vfprintf_r+0x13a8>
80114ee: ac25 add r4, sp, #148 ; 0x94
80114f0: e780 b.n 80113f4 <_vfprintf_r+0xfc4>
80114f2: 2010 movs r0, #16
80114f4: 4402 add r2, r0
80114f6: 2b07 cmp r3, #7
80114f8: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
80114fc: 6060 str r0, [r4, #4]
80114fe: dd08 ble.n 8011512 <_vfprintf_r+0x10e2>
8011500: aa22 add r2, sp, #136 ; 0x88
8011502: 4649 mov r1, r9
8011504: 4650 mov r0, sl
8011506: f002 f9e6 bl 80138d6 <__sprint_r>
801150a: 2800 cmp r0, #0
801150c: f040 8164 bne.w 80117d8 <_vfprintf_r+0x13a8>
8011510: a925 add r1, sp, #148 ; 0x94
8011512: 3e10 subs r6, #16
8011514: 460c mov r4, r1
8011516: e774 b.n 8011402 <_vfprintf_r+0xfd2>
8011518: 460c mov r4, r1
801151a: e78a b.n 8011432 <_vfprintf_r+0x1002>
801151c: 9b08 ldr r3, [sp, #32]
801151e: 2b00 cmp r3, #0
8011520: d04a beq.n 80115b8 <_vfprintf_r+0x1188>
8011522: 9b08 ldr r3, [sp, #32]
8011524: 3b01 subs r3, #1
8011526: 9308 str r3, [sp, #32]
8011528: 9b14 ldr r3, [sp, #80] ; 0x50
801152a: 6023 str r3, [r4, #0]
801152c: 9b12 ldr r3, [sp, #72] ; 0x48
801152e: 9a12 ldr r2, [sp, #72] ; 0x48
8011530: 6063 str r3, [r4, #4]
8011532: 9b24 ldr r3, [sp, #144] ; 0x90
8011534: 4413 add r3, r2
8011536: 9324 str r3, [sp, #144] ; 0x90
8011538: 9b23 ldr r3, [sp, #140] ; 0x8c
801153a: 3301 adds r3, #1
801153c: 2b07 cmp r3, #7
801153e: 9323 str r3, [sp, #140] ; 0x8c
8011540: dc41 bgt.n 80115c6 <_vfprintf_r+0x1196>
8011542: 3408 adds r4, #8
8011544: 9b05 ldr r3, [sp, #20]
8011546: 9a0a ldr r2, [sp, #40] ; 0x28
8011548: eb08 0703 add.w r7, r8, r3
801154c: 1b7b subs r3, r7, r5
801154e: 7817 ldrb r7, [r2, #0]
8011550: 429f cmp r7, r3
8011552: bfa8 it ge
8011554: 461f movge r7, r3
8011556: 2f00 cmp r7, #0
8011558: dd0a ble.n 8011570 <_vfprintf_r+0x1140>
801155a: 9b24 ldr r3, [sp, #144] ; 0x90
801155c: 443b add r3, r7
801155e: 9324 str r3, [sp, #144] ; 0x90
8011560: 9b23 ldr r3, [sp, #140] ; 0x8c
8011562: 3301 adds r3, #1
8011564: 2b07 cmp r3, #7
8011566: e9c4 5700 strd r5, r7, [r4]
801156a: 9323 str r3, [sp, #140] ; 0x8c
801156c: dc35 bgt.n 80115da <_vfprintf_r+0x11aa>
801156e: 3408 adds r4, #8
8011570: 9b0a ldr r3, [sp, #40] ; 0x28
8011572: 781e ldrb r6, [r3, #0]
8011574: 2f00 cmp r7, #0
8011576: bfa8 it ge
8011578: 1bf6 subge r6, r6, r7
801157a: 2e00 cmp r6, #0
801157c: dd18 ble.n 80115b0 <_vfprintf_r+0x1180>
801157e: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
8011582: 4838 ldr r0, [pc, #224] ; (8011664 <_vfprintf_r+0x1234>)
8011584: 6020 str r0, [r4, #0]
8011586: 2e10 cmp r6, #16
8011588: f103 0301 add.w r3, r3, #1
801158c: f104 0108 add.w r1, r4, #8
8011590: dc2d bgt.n 80115ee <_vfprintf_r+0x11be>
8011592: 6066 str r6, [r4, #4]
8011594: 2b07 cmp r3, #7
8011596: 4416 add r6, r2
8011598: e9cd 3623 strd r3, r6, [sp, #140] ; 0x8c
801159c: dd3a ble.n 8011614 <_vfprintf_r+0x11e4>
801159e: aa22 add r2, sp, #136 ; 0x88
80115a0: 4649 mov r1, r9
80115a2: 4650 mov r0, sl
80115a4: f002 f997 bl 80138d6 <__sprint_r>
80115a8: 2800 cmp r0, #0
80115aa: f040 8115 bne.w 80117d8 <_vfprintf_r+0x13a8>
80115ae: ac25 add r4, sp, #148 ; 0x94
80115b0: 9b0a ldr r3, [sp, #40] ; 0x28
80115b2: 781b ldrb r3, [r3, #0]
80115b4: 441d add r5, r3
80115b6: e740 b.n 801143a <_vfprintf_r+0x100a>
80115b8: 9b0a ldr r3, [sp, #40] ; 0x28
80115ba: 3b01 subs r3, #1
80115bc: 930a str r3, [sp, #40] ; 0x28
80115be: 9b09 ldr r3, [sp, #36] ; 0x24
80115c0: 3b01 subs r3, #1
80115c2: 9309 str r3, [sp, #36] ; 0x24
80115c4: e7b0 b.n 8011528 <_vfprintf_r+0x10f8>
80115c6: aa22 add r2, sp, #136 ; 0x88
80115c8: 4649 mov r1, r9
80115ca: 4650 mov r0, sl
80115cc: f002 f983 bl 80138d6 <__sprint_r>
80115d0: 2800 cmp r0, #0
80115d2: f040 8101 bne.w 80117d8 <_vfprintf_r+0x13a8>
80115d6: ac25 add r4, sp, #148 ; 0x94
80115d8: e7b4 b.n 8011544 <_vfprintf_r+0x1114>
80115da: aa22 add r2, sp, #136 ; 0x88
80115dc: 4649 mov r1, r9
80115de: 4650 mov r0, sl
80115e0: f002 f979 bl 80138d6 <__sprint_r>
80115e4: 2800 cmp r0, #0
80115e6: f040 80f7 bne.w 80117d8 <_vfprintf_r+0x13a8>
80115ea: ac25 add r4, sp, #148 ; 0x94
80115ec: e7c0 b.n 8011570 <_vfprintf_r+0x1140>
80115ee: 2010 movs r0, #16
80115f0: 4402 add r2, r0
80115f2: 2b07 cmp r3, #7
80115f4: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
80115f8: 6060 str r0, [r4, #4]
80115fa: dd08 ble.n 801160e <_vfprintf_r+0x11de>
80115fc: aa22 add r2, sp, #136 ; 0x88
80115fe: 4649 mov r1, r9
8011600: 4650 mov r0, sl
8011602: f002 f968 bl 80138d6 <__sprint_r>
8011606: 2800 cmp r0, #0
8011608: f040 80e6 bne.w 80117d8 <_vfprintf_r+0x13a8>
801160c: a925 add r1, sp, #148 ; 0x94
801160e: 3e10 subs r6, #16
8011610: 460c mov r4, r1
8011612: e7b4 b.n 801157e <_vfprintf_r+0x114e>
8011614: 460c mov r4, r1
8011616: e7cb b.n 80115b0 <_vfprintf_r+0x1180>
8011618: aa22 add r2, sp, #136 ; 0x88
801161a: 4649 mov r1, r9
801161c: 4650 mov r0, sl
801161e: f002 f95a bl 80138d6 <__sprint_r>
8011622: 2800 cmp r0, #0
8011624: f040 80d8 bne.w 80117d8 <_vfprintf_r+0x13a8>
8011628: ac25 add r4, sp, #148 ; 0x94
801162a: e727 b.n 801147c <_vfprintf_r+0x104c>
801162c: aa22 add r2, sp, #136 ; 0x88
801162e: 4649 mov r1, r9
8011630: 4650 mov r0, sl
8011632: f002 f950 bl 80138d6 <__sprint_r>
8011636: 2800 cmp r0, #0
8011638: f040 80ce bne.w 80117d8 <_vfprintf_r+0x13a8>
801163c: ac25 add r4, sp, #148 ; 0x94
801163e: e734 b.n 80114aa <_vfprintf_r+0x107a>
8011640: 3210 adds r2, #16
8011642: 2b07 cmp r3, #7
8011644: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
8011648: 6067 str r7, [r4, #4]
801164a: dd08 ble.n 801165e <_vfprintf_r+0x122e>
801164c: aa22 add r2, sp, #136 ; 0x88
801164e: 4649 mov r1, r9
8011650: 4650 mov r0, sl
8011652: f002 f940 bl 80138d6 <__sprint_r>
8011656: 2800 cmp r0, #0
8011658: f040 80be bne.w 80117d8 <_vfprintf_r+0x13a8>
801165c: a925 add r1, sp, #148 ; 0x94
801165e: 3d10 subs r5, #16
8011660: 460c mov r4, r1
8011662: e72e b.n 80114c2 <_vfprintf_r+0x1092>
8011664: 08017f3c .word 0x08017f3c
8011668: 9a05 ldr r2, [sp, #20]
801166a: 9b23 ldr r3, [sp, #140] ; 0x8c
801166c: 2a01 cmp r2, #1
801166e: f106 0601 add.w r6, r6, #1
8011672: f103 0301 add.w r3, r3, #1
8011676: f104 0508 add.w r5, r4, #8
801167a: dc02 bgt.n 8011682 <_vfprintf_r+0x1252>
801167c: f01b 0f01 tst.w fp, #1
8011680: d07e beq.n 8011780 <_vfprintf_r+0x1350>
8011682: 2201 movs r2, #1
8011684: 2b07 cmp r3, #7
8011686: e9cd 3623 strd r3, r6, [sp, #140] ; 0x8c
801168a: f8c4 8000 str.w r8, [r4]
801168e: 6062 str r2, [r4, #4]
8011690: dd08 ble.n 80116a4 <_vfprintf_r+0x1274>
8011692: aa22 add r2, sp, #136 ; 0x88
8011694: 4649 mov r1, r9
8011696: 4650 mov r0, sl
8011698: f002 f91d bl 80138d6 <__sprint_r>
801169c: 2800 cmp r0, #0
801169e: f040 809b bne.w 80117d8 <_vfprintf_r+0x13a8>
80116a2: ad25 add r5, sp, #148 ; 0x94
80116a4: 9b13 ldr r3, [sp, #76] ; 0x4c
80116a6: 602b str r3, [r5, #0]
80116a8: 9b0e ldr r3, [sp, #56] ; 0x38
80116aa: 9a0e ldr r2, [sp, #56] ; 0x38
80116ac: 606b str r3, [r5, #4]
80116ae: 9b24 ldr r3, [sp, #144] ; 0x90
80116b0: 4413 add r3, r2
80116b2: 9324 str r3, [sp, #144] ; 0x90
80116b4: 9b23 ldr r3, [sp, #140] ; 0x8c
80116b6: 3301 adds r3, #1
80116b8: 2b07 cmp r3, #7
80116ba: 9323 str r3, [sp, #140] ; 0x8c
80116bc: dc32 bgt.n 8011724 <_vfprintf_r+0x12f4>
80116be: 3508 adds r5, #8
80116c0: 9b05 ldr r3, [sp, #20]
80116c2: e9dd 010c ldrd r0, r1, [sp, #48] ; 0x30
80116c6: 1e5c subs r4, r3, #1
80116c8: 2200 movs r2, #0
80116ca: 2300 movs r3, #0
80116cc: f7ef fa0c bl 8000ae8 <__aeabi_dcmpeq>
80116d0: 2800 cmp r0, #0
80116d2: d130 bne.n 8011736 <_vfprintf_r+0x1306>
80116d4: 9923 ldr r1, [sp, #140] ; 0x8c
80116d6: 9b24 ldr r3, [sp, #144] ; 0x90
80116d8: 9a05 ldr r2, [sp, #20]
80116da: 3101 adds r1, #1
80116dc: 3b01 subs r3, #1
80116de: f108 0001 add.w r0, r8, #1
80116e2: 4413 add r3, r2
80116e4: 2907 cmp r1, #7
80116e6: e9c5 0400 strd r0, r4, [r5]
80116ea: e9cd 1323 strd r1, r3, [sp, #140] ; 0x8c
80116ee: dd50 ble.n 8011792 <_vfprintf_r+0x1362>
80116f0: aa22 add r2, sp, #136 ; 0x88
80116f2: 4649 mov r1, r9
80116f4: 4650 mov r0, sl
80116f6: f002 f8ee bl 80138d6 <__sprint_r>
80116fa: 2800 cmp r0, #0
80116fc: d16c bne.n 80117d8 <_vfprintf_r+0x13a8>
80116fe: ad25 add r5, sp, #148 ; 0x94
8011700: ab1e add r3, sp, #120 ; 0x78
8011702: 602b str r3, [r5, #0]
8011704: 9b15 ldr r3, [sp, #84] ; 0x54
8011706: 9a15 ldr r2, [sp, #84] ; 0x54
8011708: 606b str r3, [r5, #4]
801170a: 9b24 ldr r3, [sp, #144] ; 0x90
801170c: 4413 add r3, r2
801170e: 9324 str r3, [sp, #144] ; 0x90
8011710: 9b23 ldr r3, [sp, #140] ; 0x8c
8011712: 3301 adds r3, #1
8011714: 2b07 cmp r3, #7
8011716: 9323 str r3, [sp, #140] ; 0x8c
8011718: f73f adb5 bgt.w 8011286 <_vfprintf_r+0xe56>
801171c: f105 0408 add.w r4, r5, #8
8011720: f7ff baba b.w 8010c98 <_vfprintf_r+0x868>
8011724: aa22 add r2, sp, #136 ; 0x88
8011726: 4649 mov r1, r9
8011728: 4650 mov r0, sl
801172a: f002 f8d4 bl 80138d6 <__sprint_r>
801172e: 2800 cmp r0, #0
8011730: d152 bne.n 80117d8 <_vfprintf_r+0x13a8>
8011732: ad25 add r5, sp, #148 ; 0x94
8011734: e7c4 b.n 80116c0 <_vfprintf_r+0x1290>
8011736: 2c00 cmp r4, #0
8011738: dde2 ble.n 8011700 <_vfprintf_r+0x12d0>
801173a: 4e58 ldr r6, [pc, #352] ; (801189c <_vfprintf_r+0x146c>)
801173c: 2710 movs r7, #16
801173e: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
8011742: 2c10 cmp r4, #16
8011744: f103 0301 add.w r3, r3, #1
8011748: f105 0108 add.w r1, r5, #8
801174c: 602e str r6, [r5, #0]
801174e: dc07 bgt.n 8011760 <_vfprintf_r+0x1330>
8011750: 606c str r4, [r5, #4]
8011752: 2b07 cmp r3, #7
8011754: 4414 add r4, r2
8011756: e9cd 3423 strd r3, r4, [sp, #140] ; 0x8c
801175a: dcc9 bgt.n 80116f0 <_vfprintf_r+0x12c0>
801175c: 460d mov r5, r1
801175e: e7cf b.n 8011700 <_vfprintf_r+0x12d0>
8011760: 3210 adds r2, #16
8011762: 2b07 cmp r3, #7
8011764: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
8011768: 606f str r7, [r5, #4]
801176a: dd06 ble.n 801177a <_vfprintf_r+0x134a>
801176c: aa22 add r2, sp, #136 ; 0x88
801176e: 4649 mov r1, r9
8011770: 4650 mov r0, sl
8011772: f002 f8b0 bl 80138d6 <__sprint_r>
8011776: bb78 cbnz r0, 80117d8 <_vfprintf_r+0x13a8>
8011778: a925 add r1, sp, #148 ; 0x94
801177a: 3c10 subs r4, #16
801177c: 460d mov r5, r1
801177e: e7de b.n 801173e <_vfprintf_r+0x130e>
8011780: 2201 movs r2, #1
8011782: 2b07 cmp r3, #7
8011784: e9cd 3623 strd r3, r6, [sp, #140] ; 0x8c
8011788: f8c4 8000 str.w r8, [r4]
801178c: 6062 str r2, [r4, #4]
801178e: ddb7 ble.n 8011700 <_vfprintf_r+0x12d0>
8011790: e7ae b.n 80116f0 <_vfprintf_r+0x12c0>
8011792: 3508 adds r5, #8
8011794: e7b4 b.n 8011700 <_vfprintf_r+0x12d0>
8011796: 460c mov r4, r1
8011798: f7ff ba7e b.w 8010c98 <_vfprintf_r+0x868>
801179c: e9dd 3210 ldrd r3, r2, [sp, #64] ; 0x40
80117a0: 1a9d subs r5, r3, r2
80117a2: 2d00 cmp r5, #0
80117a4: f77f aa7c ble.w 8010ca0 <_vfprintf_r+0x870>
80117a8: 4e3d ldr r6, [pc, #244] ; (80118a0 <_vfprintf_r+0x1470>)
80117aa: 2710 movs r7, #16
80117ac: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
80117b0: 2d10 cmp r5, #16
80117b2: f103 0301 add.w r3, r3, #1
80117b6: 6026 str r6, [r4, #0]
80117b8: dc18 bgt.n 80117ec <_vfprintf_r+0x13bc>
80117ba: 6065 str r5, [r4, #4]
80117bc: 2b07 cmp r3, #7
80117be: 4415 add r5, r2
80117c0: e9cd 3523 strd r3, r5, [sp, #140] ; 0x8c
80117c4: f77f aa6c ble.w 8010ca0 <_vfprintf_r+0x870>
80117c8: aa22 add r2, sp, #136 ; 0x88
80117ca: 4649 mov r1, r9
80117cc: 4650 mov r0, sl
80117ce: f002 f882 bl 80138d6 <__sprint_r>
80117d2: 2800 cmp r0, #0
80117d4: f43f aa64 beq.w 8010ca0 <_vfprintf_r+0x870>
80117d8: 9b03 ldr r3, [sp, #12]
80117da: 2b00 cmp r3, #0
80117dc: f43f a879 beq.w 80108d2 <_vfprintf_r+0x4a2>
80117e0: 4619 mov r1, r3
80117e2: 4650 mov r0, sl
80117e4: f001 f8fa bl 80129dc <_free_r>
80117e8: f7ff b873 b.w 80108d2 <_vfprintf_r+0x4a2>
80117ec: 3210 adds r2, #16
80117ee: 2b07 cmp r3, #7
80117f0: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
80117f4: 6067 str r7, [r4, #4]
80117f6: dc02 bgt.n 80117fe <_vfprintf_r+0x13ce>
80117f8: 3408 adds r4, #8
80117fa: 3d10 subs r5, #16
80117fc: e7d6 b.n 80117ac <_vfprintf_r+0x137c>
80117fe: aa22 add r2, sp, #136 ; 0x88
8011800: 4649 mov r1, r9
8011802: 4650 mov r0, sl
8011804: f002 f867 bl 80138d6 <__sprint_r>
8011808: 2800 cmp r0, #0
801180a: d1e5 bne.n 80117d8 <_vfprintf_r+0x13a8>
801180c: ac25 add r4, sp, #148 ; 0x94
801180e: e7f4 b.n 80117fa <_vfprintf_r+0x13ca>
8011810: 9903 ldr r1, [sp, #12]
8011812: 4650 mov r0, sl
8011814: f001 f8e2 bl 80129dc <_free_r>
8011818: f7ff ba5a b.w 8010cd0 <_vfprintf_r+0x8a0>
801181c: 9b24 ldr r3, [sp, #144] ; 0x90
801181e: b91b cbnz r3, 8011828 <_vfprintf_r+0x13f8>
8011820: 2300 movs r3, #0
8011822: 9323 str r3, [sp, #140] ; 0x8c
8011824: f7ff b855 b.w 80108d2 <_vfprintf_r+0x4a2>
8011828: aa22 add r2, sp, #136 ; 0x88
801182a: 4649 mov r1, r9
801182c: 4650 mov r0, sl
801182e: f002 f852 bl 80138d6 <__sprint_r>
8011832: 2800 cmp r0, #0
8011834: d0f4 beq.n 8011820 <_vfprintf_r+0x13f0>
8011836: f7ff b84c b.w 80108d2 <_vfprintf_r+0x4a2>
801183a: ea56 0205 orrs.w r2, r6, r5
801183e: 465f mov r7, fp
8011840: f43f ab70 beq.w 8010f24 <_vfprintf_r+0xaf4>
8011844: 2b01 cmp r3, #1
8011846: f43f ac0d beq.w 8011064 <_vfprintf_r+0xc34>
801184a: 2b02 cmp r3, #2
801184c: f50d 789c add.w r8, sp, #312 ; 0x138
8011850: f43f ac54 beq.w 80110fc <_vfprintf_r+0xccc>
8011854: f006 0307 and.w r3, r6, #7
8011858: 08f6 lsrs r6, r6, #3
801185a: ea46 7645 orr.w r6, r6, r5, lsl #29
801185e: 08ed lsrs r5, r5, #3
8011860: 3330 adds r3, #48 ; 0x30
8011862: ea56 0105 orrs.w r1, r6, r5
8011866: 4642 mov r2, r8
8011868: f808 3d01 strb.w r3, [r8, #-1]!
801186c: d1f2 bne.n 8011854 <_vfprintf_r+0x1424>
801186e: 07f8 lsls r0, r7, #31
8011870: d506 bpl.n 8011880 <_vfprintf_r+0x1450>
8011872: 2b30 cmp r3, #48 ; 0x30
8011874: d004 beq.n 8011880 <_vfprintf_r+0x1450>
8011876: 2330 movs r3, #48 ; 0x30
8011878: f808 3c01 strb.w r3, [r8, #-1]
801187c: f1a2 0802 sub.w r8, r2, #2
8011880: ab4e add r3, sp, #312 ; 0x138
8011882: eba3 0308 sub.w r3, r3, r8
8011886: 9e04 ldr r6, [sp, #16]
8011888: 9304 str r3, [sp, #16]
801188a: 2300 movs r3, #0
801188c: 46bb mov fp, r7
801188e: 9303 str r3, [sp, #12]
8011890: e9cd 3308 strd r3, r3, [sp, #32]
8011894: 461d mov r5, r3
8011896: f7ff b945 b.w 8010b24 <_vfprintf_r+0x6f4>
801189a: bf00 nop
801189c: 08017f3c .word 0x08017f3c
80118a0: 08017f2c .word 0x08017f2c
080118a4 <__sbprintf>:
80118a4: b570 push {r4, r5, r6, lr}
80118a6: 460c mov r4, r1
80118a8: 8989 ldrh r1, [r1, #12]
80118aa: f5ad 6d8e sub.w sp, sp, #1136 ; 0x470
80118ae: f021 0102 bic.w r1, r1, #2
80118b2: f8ad 1014 strh.w r1, [sp, #20]
80118b6: 6e61 ldr r1, [r4, #100] ; 0x64
80118b8: 911b str r1, [sp, #108] ; 0x6c
80118ba: 89e1 ldrh r1, [r4, #14]
80118bc: f8ad 1016 strh.w r1, [sp, #22]
80118c0: 69e1 ldr r1, [r4, #28]
80118c2: 9109 str r1, [sp, #36] ; 0x24
80118c4: 6a61 ldr r1, [r4, #36] ; 0x24
80118c6: 910b str r1, [sp, #44] ; 0x2c
80118c8: a91c add r1, sp, #112 ; 0x70
80118ca: 9102 str r1, [sp, #8]
80118cc: 9106 str r1, [sp, #24]
80118ce: f44f 6180 mov.w r1, #1024 ; 0x400
80118d2: 4606 mov r6, r0
80118d4: 9104 str r1, [sp, #16]
80118d6: 9107 str r1, [sp, #28]
80118d8: a818 add r0, sp, #96 ; 0x60
80118da: 2100 movs r1, #0
80118dc: e9cd 3200 strd r3, r2, [sp]
80118e0: 9108 str r1, [sp, #32]
80118e2: f001 f95f bl 8012ba4 <__retarget_lock_init_recursive>
80118e6: e9dd 3200 ldrd r3, r2, [sp]
80118ea: a902 add r1, sp, #8
80118ec: 4630 mov r0, r6
80118ee: f7fe fd9f bl 8010430 <_vfprintf_r>
80118f2: 1e05 subs r5, r0, #0
80118f4: db07 blt.n 8011906 <__sbprintf+0x62>
80118f6: a902 add r1, sp, #8
80118f8: 4630 mov r0, r6
80118fa: f000 ff73 bl 80127e4 <_fflush_r>
80118fe: 2800 cmp r0, #0
8011900: bf18 it ne
8011902: f04f 35ff movne.w r5, #4294967295
8011906: f8bd 3014 ldrh.w r3, [sp, #20]
801190a: 9818 ldr r0, [sp, #96] ; 0x60
801190c: 065b lsls r3, r3, #25
801190e: bf42 ittt mi
8011910: 89a3 ldrhmi r3, [r4, #12]
8011912: f043 0340 orrmi.w r3, r3, #64 ; 0x40
8011916: 81a3 strhmi r3, [r4, #12]
8011918: f001 f945 bl 8012ba6 <__retarget_lock_close_recursive>
801191c: 4628 mov r0, r5
801191e: f50d 6d8e add.w sp, sp, #1136 ; 0x470
8011922: bd70 pop {r4, r5, r6, pc}
08011924 <__swsetup_r>:
8011924: b538 push {r3, r4, r5, lr}
8011926: 4b2a ldr r3, [pc, #168] ; (80119d0 <__swsetup_r+0xac>)
8011928: 4605 mov r5, r0
801192a: 6818 ldr r0, [r3, #0]
801192c: 460c mov r4, r1
801192e: b118 cbz r0, 8011938 <__swsetup_r+0x14>
8011930: 6b83 ldr r3, [r0, #56] ; 0x38
8011932: b90b cbnz r3, 8011938 <__swsetup_r+0x14>
8011934: f000 ffc2 bl 80128bc <__sinit>
8011938: 89a3 ldrh r3, [r4, #12]
801193a: f9b4 200c ldrsh.w r2, [r4, #12]
801193e: 0718 lsls r0, r3, #28
8011940: d422 bmi.n 8011988 <__swsetup_r+0x64>
8011942: 06d9 lsls r1, r3, #27
8011944: d407 bmi.n 8011956 <__swsetup_r+0x32>
8011946: 2309 movs r3, #9
8011948: 602b str r3, [r5, #0]
801194a: f042 0340 orr.w r3, r2, #64 ; 0x40
801194e: 81a3 strh r3, [r4, #12]
8011950: f04f 30ff mov.w r0, #4294967295
8011954: e034 b.n 80119c0 <__swsetup_r+0x9c>
8011956: 0758 lsls r0, r3, #29
8011958: d512 bpl.n 8011980 <__swsetup_r+0x5c>
801195a: 6b21 ldr r1, [r4, #48] ; 0x30
801195c: b141 cbz r1, 8011970 <__swsetup_r+0x4c>
801195e: f104 0340 add.w r3, r4, #64 ; 0x40
8011962: 4299 cmp r1, r3
8011964: d002 beq.n 801196c <__swsetup_r+0x48>
8011966: 4628 mov r0, r5
8011968: f001 f838 bl 80129dc <_free_r>
801196c: 2300 movs r3, #0
801196e: 6323 str r3, [r4, #48] ; 0x30
8011970: 89a3 ldrh r3, [r4, #12]
8011972: f023 0324 bic.w r3, r3, #36 ; 0x24
8011976: 81a3 strh r3, [r4, #12]
8011978: 2300 movs r3, #0
801197a: 6063 str r3, [r4, #4]
801197c: 6923 ldr r3, [r4, #16]
801197e: 6023 str r3, [r4, #0]
8011980: 89a3 ldrh r3, [r4, #12]
8011982: f043 0308 orr.w r3, r3, #8
8011986: 81a3 strh r3, [r4, #12]
8011988: 6923 ldr r3, [r4, #16]
801198a: b94b cbnz r3, 80119a0 <__swsetup_r+0x7c>
801198c: 89a3 ldrh r3, [r4, #12]
801198e: f403 7320 and.w r3, r3, #640 ; 0x280
8011992: f5b3 7f00 cmp.w r3, #512 ; 0x200
8011996: d003 beq.n 80119a0 <__swsetup_r+0x7c>
8011998: 4621 mov r1, r4
801199a: 4628 mov r0, r5
801199c: f001 f932 bl 8012c04 <__smakebuf_r>
80119a0: 89a0 ldrh r0, [r4, #12]
80119a2: f9b4 200c ldrsh.w r2, [r4, #12]
80119a6: f010 0301 ands.w r3, r0, #1
80119aa: d00a beq.n 80119c2 <__swsetup_r+0x9e>
80119ac: 2300 movs r3, #0
80119ae: 60a3 str r3, [r4, #8]
80119b0: 6963 ldr r3, [r4, #20]
80119b2: 425b negs r3, r3
80119b4: 61a3 str r3, [r4, #24]
80119b6: 6923 ldr r3, [r4, #16]
80119b8: b943 cbnz r3, 80119cc <__swsetup_r+0xa8>
80119ba: f010 0080 ands.w r0, r0, #128 ; 0x80
80119be: d1c4 bne.n 801194a <__swsetup_r+0x26>
80119c0: bd38 pop {r3, r4, r5, pc}
80119c2: 0781 lsls r1, r0, #30
80119c4: bf58 it pl
80119c6: 6963 ldrpl r3, [r4, #20]
80119c8: 60a3 str r3, [r4, #8]
80119ca: e7f4 b.n 80119b6 <__swsetup_r+0x92>
80119cc: 2000 movs r0, #0
80119ce: e7f7 b.n 80119c0 <__swsetup_r+0x9c>
80119d0: 20000030 .word 0x20000030
080119d4 <register_fini>:
80119d4: 4b02 ldr r3, [pc, #8] ; (80119e0 <register_fini+0xc>)
80119d6: b113 cbz r3, 80119de <register_fini+0xa>
80119d8: 4802 ldr r0, [pc, #8] ; (80119e4 <register_fini+0x10>)
80119da: f000 b805 b.w 80119e8 <atexit>
80119de: 4770 bx lr
80119e0: 00000000 .word 0x00000000
80119e4: 0801290d .word 0x0801290d
080119e8 <atexit>:
80119e8: 2300 movs r3, #0
80119ea: 4601 mov r1, r0
80119ec: 461a mov r2, r3
80119ee: 4618 mov r0, r3
80119f0: f002 bc8c b.w 801430c <__register_exitproc>
080119f4 <quorem>:
80119f4: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
80119f8: 6903 ldr r3, [r0, #16]
80119fa: 690c ldr r4, [r1, #16]
80119fc: 42a3 cmp r3, r4
80119fe: 4607 mov r7, r0
8011a00: f2c0 8081 blt.w 8011b06 <quorem+0x112>
8011a04: 3c01 subs r4, #1
8011a06: f101 0814 add.w r8, r1, #20
8011a0a: f100 0514 add.w r5, r0, #20
8011a0e: eb05 0384 add.w r3, r5, r4, lsl #2
8011a12: 9301 str r3, [sp, #4]
8011a14: f858 3024 ldr.w r3, [r8, r4, lsl #2]
8011a18: f855 2024 ldr.w r2, [r5, r4, lsl #2]
8011a1c: 3301 adds r3, #1
8011a1e: 429a cmp r2, r3
8011a20: ea4f 0b84 mov.w fp, r4, lsl #2
8011a24: eb08 0984 add.w r9, r8, r4, lsl #2
8011a28: fbb2 f6f3 udiv r6, r2, r3
8011a2c: d331 bcc.n 8011a92 <quorem+0x9e>
8011a2e: f04f 0e00 mov.w lr, #0
8011a32: 4640 mov r0, r8
8011a34: 46ac mov ip, r5
8011a36: 46f2 mov sl, lr
8011a38: f850 2b04 ldr.w r2, [r0], #4
8011a3c: b293 uxth r3, r2
8011a3e: fb06 e303 mla r3, r6, r3, lr
8011a42: ea4f 4e13 mov.w lr, r3, lsr #16
8011a46: b29b uxth r3, r3
8011a48: ebaa 0303 sub.w r3, sl, r3
8011a4c: f8dc a000 ldr.w sl, [ip]
8011a50: 0c12 lsrs r2, r2, #16
8011a52: fa13 f38a uxtah r3, r3, sl
8011a56: fb06 e202 mla r2, r6, r2, lr
8011a5a: 9300 str r3, [sp, #0]
8011a5c: 9b00 ldr r3, [sp, #0]
8011a5e: ea4f 4e12 mov.w lr, r2, lsr #16
8011a62: b292 uxth r2, r2
8011a64: ebc2 421a rsb r2, r2, sl, lsr #16
8011a68: eb02 4223 add.w r2, r2, r3, asr #16
8011a6c: f8bd 3000 ldrh.w r3, [sp]
8011a70: 4581 cmp r9, r0
8011a72: ea43 4302 orr.w r3, r3, r2, lsl #16
8011a76: f84c 3b04 str.w r3, [ip], #4
8011a7a: ea4f 4a22 mov.w sl, r2, asr #16
8011a7e: d2db bcs.n 8011a38 <quorem+0x44>
8011a80: f855 300b ldr.w r3, [r5, fp]
8011a84: b92b cbnz r3, 8011a92 <quorem+0x9e>
8011a86: 9b01 ldr r3, [sp, #4]
8011a88: 3b04 subs r3, #4
8011a8a: 429d cmp r5, r3
8011a8c: 461a mov r2, r3
8011a8e: d32e bcc.n 8011aee <quorem+0xfa>
8011a90: 613c str r4, [r7, #16]
8011a92: 4638 mov r0, r7
8011a94: f001 fd72 bl 801357c <__mcmp>
8011a98: 2800 cmp r0, #0
8011a9a: db24 blt.n 8011ae6 <quorem+0xf2>
8011a9c: 3601 adds r6, #1
8011a9e: 4628 mov r0, r5
8011aa0: f04f 0c00 mov.w ip, #0
8011aa4: f858 2b04 ldr.w r2, [r8], #4
8011aa8: f8d0 e000 ldr.w lr, [r0]
8011aac: b293 uxth r3, r2
8011aae: ebac 0303 sub.w r3, ip, r3
8011ab2: 0c12 lsrs r2, r2, #16
8011ab4: fa13 f38e uxtah r3, r3, lr
8011ab8: ebc2 421e rsb r2, r2, lr, lsr #16
8011abc: eb02 4223 add.w r2, r2, r3, asr #16
8011ac0: b29b uxth r3, r3
8011ac2: ea43 4302 orr.w r3, r3, r2, lsl #16
8011ac6: 45c1 cmp r9, r8
8011ac8: f840 3b04 str.w r3, [r0], #4
8011acc: ea4f 4c22 mov.w ip, r2, asr #16
8011ad0: d2e8 bcs.n 8011aa4 <quorem+0xb0>
8011ad2: f855 2024 ldr.w r2, [r5, r4, lsl #2]
8011ad6: eb05 0384 add.w r3, r5, r4, lsl #2
8011ada: b922 cbnz r2, 8011ae6 <quorem+0xf2>
8011adc: 3b04 subs r3, #4
8011ade: 429d cmp r5, r3
8011ae0: 461a mov r2, r3
8011ae2: d30a bcc.n 8011afa <quorem+0x106>
8011ae4: 613c str r4, [r7, #16]
8011ae6: 4630 mov r0, r6
8011ae8: b003 add sp, #12
8011aea: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
8011aee: 6812 ldr r2, [r2, #0]
8011af0: 3b04 subs r3, #4
8011af2: 2a00 cmp r2, #0
8011af4: d1cc bne.n 8011a90 <quorem+0x9c>
8011af6: 3c01 subs r4, #1
8011af8: e7c7 b.n 8011a8a <quorem+0x96>
8011afa: 6812 ldr r2, [r2, #0]
8011afc: 3b04 subs r3, #4
8011afe: 2a00 cmp r2, #0
8011b00: d1f0 bne.n 8011ae4 <quorem+0xf0>
8011b02: 3c01 subs r4, #1
8011b04: e7eb b.n 8011ade <quorem+0xea>
8011b06: 2000 movs r0, #0
8011b08: e7ee b.n 8011ae8 <quorem+0xf4>
8011b0a: 0000 movs r0, r0
8011b0c: 0000 movs r0, r0
...
08011b10 <_dtoa_r>:
8011b10: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
8011b14: ed2d 8b04 vpush {d8-d9}
8011b18: b093 sub sp, #76 ; 0x4c
8011b1a: ec57 6b10 vmov r6, r7, d0
8011b1e: 9106 str r1, [sp, #24]
8011b20: 6c01 ldr r1, [r0, #64] ; 0x40
8011b22: 9d20 ldr r5, [sp, #128] ; 0x80
8011b24: 9209 str r2, [sp, #36] ; 0x24
8011b26: ee10 aa10 vmov sl, s0
8011b2a: 4604 mov r4, r0
8011b2c: 930c str r3, [sp, #48] ; 0x30
8011b2e: 46bb mov fp, r7
8011b30: b141 cbz r1, 8011b44 <_dtoa_r+0x34>
8011b32: 6c42 ldr r2, [r0, #68] ; 0x44
8011b34: 604a str r2, [r1, #4]
8011b36: 2301 movs r3, #1
8011b38: 4093 lsls r3, r2
8011b3a: 608b str r3, [r1, #8]
8011b3c: f001 fb0f bl 801315e <_Bfree>
8011b40: 2300 movs r3, #0
8011b42: 6423 str r3, [r4, #64] ; 0x40
8011b44: 1e3b subs r3, r7, #0
8011b46: bfaa itet ge
8011b48: 2300 movge r3, #0
8011b4a: f023 4b00 biclt.w fp, r3, #2147483648 ; 0x80000000
8011b4e: 602b strge r3, [r5, #0]
8011b50: 4ba3 ldr r3, [pc, #652] ; (8011de0 <_dtoa_r+0x2d0>)
8011b52: bfbc itt lt
8011b54: 2201 movlt r2, #1
8011b56: 602a strlt r2, [r5, #0]
8011b58: ea33 030b bics.w r3, r3, fp
8011b5c: d11b bne.n 8011b96 <_dtoa_r+0x86>
8011b5e: 9a0c ldr r2, [sp, #48] ; 0x30
8011b60: f242 730f movw r3, #9999 ; 0x270f
8011b64: 6013 str r3, [r2, #0]
8011b66: f3cb 0313 ubfx r3, fp, #0, #20
8011b6a: 4333 orrs r3, r6
8011b6c: f000 8590 beq.w 8012690 <_dtoa_r+0xb80>
8011b70: 9b21 ldr r3, [sp, #132] ; 0x84
8011b72: b90b cbnz r3, 8011b78 <_dtoa_r+0x68>
8011b74: 4b9b ldr r3, [pc, #620] ; (8011de4 <_dtoa_r+0x2d4>)
8011b76: e022 b.n 8011bbe <_dtoa_r+0xae>
8011b78: 4b9a ldr r3, [pc, #616] ; (8011de4 <_dtoa_r+0x2d4>)
8011b7a: 9301 str r3, [sp, #4]
8011b7c: 3303 adds r3, #3
8011b7e: 9a21 ldr r2, [sp, #132] ; 0x84
8011b80: 6013 str r3, [r2, #0]
8011b82: 9801 ldr r0, [sp, #4]
8011b84: b013 add sp, #76 ; 0x4c
8011b86: ecbd 8b04 vpop {d8-d9}
8011b8a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
8011b8e: 4b96 ldr r3, [pc, #600] ; (8011de8 <_dtoa_r+0x2d8>)
8011b90: 9301 str r3, [sp, #4]
8011b92: 3308 adds r3, #8
8011b94: e7f3 b.n 8011b7e <_dtoa_r+0x6e>
8011b96: 2200 movs r2, #0
8011b98: 2300 movs r3, #0
8011b9a: 4650 mov r0, sl
8011b9c: 4659 mov r1, fp
8011b9e: f7ee ffa3 bl 8000ae8 <__aeabi_dcmpeq>
8011ba2: ec4b ab19 vmov d9, sl, fp
8011ba6: 4680 mov r8, r0
8011ba8: b158 cbz r0, 8011bc2 <_dtoa_r+0xb2>
8011baa: 9a0c ldr r2, [sp, #48] ; 0x30
8011bac: 2301 movs r3, #1
8011bae: 6013 str r3, [r2, #0]
8011bb0: 9b21 ldr r3, [sp, #132] ; 0x84
8011bb2: 2b00 cmp r3, #0
8011bb4: f000 8569 beq.w 801268a <_dtoa_r+0xb7a>
8011bb8: 488c ldr r0, [pc, #560] ; (8011dec <_dtoa_r+0x2dc>)
8011bba: 6018 str r0, [r3, #0]
8011bbc: 1e43 subs r3, r0, #1
8011bbe: 9301 str r3, [sp, #4]
8011bc0: e7df b.n 8011b82 <_dtoa_r+0x72>
8011bc2: ec4b ab10 vmov d0, sl, fp
8011bc6: aa10 add r2, sp, #64 ; 0x40
8011bc8: a911 add r1, sp, #68 ; 0x44
8011bca: 4620 mov r0, r4
8011bcc: f001 fd7c bl 80136c8 <__d2b>
8011bd0: f3cb 550a ubfx r5, fp, #20, #11
8011bd4: ee08 0a10 vmov s16, r0
8011bd8: 2d00 cmp r5, #0
8011bda: f000 8082 beq.w 8011ce2 <_dtoa_r+0x1d2>
8011bde: ee19 3a90 vmov r3, s19
8011be2: f3c3 0313 ubfx r3, r3, #0, #20
8011be6: f043 577f orr.w r7, r3, #1069547520 ; 0x3fc00000
8011bea: 4656 mov r6, sl
8011bec: f447 1740 orr.w r7, r7, #3145728 ; 0x300000
8011bf0: f2a5 35ff subw r5, r5, #1023 ; 0x3ff
8011bf4: f8cd 8038 str.w r8, [sp, #56] ; 0x38
8011bf8: 4b7d ldr r3, [pc, #500] ; (8011df0 <_dtoa_r+0x2e0>)
8011bfa: 2200 movs r2, #0
8011bfc: 4630 mov r0, r6
8011bfe: 4639 mov r1, r7
8011c00: f7ee fb52 bl 80002a8 <__aeabi_dsub>
8011c04: a370 add r3, pc, #448 ; (adr r3, 8011dc8 <_dtoa_r+0x2b8>)
8011c06: e9d3 2300 ldrd r2, r3, [r3]
8011c0a: f7ee fd05 bl 8000618 <__aeabi_dmul>
8011c0e: a370 add r3, pc, #448 ; (adr r3, 8011dd0 <_dtoa_r+0x2c0>)
8011c10: e9d3 2300 ldrd r2, r3, [r3]
8011c14: f7ee fb4a bl 80002ac <__adddf3>
8011c18: 4606 mov r6, r0
8011c1a: 4628 mov r0, r5
8011c1c: 460f mov r7, r1
8011c1e: f7ee fc91 bl 8000544 <__aeabi_i2d>
8011c22: a36d add r3, pc, #436 ; (adr r3, 8011dd8 <_dtoa_r+0x2c8>)
8011c24: e9d3 2300 ldrd r2, r3, [r3]
8011c28: f7ee fcf6 bl 8000618 <__aeabi_dmul>
8011c2c: 4602 mov r2, r0
8011c2e: 460b mov r3, r1
8011c30: 4630 mov r0, r6
8011c32: 4639 mov r1, r7
8011c34: f7ee fb3a bl 80002ac <__adddf3>
8011c38: 4606 mov r6, r0
8011c3a: 460f mov r7, r1
8011c3c: f7ee ff9c bl 8000b78 <__aeabi_d2iz>
8011c40: 2200 movs r2, #0
8011c42: 9000 str r0, [sp, #0]
8011c44: 2300 movs r3, #0
8011c46: 4630 mov r0, r6
8011c48: 4639 mov r1, r7
8011c4a: f7ee ff57 bl 8000afc <__aeabi_dcmplt>
8011c4e: b150 cbz r0, 8011c66 <_dtoa_r+0x156>
8011c50: 9800 ldr r0, [sp, #0]
8011c52: f7ee fc77 bl 8000544 <__aeabi_i2d>
8011c56: 4632 mov r2, r6
8011c58: 463b mov r3, r7
8011c5a: f7ee ff45 bl 8000ae8 <__aeabi_dcmpeq>
8011c5e: b910 cbnz r0, 8011c66 <_dtoa_r+0x156>
8011c60: 9b00 ldr r3, [sp, #0]
8011c62: 3b01 subs r3, #1
8011c64: 9300 str r3, [sp, #0]
8011c66: 9b00 ldr r3, [sp, #0]
8011c68: 2b16 cmp r3, #22
8011c6a: d858 bhi.n 8011d1e <_dtoa_r+0x20e>
8011c6c: 9a00 ldr r2, [sp, #0]
8011c6e: 4b61 ldr r3, [pc, #388] ; (8011df4 <_dtoa_r+0x2e4>)
8011c70: eb03 03c2 add.w r3, r3, r2, lsl #3
8011c74: e9d3 2300 ldrd r2, r3, [r3]
8011c78: ec51 0b19 vmov r0, r1, d9
8011c7c: f7ee ff3e bl 8000afc <__aeabi_dcmplt>
8011c80: 2800 cmp r0, #0
8011c82: d04e beq.n 8011d22 <_dtoa_r+0x212>
8011c84: 9b00 ldr r3, [sp, #0]
8011c86: 3b01 subs r3, #1
8011c88: 9300 str r3, [sp, #0]
8011c8a: 2300 movs r3, #0
8011c8c: 930b str r3, [sp, #44] ; 0x2c
8011c8e: 9b10 ldr r3, [sp, #64] ; 0x40
8011c90: 1b5d subs r5, r3, r5
8011c92: 1e6b subs r3, r5, #1
8011c94: 9305 str r3, [sp, #20]
8011c96: bf45 ittet mi
8011c98: f1c5 0301 rsbmi r3, r5, #1
8011c9c: 9304 strmi r3, [sp, #16]
8011c9e: 2300 movpl r3, #0
8011ca0: 2300 movmi r3, #0
8011ca2: bf4c ite mi
8011ca4: 9305 strmi r3, [sp, #20]
8011ca6: 9304 strpl r3, [sp, #16]
8011ca8: 9b00 ldr r3, [sp, #0]
8011caa: 2b00 cmp r3, #0
8011cac: db3b blt.n 8011d26 <_dtoa_r+0x216>
8011cae: 9b05 ldr r3, [sp, #20]
8011cb0: 9a00 ldr r2, [sp, #0]
8011cb2: 920a str r2, [sp, #40] ; 0x28
8011cb4: 4413 add r3, r2
8011cb6: 9305 str r3, [sp, #20]
8011cb8: 2300 movs r3, #0
8011cba: 9307 str r3, [sp, #28]
8011cbc: 9b06 ldr r3, [sp, #24]
8011cbe: 2b09 cmp r3, #9
8011cc0: d869 bhi.n 8011d96 <_dtoa_r+0x286>
8011cc2: 2b05 cmp r3, #5
8011cc4: bfc4 itt gt
8011cc6: 3b04 subgt r3, #4
8011cc8: 9306 strgt r3, [sp, #24]
8011cca: 9b06 ldr r3, [sp, #24]
8011ccc: f1a3 0302 sub.w r3, r3, #2
8011cd0: bfcc ite gt
8011cd2: 2500 movgt r5, #0
8011cd4: 2501 movle r5, #1
8011cd6: 2b03 cmp r3, #3
8011cd8: d868 bhi.n 8011dac <_dtoa_r+0x29c>
8011cda: e8df f003 tbb [pc, r3]
8011cde: 3a2d .short 0x3a2d
8011ce0: 5a38 .short 0x5a38
8011ce2: e9dd 5310 ldrd r5, r3, [sp, #64] ; 0x40
8011ce6: 441d add r5, r3
8011ce8: f205 4332 addw r3, r5, #1074 ; 0x432
8011cec: 2b20 cmp r3, #32
8011cee: bfc1 itttt gt
8011cf0: f1c3 0340 rsbgt r3, r3, #64 ; 0x40
8011cf4: f205 4012 addwgt r0, r5, #1042 ; 0x412
8011cf8: fa0b f303 lslgt.w r3, fp, r3
8011cfc: fa26 f000 lsrgt.w r0, r6, r0
8011d00: bfda itte le
8011d02: f1c3 0320 rsble r3, r3, #32
8011d06: fa06 f003 lslle.w r0, r6, r3
8011d0a: 4318 orrgt r0, r3
8011d0c: f7ee fc0a bl 8000524 <__aeabi_ui2d>
8011d10: 2301 movs r3, #1
8011d12: 4606 mov r6, r0
8011d14: f1a1 77f8 sub.w r7, r1, #32505856 ; 0x1f00000
8011d18: 3d01 subs r5, #1
8011d1a: 930e str r3, [sp, #56] ; 0x38
8011d1c: e76c b.n 8011bf8 <_dtoa_r+0xe8>
8011d1e: 2301 movs r3, #1
8011d20: e7b4 b.n 8011c8c <_dtoa_r+0x17c>
8011d22: 900b str r0, [sp, #44] ; 0x2c
8011d24: e7b3 b.n 8011c8e <_dtoa_r+0x17e>
8011d26: 9b04 ldr r3, [sp, #16]
8011d28: 9a00 ldr r2, [sp, #0]
8011d2a: 1a9b subs r3, r3, r2
8011d2c: 9304 str r3, [sp, #16]
8011d2e: 4253 negs r3, r2
8011d30: 9307 str r3, [sp, #28]
8011d32: 2300 movs r3, #0
8011d34: 930a str r3, [sp, #40] ; 0x28
8011d36: e7c1 b.n 8011cbc <_dtoa_r+0x1ac>
8011d38: 2300 movs r3, #0
8011d3a: 9308 str r3, [sp, #32]
8011d3c: 9b09 ldr r3, [sp, #36] ; 0x24
8011d3e: 2b00 cmp r3, #0
8011d40: dc37 bgt.n 8011db2 <_dtoa_r+0x2a2>
8011d42: 2301 movs r3, #1
8011d44: e9cd 3302 strd r3, r3, [sp, #8]
8011d48: 461a mov r2, r3
8011d4a: 9209 str r2, [sp, #36] ; 0x24
8011d4c: e00c b.n 8011d68 <_dtoa_r+0x258>
8011d4e: 2301 movs r3, #1
8011d50: e7f3 b.n 8011d3a <_dtoa_r+0x22a>
8011d52: 2300 movs r3, #0
8011d54: 9a09 ldr r2, [sp, #36] ; 0x24
8011d56: 9308 str r3, [sp, #32]
8011d58: 9b00 ldr r3, [sp, #0]
8011d5a: 4413 add r3, r2
8011d5c: 9302 str r3, [sp, #8]
8011d5e: 3301 adds r3, #1
8011d60: 2b01 cmp r3, #1
8011d62: 9303 str r3, [sp, #12]
8011d64: bfb8 it lt
8011d66: 2301 movlt r3, #1
8011d68: 2200 movs r2, #0
8011d6a: 6462 str r2, [r4, #68] ; 0x44
8011d6c: 2204 movs r2, #4
8011d6e: f102 0014 add.w r0, r2, #20
8011d72: 4298 cmp r0, r3
8011d74: 6c61 ldr r1, [r4, #68] ; 0x44
8011d76: d920 bls.n 8011dba <_dtoa_r+0x2aa>
8011d78: 4620 mov r0, r4
8011d7a: f001 f9cb bl 8013114 <_Balloc>
8011d7e: 9001 str r0, [sp, #4]
8011d80: 2800 cmp r0, #0
8011d82: d13d bne.n 8011e00 <_dtoa_r+0x2f0>
8011d84: 4b1c ldr r3, [pc, #112] ; (8011df8 <_dtoa_r+0x2e8>)
8011d86: 4602 mov r2, r0
8011d88: f44f 71d5 mov.w r1, #426 ; 0x1aa
8011d8c: 481b ldr r0, [pc, #108] ; (8011dfc <_dtoa_r+0x2ec>)
8011d8e: f002 faff bl 8014390 <__assert_func>
8011d92: 2301 movs r3, #1
8011d94: e7de b.n 8011d54 <_dtoa_r+0x244>
8011d96: 2501 movs r5, #1
8011d98: 2300 movs r3, #0
8011d9a: 9306 str r3, [sp, #24]
8011d9c: 9508 str r5, [sp, #32]
8011d9e: f04f 33ff mov.w r3, #4294967295
8011da2: e9cd 3302 strd r3, r3, [sp, #8]
8011da6: 2200 movs r2, #0
8011da8: 2312 movs r3, #18
8011daa: e7ce b.n 8011d4a <_dtoa_r+0x23a>
8011dac: 2301 movs r3, #1
8011dae: 9308 str r3, [sp, #32]
8011db0: e7f5 b.n 8011d9e <_dtoa_r+0x28e>
8011db2: 9b09 ldr r3, [sp, #36] ; 0x24
8011db4: e9cd 3302 strd r3, r3, [sp, #8]
8011db8: e7d6 b.n 8011d68 <_dtoa_r+0x258>
8011dba: 3101 adds r1, #1
8011dbc: 6461 str r1, [r4, #68] ; 0x44
8011dbe: 0052 lsls r2, r2, #1
8011dc0: e7d5 b.n 8011d6e <_dtoa_r+0x25e>
8011dc2: bf00 nop
8011dc4: f3af 8000 nop.w
8011dc8: 636f4361 .word 0x636f4361
8011dcc: 3fd287a7 .word 0x3fd287a7
8011dd0: 8b60c8b3 .word 0x8b60c8b3
8011dd4: 3fc68a28 .word 0x3fc68a28
8011dd8: 509f79fb .word 0x509f79fb
8011ddc: 3fd34413 .word 0x3fd34413
8011de0: 7ff00000 .word 0x7ff00000
8011de4: 08017f4c .word 0x08017f4c
8011de8: 08017f50 .word 0x08017f50
8011dec: 08017f2b .word 0x08017f2b
8011df0: 3ff80000 .word 0x3ff80000
8011df4: 08018050 .word 0x08018050
8011df8: 08017f59 .word 0x08017f59
8011dfc: 08017f6a .word 0x08017f6a
8011e00: 9b01 ldr r3, [sp, #4]
8011e02: 6423 str r3, [r4, #64] ; 0x40
8011e04: 9b03 ldr r3, [sp, #12]
8011e06: 2b0e cmp r3, #14
8011e08: f200 809d bhi.w 8011f46 <_dtoa_r+0x436>
8011e0c: 2d00 cmp r5, #0
8011e0e: f000 809a beq.w 8011f46 <_dtoa_r+0x436>
8011e12: 9b00 ldr r3, [sp, #0]
8011e14: 2b00 cmp r3, #0
8011e16: dd32 ble.n 8011e7e <_dtoa_r+0x36e>
8011e18: 4ab7 ldr r2, [pc, #732] ; (80120f8 <_dtoa_r+0x5e8>)
8011e1a: f003 030f and.w r3, r3, #15
8011e1e: eb02 03c3 add.w r3, r2, r3, lsl #3
8011e22: e9d3 8900 ldrd r8, r9, [r3]
8011e26: 9b00 ldr r3, [sp, #0]
8011e28: 05d8 lsls r0, r3, #23
8011e2a: ea4f 1723 mov.w r7, r3, asr #4
8011e2e: d516 bpl.n 8011e5e <_dtoa_r+0x34e>
8011e30: 4bb2 ldr r3, [pc, #712] ; (80120fc <_dtoa_r+0x5ec>)
8011e32: ec51 0b19 vmov r0, r1, d9
8011e36: e9d3 2308 ldrd r2, r3, [r3, #32]
8011e3a: f7ee fd17 bl 800086c <__aeabi_ddiv>
8011e3e: f007 070f and.w r7, r7, #15
8011e42: 4682 mov sl, r0
8011e44: 468b mov fp, r1
8011e46: 2503 movs r5, #3
8011e48: 4eac ldr r6, [pc, #688] ; (80120fc <_dtoa_r+0x5ec>)
8011e4a: b957 cbnz r7, 8011e62 <_dtoa_r+0x352>
8011e4c: 4642 mov r2, r8
8011e4e: 464b mov r3, r9
8011e50: 4650 mov r0, sl
8011e52: 4659 mov r1, fp
8011e54: f7ee fd0a bl 800086c <__aeabi_ddiv>
8011e58: 4682 mov sl, r0
8011e5a: 468b mov fp, r1
8011e5c: e028 b.n 8011eb0 <_dtoa_r+0x3a0>
8011e5e: 2502 movs r5, #2
8011e60: e7f2 b.n 8011e48 <_dtoa_r+0x338>
8011e62: 07f9 lsls r1, r7, #31
8011e64: d508 bpl.n 8011e78 <_dtoa_r+0x368>
8011e66: 4640 mov r0, r8
8011e68: 4649 mov r1, r9
8011e6a: e9d6 2300 ldrd r2, r3, [r6]
8011e6e: f7ee fbd3 bl 8000618 <__aeabi_dmul>
8011e72: 3501 adds r5, #1
8011e74: 4680 mov r8, r0
8011e76: 4689 mov r9, r1
8011e78: 107f asrs r7, r7, #1
8011e7a: 3608 adds r6, #8
8011e7c: e7e5 b.n 8011e4a <_dtoa_r+0x33a>
8011e7e: f000 809b beq.w 8011fb8 <_dtoa_r+0x4a8>
8011e82: 9b00 ldr r3, [sp, #0]
8011e84: 4f9d ldr r7, [pc, #628] ; (80120fc <_dtoa_r+0x5ec>)
8011e86: 425e negs r6, r3
8011e88: 4b9b ldr r3, [pc, #620] ; (80120f8 <_dtoa_r+0x5e8>)
8011e8a: f006 020f and.w r2, r6, #15
8011e8e: eb03 03c2 add.w r3, r3, r2, lsl #3
8011e92: e9d3 2300 ldrd r2, r3, [r3]
8011e96: ec51 0b19 vmov r0, r1, d9
8011e9a: f7ee fbbd bl 8000618 <__aeabi_dmul>
8011e9e: 1136 asrs r6, r6, #4
8011ea0: 4682 mov sl, r0
8011ea2: 468b mov fp, r1
8011ea4: 2300 movs r3, #0
8011ea6: 2502 movs r5, #2
8011ea8: 2e00 cmp r6, #0
8011eaa: d17a bne.n 8011fa2 <_dtoa_r+0x492>
8011eac: 2b00 cmp r3, #0
8011eae: d1d3 bne.n 8011e58 <_dtoa_r+0x348>
8011eb0: 9b0b ldr r3, [sp, #44] ; 0x2c
8011eb2: 2b00 cmp r3, #0
8011eb4: f000 8082 beq.w 8011fbc <_dtoa_r+0x4ac>
8011eb8: 4b91 ldr r3, [pc, #580] ; (8012100 <_dtoa_r+0x5f0>)
8011eba: 2200 movs r2, #0
8011ebc: 4650 mov r0, sl
8011ebe: 4659 mov r1, fp
8011ec0: f7ee fe1c bl 8000afc <__aeabi_dcmplt>
8011ec4: 2800 cmp r0, #0
8011ec6: d079 beq.n 8011fbc <_dtoa_r+0x4ac>
8011ec8: 9b03 ldr r3, [sp, #12]
8011eca: 2b00 cmp r3, #0
8011ecc: d076 beq.n 8011fbc <_dtoa_r+0x4ac>
8011ece: 9b02 ldr r3, [sp, #8]
8011ed0: 2b00 cmp r3, #0
8011ed2: dd36 ble.n 8011f42 <_dtoa_r+0x432>
8011ed4: 9b00 ldr r3, [sp, #0]
8011ed6: 4650 mov r0, sl
8011ed8: 4659 mov r1, fp
8011eda: 1e5f subs r7, r3, #1
8011edc: 2200 movs r2, #0
8011ede: 4b89 ldr r3, [pc, #548] ; (8012104 <_dtoa_r+0x5f4>)
8011ee0: f7ee fb9a bl 8000618 <__aeabi_dmul>
8011ee4: 9e02 ldr r6, [sp, #8]
8011ee6: 4682 mov sl, r0
8011ee8: 468b mov fp, r1
8011eea: 3501 adds r5, #1
8011eec: 4628 mov r0, r5
8011eee: f7ee fb29 bl 8000544 <__aeabi_i2d>
8011ef2: 4652 mov r2, sl
8011ef4: 465b mov r3, fp
8011ef6: f7ee fb8f bl 8000618 <__aeabi_dmul>
8011efa: 4b83 ldr r3, [pc, #524] ; (8012108 <_dtoa_r+0x5f8>)
8011efc: 2200 movs r2, #0
8011efe: f7ee f9d5 bl 80002ac <__adddf3>
8011f02: 46d0 mov r8, sl
8011f04: 46d9 mov r9, fp
8011f06: 4682 mov sl, r0
8011f08: f1a1 7b50 sub.w fp, r1, #54525952 ; 0x3400000
8011f0c: 2e00 cmp r6, #0
8011f0e: d158 bne.n 8011fc2 <_dtoa_r+0x4b2>
8011f10: 4b7e ldr r3, [pc, #504] ; (801210c <_dtoa_r+0x5fc>)
8011f12: 2200 movs r2, #0
8011f14: 4640 mov r0, r8
8011f16: 4649 mov r1, r9
8011f18: f7ee f9c6 bl 80002a8 <__aeabi_dsub>
8011f1c: 4652 mov r2, sl
8011f1e: 465b mov r3, fp
8011f20: 4680 mov r8, r0
8011f22: 4689 mov r9, r1
8011f24: f7ee fe08 bl 8000b38 <__aeabi_dcmpgt>
8011f28: 2800 cmp r0, #0
8011f2a: f040 8296 bne.w 801245a <_dtoa_r+0x94a>
8011f2e: 4652 mov r2, sl
8011f30: f10b 4300 add.w r3, fp, #2147483648 ; 0x80000000
8011f34: 4640 mov r0, r8
8011f36: 4649 mov r1, r9
8011f38: f7ee fde0 bl 8000afc <__aeabi_dcmplt>
8011f3c: 2800 cmp r0, #0
8011f3e: f040 828a bne.w 8012456 <_dtoa_r+0x946>
8011f42: ec5b ab19 vmov sl, fp, d9
8011f46: 9b11 ldr r3, [sp, #68] ; 0x44
8011f48: 2b00 cmp r3, #0
8011f4a: f2c0 8149 blt.w 80121e0 <_dtoa_r+0x6d0>
8011f4e: 9a00 ldr r2, [sp, #0]
8011f50: 2a0e cmp r2, #14
8011f52: f300 8145 bgt.w 80121e0 <_dtoa_r+0x6d0>
8011f56: 4b68 ldr r3, [pc, #416] ; (80120f8 <_dtoa_r+0x5e8>)
8011f58: eb03 03c2 add.w r3, r3, r2, lsl #3
8011f5c: e9d3 8900 ldrd r8, r9, [r3]
8011f60: 9b09 ldr r3, [sp, #36] ; 0x24
8011f62: 2b00 cmp r3, #0
8011f64: f280 80d6 bge.w 8012114 <_dtoa_r+0x604>
8011f68: 9b03 ldr r3, [sp, #12]
8011f6a: 2b00 cmp r3, #0
8011f6c: f300 80d2 bgt.w 8012114 <_dtoa_r+0x604>
8011f70: f040 8270 bne.w 8012454 <_dtoa_r+0x944>
8011f74: 4b65 ldr r3, [pc, #404] ; (801210c <_dtoa_r+0x5fc>)
8011f76: 2200 movs r2, #0
8011f78: 4640 mov r0, r8
8011f7a: 4649 mov r1, r9
8011f7c: f7ee fb4c bl 8000618 <__aeabi_dmul>
8011f80: 4652 mov r2, sl
8011f82: 465b mov r3, fp
8011f84: f7ee fdce bl 8000b24 <__aeabi_dcmpge>
8011f88: 9e03 ldr r6, [sp, #12]
8011f8a: 4637 mov r7, r6
8011f8c: 2800 cmp r0, #0
8011f8e: f040 8246 bne.w 801241e <_dtoa_r+0x90e>
8011f92: 9d01 ldr r5, [sp, #4]
8011f94: 2331 movs r3, #49 ; 0x31
8011f96: f805 3b01 strb.w r3, [r5], #1
8011f9a: 9b00 ldr r3, [sp, #0]
8011f9c: 3301 adds r3, #1
8011f9e: 9300 str r3, [sp, #0]
8011fa0: e241 b.n 8012426 <_dtoa_r+0x916>
8011fa2: 07f2 lsls r2, r6, #31
8011fa4: d505 bpl.n 8011fb2 <_dtoa_r+0x4a2>
8011fa6: e9d7 2300 ldrd r2, r3, [r7]
8011faa: f7ee fb35 bl 8000618 <__aeabi_dmul>
8011fae: 3501 adds r5, #1
8011fb0: 2301 movs r3, #1
8011fb2: 1076 asrs r6, r6, #1
8011fb4: 3708 adds r7, #8
8011fb6: e777 b.n 8011ea8 <_dtoa_r+0x398>
8011fb8: 2502 movs r5, #2
8011fba: e779 b.n 8011eb0 <_dtoa_r+0x3a0>
8011fbc: 9f00 ldr r7, [sp, #0]
8011fbe: 9e03 ldr r6, [sp, #12]
8011fc0: e794 b.n 8011eec <_dtoa_r+0x3dc>
8011fc2: 9901 ldr r1, [sp, #4]
8011fc4: 4b4c ldr r3, [pc, #304] ; (80120f8 <_dtoa_r+0x5e8>)
8011fc6: 4431 add r1, r6
8011fc8: 910d str r1, [sp, #52] ; 0x34
8011fca: 9908 ldr r1, [sp, #32]
8011fcc: eb03 03c6 add.w r3, r3, r6, lsl #3
8011fd0: e953 2302 ldrd r2, r3, [r3, #-8]
8011fd4: 2900 cmp r1, #0
8011fd6: d043 beq.n 8012060 <_dtoa_r+0x550>
8011fd8: 494d ldr r1, [pc, #308] ; (8012110 <_dtoa_r+0x600>)
8011fda: 2000 movs r0, #0
8011fdc: f7ee fc46 bl 800086c <__aeabi_ddiv>
8011fe0: 4652 mov r2, sl
8011fe2: 465b mov r3, fp
8011fe4: f7ee f960 bl 80002a8 <__aeabi_dsub>
8011fe8: 9d01 ldr r5, [sp, #4]
8011fea: 4682 mov sl, r0
8011fec: 468b mov fp, r1
8011fee: 4649 mov r1, r9
8011ff0: 4640 mov r0, r8
8011ff2: f7ee fdc1 bl 8000b78 <__aeabi_d2iz>
8011ff6: 4606 mov r6, r0
8011ff8: f7ee faa4 bl 8000544 <__aeabi_i2d>
8011ffc: 4602 mov r2, r0
8011ffe: 460b mov r3, r1
8012000: 4640 mov r0, r8
8012002: 4649 mov r1, r9
8012004: f7ee f950 bl 80002a8 <__aeabi_dsub>
8012008: 3630 adds r6, #48 ; 0x30
801200a: f805 6b01 strb.w r6, [r5], #1
801200e: 4652 mov r2, sl
8012010: 465b mov r3, fp
8012012: 4680 mov r8, r0
8012014: 4689 mov r9, r1
8012016: f7ee fd71 bl 8000afc <__aeabi_dcmplt>
801201a: 2800 cmp r0, #0
801201c: d163 bne.n 80120e6 <_dtoa_r+0x5d6>
801201e: 4642 mov r2, r8
8012020: 464b mov r3, r9
8012022: 4937 ldr r1, [pc, #220] ; (8012100 <_dtoa_r+0x5f0>)
8012024: 2000 movs r0, #0
8012026: f7ee f93f bl 80002a8 <__aeabi_dsub>
801202a: 4652 mov r2, sl
801202c: 465b mov r3, fp
801202e: f7ee fd65 bl 8000afc <__aeabi_dcmplt>
8012032: 2800 cmp r0, #0
8012034: f040 80b6 bne.w 80121a4 <_dtoa_r+0x694>
8012038: 9b0d ldr r3, [sp, #52] ; 0x34
801203a: 429d cmp r5, r3
801203c: d081 beq.n 8011f42 <_dtoa_r+0x432>
801203e: 4b31 ldr r3, [pc, #196] ; (8012104 <_dtoa_r+0x5f4>)
8012040: 2200 movs r2, #0
8012042: 4650 mov r0, sl
8012044: 4659 mov r1, fp
8012046: f7ee fae7 bl 8000618 <__aeabi_dmul>
801204a: 4b2e ldr r3, [pc, #184] ; (8012104 <_dtoa_r+0x5f4>)
801204c: 4682 mov sl, r0
801204e: 468b mov fp, r1
8012050: 4640 mov r0, r8
8012052: 4649 mov r1, r9
8012054: 2200 movs r2, #0
8012056: f7ee fadf bl 8000618 <__aeabi_dmul>
801205a: 4680 mov r8, r0
801205c: 4689 mov r9, r1
801205e: e7c6 b.n 8011fee <_dtoa_r+0x4de>
8012060: 4650 mov r0, sl
8012062: 4659 mov r1, fp
8012064: f7ee fad8 bl 8000618 <__aeabi_dmul>
8012068: 9b0d ldr r3, [sp, #52] ; 0x34
801206a: 9d01 ldr r5, [sp, #4]
801206c: 930f str r3, [sp, #60] ; 0x3c
801206e: 4682 mov sl, r0
8012070: 468b mov fp, r1
8012072: 4649 mov r1, r9
8012074: 4640 mov r0, r8
8012076: f7ee fd7f bl 8000b78 <__aeabi_d2iz>
801207a: 4606 mov r6, r0
801207c: f7ee fa62 bl 8000544 <__aeabi_i2d>
8012080: 3630 adds r6, #48 ; 0x30
8012082: 4602 mov r2, r0
8012084: 460b mov r3, r1
8012086: 4640 mov r0, r8
8012088: 4649 mov r1, r9
801208a: f7ee f90d bl 80002a8 <__aeabi_dsub>
801208e: f805 6b01 strb.w r6, [r5], #1
8012092: 9b0d ldr r3, [sp, #52] ; 0x34
8012094: 429d cmp r5, r3
8012096: 4680 mov r8, r0
8012098: 4689 mov r9, r1
801209a: f04f 0200 mov.w r2, #0
801209e: d124 bne.n 80120ea <_dtoa_r+0x5da>
80120a0: 4b1b ldr r3, [pc, #108] ; (8012110 <_dtoa_r+0x600>)
80120a2: 4650 mov r0, sl
80120a4: 4659 mov r1, fp
80120a6: f7ee f901 bl 80002ac <__adddf3>
80120aa: 4602 mov r2, r0
80120ac: 460b mov r3, r1
80120ae: 4640 mov r0, r8
80120b0: 4649 mov r1, r9
80120b2: f7ee fd41 bl 8000b38 <__aeabi_dcmpgt>
80120b6: 2800 cmp r0, #0
80120b8: d174 bne.n 80121a4 <_dtoa_r+0x694>
80120ba: 4652 mov r2, sl
80120bc: 465b mov r3, fp
80120be: 4914 ldr r1, [pc, #80] ; (8012110 <_dtoa_r+0x600>)
80120c0: 2000 movs r0, #0
80120c2: f7ee f8f1 bl 80002a8 <__aeabi_dsub>
80120c6: 4602 mov r2, r0
80120c8: 460b mov r3, r1
80120ca: 4640 mov r0, r8
80120cc: 4649 mov r1, r9
80120ce: f7ee fd15 bl 8000afc <__aeabi_dcmplt>
80120d2: 2800 cmp r0, #0
80120d4: f43f af35 beq.w 8011f42 <_dtoa_r+0x432>
80120d8: 9d0f ldr r5, [sp, #60] ; 0x3c
80120da: 1e6b subs r3, r5, #1
80120dc: 930f str r3, [sp, #60] ; 0x3c
80120de: f815 3c01 ldrb.w r3, [r5, #-1]
80120e2: 2b30 cmp r3, #48 ; 0x30
80120e4: d0f8 beq.n 80120d8 <_dtoa_r+0x5c8>
80120e6: 9700 str r7, [sp, #0]
80120e8: e04a b.n 8012180 <_dtoa_r+0x670>
80120ea: 4b06 ldr r3, [pc, #24] ; (8012104 <_dtoa_r+0x5f4>)
80120ec: f7ee fa94 bl 8000618 <__aeabi_dmul>
80120f0: 4680 mov r8, r0
80120f2: 4689 mov r9, r1
80120f4: e7bd b.n 8012072 <_dtoa_r+0x562>
80120f6: bf00 nop
80120f8: 08018050 .word 0x08018050
80120fc: 08018028 .word 0x08018028
8012100: 3ff00000 .word 0x3ff00000
8012104: 40240000 .word 0x40240000
8012108: 401c0000 .word 0x401c0000
801210c: 40140000 .word 0x40140000
8012110: 3fe00000 .word 0x3fe00000
8012114: 9d01 ldr r5, [sp, #4]
8012116: 4656 mov r6, sl
8012118: 465f mov r7, fp
801211a: 4642 mov r2, r8
801211c: 464b mov r3, r9
801211e: 4630 mov r0, r6
8012120: 4639 mov r1, r7
8012122: f7ee fba3 bl 800086c <__aeabi_ddiv>
8012126: f7ee fd27 bl 8000b78 <__aeabi_d2iz>
801212a: 4682 mov sl, r0
801212c: f7ee fa0a bl 8000544 <__aeabi_i2d>
8012130: 4642 mov r2, r8
8012132: 464b mov r3, r9
8012134: f7ee fa70 bl 8000618 <__aeabi_dmul>
8012138: 4602 mov r2, r0
801213a: 460b mov r3, r1
801213c: 4630 mov r0, r6
801213e: 4639 mov r1, r7
8012140: f10a 0630 add.w r6, sl, #48 ; 0x30
8012144: f7ee f8b0 bl 80002a8 <__aeabi_dsub>
8012148: f805 6b01 strb.w r6, [r5], #1
801214c: 9e01 ldr r6, [sp, #4]
801214e: 9f03 ldr r7, [sp, #12]
8012150: 1bae subs r6, r5, r6
8012152: 42b7 cmp r7, r6
8012154: 4602 mov r2, r0
8012156: 460b mov r3, r1
8012158: d135 bne.n 80121c6 <_dtoa_r+0x6b6>
801215a: f7ee f8a7 bl 80002ac <__adddf3>
801215e: 4642 mov r2, r8
8012160: 464b mov r3, r9
8012162: 4606 mov r6, r0
8012164: 460f mov r7, r1
8012166: f7ee fce7 bl 8000b38 <__aeabi_dcmpgt>
801216a: b9d0 cbnz r0, 80121a2 <_dtoa_r+0x692>
801216c: 4642 mov r2, r8
801216e: 464b mov r3, r9
8012170: 4630 mov r0, r6
8012172: 4639 mov r1, r7
8012174: f7ee fcb8 bl 8000ae8 <__aeabi_dcmpeq>
8012178: b110 cbz r0, 8012180 <_dtoa_r+0x670>
801217a: f01a 0f01 tst.w sl, #1
801217e: d110 bne.n 80121a2 <_dtoa_r+0x692>
8012180: 4620 mov r0, r4
8012182: ee18 1a10 vmov r1, s16
8012186: f000 ffea bl 801315e <_Bfree>
801218a: 2300 movs r3, #0
801218c: 9800 ldr r0, [sp, #0]
801218e: 702b strb r3, [r5, #0]
8012190: 9b0c ldr r3, [sp, #48] ; 0x30
8012192: 3001 adds r0, #1
8012194: 6018 str r0, [r3, #0]
8012196: 9b21 ldr r3, [sp, #132] ; 0x84
8012198: 2b00 cmp r3, #0
801219a: f43f acf2 beq.w 8011b82 <_dtoa_r+0x72>
801219e: 601d str r5, [r3, #0]
80121a0: e4ef b.n 8011b82 <_dtoa_r+0x72>
80121a2: 9f00 ldr r7, [sp, #0]
80121a4: 462b mov r3, r5
80121a6: 461d mov r5, r3
80121a8: f813 2d01 ldrb.w r2, [r3, #-1]!
80121ac: 2a39 cmp r2, #57 ; 0x39
80121ae: d106 bne.n 80121be <_dtoa_r+0x6ae>
80121b0: 9a01 ldr r2, [sp, #4]
80121b2: 429a cmp r2, r3
80121b4: d1f7 bne.n 80121a6 <_dtoa_r+0x696>
80121b6: 9901 ldr r1, [sp, #4]
80121b8: 2230 movs r2, #48 ; 0x30
80121ba: 3701 adds r7, #1
80121bc: 700a strb r2, [r1, #0]
80121be: 781a ldrb r2, [r3, #0]
80121c0: 3201 adds r2, #1
80121c2: 701a strb r2, [r3, #0]
80121c4: e78f b.n 80120e6 <_dtoa_r+0x5d6>
80121c6: 4ba6 ldr r3, [pc, #664] ; (8012460 <_dtoa_r+0x950>)
80121c8: 2200 movs r2, #0
80121ca: f7ee fa25 bl 8000618 <__aeabi_dmul>
80121ce: 2200 movs r2, #0
80121d0: 2300 movs r3, #0
80121d2: 4606 mov r6, r0
80121d4: 460f mov r7, r1
80121d6: f7ee fc87 bl 8000ae8 <__aeabi_dcmpeq>
80121da: 2800 cmp r0, #0
80121dc: d09d beq.n 801211a <_dtoa_r+0x60a>
80121de: e7cf b.n 8012180 <_dtoa_r+0x670>
80121e0: 9a08 ldr r2, [sp, #32]
80121e2: 2a00 cmp r2, #0
80121e4: f000 80d7 beq.w 8012396 <_dtoa_r+0x886>
80121e8: 9a06 ldr r2, [sp, #24]
80121ea: 2a01 cmp r2, #1
80121ec: f300 80ba bgt.w 8012364 <_dtoa_r+0x854>
80121f0: 9a0e ldr r2, [sp, #56] ; 0x38
80121f2: 2a00 cmp r2, #0
80121f4: f000 80b2 beq.w 801235c <_dtoa_r+0x84c>
80121f8: f203 4333 addw r3, r3, #1075 ; 0x433
80121fc: 9e07 ldr r6, [sp, #28]
80121fe: 9d04 ldr r5, [sp, #16]
8012200: 9a04 ldr r2, [sp, #16]
8012202: 441a add r2, r3
8012204: 9204 str r2, [sp, #16]
8012206: 9a05 ldr r2, [sp, #20]
8012208: 2101 movs r1, #1
801220a: 441a add r2, r3
801220c: 4620 mov r0, r4
801220e: 9205 str r2, [sp, #20]
8012210: f001 f844 bl 801329c <__i2b>
8012214: 4607 mov r7, r0
8012216: 2d00 cmp r5, #0
8012218: dd0c ble.n 8012234 <_dtoa_r+0x724>
801221a: 9b05 ldr r3, [sp, #20]
801221c: 2b00 cmp r3, #0
801221e: dd09 ble.n 8012234 <_dtoa_r+0x724>
8012220: 42ab cmp r3, r5
8012222: 9a04 ldr r2, [sp, #16]
8012224: bfa8 it ge
8012226: 462b movge r3, r5
8012228: 1ad2 subs r2, r2, r3
801222a: 9204 str r2, [sp, #16]
801222c: 9a05 ldr r2, [sp, #20]
801222e: 1aed subs r5, r5, r3
8012230: 1ad3 subs r3, r2, r3
8012232: 9305 str r3, [sp, #20]
8012234: 9b07 ldr r3, [sp, #28]
8012236: b31b cbz r3, 8012280 <_dtoa_r+0x770>
8012238: 9b08 ldr r3, [sp, #32]
801223a: 2b00 cmp r3, #0
801223c: f000 80af beq.w 801239e <_dtoa_r+0x88e>
8012240: 2e00 cmp r6, #0
8012242: dd13 ble.n 801226c <_dtoa_r+0x75c>
8012244: 4639 mov r1, r7
8012246: 4632 mov r2, r6
8012248: 4620 mov r0, r4
801224a: f001 f8e7 bl 801341c <__pow5mult>
801224e: ee18 2a10 vmov r2, s16
8012252: 4601 mov r1, r0
8012254: 4607 mov r7, r0
8012256: 4620 mov r0, r4
8012258: f001 f836 bl 80132c8 <__multiply>
801225c: ee18 1a10 vmov r1, s16
8012260: 4680 mov r8, r0
8012262: 4620 mov r0, r4
8012264: f000 ff7b bl 801315e <_Bfree>
8012268: ee08 8a10 vmov s16, r8
801226c: 9b07 ldr r3, [sp, #28]
801226e: 1b9a subs r2, r3, r6
8012270: d006 beq.n 8012280 <_dtoa_r+0x770>
8012272: ee18 1a10 vmov r1, s16
8012276: 4620 mov r0, r4
8012278: f001 f8d0 bl 801341c <__pow5mult>
801227c: ee08 0a10 vmov s16, r0
8012280: 2101 movs r1, #1
8012282: 4620 mov r0, r4
8012284: f001 f80a bl 801329c <__i2b>
8012288: 9b0a ldr r3, [sp, #40] ; 0x28
801228a: 2b00 cmp r3, #0
801228c: 4606 mov r6, r0
801228e: f340 8088 ble.w 80123a2 <_dtoa_r+0x892>
8012292: 461a mov r2, r3
8012294: 4601 mov r1, r0
8012296: 4620 mov r0, r4
8012298: f001 f8c0 bl 801341c <__pow5mult>
801229c: 9b06 ldr r3, [sp, #24]
801229e: 2b01 cmp r3, #1
80122a0: 4606 mov r6, r0
80122a2: f340 8081 ble.w 80123a8 <_dtoa_r+0x898>
80122a6: f04f 0800 mov.w r8, #0
80122aa: 6933 ldr r3, [r6, #16]
80122ac: eb06 0383 add.w r3, r6, r3, lsl #2
80122b0: 6918 ldr r0, [r3, #16]
80122b2: f000 ffa3 bl 80131fc <__hi0bits>
80122b6: f1c0 0020 rsb r0, r0, #32
80122ba: 9b05 ldr r3, [sp, #20]
80122bc: 4418 add r0, r3
80122be: f010 001f ands.w r0, r0, #31
80122c2: f000 8092 beq.w 80123ea <_dtoa_r+0x8da>
80122c6: f1c0 0320 rsb r3, r0, #32
80122ca: 2b04 cmp r3, #4
80122cc: f340 808a ble.w 80123e4 <_dtoa_r+0x8d4>
80122d0: f1c0 001c rsb r0, r0, #28
80122d4: 9b04 ldr r3, [sp, #16]
80122d6: 4403 add r3, r0
80122d8: 9304 str r3, [sp, #16]
80122da: 9b05 ldr r3, [sp, #20]
80122dc: 4403 add r3, r0
80122de: 4405 add r5, r0
80122e0: 9305 str r3, [sp, #20]
80122e2: 9b04 ldr r3, [sp, #16]
80122e4: 2b00 cmp r3, #0
80122e6: dd07 ble.n 80122f8 <_dtoa_r+0x7e8>
80122e8: ee18 1a10 vmov r1, s16
80122ec: 461a mov r2, r3
80122ee: 4620 mov r0, r4
80122f0: f001 f8d4 bl 801349c <__lshift>
80122f4: ee08 0a10 vmov s16, r0
80122f8: 9b05 ldr r3, [sp, #20]
80122fa: 2b00 cmp r3, #0
80122fc: dd05 ble.n 801230a <_dtoa_r+0x7fa>
80122fe: 4631 mov r1, r6
8012300: 461a mov r2, r3
8012302: 4620 mov r0, r4
8012304: f001 f8ca bl 801349c <__lshift>
8012308: 4606 mov r6, r0
801230a: 9b0b ldr r3, [sp, #44] ; 0x2c
801230c: 2b00 cmp r3, #0
801230e: d06e beq.n 80123ee <_dtoa_r+0x8de>
8012310: ee18 0a10 vmov r0, s16
8012314: 4631 mov r1, r6
8012316: f001 f931 bl 801357c <__mcmp>
801231a: 2800 cmp r0, #0
801231c: da67 bge.n 80123ee <_dtoa_r+0x8de>
801231e: 9b00 ldr r3, [sp, #0]
8012320: 3b01 subs r3, #1
8012322: ee18 1a10 vmov r1, s16
8012326: 9300 str r3, [sp, #0]
8012328: 220a movs r2, #10
801232a: 2300 movs r3, #0
801232c: 4620 mov r0, r4
801232e: f000 ff1f bl 8013170 <__multadd>
8012332: 9b08 ldr r3, [sp, #32]
8012334: ee08 0a10 vmov s16, r0
8012338: 2b00 cmp r3, #0
801233a: f000 81b0 beq.w 801269e <_dtoa_r+0xb8e>
801233e: 2300 movs r3, #0
8012340: 4639 mov r1, r7
8012342: 220a movs r2, #10
8012344: 4620 mov r0, r4
8012346: f000 ff13 bl 8013170 <__multadd>
801234a: 9b02 ldr r3, [sp, #8]
801234c: 2b00 cmp r3, #0
801234e: 4607 mov r7, r0
8012350: f300 808e bgt.w 8012470 <_dtoa_r+0x960>
8012354: 9b06 ldr r3, [sp, #24]
8012356: 2b02 cmp r3, #2
8012358: dc51 bgt.n 80123fe <_dtoa_r+0x8ee>
801235a: e089 b.n 8012470 <_dtoa_r+0x960>
801235c: 9b10 ldr r3, [sp, #64] ; 0x40
801235e: f1c3 0336 rsb r3, r3, #54 ; 0x36
8012362: e74b b.n 80121fc <_dtoa_r+0x6ec>
8012364: 9b03 ldr r3, [sp, #12]
8012366: 1e5e subs r6, r3, #1
8012368: 9b07 ldr r3, [sp, #28]
801236a: 42b3 cmp r3, r6
801236c: bfbf itttt lt
801236e: 9b07 ldrlt r3, [sp, #28]
8012370: 9607 strlt r6, [sp, #28]
8012372: 1af2 sublt r2, r6, r3
8012374: 9b0a ldrlt r3, [sp, #40] ; 0x28
8012376: bfb6 itet lt
8012378: 189b addlt r3, r3, r2
801237a: 1b9e subge r6, r3, r6
801237c: 930a strlt r3, [sp, #40] ; 0x28
801237e: 9b03 ldr r3, [sp, #12]
8012380: bfb8 it lt
8012382: 2600 movlt r6, #0
8012384: 2b00 cmp r3, #0
8012386: bfb7 itett lt
8012388: e9dd 2303 ldrdlt r2, r3, [sp, #12]
801238c: e9dd 3503 ldrdge r3, r5, [sp, #12]
8012390: 1a9d sublt r5, r3, r2
8012392: 2300 movlt r3, #0
8012394: e734 b.n 8012200 <_dtoa_r+0x6f0>
8012396: 9e07 ldr r6, [sp, #28]
8012398: 9d04 ldr r5, [sp, #16]
801239a: 9f08 ldr r7, [sp, #32]
801239c: e73b b.n 8012216 <_dtoa_r+0x706>
801239e: 9a07 ldr r2, [sp, #28]
80123a0: e767 b.n 8012272 <_dtoa_r+0x762>
80123a2: 9b06 ldr r3, [sp, #24]
80123a4: 2b01 cmp r3, #1
80123a6: dc18 bgt.n 80123da <_dtoa_r+0x8ca>
80123a8: f1ba 0f00 cmp.w sl, #0
80123ac: d115 bne.n 80123da <_dtoa_r+0x8ca>
80123ae: f3cb 0313 ubfx r3, fp, #0, #20
80123b2: b993 cbnz r3, 80123da <_dtoa_r+0x8ca>
80123b4: f02b 4300 bic.w r3, fp, #2147483648 ; 0x80000000
80123b8: 0d1b lsrs r3, r3, #20
80123ba: 051b lsls r3, r3, #20
80123bc: b183 cbz r3, 80123e0 <_dtoa_r+0x8d0>
80123be: 9b04 ldr r3, [sp, #16]
80123c0: 3301 adds r3, #1
80123c2: 9304 str r3, [sp, #16]
80123c4: 9b05 ldr r3, [sp, #20]
80123c6: 3301 adds r3, #1
80123c8: 9305 str r3, [sp, #20]
80123ca: f04f 0801 mov.w r8, #1
80123ce: 9b0a ldr r3, [sp, #40] ; 0x28
80123d0: 2b00 cmp r3, #0
80123d2: f47f af6a bne.w 80122aa <_dtoa_r+0x79a>
80123d6: 2001 movs r0, #1
80123d8: e76f b.n 80122ba <_dtoa_r+0x7aa>
80123da: f04f 0800 mov.w r8, #0
80123de: e7f6 b.n 80123ce <_dtoa_r+0x8be>
80123e0: 4698 mov r8, r3
80123e2: e7f4 b.n 80123ce <_dtoa_r+0x8be>
80123e4: f43f af7d beq.w 80122e2 <_dtoa_r+0x7d2>
80123e8: 4618 mov r0, r3
80123ea: 301c adds r0, #28
80123ec: e772 b.n 80122d4 <_dtoa_r+0x7c4>
80123ee: 9b03 ldr r3, [sp, #12]
80123f0: 2b00 cmp r3, #0
80123f2: dc37 bgt.n 8012464 <_dtoa_r+0x954>
80123f4: 9b06 ldr r3, [sp, #24]
80123f6: 2b02 cmp r3, #2
80123f8: dd34 ble.n 8012464 <_dtoa_r+0x954>
80123fa: 9b03 ldr r3, [sp, #12]
80123fc: 9302 str r3, [sp, #8]
80123fe: 9b02 ldr r3, [sp, #8]
8012400: b96b cbnz r3, 801241e <_dtoa_r+0x90e>
8012402: 4631 mov r1, r6
8012404: 2205 movs r2, #5
8012406: 4620 mov r0, r4
8012408: f000 feb2 bl 8013170 <__multadd>
801240c: 4601 mov r1, r0
801240e: 4606 mov r6, r0
8012410: ee18 0a10 vmov r0, s16
8012414: f001 f8b2 bl 801357c <__mcmp>
8012418: 2800 cmp r0, #0
801241a: f73f adba bgt.w 8011f92 <_dtoa_r+0x482>
801241e: 9b09 ldr r3, [sp, #36] ; 0x24
8012420: 9d01 ldr r5, [sp, #4]
8012422: 43db mvns r3, r3
8012424: 9300 str r3, [sp, #0]
8012426: f04f 0800 mov.w r8, #0
801242a: 4631 mov r1, r6
801242c: 4620 mov r0, r4
801242e: f000 fe96 bl 801315e <_Bfree>
8012432: 2f00 cmp r7, #0
8012434: f43f aea4 beq.w 8012180 <_dtoa_r+0x670>
8012438: f1b8 0f00 cmp.w r8, #0
801243c: d005 beq.n 801244a <_dtoa_r+0x93a>
801243e: 45b8 cmp r8, r7
8012440: d003 beq.n 801244a <_dtoa_r+0x93a>
8012442: 4641 mov r1, r8
8012444: 4620 mov r0, r4
8012446: f000 fe8a bl 801315e <_Bfree>
801244a: 4639 mov r1, r7
801244c: 4620 mov r0, r4
801244e: f000 fe86 bl 801315e <_Bfree>
8012452: e695 b.n 8012180 <_dtoa_r+0x670>
8012454: 2600 movs r6, #0
8012456: 4637 mov r7, r6
8012458: e7e1 b.n 801241e <_dtoa_r+0x90e>
801245a: 9700 str r7, [sp, #0]
801245c: 4637 mov r7, r6
801245e: e598 b.n 8011f92 <_dtoa_r+0x482>
8012460: 40240000 .word 0x40240000
8012464: 9b08 ldr r3, [sp, #32]
8012466: 2b00 cmp r3, #0
8012468: f000 80c9 beq.w 80125fe <_dtoa_r+0xaee>
801246c: 9b03 ldr r3, [sp, #12]
801246e: 9302 str r3, [sp, #8]
8012470: 2d00 cmp r5, #0
8012472: dd05 ble.n 8012480 <_dtoa_r+0x970>
8012474: 4639 mov r1, r7
8012476: 462a mov r2, r5
8012478: 4620 mov r0, r4
801247a: f001 f80f bl 801349c <__lshift>
801247e: 4607 mov r7, r0
8012480: f1b8 0f00 cmp.w r8, #0
8012484: d05a beq.n 801253c <_dtoa_r+0xa2c>
8012486: 6879 ldr r1, [r7, #4]
8012488: 4620 mov r0, r4
801248a: f000 fe43 bl 8013114 <_Balloc>
801248e: 4605 mov r5, r0
8012490: b920 cbnz r0, 801249c <_dtoa_r+0x98c>
8012492: 4b87 ldr r3, [pc, #540] ; (80126b0 <_dtoa_r+0xba0>)
8012494: 4602 mov r2, r0
8012496: f240 21ea movw r1, #746 ; 0x2ea
801249a: e477 b.n 8011d8c <_dtoa_r+0x27c>
801249c: 693a ldr r2, [r7, #16]
801249e: 3202 adds r2, #2
80124a0: 0092 lsls r2, r2, #2
80124a2: f107 010c add.w r1, r7, #12
80124a6: 300c adds r0, #12
80124a8: f7fd ff62 bl 8010370 <memcpy>
80124ac: 2201 movs r2, #1
80124ae: 4629 mov r1, r5
80124b0: 4620 mov r0, r4
80124b2: f000 fff3 bl 801349c <__lshift>
80124b6: 9b01 ldr r3, [sp, #4]
80124b8: f103 0901 add.w r9, r3, #1
80124bc: e9dd 2301 ldrd r2, r3, [sp, #4]
80124c0: 4413 add r3, r2
80124c2: 9305 str r3, [sp, #20]
80124c4: f00a 0301 and.w r3, sl, #1
80124c8: 46b8 mov r8, r7
80124ca: 9304 str r3, [sp, #16]
80124cc: 4607 mov r7, r0
80124ce: 4631 mov r1, r6
80124d0: ee18 0a10 vmov r0, s16
80124d4: f7ff fa8e bl 80119f4 <quorem>
80124d8: 4641 mov r1, r8
80124da: 9002 str r0, [sp, #8]
80124dc: f100 0a30 add.w sl, r0, #48 ; 0x30
80124e0: ee18 0a10 vmov r0, s16
80124e4: f001 f84a bl 801357c <__mcmp>
80124e8: 463a mov r2, r7
80124ea: 9003 str r0, [sp, #12]
80124ec: 4631 mov r1, r6
80124ee: 4620 mov r0, r4
80124f0: f001 f860 bl 80135b4 <__mdiff>
80124f4: 68c2 ldr r2, [r0, #12]
80124f6: f109 3bff add.w fp, r9, #4294967295
80124fa: 4605 mov r5, r0
80124fc: bb02 cbnz r2, 8012540 <_dtoa_r+0xa30>
80124fe: 4601 mov r1, r0
8012500: ee18 0a10 vmov r0, s16
8012504: f001 f83a bl 801357c <__mcmp>
8012508: 4602 mov r2, r0
801250a: 4629 mov r1, r5
801250c: 4620 mov r0, r4
801250e: 9207 str r2, [sp, #28]
8012510: f000 fe25 bl 801315e <_Bfree>
8012514: e9dd 3206 ldrd r3, r2, [sp, #24]
8012518: ea43 0102 orr.w r1, r3, r2
801251c: 9b04 ldr r3, [sp, #16]
801251e: 430b orrs r3, r1
8012520: 464d mov r5, r9
8012522: d10f bne.n 8012544 <_dtoa_r+0xa34>
8012524: f1ba 0f39 cmp.w sl, #57 ; 0x39
8012528: d02a beq.n 8012580 <_dtoa_r+0xa70>
801252a: 9b03 ldr r3, [sp, #12]
801252c: 2b00 cmp r3, #0
801252e: dd02 ble.n 8012536 <_dtoa_r+0xa26>
8012530: 9b02 ldr r3, [sp, #8]
8012532: f103 0a31 add.w sl, r3, #49 ; 0x31
8012536: f88b a000 strb.w sl, [fp]
801253a: e776 b.n 801242a <_dtoa_r+0x91a>
801253c: 4638 mov r0, r7
801253e: e7ba b.n 80124b6 <_dtoa_r+0x9a6>
8012540: 2201 movs r2, #1
8012542: e7e2 b.n 801250a <_dtoa_r+0x9fa>
8012544: 9b03 ldr r3, [sp, #12]
8012546: 2b00 cmp r3, #0
8012548: db04 blt.n 8012554 <_dtoa_r+0xa44>
801254a: 9906 ldr r1, [sp, #24]
801254c: 430b orrs r3, r1
801254e: 9904 ldr r1, [sp, #16]
8012550: 430b orrs r3, r1
8012552: d122 bne.n 801259a <_dtoa_r+0xa8a>
8012554: 2a00 cmp r2, #0
8012556: ddee ble.n 8012536 <_dtoa_r+0xa26>
8012558: ee18 1a10 vmov r1, s16
801255c: 2201 movs r2, #1
801255e: 4620 mov r0, r4
8012560: f000 ff9c bl 801349c <__lshift>
8012564: 4631 mov r1, r6
8012566: ee08 0a10 vmov s16, r0
801256a: f001 f807 bl 801357c <__mcmp>
801256e: 2800 cmp r0, #0
8012570: dc03 bgt.n 801257a <_dtoa_r+0xa6a>
8012572: d1e0 bne.n 8012536 <_dtoa_r+0xa26>
8012574: f01a 0f01 tst.w sl, #1
8012578: d0dd beq.n 8012536 <_dtoa_r+0xa26>
801257a: f1ba 0f39 cmp.w sl, #57 ; 0x39
801257e: d1d7 bne.n 8012530 <_dtoa_r+0xa20>
8012580: 2339 movs r3, #57 ; 0x39
8012582: f88b 3000 strb.w r3, [fp]
8012586: 462b mov r3, r5
8012588: 461d mov r5, r3
801258a: 3b01 subs r3, #1
801258c: f815 2c01 ldrb.w r2, [r5, #-1]
8012590: 2a39 cmp r2, #57 ; 0x39
8012592: d071 beq.n 8012678 <_dtoa_r+0xb68>
8012594: 3201 adds r2, #1
8012596: 701a strb r2, [r3, #0]
8012598: e747 b.n 801242a <_dtoa_r+0x91a>
801259a: 2a00 cmp r2, #0
801259c: dd07 ble.n 80125ae <_dtoa_r+0xa9e>
801259e: f1ba 0f39 cmp.w sl, #57 ; 0x39
80125a2: d0ed beq.n 8012580 <_dtoa_r+0xa70>
80125a4: f10a 0301 add.w r3, sl, #1
80125a8: f88b 3000 strb.w r3, [fp]
80125ac: e73d b.n 801242a <_dtoa_r+0x91a>
80125ae: 9b05 ldr r3, [sp, #20]
80125b0: f809 ac01 strb.w sl, [r9, #-1]
80125b4: 4599 cmp r9, r3
80125b6: d047 beq.n 8012648 <_dtoa_r+0xb38>
80125b8: ee18 1a10 vmov r1, s16
80125bc: 2300 movs r3, #0
80125be: 220a movs r2, #10
80125c0: 4620 mov r0, r4
80125c2: f000 fdd5 bl 8013170 <__multadd>
80125c6: 45b8 cmp r8, r7
80125c8: ee08 0a10 vmov s16, r0
80125cc: f04f 0300 mov.w r3, #0
80125d0: f04f 020a mov.w r2, #10
80125d4: 4641 mov r1, r8
80125d6: 4620 mov r0, r4
80125d8: d106 bne.n 80125e8 <_dtoa_r+0xad8>
80125da: f000 fdc9 bl 8013170 <__multadd>
80125de: 4680 mov r8, r0
80125e0: 4607 mov r7, r0
80125e2: f109 0901 add.w r9, r9, #1
80125e6: e772 b.n 80124ce <_dtoa_r+0x9be>
80125e8: f000 fdc2 bl 8013170 <__multadd>
80125ec: 4639 mov r1, r7
80125ee: 4680 mov r8, r0
80125f0: 2300 movs r3, #0
80125f2: 220a movs r2, #10
80125f4: 4620 mov r0, r4
80125f6: f000 fdbb bl 8013170 <__multadd>
80125fa: 4607 mov r7, r0
80125fc: e7f1 b.n 80125e2 <_dtoa_r+0xad2>
80125fe: 9b03 ldr r3, [sp, #12]
8012600: 9302 str r3, [sp, #8]
8012602: 9d01 ldr r5, [sp, #4]
8012604: ee18 0a10 vmov r0, s16
8012608: 4631 mov r1, r6
801260a: f7ff f9f3 bl 80119f4 <quorem>
801260e: f100 0a30 add.w sl, r0, #48 ; 0x30
8012612: 9b01 ldr r3, [sp, #4]
8012614: f805 ab01 strb.w sl, [r5], #1
8012618: 1aea subs r2, r5, r3
801261a: 9b02 ldr r3, [sp, #8]
801261c: 4293 cmp r3, r2
801261e: dd09 ble.n 8012634 <_dtoa_r+0xb24>
8012620: ee18 1a10 vmov r1, s16
8012624: 2300 movs r3, #0
8012626: 220a movs r2, #10
8012628: 4620 mov r0, r4
801262a: f000 fda1 bl 8013170 <__multadd>
801262e: ee08 0a10 vmov s16, r0
8012632: e7e7 b.n 8012604 <_dtoa_r+0xaf4>
8012634: 9b02 ldr r3, [sp, #8]
8012636: 2b00 cmp r3, #0
8012638: bfc8 it gt
801263a: 461d movgt r5, r3
801263c: 9b01 ldr r3, [sp, #4]
801263e: bfd8 it le
8012640: 2501 movle r5, #1
8012642: 441d add r5, r3
8012644: f04f 0800 mov.w r8, #0
8012648: ee18 1a10 vmov r1, s16
801264c: 2201 movs r2, #1
801264e: 4620 mov r0, r4
8012650: f000 ff24 bl 801349c <__lshift>
8012654: 4631 mov r1, r6
8012656: ee08 0a10 vmov s16, r0
801265a: f000 ff8f bl 801357c <__mcmp>
801265e: 2800 cmp r0, #0
8012660: dc91 bgt.n 8012586 <_dtoa_r+0xa76>
8012662: d102 bne.n 801266a <_dtoa_r+0xb5a>
8012664: f01a 0f01 tst.w sl, #1
8012668: d18d bne.n 8012586 <_dtoa_r+0xa76>
801266a: 462b mov r3, r5
801266c: 461d mov r5, r3
801266e: f813 2d01 ldrb.w r2, [r3, #-1]!
8012672: 2a30 cmp r2, #48 ; 0x30
8012674: d0fa beq.n 801266c <_dtoa_r+0xb5c>
8012676: e6d8 b.n 801242a <_dtoa_r+0x91a>
8012678: 9a01 ldr r2, [sp, #4]
801267a: 429a cmp r2, r3
801267c: d184 bne.n 8012588 <_dtoa_r+0xa78>
801267e: 9b00 ldr r3, [sp, #0]
8012680: 3301 adds r3, #1
8012682: 9300 str r3, [sp, #0]
8012684: 2331 movs r3, #49 ; 0x31
8012686: 7013 strb r3, [r2, #0]
8012688: e6cf b.n 801242a <_dtoa_r+0x91a>
801268a: 4b0a ldr r3, [pc, #40] ; (80126b4 <_dtoa_r+0xba4>)
801268c: f7ff ba97 b.w 8011bbe <_dtoa_r+0xae>
8012690: 9b21 ldr r3, [sp, #132] ; 0x84
8012692: 2b00 cmp r3, #0
8012694: f47f aa7b bne.w 8011b8e <_dtoa_r+0x7e>
8012698: 4b07 ldr r3, [pc, #28] ; (80126b8 <_dtoa_r+0xba8>)
801269a: f7ff ba90 b.w 8011bbe <_dtoa_r+0xae>
801269e: 9b02 ldr r3, [sp, #8]
80126a0: 2b00 cmp r3, #0
80126a2: dcae bgt.n 8012602 <_dtoa_r+0xaf2>
80126a4: 9b06 ldr r3, [sp, #24]
80126a6: 2b02 cmp r3, #2
80126a8: f73f aea9 bgt.w 80123fe <_dtoa_r+0x8ee>
80126ac: e7a9 b.n 8012602 <_dtoa_r+0xaf2>
80126ae: bf00 nop
80126b0: 08017f59 .word 0x08017f59
80126b4: 08017f2a .word 0x08017f2a
80126b8: 08017f50 .word 0x08017f50
080126bc <__errno>:
80126bc: 4b01 ldr r3, [pc, #4] ; (80126c4 <__errno+0x8>)
80126be: 6818 ldr r0, [r3, #0]
80126c0: 4770 bx lr
80126c2: bf00 nop
80126c4: 20000030 .word 0x20000030
080126c8 <__sflush_r>:
80126c8: 898b ldrh r3, [r1, #12]
80126ca: f9b1 200c ldrsh.w r2, [r1, #12]
80126ce: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
80126d2: 4605 mov r5, r0
80126d4: 0718 lsls r0, r3, #28
80126d6: 460c mov r4, r1
80126d8: d45f bmi.n 801279a <__sflush_r+0xd2>
80126da: 684b ldr r3, [r1, #4]
80126dc: f442 6200 orr.w r2, r2, #2048 ; 0x800
80126e0: 2b00 cmp r3, #0
80126e2: 818a strh r2, [r1, #12]
80126e4: dc05 bgt.n 80126f2 <__sflush_r+0x2a>
80126e6: 6bcb ldr r3, [r1, #60] ; 0x3c
80126e8: 2b00 cmp r3, #0
80126ea: dc02 bgt.n 80126f2 <__sflush_r+0x2a>
80126ec: 2000 movs r0, #0
80126ee: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
80126f2: 6aa6 ldr r6, [r4, #40] ; 0x28
80126f4: 2e00 cmp r6, #0
80126f6: d0f9 beq.n 80126ec <__sflush_r+0x24>
80126f8: 2300 movs r3, #0
80126fa: f412 5280 ands.w r2, r2, #4096 ; 0x1000
80126fe: 682f ldr r7, [r5, #0]
8012700: 602b str r3, [r5, #0]
8012702: d036 beq.n 8012772 <__sflush_r+0xaa>
8012704: 6d20 ldr r0, [r4, #80] ; 0x50
8012706: 89a3 ldrh r3, [r4, #12]
8012708: 075a lsls r2, r3, #29
801270a: d505 bpl.n 8012718 <__sflush_r+0x50>
801270c: 6863 ldr r3, [r4, #4]
801270e: 1ac0 subs r0, r0, r3
8012710: 6b23 ldr r3, [r4, #48] ; 0x30
8012712: b10b cbz r3, 8012718 <__sflush_r+0x50>
8012714: 6be3 ldr r3, [r4, #60] ; 0x3c
8012716: 1ac0 subs r0, r0, r3
8012718: 2300 movs r3, #0
801271a: 4602 mov r2, r0
801271c: 6aa6 ldr r6, [r4, #40] ; 0x28
801271e: 69e1 ldr r1, [r4, #28]
8012720: 4628 mov r0, r5
8012722: 47b0 blx r6
8012724: 1c43 adds r3, r0, #1
8012726: 89a3 ldrh r3, [r4, #12]
8012728: d106 bne.n 8012738 <__sflush_r+0x70>
801272a: 6829 ldr r1, [r5, #0]
801272c: 291d cmp r1, #29
801272e: d830 bhi.n 8012792 <__sflush_r+0xca>
8012730: 4a2b ldr r2, [pc, #172] ; (80127e0 <__sflush_r+0x118>)
8012732: 40ca lsrs r2, r1
8012734: 07d6 lsls r6, r2, #31
8012736: d52c bpl.n 8012792 <__sflush_r+0xca>
8012738: f423 6300 bic.w r3, r3, #2048 ; 0x800
801273c: b21b sxth r3, r3
801273e: 2200 movs r2, #0
8012740: 6062 str r2, [r4, #4]
8012742: 04d9 lsls r1, r3, #19
8012744: 6922 ldr r2, [r4, #16]
8012746: 81a3 strh r3, [r4, #12]
8012748: 6022 str r2, [r4, #0]
801274a: d504 bpl.n 8012756 <__sflush_r+0x8e>
801274c: 1c42 adds r2, r0, #1
801274e: d101 bne.n 8012754 <__sflush_r+0x8c>
8012750: 682b ldr r3, [r5, #0]
8012752: b903 cbnz r3, 8012756 <__sflush_r+0x8e>
8012754: 6520 str r0, [r4, #80] ; 0x50
8012756: 6b21 ldr r1, [r4, #48] ; 0x30
8012758: 602f str r7, [r5, #0]
801275a: 2900 cmp r1, #0
801275c: d0c6 beq.n 80126ec <__sflush_r+0x24>
801275e: f104 0340 add.w r3, r4, #64 ; 0x40
8012762: 4299 cmp r1, r3
8012764: d002 beq.n 801276c <__sflush_r+0xa4>
8012766: 4628 mov r0, r5
8012768: f000 f938 bl 80129dc <_free_r>
801276c: 2000 movs r0, #0
801276e: 6320 str r0, [r4, #48] ; 0x30
8012770: e7bd b.n 80126ee <__sflush_r+0x26>
8012772: 69e1 ldr r1, [r4, #28]
8012774: 2301 movs r3, #1
8012776: 4628 mov r0, r5
8012778: 47b0 blx r6
801277a: 1c41 adds r1, r0, #1
801277c: d1c3 bne.n 8012706 <__sflush_r+0x3e>
801277e: 682b ldr r3, [r5, #0]
8012780: 2b00 cmp r3, #0
8012782: d0c0 beq.n 8012706 <__sflush_r+0x3e>
8012784: 2b1d cmp r3, #29
8012786: d001 beq.n 801278c <__sflush_r+0xc4>
8012788: 2b16 cmp r3, #22
801278a: d101 bne.n 8012790 <__sflush_r+0xc8>
801278c: 602f str r7, [r5, #0]
801278e: e7ad b.n 80126ec <__sflush_r+0x24>
8012790: 89a3 ldrh r3, [r4, #12]
8012792: f043 0340 orr.w r3, r3, #64 ; 0x40
8012796: 81a3 strh r3, [r4, #12]
8012798: e7a9 b.n 80126ee <__sflush_r+0x26>
801279a: 690f ldr r7, [r1, #16]
801279c: 2f00 cmp r7, #0
801279e: d0a5 beq.n 80126ec <__sflush_r+0x24>
80127a0: 079b lsls r3, r3, #30
80127a2: 680e ldr r6, [r1, #0]
80127a4: bf08 it eq
80127a6: 694b ldreq r3, [r1, #20]
80127a8: 600f str r7, [r1, #0]
80127aa: bf18 it ne
80127ac: 2300 movne r3, #0
80127ae: eba6 0807 sub.w r8, r6, r7
80127b2: 608b str r3, [r1, #8]
80127b4: f1b8 0f00 cmp.w r8, #0
80127b8: dd98 ble.n 80126ec <__sflush_r+0x24>
80127ba: 69e1 ldr r1, [r4, #28]
80127bc: 6a66 ldr r6, [r4, #36] ; 0x24
80127be: 4643 mov r3, r8
80127c0: 463a mov r2, r7
80127c2: 4628 mov r0, r5
80127c4: 47b0 blx r6
80127c6: 2800 cmp r0, #0
80127c8: dc06 bgt.n 80127d8 <__sflush_r+0x110>
80127ca: 89a3 ldrh r3, [r4, #12]
80127cc: f043 0340 orr.w r3, r3, #64 ; 0x40
80127d0: 81a3 strh r3, [r4, #12]
80127d2: f04f 30ff mov.w r0, #4294967295
80127d6: e78a b.n 80126ee <__sflush_r+0x26>
80127d8: 4407 add r7, r0
80127da: eba8 0800 sub.w r8, r8, r0
80127de: e7e9 b.n 80127b4 <__sflush_r+0xec>
80127e0: 20400001 .word 0x20400001
080127e4 <_fflush_r>:
80127e4: b538 push {r3, r4, r5, lr}
80127e6: 460c mov r4, r1
80127e8: 4605 mov r5, r0
80127ea: b118 cbz r0, 80127f4 <_fflush_r+0x10>
80127ec: 6b83 ldr r3, [r0, #56] ; 0x38
80127ee: b90b cbnz r3, 80127f4 <_fflush_r+0x10>
80127f0: f000 f864 bl 80128bc <__sinit>
80127f4: f9b4 300c ldrsh.w r3, [r4, #12]
80127f8: b1bb cbz r3, 801282a <_fflush_r+0x46>
80127fa: 6e62 ldr r2, [r4, #100] ; 0x64
80127fc: 07d0 lsls r0, r2, #31
80127fe: d404 bmi.n 801280a <_fflush_r+0x26>
8012800: 0599 lsls r1, r3, #22
8012802: d402 bmi.n 801280a <_fflush_r+0x26>
8012804: 6da0 ldr r0, [r4, #88] ; 0x58
8012806: f000 f9cf bl 8012ba8 <__retarget_lock_acquire_recursive>
801280a: 4628 mov r0, r5
801280c: 4621 mov r1, r4
801280e: f7ff ff5b bl 80126c8 <__sflush_r>
8012812: 6e63 ldr r3, [r4, #100] ; 0x64
8012814: 07da lsls r2, r3, #31
8012816: 4605 mov r5, r0
8012818: d405 bmi.n 8012826 <_fflush_r+0x42>
801281a: 89a3 ldrh r3, [r4, #12]
801281c: 059b lsls r3, r3, #22
801281e: d402 bmi.n 8012826 <_fflush_r+0x42>
8012820: 6da0 ldr r0, [r4, #88] ; 0x58
8012822: f000 f9c2 bl 8012baa <__retarget_lock_release_recursive>
8012826: 4628 mov r0, r5
8012828: bd38 pop {r3, r4, r5, pc}
801282a: 461d mov r5, r3
801282c: e7fb b.n 8012826 <_fflush_r+0x42>
...
08012830 <std>:
8012830: 2300 movs r3, #0
8012832: b510 push {r4, lr}
8012834: 4604 mov r4, r0
8012836: e9c0 3300 strd r3, r3, [r0]
801283a: e9c0 3304 strd r3, r3, [r0, #16]
801283e: 6083 str r3, [r0, #8]
8012840: 8181 strh r1, [r0, #12]
8012842: 6643 str r3, [r0, #100] ; 0x64
8012844: 81c2 strh r2, [r0, #14]
8012846: 6183 str r3, [r0, #24]
8012848: 4619 mov r1, r3
801284a: 2208 movs r2, #8
801284c: 305c adds r0, #92 ; 0x5c
801284e: f7fd fdb7 bl 80103c0 <memset>
8012852: 4b07 ldr r3, [pc, #28] ; (8012870 <std+0x40>)
8012854: 6223 str r3, [r4, #32]
8012856: 4b07 ldr r3, [pc, #28] ; (8012874 <std+0x44>)
8012858: 6263 str r3, [r4, #36] ; 0x24
801285a: 4b07 ldr r3, [pc, #28] ; (8012878 <std+0x48>)
801285c: 62a3 str r3, [r4, #40] ; 0x28
801285e: 4b07 ldr r3, [pc, #28] ; (801287c <std+0x4c>)
8012860: 61e4 str r4, [r4, #28]
8012862: 62e3 str r3, [r4, #44] ; 0x2c
8012864: f104 0058 add.w r0, r4, #88 ; 0x58
8012868: e8bd 4010 ldmia.w sp!, {r4, lr}
801286c: f000 b99a b.w 8012ba4 <__retarget_lock_init_recursive>
8012870: 08013811 .word 0x08013811
8012874: 08013833 .word 0x08013833
8012878: 0801386b .word 0x0801386b
801287c: 0801388f .word 0x0801388f
08012880 <_cleanup_r>:
8012880: 4901 ldr r1, [pc, #4] ; (8012888 <_cleanup_r+0x8>)
8012882: f000 b96b b.w 8012b5c <_fwalk_reent>
8012886: bf00 nop
8012888: 08014459 .word 0x08014459
0801288c <__sfp_lock_acquire>:
801288c: 4801 ldr r0, [pc, #4] ; (8012894 <__sfp_lock_acquire+0x8>)
801288e: f000 b98b b.w 8012ba8 <__retarget_lock_acquire_recursive>
8012892: bf00 nop
8012894: 20008d90 .word 0x20008d90
08012898 <__sfp_lock_release>:
8012898: 4801 ldr r0, [pc, #4] ; (80128a0 <__sfp_lock_release+0x8>)
801289a: f000 b986 b.w 8012baa <__retarget_lock_release_recursive>
801289e: bf00 nop
80128a0: 20008d90 .word 0x20008d90
080128a4 <__sinit_lock_acquire>:
80128a4: 4801 ldr r0, [pc, #4] ; (80128ac <__sinit_lock_acquire+0x8>)
80128a6: f000 b97f b.w 8012ba8 <__retarget_lock_acquire_recursive>
80128aa: bf00 nop
80128ac: 20008d91 .word 0x20008d91
080128b0 <__sinit_lock_release>:
80128b0: 4801 ldr r0, [pc, #4] ; (80128b8 <__sinit_lock_release+0x8>)
80128b2: f000 b97a b.w 8012baa <__retarget_lock_release_recursive>
80128b6: bf00 nop
80128b8: 20008d91 .word 0x20008d91
080128bc <__sinit>:
80128bc: b510 push {r4, lr}
80128be: 4604 mov r4, r0
80128c0: f7ff fff0 bl 80128a4 <__sinit_lock_acquire>
80128c4: 6ba2 ldr r2, [r4, #56] ; 0x38
80128c6: b11a cbz r2, 80128d0 <__sinit+0x14>
80128c8: e8bd 4010 ldmia.w sp!, {r4, lr}
80128cc: f7ff bff0 b.w 80128b0 <__sinit_lock_release>
80128d0: 4b0d ldr r3, [pc, #52] ; (8012908 <__sinit+0x4c>)
80128d2: 63e3 str r3, [r4, #60] ; 0x3c
80128d4: 2303 movs r3, #3
80128d6: f8c4 32e4 str.w r3, [r4, #740] ; 0x2e4
80128da: f504 733b add.w r3, r4, #748 ; 0x2ec
80128de: f8c4 32e8 str.w r3, [r4, #744] ; 0x2e8
80128e2: 6860 ldr r0, [r4, #4]
80128e4: f8c4 22e0 str.w r2, [r4, #736] ; 0x2e0
80128e8: 2104 movs r1, #4
80128ea: f7ff ffa1 bl 8012830 <std>
80128ee: 68a0 ldr r0, [r4, #8]
80128f0: 2201 movs r2, #1
80128f2: 2109 movs r1, #9
80128f4: f7ff ff9c bl 8012830 <std>
80128f8: 68e0 ldr r0, [r4, #12]
80128fa: 2202 movs r2, #2
80128fc: 2112 movs r1, #18
80128fe: f7ff ff97 bl 8012830 <std>
8012902: 2301 movs r3, #1
8012904: 63a3 str r3, [r4, #56] ; 0x38
8012906: e7df b.n 80128c8 <__sinit+0xc>
8012908: 08012881 .word 0x08012881
0801290c <__libc_fini_array>:
801290c: b538 push {r3, r4, r5, lr}
801290e: 4d07 ldr r5, [pc, #28] ; (801292c <__libc_fini_array+0x20>)
8012910: 4c07 ldr r4, [pc, #28] ; (8012930 <__libc_fini_array+0x24>)
8012912: 1b64 subs r4, r4, r5
8012914: 10a4 asrs r4, r4, #2
8012916: b91c cbnz r4, 8012920 <__libc_fini_array+0x14>
8012918: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr}
801291c: f002 bace b.w 8014ebc <_fini>
8012920: 3c01 subs r4, #1
8012922: f855 3024 ldr.w r3, [r5, r4, lsl #2]
8012926: 4798 blx r3
8012928: e7f5 b.n 8012916 <__libc_fini_array+0xa>
801292a: bf00 nop
801292c: 0801819c .word 0x0801819c
8012930: 080181a0 .word 0x080181a0
08012934 <_malloc_trim_r>:
8012934: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
8012938: 4606 mov r6, r0
801293a: 2008 movs r0, #8
801293c: 460c mov r4, r1
801293e: f000 ffbd bl 80138bc <sysconf>
8012942: 4f23 ldr r7, [pc, #140] ; (80129d0 <_malloc_trim_r+0x9c>)
8012944: 4680 mov r8, r0
8012946: 4630 mov r0, r6
8012948: f000 fbd8 bl 80130fc <__malloc_lock>
801294c: 68bb ldr r3, [r7, #8]
801294e: 685d ldr r5, [r3, #4]
8012950: f025 0503 bic.w r5, r5, #3
8012954: 1b2c subs r4, r5, r4
8012956: 3c11 subs r4, #17
8012958: 4444 add r4, r8
801295a: fbb4 f4f8 udiv r4, r4, r8
801295e: 3c01 subs r4, #1
8012960: fb08 f404 mul.w r4, r8, r4
8012964: 45a0 cmp r8, r4
8012966: dd05 ble.n 8012974 <_malloc_trim_r+0x40>
8012968: 4630 mov r0, r6
801296a: f000 fbcd bl 8013108 <__malloc_unlock>
801296e: 2000 movs r0, #0
8012970: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
8012974: 2100 movs r1, #0
8012976: 4630 mov r0, r6
8012978: f000 ff3a bl 80137f0 <_sbrk_r>
801297c: 68bb ldr r3, [r7, #8]
801297e: 442b add r3, r5
8012980: 4298 cmp r0, r3
8012982: d1f1 bne.n 8012968 <_malloc_trim_r+0x34>
8012984: 4261 negs r1, r4
8012986: 4630 mov r0, r6
8012988: f000 ff32 bl 80137f0 <_sbrk_r>
801298c: 3001 adds r0, #1
801298e: d110 bne.n 80129b2 <_malloc_trim_r+0x7e>
8012990: 2100 movs r1, #0
8012992: 4630 mov r0, r6
8012994: f000 ff2c bl 80137f0 <_sbrk_r>
8012998: 68ba ldr r2, [r7, #8]
801299a: 1a83 subs r3, r0, r2
801299c: 2b0f cmp r3, #15
801299e: dde3 ble.n 8012968 <_malloc_trim_r+0x34>
80129a0: 490c ldr r1, [pc, #48] ; (80129d4 <_malloc_trim_r+0xa0>)
80129a2: 6809 ldr r1, [r1, #0]
80129a4: 1a40 subs r0, r0, r1
80129a6: 490c ldr r1, [pc, #48] ; (80129d8 <_malloc_trim_r+0xa4>)
80129a8: f043 0301 orr.w r3, r3, #1
80129ac: 6008 str r0, [r1, #0]
80129ae: 6053 str r3, [r2, #4]
80129b0: e7da b.n 8012968 <_malloc_trim_r+0x34>
80129b2: 68bb ldr r3, [r7, #8]
80129b4: 4a08 ldr r2, [pc, #32] ; (80129d8 <_malloc_trim_r+0xa4>)
80129b6: 1b2d subs r5, r5, r4
80129b8: f045 0501 orr.w r5, r5, #1
80129bc: 605d str r5, [r3, #4]
80129be: 6813 ldr r3, [r2, #0]
80129c0: 4630 mov r0, r6
80129c2: 1b1b subs r3, r3, r4
80129c4: 6013 str r3, [r2, #0]
80129c6: f000 fb9f bl 8013108 <__malloc_unlock>
80129ca: 2001 movs r0, #1
80129cc: e7d0 b.n 8012970 <_malloc_trim_r+0x3c>
80129ce: bf00 nop
80129d0: 20000464 .word 0x20000464
80129d4: 2000086c .word 0x2000086c
80129d8: 20008d94 .word 0x20008d94
080129dc <_free_r>:
80129dc: b5f8 push {r3, r4, r5, r6, r7, lr}
80129de: 4605 mov r5, r0
80129e0: 460f mov r7, r1
80129e2: 2900 cmp r1, #0
80129e4: f000 80b1 beq.w 8012b4a <_free_r+0x16e>
80129e8: f000 fb88 bl 80130fc <__malloc_lock>
80129ec: f857 2c04 ldr.w r2, [r7, #-4]
80129f0: 4856 ldr r0, [pc, #344] ; (8012b4c <_free_r+0x170>)
80129f2: f022 0401 bic.w r4, r2, #1
80129f6: f1a7 0308 sub.w r3, r7, #8
80129fa: eb03 0c04 add.w ip, r3, r4
80129fe: 6881 ldr r1, [r0, #8]
8012a00: f8dc 6004 ldr.w r6, [ip, #4]
8012a04: 4561 cmp r1, ip
8012a06: f026 0603 bic.w r6, r6, #3
8012a0a: f002 0201 and.w r2, r2, #1
8012a0e: d11b bne.n 8012a48 <_free_r+0x6c>
8012a10: 4434 add r4, r6
8012a12: b93a cbnz r2, 8012a24 <_free_r+0x48>
8012a14: f857 2c08 ldr.w r2, [r7, #-8]
8012a18: 1a9b subs r3, r3, r2
8012a1a: 4414 add r4, r2
8012a1c: e9d3 1202 ldrd r1, r2, [r3, #8]
8012a20: 60ca str r2, [r1, #12]
8012a22: 6091 str r1, [r2, #8]
8012a24: f044 0201 orr.w r2, r4, #1
8012a28: 605a str r2, [r3, #4]
8012a2a: 6083 str r3, [r0, #8]
8012a2c: 4b48 ldr r3, [pc, #288] ; (8012b50 <_free_r+0x174>)
8012a2e: 681b ldr r3, [r3, #0]
8012a30: 42a3 cmp r3, r4
8012a32: d804 bhi.n 8012a3e <_free_r+0x62>
8012a34: 4b47 ldr r3, [pc, #284] ; (8012b54 <_free_r+0x178>)
8012a36: 4628 mov r0, r5
8012a38: 6819 ldr r1, [r3, #0]
8012a3a: f7ff ff7b bl 8012934 <_malloc_trim_r>
8012a3e: 4628 mov r0, r5
8012a40: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr}
8012a44: f000 bb60 b.w 8013108 <__malloc_unlock>
8012a48: f8cc 6004 str.w r6, [ip, #4]
8012a4c: 2a00 cmp r2, #0
8012a4e: d138 bne.n 8012ac2 <_free_r+0xe6>
8012a50: f857 1c08 ldr.w r1, [r7, #-8]
8012a54: 1a5b subs r3, r3, r1
8012a56: 440c add r4, r1
8012a58: 6899 ldr r1, [r3, #8]
8012a5a: f100 0708 add.w r7, r0, #8
8012a5e: 42b9 cmp r1, r7
8012a60: d031 beq.n 8012ac6 <_free_r+0xea>
8012a62: 68df ldr r7, [r3, #12]
8012a64: 60cf str r7, [r1, #12]
8012a66: 60b9 str r1, [r7, #8]
8012a68: eb0c 0106 add.w r1, ip, r6
8012a6c: 6849 ldr r1, [r1, #4]
8012a6e: 07c9 lsls r1, r1, #31
8012a70: d40b bmi.n 8012a8a <_free_r+0xae>
8012a72: f8dc 1008 ldr.w r1, [ip, #8]
8012a76: 4434 add r4, r6
8012a78: bb3a cbnz r2, 8012aca <_free_r+0xee>
8012a7a: 4e37 ldr r6, [pc, #220] ; (8012b58 <_free_r+0x17c>)
8012a7c: 42b1 cmp r1, r6
8012a7e: d124 bne.n 8012aca <_free_r+0xee>
8012a80: e9c0 3304 strd r3, r3, [r0, #16]
8012a84: e9c3 1102 strd r1, r1, [r3, #8]
8012a88: 2201 movs r2, #1
8012a8a: f044 0101 orr.w r1, r4, #1
8012a8e: 6059 str r1, [r3, #4]
8012a90: 511c str r4, [r3, r4]
8012a92: 2a00 cmp r2, #0
8012a94: d1d3 bne.n 8012a3e <_free_r+0x62>
8012a96: f5b4 7f00 cmp.w r4, #512 ; 0x200
8012a9a: d21b bcs.n 8012ad4 <_free_r+0xf8>
8012a9c: 0961 lsrs r1, r4, #5
8012a9e: 08e2 lsrs r2, r4, #3
8012aa0: 2401 movs r4, #1
8012aa2: 408c lsls r4, r1
8012aa4: 6841 ldr r1, [r0, #4]
8012aa6: 3201 adds r2, #1
8012aa8: 430c orrs r4, r1
8012aaa: 6044 str r4, [r0, #4]
8012aac: eb00 01c2 add.w r1, r0, r2, lsl #3
8012ab0: f850 4032 ldr.w r4, [r0, r2, lsl #3]
8012ab4: 3908 subs r1, #8
8012ab6: e9c3 4102 strd r4, r1, [r3, #8]
8012aba: f840 3032 str.w r3, [r0, r2, lsl #3]
8012abe: 60e3 str r3, [r4, #12]
8012ac0: e7bd b.n 8012a3e <_free_r+0x62>
8012ac2: 2200 movs r2, #0
8012ac4: e7d0 b.n 8012a68 <_free_r+0x8c>
8012ac6: 2201 movs r2, #1
8012ac8: e7ce b.n 8012a68 <_free_r+0x8c>
8012aca: f8dc 600c ldr.w r6, [ip, #12]
8012ace: 60ce str r6, [r1, #12]
8012ad0: 60b1 str r1, [r6, #8]
8012ad2: e7da b.n 8012a8a <_free_r+0xae>
8012ad4: f5b4 6f20 cmp.w r4, #2560 ; 0xa00
8012ad8: ea4f 2254 mov.w r2, r4, lsr #9
8012adc: d214 bcs.n 8012b08 <_free_r+0x12c>
8012ade: 09a2 lsrs r2, r4, #6
8012ae0: 3238 adds r2, #56 ; 0x38
8012ae2: 1c51 adds r1, r2, #1
8012ae4: eb00 06c2 add.w r6, r0, r2, lsl #3
8012ae8: f850 1031 ldr.w r1, [r0, r1, lsl #3]
8012aec: 428e cmp r6, r1
8012aee: d125 bne.n 8012b3c <_free_r+0x160>
8012af0: 2401 movs r4, #1
8012af2: 1092 asrs r2, r2, #2
8012af4: fa04 f202 lsl.w r2, r4, r2
8012af8: 6844 ldr r4, [r0, #4]
8012afa: 4322 orrs r2, r4
8012afc: 6042 str r2, [r0, #4]
8012afe: e9c3 1602 strd r1, r6, [r3, #8]
8012b02: 60b3 str r3, [r6, #8]
8012b04: 60cb str r3, [r1, #12]
8012b06: e79a b.n 8012a3e <_free_r+0x62>
8012b08: 2a14 cmp r2, #20
8012b0a: d801 bhi.n 8012b10 <_free_r+0x134>
8012b0c: 325b adds r2, #91 ; 0x5b
8012b0e: e7e8 b.n 8012ae2 <_free_r+0x106>
8012b10: 2a54 cmp r2, #84 ; 0x54
8012b12: d802 bhi.n 8012b1a <_free_r+0x13e>
8012b14: 0b22 lsrs r2, r4, #12
8012b16: 326e adds r2, #110 ; 0x6e
8012b18: e7e3 b.n 8012ae2 <_free_r+0x106>
8012b1a: f5b2 7faa cmp.w r2, #340 ; 0x154
8012b1e: d802 bhi.n 8012b26 <_free_r+0x14a>
8012b20: 0be2 lsrs r2, r4, #15
8012b22: 3277 adds r2, #119 ; 0x77
8012b24: e7dd b.n 8012ae2 <_free_r+0x106>
8012b26: f240 5154 movw r1, #1364 ; 0x554
8012b2a: 428a cmp r2, r1
8012b2c: bf9a itte ls
8012b2e: 0ca2 lsrls r2, r4, #18
8012b30: 327c addls r2, #124 ; 0x7c
8012b32: 227e movhi r2, #126 ; 0x7e
8012b34: e7d5 b.n 8012ae2 <_free_r+0x106>
8012b36: 6889 ldr r1, [r1, #8]
8012b38: 428e cmp r6, r1
8012b3a: d004 beq.n 8012b46 <_free_r+0x16a>
8012b3c: 684a ldr r2, [r1, #4]
8012b3e: f022 0203 bic.w r2, r2, #3
8012b42: 42a2 cmp r2, r4
8012b44: d8f7 bhi.n 8012b36 <_free_r+0x15a>
8012b46: 68ce ldr r6, [r1, #12]
8012b48: e7d9 b.n 8012afe <_free_r+0x122>
8012b4a: bdf8 pop {r3, r4, r5, r6, r7, pc}
8012b4c: 20000464 .word 0x20000464
8012b50: 20000870 .word 0x20000870
8012b54: 20008dc4 .word 0x20008dc4
8012b58: 2000046c .word 0x2000046c
08012b5c <_fwalk_reent>:
8012b5c: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
8012b60: 4606 mov r6, r0
8012b62: 4688 mov r8, r1
8012b64: f500 7438 add.w r4, r0, #736 ; 0x2e0
8012b68: 2700 movs r7, #0
8012b6a: e9d4 9501 ldrd r9, r5, [r4, #4]
8012b6e: f1b9 0901 subs.w r9, r9, #1
8012b72: d505 bpl.n 8012b80 <_fwalk_reent+0x24>
8012b74: 6824 ldr r4, [r4, #0]
8012b76: 2c00 cmp r4, #0
8012b78: d1f7 bne.n 8012b6a <_fwalk_reent+0xe>
8012b7a: 4638 mov r0, r7
8012b7c: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
8012b80: 89ab ldrh r3, [r5, #12]
8012b82: 2b01 cmp r3, #1
8012b84: d907 bls.n 8012b96 <_fwalk_reent+0x3a>
8012b86: f9b5 300e ldrsh.w r3, [r5, #14]
8012b8a: 3301 adds r3, #1
8012b8c: d003 beq.n 8012b96 <_fwalk_reent+0x3a>
8012b8e: 4629 mov r1, r5
8012b90: 4630 mov r0, r6
8012b92: 47c0 blx r8
8012b94: 4307 orrs r7, r0
8012b96: 3568 adds r5, #104 ; 0x68
8012b98: e7e9 b.n 8012b6e <_fwalk_reent+0x12>
...
08012b9c <_localeconv_r>:
8012b9c: 4800 ldr r0, [pc, #0] ; (8012ba0 <_localeconv_r+0x4>)
8012b9e: 4770 bx lr
8012ba0: 20000964 .word 0x20000964
08012ba4 <__retarget_lock_init_recursive>:
8012ba4: 4770 bx lr
08012ba6 <__retarget_lock_close_recursive>:
8012ba6: 4770 bx lr
08012ba8 <__retarget_lock_acquire_recursive>:
8012ba8: 4770 bx lr
08012baa <__retarget_lock_release_recursive>:
8012baa: 4770 bx lr
08012bac <__swhatbuf_r>:
8012bac: b570 push {r4, r5, r6, lr}
8012bae: 460e mov r6, r1
8012bb0: f9b1 100e ldrsh.w r1, [r1, #14]
8012bb4: 2900 cmp r1, #0
8012bb6: b096 sub sp, #88 ; 0x58
8012bb8: 4614 mov r4, r2
8012bba: 461d mov r5, r3
8012bbc: da0a bge.n 8012bd4 <__swhatbuf_r+0x28>
8012bbe: f9b6 100c ldrsh.w r1, [r6, #12]
8012bc2: 2300 movs r3, #0
8012bc4: f011 0080 ands.w r0, r1, #128 ; 0x80
8012bc8: 602b str r3, [r5, #0]
8012bca: d116 bne.n 8012bfa <__swhatbuf_r+0x4e>
8012bcc: f44f 6380 mov.w r3, #1024 ; 0x400
8012bd0: 6023 str r3, [r4, #0]
8012bd2: e015 b.n 8012c00 <__swhatbuf_r+0x54>
8012bd4: 466a mov r2, sp
8012bd6: f001 fd15 bl 8014604 <_fstat_r>
8012bda: 2800 cmp r0, #0
8012bdc: dbef blt.n 8012bbe <__swhatbuf_r+0x12>
8012bde: 9a01 ldr r2, [sp, #4]
8012be0: f402 4270 and.w r2, r2, #61440 ; 0xf000
8012be4: f5a2 5300 sub.w r3, r2, #8192 ; 0x2000
8012be8: 425a negs r2, r3
8012bea: 415a adcs r2, r3
8012bec: f44f 6380 mov.w r3, #1024 ; 0x400
8012bf0: 602a str r2, [r5, #0]
8012bf2: f44f 6000 mov.w r0, #2048 ; 0x800
8012bf6: 6023 str r3, [r4, #0]
8012bf8: e002 b.n 8012c00 <__swhatbuf_r+0x54>
8012bfa: 2240 movs r2, #64 ; 0x40
8012bfc: 6022 str r2, [r4, #0]
8012bfe: 4618 mov r0, r3
8012c00: b016 add sp, #88 ; 0x58
8012c02: bd70 pop {r4, r5, r6, pc}
08012c04 <__smakebuf_r>:
8012c04: 898b ldrh r3, [r1, #12]
8012c06: b573 push {r0, r1, r4, r5, r6, lr}
8012c08: 079d lsls r5, r3, #30
8012c0a: 4606 mov r6, r0
8012c0c: 460c mov r4, r1
8012c0e: d507 bpl.n 8012c20 <__smakebuf_r+0x1c>
8012c10: f104 0343 add.w r3, r4, #67 ; 0x43
8012c14: 6023 str r3, [r4, #0]
8012c16: 6123 str r3, [r4, #16]
8012c18: 2301 movs r3, #1
8012c1a: 6163 str r3, [r4, #20]
8012c1c: b002 add sp, #8
8012c1e: bd70 pop {r4, r5, r6, pc}
8012c20: ab01 add r3, sp, #4
8012c22: 466a mov r2, sp
8012c24: f7ff ffc2 bl 8012bac <__swhatbuf_r>
8012c28: 9900 ldr r1, [sp, #0]
8012c2a: 4605 mov r5, r0
8012c2c: 4630 mov r0, r6
8012c2e: f000 f829 bl 8012c84 <_malloc_r>
8012c32: b948 cbnz r0, 8012c48 <__smakebuf_r+0x44>
8012c34: f9b4 300c ldrsh.w r3, [r4, #12]
8012c38: 059a lsls r2, r3, #22
8012c3a: d4ef bmi.n 8012c1c <__smakebuf_r+0x18>
8012c3c: f023 0303 bic.w r3, r3, #3
8012c40: f043 0302 orr.w r3, r3, #2
8012c44: 81a3 strh r3, [r4, #12]
8012c46: e7e3 b.n 8012c10 <__smakebuf_r+0xc>
8012c48: 4b0d ldr r3, [pc, #52] ; (8012c80 <__smakebuf_r+0x7c>)
8012c4a: 63f3 str r3, [r6, #60] ; 0x3c
8012c4c: 89a3 ldrh r3, [r4, #12]
8012c4e: 6020 str r0, [r4, #0]
8012c50: f043 0380 orr.w r3, r3, #128 ; 0x80
8012c54: 81a3 strh r3, [r4, #12]
8012c56: 9b00 ldr r3, [sp, #0]
8012c58: 6163 str r3, [r4, #20]
8012c5a: 9b01 ldr r3, [sp, #4]
8012c5c: 6120 str r0, [r4, #16]
8012c5e: b15b cbz r3, 8012c78 <__smakebuf_r+0x74>
8012c60: f9b4 100e ldrsh.w r1, [r4, #14]
8012c64: 4630 mov r0, r6
8012c66: f001 fe29 bl 80148bc <_isatty_r>
8012c6a: b128 cbz r0, 8012c78 <__smakebuf_r+0x74>
8012c6c: 89a3 ldrh r3, [r4, #12]
8012c6e: f023 0303 bic.w r3, r3, #3
8012c72: f043 0301 orr.w r3, r3, #1
8012c76: 81a3 strh r3, [r4, #12]
8012c78: 89a0 ldrh r0, [r4, #12]
8012c7a: 4305 orrs r5, r0
8012c7c: 81a5 strh r5, [r4, #12]
8012c7e: e7cd b.n 8012c1c <__smakebuf_r+0x18>
8012c80: 08012881 .word 0x08012881
08012c84 <_malloc_r>:
8012c84: f101 030b add.w r3, r1, #11
8012c88: 2b16 cmp r3, #22
8012c8a: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
8012c8e: 4605 mov r5, r0
8012c90: d906 bls.n 8012ca0 <_malloc_r+0x1c>
8012c92: f033 0707 bics.w r7, r3, #7
8012c96: d504 bpl.n 8012ca2 <_malloc_r+0x1e>
8012c98: 230c movs r3, #12
8012c9a: 602b str r3, [r5, #0]
8012c9c: 2400 movs r4, #0
8012c9e: e1a5 b.n 8012fec <_malloc_r+0x368>
8012ca0: 2710 movs r7, #16
8012ca2: 42b9 cmp r1, r7
8012ca4: d8f8 bhi.n 8012c98 <_malloc_r+0x14>
8012ca6: 4628 mov r0, r5
8012ca8: f000 fa28 bl 80130fc <__malloc_lock>
8012cac: f5b7 7ffc cmp.w r7, #504 ; 0x1f8
8012cb0: 4eb0 ldr r6, [pc, #704] ; (8012f74 <_malloc_r+0x2f0>)
8012cb2: d237 bcs.n 8012d24 <_malloc_r+0xa0>
8012cb4: f107 0208 add.w r2, r7, #8
8012cb8: 4432 add r2, r6
8012cba: f1a2 0108 sub.w r1, r2, #8
8012cbe: 6854 ldr r4, [r2, #4]
8012cc0: 428c cmp r4, r1
8012cc2: ea4f 03d7 mov.w r3, r7, lsr #3
8012cc6: d102 bne.n 8012cce <_malloc_r+0x4a>
8012cc8: 68d4 ldr r4, [r2, #12]
8012cca: 42a2 cmp r2, r4
8012ccc: d010 beq.n 8012cf0 <_malloc_r+0x6c>
8012cce: 6863 ldr r3, [r4, #4]
8012cd0: e9d4 1202 ldrd r1, r2, [r4, #8]
8012cd4: f023 0303 bic.w r3, r3, #3
8012cd8: 60ca str r2, [r1, #12]
8012cda: 4423 add r3, r4
8012cdc: 6091 str r1, [r2, #8]
8012cde: 685a ldr r2, [r3, #4]
8012ce0: f042 0201 orr.w r2, r2, #1
8012ce4: 605a str r2, [r3, #4]
8012ce6: 4628 mov r0, r5
8012ce8: f000 fa0e bl 8013108 <__malloc_unlock>
8012cec: 3408 adds r4, #8
8012cee: e17d b.n 8012fec <_malloc_r+0x368>
8012cf0: 3302 adds r3, #2
8012cf2: 6934 ldr r4, [r6, #16]
8012cf4: 49a0 ldr r1, [pc, #640] ; (8012f78 <_malloc_r+0x2f4>)
8012cf6: 428c cmp r4, r1
8012cf8: d077 beq.n 8012dea <_malloc_r+0x166>
8012cfa: 6862 ldr r2, [r4, #4]
8012cfc: f022 0c03 bic.w ip, r2, #3
8012d00: ebac 0007 sub.w r0, ip, r7
8012d04: 280f cmp r0, #15
8012d06: dd48 ble.n 8012d9a <_malloc_r+0x116>
8012d08: 19e2 adds r2, r4, r7
8012d0a: f040 0301 orr.w r3, r0, #1
8012d0e: f047 0701 orr.w r7, r7, #1
8012d12: 6067 str r7, [r4, #4]
8012d14: e9c6 2204 strd r2, r2, [r6, #16]
8012d18: e9c2 1102 strd r1, r1, [r2, #8]
8012d1c: 6053 str r3, [r2, #4]
8012d1e: f844 000c str.w r0, [r4, ip]
8012d22: e7e0 b.n 8012ce6 <_malloc_r+0x62>
8012d24: 0a7b lsrs r3, r7, #9
8012d26: d02a beq.n 8012d7e <_malloc_r+0xfa>
8012d28: 2b04 cmp r3, #4
8012d2a: d812 bhi.n 8012d52 <_malloc_r+0xce>
8012d2c: 09bb lsrs r3, r7, #6
8012d2e: 3338 adds r3, #56 ; 0x38
8012d30: 1c5a adds r2, r3, #1
8012d32: eb06 02c2 add.w r2, r6, r2, lsl #3
8012d36: f1a2 0c08 sub.w ip, r2, #8
8012d3a: 6854 ldr r4, [r2, #4]
8012d3c: 4564 cmp r4, ip
8012d3e: d006 beq.n 8012d4e <_malloc_r+0xca>
8012d40: 6862 ldr r2, [r4, #4]
8012d42: f022 0203 bic.w r2, r2, #3
8012d46: 1bd0 subs r0, r2, r7
8012d48: 280f cmp r0, #15
8012d4a: dd1c ble.n 8012d86 <_malloc_r+0x102>
8012d4c: 3b01 subs r3, #1
8012d4e: 3301 adds r3, #1
8012d50: e7cf b.n 8012cf2 <_malloc_r+0x6e>
8012d52: 2b14 cmp r3, #20
8012d54: d801 bhi.n 8012d5a <_malloc_r+0xd6>
8012d56: 335b adds r3, #91 ; 0x5b
8012d58: e7ea b.n 8012d30 <_malloc_r+0xac>
8012d5a: 2b54 cmp r3, #84 ; 0x54
8012d5c: d802 bhi.n 8012d64 <_malloc_r+0xe0>
8012d5e: 0b3b lsrs r3, r7, #12
8012d60: 336e adds r3, #110 ; 0x6e
8012d62: e7e5 b.n 8012d30 <_malloc_r+0xac>
8012d64: f5b3 7faa cmp.w r3, #340 ; 0x154
8012d68: d802 bhi.n 8012d70 <_malloc_r+0xec>
8012d6a: 0bfb lsrs r3, r7, #15
8012d6c: 3377 adds r3, #119 ; 0x77
8012d6e: e7df b.n 8012d30 <_malloc_r+0xac>
8012d70: f240 5254 movw r2, #1364 ; 0x554
8012d74: 4293 cmp r3, r2
8012d76: d804 bhi.n 8012d82 <_malloc_r+0xfe>
8012d78: 0cbb lsrs r3, r7, #18
8012d7a: 337c adds r3, #124 ; 0x7c
8012d7c: e7d8 b.n 8012d30 <_malloc_r+0xac>
8012d7e: 233f movs r3, #63 ; 0x3f
8012d80: e7d6 b.n 8012d30 <_malloc_r+0xac>
8012d82: 237e movs r3, #126 ; 0x7e
8012d84: e7d4 b.n 8012d30 <_malloc_r+0xac>
8012d86: 2800 cmp r0, #0
8012d88: 68e1 ldr r1, [r4, #12]
8012d8a: db04 blt.n 8012d96 <_malloc_r+0x112>
8012d8c: 68a3 ldr r3, [r4, #8]
8012d8e: 60d9 str r1, [r3, #12]
8012d90: 608b str r3, [r1, #8]
8012d92: 18a3 adds r3, r4, r2
8012d94: e7a3 b.n 8012cde <_malloc_r+0x5a>
8012d96: 460c mov r4, r1
8012d98: e7d0 b.n 8012d3c <_malloc_r+0xb8>
8012d9a: 2800 cmp r0, #0
8012d9c: e9c6 1104 strd r1, r1, [r6, #16]
8012da0: db07 blt.n 8012db2 <_malloc_r+0x12e>
8012da2: 44a4 add ip, r4
8012da4: f8dc 3004 ldr.w r3, [ip, #4]
8012da8: f043 0301 orr.w r3, r3, #1
8012dac: f8cc 3004 str.w r3, [ip, #4]
8012db0: e799 b.n 8012ce6 <_malloc_r+0x62>
8012db2: f5bc 7f00 cmp.w ip, #512 ; 0x200
8012db6: 6870 ldr r0, [r6, #4]
8012db8: f080 8096 bcs.w 8012ee8 <_malloc_r+0x264>
8012dbc: ea4f 02dc mov.w r2, ip, lsr #3
8012dc0: ea4f 1e5c mov.w lr, ip, lsr #5
8012dc4: f04f 0c01 mov.w ip, #1
8012dc8: 3201 adds r2, #1
8012dca: fa0c fc0e lsl.w ip, ip, lr
8012dce: ea4c 0000 orr.w r0, ip, r0
8012dd2: 6070 str r0, [r6, #4]
8012dd4: f856 c032 ldr.w ip, [r6, r2, lsl #3]
8012dd8: eb06 00c2 add.w r0, r6, r2, lsl #3
8012ddc: 3808 subs r0, #8
8012dde: e9c4 c002 strd ip, r0, [r4, #8]
8012de2: f846 4032 str.w r4, [r6, r2, lsl #3]
8012de6: f8cc 400c str.w r4, [ip, #12]
8012dea: 2001 movs r0, #1
8012dec: 109a asrs r2, r3, #2
8012dee: fa00 f202 lsl.w r2, r0, r2
8012df2: 6870 ldr r0, [r6, #4]
8012df4: 4290 cmp r0, r2
8012df6: d326 bcc.n 8012e46 <_malloc_r+0x1c2>
8012df8: 4210 tst r0, r2
8012dfa: d106 bne.n 8012e0a <_malloc_r+0x186>
8012dfc: f023 0303 bic.w r3, r3, #3
8012e00: 0052 lsls r2, r2, #1
8012e02: 4210 tst r0, r2
8012e04: f103 0304 add.w r3, r3, #4
8012e08: d0fa beq.n 8012e00 <_malloc_r+0x17c>
8012e0a: eb06 08c3 add.w r8, r6, r3, lsl #3
8012e0e: 46c1 mov r9, r8
8012e10: 469e mov lr, r3
8012e12: f8d9 400c ldr.w r4, [r9, #12]
8012e16: 454c cmp r4, r9
8012e18: f040 80ba bne.w 8012f90 <_malloc_r+0x30c>
8012e1c: f10e 0e01 add.w lr, lr, #1
8012e20: f01e 0f03 tst.w lr, #3
8012e24: f109 0908 add.w r9, r9, #8
8012e28: d1f3 bne.n 8012e12 <_malloc_r+0x18e>
8012e2a: 0798 lsls r0, r3, #30
8012e2c: f040 80e4 bne.w 8012ff8 <_malloc_r+0x374>
8012e30: 6873 ldr r3, [r6, #4]
8012e32: ea23 0302 bic.w r3, r3, r2
8012e36: 6073 str r3, [r6, #4]
8012e38: 6870 ldr r0, [r6, #4]
8012e3a: 0052 lsls r2, r2, #1
8012e3c: 4290 cmp r0, r2
8012e3e: d302 bcc.n 8012e46 <_malloc_r+0x1c2>
8012e40: 2a00 cmp r2, #0
8012e42: f040 80e6 bne.w 8013012 <_malloc_r+0x38e>
8012e46: f8d6 a008 ldr.w sl, [r6, #8]
8012e4a: f8da 3004 ldr.w r3, [sl, #4]
8012e4e: f023 0903 bic.w r9, r3, #3
8012e52: 45b9 cmp r9, r7
8012e54: d304 bcc.n 8012e60 <_malloc_r+0x1dc>
8012e56: eba9 0207 sub.w r2, r9, r7
8012e5a: 2a0f cmp r2, #15
8012e5c: f300 8142 bgt.w 80130e4 <_malloc_r+0x460>
8012e60: 4b46 ldr r3, [pc, #280] ; (8012f7c <_malloc_r+0x2f8>)
8012e62: 6819 ldr r1, [r3, #0]
8012e64: 3110 adds r1, #16
8012e66: 4439 add r1, r7
8012e68: 2008 movs r0, #8
8012e6a: 9101 str r1, [sp, #4]
8012e6c: f000 fd26 bl 80138bc <sysconf>
8012e70: 4a43 ldr r2, [pc, #268] ; (8012f80 <_malloc_r+0x2fc>)
8012e72: 9901 ldr r1, [sp, #4]
8012e74: 6813 ldr r3, [r2, #0]
8012e76: 3301 adds r3, #1
8012e78: bf1f itttt ne
8012e7a: f101 31ff addne.w r1, r1, #4294967295
8012e7e: 1809 addne r1, r1, r0
8012e80: 4243 negne r3, r0
8012e82: 4019 andne r1, r3
8012e84: 4680 mov r8, r0
8012e86: 4628 mov r0, r5
8012e88: 9101 str r1, [sp, #4]
8012e8a: f000 fcb1 bl 80137f0 <_sbrk_r>
8012e8e: 1c42 adds r2, r0, #1
8012e90: eb0a 0b09 add.w fp, sl, r9
8012e94: 4604 mov r4, r0
8012e96: f000 80f8 beq.w 801308a <_malloc_r+0x406>
8012e9a: 4583 cmp fp, r0
8012e9c: 9901 ldr r1, [sp, #4]
8012e9e: 4a38 ldr r2, [pc, #224] ; (8012f80 <_malloc_r+0x2fc>)
8012ea0: d902 bls.n 8012ea8 <_malloc_r+0x224>
8012ea2: 45b2 cmp sl, r6
8012ea4: f040 80f1 bne.w 801308a <_malloc_r+0x406>
8012ea8: 4b36 ldr r3, [pc, #216] ; (8012f84 <_malloc_r+0x300>)
8012eaa: 6818 ldr r0, [r3, #0]
8012eac: 45a3 cmp fp, r4
8012eae: eb00 0e01 add.w lr, r0, r1
8012eb2: f8c3 e000 str.w lr, [r3]
8012eb6: f108 3cff add.w ip, r8, #4294967295
8012eba: f040 80ac bne.w 8013016 <_malloc_r+0x392>
8012ebe: ea1b 0f0c tst.w fp, ip
8012ec2: f040 80a8 bne.w 8013016 <_malloc_r+0x392>
8012ec6: 68b2 ldr r2, [r6, #8]
8012ec8: 4449 add r1, r9
8012eca: f041 0101 orr.w r1, r1, #1
8012ece: 6051 str r1, [r2, #4]
8012ed0: 4a2d ldr r2, [pc, #180] ; (8012f88 <_malloc_r+0x304>)
8012ed2: 681b ldr r3, [r3, #0]
8012ed4: 6811 ldr r1, [r2, #0]
8012ed6: 428b cmp r3, r1
8012ed8: bf88 it hi
8012eda: 6013 strhi r3, [r2, #0]
8012edc: 4a2b ldr r2, [pc, #172] ; (8012f8c <_malloc_r+0x308>)
8012ede: 6811 ldr r1, [r2, #0]
8012ee0: 428b cmp r3, r1
8012ee2: bf88 it hi
8012ee4: 6013 strhi r3, [r2, #0]
8012ee6: e0d0 b.n 801308a <_malloc_r+0x406>
8012ee8: f5bc 6f20 cmp.w ip, #2560 ; 0xa00
8012eec: ea4f 225c mov.w r2, ip, lsr #9
8012ef0: d218 bcs.n 8012f24 <_malloc_r+0x2a0>
8012ef2: ea4f 129c mov.w r2, ip, lsr #6
8012ef6: 3238 adds r2, #56 ; 0x38
8012ef8: f102 0e01 add.w lr, r2, #1
8012efc: eb06 08c2 add.w r8, r6, r2, lsl #3
8012f00: f856 e03e ldr.w lr, [r6, lr, lsl #3]
8012f04: 45f0 cmp r8, lr
8012f06: d12b bne.n 8012f60 <_malloc_r+0x2dc>
8012f08: 1092 asrs r2, r2, #2
8012f0a: f04f 0c01 mov.w ip, #1
8012f0e: fa0c f202 lsl.w r2, ip, r2
8012f12: 4310 orrs r0, r2
8012f14: 6070 str r0, [r6, #4]
8012f16: e9c4 e802 strd lr, r8, [r4, #8]
8012f1a: f8c8 4008 str.w r4, [r8, #8]
8012f1e: f8ce 400c str.w r4, [lr, #12]
8012f22: e762 b.n 8012dea <_malloc_r+0x166>
8012f24: 2a14 cmp r2, #20
8012f26: d801 bhi.n 8012f2c <_malloc_r+0x2a8>
8012f28: 325b adds r2, #91 ; 0x5b
8012f2a: e7e5 b.n 8012ef8 <_malloc_r+0x274>
8012f2c: 2a54 cmp r2, #84 ; 0x54
8012f2e: d803 bhi.n 8012f38 <_malloc_r+0x2b4>
8012f30: ea4f 321c mov.w r2, ip, lsr #12
8012f34: 326e adds r2, #110 ; 0x6e
8012f36: e7df b.n 8012ef8 <_malloc_r+0x274>
8012f38: f5b2 7faa cmp.w r2, #340 ; 0x154
8012f3c: d803 bhi.n 8012f46 <_malloc_r+0x2c2>
8012f3e: ea4f 32dc mov.w r2, ip, lsr #15
8012f42: 3277 adds r2, #119 ; 0x77
8012f44: e7d8 b.n 8012ef8 <_malloc_r+0x274>
8012f46: f240 5e54 movw lr, #1364 ; 0x554
8012f4a: 4572 cmp r2, lr
8012f4c: bf9a itte ls
8012f4e: ea4f 429c movls.w r2, ip, lsr #18
8012f52: 327c addls r2, #124 ; 0x7c
8012f54: 227e movhi r2, #126 ; 0x7e
8012f56: e7cf b.n 8012ef8 <_malloc_r+0x274>
8012f58: f8de e008 ldr.w lr, [lr, #8]
8012f5c: 45f0 cmp r8, lr
8012f5e: d005 beq.n 8012f6c <_malloc_r+0x2e8>
8012f60: f8de 2004 ldr.w r2, [lr, #4]
8012f64: f022 0203 bic.w r2, r2, #3
8012f68: 4562 cmp r2, ip
8012f6a: d8f5 bhi.n 8012f58 <_malloc_r+0x2d4>
8012f6c: f8de 800c ldr.w r8, [lr, #12]
8012f70: e7d1 b.n 8012f16 <_malloc_r+0x292>
8012f72: bf00 nop
8012f74: 20000464 .word 0x20000464
8012f78: 2000046c .word 0x2000046c
8012f7c: 20008dc4 .word 0x20008dc4
8012f80: 2000086c .word 0x2000086c
8012f84: 20008d94 .word 0x20008d94
8012f88: 20008dbc .word 0x20008dbc
8012f8c: 20008dc0 .word 0x20008dc0
8012f90: 6860 ldr r0, [r4, #4]
8012f92: f8d4 c00c ldr.w ip, [r4, #12]
8012f96: f020 0003 bic.w r0, r0, #3
8012f9a: eba0 0a07 sub.w sl, r0, r7
8012f9e: f1ba 0f0f cmp.w sl, #15
8012fa2: dd12 ble.n 8012fca <_malloc_r+0x346>
8012fa4: 68a3 ldr r3, [r4, #8]
8012fa6: 19e2 adds r2, r4, r7
8012fa8: f047 0701 orr.w r7, r7, #1
8012fac: 6067 str r7, [r4, #4]
8012fae: f8c3 c00c str.w ip, [r3, #12]
8012fb2: f8cc 3008 str.w r3, [ip, #8]
8012fb6: f04a 0301 orr.w r3, sl, #1
8012fba: e9c6 2204 strd r2, r2, [r6, #16]
8012fbe: e9c2 1102 strd r1, r1, [r2, #8]
8012fc2: 6053 str r3, [r2, #4]
8012fc4: f844 a000 str.w sl, [r4, r0]
8012fc8: e68d b.n 8012ce6 <_malloc_r+0x62>
8012fca: f1ba 0f00 cmp.w sl, #0
8012fce: db11 blt.n 8012ff4 <_malloc_r+0x370>
8012fd0: 4420 add r0, r4
8012fd2: 6843 ldr r3, [r0, #4]
8012fd4: f043 0301 orr.w r3, r3, #1
8012fd8: 6043 str r3, [r0, #4]
8012fda: f854 3f08 ldr.w r3, [r4, #8]!
8012fde: 4628 mov r0, r5
8012fe0: f8c3 c00c str.w ip, [r3, #12]
8012fe4: f8cc 3008 str.w r3, [ip, #8]
8012fe8: f000 f88e bl 8013108 <__malloc_unlock>
8012fec: 4620 mov r0, r4
8012fee: b003 add sp, #12
8012ff0: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
8012ff4: 4664 mov r4, ip
8012ff6: e70e b.n 8012e16 <_malloc_r+0x192>
8012ff8: f858 0908 ldr.w r0, [r8], #-8
8012ffc: 4540 cmp r0, r8
8012ffe: f103 33ff add.w r3, r3, #4294967295
8013002: f43f af12 beq.w 8012e2a <_malloc_r+0x1a6>
8013006: e717 b.n 8012e38 <_malloc_r+0x1b4>
8013008: 3304 adds r3, #4
801300a: 0052 lsls r2, r2, #1
801300c: 4210 tst r0, r2
801300e: d0fb beq.n 8013008 <_malloc_r+0x384>
8013010: e6fb b.n 8012e0a <_malloc_r+0x186>
8013012: 4673 mov r3, lr
8013014: e7fa b.n 801300c <_malloc_r+0x388>
8013016: 6810 ldr r0, [r2, #0]
8013018: 3001 adds r0, #1
801301a: bf1b ittet ne
801301c: eba4 0b0b subne.w fp, r4, fp
8013020: eb0b 020e addne.w r2, fp, lr
8013024: 6014 streq r4, [r2, #0]
8013026: 601a strne r2, [r3, #0]
8013028: f014 0b07 ands.w fp, r4, #7
801302c: bf1a itte ne
801302e: f1cb 0008 rsbne r0, fp, #8
8013032: 1824 addne r4, r4, r0
8013034: 4658 moveq r0, fp
8013036: 1862 adds r2, r4, r1
8013038: ea02 010c and.w r1, r2, ip
801303c: 4480 add r8, r0
801303e: eba8 0801 sub.w r8, r8, r1
8013042: ea08 080c and.w r8, r8, ip
8013046: 4641 mov r1, r8
8013048: 4628 mov r0, r5
801304a: 9201 str r2, [sp, #4]
801304c: f000 fbd0 bl 80137f0 <_sbrk_r>
8013050: 1c43 adds r3, r0, #1
8013052: 9a01 ldr r2, [sp, #4]
8013054: 4b28 ldr r3, [pc, #160] ; (80130f8 <_malloc_r+0x474>)
8013056: d107 bne.n 8013068 <_malloc_r+0x3e4>
8013058: f1bb 0f00 cmp.w fp, #0
801305c: d023 beq.n 80130a6 <_malloc_r+0x422>
801305e: f1ab 0008 sub.w r0, fp, #8
8013062: 4410 add r0, r2
8013064: f04f 0800 mov.w r8, #0
8013068: 681a ldr r2, [r3, #0]
801306a: 60b4 str r4, [r6, #8]
801306c: 1b00 subs r0, r0, r4
801306e: 4440 add r0, r8
8013070: 4442 add r2, r8
8013072: f040 0001 orr.w r0, r0, #1
8013076: 45b2 cmp sl, r6
8013078: 601a str r2, [r3, #0]
801307a: 6060 str r0, [r4, #4]
801307c: f43f af28 beq.w 8012ed0 <_malloc_r+0x24c>
8013080: f1b9 0f0f cmp.w r9, #15
8013084: d812 bhi.n 80130ac <_malloc_r+0x428>
8013086: 2301 movs r3, #1
8013088: 6063 str r3, [r4, #4]
801308a: 68b3 ldr r3, [r6, #8]
801308c: 685b ldr r3, [r3, #4]
801308e: f023 0303 bic.w r3, r3, #3
8013092: 42bb cmp r3, r7
8013094: eba3 0207 sub.w r2, r3, r7
8013098: d301 bcc.n 801309e <_malloc_r+0x41a>
801309a: 2a0f cmp r2, #15
801309c: dc22 bgt.n 80130e4 <_malloc_r+0x460>
801309e: 4628 mov r0, r5
80130a0: f000 f832 bl 8013108 <__malloc_unlock>
80130a4: e5fa b.n 8012c9c <_malloc_r+0x18>
80130a6: 4610 mov r0, r2
80130a8: 46d8 mov r8, fp
80130aa: e7dd b.n 8013068 <_malloc_r+0x3e4>
80130ac: f8da 2004 ldr.w r2, [sl, #4]
80130b0: f1a9 090c sub.w r9, r9, #12
80130b4: f029 0907 bic.w r9, r9, #7
80130b8: f002 0201 and.w r2, r2, #1
80130bc: ea42 0209 orr.w r2, r2, r9
80130c0: f8ca 2004 str.w r2, [sl, #4]
80130c4: 2105 movs r1, #5
80130c6: eb0a 0209 add.w r2, sl, r9
80130ca: f1b9 0f0f cmp.w r9, #15
80130ce: e9c2 1101 strd r1, r1, [r2, #4]
80130d2: f67f aefd bls.w 8012ed0 <_malloc_r+0x24c>
80130d6: f10a 0108 add.w r1, sl, #8
80130da: 4628 mov r0, r5
80130dc: f7ff fc7e bl 80129dc <_free_r>
80130e0: 4b05 ldr r3, [pc, #20] ; (80130f8 <_malloc_r+0x474>)
80130e2: e6f5 b.n 8012ed0 <_malloc_r+0x24c>
80130e4: 68b4 ldr r4, [r6, #8]
80130e6: f047 0301 orr.w r3, r7, #1
80130ea: 4427 add r7, r4
80130ec: f042 0201 orr.w r2, r2, #1
80130f0: 6063 str r3, [r4, #4]
80130f2: 60b7 str r7, [r6, #8]
80130f4: 607a str r2, [r7, #4]
80130f6: e5f6 b.n 8012ce6 <_malloc_r+0x62>
80130f8: 20008d94 .word 0x20008d94
080130fc <__malloc_lock>:
80130fc: 4801 ldr r0, [pc, #4] ; (8013104 <__malloc_lock+0x8>)
80130fe: f7ff bd53 b.w 8012ba8 <__retarget_lock_acquire_recursive>
8013102: bf00 nop
8013104: 20008d8f .word 0x20008d8f
08013108 <__malloc_unlock>:
8013108: 4801 ldr r0, [pc, #4] ; (8013110 <__malloc_unlock+0x8>)
801310a: f7ff bd4e b.w 8012baa <__retarget_lock_release_recursive>
801310e: bf00 nop
8013110: 20008d8f .word 0x20008d8f
08013114 <_Balloc>:
8013114: 6cc3 ldr r3, [r0, #76] ; 0x4c
8013116: b570 push {r4, r5, r6, lr}
8013118: 4605 mov r5, r0
801311a: 460c mov r4, r1
801311c: b17b cbz r3, 801313e <_Balloc+0x2a>
801311e: 6ceb ldr r3, [r5, #76] ; 0x4c
8013120: f853 0024 ldr.w r0, [r3, r4, lsl #2]
8013124: b9a0 cbnz r0, 8013150 <_Balloc+0x3c>
8013126: 2101 movs r1, #1
8013128: fa01 f604 lsl.w r6, r1, r4
801312c: 1d72 adds r2, r6, #5
801312e: 0092 lsls r2, r2, #2
8013130: 4628 mov r0, r5
8013132: f001 f94b bl 80143cc <_calloc_r>
8013136: b148 cbz r0, 801314c <_Balloc+0x38>
8013138: e9c0 4601 strd r4, r6, [r0, #4]
801313c: e00b b.n 8013156 <_Balloc+0x42>
801313e: 2221 movs r2, #33 ; 0x21
8013140: 2104 movs r1, #4
8013142: f001 f943 bl 80143cc <_calloc_r>
8013146: 64e8 str r0, [r5, #76] ; 0x4c
8013148: 2800 cmp r0, #0
801314a: d1e8 bne.n 801311e <_Balloc+0xa>
801314c: 2000 movs r0, #0
801314e: bd70 pop {r4, r5, r6, pc}
8013150: 6802 ldr r2, [r0, #0]
8013152: f843 2024 str.w r2, [r3, r4, lsl #2]
8013156: 2300 movs r3, #0
8013158: e9c0 3303 strd r3, r3, [r0, #12]
801315c: e7f7 b.n 801314e <_Balloc+0x3a>
0801315e <_Bfree>:
801315e: b131 cbz r1, 801316e <_Bfree+0x10>
8013160: 6cc3 ldr r3, [r0, #76] ; 0x4c
8013162: 684a ldr r2, [r1, #4]
8013164: f853 0022 ldr.w r0, [r3, r2, lsl #2]
8013168: 6008 str r0, [r1, #0]
801316a: f843 1022 str.w r1, [r3, r2, lsl #2]
801316e: 4770 bx lr
08013170 <__multadd>:
8013170: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
8013174: 690d ldr r5, [r1, #16]
8013176: 4607 mov r7, r0
8013178: 460c mov r4, r1
801317a: 461e mov r6, r3
801317c: f101 0c14 add.w ip, r1, #20
8013180: 2000 movs r0, #0
8013182: f8dc 3000 ldr.w r3, [ip]
8013186: b299 uxth r1, r3
8013188: fb02 6101 mla r1, r2, r1, r6
801318c: 0c1e lsrs r6, r3, #16
801318e: 0c0b lsrs r3, r1, #16
8013190: fb02 3306 mla r3, r2, r6, r3
8013194: b289 uxth r1, r1
8013196: 3001 adds r0, #1
8013198: eb01 4103 add.w r1, r1, r3, lsl #16
801319c: 4285 cmp r5, r0
801319e: f84c 1b04 str.w r1, [ip], #4
80131a2: ea4f 4613 mov.w r6, r3, lsr #16
80131a6: dcec bgt.n 8013182 <__multadd+0x12>
80131a8: b30e cbz r6, 80131ee <__multadd+0x7e>
80131aa: 68a3 ldr r3, [r4, #8]
80131ac: 42ab cmp r3, r5
80131ae: dc19 bgt.n 80131e4 <__multadd+0x74>
80131b0: 6861 ldr r1, [r4, #4]
80131b2: 4638 mov r0, r7
80131b4: 3101 adds r1, #1
80131b6: f7ff ffad bl 8013114 <_Balloc>
80131ba: 4680 mov r8, r0
80131bc: b928 cbnz r0, 80131ca <__multadd+0x5a>
80131be: 4602 mov r2, r0
80131c0: 4b0c ldr r3, [pc, #48] ; (80131f4 <__multadd+0x84>)
80131c2: 480d ldr r0, [pc, #52] ; (80131f8 <__multadd+0x88>)
80131c4: 21b5 movs r1, #181 ; 0xb5
80131c6: f001 f8e3 bl 8014390 <__assert_func>
80131ca: 6922 ldr r2, [r4, #16]
80131cc: 3202 adds r2, #2
80131ce: f104 010c add.w r1, r4, #12
80131d2: 0092 lsls r2, r2, #2
80131d4: 300c adds r0, #12
80131d6: f7fd f8cb bl 8010370 <memcpy>
80131da: 4621 mov r1, r4
80131dc: 4638 mov r0, r7
80131de: f7ff ffbe bl 801315e <_Bfree>
80131e2: 4644 mov r4, r8
80131e4: eb04 0385 add.w r3, r4, r5, lsl #2
80131e8: 3501 adds r5, #1
80131ea: 615e str r6, [r3, #20]
80131ec: 6125 str r5, [r4, #16]
80131ee: 4620 mov r0, r4
80131f0: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
80131f4: 08017f59 .word 0x08017f59
80131f8: 08017fc5 .word 0x08017fc5
080131fc <__hi0bits>:
80131fc: 0c03 lsrs r3, r0, #16
80131fe: 041b lsls r3, r3, #16
8013200: b9d3 cbnz r3, 8013238 <__hi0bits+0x3c>
8013202: 0400 lsls r0, r0, #16
8013204: 2310 movs r3, #16
8013206: f010 4f7f tst.w r0, #4278190080 ; 0xff000000
801320a: bf04 itt eq
801320c: 0200 lsleq r0, r0, #8
801320e: 3308 addeq r3, #8
8013210: f010 4f70 tst.w r0, #4026531840 ; 0xf0000000
8013214: bf04 itt eq
8013216: 0100 lsleq r0, r0, #4
8013218: 3304 addeq r3, #4
801321a: f010 4f40 tst.w r0, #3221225472 ; 0xc0000000
801321e: bf04 itt eq
8013220: 0080 lsleq r0, r0, #2
8013222: 3302 addeq r3, #2
8013224: 2800 cmp r0, #0
8013226: db05 blt.n 8013234 <__hi0bits+0x38>
8013228: f010 4f80 tst.w r0, #1073741824 ; 0x40000000
801322c: f103 0301 add.w r3, r3, #1
8013230: bf08 it eq
8013232: 2320 moveq r3, #32
8013234: 4618 mov r0, r3
8013236: 4770 bx lr
8013238: 2300 movs r3, #0
801323a: e7e4 b.n 8013206 <__hi0bits+0xa>
0801323c <__lo0bits>:
801323c: 6803 ldr r3, [r0, #0]
801323e: f013 0207 ands.w r2, r3, #7
8013242: 4601 mov r1, r0
8013244: d00b beq.n 801325e <__lo0bits+0x22>
8013246: 07da lsls r2, r3, #31
8013248: d423 bmi.n 8013292 <__lo0bits+0x56>
801324a: 0798 lsls r0, r3, #30
801324c: bf49 itett mi
801324e: 085b lsrmi r3, r3, #1
8013250: 089b lsrpl r3, r3, #2
8013252: 2001 movmi r0, #1
8013254: 600b strmi r3, [r1, #0]
8013256: bf5c itt pl
8013258: 600b strpl r3, [r1, #0]
801325a: 2002 movpl r0, #2
801325c: 4770 bx lr
801325e: b298 uxth r0, r3
8013260: b9a8 cbnz r0, 801328e <__lo0bits+0x52>
8013262: 0c1b lsrs r3, r3, #16
8013264: 2010 movs r0, #16
8013266: b2da uxtb r2, r3
8013268: b90a cbnz r2, 801326e <__lo0bits+0x32>
801326a: 3008 adds r0, #8
801326c: 0a1b lsrs r3, r3, #8
801326e: 071a lsls r2, r3, #28
8013270: bf04 itt eq
8013272: 091b lsreq r3, r3, #4
8013274: 3004 addeq r0, #4
8013276: 079a lsls r2, r3, #30
8013278: bf04 itt eq
801327a: 089b lsreq r3, r3, #2
801327c: 3002 addeq r0, #2
801327e: 07da lsls r2, r3, #31
8013280: d403 bmi.n 801328a <__lo0bits+0x4e>
8013282: 085b lsrs r3, r3, #1
8013284: f100 0001 add.w r0, r0, #1
8013288: d005 beq.n 8013296 <__lo0bits+0x5a>
801328a: 600b str r3, [r1, #0]
801328c: 4770 bx lr
801328e: 4610 mov r0, r2
8013290: e7e9 b.n 8013266 <__lo0bits+0x2a>
8013292: 2000 movs r0, #0
8013294: 4770 bx lr
8013296: 2020 movs r0, #32
8013298: 4770 bx lr
...
0801329c <__i2b>:
801329c: b510 push {r4, lr}
801329e: 460c mov r4, r1
80132a0: 2101 movs r1, #1
80132a2: f7ff ff37 bl 8013114 <_Balloc>
80132a6: 4602 mov r2, r0
80132a8: b928 cbnz r0, 80132b6 <__i2b+0x1a>
80132aa: 4b05 ldr r3, [pc, #20] ; (80132c0 <__i2b+0x24>)
80132ac: 4805 ldr r0, [pc, #20] ; (80132c4 <__i2b+0x28>)
80132ae: f44f 71a0 mov.w r1, #320 ; 0x140
80132b2: f001 f86d bl 8014390 <__assert_func>
80132b6: 2301 movs r3, #1
80132b8: 6144 str r4, [r0, #20]
80132ba: 6103 str r3, [r0, #16]
80132bc: bd10 pop {r4, pc}
80132be: bf00 nop
80132c0: 08017f59 .word 0x08017f59
80132c4: 08017fc5 .word 0x08017fc5
080132c8 <__multiply>:
80132c8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
80132cc: 4691 mov r9, r2
80132ce: 690a ldr r2, [r1, #16]
80132d0: f8d9 3010 ldr.w r3, [r9, #16]
80132d4: 429a cmp r2, r3
80132d6: bfb8 it lt
80132d8: 460b movlt r3, r1
80132da: 460c mov r4, r1
80132dc: bfbc itt lt
80132de: 464c movlt r4, r9
80132e0: 4699 movlt r9, r3
80132e2: 6927 ldr r7, [r4, #16]
80132e4: f8d9 a010 ldr.w sl, [r9, #16]
80132e8: 68a3 ldr r3, [r4, #8]
80132ea: 6861 ldr r1, [r4, #4]
80132ec: eb07 060a add.w r6, r7, sl
80132f0: 42b3 cmp r3, r6
80132f2: b085 sub sp, #20
80132f4: bfb8 it lt
80132f6: 3101 addlt r1, #1
80132f8: f7ff ff0c bl 8013114 <_Balloc>
80132fc: b930 cbnz r0, 801330c <__multiply+0x44>
80132fe: 4602 mov r2, r0
8013300: 4b44 ldr r3, [pc, #272] ; (8013414 <__multiply+0x14c>)
8013302: 4845 ldr r0, [pc, #276] ; (8013418 <__multiply+0x150>)
8013304: f240 115d movw r1, #349 ; 0x15d
8013308: f001 f842 bl 8014390 <__assert_func>
801330c: f100 0514 add.w r5, r0, #20
8013310: eb05 0886 add.w r8, r5, r6, lsl #2
8013314: 462b mov r3, r5
8013316: 2200 movs r2, #0
8013318: 4543 cmp r3, r8
801331a: d321 bcc.n 8013360 <__multiply+0x98>
801331c: f104 0314 add.w r3, r4, #20
8013320: eb03 0787 add.w r7, r3, r7, lsl #2
8013324: f109 0314 add.w r3, r9, #20
8013328: eb03 028a add.w r2, r3, sl, lsl #2
801332c: 9202 str r2, [sp, #8]
801332e: 1b3a subs r2, r7, r4
8013330: 3a15 subs r2, #21
8013332: f022 0203 bic.w r2, r2, #3
8013336: 3204 adds r2, #4
8013338: f104 0115 add.w r1, r4, #21
801333c: 428f cmp r7, r1
801333e: bf38 it cc
8013340: 2204 movcc r2, #4
8013342: 9201 str r2, [sp, #4]
8013344: 9a02 ldr r2, [sp, #8]
8013346: 9303 str r3, [sp, #12]
8013348: 429a cmp r2, r3
801334a: d80c bhi.n 8013366 <__multiply+0x9e>
801334c: 2e00 cmp r6, #0
801334e: dd03 ble.n 8013358 <__multiply+0x90>
8013350: f858 3d04 ldr.w r3, [r8, #-4]!
8013354: 2b00 cmp r3, #0
8013356: d05a beq.n 801340e <__multiply+0x146>
8013358: 6106 str r6, [r0, #16]
801335a: b005 add sp, #20
801335c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
8013360: f843 2b04 str.w r2, [r3], #4
8013364: e7d8 b.n 8013318 <__multiply+0x50>
8013366: f8b3 a000 ldrh.w sl, [r3]
801336a: f1ba 0f00 cmp.w sl, #0
801336e: d024 beq.n 80133ba <__multiply+0xf2>
8013370: f104 0e14 add.w lr, r4, #20
8013374: 46a9 mov r9, r5
8013376: f04f 0c00 mov.w ip, #0
801337a: f85e 2b04 ldr.w r2, [lr], #4
801337e: f8d9 1000 ldr.w r1, [r9]
8013382: fa1f fb82 uxth.w fp, r2
8013386: b289 uxth r1, r1
8013388: fb0a 110b mla r1, sl, fp, r1
801338c: ea4f 4b12 mov.w fp, r2, lsr #16
8013390: f8d9 2000 ldr.w r2, [r9]
8013394: 4461 add r1, ip
8013396: ea4f 4c12 mov.w ip, r2, lsr #16
801339a: fb0a c20b mla r2, sl, fp, ip
801339e: eb02 4211 add.w r2, r2, r1, lsr #16
80133a2: b289 uxth r1, r1
80133a4: ea41 4102 orr.w r1, r1, r2, lsl #16
80133a8: 4577 cmp r7, lr
80133aa: f849 1b04 str.w r1, [r9], #4
80133ae: ea4f 4c12 mov.w ip, r2, lsr #16
80133b2: d8e2 bhi.n 801337a <__multiply+0xb2>
80133b4: 9a01 ldr r2, [sp, #4]
80133b6: f845 c002 str.w ip, [r5, r2]
80133ba: 9a03 ldr r2, [sp, #12]
80133bc: f8b2 9002 ldrh.w r9, [r2, #2]
80133c0: 3304 adds r3, #4
80133c2: f1b9 0f00 cmp.w r9, #0
80133c6: d020 beq.n 801340a <__multiply+0x142>
80133c8: 6829 ldr r1, [r5, #0]
80133ca: f104 0c14 add.w ip, r4, #20
80133ce: 46ae mov lr, r5
80133d0: f04f 0a00 mov.w sl, #0
80133d4: f8bc b000 ldrh.w fp, [ip]
80133d8: f8be 2002 ldrh.w r2, [lr, #2]
80133dc: fb09 220b mla r2, r9, fp, r2
80133e0: 4492 add sl, r2
80133e2: b289 uxth r1, r1
80133e4: ea41 410a orr.w r1, r1, sl, lsl #16
80133e8: f84e 1b04 str.w r1, [lr], #4
80133ec: f85c 2b04 ldr.w r2, [ip], #4
80133f0: f8be 1000 ldrh.w r1, [lr]
80133f4: 0c12 lsrs r2, r2, #16
80133f6: fb09 1102 mla r1, r9, r2, r1
80133fa: eb01 411a add.w r1, r1, sl, lsr #16
80133fe: 4567 cmp r7, ip
8013400: ea4f 4a11 mov.w sl, r1, lsr #16
8013404: d8e6 bhi.n 80133d4 <__multiply+0x10c>
8013406: 9a01 ldr r2, [sp, #4]
8013408: 50a9 str r1, [r5, r2]
801340a: 3504 adds r5, #4
801340c: e79a b.n 8013344 <__multiply+0x7c>
801340e: 3e01 subs r6, #1
8013410: e79c b.n 801334c <__multiply+0x84>
8013412: bf00 nop
8013414: 08017f59 .word 0x08017f59
8013418: 08017fc5 .word 0x08017fc5
0801341c <__pow5mult>:
801341c: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
8013420: 4615 mov r5, r2
8013422: f012 0203 ands.w r2, r2, #3
8013426: 4606 mov r6, r0
8013428: 460f mov r7, r1
801342a: d007 beq.n 801343c <__pow5mult+0x20>
801342c: 4c1a ldr r4, [pc, #104] ; (8013498 <__pow5mult+0x7c>)
801342e: 3a01 subs r2, #1
8013430: 2300 movs r3, #0
8013432: f854 2022 ldr.w r2, [r4, r2, lsl #2]
8013436: f7ff fe9b bl 8013170 <__multadd>
801343a: 4607 mov r7, r0
801343c: 10ad asrs r5, r5, #2
801343e: d027 beq.n 8013490 <__pow5mult+0x74>
8013440: 6cb4 ldr r4, [r6, #72] ; 0x48
8013442: b944 cbnz r4, 8013456 <__pow5mult+0x3a>
8013444: f240 2171 movw r1, #625 ; 0x271
8013448: 4630 mov r0, r6
801344a: f7ff ff27 bl 801329c <__i2b>
801344e: 2300 movs r3, #0
8013450: 64b0 str r0, [r6, #72] ; 0x48
8013452: 4604 mov r4, r0
8013454: 6003 str r3, [r0, #0]
8013456: f04f 0900 mov.w r9, #0
801345a: 07eb lsls r3, r5, #31
801345c: d50a bpl.n 8013474 <__pow5mult+0x58>
801345e: 4639 mov r1, r7
8013460: 4622 mov r2, r4
8013462: 4630 mov r0, r6
8013464: f7ff ff30 bl 80132c8 <__multiply>
8013468: 4639 mov r1, r7
801346a: 4680 mov r8, r0
801346c: 4630 mov r0, r6
801346e: f7ff fe76 bl 801315e <_Bfree>
8013472: 4647 mov r7, r8
8013474: 106d asrs r5, r5, #1
8013476: d00b beq.n 8013490 <__pow5mult+0x74>
8013478: 6820 ldr r0, [r4, #0]
801347a: b938 cbnz r0, 801348c <__pow5mult+0x70>
801347c: 4622 mov r2, r4
801347e: 4621 mov r1, r4
8013480: 4630 mov r0, r6
8013482: f7ff ff21 bl 80132c8 <__multiply>
8013486: 6020 str r0, [r4, #0]
8013488: f8c0 9000 str.w r9, [r0]
801348c: 4604 mov r4, r0
801348e: e7e4 b.n 801345a <__pow5mult+0x3e>
8013490: 4638 mov r0, r7
8013492: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
8013496: bf00 nop
8013498: 08018118 .word 0x08018118
0801349c <__lshift>:
801349c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
80134a0: 460c mov r4, r1
80134a2: 6849 ldr r1, [r1, #4]
80134a4: 6923 ldr r3, [r4, #16]
80134a6: eb03 1862 add.w r8, r3, r2, asr #5
80134aa: 68a3 ldr r3, [r4, #8]
80134ac: 4607 mov r7, r0
80134ae: 4691 mov r9, r2
80134b0: ea4f 1a62 mov.w sl, r2, asr #5
80134b4: f108 0601 add.w r6, r8, #1
80134b8: 42b3 cmp r3, r6
80134ba: db0b blt.n 80134d4 <__lshift+0x38>
80134bc: 4638 mov r0, r7
80134be: f7ff fe29 bl 8013114 <_Balloc>
80134c2: 4605 mov r5, r0
80134c4: b948 cbnz r0, 80134da <__lshift+0x3e>
80134c6: 4602 mov r2, r0
80134c8: 4b2a ldr r3, [pc, #168] ; (8013574 <__lshift+0xd8>)
80134ca: 482b ldr r0, [pc, #172] ; (8013578 <__lshift+0xdc>)
80134cc: f240 11d9 movw r1, #473 ; 0x1d9
80134d0: f000 ff5e bl 8014390 <__assert_func>
80134d4: 3101 adds r1, #1
80134d6: 005b lsls r3, r3, #1
80134d8: e7ee b.n 80134b8 <__lshift+0x1c>
80134da: 2300 movs r3, #0
80134dc: f100 0114 add.w r1, r0, #20
80134e0: f100 0210 add.w r2, r0, #16
80134e4: 4618 mov r0, r3
80134e6: 4553 cmp r3, sl
80134e8: db37 blt.n 801355a <__lshift+0xbe>
80134ea: 6920 ldr r0, [r4, #16]
80134ec: ea2a 7aea bic.w sl, sl, sl, asr #31
80134f0: f104 0314 add.w r3, r4, #20
80134f4: f019 091f ands.w r9, r9, #31
80134f8: eb01 018a add.w r1, r1, sl, lsl #2
80134fc: eb03 0080 add.w r0, r3, r0, lsl #2
8013500: d02f beq.n 8013562 <__lshift+0xc6>
8013502: f1c9 0e20 rsb lr, r9, #32
8013506: 468a mov sl, r1
8013508: f04f 0c00 mov.w ip, #0
801350c: 681a ldr r2, [r3, #0]
801350e: fa02 f209 lsl.w r2, r2, r9
8013512: ea42 020c orr.w r2, r2, ip
8013516: f84a 2b04 str.w r2, [sl], #4
801351a: f853 2b04 ldr.w r2, [r3], #4
801351e: 4298 cmp r0, r3
8013520: fa22 fc0e lsr.w ip, r2, lr
8013524: d8f2 bhi.n 801350c <__lshift+0x70>
8013526: 1b03 subs r3, r0, r4
8013528: 3b15 subs r3, #21
801352a: f023 0303 bic.w r3, r3, #3
801352e: 3304 adds r3, #4
8013530: f104 0215 add.w r2, r4, #21
8013534: 4290 cmp r0, r2
8013536: bf38 it cc
8013538: 2304 movcc r3, #4
801353a: f841 c003 str.w ip, [r1, r3]
801353e: f1bc 0f00 cmp.w ip, #0
8013542: d001 beq.n 8013548 <__lshift+0xac>
8013544: f108 0602 add.w r6, r8, #2
8013548: 3e01 subs r6, #1
801354a: 4638 mov r0, r7
801354c: 612e str r6, [r5, #16]
801354e: 4621 mov r1, r4
8013550: f7ff fe05 bl 801315e <_Bfree>
8013554: 4628 mov r0, r5
8013556: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
801355a: f842 0f04 str.w r0, [r2, #4]!
801355e: 3301 adds r3, #1
8013560: e7c1 b.n 80134e6 <__lshift+0x4a>
8013562: 3904 subs r1, #4
8013564: f853 2b04 ldr.w r2, [r3], #4
8013568: f841 2f04 str.w r2, [r1, #4]!
801356c: 4298 cmp r0, r3
801356e: d8f9 bhi.n 8013564 <__lshift+0xc8>
8013570: e7ea b.n 8013548 <__lshift+0xac>
8013572: bf00 nop
8013574: 08017f59 .word 0x08017f59
8013578: 08017fc5 .word 0x08017fc5
0801357c <__mcmp>:
801357c: b530 push {r4, r5, lr}
801357e: 6902 ldr r2, [r0, #16]
8013580: 690c ldr r4, [r1, #16]
8013582: 1b12 subs r2, r2, r4
8013584: d10e bne.n 80135a4 <__mcmp+0x28>
8013586: f100 0314 add.w r3, r0, #20
801358a: 3114 adds r1, #20
801358c: eb03 0084 add.w r0, r3, r4, lsl #2
8013590: eb01 0184 add.w r1, r1, r4, lsl #2
8013594: f850 5d04 ldr.w r5, [r0, #-4]!
8013598: f851 4d04 ldr.w r4, [r1, #-4]!
801359c: 42a5 cmp r5, r4
801359e: d003 beq.n 80135a8 <__mcmp+0x2c>
80135a0: d305 bcc.n 80135ae <__mcmp+0x32>
80135a2: 2201 movs r2, #1
80135a4: 4610 mov r0, r2
80135a6: bd30 pop {r4, r5, pc}
80135a8: 4283 cmp r3, r0
80135aa: d3f3 bcc.n 8013594 <__mcmp+0x18>
80135ac: e7fa b.n 80135a4 <__mcmp+0x28>
80135ae: f04f 32ff mov.w r2, #4294967295
80135b2: e7f7 b.n 80135a4 <__mcmp+0x28>
080135b4 <__mdiff>:
80135b4: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
80135b8: 460c mov r4, r1
80135ba: 4606 mov r6, r0
80135bc: 4611 mov r1, r2
80135be: 4620 mov r0, r4
80135c0: 4690 mov r8, r2
80135c2: f7ff ffdb bl 801357c <__mcmp>
80135c6: 1e05 subs r5, r0, #0
80135c8: d110 bne.n 80135ec <__mdiff+0x38>
80135ca: 4629 mov r1, r5
80135cc: 4630 mov r0, r6
80135ce: f7ff fda1 bl 8013114 <_Balloc>
80135d2: b930 cbnz r0, 80135e2 <__mdiff+0x2e>
80135d4: 4b3a ldr r3, [pc, #232] ; (80136c0 <__mdiff+0x10c>)
80135d6: 4602 mov r2, r0
80135d8: f240 2132 movw r1, #562 ; 0x232
80135dc: 4839 ldr r0, [pc, #228] ; (80136c4 <__mdiff+0x110>)
80135de: f000 fed7 bl 8014390 <__assert_func>
80135e2: 2301 movs r3, #1
80135e4: e9c0 3504 strd r3, r5, [r0, #16]
80135e8: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
80135ec: bfa4 itt ge
80135ee: 4643 movge r3, r8
80135f0: 46a0 movge r8, r4
80135f2: 4630 mov r0, r6
80135f4: f8d8 1004 ldr.w r1, [r8, #4]
80135f8: bfa6 itte ge
80135fa: 461c movge r4, r3
80135fc: 2500 movge r5, #0
80135fe: 2501 movlt r5, #1
8013600: f7ff fd88 bl 8013114 <_Balloc>
8013604: b920 cbnz r0, 8013610 <__mdiff+0x5c>
8013606: 4b2e ldr r3, [pc, #184] ; (80136c0 <__mdiff+0x10c>)
8013608: 4602 mov r2, r0
801360a: f44f 7110 mov.w r1, #576 ; 0x240
801360e: e7e5 b.n 80135dc <__mdiff+0x28>
8013610: f8d8 7010 ldr.w r7, [r8, #16]
8013614: 6926 ldr r6, [r4, #16]
8013616: 60c5 str r5, [r0, #12]
8013618: f104 0914 add.w r9, r4, #20
801361c: f108 0514 add.w r5, r8, #20
8013620: f100 0e14 add.w lr, r0, #20
8013624: eb05 0c87 add.w ip, r5, r7, lsl #2
8013628: eb09 0686 add.w r6, r9, r6, lsl #2
801362c: f108 0210 add.w r2, r8, #16
8013630: 46f2 mov sl, lr
8013632: 2100 movs r1, #0
8013634: f859 3b04 ldr.w r3, [r9], #4
8013638: f852 bf04 ldr.w fp, [r2, #4]!
801363c: fa1f f883 uxth.w r8, r3
8013640: fa11 f18b uxtah r1, r1, fp
8013644: 0c1b lsrs r3, r3, #16
8013646: eba1 0808 sub.w r8, r1, r8
801364a: ebc3 431b rsb r3, r3, fp, lsr #16
801364e: eb03 4328 add.w r3, r3, r8, asr #16
8013652: fa1f f888 uxth.w r8, r8
8013656: 1419 asrs r1, r3, #16
8013658: 454e cmp r6, r9
801365a: ea48 4303 orr.w r3, r8, r3, lsl #16
801365e: f84a 3b04 str.w r3, [sl], #4
8013662: d8e7 bhi.n 8013634 <__mdiff+0x80>
8013664: 1b33 subs r3, r6, r4
8013666: 3b15 subs r3, #21
8013668: f023 0303 bic.w r3, r3, #3
801366c: 3304 adds r3, #4
801366e: 3415 adds r4, #21
8013670: 42a6 cmp r6, r4
8013672: bf38 it cc
8013674: 2304 movcc r3, #4
8013676: 441d add r5, r3
8013678: 4473 add r3, lr
801367a: 469e mov lr, r3
801367c: 462e mov r6, r5
801367e: 4566 cmp r6, ip
8013680: d30e bcc.n 80136a0 <__mdiff+0xec>
8013682: f10c 0203 add.w r2, ip, #3
8013686: 1b52 subs r2, r2, r5
8013688: f022 0203 bic.w r2, r2, #3
801368c: 3d03 subs r5, #3
801368e: 45ac cmp ip, r5
8013690: bf38 it cc
8013692: 2200 movcc r2, #0
8013694: 441a add r2, r3
8013696: f852 3d04 ldr.w r3, [r2, #-4]!
801369a: b17b cbz r3, 80136bc <__mdiff+0x108>
801369c: 6107 str r7, [r0, #16]
801369e: e7a3 b.n 80135e8 <__mdiff+0x34>
80136a0: f856 8b04 ldr.w r8, [r6], #4
80136a4: fa11 f288 uxtah r2, r1, r8
80136a8: 1414 asrs r4, r2, #16
80136aa: eb04 4418 add.w r4, r4, r8, lsr #16
80136ae: b292 uxth r2, r2
80136b0: ea42 4204 orr.w r2, r2, r4, lsl #16
80136b4: f84e 2b04 str.w r2, [lr], #4
80136b8: 1421 asrs r1, r4, #16
80136ba: e7e0 b.n 801367e <__mdiff+0xca>
80136bc: 3f01 subs r7, #1
80136be: e7ea b.n 8013696 <__mdiff+0xe2>
80136c0: 08017f59 .word 0x08017f59
80136c4: 08017fc5 .word 0x08017fc5
080136c8 <__d2b>:
80136c8: e92d 43f7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, lr}
80136cc: 4689 mov r9, r1
80136ce: 2101 movs r1, #1
80136d0: ec57 6b10 vmov r6, r7, d0
80136d4: 4690 mov r8, r2
80136d6: f7ff fd1d bl 8013114 <_Balloc>
80136da: 4604 mov r4, r0
80136dc: b930 cbnz r0, 80136ec <__d2b+0x24>
80136de: 4602 mov r2, r0
80136e0: 4b25 ldr r3, [pc, #148] ; (8013778 <__d2b+0xb0>)
80136e2: 4826 ldr r0, [pc, #152] ; (801377c <__d2b+0xb4>)
80136e4: f240 310a movw r1, #778 ; 0x30a
80136e8: f000 fe52 bl 8014390 <__assert_func>
80136ec: f3c7 550a ubfx r5, r7, #20, #11
80136f0: f3c7 0313 ubfx r3, r7, #0, #20
80136f4: bb35 cbnz r5, 8013744 <__d2b+0x7c>
80136f6: 2e00 cmp r6, #0
80136f8: 9301 str r3, [sp, #4]
80136fa: d028 beq.n 801374e <__d2b+0x86>
80136fc: 4668 mov r0, sp
80136fe: 9600 str r6, [sp, #0]
8013700: f7ff fd9c bl 801323c <__lo0bits>
8013704: 9900 ldr r1, [sp, #0]
8013706: b300 cbz r0, 801374a <__d2b+0x82>
8013708: 9a01 ldr r2, [sp, #4]
801370a: f1c0 0320 rsb r3, r0, #32
801370e: fa02 f303 lsl.w r3, r2, r3
8013712: 430b orrs r3, r1
8013714: 40c2 lsrs r2, r0
8013716: 6163 str r3, [r4, #20]
8013718: 9201 str r2, [sp, #4]
801371a: 9b01 ldr r3, [sp, #4]
801371c: 61a3 str r3, [r4, #24]
801371e: 2b00 cmp r3, #0
8013720: bf14 ite ne
8013722: 2202 movne r2, #2
8013724: 2201 moveq r2, #1
8013726: 6122 str r2, [r4, #16]
8013728: b1d5 cbz r5, 8013760 <__d2b+0x98>
801372a: f2a5 4533 subw r5, r5, #1075 ; 0x433
801372e: 4405 add r5, r0
8013730: f8c9 5000 str.w r5, [r9]
8013734: f1c0 0035 rsb r0, r0, #53 ; 0x35
8013738: f8c8 0000 str.w r0, [r8]
801373c: 4620 mov r0, r4
801373e: b003 add sp, #12
8013740: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
8013744: f443 1380 orr.w r3, r3, #1048576 ; 0x100000
8013748: e7d5 b.n 80136f6 <__d2b+0x2e>
801374a: 6161 str r1, [r4, #20]
801374c: e7e5 b.n 801371a <__d2b+0x52>
801374e: a801 add r0, sp, #4
8013750: f7ff fd74 bl 801323c <__lo0bits>
8013754: 9b01 ldr r3, [sp, #4]
8013756: 6163 str r3, [r4, #20]
8013758: 2201 movs r2, #1
801375a: 6122 str r2, [r4, #16]
801375c: 3020 adds r0, #32
801375e: e7e3 b.n 8013728 <__d2b+0x60>
8013760: eb04 0382 add.w r3, r4, r2, lsl #2
8013764: f2a0 4032 subw r0, r0, #1074 ; 0x432
8013768: f8c9 0000 str.w r0, [r9]
801376c: 6918 ldr r0, [r3, #16]
801376e: f7ff fd45 bl 80131fc <__hi0bits>
8013772: ebc0 1042 rsb r0, r0, r2, lsl #5
8013776: e7df b.n 8013738 <__d2b+0x70>
8013778: 08017f59 .word 0x08017f59
801377c: 08017fc5 .word 0x08017fc5
08013780 <frexp>:
8013780: b570 push {r4, r5, r6, lr}
8013782: 2100 movs r1, #0
8013784: ec55 4b10 vmov r4, r5, d0
8013788: 6001 str r1, [r0, #0]
801378a: 4916 ldr r1, [pc, #88] ; (80137e4 <frexp+0x64>)
801378c: f025 4200 bic.w r2, r5, #2147483648 ; 0x80000000
8013790: 428a cmp r2, r1
8013792: 4606 mov r6, r0
8013794: 462b mov r3, r5
8013796: dc22 bgt.n 80137de <frexp+0x5e>
8013798: ee10 1a10 vmov r1, s0
801379c: 4311 orrs r1, r2
801379e: d01e beq.n 80137de <frexp+0x5e>
80137a0: 4911 ldr r1, [pc, #68] ; (80137e8 <frexp+0x68>)
80137a2: 4029 ands r1, r5
80137a4: b969 cbnz r1, 80137c2 <frexp+0x42>
80137a6: 4b11 ldr r3, [pc, #68] ; (80137ec <frexp+0x6c>)
80137a8: 2200 movs r2, #0
80137aa: ee10 0a10 vmov r0, s0
80137ae: 4629 mov r1, r5
80137b0: f7ec ff32 bl 8000618 <__aeabi_dmul>
80137b4: 460b mov r3, r1
80137b6: f021 4200 bic.w r2, r1, #2147483648 ; 0x80000000
80137ba: f06f 0135 mvn.w r1, #53 ; 0x35
80137be: 4604 mov r4, r0
80137c0: 6031 str r1, [r6, #0]
80137c2: 6831 ldr r1, [r6, #0]
80137c4: 1512 asrs r2, r2, #20
80137c6: f023 43ff bic.w r3, r3, #2139095040 ; 0x7f800000
80137ca: f2a2 32fe subw r2, r2, #1022 ; 0x3fe
80137ce: f423 03e0 bic.w r3, r3, #7340032 ; 0x700000
80137d2: 440a add r2, r1
80137d4: f043 557f orr.w r5, r3, #1069547520 ; 0x3fc00000
80137d8: 6032 str r2, [r6, #0]
80137da: f445 1500 orr.w r5, r5, #2097152 ; 0x200000
80137de: ec45 4b10 vmov d0, r4, r5
80137e2: bd70 pop {r4, r5, r6, pc}
80137e4: 7fefffff .word 0x7fefffff
80137e8: 7ff00000 .word 0x7ff00000
80137ec: 43500000 .word 0x43500000
080137f0 <_sbrk_r>:
80137f0: b538 push {r3, r4, r5, lr}
80137f2: 4d06 ldr r5, [pc, #24] ; (801380c <_sbrk_r+0x1c>)
80137f4: 2300 movs r3, #0
80137f6: 4604 mov r4, r0
80137f8: 4608 mov r0, r1
80137fa: 602b str r3, [r5, #0]
80137fc: f001 fb40 bl 8014e80 <_sbrk>
8013800: 1c43 adds r3, r0, #1
8013802: d102 bne.n 801380a <_sbrk_r+0x1a>
8013804: 682b ldr r3, [r5, #0]
8013806: b103 cbz r3, 801380a <_sbrk_r+0x1a>
8013808: 6023 str r3, [r4, #0]
801380a: bd38 pop {r3, r4, r5, pc}
801380c: 20008dc8 .word 0x20008dc8
08013810 <__sread>:
8013810: b510 push {r4, lr}
8013812: 460c mov r4, r1
8013814: f9b1 100e ldrsh.w r1, [r1, #14]
8013818: f001 f88a bl 8014930 <_read_r>
801381c: 2800 cmp r0, #0
801381e: bfab itete ge
8013820: 6d23 ldrge r3, [r4, #80] ; 0x50
8013822: 89a3 ldrhlt r3, [r4, #12]
8013824: 181b addge r3, r3, r0
8013826: f423 5380 biclt.w r3, r3, #4096 ; 0x1000
801382a: bfac ite ge
801382c: 6523 strge r3, [r4, #80] ; 0x50
801382e: 81a3 strhlt r3, [r4, #12]
8013830: bd10 pop {r4, pc}
08013832 <__swrite>:
8013832: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
8013836: 461f mov r7, r3
8013838: 898b ldrh r3, [r1, #12]
801383a: 05db lsls r3, r3, #23
801383c: 4605 mov r5, r0
801383e: 460c mov r4, r1
8013840: 4616 mov r6, r2
8013842: d505 bpl.n 8013850 <__swrite+0x1e>
8013844: f9b1 100e ldrsh.w r1, [r1, #14]
8013848: 2302 movs r3, #2
801384a: 2200 movs r2, #0
801384c: f001 f84c bl 80148e8 <_lseek_r>
8013850: 89a3 ldrh r3, [r4, #12]
8013852: f9b4 100e ldrsh.w r1, [r4, #14]
8013856: f423 5380 bic.w r3, r3, #4096 ; 0x1000
801385a: 81a3 strh r3, [r4, #12]
801385c: 4632 mov r2, r6
801385e: 463b mov r3, r7
8013860: 4628 mov r0, r5
8013862: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr}
8013866: f000 bd3f b.w 80142e8 <_write_r>
0801386a <__sseek>:
801386a: b510 push {r4, lr}
801386c: 460c mov r4, r1
801386e: f9b1 100e ldrsh.w r1, [r1, #14]
8013872: f001 f839 bl 80148e8 <_lseek_r>
8013876: 1c43 adds r3, r0, #1
8013878: 89a3 ldrh r3, [r4, #12]
801387a: bf15 itete ne
801387c: 6520 strne r0, [r4, #80] ; 0x50
801387e: f423 5380 biceq.w r3, r3, #4096 ; 0x1000
8013882: f443 5380 orrne.w r3, r3, #4096 ; 0x1000
8013886: 81a3 strheq r3, [r4, #12]
8013888: bf18 it ne
801388a: 81a3 strhne r3, [r4, #12]
801388c: bd10 pop {r4, pc}
0801388e <__sclose>:
801388e: f9b1 100e ldrsh.w r1, [r1, #14]
8013892: f000 bdd1 b.w 8014438 <_close_r>
08013896 <strncpy>:
8013896: b510 push {r4, lr}
8013898: 3901 subs r1, #1
801389a: 4603 mov r3, r0
801389c: b132 cbz r2, 80138ac <strncpy+0x16>
801389e: f811 4f01 ldrb.w r4, [r1, #1]!
80138a2: f803 4b01 strb.w r4, [r3], #1
80138a6: 3a01 subs r2, #1
80138a8: 2c00 cmp r4, #0
80138aa: d1f7 bne.n 801389c <strncpy+0x6>
80138ac: 441a add r2, r3
80138ae: 2100 movs r1, #0
80138b0: 4293 cmp r3, r2
80138b2: d100 bne.n 80138b6 <strncpy+0x20>
80138b4: bd10 pop {r4, pc}
80138b6: f803 1b01 strb.w r1, [r3], #1
80138ba: e7f9 b.n 80138b0 <strncpy+0x1a>
080138bc <sysconf>:
80138bc: 2808 cmp r0, #8
80138be: b508 push {r3, lr}
80138c0: d006 beq.n 80138d0 <sysconf+0x14>
80138c2: f7fe fefb bl 80126bc <__errno>
80138c6: 2316 movs r3, #22
80138c8: 6003 str r3, [r0, #0]
80138ca: f04f 30ff mov.w r0, #4294967295
80138ce: bd08 pop {r3, pc}
80138d0: f44f 5080 mov.w r0, #4096 ; 0x1000
80138d4: e7fb b.n 80138ce <sysconf+0x12>
080138d6 <__sprint_r>:
80138d6: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
80138da: 6893 ldr r3, [r2, #8]
80138dc: 4680 mov r8, r0
80138de: 460f mov r7, r1
80138e0: 4614 mov r4, r2
80138e2: b91b cbnz r3, 80138ec <__sprint_r+0x16>
80138e4: 6053 str r3, [r2, #4]
80138e6: 4618 mov r0, r3
80138e8: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
80138ec: 6e4b ldr r3, [r1, #100] ; 0x64
80138ee: 049d lsls r5, r3, #18
80138f0: d520 bpl.n 8013934 <__sprint_r+0x5e>
80138f2: 6815 ldr r5, [r2, #0]
80138f4: 3508 adds r5, #8
80138f6: e955 b602 ldrd fp, r6, [r5, #-8]
80138fa: f04f 0900 mov.w r9, #0
80138fe: ea4f 0a96 mov.w sl, r6, lsr #2
8013902: 45ca cmp sl, r9
8013904: dc0b bgt.n 801391e <__sprint_r+0x48>
8013906: 68a3 ldr r3, [r4, #8]
8013908: f026 0003 bic.w r0, r6, #3
801390c: 1a18 subs r0, r3, r0
801390e: 60a0 str r0, [r4, #8]
8013910: 3508 adds r5, #8
8013912: 2800 cmp r0, #0
8013914: d1ef bne.n 80138f6 <__sprint_r+0x20>
8013916: 2300 movs r3, #0
8013918: e9c4 3301 strd r3, r3, [r4, #4]
801391c: e7e4 b.n 80138e8 <__sprint_r+0x12>
801391e: f85b 1029 ldr.w r1, [fp, r9, lsl #2]
8013922: 463a mov r2, r7
8013924: 4640 mov r0, r8
8013926: f000 fe42 bl 80145ae <_fputwc_r>
801392a: 1c43 adds r3, r0, #1
801392c: d0f3 beq.n 8013916 <__sprint_r+0x40>
801392e: f109 0901 add.w r9, r9, #1
8013932: e7e6 b.n 8013902 <__sprint_r+0x2c>
8013934: f000 fe78 bl 8014628 <__sfvwrite_r>
8013938: e7ed b.n 8013916 <__sprint_r+0x40>
...
0801393c <_vfiprintf_r>:
801393c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
8013940: ed2d 8b02 vpush {d8}
8013944: b0b9 sub sp, #228 ; 0xe4
8013946: 460f mov r7, r1
8013948: 9201 str r2, [sp, #4]
801394a: 461d mov r5, r3
801394c: 461c mov r4, r3
801394e: 4681 mov r9, r0
8013950: b118 cbz r0, 801395a <_vfiprintf_r+0x1e>
8013952: 6b83 ldr r3, [r0, #56] ; 0x38
8013954: b90b cbnz r3, 801395a <_vfiprintf_r+0x1e>
8013956: f7fe ffb1 bl 80128bc <__sinit>
801395a: 6e7b ldr r3, [r7, #100] ; 0x64
801395c: 07d8 lsls r0, r3, #31
801395e: d405 bmi.n 801396c <_vfiprintf_r+0x30>
8013960: 89bb ldrh r3, [r7, #12]
8013962: 0599 lsls r1, r3, #22
8013964: d402 bmi.n 801396c <_vfiprintf_r+0x30>
8013966: 6db8 ldr r0, [r7, #88] ; 0x58
8013968: f7ff f91e bl 8012ba8 <__retarget_lock_acquire_recursive>
801396c: f9b7 300c ldrsh.w r3, [r7, #12]
8013970: 049a lsls r2, r3, #18
8013972: d406 bmi.n 8013982 <_vfiprintf_r+0x46>
8013974: f443 5300 orr.w r3, r3, #8192 ; 0x2000
8013978: 81bb strh r3, [r7, #12]
801397a: 6e7b ldr r3, [r7, #100] ; 0x64
801397c: f423 5300 bic.w r3, r3, #8192 ; 0x2000
8013980: 667b str r3, [r7, #100] ; 0x64
8013982: 89bb ldrh r3, [r7, #12]
8013984: 071e lsls r6, r3, #28
8013986: d501 bpl.n 801398c <_vfiprintf_r+0x50>
8013988: 693b ldr r3, [r7, #16]
801398a: b9bb cbnz r3, 80139bc <_vfiprintf_r+0x80>
801398c: 4639 mov r1, r7
801398e: 4648 mov r0, r9
8013990: f7fd ffc8 bl 8011924 <__swsetup_r>
8013994: b190 cbz r0, 80139bc <_vfiprintf_r+0x80>
8013996: 6e7b ldr r3, [r7, #100] ; 0x64
8013998: 07d8 lsls r0, r3, #31
801399a: d508 bpl.n 80139ae <_vfiprintf_r+0x72>
801399c: f04f 33ff mov.w r3, #4294967295
80139a0: 9302 str r3, [sp, #8]
80139a2: 9802 ldr r0, [sp, #8]
80139a4: b039 add sp, #228 ; 0xe4
80139a6: ecbd 8b02 vpop {d8}
80139aa: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
80139ae: 89bb ldrh r3, [r7, #12]
80139b0: 0599 lsls r1, r3, #22
80139b2: d4f3 bmi.n 801399c <_vfiprintf_r+0x60>
80139b4: 6db8 ldr r0, [r7, #88] ; 0x58
80139b6: f7ff f8f8 bl 8012baa <__retarget_lock_release_recursive>
80139ba: e7ef b.n 801399c <_vfiprintf_r+0x60>
80139bc: 89bb ldrh r3, [r7, #12]
80139be: f003 021a and.w r2, r3, #26
80139c2: 2a0a cmp r2, #10
80139c4: d116 bne.n 80139f4 <_vfiprintf_r+0xb8>
80139c6: f9b7 200e ldrsh.w r2, [r7, #14]
80139ca: 2a00 cmp r2, #0
80139cc: db12 blt.n 80139f4 <_vfiprintf_r+0xb8>
80139ce: 6e7a ldr r2, [r7, #100] ; 0x64
80139d0: 07d2 lsls r2, r2, #31
80139d2: d404 bmi.n 80139de <_vfiprintf_r+0xa2>
80139d4: 059e lsls r6, r3, #22
80139d6: d402 bmi.n 80139de <_vfiprintf_r+0xa2>
80139d8: 6db8 ldr r0, [r7, #88] ; 0x58
80139da: f7ff f8e6 bl 8012baa <__retarget_lock_release_recursive>
80139de: 9a01 ldr r2, [sp, #4]
80139e0: 462b mov r3, r5
80139e2: 4639 mov r1, r7
80139e4: 4648 mov r0, r9
80139e6: b039 add sp, #228 ; 0xe4
80139e8: ecbd 8b02 vpop {d8}
80139ec: e8bd 4ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
80139f0: f000 bc3a b.w 8014268 <__sbprintf>
80139f4: 2300 movs r3, #0
80139f6: e9cd 330d strd r3, r3, [sp, #52] ; 0x34
80139fa: e9cd 3305 strd r3, r3, [sp, #20]
80139fe: ae0f add r6, sp, #60 ; 0x3c
8013a00: ee08 3a10 vmov s16, r3
8013a04: 960c str r6, [sp, #48] ; 0x30
8013a06: 9307 str r3, [sp, #28]
8013a08: 9302 str r3, [sp, #8]
8013a0a: 9b01 ldr r3, [sp, #4]
8013a0c: 461d mov r5, r3
8013a0e: f813 2b01 ldrb.w r2, [r3], #1
8013a12: b10a cbz r2, 8013a18 <_vfiprintf_r+0xdc>
8013a14: 2a25 cmp r2, #37 ; 0x25
8013a16: d1f9 bne.n 8013a0c <_vfiprintf_r+0xd0>
8013a18: 9b01 ldr r3, [sp, #4]
8013a1a: ebb5 0803 subs.w r8, r5, r3
8013a1e: d00d beq.n 8013a3c <_vfiprintf_r+0x100>
8013a20: e9c6 3800 strd r3, r8, [r6]
8013a24: 9b0e ldr r3, [sp, #56] ; 0x38
8013a26: 4443 add r3, r8
8013a28: 930e str r3, [sp, #56] ; 0x38
8013a2a: 9b0d ldr r3, [sp, #52] ; 0x34
8013a2c: 3301 adds r3, #1
8013a2e: 2b07 cmp r3, #7
8013a30: 930d str r3, [sp, #52] ; 0x34
8013a32: dc75 bgt.n 8013b20 <_vfiprintf_r+0x1e4>
8013a34: 3608 adds r6, #8
8013a36: 9b02 ldr r3, [sp, #8]
8013a38: 4443 add r3, r8
8013a3a: 9302 str r3, [sp, #8]
8013a3c: 782b ldrb r3, [r5, #0]
8013a3e: 2b00 cmp r3, #0
8013a40: f000 83d6 beq.w 80141f0 <_vfiprintf_r+0x8b4>
8013a44: 2300 movs r3, #0
8013a46: f04f 31ff mov.w r1, #4294967295
8013a4a: 1c6a adds r2, r5, #1
8013a4c: f88d 302b strb.w r3, [sp, #43] ; 0x2b
8013a50: 9100 str r1, [sp, #0]
8013a52: 9303 str r3, [sp, #12]
8013a54: 469a mov sl, r3
8013a56: f812 3b01 ldrb.w r3, [r2], #1
8013a5a: 9201 str r2, [sp, #4]
8013a5c: f1a3 0220 sub.w r2, r3, #32
8013a60: 2a5a cmp r2, #90 ; 0x5a
8013a62: f200 831f bhi.w 80140a4 <_vfiprintf_r+0x768>
8013a66: e8df f012 tbh [pc, r2, lsl #1]
8013a6a: 009b .short 0x009b
8013a6c: 031d031d .word 0x031d031d
8013a70: 031d00a3 .word 0x031d00a3
8013a74: 031d031d .word 0x031d031d
8013a78: 031d0082 .word 0x031d0082
8013a7c: 00a6031d .word 0x00a6031d
8013a80: 031d00b0 .word 0x031d00b0
8013a84: 00b200ad .word 0x00b200ad
8013a88: 00cd031d .word 0x00cd031d
8013a8c: 00d000d0 .word 0x00d000d0
8013a90: 00d000d0 .word 0x00d000d0
8013a94: 00d000d0 .word 0x00d000d0
8013a98: 00d000d0 .word 0x00d000d0
8013a9c: 031d00d0 .word 0x031d00d0
8013aa0: 031d031d .word 0x031d031d
8013aa4: 031d031d .word 0x031d031d
8013aa8: 031d031d .word 0x031d031d
8013aac: 031d031d .word 0x031d031d
8013ab0: 010800fa .word 0x010800fa
8013ab4: 031d031d .word 0x031d031d
8013ab8: 031d031d .word 0x031d031d
8013abc: 031d031d .word 0x031d031d
8013ac0: 031d031d .word 0x031d031d
8013ac4: 031d031d .word 0x031d031d
8013ac8: 031d0158 .word 0x031d0158
8013acc: 031d031d .word 0x031d031d
8013ad0: 031d01a1 .word 0x031d01a1
8013ad4: 031d027e .word 0x031d027e
8013ad8: 029e031d .word 0x029e031d
8013adc: 031d031d .word 0x031d031d
8013ae0: 031d031d .word 0x031d031d
8013ae4: 031d031d .word 0x031d031d
8013ae8: 031d031d .word 0x031d031d
8013aec: 031d031d .word 0x031d031d
8013af0: 010a00fa .word 0x010a00fa
8013af4: 031d031d .word 0x031d031d
8013af8: 00e0031d .word 0x00e0031d
8013afc: 00f4010a .word 0x00f4010a
8013b00: 00ed031d .word 0x00ed031d
8013b04: 0136031d .word 0x0136031d
8013b08: 018f015a .word 0x018f015a
8013b0c: 031d00f4 .word 0x031d00f4
8013b10: 009901a1 .word 0x009901a1
8013b14: 031d0280 .word 0x031d0280
8013b18: 0065031d .word 0x0065031d
8013b1c: 0099031d .word 0x0099031d
8013b20: aa0c add r2, sp, #48 ; 0x30
8013b22: 4639 mov r1, r7
8013b24: 4648 mov r0, r9
8013b26: f7ff fed6 bl 80138d6 <__sprint_r>
8013b2a: 2800 cmp r0, #0
8013b2c: f040 833f bne.w 80141ae <_vfiprintf_r+0x872>
8013b30: ae0f add r6, sp, #60 ; 0x3c
8013b32: e780 b.n 8013a36 <_vfiprintf_r+0xfa>
8013b34: 4a9c ldr r2, [pc, #624] ; (8013da8 <_vfiprintf_r+0x46c>)
8013b36: 9205 str r2, [sp, #20]
8013b38: f01a 0220 ands.w r2, sl, #32
8013b3c: f000 8235 beq.w 8013faa <_vfiprintf_r+0x66e>
8013b40: 3407 adds r4, #7
8013b42: f024 0207 bic.w r2, r4, #7
8013b46: 4693 mov fp, r2
8013b48: 6855 ldr r5, [r2, #4]
8013b4a: f85b 4b08 ldr.w r4, [fp], #8
8013b4e: f01a 0f01 tst.w sl, #1
8013b52: d009 beq.n 8013b68 <_vfiprintf_r+0x22c>
8013b54: ea54 0205 orrs.w r2, r4, r5
8013b58: bf1f itttt ne
8013b5a: 2230 movne r2, #48 ; 0x30
8013b5c: f88d 202c strbne.w r2, [sp, #44] ; 0x2c
8013b60: f88d 302d strbne.w r3, [sp, #45] ; 0x2d
8013b64: f04a 0a02 orrne.w sl, sl, #2
8013b68: f42a 6a80 bic.w sl, sl, #1024 ; 0x400
8013b6c: e11a b.n 8013da4 <_vfiprintf_r+0x468>
8013b6e: 4648 mov r0, r9
8013b70: f7ff f814 bl 8012b9c <_localeconv_r>
8013b74: 6843 ldr r3, [r0, #4]
8013b76: 4618 mov r0, r3
8013b78: ee08 3a10 vmov s16, r3
8013b7c: f7ec fb38 bl 80001f0 <strlen>
8013b80: 9007 str r0, [sp, #28]
8013b82: 4648 mov r0, r9
8013b84: f7ff f80a bl 8012b9c <_localeconv_r>
8013b88: 6883 ldr r3, [r0, #8]
8013b8a: 9306 str r3, [sp, #24]
8013b8c: 9b07 ldr r3, [sp, #28]
8013b8e: b12b cbz r3, 8013b9c <_vfiprintf_r+0x260>
8013b90: 9b06 ldr r3, [sp, #24]
8013b92: b11b cbz r3, 8013b9c <_vfiprintf_r+0x260>
8013b94: 781b ldrb r3, [r3, #0]
8013b96: b10b cbz r3, 8013b9c <_vfiprintf_r+0x260>
8013b98: f44a 6a80 orr.w sl, sl, #1024 ; 0x400
8013b9c: 9a01 ldr r2, [sp, #4]
8013b9e: e75a b.n 8013a56 <_vfiprintf_r+0x11a>
8013ba0: f89d 302b ldrb.w r3, [sp, #43] ; 0x2b
8013ba4: 2b00 cmp r3, #0
8013ba6: d1f9 bne.n 8013b9c <_vfiprintf_r+0x260>
8013ba8: 2320 movs r3, #32
8013baa: f88d 302b strb.w r3, [sp, #43] ; 0x2b
8013bae: e7f5 b.n 8013b9c <_vfiprintf_r+0x260>
8013bb0: f04a 0a01 orr.w sl, sl, #1
8013bb4: e7f2 b.n 8013b9c <_vfiprintf_r+0x260>
8013bb6: f854 3b04 ldr.w r3, [r4], #4
8013bba: 9303 str r3, [sp, #12]
8013bbc: 2b00 cmp r3, #0
8013bbe: daed bge.n 8013b9c <_vfiprintf_r+0x260>
8013bc0: 425b negs r3, r3
8013bc2: 9303 str r3, [sp, #12]
8013bc4: f04a 0a04 orr.w sl, sl, #4
8013bc8: e7e8 b.n 8013b9c <_vfiprintf_r+0x260>
8013bca: 232b movs r3, #43 ; 0x2b
8013bcc: e7ed b.n 8013baa <_vfiprintf_r+0x26e>
8013bce: 9a01 ldr r2, [sp, #4]
8013bd0: f812 3b01 ldrb.w r3, [r2], #1
8013bd4: 2b2a cmp r3, #42 ; 0x2a
8013bd6: d112 bne.n 8013bfe <_vfiprintf_r+0x2c2>
8013bd8: f854 0b04 ldr.w r0, [r4], #4
8013bdc: ea40 73e0 orr.w r3, r0, r0, asr #31
8013be0: e9cd 3200 strd r3, r2, [sp]
8013be4: e7da b.n 8013b9c <_vfiprintf_r+0x260>
8013be6: 9b00 ldr r3, [sp, #0]
8013be8: 200a movs r0, #10
8013bea: fb00 1303 mla r3, r0, r3, r1
8013bee: 9300 str r3, [sp, #0]
8013bf0: f812 3b01 ldrb.w r3, [r2], #1
8013bf4: f1a3 0130 sub.w r1, r3, #48 ; 0x30
8013bf8: 2909 cmp r1, #9
8013bfa: d9f4 bls.n 8013be6 <_vfiprintf_r+0x2aa>
8013bfc: e72d b.n 8013a5a <_vfiprintf_r+0x11e>
8013bfe: 2100 movs r1, #0
8013c00: 9100 str r1, [sp, #0]
8013c02: e7f7 b.n 8013bf4 <_vfiprintf_r+0x2b8>
8013c04: f04a 0a80 orr.w sl, sl, #128 ; 0x80
8013c08: e7c8 b.n 8013b9c <_vfiprintf_r+0x260>
8013c0a: 2100 movs r1, #0
8013c0c: 9a01 ldr r2, [sp, #4]
8013c0e: 9103 str r1, [sp, #12]
8013c10: 9903 ldr r1, [sp, #12]
8013c12: 3b30 subs r3, #48 ; 0x30
8013c14: 200a movs r0, #10
8013c16: fb00 3301 mla r3, r0, r1, r3
8013c1a: 9303 str r3, [sp, #12]
8013c1c: f812 3b01 ldrb.w r3, [r2], #1
8013c20: f1a3 0130 sub.w r1, r3, #48 ; 0x30
8013c24: 2909 cmp r1, #9
8013c26: d9f3 bls.n 8013c10 <_vfiprintf_r+0x2d4>
8013c28: e717 b.n 8013a5a <_vfiprintf_r+0x11e>
8013c2a: 9b01 ldr r3, [sp, #4]
8013c2c: 781b ldrb r3, [r3, #0]
8013c2e: 2b68 cmp r3, #104 ; 0x68
8013c30: bf01 itttt eq
8013c32: 9b01 ldreq r3, [sp, #4]
8013c34: 3301 addeq r3, #1
8013c36: 9301 streq r3, [sp, #4]
8013c38: f44a 7a00 orreq.w sl, sl, #512 ; 0x200
8013c3c: bf18 it ne
8013c3e: f04a 0a40 orrne.w sl, sl, #64 ; 0x40
8013c42: e7ab b.n 8013b9c <_vfiprintf_r+0x260>
8013c44: 9b01 ldr r3, [sp, #4]
8013c46: 781b ldrb r3, [r3, #0]
8013c48: 2b6c cmp r3, #108 ; 0x6c
8013c4a: d105 bne.n 8013c58 <_vfiprintf_r+0x31c>
8013c4c: 9b01 ldr r3, [sp, #4]
8013c4e: 3301 adds r3, #1
8013c50: 9301 str r3, [sp, #4]
8013c52: f04a 0a20 orr.w sl, sl, #32
8013c56: e7a1 b.n 8013b9c <_vfiprintf_r+0x260>
8013c58: f04a 0a10 orr.w sl, sl, #16
8013c5c: e79e b.n 8013b9c <_vfiprintf_r+0x260>
8013c5e: 46a3 mov fp, r4
8013c60: 2100 movs r1, #0
8013c62: f85b 3b04 ldr.w r3, [fp], #4
8013c66: f88d 307c strb.w r3, [sp, #124] ; 0x7c
8013c6a: f88d 102b strb.w r1, [sp, #43] ; 0x2b
8013c6e: 2301 movs r3, #1
8013c70: 9300 str r3, [sp, #0]
8013c72: 460d mov r5, r1
8013c74: f10d 087c add.w r8, sp, #124 ; 0x7c
8013c78: e0ad b.n 8013dd6 <_vfiprintf_r+0x49a>
8013c7a: f04a 0a10 orr.w sl, sl, #16
8013c7e: f01a 0f20 tst.w sl, #32
8013c82: d011 beq.n 8013ca8 <_vfiprintf_r+0x36c>
8013c84: 3407 adds r4, #7
8013c86: f024 0307 bic.w r3, r4, #7
8013c8a: 469b mov fp, r3
8013c8c: 685d ldr r5, [r3, #4]
8013c8e: f85b 4b08 ldr.w r4, [fp], #8
8013c92: 2d00 cmp r5, #0
8013c94: da06 bge.n 8013ca4 <_vfiprintf_r+0x368>
8013c96: 4264 negs r4, r4
8013c98: f04f 032d mov.w r3, #45 ; 0x2d
8013c9c: eb65 0545 sbc.w r5, r5, r5, lsl #1
8013ca0: f88d 302b strb.w r3, [sp, #43] ; 0x2b
8013ca4: 2301 movs r3, #1
8013ca6: e04a b.n 8013d3e <_vfiprintf_r+0x402>
8013ca8: 46a3 mov fp, r4
8013caa: f01a 0f10 tst.w sl, #16
8013cae: f85b 5b04 ldr.w r5, [fp], #4
8013cb2: d002 beq.n 8013cba <_vfiprintf_r+0x37e>
8013cb4: 462c mov r4, r5
8013cb6: 17ed asrs r5, r5, #31
8013cb8: e7eb b.n 8013c92 <_vfiprintf_r+0x356>
8013cba: f01a 0f40 tst.w sl, #64 ; 0x40
8013cbe: d003 beq.n 8013cc8 <_vfiprintf_r+0x38c>
8013cc0: b22c sxth r4, r5
8013cc2: f345 35c0 sbfx r5, r5, #15, #1
8013cc6: e7e4 b.n 8013c92 <_vfiprintf_r+0x356>
8013cc8: f41a 7f00 tst.w sl, #512 ; 0x200
8013ccc: d0f2 beq.n 8013cb4 <_vfiprintf_r+0x378>
8013cce: b26c sxtb r4, r5
8013cd0: f345 15c0 sbfx r5, r5, #7, #1
8013cd4: e7dd b.n 8013c92 <_vfiprintf_r+0x356>
8013cd6: f01a 0f20 tst.w sl, #32
8013cda: f104 0b04 add.w fp, r4, #4
8013cde: d007 beq.n 8013cf0 <_vfiprintf_r+0x3b4>
8013ce0: 9a02 ldr r2, [sp, #8]
8013ce2: 6823 ldr r3, [r4, #0]
8013ce4: 9902 ldr r1, [sp, #8]
8013ce6: 17d2 asrs r2, r2, #31
8013ce8: e9c3 1200 strd r1, r2, [r3]
8013cec: 465c mov r4, fp
8013cee: e68c b.n 8013a0a <_vfiprintf_r+0xce>
8013cf0: f01a 0f10 tst.w sl, #16
8013cf4: d003 beq.n 8013cfe <_vfiprintf_r+0x3c2>
8013cf6: 6823 ldr r3, [r4, #0]
8013cf8: 9a02 ldr r2, [sp, #8]
8013cfa: 601a str r2, [r3, #0]
8013cfc: e7f6 b.n 8013cec <_vfiprintf_r+0x3b0>
8013cfe: f01a 0f40 tst.w sl, #64 ; 0x40
8013d02: d003 beq.n 8013d0c <_vfiprintf_r+0x3d0>
8013d04: 6823 ldr r3, [r4, #0]
8013d06: 9a02 ldr r2, [sp, #8]
8013d08: 801a strh r2, [r3, #0]
8013d0a: e7ef b.n 8013cec <_vfiprintf_r+0x3b0>
8013d0c: f41a 7f00 tst.w sl, #512 ; 0x200
8013d10: d0f1 beq.n 8013cf6 <_vfiprintf_r+0x3ba>
8013d12: 6823 ldr r3, [r4, #0]
8013d14: 9a02 ldr r2, [sp, #8]
8013d16: 701a strb r2, [r3, #0]
8013d18: e7e8 b.n 8013cec <_vfiprintf_r+0x3b0>
8013d1a: f04a 0a10 orr.w sl, sl, #16
8013d1e: f01a 0320 ands.w r3, sl, #32
8013d22: d01f beq.n 8013d64 <_vfiprintf_r+0x428>
8013d24: 3407 adds r4, #7
8013d26: f024 0307 bic.w r3, r4, #7
8013d2a: 469b mov fp, r3
8013d2c: 685d ldr r5, [r3, #4]
8013d2e: f85b 4b08 ldr.w r4, [fp], #8
8013d32: f42a 6a80 bic.w sl, sl, #1024 ; 0x400
8013d36: 2300 movs r3, #0
8013d38: 2200 movs r2, #0
8013d3a: f88d 202b strb.w r2, [sp, #43] ; 0x2b
8013d3e: 9a00 ldr r2, [sp, #0]
8013d40: 3201 adds r2, #1
8013d42: f000 8262 beq.w 801420a <_vfiprintf_r+0x8ce>
8013d46: f02a 0280 bic.w r2, sl, #128 ; 0x80
8013d4a: 9204 str r2, [sp, #16]
8013d4c: ea54 0205 orrs.w r2, r4, r5
8013d50: f040 8261 bne.w 8014216 <_vfiprintf_r+0x8da>
8013d54: 9a00 ldr r2, [sp, #0]
8013d56: 2a00 cmp r2, #0
8013d58: f000 8199 beq.w 801408e <_vfiprintf_r+0x752>
8013d5c: 2b01 cmp r3, #1
8013d5e: f040 825d bne.w 801421c <_vfiprintf_r+0x8e0>
8013d62: e139 b.n 8013fd8 <_vfiprintf_r+0x69c>
8013d64: 46a3 mov fp, r4
8013d66: f01a 0510 ands.w r5, sl, #16
8013d6a: f85b 4b04 ldr.w r4, [fp], #4
8013d6e: d001 beq.n 8013d74 <_vfiprintf_r+0x438>
8013d70: 461d mov r5, r3
8013d72: e7de b.n 8013d32 <_vfiprintf_r+0x3f6>
8013d74: f01a 0340 ands.w r3, sl, #64 ; 0x40
8013d78: d001 beq.n 8013d7e <_vfiprintf_r+0x442>
8013d7a: b2a4 uxth r4, r4
8013d7c: e7d9 b.n 8013d32 <_vfiprintf_r+0x3f6>
8013d7e: f41a 7500 ands.w r5, sl, #512 ; 0x200
8013d82: d0d6 beq.n 8013d32 <_vfiprintf_r+0x3f6>
8013d84: b2e4 uxtb r4, r4
8013d86: e7f3 b.n 8013d70 <_vfiprintf_r+0x434>
8013d88: 2330 movs r3, #48 ; 0x30
8013d8a: 46a3 mov fp, r4
8013d8c: f88d 302c strb.w r3, [sp, #44] ; 0x2c
8013d90: 2378 movs r3, #120 ; 0x78
8013d92: f88d 302d strb.w r3, [sp, #45] ; 0x2d
8013d96: f85b 4b04 ldr.w r4, [fp], #4
8013d9a: 4b03 ldr r3, [pc, #12] ; (8013da8 <_vfiprintf_r+0x46c>)
8013d9c: 9305 str r3, [sp, #20]
8013d9e: 2500 movs r5, #0
8013da0: f04a 0a02 orr.w sl, sl, #2
8013da4: 2302 movs r3, #2
8013da6: e7c7 b.n 8013d38 <_vfiprintf_r+0x3fc>
8013da8: 08017f08 .word 0x08017f08
8013dac: 9b00 ldr r3, [sp, #0]
8013dae: 46a3 mov fp, r4
8013db0: 2500 movs r5, #0
8013db2: 1c5c adds r4, r3, #1
8013db4: f85b 8b04 ldr.w r8, [fp], #4
8013db8: f88d 502b strb.w r5, [sp, #43] ; 0x2b
8013dbc: f000 80ce beq.w 8013f5c <_vfiprintf_r+0x620>
8013dc0: 461a mov r2, r3
8013dc2: 4629 mov r1, r5
8013dc4: 4640 mov r0, r8
8013dc6: f7ec fa1b bl 8000200 <memchr>
8013dca: 2800 cmp r0, #0
8013dcc: f000 8174 beq.w 80140b8 <_vfiprintf_r+0x77c>
8013dd0: eba0 0308 sub.w r3, r0, r8
8013dd4: 9300 str r3, [sp, #0]
8013dd6: 9b00 ldr r3, [sp, #0]
8013dd8: 42ab cmp r3, r5
8013dda: bfb8 it lt
8013ddc: 462b movlt r3, r5
8013dde: 9304 str r3, [sp, #16]
8013de0: f89d 302b ldrb.w r3, [sp, #43] ; 0x2b
8013de4: b113 cbz r3, 8013dec <_vfiprintf_r+0x4b0>
8013de6: 9b04 ldr r3, [sp, #16]
8013de8: 3301 adds r3, #1
8013dea: 9304 str r3, [sp, #16]
8013dec: f01a 0302 ands.w r3, sl, #2
8013df0: 9308 str r3, [sp, #32]
8013df2: bf1e ittt ne
8013df4: 9b04 ldrne r3, [sp, #16]
8013df6: 3302 addne r3, #2
8013df8: 9304 strne r3, [sp, #16]
8013dfa: f01a 0384 ands.w r3, sl, #132 ; 0x84
8013dfe: 9309 str r3, [sp, #36] ; 0x24
8013e00: d11f bne.n 8013e42 <_vfiprintf_r+0x506>
8013e02: e9dd 3203 ldrd r3, r2, [sp, #12]
8013e06: 1a9c subs r4, r3, r2
8013e08: 2c00 cmp r4, #0
8013e0a: dd1a ble.n 8013e42 <_vfiprintf_r+0x506>
8013e0c: e9dd 320d ldrd r3, r2, [sp, #52] ; 0x34
8013e10: 48aa ldr r0, [pc, #680] ; (80140bc <_vfiprintf_r+0x780>)
8013e12: 6030 str r0, [r6, #0]
8013e14: 2c10 cmp r4, #16
8013e16: f103 0301 add.w r3, r3, #1
8013e1a: f106 0108 add.w r1, r6, #8
8013e1e: f300 8153 bgt.w 80140c8 <_vfiprintf_r+0x78c>
8013e22: 6074 str r4, [r6, #4]
8013e24: 2b07 cmp r3, #7
8013e26: 4414 add r4, r2
8013e28: e9cd 340d strd r3, r4, [sp, #52] ; 0x34
8013e2c: f340 815e ble.w 80140ec <_vfiprintf_r+0x7b0>
8013e30: aa0c add r2, sp, #48 ; 0x30
8013e32: 4639 mov r1, r7
8013e34: 4648 mov r0, r9
8013e36: f7ff fd4e bl 80138d6 <__sprint_r>
8013e3a: 2800 cmp r0, #0
8013e3c: f040 81b7 bne.w 80141ae <_vfiprintf_r+0x872>
8013e40: ae0f add r6, sp, #60 ; 0x3c
8013e42: f89d 302b ldrb.w r3, [sp, #43] ; 0x2b
8013e46: b173 cbz r3, 8013e66 <_vfiprintf_r+0x52a>
8013e48: f10d 022b add.w r2, sp, #43 ; 0x2b
8013e4c: 9b0d ldr r3, [sp, #52] ; 0x34
8013e4e: 6032 str r2, [r6, #0]
8013e50: 2201 movs r2, #1
8013e52: 6072 str r2, [r6, #4]
8013e54: 9a0e ldr r2, [sp, #56] ; 0x38
8013e56: 3301 adds r3, #1
8013e58: 3201 adds r2, #1
8013e5a: 2b07 cmp r3, #7
8013e5c: e9cd 320d strd r3, r2, [sp, #52] ; 0x34
8013e60: f300 8146 bgt.w 80140f0 <_vfiprintf_r+0x7b4>
8013e64: 3608 adds r6, #8
8013e66: 9b08 ldr r3, [sp, #32]
8013e68: b16b cbz r3, 8013e86 <_vfiprintf_r+0x54a>
8013e6a: aa0b add r2, sp, #44 ; 0x2c
8013e6c: 9b0d ldr r3, [sp, #52] ; 0x34
8013e6e: 6032 str r2, [r6, #0]
8013e70: 2202 movs r2, #2
8013e72: 6072 str r2, [r6, #4]
8013e74: 9a0e ldr r2, [sp, #56] ; 0x38
8013e76: 3301 adds r3, #1
8013e78: 3202 adds r2, #2
8013e7a: 2b07 cmp r3, #7
8013e7c: e9cd 320d strd r3, r2, [sp, #52] ; 0x34
8013e80: f300 813f bgt.w 8014102 <_vfiprintf_r+0x7c6>
8013e84: 3608 adds r6, #8
8013e86: 9b09 ldr r3, [sp, #36] ; 0x24
8013e88: 2b80 cmp r3, #128 ; 0x80
8013e8a: d11f bne.n 8013ecc <_vfiprintf_r+0x590>
8013e8c: e9dd 3203 ldrd r3, r2, [sp, #12]
8013e90: 1a9c subs r4, r3, r2
8013e92: 2c00 cmp r4, #0
8013e94: dd1a ble.n 8013ecc <_vfiprintf_r+0x590>
8013e96: e9dd 320d ldrd r3, r2, [sp, #52] ; 0x34
8013e9a: 4889 ldr r0, [pc, #548] ; (80140c0 <_vfiprintf_r+0x784>)
8013e9c: 6030 str r0, [r6, #0]
8013e9e: 2c10 cmp r4, #16
8013ea0: f103 0301 add.w r3, r3, #1
8013ea4: f106 0108 add.w r1, r6, #8
8013ea8: f300 8134 bgt.w 8014114 <_vfiprintf_r+0x7d8>
8013eac: 6074 str r4, [r6, #4]
8013eae: 2b07 cmp r3, #7
8013eb0: 4414 add r4, r2
8013eb2: e9cd 340d strd r3, r4, [sp, #52] ; 0x34
8013eb6: f340 813f ble.w 8014138 <_vfiprintf_r+0x7fc>
8013eba: aa0c add r2, sp, #48 ; 0x30
8013ebc: 4639 mov r1, r7
8013ebe: 4648 mov r0, r9
8013ec0: f7ff fd09 bl 80138d6 <__sprint_r>
8013ec4: 2800 cmp r0, #0
8013ec6: f040 8172 bne.w 80141ae <_vfiprintf_r+0x872>
8013eca: ae0f add r6, sp, #60 ; 0x3c
8013ecc: 9b00 ldr r3, [sp, #0]
8013ece: 1aec subs r4, r5, r3
8013ed0: 2c00 cmp r4, #0
8013ed2: dd1a ble.n 8013f0a <_vfiprintf_r+0x5ce>
8013ed4: 4d7a ldr r5, [pc, #488] ; (80140c0 <_vfiprintf_r+0x784>)
8013ed6: 6035 str r5, [r6, #0]
8013ed8: e9dd 310d ldrd r3, r1, [sp, #52] ; 0x34
8013edc: 2c10 cmp r4, #16
8013ede: f103 0301 add.w r3, r3, #1
8013ee2: f106 0208 add.w r2, r6, #8
8013ee6: f300 8129 bgt.w 801413c <_vfiprintf_r+0x800>
8013eea: 6074 str r4, [r6, #4]
8013eec: 2b07 cmp r3, #7
8013eee: 440c add r4, r1
8013ef0: e9cd 340d strd r3, r4, [sp, #52] ; 0x34
8013ef4: f340 8133 ble.w 801415e <_vfiprintf_r+0x822>
8013ef8: aa0c add r2, sp, #48 ; 0x30
8013efa: 4639 mov r1, r7
8013efc: 4648 mov r0, r9
8013efe: f7ff fcea bl 80138d6 <__sprint_r>
8013f02: 2800 cmp r0, #0
8013f04: f040 8153 bne.w 80141ae <_vfiprintf_r+0x872>
8013f08: ae0f add r6, sp, #60 ; 0x3c
8013f0a: 9b00 ldr r3, [sp, #0]
8013f0c: 980e ldr r0, [sp, #56] ; 0x38
8013f0e: 6073 str r3, [r6, #4]
8013f10: 4418 add r0, r3
8013f12: 9b0d ldr r3, [sp, #52] ; 0x34
8013f14: f8c6 8000 str.w r8, [r6]
8013f18: 3301 adds r3, #1
8013f1a: 2b07 cmp r3, #7
8013f1c: 900e str r0, [sp, #56] ; 0x38
8013f1e: 930d str r3, [sp, #52] ; 0x34
8013f20: f300 811f bgt.w 8014162 <_vfiprintf_r+0x826>
8013f24: f106 0308 add.w r3, r6, #8
8013f28: f01a 0f04 tst.w sl, #4
8013f2c: f040 8121 bne.w 8014172 <_vfiprintf_r+0x836>
8013f30: e9dd 3202 ldrd r3, r2, [sp, #8]
8013f34: 9904 ldr r1, [sp, #16]
8013f36: 428a cmp r2, r1
8013f38: bfac ite ge
8013f3a: 189b addge r3, r3, r2
8013f3c: 185b addlt r3, r3, r1
8013f3e: 9302 str r3, [sp, #8]
8013f40: 9b0e ldr r3, [sp, #56] ; 0x38
8013f42: b13b cbz r3, 8013f54 <_vfiprintf_r+0x618>
8013f44: aa0c add r2, sp, #48 ; 0x30
8013f46: 4639 mov r1, r7
8013f48: 4648 mov r0, r9
8013f4a: f7ff fcc4 bl 80138d6 <__sprint_r>
8013f4e: 2800 cmp r0, #0
8013f50: f040 812d bne.w 80141ae <_vfiprintf_r+0x872>
8013f54: 2300 movs r3, #0
8013f56: 930d str r3, [sp, #52] ; 0x34
8013f58: ae0f add r6, sp, #60 ; 0x3c
8013f5a: e6c7 b.n 8013cec <_vfiprintf_r+0x3b0>
8013f5c: 4640 mov r0, r8
8013f5e: f7ec f947 bl 80001f0 <strlen>
8013f62: 9000 str r0, [sp, #0]
8013f64: e737 b.n 8013dd6 <_vfiprintf_r+0x49a>
8013f66: f04a 0a10 orr.w sl, sl, #16
8013f6a: f01a 0320 ands.w r3, sl, #32
8013f6e: d008 beq.n 8013f82 <_vfiprintf_r+0x646>
8013f70: 3407 adds r4, #7
8013f72: f024 0307 bic.w r3, r4, #7
8013f76: 469b mov fp, r3
8013f78: 685d ldr r5, [r3, #4]
8013f7a: f85b 4b08 ldr.w r4, [fp], #8
8013f7e: 2301 movs r3, #1
8013f80: e6da b.n 8013d38 <_vfiprintf_r+0x3fc>
8013f82: 46a3 mov fp, r4
8013f84: f01a 0510 ands.w r5, sl, #16
8013f88: f85b 4b04 ldr.w r4, [fp], #4
8013f8c: d001 beq.n 8013f92 <_vfiprintf_r+0x656>
8013f8e: 461d mov r5, r3
8013f90: e7f5 b.n 8013f7e <_vfiprintf_r+0x642>
8013f92: f01a 0340 ands.w r3, sl, #64 ; 0x40
8013f96: d001 beq.n 8013f9c <_vfiprintf_r+0x660>
8013f98: b2a4 uxth r4, r4
8013f9a: e7f0 b.n 8013f7e <_vfiprintf_r+0x642>
8013f9c: f41a 7500 ands.w r5, sl, #512 ; 0x200
8013fa0: d0ed beq.n 8013f7e <_vfiprintf_r+0x642>
8013fa2: b2e4 uxtb r4, r4
8013fa4: e7f3 b.n 8013f8e <_vfiprintf_r+0x652>
8013fa6: 4a47 ldr r2, [pc, #284] ; (80140c4 <_vfiprintf_r+0x788>)
8013fa8: e5c5 b.n 8013b36 <_vfiprintf_r+0x1fa>
8013faa: 46a3 mov fp, r4
8013fac: f01a 0510 ands.w r5, sl, #16
8013fb0: f85b 4b04 ldr.w r4, [fp], #4
8013fb4: d001 beq.n 8013fba <_vfiprintf_r+0x67e>
8013fb6: 4615 mov r5, r2
8013fb8: e5c9 b.n 8013b4e <_vfiprintf_r+0x212>
8013fba: f01a 0240 ands.w r2, sl, #64 ; 0x40
8013fbe: d001 beq.n 8013fc4 <_vfiprintf_r+0x688>
8013fc0: b2a4 uxth r4, r4
8013fc2: e5c4 b.n 8013b4e <_vfiprintf_r+0x212>
8013fc4: f41a 7500 ands.w r5, sl, #512 ; 0x200
8013fc8: f43f adc1 beq.w 8013b4e <_vfiprintf_r+0x212>
8013fcc: b2e4 uxtb r4, r4
8013fce: e7f2 b.n 8013fb6 <_vfiprintf_r+0x67a>
8013fd0: 2c0a cmp r4, #10
8013fd2: f175 0300 sbcs.w r3, r5, #0
8013fd6: d205 bcs.n 8013fe4 <_vfiprintf_r+0x6a8>
8013fd8: 3430 adds r4, #48 ; 0x30
8013fda: f88d 40df strb.w r4, [sp, #223] ; 0xdf
8013fde: f10d 08df add.w r8, sp, #223 ; 0xdf
8013fe2: e137 b.n 8014254 <_vfiprintf_r+0x918>
8013fe4: ab38 add r3, sp, #224 ; 0xe0
8013fe6: 9308 str r3, [sp, #32]
8013fe8: 9b04 ldr r3, [sp, #16]
8013fea: f403 6380 and.w r3, r3, #1024 ; 0x400
8013fee: f04f 0a00 mov.w sl, #0
8013ff2: 9309 str r3, [sp, #36] ; 0x24
8013ff4: 9b08 ldr r3, [sp, #32]
8013ff6: 220a movs r2, #10
8013ff8: f103 38ff add.w r8, r3, #4294967295
8013ffc: 4620 mov r0, r4
8013ffe: 2300 movs r3, #0
8014000: 4629 mov r1, r5
8014002: f7ec fde1 bl 8000bc8 <__aeabi_uldivmod>
8014006: 9b08 ldr r3, [sp, #32]
8014008: 3230 adds r2, #48 ; 0x30
801400a: f803 2c01 strb.w r2, [r3, #-1]
801400e: 9b09 ldr r3, [sp, #36] ; 0x24
8014010: f10a 0a01 add.w sl, sl, #1
8014014: b1db cbz r3, 801404e <_vfiprintf_r+0x712>
8014016: 9b06 ldr r3, [sp, #24]
8014018: 781b ldrb r3, [r3, #0]
801401a: 4553 cmp r3, sl
801401c: d117 bne.n 801404e <_vfiprintf_r+0x712>
801401e: f1ba 0fff cmp.w sl, #255 ; 0xff
8014022: d014 beq.n 801404e <_vfiprintf_r+0x712>
8014024: 2c0a cmp r4, #10
8014026: f175 0300 sbcs.w r3, r5, #0
801402a: d310 bcc.n 801404e <_vfiprintf_r+0x712>
801402c: 9b07 ldr r3, [sp, #28]
801402e: eba8 0803 sub.w r8, r8, r3
8014032: 461a mov r2, r3
8014034: ee18 1a10 vmov r1, s16
8014038: 4640 mov r0, r8
801403a: f7ff fc2c bl 8013896 <strncpy>
801403e: 9b06 ldr r3, [sp, #24]
8014040: 785b ldrb r3, [r3, #1]
8014042: b1a3 cbz r3, 801406e <_vfiprintf_r+0x732>
8014044: 9b06 ldr r3, [sp, #24]
8014046: 3301 adds r3, #1
8014048: 9306 str r3, [sp, #24]
801404a: f04f 0a00 mov.w sl, #0
801404e: 2300 movs r3, #0
8014050: 220a movs r2, #10
8014052: 4620 mov r0, r4
8014054: 4629 mov r1, r5
8014056: f7ec fdb7 bl 8000bc8 <__aeabi_uldivmod>
801405a: 2c0a cmp r4, #10
801405c: f175 0300 sbcs.w r3, r5, #0
8014060: f0c0 80f8 bcc.w 8014254 <_vfiprintf_r+0x918>
8014064: 4604 mov r4, r0
8014066: 460d mov r5, r1
8014068: f8cd 8020 str.w r8, [sp, #32]
801406c: e7c2 b.n 8013ff4 <_vfiprintf_r+0x6b8>
801406e: 469a mov sl, r3
8014070: e7ed b.n 801404e <_vfiprintf_r+0x712>
8014072: f004 030f and.w r3, r4, #15
8014076: 9a05 ldr r2, [sp, #20]
8014078: 0924 lsrs r4, r4, #4
801407a: 5cd3 ldrb r3, [r2, r3]
801407c: f808 3d01 strb.w r3, [r8, #-1]!
8014080: ea44 7405 orr.w r4, r4, r5, lsl #28
8014084: 092d lsrs r5, r5, #4
8014086: ea54 0305 orrs.w r3, r4, r5
801408a: d1f2 bne.n 8014072 <_vfiprintf_r+0x736>
801408c: e0e2 b.n 8014254 <_vfiprintf_r+0x918>
801408e: b933 cbnz r3, 801409e <_vfiprintf_r+0x762>
8014090: f01a 0f01 tst.w sl, #1
8014094: d003 beq.n 801409e <_vfiprintf_r+0x762>
8014096: 2330 movs r3, #48 ; 0x30
8014098: f88d 30df strb.w r3, [sp, #223] ; 0xdf
801409c: e79f b.n 8013fde <_vfiprintf_r+0x6a2>
801409e: f10d 08e0 add.w r8, sp, #224 ; 0xe0
80140a2: e0d7 b.n 8014254 <_vfiprintf_r+0x918>
80140a4: 2b00 cmp r3, #0
80140a6: f000 80a3 beq.w 80141f0 <_vfiprintf_r+0x8b4>
80140aa: 2100 movs r1, #0
80140ac: f88d 307c strb.w r3, [sp, #124] ; 0x7c
80140b0: f88d 102b strb.w r1, [sp, #43] ; 0x2b
80140b4: 46a3 mov fp, r4
80140b6: e5da b.n 8013c6e <_vfiprintf_r+0x332>
80140b8: 4605 mov r5, r0
80140ba: e68c b.n 8013dd6 <_vfiprintf_r+0x49a>
80140bc: 08018124 .word 0x08018124
80140c0: 08018134 .word 0x08018134
80140c4: 08017f19 .word 0x08017f19
80140c8: 2010 movs r0, #16
80140ca: 4402 add r2, r0
80140cc: 2b07 cmp r3, #7
80140ce: e9cd 320d strd r3, r2, [sp, #52] ; 0x34
80140d2: 6070 str r0, [r6, #4]
80140d4: dd07 ble.n 80140e6 <_vfiprintf_r+0x7aa>
80140d6: aa0c add r2, sp, #48 ; 0x30
80140d8: 4639 mov r1, r7
80140da: 4648 mov r0, r9
80140dc: f7ff fbfb bl 80138d6 <__sprint_r>
80140e0: 2800 cmp r0, #0
80140e2: d164 bne.n 80141ae <_vfiprintf_r+0x872>
80140e4: a90f add r1, sp, #60 ; 0x3c
80140e6: 3c10 subs r4, #16
80140e8: 460e mov r6, r1
80140ea: e68f b.n 8013e0c <_vfiprintf_r+0x4d0>
80140ec: 460e mov r6, r1
80140ee: e6a8 b.n 8013e42 <_vfiprintf_r+0x506>
80140f0: aa0c add r2, sp, #48 ; 0x30
80140f2: 4639 mov r1, r7
80140f4: 4648 mov r0, r9
80140f6: f7ff fbee bl 80138d6 <__sprint_r>
80140fa: 2800 cmp r0, #0
80140fc: d157 bne.n 80141ae <_vfiprintf_r+0x872>
80140fe: ae0f add r6, sp, #60 ; 0x3c
8014100: e6b1 b.n 8013e66 <_vfiprintf_r+0x52a>
8014102: aa0c add r2, sp, #48 ; 0x30
8014104: 4639 mov r1, r7
8014106: 4648 mov r0, r9
8014108: f7ff fbe5 bl 80138d6 <__sprint_r>
801410c: 2800 cmp r0, #0
801410e: d14e bne.n 80141ae <_vfiprintf_r+0x872>
8014110: ae0f add r6, sp, #60 ; 0x3c
8014112: e6b8 b.n 8013e86 <_vfiprintf_r+0x54a>
8014114: 2010 movs r0, #16
8014116: 4402 add r2, r0
8014118: 2b07 cmp r3, #7
801411a: e9cd 320d strd r3, r2, [sp, #52] ; 0x34
801411e: 6070 str r0, [r6, #4]
8014120: dd07 ble.n 8014132 <_vfiprintf_r+0x7f6>
8014122: aa0c add r2, sp, #48 ; 0x30
8014124: 4639 mov r1, r7
8014126: 4648 mov r0, r9
8014128: f7ff fbd5 bl 80138d6 <__sprint_r>
801412c: 2800 cmp r0, #0
801412e: d13e bne.n 80141ae <_vfiprintf_r+0x872>
8014130: a90f add r1, sp, #60 ; 0x3c
8014132: 3c10 subs r4, #16
8014134: 460e mov r6, r1
8014136: e6ae b.n 8013e96 <_vfiprintf_r+0x55a>
8014138: 460e mov r6, r1
801413a: e6c7 b.n 8013ecc <_vfiprintf_r+0x590>
801413c: 2010 movs r0, #16
801413e: 4401 add r1, r0
8014140: 2b07 cmp r3, #7
8014142: e9cd 310d strd r3, r1, [sp, #52] ; 0x34
8014146: 6070 str r0, [r6, #4]
8014148: dd06 ble.n 8014158 <_vfiprintf_r+0x81c>
801414a: aa0c add r2, sp, #48 ; 0x30
801414c: 4639 mov r1, r7
801414e: 4648 mov r0, r9
8014150: f7ff fbc1 bl 80138d6 <__sprint_r>
8014154: bb58 cbnz r0, 80141ae <_vfiprintf_r+0x872>
8014156: aa0f add r2, sp, #60 ; 0x3c
8014158: 3c10 subs r4, #16
801415a: 4616 mov r6, r2
801415c: e6bb b.n 8013ed6 <_vfiprintf_r+0x59a>
801415e: 4616 mov r6, r2
8014160: e6d3 b.n 8013f0a <_vfiprintf_r+0x5ce>
8014162: aa0c add r2, sp, #48 ; 0x30
8014164: 4639 mov r1, r7
8014166: 4648 mov r0, r9
8014168: f7ff fbb5 bl 80138d6 <__sprint_r>
801416c: b9f8 cbnz r0, 80141ae <_vfiprintf_r+0x872>
801416e: ab0f add r3, sp, #60 ; 0x3c
8014170: e6da b.n 8013f28 <_vfiprintf_r+0x5ec>
8014172: e9dd 2103 ldrd r2, r1, [sp, #12]
8014176: 1a54 subs r4, r2, r1
8014178: 2c00 cmp r4, #0
801417a: f77f aed9 ble.w 8013f30 <_vfiprintf_r+0x5f4>
801417e: 4d39 ldr r5, [pc, #228] ; (8014264 <_vfiprintf_r+0x928>)
8014180: 2610 movs r6, #16
8014182: e9dd 210d ldrd r2, r1, [sp, #52] ; 0x34
8014186: 2c10 cmp r4, #16
8014188: f102 0201 add.w r2, r2, #1
801418c: 601d str r5, [r3, #0]
801418e: dc1d bgt.n 80141cc <_vfiprintf_r+0x890>
8014190: 605c str r4, [r3, #4]
8014192: 2a07 cmp r2, #7
8014194: 440c add r4, r1
8014196: e9cd 240d strd r2, r4, [sp, #52] ; 0x34
801419a: f77f aec9 ble.w 8013f30 <_vfiprintf_r+0x5f4>
801419e: aa0c add r2, sp, #48 ; 0x30
80141a0: 4639 mov r1, r7
80141a2: 4648 mov r0, r9
80141a4: f7ff fb97 bl 80138d6 <__sprint_r>
80141a8: 2800 cmp r0, #0
80141aa: f43f aec1 beq.w 8013f30 <_vfiprintf_r+0x5f4>
80141ae: 6e7b ldr r3, [r7, #100] ; 0x64
80141b0: 07d9 lsls r1, r3, #31
80141b2: d405 bmi.n 80141c0 <_vfiprintf_r+0x884>
80141b4: 89bb ldrh r3, [r7, #12]
80141b6: 059a lsls r2, r3, #22
80141b8: d402 bmi.n 80141c0 <_vfiprintf_r+0x884>
80141ba: 6db8 ldr r0, [r7, #88] ; 0x58
80141bc: f7fe fcf5 bl 8012baa <__retarget_lock_release_recursive>
80141c0: 89bb ldrh r3, [r7, #12]
80141c2: 065b lsls r3, r3, #25
80141c4: f57f abed bpl.w 80139a2 <_vfiprintf_r+0x66>
80141c8: f7ff bbe8 b.w 801399c <_vfiprintf_r+0x60>
80141cc: 3110 adds r1, #16
80141ce: 2a07 cmp r2, #7
80141d0: e9cd 210d strd r2, r1, [sp, #52] ; 0x34
80141d4: 605e str r6, [r3, #4]
80141d6: dc02 bgt.n 80141de <_vfiprintf_r+0x8a2>
80141d8: 3308 adds r3, #8
80141da: 3c10 subs r4, #16
80141dc: e7d1 b.n 8014182 <_vfiprintf_r+0x846>
80141de: aa0c add r2, sp, #48 ; 0x30
80141e0: 4639 mov r1, r7
80141e2: 4648 mov r0, r9
80141e4: f7ff fb77 bl 80138d6 <__sprint_r>
80141e8: 2800 cmp r0, #0
80141ea: d1e0 bne.n 80141ae <_vfiprintf_r+0x872>
80141ec: ab0f add r3, sp, #60 ; 0x3c
80141ee: e7f4 b.n 80141da <_vfiprintf_r+0x89e>
80141f0: 9b0e ldr r3, [sp, #56] ; 0x38
80141f2: b913 cbnz r3, 80141fa <_vfiprintf_r+0x8be>
80141f4: 2300 movs r3, #0
80141f6: 930d str r3, [sp, #52] ; 0x34
80141f8: e7d9 b.n 80141ae <_vfiprintf_r+0x872>
80141fa: aa0c add r2, sp, #48 ; 0x30
80141fc: 4639 mov r1, r7
80141fe: 4648 mov r0, r9
8014200: f7ff fb69 bl 80138d6 <__sprint_r>
8014204: 2800 cmp r0, #0
8014206: d0f5 beq.n 80141f4 <_vfiprintf_r+0x8b8>
8014208: e7d1 b.n 80141ae <_vfiprintf_r+0x872>
801420a: ea54 0205 orrs.w r2, r4, r5
801420e: f8cd a010 str.w sl, [sp, #16]
8014212: f43f ada3 beq.w 8013d5c <_vfiprintf_r+0x420>
8014216: 2b01 cmp r3, #1
8014218: f43f aeda beq.w 8013fd0 <_vfiprintf_r+0x694>
801421c: 2b02 cmp r3, #2
801421e: f10d 08e0 add.w r8, sp, #224 ; 0xe0
8014222: f43f af26 beq.w 8014072 <_vfiprintf_r+0x736>
8014226: f004 0307 and.w r3, r4, #7
801422a: 08e4 lsrs r4, r4, #3
801422c: ea44 7445 orr.w r4, r4, r5, lsl #29
8014230: 08ed lsrs r5, r5, #3
8014232: 3330 adds r3, #48 ; 0x30
8014234: ea54 0105 orrs.w r1, r4, r5
8014238: 4642 mov r2, r8
801423a: f808 3d01 strb.w r3, [r8, #-1]!
801423e: d1f2 bne.n 8014226 <_vfiprintf_r+0x8ea>
8014240: 9904 ldr r1, [sp, #16]
8014242: 07c8 lsls r0, r1, #31
8014244: d506 bpl.n 8014254 <_vfiprintf_r+0x918>
8014246: 2b30 cmp r3, #48 ; 0x30
8014248: d004 beq.n 8014254 <_vfiprintf_r+0x918>
801424a: 2330 movs r3, #48 ; 0x30
801424c: f808 3c01 strb.w r3, [r8, #-1]
8014250: f1a2 0802 sub.w r8, r2, #2
8014254: ab38 add r3, sp, #224 ; 0xe0
8014256: eba3 0308 sub.w r3, r3, r8
801425a: 9d00 ldr r5, [sp, #0]
801425c: f8dd a010 ldr.w sl, [sp, #16]
8014260: 9300 str r3, [sp, #0]
8014262: e5b8 b.n 8013dd6 <_vfiprintf_r+0x49a>
8014264: 08018124 .word 0x08018124
08014268 <__sbprintf>:
8014268: b570 push {r4, r5, r6, lr}
801426a: 460c mov r4, r1
801426c: 8989 ldrh r1, [r1, #12]
801426e: f5ad 6d8e sub.w sp, sp, #1136 ; 0x470
8014272: f021 0102 bic.w r1, r1, #2
8014276: f8ad 1014 strh.w r1, [sp, #20]
801427a: 6e61 ldr r1, [r4, #100] ; 0x64
801427c: 911b str r1, [sp, #108] ; 0x6c
801427e: 89e1 ldrh r1, [r4, #14]
8014280: f8ad 1016 strh.w r1, [sp, #22]
8014284: 69e1 ldr r1, [r4, #28]
8014286: 9109 str r1, [sp, #36] ; 0x24
8014288: 6a61 ldr r1, [r4, #36] ; 0x24
801428a: 910b str r1, [sp, #44] ; 0x2c
801428c: a91c add r1, sp, #112 ; 0x70
801428e: 9102 str r1, [sp, #8]
8014290: 9106 str r1, [sp, #24]
8014292: f44f 6180 mov.w r1, #1024 ; 0x400
8014296: 4606 mov r6, r0
8014298: 9104 str r1, [sp, #16]
801429a: 9107 str r1, [sp, #28]
801429c: a818 add r0, sp, #96 ; 0x60
801429e: 2100 movs r1, #0
80142a0: e9cd 3200 strd r3, r2, [sp]
80142a4: 9108 str r1, [sp, #32]
80142a6: f7fe fc7d bl 8012ba4 <__retarget_lock_init_recursive>
80142aa: e9dd 3200 ldrd r3, r2, [sp]
80142ae: a902 add r1, sp, #8
80142b0: 4630 mov r0, r6
80142b2: f7ff fb43 bl 801393c <_vfiprintf_r>
80142b6: 1e05 subs r5, r0, #0
80142b8: db07 blt.n 80142ca <__sbprintf+0x62>
80142ba: a902 add r1, sp, #8
80142bc: 4630 mov r0, r6
80142be: f7fe fa91 bl 80127e4 <_fflush_r>
80142c2: 2800 cmp r0, #0
80142c4: bf18 it ne
80142c6: f04f 35ff movne.w r5, #4294967295
80142ca: f8bd 3014 ldrh.w r3, [sp, #20]
80142ce: 9818 ldr r0, [sp, #96] ; 0x60
80142d0: 065b lsls r3, r3, #25
80142d2: bf42 ittt mi
80142d4: 89a3 ldrhmi r3, [r4, #12]
80142d6: f043 0340 orrmi.w r3, r3, #64 ; 0x40
80142da: 81a3 strhmi r3, [r4, #12]
80142dc: f7fe fc63 bl 8012ba6 <__retarget_lock_close_recursive>
80142e0: 4628 mov r0, r5
80142e2: f50d 6d8e add.w sp, sp, #1136 ; 0x470
80142e6: bd70 pop {r4, r5, r6, pc}
080142e8 <_write_r>:
80142e8: b538 push {r3, r4, r5, lr}
80142ea: 4d07 ldr r5, [pc, #28] ; (8014308 <_write_r+0x20>)
80142ec: 4604 mov r4, r0
80142ee: 4608 mov r0, r1
80142f0: 4611 mov r1, r2
80142f2: 2200 movs r2, #0
80142f4: 602a str r2, [r5, #0]
80142f6: 461a mov r2, r3
80142f8: f000 fdd0 bl 8014e9c <_write>
80142fc: 1c43 adds r3, r0, #1
80142fe: d102 bne.n 8014306 <_write_r+0x1e>
8014300: 682b ldr r3, [r5, #0]
8014302: b103 cbz r3, 8014306 <_write_r+0x1e>
8014304: 6023 str r3, [r4, #0]
8014306: bd38 pop {r3, r4, r5, pc}
8014308: 20008dc8 .word 0x20008dc8
0801430c <__register_exitproc>:
801430c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
8014310: f8df a078 ldr.w sl, [pc, #120] ; 801438c <__register_exitproc+0x80>
8014314: 4606 mov r6, r0
8014316: f8da 0000 ldr.w r0, [sl]
801431a: 4698 mov r8, r3
801431c: 460f mov r7, r1
801431e: 4691 mov r9, r2
8014320: f7fe fc42 bl 8012ba8 <__retarget_lock_acquire_recursive>
8014324: 4b18 ldr r3, [pc, #96] ; (8014388 <__register_exitproc+0x7c>)
8014326: 681b ldr r3, [r3, #0]
8014328: f8d3 4148 ldr.w r4, [r3, #328] ; 0x148
801432c: b91c cbnz r4, 8014336 <__register_exitproc+0x2a>
801432e: f503 74a6 add.w r4, r3, #332 ; 0x14c
8014332: f8c3 4148 str.w r4, [r3, #328] ; 0x148
8014336: 6865 ldr r5, [r4, #4]
8014338: f8da 0000 ldr.w r0, [sl]
801433c: 2d1f cmp r5, #31
801433e: dd05 ble.n 801434c <__register_exitproc+0x40>
8014340: f7fe fc33 bl 8012baa <__retarget_lock_release_recursive>
8014344: f04f 30ff mov.w r0, #4294967295
8014348: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
801434c: b19e cbz r6, 8014376 <__register_exitproc+0x6a>
801434e: eb04 0185 add.w r1, r4, r5, lsl #2
8014352: 2201 movs r2, #1
8014354: f8c1 9088 str.w r9, [r1, #136] ; 0x88
8014358: f8d4 3188 ldr.w r3, [r4, #392] ; 0x188
801435c: 40aa lsls r2, r5
801435e: 4313 orrs r3, r2
8014360: f8c4 3188 str.w r3, [r4, #392] ; 0x188
8014364: 2e02 cmp r6, #2
8014366: f8c1 8108 str.w r8, [r1, #264] ; 0x108
801436a: bf02 ittt eq
801436c: f8d4 318c ldreq.w r3, [r4, #396] ; 0x18c
8014370: 4313 orreq r3, r2
8014372: f8c4 318c streq.w r3, [r4, #396] ; 0x18c
8014376: 1c6b adds r3, r5, #1
8014378: 3502 adds r5, #2
801437a: 6063 str r3, [r4, #4]
801437c: f844 7025 str.w r7, [r4, r5, lsl #2]
8014380: f7fe fc13 bl 8012baa <__retarget_lock_release_recursive>
8014384: 2000 movs r0, #0
8014386: e7df b.n 8014348 <__register_exitproc+0x3c>
8014388: 08017ef4 .word 0x08017ef4
801438c: 20000460 .word 0x20000460
08014390 <__assert_func>:
8014390: b51f push {r0, r1, r2, r3, r4, lr}
8014392: 4614 mov r4, r2
8014394: 461a mov r2, r3
8014396: 4b09 ldr r3, [pc, #36] ; (80143bc <__assert_func+0x2c>)
8014398: 681b ldr r3, [r3, #0]
801439a: 4605 mov r5, r0
801439c: 68d8 ldr r0, [r3, #12]
801439e: b14c cbz r4, 80143b4 <__assert_func+0x24>
80143a0: 4b07 ldr r3, [pc, #28] ; (80143c0 <__assert_func+0x30>)
80143a2: 9100 str r1, [sp, #0]
80143a4: e9cd 3401 strd r3, r4, [sp, #4]
80143a8: 4906 ldr r1, [pc, #24] ; (80143c4 <__assert_func+0x34>)
80143aa: 462b mov r3, r5
80143ac: f000 f8ac bl 8014508 <fiprintf>
80143b0: f000 fce1 bl 8014d76 <abort>
80143b4: 4b04 ldr r3, [pc, #16] ; (80143c8 <__assert_func+0x38>)
80143b6: 461c mov r4, r3
80143b8: e7f3 b.n 80143a2 <__assert_func+0x12>
80143ba: bf00 nop
80143bc: 20000030 .word 0x20000030
80143c0: 08018144 .word 0x08018144
80143c4: 08018151 .word 0x08018151
80143c8: 0801817f .word 0x0801817f
080143cc <_calloc_r>:
80143cc: b538 push {r3, r4, r5, lr}
80143ce: fba1 1502 umull r1, r5, r1, r2
80143d2: b92d cbnz r5, 80143e0 <_calloc_r+0x14>
80143d4: f7fe fc56 bl 8012c84 <_malloc_r>
80143d8: 4604 mov r4, r0
80143da: b938 cbnz r0, 80143ec <_calloc_r+0x20>
80143dc: 4620 mov r0, r4
80143de: bd38 pop {r3, r4, r5, pc}
80143e0: f7fe f96c bl 80126bc <__errno>
80143e4: 230c movs r3, #12
80143e6: 6003 str r3, [r0, #0]
80143e8: 2400 movs r4, #0
80143ea: e7f7 b.n 80143dc <_calloc_r+0x10>
80143ec: f850 2c04 ldr.w r2, [r0, #-4]
80143f0: f022 0203 bic.w r2, r2, #3
80143f4: 3a04 subs r2, #4
80143f6: 2a24 cmp r2, #36 ; 0x24
80143f8: d819 bhi.n 801442e <_calloc_r+0x62>
80143fa: 2a13 cmp r2, #19
80143fc: d915 bls.n 801442a <_calloc_r+0x5e>
80143fe: 2a1b cmp r2, #27
8014400: e9c0 5500 strd r5, r5, [r0]
8014404: d806 bhi.n 8014414 <_calloc_r+0x48>
8014406: f100 0308 add.w r3, r0, #8
801440a: 2200 movs r2, #0
801440c: e9c3 2200 strd r2, r2, [r3]
8014410: 609a str r2, [r3, #8]
8014412: e7e3 b.n 80143dc <_calloc_r+0x10>
8014414: 2a24 cmp r2, #36 ; 0x24
8014416: e9c0 5502 strd r5, r5, [r0, #8]
801441a: bf11 iteee ne
801441c: f100 0310 addne.w r3, r0, #16
8014420: 6105 streq r5, [r0, #16]
8014422: f100 0318 addeq.w r3, r0, #24
8014426: 6145 streq r5, [r0, #20]
8014428: e7ef b.n 801440a <_calloc_r+0x3e>
801442a: 4603 mov r3, r0
801442c: e7ed b.n 801440a <_calloc_r+0x3e>
801442e: 4629 mov r1, r5
8014430: f7fb ffc6 bl 80103c0 <memset>
8014434: e7d2 b.n 80143dc <_calloc_r+0x10>
...
08014438 <_close_r>:
8014438: b538 push {r3, r4, r5, lr}
801443a: 4d06 ldr r5, [pc, #24] ; (8014454 <_close_r+0x1c>)
801443c: 2300 movs r3, #0
801443e: 4604 mov r4, r0
8014440: 4608 mov r0, r1
8014442: 602b str r3, [r5, #0]
8014444: f000 fce4 bl 8014e10 <_close>
8014448: 1c43 adds r3, r0, #1
801444a: d102 bne.n 8014452 <_close_r+0x1a>
801444c: 682b ldr r3, [r5, #0]
801444e: b103 cbz r3, 8014452 <_close_r+0x1a>
8014450: 6023 str r3, [r4, #0]
8014452: bd38 pop {r3, r4, r5, pc}
8014454: 20008dc8 .word 0x20008dc8
08014458 <_fclose_r>:
8014458: b570 push {r4, r5, r6, lr}
801445a: 4606 mov r6, r0
801445c: 460c mov r4, r1
801445e: b911 cbnz r1, 8014466 <_fclose_r+0xe>
8014460: 2500 movs r5, #0
8014462: 4628 mov r0, r5
8014464: bd70 pop {r4, r5, r6, pc}
8014466: b118 cbz r0, 8014470 <_fclose_r+0x18>
8014468: 6b83 ldr r3, [r0, #56] ; 0x38
801446a: b90b cbnz r3, 8014470 <_fclose_r+0x18>
801446c: f7fe fa26 bl 80128bc <__sinit>
8014470: 6e63 ldr r3, [r4, #100] ; 0x64
8014472: 07d8 lsls r0, r3, #31
8014474: d405 bmi.n 8014482 <_fclose_r+0x2a>
8014476: 89a3 ldrh r3, [r4, #12]
8014478: 0599 lsls r1, r3, #22
801447a: d402 bmi.n 8014482 <_fclose_r+0x2a>
801447c: 6da0 ldr r0, [r4, #88] ; 0x58
801447e: f7fe fb93 bl 8012ba8 <__retarget_lock_acquire_recursive>
8014482: f9b4 300c ldrsh.w r3, [r4, #12]
8014486: b93b cbnz r3, 8014498 <_fclose_r+0x40>
8014488: 6e65 ldr r5, [r4, #100] ; 0x64
801448a: f015 0501 ands.w r5, r5, #1
801448e: d1e7 bne.n 8014460 <_fclose_r+0x8>
8014490: 6da0 ldr r0, [r4, #88] ; 0x58
8014492: f7fe fb8a bl 8012baa <__retarget_lock_release_recursive>
8014496: e7e4 b.n 8014462 <_fclose_r+0xa>
8014498: 4621 mov r1, r4
801449a: 4630 mov r0, r6
801449c: f7fe f914 bl 80126c8 <__sflush_r>
80144a0: 6ae3 ldr r3, [r4, #44] ; 0x2c
80144a2: 4605 mov r5, r0
80144a4: b133 cbz r3, 80144b4 <_fclose_r+0x5c>
80144a6: 69e1 ldr r1, [r4, #28]
80144a8: 4630 mov r0, r6
80144aa: 4798 blx r3
80144ac: 2800 cmp r0, #0
80144ae: bfb8 it lt
80144b0: f04f 35ff movlt.w r5, #4294967295
80144b4: 89a3 ldrh r3, [r4, #12]
80144b6: 061a lsls r2, r3, #24
80144b8: d503 bpl.n 80144c2 <_fclose_r+0x6a>
80144ba: 6921 ldr r1, [r4, #16]
80144bc: 4630 mov r0, r6
80144be: f7fe fa8d bl 80129dc <_free_r>
80144c2: 6b21 ldr r1, [r4, #48] ; 0x30
80144c4: b141 cbz r1, 80144d8 <_fclose_r+0x80>
80144c6: f104 0340 add.w r3, r4, #64 ; 0x40
80144ca: 4299 cmp r1, r3
80144cc: d002 beq.n 80144d4 <_fclose_r+0x7c>
80144ce: 4630 mov r0, r6
80144d0: f7fe fa84 bl 80129dc <_free_r>
80144d4: 2300 movs r3, #0
80144d6: 6323 str r3, [r4, #48] ; 0x30
80144d8: 6c61 ldr r1, [r4, #68] ; 0x44
80144da: b121 cbz r1, 80144e6 <_fclose_r+0x8e>
80144dc: 4630 mov r0, r6
80144de: f7fe fa7d bl 80129dc <_free_r>
80144e2: 2300 movs r3, #0
80144e4: 6463 str r3, [r4, #68] ; 0x44
80144e6: f7fe f9d1 bl 801288c <__sfp_lock_acquire>
80144ea: 2300 movs r3, #0
80144ec: 81a3 strh r3, [r4, #12]
80144ee: 6e63 ldr r3, [r4, #100] ; 0x64
80144f0: 07db lsls r3, r3, #31
80144f2: d402 bmi.n 80144fa <_fclose_r+0xa2>
80144f4: 6da0 ldr r0, [r4, #88] ; 0x58
80144f6: f7fe fb58 bl 8012baa <__retarget_lock_release_recursive>
80144fa: 6da0 ldr r0, [r4, #88] ; 0x58
80144fc: f7fe fb53 bl 8012ba6 <__retarget_lock_close_recursive>
8014500: f7fe f9ca bl 8012898 <__sfp_lock_release>
8014504: e7ad b.n 8014462 <_fclose_r+0xa>
...
08014508 <fiprintf>:
8014508: b40e push {r1, r2, r3}
801450a: b503 push {r0, r1, lr}
801450c: 4601 mov r1, r0
801450e: ab03 add r3, sp, #12
8014510: 4805 ldr r0, [pc, #20] ; (8014528 <fiprintf+0x20>)
8014512: f853 2b04 ldr.w r2, [r3], #4
8014516: 6800 ldr r0, [r0, #0]
8014518: 9301 str r3, [sp, #4]
801451a: f7ff fa0f bl 801393c <_vfiprintf_r>
801451e: b002 add sp, #8
8014520: f85d eb04 ldr.w lr, [sp], #4
8014524: b003 add sp, #12
8014526: 4770 bx lr
8014528: 20000030 .word 0x20000030
0801452c <__fputwc>:
801452c: e92d 43f7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, lr}
8014530: 4680 mov r8, r0
8014532: 460e mov r6, r1
8014534: 4615 mov r5, r2
8014536: f000 f9d1 bl 80148dc <__locale_mb_cur_max>
801453a: 2801 cmp r0, #1
801453c: d11c bne.n 8014578 <__fputwc+0x4c>
801453e: 1e73 subs r3, r6, #1
8014540: 2bfe cmp r3, #254 ; 0xfe
8014542: d819 bhi.n 8014578 <__fputwc+0x4c>
8014544: f88d 6004 strb.w r6, [sp, #4]
8014548: 4604 mov r4, r0
801454a: 2700 movs r7, #0
801454c: f10d 0904 add.w r9, sp, #4
8014550: 42a7 cmp r7, r4
8014552: d020 beq.n 8014596 <__fputwc+0x6a>
8014554: 68ab ldr r3, [r5, #8]
8014556: f817 1009 ldrb.w r1, [r7, r9]
801455a: 3b01 subs r3, #1
801455c: 2b00 cmp r3, #0
801455e: 60ab str r3, [r5, #8]
8014560: da04 bge.n 801456c <__fputwc+0x40>
8014562: 69aa ldr r2, [r5, #24]
8014564: 4293 cmp r3, r2
8014566: db1a blt.n 801459e <__fputwc+0x72>
8014568: 290a cmp r1, #10
801456a: d018 beq.n 801459e <__fputwc+0x72>
801456c: 682b ldr r3, [r5, #0]
801456e: 1c5a adds r2, r3, #1
8014570: 602a str r2, [r5, #0]
8014572: 7019 strb r1, [r3, #0]
8014574: 3701 adds r7, #1
8014576: e7eb b.n 8014550 <__fputwc+0x24>
8014578: a901 add r1, sp, #4
801457a: f105 035c add.w r3, r5, #92 ; 0x5c
801457e: 4632 mov r2, r6
8014580: 4640 mov r0, r8
8014582: f000 fbd5 bl 8014d30 <_wcrtomb_r>
8014586: 1c41 adds r1, r0, #1
8014588: 4604 mov r4, r0
801458a: d1de bne.n 801454a <__fputwc+0x1e>
801458c: 89ab ldrh r3, [r5, #12]
801458e: f043 0340 orr.w r3, r3, #64 ; 0x40
8014592: 81ab strh r3, [r5, #12]
8014594: 4606 mov r6, r0
8014596: 4630 mov r0, r6
8014598: b003 add sp, #12
801459a: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
801459e: 462a mov r2, r5
80145a0: 4640 mov r0, r8
80145a2: f000 fb7b bl 8014c9c <__swbuf_r>
80145a6: 1c42 adds r2, r0, #1
80145a8: d1e4 bne.n 8014574 <__fputwc+0x48>
80145aa: 4606 mov r6, r0
80145ac: e7f3 b.n 8014596 <__fputwc+0x6a>
080145ae <_fputwc_r>:
80145ae: 6e53 ldr r3, [r2, #100] ; 0x64
80145b0: b537 push {r0, r1, r2, r4, r5, lr}
80145b2: 4614 mov r4, r2
80145b4: 07da lsls r2, r3, #31
80145b6: 4605 mov r5, r0
80145b8: d407 bmi.n 80145ca <_fputwc_r+0x1c>
80145ba: 89a3 ldrh r3, [r4, #12]
80145bc: 059b lsls r3, r3, #22
80145be: d404 bmi.n 80145ca <_fputwc_r+0x1c>
80145c0: 6da0 ldr r0, [r4, #88] ; 0x58
80145c2: 9101 str r1, [sp, #4]
80145c4: f7fe faf0 bl 8012ba8 <__retarget_lock_acquire_recursive>
80145c8: 9901 ldr r1, [sp, #4]
80145ca: f9b4 300c ldrsh.w r3, [r4, #12]
80145ce: 0498 lsls r0, r3, #18
80145d0: d406 bmi.n 80145e0 <_fputwc_r+0x32>
80145d2: f443 5300 orr.w r3, r3, #8192 ; 0x2000
80145d6: 81a3 strh r3, [r4, #12]
80145d8: 6e63 ldr r3, [r4, #100] ; 0x64
80145da: f443 5300 orr.w r3, r3, #8192 ; 0x2000
80145de: 6663 str r3, [r4, #100] ; 0x64
80145e0: 4622 mov r2, r4
80145e2: 4628 mov r0, r5
80145e4: f7ff ffa2 bl 801452c <__fputwc>
80145e8: 6e63 ldr r3, [r4, #100] ; 0x64
80145ea: 07da lsls r2, r3, #31
80145ec: 4605 mov r5, r0
80145ee: d405 bmi.n 80145fc <_fputwc_r+0x4e>
80145f0: 89a3 ldrh r3, [r4, #12]
80145f2: 059b lsls r3, r3, #22
80145f4: d402 bmi.n 80145fc <_fputwc_r+0x4e>
80145f6: 6da0 ldr r0, [r4, #88] ; 0x58
80145f8: f7fe fad7 bl 8012baa <__retarget_lock_release_recursive>
80145fc: 4628 mov r0, r5
80145fe: b003 add sp, #12
8014600: bd30 pop {r4, r5, pc}
...
08014604 <_fstat_r>:
8014604: b538 push {r3, r4, r5, lr}
8014606: 4d07 ldr r5, [pc, #28] ; (8014624 <_fstat_r+0x20>)
8014608: 2300 movs r3, #0
801460a: 4604 mov r4, r0
801460c: 4608 mov r0, r1
801460e: 4611 mov r1, r2
8014610: 602b str r3, [r5, #0]
8014612: f000 fc05 bl 8014e20 <_fstat>
8014616: 1c43 adds r3, r0, #1
8014618: d102 bne.n 8014620 <_fstat_r+0x1c>
801461a: 682b ldr r3, [r5, #0]
801461c: b103 cbz r3, 8014620 <_fstat_r+0x1c>
801461e: 6023 str r3, [r4, #0]
8014620: bd38 pop {r3, r4, r5, pc}
8014622: bf00 nop
8014624: 20008dc8 .word 0x20008dc8
08014628 <__sfvwrite_r>:
8014628: 6893 ldr r3, [r2, #8]
801462a: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
801462e: 4606 mov r6, r0
8014630: 460c mov r4, r1
8014632: 4690 mov r8, r2
8014634: b91b cbnz r3, 801463e <__sfvwrite_r+0x16>
8014636: 2000 movs r0, #0
8014638: b003 add sp, #12
801463a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
801463e: 898b ldrh r3, [r1, #12]
8014640: 0718 lsls r0, r3, #28
8014642: d550 bpl.n 80146e6 <__sfvwrite_r+0xbe>
8014644: 690b ldr r3, [r1, #16]
8014646: 2b00 cmp r3, #0
8014648: d04d beq.n 80146e6 <__sfvwrite_r+0xbe>
801464a: 89a3 ldrh r3, [r4, #12]
801464c: f8d8 7000 ldr.w r7, [r8]
8014650: f013 0902 ands.w r9, r3, #2
8014654: d16c bne.n 8014730 <__sfvwrite_r+0x108>
8014656: f013 0301 ands.w r3, r3, #1
801465a: f000 809c beq.w 8014796 <__sfvwrite_r+0x16e>
801465e: 4648 mov r0, r9
8014660: 46ca mov sl, r9
8014662: 46cb mov fp, r9
8014664: f1bb 0f00 cmp.w fp, #0
8014668: f000 8103 beq.w 8014872 <__sfvwrite_r+0x24a>
801466c: b950 cbnz r0, 8014684 <__sfvwrite_r+0x5c>
801466e: 465a mov r2, fp
8014670: 210a movs r1, #10
8014672: 4650 mov r0, sl
8014674: f7eb fdc4 bl 8000200 <memchr>
8014678: 2800 cmp r0, #0
801467a: f000 80ff beq.w 801487c <__sfvwrite_r+0x254>
801467e: 3001 adds r0, #1
8014680: eba0 090a sub.w r9, r0, sl
8014684: 6820 ldr r0, [r4, #0]
8014686: 6921 ldr r1, [r4, #16]
8014688: 6963 ldr r3, [r4, #20]
801468a: 45d9 cmp r9, fp
801468c: 464a mov r2, r9
801468e: bf28 it cs
8014690: 465a movcs r2, fp
8014692: 4288 cmp r0, r1
8014694: f240 80f5 bls.w 8014882 <__sfvwrite_r+0x25a>
8014698: 68a5 ldr r5, [r4, #8]
801469a: 441d add r5, r3
801469c: 42aa cmp r2, r5
801469e: f340 80f0 ble.w 8014882 <__sfvwrite_r+0x25a>
80146a2: 4651 mov r1, sl
80146a4: 462a mov r2, r5
80146a6: f7fb fe71 bl 801038c <memmove>
80146aa: 6823 ldr r3, [r4, #0]
80146ac: 442b add r3, r5
80146ae: 6023 str r3, [r4, #0]
80146b0: 4621 mov r1, r4
80146b2: 4630 mov r0, r6
80146b4: f7fe f896 bl 80127e4 <_fflush_r>
80146b8: 2800 cmp r0, #0
80146ba: d167 bne.n 801478c <__sfvwrite_r+0x164>
80146bc: ebb9 0905 subs.w r9, r9, r5
80146c0: f040 80f7 bne.w 80148b2 <__sfvwrite_r+0x28a>
80146c4: 4621 mov r1, r4
80146c6: 4630 mov r0, r6
80146c8: f7fe f88c bl 80127e4 <_fflush_r>
80146cc: 2800 cmp r0, #0
80146ce: d15d bne.n 801478c <__sfvwrite_r+0x164>
80146d0: f8d8 2008 ldr.w r2, [r8, #8]
80146d4: 44aa add sl, r5
80146d6: ebab 0b05 sub.w fp, fp, r5
80146da: 1b55 subs r5, r2, r5
80146dc: f8c8 5008 str.w r5, [r8, #8]
80146e0: 2d00 cmp r5, #0
80146e2: d1bf bne.n 8014664 <__sfvwrite_r+0x3c>
80146e4: e7a7 b.n 8014636 <__sfvwrite_r+0xe>
80146e6: 4621 mov r1, r4
80146e8: 4630 mov r0, r6
80146ea: f7fd f91b bl 8011924 <__swsetup_r>
80146ee: 2800 cmp r0, #0
80146f0: d0ab beq.n 801464a <__sfvwrite_r+0x22>
80146f2: f04f 30ff mov.w r0, #4294967295
80146f6: e79f b.n 8014638 <__sfvwrite_r+0x10>
80146f8: e9d7 b900 ldrd fp, r9, [r7]
80146fc: 3708 adds r7, #8
80146fe: f1b9 0f00 cmp.w r9, #0
8014702: d0f9 beq.n 80146f8 <__sfvwrite_r+0xd0>
8014704: 45d1 cmp r9, sl
8014706: 464b mov r3, r9
8014708: 69e1 ldr r1, [r4, #28]
801470a: 6a65 ldr r5, [r4, #36] ; 0x24
801470c: bf28 it cs
801470e: 4653 movcs r3, sl
8014710: 465a mov r2, fp
8014712: 4630 mov r0, r6
8014714: 47a8 blx r5
8014716: 2800 cmp r0, #0
8014718: dd38 ble.n 801478c <__sfvwrite_r+0x164>
801471a: f8d8 3008 ldr.w r3, [r8, #8]
801471e: 4483 add fp, r0
8014720: eba9 0900 sub.w r9, r9, r0
8014724: 1a18 subs r0, r3, r0
8014726: f8c8 0008 str.w r0, [r8, #8]
801472a: 2800 cmp r0, #0
801472c: d1e7 bne.n 80146fe <__sfvwrite_r+0xd6>
801472e: e782 b.n 8014636 <__sfvwrite_r+0xe>
8014730: f04f 0b00 mov.w fp, #0
8014734: f8df a180 ldr.w sl, [pc, #384] ; 80148b8 <__sfvwrite_r+0x290>
8014738: 46d9 mov r9, fp
801473a: e7e0 b.n 80146fe <__sfvwrite_r+0xd6>
801473c: e9d7 9a00 ldrd r9, sl, [r7]
8014740: 3708 adds r7, #8
8014742: f1ba 0f00 cmp.w sl, #0
8014746: d0f9 beq.n 801473c <__sfvwrite_r+0x114>
8014748: 89a3 ldrh r3, [r4, #12]
801474a: 6820 ldr r0, [r4, #0]
801474c: 68a2 ldr r2, [r4, #8]
801474e: 0599 lsls r1, r3, #22
8014750: d563 bpl.n 801481a <__sfvwrite_r+0x1f2>
8014752: 4552 cmp r2, sl
8014754: d836 bhi.n 80147c4 <__sfvwrite_r+0x19c>
8014756: f413 6f90 tst.w r3, #1152 ; 0x480
801475a: d033 beq.n 80147c4 <__sfvwrite_r+0x19c>
801475c: 6921 ldr r1, [r4, #16]
801475e: 6965 ldr r5, [r4, #20]
8014760: eba0 0b01 sub.w fp, r0, r1
8014764: eb05 0545 add.w r5, r5, r5, lsl #1
8014768: eb05 75d5 add.w r5, r5, r5, lsr #31
801476c: f10b 0201 add.w r2, fp, #1
8014770: 106d asrs r5, r5, #1
8014772: 4452 add r2, sl
8014774: 4295 cmp r5, r2
8014776: bf38 it cc
8014778: 4615 movcc r5, r2
801477a: 055b lsls r3, r3, #21
801477c: d53d bpl.n 80147fa <__sfvwrite_r+0x1d2>
801477e: 4629 mov r1, r5
8014780: 4630 mov r0, r6
8014782: f7fe fa7f bl 8012c84 <_malloc_r>
8014786: b948 cbnz r0, 801479c <__sfvwrite_r+0x174>
8014788: 230c movs r3, #12
801478a: 6033 str r3, [r6, #0]
801478c: 89a3 ldrh r3, [r4, #12]
801478e: f043 0340 orr.w r3, r3, #64 ; 0x40
8014792: 81a3 strh r3, [r4, #12]
8014794: e7ad b.n 80146f2 <__sfvwrite_r+0xca>
8014796: 4699 mov r9, r3
8014798: 469a mov sl, r3
801479a: e7d2 b.n 8014742 <__sfvwrite_r+0x11a>
801479c: 465a mov r2, fp
801479e: 6921 ldr r1, [r4, #16]
80147a0: 9001 str r0, [sp, #4]
80147a2: f7fb fde5 bl 8010370 <memcpy>
80147a6: 89a2 ldrh r2, [r4, #12]
80147a8: 9b01 ldr r3, [sp, #4]
80147aa: f422 6290 bic.w r2, r2, #1152 ; 0x480
80147ae: f042 0280 orr.w r2, r2, #128 ; 0x80
80147b2: 81a2 strh r2, [r4, #12]
80147b4: 6123 str r3, [r4, #16]
80147b6: 6165 str r5, [r4, #20]
80147b8: 445b add r3, fp
80147ba: eba5 050b sub.w r5, r5, fp
80147be: 6023 str r3, [r4, #0]
80147c0: 4652 mov r2, sl
80147c2: 60a5 str r5, [r4, #8]
80147c4: 4552 cmp r2, sl
80147c6: bf28 it cs
80147c8: 4652 movcs r2, sl
80147ca: 6820 ldr r0, [r4, #0]
80147cc: 9201 str r2, [sp, #4]
80147ce: 4649 mov r1, r9
80147d0: f7fb fddc bl 801038c <memmove>
80147d4: 68a3 ldr r3, [r4, #8]
80147d6: 9a01 ldr r2, [sp, #4]
80147d8: 1a9b subs r3, r3, r2
80147da: 60a3 str r3, [r4, #8]
80147dc: 6823 ldr r3, [r4, #0]
80147de: 441a add r2, r3
80147e0: 4655 mov r5, sl
80147e2: 6022 str r2, [r4, #0]
80147e4: f8d8 0008 ldr.w r0, [r8, #8]
80147e8: 44a9 add r9, r5
80147ea: ebaa 0a05 sub.w sl, sl, r5
80147ee: 1b45 subs r5, r0, r5
80147f0: f8c8 5008 str.w r5, [r8, #8]
80147f4: 2d00 cmp r5, #0
80147f6: d1a4 bne.n 8014742 <__sfvwrite_r+0x11a>
80147f8: e71d b.n 8014636 <__sfvwrite_r+0xe>
80147fa: 462a mov r2, r5
80147fc: 4630 mov r0, r6
80147fe: f000 f8a9 bl 8014954 <_realloc_r>
8014802: 4603 mov r3, r0
8014804: 2800 cmp r0, #0
8014806: d1d5 bne.n 80147b4 <__sfvwrite_r+0x18c>
8014808: 6921 ldr r1, [r4, #16]
801480a: 4630 mov r0, r6
801480c: f7fe f8e6 bl 80129dc <_free_r>
8014810: 89a3 ldrh r3, [r4, #12]
8014812: f023 0380 bic.w r3, r3, #128 ; 0x80
8014816: 81a3 strh r3, [r4, #12]
8014818: e7b6 b.n 8014788 <__sfvwrite_r+0x160>
801481a: 6923 ldr r3, [r4, #16]
801481c: 4283 cmp r3, r0
801481e: d302 bcc.n 8014826 <__sfvwrite_r+0x1fe>
8014820: 6961 ldr r1, [r4, #20]
8014822: 4551 cmp r1, sl
8014824: d915 bls.n 8014852 <__sfvwrite_r+0x22a>
8014826: 4552 cmp r2, sl
8014828: bf28 it cs
801482a: 4652 movcs r2, sl
801482c: 4649 mov r1, r9
801482e: 4615 mov r5, r2
8014830: f7fb fdac bl 801038c <memmove>
8014834: 68a3 ldr r3, [r4, #8]
8014836: 6822 ldr r2, [r4, #0]
8014838: 1b5b subs r3, r3, r5
801483a: 442a add r2, r5
801483c: 60a3 str r3, [r4, #8]
801483e: 6022 str r2, [r4, #0]
8014840: 2b00 cmp r3, #0
8014842: d1cf bne.n 80147e4 <__sfvwrite_r+0x1bc>
8014844: 4621 mov r1, r4
8014846: 4630 mov r0, r6
8014848: f7fd ffcc bl 80127e4 <_fflush_r>
801484c: 2800 cmp r0, #0
801484e: d0c9 beq.n 80147e4 <__sfvwrite_r+0x1bc>
8014850: e79c b.n 801478c <__sfvwrite_r+0x164>
8014852: f06f 4300 mvn.w r3, #2147483648 ; 0x80000000
8014856: 459a cmp sl, r3
8014858: bf38 it cc
801485a: 4653 movcc r3, sl
801485c: 6a65 ldr r5, [r4, #36] ; 0x24
801485e: fb93 f3f1 sdiv r3, r3, r1
8014862: 464a mov r2, r9
8014864: 434b muls r3, r1
8014866: 4630 mov r0, r6
8014868: 69e1 ldr r1, [r4, #28]
801486a: 47a8 blx r5
801486c: 1e05 subs r5, r0, #0
801486e: dcb9 bgt.n 80147e4 <__sfvwrite_r+0x1bc>
8014870: e78c b.n 801478c <__sfvwrite_r+0x164>
8014872: e9d7 ab00 ldrd sl, fp, [r7]
8014876: 2000 movs r0, #0
8014878: 3708 adds r7, #8
801487a: e6f3 b.n 8014664 <__sfvwrite_r+0x3c>
801487c: f10b 0901 add.w r9, fp, #1
8014880: e700 b.n 8014684 <__sfvwrite_r+0x5c>
8014882: 4293 cmp r3, r2
8014884: dc08 bgt.n 8014898 <__sfvwrite_r+0x270>
8014886: 6a65 ldr r5, [r4, #36] ; 0x24
8014888: 69e1 ldr r1, [r4, #28]
801488a: 4652 mov r2, sl
801488c: 4630 mov r0, r6
801488e: 47a8 blx r5
8014890: 1e05 subs r5, r0, #0
8014892: f73f af13 bgt.w 80146bc <__sfvwrite_r+0x94>
8014896: e779 b.n 801478c <__sfvwrite_r+0x164>
8014898: 4651 mov r1, sl
801489a: 9201 str r2, [sp, #4]
801489c: f7fb fd76 bl 801038c <memmove>
80148a0: 9a01 ldr r2, [sp, #4]
80148a2: 68a3 ldr r3, [r4, #8]
80148a4: 1a9b subs r3, r3, r2
80148a6: 60a3 str r3, [r4, #8]
80148a8: 6823 ldr r3, [r4, #0]
80148aa: 4413 add r3, r2
80148ac: 6023 str r3, [r4, #0]
80148ae: 4615 mov r5, r2
80148b0: e704 b.n 80146bc <__sfvwrite_r+0x94>
80148b2: 2001 movs r0, #1
80148b4: e70c b.n 80146d0 <__sfvwrite_r+0xa8>
80148b6: bf00 nop
80148b8: 7ffffc00 .word 0x7ffffc00
080148bc <_isatty_r>:
80148bc: b538 push {r3, r4, r5, lr}
80148be: 4d06 ldr r5, [pc, #24] ; (80148d8 <_isatty_r+0x1c>)
80148c0: 2300 movs r3, #0
80148c2: 4604 mov r4, r0
80148c4: 4608 mov r0, r1
80148c6: 602b str r3, [r5, #0]
80148c8: f000 faba bl 8014e40 <_isatty>
80148cc: 1c43 adds r3, r0, #1
80148ce: d102 bne.n 80148d6 <_isatty_r+0x1a>
80148d0: 682b ldr r3, [r5, #0]
80148d2: b103 cbz r3, 80148d6 <_isatty_r+0x1a>
80148d4: 6023 str r3, [r4, #0]
80148d6: bd38 pop {r3, r4, r5, pc}
80148d8: 20008dc8 .word 0x20008dc8
080148dc <__locale_mb_cur_max>:
80148dc: 4b01 ldr r3, [pc, #4] ; (80148e4 <__locale_mb_cur_max+0x8>)
80148de: f893 0128 ldrb.w r0, [r3, #296] ; 0x128
80148e2: 4770 bx lr
80148e4: 20000874 .word 0x20000874
080148e8 <_lseek_r>:
80148e8: b538 push {r3, r4, r5, lr}
80148ea: 4d07 ldr r5, [pc, #28] ; (8014908 <_lseek_r+0x20>)
80148ec: 4604 mov r4, r0
80148ee: 4608 mov r0, r1
80148f0: 4611 mov r1, r2
80148f2: 2200 movs r2, #0
80148f4: 602a str r2, [r5, #0]
80148f6: 461a mov r2, r3
80148f8: f000 fab2 bl 8014e60 <_lseek>
80148fc: 1c43 adds r3, r0, #1
80148fe: d102 bne.n 8014906 <_lseek_r+0x1e>
8014900: 682b ldr r3, [r5, #0]
8014902: b103 cbz r3, 8014906 <_lseek_r+0x1e>
8014904: 6023 str r3, [r4, #0]
8014906: bd38 pop {r3, r4, r5, pc}
8014908: 20008dc8 .word 0x20008dc8
0801490c <__ascii_mbtowc>:
801490c: b082 sub sp, #8
801490e: b901 cbnz r1, 8014912 <__ascii_mbtowc+0x6>
8014910: a901 add r1, sp, #4
8014912: b142 cbz r2, 8014926 <__ascii_mbtowc+0x1a>
8014914: b14b cbz r3, 801492a <__ascii_mbtowc+0x1e>
8014916: 7813 ldrb r3, [r2, #0]
8014918: 600b str r3, [r1, #0]
801491a: 7812 ldrb r2, [r2, #0]
801491c: 1e10 subs r0, r2, #0
801491e: bf18 it ne
8014920: 2001 movne r0, #1
8014922: b002 add sp, #8
8014924: 4770 bx lr
8014926: 4610 mov r0, r2
8014928: e7fb b.n 8014922 <__ascii_mbtowc+0x16>
801492a: f06f 0001 mvn.w r0, #1
801492e: e7f8 b.n 8014922 <__ascii_mbtowc+0x16>
08014930 <_read_r>:
8014930: b538 push {r3, r4, r5, lr}
8014932: 4d07 ldr r5, [pc, #28] ; (8014950 <_read_r+0x20>)
8014934: 4604 mov r4, r0
8014936: 4608 mov r0, r1
8014938: 4611 mov r1, r2
801493a: 2200 movs r2, #0
801493c: 602a str r2, [r5, #0]
801493e: 461a mov r2, r3
8014940: f000 fa96 bl 8014e70 <_read>
8014944: 1c43 adds r3, r0, #1
8014946: d102 bne.n 801494e <_read_r+0x1e>
8014948: 682b ldr r3, [r5, #0]
801494a: b103 cbz r3, 801494e <_read_r+0x1e>
801494c: 6023 str r3, [r4, #0]
801494e: bd38 pop {r3, r4, r5, pc}
8014950: 20008dc8 .word 0x20008dc8
08014954 <_realloc_r>:
8014954: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
8014958: 4681 mov r9, r0
801495a: 460c mov r4, r1
801495c: b929 cbnz r1, 801496a <_realloc_r+0x16>
801495e: 4611 mov r1, r2
8014960: b003 add sp, #12
8014962: e8bd 4ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
8014966: f7fe b98d b.w 8012c84 <_malloc_r>
801496a: 9201 str r2, [sp, #4]
801496c: f7fe fbc6 bl 80130fc <__malloc_lock>
8014970: 9a01 ldr r2, [sp, #4]
8014972: f102 080b add.w r8, r2, #11
8014976: f1b8 0f16 cmp.w r8, #22
801497a: d90b bls.n 8014994 <_realloc_r+0x40>
801497c: f038 0807 bics.w r8, r8, #7
8014980: d50a bpl.n 8014998 <_realloc_r+0x44>
8014982: 230c movs r3, #12
8014984: f8c9 3000 str.w r3, [r9]
8014988: f04f 0b00 mov.w fp, #0
801498c: 4658 mov r0, fp
801498e: b003 add sp, #12
8014990: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
8014994: f04f 0810 mov.w r8, #16
8014998: 4590 cmp r8, r2
801499a: d3f2 bcc.n 8014982 <_realloc_r+0x2e>
801499c: f854 5c04 ldr.w r5, [r4, #-4]
80149a0: f025 0603 bic.w r6, r5, #3
80149a4: 45b0 cmp r8, r6
80149a6: f1a4 0a08 sub.w sl, r4, #8
80149aa: f340 816e ble.w 8014c8a <_realloc_r+0x336>
80149ae: 499b ldr r1, [pc, #620] ; (8014c1c <_realloc_r+0x2c8>)
80149b0: f8d1 c008 ldr.w ip, [r1, #8]
80149b4: eb0a 0306 add.w r3, sl, r6
80149b8: 459c cmp ip, r3
80149ba: 6859 ldr r1, [r3, #4]
80149bc: d005 beq.n 80149ca <_realloc_r+0x76>
80149be: f021 0001 bic.w r0, r1, #1
80149c2: 4418 add r0, r3
80149c4: 6840 ldr r0, [r0, #4]
80149c6: 07c7 lsls r7, r0, #31
80149c8: d427 bmi.n 8014a1a <_realloc_r+0xc6>
80149ca: f021 0103 bic.w r1, r1, #3
80149ce: 459c cmp ip, r3
80149d0: eb06 0701 add.w r7, r6, r1
80149d4: d119 bne.n 8014a0a <_realloc_r+0xb6>
80149d6: f108 0010 add.w r0, r8, #16
80149da: 42b8 cmp r0, r7
80149dc: dc1f bgt.n 8014a1e <_realloc_r+0xca>
80149de: eb0a 0308 add.w r3, sl, r8
80149e2: 4a8e ldr r2, [pc, #568] ; (8014c1c <_realloc_r+0x2c8>)
80149e4: eba7 0708 sub.w r7, r7, r8
80149e8: f047 0701 orr.w r7, r7, #1
80149ec: 6093 str r3, [r2, #8]
80149ee: 605f str r7, [r3, #4]
80149f0: f854 3c04 ldr.w r3, [r4, #-4]
80149f4: f003 0301 and.w r3, r3, #1
80149f8: ea43 0308 orr.w r3, r3, r8
80149fc: f844 3c04 str.w r3, [r4, #-4]
8014a00: 4648 mov r0, r9
8014a02: f7fe fb81 bl 8013108 <__malloc_unlock>
8014a06: 46a3 mov fp, r4
8014a08: e7c0 b.n 801498c <_realloc_r+0x38>
8014a0a: 45b8 cmp r8, r7
8014a0c: dc07 bgt.n 8014a1e <_realloc_r+0xca>
8014a0e: e9d3 3202 ldrd r3, r2, [r3, #8]
8014a12: 60da str r2, [r3, #12]
8014a14: 6093 str r3, [r2, #8]
8014a16: 4655 mov r5, sl
8014a18: e07f b.n 8014b1a <_realloc_r+0x1c6>
8014a1a: 2100 movs r1, #0
8014a1c: 460b mov r3, r1
8014a1e: 07e8 lsls r0, r5, #31
8014a20: f100 80e5 bmi.w 8014bee <_realloc_r+0x29a>
8014a24: f854 5c08 ldr.w r5, [r4, #-8]
8014a28: ebaa 0505 sub.w r5, sl, r5
8014a2c: 6868 ldr r0, [r5, #4]
8014a2e: f020 0003 bic.w r0, r0, #3
8014a32: eb00 0b06 add.w fp, r0, r6
8014a36: 2b00 cmp r3, #0
8014a38: f000 80a5 beq.w 8014b86 <_realloc_r+0x232>
8014a3c: 459c cmp ip, r3
8014a3e: eb01 070b add.w r7, r1, fp
8014a42: d14a bne.n 8014ada <_realloc_r+0x186>
8014a44: f108 0310 add.w r3, r8, #16
8014a48: 42bb cmp r3, r7
8014a4a: f300 809c bgt.w 8014b86 <_realloc_r+0x232>
8014a4e: 46ab mov fp, r5
8014a50: 68eb ldr r3, [r5, #12]
8014a52: f85b 2f08 ldr.w r2, [fp, #8]!
8014a56: 60d3 str r3, [r2, #12]
8014a58: 609a str r2, [r3, #8]
8014a5a: 1f32 subs r2, r6, #4
8014a5c: 2a24 cmp r2, #36 ; 0x24
8014a5e: d837 bhi.n 8014ad0 <_realloc_r+0x17c>
8014a60: 2a13 cmp r2, #19
8014a62: d933 bls.n 8014acc <_realloc_r+0x178>
8014a64: 6823 ldr r3, [r4, #0]
8014a66: 60ab str r3, [r5, #8]
8014a68: 6863 ldr r3, [r4, #4]
8014a6a: 60eb str r3, [r5, #12]
8014a6c: 2a1b cmp r2, #27
8014a6e: d81b bhi.n 8014aa8 <_realloc_r+0x154>
8014a70: 3408 adds r4, #8
8014a72: f105 0310 add.w r3, r5, #16
8014a76: 6822 ldr r2, [r4, #0]
8014a78: 601a str r2, [r3, #0]
8014a7a: 6862 ldr r2, [r4, #4]
8014a7c: 605a str r2, [r3, #4]
8014a7e: 68a2 ldr r2, [r4, #8]
8014a80: 609a str r2, [r3, #8]
8014a82: eb05 0308 add.w r3, r5, r8
8014a86: 4a65 ldr r2, [pc, #404] ; (8014c1c <_realloc_r+0x2c8>)
8014a88: eba7 0708 sub.w r7, r7, r8
8014a8c: f047 0701 orr.w r7, r7, #1
8014a90: 6093 str r3, [r2, #8]
8014a92: 605f str r7, [r3, #4]
8014a94: 686b ldr r3, [r5, #4]
8014a96: f003 0301 and.w r3, r3, #1
8014a9a: ea43 0308 orr.w r3, r3, r8
8014a9e: 606b str r3, [r5, #4]
8014aa0: 4648 mov r0, r9
8014aa2: f7fe fb31 bl 8013108 <__malloc_unlock>
8014aa6: e771 b.n 801498c <_realloc_r+0x38>
8014aa8: 68a3 ldr r3, [r4, #8]
8014aaa: 612b str r3, [r5, #16]
8014aac: 68e3 ldr r3, [r4, #12]
8014aae: 616b str r3, [r5, #20]
8014ab0: 2a24 cmp r2, #36 ; 0x24
8014ab2: bf01 itttt eq
8014ab4: 6923 ldreq r3, [r4, #16]
8014ab6: 61ab streq r3, [r5, #24]
8014ab8: 6962 ldreq r2, [r4, #20]
8014aba: 61ea streq r2, [r5, #28]
8014abc: bf19 ittee ne
8014abe: 3410 addne r4, #16
8014ac0: f105 0318 addne.w r3, r5, #24
8014ac4: f105 0320 addeq.w r3, r5, #32
8014ac8: 3418 addeq r4, #24
8014aca: e7d4 b.n 8014a76 <_realloc_r+0x122>
8014acc: 465b mov r3, fp
8014ace: e7d2 b.n 8014a76 <_realloc_r+0x122>
8014ad0: 4621 mov r1, r4
8014ad2: 4658 mov r0, fp
8014ad4: f7fb fc5a bl 801038c <memmove>
8014ad8: e7d3 b.n 8014a82 <_realloc_r+0x12e>
8014ada: 45b8 cmp r8, r7
8014adc: dc53 bgt.n 8014b86 <_realloc_r+0x232>
8014ade: e9d3 3202 ldrd r3, r2, [r3, #8]
8014ae2: 4628 mov r0, r5
8014ae4: 60da str r2, [r3, #12]
8014ae6: 6093 str r3, [r2, #8]
8014ae8: f850 2f08 ldr.w r2, [r0, #8]!
8014aec: 68eb ldr r3, [r5, #12]
8014aee: 60d3 str r3, [r2, #12]
8014af0: 609a str r2, [r3, #8]
8014af2: 1f32 subs r2, r6, #4
8014af4: 2a24 cmp r2, #36 ; 0x24
8014af6: d842 bhi.n 8014b7e <_realloc_r+0x22a>
8014af8: 2a13 cmp r2, #19
8014afa: d908 bls.n 8014b0e <_realloc_r+0x1ba>
8014afc: 6823 ldr r3, [r4, #0]
8014afe: 60ab str r3, [r5, #8]
8014b00: 6863 ldr r3, [r4, #4]
8014b02: 60eb str r3, [r5, #12]
8014b04: 2a1b cmp r2, #27
8014b06: d828 bhi.n 8014b5a <_realloc_r+0x206>
8014b08: 3408 adds r4, #8
8014b0a: f105 0010 add.w r0, r5, #16
8014b0e: 6823 ldr r3, [r4, #0]
8014b10: 6003 str r3, [r0, #0]
8014b12: 6863 ldr r3, [r4, #4]
8014b14: 6043 str r3, [r0, #4]
8014b16: 68a3 ldr r3, [r4, #8]
8014b18: 6083 str r3, [r0, #8]
8014b1a: 686b ldr r3, [r5, #4]
8014b1c: eba7 0008 sub.w r0, r7, r8
8014b20: 280f cmp r0, #15
8014b22: f003 0301 and.w r3, r3, #1
8014b26: eb05 0207 add.w r2, r5, r7
8014b2a: f240 80b0 bls.w 8014c8e <_realloc_r+0x33a>
8014b2e: eb05 0108 add.w r1, r5, r8
8014b32: ea48 0303 orr.w r3, r8, r3
8014b36: f040 0001 orr.w r0, r0, #1
8014b3a: 606b str r3, [r5, #4]
8014b3c: 6048 str r0, [r1, #4]
8014b3e: 6853 ldr r3, [r2, #4]
8014b40: f043 0301 orr.w r3, r3, #1
8014b44: 6053 str r3, [r2, #4]
8014b46: 3108 adds r1, #8
8014b48: 4648 mov r0, r9
8014b4a: f7fd ff47 bl 80129dc <_free_r>
8014b4e: 4648 mov r0, r9
8014b50: f7fe fada bl 8013108 <__malloc_unlock>
8014b54: f105 0b08 add.w fp, r5, #8
8014b58: e718 b.n 801498c <_realloc_r+0x38>
8014b5a: 68a3 ldr r3, [r4, #8]
8014b5c: 612b str r3, [r5, #16]
8014b5e: 68e3 ldr r3, [r4, #12]
8014b60: 616b str r3, [r5, #20]
8014b62: 2a24 cmp r2, #36 ; 0x24
8014b64: bf01 itttt eq
8014b66: 6923 ldreq r3, [r4, #16]
8014b68: 61ab streq r3, [r5, #24]
8014b6a: 6963 ldreq r3, [r4, #20]
8014b6c: 61eb streq r3, [r5, #28]
8014b6e: bf19 ittee ne
8014b70: 3410 addne r4, #16
8014b72: f105 0018 addne.w r0, r5, #24
8014b76: f105 0020 addeq.w r0, r5, #32
8014b7a: 3418 addeq r4, #24
8014b7c: e7c7 b.n 8014b0e <_realloc_r+0x1ba>
8014b7e: 4621 mov r1, r4
8014b80: f7fb fc04 bl 801038c <memmove>
8014b84: e7c9 b.n 8014b1a <_realloc_r+0x1c6>
8014b86: 45d8 cmp r8, fp
8014b88: dc31 bgt.n 8014bee <_realloc_r+0x29a>
8014b8a: 4628 mov r0, r5
8014b8c: 68eb ldr r3, [r5, #12]
8014b8e: f850 2f08 ldr.w r2, [r0, #8]!
8014b92: 60d3 str r3, [r2, #12]
8014b94: 609a str r2, [r3, #8]
8014b96: 1f32 subs r2, r6, #4
8014b98: 2a24 cmp r2, #36 ; 0x24
8014b9a: d824 bhi.n 8014be6 <_realloc_r+0x292>
8014b9c: 2a13 cmp r2, #19
8014b9e: d908 bls.n 8014bb2 <_realloc_r+0x25e>
8014ba0: 6823 ldr r3, [r4, #0]
8014ba2: 60ab str r3, [r5, #8]
8014ba4: 6863 ldr r3, [r4, #4]
8014ba6: 60eb str r3, [r5, #12]
8014ba8: 2a1b cmp r2, #27
8014baa: d80a bhi.n 8014bc2 <_realloc_r+0x26e>
8014bac: 3408 adds r4, #8
8014bae: f105 0010 add.w r0, r5, #16
8014bb2: 6823 ldr r3, [r4, #0]
8014bb4: 6003 str r3, [r0, #0]
8014bb6: 6863 ldr r3, [r4, #4]
8014bb8: 6043 str r3, [r0, #4]
8014bba: 68a3 ldr r3, [r4, #8]
8014bbc: 6083 str r3, [r0, #8]
8014bbe: 465f mov r7, fp
8014bc0: e7ab b.n 8014b1a <_realloc_r+0x1c6>
8014bc2: 68a3 ldr r3, [r4, #8]
8014bc4: 612b str r3, [r5, #16]
8014bc6: 68e3 ldr r3, [r4, #12]
8014bc8: 616b str r3, [r5, #20]
8014bca: 2a24 cmp r2, #36 ; 0x24
8014bcc: bf01 itttt eq
8014bce: 6923 ldreq r3, [r4, #16]
8014bd0: 61ab streq r3, [r5, #24]
8014bd2: 6963 ldreq r3, [r4, #20]
8014bd4: 61eb streq r3, [r5, #28]
8014bd6: bf19 ittee ne
8014bd8: 3410 addne r4, #16
8014bda: f105 0018 addne.w r0, r5, #24
8014bde: f105 0020 addeq.w r0, r5, #32
8014be2: 3418 addeq r4, #24
8014be4: e7e5 b.n 8014bb2 <_realloc_r+0x25e>
8014be6: 4621 mov r1, r4
8014be8: f7fb fbd0 bl 801038c <memmove>
8014bec: e7e7 b.n 8014bbe <_realloc_r+0x26a>
8014bee: 4611 mov r1, r2
8014bf0: 4648 mov r0, r9
8014bf2: f7fe f847 bl 8012c84 <_malloc_r>
8014bf6: 4683 mov fp, r0
8014bf8: 2800 cmp r0, #0
8014bfa: f43f af51 beq.w 8014aa0 <_realloc_r+0x14c>
8014bfe: f854 3c04 ldr.w r3, [r4, #-4]
8014c02: f023 0301 bic.w r3, r3, #1
8014c06: 4453 add r3, sl
8014c08: f1a0 0208 sub.w r2, r0, #8
8014c0c: 4293 cmp r3, r2
8014c0e: d107 bne.n 8014c20 <_realloc_r+0x2cc>
8014c10: f850 7c04 ldr.w r7, [r0, #-4]
8014c14: f027 0703 bic.w r7, r7, #3
8014c18: 4437 add r7, r6
8014c1a: e6fc b.n 8014a16 <_realloc_r+0xc2>
8014c1c: 20000464 .word 0x20000464
8014c20: 1f32 subs r2, r6, #4
8014c22: 2a24 cmp r2, #36 ; 0x24
8014c24: d82d bhi.n 8014c82 <_realloc_r+0x32e>
8014c26: 2a13 cmp r2, #19
8014c28: d928 bls.n 8014c7c <_realloc_r+0x328>
8014c2a: 6823 ldr r3, [r4, #0]
8014c2c: 6003 str r3, [r0, #0]
8014c2e: 6863 ldr r3, [r4, #4]
8014c30: 6043 str r3, [r0, #4]
8014c32: 2a1b cmp r2, #27
8014c34: d80e bhi.n 8014c54 <_realloc_r+0x300>
8014c36: f104 0208 add.w r2, r4, #8
8014c3a: f100 0308 add.w r3, r0, #8
8014c3e: 6811 ldr r1, [r2, #0]
8014c40: 6019 str r1, [r3, #0]
8014c42: 6851 ldr r1, [r2, #4]
8014c44: 6059 str r1, [r3, #4]
8014c46: 6892 ldr r2, [r2, #8]
8014c48: 609a str r2, [r3, #8]
8014c4a: 4621 mov r1, r4
8014c4c: 4648 mov r0, r9
8014c4e: f7fd fec5 bl 80129dc <_free_r>
8014c52: e725 b.n 8014aa0 <_realloc_r+0x14c>
8014c54: 68a3 ldr r3, [r4, #8]
8014c56: 6083 str r3, [r0, #8]
8014c58: 68e3 ldr r3, [r4, #12]
8014c5a: 60c3 str r3, [r0, #12]
8014c5c: 2a24 cmp r2, #36 ; 0x24
8014c5e: bf01 itttt eq
8014c60: 6923 ldreq r3, [r4, #16]
8014c62: 6103 streq r3, [r0, #16]
8014c64: 6961 ldreq r1, [r4, #20]
8014c66: 6141 streq r1, [r0, #20]
8014c68: bf19 ittee ne
8014c6a: f104 0210 addne.w r2, r4, #16
8014c6e: f100 0310 addne.w r3, r0, #16
8014c72: f104 0218 addeq.w r2, r4, #24
8014c76: f100 0318 addeq.w r3, r0, #24
8014c7a: e7e0 b.n 8014c3e <_realloc_r+0x2ea>
8014c7c: 4603 mov r3, r0
8014c7e: 4622 mov r2, r4
8014c80: e7dd b.n 8014c3e <_realloc_r+0x2ea>
8014c82: 4621 mov r1, r4
8014c84: f7fb fb82 bl 801038c <memmove>
8014c88: e7df b.n 8014c4a <_realloc_r+0x2f6>
8014c8a: 4637 mov r7, r6
8014c8c: e6c3 b.n 8014a16 <_realloc_r+0xc2>
8014c8e: 431f orrs r7, r3
8014c90: 606f str r7, [r5, #4]
8014c92: 6853 ldr r3, [r2, #4]
8014c94: f043 0301 orr.w r3, r3, #1
8014c98: 6053 str r3, [r2, #4]
8014c9a: e758 b.n 8014b4e <_realloc_r+0x1fa>
08014c9c <__swbuf_r>:
8014c9c: b5f8 push {r3, r4, r5, r6, r7, lr}
8014c9e: 460e mov r6, r1
8014ca0: 4614 mov r4, r2
8014ca2: 4605 mov r5, r0
8014ca4: b118 cbz r0, 8014cae <__swbuf_r+0x12>
8014ca6: 6b83 ldr r3, [r0, #56] ; 0x38
8014ca8: b90b cbnz r3, 8014cae <__swbuf_r+0x12>
8014caa: f7fd fe07 bl 80128bc <__sinit>
8014cae: 69a3 ldr r3, [r4, #24]
8014cb0: 60a3 str r3, [r4, #8]
8014cb2: 89a3 ldrh r3, [r4, #12]
8014cb4: 0719 lsls r1, r3, #28
8014cb6: d529 bpl.n 8014d0c <__swbuf_r+0x70>
8014cb8: 6923 ldr r3, [r4, #16]
8014cba: b33b cbz r3, 8014d0c <__swbuf_r+0x70>
8014cbc: f9b4 300c ldrsh.w r3, [r4, #12]
8014cc0: b2f6 uxtb r6, r6
8014cc2: 049a lsls r2, r3, #18
8014cc4: 4637 mov r7, r6
8014cc6: d52a bpl.n 8014d1e <__swbuf_r+0x82>
8014cc8: 6823 ldr r3, [r4, #0]
8014cca: 6920 ldr r0, [r4, #16]
8014ccc: 1a18 subs r0, r3, r0
8014cce: 6963 ldr r3, [r4, #20]
8014cd0: 4283 cmp r3, r0
8014cd2: dc04 bgt.n 8014cde <__swbuf_r+0x42>
8014cd4: 4621 mov r1, r4
8014cd6: 4628 mov r0, r5
8014cd8: f7fd fd84 bl 80127e4 <_fflush_r>
8014cdc: b9e0 cbnz r0, 8014d18 <__swbuf_r+0x7c>
8014cde: 68a3 ldr r3, [r4, #8]
8014ce0: 3b01 subs r3, #1
8014ce2: 60a3 str r3, [r4, #8]
8014ce4: 6823 ldr r3, [r4, #0]
8014ce6: 1c5a adds r2, r3, #1
8014ce8: 6022 str r2, [r4, #0]
8014cea: 701e strb r6, [r3, #0]
8014cec: 6962 ldr r2, [r4, #20]
8014cee: 1c43 adds r3, r0, #1
8014cf0: 429a cmp r2, r3
8014cf2: d004 beq.n 8014cfe <__swbuf_r+0x62>
8014cf4: 89a3 ldrh r3, [r4, #12]
8014cf6: 07db lsls r3, r3, #31
8014cf8: d506 bpl.n 8014d08 <__swbuf_r+0x6c>
8014cfa: 2e0a cmp r6, #10
8014cfc: d104 bne.n 8014d08 <__swbuf_r+0x6c>
8014cfe: 4621 mov r1, r4
8014d00: 4628 mov r0, r5
8014d02: f7fd fd6f bl 80127e4 <_fflush_r>
8014d06: b938 cbnz r0, 8014d18 <__swbuf_r+0x7c>
8014d08: 4638 mov r0, r7
8014d0a: bdf8 pop {r3, r4, r5, r6, r7, pc}
8014d0c: 4621 mov r1, r4
8014d0e: 4628 mov r0, r5
8014d10: f7fc fe08 bl 8011924 <__swsetup_r>
8014d14: 2800 cmp r0, #0
8014d16: d0d1 beq.n 8014cbc <__swbuf_r+0x20>
8014d18: f04f 37ff mov.w r7, #4294967295
8014d1c: e7f4 b.n 8014d08 <__swbuf_r+0x6c>
8014d1e: f443 5300 orr.w r3, r3, #8192 ; 0x2000
8014d22: 81a3 strh r3, [r4, #12]
8014d24: 6e63 ldr r3, [r4, #100] ; 0x64
8014d26: f423 5300 bic.w r3, r3, #8192 ; 0x2000
8014d2a: 6663 str r3, [r4, #100] ; 0x64
8014d2c: e7cc b.n 8014cc8 <__swbuf_r+0x2c>
...
08014d30 <_wcrtomb_r>:
8014d30: b5f0 push {r4, r5, r6, r7, lr}
8014d32: 4c09 ldr r4, [pc, #36] ; (8014d58 <_wcrtomb_r+0x28>)
8014d34: b085 sub sp, #20
8014d36: f8d4 70e0 ldr.w r7, [r4, #224] ; 0xe0
8014d3a: 4605 mov r5, r0
8014d3c: 461e mov r6, r3
8014d3e: b909 cbnz r1, 8014d44 <_wcrtomb_r+0x14>
8014d40: 460a mov r2, r1
8014d42: a901 add r1, sp, #4
8014d44: 47b8 blx r7
8014d46: 1c43 adds r3, r0, #1
8014d48: bf01 itttt eq
8014d4a: 2300 moveq r3, #0
8014d4c: 6033 streq r3, [r6, #0]
8014d4e: 238a moveq r3, #138 ; 0x8a
8014d50: 602b streq r3, [r5, #0]
8014d52: b005 add sp, #20
8014d54: bdf0 pop {r4, r5, r6, r7, pc}
8014d56: bf00 nop
8014d58: 20000874 .word 0x20000874
08014d5c <__ascii_wctomb>:
8014d5c: b149 cbz r1, 8014d72 <__ascii_wctomb+0x16>
8014d5e: 2aff cmp r2, #255 ; 0xff
8014d60: bf85 ittet hi
8014d62: 238a movhi r3, #138 ; 0x8a
8014d64: 6003 strhi r3, [r0, #0]
8014d66: 700a strbls r2, [r1, #0]
8014d68: f04f 30ff movhi.w r0, #4294967295
8014d6c: bf98 it ls
8014d6e: 2001 movls r0, #1
8014d70: 4770 bx lr
8014d72: 4608 mov r0, r1
8014d74: 4770 bx lr
08014d76 <abort>:
8014d76: b508 push {r3, lr}
8014d78: 2006 movs r0, #6
8014d7a: f000 f82d bl 8014dd8 <raise>
8014d7e: 2001 movs r0, #1
8014d80: f000 f894 bl 8014eac <_exit>
08014d84 <_raise_r>:
8014d84: 291f cmp r1, #31
8014d86: b538 push {r3, r4, r5, lr}
8014d88: 4604 mov r4, r0
8014d8a: 460d mov r5, r1
8014d8c: d904 bls.n 8014d98 <_raise_r+0x14>
8014d8e: 2316 movs r3, #22
8014d90: 6003 str r3, [r0, #0]
8014d92: f04f 30ff mov.w r0, #4294967295
8014d96: bd38 pop {r3, r4, r5, pc}
8014d98: f8d0 22dc ldr.w r2, [r0, #732] ; 0x2dc
8014d9c: b112 cbz r2, 8014da4 <_raise_r+0x20>
8014d9e: f852 3021 ldr.w r3, [r2, r1, lsl #2]
8014da2: b94b cbnz r3, 8014db8 <_raise_r+0x34>
8014da4: 4620 mov r0, r4
8014da6: f000 f831 bl 8014e0c <_getpid_r>
8014daa: 462a mov r2, r5
8014dac: 4601 mov r1, r0
8014dae: 4620 mov r0, r4
8014db0: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr}
8014db4: f000 b818 b.w 8014de8 <_kill_r>
8014db8: 2b01 cmp r3, #1
8014dba: d00a beq.n 8014dd2 <_raise_r+0x4e>
8014dbc: 1c59 adds r1, r3, #1
8014dbe: d103 bne.n 8014dc8 <_raise_r+0x44>
8014dc0: 2316 movs r3, #22
8014dc2: 6003 str r3, [r0, #0]
8014dc4: 2001 movs r0, #1
8014dc6: e7e6 b.n 8014d96 <_raise_r+0x12>
8014dc8: 2400 movs r4, #0
8014dca: f842 4025 str.w r4, [r2, r5, lsl #2]
8014dce: 4628 mov r0, r5
8014dd0: 4798 blx r3
8014dd2: 2000 movs r0, #0
8014dd4: e7df b.n 8014d96 <_raise_r+0x12>
...
08014dd8 <raise>:
8014dd8: 4b02 ldr r3, [pc, #8] ; (8014de4 <raise+0xc>)
8014dda: 4601 mov r1, r0
8014ddc: 6818 ldr r0, [r3, #0]
8014dde: f7ff bfd1 b.w 8014d84 <_raise_r>
8014de2: bf00 nop
8014de4: 20000030 .word 0x20000030
08014de8 <_kill_r>:
8014de8: b538 push {r3, r4, r5, lr}
8014dea: 4d07 ldr r5, [pc, #28] ; (8014e08 <_kill_r+0x20>)
8014dec: 2300 movs r3, #0
8014dee: 4604 mov r4, r0
8014df0: 4608 mov r0, r1
8014df2: 4611 mov r1, r2
8014df4: 602b str r3, [r5, #0]
8014df6: f000 f82b bl 8014e50 <_kill>
8014dfa: 1c43 adds r3, r0, #1
8014dfc: d102 bne.n 8014e04 <_kill_r+0x1c>
8014dfe: 682b ldr r3, [r5, #0]
8014e00: b103 cbz r3, 8014e04 <_kill_r+0x1c>
8014e02: 6023 str r3, [r4, #0]
8014e04: bd38 pop {r3, r4, r5, pc}
8014e06: bf00 nop
8014e08: 20008dc8 .word 0x20008dc8
08014e0c <_getpid_r>:
8014e0c: f000 b810 b.w 8014e30 <_getpid>
08014e10 <_close>:
8014e10: 4b02 ldr r3, [pc, #8] ; (8014e1c <_close+0xc>)
8014e12: 2258 movs r2, #88 ; 0x58
8014e14: 601a str r2, [r3, #0]
8014e16: f04f 30ff mov.w r0, #4294967295
8014e1a: 4770 bx lr
8014e1c: 20008dc8 .word 0x20008dc8
08014e20 <_fstat>:
8014e20: 4b02 ldr r3, [pc, #8] ; (8014e2c <_fstat+0xc>)
8014e22: 2258 movs r2, #88 ; 0x58
8014e24: 601a str r2, [r3, #0]
8014e26: f04f 30ff mov.w r0, #4294967295
8014e2a: 4770 bx lr
8014e2c: 20008dc8 .word 0x20008dc8
08014e30 <_getpid>:
8014e30: 4b02 ldr r3, [pc, #8] ; (8014e3c <_getpid+0xc>)
8014e32: 2258 movs r2, #88 ; 0x58
8014e34: 601a str r2, [r3, #0]
8014e36: f04f 30ff mov.w r0, #4294967295
8014e3a: 4770 bx lr
8014e3c: 20008dc8 .word 0x20008dc8
08014e40 <_isatty>:
8014e40: 4b02 ldr r3, [pc, #8] ; (8014e4c <_isatty+0xc>)
8014e42: 2258 movs r2, #88 ; 0x58
8014e44: 601a str r2, [r3, #0]
8014e46: 2000 movs r0, #0
8014e48: 4770 bx lr
8014e4a: bf00 nop
8014e4c: 20008dc8 .word 0x20008dc8
08014e50 <_kill>:
8014e50: 4b02 ldr r3, [pc, #8] ; (8014e5c <_kill+0xc>)
8014e52: 2258 movs r2, #88 ; 0x58
8014e54: 601a str r2, [r3, #0]
8014e56: f04f 30ff mov.w r0, #4294967295
8014e5a: 4770 bx lr
8014e5c: 20008dc8 .word 0x20008dc8
08014e60 <_lseek>:
8014e60: 4b02 ldr r3, [pc, #8] ; (8014e6c <_lseek+0xc>)
8014e62: 2258 movs r2, #88 ; 0x58
8014e64: 601a str r2, [r3, #0]
8014e66: f04f 30ff mov.w r0, #4294967295
8014e6a: 4770 bx lr
8014e6c: 20008dc8 .word 0x20008dc8
08014e70 <_read>:
8014e70: 4b02 ldr r3, [pc, #8] ; (8014e7c <_read+0xc>)
8014e72: 2258 movs r2, #88 ; 0x58
8014e74: 601a str r2, [r3, #0]
8014e76: f04f 30ff mov.w r0, #4294967295
8014e7a: 4770 bx lr
8014e7c: 20008dc8 .word 0x20008dc8
08014e80 <_sbrk>:
8014e80: 4a04 ldr r2, [pc, #16] ; (8014e94 <_sbrk+0x14>)
8014e82: 6811 ldr r1, [r2, #0]
8014e84: 4603 mov r3, r0
8014e86: b909 cbnz r1, 8014e8c <_sbrk+0xc>
8014e88: 4903 ldr r1, [pc, #12] ; (8014e98 <_sbrk+0x18>)
8014e8a: 6011 str r1, [r2, #0]
8014e8c: 6810 ldr r0, [r2, #0]
8014e8e: 4403 add r3, r0
8014e90: 6013 str r3, [r2, #0]
8014e92: 4770 bx lr
8014e94: 20008dcc .word 0x20008dcc
8014e98: 20008dd0 .word 0x20008dd0
08014e9c <_write>:
8014e9c: 4b02 ldr r3, [pc, #8] ; (8014ea8 <_write+0xc>)
8014e9e: 2258 movs r2, #88 ; 0x58
8014ea0: 601a str r2, [r3, #0]
8014ea2: f04f 30ff mov.w r0, #4294967295
8014ea6: 4770 bx lr
8014ea8: 20008dc8 .word 0x20008dc8
08014eac <_exit>:
8014eac: e7fe b.n 8014eac <_exit>
...
08014eb0 <_init>:
8014eb0: b5f8 push {r3, r4, r5, r6, r7, lr}
8014eb2: bf00 nop
8014eb4: bcf8 pop {r3, r4, r5, r6, r7}
8014eb6: bc08 pop {r3}
8014eb8: 469e mov lr, r3
8014eba: 4770 bx lr
08014ebc <_fini>:
8014ebc: b5f8 push {r3, r4, r5, r6, r7, lr}
8014ebe: bf00 nop
8014ec0: bcf8 pop {r3, r4, r5, r6, r7}
8014ec2: bc08 pop {r3}
8014ec4: 469e mov lr, r3
8014ec6: 4770 bx lr