50272 lines
1.9 MiB
50272 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 00014e50 080001b0 080001b0 000101b0 2**4
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
2 .rodata 000032ec 08015000 08015000 00025000 2**3
|
|
CONTENTS, ALLOC, LOAD, READONLY, DATA
|
|
3 .ARM.extab 00000000 080182ec 080182ec 000309e0 2**0
|
|
CONTENTS
|
|
4 .ARM 00000008 080182ec 080182ec 000282ec 2**2
|
|
CONTENTS, ALLOC, LOAD, READONLY, DATA
|
|
5 .preinit_array 00000000 080182f4 080182f4 000309e0 2**0
|
|
CONTENTS, ALLOC, LOAD, DATA
|
|
6 .init_array 00000008 080182f4 080182f4 000282f4 2**2
|
|
CONTENTS, ALLOC, LOAD, DATA
|
|
7 .fini_array 00000004 080182fc 080182fc 000282fc 2**2
|
|
CONTENTS, ALLOC, LOAD, DATA
|
|
8 .data 000009e0 20000000 08018300 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 0001baf4 00000000 00000000 00030a10 2**0
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
14 .debug_abbrev 00004dd0 00000000 00000000 0004c504 2**0
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
15 .debug_aranges 000013b0 00000000 00000000 000512d8 2**3
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
16 .debug_ranges 00001310 00000000 00000000 00052688 2**3
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
17 .debug_macro 0002eecd 00000000 00000000 00053998 2**0
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
18 .debug_line 00020551 00000000 00000000 00082865 2**0
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
19 .debug_str 000ec414 00000000 00000000 000a2db6 2**0
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
20 .comment 00000050 00000000 00000000 0018f1ca 2**0
|
|
CONTENTS, READONLY
|
|
21 .debug_frame 0000634c 00000000 00000000 0018f21c 2**2
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
22 .stab 000000cc 00000000 00000000 00195568 2**2
|
|
CONTENTS, READONLY, DEBUGGING
|
|
23 .stabstr 000001b9 00000000 00000000 00195634 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: 08014fe8 .word 0x08014fe8
|
|
|
|
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: 08014fe8 .word 0x08014fe8
|
|
|
|
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: b086 sub sp, #24
|
|
8000ed0: af00 add r7, sp, #0
|
|
/* USER CODE END 1 */
|
|
|
|
/* MCU Configuration--------------------------------------------------------*/
|
|
|
|
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
|
|
HAL_Init();
|
|
8000ed2: f000 fc37 bl 8001744 <HAL_Init>
|
|
/* USER CODE BEGIN Init */
|
|
|
|
/* USER CODE END Init */
|
|
|
|
/* Configure the system clock */
|
|
SystemClock_Config();
|
|
8000ed6: f000 f843 bl 8000f60 <SystemClock_Config>
|
|
/* USER CODE BEGIN SysInit */
|
|
|
|
/* USER CODE END SysInit */
|
|
|
|
/* Initialize all configured peripherals */
|
|
MX_GPIO_Init();
|
|
8000eda: f000 f90f bl 80010fc <MX_GPIO_Init>
|
|
MX_LWIP_Init();
|
|
8000ede: f002 fdef bl 8003ac0 <MX_LWIP_Init>
|
|
MX_FMC_Init();
|
|
8000ee2: f000 f8a9 bl 8001038 <MX_FMC_Init>
|
|
|
|
/* USER CODE BEGIN 2 */
|
|
struct udp_pcb * pcb = udp_new();
|
|
8000ee6: f00a ffa3 bl 800be30 <udp_new>
|
|
8000eea: 6178 str r0, [r7, #20]
|
|
sock_init(pcb);
|
|
8000eec: 6978 ldr r0, [r7, #20]
|
|
8000eee: f000 f98f bl 8001210 <sock_init>
|
|
const char* msg = "hello world1234";
|
|
8000ef2: 4b19 ldr r3, [pc, #100] ; (8000f58 <main+0x8c>)
|
|
8000ef4: 613b str r3, [r7, #16]
|
|
struct pbuf *p = pbuf_alloc(0, 100, PBUF_RAM);
|
|
8000ef6: f44f 7220 mov.w r2, #640 ; 0x280
|
|
8000efa: 2164 movs r1, #100 ; 0x64
|
|
8000efc: 2000 movs r0, #0
|
|
8000efe: f004 fa9f bl 8005440 <pbuf_alloc>
|
|
8000f02: 60f8 str r0, [r7, #12]
|
|
uint32_t br_addr = ipaddr_addr("10.1.1.5");
|
|
8000f04: 4815 ldr r0, [pc, #84] ; (8000f5c <main+0x90>)
|
|
8000f06: f00e fa40 bl 800f38a <ipaddr_addr>
|
|
8000f0a: 4603 mov r3, r0
|
|
8000f0c: 607b str r3, [r7, #4]
|
|
u16_t dst_port = 50000U;
|
|
8000f0e: f24c 3350 movw r3, #50000 ; 0xc350
|
|
8000f12: 817b strh r3, [r7, #10]
|
|
p->len = strlen(msg);
|
|
8000f14: 6938 ldr r0, [r7, #16]
|
|
8000f16: f7ff f96b bl 80001f0 <strlen>
|
|
8000f1a: 4603 mov r3, r0
|
|
8000f1c: b29a uxth r2, r3
|
|
8000f1e: 68fb ldr r3, [r7, #12]
|
|
8000f20: 815a strh r2, [r3, #10]
|
|
p->tot_len = p->len;
|
|
8000f22: 68fb ldr r3, [r7, #12]
|
|
8000f24: 895a ldrh r2, [r3, #10]
|
|
8000f26: 68fb ldr r3, [r7, #12]
|
|
8000f28: 811a strh r2, [r3, #8]
|
|
strcpy(p->payload, msg);
|
|
8000f2a: 68fb ldr r3, [r7, #12]
|
|
8000f2c: 685b ldr r3, [r3, #4]
|
|
8000f2e: 6939 ldr r1, [r7, #16]
|
|
8000f30: 4618 mov r0, r3
|
|
8000f32: f00f fb0f bl 8010554 <strcpy>
|
|
|
|
/* Infinite loop */
|
|
/* USER CODE BEGIN WHILE */
|
|
while (1)
|
|
{
|
|
MX_LWIP_Process();
|
|
8000f36: f002 fe31 bl 8003b9c <MX_LWIP_Process>
|
|
//write_isa(0x110, 0x5555);
|
|
//write_isa(0x108, 0xaaaa);
|
|
//read_isa(0x2);
|
|
//read_isa(0x4);
|
|
|
|
err_t errok = udp_sendto(pcb, p, (ip_addr_t*)&br_addr, dst_port);
|
|
8000f3a: 897b ldrh r3, [r7, #10]
|
|
8000f3c: 1d3a adds r2, r7, #4
|
|
8000f3e: 68f9 ldr r1, [r7, #12]
|
|
8000f40: 6978 ldr r0, [r7, #20]
|
|
8000f42: f00a fc67 bl 800b814 <udp_sendto>
|
|
8000f46: 4603 mov r3, r0
|
|
8000f48: 727b strb r3, [r7, #9]
|
|
HAL_Delay(100);
|
|
8000f4a: 2064 movs r0, #100 ; 0x64
|
|
8000f4c: f000 fc6c bl 8001828 <HAL_Delay>
|
|
read_isa(0x4);
|
|
8000f50: 2004 movs r0, #4
|
|
8000f52: f000 f979 bl 8001248 <read_isa>
|
|
{
|
|
8000f56: e7ee b.n 8000f36 <main+0x6a>
|
|
8000f58: 08015000 .word 0x08015000
|
|
8000f5c: 08015010 .word 0x08015010
|
|
|
|
08000f60 <SystemClock_Config>:
|
|
/**
|
|
* @brief System Clock Configuration
|
|
* @retval None
|
|
*/
|
|
void SystemClock_Config(void)
|
|
{
|
|
8000f60: b580 push {r7, lr}
|
|
8000f62: b094 sub sp, #80 ; 0x50
|
|
8000f64: af00 add r7, sp, #0
|
|
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
|
|
8000f66: f107 0320 add.w r3, r7, #32
|
|
8000f6a: 2230 movs r2, #48 ; 0x30
|
|
8000f6c: 2100 movs r1, #0
|
|
8000f6e: 4618 mov r0, r3
|
|
8000f70: f00f faba bl 80104e8 <memset>
|
|
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
|
|
8000f74: f107 030c add.w r3, r7, #12
|
|
8000f78: 2200 movs r2, #0
|
|
8000f7a: 601a str r2, [r3, #0]
|
|
8000f7c: 605a str r2, [r3, #4]
|
|
8000f7e: 609a str r2, [r3, #8]
|
|
8000f80: 60da str r2, [r3, #12]
|
|
8000f82: 611a str r2, [r3, #16]
|
|
|
|
/** Configure the main internal regulator output voltage
|
|
*/
|
|
__HAL_RCC_PWR_CLK_ENABLE();
|
|
8000f84: 2300 movs r3, #0
|
|
8000f86: 60bb str r3, [r7, #8]
|
|
8000f88: 4b29 ldr r3, [pc, #164] ; (8001030 <SystemClock_Config+0xd0>)
|
|
8000f8a: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
8000f8c: 4a28 ldr r2, [pc, #160] ; (8001030 <SystemClock_Config+0xd0>)
|
|
8000f8e: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
|
|
8000f92: 6413 str r3, [r2, #64] ; 0x40
|
|
8000f94: 4b26 ldr r3, [pc, #152] ; (8001030 <SystemClock_Config+0xd0>)
|
|
8000f96: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
8000f98: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
|
|
8000f9c: 60bb str r3, [r7, #8]
|
|
8000f9e: 68bb ldr r3, [r7, #8]
|
|
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);
|
|
8000fa0: 2300 movs r3, #0
|
|
8000fa2: 607b str r3, [r7, #4]
|
|
8000fa4: 4b23 ldr r3, [pc, #140] ; (8001034 <SystemClock_Config+0xd4>)
|
|
8000fa6: 681b ldr r3, [r3, #0]
|
|
8000fa8: f423 4340 bic.w r3, r3, #49152 ; 0xc000
|
|
8000fac: 4a21 ldr r2, [pc, #132] ; (8001034 <SystemClock_Config+0xd4>)
|
|
8000fae: f443 4380 orr.w r3, r3, #16384 ; 0x4000
|
|
8000fb2: 6013 str r3, [r2, #0]
|
|
8000fb4: 4b1f ldr r3, [pc, #124] ; (8001034 <SystemClock_Config+0xd4>)
|
|
8000fb6: 681b ldr r3, [r3, #0]
|
|
8000fb8: f403 4340 and.w r3, r3, #49152 ; 0xc000
|
|
8000fbc: 607b str r3, [r7, #4]
|
|
8000fbe: 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;
|
|
8000fc0: 2302 movs r3, #2
|
|
8000fc2: 623b str r3, [r7, #32]
|
|
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
|
|
8000fc4: 2301 movs r3, #1
|
|
8000fc6: 62fb str r3, [r7, #44] ; 0x2c
|
|
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
|
|
8000fc8: 2310 movs r3, #16
|
|
8000fca: 633b str r3, [r7, #48] ; 0x30
|
|
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
|
|
8000fcc: 2302 movs r3, #2
|
|
8000fce: 63bb str r3, [r7, #56] ; 0x38
|
|
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
|
|
8000fd0: 2300 movs r3, #0
|
|
8000fd2: 63fb str r3, [r7, #60] ; 0x3c
|
|
RCC_OscInitStruct.PLL.PLLM = 8;
|
|
8000fd4: 2308 movs r3, #8
|
|
8000fd6: 643b str r3, [r7, #64] ; 0x40
|
|
RCC_OscInitStruct.PLL.PLLN = 100;
|
|
8000fd8: 2364 movs r3, #100 ; 0x64
|
|
8000fda: 647b str r3, [r7, #68] ; 0x44
|
|
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
|
|
8000fdc: 2302 movs r3, #2
|
|
8000fde: 64bb str r3, [r7, #72] ; 0x48
|
|
RCC_OscInitStruct.PLL.PLLQ = 4;
|
|
8000fe0: 2304 movs r3, #4
|
|
8000fe2: 64fb str r3, [r7, #76] ; 0x4c
|
|
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
|
|
8000fe4: f107 0320 add.w r3, r7, #32
|
|
8000fe8: 4618 mov r0, r3
|
|
8000fea: f001 ffe3 bl 8002fb4 <HAL_RCC_OscConfig>
|
|
8000fee: 4603 mov r3, r0
|
|
8000ff0: 2b00 cmp r3, #0
|
|
8000ff2: d001 beq.n 8000ff8 <SystemClock_Config+0x98>
|
|
{
|
|
Error_Handler();
|
|
8000ff4: f000 f938 bl 8001268 <Error_Handler>
|
|
}
|
|
|
|
/** Initializes the CPU, AHB and APB buses clocks
|
|
*/
|
|
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|
|
8000ff8: 230f movs r3, #15
|
|
8000ffa: 60fb str r3, [r7, #12]
|
|
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
|
|
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
|
|
8000ffc: 2302 movs r3, #2
|
|
8000ffe: 613b str r3, [r7, #16]
|
|
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
|
|
8001000: 2300 movs r3, #0
|
|
8001002: 617b str r3, [r7, #20]
|
|
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
|
|
8001004: f44f 53a0 mov.w r3, #5120 ; 0x1400
|
|
8001008: 61bb str r3, [r7, #24]
|
|
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
|
|
800100a: f44f 5380 mov.w r3, #4096 ; 0x1000
|
|
800100e: 61fb str r3, [r7, #28]
|
|
|
|
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK)
|
|
8001010: f107 030c add.w r3, r7, #12
|
|
8001014: 2103 movs r1, #3
|
|
8001016: 4618 mov r0, r3
|
|
8001018: f002 fa44 bl 80034a4 <HAL_RCC_ClockConfig>
|
|
800101c: 4603 mov r3, r0
|
|
800101e: 2b00 cmp r3, #0
|
|
8001020: d001 beq.n 8001026 <SystemClock_Config+0xc6>
|
|
{
|
|
Error_Handler();
|
|
8001022: f000 f921 bl 8001268 <Error_Handler>
|
|
}
|
|
}
|
|
8001026: bf00 nop
|
|
8001028: 3750 adds r7, #80 ; 0x50
|
|
800102a: 46bd mov sp, r7
|
|
800102c: bd80 pop {r7, pc}
|
|
800102e: bf00 nop
|
|
8001030: 40023800 .word 0x40023800
|
|
8001034: 40007000 .word 0x40007000
|
|
|
|
08001038 <MX_FMC_Init>:
|
|
|
|
/* FMC initialization function */
|
|
static void MX_FMC_Init(void)
|
|
{
|
|
8001038: b580 push {r7, lr}
|
|
800103a: b088 sub sp, #32
|
|
800103c: af00 add r7, sp, #0
|
|
|
|
/* USER CODE BEGIN FMC_Init 0 */
|
|
|
|
/* USER CODE END FMC_Init 0 */
|
|
|
|
FMC_NORSRAM_TimingTypeDef Timing = {0};
|
|
800103e: 1d3b adds r3, r7, #4
|
|
8001040: 2200 movs r2, #0
|
|
8001042: 601a str r2, [r3, #0]
|
|
8001044: 605a str r2, [r3, #4]
|
|
8001046: 609a str r2, [r3, #8]
|
|
8001048: 60da str r2, [r3, #12]
|
|
800104a: 611a str r2, [r3, #16]
|
|
800104c: 615a str r2, [r3, #20]
|
|
800104e: 619a str r2, [r3, #24]
|
|
|
|
/* USER CODE END FMC_Init 1 */
|
|
|
|
/** Perform the SRAM1 memory initialization sequence
|
|
*/
|
|
hsram1.Instance = FMC_NORSRAM_DEVICE;
|
|
8001050: 4b28 ldr r3, [pc, #160] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
8001052: f04f 4220 mov.w r2, #2684354560 ; 0xa0000000
|
|
8001056: 601a str r2, [r3, #0]
|
|
hsram1.Extended = FMC_NORSRAM_EXTENDED_DEVICE;
|
|
8001058: 4b26 ldr r3, [pc, #152] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
800105a: 4a27 ldr r2, [pc, #156] ; (80010f8 <MX_FMC_Init+0xc0>)
|
|
800105c: 605a str r2, [r3, #4]
|
|
/* hsram1.Init */
|
|
hsram1.Init.NSBank = FMC_NORSRAM_BANK1;
|
|
800105e: 4b25 ldr r3, [pc, #148] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
8001060: 2200 movs r2, #0
|
|
8001062: 609a str r2, [r3, #8]
|
|
hsram1.Init.DataAddressMux = FMC_DATA_ADDRESS_MUX_DISABLE;
|
|
8001064: 4b23 ldr r3, [pc, #140] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
8001066: 2200 movs r2, #0
|
|
8001068: 60da str r2, [r3, #12]
|
|
hsram1.Init.MemoryType = FMC_MEMORY_TYPE_SRAM;
|
|
800106a: 4b22 ldr r3, [pc, #136] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
800106c: 2200 movs r2, #0
|
|
800106e: 611a str r2, [r3, #16]
|
|
hsram1.Init.MemoryDataWidth = FMC_NORSRAM_MEM_BUS_WIDTH_16;
|
|
8001070: 4b20 ldr r3, [pc, #128] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
8001072: 2210 movs r2, #16
|
|
8001074: 615a str r2, [r3, #20]
|
|
hsram1.Init.BurstAccessMode = FMC_BURST_ACCESS_MODE_DISABLE;
|
|
8001076: 4b1f ldr r3, [pc, #124] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
8001078: 2200 movs r2, #0
|
|
800107a: 619a str r2, [r3, #24]
|
|
hsram1.Init.WaitSignalPolarity = FMC_WAIT_SIGNAL_POLARITY_LOW;
|
|
800107c: 4b1d ldr r3, [pc, #116] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
800107e: 2200 movs r2, #0
|
|
8001080: 61da str r2, [r3, #28]
|
|
hsram1.Init.WrapMode = FMC_WRAP_MODE_DISABLE;
|
|
8001082: 4b1c ldr r3, [pc, #112] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
8001084: 2200 movs r2, #0
|
|
8001086: 621a str r2, [r3, #32]
|
|
hsram1.Init.WaitSignalActive = FMC_WAIT_TIMING_BEFORE_WS;
|
|
8001088: 4b1a ldr r3, [pc, #104] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
800108a: 2200 movs r2, #0
|
|
800108c: 625a str r2, [r3, #36] ; 0x24
|
|
hsram1.Init.WriteOperation = FMC_WRITE_OPERATION_ENABLE;
|
|
800108e: 4b19 ldr r3, [pc, #100] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
8001090: f44f 5280 mov.w r2, #4096 ; 0x1000
|
|
8001094: 629a str r2, [r3, #40] ; 0x28
|
|
hsram1.Init.WaitSignal = FMC_WAIT_SIGNAL_DISABLE;
|
|
8001096: 4b17 ldr r3, [pc, #92] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
8001098: 2200 movs r2, #0
|
|
800109a: 62da str r2, [r3, #44] ; 0x2c
|
|
hsram1.Init.ExtendedMode = FMC_EXTENDED_MODE_DISABLE;
|
|
800109c: 4b15 ldr r3, [pc, #84] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
800109e: 2200 movs r2, #0
|
|
80010a0: 631a str r2, [r3, #48] ; 0x30
|
|
hsram1.Init.AsynchronousWait = FMC_ASYNCHRONOUS_WAIT_DISABLE;
|
|
80010a2: 4b14 ldr r3, [pc, #80] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
80010a4: 2200 movs r2, #0
|
|
80010a6: 635a str r2, [r3, #52] ; 0x34
|
|
hsram1.Init.WriteBurst = FMC_WRITE_BURST_DISABLE;
|
|
80010a8: 4b12 ldr r3, [pc, #72] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
80010aa: 2200 movs r2, #0
|
|
80010ac: 639a str r2, [r3, #56] ; 0x38
|
|
hsram1.Init.ContinuousClock = FMC_CONTINUOUS_CLOCK_SYNC_ONLY;
|
|
80010ae: 4b11 ldr r3, [pc, #68] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
80010b0: 2200 movs r2, #0
|
|
80010b2: 63da str r2, [r3, #60] ; 0x3c
|
|
hsram1.Init.PageSize = FMC_PAGE_SIZE_NONE;
|
|
80010b4: 4b0f ldr r3, [pc, #60] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
80010b6: 2200 movs r2, #0
|
|
80010b8: 645a str r2, [r3, #68] ; 0x44
|
|
/* Timing */
|
|
Timing.AddressSetupTime = 15;
|
|
80010ba: 230f movs r3, #15
|
|
80010bc: 607b str r3, [r7, #4]
|
|
Timing.AddressHoldTime = 15;
|
|
80010be: 230f movs r3, #15
|
|
80010c0: 60bb str r3, [r7, #8]
|
|
Timing.DataSetupTime = 255;
|
|
80010c2: 23ff movs r3, #255 ; 0xff
|
|
80010c4: 60fb str r3, [r7, #12]
|
|
Timing.BusTurnAroundDuration = 15;
|
|
80010c6: 230f movs r3, #15
|
|
80010c8: 613b str r3, [r7, #16]
|
|
Timing.CLKDivision = 16;
|
|
80010ca: 2310 movs r3, #16
|
|
80010cc: 617b str r3, [r7, #20]
|
|
Timing.DataLatency = 17;
|
|
80010ce: 2311 movs r3, #17
|
|
80010d0: 61bb str r3, [r7, #24]
|
|
Timing.AccessMode = FMC_ACCESS_MODE_A;
|
|
80010d2: 2300 movs r3, #0
|
|
80010d4: 61fb str r3, [r7, #28]
|
|
/* ExtTiming */
|
|
|
|
if (HAL_SRAM_Init(&hsram1, &Timing, NULL) != HAL_OK)
|
|
80010d6: 1d3b adds r3, r7, #4
|
|
80010d8: 2200 movs r2, #0
|
|
80010da: 4619 mov r1, r3
|
|
80010dc: 4805 ldr r0, [pc, #20] ; (80010f4 <MX_FMC_Init+0xbc>)
|
|
80010de: f002 fb99 bl 8003814 <HAL_SRAM_Init>
|
|
80010e2: 4603 mov r3, r0
|
|
80010e4: 2b00 cmp r3, #0
|
|
80010e6: d001 beq.n 80010ec <MX_FMC_Init+0xb4>
|
|
{
|
|
Error_Handler( );
|
|
80010e8: f000 f8be bl 8001268 <Error_Handler>
|
|
}
|
|
|
|
/* USER CODE BEGIN FMC_Init 2 */
|
|
|
|
/* USER CODE END FMC_Init 2 */
|
|
}
|
|
80010ec: bf00 nop
|
|
80010ee: 3720 adds r7, #32
|
|
80010f0: 46bd mov sp, r7
|
|
80010f2: bd80 pop {r7, pc}
|
|
80010f4: 200009fc .word 0x200009fc
|
|
80010f8: a0000104 .word 0xa0000104
|
|
|
|
080010fc <MX_GPIO_Init>:
|
|
* @brief GPIO Initialization Function
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
static void MX_GPIO_Init(void)
|
|
{
|
|
80010fc: b580 push {r7, lr}
|
|
80010fe: b08c sub sp, #48 ; 0x30
|
|
8001100: af00 add r7, sp, #0
|
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
|
8001102: f107 031c add.w r3, r7, #28
|
|
8001106: 2200 movs r2, #0
|
|
8001108: 601a str r2, [r3, #0]
|
|
800110a: 605a str r2, [r3, #4]
|
|
800110c: 609a str r2, [r3, #8]
|
|
800110e: 60da str r2, [r3, #12]
|
|
8001110: 611a str r2, [r3, #16]
|
|
|
|
/* GPIO Ports Clock Enable */
|
|
__HAL_RCC_GPIOE_CLK_ENABLE();
|
|
8001112: 2300 movs r3, #0
|
|
8001114: 61bb str r3, [r7, #24]
|
|
8001116: 4b3c ldr r3, [pc, #240] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
8001118: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
800111a: 4a3b ldr r2, [pc, #236] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
800111c: f043 0310 orr.w r3, r3, #16
|
|
8001120: 6313 str r3, [r2, #48] ; 0x30
|
|
8001122: 4b39 ldr r3, [pc, #228] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
8001124: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8001126: f003 0310 and.w r3, r3, #16
|
|
800112a: 61bb str r3, [r7, #24]
|
|
800112c: 69bb ldr r3, [r7, #24]
|
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
|
800112e: 2300 movs r3, #0
|
|
8001130: 617b str r3, [r7, #20]
|
|
8001132: 4b35 ldr r3, [pc, #212] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
8001134: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8001136: 4a34 ldr r2, [pc, #208] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
8001138: f043 0304 orr.w r3, r3, #4
|
|
800113c: 6313 str r3, [r2, #48] ; 0x30
|
|
800113e: 4b32 ldr r3, [pc, #200] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
8001140: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8001142: f003 0304 and.w r3, r3, #4
|
|
8001146: 617b str r3, [r7, #20]
|
|
8001148: 697b ldr r3, [r7, #20]
|
|
__HAL_RCC_GPIOF_CLK_ENABLE();
|
|
800114a: 2300 movs r3, #0
|
|
800114c: 613b str r3, [r7, #16]
|
|
800114e: 4b2e ldr r3, [pc, #184] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
8001150: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8001152: 4a2d ldr r2, [pc, #180] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
8001154: f043 0320 orr.w r3, r3, #32
|
|
8001158: 6313 str r3, [r2, #48] ; 0x30
|
|
800115a: 4b2b ldr r3, [pc, #172] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
800115c: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
800115e: f003 0320 and.w r3, r3, #32
|
|
8001162: 613b str r3, [r7, #16]
|
|
8001164: 693b ldr r3, [r7, #16]
|
|
__HAL_RCC_GPIOA_CLK_ENABLE();
|
|
8001166: 2300 movs r3, #0
|
|
8001168: 60fb str r3, [r7, #12]
|
|
800116a: 4b27 ldr r3, [pc, #156] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
800116c: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
800116e: 4a26 ldr r2, [pc, #152] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
8001170: f043 0301 orr.w r3, r3, #1
|
|
8001174: 6313 str r3, [r2, #48] ; 0x30
|
|
8001176: 4b24 ldr r3, [pc, #144] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
8001178: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
800117a: f003 0301 and.w r3, r3, #1
|
|
800117e: 60fb str r3, [r7, #12]
|
|
8001180: 68fb ldr r3, [r7, #12]
|
|
__HAL_RCC_GPIOG_CLK_ENABLE();
|
|
8001182: 2300 movs r3, #0
|
|
8001184: 60bb str r3, [r7, #8]
|
|
8001186: 4b20 ldr r3, [pc, #128] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
8001188: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
800118a: 4a1f ldr r2, [pc, #124] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
800118c: f043 0340 orr.w r3, r3, #64 ; 0x40
|
|
8001190: 6313 str r3, [r2, #48] ; 0x30
|
|
8001192: 4b1d ldr r3, [pc, #116] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
8001194: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8001196: f003 0340 and.w r3, r3, #64 ; 0x40
|
|
800119a: 60bb str r3, [r7, #8]
|
|
800119c: 68bb ldr r3, [r7, #8]
|
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
|
800119e: 2300 movs r3, #0
|
|
80011a0: 607b str r3, [r7, #4]
|
|
80011a2: 4b19 ldr r3, [pc, #100] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
80011a4: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
80011a6: 4a18 ldr r2, [pc, #96] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
80011a8: f043 0302 orr.w r3, r3, #2
|
|
80011ac: 6313 str r3, [r2, #48] ; 0x30
|
|
80011ae: 4b16 ldr r3, [pc, #88] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
80011b0: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
80011b2: f003 0302 and.w r3, r3, #2
|
|
80011b6: 607b str r3, [r7, #4]
|
|
80011b8: 687b ldr r3, [r7, #4]
|
|
__HAL_RCC_GPIOD_CLK_ENABLE();
|
|
80011ba: 2300 movs r3, #0
|
|
80011bc: 603b str r3, [r7, #0]
|
|
80011be: 4b12 ldr r3, [pc, #72] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
80011c0: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
80011c2: 4a11 ldr r2, [pc, #68] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
80011c4: f043 0308 orr.w r3, r3, #8
|
|
80011c8: 6313 str r3, [r2, #48] ; 0x30
|
|
80011ca: 4b0f ldr r3, [pc, #60] ; (8001208 <MX_GPIO_Init+0x10c>)
|
|
80011cc: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
80011ce: f003 0308 and.w r3, r3, #8
|
|
80011d2: 603b str r3, [r7, #0]
|
|
80011d4: 683b ldr r3, [r7, #0]
|
|
|
|
/*Configure GPIO pin Output Level */
|
|
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_14, GPIO_PIN_RESET);
|
|
80011d6: 2200 movs r2, #0
|
|
80011d8: f44f 4180 mov.w r1, #16384 ; 0x4000
|
|
80011dc: 480b ldr r0, [pc, #44] ; (800120c <MX_GPIO_Init+0x110>)
|
|
80011de: f001 fecf bl 8002f80 <HAL_GPIO_WritePin>
|
|
|
|
/*Configure GPIO pin : PC14 */
|
|
GPIO_InitStruct.Pin = GPIO_PIN_14;
|
|
80011e2: f44f 4380 mov.w r3, #16384 ; 0x4000
|
|
80011e6: 61fb str r3, [r7, #28]
|
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
|
80011e8: 2301 movs r3, #1
|
|
80011ea: 623b str r3, [r7, #32]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
80011ec: 2300 movs r3, #0
|
|
80011ee: 627b str r3, [r7, #36] ; 0x24
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
|
80011f0: 2300 movs r3, #0
|
|
80011f2: 62bb str r3, [r7, #40] ; 0x28
|
|
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
|
80011f4: f107 031c add.w r3, r7, #28
|
|
80011f8: 4619 mov r1, r3
|
|
80011fa: 4804 ldr r0, [pc, #16] ; (800120c <MX_GPIO_Init+0x110>)
|
|
80011fc: f001 fd14 bl 8002c28 <HAL_GPIO_Init>
|
|
|
|
}
|
|
8001200: bf00 nop
|
|
8001202: 3730 adds r7, #48 ; 0x30
|
|
8001204: 46bd mov sp, r7
|
|
8001206: bd80 pop {r7, pc}
|
|
8001208: 40023800 .word 0x40023800
|
|
800120c: 40020800 .word 0x40020800
|
|
|
|
08001210 <sock_init>:
|
|
|
|
/* USER CODE BEGIN 4 */
|
|
|
|
void sock_init(struct udp_pcb * pcb)
|
|
{
|
|
8001210: b580 push {r7, lr}
|
|
8001212: b084 sub sp, #16
|
|
8001214: af00 add r7, sp, #0
|
|
8001216: 6078 str r0, [r7, #4]
|
|
uint32_t ipaddr = ipaddr_addr("10.1.1.69");
|
|
8001218: 480a ldr r0, [pc, #40] ; (8001244 <sock_init+0x34>)
|
|
800121a: f00e f8b6 bl 800f38a <ipaddr_addr>
|
|
800121e: 4603 mov r3, r0
|
|
8001220: 60bb str r3, [r7, #8]
|
|
u16_t port = 50069U;
|
|
8001222: f24c 3395 movw r3, #50069 ; 0xc395
|
|
8001226: 81fb strh r3, [r7, #14]
|
|
err_t errok = udp_bind(pcb, (ip_addr_t*)&ipaddr, port);
|
|
8001228: 89fa ldrh r2, [r7, #14]
|
|
800122a: f107 0308 add.w r3, r7, #8
|
|
800122e: 4619 mov r1, r3
|
|
8001230: 6878 ldr r0, [r7, #4]
|
|
8001232: f00a fca5 bl 800bb80 <udp_bind>
|
|
8001236: 4603 mov r3, r0
|
|
8001238: 737b strb r3, [r7, #13]
|
|
return;
|
|
800123a: bf00 nop
|
|
}
|
|
800123c: 3710 adds r7, #16
|
|
800123e: 46bd mov sp, r7
|
|
8001240: bd80 pop {r7, pc}
|
|
8001242: bf00 nop
|
|
8001244: 0801501c .word 0x0801501c
|
|
|
|
08001248 <read_isa>:
|
|
|
|
uint16_t read_isa(uint16_t addr)
|
|
{
|
|
8001248: b480 push {r7}
|
|
800124a: b083 sub sp, #12
|
|
800124c: af00 add r7, sp, #0
|
|
800124e: 4603 mov r3, r0
|
|
8001250: 80fb strh r3, [r7, #6]
|
|
return *(uint16_t*)(ISA_BASE_RD + (addr << 1));
|
|
8001252: 88fb ldrh r3, [r7, #6]
|
|
8001254: 005b lsls r3, r3, #1
|
|
8001256: f103 43c0 add.w r3, r3, #1610612736 ; 0x60000000
|
|
800125a: 881b ldrh r3, [r3, #0]
|
|
}
|
|
800125c: 4618 mov r0, r3
|
|
800125e: 370c adds r7, #12
|
|
8001260: 46bd mov sp, r7
|
|
8001262: f85d 7b04 ldr.w r7, [sp], #4
|
|
8001266: 4770 bx lr
|
|
|
|
08001268 <Error_Handler>:
|
|
/**
|
|
* @brief This function is executed in case of error occurrence.
|
|
* @retval None
|
|
*/
|
|
void Error_Handler(void)
|
|
{
|
|
8001268: b480 push {r7}
|
|
800126a: 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");
|
|
800126c: b672 cpsid i
|
|
}
|
|
800126e: 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)
|
|
8001270: e7fe b.n 8001270 <Error_Handler+0x8>
|
|
...
|
|
|
|
08001274 <HAL_MspInit>:
|
|
/* USER CODE END 0 */
|
|
/**
|
|
* Initializes the Global MSP.
|
|
*/
|
|
void HAL_MspInit(void)
|
|
{
|
|
8001274: b480 push {r7}
|
|
8001276: b083 sub sp, #12
|
|
8001278: af00 add r7, sp, #0
|
|
/* USER CODE BEGIN MspInit 0 */
|
|
|
|
/* USER CODE END MspInit 0 */
|
|
|
|
__HAL_RCC_SYSCFG_CLK_ENABLE();
|
|
800127a: 2300 movs r3, #0
|
|
800127c: 607b str r3, [r7, #4]
|
|
800127e: 4b10 ldr r3, [pc, #64] ; (80012c0 <HAL_MspInit+0x4c>)
|
|
8001280: 6c5b ldr r3, [r3, #68] ; 0x44
|
|
8001282: 4a0f ldr r2, [pc, #60] ; (80012c0 <HAL_MspInit+0x4c>)
|
|
8001284: f443 4380 orr.w r3, r3, #16384 ; 0x4000
|
|
8001288: 6453 str r3, [r2, #68] ; 0x44
|
|
800128a: 4b0d ldr r3, [pc, #52] ; (80012c0 <HAL_MspInit+0x4c>)
|
|
800128c: 6c5b ldr r3, [r3, #68] ; 0x44
|
|
800128e: f403 4380 and.w r3, r3, #16384 ; 0x4000
|
|
8001292: 607b str r3, [r7, #4]
|
|
8001294: 687b ldr r3, [r7, #4]
|
|
__HAL_RCC_PWR_CLK_ENABLE();
|
|
8001296: 2300 movs r3, #0
|
|
8001298: 603b str r3, [r7, #0]
|
|
800129a: 4b09 ldr r3, [pc, #36] ; (80012c0 <HAL_MspInit+0x4c>)
|
|
800129c: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
800129e: 4a08 ldr r2, [pc, #32] ; (80012c0 <HAL_MspInit+0x4c>)
|
|
80012a0: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
|
|
80012a4: 6413 str r3, [r2, #64] ; 0x40
|
|
80012a6: 4b06 ldr r3, [pc, #24] ; (80012c0 <HAL_MspInit+0x4c>)
|
|
80012a8: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
80012aa: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
|
|
80012ae: 603b str r3, [r7, #0]
|
|
80012b0: 683b ldr r3, [r7, #0]
|
|
/* System interrupt init*/
|
|
|
|
/* USER CODE BEGIN MspInit 1 */
|
|
|
|
/* USER CODE END MspInit 1 */
|
|
}
|
|
80012b2: bf00 nop
|
|
80012b4: 370c adds r7, #12
|
|
80012b6: 46bd mov sp, r7
|
|
80012b8: f85d 7b04 ldr.w r7, [sp], #4
|
|
80012bc: 4770 bx lr
|
|
80012be: bf00 nop
|
|
80012c0: 40023800 .word 0x40023800
|
|
|
|
080012c4 <HAL_FMC_MspInit>:
|
|
|
|
static uint32_t FMC_Initialized = 0;
|
|
|
|
static void HAL_FMC_MspInit(void){
|
|
80012c4: b580 push {r7, lr}
|
|
80012c6: b086 sub sp, #24
|
|
80012c8: af00 add r7, sp, #0
|
|
/* USER CODE BEGIN FMC_MspInit 0 */
|
|
|
|
/* USER CODE END FMC_MspInit 0 */
|
|
GPIO_InitTypeDef GPIO_InitStruct ={0};
|
|
80012ca: 1d3b adds r3, r7, #4
|
|
80012cc: 2200 movs r2, #0
|
|
80012ce: 601a str r2, [r3, #0]
|
|
80012d0: 605a str r2, [r3, #4]
|
|
80012d2: 609a str r2, [r3, #8]
|
|
80012d4: 60da str r2, [r3, #12]
|
|
80012d6: 611a str r2, [r3, #16]
|
|
if (FMC_Initialized) {
|
|
80012d8: 4b2c ldr r3, [pc, #176] ; (800138c <HAL_FMC_MspInit+0xc8>)
|
|
80012da: 681b ldr r3, [r3, #0]
|
|
80012dc: 2b00 cmp r3, #0
|
|
80012de: d150 bne.n 8001382 <HAL_FMC_MspInit+0xbe>
|
|
return;
|
|
}
|
|
FMC_Initialized = 1;
|
|
80012e0: 4b2a ldr r3, [pc, #168] ; (800138c <HAL_FMC_MspInit+0xc8>)
|
|
80012e2: 2201 movs r2, #1
|
|
80012e4: 601a str r2, [r3, #0]
|
|
|
|
/* Peripheral clock enable */
|
|
__HAL_RCC_FMC_CLK_ENABLE();
|
|
80012e6: 2300 movs r3, #0
|
|
80012e8: 603b str r3, [r7, #0]
|
|
80012ea: 4b29 ldr r3, [pc, #164] ; (8001390 <HAL_FMC_MspInit+0xcc>)
|
|
80012ec: 6b9b ldr r3, [r3, #56] ; 0x38
|
|
80012ee: 4a28 ldr r2, [pc, #160] ; (8001390 <HAL_FMC_MspInit+0xcc>)
|
|
80012f0: f043 0301 orr.w r3, r3, #1
|
|
80012f4: 6393 str r3, [r2, #56] ; 0x38
|
|
80012f6: 4b26 ldr r3, [pc, #152] ; (8001390 <HAL_FMC_MspInit+0xcc>)
|
|
80012f8: 6b9b ldr r3, [r3, #56] ; 0x38
|
|
80012fa: f003 0301 and.w r3, r3, #1
|
|
80012fe: 603b str r3, [r7, #0]
|
|
8001300: 683b ldr r3, [r7, #0]
|
|
PD5 ------> FMC_NWE
|
|
PD7 ------> FMC_NE1
|
|
PE0 ------> FMC_NBL0
|
|
PE1 ------> FMC_NBL1
|
|
*/
|
|
GPIO_InitStruct.Pin = GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6
|
|
8001302: f64f 73fb movw r3, #65531 ; 0xfffb
|
|
8001306: 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_PIN_0|GPIO_PIN_1;
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
|
8001308: 2302 movs r3, #2
|
|
800130a: 60bb str r3, [r7, #8]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
800130c: 2300 movs r3, #0
|
|
800130e: 60fb str r3, [r7, #12]
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
8001310: 2303 movs r3, #3
|
|
8001312: 613b str r3, [r7, #16]
|
|
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
|
|
8001314: 230c movs r3, #12
|
|
8001316: 617b str r3, [r7, #20]
|
|
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
|
8001318: 1d3b adds r3, r7, #4
|
|
800131a: 4619 mov r1, r3
|
|
800131c: 481d ldr r0, [pc, #116] ; (8001394 <HAL_FMC_MspInit+0xd0>)
|
|
800131e: f001 fc83 bl 8002c28 <HAL_GPIO_Init>
|
|
|
|
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
|
|
8001322: f24f 033f movw r3, #61503 ; 0xf03f
|
|
8001326: 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;
|
|
8001328: 2302 movs r3, #2
|
|
800132a: 60bb str r3, [r7, #8]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
800132c: 2300 movs r3, #0
|
|
800132e: 60fb str r3, [r7, #12]
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
8001330: 2303 movs r3, #3
|
|
8001332: 613b str r3, [r7, #16]
|
|
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
|
|
8001334: 230c movs r3, #12
|
|
8001336: 617b str r3, [r7, #20]
|
|
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
|
|
8001338: 1d3b adds r3, r7, #4
|
|
800133a: 4619 mov r1, r3
|
|
800133c: 4816 ldr r0, [pc, #88] ; (8001398 <HAL_FMC_MspInit+0xd4>)
|
|
800133e: f001 fc73 bl 8002c28 <HAL_GPIO_Init>
|
|
|
|
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
|
|
8001342: 233f movs r3, #63 ; 0x3f
|
|
8001344: 607b str r3, [r7, #4]
|
|
|GPIO_PIN_4|GPIO_PIN_5;
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
|
8001346: 2302 movs r3, #2
|
|
8001348: 60bb str r3, [r7, #8]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
800134a: 2300 movs r3, #0
|
|
800134c: 60fb str r3, [r7, #12]
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
800134e: 2303 movs r3, #3
|
|
8001350: 613b str r3, [r7, #16]
|
|
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
|
|
8001352: 230c movs r3, #12
|
|
8001354: 617b str r3, [r7, #20]
|
|
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
|
|
8001356: 1d3b adds r3, r7, #4
|
|
8001358: 4619 mov r1, r3
|
|
800135a: 4810 ldr r0, [pc, #64] ; (800139c <HAL_FMC_MspInit+0xd8>)
|
|
800135c: f001 fc64 bl 8002c28 <HAL_GPIO_Init>
|
|
|
|
GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11
|
|
8001360: f64f 73b3 movw r3, #65459 ; 0xffb3
|
|
8001364: 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;
|
|
8001366: 2302 movs r3, #2
|
|
8001368: 60bb str r3, [r7, #8]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
800136a: 2300 movs r3, #0
|
|
800136c: 60fb str r3, [r7, #12]
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
800136e: 2303 movs r3, #3
|
|
8001370: 613b str r3, [r7, #16]
|
|
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
|
|
8001372: 230c movs r3, #12
|
|
8001374: 617b str r3, [r7, #20]
|
|
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
|
8001376: 1d3b adds r3, r7, #4
|
|
8001378: 4619 mov r1, r3
|
|
800137a: 4809 ldr r0, [pc, #36] ; (80013a0 <HAL_FMC_MspInit+0xdc>)
|
|
800137c: f001 fc54 bl 8002c28 <HAL_GPIO_Init>
|
|
8001380: e000 b.n 8001384 <HAL_FMC_MspInit+0xc0>
|
|
return;
|
|
8001382: bf00 nop
|
|
|
|
/* USER CODE BEGIN FMC_MspInit 1 */
|
|
|
|
/* USER CODE END FMC_MspInit 1 */
|
|
}
|
|
8001384: 3718 adds r7, #24
|
|
8001386: 46bd mov sp, r7
|
|
8001388: bd80 pop {r7, pc}
|
|
800138a: bf00 nop
|
|
800138c: 20000a4c .word 0x20000a4c
|
|
8001390: 40023800 .word 0x40023800
|
|
8001394: 40021000 .word 0x40021000
|
|
8001398: 40021400 .word 0x40021400
|
|
800139c: 40021800 .word 0x40021800
|
|
80013a0: 40020c00 .word 0x40020c00
|
|
|
|
080013a4 <HAL_SRAM_MspInit>:
|
|
|
|
void HAL_SRAM_MspInit(SRAM_HandleTypeDef* hsram){
|
|
80013a4: b580 push {r7, lr}
|
|
80013a6: b082 sub sp, #8
|
|
80013a8: af00 add r7, sp, #0
|
|
80013aa: 6078 str r0, [r7, #4]
|
|
/* USER CODE BEGIN SRAM_MspInit 0 */
|
|
|
|
/* USER CODE END SRAM_MspInit 0 */
|
|
HAL_FMC_MspInit();
|
|
80013ac: f7ff ff8a bl 80012c4 <HAL_FMC_MspInit>
|
|
/* USER CODE BEGIN SRAM_MspInit 1 */
|
|
|
|
/* USER CODE END SRAM_MspInit 1 */
|
|
}
|
|
80013b0: bf00 nop
|
|
80013b2: 3708 adds r7, #8
|
|
80013b4: 46bd mov sp, r7
|
|
80013b6: bd80 pop {r7, pc}
|
|
|
|
080013b8 <NMI_Handler>:
|
|
/******************************************************************************/
|
|
/**
|
|
* @brief This function handles Non maskable interrupt.
|
|
*/
|
|
void NMI_Handler(void)
|
|
{
|
|
80013b8: b480 push {r7}
|
|
80013ba: 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)
|
|
80013bc: e7fe b.n 80013bc <NMI_Handler+0x4>
|
|
|
|
080013be <HardFault_Handler>:
|
|
|
|
/**
|
|
* @brief This function handles Hard fault interrupt.
|
|
*/
|
|
void HardFault_Handler(void)
|
|
{
|
|
80013be: b480 push {r7}
|
|
80013c0: af00 add r7, sp, #0
|
|
/* USER CODE BEGIN HardFault_IRQn 0 */
|
|
|
|
/* USER CODE END HardFault_IRQn 0 */
|
|
while (1)
|
|
80013c2: e7fe b.n 80013c2 <HardFault_Handler+0x4>
|
|
|
|
080013c4 <MemManage_Handler>:
|
|
|
|
/**
|
|
* @brief This function handles Memory management fault.
|
|
*/
|
|
void MemManage_Handler(void)
|
|
{
|
|
80013c4: b480 push {r7}
|
|
80013c6: af00 add r7, sp, #0
|
|
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
|
|
|
|
/* USER CODE END MemoryManagement_IRQn 0 */
|
|
while (1)
|
|
80013c8: e7fe b.n 80013c8 <MemManage_Handler+0x4>
|
|
|
|
080013ca <BusFault_Handler>:
|
|
|
|
/**
|
|
* @brief This function handles Pre-fetch fault, memory access fault.
|
|
*/
|
|
void BusFault_Handler(void)
|
|
{
|
|
80013ca: b480 push {r7}
|
|
80013cc: af00 add r7, sp, #0
|
|
/* USER CODE BEGIN BusFault_IRQn 0 */
|
|
|
|
/* USER CODE END BusFault_IRQn 0 */
|
|
while (1)
|
|
80013ce: e7fe b.n 80013ce <BusFault_Handler+0x4>
|
|
|
|
080013d0 <UsageFault_Handler>:
|
|
|
|
/**
|
|
* @brief This function handles Undefined instruction or illegal state.
|
|
*/
|
|
void UsageFault_Handler(void)
|
|
{
|
|
80013d0: b480 push {r7}
|
|
80013d2: af00 add r7, sp, #0
|
|
/* USER CODE BEGIN UsageFault_IRQn 0 */
|
|
|
|
/* USER CODE END UsageFault_IRQn 0 */
|
|
while (1)
|
|
80013d4: e7fe b.n 80013d4 <UsageFault_Handler+0x4>
|
|
|
|
080013d6 <SVC_Handler>:
|
|
|
|
/**
|
|
* @brief This function handles System service call via SWI instruction.
|
|
*/
|
|
void SVC_Handler(void)
|
|
{
|
|
80013d6: b480 push {r7}
|
|
80013d8: af00 add r7, sp, #0
|
|
|
|
/* USER CODE END SVCall_IRQn 0 */
|
|
/* USER CODE BEGIN SVCall_IRQn 1 */
|
|
|
|
/* USER CODE END SVCall_IRQn 1 */
|
|
}
|
|
80013da: bf00 nop
|
|
80013dc: 46bd mov sp, r7
|
|
80013de: f85d 7b04 ldr.w r7, [sp], #4
|
|
80013e2: 4770 bx lr
|
|
|
|
080013e4 <DebugMon_Handler>:
|
|
|
|
/**
|
|
* @brief This function handles Debug monitor.
|
|
*/
|
|
void DebugMon_Handler(void)
|
|
{
|
|
80013e4: b480 push {r7}
|
|
80013e6: af00 add r7, sp, #0
|
|
|
|
/* USER CODE END DebugMonitor_IRQn 0 */
|
|
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
|
|
|
|
/* USER CODE END DebugMonitor_IRQn 1 */
|
|
}
|
|
80013e8: bf00 nop
|
|
80013ea: 46bd mov sp, r7
|
|
80013ec: f85d 7b04 ldr.w r7, [sp], #4
|
|
80013f0: 4770 bx lr
|
|
|
|
080013f2 <PendSV_Handler>:
|
|
|
|
/**
|
|
* @brief This function handles Pendable request for system service.
|
|
*/
|
|
void PendSV_Handler(void)
|
|
{
|
|
80013f2: b480 push {r7}
|
|
80013f4: af00 add r7, sp, #0
|
|
|
|
/* USER CODE END PendSV_IRQn 0 */
|
|
/* USER CODE BEGIN PendSV_IRQn 1 */
|
|
|
|
/* USER CODE END PendSV_IRQn 1 */
|
|
}
|
|
80013f6: bf00 nop
|
|
80013f8: 46bd mov sp, r7
|
|
80013fa: f85d 7b04 ldr.w r7, [sp], #4
|
|
80013fe: 4770 bx lr
|
|
|
|
08001400 <SysTick_Handler>:
|
|
|
|
/**
|
|
* @brief This function handles System tick timer.
|
|
*/
|
|
void SysTick_Handler(void)
|
|
{
|
|
8001400: b580 push {r7, lr}
|
|
8001402: af00 add r7, sp, #0
|
|
/* USER CODE BEGIN SysTick_IRQn 0 */
|
|
|
|
/* USER CODE END SysTick_IRQn 0 */
|
|
HAL_IncTick();
|
|
8001404: f000 f9f0 bl 80017e8 <HAL_IncTick>
|
|
/* USER CODE BEGIN SysTick_IRQn 1 */
|
|
|
|
/* USER CODE END SysTick_IRQn 1 */
|
|
}
|
|
8001408: bf00 nop
|
|
800140a: bd80 pop {r7, pc}
|
|
|
|
0800140c <SystemInit>:
|
|
* configuration.
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
void SystemInit(void)
|
|
{
|
|
800140c: b480 push {r7}
|
|
800140e: 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 */
|
|
8001410: 4b06 ldr r3, [pc, #24] ; (800142c <SystemInit+0x20>)
|
|
8001412: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
|
|
8001416: 4a05 ldr r2, [pc, #20] ; (800142c <SystemInit+0x20>)
|
|
8001418: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000
|
|
800141c: 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 */
|
|
}
|
|
8001420: bf00 nop
|
|
8001422: 46bd mov sp, r7
|
|
8001424: f85d 7b04 ldr.w r7, [sp], #4
|
|
8001428: 4770 bx lr
|
|
800142a: bf00 nop
|
|
800142c: e000ed00 .word 0xe000ed00
|
|
|
|
08001430 <Reset_Handler>:
|
|
|
|
.section .text.Reset_Handler
|
|
.weak Reset_Handler
|
|
.type Reset_Handler, %function
|
|
Reset_Handler:
|
|
ldr r0, =_estack
|
|
8001430: 480d ldr r0, [pc, #52] ; (8001468 <LoopForever+0x2>)
|
|
mov sp, r0 /* set stack pointer */
|
|
8001432: 4685 mov sp, r0
|
|
/* Call the clock system initialization function.*/
|
|
bl SystemInit
|
|
8001434: f7ff ffea bl 800140c <SystemInit>
|
|
|
|
/* Copy the data segment initializers from flash to SRAM */
|
|
ldr r0, =_sdata
|
|
8001438: 480c ldr r0, [pc, #48] ; (800146c <LoopForever+0x6>)
|
|
ldr r1, =_edata
|
|
800143a: 490d ldr r1, [pc, #52] ; (8001470 <LoopForever+0xa>)
|
|
ldr r2, =_sidata
|
|
800143c: 4a0d ldr r2, [pc, #52] ; (8001474 <LoopForever+0xe>)
|
|
movs r3, #0
|
|
800143e: 2300 movs r3, #0
|
|
b LoopCopyDataInit
|
|
8001440: e002 b.n 8001448 <LoopCopyDataInit>
|
|
|
|
08001442 <CopyDataInit>:
|
|
|
|
CopyDataInit:
|
|
ldr r4, [r2, r3]
|
|
8001442: 58d4 ldr r4, [r2, r3]
|
|
str r4, [r0, r3]
|
|
8001444: 50c4 str r4, [r0, r3]
|
|
adds r3, r3, #4
|
|
8001446: 3304 adds r3, #4
|
|
|
|
08001448 <LoopCopyDataInit>:
|
|
|
|
LoopCopyDataInit:
|
|
adds r4, r0, r3
|
|
8001448: 18c4 adds r4, r0, r3
|
|
cmp r4, r1
|
|
800144a: 428c cmp r4, r1
|
|
bcc CopyDataInit
|
|
800144c: d3f9 bcc.n 8001442 <CopyDataInit>
|
|
|
|
/* Zero fill the bss segment. */
|
|
ldr r2, =_sbss
|
|
800144e: 4a0a ldr r2, [pc, #40] ; (8001478 <LoopForever+0x12>)
|
|
ldr r4, =_ebss
|
|
8001450: 4c0a ldr r4, [pc, #40] ; (800147c <LoopForever+0x16>)
|
|
movs r3, #0
|
|
8001452: 2300 movs r3, #0
|
|
b LoopFillZerobss
|
|
8001454: e001 b.n 800145a <LoopFillZerobss>
|
|
|
|
08001456 <FillZerobss>:
|
|
|
|
FillZerobss:
|
|
str r3, [r2]
|
|
8001456: 6013 str r3, [r2, #0]
|
|
adds r2, r2, #4
|
|
8001458: 3204 adds r2, #4
|
|
|
|
0800145a <LoopFillZerobss>:
|
|
|
|
LoopFillZerobss:
|
|
cmp r2, r4
|
|
800145a: 42a2 cmp r2, r4
|
|
bcc FillZerobss
|
|
800145c: d3fb bcc.n 8001456 <FillZerobss>
|
|
|
|
/* Call static constructors */
|
|
bl __libc_init_array
|
|
800145e: f00e ffe7 bl 8010430 <__libc_init_array>
|
|
/* Call the application's entry point.*/
|
|
bl main
|
|
8001462: f7ff fd33 bl 8000ecc <main>
|
|
|
|
08001466 <LoopForever>:
|
|
|
|
LoopForever:
|
|
b LoopForever
|
|
8001466: e7fe b.n 8001466 <LoopForever>
|
|
ldr r0, =_estack
|
|
8001468: 20030000 .word 0x20030000
|
|
ldr r0, =_sdata
|
|
800146c: 20000000 .word 0x20000000
|
|
ldr r1, =_edata
|
|
8001470: 200009e0 .word 0x200009e0
|
|
ldr r2, =_sidata
|
|
8001474: 08018300 .word 0x08018300
|
|
ldr r2, =_sbss
|
|
8001478: 200009e0 .word 0x200009e0
|
|
ldr r4, =_ebss
|
|
800147c: 20008dd0 .word 0x20008dd0
|
|
|
|
08001480 <ADC_IRQHandler>:
|
|
* @retval : None
|
|
*/
|
|
.section .text.Default_Handler,"ax",%progbits
|
|
Default_Handler:
|
|
Infinite_Loop:
|
|
b Infinite_Loop
|
|
8001480: e7fe b.n 8001480 <ADC_IRQHandler>
|
|
|
|
08001482 <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)
|
|
{
|
|
8001482: b480 push {r7}
|
|
8001484: b083 sub sp, #12
|
|
8001486: af00 add r7, sp, #0
|
|
8001488: 6078 str r0, [r7, #4]
|
|
800148a: 6039 str r1, [r7, #0]
|
|
if(!pObj || !ioctx->ReadReg || !ioctx->WriteReg || !ioctx->GetTick)
|
|
800148c: 687b ldr r3, [r7, #4]
|
|
800148e: 2b00 cmp r3, #0
|
|
8001490: d00b beq.n 80014aa <DP83848_RegisterBusIO+0x28>
|
|
8001492: 683b ldr r3, [r7, #0]
|
|
8001494: 68db ldr r3, [r3, #12]
|
|
8001496: 2b00 cmp r3, #0
|
|
8001498: d007 beq.n 80014aa <DP83848_RegisterBusIO+0x28>
|
|
800149a: 683b ldr r3, [r7, #0]
|
|
800149c: 689b ldr r3, [r3, #8]
|
|
800149e: 2b00 cmp r3, #0
|
|
80014a0: d003 beq.n 80014aa <DP83848_RegisterBusIO+0x28>
|
|
80014a2: 683b ldr r3, [r7, #0]
|
|
80014a4: 691b ldr r3, [r3, #16]
|
|
80014a6: 2b00 cmp r3, #0
|
|
80014a8: d102 bne.n 80014b0 <DP83848_RegisterBusIO+0x2e>
|
|
{
|
|
return DP83848_STATUS_ERROR;
|
|
80014aa: f04f 33ff mov.w r3, #4294967295
|
|
80014ae: e014 b.n 80014da <DP83848_RegisterBusIO+0x58>
|
|
}
|
|
|
|
pObj->IO.Init = ioctx->Init;
|
|
80014b0: 683b ldr r3, [r7, #0]
|
|
80014b2: 681a ldr r2, [r3, #0]
|
|
80014b4: 687b ldr r3, [r7, #4]
|
|
80014b6: 609a str r2, [r3, #8]
|
|
pObj->IO.DeInit = ioctx->DeInit;
|
|
80014b8: 683b ldr r3, [r7, #0]
|
|
80014ba: 685a ldr r2, [r3, #4]
|
|
80014bc: 687b ldr r3, [r7, #4]
|
|
80014be: 60da str r2, [r3, #12]
|
|
pObj->IO.ReadReg = ioctx->ReadReg;
|
|
80014c0: 683b ldr r3, [r7, #0]
|
|
80014c2: 68da ldr r2, [r3, #12]
|
|
80014c4: 687b ldr r3, [r7, #4]
|
|
80014c6: 615a str r2, [r3, #20]
|
|
pObj->IO.WriteReg = ioctx->WriteReg;
|
|
80014c8: 683b ldr r3, [r7, #0]
|
|
80014ca: 689a ldr r2, [r3, #8]
|
|
80014cc: 687b ldr r3, [r7, #4]
|
|
80014ce: 611a str r2, [r3, #16]
|
|
pObj->IO.GetTick = ioctx->GetTick;
|
|
80014d0: 683b ldr r3, [r7, #0]
|
|
80014d2: 691a ldr r2, [r3, #16]
|
|
80014d4: 687b ldr r3, [r7, #4]
|
|
80014d6: 619a str r2, [r3, #24]
|
|
|
|
return DP83848_STATUS_OK;
|
|
80014d8: 2300 movs r3, #0
|
|
}
|
|
80014da: 4618 mov r0, r3
|
|
80014dc: 370c adds r7, #12
|
|
80014de: 46bd mov sp, r7
|
|
80014e0: f85d 7b04 ldr.w r7, [sp], #4
|
|
80014e4: 4770 bx lr
|
|
|
|
080014e6 <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)
|
|
{
|
|
80014e6: b580 push {r7, lr}
|
|
80014e8: b086 sub sp, #24
|
|
80014ea: af00 add r7, sp, #0
|
|
80014ec: 6078 str r0, [r7, #4]
|
|
uint32_t tickstart = 0, regvalue = 0, addr = 0;
|
|
80014ee: 2300 movs r3, #0
|
|
80014f0: 60fb str r3, [r7, #12]
|
|
80014f2: 2300 movs r3, #0
|
|
80014f4: 60bb str r3, [r7, #8]
|
|
80014f6: 2300 movs r3, #0
|
|
80014f8: 617b str r3, [r7, #20]
|
|
int32_t status = DP83848_STATUS_OK;
|
|
80014fa: 2300 movs r3, #0
|
|
80014fc: 613b str r3, [r7, #16]
|
|
|
|
if(pObj->Is_Initialized == 0)
|
|
80014fe: 687b ldr r3, [r7, #4]
|
|
8001500: 685b ldr r3, [r3, #4]
|
|
8001502: 2b00 cmp r3, #0
|
|
8001504: d17c bne.n 8001600 <DP83848_Init+0x11a>
|
|
{
|
|
if(pObj->IO.Init != 0)
|
|
8001506: 687b ldr r3, [r7, #4]
|
|
8001508: 689b ldr r3, [r3, #8]
|
|
800150a: 2b00 cmp r3, #0
|
|
800150c: d002 beq.n 8001514 <DP83848_Init+0x2e>
|
|
{
|
|
/* GPIO and Clocks initialization */
|
|
pObj->IO.Init();
|
|
800150e: 687b ldr r3, [r7, #4]
|
|
8001510: 689b ldr r3, [r3, #8]
|
|
8001512: 4798 blx r3
|
|
}
|
|
|
|
/* for later check */
|
|
pObj->DevAddr = DP83848_MAX_DEV_ADDR + 1;
|
|
8001514: 687b ldr r3, [r7, #4]
|
|
8001516: 2220 movs r2, #32
|
|
8001518: 601a str r2, [r3, #0]
|
|
|
|
/* Get the device address from special mode register */
|
|
for(addr = 0; addr <= DP83848_MAX_DEV_ADDR; addr ++)
|
|
800151a: 2300 movs r3, #0
|
|
800151c: 617b str r3, [r7, #20]
|
|
800151e: e01c b.n 800155a <DP83848_Init+0x74>
|
|
{
|
|
if(pObj->IO.ReadReg(addr, DP83848_SMR, ®value) < 0)
|
|
8001520: 687b ldr r3, [r7, #4]
|
|
8001522: 695b ldr r3, [r3, #20]
|
|
8001524: f107 0208 add.w r2, r7, #8
|
|
8001528: 2119 movs r1, #25
|
|
800152a: 6978 ldr r0, [r7, #20]
|
|
800152c: 4798 blx r3
|
|
800152e: 4603 mov r3, r0
|
|
8001530: 2b00 cmp r3, #0
|
|
8001532: da03 bge.n 800153c <DP83848_Init+0x56>
|
|
{
|
|
status = DP83848_STATUS_READ_ERROR;
|
|
8001534: f06f 0304 mvn.w r3, #4
|
|
8001538: 613b str r3, [r7, #16]
|
|
/* Can't read from this device address
|
|
continue with next address */
|
|
continue;
|
|
800153a: e00b b.n 8001554 <DP83848_Init+0x6e>
|
|
}
|
|
|
|
if((regvalue & DP83848_SMR_PHY_ADDR) == addr)
|
|
800153c: 68bb ldr r3, [r7, #8]
|
|
800153e: f003 031f and.w r3, r3, #31
|
|
8001542: 697a ldr r2, [r7, #20]
|
|
8001544: 429a cmp r2, r3
|
|
8001546: d105 bne.n 8001554 <DP83848_Init+0x6e>
|
|
{
|
|
pObj->DevAddr = addr;
|
|
8001548: 687b ldr r3, [r7, #4]
|
|
800154a: 697a ldr r2, [r7, #20]
|
|
800154c: 601a str r2, [r3, #0]
|
|
status = DP83848_STATUS_OK;
|
|
800154e: 2300 movs r3, #0
|
|
8001550: 613b str r3, [r7, #16]
|
|
break;
|
|
8001552: e005 b.n 8001560 <DP83848_Init+0x7a>
|
|
for(addr = 0; addr <= DP83848_MAX_DEV_ADDR; addr ++)
|
|
8001554: 697b ldr r3, [r7, #20]
|
|
8001556: 3301 adds r3, #1
|
|
8001558: 617b str r3, [r7, #20]
|
|
800155a: 697b ldr r3, [r7, #20]
|
|
800155c: 2b1f cmp r3, #31
|
|
800155e: d9df bls.n 8001520 <DP83848_Init+0x3a>
|
|
}
|
|
}
|
|
|
|
if(pObj->DevAddr > DP83848_MAX_DEV_ADDR)
|
|
8001560: 687b ldr r3, [r7, #4]
|
|
8001562: 681b ldr r3, [r3, #0]
|
|
8001564: 2b1f cmp r3, #31
|
|
8001566: d902 bls.n 800156e <DP83848_Init+0x88>
|
|
{
|
|
status = DP83848_STATUS_ADDRESS_ERROR;
|
|
8001568: f06f 0302 mvn.w r3, #2
|
|
800156c: 613b str r3, [r7, #16]
|
|
}
|
|
|
|
/* if device address is matched */
|
|
if(status == DP83848_STATUS_OK)
|
|
800156e: 693b ldr r3, [r7, #16]
|
|
8001570: 2b00 cmp r3, #0
|
|
8001572: d145 bne.n 8001600 <DP83848_Init+0x11a>
|
|
{
|
|
/* set a software reset */
|
|
if(pObj->IO.WriteReg(pObj->DevAddr, DP83848_BCR, DP83848_BCR_SOFT_RESET) >= 0)
|
|
8001574: 687b ldr r3, [r7, #4]
|
|
8001576: 691b ldr r3, [r3, #16]
|
|
8001578: 687a ldr r2, [r7, #4]
|
|
800157a: 6810 ldr r0, [r2, #0]
|
|
800157c: f44f 4200 mov.w r2, #32768 ; 0x8000
|
|
8001580: 2100 movs r1, #0
|
|
8001582: 4798 blx r3
|
|
8001584: 4603 mov r3, r0
|
|
8001586: 2b00 cmp r3, #0
|
|
8001588: db37 blt.n 80015fa <DP83848_Init+0x114>
|
|
{
|
|
/* get software reset status */
|
|
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BCR, ®value) >= 0)
|
|
800158a: 687b ldr r3, [r7, #4]
|
|
800158c: 695b ldr r3, [r3, #20]
|
|
800158e: 687a ldr r2, [r7, #4]
|
|
8001590: 6810 ldr r0, [r2, #0]
|
|
8001592: f107 0208 add.w r2, r7, #8
|
|
8001596: 2100 movs r1, #0
|
|
8001598: 4798 blx r3
|
|
800159a: 4603 mov r3, r0
|
|
800159c: 2b00 cmp r3, #0
|
|
800159e: db28 blt.n 80015f2 <DP83848_Init+0x10c>
|
|
{
|
|
tickstart = pObj->IO.GetTick();
|
|
80015a0: 687b ldr r3, [r7, #4]
|
|
80015a2: 699b ldr r3, [r3, #24]
|
|
80015a4: 4798 blx r3
|
|
80015a6: 4603 mov r3, r0
|
|
80015a8: 60fb str r3, [r7, #12]
|
|
|
|
/* wait until software reset is done or timeout occured */
|
|
while(regvalue & DP83848_BCR_SOFT_RESET)
|
|
80015aa: e01c b.n 80015e6 <DP83848_Init+0x100>
|
|
{
|
|
if((pObj->IO.GetTick() - tickstart) <= DP83848_SW_RESET_TO)
|
|
80015ac: 687b ldr r3, [r7, #4]
|
|
80015ae: 699b ldr r3, [r3, #24]
|
|
80015b0: 4798 blx r3
|
|
80015b2: 4603 mov r3, r0
|
|
80015b4: 461a mov r2, r3
|
|
80015b6: 68fb ldr r3, [r7, #12]
|
|
80015b8: 1ad3 subs r3, r2, r3
|
|
80015ba: f5b3 7ffa cmp.w r3, #500 ; 0x1f4
|
|
80015be: d80e bhi.n 80015de <DP83848_Init+0xf8>
|
|
{
|
|
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BCR, ®value) < 0)
|
|
80015c0: 687b ldr r3, [r7, #4]
|
|
80015c2: 695b ldr r3, [r3, #20]
|
|
80015c4: 687a ldr r2, [r7, #4]
|
|
80015c6: 6810 ldr r0, [r2, #0]
|
|
80015c8: f107 0208 add.w r2, r7, #8
|
|
80015cc: 2100 movs r1, #0
|
|
80015ce: 4798 blx r3
|
|
80015d0: 4603 mov r3, r0
|
|
80015d2: 2b00 cmp r3, #0
|
|
80015d4: da07 bge.n 80015e6 <DP83848_Init+0x100>
|
|
{
|
|
status = DP83848_STATUS_READ_ERROR;
|
|
80015d6: f06f 0304 mvn.w r3, #4
|
|
80015da: 613b str r3, [r7, #16]
|
|
break;
|
|
80015dc: e010 b.n 8001600 <DP83848_Init+0x11a>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
status = DP83848_STATUS_RESET_TIMEOUT;
|
|
80015de: f06f 0301 mvn.w r3, #1
|
|
80015e2: 613b str r3, [r7, #16]
|
|
break;
|
|
80015e4: e00c b.n 8001600 <DP83848_Init+0x11a>
|
|
while(regvalue & DP83848_BCR_SOFT_RESET)
|
|
80015e6: 68bb ldr r3, [r7, #8]
|
|
80015e8: f403 4300 and.w r3, r3, #32768 ; 0x8000
|
|
80015ec: 2b00 cmp r3, #0
|
|
80015ee: d1dd bne.n 80015ac <DP83848_Init+0xc6>
|
|
80015f0: e006 b.n 8001600 <DP83848_Init+0x11a>
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
status = DP83848_STATUS_READ_ERROR;
|
|
80015f2: f06f 0304 mvn.w r3, #4
|
|
80015f6: 613b str r3, [r7, #16]
|
|
80015f8: e002 b.n 8001600 <DP83848_Init+0x11a>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
status = DP83848_STATUS_WRITE_ERROR;
|
|
80015fa: f06f 0303 mvn.w r3, #3
|
|
80015fe: 613b str r3, [r7, #16]
|
|
}
|
|
}
|
|
}
|
|
|
|
if(status == DP83848_STATUS_OK)
|
|
8001600: 693b ldr r3, [r7, #16]
|
|
8001602: 2b00 cmp r3, #0
|
|
8001604: d112 bne.n 800162c <DP83848_Init+0x146>
|
|
{
|
|
tickstart = pObj->IO.GetTick();
|
|
8001606: 687b ldr r3, [r7, #4]
|
|
8001608: 699b ldr r3, [r3, #24]
|
|
800160a: 4798 blx r3
|
|
800160c: 4603 mov r3, r0
|
|
800160e: 60fb str r3, [r7, #12]
|
|
|
|
/* Wait for 2s to perform initialization */
|
|
while((pObj->IO.GetTick() - tickstart) <= DP83848_INIT_TO)
|
|
8001610: bf00 nop
|
|
8001612: 687b ldr r3, [r7, #4]
|
|
8001614: 699b ldr r3, [r3, #24]
|
|
8001616: 4798 blx r3
|
|
8001618: 4603 mov r3, r0
|
|
800161a: 461a mov r2, r3
|
|
800161c: 68fb ldr r3, [r7, #12]
|
|
800161e: 1ad3 subs r3, r2, r3
|
|
8001620: f5b3 6ffa cmp.w r3, #2000 ; 0x7d0
|
|
8001624: d9f5 bls.n 8001612 <DP83848_Init+0x12c>
|
|
{
|
|
}
|
|
pObj->Is_Initialized = 1;
|
|
8001626: 687b ldr r3, [r7, #4]
|
|
8001628: 2201 movs r2, #1
|
|
800162a: 605a str r2, [r3, #4]
|
|
}
|
|
|
|
return status;
|
|
800162c: 693b ldr r3, [r7, #16]
|
|
}
|
|
800162e: 4618 mov r0, r3
|
|
8001630: 3718 adds r7, #24
|
|
8001632: 46bd mov sp, r7
|
|
8001634: bd80 pop {r7, pc}
|
|
|
|
08001636 <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)
|
|
{
|
|
8001636: b580 push {r7, lr}
|
|
8001638: b084 sub sp, #16
|
|
800163a: af00 add r7, sp, #0
|
|
800163c: 6078 str r0, [r7, #4]
|
|
uint32_t readval = 0;
|
|
800163e: 2300 movs r3, #0
|
|
8001640: 60fb str r3, [r7, #12]
|
|
|
|
/* Read Status register */
|
|
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BSR, &readval) < 0)
|
|
8001642: 687b ldr r3, [r7, #4]
|
|
8001644: 695b ldr r3, [r3, #20]
|
|
8001646: 687a ldr r2, [r7, #4]
|
|
8001648: 6810 ldr r0, [r2, #0]
|
|
800164a: f107 020c add.w r2, r7, #12
|
|
800164e: 2101 movs r1, #1
|
|
8001650: 4798 blx r3
|
|
8001652: 4603 mov r3, r0
|
|
8001654: 2b00 cmp r3, #0
|
|
8001656: da02 bge.n 800165e <DP83848_GetLinkState+0x28>
|
|
{
|
|
return DP83848_STATUS_READ_ERROR;
|
|
8001658: f06f 0304 mvn.w r3, #4
|
|
800165c: e06e b.n 800173c <DP83848_GetLinkState+0x106>
|
|
}
|
|
|
|
/* Read Status register again */
|
|
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BSR, &readval) < 0)
|
|
800165e: 687b ldr r3, [r7, #4]
|
|
8001660: 695b ldr r3, [r3, #20]
|
|
8001662: 687a ldr r2, [r7, #4]
|
|
8001664: 6810 ldr r0, [r2, #0]
|
|
8001666: f107 020c add.w r2, r7, #12
|
|
800166a: 2101 movs r1, #1
|
|
800166c: 4798 blx r3
|
|
800166e: 4603 mov r3, r0
|
|
8001670: 2b00 cmp r3, #0
|
|
8001672: da02 bge.n 800167a <DP83848_GetLinkState+0x44>
|
|
{
|
|
return DP83848_STATUS_READ_ERROR;
|
|
8001674: f06f 0304 mvn.w r3, #4
|
|
8001678: e060 b.n 800173c <DP83848_GetLinkState+0x106>
|
|
}
|
|
|
|
if((readval & DP83848_BSR_LINK_STATUS) == 0)
|
|
800167a: 68fb ldr r3, [r7, #12]
|
|
800167c: f003 0304 and.w r3, r3, #4
|
|
8001680: 2b00 cmp r3, #0
|
|
8001682: d101 bne.n 8001688 <DP83848_GetLinkState+0x52>
|
|
{
|
|
/* Return Link Down status */
|
|
return DP83848_STATUS_LINK_DOWN;
|
|
8001684: 2301 movs r3, #1
|
|
8001686: e059 b.n 800173c <DP83848_GetLinkState+0x106>
|
|
}
|
|
|
|
/* Check Auto negotiaition */
|
|
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BCR, &readval) < 0)
|
|
8001688: 687b ldr r3, [r7, #4]
|
|
800168a: 695b ldr r3, [r3, #20]
|
|
800168c: 687a ldr r2, [r7, #4]
|
|
800168e: 6810 ldr r0, [r2, #0]
|
|
8001690: f107 020c add.w r2, r7, #12
|
|
8001694: 2100 movs r1, #0
|
|
8001696: 4798 blx r3
|
|
8001698: 4603 mov r3, r0
|
|
800169a: 2b00 cmp r3, #0
|
|
800169c: da02 bge.n 80016a4 <DP83848_GetLinkState+0x6e>
|
|
{
|
|
return DP83848_STATUS_READ_ERROR;
|
|
800169e: f06f 0304 mvn.w r3, #4
|
|
80016a2: e04b b.n 800173c <DP83848_GetLinkState+0x106>
|
|
}
|
|
|
|
if((readval & DP83848_BCR_AUTONEGO_EN) != DP83848_BCR_AUTONEGO_EN)
|
|
80016a4: 68fb ldr r3, [r7, #12]
|
|
80016a6: f403 5380 and.w r3, r3, #4096 ; 0x1000
|
|
80016aa: 2b00 cmp r3, #0
|
|
80016ac: d11b bne.n 80016e6 <DP83848_GetLinkState+0xb0>
|
|
{
|
|
if(((readval & DP83848_BCR_SPEED_SELECT) == DP83848_BCR_SPEED_SELECT) && ((readval & DP83848_BCR_DUPLEX_MODE) == DP83848_BCR_DUPLEX_MODE))
|
|
80016ae: 68fb ldr r3, [r7, #12]
|
|
80016b0: f403 5300 and.w r3, r3, #8192 ; 0x2000
|
|
80016b4: 2b00 cmp r3, #0
|
|
80016b6: d006 beq.n 80016c6 <DP83848_GetLinkState+0x90>
|
|
80016b8: 68fb ldr r3, [r7, #12]
|
|
80016ba: f403 7380 and.w r3, r3, #256 ; 0x100
|
|
80016be: 2b00 cmp r3, #0
|
|
80016c0: d001 beq.n 80016c6 <DP83848_GetLinkState+0x90>
|
|
{
|
|
return DP83848_STATUS_100MBITS_FULLDUPLEX;
|
|
80016c2: 2302 movs r3, #2
|
|
80016c4: e03a b.n 800173c <DP83848_GetLinkState+0x106>
|
|
}
|
|
else if ((readval & DP83848_BCR_SPEED_SELECT) == DP83848_BCR_SPEED_SELECT)
|
|
80016c6: 68fb ldr r3, [r7, #12]
|
|
80016c8: f403 5300 and.w r3, r3, #8192 ; 0x2000
|
|
80016cc: 2b00 cmp r3, #0
|
|
80016ce: d001 beq.n 80016d4 <DP83848_GetLinkState+0x9e>
|
|
{
|
|
return DP83848_STATUS_100MBITS_HALFDUPLEX;
|
|
80016d0: 2303 movs r3, #3
|
|
80016d2: e033 b.n 800173c <DP83848_GetLinkState+0x106>
|
|
}
|
|
else if ((readval & DP83848_BCR_DUPLEX_MODE) == DP83848_BCR_DUPLEX_MODE)
|
|
80016d4: 68fb ldr r3, [r7, #12]
|
|
80016d6: f403 7380 and.w r3, r3, #256 ; 0x100
|
|
80016da: 2b00 cmp r3, #0
|
|
80016dc: d001 beq.n 80016e2 <DP83848_GetLinkState+0xac>
|
|
{
|
|
return DP83848_STATUS_10MBITS_FULLDUPLEX;
|
|
80016de: 2304 movs r3, #4
|
|
80016e0: e02c b.n 800173c <DP83848_GetLinkState+0x106>
|
|
}
|
|
else
|
|
{
|
|
return DP83848_STATUS_10MBITS_HALFDUPLEX;
|
|
80016e2: 2305 movs r3, #5
|
|
80016e4: e02a b.n 800173c <DP83848_GetLinkState+0x106>
|
|
}
|
|
}
|
|
else /* Auto Nego enabled */
|
|
{
|
|
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_PHYSCSR, &readval) < 0)
|
|
80016e6: 687b ldr r3, [r7, #4]
|
|
80016e8: 695b ldr r3, [r3, #20]
|
|
80016ea: 687a ldr r2, [r7, #4]
|
|
80016ec: 6810 ldr r0, [r2, #0]
|
|
80016ee: f107 020c add.w r2, r7, #12
|
|
80016f2: 2110 movs r1, #16
|
|
80016f4: 4798 blx r3
|
|
80016f6: 4603 mov r3, r0
|
|
80016f8: 2b00 cmp r3, #0
|
|
80016fa: da02 bge.n 8001702 <DP83848_GetLinkState+0xcc>
|
|
{
|
|
return DP83848_STATUS_READ_ERROR;
|
|
80016fc: f06f 0304 mvn.w r3, #4
|
|
8001700: e01c b.n 800173c <DP83848_GetLinkState+0x106>
|
|
}
|
|
|
|
/* Check if auto nego not done */
|
|
if((readval & DP83848_PHYSCSR_AUTONEGO_DONE) == 0)
|
|
8001702: 68fb ldr r3, [r7, #12]
|
|
8001704: f403 7380 and.w r3, r3, #256 ; 0x100
|
|
8001708: 2b00 cmp r3, #0
|
|
800170a: d101 bne.n 8001710 <DP83848_GetLinkState+0xda>
|
|
{
|
|
return DP83848_STATUS_AUTONEGO_NOTDONE;
|
|
800170c: 2306 movs r3, #6
|
|
800170e: e015 b.n 800173c <DP83848_GetLinkState+0x106>
|
|
}
|
|
|
|
if((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_100BTX_FD)
|
|
8001710: 68fb ldr r3, [r7, #12]
|
|
8001712: f003 0306 and.w r3, r3, #6
|
|
8001716: 2b04 cmp r3, #4
|
|
8001718: d101 bne.n 800171e <DP83848_GetLinkState+0xe8>
|
|
{
|
|
return DP83848_STATUS_100MBITS_FULLDUPLEX;
|
|
800171a: 2302 movs r3, #2
|
|
800171c: e00e b.n 800173c <DP83848_GetLinkState+0x106>
|
|
}
|
|
else if ((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_100BTX_HD)
|
|
800171e: 68fb ldr r3, [r7, #12]
|
|
8001720: f003 0306 and.w r3, r3, #6
|
|
8001724: 2b00 cmp r3, #0
|
|
8001726: d101 bne.n 800172c <DP83848_GetLinkState+0xf6>
|
|
{
|
|
return DP83848_STATUS_100MBITS_HALFDUPLEX;
|
|
8001728: 2303 movs r3, #3
|
|
800172a: e007 b.n 800173c <DP83848_GetLinkState+0x106>
|
|
}
|
|
else if ((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_10BT_FD)
|
|
800172c: 68fb ldr r3, [r7, #12]
|
|
800172e: f003 0306 and.w r3, r3, #6
|
|
8001732: 2b06 cmp r3, #6
|
|
8001734: d101 bne.n 800173a <DP83848_GetLinkState+0x104>
|
|
{
|
|
return DP83848_STATUS_10MBITS_FULLDUPLEX;
|
|
8001736: 2304 movs r3, #4
|
|
8001738: e000 b.n 800173c <DP83848_GetLinkState+0x106>
|
|
}
|
|
else
|
|
{
|
|
return DP83848_STATUS_10MBITS_HALFDUPLEX;
|
|
800173a: 2305 movs r3, #5
|
|
}
|
|
}
|
|
}
|
|
800173c: 4618 mov r0, r3
|
|
800173e: 3710 adds r7, #16
|
|
8001740: 46bd mov sp, r7
|
|
8001742: bd80 pop {r7, pc}
|
|
|
|
08001744 <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)
|
|
{
|
|
8001744: b580 push {r7, lr}
|
|
8001746: af00 add r7, sp, #0
|
|
/* Configure Flash prefetch, Instruction cache, Data cache */
|
|
#if (INSTRUCTION_CACHE_ENABLE != 0U)
|
|
__HAL_FLASH_INSTRUCTION_CACHE_ENABLE();
|
|
8001748: 4b0e ldr r3, [pc, #56] ; (8001784 <HAL_Init+0x40>)
|
|
800174a: 681b ldr r3, [r3, #0]
|
|
800174c: 4a0d ldr r2, [pc, #52] ; (8001784 <HAL_Init+0x40>)
|
|
800174e: f443 7300 orr.w r3, r3, #512 ; 0x200
|
|
8001752: 6013 str r3, [r2, #0]
|
|
#endif /* INSTRUCTION_CACHE_ENABLE */
|
|
|
|
#if (DATA_CACHE_ENABLE != 0U)
|
|
__HAL_FLASH_DATA_CACHE_ENABLE();
|
|
8001754: 4b0b ldr r3, [pc, #44] ; (8001784 <HAL_Init+0x40>)
|
|
8001756: 681b ldr r3, [r3, #0]
|
|
8001758: 4a0a ldr r2, [pc, #40] ; (8001784 <HAL_Init+0x40>)
|
|
800175a: f443 6380 orr.w r3, r3, #1024 ; 0x400
|
|
800175e: 6013 str r3, [r2, #0]
|
|
#endif /* DATA_CACHE_ENABLE */
|
|
|
|
#if (PREFETCH_ENABLE != 0U)
|
|
__HAL_FLASH_PREFETCH_BUFFER_ENABLE();
|
|
8001760: 4b08 ldr r3, [pc, #32] ; (8001784 <HAL_Init+0x40>)
|
|
8001762: 681b ldr r3, [r3, #0]
|
|
8001764: 4a07 ldr r2, [pc, #28] ; (8001784 <HAL_Init+0x40>)
|
|
8001766: f443 7380 orr.w r3, r3, #256 ; 0x100
|
|
800176a: 6013 str r3, [r2, #0]
|
|
#endif /* PREFETCH_ENABLE */
|
|
|
|
/* Set Interrupt Group Priority */
|
|
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
|
|
800176c: 2003 movs r0, #3
|
|
800176e: f000 f931 bl 80019d4 <HAL_NVIC_SetPriorityGrouping>
|
|
|
|
/* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */
|
|
HAL_InitTick(TICK_INT_PRIORITY);
|
|
8001772: 200f movs r0, #15
|
|
8001774: f000 f808 bl 8001788 <HAL_InitTick>
|
|
|
|
/* Init the low level hardware */
|
|
HAL_MspInit();
|
|
8001778: f7ff fd7c bl 8001274 <HAL_MspInit>
|
|
|
|
/* Return function status */
|
|
return HAL_OK;
|
|
800177c: 2300 movs r3, #0
|
|
}
|
|
800177e: 4618 mov r0, r3
|
|
8001780: bd80 pop {r7, pc}
|
|
8001782: bf00 nop
|
|
8001784: 40023c00 .word 0x40023c00
|
|
|
|
08001788 <HAL_InitTick>:
|
|
* implementation in user file.
|
|
* @param TickPriority Tick interrupt priority.
|
|
* @retval HAL status
|
|
*/
|
|
__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
|
|
{
|
|
8001788: b580 push {r7, lr}
|
|
800178a: b082 sub sp, #8
|
|
800178c: af00 add r7, sp, #0
|
|
800178e: 6078 str r0, [r7, #4]
|
|
/* Configure the SysTick to have interrupt in 1ms time basis*/
|
|
if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U)
|
|
8001790: 4b12 ldr r3, [pc, #72] ; (80017dc <HAL_InitTick+0x54>)
|
|
8001792: 681a ldr r2, [r3, #0]
|
|
8001794: 4b12 ldr r3, [pc, #72] ; (80017e0 <HAL_InitTick+0x58>)
|
|
8001796: 781b ldrb r3, [r3, #0]
|
|
8001798: 4619 mov r1, r3
|
|
800179a: f44f 737a mov.w r3, #1000 ; 0x3e8
|
|
800179e: fbb3 f3f1 udiv r3, r3, r1
|
|
80017a2: fbb2 f3f3 udiv r3, r2, r3
|
|
80017a6: 4618 mov r0, r3
|
|
80017a8: f000 f93b bl 8001a22 <HAL_SYSTICK_Config>
|
|
80017ac: 4603 mov r3, r0
|
|
80017ae: 2b00 cmp r3, #0
|
|
80017b0: d001 beq.n 80017b6 <HAL_InitTick+0x2e>
|
|
{
|
|
return HAL_ERROR;
|
|
80017b2: 2301 movs r3, #1
|
|
80017b4: e00e b.n 80017d4 <HAL_InitTick+0x4c>
|
|
}
|
|
|
|
/* Configure the SysTick IRQ priority */
|
|
if (TickPriority < (1UL << __NVIC_PRIO_BITS))
|
|
80017b6: 687b ldr r3, [r7, #4]
|
|
80017b8: 2b0f cmp r3, #15
|
|
80017ba: d80a bhi.n 80017d2 <HAL_InitTick+0x4a>
|
|
{
|
|
HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U);
|
|
80017bc: 2200 movs r2, #0
|
|
80017be: 6879 ldr r1, [r7, #4]
|
|
80017c0: f04f 30ff mov.w r0, #4294967295
|
|
80017c4: f000 f911 bl 80019ea <HAL_NVIC_SetPriority>
|
|
uwTickPrio = TickPriority;
|
|
80017c8: 4a06 ldr r2, [pc, #24] ; (80017e4 <HAL_InitTick+0x5c>)
|
|
80017ca: 687b ldr r3, [r7, #4]
|
|
80017cc: 6013 str r3, [r2, #0]
|
|
{
|
|
return HAL_ERROR;
|
|
}
|
|
|
|
/* Return function status */
|
|
return HAL_OK;
|
|
80017ce: 2300 movs r3, #0
|
|
80017d0: e000 b.n 80017d4 <HAL_InitTick+0x4c>
|
|
return HAL_ERROR;
|
|
80017d2: 2301 movs r3, #1
|
|
}
|
|
80017d4: 4618 mov r0, r3
|
|
80017d6: 3708 adds r7, #8
|
|
80017d8: 46bd mov sp, r7
|
|
80017da: bd80 pop {r7, pc}
|
|
80017dc: 20000000 .word 0x20000000
|
|
80017e0: 20000008 .word 0x20000008
|
|
80017e4: 20000004 .word 0x20000004
|
|
|
|
080017e8 <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)
|
|
{
|
|
80017e8: b480 push {r7}
|
|
80017ea: af00 add r7, sp, #0
|
|
uwTick += uwTickFreq;
|
|
80017ec: 4b06 ldr r3, [pc, #24] ; (8001808 <HAL_IncTick+0x20>)
|
|
80017ee: 781b ldrb r3, [r3, #0]
|
|
80017f0: 461a mov r2, r3
|
|
80017f2: 4b06 ldr r3, [pc, #24] ; (800180c <HAL_IncTick+0x24>)
|
|
80017f4: 681b ldr r3, [r3, #0]
|
|
80017f6: 4413 add r3, r2
|
|
80017f8: 4a04 ldr r2, [pc, #16] ; (800180c <HAL_IncTick+0x24>)
|
|
80017fa: 6013 str r3, [r2, #0]
|
|
}
|
|
80017fc: bf00 nop
|
|
80017fe: 46bd mov sp, r7
|
|
8001800: f85d 7b04 ldr.w r7, [sp], #4
|
|
8001804: 4770 bx lr
|
|
8001806: bf00 nop
|
|
8001808: 20000008 .word 0x20000008
|
|
800180c: 20000a50 .word 0x20000a50
|
|
|
|
08001810 <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)
|
|
{
|
|
8001810: b480 push {r7}
|
|
8001812: af00 add r7, sp, #0
|
|
return uwTick;
|
|
8001814: 4b03 ldr r3, [pc, #12] ; (8001824 <HAL_GetTick+0x14>)
|
|
8001816: 681b ldr r3, [r3, #0]
|
|
}
|
|
8001818: 4618 mov r0, r3
|
|
800181a: 46bd mov sp, r7
|
|
800181c: f85d 7b04 ldr.w r7, [sp], #4
|
|
8001820: 4770 bx lr
|
|
8001822: bf00 nop
|
|
8001824: 20000a50 .word 0x20000a50
|
|
|
|
08001828 <HAL_Delay>:
|
|
* implementations in user file.
|
|
* @param Delay specifies the delay time length, in milliseconds.
|
|
* @retval None
|
|
*/
|
|
__weak void HAL_Delay(uint32_t Delay)
|
|
{
|
|
8001828: b580 push {r7, lr}
|
|
800182a: b084 sub sp, #16
|
|
800182c: af00 add r7, sp, #0
|
|
800182e: 6078 str r0, [r7, #4]
|
|
uint32_t tickstart = HAL_GetTick();
|
|
8001830: f7ff ffee bl 8001810 <HAL_GetTick>
|
|
8001834: 60b8 str r0, [r7, #8]
|
|
uint32_t wait = Delay;
|
|
8001836: 687b ldr r3, [r7, #4]
|
|
8001838: 60fb str r3, [r7, #12]
|
|
|
|
/* Add a freq to guarantee minimum wait */
|
|
if (wait < HAL_MAX_DELAY)
|
|
800183a: 68fb ldr r3, [r7, #12]
|
|
800183c: f1b3 3fff cmp.w r3, #4294967295
|
|
8001840: d005 beq.n 800184e <HAL_Delay+0x26>
|
|
{
|
|
wait += (uint32_t)(uwTickFreq);
|
|
8001842: 4b0a ldr r3, [pc, #40] ; (800186c <HAL_Delay+0x44>)
|
|
8001844: 781b ldrb r3, [r3, #0]
|
|
8001846: 461a mov r2, r3
|
|
8001848: 68fb ldr r3, [r7, #12]
|
|
800184a: 4413 add r3, r2
|
|
800184c: 60fb str r3, [r7, #12]
|
|
}
|
|
|
|
while((HAL_GetTick() - tickstart) < wait)
|
|
800184e: bf00 nop
|
|
8001850: f7ff ffde bl 8001810 <HAL_GetTick>
|
|
8001854: 4602 mov r2, r0
|
|
8001856: 68bb ldr r3, [r7, #8]
|
|
8001858: 1ad3 subs r3, r2, r3
|
|
800185a: 68fa ldr r2, [r7, #12]
|
|
800185c: 429a cmp r2, r3
|
|
800185e: d8f7 bhi.n 8001850 <HAL_Delay+0x28>
|
|
{
|
|
}
|
|
}
|
|
8001860: bf00 nop
|
|
8001862: bf00 nop
|
|
8001864: 3710 adds r7, #16
|
|
8001866: 46bd mov sp, r7
|
|
8001868: bd80 pop {r7, pc}
|
|
800186a: bf00 nop
|
|
800186c: 20000008 .word 0x20000008
|
|
|
|
08001870 <__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)
|
|
{
|
|
8001870: b480 push {r7}
|
|
8001872: b085 sub sp, #20
|
|
8001874: af00 add r7, sp, #0
|
|
8001876: 6078 str r0, [r7, #4]
|
|
uint32_t reg_value;
|
|
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
|
|
8001878: 687b ldr r3, [r7, #4]
|
|
800187a: f003 0307 and.w r3, r3, #7
|
|
800187e: 60fb str r3, [r7, #12]
|
|
|
|
reg_value = SCB->AIRCR; /* read old register configuration */
|
|
8001880: 4b0c ldr r3, [pc, #48] ; (80018b4 <__NVIC_SetPriorityGrouping+0x44>)
|
|
8001882: 68db ldr r3, [r3, #12]
|
|
8001884: 60bb str r3, [r7, #8]
|
|
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
|
|
8001886: 68ba ldr r2, [r7, #8]
|
|
8001888: f64f 03ff movw r3, #63743 ; 0xf8ff
|
|
800188c: 4013 ands r3, r2
|
|
800188e: 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 */
|
|
8001890: 68fb ldr r3, [r7, #12]
|
|
8001892: 021a lsls r2, r3, #8
|
|
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
|
|
8001894: 68bb ldr r3, [r7, #8]
|
|
8001896: 4313 orrs r3, r2
|
|
reg_value = (reg_value |
|
|
8001898: f043 63bf orr.w r3, r3, #100139008 ; 0x5f80000
|
|
800189c: f443 3300 orr.w r3, r3, #131072 ; 0x20000
|
|
80018a0: 60bb str r3, [r7, #8]
|
|
SCB->AIRCR = reg_value;
|
|
80018a2: 4a04 ldr r2, [pc, #16] ; (80018b4 <__NVIC_SetPriorityGrouping+0x44>)
|
|
80018a4: 68bb ldr r3, [r7, #8]
|
|
80018a6: 60d3 str r3, [r2, #12]
|
|
}
|
|
80018a8: bf00 nop
|
|
80018aa: 3714 adds r7, #20
|
|
80018ac: 46bd mov sp, r7
|
|
80018ae: f85d 7b04 ldr.w r7, [sp], #4
|
|
80018b2: 4770 bx lr
|
|
80018b4: e000ed00 .word 0xe000ed00
|
|
|
|
080018b8 <__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)
|
|
{
|
|
80018b8: b480 push {r7}
|
|
80018ba: af00 add r7, sp, #0
|
|
return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
|
|
80018bc: 4b04 ldr r3, [pc, #16] ; (80018d0 <__NVIC_GetPriorityGrouping+0x18>)
|
|
80018be: 68db ldr r3, [r3, #12]
|
|
80018c0: 0a1b lsrs r3, r3, #8
|
|
80018c2: f003 0307 and.w r3, r3, #7
|
|
}
|
|
80018c6: 4618 mov r0, r3
|
|
80018c8: 46bd mov sp, r7
|
|
80018ca: f85d 7b04 ldr.w r7, [sp], #4
|
|
80018ce: 4770 bx lr
|
|
80018d0: e000ed00 .word 0xe000ed00
|
|
|
|
080018d4 <__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)
|
|
{
|
|
80018d4: b480 push {r7}
|
|
80018d6: b083 sub sp, #12
|
|
80018d8: af00 add r7, sp, #0
|
|
80018da: 4603 mov r3, r0
|
|
80018dc: 6039 str r1, [r7, #0]
|
|
80018de: 71fb strb r3, [r7, #7]
|
|
if ((int32_t)(IRQn) >= 0)
|
|
80018e0: f997 3007 ldrsb.w r3, [r7, #7]
|
|
80018e4: 2b00 cmp r3, #0
|
|
80018e6: db0a blt.n 80018fe <__NVIC_SetPriority+0x2a>
|
|
{
|
|
NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
|
|
80018e8: 683b ldr r3, [r7, #0]
|
|
80018ea: b2da uxtb r2, r3
|
|
80018ec: 490c ldr r1, [pc, #48] ; (8001920 <__NVIC_SetPriority+0x4c>)
|
|
80018ee: f997 3007 ldrsb.w r3, [r7, #7]
|
|
80018f2: 0112 lsls r2, r2, #4
|
|
80018f4: b2d2 uxtb r2, r2
|
|
80018f6: 440b add r3, r1
|
|
80018f8: 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);
|
|
}
|
|
}
|
|
80018fc: e00a b.n 8001914 <__NVIC_SetPriority+0x40>
|
|
SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
|
|
80018fe: 683b ldr r3, [r7, #0]
|
|
8001900: b2da uxtb r2, r3
|
|
8001902: 4908 ldr r1, [pc, #32] ; (8001924 <__NVIC_SetPriority+0x50>)
|
|
8001904: 79fb ldrb r3, [r7, #7]
|
|
8001906: f003 030f and.w r3, r3, #15
|
|
800190a: 3b04 subs r3, #4
|
|
800190c: 0112 lsls r2, r2, #4
|
|
800190e: b2d2 uxtb r2, r2
|
|
8001910: 440b add r3, r1
|
|
8001912: 761a strb r2, [r3, #24]
|
|
}
|
|
8001914: bf00 nop
|
|
8001916: 370c adds r7, #12
|
|
8001918: 46bd mov sp, r7
|
|
800191a: f85d 7b04 ldr.w r7, [sp], #4
|
|
800191e: 4770 bx lr
|
|
8001920: e000e100 .word 0xe000e100
|
|
8001924: e000ed00 .word 0xe000ed00
|
|
|
|
08001928 <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)
|
|
{
|
|
8001928: b480 push {r7}
|
|
800192a: b089 sub sp, #36 ; 0x24
|
|
800192c: af00 add r7, sp, #0
|
|
800192e: 60f8 str r0, [r7, #12]
|
|
8001930: 60b9 str r1, [r7, #8]
|
|
8001932: 607a str r2, [r7, #4]
|
|
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
|
|
8001934: 68fb ldr r3, [r7, #12]
|
|
8001936: f003 0307 and.w r3, r3, #7
|
|
800193a: 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);
|
|
800193c: 69fb ldr r3, [r7, #28]
|
|
800193e: f1c3 0307 rsb r3, r3, #7
|
|
8001942: 2b04 cmp r3, #4
|
|
8001944: bf28 it cs
|
|
8001946: 2304 movcs r3, #4
|
|
8001948: 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));
|
|
800194a: 69fb ldr r3, [r7, #28]
|
|
800194c: 3304 adds r3, #4
|
|
800194e: 2b06 cmp r3, #6
|
|
8001950: d902 bls.n 8001958 <NVIC_EncodePriority+0x30>
|
|
8001952: 69fb ldr r3, [r7, #28]
|
|
8001954: 3b03 subs r3, #3
|
|
8001956: e000 b.n 800195a <NVIC_EncodePriority+0x32>
|
|
8001958: 2300 movs r3, #0
|
|
800195a: 617b str r3, [r7, #20]
|
|
|
|
return (
|
|
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
|
|
800195c: f04f 32ff mov.w r2, #4294967295
|
|
8001960: 69bb ldr r3, [r7, #24]
|
|
8001962: fa02 f303 lsl.w r3, r2, r3
|
|
8001966: 43da mvns r2, r3
|
|
8001968: 68bb ldr r3, [r7, #8]
|
|
800196a: 401a ands r2, r3
|
|
800196c: 697b ldr r3, [r7, #20]
|
|
800196e: 409a lsls r2, r3
|
|
((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL)))
|
|
8001970: f04f 31ff mov.w r1, #4294967295
|
|
8001974: 697b ldr r3, [r7, #20]
|
|
8001976: fa01 f303 lsl.w r3, r1, r3
|
|
800197a: 43d9 mvns r1, r3
|
|
800197c: 687b ldr r3, [r7, #4]
|
|
800197e: 400b ands r3, r1
|
|
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
|
|
8001980: 4313 orrs r3, r2
|
|
);
|
|
}
|
|
8001982: 4618 mov r0, r3
|
|
8001984: 3724 adds r7, #36 ; 0x24
|
|
8001986: 46bd mov sp, r7
|
|
8001988: f85d 7b04 ldr.w r7, [sp], #4
|
|
800198c: 4770 bx lr
|
|
...
|
|
|
|
08001990 <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)
|
|
{
|
|
8001990: b580 push {r7, lr}
|
|
8001992: b082 sub sp, #8
|
|
8001994: af00 add r7, sp, #0
|
|
8001996: 6078 str r0, [r7, #4]
|
|
if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)
|
|
8001998: 687b ldr r3, [r7, #4]
|
|
800199a: 3b01 subs r3, #1
|
|
800199c: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000
|
|
80019a0: d301 bcc.n 80019a6 <SysTick_Config+0x16>
|
|
{
|
|
return (1UL); /* Reload value impossible */
|
|
80019a2: 2301 movs r3, #1
|
|
80019a4: e00f b.n 80019c6 <SysTick_Config+0x36>
|
|
}
|
|
|
|
SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */
|
|
80019a6: 4a0a ldr r2, [pc, #40] ; (80019d0 <SysTick_Config+0x40>)
|
|
80019a8: 687b ldr r3, [r7, #4]
|
|
80019aa: 3b01 subs r3, #1
|
|
80019ac: 6053 str r3, [r2, #4]
|
|
NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */
|
|
80019ae: 210f movs r1, #15
|
|
80019b0: f04f 30ff mov.w r0, #4294967295
|
|
80019b4: f7ff ff8e bl 80018d4 <__NVIC_SetPriority>
|
|
SysTick->VAL = 0UL; /* Load the SysTick Counter Value */
|
|
80019b8: 4b05 ldr r3, [pc, #20] ; (80019d0 <SysTick_Config+0x40>)
|
|
80019ba: 2200 movs r2, #0
|
|
80019bc: 609a str r2, [r3, #8]
|
|
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
|
|
80019be: 4b04 ldr r3, [pc, #16] ; (80019d0 <SysTick_Config+0x40>)
|
|
80019c0: 2207 movs r2, #7
|
|
80019c2: 601a str r2, [r3, #0]
|
|
SysTick_CTRL_TICKINT_Msk |
|
|
SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
|
|
return (0UL); /* Function successful */
|
|
80019c4: 2300 movs r3, #0
|
|
}
|
|
80019c6: 4618 mov r0, r3
|
|
80019c8: 3708 adds r7, #8
|
|
80019ca: 46bd mov sp, r7
|
|
80019cc: bd80 pop {r7, pc}
|
|
80019ce: bf00 nop
|
|
80019d0: e000e010 .word 0xe000e010
|
|
|
|
080019d4 <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)
|
|
{
|
|
80019d4: b580 push {r7, lr}
|
|
80019d6: b082 sub sp, #8
|
|
80019d8: af00 add r7, sp, #0
|
|
80019da: 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);
|
|
80019dc: 6878 ldr r0, [r7, #4]
|
|
80019de: f7ff ff47 bl 8001870 <__NVIC_SetPriorityGrouping>
|
|
}
|
|
80019e2: bf00 nop
|
|
80019e4: 3708 adds r7, #8
|
|
80019e6: 46bd mov sp, r7
|
|
80019e8: bd80 pop {r7, pc}
|
|
|
|
080019ea <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)
|
|
{
|
|
80019ea: b580 push {r7, lr}
|
|
80019ec: b086 sub sp, #24
|
|
80019ee: af00 add r7, sp, #0
|
|
80019f0: 4603 mov r3, r0
|
|
80019f2: 60b9 str r1, [r7, #8]
|
|
80019f4: 607a str r2, [r7, #4]
|
|
80019f6: 73fb strb r3, [r7, #15]
|
|
uint32_t prioritygroup = 0x00U;
|
|
80019f8: 2300 movs r3, #0
|
|
80019fa: 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();
|
|
80019fc: f7ff ff5c bl 80018b8 <__NVIC_GetPriorityGrouping>
|
|
8001a00: 6178 str r0, [r7, #20]
|
|
|
|
NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority));
|
|
8001a02: 687a ldr r2, [r7, #4]
|
|
8001a04: 68b9 ldr r1, [r7, #8]
|
|
8001a06: 6978 ldr r0, [r7, #20]
|
|
8001a08: f7ff ff8e bl 8001928 <NVIC_EncodePriority>
|
|
8001a0c: 4602 mov r2, r0
|
|
8001a0e: f997 300f ldrsb.w r3, [r7, #15]
|
|
8001a12: 4611 mov r1, r2
|
|
8001a14: 4618 mov r0, r3
|
|
8001a16: f7ff ff5d bl 80018d4 <__NVIC_SetPriority>
|
|
}
|
|
8001a1a: bf00 nop
|
|
8001a1c: 3718 adds r7, #24
|
|
8001a1e: 46bd mov sp, r7
|
|
8001a20: bd80 pop {r7, pc}
|
|
|
|
08001a22 <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)
|
|
{
|
|
8001a22: b580 push {r7, lr}
|
|
8001a24: b082 sub sp, #8
|
|
8001a26: af00 add r7, sp, #0
|
|
8001a28: 6078 str r0, [r7, #4]
|
|
return SysTick_Config(TicksNumb);
|
|
8001a2a: 6878 ldr r0, [r7, #4]
|
|
8001a2c: f7ff ffb0 bl 8001990 <SysTick_Config>
|
|
8001a30: 4603 mov r3, r0
|
|
}
|
|
8001a32: 4618 mov r0, r3
|
|
8001a34: 3708 adds r7, #8
|
|
8001a36: 46bd mov sp, r7
|
|
8001a38: bd80 pop {r7, pc}
|
|
...
|
|
|
|
08001a3c <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)
|
|
{
|
|
8001a3c: b580 push {r7, lr}
|
|
8001a3e: b084 sub sp, #16
|
|
8001a40: af00 add r7, sp, #0
|
|
8001a42: 6078 str r0, [r7, #4]
|
|
uint32_t tickstart;
|
|
|
|
if (heth == NULL)
|
|
8001a44: 687b ldr r3, [r7, #4]
|
|
8001a46: 2b00 cmp r3, #0
|
|
8001a48: d101 bne.n 8001a4e <HAL_ETH_Init+0x12>
|
|
{
|
|
return HAL_ERROR;
|
|
8001a4a: 2301 movs r3, #1
|
|
8001a4c: e06c b.n 8001b28 <HAL_ETH_Init+0xec>
|
|
}
|
|
if (heth->gState == HAL_ETH_STATE_RESET)
|
|
8001a4e: 687b ldr r3, [r7, #4]
|
|
8001a50: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
|
|
8001a54: 2b00 cmp r3, #0
|
|
8001a56: d106 bne.n 8001a66 <HAL_ETH_Init+0x2a>
|
|
{
|
|
heth->gState = HAL_ETH_STATE_BUSY;
|
|
8001a58: 687b ldr r3, [r7, #4]
|
|
8001a5a: 2223 movs r2, #35 ; 0x23
|
|
8001a5c: 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);
|
|
8001a60: 6878 ldr r0, [r7, #4]
|
|
8001a62: f002 fa57 bl 8003f14 <HAL_ETH_MspInit>
|
|
|
|
#endif /* (USE_HAL_ETH_REGISTER_CALLBACKS) */
|
|
}
|
|
|
|
__HAL_RCC_SYSCFG_CLK_ENABLE();
|
|
8001a66: 2300 movs r3, #0
|
|
8001a68: 60bb str r3, [r7, #8]
|
|
8001a6a: 4b31 ldr r3, [pc, #196] ; (8001b30 <HAL_ETH_Init+0xf4>)
|
|
8001a6c: 6c5b ldr r3, [r3, #68] ; 0x44
|
|
8001a6e: 4a30 ldr r2, [pc, #192] ; (8001b30 <HAL_ETH_Init+0xf4>)
|
|
8001a70: f443 4380 orr.w r3, r3, #16384 ; 0x4000
|
|
8001a74: 6453 str r3, [r2, #68] ; 0x44
|
|
8001a76: 4b2e ldr r3, [pc, #184] ; (8001b30 <HAL_ETH_Init+0xf4>)
|
|
8001a78: 6c5b ldr r3, [r3, #68] ; 0x44
|
|
8001a7a: f403 4380 and.w r3, r3, #16384 ; 0x4000
|
|
8001a7e: 60bb str r3, [r7, #8]
|
|
8001a80: 68bb ldr r3, [r7, #8]
|
|
|
|
/* Select MII or RMII Mode*/
|
|
SYSCFG->PMC &= ~(SYSCFG_PMC_MII_RMII_SEL);
|
|
8001a82: 4b2c ldr r3, [pc, #176] ; (8001b34 <HAL_ETH_Init+0xf8>)
|
|
8001a84: 685b ldr r3, [r3, #4]
|
|
8001a86: 4a2b ldr r2, [pc, #172] ; (8001b34 <HAL_ETH_Init+0xf8>)
|
|
8001a88: f423 0300 bic.w r3, r3, #8388608 ; 0x800000
|
|
8001a8c: 6053 str r3, [r2, #4]
|
|
SYSCFG->PMC |= (uint32_t)heth->Init.MediaInterface;
|
|
8001a8e: 4b29 ldr r3, [pc, #164] ; (8001b34 <HAL_ETH_Init+0xf8>)
|
|
8001a90: 685a ldr r2, [r3, #4]
|
|
8001a92: 687b ldr r3, [r7, #4]
|
|
8001a94: 689b ldr r3, [r3, #8]
|
|
8001a96: 4927 ldr r1, [pc, #156] ; (8001b34 <HAL_ETH_Init+0xf8>)
|
|
8001a98: 4313 orrs r3, r2
|
|
8001a9a: 604b str r3, [r1, #4]
|
|
/* Dummy read to sync SYSCFG with ETH */
|
|
(void)SYSCFG->PMC;
|
|
8001a9c: 4b25 ldr r3, [pc, #148] ; (8001b34 <HAL_ETH_Init+0xf8>)
|
|
8001a9e: 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);
|
|
8001aa0: 687b ldr r3, [r7, #4]
|
|
8001aa2: 681b ldr r3, [r3, #0]
|
|
8001aa4: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
8001aa8: 681b ldr r3, [r3, #0]
|
|
8001aaa: 687a ldr r2, [r7, #4]
|
|
8001aac: 6812 ldr r2, [r2, #0]
|
|
8001aae: f043 0301 orr.w r3, r3, #1
|
|
8001ab2: f502 5280 add.w r2, r2, #4096 ; 0x1000
|
|
8001ab6: 6013 str r3, [r2, #0]
|
|
|
|
/* Get tick */
|
|
tickstart = HAL_GetTick();
|
|
8001ab8: f7ff feaa bl 8001810 <HAL_GetTick>
|
|
8001abc: 60f8 str r0, [r7, #12]
|
|
|
|
/* Wait for software reset */
|
|
while (READ_BIT(heth->Instance->DMABMR, ETH_DMABMR_SR) > 0U)
|
|
8001abe: e011 b.n 8001ae4 <HAL_ETH_Init+0xa8>
|
|
{
|
|
if (((HAL_GetTick() - tickstart) > ETH_SWRESET_TIMEOUT))
|
|
8001ac0: f7ff fea6 bl 8001810 <HAL_GetTick>
|
|
8001ac4: 4602 mov r2, r0
|
|
8001ac6: 68fb ldr r3, [r7, #12]
|
|
8001ac8: 1ad3 subs r3, r2, r3
|
|
8001aca: f5b3 7ffa cmp.w r3, #500 ; 0x1f4
|
|
8001ace: d909 bls.n 8001ae4 <HAL_ETH_Init+0xa8>
|
|
{
|
|
/* Set Error Code */
|
|
heth->ErrorCode = HAL_ETH_ERROR_TIMEOUT;
|
|
8001ad0: 687b ldr r3, [r7, #4]
|
|
8001ad2: 2204 movs r2, #4
|
|
8001ad4: f8c3 2088 str.w r2, [r3, #136] ; 0x88
|
|
/* Set State as Error */
|
|
heth->gState = HAL_ETH_STATE_ERROR;
|
|
8001ad8: 687b ldr r3, [r7, #4]
|
|
8001ada: 22e0 movs r2, #224 ; 0xe0
|
|
8001adc: f8c3 2084 str.w r2, [r3, #132] ; 0x84
|
|
/* Return Error */
|
|
return HAL_ERROR;
|
|
8001ae0: 2301 movs r3, #1
|
|
8001ae2: e021 b.n 8001b28 <HAL_ETH_Init+0xec>
|
|
while (READ_BIT(heth->Instance->DMABMR, ETH_DMABMR_SR) > 0U)
|
|
8001ae4: 687b ldr r3, [r7, #4]
|
|
8001ae6: 681b ldr r3, [r3, #0]
|
|
8001ae8: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
8001aec: 681b ldr r3, [r3, #0]
|
|
8001aee: f003 0301 and.w r3, r3, #1
|
|
8001af2: 2b00 cmp r3, #0
|
|
8001af4: d1e4 bne.n 8001ac0 <HAL_ETH_Init+0x84>
|
|
}
|
|
}
|
|
|
|
|
|
/*------------------ MAC, MTL and DMA default Configuration ----------------*/
|
|
ETH_MACDMAConfig(heth);
|
|
8001af6: 6878 ldr r0, [r7, #4]
|
|
8001af8: f000 fdf0 bl 80026dc <ETH_MACDMAConfig>
|
|
|
|
|
|
/*------------------ DMA Tx Descriptors Configuration ----------------------*/
|
|
ETH_DMATxDescListInit(heth);
|
|
8001afc: 6878 ldr r0, [r7, #4]
|
|
8001afe: f000 fe97 bl 8002830 <ETH_DMATxDescListInit>
|
|
|
|
/*------------------ DMA Rx Descriptors Configuration ----------------------*/
|
|
ETH_DMARxDescListInit(heth);
|
|
8001b02: 6878 ldr r0, [r7, #4]
|
|
8001b04: f000 feed bl 80028e2 <ETH_DMARxDescListInit>
|
|
|
|
/*--------------------- ETHERNET MAC Address Configuration ------------------*/
|
|
ETH_MACAddressConfig(heth, ETH_MAC_ADDRESS0, heth->Init.MACAddr);
|
|
8001b08: 687b ldr r3, [r7, #4]
|
|
8001b0a: 685b ldr r3, [r3, #4]
|
|
8001b0c: 461a mov r2, r3
|
|
8001b0e: 2100 movs r1, #0
|
|
8001b10: 6878 ldr r0, [r7, #4]
|
|
8001b12: f000 fe55 bl 80027c0 <ETH_MACAddressConfig>
|
|
|
|
heth->ErrorCode = HAL_ETH_ERROR_NONE;
|
|
8001b16: 687b ldr r3, [r7, #4]
|
|
8001b18: 2200 movs r2, #0
|
|
8001b1a: f8c3 2088 str.w r2, [r3, #136] ; 0x88
|
|
heth->gState = HAL_ETH_STATE_READY;
|
|
8001b1e: 687b ldr r3, [r7, #4]
|
|
8001b20: 2210 movs r2, #16
|
|
8001b22: f8c3 2084 str.w r2, [r3, #132] ; 0x84
|
|
|
|
return HAL_OK;
|
|
8001b26: 2300 movs r3, #0
|
|
}
|
|
8001b28: 4618 mov r0, r3
|
|
8001b2a: 3710 adds r7, #16
|
|
8001b2c: 46bd mov sp, r7
|
|
8001b2e: bd80 pop {r7, pc}
|
|
8001b30: 40023800 .word 0x40023800
|
|
8001b34: 40013800 .word 0x40013800
|
|
|
|
08001b38 <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)
|
|
{
|
|
8001b38: b580 push {r7, lr}
|
|
8001b3a: b084 sub sp, #16
|
|
8001b3c: af00 add r7, sp, #0
|
|
8001b3e: 6078 str r0, [r7, #4]
|
|
uint32_t tmpreg1;
|
|
|
|
if (heth->gState == HAL_ETH_STATE_READY)
|
|
8001b40: 687b ldr r3, [r7, #4]
|
|
8001b42: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
|
|
8001b46: 2b10 cmp r3, #16
|
|
8001b48: d150 bne.n 8001bec <HAL_ETH_Start+0xb4>
|
|
{
|
|
heth->gState = HAL_ETH_STATE_BUSY;
|
|
8001b4a: 687b ldr r3, [r7, #4]
|
|
8001b4c: 2223 movs r2, #35 ; 0x23
|
|
8001b4e: f8c3 2084 str.w r2, [r3, #132] ; 0x84
|
|
|
|
/* Set nombre of descriptors to build */
|
|
heth->RxDescList.RxBuildDescCnt = ETH_RX_DESC_CNT;
|
|
8001b52: 687b ldr r3, [r7, #4]
|
|
8001b54: 2204 movs r2, #4
|
|
8001b56: 66da str r2, [r3, #108] ; 0x6c
|
|
|
|
/* Build all descriptors */
|
|
ETH_UpdateDescriptor(heth);
|
|
8001b58: 6878 ldr r0, [r7, #4]
|
|
8001b5a: f000 f9fd bl 8001f58 <ETH_UpdateDescriptor>
|
|
|
|
/* Enable the MAC transmission */
|
|
SET_BIT(heth->Instance->MACCR, ETH_MACCR_TE);
|
|
8001b5e: 687b ldr r3, [r7, #4]
|
|
8001b60: 681b ldr r3, [r3, #0]
|
|
8001b62: 681a ldr r2, [r3, #0]
|
|
8001b64: 687b ldr r3, [r7, #4]
|
|
8001b66: 681b ldr r3, [r3, #0]
|
|
8001b68: f042 0208 orr.w r2, r2, #8
|
|
8001b6c: 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;
|
|
8001b6e: 687b ldr r3, [r7, #4]
|
|
8001b70: 681b ldr r3, [r3, #0]
|
|
8001b72: 681b ldr r3, [r3, #0]
|
|
8001b74: 60fb str r3, [r7, #12]
|
|
HAL_Delay(ETH_REG_WRITE_DELAY);
|
|
8001b76: 2001 movs r0, #1
|
|
8001b78: f7ff fe56 bl 8001828 <HAL_Delay>
|
|
(heth->Instance)->MACCR = tmpreg1;
|
|
8001b7c: 687b ldr r3, [r7, #4]
|
|
8001b7e: 681b ldr r3, [r3, #0]
|
|
8001b80: 68fa ldr r2, [r7, #12]
|
|
8001b82: 601a str r2, [r3, #0]
|
|
|
|
/* Enable the MAC reception */
|
|
SET_BIT(heth->Instance->MACCR, ETH_MACCR_RE);
|
|
8001b84: 687b ldr r3, [r7, #4]
|
|
8001b86: 681b ldr r3, [r3, #0]
|
|
8001b88: 681a ldr r2, [r3, #0]
|
|
8001b8a: 687b ldr r3, [r7, #4]
|
|
8001b8c: 681b ldr r3, [r3, #0]
|
|
8001b8e: f042 0204 orr.w r2, r2, #4
|
|
8001b92: 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;
|
|
8001b94: 687b ldr r3, [r7, #4]
|
|
8001b96: 681b ldr r3, [r3, #0]
|
|
8001b98: 681b ldr r3, [r3, #0]
|
|
8001b9a: 60fb str r3, [r7, #12]
|
|
HAL_Delay(ETH_REG_WRITE_DELAY);
|
|
8001b9c: 2001 movs r0, #1
|
|
8001b9e: f7ff fe43 bl 8001828 <HAL_Delay>
|
|
(heth->Instance)->MACCR = tmpreg1;
|
|
8001ba2: 687b ldr r3, [r7, #4]
|
|
8001ba4: 681b ldr r3, [r3, #0]
|
|
8001ba6: 68fa ldr r2, [r7, #12]
|
|
8001ba8: 601a str r2, [r3, #0]
|
|
|
|
/* Flush Transmit FIFO */
|
|
ETH_FlushTransmitFIFO(heth);
|
|
8001baa: 6878 ldr r0, [r7, #4]
|
|
8001bac: f000 fc36 bl 800241c <ETH_FlushTransmitFIFO>
|
|
|
|
/* Enable the DMA transmission */
|
|
SET_BIT(heth->Instance->DMAOMR, ETH_DMAOMR_ST);
|
|
8001bb0: 687b ldr r3, [r7, #4]
|
|
8001bb2: 681b ldr r3, [r3, #0]
|
|
8001bb4: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
8001bb8: 699b ldr r3, [r3, #24]
|
|
8001bba: 687a ldr r2, [r7, #4]
|
|
8001bbc: 6812 ldr r2, [r2, #0]
|
|
8001bbe: f443 5300 orr.w r3, r3, #8192 ; 0x2000
|
|
8001bc2: f502 5280 add.w r2, r2, #4096 ; 0x1000
|
|
8001bc6: 6193 str r3, [r2, #24]
|
|
|
|
/* Enable the DMA reception */
|
|
SET_BIT(heth->Instance->DMAOMR, ETH_DMAOMR_SR);
|
|
8001bc8: 687b ldr r3, [r7, #4]
|
|
8001bca: 681b ldr r3, [r3, #0]
|
|
8001bcc: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
8001bd0: 699b ldr r3, [r3, #24]
|
|
8001bd2: 687a ldr r2, [r7, #4]
|
|
8001bd4: 6812 ldr r2, [r2, #0]
|
|
8001bd6: f043 0302 orr.w r3, r3, #2
|
|
8001bda: f502 5280 add.w r2, r2, #4096 ; 0x1000
|
|
8001bde: 6193 str r3, [r2, #24]
|
|
|
|
heth->gState = HAL_ETH_STATE_STARTED;
|
|
8001be0: 687b ldr r3, [r7, #4]
|
|
8001be2: 2223 movs r2, #35 ; 0x23
|
|
8001be4: f8c3 2084 str.w r2, [r3, #132] ; 0x84
|
|
|
|
return HAL_OK;
|
|
8001be8: 2300 movs r3, #0
|
|
8001bea: e000 b.n 8001bee <HAL_ETH_Start+0xb6>
|
|
}
|
|
else
|
|
{
|
|
return HAL_ERROR;
|
|
8001bec: 2301 movs r3, #1
|
|
}
|
|
}
|
|
8001bee: 4618 mov r0, r3
|
|
8001bf0: 3710 adds r7, #16
|
|
8001bf2: 46bd mov sp, r7
|
|
8001bf4: bd80 pop {r7, pc}
|
|
|
|
08001bf6 <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)
|
|
{
|
|
8001bf6: b580 push {r7, lr}
|
|
8001bf8: b084 sub sp, #16
|
|
8001bfa: af00 add r7, sp, #0
|
|
8001bfc: 6078 str r0, [r7, #4]
|
|
uint32_t tmpreg1;
|
|
|
|
if (heth->gState == HAL_ETH_STATE_STARTED)
|
|
8001bfe: 687b ldr r3, [r7, #4]
|
|
8001c00: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
|
|
8001c04: 2b23 cmp r3, #35 ; 0x23
|
|
8001c06: d14a bne.n 8001c9e <HAL_ETH_Stop+0xa8>
|
|
{
|
|
/* Set the ETH peripheral state to BUSY */
|
|
heth->gState = HAL_ETH_STATE_BUSY;
|
|
8001c08: 687b ldr r3, [r7, #4]
|
|
8001c0a: 2223 movs r2, #35 ; 0x23
|
|
8001c0c: f8c3 2084 str.w r2, [r3, #132] ; 0x84
|
|
/* Disable the DMA transmission */
|
|
CLEAR_BIT(heth->Instance->DMAOMR, ETH_DMAOMR_ST);
|
|
8001c10: 687b ldr r3, [r7, #4]
|
|
8001c12: 681b ldr r3, [r3, #0]
|
|
8001c14: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
8001c18: 699b ldr r3, [r3, #24]
|
|
8001c1a: 687a ldr r2, [r7, #4]
|
|
8001c1c: 6812 ldr r2, [r2, #0]
|
|
8001c1e: f423 5300 bic.w r3, r3, #8192 ; 0x2000
|
|
8001c22: f502 5280 add.w r2, r2, #4096 ; 0x1000
|
|
8001c26: 6193 str r3, [r2, #24]
|
|
|
|
/* Disable the DMA reception */
|
|
CLEAR_BIT(heth->Instance->DMAOMR, ETH_DMAOMR_SR);
|
|
8001c28: 687b ldr r3, [r7, #4]
|
|
8001c2a: 681b ldr r3, [r3, #0]
|
|
8001c2c: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
8001c30: 699b ldr r3, [r3, #24]
|
|
8001c32: 687a ldr r2, [r7, #4]
|
|
8001c34: 6812 ldr r2, [r2, #0]
|
|
8001c36: f023 0302 bic.w r3, r3, #2
|
|
8001c3a: f502 5280 add.w r2, r2, #4096 ; 0x1000
|
|
8001c3e: 6193 str r3, [r2, #24]
|
|
|
|
/* Disable the MAC reception */
|
|
CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_RE);
|
|
8001c40: 687b ldr r3, [r7, #4]
|
|
8001c42: 681b ldr r3, [r3, #0]
|
|
8001c44: 681a ldr r2, [r3, #0]
|
|
8001c46: 687b ldr r3, [r7, #4]
|
|
8001c48: 681b ldr r3, [r3, #0]
|
|
8001c4a: f022 0204 bic.w r2, r2, #4
|
|
8001c4e: 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;
|
|
8001c50: 687b ldr r3, [r7, #4]
|
|
8001c52: 681b ldr r3, [r3, #0]
|
|
8001c54: 681b ldr r3, [r3, #0]
|
|
8001c56: 60fb str r3, [r7, #12]
|
|
HAL_Delay(ETH_REG_WRITE_DELAY);
|
|
8001c58: 2001 movs r0, #1
|
|
8001c5a: f7ff fde5 bl 8001828 <HAL_Delay>
|
|
(heth->Instance)->MACCR = tmpreg1;
|
|
8001c5e: 687b ldr r3, [r7, #4]
|
|
8001c60: 681b ldr r3, [r3, #0]
|
|
8001c62: 68fa ldr r2, [r7, #12]
|
|
8001c64: 601a str r2, [r3, #0]
|
|
|
|
/* Flush Transmit FIFO */
|
|
ETH_FlushTransmitFIFO(heth);
|
|
8001c66: 6878 ldr r0, [r7, #4]
|
|
8001c68: f000 fbd8 bl 800241c <ETH_FlushTransmitFIFO>
|
|
|
|
/* Disable the MAC transmission */
|
|
CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_TE);
|
|
8001c6c: 687b ldr r3, [r7, #4]
|
|
8001c6e: 681b ldr r3, [r3, #0]
|
|
8001c70: 681a ldr r2, [r3, #0]
|
|
8001c72: 687b ldr r3, [r7, #4]
|
|
8001c74: 681b ldr r3, [r3, #0]
|
|
8001c76: f022 0208 bic.w r2, r2, #8
|
|
8001c7a: 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;
|
|
8001c7c: 687b ldr r3, [r7, #4]
|
|
8001c7e: 681b ldr r3, [r3, #0]
|
|
8001c80: 681b ldr r3, [r3, #0]
|
|
8001c82: 60fb str r3, [r7, #12]
|
|
HAL_Delay(ETH_REG_WRITE_DELAY);
|
|
8001c84: 2001 movs r0, #1
|
|
8001c86: f7ff fdcf bl 8001828 <HAL_Delay>
|
|
(heth->Instance)->MACCR = tmpreg1;
|
|
8001c8a: 687b ldr r3, [r7, #4]
|
|
8001c8c: 681b ldr r3, [r3, #0]
|
|
8001c8e: 68fa ldr r2, [r7, #12]
|
|
8001c90: 601a str r2, [r3, #0]
|
|
|
|
heth->gState = HAL_ETH_STATE_READY;
|
|
8001c92: 687b ldr r3, [r7, #4]
|
|
8001c94: 2210 movs r2, #16
|
|
8001c96: f8c3 2084 str.w r2, [r3, #132] ; 0x84
|
|
|
|
/* Return function status */
|
|
return HAL_OK;
|
|
8001c9a: 2300 movs r3, #0
|
|
8001c9c: e000 b.n 8001ca0 <HAL_ETH_Stop+0xaa>
|
|
}
|
|
else
|
|
{
|
|
return HAL_ERROR;
|
|
8001c9e: 2301 movs r3, #1
|
|
}
|
|
}
|
|
8001ca0: 4618 mov r0, r3
|
|
8001ca2: 3710 adds r7, #16
|
|
8001ca4: 46bd mov sp, r7
|
|
8001ca6: bd80 pop {r7, pc}
|
|
|
|
08001ca8 <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)
|
|
{
|
|
8001ca8: b580 push {r7, lr}
|
|
8001caa: b086 sub sp, #24
|
|
8001cac: af00 add r7, sp, #0
|
|
8001cae: 60f8 str r0, [r7, #12]
|
|
8001cb0: 60b9 str r1, [r7, #8]
|
|
8001cb2: 607a str r2, [r7, #4]
|
|
uint32_t tickstart;
|
|
ETH_DMADescTypeDef *dmatxdesc;
|
|
|
|
if (pTxConfig == NULL)
|
|
8001cb4: 68bb ldr r3, [r7, #8]
|
|
8001cb6: 2b00 cmp r3, #0
|
|
8001cb8: d109 bne.n 8001cce <HAL_ETH_Transmit+0x26>
|
|
{
|
|
heth->ErrorCode |= HAL_ETH_ERROR_PARAM;
|
|
8001cba: 68fb ldr r3, [r7, #12]
|
|
8001cbc: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
|
|
8001cc0: f043 0201 orr.w r2, r3, #1
|
|
8001cc4: 68fb ldr r3, [r7, #12]
|
|
8001cc6: f8c3 2088 str.w r2, [r3, #136] ; 0x88
|
|
return HAL_ERROR;
|
|
8001cca: 2301 movs r3, #1
|
|
8001ccc: e07c b.n 8001dc8 <HAL_ETH_Transmit+0x120>
|
|
}
|
|
|
|
if (heth->gState == HAL_ETH_STATE_STARTED)
|
|
8001cce: 68fb ldr r3, [r7, #12]
|
|
8001cd0: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
|
|
8001cd4: 2b23 cmp r3, #35 ; 0x23
|
|
8001cd6: d176 bne.n 8001dc6 <HAL_ETH_Transmit+0x11e>
|
|
{
|
|
/* Config DMA Tx descriptor by Tx Packet info */
|
|
if (ETH_Prepare_Tx_Descriptors(heth, pTxConfig, 0) != HAL_ETH_ERROR_NONE)
|
|
8001cd8: 2200 movs r2, #0
|
|
8001cda: 68b9 ldr r1, [r7, #8]
|
|
8001cdc: 68f8 ldr r0, [r7, #12]
|
|
8001cde: f000 fe6d bl 80029bc <ETH_Prepare_Tx_Descriptors>
|
|
8001ce2: 4603 mov r3, r0
|
|
8001ce4: 2b00 cmp r3, #0
|
|
8001ce6: d009 beq.n 8001cfc <HAL_ETH_Transmit+0x54>
|
|
{
|
|
/* Set the ETH error code */
|
|
heth->ErrorCode |= HAL_ETH_ERROR_BUSY;
|
|
8001ce8: 68fb ldr r3, [r7, #12]
|
|
8001cea: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
|
|
8001cee: f043 0202 orr.w r2, r3, #2
|
|
8001cf2: 68fb ldr r3, [r7, #12]
|
|
8001cf4: f8c3 2088 str.w r2, [r3, #136] ; 0x88
|
|
return HAL_ERROR;
|
|
8001cf8: 2301 movs r3, #1
|
|
8001cfa: e065 b.n 8001dc8 <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");
|
|
8001cfc: f3bf 8f4f dsb sy
|
|
}
|
|
8001d00: bf00 nop
|
|
}
|
|
|
|
/* Ensure completion of descriptor preparation before transmission start */
|
|
__DSB();
|
|
|
|
dmatxdesc = (ETH_DMADescTypeDef *)(&heth->TxDescList)->TxDesc[heth->TxDescList.CurTxDesc];
|
|
8001d02: 68fb ldr r3, [r7, #12]
|
|
8001d04: 6a9a ldr r2, [r3, #40] ; 0x28
|
|
8001d06: 68fb ldr r3, [r7, #12]
|
|
8001d08: 3206 adds r2, #6
|
|
8001d0a: f853 3022 ldr.w r3, [r3, r2, lsl #2]
|
|
8001d0e: 617b str r3, [r7, #20]
|
|
|
|
/* Incr current tx desc index */
|
|
INCR_TX_DESC_INDEX(heth->TxDescList.CurTxDesc, 1U);
|
|
8001d10: 68fb ldr r3, [r7, #12]
|
|
8001d12: 6a9b ldr r3, [r3, #40] ; 0x28
|
|
8001d14: 1c5a adds r2, r3, #1
|
|
8001d16: 68fb ldr r3, [r7, #12]
|
|
8001d18: 629a str r2, [r3, #40] ; 0x28
|
|
8001d1a: 68fb ldr r3, [r7, #12]
|
|
8001d1c: 6a9b ldr r3, [r3, #40] ; 0x28
|
|
8001d1e: 2b03 cmp r3, #3
|
|
8001d20: d904 bls.n 8001d2c <HAL_ETH_Transmit+0x84>
|
|
8001d22: 68fb ldr r3, [r7, #12]
|
|
8001d24: 6a9b ldr r3, [r3, #40] ; 0x28
|
|
8001d26: 1f1a subs r2, r3, #4
|
|
8001d28: 68fb ldr r3, [r7, #12]
|
|
8001d2a: 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]));
|
|
8001d2c: 68fb ldr r3, [r7, #12]
|
|
8001d2e: 6a99 ldr r1, [r3, #40] ; 0x28
|
|
8001d30: 68fb ldr r3, [r7, #12]
|
|
8001d32: 681a ldr r2, [r3, #0]
|
|
8001d34: 68fb ldr r3, [r7, #12]
|
|
8001d36: 3106 adds r1, #6
|
|
8001d38: f853 3021 ldr.w r3, [r3, r1, lsl #2]
|
|
8001d3c: f502 5280 add.w r2, r2, #4096 ; 0x1000
|
|
8001d40: 6053 str r3, [r2, #4]
|
|
|
|
tickstart = HAL_GetTick();
|
|
8001d42: f7ff fd65 bl 8001810 <HAL_GetTick>
|
|
8001d46: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait for data to be transmitted or timeout occurred */
|
|
while ((dmatxdesc->DESC0 & ETH_DMATXDESC_OWN) != (uint32_t)RESET)
|
|
8001d48: e037 b.n 8001dba <HAL_ETH_Transmit+0x112>
|
|
{
|
|
if ((heth->Instance->DMASR & ETH_DMASR_FBES) != (uint32_t)RESET)
|
|
8001d4a: 68fb ldr r3, [r7, #12]
|
|
8001d4c: 681b ldr r3, [r3, #0]
|
|
8001d4e: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
8001d52: 695b ldr r3, [r3, #20]
|
|
8001d54: f403 5300 and.w r3, r3, #8192 ; 0x2000
|
|
8001d58: 2b00 cmp r3, #0
|
|
8001d5a: d011 beq.n 8001d80 <HAL_ETH_Transmit+0xd8>
|
|
{
|
|
heth->ErrorCode |= HAL_ETH_ERROR_DMA;
|
|
8001d5c: 68fb ldr r3, [r7, #12]
|
|
8001d5e: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
|
|
8001d62: f043 0208 orr.w r2, r3, #8
|
|
8001d66: 68fb ldr r3, [r7, #12]
|
|
8001d68: f8c3 2088 str.w r2, [r3, #136] ; 0x88
|
|
heth->DMAErrorCode = heth->Instance->DMASR;
|
|
8001d6c: 68fb ldr r3, [r7, #12]
|
|
8001d6e: 681b ldr r3, [r3, #0]
|
|
8001d70: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
8001d74: 695a ldr r2, [r3, #20]
|
|
8001d76: 68fb ldr r3, [r7, #12]
|
|
8001d78: f8c3 208c str.w r2, [r3, #140] ; 0x8c
|
|
/* Return function status */
|
|
return HAL_ERROR;
|
|
8001d7c: 2301 movs r3, #1
|
|
8001d7e: e023 b.n 8001dc8 <HAL_ETH_Transmit+0x120>
|
|
}
|
|
|
|
/* Check for the Timeout */
|
|
if (Timeout != HAL_MAX_DELAY)
|
|
8001d80: 687b ldr r3, [r7, #4]
|
|
8001d82: f1b3 3fff cmp.w r3, #4294967295
|
|
8001d86: d018 beq.n 8001dba <HAL_ETH_Transmit+0x112>
|
|
{
|
|
if (((HAL_GetTick() - tickstart) > Timeout) || (Timeout == 0U))
|
|
8001d88: f7ff fd42 bl 8001810 <HAL_GetTick>
|
|
8001d8c: 4602 mov r2, r0
|
|
8001d8e: 693b ldr r3, [r7, #16]
|
|
8001d90: 1ad3 subs r3, r2, r3
|
|
8001d92: 687a ldr r2, [r7, #4]
|
|
8001d94: 429a cmp r2, r3
|
|
8001d96: d302 bcc.n 8001d9e <HAL_ETH_Transmit+0xf6>
|
|
8001d98: 687b ldr r3, [r7, #4]
|
|
8001d9a: 2b00 cmp r3, #0
|
|
8001d9c: d10d bne.n 8001dba <HAL_ETH_Transmit+0x112>
|
|
{
|
|
heth->ErrorCode |= HAL_ETH_ERROR_TIMEOUT;
|
|
8001d9e: 68fb ldr r3, [r7, #12]
|
|
8001da0: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
|
|
8001da4: f043 0204 orr.w r2, r3, #4
|
|
8001da8: 68fb ldr r3, [r7, #12]
|
|
8001daa: f8c3 2088 str.w r2, [r3, #136] ; 0x88
|
|
/* Clear TX descriptor so that we can proceed */
|
|
dmatxdesc->DESC0 = (ETH_DMATXDESC_FS | ETH_DMATXDESC_LS);
|
|
8001dae: 697b ldr r3, [r7, #20]
|
|
8001db0: f04f 5240 mov.w r2, #805306368 ; 0x30000000
|
|
8001db4: 601a str r2, [r3, #0]
|
|
return HAL_ERROR;
|
|
8001db6: 2301 movs r3, #1
|
|
8001db8: e006 b.n 8001dc8 <HAL_ETH_Transmit+0x120>
|
|
while ((dmatxdesc->DESC0 & ETH_DMATXDESC_OWN) != (uint32_t)RESET)
|
|
8001dba: 697b ldr r3, [r7, #20]
|
|
8001dbc: 681b ldr r3, [r3, #0]
|
|
8001dbe: 2b00 cmp r3, #0
|
|
8001dc0: dbc3 blt.n 8001d4a <HAL_ETH_Transmit+0xa2>
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Return function status */
|
|
return HAL_OK;
|
|
8001dc2: 2300 movs r3, #0
|
|
8001dc4: e000 b.n 8001dc8 <HAL_ETH_Transmit+0x120>
|
|
}
|
|
else
|
|
{
|
|
return HAL_ERROR;
|
|
8001dc6: 2301 movs r3, #1
|
|
}
|
|
}
|
|
8001dc8: 4618 mov r0, r3
|
|
8001dca: 3718 adds r7, #24
|
|
8001dcc: 46bd mov sp, r7
|
|
8001dce: bd80 pop {r7, pc}
|
|
|
|
08001dd0 <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)
|
|
{
|
|
8001dd0: b580 push {r7, lr}
|
|
8001dd2: b088 sub sp, #32
|
|
8001dd4: af00 add r7, sp, #0
|
|
8001dd6: 6078 str r0, [r7, #4]
|
|
8001dd8: 6039 str r1, [r7, #0]
|
|
uint32_t descidx;
|
|
ETH_DMADescTypeDef *dmarxdesc;
|
|
uint32_t desccnt = 0U;
|
|
8001dda: 2300 movs r3, #0
|
|
8001ddc: 617b str r3, [r7, #20]
|
|
uint32_t desccntmax;
|
|
uint32_t bufflength;
|
|
uint8_t rxdataready = 0U;
|
|
8001dde: 2300 movs r3, #0
|
|
8001de0: 73fb strb r3, [r7, #15]
|
|
|
|
|
|
if (pAppBuff == NULL)
|
|
8001de2: 683b ldr r3, [r7, #0]
|
|
8001de4: 2b00 cmp r3, #0
|
|
8001de6: d109 bne.n 8001dfc <HAL_ETH_ReadData+0x2c>
|
|
{
|
|
heth->ErrorCode |= HAL_ETH_ERROR_PARAM;
|
|
8001de8: 687b ldr r3, [r7, #4]
|
|
8001dea: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
|
|
8001dee: f043 0201 orr.w r2, r3, #1
|
|
8001df2: 687b ldr r3, [r7, #4]
|
|
8001df4: f8c3 2088 str.w r2, [r3, #136] ; 0x88
|
|
return HAL_ERROR;
|
|
8001df8: 2301 movs r3, #1
|
|
8001dfa: e0a8 b.n 8001f4e <HAL_ETH_ReadData+0x17e>
|
|
}
|
|
|
|
if (heth->gState != HAL_ETH_STATE_STARTED)
|
|
8001dfc: 687b ldr r3, [r7, #4]
|
|
8001dfe: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
|
|
8001e02: 2b23 cmp r3, #35 ; 0x23
|
|
8001e04: d001 beq.n 8001e0a <HAL_ETH_ReadData+0x3a>
|
|
{
|
|
return HAL_ERROR;
|
|
8001e06: 2301 movs r3, #1
|
|
8001e08: e0a1 b.n 8001f4e <HAL_ETH_ReadData+0x17e>
|
|
}
|
|
|
|
descidx = heth->RxDescList.RxDescIdx;
|
|
8001e0a: 687b ldr r3, [r7, #4]
|
|
8001e0c: 6ddb ldr r3, [r3, #92] ; 0x5c
|
|
8001e0e: 61fb str r3, [r7, #28]
|
|
dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
|
|
8001e10: 687b ldr r3, [r7, #4]
|
|
8001e12: 69fa ldr r2, [r7, #28]
|
|
8001e14: 3212 adds r2, #18
|
|
8001e16: f853 3022 ldr.w r3, [r3, r2, lsl #2]
|
|
8001e1a: 61bb str r3, [r7, #24]
|
|
desccntmax = ETH_RX_DESC_CNT - heth->RxDescList.RxBuildDescCnt;
|
|
8001e1c: 687b ldr r3, [r7, #4]
|
|
8001e1e: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
8001e20: f1c3 0304 rsb r3, r3, #4
|
|
8001e24: 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)
|
|
8001e26: e06a b.n 8001efe <HAL_ETH_ReadData+0x12e>
|
|
&& (rxdataready == 0U))
|
|
{
|
|
if (READ_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_LS) != (uint32_t)RESET)
|
|
8001e28: 69bb ldr r3, [r7, #24]
|
|
8001e2a: 681b ldr r3, [r3, #0]
|
|
8001e2c: f403 7380 and.w r3, r3, #256 ; 0x100
|
|
8001e30: 2b00 cmp r3, #0
|
|
8001e32: d007 beq.n 8001e44 <HAL_ETH_ReadData+0x74>
|
|
{
|
|
/* Get timestamp high */
|
|
heth->RxDescList.TimeStamp.TimeStampHigh = dmarxdesc->DESC6;
|
|
8001e34: 69bb ldr r3, [r7, #24]
|
|
8001e36: 699a ldr r2, [r3, #24]
|
|
8001e38: 687b ldr r3, [r7, #4]
|
|
8001e3a: 679a str r2, [r3, #120] ; 0x78
|
|
/* Get timestamp low */
|
|
heth->RxDescList.TimeStamp.TimeStampLow = dmarxdesc->DESC7;
|
|
8001e3c: 69bb ldr r3, [r7, #24]
|
|
8001e3e: 69da ldr r2, [r3, #28]
|
|
8001e40: 687b ldr r3, [r7, #4]
|
|
8001e42: 675a str r2, [r3, #116] ; 0x74
|
|
}
|
|
if ((READ_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_FS) != (uint32_t)RESET) || (heth->RxDescList.pRxStart != NULL))
|
|
8001e44: 69bb ldr r3, [r7, #24]
|
|
8001e46: 681b ldr r3, [r3, #0]
|
|
8001e48: f403 7300 and.w r3, r3, #512 ; 0x200
|
|
8001e4c: 2b00 cmp r3, #0
|
|
8001e4e: d103 bne.n 8001e58 <HAL_ETH_ReadData+0x88>
|
|
8001e50: 687b ldr r3, [r7, #4]
|
|
8001e52: 6fdb ldr r3, [r3, #124] ; 0x7c
|
|
8001e54: 2b00 cmp r3, #0
|
|
8001e56: d040 beq.n 8001eda <HAL_ETH_ReadData+0x10a>
|
|
{
|
|
/* Check first descriptor */
|
|
if (READ_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_FS) != (uint32_t)RESET)
|
|
8001e58: 69bb ldr r3, [r7, #24]
|
|
8001e5a: 681b ldr r3, [r3, #0]
|
|
8001e5c: f403 7300 and.w r3, r3, #512 ; 0x200
|
|
8001e60: 2b00 cmp r3, #0
|
|
8001e62: d005 beq.n 8001e70 <HAL_ETH_ReadData+0xa0>
|
|
{
|
|
heth->RxDescList.RxDescCnt = 0;
|
|
8001e64: 687b ldr r3, [r7, #4]
|
|
8001e66: 2200 movs r2, #0
|
|
8001e68: 661a str r2, [r3, #96] ; 0x60
|
|
heth->RxDescList.RxDataLength = 0;
|
|
8001e6a: 687b ldr r3, [r7, #4]
|
|
8001e6c: 2200 movs r2, #0
|
|
8001e6e: 665a str r2, [r3, #100] ; 0x64
|
|
}
|
|
|
|
/* Check if last descriptor */
|
|
bufflength = heth->Init.RxBuffLen;
|
|
8001e70: 687b ldr r3, [r7, #4]
|
|
8001e72: 695b ldr r3, [r3, #20]
|
|
8001e74: 613b str r3, [r7, #16]
|
|
if (READ_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_LS) != (uint32_t)RESET)
|
|
8001e76: 69bb ldr r3, [r7, #24]
|
|
8001e78: 681b ldr r3, [r3, #0]
|
|
8001e7a: f403 7380 and.w r3, r3, #256 ; 0x100
|
|
8001e7e: 2b00 cmp r3, #0
|
|
8001e80: d00c beq.n 8001e9c <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;
|
|
8001e82: 69bb ldr r3, [r7, #24]
|
|
8001e84: 681b ldr r3, [r3, #0]
|
|
8001e86: 0c1b lsrs r3, r3, #16
|
|
8001e88: f3c3 030d ubfx r3, r3, #0, #14
|
|
8001e8c: 3b04 subs r3, #4
|
|
8001e8e: 613b str r3, [r7, #16]
|
|
|
|
/* Save Last descriptor index */
|
|
heth->RxDescList.pRxLastRxDesc = dmarxdesc->DESC0;
|
|
8001e90: 69bb ldr r3, [r7, #24]
|
|
8001e92: 681a ldr r2, [r3, #0]
|
|
8001e94: 687b ldr r3, [r7, #4]
|
|
8001e96: 671a str r2, [r3, #112] ; 0x70
|
|
|
|
/* Packet ready */
|
|
rxdataready = 1;
|
|
8001e98: 2301 movs r3, #1
|
|
8001e9a: 73fb strb r3, [r7, #15]
|
|
}
|
|
|
|
/* Link data */
|
|
WRITE_REG(dmarxdesc->BackupAddr0, dmarxdesc->DESC2);
|
|
8001e9c: 69bb ldr r3, [r7, #24]
|
|
8001e9e: 689a ldr r2, [r3, #8]
|
|
8001ea0: 69bb ldr r3, [r7, #24]
|
|
8001ea2: 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,
|
|
8001ea4: 687b ldr r3, [r7, #4]
|
|
8001ea6: f103 007c add.w r0, r3, #124 ; 0x7c
|
|
8001eaa: 687b ldr r3, [r7, #4]
|
|
8001eac: f103 0180 add.w r1, r3, #128 ; 0x80
|
|
(uint8_t *)dmarxdesc->BackupAddr0, (uint16_t) bufflength);
|
|
8001eb0: 69bb ldr r3, [r7, #24]
|
|
8001eb2: 6a1b ldr r3, [r3, #32]
|
|
HAL_ETH_RxLinkCallback(&heth->RxDescList.pRxStart, &heth->RxDescList.pRxEnd,
|
|
8001eb4: 461a mov r2, r3
|
|
8001eb6: 693b ldr r3, [r7, #16]
|
|
8001eb8: b29b uxth r3, r3
|
|
8001eba: f002 f9fb bl 80042b4 <HAL_ETH_RxLinkCallback>
|
|
#endif /* USE_HAL_ETH_REGISTER_CALLBACKS */
|
|
heth->RxDescList.RxDescCnt++;
|
|
8001ebe: 687b ldr r3, [r7, #4]
|
|
8001ec0: 6e1b ldr r3, [r3, #96] ; 0x60
|
|
8001ec2: 1c5a adds r2, r3, #1
|
|
8001ec4: 687b ldr r3, [r7, #4]
|
|
8001ec6: 661a str r2, [r3, #96] ; 0x60
|
|
heth->RxDescList.RxDataLength += bufflength;
|
|
8001ec8: 687b ldr r3, [r7, #4]
|
|
8001eca: 6e5a ldr r2, [r3, #100] ; 0x64
|
|
8001ecc: 693b ldr r3, [r7, #16]
|
|
8001ece: 441a add r2, r3
|
|
8001ed0: 687b ldr r3, [r7, #4]
|
|
8001ed2: 665a str r2, [r3, #100] ; 0x64
|
|
|
|
/* Clear buffer pointer */
|
|
dmarxdesc->BackupAddr0 = 0;
|
|
8001ed4: 69bb ldr r3, [r7, #24]
|
|
8001ed6: 2200 movs r2, #0
|
|
8001ed8: 621a str r2, [r3, #32]
|
|
}
|
|
|
|
/* Increment current rx descriptor index */
|
|
INCR_RX_DESC_INDEX(descidx, 1U);
|
|
8001eda: 69fb ldr r3, [r7, #28]
|
|
8001edc: 3301 adds r3, #1
|
|
8001ede: 61fb str r3, [r7, #28]
|
|
8001ee0: 69fb ldr r3, [r7, #28]
|
|
8001ee2: 2b03 cmp r3, #3
|
|
8001ee4: d902 bls.n 8001eec <HAL_ETH_ReadData+0x11c>
|
|
8001ee6: 69fb ldr r3, [r7, #28]
|
|
8001ee8: 3b04 subs r3, #4
|
|
8001eea: 61fb str r3, [r7, #28]
|
|
/* Get current descriptor address */
|
|
dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
|
|
8001eec: 687b ldr r3, [r7, #4]
|
|
8001eee: 69fa ldr r2, [r7, #28]
|
|
8001ef0: 3212 adds r2, #18
|
|
8001ef2: f853 3022 ldr.w r3, [r3, r2, lsl #2]
|
|
8001ef6: 61bb str r3, [r7, #24]
|
|
desccnt++;
|
|
8001ef8: 697b ldr r3, [r7, #20]
|
|
8001efa: 3301 adds r3, #1
|
|
8001efc: 617b str r3, [r7, #20]
|
|
while ((READ_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_OWN) == (uint32_t)RESET) && (desccnt < desccntmax)
|
|
8001efe: 69bb ldr r3, [r7, #24]
|
|
8001f00: 681b ldr r3, [r3, #0]
|
|
8001f02: 2b00 cmp r3, #0
|
|
8001f04: db06 blt.n 8001f14 <HAL_ETH_ReadData+0x144>
|
|
8001f06: 697a ldr r2, [r7, #20]
|
|
8001f08: 68bb ldr r3, [r7, #8]
|
|
8001f0a: 429a cmp r2, r3
|
|
8001f0c: d202 bcs.n 8001f14 <HAL_ETH_ReadData+0x144>
|
|
&& (rxdataready == 0U))
|
|
8001f0e: 7bfb ldrb r3, [r7, #15]
|
|
8001f10: 2b00 cmp r3, #0
|
|
8001f12: d089 beq.n 8001e28 <HAL_ETH_ReadData+0x58>
|
|
}
|
|
|
|
heth->RxDescList.RxBuildDescCnt += desccnt;
|
|
8001f14: 687b ldr r3, [r7, #4]
|
|
8001f16: 6eda ldr r2, [r3, #108] ; 0x6c
|
|
8001f18: 697b ldr r3, [r7, #20]
|
|
8001f1a: 441a add r2, r3
|
|
8001f1c: 687b ldr r3, [r7, #4]
|
|
8001f1e: 66da str r2, [r3, #108] ; 0x6c
|
|
if ((heth->RxDescList.RxBuildDescCnt) != 0U)
|
|
8001f20: 687b ldr r3, [r7, #4]
|
|
8001f22: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
8001f24: 2b00 cmp r3, #0
|
|
8001f26: d002 beq.n 8001f2e <HAL_ETH_ReadData+0x15e>
|
|
{
|
|
/* Update Descriptors */
|
|
ETH_UpdateDescriptor(heth);
|
|
8001f28: 6878 ldr r0, [r7, #4]
|
|
8001f2a: f000 f815 bl 8001f58 <ETH_UpdateDescriptor>
|
|
}
|
|
|
|
heth->RxDescList.RxDescIdx = descidx;
|
|
8001f2e: 687b ldr r3, [r7, #4]
|
|
8001f30: 69fa ldr r2, [r7, #28]
|
|
8001f32: 65da str r2, [r3, #92] ; 0x5c
|
|
|
|
if (rxdataready == 1U)
|
|
8001f34: 7bfb ldrb r3, [r7, #15]
|
|
8001f36: 2b01 cmp r3, #1
|
|
8001f38: d108 bne.n 8001f4c <HAL_ETH_ReadData+0x17c>
|
|
{
|
|
/* Return received packet */
|
|
*pAppBuff = heth->RxDescList.pRxStart;
|
|
8001f3a: 687b ldr r3, [r7, #4]
|
|
8001f3c: 6fda ldr r2, [r3, #124] ; 0x7c
|
|
8001f3e: 683b ldr r3, [r7, #0]
|
|
8001f40: 601a str r2, [r3, #0]
|
|
/* Reset first element */
|
|
heth->RxDescList.pRxStart = NULL;
|
|
8001f42: 687b ldr r3, [r7, #4]
|
|
8001f44: 2200 movs r2, #0
|
|
8001f46: 67da str r2, [r3, #124] ; 0x7c
|
|
|
|
return HAL_OK;
|
|
8001f48: 2300 movs r3, #0
|
|
8001f4a: e000 b.n 8001f4e <HAL_ETH_ReadData+0x17e>
|
|
}
|
|
|
|
/* Packet not ready */
|
|
return HAL_ERROR;
|
|
8001f4c: 2301 movs r3, #1
|
|
}
|
|
8001f4e: 4618 mov r0, r3
|
|
8001f50: 3720 adds r7, #32
|
|
8001f52: 46bd mov sp, r7
|
|
8001f54: bd80 pop {r7, pc}
|
|
...
|
|
|
|
08001f58 <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)
|
|
{
|
|
8001f58: b580 push {r7, lr}
|
|
8001f5a: b088 sub sp, #32
|
|
8001f5c: af00 add r7, sp, #0
|
|
8001f5e: 6078 str r0, [r7, #4]
|
|
uint32_t descidx;
|
|
uint32_t desccount;
|
|
ETH_DMADescTypeDef *dmarxdesc;
|
|
uint8_t *buff = NULL;
|
|
8001f60: 2300 movs r3, #0
|
|
8001f62: 60fb str r3, [r7, #12]
|
|
uint8_t allocStatus = 1U;
|
|
8001f64: 2301 movs r3, #1
|
|
8001f66: 74fb strb r3, [r7, #19]
|
|
|
|
descidx = heth->RxDescList.RxBuildDescIdx;
|
|
8001f68: 687b ldr r3, [r7, #4]
|
|
8001f6a: 6e9b ldr r3, [r3, #104] ; 0x68
|
|
8001f6c: 61fb str r3, [r7, #28]
|
|
dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
|
|
8001f6e: 687b ldr r3, [r7, #4]
|
|
8001f70: 69fa ldr r2, [r7, #28]
|
|
8001f72: 3212 adds r2, #18
|
|
8001f74: f853 3022 ldr.w r3, [r3, r2, lsl #2]
|
|
8001f78: 617b str r3, [r7, #20]
|
|
desccount = heth->RxDescList.RxBuildDescCnt;
|
|
8001f7a: 687b ldr r3, [r7, #4]
|
|
8001f7c: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
8001f7e: 61bb str r3, [r7, #24]
|
|
|
|
while ((desccount > 0U) && (allocStatus != 0U))
|
|
8001f80: e040 b.n 8002004 <ETH_UpdateDescriptor+0xac>
|
|
{
|
|
/* Check if a buffer's attached the descriptor */
|
|
if (READ_REG(dmarxdesc->BackupAddr0) == 0U)
|
|
8001f82: 697b ldr r3, [r7, #20]
|
|
8001f84: 6a1b ldr r3, [r3, #32]
|
|
8001f86: 2b00 cmp r3, #0
|
|
8001f88: d112 bne.n 8001fb0 <ETH_UpdateDescriptor+0x58>
|
|
#if (USE_HAL_ETH_REGISTER_CALLBACKS == 1)
|
|
/*Call registered Allocate callback*/
|
|
heth->rxAllocateCallback(&buff);
|
|
#else
|
|
/* Allocate callback */
|
|
HAL_ETH_RxAllocateCallback(&buff);
|
|
8001f8a: f107 030c add.w r3, r7, #12
|
|
8001f8e: 4618 mov r0, r3
|
|
8001f90: f002 f960 bl 8004254 <HAL_ETH_RxAllocateCallback>
|
|
#endif /* USE_HAL_ETH_REGISTER_CALLBACKS */
|
|
if (buff == NULL)
|
|
8001f94: 68fb ldr r3, [r7, #12]
|
|
8001f96: 2b00 cmp r3, #0
|
|
8001f98: d102 bne.n 8001fa0 <ETH_UpdateDescriptor+0x48>
|
|
{
|
|
allocStatus = 0U;
|
|
8001f9a: 2300 movs r3, #0
|
|
8001f9c: 74fb strb r3, [r7, #19]
|
|
8001f9e: e007 b.n 8001fb0 <ETH_UpdateDescriptor+0x58>
|
|
}
|
|
else
|
|
{
|
|
WRITE_REG(dmarxdesc->BackupAddr0, (uint32_t)buff);
|
|
8001fa0: 68fb ldr r3, [r7, #12]
|
|
8001fa2: 461a mov r2, r3
|
|
8001fa4: 697b ldr r3, [r7, #20]
|
|
8001fa6: 621a str r2, [r3, #32]
|
|
WRITE_REG(dmarxdesc->DESC2, (uint32_t)buff);
|
|
8001fa8: 68fb ldr r3, [r7, #12]
|
|
8001faa: 461a mov r2, r3
|
|
8001fac: 697b ldr r3, [r7, #20]
|
|
8001fae: 609a str r2, [r3, #8]
|
|
}
|
|
}
|
|
|
|
if (allocStatus != 0U)
|
|
8001fb0: 7cfb ldrb r3, [r7, #19]
|
|
8001fb2: 2b00 cmp r3, #0
|
|
8001fb4: d026 beq.n 8002004 <ETH_UpdateDescriptor+0xac>
|
|
{
|
|
if (heth->RxDescList.ItMode == 0U)
|
|
8001fb6: 687b ldr r3, [r7, #4]
|
|
8001fb8: 6d9b ldr r3, [r3, #88] ; 0x58
|
|
8001fba: 2b00 cmp r3, #0
|
|
8001fbc: d103 bne.n 8001fc6 <ETH_UpdateDescriptor+0x6e>
|
|
{
|
|
WRITE_REG(dmarxdesc->DESC1, ETH_DMARXDESC_DIC | ETH_RX_BUF_SIZE | ETH_DMARXDESC_RCH);
|
|
8001fbe: 697b ldr r3, [r7, #20]
|
|
8001fc0: 4a1e ldr r2, [pc, #120] ; (800203c <ETH_UpdateDescriptor+0xe4>)
|
|
8001fc2: 605a str r2, [r3, #4]
|
|
8001fc4: e003 b.n 8001fce <ETH_UpdateDescriptor+0x76>
|
|
}
|
|
else
|
|
{
|
|
WRITE_REG(dmarxdesc->DESC1, ETH_RX_BUF_SIZE | ETH_DMARXDESC_RCH);
|
|
8001fc6: 697b ldr r3, [r7, #20]
|
|
8001fc8: f244 52f8 movw r2, #17912 ; 0x45f8
|
|
8001fcc: 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");
|
|
8001fce: f3bf 8f5f dmb sy
|
|
}
|
|
8001fd2: 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);
|
|
8001fd4: 697b ldr r3, [r7, #20]
|
|
8001fd6: 681b ldr r3, [r3, #0]
|
|
8001fd8: f043 4200 orr.w r2, r3, #2147483648 ; 0x80000000
|
|
8001fdc: 697b ldr r3, [r7, #20]
|
|
8001fde: 601a str r2, [r3, #0]
|
|
|
|
/* Increment current rx descriptor index */
|
|
INCR_RX_DESC_INDEX(descidx, 1U);
|
|
8001fe0: 69fb ldr r3, [r7, #28]
|
|
8001fe2: 3301 adds r3, #1
|
|
8001fe4: 61fb str r3, [r7, #28]
|
|
8001fe6: 69fb ldr r3, [r7, #28]
|
|
8001fe8: 2b03 cmp r3, #3
|
|
8001fea: d902 bls.n 8001ff2 <ETH_UpdateDescriptor+0x9a>
|
|
8001fec: 69fb ldr r3, [r7, #28]
|
|
8001fee: 3b04 subs r3, #4
|
|
8001ff0: 61fb str r3, [r7, #28]
|
|
/* Get current descriptor address */
|
|
dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
|
|
8001ff2: 687b ldr r3, [r7, #4]
|
|
8001ff4: 69fa ldr r2, [r7, #28]
|
|
8001ff6: 3212 adds r2, #18
|
|
8001ff8: f853 3022 ldr.w r3, [r3, r2, lsl #2]
|
|
8001ffc: 617b str r3, [r7, #20]
|
|
desccount--;
|
|
8001ffe: 69bb ldr r3, [r7, #24]
|
|
8002000: 3b01 subs r3, #1
|
|
8002002: 61bb str r3, [r7, #24]
|
|
while ((desccount > 0U) && (allocStatus != 0U))
|
|
8002004: 69bb ldr r3, [r7, #24]
|
|
8002006: 2b00 cmp r3, #0
|
|
8002008: d002 beq.n 8002010 <ETH_UpdateDescriptor+0xb8>
|
|
800200a: 7cfb ldrb r3, [r7, #19]
|
|
800200c: 2b00 cmp r3, #0
|
|
800200e: d1b8 bne.n 8001f82 <ETH_UpdateDescriptor+0x2a>
|
|
}
|
|
}
|
|
|
|
if (heth->RxDescList.RxBuildDescCnt != desccount)
|
|
8002010: 687b ldr r3, [r7, #4]
|
|
8002012: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
8002014: 69ba ldr r2, [r7, #24]
|
|
8002016: 429a cmp r2, r3
|
|
8002018: d00c beq.n 8002034 <ETH_UpdateDescriptor+0xdc>
|
|
{
|
|
/* Set the Tail pointer address */
|
|
WRITE_REG(heth->Instance->DMARPDR, 0);
|
|
800201a: 687b ldr r3, [r7, #4]
|
|
800201c: 681b ldr r3, [r3, #0]
|
|
800201e: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
8002022: 461a mov r2, r3
|
|
8002024: 2300 movs r3, #0
|
|
8002026: 6093 str r3, [r2, #8]
|
|
|
|
heth->RxDescList.RxBuildDescIdx = descidx;
|
|
8002028: 687b ldr r3, [r7, #4]
|
|
800202a: 69fa ldr r2, [r7, #28]
|
|
800202c: 669a str r2, [r3, #104] ; 0x68
|
|
heth->RxDescList.RxBuildDescCnt = desccount;
|
|
800202e: 687b ldr r3, [r7, #4]
|
|
8002030: 69ba ldr r2, [r7, #24]
|
|
8002032: 66da str r2, [r3, #108] ; 0x6c
|
|
}
|
|
}
|
|
8002034: bf00 nop
|
|
8002036: 3720 adds r7, #32
|
|
8002038: 46bd mov sp, r7
|
|
800203a: bd80 pop {r7, pc}
|
|
800203c: 800045f8 .word 0x800045f8
|
|
|
|
08002040 <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)
|
|
{
|
|
8002040: b580 push {r7, lr}
|
|
8002042: b086 sub sp, #24
|
|
8002044: af00 add r7, sp, #0
|
|
8002046: 60f8 str r0, [r7, #12]
|
|
8002048: 60b9 str r1, [r7, #8]
|
|
800204a: 607a str r2, [r7, #4]
|
|
800204c: 603b str r3, [r7, #0]
|
|
uint32_t tmpreg1;
|
|
uint32_t tickstart;
|
|
|
|
/* Get the ETHERNET MACMIIAR value */
|
|
tmpreg1 = heth->Instance->MACMIIAR;
|
|
800204e: 68fb ldr r3, [r7, #12]
|
|
8002050: 681b ldr r3, [r3, #0]
|
|
8002052: 691b ldr r3, [r3, #16]
|
|
8002054: 617b str r3, [r7, #20]
|
|
|
|
/* Keep only the CSR Clock Range CR[2:0] bits value */
|
|
tmpreg1 &= ~ETH_MACMIIAR_CR_MASK;
|
|
8002056: 697b ldr r3, [r7, #20]
|
|
8002058: f003 031c and.w r3, r3, #28
|
|
800205c: 617b str r3, [r7, #20]
|
|
|
|
/* Prepare the MII address register value */
|
|
tmpreg1 |= ((PHYAddr << 11U) & ETH_MACMIIAR_PA); /* Set the PHY device address */
|
|
800205e: 68bb ldr r3, [r7, #8]
|
|
8002060: 02db lsls r3, r3, #11
|
|
8002062: b29b uxth r3, r3
|
|
8002064: 697a ldr r2, [r7, #20]
|
|
8002066: 4313 orrs r3, r2
|
|
8002068: 617b str r3, [r7, #20]
|
|
tmpreg1 |= (((uint32_t)PHYReg << 6U) & ETH_MACMIIAR_MR); /* Set the PHY register address */
|
|
800206a: 687b ldr r3, [r7, #4]
|
|
800206c: 019b lsls r3, r3, #6
|
|
800206e: f403 63f8 and.w r3, r3, #1984 ; 0x7c0
|
|
8002072: 697a ldr r2, [r7, #20]
|
|
8002074: 4313 orrs r3, r2
|
|
8002076: 617b str r3, [r7, #20]
|
|
tmpreg1 &= ~ETH_MACMIIAR_MW; /* Set the read mode */
|
|
8002078: 697b ldr r3, [r7, #20]
|
|
800207a: f023 0302 bic.w r3, r3, #2
|
|
800207e: 617b str r3, [r7, #20]
|
|
tmpreg1 |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */
|
|
8002080: 697b ldr r3, [r7, #20]
|
|
8002082: f043 0301 orr.w r3, r3, #1
|
|
8002086: 617b str r3, [r7, #20]
|
|
|
|
/* Write the result value into the MII Address register */
|
|
heth->Instance->MACMIIAR = tmpreg1;
|
|
8002088: 68fb ldr r3, [r7, #12]
|
|
800208a: 681b ldr r3, [r3, #0]
|
|
800208c: 697a ldr r2, [r7, #20]
|
|
800208e: 611a str r2, [r3, #16]
|
|
|
|
|
|
tickstart = HAL_GetTick();
|
|
8002090: f7ff fbbe bl 8001810 <HAL_GetTick>
|
|
8002094: 6138 str r0, [r7, #16]
|
|
|
|
/* Check for the Busy flag */
|
|
while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
|
|
8002096: e00d b.n 80020b4 <HAL_ETH_ReadPHYRegister+0x74>
|
|
{
|
|
/* Check for the Timeout */
|
|
if ((HAL_GetTick() - tickstart) > PHY_READ_TO)
|
|
8002098: f7ff fbba bl 8001810 <HAL_GetTick>
|
|
800209c: 4602 mov r2, r0
|
|
800209e: 693b ldr r3, [r7, #16]
|
|
80020a0: 1ad3 subs r3, r2, r3
|
|
80020a2: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
|
|
80020a6: d301 bcc.n 80020ac <HAL_ETH_ReadPHYRegister+0x6c>
|
|
{
|
|
return HAL_ERROR;
|
|
80020a8: 2301 movs r3, #1
|
|
80020aa: e010 b.n 80020ce <HAL_ETH_ReadPHYRegister+0x8e>
|
|
}
|
|
|
|
tmpreg1 = heth->Instance->MACMIIAR;
|
|
80020ac: 68fb ldr r3, [r7, #12]
|
|
80020ae: 681b ldr r3, [r3, #0]
|
|
80020b0: 691b ldr r3, [r3, #16]
|
|
80020b2: 617b str r3, [r7, #20]
|
|
while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
|
|
80020b4: 697b ldr r3, [r7, #20]
|
|
80020b6: f003 0301 and.w r3, r3, #1
|
|
80020ba: 2b00 cmp r3, #0
|
|
80020bc: d1ec bne.n 8002098 <HAL_ETH_ReadPHYRegister+0x58>
|
|
}
|
|
|
|
/* Get MACMIIDR value */
|
|
*pRegValue = (uint16_t)(heth->Instance->MACMIIDR);
|
|
80020be: 68fb ldr r3, [r7, #12]
|
|
80020c0: 681b ldr r3, [r3, #0]
|
|
80020c2: 695b ldr r3, [r3, #20]
|
|
80020c4: b29b uxth r3, r3
|
|
80020c6: 461a mov r2, r3
|
|
80020c8: 683b ldr r3, [r7, #0]
|
|
80020ca: 601a str r2, [r3, #0]
|
|
|
|
return HAL_OK;
|
|
80020cc: 2300 movs r3, #0
|
|
}
|
|
80020ce: 4618 mov r0, r3
|
|
80020d0: 3718 adds r7, #24
|
|
80020d2: 46bd mov sp, r7
|
|
80020d4: bd80 pop {r7, pc}
|
|
|
|
080020d6 <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)
|
|
{
|
|
80020d6: b580 push {r7, lr}
|
|
80020d8: b086 sub sp, #24
|
|
80020da: af00 add r7, sp, #0
|
|
80020dc: 60f8 str r0, [r7, #12]
|
|
80020de: 60b9 str r1, [r7, #8]
|
|
80020e0: 607a str r2, [r7, #4]
|
|
80020e2: 603b str r3, [r7, #0]
|
|
uint32_t tmpreg1;
|
|
uint32_t tickstart;
|
|
|
|
/* Get the ETHERNET MACMIIAR value */
|
|
tmpreg1 = heth->Instance->MACMIIAR;
|
|
80020e4: 68fb ldr r3, [r7, #12]
|
|
80020e6: 681b ldr r3, [r3, #0]
|
|
80020e8: 691b ldr r3, [r3, #16]
|
|
80020ea: 617b str r3, [r7, #20]
|
|
|
|
/* Keep only the CSR Clock Range CR[2:0] bits value */
|
|
tmpreg1 &= ~ETH_MACMIIAR_CR_MASK;
|
|
80020ec: 697b ldr r3, [r7, #20]
|
|
80020ee: f003 031c and.w r3, r3, #28
|
|
80020f2: 617b str r3, [r7, #20]
|
|
|
|
/* Prepare the MII register address value */
|
|
tmpreg1 |= ((PHYAddr << 11U) & ETH_MACMIIAR_PA); /* Set the PHY device address */
|
|
80020f4: 68bb ldr r3, [r7, #8]
|
|
80020f6: 02db lsls r3, r3, #11
|
|
80020f8: b29b uxth r3, r3
|
|
80020fa: 697a ldr r2, [r7, #20]
|
|
80020fc: 4313 orrs r3, r2
|
|
80020fe: 617b str r3, [r7, #20]
|
|
tmpreg1 |= (((uint32_t)PHYReg << 6U) & ETH_MACMIIAR_MR); /* Set the PHY register address */
|
|
8002100: 687b ldr r3, [r7, #4]
|
|
8002102: 019b lsls r3, r3, #6
|
|
8002104: f403 63f8 and.w r3, r3, #1984 ; 0x7c0
|
|
8002108: 697a ldr r2, [r7, #20]
|
|
800210a: 4313 orrs r3, r2
|
|
800210c: 617b str r3, [r7, #20]
|
|
tmpreg1 |= ETH_MACMIIAR_MW; /* Set the write mode */
|
|
800210e: 697b ldr r3, [r7, #20]
|
|
8002110: f043 0302 orr.w r3, r3, #2
|
|
8002114: 617b str r3, [r7, #20]
|
|
tmpreg1 |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */
|
|
8002116: 697b ldr r3, [r7, #20]
|
|
8002118: f043 0301 orr.w r3, r3, #1
|
|
800211c: 617b str r3, [r7, #20]
|
|
|
|
/* Give the value to the MII data register */
|
|
heth->Instance->MACMIIDR = (uint16_t)RegValue;
|
|
800211e: 683b ldr r3, [r7, #0]
|
|
8002120: b29a uxth r2, r3
|
|
8002122: 68fb ldr r3, [r7, #12]
|
|
8002124: 681b ldr r3, [r3, #0]
|
|
8002126: 615a str r2, [r3, #20]
|
|
|
|
/* Write the result value into the MII Address register */
|
|
heth->Instance->MACMIIAR = tmpreg1;
|
|
8002128: 68fb ldr r3, [r7, #12]
|
|
800212a: 681b ldr r3, [r3, #0]
|
|
800212c: 697a ldr r2, [r7, #20]
|
|
800212e: 611a str r2, [r3, #16]
|
|
|
|
/* Get tick */
|
|
tickstart = HAL_GetTick();
|
|
8002130: f7ff fb6e bl 8001810 <HAL_GetTick>
|
|
8002134: 6138 str r0, [r7, #16]
|
|
|
|
/* Check for the Busy flag */
|
|
while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
|
|
8002136: e00d b.n 8002154 <HAL_ETH_WritePHYRegister+0x7e>
|
|
{
|
|
/* Check for the Timeout */
|
|
if ((HAL_GetTick() - tickstart) > PHY_WRITE_TO)
|
|
8002138: f7ff fb6a bl 8001810 <HAL_GetTick>
|
|
800213c: 4602 mov r2, r0
|
|
800213e: 693b ldr r3, [r7, #16]
|
|
8002140: 1ad3 subs r3, r2, r3
|
|
8002142: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
|
|
8002146: d301 bcc.n 800214c <HAL_ETH_WritePHYRegister+0x76>
|
|
{
|
|
return HAL_ERROR;
|
|
8002148: 2301 movs r3, #1
|
|
800214a: e009 b.n 8002160 <HAL_ETH_WritePHYRegister+0x8a>
|
|
}
|
|
|
|
tmpreg1 = heth->Instance->MACMIIAR;
|
|
800214c: 68fb ldr r3, [r7, #12]
|
|
800214e: 681b ldr r3, [r3, #0]
|
|
8002150: 691b ldr r3, [r3, #16]
|
|
8002152: 617b str r3, [r7, #20]
|
|
while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
|
|
8002154: 697b ldr r3, [r7, #20]
|
|
8002156: f003 0301 and.w r3, r3, #1
|
|
800215a: 2b00 cmp r3, #0
|
|
800215c: d1ec bne.n 8002138 <HAL_ETH_WritePHYRegister+0x62>
|
|
}
|
|
|
|
return HAL_OK;
|
|
800215e: 2300 movs r3, #0
|
|
}
|
|
8002160: 4618 mov r0, r3
|
|
8002162: 3718 adds r7, #24
|
|
8002164: 46bd mov sp, r7
|
|
8002166: bd80 pop {r7, pc}
|
|
|
|
08002168 <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)
|
|
{
|
|
8002168: b480 push {r7}
|
|
800216a: b083 sub sp, #12
|
|
800216c: af00 add r7, sp, #0
|
|
800216e: 6078 str r0, [r7, #4]
|
|
8002170: 6039 str r1, [r7, #0]
|
|
if (macconf == NULL)
|
|
8002172: 683b ldr r3, [r7, #0]
|
|
8002174: 2b00 cmp r3, #0
|
|
8002176: d101 bne.n 800217c <HAL_ETH_GetMACConfig+0x14>
|
|
{
|
|
return HAL_ERROR;
|
|
8002178: 2301 movs r3, #1
|
|
800217a: e0d9 b.n 8002330 <HAL_ETH_GetMACConfig+0x1c8>
|
|
}
|
|
|
|
/* Get MAC parameters */
|
|
macconf->DeferralCheck = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DC) >> 4) > 0U) ? ENABLE : DISABLE;
|
|
800217c: 687b ldr r3, [r7, #4]
|
|
800217e: 681b ldr r3, [r3, #0]
|
|
8002180: 681b ldr r3, [r3, #0]
|
|
8002182: f003 0310 and.w r3, r3, #16
|
|
8002186: 2b00 cmp r3, #0
|
|
8002188: bf14 ite ne
|
|
800218a: 2301 movne r3, #1
|
|
800218c: 2300 moveq r3, #0
|
|
800218e: b2db uxtb r3, r3
|
|
8002190: 461a mov r2, r3
|
|
8002192: 683b ldr r3, [r7, #0]
|
|
8002194: f883 2028 strb.w r2, [r3, #40] ; 0x28
|
|
macconf->BackOffLimit = READ_BIT(heth->Instance->MACCR, ETH_MACCR_BL);
|
|
8002198: 687b ldr r3, [r7, #4]
|
|
800219a: 681b ldr r3, [r3, #0]
|
|
800219c: 681b ldr r3, [r3, #0]
|
|
800219e: f003 0260 and.w r2, r3, #96 ; 0x60
|
|
80021a2: 683b ldr r3, [r7, #0]
|
|
80021a4: 625a str r2, [r3, #36] ; 0x24
|
|
macconf->RetryTransmission = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_RD) >> 9) == 0U) ? ENABLE : DISABLE;
|
|
80021a6: 687b ldr r3, [r7, #4]
|
|
80021a8: 681b ldr r3, [r3, #0]
|
|
80021aa: 681b ldr r3, [r3, #0]
|
|
80021ac: f403 7300 and.w r3, r3, #512 ; 0x200
|
|
80021b0: 2b00 cmp r3, #0
|
|
80021b2: bf0c ite eq
|
|
80021b4: 2301 moveq r3, #1
|
|
80021b6: 2300 movne r3, #0
|
|
80021b8: b2db uxtb r3, r3
|
|
80021ba: 461a mov r2, r3
|
|
80021bc: 683b ldr r3, [r7, #0]
|
|
80021be: f883 2020 strb.w r2, [r3, #32]
|
|
macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_CSD) >> 16) > 0U)
|
|
80021c2: 687b ldr r3, [r7, #4]
|
|
80021c4: 681b ldr r3, [r3, #0]
|
|
80021c6: 681b ldr r3, [r3, #0]
|
|
80021c8: f403 3380 and.w r3, r3, #65536 ; 0x10000
|
|
? ENABLE : DISABLE;
|
|
80021cc: 2b00 cmp r3, #0
|
|
80021ce: bf14 ite ne
|
|
80021d0: 2301 movne r3, #1
|
|
80021d2: 2300 moveq r3, #0
|
|
80021d4: b2db uxtb r3, r3
|
|
80021d6: 461a mov r2, r3
|
|
macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_CSD) >> 16) > 0U)
|
|
80021d8: 683b ldr r3, [r7, #0]
|
|
80021da: 77da strb r2, [r3, #31]
|
|
macconf->ReceiveOwn = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_ROD) >> 13) == 0U) ? ENABLE : DISABLE;
|
|
80021dc: 687b ldr r3, [r7, #4]
|
|
80021de: 681b ldr r3, [r3, #0]
|
|
80021e0: 681b ldr r3, [r3, #0]
|
|
80021e2: f403 5300 and.w r3, r3, #8192 ; 0x2000
|
|
80021e6: 2b00 cmp r3, #0
|
|
80021e8: bf0c ite eq
|
|
80021ea: 2301 moveq r3, #1
|
|
80021ec: 2300 movne r3, #0
|
|
80021ee: b2db uxtb r3, r3
|
|
80021f0: 461a mov r2, r3
|
|
80021f2: 683b ldr r3, [r7, #0]
|
|
80021f4: 779a strb r2, [r3, #30]
|
|
macconf->LoopbackMode = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_LM) >> 12) > 0U) ? ENABLE : DISABLE;
|
|
80021f6: 687b ldr r3, [r7, #4]
|
|
80021f8: 681b ldr r3, [r3, #0]
|
|
80021fa: 681b ldr r3, [r3, #0]
|
|
80021fc: f403 5380 and.w r3, r3, #4096 ; 0x1000
|
|
8002200: 2b00 cmp r3, #0
|
|
8002202: bf14 ite ne
|
|
8002204: 2301 movne r3, #1
|
|
8002206: 2300 moveq r3, #0
|
|
8002208: b2db uxtb r3, r3
|
|
800220a: 461a mov r2, r3
|
|
800220c: 683b ldr r3, [r7, #0]
|
|
800220e: 771a strb r2, [r3, #28]
|
|
macconf->DuplexMode = READ_BIT(heth->Instance->MACCR, ETH_MACCR_DM);
|
|
8002210: 687b ldr r3, [r7, #4]
|
|
8002212: 681b ldr r3, [r3, #0]
|
|
8002214: 681b ldr r3, [r3, #0]
|
|
8002216: f403 6200 and.w r2, r3, #2048 ; 0x800
|
|
800221a: 683b ldr r3, [r7, #0]
|
|
800221c: 619a str r2, [r3, #24]
|
|
macconf->Speed = READ_BIT(heth->Instance->MACCR, ETH_MACCR_FES);
|
|
800221e: 687b ldr r3, [r7, #4]
|
|
8002220: 681b ldr r3, [r3, #0]
|
|
8002222: 681b ldr r3, [r3, #0]
|
|
8002224: f403 4280 and.w r2, r3, #16384 ; 0x4000
|
|
8002228: 683b ldr r3, [r7, #0]
|
|
800222a: 615a str r2, [r3, #20]
|
|
macconf->Jabber = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_JD) >> 22) == 0U) ? ENABLE : DISABLE;
|
|
800222c: 687b ldr r3, [r7, #4]
|
|
800222e: 681b ldr r3, [r3, #0]
|
|
8002230: 681b ldr r3, [r3, #0]
|
|
8002232: f403 0380 and.w r3, r3, #4194304 ; 0x400000
|
|
8002236: 2b00 cmp r3, #0
|
|
8002238: bf0c ite eq
|
|
800223a: 2301 moveq r3, #1
|
|
800223c: 2300 movne r3, #0
|
|
800223e: b2db uxtb r3, r3
|
|
8002240: 461a mov r2, r3
|
|
8002242: 683b ldr r3, [r7, #0]
|
|
8002244: 745a strb r2, [r3, #17]
|
|
macconf->Watchdog = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_WD) >> 23) == 0U) ? ENABLE : DISABLE;
|
|
8002246: 687b ldr r3, [r7, #4]
|
|
8002248: 681b ldr r3, [r3, #0]
|
|
800224a: 681b ldr r3, [r3, #0]
|
|
800224c: f403 0300 and.w r3, r3, #8388608 ; 0x800000
|
|
8002250: 2b00 cmp r3, #0
|
|
8002252: bf0c ite eq
|
|
8002254: 2301 moveq r3, #1
|
|
8002256: 2300 movne r3, #0
|
|
8002258: b2db uxtb r3, r3
|
|
800225a: 461a mov r2, r3
|
|
800225c: 683b ldr r3, [r7, #0]
|
|
800225e: 741a strb r2, [r3, #16]
|
|
macconf->AutomaticPadCRCStrip = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_APCS) >> 7) > 0U) ? ENABLE : DISABLE;
|
|
8002260: 687b ldr r3, [r7, #4]
|
|
8002262: 681b ldr r3, [r3, #0]
|
|
8002264: 681b ldr r3, [r3, #0]
|
|
8002266: f003 0380 and.w r3, r3, #128 ; 0x80
|
|
800226a: 2b00 cmp r3, #0
|
|
800226c: bf14 ite ne
|
|
800226e: 2301 movne r3, #1
|
|
8002270: 2300 moveq r3, #0
|
|
8002272: b2db uxtb r3, r3
|
|
8002274: 461a mov r2, r3
|
|
8002276: 683b ldr r3, [r7, #0]
|
|
8002278: 73da strb r2, [r3, #15]
|
|
macconf->InterPacketGapVal = READ_BIT(heth->Instance->MACCR, ETH_MACCR_IFG);
|
|
800227a: 687b ldr r3, [r7, #4]
|
|
800227c: 681b ldr r3, [r3, #0]
|
|
800227e: 681b ldr r3, [r3, #0]
|
|
8002280: f403 2260 and.w r2, r3, #917504 ; 0xe0000
|
|
8002284: 683b ldr r3, [r7, #0]
|
|
8002286: 609a str r2, [r3, #8]
|
|
macconf->ChecksumOffload = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_IPCO) >> 10U) > 0U) ? ENABLE : DISABLE;
|
|
8002288: 687b ldr r3, [r7, #4]
|
|
800228a: 681b ldr r3, [r3, #0]
|
|
800228c: 681b ldr r3, [r3, #0]
|
|
800228e: f403 6380 and.w r3, r3, #1024 ; 0x400
|
|
8002292: 2b00 cmp r3, #0
|
|
8002294: bf14 ite ne
|
|
8002296: 2301 movne r3, #1
|
|
8002298: 2300 moveq r3, #0
|
|
800229a: b2db uxtb r3, r3
|
|
800229c: 461a mov r2, r3
|
|
800229e: 683b ldr r3, [r7, #0]
|
|
80022a0: 711a strb r2, [r3, #4]
|
|
|
|
|
|
macconf->TransmitFlowControl = ((READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_TFCE) >> 1) > 0U) ? ENABLE : DISABLE;
|
|
80022a2: 687b ldr r3, [r7, #4]
|
|
80022a4: 681b ldr r3, [r3, #0]
|
|
80022a6: 699b ldr r3, [r3, #24]
|
|
80022a8: f003 0302 and.w r3, r3, #2
|
|
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
|
|
80022b8: 683b ldr r3, [r7, #0]
|
|
80022ba: f883 2054 strb.w r2, [r3, #84] ; 0x54
|
|
macconf->ZeroQuantaPause = ((READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_ZQPD) >> 7) == 0U) ? ENABLE : DISABLE;
|
|
80022be: 687b ldr r3, [r7, #4]
|
|
80022c0: 681b ldr r3, [r3, #0]
|
|
80022c2: 699b ldr r3, [r3, #24]
|
|
80022c4: f003 0380 and.w r3, r3, #128 ; 0x80
|
|
80022c8: 2b00 cmp r3, #0
|
|
80022ca: bf0c ite eq
|
|
80022cc: 2301 moveq r3, #1
|
|
80022ce: 2300 movne r3, #0
|
|
80022d0: b2db uxtb r3, r3
|
|
80022d2: 461a mov r2, r3
|
|
80022d4: 683b ldr r3, [r7, #0]
|
|
80022d6: f883 204c strb.w r2, [r3, #76] ; 0x4c
|
|
macconf->PauseLowThreshold = READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_PLT);
|
|
80022da: 687b ldr r3, [r7, #4]
|
|
80022dc: 681b ldr r3, [r3, #0]
|
|
80022de: 699b ldr r3, [r3, #24]
|
|
80022e0: f003 0230 and.w r2, r3, #48 ; 0x30
|
|
80022e4: 683b ldr r3, [r7, #0]
|
|
80022e6: 651a str r2, [r3, #80] ; 0x50
|
|
macconf->PauseTime = (READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_PT) >> 16);
|
|
80022e8: 687b ldr r3, [r7, #4]
|
|
80022ea: 681b ldr r3, [r3, #0]
|
|
80022ec: 699b ldr r3, [r3, #24]
|
|
80022ee: 0c1b lsrs r3, r3, #16
|
|
80022f0: b29a uxth r2, r3
|
|
80022f2: 683b ldr r3, [r7, #0]
|
|
80022f4: 649a str r2, [r3, #72] ; 0x48
|
|
macconf->ReceiveFlowControl = ((READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_RFCE) >> 2U) > 0U) ? ENABLE : DISABLE;
|
|
80022f6: 687b ldr r3, [r7, #4]
|
|
80022f8: 681b ldr r3, [r3, #0]
|
|
80022fa: 699b ldr r3, [r3, #24]
|
|
80022fc: f003 0304 and.w r3, r3, #4
|
|
8002300: 2b00 cmp r3, #0
|
|
8002302: bf14 ite ne
|
|
8002304: 2301 movne r3, #1
|
|
8002306: 2300 moveq r3, #0
|
|
8002308: b2db uxtb r3, r3
|
|
800230a: 461a mov r2, r3
|
|
800230c: 683b ldr r3, [r7, #0]
|
|
800230e: f883 2056 strb.w r2, [r3, #86] ; 0x56
|
|
macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_UPFD) >> 3U) > 0U)
|
|
8002312: 687b ldr r3, [r7, #4]
|
|
8002314: 681b ldr r3, [r3, #0]
|
|
8002316: 699b ldr r3, [r3, #24]
|
|
8002318: f003 0308 and.w r3, r3, #8
|
|
? ENABLE : DISABLE;
|
|
800231c: 2b00 cmp r3, #0
|
|
800231e: bf14 ite ne
|
|
8002320: 2301 movne r3, #1
|
|
8002322: 2300 moveq r3, #0
|
|
8002324: b2db uxtb r3, r3
|
|
8002326: 461a mov r2, r3
|
|
macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_UPFD) >> 3U) > 0U)
|
|
8002328: 683b ldr r3, [r7, #0]
|
|
800232a: f883 2055 strb.w r2, [r3, #85] ; 0x55
|
|
|
|
return HAL_OK;
|
|
800232e: 2300 movs r3, #0
|
|
}
|
|
8002330: 4618 mov r0, r3
|
|
8002332: 370c adds r7, #12
|
|
8002334: 46bd mov sp, r7
|
|
8002336: f85d 7b04 ldr.w r7, [sp], #4
|
|
800233a: 4770 bx lr
|
|
|
|
0800233c <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)
|
|
{
|
|
800233c: b580 push {r7, lr}
|
|
800233e: b082 sub sp, #8
|
|
8002340: af00 add r7, sp, #0
|
|
8002342: 6078 str r0, [r7, #4]
|
|
8002344: 6039 str r1, [r7, #0]
|
|
if (macconf == NULL)
|
|
8002346: 683b ldr r3, [r7, #0]
|
|
8002348: 2b00 cmp r3, #0
|
|
800234a: d101 bne.n 8002350 <HAL_ETH_SetMACConfig+0x14>
|
|
{
|
|
return HAL_ERROR;
|
|
800234c: 2301 movs r3, #1
|
|
800234e: e00b b.n 8002368 <HAL_ETH_SetMACConfig+0x2c>
|
|
}
|
|
|
|
if (heth->gState == HAL_ETH_STATE_READY)
|
|
8002350: 687b ldr r3, [r7, #4]
|
|
8002352: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
|
|
8002356: 2b10 cmp r3, #16
|
|
8002358: d105 bne.n 8002366 <HAL_ETH_SetMACConfig+0x2a>
|
|
{
|
|
ETH_SetMACConfig(heth, macconf);
|
|
800235a: 6839 ldr r1, [r7, #0]
|
|
800235c: 6878 ldr r0, [r7, #4]
|
|
800235e: f000 f883 bl 8002468 <ETH_SetMACConfig>
|
|
|
|
return HAL_OK;
|
|
8002362: 2300 movs r3, #0
|
|
8002364: e000 b.n 8002368 <HAL_ETH_SetMACConfig+0x2c>
|
|
}
|
|
else
|
|
{
|
|
return HAL_ERROR;
|
|
8002366: 2301 movs r3, #1
|
|
}
|
|
}
|
|
8002368: 4618 mov r0, r3
|
|
800236a: 3708 adds r7, #8
|
|
800236c: 46bd mov sp, r7
|
|
800236e: bd80 pop {r7, pc}
|
|
|
|
08002370 <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)
|
|
{
|
|
8002370: b580 push {r7, lr}
|
|
8002372: b084 sub sp, #16
|
|
8002374: af00 add r7, sp, #0
|
|
8002376: 6078 str r0, [r7, #4]
|
|
uint32_t hclk;
|
|
uint32_t tmpreg;
|
|
|
|
/* Get the ETHERNET MACMIIAR value */
|
|
tmpreg = (heth->Instance)->MACMIIAR;
|
|
8002378: 687b ldr r3, [r7, #4]
|
|
800237a: 681b ldr r3, [r3, #0]
|
|
800237c: 691b ldr r3, [r3, #16]
|
|
800237e: 60fb str r3, [r7, #12]
|
|
/* Clear CSR Clock Range CR[2:0] bits */
|
|
tmpreg &= ETH_MACMIIAR_CR_MASK;
|
|
8002380: 68fb ldr r3, [r7, #12]
|
|
8002382: f023 031c bic.w r3, r3, #28
|
|
8002386: 60fb str r3, [r7, #12]
|
|
|
|
/* Get hclk frequency value */
|
|
hclk = HAL_RCC_GetHCLKFreq();
|
|
8002388: f001 fa38 bl 80037fc <HAL_RCC_GetHCLKFreq>
|
|
800238c: 60b8 str r0, [r7, #8]
|
|
|
|
/* Set CR bits depending on hclk value */
|
|
if ((hclk >= 20000000U) && (hclk < 35000000U))
|
|
800238e: 68bb ldr r3, [r7, #8]
|
|
8002390: 4a1d ldr r2, [pc, #116] ; (8002408 <HAL_ETH_SetMDIOClockRange+0x98>)
|
|
8002392: 4293 cmp r3, r2
|
|
8002394: d908 bls.n 80023a8 <HAL_ETH_SetMDIOClockRange+0x38>
|
|
8002396: 68bb ldr r3, [r7, #8]
|
|
8002398: 4a1c ldr r2, [pc, #112] ; (800240c <HAL_ETH_SetMDIOClockRange+0x9c>)
|
|
800239a: 4293 cmp r3, r2
|
|
800239c: d804 bhi.n 80023a8 <HAL_ETH_SetMDIOClockRange+0x38>
|
|
{
|
|
/* CSR Clock Range between 20-35 MHz */
|
|
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div16;
|
|
800239e: 68fb ldr r3, [r7, #12]
|
|
80023a0: f043 0308 orr.w r3, r3, #8
|
|
80023a4: 60fb str r3, [r7, #12]
|
|
80023a6: e027 b.n 80023f8 <HAL_ETH_SetMDIOClockRange+0x88>
|
|
}
|
|
else if ((hclk >= 35000000U) && (hclk < 60000000U))
|
|
80023a8: 68bb ldr r3, [r7, #8]
|
|
80023aa: 4a18 ldr r2, [pc, #96] ; (800240c <HAL_ETH_SetMDIOClockRange+0x9c>)
|
|
80023ac: 4293 cmp r3, r2
|
|
80023ae: d908 bls.n 80023c2 <HAL_ETH_SetMDIOClockRange+0x52>
|
|
80023b0: 68bb ldr r3, [r7, #8]
|
|
80023b2: 4a17 ldr r2, [pc, #92] ; (8002410 <HAL_ETH_SetMDIOClockRange+0xa0>)
|
|
80023b4: 4293 cmp r3, r2
|
|
80023b6: d204 bcs.n 80023c2 <HAL_ETH_SetMDIOClockRange+0x52>
|
|
{
|
|
/* CSR Clock Range between 35-60 MHz */
|
|
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div26;
|
|
80023b8: 68fb ldr r3, [r7, #12]
|
|
80023ba: f043 030c orr.w r3, r3, #12
|
|
80023be: 60fb str r3, [r7, #12]
|
|
80023c0: e01a b.n 80023f8 <HAL_ETH_SetMDIOClockRange+0x88>
|
|
}
|
|
else if ((hclk >= 60000000U) && (hclk < 100000000U))
|
|
80023c2: 68bb ldr r3, [r7, #8]
|
|
80023c4: 4a12 ldr r2, [pc, #72] ; (8002410 <HAL_ETH_SetMDIOClockRange+0xa0>)
|
|
80023c6: 4293 cmp r3, r2
|
|
80023c8: d303 bcc.n 80023d2 <HAL_ETH_SetMDIOClockRange+0x62>
|
|
80023ca: 68bb ldr r3, [r7, #8]
|
|
80023cc: 4a11 ldr r2, [pc, #68] ; (8002414 <HAL_ETH_SetMDIOClockRange+0xa4>)
|
|
80023ce: 4293 cmp r3, r2
|
|
80023d0: d911 bls.n 80023f6 <HAL_ETH_SetMDIOClockRange+0x86>
|
|
{
|
|
/* CSR Clock Range between 60-100 MHz */
|
|
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div42;
|
|
}
|
|
else if ((hclk >= 100000000U) && (hclk < 150000000U))
|
|
80023d2: 68bb ldr r3, [r7, #8]
|
|
80023d4: 4a0f ldr r2, [pc, #60] ; (8002414 <HAL_ETH_SetMDIOClockRange+0xa4>)
|
|
80023d6: 4293 cmp r3, r2
|
|
80023d8: d908 bls.n 80023ec <HAL_ETH_SetMDIOClockRange+0x7c>
|
|
80023da: 68bb ldr r3, [r7, #8]
|
|
80023dc: 4a0e ldr r2, [pc, #56] ; (8002418 <HAL_ETH_SetMDIOClockRange+0xa8>)
|
|
80023de: 4293 cmp r3, r2
|
|
80023e0: d804 bhi.n 80023ec <HAL_ETH_SetMDIOClockRange+0x7c>
|
|
{
|
|
/* CSR Clock Range between 100-150 MHz */
|
|
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div62;
|
|
80023e2: 68fb ldr r3, [r7, #12]
|
|
80023e4: f043 0304 orr.w r3, r3, #4
|
|
80023e8: 60fb str r3, [r7, #12]
|
|
80023ea: e005 b.n 80023f8 <HAL_ETH_SetMDIOClockRange+0x88>
|
|
}
|
|
else /* ((hclk >= 150000000)&&(hclk <= 183000000))*/
|
|
{
|
|
/* CSR Clock Range between 150-183 MHz */
|
|
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div102;
|
|
80023ec: 68fb ldr r3, [r7, #12]
|
|
80023ee: f043 0310 orr.w r3, r3, #16
|
|
80023f2: 60fb str r3, [r7, #12]
|
|
80023f4: e000 b.n 80023f8 <HAL_ETH_SetMDIOClockRange+0x88>
|
|
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div42;
|
|
80023f6: bf00 nop
|
|
}
|
|
|
|
/* Write to ETHERNET MAC MIIAR: Configure the ETHERNET CSR Clock Range */
|
|
(heth->Instance)->MACMIIAR = (uint32_t)tmpreg;
|
|
80023f8: 687b ldr r3, [r7, #4]
|
|
80023fa: 681b ldr r3, [r3, #0]
|
|
80023fc: 68fa ldr r2, [r7, #12]
|
|
80023fe: 611a str r2, [r3, #16]
|
|
}
|
|
8002400: bf00 nop
|
|
8002402: 3710 adds r7, #16
|
|
8002404: 46bd mov sp, r7
|
|
8002406: bd80 pop {r7, pc}
|
|
8002408: 01312cff .word 0x01312cff
|
|
800240c: 02160ebf .word 0x02160ebf
|
|
8002410: 03938700 .word 0x03938700
|
|
8002414: 05f5e0ff .word 0x05f5e0ff
|
|
8002418: 08f0d17f .word 0x08f0d17f
|
|
|
|
0800241c <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)
|
|
{
|
|
800241c: b580 push {r7, lr}
|
|
800241e: b084 sub sp, #16
|
|
8002420: af00 add r7, sp, #0
|
|
8002422: 6078 str r0, [r7, #4]
|
|
__IO uint32_t tmpreg = 0;
|
|
8002424: 2300 movs r3, #0
|
|
8002426: 60fb str r3, [r7, #12]
|
|
|
|
/* Set the Flush Transmit FIFO bit */
|
|
(heth->Instance)->DMAOMR |= ETH_DMAOMR_FTF;
|
|
8002428: 687b ldr r3, [r7, #4]
|
|
800242a: 681b ldr r3, [r3, #0]
|
|
800242c: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
8002430: 699b ldr r3, [r3, #24]
|
|
8002432: 687a ldr r2, [r7, #4]
|
|
8002434: 6812 ldr r2, [r2, #0]
|
|
8002436: f443 1380 orr.w r3, r3, #1048576 ; 0x100000
|
|
800243a: f502 5280 add.w r2, r2, #4096 ; 0x1000
|
|
800243e: 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;
|
|
8002440: 687b ldr r3, [r7, #4]
|
|
8002442: 681b ldr r3, [r3, #0]
|
|
8002444: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
8002448: 699b ldr r3, [r3, #24]
|
|
800244a: 60fb str r3, [r7, #12]
|
|
HAL_Delay(ETH_REG_WRITE_DELAY);
|
|
800244c: 2001 movs r0, #1
|
|
800244e: f7ff f9eb bl 8001828 <HAL_Delay>
|
|
(heth->Instance)->DMAOMR = tmpreg;
|
|
8002452: 687b ldr r3, [r7, #4]
|
|
8002454: 681a ldr r2, [r3, #0]
|
|
8002456: 68fb ldr r3, [r7, #12]
|
|
8002458: f502 5280 add.w r2, r2, #4096 ; 0x1000
|
|
800245c: 6193 str r3, [r2, #24]
|
|
}
|
|
800245e: bf00 nop
|
|
8002460: 3710 adds r7, #16
|
|
8002462: 46bd mov sp, r7
|
|
8002464: bd80 pop {r7, pc}
|
|
...
|
|
|
|
08002468 <ETH_SetMACConfig>:
|
|
|
|
static void ETH_SetMACConfig(ETH_HandleTypeDef *heth, ETH_MACConfigTypeDef *macconf)
|
|
{
|
|
8002468: b580 push {r7, lr}
|
|
800246a: b084 sub sp, #16
|
|
800246c: af00 add r7, sp, #0
|
|
800246e: 6078 str r0, [r7, #4]
|
|
8002470: 6039 str r1, [r7, #0]
|
|
uint32_t tmpreg1;
|
|
|
|
/*------------------------ ETHERNET MACCR Configuration --------------------*/
|
|
/* Get the ETHERNET MACCR value */
|
|
tmpreg1 = (heth->Instance)->MACCR;
|
|
8002472: 687b ldr r3, [r7, #4]
|
|
8002474: 681b ldr r3, [r3, #0]
|
|
8002476: 681b ldr r3, [r3, #0]
|
|
8002478: 60fb str r3, [r7, #12]
|
|
/* Clear WD, PCE, PS, TE and RE bits */
|
|
tmpreg1 &= ETH_MACCR_CLEAR_MASK;
|
|
800247a: 68fa ldr r2, [r7, #12]
|
|
800247c: 4b51 ldr r3, [pc, #324] ; (80025c4 <ETH_SetMACConfig+0x15c>)
|
|
800247e: 4013 ands r3, r2
|
|
8002480: 60fb str r3, [r7, #12]
|
|
|
|
tmpreg1 |= (uint32_t)(((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 23U) |
|
|
8002482: 683b ldr r3, [r7, #0]
|
|
8002484: 7c1b ldrb r3, [r3, #16]
|
|
8002486: 2b00 cmp r3, #0
|
|
8002488: d102 bne.n 8002490 <ETH_SetMACConfig+0x28>
|
|
800248a: f44f 0200 mov.w r2, #8388608 ; 0x800000
|
|
800248e: e000 b.n 8002492 <ETH_SetMACConfig+0x2a>
|
|
8002490: 2200 movs r2, #0
|
|
((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 22U) |
|
|
8002492: 683b ldr r3, [r7, #0]
|
|
8002494: 7c5b ldrb r3, [r3, #17]
|
|
8002496: 2b00 cmp r3, #0
|
|
8002498: d102 bne.n 80024a0 <ETH_SetMACConfig+0x38>
|
|
800249a: f44f 0380 mov.w r3, #4194304 ; 0x400000
|
|
800249e: e000 b.n 80024a2 <ETH_SetMACConfig+0x3a>
|
|
80024a0: 2300 movs r3, #0
|
|
tmpreg1 |= (uint32_t)(((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 23U) |
|
|
80024a2: 431a orrs r2, r3
|
|
(uint32_t)macconf->InterPacketGapVal |
|
|
80024a4: 683b ldr r3, [r7, #0]
|
|
80024a6: 689b ldr r3, [r3, #8]
|
|
((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 22U) |
|
|
80024a8: 431a orrs r2, r3
|
|
((uint32_t)macconf->CarrierSenseDuringTransmit << 16U) |
|
|
80024aa: 683b ldr r3, [r7, #0]
|
|
80024ac: 7fdb ldrb r3, [r3, #31]
|
|
80024ae: 041b lsls r3, r3, #16
|
|
(uint32_t)macconf->InterPacketGapVal |
|
|
80024b0: 431a orrs r2, r3
|
|
macconf->Speed |
|
|
80024b2: 683b ldr r3, [r7, #0]
|
|
80024b4: 695b ldr r3, [r3, #20]
|
|
((uint32_t)macconf->CarrierSenseDuringTransmit << 16U) |
|
|
80024b6: 4313 orrs r3, r2
|
|
((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 13U) |
|
|
80024b8: 683a ldr r2, [r7, #0]
|
|
80024ba: 7f92 ldrb r2, [r2, #30]
|
|
80024bc: 2a00 cmp r2, #0
|
|
80024be: d102 bne.n 80024c6 <ETH_SetMACConfig+0x5e>
|
|
80024c0: f44f 5200 mov.w r2, #8192 ; 0x2000
|
|
80024c4: e000 b.n 80024c8 <ETH_SetMACConfig+0x60>
|
|
80024c6: 2200 movs r2, #0
|
|
macconf->Speed |
|
|
80024c8: 431a orrs r2, r3
|
|
((uint32_t)macconf->LoopbackMode << 12U) |
|
|
80024ca: 683b ldr r3, [r7, #0]
|
|
80024cc: 7f1b ldrb r3, [r3, #28]
|
|
80024ce: 031b lsls r3, r3, #12
|
|
((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 13U) |
|
|
80024d0: 431a orrs r2, r3
|
|
macconf->DuplexMode |
|
|
80024d2: 683b ldr r3, [r7, #0]
|
|
80024d4: 699b ldr r3, [r3, #24]
|
|
((uint32_t)macconf->LoopbackMode << 12U) |
|
|
80024d6: 431a orrs r2, r3
|
|
((uint32_t)macconf->ChecksumOffload << 10U) |
|
|
80024d8: 683b ldr r3, [r7, #0]
|
|
80024da: 791b ldrb r3, [r3, #4]
|
|
80024dc: 029b lsls r3, r3, #10
|
|
macconf->DuplexMode |
|
|
80024de: 4313 orrs r3, r2
|
|
((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 9U) |
|
|
80024e0: 683a ldr r2, [r7, #0]
|
|
80024e2: f892 2020 ldrb.w r2, [r2, #32]
|
|
80024e6: 2a00 cmp r2, #0
|
|
80024e8: d102 bne.n 80024f0 <ETH_SetMACConfig+0x88>
|
|
80024ea: f44f 7200 mov.w r2, #512 ; 0x200
|
|
80024ee: e000 b.n 80024f2 <ETH_SetMACConfig+0x8a>
|
|
80024f0: 2200 movs r2, #0
|
|
((uint32_t)macconf->ChecksumOffload << 10U) |
|
|
80024f2: 431a orrs r2, r3
|
|
((uint32_t)macconf->AutomaticPadCRCStrip << 7U) |
|
|
80024f4: 683b ldr r3, [r7, #0]
|
|
80024f6: 7bdb ldrb r3, [r3, #15]
|
|
80024f8: 01db lsls r3, r3, #7
|
|
((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 9U) |
|
|
80024fa: 431a orrs r2, r3
|
|
macconf->BackOffLimit |
|
|
80024fc: 683b ldr r3, [r7, #0]
|
|
80024fe: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
((uint32_t)macconf->AutomaticPadCRCStrip << 7U) |
|
|
8002500: 431a orrs r2, r3
|
|
((uint32_t)macconf->DeferralCheck << 4U));
|
|
8002502: 683b ldr r3, [r7, #0]
|
|
8002504: f893 3028 ldrb.w r3, [r3, #40] ; 0x28
|
|
8002508: 011b lsls r3, r3, #4
|
|
tmpreg1 |= (uint32_t)(((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 23U) |
|
|
800250a: 4313 orrs r3, r2
|
|
800250c: 68fa ldr r2, [r7, #12]
|
|
800250e: 4313 orrs r3, r2
|
|
8002510: 60fb str r3, [r7, #12]
|
|
|
|
/* Write to ETHERNET MACCR */
|
|
(heth->Instance)->MACCR = (uint32_t)tmpreg1;
|
|
8002512: 687b ldr r3, [r7, #4]
|
|
8002514: 681b ldr r3, [r3, #0]
|
|
8002516: 68fa ldr r2, [r7, #12]
|
|
8002518: 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;
|
|
800251a: 687b ldr r3, [r7, #4]
|
|
800251c: 681b ldr r3, [r3, #0]
|
|
800251e: 681b ldr r3, [r3, #0]
|
|
8002520: 60fb str r3, [r7, #12]
|
|
HAL_Delay(ETH_REG_WRITE_DELAY);
|
|
8002522: 2001 movs r0, #1
|
|
8002524: f7ff f980 bl 8001828 <HAL_Delay>
|
|
(heth->Instance)->MACCR = tmpreg1;
|
|
8002528: 687b ldr r3, [r7, #4]
|
|
800252a: 681b ldr r3, [r3, #0]
|
|
800252c: 68fa ldr r2, [r7, #12]
|
|
800252e: 601a str r2, [r3, #0]
|
|
|
|
/*----------------------- ETHERNET MACFCR Configuration --------------------*/
|
|
|
|
/* Get the ETHERNET MACFCR value */
|
|
tmpreg1 = (heth->Instance)->MACFCR;
|
|
8002530: 687b ldr r3, [r7, #4]
|
|
8002532: 681b ldr r3, [r3, #0]
|
|
8002534: 699b ldr r3, [r3, #24]
|
|
8002536: 60fb str r3, [r7, #12]
|
|
/* Clear xx bits */
|
|
tmpreg1 &= ETH_MACFCR_CLEAR_MASK;
|
|
8002538: 68fa ldr r2, [r7, #12]
|
|
800253a: f64f 7341 movw r3, #65345 ; 0xff41
|
|
800253e: 4013 ands r3, r2
|
|
8002540: 60fb str r3, [r7, #12]
|
|
|
|
tmpreg1 |= (uint32_t)((macconf->PauseTime << 16U) |
|
|
8002542: 683b ldr r3, [r7, #0]
|
|
8002544: 6c9b ldr r3, [r3, #72] ; 0x48
|
|
8002546: 041b lsls r3, r3, #16
|
|
((uint32_t)((macconf->ZeroQuantaPause == DISABLE) ? 1U : 0U) << 7U) |
|
|
8002548: 683a ldr r2, [r7, #0]
|
|
800254a: f892 204c ldrb.w r2, [r2, #76] ; 0x4c
|
|
800254e: 2a00 cmp r2, #0
|
|
8002550: d101 bne.n 8002556 <ETH_SetMACConfig+0xee>
|
|
8002552: 2280 movs r2, #128 ; 0x80
|
|
8002554: e000 b.n 8002558 <ETH_SetMACConfig+0xf0>
|
|
8002556: 2200 movs r2, #0
|
|
tmpreg1 |= (uint32_t)((macconf->PauseTime << 16U) |
|
|
8002558: 431a orrs r2, r3
|
|
macconf->PauseLowThreshold |
|
|
800255a: 683b ldr r3, [r7, #0]
|
|
800255c: 6d1b ldr r3, [r3, #80] ; 0x50
|
|
((uint32_t)((macconf->ZeroQuantaPause == DISABLE) ? 1U : 0U) << 7U) |
|
|
800255e: 4313 orrs r3, r2
|
|
((uint32_t)((macconf->UnicastPausePacketDetect == ENABLE) ? 1U : 0U) << 3U) |
|
|
8002560: 683a ldr r2, [r7, #0]
|
|
8002562: f892 2055 ldrb.w r2, [r2, #85] ; 0x55
|
|
8002566: 2a01 cmp r2, #1
|
|
8002568: d101 bne.n 800256e <ETH_SetMACConfig+0x106>
|
|
800256a: 2208 movs r2, #8
|
|
800256c: e000 b.n 8002570 <ETH_SetMACConfig+0x108>
|
|
800256e: 2200 movs r2, #0
|
|
macconf->PauseLowThreshold |
|
|
8002570: 4313 orrs r3, r2
|
|
((uint32_t)((macconf->ReceiveFlowControl == ENABLE) ? 1U : 0U) << 2U) |
|
|
8002572: 683a ldr r2, [r7, #0]
|
|
8002574: f892 2056 ldrb.w r2, [r2, #86] ; 0x56
|
|
8002578: 2a01 cmp r2, #1
|
|
800257a: d101 bne.n 8002580 <ETH_SetMACConfig+0x118>
|
|
800257c: 2204 movs r2, #4
|
|
800257e: e000 b.n 8002582 <ETH_SetMACConfig+0x11a>
|
|
8002580: 2200 movs r2, #0
|
|
((uint32_t)((macconf->UnicastPausePacketDetect == ENABLE) ? 1U : 0U) << 3U) |
|
|
8002582: 4313 orrs r3, r2
|
|
((uint32_t)((macconf->TransmitFlowControl == ENABLE) ? 1U : 0U) << 1U));
|
|
8002584: 683a ldr r2, [r7, #0]
|
|
8002586: f892 2054 ldrb.w r2, [r2, #84] ; 0x54
|
|
800258a: 2a01 cmp r2, #1
|
|
800258c: d101 bne.n 8002592 <ETH_SetMACConfig+0x12a>
|
|
800258e: 2202 movs r2, #2
|
|
8002590: e000 b.n 8002594 <ETH_SetMACConfig+0x12c>
|
|
8002592: 2200 movs r2, #0
|
|
tmpreg1 |= (uint32_t)((macconf->PauseTime << 16U) |
|
|
8002594: 4313 orrs r3, r2
|
|
8002596: 68fa ldr r2, [r7, #12]
|
|
8002598: 4313 orrs r3, r2
|
|
800259a: 60fb str r3, [r7, #12]
|
|
|
|
/* Write to ETHERNET MACFCR */
|
|
(heth->Instance)->MACFCR = (uint32_t)tmpreg1;
|
|
800259c: 687b ldr r3, [r7, #4]
|
|
800259e: 681b ldr r3, [r3, #0]
|
|
80025a0: 68fa ldr r2, [r7, #12]
|
|
80025a2: 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;
|
|
80025a4: 687b ldr r3, [r7, #4]
|
|
80025a6: 681b ldr r3, [r3, #0]
|
|
80025a8: 699b ldr r3, [r3, #24]
|
|
80025aa: 60fb str r3, [r7, #12]
|
|
HAL_Delay(ETH_REG_WRITE_DELAY);
|
|
80025ac: 2001 movs r0, #1
|
|
80025ae: f7ff f93b bl 8001828 <HAL_Delay>
|
|
(heth->Instance)->MACFCR = tmpreg1;
|
|
80025b2: 687b ldr r3, [r7, #4]
|
|
80025b4: 681b ldr r3, [r3, #0]
|
|
80025b6: 68fa ldr r2, [r7, #12]
|
|
80025b8: 619a str r2, [r3, #24]
|
|
}
|
|
80025ba: bf00 nop
|
|
80025bc: 3710 adds r7, #16
|
|
80025be: 46bd mov sp, r7
|
|
80025c0: bd80 pop {r7, pc}
|
|
80025c2: bf00 nop
|
|
80025c4: ff20810f .word 0xff20810f
|
|
|
|
080025c8 <ETH_SetDMAConfig>:
|
|
|
|
static void ETH_SetDMAConfig(ETH_HandleTypeDef *heth, ETH_DMAConfigTypeDef *dmaconf)
|
|
{
|
|
80025c8: b580 push {r7, lr}
|
|
80025ca: b084 sub sp, #16
|
|
80025cc: af00 add r7, sp, #0
|
|
80025ce: 6078 str r0, [r7, #4]
|
|
80025d0: 6039 str r1, [r7, #0]
|
|
uint32_t tmpreg1;
|
|
|
|
/*----------------------- ETHERNET DMAOMR Configuration --------------------*/
|
|
/* Get the ETHERNET DMAOMR value */
|
|
tmpreg1 = (heth->Instance)->DMAOMR;
|
|
80025d2: 687b ldr r3, [r7, #4]
|
|
80025d4: 681b ldr r3, [r3, #0]
|
|
80025d6: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
80025da: 699b ldr r3, [r3, #24]
|
|
80025dc: 60fb str r3, [r7, #12]
|
|
/* Clear xx bits */
|
|
tmpreg1 &= ETH_DMAOMR_CLEAR_MASK;
|
|
80025de: 68fa ldr r2, [r7, #12]
|
|
80025e0: 4b3d ldr r3, [pc, #244] ; (80026d8 <ETH_SetDMAConfig+0x110>)
|
|
80025e2: 4013 ands r3, r2
|
|
80025e4: 60fb str r3, [r7, #12]
|
|
|
|
tmpreg1 |= (uint32_t)(((uint32_t)((dmaconf->DropTCPIPChecksumErrorFrame == DISABLE) ? 1U : 0U) << 26U) |
|
|
80025e6: 683b ldr r3, [r7, #0]
|
|
80025e8: 7b1b ldrb r3, [r3, #12]
|
|
80025ea: 2b00 cmp r3, #0
|
|
80025ec: d102 bne.n 80025f4 <ETH_SetDMAConfig+0x2c>
|
|
80025ee: f04f 6280 mov.w r2, #67108864 ; 0x4000000
|
|
80025f2: e000 b.n 80025f6 <ETH_SetDMAConfig+0x2e>
|
|
80025f4: 2200 movs r2, #0
|
|
((uint32_t)dmaconf->ReceiveStoreForward << 25U) |
|
|
80025f6: 683b ldr r3, [r7, #0]
|
|
80025f8: 7b5b ldrb r3, [r3, #13]
|
|
80025fa: 065b lsls r3, r3, #25
|
|
tmpreg1 |= (uint32_t)(((uint32_t)((dmaconf->DropTCPIPChecksumErrorFrame == DISABLE) ? 1U : 0U) << 26U) |
|
|
80025fc: 4313 orrs r3, r2
|
|
((uint32_t)((dmaconf->FlushRxPacket == DISABLE) ? 1U : 0U) << 20U) |
|
|
80025fe: 683a ldr r2, [r7, #0]
|
|
8002600: 7f52 ldrb r2, [r2, #29]
|
|
8002602: 2a00 cmp r2, #0
|
|
8002604: d102 bne.n 800260c <ETH_SetDMAConfig+0x44>
|
|
8002606: f44f 1280 mov.w r2, #1048576 ; 0x100000
|
|
800260a: e000 b.n 800260e <ETH_SetDMAConfig+0x46>
|
|
800260c: 2200 movs r2, #0
|
|
((uint32_t)dmaconf->ReceiveStoreForward << 25U) |
|
|
800260e: 431a orrs r2, r3
|
|
((uint32_t)dmaconf->TransmitStoreForward << 21U) |
|
|
8002610: 683b ldr r3, [r7, #0]
|
|
8002612: 7b9b ldrb r3, [r3, #14]
|
|
8002614: 055b lsls r3, r3, #21
|
|
((uint32_t)((dmaconf->FlushRxPacket == DISABLE) ? 1U : 0U) << 20U) |
|
|
8002616: 431a orrs r2, r3
|
|
dmaconf->TransmitThresholdControl |
|
|
8002618: 683b ldr r3, [r7, #0]
|
|
800261a: 695b ldr r3, [r3, #20]
|
|
((uint32_t)dmaconf->TransmitStoreForward << 21U) |
|
|
800261c: 431a orrs r2, r3
|
|
((uint32_t)dmaconf->ForwardErrorFrames << 7U) |
|
|
800261e: 683b ldr r3, [r7, #0]
|
|
8002620: 7f1b ldrb r3, [r3, #28]
|
|
8002622: 01db lsls r3, r3, #7
|
|
dmaconf->TransmitThresholdControl |
|
|
8002624: 431a orrs r2, r3
|
|
((uint32_t)dmaconf->ForwardUndersizedGoodFrames << 6U) |
|
|
8002626: 683b ldr r3, [r7, #0]
|
|
8002628: 7f9b ldrb r3, [r3, #30]
|
|
800262a: 019b lsls r3, r3, #6
|
|
((uint32_t)dmaconf->ForwardErrorFrames << 7U) |
|
|
800262c: 431a orrs r2, r3
|
|
dmaconf->ReceiveThresholdControl |
|
|
800262e: 683b ldr r3, [r7, #0]
|
|
8002630: 6a1b ldr r3, [r3, #32]
|
|
((uint32_t)dmaconf->ForwardUndersizedGoodFrames << 6U) |
|
|
8002632: 431a orrs r2, r3
|
|
((uint32_t)dmaconf->SecondFrameOperate << 2U));
|
|
8002634: 683b ldr r3, [r7, #0]
|
|
8002636: f893 3024 ldrb.w r3, [r3, #36] ; 0x24
|
|
800263a: 009b lsls r3, r3, #2
|
|
tmpreg1 |= (uint32_t)(((uint32_t)((dmaconf->DropTCPIPChecksumErrorFrame == DISABLE) ? 1U : 0U) << 26U) |
|
|
800263c: 4313 orrs r3, r2
|
|
800263e: 68fa ldr r2, [r7, #12]
|
|
8002640: 4313 orrs r3, r2
|
|
8002642: 60fb str r3, [r7, #12]
|
|
|
|
/* Write to ETHERNET DMAOMR */
|
|
(heth->Instance)->DMAOMR = (uint32_t)tmpreg1;
|
|
8002644: 687b ldr r3, [r7, #4]
|
|
8002646: 681b ldr r3, [r3, #0]
|
|
8002648: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
800264c: 461a mov r2, r3
|
|
800264e: 68fb ldr r3, [r7, #12]
|
|
8002650: 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;
|
|
8002652: 687b ldr r3, [r7, #4]
|
|
8002654: 681b ldr r3, [r3, #0]
|
|
8002656: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
800265a: 699b ldr r3, [r3, #24]
|
|
800265c: 60fb str r3, [r7, #12]
|
|
HAL_Delay(ETH_REG_WRITE_DELAY);
|
|
800265e: 2001 movs r0, #1
|
|
8002660: f7ff f8e2 bl 8001828 <HAL_Delay>
|
|
(heth->Instance)->DMAOMR = tmpreg1;
|
|
8002664: 687b ldr r3, [r7, #4]
|
|
8002666: 681b ldr r3, [r3, #0]
|
|
8002668: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
800266c: 461a mov r2, r3
|
|
800266e: 68fb ldr r3, [r7, #12]
|
|
8002670: 6193 str r3, [r2, #24]
|
|
|
|
/*----------------------- ETHERNET DMABMR Configuration --------------------*/
|
|
(heth->Instance)->DMABMR = (uint32_t)(((uint32_t)dmaconf->AddressAlignedBeats << 25U) |
|
|
8002672: 683b ldr r3, [r7, #0]
|
|
8002674: 791b ldrb r3, [r3, #4]
|
|
8002676: 065a lsls r2, r3, #25
|
|
dmaconf->BurstMode |
|
|
8002678: 683b ldr r3, [r7, #0]
|
|
800267a: 689b ldr r3, [r3, #8]
|
|
(heth->Instance)->DMABMR = (uint32_t)(((uint32_t)dmaconf->AddressAlignedBeats << 25U) |
|
|
800267c: 431a orrs r2, r3
|
|
dmaconf->RxDMABurstLength | /* !! if 4xPBL is selected for Tx or
|
|
800267e: 683b ldr r3, [r7, #0]
|
|
8002680: 699b ldr r3, [r3, #24]
|
|
dmaconf->BurstMode |
|
|
8002682: 431a orrs r2, r3
|
|
Rx it is applied for the other */
|
|
dmaconf->TxDMABurstLength |
|
|
8002684: 683b ldr r3, [r7, #0]
|
|
8002686: 691b ldr r3, [r3, #16]
|
|
dmaconf->RxDMABurstLength | /* !! if 4xPBL is selected for Tx or
|
|
8002688: 431a orrs r2, r3
|
|
((uint32_t)dmaconf->EnhancedDescriptorFormat << 7U) |
|
|
800268a: 683b ldr r3, [r7, #0]
|
|
800268c: f893 3025 ldrb.w r3, [r3, #37] ; 0x25
|
|
8002690: 01db lsls r3, r3, #7
|
|
dmaconf->TxDMABurstLength |
|
|
8002692: 431a orrs r2, r3
|
|
(dmaconf->DescriptorSkipLength << 2U) |
|
|
8002694: 683b ldr r3, [r7, #0]
|
|
8002696: 6a9b ldr r3, [r3, #40] ; 0x28
|
|
8002698: 009b lsls r3, r3, #2
|
|
((uint32_t)dmaconf->EnhancedDescriptorFormat << 7U) |
|
|
800269a: 431a orrs r2, r3
|
|
dmaconf->DMAArbitration |
|
|
800269c: 683b ldr r3, [r7, #0]
|
|
800269e: 681b ldr r3, [r3, #0]
|
|
(dmaconf->DescriptorSkipLength << 2U) |
|
|
80026a0: 4313 orrs r3, r2
|
|
(heth->Instance)->DMABMR = (uint32_t)(((uint32_t)dmaconf->AddressAlignedBeats << 25U) |
|
|
80026a2: 687a ldr r2, [r7, #4]
|
|
80026a4: 6812 ldr r2, [r2, #0]
|
|
80026a6: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
|
|
80026aa: f502 5280 add.w r2, r2, #4096 ; 0x1000
|
|
80026ae: 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;
|
|
80026b0: 687b ldr r3, [r7, #4]
|
|
80026b2: 681b ldr r3, [r3, #0]
|
|
80026b4: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
80026b8: 681b ldr r3, [r3, #0]
|
|
80026ba: 60fb str r3, [r7, #12]
|
|
HAL_Delay(ETH_REG_WRITE_DELAY);
|
|
80026bc: 2001 movs r0, #1
|
|
80026be: f7ff f8b3 bl 8001828 <HAL_Delay>
|
|
(heth->Instance)->DMABMR = tmpreg1;
|
|
80026c2: 687b ldr r3, [r7, #4]
|
|
80026c4: 681b ldr r3, [r3, #0]
|
|
80026c6: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
80026ca: 461a mov r2, r3
|
|
80026cc: 68fb ldr r3, [r7, #12]
|
|
80026ce: 6013 str r3, [r2, #0]
|
|
}
|
|
80026d0: bf00 nop
|
|
80026d2: 3710 adds r7, #16
|
|
80026d4: 46bd mov sp, r7
|
|
80026d6: bd80 pop {r7, pc}
|
|
80026d8: f8de3f23 .word 0xf8de3f23
|
|
|
|
080026dc <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)
|
|
{
|
|
80026dc: b580 push {r7, lr}
|
|
80026de: b0a6 sub sp, #152 ; 0x98
|
|
80026e0: af00 add r7, sp, #0
|
|
80026e2: 6078 str r0, [r7, #4]
|
|
ETH_MACConfigTypeDef macDefaultConf;
|
|
ETH_DMAConfigTypeDef dmaDefaultConf;
|
|
|
|
/*--------------- ETHERNET MAC registers default Configuration --------------*/
|
|
macDefaultConf.Watchdog = ENABLE;
|
|
80026e4: 2301 movs r3, #1
|
|
80026e6: f887 3044 strb.w r3, [r7, #68] ; 0x44
|
|
macDefaultConf.Jabber = ENABLE;
|
|
80026ea: 2301 movs r3, #1
|
|
80026ec: f887 3045 strb.w r3, [r7, #69] ; 0x45
|
|
macDefaultConf.InterPacketGapVal = ETH_INTERFRAMEGAP_96BIT;
|
|
80026f0: 2300 movs r3, #0
|
|
80026f2: 63fb str r3, [r7, #60] ; 0x3c
|
|
macDefaultConf.CarrierSenseDuringTransmit = DISABLE;
|
|
80026f4: 2300 movs r3, #0
|
|
80026f6: f887 3053 strb.w r3, [r7, #83] ; 0x53
|
|
macDefaultConf.ReceiveOwn = ENABLE;
|
|
80026fa: 2301 movs r3, #1
|
|
80026fc: f887 3052 strb.w r3, [r7, #82] ; 0x52
|
|
macDefaultConf.LoopbackMode = DISABLE;
|
|
8002700: 2300 movs r3, #0
|
|
8002702: f887 3050 strb.w r3, [r7, #80] ; 0x50
|
|
macDefaultConf.ChecksumOffload = ENABLE;
|
|
8002706: 2301 movs r3, #1
|
|
8002708: f887 3038 strb.w r3, [r7, #56] ; 0x38
|
|
macDefaultConf.RetryTransmission = DISABLE;
|
|
800270c: 2300 movs r3, #0
|
|
800270e: f887 3054 strb.w r3, [r7, #84] ; 0x54
|
|
macDefaultConf.AutomaticPadCRCStrip = DISABLE;
|
|
8002712: 2300 movs r3, #0
|
|
8002714: f887 3043 strb.w r3, [r7, #67] ; 0x43
|
|
macDefaultConf.BackOffLimit = ETH_BACKOFFLIMIT_10;
|
|
8002718: 2300 movs r3, #0
|
|
800271a: 65bb str r3, [r7, #88] ; 0x58
|
|
macDefaultConf.DeferralCheck = DISABLE;
|
|
800271c: 2300 movs r3, #0
|
|
800271e: f887 305c strb.w r3, [r7, #92] ; 0x5c
|
|
macDefaultConf.PauseTime = 0x0U;
|
|
8002722: 2300 movs r3, #0
|
|
8002724: 67fb str r3, [r7, #124] ; 0x7c
|
|
macDefaultConf.ZeroQuantaPause = DISABLE;
|
|
8002726: 2300 movs r3, #0
|
|
8002728: f887 3080 strb.w r3, [r7, #128] ; 0x80
|
|
macDefaultConf.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS4;
|
|
800272c: 2300 movs r3, #0
|
|
800272e: f8c7 3084 str.w r3, [r7, #132] ; 0x84
|
|
macDefaultConf.ReceiveFlowControl = DISABLE;
|
|
8002732: 2300 movs r3, #0
|
|
8002734: f887 308a strb.w r3, [r7, #138] ; 0x8a
|
|
macDefaultConf.TransmitFlowControl = DISABLE;
|
|
8002738: 2300 movs r3, #0
|
|
800273a: f887 3088 strb.w r3, [r7, #136] ; 0x88
|
|
macDefaultConf.Speed = ETH_SPEED_100M;
|
|
800273e: f44f 4380 mov.w r3, #16384 ; 0x4000
|
|
8002742: 64bb str r3, [r7, #72] ; 0x48
|
|
macDefaultConf.DuplexMode = ETH_FULLDUPLEX_MODE;
|
|
8002744: f44f 6300 mov.w r3, #2048 ; 0x800
|
|
8002748: 64fb str r3, [r7, #76] ; 0x4c
|
|
macDefaultConf.UnicastPausePacketDetect = DISABLE;
|
|
800274a: 2300 movs r3, #0
|
|
800274c: f887 3089 strb.w r3, [r7, #137] ; 0x89
|
|
|
|
/* MAC default configuration */
|
|
ETH_SetMACConfig(heth, &macDefaultConf);
|
|
8002750: f107 0334 add.w r3, r7, #52 ; 0x34
|
|
8002754: 4619 mov r1, r3
|
|
8002756: 6878 ldr r0, [r7, #4]
|
|
8002758: f7ff fe86 bl 8002468 <ETH_SetMACConfig>
|
|
|
|
/*--------------- ETHERNET DMA registers default Configuration --------------*/
|
|
dmaDefaultConf.DropTCPIPChecksumErrorFrame = ENABLE;
|
|
800275c: 2301 movs r3, #1
|
|
800275e: 753b strb r3, [r7, #20]
|
|
dmaDefaultConf.ReceiveStoreForward = ENABLE;
|
|
8002760: 2301 movs r3, #1
|
|
8002762: 757b strb r3, [r7, #21]
|
|
dmaDefaultConf.FlushRxPacket = ENABLE;
|
|
8002764: 2301 movs r3, #1
|
|
8002766: f887 3025 strb.w r3, [r7, #37] ; 0x25
|
|
dmaDefaultConf.TransmitStoreForward = ENABLE;
|
|
800276a: 2301 movs r3, #1
|
|
800276c: 75bb strb r3, [r7, #22]
|
|
dmaDefaultConf.TransmitThresholdControl = ETH_TRANSMITTHRESHOLDCONTROL_64BYTES;
|
|
800276e: 2300 movs r3, #0
|
|
8002770: 61fb str r3, [r7, #28]
|
|
dmaDefaultConf.ForwardErrorFrames = DISABLE;
|
|
8002772: 2300 movs r3, #0
|
|
8002774: f887 3024 strb.w r3, [r7, #36] ; 0x24
|
|
dmaDefaultConf.ForwardUndersizedGoodFrames = DISABLE;
|
|
8002778: 2300 movs r3, #0
|
|
800277a: f887 3026 strb.w r3, [r7, #38] ; 0x26
|
|
dmaDefaultConf.ReceiveThresholdControl = ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES;
|
|
800277e: 2300 movs r3, #0
|
|
8002780: 62bb str r3, [r7, #40] ; 0x28
|
|
dmaDefaultConf.SecondFrameOperate = ENABLE;
|
|
8002782: 2301 movs r3, #1
|
|
8002784: f887 302c strb.w r3, [r7, #44] ; 0x2c
|
|
dmaDefaultConf.AddressAlignedBeats = ENABLE;
|
|
8002788: 2301 movs r3, #1
|
|
800278a: 733b strb r3, [r7, #12]
|
|
dmaDefaultConf.BurstMode = ETH_BURSTLENGTH_FIXED;
|
|
800278c: f44f 3380 mov.w r3, #65536 ; 0x10000
|
|
8002790: 613b str r3, [r7, #16]
|
|
dmaDefaultConf.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT;
|
|
8002792: f44f 0380 mov.w r3, #4194304 ; 0x400000
|
|
8002796: 623b str r3, [r7, #32]
|
|
dmaDefaultConf.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT;
|
|
8002798: f44f 5300 mov.w r3, #8192 ; 0x2000
|
|
800279c: 61bb str r3, [r7, #24]
|
|
dmaDefaultConf.EnhancedDescriptorFormat = ENABLE;
|
|
800279e: 2301 movs r3, #1
|
|
80027a0: f887 302d strb.w r3, [r7, #45] ; 0x2d
|
|
dmaDefaultConf.DescriptorSkipLength = 0x0U;
|
|
80027a4: 2300 movs r3, #0
|
|
80027a6: 633b str r3, [r7, #48] ; 0x30
|
|
dmaDefaultConf.DMAArbitration = ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1;
|
|
80027a8: 2300 movs r3, #0
|
|
80027aa: 60bb str r3, [r7, #8]
|
|
|
|
/* DMA default configuration */
|
|
ETH_SetDMAConfig(heth, &dmaDefaultConf);
|
|
80027ac: f107 0308 add.w r3, r7, #8
|
|
80027b0: 4619 mov r1, r3
|
|
80027b2: 6878 ldr r0, [r7, #4]
|
|
80027b4: f7ff ff08 bl 80025c8 <ETH_SetDMAConfig>
|
|
}
|
|
80027b8: bf00 nop
|
|
80027ba: 3798 adds r7, #152 ; 0x98
|
|
80027bc: 46bd mov sp, r7
|
|
80027be: bd80 pop {r7, pc}
|
|
|
|
080027c0 <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)
|
|
{
|
|
80027c0: b480 push {r7}
|
|
80027c2: b087 sub sp, #28
|
|
80027c4: af00 add r7, sp, #0
|
|
80027c6: 60f8 str r0, [r7, #12]
|
|
80027c8: 60b9 str r1, [r7, #8]
|
|
80027ca: 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];
|
|
80027cc: 687b ldr r3, [r7, #4]
|
|
80027ce: 3305 adds r3, #5
|
|
80027d0: 781b ldrb r3, [r3, #0]
|
|
80027d2: 021b lsls r3, r3, #8
|
|
80027d4: 687a ldr r2, [r7, #4]
|
|
80027d6: 3204 adds r2, #4
|
|
80027d8: 7812 ldrb r2, [r2, #0]
|
|
80027da: 4313 orrs r3, r2
|
|
80027dc: 617b str r3, [r7, #20]
|
|
/* Load the selected MAC address high register */
|
|
(*(__IO uint32_t *)((uint32_t)(ETH_MAC_ADDR_HBASE + MacAddr))) = tmpreg1;
|
|
80027de: 68ba ldr r2, [r7, #8]
|
|
80027e0: 4b11 ldr r3, [pc, #68] ; (8002828 <ETH_MACAddressConfig+0x68>)
|
|
80027e2: 4413 add r3, r2
|
|
80027e4: 461a mov r2, r3
|
|
80027e6: 697b ldr r3, [r7, #20]
|
|
80027e8: 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];
|
|
80027ea: 687b ldr r3, [r7, #4]
|
|
80027ec: 3303 adds r3, #3
|
|
80027ee: 781b ldrb r3, [r3, #0]
|
|
80027f0: 061a lsls r2, r3, #24
|
|
80027f2: 687b ldr r3, [r7, #4]
|
|
80027f4: 3302 adds r3, #2
|
|
80027f6: 781b ldrb r3, [r3, #0]
|
|
80027f8: 041b lsls r3, r3, #16
|
|
80027fa: 431a orrs r2, r3
|
|
80027fc: 687b ldr r3, [r7, #4]
|
|
80027fe: 3301 adds r3, #1
|
|
8002800: 781b ldrb r3, [r3, #0]
|
|
8002802: 021b lsls r3, r3, #8
|
|
8002804: 4313 orrs r3, r2
|
|
8002806: 687a ldr r2, [r7, #4]
|
|
8002808: 7812 ldrb r2, [r2, #0]
|
|
800280a: 4313 orrs r3, r2
|
|
800280c: 617b str r3, [r7, #20]
|
|
|
|
/* Load the selected MAC address low register */
|
|
(*(__IO uint32_t *)((uint32_t)(ETH_MAC_ADDR_LBASE + MacAddr))) = tmpreg1;
|
|
800280e: 68ba ldr r2, [r7, #8]
|
|
8002810: 4b06 ldr r3, [pc, #24] ; (800282c <ETH_MACAddressConfig+0x6c>)
|
|
8002812: 4413 add r3, r2
|
|
8002814: 461a mov r2, r3
|
|
8002816: 697b ldr r3, [r7, #20]
|
|
8002818: 6013 str r3, [r2, #0]
|
|
}
|
|
800281a: bf00 nop
|
|
800281c: 371c adds r7, #28
|
|
800281e: 46bd mov sp, r7
|
|
8002820: f85d 7b04 ldr.w r7, [sp], #4
|
|
8002824: 4770 bx lr
|
|
8002826: bf00 nop
|
|
8002828: 40028040 .word 0x40028040
|
|
800282c: 40028044 .word 0x40028044
|
|
|
|
08002830 <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)
|
|
{
|
|
8002830: b480 push {r7}
|
|
8002832: b085 sub sp, #20
|
|
8002834: af00 add r7, sp, #0
|
|
8002836: 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++)
|
|
8002838: 2300 movs r3, #0
|
|
800283a: 60fb str r3, [r7, #12]
|
|
800283c: e03e b.n 80028bc <ETH_DMATxDescListInit+0x8c>
|
|
{
|
|
dmatxdesc = heth->Init.TxDesc + i;
|
|
800283e: 687b ldr r3, [r7, #4]
|
|
8002840: 68d9 ldr r1, [r3, #12]
|
|
8002842: 68fa ldr r2, [r7, #12]
|
|
8002844: 4613 mov r3, r2
|
|
8002846: 009b lsls r3, r3, #2
|
|
8002848: 4413 add r3, r2
|
|
800284a: 00db lsls r3, r3, #3
|
|
800284c: 440b add r3, r1
|
|
800284e: 60bb str r3, [r7, #8]
|
|
|
|
WRITE_REG(dmatxdesc->DESC0, 0x0);
|
|
8002850: 68bb ldr r3, [r7, #8]
|
|
8002852: 2200 movs r2, #0
|
|
8002854: 601a str r2, [r3, #0]
|
|
WRITE_REG(dmatxdesc->DESC1, 0x0);
|
|
8002856: 68bb ldr r3, [r7, #8]
|
|
8002858: 2200 movs r2, #0
|
|
800285a: 605a str r2, [r3, #4]
|
|
WRITE_REG(dmatxdesc->DESC2, 0x0);
|
|
800285c: 68bb ldr r3, [r7, #8]
|
|
800285e: 2200 movs r2, #0
|
|
8002860: 609a str r2, [r3, #8]
|
|
WRITE_REG(dmatxdesc->DESC3, 0x0);
|
|
8002862: 68bb ldr r3, [r7, #8]
|
|
8002864: 2200 movs r2, #0
|
|
8002866: 60da str r2, [r3, #12]
|
|
|
|
WRITE_REG(heth->TxDescList.TxDesc[i], (uint32_t)dmatxdesc);
|
|
8002868: 68b9 ldr r1, [r7, #8]
|
|
800286a: 687b ldr r3, [r7, #4]
|
|
800286c: 68fa ldr r2, [r7, #12]
|
|
800286e: 3206 adds r2, #6
|
|
8002870: f843 1022 str.w r1, [r3, r2, lsl #2]
|
|
|
|
/* Set Second Address Chained bit */
|
|
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_TCH);
|
|
8002874: 68bb ldr r3, [r7, #8]
|
|
8002876: 681b ldr r3, [r3, #0]
|
|
8002878: f443 1280 orr.w r2, r3, #1048576 ; 0x100000
|
|
800287c: 68bb ldr r3, [r7, #8]
|
|
800287e: 601a str r2, [r3, #0]
|
|
|
|
if (i < ((uint32_t)ETH_TX_DESC_CNT - 1U))
|
|
8002880: 68fb ldr r3, [r7, #12]
|
|
8002882: 2b02 cmp r3, #2
|
|
8002884: d80c bhi.n 80028a0 <ETH_DMATxDescListInit+0x70>
|
|
{
|
|
WRITE_REG(dmatxdesc->DESC3, (uint32_t)(heth->Init.TxDesc + i + 1U));
|
|
8002886: 687b ldr r3, [r7, #4]
|
|
8002888: 68d9 ldr r1, [r3, #12]
|
|
800288a: 68fb ldr r3, [r7, #12]
|
|
800288c: 1c5a adds r2, r3, #1
|
|
800288e: 4613 mov r3, r2
|
|
8002890: 009b lsls r3, r3, #2
|
|
8002892: 4413 add r3, r2
|
|
8002894: 00db lsls r3, r3, #3
|
|
8002896: 440b add r3, r1
|
|
8002898: 461a mov r2, r3
|
|
800289a: 68bb ldr r3, [r7, #8]
|
|
800289c: 60da str r2, [r3, #12]
|
|
800289e: e004 b.n 80028aa <ETH_DMATxDescListInit+0x7a>
|
|
}
|
|
else
|
|
{
|
|
WRITE_REG(dmatxdesc->DESC3, (uint32_t)(heth->Init.TxDesc));
|
|
80028a0: 687b ldr r3, [r7, #4]
|
|
80028a2: 68db ldr r3, [r3, #12]
|
|
80028a4: 461a mov r2, r3
|
|
80028a6: 68bb ldr r3, [r7, #8]
|
|
80028a8: 60da str r2, [r3, #12]
|
|
}
|
|
|
|
/* Set the DMA Tx descriptors checksum insertion */
|
|
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL);
|
|
80028aa: 68bb ldr r3, [r7, #8]
|
|
80028ac: 681b ldr r3, [r3, #0]
|
|
80028ae: f443 0240 orr.w r2, r3, #12582912 ; 0xc00000
|
|
80028b2: 68bb ldr r3, [r7, #8]
|
|
80028b4: 601a str r2, [r3, #0]
|
|
for (i = 0; i < (uint32_t)ETH_TX_DESC_CNT; i++)
|
|
80028b6: 68fb ldr r3, [r7, #12]
|
|
80028b8: 3301 adds r3, #1
|
|
80028ba: 60fb str r3, [r7, #12]
|
|
80028bc: 68fb ldr r3, [r7, #12]
|
|
80028be: 2b03 cmp r3, #3
|
|
80028c0: d9bd bls.n 800283e <ETH_DMATxDescListInit+0xe>
|
|
}
|
|
|
|
heth->TxDescList.CurTxDesc = 0;
|
|
80028c2: 687b ldr r3, [r7, #4]
|
|
80028c4: 2200 movs r2, #0
|
|
80028c6: 629a str r2, [r3, #40] ; 0x28
|
|
|
|
/* Set Transmit Descriptor List Address */
|
|
WRITE_REG(heth->Instance->DMATDLAR, (uint32_t) heth->Init.TxDesc);
|
|
80028c8: 687b ldr r3, [r7, #4]
|
|
80028ca: 68da ldr r2, [r3, #12]
|
|
80028cc: 687b ldr r3, [r7, #4]
|
|
80028ce: 681b ldr r3, [r3, #0]
|
|
80028d0: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
80028d4: 611a str r2, [r3, #16]
|
|
}
|
|
80028d6: bf00 nop
|
|
80028d8: 3714 adds r7, #20
|
|
80028da: 46bd mov sp, r7
|
|
80028dc: f85d 7b04 ldr.w r7, [sp], #4
|
|
80028e0: 4770 bx lr
|
|
|
|
080028e2 <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)
|
|
{
|
|
80028e2: b480 push {r7}
|
|
80028e4: b085 sub sp, #20
|
|
80028e6: af00 add r7, sp, #0
|
|
80028e8: 6078 str r0, [r7, #4]
|
|
ETH_DMADescTypeDef *dmarxdesc;
|
|
uint32_t i;
|
|
|
|
for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++)
|
|
80028ea: 2300 movs r3, #0
|
|
80028ec: 60fb str r3, [r7, #12]
|
|
80028ee: e046 b.n 800297e <ETH_DMARxDescListInit+0x9c>
|
|
{
|
|
dmarxdesc = heth->Init.RxDesc + i;
|
|
80028f0: 687b ldr r3, [r7, #4]
|
|
80028f2: 6919 ldr r1, [r3, #16]
|
|
80028f4: 68fa ldr r2, [r7, #12]
|
|
80028f6: 4613 mov r3, r2
|
|
80028f8: 009b lsls r3, r3, #2
|
|
80028fa: 4413 add r3, r2
|
|
80028fc: 00db lsls r3, r3, #3
|
|
80028fe: 440b add r3, r1
|
|
8002900: 60bb str r3, [r7, #8]
|
|
|
|
WRITE_REG(dmarxdesc->DESC0, 0x0);
|
|
8002902: 68bb ldr r3, [r7, #8]
|
|
8002904: 2200 movs r2, #0
|
|
8002906: 601a str r2, [r3, #0]
|
|
WRITE_REG(dmarxdesc->DESC1, 0x0);
|
|
8002908: 68bb ldr r3, [r7, #8]
|
|
800290a: 2200 movs r2, #0
|
|
800290c: 605a str r2, [r3, #4]
|
|
WRITE_REG(dmarxdesc->DESC2, 0x0);
|
|
800290e: 68bb ldr r3, [r7, #8]
|
|
8002910: 2200 movs r2, #0
|
|
8002912: 609a str r2, [r3, #8]
|
|
WRITE_REG(dmarxdesc->DESC3, 0x0);
|
|
8002914: 68bb ldr r3, [r7, #8]
|
|
8002916: 2200 movs r2, #0
|
|
8002918: 60da str r2, [r3, #12]
|
|
WRITE_REG(dmarxdesc->BackupAddr0, 0x0);
|
|
800291a: 68bb ldr r3, [r7, #8]
|
|
800291c: 2200 movs r2, #0
|
|
800291e: 621a str r2, [r3, #32]
|
|
WRITE_REG(dmarxdesc->BackupAddr1, 0x0);
|
|
8002920: 68bb ldr r3, [r7, #8]
|
|
8002922: 2200 movs r2, #0
|
|
8002924: 625a str r2, [r3, #36] ; 0x24
|
|
|
|
/* Set Own bit of the Rx descriptor Status */
|
|
dmarxdesc->DESC0 = ETH_DMARXDESC_OWN;
|
|
8002926: 68bb ldr r3, [r7, #8]
|
|
8002928: f04f 4200 mov.w r2, #2147483648 ; 0x80000000
|
|
800292c: 601a str r2, [r3, #0]
|
|
|
|
/* Set Buffer1 size and Second Address Chained bit */
|
|
dmarxdesc->DESC1 = ETH_DMARXDESC_RCH | ETH_RX_BUF_SIZE;
|
|
800292e: 68bb ldr r3, [r7, #8]
|
|
8002930: f244 52f8 movw r2, #17912 ; 0x45f8
|
|
8002934: 605a str r2, [r3, #4]
|
|
|
|
/* Enable Ethernet DMA Rx Descriptor interrupt */
|
|
dmarxdesc->DESC1 &= ~ETH_DMARXDESC_DIC;
|
|
8002936: 68bb ldr r3, [r7, #8]
|
|
8002938: 685b ldr r3, [r3, #4]
|
|
800293a: f023 4200 bic.w r2, r3, #2147483648 ; 0x80000000
|
|
800293e: 68bb ldr r3, [r7, #8]
|
|
8002940: 605a str r2, [r3, #4]
|
|
|
|
/* Set Rx descritors addresses */
|
|
WRITE_REG(heth->RxDescList.RxDesc[i], (uint32_t)dmarxdesc);
|
|
8002942: 68b9 ldr r1, [r7, #8]
|
|
8002944: 687b ldr r3, [r7, #4]
|
|
8002946: 68fa ldr r2, [r7, #12]
|
|
8002948: 3212 adds r2, #18
|
|
800294a: f843 1022 str.w r1, [r3, r2, lsl #2]
|
|
|
|
if (i < ((uint32_t)ETH_RX_DESC_CNT - 1U))
|
|
800294e: 68fb ldr r3, [r7, #12]
|
|
8002950: 2b02 cmp r3, #2
|
|
8002952: d80c bhi.n 800296e <ETH_DMARxDescListInit+0x8c>
|
|
{
|
|
WRITE_REG(dmarxdesc->DESC3, (uint32_t)(heth->Init.RxDesc + i + 1U));
|
|
8002954: 687b ldr r3, [r7, #4]
|
|
8002956: 6919 ldr r1, [r3, #16]
|
|
8002958: 68fb ldr r3, [r7, #12]
|
|
800295a: 1c5a adds r2, r3, #1
|
|
800295c: 4613 mov r3, r2
|
|
800295e: 009b lsls r3, r3, #2
|
|
8002960: 4413 add r3, r2
|
|
8002962: 00db lsls r3, r3, #3
|
|
8002964: 440b add r3, r1
|
|
8002966: 461a mov r2, r3
|
|
8002968: 68bb ldr r3, [r7, #8]
|
|
800296a: 60da str r2, [r3, #12]
|
|
800296c: e004 b.n 8002978 <ETH_DMARxDescListInit+0x96>
|
|
}
|
|
else
|
|
{
|
|
WRITE_REG(dmarxdesc->DESC3, (uint32_t)(heth->Init.RxDesc));
|
|
800296e: 687b ldr r3, [r7, #4]
|
|
8002970: 691b ldr r3, [r3, #16]
|
|
8002972: 461a mov r2, r3
|
|
8002974: 68bb ldr r3, [r7, #8]
|
|
8002976: 60da str r2, [r3, #12]
|
|
for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++)
|
|
8002978: 68fb ldr r3, [r7, #12]
|
|
800297a: 3301 adds r3, #1
|
|
800297c: 60fb str r3, [r7, #12]
|
|
800297e: 68fb ldr r3, [r7, #12]
|
|
8002980: 2b03 cmp r3, #3
|
|
8002982: d9b5 bls.n 80028f0 <ETH_DMARxDescListInit+0xe>
|
|
}
|
|
}
|
|
|
|
WRITE_REG(heth->RxDescList.RxDescIdx, 0);
|
|
8002984: 687b ldr r3, [r7, #4]
|
|
8002986: 2200 movs r2, #0
|
|
8002988: 65da str r2, [r3, #92] ; 0x5c
|
|
WRITE_REG(heth->RxDescList.RxDescCnt, 0);
|
|
800298a: 687b ldr r3, [r7, #4]
|
|
800298c: 2200 movs r2, #0
|
|
800298e: 661a str r2, [r3, #96] ; 0x60
|
|
WRITE_REG(heth->RxDescList.RxBuildDescIdx, 0);
|
|
8002990: 687b ldr r3, [r7, #4]
|
|
8002992: 2200 movs r2, #0
|
|
8002994: 669a str r2, [r3, #104] ; 0x68
|
|
WRITE_REG(heth->RxDescList.RxBuildDescCnt, 0);
|
|
8002996: 687b ldr r3, [r7, #4]
|
|
8002998: 2200 movs r2, #0
|
|
800299a: 66da str r2, [r3, #108] ; 0x6c
|
|
WRITE_REG(heth->RxDescList.ItMode, 0);
|
|
800299c: 687b ldr r3, [r7, #4]
|
|
800299e: 2200 movs r2, #0
|
|
80029a0: 659a str r2, [r3, #88] ; 0x58
|
|
|
|
/* Set Receive Descriptor List Address */
|
|
WRITE_REG(heth->Instance->DMARDLAR, (uint32_t) heth->Init.RxDesc);
|
|
80029a2: 687b ldr r3, [r7, #4]
|
|
80029a4: 691a ldr r2, [r3, #16]
|
|
80029a6: 687b ldr r3, [r7, #4]
|
|
80029a8: 681b ldr r3, [r3, #0]
|
|
80029aa: f503 5380 add.w r3, r3, #4096 ; 0x1000
|
|
80029ae: 60da str r2, [r3, #12]
|
|
}
|
|
80029b0: bf00 nop
|
|
80029b2: 3714 adds r7, #20
|
|
80029b4: 46bd mov sp, r7
|
|
80029b6: f85d 7b04 ldr.w r7, [sp], #4
|
|
80029ba: 4770 bx lr
|
|
|
|
080029bc <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)
|
|
{
|
|
80029bc: b480 push {r7}
|
|
80029be: b08d sub sp, #52 ; 0x34
|
|
80029c0: af00 add r7, sp, #0
|
|
80029c2: 60f8 str r0, [r7, #12]
|
|
80029c4: 60b9 str r1, [r7, #8]
|
|
80029c6: 607a str r2, [r7, #4]
|
|
ETH_TxDescListTypeDef *dmatxdesclist = &heth->TxDescList;
|
|
80029c8: 68fb ldr r3, [r7, #12]
|
|
80029ca: 3318 adds r3, #24
|
|
80029cc: 617b str r3, [r7, #20]
|
|
uint32_t descidx = dmatxdesclist->CurTxDesc;
|
|
80029ce: 697b ldr r3, [r7, #20]
|
|
80029d0: 691b ldr r3, [r3, #16]
|
|
80029d2: 62fb str r3, [r7, #44] ; 0x2c
|
|
uint32_t firstdescidx = dmatxdesclist->CurTxDesc;
|
|
80029d4: 697b ldr r3, [r7, #20]
|
|
80029d6: 691b ldr r3, [r3, #16]
|
|
80029d8: 613b str r3, [r7, #16]
|
|
uint32_t idx;
|
|
uint32_t descnbr = 0;
|
|
80029da: 2300 movs r3, #0
|
|
80029dc: 627b str r3, [r7, #36] ; 0x24
|
|
ETH_DMADescTypeDef *dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
|
|
80029de: 697b ldr r3, [r7, #20]
|
|
80029e0: 6afa ldr r2, [r7, #44] ; 0x2c
|
|
80029e2: f853 3022 ldr.w r3, [r3, r2, lsl #2]
|
|
80029e6: 623b str r3, [r7, #32]
|
|
|
|
ETH_BufferTypeDef *txbuffer = pTxConfig->TxBuffer;
|
|
80029e8: 68bb ldr r3, [r7, #8]
|
|
80029ea: 689b ldr r3, [r3, #8]
|
|
80029ec: 61fb str r3, [r7, #28]
|
|
uint32_t bd_count = 0;
|
|
80029ee: 2300 movs r3, #0
|
|
80029f0: 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)
|
|
80029f2: 6a3b ldr r3, [r7, #32]
|
|
80029f4: 681b ldr r3, [r3, #0]
|
|
80029f6: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000
|
|
80029fa: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000
|
|
80029fe: d007 beq.n 8002a10 <ETH_Prepare_Tx_Descriptors+0x54>
|
|
|| (dmatxdesclist->PacketAddress[descidx] != NULL))
|
|
8002a00: 697a ldr r2, [r7, #20]
|
|
8002a02: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8002a04: 3304 adds r3, #4
|
|
8002a06: 009b lsls r3, r3, #2
|
|
8002a08: 4413 add r3, r2
|
|
8002a0a: 685b ldr r3, [r3, #4]
|
|
8002a0c: 2b00 cmp r3, #0
|
|
8002a0e: d001 beq.n 8002a14 <ETH_Prepare_Tx_Descriptors+0x58>
|
|
{
|
|
return HAL_ETH_ERROR_BUSY;
|
|
8002a10: 2302 movs r3, #2
|
|
8002a12: e103 b.n 8002c1c <ETH_Prepare_Tx_Descriptors+0x260>
|
|
}
|
|
|
|
|
|
descnbr += 1U;
|
|
8002a14: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
8002a16: 3301 adds r3, #1
|
|
8002a18: 627b str r3, [r7, #36] ; 0x24
|
|
|
|
/* Set header or buffer 1 address */
|
|
WRITE_REG(dmatxdesc->DESC2, (uint32_t)txbuffer->buffer);
|
|
8002a1a: 69fb ldr r3, [r7, #28]
|
|
8002a1c: 681b ldr r3, [r3, #0]
|
|
8002a1e: 461a mov r2, r3
|
|
8002a20: 6a3b ldr r3, [r7, #32]
|
|
8002a22: 609a str r2, [r3, #8]
|
|
|
|
/* Set header or buffer 1 Length */
|
|
MODIFY_REG(dmatxdesc->DESC1, ETH_DMATXDESC_TBS1, txbuffer->len);
|
|
8002a24: 6a3b ldr r3, [r7, #32]
|
|
8002a26: 685b ldr r3, [r3, #4]
|
|
8002a28: f423 53ff bic.w r3, r3, #8160 ; 0x1fe0
|
|
8002a2c: f023 031f bic.w r3, r3, #31
|
|
8002a30: 69fa ldr r2, [r7, #28]
|
|
8002a32: 6852 ldr r2, [r2, #4]
|
|
8002a34: 431a orrs r2, r3
|
|
8002a36: 6a3b ldr r3, [r7, #32]
|
|
8002a38: 605a str r2, [r3, #4]
|
|
|
|
if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CSUM) != 0U)
|
|
8002a3a: 68bb ldr r3, [r7, #8]
|
|
8002a3c: 681b ldr r3, [r3, #0]
|
|
8002a3e: f003 0301 and.w r3, r3, #1
|
|
8002a42: 2b00 cmp r3, #0
|
|
8002a44: d008 beq.n 8002a58 <ETH_Prepare_Tx_Descriptors+0x9c>
|
|
{
|
|
MODIFY_REG(dmatxdesc->DESC0, ETH_DMATXDESC_CIC, pTxConfig->ChecksumCtrl);
|
|
8002a46: 6a3b ldr r3, [r7, #32]
|
|
8002a48: 681b ldr r3, [r3, #0]
|
|
8002a4a: f423 0240 bic.w r2, r3, #12582912 ; 0xc00000
|
|
8002a4e: 68bb ldr r3, [r7, #8]
|
|
8002a50: 695b ldr r3, [r3, #20]
|
|
8002a52: 431a orrs r2, r3
|
|
8002a54: 6a3b ldr r3, [r7, #32]
|
|
8002a56: 601a str r2, [r3, #0]
|
|
}
|
|
|
|
if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CRCPAD) != 0U)
|
|
8002a58: 68bb ldr r3, [r7, #8]
|
|
8002a5a: 681b ldr r3, [r3, #0]
|
|
8002a5c: f003 0320 and.w r3, r3, #32
|
|
8002a60: 2b00 cmp r3, #0
|
|
8002a62: d008 beq.n 8002a76 <ETH_Prepare_Tx_Descriptors+0xba>
|
|
{
|
|
MODIFY_REG(dmatxdesc->DESC0, ETH_CRC_PAD_DISABLE, pTxConfig->CRCPadCtrl);
|
|
8002a64: 6a3b ldr r3, [r7, #32]
|
|
8002a66: 681b ldr r3, [r3, #0]
|
|
8002a68: f023 6240 bic.w r2, r3, #201326592 ; 0xc000000
|
|
8002a6c: 68bb ldr r3, [r7, #8]
|
|
8002a6e: 691b ldr r3, [r3, #16]
|
|
8002a70: 431a orrs r2, r3
|
|
8002a72: 6a3b ldr r3, [r7, #32]
|
|
8002a74: 601a str r2, [r3, #0]
|
|
}
|
|
|
|
|
|
if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != 0U)
|
|
8002a76: 68bb ldr r3, [r7, #8]
|
|
8002a78: 681b ldr r3, [r3, #0]
|
|
8002a7a: f003 0304 and.w r3, r3, #4
|
|
8002a7e: 2b00 cmp r3, #0
|
|
8002a80: d005 beq.n 8002a8e <ETH_Prepare_Tx_Descriptors+0xd2>
|
|
{
|
|
/* Set Vlan Type */
|
|
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_VF);
|
|
8002a82: 6a3b ldr r3, [r7, #32]
|
|
8002a84: 681b ldr r3, [r3, #0]
|
|
8002a86: f043 0280 orr.w r2, r3, #128 ; 0x80
|
|
8002a8a: 6a3b ldr r3, [r7, #32]
|
|
8002a8c: 601a str r2, [r3, #0]
|
|
}
|
|
|
|
/* Mark it as First Descriptor */
|
|
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_FS);
|
|
8002a8e: 6a3b ldr r3, [r7, #32]
|
|
8002a90: 681b ldr r3, [r3, #0]
|
|
8002a92: f043 5280 orr.w r2, r3, #268435456 ; 0x10000000
|
|
8002a96: 6a3b ldr r3, [r7, #32]
|
|
8002a98: 601a str r2, [r3, #0]
|
|
__ASM volatile ("dmb 0xF":::"memory");
|
|
8002a9a: f3bf 8f5f dmb sy
|
|
}
|
|
8002a9e: 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);
|
|
8002aa0: 6a3b ldr r3, [r7, #32]
|
|
8002aa2: 681b ldr r3, [r3, #0]
|
|
8002aa4: f043 4200 orr.w r2, r3, #2147483648 ; 0x80000000
|
|
8002aa8: 6a3b ldr r3, [r7, #32]
|
|
8002aaa: 601a str r2, [r3, #0]
|
|
|
|
/* only if the packet is split into more than one descriptors > 1 */
|
|
while (txbuffer->next != NULL)
|
|
8002aac: e084 b.n 8002bb8 <ETH_Prepare_Tx_Descriptors+0x1fc>
|
|
{
|
|
/* Clear the LD bit of previous descriptor */
|
|
CLEAR_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_LS);
|
|
8002aae: 6a3b ldr r3, [r7, #32]
|
|
8002ab0: 681b ldr r3, [r3, #0]
|
|
8002ab2: f023 5200 bic.w r2, r3, #536870912 ; 0x20000000
|
|
8002ab6: 6a3b ldr r3, [r7, #32]
|
|
8002ab8: 601a str r2, [r3, #0]
|
|
if (ItMode != ((uint32_t)RESET))
|
|
8002aba: 687b ldr r3, [r7, #4]
|
|
8002abc: 2b00 cmp r3, #0
|
|
8002abe: d006 beq.n 8002ace <ETH_Prepare_Tx_Descriptors+0x112>
|
|
{
|
|
/* Set Interrupt on completion bit */
|
|
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_IC);
|
|
8002ac0: 6a3b ldr r3, [r7, #32]
|
|
8002ac2: 681b ldr r3, [r3, #0]
|
|
8002ac4: f043 4280 orr.w r2, r3, #1073741824 ; 0x40000000
|
|
8002ac8: 6a3b ldr r3, [r7, #32]
|
|
8002aca: 601a str r2, [r3, #0]
|
|
8002acc: e005 b.n 8002ada <ETH_Prepare_Tx_Descriptors+0x11e>
|
|
}
|
|
else
|
|
{
|
|
/* Clear Interrupt on completion bit */
|
|
CLEAR_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_IC);
|
|
8002ace: 6a3b ldr r3, [r7, #32]
|
|
8002ad0: 681b ldr r3, [r3, #0]
|
|
8002ad2: f023 4280 bic.w r2, r3, #1073741824 ; 0x40000000
|
|
8002ad6: 6a3b ldr r3, [r7, #32]
|
|
8002ad8: 601a str r2, [r3, #0]
|
|
}
|
|
/* Increment current tx descriptor index */
|
|
INCR_TX_DESC_INDEX(descidx, 1U);
|
|
8002ada: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8002adc: 3301 adds r3, #1
|
|
8002ade: 62fb str r3, [r7, #44] ; 0x2c
|
|
8002ae0: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8002ae2: 2b03 cmp r3, #3
|
|
8002ae4: d902 bls.n 8002aec <ETH_Prepare_Tx_Descriptors+0x130>
|
|
8002ae6: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8002ae8: 3b04 subs r3, #4
|
|
8002aea: 62fb str r3, [r7, #44] ; 0x2c
|
|
/* Get current descriptor address */
|
|
dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
|
|
8002aec: 697b ldr r3, [r7, #20]
|
|
8002aee: 6afa ldr r2, [r7, #44] ; 0x2c
|
|
8002af0: f853 3022 ldr.w r3, [r3, r2, lsl #2]
|
|
8002af4: 623b str r3, [r7, #32]
|
|
|
|
/* Clear the FD bit of new Descriptor */
|
|
CLEAR_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_FS);
|
|
8002af6: 6a3b ldr r3, [r7, #32]
|
|
8002af8: 681b ldr r3, [r3, #0]
|
|
8002afa: f023 5280 bic.w r2, r3, #268435456 ; 0x10000000
|
|
8002afe: 6a3b ldr r3, [r7, #32]
|
|
8002b00: 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)
|
|
8002b02: 6a3b ldr r3, [r7, #32]
|
|
8002b04: 681b ldr r3, [r3, #0]
|
|
8002b06: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000
|
|
8002b0a: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000
|
|
8002b0e: d007 beq.n 8002b20 <ETH_Prepare_Tx_Descriptors+0x164>
|
|
|| (dmatxdesclist->PacketAddress[descidx] != NULL))
|
|
8002b10: 697a ldr r2, [r7, #20]
|
|
8002b12: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8002b14: 3304 adds r3, #4
|
|
8002b16: 009b lsls r3, r3, #2
|
|
8002b18: 4413 add r3, r2
|
|
8002b1a: 685b ldr r3, [r3, #4]
|
|
8002b1c: 2b00 cmp r3, #0
|
|
8002b1e: d029 beq.n 8002b74 <ETH_Prepare_Tx_Descriptors+0x1b8>
|
|
{
|
|
descidx = firstdescidx;
|
|
8002b20: 693b ldr r3, [r7, #16]
|
|
8002b22: 62fb str r3, [r7, #44] ; 0x2c
|
|
dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
|
|
8002b24: 697b ldr r3, [r7, #20]
|
|
8002b26: 6afa ldr r2, [r7, #44] ; 0x2c
|
|
8002b28: f853 3022 ldr.w r3, [r3, r2, lsl #2]
|
|
8002b2c: 623b str r3, [r7, #32]
|
|
|
|
/* clear previous desc own bit */
|
|
for (idx = 0; idx < descnbr; idx ++)
|
|
8002b2e: 2300 movs r3, #0
|
|
8002b30: 62bb str r3, [r7, #40] ; 0x28
|
|
8002b32: e019 b.n 8002b68 <ETH_Prepare_Tx_Descriptors+0x1ac>
|
|
__ASM volatile ("dmb 0xF":::"memory");
|
|
8002b34: f3bf 8f5f dmb sy
|
|
}
|
|
8002b38: bf00 nop
|
|
{
|
|
/* Ensure rest of descriptor is written to RAM before the OWN bit */
|
|
__DMB();
|
|
|
|
CLEAR_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_OWN);
|
|
8002b3a: 6a3b ldr r3, [r7, #32]
|
|
8002b3c: 681b ldr r3, [r3, #0]
|
|
8002b3e: f023 4200 bic.w r2, r3, #2147483648 ; 0x80000000
|
|
8002b42: 6a3b ldr r3, [r7, #32]
|
|
8002b44: 601a str r2, [r3, #0]
|
|
|
|
/* Increment current tx descriptor index */
|
|
INCR_TX_DESC_INDEX(descidx, 1U);
|
|
8002b46: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8002b48: 3301 adds r3, #1
|
|
8002b4a: 62fb str r3, [r7, #44] ; 0x2c
|
|
8002b4c: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8002b4e: 2b03 cmp r3, #3
|
|
8002b50: d902 bls.n 8002b58 <ETH_Prepare_Tx_Descriptors+0x19c>
|
|
8002b52: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8002b54: 3b04 subs r3, #4
|
|
8002b56: 62fb str r3, [r7, #44] ; 0x2c
|
|
/* Get current descriptor address */
|
|
dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
|
|
8002b58: 697b ldr r3, [r7, #20]
|
|
8002b5a: 6afa ldr r2, [r7, #44] ; 0x2c
|
|
8002b5c: f853 3022 ldr.w r3, [r3, r2, lsl #2]
|
|
8002b60: 623b str r3, [r7, #32]
|
|
for (idx = 0; idx < descnbr; idx ++)
|
|
8002b62: 6abb ldr r3, [r7, #40] ; 0x28
|
|
8002b64: 3301 adds r3, #1
|
|
8002b66: 62bb str r3, [r7, #40] ; 0x28
|
|
8002b68: 6aba ldr r2, [r7, #40] ; 0x28
|
|
8002b6a: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
8002b6c: 429a cmp r2, r3
|
|
8002b6e: d3e1 bcc.n 8002b34 <ETH_Prepare_Tx_Descriptors+0x178>
|
|
}
|
|
|
|
return HAL_ETH_ERROR_BUSY;
|
|
8002b70: 2302 movs r3, #2
|
|
8002b72: e053 b.n 8002c1c <ETH_Prepare_Tx_Descriptors+0x260>
|
|
}
|
|
|
|
descnbr += 1U;
|
|
8002b74: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
8002b76: 3301 adds r3, #1
|
|
8002b78: 627b str r3, [r7, #36] ; 0x24
|
|
|
|
/* Get the next Tx buffer in the list */
|
|
txbuffer = txbuffer->next;
|
|
8002b7a: 69fb ldr r3, [r7, #28]
|
|
8002b7c: 689b ldr r3, [r3, #8]
|
|
8002b7e: 61fb str r3, [r7, #28]
|
|
|
|
/* Set header or buffer 1 address */
|
|
WRITE_REG(dmatxdesc->DESC2, (uint32_t)txbuffer->buffer);
|
|
8002b80: 69fb ldr r3, [r7, #28]
|
|
8002b82: 681b ldr r3, [r3, #0]
|
|
8002b84: 461a mov r2, r3
|
|
8002b86: 6a3b ldr r3, [r7, #32]
|
|
8002b88: 609a str r2, [r3, #8]
|
|
|
|
/* Set header or buffer 1 Length */
|
|
MODIFY_REG(dmatxdesc->DESC1, ETH_DMATXDESC_TBS1, txbuffer->len);
|
|
8002b8a: 6a3b ldr r3, [r7, #32]
|
|
8002b8c: 685b ldr r3, [r3, #4]
|
|
8002b8e: f423 53ff bic.w r3, r3, #8160 ; 0x1fe0
|
|
8002b92: f023 031f bic.w r3, r3, #31
|
|
8002b96: 69fa ldr r2, [r7, #28]
|
|
8002b98: 6852 ldr r2, [r2, #4]
|
|
8002b9a: 431a orrs r2, r3
|
|
8002b9c: 6a3b ldr r3, [r7, #32]
|
|
8002b9e: 605a str r2, [r3, #4]
|
|
|
|
bd_count += 1U;
|
|
8002ba0: 69bb ldr r3, [r7, #24]
|
|
8002ba2: 3301 adds r3, #1
|
|
8002ba4: 61bb str r3, [r7, #24]
|
|
__ASM volatile ("dmb 0xF":::"memory");
|
|
8002ba6: f3bf 8f5f dmb sy
|
|
}
|
|
8002baa: 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);
|
|
8002bac: 6a3b ldr r3, [r7, #32]
|
|
8002bae: 681b ldr r3, [r3, #0]
|
|
8002bb0: f043 4200 orr.w r2, r3, #2147483648 ; 0x80000000
|
|
8002bb4: 6a3b ldr r3, [r7, #32]
|
|
8002bb6: 601a str r2, [r3, #0]
|
|
while (txbuffer->next != NULL)
|
|
8002bb8: 69fb ldr r3, [r7, #28]
|
|
8002bba: 689b ldr r3, [r3, #8]
|
|
8002bbc: 2b00 cmp r3, #0
|
|
8002bbe: f47f af76 bne.w 8002aae <ETH_Prepare_Tx_Descriptors+0xf2>
|
|
}
|
|
|
|
if (ItMode != ((uint32_t)RESET))
|
|
8002bc2: 687b ldr r3, [r7, #4]
|
|
8002bc4: 2b00 cmp r3, #0
|
|
8002bc6: d006 beq.n 8002bd6 <ETH_Prepare_Tx_Descriptors+0x21a>
|
|
{
|
|
/* Set Interrupt on completion bit */
|
|
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_IC);
|
|
8002bc8: 6a3b ldr r3, [r7, #32]
|
|
8002bca: 681b ldr r3, [r3, #0]
|
|
8002bcc: f043 4280 orr.w r2, r3, #1073741824 ; 0x40000000
|
|
8002bd0: 6a3b ldr r3, [r7, #32]
|
|
8002bd2: 601a str r2, [r3, #0]
|
|
8002bd4: e005 b.n 8002be2 <ETH_Prepare_Tx_Descriptors+0x226>
|
|
}
|
|
else
|
|
{
|
|
/* Clear Interrupt on completion bit */
|
|
CLEAR_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_IC);
|
|
8002bd6: 6a3b ldr r3, [r7, #32]
|
|
8002bd8: 681b ldr r3, [r3, #0]
|
|
8002bda: f023 4280 bic.w r2, r3, #1073741824 ; 0x40000000
|
|
8002bde: 6a3b ldr r3, [r7, #32]
|
|
8002be0: 601a str r2, [r3, #0]
|
|
}
|
|
|
|
/* Mark it as LAST descriptor */
|
|
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_LS);
|
|
8002be2: 6a3b ldr r3, [r7, #32]
|
|
8002be4: 681b ldr r3, [r3, #0]
|
|
8002be6: f043 5200 orr.w r2, r3, #536870912 ; 0x20000000
|
|
8002bea: 6a3b ldr r3, [r7, #32]
|
|
8002bec: 601a str r2, [r3, #0]
|
|
/* Save the current packet address to expose it to the application */
|
|
dmatxdesclist->PacketAddress[descidx] = dmatxdesclist->CurrentPacketAddress;
|
|
8002bee: 697b ldr r3, [r7, #20]
|
|
8002bf0: 6a5a ldr r2, [r3, #36] ; 0x24
|
|
8002bf2: 6979 ldr r1, [r7, #20]
|
|
8002bf4: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8002bf6: 3304 adds r3, #4
|
|
8002bf8: 009b lsls r3, r3, #2
|
|
8002bfa: 440b add r3, r1
|
|
8002bfc: 605a str r2, [r3, #4]
|
|
|
|
dmatxdesclist->CurTxDesc = descidx;
|
|
8002bfe: 697b ldr r3, [r7, #20]
|
|
8002c00: 6afa ldr r2, [r7, #44] ; 0x2c
|
|
8002c02: 611a str r2, [r3, #16]
|
|
__ASM volatile ("cpsid i" : : : "memory");
|
|
8002c04: b672 cpsid i
|
|
}
|
|
8002c06: bf00 nop
|
|
|
|
/* disable the interrupt */
|
|
__disable_irq();
|
|
|
|
dmatxdesclist->BuffersInUse += bd_count + 1U;
|
|
8002c08: 697b ldr r3, [r7, #20]
|
|
8002c0a: 6a9a ldr r2, [r3, #40] ; 0x28
|
|
8002c0c: 69bb ldr r3, [r7, #24]
|
|
8002c0e: 4413 add r3, r2
|
|
8002c10: 1c5a adds r2, r3, #1
|
|
8002c12: 697b ldr r3, [r7, #20]
|
|
8002c14: 629a str r2, [r3, #40] ; 0x28
|
|
__ASM volatile ("cpsie i" : : : "memory");
|
|
8002c16: b662 cpsie i
|
|
}
|
|
8002c18: bf00 nop
|
|
/* Enable interrupts back */
|
|
__enable_irq();
|
|
|
|
|
|
/* Return function status */
|
|
return HAL_ETH_ERROR_NONE;
|
|
8002c1a: 2300 movs r3, #0
|
|
}
|
|
8002c1c: 4618 mov r0, r3
|
|
8002c1e: 3734 adds r7, #52 ; 0x34
|
|
8002c20: 46bd mov sp, r7
|
|
8002c22: f85d 7b04 ldr.w r7, [sp], #4
|
|
8002c26: 4770 bx lr
|
|
|
|
08002c28 <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)
|
|
{
|
|
8002c28: b480 push {r7}
|
|
8002c2a: b089 sub sp, #36 ; 0x24
|
|
8002c2c: af00 add r7, sp, #0
|
|
8002c2e: 6078 str r0, [r7, #4]
|
|
8002c30: 6039 str r1, [r7, #0]
|
|
uint32_t position;
|
|
uint32_t ioposition = 0x00U;
|
|
8002c32: 2300 movs r3, #0
|
|
8002c34: 617b str r3, [r7, #20]
|
|
uint32_t iocurrent = 0x00U;
|
|
8002c36: 2300 movs r3, #0
|
|
8002c38: 613b str r3, [r7, #16]
|
|
uint32_t temp = 0x00U;
|
|
8002c3a: 2300 movs r3, #0
|
|
8002c3c: 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++)
|
|
8002c3e: 2300 movs r3, #0
|
|
8002c40: 61fb str r3, [r7, #28]
|
|
8002c42: e177 b.n 8002f34 <HAL_GPIO_Init+0x30c>
|
|
{
|
|
/* Get the IO position */
|
|
ioposition = 0x01U << position;
|
|
8002c44: 2201 movs r2, #1
|
|
8002c46: 69fb ldr r3, [r7, #28]
|
|
8002c48: fa02 f303 lsl.w r3, r2, r3
|
|
8002c4c: 617b str r3, [r7, #20]
|
|
/* Get the current IO position */
|
|
iocurrent = (uint32_t)(GPIO_Init->Pin) & ioposition;
|
|
8002c4e: 683b ldr r3, [r7, #0]
|
|
8002c50: 681b ldr r3, [r3, #0]
|
|
8002c52: 697a ldr r2, [r7, #20]
|
|
8002c54: 4013 ands r3, r2
|
|
8002c56: 613b str r3, [r7, #16]
|
|
|
|
if(iocurrent == ioposition)
|
|
8002c58: 693a ldr r2, [r7, #16]
|
|
8002c5a: 697b ldr r3, [r7, #20]
|
|
8002c5c: 429a cmp r2, r3
|
|
8002c5e: f040 8166 bne.w 8002f2e <HAL_GPIO_Init+0x306>
|
|
{
|
|
/*--------------------- GPIO Mode Configuration ------------------------*/
|
|
/* In case of Output or Alternate function mode selection */
|
|
if(((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || \
|
|
8002c62: 683b ldr r3, [r7, #0]
|
|
8002c64: 685b ldr r3, [r3, #4]
|
|
8002c66: f003 0303 and.w r3, r3, #3
|
|
8002c6a: 2b01 cmp r3, #1
|
|
8002c6c: d005 beq.n 8002c7a <HAL_GPIO_Init+0x52>
|
|
(GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
|
|
8002c6e: 683b ldr r3, [r7, #0]
|
|
8002c70: 685b ldr r3, [r3, #4]
|
|
8002c72: f003 0303 and.w r3, r3, #3
|
|
if(((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || \
|
|
8002c76: 2b02 cmp r3, #2
|
|
8002c78: d130 bne.n 8002cdc <HAL_GPIO_Init+0xb4>
|
|
{
|
|
/* Check the Speed parameter */
|
|
assert_param(IS_GPIO_SPEED(GPIO_Init->Speed));
|
|
/* Configure the IO Speed */
|
|
temp = GPIOx->OSPEEDR;
|
|
8002c7a: 687b ldr r3, [r7, #4]
|
|
8002c7c: 689b ldr r3, [r3, #8]
|
|
8002c7e: 61bb str r3, [r7, #24]
|
|
temp &= ~(GPIO_OSPEEDER_OSPEEDR0 << (position * 2U));
|
|
8002c80: 69fb ldr r3, [r7, #28]
|
|
8002c82: 005b lsls r3, r3, #1
|
|
8002c84: 2203 movs r2, #3
|
|
8002c86: fa02 f303 lsl.w r3, r2, r3
|
|
8002c8a: 43db mvns r3, r3
|
|
8002c8c: 69ba ldr r2, [r7, #24]
|
|
8002c8e: 4013 ands r3, r2
|
|
8002c90: 61bb str r3, [r7, #24]
|
|
temp |= (GPIO_Init->Speed << (position * 2U));
|
|
8002c92: 683b ldr r3, [r7, #0]
|
|
8002c94: 68da ldr r2, [r3, #12]
|
|
8002c96: 69fb ldr r3, [r7, #28]
|
|
8002c98: 005b lsls r3, r3, #1
|
|
8002c9a: fa02 f303 lsl.w r3, r2, r3
|
|
8002c9e: 69ba ldr r2, [r7, #24]
|
|
8002ca0: 4313 orrs r3, r2
|
|
8002ca2: 61bb str r3, [r7, #24]
|
|
GPIOx->OSPEEDR = temp;
|
|
8002ca4: 687b ldr r3, [r7, #4]
|
|
8002ca6: 69ba ldr r2, [r7, #24]
|
|
8002ca8: 609a str r2, [r3, #8]
|
|
|
|
/* Configure the IO Output Type */
|
|
temp = GPIOx->OTYPER;
|
|
8002caa: 687b ldr r3, [r7, #4]
|
|
8002cac: 685b ldr r3, [r3, #4]
|
|
8002cae: 61bb str r3, [r7, #24]
|
|
temp &= ~(GPIO_OTYPER_OT_0 << position) ;
|
|
8002cb0: 2201 movs r2, #1
|
|
8002cb2: 69fb ldr r3, [r7, #28]
|
|
8002cb4: fa02 f303 lsl.w r3, r2, r3
|
|
8002cb8: 43db mvns r3, r3
|
|
8002cba: 69ba ldr r2, [r7, #24]
|
|
8002cbc: 4013 ands r3, r2
|
|
8002cbe: 61bb str r3, [r7, #24]
|
|
temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position);
|
|
8002cc0: 683b ldr r3, [r7, #0]
|
|
8002cc2: 685b ldr r3, [r3, #4]
|
|
8002cc4: 091b lsrs r3, r3, #4
|
|
8002cc6: f003 0201 and.w r2, r3, #1
|
|
8002cca: 69fb ldr r3, [r7, #28]
|
|
8002ccc: fa02 f303 lsl.w r3, r2, r3
|
|
8002cd0: 69ba ldr r2, [r7, #24]
|
|
8002cd2: 4313 orrs r3, r2
|
|
8002cd4: 61bb str r3, [r7, #24]
|
|
GPIOx->OTYPER = temp;
|
|
8002cd6: 687b ldr r3, [r7, #4]
|
|
8002cd8: 69ba ldr r2, [r7, #24]
|
|
8002cda: 605a str r2, [r3, #4]
|
|
}
|
|
|
|
if((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG)
|
|
8002cdc: 683b ldr r3, [r7, #0]
|
|
8002cde: 685b ldr r3, [r3, #4]
|
|
8002ce0: f003 0303 and.w r3, r3, #3
|
|
8002ce4: 2b03 cmp r3, #3
|
|
8002ce6: d017 beq.n 8002d18 <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;
|
|
8002ce8: 687b ldr r3, [r7, #4]
|
|
8002cea: 68db ldr r3, [r3, #12]
|
|
8002cec: 61bb str r3, [r7, #24]
|
|
temp &= ~(GPIO_PUPDR_PUPDR0 << (position * 2U));
|
|
8002cee: 69fb ldr r3, [r7, #28]
|
|
8002cf0: 005b lsls r3, r3, #1
|
|
8002cf2: 2203 movs r2, #3
|
|
8002cf4: fa02 f303 lsl.w r3, r2, r3
|
|
8002cf8: 43db mvns r3, r3
|
|
8002cfa: 69ba ldr r2, [r7, #24]
|
|
8002cfc: 4013 ands r3, r2
|
|
8002cfe: 61bb str r3, [r7, #24]
|
|
temp |= ((GPIO_Init->Pull) << (position * 2U));
|
|
8002d00: 683b ldr r3, [r7, #0]
|
|
8002d02: 689a ldr r2, [r3, #8]
|
|
8002d04: 69fb ldr r3, [r7, #28]
|
|
8002d06: 005b lsls r3, r3, #1
|
|
8002d08: fa02 f303 lsl.w r3, r2, r3
|
|
8002d0c: 69ba ldr r2, [r7, #24]
|
|
8002d0e: 4313 orrs r3, r2
|
|
8002d10: 61bb str r3, [r7, #24]
|
|
GPIOx->PUPDR = temp;
|
|
8002d12: 687b ldr r3, [r7, #4]
|
|
8002d14: 69ba ldr r2, [r7, #24]
|
|
8002d16: 60da str r2, [r3, #12]
|
|
}
|
|
|
|
/* In case of Alternate function mode selection */
|
|
if((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
|
|
8002d18: 683b ldr r3, [r7, #0]
|
|
8002d1a: 685b ldr r3, [r3, #4]
|
|
8002d1c: f003 0303 and.w r3, r3, #3
|
|
8002d20: 2b02 cmp r3, #2
|
|
8002d22: d123 bne.n 8002d6c <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];
|
|
8002d24: 69fb ldr r3, [r7, #28]
|
|
8002d26: 08da lsrs r2, r3, #3
|
|
8002d28: 687b ldr r3, [r7, #4]
|
|
8002d2a: 3208 adds r2, #8
|
|
8002d2c: f853 3022 ldr.w r3, [r3, r2, lsl #2]
|
|
8002d30: 61bb str r3, [r7, #24]
|
|
temp &= ~(0xFU << ((uint32_t)(position & 0x07U) * 4U)) ;
|
|
8002d32: 69fb ldr r3, [r7, #28]
|
|
8002d34: f003 0307 and.w r3, r3, #7
|
|
8002d38: 009b lsls r3, r3, #2
|
|
8002d3a: 220f movs r2, #15
|
|
8002d3c: fa02 f303 lsl.w r3, r2, r3
|
|
8002d40: 43db mvns r3, r3
|
|
8002d42: 69ba ldr r2, [r7, #24]
|
|
8002d44: 4013 ands r3, r2
|
|
8002d46: 61bb str r3, [r7, #24]
|
|
temp |= ((uint32_t)(GPIO_Init->Alternate) << (((uint32_t)position & 0x07U) * 4U));
|
|
8002d48: 683b ldr r3, [r7, #0]
|
|
8002d4a: 691a ldr r2, [r3, #16]
|
|
8002d4c: 69fb ldr r3, [r7, #28]
|
|
8002d4e: f003 0307 and.w r3, r3, #7
|
|
8002d52: 009b lsls r3, r3, #2
|
|
8002d54: fa02 f303 lsl.w r3, r2, r3
|
|
8002d58: 69ba ldr r2, [r7, #24]
|
|
8002d5a: 4313 orrs r3, r2
|
|
8002d5c: 61bb str r3, [r7, #24]
|
|
GPIOx->AFR[position >> 3U] = temp;
|
|
8002d5e: 69fb ldr r3, [r7, #28]
|
|
8002d60: 08da lsrs r2, r3, #3
|
|
8002d62: 687b ldr r3, [r7, #4]
|
|
8002d64: 3208 adds r2, #8
|
|
8002d66: 69b9 ldr r1, [r7, #24]
|
|
8002d68: f843 1022 str.w r1, [r3, r2, lsl #2]
|
|
}
|
|
|
|
/* Configure IO Direction mode (Input, Output, Alternate or Analog) */
|
|
temp = GPIOx->MODER;
|
|
8002d6c: 687b ldr r3, [r7, #4]
|
|
8002d6e: 681b ldr r3, [r3, #0]
|
|
8002d70: 61bb str r3, [r7, #24]
|
|
temp &= ~(GPIO_MODER_MODER0 << (position * 2U));
|
|
8002d72: 69fb ldr r3, [r7, #28]
|
|
8002d74: 005b lsls r3, r3, #1
|
|
8002d76: 2203 movs r2, #3
|
|
8002d78: fa02 f303 lsl.w r3, r2, r3
|
|
8002d7c: 43db mvns r3, r3
|
|
8002d7e: 69ba ldr r2, [r7, #24]
|
|
8002d80: 4013 ands r3, r2
|
|
8002d82: 61bb str r3, [r7, #24]
|
|
temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2U));
|
|
8002d84: 683b ldr r3, [r7, #0]
|
|
8002d86: 685b ldr r3, [r3, #4]
|
|
8002d88: f003 0203 and.w r2, r3, #3
|
|
8002d8c: 69fb ldr r3, [r7, #28]
|
|
8002d8e: 005b lsls r3, r3, #1
|
|
8002d90: fa02 f303 lsl.w r3, r2, r3
|
|
8002d94: 69ba ldr r2, [r7, #24]
|
|
8002d96: 4313 orrs r3, r2
|
|
8002d98: 61bb str r3, [r7, #24]
|
|
GPIOx->MODER = temp;
|
|
8002d9a: 687b ldr r3, [r7, #4]
|
|
8002d9c: 69ba ldr r2, [r7, #24]
|
|
8002d9e: 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)
|
|
8002da0: 683b ldr r3, [r7, #0]
|
|
8002da2: 685b ldr r3, [r3, #4]
|
|
8002da4: f403 3340 and.w r3, r3, #196608 ; 0x30000
|
|
8002da8: 2b00 cmp r3, #0
|
|
8002daa: f000 80c0 beq.w 8002f2e <HAL_GPIO_Init+0x306>
|
|
{
|
|
/* Enable SYSCFG Clock */
|
|
__HAL_RCC_SYSCFG_CLK_ENABLE();
|
|
8002dae: 2300 movs r3, #0
|
|
8002db0: 60fb str r3, [r7, #12]
|
|
8002db2: 4b66 ldr r3, [pc, #408] ; (8002f4c <HAL_GPIO_Init+0x324>)
|
|
8002db4: 6c5b ldr r3, [r3, #68] ; 0x44
|
|
8002db6: 4a65 ldr r2, [pc, #404] ; (8002f4c <HAL_GPIO_Init+0x324>)
|
|
8002db8: f443 4380 orr.w r3, r3, #16384 ; 0x4000
|
|
8002dbc: 6453 str r3, [r2, #68] ; 0x44
|
|
8002dbe: 4b63 ldr r3, [pc, #396] ; (8002f4c <HAL_GPIO_Init+0x324>)
|
|
8002dc0: 6c5b ldr r3, [r3, #68] ; 0x44
|
|
8002dc2: f403 4380 and.w r3, r3, #16384 ; 0x4000
|
|
8002dc6: 60fb str r3, [r7, #12]
|
|
8002dc8: 68fb ldr r3, [r7, #12]
|
|
|
|
temp = SYSCFG->EXTICR[position >> 2U];
|
|
8002dca: 4a61 ldr r2, [pc, #388] ; (8002f50 <HAL_GPIO_Init+0x328>)
|
|
8002dcc: 69fb ldr r3, [r7, #28]
|
|
8002dce: 089b lsrs r3, r3, #2
|
|
8002dd0: 3302 adds r3, #2
|
|
8002dd2: f852 3023 ldr.w r3, [r2, r3, lsl #2]
|
|
8002dd6: 61bb str r3, [r7, #24]
|
|
temp &= ~(0x0FU << (4U * (position & 0x03U)));
|
|
8002dd8: 69fb ldr r3, [r7, #28]
|
|
8002dda: f003 0303 and.w r3, r3, #3
|
|
8002dde: 009b lsls r3, r3, #2
|
|
8002de0: 220f movs r2, #15
|
|
8002de2: fa02 f303 lsl.w r3, r2, r3
|
|
8002de6: 43db mvns r3, r3
|
|
8002de8: 69ba ldr r2, [r7, #24]
|
|
8002dea: 4013 ands r3, r2
|
|
8002dec: 61bb str r3, [r7, #24]
|
|
temp |= ((uint32_t)(GPIO_GET_INDEX(GPIOx)) << (4U * (position & 0x03U)));
|
|
8002dee: 687b ldr r3, [r7, #4]
|
|
8002df0: 4a58 ldr r2, [pc, #352] ; (8002f54 <HAL_GPIO_Init+0x32c>)
|
|
8002df2: 4293 cmp r3, r2
|
|
8002df4: d037 beq.n 8002e66 <HAL_GPIO_Init+0x23e>
|
|
8002df6: 687b ldr r3, [r7, #4]
|
|
8002df8: 4a57 ldr r2, [pc, #348] ; (8002f58 <HAL_GPIO_Init+0x330>)
|
|
8002dfa: 4293 cmp r3, r2
|
|
8002dfc: d031 beq.n 8002e62 <HAL_GPIO_Init+0x23a>
|
|
8002dfe: 687b ldr r3, [r7, #4]
|
|
8002e00: 4a56 ldr r2, [pc, #344] ; (8002f5c <HAL_GPIO_Init+0x334>)
|
|
8002e02: 4293 cmp r3, r2
|
|
8002e04: d02b beq.n 8002e5e <HAL_GPIO_Init+0x236>
|
|
8002e06: 687b ldr r3, [r7, #4]
|
|
8002e08: 4a55 ldr r2, [pc, #340] ; (8002f60 <HAL_GPIO_Init+0x338>)
|
|
8002e0a: 4293 cmp r3, r2
|
|
8002e0c: d025 beq.n 8002e5a <HAL_GPIO_Init+0x232>
|
|
8002e0e: 687b ldr r3, [r7, #4]
|
|
8002e10: 4a54 ldr r2, [pc, #336] ; (8002f64 <HAL_GPIO_Init+0x33c>)
|
|
8002e12: 4293 cmp r3, r2
|
|
8002e14: d01f beq.n 8002e56 <HAL_GPIO_Init+0x22e>
|
|
8002e16: 687b ldr r3, [r7, #4]
|
|
8002e18: 4a53 ldr r2, [pc, #332] ; (8002f68 <HAL_GPIO_Init+0x340>)
|
|
8002e1a: 4293 cmp r3, r2
|
|
8002e1c: d019 beq.n 8002e52 <HAL_GPIO_Init+0x22a>
|
|
8002e1e: 687b ldr r3, [r7, #4]
|
|
8002e20: 4a52 ldr r2, [pc, #328] ; (8002f6c <HAL_GPIO_Init+0x344>)
|
|
8002e22: 4293 cmp r3, r2
|
|
8002e24: d013 beq.n 8002e4e <HAL_GPIO_Init+0x226>
|
|
8002e26: 687b ldr r3, [r7, #4]
|
|
8002e28: 4a51 ldr r2, [pc, #324] ; (8002f70 <HAL_GPIO_Init+0x348>)
|
|
8002e2a: 4293 cmp r3, r2
|
|
8002e2c: d00d beq.n 8002e4a <HAL_GPIO_Init+0x222>
|
|
8002e2e: 687b ldr r3, [r7, #4]
|
|
8002e30: 4a50 ldr r2, [pc, #320] ; (8002f74 <HAL_GPIO_Init+0x34c>)
|
|
8002e32: 4293 cmp r3, r2
|
|
8002e34: d007 beq.n 8002e46 <HAL_GPIO_Init+0x21e>
|
|
8002e36: 687b ldr r3, [r7, #4]
|
|
8002e38: 4a4f ldr r2, [pc, #316] ; (8002f78 <HAL_GPIO_Init+0x350>)
|
|
8002e3a: 4293 cmp r3, r2
|
|
8002e3c: d101 bne.n 8002e42 <HAL_GPIO_Init+0x21a>
|
|
8002e3e: 2309 movs r3, #9
|
|
8002e40: e012 b.n 8002e68 <HAL_GPIO_Init+0x240>
|
|
8002e42: 230a movs r3, #10
|
|
8002e44: e010 b.n 8002e68 <HAL_GPIO_Init+0x240>
|
|
8002e46: 2308 movs r3, #8
|
|
8002e48: e00e b.n 8002e68 <HAL_GPIO_Init+0x240>
|
|
8002e4a: 2307 movs r3, #7
|
|
8002e4c: e00c b.n 8002e68 <HAL_GPIO_Init+0x240>
|
|
8002e4e: 2306 movs r3, #6
|
|
8002e50: e00a b.n 8002e68 <HAL_GPIO_Init+0x240>
|
|
8002e52: 2305 movs r3, #5
|
|
8002e54: e008 b.n 8002e68 <HAL_GPIO_Init+0x240>
|
|
8002e56: 2304 movs r3, #4
|
|
8002e58: e006 b.n 8002e68 <HAL_GPIO_Init+0x240>
|
|
8002e5a: 2303 movs r3, #3
|
|
8002e5c: e004 b.n 8002e68 <HAL_GPIO_Init+0x240>
|
|
8002e5e: 2302 movs r3, #2
|
|
8002e60: e002 b.n 8002e68 <HAL_GPIO_Init+0x240>
|
|
8002e62: 2301 movs r3, #1
|
|
8002e64: e000 b.n 8002e68 <HAL_GPIO_Init+0x240>
|
|
8002e66: 2300 movs r3, #0
|
|
8002e68: 69fa ldr r2, [r7, #28]
|
|
8002e6a: f002 0203 and.w r2, r2, #3
|
|
8002e6e: 0092 lsls r2, r2, #2
|
|
8002e70: 4093 lsls r3, r2
|
|
8002e72: 69ba ldr r2, [r7, #24]
|
|
8002e74: 4313 orrs r3, r2
|
|
8002e76: 61bb str r3, [r7, #24]
|
|
SYSCFG->EXTICR[position >> 2U] = temp;
|
|
8002e78: 4935 ldr r1, [pc, #212] ; (8002f50 <HAL_GPIO_Init+0x328>)
|
|
8002e7a: 69fb ldr r3, [r7, #28]
|
|
8002e7c: 089b lsrs r3, r3, #2
|
|
8002e7e: 3302 adds r3, #2
|
|
8002e80: 69ba ldr r2, [r7, #24]
|
|
8002e82: f841 2023 str.w r2, [r1, r3, lsl #2]
|
|
|
|
/* Clear Rising Falling edge configuration */
|
|
temp = EXTI->RTSR;
|
|
8002e86: 4b3d ldr r3, [pc, #244] ; (8002f7c <HAL_GPIO_Init+0x354>)
|
|
8002e88: 689b ldr r3, [r3, #8]
|
|
8002e8a: 61bb str r3, [r7, #24]
|
|
temp &= ~((uint32_t)iocurrent);
|
|
8002e8c: 693b ldr r3, [r7, #16]
|
|
8002e8e: 43db mvns r3, r3
|
|
8002e90: 69ba ldr r2, [r7, #24]
|
|
8002e92: 4013 ands r3, r2
|
|
8002e94: 61bb str r3, [r7, #24]
|
|
if((GPIO_Init->Mode & TRIGGER_RISING) != 0x00U)
|
|
8002e96: 683b ldr r3, [r7, #0]
|
|
8002e98: 685b ldr r3, [r3, #4]
|
|
8002e9a: f403 1380 and.w r3, r3, #1048576 ; 0x100000
|
|
8002e9e: 2b00 cmp r3, #0
|
|
8002ea0: d003 beq.n 8002eaa <HAL_GPIO_Init+0x282>
|
|
{
|
|
temp |= iocurrent;
|
|
8002ea2: 69ba ldr r2, [r7, #24]
|
|
8002ea4: 693b ldr r3, [r7, #16]
|
|
8002ea6: 4313 orrs r3, r2
|
|
8002ea8: 61bb str r3, [r7, #24]
|
|
}
|
|
EXTI->RTSR = temp;
|
|
8002eaa: 4a34 ldr r2, [pc, #208] ; (8002f7c <HAL_GPIO_Init+0x354>)
|
|
8002eac: 69bb ldr r3, [r7, #24]
|
|
8002eae: 6093 str r3, [r2, #8]
|
|
|
|
temp = EXTI->FTSR;
|
|
8002eb0: 4b32 ldr r3, [pc, #200] ; (8002f7c <HAL_GPIO_Init+0x354>)
|
|
8002eb2: 68db ldr r3, [r3, #12]
|
|
8002eb4: 61bb str r3, [r7, #24]
|
|
temp &= ~((uint32_t)iocurrent);
|
|
8002eb6: 693b ldr r3, [r7, #16]
|
|
8002eb8: 43db mvns r3, r3
|
|
8002eba: 69ba ldr r2, [r7, #24]
|
|
8002ebc: 4013 ands r3, r2
|
|
8002ebe: 61bb str r3, [r7, #24]
|
|
if((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00U)
|
|
8002ec0: 683b ldr r3, [r7, #0]
|
|
8002ec2: 685b ldr r3, [r3, #4]
|
|
8002ec4: f403 1300 and.w r3, r3, #2097152 ; 0x200000
|
|
8002ec8: 2b00 cmp r3, #0
|
|
8002eca: d003 beq.n 8002ed4 <HAL_GPIO_Init+0x2ac>
|
|
{
|
|
temp |= iocurrent;
|
|
8002ecc: 69ba ldr r2, [r7, #24]
|
|
8002ece: 693b ldr r3, [r7, #16]
|
|
8002ed0: 4313 orrs r3, r2
|
|
8002ed2: 61bb str r3, [r7, #24]
|
|
}
|
|
EXTI->FTSR = temp;
|
|
8002ed4: 4a29 ldr r2, [pc, #164] ; (8002f7c <HAL_GPIO_Init+0x354>)
|
|
8002ed6: 69bb ldr r3, [r7, #24]
|
|
8002ed8: 60d3 str r3, [r2, #12]
|
|
|
|
temp = EXTI->EMR;
|
|
8002eda: 4b28 ldr r3, [pc, #160] ; (8002f7c <HAL_GPIO_Init+0x354>)
|
|
8002edc: 685b ldr r3, [r3, #4]
|
|
8002ede: 61bb str r3, [r7, #24]
|
|
temp &= ~((uint32_t)iocurrent);
|
|
8002ee0: 693b ldr r3, [r7, #16]
|
|
8002ee2: 43db mvns r3, r3
|
|
8002ee4: 69ba ldr r2, [r7, #24]
|
|
8002ee6: 4013 ands r3, r2
|
|
8002ee8: 61bb str r3, [r7, #24]
|
|
if((GPIO_Init->Mode & EXTI_EVT) != 0x00U)
|
|
8002eea: 683b ldr r3, [r7, #0]
|
|
8002eec: 685b ldr r3, [r3, #4]
|
|
8002eee: f403 3300 and.w r3, r3, #131072 ; 0x20000
|
|
8002ef2: 2b00 cmp r3, #0
|
|
8002ef4: d003 beq.n 8002efe <HAL_GPIO_Init+0x2d6>
|
|
{
|
|
temp |= iocurrent;
|
|
8002ef6: 69ba ldr r2, [r7, #24]
|
|
8002ef8: 693b ldr r3, [r7, #16]
|
|
8002efa: 4313 orrs r3, r2
|
|
8002efc: 61bb str r3, [r7, #24]
|
|
}
|
|
EXTI->EMR = temp;
|
|
8002efe: 4a1f ldr r2, [pc, #124] ; (8002f7c <HAL_GPIO_Init+0x354>)
|
|
8002f00: 69bb ldr r3, [r7, #24]
|
|
8002f02: 6053 str r3, [r2, #4]
|
|
|
|
/* Clear EXTI line configuration */
|
|
temp = EXTI->IMR;
|
|
8002f04: 4b1d ldr r3, [pc, #116] ; (8002f7c <HAL_GPIO_Init+0x354>)
|
|
8002f06: 681b ldr r3, [r3, #0]
|
|
8002f08: 61bb str r3, [r7, #24]
|
|
temp &= ~((uint32_t)iocurrent);
|
|
8002f0a: 693b ldr r3, [r7, #16]
|
|
8002f0c: 43db mvns r3, r3
|
|
8002f0e: 69ba ldr r2, [r7, #24]
|
|
8002f10: 4013 ands r3, r2
|
|
8002f12: 61bb str r3, [r7, #24]
|
|
if((GPIO_Init->Mode & EXTI_IT) != 0x00U)
|
|
8002f14: 683b ldr r3, [r7, #0]
|
|
8002f16: 685b ldr r3, [r3, #4]
|
|
8002f18: f403 3380 and.w r3, r3, #65536 ; 0x10000
|
|
8002f1c: 2b00 cmp r3, #0
|
|
8002f1e: d003 beq.n 8002f28 <HAL_GPIO_Init+0x300>
|
|
{
|
|
temp |= iocurrent;
|
|
8002f20: 69ba ldr r2, [r7, #24]
|
|
8002f22: 693b ldr r3, [r7, #16]
|
|
8002f24: 4313 orrs r3, r2
|
|
8002f26: 61bb str r3, [r7, #24]
|
|
}
|
|
EXTI->IMR = temp;
|
|
8002f28: 4a14 ldr r2, [pc, #80] ; (8002f7c <HAL_GPIO_Init+0x354>)
|
|
8002f2a: 69bb ldr r3, [r7, #24]
|
|
8002f2c: 6013 str r3, [r2, #0]
|
|
for(position = 0U; position < GPIO_NUMBER; position++)
|
|
8002f2e: 69fb ldr r3, [r7, #28]
|
|
8002f30: 3301 adds r3, #1
|
|
8002f32: 61fb str r3, [r7, #28]
|
|
8002f34: 69fb ldr r3, [r7, #28]
|
|
8002f36: 2b0f cmp r3, #15
|
|
8002f38: f67f ae84 bls.w 8002c44 <HAL_GPIO_Init+0x1c>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
8002f3c: bf00 nop
|
|
8002f3e: bf00 nop
|
|
8002f40: 3724 adds r7, #36 ; 0x24
|
|
8002f42: 46bd mov sp, r7
|
|
8002f44: f85d 7b04 ldr.w r7, [sp], #4
|
|
8002f48: 4770 bx lr
|
|
8002f4a: bf00 nop
|
|
8002f4c: 40023800 .word 0x40023800
|
|
8002f50: 40013800 .word 0x40013800
|
|
8002f54: 40020000 .word 0x40020000
|
|
8002f58: 40020400 .word 0x40020400
|
|
8002f5c: 40020800 .word 0x40020800
|
|
8002f60: 40020c00 .word 0x40020c00
|
|
8002f64: 40021000 .word 0x40021000
|
|
8002f68: 40021400 .word 0x40021400
|
|
8002f6c: 40021800 .word 0x40021800
|
|
8002f70: 40021c00 .word 0x40021c00
|
|
8002f74: 40022000 .word 0x40022000
|
|
8002f78: 40022400 .word 0x40022400
|
|
8002f7c: 40013c00 .word 0x40013c00
|
|
|
|
08002f80 <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)
|
|
{
|
|
8002f80: b480 push {r7}
|
|
8002f82: b083 sub sp, #12
|
|
8002f84: af00 add r7, sp, #0
|
|
8002f86: 6078 str r0, [r7, #4]
|
|
8002f88: 460b mov r3, r1
|
|
8002f8a: 807b strh r3, [r7, #2]
|
|
8002f8c: 4613 mov r3, r2
|
|
8002f8e: 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)
|
|
8002f90: 787b ldrb r3, [r7, #1]
|
|
8002f92: 2b00 cmp r3, #0
|
|
8002f94: d003 beq.n 8002f9e <HAL_GPIO_WritePin+0x1e>
|
|
{
|
|
GPIOx->BSRR = GPIO_Pin;
|
|
8002f96: 887a ldrh r2, [r7, #2]
|
|
8002f98: 687b ldr r3, [r7, #4]
|
|
8002f9a: 619a str r2, [r3, #24]
|
|
}
|
|
else
|
|
{
|
|
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16U;
|
|
}
|
|
}
|
|
8002f9c: e003 b.n 8002fa6 <HAL_GPIO_WritePin+0x26>
|
|
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16U;
|
|
8002f9e: 887b ldrh r3, [r7, #2]
|
|
8002fa0: 041a lsls r2, r3, #16
|
|
8002fa2: 687b ldr r3, [r7, #4]
|
|
8002fa4: 619a str r2, [r3, #24]
|
|
}
|
|
8002fa6: bf00 nop
|
|
8002fa8: 370c adds r7, #12
|
|
8002faa: 46bd mov sp, r7
|
|
8002fac: f85d 7b04 ldr.w r7, [sp], #4
|
|
8002fb0: 4770 bx lr
|
|
...
|
|
|
|
08002fb4 <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)
|
|
{
|
|
8002fb4: b580 push {r7, lr}
|
|
8002fb6: b086 sub sp, #24
|
|
8002fb8: af00 add r7, sp, #0
|
|
8002fba: 6078 str r0, [r7, #4]
|
|
uint32_t tickstart, pll_config;
|
|
|
|
/* Check Null pointer */
|
|
if(RCC_OscInitStruct == NULL)
|
|
8002fbc: 687b ldr r3, [r7, #4]
|
|
8002fbe: 2b00 cmp r3, #0
|
|
8002fc0: d101 bne.n 8002fc6 <HAL_RCC_OscConfig+0x12>
|
|
{
|
|
return HAL_ERROR;
|
|
8002fc2: 2301 movs r3, #1
|
|
8002fc4: e267 b.n 8003496 <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)
|
|
8002fc6: 687b ldr r3, [r7, #4]
|
|
8002fc8: 681b ldr r3, [r3, #0]
|
|
8002fca: f003 0301 and.w r3, r3, #1
|
|
8002fce: 2b00 cmp r3, #0
|
|
8002fd0: d075 beq.n 80030be <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) ||\
|
|
8002fd2: 4b88 ldr r3, [pc, #544] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
8002fd4: 689b ldr r3, [r3, #8]
|
|
8002fd6: f003 030c and.w r3, r3, #12
|
|
8002fda: 2b04 cmp r3, #4
|
|
8002fdc: d00c beq.n 8002ff8 <HAL_RCC_OscConfig+0x44>
|
|
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
|
|
8002fde: 4b85 ldr r3, [pc, #532] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
8002fe0: 689b ldr r3, [r3, #8]
|
|
8002fe2: f003 030c and.w r3, r3, #12
|
|
if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE) ||\
|
|
8002fe6: 2b08 cmp r3, #8
|
|
8002fe8: d112 bne.n 8003010 <HAL_RCC_OscConfig+0x5c>
|
|
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
|
|
8002fea: 4b82 ldr r3, [pc, #520] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
8002fec: 685b ldr r3, [r3, #4]
|
|
8002fee: f403 0380 and.w r3, r3, #4194304 ; 0x400000
|
|
8002ff2: f5b3 0f80 cmp.w r3, #4194304 ; 0x400000
|
|
8002ff6: d10b bne.n 8003010 <HAL_RCC_OscConfig+0x5c>
|
|
{
|
|
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
|
|
8002ff8: 4b7e ldr r3, [pc, #504] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
8002ffa: 681b ldr r3, [r3, #0]
|
|
8002ffc: f403 3300 and.w r3, r3, #131072 ; 0x20000
|
|
8003000: 2b00 cmp r3, #0
|
|
8003002: d05b beq.n 80030bc <HAL_RCC_OscConfig+0x108>
|
|
8003004: 687b ldr r3, [r7, #4]
|
|
8003006: 685b ldr r3, [r3, #4]
|
|
8003008: 2b00 cmp r3, #0
|
|
800300a: d157 bne.n 80030bc <HAL_RCC_OscConfig+0x108>
|
|
{
|
|
return HAL_ERROR;
|
|
800300c: 2301 movs r3, #1
|
|
800300e: e242 b.n 8003496 <HAL_RCC_OscConfig+0x4e2>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Set the new HSE configuration ---------------------------------------*/
|
|
__HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
|
|
8003010: 687b ldr r3, [r7, #4]
|
|
8003012: 685b ldr r3, [r3, #4]
|
|
8003014: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
|
|
8003018: d106 bne.n 8003028 <HAL_RCC_OscConfig+0x74>
|
|
800301a: 4b76 ldr r3, [pc, #472] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
800301c: 681b ldr r3, [r3, #0]
|
|
800301e: 4a75 ldr r2, [pc, #468] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
8003020: f443 3380 orr.w r3, r3, #65536 ; 0x10000
|
|
8003024: 6013 str r3, [r2, #0]
|
|
8003026: e01d b.n 8003064 <HAL_RCC_OscConfig+0xb0>
|
|
8003028: 687b ldr r3, [r7, #4]
|
|
800302a: 685b ldr r3, [r3, #4]
|
|
800302c: f5b3 2fa0 cmp.w r3, #327680 ; 0x50000
|
|
8003030: d10c bne.n 800304c <HAL_RCC_OscConfig+0x98>
|
|
8003032: 4b70 ldr r3, [pc, #448] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
8003034: 681b ldr r3, [r3, #0]
|
|
8003036: 4a6f ldr r2, [pc, #444] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
8003038: f443 2380 orr.w r3, r3, #262144 ; 0x40000
|
|
800303c: 6013 str r3, [r2, #0]
|
|
800303e: 4b6d ldr r3, [pc, #436] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
8003040: 681b ldr r3, [r3, #0]
|
|
8003042: 4a6c ldr r2, [pc, #432] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
8003044: f443 3380 orr.w r3, r3, #65536 ; 0x10000
|
|
8003048: 6013 str r3, [r2, #0]
|
|
800304a: e00b b.n 8003064 <HAL_RCC_OscConfig+0xb0>
|
|
800304c: 4b69 ldr r3, [pc, #420] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
800304e: 681b ldr r3, [r3, #0]
|
|
8003050: 4a68 ldr r2, [pc, #416] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
8003052: f423 3380 bic.w r3, r3, #65536 ; 0x10000
|
|
8003056: 6013 str r3, [r2, #0]
|
|
8003058: 4b66 ldr r3, [pc, #408] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
800305a: 681b ldr r3, [r3, #0]
|
|
800305c: 4a65 ldr r2, [pc, #404] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
800305e: f423 2380 bic.w r3, r3, #262144 ; 0x40000
|
|
8003062: 6013 str r3, [r2, #0]
|
|
|
|
/* Check the HSE State */
|
|
if((RCC_OscInitStruct->HSEState) != RCC_HSE_OFF)
|
|
8003064: 687b ldr r3, [r7, #4]
|
|
8003066: 685b ldr r3, [r3, #4]
|
|
8003068: 2b00 cmp r3, #0
|
|
800306a: d013 beq.n 8003094 <HAL_RCC_OscConfig+0xe0>
|
|
{
|
|
/* Get Start Tick */
|
|
tickstart = HAL_GetTick();
|
|
800306c: f7fe fbd0 bl 8001810 <HAL_GetTick>
|
|
8003070: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till HSE is ready */
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
|
|
8003072: e008 b.n 8003086 <HAL_RCC_OscConfig+0xd2>
|
|
{
|
|
if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
|
|
8003074: f7fe fbcc bl 8001810 <HAL_GetTick>
|
|
8003078: 4602 mov r2, r0
|
|
800307a: 693b ldr r3, [r7, #16]
|
|
800307c: 1ad3 subs r3, r2, r3
|
|
800307e: 2b64 cmp r3, #100 ; 0x64
|
|
8003080: d901 bls.n 8003086 <HAL_RCC_OscConfig+0xd2>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8003082: 2303 movs r3, #3
|
|
8003084: e207 b.n 8003496 <HAL_RCC_OscConfig+0x4e2>
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
|
|
8003086: 4b5b ldr r3, [pc, #364] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
8003088: 681b ldr r3, [r3, #0]
|
|
800308a: f403 3300 and.w r3, r3, #131072 ; 0x20000
|
|
800308e: 2b00 cmp r3, #0
|
|
8003090: d0f0 beq.n 8003074 <HAL_RCC_OscConfig+0xc0>
|
|
8003092: e014 b.n 80030be <HAL_RCC_OscConfig+0x10a>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Get Start Tick */
|
|
tickstart = HAL_GetTick();
|
|
8003094: f7fe fbbc bl 8001810 <HAL_GetTick>
|
|
8003098: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till HSE is bypassed or disabled */
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
|
|
800309a: e008 b.n 80030ae <HAL_RCC_OscConfig+0xfa>
|
|
{
|
|
if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
|
|
800309c: f7fe fbb8 bl 8001810 <HAL_GetTick>
|
|
80030a0: 4602 mov r2, r0
|
|
80030a2: 693b ldr r3, [r7, #16]
|
|
80030a4: 1ad3 subs r3, r2, r3
|
|
80030a6: 2b64 cmp r3, #100 ; 0x64
|
|
80030a8: d901 bls.n 80030ae <HAL_RCC_OscConfig+0xfa>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
80030aa: 2303 movs r3, #3
|
|
80030ac: e1f3 b.n 8003496 <HAL_RCC_OscConfig+0x4e2>
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
|
|
80030ae: 4b51 ldr r3, [pc, #324] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
80030b0: 681b ldr r3, [r3, #0]
|
|
80030b2: f403 3300 and.w r3, r3, #131072 ; 0x20000
|
|
80030b6: 2b00 cmp r3, #0
|
|
80030b8: d1f0 bne.n 800309c <HAL_RCC_OscConfig+0xe8>
|
|
80030ba: e000 b.n 80030be <HAL_RCC_OscConfig+0x10a>
|
|
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
|
|
80030bc: bf00 nop
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/*----------------------------- HSI Configuration --------------------------*/
|
|
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI)
|
|
80030be: 687b ldr r3, [r7, #4]
|
|
80030c0: 681b ldr r3, [r3, #0]
|
|
80030c2: f003 0302 and.w r3, r3, #2
|
|
80030c6: 2b00 cmp r3, #0
|
|
80030c8: d063 beq.n 8003192 <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) ||\
|
|
80030ca: 4b4a ldr r3, [pc, #296] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
80030cc: 689b ldr r3, [r3, #8]
|
|
80030ce: f003 030c and.w r3, r3, #12
|
|
80030d2: 2b00 cmp r3, #0
|
|
80030d4: d00b beq.n 80030ee <HAL_RCC_OscConfig+0x13a>
|
|
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
|
|
80030d6: 4b47 ldr r3, [pc, #284] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
80030d8: 689b ldr r3, [r3, #8]
|
|
80030da: f003 030c and.w r3, r3, #12
|
|
if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI) ||\
|
|
80030de: 2b08 cmp r3, #8
|
|
80030e0: d11c bne.n 800311c <HAL_RCC_OscConfig+0x168>
|
|
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
|
|
80030e2: 4b44 ldr r3, [pc, #272] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
80030e4: 685b ldr r3, [r3, #4]
|
|
80030e6: f403 0380 and.w r3, r3, #4194304 ; 0x400000
|
|
80030ea: 2b00 cmp r3, #0
|
|
80030ec: d116 bne.n 800311c <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))
|
|
80030ee: 4b41 ldr r3, [pc, #260] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
80030f0: 681b ldr r3, [r3, #0]
|
|
80030f2: f003 0302 and.w r3, r3, #2
|
|
80030f6: 2b00 cmp r3, #0
|
|
80030f8: d005 beq.n 8003106 <HAL_RCC_OscConfig+0x152>
|
|
80030fa: 687b ldr r3, [r7, #4]
|
|
80030fc: 68db ldr r3, [r3, #12]
|
|
80030fe: 2b01 cmp r3, #1
|
|
8003100: d001 beq.n 8003106 <HAL_RCC_OscConfig+0x152>
|
|
{
|
|
return HAL_ERROR;
|
|
8003102: 2301 movs r3, #1
|
|
8003104: e1c7 b.n 8003496 <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);
|
|
8003106: 4b3b ldr r3, [pc, #236] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
8003108: 681b ldr r3, [r3, #0]
|
|
800310a: f023 02f8 bic.w r2, r3, #248 ; 0xf8
|
|
800310e: 687b ldr r3, [r7, #4]
|
|
8003110: 691b ldr r3, [r3, #16]
|
|
8003112: 00db lsls r3, r3, #3
|
|
8003114: 4937 ldr r1, [pc, #220] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
8003116: 4313 orrs r3, r2
|
|
8003118: 600b str r3, [r1, #0]
|
|
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
|
|
800311a: e03a b.n 8003192 <HAL_RCC_OscConfig+0x1de>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Check the HSI State */
|
|
if((RCC_OscInitStruct->HSIState)!= RCC_HSI_OFF)
|
|
800311c: 687b ldr r3, [r7, #4]
|
|
800311e: 68db ldr r3, [r3, #12]
|
|
8003120: 2b00 cmp r3, #0
|
|
8003122: d020 beq.n 8003166 <HAL_RCC_OscConfig+0x1b2>
|
|
{
|
|
/* Enable the Internal High Speed oscillator (HSI). */
|
|
__HAL_RCC_HSI_ENABLE();
|
|
8003124: 4b34 ldr r3, [pc, #208] ; (80031f8 <HAL_RCC_OscConfig+0x244>)
|
|
8003126: 2201 movs r2, #1
|
|
8003128: 601a str r2, [r3, #0]
|
|
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
800312a: f7fe fb71 bl 8001810 <HAL_GetTick>
|
|
800312e: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till HSI is ready */
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
|
|
8003130: e008 b.n 8003144 <HAL_RCC_OscConfig+0x190>
|
|
{
|
|
if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
|
|
8003132: f7fe fb6d bl 8001810 <HAL_GetTick>
|
|
8003136: 4602 mov r2, r0
|
|
8003138: 693b ldr r3, [r7, #16]
|
|
800313a: 1ad3 subs r3, r2, r3
|
|
800313c: 2b02 cmp r3, #2
|
|
800313e: d901 bls.n 8003144 <HAL_RCC_OscConfig+0x190>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8003140: 2303 movs r3, #3
|
|
8003142: e1a8 b.n 8003496 <HAL_RCC_OscConfig+0x4e2>
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
|
|
8003144: 4b2b ldr r3, [pc, #172] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
8003146: 681b ldr r3, [r3, #0]
|
|
8003148: f003 0302 and.w r3, r3, #2
|
|
800314c: 2b00 cmp r3, #0
|
|
800314e: d0f0 beq.n 8003132 <HAL_RCC_OscConfig+0x17e>
|
|
}
|
|
}
|
|
|
|
/* Adjusts the Internal High Speed oscillator (HSI) calibration value. */
|
|
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
|
|
8003150: 4b28 ldr r3, [pc, #160] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
8003152: 681b ldr r3, [r3, #0]
|
|
8003154: f023 02f8 bic.w r2, r3, #248 ; 0xf8
|
|
8003158: 687b ldr r3, [r7, #4]
|
|
800315a: 691b ldr r3, [r3, #16]
|
|
800315c: 00db lsls r3, r3, #3
|
|
800315e: 4925 ldr r1, [pc, #148] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
8003160: 4313 orrs r3, r2
|
|
8003162: 600b str r3, [r1, #0]
|
|
8003164: e015 b.n 8003192 <HAL_RCC_OscConfig+0x1de>
|
|
}
|
|
else
|
|
{
|
|
/* Disable the Internal High Speed oscillator (HSI). */
|
|
__HAL_RCC_HSI_DISABLE();
|
|
8003166: 4b24 ldr r3, [pc, #144] ; (80031f8 <HAL_RCC_OscConfig+0x244>)
|
|
8003168: 2200 movs r2, #0
|
|
800316a: 601a str r2, [r3, #0]
|
|
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
800316c: f7fe fb50 bl 8001810 <HAL_GetTick>
|
|
8003170: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till HSI is ready */
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
|
|
8003172: e008 b.n 8003186 <HAL_RCC_OscConfig+0x1d2>
|
|
{
|
|
if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
|
|
8003174: f7fe fb4c bl 8001810 <HAL_GetTick>
|
|
8003178: 4602 mov r2, r0
|
|
800317a: 693b ldr r3, [r7, #16]
|
|
800317c: 1ad3 subs r3, r2, r3
|
|
800317e: 2b02 cmp r3, #2
|
|
8003180: d901 bls.n 8003186 <HAL_RCC_OscConfig+0x1d2>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8003182: 2303 movs r3, #3
|
|
8003184: e187 b.n 8003496 <HAL_RCC_OscConfig+0x4e2>
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
|
|
8003186: 4b1b ldr r3, [pc, #108] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
8003188: 681b ldr r3, [r3, #0]
|
|
800318a: f003 0302 and.w r3, r3, #2
|
|
800318e: 2b00 cmp r3, #0
|
|
8003190: d1f0 bne.n 8003174 <HAL_RCC_OscConfig+0x1c0>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/*------------------------------ LSI Configuration -------------------------*/
|
|
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI)
|
|
8003192: 687b ldr r3, [r7, #4]
|
|
8003194: 681b ldr r3, [r3, #0]
|
|
8003196: f003 0308 and.w r3, r3, #8
|
|
800319a: 2b00 cmp r3, #0
|
|
800319c: d036 beq.n 800320c <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)
|
|
800319e: 687b ldr r3, [r7, #4]
|
|
80031a0: 695b ldr r3, [r3, #20]
|
|
80031a2: 2b00 cmp r3, #0
|
|
80031a4: d016 beq.n 80031d4 <HAL_RCC_OscConfig+0x220>
|
|
{
|
|
/* Enable the Internal Low Speed oscillator (LSI). */
|
|
__HAL_RCC_LSI_ENABLE();
|
|
80031a6: 4b15 ldr r3, [pc, #84] ; (80031fc <HAL_RCC_OscConfig+0x248>)
|
|
80031a8: 2201 movs r2, #1
|
|
80031aa: 601a str r2, [r3, #0]
|
|
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
80031ac: f7fe fb30 bl 8001810 <HAL_GetTick>
|
|
80031b0: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till LSI is ready */
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
|
|
80031b2: e008 b.n 80031c6 <HAL_RCC_OscConfig+0x212>
|
|
{
|
|
if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
|
|
80031b4: f7fe fb2c bl 8001810 <HAL_GetTick>
|
|
80031b8: 4602 mov r2, r0
|
|
80031ba: 693b ldr r3, [r7, #16]
|
|
80031bc: 1ad3 subs r3, r2, r3
|
|
80031be: 2b02 cmp r3, #2
|
|
80031c0: d901 bls.n 80031c6 <HAL_RCC_OscConfig+0x212>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
80031c2: 2303 movs r3, #3
|
|
80031c4: e167 b.n 8003496 <HAL_RCC_OscConfig+0x4e2>
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
|
|
80031c6: 4b0b ldr r3, [pc, #44] ; (80031f4 <HAL_RCC_OscConfig+0x240>)
|
|
80031c8: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
80031ca: f003 0302 and.w r3, r3, #2
|
|
80031ce: 2b00 cmp r3, #0
|
|
80031d0: d0f0 beq.n 80031b4 <HAL_RCC_OscConfig+0x200>
|
|
80031d2: e01b b.n 800320c <HAL_RCC_OscConfig+0x258>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Disable the Internal Low Speed oscillator (LSI). */
|
|
__HAL_RCC_LSI_DISABLE();
|
|
80031d4: 4b09 ldr r3, [pc, #36] ; (80031fc <HAL_RCC_OscConfig+0x248>)
|
|
80031d6: 2200 movs r2, #0
|
|
80031d8: 601a str r2, [r3, #0]
|
|
|
|
/* Get Start Tick */
|
|
tickstart = HAL_GetTick();
|
|
80031da: f7fe fb19 bl 8001810 <HAL_GetTick>
|
|
80031de: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till LSI is ready */
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
|
|
80031e0: e00e b.n 8003200 <HAL_RCC_OscConfig+0x24c>
|
|
{
|
|
if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
|
|
80031e2: f7fe fb15 bl 8001810 <HAL_GetTick>
|
|
80031e6: 4602 mov r2, r0
|
|
80031e8: 693b ldr r3, [r7, #16]
|
|
80031ea: 1ad3 subs r3, r2, r3
|
|
80031ec: 2b02 cmp r3, #2
|
|
80031ee: d907 bls.n 8003200 <HAL_RCC_OscConfig+0x24c>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
80031f0: 2303 movs r3, #3
|
|
80031f2: e150 b.n 8003496 <HAL_RCC_OscConfig+0x4e2>
|
|
80031f4: 40023800 .word 0x40023800
|
|
80031f8: 42470000 .word 0x42470000
|
|
80031fc: 42470e80 .word 0x42470e80
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
|
|
8003200: 4b88 ldr r3, [pc, #544] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
8003202: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
8003204: f003 0302 and.w r3, r3, #2
|
|
8003208: 2b00 cmp r3, #0
|
|
800320a: d1ea bne.n 80031e2 <HAL_RCC_OscConfig+0x22e>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/*------------------------------ LSE Configuration -------------------------*/
|
|
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE)
|
|
800320c: 687b ldr r3, [r7, #4]
|
|
800320e: 681b ldr r3, [r3, #0]
|
|
8003210: f003 0304 and.w r3, r3, #4
|
|
8003214: 2b00 cmp r3, #0
|
|
8003216: f000 8097 beq.w 8003348 <HAL_RCC_OscConfig+0x394>
|
|
{
|
|
FlagStatus pwrclkchanged = RESET;
|
|
800321a: 2300 movs r3, #0
|
|
800321c: 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())
|
|
800321e: 4b81 ldr r3, [pc, #516] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
8003220: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
8003222: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
|
|
8003226: 2b00 cmp r3, #0
|
|
8003228: d10f bne.n 800324a <HAL_RCC_OscConfig+0x296>
|
|
{
|
|
__HAL_RCC_PWR_CLK_ENABLE();
|
|
800322a: 2300 movs r3, #0
|
|
800322c: 60bb str r3, [r7, #8]
|
|
800322e: 4b7d ldr r3, [pc, #500] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
8003230: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
8003232: 4a7c ldr r2, [pc, #496] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
8003234: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
|
|
8003238: 6413 str r3, [r2, #64] ; 0x40
|
|
800323a: 4b7a ldr r3, [pc, #488] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
800323c: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
800323e: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
|
|
8003242: 60bb str r3, [r7, #8]
|
|
8003244: 68bb ldr r3, [r7, #8]
|
|
pwrclkchanged = SET;
|
|
8003246: 2301 movs r3, #1
|
|
8003248: 75fb strb r3, [r7, #23]
|
|
}
|
|
|
|
if(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
|
|
800324a: 4b77 ldr r3, [pc, #476] ; (8003428 <HAL_RCC_OscConfig+0x474>)
|
|
800324c: 681b ldr r3, [r3, #0]
|
|
800324e: f403 7380 and.w r3, r3, #256 ; 0x100
|
|
8003252: 2b00 cmp r3, #0
|
|
8003254: d118 bne.n 8003288 <HAL_RCC_OscConfig+0x2d4>
|
|
{
|
|
/* Enable write access to Backup domain */
|
|
SET_BIT(PWR->CR, PWR_CR_DBP);
|
|
8003256: 4b74 ldr r3, [pc, #464] ; (8003428 <HAL_RCC_OscConfig+0x474>)
|
|
8003258: 681b ldr r3, [r3, #0]
|
|
800325a: 4a73 ldr r2, [pc, #460] ; (8003428 <HAL_RCC_OscConfig+0x474>)
|
|
800325c: f443 7380 orr.w r3, r3, #256 ; 0x100
|
|
8003260: 6013 str r3, [r2, #0]
|
|
|
|
/* Wait for Backup domain Write protection disable */
|
|
tickstart = HAL_GetTick();
|
|
8003262: f7fe fad5 bl 8001810 <HAL_GetTick>
|
|
8003266: 6138 str r0, [r7, #16]
|
|
|
|
while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
|
|
8003268: e008 b.n 800327c <HAL_RCC_OscConfig+0x2c8>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
|
|
800326a: f7fe fad1 bl 8001810 <HAL_GetTick>
|
|
800326e: 4602 mov r2, r0
|
|
8003270: 693b ldr r3, [r7, #16]
|
|
8003272: 1ad3 subs r3, r2, r3
|
|
8003274: 2b02 cmp r3, #2
|
|
8003276: d901 bls.n 800327c <HAL_RCC_OscConfig+0x2c8>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8003278: 2303 movs r3, #3
|
|
800327a: e10c b.n 8003496 <HAL_RCC_OscConfig+0x4e2>
|
|
while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
|
|
800327c: 4b6a ldr r3, [pc, #424] ; (8003428 <HAL_RCC_OscConfig+0x474>)
|
|
800327e: 681b ldr r3, [r3, #0]
|
|
8003280: f403 7380 and.w r3, r3, #256 ; 0x100
|
|
8003284: 2b00 cmp r3, #0
|
|
8003286: d0f0 beq.n 800326a <HAL_RCC_OscConfig+0x2b6>
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Set the new LSE configuration -----------------------------------------*/
|
|
__HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
|
|
8003288: 687b ldr r3, [r7, #4]
|
|
800328a: 689b ldr r3, [r3, #8]
|
|
800328c: 2b01 cmp r3, #1
|
|
800328e: d106 bne.n 800329e <HAL_RCC_OscConfig+0x2ea>
|
|
8003290: 4b64 ldr r3, [pc, #400] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
8003292: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
8003294: 4a63 ldr r2, [pc, #396] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
8003296: f043 0301 orr.w r3, r3, #1
|
|
800329a: 6713 str r3, [r2, #112] ; 0x70
|
|
800329c: e01c b.n 80032d8 <HAL_RCC_OscConfig+0x324>
|
|
800329e: 687b ldr r3, [r7, #4]
|
|
80032a0: 689b ldr r3, [r3, #8]
|
|
80032a2: 2b05 cmp r3, #5
|
|
80032a4: d10c bne.n 80032c0 <HAL_RCC_OscConfig+0x30c>
|
|
80032a6: 4b5f ldr r3, [pc, #380] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
80032a8: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
80032aa: 4a5e ldr r2, [pc, #376] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
80032ac: f043 0304 orr.w r3, r3, #4
|
|
80032b0: 6713 str r3, [r2, #112] ; 0x70
|
|
80032b2: 4b5c ldr r3, [pc, #368] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
80032b4: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
80032b6: 4a5b ldr r2, [pc, #364] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
80032b8: f043 0301 orr.w r3, r3, #1
|
|
80032bc: 6713 str r3, [r2, #112] ; 0x70
|
|
80032be: e00b b.n 80032d8 <HAL_RCC_OscConfig+0x324>
|
|
80032c0: 4b58 ldr r3, [pc, #352] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
80032c2: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
80032c4: 4a57 ldr r2, [pc, #348] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
80032c6: f023 0301 bic.w r3, r3, #1
|
|
80032ca: 6713 str r3, [r2, #112] ; 0x70
|
|
80032cc: 4b55 ldr r3, [pc, #340] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
80032ce: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
80032d0: 4a54 ldr r2, [pc, #336] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
80032d2: f023 0304 bic.w r3, r3, #4
|
|
80032d6: 6713 str r3, [r2, #112] ; 0x70
|
|
/* Check the LSE State */
|
|
if((RCC_OscInitStruct->LSEState) != RCC_LSE_OFF)
|
|
80032d8: 687b ldr r3, [r7, #4]
|
|
80032da: 689b ldr r3, [r3, #8]
|
|
80032dc: 2b00 cmp r3, #0
|
|
80032de: d015 beq.n 800330c <HAL_RCC_OscConfig+0x358>
|
|
{
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
80032e0: f7fe fa96 bl 8001810 <HAL_GetTick>
|
|
80032e4: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till LSE is ready */
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
|
|
80032e6: e00a b.n 80032fe <HAL_RCC_OscConfig+0x34a>
|
|
{
|
|
if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
|
|
80032e8: f7fe fa92 bl 8001810 <HAL_GetTick>
|
|
80032ec: 4602 mov r2, r0
|
|
80032ee: 693b ldr r3, [r7, #16]
|
|
80032f0: 1ad3 subs r3, r2, r3
|
|
80032f2: f241 3288 movw r2, #5000 ; 0x1388
|
|
80032f6: 4293 cmp r3, r2
|
|
80032f8: d901 bls.n 80032fe <HAL_RCC_OscConfig+0x34a>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
80032fa: 2303 movs r3, #3
|
|
80032fc: e0cb b.n 8003496 <HAL_RCC_OscConfig+0x4e2>
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
|
|
80032fe: 4b49 ldr r3, [pc, #292] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
8003300: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
8003302: f003 0302 and.w r3, r3, #2
|
|
8003306: 2b00 cmp r3, #0
|
|
8003308: d0ee beq.n 80032e8 <HAL_RCC_OscConfig+0x334>
|
|
800330a: e014 b.n 8003336 <HAL_RCC_OscConfig+0x382>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Get Start Tick */
|
|
tickstart = HAL_GetTick();
|
|
800330c: f7fe fa80 bl 8001810 <HAL_GetTick>
|
|
8003310: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till LSE is ready */
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
|
|
8003312: e00a b.n 800332a <HAL_RCC_OscConfig+0x376>
|
|
{
|
|
if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
|
|
8003314: f7fe fa7c bl 8001810 <HAL_GetTick>
|
|
8003318: 4602 mov r2, r0
|
|
800331a: 693b ldr r3, [r7, #16]
|
|
800331c: 1ad3 subs r3, r2, r3
|
|
800331e: f241 3288 movw r2, #5000 ; 0x1388
|
|
8003322: 4293 cmp r3, r2
|
|
8003324: d901 bls.n 800332a <HAL_RCC_OscConfig+0x376>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8003326: 2303 movs r3, #3
|
|
8003328: e0b5 b.n 8003496 <HAL_RCC_OscConfig+0x4e2>
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
|
|
800332a: 4b3e ldr r3, [pc, #248] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
800332c: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
800332e: f003 0302 and.w r3, r3, #2
|
|
8003332: 2b00 cmp r3, #0
|
|
8003334: d1ee bne.n 8003314 <HAL_RCC_OscConfig+0x360>
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Restore clock configuration if changed */
|
|
if(pwrclkchanged == SET)
|
|
8003336: 7dfb ldrb r3, [r7, #23]
|
|
8003338: 2b01 cmp r3, #1
|
|
800333a: d105 bne.n 8003348 <HAL_RCC_OscConfig+0x394>
|
|
{
|
|
__HAL_RCC_PWR_CLK_DISABLE();
|
|
800333c: 4b39 ldr r3, [pc, #228] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
800333e: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
8003340: 4a38 ldr r2, [pc, #224] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
8003342: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000
|
|
8003346: 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)
|
|
8003348: 687b ldr r3, [r7, #4]
|
|
800334a: 699b ldr r3, [r3, #24]
|
|
800334c: 2b00 cmp r3, #0
|
|
800334e: f000 80a1 beq.w 8003494 <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)
|
|
8003352: 4b34 ldr r3, [pc, #208] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
8003354: 689b ldr r3, [r3, #8]
|
|
8003356: f003 030c and.w r3, r3, #12
|
|
800335a: 2b08 cmp r3, #8
|
|
800335c: d05c beq.n 8003418 <HAL_RCC_OscConfig+0x464>
|
|
{
|
|
if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON)
|
|
800335e: 687b ldr r3, [r7, #4]
|
|
8003360: 699b ldr r3, [r3, #24]
|
|
8003362: 2b02 cmp r3, #2
|
|
8003364: d141 bne.n 80033ea <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();
|
|
8003366: 4b31 ldr r3, [pc, #196] ; (800342c <HAL_RCC_OscConfig+0x478>)
|
|
8003368: 2200 movs r2, #0
|
|
800336a: 601a str r2, [r3, #0]
|
|
|
|
/* Get Start Tick */
|
|
tickstart = HAL_GetTick();
|
|
800336c: f7fe fa50 bl 8001810 <HAL_GetTick>
|
|
8003370: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till PLL is ready */
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
|
|
8003372: e008 b.n 8003386 <HAL_RCC_OscConfig+0x3d2>
|
|
{
|
|
if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
|
|
8003374: f7fe fa4c bl 8001810 <HAL_GetTick>
|
|
8003378: 4602 mov r2, r0
|
|
800337a: 693b ldr r3, [r7, #16]
|
|
800337c: 1ad3 subs r3, r2, r3
|
|
800337e: 2b02 cmp r3, #2
|
|
8003380: d901 bls.n 8003386 <HAL_RCC_OscConfig+0x3d2>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8003382: 2303 movs r3, #3
|
|
8003384: e087 b.n 8003496 <HAL_RCC_OscConfig+0x4e2>
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
|
|
8003386: 4b27 ldr r3, [pc, #156] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
8003388: 681b ldr r3, [r3, #0]
|
|
800338a: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
|
|
800338e: 2b00 cmp r3, #0
|
|
8003390: d1f0 bne.n 8003374 <HAL_RCC_OscConfig+0x3c0>
|
|
}
|
|
}
|
|
|
|
/* Configure the main PLL clock source, multiplication and division factors. */
|
|
WRITE_REG(RCC->PLLCFGR, (RCC_OscInitStruct->PLL.PLLSource | \
|
|
8003392: 687b ldr r3, [r7, #4]
|
|
8003394: 69da ldr r2, [r3, #28]
|
|
8003396: 687b ldr r3, [r7, #4]
|
|
8003398: 6a1b ldr r3, [r3, #32]
|
|
800339a: 431a orrs r2, r3
|
|
800339c: 687b ldr r3, [r7, #4]
|
|
800339e: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
80033a0: 019b lsls r3, r3, #6
|
|
80033a2: 431a orrs r2, r3
|
|
80033a4: 687b ldr r3, [r7, #4]
|
|
80033a6: 6a9b ldr r3, [r3, #40] ; 0x28
|
|
80033a8: 085b lsrs r3, r3, #1
|
|
80033aa: 3b01 subs r3, #1
|
|
80033ac: 041b lsls r3, r3, #16
|
|
80033ae: 431a orrs r2, r3
|
|
80033b0: 687b ldr r3, [r7, #4]
|
|
80033b2: 6adb ldr r3, [r3, #44] ; 0x2c
|
|
80033b4: 061b lsls r3, r3, #24
|
|
80033b6: 491b ldr r1, [pc, #108] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
80033b8: 4313 orrs r3, r2
|
|
80033ba: 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();
|
|
80033bc: 4b1b ldr r3, [pc, #108] ; (800342c <HAL_RCC_OscConfig+0x478>)
|
|
80033be: 2201 movs r2, #1
|
|
80033c0: 601a str r2, [r3, #0]
|
|
|
|
/* Get Start Tick */
|
|
tickstart = HAL_GetTick();
|
|
80033c2: f7fe fa25 bl 8001810 <HAL_GetTick>
|
|
80033c6: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till PLL is ready */
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
|
|
80033c8: e008 b.n 80033dc <HAL_RCC_OscConfig+0x428>
|
|
{
|
|
if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
|
|
80033ca: f7fe fa21 bl 8001810 <HAL_GetTick>
|
|
80033ce: 4602 mov r2, r0
|
|
80033d0: 693b ldr r3, [r7, #16]
|
|
80033d2: 1ad3 subs r3, r2, r3
|
|
80033d4: 2b02 cmp r3, #2
|
|
80033d6: d901 bls.n 80033dc <HAL_RCC_OscConfig+0x428>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
80033d8: 2303 movs r3, #3
|
|
80033da: e05c b.n 8003496 <HAL_RCC_OscConfig+0x4e2>
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
|
|
80033dc: 4b11 ldr r3, [pc, #68] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
80033de: 681b ldr r3, [r3, #0]
|
|
80033e0: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
|
|
80033e4: 2b00 cmp r3, #0
|
|
80033e6: d0f0 beq.n 80033ca <HAL_RCC_OscConfig+0x416>
|
|
80033e8: e054 b.n 8003494 <HAL_RCC_OscConfig+0x4e0>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Disable the main PLL. */
|
|
__HAL_RCC_PLL_DISABLE();
|
|
80033ea: 4b10 ldr r3, [pc, #64] ; (800342c <HAL_RCC_OscConfig+0x478>)
|
|
80033ec: 2200 movs r2, #0
|
|
80033ee: 601a str r2, [r3, #0]
|
|
|
|
/* Get Start Tick */
|
|
tickstart = HAL_GetTick();
|
|
80033f0: f7fe fa0e bl 8001810 <HAL_GetTick>
|
|
80033f4: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till PLL is ready */
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
|
|
80033f6: e008 b.n 800340a <HAL_RCC_OscConfig+0x456>
|
|
{
|
|
if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
|
|
80033f8: f7fe fa0a bl 8001810 <HAL_GetTick>
|
|
80033fc: 4602 mov r2, r0
|
|
80033fe: 693b ldr r3, [r7, #16]
|
|
8003400: 1ad3 subs r3, r2, r3
|
|
8003402: 2b02 cmp r3, #2
|
|
8003404: d901 bls.n 800340a <HAL_RCC_OscConfig+0x456>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8003406: 2303 movs r3, #3
|
|
8003408: e045 b.n 8003496 <HAL_RCC_OscConfig+0x4e2>
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
|
|
800340a: 4b06 ldr r3, [pc, #24] ; (8003424 <HAL_RCC_OscConfig+0x470>)
|
|
800340c: 681b ldr r3, [r3, #0]
|
|
800340e: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
|
|
8003412: 2b00 cmp r3, #0
|
|
8003414: d1f0 bne.n 80033f8 <HAL_RCC_OscConfig+0x444>
|
|
8003416: e03d b.n 8003494 <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)
|
|
8003418: 687b ldr r3, [r7, #4]
|
|
800341a: 699b ldr r3, [r3, #24]
|
|
800341c: 2b01 cmp r3, #1
|
|
800341e: d107 bne.n 8003430 <HAL_RCC_OscConfig+0x47c>
|
|
{
|
|
return HAL_ERROR;
|
|
8003420: 2301 movs r3, #1
|
|
8003422: e038 b.n 8003496 <HAL_RCC_OscConfig+0x4e2>
|
|
8003424: 40023800 .word 0x40023800
|
|
8003428: 40007000 .word 0x40007000
|
|
800342c: 42470060 .word 0x42470060
|
|
}
|
|
else
|
|
{
|
|
/* Do not return HAL_ERROR if request repeats the current configuration */
|
|
pll_config = RCC->PLLCFGR;
|
|
8003430: 4b1b ldr r3, [pc, #108] ; (80034a0 <HAL_RCC_OscConfig+0x4ec>)
|
|
8003432: 685b ldr r3, [r3, #4]
|
|
8003434: 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) ||
|
|
8003436: 687b ldr r3, [r7, #4]
|
|
8003438: 699b ldr r3, [r3, #24]
|
|
800343a: 2b01 cmp r3, #1
|
|
800343c: d028 beq.n 8003490 <HAL_RCC_OscConfig+0x4dc>
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
|
|
800343e: 68fb ldr r3, [r7, #12]
|
|
8003440: f403 0280 and.w r2, r3, #4194304 ; 0x400000
|
|
8003444: 687b ldr r3, [r7, #4]
|
|
8003446: 69db ldr r3, [r3, #28]
|
|
if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
|
|
8003448: 429a cmp r2, r3
|
|
800344a: d121 bne.n 8003490 <HAL_RCC_OscConfig+0x4dc>
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != (RCC_OscInitStruct->PLL.PLLM) << RCC_PLLCFGR_PLLM_Pos) ||
|
|
800344c: 68fb ldr r3, [r7, #12]
|
|
800344e: f003 023f and.w r2, r3, #63 ; 0x3f
|
|
8003452: 687b ldr r3, [r7, #4]
|
|
8003454: 6a1b ldr r3, [r3, #32]
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
|
|
8003456: 429a cmp r2, r3
|
|
8003458: d11a bne.n 8003490 <HAL_RCC_OscConfig+0x4dc>
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
|
|
800345a: 68fa ldr r2, [r7, #12]
|
|
800345c: f647 73c0 movw r3, #32704 ; 0x7fc0
|
|
8003460: 4013 ands r3, r2
|
|
8003462: 687a ldr r2, [r7, #4]
|
|
8003464: 6a52 ldr r2, [r2, #36] ; 0x24
|
|
8003466: 0192 lsls r2, r2, #6
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != (RCC_OscInitStruct->PLL.PLLM) << RCC_PLLCFGR_PLLM_Pos) ||
|
|
8003468: 4293 cmp r3, r2
|
|
800346a: d111 bne.n 8003490 <HAL_RCC_OscConfig+0x4dc>
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
|
|
800346c: 68fb ldr r3, [r7, #12]
|
|
800346e: f403 3240 and.w r2, r3, #196608 ; 0x30000
|
|
8003472: 687b ldr r3, [r7, #4]
|
|
8003474: 6a9b ldr r3, [r3, #40] ; 0x28
|
|
8003476: 085b lsrs r3, r3, #1
|
|
8003478: 3b01 subs r3, #1
|
|
800347a: 041b lsls r3, r3, #16
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
|
|
800347c: 429a cmp r2, r3
|
|
800347e: d107 bne.n 8003490 <HAL_RCC_OscConfig+0x4dc>
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)))
|
|
8003480: 68fb ldr r3, [r7, #12]
|
|
8003482: f003 6270 and.w r2, r3, #251658240 ; 0xf000000
|
|
8003486: 687b ldr r3, [r7, #4]
|
|
8003488: 6adb ldr r3, [r3, #44] ; 0x2c
|
|
800348a: 061b lsls r3, r3, #24
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
|
|
800348c: 429a cmp r2, r3
|
|
800348e: d001 beq.n 8003494 <HAL_RCC_OscConfig+0x4e0>
|
|
#endif
|
|
{
|
|
return HAL_ERROR;
|
|
8003490: 2301 movs r3, #1
|
|
8003492: e000 b.n 8003496 <HAL_RCC_OscConfig+0x4e2>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return HAL_OK;
|
|
8003494: 2300 movs r3, #0
|
|
}
|
|
8003496: 4618 mov r0, r3
|
|
8003498: 3718 adds r7, #24
|
|
800349a: 46bd mov sp, r7
|
|
800349c: bd80 pop {r7, pc}
|
|
800349e: bf00 nop
|
|
80034a0: 40023800 .word 0x40023800
|
|
|
|
080034a4 <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)
|
|
{
|
|
80034a4: b580 push {r7, lr}
|
|
80034a6: b084 sub sp, #16
|
|
80034a8: af00 add r7, sp, #0
|
|
80034aa: 6078 str r0, [r7, #4]
|
|
80034ac: 6039 str r1, [r7, #0]
|
|
uint32_t tickstart;
|
|
|
|
/* Check Null pointer */
|
|
if(RCC_ClkInitStruct == NULL)
|
|
80034ae: 687b ldr r3, [r7, #4]
|
|
80034b0: 2b00 cmp r3, #0
|
|
80034b2: d101 bne.n 80034b8 <HAL_RCC_ClockConfig+0x14>
|
|
{
|
|
return HAL_ERROR;
|
|
80034b4: 2301 movs r3, #1
|
|
80034b6: e0cc b.n 8003652 <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())
|
|
80034b8: 4b68 ldr r3, [pc, #416] ; (800365c <HAL_RCC_ClockConfig+0x1b8>)
|
|
80034ba: 681b ldr r3, [r3, #0]
|
|
80034bc: f003 030f and.w r3, r3, #15
|
|
80034c0: 683a ldr r2, [r7, #0]
|
|
80034c2: 429a cmp r2, r3
|
|
80034c4: d90c bls.n 80034e0 <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);
|
|
80034c6: 4b65 ldr r3, [pc, #404] ; (800365c <HAL_RCC_ClockConfig+0x1b8>)
|
|
80034c8: 683a ldr r2, [r7, #0]
|
|
80034ca: b2d2 uxtb r2, r2
|
|
80034cc: 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)
|
|
80034ce: 4b63 ldr r3, [pc, #396] ; (800365c <HAL_RCC_ClockConfig+0x1b8>)
|
|
80034d0: 681b ldr r3, [r3, #0]
|
|
80034d2: f003 030f and.w r3, r3, #15
|
|
80034d6: 683a ldr r2, [r7, #0]
|
|
80034d8: 429a cmp r2, r3
|
|
80034da: d001 beq.n 80034e0 <HAL_RCC_ClockConfig+0x3c>
|
|
{
|
|
return HAL_ERROR;
|
|
80034dc: 2301 movs r3, #1
|
|
80034de: e0b8 b.n 8003652 <HAL_RCC_ClockConfig+0x1ae>
|
|
}
|
|
}
|
|
|
|
/*-------------------------- HCLK Configuration --------------------------*/
|
|
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
|
|
80034e0: 687b ldr r3, [r7, #4]
|
|
80034e2: 681b ldr r3, [r3, #0]
|
|
80034e4: f003 0302 and.w r3, r3, #2
|
|
80034e8: 2b00 cmp r3, #0
|
|
80034ea: d020 beq.n 800352e <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)
|
|
80034ec: 687b ldr r3, [r7, #4]
|
|
80034ee: 681b ldr r3, [r3, #0]
|
|
80034f0: f003 0304 and.w r3, r3, #4
|
|
80034f4: 2b00 cmp r3, #0
|
|
80034f6: d005 beq.n 8003504 <HAL_RCC_ClockConfig+0x60>
|
|
{
|
|
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_HCLK_DIV16);
|
|
80034f8: 4b59 ldr r3, [pc, #356] ; (8003660 <HAL_RCC_ClockConfig+0x1bc>)
|
|
80034fa: 689b ldr r3, [r3, #8]
|
|
80034fc: 4a58 ldr r2, [pc, #352] ; (8003660 <HAL_RCC_ClockConfig+0x1bc>)
|
|
80034fe: f443 53e0 orr.w r3, r3, #7168 ; 0x1c00
|
|
8003502: 6093 str r3, [r2, #8]
|
|
}
|
|
|
|
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
|
|
8003504: 687b ldr r3, [r7, #4]
|
|
8003506: 681b ldr r3, [r3, #0]
|
|
8003508: f003 0308 and.w r3, r3, #8
|
|
800350c: 2b00 cmp r3, #0
|
|
800350e: d005 beq.n 800351c <HAL_RCC_ClockConfig+0x78>
|
|
{
|
|
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, (RCC_HCLK_DIV16 << 3));
|
|
8003510: 4b53 ldr r3, [pc, #332] ; (8003660 <HAL_RCC_ClockConfig+0x1bc>)
|
|
8003512: 689b ldr r3, [r3, #8]
|
|
8003514: 4a52 ldr r2, [pc, #328] ; (8003660 <HAL_RCC_ClockConfig+0x1bc>)
|
|
8003516: f443 4360 orr.w r3, r3, #57344 ; 0xe000
|
|
800351a: 6093 str r3, [r2, #8]
|
|
}
|
|
|
|
assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider));
|
|
MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider);
|
|
800351c: 4b50 ldr r3, [pc, #320] ; (8003660 <HAL_RCC_ClockConfig+0x1bc>)
|
|
800351e: 689b ldr r3, [r3, #8]
|
|
8003520: f023 02f0 bic.w r2, r3, #240 ; 0xf0
|
|
8003524: 687b ldr r3, [r7, #4]
|
|
8003526: 689b ldr r3, [r3, #8]
|
|
8003528: 494d ldr r1, [pc, #308] ; (8003660 <HAL_RCC_ClockConfig+0x1bc>)
|
|
800352a: 4313 orrs r3, r2
|
|
800352c: 608b str r3, [r1, #8]
|
|
}
|
|
|
|
/*------------------------- SYSCLK Configuration ---------------------------*/
|
|
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK)
|
|
800352e: 687b ldr r3, [r7, #4]
|
|
8003530: 681b ldr r3, [r3, #0]
|
|
8003532: f003 0301 and.w r3, r3, #1
|
|
8003536: 2b00 cmp r3, #0
|
|
8003538: d044 beq.n 80035c4 <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)
|
|
800353a: 687b ldr r3, [r7, #4]
|
|
800353c: 685b ldr r3, [r3, #4]
|
|
800353e: 2b01 cmp r3, #1
|
|
8003540: d107 bne.n 8003552 <HAL_RCC_ClockConfig+0xae>
|
|
{
|
|
/* Check the HSE ready flag */
|
|
if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
|
|
8003542: 4b47 ldr r3, [pc, #284] ; (8003660 <HAL_RCC_ClockConfig+0x1bc>)
|
|
8003544: 681b ldr r3, [r3, #0]
|
|
8003546: f403 3300 and.w r3, r3, #131072 ; 0x20000
|
|
800354a: 2b00 cmp r3, #0
|
|
800354c: d119 bne.n 8003582 <HAL_RCC_ClockConfig+0xde>
|
|
{
|
|
return HAL_ERROR;
|
|
800354e: 2301 movs r3, #1
|
|
8003550: e07f b.n 8003652 <HAL_RCC_ClockConfig+0x1ae>
|
|
}
|
|
}
|
|
/* PLL is selected as System Clock Source */
|
|
else if((RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) ||
|
|
8003552: 687b ldr r3, [r7, #4]
|
|
8003554: 685b ldr r3, [r3, #4]
|
|
8003556: 2b02 cmp r3, #2
|
|
8003558: d003 beq.n 8003562 <HAL_RCC_ClockConfig+0xbe>
|
|
(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLRCLK))
|
|
800355a: 687b ldr r3, [r7, #4]
|
|
800355c: 685b ldr r3, [r3, #4]
|
|
else if((RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) ||
|
|
800355e: 2b03 cmp r3, #3
|
|
8003560: d107 bne.n 8003572 <HAL_RCC_ClockConfig+0xce>
|
|
{
|
|
/* Check the PLL ready flag */
|
|
if(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
|
|
8003562: 4b3f ldr r3, [pc, #252] ; (8003660 <HAL_RCC_ClockConfig+0x1bc>)
|
|
8003564: 681b ldr r3, [r3, #0]
|
|
8003566: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
|
|
800356a: 2b00 cmp r3, #0
|
|
800356c: d109 bne.n 8003582 <HAL_RCC_ClockConfig+0xde>
|
|
{
|
|
return HAL_ERROR;
|
|
800356e: 2301 movs r3, #1
|
|
8003570: e06f b.n 8003652 <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)
|
|
8003572: 4b3b ldr r3, [pc, #236] ; (8003660 <HAL_RCC_ClockConfig+0x1bc>)
|
|
8003574: 681b ldr r3, [r3, #0]
|
|
8003576: f003 0302 and.w r3, r3, #2
|
|
800357a: 2b00 cmp r3, #0
|
|
800357c: d101 bne.n 8003582 <HAL_RCC_ClockConfig+0xde>
|
|
{
|
|
return HAL_ERROR;
|
|
800357e: 2301 movs r3, #1
|
|
8003580: e067 b.n 8003652 <HAL_RCC_ClockConfig+0x1ae>
|
|
}
|
|
}
|
|
|
|
__HAL_RCC_SYSCLK_CONFIG(RCC_ClkInitStruct->SYSCLKSource);
|
|
8003582: 4b37 ldr r3, [pc, #220] ; (8003660 <HAL_RCC_ClockConfig+0x1bc>)
|
|
8003584: 689b ldr r3, [r3, #8]
|
|
8003586: f023 0203 bic.w r2, r3, #3
|
|
800358a: 687b ldr r3, [r7, #4]
|
|
800358c: 685b ldr r3, [r3, #4]
|
|
800358e: 4934 ldr r1, [pc, #208] ; (8003660 <HAL_RCC_ClockConfig+0x1bc>)
|
|
8003590: 4313 orrs r3, r2
|
|
8003592: 608b str r3, [r1, #8]
|
|
|
|
/* Get Start Tick */
|
|
tickstart = HAL_GetTick();
|
|
8003594: f7fe f93c bl 8001810 <HAL_GetTick>
|
|
8003598: 60f8 str r0, [r7, #12]
|
|
|
|
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
|
|
800359a: e00a b.n 80035b2 <HAL_RCC_ClockConfig+0x10e>
|
|
{
|
|
if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE)
|
|
800359c: f7fe f938 bl 8001810 <HAL_GetTick>
|
|
80035a0: 4602 mov r2, r0
|
|
80035a2: 68fb ldr r3, [r7, #12]
|
|
80035a4: 1ad3 subs r3, r2, r3
|
|
80035a6: f241 3288 movw r2, #5000 ; 0x1388
|
|
80035aa: 4293 cmp r3, r2
|
|
80035ac: d901 bls.n 80035b2 <HAL_RCC_ClockConfig+0x10e>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
80035ae: 2303 movs r3, #3
|
|
80035b0: e04f b.n 8003652 <HAL_RCC_ClockConfig+0x1ae>
|
|
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
|
|
80035b2: 4b2b ldr r3, [pc, #172] ; (8003660 <HAL_RCC_ClockConfig+0x1bc>)
|
|
80035b4: 689b ldr r3, [r3, #8]
|
|
80035b6: f003 020c and.w r2, r3, #12
|
|
80035ba: 687b ldr r3, [r7, #4]
|
|
80035bc: 685b ldr r3, [r3, #4]
|
|
80035be: 009b lsls r3, r3, #2
|
|
80035c0: 429a cmp r2, r3
|
|
80035c2: d1eb bne.n 800359c <HAL_RCC_ClockConfig+0xf8>
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Decreasing the number of wait states because of lower CPU frequency */
|
|
if(FLatency < __HAL_FLASH_GET_LATENCY())
|
|
80035c4: 4b25 ldr r3, [pc, #148] ; (800365c <HAL_RCC_ClockConfig+0x1b8>)
|
|
80035c6: 681b ldr r3, [r3, #0]
|
|
80035c8: f003 030f and.w r3, r3, #15
|
|
80035cc: 683a ldr r2, [r7, #0]
|
|
80035ce: 429a cmp r2, r3
|
|
80035d0: d20c bcs.n 80035ec <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);
|
|
80035d2: 4b22 ldr r3, [pc, #136] ; (800365c <HAL_RCC_ClockConfig+0x1b8>)
|
|
80035d4: 683a ldr r2, [r7, #0]
|
|
80035d6: b2d2 uxtb r2, r2
|
|
80035d8: 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)
|
|
80035da: 4b20 ldr r3, [pc, #128] ; (800365c <HAL_RCC_ClockConfig+0x1b8>)
|
|
80035dc: 681b ldr r3, [r3, #0]
|
|
80035de: f003 030f and.w r3, r3, #15
|
|
80035e2: 683a ldr r2, [r7, #0]
|
|
80035e4: 429a cmp r2, r3
|
|
80035e6: d001 beq.n 80035ec <HAL_RCC_ClockConfig+0x148>
|
|
{
|
|
return HAL_ERROR;
|
|
80035e8: 2301 movs r3, #1
|
|
80035ea: e032 b.n 8003652 <HAL_RCC_ClockConfig+0x1ae>
|
|
}
|
|
}
|
|
|
|
/*-------------------------- PCLK1 Configuration ---------------------------*/
|
|
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
|
|
80035ec: 687b ldr r3, [r7, #4]
|
|
80035ee: 681b ldr r3, [r3, #0]
|
|
80035f0: f003 0304 and.w r3, r3, #4
|
|
80035f4: 2b00 cmp r3, #0
|
|
80035f6: d008 beq.n 800360a <HAL_RCC_ClockConfig+0x166>
|
|
{
|
|
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider));
|
|
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_ClkInitStruct->APB1CLKDivider);
|
|
80035f8: 4b19 ldr r3, [pc, #100] ; (8003660 <HAL_RCC_ClockConfig+0x1bc>)
|
|
80035fa: 689b ldr r3, [r3, #8]
|
|
80035fc: f423 52e0 bic.w r2, r3, #7168 ; 0x1c00
|
|
8003600: 687b ldr r3, [r7, #4]
|
|
8003602: 68db ldr r3, [r3, #12]
|
|
8003604: 4916 ldr r1, [pc, #88] ; (8003660 <HAL_RCC_ClockConfig+0x1bc>)
|
|
8003606: 4313 orrs r3, r2
|
|
8003608: 608b str r3, [r1, #8]
|
|
}
|
|
|
|
/*-------------------------- PCLK2 Configuration ---------------------------*/
|
|
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
|
|
800360a: 687b ldr r3, [r7, #4]
|
|
800360c: 681b ldr r3, [r3, #0]
|
|
800360e: f003 0308 and.w r3, r3, #8
|
|
8003612: 2b00 cmp r3, #0
|
|
8003614: d009 beq.n 800362a <HAL_RCC_ClockConfig+0x186>
|
|
{
|
|
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB2CLKDivider));
|
|
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, ((RCC_ClkInitStruct->APB2CLKDivider) << 3U));
|
|
8003616: 4b12 ldr r3, [pc, #72] ; (8003660 <HAL_RCC_ClockConfig+0x1bc>)
|
|
8003618: 689b ldr r3, [r3, #8]
|
|
800361a: f423 4260 bic.w r2, r3, #57344 ; 0xe000
|
|
800361e: 687b ldr r3, [r7, #4]
|
|
8003620: 691b ldr r3, [r3, #16]
|
|
8003622: 00db lsls r3, r3, #3
|
|
8003624: 490e ldr r1, [pc, #56] ; (8003660 <HAL_RCC_ClockConfig+0x1bc>)
|
|
8003626: 4313 orrs r3, r2
|
|
8003628: 608b str r3, [r1, #8]
|
|
}
|
|
|
|
/* Update the SystemCoreClock global variable */
|
|
SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE)>> RCC_CFGR_HPRE_Pos];
|
|
800362a: f000 f821 bl 8003670 <HAL_RCC_GetSysClockFreq>
|
|
800362e: 4602 mov r2, r0
|
|
8003630: 4b0b ldr r3, [pc, #44] ; (8003660 <HAL_RCC_ClockConfig+0x1bc>)
|
|
8003632: 689b ldr r3, [r3, #8]
|
|
8003634: 091b lsrs r3, r3, #4
|
|
8003636: f003 030f and.w r3, r3, #15
|
|
800363a: 490a ldr r1, [pc, #40] ; (8003664 <HAL_RCC_ClockConfig+0x1c0>)
|
|
800363c: 5ccb ldrb r3, [r1, r3]
|
|
800363e: fa22 f303 lsr.w r3, r2, r3
|
|
8003642: 4a09 ldr r2, [pc, #36] ; (8003668 <HAL_RCC_ClockConfig+0x1c4>)
|
|
8003644: 6013 str r3, [r2, #0]
|
|
|
|
/* Configure the source of time base considering new system clocks settings */
|
|
HAL_InitTick (uwTickPrio);
|
|
8003646: 4b09 ldr r3, [pc, #36] ; (800366c <HAL_RCC_ClockConfig+0x1c8>)
|
|
8003648: 681b ldr r3, [r3, #0]
|
|
800364a: 4618 mov r0, r3
|
|
800364c: f7fe f89c bl 8001788 <HAL_InitTick>
|
|
|
|
return HAL_OK;
|
|
8003650: 2300 movs r3, #0
|
|
}
|
|
8003652: 4618 mov r0, r3
|
|
8003654: 3710 adds r7, #16
|
|
8003656: 46bd mov sp, r7
|
|
8003658: bd80 pop {r7, pc}
|
|
800365a: bf00 nop
|
|
800365c: 40023c00 .word 0x40023c00
|
|
8003660: 40023800 .word 0x40023800
|
|
8003664: 08017e40 .word 0x08017e40
|
|
8003668: 20000000 .word 0x20000000
|
|
800366c: 20000004 .word 0x20000004
|
|
|
|
08003670 <HAL_RCC_GetSysClockFreq>:
|
|
*
|
|
*
|
|
* @retval SYSCLK frequency
|
|
*/
|
|
__weak uint32_t HAL_RCC_GetSysClockFreq(void)
|
|
{
|
|
8003670: e92d 4fb0 stmdb sp!, {r4, r5, r7, r8, r9, sl, fp, lr}
|
|
8003674: b090 sub sp, #64 ; 0x40
|
|
8003676: af00 add r7, sp, #0
|
|
uint32_t pllm = 0U, pllvco = 0U, pllp = 0U;
|
|
8003678: 2300 movs r3, #0
|
|
800367a: 637b str r3, [r7, #52] ; 0x34
|
|
800367c: 2300 movs r3, #0
|
|
800367e: 63fb str r3, [r7, #60] ; 0x3c
|
|
8003680: 2300 movs r3, #0
|
|
8003682: 633b str r3, [r7, #48] ; 0x30
|
|
uint32_t sysclockfreq = 0U;
|
|
8003684: 2300 movs r3, #0
|
|
8003686: 63bb str r3, [r7, #56] ; 0x38
|
|
|
|
/* Get SYSCLK source -------------------------------------------------------*/
|
|
switch (RCC->CFGR & RCC_CFGR_SWS)
|
|
8003688: 4b59 ldr r3, [pc, #356] ; (80037f0 <HAL_RCC_GetSysClockFreq+0x180>)
|
|
800368a: 689b ldr r3, [r3, #8]
|
|
800368c: f003 030c and.w r3, r3, #12
|
|
8003690: 2b08 cmp r3, #8
|
|
8003692: d00d beq.n 80036b0 <HAL_RCC_GetSysClockFreq+0x40>
|
|
8003694: 2b08 cmp r3, #8
|
|
8003696: f200 80a1 bhi.w 80037dc <HAL_RCC_GetSysClockFreq+0x16c>
|
|
800369a: 2b00 cmp r3, #0
|
|
800369c: d002 beq.n 80036a4 <HAL_RCC_GetSysClockFreq+0x34>
|
|
800369e: 2b04 cmp r3, #4
|
|
80036a0: d003 beq.n 80036aa <HAL_RCC_GetSysClockFreq+0x3a>
|
|
80036a2: e09b b.n 80037dc <HAL_RCC_GetSysClockFreq+0x16c>
|
|
{
|
|
case RCC_CFGR_SWS_HSI: /* HSI used as system clock source */
|
|
{
|
|
sysclockfreq = HSI_VALUE;
|
|
80036a4: 4b53 ldr r3, [pc, #332] ; (80037f4 <HAL_RCC_GetSysClockFreq+0x184>)
|
|
80036a6: 63bb str r3, [r7, #56] ; 0x38
|
|
break;
|
|
80036a8: e09b b.n 80037e2 <HAL_RCC_GetSysClockFreq+0x172>
|
|
}
|
|
case RCC_CFGR_SWS_HSE: /* HSE used as system clock source */
|
|
{
|
|
sysclockfreq = HSE_VALUE;
|
|
80036aa: 4b53 ldr r3, [pc, #332] ; (80037f8 <HAL_RCC_GetSysClockFreq+0x188>)
|
|
80036ac: 63bb str r3, [r7, #56] ; 0x38
|
|
break;
|
|
80036ae: e098 b.n 80037e2 <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;
|
|
80036b0: 4b4f ldr r3, [pc, #316] ; (80037f0 <HAL_RCC_GetSysClockFreq+0x180>)
|
|
80036b2: 685b ldr r3, [r3, #4]
|
|
80036b4: f003 033f and.w r3, r3, #63 ; 0x3f
|
|
80036b8: 637b str r3, [r7, #52] ; 0x34
|
|
if(__HAL_RCC_GET_PLL_OSCSOURCE() != RCC_PLLSOURCE_HSI)
|
|
80036ba: 4b4d ldr r3, [pc, #308] ; (80037f0 <HAL_RCC_GetSysClockFreq+0x180>)
|
|
80036bc: 685b ldr r3, [r3, #4]
|
|
80036be: f403 0380 and.w r3, r3, #4194304 ; 0x400000
|
|
80036c2: 2b00 cmp r3, #0
|
|
80036c4: d028 beq.n 8003718 <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);
|
|
80036c6: 4b4a ldr r3, [pc, #296] ; (80037f0 <HAL_RCC_GetSysClockFreq+0x180>)
|
|
80036c8: 685b ldr r3, [r3, #4]
|
|
80036ca: 099b lsrs r3, r3, #6
|
|
80036cc: 2200 movs r2, #0
|
|
80036ce: 623b str r3, [r7, #32]
|
|
80036d0: 627a str r2, [r7, #36] ; 0x24
|
|
80036d2: 6a3b ldr r3, [r7, #32]
|
|
80036d4: f3c3 0008 ubfx r0, r3, #0, #9
|
|
80036d8: 2100 movs r1, #0
|
|
80036da: 4b47 ldr r3, [pc, #284] ; (80037f8 <HAL_RCC_GetSysClockFreq+0x188>)
|
|
80036dc: fb03 f201 mul.w r2, r3, r1
|
|
80036e0: 2300 movs r3, #0
|
|
80036e2: fb00 f303 mul.w r3, r0, r3
|
|
80036e6: 4413 add r3, r2
|
|
80036e8: 4a43 ldr r2, [pc, #268] ; (80037f8 <HAL_RCC_GetSysClockFreq+0x188>)
|
|
80036ea: fba0 1202 umull r1, r2, r0, r2
|
|
80036ee: 62fa str r2, [r7, #44] ; 0x2c
|
|
80036f0: 460a mov r2, r1
|
|
80036f2: 62ba str r2, [r7, #40] ; 0x28
|
|
80036f4: 6afa ldr r2, [r7, #44] ; 0x2c
|
|
80036f6: 4413 add r3, r2
|
|
80036f8: 62fb str r3, [r7, #44] ; 0x2c
|
|
80036fa: 6b7b ldr r3, [r7, #52] ; 0x34
|
|
80036fc: 2200 movs r2, #0
|
|
80036fe: 61bb str r3, [r7, #24]
|
|
8003700: 61fa str r2, [r7, #28]
|
|
8003702: e9d7 2306 ldrd r2, r3, [r7, #24]
|
|
8003706: e9d7 010a ldrd r0, r1, [r7, #40] ; 0x28
|
|
800370a: f7fd fa5d bl 8000bc8 <__aeabi_uldivmod>
|
|
800370e: 4602 mov r2, r0
|
|
8003710: 460b mov r3, r1
|
|
8003712: 4613 mov r3, r2
|
|
8003714: 63fb str r3, [r7, #60] ; 0x3c
|
|
8003716: e053 b.n 80037c0 <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);
|
|
8003718: 4b35 ldr r3, [pc, #212] ; (80037f0 <HAL_RCC_GetSysClockFreq+0x180>)
|
|
800371a: 685b ldr r3, [r3, #4]
|
|
800371c: 099b lsrs r3, r3, #6
|
|
800371e: 2200 movs r2, #0
|
|
8003720: 613b str r3, [r7, #16]
|
|
8003722: 617a str r2, [r7, #20]
|
|
8003724: 693b ldr r3, [r7, #16]
|
|
8003726: f3c3 0a08 ubfx sl, r3, #0, #9
|
|
800372a: f04f 0b00 mov.w fp, #0
|
|
800372e: 4652 mov r2, sl
|
|
8003730: 465b mov r3, fp
|
|
8003732: f04f 0000 mov.w r0, #0
|
|
8003736: f04f 0100 mov.w r1, #0
|
|
800373a: 0159 lsls r1, r3, #5
|
|
800373c: ea41 61d2 orr.w r1, r1, r2, lsr #27
|
|
8003740: 0150 lsls r0, r2, #5
|
|
8003742: 4602 mov r2, r0
|
|
8003744: 460b mov r3, r1
|
|
8003746: ebb2 080a subs.w r8, r2, sl
|
|
800374a: eb63 090b sbc.w r9, r3, fp
|
|
800374e: f04f 0200 mov.w r2, #0
|
|
8003752: f04f 0300 mov.w r3, #0
|
|
8003756: ea4f 1389 mov.w r3, r9, lsl #6
|
|
800375a: ea43 6398 orr.w r3, r3, r8, lsr #26
|
|
800375e: ea4f 1288 mov.w r2, r8, lsl #6
|
|
8003762: ebb2 0408 subs.w r4, r2, r8
|
|
8003766: eb63 0509 sbc.w r5, r3, r9
|
|
800376a: f04f 0200 mov.w r2, #0
|
|
800376e: f04f 0300 mov.w r3, #0
|
|
8003772: 00eb lsls r3, r5, #3
|
|
8003774: ea43 7354 orr.w r3, r3, r4, lsr #29
|
|
8003778: 00e2 lsls r2, r4, #3
|
|
800377a: 4614 mov r4, r2
|
|
800377c: 461d mov r5, r3
|
|
800377e: eb14 030a adds.w r3, r4, sl
|
|
8003782: 603b str r3, [r7, #0]
|
|
8003784: eb45 030b adc.w r3, r5, fp
|
|
8003788: 607b str r3, [r7, #4]
|
|
800378a: f04f 0200 mov.w r2, #0
|
|
800378e: f04f 0300 mov.w r3, #0
|
|
8003792: e9d7 4500 ldrd r4, r5, [r7]
|
|
8003796: 4629 mov r1, r5
|
|
8003798: 028b lsls r3, r1, #10
|
|
800379a: 4621 mov r1, r4
|
|
800379c: ea43 5391 orr.w r3, r3, r1, lsr #22
|
|
80037a0: 4621 mov r1, r4
|
|
80037a2: 028a lsls r2, r1, #10
|
|
80037a4: 4610 mov r0, r2
|
|
80037a6: 4619 mov r1, r3
|
|
80037a8: 6b7b ldr r3, [r7, #52] ; 0x34
|
|
80037aa: 2200 movs r2, #0
|
|
80037ac: 60bb str r3, [r7, #8]
|
|
80037ae: 60fa str r2, [r7, #12]
|
|
80037b0: e9d7 2302 ldrd r2, r3, [r7, #8]
|
|
80037b4: f7fd fa08 bl 8000bc8 <__aeabi_uldivmod>
|
|
80037b8: 4602 mov r2, r0
|
|
80037ba: 460b mov r3, r1
|
|
80037bc: 4613 mov r3, r2
|
|
80037be: 63fb str r3, [r7, #60] ; 0x3c
|
|
}
|
|
pllp = ((((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >> RCC_PLLCFGR_PLLP_Pos) + 1U) *2U);
|
|
80037c0: 4b0b ldr r3, [pc, #44] ; (80037f0 <HAL_RCC_GetSysClockFreq+0x180>)
|
|
80037c2: 685b ldr r3, [r3, #4]
|
|
80037c4: 0c1b lsrs r3, r3, #16
|
|
80037c6: f003 0303 and.w r3, r3, #3
|
|
80037ca: 3301 adds r3, #1
|
|
80037cc: 005b lsls r3, r3, #1
|
|
80037ce: 633b str r3, [r7, #48] ; 0x30
|
|
|
|
sysclockfreq = pllvco/pllp;
|
|
80037d0: 6bfa ldr r2, [r7, #60] ; 0x3c
|
|
80037d2: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
80037d4: fbb2 f3f3 udiv r3, r2, r3
|
|
80037d8: 63bb str r3, [r7, #56] ; 0x38
|
|
break;
|
|
80037da: e002 b.n 80037e2 <HAL_RCC_GetSysClockFreq+0x172>
|
|
}
|
|
default:
|
|
{
|
|
sysclockfreq = HSI_VALUE;
|
|
80037dc: 4b05 ldr r3, [pc, #20] ; (80037f4 <HAL_RCC_GetSysClockFreq+0x184>)
|
|
80037de: 63bb str r3, [r7, #56] ; 0x38
|
|
break;
|
|
80037e0: bf00 nop
|
|
}
|
|
}
|
|
return sysclockfreq;
|
|
80037e2: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
}
|
|
80037e4: 4618 mov r0, r3
|
|
80037e6: 3740 adds r7, #64 ; 0x40
|
|
80037e8: 46bd mov sp, r7
|
|
80037ea: e8bd 8fb0 ldmia.w sp!, {r4, r5, r7, r8, r9, sl, fp, pc}
|
|
80037ee: bf00 nop
|
|
80037f0: 40023800 .word 0x40023800
|
|
80037f4: 00f42400 .word 0x00f42400
|
|
80037f8: 017d7840 .word 0x017d7840
|
|
|
|
080037fc <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)
|
|
{
|
|
80037fc: b480 push {r7}
|
|
80037fe: af00 add r7, sp, #0
|
|
return SystemCoreClock;
|
|
8003800: 4b03 ldr r3, [pc, #12] ; (8003810 <HAL_RCC_GetHCLKFreq+0x14>)
|
|
8003802: 681b ldr r3, [r3, #0]
|
|
}
|
|
8003804: 4618 mov r0, r3
|
|
8003806: 46bd mov sp, r7
|
|
8003808: f85d 7b04 ldr.w r7, [sp], #4
|
|
800380c: 4770 bx lr
|
|
800380e: bf00 nop
|
|
8003810: 20000000 .word 0x20000000
|
|
|
|
08003814 <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)
|
|
{
|
|
8003814: b580 push {r7, lr}
|
|
8003816: b084 sub sp, #16
|
|
8003818: af00 add r7, sp, #0
|
|
800381a: 60f8 str r0, [r7, #12]
|
|
800381c: 60b9 str r1, [r7, #8]
|
|
800381e: 607a str r2, [r7, #4]
|
|
/* Check the SRAM handle parameter */
|
|
if (hsram == NULL)
|
|
8003820: 68fb ldr r3, [r7, #12]
|
|
8003822: 2b00 cmp r3, #0
|
|
8003824: d101 bne.n 800382a <HAL_SRAM_Init+0x16>
|
|
{
|
|
return HAL_ERROR;
|
|
8003826: 2301 movs r3, #1
|
|
8003828: e038 b.n 800389c <HAL_SRAM_Init+0x88>
|
|
}
|
|
|
|
if (hsram->State == HAL_SRAM_STATE_RESET)
|
|
800382a: 68fb ldr r3, [r7, #12]
|
|
800382c: f893 3049 ldrb.w r3, [r3, #73] ; 0x49
|
|
8003830: b2db uxtb r3, r3
|
|
8003832: 2b00 cmp r3, #0
|
|
8003834: d106 bne.n 8003844 <HAL_SRAM_Init+0x30>
|
|
{
|
|
/* Allocate lock resource and initialize it */
|
|
hsram->Lock = HAL_UNLOCKED;
|
|
8003836: 68fb ldr r3, [r7, #12]
|
|
8003838: 2200 movs r2, #0
|
|
800383a: 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);
|
|
800383e: 68f8 ldr r0, [r7, #12]
|
|
8003840: f7fd fdb0 bl 80013a4 <HAL_SRAM_MspInit>
|
|
#endif /* USE_HAL_SRAM_REGISTER_CALLBACKS */
|
|
}
|
|
|
|
/* Initialize SRAM control Interface */
|
|
(void)FMC_NORSRAM_Init(hsram->Instance, &(hsram->Init));
|
|
8003844: 68fb ldr r3, [r7, #12]
|
|
8003846: 681a ldr r2, [r3, #0]
|
|
8003848: 68fb ldr r3, [r7, #12]
|
|
800384a: 3308 adds r3, #8
|
|
800384c: 4619 mov r1, r3
|
|
800384e: 4610 mov r0, r2
|
|
8003850: f000 f828 bl 80038a4 <FMC_NORSRAM_Init>
|
|
|
|
/* Initialize SRAM timing Interface */
|
|
(void)FMC_NORSRAM_Timing_Init(hsram->Instance, Timing, hsram->Init.NSBank);
|
|
8003854: 68fb ldr r3, [r7, #12]
|
|
8003856: 6818 ldr r0, [r3, #0]
|
|
8003858: 68fb ldr r3, [r7, #12]
|
|
800385a: 689b ldr r3, [r3, #8]
|
|
800385c: 461a mov r2, r3
|
|
800385e: 68b9 ldr r1, [r7, #8]
|
|
8003860: f000 f8a6 bl 80039b0 <FMC_NORSRAM_Timing_Init>
|
|
|
|
/* Initialize SRAM extended mode timing Interface */
|
|
(void)FMC_NORSRAM_Extended_Timing_Init(hsram->Extended, ExtTiming, hsram->Init.NSBank,
|
|
8003864: 68fb ldr r3, [r7, #12]
|
|
8003866: 6858 ldr r0, [r3, #4]
|
|
8003868: 68fb ldr r3, [r7, #12]
|
|
800386a: 689a ldr r2, [r3, #8]
|
|
800386c: 68fb ldr r3, [r7, #12]
|
|
800386e: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8003870: 6879 ldr r1, [r7, #4]
|
|
8003872: f000 f8ed bl 8003a50 <FMC_NORSRAM_Extended_Timing_Init>
|
|
hsram->Init.ExtendedMode);
|
|
|
|
/* Enable the NORSRAM device */
|
|
__FMC_NORSRAM_ENABLE(hsram->Instance, hsram->Init.NSBank);
|
|
8003876: 68fb ldr r3, [r7, #12]
|
|
8003878: 681b ldr r3, [r3, #0]
|
|
800387a: 68fa ldr r2, [r7, #12]
|
|
800387c: 6892 ldr r2, [r2, #8]
|
|
800387e: f853 1022 ldr.w r1, [r3, r2, lsl #2]
|
|
8003882: 68fb ldr r3, [r7, #12]
|
|
8003884: 681b ldr r3, [r3, #0]
|
|
8003886: 68fa ldr r2, [r7, #12]
|
|
8003888: 6892 ldr r2, [r2, #8]
|
|
800388a: f041 0101 orr.w r1, r1, #1
|
|
800388e: f843 1022 str.w r1, [r3, r2, lsl #2]
|
|
|
|
/* Initialize the SRAM controller state */
|
|
hsram->State = HAL_SRAM_STATE_READY;
|
|
8003892: 68fb ldr r3, [r7, #12]
|
|
8003894: 2201 movs r2, #1
|
|
8003896: f883 2049 strb.w r2, [r3, #73] ; 0x49
|
|
|
|
return HAL_OK;
|
|
800389a: 2300 movs r3, #0
|
|
}
|
|
800389c: 4618 mov r0, r3
|
|
800389e: 3710 adds r7, #16
|
|
80038a0: 46bd mov sp, r7
|
|
80038a2: bd80 pop {r7, pc}
|
|
|
|
080038a4 <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)
|
|
{
|
|
80038a4: b480 push {r7}
|
|
80038a6: b087 sub sp, #28
|
|
80038a8: af00 add r7, sp, #0
|
|
80038aa: 6078 str r0, [r7, #4]
|
|
80038ac: 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);
|
|
80038ae: 683b ldr r3, [r7, #0]
|
|
80038b0: 681a ldr r2, [r3, #0]
|
|
80038b2: 687b ldr r3, [r7, #4]
|
|
80038b4: f853 3022 ldr.w r3, [r3, r2, lsl #2]
|
|
80038b8: 683a ldr r2, [r7, #0]
|
|
80038ba: 6812 ldr r2, [r2, #0]
|
|
80038bc: f023 0101 bic.w r1, r3, #1
|
|
80038c0: 687b ldr r3, [r7, #4]
|
|
80038c2: f843 1022 str.w r1, [r3, r2, lsl #2]
|
|
|
|
/* Set NORSRAM device control parameters */
|
|
if (Init->MemoryType == FMC_MEMORY_TYPE_NOR)
|
|
80038c6: 683b ldr r3, [r7, #0]
|
|
80038c8: 689b ldr r3, [r3, #8]
|
|
80038ca: 2b08 cmp r3, #8
|
|
80038cc: d102 bne.n 80038d4 <FMC_NORSRAM_Init+0x30>
|
|
{
|
|
flashaccess = FMC_NORSRAM_FLASH_ACCESS_ENABLE;
|
|
80038ce: 2340 movs r3, #64 ; 0x40
|
|
80038d0: 617b str r3, [r7, #20]
|
|
80038d2: e001 b.n 80038d8 <FMC_NORSRAM_Init+0x34>
|
|
}
|
|
else
|
|
{
|
|
flashaccess = FMC_NORSRAM_FLASH_ACCESS_DISABLE;
|
|
80038d4: 2300 movs r3, #0
|
|
80038d6: 617b str r3, [r7, #20]
|
|
}
|
|
|
|
btcr_reg = (flashaccess | \
|
|
Init->DataAddressMux | \
|
|
80038d8: 683b ldr r3, [r7, #0]
|
|
80038da: 685a ldr r2, [r3, #4]
|
|
btcr_reg = (flashaccess | \
|
|
80038dc: 697b ldr r3, [r7, #20]
|
|
80038de: 431a orrs r2, r3
|
|
Init->MemoryType | \
|
|
80038e0: 683b ldr r3, [r7, #0]
|
|
80038e2: 689b ldr r3, [r3, #8]
|
|
Init->DataAddressMux | \
|
|
80038e4: 431a orrs r2, r3
|
|
Init->MemoryDataWidth | \
|
|
80038e6: 683b ldr r3, [r7, #0]
|
|
80038e8: 68db ldr r3, [r3, #12]
|
|
Init->MemoryType | \
|
|
80038ea: 431a orrs r2, r3
|
|
Init->BurstAccessMode | \
|
|
80038ec: 683b ldr r3, [r7, #0]
|
|
80038ee: 691b ldr r3, [r3, #16]
|
|
Init->MemoryDataWidth | \
|
|
80038f0: 431a orrs r2, r3
|
|
Init->WaitSignalPolarity | \
|
|
80038f2: 683b ldr r3, [r7, #0]
|
|
80038f4: 695b ldr r3, [r3, #20]
|
|
Init->BurstAccessMode | \
|
|
80038f6: 431a orrs r2, r3
|
|
Init->WaitSignalActive | \
|
|
80038f8: 683b ldr r3, [r7, #0]
|
|
80038fa: 69db ldr r3, [r3, #28]
|
|
Init->WaitSignalPolarity | \
|
|
80038fc: 431a orrs r2, r3
|
|
Init->WriteOperation | \
|
|
80038fe: 683b ldr r3, [r7, #0]
|
|
8003900: 6a1b ldr r3, [r3, #32]
|
|
Init->WaitSignalActive | \
|
|
8003902: 431a orrs r2, r3
|
|
Init->WaitSignal | \
|
|
8003904: 683b ldr r3, [r7, #0]
|
|
8003906: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
Init->WriteOperation | \
|
|
8003908: 431a orrs r2, r3
|
|
Init->ExtendedMode | \
|
|
800390a: 683b ldr r3, [r7, #0]
|
|
800390c: 6a9b ldr r3, [r3, #40] ; 0x28
|
|
Init->WaitSignal | \
|
|
800390e: 431a orrs r2, r3
|
|
Init->AsynchronousWait | \
|
|
8003910: 683b ldr r3, [r7, #0]
|
|
8003912: 6adb ldr r3, [r3, #44] ; 0x2c
|
|
Init->ExtendedMode | \
|
|
8003914: 431a orrs r2, r3
|
|
Init->WriteBurst);
|
|
8003916: 683b ldr r3, [r7, #0]
|
|
8003918: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
btcr_reg = (flashaccess | \
|
|
800391a: 4313 orrs r3, r2
|
|
800391c: 613b str r3, [r7, #16]
|
|
|
|
#if defined(FMC_BCR1_WRAPMOD)
|
|
btcr_reg |= Init->WrapMode;
|
|
800391e: 683b ldr r3, [r7, #0]
|
|
8003920: 699b ldr r3, [r3, #24]
|
|
8003922: 693a ldr r2, [r7, #16]
|
|
8003924: 4313 orrs r3, r2
|
|
8003926: 613b str r3, [r7, #16]
|
|
#endif /* FMC_BCR1_WRAPMOD */
|
|
#if defined(FMC_BCR1_CCLKEN)
|
|
btcr_reg |= Init->ContinuousClock;
|
|
8003928: 683b ldr r3, [r7, #0]
|
|
800392a: 6b5b ldr r3, [r3, #52] ; 0x34
|
|
800392c: 693a ldr r2, [r7, #16]
|
|
800392e: 4313 orrs r3, r2
|
|
8003930: 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;
|
|
8003932: 683b ldr r3, [r7, #0]
|
|
8003934: 6bdb ldr r3, [r3, #60] ; 0x3c
|
|
8003936: 693a ldr r2, [r7, #16]
|
|
8003938: 4313 orrs r3, r2
|
|
800393a: 613b str r3, [r7, #16]
|
|
|
|
mask = (FMC_BCR1_MBKEN |
|
|
800393c: 4b1b ldr r3, [pc, #108] ; (80039ac <FMC_NORSRAM_Init+0x108>)
|
|
800393e: 60fb str r3, [r7, #12]
|
|
FMC_BCR1_EXTMOD |
|
|
FMC_BCR1_ASYNCWAIT |
|
|
FMC_BCR1_CBURSTRW);
|
|
|
|
#if defined(FMC_BCR1_WRAPMOD)
|
|
mask |= FMC_BCR1_WRAPMOD;
|
|
8003940: 68fb ldr r3, [r7, #12]
|
|
8003942: f443 6380 orr.w r3, r3, #1024 ; 0x400
|
|
8003946: 60fb str r3, [r7, #12]
|
|
#endif /* FMC_BCR1_WRAPMOD */
|
|
#if defined(FMC_BCR1_CCLKEN)
|
|
mask |= FMC_BCR1_CCLKEN;
|
|
8003948: 68fb ldr r3, [r7, #12]
|
|
800394a: f443 1380 orr.w r3, r3, #1048576 ; 0x100000
|
|
800394e: 60fb str r3, [r7, #12]
|
|
#endif
|
|
#if defined(FMC_BCR1_WFDIS)
|
|
mask |= FMC_BCR1_WFDIS;
|
|
#endif /* FMC_BCR1_WFDIS */
|
|
mask |= FMC_BCR1_CPSIZE;
|
|
8003950: 68fb ldr r3, [r7, #12]
|
|
8003952: f443 23e0 orr.w r3, r3, #458752 ; 0x70000
|
|
8003956: 60fb str r3, [r7, #12]
|
|
|
|
MODIFY_REG(Device->BTCR[Init->NSBank], mask, btcr_reg);
|
|
8003958: 683b ldr r3, [r7, #0]
|
|
800395a: 681a ldr r2, [r3, #0]
|
|
800395c: 687b ldr r3, [r7, #4]
|
|
800395e: f853 2022 ldr.w r2, [r3, r2, lsl #2]
|
|
8003962: 68fb ldr r3, [r7, #12]
|
|
8003964: 43db mvns r3, r3
|
|
8003966: ea02 0103 and.w r1, r2, r3
|
|
800396a: 683b ldr r3, [r7, #0]
|
|
800396c: 681a ldr r2, [r3, #0]
|
|
800396e: 693b ldr r3, [r7, #16]
|
|
8003970: 4319 orrs r1, r3
|
|
8003972: 687b ldr r3, [r7, #4]
|
|
8003974: 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))
|
|
8003978: 683b ldr r3, [r7, #0]
|
|
800397a: 6b5b ldr r3, [r3, #52] ; 0x34
|
|
800397c: f5b3 1f80 cmp.w r3, #1048576 ; 0x100000
|
|
8003980: d10c bne.n 800399c <FMC_NORSRAM_Init+0xf8>
|
|
8003982: 683b ldr r3, [r7, #0]
|
|
8003984: 681b ldr r3, [r3, #0]
|
|
8003986: 2b00 cmp r3, #0
|
|
8003988: d008 beq.n 800399c <FMC_NORSRAM_Init+0xf8>
|
|
{
|
|
MODIFY_REG(Device->BTCR[FMC_NORSRAM_BANK1], FMC_BCR1_CCLKEN, Init->ContinuousClock);
|
|
800398a: 687b ldr r3, [r7, #4]
|
|
800398c: 681b ldr r3, [r3, #0]
|
|
800398e: f423 1280 bic.w r2, r3, #1048576 ; 0x100000
|
|
8003992: 683b ldr r3, [r7, #0]
|
|
8003994: 6b5b ldr r3, [r3, #52] ; 0x34
|
|
8003996: 431a orrs r2, r3
|
|
8003998: 687b ldr r3, [r7, #4]
|
|
800399a: 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;
|
|
800399c: 2300 movs r3, #0
|
|
}
|
|
800399e: 4618 mov r0, r3
|
|
80039a0: 371c adds r7, #28
|
|
80039a2: 46bd mov sp, r7
|
|
80039a4: f85d 7b04 ldr.w r7, [sp], #4
|
|
80039a8: 4770 bx lr
|
|
80039aa: bf00 nop
|
|
80039ac: 0008fb7f .word 0x0008fb7f
|
|
|
|
080039b0 <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)
|
|
{
|
|
80039b0: b480 push {r7}
|
|
80039b2: b087 sub sp, #28
|
|
80039b4: af00 add r7, sp, #0
|
|
80039b6: 60f8 str r0, [r7, #12]
|
|
80039b8: 60b9 str r1, [r7, #8]
|
|
80039ba: 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 |
|
|
80039bc: 687b ldr r3, [r7, #4]
|
|
80039be: 1c5a adds r2, r3, #1
|
|
80039c0: 68fb ldr r3, [r7, #12]
|
|
80039c2: f853 3022 ldr.w r3, [r3, r2, lsl #2]
|
|
80039c6: f003 4140 and.w r1, r3, #3221225472 ; 0xc0000000
|
|
80039ca: 68bb ldr r3, [r7, #8]
|
|
80039cc: 681a ldr r2, [r3, #0]
|
|
80039ce: 68bb ldr r3, [r7, #8]
|
|
80039d0: 685b ldr r3, [r3, #4]
|
|
80039d2: 011b lsls r3, r3, #4
|
|
80039d4: 431a orrs r2, r3
|
|
80039d6: 68bb ldr r3, [r7, #8]
|
|
80039d8: 689b ldr r3, [r3, #8]
|
|
80039da: 021b lsls r3, r3, #8
|
|
80039dc: 431a orrs r2, r3
|
|
80039de: 68bb ldr r3, [r7, #8]
|
|
80039e0: 68db ldr r3, [r3, #12]
|
|
80039e2: 041b lsls r3, r3, #16
|
|
80039e4: 431a orrs r2, r3
|
|
80039e6: 68bb ldr r3, [r7, #8]
|
|
80039e8: 691b ldr r3, [r3, #16]
|
|
80039ea: 3b01 subs r3, #1
|
|
80039ec: 051b lsls r3, r3, #20
|
|
80039ee: 431a orrs r2, r3
|
|
80039f0: 68bb ldr r3, [r7, #8]
|
|
80039f2: 695b ldr r3, [r3, #20]
|
|
80039f4: 3b02 subs r3, #2
|
|
80039f6: 061b lsls r3, r3, #24
|
|
80039f8: 431a orrs r2, r3
|
|
80039fa: 68bb ldr r3, [r7, #8]
|
|
80039fc: 699b ldr r3, [r3, #24]
|
|
80039fe: 4313 orrs r3, r2
|
|
8003a00: 687a ldr r2, [r7, #4]
|
|
8003a02: 3201 adds r2, #1
|
|
8003a04: 4319 orrs r1, r3
|
|
8003a06: 68fb ldr r3, [r7, #12]
|
|
8003a08: 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))
|
|
8003a0c: 68fb ldr r3, [r7, #12]
|
|
8003a0e: 681b ldr r3, [r3, #0]
|
|
8003a10: f403 1380 and.w r3, r3, #1048576 ; 0x100000
|
|
8003a14: f5b3 1f80 cmp.w r3, #1048576 ; 0x100000
|
|
8003a18: d113 bne.n 8003a42 <FMC_NORSRAM_Timing_Init+0x92>
|
|
{
|
|
tmpr = (uint32_t)(Device->BTCR[FMC_NORSRAM_BANK1 + 1U] & ~((0x0FU) << FMC_BTR1_CLKDIV_Pos));
|
|
8003a1a: 68fb ldr r3, [r7, #12]
|
|
8003a1c: 685b ldr r3, [r3, #4]
|
|
8003a1e: f423 0370 bic.w r3, r3, #15728640 ; 0xf00000
|
|
8003a22: 617b str r3, [r7, #20]
|
|
tmpr |= (uint32_t)(((Timing->CLKDivision) - 1U) << FMC_BTR1_CLKDIV_Pos);
|
|
8003a24: 68bb ldr r3, [r7, #8]
|
|
8003a26: 691b ldr r3, [r3, #16]
|
|
8003a28: 3b01 subs r3, #1
|
|
8003a2a: 051b lsls r3, r3, #20
|
|
8003a2c: 697a ldr r2, [r7, #20]
|
|
8003a2e: 4313 orrs r3, r2
|
|
8003a30: 617b str r3, [r7, #20]
|
|
MODIFY_REG(Device->BTCR[FMC_NORSRAM_BANK1 + 1U], FMC_BTR1_CLKDIV, tmpr);
|
|
8003a32: 68fb ldr r3, [r7, #12]
|
|
8003a34: 685b ldr r3, [r3, #4]
|
|
8003a36: f423 0270 bic.w r2, r3, #15728640 ; 0xf00000
|
|
8003a3a: 697b ldr r3, [r7, #20]
|
|
8003a3c: 431a orrs r2, r3
|
|
8003a3e: 68fb ldr r3, [r7, #12]
|
|
8003a40: 605a str r2, [r3, #4]
|
|
}
|
|
|
|
#endif
|
|
return HAL_OK;
|
|
8003a42: 2300 movs r3, #0
|
|
}
|
|
8003a44: 4618 mov r0, r3
|
|
8003a46: 371c adds r7, #28
|
|
8003a48: 46bd mov sp, r7
|
|
8003a4a: f85d 7b04 ldr.w r7, [sp], #4
|
|
8003a4e: 4770 bx lr
|
|
|
|
08003a50 <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)
|
|
{
|
|
8003a50: b480 push {r7}
|
|
8003a52: b085 sub sp, #20
|
|
8003a54: af00 add r7, sp, #0
|
|
8003a56: 60f8 str r0, [r7, #12]
|
|
8003a58: 60b9 str r1, [r7, #8]
|
|
8003a5a: 607a str r2, [r7, #4]
|
|
8003a5c: 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)
|
|
8003a5e: 683b ldr r3, [r7, #0]
|
|
8003a60: f5b3 4f80 cmp.w r3, #16384 ; 0x4000
|
|
8003a64: d11d bne.n 8003aa2 <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 |
|
|
8003a66: 68fb ldr r3, [r7, #12]
|
|
8003a68: 687a ldr r2, [r7, #4]
|
|
8003a6a: f853 2022 ldr.w r2, [r3, r2, lsl #2]
|
|
8003a6e: 4b13 ldr r3, [pc, #76] ; (8003abc <FMC_NORSRAM_Extended_Timing_Init+0x6c>)
|
|
8003a70: 4013 ands r3, r2
|
|
8003a72: 68ba ldr r2, [r7, #8]
|
|
8003a74: 6811 ldr r1, [r2, #0]
|
|
8003a76: 68ba ldr r2, [r7, #8]
|
|
8003a78: 6852 ldr r2, [r2, #4]
|
|
8003a7a: 0112 lsls r2, r2, #4
|
|
8003a7c: 4311 orrs r1, r2
|
|
8003a7e: 68ba ldr r2, [r7, #8]
|
|
8003a80: 6892 ldr r2, [r2, #8]
|
|
8003a82: 0212 lsls r2, r2, #8
|
|
8003a84: 4311 orrs r1, r2
|
|
8003a86: 68ba ldr r2, [r7, #8]
|
|
8003a88: 6992 ldr r2, [r2, #24]
|
|
8003a8a: 4311 orrs r1, r2
|
|
8003a8c: 68ba ldr r2, [r7, #8]
|
|
8003a8e: 68d2 ldr r2, [r2, #12]
|
|
8003a90: 0412 lsls r2, r2, #16
|
|
8003a92: 430a orrs r2, r1
|
|
8003a94: ea43 0102 orr.w r1, r3, r2
|
|
8003a98: 68fb ldr r3, [r7, #12]
|
|
8003a9a: 687a ldr r2, [r7, #4]
|
|
8003a9c: f843 1022 str.w r1, [r3, r2, lsl #2]
|
|
8003aa0: e005 b.n 8003aae <FMC_NORSRAM_Extended_Timing_Init+0x5e>
|
|
Timing->AccessMode |
|
|
((Timing->BusTurnAroundDuration) << FMC_BWTR1_BUSTURN_Pos)));
|
|
}
|
|
else
|
|
{
|
|
Device->BWTR[Bank] = 0x0FFFFFFFU;
|
|
8003aa2: 68fb ldr r3, [r7, #12]
|
|
8003aa4: 687a ldr r2, [r7, #4]
|
|
8003aa6: f06f 4170 mvn.w r1, #4026531840 ; 0xf0000000
|
|
8003aaa: f843 1022 str.w r1, [r3, r2, lsl #2]
|
|
}
|
|
|
|
return HAL_OK;
|
|
8003aae: 2300 movs r3, #0
|
|
}
|
|
8003ab0: 4618 mov r0, r3
|
|
8003ab2: 3714 adds r7, #20
|
|
8003ab4: 46bd mov sp, r7
|
|
8003ab6: f85d 7b04 ldr.w r7, [sp], #4
|
|
8003aba: 4770 bx lr
|
|
8003abc: cff00000 .word 0xcff00000
|
|
|
|
08003ac0 <MX_LWIP_Init>:
|
|
|
|
/**
|
|
* LwIP initialization function
|
|
*/
|
|
void MX_LWIP_Init(void)
|
|
{
|
|
8003ac0: b580 push {r7, lr}
|
|
8003ac2: b084 sub sp, #16
|
|
8003ac4: af04 add r7, sp, #16
|
|
/* Initilialize the LwIP stack without RTOS */
|
|
lwip_init();
|
|
8003ac6: f000 fc63 bl 8004390 <lwip_init>
|
|
|
|
/* IP addresses initialization with DHCP (IPv4) */
|
|
ipaddr.addr = ipaddr_addr("10.1.1.69");
|
|
8003aca: 481d ldr r0, [pc, #116] ; (8003b40 <MX_LWIP_Init+0x80>)
|
|
8003acc: f00b fc5d bl 800f38a <ipaddr_addr>
|
|
8003ad0: 4603 mov r3, r0
|
|
8003ad2: 4a1c ldr r2, [pc, #112] ; (8003b44 <MX_LWIP_Init+0x84>)
|
|
8003ad4: 6013 str r3, [r2, #0]
|
|
netmask.addr = ipaddr_addr("255.255.255.0");
|
|
8003ad6: 481c ldr r0, [pc, #112] ; (8003b48 <MX_LWIP_Init+0x88>)
|
|
8003ad8: f00b fc57 bl 800f38a <ipaddr_addr>
|
|
8003adc: 4603 mov r3, r0
|
|
8003ade: 4a1b ldr r2, [pc, #108] ; (8003b4c <MX_LWIP_Init+0x8c>)
|
|
8003ae0: 6013 str r3, [r2, #0]
|
|
gw.addr = ipaddr_addr("10.1.1.1");
|
|
8003ae2: 481b ldr r0, [pc, #108] ; (8003b50 <MX_LWIP_Init+0x90>)
|
|
8003ae4: f00b fc51 bl 800f38a <ipaddr_addr>
|
|
8003ae8: 4603 mov r3, r0
|
|
8003aea: 4a1a ldr r2, [pc, #104] ; (8003b54 <MX_LWIP_Init+0x94>)
|
|
8003aec: 6013 str r3, [r2, #0]
|
|
|
|
/* add the network interface (IPv4/IPv6) without RTOS */
|
|
netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, ðernet_input);
|
|
8003aee: 4b1a ldr r3, [pc, #104] ; (8003b58 <MX_LWIP_Init+0x98>)
|
|
8003af0: 9302 str r3, [sp, #8]
|
|
8003af2: 4b1a ldr r3, [pc, #104] ; (8003b5c <MX_LWIP_Init+0x9c>)
|
|
8003af4: 9301 str r3, [sp, #4]
|
|
8003af6: 2300 movs r3, #0
|
|
8003af8: 9300 str r3, [sp, #0]
|
|
8003afa: 4b16 ldr r3, [pc, #88] ; (8003b54 <MX_LWIP_Init+0x94>)
|
|
8003afc: 4a13 ldr r2, [pc, #76] ; (8003b4c <MX_LWIP_Init+0x8c>)
|
|
8003afe: 4911 ldr r1, [pc, #68] ; (8003b44 <MX_LWIP_Init+0x84>)
|
|
8003b00: 4817 ldr r0, [pc, #92] ; (8003b60 <MX_LWIP_Init+0xa0>)
|
|
8003b02: f001 f931 bl 8004d68 <netif_add>
|
|
|
|
/* Registers the default network interface */
|
|
netif_set_default(&gnetif);
|
|
8003b06: 4816 ldr r0, [pc, #88] ; (8003b60 <MX_LWIP_Init+0xa0>)
|
|
8003b08: f001 fae8 bl 80050dc <netif_set_default>
|
|
|
|
if (netif_is_link_up(&gnetif))
|
|
8003b0c: 4b14 ldr r3, [pc, #80] ; (8003b60 <MX_LWIP_Init+0xa0>)
|
|
8003b0e: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
8003b12: 089b lsrs r3, r3, #2
|
|
8003b14: f003 0301 and.w r3, r3, #1
|
|
8003b18: b2db uxtb r3, r3
|
|
8003b1a: 2b00 cmp r3, #0
|
|
8003b1c: d003 beq.n 8003b26 <MX_LWIP_Init+0x66>
|
|
{
|
|
/* When the netif is fully configured this function must be called */
|
|
netif_set_up(&gnetif);
|
|
8003b1e: 4810 ldr r0, [pc, #64] ; (8003b60 <MX_LWIP_Init+0xa0>)
|
|
8003b20: f001 faec bl 80050fc <netif_set_up>
|
|
8003b24: e002 b.n 8003b2c <MX_LWIP_Init+0x6c>
|
|
}
|
|
else
|
|
{
|
|
/* When the netif link is down this function must be called */
|
|
netif_set_down(&gnetif);
|
|
8003b26: 480e ldr r0, [pc, #56] ; (8003b60 <MX_LWIP_Init+0xa0>)
|
|
8003b28: f001 fb54 bl 80051d4 <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);
|
|
8003b2c: 490d ldr r1, [pc, #52] ; (8003b64 <MX_LWIP_Init+0xa4>)
|
|
8003b2e: 480c ldr r0, [pc, #48] ; (8003b60 <MX_LWIP_Init+0xa0>)
|
|
8003b30: f001 fbea bl 8005308 <netif_set_link_callback>
|
|
|
|
/* Create the Ethernet link handler thread */
|
|
|
|
/* Start DHCP negotiation for a network interface (IPv4) */
|
|
dhcp_start(&gnetif);
|
|
8003b34: 480a ldr r0, [pc, #40] ; (8003b60 <MX_LWIP_Init+0xa0>)
|
|
8003b36: f008 fd3f bl 800c5b8 <dhcp_start>
|
|
|
|
/* USER CODE BEGIN 3 */
|
|
|
|
/* USER CODE END 3 */
|
|
}
|
|
8003b3a: bf00 nop
|
|
8003b3c: 46bd mov sp, r7
|
|
8003b3e: bd80 pop {r7, pc}
|
|
8003b40: 08015028 .word 0x08015028
|
|
8003b44: 20000a90 .word 0x20000a90
|
|
8003b48: 08015034 .word 0x08015034
|
|
8003b4c: 20000a94 .word 0x20000a94
|
|
8003b50: 08015044 .word 0x08015044
|
|
8003b54: 20000a98 .word 0x20000a98
|
|
8003b58: 08010285 .word 0x08010285
|
|
8003b5c: 08003e75 .word 0x08003e75
|
|
8003b60: 20000a58 .word 0x20000a58
|
|
8003b64: 08003bb9 .word 0x08003bb9
|
|
|
|
08003b68 <Ethernet_Link_Periodic_Handle>:
|
|
* @brief Ethernet Link periodic check
|
|
* @param netif
|
|
* @retval None
|
|
*/
|
|
static void Ethernet_Link_Periodic_Handle(struct netif *netif)
|
|
{
|
|
8003b68: b580 push {r7, lr}
|
|
8003b6a: b082 sub sp, #8
|
|
8003b6c: af00 add r7, sp, #0
|
|
8003b6e: 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)
|
|
8003b70: f7fd fe4e bl 8001810 <HAL_GetTick>
|
|
8003b74: 4602 mov r2, r0
|
|
8003b76: 4b08 ldr r3, [pc, #32] ; (8003b98 <Ethernet_Link_Periodic_Handle+0x30>)
|
|
8003b78: 681b ldr r3, [r3, #0]
|
|
8003b7a: 1ad3 subs r3, r2, r3
|
|
8003b7c: 2b63 cmp r3, #99 ; 0x63
|
|
8003b7e: d907 bls.n 8003b90 <Ethernet_Link_Periodic_Handle+0x28>
|
|
{
|
|
EthernetLinkTimer = HAL_GetTick();
|
|
8003b80: f7fd fe46 bl 8001810 <HAL_GetTick>
|
|
8003b84: 4603 mov r3, r0
|
|
8003b86: 4a04 ldr r2, [pc, #16] ; (8003b98 <Ethernet_Link_Periodic_Handle+0x30>)
|
|
8003b88: 6013 str r3, [r2, #0]
|
|
ethernet_link_check_state(netif);
|
|
8003b8a: 6878 ldr r0, [r7, #4]
|
|
8003b8c: f000 fad6 bl 800413c <ethernet_link_check_state>
|
|
}
|
|
/* USER CODE BEGIN 4_4 */
|
|
/* USER CODE END 4_4 */
|
|
}
|
|
8003b90: bf00 nop
|
|
8003b92: 3708 adds r7, #8
|
|
8003b94: 46bd mov sp, r7
|
|
8003b96: bd80 pop {r7, pc}
|
|
8003b98: 20000a54 .word 0x20000a54
|
|
|
|
08003b9c <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)
|
|
{
|
|
8003b9c: b580 push {r7, lr}
|
|
8003b9e: af00 add r7, sp, #0
|
|
/* USER CODE BEGIN 4_1 */
|
|
/* USER CODE END 4_1 */
|
|
ethernetif_input(&gnetif);
|
|
8003ba0: 4804 ldr r0, [pc, #16] ; (8003bb4 <MX_LWIP_Process+0x18>)
|
|
8003ba2: f000 f947 bl 8003e34 <ethernetif_input>
|
|
|
|
/* USER CODE BEGIN 4_2 */
|
|
/* USER CODE END 4_2 */
|
|
/* Handle timeouts */
|
|
sys_check_timeouts();
|
|
8003ba6: f007 fc31 bl 800b40c <sys_check_timeouts>
|
|
|
|
Ethernet_Link_Periodic_Handle(&gnetif);
|
|
8003baa: 4802 ldr r0, [pc, #8] ; (8003bb4 <MX_LWIP_Process+0x18>)
|
|
8003bac: f7ff ffdc bl 8003b68 <Ethernet_Link_Periodic_Handle>
|
|
|
|
/* USER CODE BEGIN 4_3 */
|
|
/* USER CODE END 4_3 */
|
|
}
|
|
8003bb0: bf00 nop
|
|
8003bb2: bd80 pop {r7, pc}
|
|
8003bb4: 20000a58 .word 0x20000a58
|
|
|
|
08003bb8 <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)
|
|
{
|
|
8003bb8: b480 push {r7}
|
|
8003bba: b083 sub sp, #12
|
|
8003bbc: af00 add r7, sp, #0
|
|
8003bbe: 6078 str r0, [r7, #4]
|
|
else /* netif is down */
|
|
{
|
|
/* USER CODE BEGIN 6 */
|
|
/* USER CODE END 6 */
|
|
}
|
|
}
|
|
8003bc0: bf00 nop
|
|
8003bc2: 370c adds r7, #12
|
|
8003bc4: 46bd mov sp, r7
|
|
8003bc6: f85d 7b04 ldr.w r7, [sp], #4
|
|
8003bca: 4770 bx lr
|
|
|
|
08003bcc <low_level_init>:
|
|
*
|
|
* @param netif the already initialized lwip network interface structure
|
|
* for this ethernetif
|
|
*/
|
|
static void low_level_init(struct netif *netif)
|
|
{
|
|
8003bcc: b580 push {r7, lr}
|
|
8003bce: b084 sub sp, #16
|
|
8003bd0: af00 add r7, sp, #0
|
|
8003bd2: 6078 str r0, [r7, #4]
|
|
HAL_StatusTypeDef hal_eth_init_status = HAL_OK;
|
|
8003bd4: 2300 movs r3, #0
|
|
8003bd6: 73fb strb r3, [r7, #15]
|
|
/* Start ETH HAL Init */
|
|
|
|
uint8_t MACAddr[6] ;
|
|
heth.Instance = ETH;
|
|
8003bd8: 4b40 ldr r3, [pc, #256] ; (8003cdc <low_level_init+0x110>)
|
|
8003bda: 4a41 ldr r2, [pc, #260] ; (8003ce0 <low_level_init+0x114>)
|
|
8003bdc: 601a str r2, [r3, #0]
|
|
MACAddr[0] = 0xFB;
|
|
8003bde: 23fb movs r3, #251 ; 0xfb
|
|
8003be0: 723b strb r3, [r7, #8]
|
|
MACAddr[1] = 0x80;
|
|
8003be2: 2380 movs r3, #128 ; 0x80
|
|
8003be4: 727b strb r3, [r7, #9]
|
|
MACAddr[2] = 0xE1;
|
|
8003be6: 23e1 movs r3, #225 ; 0xe1
|
|
8003be8: 72bb strb r3, [r7, #10]
|
|
MACAddr[3] = 0x15;
|
|
8003bea: 2315 movs r3, #21
|
|
8003bec: 72fb strb r3, [r7, #11]
|
|
MACAddr[4] = 0x85;
|
|
8003bee: 2385 movs r3, #133 ; 0x85
|
|
8003bf0: 733b strb r3, [r7, #12]
|
|
MACAddr[5] = 0xA3;
|
|
8003bf2: 23a3 movs r3, #163 ; 0xa3
|
|
8003bf4: 737b strb r3, [r7, #13]
|
|
heth.Init.MACAddr = &MACAddr[0];
|
|
8003bf6: 4a39 ldr r2, [pc, #228] ; (8003cdc <low_level_init+0x110>)
|
|
8003bf8: f107 0308 add.w r3, r7, #8
|
|
8003bfc: 6053 str r3, [r2, #4]
|
|
heth.Init.MediaInterface = HAL_ETH_RMII_MODE;
|
|
8003bfe: 4b37 ldr r3, [pc, #220] ; (8003cdc <low_level_init+0x110>)
|
|
8003c00: f44f 0200 mov.w r2, #8388608 ; 0x800000
|
|
8003c04: 609a str r2, [r3, #8]
|
|
heth.Init.TxDesc = DMATxDscrTab;
|
|
8003c06: 4b35 ldr r3, [pc, #212] ; (8003cdc <low_level_init+0x110>)
|
|
8003c08: 4a36 ldr r2, [pc, #216] ; (8003ce4 <low_level_init+0x118>)
|
|
8003c0a: 60da str r2, [r3, #12]
|
|
heth.Init.RxDesc = DMARxDscrTab;
|
|
8003c0c: 4b33 ldr r3, [pc, #204] ; (8003cdc <low_level_init+0x110>)
|
|
8003c0e: 4a36 ldr r2, [pc, #216] ; (8003ce8 <low_level_init+0x11c>)
|
|
8003c10: 611a str r2, [r3, #16]
|
|
heth.Init.RxBuffLen = 1536;
|
|
8003c12: 4b32 ldr r3, [pc, #200] ; (8003cdc <low_level_init+0x110>)
|
|
8003c14: f44f 62c0 mov.w r2, #1536 ; 0x600
|
|
8003c18: 615a str r2, [r3, #20]
|
|
|
|
/* USER CODE BEGIN MACADDRESS */
|
|
|
|
/* USER CODE END MACADDRESS */
|
|
|
|
hal_eth_init_status = HAL_ETH_Init(&heth);
|
|
8003c1a: 4830 ldr r0, [pc, #192] ; (8003cdc <low_level_init+0x110>)
|
|
8003c1c: f7fd ff0e bl 8001a3c <HAL_ETH_Init>
|
|
8003c20: 4603 mov r3, r0
|
|
8003c22: 73fb strb r3, [r7, #15]
|
|
|
|
memset(&TxConfig, 0 , sizeof(ETH_TxPacketConfig));
|
|
8003c24: 2238 movs r2, #56 ; 0x38
|
|
8003c26: 2100 movs r1, #0
|
|
8003c28: 4830 ldr r0, [pc, #192] ; (8003cec <low_level_init+0x120>)
|
|
8003c2a: f00c fc5d bl 80104e8 <memset>
|
|
TxConfig.Attributes = ETH_TX_PACKETS_FEATURES_CSUM | ETH_TX_PACKETS_FEATURES_CRCPAD;
|
|
8003c2e: 4b2f ldr r3, [pc, #188] ; (8003cec <low_level_init+0x120>)
|
|
8003c30: 2221 movs r2, #33 ; 0x21
|
|
8003c32: 601a str r2, [r3, #0]
|
|
TxConfig.ChecksumCtrl = ETH_CHECKSUM_IPHDR_PAYLOAD_INSERT_PHDR_CALC;
|
|
8003c34: 4b2d ldr r3, [pc, #180] ; (8003cec <low_level_init+0x120>)
|
|
8003c36: f44f 0240 mov.w r2, #12582912 ; 0xc00000
|
|
8003c3a: 615a str r2, [r3, #20]
|
|
TxConfig.CRCPadCtrl = ETH_CRC_PAD_INSERT;
|
|
8003c3c: 4b2b ldr r3, [pc, #172] ; (8003cec <low_level_init+0x120>)
|
|
8003c3e: 2200 movs r2, #0
|
|
8003c40: 611a str r2, [r3, #16]
|
|
|
|
/* End ETH HAL Init */
|
|
|
|
/* Initialize the RX POOL */
|
|
LWIP_MEMPOOL_INIT(RX_POOL);
|
|
8003c42: 482b ldr r0, [pc, #172] ; (8003cf0 <low_level_init+0x124>)
|
|
8003c44: f000 ff58 bl 8004af8 <memp_init_pool>
|
|
|
|
#if LWIP_ARP || LWIP_ETHERNET
|
|
|
|
/* set MAC hardware address length */
|
|
netif->hwaddr_len = ETH_HWADDR_LEN;
|
|
8003c48: 687b ldr r3, [r7, #4]
|
|
8003c4a: 2206 movs r2, #6
|
|
8003c4c: f883 2030 strb.w r2, [r3, #48] ; 0x30
|
|
|
|
/* set MAC hardware address */
|
|
netif->hwaddr[0] = heth.Init.MACAddr[0];
|
|
8003c50: 4b22 ldr r3, [pc, #136] ; (8003cdc <low_level_init+0x110>)
|
|
8003c52: 685b ldr r3, [r3, #4]
|
|
8003c54: 781a ldrb r2, [r3, #0]
|
|
8003c56: 687b ldr r3, [r7, #4]
|
|
8003c58: f883 202a strb.w r2, [r3, #42] ; 0x2a
|
|
netif->hwaddr[1] = heth.Init.MACAddr[1];
|
|
8003c5c: 4b1f ldr r3, [pc, #124] ; (8003cdc <low_level_init+0x110>)
|
|
8003c5e: 685b ldr r3, [r3, #4]
|
|
8003c60: 785a ldrb r2, [r3, #1]
|
|
8003c62: 687b ldr r3, [r7, #4]
|
|
8003c64: f883 202b strb.w r2, [r3, #43] ; 0x2b
|
|
netif->hwaddr[2] = heth.Init.MACAddr[2];
|
|
8003c68: 4b1c ldr r3, [pc, #112] ; (8003cdc <low_level_init+0x110>)
|
|
8003c6a: 685b ldr r3, [r3, #4]
|
|
8003c6c: 789a ldrb r2, [r3, #2]
|
|
8003c6e: 687b ldr r3, [r7, #4]
|
|
8003c70: f883 202c strb.w r2, [r3, #44] ; 0x2c
|
|
netif->hwaddr[3] = heth.Init.MACAddr[3];
|
|
8003c74: 4b19 ldr r3, [pc, #100] ; (8003cdc <low_level_init+0x110>)
|
|
8003c76: 685b ldr r3, [r3, #4]
|
|
8003c78: 78da ldrb r2, [r3, #3]
|
|
8003c7a: 687b ldr r3, [r7, #4]
|
|
8003c7c: f883 202d strb.w r2, [r3, #45] ; 0x2d
|
|
netif->hwaddr[4] = heth.Init.MACAddr[4];
|
|
8003c80: 4b16 ldr r3, [pc, #88] ; (8003cdc <low_level_init+0x110>)
|
|
8003c82: 685b ldr r3, [r3, #4]
|
|
8003c84: 791a ldrb r2, [r3, #4]
|
|
8003c86: 687b ldr r3, [r7, #4]
|
|
8003c88: f883 202e strb.w r2, [r3, #46] ; 0x2e
|
|
netif->hwaddr[5] = heth.Init.MACAddr[5];
|
|
8003c8c: 4b13 ldr r3, [pc, #76] ; (8003cdc <low_level_init+0x110>)
|
|
8003c8e: 685b ldr r3, [r3, #4]
|
|
8003c90: 795a ldrb r2, [r3, #5]
|
|
8003c92: 687b ldr r3, [r7, #4]
|
|
8003c94: f883 202f strb.w r2, [r3, #47] ; 0x2f
|
|
|
|
/* maximum transfer unit */
|
|
netif->mtu = ETH_MAX_PAYLOAD;
|
|
8003c98: 687b ldr r3, [r7, #4]
|
|
8003c9a: f240 52dc movw r2, #1500 ; 0x5dc
|
|
8003c9e: 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;
|
|
8003ca0: 687b ldr r3, [r7, #4]
|
|
8003ca2: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
8003ca6: f043 030a orr.w r3, r3, #10
|
|
8003caa: b2da uxtb r2, r3
|
|
8003cac: 687b ldr r3, [r7, #4]
|
|
8003cae: 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);
|
|
8003cb2: 4910 ldr r1, [pc, #64] ; (8003cf4 <low_level_init+0x128>)
|
|
8003cb4: 4810 ldr r0, [pc, #64] ; (8003cf8 <low_level_init+0x12c>)
|
|
8003cb6: f7fd fbe4 bl 8001482 <DP83848_RegisterBusIO>
|
|
|
|
/* Initialize the DP83848 ETH PHY */
|
|
DP83848_Init(&DP83848);
|
|
8003cba: 480f ldr r0, [pc, #60] ; (8003cf8 <low_level_init+0x12c>)
|
|
8003cbc: f7fd fc13 bl 80014e6 <DP83848_Init>
|
|
|
|
if (hal_eth_init_status == HAL_OK)
|
|
8003cc0: 7bfb ldrb r3, [r7, #15]
|
|
8003cc2: 2b00 cmp r3, #0
|
|
8003cc4: d103 bne.n 8003cce <low_level_init+0x102>
|
|
{
|
|
/* Get link state */
|
|
ethernet_link_check_state(netif);
|
|
8003cc6: 6878 ldr r0, [r7, #4]
|
|
8003cc8: f000 fa38 bl 800413c <ethernet_link_check_state>
|
|
#endif /* LWIP_ARP || LWIP_ETHERNET */
|
|
|
|
/* USER CODE BEGIN LOW_LEVEL_INIT */
|
|
|
|
/* USER CODE END LOW_LEVEL_INIT */
|
|
}
|
|
8003ccc: e001 b.n 8003cd2 <low_level_init+0x106>
|
|
Error_Handler();
|
|
8003cce: f7fd facb bl 8001268 <Error_Handler>
|
|
}
|
|
8003cd2: bf00 nop
|
|
8003cd4: 3710 adds r7, #16
|
|
8003cd6: 46bd mov sp, r7
|
|
8003cd8: bd80 pop {r7, pc}
|
|
8003cda: bf00 nop
|
|
8003cdc: 20005568 .word 0x20005568
|
|
8003ce0: 40028000 .word 0x40028000
|
|
8003ce4: 200054c8 .word 0x200054c8
|
|
8003ce8: 20005428 .word 0x20005428
|
|
8003cec: 20005618 .word 0x20005618
|
|
8003cf0: 08017e50 .word 0x08017e50
|
|
8003cf4: 2000000c .word 0x2000000c
|
|
8003cf8: 20005650 .word 0x20005650
|
|
|
|
08003cfc <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)
|
|
{
|
|
8003cfc: b580 push {r7, lr}
|
|
8003cfe: b092 sub sp, #72 ; 0x48
|
|
8003d00: af00 add r7, sp, #0
|
|
8003d02: 6078 str r0, [r7, #4]
|
|
8003d04: 6039 str r1, [r7, #0]
|
|
uint32_t i = 0U;
|
|
8003d06: 2300 movs r3, #0
|
|
8003d08: 647b str r3, [r7, #68] ; 0x44
|
|
struct pbuf *q = NULL;
|
|
8003d0a: 2300 movs r3, #0
|
|
8003d0c: 643b str r3, [r7, #64] ; 0x40
|
|
err_t errval = ERR_OK;
|
|
8003d0e: 2300 movs r3, #0
|
|
8003d10: f887 303f strb.w r3, [r7, #63] ; 0x3f
|
|
ETH_BufferTypeDef Txbuffer[ETH_TX_DESC_CNT] = {0};
|
|
8003d14: f107 030c add.w r3, r7, #12
|
|
8003d18: 2230 movs r2, #48 ; 0x30
|
|
8003d1a: 2100 movs r1, #0
|
|
8003d1c: 4618 mov r0, r3
|
|
8003d1e: f00c fbe3 bl 80104e8 <memset>
|
|
|
|
memset(Txbuffer, 0 , ETH_TX_DESC_CNT*sizeof(ETH_BufferTypeDef));
|
|
8003d22: f107 030c add.w r3, r7, #12
|
|
8003d26: 2230 movs r2, #48 ; 0x30
|
|
8003d28: 2100 movs r1, #0
|
|
8003d2a: 4618 mov r0, r3
|
|
8003d2c: f00c fbdc bl 80104e8 <memset>
|
|
|
|
for(q = p; q != NULL; q = q->next)
|
|
8003d30: 683b ldr r3, [r7, #0]
|
|
8003d32: 643b str r3, [r7, #64] ; 0x40
|
|
8003d34: e045 b.n 8003dc2 <low_level_output+0xc6>
|
|
{
|
|
if(i >= ETH_TX_DESC_CNT)
|
|
8003d36: 6c7b ldr r3, [r7, #68] ; 0x44
|
|
8003d38: 2b03 cmp r3, #3
|
|
8003d3a: d902 bls.n 8003d42 <low_level_output+0x46>
|
|
return ERR_IF;
|
|
8003d3c: f06f 030b mvn.w r3, #11
|
|
8003d40: e055 b.n 8003dee <low_level_output+0xf2>
|
|
|
|
Txbuffer[i].buffer = q->payload;
|
|
8003d42: 6c3b ldr r3, [r7, #64] ; 0x40
|
|
8003d44: 6859 ldr r1, [r3, #4]
|
|
8003d46: 6c7a ldr r2, [r7, #68] ; 0x44
|
|
8003d48: 4613 mov r3, r2
|
|
8003d4a: 005b lsls r3, r3, #1
|
|
8003d4c: 4413 add r3, r2
|
|
8003d4e: 009b lsls r3, r3, #2
|
|
8003d50: 3348 adds r3, #72 ; 0x48
|
|
8003d52: 443b add r3, r7
|
|
8003d54: 3b3c subs r3, #60 ; 0x3c
|
|
8003d56: 6019 str r1, [r3, #0]
|
|
Txbuffer[i].len = q->len;
|
|
8003d58: 6c3b ldr r3, [r7, #64] ; 0x40
|
|
8003d5a: 895b ldrh r3, [r3, #10]
|
|
8003d5c: 4619 mov r1, r3
|
|
8003d5e: 6c7a ldr r2, [r7, #68] ; 0x44
|
|
8003d60: 4613 mov r3, r2
|
|
8003d62: 005b lsls r3, r3, #1
|
|
8003d64: 4413 add r3, r2
|
|
8003d66: 009b lsls r3, r3, #2
|
|
8003d68: 3348 adds r3, #72 ; 0x48
|
|
8003d6a: 443b add r3, r7
|
|
8003d6c: 3b38 subs r3, #56 ; 0x38
|
|
8003d6e: 6019 str r1, [r3, #0]
|
|
|
|
if(i>0)
|
|
8003d70: 6c7b ldr r3, [r7, #68] ; 0x44
|
|
8003d72: 2b00 cmp r3, #0
|
|
8003d74: d011 beq.n 8003d9a <low_level_output+0x9e>
|
|
{
|
|
Txbuffer[i-1].next = &Txbuffer[i];
|
|
8003d76: 6c7b ldr r3, [r7, #68] ; 0x44
|
|
8003d78: 1e5a subs r2, r3, #1
|
|
8003d7a: f107 000c add.w r0, r7, #12
|
|
8003d7e: 6c79 ldr r1, [r7, #68] ; 0x44
|
|
8003d80: 460b mov r3, r1
|
|
8003d82: 005b lsls r3, r3, #1
|
|
8003d84: 440b add r3, r1
|
|
8003d86: 009b lsls r3, r3, #2
|
|
8003d88: 18c1 adds r1, r0, r3
|
|
8003d8a: 4613 mov r3, r2
|
|
8003d8c: 005b lsls r3, r3, #1
|
|
8003d8e: 4413 add r3, r2
|
|
8003d90: 009b lsls r3, r3, #2
|
|
8003d92: 3348 adds r3, #72 ; 0x48
|
|
8003d94: 443b add r3, r7
|
|
8003d96: 3b34 subs r3, #52 ; 0x34
|
|
8003d98: 6019 str r1, [r3, #0]
|
|
}
|
|
|
|
if(q->next == NULL)
|
|
8003d9a: 6c3b ldr r3, [r7, #64] ; 0x40
|
|
8003d9c: 681b ldr r3, [r3, #0]
|
|
8003d9e: 2b00 cmp r3, #0
|
|
8003da0: d109 bne.n 8003db6 <low_level_output+0xba>
|
|
{
|
|
Txbuffer[i].next = NULL;
|
|
8003da2: 6c7a ldr r2, [r7, #68] ; 0x44
|
|
8003da4: 4613 mov r3, r2
|
|
8003da6: 005b lsls r3, r3, #1
|
|
8003da8: 4413 add r3, r2
|
|
8003daa: 009b lsls r3, r3, #2
|
|
8003dac: 3348 adds r3, #72 ; 0x48
|
|
8003dae: 443b add r3, r7
|
|
8003db0: 3b34 subs r3, #52 ; 0x34
|
|
8003db2: 2200 movs r2, #0
|
|
8003db4: 601a str r2, [r3, #0]
|
|
}
|
|
|
|
i++;
|
|
8003db6: 6c7b ldr r3, [r7, #68] ; 0x44
|
|
8003db8: 3301 adds r3, #1
|
|
8003dba: 647b str r3, [r7, #68] ; 0x44
|
|
for(q = p; q != NULL; q = q->next)
|
|
8003dbc: 6c3b ldr r3, [r7, #64] ; 0x40
|
|
8003dbe: 681b ldr r3, [r3, #0]
|
|
8003dc0: 643b str r3, [r7, #64] ; 0x40
|
|
8003dc2: 6c3b ldr r3, [r7, #64] ; 0x40
|
|
8003dc4: 2b00 cmp r3, #0
|
|
8003dc6: d1b6 bne.n 8003d36 <low_level_output+0x3a>
|
|
}
|
|
|
|
TxConfig.Length = p->tot_len;
|
|
8003dc8: 683b ldr r3, [r7, #0]
|
|
8003dca: 891b ldrh r3, [r3, #8]
|
|
8003dcc: 461a mov r2, r3
|
|
8003dce: 4b0a ldr r3, [pc, #40] ; (8003df8 <low_level_output+0xfc>)
|
|
8003dd0: 605a str r2, [r3, #4]
|
|
TxConfig.TxBuffer = Txbuffer;
|
|
8003dd2: 4a09 ldr r2, [pc, #36] ; (8003df8 <low_level_output+0xfc>)
|
|
8003dd4: f107 030c add.w r3, r7, #12
|
|
8003dd8: 6093 str r3, [r2, #8]
|
|
TxConfig.pData = p;
|
|
8003dda: 4a07 ldr r2, [pc, #28] ; (8003df8 <low_level_output+0xfc>)
|
|
8003ddc: 683b ldr r3, [r7, #0]
|
|
8003dde: 6353 str r3, [r2, #52] ; 0x34
|
|
|
|
HAL_ETH_Transmit(&heth, &TxConfig, ETH_DMA_TRANSMIT_TIMEOUT);
|
|
8003de0: 2214 movs r2, #20
|
|
8003de2: 4905 ldr r1, [pc, #20] ; (8003df8 <low_level_output+0xfc>)
|
|
8003de4: 4805 ldr r0, [pc, #20] ; (8003dfc <low_level_output+0x100>)
|
|
8003de6: f7fd ff5f bl 8001ca8 <HAL_ETH_Transmit>
|
|
|
|
return errval;
|
|
8003dea: f997 303f ldrsb.w r3, [r7, #63] ; 0x3f
|
|
}
|
|
8003dee: 4618 mov r0, r3
|
|
8003df0: 3748 adds r7, #72 ; 0x48
|
|
8003df2: 46bd mov sp, r7
|
|
8003df4: bd80 pop {r7, pc}
|
|
8003df6: bf00 nop
|
|
8003df8: 20005618 .word 0x20005618
|
|
8003dfc: 20005568 .word 0x20005568
|
|
|
|
08003e00 <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)
|
|
{
|
|
8003e00: b580 push {r7, lr}
|
|
8003e02: b084 sub sp, #16
|
|
8003e04: af00 add r7, sp, #0
|
|
8003e06: 6078 str r0, [r7, #4]
|
|
struct pbuf *p = NULL;
|
|
8003e08: 2300 movs r3, #0
|
|
8003e0a: 60fb str r3, [r7, #12]
|
|
|
|
if(RxAllocStatus == RX_ALLOC_OK)
|
|
8003e0c: 4b07 ldr r3, [pc, #28] ; (8003e2c <low_level_input+0x2c>)
|
|
8003e0e: 781b ldrb r3, [r3, #0]
|
|
8003e10: 2b00 cmp r3, #0
|
|
8003e12: d105 bne.n 8003e20 <low_level_input+0x20>
|
|
{
|
|
HAL_ETH_ReadData(&heth, (void **)&p);
|
|
8003e14: f107 030c add.w r3, r7, #12
|
|
8003e18: 4619 mov r1, r3
|
|
8003e1a: 4805 ldr r0, [pc, #20] ; (8003e30 <low_level_input+0x30>)
|
|
8003e1c: f7fd ffd8 bl 8001dd0 <HAL_ETH_ReadData>
|
|
}
|
|
|
|
return p;
|
|
8003e20: 68fb ldr r3, [r7, #12]
|
|
}
|
|
8003e22: 4618 mov r0, r3
|
|
8003e24: 3710 adds r7, #16
|
|
8003e26: 46bd mov sp, r7
|
|
8003e28: bd80 pop {r7, pc}
|
|
8003e2a: bf00 nop
|
|
8003e2c: 20005424 .word 0x20005424
|
|
8003e30: 20005568 .word 0x20005568
|
|
|
|
08003e34 <ethernetif_input>:
|
|
* the appropriate input function is called.
|
|
*
|
|
* @param netif the lwip network interface structure for this ethernetif
|
|
*/
|
|
void ethernetif_input(struct netif *netif)
|
|
{
|
|
8003e34: b580 push {r7, lr}
|
|
8003e36: b084 sub sp, #16
|
|
8003e38: af00 add r7, sp, #0
|
|
8003e3a: 6078 str r0, [r7, #4]
|
|
struct pbuf *p = NULL;
|
|
8003e3c: 2300 movs r3, #0
|
|
8003e3e: 60fb str r3, [r7, #12]
|
|
|
|
do
|
|
{
|
|
p = low_level_input( netif );
|
|
8003e40: 6878 ldr r0, [r7, #4]
|
|
8003e42: f7ff ffdd bl 8003e00 <low_level_input>
|
|
8003e46: 60f8 str r0, [r7, #12]
|
|
if (p != NULL)
|
|
8003e48: 68fb ldr r3, [r7, #12]
|
|
8003e4a: 2b00 cmp r3, #0
|
|
8003e4c: d00a beq.n 8003e64 <ethernetif_input+0x30>
|
|
{
|
|
if (netif->input( p, netif) != ERR_OK )
|
|
8003e4e: 687b ldr r3, [r7, #4]
|
|
8003e50: 691b ldr r3, [r3, #16]
|
|
8003e52: 6879 ldr r1, [r7, #4]
|
|
8003e54: 68f8 ldr r0, [r7, #12]
|
|
8003e56: 4798 blx r3
|
|
8003e58: 4603 mov r3, r0
|
|
8003e5a: 2b00 cmp r3, #0
|
|
8003e5c: d002 beq.n 8003e64 <ethernetif_input+0x30>
|
|
{
|
|
pbuf_free(p);
|
|
8003e5e: 68f8 ldr r0, [r7, #12]
|
|
8003e60: f001 fdd2 bl 8005a08 <pbuf_free>
|
|
}
|
|
}
|
|
} while(p!=NULL);
|
|
8003e64: 68fb ldr r3, [r7, #12]
|
|
8003e66: 2b00 cmp r3, #0
|
|
8003e68: d1ea bne.n 8003e40 <ethernetif_input+0xc>
|
|
}
|
|
8003e6a: bf00 nop
|
|
8003e6c: bf00 nop
|
|
8003e6e: 3710 adds r7, #16
|
|
8003e70: 46bd mov sp, r7
|
|
8003e72: bd80 pop {r7, pc}
|
|
|
|
08003e74 <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)
|
|
{
|
|
8003e74: b580 push {r7, lr}
|
|
8003e76: b082 sub sp, #8
|
|
8003e78: af00 add r7, sp, #0
|
|
8003e7a: 6078 str r0, [r7, #4]
|
|
LWIP_ASSERT("netif != NULL", (netif != NULL));
|
|
8003e7c: 687b ldr r3, [r7, #4]
|
|
8003e7e: 2b00 cmp r3, #0
|
|
8003e80: d106 bne.n 8003e90 <ethernetif_init+0x1c>
|
|
8003e82: 4b0e ldr r3, [pc, #56] ; (8003ebc <ethernetif_init+0x48>)
|
|
8003e84: f240 126b movw r2, #363 ; 0x16b
|
|
8003e88: 490d ldr r1, [pc, #52] ; (8003ec0 <ethernetif_init+0x4c>)
|
|
8003e8a: 480e ldr r0, [pc, #56] ; (8003ec4 <ethernetif_init+0x50>)
|
|
8003e8c: f00c fb34 bl 80104f8 <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;
|
|
8003e90: 687b ldr r3, [r7, #4]
|
|
8003e92: 2273 movs r2, #115 ; 0x73
|
|
8003e94: f883 2032 strb.w r2, [r3, #50] ; 0x32
|
|
netif->name[1] = IFNAME1;
|
|
8003e98: 687b ldr r3, [r7, #4]
|
|
8003e9a: 2274 movs r2, #116 ; 0x74
|
|
8003e9c: 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;
|
|
8003ea0: 687b ldr r3, [r7, #4]
|
|
8003ea2: 4a09 ldr r2, [pc, #36] ; (8003ec8 <ethernetif_init+0x54>)
|
|
8003ea4: 615a str r2, [r3, #20]
|
|
|
|
#if LWIP_IPV6
|
|
netif->output_ip6 = ethip6_output;
|
|
#endif /* LWIP_IPV6 */
|
|
|
|
netif->linkoutput = low_level_output;
|
|
8003ea6: 687b ldr r3, [r7, #4]
|
|
8003ea8: 4a08 ldr r2, [pc, #32] ; (8003ecc <ethernetif_init+0x58>)
|
|
8003eaa: 619a str r2, [r3, #24]
|
|
|
|
/* initialize the hardware */
|
|
low_level_init(netif);
|
|
8003eac: 6878 ldr r0, [r7, #4]
|
|
8003eae: f7ff fe8d bl 8003bcc <low_level_init>
|
|
|
|
return ERR_OK;
|
|
8003eb2: 2300 movs r3, #0
|
|
}
|
|
8003eb4: 4618 mov r0, r3
|
|
8003eb6: 3708 adds r7, #8
|
|
8003eb8: 46bd mov sp, r7
|
|
8003eba: bd80 pop {r7, pc}
|
|
8003ebc: 08015050 .word 0x08015050
|
|
8003ec0: 0801506c .word 0x0801506c
|
|
8003ec4: 0801507c .word 0x0801507c
|
|
8003ec8: 0800e485 .word 0x0800e485
|
|
8003ecc: 08003cfd .word 0x08003cfd
|
|
|
|
08003ed0 <pbuf_free_custom>:
|
|
* @brief Custom Rx pbuf free callback
|
|
* @param pbuf: pbuf to be freed
|
|
* @retval None
|
|
*/
|
|
void pbuf_free_custom(struct pbuf *p)
|
|
{
|
|
8003ed0: b580 push {r7, lr}
|
|
8003ed2: b084 sub sp, #16
|
|
8003ed4: af00 add r7, sp, #0
|
|
8003ed6: 6078 str r0, [r7, #4]
|
|
struct pbuf_custom* custom_pbuf = (struct pbuf_custom*)p;
|
|
8003ed8: 687b ldr r3, [r7, #4]
|
|
8003eda: 60fb str r3, [r7, #12]
|
|
LWIP_MEMPOOL_FREE(RX_POOL, custom_pbuf);
|
|
8003edc: 68f9 ldr r1, [r7, #12]
|
|
8003ede: 4807 ldr r0, [pc, #28] ; (8003efc <pbuf_free_custom+0x2c>)
|
|
8003ee0: f000 feec bl 8004cbc <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)
|
|
8003ee4: 4b06 ldr r3, [pc, #24] ; (8003f00 <pbuf_free_custom+0x30>)
|
|
8003ee6: 781b ldrb r3, [r3, #0]
|
|
8003ee8: 2b01 cmp r3, #1
|
|
8003eea: d102 bne.n 8003ef2 <pbuf_free_custom+0x22>
|
|
{
|
|
RxAllocStatus = RX_ALLOC_OK;
|
|
8003eec: 4b04 ldr r3, [pc, #16] ; (8003f00 <pbuf_free_custom+0x30>)
|
|
8003eee: 2200 movs r2, #0
|
|
8003ef0: 701a strb r2, [r3, #0]
|
|
}
|
|
}
|
|
8003ef2: bf00 nop
|
|
8003ef4: 3710 adds r7, #16
|
|
8003ef6: 46bd mov sp, r7
|
|
8003ef8: bd80 pop {r7, pc}
|
|
8003efa: bf00 nop
|
|
8003efc: 08017e50 .word 0x08017e50
|
|
8003f00: 20005424 .word 0x20005424
|
|
|
|
08003f04 <sys_now>:
|
|
* when LWIP_TIMERS == 1 and NO_SYS == 1
|
|
* @param None
|
|
* @retval Current Time value
|
|
*/
|
|
u32_t sys_now(void)
|
|
{
|
|
8003f04: b580 push {r7, lr}
|
|
8003f06: af00 add r7, sp, #0
|
|
return HAL_GetTick();
|
|
8003f08: f7fd fc82 bl 8001810 <HAL_GetTick>
|
|
8003f0c: 4603 mov r3, r0
|
|
}
|
|
8003f0e: 4618 mov r0, r3
|
|
8003f10: bd80 pop {r7, pc}
|
|
...
|
|
|
|
08003f14 <HAL_ETH_MspInit>:
|
|
* @param ethHandle: ETH handle
|
|
* @retval None
|
|
*/
|
|
|
|
void HAL_ETH_MspInit(ETH_HandleTypeDef* ethHandle)
|
|
{
|
|
8003f14: b580 push {r7, lr}
|
|
8003f16: b08e sub sp, #56 ; 0x38
|
|
8003f18: af00 add r7, sp, #0
|
|
8003f1a: 6078 str r0, [r7, #4]
|
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
|
8003f1c: f107 0324 add.w r3, r7, #36 ; 0x24
|
|
8003f20: 2200 movs r2, #0
|
|
8003f22: 601a str r2, [r3, #0]
|
|
8003f24: 605a str r2, [r3, #4]
|
|
8003f26: 609a str r2, [r3, #8]
|
|
8003f28: 60da str r2, [r3, #12]
|
|
8003f2a: 611a str r2, [r3, #16]
|
|
if(ethHandle->Instance==ETH)
|
|
8003f2c: 687b ldr r3, [r7, #4]
|
|
8003f2e: 681b ldr r3, [r3, #0]
|
|
8003f30: 4a55 ldr r2, [pc, #340] ; (8004088 <HAL_ETH_MspInit+0x174>)
|
|
8003f32: 4293 cmp r3, r2
|
|
8003f34: f040 80a4 bne.w 8004080 <HAL_ETH_MspInit+0x16c>
|
|
{
|
|
/* USER CODE BEGIN ETH_MspInit 0 */
|
|
|
|
/* USER CODE END ETH_MspInit 0 */
|
|
/* Enable Peripheral clock */
|
|
__HAL_RCC_ETH_CLK_ENABLE();
|
|
8003f38: 2300 movs r3, #0
|
|
8003f3a: 623b str r3, [r7, #32]
|
|
8003f3c: 4b53 ldr r3, [pc, #332] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003f3e: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8003f40: 4a52 ldr r2, [pc, #328] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003f42: f043 7300 orr.w r3, r3, #33554432 ; 0x2000000
|
|
8003f46: 6313 str r3, [r2, #48] ; 0x30
|
|
8003f48: 4b50 ldr r3, [pc, #320] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003f4a: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8003f4c: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
|
|
8003f50: 623b str r3, [r7, #32]
|
|
8003f52: 6a3b ldr r3, [r7, #32]
|
|
8003f54: 2300 movs r3, #0
|
|
8003f56: 61fb str r3, [r7, #28]
|
|
8003f58: 4b4c ldr r3, [pc, #304] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003f5a: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8003f5c: 4a4b ldr r2, [pc, #300] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003f5e: f043 6380 orr.w r3, r3, #67108864 ; 0x4000000
|
|
8003f62: 6313 str r3, [r2, #48] ; 0x30
|
|
8003f64: 4b49 ldr r3, [pc, #292] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003f66: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8003f68: f003 6380 and.w r3, r3, #67108864 ; 0x4000000
|
|
8003f6c: 61fb str r3, [r7, #28]
|
|
8003f6e: 69fb ldr r3, [r7, #28]
|
|
8003f70: 2300 movs r3, #0
|
|
8003f72: 61bb str r3, [r7, #24]
|
|
8003f74: 4b45 ldr r3, [pc, #276] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003f76: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8003f78: 4a44 ldr r2, [pc, #272] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003f7a: f043 6300 orr.w r3, r3, #134217728 ; 0x8000000
|
|
8003f7e: 6313 str r3, [r2, #48] ; 0x30
|
|
8003f80: 4b42 ldr r3, [pc, #264] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003f82: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8003f84: f003 6300 and.w r3, r3, #134217728 ; 0x8000000
|
|
8003f88: 61bb str r3, [r7, #24]
|
|
8003f8a: 69bb ldr r3, [r7, #24]
|
|
|
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
|
8003f8c: 2300 movs r3, #0
|
|
8003f8e: 617b str r3, [r7, #20]
|
|
8003f90: 4b3e ldr r3, [pc, #248] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003f92: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8003f94: 4a3d ldr r2, [pc, #244] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003f96: f043 0304 orr.w r3, r3, #4
|
|
8003f9a: 6313 str r3, [r2, #48] ; 0x30
|
|
8003f9c: 4b3b ldr r3, [pc, #236] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003f9e: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8003fa0: f003 0304 and.w r3, r3, #4
|
|
8003fa4: 617b str r3, [r7, #20]
|
|
8003fa6: 697b ldr r3, [r7, #20]
|
|
__HAL_RCC_GPIOA_CLK_ENABLE();
|
|
8003fa8: 2300 movs r3, #0
|
|
8003faa: 613b str r3, [r7, #16]
|
|
8003fac: 4b37 ldr r3, [pc, #220] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003fae: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8003fb0: 4a36 ldr r2, [pc, #216] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003fb2: f043 0301 orr.w r3, r3, #1
|
|
8003fb6: 6313 str r3, [r2, #48] ; 0x30
|
|
8003fb8: 4b34 ldr r3, [pc, #208] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003fba: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8003fbc: f003 0301 and.w r3, r3, #1
|
|
8003fc0: 613b str r3, [r7, #16]
|
|
8003fc2: 693b ldr r3, [r7, #16]
|
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
|
8003fc4: 2300 movs r3, #0
|
|
8003fc6: 60fb str r3, [r7, #12]
|
|
8003fc8: 4b30 ldr r3, [pc, #192] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003fca: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8003fcc: 4a2f ldr r2, [pc, #188] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003fce: f043 0302 orr.w r3, r3, #2
|
|
8003fd2: 6313 str r3, [r2, #48] ; 0x30
|
|
8003fd4: 4b2d ldr r3, [pc, #180] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003fd6: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8003fd8: f003 0302 and.w r3, r3, #2
|
|
8003fdc: 60fb str r3, [r7, #12]
|
|
8003fde: 68fb ldr r3, [r7, #12]
|
|
__HAL_RCC_GPIOG_CLK_ENABLE();
|
|
8003fe0: 2300 movs r3, #0
|
|
8003fe2: 60bb str r3, [r7, #8]
|
|
8003fe4: 4b29 ldr r3, [pc, #164] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003fe6: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8003fe8: 4a28 ldr r2, [pc, #160] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003fea: f043 0340 orr.w r3, r3, #64 ; 0x40
|
|
8003fee: 6313 str r3, [r2, #48] ; 0x30
|
|
8003ff0: 4b26 ldr r3, [pc, #152] ; (800408c <HAL_ETH_MspInit+0x178>)
|
|
8003ff2: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
8003ff4: f003 0340 and.w r3, r3, #64 ; 0x40
|
|
8003ff8: 60bb str r3, [r7, #8]
|
|
8003ffa: 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;
|
|
8003ffc: 2332 movs r3, #50 ; 0x32
|
|
8003ffe: 627b str r3, [r7, #36] ; 0x24
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
|
8004000: 2302 movs r3, #2
|
|
8004002: 62bb str r3, [r7, #40] ; 0x28
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
8004004: 2300 movs r3, #0
|
|
8004006: 62fb str r3, [r7, #44] ; 0x2c
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
8004008: 2303 movs r3, #3
|
|
800400a: 633b str r3, [r7, #48] ; 0x30
|
|
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
|
|
800400c: 230b movs r3, #11
|
|
800400e: 637b str r3, [r7, #52] ; 0x34
|
|
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
|
8004010: f107 0324 add.w r3, r7, #36 ; 0x24
|
|
8004014: 4619 mov r1, r3
|
|
8004016: 481e ldr r0, [pc, #120] ; (8004090 <HAL_ETH_MspInit+0x17c>)
|
|
8004018: f7fe fe06 bl 8002c28 <HAL_GPIO_Init>
|
|
|
|
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_7;
|
|
800401c: 2386 movs r3, #134 ; 0x86
|
|
800401e: 627b str r3, [r7, #36] ; 0x24
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
|
8004020: 2302 movs r3, #2
|
|
8004022: 62bb str r3, [r7, #40] ; 0x28
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
8004024: 2300 movs r3, #0
|
|
8004026: 62fb str r3, [r7, #44] ; 0x2c
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
8004028: 2303 movs r3, #3
|
|
800402a: 633b str r3, [r7, #48] ; 0x30
|
|
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
|
|
800402c: 230b movs r3, #11
|
|
800402e: 637b str r3, [r7, #52] ; 0x34
|
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
|
8004030: f107 0324 add.w r3, r7, #36 ; 0x24
|
|
8004034: 4619 mov r1, r3
|
|
8004036: 4817 ldr r0, [pc, #92] ; (8004094 <HAL_ETH_MspInit+0x180>)
|
|
8004038: f7fe fdf6 bl 8002c28 <HAL_GPIO_Init>
|
|
|
|
GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12;
|
|
800403c: f44f 53c0 mov.w r3, #6144 ; 0x1800
|
|
8004040: 627b str r3, [r7, #36] ; 0x24
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
|
8004042: 2302 movs r3, #2
|
|
8004044: 62bb str r3, [r7, #40] ; 0x28
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
8004046: 2300 movs r3, #0
|
|
8004048: 62fb str r3, [r7, #44] ; 0x2c
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
800404a: 2303 movs r3, #3
|
|
800404c: 633b str r3, [r7, #48] ; 0x30
|
|
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
|
|
800404e: 230b movs r3, #11
|
|
8004050: 637b str r3, [r7, #52] ; 0x34
|
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
|
8004052: f107 0324 add.w r3, r7, #36 ; 0x24
|
|
8004056: 4619 mov r1, r3
|
|
8004058: 480f ldr r0, [pc, #60] ; (8004098 <HAL_ETH_MspInit+0x184>)
|
|
800405a: f7fe fde5 bl 8002c28 <HAL_GPIO_Init>
|
|
|
|
GPIO_InitStruct.Pin = GPIO_PIN_14;
|
|
800405e: f44f 4380 mov.w r3, #16384 ; 0x4000
|
|
8004062: 627b str r3, [r7, #36] ; 0x24
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
|
8004064: 2302 movs r3, #2
|
|
8004066: 62bb str r3, [r7, #40] ; 0x28
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
8004068: 2300 movs r3, #0
|
|
800406a: 62fb str r3, [r7, #44] ; 0x2c
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
800406c: 2303 movs r3, #3
|
|
800406e: 633b str r3, [r7, #48] ; 0x30
|
|
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
|
|
8004070: 230b movs r3, #11
|
|
8004072: 637b str r3, [r7, #52] ; 0x34
|
|
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
|
|
8004074: f107 0324 add.w r3, r7, #36 ; 0x24
|
|
8004078: 4619 mov r1, r3
|
|
800407a: 4808 ldr r0, [pc, #32] ; (800409c <HAL_ETH_MspInit+0x188>)
|
|
800407c: f7fe fdd4 bl 8002c28 <HAL_GPIO_Init>
|
|
|
|
/* USER CODE BEGIN ETH_MspInit 1 */
|
|
|
|
/* USER CODE END ETH_MspInit 1 */
|
|
}
|
|
}
|
|
8004080: bf00 nop
|
|
8004082: 3738 adds r7, #56 ; 0x38
|
|
8004084: 46bd mov sp, r7
|
|
8004086: bd80 pop {r7, pc}
|
|
8004088: 40028000 .word 0x40028000
|
|
800408c: 40023800 .word 0x40023800
|
|
8004090: 40020800 .word 0x40020800
|
|
8004094: 40020000 .word 0x40020000
|
|
8004098: 40020400 .word 0x40020400
|
|
800409c: 40021800 .word 0x40021800
|
|
|
|
080040a0 <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)
|
|
{
|
|
80040a0: b580 push {r7, lr}
|
|
80040a2: 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);
|
|
80040a4: 4802 ldr r0, [pc, #8] ; (80040b0 <ETH_PHY_IO_Init+0x10>)
|
|
80040a6: f7fe f963 bl 8002370 <HAL_ETH_SetMDIOClockRange>
|
|
|
|
return 0;
|
|
80040aa: 2300 movs r3, #0
|
|
}
|
|
80040ac: 4618 mov r0, r3
|
|
80040ae: bd80 pop {r7, pc}
|
|
80040b0: 20005568 .word 0x20005568
|
|
|
|
080040b4 <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)
|
|
{
|
|
80040b4: b480 push {r7}
|
|
80040b6: af00 add r7, sp, #0
|
|
return 0;
|
|
80040b8: 2300 movs r3, #0
|
|
}
|
|
80040ba: 4618 mov r0, r3
|
|
80040bc: 46bd mov sp, r7
|
|
80040be: f85d 7b04 ldr.w r7, [sp], #4
|
|
80040c2: 4770 bx lr
|
|
|
|
080040c4 <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)
|
|
{
|
|
80040c4: b580 push {r7, lr}
|
|
80040c6: b084 sub sp, #16
|
|
80040c8: af00 add r7, sp, #0
|
|
80040ca: 60f8 str r0, [r7, #12]
|
|
80040cc: 60b9 str r1, [r7, #8]
|
|
80040ce: 607a str r2, [r7, #4]
|
|
if(HAL_ETH_ReadPHYRegister(&heth, DevAddr, RegAddr, pRegVal) != HAL_OK)
|
|
80040d0: 687b ldr r3, [r7, #4]
|
|
80040d2: 68ba ldr r2, [r7, #8]
|
|
80040d4: 68f9 ldr r1, [r7, #12]
|
|
80040d6: 4807 ldr r0, [pc, #28] ; (80040f4 <ETH_PHY_IO_ReadReg+0x30>)
|
|
80040d8: f7fd ffb2 bl 8002040 <HAL_ETH_ReadPHYRegister>
|
|
80040dc: 4603 mov r3, r0
|
|
80040de: 2b00 cmp r3, #0
|
|
80040e0: d002 beq.n 80040e8 <ETH_PHY_IO_ReadReg+0x24>
|
|
{
|
|
return -1;
|
|
80040e2: f04f 33ff mov.w r3, #4294967295
|
|
80040e6: e000 b.n 80040ea <ETH_PHY_IO_ReadReg+0x26>
|
|
}
|
|
|
|
return 0;
|
|
80040e8: 2300 movs r3, #0
|
|
}
|
|
80040ea: 4618 mov r0, r3
|
|
80040ec: 3710 adds r7, #16
|
|
80040ee: 46bd mov sp, r7
|
|
80040f0: bd80 pop {r7, pc}
|
|
80040f2: bf00 nop
|
|
80040f4: 20005568 .word 0x20005568
|
|
|
|
080040f8 <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)
|
|
{
|
|
80040f8: b580 push {r7, lr}
|
|
80040fa: b084 sub sp, #16
|
|
80040fc: af00 add r7, sp, #0
|
|
80040fe: 60f8 str r0, [r7, #12]
|
|
8004100: 60b9 str r1, [r7, #8]
|
|
8004102: 607a str r2, [r7, #4]
|
|
if(HAL_ETH_WritePHYRegister(&heth, DevAddr, RegAddr, RegVal) != HAL_OK)
|
|
8004104: 687b ldr r3, [r7, #4]
|
|
8004106: 68ba ldr r2, [r7, #8]
|
|
8004108: 68f9 ldr r1, [r7, #12]
|
|
800410a: 4807 ldr r0, [pc, #28] ; (8004128 <ETH_PHY_IO_WriteReg+0x30>)
|
|
800410c: f7fd ffe3 bl 80020d6 <HAL_ETH_WritePHYRegister>
|
|
8004110: 4603 mov r3, r0
|
|
8004112: 2b00 cmp r3, #0
|
|
8004114: d002 beq.n 800411c <ETH_PHY_IO_WriteReg+0x24>
|
|
{
|
|
return -1;
|
|
8004116: f04f 33ff mov.w r3, #4294967295
|
|
800411a: e000 b.n 800411e <ETH_PHY_IO_WriteReg+0x26>
|
|
}
|
|
|
|
return 0;
|
|
800411c: 2300 movs r3, #0
|
|
}
|
|
800411e: 4618 mov r0, r3
|
|
8004120: 3710 adds r7, #16
|
|
8004122: 46bd mov sp, r7
|
|
8004124: bd80 pop {r7, pc}
|
|
8004126: bf00 nop
|
|
8004128: 20005568 .word 0x20005568
|
|
|
|
0800412c <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)
|
|
{
|
|
800412c: b580 push {r7, lr}
|
|
800412e: af00 add r7, sp, #0
|
|
return HAL_GetTick();
|
|
8004130: f7fd fb6e bl 8001810 <HAL_GetTick>
|
|
8004134: 4603 mov r3, r0
|
|
}
|
|
8004136: 4618 mov r0, r3
|
|
8004138: bd80 pop {r7, pc}
|
|
...
|
|
|
|
0800413c <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)
|
|
{
|
|
800413c: b580 push {r7, lr}
|
|
800413e: b0a0 sub sp, #128 ; 0x80
|
|
8004140: af00 add r7, sp, #0
|
|
8004142: 6078 str r0, [r7, #4]
|
|
ETH_MACConfigTypeDef MACConf = {0};
|
|
8004144: f107 030c add.w r3, r7, #12
|
|
8004148: 2264 movs r2, #100 ; 0x64
|
|
800414a: 2100 movs r1, #0
|
|
800414c: 4618 mov r0, r3
|
|
800414e: f00c f9cb bl 80104e8 <memset>
|
|
int32_t PHYLinkState = 0;
|
|
8004152: 2300 movs r3, #0
|
|
8004154: 673b str r3, [r7, #112] ; 0x70
|
|
uint32_t linkchanged = 0U, speed = 0U, duplex = 0U;
|
|
8004156: 2300 movs r3, #0
|
|
8004158: 67fb str r3, [r7, #124] ; 0x7c
|
|
800415a: 2300 movs r3, #0
|
|
800415c: 67bb str r3, [r7, #120] ; 0x78
|
|
800415e: 2300 movs r3, #0
|
|
8004160: 677b str r3, [r7, #116] ; 0x74
|
|
|
|
PHYLinkState = DP83848_GetLinkState(&DP83848);
|
|
8004162: 483a ldr r0, [pc, #232] ; (800424c <ethernet_link_check_state+0x110>)
|
|
8004164: f7fd fa67 bl 8001636 <DP83848_GetLinkState>
|
|
8004168: 6738 str r0, [r7, #112] ; 0x70
|
|
|
|
if(netif_is_link_up(netif) && (PHYLinkState <= DP83848_STATUS_LINK_DOWN))
|
|
800416a: 687b ldr r3, [r7, #4]
|
|
800416c: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
8004170: 089b lsrs r3, r3, #2
|
|
8004172: f003 0301 and.w r3, r3, #1
|
|
8004176: b2db uxtb r3, r3
|
|
8004178: 2b00 cmp r3, #0
|
|
800417a: d00c beq.n 8004196 <ethernet_link_check_state+0x5a>
|
|
800417c: 6f3b ldr r3, [r7, #112] ; 0x70
|
|
800417e: 2b01 cmp r3, #1
|
|
8004180: dc09 bgt.n 8004196 <ethernet_link_check_state+0x5a>
|
|
{
|
|
HAL_ETH_Stop(&heth);
|
|
8004182: 4833 ldr r0, [pc, #204] ; (8004250 <ethernet_link_check_state+0x114>)
|
|
8004184: f7fd fd37 bl 8001bf6 <HAL_ETH_Stop>
|
|
netif_set_down(netif);
|
|
8004188: 6878 ldr r0, [r7, #4]
|
|
800418a: f001 f823 bl 80051d4 <netif_set_down>
|
|
netif_set_link_down(netif);
|
|
800418e: 6878 ldr r0, [r7, #4]
|
|
8004190: f001 f88a bl 80052a8 <netif_set_link_down>
|
|
netif_set_up(netif);
|
|
netif_set_link_up(netif);
|
|
}
|
|
}
|
|
|
|
}
|
|
8004194: e055 b.n 8004242 <ethernet_link_check_state+0x106>
|
|
else if(!netif_is_link_up(netif) && (PHYLinkState > DP83848_STATUS_LINK_DOWN))
|
|
8004196: 687b ldr r3, [r7, #4]
|
|
8004198: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
800419c: f003 0304 and.w r3, r3, #4
|
|
80041a0: 2b00 cmp r3, #0
|
|
80041a2: d14e bne.n 8004242 <ethernet_link_check_state+0x106>
|
|
80041a4: 6f3b ldr r3, [r7, #112] ; 0x70
|
|
80041a6: 2b01 cmp r3, #1
|
|
80041a8: dd4b ble.n 8004242 <ethernet_link_check_state+0x106>
|
|
switch (PHYLinkState)
|
|
80041aa: 6f3b ldr r3, [r7, #112] ; 0x70
|
|
80041ac: 3b02 subs r3, #2
|
|
80041ae: 2b03 cmp r3, #3
|
|
80041b0: d82a bhi.n 8004208 <ethernet_link_check_state+0xcc>
|
|
80041b2: a201 add r2, pc, #4 ; (adr r2, 80041b8 <ethernet_link_check_state+0x7c>)
|
|
80041b4: f852 f023 ldr.w pc, [r2, r3, lsl #2]
|
|
80041b8: 080041c9 .word 0x080041c9
|
|
80041bc: 080041db .word 0x080041db
|
|
80041c0: 080041eb .word 0x080041eb
|
|
80041c4: 080041fb .word 0x080041fb
|
|
duplex = ETH_FULLDUPLEX_MODE;
|
|
80041c8: f44f 6300 mov.w r3, #2048 ; 0x800
|
|
80041cc: 677b str r3, [r7, #116] ; 0x74
|
|
speed = ETH_SPEED_100M;
|
|
80041ce: f44f 4380 mov.w r3, #16384 ; 0x4000
|
|
80041d2: 67bb str r3, [r7, #120] ; 0x78
|
|
linkchanged = 1;
|
|
80041d4: 2301 movs r3, #1
|
|
80041d6: 67fb str r3, [r7, #124] ; 0x7c
|
|
break;
|
|
80041d8: e017 b.n 800420a <ethernet_link_check_state+0xce>
|
|
duplex = ETH_HALFDUPLEX_MODE;
|
|
80041da: 2300 movs r3, #0
|
|
80041dc: 677b str r3, [r7, #116] ; 0x74
|
|
speed = ETH_SPEED_100M;
|
|
80041de: f44f 4380 mov.w r3, #16384 ; 0x4000
|
|
80041e2: 67bb str r3, [r7, #120] ; 0x78
|
|
linkchanged = 1;
|
|
80041e4: 2301 movs r3, #1
|
|
80041e6: 67fb str r3, [r7, #124] ; 0x7c
|
|
break;
|
|
80041e8: e00f b.n 800420a <ethernet_link_check_state+0xce>
|
|
duplex = ETH_FULLDUPLEX_MODE;
|
|
80041ea: f44f 6300 mov.w r3, #2048 ; 0x800
|
|
80041ee: 677b str r3, [r7, #116] ; 0x74
|
|
speed = ETH_SPEED_10M;
|
|
80041f0: 2300 movs r3, #0
|
|
80041f2: 67bb str r3, [r7, #120] ; 0x78
|
|
linkchanged = 1;
|
|
80041f4: 2301 movs r3, #1
|
|
80041f6: 67fb str r3, [r7, #124] ; 0x7c
|
|
break;
|
|
80041f8: e007 b.n 800420a <ethernet_link_check_state+0xce>
|
|
duplex = ETH_HALFDUPLEX_MODE;
|
|
80041fa: 2300 movs r3, #0
|
|
80041fc: 677b str r3, [r7, #116] ; 0x74
|
|
speed = ETH_SPEED_10M;
|
|
80041fe: 2300 movs r3, #0
|
|
8004200: 67bb str r3, [r7, #120] ; 0x78
|
|
linkchanged = 1;
|
|
8004202: 2301 movs r3, #1
|
|
8004204: 67fb str r3, [r7, #124] ; 0x7c
|
|
break;
|
|
8004206: e000 b.n 800420a <ethernet_link_check_state+0xce>
|
|
break;
|
|
8004208: bf00 nop
|
|
if(linkchanged)
|
|
800420a: 6ffb ldr r3, [r7, #124] ; 0x7c
|
|
800420c: 2b00 cmp r3, #0
|
|
800420e: d018 beq.n 8004242 <ethernet_link_check_state+0x106>
|
|
HAL_ETH_GetMACConfig(&heth, &MACConf);
|
|
8004210: f107 030c add.w r3, r7, #12
|
|
8004214: 4619 mov r1, r3
|
|
8004216: 480e ldr r0, [pc, #56] ; (8004250 <ethernet_link_check_state+0x114>)
|
|
8004218: f7fd ffa6 bl 8002168 <HAL_ETH_GetMACConfig>
|
|
MACConf.DuplexMode = duplex;
|
|
800421c: 6f7b ldr r3, [r7, #116] ; 0x74
|
|
800421e: 627b str r3, [r7, #36] ; 0x24
|
|
MACConf.Speed = speed;
|
|
8004220: 6fbb ldr r3, [r7, #120] ; 0x78
|
|
8004222: 623b str r3, [r7, #32]
|
|
HAL_ETH_SetMACConfig(&heth, &MACConf);
|
|
8004224: f107 030c add.w r3, r7, #12
|
|
8004228: 4619 mov r1, r3
|
|
800422a: 4809 ldr r0, [pc, #36] ; (8004250 <ethernet_link_check_state+0x114>)
|
|
800422c: f7fe f886 bl 800233c <HAL_ETH_SetMACConfig>
|
|
HAL_ETH_Start(&heth);
|
|
8004230: 4807 ldr r0, [pc, #28] ; (8004250 <ethernet_link_check_state+0x114>)
|
|
8004232: f7fd fc81 bl 8001b38 <HAL_ETH_Start>
|
|
netif_set_up(netif);
|
|
8004236: 6878 ldr r0, [r7, #4]
|
|
8004238: f000 ff60 bl 80050fc <netif_set_up>
|
|
netif_set_link_up(netif);
|
|
800423c: 6878 ldr r0, [r7, #4]
|
|
800423e: f000 fffb bl 8005238 <netif_set_link_up>
|
|
}
|
|
8004242: bf00 nop
|
|
8004244: 3780 adds r7, #128 ; 0x80
|
|
8004246: 46bd mov sp, r7
|
|
8004248: bd80 pop {r7, pc}
|
|
800424a: bf00 nop
|
|
800424c: 20005650 .word 0x20005650
|
|
8004250: 20005568 .word 0x20005568
|
|
|
|
08004254 <HAL_ETH_RxAllocateCallback>:
|
|
|
|
void HAL_ETH_RxAllocateCallback(uint8_t **buff)
|
|
{
|
|
8004254: b580 push {r7, lr}
|
|
8004256: b086 sub sp, #24
|
|
8004258: af02 add r7, sp, #8
|
|
800425a: 6078 str r0, [r7, #4]
|
|
/* USER CODE BEGIN HAL ETH RxAllocateCallback */
|
|
struct pbuf_custom *p = LWIP_MEMPOOL_ALLOC(RX_POOL);
|
|
800425c: 4812 ldr r0, [pc, #72] ; (80042a8 <HAL_ETH_RxAllocateCallback+0x54>)
|
|
800425e: f000 fcbf bl 8004be0 <memp_malloc_pool>
|
|
8004262: 60f8 str r0, [r7, #12]
|
|
if (p)
|
|
8004264: 68fb ldr r3, [r7, #12]
|
|
8004266: 2b00 cmp r3, #0
|
|
8004268: d014 beq.n 8004294 <HAL_ETH_RxAllocateCallback+0x40>
|
|
{
|
|
/* Get the buff from the struct pbuf address. */
|
|
*buff = (uint8_t *)p + offsetof(RxBuff_t, buff);
|
|
800426a: 68fb ldr r3, [r7, #12]
|
|
800426c: f103 0220 add.w r2, r3, #32
|
|
8004270: 687b ldr r3, [r7, #4]
|
|
8004272: 601a str r2, [r3, #0]
|
|
p->custom_free_function = pbuf_free_custom;
|
|
8004274: 68fb ldr r3, [r7, #12]
|
|
8004276: 4a0d ldr r2, [pc, #52] ; (80042ac <HAL_ETH_RxAllocateCallback+0x58>)
|
|
8004278: 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);
|
|
800427a: 687b ldr r3, [r7, #4]
|
|
800427c: 681b ldr r3, [r3, #0]
|
|
800427e: f44f 62c0 mov.w r2, #1536 ; 0x600
|
|
8004282: 9201 str r2, [sp, #4]
|
|
8004284: 9300 str r3, [sp, #0]
|
|
8004286: 68fb ldr r3, [r7, #12]
|
|
8004288: 2241 movs r2, #65 ; 0x41
|
|
800428a: 2100 movs r1, #0
|
|
800428c: 2000 movs r0, #0
|
|
800428e: f001 fa01 bl 8005694 <pbuf_alloced_custom>
|
|
{
|
|
RxAllocStatus = RX_ALLOC_ERROR;
|
|
*buff = NULL;
|
|
}
|
|
/* USER CODE END HAL ETH RxAllocateCallback */
|
|
}
|
|
8004292: e005 b.n 80042a0 <HAL_ETH_RxAllocateCallback+0x4c>
|
|
RxAllocStatus = RX_ALLOC_ERROR;
|
|
8004294: 4b06 ldr r3, [pc, #24] ; (80042b0 <HAL_ETH_RxAllocateCallback+0x5c>)
|
|
8004296: 2201 movs r2, #1
|
|
8004298: 701a strb r2, [r3, #0]
|
|
*buff = NULL;
|
|
800429a: 687b ldr r3, [r7, #4]
|
|
800429c: 2200 movs r2, #0
|
|
800429e: 601a str r2, [r3, #0]
|
|
}
|
|
80042a0: bf00 nop
|
|
80042a2: 3710 adds r7, #16
|
|
80042a4: 46bd mov sp, r7
|
|
80042a6: bd80 pop {r7, pc}
|
|
80042a8: 08017e50 .word 0x08017e50
|
|
80042ac: 08003ed1 .word 0x08003ed1
|
|
80042b0: 20005424 .word 0x20005424
|
|
|
|
080042b4 <HAL_ETH_RxLinkCallback>:
|
|
|
|
void HAL_ETH_RxLinkCallback(void **pStart, void **pEnd, uint8_t *buff, uint16_t Length)
|
|
{
|
|
80042b4: b480 push {r7}
|
|
80042b6: b089 sub sp, #36 ; 0x24
|
|
80042b8: af00 add r7, sp, #0
|
|
80042ba: 60f8 str r0, [r7, #12]
|
|
80042bc: 60b9 str r1, [r7, #8]
|
|
80042be: 607a str r2, [r7, #4]
|
|
80042c0: 807b strh r3, [r7, #2]
|
|
/* USER CODE BEGIN HAL ETH RxLinkCallback */
|
|
|
|
struct pbuf **ppStart = (struct pbuf **)pStart;
|
|
80042c2: 68fb ldr r3, [r7, #12]
|
|
80042c4: 61bb str r3, [r7, #24]
|
|
struct pbuf **ppEnd = (struct pbuf **)pEnd;
|
|
80042c6: 68bb ldr r3, [r7, #8]
|
|
80042c8: 617b str r3, [r7, #20]
|
|
struct pbuf *p = NULL;
|
|
80042ca: 2300 movs r3, #0
|
|
80042cc: 61fb str r3, [r7, #28]
|
|
|
|
/* Get the struct pbuf from the buff address. */
|
|
p = (struct pbuf *)(buff - offsetof(RxBuff_t, buff));
|
|
80042ce: 687b ldr r3, [r7, #4]
|
|
80042d0: 3b20 subs r3, #32
|
|
80042d2: 61fb str r3, [r7, #28]
|
|
p->next = NULL;
|
|
80042d4: 69fb ldr r3, [r7, #28]
|
|
80042d6: 2200 movs r2, #0
|
|
80042d8: 601a str r2, [r3, #0]
|
|
p->tot_len = 0;
|
|
80042da: 69fb ldr r3, [r7, #28]
|
|
80042dc: 2200 movs r2, #0
|
|
80042de: 811a strh r2, [r3, #8]
|
|
p->len = Length;
|
|
80042e0: 69fb ldr r3, [r7, #28]
|
|
80042e2: 887a ldrh r2, [r7, #2]
|
|
80042e4: 815a strh r2, [r3, #10]
|
|
|
|
/* Chain the buffer. */
|
|
if (!*ppStart)
|
|
80042e6: 69bb ldr r3, [r7, #24]
|
|
80042e8: 681b ldr r3, [r3, #0]
|
|
80042ea: 2b00 cmp r3, #0
|
|
80042ec: d103 bne.n 80042f6 <HAL_ETH_RxLinkCallback+0x42>
|
|
{
|
|
/* The first buffer of the packet. */
|
|
*ppStart = p;
|
|
80042ee: 69bb ldr r3, [r7, #24]
|
|
80042f0: 69fa ldr r2, [r7, #28]
|
|
80042f2: 601a str r2, [r3, #0]
|
|
80042f4: e003 b.n 80042fe <HAL_ETH_RxLinkCallback+0x4a>
|
|
}
|
|
else
|
|
{
|
|
/* Chain the buffer to the end of the packet. */
|
|
(*ppEnd)->next = p;
|
|
80042f6: 697b ldr r3, [r7, #20]
|
|
80042f8: 681b ldr r3, [r3, #0]
|
|
80042fa: 69fa ldr r2, [r7, #28]
|
|
80042fc: 601a str r2, [r3, #0]
|
|
}
|
|
*ppEnd = p;
|
|
80042fe: 697b ldr r3, [r7, #20]
|
|
8004300: 69fa ldr r2, [r7, #28]
|
|
8004302: 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)
|
|
8004304: 69bb ldr r3, [r7, #24]
|
|
8004306: 681b ldr r3, [r3, #0]
|
|
8004308: 61fb str r3, [r7, #28]
|
|
800430a: e009 b.n 8004320 <HAL_ETH_RxLinkCallback+0x6c>
|
|
{
|
|
p->tot_len += Length;
|
|
800430c: 69fb ldr r3, [r7, #28]
|
|
800430e: 891a ldrh r2, [r3, #8]
|
|
8004310: 887b ldrh r3, [r7, #2]
|
|
8004312: 4413 add r3, r2
|
|
8004314: b29a uxth r2, r3
|
|
8004316: 69fb ldr r3, [r7, #28]
|
|
8004318: 811a strh r2, [r3, #8]
|
|
for (p = *ppStart; p != NULL; p = p->next)
|
|
800431a: 69fb ldr r3, [r7, #28]
|
|
800431c: 681b ldr r3, [r3, #0]
|
|
800431e: 61fb str r3, [r7, #28]
|
|
8004320: 69fb ldr r3, [r7, #28]
|
|
8004322: 2b00 cmp r3, #0
|
|
8004324: d1f2 bne.n 800430c <HAL_ETH_RxLinkCallback+0x58>
|
|
}
|
|
|
|
/* USER CODE END HAL ETH RxLinkCallback */
|
|
}
|
|
8004326: bf00 nop
|
|
8004328: bf00 nop
|
|
800432a: 3724 adds r7, #36 ; 0x24
|
|
800432c: 46bd mov sp, r7
|
|
800432e: f85d 7b04 ldr.w r7, [sp], #4
|
|
8004332: 4770 bx lr
|
|
|
|
08004334 <lwip_htons>:
|
|
* @param n u16_t in host byte order
|
|
* @return n in network byte order
|
|
*/
|
|
u16_t
|
|
lwip_htons(u16_t n)
|
|
{
|
|
8004334: b480 push {r7}
|
|
8004336: b083 sub sp, #12
|
|
8004338: af00 add r7, sp, #0
|
|
800433a: 4603 mov r3, r0
|
|
800433c: 80fb strh r3, [r7, #6]
|
|
return PP_HTONS(n);
|
|
800433e: 88fb ldrh r3, [r7, #6]
|
|
8004340: 021b lsls r3, r3, #8
|
|
8004342: b21a sxth r2, r3
|
|
8004344: 88fb ldrh r3, [r7, #6]
|
|
8004346: 0a1b lsrs r3, r3, #8
|
|
8004348: b29b uxth r3, r3
|
|
800434a: b21b sxth r3, r3
|
|
800434c: 4313 orrs r3, r2
|
|
800434e: b21b sxth r3, r3
|
|
8004350: b29b uxth r3, r3
|
|
}
|
|
8004352: 4618 mov r0, r3
|
|
8004354: 370c adds r7, #12
|
|
8004356: 46bd mov sp, r7
|
|
8004358: f85d 7b04 ldr.w r7, [sp], #4
|
|
800435c: 4770 bx lr
|
|
|
|
0800435e <lwip_htonl>:
|
|
* @param n u32_t in host byte order
|
|
* @return n in network byte order
|
|
*/
|
|
u32_t
|
|
lwip_htonl(u32_t n)
|
|
{
|
|
800435e: b480 push {r7}
|
|
8004360: b083 sub sp, #12
|
|
8004362: af00 add r7, sp, #0
|
|
8004364: 6078 str r0, [r7, #4]
|
|
return PP_HTONL(n);
|
|
8004366: 687b ldr r3, [r7, #4]
|
|
8004368: 061a lsls r2, r3, #24
|
|
800436a: 687b ldr r3, [r7, #4]
|
|
800436c: 021b lsls r3, r3, #8
|
|
800436e: f403 037f and.w r3, r3, #16711680 ; 0xff0000
|
|
8004372: 431a orrs r2, r3
|
|
8004374: 687b ldr r3, [r7, #4]
|
|
8004376: 0a1b lsrs r3, r3, #8
|
|
8004378: f403 437f and.w r3, r3, #65280 ; 0xff00
|
|
800437c: 431a orrs r2, r3
|
|
800437e: 687b ldr r3, [r7, #4]
|
|
8004380: 0e1b lsrs r3, r3, #24
|
|
8004382: 4313 orrs r3, r2
|
|
}
|
|
8004384: 4618 mov r0, r3
|
|
8004386: 370c adds r7, #12
|
|
8004388: 46bd mov sp, r7
|
|
800438a: f85d 7b04 ldr.w r7, [sp], #4
|
|
800438e: 4770 bx lr
|
|
|
|
08004390 <lwip_init>:
|
|
* Initialize all modules.
|
|
* Use this in NO_SYS mode. Use tcpip_init() otherwise.
|
|
*/
|
|
void
|
|
lwip_init(void)
|
|
{
|
|
8004390: b580 push {r7, lr}
|
|
8004392: b082 sub sp, #8
|
|
8004394: af00 add r7, sp, #0
|
|
#ifndef LWIP_SKIP_CONST_CHECK
|
|
int a = 0;
|
|
8004396: 2300 movs r3, #0
|
|
8004398: 607b str r3, [r7, #4]
|
|
/* Modules initialization */
|
|
stats_init();
|
|
#if !NO_SYS
|
|
sys_init();
|
|
#endif /* !NO_SYS */
|
|
mem_init();
|
|
800439a: f000 f8d5 bl 8004548 <mem_init>
|
|
memp_init();
|
|
800439e: f000 fbdb bl 8004b58 <memp_init>
|
|
pbuf_init();
|
|
netif_init();
|
|
80043a2: f000 fcd9 bl 8004d58 <netif_init>
|
|
#endif /* LWIP_IPV4 */
|
|
#if LWIP_RAW
|
|
raw_init();
|
|
#endif /* LWIP_RAW */
|
|
#if LWIP_UDP
|
|
udp_init();
|
|
80043a6: f007 f873 bl 800b490 <udp_init>
|
|
#endif /* LWIP_UDP */
|
|
#if LWIP_TCP
|
|
tcp_init();
|
|
80043aa: f001 fdcb bl 8005f44 <tcp_init>
|
|
#if PPP_SUPPORT
|
|
ppp_init();
|
|
#endif
|
|
|
|
#if LWIP_TIMERS
|
|
sys_timeouts_init();
|
|
80043ae: f006 ffe5 bl 800b37c <sys_timeouts_init>
|
|
#endif /* LWIP_TIMERS */
|
|
}
|
|
80043b2: bf00 nop
|
|
80043b4: 3708 adds r7, #8
|
|
80043b6: 46bd mov sp, r7
|
|
80043b8: bd80 pop {r7, pc}
|
|
...
|
|
|
|
080043bc <ptr_to_mem>:
|
|
#define mem_overflow_check_element(mem)
|
|
#endif /* MEM_OVERFLOW_CHECK */
|
|
|
|
static struct mem *
|
|
ptr_to_mem(mem_size_t ptr)
|
|
{
|
|
80043bc: b480 push {r7}
|
|
80043be: b083 sub sp, #12
|
|
80043c0: af00 add r7, sp, #0
|
|
80043c2: 4603 mov r3, r0
|
|
80043c4: 80fb strh r3, [r7, #6]
|
|
return (struct mem *)(void *)&ram[ptr];
|
|
80043c6: 4b05 ldr r3, [pc, #20] ; (80043dc <ptr_to_mem+0x20>)
|
|
80043c8: 681a ldr r2, [r3, #0]
|
|
80043ca: 88fb ldrh r3, [r7, #6]
|
|
80043cc: 4413 add r3, r2
|
|
}
|
|
80043ce: 4618 mov r0, r3
|
|
80043d0: 370c adds r7, #12
|
|
80043d2: 46bd mov sp, r7
|
|
80043d4: f85d 7b04 ldr.w r7, [sp], #4
|
|
80043d8: 4770 bx lr
|
|
80043da: bf00 nop
|
|
80043dc: 20005cdc .word 0x20005cdc
|
|
|
|
080043e0 <mem_to_ptr>:
|
|
|
|
static mem_size_t
|
|
mem_to_ptr(void *mem)
|
|
{
|
|
80043e0: b480 push {r7}
|
|
80043e2: b083 sub sp, #12
|
|
80043e4: af00 add r7, sp, #0
|
|
80043e6: 6078 str r0, [r7, #4]
|
|
return (mem_size_t)((u8_t *)mem - ram);
|
|
80043e8: 4b05 ldr r3, [pc, #20] ; (8004400 <mem_to_ptr+0x20>)
|
|
80043ea: 681b ldr r3, [r3, #0]
|
|
80043ec: 687a ldr r2, [r7, #4]
|
|
80043ee: 1ad3 subs r3, r2, r3
|
|
80043f0: b29b uxth r3, r3
|
|
}
|
|
80043f2: 4618 mov r0, r3
|
|
80043f4: 370c adds r7, #12
|
|
80043f6: 46bd mov sp, r7
|
|
80043f8: f85d 7b04 ldr.w r7, [sp], #4
|
|
80043fc: 4770 bx lr
|
|
80043fe: bf00 nop
|
|
8004400: 20005cdc .word 0x20005cdc
|
|
|
|
08004404 <plug_holes>:
|
|
* This assumes access to the heap is protected by the calling function
|
|
* already.
|
|
*/
|
|
static void
|
|
plug_holes(struct mem *mem)
|
|
{
|
|
8004404: b590 push {r4, r7, lr}
|
|
8004406: b085 sub sp, #20
|
|
8004408: af00 add r7, sp, #0
|
|
800440a: 6078 str r0, [r7, #4]
|
|
struct mem *nmem;
|
|
struct mem *pmem;
|
|
|
|
LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram);
|
|
800440c: 4b45 ldr r3, [pc, #276] ; (8004524 <plug_holes+0x120>)
|
|
800440e: 681b ldr r3, [r3, #0]
|
|
8004410: 687a ldr r2, [r7, #4]
|
|
8004412: 429a cmp r2, r3
|
|
8004414: d206 bcs.n 8004424 <plug_holes+0x20>
|
|
8004416: 4b44 ldr r3, [pc, #272] ; (8004528 <plug_holes+0x124>)
|
|
8004418: f240 12df movw r2, #479 ; 0x1df
|
|
800441c: 4943 ldr r1, [pc, #268] ; (800452c <plug_holes+0x128>)
|
|
800441e: 4844 ldr r0, [pc, #272] ; (8004530 <plug_holes+0x12c>)
|
|
8004420: f00c f86a bl 80104f8 <printf>
|
|
LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end);
|
|
8004424: 4b43 ldr r3, [pc, #268] ; (8004534 <plug_holes+0x130>)
|
|
8004426: 681b ldr r3, [r3, #0]
|
|
8004428: 687a ldr r2, [r7, #4]
|
|
800442a: 429a cmp r2, r3
|
|
800442c: d306 bcc.n 800443c <plug_holes+0x38>
|
|
800442e: 4b3e ldr r3, [pc, #248] ; (8004528 <plug_holes+0x124>)
|
|
8004430: f44f 72f0 mov.w r2, #480 ; 0x1e0
|
|
8004434: 4940 ldr r1, [pc, #256] ; (8004538 <plug_holes+0x134>)
|
|
8004436: 483e ldr r0, [pc, #248] ; (8004530 <plug_holes+0x12c>)
|
|
8004438: f00c f85e bl 80104f8 <printf>
|
|
LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0);
|
|
800443c: 687b ldr r3, [r7, #4]
|
|
800443e: 791b ldrb r3, [r3, #4]
|
|
8004440: 2b00 cmp r3, #0
|
|
8004442: d006 beq.n 8004452 <plug_holes+0x4e>
|
|
8004444: 4b38 ldr r3, [pc, #224] ; (8004528 <plug_holes+0x124>)
|
|
8004446: f240 12e1 movw r2, #481 ; 0x1e1
|
|
800444a: 493c ldr r1, [pc, #240] ; (800453c <plug_holes+0x138>)
|
|
800444c: 4838 ldr r0, [pc, #224] ; (8004530 <plug_holes+0x12c>)
|
|
800444e: f00c f853 bl 80104f8 <printf>
|
|
|
|
/* plug hole forward */
|
|
LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED);
|
|
8004452: 687b ldr r3, [r7, #4]
|
|
8004454: 881b ldrh r3, [r3, #0]
|
|
8004456: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
|
|
800445a: d906 bls.n 800446a <plug_holes+0x66>
|
|
800445c: 4b32 ldr r3, [pc, #200] ; (8004528 <plug_holes+0x124>)
|
|
800445e: f44f 72f2 mov.w r2, #484 ; 0x1e4
|
|
8004462: 4937 ldr r1, [pc, #220] ; (8004540 <plug_holes+0x13c>)
|
|
8004464: 4832 ldr r0, [pc, #200] ; (8004530 <plug_holes+0x12c>)
|
|
8004466: f00c f847 bl 80104f8 <printf>
|
|
|
|
nmem = ptr_to_mem(mem->next);
|
|
800446a: 687b ldr r3, [r7, #4]
|
|
800446c: 881b ldrh r3, [r3, #0]
|
|
800446e: 4618 mov r0, r3
|
|
8004470: f7ff ffa4 bl 80043bc <ptr_to_mem>
|
|
8004474: 60f8 str r0, [r7, #12]
|
|
if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) {
|
|
8004476: 687a ldr r2, [r7, #4]
|
|
8004478: 68fb ldr r3, [r7, #12]
|
|
800447a: 429a cmp r2, r3
|
|
800447c: d024 beq.n 80044c8 <plug_holes+0xc4>
|
|
800447e: 68fb ldr r3, [r7, #12]
|
|
8004480: 791b ldrb r3, [r3, #4]
|
|
8004482: 2b00 cmp r3, #0
|
|
8004484: d120 bne.n 80044c8 <plug_holes+0xc4>
|
|
8004486: 4b2b ldr r3, [pc, #172] ; (8004534 <plug_holes+0x130>)
|
|
8004488: 681b ldr r3, [r3, #0]
|
|
800448a: 68fa ldr r2, [r7, #12]
|
|
800448c: 429a cmp r2, r3
|
|
800448e: d01b beq.n 80044c8 <plug_holes+0xc4>
|
|
/* if mem->next is unused and not end of ram, combine mem and mem->next */
|
|
if (lfree == nmem) {
|
|
8004490: 4b2c ldr r3, [pc, #176] ; (8004544 <plug_holes+0x140>)
|
|
8004492: 681b ldr r3, [r3, #0]
|
|
8004494: 68fa ldr r2, [r7, #12]
|
|
8004496: 429a cmp r2, r3
|
|
8004498: d102 bne.n 80044a0 <plug_holes+0x9c>
|
|
lfree = mem;
|
|
800449a: 4a2a ldr r2, [pc, #168] ; (8004544 <plug_holes+0x140>)
|
|
800449c: 687b ldr r3, [r7, #4]
|
|
800449e: 6013 str r3, [r2, #0]
|
|
}
|
|
mem->next = nmem->next;
|
|
80044a0: 68fb ldr r3, [r7, #12]
|
|
80044a2: 881a ldrh r2, [r3, #0]
|
|
80044a4: 687b ldr r3, [r7, #4]
|
|
80044a6: 801a strh r2, [r3, #0]
|
|
if (nmem->next != MEM_SIZE_ALIGNED) {
|
|
80044a8: 68fb ldr r3, [r7, #12]
|
|
80044aa: 881b ldrh r3, [r3, #0]
|
|
80044ac: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
|
|
80044b0: d00a beq.n 80044c8 <plug_holes+0xc4>
|
|
ptr_to_mem(nmem->next)->prev = mem_to_ptr(mem);
|
|
80044b2: 68fb ldr r3, [r7, #12]
|
|
80044b4: 881b ldrh r3, [r3, #0]
|
|
80044b6: 4618 mov r0, r3
|
|
80044b8: f7ff ff80 bl 80043bc <ptr_to_mem>
|
|
80044bc: 4604 mov r4, r0
|
|
80044be: 6878 ldr r0, [r7, #4]
|
|
80044c0: f7ff ff8e bl 80043e0 <mem_to_ptr>
|
|
80044c4: 4603 mov r3, r0
|
|
80044c6: 8063 strh r3, [r4, #2]
|
|
}
|
|
}
|
|
|
|
/* plug hole backward */
|
|
pmem = ptr_to_mem(mem->prev);
|
|
80044c8: 687b ldr r3, [r7, #4]
|
|
80044ca: 885b ldrh r3, [r3, #2]
|
|
80044cc: 4618 mov r0, r3
|
|
80044ce: f7ff ff75 bl 80043bc <ptr_to_mem>
|
|
80044d2: 60b8 str r0, [r7, #8]
|
|
if (pmem != mem && pmem->used == 0) {
|
|
80044d4: 68ba ldr r2, [r7, #8]
|
|
80044d6: 687b ldr r3, [r7, #4]
|
|
80044d8: 429a cmp r2, r3
|
|
80044da: d01f beq.n 800451c <plug_holes+0x118>
|
|
80044dc: 68bb ldr r3, [r7, #8]
|
|
80044de: 791b ldrb r3, [r3, #4]
|
|
80044e0: 2b00 cmp r3, #0
|
|
80044e2: d11b bne.n 800451c <plug_holes+0x118>
|
|
/* if mem->prev is unused, combine mem and mem->prev */
|
|
if (lfree == mem) {
|
|
80044e4: 4b17 ldr r3, [pc, #92] ; (8004544 <plug_holes+0x140>)
|
|
80044e6: 681b ldr r3, [r3, #0]
|
|
80044e8: 687a ldr r2, [r7, #4]
|
|
80044ea: 429a cmp r2, r3
|
|
80044ec: d102 bne.n 80044f4 <plug_holes+0xf0>
|
|
lfree = pmem;
|
|
80044ee: 4a15 ldr r2, [pc, #84] ; (8004544 <plug_holes+0x140>)
|
|
80044f0: 68bb ldr r3, [r7, #8]
|
|
80044f2: 6013 str r3, [r2, #0]
|
|
}
|
|
pmem->next = mem->next;
|
|
80044f4: 687b ldr r3, [r7, #4]
|
|
80044f6: 881a ldrh r2, [r3, #0]
|
|
80044f8: 68bb ldr r3, [r7, #8]
|
|
80044fa: 801a strh r2, [r3, #0]
|
|
if (mem->next != MEM_SIZE_ALIGNED) {
|
|
80044fc: 687b ldr r3, [r7, #4]
|
|
80044fe: 881b ldrh r3, [r3, #0]
|
|
8004500: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
|
|
8004504: d00a beq.n 800451c <plug_holes+0x118>
|
|
ptr_to_mem(mem->next)->prev = mem_to_ptr(pmem);
|
|
8004506: 687b ldr r3, [r7, #4]
|
|
8004508: 881b ldrh r3, [r3, #0]
|
|
800450a: 4618 mov r0, r3
|
|
800450c: f7ff ff56 bl 80043bc <ptr_to_mem>
|
|
8004510: 4604 mov r4, r0
|
|
8004512: 68b8 ldr r0, [r7, #8]
|
|
8004514: f7ff ff64 bl 80043e0 <mem_to_ptr>
|
|
8004518: 4603 mov r3, r0
|
|
800451a: 8063 strh r3, [r4, #2]
|
|
}
|
|
}
|
|
}
|
|
800451c: bf00 nop
|
|
800451e: 3714 adds r7, #20
|
|
8004520: 46bd mov sp, r7
|
|
8004522: bd90 pop {r4, r7, pc}
|
|
8004524: 20005cdc .word 0x20005cdc
|
|
8004528: 080150a4 .word 0x080150a4
|
|
800452c: 080150d4 .word 0x080150d4
|
|
8004530: 080150ec .word 0x080150ec
|
|
8004534: 20005ce0 .word 0x20005ce0
|
|
8004538: 08015114 .word 0x08015114
|
|
800453c: 08015130 .word 0x08015130
|
|
8004540: 0801514c .word 0x0801514c
|
|
8004544: 20005ce4 .word 0x20005ce4
|
|
|
|
08004548 <mem_init>:
|
|
/**
|
|
* Zero the heap and initialize start, end and lowest-free
|
|
*/
|
|
void
|
|
mem_init(void)
|
|
{
|
|
8004548: b580 push {r7, lr}
|
|
800454a: b082 sub sp, #8
|
|
800454c: 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);
|
|
800454e: 4b18 ldr r3, [pc, #96] ; (80045b0 <mem_init+0x68>)
|
|
8004550: 3303 adds r3, #3
|
|
8004552: f023 0303 bic.w r3, r3, #3
|
|
8004556: 461a mov r2, r3
|
|
8004558: 4b16 ldr r3, [pc, #88] ; (80045b4 <mem_init+0x6c>)
|
|
800455a: 601a str r2, [r3, #0]
|
|
/* initialize the start of the heap */
|
|
mem = (struct mem *)(void *)ram;
|
|
800455c: 4b15 ldr r3, [pc, #84] ; (80045b4 <mem_init+0x6c>)
|
|
800455e: 681b ldr r3, [r3, #0]
|
|
8004560: 607b str r3, [r7, #4]
|
|
mem->next = MEM_SIZE_ALIGNED;
|
|
8004562: 687b ldr r3, [r7, #4]
|
|
8004564: f44f 62c8 mov.w r2, #1600 ; 0x640
|
|
8004568: 801a strh r2, [r3, #0]
|
|
mem->prev = 0;
|
|
800456a: 687b ldr r3, [r7, #4]
|
|
800456c: 2200 movs r2, #0
|
|
800456e: 805a strh r2, [r3, #2]
|
|
mem->used = 0;
|
|
8004570: 687b ldr r3, [r7, #4]
|
|
8004572: 2200 movs r2, #0
|
|
8004574: 711a strb r2, [r3, #4]
|
|
/* initialize the end of the heap */
|
|
ram_end = ptr_to_mem(MEM_SIZE_ALIGNED);
|
|
8004576: f44f 60c8 mov.w r0, #1600 ; 0x640
|
|
800457a: f7ff ff1f bl 80043bc <ptr_to_mem>
|
|
800457e: 4603 mov r3, r0
|
|
8004580: 4a0d ldr r2, [pc, #52] ; (80045b8 <mem_init+0x70>)
|
|
8004582: 6013 str r3, [r2, #0]
|
|
ram_end->used = 1;
|
|
8004584: 4b0c ldr r3, [pc, #48] ; (80045b8 <mem_init+0x70>)
|
|
8004586: 681b ldr r3, [r3, #0]
|
|
8004588: 2201 movs r2, #1
|
|
800458a: 711a strb r2, [r3, #4]
|
|
ram_end->next = MEM_SIZE_ALIGNED;
|
|
800458c: 4b0a ldr r3, [pc, #40] ; (80045b8 <mem_init+0x70>)
|
|
800458e: 681b ldr r3, [r3, #0]
|
|
8004590: f44f 62c8 mov.w r2, #1600 ; 0x640
|
|
8004594: 801a strh r2, [r3, #0]
|
|
ram_end->prev = MEM_SIZE_ALIGNED;
|
|
8004596: 4b08 ldr r3, [pc, #32] ; (80045b8 <mem_init+0x70>)
|
|
8004598: 681b ldr r3, [r3, #0]
|
|
800459a: f44f 62c8 mov.w r2, #1600 ; 0x640
|
|
800459e: 805a strh r2, [r3, #2]
|
|
MEM_SANITY();
|
|
|
|
/* initialize the lowest-free pointer to the start of the heap */
|
|
lfree = (struct mem *)(void *)ram;
|
|
80045a0: 4b04 ldr r3, [pc, #16] ; (80045b4 <mem_init+0x6c>)
|
|
80045a2: 681b ldr r3, [r3, #0]
|
|
80045a4: 4a05 ldr r2, [pc, #20] ; (80045bc <mem_init+0x74>)
|
|
80045a6: 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);
|
|
}
|
|
}
|
|
80045a8: bf00 nop
|
|
80045aa: 3708 adds r7, #8
|
|
80045ac: 46bd mov sp, r7
|
|
80045ae: bd80 pop {r7, pc}
|
|
80045b0: 20005688 .word 0x20005688
|
|
80045b4: 20005cdc .word 0x20005cdc
|
|
80045b8: 20005ce0 .word 0x20005ce0
|
|
80045bc: 20005ce4 .word 0x20005ce4
|
|
|
|
080045c0 <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)
|
|
{
|
|
80045c0: b580 push {r7, lr}
|
|
80045c2: b086 sub sp, #24
|
|
80045c4: af00 add r7, sp, #0
|
|
80045c6: 6078 str r0, [r7, #4]
|
|
struct mem *nmem, *pmem;
|
|
mem_size_t rmem_idx;
|
|
rmem_idx = mem_to_ptr(mem);
|
|
80045c8: 6878 ldr r0, [r7, #4]
|
|
80045ca: f7ff ff09 bl 80043e0 <mem_to_ptr>
|
|
80045ce: 4603 mov r3, r0
|
|
80045d0: 82fb strh r3, [r7, #22]
|
|
nmem = ptr_to_mem(mem->next);
|
|
80045d2: 687b ldr r3, [r7, #4]
|
|
80045d4: 881b ldrh r3, [r3, #0]
|
|
80045d6: 4618 mov r0, r3
|
|
80045d8: f7ff fef0 bl 80043bc <ptr_to_mem>
|
|
80045dc: 6138 str r0, [r7, #16]
|
|
pmem = ptr_to_mem(mem->prev);
|
|
80045de: 687b ldr r3, [r7, #4]
|
|
80045e0: 885b ldrh r3, [r3, #2]
|
|
80045e2: 4618 mov r0, r3
|
|
80045e4: f7ff feea bl 80043bc <ptr_to_mem>
|
|
80045e8: 60f8 str r0, [r7, #12]
|
|
if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) ||
|
|
80045ea: 687b ldr r3, [r7, #4]
|
|
80045ec: 881b ldrh r3, [r3, #0]
|
|
80045ee: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
|
|
80045f2: d818 bhi.n 8004626 <mem_link_valid+0x66>
|
|
80045f4: 687b ldr r3, [r7, #4]
|
|
80045f6: 885b ldrh r3, [r3, #2]
|
|
80045f8: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
|
|
80045fc: d813 bhi.n 8004626 <mem_link_valid+0x66>
|
|
((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
|
|
80045fe: 687b ldr r3, [r7, #4]
|
|
8004600: 885b ldrh r3, [r3, #2]
|
|
if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) ||
|
|
8004602: 8afa ldrh r2, [r7, #22]
|
|
8004604: 429a cmp r2, r3
|
|
8004606: d004 beq.n 8004612 <mem_link_valid+0x52>
|
|
((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
|
|
8004608: 68fb ldr r3, [r7, #12]
|
|
800460a: 881b ldrh r3, [r3, #0]
|
|
800460c: 8afa ldrh r2, [r7, #22]
|
|
800460e: 429a cmp r2, r3
|
|
8004610: d109 bne.n 8004626 <mem_link_valid+0x66>
|
|
((nmem != ram_end) && (nmem->prev != rmem_idx))) {
|
|
8004612: 4b08 ldr r3, [pc, #32] ; (8004634 <mem_link_valid+0x74>)
|
|
8004614: 681b ldr r3, [r3, #0]
|
|
((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
|
|
8004616: 693a ldr r2, [r7, #16]
|
|
8004618: 429a cmp r2, r3
|
|
800461a: d006 beq.n 800462a <mem_link_valid+0x6a>
|
|
((nmem != ram_end) && (nmem->prev != rmem_idx))) {
|
|
800461c: 693b ldr r3, [r7, #16]
|
|
800461e: 885b ldrh r3, [r3, #2]
|
|
8004620: 8afa ldrh r2, [r7, #22]
|
|
8004622: 429a cmp r2, r3
|
|
8004624: d001 beq.n 800462a <mem_link_valid+0x6a>
|
|
return 0;
|
|
8004626: 2300 movs r3, #0
|
|
8004628: e000 b.n 800462c <mem_link_valid+0x6c>
|
|
}
|
|
return 1;
|
|
800462a: 2301 movs r3, #1
|
|
}
|
|
800462c: 4618 mov r0, r3
|
|
800462e: 3718 adds r7, #24
|
|
8004630: 46bd mov sp, r7
|
|
8004632: bd80 pop {r7, pc}
|
|
8004634: 20005ce0 .word 0x20005ce0
|
|
|
|
08004638 <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)
|
|
{
|
|
8004638: b580 push {r7, lr}
|
|
800463a: b084 sub sp, #16
|
|
800463c: af00 add r7, sp, #0
|
|
800463e: 6078 str r0, [r7, #4]
|
|
struct mem *mem;
|
|
LWIP_MEM_FREE_DECL_PROTECT();
|
|
|
|
if (rmem == NULL) {
|
|
8004640: 687b ldr r3, [r7, #4]
|
|
8004642: 2b00 cmp r3, #0
|
|
8004644: d04c beq.n 80046e0 <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) {
|
|
8004646: 687b ldr r3, [r7, #4]
|
|
8004648: f003 0303 and.w r3, r3, #3
|
|
800464c: 2b00 cmp r3, #0
|
|
800464e: d007 beq.n 8004660 <mem_free+0x28>
|
|
LWIP_MEM_ILLEGAL_FREE("mem_free: sanity check alignment");
|
|
8004650: 4b25 ldr r3, [pc, #148] ; (80046e8 <mem_free+0xb0>)
|
|
8004652: f240 2273 movw r2, #627 ; 0x273
|
|
8004656: 4925 ldr r1, [pc, #148] ; (80046ec <mem_free+0xb4>)
|
|
8004658: 4825 ldr r0, [pc, #148] ; (80046f0 <mem_free+0xb8>)
|
|
800465a: f00b ff4d bl 80104f8 <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;
|
|
800465e: e040 b.n 80046e2 <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));
|
|
8004660: 687b ldr r3, [r7, #4]
|
|
8004662: 3b08 subs r3, #8
|
|
8004664: 60fb str r3, [r7, #12]
|
|
|
|
if ((u8_t *)mem < ram || (u8_t *)rmem + MIN_SIZE_ALIGNED > (u8_t *)ram_end) {
|
|
8004666: 4b23 ldr r3, [pc, #140] ; (80046f4 <mem_free+0xbc>)
|
|
8004668: 681b ldr r3, [r3, #0]
|
|
800466a: 68fa ldr r2, [r7, #12]
|
|
800466c: 429a cmp r2, r3
|
|
800466e: d306 bcc.n 800467e <mem_free+0x46>
|
|
8004670: 687b ldr r3, [r7, #4]
|
|
8004672: f103 020c add.w r2, r3, #12
|
|
8004676: 4b20 ldr r3, [pc, #128] ; (80046f8 <mem_free+0xc0>)
|
|
8004678: 681b ldr r3, [r3, #0]
|
|
800467a: 429a cmp r2, r3
|
|
800467c: d907 bls.n 800468e <mem_free+0x56>
|
|
LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory");
|
|
800467e: 4b1a ldr r3, [pc, #104] ; (80046e8 <mem_free+0xb0>)
|
|
8004680: f240 227f movw r2, #639 ; 0x27f
|
|
8004684: 491d ldr r1, [pc, #116] ; (80046fc <mem_free+0xc4>)
|
|
8004686: 481a ldr r0, [pc, #104] ; (80046f0 <mem_free+0xb8>)
|
|
8004688: f00b ff36 bl 80104f8 <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;
|
|
800468c: e029 b.n 80046e2 <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) {
|
|
800468e: 68fb ldr r3, [r7, #12]
|
|
8004690: 791b ldrb r3, [r3, #4]
|
|
8004692: 2b00 cmp r3, #0
|
|
8004694: d107 bne.n 80046a6 <mem_free+0x6e>
|
|
LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: double free");
|
|
8004696: 4b14 ldr r3, [pc, #80] ; (80046e8 <mem_free+0xb0>)
|
|
8004698: f44f 7223 mov.w r2, #652 ; 0x28c
|
|
800469c: 4918 ldr r1, [pc, #96] ; (8004700 <mem_free+0xc8>)
|
|
800469e: 4814 ldr r0, [pc, #80] ; (80046f0 <mem_free+0xb8>)
|
|
80046a0: f00b ff2a bl 80104f8 <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;
|
|
80046a4: e01d b.n 80046e2 <mem_free+0xaa>
|
|
}
|
|
|
|
if (!mem_link_valid(mem)) {
|
|
80046a6: 68f8 ldr r0, [r7, #12]
|
|
80046a8: f7ff ff8a bl 80045c0 <mem_link_valid>
|
|
80046ac: 4603 mov r3, r0
|
|
80046ae: 2b00 cmp r3, #0
|
|
80046b0: d107 bne.n 80046c2 <mem_free+0x8a>
|
|
LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: non-linked: double free");
|
|
80046b2: 4b0d ldr r3, [pc, #52] ; (80046e8 <mem_free+0xb0>)
|
|
80046b4: f240 2295 movw r2, #661 ; 0x295
|
|
80046b8: 4912 ldr r1, [pc, #72] ; (8004704 <mem_free+0xcc>)
|
|
80046ba: 480d ldr r0, [pc, #52] ; (80046f0 <mem_free+0xb8>)
|
|
80046bc: f00b ff1c bl 80104f8 <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;
|
|
80046c0: e00f b.n 80046e2 <mem_free+0xaa>
|
|
}
|
|
|
|
/* mem is now unused. */
|
|
mem->used = 0;
|
|
80046c2: 68fb ldr r3, [r7, #12]
|
|
80046c4: 2200 movs r2, #0
|
|
80046c6: 711a strb r2, [r3, #4]
|
|
|
|
if (mem < lfree) {
|
|
80046c8: 4b0f ldr r3, [pc, #60] ; (8004708 <mem_free+0xd0>)
|
|
80046ca: 681b ldr r3, [r3, #0]
|
|
80046cc: 68fa ldr r2, [r7, #12]
|
|
80046ce: 429a cmp r2, r3
|
|
80046d0: d202 bcs.n 80046d8 <mem_free+0xa0>
|
|
/* the newly freed struct is now the lowest */
|
|
lfree = mem;
|
|
80046d2: 4a0d ldr r2, [pc, #52] ; (8004708 <mem_free+0xd0>)
|
|
80046d4: 68fb ldr r3, [r7, #12]
|
|
80046d6: 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);
|
|
80046d8: 68f8 ldr r0, [r7, #12]
|
|
80046da: f7ff fe93 bl 8004404 <plug_holes>
|
|
80046de: e000 b.n 80046e2 <mem_free+0xaa>
|
|
return;
|
|
80046e0: 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();
|
|
}
|
|
80046e2: 3710 adds r7, #16
|
|
80046e4: 46bd mov sp, r7
|
|
80046e6: bd80 pop {r7, pc}
|
|
80046e8: 080150a4 .word 0x080150a4
|
|
80046ec: 08015178 .word 0x08015178
|
|
80046f0: 080150ec .word 0x080150ec
|
|
80046f4: 20005cdc .word 0x20005cdc
|
|
80046f8: 20005ce0 .word 0x20005ce0
|
|
80046fc: 0801519c .word 0x0801519c
|
|
8004700: 080151b8 .word 0x080151b8
|
|
8004704: 080151e0 .word 0x080151e0
|
|
8004708: 20005ce4 .word 0x20005ce4
|
|
|
|
0800470c <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)
|
|
{
|
|
800470c: b580 push {r7, lr}
|
|
800470e: b088 sub sp, #32
|
|
8004710: af00 add r7, sp, #0
|
|
8004712: 6078 str r0, [r7, #4]
|
|
8004714: 460b mov r3, r1
|
|
8004716: 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);
|
|
8004718: 887b ldrh r3, [r7, #2]
|
|
800471a: 3303 adds r3, #3
|
|
800471c: b29b uxth r3, r3
|
|
800471e: f023 0303 bic.w r3, r3, #3
|
|
8004722: 83fb strh r3, [r7, #30]
|
|
if (newsize < MIN_SIZE_ALIGNED) {
|
|
8004724: 8bfb ldrh r3, [r7, #30]
|
|
8004726: 2b0b cmp r3, #11
|
|
8004728: d801 bhi.n 800472e <mem_trim+0x22>
|
|
/* every data block must be at least MIN_SIZE_ALIGNED long */
|
|
newsize = MIN_SIZE_ALIGNED;
|
|
800472a: 230c movs r3, #12
|
|
800472c: 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)) {
|
|
800472e: 8bfb ldrh r3, [r7, #30]
|
|
8004730: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
|
|
8004734: d803 bhi.n 800473e <mem_trim+0x32>
|
|
8004736: 8bfa ldrh r2, [r7, #30]
|
|
8004738: 887b ldrh r3, [r7, #2]
|
|
800473a: 429a cmp r2, r3
|
|
800473c: d201 bcs.n 8004742 <mem_trim+0x36>
|
|
return NULL;
|
|
800473e: 2300 movs r3, #0
|
|
8004740: e0cc b.n 80048dc <mem_trim+0x1d0>
|
|
}
|
|
|
|
LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram &&
|
|
8004742: 4b68 ldr r3, [pc, #416] ; (80048e4 <mem_trim+0x1d8>)
|
|
8004744: 681b ldr r3, [r3, #0]
|
|
8004746: 687a ldr r2, [r7, #4]
|
|
8004748: 429a cmp r2, r3
|
|
800474a: d304 bcc.n 8004756 <mem_trim+0x4a>
|
|
800474c: 4b66 ldr r3, [pc, #408] ; (80048e8 <mem_trim+0x1dc>)
|
|
800474e: 681b ldr r3, [r3, #0]
|
|
8004750: 687a ldr r2, [r7, #4]
|
|
8004752: 429a cmp r2, r3
|
|
8004754: d306 bcc.n 8004764 <mem_trim+0x58>
|
|
8004756: 4b65 ldr r3, [pc, #404] ; (80048ec <mem_trim+0x1e0>)
|
|
8004758: f240 22d1 movw r2, #721 ; 0x2d1
|
|
800475c: 4964 ldr r1, [pc, #400] ; (80048f0 <mem_trim+0x1e4>)
|
|
800475e: 4865 ldr r0, [pc, #404] ; (80048f4 <mem_trim+0x1e8>)
|
|
8004760: f00b feca bl 80104f8 <printf>
|
|
(u8_t *)rmem < (u8_t *)ram_end);
|
|
|
|
if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) {
|
|
8004764: 4b5f ldr r3, [pc, #380] ; (80048e4 <mem_trim+0x1d8>)
|
|
8004766: 681b ldr r3, [r3, #0]
|
|
8004768: 687a ldr r2, [r7, #4]
|
|
800476a: 429a cmp r2, r3
|
|
800476c: d304 bcc.n 8004778 <mem_trim+0x6c>
|
|
800476e: 4b5e ldr r3, [pc, #376] ; (80048e8 <mem_trim+0x1dc>)
|
|
8004770: 681b ldr r3, [r3, #0]
|
|
8004772: 687a ldr r2, [r7, #4]
|
|
8004774: 429a cmp r2, r3
|
|
8004776: d301 bcc.n 800477c <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;
|
|
8004778: 687b ldr r3, [r7, #4]
|
|
800477a: e0af b.n 80048dc <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));
|
|
800477c: 687b ldr r3, [r7, #4]
|
|
800477e: 3b08 subs r3, #8
|
|
8004780: 61bb str r3, [r7, #24]
|
|
#if MEM_OVERFLOW_CHECK
|
|
mem_overflow_check_element(mem);
|
|
#endif
|
|
/* ... and its offset pointer */
|
|
ptr = mem_to_ptr(mem);
|
|
8004782: 69b8 ldr r0, [r7, #24]
|
|
8004784: f7ff fe2c bl 80043e0 <mem_to_ptr>
|
|
8004788: 4603 mov r3, r0
|
|
800478a: 82fb strh r3, [r7, #22]
|
|
|
|
size = (mem_size_t)((mem_size_t)(mem->next - ptr) - (SIZEOF_STRUCT_MEM + MEM_SANITY_OVERHEAD));
|
|
800478c: 69bb ldr r3, [r7, #24]
|
|
800478e: 881a ldrh r2, [r3, #0]
|
|
8004790: 8afb ldrh r3, [r7, #22]
|
|
8004792: 1ad3 subs r3, r2, r3
|
|
8004794: b29b uxth r3, r3
|
|
8004796: 3b08 subs r3, #8
|
|
8004798: 82bb strh r3, [r7, #20]
|
|
LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size);
|
|
800479a: 8bfa ldrh r2, [r7, #30]
|
|
800479c: 8abb ldrh r3, [r7, #20]
|
|
800479e: 429a cmp r2, r3
|
|
80047a0: d906 bls.n 80047b0 <mem_trim+0xa4>
|
|
80047a2: 4b52 ldr r3, [pc, #328] ; (80048ec <mem_trim+0x1e0>)
|
|
80047a4: f44f 7239 mov.w r2, #740 ; 0x2e4
|
|
80047a8: 4953 ldr r1, [pc, #332] ; (80048f8 <mem_trim+0x1ec>)
|
|
80047aa: 4852 ldr r0, [pc, #328] ; (80048f4 <mem_trim+0x1e8>)
|
|
80047ac: f00b fea4 bl 80104f8 <printf>
|
|
if (newsize > size) {
|
|
80047b0: 8bfa ldrh r2, [r7, #30]
|
|
80047b2: 8abb ldrh r3, [r7, #20]
|
|
80047b4: 429a cmp r2, r3
|
|
80047b6: d901 bls.n 80047bc <mem_trim+0xb0>
|
|
/* not supported */
|
|
return NULL;
|
|
80047b8: 2300 movs r3, #0
|
|
80047ba: e08f b.n 80048dc <mem_trim+0x1d0>
|
|
}
|
|
if (newsize == size) {
|
|
80047bc: 8bfa ldrh r2, [r7, #30]
|
|
80047be: 8abb ldrh r3, [r7, #20]
|
|
80047c0: 429a cmp r2, r3
|
|
80047c2: d101 bne.n 80047c8 <mem_trim+0xbc>
|
|
/* No change in size, simply return */
|
|
return rmem;
|
|
80047c4: 687b ldr r3, [r7, #4]
|
|
80047c6: e089 b.n 80048dc <mem_trim+0x1d0>
|
|
}
|
|
|
|
/* protect the heap from concurrent access */
|
|
LWIP_MEM_FREE_PROTECT();
|
|
|
|
mem2 = ptr_to_mem(mem->next);
|
|
80047c8: 69bb ldr r3, [r7, #24]
|
|
80047ca: 881b ldrh r3, [r3, #0]
|
|
80047cc: 4618 mov r0, r3
|
|
80047ce: f7ff fdf5 bl 80043bc <ptr_to_mem>
|
|
80047d2: 6138 str r0, [r7, #16]
|
|
if (mem2->used == 0) {
|
|
80047d4: 693b ldr r3, [r7, #16]
|
|
80047d6: 791b ldrb r3, [r3, #4]
|
|
80047d8: 2b00 cmp r3, #0
|
|
80047da: d13f bne.n 800485c <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);
|
|
80047dc: 69bb ldr r3, [r7, #24]
|
|
80047de: 881b ldrh r3, [r3, #0]
|
|
80047e0: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
|
|
80047e4: d106 bne.n 80047f4 <mem_trim+0xe8>
|
|
80047e6: 4b41 ldr r3, [pc, #260] ; (80048ec <mem_trim+0x1e0>)
|
|
80047e8: f240 22f5 movw r2, #757 ; 0x2f5
|
|
80047ec: 4943 ldr r1, [pc, #268] ; (80048fc <mem_trim+0x1f0>)
|
|
80047ee: 4841 ldr r0, [pc, #260] ; (80048f4 <mem_trim+0x1e8>)
|
|
80047f0: f00b fe82 bl 80104f8 <printf>
|
|
/* remember the old next pointer */
|
|
next = mem2->next;
|
|
80047f4: 693b ldr r3, [r7, #16]
|
|
80047f6: 881b ldrh r3, [r3, #0]
|
|
80047f8: 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);
|
|
80047fa: 8afa ldrh r2, [r7, #22]
|
|
80047fc: 8bfb ldrh r3, [r7, #30]
|
|
80047fe: 4413 add r3, r2
|
|
8004800: b29b uxth r3, r3
|
|
8004802: 3308 adds r3, #8
|
|
8004804: 81fb strh r3, [r7, #14]
|
|
if (lfree == mem2) {
|
|
8004806: 4b3e ldr r3, [pc, #248] ; (8004900 <mem_trim+0x1f4>)
|
|
8004808: 681b ldr r3, [r3, #0]
|
|
800480a: 693a ldr r2, [r7, #16]
|
|
800480c: 429a cmp r2, r3
|
|
800480e: d106 bne.n 800481e <mem_trim+0x112>
|
|
lfree = ptr_to_mem(ptr2);
|
|
8004810: 89fb ldrh r3, [r7, #14]
|
|
8004812: 4618 mov r0, r3
|
|
8004814: f7ff fdd2 bl 80043bc <ptr_to_mem>
|
|
8004818: 4603 mov r3, r0
|
|
800481a: 4a39 ldr r2, [pc, #228] ; (8004900 <mem_trim+0x1f4>)
|
|
800481c: 6013 str r3, [r2, #0]
|
|
}
|
|
mem2 = ptr_to_mem(ptr2);
|
|
800481e: 89fb ldrh r3, [r7, #14]
|
|
8004820: 4618 mov r0, r3
|
|
8004822: f7ff fdcb bl 80043bc <ptr_to_mem>
|
|
8004826: 6138 str r0, [r7, #16]
|
|
mem2->used = 0;
|
|
8004828: 693b ldr r3, [r7, #16]
|
|
800482a: 2200 movs r2, #0
|
|
800482c: 711a strb r2, [r3, #4]
|
|
/* restore the next pointer */
|
|
mem2->next = next;
|
|
800482e: 693b ldr r3, [r7, #16]
|
|
8004830: 89ba ldrh r2, [r7, #12]
|
|
8004832: 801a strh r2, [r3, #0]
|
|
/* link it back to mem */
|
|
mem2->prev = ptr;
|
|
8004834: 693b ldr r3, [r7, #16]
|
|
8004836: 8afa ldrh r2, [r7, #22]
|
|
8004838: 805a strh r2, [r3, #2]
|
|
/* link mem to it */
|
|
mem->next = ptr2;
|
|
800483a: 69bb ldr r3, [r7, #24]
|
|
800483c: 89fa ldrh r2, [r7, #14]
|
|
800483e: 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) {
|
|
8004840: 693b ldr r3, [r7, #16]
|
|
8004842: 881b ldrh r3, [r3, #0]
|
|
8004844: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
|
|
8004848: d047 beq.n 80048da <mem_trim+0x1ce>
|
|
ptr_to_mem(mem2->next)->prev = ptr2;
|
|
800484a: 693b ldr r3, [r7, #16]
|
|
800484c: 881b ldrh r3, [r3, #0]
|
|
800484e: 4618 mov r0, r3
|
|
8004850: f7ff fdb4 bl 80043bc <ptr_to_mem>
|
|
8004854: 4602 mov r2, r0
|
|
8004856: 89fb ldrh r3, [r7, #14]
|
|
8004858: 8053 strh r3, [r2, #2]
|
|
800485a: e03e b.n 80048da <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) {
|
|
800485c: 8bfb ldrh r3, [r7, #30]
|
|
800485e: f103 0214 add.w r2, r3, #20
|
|
8004862: 8abb ldrh r3, [r7, #20]
|
|
8004864: 429a cmp r2, r3
|
|
8004866: d838 bhi.n 80048da <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);
|
|
8004868: 8afa ldrh r2, [r7, #22]
|
|
800486a: 8bfb ldrh r3, [r7, #30]
|
|
800486c: 4413 add r3, r2
|
|
800486e: b29b uxth r3, r3
|
|
8004870: 3308 adds r3, #8
|
|
8004872: 81fb strh r3, [r7, #14]
|
|
LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED);
|
|
8004874: 69bb ldr r3, [r7, #24]
|
|
8004876: 881b ldrh r3, [r3, #0]
|
|
8004878: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
|
|
800487c: d106 bne.n 800488c <mem_trim+0x180>
|
|
800487e: 4b1b ldr r3, [pc, #108] ; (80048ec <mem_trim+0x1e0>)
|
|
8004880: f240 3216 movw r2, #790 ; 0x316
|
|
8004884: 491d ldr r1, [pc, #116] ; (80048fc <mem_trim+0x1f0>)
|
|
8004886: 481b ldr r0, [pc, #108] ; (80048f4 <mem_trim+0x1e8>)
|
|
8004888: f00b fe36 bl 80104f8 <printf>
|
|
mem2 = ptr_to_mem(ptr2);
|
|
800488c: 89fb ldrh r3, [r7, #14]
|
|
800488e: 4618 mov r0, r3
|
|
8004890: f7ff fd94 bl 80043bc <ptr_to_mem>
|
|
8004894: 6138 str r0, [r7, #16]
|
|
if (mem2 < lfree) {
|
|
8004896: 4b1a ldr r3, [pc, #104] ; (8004900 <mem_trim+0x1f4>)
|
|
8004898: 681b ldr r3, [r3, #0]
|
|
800489a: 693a ldr r2, [r7, #16]
|
|
800489c: 429a cmp r2, r3
|
|
800489e: d202 bcs.n 80048a6 <mem_trim+0x19a>
|
|
lfree = mem2;
|
|
80048a0: 4a17 ldr r2, [pc, #92] ; (8004900 <mem_trim+0x1f4>)
|
|
80048a2: 693b ldr r3, [r7, #16]
|
|
80048a4: 6013 str r3, [r2, #0]
|
|
}
|
|
mem2->used = 0;
|
|
80048a6: 693b ldr r3, [r7, #16]
|
|
80048a8: 2200 movs r2, #0
|
|
80048aa: 711a strb r2, [r3, #4]
|
|
mem2->next = mem->next;
|
|
80048ac: 69bb ldr r3, [r7, #24]
|
|
80048ae: 881a ldrh r2, [r3, #0]
|
|
80048b0: 693b ldr r3, [r7, #16]
|
|
80048b2: 801a strh r2, [r3, #0]
|
|
mem2->prev = ptr;
|
|
80048b4: 693b ldr r3, [r7, #16]
|
|
80048b6: 8afa ldrh r2, [r7, #22]
|
|
80048b8: 805a strh r2, [r3, #2]
|
|
mem->next = ptr2;
|
|
80048ba: 69bb ldr r3, [r7, #24]
|
|
80048bc: 89fa ldrh r2, [r7, #14]
|
|
80048be: 801a strh r2, [r3, #0]
|
|
if (mem2->next != MEM_SIZE_ALIGNED) {
|
|
80048c0: 693b ldr r3, [r7, #16]
|
|
80048c2: 881b ldrh r3, [r3, #0]
|
|
80048c4: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
|
|
80048c8: d007 beq.n 80048da <mem_trim+0x1ce>
|
|
ptr_to_mem(mem2->next)->prev = ptr2;
|
|
80048ca: 693b ldr r3, [r7, #16]
|
|
80048cc: 881b ldrh r3, [r3, #0]
|
|
80048ce: 4618 mov r0, r3
|
|
80048d0: f7ff fd74 bl 80043bc <ptr_to_mem>
|
|
80048d4: 4602 mov r2, r0
|
|
80048d6: 89fb ldrh r3, [r7, #14]
|
|
80048d8: 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;
|
|
80048da: 687b ldr r3, [r7, #4]
|
|
}
|
|
80048dc: 4618 mov r0, r3
|
|
80048de: 3720 adds r7, #32
|
|
80048e0: 46bd mov sp, r7
|
|
80048e2: bd80 pop {r7, pc}
|
|
80048e4: 20005cdc .word 0x20005cdc
|
|
80048e8: 20005ce0 .word 0x20005ce0
|
|
80048ec: 080150a4 .word 0x080150a4
|
|
80048f0: 08015214 .word 0x08015214
|
|
80048f4: 080150ec .word 0x080150ec
|
|
80048f8: 0801522c .word 0x0801522c
|
|
80048fc: 0801524c .word 0x0801524c
|
|
8004900: 20005ce4 .word 0x20005ce4
|
|
|
|
08004904 <mem_malloc>:
|
|
*
|
|
* Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT).
|
|
*/
|
|
void *
|
|
mem_malloc(mem_size_t size_in)
|
|
{
|
|
8004904: b580 push {r7, lr}
|
|
8004906: b088 sub sp, #32
|
|
8004908: af00 add r7, sp, #0
|
|
800490a: 4603 mov r3, r0
|
|
800490c: 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) {
|
|
800490e: 88fb ldrh r3, [r7, #6]
|
|
8004910: 2b00 cmp r3, #0
|
|
8004912: d101 bne.n 8004918 <mem_malloc+0x14>
|
|
return NULL;
|
|
8004914: 2300 movs r3, #0
|
|
8004916: e0d9 b.n 8004acc <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);
|
|
8004918: 88fb ldrh r3, [r7, #6]
|
|
800491a: 3303 adds r3, #3
|
|
800491c: b29b uxth r3, r3
|
|
800491e: f023 0303 bic.w r3, r3, #3
|
|
8004922: 83bb strh r3, [r7, #28]
|
|
if (size < MIN_SIZE_ALIGNED) {
|
|
8004924: 8bbb ldrh r3, [r7, #28]
|
|
8004926: 2b0b cmp r3, #11
|
|
8004928: d801 bhi.n 800492e <mem_malloc+0x2a>
|
|
/* every data block must be at least MIN_SIZE_ALIGNED long */
|
|
size = MIN_SIZE_ALIGNED;
|
|
800492a: 230c movs r3, #12
|
|
800492c: 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)) {
|
|
800492e: 8bbb ldrh r3, [r7, #28]
|
|
8004930: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
|
|
8004934: d803 bhi.n 800493e <mem_malloc+0x3a>
|
|
8004936: 8bba ldrh r2, [r7, #28]
|
|
8004938: 88fb ldrh r3, [r7, #6]
|
|
800493a: 429a cmp r2, r3
|
|
800493c: d201 bcs.n 8004942 <mem_malloc+0x3e>
|
|
return NULL;
|
|
800493e: 2300 movs r3, #0
|
|
8004940: e0c4 b.n 8004acc <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;
|
|
8004942: 4b64 ldr r3, [pc, #400] ; (8004ad4 <mem_malloc+0x1d0>)
|
|
8004944: 681b ldr r3, [r3, #0]
|
|
8004946: 4618 mov r0, r3
|
|
8004948: f7ff fd4a bl 80043e0 <mem_to_ptr>
|
|
800494c: 4603 mov r3, r0
|
|
800494e: 83fb strh r3, [r7, #30]
|
|
8004950: e0b4 b.n 8004abc <mem_malloc+0x1b8>
|
|
ptr = ptr_to_mem(ptr)->next) {
|
|
mem = ptr_to_mem(ptr);
|
|
8004952: 8bfb ldrh r3, [r7, #30]
|
|
8004954: 4618 mov r0, r3
|
|
8004956: f7ff fd31 bl 80043bc <ptr_to_mem>
|
|
800495a: 6178 str r0, [r7, #20]
|
|
local_mem_free_count = 1;
|
|
break;
|
|
}
|
|
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
|
|
|
|
if ((!mem->used) &&
|
|
800495c: 697b ldr r3, [r7, #20]
|
|
800495e: 791b ldrb r3, [r3, #4]
|
|
8004960: 2b00 cmp r3, #0
|
|
8004962: f040 80a4 bne.w 8004aae <mem_malloc+0x1aa>
|
|
(mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) {
|
|
8004966: 697b ldr r3, [r7, #20]
|
|
8004968: 881b ldrh r3, [r3, #0]
|
|
800496a: 461a mov r2, r3
|
|
800496c: 8bfb ldrh r3, [r7, #30]
|
|
800496e: 1ad3 subs r3, r2, r3
|
|
8004970: f1a3 0208 sub.w r2, r3, #8
|
|
8004974: 8bbb ldrh r3, [r7, #28]
|
|
if ((!mem->used) &&
|
|
8004976: 429a cmp r2, r3
|
|
8004978: f0c0 8099 bcc.w 8004aae <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)) {
|
|
800497c: 697b ldr r3, [r7, #20]
|
|
800497e: 881b ldrh r3, [r3, #0]
|
|
8004980: 461a mov r2, r3
|
|
8004982: 8bfb ldrh r3, [r7, #30]
|
|
8004984: 1ad3 subs r3, r2, r3
|
|
8004986: f1a3 0208 sub.w r2, r3, #8
|
|
800498a: 8bbb ldrh r3, [r7, #28]
|
|
800498c: 3314 adds r3, #20
|
|
800498e: 429a cmp r2, r3
|
|
8004990: d333 bcc.n 80049fa <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);
|
|
8004992: 8bfa ldrh r2, [r7, #30]
|
|
8004994: 8bbb ldrh r3, [r7, #28]
|
|
8004996: 4413 add r3, r2
|
|
8004998: b29b uxth r3, r3
|
|
800499a: 3308 adds r3, #8
|
|
800499c: 827b strh r3, [r7, #18]
|
|
LWIP_ASSERT("invalid next ptr",ptr2 != MEM_SIZE_ALIGNED);
|
|
800499e: 8a7b ldrh r3, [r7, #18]
|
|
80049a0: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
|
|
80049a4: d106 bne.n 80049b4 <mem_malloc+0xb0>
|
|
80049a6: 4b4c ldr r3, [pc, #304] ; (8004ad8 <mem_malloc+0x1d4>)
|
|
80049a8: f240 3287 movw r2, #903 ; 0x387
|
|
80049ac: 494b ldr r1, [pc, #300] ; (8004adc <mem_malloc+0x1d8>)
|
|
80049ae: 484c ldr r0, [pc, #304] ; (8004ae0 <mem_malloc+0x1dc>)
|
|
80049b0: f00b fda2 bl 80104f8 <printf>
|
|
/* create mem2 struct */
|
|
mem2 = ptr_to_mem(ptr2);
|
|
80049b4: 8a7b ldrh r3, [r7, #18]
|
|
80049b6: 4618 mov r0, r3
|
|
80049b8: f7ff fd00 bl 80043bc <ptr_to_mem>
|
|
80049bc: 60f8 str r0, [r7, #12]
|
|
mem2->used = 0;
|
|
80049be: 68fb ldr r3, [r7, #12]
|
|
80049c0: 2200 movs r2, #0
|
|
80049c2: 711a strb r2, [r3, #4]
|
|
mem2->next = mem->next;
|
|
80049c4: 697b ldr r3, [r7, #20]
|
|
80049c6: 881a ldrh r2, [r3, #0]
|
|
80049c8: 68fb ldr r3, [r7, #12]
|
|
80049ca: 801a strh r2, [r3, #0]
|
|
mem2->prev = ptr;
|
|
80049cc: 68fb ldr r3, [r7, #12]
|
|
80049ce: 8bfa ldrh r2, [r7, #30]
|
|
80049d0: 805a strh r2, [r3, #2]
|
|
/* and insert it between mem and mem->next */
|
|
mem->next = ptr2;
|
|
80049d2: 697b ldr r3, [r7, #20]
|
|
80049d4: 8a7a ldrh r2, [r7, #18]
|
|
80049d6: 801a strh r2, [r3, #0]
|
|
mem->used = 1;
|
|
80049d8: 697b ldr r3, [r7, #20]
|
|
80049da: 2201 movs r2, #1
|
|
80049dc: 711a strb r2, [r3, #4]
|
|
|
|
if (mem2->next != MEM_SIZE_ALIGNED) {
|
|
80049de: 68fb ldr r3, [r7, #12]
|
|
80049e0: 881b ldrh r3, [r3, #0]
|
|
80049e2: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
|
|
80049e6: d00b beq.n 8004a00 <mem_malloc+0xfc>
|
|
ptr_to_mem(mem2->next)->prev = ptr2;
|
|
80049e8: 68fb ldr r3, [r7, #12]
|
|
80049ea: 881b ldrh r3, [r3, #0]
|
|
80049ec: 4618 mov r0, r3
|
|
80049ee: f7ff fce5 bl 80043bc <ptr_to_mem>
|
|
80049f2: 4602 mov r2, r0
|
|
80049f4: 8a7b ldrh r3, [r7, #18]
|
|
80049f6: 8053 strh r3, [r2, #2]
|
|
80049f8: e002 b.n 8004a00 <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;
|
|
80049fa: 697b ldr r3, [r7, #20]
|
|
80049fc: 2201 movs r2, #1
|
|
80049fe: 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) {
|
|
8004a00: 4b34 ldr r3, [pc, #208] ; (8004ad4 <mem_malloc+0x1d0>)
|
|
8004a02: 681b ldr r3, [r3, #0]
|
|
8004a04: 697a ldr r2, [r7, #20]
|
|
8004a06: 429a cmp r2, r3
|
|
8004a08: d127 bne.n 8004a5a <mem_malloc+0x156>
|
|
struct mem *cur = lfree;
|
|
8004a0a: 4b32 ldr r3, [pc, #200] ; (8004ad4 <mem_malloc+0x1d0>)
|
|
8004a0c: 681b ldr r3, [r3, #0]
|
|
8004a0e: 61bb str r3, [r7, #24]
|
|
/* Find next free block after mem and update lowest free pointer */
|
|
while (cur->used && cur != ram_end) {
|
|
8004a10: e005 b.n 8004a1e <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);
|
|
8004a12: 69bb ldr r3, [r7, #24]
|
|
8004a14: 881b ldrh r3, [r3, #0]
|
|
8004a16: 4618 mov r0, r3
|
|
8004a18: f7ff fcd0 bl 80043bc <ptr_to_mem>
|
|
8004a1c: 61b8 str r0, [r7, #24]
|
|
while (cur->used && cur != ram_end) {
|
|
8004a1e: 69bb ldr r3, [r7, #24]
|
|
8004a20: 791b ldrb r3, [r3, #4]
|
|
8004a22: 2b00 cmp r3, #0
|
|
8004a24: d004 beq.n 8004a30 <mem_malloc+0x12c>
|
|
8004a26: 4b2f ldr r3, [pc, #188] ; (8004ae4 <mem_malloc+0x1e0>)
|
|
8004a28: 681b ldr r3, [r3, #0]
|
|
8004a2a: 69ba ldr r2, [r7, #24]
|
|
8004a2c: 429a cmp r2, r3
|
|
8004a2e: d1f0 bne.n 8004a12 <mem_malloc+0x10e>
|
|
}
|
|
lfree = cur;
|
|
8004a30: 4a28 ldr r2, [pc, #160] ; (8004ad4 <mem_malloc+0x1d0>)
|
|
8004a32: 69bb ldr r3, [r7, #24]
|
|
8004a34: 6013 str r3, [r2, #0]
|
|
LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used)));
|
|
8004a36: 4b27 ldr r3, [pc, #156] ; (8004ad4 <mem_malloc+0x1d0>)
|
|
8004a38: 681a ldr r2, [r3, #0]
|
|
8004a3a: 4b2a ldr r3, [pc, #168] ; (8004ae4 <mem_malloc+0x1e0>)
|
|
8004a3c: 681b ldr r3, [r3, #0]
|
|
8004a3e: 429a cmp r2, r3
|
|
8004a40: d00b beq.n 8004a5a <mem_malloc+0x156>
|
|
8004a42: 4b24 ldr r3, [pc, #144] ; (8004ad4 <mem_malloc+0x1d0>)
|
|
8004a44: 681b ldr r3, [r3, #0]
|
|
8004a46: 791b ldrb r3, [r3, #4]
|
|
8004a48: 2b00 cmp r3, #0
|
|
8004a4a: d006 beq.n 8004a5a <mem_malloc+0x156>
|
|
8004a4c: 4b22 ldr r3, [pc, #136] ; (8004ad8 <mem_malloc+0x1d4>)
|
|
8004a4e: f240 32b5 movw r2, #949 ; 0x3b5
|
|
8004a52: 4925 ldr r1, [pc, #148] ; (8004ae8 <mem_malloc+0x1e4>)
|
|
8004a54: 4822 ldr r0, [pc, #136] ; (8004ae0 <mem_malloc+0x1dc>)
|
|
8004a56: f00b fd4f bl 80104f8 <printf>
|
|
}
|
|
LWIP_MEM_ALLOC_UNPROTECT();
|
|
sys_mutex_unlock(&mem_mutex);
|
|
LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.",
|
|
8004a5a: 8bba ldrh r2, [r7, #28]
|
|
8004a5c: 697b ldr r3, [r7, #20]
|
|
8004a5e: 4413 add r3, r2
|
|
8004a60: 3308 adds r3, #8
|
|
8004a62: 4a20 ldr r2, [pc, #128] ; (8004ae4 <mem_malloc+0x1e0>)
|
|
8004a64: 6812 ldr r2, [r2, #0]
|
|
8004a66: 4293 cmp r3, r2
|
|
8004a68: d906 bls.n 8004a78 <mem_malloc+0x174>
|
|
8004a6a: 4b1b ldr r3, [pc, #108] ; (8004ad8 <mem_malloc+0x1d4>)
|
|
8004a6c: f240 32b9 movw r2, #953 ; 0x3b9
|
|
8004a70: 491e ldr r1, [pc, #120] ; (8004aec <mem_malloc+0x1e8>)
|
|
8004a72: 481b ldr r0, [pc, #108] ; (8004ae0 <mem_malloc+0x1dc>)
|
|
8004a74: f00b fd40 bl 80104f8 <printf>
|
|
(mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end);
|
|
LWIP_ASSERT("mem_malloc: allocated memory properly aligned.",
|
|
8004a78: 697b ldr r3, [r7, #20]
|
|
8004a7a: f003 0303 and.w r3, r3, #3
|
|
8004a7e: 2b00 cmp r3, #0
|
|
8004a80: d006 beq.n 8004a90 <mem_malloc+0x18c>
|
|
8004a82: 4b15 ldr r3, [pc, #84] ; (8004ad8 <mem_malloc+0x1d4>)
|
|
8004a84: f240 32bb movw r2, #955 ; 0x3bb
|
|
8004a88: 4919 ldr r1, [pc, #100] ; (8004af0 <mem_malloc+0x1ec>)
|
|
8004a8a: 4815 ldr r0, [pc, #84] ; (8004ae0 <mem_malloc+0x1dc>)
|
|
8004a8c: f00b fd34 bl 80104f8 <printf>
|
|
((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0);
|
|
LWIP_ASSERT("mem_malloc: sanity check alignment",
|
|
8004a90: 697b ldr r3, [r7, #20]
|
|
8004a92: f003 0303 and.w r3, r3, #3
|
|
8004a96: 2b00 cmp r3, #0
|
|
8004a98: d006 beq.n 8004aa8 <mem_malloc+0x1a4>
|
|
8004a9a: 4b0f ldr r3, [pc, #60] ; (8004ad8 <mem_malloc+0x1d4>)
|
|
8004a9c: f240 32bd movw r2, #957 ; 0x3bd
|
|
8004aa0: 4914 ldr r1, [pc, #80] ; (8004af4 <mem_malloc+0x1f0>)
|
|
8004aa2: 480f ldr r0, [pc, #60] ; (8004ae0 <mem_malloc+0x1dc>)
|
|
8004aa4: f00b fd28 bl 80104f8 <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;
|
|
8004aa8: 697b ldr r3, [r7, #20]
|
|
8004aaa: 3308 adds r3, #8
|
|
8004aac: e00e b.n 8004acc <mem_malloc+0x1c8>
|
|
ptr = ptr_to_mem(ptr)->next) {
|
|
8004aae: 8bfb ldrh r3, [r7, #30]
|
|
8004ab0: 4618 mov r0, r3
|
|
8004ab2: f7ff fc83 bl 80043bc <ptr_to_mem>
|
|
8004ab6: 4603 mov r3, r0
|
|
8004ab8: 881b ldrh r3, [r3, #0]
|
|
8004aba: 83fb strh r3, [r7, #30]
|
|
for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size;
|
|
8004abc: 8bfa ldrh r2, [r7, #30]
|
|
8004abe: 8bbb ldrh r3, [r7, #28]
|
|
8004ac0: f5c3 63c8 rsb r3, r3, #1600 ; 0x640
|
|
8004ac4: 429a cmp r2, r3
|
|
8004ac6: f4ff af44 bcc.w 8004952 <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;
|
|
8004aca: 2300 movs r3, #0
|
|
}
|
|
8004acc: 4618 mov r0, r3
|
|
8004ace: 3720 adds r7, #32
|
|
8004ad0: 46bd mov sp, r7
|
|
8004ad2: bd80 pop {r7, pc}
|
|
8004ad4: 20005ce4 .word 0x20005ce4
|
|
8004ad8: 080150a4 .word 0x080150a4
|
|
8004adc: 0801524c .word 0x0801524c
|
|
8004ae0: 080150ec .word 0x080150ec
|
|
8004ae4: 20005ce0 .word 0x20005ce0
|
|
8004ae8: 08015260 .word 0x08015260
|
|
8004aec: 0801527c .word 0x0801527c
|
|
8004af0: 080152ac .word 0x080152ac
|
|
8004af4: 080152dc .word 0x080152dc
|
|
|
|
08004af8 <memp_init_pool>:
|
|
*
|
|
* @param desc pool to initialize
|
|
*/
|
|
void
|
|
memp_init_pool(const struct memp_desc *desc)
|
|
{
|
|
8004af8: b480 push {r7}
|
|
8004afa: b085 sub sp, #20
|
|
8004afc: af00 add r7, sp, #0
|
|
8004afe: 6078 str r0, [r7, #4]
|
|
LWIP_UNUSED_ARG(desc);
|
|
#else
|
|
int i;
|
|
struct memp *memp;
|
|
|
|
*desc->tab = NULL;
|
|
8004b00: 687b ldr r3, [r7, #4]
|
|
8004b02: 689b ldr r3, [r3, #8]
|
|
8004b04: 2200 movs r2, #0
|
|
8004b06: 601a str r2, [r3, #0]
|
|
memp = (struct memp *)LWIP_MEM_ALIGN(desc->base);
|
|
8004b08: 687b ldr r3, [r7, #4]
|
|
8004b0a: 685b ldr r3, [r3, #4]
|
|
8004b0c: 3303 adds r3, #3
|
|
8004b0e: f023 0303 bic.w r3, r3, #3
|
|
8004b12: 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) {
|
|
8004b14: 2300 movs r3, #0
|
|
8004b16: 60fb str r3, [r7, #12]
|
|
8004b18: e011 b.n 8004b3e <memp_init_pool+0x46>
|
|
memp->next = *desc->tab;
|
|
8004b1a: 687b ldr r3, [r7, #4]
|
|
8004b1c: 689b ldr r3, [r3, #8]
|
|
8004b1e: 681a ldr r2, [r3, #0]
|
|
8004b20: 68bb ldr r3, [r7, #8]
|
|
8004b22: 601a str r2, [r3, #0]
|
|
*desc->tab = memp;
|
|
8004b24: 687b ldr r3, [r7, #4]
|
|
8004b26: 689b ldr r3, [r3, #8]
|
|
8004b28: 68ba ldr r2, [r7, #8]
|
|
8004b2a: 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
|
|
8004b2c: 687b ldr r3, [r7, #4]
|
|
8004b2e: 881b ldrh r3, [r3, #0]
|
|
8004b30: 461a mov r2, r3
|
|
8004b32: 68bb ldr r3, [r7, #8]
|
|
8004b34: 4413 add r3, r2
|
|
8004b36: 60bb str r3, [r7, #8]
|
|
for (i = 0; i < desc->num; ++i) {
|
|
8004b38: 68fb ldr r3, [r7, #12]
|
|
8004b3a: 3301 adds r3, #1
|
|
8004b3c: 60fb str r3, [r7, #12]
|
|
8004b3e: 687b ldr r3, [r7, #4]
|
|
8004b40: 885b ldrh r3, [r3, #2]
|
|
8004b42: 461a mov r2, r3
|
|
8004b44: 68fb ldr r3, [r7, #12]
|
|
8004b46: 4293 cmp r3, r2
|
|
8004b48: dbe7 blt.n 8004b1a <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) */
|
|
}
|
|
8004b4a: bf00 nop
|
|
8004b4c: bf00 nop
|
|
8004b4e: 3714 adds r7, #20
|
|
8004b50: 46bd mov sp, r7
|
|
8004b52: f85d 7b04 ldr.w r7, [sp], #4
|
|
8004b56: 4770 bx lr
|
|
|
|
08004b58 <memp_init>:
|
|
*
|
|
* Carves out memp_memory into linked lists for each pool-type.
|
|
*/
|
|
void
|
|
memp_init(void)
|
|
{
|
|
8004b58: b580 push {r7, lr}
|
|
8004b5a: b082 sub sp, #8
|
|
8004b5c: af00 add r7, sp, #0
|
|
u16_t i;
|
|
|
|
/* for every pool: */
|
|
for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) {
|
|
8004b5e: 2300 movs r3, #0
|
|
8004b60: 80fb strh r3, [r7, #6]
|
|
8004b62: e009 b.n 8004b78 <memp_init+0x20>
|
|
memp_init_pool(memp_pools[i]);
|
|
8004b64: 88fb ldrh r3, [r7, #6]
|
|
8004b66: 4a08 ldr r2, [pc, #32] ; (8004b88 <memp_init+0x30>)
|
|
8004b68: f852 3023 ldr.w r3, [r2, r3, lsl #2]
|
|
8004b6c: 4618 mov r0, r3
|
|
8004b6e: f7ff ffc3 bl 8004af8 <memp_init_pool>
|
|
for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) {
|
|
8004b72: 88fb ldrh r3, [r7, #6]
|
|
8004b74: 3301 adds r3, #1
|
|
8004b76: 80fb strh r3, [r7, #6]
|
|
8004b78: 88fb ldrh r3, [r7, #6]
|
|
8004b7a: 2b08 cmp r3, #8
|
|
8004b7c: d9f2 bls.n 8004b64 <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 */
|
|
}
|
|
8004b7e: bf00 nop
|
|
8004b80: bf00 nop
|
|
8004b82: 3708 adds r7, #8
|
|
8004b84: 46bd mov sp, r7
|
|
8004b86: bd80 pop {r7, pc}
|
|
8004b88: 08017ec8 .word 0x08017ec8
|
|
|
|
08004b8c <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
|
|
{
|
|
8004b8c: b580 push {r7, lr}
|
|
8004b8e: b084 sub sp, #16
|
|
8004b90: af00 add r7, sp, #0
|
|
8004b92: 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;
|
|
8004b94: 687b ldr r3, [r7, #4]
|
|
8004b96: 689b ldr r3, [r3, #8]
|
|
8004b98: 681b ldr r3, [r3, #0]
|
|
8004b9a: 60fb str r3, [r7, #12]
|
|
#endif /* MEMP_MEM_MALLOC */
|
|
|
|
if (memp != NULL) {
|
|
8004b9c: 68fb ldr r3, [r7, #12]
|
|
8004b9e: 2b00 cmp r3, #0
|
|
8004ba0: d012 beq.n 8004bc8 <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;
|
|
8004ba2: 687b ldr r3, [r7, #4]
|
|
8004ba4: 689b ldr r3, [r3, #8]
|
|
8004ba6: 68fa ldr r2, [r7, #12]
|
|
8004ba8: 6812 ldr r2, [r2, #0]
|
|
8004baa: 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",
|
|
8004bac: 68fb ldr r3, [r7, #12]
|
|
8004bae: f003 0303 and.w r3, r3, #3
|
|
8004bb2: 2b00 cmp r3, #0
|
|
8004bb4: d006 beq.n 8004bc4 <do_memp_malloc_pool+0x38>
|
|
8004bb6: 4b07 ldr r3, [pc, #28] ; (8004bd4 <do_memp_malloc_pool+0x48>)
|
|
8004bb8: f44f 728c mov.w r2, #280 ; 0x118
|
|
8004bbc: 4906 ldr r1, [pc, #24] ; (8004bd8 <do_memp_malloc_pool+0x4c>)
|
|
8004bbe: 4807 ldr r0, [pc, #28] ; (8004bdc <do_memp_malloc_pool+0x50>)
|
|
8004bc0: f00b fc9a bl 80104f8 <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);
|
|
8004bc4: 68fb ldr r3, [r7, #12]
|
|
8004bc6: e000 b.n 8004bca <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;
|
|
8004bc8: 2300 movs r3, #0
|
|
}
|
|
8004bca: 4618 mov r0, r3
|
|
8004bcc: 3710 adds r7, #16
|
|
8004bce: 46bd mov sp, r7
|
|
8004bd0: bd80 pop {r7, pc}
|
|
8004bd2: bf00 nop
|
|
8004bd4: 08015300 .word 0x08015300
|
|
8004bd8: 08015330 .word 0x08015330
|
|
8004bdc: 08015354 .word 0x08015354
|
|
|
|
08004be0 <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
|
|
{
|
|
8004be0: b580 push {r7, lr}
|
|
8004be2: b082 sub sp, #8
|
|
8004be4: af00 add r7, sp, #0
|
|
8004be6: 6078 str r0, [r7, #4]
|
|
LWIP_ASSERT("invalid pool desc", desc != NULL);
|
|
8004be8: 687b ldr r3, [r7, #4]
|
|
8004bea: 2b00 cmp r3, #0
|
|
8004bec: d106 bne.n 8004bfc <memp_malloc_pool+0x1c>
|
|
8004bee: 4b0a ldr r3, [pc, #40] ; (8004c18 <memp_malloc_pool+0x38>)
|
|
8004bf0: f44f 729e mov.w r2, #316 ; 0x13c
|
|
8004bf4: 4909 ldr r1, [pc, #36] ; (8004c1c <memp_malloc_pool+0x3c>)
|
|
8004bf6: 480a ldr r0, [pc, #40] ; (8004c20 <memp_malloc_pool+0x40>)
|
|
8004bf8: f00b fc7e bl 80104f8 <printf>
|
|
if (desc == NULL) {
|
|
8004bfc: 687b ldr r3, [r7, #4]
|
|
8004bfe: 2b00 cmp r3, #0
|
|
8004c00: d101 bne.n 8004c06 <memp_malloc_pool+0x26>
|
|
return NULL;
|
|
8004c02: 2300 movs r3, #0
|
|
8004c04: e003 b.n 8004c0e <memp_malloc_pool+0x2e>
|
|
}
|
|
|
|
#if !MEMP_OVERFLOW_CHECK
|
|
return do_memp_malloc_pool(desc);
|
|
8004c06: 6878 ldr r0, [r7, #4]
|
|
8004c08: f7ff ffc0 bl 8004b8c <do_memp_malloc_pool>
|
|
8004c0c: 4603 mov r3, r0
|
|
#else
|
|
return do_memp_malloc_pool_fn(desc, file, line);
|
|
#endif
|
|
}
|
|
8004c0e: 4618 mov r0, r3
|
|
8004c10: 3708 adds r7, #8
|
|
8004c12: 46bd mov sp, r7
|
|
8004c14: bd80 pop {r7, pc}
|
|
8004c16: bf00 nop
|
|
8004c18: 08015300 .word 0x08015300
|
|
8004c1c: 0801537c .word 0x0801537c
|
|
8004c20: 08015354 .word 0x08015354
|
|
|
|
08004c24 <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
|
|
{
|
|
8004c24: b580 push {r7, lr}
|
|
8004c26: b084 sub sp, #16
|
|
8004c28: af00 add r7, sp, #0
|
|
8004c2a: 4603 mov r3, r0
|
|
8004c2c: 71fb strb r3, [r7, #7]
|
|
void *memp;
|
|
LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;);
|
|
8004c2e: 79fb ldrb r3, [r7, #7]
|
|
8004c30: 2b08 cmp r3, #8
|
|
8004c32: d908 bls.n 8004c46 <memp_malloc+0x22>
|
|
8004c34: 4b0a ldr r3, [pc, #40] ; (8004c60 <memp_malloc+0x3c>)
|
|
8004c36: f240 1257 movw r2, #343 ; 0x157
|
|
8004c3a: 490a ldr r1, [pc, #40] ; (8004c64 <memp_malloc+0x40>)
|
|
8004c3c: 480a ldr r0, [pc, #40] ; (8004c68 <memp_malloc+0x44>)
|
|
8004c3e: f00b fc5b bl 80104f8 <printf>
|
|
8004c42: 2300 movs r3, #0
|
|
8004c44: e008 b.n 8004c58 <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]);
|
|
8004c46: 79fb ldrb r3, [r7, #7]
|
|
8004c48: 4a08 ldr r2, [pc, #32] ; (8004c6c <memp_malloc+0x48>)
|
|
8004c4a: f852 3023 ldr.w r3, [r2, r3, lsl #2]
|
|
8004c4e: 4618 mov r0, r3
|
|
8004c50: f7ff ff9c bl 8004b8c <do_memp_malloc_pool>
|
|
8004c54: 60f8 str r0, [r7, #12]
|
|
#else
|
|
memp = do_memp_malloc_pool_fn(memp_pools[type], file, line);
|
|
#endif
|
|
|
|
return memp;
|
|
8004c56: 68fb ldr r3, [r7, #12]
|
|
}
|
|
8004c58: 4618 mov r0, r3
|
|
8004c5a: 3710 adds r7, #16
|
|
8004c5c: 46bd mov sp, r7
|
|
8004c5e: bd80 pop {r7, pc}
|
|
8004c60: 08015300 .word 0x08015300
|
|
8004c64: 08015390 .word 0x08015390
|
|
8004c68: 08015354 .word 0x08015354
|
|
8004c6c: 08017ec8 .word 0x08017ec8
|
|
|
|
08004c70 <do_memp_free_pool>:
|
|
|
|
static void
|
|
do_memp_free_pool(const struct memp_desc *desc, void *mem)
|
|
{
|
|
8004c70: b580 push {r7, lr}
|
|
8004c72: b084 sub sp, #16
|
|
8004c74: af00 add r7, sp, #0
|
|
8004c76: 6078 str r0, [r7, #4]
|
|
8004c78: 6039 str r1, [r7, #0]
|
|
struct memp *memp;
|
|
SYS_ARCH_DECL_PROTECT(old_level);
|
|
|
|
LWIP_ASSERT("memp_free: mem properly aligned",
|
|
8004c7a: 683b ldr r3, [r7, #0]
|
|
8004c7c: f003 0303 and.w r3, r3, #3
|
|
8004c80: 2b00 cmp r3, #0
|
|
8004c82: d006 beq.n 8004c92 <do_memp_free_pool+0x22>
|
|
8004c84: 4b0a ldr r3, [pc, #40] ; (8004cb0 <do_memp_free_pool+0x40>)
|
|
8004c86: f44f 72b6 mov.w r2, #364 ; 0x16c
|
|
8004c8a: 490a ldr r1, [pc, #40] ; (8004cb4 <do_memp_free_pool+0x44>)
|
|
8004c8c: 480a ldr r0, [pc, #40] ; (8004cb8 <do_memp_free_pool+0x48>)
|
|
8004c8e: f00b fc33 bl 80104f8 <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);
|
|
8004c92: 683b ldr r3, [r7, #0]
|
|
8004c94: 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;
|
|
8004c96: 687b ldr r3, [r7, #4]
|
|
8004c98: 689b ldr r3, [r3, #8]
|
|
8004c9a: 681a ldr r2, [r3, #0]
|
|
8004c9c: 68fb ldr r3, [r7, #12]
|
|
8004c9e: 601a str r2, [r3, #0]
|
|
*desc->tab = memp;
|
|
8004ca0: 687b ldr r3, [r7, #4]
|
|
8004ca2: 689b ldr r3, [r3, #8]
|
|
8004ca4: 68fa ldr r2, [r7, #12]
|
|
8004ca6: 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 */
|
|
}
|
|
8004ca8: bf00 nop
|
|
8004caa: 3710 adds r7, #16
|
|
8004cac: 46bd mov sp, r7
|
|
8004cae: bd80 pop {r7, pc}
|
|
8004cb0: 08015300 .word 0x08015300
|
|
8004cb4: 080153b0 .word 0x080153b0
|
|
8004cb8: 08015354 .word 0x08015354
|
|
|
|
08004cbc <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)
|
|
{
|
|
8004cbc: b580 push {r7, lr}
|
|
8004cbe: b082 sub sp, #8
|
|
8004cc0: af00 add r7, sp, #0
|
|
8004cc2: 6078 str r0, [r7, #4]
|
|
8004cc4: 6039 str r1, [r7, #0]
|
|
LWIP_ASSERT("invalid pool desc", desc != NULL);
|
|
8004cc6: 687b ldr r3, [r7, #4]
|
|
8004cc8: 2b00 cmp r3, #0
|
|
8004cca: d106 bne.n 8004cda <memp_free_pool+0x1e>
|
|
8004ccc: 4b0a ldr r3, [pc, #40] ; (8004cf8 <memp_free_pool+0x3c>)
|
|
8004cce: f240 1295 movw r2, #405 ; 0x195
|
|
8004cd2: 490a ldr r1, [pc, #40] ; (8004cfc <memp_free_pool+0x40>)
|
|
8004cd4: 480a ldr r0, [pc, #40] ; (8004d00 <memp_free_pool+0x44>)
|
|
8004cd6: f00b fc0f bl 80104f8 <printf>
|
|
if ((desc == NULL) || (mem == NULL)) {
|
|
8004cda: 687b ldr r3, [r7, #4]
|
|
8004cdc: 2b00 cmp r3, #0
|
|
8004cde: d007 beq.n 8004cf0 <memp_free_pool+0x34>
|
|
8004ce0: 683b ldr r3, [r7, #0]
|
|
8004ce2: 2b00 cmp r3, #0
|
|
8004ce4: d004 beq.n 8004cf0 <memp_free_pool+0x34>
|
|
return;
|
|
}
|
|
|
|
do_memp_free_pool(desc, mem);
|
|
8004ce6: 6839 ldr r1, [r7, #0]
|
|
8004ce8: 6878 ldr r0, [r7, #4]
|
|
8004cea: f7ff ffc1 bl 8004c70 <do_memp_free_pool>
|
|
8004cee: e000 b.n 8004cf2 <memp_free_pool+0x36>
|
|
return;
|
|
8004cf0: bf00 nop
|
|
}
|
|
8004cf2: 3708 adds r7, #8
|
|
8004cf4: 46bd mov sp, r7
|
|
8004cf6: bd80 pop {r7, pc}
|
|
8004cf8: 08015300 .word 0x08015300
|
|
8004cfc: 0801537c .word 0x0801537c
|
|
8004d00: 08015354 .word 0x08015354
|
|
|
|
08004d04 <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)
|
|
{
|
|
8004d04: b580 push {r7, lr}
|
|
8004d06: b082 sub sp, #8
|
|
8004d08: af00 add r7, sp, #0
|
|
8004d0a: 4603 mov r3, r0
|
|
8004d0c: 6039 str r1, [r7, #0]
|
|
8004d0e: 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;);
|
|
8004d10: 79fb ldrb r3, [r7, #7]
|
|
8004d12: 2b08 cmp r3, #8
|
|
8004d14: d907 bls.n 8004d26 <memp_free+0x22>
|
|
8004d16: 4b0c ldr r3, [pc, #48] ; (8004d48 <memp_free+0x44>)
|
|
8004d18: f44f 72d5 mov.w r2, #426 ; 0x1aa
|
|
8004d1c: 490b ldr r1, [pc, #44] ; (8004d4c <memp_free+0x48>)
|
|
8004d1e: 480c ldr r0, [pc, #48] ; (8004d50 <memp_free+0x4c>)
|
|
8004d20: f00b fbea bl 80104f8 <printf>
|
|
8004d24: e00c b.n 8004d40 <memp_free+0x3c>
|
|
|
|
if (mem == NULL) {
|
|
8004d26: 683b ldr r3, [r7, #0]
|
|
8004d28: 2b00 cmp r3, #0
|
|
8004d2a: d008 beq.n 8004d3e <memp_free+0x3a>
|
|
|
|
#ifdef LWIP_HOOK_MEMP_AVAILABLE
|
|
old_first = *memp_pools[type]->tab;
|
|
#endif
|
|
|
|
do_memp_free_pool(memp_pools[type], mem);
|
|
8004d2c: 79fb ldrb r3, [r7, #7]
|
|
8004d2e: 4a09 ldr r2, [pc, #36] ; (8004d54 <memp_free+0x50>)
|
|
8004d30: f852 3023 ldr.w r3, [r2, r3, lsl #2]
|
|
8004d34: 6839 ldr r1, [r7, #0]
|
|
8004d36: 4618 mov r0, r3
|
|
8004d38: f7ff ff9a bl 8004c70 <do_memp_free_pool>
|
|
8004d3c: e000 b.n 8004d40 <memp_free+0x3c>
|
|
return;
|
|
8004d3e: bf00 nop
|
|
#ifdef LWIP_HOOK_MEMP_AVAILABLE
|
|
if (old_first == NULL) {
|
|
LWIP_HOOK_MEMP_AVAILABLE(type);
|
|
}
|
|
#endif
|
|
}
|
|
8004d40: 3708 adds r7, #8
|
|
8004d42: 46bd mov sp, r7
|
|
8004d44: bd80 pop {r7, pc}
|
|
8004d46: bf00 nop
|
|
8004d48: 08015300 .word 0x08015300
|
|
8004d4c: 080153d0 .word 0x080153d0
|
|
8004d50: 08015354 .word 0x08015354
|
|
8004d54: 08017ec8 .word 0x08017ec8
|
|
|
|
08004d58 <netif_init>:
|
|
}
|
|
#endif /* LWIP_HAVE_LOOPIF */
|
|
|
|
void
|
|
netif_init(void)
|
|
{
|
|
8004d58: b480 push {r7}
|
|
8004d5a: af00 add r7, sp, #0
|
|
|
|
netif_set_link_up(&loop_netif);
|
|
netif_set_up(&loop_netif);
|
|
|
|
#endif /* LWIP_HAVE_LOOPIF */
|
|
}
|
|
8004d5c: bf00 nop
|
|
8004d5e: 46bd mov sp, r7
|
|
8004d60: f85d 7b04 ldr.w r7, [sp], #4
|
|
8004d64: 4770 bx lr
|
|
...
|
|
|
|
08004d68 <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)
|
|
{
|
|
8004d68: b580 push {r7, lr}
|
|
8004d6a: b086 sub sp, #24
|
|
8004d6c: af00 add r7, sp, #0
|
|
8004d6e: 60f8 str r0, [r7, #12]
|
|
8004d70: 60b9 str r1, [r7, #8]
|
|
8004d72: 607a str r2, [r7, #4]
|
|
8004d74: 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);
|
|
8004d76: 68fb ldr r3, [r7, #12]
|
|
8004d78: 2b00 cmp r3, #0
|
|
8004d7a: d108 bne.n 8004d8e <netif_add+0x26>
|
|
8004d7c: 4b5b ldr r3, [pc, #364] ; (8004eec <netif_add+0x184>)
|
|
8004d7e: f240 1227 movw r2, #295 ; 0x127
|
|
8004d82: 495b ldr r1, [pc, #364] ; (8004ef0 <netif_add+0x188>)
|
|
8004d84: 485b ldr r0, [pc, #364] ; (8004ef4 <netif_add+0x18c>)
|
|
8004d86: f00b fbb7 bl 80104f8 <printf>
|
|
8004d8a: 2300 movs r3, #0
|
|
8004d8c: e0a9 b.n 8004ee2 <netif_add+0x17a>
|
|
LWIP_ERROR("netif_add: No init function given", init != NULL, return NULL);
|
|
8004d8e: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
8004d90: 2b00 cmp r3, #0
|
|
8004d92: d108 bne.n 8004da6 <netif_add+0x3e>
|
|
8004d94: 4b55 ldr r3, [pc, #340] ; (8004eec <netif_add+0x184>)
|
|
8004d96: f44f 7294 mov.w r2, #296 ; 0x128
|
|
8004d9a: 4957 ldr r1, [pc, #348] ; (8004ef8 <netif_add+0x190>)
|
|
8004d9c: 4855 ldr r0, [pc, #340] ; (8004ef4 <netif_add+0x18c>)
|
|
8004d9e: f00b fbab bl 80104f8 <printf>
|
|
8004da2: 2300 movs r3, #0
|
|
8004da4: e09d b.n 8004ee2 <netif_add+0x17a>
|
|
|
|
#if LWIP_IPV4
|
|
if (ipaddr == NULL) {
|
|
8004da6: 68bb ldr r3, [r7, #8]
|
|
8004da8: 2b00 cmp r3, #0
|
|
8004daa: d101 bne.n 8004db0 <netif_add+0x48>
|
|
ipaddr = ip_2_ip4(IP4_ADDR_ANY);
|
|
8004dac: 4b53 ldr r3, [pc, #332] ; (8004efc <netif_add+0x194>)
|
|
8004dae: 60bb str r3, [r7, #8]
|
|
}
|
|
if (netmask == NULL) {
|
|
8004db0: 687b ldr r3, [r7, #4]
|
|
8004db2: 2b00 cmp r3, #0
|
|
8004db4: d101 bne.n 8004dba <netif_add+0x52>
|
|
netmask = ip_2_ip4(IP4_ADDR_ANY);
|
|
8004db6: 4b51 ldr r3, [pc, #324] ; (8004efc <netif_add+0x194>)
|
|
8004db8: 607b str r3, [r7, #4]
|
|
}
|
|
if (gw == NULL) {
|
|
8004dba: 683b ldr r3, [r7, #0]
|
|
8004dbc: 2b00 cmp r3, #0
|
|
8004dbe: d101 bne.n 8004dc4 <netif_add+0x5c>
|
|
gw = ip_2_ip4(IP4_ADDR_ANY);
|
|
8004dc0: 4b4e ldr r3, [pc, #312] ; (8004efc <netif_add+0x194>)
|
|
8004dc2: 603b str r3, [r7, #0]
|
|
}
|
|
|
|
/* reset new interface configuration state */
|
|
ip_addr_set_zero_ip4(&netif->ip_addr);
|
|
8004dc4: 68fb ldr r3, [r7, #12]
|
|
8004dc6: 2200 movs r2, #0
|
|
8004dc8: 605a str r2, [r3, #4]
|
|
ip_addr_set_zero_ip4(&netif->netmask);
|
|
8004dca: 68fb ldr r3, [r7, #12]
|
|
8004dcc: 2200 movs r2, #0
|
|
8004dce: 609a str r2, [r3, #8]
|
|
ip_addr_set_zero_ip4(&netif->gw);
|
|
8004dd0: 68fb ldr r3, [r7, #12]
|
|
8004dd2: 2200 movs r2, #0
|
|
8004dd4: 60da str r2, [r3, #12]
|
|
netif->output = netif_null_output_ip4;
|
|
8004dd6: 68fb ldr r3, [r7, #12]
|
|
8004dd8: 4a49 ldr r2, [pc, #292] ; (8004f00 <netif_add+0x198>)
|
|
8004dda: 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;
|
|
8004ddc: 68fb ldr r3, [r7, #12]
|
|
8004dde: 2200 movs r2, #0
|
|
8004de0: 851a strh r2, [r3, #40] ; 0x28
|
|
netif->flags = 0;
|
|
8004de2: 68fb ldr r3, [r7, #12]
|
|
8004de4: 2200 movs r2, #0
|
|
8004de6: f883 2031 strb.w r2, [r3, #49] ; 0x31
|
|
#ifdef netif_get_client_data
|
|
memset(netif->client_data, 0, sizeof(netif->client_data));
|
|
8004dea: 68fb ldr r3, [r7, #12]
|
|
8004dec: 3324 adds r3, #36 ; 0x24
|
|
8004dee: 2204 movs r2, #4
|
|
8004df0: 2100 movs r1, #0
|
|
8004df2: 4618 mov r0, r3
|
|
8004df4: f00b fb78 bl 80104e8 <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;
|
|
8004df8: 68fb ldr r3, [r7, #12]
|
|
8004dfa: 2200 movs r2, #0
|
|
8004dfc: 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;
|
|
8004dfe: 68fb ldr r3, [r7, #12]
|
|
8004e00: 6a3a ldr r2, [r7, #32]
|
|
8004e02: 621a str r2, [r3, #32]
|
|
netif->num = netif_num;
|
|
8004e04: 4b3f ldr r3, [pc, #252] ; (8004f04 <netif_add+0x19c>)
|
|
8004e06: 781a ldrb r2, [r3, #0]
|
|
8004e08: 68fb ldr r3, [r7, #12]
|
|
8004e0a: f883 2034 strb.w r2, [r3, #52] ; 0x34
|
|
netif->input = input;
|
|
8004e0e: 68fb ldr r3, [r7, #12]
|
|
8004e10: 6aba ldr r2, [r7, #40] ; 0x28
|
|
8004e12: 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);
|
|
8004e14: 683b ldr r3, [r7, #0]
|
|
8004e16: 687a ldr r2, [r7, #4]
|
|
8004e18: 68b9 ldr r1, [r7, #8]
|
|
8004e1a: 68f8 ldr r0, [r7, #12]
|
|
8004e1c: f000 f914 bl 8005048 <netif_set_addr>
|
|
#endif /* LWIP_IPV4 */
|
|
|
|
/* call user specified initialization function for netif */
|
|
if (init(netif) != ERR_OK) {
|
|
8004e20: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
8004e22: 68f8 ldr r0, [r7, #12]
|
|
8004e24: 4798 blx r3
|
|
8004e26: 4603 mov r3, r0
|
|
8004e28: 2b00 cmp r3, #0
|
|
8004e2a: d001 beq.n 8004e30 <netif_add+0xc8>
|
|
return NULL;
|
|
8004e2c: 2300 movs r3, #0
|
|
8004e2e: e058 b.n 8004ee2 <netif_add+0x17a>
|
|
*/
|
|
{
|
|
struct netif *netif2;
|
|
int num_netifs;
|
|
do {
|
|
if (netif->num == 255) {
|
|
8004e30: 68fb ldr r3, [r7, #12]
|
|
8004e32: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
|
|
8004e36: 2bff cmp r3, #255 ; 0xff
|
|
8004e38: d103 bne.n 8004e42 <netif_add+0xda>
|
|
netif->num = 0;
|
|
8004e3a: 68fb ldr r3, [r7, #12]
|
|
8004e3c: 2200 movs r2, #0
|
|
8004e3e: f883 2034 strb.w r2, [r3, #52] ; 0x34
|
|
}
|
|
num_netifs = 0;
|
|
8004e42: 2300 movs r3, #0
|
|
8004e44: 613b str r3, [r7, #16]
|
|
for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) {
|
|
8004e46: 4b30 ldr r3, [pc, #192] ; (8004f08 <netif_add+0x1a0>)
|
|
8004e48: 681b ldr r3, [r3, #0]
|
|
8004e4a: 617b str r3, [r7, #20]
|
|
8004e4c: e02b b.n 8004ea6 <netif_add+0x13e>
|
|
LWIP_ASSERT("netif already added", netif2 != netif);
|
|
8004e4e: 697a ldr r2, [r7, #20]
|
|
8004e50: 68fb ldr r3, [r7, #12]
|
|
8004e52: 429a cmp r2, r3
|
|
8004e54: d106 bne.n 8004e64 <netif_add+0xfc>
|
|
8004e56: 4b25 ldr r3, [pc, #148] ; (8004eec <netif_add+0x184>)
|
|
8004e58: f240 128b movw r2, #395 ; 0x18b
|
|
8004e5c: 492b ldr r1, [pc, #172] ; (8004f0c <netif_add+0x1a4>)
|
|
8004e5e: 4825 ldr r0, [pc, #148] ; (8004ef4 <netif_add+0x18c>)
|
|
8004e60: f00b fb4a bl 80104f8 <printf>
|
|
num_netifs++;
|
|
8004e64: 693b ldr r3, [r7, #16]
|
|
8004e66: 3301 adds r3, #1
|
|
8004e68: 613b str r3, [r7, #16]
|
|
LWIP_ASSERT("too many netifs, max. supported number is 255", num_netifs <= 255);
|
|
8004e6a: 693b ldr r3, [r7, #16]
|
|
8004e6c: 2bff cmp r3, #255 ; 0xff
|
|
8004e6e: dd06 ble.n 8004e7e <netif_add+0x116>
|
|
8004e70: 4b1e ldr r3, [pc, #120] ; (8004eec <netif_add+0x184>)
|
|
8004e72: f240 128d movw r2, #397 ; 0x18d
|
|
8004e76: 4926 ldr r1, [pc, #152] ; (8004f10 <netif_add+0x1a8>)
|
|
8004e78: 481e ldr r0, [pc, #120] ; (8004ef4 <netif_add+0x18c>)
|
|
8004e7a: f00b fb3d bl 80104f8 <printf>
|
|
if (netif2->num == netif->num) {
|
|
8004e7e: 697b ldr r3, [r7, #20]
|
|
8004e80: f893 2034 ldrb.w r2, [r3, #52] ; 0x34
|
|
8004e84: 68fb ldr r3, [r7, #12]
|
|
8004e86: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
|
|
8004e8a: 429a cmp r2, r3
|
|
8004e8c: d108 bne.n 8004ea0 <netif_add+0x138>
|
|
netif->num++;
|
|
8004e8e: 68fb ldr r3, [r7, #12]
|
|
8004e90: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
|
|
8004e94: 3301 adds r3, #1
|
|
8004e96: b2da uxtb r2, r3
|
|
8004e98: 68fb ldr r3, [r7, #12]
|
|
8004e9a: f883 2034 strb.w r2, [r3, #52] ; 0x34
|
|
break;
|
|
8004e9e: e005 b.n 8004eac <netif_add+0x144>
|
|
for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) {
|
|
8004ea0: 697b ldr r3, [r7, #20]
|
|
8004ea2: 681b ldr r3, [r3, #0]
|
|
8004ea4: 617b str r3, [r7, #20]
|
|
8004ea6: 697b ldr r3, [r7, #20]
|
|
8004ea8: 2b00 cmp r3, #0
|
|
8004eaa: d1d0 bne.n 8004e4e <netif_add+0xe6>
|
|
}
|
|
}
|
|
} while (netif2 != NULL);
|
|
8004eac: 697b ldr r3, [r7, #20]
|
|
8004eae: 2b00 cmp r3, #0
|
|
8004eb0: d1be bne.n 8004e30 <netif_add+0xc8>
|
|
}
|
|
if (netif->num == 254) {
|
|
8004eb2: 68fb ldr r3, [r7, #12]
|
|
8004eb4: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
|
|
8004eb8: 2bfe cmp r3, #254 ; 0xfe
|
|
8004eba: d103 bne.n 8004ec4 <netif_add+0x15c>
|
|
netif_num = 0;
|
|
8004ebc: 4b11 ldr r3, [pc, #68] ; (8004f04 <netif_add+0x19c>)
|
|
8004ebe: 2200 movs r2, #0
|
|
8004ec0: 701a strb r2, [r3, #0]
|
|
8004ec2: e006 b.n 8004ed2 <netif_add+0x16a>
|
|
} else {
|
|
netif_num = (u8_t)(netif->num + 1);
|
|
8004ec4: 68fb ldr r3, [r7, #12]
|
|
8004ec6: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
|
|
8004eca: 3301 adds r3, #1
|
|
8004ecc: b2da uxtb r2, r3
|
|
8004ece: 4b0d ldr r3, [pc, #52] ; (8004f04 <netif_add+0x19c>)
|
|
8004ed0: 701a strb r2, [r3, #0]
|
|
}
|
|
|
|
/* add this netif to the list */
|
|
netif->next = netif_list;
|
|
8004ed2: 4b0d ldr r3, [pc, #52] ; (8004f08 <netif_add+0x1a0>)
|
|
8004ed4: 681a ldr r2, [r3, #0]
|
|
8004ed6: 68fb ldr r3, [r7, #12]
|
|
8004ed8: 601a str r2, [r3, #0]
|
|
netif_list = netif;
|
|
8004eda: 4a0b ldr r2, [pc, #44] ; (8004f08 <netif_add+0x1a0>)
|
|
8004edc: 68fb ldr r3, [r7, #12]
|
|
8004ede: 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;
|
|
8004ee0: 68fb ldr r3, [r7, #12]
|
|
}
|
|
8004ee2: 4618 mov r0, r3
|
|
8004ee4: 3718 adds r7, #24
|
|
8004ee6: 46bd mov sp, r7
|
|
8004ee8: bd80 pop {r7, pc}
|
|
8004eea: bf00 nop
|
|
8004eec: 080153ec .word 0x080153ec
|
|
8004ef0: 08015480 .word 0x08015480
|
|
8004ef4: 0801543c .word 0x0801543c
|
|
8004ef8: 0801549c .word 0x0801549c
|
|
8004efc: 08017f3c .word 0x08017f3c
|
|
8004f00: 0800532b .word 0x0800532b
|
|
8004f04: 20008bfc .word 0x20008bfc
|
|
8004f08: 20008bf4 .word 0x20008bf4
|
|
8004f0c: 080154c0 .word 0x080154c0
|
|
8004f10: 080154d4 .word 0x080154d4
|
|
|
|
08004f14 <netif_do_ip_addr_changed>:
|
|
|
|
static void
|
|
netif_do_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr)
|
|
{
|
|
8004f14: b580 push {r7, lr}
|
|
8004f16: b082 sub sp, #8
|
|
8004f18: af00 add r7, sp, #0
|
|
8004f1a: 6078 str r0, [r7, #4]
|
|
8004f1c: 6039 str r1, [r7, #0]
|
|
#if LWIP_TCP
|
|
tcp_netif_ip_addr_changed(old_addr, new_addr);
|
|
8004f1e: 6839 ldr r1, [r7, #0]
|
|
8004f20: 6878 ldr r0, [r7, #4]
|
|
8004f22: f002 fb57 bl 80075d4 <tcp_netif_ip_addr_changed>
|
|
#endif /* LWIP_TCP */
|
|
#if LWIP_UDP
|
|
udp_netif_ip_addr_changed(old_addr, new_addr);
|
|
8004f26: 6839 ldr r1, [r7, #0]
|
|
8004f28: 6878 ldr r0, [r7, #4]
|
|
8004f2a: f006 ff99 bl 800be60 <udp_netif_ip_addr_changed>
|
|
#endif /* LWIP_UDP */
|
|
#if LWIP_RAW
|
|
raw_netif_ip_addr_changed(old_addr, new_addr);
|
|
#endif /* LWIP_RAW */
|
|
}
|
|
8004f2e: bf00 nop
|
|
8004f30: 3708 adds r7, #8
|
|
8004f32: 46bd mov sp, r7
|
|
8004f34: bd80 pop {r7, pc}
|
|
...
|
|
|
|
08004f38 <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)
|
|
{
|
|
8004f38: b580 push {r7, lr}
|
|
8004f3a: b086 sub sp, #24
|
|
8004f3c: af00 add r7, sp, #0
|
|
8004f3e: 60f8 str r0, [r7, #12]
|
|
8004f40: 60b9 str r1, [r7, #8]
|
|
8004f42: 607a str r2, [r7, #4]
|
|
LWIP_ASSERT("invalid pointer", ipaddr != NULL);
|
|
8004f44: 68bb ldr r3, [r7, #8]
|
|
8004f46: 2b00 cmp r3, #0
|
|
8004f48: d106 bne.n 8004f58 <netif_do_set_ipaddr+0x20>
|
|
8004f4a: 4b1d ldr r3, [pc, #116] ; (8004fc0 <netif_do_set_ipaddr+0x88>)
|
|
8004f4c: f240 12cb movw r2, #459 ; 0x1cb
|
|
8004f50: 491c ldr r1, [pc, #112] ; (8004fc4 <netif_do_set_ipaddr+0x8c>)
|
|
8004f52: 481d ldr r0, [pc, #116] ; (8004fc8 <netif_do_set_ipaddr+0x90>)
|
|
8004f54: f00b fad0 bl 80104f8 <printf>
|
|
LWIP_ASSERT("invalid pointer", old_addr != NULL);
|
|
8004f58: 687b ldr r3, [r7, #4]
|
|
8004f5a: 2b00 cmp r3, #0
|
|
8004f5c: d106 bne.n 8004f6c <netif_do_set_ipaddr+0x34>
|
|
8004f5e: 4b18 ldr r3, [pc, #96] ; (8004fc0 <netif_do_set_ipaddr+0x88>)
|
|
8004f60: f44f 72e6 mov.w r2, #460 ; 0x1cc
|
|
8004f64: 4917 ldr r1, [pc, #92] ; (8004fc4 <netif_do_set_ipaddr+0x8c>)
|
|
8004f66: 4818 ldr r0, [pc, #96] ; (8004fc8 <netif_do_set_ipaddr+0x90>)
|
|
8004f68: f00b fac6 bl 80104f8 <printf>
|
|
|
|
/* address is actually being changed? */
|
|
if (ip4_addr_cmp(ipaddr, netif_ip4_addr(netif)) == 0) {
|
|
8004f6c: 68bb ldr r3, [r7, #8]
|
|
8004f6e: 681a ldr r2, [r3, #0]
|
|
8004f70: 68fb ldr r3, [r7, #12]
|
|
8004f72: 3304 adds r3, #4
|
|
8004f74: 681b ldr r3, [r3, #0]
|
|
8004f76: 429a cmp r2, r3
|
|
8004f78: d01c beq.n 8004fb4 <netif_do_set_ipaddr+0x7c>
|
|
ip_addr_t new_addr;
|
|
*ip_2_ip4(&new_addr) = *ipaddr;
|
|
8004f7a: 68bb ldr r3, [r7, #8]
|
|
8004f7c: 681b ldr r3, [r3, #0]
|
|
8004f7e: 617b str r3, [r7, #20]
|
|
IP_SET_TYPE_VAL(new_addr, IPADDR_TYPE_V4);
|
|
|
|
ip_addr_copy(*old_addr, *netif_ip_addr4(netif));
|
|
8004f80: 68fb ldr r3, [r7, #12]
|
|
8004f82: 3304 adds r3, #4
|
|
8004f84: 681a ldr r2, [r3, #0]
|
|
8004f86: 687b ldr r3, [r7, #4]
|
|
8004f88: 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);
|
|
8004f8a: f107 0314 add.w r3, r7, #20
|
|
8004f8e: 4619 mov r1, r3
|
|
8004f90: 6878 ldr r0, [r7, #4]
|
|
8004f92: f7ff ffbf bl 8004f14 <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);
|
|
8004f96: 68bb ldr r3, [r7, #8]
|
|
8004f98: 2b00 cmp r3, #0
|
|
8004f9a: d002 beq.n 8004fa2 <netif_do_set_ipaddr+0x6a>
|
|
8004f9c: 68bb ldr r3, [r7, #8]
|
|
8004f9e: 681b ldr r3, [r3, #0]
|
|
8004fa0: e000 b.n 8004fa4 <netif_do_set_ipaddr+0x6c>
|
|
8004fa2: 2300 movs r3, #0
|
|
8004fa4: 68fa ldr r2, [r7, #12]
|
|
8004fa6: 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);
|
|
8004fa8: 2101 movs r1, #1
|
|
8004faa: 68f8 ldr r0, [r7, #12]
|
|
8004fac: f000 f8d2 bl 8005154 <netif_issue_reports>
|
|
|
|
NETIF_STATUS_CALLBACK(netif);
|
|
return 1; /* address changed */
|
|
8004fb0: 2301 movs r3, #1
|
|
8004fb2: e000 b.n 8004fb6 <netif_do_set_ipaddr+0x7e>
|
|
}
|
|
return 0; /* address unchanged */
|
|
8004fb4: 2300 movs r3, #0
|
|
}
|
|
8004fb6: 4618 mov r0, r3
|
|
8004fb8: 3718 adds r7, #24
|
|
8004fba: 46bd mov sp, r7
|
|
8004fbc: bd80 pop {r7, pc}
|
|
8004fbe: bf00 nop
|
|
8004fc0: 080153ec .word 0x080153ec
|
|
8004fc4: 08015504 .word 0x08015504
|
|
8004fc8: 0801543c .word 0x0801543c
|
|
|
|
08004fcc <netif_do_set_netmask>:
|
|
}
|
|
}
|
|
|
|
static int
|
|
netif_do_set_netmask(struct netif *netif, const ip4_addr_t *netmask, ip_addr_t *old_nm)
|
|
{
|
|
8004fcc: b480 push {r7}
|
|
8004fce: b085 sub sp, #20
|
|
8004fd0: af00 add r7, sp, #0
|
|
8004fd2: 60f8 str r0, [r7, #12]
|
|
8004fd4: 60b9 str r1, [r7, #8]
|
|
8004fd6: 607a str r2, [r7, #4]
|
|
/* address is actually being changed? */
|
|
if (ip4_addr_cmp(netmask, netif_ip4_netmask(netif)) == 0) {
|
|
8004fd8: 68bb ldr r3, [r7, #8]
|
|
8004fda: 681a ldr r2, [r3, #0]
|
|
8004fdc: 68fb ldr r3, [r7, #12]
|
|
8004fde: 3308 adds r3, #8
|
|
8004fe0: 681b ldr r3, [r3, #0]
|
|
8004fe2: 429a cmp r2, r3
|
|
8004fe4: d00a beq.n 8004ffc <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);
|
|
8004fe6: 68bb ldr r3, [r7, #8]
|
|
8004fe8: 2b00 cmp r3, #0
|
|
8004fea: d002 beq.n 8004ff2 <netif_do_set_netmask+0x26>
|
|
8004fec: 68bb ldr r3, [r7, #8]
|
|
8004fee: 681b ldr r3, [r3, #0]
|
|
8004ff0: e000 b.n 8004ff4 <netif_do_set_netmask+0x28>
|
|
8004ff2: 2300 movs r3, #0
|
|
8004ff4: 68fa ldr r2, [r7, #12]
|
|
8004ff6: 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 */
|
|
8004ff8: 2301 movs r3, #1
|
|
8004ffa: e000 b.n 8004ffe <netif_do_set_netmask+0x32>
|
|
}
|
|
return 0; /* netmask unchanged */
|
|
8004ffc: 2300 movs r3, #0
|
|
}
|
|
8004ffe: 4618 mov r0, r3
|
|
8005000: 3714 adds r7, #20
|
|
8005002: 46bd mov sp, r7
|
|
8005004: f85d 7b04 ldr.w r7, [sp], #4
|
|
8005008: 4770 bx lr
|
|
|
|
0800500a <netif_do_set_gw>:
|
|
}
|
|
}
|
|
|
|
static int
|
|
netif_do_set_gw(struct netif *netif, const ip4_addr_t *gw, ip_addr_t *old_gw)
|
|
{
|
|
800500a: b480 push {r7}
|
|
800500c: b085 sub sp, #20
|
|
800500e: af00 add r7, sp, #0
|
|
8005010: 60f8 str r0, [r7, #12]
|
|
8005012: 60b9 str r1, [r7, #8]
|
|
8005014: 607a str r2, [r7, #4]
|
|
/* address is actually being changed? */
|
|
if (ip4_addr_cmp(gw, netif_ip4_gw(netif)) == 0) {
|
|
8005016: 68bb ldr r3, [r7, #8]
|
|
8005018: 681a ldr r2, [r3, #0]
|
|
800501a: 68fb ldr r3, [r7, #12]
|
|
800501c: 330c adds r3, #12
|
|
800501e: 681b ldr r3, [r3, #0]
|
|
8005020: 429a cmp r2, r3
|
|
8005022: d00a beq.n 800503a <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);
|
|
8005024: 68bb ldr r3, [r7, #8]
|
|
8005026: 2b00 cmp r3, #0
|
|
8005028: d002 beq.n 8005030 <netif_do_set_gw+0x26>
|
|
800502a: 68bb ldr r3, [r7, #8]
|
|
800502c: 681b ldr r3, [r3, #0]
|
|
800502e: e000 b.n 8005032 <netif_do_set_gw+0x28>
|
|
8005030: 2300 movs r3, #0
|
|
8005032: 68fa ldr r2, [r7, #12]
|
|
8005034: 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 */
|
|
8005036: 2301 movs r3, #1
|
|
8005038: e000 b.n 800503c <netif_do_set_gw+0x32>
|
|
}
|
|
return 0; /* gateway unchanged */
|
|
800503a: 2300 movs r3, #0
|
|
}
|
|
800503c: 4618 mov r0, r3
|
|
800503e: 3714 adds r7, #20
|
|
8005040: 46bd mov sp, r7
|
|
8005042: f85d 7b04 ldr.w r7, [sp], #4
|
|
8005046: 4770 bx lr
|
|
|
|
08005048 <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)
|
|
{
|
|
8005048: b580 push {r7, lr}
|
|
800504a: b088 sub sp, #32
|
|
800504c: af00 add r7, sp, #0
|
|
800504e: 60f8 str r0, [r7, #12]
|
|
8005050: 60b9 str r1, [r7, #8]
|
|
8005052: 607a str r2, [r7, #4]
|
|
8005054: 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;
|
|
8005056: 2300 movs r3, #0
|
|
8005058: 61fb str r3, [r7, #28]
|
|
ip_addr_t *old_gw = NULL;
|
|
800505a: 2300 movs r3, #0
|
|
800505c: 61bb str r3, [r7, #24]
|
|
int remove;
|
|
|
|
LWIP_ASSERT_CORE_LOCKED();
|
|
|
|
/* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */
|
|
if (ipaddr == NULL) {
|
|
800505e: 68bb ldr r3, [r7, #8]
|
|
8005060: 2b00 cmp r3, #0
|
|
8005062: d101 bne.n 8005068 <netif_set_addr+0x20>
|
|
ipaddr = IP4_ADDR_ANY4;
|
|
8005064: 4b1c ldr r3, [pc, #112] ; (80050d8 <netif_set_addr+0x90>)
|
|
8005066: 60bb str r3, [r7, #8]
|
|
}
|
|
if (netmask == NULL) {
|
|
8005068: 687b ldr r3, [r7, #4]
|
|
800506a: 2b00 cmp r3, #0
|
|
800506c: d101 bne.n 8005072 <netif_set_addr+0x2a>
|
|
netmask = IP4_ADDR_ANY4;
|
|
800506e: 4b1a ldr r3, [pc, #104] ; (80050d8 <netif_set_addr+0x90>)
|
|
8005070: 607b str r3, [r7, #4]
|
|
}
|
|
if (gw == NULL) {
|
|
8005072: 683b ldr r3, [r7, #0]
|
|
8005074: 2b00 cmp r3, #0
|
|
8005076: d101 bne.n 800507c <netif_set_addr+0x34>
|
|
gw = IP4_ADDR_ANY4;
|
|
8005078: 4b17 ldr r3, [pc, #92] ; (80050d8 <netif_set_addr+0x90>)
|
|
800507a: 603b str r3, [r7, #0]
|
|
}
|
|
|
|
remove = ip4_addr_isany(ipaddr);
|
|
800507c: 68bb ldr r3, [r7, #8]
|
|
800507e: 2b00 cmp r3, #0
|
|
8005080: d003 beq.n 800508a <netif_set_addr+0x42>
|
|
8005082: 68bb ldr r3, [r7, #8]
|
|
8005084: 681b ldr r3, [r3, #0]
|
|
8005086: 2b00 cmp r3, #0
|
|
8005088: d101 bne.n 800508e <netif_set_addr+0x46>
|
|
800508a: 2301 movs r3, #1
|
|
800508c: e000 b.n 8005090 <netif_set_addr+0x48>
|
|
800508e: 2300 movs r3, #0
|
|
8005090: 617b str r3, [r7, #20]
|
|
if (remove) {
|
|
8005092: 697b ldr r3, [r7, #20]
|
|
8005094: 2b00 cmp r3, #0
|
|
8005096: d006 beq.n 80050a6 <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)) {
|
|
8005098: f107 0310 add.w r3, r7, #16
|
|
800509c: 461a mov r2, r3
|
|
800509e: 68b9 ldr r1, [r7, #8]
|
|
80050a0: 68f8 ldr r0, [r7, #12]
|
|
80050a2: f7ff ff49 bl 8004f38 <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)) {
|
|
80050a6: 69fa ldr r2, [r7, #28]
|
|
80050a8: 6879 ldr r1, [r7, #4]
|
|
80050aa: 68f8 ldr r0, [r7, #12]
|
|
80050ac: f7ff ff8e bl 8004fcc <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)) {
|
|
80050b0: 69ba ldr r2, [r7, #24]
|
|
80050b2: 6839 ldr r1, [r7, #0]
|
|
80050b4: 68f8 ldr r0, [r7, #12]
|
|
80050b6: f7ff ffa8 bl 800500a <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) {
|
|
80050ba: 697b ldr r3, [r7, #20]
|
|
80050bc: 2b00 cmp r3, #0
|
|
80050be: d106 bne.n 80050ce <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)) {
|
|
80050c0: f107 0310 add.w r3, r7, #16
|
|
80050c4: 461a mov r2, r3
|
|
80050c6: 68b9 ldr r1, [r7, #8]
|
|
80050c8: 68f8 ldr r0, [r7, #12]
|
|
80050ca: f7ff ff35 bl 8004f38 <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
|
|
}
|
|
80050ce: bf00 nop
|
|
80050d0: 3720 adds r7, #32
|
|
80050d2: 46bd mov sp, r7
|
|
80050d4: bd80 pop {r7, pc}
|
|
80050d6: bf00 nop
|
|
80050d8: 08017f3c .word 0x08017f3c
|
|
|
|
080050dc <netif_set_default>:
|
|
*
|
|
* @param netif the default network interface
|
|
*/
|
|
void
|
|
netif_set_default(struct netif *netif)
|
|
{
|
|
80050dc: b480 push {r7}
|
|
80050de: b083 sub sp, #12
|
|
80050e0: af00 add r7, sp, #0
|
|
80050e2: 6078 str r0, [r7, #4]
|
|
mib2_remove_route_ip4(1, netif);
|
|
} else {
|
|
/* install default route */
|
|
mib2_add_route_ip4(1, netif);
|
|
}
|
|
netif_default = netif;
|
|
80050e4: 4a04 ldr r2, [pc, #16] ; (80050f8 <netif_set_default+0x1c>)
|
|
80050e6: 687b ldr r3, [r7, #4]
|
|
80050e8: 6013 str r3, [r2, #0]
|
|
LWIP_DEBUGF(NETIF_DEBUG, ("netif: setting default interface %c%c\n",
|
|
netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\''));
|
|
}
|
|
80050ea: bf00 nop
|
|
80050ec: 370c adds r7, #12
|
|
80050ee: 46bd mov sp, r7
|
|
80050f0: f85d 7b04 ldr.w r7, [sp], #4
|
|
80050f4: 4770 bx lr
|
|
80050f6: bf00 nop
|
|
80050f8: 20008bf8 .word 0x20008bf8
|
|
|
|
080050fc <netif_set_up>:
|
|
* Bring an interface up, available for processing
|
|
* traffic.
|
|
*/
|
|
void
|
|
netif_set_up(struct netif *netif)
|
|
{
|
|
80050fc: b580 push {r7, lr}
|
|
80050fe: b082 sub sp, #8
|
|
8005100: af00 add r7, sp, #0
|
|
8005102: 6078 str r0, [r7, #4]
|
|
LWIP_ASSERT_CORE_LOCKED();
|
|
|
|
LWIP_ERROR("netif_set_up: invalid netif", netif != NULL, return);
|
|
8005104: 687b ldr r3, [r7, #4]
|
|
8005106: 2b00 cmp r3, #0
|
|
8005108: d107 bne.n 800511a <netif_set_up+0x1e>
|
|
800510a: 4b0f ldr r3, [pc, #60] ; (8005148 <netif_set_up+0x4c>)
|
|
800510c: f44f 7254 mov.w r2, #848 ; 0x350
|
|
8005110: 490e ldr r1, [pc, #56] ; (800514c <netif_set_up+0x50>)
|
|
8005112: 480f ldr r0, [pc, #60] ; (8005150 <netif_set_up+0x54>)
|
|
8005114: f00b f9f0 bl 80104f8 <printf>
|
|
8005118: e013 b.n 8005142 <netif_set_up+0x46>
|
|
|
|
if (!(netif->flags & NETIF_FLAG_UP)) {
|
|
800511a: 687b ldr r3, [r7, #4]
|
|
800511c: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
8005120: f003 0301 and.w r3, r3, #1
|
|
8005124: 2b00 cmp r3, #0
|
|
8005126: d10c bne.n 8005142 <netif_set_up+0x46>
|
|
netif_set_flags(netif, NETIF_FLAG_UP);
|
|
8005128: 687b ldr r3, [r7, #4]
|
|
800512a: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
800512e: f043 0301 orr.w r3, r3, #1
|
|
8005132: b2da uxtb r2, r3
|
|
8005134: 687b ldr r3, [r7, #4]
|
|
8005136: 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);
|
|
800513a: 2103 movs r1, #3
|
|
800513c: 6878 ldr r0, [r7, #4]
|
|
800513e: f000 f809 bl 8005154 <netif_issue_reports>
|
|
#if LWIP_IPV6
|
|
nd6_restart_netif(netif);
|
|
#endif /* LWIP_IPV6 */
|
|
}
|
|
}
|
|
8005142: 3708 adds r7, #8
|
|
8005144: 46bd mov sp, r7
|
|
8005146: bd80 pop {r7, pc}
|
|
8005148: 080153ec .word 0x080153ec
|
|
800514c: 08015574 .word 0x08015574
|
|
8005150: 0801543c .word 0x0801543c
|
|
|
|
08005154 <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)
|
|
{
|
|
8005154: b580 push {r7, lr}
|
|
8005156: b082 sub sp, #8
|
|
8005158: af00 add r7, sp, #0
|
|
800515a: 6078 str r0, [r7, #4]
|
|
800515c: 460b mov r3, r1
|
|
800515e: 70fb strb r3, [r7, #3]
|
|
LWIP_ASSERT("netif_issue_reports: invalid netif", netif != NULL);
|
|
8005160: 687b ldr r3, [r7, #4]
|
|
8005162: 2b00 cmp r3, #0
|
|
8005164: d106 bne.n 8005174 <netif_issue_reports+0x20>
|
|
8005166: 4b18 ldr r3, [pc, #96] ; (80051c8 <netif_issue_reports+0x74>)
|
|
8005168: f240 326d movw r2, #877 ; 0x36d
|
|
800516c: 4917 ldr r1, [pc, #92] ; (80051cc <netif_issue_reports+0x78>)
|
|
800516e: 4818 ldr r0, [pc, #96] ; (80051d0 <netif_issue_reports+0x7c>)
|
|
8005170: f00b f9c2 bl 80104f8 <printf>
|
|
|
|
/* Only send reports when both link and admin states are up */
|
|
if (!(netif->flags & NETIF_FLAG_LINK_UP) ||
|
|
8005174: 687b ldr r3, [r7, #4]
|
|
8005176: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
800517a: f003 0304 and.w r3, r3, #4
|
|
800517e: 2b00 cmp r3, #0
|
|
8005180: d01e beq.n 80051c0 <netif_issue_reports+0x6c>
|
|
!(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
|
|
if (!(netif->flags & NETIF_FLAG_LINK_UP) ||
|
|
800518c: 2b00 cmp r3, #0
|
|
800518e: d017 beq.n 80051c0 <netif_issue_reports+0x6c>
|
|
return;
|
|
}
|
|
|
|
#if LWIP_IPV4
|
|
if ((report_type & NETIF_REPORT_TYPE_IPV4) &&
|
|
8005190: 78fb ldrb r3, [r7, #3]
|
|
8005192: f003 0301 and.w r3, r3, #1
|
|
8005196: 2b00 cmp r3, #0
|
|
8005198: d013 beq.n 80051c2 <netif_issue_reports+0x6e>
|
|
!ip4_addr_isany_val(*netif_ip4_addr(netif))) {
|
|
800519a: 687b ldr r3, [r7, #4]
|
|
800519c: 3304 adds r3, #4
|
|
800519e: 681b ldr r3, [r3, #0]
|
|
if ((report_type & NETIF_REPORT_TYPE_IPV4) &&
|
|
80051a0: 2b00 cmp r3, #0
|
|
80051a2: d00e beq.n 80051c2 <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)) {
|
|
80051a4: 687b ldr r3, [r7, #4]
|
|
80051a6: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
80051aa: f003 0308 and.w r3, r3, #8
|
|
80051ae: 2b00 cmp r3, #0
|
|
80051b0: d007 beq.n 80051c2 <netif_issue_reports+0x6e>
|
|
etharp_gratuitous(netif);
|
|
80051b2: 687b ldr r3, [r7, #4]
|
|
80051b4: 3304 adds r3, #4
|
|
80051b6: 4619 mov r1, r3
|
|
80051b8: 6878 ldr r0, [r7, #4]
|
|
80051ba: f009 fc51 bl 800ea60 <etharp_request>
|
|
80051be: e000 b.n 80051c2 <netif_issue_reports+0x6e>
|
|
return;
|
|
80051c0: bf00 nop
|
|
/* send mld memberships */
|
|
mld6_report_groups(netif);
|
|
#endif /* LWIP_IPV6_MLD */
|
|
}
|
|
#endif /* LWIP_IPV6 */
|
|
}
|
|
80051c2: 3708 adds r7, #8
|
|
80051c4: 46bd mov sp, r7
|
|
80051c6: bd80 pop {r7, pc}
|
|
80051c8: 080153ec .word 0x080153ec
|
|
80051cc: 08015590 .word 0x08015590
|
|
80051d0: 0801543c .word 0x0801543c
|
|
|
|
080051d4 <netif_set_down>:
|
|
* @ingroup netif
|
|
* Bring an interface down, disabling any traffic processing.
|
|
*/
|
|
void
|
|
netif_set_down(struct netif *netif)
|
|
{
|
|
80051d4: b580 push {r7, lr}
|
|
80051d6: b082 sub sp, #8
|
|
80051d8: af00 add r7, sp, #0
|
|
80051da: 6078 str r0, [r7, #4]
|
|
LWIP_ASSERT_CORE_LOCKED();
|
|
|
|
LWIP_ERROR("netif_set_down: invalid netif", netif != NULL, return);
|
|
80051dc: 687b ldr r3, [r7, #4]
|
|
80051de: 2b00 cmp r3, #0
|
|
80051e0: d107 bne.n 80051f2 <netif_set_down+0x1e>
|
|
80051e2: 4b12 ldr r3, [pc, #72] ; (800522c <netif_set_down+0x58>)
|
|
80051e4: f240 329b movw r2, #923 ; 0x39b
|
|
80051e8: 4911 ldr r1, [pc, #68] ; (8005230 <netif_set_down+0x5c>)
|
|
80051ea: 4812 ldr r0, [pc, #72] ; (8005234 <netif_set_down+0x60>)
|
|
80051ec: f00b f984 bl 80104f8 <printf>
|
|
80051f0: e019 b.n 8005226 <netif_set_down+0x52>
|
|
|
|
if (netif->flags & NETIF_FLAG_UP) {
|
|
80051f2: 687b ldr r3, [r7, #4]
|
|
80051f4: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
80051f8: f003 0301 and.w r3, r3, #1
|
|
80051fc: 2b00 cmp r3, #0
|
|
80051fe: d012 beq.n 8005226 <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);
|
|
8005200: 687b ldr r3, [r7, #4]
|
|
8005202: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
8005206: f023 0301 bic.w r3, r3, #1
|
|
800520a: b2da uxtb r2, r3
|
|
800520c: 687b ldr r3, [r7, #4]
|
|
800520e: 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) {
|
|
8005212: 687b ldr r3, [r7, #4]
|
|
8005214: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
8005218: f003 0308 and.w r3, r3, #8
|
|
800521c: 2b00 cmp r3, #0
|
|
800521e: d002 beq.n 8005226 <netif_set_down+0x52>
|
|
etharp_cleanup_netif(netif);
|
|
8005220: 6878 ldr r0, [r7, #4]
|
|
8005222: f008 ffd7 bl 800e1d4 <etharp_cleanup_netif>
|
|
nd6_cleanup_netif(netif);
|
|
#endif /* LWIP_IPV6 */
|
|
|
|
NETIF_STATUS_CALLBACK(netif);
|
|
}
|
|
}
|
|
8005226: 3708 adds r7, #8
|
|
8005228: 46bd mov sp, r7
|
|
800522a: bd80 pop {r7, pc}
|
|
800522c: 080153ec .word 0x080153ec
|
|
8005230: 080155b4 .word 0x080155b4
|
|
8005234: 0801543c .word 0x0801543c
|
|
|
|
08005238 <netif_set_link_up>:
|
|
* @ingroup netif
|
|
* Called by a driver when its link goes up
|
|
*/
|
|
void
|
|
netif_set_link_up(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_up: invalid netif", netif != NULL, return);
|
|
8005240: 687b ldr r3, [r7, #4]
|
|
8005242: 2b00 cmp r3, #0
|
|
8005244: d107 bne.n 8005256 <netif_set_link_up+0x1e>
|
|
8005246: 4b15 ldr r3, [pc, #84] ; (800529c <netif_set_link_up+0x64>)
|
|
8005248: f44f 7278 mov.w r2, #992 ; 0x3e0
|
|
800524c: 4914 ldr r1, [pc, #80] ; (80052a0 <netif_set_link_up+0x68>)
|
|
800524e: 4815 ldr r0, [pc, #84] ; (80052a4 <netif_set_link_up+0x6c>)
|
|
8005250: f00b f952 bl 80104f8 <printf>
|
|
8005254: e01e b.n 8005294 <netif_set_link_up+0x5c>
|
|
|
|
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: d117 bne.n 8005294 <netif_set_link_up+0x5c>
|
|
netif_set_flags(netif, NETIF_FLAG_LINK_UP);
|
|
8005264: 687b ldr r3, [r7, #4]
|
|
8005266: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
800526a: f043 0304 orr.w r3, r3, #4
|
|
800526e: b2da uxtb r2, r3
|
|
8005270: 687b ldr r3, [r7, #4]
|
|
8005272: f883 2031 strb.w r2, [r3, #49] ; 0x31
|
|
|
|
#if LWIP_DHCP
|
|
dhcp_network_changed(netif);
|
|
8005276: 6878 ldr r0, [r7, #4]
|
|
8005278: f007 fa1c bl 800c6b4 <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);
|
|
800527c: 2103 movs r1, #3
|
|
800527e: 6878 ldr r0, [r7, #4]
|
|
8005280: f7ff ff68 bl 8005154 <netif_issue_reports>
|
|
#if LWIP_IPV6
|
|
nd6_restart_netif(netif);
|
|
#endif /* LWIP_IPV6 */
|
|
|
|
NETIF_LINK_CALLBACK(netif);
|
|
8005284: 687b ldr r3, [r7, #4]
|
|
8005286: 69db ldr r3, [r3, #28]
|
|
8005288: 2b00 cmp r3, #0
|
|
800528a: d003 beq.n 8005294 <netif_set_link_up+0x5c>
|
|
800528c: 687b ldr r3, [r7, #4]
|
|
800528e: 69db ldr r3, [r3, #28]
|
|
8005290: 6878 ldr r0, [r7, #4]
|
|
8005292: 4798 blx r3
|
|
args.link_changed.state = 1;
|
|
netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args);
|
|
}
|
|
#endif
|
|
}
|
|
}
|
|
8005294: 3708 adds r7, #8
|
|
8005296: 46bd mov sp, r7
|
|
8005298: bd80 pop {r7, pc}
|
|
800529a: bf00 nop
|
|
800529c: 080153ec .word 0x080153ec
|
|
80052a0: 080155d4 .word 0x080155d4
|
|
80052a4: 0801543c .word 0x0801543c
|
|
|
|
080052a8 <netif_set_link_down>:
|
|
* @ingroup netif
|
|
* Called by a driver when its link goes down
|
|
*/
|
|
void
|
|
netif_set_link_down(struct netif *netif)
|
|
{
|
|
80052a8: b580 push {r7, lr}
|
|
80052aa: b082 sub sp, #8
|
|
80052ac: af00 add r7, sp, #0
|
|
80052ae: 6078 str r0, [r7, #4]
|
|
LWIP_ASSERT_CORE_LOCKED();
|
|
|
|
LWIP_ERROR("netif_set_link_down: invalid netif", netif != NULL, return);
|
|
80052b0: 687b ldr r3, [r7, #4]
|
|
80052b2: 2b00 cmp r3, #0
|
|
80052b4: d107 bne.n 80052c6 <netif_set_link_down+0x1e>
|
|
80052b6: 4b11 ldr r3, [pc, #68] ; (80052fc <netif_set_link_down+0x54>)
|
|
80052b8: f240 4206 movw r2, #1030 ; 0x406
|
|
80052bc: 4910 ldr r1, [pc, #64] ; (8005300 <netif_set_link_down+0x58>)
|
|
80052be: 4811 ldr r0, [pc, #68] ; (8005304 <netif_set_link_down+0x5c>)
|
|
80052c0: f00b f91a bl 80104f8 <printf>
|
|
80052c4: e017 b.n 80052f6 <netif_set_link_down+0x4e>
|
|
|
|
if (netif->flags & NETIF_FLAG_LINK_UP) {
|
|
80052c6: 687b ldr r3, [r7, #4]
|
|
80052c8: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
80052cc: f003 0304 and.w r3, r3, #4
|
|
80052d0: 2b00 cmp r3, #0
|
|
80052d2: d010 beq.n 80052f6 <netif_set_link_down+0x4e>
|
|
netif_clear_flags(netif, NETIF_FLAG_LINK_UP);
|
|
80052d4: 687b ldr r3, [r7, #4]
|
|
80052d6: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
80052da: f023 0304 bic.w r3, r3, #4
|
|
80052de: b2da uxtb r2, r3
|
|
80052e0: 687b ldr r3, [r7, #4]
|
|
80052e2: f883 2031 strb.w r2, [r3, #49] ; 0x31
|
|
NETIF_LINK_CALLBACK(netif);
|
|
80052e6: 687b ldr r3, [r7, #4]
|
|
80052e8: 69db ldr r3, [r3, #28]
|
|
80052ea: 2b00 cmp r3, #0
|
|
80052ec: d003 beq.n 80052f6 <netif_set_link_down+0x4e>
|
|
80052ee: 687b ldr r3, [r7, #4]
|
|
80052f0: 69db ldr r3, [r3, #28]
|
|
80052f2: 6878 ldr r0, [r7, #4]
|
|
80052f4: 4798 blx r3
|
|
args.link_changed.state = 0;
|
|
netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args);
|
|
}
|
|
#endif
|
|
}
|
|
}
|
|
80052f6: 3708 adds r7, #8
|
|
80052f8: 46bd mov sp, r7
|
|
80052fa: bd80 pop {r7, pc}
|
|
80052fc: 080153ec .word 0x080153ec
|
|
8005300: 080155f8 .word 0x080155f8
|
|
8005304: 0801543c .word 0x0801543c
|
|
|
|
08005308 <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)
|
|
{
|
|
8005308: b480 push {r7}
|
|
800530a: b083 sub sp, #12
|
|
800530c: af00 add r7, sp, #0
|
|
800530e: 6078 str r0, [r7, #4]
|
|
8005310: 6039 str r1, [r7, #0]
|
|
LWIP_ASSERT_CORE_LOCKED();
|
|
|
|
if (netif) {
|
|
8005312: 687b ldr r3, [r7, #4]
|
|
8005314: 2b00 cmp r3, #0
|
|
8005316: d002 beq.n 800531e <netif_set_link_callback+0x16>
|
|
netif->link_callback = link_callback;
|
|
8005318: 687b ldr r3, [r7, #4]
|
|
800531a: 683a ldr r2, [r7, #0]
|
|
800531c: 61da str r2, [r3, #28]
|
|
}
|
|
}
|
|
800531e: bf00 nop
|
|
8005320: 370c adds r7, #12
|
|
8005322: 46bd mov sp, r7
|
|
8005324: f85d 7b04 ldr.w r7, [sp], #4
|
|
8005328: 4770 bx lr
|
|
|
|
0800532a <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)
|
|
{
|
|
800532a: b480 push {r7}
|
|
800532c: b085 sub sp, #20
|
|
800532e: af00 add r7, sp, #0
|
|
8005330: 60f8 str r0, [r7, #12]
|
|
8005332: 60b9 str r1, [r7, #8]
|
|
8005334: 607a str r2, [r7, #4]
|
|
LWIP_UNUSED_ARG(netif);
|
|
LWIP_UNUSED_ARG(p);
|
|
LWIP_UNUSED_ARG(ipaddr);
|
|
|
|
return ERR_IF;
|
|
8005336: f06f 030b mvn.w r3, #11
|
|
}
|
|
800533a: 4618 mov r0, r3
|
|
800533c: 3714 adds r7, #20
|
|
800533e: 46bd mov sp, r7
|
|
8005340: f85d 7b04 ldr.w r7, [sp], #4
|
|
8005344: 4770 bx lr
|
|
...
|
|
|
|
08005348 <netif_get_by_index>:
|
|
*
|
|
* @param idx index of netif to find
|
|
*/
|
|
struct netif *
|
|
netif_get_by_index(u8_t idx)
|
|
{
|
|
8005348: b480 push {r7}
|
|
800534a: b085 sub sp, #20
|
|
800534c: af00 add r7, sp, #0
|
|
800534e: 4603 mov r3, r0
|
|
8005350: 71fb strb r3, [r7, #7]
|
|
struct netif *netif;
|
|
|
|
LWIP_ASSERT_CORE_LOCKED();
|
|
|
|
if (idx != NETIF_NO_INDEX) {
|
|
8005352: 79fb ldrb r3, [r7, #7]
|
|
8005354: 2b00 cmp r3, #0
|
|
8005356: d013 beq.n 8005380 <netif_get_by_index+0x38>
|
|
NETIF_FOREACH(netif) {
|
|
8005358: 4b0d ldr r3, [pc, #52] ; (8005390 <netif_get_by_index+0x48>)
|
|
800535a: 681b ldr r3, [r3, #0]
|
|
800535c: 60fb str r3, [r7, #12]
|
|
800535e: e00c b.n 800537a <netif_get_by_index+0x32>
|
|
if (idx == netif_get_index(netif)) {
|
|
8005360: 68fb ldr r3, [r7, #12]
|
|
8005362: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
|
|
8005366: 3301 adds r3, #1
|
|
8005368: b2db uxtb r3, r3
|
|
800536a: 79fa ldrb r2, [r7, #7]
|
|
800536c: 429a cmp r2, r3
|
|
800536e: d101 bne.n 8005374 <netif_get_by_index+0x2c>
|
|
return netif; /* found! */
|
|
8005370: 68fb ldr r3, [r7, #12]
|
|
8005372: e006 b.n 8005382 <netif_get_by_index+0x3a>
|
|
NETIF_FOREACH(netif) {
|
|
8005374: 68fb ldr r3, [r7, #12]
|
|
8005376: 681b ldr r3, [r3, #0]
|
|
8005378: 60fb str r3, [r7, #12]
|
|
800537a: 68fb ldr r3, [r7, #12]
|
|
800537c: 2b00 cmp r3, #0
|
|
800537e: d1ef bne.n 8005360 <netif_get_by_index+0x18>
|
|
}
|
|
}
|
|
}
|
|
|
|
return NULL;
|
|
8005380: 2300 movs r3, #0
|
|
}
|
|
8005382: 4618 mov r0, r3
|
|
8005384: 3714 adds r7, #20
|
|
8005386: 46bd mov sp, r7
|
|
8005388: f85d 7b04 ldr.w r7, [sp], #4
|
|
800538c: 4770 bx lr
|
|
800538e: bf00 nop
|
|
8005390: 20008bf4 .word 0x20008bf4
|
|
|
|
08005394 <pbuf_free_ooseq>:
|
|
#if !NO_SYS
|
|
static
|
|
#endif /* !NO_SYS */
|
|
void
|
|
pbuf_free_ooseq(void)
|
|
{
|
|
8005394: b580 push {r7, lr}
|
|
8005396: b082 sub sp, #8
|
|
8005398: af00 add r7, sp, #0
|
|
struct tcp_pcb *pcb;
|
|
SYS_ARCH_SET(pbuf_free_ooseq_pending, 0);
|
|
800539a: 4b0c ldr r3, [pc, #48] ; (80053cc <pbuf_free_ooseq+0x38>)
|
|
800539c: 2200 movs r2, #0
|
|
800539e: 701a strb r2, [r3, #0]
|
|
|
|
for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) {
|
|
80053a0: 4b0b ldr r3, [pc, #44] ; (80053d0 <pbuf_free_ooseq+0x3c>)
|
|
80053a2: 681b ldr r3, [r3, #0]
|
|
80053a4: 607b str r3, [r7, #4]
|
|
80053a6: e00a b.n 80053be <pbuf_free_ooseq+0x2a>
|
|
if (pcb->ooseq != NULL) {
|
|
80053a8: 687b ldr r3, [r7, #4]
|
|
80053aa: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
80053ac: 2b00 cmp r3, #0
|
|
80053ae: d003 beq.n 80053b8 <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);
|
|
80053b0: 6878 ldr r0, [r7, #4]
|
|
80053b2: f002 f94d bl 8007650 <tcp_free_ooseq>
|
|
return;
|
|
80053b6: e005 b.n 80053c4 <pbuf_free_ooseq+0x30>
|
|
for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) {
|
|
80053b8: 687b ldr r3, [r7, #4]
|
|
80053ba: 68db ldr r3, [r3, #12]
|
|
80053bc: 607b str r3, [r7, #4]
|
|
80053be: 687b ldr r3, [r7, #4]
|
|
80053c0: 2b00 cmp r3, #0
|
|
80053c2: d1f1 bne.n 80053a8 <pbuf_free_ooseq+0x14>
|
|
}
|
|
}
|
|
}
|
|
80053c4: 3708 adds r7, #8
|
|
80053c6: 46bd mov sp, r7
|
|
80053c8: bd80 pop {r7, pc}
|
|
80053ca: bf00 nop
|
|
80053cc: 20008bfd .word 0x20008bfd
|
|
80053d0: 20008c0c .word 0x20008c0c
|
|
|
|
080053d4 <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)
|
|
{
|
|
80053d4: b480 push {r7}
|
|
80053d6: af00 add r7, sp, #0
|
|
#ifndef PBUF_POOL_FREE_OOSEQ_QUEUE_CALL
|
|
SYS_ARCH_SET(pbuf_free_ooseq_pending, 1);
|
|
80053d8: 4b03 ldr r3, [pc, #12] ; (80053e8 <pbuf_pool_is_empty+0x14>)
|
|
80053da: 2201 movs r2, #1
|
|
80053dc: 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 */
|
|
}
|
|
80053de: bf00 nop
|
|
80053e0: 46bd mov sp, r7
|
|
80053e2: f85d 7b04 ldr.w r7, [sp], #4
|
|
80053e6: 4770 bx lr
|
|
80053e8: 20008bfd .word 0x20008bfd
|
|
|
|
080053ec <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)
|
|
{
|
|
80053ec: b480 push {r7}
|
|
80053ee: b085 sub sp, #20
|
|
80053f0: af00 add r7, sp, #0
|
|
80053f2: 60f8 str r0, [r7, #12]
|
|
80053f4: 60b9 str r1, [r7, #8]
|
|
80053f6: 4611 mov r1, r2
|
|
80053f8: 461a mov r2, r3
|
|
80053fa: 460b mov r3, r1
|
|
80053fc: 80fb strh r3, [r7, #6]
|
|
80053fe: 4613 mov r3, r2
|
|
8005400: 80bb strh r3, [r7, #4]
|
|
p->next = NULL;
|
|
8005402: 68fb ldr r3, [r7, #12]
|
|
8005404: 2200 movs r2, #0
|
|
8005406: 601a str r2, [r3, #0]
|
|
p->payload = payload;
|
|
8005408: 68fb ldr r3, [r7, #12]
|
|
800540a: 68ba ldr r2, [r7, #8]
|
|
800540c: 605a str r2, [r3, #4]
|
|
p->tot_len = tot_len;
|
|
800540e: 68fb ldr r3, [r7, #12]
|
|
8005410: 88fa ldrh r2, [r7, #6]
|
|
8005412: 811a strh r2, [r3, #8]
|
|
p->len = len;
|
|
8005414: 68fb ldr r3, [r7, #12]
|
|
8005416: 88ba ldrh r2, [r7, #4]
|
|
8005418: 815a strh r2, [r3, #10]
|
|
p->type_internal = (u8_t)type;
|
|
800541a: 8b3b ldrh r3, [r7, #24]
|
|
800541c: b2da uxtb r2, r3
|
|
800541e: 68fb ldr r3, [r7, #12]
|
|
8005420: 731a strb r2, [r3, #12]
|
|
p->flags = flags;
|
|
8005422: 68fb ldr r3, [r7, #12]
|
|
8005424: 7f3a ldrb r2, [r7, #28]
|
|
8005426: 735a strb r2, [r3, #13]
|
|
p->ref = 1;
|
|
8005428: 68fb ldr r3, [r7, #12]
|
|
800542a: 2201 movs r2, #1
|
|
800542c: 739a strb r2, [r3, #14]
|
|
p->if_idx = NETIF_NO_INDEX;
|
|
800542e: 68fb ldr r3, [r7, #12]
|
|
8005430: 2200 movs r2, #0
|
|
8005432: 73da strb r2, [r3, #15]
|
|
}
|
|
8005434: bf00 nop
|
|
8005436: 3714 adds r7, #20
|
|
8005438: 46bd mov sp, r7
|
|
800543a: f85d 7b04 ldr.w r7, [sp], #4
|
|
800543e: 4770 bx lr
|
|
|
|
08005440 <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)
|
|
{
|
|
8005440: b580 push {r7, lr}
|
|
8005442: b08c sub sp, #48 ; 0x30
|
|
8005444: af02 add r7, sp, #8
|
|
8005446: 4603 mov r3, r0
|
|
8005448: 71fb strb r3, [r7, #7]
|
|
800544a: 460b mov r3, r1
|
|
800544c: 80bb strh r3, [r7, #4]
|
|
800544e: 4613 mov r3, r2
|
|
8005450: 807b strh r3, [r7, #2]
|
|
struct pbuf *p;
|
|
u16_t offset = (u16_t)layer;
|
|
8005452: 79fb ldrb r3, [r7, #7]
|
|
8005454: 847b strh r3, [r7, #34] ; 0x22
|
|
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length));
|
|
|
|
switch (type) {
|
|
8005456: 887b ldrh r3, [r7, #2]
|
|
8005458: f5b3 7f20 cmp.w r3, #640 ; 0x280
|
|
800545c: d07f beq.n 800555e <pbuf_alloc+0x11e>
|
|
800545e: f5b3 7f20 cmp.w r3, #640 ; 0x280
|
|
8005462: f300 80c8 bgt.w 80055f6 <pbuf_alloc+0x1b6>
|
|
8005466: f5b3 7fc1 cmp.w r3, #386 ; 0x182
|
|
800546a: d010 beq.n 800548e <pbuf_alloc+0x4e>
|
|
800546c: f5b3 7fc1 cmp.w r3, #386 ; 0x182
|
|
8005470: f300 80c1 bgt.w 80055f6 <pbuf_alloc+0x1b6>
|
|
8005474: 2b01 cmp r3, #1
|
|
8005476: d002 beq.n 800547e <pbuf_alloc+0x3e>
|
|
8005478: 2b41 cmp r3, #65 ; 0x41
|
|
800547a: f040 80bc bne.w 80055f6 <pbuf_alloc+0x1b6>
|
|
case PBUF_REF: /* fall through */
|
|
case PBUF_ROM:
|
|
p = pbuf_alloc_reference(NULL, length, type);
|
|
800547e: 887a ldrh r2, [r7, #2]
|
|
8005480: 88bb ldrh r3, [r7, #4]
|
|
8005482: 4619 mov r1, r3
|
|
8005484: 2000 movs r0, #0
|
|
8005486: f000 f8d1 bl 800562c <pbuf_alloc_reference>
|
|
800548a: 6278 str r0, [r7, #36] ; 0x24
|
|
break;
|
|
800548c: e0bd b.n 800560a <pbuf_alloc+0x1ca>
|
|
case PBUF_POOL: {
|
|
struct pbuf *q, *last;
|
|
u16_t rem_len; /* remaining length */
|
|
p = NULL;
|
|
800548e: 2300 movs r3, #0
|
|
8005490: 627b str r3, [r7, #36] ; 0x24
|
|
last = NULL;
|
|
8005492: 2300 movs r3, #0
|
|
8005494: 61fb str r3, [r7, #28]
|
|
rem_len = length;
|
|
8005496: 88bb ldrh r3, [r7, #4]
|
|
8005498: 837b strh r3, [r7, #26]
|
|
do {
|
|
u16_t qlen;
|
|
q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL);
|
|
800549a: 2008 movs r0, #8
|
|
800549c: f7ff fbc2 bl 8004c24 <memp_malloc>
|
|
80054a0: 6138 str r0, [r7, #16]
|
|
if (q == NULL) {
|
|
80054a2: 693b ldr r3, [r7, #16]
|
|
80054a4: 2b00 cmp r3, #0
|
|
80054a6: d109 bne.n 80054bc <pbuf_alloc+0x7c>
|
|
PBUF_POOL_IS_EMPTY();
|
|
80054a8: f7ff ff94 bl 80053d4 <pbuf_pool_is_empty>
|
|
/* free chain so far allocated */
|
|
if (p) {
|
|
80054ac: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
80054ae: 2b00 cmp r3, #0
|
|
80054b0: d002 beq.n 80054b8 <pbuf_alloc+0x78>
|
|
pbuf_free(p);
|
|
80054b2: 6a78 ldr r0, [r7, #36] ; 0x24
|
|
80054b4: f000 faa8 bl 8005a08 <pbuf_free>
|
|
}
|
|
/* bail out unsuccessfully */
|
|
return NULL;
|
|
80054b8: 2300 movs r3, #0
|
|
80054ba: e0a7 b.n 800560c <pbuf_alloc+0x1cc>
|
|
}
|
|
qlen = LWIP_MIN(rem_len, (u16_t)(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)));
|
|
80054bc: 8c7b ldrh r3, [r7, #34] ; 0x22
|
|
80054be: 3303 adds r3, #3
|
|
80054c0: b29b uxth r3, r3
|
|
80054c2: f023 0303 bic.w r3, r3, #3
|
|
80054c6: b29b uxth r3, r3
|
|
80054c8: f5c3 7314 rsb r3, r3, #592 ; 0x250
|
|
80054cc: b29b uxth r3, r3
|
|
80054ce: 8b7a ldrh r2, [r7, #26]
|
|
80054d0: 4293 cmp r3, r2
|
|
80054d2: bf28 it cs
|
|
80054d4: 4613 movcs r3, r2
|
|
80054d6: 81fb strh r3, [r7, #14]
|
|
pbuf_init_alloced_pbuf(q, LWIP_MEM_ALIGN((void *)((u8_t *)q + SIZEOF_STRUCT_PBUF + offset)),
|
|
80054d8: 8c7b ldrh r3, [r7, #34] ; 0x22
|
|
80054da: 3310 adds r3, #16
|
|
80054dc: 693a ldr r2, [r7, #16]
|
|
80054de: 4413 add r3, r2
|
|
80054e0: 3303 adds r3, #3
|
|
80054e2: f023 0303 bic.w r3, r3, #3
|
|
80054e6: 4618 mov r0, r3
|
|
80054e8: 89f9 ldrh r1, [r7, #14]
|
|
80054ea: 8b7a ldrh r2, [r7, #26]
|
|
80054ec: 2300 movs r3, #0
|
|
80054ee: 9301 str r3, [sp, #4]
|
|
80054f0: 887b ldrh r3, [r7, #2]
|
|
80054f2: 9300 str r3, [sp, #0]
|
|
80054f4: 460b mov r3, r1
|
|
80054f6: 4601 mov r1, r0
|
|
80054f8: 6938 ldr r0, [r7, #16]
|
|
80054fa: f7ff ff77 bl 80053ec <pbuf_init_alloced_pbuf>
|
|
rem_len, qlen, type, 0);
|
|
LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned",
|
|
80054fe: 693b ldr r3, [r7, #16]
|
|
8005500: 685b ldr r3, [r3, #4]
|
|
8005502: f003 0303 and.w r3, r3, #3
|
|
8005506: 2b00 cmp r3, #0
|
|
8005508: d006 beq.n 8005518 <pbuf_alloc+0xd8>
|
|
800550a: 4b42 ldr r3, [pc, #264] ; (8005614 <pbuf_alloc+0x1d4>)
|
|
800550c: f44f 7280 mov.w r2, #256 ; 0x100
|
|
8005510: 4941 ldr r1, [pc, #260] ; (8005618 <pbuf_alloc+0x1d8>)
|
|
8005512: 4842 ldr r0, [pc, #264] ; (800561c <pbuf_alloc+0x1dc>)
|
|
8005514: f00a fff0 bl 80104f8 <printf>
|
|
((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0);
|
|
LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT",
|
|
8005518: 8c7b ldrh r3, [r7, #34] ; 0x22
|
|
800551a: 3303 adds r3, #3
|
|
800551c: f023 0303 bic.w r3, r3, #3
|
|
8005520: f5b3 7f14 cmp.w r3, #592 ; 0x250
|
|
8005524: d106 bne.n 8005534 <pbuf_alloc+0xf4>
|
|
8005526: 4b3b ldr r3, [pc, #236] ; (8005614 <pbuf_alloc+0x1d4>)
|
|
8005528: f44f 7281 mov.w r2, #258 ; 0x102
|
|
800552c: 493c ldr r1, [pc, #240] ; (8005620 <pbuf_alloc+0x1e0>)
|
|
800552e: 483b ldr r0, [pc, #236] ; (800561c <pbuf_alloc+0x1dc>)
|
|
8005530: f00a ffe2 bl 80104f8 <printf>
|
|
(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 );
|
|
if (p == NULL) {
|
|
8005534: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
8005536: 2b00 cmp r3, #0
|
|
8005538: d102 bne.n 8005540 <pbuf_alloc+0x100>
|
|
/* allocated head of pbuf chain (into p) */
|
|
p = q;
|
|
800553a: 693b ldr r3, [r7, #16]
|
|
800553c: 627b str r3, [r7, #36] ; 0x24
|
|
800553e: e002 b.n 8005546 <pbuf_alloc+0x106>
|
|
} else {
|
|
/* make previous pbuf point to this pbuf */
|
|
last->next = q;
|
|
8005540: 69fb ldr r3, [r7, #28]
|
|
8005542: 693a ldr r2, [r7, #16]
|
|
8005544: 601a str r2, [r3, #0]
|
|
}
|
|
last = q;
|
|
8005546: 693b ldr r3, [r7, #16]
|
|
8005548: 61fb str r3, [r7, #28]
|
|
rem_len = (u16_t)(rem_len - qlen);
|
|
800554a: 8b7a ldrh r2, [r7, #26]
|
|
800554c: 89fb ldrh r3, [r7, #14]
|
|
800554e: 1ad3 subs r3, r2, r3
|
|
8005550: 837b strh r3, [r7, #26]
|
|
offset = 0;
|
|
8005552: 2300 movs r3, #0
|
|
8005554: 847b strh r3, [r7, #34] ; 0x22
|
|
} while (rem_len > 0);
|
|
8005556: 8b7b ldrh r3, [r7, #26]
|
|
8005558: 2b00 cmp r3, #0
|
|
800555a: d19e bne.n 800549a <pbuf_alloc+0x5a>
|
|
break;
|
|
800555c: e055 b.n 800560a <pbuf_alloc+0x1ca>
|
|
}
|
|
case PBUF_RAM: {
|
|
u16_t payload_len = (u16_t)(LWIP_MEM_ALIGN_SIZE(offset) + LWIP_MEM_ALIGN_SIZE(length));
|
|
800555e: 8c7b ldrh r3, [r7, #34] ; 0x22
|
|
8005560: 3303 adds r3, #3
|
|
8005562: b29b uxth r3, r3
|
|
8005564: f023 0303 bic.w r3, r3, #3
|
|
8005568: b29a uxth r2, r3
|
|
800556a: 88bb ldrh r3, [r7, #4]
|
|
800556c: 3303 adds r3, #3
|
|
800556e: b29b uxth r3, r3
|
|
8005570: f023 0303 bic.w r3, r3, #3
|
|
8005574: b29b uxth r3, r3
|
|
8005576: 4413 add r3, r2
|
|
8005578: 833b strh r3, [r7, #24]
|
|
mem_size_t alloc_len = (mem_size_t)(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF) + payload_len);
|
|
800557a: 8b3b ldrh r3, [r7, #24]
|
|
800557c: 3310 adds r3, #16
|
|
800557e: 82fb strh r3, [r7, #22]
|
|
|
|
/* bug #50040: Check for integer overflow when calculating alloc_len */
|
|
if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) ||
|
|
8005580: 8b3a ldrh r2, [r7, #24]
|
|
8005582: 88bb ldrh r3, [r7, #4]
|
|
8005584: 3303 adds r3, #3
|
|
8005586: f023 0303 bic.w r3, r3, #3
|
|
800558a: 429a cmp r2, r3
|
|
800558c: d306 bcc.n 800559c <pbuf_alloc+0x15c>
|
|
(alloc_len < LWIP_MEM_ALIGN_SIZE(length))) {
|
|
800558e: 8afa ldrh r2, [r7, #22]
|
|
8005590: 88bb ldrh r3, [r7, #4]
|
|
8005592: 3303 adds r3, #3
|
|
8005594: f023 0303 bic.w r3, r3, #3
|
|
if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) ||
|
|
8005598: 429a cmp r2, r3
|
|
800559a: d201 bcs.n 80055a0 <pbuf_alloc+0x160>
|
|
return NULL;
|
|
800559c: 2300 movs r3, #0
|
|
800559e: e035 b.n 800560c <pbuf_alloc+0x1cc>
|
|
}
|
|
|
|
/* If pbuf is to be allocated in RAM, allocate memory for it. */
|
|
p = (struct pbuf *)mem_malloc(alloc_len);
|
|
80055a0: 8afb ldrh r3, [r7, #22]
|
|
80055a2: 4618 mov r0, r3
|
|
80055a4: f7ff f9ae bl 8004904 <mem_malloc>
|
|
80055a8: 6278 str r0, [r7, #36] ; 0x24
|
|
if (p == NULL) {
|
|
80055aa: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
80055ac: 2b00 cmp r3, #0
|
|
80055ae: d101 bne.n 80055b4 <pbuf_alloc+0x174>
|
|
return NULL;
|
|
80055b0: 2300 movs r3, #0
|
|
80055b2: e02b b.n 800560c <pbuf_alloc+0x1cc>
|
|
}
|
|
pbuf_init_alloced_pbuf(p, LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)),
|
|
80055b4: 8c7b ldrh r3, [r7, #34] ; 0x22
|
|
80055b6: 3310 adds r3, #16
|
|
80055b8: 6a7a ldr r2, [r7, #36] ; 0x24
|
|
80055ba: 4413 add r3, r2
|
|
80055bc: 3303 adds r3, #3
|
|
80055be: f023 0303 bic.w r3, r3, #3
|
|
80055c2: 4618 mov r0, r3
|
|
80055c4: 88b9 ldrh r1, [r7, #4]
|
|
80055c6: 88ba ldrh r2, [r7, #4]
|
|
80055c8: 2300 movs r3, #0
|
|
80055ca: 9301 str r3, [sp, #4]
|
|
80055cc: 887b ldrh r3, [r7, #2]
|
|
80055ce: 9300 str r3, [sp, #0]
|
|
80055d0: 460b mov r3, r1
|
|
80055d2: 4601 mov r1, r0
|
|
80055d4: 6a78 ldr r0, [r7, #36] ; 0x24
|
|
80055d6: f7ff ff09 bl 80053ec <pbuf_init_alloced_pbuf>
|
|
length, length, type, 0);
|
|
LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned",
|
|
80055da: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
80055dc: 685b ldr r3, [r3, #4]
|
|
80055de: f003 0303 and.w r3, r3, #3
|
|
80055e2: 2b00 cmp r3, #0
|
|
80055e4: d010 beq.n 8005608 <pbuf_alloc+0x1c8>
|
|
80055e6: 4b0b ldr r3, [pc, #44] ; (8005614 <pbuf_alloc+0x1d4>)
|
|
80055e8: f44f 7291 mov.w r2, #290 ; 0x122
|
|
80055ec: 490d ldr r1, [pc, #52] ; (8005624 <pbuf_alloc+0x1e4>)
|
|
80055ee: 480b ldr r0, [pc, #44] ; (800561c <pbuf_alloc+0x1dc>)
|
|
80055f0: f00a ff82 bl 80104f8 <printf>
|
|
((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0);
|
|
break;
|
|
80055f4: e008 b.n 8005608 <pbuf_alloc+0x1c8>
|
|
}
|
|
default:
|
|
LWIP_ASSERT("pbuf_alloc: erroneous type", 0);
|
|
80055f6: 4b07 ldr r3, [pc, #28] ; (8005614 <pbuf_alloc+0x1d4>)
|
|
80055f8: f240 1227 movw r2, #295 ; 0x127
|
|
80055fc: 490a ldr r1, [pc, #40] ; (8005628 <pbuf_alloc+0x1e8>)
|
|
80055fe: 4807 ldr r0, [pc, #28] ; (800561c <pbuf_alloc+0x1dc>)
|
|
8005600: f00a ff7a bl 80104f8 <printf>
|
|
return NULL;
|
|
8005604: 2300 movs r3, #0
|
|
8005606: e001 b.n 800560c <pbuf_alloc+0x1cc>
|
|
break;
|
|
8005608: bf00 nop
|
|
}
|
|
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p));
|
|
return p;
|
|
800560a: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
}
|
|
800560c: 4618 mov r0, r3
|
|
800560e: 3728 adds r7, #40 ; 0x28
|
|
8005610: 46bd mov sp, r7
|
|
8005612: bd80 pop {r7, pc}
|
|
8005614: 0801561c .word 0x0801561c
|
|
8005618: 0801564c .word 0x0801564c
|
|
800561c: 0801567c .word 0x0801567c
|
|
8005620: 080156a4 .word 0x080156a4
|
|
8005624: 080156d8 .word 0x080156d8
|
|
8005628: 08015704 .word 0x08015704
|
|
|
|
0800562c <pbuf_alloc_reference>:
|
|
*
|
|
* @return the allocated pbuf.
|
|
*/
|
|
struct pbuf *
|
|
pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type)
|
|
{
|
|
800562c: b580 push {r7, lr}
|
|
800562e: b086 sub sp, #24
|
|
8005630: af02 add r7, sp, #8
|
|
8005632: 6078 str r0, [r7, #4]
|
|
8005634: 460b mov r3, r1
|
|
8005636: 807b strh r3, [r7, #2]
|
|
8005638: 4613 mov r3, r2
|
|
800563a: 803b strh r3, [r7, #0]
|
|
struct pbuf *p;
|
|
LWIP_ASSERT("invalid pbuf_type", (type == PBUF_REF) || (type == PBUF_ROM));
|
|
800563c: 883b ldrh r3, [r7, #0]
|
|
800563e: 2b41 cmp r3, #65 ; 0x41
|
|
8005640: d009 beq.n 8005656 <pbuf_alloc_reference+0x2a>
|
|
8005642: 883b ldrh r3, [r7, #0]
|
|
8005644: 2b01 cmp r3, #1
|
|
8005646: d006 beq.n 8005656 <pbuf_alloc_reference+0x2a>
|
|
8005648: 4b0f ldr r3, [pc, #60] ; (8005688 <pbuf_alloc_reference+0x5c>)
|
|
800564a: f44f 72a5 mov.w r2, #330 ; 0x14a
|
|
800564e: 490f ldr r1, [pc, #60] ; (800568c <pbuf_alloc_reference+0x60>)
|
|
8005650: 480f ldr r0, [pc, #60] ; (8005690 <pbuf_alloc_reference+0x64>)
|
|
8005652: f00a ff51 bl 80104f8 <printf>
|
|
/* only allocate memory for the pbuf structure */
|
|
p = (struct pbuf *)memp_malloc(MEMP_PBUF);
|
|
8005656: 2007 movs r0, #7
|
|
8005658: f7ff fae4 bl 8004c24 <memp_malloc>
|
|
800565c: 60f8 str r0, [r7, #12]
|
|
if (p == NULL) {
|
|
800565e: 68fb ldr r3, [r7, #12]
|
|
8005660: 2b00 cmp r3, #0
|
|
8005662: d101 bne.n 8005668 <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;
|
|
8005664: 2300 movs r3, #0
|
|
8005666: e00b b.n 8005680 <pbuf_alloc_reference+0x54>
|
|
}
|
|
pbuf_init_alloced_pbuf(p, payload, length, length, type, 0);
|
|
8005668: 8879 ldrh r1, [r7, #2]
|
|
800566a: 887a ldrh r2, [r7, #2]
|
|
800566c: 2300 movs r3, #0
|
|
800566e: 9301 str r3, [sp, #4]
|
|
8005670: 883b ldrh r3, [r7, #0]
|
|
8005672: 9300 str r3, [sp, #0]
|
|
8005674: 460b mov r3, r1
|
|
8005676: 6879 ldr r1, [r7, #4]
|
|
8005678: 68f8 ldr r0, [r7, #12]
|
|
800567a: f7ff feb7 bl 80053ec <pbuf_init_alloced_pbuf>
|
|
return p;
|
|
800567e: 68fb ldr r3, [r7, #12]
|
|
}
|
|
8005680: 4618 mov r0, r3
|
|
8005682: 3710 adds r7, #16
|
|
8005684: 46bd mov sp, r7
|
|
8005686: bd80 pop {r7, pc}
|
|
8005688: 0801561c .word 0x0801561c
|
|
800568c: 08015720 .word 0x08015720
|
|
8005690: 0801567c .word 0x0801567c
|
|
|
|
08005694 <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)
|
|
{
|
|
8005694: b580 push {r7, lr}
|
|
8005696: b088 sub sp, #32
|
|
8005698: af02 add r7, sp, #8
|
|
800569a: 607b str r3, [r7, #4]
|
|
800569c: 4603 mov r3, r0
|
|
800569e: 73fb strb r3, [r7, #15]
|
|
80056a0: 460b mov r3, r1
|
|
80056a2: 81bb strh r3, [r7, #12]
|
|
80056a4: 4613 mov r3, r2
|
|
80056a6: 817b strh r3, [r7, #10]
|
|
u16_t offset = (u16_t)l;
|
|
80056a8: 7bfb ldrb r3, [r7, #15]
|
|
80056aa: 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) {
|
|
80056ac: 8a7b ldrh r3, [r7, #18]
|
|
80056ae: 3303 adds r3, #3
|
|
80056b0: f023 0203 bic.w r2, r3, #3
|
|
80056b4: 89bb ldrh r3, [r7, #12]
|
|
80056b6: 441a add r2, r3
|
|
80056b8: 8cbb ldrh r3, [r7, #36] ; 0x24
|
|
80056ba: 429a cmp r2, r3
|
|
80056bc: d901 bls.n 80056c2 <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;
|
|
80056be: 2300 movs r3, #0
|
|
80056c0: e018 b.n 80056f4 <pbuf_alloced_custom+0x60>
|
|
}
|
|
|
|
if (payload_mem != NULL) {
|
|
80056c2: 6a3b ldr r3, [r7, #32]
|
|
80056c4: 2b00 cmp r3, #0
|
|
80056c6: d007 beq.n 80056d8 <pbuf_alloced_custom+0x44>
|
|
payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset);
|
|
80056c8: 8a7b ldrh r3, [r7, #18]
|
|
80056ca: 3303 adds r3, #3
|
|
80056cc: f023 0303 bic.w r3, r3, #3
|
|
80056d0: 6a3a ldr r2, [r7, #32]
|
|
80056d2: 4413 add r3, r2
|
|
80056d4: 617b str r3, [r7, #20]
|
|
80056d6: e001 b.n 80056dc <pbuf_alloced_custom+0x48>
|
|
} else {
|
|
payload = NULL;
|
|
80056d8: 2300 movs r3, #0
|
|
80056da: 617b str r3, [r7, #20]
|
|
}
|
|
pbuf_init_alloced_pbuf(&p->pbuf, payload, length, length, type, PBUF_FLAG_IS_CUSTOM);
|
|
80056dc: 6878 ldr r0, [r7, #4]
|
|
80056de: 89b9 ldrh r1, [r7, #12]
|
|
80056e0: 89ba ldrh r2, [r7, #12]
|
|
80056e2: 2302 movs r3, #2
|
|
80056e4: 9301 str r3, [sp, #4]
|
|
80056e6: 897b ldrh r3, [r7, #10]
|
|
80056e8: 9300 str r3, [sp, #0]
|
|
80056ea: 460b mov r3, r1
|
|
80056ec: 6979 ldr r1, [r7, #20]
|
|
80056ee: f7ff fe7d bl 80053ec <pbuf_init_alloced_pbuf>
|
|
return &p->pbuf;
|
|
80056f2: 687b ldr r3, [r7, #4]
|
|
}
|
|
80056f4: 4618 mov r0, r3
|
|
80056f6: 3718 adds r7, #24
|
|
80056f8: 46bd mov sp, r7
|
|
80056fa: bd80 pop {r7, pc}
|
|
|
|
080056fc <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)
|
|
{
|
|
80056fc: b580 push {r7, lr}
|
|
80056fe: b084 sub sp, #16
|
|
8005700: af00 add r7, sp, #0
|
|
8005702: 6078 str r0, [r7, #4]
|
|
8005704: 460b mov r3, r1
|
|
8005706: 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);
|
|
8005708: 687b ldr r3, [r7, #4]
|
|
800570a: 2b00 cmp r3, #0
|
|
800570c: d106 bne.n 800571c <pbuf_realloc+0x20>
|
|
800570e: 4b3a ldr r3, [pc, #232] ; (80057f8 <pbuf_realloc+0xfc>)
|
|
8005710: f44f 72cc mov.w r2, #408 ; 0x198
|
|
8005714: 4939 ldr r1, [pc, #228] ; (80057fc <pbuf_realloc+0x100>)
|
|
8005716: 483a ldr r0, [pc, #232] ; (8005800 <pbuf_realloc+0x104>)
|
|
8005718: f00a feee bl 80104f8 <printf>
|
|
|
|
/* desired length larger than current length? */
|
|
if (new_len >= p->tot_len) {
|
|
800571c: 687b ldr r3, [r7, #4]
|
|
800571e: 891b ldrh r3, [r3, #8]
|
|
8005720: 887a ldrh r2, [r7, #2]
|
|
8005722: 429a cmp r2, r3
|
|
8005724: d263 bcs.n 80057ee <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);
|
|
8005726: 687b ldr r3, [r7, #4]
|
|
8005728: 891a ldrh r2, [r3, #8]
|
|
800572a: 887b ldrh r3, [r7, #2]
|
|
800572c: 1ad3 subs r3, r2, r3
|
|
800572e: 813b strh r3, [r7, #8]
|
|
|
|
/* first, step over any pbufs that should remain in the chain */
|
|
rem_len = new_len;
|
|
8005730: 887b ldrh r3, [r7, #2]
|
|
8005732: 817b strh r3, [r7, #10]
|
|
q = p;
|
|
8005734: 687b ldr r3, [r7, #4]
|
|
8005736: 60fb str r3, [r7, #12]
|
|
/* should this pbuf be kept? */
|
|
while (rem_len > q->len) {
|
|
8005738: e018 b.n 800576c <pbuf_realloc+0x70>
|
|
/* decrease remaining length by pbuf length */
|
|
rem_len = (u16_t)(rem_len - q->len);
|
|
800573a: 68fb ldr r3, [r7, #12]
|
|
800573c: 895b ldrh r3, [r3, #10]
|
|
800573e: 897a ldrh r2, [r7, #10]
|
|
8005740: 1ad3 subs r3, r2, r3
|
|
8005742: 817b strh r3, [r7, #10]
|
|
/* decrease total length indicator */
|
|
q->tot_len = (u16_t)(q->tot_len - shrink);
|
|
8005744: 68fb ldr r3, [r7, #12]
|
|
8005746: 891a ldrh r2, [r3, #8]
|
|
8005748: 893b ldrh r3, [r7, #8]
|
|
800574a: 1ad3 subs r3, r2, r3
|
|
800574c: b29a uxth r2, r3
|
|
800574e: 68fb ldr r3, [r7, #12]
|
|
8005750: 811a strh r2, [r3, #8]
|
|
/* proceed to next pbuf in chain */
|
|
q = q->next;
|
|
8005752: 68fb ldr r3, [r7, #12]
|
|
8005754: 681b ldr r3, [r3, #0]
|
|
8005756: 60fb str r3, [r7, #12]
|
|
LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL);
|
|
8005758: 68fb ldr r3, [r7, #12]
|
|
800575a: 2b00 cmp r3, #0
|
|
800575c: d106 bne.n 800576c <pbuf_realloc+0x70>
|
|
800575e: 4b26 ldr r3, [pc, #152] ; (80057f8 <pbuf_realloc+0xfc>)
|
|
8005760: f240 12af movw r2, #431 ; 0x1af
|
|
8005764: 4927 ldr r1, [pc, #156] ; (8005804 <pbuf_realloc+0x108>)
|
|
8005766: 4826 ldr r0, [pc, #152] ; (8005800 <pbuf_realloc+0x104>)
|
|
8005768: f00a fec6 bl 80104f8 <printf>
|
|
while (rem_len > q->len) {
|
|
800576c: 68fb ldr r3, [r7, #12]
|
|
800576e: 895b ldrh r3, [r3, #10]
|
|
8005770: 897a ldrh r2, [r7, #10]
|
|
8005772: 429a cmp r2, r3
|
|
8005774: d8e1 bhi.n 800573a <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)
|
|
8005776: 68fb ldr r3, [r7, #12]
|
|
8005778: 7b1b ldrb r3, [r3, #12]
|
|
800577a: f003 030f and.w r3, r3, #15
|
|
800577e: 2b00 cmp r3, #0
|
|
8005780: d121 bne.n 80057c6 <pbuf_realloc+0xca>
|
|
8005782: 68fb ldr r3, [r7, #12]
|
|
8005784: 895b ldrh r3, [r3, #10]
|
|
8005786: 897a ldrh r2, [r7, #10]
|
|
8005788: 429a cmp r2, r3
|
|
800578a: d01c beq.n 80057c6 <pbuf_realloc+0xca>
|
|
#if LWIP_SUPPORT_CUSTOM_PBUF
|
|
&& ((q->flags & PBUF_FLAG_IS_CUSTOM) == 0)
|
|
800578c: 68fb ldr r3, [r7, #12]
|
|
800578e: 7b5b ldrb r3, [r3, #13]
|
|
8005790: f003 0302 and.w r3, r3, #2
|
|
8005794: 2b00 cmp r3, #0
|
|
8005796: d116 bne.n 80057c6 <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));
|
|
8005798: 68fb ldr r3, [r7, #12]
|
|
800579a: 685a ldr r2, [r3, #4]
|
|
800579c: 68fb ldr r3, [r7, #12]
|
|
800579e: 1ad3 subs r3, r2, r3
|
|
80057a0: b29a uxth r2, r3
|
|
80057a2: 897b ldrh r3, [r7, #10]
|
|
80057a4: 4413 add r3, r2
|
|
80057a6: b29b uxth r3, r3
|
|
80057a8: 4619 mov r1, r3
|
|
80057aa: 68f8 ldr r0, [r7, #12]
|
|
80057ac: f7fe ffae bl 800470c <mem_trim>
|
|
80057b0: 60f8 str r0, [r7, #12]
|
|
LWIP_ASSERT("mem_trim returned q == NULL", q != NULL);
|
|
80057b2: 68fb ldr r3, [r7, #12]
|
|
80057b4: 2b00 cmp r3, #0
|
|
80057b6: d106 bne.n 80057c6 <pbuf_realloc+0xca>
|
|
80057b8: 4b0f ldr r3, [pc, #60] ; (80057f8 <pbuf_realloc+0xfc>)
|
|
80057ba: f240 12bd movw r2, #445 ; 0x1bd
|
|
80057be: 4912 ldr r1, [pc, #72] ; (8005808 <pbuf_realloc+0x10c>)
|
|
80057c0: 480f ldr r0, [pc, #60] ; (8005800 <pbuf_realloc+0x104>)
|
|
80057c2: f00a fe99 bl 80104f8 <printf>
|
|
}
|
|
/* adjust length fields for new last pbuf */
|
|
q->len = rem_len;
|
|
80057c6: 68fb ldr r3, [r7, #12]
|
|
80057c8: 897a ldrh r2, [r7, #10]
|
|
80057ca: 815a strh r2, [r3, #10]
|
|
q->tot_len = q->len;
|
|
80057cc: 68fb ldr r3, [r7, #12]
|
|
80057ce: 895a ldrh r2, [r3, #10]
|
|
80057d0: 68fb ldr r3, [r7, #12]
|
|
80057d2: 811a strh r2, [r3, #8]
|
|
|
|
/* any remaining pbufs in chain? */
|
|
if (q->next != NULL) {
|
|
80057d4: 68fb ldr r3, [r7, #12]
|
|
80057d6: 681b ldr r3, [r3, #0]
|
|
80057d8: 2b00 cmp r3, #0
|
|
80057da: d004 beq.n 80057e6 <pbuf_realloc+0xea>
|
|
/* free remaining pbufs in chain */
|
|
pbuf_free(q->next);
|
|
80057dc: 68fb ldr r3, [r7, #12]
|
|
80057de: 681b ldr r3, [r3, #0]
|
|
80057e0: 4618 mov r0, r3
|
|
80057e2: f000 f911 bl 8005a08 <pbuf_free>
|
|
}
|
|
/* q is last packet in chain */
|
|
q->next = NULL;
|
|
80057e6: 68fb ldr r3, [r7, #12]
|
|
80057e8: 2200 movs r2, #0
|
|
80057ea: 601a str r2, [r3, #0]
|
|
80057ec: e000 b.n 80057f0 <pbuf_realloc+0xf4>
|
|
return;
|
|
80057ee: bf00 nop
|
|
|
|
}
|
|
80057f0: 3710 adds r7, #16
|
|
80057f2: 46bd mov sp, r7
|
|
80057f4: bd80 pop {r7, pc}
|
|
80057f6: bf00 nop
|
|
80057f8: 0801561c .word 0x0801561c
|
|
80057fc: 08015734 .word 0x08015734
|
|
8005800: 0801567c .word 0x0801567c
|
|
8005804: 0801574c .word 0x0801574c
|
|
8005808: 08015764 .word 0x08015764
|
|
|
|
0800580c <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)
|
|
{
|
|
800580c: b580 push {r7, lr}
|
|
800580e: b086 sub sp, #24
|
|
8005810: af00 add r7, sp, #0
|
|
8005812: 60f8 str r0, [r7, #12]
|
|
8005814: 60b9 str r1, [r7, #8]
|
|
8005816: 4613 mov r3, r2
|
|
8005818: 71fb strb r3, [r7, #7]
|
|
u16_t type_internal;
|
|
void *payload;
|
|
u16_t increment_magnitude;
|
|
|
|
LWIP_ASSERT("p != NULL", p != NULL);
|
|
800581a: 68fb ldr r3, [r7, #12]
|
|
800581c: 2b00 cmp r3, #0
|
|
800581e: d106 bne.n 800582e <pbuf_add_header_impl+0x22>
|
|
8005820: 4b2b ldr r3, [pc, #172] ; (80058d0 <pbuf_add_header_impl+0xc4>)
|
|
8005822: f240 12df movw r2, #479 ; 0x1df
|
|
8005826: 492b ldr r1, [pc, #172] ; (80058d4 <pbuf_add_header_impl+0xc8>)
|
|
8005828: 482b ldr r0, [pc, #172] ; (80058d8 <pbuf_add_header_impl+0xcc>)
|
|
800582a: f00a fe65 bl 80104f8 <printf>
|
|
if ((p == NULL) || (header_size_increment > 0xFFFF)) {
|
|
800582e: 68fb ldr r3, [r7, #12]
|
|
8005830: 2b00 cmp r3, #0
|
|
8005832: d003 beq.n 800583c <pbuf_add_header_impl+0x30>
|
|
8005834: 68bb ldr r3, [r7, #8]
|
|
8005836: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
|
|
800583a: d301 bcc.n 8005840 <pbuf_add_header_impl+0x34>
|
|
return 1;
|
|
800583c: 2301 movs r3, #1
|
|
800583e: e043 b.n 80058c8 <pbuf_add_header_impl+0xbc>
|
|
}
|
|
if (header_size_increment == 0) {
|
|
8005840: 68bb ldr r3, [r7, #8]
|
|
8005842: 2b00 cmp r3, #0
|
|
8005844: d101 bne.n 800584a <pbuf_add_header_impl+0x3e>
|
|
return 0;
|
|
8005846: 2300 movs r3, #0
|
|
8005848: e03e b.n 80058c8 <pbuf_add_header_impl+0xbc>
|
|
}
|
|
|
|
increment_magnitude = (u16_t)header_size_increment;
|
|
800584a: 68bb ldr r3, [r7, #8]
|
|
800584c: 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) {
|
|
800584e: 68fb ldr r3, [r7, #12]
|
|
8005850: 891a ldrh r2, [r3, #8]
|
|
8005852: 8a7b ldrh r3, [r7, #18]
|
|
8005854: 4413 add r3, r2
|
|
8005856: b29b uxth r3, r3
|
|
8005858: 8a7a ldrh r2, [r7, #18]
|
|
800585a: 429a cmp r2, r3
|
|
800585c: d901 bls.n 8005862 <pbuf_add_header_impl+0x56>
|
|
return 1;
|
|
800585e: 2301 movs r3, #1
|
|
8005860: e032 b.n 80058c8 <pbuf_add_header_impl+0xbc>
|
|
}
|
|
|
|
type_internal = p->type_internal;
|
|
8005862: 68fb ldr r3, [r7, #12]
|
|
8005864: 7b1b ldrb r3, [r3, #12]
|
|
8005866: 823b strh r3, [r7, #16]
|
|
|
|
/* pbuf types containing payloads? */
|
|
if (type_internal & PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS) {
|
|
8005868: 8a3b ldrh r3, [r7, #16]
|
|
800586a: f003 0380 and.w r3, r3, #128 ; 0x80
|
|
800586e: 2b00 cmp r3, #0
|
|
8005870: d00c beq.n 800588c <pbuf_add_header_impl+0x80>
|
|
/* set new payload pointer */
|
|
payload = (u8_t *)p->payload - header_size_increment;
|
|
8005872: 68fb ldr r3, [r7, #12]
|
|
8005874: 685a ldr r2, [r3, #4]
|
|
8005876: 68bb ldr r3, [r7, #8]
|
|
8005878: 425b negs r3, r3
|
|
800587a: 4413 add r3, r2
|
|
800587c: 617b str r3, [r7, #20]
|
|
/* boundary check fails? */
|
|
if ((u8_t *)payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) {
|
|
800587e: 68fb ldr r3, [r7, #12]
|
|
8005880: 3310 adds r3, #16
|
|
8005882: 697a ldr r2, [r7, #20]
|
|
8005884: 429a cmp r2, r3
|
|
8005886: d20d bcs.n 80058a4 <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;
|
|
8005888: 2301 movs r3, #1
|
|
800588a: e01d b.n 80058c8 <pbuf_add_header_impl+0xbc>
|
|
}
|
|
/* pbuf types referring to external payloads? */
|
|
} else {
|
|
/* hide a header in the payload? */
|
|
if (force) {
|
|
800588c: 79fb ldrb r3, [r7, #7]
|
|
800588e: 2b00 cmp r3, #0
|
|
8005890: d006 beq.n 80058a0 <pbuf_add_header_impl+0x94>
|
|
payload = (u8_t *)p->payload - header_size_increment;
|
|
8005892: 68fb ldr r3, [r7, #12]
|
|
8005894: 685a ldr r2, [r3, #4]
|
|
8005896: 68bb ldr r3, [r7, #8]
|
|
8005898: 425b negs r3, r3
|
|
800589a: 4413 add r3, r2
|
|
800589c: 617b str r3, [r7, #20]
|
|
800589e: e001 b.n 80058a4 <pbuf_add_header_impl+0x98>
|
|
} else {
|
|
/* cannot expand payload to front (yet!)
|
|
* bail out unsuccessfully */
|
|
return 1;
|
|
80058a0: 2301 movs r3, #1
|
|
80058a2: e011 b.n 80058c8 <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;
|
|
80058a4: 68fb ldr r3, [r7, #12]
|
|
80058a6: 697a ldr r2, [r7, #20]
|
|
80058a8: 605a str r2, [r3, #4]
|
|
p->len = (u16_t)(p->len + increment_magnitude);
|
|
80058aa: 68fb ldr r3, [r7, #12]
|
|
80058ac: 895a ldrh r2, [r3, #10]
|
|
80058ae: 8a7b ldrh r3, [r7, #18]
|
|
80058b0: 4413 add r3, r2
|
|
80058b2: b29a uxth r2, r3
|
|
80058b4: 68fb ldr r3, [r7, #12]
|
|
80058b6: 815a strh r2, [r3, #10]
|
|
p->tot_len = (u16_t)(p->tot_len + increment_magnitude);
|
|
80058b8: 68fb ldr r3, [r7, #12]
|
|
80058ba: 891a ldrh r2, [r3, #8]
|
|
80058bc: 8a7b ldrh r3, [r7, #18]
|
|
80058be: 4413 add r3, r2
|
|
80058c0: b29a uxth r2, r3
|
|
80058c2: 68fb ldr r3, [r7, #12]
|
|
80058c4: 811a strh r2, [r3, #8]
|
|
|
|
|
|
return 0;
|
|
80058c6: 2300 movs r3, #0
|
|
}
|
|
80058c8: 4618 mov r0, r3
|
|
80058ca: 3718 adds r7, #24
|
|
80058cc: 46bd mov sp, r7
|
|
80058ce: bd80 pop {r7, pc}
|
|
80058d0: 0801561c .word 0x0801561c
|
|
80058d4: 08015780 .word 0x08015780
|
|
80058d8: 0801567c .word 0x0801567c
|
|
|
|
080058dc <pbuf_add_header>:
|
|
* @return non-zero on failure, zero on success.
|
|
*
|
|
*/
|
|
u8_t
|
|
pbuf_add_header(struct pbuf *p, size_t header_size_increment)
|
|
{
|
|
80058dc: b580 push {r7, lr}
|
|
80058de: b082 sub sp, #8
|
|
80058e0: af00 add r7, sp, #0
|
|
80058e2: 6078 str r0, [r7, #4]
|
|
80058e4: 6039 str r1, [r7, #0]
|
|
return pbuf_add_header_impl(p, header_size_increment, 0);
|
|
80058e6: 2200 movs r2, #0
|
|
80058e8: 6839 ldr r1, [r7, #0]
|
|
80058ea: 6878 ldr r0, [r7, #4]
|
|
80058ec: f7ff ff8e bl 800580c <pbuf_add_header_impl>
|
|
80058f0: 4603 mov r3, r0
|
|
}
|
|
80058f2: 4618 mov r0, r3
|
|
80058f4: 3708 adds r7, #8
|
|
80058f6: 46bd mov sp, r7
|
|
80058f8: bd80 pop {r7, pc}
|
|
...
|
|
|
|
080058fc <pbuf_remove_header>:
|
|
* @return non-zero on failure, zero on success.
|
|
*
|
|
*/
|
|
u8_t
|
|
pbuf_remove_header(struct pbuf *p, size_t header_size_decrement)
|
|
{
|
|
80058fc: b580 push {r7, lr}
|
|
80058fe: b084 sub sp, #16
|
|
8005900: af00 add r7, sp, #0
|
|
8005902: 6078 str r0, [r7, #4]
|
|
8005904: 6039 str r1, [r7, #0]
|
|
void *payload;
|
|
u16_t increment_magnitude;
|
|
|
|
LWIP_ASSERT("p != NULL", p != NULL);
|
|
8005906: 687b ldr r3, [r7, #4]
|
|
8005908: 2b00 cmp r3, #0
|
|
800590a: d106 bne.n 800591a <pbuf_remove_header+0x1e>
|
|
800590c: 4b20 ldr r3, [pc, #128] ; (8005990 <pbuf_remove_header+0x94>)
|
|
800590e: f240 224b movw r2, #587 ; 0x24b
|
|
8005912: 4920 ldr r1, [pc, #128] ; (8005994 <pbuf_remove_header+0x98>)
|
|
8005914: 4820 ldr r0, [pc, #128] ; (8005998 <pbuf_remove_header+0x9c>)
|
|
8005916: f00a fdef bl 80104f8 <printf>
|
|
if ((p == NULL) || (header_size_decrement > 0xFFFF)) {
|
|
800591a: 687b ldr r3, [r7, #4]
|
|
800591c: 2b00 cmp r3, #0
|
|
800591e: d003 beq.n 8005928 <pbuf_remove_header+0x2c>
|
|
8005920: 683b ldr r3, [r7, #0]
|
|
8005922: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
|
|
8005926: d301 bcc.n 800592c <pbuf_remove_header+0x30>
|
|
return 1;
|
|
8005928: 2301 movs r3, #1
|
|
800592a: e02c b.n 8005986 <pbuf_remove_header+0x8a>
|
|
}
|
|
if (header_size_decrement == 0) {
|
|
800592c: 683b ldr r3, [r7, #0]
|
|
800592e: 2b00 cmp r3, #0
|
|
8005930: d101 bne.n 8005936 <pbuf_remove_header+0x3a>
|
|
return 0;
|
|
8005932: 2300 movs r3, #0
|
|
8005934: e027 b.n 8005986 <pbuf_remove_header+0x8a>
|
|
}
|
|
|
|
increment_magnitude = (u16_t)header_size_decrement;
|
|
8005936: 683b ldr r3, [r7, #0]
|
|
8005938: 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;);
|
|
800593a: 687b ldr r3, [r7, #4]
|
|
800593c: 895b ldrh r3, [r3, #10]
|
|
800593e: 89fa ldrh r2, [r7, #14]
|
|
8005940: 429a cmp r2, r3
|
|
8005942: d908 bls.n 8005956 <pbuf_remove_header+0x5a>
|
|
8005944: 4b12 ldr r3, [pc, #72] ; (8005990 <pbuf_remove_header+0x94>)
|
|
8005946: f240 2255 movw r2, #597 ; 0x255
|
|
800594a: 4914 ldr r1, [pc, #80] ; (800599c <pbuf_remove_header+0xa0>)
|
|
800594c: 4812 ldr r0, [pc, #72] ; (8005998 <pbuf_remove_header+0x9c>)
|
|
800594e: f00a fdd3 bl 80104f8 <printf>
|
|
8005952: 2301 movs r3, #1
|
|
8005954: e017 b.n 8005986 <pbuf_remove_header+0x8a>
|
|
|
|
/* remember current payload pointer */
|
|
payload = p->payload;
|
|
8005956: 687b ldr r3, [r7, #4]
|
|
8005958: 685b ldr r3, [r3, #4]
|
|
800595a: 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;
|
|
800595c: 687b ldr r3, [r7, #4]
|
|
800595e: 685a ldr r2, [r3, #4]
|
|
8005960: 683b ldr r3, [r7, #0]
|
|
8005962: 441a add r2, r3
|
|
8005964: 687b ldr r3, [r7, #4]
|
|
8005966: 605a str r2, [r3, #4]
|
|
/* modify pbuf length fields */
|
|
p->len = (u16_t)(p->len - increment_magnitude);
|
|
8005968: 687b ldr r3, [r7, #4]
|
|
800596a: 895a ldrh r2, [r3, #10]
|
|
800596c: 89fb ldrh r3, [r7, #14]
|
|
800596e: 1ad3 subs r3, r2, r3
|
|
8005970: b29a uxth r2, r3
|
|
8005972: 687b ldr r3, [r7, #4]
|
|
8005974: 815a strh r2, [r3, #10]
|
|
p->tot_len = (u16_t)(p->tot_len - increment_magnitude);
|
|
8005976: 687b ldr r3, [r7, #4]
|
|
8005978: 891a ldrh r2, [r3, #8]
|
|
800597a: 89fb ldrh r3, [r7, #14]
|
|
800597c: 1ad3 subs r3, r2, r3
|
|
800597e: b29a uxth r2, r3
|
|
8005980: 687b ldr r3, [r7, #4]
|
|
8005982: 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;
|
|
8005984: 2300 movs r3, #0
|
|
}
|
|
8005986: 4618 mov r0, r3
|
|
8005988: 3710 adds r7, #16
|
|
800598a: 46bd mov sp, r7
|
|
800598c: bd80 pop {r7, pc}
|
|
800598e: bf00 nop
|
|
8005990: 0801561c .word 0x0801561c
|
|
8005994: 08015780 .word 0x08015780
|
|
8005998: 0801567c .word 0x0801567c
|
|
800599c: 0801578c .word 0x0801578c
|
|
|
|
080059a0 <pbuf_header_impl>:
|
|
|
|
static u8_t
|
|
pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force)
|
|
{
|
|
80059a0: b580 push {r7, lr}
|
|
80059a2: b082 sub sp, #8
|
|
80059a4: af00 add r7, sp, #0
|
|
80059a6: 6078 str r0, [r7, #4]
|
|
80059a8: 460b mov r3, r1
|
|
80059aa: 807b strh r3, [r7, #2]
|
|
80059ac: 4613 mov r3, r2
|
|
80059ae: 707b strb r3, [r7, #1]
|
|
if (header_size_increment < 0) {
|
|
80059b0: f9b7 3002 ldrsh.w r3, [r7, #2]
|
|
80059b4: 2b00 cmp r3, #0
|
|
80059b6: da08 bge.n 80059ca <pbuf_header_impl+0x2a>
|
|
return pbuf_remove_header(p, (size_t) - header_size_increment);
|
|
80059b8: f9b7 3002 ldrsh.w r3, [r7, #2]
|
|
80059bc: 425b negs r3, r3
|
|
80059be: 4619 mov r1, r3
|
|
80059c0: 6878 ldr r0, [r7, #4]
|
|
80059c2: f7ff ff9b bl 80058fc <pbuf_remove_header>
|
|
80059c6: 4603 mov r3, r0
|
|
80059c8: e007 b.n 80059da <pbuf_header_impl+0x3a>
|
|
} else {
|
|
return pbuf_add_header_impl(p, (size_t)header_size_increment, force);
|
|
80059ca: f9b7 3002 ldrsh.w r3, [r7, #2]
|
|
80059ce: 787a ldrb r2, [r7, #1]
|
|
80059d0: 4619 mov r1, r3
|
|
80059d2: 6878 ldr r0, [r7, #4]
|
|
80059d4: f7ff ff1a bl 800580c <pbuf_add_header_impl>
|
|
80059d8: 4603 mov r3, r0
|
|
}
|
|
}
|
|
80059da: 4618 mov r0, r3
|
|
80059dc: 3708 adds r7, #8
|
|
80059de: 46bd mov sp, r7
|
|
80059e0: bd80 pop {r7, pc}
|
|
|
|
080059e2 <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)
|
|
{
|
|
80059e2: b580 push {r7, lr}
|
|
80059e4: b082 sub sp, #8
|
|
80059e6: af00 add r7, sp, #0
|
|
80059e8: 6078 str r0, [r7, #4]
|
|
80059ea: 460b mov r3, r1
|
|
80059ec: 807b strh r3, [r7, #2]
|
|
return pbuf_header_impl(p, header_size_increment, 1);
|
|
80059ee: f9b7 3002 ldrsh.w r3, [r7, #2]
|
|
80059f2: 2201 movs r2, #1
|
|
80059f4: 4619 mov r1, r3
|
|
80059f6: 6878 ldr r0, [r7, #4]
|
|
80059f8: f7ff ffd2 bl 80059a0 <pbuf_header_impl>
|
|
80059fc: 4603 mov r3, r0
|
|
}
|
|
80059fe: 4618 mov r0, r3
|
|
8005a00: 3708 adds r7, #8
|
|
8005a02: 46bd mov sp, r7
|
|
8005a04: bd80 pop {r7, pc}
|
|
...
|
|
|
|
08005a08 <pbuf_free>:
|
|
* 1->1->1 becomes .......
|
|
*
|
|
*/
|
|
u8_t
|
|
pbuf_free(struct pbuf *p)
|
|
{
|
|
8005a08: b580 push {r7, lr}
|
|
8005a0a: b086 sub sp, #24
|
|
8005a0c: af00 add r7, sp, #0
|
|
8005a0e: 6078 str r0, [r7, #4]
|
|
u8_t alloc_src;
|
|
struct pbuf *q;
|
|
u8_t count;
|
|
|
|
if (p == NULL) {
|
|
8005a10: 687b ldr r3, [r7, #4]
|
|
8005a12: 2b00 cmp r3, #0
|
|
8005a14: d10b bne.n 8005a2e <pbuf_free+0x26>
|
|
LWIP_ASSERT("p != NULL", p != NULL);
|
|
8005a16: 687b ldr r3, [r7, #4]
|
|
8005a18: 2b00 cmp r3, #0
|
|
8005a1a: d106 bne.n 8005a2a <pbuf_free+0x22>
|
|
8005a1c: 4b38 ldr r3, [pc, #224] ; (8005b00 <pbuf_free+0xf8>)
|
|
8005a1e: f44f 7237 mov.w r2, #732 ; 0x2dc
|
|
8005a22: 4938 ldr r1, [pc, #224] ; (8005b04 <pbuf_free+0xfc>)
|
|
8005a24: 4838 ldr r0, [pc, #224] ; (8005b08 <pbuf_free+0x100>)
|
|
8005a26: f00a fd67 bl 80104f8 <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;
|
|
8005a2a: 2300 movs r3, #0
|
|
8005a2c: e063 b.n 8005af6 <pbuf_free+0xee>
|
|
}
|
|
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free(%p)\n", (void *)p));
|
|
|
|
PERF_START;
|
|
|
|
count = 0;
|
|
8005a2e: 2300 movs r3, #0
|
|
8005a30: 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) {
|
|
8005a32: e05c b.n 8005aee <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);
|
|
8005a34: 687b ldr r3, [r7, #4]
|
|
8005a36: 7b9b ldrb r3, [r3, #14]
|
|
8005a38: 2b00 cmp r3, #0
|
|
8005a3a: d106 bne.n 8005a4a <pbuf_free+0x42>
|
|
8005a3c: 4b30 ldr r3, [pc, #192] ; (8005b00 <pbuf_free+0xf8>)
|
|
8005a3e: f240 22f1 movw r2, #753 ; 0x2f1
|
|
8005a42: 4932 ldr r1, [pc, #200] ; (8005b0c <pbuf_free+0x104>)
|
|
8005a44: 4830 ldr r0, [pc, #192] ; (8005b08 <pbuf_free+0x100>)
|
|
8005a46: f00a fd57 bl 80104f8 <printf>
|
|
/* decrease reference count (number of pointers to pbuf) */
|
|
ref = --(p->ref);
|
|
8005a4a: 687b ldr r3, [r7, #4]
|
|
8005a4c: 7b9b ldrb r3, [r3, #14]
|
|
8005a4e: 3b01 subs r3, #1
|
|
8005a50: b2da uxtb r2, r3
|
|
8005a52: 687b ldr r3, [r7, #4]
|
|
8005a54: 739a strb r2, [r3, #14]
|
|
8005a56: 687b ldr r3, [r7, #4]
|
|
8005a58: 7b9b ldrb r3, [r3, #14]
|
|
8005a5a: 75bb strb r3, [r7, #22]
|
|
SYS_ARCH_UNPROTECT(old_level);
|
|
/* this pbuf is no longer referenced to? */
|
|
if (ref == 0) {
|
|
8005a5c: 7dbb ldrb r3, [r7, #22]
|
|
8005a5e: 2b00 cmp r3, #0
|
|
8005a60: d143 bne.n 8005aea <pbuf_free+0xe2>
|
|
/* remember next pbuf in chain for next iteration */
|
|
q = p->next;
|
|
8005a62: 687b ldr r3, [r7, #4]
|
|
8005a64: 681b ldr r3, [r3, #0]
|
|
8005a66: 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);
|
|
8005a68: 687b ldr r3, [r7, #4]
|
|
8005a6a: 7b1b ldrb r3, [r3, #12]
|
|
8005a6c: f003 030f and.w r3, r3, #15
|
|
8005a70: 73fb strb r3, [r7, #15]
|
|
#if LWIP_SUPPORT_CUSTOM_PBUF
|
|
/* is this a custom pbuf? */
|
|
if ((p->flags & PBUF_FLAG_IS_CUSTOM) != 0) {
|
|
8005a72: 687b ldr r3, [r7, #4]
|
|
8005a74: 7b5b ldrb r3, [r3, #13]
|
|
8005a76: f003 0302 and.w r3, r3, #2
|
|
8005a7a: 2b00 cmp r3, #0
|
|
8005a7c: d011 beq.n 8005aa2 <pbuf_free+0x9a>
|
|
struct pbuf_custom *pc = (struct pbuf_custom *)p;
|
|
8005a7e: 687b ldr r3, [r7, #4]
|
|
8005a80: 60bb str r3, [r7, #8]
|
|
LWIP_ASSERT("pc->custom_free_function != NULL", pc->custom_free_function != NULL);
|
|
8005a82: 68bb ldr r3, [r7, #8]
|
|
8005a84: 691b ldr r3, [r3, #16]
|
|
8005a86: 2b00 cmp r3, #0
|
|
8005a88: d106 bne.n 8005a98 <pbuf_free+0x90>
|
|
8005a8a: 4b1d ldr r3, [pc, #116] ; (8005b00 <pbuf_free+0xf8>)
|
|
8005a8c: f240 22ff movw r2, #767 ; 0x2ff
|
|
8005a90: 491f ldr r1, [pc, #124] ; (8005b10 <pbuf_free+0x108>)
|
|
8005a92: 481d ldr r0, [pc, #116] ; (8005b08 <pbuf_free+0x100>)
|
|
8005a94: f00a fd30 bl 80104f8 <printf>
|
|
pc->custom_free_function(p);
|
|
8005a98: 68bb ldr r3, [r7, #8]
|
|
8005a9a: 691b ldr r3, [r3, #16]
|
|
8005a9c: 6878 ldr r0, [r7, #4]
|
|
8005a9e: 4798 blx r3
|
|
8005aa0: e01d b.n 8005ade <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) {
|
|
8005aa2: 7bfb ldrb r3, [r7, #15]
|
|
8005aa4: 2b02 cmp r3, #2
|
|
8005aa6: d104 bne.n 8005ab2 <pbuf_free+0xaa>
|
|
memp_free(MEMP_PBUF_POOL, p);
|
|
8005aa8: 6879 ldr r1, [r7, #4]
|
|
8005aaa: 2008 movs r0, #8
|
|
8005aac: f7ff f92a bl 8004d04 <memp_free>
|
|
8005ab0: e015 b.n 8005ade <pbuf_free+0xd6>
|
|
/* is this a ROM or RAM referencing pbuf? */
|
|
} else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF) {
|
|
8005ab2: 7bfb ldrb r3, [r7, #15]
|
|
8005ab4: 2b01 cmp r3, #1
|
|
8005ab6: d104 bne.n 8005ac2 <pbuf_free+0xba>
|
|
memp_free(MEMP_PBUF, p);
|
|
8005ab8: 6879 ldr r1, [r7, #4]
|
|
8005aba: 2007 movs r0, #7
|
|
8005abc: f7ff f922 bl 8004d04 <memp_free>
|
|
8005ac0: e00d b.n 8005ade <pbuf_free+0xd6>
|
|
/* type == PBUF_RAM */
|
|
} else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) {
|
|
8005ac2: 7bfb ldrb r3, [r7, #15]
|
|
8005ac4: 2b00 cmp r3, #0
|
|
8005ac6: d103 bne.n 8005ad0 <pbuf_free+0xc8>
|
|
mem_free(p);
|
|
8005ac8: 6878 ldr r0, [r7, #4]
|
|
8005aca: f7fe fdb5 bl 8004638 <mem_free>
|
|
8005ace: e006 b.n 8005ade <pbuf_free+0xd6>
|
|
} else {
|
|
/* @todo: support freeing other types */
|
|
LWIP_ASSERT("invalid pbuf type", 0);
|
|
8005ad0: 4b0b ldr r3, [pc, #44] ; (8005b00 <pbuf_free+0xf8>)
|
|
8005ad2: f240 320f movw r2, #783 ; 0x30f
|
|
8005ad6: 490f ldr r1, [pc, #60] ; (8005b14 <pbuf_free+0x10c>)
|
|
8005ad8: 480b ldr r0, [pc, #44] ; (8005b08 <pbuf_free+0x100>)
|
|
8005ada: f00a fd0d bl 80104f8 <printf>
|
|
}
|
|
}
|
|
count++;
|
|
8005ade: 7dfb ldrb r3, [r7, #23]
|
|
8005ae0: 3301 adds r3, #1
|
|
8005ae2: 75fb strb r3, [r7, #23]
|
|
/* proceed to next pbuf */
|
|
p = q;
|
|
8005ae4: 693b ldr r3, [r7, #16]
|
|
8005ae6: 607b str r3, [r7, #4]
|
|
8005ae8: e001 b.n 8005aee <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;
|
|
8005aea: 2300 movs r3, #0
|
|
8005aec: 607b str r3, [r7, #4]
|
|
while (p != NULL) {
|
|
8005aee: 687b ldr r3, [r7, #4]
|
|
8005af0: 2b00 cmp r3, #0
|
|
8005af2: d19f bne.n 8005a34 <pbuf_free+0x2c>
|
|
}
|
|
}
|
|
PERF_STOP("pbuf_free");
|
|
/* return number of de-allocated pbufs */
|
|
return count;
|
|
8005af4: 7dfb ldrb r3, [r7, #23]
|
|
}
|
|
8005af6: 4618 mov r0, r3
|
|
8005af8: 3718 adds r7, #24
|
|
8005afa: 46bd mov sp, r7
|
|
8005afc: bd80 pop {r7, pc}
|
|
8005afe: bf00 nop
|
|
8005b00: 0801561c .word 0x0801561c
|
|
8005b04: 08015780 .word 0x08015780
|
|
8005b08: 0801567c .word 0x0801567c
|
|
8005b0c: 080157ac .word 0x080157ac
|
|
8005b10: 080157c4 .word 0x080157c4
|
|
8005b14: 080157e8 .word 0x080157e8
|
|
|
|
08005b18 <pbuf_clen>:
|
|
* @param p first pbuf of chain
|
|
* @return the number of pbufs in a chain
|
|
*/
|
|
u16_t
|
|
pbuf_clen(const struct pbuf *p)
|
|
{
|
|
8005b18: b480 push {r7}
|
|
8005b1a: b085 sub sp, #20
|
|
8005b1c: af00 add r7, sp, #0
|
|
8005b1e: 6078 str r0, [r7, #4]
|
|
u16_t len;
|
|
|
|
len = 0;
|
|
8005b20: 2300 movs r3, #0
|
|
8005b22: 81fb strh r3, [r7, #14]
|
|
while (p != NULL) {
|
|
8005b24: e005 b.n 8005b32 <pbuf_clen+0x1a>
|
|
++len;
|
|
8005b26: 89fb ldrh r3, [r7, #14]
|
|
8005b28: 3301 adds r3, #1
|
|
8005b2a: 81fb strh r3, [r7, #14]
|
|
p = p->next;
|
|
8005b2c: 687b ldr r3, [r7, #4]
|
|
8005b2e: 681b ldr r3, [r3, #0]
|
|
8005b30: 607b str r3, [r7, #4]
|
|
while (p != NULL) {
|
|
8005b32: 687b ldr r3, [r7, #4]
|
|
8005b34: 2b00 cmp r3, #0
|
|
8005b36: d1f6 bne.n 8005b26 <pbuf_clen+0xe>
|
|
}
|
|
return len;
|
|
8005b38: 89fb ldrh r3, [r7, #14]
|
|
}
|
|
8005b3a: 4618 mov r0, r3
|
|
8005b3c: 3714 adds r7, #20
|
|
8005b3e: 46bd mov sp, r7
|
|
8005b40: f85d 7b04 ldr.w r7, [sp], #4
|
|
8005b44: 4770 bx lr
|
|
...
|
|
|
|
08005b48 <pbuf_ref>:
|
|
* @param p pbuf to increase reference counter of
|
|
*
|
|
*/
|
|
void
|
|
pbuf_ref(struct pbuf *p)
|
|
{
|
|
8005b48: b580 push {r7, lr}
|
|
8005b4a: b082 sub sp, #8
|
|
8005b4c: af00 add r7, sp, #0
|
|
8005b4e: 6078 str r0, [r7, #4]
|
|
/* pbuf given? */
|
|
if (p != NULL) {
|
|
8005b50: 687b ldr r3, [r7, #4]
|
|
8005b52: 2b00 cmp r3, #0
|
|
8005b54: d010 beq.n 8005b78 <pbuf_ref+0x30>
|
|
SYS_ARCH_SET(p->ref, (LWIP_PBUF_REF_T)(p->ref + 1));
|
|
8005b56: 687b ldr r3, [r7, #4]
|
|
8005b58: 7b9b ldrb r3, [r3, #14]
|
|
8005b5a: 3301 adds r3, #1
|
|
8005b5c: b2da uxtb r2, r3
|
|
8005b5e: 687b ldr r3, [r7, #4]
|
|
8005b60: 739a strb r2, [r3, #14]
|
|
LWIP_ASSERT("pbuf ref overflow", p->ref > 0);
|
|
8005b62: 687b ldr r3, [r7, #4]
|
|
8005b64: 7b9b ldrb r3, [r3, #14]
|
|
8005b66: 2b00 cmp r3, #0
|
|
8005b68: d106 bne.n 8005b78 <pbuf_ref+0x30>
|
|
8005b6a: 4b05 ldr r3, [pc, #20] ; (8005b80 <pbuf_ref+0x38>)
|
|
8005b6c: f240 3242 movw r2, #834 ; 0x342
|
|
8005b70: 4904 ldr r1, [pc, #16] ; (8005b84 <pbuf_ref+0x3c>)
|
|
8005b72: 4805 ldr r0, [pc, #20] ; (8005b88 <pbuf_ref+0x40>)
|
|
8005b74: f00a fcc0 bl 80104f8 <printf>
|
|
}
|
|
}
|
|
8005b78: bf00 nop
|
|
8005b7a: 3708 adds r7, #8
|
|
8005b7c: 46bd mov sp, r7
|
|
8005b7e: bd80 pop {r7, pc}
|
|
8005b80: 0801561c .word 0x0801561c
|
|
8005b84: 080157fc .word 0x080157fc
|
|
8005b88: 0801567c .word 0x0801567c
|
|
|
|
08005b8c <pbuf_cat>:
|
|
*
|
|
* @see pbuf_chain()
|
|
*/
|
|
void
|
|
pbuf_cat(struct pbuf *h, struct pbuf *t)
|
|
{
|
|
8005b8c: b580 push {r7, lr}
|
|
8005b8e: b084 sub sp, #16
|
|
8005b90: af00 add r7, sp, #0
|
|
8005b92: 6078 str r0, [r7, #4]
|
|
8005b94: 6039 str r1, [r7, #0]
|
|
struct pbuf *p;
|
|
|
|
LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)",
|
|
8005b96: 687b ldr r3, [r7, #4]
|
|
8005b98: 2b00 cmp r3, #0
|
|
8005b9a: d002 beq.n 8005ba2 <pbuf_cat+0x16>
|
|
8005b9c: 683b ldr r3, [r7, #0]
|
|
8005b9e: 2b00 cmp r3, #0
|
|
8005ba0: d107 bne.n 8005bb2 <pbuf_cat+0x26>
|
|
8005ba2: 4b20 ldr r3, [pc, #128] ; (8005c24 <pbuf_cat+0x98>)
|
|
8005ba4: f240 3259 movw r2, #857 ; 0x359
|
|
8005ba8: 491f ldr r1, [pc, #124] ; (8005c28 <pbuf_cat+0x9c>)
|
|
8005baa: 4820 ldr r0, [pc, #128] ; (8005c2c <pbuf_cat+0xa0>)
|
|
8005bac: f00a fca4 bl 80104f8 <printf>
|
|
8005bb0: e034 b.n 8005c1c <pbuf_cat+0x90>
|
|
((h != NULL) && (t != NULL)), return;);
|
|
|
|
/* proceed to last pbuf of chain */
|
|
for (p = h; p->next != NULL; p = p->next) {
|
|
8005bb2: 687b ldr r3, [r7, #4]
|
|
8005bb4: 60fb str r3, [r7, #12]
|
|
8005bb6: e00a b.n 8005bce <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);
|
|
8005bb8: 68fb ldr r3, [r7, #12]
|
|
8005bba: 891a ldrh r2, [r3, #8]
|
|
8005bbc: 683b ldr r3, [r7, #0]
|
|
8005bbe: 891b ldrh r3, [r3, #8]
|
|
8005bc0: 4413 add r3, r2
|
|
8005bc2: b29a uxth r2, r3
|
|
8005bc4: 68fb ldr r3, [r7, #12]
|
|
8005bc6: 811a strh r2, [r3, #8]
|
|
for (p = h; p->next != NULL; p = p->next) {
|
|
8005bc8: 68fb ldr r3, [r7, #12]
|
|
8005bca: 681b ldr r3, [r3, #0]
|
|
8005bcc: 60fb str r3, [r7, #12]
|
|
8005bce: 68fb ldr r3, [r7, #12]
|
|
8005bd0: 681b ldr r3, [r3, #0]
|
|
8005bd2: 2b00 cmp r3, #0
|
|
8005bd4: d1f0 bne.n 8005bb8 <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);
|
|
8005bd6: 68fb ldr r3, [r7, #12]
|
|
8005bd8: 891a ldrh r2, [r3, #8]
|
|
8005bda: 68fb ldr r3, [r7, #12]
|
|
8005bdc: 895b ldrh r3, [r3, #10]
|
|
8005bde: 429a cmp r2, r3
|
|
8005be0: d006 beq.n 8005bf0 <pbuf_cat+0x64>
|
|
8005be2: 4b10 ldr r3, [pc, #64] ; (8005c24 <pbuf_cat+0x98>)
|
|
8005be4: f240 3262 movw r2, #866 ; 0x362
|
|
8005be8: 4911 ldr r1, [pc, #68] ; (8005c30 <pbuf_cat+0xa4>)
|
|
8005bea: 4810 ldr r0, [pc, #64] ; (8005c2c <pbuf_cat+0xa0>)
|
|
8005bec: f00a fc84 bl 80104f8 <printf>
|
|
LWIP_ASSERT("p->next == NULL", p->next == NULL);
|
|
8005bf0: 68fb ldr r3, [r7, #12]
|
|
8005bf2: 681b ldr r3, [r3, #0]
|
|
8005bf4: 2b00 cmp r3, #0
|
|
8005bf6: d006 beq.n 8005c06 <pbuf_cat+0x7a>
|
|
8005bf8: 4b0a ldr r3, [pc, #40] ; (8005c24 <pbuf_cat+0x98>)
|
|
8005bfa: f240 3263 movw r2, #867 ; 0x363
|
|
8005bfe: 490d ldr r1, [pc, #52] ; (8005c34 <pbuf_cat+0xa8>)
|
|
8005c00: 480a ldr r0, [pc, #40] ; (8005c2c <pbuf_cat+0xa0>)
|
|
8005c02: f00a fc79 bl 80104f8 <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);
|
|
8005c06: 68fb ldr r3, [r7, #12]
|
|
8005c08: 891a ldrh r2, [r3, #8]
|
|
8005c0a: 683b ldr r3, [r7, #0]
|
|
8005c0c: 891b ldrh r3, [r3, #8]
|
|
8005c0e: 4413 add r3, r2
|
|
8005c10: b29a uxth r2, r3
|
|
8005c12: 68fb ldr r3, [r7, #12]
|
|
8005c14: 811a strh r2, [r3, #8]
|
|
/* chain last pbuf of head (p) with first of tail (t) */
|
|
p->next = t;
|
|
8005c16: 68fb ldr r3, [r7, #12]
|
|
8005c18: 683a ldr r2, [r7, #0]
|
|
8005c1a: 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.
|
|
*/
|
|
}
|
|
8005c1c: 3710 adds r7, #16
|
|
8005c1e: 46bd mov sp, r7
|
|
8005c20: bd80 pop {r7, pc}
|
|
8005c22: bf00 nop
|
|
8005c24: 0801561c .word 0x0801561c
|
|
8005c28: 08015810 .word 0x08015810
|
|
8005c2c: 0801567c .word 0x0801567c
|
|
8005c30: 08015848 .word 0x08015848
|
|
8005c34: 08015878 .word 0x08015878
|
|
|
|
08005c38 <pbuf_chain>:
|
|
* The ->ref field of the first pbuf of the tail chain is adjusted.
|
|
*
|
|
*/
|
|
void
|
|
pbuf_chain(struct pbuf *h, struct pbuf *t)
|
|
{
|
|
8005c38: b580 push {r7, lr}
|
|
8005c3a: b082 sub sp, #8
|
|
8005c3c: af00 add r7, sp, #0
|
|
8005c3e: 6078 str r0, [r7, #4]
|
|
8005c40: 6039 str r1, [r7, #0]
|
|
pbuf_cat(h, t);
|
|
8005c42: 6839 ldr r1, [r7, #0]
|
|
8005c44: 6878 ldr r0, [r7, #4]
|
|
8005c46: f7ff ffa1 bl 8005b8c <pbuf_cat>
|
|
/* t is now referenced by h */
|
|
pbuf_ref(t);
|
|
8005c4a: 6838 ldr r0, [r7, #0]
|
|
8005c4c: f7ff ff7c bl 8005b48 <pbuf_ref>
|
|
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t));
|
|
}
|
|
8005c50: bf00 nop
|
|
8005c52: 3708 adds r7, #8
|
|
8005c54: 46bd mov sp, r7
|
|
8005c56: bd80 pop {r7, pc}
|
|
|
|
08005c58 <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)
|
|
{
|
|
8005c58: b580 push {r7, lr}
|
|
8005c5a: b086 sub sp, #24
|
|
8005c5c: af00 add r7, sp, #0
|
|
8005c5e: 6078 str r0, [r7, #4]
|
|
8005c60: 6039 str r1, [r7, #0]
|
|
size_t offset_to = 0, offset_from = 0, len;
|
|
8005c62: 2300 movs r3, #0
|
|
8005c64: 617b str r3, [r7, #20]
|
|
8005c66: 2300 movs r3, #0
|
|
8005c68: 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) &&
|
|
8005c6a: 687b ldr r3, [r7, #4]
|
|
8005c6c: 2b00 cmp r3, #0
|
|
8005c6e: d008 beq.n 8005c82 <pbuf_copy+0x2a>
|
|
8005c70: 683b ldr r3, [r7, #0]
|
|
8005c72: 2b00 cmp r3, #0
|
|
8005c74: d005 beq.n 8005c82 <pbuf_copy+0x2a>
|
|
8005c76: 687b ldr r3, [r7, #4]
|
|
8005c78: 891a ldrh r2, [r3, #8]
|
|
8005c7a: 683b ldr r3, [r7, #0]
|
|
8005c7c: 891b ldrh r3, [r3, #8]
|
|
8005c7e: 429a cmp r2, r3
|
|
8005c80: d209 bcs.n 8005c96 <pbuf_copy+0x3e>
|
|
8005c82: 4b57 ldr r3, [pc, #348] ; (8005de0 <pbuf_copy+0x188>)
|
|
8005c84: f240 32c9 movw r2, #969 ; 0x3c9
|
|
8005c88: 4956 ldr r1, [pc, #344] ; (8005de4 <pbuf_copy+0x18c>)
|
|
8005c8a: 4857 ldr r0, [pc, #348] ; (8005de8 <pbuf_copy+0x190>)
|
|
8005c8c: f00a fc34 bl 80104f8 <printf>
|
|
8005c90: f06f 030f mvn.w r3, #15
|
|
8005c94: e09f b.n 8005dd6 <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)) {
|
|
8005c96: 687b ldr r3, [r7, #4]
|
|
8005c98: 895b ldrh r3, [r3, #10]
|
|
8005c9a: 461a mov r2, r3
|
|
8005c9c: 697b ldr r3, [r7, #20]
|
|
8005c9e: 1ad2 subs r2, r2, r3
|
|
8005ca0: 683b ldr r3, [r7, #0]
|
|
8005ca2: 895b ldrh r3, [r3, #10]
|
|
8005ca4: 4619 mov r1, r3
|
|
8005ca6: 693b ldr r3, [r7, #16]
|
|
8005ca8: 1acb subs r3, r1, r3
|
|
8005caa: 429a cmp r2, r3
|
|
8005cac: d306 bcc.n 8005cbc <pbuf_copy+0x64>
|
|
/* complete current p_from fits into current p_to */
|
|
len = p_from->len - offset_from;
|
|
8005cae: 683b ldr r3, [r7, #0]
|
|
8005cb0: 895b ldrh r3, [r3, #10]
|
|
8005cb2: 461a mov r2, r3
|
|
8005cb4: 693b ldr r3, [r7, #16]
|
|
8005cb6: 1ad3 subs r3, r2, r3
|
|
8005cb8: 60fb str r3, [r7, #12]
|
|
8005cba: e005 b.n 8005cc8 <pbuf_copy+0x70>
|
|
} else {
|
|
/* current p_from does not fit into current p_to */
|
|
len = p_to->len - offset_to;
|
|
8005cbc: 687b ldr r3, [r7, #4]
|
|
8005cbe: 895b ldrh r3, [r3, #10]
|
|
8005cc0: 461a mov r2, r3
|
|
8005cc2: 697b ldr r3, [r7, #20]
|
|
8005cc4: 1ad3 subs r3, r2, r3
|
|
8005cc6: 60fb str r3, [r7, #12]
|
|
}
|
|
MEMCPY((u8_t *)p_to->payload + offset_to, (u8_t *)p_from->payload + offset_from, len);
|
|
8005cc8: 687b ldr r3, [r7, #4]
|
|
8005cca: 685a ldr r2, [r3, #4]
|
|
8005ccc: 697b ldr r3, [r7, #20]
|
|
8005cce: 18d0 adds r0, r2, r3
|
|
8005cd0: 683b ldr r3, [r7, #0]
|
|
8005cd2: 685a ldr r2, [r3, #4]
|
|
8005cd4: 693b ldr r3, [r7, #16]
|
|
8005cd6: 4413 add r3, r2
|
|
8005cd8: 68fa ldr r2, [r7, #12]
|
|
8005cda: 4619 mov r1, r3
|
|
8005cdc: f00a fbdc bl 8010498 <memcpy>
|
|
offset_to += len;
|
|
8005ce0: 697a ldr r2, [r7, #20]
|
|
8005ce2: 68fb ldr r3, [r7, #12]
|
|
8005ce4: 4413 add r3, r2
|
|
8005ce6: 617b str r3, [r7, #20]
|
|
offset_from += len;
|
|
8005ce8: 693a ldr r2, [r7, #16]
|
|
8005cea: 68fb ldr r3, [r7, #12]
|
|
8005cec: 4413 add r3, r2
|
|
8005cee: 613b str r3, [r7, #16]
|
|
LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len);
|
|
8005cf0: 687b ldr r3, [r7, #4]
|
|
8005cf2: 895b ldrh r3, [r3, #10]
|
|
8005cf4: 461a mov r2, r3
|
|
8005cf6: 697b ldr r3, [r7, #20]
|
|
8005cf8: 4293 cmp r3, r2
|
|
8005cfa: d906 bls.n 8005d0a <pbuf_copy+0xb2>
|
|
8005cfc: 4b38 ldr r3, [pc, #224] ; (8005de0 <pbuf_copy+0x188>)
|
|
8005cfe: f240 32d9 movw r2, #985 ; 0x3d9
|
|
8005d02: 493a ldr r1, [pc, #232] ; (8005dec <pbuf_copy+0x194>)
|
|
8005d04: 4838 ldr r0, [pc, #224] ; (8005de8 <pbuf_copy+0x190>)
|
|
8005d06: f00a fbf7 bl 80104f8 <printf>
|
|
LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len);
|
|
8005d0a: 683b ldr r3, [r7, #0]
|
|
8005d0c: 895b ldrh r3, [r3, #10]
|
|
8005d0e: 461a mov r2, r3
|
|
8005d10: 693b ldr r3, [r7, #16]
|
|
8005d12: 4293 cmp r3, r2
|
|
8005d14: d906 bls.n 8005d24 <pbuf_copy+0xcc>
|
|
8005d16: 4b32 ldr r3, [pc, #200] ; (8005de0 <pbuf_copy+0x188>)
|
|
8005d18: f240 32da movw r2, #986 ; 0x3da
|
|
8005d1c: 4934 ldr r1, [pc, #208] ; (8005df0 <pbuf_copy+0x198>)
|
|
8005d1e: 4832 ldr r0, [pc, #200] ; (8005de8 <pbuf_copy+0x190>)
|
|
8005d20: f00a fbea bl 80104f8 <printf>
|
|
if (offset_from >= p_from->len) {
|
|
8005d24: 683b ldr r3, [r7, #0]
|
|
8005d26: 895b ldrh r3, [r3, #10]
|
|
8005d28: 461a mov r2, r3
|
|
8005d2a: 693b ldr r3, [r7, #16]
|
|
8005d2c: 4293 cmp r3, r2
|
|
8005d2e: d304 bcc.n 8005d3a <pbuf_copy+0xe2>
|
|
/* on to next p_from (if any) */
|
|
offset_from = 0;
|
|
8005d30: 2300 movs r3, #0
|
|
8005d32: 613b str r3, [r7, #16]
|
|
p_from = p_from->next;
|
|
8005d34: 683b ldr r3, [r7, #0]
|
|
8005d36: 681b ldr r3, [r3, #0]
|
|
8005d38: 603b str r3, [r7, #0]
|
|
}
|
|
if (offset_to == p_to->len) {
|
|
8005d3a: 687b ldr r3, [r7, #4]
|
|
8005d3c: 895b ldrh r3, [r3, #10]
|
|
8005d3e: 461a mov r2, r3
|
|
8005d40: 697b ldr r3, [r7, #20]
|
|
8005d42: 4293 cmp r3, r2
|
|
8005d44: d114 bne.n 8005d70 <pbuf_copy+0x118>
|
|
/* on to next p_to (if any) */
|
|
offset_to = 0;
|
|
8005d46: 2300 movs r3, #0
|
|
8005d48: 617b str r3, [r7, #20]
|
|
p_to = p_to->next;
|
|
8005d4a: 687b ldr r3, [r7, #4]
|
|
8005d4c: 681b ldr r3, [r3, #0]
|
|
8005d4e: 607b str r3, [r7, #4]
|
|
LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL), return ERR_ARG;);
|
|
8005d50: 687b ldr r3, [r7, #4]
|
|
8005d52: 2b00 cmp r3, #0
|
|
8005d54: d10c bne.n 8005d70 <pbuf_copy+0x118>
|
|
8005d56: 683b ldr r3, [r7, #0]
|
|
8005d58: 2b00 cmp r3, #0
|
|
8005d5a: d009 beq.n 8005d70 <pbuf_copy+0x118>
|
|
8005d5c: 4b20 ldr r3, [pc, #128] ; (8005de0 <pbuf_copy+0x188>)
|
|
8005d5e: f44f 7279 mov.w r2, #996 ; 0x3e4
|
|
8005d62: 4924 ldr r1, [pc, #144] ; (8005df4 <pbuf_copy+0x19c>)
|
|
8005d64: 4820 ldr r0, [pc, #128] ; (8005de8 <pbuf_copy+0x190>)
|
|
8005d66: f00a fbc7 bl 80104f8 <printf>
|
|
8005d6a: f06f 030f mvn.w r3, #15
|
|
8005d6e: e032 b.n 8005dd6 <pbuf_copy+0x17e>
|
|
}
|
|
|
|
if ((p_from != NULL) && (p_from->len == p_from->tot_len)) {
|
|
8005d70: 683b ldr r3, [r7, #0]
|
|
8005d72: 2b00 cmp r3, #0
|
|
8005d74: d013 beq.n 8005d9e <pbuf_copy+0x146>
|
|
8005d76: 683b ldr r3, [r7, #0]
|
|
8005d78: 895a ldrh r2, [r3, #10]
|
|
8005d7a: 683b ldr r3, [r7, #0]
|
|
8005d7c: 891b ldrh r3, [r3, #8]
|
|
8005d7e: 429a cmp r2, r3
|
|
8005d80: d10d bne.n 8005d9e <pbuf_copy+0x146>
|
|
/* don't copy more than one packet! */
|
|
LWIP_ERROR("pbuf_copy() does not allow packet queues!",
|
|
8005d82: 683b ldr r3, [r7, #0]
|
|
8005d84: 681b ldr r3, [r3, #0]
|
|
8005d86: 2b00 cmp r3, #0
|
|
8005d88: d009 beq.n 8005d9e <pbuf_copy+0x146>
|
|
8005d8a: 4b15 ldr r3, [pc, #84] ; (8005de0 <pbuf_copy+0x188>)
|
|
8005d8c: f240 32e9 movw r2, #1001 ; 0x3e9
|
|
8005d90: 4919 ldr r1, [pc, #100] ; (8005df8 <pbuf_copy+0x1a0>)
|
|
8005d92: 4815 ldr r0, [pc, #84] ; (8005de8 <pbuf_copy+0x190>)
|
|
8005d94: f00a fbb0 bl 80104f8 <printf>
|
|
8005d98: f06f 0305 mvn.w r3, #5
|
|
8005d9c: e01b b.n 8005dd6 <pbuf_copy+0x17e>
|
|
(p_from->next == NULL), return ERR_VAL;);
|
|
}
|
|
if ((p_to != NULL) && (p_to->len == p_to->tot_len)) {
|
|
8005d9e: 687b ldr r3, [r7, #4]
|
|
8005da0: 2b00 cmp r3, #0
|
|
8005da2: d013 beq.n 8005dcc <pbuf_copy+0x174>
|
|
8005da4: 687b ldr r3, [r7, #4]
|
|
8005da6: 895a ldrh r2, [r3, #10]
|
|
8005da8: 687b ldr r3, [r7, #4]
|
|
8005daa: 891b ldrh r3, [r3, #8]
|
|
8005dac: 429a cmp r2, r3
|
|
8005dae: d10d bne.n 8005dcc <pbuf_copy+0x174>
|
|
/* don't copy more than one packet! */
|
|
LWIP_ERROR("pbuf_copy() does not allow packet queues!",
|
|
8005db0: 687b ldr r3, [r7, #4]
|
|
8005db2: 681b ldr r3, [r3, #0]
|
|
8005db4: 2b00 cmp r3, #0
|
|
8005db6: d009 beq.n 8005dcc <pbuf_copy+0x174>
|
|
8005db8: 4b09 ldr r3, [pc, #36] ; (8005de0 <pbuf_copy+0x188>)
|
|
8005dba: f240 32ee movw r2, #1006 ; 0x3ee
|
|
8005dbe: 490e ldr r1, [pc, #56] ; (8005df8 <pbuf_copy+0x1a0>)
|
|
8005dc0: 4809 ldr r0, [pc, #36] ; (8005de8 <pbuf_copy+0x190>)
|
|
8005dc2: f00a fb99 bl 80104f8 <printf>
|
|
8005dc6: f06f 0305 mvn.w r3, #5
|
|
8005dca: e004 b.n 8005dd6 <pbuf_copy+0x17e>
|
|
(p_to->next == NULL), return ERR_VAL;);
|
|
}
|
|
} while (p_from);
|
|
8005dcc: 683b ldr r3, [r7, #0]
|
|
8005dce: 2b00 cmp r3, #0
|
|
8005dd0: f47f af61 bne.w 8005c96 <pbuf_copy+0x3e>
|
|
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n"));
|
|
return ERR_OK;
|
|
8005dd4: 2300 movs r3, #0
|
|
}
|
|
8005dd6: 4618 mov r0, r3
|
|
8005dd8: 3718 adds r7, #24
|
|
8005dda: 46bd mov sp, r7
|
|
8005ddc: bd80 pop {r7, pc}
|
|
8005dde: bf00 nop
|
|
8005de0: 0801561c .word 0x0801561c
|
|
8005de4: 080158c4 .word 0x080158c4
|
|
8005de8: 0801567c .word 0x0801567c
|
|
8005dec: 080158f4 .word 0x080158f4
|
|
8005df0: 0801590c .word 0x0801590c
|
|
8005df4: 08015928 .word 0x08015928
|
|
8005df8: 08015938 .word 0x08015938
|
|
|
|
08005dfc <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)
|
|
{
|
|
8005dfc: b580 push {r7, lr}
|
|
8005dfe: b088 sub sp, #32
|
|
8005e00: af00 add r7, sp, #0
|
|
8005e02: 60f8 str r0, [r7, #12]
|
|
8005e04: 60b9 str r1, [r7, #8]
|
|
8005e06: 4611 mov r1, r2
|
|
8005e08: 461a mov r2, r3
|
|
8005e0a: 460b mov r3, r1
|
|
8005e0c: 80fb strh r3, [r7, #6]
|
|
8005e0e: 4613 mov r3, r2
|
|
8005e10: 80bb strh r3, [r7, #4]
|
|
const struct pbuf *p;
|
|
u16_t left = 0;
|
|
8005e12: 2300 movs r3, #0
|
|
8005e14: 837b strh r3, [r7, #26]
|
|
u16_t buf_copy_len;
|
|
u16_t copied_total = 0;
|
|
8005e16: 2300 movs r3, #0
|
|
8005e18: 82fb strh r3, [r7, #22]
|
|
|
|
LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;);
|
|
8005e1a: 68fb ldr r3, [r7, #12]
|
|
8005e1c: 2b00 cmp r3, #0
|
|
8005e1e: d108 bne.n 8005e32 <pbuf_copy_partial+0x36>
|
|
8005e20: 4b2b ldr r3, [pc, #172] ; (8005ed0 <pbuf_copy_partial+0xd4>)
|
|
8005e22: f240 420a movw r2, #1034 ; 0x40a
|
|
8005e26: 492b ldr r1, [pc, #172] ; (8005ed4 <pbuf_copy_partial+0xd8>)
|
|
8005e28: 482b ldr r0, [pc, #172] ; (8005ed8 <pbuf_copy_partial+0xdc>)
|
|
8005e2a: f00a fb65 bl 80104f8 <printf>
|
|
8005e2e: 2300 movs r3, #0
|
|
8005e30: e04a b.n 8005ec8 <pbuf_copy_partial+0xcc>
|
|
LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;);
|
|
8005e32: 68bb ldr r3, [r7, #8]
|
|
8005e34: 2b00 cmp r3, #0
|
|
8005e36: d108 bne.n 8005e4a <pbuf_copy_partial+0x4e>
|
|
8005e38: 4b25 ldr r3, [pc, #148] ; (8005ed0 <pbuf_copy_partial+0xd4>)
|
|
8005e3a: f240 420b movw r2, #1035 ; 0x40b
|
|
8005e3e: 4927 ldr r1, [pc, #156] ; (8005edc <pbuf_copy_partial+0xe0>)
|
|
8005e40: 4825 ldr r0, [pc, #148] ; (8005ed8 <pbuf_copy_partial+0xdc>)
|
|
8005e42: f00a fb59 bl 80104f8 <printf>
|
|
8005e46: 2300 movs r3, #0
|
|
8005e48: e03e b.n 8005ec8 <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) {
|
|
8005e4a: 68fb ldr r3, [r7, #12]
|
|
8005e4c: 61fb str r3, [r7, #28]
|
|
8005e4e: e034 b.n 8005eba <pbuf_copy_partial+0xbe>
|
|
if ((offset != 0) && (offset >= p->len)) {
|
|
8005e50: 88bb ldrh r3, [r7, #4]
|
|
8005e52: 2b00 cmp r3, #0
|
|
8005e54: d00a beq.n 8005e6c <pbuf_copy_partial+0x70>
|
|
8005e56: 69fb ldr r3, [r7, #28]
|
|
8005e58: 895b ldrh r3, [r3, #10]
|
|
8005e5a: 88ba ldrh r2, [r7, #4]
|
|
8005e5c: 429a cmp r2, r3
|
|
8005e5e: d305 bcc.n 8005e6c <pbuf_copy_partial+0x70>
|
|
/* don't copy from this buffer -> on to the next */
|
|
offset = (u16_t)(offset - p->len);
|
|
8005e60: 69fb ldr r3, [r7, #28]
|
|
8005e62: 895b ldrh r3, [r3, #10]
|
|
8005e64: 88ba ldrh r2, [r7, #4]
|
|
8005e66: 1ad3 subs r3, r2, r3
|
|
8005e68: 80bb strh r3, [r7, #4]
|
|
8005e6a: e023 b.n 8005eb4 <pbuf_copy_partial+0xb8>
|
|
} else {
|
|
/* copy from this buffer. maybe only partially. */
|
|
buf_copy_len = (u16_t)(p->len - offset);
|
|
8005e6c: 69fb ldr r3, [r7, #28]
|
|
8005e6e: 895a ldrh r2, [r3, #10]
|
|
8005e70: 88bb ldrh r3, [r7, #4]
|
|
8005e72: 1ad3 subs r3, r2, r3
|
|
8005e74: 833b strh r3, [r7, #24]
|
|
if (buf_copy_len > len) {
|
|
8005e76: 8b3a ldrh r2, [r7, #24]
|
|
8005e78: 88fb ldrh r3, [r7, #6]
|
|
8005e7a: 429a cmp r2, r3
|
|
8005e7c: d901 bls.n 8005e82 <pbuf_copy_partial+0x86>
|
|
buf_copy_len = len;
|
|
8005e7e: 88fb ldrh r3, [r7, #6]
|
|
8005e80: 833b strh r3, [r7, #24]
|
|
}
|
|
/* copy the necessary parts of the buffer */
|
|
MEMCPY(&((char *)dataptr)[left], &((char *)p->payload)[offset], buf_copy_len);
|
|
8005e82: 8b7b ldrh r3, [r7, #26]
|
|
8005e84: 68ba ldr r2, [r7, #8]
|
|
8005e86: 18d0 adds r0, r2, r3
|
|
8005e88: 69fb ldr r3, [r7, #28]
|
|
8005e8a: 685a ldr r2, [r3, #4]
|
|
8005e8c: 88bb ldrh r3, [r7, #4]
|
|
8005e8e: 4413 add r3, r2
|
|
8005e90: 8b3a ldrh r2, [r7, #24]
|
|
8005e92: 4619 mov r1, r3
|
|
8005e94: f00a fb00 bl 8010498 <memcpy>
|
|
copied_total = (u16_t)(copied_total + buf_copy_len);
|
|
8005e98: 8afa ldrh r2, [r7, #22]
|
|
8005e9a: 8b3b ldrh r3, [r7, #24]
|
|
8005e9c: 4413 add r3, r2
|
|
8005e9e: 82fb strh r3, [r7, #22]
|
|
left = (u16_t)(left + buf_copy_len);
|
|
8005ea0: 8b7a ldrh r2, [r7, #26]
|
|
8005ea2: 8b3b ldrh r3, [r7, #24]
|
|
8005ea4: 4413 add r3, r2
|
|
8005ea6: 837b strh r3, [r7, #26]
|
|
len = (u16_t)(len - buf_copy_len);
|
|
8005ea8: 88fa ldrh r2, [r7, #6]
|
|
8005eaa: 8b3b ldrh r3, [r7, #24]
|
|
8005eac: 1ad3 subs r3, r2, r3
|
|
8005eae: 80fb strh r3, [r7, #6]
|
|
offset = 0;
|
|
8005eb0: 2300 movs r3, #0
|
|
8005eb2: 80bb strh r3, [r7, #4]
|
|
for (p = buf; len != 0 && p != NULL; p = p->next) {
|
|
8005eb4: 69fb ldr r3, [r7, #28]
|
|
8005eb6: 681b ldr r3, [r3, #0]
|
|
8005eb8: 61fb str r3, [r7, #28]
|
|
8005eba: 88fb ldrh r3, [r7, #6]
|
|
8005ebc: 2b00 cmp r3, #0
|
|
8005ebe: d002 beq.n 8005ec6 <pbuf_copy_partial+0xca>
|
|
8005ec0: 69fb ldr r3, [r7, #28]
|
|
8005ec2: 2b00 cmp r3, #0
|
|
8005ec4: d1c4 bne.n 8005e50 <pbuf_copy_partial+0x54>
|
|
}
|
|
}
|
|
return copied_total;
|
|
8005ec6: 8afb ldrh r3, [r7, #22]
|
|
}
|
|
8005ec8: 4618 mov r0, r3
|
|
8005eca: 3720 adds r7, #32
|
|
8005ecc: 46bd mov sp, r7
|
|
8005ece: bd80 pop {r7, pc}
|
|
8005ed0: 0801561c .word 0x0801561c
|
|
8005ed4: 08015964 .word 0x08015964
|
|
8005ed8: 0801567c .word 0x0801567c
|
|
8005edc: 08015984 .word 0x08015984
|
|
|
|
08005ee0 <pbuf_clone>:
|
|
*
|
|
* @return a new pbuf or NULL if allocation fails
|
|
*/
|
|
struct pbuf *
|
|
pbuf_clone(pbuf_layer layer, pbuf_type type, struct pbuf *p)
|
|
{
|
|
8005ee0: b580 push {r7, lr}
|
|
8005ee2: b084 sub sp, #16
|
|
8005ee4: af00 add r7, sp, #0
|
|
8005ee6: 4603 mov r3, r0
|
|
8005ee8: 603a str r2, [r7, #0]
|
|
8005eea: 71fb strb r3, [r7, #7]
|
|
8005eec: 460b mov r3, r1
|
|
8005eee: 80bb strh r3, [r7, #4]
|
|
struct pbuf *q;
|
|
err_t err;
|
|
q = pbuf_alloc(layer, p->tot_len, type);
|
|
8005ef0: 683b ldr r3, [r7, #0]
|
|
8005ef2: 8919 ldrh r1, [r3, #8]
|
|
8005ef4: 88ba ldrh r2, [r7, #4]
|
|
8005ef6: 79fb ldrb r3, [r7, #7]
|
|
8005ef8: 4618 mov r0, r3
|
|
8005efa: f7ff faa1 bl 8005440 <pbuf_alloc>
|
|
8005efe: 60f8 str r0, [r7, #12]
|
|
if (q == NULL) {
|
|
8005f00: 68fb ldr r3, [r7, #12]
|
|
8005f02: 2b00 cmp r3, #0
|
|
8005f04: d101 bne.n 8005f0a <pbuf_clone+0x2a>
|
|
return NULL;
|
|
8005f06: 2300 movs r3, #0
|
|
8005f08: e011 b.n 8005f2e <pbuf_clone+0x4e>
|
|
}
|
|
err = pbuf_copy(q, p);
|
|
8005f0a: 6839 ldr r1, [r7, #0]
|
|
8005f0c: 68f8 ldr r0, [r7, #12]
|
|
8005f0e: f7ff fea3 bl 8005c58 <pbuf_copy>
|
|
8005f12: 4603 mov r3, r0
|
|
8005f14: 72fb strb r3, [r7, #11]
|
|
LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */
|
|
LWIP_ASSERT("pbuf_copy failed", err == ERR_OK);
|
|
8005f16: f997 300b ldrsb.w r3, [r7, #11]
|
|
8005f1a: 2b00 cmp r3, #0
|
|
8005f1c: d006 beq.n 8005f2c <pbuf_clone+0x4c>
|
|
8005f1e: 4b06 ldr r3, [pc, #24] ; (8005f38 <pbuf_clone+0x58>)
|
|
8005f20: f240 5224 movw r2, #1316 ; 0x524
|
|
8005f24: 4905 ldr r1, [pc, #20] ; (8005f3c <pbuf_clone+0x5c>)
|
|
8005f26: 4806 ldr r0, [pc, #24] ; (8005f40 <pbuf_clone+0x60>)
|
|
8005f28: f00a fae6 bl 80104f8 <printf>
|
|
return q;
|
|
8005f2c: 68fb ldr r3, [r7, #12]
|
|
}
|
|
8005f2e: 4618 mov r0, r3
|
|
8005f30: 3710 adds r7, #16
|
|
8005f32: 46bd mov sp, r7
|
|
8005f34: bd80 pop {r7, pc}
|
|
8005f36: bf00 nop
|
|
8005f38: 0801561c .word 0x0801561c
|
|
8005f3c: 08015a90 .word 0x08015a90
|
|
8005f40: 0801567c .word 0x0801567c
|
|
|
|
08005f44 <tcp_init>:
|
|
/**
|
|
* Initialize this module.
|
|
*/
|
|
void
|
|
tcp_init(void)
|
|
{
|
|
8005f44: b580 push {r7, lr}
|
|
8005f46: af00 add r7, sp, #0
|
|
#ifdef LWIP_RAND
|
|
tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());
|
|
8005f48: f00a fae8 bl 801051c <rand>
|
|
8005f4c: 4603 mov r3, r0
|
|
8005f4e: b29b uxth r3, r3
|
|
8005f50: f3c3 030d ubfx r3, r3, #0, #14
|
|
8005f54: b29b uxth r3, r3
|
|
8005f56: f5a3 4380 sub.w r3, r3, #16384 ; 0x4000
|
|
8005f5a: b29a uxth r2, r3
|
|
8005f5c: 4b01 ldr r3, [pc, #4] ; (8005f64 <tcp_init+0x20>)
|
|
8005f5e: 801a strh r2, [r3, #0]
|
|
#endif /* LWIP_RAND */
|
|
}
|
|
8005f60: bf00 nop
|
|
8005f62: bd80 pop {r7, pc}
|
|
8005f64: 20000020 .word 0x20000020
|
|
|
|
08005f68 <tcp_free>:
|
|
|
|
/** Free a tcp pcb */
|
|
void
|
|
tcp_free(struct tcp_pcb *pcb)
|
|
{
|
|
8005f68: b580 push {r7, lr}
|
|
8005f6a: b082 sub sp, #8
|
|
8005f6c: af00 add r7, sp, #0
|
|
8005f6e: 6078 str r0, [r7, #4]
|
|
LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN);
|
|
8005f70: 687b ldr r3, [r7, #4]
|
|
8005f72: 7d1b ldrb r3, [r3, #20]
|
|
8005f74: 2b01 cmp r3, #1
|
|
8005f76: d105 bne.n 8005f84 <tcp_free+0x1c>
|
|
8005f78: 4b06 ldr r3, [pc, #24] ; (8005f94 <tcp_free+0x2c>)
|
|
8005f7a: 22d4 movs r2, #212 ; 0xd4
|
|
8005f7c: 4906 ldr r1, [pc, #24] ; (8005f98 <tcp_free+0x30>)
|
|
8005f7e: 4807 ldr r0, [pc, #28] ; (8005f9c <tcp_free+0x34>)
|
|
8005f80: f00a faba bl 80104f8 <printf>
|
|
#if LWIP_TCP_PCB_NUM_EXT_ARGS
|
|
tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args);
|
|
#endif
|
|
memp_free(MEMP_TCP_PCB, pcb);
|
|
8005f84: 6879 ldr r1, [r7, #4]
|
|
8005f86: 2001 movs r0, #1
|
|
8005f88: f7fe febc bl 8004d04 <memp_free>
|
|
}
|
|
8005f8c: bf00 nop
|
|
8005f8e: 3708 adds r7, #8
|
|
8005f90: 46bd mov sp, r7
|
|
8005f92: bd80 pop {r7, pc}
|
|
8005f94: 08015b1c .word 0x08015b1c
|
|
8005f98: 08015b4c .word 0x08015b4c
|
|
8005f9c: 08015b60 .word 0x08015b60
|
|
|
|
08005fa0 <tcp_free_listen>:
|
|
|
|
/** Free a tcp listen pcb */
|
|
static void
|
|
tcp_free_listen(struct tcp_pcb *pcb)
|
|
{
|
|
8005fa0: b580 push {r7, lr}
|
|
8005fa2: b082 sub sp, #8
|
|
8005fa4: af00 add r7, sp, #0
|
|
8005fa6: 6078 str r0, [r7, #4]
|
|
LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN);
|
|
8005fa8: 687b ldr r3, [r7, #4]
|
|
8005faa: 7d1b ldrb r3, [r3, #20]
|
|
8005fac: 2b01 cmp r3, #1
|
|
8005fae: d105 bne.n 8005fbc <tcp_free_listen+0x1c>
|
|
8005fb0: 4b06 ldr r3, [pc, #24] ; (8005fcc <tcp_free_listen+0x2c>)
|
|
8005fb2: 22df movs r2, #223 ; 0xdf
|
|
8005fb4: 4906 ldr r1, [pc, #24] ; (8005fd0 <tcp_free_listen+0x30>)
|
|
8005fb6: 4807 ldr r0, [pc, #28] ; (8005fd4 <tcp_free_listen+0x34>)
|
|
8005fb8: f00a fa9e bl 80104f8 <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);
|
|
8005fbc: 6879 ldr r1, [r7, #4]
|
|
8005fbe: 2002 movs r0, #2
|
|
8005fc0: f7fe fea0 bl 8004d04 <memp_free>
|
|
}
|
|
8005fc4: bf00 nop
|
|
8005fc6: 3708 adds r7, #8
|
|
8005fc8: 46bd mov sp, r7
|
|
8005fca: bd80 pop {r7, pc}
|
|
8005fcc: 08015b1c .word 0x08015b1c
|
|
8005fd0: 08015b88 .word 0x08015b88
|
|
8005fd4: 08015b60 .word 0x08015b60
|
|
|
|
08005fd8 <tcp_tmr>:
|
|
/**
|
|
* Called periodically to dispatch TCP timers.
|
|
*/
|
|
void
|
|
tcp_tmr(void)
|
|
{
|
|
8005fd8: b580 push {r7, lr}
|
|
8005fda: af00 add r7, sp, #0
|
|
/* Call tcp_fasttmr() every 250 ms */
|
|
tcp_fasttmr();
|
|
8005fdc: f000 fea2 bl 8006d24 <tcp_fasttmr>
|
|
|
|
if (++tcp_timer & 1) {
|
|
8005fe0: 4b07 ldr r3, [pc, #28] ; (8006000 <tcp_tmr+0x28>)
|
|
8005fe2: 781b ldrb r3, [r3, #0]
|
|
8005fe4: 3301 adds r3, #1
|
|
8005fe6: b2da uxtb r2, r3
|
|
8005fe8: 4b05 ldr r3, [pc, #20] ; (8006000 <tcp_tmr+0x28>)
|
|
8005fea: 701a strb r2, [r3, #0]
|
|
8005fec: 4b04 ldr r3, [pc, #16] ; (8006000 <tcp_tmr+0x28>)
|
|
8005fee: 781b ldrb r3, [r3, #0]
|
|
8005ff0: f003 0301 and.w r3, r3, #1
|
|
8005ff4: 2b00 cmp r3, #0
|
|
8005ff6: d001 beq.n 8005ffc <tcp_tmr+0x24>
|
|
/* Call tcp_slowtmr() every 500 ms, i.e., every other timer
|
|
tcp_tmr() is called. */
|
|
tcp_slowtmr();
|
|
8005ff8: f000 fb54 bl 80066a4 <tcp_slowtmr>
|
|
}
|
|
}
|
|
8005ffc: bf00 nop
|
|
8005ffe: bd80 pop {r7, pc}
|
|
8006000: 20008c15 .word 0x20008c15
|
|
|
|
08006004 <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)
|
|
{
|
|
8006004: b580 push {r7, lr}
|
|
8006006: b084 sub sp, #16
|
|
8006008: af00 add r7, sp, #0
|
|
800600a: 6078 str r0, [r7, #4]
|
|
800600c: 6039 str r1, [r7, #0]
|
|
struct tcp_pcb *pcb;
|
|
|
|
LWIP_ASSERT("tcp_remove_listener: invalid listener", lpcb != NULL);
|
|
800600e: 683b ldr r3, [r7, #0]
|
|
8006010: 2b00 cmp r3, #0
|
|
8006012: d105 bne.n 8006020 <tcp_remove_listener+0x1c>
|
|
8006014: 4b0d ldr r3, [pc, #52] ; (800604c <tcp_remove_listener+0x48>)
|
|
8006016: 22ff movs r2, #255 ; 0xff
|
|
8006018: 490d ldr r1, [pc, #52] ; (8006050 <tcp_remove_listener+0x4c>)
|
|
800601a: 480e ldr r0, [pc, #56] ; (8006054 <tcp_remove_listener+0x50>)
|
|
800601c: f00a fa6c bl 80104f8 <printf>
|
|
|
|
for (pcb = list; pcb != NULL; pcb = pcb->next) {
|
|
8006020: 687b ldr r3, [r7, #4]
|
|
8006022: 60fb str r3, [r7, #12]
|
|
8006024: e00a b.n 800603c <tcp_remove_listener+0x38>
|
|
if (pcb->listener == lpcb) {
|
|
8006026: 68fb ldr r3, [r7, #12]
|
|
8006028: 6fdb ldr r3, [r3, #124] ; 0x7c
|
|
800602a: 683a ldr r2, [r7, #0]
|
|
800602c: 429a cmp r2, r3
|
|
800602e: d102 bne.n 8006036 <tcp_remove_listener+0x32>
|
|
pcb->listener = NULL;
|
|
8006030: 68fb ldr r3, [r7, #12]
|
|
8006032: 2200 movs r2, #0
|
|
8006034: 67da str r2, [r3, #124] ; 0x7c
|
|
for (pcb = list; pcb != NULL; pcb = pcb->next) {
|
|
8006036: 68fb ldr r3, [r7, #12]
|
|
8006038: 68db ldr r3, [r3, #12]
|
|
800603a: 60fb str r3, [r7, #12]
|
|
800603c: 68fb ldr r3, [r7, #12]
|
|
800603e: 2b00 cmp r3, #0
|
|
8006040: d1f1 bne.n 8006026 <tcp_remove_listener+0x22>
|
|
}
|
|
}
|
|
}
|
|
8006042: bf00 nop
|
|
8006044: bf00 nop
|
|
8006046: 3710 adds r7, #16
|
|
8006048: 46bd mov sp, r7
|
|
800604a: bd80 pop {r7, pc}
|
|
800604c: 08015b1c .word 0x08015b1c
|
|
8006050: 08015ba4 .word 0x08015ba4
|
|
8006054: 08015b60 .word 0x08015b60
|
|
|
|
08006058 <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)
|
|
{
|
|
8006058: b580 push {r7, lr}
|
|
800605a: b084 sub sp, #16
|
|
800605c: af00 add r7, sp, #0
|
|
800605e: 6078 str r0, [r7, #4]
|
|
#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG
|
|
size_t i;
|
|
LWIP_ASSERT("pcb != NULL", pcb != NULL);
|
|
8006060: 687b ldr r3, [r7, #4]
|
|
8006062: 2b00 cmp r3, #0
|
|
8006064: d106 bne.n 8006074 <tcp_listen_closed+0x1c>
|
|
8006066: 4b14 ldr r3, [pc, #80] ; (80060b8 <tcp_listen_closed+0x60>)
|
|
8006068: f240 1211 movw r2, #273 ; 0x111
|
|
800606c: 4913 ldr r1, [pc, #76] ; (80060bc <tcp_listen_closed+0x64>)
|
|
800606e: 4814 ldr r0, [pc, #80] ; (80060c0 <tcp_listen_closed+0x68>)
|
|
8006070: f00a fa42 bl 80104f8 <printf>
|
|
LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN);
|
|
8006074: 687b ldr r3, [r7, #4]
|
|
8006076: 7d1b ldrb r3, [r3, #20]
|
|
8006078: 2b01 cmp r3, #1
|
|
800607a: d006 beq.n 800608a <tcp_listen_closed+0x32>
|
|
800607c: 4b0e ldr r3, [pc, #56] ; (80060b8 <tcp_listen_closed+0x60>)
|
|
800607e: f44f 7289 mov.w r2, #274 ; 0x112
|
|
8006082: 4910 ldr r1, [pc, #64] ; (80060c4 <tcp_listen_closed+0x6c>)
|
|
8006084: 480e ldr r0, [pc, #56] ; (80060c0 <tcp_listen_closed+0x68>)
|
|
8006086: f00a fa37 bl 80104f8 <printf>
|
|
for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) {
|
|
800608a: 2301 movs r3, #1
|
|
800608c: 60fb str r3, [r7, #12]
|
|
800608e: e00b b.n 80060a8 <tcp_listen_closed+0x50>
|
|
tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen *)pcb);
|
|
8006090: 4a0d ldr r2, [pc, #52] ; (80060c8 <tcp_listen_closed+0x70>)
|
|
8006092: 68fb ldr r3, [r7, #12]
|
|
8006094: f852 3023 ldr.w r3, [r2, r3, lsl #2]
|
|
8006098: 681b ldr r3, [r3, #0]
|
|
800609a: 6879 ldr r1, [r7, #4]
|
|
800609c: 4618 mov r0, r3
|
|
800609e: f7ff ffb1 bl 8006004 <tcp_remove_listener>
|
|
for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) {
|
|
80060a2: 68fb ldr r3, [r7, #12]
|
|
80060a4: 3301 adds r3, #1
|
|
80060a6: 60fb str r3, [r7, #12]
|
|
80060a8: 68fb ldr r3, [r7, #12]
|
|
80060aa: 2b03 cmp r3, #3
|
|
80060ac: d9f0 bls.n 8006090 <tcp_listen_closed+0x38>
|
|
}
|
|
#endif
|
|
LWIP_UNUSED_ARG(pcb);
|
|
}
|
|
80060ae: bf00 nop
|
|
80060b0: bf00 nop
|
|
80060b2: 3710 adds r7, #16
|
|
80060b4: 46bd mov sp, r7
|
|
80060b6: bd80 pop {r7, pc}
|
|
80060b8: 08015b1c .word 0x08015b1c
|
|
80060bc: 08015bcc .word 0x08015bcc
|
|
80060c0: 08015b60 .word 0x08015b60
|
|
80060c4: 08015bd8 .word 0x08015bd8
|
|
80060c8: 08017f04 .word 0x08017f04
|
|
|
|
080060cc <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)
|
|
{
|
|
80060cc: b5b0 push {r4, r5, r7, lr}
|
|
80060ce: b088 sub sp, #32
|
|
80060d0: af04 add r7, sp, #16
|
|
80060d2: 6078 str r0, [r7, #4]
|
|
80060d4: 460b mov r3, r1
|
|
80060d6: 70fb strb r3, [r7, #3]
|
|
LWIP_ASSERT("tcp_close_shutdown: invalid pcb", pcb != NULL);
|
|
80060d8: 687b ldr r3, [r7, #4]
|
|
80060da: 2b00 cmp r3, #0
|
|
80060dc: d106 bne.n 80060ec <tcp_close_shutdown+0x20>
|
|
80060de: 4b63 ldr r3, [pc, #396] ; (800626c <tcp_close_shutdown+0x1a0>)
|
|
80060e0: f44f 72af mov.w r2, #350 ; 0x15e
|
|
80060e4: 4962 ldr r1, [pc, #392] ; (8006270 <tcp_close_shutdown+0x1a4>)
|
|
80060e6: 4863 ldr r0, [pc, #396] ; (8006274 <tcp_close_shutdown+0x1a8>)
|
|
80060e8: f00a fa06 bl 80104f8 <printf>
|
|
|
|
if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) {
|
|
80060ec: 78fb ldrb r3, [r7, #3]
|
|
80060ee: 2b00 cmp r3, #0
|
|
80060f0: d066 beq.n 80061c0 <tcp_close_shutdown+0xf4>
|
|
80060f2: 687b ldr r3, [r7, #4]
|
|
80060f4: 7d1b ldrb r3, [r3, #20]
|
|
80060f6: 2b04 cmp r3, #4
|
|
80060f8: d003 beq.n 8006102 <tcp_close_shutdown+0x36>
|
|
80060fa: 687b ldr r3, [r7, #4]
|
|
80060fc: 7d1b ldrb r3, [r3, #20]
|
|
80060fe: 2b07 cmp r3, #7
|
|
8006100: d15e bne.n 80061c0 <tcp_close_shutdown+0xf4>
|
|
if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) {
|
|
8006102: 687b ldr r3, [r7, #4]
|
|
8006104: 6f9b ldr r3, [r3, #120] ; 0x78
|
|
8006106: 2b00 cmp r3, #0
|
|
8006108: d104 bne.n 8006114 <tcp_close_shutdown+0x48>
|
|
800610a: 687b ldr r3, [r7, #4]
|
|
800610c: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
800610e: f5b3 6f06 cmp.w r3, #2144 ; 0x860
|
|
8006112: d055 beq.n 80061c0 <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);
|
|
8006114: 687b ldr r3, [r7, #4]
|
|
8006116: 8b5b ldrh r3, [r3, #26]
|
|
8006118: f003 0310 and.w r3, r3, #16
|
|
800611c: 2b00 cmp r3, #0
|
|
800611e: d106 bne.n 800612e <tcp_close_shutdown+0x62>
|
|
8006120: 4b52 ldr r3, [pc, #328] ; (800626c <tcp_close_shutdown+0x1a0>)
|
|
8006122: f44f 72b2 mov.w r2, #356 ; 0x164
|
|
8006126: 4954 ldr r1, [pc, #336] ; (8006278 <tcp_close_shutdown+0x1ac>)
|
|
8006128: 4852 ldr r0, [pc, #328] ; (8006274 <tcp_close_shutdown+0x1a8>)
|
|
800612a: f00a f9e5 bl 80104f8 <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,
|
|
800612e: 687b ldr r3, [r7, #4]
|
|
8006130: 6d18 ldr r0, [r3, #80] ; 0x50
|
|
8006132: 687b ldr r3, [r7, #4]
|
|
8006134: 6a5c ldr r4, [r3, #36] ; 0x24
|
|
8006136: 687d ldr r5, [r7, #4]
|
|
8006138: 687b ldr r3, [r7, #4]
|
|
800613a: 3304 adds r3, #4
|
|
800613c: 687a ldr r2, [r7, #4]
|
|
800613e: 8ad2 ldrh r2, [r2, #22]
|
|
8006140: 6879 ldr r1, [r7, #4]
|
|
8006142: 8b09 ldrh r1, [r1, #24]
|
|
8006144: 9102 str r1, [sp, #8]
|
|
8006146: 9201 str r2, [sp, #4]
|
|
8006148: 9300 str r3, [sp, #0]
|
|
800614a: 462b mov r3, r5
|
|
800614c: 4622 mov r2, r4
|
|
800614e: 4601 mov r1, r0
|
|
8006150: 6878 ldr r0, [r7, #4]
|
|
8006152: f004 fe91 bl 800ae78 <tcp_rst>
|
|
pcb->local_port, pcb->remote_port);
|
|
|
|
tcp_pcb_purge(pcb);
|
|
8006156: 6878 ldr r0, [r7, #4]
|
|
8006158: f001 f8c6 bl 80072e8 <tcp_pcb_purge>
|
|
TCP_RMV_ACTIVE(pcb);
|
|
800615c: 4b47 ldr r3, [pc, #284] ; (800627c <tcp_close_shutdown+0x1b0>)
|
|
800615e: 681b ldr r3, [r3, #0]
|
|
8006160: 687a ldr r2, [r7, #4]
|
|
8006162: 429a cmp r2, r3
|
|
8006164: d105 bne.n 8006172 <tcp_close_shutdown+0xa6>
|
|
8006166: 4b45 ldr r3, [pc, #276] ; (800627c <tcp_close_shutdown+0x1b0>)
|
|
8006168: 681b ldr r3, [r3, #0]
|
|
800616a: 68db ldr r3, [r3, #12]
|
|
800616c: 4a43 ldr r2, [pc, #268] ; (800627c <tcp_close_shutdown+0x1b0>)
|
|
800616e: 6013 str r3, [r2, #0]
|
|
8006170: e013 b.n 800619a <tcp_close_shutdown+0xce>
|
|
8006172: 4b42 ldr r3, [pc, #264] ; (800627c <tcp_close_shutdown+0x1b0>)
|
|
8006174: 681b ldr r3, [r3, #0]
|
|
8006176: 60fb str r3, [r7, #12]
|
|
8006178: e00c b.n 8006194 <tcp_close_shutdown+0xc8>
|
|
800617a: 68fb ldr r3, [r7, #12]
|
|
800617c: 68db ldr r3, [r3, #12]
|
|
800617e: 687a ldr r2, [r7, #4]
|
|
8006180: 429a cmp r2, r3
|
|
8006182: d104 bne.n 800618e <tcp_close_shutdown+0xc2>
|
|
8006184: 687b ldr r3, [r7, #4]
|
|
8006186: 68da ldr r2, [r3, #12]
|
|
8006188: 68fb ldr r3, [r7, #12]
|
|
800618a: 60da str r2, [r3, #12]
|
|
800618c: e005 b.n 800619a <tcp_close_shutdown+0xce>
|
|
800618e: 68fb ldr r3, [r7, #12]
|
|
8006190: 68db ldr r3, [r3, #12]
|
|
8006192: 60fb str r3, [r7, #12]
|
|
8006194: 68fb ldr r3, [r7, #12]
|
|
8006196: 2b00 cmp r3, #0
|
|
8006198: d1ef bne.n 800617a <tcp_close_shutdown+0xae>
|
|
800619a: 687b ldr r3, [r7, #4]
|
|
800619c: 2200 movs r2, #0
|
|
800619e: 60da str r2, [r3, #12]
|
|
80061a0: 4b37 ldr r3, [pc, #220] ; (8006280 <tcp_close_shutdown+0x1b4>)
|
|
80061a2: 2201 movs r2, #1
|
|
80061a4: 701a strb r2, [r3, #0]
|
|
/* Deallocate the pcb since we already sent a RST for it */
|
|
if (tcp_input_pcb == pcb) {
|
|
80061a6: 4b37 ldr r3, [pc, #220] ; (8006284 <tcp_close_shutdown+0x1b8>)
|
|
80061a8: 681b ldr r3, [r3, #0]
|
|
80061aa: 687a ldr r2, [r7, #4]
|
|
80061ac: 429a cmp r2, r3
|
|
80061ae: d102 bne.n 80061b6 <tcp_close_shutdown+0xea>
|
|
/* prevent using a deallocated pcb: free it from tcp_input later */
|
|
tcp_trigger_input_pcb_close();
|
|
80061b0: f003 fd5e bl 8009c70 <tcp_trigger_input_pcb_close>
|
|
80061b4: e002 b.n 80061bc <tcp_close_shutdown+0xf0>
|
|
} else {
|
|
tcp_free(pcb);
|
|
80061b6: 6878 ldr r0, [r7, #4]
|
|
80061b8: f7ff fed6 bl 8005f68 <tcp_free>
|
|
}
|
|
return ERR_OK;
|
|
80061bc: 2300 movs r3, #0
|
|
80061be: e050 b.n 8006262 <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) {
|
|
80061c0: 687b ldr r3, [r7, #4]
|
|
80061c2: 7d1b ldrb r3, [r3, #20]
|
|
80061c4: 2b02 cmp r3, #2
|
|
80061c6: d03b beq.n 8006240 <tcp_close_shutdown+0x174>
|
|
80061c8: 2b02 cmp r3, #2
|
|
80061ca: dc44 bgt.n 8006256 <tcp_close_shutdown+0x18a>
|
|
80061cc: 2b00 cmp r3, #0
|
|
80061ce: d002 beq.n 80061d6 <tcp_close_shutdown+0x10a>
|
|
80061d0: 2b01 cmp r3, #1
|
|
80061d2: d02a beq.n 800622a <tcp_close_shutdown+0x15e>
|
|
80061d4: e03f b.n 8006256 <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) {
|
|
80061d6: 687b ldr r3, [r7, #4]
|
|
80061d8: 8adb ldrh r3, [r3, #22]
|
|
80061da: 2b00 cmp r3, #0
|
|
80061dc: d021 beq.n 8006222 <tcp_close_shutdown+0x156>
|
|
TCP_RMV(&tcp_bound_pcbs, pcb);
|
|
80061de: 4b2a ldr r3, [pc, #168] ; (8006288 <tcp_close_shutdown+0x1bc>)
|
|
80061e0: 681b ldr r3, [r3, #0]
|
|
80061e2: 687a ldr r2, [r7, #4]
|
|
80061e4: 429a cmp r2, r3
|
|
80061e6: d105 bne.n 80061f4 <tcp_close_shutdown+0x128>
|
|
80061e8: 4b27 ldr r3, [pc, #156] ; (8006288 <tcp_close_shutdown+0x1bc>)
|
|
80061ea: 681b ldr r3, [r3, #0]
|
|
80061ec: 68db ldr r3, [r3, #12]
|
|
80061ee: 4a26 ldr r2, [pc, #152] ; (8006288 <tcp_close_shutdown+0x1bc>)
|
|
80061f0: 6013 str r3, [r2, #0]
|
|
80061f2: e013 b.n 800621c <tcp_close_shutdown+0x150>
|
|
80061f4: 4b24 ldr r3, [pc, #144] ; (8006288 <tcp_close_shutdown+0x1bc>)
|
|
80061f6: 681b ldr r3, [r3, #0]
|
|
80061f8: 60bb str r3, [r7, #8]
|
|
80061fa: e00c b.n 8006216 <tcp_close_shutdown+0x14a>
|
|
80061fc: 68bb ldr r3, [r7, #8]
|
|
80061fe: 68db ldr r3, [r3, #12]
|
|
8006200: 687a ldr r2, [r7, #4]
|
|
8006202: 429a cmp r2, r3
|
|
8006204: d104 bne.n 8006210 <tcp_close_shutdown+0x144>
|
|
8006206: 687b ldr r3, [r7, #4]
|
|
8006208: 68da ldr r2, [r3, #12]
|
|
800620a: 68bb ldr r3, [r7, #8]
|
|
800620c: 60da str r2, [r3, #12]
|
|
800620e: e005 b.n 800621c <tcp_close_shutdown+0x150>
|
|
8006210: 68bb ldr r3, [r7, #8]
|
|
8006212: 68db ldr r3, [r3, #12]
|
|
8006214: 60bb str r3, [r7, #8]
|
|
8006216: 68bb ldr r3, [r7, #8]
|
|
8006218: 2b00 cmp r3, #0
|
|
800621a: d1ef bne.n 80061fc <tcp_close_shutdown+0x130>
|
|
800621c: 687b ldr r3, [r7, #4]
|
|
800621e: 2200 movs r2, #0
|
|
8006220: 60da str r2, [r3, #12]
|
|
}
|
|
tcp_free(pcb);
|
|
8006222: 6878 ldr r0, [r7, #4]
|
|
8006224: f7ff fea0 bl 8005f68 <tcp_free>
|
|
break;
|
|
8006228: e01a b.n 8006260 <tcp_close_shutdown+0x194>
|
|
case LISTEN:
|
|
tcp_listen_closed(pcb);
|
|
800622a: 6878 ldr r0, [r7, #4]
|
|
800622c: f7ff ff14 bl 8006058 <tcp_listen_closed>
|
|
tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb);
|
|
8006230: 6879 ldr r1, [r7, #4]
|
|
8006232: 4816 ldr r0, [pc, #88] ; (800628c <tcp_close_shutdown+0x1c0>)
|
|
8006234: f001 f8a8 bl 8007388 <tcp_pcb_remove>
|
|
tcp_free_listen(pcb);
|
|
8006238: 6878 ldr r0, [r7, #4]
|
|
800623a: f7ff feb1 bl 8005fa0 <tcp_free_listen>
|
|
break;
|
|
800623e: e00f b.n 8006260 <tcp_close_shutdown+0x194>
|
|
case SYN_SENT:
|
|
TCP_PCB_REMOVE_ACTIVE(pcb);
|
|
8006240: 6879 ldr r1, [r7, #4]
|
|
8006242: 480e ldr r0, [pc, #56] ; (800627c <tcp_close_shutdown+0x1b0>)
|
|
8006244: f001 f8a0 bl 8007388 <tcp_pcb_remove>
|
|
8006248: 4b0d ldr r3, [pc, #52] ; (8006280 <tcp_close_shutdown+0x1b4>)
|
|
800624a: 2201 movs r2, #1
|
|
800624c: 701a strb r2, [r3, #0]
|
|
tcp_free(pcb);
|
|
800624e: 6878 ldr r0, [r7, #4]
|
|
8006250: f7ff fe8a bl 8005f68 <tcp_free>
|
|
MIB2_STATS_INC(mib2.tcpattemptfails);
|
|
break;
|
|
8006254: e004 b.n 8006260 <tcp_close_shutdown+0x194>
|
|
default:
|
|
return tcp_close_shutdown_fin(pcb);
|
|
8006256: 6878 ldr r0, [r7, #4]
|
|
8006258: f000 f81a bl 8006290 <tcp_close_shutdown_fin>
|
|
800625c: 4603 mov r3, r0
|
|
800625e: e000 b.n 8006262 <tcp_close_shutdown+0x196>
|
|
}
|
|
return ERR_OK;
|
|
8006260: 2300 movs r3, #0
|
|
}
|
|
8006262: 4618 mov r0, r3
|
|
8006264: 3710 adds r7, #16
|
|
8006266: 46bd mov sp, r7
|
|
8006268: bdb0 pop {r4, r5, r7, pc}
|
|
800626a: bf00 nop
|
|
800626c: 08015b1c .word 0x08015b1c
|
|
8006270: 08015bf0 .word 0x08015bf0
|
|
8006274: 08015b60 .word 0x08015b60
|
|
8006278: 08015c10 .word 0x08015c10
|
|
800627c: 20008c0c .word 0x20008c0c
|
|
8006280: 20008c14 .word 0x20008c14
|
|
8006284: 20008c4c .word 0x20008c4c
|
|
8006288: 20008c04 .word 0x20008c04
|
|
800628c: 20008c08 .word 0x20008c08
|
|
|
|
08006290 <tcp_close_shutdown_fin>:
|
|
|
|
static err_t
|
|
tcp_close_shutdown_fin(struct tcp_pcb *pcb)
|
|
{
|
|
8006290: b580 push {r7, lr}
|
|
8006292: b084 sub sp, #16
|
|
8006294: af00 add r7, sp, #0
|
|
8006296: 6078 str r0, [r7, #4]
|
|
err_t err;
|
|
LWIP_ASSERT("pcb != NULL", pcb != NULL);
|
|
8006298: 687b ldr r3, [r7, #4]
|
|
800629a: 2b00 cmp r3, #0
|
|
800629c: d106 bne.n 80062ac <tcp_close_shutdown_fin+0x1c>
|
|
800629e: 4b2e ldr r3, [pc, #184] ; (8006358 <tcp_close_shutdown_fin+0xc8>)
|
|
80062a0: f44f 72ce mov.w r2, #412 ; 0x19c
|
|
80062a4: 492d ldr r1, [pc, #180] ; (800635c <tcp_close_shutdown_fin+0xcc>)
|
|
80062a6: 482e ldr r0, [pc, #184] ; (8006360 <tcp_close_shutdown_fin+0xd0>)
|
|
80062a8: f00a f926 bl 80104f8 <printf>
|
|
|
|
switch (pcb->state) {
|
|
80062ac: 687b ldr r3, [r7, #4]
|
|
80062ae: 7d1b ldrb r3, [r3, #20]
|
|
80062b0: 2b07 cmp r3, #7
|
|
80062b2: d020 beq.n 80062f6 <tcp_close_shutdown_fin+0x66>
|
|
80062b4: 2b07 cmp r3, #7
|
|
80062b6: dc2b bgt.n 8006310 <tcp_close_shutdown_fin+0x80>
|
|
80062b8: 2b03 cmp r3, #3
|
|
80062ba: d002 beq.n 80062c2 <tcp_close_shutdown_fin+0x32>
|
|
80062bc: 2b04 cmp r3, #4
|
|
80062be: d00d beq.n 80062dc <tcp_close_shutdown_fin+0x4c>
|
|
80062c0: e026 b.n 8006310 <tcp_close_shutdown_fin+0x80>
|
|
case SYN_RCVD:
|
|
err = tcp_send_fin(pcb);
|
|
80062c2: 6878 ldr r0, [r7, #4]
|
|
80062c4: f003 fee6 bl 800a094 <tcp_send_fin>
|
|
80062c8: 4603 mov r3, r0
|
|
80062ca: 73fb strb r3, [r7, #15]
|
|
if (err == ERR_OK) {
|
|
80062cc: f997 300f ldrsb.w r3, [r7, #15]
|
|
80062d0: 2b00 cmp r3, #0
|
|
80062d2: d11f bne.n 8006314 <tcp_close_shutdown_fin+0x84>
|
|
tcp_backlog_accepted(pcb);
|
|
MIB2_STATS_INC(mib2.tcpattemptfails);
|
|
pcb->state = FIN_WAIT_1;
|
|
80062d4: 687b ldr r3, [r7, #4]
|
|
80062d6: 2205 movs r2, #5
|
|
80062d8: 751a strb r2, [r3, #20]
|
|
}
|
|
break;
|
|
80062da: e01b b.n 8006314 <tcp_close_shutdown_fin+0x84>
|
|
case ESTABLISHED:
|
|
err = tcp_send_fin(pcb);
|
|
80062dc: 6878 ldr r0, [r7, #4]
|
|
80062de: f003 fed9 bl 800a094 <tcp_send_fin>
|
|
80062e2: 4603 mov r3, r0
|
|
80062e4: 73fb strb r3, [r7, #15]
|
|
if (err == ERR_OK) {
|
|
80062e6: f997 300f ldrsb.w r3, [r7, #15]
|
|
80062ea: 2b00 cmp r3, #0
|
|
80062ec: d114 bne.n 8006318 <tcp_close_shutdown_fin+0x88>
|
|
MIB2_STATS_INC(mib2.tcpestabresets);
|
|
pcb->state = FIN_WAIT_1;
|
|
80062ee: 687b ldr r3, [r7, #4]
|
|
80062f0: 2205 movs r2, #5
|
|
80062f2: 751a strb r2, [r3, #20]
|
|
}
|
|
break;
|
|
80062f4: e010 b.n 8006318 <tcp_close_shutdown_fin+0x88>
|
|
case CLOSE_WAIT:
|
|
err = tcp_send_fin(pcb);
|
|
80062f6: 6878 ldr r0, [r7, #4]
|
|
80062f8: f003 fecc bl 800a094 <tcp_send_fin>
|
|
80062fc: 4603 mov r3, r0
|
|
80062fe: 73fb strb r3, [r7, #15]
|
|
if (err == ERR_OK) {
|
|
8006300: f997 300f ldrsb.w r3, [r7, #15]
|
|
8006304: 2b00 cmp r3, #0
|
|
8006306: d109 bne.n 800631c <tcp_close_shutdown_fin+0x8c>
|
|
MIB2_STATS_INC(mib2.tcpestabresets);
|
|
pcb->state = LAST_ACK;
|
|
8006308: 687b ldr r3, [r7, #4]
|
|
800630a: 2209 movs r2, #9
|
|
800630c: 751a strb r2, [r3, #20]
|
|
}
|
|
break;
|
|
800630e: e005 b.n 800631c <tcp_close_shutdown_fin+0x8c>
|
|
default:
|
|
/* Has already been closed, do nothing. */
|
|
return ERR_OK;
|
|
8006310: 2300 movs r3, #0
|
|
8006312: e01c b.n 800634e <tcp_close_shutdown_fin+0xbe>
|
|
break;
|
|
8006314: bf00 nop
|
|
8006316: e002 b.n 800631e <tcp_close_shutdown_fin+0x8e>
|
|
break;
|
|
8006318: bf00 nop
|
|
800631a: e000 b.n 800631e <tcp_close_shutdown_fin+0x8e>
|
|
break;
|
|
800631c: bf00 nop
|
|
}
|
|
|
|
if (err == ERR_OK) {
|
|
800631e: f997 300f ldrsb.w r3, [r7, #15]
|
|
8006322: 2b00 cmp r3, #0
|
|
8006324: d103 bne.n 800632e <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);
|
|
8006326: 6878 ldr r0, [r7, #4]
|
|
8006328: f003 fff2 bl 800a310 <tcp_output>
|
|
800632c: e00d b.n 800634a <tcp_close_shutdown_fin+0xba>
|
|
} else if (err == ERR_MEM) {
|
|
800632e: f997 300f ldrsb.w r3, [r7, #15]
|
|
8006332: f1b3 3fff cmp.w r3, #4294967295
|
|
8006336: d108 bne.n 800634a <tcp_close_shutdown_fin+0xba>
|
|
/* Mark this pcb for closing. Closing is retried from tcp_tmr. */
|
|
tcp_set_flags(pcb, TF_CLOSEPEND);
|
|
8006338: 687b ldr r3, [r7, #4]
|
|
800633a: 8b5b ldrh r3, [r3, #26]
|
|
800633c: f043 0308 orr.w r3, r3, #8
|
|
8006340: b29a uxth r2, r3
|
|
8006342: 687b ldr r3, [r7, #4]
|
|
8006344: 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;
|
|
8006346: 2300 movs r3, #0
|
|
8006348: e001 b.n 800634e <tcp_close_shutdown_fin+0xbe>
|
|
}
|
|
return err;
|
|
800634a: f997 300f ldrsb.w r3, [r7, #15]
|
|
}
|
|
800634e: 4618 mov r0, r3
|
|
8006350: 3710 adds r7, #16
|
|
8006352: 46bd mov sp, r7
|
|
8006354: bd80 pop {r7, pc}
|
|
8006356: bf00 nop
|
|
8006358: 08015b1c .word 0x08015b1c
|
|
800635c: 08015bcc .word 0x08015bcc
|
|
8006360: 08015b60 .word 0x08015b60
|
|
|
|
08006364 <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)
|
|
{
|
|
8006364: b580 push {r7, lr}
|
|
8006366: b082 sub sp, #8
|
|
8006368: af00 add r7, sp, #0
|
|
800636a: 6078 str r0, [r7, #4]
|
|
LWIP_ASSERT_CORE_LOCKED();
|
|
|
|
LWIP_ERROR("tcp_close: invalid pcb", pcb != NULL, return ERR_ARG);
|
|
800636c: 687b ldr r3, [r7, #4]
|
|
800636e: 2b00 cmp r3, #0
|
|
8006370: d109 bne.n 8006386 <tcp_close+0x22>
|
|
8006372: 4b0f ldr r3, [pc, #60] ; (80063b0 <tcp_close+0x4c>)
|
|
8006374: f44f 72f4 mov.w r2, #488 ; 0x1e8
|
|
8006378: 490e ldr r1, [pc, #56] ; (80063b4 <tcp_close+0x50>)
|
|
800637a: 480f ldr r0, [pc, #60] ; (80063b8 <tcp_close+0x54>)
|
|
800637c: f00a f8bc bl 80104f8 <printf>
|
|
8006380: f06f 030f mvn.w r3, #15
|
|
8006384: e00f b.n 80063a6 <tcp_close+0x42>
|
|
LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in "));
|
|
|
|
tcp_debug_print_state(pcb->state);
|
|
|
|
if (pcb->state != LISTEN) {
|
|
8006386: 687b ldr r3, [r7, #4]
|
|
8006388: 7d1b ldrb r3, [r3, #20]
|
|
800638a: 2b01 cmp r3, #1
|
|
800638c: d006 beq.n 800639c <tcp_close+0x38>
|
|
/* Set a flag not to receive any more data... */
|
|
tcp_set_flags(pcb, TF_RXCLOSED);
|
|
800638e: 687b ldr r3, [r7, #4]
|
|
8006390: 8b5b ldrh r3, [r3, #26]
|
|
8006392: f043 0310 orr.w r3, r3, #16
|
|
8006396: b29a uxth r2, r3
|
|
8006398: 687b ldr r3, [r7, #4]
|
|
800639a: 835a strh r2, [r3, #26]
|
|
}
|
|
/* ... and close */
|
|
return tcp_close_shutdown(pcb, 1);
|
|
800639c: 2101 movs r1, #1
|
|
800639e: 6878 ldr r0, [r7, #4]
|
|
80063a0: f7ff fe94 bl 80060cc <tcp_close_shutdown>
|
|
80063a4: 4603 mov r3, r0
|
|
}
|
|
80063a6: 4618 mov r0, r3
|
|
80063a8: 3708 adds r7, #8
|
|
80063aa: 46bd mov sp, r7
|
|
80063ac: bd80 pop {r7, pc}
|
|
80063ae: bf00 nop
|
|
80063b0: 08015b1c .word 0x08015b1c
|
|
80063b4: 08015c2c .word 0x08015c2c
|
|
80063b8: 08015b60 .word 0x08015b60
|
|
|
|
080063bc <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)
|
|
{
|
|
80063bc: b580 push {r7, lr}
|
|
80063be: b08e sub sp, #56 ; 0x38
|
|
80063c0: af04 add r7, sp, #16
|
|
80063c2: 6078 str r0, [r7, #4]
|
|
80063c4: 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);
|
|
80063c6: 687b ldr r3, [r7, #4]
|
|
80063c8: 2b00 cmp r3, #0
|
|
80063ca: d107 bne.n 80063dc <tcp_abandon+0x20>
|
|
80063cc: 4b52 ldr r3, [pc, #328] ; (8006518 <tcp_abandon+0x15c>)
|
|
80063ce: f240 223d movw r2, #573 ; 0x23d
|
|
80063d2: 4952 ldr r1, [pc, #328] ; (800651c <tcp_abandon+0x160>)
|
|
80063d4: 4852 ldr r0, [pc, #328] ; (8006520 <tcp_abandon+0x164>)
|
|
80063d6: f00a f88f bl 80104f8 <printf>
|
|
80063da: e099 b.n 8006510 <tcp_abandon+0x154>
|
|
|
|
/* pcb->state LISTEN not allowed here */
|
|
LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs",
|
|
80063dc: 687b ldr r3, [r7, #4]
|
|
80063de: 7d1b ldrb r3, [r3, #20]
|
|
80063e0: 2b01 cmp r3, #1
|
|
80063e2: d106 bne.n 80063f2 <tcp_abandon+0x36>
|
|
80063e4: 4b4c ldr r3, [pc, #304] ; (8006518 <tcp_abandon+0x15c>)
|
|
80063e6: f44f 7210 mov.w r2, #576 ; 0x240
|
|
80063ea: 494e ldr r1, [pc, #312] ; (8006524 <tcp_abandon+0x168>)
|
|
80063ec: 484c ldr r0, [pc, #304] ; (8006520 <tcp_abandon+0x164>)
|
|
80063ee: f00a f883 bl 80104f8 <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) {
|
|
80063f2: 687b ldr r3, [r7, #4]
|
|
80063f4: 7d1b ldrb r3, [r3, #20]
|
|
80063f6: 2b0a cmp r3, #10
|
|
80063f8: d107 bne.n 800640a <tcp_abandon+0x4e>
|
|
tcp_pcb_remove(&tcp_tw_pcbs, pcb);
|
|
80063fa: 6879 ldr r1, [r7, #4]
|
|
80063fc: 484a ldr r0, [pc, #296] ; (8006528 <tcp_abandon+0x16c>)
|
|
80063fe: f000 ffc3 bl 8007388 <tcp_pcb_remove>
|
|
tcp_free(pcb);
|
|
8006402: 6878 ldr r0, [r7, #4]
|
|
8006404: f7ff fdb0 bl 8005f68 <tcp_free>
|
|
8006408: e082 b.n 8006510 <tcp_abandon+0x154>
|
|
} else {
|
|
int send_rst = 0;
|
|
800640a: 2300 movs r3, #0
|
|
800640c: 627b str r3, [r7, #36] ; 0x24
|
|
u16_t local_port = 0;
|
|
800640e: 2300 movs r3, #0
|
|
8006410: 847b strh r3, [r7, #34] ; 0x22
|
|
enum tcp_state last_state;
|
|
seqno = pcb->snd_nxt;
|
|
8006412: 687b ldr r3, [r7, #4]
|
|
8006414: 6d1b ldr r3, [r3, #80] ; 0x50
|
|
8006416: 61bb str r3, [r7, #24]
|
|
ackno = pcb->rcv_nxt;
|
|
8006418: 687b ldr r3, [r7, #4]
|
|
800641a: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800641c: 617b str r3, [r7, #20]
|
|
#if LWIP_CALLBACK_API
|
|
errf = pcb->errf;
|
|
800641e: 687b ldr r3, [r7, #4]
|
|
8006420: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
|
|
8006424: 613b str r3, [r7, #16]
|
|
#endif /* LWIP_CALLBACK_API */
|
|
errf_arg = pcb->callback_arg;
|
|
8006426: 687b ldr r3, [r7, #4]
|
|
8006428: 691b ldr r3, [r3, #16]
|
|
800642a: 60fb str r3, [r7, #12]
|
|
if (pcb->state == CLOSED) {
|
|
800642c: 687b ldr r3, [r7, #4]
|
|
800642e: 7d1b ldrb r3, [r3, #20]
|
|
8006430: 2b00 cmp r3, #0
|
|
8006432: d126 bne.n 8006482 <tcp_abandon+0xc6>
|
|
if (pcb->local_port != 0) {
|
|
8006434: 687b ldr r3, [r7, #4]
|
|
8006436: 8adb ldrh r3, [r3, #22]
|
|
8006438: 2b00 cmp r3, #0
|
|
800643a: d02e beq.n 800649a <tcp_abandon+0xde>
|
|
/* bound, not yet opened */
|
|
TCP_RMV(&tcp_bound_pcbs, pcb);
|
|
800643c: 4b3b ldr r3, [pc, #236] ; (800652c <tcp_abandon+0x170>)
|
|
800643e: 681b ldr r3, [r3, #0]
|
|
8006440: 687a ldr r2, [r7, #4]
|
|
8006442: 429a cmp r2, r3
|
|
8006444: d105 bne.n 8006452 <tcp_abandon+0x96>
|
|
8006446: 4b39 ldr r3, [pc, #228] ; (800652c <tcp_abandon+0x170>)
|
|
8006448: 681b ldr r3, [r3, #0]
|
|
800644a: 68db ldr r3, [r3, #12]
|
|
800644c: 4a37 ldr r2, [pc, #220] ; (800652c <tcp_abandon+0x170>)
|
|
800644e: 6013 str r3, [r2, #0]
|
|
8006450: e013 b.n 800647a <tcp_abandon+0xbe>
|
|
8006452: 4b36 ldr r3, [pc, #216] ; (800652c <tcp_abandon+0x170>)
|
|
8006454: 681b ldr r3, [r3, #0]
|
|
8006456: 61fb str r3, [r7, #28]
|
|
8006458: e00c b.n 8006474 <tcp_abandon+0xb8>
|
|
800645a: 69fb ldr r3, [r7, #28]
|
|
800645c: 68db ldr r3, [r3, #12]
|
|
800645e: 687a ldr r2, [r7, #4]
|
|
8006460: 429a cmp r2, r3
|
|
8006462: d104 bne.n 800646e <tcp_abandon+0xb2>
|
|
8006464: 687b ldr r3, [r7, #4]
|
|
8006466: 68da ldr r2, [r3, #12]
|
|
8006468: 69fb ldr r3, [r7, #28]
|
|
800646a: 60da str r2, [r3, #12]
|
|
800646c: e005 b.n 800647a <tcp_abandon+0xbe>
|
|
800646e: 69fb ldr r3, [r7, #28]
|
|
8006470: 68db ldr r3, [r3, #12]
|
|
8006472: 61fb str r3, [r7, #28]
|
|
8006474: 69fb ldr r3, [r7, #28]
|
|
8006476: 2b00 cmp r3, #0
|
|
8006478: d1ef bne.n 800645a <tcp_abandon+0x9e>
|
|
800647a: 687b ldr r3, [r7, #4]
|
|
800647c: 2200 movs r2, #0
|
|
800647e: 60da str r2, [r3, #12]
|
|
8006480: e00b b.n 800649a <tcp_abandon+0xde>
|
|
}
|
|
} else {
|
|
send_rst = reset;
|
|
8006482: 683b ldr r3, [r7, #0]
|
|
8006484: 627b str r3, [r7, #36] ; 0x24
|
|
local_port = pcb->local_port;
|
|
8006486: 687b ldr r3, [r7, #4]
|
|
8006488: 8adb ldrh r3, [r3, #22]
|
|
800648a: 847b strh r3, [r7, #34] ; 0x22
|
|
TCP_PCB_REMOVE_ACTIVE(pcb);
|
|
800648c: 6879 ldr r1, [r7, #4]
|
|
800648e: 4828 ldr r0, [pc, #160] ; (8006530 <tcp_abandon+0x174>)
|
|
8006490: f000 ff7a bl 8007388 <tcp_pcb_remove>
|
|
8006494: 4b27 ldr r3, [pc, #156] ; (8006534 <tcp_abandon+0x178>)
|
|
8006496: 2201 movs r2, #1
|
|
8006498: 701a strb r2, [r3, #0]
|
|
}
|
|
if (pcb->unacked != NULL) {
|
|
800649a: 687b ldr r3, [r7, #4]
|
|
800649c: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
800649e: 2b00 cmp r3, #0
|
|
80064a0: d004 beq.n 80064ac <tcp_abandon+0xf0>
|
|
tcp_segs_free(pcb->unacked);
|
|
80064a2: 687b ldr r3, [r7, #4]
|
|
80064a4: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
80064a6: 4618 mov r0, r3
|
|
80064a8: f000 fd1c bl 8006ee4 <tcp_segs_free>
|
|
}
|
|
if (pcb->unsent != NULL) {
|
|
80064ac: 687b ldr r3, [r7, #4]
|
|
80064ae: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
80064b0: 2b00 cmp r3, #0
|
|
80064b2: d004 beq.n 80064be <tcp_abandon+0x102>
|
|
tcp_segs_free(pcb->unsent);
|
|
80064b4: 687b ldr r3, [r7, #4]
|
|
80064b6: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
80064b8: 4618 mov r0, r3
|
|
80064ba: f000 fd13 bl 8006ee4 <tcp_segs_free>
|
|
}
|
|
#if TCP_QUEUE_OOSEQ
|
|
if (pcb->ooseq != NULL) {
|
|
80064be: 687b ldr r3, [r7, #4]
|
|
80064c0: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
80064c2: 2b00 cmp r3, #0
|
|
80064c4: d004 beq.n 80064d0 <tcp_abandon+0x114>
|
|
tcp_segs_free(pcb->ooseq);
|
|
80064c6: 687b ldr r3, [r7, #4]
|
|
80064c8: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
80064ca: 4618 mov r0, r3
|
|
80064cc: f000 fd0a bl 8006ee4 <tcp_segs_free>
|
|
}
|
|
#endif /* TCP_QUEUE_OOSEQ */
|
|
tcp_backlog_accepted(pcb);
|
|
if (send_rst) {
|
|
80064d0: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
80064d2: 2b00 cmp r3, #0
|
|
80064d4: d00e beq.n 80064f4 <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);
|
|
80064d6: 6879 ldr r1, [r7, #4]
|
|
80064d8: 687b ldr r3, [r7, #4]
|
|
80064da: 3304 adds r3, #4
|
|
80064dc: 687a ldr r2, [r7, #4]
|
|
80064de: 8b12 ldrh r2, [r2, #24]
|
|
80064e0: 9202 str r2, [sp, #8]
|
|
80064e2: 8c7a ldrh r2, [r7, #34] ; 0x22
|
|
80064e4: 9201 str r2, [sp, #4]
|
|
80064e6: 9300 str r3, [sp, #0]
|
|
80064e8: 460b mov r3, r1
|
|
80064ea: 697a ldr r2, [r7, #20]
|
|
80064ec: 69b9 ldr r1, [r7, #24]
|
|
80064ee: 6878 ldr r0, [r7, #4]
|
|
80064f0: f004 fcc2 bl 800ae78 <tcp_rst>
|
|
}
|
|
last_state = pcb->state;
|
|
80064f4: 687b ldr r3, [r7, #4]
|
|
80064f6: 7d1b ldrb r3, [r3, #20]
|
|
80064f8: 72fb strb r3, [r7, #11]
|
|
tcp_free(pcb);
|
|
80064fa: 6878 ldr r0, [r7, #4]
|
|
80064fc: f7ff fd34 bl 8005f68 <tcp_free>
|
|
TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT);
|
|
8006500: 693b ldr r3, [r7, #16]
|
|
8006502: 2b00 cmp r3, #0
|
|
8006504: d004 beq.n 8006510 <tcp_abandon+0x154>
|
|
8006506: 693b ldr r3, [r7, #16]
|
|
8006508: f06f 010c mvn.w r1, #12
|
|
800650c: 68f8 ldr r0, [r7, #12]
|
|
800650e: 4798 blx r3
|
|
}
|
|
}
|
|
8006510: 3728 adds r7, #40 ; 0x28
|
|
8006512: 46bd mov sp, r7
|
|
8006514: bd80 pop {r7, pc}
|
|
8006516: bf00 nop
|
|
8006518: 08015b1c .word 0x08015b1c
|
|
800651c: 08015c60 .word 0x08015c60
|
|
8006520: 08015b60 .word 0x08015b60
|
|
8006524: 08015c7c .word 0x08015c7c
|
|
8006528: 20008c10 .word 0x20008c10
|
|
800652c: 20008c04 .word 0x20008c04
|
|
8006530: 20008c0c .word 0x20008c0c
|
|
8006534: 20008c14 .word 0x20008c14
|
|
|
|
08006538 <tcp_abort>:
|
|
*
|
|
* @param pcb the tcp pcb to abort
|
|
*/
|
|
void
|
|
tcp_abort(struct tcp_pcb *pcb)
|
|
{
|
|
8006538: b580 push {r7, lr}
|
|
800653a: b082 sub sp, #8
|
|
800653c: af00 add r7, sp, #0
|
|
800653e: 6078 str r0, [r7, #4]
|
|
tcp_abandon(pcb, 1);
|
|
8006540: 2101 movs r1, #1
|
|
8006542: 6878 ldr r0, [r7, #4]
|
|
8006544: f7ff ff3a bl 80063bc <tcp_abandon>
|
|
}
|
|
8006548: bf00 nop
|
|
800654a: 3708 adds r7, #8
|
|
800654c: 46bd mov sp, r7
|
|
800654e: bd80 pop {r7, pc}
|
|
|
|
08006550 <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)
|
|
{
|
|
8006550: b580 push {r7, lr}
|
|
8006552: b084 sub sp, #16
|
|
8006554: af00 add r7, sp, #0
|
|
8006556: 6078 str r0, [r7, #4]
|
|
u32_t new_right_edge;
|
|
|
|
LWIP_ASSERT("tcp_update_rcv_ann_wnd: invalid pcb", pcb != NULL);
|
|
8006558: 687b ldr r3, [r7, #4]
|
|
800655a: 2b00 cmp r3, #0
|
|
800655c: d106 bne.n 800656c <tcp_update_rcv_ann_wnd+0x1c>
|
|
800655e: 4b25 ldr r3, [pc, #148] ; (80065f4 <tcp_update_rcv_ann_wnd+0xa4>)
|
|
8006560: f240 32a6 movw r2, #934 ; 0x3a6
|
|
8006564: 4924 ldr r1, [pc, #144] ; (80065f8 <tcp_update_rcv_ann_wnd+0xa8>)
|
|
8006566: 4825 ldr r0, [pc, #148] ; (80065fc <tcp_update_rcv_ann_wnd+0xac>)
|
|
8006568: f009 ffc6 bl 80104f8 <printf>
|
|
new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd;
|
|
800656c: 687b ldr r3, [r7, #4]
|
|
800656e: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
8006570: 687a ldr r2, [r7, #4]
|
|
8006572: 8d12 ldrh r2, [r2, #40] ; 0x28
|
|
8006574: 4413 add r3, r2
|
|
8006576: 60fb str r3, [r7, #12]
|
|
|
|
if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) {
|
|
8006578: 687b ldr r3, [r7, #4]
|
|
800657a: 6adb ldr r3, [r3, #44] ; 0x2c
|
|
800657c: 687a ldr r2, [r7, #4]
|
|
800657e: 8e52 ldrh r2, [r2, #50] ; 0x32
|
|
8006580: f5b2 6f86 cmp.w r2, #1072 ; 0x430
|
|
8006584: bf28 it cs
|
|
8006586: f44f 6286 movcs.w r2, #1072 ; 0x430
|
|
800658a: b292 uxth r2, r2
|
|
800658c: 4413 add r3, r2
|
|
800658e: 68fa ldr r2, [r7, #12]
|
|
8006590: 1ad3 subs r3, r2, r3
|
|
8006592: 2b00 cmp r3, #0
|
|
8006594: db08 blt.n 80065a8 <tcp_update_rcv_ann_wnd+0x58>
|
|
/* we can advertise more window */
|
|
pcb->rcv_ann_wnd = pcb->rcv_wnd;
|
|
8006596: 687b ldr r3, [r7, #4]
|
|
8006598: 8d1a ldrh r2, [r3, #40] ; 0x28
|
|
800659a: 687b ldr r3, [r7, #4]
|
|
800659c: 855a strh r2, [r3, #42] ; 0x2a
|
|
return new_right_edge - pcb->rcv_ann_right_edge;
|
|
800659e: 687b ldr r3, [r7, #4]
|
|
80065a0: 6adb ldr r3, [r3, #44] ; 0x2c
|
|
80065a2: 68fa ldr r2, [r7, #12]
|
|
80065a4: 1ad3 subs r3, r2, r3
|
|
80065a6: e020 b.n 80065ea <tcp_update_rcv_ann_wnd+0x9a>
|
|
} else {
|
|
if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) {
|
|
80065a8: 687b ldr r3, [r7, #4]
|
|
80065aa: 6a5a ldr r2, [r3, #36] ; 0x24
|
|
80065ac: 687b ldr r3, [r7, #4]
|
|
80065ae: 6adb ldr r3, [r3, #44] ; 0x2c
|
|
80065b0: 1ad3 subs r3, r2, r3
|
|
80065b2: 2b00 cmp r3, #0
|
|
80065b4: dd03 ble.n 80065be <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;
|
|
80065b6: 687b ldr r3, [r7, #4]
|
|
80065b8: 2200 movs r2, #0
|
|
80065ba: 855a strh r2, [r3, #42] ; 0x2a
|
|
80065bc: e014 b.n 80065e8 <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;
|
|
80065be: 687b ldr r3, [r7, #4]
|
|
80065c0: 6ada ldr r2, [r3, #44] ; 0x2c
|
|
80065c2: 687b ldr r3, [r7, #4]
|
|
80065c4: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
80065c6: 1ad3 subs r3, r2, r3
|
|
80065c8: 60bb str r3, [r7, #8]
|
|
#if !LWIP_WND_SCALE
|
|
LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff);
|
|
80065ca: 68bb ldr r3, [r7, #8]
|
|
80065cc: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
|
|
80065d0: d306 bcc.n 80065e0 <tcp_update_rcv_ann_wnd+0x90>
|
|
80065d2: 4b08 ldr r3, [pc, #32] ; (80065f4 <tcp_update_rcv_ann_wnd+0xa4>)
|
|
80065d4: f240 32b6 movw r2, #950 ; 0x3b6
|
|
80065d8: 4909 ldr r1, [pc, #36] ; (8006600 <tcp_update_rcv_ann_wnd+0xb0>)
|
|
80065da: 4808 ldr r0, [pc, #32] ; (80065fc <tcp_update_rcv_ann_wnd+0xac>)
|
|
80065dc: f009 ff8c bl 80104f8 <printf>
|
|
#endif
|
|
pcb->rcv_ann_wnd = (tcpwnd_size_t)new_rcv_ann_wnd;
|
|
80065e0: 68bb ldr r3, [r7, #8]
|
|
80065e2: b29a uxth r2, r3
|
|
80065e4: 687b ldr r3, [r7, #4]
|
|
80065e6: 855a strh r2, [r3, #42] ; 0x2a
|
|
}
|
|
return 0;
|
|
80065e8: 2300 movs r3, #0
|
|
}
|
|
}
|
|
80065ea: 4618 mov r0, r3
|
|
80065ec: 3710 adds r7, #16
|
|
80065ee: 46bd mov sp, r7
|
|
80065f0: bd80 pop {r7, pc}
|
|
80065f2: bf00 nop
|
|
80065f4: 08015b1c .word 0x08015b1c
|
|
80065f8: 08015d78 .word 0x08015d78
|
|
80065fc: 08015b60 .word 0x08015b60
|
|
8006600: 08015d9c .word 0x08015d9c
|
|
|
|
08006604 <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)
|
|
{
|
|
8006604: b580 push {r7, lr}
|
|
8006606: b084 sub sp, #16
|
|
8006608: af00 add r7, sp, #0
|
|
800660a: 6078 str r0, [r7, #4]
|
|
800660c: 460b mov r3, r1
|
|
800660e: 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);
|
|
8006610: 687b ldr r3, [r7, #4]
|
|
8006612: 2b00 cmp r3, #0
|
|
8006614: d107 bne.n 8006626 <tcp_recved+0x22>
|
|
8006616: 4b1f ldr r3, [pc, #124] ; (8006694 <tcp_recved+0x90>)
|
|
8006618: f240 32cf movw r2, #975 ; 0x3cf
|
|
800661c: 491e ldr r1, [pc, #120] ; (8006698 <tcp_recved+0x94>)
|
|
800661e: 481f ldr r0, [pc, #124] ; (800669c <tcp_recved+0x98>)
|
|
8006620: f009 ff6a bl 80104f8 <printf>
|
|
8006624: e032 b.n 800668c <tcp_recved+0x88>
|
|
|
|
/* pcb->state LISTEN not allowed here */
|
|
LWIP_ASSERT("don't call tcp_recved for listen-pcbs",
|
|
8006626: 687b ldr r3, [r7, #4]
|
|
8006628: 7d1b ldrb r3, [r3, #20]
|
|
800662a: 2b01 cmp r3, #1
|
|
800662c: d106 bne.n 800663c <tcp_recved+0x38>
|
|
800662e: 4b19 ldr r3, [pc, #100] ; (8006694 <tcp_recved+0x90>)
|
|
8006630: f240 32d2 movw r2, #978 ; 0x3d2
|
|
8006634: 491a ldr r1, [pc, #104] ; (80066a0 <tcp_recved+0x9c>)
|
|
8006636: 4819 ldr r0, [pc, #100] ; (800669c <tcp_recved+0x98>)
|
|
8006638: f009 ff5e bl 80104f8 <printf>
|
|
pcb->state != LISTEN);
|
|
|
|
rcv_wnd = (tcpwnd_size_t)(pcb->rcv_wnd + len);
|
|
800663c: 687b ldr r3, [r7, #4]
|
|
800663e: 8d1a ldrh r2, [r3, #40] ; 0x28
|
|
8006640: 887b ldrh r3, [r7, #2]
|
|
8006642: 4413 add r3, r2
|
|
8006644: 81fb strh r3, [r7, #14]
|
|
if ((rcv_wnd > TCP_WND_MAX(pcb)) || (rcv_wnd < pcb->rcv_wnd)) {
|
|
8006646: 89fb ldrh r3, [r7, #14]
|
|
8006648: f5b3 6f06 cmp.w r3, #2144 ; 0x860
|
|
800664c: d804 bhi.n 8006658 <tcp_recved+0x54>
|
|
800664e: 687b ldr r3, [r7, #4]
|
|
8006650: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
8006652: 89fa ldrh r2, [r7, #14]
|
|
8006654: 429a cmp r2, r3
|
|
8006656: d204 bcs.n 8006662 <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);
|
|
8006658: 687b ldr r3, [r7, #4]
|
|
800665a: f44f 6206 mov.w r2, #2144 ; 0x860
|
|
800665e: 851a strh r2, [r3, #40] ; 0x28
|
|
8006660: e002 b.n 8006668 <tcp_recved+0x64>
|
|
} else {
|
|
pcb->rcv_wnd = rcv_wnd;
|
|
8006662: 687b ldr r3, [r7, #4]
|
|
8006664: 89fa ldrh r2, [r7, #14]
|
|
8006666: 851a strh r2, [r3, #40] ; 0x28
|
|
}
|
|
|
|
wnd_inflation = tcp_update_rcv_ann_wnd(pcb);
|
|
8006668: 6878 ldr r0, [r7, #4]
|
|
800666a: f7ff ff71 bl 8006550 <tcp_update_rcv_ann_wnd>
|
|
800666e: 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) {
|
|
8006670: 68bb ldr r3, [r7, #8]
|
|
8006672: f5b3 7f06 cmp.w r3, #536 ; 0x218
|
|
8006676: d309 bcc.n 800668c <tcp_recved+0x88>
|
|
tcp_ack_now(pcb);
|
|
8006678: 687b ldr r3, [r7, #4]
|
|
800667a: 8b5b ldrh r3, [r3, #26]
|
|
800667c: f043 0302 orr.w r3, r3, #2
|
|
8006680: b29a uxth r2, r3
|
|
8006682: 687b ldr r3, [r7, #4]
|
|
8006684: 835a strh r2, [r3, #26]
|
|
tcp_output(pcb);
|
|
8006686: 6878 ldr r0, [r7, #4]
|
|
8006688: f003 fe42 bl 800a310 <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)));
|
|
}
|
|
800668c: 3710 adds r7, #16
|
|
800668e: 46bd mov sp, r7
|
|
8006690: bd80 pop {r7, pc}
|
|
8006692: bf00 nop
|
|
8006694: 08015b1c .word 0x08015b1c
|
|
8006698: 08015db8 .word 0x08015db8
|
|
800669c: 08015b60 .word 0x08015b60
|
|
80066a0: 08015dd0 .word 0x08015dd0
|
|
|
|
080066a4 <tcp_slowtmr>:
|
|
*
|
|
* Automatically called from tcp_tmr().
|
|
*/
|
|
void
|
|
tcp_slowtmr(void)
|
|
{
|
|
80066a4: b5b0 push {r4, r5, r7, lr}
|
|
80066a6: b090 sub sp, #64 ; 0x40
|
|
80066a8: 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;
|
|
80066aa: 2300 movs r3, #0
|
|
80066ac: f887 3025 strb.w r3, [r7, #37] ; 0x25
|
|
|
|
++tcp_ticks;
|
|
80066b0: 4b94 ldr r3, [pc, #592] ; (8006904 <tcp_slowtmr+0x260>)
|
|
80066b2: 681b ldr r3, [r3, #0]
|
|
80066b4: 3301 adds r3, #1
|
|
80066b6: 4a93 ldr r2, [pc, #588] ; (8006904 <tcp_slowtmr+0x260>)
|
|
80066b8: 6013 str r3, [r2, #0]
|
|
++tcp_timer_ctr;
|
|
80066ba: 4b93 ldr r3, [pc, #588] ; (8006908 <tcp_slowtmr+0x264>)
|
|
80066bc: 781b ldrb r3, [r3, #0]
|
|
80066be: 3301 adds r3, #1
|
|
80066c0: b2da uxtb r2, r3
|
|
80066c2: 4b91 ldr r3, [pc, #580] ; (8006908 <tcp_slowtmr+0x264>)
|
|
80066c4: 701a strb r2, [r3, #0]
|
|
|
|
tcp_slowtmr_start:
|
|
/* Steps through all of the active PCBs. */
|
|
prev = NULL;
|
|
80066c6: 2300 movs r3, #0
|
|
80066c8: 62bb str r3, [r7, #40] ; 0x28
|
|
pcb = tcp_active_pcbs;
|
|
80066ca: 4b90 ldr r3, [pc, #576] ; (800690c <tcp_slowtmr+0x268>)
|
|
80066cc: 681b ldr r3, [r3, #0]
|
|
80066ce: 62fb str r3, [r7, #44] ; 0x2c
|
|
if (pcb == NULL) {
|
|
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n"));
|
|
}
|
|
while (pcb != NULL) {
|
|
80066d0: e29f b.n 8006c12 <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);
|
|
80066d2: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80066d4: 7d1b ldrb r3, [r3, #20]
|
|
80066d6: 2b00 cmp r3, #0
|
|
80066d8: d106 bne.n 80066e8 <tcp_slowtmr+0x44>
|
|
80066da: 4b8d ldr r3, [pc, #564] ; (8006910 <tcp_slowtmr+0x26c>)
|
|
80066dc: f240 42be movw r2, #1214 ; 0x4be
|
|
80066e0: 498c ldr r1, [pc, #560] ; (8006914 <tcp_slowtmr+0x270>)
|
|
80066e2: 488d ldr r0, [pc, #564] ; (8006918 <tcp_slowtmr+0x274>)
|
|
80066e4: f009 ff08 bl 80104f8 <printf>
|
|
LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN);
|
|
80066e8: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80066ea: 7d1b ldrb r3, [r3, #20]
|
|
80066ec: 2b01 cmp r3, #1
|
|
80066ee: d106 bne.n 80066fe <tcp_slowtmr+0x5a>
|
|
80066f0: 4b87 ldr r3, [pc, #540] ; (8006910 <tcp_slowtmr+0x26c>)
|
|
80066f2: f240 42bf movw r2, #1215 ; 0x4bf
|
|
80066f6: 4989 ldr r1, [pc, #548] ; (800691c <tcp_slowtmr+0x278>)
|
|
80066f8: 4887 ldr r0, [pc, #540] ; (8006918 <tcp_slowtmr+0x274>)
|
|
80066fa: f009 fefd bl 80104f8 <printf>
|
|
LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT);
|
|
80066fe: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006700: 7d1b ldrb r3, [r3, #20]
|
|
8006702: 2b0a cmp r3, #10
|
|
8006704: d106 bne.n 8006714 <tcp_slowtmr+0x70>
|
|
8006706: 4b82 ldr r3, [pc, #520] ; (8006910 <tcp_slowtmr+0x26c>)
|
|
8006708: f44f 6298 mov.w r2, #1216 ; 0x4c0
|
|
800670c: 4984 ldr r1, [pc, #528] ; (8006920 <tcp_slowtmr+0x27c>)
|
|
800670e: 4882 ldr r0, [pc, #520] ; (8006918 <tcp_slowtmr+0x274>)
|
|
8006710: f009 fef2 bl 80104f8 <printf>
|
|
if (pcb->last_timer == tcp_timer_ctr) {
|
|
8006714: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006716: 7f9a ldrb r2, [r3, #30]
|
|
8006718: 4b7b ldr r3, [pc, #492] ; (8006908 <tcp_slowtmr+0x264>)
|
|
800671a: 781b ldrb r3, [r3, #0]
|
|
800671c: 429a cmp r2, r3
|
|
800671e: d105 bne.n 800672c <tcp_slowtmr+0x88>
|
|
/* skip this pcb, we have already processed it */
|
|
prev = pcb;
|
|
8006720: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006722: 62bb str r3, [r7, #40] ; 0x28
|
|
pcb = pcb->next;
|
|
8006724: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006726: 68db ldr r3, [r3, #12]
|
|
8006728: 62fb str r3, [r7, #44] ; 0x2c
|
|
continue;
|
|
800672a: e272 b.n 8006c12 <tcp_slowtmr+0x56e>
|
|
}
|
|
pcb->last_timer = tcp_timer_ctr;
|
|
800672c: 4b76 ldr r3, [pc, #472] ; (8006908 <tcp_slowtmr+0x264>)
|
|
800672e: 781a ldrb r2, [r3, #0]
|
|
8006730: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006732: 779a strb r2, [r3, #30]
|
|
|
|
pcb_remove = 0;
|
|
8006734: 2300 movs r3, #0
|
|
8006736: f887 3027 strb.w r3, [r7, #39] ; 0x27
|
|
pcb_reset = 0;
|
|
800673a: 2300 movs r3, #0
|
|
800673c: f887 3026 strb.w r3, [r7, #38] ; 0x26
|
|
|
|
if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) {
|
|
8006740: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006742: 7d1b ldrb r3, [r3, #20]
|
|
8006744: 2b02 cmp r3, #2
|
|
8006746: d10a bne.n 800675e <tcp_slowtmr+0xba>
|
|
8006748: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800674a: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
|
|
800674e: 2b05 cmp r3, #5
|
|
8006750: d905 bls.n 800675e <tcp_slowtmr+0xba>
|
|
++pcb_remove;
|
|
8006752: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
8006756: 3301 adds r3, #1
|
|
8006758: f887 3027 strb.w r3, [r7, #39] ; 0x27
|
|
800675c: e11e b.n 800699c <tcp_slowtmr+0x2f8>
|
|
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n"));
|
|
} else if (pcb->nrtx >= TCP_MAXRTX) {
|
|
800675e: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006760: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
|
|
8006764: 2b0b cmp r3, #11
|
|
8006766: d905 bls.n 8006774 <tcp_slowtmr+0xd0>
|
|
++pcb_remove;
|
|
8006768: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800676c: 3301 adds r3, #1
|
|
800676e: f887 3027 strb.w r3, [r7, #39] ; 0x27
|
|
8006772: e113 b.n 800699c <tcp_slowtmr+0x2f8>
|
|
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n"));
|
|
} else {
|
|
if (pcb->persist_backoff > 0) {
|
|
8006774: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006776: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
|
|
800677a: 2b00 cmp r3, #0
|
|
800677c: d075 beq.n 800686a <tcp_slowtmr+0x1c6>
|
|
LWIP_ASSERT("tcp_slowtimr: persist ticking with in-flight data", pcb->unacked == NULL);
|
|
800677e: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006780: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
8006782: 2b00 cmp r3, #0
|
|
8006784: d006 beq.n 8006794 <tcp_slowtmr+0xf0>
|
|
8006786: 4b62 ldr r3, [pc, #392] ; (8006910 <tcp_slowtmr+0x26c>)
|
|
8006788: f240 42d4 movw r2, #1236 ; 0x4d4
|
|
800678c: 4965 ldr r1, [pc, #404] ; (8006924 <tcp_slowtmr+0x280>)
|
|
800678e: 4862 ldr r0, [pc, #392] ; (8006918 <tcp_slowtmr+0x274>)
|
|
8006790: f009 feb2 bl 80104f8 <printf>
|
|
LWIP_ASSERT("tcp_slowtimr: persist ticking with empty send buffer", pcb->unsent != NULL);
|
|
8006794: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006796: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
8006798: 2b00 cmp r3, #0
|
|
800679a: d106 bne.n 80067aa <tcp_slowtmr+0x106>
|
|
800679c: 4b5c ldr r3, [pc, #368] ; (8006910 <tcp_slowtmr+0x26c>)
|
|
800679e: f240 42d5 movw r2, #1237 ; 0x4d5
|
|
80067a2: 4961 ldr r1, [pc, #388] ; (8006928 <tcp_slowtmr+0x284>)
|
|
80067a4: 485c ldr r0, [pc, #368] ; (8006918 <tcp_slowtmr+0x274>)
|
|
80067a6: f009 fea7 bl 80104f8 <printf>
|
|
if (pcb->persist_probe >= TCP_MAXRTX) {
|
|
80067aa: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80067ac: f893 309a ldrb.w r3, [r3, #154] ; 0x9a
|
|
80067b0: 2b0b cmp r3, #11
|
|
80067b2: d905 bls.n 80067c0 <tcp_slowtmr+0x11c>
|
|
++pcb_remove; /* max probes reached */
|
|
80067b4: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
80067b8: 3301 adds r3, #1
|
|
80067ba: f887 3027 strb.w r3, [r7, #39] ; 0x27
|
|
80067be: e0ed b.n 800699c <tcp_slowtmr+0x2f8>
|
|
} else {
|
|
u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff - 1];
|
|
80067c0: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80067c2: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
|
|
80067c6: 3b01 subs r3, #1
|
|
80067c8: 4a58 ldr r2, [pc, #352] ; (800692c <tcp_slowtmr+0x288>)
|
|
80067ca: 5cd3 ldrb r3, [r2, r3]
|
|
80067cc: 747b strb r3, [r7, #17]
|
|
if (pcb->persist_cnt < backoff_cnt) {
|
|
80067ce: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80067d0: f893 3098 ldrb.w r3, [r3, #152] ; 0x98
|
|
80067d4: 7c7a ldrb r2, [r7, #17]
|
|
80067d6: 429a cmp r2, r3
|
|
80067d8: d907 bls.n 80067ea <tcp_slowtmr+0x146>
|
|
pcb->persist_cnt++;
|
|
80067da: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80067dc: f893 3098 ldrb.w r3, [r3, #152] ; 0x98
|
|
80067e0: 3301 adds r3, #1
|
|
80067e2: b2da uxtb r2, r3
|
|
80067e4: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80067e6: f883 2098 strb.w r2, [r3, #152] ; 0x98
|
|
}
|
|
if (pcb->persist_cnt >= backoff_cnt) {
|
|
80067ea: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80067ec: f893 3098 ldrb.w r3, [r3, #152] ; 0x98
|
|
80067f0: 7c7a ldrb r2, [r7, #17]
|
|
80067f2: 429a cmp r2, r3
|
|
80067f4: f200 80d2 bhi.w 800699c <tcp_slowtmr+0x2f8>
|
|
int next_slot = 1; /* increment timer to next slot */
|
|
80067f8: 2301 movs r3, #1
|
|
80067fa: 623b str r3, [r7, #32]
|
|
/* If snd_wnd is zero, send 1 byte probes */
|
|
if (pcb->snd_wnd == 0) {
|
|
80067fc: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80067fe: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
|
|
8006802: 2b00 cmp r3, #0
|
|
8006804: d108 bne.n 8006818 <tcp_slowtmr+0x174>
|
|
if (tcp_zero_window_probe(pcb) != ERR_OK) {
|
|
8006806: 6af8 ldr r0, [r7, #44] ; 0x2c
|
|
8006808: f004 fc2a bl 800b060 <tcp_zero_window_probe>
|
|
800680c: 4603 mov r3, r0
|
|
800680e: 2b00 cmp r3, #0
|
|
8006810: d014 beq.n 800683c <tcp_slowtmr+0x198>
|
|
next_slot = 0; /* try probe again with current slot */
|
|
8006812: 2300 movs r3, #0
|
|
8006814: 623b str r3, [r7, #32]
|
|
8006816: e011 b.n 800683c <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) {
|
|
8006818: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800681a: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
|
|
800681e: 4619 mov r1, r3
|
|
8006820: 6af8 ldr r0, [r7, #44] ; 0x2c
|
|
8006822: f003 faef bl 8009e04 <tcp_split_unsent_seg>
|
|
8006826: 4603 mov r3, r0
|
|
8006828: 2b00 cmp r3, #0
|
|
800682a: d107 bne.n 800683c <tcp_slowtmr+0x198>
|
|
if (tcp_output(pcb) == ERR_OK) {
|
|
800682c: 6af8 ldr r0, [r7, #44] ; 0x2c
|
|
800682e: f003 fd6f bl 800a310 <tcp_output>
|
|
8006832: 4603 mov r3, r0
|
|
8006834: 2b00 cmp r3, #0
|
|
8006836: d101 bne.n 800683c <tcp_slowtmr+0x198>
|
|
/* sending will cancel persist timer, else retry with current slot */
|
|
next_slot = 0;
|
|
8006838: 2300 movs r3, #0
|
|
800683a: 623b str r3, [r7, #32]
|
|
}
|
|
}
|
|
}
|
|
if (next_slot) {
|
|
800683c: 6a3b ldr r3, [r7, #32]
|
|
800683e: 2b00 cmp r3, #0
|
|
8006840: f000 80ac beq.w 800699c <tcp_slowtmr+0x2f8>
|
|
pcb->persist_cnt = 0;
|
|
8006844: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006846: 2200 movs r2, #0
|
|
8006848: f883 2098 strb.w r2, [r3, #152] ; 0x98
|
|
if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) {
|
|
800684c: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800684e: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
|
|
8006852: 2b06 cmp r3, #6
|
|
8006854: f200 80a2 bhi.w 800699c <tcp_slowtmr+0x2f8>
|
|
pcb->persist_backoff++;
|
|
8006858: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800685a: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
|
|
800685e: 3301 adds r3, #1
|
|
8006860: b2da uxtb r2, r3
|
|
8006862: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006864: f883 2099 strb.w r2, [r3, #153] ; 0x99
|
|
8006868: e098 b.n 800699c <tcp_slowtmr+0x2f8>
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
/* Increase the retransmission timer if it is running */
|
|
if ((pcb->rtime >= 0) && (pcb->rtime < 0x7FFF)) {
|
|
800686a: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800686c: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
|
|
8006870: 2b00 cmp r3, #0
|
|
8006872: db0f blt.n 8006894 <tcp_slowtmr+0x1f0>
|
|
8006874: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006876: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
|
|
800687a: f647 72ff movw r2, #32767 ; 0x7fff
|
|
800687e: 4293 cmp r3, r2
|
|
8006880: d008 beq.n 8006894 <tcp_slowtmr+0x1f0>
|
|
++pcb->rtime;
|
|
8006882: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006884: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
|
|
8006888: b29b uxth r3, r3
|
|
800688a: 3301 adds r3, #1
|
|
800688c: b29b uxth r3, r3
|
|
800688e: b21a sxth r2, r3
|
|
8006890: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006892: 861a strh r2, [r3, #48] ; 0x30
|
|
}
|
|
|
|
if (pcb->rtime >= pcb->rto) {
|
|
8006894: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006896: f9b3 2030 ldrsh.w r2, [r3, #48] ; 0x30
|
|
800689a: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800689c: f9b3 3040 ldrsh.w r3, [r3, #64] ; 0x40
|
|
80068a0: 429a cmp r2, r3
|
|
80068a2: db7b blt.n 800699c <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))) {
|
|
80068a4: 6af8 ldr r0, [r7, #44] ; 0x2c
|
|
80068a6: f004 f825 bl 800a8f4 <tcp_rexmit_rto_prepare>
|
|
80068aa: 4603 mov r3, r0
|
|
80068ac: 2b00 cmp r3, #0
|
|
80068ae: d007 beq.n 80068c0 <tcp_slowtmr+0x21c>
|
|
80068b0: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80068b2: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
80068b4: 2b00 cmp r3, #0
|
|
80068b6: d171 bne.n 800699c <tcp_slowtmr+0x2f8>
|
|
80068b8: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80068ba: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
80068bc: 2b00 cmp r3, #0
|
|
80068be: d06d beq.n 800699c <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) {
|
|
80068c0: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80068c2: 7d1b ldrb r3, [r3, #20]
|
|
80068c4: 2b02 cmp r3, #2
|
|
80068c6: d03a beq.n 800693e <tcp_slowtmr+0x29a>
|
|
u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff) - 1);
|
|
80068c8: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80068ca: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
|
|
80068ce: 2b0c cmp r3, #12
|
|
80068d0: bf28 it cs
|
|
80068d2: 230c movcs r3, #12
|
|
80068d4: 76fb strb r3, [r7, #27]
|
|
int calc_rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx];
|
|
80068d6: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80068d8: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
|
|
80068dc: 10db asrs r3, r3, #3
|
|
80068de: b21b sxth r3, r3
|
|
80068e0: 461a mov r2, r3
|
|
80068e2: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80068e4: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
|
|
80068e8: 4413 add r3, r2
|
|
80068ea: 7efa ldrb r2, [r7, #27]
|
|
80068ec: 4910 ldr r1, [pc, #64] ; (8006930 <tcp_slowtmr+0x28c>)
|
|
80068ee: 5c8a ldrb r2, [r1, r2]
|
|
80068f0: 4093 lsls r3, r2
|
|
80068f2: 617b str r3, [r7, #20]
|
|
pcb->rto = (s16_t)LWIP_MIN(calc_rto, 0x7FFF);
|
|
80068f4: 697b ldr r3, [r7, #20]
|
|
80068f6: f647 72fe movw r2, #32766 ; 0x7ffe
|
|
80068fa: 4293 cmp r3, r2
|
|
80068fc: dc1a bgt.n 8006934 <tcp_slowtmr+0x290>
|
|
80068fe: 697b ldr r3, [r7, #20]
|
|
8006900: b21a sxth r2, r3
|
|
8006902: e019 b.n 8006938 <tcp_slowtmr+0x294>
|
|
8006904: 20008c00 .word 0x20008c00
|
|
8006908: 20008c16 .word 0x20008c16
|
|
800690c: 20008c0c .word 0x20008c0c
|
|
8006910: 08015b1c .word 0x08015b1c
|
|
8006914: 08015e60 .word 0x08015e60
|
|
8006918: 08015b60 .word 0x08015b60
|
|
800691c: 08015e8c .word 0x08015e8c
|
|
8006920: 08015eb8 .word 0x08015eb8
|
|
8006924: 08015ee8 .word 0x08015ee8
|
|
8006928: 08015f1c .word 0x08015f1c
|
|
800692c: 08017efc .word 0x08017efc
|
|
8006930: 08017eec .word 0x08017eec
|
|
8006934: f647 72ff movw r2, #32767 ; 0x7fff
|
|
8006938: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800693a: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
|
|
}
|
|
|
|
/* Reset the retransmission timer. */
|
|
pcb->rtime = 0;
|
|
800693e: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006940: 2200 movs r2, #0
|
|
8006942: 861a strh r2, [r3, #48] ; 0x30
|
|
|
|
/* Reduce congestion window and ssthresh. */
|
|
eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd);
|
|
8006944: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006946: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
|
|
800694a: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800694c: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
|
|
8006950: 4293 cmp r3, r2
|
|
8006952: bf28 it cs
|
|
8006954: 4613 movcs r3, r2
|
|
8006956: 827b strh r3, [r7, #18]
|
|
pcb->ssthresh = eff_wnd >> 1;
|
|
8006958: 8a7b ldrh r3, [r7, #18]
|
|
800695a: 085b lsrs r3, r3, #1
|
|
800695c: b29a uxth r2, r3
|
|
800695e: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006960: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
|
|
if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) {
|
|
8006964: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006966: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a
|
|
800696a: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800696c: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
800696e: 005b lsls r3, r3, #1
|
|
8006970: b29b uxth r3, r3
|
|
8006972: 429a cmp r2, r3
|
|
8006974: d206 bcs.n 8006984 <tcp_slowtmr+0x2e0>
|
|
pcb->ssthresh = (tcpwnd_size_t)(pcb->mss << 1);
|
|
8006976: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006978: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
800697a: 005b lsls r3, r3, #1
|
|
800697c: b29a uxth r2, r3
|
|
800697e: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006980: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
|
|
}
|
|
pcb->cwnd = pcb->mss;
|
|
8006984: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006986: 8e5a ldrh r2, [r3, #50] ; 0x32
|
|
8006988: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800698a: 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;
|
|
800698e: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006990: 2200 movs r2, #0
|
|
8006992: 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);
|
|
8006996: 6af8 ldr r0, [r7, #44] ; 0x2c
|
|
8006998: f004 f81c bl 800a9d4 <tcp_rexmit_rto_commit>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/* Check if this PCB has stayed too long in FIN-WAIT-2 */
|
|
if (pcb->state == FIN_WAIT_2) {
|
|
800699c: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800699e: 7d1b ldrb r3, [r3, #20]
|
|
80069a0: 2b06 cmp r3, #6
|
|
80069a2: d111 bne.n 80069c8 <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) {
|
|
80069a4: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80069a6: 8b5b ldrh r3, [r3, #26]
|
|
80069a8: f003 0310 and.w r3, r3, #16
|
|
80069ac: 2b00 cmp r3, #0
|
|
80069ae: d00b beq.n 80069c8 <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) >
|
|
80069b0: 4b9d ldr r3, [pc, #628] ; (8006c28 <tcp_slowtmr+0x584>)
|
|
80069b2: 681a ldr r2, [r3, #0]
|
|
80069b4: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80069b6: 6a1b ldr r3, [r3, #32]
|
|
80069b8: 1ad3 subs r3, r2, r3
|
|
80069ba: 2b28 cmp r3, #40 ; 0x28
|
|
80069bc: d904 bls.n 80069c8 <tcp_slowtmr+0x324>
|
|
TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) {
|
|
++pcb_remove;
|
|
80069be: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
80069c2: 3301 adds r3, #1
|
|
80069c4: f887 3027 strb.w r3, [r7, #39] ; 0x27
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Check if KEEPALIVE should be sent */
|
|
if (ip_get_option(pcb, SOF_KEEPALIVE) &&
|
|
80069c8: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80069ca: 7a5b ldrb r3, [r3, #9]
|
|
80069cc: f003 0308 and.w r3, r3, #8
|
|
80069d0: 2b00 cmp r3, #0
|
|
80069d2: d04c beq.n 8006a6e <tcp_slowtmr+0x3ca>
|
|
((pcb->state == ESTABLISHED) ||
|
|
80069d4: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80069d6: 7d1b ldrb r3, [r3, #20]
|
|
if (ip_get_option(pcb, SOF_KEEPALIVE) &&
|
|
80069d8: 2b04 cmp r3, #4
|
|
80069da: d003 beq.n 80069e4 <tcp_slowtmr+0x340>
|
|
(pcb->state == CLOSE_WAIT))) {
|
|
80069dc: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80069de: 7d1b ldrb r3, [r3, #20]
|
|
((pcb->state == ESTABLISHED) ||
|
|
80069e0: 2b07 cmp r3, #7
|
|
80069e2: d144 bne.n 8006a6e <tcp_slowtmr+0x3ca>
|
|
if ((u32_t)(tcp_ticks - pcb->tmr) >
|
|
80069e4: 4b90 ldr r3, [pc, #576] ; (8006c28 <tcp_slowtmr+0x584>)
|
|
80069e6: 681a ldr r2, [r3, #0]
|
|
80069e8: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80069ea: 6a1b ldr r3, [r3, #32]
|
|
80069ec: 1ad2 subs r2, r2, r3
|
|
(pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) {
|
|
80069ee: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80069f0: f8d3 3094 ldr.w r3, [r3, #148] ; 0x94
|
|
80069f4: f503 2324 add.w r3, r3, #671744 ; 0xa4000
|
|
80069f8: f603 43b8 addw r3, r3, #3256 ; 0xcb8
|
|
80069fc: 498b ldr r1, [pc, #556] ; (8006c2c <tcp_slowtmr+0x588>)
|
|
80069fe: fba1 1303 umull r1, r3, r1, r3
|
|
8006a02: 095b lsrs r3, r3, #5
|
|
if ((u32_t)(tcp_ticks - pcb->tmr) >
|
|
8006a04: 429a cmp r2, r3
|
|
8006a06: d90a bls.n 8006a1e <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;
|
|
8006a08: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
8006a0c: 3301 adds r3, #1
|
|
8006a0e: f887 3027 strb.w r3, [r7, #39] ; 0x27
|
|
++pcb_reset;
|
|
8006a12: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
|
|
8006a16: 3301 adds r3, #1
|
|
8006a18: f887 3026 strb.w r3, [r7, #38] ; 0x26
|
|
8006a1c: e027 b.n 8006a6e <tcp_slowtmr+0x3ca>
|
|
} else if ((u32_t)(tcp_ticks - pcb->tmr) >
|
|
8006a1e: 4b82 ldr r3, [pc, #520] ; (8006c28 <tcp_slowtmr+0x584>)
|
|
8006a20: 681a ldr r2, [r3, #0]
|
|
8006a22: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006a24: 6a1b ldr r3, [r3, #32]
|
|
8006a26: 1ad2 subs r2, r2, r3
|
|
(pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb))
|
|
8006a28: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006a2a: f8d3 1094 ldr.w r1, [r3, #148] ; 0x94
|
|
8006a2e: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006a30: f893 309b ldrb.w r3, [r3, #155] ; 0x9b
|
|
8006a34: 4618 mov r0, r3
|
|
8006a36: 4b7e ldr r3, [pc, #504] ; (8006c30 <tcp_slowtmr+0x58c>)
|
|
8006a38: fb00 f303 mul.w r3, r0, r3
|
|
8006a3c: 440b add r3, r1
|
|
/ TCP_SLOW_INTERVAL) {
|
|
8006a3e: 497b ldr r1, [pc, #492] ; (8006c2c <tcp_slowtmr+0x588>)
|
|
8006a40: fba1 1303 umull r1, r3, r1, r3
|
|
8006a44: 095b lsrs r3, r3, #5
|
|
} else if ((u32_t)(tcp_ticks - pcb->tmr) >
|
|
8006a46: 429a cmp r2, r3
|
|
8006a48: d911 bls.n 8006a6e <tcp_slowtmr+0x3ca>
|
|
err = tcp_keepalive(pcb);
|
|
8006a4a: 6af8 ldr r0, [r7, #44] ; 0x2c
|
|
8006a4c: f004 fac8 bl 800afe0 <tcp_keepalive>
|
|
8006a50: 4603 mov r3, r0
|
|
8006a52: f887 3025 strb.w r3, [r7, #37] ; 0x25
|
|
if (err == ERR_OK) {
|
|
8006a56: f997 3025 ldrsb.w r3, [r7, #37] ; 0x25
|
|
8006a5a: 2b00 cmp r3, #0
|
|
8006a5c: d107 bne.n 8006a6e <tcp_slowtmr+0x3ca>
|
|
pcb->keep_cnt_sent++;
|
|
8006a5e: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006a60: f893 309b ldrb.w r3, [r3, #155] ; 0x9b
|
|
8006a64: 3301 adds r3, #1
|
|
8006a66: b2da uxtb r2, r3
|
|
8006a68: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006a6a: 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 &&
|
|
8006a6e: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006a70: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
8006a72: 2b00 cmp r3, #0
|
|
8006a74: d011 beq.n 8006a9a <tcp_slowtmr+0x3f6>
|
|
(tcp_ticks - pcb->tmr >= (u32_t)pcb->rto * TCP_OOSEQ_TIMEOUT)) {
|
|
8006a76: 4b6c ldr r3, [pc, #432] ; (8006c28 <tcp_slowtmr+0x584>)
|
|
8006a78: 681a ldr r2, [r3, #0]
|
|
8006a7a: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006a7c: 6a1b ldr r3, [r3, #32]
|
|
8006a7e: 1ad2 subs r2, r2, r3
|
|
8006a80: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006a82: f9b3 3040 ldrsh.w r3, [r3, #64] ; 0x40
|
|
8006a86: 4619 mov r1, r3
|
|
8006a88: 460b mov r3, r1
|
|
8006a8a: 005b lsls r3, r3, #1
|
|
8006a8c: 440b add r3, r1
|
|
8006a8e: 005b lsls r3, r3, #1
|
|
if (pcb->ooseq != NULL &&
|
|
8006a90: 429a cmp r2, r3
|
|
8006a92: d302 bcc.n 8006a9a <tcp_slowtmr+0x3f6>
|
|
LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: dropping OOSEQ queued data\n"));
|
|
tcp_free_ooseq(pcb);
|
|
8006a94: 6af8 ldr r0, [r7, #44] ; 0x2c
|
|
8006a96: f000 fddb bl 8007650 <tcp_free_ooseq>
|
|
}
|
|
#endif /* TCP_QUEUE_OOSEQ */
|
|
|
|
/* Check if this PCB has stayed too long in SYN-RCVD */
|
|
if (pcb->state == SYN_RCVD) {
|
|
8006a9a: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006a9c: 7d1b ldrb r3, [r3, #20]
|
|
8006a9e: 2b03 cmp r3, #3
|
|
8006aa0: d10b bne.n 8006aba <tcp_slowtmr+0x416>
|
|
if ((u32_t)(tcp_ticks - pcb->tmr) >
|
|
8006aa2: 4b61 ldr r3, [pc, #388] ; (8006c28 <tcp_slowtmr+0x584>)
|
|
8006aa4: 681a ldr r2, [r3, #0]
|
|
8006aa6: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006aa8: 6a1b ldr r3, [r3, #32]
|
|
8006aaa: 1ad3 subs r3, r2, r3
|
|
8006aac: 2b28 cmp r3, #40 ; 0x28
|
|
8006aae: d904 bls.n 8006aba <tcp_slowtmr+0x416>
|
|
TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) {
|
|
++pcb_remove;
|
|
8006ab0: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
8006ab4: 3301 adds r3, #1
|
|
8006ab6: 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) {
|
|
8006aba: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006abc: 7d1b ldrb r3, [r3, #20]
|
|
8006abe: 2b09 cmp r3, #9
|
|
8006ac0: d10b bne.n 8006ada <tcp_slowtmr+0x436>
|
|
if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) {
|
|
8006ac2: 4b59 ldr r3, [pc, #356] ; (8006c28 <tcp_slowtmr+0x584>)
|
|
8006ac4: 681a ldr r2, [r3, #0]
|
|
8006ac6: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006ac8: 6a1b ldr r3, [r3, #32]
|
|
8006aca: 1ad3 subs r3, r2, r3
|
|
8006acc: 2bf0 cmp r3, #240 ; 0xf0
|
|
8006ace: d904 bls.n 8006ada <tcp_slowtmr+0x436>
|
|
++pcb_remove;
|
|
8006ad0: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
8006ad4: 3301 adds r3, #1
|
|
8006ad6: 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) {
|
|
8006ada: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
8006ade: 2b00 cmp r3, #0
|
|
8006ae0: d060 beq.n 8006ba4 <tcp_slowtmr+0x500>
|
|
struct tcp_pcb *pcb2;
|
|
#if LWIP_CALLBACK_API
|
|
tcp_err_fn err_fn = pcb->errf;
|
|
8006ae2: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006ae4: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
|
|
8006ae8: 60fb str r3, [r7, #12]
|
|
#endif /* LWIP_CALLBACK_API */
|
|
void *err_arg;
|
|
enum tcp_state last_state;
|
|
tcp_pcb_purge(pcb);
|
|
8006aea: 6af8 ldr r0, [r7, #44] ; 0x2c
|
|
8006aec: f000 fbfc bl 80072e8 <tcp_pcb_purge>
|
|
/* Remove PCB from tcp_active_pcbs list. */
|
|
if (prev != NULL) {
|
|
8006af0: 6abb ldr r3, [r7, #40] ; 0x28
|
|
8006af2: 2b00 cmp r3, #0
|
|
8006af4: d010 beq.n 8006b18 <tcp_slowtmr+0x474>
|
|
LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs);
|
|
8006af6: 4b4f ldr r3, [pc, #316] ; (8006c34 <tcp_slowtmr+0x590>)
|
|
8006af8: 681b ldr r3, [r3, #0]
|
|
8006afa: 6afa ldr r2, [r7, #44] ; 0x2c
|
|
8006afc: 429a cmp r2, r3
|
|
8006afe: d106 bne.n 8006b0e <tcp_slowtmr+0x46a>
|
|
8006b00: 4b4d ldr r3, [pc, #308] ; (8006c38 <tcp_slowtmr+0x594>)
|
|
8006b02: f240 526d movw r2, #1389 ; 0x56d
|
|
8006b06: 494d ldr r1, [pc, #308] ; (8006c3c <tcp_slowtmr+0x598>)
|
|
8006b08: 484d ldr r0, [pc, #308] ; (8006c40 <tcp_slowtmr+0x59c>)
|
|
8006b0a: f009 fcf5 bl 80104f8 <printf>
|
|
prev->next = pcb->next;
|
|
8006b0e: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006b10: 68da ldr r2, [r3, #12]
|
|
8006b12: 6abb ldr r3, [r7, #40] ; 0x28
|
|
8006b14: 60da str r2, [r3, #12]
|
|
8006b16: e00f b.n 8006b38 <tcp_slowtmr+0x494>
|
|
} else {
|
|
/* This PCB was the first. */
|
|
LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb);
|
|
8006b18: 4b46 ldr r3, [pc, #280] ; (8006c34 <tcp_slowtmr+0x590>)
|
|
8006b1a: 681b ldr r3, [r3, #0]
|
|
8006b1c: 6afa ldr r2, [r7, #44] ; 0x2c
|
|
8006b1e: 429a cmp r2, r3
|
|
8006b20: d006 beq.n 8006b30 <tcp_slowtmr+0x48c>
|
|
8006b22: 4b45 ldr r3, [pc, #276] ; (8006c38 <tcp_slowtmr+0x594>)
|
|
8006b24: f240 5271 movw r2, #1393 ; 0x571
|
|
8006b28: 4946 ldr r1, [pc, #280] ; (8006c44 <tcp_slowtmr+0x5a0>)
|
|
8006b2a: 4845 ldr r0, [pc, #276] ; (8006c40 <tcp_slowtmr+0x59c>)
|
|
8006b2c: f009 fce4 bl 80104f8 <printf>
|
|
tcp_active_pcbs = pcb->next;
|
|
8006b30: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006b32: 68db ldr r3, [r3, #12]
|
|
8006b34: 4a3f ldr r2, [pc, #252] ; (8006c34 <tcp_slowtmr+0x590>)
|
|
8006b36: 6013 str r3, [r2, #0]
|
|
}
|
|
|
|
if (pcb_reset) {
|
|
8006b38: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
|
|
8006b3c: 2b00 cmp r3, #0
|
|
8006b3e: d013 beq.n 8006b68 <tcp_slowtmr+0x4c4>
|
|
tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip,
|
|
8006b40: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006b42: 6d18 ldr r0, [r3, #80] ; 0x50
|
|
8006b44: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006b46: 6a5c ldr r4, [r3, #36] ; 0x24
|
|
8006b48: 6afd ldr r5, [r7, #44] ; 0x2c
|
|
8006b4a: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006b4c: 3304 adds r3, #4
|
|
8006b4e: 6afa ldr r2, [r7, #44] ; 0x2c
|
|
8006b50: 8ad2 ldrh r2, [r2, #22]
|
|
8006b52: 6af9 ldr r1, [r7, #44] ; 0x2c
|
|
8006b54: 8b09 ldrh r1, [r1, #24]
|
|
8006b56: 9102 str r1, [sp, #8]
|
|
8006b58: 9201 str r2, [sp, #4]
|
|
8006b5a: 9300 str r3, [sp, #0]
|
|
8006b5c: 462b mov r3, r5
|
|
8006b5e: 4622 mov r2, r4
|
|
8006b60: 4601 mov r1, r0
|
|
8006b62: 6af8 ldr r0, [r7, #44] ; 0x2c
|
|
8006b64: f004 f988 bl 800ae78 <tcp_rst>
|
|
pcb->local_port, pcb->remote_port);
|
|
}
|
|
|
|
err_arg = pcb->callback_arg;
|
|
8006b68: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006b6a: 691b ldr r3, [r3, #16]
|
|
8006b6c: 60bb str r3, [r7, #8]
|
|
last_state = pcb->state;
|
|
8006b6e: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006b70: 7d1b ldrb r3, [r3, #20]
|
|
8006b72: 71fb strb r3, [r7, #7]
|
|
pcb2 = pcb;
|
|
8006b74: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006b76: 603b str r3, [r7, #0]
|
|
pcb = pcb->next;
|
|
8006b78: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006b7a: 68db ldr r3, [r3, #12]
|
|
8006b7c: 62fb str r3, [r7, #44] ; 0x2c
|
|
tcp_free(pcb2);
|
|
8006b7e: 6838 ldr r0, [r7, #0]
|
|
8006b80: f7ff f9f2 bl 8005f68 <tcp_free>
|
|
|
|
tcp_active_pcbs_changed = 0;
|
|
8006b84: 4b30 ldr r3, [pc, #192] ; (8006c48 <tcp_slowtmr+0x5a4>)
|
|
8006b86: 2200 movs r2, #0
|
|
8006b88: 701a strb r2, [r3, #0]
|
|
TCP_EVENT_ERR(last_state, err_fn, err_arg, ERR_ABRT);
|
|
8006b8a: 68fb ldr r3, [r7, #12]
|
|
8006b8c: 2b00 cmp r3, #0
|
|
8006b8e: d004 beq.n 8006b9a <tcp_slowtmr+0x4f6>
|
|
8006b90: 68fb ldr r3, [r7, #12]
|
|
8006b92: f06f 010c mvn.w r1, #12
|
|
8006b96: 68b8 ldr r0, [r7, #8]
|
|
8006b98: 4798 blx r3
|
|
if (tcp_active_pcbs_changed) {
|
|
8006b9a: 4b2b ldr r3, [pc, #172] ; (8006c48 <tcp_slowtmr+0x5a4>)
|
|
8006b9c: 781b ldrb r3, [r3, #0]
|
|
8006b9e: 2b00 cmp r3, #0
|
|
8006ba0: d037 beq.n 8006c12 <tcp_slowtmr+0x56e>
|
|
goto tcp_slowtmr_start;
|
|
8006ba2: e590 b.n 80066c6 <tcp_slowtmr+0x22>
|
|
}
|
|
} else {
|
|
/* get the 'next' element now and work with 'prev' below (in case of abort) */
|
|
prev = pcb;
|
|
8006ba4: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006ba6: 62bb str r3, [r7, #40] ; 0x28
|
|
pcb = pcb->next;
|
|
8006ba8: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006baa: 68db ldr r3, [r3, #12]
|
|
8006bac: 62fb str r3, [r7, #44] ; 0x2c
|
|
|
|
/* We check if we should poll the connection. */
|
|
++prev->polltmr;
|
|
8006bae: 6abb ldr r3, [r7, #40] ; 0x28
|
|
8006bb0: 7f1b ldrb r3, [r3, #28]
|
|
8006bb2: 3301 adds r3, #1
|
|
8006bb4: b2da uxtb r2, r3
|
|
8006bb6: 6abb ldr r3, [r7, #40] ; 0x28
|
|
8006bb8: 771a strb r2, [r3, #28]
|
|
if (prev->polltmr >= prev->pollinterval) {
|
|
8006bba: 6abb ldr r3, [r7, #40] ; 0x28
|
|
8006bbc: 7f1a ldrb r2, [r3, #28]
|
|
8006bbe: 6abb ldr r3, [r7, #40] ; 0x28
|
|
8006bc0: 7f5b ldrb r3, [r3, #29]
|
|
8006bc2: 429a cmp r2, r3
|
|
8006bc4: d325 bcc.n 8006c12 <tcp_slowtmr+0x56e>
|
|
prev->polltmr = 0;
|
|
8006bc6: 6abb ldr r3, [r7, #40] ; 0x28
|
|
8006bc8: 2200 movs r2, #0
|
|
8006bca: 771a strb r2, [r3, #28]
|
|
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n"));
|
|
tcp_active_pcbs_changed = 0;
|
|
8006bcc: 4b1e ldr r3, [pc, #120] ; (8006c48 <tcp_slowtmr+0x5a4>)
|
|
8006bce: 2200 movs r2, #0
|
|
8006bd0: 701a strb r2, [r3, #0]
|
|
TCP_EVENT_POLL(prev, err);
|
|
8006bd2: 6abb ldr r3, [r7, #40] ; 0x28
|
|
8006bd4: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
|
|
8006bd8: 2b00 cmp r3, #0
|
|
8006bda: d00b beq.n 8006bf4 <tcp_slowtmr+0x550>
|
|
8006bdc: 6abb ldr r3, [r7, #40] ; 0x28
|
|
8006bde: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
|
|
8006be2: 6aba ldr r2, [r7, #40] ; 0x28
|
|
8006be4: 6912 ldr r2, [r2, #16]
|
|
8006be6: 6ab9 ldr r1, [r7, #40] ; 0x28
|
|
8006be8: 4610 mov r0, r2
|
|
8006bea: 4798 blx r3
|
|
8006bec: 4603 mov r3, r0
|
|
8006bee: f887 3025 strb.w r3, [r7, #37] ; 0x25
|
|
8006bf2: e002 b.n 8006bfa <tcp_slowtmr+0x556>
|
|
8006bf4: 2300 movs r3, #0
|
|
8006bf6: f887 3025 strb.w r3, [r7, #37] ; 0x25
|
|
if (tcp_active_pcbs_changed) {
|
|
8006bfa: 4b13 ldr r3, [pc, #76] ; (8006c48 <tcp_slowtmr+0x5a4>)
|
|
8006bfc: 781b ldrb r3, [r3, #0]
|
|
8006bfe: 2b00 cmp r3, #0
|
|
8006c00: d000 beq.n 8006c04 <tcp_slowtmr+0x560>
|
|
goto tcp_slowtmr_start;
|
|
8006c02: e560 b.n 80066c6 <tcp_slowtmr+0x22>
|
|
}
|
|
/* if err == ERR_ABRT, 'prev' is already deallocated */
|
|
if (err == ERR_OK) {
|
|
8006c04: f997 3025 ldrsb.w r3, [r7, #37] ; 0x25
|
|
8006c08: 2b00 cmp r3, #0
|
|
8006c0a: d102 bne.n 8006c12 <tcp_slowtmr+0x56e>
|
|
tcp_output(prev);
|
|
8006c0c: 6ab8 ldr r0, [r7, #40] ; 0x28
|
|
8006c0e: f003 fb7f bl 800a310 <tcp_output>
|
|
while (pcb != NULL) {
|
|
8006c12: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006c14: 2b00 cmp r3, #0
|
|
8006c16: f47f ad5c bne.w 80066d2 <tcp_slowtmr+0x2e>
|
|
}
|
|
}
|
|
|
|
|
|
/* Steps through all of the TIME-WAIT PCBs. */
|
|
prev = NULL;
|
|
8006c1a: 2300 movs r3, #0
|
|
8006c1c: 62bb str r3, [r7, #40] ; 0x28
|
|
pcb = tcp_tw_pcbs;
|
|
8006c1e: 4b0b ldr r3, [pc, #44] ; (8006c4c <tcp_slowtmr+0x5a8>)
|
|
8006c20: 681b ldr r3, [r3, #0]
|
|
8006c22: 62fb str r3, [r7, #44] ; 0x2c
|
|
while (pcb != NULL) {
|
|
8006c24: e067 b.n 8006cf6 <tcp_slowtmr+0x652>
|
|
8006c26: bf00 nop
|
|
8006c28: 20008c00 .word 0x20008c00
|
|
8006c2c: 10624dd3 .word 0x10624dd3
|
|
8006c30: 000124f8 .word 0x000124f8
|
|
8006c34: 20008c0c .word 0x20008c0c
|
|
8006c38: 08015b1c .word 0x08015b1c
|
|
8006c3c: 08015f54 .word 0x08015f54
|
|
8006c40: 08015b60 .word 0x08015b60
|
|
8006c44: 08015f80 .word 0x08015f80
|
|
8006c48: 20008c14 .word 0x20008c14
|
|
8006c4c: 20008c10 .word 0x20008c10
|
|
LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
|
|
8006c50: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006c52: 7d1b ldrb r3, [r3, #20]
|
|
8006c54: 2b0a cmp r3, #10
|
|
8006c56: d006 beq.n 8006c66 <tcp_slowtmr+0x5c2>
|
|
8006c58: 4b2b ldr r3, [pc, #172] ; (8006d08 <tcp_slowtmr+0x664>)
|
|
8006c5a: f240 52a1 movw r2, #1441 ; 0x5a1
|
|
8006c5e: 492b ldr r1, [pc, #172] ; (8006d0c <tcp_slowtmr+0x668>)
|
|
8006c60: 482b ldr r0, [pc, #172] ; (8006d10 <tcp_slowtmr+0x66c>)
|
|
8006c62: f009 fc49 bl 80104f8 <printf>
|
|
pcb_remove = 0;
|
|
8006c66: 2300 movs r3, #0
|
|
8006c68: 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) {
|
|
8006c6c: 4b29 ldr r3, [pc, #164] ; (8006d14 <tcp_slowtmr+0x670>)
|
|
8006c6e: 681a ldr r2, [r3, #0]
|
|
8006c70: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006c72: 6a1b ldr r3, [r3, #32]
|
|
8006c74: 1ad3 subs r3, r2, r3
|
|
8006c76: 2bf0 cmp r3, #240 ; 0xf0
|
|
8006c78: d904 bls.n 8006c84 <tcp_slowtmr+0x5e0>
|
|
++pcb_remove;
|
|
8006c7a: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
8006c7e: 3301 adds r3, #1
|
|
8006c80: f887 3027 strb.w r3, [r7, #39] ; 0x27
|
|
}
|
|
|
|
/* If the PCB should be removed, do it. */
|
|
if (pcb_remove) {
|
|
8006c84: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
8006c88: 2b00 cmp r3, #0
|
|
8006c8a: d02f beq.n 8006cec <tcp_slowtmr+0x648>
|
|
struct tcp_pcb *pcb2;
|
|
tcp_pcb_purge(pcb);
|
|
8006c8c: 6af8 ldr r0, [r7, #44] ; 0x2c
|
|
8006c8e: f000 fb2b bl 80072e8 <tcp_pcb_purge>
|
|
/* Remove PCB from tcp_tw_pcbs list. */
|
|
if (prev != NULL) {
|
|
8006c92: 6abb ldr r3, [r7, #40] ; 0x28
|
|
8006c94: 2b00 cmp r3, #0
|
|
8006c96: d010 beq.n 8006cba <tcp_slowtmr+0x616>
|
|
LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs);
|
|
8006c98: 4b1f ldr r3, [pc, #124] ; (8006d18 <tcp_slowtmr+0x674>)
|
|
8006c9a: 681b ldr r3, [r3, #0]
|
|
8006c9c: 6afa ldr r2, [r7, #44] ; 0x2c
|
|
8006c9e: 429a cmp r2, r3
|
|
8006ca0: d106 bne.n 8006cb0 <tcp_slowtmr+0x60c>
|
|
8006ca2: 4b19 ldr r3, [pc, #100] ; (8006d08 <tcp_slowtmr+0x664>)
|
|
8006ca4: f240 52af movw r2, #1455 ; 0x5af
|
|
8006ca8: 491c ldr r1, [pc, #112] ; (8006d1c <tcp_slowtmr+0x678>)
|
|
8006caa: 4819 ldr r0, [pc, #100] ; (8006d10 <tcp_slowtmr+0x66c>)
|
|
8006cac: f009 fc24 bl 80104f8 <printf>
|
|
prev->next = pcb->next;
|
|
8006cb0: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006cb2: 68da ldr r2, [r3, #12]
|
|
8006cb4: 6abb ldr r3, [r7, #40] ; 0x28
|
|
8006cb6: 60da str r2, [r3, #12]
|
|
8006cb8: e00f b.n 8006cda <tcp_slowtmr+0x636>
|
|
} else {
|
|
/* This PCB was the first. */
|
|
LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb);
|
|
8006cba: 4b17 ldr r3, [pc, #92] ; (8006d18 <tcp_slowtmr+0x674>)
|
|
8006cbc: 681b ldr r3, [r3, #0]
|
|
8006cbe: 6afa ldr r2, [r7, #44] ; 0x2c
|
|
8006cc0: 429a cmp r2, r3
|
|
8006cc2: d006 beq.n 8006cd2 <tcp_slowtmr+0x62e>
|
|
8006cc4: 4b10 ldr r3, [pc, #64] ; (8006d08 <tcp_slowtmr+0x664>)
|
|
8006cc6: f240 52b3 movw r2, #1459 ; 0x5b3
|
|
8006cca: 4915 ldr r1, [pc, #84] ; (8006d20 <tcp_slowtmr+0x67c>)
|
|
8006ccc: 4810 ldr r0, [pc, #64] ; (8006d10 <tcp_slowtmr+0x66c>)
|
|
8006cce: f009 fc13 bl 80104f8 <printf>
|
|
tcp_tw_pcbs = pcb->next;
|
|
8006cd2: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006cd4: 68db ldr r3, [r3, #12]
|
|
8006cd6: 4a10 ldr r2, [pc, #64] ; (8006d18 <tcp_slowtmr+0x674>)
|
|
8006cd8: 6013 str r3, [r2, #0]
|
|
}
|
|
pcb2 = pcb;
|
|
8006cda: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006cdc: 61fb str r3, [r7, #28]
|
|
pcb = pcb->next;
|
|
8006cde: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006ce0: 68db ldr r3, [r3, #12]
|
|
8006ce2: 62fb str r3, [r7, #44] ; 0x2c
|
|
tcp_free(pcb2);
|
|
8006ce4: 69f8 ldr r0, [r7, #28]
|
|
8006ce6: f7ff f93f bl 8005f68 <tcp_free>
|
|
8006cea: e004 b.n 8006cf6 <tcp_slowtmr+0x652>
|
|
} else {
|
|
prev = pcb;
|
|
8006cec: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006cee: 62bb str r3, [r7, #40] ; 0x28
|
|
pcb = pcb->next;
|
|
8006cf0: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006cf2: 68db ldr r3, [r3, #12]
|
|
8006cf4: 62fb str r3, [r7, #44] ; 0x2c
|
|
while (pcb != NULL) {
|
|
8006cf6: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
8006cf8: 2b00 cmp r3, #0
|
|
8006cfa: d1a9 bne.n 8006c50 <tcp_slowtmr+0x5ac>
|
|
}
|
|
}
|
|
}
|
|
8006cfc: bf00 nop
|
|
8006cfe: bf00 nop
|
|
8006d00: 3730 adds r7, #48 ; 0x30
|
|
8006d02: 46bd mov sp, r7
|
|
8006d04: bdb0 pop {r4, r5, r7, pc}
|
|
8006d06: bf00 nop
|
|
8006d08: 08015b1c .word 0x08015b1c
|
|
8006d0c: 08015fac .word 0x08015fac
|
|
8006d10: 08015b60 .word 0x08015b60
|
|
8006d14: 20008c00 .word 0x20008c00
|
|
8006d18: 20008c10 .word 0x20008c10
|
|
8006d1c: 08015fdc .word 0x08015fdc
|
|
8006d20: 08016004 .word 0x08016004
|
|
|
|
08006d24 <tcp_fasttmr>:
|
|
*
|
|
* Automatically called from tcp_tmr().
|
|
*/
|
|
void
|
|
tcp_fasttmr(void)
|
|
{
|
|
8006d24: b580 push {r7, lr}
|
|
8006d26: b082 sub sp, #8
|
|
8006d28: af00 add r7, sp, #0
|
|
struct tcp_pcb *pcb;
|
|
|
|
++tcp_timer_ctr;
|
|
8006d2a: 4b2d ldr r3, [pc, #180] ; (8006de0 <tcp_fasttmr+0xbc>)
|
|
8006d2c: 781b ldrb r3, [r3, #0]
|
|
8006d2e: 3301 adds r3, #1
|
|
8006d30: b2da uxtb r2, r3
|
|
8006d32: 4b2b ldr r3, [pc, #172] ; (8006de0 <tcp_fasttmr+0xbc>)
|
|
8006d34: 701a strb r2, [r3, #0]
|
|
|
|
tcp_fasttmr_start:
|
|
pcb = tcp_active_pcbs;
|
|
8006d36: 4b2b ldr r3, [pc, #172] ; (8006de4 <tcp_fasttmr+0xc0>)
|
|
8006d38: 681b ldr r3, [r3, #0]
|
|
8006d3a: 607b str r3, [r7, #4]
|
|
|
|
while (pcb != NULL) {
|
|
8006d3c: e048 b.n 8006dd0 <tcp_fasttmr+0xac>
|
|
if (pcb->last_timer != tcp_timer_ctr) {
|
|
8006d3e: 687b ldr r3, [r7, #4]
|
|
8006d40: 7f9a ldrb r2, [r3, #30]
|
|
8006d42: 4b27 ldr r3, [pc, #156] ; (8006de0 <tcp_fasttmr+0xbc>)
|
|
8006d44: 781b ldrb r3, [r3, #0]
|
|
8006d46: 429a cmp r2, r3
|
|
8006d48: d03f beq.n 8006dca <tcp_fasttmr+0xa6>
|
|
struct tcp_pcb *next;
|
|
pcb->last_timer = tcp_timer_ctr;
|
|
8006d4a: 4b25 ldr r3, [pc, #148] ; (8006de0 <tcp_fasttmr+0xbc>)
|
|
8006d4c: 781a ldrb r2, [r3, #0]
|
|
8006d4e: 687b ldr r3, [r7, #4]
|
|
8006d50: 779a strb r2, [r3, #30]
|
|
/* send delayed ACKs */
|
|
if (pcb->flags & TF_ACK_DELAY) {
|
|
8006d52: 687b ldr r3, [r7, #4]
|
|
8006d54: 8b5b ldrh r3, [r3, #26]
|
|
8006d56: f003 0301 and.w r3, r3, #1
|
|
8006d5a: 2b00 cmp r3, #0
|
|
8006d5c: d010 beq.n 8006d80 <tcp_fasttmr+0x5c>
|
|
LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n"));
|
|
tcp_ack_now(pcb);
|
|
8006d5e: 687b ldr r3, [r7, #4]
|
|
8006d60: 8b5b ldrh r3, [r3, #26]
|
|
8006d62: f043 0302 orr.w r3, r3, #2
|
|
8006d66: b29a uxth r2, r3
|
|
8006d68: 687b ldr r3, [r7, #4]
|
|
8006d6a: 835a strh r2, [r3, #26]
|
|
tcp_output(pcb);
|
|
8006d6c: 6878 ldr r0, [r7, #4]
|
|
8006d6e: f003 facf bl 800a310 <tcp_output>
|
|
tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
|
|
8006d72: 687b ldr r3, [r7, #4]
|
|
8006d74: 8b5b ldrh r3, [r3, #26]
|
|
8006d76: f023 0303 bic.w r3, r3, #3
|
|
8006d7a: b29a uxth r2, r3
|
|
8006d7c: 687b ldr r3, [r7, #4]
|
|
8006d7e: 835a strh r2, [r3, #26]
|
|
}
|
|
/* send pending FIN */
|
|
if (pcb->flags & TF_CLOSEPEND) {
|
|
8006d80: 687b ldr r3, [r7, #4]
|
|
8006d82: 8b5b ldrh r3, [r3, #26]
|
|
8006d84: f003 0308 and.w r3, r3, #8
|
|
8006d88: 2b00 cmp r3, #0
|
|
8006d8a: d009 beq.n 8006da0 <tcp_fasttmr+0x7c>
|
|
LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: pending FIN\n"));
|
|
tcp_clear_flags(pcb, TF_CLOSEPEND);
|
|
8006d8c: 687b ldr r3, [r7, #4]
|
|
8006d8e: 8b5b ldrh r3, [r3, #26]
|
|
8006d90: f023 0308 bic.w r3, r3, #8
|
|
8006d94: b29a uxth r2, r3
|
|
8006d96: 687b ldr r3, [r7, #4]
|
|
8006d98: 835a strh r2, [r3, #26]
|
|
tcp_close_shutdown_fin(pcb);
|
|
8006d9a: 6878 ldr r0, [r7, #4]
|
|
8006d9c: f7ff fa78 bl 8006290 <tcp_close_shutdown_fin>
|
|
}
|
|
|
|
next = pcb->next;
|
|
8006da0: 687b ldr r3, [r7, #4]
|
|
8006da2: 68db ldr r3, [r3, #12]
|
|
8006da4: 603b str r3, [r7, #0]
|
|
|
|
/* If there is data which was previously "refused" by upper layer */
|
|
if (pcb->refused_data != NULL) {
|
|
8006da6: 687b ldr r3, [r7, #4]
|
|
8006da8: 6f9b ldr r3, [r3, #120] ; 0x78
|
|
8006daa: 2b00 cmp r3, #0
|
|
8006dac: d00a beq.n 8006dc4 <tcp_fasttmr+0xa0>
|
|
tcp_active_pcbs_changed = 0;
|
|
8006dae: 4b0e ldr r3, [pc, #56] ; (8006de8 <tcp_fasttmr+0xc4>)
|
|
8006db0: 2200 movs r2, #0
|
|
8006db2: 701a strb r2, [r3, #0]
|
|
tcp_process_refused_data(pcb);
|
|
8006db4: 6878 ldr r0, [r7, #4]
|
|
8006db6: f000 f819 bl 8006dec <tcp_process_refused_data>
|
|
if (tcp_active_pcbs_changed) {
|
|
8006dba: 4b0b ldr r3, [pc, #44] ; (8006de8 <tcp_fasttmr+0xc4>)
|
|
8006dbc: 781b ldrb r3, [r3, #0]
|
|
8006dbe: 2b00 cmp r3, #0
|
|
8006dc0: d000 beq.n 8006dc4 <tcp_fasttmr+0xa0>
|
|
/* application callback has changed the pcb list: restart the loop */
|
|
goto tcp_fasttmr_start;
|
|
8006dc2: e7b8 b.n 8006d36 <tcp_fasttmr+0x12>
|
|
}
|
|
}
|
|
pcb = next;
|
|
8006dc4: 683b ldr r3, [r7, #0]
|
|
8006dc6: 607b str r3, [r7, #4]
|
|
8006dc8: e002 b.n 8006dd0 <tcp_fasttmr+0xac>
|
|
} else {
|
|
pcb = pcb->next;
|
|
8006dca: 687b ldr r3, [r7, #4]
|
|
8006dcc: 68db ldr r3, [r3, #12]
|
|
8006dce: 607b str r3, [r7, #4]
|
|
while (pcb != NULL) {
|
|
8006dd0: 687b ldr r3, [r7, #4]
|
|
8006dd2: 2b00 cmp r3, #0
|
|
8006dd4: d1b3 bne.n 8006d3e <tcp_fasttmr+0x1a>
|
|
}
|
|
}
|
|
}
|
|
8006dd6: bf00 nop
|
|
8006dd8: bf00 nop
|
|
8006dda: 3708 adds r7, #8
|
|
8006ddc: 46bd mov sp, r7
|
|
8006dde: bd80 pop {r7, pc}
|
|
8006de0: 20008c16 .word 0x20008c16
|
|
8006de4: 20008c0c .word 0x20008c0c
|
|
8006de8: 20008c14 .word 0x20008c14
|
|
|
|
08006dec <tcp_process_refused_data>:
|
|
}
|
|
|
|
/** Pass pcb->refused_data to the recv callback */
|
|
err_t
|
|
tcp_process_refused_data(struct tcp_pcb *pcb)
|
|
{
|
|
8006dec: b590 push {r4, r7, lr}
|
|
8006dee: b085 sub sp, #20
|
|
8006df0: af00 add r7, sp, #0
|
|
8006df2: 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);
|
|
8006df4: 687b ldr r3, [r7, #4]
|
|
8006df6: 2b00 cmp r3, #0
|
|
8006df8: d109 bne.n 8006e0e <tcp_process_refused_data+0x22>
|
|
8006dfa: 4b37 ldr r3, [pc, #220] ; (8006ed8 <tcp_process_refused_data+0xec>)
|
|
8006dfc: f240 6209 movw r2, #1545 ; 0x609
|
|
8006e00: 4936 ldr r1, [pc, #216] ; (8006edc <tcp_process_refused_data+0xf0>)
|
|
8006e02: 4837 ldr r0, [pc, #220] ; (8006ee0 <tcp_process_refused_data+0xf4>)
|
|
8006e04: f009 fb78 bl 80104f8 <printf>
|
|
8006e08: f06f 030f mvn.w r3, #15
|
|
8006e0c: e060 b.n 8006ed0 <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;
|
|
8006e0e: 687b ldr r3, [r7, #4]
|
|
8006e10: 6f9b ldr r3, [r3, #120] ; 0x78
|
|
8006e12: 7b5b ldrb r3, [r3, #13]
|
|
8006e14: 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;
|
|
8006e16: 687b ldr r3, [r7, #4]
|
|
8006e18: 6f9b ldr r3, [r3, #120] ; 0x78
|
|
8006e1a: 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;
|
|
8006e1c: 687b ldr r3, [r7, #4]
|
|
8006e1e: 2200 movs r2, #0
|
|
8006e20: 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);
|
|
8006e22: 687b ldr r3, [r7, #4]
|
|
8006e24: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
|
|
8006e28: 2b00 cmp r3, #0
|
|
8006e2a: d00b beq.n 8006e44 <tcp_process_refused_data+0x58>
|
|
8006e2c: 687b ldr r3, [r7, #4]
|
|
8006e2e: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
|
|
8006e32: 687b ldr r3, [r7, #4]
|
|
8006e34: 6918 ldr r0, [r3, #16]
|
|
8006e36: 2300 movs r3, #0
|
|
8006e38: 68ba ldr r2, [r7, #8]
|
|
8006e3a: 6879 ldr r1, [r7, #4]
|
|
8006e3c: 47a0 blx r4
|
|
8006e3e: 4603 mov r3, r0
|
|
8006e40: 73fb strb r3, [r7, #15]
|
|
8006e42: e007 b.n 8006e54 <tcp_process_refused_data+0x68>
|
|
8006e44: 2300 movs r3, #0
|
|
8006e46: 68ba ldr r2, [r7, #8]
|
|
8006e48: 6879 ldr r1, [r7, #4]
|
|
8006e4a: 2000 movs r0, #0
|
|
8006e4c: f000 f8a4 bl 8006f98 <tcp_recv_null>
|
|
8006e50: 4603 mov r3, r0
|
|
8006e52: 73fb strb r3, [r7, #15]
|
|
if (err == ERR_OK) {
|
|
8006e54: f997 300f ldrsb.w r3, [r7, #15]
|
|
8006e58: 2b00 cmp r3, #0
|
|
8006e5a: d12a bne.n 8006eb2 <tcp_process_refused_data+0xc6>
|
|
/* did refused_data include a FIN? */
|
|
if ((refused_flags & PBUF_FLAG_TCP_FIN)
|
|
8006e5c: 7bbb ldrb r3, [r7, #14]
|
|
8006e5e: f003 0320 and.w r3, r3, #32
|
|
8006e62: 2b00 cmp r3, #0
|
|
8006e64: d033 beq.n 8006ece <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)) {
|
|
8006e66: 687b ldr r3, [r7, #4]
|
|
8006e68: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
8006e6a: f5b3 6f06 cmp.w r3, #2144 ; 0x860
|
|
8006e6e: d005 beq.n 8006e7c <tcp_process_refused_data+0x90>
|
|
pcb->rcv_wnd++;
|
|
8006e70: 687b ldr r3, [r7, #4]
|
|
8006e72: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
8006e74: 3301 adds r3, #1
|
|
8006e76: b29a uxth r2, r3
|
|
8006e78: 687b ldr r3, [r7, #4]
|
|
8006e7a: 851a strh r2, [r3, #40] ; 0x28
|
|
}
|
|
TCP_EVENT_CLOSED(pcb, err);
|
|
8006e7c: 687b ldr r3, [r7, #4]
|
|
8006e7e: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
|
|
8006e82: 2b00 cmp r3, #0
|
|
8006e84: d00b beq.n 8006e9e <tcp_process_refused_data+0xb2>
|
|
8006e86: 687b ldr r3, [r7, #4]
|
|
8006e88: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
|
|
8006e8c: 687b ldr r3, [r7, #4]
|
|
8006e8e: 6918 ldr r0, [r3, #16]
|
|
8006e90: 2300 movs r3, #0
|
|
8006e92: 2200 movs r2, #0
|
|
8006e94: 6879 ldr r1, [r7, #4]
|
|
8006e96: 47a0 blx r4
|
|
8006e98: 4603 mov r3, r0
|
|
8006e9a: 73fb strb r3, [r7, #15]
|
|
8006e9c: e001 b.n 8006ea2 <tcp_process_refused_data+0xb6>
|
|
8006e9e: 2300 movs r3, #0
|
|
8006ea0: 73fb strb r3, [r7, #15]
|
|
if (err == ERR_ABRT) {
|
|
8006ea2: f997 300f ldrsb.w r3, [r7, #15]
|
|
8006ea6: f113 0f0d cmn.w r3, #13
|
|
8006eaa: d110 bne.n 8006ece <tcp_process_refused_data+0xe2>
|
|
return ERR_ABRT;
|
|
8006eac: f06f 030c mvn.w r3, #12
|
|
8006eb0: e00e b.n 8006ed0 <tcp_process_refused_data+0xe4>
|
|
}
|
|
}
|
|
} else if (err == ERR_ABRT) {
|
|
8006eb2: f997 300f ldrsb.w r3, [r7, #15]
|
|
8006eb6: f113 0f0d cmn.w r3, #13
|
|
8006eba: d102 bne.n 8006ec2 <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;
|
|
8006ebc: f06f 030c mvn.w r3, #12
|
|
8006ec0: e006 b.n 8006ed0 <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;
|
|
8006ec2: 687b ldr r3, [r7, #4]
|
|
8006ec4: 68ba ldr r2, [r7, #8]
|
|
8006ec6: 679a str r2, [r3, #120] ; 0x78
|
|
return ERR_INPROGRESS;
|
|
8006ec8: f06f 0304 mvn.w r3, #4
|
|
8006ecc: e000 b.n 8006ed0 <tcp_process_refused_data+0xe4>
|
|
}
|
|
}
|
|
return ERR_OK;
|
|
8006ece: 2300 movs r3, #0
|
|
}
|
|
8006ed0: 4618 mov r0, r3
|
|
8006ed2: 3714 adds r7, #20
|
|
8006ed4: 46bd mov sp, r7
|
|
8006ed6: bd90 pop {r4, r7, pc}
|
|
8006ed8: 08015b1c .word 0x08015b1c
|
|
8006edc: 0801602c .word 0x0801602c
|
|
8006ee0: 08015b60 .word 0x08015b60
|
|
|
|
08006ee4 <tcp_segs_free>:
|
|
*
|
|
* @param seg tcp_seg list of TCP segments to free
|
|
*/
|
|
void
|
|
tcp_segs_free(struct tcp_seg *seg)
|
|
{
|
|
8006ee4: b580 push {r7, lr}
|
|
8006ee6: b084 sub sp, #16
|
|
8006ee8: af00 add r7, sp, #0
|
|
8006eea: 6078 str r0, [r7, #4]
|
|
while (seg != NULL) {
|
|
8006eec: e007 b.n 8006efe <tcp_segs_free+0x1a>
|
|
struct tcp_seg *next = seg->next;
|
|
8006eee: 687b ldr r3, [r7, #4]
|
|
8006ef0: 681b ldr r3, [r3, #0]
|
|
8006ef2: 60fb str r3, [r7, #12]
|
|
tcp_seg_free(seg);
|
|
8006ef4: 6878 ldr r0, [r7, #4]
|
|
8006ef6: f000 f80a bl 8006f0e <tcp_seg_free>
|
|
seg = next;
|
|
8006efa: 68fb ldr r3, [r7, #12]
|
|
8006efc: 607b str r3, [r7, #4]
|
|
while (seg != NULL) {
|
|
8006efe: 687b ldr r3, [r7, #4]
|
|
8006f00: 2b00 cmp r3, #0
|
|
8006f02: d1f4 bne.n 8006eee <tcp_segs_free+0xa>
|
|
}
|
|
}
|
|
8006f04: bf00 nop
|
|
8006f06: bf00 nop
|
|
8006f08: 3710 adds r7, #16
|
|
8006f0a: 46bd mov sp, r7
|
|
8006f0c: bd80 pop {r7, pc}
|
|
|
|
08006f0e <tcp_seg_free>:
|
|
*
|
|
* @param seg single tcp_seg to free
|
|
*/
|
|
void
|
|
tcp_seg_free(struct tcp_seg *seg)
|
|
{
|
|
8006f0e: b580 push {r7, lr}
|
|
8006f10: b082 sub sp, #8
|
|
8006f12: af00 add r7, sp, #0
|
|
8006f14: 6078 str r0, [r7, #4]
|
|
if (seg != NULL) {
|
|
8006f16: 687b ldr r3, [r7, #4]
|
|
8006f18: 2b00 cmp r3, #0
|
|
8006f1a: d00c beq.n 8006f36 <tcp_seg_free+0x28>
|
|
if (seg->p != NULL) {
|
|
8006f1c: 687b ldr r3, [r7, #4]
|
|
8006f1e: 685b ldr r3, [r3, #4]
|
|
8006f20: 2b00 cmp r3, #0
|
|
8006f22: d004 beq.n 8006f2e <tcp_seg_free+0x20>
|
|
pbuf_free(seg->p);
|
|
8006f24: 687b ldr r3, [r7, #4]
|
|
8006f26: 685b ldr r3, [r3, #4]
|
|
8006f28: 4618 mov r0, r3
|
|
8006f2a: f7fe fd6d bl 8005a08 <pbuf_free>
|
|
#if TCP_DEBUG
|
|
seg->p = NULL;
|
|
#endif /* TCP_DEBUG */
|
|
}
|
|
memp_free(MEMP_TCP_SEG, seg);
|
|
8006f2e: 6879 ldr r1, [r7, #4]
|
|
8006f30: 2003 movs r0, #3
|
|
8006f32: f7fd fee7 bl 8004d04 <memp_free>
|
|
}
|
|
}
|
|
8006f36: bf00 nop
|
|
8006f38: 3708 adds r7, #8
|
|
8006f3a: 46bd mov sp, r7
|
|
8006f3c: bd80 pop {r7, pc}
|
|
...
|
|
|
|
08006f40 <tcp_seg_copy>:
|
|
* @param seg the old tcp_seg
|
|
* @return a copy of seg
|
|
*/
|
|
struct tcp_seg *
|
|
tcp_seg_copy(struct tcp_seg *seg)
|
|
{
|
|
8006f40: b580 push {r7, lr}
|
|
8006f42: b084 sub sp, #16
|
|
8006f44: af00 add r7, sp, #0
|
|
8006f46: 6078 str r0, [r7, #4]
|
|
struct tcp_seg *cseg;
|
|
|
|
LWIP_ASSERT("tcp_seg_copy: invalid seg", seg != NULL);
|
|
8006f48: 687b ldr r3, [r7, #4]
|
|
8006f4a: 2b00 cmp r3, #0
|
|
8006f4c: d106 bne.n 8006f5c <tcp_seg_copy+0x1c>
|
|
8006f4e: 4b0f ldr r3, [pc, #60] ; (8006f8c <tcp_seg_copy+0x4c>)
|
|
8006f50: f240 6282 movw r2, #1666 ; 0x682
|
|
8006f54: 490e ldr r1, [pc, #56] ; (8006f90 <tcp_seg_copy+0x50>)
|
|
8006f56: 480f ldr r0, [pc, #60] ; (8006f94 <tcp_seg_copy+0x54>)
|
|
8006f58: f009 face bl 80104f8 <printf>
|
|
|
|
cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG);
|
|
8006f5c: 2003 movs r0, #3
|
|
8006f5e: f7fd fe61 bl 8004c24 <memp_malloc>
|
|
8006f62: 60f8 str r0, [r7, #12]
|
|
if (cseg == NULL) {
|
|
8006f64: 68fb ldr r3, [r7, #12]
|
|
8006f66: 2b00 cmp r3, #0
|
|
8006f68: d101 bne.n 8006f6e <tcp_seg_copy+0x2e>
|
|
return NULL;
|
|
8006f6a: 2300 movs r3, #0
|
|
8006f6c: e00a b.n 8006f84 <tcp_seg_copy+0x44>
|
|
}
|
|
SMEMCPY((u8_t *)cseg, (const u8_t *)seg, sizeof(struct tcp_seg));
|
|
8006f6e: 2210 movs r2, #16
|
|
8006f70: 6879 ldr r1, [r7, #4]
|
|
8006f72: 68f8 ldr r0, [r7, #12]
|
|
8006f74: f009 fa90 bl 8010498 <memcpy>
|
|
pbuf_ref(cseg->p);
|
|
8006f78: 68fb ldr r3, [r7, #12]
|
|
8006f7a: 685b ldr r3, [r3, #4]
|
|
8006f7c: 4618 mov r0, r3
|
|
8006f7e: f7fe fde3 bl 8005b48 <pbuf_ref>
|
|
return cseg;
|
|
8006f82: 68fb ldr r3, [r7, #12]
|
|
}
|
|
8006f84: 4618 mov r0, r3
|
|
8006f86: 3710 adds r7, #16
|
|
8006f88: 46bd mov sp, r7
|
|
8006f8a: bd80 pop {r7, pc}
|
|
8006f8c: 08015b1c .word 0x08015b1c
|
|
8006f90: 08016070 .word 0x08016070
|
|
8006f94: 08015b60 .word 0x08015b60
|
|
|
|
08006f98 <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)
|
|
{
|
|
8006f98: b580 push {r7, lr}
|
|
8006f9a: b084 sub sp, #16
|
|
8006f9c: af00 add r7, sp, #0
|
|
8006f9e: 60f8 str r0, [r7, #12]
|
|
8006fa0: 60b9 str r1, [r7, #8]
|
|
8006fa2: 607a str r2, [r7, #4]
|
|
8006fa4: 70fb strb r3, [r7, #3]
|
|
LWIP_UNUSED_ARG(arg);
|
|
|
|
LWIP_ERROR("tcp_recv_null: invalid pcb", pcb != NULL, return ERR_ARG);
|
|
8006fa6: 68bb ldr r3, [r7, #8]
|
|
8006fa8: 2b00 cmp r3, #0
|
|
8006faa: d109 bne.n 8006fc0 <tcp_recv_null+0x28>
|
|
8006fac: 4b12 ldr r3, [pc, #72] ; (8006ff8 <tcp_recv_null+0x60>)
|
|
8006fae: f44f 62d3 mov.w r2, #1688 ; 0x698
|
|
8006fb2: 4912 ldr r1, [pc, #72] ; (8006ffc <tcp_recv_null+0x64>)
|
|
8006fb4: 4812 ldr r0, [pc, #72] ; (8007000 <tcp_recv_null+0x68>)
|
|
8006fb6: f009 fa9f bl 80104f8 <printf>
|
|
8006fba: f06f 030f mvn.w r3, #15
|
|
8006fbe: e016 b.n 8006fee <tcp_recv_null+0x56>
|
|
|
|
if (p != NULL) {
|
|
8006fc0: 687b ldr r3, [r7, #4]
|
|
8006fc2: 2b00 cmp r3, #0
|
|
8006fc4: d009 beq.n 8006fda <tcp_recv_null+0x42>
|
|
tcp_recved(pcb, p->tot_len);
|
|
8006fc6: 687b ldr r3, [r7, #4]
|
|
8006fc8: 891b ldrh r3, [r3, #8]
|
|
8006fca: 4619 mov r1, r3
|
|
8006fcc: 68b8 ldr r0, [r7, #8]
|
|
8006fce: f7ff fb19 bl 8006604 <tcp_recved>
|
|
pbuf_free(p);
|
|
8006fd2: 6878 ldr r0, [r7, #4]
|
|
8006fd4: f7fe fd18 bl 8005a08 <pbuf_free>
|
|
8006fd8: e008 b.n 8006fec <tcp_recv_null+0x54>
|
|
} else if (err == ERR_OK) {
|
|
8006fda: f997 3003 ldrsb.w r3, [r7, #3]
|
|
8006fde: 2b00 cmp r3, #0
|
|
8006fe0: d104 bne.n 8006fec <tcp_recv_null+0x54>
|
|
return tcp_close(pcb);
|
|
8006fe2: 68b8 ldr r0, [r7, #8]
|
|
8006fe4: f7ff f9be bl 8006364 <tcp_close>
|
|
8006fe8: 4603 mov r3, r0
|
|
8006fea: e000 b.n 8006fee <tcp_recv_null+0x56>
|
|
}
|
|
return ERR_OK;
|
|
8006fec: 2300 movs r3, #0
|
|
}
|
|
8006fee: 4618 mov r0, r3
|
|
8006ff0: 3710 adds r7, #16
|
|
8006ff2: 46bd mov sp, r7
|
|
8006ff4: bd80 pop {r7, pc}
|
|
8006ff6: bf00 nop
|
|
8006ff8: 08015b1c .word 0x08015b1c
|
|
8006ffc: 0801608c .word 0x0801608c
|
|
8007000: 08015b60 .word 0x08015b60
|
|
|
|
08007004 <tcp_kill_prio>:
|
|
*
|
|
* @param prio minimum priority
|
|
*/
|
|
static void
|
|
tcp_kill_prio(u8_t prio)
|
|
{
|
|
8007004: b580 push {r7, lr}
|
|
8007006: b086 sub sp, #24
|
|
8007008: af00 add r7, sp, #0
|
|
800700a: 4603 mov r3, r0
|
|
800700c: 71fb strb r3, [r7, #7]
|
|
struct tcp_pcb *pcb, *inactive;
|
|
u32_t inactivity;
|
|
u8_t mprio;
|
|
|
|
mprio = LWIP_MIN(TCP_PRIO_MAX, prio);
|
|
800700e: f997 3007 ldrsb.w r3, [r7, #7]
|
|
8007012: 2b00 cmp r3, #0
|
|
8007014: db01 blt.n 800701a <tcp_kill_prio+0x16>
|
|
8007016: 79fb ldrb r3, [r7, #7]
|
|
8007018: e000 b.n 800701c <tcp_kill_prio+0x18>
|
|
800701a: 237f movs r3, #127 ; 0x7f
|
|
800701c: 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) {
|
|
800701e: 7afb ldrb r3, [r7, #11]
|
|
8007020: 2b00 cmp r3, #0
|
|
8007022: d034 beq.n 800708e <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--;
|
|
8007024: 7afb ldrb r3, [r7, #11]
|
|
8007026: 3b01 subs r3, #1
|
|
8007028: 72fb strb r3, [r7, #11]
|
|
|
|
inactivity = 0;
|
|
800702a: 2300 movs r3, #0
|
|
800702c: 60fb str r3, [r7, #12]
|
|
inactive = NULL;
|
|
800702e: 2300 movs r3, #0
|
|
8007030: 613b str r3, [r7, #16]
|
|
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
|
|
8007032: 4b19 ldr r3, [pc, #100] ; (8007098 <tcp_kill_prio+0x94>)
|
|
8007034: 681b ldr r3, [r3, #0]
|
|
8007036: 617b str r3, [r7, #20]
|
|
8007038: e01f b.n 800707a <tcp_kill_prio+0x76>
|
|
/* lower prio is always a kill candidate */
|
|
if ((pcb->prio < mprio) ||
|
|
800703a: 697b ldr r3, [r7, #20]
|
|
800703c: 7d5b ldrb r3, [r3, #21]
|
|
800703e: 7afa ldrb r2, [r7, #11]
|
|
8007040: 429a cmp r2, r3
|
|
8007042: d80c bhi.n 800705e <tcp_kill_prio+0x5a>
|
|
/* longer inactivity is also a kill candidate */
|
|
((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) {
|
|
8007044: 697b ldr r3, [r7, #20]
|
|
8007046: 7d5b ldrb r3, [r3, #21]
|
|
if ((pcb->prio < mprio) ||
|
|
8007048: 7afa ldrb r2, [r7, #11]
|
|
800704a: 429a cmp r2, r3
|
|
800704c: d112 bne.n 8007074 <tcp_kill_prio+0x70>
|
|
((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) {
|
|
800704e: 4b13 ldr r3, [pc, #76] ; (800709c <tcp_kill_prio+0x98>)
|
|
8007050: 681a ldr r2, [r3, #0]
|
|
8007052: 697b ldr r3, [r7, #20]
|
|
8007054: 6a1b ldr r3, [r3, #32]
|
|
8007056: 1ad3 subs r3, r2, r3
|
|
8007058: 68fa ldr r2, [r7, #12]
|
|
800705a: 429a cmp r2, r3
|
|
800705c: d80a bhi.n 8007074 <tcp_kill_prio+0x70>
|
|
inactivity = tcp_ticks - pcb->tmr;
|
|
800705e: 4b0f ldr r3, [pc, #60] ; (800709c <tcp_kill_prio+0x98>)
|
|
8007060: 681a ldr r2, [r3, #0]
|
|
8007062: 697b ldr r3, [r7, #20]
|
|
8007064: 6a1b ldr r3, [r3, #32]
|
|
8007066: 1ad3 subs r3, r2, r3
|
|
8007068: 60fb str r3, [r7, #12]
|
|
inactive = pcb;
|
|
800706a: 697b ldr r3, [r7, #20]
|
|
800706c: 613b str r3, [r7, #16]
|
|
mprio = pcb->prio;
|
|
800706e: 697b ldr r3, [r7, #20]
|
|
8007070: 7d5b ldrb r3, [r3, #21]
|
|
8007072: 72fb strb r3, [r7, #11]
|
|
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
|
|
8007074: 697b ldr r3, [r7, #20]
|
|
8007076: 68db ldr r3, [r3, #12]
|
|
8007078: 617b str r3, [r7, #20]
|
|
800707a: 697b ldr r3, [r7, #20]
|
|
800707c: 2b00 cmp r3, #0
|
|
800707e: d1dc bne.n 800703a <tcp_kill_prio+0x36>
|
|
}
|
|
}
|
|
if (inactive != NULL) {
|
|
8007080: 693b ldr r3, [r7, #16]
|
|
8007082: 2b00 cmp r3, #0
|
|
8007084: d004 beq.n 8007090 <tcp_kill_prio+0x8c>
|
|
LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n",
|
|
(void *)inactive, inactivity));
|
|
tcp_abort(inactive);
|
|
8007086: 6938 ldr r0, [r7, #16]
|
|
8007088: f7ff fa56 bl 8006538 <tcp_abort>
|
|
800708c: e000 b.n 8007090 <tcp_kill_prio+0x8c>
|
|
return;
|
|
800708e: bf00 nop
|
|
}
|
|
}
|
|
8007090: 3718 adds r7, #24
|
|
8007092: 46bd mov sp, r7
|
|
8007094: bd80 pop {r7, pc}
|
|
8007096: bf00 nop
|
|
8007098: 20008c0c .word 0x20008c0c
|
|
800709c: 20008c00 .word 0x20008c00
|
|
|
|
080070a0 <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)
|
|
{
|
|
80070a0: b580 push {r7, lr}
|
|
80070a2: b086 sub sp, #24
|
|
80070a4: af00 add r7, sp, #0
|
|
80070a6: 4603 mov r3, r0
|
|
80070a8: 71fb strb r3, [r7, #7]
|
|
struct tcp_pcb *pcb, *inactive;
|
|
u32_t inactivity;
|
|
|
|
LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK));
|
|
80070aa: 79fb ldrb r3, [r7, #7]
|
|
80070ac: 2b08 cmp r3, #8
|
|
80070ae: d009 beq.n 80070c4 <tcp_kill_state+0x24>
|
|
80070b0: 79fb ldrb r3, [r7, #7]
|
|
80070b2: 2b09 cmp r3, #9
|
|
80070b4: d006 beq.n 80070c4 <tcp_kill_state+0x24>
|
|
80070b6: 4b1a ldr r3, [pc, #104] ; (8007120 <tcp_kill_state+0x80>)
|
|
80070b8: f240 62dd movw r2, #1757 ; 0x6dd
|
|
80070bc: 4919 ldr r1, [pc, #100] ; (8007124 <tcp_kill_state+0x84>)
|
|
80070be: 481a ldr r0, [pc, #104] ; (8007128 <tcp_kill_state+0x88>)
|
|
80070c0: f009 fa1a bl 80104f8 <printf>
|
|
|
|
inactivity = 0;
|
|
80070c4: 2300 movs r3, #0
|
|
80070c6: 60fb str r3, [r7, #12]
|
|
inactive = NULL;
|
|
80070c8: 2300 movs r3, #0
|
|
80070ca: 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) {
|
|
80070cc: 4b17 ldr r3, [pc, #92] ; (800712c <tcp_kill_state+0x8c>)
|
|
80070ce: 681b ldr r3, [r3, #0]
|
|
80070d0: 617b str r3, [r7, #20]
|
|
80070d2: e017 b.n 8007104 <tcp_kill_state+0x64>
|
|
if (pcb->state == state) {
|
|
80070d4: 697b ldr r3, [r7, #20]
|
|
80070d6: 7d1b ldrb r3, [r3, #20]
|
|
80070d8: 79fa ldrb r2, [r7, #7]
|
|
80070da: 429a cmp r2, r3
|
|
80070dc: d10f bne.n 80070fe <tcp_kill_state+0x5e>
|
|
if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) {
|
|
80070de: 4b14 ldr r3, [pc, #80] ; (8007130 <tcp_kill_state+0x90>)
|
|
80070e0: 681a ldr r2, [r3, #0]
|
|
80070e2: 697b ldr r3, [r7, #20]
|
|
80070e4: 6a1b ldr r3, [r3, #32]
|
|
80070e6: 1ad3 subs r3, r2, r3
|
|
80070e8: 68fa ldr r2, [r7, #12]
|
|
80070ea: 429a cmp r2, r3
|
|
80070ec: d807 bhi.n 80070fe <tcp_kill_state+0x5e>
|
|
inactivity = tcp_ticks - pcb->tmr;
|
|
80070ee: 4b10 ldr r3, [pc, #64] ; (8007130 <tcp_kill_state+0x90>)
|
|
80070f0: 681a ldr r2, [r3, #0]
|
|
80070f2: 697b ldr r3, [r7, #20]
|
|
80070f4: 6a1b ldr r3, [r3, #32]
|
|
80070f6: 1ad3 subs r3, r2, r3
|
|
80070f8: 60fb str r3, [r7, #12]
|
|
inactive = pcb;
|
|
80070fa: 697b ldr r3, [r7, #20]
|
|
80070fc: 613b str r3, [r7, #16]
|
|
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
|
|
80070fe: 697b ldr r3, [r7, #20]
|
|
8007100: 68db ldr r3, [r3, #12]
|
|
8007102: 617b str r3, [r7, #20]
|
|
8007104: 697b ldr r3, [r7, #20]
|
|
8007106: 2b00 cmp r3, #0
|
|
8007108: d1e4 bne.n 80070d4 <tcp_kill_state+0x34>
|
|
}
|
|
}
|
|
}
|
|
if (inactive != NULL) {
|
|
800710a: 693b ldr r3, [r7, #16]
|
|
800710c: 2b00 cmp r3, #0
|
|
800710e: d003 beq.n 8007118 <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);
|
|
8007110: 2100 movs r1, #0
|
|
8007112: 6938 ldr r0, [r7, #16]
|
|
8007114: f7ff f952 bl 80063bc <tcp_abandon>
|
|
}
|
|
}
|
|
8007118: bf00 nop
|
|
800711a: 3718 adds r7, #24
|
|
800711c: 46bd mov sp, r7
|
|
800711e: bd80 pop {r7, pc}
|
|
8007120: 08015b1c .word 0x08015b1c
|
|
8007124: 080160a8 .word 0x080160a8
|
|
8007128: 08015b60 .word 0x08015b60
|
|
800712c: 20008c0c .word 0x20008c0c
|
|
8007130: 20008c00 .word 0x20008c00
|
|
|
|
08007134 <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)
|
|
{
|
|
8007134: b580 push {r7, lr}
|
|
8007136: b084 sub sp, #16
|
|
8007138: af00 add r7, sp, #0
|
|
struct tcp_pcb *pcb, *inactive;
|
|
u32_t inactivity;
|
|
|
|
inactivity = 0;
|
|
800713a: 2300 movs r3, #0
|
|
800713c: 607b str r3, [r7, #4]
|
|
inactive = NULL;
|
|
800713e: 2300 movs r3, #0
|
|
8007140: 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) {
|
|
8007142: 4b12 ldr r3, [pc, #72] ; (800718c <tcp_kill_timewait+0x58>)
|
|
8007144: 681b ldr r3, [r3, #0]
|
|
8007146: 60fb str r3, [r7, #12]
|
|
8007148: e012 b.n 8007170 <tcp_kill_timewait+0x3c>
|
|
if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) {
|
|
800714a: 4b11 ldr r3, [pc, #68] ; (8007190 <tcp_kill_timewait+0x5c>)
|
|
800714c: 681a ldr r2, [r3, #0]
|
|
800714e: 68fb ldr r3, [r7, #12]
|
|
8007150: 6a1b ldr r3, [r3, #32]
|
|
8007152: 1ad3 subs r3, r2, r3
|
|
8007154: 687a ldr r2, [r7, #4]
|
|
8007156: 429a cmp r2, r3
|
|
8007158: d807 bhi.n 800716a <tcp_kill_timewait+0x36>
|
|
inactivity = tcp_ticks - pcb->tmr;
|
|
800715a: 4b0d ldr r3, [pc, #52] ; (8007190 <tcp_kill_timewait+0x5c>)
|
|
800715c: 681a ldr r2, [r3, #0]
|
|
800715e: 68fb ldr r3, [r7, #12]
|
|
8007160: 6a1b ldr r3, [r3, #32]
|
|
8007162: 1ad3 subs r3, r2, r3
|
|
8007164: 607b str r3, [r7, #4]
|
|
inactive = pcb;
|
|
8007166: 68fb ldr r3, [r7, #12]
|
|
8007168: 60bb str r3, [r7, #8]
|
|
for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
|
|
800716a: 68fb ldr r3, [r7, #12]
|
|
800716c: 68db ldr r3, [r3, #12]
|
|
800716e: 60fb str r3, [r7, #12]
|
|
8007170: 68fb ldr r3, [r7, #12]
|
|
8007172: 2b00 cmp r3, #0
|
|
8007174: d1e9 bne.n 800714a <tcp_kill_timewait+0x16>
|
|
}
|
|
}
|
|
if (inactive != NULL) {
|
|
8007176: 68bb ldr r3, [r7, #8]
|
|
8007178: 2b00 cmp r3, #0
|
|
800717a: d002 beq.n 8007182 <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);
|
|
800717c: 68b8 ldr r0, [r7, #8]
|
|
800717e: f7ff f9db bl 8006538 <tcp_abort>
|
|
}
|
|
}
|
|
8007182: bf00 nop
|
|
8007184: 3710 adds r7, #16
|
|
8007186: 46bd mov sp, r7
|
|
8007188: bd80 pop {r7, pc}
|
|
800718a: bf00 nop
|
|
800718c: 20008c10 .word 0x20008c10
|
|
8007190: 20008c00 .word 0x20008c00
|
|
|
|
08007194 <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)
|
|
{
|
|
8007194: b580 push {r7, lr}
|
|
8007196: b082 sub sp, #8
|
|
8007198: af00 add r7, sp, #0
|
|
struct tcp_pcb *pcb = tcp_active_pcbs;
|
|
800719a: 4b10 ldr r3, [pc, #64] ; (80071dc <tcp_handle_closepend+0x48>)
|
|
800719c: 681b ldr r3, [r3, #0]
|
|
800719e: 607b str r3, [r7, #4]
|
|
|
|
while (pcb != NULL) {
|
|
80071a0: e014 b.n 80071cc <tcp_handle_closepend+0x38>
|
|
struct tcp_pcb *next = pcb->next;
|
|
80071a2: 687b ldr r3, [r7, #4]
|
|
80071a4: 68db ldr r3, [r3, #12]
|
|
80071a6: 603b str r3, [r7, #0]
|
|
/* send pending FIN */
|
|
if (pcb->flags & TF_CLOSEPEND) {
|
|
80071a8: 687b ldr r3, [r7, #4]
|
|
80071aa: 8b5b ldrh r3, [r3, #26]
|
|
80071ac: f003 0308 and.w r3, r3, #8
|
|
80071b0: 2b00 cmp r3, #0
|
|
80071b2: d009 beq.n 80071c8 <tcp_handle_closepend+0x34>
|
|
LWIP_DEBUGF(TCP_DEBUG, ("tcp_handle_closepend: pending FIN\n"));
|
|
tcp_clear_flags(pcb, TF_CLOSEPEND);
|
|
80071b4: 687b ldr r3, [r7, #4]
|
|
80071b6: 8b5b ldrh r3, [r3, #26]
|
|
80071b8: f023 0308 bic.w r3, r3, #8
|
|
80071bc: b29a uxth r2, r3
|
|
80071be: 687b ldr r3, [r7, #4]
|
|
80071c0: 835a strh r2, [r3, #26]
|
|
tcp_close_shutdown_fin(pcb);
|
|
80071c2: 6878 ldr r0, [r7, #4]
|
|
80071c4: f7ff f864 bl 8006290 <tcp_close_shutdown_fin>
|
|
}
|
|
pcb = next;
|
|
80071c8: 683b ldr r3, [r7, #0]
|
|
80071ca: 607b str r3, [r7, #4]
|
|
while (pcb != NULL) {
|
|
80071cc: 687b ldr r3, [r7, #4]
|
|
80071ce: 2b00 cmp r3, #0
|
|
80071d0: d1e7 bne.n 80071a2 <tcp_handle_closepend+0xe>
|
|
}
|
|
}
|
|
80071d2: bf00 nop
|
|
80071d4: bf00 nop
|
|
80071d6: 3708 adds r7, #8
|
|
80071d8: 46bd mov sp, r7
|
|
80071da: bd80 pop {r7, pc}
|
|
80071dc: 20008c0c .word 0x20008c0c
|
|
|
|
080071e0 <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)
|
|
{
|
|
80071e0: b580 push {r7, lr}
|
|
80071e2: b084 sub sp, #16
|
|
80071e4: af00 add r7, sp, #0
|
|
80071e6: 4603 mov r3, r0
|
|
80071e8: 71fb strb r3, [r7, #7]
|
|
struct tcp_pcb *pcb;
|
|
|
|
LWIP_ASSERT_CORE_LOCKED();
|
|
|
|
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
|
|
80071ea: 2001 movs r0, #1
|
|
80071ec: f7fd fd1a bl 8004c24 <memp_malloc>
|
|
80071f0: 60f8 str r0, [r7, #12]
|
|
if (pcb == NULL) {
|
|
80071f2: 68fb ldr r3, [r7, #12]
|
|
80071f4: 2b00 cmp r3, #0
|
|
80071f6: d126 bne.n 8007246 <tcp_alloc+0x66>
|
|
/* Try to send FIN for all pcbs stuck in TF_CLOSEPEND first */
|
|
tcp_handle_closepend();
|
|
80071f8: f7ff ffcc bl 8007194 <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();
|
|
80071fc: f7ff ff9a bl 8007134 <tcp_kill_timewait>
|
|
/* Try to allocate a tcp_pcb again. */
|
|
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
|
|
8007200: 2001 movs r0, #1
|
|
8007202: f7fd fd0f bl 8004c24 <memp_malloc>
|
|
8007206: 60f8 str r0, [r7, #12]
|
|
if (pcb == NULL) {
|
|
8007208: 68fb ldr r3, [r7, #12]
|
|
800720a: 2b00 cmp r3, #0
|
|
800720c: d11b bne.n 8007246 <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);
|
|
800720e: 2009 movs r0, #9
|
|
8007210: f7ff ff46 bl 80070a0 <tcp_kill_state>
|
|
/* Try to allocate a tcp_pcb again. */
|
|
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
|
|
8007214: 2001 movs r0, #1
|
|
8007216: f7fd fd05 bl 8004c24 <memp_malloc>
|
|
800721a: 60f8 str r0, [r7, #12]
|
|
if (pcb == NULL) {
|
|
800721c: 68fb ldr r3, [r7, #12]
|
|
800721e: 2b00 cmp r3, #0
|
|
8007220: d111 bne.n 8007246 <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);
|
|
8007222: 2008 movs r0, #8
|
|
8007224: f7ff ff3c bl 80070a0 <tcp_kill_state>
|
|
/* Try to allocate a tcp_pcb again. */
|
|
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
|
|
8007228: 2001 movs r0, #1
|
|
800722a: f7fd fcfb bl 8004c24 <memp_malloc>
|
|
800722e: 60f8 str r0, [r7, #12]
|
|
if (pcb == NULL) {
|
|
8007230: 68fb ldr r3, [r7, #12]
|
|
8007232: 2b00 cmp r3, #0
|
|
8007234: d107 bne.n 8007246 <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);
|
|
8007236: 79fb ldrb r3, [r7, #7]
|
|
8007238: 4618 mov r0, r3
|
|
800723a: f7ff fee3 bl 8007004 <tcp_kill_prio>
|
|
/* Try to allocate a tcp_pcb again. */
|
|
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
|
|
800723e: 2001 movs r0, #1
|
|
8007240: f7fd fcf0 bl 8004c24 <memp_malloc>
|
|
8007244: 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) {
|
|
8007246: 68fb ldr r3, [r7, #12]
|
|
8007248: 2b00 cmp r3, #0
|
|
800724a: d03f beq.n 80072cc <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));
|
|
800724c: 229c movs r2, #156 ; 0x9c
|
|
800724e: 2100 movs r1, #0
|
|
8007250: 68f8 ldr r0, [r7, #12]
|
|
8007252: f009 f949 bl 80104e8 <memset>
|
|
pcb->prio = prio;
|
|
8007256: 68fb ldr r3, [r7, #12]
|
|
8007258: 79fa ldrb r2, [r7, #7]
|
|
800725a: 755a strb r2, [r3, #21]
|
|
pcb->snd_buf = TCP_SND_BUF;
|
|
800725c: 68fb ldr r3, [r7, #12]
|
|
800725e: f44f 6286 mov.w r2, #1072 ; 0x430
|
|
8007262: 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);
|
|
8007266: 68fb ldr r3, [r7, #12]
|
|
8007268: f44f 6206 mov.w r2, #2144 ; 0x860
|
|
800726c: 855a strh r2, [r3, #42] ; 0x2a
|
|
800726e: 68fb ldr r3, [r7, #12]
|
|
8007270: 8d5a ldrh r2, [r3, #42] ; 0x2a
|
|
8007272: 68fb ldr r3, [r7, #12]
|
|
8007274: 851a strh r2, [r3, #40] ; 0x28
|
|
pcb->ttl = TCP_TTL;
|
|
8007276: 68fb ldr r3, [r7, #12]
|
|
8007278: 22ff movs r2, #255 ; 0xff
|
|
800727a: 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;
|
|
800727c: 68fb ldr r3, [r7, #12]
|
|
800727e: f44f 7206 mov.w r2, #536 ; 0x218
|
|
8007282: 865a strh r2, [r3, #50] ; 0x32
|
|
pcb->rto = 3000 / TCP_SLOW_INTERVAL;
|
|
8007284: 68fb ldr r3, [r7, #12]
|
|
8007286: 2206 movs r2, #6
|
|
8007288: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
|
|
pcb->sv = 3000 / TCP_SLOW_INTERVAL;
|
|
800728c: 68fb ldr r3, [r7, #12]
|
|
800728e: 2206 movs r2, #6
|
|
8007290: 87da strh r2, [r3, #62] ; 0x3e
|
|
pcb->rtime = -1;
|
|
8007292: 68fb ldr r3, [r7, #12]
|
|
8007294: f64f 72ff movw r2, #65535 ; 0xffff
|
|
8007298: 861a strh r2, [r3, #48] ; 0x30
|
|
pcb->cwnd = 1;
|
|
800729a: 68fb ldr r3, [r7, #12]
|
|
800729c: 2201 movs r2, #1
|
|
800729e: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
|
|
pcb->tmr = tcp_ticks;
|
|
80072a2: 4b0d ldr r3, [pc, #52] ; (80072d8 <tcp_alloc+0xf8>)
|
|
80072a4: 681a ldr r2, [r3, #0]
|
|
80072a6: 68fb ldr r3, [r7, #12]
|
|
80072a8: 621a str r2, [r3, #32]
|
|
pcb->last_timer = tcp_timer_ctr;
|
|
80072aa: 4b0c ldr r3, [pc, #48] ; (80072dc <tcp_alloc+0xfc>)
|
|
80072ac: 781a ldrb r2, [r3, #0]
|
|
80072ae: 68fb ldr r3, [r7, #12]
|
|
80072b0: 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;
|
|
80072b2: 68fb ldr r3, [r7, #12]
|
|
80072b4: f44f 6286 mov.w r2, #1072 ; 0x430
|
|
80072b8: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
|
|
|
|
#if LWIP_CALLBACK_API
|
|
pcb->recv = tcp_recv_null;
|
|
80072bc: 68fb ldr r3, [r7, #12]
|
|
80072be: 4a08 ldr r2, [pc, #32] ; (80072e0 <tcp_alloc+0x100>)
|
|
80072c0: f8c3 2084 str.w r2, [r3, #132] ; 0x84
|
|
#endif /* LWIP_CALLBACK_API */
|
|
|
|
/* Init KEEPALIVE timer */
|
|
pcb->keep_idle = TCP_KEEPIDLE_DEFAULT;
|
|
80072c4: 68fb ldr r3, [r7, #12]
|
|
80072c6: 4a07 ldr r2, [pc, #28] ; (80072e4 <tcp_alloc+0x104>)
|
|
80072c8: 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;
|
|
80072cc: 68fb ldr r3, [r7, #12]
|
|
}
|
|
80072ce: 4618 mov r0, r3
|
|
80072d0: 3710 adds r7, #16
|
|
80072d2: 46bd mov sp, r7
|
|
80072d4: bd80 pop {r7, pc}
|
|
80072d6: bf00 nop
|
|
80072d8: 20008c00 .word 0x20008c00
|
|
80072dc: 20008c16 .word 0x20008c16
|
|
80072e0: 08006f99 .word 0x08006f99
|
|
80072e4: 006ddd00 .word 0x006ddd00
|
|
|
|
080072e8 <tcp_pcb_purge>:
|
|
*
|
|
* @param pcb tcp_pcb to purge. The pcb itself is not deallocated!
|
|
*/
|
|
void
|
|
tcp_pcb_purge(struct tcp_pcb *pcb)
|
|
{
|
|
80072e8: b580 push {r7, lr}
|
|
80072ea: b082 sub sp, #8
|
|
80072ec: af00 add r7, sp, #0
|
|
80072ee: 6078 str r0, [r7, #4]
|
|
LWIP_ERROR("tcp_pcb_purge: invalid pcb", pcb != NULL, return);
|
|
80072f0: 687b ldr r3, [r7, #4]
|
|
80072f2: 2b00 cmp r3, #0
|
|
80072f4: d107 bne.n 8007306 <tcp_pcb_purge+0x1e>
|
|
80072f6: 4b21 ldr r3, [pc, #132] ; (800737c <tcp_pcb_purge+0x94>)
|
|
80072f8: f640 0251 movw r2, #2129 ; 0x851
|
|
80072fc: 4920 ldr r1, [pc, #128] ; (8007380 <tcp_pcb_purge+0x98>)
|
|
80072fe: 4821 ldr r0, [pc, #132] ; (8007384 <tcp_pcb_purge+0x9c>)
|
|
8007300: f009 f8fa bl 80104f8 <printf>
|
|
8007304: e037 b.n 8007376 <tcp_pcb_purge+0x8e>
|
|
|
|
if (pcb->state != CLOSED &&
|
|
8007306: 687b ldr r3, [r7, #4]
|
|
8007308: 7d1b ldrb r3, [r3, #20]
|
|
800730a: 2b00 cmp r3, #0
|
|
800730c: d033 beq.n 8007376 <tcp_pcb_purge+0x8e>
|
|
pcb->state != TIME_WAIT &&
|
|
800730e: 687b ldr r3, [r7, #4]
|
|
8007310: 7d1b ldrb r3, [r3, #20]
|
|
if (pcb->state != CLOSED &&
|
|
8007312: 2b0a cmp r3, #10
|
|
8007314: d02f beq.n 8007376 <tcp_pcb_purge+0x8e>
|
|
pcb->state != LISTEN) {
|
|
8007316: 687b ldr r3, [r7, #4]
|
|
8007318: 7d1b ldrb r3, [r3, #20]
|
|
pcb->state != TIME_WAIT &&
|
|
800731a: 2b01 cmp r3, #1
|
|
800731c: d02b beq.n 8007376 <tcp_pcb_purge+0x8e>
|
|
|
|
LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge\n"));
|
|
|
|
tcp_backlog_accepted(pcb);
|
|
|
|
if (pcb->refused_data != NULL) {
|
|
800731e: 687b ldr r3, [r7, #4]
|
|
8007320: 6f9b ldr r3, [r3, #120] ; 0x78
|
|
8007322: 2b00 cmp r3, #0
|
|
8007324: d007 beq.n 8007336 <tcp_pcb_purge+0x4e>
|
|
LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n"));
|
|
pbuf_free(pcb->refused_data);
|
|
8007326: 687b ldr r3, [r7, #4]
|
|
8007328: 6f9b ldr r3, [r3, #120] ; 0x78
|
|
800732a: 4618 mov r0, r3
|
|
800732c: f7fe fb6c bl 8005a08 <pbuf_free>
|
|
pcb->refused_data = NULL;
|
|
8007330: 687b ldr r3, [r7, #4]
|
|
8007332: 2200 movs r2, #0
|
|
8007334: 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) {
|
|
8007336: 687b ldr r3, [r7, #4]
|
|
8007338: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
800733a: 2b00 cmp r3, #0
|
|
800733c: d002 beq.n 8007344 <tcp_pcb_purge+0x5c>
|
|
LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->ooseq\n"));
|
|
tcp_free_ooseq(pcb);
|
|
800733e: 6878 ldr r0, [r7, #4]
|
|
8007340: f000 f986 bl 8007650 <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;
|
|
8007344: 687b ldr r3, [r7, #4]
|
|
8007346: f64f 72ff movw r2, #65535 ; 0xffff
|
|
800734a: 861a strh r2, [r3, #48] ; 0x30
|
|
|
|
tcp_segs_free(pcb->unsent);
|
|
800734c: 687b ldr r3, [r7, #4]
|
|
800734e: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
8007350: 4618 mov r0, r3
|
|
8007352: f7ff fdc7 bl 8006ee4 <tcp_segs_free>
|
|
tcp_segs_free(pcb->unacked);
|
|
8007356: 687b ldr r3, [r7, #4]
|
|
8007358: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
800735a: 4618 mov r0, r3
|
|
800735c: f7ff fdc2 bl 8006ee4 <tcp_segs_free>
|
|
pcb->unacked = pcb->unsent = NULL;
|
|
8007360: 687b ldr r3, [r7, #4]
|
|
8007362: 2200 movs r2, #0
|
|
8007364: 66da str r2, [r3, #108] ; 0x6c
|
|
8007366: 687b ldr r3, [r7, #4]
|
|
8007368: 6eda ldr r2, [r3, #108] ; 0x6c
|
|
800736a: 687b ldr r3, [r7, #4]
|
|
800736c: 671a str r2, [r3, #112] ; 0x70
|
|
#if TCP_OVERSIZE
|
|
pcb->unsent_oversize = 0;
|
|
800736e: 687b ldr r3, [r7, #4]
|
|
8007370: 2200 movs r2, #0
|
|
8007372: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
|
|
#endif /* TCP_OVERSIZE */
|
|
}
|
|
}
|
|
8007376: 3708 adds r7, #8
|
|
8007378: 46bd mov sp, r7
|
|
800737a: bd80 pop {r7, pc}
|
|
800737c: 08015b1c .word 0x08015b1c
|
|
8007380: 08016168 .word 0x08016168
|
|
8007384: 08015b60 .word 0x08015b60
|
|
|
|
08007388 <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)
|
|
{
|
|
8007388: b580 push {r7, lr}
|
|
800738a: b084 sub sp, #16
|
|
800738c: af00 add r7, sp, #0
|
|
800738e: 6078 str r0, [r7, #4]
|
|
8007390: 6039 str r1, [r7, #0]
|
|
LWIP_ASSERT("tcp_pcb_remove: invalid pcb", pcb != NULL);
|
|
8007392: 683b ldr r3, [r7, #0]
|
|
8007394: 2b00 cmp r3, #0
|
|
8007396: d106 bne.n 80073a6 <tcp_pcb_remove+0x1e>
|
|
8007398: 4b3e ldr r3, [pc, #248] ; (8007494 <tcp_pcb_remove+0x10c>)
|
|
800739a: f640 0283 movw r2, #2179 ; 0x883
|
|
800739e: 493e ldr r1, [pc, #248] ; (8007498 <tcp_pcb_remove+0x110>)
|
|
80073a0: 483e ldr r0, [pc, #248] ; (800749c <tcp_pcb_remove+0x114>)
|
|
80073a2: f009 f8a9 bl 80104f8 <printf>
|
|
LWIP_ASSERT("tcp_pcb_remove: invalid pcblist", pcblist != NULL);
|
|
80073a6: 687b ldr r3, [r7, #4]
|
|
80073a8: 2b00 cmp r3, #0
|
|
80073aa: d106 bne.n 80073ba <tcp_pcb_remove+0x32>
|
|
80073ac: 4b39 ldr r3, [pc, #228] ; (8007494 <tcp_pcb_remove+0x10c>)
|
|
80073ae: f640 0284 movw r2, #2180 ; 0x884
|
|
80073b2: 493b ldr r1, [pc, #236] ; (80074a0 <tcp_pcb_remove+0x118>)
|
|
80073b4: 4839 ldr r0, [pc, #228] ; (800749c <tcp_pcb_remove+0x114>)
|
|
80073b6: f009 f89f bl 80104f8 <printf>
|
|
|
|
TCP_RMV(pcblist, pcb);
|
|
80073ba: 687b ldr r3, [r7, #4]
|
|
80073bc: 681b ldr r3, [r3, #0]
|
|
80073be: 683a ldr r2, [r7, #0]
|
|
80073c0: 429a cmp r2, r3
|
|
80073c2: d105 bne.n 80073d0 <tcp_pcb_remove+0x48>
|
|
80073c4: 687b ldr r3, [r7, #4]
|
|
80073c6: 681b ldr r3, [r3, #0]
|
|
80073c8: 68da ldr r2, [r3, #12]
|
|
80073ca: 687b ldr r3, [r7, #4]
|
|
80073cc: 601a str r2, [r3, #0]
|
|
80073ce: e013 b.n 80073f8 <tcp_pcb_remove+0x70>
|
|
80073d0: 687b ldr r3, [r7, #4]
|
|
80073d2: 681b ldr r3, [r3, #0]
|
|
80073d4: 60fb str r3, [r7, #12]
|
|
80073d6: e00c b.n 80073f2 <tcp_pcb_remove+0x6a>
|
|
80073d8: 68fb ldr r3, [r7, #12]
|
|
80073da: 68db ldr r3, [r3, #12]
|
|
80073dc: 683a ldr r2, [r7, #0]
|
|
80073de: 429a cmp r2, r3
|
|
80073e0: d104 bne.n 80073ec <tcp_pcb_remove+0x64>
|
|
80073e2: 683b ldr r3, [r7, #0]
|
|
80073e4: 68da ldr r2, [r3, #12]
|
|
80073e6: 68fb ldr r3, [r7, #12]
|
|
80073e8: 60da str r2, [r3, #12]
|
|
80073ea: e005 b.n 80073f8 <tcp_pcb_remove+0x70>
|
|
80073ec: 68fb ldr r3, [r7, #12]
|
|
80073ee: 68db ldr r3, [r3, #12]
|
|
80073f0: 60fb str r3, [r7, #12]
|
|
80073f2: 68fb ldr r3, [r7, #12]
|
|
80073f4: 2b00 cmp r3, #0
|
|
80073f6: d1ef bne.n 80073d8 <tcp_pcb_remove+0x50>
|
|
80073f8: 683b ldr r3, [r7, #0]
|
|
80073fa: 2200 movs r2, #0
|
|
80073fc: 60da str r2, [r3, #12]
|
|
|
|
tcp_pcb_purge(pcb);
|
|
80073fe: 6838 ldr r0, [r7, #0]
|
|
8007400: f7ff ff72 bl 80072e8 <tcp_pcb_purge>
|
|
|
|
/* if there is an outstanding delayed ACKs, send it */
|
|
if ((pcb->state != TIME_WAIT) &&
|
|
8007404: 683b ldr r3, [r7, #0]
|
|
8007406: 7d1b ldrb r3, [r3, #20]
|
|
8007408: 2b0a cmp r3, #10
|
|
800740a: d013 beq.n 8007434 <tcp_pcb_remove+0xac>
|
|
(pcb->state != LISTEN) &&
|
|
800740c: 683b ldr r3, [r7, #0]
|
|
800740e: 7d1b ldrb r3, [r3, #20]
|
|
if ((pcb->state != TIME_WAIT) &&
|
|
8007410: 2b01 cmp r3, #1
|
|
8007412: d00f beq.n 8007434 <tcp_pcb_remove+0xac>
|
|
(pcb->flags & TF_ACK_DELAY)) {
|
|
8007414: 683b ldr r3, [r7, #0]
|
|
8007416: 8b5b ldrh r3, [r3, #26]
|
|
8007418: f003 0301 and.w r3, r3, #1
|
|
(pcb->state != LISTEN) &&
|
|
800741c: 2b00 cmp r3, #0
|
|
800741e: d009 beq.n 8007434 <tcp_pcb_remove+0xac>
|
|
tcp_ack_now(pcb);
|
|
8007420: 683b ldr r3, [r7, #0]
|
|
8007422: 8b5b ldrh r3, [r3, #26]
|
|
8007424: f043 0302 orr.w r3, r3, #2
|
|
8007428: b29a uxth r2, r3
|
|
800742a: 683b ldr r3, [r7, #0]
|
|
800742c: 835a strh r2, [r3, #26]
|
|
tcp_output(pcb);
|
|
800742e: 6838 ldr r0, [r7, #0]
|
|
8007430: f002 ff6e bl 800a310 <tcp_output>
|
|
}
|
|
|
|
if (pcb->state != LISTEN) {
|
|
8007434: 683b ldr r3, [r7, #0]
|
|
8007436: 7d1b ldrb r3, [r3, #20]
|
|
8007438: 2b01 cmp r3, #1
|
|
800743a: d020 beq.n 800747e <tcp_pcb_remove+0xf6>
|
|
LWIP_ASSERT("unsent segments leaking", pcb->unsent == NULL);
|
|
800743c: 683b ldr r3, [r7, #0]
|
|
800743e: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
8007440: 2b00 cmp r3, #0
|
|
8007442: d006 beq.n 8007452 <tcp_pcb_remove+0xca>
|
|
8007444: 4b13 ldr r3, [pc, #76] ; (8007494 <tcp_pcb_remove+0x10c>)
|
|
8007446: f640 0293 movw r2, #2195 ; 0x893
|
|
800744a: 4916 ldr r1, [pc, #88] ; (80074a4 <tcp_pcb_remove+0x11c>)
|
|
800744c: 4813 ldr r0, [pc, #76] ; (800749c <tcp_pcb_remove+0x114>)
|
|
800744e: f009 f853 bl 80104f8 <printf>
|
|
LWIP_ASSERT("unacked segments leaking", pcb->unacked == NULL);
|
|
8007452: 683b ldr r3, [r7, #0]
|
|
8007454: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
8007456: 2b00 cmp r3, #0
|
|
8007458: d006 beq.n 8007468 <tcp_pcb_remove+0xe0>
|
|
800745a: 4b0e ldr r3, [pc, #56] ; (8007494 <tcp_pcb_remove+0x10c>)
|
|
800745c: f640 0294 movw r2, #2196 ; 0x894
|
|
8007460: 4911 ldr r1, [pc, #68] ; (80074a8 <tcp_pcb_remove+0x120>)
|
|
8007462: 480e ldr r0, [pc, #56] ; (800749c <tcp_pcb_remove+0x114>)
|
|
8007464: f009 f848 bl 80104f8 <printf>
|
|
#if TCP_QUEUE_OOSEQ
|
|
LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL);
|
|
8007468: 683b ldr r3, [r7, #0]
|
|
800746a: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
800746c: 2b00 cmp r3, #0
|
|
800746e: d006 beq.n 800747e <tcp_pcb_remove+0xf6>
|
|
8007470: 4b08 ldr r3, [pc, #32] ; (8007494 <tcp_pcb_remove+0x10c>)
|
|
8007472: f640 0296 movw r2, #2198 ; 0x896
|
|
8007476: 490d ldr r1, [pc, #52] ; (80074ac <tcp_pcb_remove+0x124>)
|
|
8007478: 4808 ldr r0, [pc, #32] ; (800749c <tcp_pcb_remove+0x114>)
|
|
800747a: f009 f83d bl 80104f8 <printf>
|
|
#endif /* TCP_QUEUE_OOSEQ */
|
|
}
|
|
|
|
pcb->state = CLOSED;
|
|
800747e: 683b ldr r3, [r7, #0]
|
|
8007480: 2200 movs r2, #0
|
|
8007482: 751a strb r2, [r3, #20]
|
|
/* reset the local port to prevent the pcb from being 'bound' */
|
|
pcb->local_port = 0;
|
|
8007484: 683b ldr r3, [r7, #0]
|
|
8007486: 2200 movs r2, #0
|
|
8007488: 82da strh r2, [r3, #22]
|
|
|
|
LWIP_ASSERT("tcp_pcb_remove: tcp_pcbs_sane()", tcp_pcbs_sane());
|
|
}
|
|
800748a: bf00 nop
|
|
800748c: 3710 adds r7, #16
|
|
800748e: 46bd mov sp, r7
|
|
8007490: bd80 pop {r7, pc}
|
|
8007492: bf00 nop
|
|
8007494: 08015b1c .word 0x08015b1c
|
|
8007498: 08016184 .word 0x08016184
|
|
800749c: 08015b60 .word 0x08015b60
|
|
80074a0: 080161a0 .word 0x080161a0
|
|
80074a4: 080161c0 .word 0x080161c0
|
|
80074a8: 080161d8 .word 0x080161d8
|
|
80074ac: 080161f4 .word 0x080161f4
|
|
|
|
080074b0 <tcp_next_iss>:
|
|
*
|
|
* @return u32_t pseudo random sequence number
|
|
*/
|
|
u32_t
|
|
tcp_next_iss(struct tcp_pcb *pcb)
|
|
{
|
|
80074b0: b580 push {r7, lr}
|
|
80074b2: b082 sub sp, #8
|
|
80074b4: af00 add r7, sp, #0
|
|
80074b6: 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);
|
|
80074b8: 687b ldr r3, [r7, #4]
|
|
80074ba: 2b00 cmp r3, #0
|
|
80074bc: d106 bne.n 80074cc <tcp_next_iss+0x1c>
|
|
80074be: 4b0a ldr r3, [pc, #40] ; (80074e8 <tcp_next_iss+0x38>)
|
|
80074c0: f640 02af movw r2, #2223 ; 0x8af
|
|
80074c4: 4909 ldr r1, [pc, #36] ; (80074ec <tcp_next_iss+0x3c>)
|
|
80074c6: 480a ldr r0, [pc, #40] ; (80074f0 <tcp_next_iss+0x40>)
|
|
80074c8: f009 f816 bl 80104f8 <printf>
|
|
LWIP_UNUSED_ARG(pcb);
|
|
|
|
iss += tcp_ticks; /* XXX */
|
|
80074cc: 4b09 ldr r3, [pc, #36] ; (80074f4 <tcp_next_iss+0x44>)
|
|
80074ce: 681a ldr r2, [r3, #0]
|
|
80074d0: 4b09 ldr r3, [pc, #36] ; (80074f8 <tcp_next_iss+0x48>)
|
|
80074d2: 681b ldr r3, [r3, #0]
|
|
80074d4: 4413 add r3, r2
|
|
80074d6: 4a07 ldr r2, [pc, #28] ; (80074f4 <tcp_next_iss+0x44>)
|
|
80074d8: 6013 str r3, [r2, #0]
|
|
return iss;
|
|
80074da: 4b06 ldr r3, [pc, #24] ; (80074f4 <tcp_next_iss+0x44>)
|
|
80074dc: 681b ldr r3, [r3, #0]
|
|
#endif /* LWIP_HOOK_TCP_ISN */
|
|
}
|
|
80074de: 4618 mov r0, r3
|
|
80074e0: 3708 adds r7, #8
|
|
80074e2: 46bd mov sp, r7
|
|
80074e4: bd80 pop {r7, pc}
|
|
80074e6: bf00 nop
|
|
80074e8: 08015b1c .word 0x08015b1c
|
|
80074ec: 0801620c .word 0x0801620c
|
|
80074f0: 08015b60 .word 0x08015b60
|
|
80074f4: 20000024 .word 0x20000024
|
|
80074f8: 20008c00 .word 0x20008c00
|
|
|
|
080074fc <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)
|
|
{
|
|
80074fc: b580 push {r7, lr}
|
|
80074fe: b086 sub sp, #24
|
|
8007500: af00 add r7, sp, #0
|
|
8007502: 4603 mov r3, r0
|
|
8007504: 60b9 str r1, [r7, #8]
|
|
8007506: 607a str r2, [r7, #4]
|
|
8007508: 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);
|
|
800750a: 687b ldr r3, [r7, #4]
|
|
800750c: 2b00 cmp r3, #0
|
|
800750e: d106 bne.n 800751e <tcp_eff_send_mss_netif+0x22>
|
|
8007510: 4b14 ldr r3, [pc, #80] ; (8007564 <tcp_eff_send_mss_netif+0x68>)
|
|
8007512: f640 02c5 movw r2, #2245 ; 0x8c5
|
|
8007516: 4914 ldr r1, [pc, #80] ; (8007568 <tcp_eff_send_mss_netif+0x6c>)
|
|
8007518: 4814 ldr r0, [pc, #80] ; (800756c <tcp_eff_send_mss_netif+0x70>)
|
|
800751a: f008 ffed bl 80104f8 <printf>
|
|
else
|
|
#endif /* LWIP_IPV4 */
|
|
#endif /* LWIP_IPV6 */
|
|
#if LWIP_IPV4
|
|
{
|
|
if (outif == NULL) {
|
|
800751e: 68bb ldr r3, [r7, #8]
|
|
8007520: 2b00 cmp r3, #0
|
|
8007522: d101 bne.n 8007528 <tcp_eff_send_mss_netif+0x2c>
|
|
return sendmss;
|
|
8007524: 89fb ldrh r3, [r7, #14]
|
|
8007526: e019 b.n 800755c <tcp_eff_send_mss_netif+0x60>
|
|
}
|
|
mtu = outif->mtu;
|
|
8007528: 68bb ldr r3, [r7, #8]
|
|
800752a: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
800752c: 82fb strh r3, [r7, #22]
|
|
}
|
|
#endif /* LWIP_IPV4 */
|
|
|
|
if (mtu != 0) {
|
|
800752e: 8afb ldrh r3, [r7, #22]
|
|
8007530: 2b00 cmp r3, #0
|
|
8007532: d012 beq.n 800755a <tcp_eff_send_mss_netif+0x5e>
|
|
else
|
|
#endif /* LWIP_IPV4 */
|
|
#endif /* LWIP_IPV6 */
|
|
#if LWIP_IPV4
|
|
{
|
|
offset = IP_HLEN + TCP_HLEN;
|
|
8007534: 2328 movs r3, #40 ; 0x28
|
|
8007536: 82bb strh r3, [r7, #20]
|
|
}
|
|
#endif /* LWIP_IPV4 */
|
|
mss_s = (mtu > offset) ? (u16_t)(mtu - offset) : 0;
|
|
8007538: 8afa ldrh r2, [r7, #22]
|
|
800753a: 8abb ldrh r3, [r7, #20]
|
|
800753c: 429a cmp r2, r3
|
|
800753e: d904 bls.n 800754a <tcp_eff_send_mss_netif+0x4e>
|
|
8007540: 8afa ldrh r2, [r7, #22]
|
|
8007542: 8abb ldrh r3, [r7, #20]
|
|
8007544: 1ad3 subs r3, r2, r3
|
|
8007546: b29b uxth r3, r3
|
|
8007548: e000 b.n 800754c <tcp_eff_send_mss_netif+0x50>
|
|
800754a: 2300 movs r3, #0
|
|
800754c: 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);
|
|
800754e: 8a7a ldrh r2, [r7, #18]
|
|
8007550: 89fb ldrh r3, [r7, #14]
|
|
8007552: 4293 cmp r3, r2
|
|
8007554: bf28 it cs
|
|
8007556: 4613 movcs r3, r2
|
|
8007558: 81fb strh r3, [r7, #14]
|
|
}
|
|
return sendmss;
|
|
800755a: 89fb ldrh r3, [r7, #14]
|
|
}
|
|
800755c: 4618 mov r0, r3
|
|
800755e: 3718 adds r7, #24
|
|
8007560: 46bd mov sp, r7
|
|
8007562: bd80 pop {r7, pc}
|
|
8007564: 08015b1c .word 0x08015b1c
|
|
8007568: 08016228 .word 0x08016228
|
|
800756c: 08015b60 .word 0x08015b60
|
|
|
|
08007570 <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)
|
|
{
|
|
8007570: b580 push {r7, lr}
|
|
8007572: b084 sub sp, #16
|
|
8007574: af00 add r7, sp, #0
|
|
8007576: 6078 str r0, [r7, #4]
|
|
8007578: 6039 str r1, [r7, #0]
|
|
struct tcp_pcb *pcb;
|
|
pcb = pcb_list;
|
|
800757a: 683b ldr r3, [r7, #0]
|
|
800757c: 60fb str r3, [r7, #12]
|
|
|
|
LWIP_ASSERT("tcp_netif_ip_addr_changed_pcblist: invalid old_addr", old_addr != NULL);
|
|
800757e: 687b ldr r3, [r7, #4]
|
|
8007580: 2b00 cmp r3, #0
|
|
8007582: d119 bne.n 80075b8 <tcp_netif_ip_addr_changed_pcblist+0x48>
|
|
8007584: 4b10 ldr r3, [pc, #64] ; (80075c8 <tcp_netif_ip_addr_changed_pcblist+0x58>)
|
|
8007586: f44f 6210 mov.w r2, #2304 ; 0x900
|
|
800758a: 4910 ldr r1, [pc, #64] ; (80075cc <tcp_netif_ip_addr_changed_pcblist+0x5c>)
|
|
800758c: 4810 ldr r0, [pc, #64] ; (80075d0 <tcp_netif_ip_addr_changed_pcblist+0x60>)
|
|
800758e: f008 ffb3 bl 80104f8 <printf>
|
|
|
|
while (pcb != NULL) {
|
|
8007592: e011 b.n 80075b8 <tcp_netif_ip_addr_changed_pcblist+0x48>
|
|
/* PCB bound to current local interface address? */
|
|
if (ip_addr_cmp(&pcb->local_ip, old_addr)
|
|
8007594: 68fb ldr r3, [r7, #12]
|
|
8007596: 681a ldr r2, [r3, #0]
|
|
8007598: 687b ldr r3, [r7, #4]
|
|
800759a: 681b ldr r3, [r3, #0]
|
|
800759c: 429a cmp r2, r3
|
|
800759e: d108 bne.n 80075b2 <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;
|
|
80075a0: 68fb ldr r3, [r7, #12]
|
|
80075a2: 68db ldr r3, [r3, #12]
|
|
80075a4: 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);
|
|
80075a6: 68f8 ldr r0, [r7, #12]
|
|
80075a8: f7fe ffc6 bl 8006538 <tcp_abort>
|
|
pcb = next;
|
|
80075ac: 68bb ldr r3, [r7, #8]
|
|
80075ae: 60fb str r3, [r7, #12]
|
|
80075b0: e002 b.n 80075b8 <tcp_netif_ip_addr_changed_pcblist+0x48>
|
|
} else {
|
|
pcb = pcb->next;
|
|
80075b2: 68fb ldr r3, [r7, #12]
|
|
80075b4: 68db ldr r3, [r3, #12]
|
|
80075b6: 60fb str r3, [r7, #12]
|
|
while (pcb != NULL) {
|
|
80075b8: 68fb ldr r3, [r7, #12]
|
|
80075ba: 2b00 cmp r3, #0
|
|
80075bc: d1ea bne.n 8007594 <tcp_netif_ip_addr_changed_pcblist+0x24>
|
|
}
|
|
}
|
|
}
|
|
80075be: bf00 nop
|
|
80075c0: bf00 nop
|
|
80075c2: 3710 adds r7, #16
|
|
80075c4: 46bd mov sp, r7
|
|
80075c6: bd80 pop {r7, pc}
|
|
80075c8: 08015b1c .word 0x08015b1c
|
|
80075cc: 08016250 .word 0x08016250
|
|
80075d0: 08015b60 .word 0x08015b60
|
|
|
|
080075d4 <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)
|
|
{
|
|
80075d4: b580 push {r7, lr}
|
|
80075d6: b084 sub sp, #16
|
|
80075d8: af00 add r7, sp, #0
|
|
80075da: 6078 str r0, [r7, #4]
|
|
80075dc: 6039 str r1, [r7, #0]
|
|
struct tcp_pcb_listen *lpcb;
|
|
|
|
if (!ip_addr_isany(old_addr)) {
|
|
80075de: 687b ldr r3, [r7, #4]
|
|
80075e0: 2b00 cmp r3, #0
|
|
80075e2: d02a beq.n 800763a <tcp_netif_ip_addr_changed+0x66>
|
|
80075e4: 687b ldr r3, [r7, #4]
|
|
80075e6: 681b ldr r3, [r3, #0]
|
|
80075e8: 2b00 cmp r3, #0
|
|
80075ea: d026 beq.n 800763a <tcp_netif_ip_addr_changed+0x66>
|
|
tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs);
|
|
80075ec: 4b15 ldr r3, [pc, #84] ; (8007644 <tcp_netif_ip_addr_changed+0x70>)
|
|
80075ee: 681b ldr r3, [r3, #0]
|
|
80075f0: 4619 mov r1, r3
|
|
80075f2: 6878 ldr r0, [r7, #4]
|
|
80075f4: f7ff ffbc bl 8007570 <tcp_netif_ip_addr_changed_pcblist>
|
|
tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_bound_pcbs);
|
|
80075f8: 4b13 ldr r3, [pc, #76] ; (8007648 <tcp_netif_ip_addr_changed+0x74>)
|
|
80075fa: 681b ldr r3, [r3, #0]
|
|
80075fc: 4619 mov r1, r3
|
|
80075fe: 6878 ldr r0, [r7, #4]
|
|
8007600: f7ff ffb6 bl 8007570 <tcp_netif_ip_addr_changed_pcblist>
|
|
|
|
if (!ip_addr_isany(new_addr)) {
|
|
8007604: 683b ldr r3, [r7, #0]
|
|
8007606: 2b00 cmp r3, #0
|
|
8007608: d017 beq.n 800763a <tcp_netif_ip_addr_changed+0x66>
|
|
800760a: 683b ldr r3, [r7, #0]
|
|
800760c: 681b ldr r3, [r3, #0]
|
|
800760e: 2b00 cmp r3, #0
|
|
8007610: d013 beq.n 800763a <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) {
|
|
8007612: 4b0e ldr r3, [pc, #56] ; (800764c <tcp_netif_ip_addr_changed+0x78>)
|
|
8007614: 681b ldr r3, [r3, #0]
|
|
8007616: 60fb str r3, [r7, #12]
|
|
8007618: e00c b.n 8007634 <tcp_netif_ip_addr_changed+0x60>
|
|
/* PCB bound to current local interface address? */
|
|
if (ip_addr_cmp(&lpcb->local_ip, old_addr)) {
|
|
800761a: 68fb ldr r3, [r7, #12]
|
|
800761c: 681a ldr r2, [r3, #0]
|
|
800761e: 687b ldr r3, [r7, #4]
|
|
8007620: 681b ldr r3, [r3, #0]
|
|
8007622: 429a cmp r2, r3
|
|
8007624: d103 bne.n 800762e <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);
|
|
8007626: 683b ldr r3, [r7, #0]
|
|
8007628: 681a ldr r2, [r3, #0]
|
|
800762a: 68fb ldr r3, [r7, #12]
|
|
800762c: 601a str r2, [r3, #0]
|
|
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
|
|
800762e: 68fb ldr r3, [r7, #12]
|
|
8007630: 68db ldr r3, [r3, #12]
|
|
8007632: 60fb str r3, [r7, #12]
|
|
8007634: 68fb ldr r3, [r7, #12]
|
|
8007636: 2b00 cmp r3, #0
|
|
8007638: d1ef bne.n 800761a <tcp_netif_ip_addr_changed+0x46>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
800763a: bf00 nop
|
|
800763c: 3710 adds r7, #16
|
|
800763e: 46bd mov sp, r7
|
|
8007640: bd80 pop {r7, pc}
|
|
8007642: bf00 nop
|
|
8007644: 20008c0c .word 0x20008c0c
|
|
8007648: 20008c04 .word 0x20008c04
|
|
800764c: 20008c08 .word 0x20008c08
|
|
|
|
08007650 <tcp_free_ooseq>:
|
|
|
|
#if TCP_QUEUE_OOSEQ
|
|
/* Free all ooseq pbufs (and possibly reset SACK state) */
|
|
void
|
|
tcp_free_ooseq(struct tcp_pcb *pcb)
|
|
{
|
|
8007650: b580 push {r7, lr}
|
|
8007652: b082 sub sp, #8
|
|
8007654: af00 add r7, sp, #0
|
|
8007656: 6078 str r0, [r7, #4]
|
|
if (pcb->ooseq) {
|
|
8007658: 687b ldr r3, [r7, #4]
|
|
800765a: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
800765c: 2b00 cmp r3, #0
|
|
800765e: d007 beq.n 8007670 <tcp_free_ooseq+0x20>
|
|
tcp_segs_free(pcb->ooseq);
|
|
8007660: 687b ldr r3, [r7, #4]
|
|
8007662: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
8007664: 4618 mov r0, r3
|
|
8007666: f7ff fc3d bl 8006ee4 <tcp_segs_free>
|
|
pcb->ooseq = NULL;
|
|
800766a: 687b ldr r3, [r7, #4]
|
|
800766c: 2200 movs r2, #0
|
|
800766e: 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 */
|
|
}
|
|
}
|
|
8007670: bf00 nop
|
|
8007672: 3708 adds r7, #8
|
|
8007674: 46bd mov sp, r7
|
|
8007676: bd80 pop {r7, pc}
|
|
|
|
08007678 <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)
|
|
{
|
|
8007678: b590 push {r4, r7, lr}
|
|
800767a: b08d sub sp, #52 ; 0x34
|
|
800767c: af04 add r7, sp, #16
|
|
800767e: 6078 str r0, [r7, #4]
|
|
8007680: 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);
|
|
8007682: 687b ldr r3, [r7, #4]
|
|
8007684: 2b00 cmp r3, #0
|
|
8007686: d105 bne.n 8007694 <tcp_input+0x1c>
|
|
8007688: 4b9b ldr r3, [pc, #620] ; (80078f8 <tcp_input+0x280>)
|
|
800768a: 2283 movs r2, #131 ; 0x83
|
|
800768c: 499b ldr r1, [pc, #620] ; (80078fc <tcp_input+0x284>)
|
|
800768e: 489c ldr r0, [pc, #624] ; (8007900 <tcp_input+0x288>)
|
|
8007690: f008 ff32 bl 80104f8 <printf>
|
|
PERF_START;
|
|
|
|
TCP_STATS_INC(tcp.recv);
|
|
MIB2_STATS_INC(mib2.tcpinsegs);
|
|
|
|
tcphdr = (struct tcp_hdr *)p->payload;
|
|
8007694: 687b ldr r3, [r7, #4]
|
|
8007696: 685b ldr r3, [r3, #4]
|
|
8007698: 4a9a ldr r2, [pc, #616] ; (8007904 <tcp_input+0x28c>)
|
|
800769a: 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) {
|
|
800769c: 687b ldr r3, [r7, #4]
|
|
800769e: 895b ldrh r3, [r3, #10]
|
|
80076a0: 2b13 cmp r3, #19
|
|
80076a2: f240 83d1 bls.w 8007e48 <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()) ||
|
|
80076a6: 4b98 ldr r3, [pc, #608] ; (8007908 <tcp_input+0x290>)
|
|
80076a8: 695b ldr r3, [r3, #20]
|
|
80076aa: 4a97 ldr r2, [pc, #604] ; (8007908 <tcp_input+0x290>)
|
|
80076ac: 6812 ldr r2, [r2, #0]
|
|
80076ae: 4611 mov r1, r2
|
|
80076b0: 4618 mov r0, r3
|
|
80076b2: f007 fe29 bl 800f308 <ip4_addr_isbroadcast_u32>
|
|
80076b6: 4603 mov r3, r0
|
|
80076b8: 2b00 cmp r3, #0
|
|
80076ba: f040 83c7 bne.w 8007e4c <tcp_input+0x7d4>
|
|
ip_addr_ismulticast(ip_current_dest_addr())) {
|
|
80076be: 4b92 ldr r3, [pc, #584] ; (8007908 <tcp_input+0x290>)
|
|
80076c0: 695b ldr r3, [r3, #20]
|
|
80076c2: f003 03f0 and.w r3, r3, #240 ; 0xf0
|
|
if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) ||
|
|
80076c6: 2be0 cmp r3, #224 ; 0xe0
|
|
80076c8: f000 83c0 beq.w 8007e4c <tcp_input+0x7d4>
|
|
}
|
|
}
|
|
#endif /* CHECKSUM_CHECK_TCP */
|
|
|
|
/* sanity-check header length */
|
|
hdrlen_bytes = TCPH_HDRLEN_BYTES(tcphdr);
|
|
80076cc: 4b8d ldr r3, [pc, #564] ; (8007904 <tcp_input+0x28c>)
|
|
80076ce: 681b ldr r3, [r3, #0]
|
|
80076d0: 899b ldrh r3, [r3, #12]
|
|
80076d2: b29b uxth r3, r3
|
|
80076d4: 4618 mov r0, r3
|
|
80076d6: f7fc fe2d bl 8004334 <lwip_htons>
|
|
80076da: 4603 mov r3, r0
|
|
80076dc: 0b1b lsrs r3, r3, #12
|
|
80076de: b29b uxth r3, r3
|
|
80076e0: b2db uxtb r3, r3
|
|
80076e2: 009b lsls r3, r3, #2
|
|
80076e4: 74bb strb r3, [r7, #18]
|
|
if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) {
|
|
80076e6: 7cbb ldrb r3, [r7, #18]
|
|
80076e8: 2b13 cmp r3, #19
|
|
80076ea: f240 83b1 bls.w 8007e50 <tcp_input+0x7d8>
|
|
80076ee: 7cbb ldrb r3, [r7, #18]
|
|
80076f0: b29a uxth r2, r3
|
|
80076f2: 687b ldr r3, [r7, #4]
|
|
80076f4: 891b ldrh r3, [r3, #8]
|
|
80076f6: 429a cmp r2, r3
|
|
80076f8: f200 83aa bhi.w 8007e50 <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);
|
|
80076fc: 7cbb ldrb r3, [r7, #18]
|
|
80076fe: b29b uxth r3, r3
|
|
8007700: 3b14 subs r3, #20
|
|
8007702: b29a uxth r2, r3
|
|
8007704: 4b81 ldr r3, [pc, #516] ; (800790c <tcp_input+0x294>)
|
|
8007706: 801a strh r2, [r3, #0]
|
|
tcphdr_opt2 = NULL;
|
|
8007708: 4b81 ldr r3, [pc, #516] ; (8007910 <tcp_input+0x298>)
|
|
800770a: 2200 movs r2, #0
|
|
800770c: 601a str r2, [r3, #0]
|
|
if (p->len >= hdrlen_bytes) {
|
|
800770e: 687b ldr r3, [r7, #4]
|
|
8007710: 895a ldrh r2, [r3, #10]
|
|
8007712: 7cbb ldrb r3, [r7, #18]
|
|
8007714: b29b uxth r3, r3
|
|
8007716: 429a cmp r2, r3
|
|
8007718: d309 bcc.n 800772e <tcp_input+0xb6>
|
|
/* all options are in the first pbuf */
|
|
tcphdr_opt1len = tcphdr_optlen;
|
|
800771a: 4b7c ldr r3, [pc, #496] ; (800790c <tcp_input+0x294>)
|
|
800771c: 881a ldrh r2, [r3, #0]
|
|
800771e: 4b7d ldr r3, [pc, #500] ; (8007914 <tcp_input+0x29c>)
|
|
8007720: 801a strh r2, [r3, #0]
|
|
pbuf_remove_header(p, hdrlen_bytes); /* cannot fail */
|
|
8007722: 7cbb ldrb r3, [r7, #18]
|
|
8007724: 4619 mov r1, r3
|
|
8007726: 6878 ldr r0, [r7, #4]
|
|
8007728: f7fe f8e8 bl 80058fc <pbuf_remove_header>
|
|
800772c: e04e b.n 80077cc <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);
|
|
800772e: 687b ldr r3, [r7, #4]
|
|
8007730: 681b ldr r3, [r3, #0]
|
|
8007732: 2b00 cmp r3, #0
|
|
8007734: d105 bne.n 8007742 <tcp_input+0xca>
|
|
8007736: 4b70 ldr r3, [pc, #448] ; (80078f8 <tcp_input+0x280>)
|
|
8007738: 22c2 movs r2, #194 ; 0xc2
|
|
800773a: 4977 ldr r1, [pc, #476] ; (8007918 <tcp_input+0x2a0>)
|
|
800773c: 4870 ldr r0, [pc, #448] ; (8007900 <tcp_input+0x288>)
|
|
800773e: f008 fedb bl 80104f8 <printf>
|
|
|
|
/* advance over the TCP header (cannot fail) */
|
|
pbuf_remove_header(p, TCP_HLEN);
|
|
8007742: 2114 movs r1, #20
|
|
8007744: 6878 ldr r0, [r7, #4]
|
|
8007746: f7fe f8d9 bl 80058fc <pbuf_remove_header>
|
|
|
|
/* determine how long the first and second parts of the options are */
|
|
tcphdr_opt1len = p->len;
|
|
800774a: 687b ldr r3, [r7, #4]
|
|
800774c: 895a ldrh r2, [r3, #10]
|
|
800774e: 4b71 ldr r3, [pc, #452] ; (8007914 <tcp_input+0x29c>)
|
|
8007750: 801a strh r2, [r3, #0]
|
|
opt2len = (u16_t)(tcphdr_optlen - tcphdr_opt1len);
|
|
8007752: 4b6e ldr r3, [pc, #440] ; (800790c <tcp_input+0x294>)
|
|
8007754: 881a ldrh r2, [r3, #0]
|
|
8007756: 4b6f ldr r3, [pc, #444] ; (8007914 <tcp_input+0x29c>)
|
|
8007758: 881b ldrh r3, [r3, #0]
|
|
800775a: 1ad3 subs r3, r2, r3
|
|
800775c: 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);
|
|
800775e: 4b6d ldr r3, [pc, #436] ; (8007914 <tcp_input+0x29c>)
|
|
8007760: 881b ldrh r3, [r3, #0]
|
|
8007762: 4619 mov r1, r3
|
|
8007764: 6878 ldr r0, [r7, #4]
|
|
8007766: f7fe f8c9 bl 80058fc <pbuf_remove_header>
|
|
|
|
/* check that the options fit in the second pbuf */
|
|
if (opt2len > p->next->len) {
|
|
800776a: 687b ldr r3, [r7, #4]
|
|
800776c: 681b ldr r3, [r3, #0]
|
|
800776e: 895b ldrh r3, [r3, #10]
|
|
8007770: 8a3a ldrh r2, [r7, #16]
|
|
8007772: 429a cmp r2, r3
|
|
8007774: f200 836e bhi.w 8007e54 <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;
|
|
8007778: 687b ldr r3, [r7, #4]
|
|
800777a: 681b ldr r3, [r3, #0]
|
|
800777c: 685b ldr r3, [r3, #4]
|
|
800777e: 4a64 ldr r2, [pc, #400] ; (8007910 <tcp_input+0x298>)
|
|
8007780: 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);
|
|
8007782: 687b ldr r3, [r7, #4]
|
|
8007784: 681b ldr r3, [r3, #0]
|
|
8007786: 8a3a ldrh r2, [r7, #16]
|
|
8007788: 4611 mov r1, r2
|
|
800778a: 4618 mov r0, r3
|
|
800778c: f7fe f8b6 bl 80058fc <pbuf_remove_header>
|
|
p->tot_len = (u16_t)(p->tot_len - opt2len);
|
|
8007790: 687b ldr r3, [r7, #4]
|
|
8007792: 891a ldrh r2, [r3, #8]
|
|
8007794: 8a3b ldrh r3, [r7, #16]
|
|
8007796: 1ad3 subs r3, r2, r3
|
|
8007798: b29a uxth r2, r3
|
|
800779a: 687b ldr r3, [r7, #4]
|
|
800779c: 811a strh r2, [r3, #8]
|
|
|
|
LWIP_ASSERT("p->len == 0", p->len == 0);
|
|
800779e: 687b ldr r3, [r7, #4]
|
|
80077a0: 895b ldrh r3, [r3, #10]
|
|
80077a2: 2b00 cmp r3, #0
|
|
80077a4: d005 beq.n 80077b2 <tcp_input+0x13a>
|
|
80077a6: 4b54 ldr r3, [pc, #336] ; (80078f8 <tcp_input+0x280>)
|
|
80077a8: 22df movs r2, #223 ; 0xdf
|
|
80077aa: 495c ldr r1, [pc, #368] ; (800791c <tcp_input+0x2a4>)
|
|
80077ac: 4854 ldr r0, [pc, #336] ; (8007900 <tcp_input+0x288>)
|
|
80077ae: f008 fea3 bl 80104f8 <printf>
|
|
LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len);
|
|
80077b2: 687b ldr r3, [r7, #4]
|
|
80077b4: 891a ldrh r2, [r3, #8]
|
|
80077b6: 687b ldr r3, [r7, #4]
|
|
80077b8: 681b ldr r3, [r3, #0]
|
|
80077ba: 891b ldrh r3, [r3, #8]
|
|
80077bc: 429a cmp r2, r3
|
|
80077be: d005 beq.n 80077cc <tcp_input+0x154>
|
|
80077c0: 4b4d ldr r3, [pc, #308] ; (80078f8 <tcp_input+0x280>)
|
|
80077c2: 22e0 movs r2, #224 ; 0xe0
|
|
80077c4: 4956 ldr r1, [pc, #344] ; (8007920 <tcp_input+0x2a8>)
|
|
80077c6: 484e ldr r0, [pc, #312] ; (8007900 <tcp_input+0x288>)
|
|
80077c8: f008 fe96 bl 80104f8 <printf>
|
|
}
|
|
|
|
/* Convert fields in TCP header to host byte order. */
|
|
tcphdr->src = lwip_ntohs(tcphdr->src);
|
|
80077cc: 4b4d ldr r3, [pc, #308] ; (8007904 <tcp_input+0x28c>)
|
|
80077ce: 681b ldr r3, [r3, #0]
|
|
80077d0: 881b ldrh r3, [r3, #0]
|
|
80077d2: b29b uxth r3, r3
|
|
80077d4: 4a4b ldr r2, [pc, #300] ; (8007904 <tcp_input+0x28c>)
|
|
80077d6: 6814 ldr r4, [r2, #0]
|
|
80077d8: 4618 mov r0, r3
|
|
80077da: f7fc fdab bl 8004334 <lwip_htons>
|
|
80077de: 4603 mov r3, r0
|
|
80077e0: 8023 strh r3, [r4, #0]
|
|
tcphdr->dest = lwip_ntohs(tcphdr->dest);
|
|
80077e2: 4b48 ldr r3, [pc, #288] ; (8007904 <tcp_input+0x28c>)
|
|
80077e4: 681b ldr r3, [r3, #0]
|
|
80077e6: 885b ldrh r3, [r3, #2]
|
|
80077e8: b29b uxth r3, r3
|
|
80077ea: 4a46 ldr r2, [pc, #280] ; (8007904 <tcp_input+0x28c>)
|
|
80077ec: 6814 ldr r4, [r2, #0]
|
|
80077ee: 4618 mov r0, r3
|
|
80077f0: f7fc fda0 bl 8004334 <lwip_htons>
|
|
80077f4: 4603 mov r3, r0
|
|
80077f6: 8063 strh r3, [r4, #2]
|
|
seqno = tcphdr->seqno = lwip_ntohl(tcphdr->seqno);
|
|
80077f8: 4b42 ldr r3, [pc, #264] ; (8007904 <tcp_input+0x28c>)
|
|
80077fa: 681b ldr r3, [r3, #0]
|
|
80077fc: 685b ldr r3, [r3, #4]
|
|
80077fe: 4a41 ldr r2, [pc, #260] ; (8007904 <tcp_input+0x28c>)
|
|
8007800: 6814 ldr r4, [r2, #0]
|
|
8007802: 4618 mov r0, r3
|
|
8007804: f7fc fdab bl 800435e <lwip_htonl>
|
|
8007808: 4603 mov r3, r0
|
|
800780a: 6063 str r3, [r4, #4]
|
|
800780c: 6863 ldr r3, [r4, #4]
|
|
800780e: 4a45 ldr r2, [pc, #276] ; (8007924 <tcp_input+0x2ac>)
|
|
8007810: 6013 str r3, [r2, #0]
|
|
ackno = tcphdr->ackno = lwip_ntohl(tcphdr->ackno);
|
|
8007812: 4b3c ldr r3, [pc, #240] ; (8007904 <tcp_input+0x28c>)
|
|
8007814: 681b ldr r3, [r3, #0]
|
|
8007816: 689b ldr r3, [r3, #8]
|
|
8007818: 4a3a ldr r2, [pc, #232] ; (8007904 <tcp_input+0x28c>)
|
|
800781a: 6814 ldr r4, [r2, #0]
|
|
800781c: 4618 mov r0, r3
|
|
800781e: f7fc fd9e bl 800435e <lwip_htonl>
|
|
8007822: 4603 mov r3, r0
|
|
8007824: 60a3 str r3, [r4, #8]
|
|
8007826: 68a3 ldr r3, [r4, #8]
|
|
8007828: 4a3f ldr r2, [pc, #252] ; (8007928 <tcp_input+0x2b0>)
|
|
800782a: 6013 str r3, [r2, #0]
|
|
tcphdr->wnd = lwip_ntohs(tcphdr->wnd);
|
|
800782c: 4b35 ldr r3, [pc, #212] ; (8007904 <tcp_input+0x28c>)
|
|
800782e: 681b ldr r3, [r3, #0]
|
|
8007830: 89db ldrh r3, [r3, #14]
|
|
8007832: b29b uxth r3, r3
|
|
8007834: 4a33 ldr r2, [pc, #204] ; (8007904 <tcp_input+0x28c>)
|
|
8007836: 6814 ldr r4, [r2, #0]
|
|
8007838: 4618 mov r0, r3
|
|
800783a: f7fc fd7b bl 8004334 <lwip_htons>
|
|
800783e: 4603 mov r3, r0
|
|
8007840: 81e3 strh r3, [r4, #14]
|
|
|
|
flags = TCPH_FLAGS(tcphdr);
|
|
8007842: 4b30 ldr r3, [pc, #192] ; (8007904 <tcp_input+0x28c>)
|
|
8007844: 681b ldr r3, [r3, #0]
|
|
8007846: 899b ldrh r3, [r3, #12]
|
|
8007848: b29b uxth r3, r3
|
|
800784a: 4618 mov r0, r3
|
|
800784c: f7fc fd72 bl 8004334 <lwip_htons>
|
|
8007850: 4603 mov r3, r0
|
|
8007852: b2db uxtb r3, r3
|
|
8007854: f003 033f and.w r3, r3, #63 ; 0x3f
|
|
8007858: b2da uxtb r2, r3
|
|
800785a: 4b34 ldr r3, [pc, #208] ; (800792c <tcp_input+0x2b4>)
|
|
800785c: 701a strb r2, [r3, #0]
|
|
tcplen = p->tot_len;
|
|
800785e: 687b ldr r3, [r7, #4]
|
|
8007860: 891a ldrh r2, [r3, #8]
|
|
8007862: 4b33 ldr r3, [pc, #204] ; (8007930 <tcp_input+0x2b8>)
|
|
8007864: 801a strh r2, [r3, #0]
|
|
if (flags & (TCP_FIN | TCP_SYN)) {
|
|
8007866: 4b31 ldr r3, [pc, #196] ; (800792c <tcp_input+0x2b4>)
|
|
8007868: 781b ldrb r3, [r3, #0]
|
|
800786a: f003 0303 and.w r3, r3, #3
|
|
800786e: 2b00 cmp r3, #0
|
|
8007870: d00c beq.n 800788c <tcp_input+0x214>
|
|
tcplen++;
|
|
8007872: 4b2f ldr r3, [pc, #188] ; (8007930 <tcp_input+0x2b8>)
|
|
8007874: 881b ldrh r3, [r3, #0]
|
|
8007876: 3301 adds r3, #1
|
|
8007878: b29a uxth r2, r3
|
|
800787a: 4b2d ldr r3, [pc, #180] ; (8007930 <tcp_input+0x2b8>)
|
|
800787c: 801a strh r2, [r3, #0]
|
|
if (tcplen < p->tot_len) {
|
|
800787e: 687b ldr r3, [r7, #4]
|
|
8007880: 891a ldrh r2, [r3, #8]
|
|
8007882: 4b2b ldr r3, [pc, #172] ; (8007930 <tcp_input+0x2b8>)
|
|
8007884: 881b ldrh r3, [r3, #0]
|
|
8007886: 429a cmp r2, r3
|
|
8007888: f200 82e6 bhi.w 8007e58 <tcp_input+0x7e0>
|
|
}
|
|
}
|
|
|
|
/* Demultiplex an incoming segment. First, we check if it is destined
|
|
for an active connection. */
|
|
prev = NULL;
|
|
800788c: 2300 movs r3, #0
|
|
800788e: 61bb str r3, [r7, #24]
|
|
|
|
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
|
|
8007890: 4b28 ldr r3, [pc, #160] ; (8007934 <tcp_input+0x2bc>)
|
|
8007892: 681b ldr r3, [r3, #0]
|
|
8007894: 61fb str r3, [r7, #28]
|
|
8007896: e09d b.n 80079d4 <tcp_input+0x35c>
|
|
LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED);
|
|
8007898: 69fb ldr r3, [r7, #28]
|
|
800789a: 7d1b ldrb r3, [r3, #20]
|
|
800789c: 2b00 cmp r3, #0
|
|
800789e: d105 bne.n 80078ac <tcp_input+0x234>
|
|
80078a0: 4b15 ldr r3, [pc, #84] ; (80078f8 <tcp_input+0x280>)
|
|
80078a2: 22fb movs r2, #251 ; 0xfb
|
|
80078a4: 4924 ldr r1, [pc, #144] ; (8007938 <tcp_input+0x2c0>)
|
|
80078a6: 4816 ldr r0, [pc, #88] ; (8007900 <tcp_input+0x288>)
|
|
80078a8: f008 fe26 bl 80104f8 <printf>
|
|
LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT);
|
|
80078ac: 69fb ldr r3, [r7, #28]
|
|
80078ae: 7d1b ldrb r3, [r3, #20]
|
|
80078b0: 2b0a cmp r3, #10
|
|
80078b2: d105 bne.n 80078c0 <tcp_input+0x248>
|
|
80078b4: 4b10 ldr r3, [pc, #64] ; (80078f8 <tcp_input+0x280>)
|
|
80078b6: 22fc movs r2, #252 ; 0xfc
|
|
80078b8: 4920 ldr r1, [pc, #128] ; (800793c <tcp_input+0x2c4>)
|
|
80078ba: 4811 ldr r0, [pc, #68] ; (8007900 <tcp_input+0x288>)
|
|
80078bc: f008 fe1c bl 80104f8 <printf>
|
|
LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN);
|
|
80078c0: 69fb ldr r3, [r7, #28]
|
|
80078c2: 7d1b ldrb r3, [r3, #20]
|
|
80078c4: 2b01 cmp r3, #1
|
|
80078c6: d105 bne.n 80078d4 <tcp_input+0x25c>
|
|
80078c8: 4b0b ldr r3, [pc, #44] ; (80078f8 <tcp_input+0x280>)
|
|
80078ca: 22fd movs r2, #253 ; 0xfd
|
|
80078cc: 491c ldr r1, [pc, #112] ; (8007940 <tcp_input+0x2c8>)
|
|
80078ce: 480c ldr r0, [pc, #48] ; (8007900 <tcp_input+0x288>)
|
|
80078d0: f008 fe12 bl 80104f8 <printf>
|
|
|
|
/* check if PCB is bound to specific netif */
|
|
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
|
|
80078d4: 69fb ldr r3, [r7, #28]
|
|
80078d6: 7a1b ldrb r3, [r3, #8]
|
|
80078d8: 2b00 cmp r3, #0
|
|
80078da: d033 beq.n 8007944 <tcp_input+0x2cc>
|
|
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
|
|
80078dc: 69fb ldr r3, [r7, #28]
|
|
80078de: 7a1a ldrb r2, [r3, #8]
|
|
80078e0: 4b09 ldr r3, [pc, #36] ; (8007908 <tcp_input+0x290>)
|
|
80078e2: 685b ldr r3, [r3, #4]
|
|
80078e4: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
|
|
80078e8: 3301 adds r3, #1
|
|
80078ea: b2db uxtb r3, r3
|
|
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
|
|
80078ec: 429a cmp r2, r3
|
|
80078ee: d029 beq.n 8007944 <tcp_input+0x2cc>
|
|
prev = pcb;
|
|
80078f0: 69fb ldr r3, [r7, #28]
|
|
80078f2: 61bb str r3, [r7, #24]
|
|
continue;
|
|
80078f4: e06b b.n 80079ce <tcp_input+0x356>
|
|
80078f6: bf00 nop
|
|
80078f8: 08016284 .word 0x08016284
|
|
80078fc: 080162b8 .word 0x080162b8
|
|
8007900: 080162d0 .word 0x080162d0
|
|
8007904: 20008c28 .word 0x20008c28
|
|
8007908: 20005670 .word 0x20005670
|
|
800790c: 20008c2c .word 0x20008c2c
|
|
8007910: 20008c30 .word 0x20008c30
|
|
8007914: 20008c2e .word 0x20008c2e
|
|
8007918: 080162f8 .word 0x080162f8
|
|
800791c: 08016308 .word 0x08016308
|
|
8007920: 08016314 .word 0x08016314
|
|
8007924: 20008c38 .word 0x20008c38
|
|
8007928: 20008c3c .word 0x20008c3c
|
|
800792c: 20008c44 .word 0x20008c44
|
|
8007930: 20008c42 .word 0x20008c42
|
|
8007934: 20008c0c .word 0x20008c0c
|
|
8007938: 08016334 .word 0x08016334
|
|
800793c: 0801635c .word 0x0801635c
|
|
8007940: 08016388 .word 0x08016388
|
|
}
|
|
|
|
if (pcb->remote_port == tcphdr->src &&
|
|
8007944: 69fb ldr r3, [r7, #28]
|
|
8007946: 8b1a ldrh r2, [r3, #24]
|
|
8007948: 4b72 ldr r3, [pc, #456] ; (8007b14 <tcp_input+0x49c>)
|
|
800794a: 681b ldr r3, [r3, #0]
|
|
800794c: 881b ldrh r3, [r3, #0]
|
|
800794e: b29b uxth r3, r3
|
|
8007950: 429a cmp r2, r3
|
|
8007952: d13a bne.n 80079ca <tcp_input+0x352>
|
|
pcb->local_port == tcphdr->dest &&
|
|
8007954: 69fb ldr r3, [r7, #28]
|
|
8007956: 8ada ldrh r2, [r3, #22]
|
|
8007958: 4b6e ldr r3, [pc, #440] ; (8007b14 <tcp_input+0x49c>)
|
|
800795a: 681b ldr r3, [r3, #0]
|
|
800795c: 885b ldrh r3, [r3, #2]
|
|
800795e: b29b uxth r3, r3
|
|
if (pcb->remote_port == tcphdr->src &&
|
|
8007960: 429a cmp r2, r3
|
|
8007962: d132 bne.n 80079ca <tcp_input+0x352>
|
|
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
|
|
8007964: 69fb ldr r3, [r7, #28]
|
|
8007966: 685a ldr r2, [r3, #4]
|
|
8007968: 4b6b ldr r3, [pc, #428] ; (8007b18 <tcp_input+0x4a0>)
|
|
800796a: 691b ldr r3, [r3, #16]
|
|
pcb->local_port == tcphdr->dest &&
|
|
800796c: 429a cmp r2, r3
|
|
800796e: d12c bne.n 80079ca <tcp_input+0x352>
|
|
ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
|
|
8007970: 69fb ldr r3, [r7, #28]
|
|
8007972: 681a ldr r2, [r3, #0]
|
|
8007974: 4b68 ldr r3, [pc, #416] ; (8007b18 <tcp_input+0x4a0>)
|
|
8007976: 695b ldr r3, [r3, #20]
|
|
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
|
|
8007978: 429a cmp r2, r3
|
|
800797a: d126 bne.n 80079ca <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);
|
|
800797c: 69fb ldr r3, [r7, #28]
|
|
800797e: 68db ldr r3, [r3, #12]
|
|
8007980: 69fa ldr r2, [r7, #28]
|
|
8007982: 429a cmp r2, r3
|
|
8007984: d106 bne.n 8007994 <tcp_input+0x31c>
|
|
8007986: 4b65 ldr r3, [pc, #404] ; (8007b1c <tcp_input+0x4a4>)
|
|
8007988: f240 120d movw r2, #269 ; 0x10d
|
|
800798c: 4964 ldr r1, [pc, #400] ; (8007b20 <tcp_input+0x4a8>)
|
|
800798e: 4865 ldr r0, [pc, #404] ; (8007b24 <tcp_input+0x4ac>)
|
|
8007990: f008 fdb2 bl 80104f8 <printf>
|
|
if (prev != NULL) {
|
|
8007994: 69bb ldr r3, [r7, #24]
|
|
8007996: 2b00 cmp r3, #0
|
|
8007998: d00a beq.n 80079b0 <tcp_input+0x338>
|
|
prev->next = pcb->next;
|
|
800799a: 69fb ldr r3, [r7, #28]
|
|
800799c: 68da ldr r2, [r3, #12]
|
|
800799e: 69bb ldr r3, [r7, #24]
|
|
80079a0: 60da str r2, [r3, #12]
|
|
pcb->next = tcp_active_pcbs;
|
|
80079a2: 4b61 ldr r3, [pc, #388] ; (8007b28 <tcp_input+0x4b0>)
|
|
80079a4: 681a ldr r2, [r3, #0]
|
|
80079a6: 69fb ldr r3, [r7, #28]
|
|
80079a8: 60da str r2, [r3, #12]
|
|
tcp_active_pcbs = pcb;
|
|
80079aa: 4a5f ldr r2, [pc, #380] ; (8007b28 <tcp_input+0x4b0>)
|
|
80079ac: 69fb ldr r3, [r7, #28]
|
|
80079ae: 6013 str r3, [r2, #0]
|
|
} else {
|
|
TCP_STATS_INC(tcp.cachehit);
|
|
}
|
|
LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb);
|
|
80079b0: 69fb ldr r3, [r7, #28]
|
|
80079b2: 68db ldr r3, [r3, #12]
|
|
80079b4: 69fa ldr r2, [r7, #28]
|
|
80079b6: 429a cmp r2, r3
|
|
80079b8: d111 bne.n 80079de <tcp_input+0x366>
|
|
80079ba: 4b58 ldr r3, [pc, #352] ; (8007b1c <tcp_input+0x4a4>)
|
|
80079bc: f240 1215 movw r2, #277 ; 0x115
|
|
80079c0: 495a ldr r1, [pc, #360] ; (8007b2c <tcp_input+0x4b4>)
|
|
80079c2: 4858 ldr r0, [pc, #352] ; (8007b24 <tcp_input+0x4ac>)
|
|
80079c4: f008 fd98 bl 80104f8 <printf>
|
|
break;
|
|
80079c8: e009 b.n 80079de <tcp_input+0x366>
|
|
}
|
|
prev = pcb;
|
|
80079ca: 69fb ldr r3, [r7, #28]
|
|
80079cc: 61bb str r3, [r7, #24]
|
|
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
|
|
80079ce: 69fb ldr r3, [r7, #28]
|
|
80079d0: 68db ldr r3, [r3, #12]
|
|
80079d2: 61fb str r3, [r7, #28]
|
|
80079d4: 69fb ldr r3, [r7, #28]
|
|
80079d6: 2b00 cmp r3, #0
|
|
80079d8: f47f af5e bne.w 8007898 <tcp_input+0x220>
|
|
80079dc: e000 b.n 80079e0 <tcp_input+0x368>
|
|
break;
|
|
80079de: bf00 nop
|
|
}
|
|
|
|
if (pcb == NULL) {
|
|
80079e0: 69fb ldr r3, [r7, #28]
|
|
80079e2: 2b00 cmp r3, #0
|
|
80079e4: f040 80aa bne.w 8007b3c <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) {
|
|
80079e8: 4b51 ldr r3, [pc, #324] ; (8007b30 <tcp_input+0x4b8>)
|
|
80079ea: 681b ldr r3, [r3, #0]
|
|
80079ec: 61fb str r3, [r7, #28]
|
|
80079ee: e03f b.n 8007a70 <tcp_input+0x3f8>
|
|
LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
|
|
80079f0: 69fb ldr r3, [r7, #28]
|
|
80079f2: 7d1b ldrb r3, [r3, #20]
|
|
80079f4: 2b0a cmp r3, #10
|
|
80079f6: d006 beq.n 8007a06 <tcp_input+0x38e>
|
|
80079f8: 4b48 ldr r3, [pc, #288] ; (8007b1c <tcp_input+0x4a4>)
|
|
80079fa: f240 121f movw r2, #287 ; 0x11f
|
|
80079fe: 494d ldr r1, [pc, #308] ; (8007b34 <tcp_input+0x4bc>)
|
|
8007a00: 4848 ldr r0, [pc, #288] ; (8007b24 <tcp_input+0x4ac>)
|
|
8007a02: f008 fd79 bl 80104f8 <printf>
|
|
|
|
/* check if PCB is bound to specific netif */
|
|
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
|
|
8007a06: 69fb ldr r3, [r7, #28]
|
|
8007a08: 7a1b ldrb r3, [r3, #8]
|
|
8007a0a: 2b00 cmp r3, #0
|
|
8007a0c: d009 beq.n 8007a22 <tcp_input+0x3aa>
|
|
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
|
|
8007a0e: 69fb ldr r3, [r7, #28]
|
|
8007a10: 7a1a ldrb r2, [r3, #8]
|
|
8007a12: 4b41 ldr r3, [pc, #260] ; (8007b18 <tcp_input+0x4a0>)
|
|
8007a14: 685b ldr r3, [r3, #4]
|
|
8007a16: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
|
|
8007a1a: 3301 adds r3, #1
|
|
8007a1c: b2db uxtb r3, r3
|
|
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
|
|
8007a1e: 429a cmp r2, r3
|
|
8007a20: d122 bne.n 8007a68 <tcp_input+0x3f0>
|
|
continue;
|
|
}
|
|
|
|
if (pcb->remote_port == tcphdr->src &&
|
|
8007a22: 69fb ldr r3, [r7, #28]
|
|
8007a24: 8b1a ldrh r2, [r3, #24]
|
|
8007a26: 4b3b ldr r3, [pc, #236] ; (8007b14 <tcp_input+0x49c>)
|
|
8007a28: 681b ldr r3, [r3, #0]
|
|
8007a2a: 881b ldrh r3, [r3, #0]
|
|
8007a2c: b29b uxth r3, r3
|
|
8007a2e: 429a cmp r2, r3
|
|
8007a30: d11b bne.n 8007a6a <tcp_input+0x3f2>
|
|
pcb->local_port == tcphdr->dest &&
|
|
8007a32: 69fb ldr r3, [r7, #28]
|
|
8007a34: 8ada ldrh r2, [r3, #22]
|
|
8007a36: 4b37 ldr r3, [pc, #220] ; (8007b14 <tcp_input+0x49c>)
|
|
8007a38: 681b ldr r3, [r3, #0]
|
|
8007a3a: 885b ldrh r3, [r3, #2]
|
|
8007a3c: b29b uxth r3, r3
|
|
if (pcb->remote_port == tcphdr->src &&
|
|
8007a3e: 429a cmp r2, r3
|
|
8007a40: d113 bne.n 8007a6a <tcp_input+0x3f2>
|
|
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
|
|
8007a42: 69fb ldr r3, [r7, #28]
|
|
8007a44: 685a ldr r2, [r3, #4]
|
|
8007a46: 4b34 ldr r3, [pc, #208] ; (8007b18 <tcp_input+0x4a0>)
|
|
8007a48: 691b ldr r3, [r3, #16]
|
|
pcb->local_port == tcphdr->dest &&
|
|
8007a4a: 429a cmp r2, r3
|
|
8007a4c: d10d bne.n 8007a6a <tcp_input+0x3f2>
|
|
ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
|
|
8007a4e: 69fb ldr r3, [r7, #28]
|
|
8007a50: 681a ldr r2, [r3, #0]
|
|
8007a52: 4b31 ldr r3, [pc, #196] ; (8007b18 <tcp_input+0x4a0>)
|
|
8007a54: 695b ldr r3, [r3, #20]
|
|
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
|
|
8007a56: 429a cmp r2, r3
|
|
8007a58: d107 bne.n 8007a6a <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);
|
|
8007a5a: 69f8 ldr r0, [r7, #28]
|
|
8007a5c: f000 fb56 bl 800810c <tcp_timewait_input>
|
|
}
|
|
pbuf_free(p);
|
|
8007a60: 6878 ldr r0, [r7, #4]
|
|
8007a62: f7fd ffd1 bl 8005a08 <pbuf_free>
|
|
return;
|
|
8007a66: e1fd b.n 8007e64 <tcp_input+0x7ec>
|
|
continue;
|
|
8007a68: bf00 nop
|
|
for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
|
|
8007a6a: 69fb ldr r3, [r7, #28]
|
|
8007a6c: 68db ldr r3, [r3, #12]
|
|
8007a6e: 61fb str r3, [r7, #28]
|
|
8007a70: 69fb ldr r3, [r7, #28]
|
|
8007a72: 2b00 cmp r3, #0
|
|
8007a74: d1bc bne.n 80079f0 <tcp_input+0x378>
|
|
}
|
|
}
|
|
|
|
/* Finally, if we still did not get a match, we check all PCBs that
|
|
are LISTENing for incoming connections. */
|
|
prev = NULL;
|
|
8007a76: 2300 movs r3, #0
|
|
8007a78: 61bb str r3, [r7, #24]
|
|
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
|
|
8007a7a: 4b2f ldr r3, [pc, #188] ; (8007b38 <tcp_input+0x4c0>)
|
|
8007a7c: 681b ldr r3, [r3, #0]
|
|
8007a7e: 617b str r3, [r7, #20]
|
|
8007a80: e02a b.n 8007ad8 <tcp_input+0x460>
|
|
/* check if PCB is bound to specific netif */
|
|
if ((lpcb->netif_idx != NETIF_NO_INDEX) &&
|
|
8007a82: 697b ldr r3, [r7, #20]
|
|
8007a84: 7a1b ldrb r3, [r3, #8]
|
|
8007a86: 2b00 cmp r3, #0
|
|
8007a88: d00c beq.n 8007aa4 <tcp_input+0x42c>
|
|
(lpcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
|
|
8007a8a: 697b ldr r3, [r7, #20]
|
|
8007a8c: 7a1a ldrb r2, [r3, #8]
|
|
8007a8e: 4b22 ldr r3, [pc, #136] ; (8007b18 <tcp_input+0x4a0>)
|
|
8007a90: 685b ldr r3, [r3, #4]
|
|
8007a92: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
|
|
8007a96: 3301 adds r3, #1
|
|
8007a98: b2db uxtb r3, r3
|
|
if ((lpcb->netif_idx != NETIF_NO_INDEX) &&
|
|
8007a9a: 429a cmp r2, r3
|
|
8007a9c: d002 beq.n 8007aa4 <tcp_input+0x42c>
|
|
prev = (struct tcp_pcb *)lpcb;
|
|
8007a9e: 697b ldr r3, [r7, #20]
|
|
8007aa0: 61bb str r3, [r7, #24]
|
|
continue;
|
|
8007aa2: e016 b.n 8007ad2 <tcp_input+0x45a>
|
|
}
|
|
|
|
if (lpcb->local_port == tcphdr->dest) {
|
|
8007aa4: 697b ldr r3, [r7, #20]
|
|
8007aa6: 8ada ldrh r2, [r3, #22]
|
|
8007aa8: 4b1a ldr r3, [pc, #104] ; (8007b14 <tcp_input+0x49c>)
|
|
8007aaa: 681b ldr r3, [r3, #0]
|
|
8007aac: 885b ldrh r3, [r3, #2]
|
|
8007aae: b29b uxth r3, r3
|
|
8007ab0: 429a cmp r2, r3
|
|
8007ab2: d10c bne.n 8007ace <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())) {
|
|
8007ab4: 697b ldr r3, [r7, #20]
|
|
8007ab6: 681a ldr r2, [r3, #0]
|
|
8007ab8: 4b17 ldr r3, [pc, #92] ; (8007b18 <tcp_input+0x4a0>)
|
|
8007aba: 695b ldr r3, [r3, #20]
|
|
8007abc: 429a cmp r2, r3
|
|
8007abe: d00f beq.n 8007ae0 <tcp_input+0x468>
|
|
/* found an exact match */
|
|
break;
|
|
} else if (ip_addr_isany(&lpcb->local_ip)) {
|
|
8007ac0: 697b ldr r3, [r7, #20]
|
|
8007ac2: 2b00 cmp r3, #0
|
|
8007ac4: d00d beq.n 8007ae2 <tcp_input+0x46a>
|
|
8007ac6: 697b ldr r3, [r7, #20]
|
|
8007ac8: 681b ldr r3, [r3, #0]
|
|
8007aca: 2b00 cmp r3, #0
|
|
8007acc: d009 beq.n 8007ae2 <tcp_input+0x46a>
|
|
break;
|
|
#endif /* SO_REUSE */
|
|
}
|
|
}
|
|
}
|
|
prev = (struct tcp_pcb *)lpcb;
|
|
8007ace: 697b ldr r3, [r7, #20]
|
|
8007ad0: 61bb str r3, [r7, #24]
|
|
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
|
|
8007ad2: 697b ldr r3, [r7, #20]
|
|
8007ad4: 68db ldr r3, [r3, #12]
|
|
8007ad6: 617b str r3, [r7, #20]
|
|
8007ad8: 697b ldr r3, [r7, #20]
|
|
8007ada: 2b00 cmp r3, #0
|
|
8007adc: d1d1 bne.n 8007a82 <tcp_input+0x40a>
|
|
8007ade: e000 b.n 8007ae2 <tcp_input+0x46a>
|
|
break;
|
|
8007ae0: 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) {
|
|
8007ae2: 697b ldr r3, [r7, #20]
|
|
8007ae4: 2b00 cmp r3, #0
|
|
8007ae6: d029 beq.n 8007b3c <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) {
|
|
8007ae8: 69bb ldr r3, [r7, #24]
|
|
8007aea: 2b00 cmp r3, #0
|
|
8007aec: d00a beq.n 8007b04 <tcp_input+0x48c>
|
|
((struct tcp_pcb_listen *)prev)->next = lpcb->next;
|
|
8007aee: 697b ldr r3, [r7, #20]
|
|
8007af0: 68da ldr r2, [r3, #12]
|
|
8007af2: 69bb ldr r3, [r7, #24]
|
|
8007af4: 60da str r2, [r3, #12]
|
|
/* our successor is the remainder of the listening list */
|
|
lpcb->next = tcp_listen_pcbs.listen_pcbs;
|
|
8007af6: 4b10 ldr r3, [pc, #64] ; (8007b38 <tcp_input+0x4c0>)
|
|
8007af8: 681a ldr r2, [r3, #0]
|
|
8007afa: 697b ldr r3, [r7, #20]
|
|
8007afc: 60da str r2, [r3, #12]
|
|
/* put this listening pcb at the head of the listening list */
|
|
tcp_listen_pcbs.listen_pcbs = lpcb;
|
|
8007afe: 4a0e ldr r2, [pc, #56] ; (8007b38 <tcp_input+0x4c0>)
|
|
8007b00: 697b ldr r3, [r7, #20]
|
|
8007b02: 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);
|
|
8007b04: 6978 ldr r0, [r7, #20]
|
|
8007b06: f000 fa03 bl 8007f10 <tcp_listen_input>
|
|
}
|
|
pbuf_free(p);
|
|
8007b0a: 6878 ldr r0, [r7, #4]
|
|
8007b0c: f7fd ff7c bl 8005a08 <pbuf_free>
|
|
return;
|
|
8007b10: e1a8 b.n 8007e64 <tcp_input+0x7ec>
|
|
8007b12: bf00 nop
|
|
8007b14: 20008c28 .word 0x20008c28
|
|
8007b18: 20005670 .word 0x20005670
|
|
8007b1c: 08016284 .word 0x08016284
|
|
8007b20: 080163b0 .word 0x080163b0
|
|
8007b24: 080162d0 .word 0x080162d0
|
|
8007b28: 20008c0c .word 0x20008c0c
|
|
8007b2c: 080163dc .word 0x080163dc
|
|
8007b30: 20008c10 .word 0x20008c10
|
|
8007b34: 08016408 .word 0x08016408
|
|
8007b38: 20008c08 .word 0x20008c08
|
|
tcphdr_opt1len, tcphdr_opt2, p) != ERR_OK) {
|
|
pbuf_free(p);
|
|
return;
|
|
}
|
|
#endif
|
|
if (pcb != NULL) {
|
|
8007b3c: 69fb ldr r3, [r7, #28]
|
|
8007b3e: 2b00 cmp r3, #0
|
|
8007b40: f000 8158 beq.w 8007df4 <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;
|
|
8007b44: 4b95 ldr r3, [pc, #596] ; (8007d9c <tcp_input+0x724>)
|
|
8007b46: 2200 movs r2, #0
|
|
8007b48: 601a str r2, [r3, #0]
|
|
inseg.len = p->tot_len;
|
|
8007b4a: 687b ldr r3, [r7, #4]
|
|
8007b4c: 891a ldrh r2, [r3, #8]
|
|
8007b4e: 4b93 ldr r3, [pc, #588] ; (8007d9c <tcp_input+0x724>)
|
|
8007b50: 811a strh r2, [r3, #8]
|
|
inseg.p = p;
|
|
8007b52: 4a92 ldr r2, [pc, #584] ; (8007d9c <tcp_input+0x724>)
|
|
8007b54: 687b ldr r3, [r7, #4]
|
|
8007b56: 6053 str r3, [r2, #4]
|
|
inseg.tcphdr = tcphdr;
|
|
8007b58: 4b91 ldr r3, [pc, #580] ; (8007da0 <tcp_input+0x728>)
|
|
8007b5a: 681b ldr r3, [r3, #0]
|
|
8007b5c: 4a8f ldr r2, [pc, #572] ; (8007d9c <tcp_input+0x724>)
|
|
8007b5e: 60d3 str r3, [r2, #12]
|
|
|
|
recv_data = NULL;
|
|
8007b60: 4b90 ldr r3, [pc, #576] ; (8007da4 <tcp_input+0x72c>)
|
|
8007b62: 2200 movs r2, #0
|
|
8007b64: 601a str r2, [r3, #0]
|
|
recv_flags = 0;
|
|
8007b66: 4b90 ldr r3, [pc, #576] ; (8007da8 <tcp_input+0x730>)
|
|
8007b68: 2200 movs r2, #0
|
|
8007b6a: 701a strb r2, [r3, #0]
|
|
recv_acked = 0;
|
|
8007b6c: 4b8f ldr r3, [pc, #572] ; (8007dac <tcp_input+0x734>)
|
|
8007b6e: 2200 movs r2, #0
|
|
8007b70: 801a strh r2, [r3, #0]
|
|
|
|
if (flags & TCP_PSH) {
|
|
8007b72: 4b8f ldr r3, [pc, #572] ; (8007db0 <tcp_input+0x738>)
|
|
8007b74: 781b ldrb r3, [r3, #0]
|
|
8007b76: f003 0308 and.w r3, r3, #8
|
|
8007b7a: 2b00 cmp r3, #0
|
|
8007b7c: d006 beq.n 8007b8c <tcp_input+0x514>
|
|
p->flags |= PBUF_FLAG_PUSH;
|
|
8007b7e: 687b ldr r3, [r7, #4]
|
|
8007b80: 7b5b ldrb r3, [r3, #13]
|
|
8007b82: f043 0301 orr.w r3, r3, #1
|
|
8007b86: b2da uxtb r2, r3
|
|
8007b88: 687b ldr r3, [r7, #4]
|
|
8007b8a: 735a strb r2, [r3, #13]
|
|
}
|
|
|
|
/* If there is data which was previously "refused" by upper layer */
|
|
if (pcb->refused_data != NULL) {
|
|
8007b8c: 69fb ldr r3, [r7, #28]
|
|
8007b8e: 6f9b ldr r3, [r3, #120] ; 0x78
|
|
8007b90: 2b00 cmp r3, #0
|
|
8007b92: d017 beq.n 8007bc4 <tcp_input+0x54c>
|
|
if ((tcp_process_refused_data(pcb) == ERR_ABRT) ||
|
|
8007b94: 69f8 ldr r0, [r7, #28]
|
|
8007b96: f7ff f929 bl 8006dec <tcp_process_refused_data>
|
|
8007b9a: 4603 mov r3, r0
|
|
8007b9c: f113 0f0d cmn.w r3, #13
|
|
8007ba0: d007 beq.n 8007bb2 <tcp_input+0x53a>
|
|
((pcb->refused_data != NULL) && (tcplen > 0))) {
|
|
8007ba2: 69fb ldr r3, [r7, #28]
|
|
8007ba4: 6f9b ldr r3, [r3, #120] ; 0x78
|
|
if ((tcp_process_refused_data(pcb) == ERR_ABRT) ||
|
|
8007ba6: 2b00 cmp r3, #0
|
|
8007ba8: d00c beq.n 8007bc4 <tcp_input+0x54c>
|
|
((pcb->refused_data != NULL) && (tcplen > 0))) {
|
|
8007baa: 4b82 ldr r3, [pc, #520] ; (8007db4 <tcp_input+0x73c>)
|
|
8007bac: 881b ldrh r3, [r3, #0]
|
|
8007bae: 2b00 cmp r3, #0
|
|
8007bb0: d008 beq.n 8007bc4 <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) {
|
|
8007bb2: 69fb ldr r3, [r7, #28]
|
|
8007bb4: 8d5b ldrh r3, [r3, #42] ; 0x2a
|
|
8007bb6: 2b00 cmp r3, #0
|
|
8007bb8: f040 80e3 bne.w 8007d82 <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);
|
|
8007bbc: 69f8 ldr r0, [r7, #28]
|
|
8007bbe: f003 f9ad bl 800af1c <tcp_send_empty_ack>
|
|
}
|
|
TCP_STATS_INC(tcp.drop);
|
|
MIB2_STATS_INC(mib2.tcpinerrs);
|
|
goto aborted;
|
|
8007bc2: e0de b.n 8007d82 <tcp_input+0x70a>
|
|
}
|
|
}
|
|
tcp_input_pcb = pcb;
|
|
8007bc4: 4a7c ldr r2, [pc, #496] ; (8007db8 <tcp_input+0x740>)
|
|
8007bc6: 69fb ldr r3, [r7, #28]
|
|
8007bc8: 6013 str r3, [r2, #0]
|
|
err = tcp_process(pcb);
|
|
8007bca: 69f8 ldr r0, [r7, #28]
|
|
8007bcc: f000 fb18 bl 8008200 <tcp_process>
|
|
8007bd0: 4603 mov r3, r0
|
|
8007bd2: 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) {
|
|
8007bd4: f997 3013 ldrsb.w r3, [r7, #19]
|
|
8007bd8: f113 0f0d cmn.w r3, #13
|
|
8007bdc: f000 80d3 beq.w 8007d86 <tcp_input+0x70e>
|
|
if (recv_flags & TF_RESET) {
|
|
8007be0: 4b71 ldr r3, [pc, #452] ; (8007da8 <tcp_input+0x730>)
|
|
8007be2: 781b ldrb r3, [r3, #0]
|
|
8007be4: f003 0308 and.w r3, r3, #8
|
|
8007be8: 2b00 cmp r3, #0
|
|
8007bea: d015 beq.n 8007c18 <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);
|
|
8007bec: 69fb ldr r3, [r7, #28]
|
|
8007bee: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
|
|
8007bf2: 2b00 cmp r3, #0
|
|
8007bf4: d008 beq.n 8007c08 <tcp_input+0x590>
|
|
8007bf6: 69fb ldr r3, [r7, #28]
|
|
8007bf8: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
|
|
8007bfc: 69fa ldr r2, [r7, #28]
|
|
8007bfe: 6912 ldr r2, [r2, #16]
|
|
8007c00: f06f 010d mvn.w r1, #13
|
|
8007c04: 4610 mov r0, r2
|
|
8007c06: 4798 blx r3
|
|
tcp_pcb_remove(&tcp_active_pcbs, pcb);
|
|
8007c08: 69f9 ldr r1, [r7, #28]
|
|
8007c0a: 486c ldr r0, [pc, #432] ; (8007dbc <tcp_input+0x744>)
|
|
8007c0c: f7ff fbbc bl 8007388 <tcp_pcb_remove>
|
|
tcp_free(pcb);
|
|
8007c10: 69f8 ldr r0, [r7, #28]
|
|
8007c12: f7fe f9a9 bl 8005f68 <tcp_free>
|
|
8007c16: e0da b.n 8007dce <tcp_input+0x756>
|
|
} else {
|
|
err = ERR_OK;
|
|
8007c18: 2300 movs r3, #0
|
|
8007c1a: 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) {
|
|
8007c1c: 4b63 ldr r3, [pc, #396] ; (8007dac <tcp_input+0x734>)
|
|
8007c1e: 881b ldrh r3, [r3, #0]
|
|
8007c20: 2b00 cmp r3, #0
|
|
8007c22: d01d beq.n 8007c60 <tcp_input+0x5e8>
|
|
while (acked > 0) {
|
|
acked16 = (u16_t)LWIP_MIN(acked, 0xffffu);
|
|
acked -= acked16;
|
|
#else
|
|
{
|
|
acked16 = recv_acked;
|
|
8007c24: 4b61 ldr r3, [pc, #388] ; (8007dac <tcp_input+0x734>)
|
|
8007c26: 881b ldrh r3, [r3, #0]
|
|
8007c28: 81fb strh r3, [r7, #14]
|
|
#endif
|
|
TCP_EVENT_SENT(pcb, (u16_t)acked16, err);
|
|
8007c2a: 69fb ldr r3, [r7, #28]
|
|
8007c2c: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80
|
|
8007c30: 2b00 cmp r3, #0
|
|
8007c32: d00a beq.n 8007c4a <tcp_input+0x5d2>
|
|
8007c34: 69fb ldr r3, [r7, #28]
|
|
8007c36: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80
|
|
8007c3a: 69fa ldr r2, [r7, #28]
|
|
8007c3c: 6910 ldr r0, [r2, #16]
|
|
8007c3e: 89fa ldrh r2, [r7, #14]
|
|
8007c40: 69f9 ldr r1, [r7, #28]
|
|
8007c42: 4798 blx r3
|
|
8007c44: 4603 mov r3, r0
|
|
8007c46: 74fb strb r3, [r7, #19]
|
|
8007c48: e001 b.n 8007c4e <tcp_input+0x5d6>
|
|
8007c4a: 2300 movs r3, #0
|
|
8007c4c: 74fb strb r3, [r7, #19]
|
|
if (err == ERR_ABRT) {
|
|
8007c4e: f997 3013 ldrsb.w r3, [r7, #19]
|
|
8007c52: f113 0f0d cmn.w r3, #13
|
|
8007c56: f000 8098 beq.w 8007d8a <tcp_input+0x712>
|
|
goto aborted;
|
|
}
|
|
}
|
|
recv_acked = 0;
|
|
8007c5a: 4b54 ldr r3, [pc, #336] ; (8007dac <tcp_input+0x734>)
|
|
8007c5c: 2200 movs r2, #0
|
|
8007c5e: 801a strh r2, [r3, #0]
|
|
}
|
|
if (tcp_input_delayed_close(pcb)) {
|
|
8007c60: 69f8 ldr r0, [r7, #28]
|
|
8007c62: f000 f915 bl 8007e90 <tcp_input_delayed_close>
|
|
8007c66: 4603 mov r3, r0
|
|
8007c68: 2b00 cmp r3, #0
|
|
8007c6a: f040 8090 bne.w 8007d8e <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) {
|
|
8007c6e: 4b4d ldr r3, [pc, #308] ; (8007da4 <tcp_input+0x72c>)
|
|
8007c70: 681b ldr r3, [r3, #0]
|
|
8007c72: 2b00 cmp r3, #0
|
|
8007c74: d041 beq.n 8007cfa <tcp_input+0x682>
|
|
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
|
|
|
|
LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL);
|
|
8007c76: 69fb ldr r3, [r7, #28]
|
|
8007c78: 6f9b ldr r3, [r3, #120] ; 0x78
|
|
8007c7a: 2b00 cmp r3, #0
|
|
8007c7c: d006 beq.n 8007c8c <tcp_input+0x614>
|
|
8007c7e: 4b50 ldr r3, [pc, #320] ; (8007dc0 <tcp_input+0x748>)
|
|
8007c80: f44f 72f3 mov.w r2, #486 ; 0x1e6
|
|
8007c84: 494f ldr r1, [pc, #316] ; (8007dc4 <tcp_input+0x74c>)
|
|
8007c86: 4850 ldr r0, [pc, #320] ; (8007dc8 <tcp_input+0x750>)
|
|
8007c88: f008 fc36 bl 80104f8 <printf>
|
|
if (pcb->flags & TF_RXCLOSED) {
|
|
8007c8c: 69fb ldr r3, [r7, #28]
|
|
8007c8e: 8b5b ldrh r3, [r3, #26]
|
|
8007c90: f003 0310 and.w r3, r3, #16
|
|
8007c94: 2b00 cmp r3, #0
|
|
8007c96: d008 beq.n 8007caa <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);
|
|
8007c98: 4b42 ldr r3, [pc, #264] ; (8007da4 <tcp_input+0x72c>)
|
|
8007c9a: 681b ldr r3, [r3, #0]
|
|
8007c9c: 4618 mov r0, r3
|
|
8007c9e: f7fd feb3 bl 8005a08 <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);
|
|
8007ca2: 69f8 ldr r0, [r7, #28]
|
|
8007ca4: f7fe fc48 bl 8006538 <tcp_abort>
|
|
goto aborted;
|
|
8007ca8: e091 b.n 8007dce <tcp_input+0x756>
|
|
}
|
|
|
|
/* Notify application that data has been received. */
|
|
TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err);
|
|
8007caa: 69fb ldr r3, [r7, #28]
|
|
8007cac: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
|
|
8007cb0: 2b00 cmp r3, #0
|
|
8007cb2: d00c beq.n 8007cce <tcp_input+0x656>
|
|
8007cb4: 69fb ldr r3, [r7, #28]
|
|
8007cb6: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
|
|
8007cba: 69fb ldr r3, [r7, #28]
|
|
8007cbc: 6918 ldr r0, [r3, #16]
|
|
8007cbe: 4b39 ldr r3, [pc, #228] ; (8007da4 <tcp_input+0x72c>)
|
|
8007cc0: 681a ldr r2, [r3, #0]
|
|
8007cc2: 2300 movs r3, #0
|
|
8007cc4: 69f9 ldr r1, [r7, #28]
|
|
8007cc6: 47a0 blx r4
|
|
8007cc8: 4603 mov r3, r0
|
|
8007cca: 74fb strb r3, [r7, #19]
|
|
8007ccc: e008 b.n 8007ce0 <tcp_input+0x668>
|
|
8007cce: 4b35 ldr r3, [pc, #212] ; (8007da4 <tcp_input+0x72c>)
|
|
8007cd0: 681a ldr r2, [r3, #0]
|
|
8007cd2: 2300 movs r3, #0
|
|
8007cd4: 69f9 ldr r1, [r7, #28]
|
|
8007cd6: 2000 movs r0, #0
|
|
8007cd8: f7ff f95e bl 8006f98 <tcp_recv_null>
|
|
8007cdc: 4603 mov r3, r0
|
|
8007cde: 74fb strb r3, [r7, #19]
|
|
if (err == ERR_ABRT) {
|
|
8007ce0: f997 3013 ldrsb.w r3, [r7, #19]
|
|
8007ce4: f113 0f0d cmn.w r3, #13
|
|
8007ce8: d053 beq.n 8007d92 <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) {
|
|
8007cea: f997 3013 ldrsb.w r3, [r7, #19]
|
|
8007cee: 2b00 cmp r3, #0
|
|
8007cf0: d003 beq.n 8007cfa <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;
|
|
8007cf2: 4b2c ldr r3, [pc, #176] ; (8007da4 <tcp_input+0x72c>)
|
|
8007cf4: 681a ldr r2, [r3, #0]
|
|
8007cf6: 69fb ldr r3, [r7, #28]
|
|
8007cf8: 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) {
|
|
8007cfa: 4b2b ldr r3, [pc, #172] ; (8007da8 <tcp_input+0x730>)
|
|
8007cfc: 781b ldrb r3, [r3, #0]
|
|
8007cfe: f003 0320 and.w r3, r3, #32
|
|
8007d02: 2b00 cmp r3, #0
|
|
8007d04: d030 beq.n 8007d68 <tcp_input+0x6f0>
|
|
if (pcb->refused_data != NULL) {
|
|
8007d06: 69fb ldr r3, [r7, #28]
|
|
8007d08: 6f9b ldr r3, [r3, #120] ; 0x78
|
|
8007d0a: 2b00 cmp r3, #0
|
|
8007d0c: d009 beq.n 8007d22 <tcp_input+0x6aa>
|
|
/* Delay this if we have refused data. */
|
|
pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN;
|
|
8007d0e: 69fb ldr r3, [r7, #28]
|
|
8007d10: 6f9b ldr r3, [r3, #120] ; 0x78
|
|
8007d12: 7b5a ldrb r2, [r3, #13]
|
|
8007d14: 69fb ldr r3, [r7, #28]
|
|
8007d16: 6f9b ldr r3, [r3, #120] ; 0x78
|
|
8007d18: f042 0220 orr.w r2, r2, #32
|
|
8007d1c: b2d2 uxtb r2, r2
|
|
8007d1e: 735a strb r2, [r3, #13]
|
|
8007d20: e022 b.n 8007d68 <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)) {
|
|
8007d22: 69fb ldr r3, [r7, #28]
|
|
8007d24: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
8007d26: f5b3 6f06 cmp.w r3, #2144 ; 0x860
|
|
8007d2a: d005 beq.n 8007d38 <tcp_input+0x6c0>
|
|
pcb->rcv_wnd++;
|
|
8007d2c: 69fb ldr r3, [r7, #28]
|
|
8007d2e: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
8007d30: 3301 adds r3, #1
|
|
8007d32: b29a uxth r2, r3
|
|
8007d34: 69fb ldr r3, [r7, #28]
|
|
8007d36: 851a strh r2, [r3, #40] ; 0x28
|
|
}
|
|
TCP_EVENT_CLOSED(pcb, err);
|
|
8007d38: 69fb ldr r3, [r7, #28]
|
|
8007d3a: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
|
|
8007d3e: 2b00 cmp r3, #0
|
|
8007d40: d00b beq.n 8007d5a <tcp_input+0x6e2>
|
|
8007d42: 69fb ldr r3, [r7, #28]
|
|
8007d44: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
|
|
8007d48: 69fb ldr r3, [r7, #28]
|
|
8007d4a: 6918 ldr r0, [r3, #16]
|
|
8007d4c: 2300 movs r3, #0
|
|
8007d4e: 2200 movs r2, #0
|
|
8007d50: 69f9 ldr r1, [r7, #28]
|
|
8007d52: 47a0 blx r4
|
|
8007d54: 4603 mov r3, r0
|
|
8007d56: 74fb strb r3, [r7, #19]
|
|
8007d58: e001 b.n 8007d5e <tcp_input+0x6e6>
|
|
8007d5a: 2300 movs r3, #0
|
|
8007d5c: 74fb strb r3, [r7, #19]
|
|
if (err == ERR_ABRT) {
|
|
8007d5e: f997 3013 ldrsb.w r3, [r7, #19]
|
|
8007d62: f113 0f0d cmn.w r3, #13
|
|
8007d66: d016 beq.n 8007d96 <tcp_input+0x71e>
|
|
goto aborted;
|
|
}
|
|
}
|
|
}
|
|
|
|
tcp_input_pcb = NULL;
|
|
8007d68: 4b13 ldr r3, [pc, #76] ; (8007db8 <tcp_input+0x740>)
|
|
8007d6a: 2200 movs r2, #0
|
|
8007d6c: 601a str r2, [r3, #0]
|
|
if (tcp_input_delayed_close(pcb)) {
|
|
8007d6e: 69f8 ldr r0, [r7, #28]
|
|
8007d70: f000 f88e bl 8007e90 <tcp_input_delayed_close>
|
|
8007d74: 4603 mov r3, r0
|
|
8007d76: 2b00 cmp r3, #0
|
|
8007d78: d128 bne.n 8007dcc <tcp_input+0x754>
|
|
goto aborted;
|
|
}
|
|
/* Try to send something out. */
|
|
tcp_output(pcb);
|
|
8007d7a: 69f8 ldr r0, [r7, #28]
|
|
8007d7c: f002 fac8 bl 800a310 <tcp_output>
|
|
8007d80: e025 b.n 8007dce <tcp_input+0x756>
|
|
goto aborted;
|
|
8007d82: bf00 nop
|
|
8007d84: e023 b.n 8007dce <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:
|
|
8007d86: bf00 nop
|
|
8007d88: e021 b.n 8007dce <tcp_input+0x756>
|
|
goto aborted;
|
|
8007d8a: bf00 nop
|
|
8007d8c: e01f b.n 8007dce <tcp_input+0x756>
|
|
goto aborted;
|
|
8007d8e: bf00 nop
|
|
8007d90: e01d b.n 8007dce <tcp_input+0x756>
|
|
goto aborted;
|
|
8007d92: bf00 nop
|
|
8007d94: e01b b.n 8007dce <tcp_input+0x756>
|
|
goto aborted;
|
|
8007d96: bf00 nop
|
|
8007d98: e019 b.n 8007dce <tcp_input+0x756>
|
|
8007d9a: bf00 nop
|
|
8007d9c: 20008c18 .word 0x20008c18
|
|
8007da0: 20008c28 .word 0x20008c28
|
|
8007da4: 20008c48 .word 0x20008c48
|
|
8007da8: 20008c45 .word 0x20008c45
|
|
8007dac: 20008c40 .word 0x20008c40
|
|
8007db0: 20008c44 .word 0x20008c44
|
|
8007db4: 20008c42 .word 0x20008c42
|
|
8007db8: 20008c4c .word 0x20008c4c
|
|
8007dbc: 20008c0c .word 0x20008c0c
|
|
8007dc0: 08016284 .word 0x08016284
|
|
8007dc4: 08016438 .word 0x08016438
|
|
8007dc8: 080162d0 .word 0x080162d0
|
|
goto aborted;
|
|
8007dcc: bf00 nop
|
|
tcp_input_pcb = NULL;
|
|
8007dce: 4b27 ldr r3, [pc, #156] ; (8007e6c <tcp_input+0x7f4>)
|
|
8007dd0: 2200 movs r2, #0
|
|
8007dd2: 601a str r2, [r3, #0]
|
|
recv_data = NULL;
|
|
8007dd4: 4b26 ldr r3, [pc, #152] ; (8007e70 <tcp_input+0x7f8>)
|
|
8007dd6: 2200 movs r2, #0
|
|
8007dd8: 601a str r2, [r3, #0]
|
|
|
|
/* give up our reference to inseg.p */
|
|
if (inseg.p != NULL) {
|
|
8007dda: 4b26 ldr r3, [pc, #152] ; (8007e74 <tcp_input+0x7fc>)
|
|
8007ddc: 685b ldr r3, [r3, #4]
|
|
8007dde: 2b00 cmp r3, #0
|
|
8007de0: d03f beq.n 8007e62 <tcp_input+0x7ea>
|
|
pbuf_free(inseg.p);
|
|
8007de2: 4b24 ldr r3, [pc, #144] ; (8007e74 <tcp_input+0x7fc>)
|
|
8007de4: 685b ldr r3, [r3, #4]
|
|
8007de6: 4618 mov r0, r3
|
|
8007de8: f7fd fe0e bl 8005a08 <pbuf_free>
|
|
inseg.p = NULL;
|
|
8007dec: 4b21 ldr r3, [pc, #132] ; (8007e74 <tcp_input+0x7fc>)
|
|
8007dee: 2200 movs r2, #0
|
|
8007df0: 605a str r2, [r3, #4]
|
|
pbuf_free(p);
|
|
}
|
|
|
|
LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane());
|
|
PERF_STOP("tcp_input");
|
|
return;
|
|
8007df2: e036 b.n 8007e62 <tcp_input+0x7ea>
|
|
if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) {
|
|
8007df4: 4b20 ldr r3, [pc, #128] ; (8007e78 <tcp_input+0x800>)
|
|
8007df6: 681b ldr r3, [r3, #0]
|
|
8007df8: 899b ldrh r3, [r3, #12]
|
|
8007dfa: b29b uxth r3, r3
|
|
8007dfc: 4618 mov r0, r3
|
|
8007dfe: f7fc fa99 bl 8004334 <lwip_htons>
|
|
8007e02: 4603 mov r3, r0
|
|
8007e04: b2db uxtb r3, r3
|
|
8007e06: f003 0304 and.w r3, r3, #4
|
|
8007e0a: 2b00 cmp r3, #0
|
|
8007e0c: d118 bne.n 8007e40 <tcp_input+0x7c8>
|
|
tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(),
|
|
8007e0e: 4b1b ldr r3, [pc, #108] ; (8007e7c <tcp_input+0x804>)
|
|
8007e10: 6819 ldr r1, [r3, #0]
|
|
8007e12: 4b1b ldr r3, [pc, #108] ; (8007e80 <tcp_input+0x808>)
|
|
8007e14: 881b ldrh r3, [r3, #0]
|
|
8007e16: 461a mov r2, r3
|
|
8007e18: 4b1a ldr r3, [pc, #104] ; (8007e84 <tcp_input+0x80c>)
|
|
8007e1a: 681b ldr r3, [r3, #0]
|
|
8007e1c: 18d0 adds r0, r2, r3
|
|
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
|
|
8007e1e: 4b16 ldr r3, [pc, #88] ; (8007e78 <tcp_input+0x800>)
|
|
8007e20: 681b ldr r3, [r3, #0]
|
|
tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(),
|
|
8007e22: 885b ldrh r3, [r3, #2]
|
|
8007e24: b29b uxth r3, r3
|
|
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
|
|
8007e26: 4a14 ldr r2, [pc, #80] ; (8007e78 <tcp_input+0x800>)
|
|
8007e28: 6812 ldr r2, [r2, #0]
|
|
tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(),
|
|
8007e2a: 8812 ldrh r2, [r2, #0]
|
|
8007e2c: b292 uxth r2, r2
|
|
8007e2e: 9202 str r2, [sp, #8]
|
|
8007e30: 9301 str r3, [sp, #4]
|
|
8007e32: 4b15 ldr r3, [pc, #84] ; (8007e88 <tcp_input+0x810>)
|
|
8007e34: 9300 str r3, [sp, #0]
|
|
8007e36: 4b15 ldr r3, [pc, #84] ; (8007e8c <tcp_input+0x814>)
|
|
8007e38: 4602 mov r2, r0
|
|
8007e3a: 2000 movs r0, #0
|
|
8007e3c: f003 f81c bl 800ae78 <tcp_rst>
|
|
pbuf_free(p);
|
|
8007e40: 6878 ldr r0, [r7, #4]
|
|
8007e42: f7fd fde1 bl 8005a08 <pbuf_free>
|
|
return;
|
|
8007e46: e00c b.n 8007e62 <tcp_input+0x7ea>
|
|
goto dropped;
|
|
8007e48: bf00 nop
|
|
8007e4a: e006 b.n 8007e5a <tcp_input+0x7e2>
|
|
goto dropped;
|
|
8007e4c: bf00 nop
|
|
8007e4e: e004 b.n 8007e5a <tcp_input+0x7e2>
|
|
goto dropped;
|
|
8007e50: bf00 nop
|
|
8007e52: e002 b.n 8007e5a <tcp_input+0x7e2>
|
|
goto dropped;
|
|
8007e54: bf00 nop
|
|
8007e56: e000 b.n 8007e5a <tcp_input+0x7e2>
|
|
goto dropped;
|
|
8007e58: bf00 nop
|
|
dropped:
|
|
TCP_STATS_INC(tcp.drop);
|
|
MIB2_STATS_INC(mib2.tcpinerrs);
|
|
pbuf_free(p);
|
|
8007e5a: 6878 ldr r0, [r7, #4]
|
|
8007e5c: f7fd fdd4 bl 8005a08 <pbuf_free>
|
|
8007e60: e000 b.n 8007e64 <tcp_input+0x7ec>
|
|
return;
|
|
8007e62: bf00 nop
|
|
}
|
|
8007e64: 3724 adds r7, #36 ; 0x24
|
|
8007e66: 46bd mov sp, r7
|
|
8007e68: bd90 pop {r4, r7, pc}
|
|
8007e6a: bf00 nop
|
|
8007e6c: 20008c4c .word 0x20008c4c
|
|
8007e70: 20008c48 .word 0x20008c48
|
|
8007e74: 20008c18 .word 0x20008c18
|
|
8007e78: 20008c28 .word 0x20008c28
|
|
8007e7c: 20008c3c .word 0x20008c3c
|
|
8007e80: 20008c42 .word 0x20008c42
|
|
8007e84: 20008c38 .word 0x20008c38
|
|
8007e88: 20005680 .word 0x20005680
|
|
8007e8c: 20005684 .word 0x20005684
|
|
|
|
08007e90 <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)
|
|
{
|
|
8007e90: b580 push {r7, lr}
|
|
8007e92: b082 sub sp, #8
|
|
8007e94: af00 add r7, sp, #0
|
|
8007e96: 6078 str r0, [r7, #4]
|
|
LWIP_ASSERT("tcp_input_delayed_close: invalid pcb", pcb != NULL);
|
|
8007e98: 687b ldr r3, [r7, #4]
|
|
8007e9a: 2b00 cmp r3, #0
|
|
8007e9c: d106 bne.n 8007eac <tcp_input_delayed_close+0x1c>
|
|
8007e9e: 4b17 ldr r3, [pc, #92] ; (8007efc <tcp_input_delayed_close+0x6c>)
|
|
8007ea0: f240 225a movw r2, #602 ; 0x25a
|
|
8007ea4: 4916 ldr r1, [pc, #88] ; (8007f00 <tcp_input_delayed_close+0x70>)
|
|
8007ea6: 4817 ldr r0, [pc, #92] ; (8007f04 <tcp_input_delayed_close+0x74>)
|
|
8007ea8: f008 fb26 bl 80104f8 <printf>
|
|
|
|
if (recv_flags & TF_CLOSED) {
|
|
8007eac: 4b16 ldr r3, [pc, #88] ; (8007f08 <tcp_input_delayed_close+0x78>)
|
|
8007eae: 781b ldrb r3, [r3, #0]
|
|
8007eb0: f003 0310 and.w r3, r3, #16
|
|
8007eb4: 2b00 cmp r3, #0
|
|
8007eb6: d01c beq.n 8007ef2 <tcp_input_delayed_close+0x62>
|
|
/* The connection has been closed and we will deallocate the
|
|
PCB. */
|
|
if (!(pcb->flags & TF_RXCLOSED)) {
|
|
8007eb8: 687b ldr r3, [r7, #4]
|
|
8007eba: 8b5b ldrh r3, [r3, #26]
|
|
8007ebc: f003 0310 and.w r3, r3, #16
|
|
8007ec0: 2b00 cmp r3, #0
|
|
8007ec2: d10d bne.n 8007ee0 <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);
|
|
8007ec4: 687b ldr r3, [r7, #4]
|
|
8007ec6: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
|
|
8007eca: 2b00 cmp r3, #0
|
|
8007ecc: d008 beq.n 8007ee0 <tcp_input_delayed_close+0x50>
|
|
8007ece: 687b ldr r3, [r7, #4]
|
|
8007ed0: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
|
|
8007ed4: 687a ldr r2, [r7, #4]
|
|
8007ed6: 6912 ldr r2, [r2, #16]
|
|
8007ed8: f06f 010e mvn.w r1, #14
|
|
8007edc: 4610 mov r0, r2
|
|
8007ede: 4798 blx r3
|
|
}
|
|
tcp_pcb_remove(&tcp_active_pcbs, pcb);
|
|
8007ee0: 6879 ldr r1, [r7, #4]
|
|
8007ee2: 480a ldr r0, [pc, #40] ; (8007f0c <tcp_input_delayed_close+0x7c>)
|
|
8007ee4: f7ff fa50 bl 8007388 <tcp_pcb_remove>
|
|
tcp_free(pcb);
|
|
8007ee8: 6878 ldr r0, [r7, #4]
|
|
8007eea: f7fe f83d bl 8005f68 <tcp_free>
|
|
return 1;
|
|
8007eee: 2301 movs r3, #1
|
|
8007ef0: e000 b.n 8007ef4 <tcp_input_delayed_close+0x64>
|
|
}
|
|
return 0;
|
|
8007ef2: 2300 movs r3, #0
|
|
}
|
|
8007ef4: 4618 mov r0, r3
|
|
8007ef6: 3708 adds r7, #8
|
|
8007ef8: 46bd mov sp, r7
|
|
8007efa: bd80 pop {r7, pc}
|
|
8007efc: 08016284 .word 0x08016284
|
|
8007f00: 08016454 .word 0x08016454
|
|
8007f04: 080162d0 .word 0x080162d0
|
|
8007f08: 20008c45 .word 0x20008c45
|
|
8007f0c: 20008c0c .word 0x20008c0c
|
|
|
|
08007f10 <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)
|
|
{
|
|
8007f10: b590 push {r4, r7, lr}
|
|
8007f12: b08b sub sp, #44 ; 0x2c
|
|
8007f14: af04 add r7, sp, #16
|
|
8007f16: 6078 str r0, [r7, #4]
|
|
struct tcp_pcb *npcb;
|
|
u32_t iss;
|
|
err_t rc;
|
|
|
|
if (flags & TCP_RST) {
|
|
8007f18: 4b6f ldr r3, [pc, #444] ; (80080d8 <tcp_listen_input+0x1c8>)
|
|
8007f1a: 781b ldrb r3, [r3, #0]
|
|
8007f1c: f003 0304 and.w r3, r3, #4
|
|
8007f20: 2b00 cmp r3, #0
|
|
8007f22: f040 80d2 bne.w 80080ca <tcp_listen_input+0x1ba>
|
|
/* An incoming RST should be ignored. Return. */
|
|
return;
|
|
}
|
|
|
|
LWIP_ASSERT("tcp_listen_input: invalid pcb", pcb != NULL);
|
|
8007f26: 687b ldr r3, [r7, #4]
|
|
8007f28: 2b00 cmp r3, #0
|
|
8007f2a: d106 bne.n 8007f3a <tcp_listen_input+0x2a>
|
|
8007f2c: 4b6b ldr r3, [pc, #428] ; (80080dc <tcp_listen_input+0x1cc>)
|
|
8007f2e: f240 2281 movw r2, #641 ; 0x281
|
|
8007f32: 496b ldr r1, [pc, #428] ; (80080e0 <tcp_listen_input+0x1d0>)
|
|
8007f34: 486b ldr r0, [pc, #428] ; (80080e4 <tcp_listen_input+0x1d4>)
|
|
8007f36: f008 fadf bl 80104f8 <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) {
|
|
8007f3a: 4b67 ldr r3, [pc, #412] ; (80080d8 <tcp_listen_input+0x1c8>)
|
|
8007f3c: 781b ldrb r3, [r3, #0]
|
|
8007f3e: f003 0310 and.w r3, r3, #16
|
|
8007f42: 2b00 cmp r3, #0
|
|
8007f44: d019 beq.n 8007f7a <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(),
|
|
8007f46: 4b68 ldr r3, [pc, #416] ; (80080e8 <tcp_listen_input+0x1d8>)
|
|
8007f48: 6819 ldr r1, [r3, #0]
|
|
8007f4a: 4b68 ldr r3, [pc, #416] ; (80080ec <tcp_listen_input+0x1dc>)
|
|
8007f4c: 881b ldrh r3, [r3, #0]
|
|
8007f4e: 461a mov r2, r3
|
|
8007f50: 4b67 ldr r3, [pc, #412] ; (80080f0 <tcp_listen_input+0x1e0>)
|
|
8007f52: 681b ldr r3, [r3, #0]
|
|
8007f54: 18d0 adds r0, r2, r3
|
|
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
|
|
8007f56: 4b67 ldr r3, [pc, #412] ; (80080f4 <tcp_listen_input+0x1e4>)
|
|
8007f58: 681b ldr r3, [r3, #0]
|
|
tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
|
|
8007f5a: 885b ldrh r3, [r3, #2]
|
|
8007f5c: b29b uxth r3, r3
|
|
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
|
|
8007f5e: 4a65 ldr r2, [pc, #404] ; (80080f4 <tcp_listen_input+0x1e4>)
|
|
8007f60: 6812 ldr r2, [r2, #0]
|
|
tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
|
|
8007f62: 8812 ldrh r2, [r2, #0]
|
|
8007f64: b292 uxth r2, r2
|
|
8007f66: 9202 str r2, [sp, #8]
|
|
8007f68: 9301 str r3, [sp, #4]
|
|
8007f6a: 4b63 ldr r3, [pc, #396] ; (80080f8 <tcp_listen_input+0x1e8>)
|
|
8007f6c: 9300 str r3, [sp, #0]
|
|
8007f6e: 4b63 ldr r3, [pc, #396] ; (80080fc <tcp_listen_input+0x1ec>)
|
|
8007f70: 4602 mov r2, r0
|
|
8007f72: 6878 ldr r0, [r7, #4]
|
|
8007f74: f002 ff80 bl 800ae78 <tcp_rst>
|
|
tcp_abandon(npcb, 0);
|
|
return;
|
|
}
|
|
tcp_output(npcb);
|
|
}
|
|
return;
|
|
8007f78: e0a9 b.n 80080ce <tcp_listen_input+0x1be>
|
|
} else if (flags & TCP_SYN) {
|
|
8007f7a: 4b57 ldr r3, [pc, #348] ; (80080d8 <tcp_listen_input+0x1c8>)
|
|
8007f7c: 781b ldrb r3, [r3, #0]
|
|
8007f7e: f003 0302 and.w r3, r3, #2
|
|
8007f82: 2b00 cmp r3, #0
|
|
8007f84: f000 80a3 beq.w 80080ce <tcp_listen_input+0x1be>
|
|
npcb = tcp_alloc(pcb->prio);
|
|
8007f88: 687b ldr r3, [r7, #4]
|
|
8007f8a: 7d5b ldrb r3, [r3, #21]
|
|
8007f8c: 4618 mov r0, r3
|
|
8007f8e: f7ff f927 bl 80071e0 <tcp_alloc>
|
|
8007f92: 6178 str r0, [r7, #20]
|
|
if (npcb == NULL) {
|
|
8007f94: 697b ldr r3, [r7, #20]
|
|
8007f96: 2b00 cmp r3, #0
|
|
8007f98: d111 bne.n 8007fbe <tcp_listen_input+0xae>
|
|
TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err);
|
|
8007f9a: 687b ldr r3, [r7, #4]
|
|
8007f9c: 699b ldr r3, [r3, #24]
|
|
8007f9e: 2b00 cmp r3, #0
|
|
8007fa0: d00a beq.n 8007fb8 <tcp_listen_input+0xa8>
|
|
8007fa2: 687b ldr r3, [r7, #4]
|
|
8007fa4: 699b ldr r3, [r3, #24]
|
|
8007fa6: 687a ldr r2, [r7, #4]
|
|
8007fa8: 6910 ldr r0, [r2, #16]
|
|
8007faa: f04f 32ff mov.w r2, #4294967295
|
|
8007fae: 2100 movs r1, #0
|
|
8007fb0: 4798 blx r3
|
|
8007fb2: 4603 mov r3, r0
|
|
8007fb4: 73bb strb r3, [r7, #14]
|
|
return;
|
|
8007fb6: e08b b.n 80080d0 <tcp_listen_input+0x1c0>
|
|
TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err);
|
|
8007fb8: 23f0 movs r3, #240 ; 0xf0
|
|
8007fba: 73bb strb r3, [r7, #14]
|
|
return;
|
|
8007fbc: e088 b.n 80080d0 <tcp_listen_input+0x1c0>
|
|
ip_addr_copy(npcb->local_ip, *ip_current_dest_addr());
|
|
8007fbe: 4b50 ldr r3, [pc, #320] ; (8008100 <tcp_listen_input+0x1f0>)
|
|
8007fc0: 695a ldr r2, [r3, #20]
|
|
8007fc2: 697b ldr r3, [r7, #20]
|
|
8007fc4: 601a str r2, [r3, #0]
|
|
ip_addr_copy(npcb->remote_ip, *ip_current_src_addr());
|
|
8007fc6: 4b4e ldr r3, [pc, #312] ; (8008100 <tcp_listen_input+0x1f0>)
|
|
8007fc8: 691a ldr r2, [r3, #16]
|
|
8007fca: 697b ldr r3, [r7, #20]
|
|
8007fcc: 605a str r2, [r3, #4]
|
|
npcb->local_port = pcb->local_port;
|
|
8007fce: 687b ldr r3, [r7, #4]
|
|
8007fd0: 8ada ldrh r2, [r3, #22]
|
|
8007fd2: 697b ldr r3, [r7, #20]
|
|
8007fd4: 82da strh r2, [r3, #22]
|
|
npcb->remote_port = tcphdr->src;
|
|
8007fd6: 4b47 ldr r3, [pc, #284] ; (80080f4 <tcp_listen_input+0x1e4>)
|
|
8007fd8: 681b ldr r3, [r3, #0]
|
|
8007fda: 881b ldrh r3, [r3, #0]
|
|
8007fdc: b29a uxth r2, r3
|
|
8007fde: 697b ldr r3, [r7, #20]
|
|
8007fe0: 831a strh r2, [r3, #24]
|
|
npcb->state = SYN_RCVD;
|
|
8007fe2: 697b ldr r3, [r7, #20]
|
|
8007fe4: 2203 movs r2, #3
|
|
8007fe6: 751a strb r2, [r3, #20]
|
|
npcb->rcv_nxt = seqno + 1;
|
|
8007fe8: 4b41 ldr r3, [pc, #260] ; (80080f0 <tcp_listen_input+0x1e0>)
|
|
8007fea: 681b ldr r3, [r3, #0]
|
|
8007fec: 1c5a adds r2, r3, #1
|
|
8007fee: 697b ldr r3, [r7, #20]
|
|
8007ff0: 625a str r2, [r3, #36] ; 0x24
|
|
npcb->rcv_ann_right_edge = npcb->rcv_nxt;
|
|
8007ff2: 697b ldr r3, [r7, #20]
|
|
8007ff4: 6a5a ldr r2, [r3, #36] ; 0x24
|
|
8007ff6: 697b ldr r3, [r7, #20]
|
|
8007ff8: 62da str r2, [r3, #44] ; 0x2c
|
|
iss = tcp_next_iss(npcb);
|
|
8007ffa: 6978 ldr r0, [r7, #20]
|
|
8007ffc: f7ff fa58 bl 80074b0 <tcp_next_iss>
|
|
8008000: 6138 str r0, [r7, #16]
|
|
npcb->snd_wl2 = iss;
|
|
8008002: 697b ldr r3, [r7, #20]
|
|
8008004: 693a ldr r2, [r7, #16]
|
|
8008006: 659a str r2, [r3, #88] ; 0x58
|
|
npcb->snd_nxt = iss;
|
|
8008008: 697b ldr r3, [r7, #20]
|
|
800800a: 693a ldr r2, [r7, #16]
|
|
800800c: 651a str r2, [r3, #80] ; 0x50
|
|
npcb->lastack = iss;
|
|
800800e: 697b ldr r3, [r7, #20]
|
|
8008010: 693a ldr r2, [r7, #16]
|
|
8008012: 645a str r2, [r3, #68] ; 0x44
|
|
npcb->snd_lbb = iss;
|
|
8008014: 697b ldr r3, [r7, #20]
|
|
8008016: 693a ldr r2, [r7, #16]
|
|
8008018: 65da str r2, [r3, #92] ; 0x5c
|
|
npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */
|
|
800801a: 4b35 ldr r3, [pc, #212] ; (80080f0 <tcp_listen_input+0x1e0>)
|
|
800801c: 681b ldr r3, [r3, #0]
|
|
800801e: 1e5a subs r2, r3, #1
|
|
8008020: 697b ldr r3, [r7, #20]
|
|
8008022: 655a str r2, [r3, #84] ; 0x54
|
|
npcb->callback_arg = pcb->callback_arg;
|
|
8008024: 687b ldr r3, [r7, #4]
|
|
8008026: 691a ldr r2, [r3, #16]
|
|
8008028: 697b ldr r3, [r7, #20]
|
|
800802a: 611a str r2, [r3, #16]
|
|
npcb->listener = pcb;
|
|
800802c: 697b ldr r3, [r7, #20]
|
|
800802e: 687a ldr r2, [r7, #4]
|
|
8008030: 67da str r2, [r3, #124] ; 0x7c
|
|
npcb->so_options = pcb->so_options & SOF_INHERITED;
|
|
8008032: 687b ldr r3, [r7, #4]
|
|
8008034: 7a5b ldrb r3, [r3, #9]
|
|
8008036: f003 030c and.w r3, r3, #12
|
|
800803a: b2da uxtb r2, r3
|
|
800803c: 697b ldr r3, [r7, #20]
|
|
800803e: 725a strb r2, [r3, #9]
|
|
npcb->netif_idx = pcb->netif_idx;
|
|
8008040: 687b ldr r3, [r7, #4]
|
|
8008042: 7a1a ldrb r2, [r3, #8]
|
|
8008044: 697b ldr r3, [r7, #20]
|
|
8008046: 721a strb r2, [r3, #8]
|
|
TCP_REG_ACTIVE(npcb);
|
|
8008048: 4b2e ldr r3, [pc, #184] ; (8008104 <tcp_listen_input+0x1f4>)
|
|
800804a: 681a ldr r2, [r3, #0]
|
|
800804c: 697b ldr r3, [r7, #20]
|
|
800804e: 60da str r2, [r3, #12]
|
|
8008050: 4a2c ldr r2, [pc, #176] ; (8008104 <tcp_listen_input+0x1f4>)
|
|
8008052: 697b ldr r3, [r7, #20]
|
|
8008054: 6013 str r3, [r2, #0]
|
|
8008056: f003 f8d1 bl 800b1fc <tcp_timer_needed>
|
|
800805a: 4b2b ldr r3, [pc, #172] ; (8008108 <tcp_listen_input+0x1f8>)
|
|
800805c: 2201 movs r2, #1
|
|
800805e: 701a strb r2, [r3, #0]
|
|
tcp_parseopt(npcb);
|
|
8008060: 6978 ldr r0, [r7, #20]
|
|
8008062: f001 fd8f bl 8009b84 <tcp_parseopt>
|
|
npcb->snd_wnd = tcphdr->wnd;
|
|
8008066: 4b23 ldr r3, [pc, #140] ; (80080f4 <tcp_listen_input+0x1e4>)
|
|
8008068: 681b ldr r3, [r3, #0]
|
|
800806a: 89db ldrh r3, [r3, #14]
|
|
800806c: b29a uxth r2, r3
|
|
800806e: 697b ldr r3, [r7, #20]
|
|
8008070: f8a3 2060 strh.w r2, [r3, #96] ; 0x60
|
|
npcb->snd_wnd_max = npcb->snd_wnd;
|
|
8008074: 697b ldr r3, [r7, #20]
|
|
8008076: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
|
|
800807a: 697b ldr r3, [r7, #20]
|
|
800807c: f8a3 2062 strh.w r2, [r3, #98] ; 0x62
|
|
npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, &npcb->remote_ip);
|
|
8008080: 697b ldr r3, [r7, #20]
|
|
8008082: 8e5c ldrh r4, [r3, #50] ; 0x32
|
|
8008084: 697b ldr r3, [r7, #20]
|
|
8008086: 3304 adds r3, #4
|
|
8008088: 4618 mov r0, r3
|
|
800808a: f006 fe89 bl 800eda0 <ip4_route>
|
|
800808e: 4601 mov r1, r0
|
|
8008090: 697b ldr r3, [r7, #20]
|
|
8008092: 3304 adds r3, #4
|
|
8008094: 461a mov r2, r3
|
|
8008096: 4620 mov r0, r4
|
|
8008098: f7ff fa30 bl 80074fc <tcp_eff_send_mss_netif>
|
|
800809c: 4603 mov r3, r0
|
|
800809e: 461a mov r2, r3
|
|
80080a0: 697b ldr r3, [r7, #20]
|
|
80080a2: 865a strh r2, [r3, #50] ; 0x32
|
|
rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK);
|
|
80080a4: 2112 movs r1, #18
|
|
80080a6: 6978 ldr r0, [r7, #20]
|
|
80080a8: f002 f844 bl 800a134 <tcp_enqueue_flags>
|
|
80080ac: 4603 mov r3, r0
|
|
80080ae: 73fb strb r3, [r7, #15]
|
|
if (rc != ERR_OK) {
|
|
80080b0: f997 300f ldrsb.w r3, [r7, #15]
|
|
80080b4: 2b00 cmp r3, #0
|
|
80080b6: d004 beq.n 80080c2 <tcp_listen_input+0x1b2>
|
|
tcp_abandon(npcb, 0);
|
|
80080b8: 2100 movs r1, #0
|
|
80080ba: 6978 ldr r0, [r7, #20]
|
|
80080bc: f7fe f97e bl 80063bc <tcp_abandon>
|
|
return;
|
|
80080c0: e006 b.n 80080d0 <tcp_listen_input+0x1c0>
|
|
tcp_output(npcb);
|
|
80080c2: 6978 ldr r0, [r7, #20]
|
|
80080c4: f002 f924 bl 800a310 <tcp_output>
|
|
return;
|
|
80080c8: e001 b.n 80080ce <tcp_listen_input+0x1be>
|
|
return;
|
|
80080ca: bf00 nop
|
|
80080cc: e000 b.n 80080d0 <tcp_listen_input+0x1c0>
|
|
return;
|
|
80080ce: bf00 nop
|
|
}
|
|
80080d0: 371c adds r7, #28
|
|
80080d2: 46bd mov sp, r7
|
|
80080d4: bd90 pop {r4, r7, pc}
|
|
80080d6: bf00 nop
|
|
80080d8: 20008c44 .word 0x20008c44
|
|
80080dc: 08016284 .word 0x08016284
|
|
80080e0: 0801647c .word 0x0801647c
|
|
80080e4: 080162d0 .word 0x080162d0
|
|
80080e8: 20008c3c .word 0x20008c3c
|
|
80080ec: 20008c42 .word 0x20008c42
|
|
80080f0: 20008c38 .word 0x20008c38
|
|
80080f4: 20008c28 .word 0x20008c28
|
|
80080f8: 20005680 .word 0x20005680
|
|
80080fc: 20005684 .word 0x20005684
|
|
8008100: 20005670 .word 0x20005670
|
|
8008104: 20008c0c .word 0x20008c0c
|
|
8008108: 20008c14 .word 0x20008c14
|
|
|
|
0800810c <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)
|
|
{
|
|
800810c: b580 push {r7, lr}
|
|
800810e: b086 sub sp, #24
|
|
8008110: af04 add r7, sp, #16
|
|
8008112: 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) {
|
|
8008114: 4b2f ldr r3, [pc, #188] ; (80081d4 <tcp_timewait_input+0xc8>)
|
|
8008116: 781b ldrb r3, [r3, #0]
|
|
8008118: f003 0304 and.w r3, r3, #4
|
|
800811c: 2b00 cmp r3, #0
|
|
800811e: d153 bne.n 80081c8 <tcp_timewait_input+0xbc>
|
|
return;
|
|
}
|
|
|
|
LWIP_ASSERT("tcp_timewait_input: invalid pcb", pcb != NULL);
|
|
8008120: 687b ldr r3, [r7, #4]
|
|
8008122: 2b00 cmp r3, #0
|
|
8008124: d106 bne.n 8008134 <tcp_timewait_input+0x28>
|
|
8008126: 4b2c ldr r3, [pc, #176] ; (80081d8 <tcp_timewait_input+0xcc>)
|
|
8008128: f240 22ee movw r2, #750 ; 0x2ee
|
|
800812c: 492b ldr r1, [pc, #172] ; (80081dc <tcp_timewait_input+0xd0>)
|
|
800812e: 482c ldr r0, [pc, #176] ; (80081e0 <tcp_timewait_input+0xd4>)
|
|
8008130: f008 f9e2 bl 80104f8 <printf>
|
|
|
|
/* - fourth, check the SYN bit, */
|
|
if (flags & TCP_SYN) {
|
|
8008134: 4b27 ldr r3, [pc, #156] ; (80081d4 <tcp_timewait_input+0xc8>)
|
|
8008136: 781b ldrb r3, [r3, #0]
|
|
8008138: f003 0302 and.w r3, r3, #2
|
|
800813c: 2b00 cmp r3, #0
|
|
800813e: d02a beq.n 8008196 <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)) {
|
|
8008140: 4b28 ldr r3, [pc, #160] ; (80081e4 <tcp_timewait_input+0xd8>)
|
|
8008142: 681a ldr r2, [r3, #0]
|
|
8008144: 687b ldr r3, [r7, #4]
|
|
8008146: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
8008148: 1ad3 subs r3, r2, r3
|
|
800814a: 2b00 cmp r3, #0
|
|
800814c: db2d blt.n 80081aa <tcp_timewait_input+0x9e>
|
|
800814e: 4b25 ldr r3, [pc, #148] ; (80081e4 <tcp_timewait_input+0xd8>)
|
|
8008150: 681a ldr r2, [r3, #0]
|
|
8008152: 687b ldr r3, [r7, #4]
|
|
8008154: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
8008156: 6879 ldr r1, [r7, #4]
|
|
8008158: 8d09 ldrh r1, [r1, #40] ; 0x28
|
|
800815a: 440b add r3, r1
|
|
800815c: 1ad3 subs r3, r2, r3
|
|
800815e: 2b00 cmp r3, #0
|
|
8008160: dc23 bgt.n 80081aa <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(),
|
|
8008162: 4b21 ldr r3, [pc, #132] ; (80081e8 <tcp_timewait_input+0xdc>)
|
|
8008164: 6819 ldr r1, [r3, #0]
|
|
8008166: 4b21 ldr r3, [pc, #132] ; (80081ec <tcp_timewait_input+0xe0>)
|
|
8008168: 881b ldrh r3, [r3, #0]
|
|
800816a: 461a mov r2, r3
|
|
800816c: 4b1d ldr r3, [pc, #116] ; (80081e4 <tcp_timewait_input+0xd8>)
|
|
800816e: 681b ldr r3, [r3, #0]
|
|
8008170: 18d0 adds r0, r2, r3
|
|
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
|
|
8008172: 4b1f ldr r3, [pc, #124] ; (80081f0 <tcp_timewait_input+0xe4>)
|
|
8008174: 681b ldr r3, [r3, #0]
|
|
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
|
|
8008176: 885b ldrh r3, [r3, #2]
|
|
8008178: b29b uxth r3, r3
|
|
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
|
|
800817a: 4a1d ldr r2, [pc, #116] ; (80081f0 <tcp_timewait_input+0xe4>)
|
|
800817c: 6812 ldr r2, [r2, #0]
|
|
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
|
|
800817e: 8812 ldrh r2, [r2, #0]
|
|
8008180: b292 uxth r2, r2
|
|
8008182: 9202 str r2, [sp, #8]
|
|
8008184: 9301 str r3, [sp, #4]
|
|
8008186: 4b1b ldr r3, [pc, #108] ; (80081f4 <tcp_timewait_input+0xe8>)
|
|
8008188: 9300 str r3, [sp, #0]
|
|
800818a: 4b1b ldr r3, [pc, #108] ; (80081f8 <tcp_timewait_input+0xec>)
|
|
800818c: 4602 mov r2, r0
|
|
800818e: 6878 ldr r0, [r7, #4]
|
|
8008190: f002 fe72 bl 800ae78 <tcp_rst>
|
|
return;
|
|
8008194: e01b b.n 80081ce <tcp_timewait_input+0xc2>
|
|
}
|
|
} else if (flags & TCP_FIN) {
|
|
8008196: 4b0f ldr r3, [pc, #60] ; (80081d4 <tcp_timewait_input+0xc8>)
|
|
8008198: 781b ldrb r3, [r3, #0]
|
|
800819a: f003 0301 and.w r3, r3, #1
|
|
800819e: 2b00 cmp r3, #0
|
|
80081a0: d003 beq.n 80081aa <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;
|
|
80081a2: 4b16 ldr r3, [pc, #88] ; (80081fc <tcp_timewait_input+0xf0>)
|
|
80081a4: 681a ldr r2, [r3, #0]
|
|
80081a6: 687b ldr r3, [r7, #4]
|
|
80081a8: 621a str r2, [r3, #32]
|
|
}
|
|
|
|
if ((tcplen > 0)) {
|
|
80081aa: 4b10 ldr r3, [pc, #64] ; (80081ec <tcp_timewait_input+0xe0>)
|
|
80081ac: 881b ldrh r3, [r3, #0]
|
|
80081ae: 2b00 cmp r3, #0
|
|
80081b0: d00c beq.n 80081cc <tcp_timewait_input+0xc0>
|
|
/* Acknowledge data, FIN or out-of-window SYN */
|
|
tcp_ack_now(pcb);
|
|
80081b2: 687b ldr r3, [r7, #4]
|
|
80081b4: 8b5b ldrh r3, [r3, #26]
|
|
80081b6: f043 0302 orr.w r3, r3, #2
|
|
80081ba: b29a uxth r2, r3
|
|
80081bc: 687b ldr r3, [r7, #4]
|
|
80081be: 835a strh r2, [r3, #26]
|
|
tcp_output(pcb);
|
|
80081c0: 6878 ldr r0, [r7, #4]
|
|
80081c2: f002 f8a5 bl 800a310 <tcp_output>
|
|
}
|
|
return;
|
|
80081c6: e001 b.n 80081cc <tcp_timewait_input+0xc0>
|
|
return;
|
|
80081c8: bf00 nop
|
|
80081ca: e000 b.n 80081ce <tcp_timewait_input+0xc2>
|
|
return;
|
|
80081cc: bf00 nop
|
|
}
|
|
80081ce: 3708 adds r7, #8
|
|
80081d0: 46bd mov sp, r7
|
|
80081d2: bd80 pop {r7, pc}
|
|
80081d4: 20008c44 .word 0x20008c44
|
|
80081d8: 08016284 .word 0x08016284
|
|
80081dc: 0801649c .word 0x0801649c
|
|
80081e0: 080162d0 .word 0x080162d0
|
|
80081e4: 20008c38 .word 0x20008c38
|
|
80081e8: 20008c3c .word 0x20008c3c
|
|
80081ec: 20008c42 .word 0x20008c42
|
|
80081f0: 20008c28 .word 0x20008c28
|
|
80081f4: 20005680 .word 0x20005680
|
|
80081f8: 20005684 .word 0x20005684
|
|
80081fc: 20008c00 .word 0x20008c00
|
|
|
|
08008200 <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)
|
|
{
|
|
8008200: b590 push {r4, r7, lr}
|
|
8008202: b08d sub sp, #52 ; 0x34
|
|
8008204: af04 add r7, sp, #16
|
|
8008206: 6078 str r0, [r7, #4]
|
|
struct tcp_seg *rseg;
|
|
u8_t acceptable = 0;
|
|
8008208: 2300 movs r3, #0
|
|
800820a: 76fb strb r3, [r7, #27]
|
|
err_t err;
|
|
|
|
err = ERR_OK;
|
|
800820c: 2300 movs r3, #0
|
|
800820e: 76bb strb r3, [r7, #26]
|
|
|
|
LWIP_ASSERT("tcp_process: invalid pcb", pcb != NULL);
|
|
8008210: 687b ldr r3, [r7, #4]
|
|
8008212: 2b00 cmp r3, #0
|
|
8008214: d106 bne.n 8008224 <tcp_process+0x24>
|
|
8008216: 4b9d ldr r3, [pc, #628] ; (800848c <tcp_process+0x28c>)
|
|
8008218: f44f 7247 mov.w r2, #796 ; 0x31c
|
|
800821c: 499c ldr r1, [pc, #624] ; (8008490 <tcp_process+0x290>)
|
|
800821e: 489d ldr r0, [pc, #628] ; (8008494 <tcp_process+0x294>)
|
|
8008220: f008 f96a bl 80104f8 <printf>
|
|
|
|
/* Process incoming RST segments. */
|
|
if (flags & TCP_RST) {
|
|
8008224: 4b9c ldr r3, [pc, #624] ; (8008498 <tcp_process+0x298>)
|
|
8008226: 781b ldrb r3, [r3, #0]
|
|
8008228: f003 0304 and.w r3, r3, #4
|
|
800822c: 2b00 cmp r3, #0
|
|
800822e: d04e beq.n 80082ce <tcp_process+0xce>
|
|
/* First, determine if the reset is acceptable. */
|
|
if (pcb->state == SYN_SENT) {
|
|
8008230: 687b ldr r3, [r7, #4]
|
|
8008232: 7d1b ldrb r3, [r3, #20]
|
|
8008234: 2b02 cmp r3, #2
|
|
8008236: d108 bne.n 800824a <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) {
|
|
8008238: 687b ldr r3, [r7, #4]
|
|
800823a: 6d1a ldr r2, [r3, #80] ; 0x50
|
|
800823c: 4b97 ldr r3, [pc, #604] ; (800849c <tcp_process+0x29c>)
|
|
800823e: 681b ldr r3, [r3, #0]
|
|
8008240: 429a cmp r2, r3
|
|
8008242: d123 bne.n 800828c <tcp_process+0x8c>
|
|
acceptable = 1;
|
|
8008244: 2301 movs r3, #1
|
|
8008246: 76fb strb r3, [r7, #27]
|
|
8008248: e020 b.n 800828c <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) {
|
|
800824a: 687b ldr r3, [r7, #4]
|
|
800824c: 6a5a ldr r2, [r3, #36] ; 0x24
|
|
800824e: 4b94 ldr r3, [pc, #592] ; (80084a0 <tcp_process+0x2a0>)
|
|
8008250: 681b ldr r3, [r3, #0]
|
|
8008252: 429a cmp r2, r3
|
|
8008254: d102 bne.n 800825c <tcp_process+0x5c>
|
|
acceptable = 1;
|
|
8008256: 2301 movs r3, #1
|
|
8008258: 76fb strb r3, [r7, #27]
|
|
800825a: e017 b.n 800828c <tcp_process+0x8c>
|
|
} else if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
|
|
800825c: 4b90 ldr r3, [pc, #576] ; (80084a0 <tcp_process+0x2a0>)
|
|
800825e: 681a ldr r2, [r3, #0]
|
|
8008260: 687b ldr r3, [r7, #4]
|
|
8008262: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
8008264: 1ad3 subs r3, r2, r3
|
|
8008266: 2b00 cmp r3, #0
|
|
8008268: db10 blt.n 800828c <tcp_process+0x8c>
|
|
800826a: 4b8d ldr r3, [pc, #564] ; (80084a0 <tcp_process+0x2a0>)
|
|
800826c: 681a ldr r2, [r3, #0]
|
|
800826e: 687b ldr r3, [r7, #4]
|
|
8008270: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
8008272: 6879 ldr r1, [r7, #4]
|
|
8008274: 8d09 ldrh r1, [r1, #40] ; 0x28
|
|
8008276: 440b add r3, r1
|
|
8008278: 1ad3 subs r3, r2, r3
|
|
800827a: 2b00 cmp r3, #0
|
|
800827c: dc06 bgt.n 800828c <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);
|
|
800827e: 687b ldr r3, [r7, #4]
|
|
8008280: 8b5b ldrh r3, [r3, #26]
|
|
8008282: f043 0302 orr.w r3, r3, #2
|
|
8008286: b29a uxth r2, r3
|
|
8008288: 687b ldr r3, [r7, #4]
|
|
800828a: 835a strh r2, [r3, #26]
|
|
}
|
|
}
|
|
|
|
if (acceptable) {
|
|
800828c: 7efb ldrb r3, [r7, #27]
|
|
800828e: 2b00 cmp r3, #0
|
|
8008290: d01b beq.n 80082ca <tcp_process+0xca>
|
|
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: Connection RESET\n"));
|
|
LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED);
|
|
8008292: 687b ldr r3, [r7, #4]
|
|
8008294: 7d1b ldrb r3, [r3, #20]
|
|
8008296: 2b00 cmp r3, #0
|
|
8008298: d106 bne.n 80082a8 <tcp_process+0xa8>
|
|
800829a: 4b7c ldr r3, [pc, #496] ; (800848c <tcp_process+0x28c>)
|
|
800829c: f44f 724e mov.w r2, #824 ; 0x338
|
|
80082a0: 4980 ldr r1, [pc, #512] ; (80084a4 <tcp_process+0x2a4>)
|
|
80082a2: 487c ldr r0, [pc, #496] ; (8008494 <tcp_process+0x294>)
|
|
80082a4: f008 f928 bl 80104f8 <printf>
|
|
recv_flags |= TF_RESET;
|
|
80082a8: 4b7f ldr r3, [pc, #508] ; (80084a8 <tcp_process+0x2a8>)
|
|
80082aa: 781b ldrb r3, [r3, #0]
|
|
80082ac: f043 0308 orr.w r3, r3, #8
|
|
80082b0: b2da uxtb r2, r3
|
|
80082b2: 4b7d ldr r3, [pc, #500] ; (80084a8 <tcp_process+0x2a8>)
|
|
80082b4: 701a strb r2, [r3, #0]
|
|
tcp_clear_flags(pcb, TF_ACK_DELAY);
|
|
80082b6: 687b ldr r3, [r7, #4]
|
|
80082b8: 8b5b ldrh r3, [r3, #26]
|
|
80082ba: f023 0301 bic.w r3, r3, #1
|
|
80082be: b29a uxth r2, r3
|
|
80082c0: 687b ldr r3, [r7, #4]
|
|
80082c2: 835a strh r2, [r3, #26]
|
|
return ERR_RST;
|
|
80082c4: f06f 030d mvn.w r3, #13
|
|
80082c8: e37a b.n 80089c0 <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;
|
|
80082ca: 2300 movs r3, #0
|
|
80082cc: e378 b.n 80089c0 <tcp_process+0x7c0>
|
|
}
|
|
}
|
|
|
|
if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) {
|
|
80082ce: 4b72 ldr r3, [pc, #456] ; (8008498 <tcp_process+0x298>)
|
|
80082d0: 781b ldrb r3, [r3, #0]
|
|
80082d2: f003 0302 and.w r3, r3, #2
|
|
80082d6: 2b00 cmp r3, #0
|
|
80082d8: d010 beq.n 80082fc <tcp_process+0xfc>
|
|
80082da: 687b ldr r3, [r7, #4]
|
|
80082dc: 7d1b ldrb r3, [r3, #20]
|
|
80082de: 2b02 cmp r3, #2
|
|
80082e0: d00c beq.n 80082fc <tcp_process+0xfc>
|
|
80082e2: 687b ldr r3, [r7, #4]
|
|
80082e4: 7d1b ldrb r3, [r3, #20]
|
|
80082e6: 2b03 cmp r3, #3
|
|
80082e8: d008 beq.n 80082fc <tcp_process+0xfc>
|
|
/* Cope with new connection attempt after remote end crashed */
|
|
tcp_ack_now(pcb);
|
|
80082ea: 687b ldr r3, [r7, #4]
|
|
80082ec: 8b5b ldrh r3, [r3, #26]
|
|
80082ee: f043 0302 orr.w r3, r3, #2
|
|
80082f2: b29a uxth r2, r3
|
|
80082f4: 687b ldr r3, [r7, #4]
|
|
80082f6: 835a strh r2, [r3, #26]
|
|
return ERR_OK;
|
|
80082f8: 2300 movs r3, #0
|
|
80082fa: e361 b.n 80089c0 <tcp_process+0x7c0>
|
|
}
|
|
|
|
if ((pcb->flags & TF_RXCLOSED) == 0) {
|
|
80082fc: 687b ldr r3, [r7, #4]
|
|
80082fe: 8b5b ldrh r3, [r3, #26]
|
|
8008300: f003 0310 and.w r3, r3, #16
|
|
8008304: 2b00 cmp r3, #0
|
|
8008306: d103 bne.n 8008310 <tcp_process+0x110>
|
|
/* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */
|
|
pcb->tmr = tcp_ticks;
|
|
8008308: 4b68 ldr r3, [pc, #416] ; (80084ac <tcp_process+0x2ac>)
|
|
800830a: 681a ldr r2, [r3, #0]
|
|
800830c: 687b ldr r3, [r7, #4]
|
|
800830e: 621a str r2, [r3, #32]
|
|
}
|
|
pcb->keep_cnt_sent = 0;
|
|
8008310: 687b ldr r3, [r7, #4]
|
|
8008312: 2200 movs r2, #0
|
|
8008314: f883 209b strb.w r2, [r3, #155] ; 0x9b
|
|
pcb->persist_probe = 0;
|
|
8008318: 687b ldr r3, [r7, #4]
|
|
800831a: 2200 movs r2, #0
|
|
800831c: f883 209a strb.w r2, [r3, #154] ; 0x9a
|
|
|
|
tcp_parseopt(pcb);
|
|
8008320: 6878 ldr r0, [r7, #4]
|
|
8008322: f001 fc2f bl 8009b84 <tcp_parseopt>
|
|
|
|
/* Do different things depending on the TCP state. */
|
|
switch (pcb->state) {
|
|
8008326: 687b ldr r3, [r7, #4]
|
|
8008328: 7d1b ldrb r3, [r3, #20]
|
|
800832a: 3b02 subs r3, #2
|
|
800832c: 2b07 cmp r3, #7
|
|
800832e: f200 8337 bhi.w 80089a0 <tcp_process+0x7a0>
|
|
8008332: a201 add r2, pc, #4 ; (adr r2, 8008338 <tcp_process+0x138>)
|
|
8008334: f852 f023 ldr.w pc, [r2, r3, lsl #2]
|
|
8008338: 08008359 .word 0x08008359
|
|
800833c: 08008589 .word 0x08008589
|
|
8008340: 08008701 .word 0x08008701
|
|
8008344: 0800872b .word 0x0800872b
|
|
8008348: 0800884f .word 0x0800884f
|
|
800834c: 08008701 .word 0x08008701
|
|
8008350: 080088db .word 0x080088db
|
|
8008354: 0800896b .word 0x0800896b
|
|
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)
|
|
8008358: 4b4f ldr r3, [pc, #316] ; (8008498 <tcp_process+0x298>)
|
|
800835a: 781b ldrb r3, [r3, #0]
|
|
800835c: f003 0310 and.w r3, r3, #16
|
|
8008360: 2b00 cmp r3, #0
|
|
8008362: f000 80e4 beq.w 800852e <tcp_process+0x32e>
|
|
8008366: 4b4c ldr r3, [pc, #304] ; (8008498 <tcp_process+0x298>)
|
|
8008368: 781b ldrb r3, [r3, #0]
|
|
800836a: f003 0302 and.w r3, r3, #2
|
|
800836e: 2b00 cmp r3, #0
|
|
8008370: f000 80dd beq.w 800852e <tcp_process+0x32e>
|
|
&& (ackno == pcb->lastack + 1)) {
|
|
8008374: 687b ldr r3, [r7, #4]
|
|
8008376: 6c5b ldr r3, [r3, #68] ; 0x44
|
|
8008378: 1c5a adds r2, r3, #1
|
|
800837a: 4b48 ldr r3, [pc, #288] ; (800849c <tcp_process+0x29c>)
|
|
800837c: 681b ldr r3, [r3, #0]
|
|
800837e: 429a cmp r2, r3
|
|
8008380: f040 80d5 bne.w 800852e <tcp_process+0x32e>
|
|
pcb->rcv_nxt = seqno + 1;
|
|
8008384: 4b46 ldr r3, [pc, #280] ; (80084a0 <tcp_process+0x2a0>)
|
|
8008386: 681b ldr r3, [r3, #0]
|
|
8008388: 1c5a adds r2, r3, #1
|
|
800838a: 687b ldr r3, [r7, #4]
|
|
800838c: 625a str r2, [r3, #36] ; 0x24
|
|
pcb->rcv_ann_right_edge = pcb->rcv_nxt;
|
|
800838e: 687b ldr r3, [r7, #4]
|
|
8008390: 6a5a ldr r2, [r3, #36] ; 0x24
|
|
8008392: 687b ldr r3, [r7, #4]
|
|
8008394: 62da str r2, [r3, #44] ; 0x2c
|
|
pcb->lastack = ackno;
|
|
8008396: 4b41 ldr r3, [pc, #260] ; (800849c <tcp_process+0x29c>)
|
|
8008398: 681a ldr r2, [r3, #0]
|
|
800839a: 687b ldr r3, [r7, #4]
|
|
800839c: 645a str r2, [r3, #68] ; 0x44
|
|
pcb->snd_wnd = tcphdr->wnd;
|
|
800839e: 4b44 ldr r3, [pc, #272] ; (80084b0 <tcp_process+0x2b0>)
|
|
80083a0: 681b ldr r3, [r3, #0]
|
|
80083a2: 89db ldrh r3, [r3, #14]
|
|
80083a4: b29a uxth r2, r3
|
|
80083a6: 687b ldr r3, [r7, #4]
|
|
80083a8: f8a3 2060 strh.w r2, [r3, #96] ; 0x60
|
|
pcb->snd_wnd_max = pcb->snd_wnd;
|
|
80083ac: 687b ldr r3, [r7, #4]
|
|
80083ae: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
|
|
80083b2: 687b ldr r3, [r7, #4]
|
|
80083b4: f8a3 2062 strh.w r2, [r3, #98] ; 0x62
|
|
pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */
|
|
80083b8: 4b39 ldr r3, [pc, #228] ; (80084a0 <tcp_process+0x2a0>)
|
|
80083ba: 681b ldr r3, [r3, #0]
|
|
80083bc: 1e5a subs r2, r3, #1
|
|
80083be: 687b ldr r3, [r7, #4]
|
|
80083c0: 655a str r2, [r3, #84] ; 0x54
|
|
pcb->state = ESTABLISHED;
|
|
80083c2: 687b ldr r3, [r7, #4]
|
|
80083c4: 2204 movs r2, #4
|
|
80083c6: 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);
|
|
80083c8: 687b ldr r3, [r7, #4]
|
|
80083ca: 8e5c ldrh r4, [r3, #50] ; 0x32
|
|
80083cc: 687b ldr r3, [r7, #4]
|
|
80083ce: 3304 adds r3, #4
|
|
80083d0: 4618 mov r0, r3
|
|
80083d2: f006 fce5 bl 800eda0 <ip4_route>
|
|
80083d6: 4601 mov r1, r0
|
|
80083d8: 687b ldr r3, [r7, #4]
|
|
80083da: 3304 adds r3, #4
|
|
80083dc: 461a mov r2, r3
|
|
80083de: 4620 mov r0, r4
|
|
80083e0: f7ff f88c bl 80074fc <tcp_eff_send_mss_netif>
|
|
80083e4: 4603 mov r3, r0
|
|
80083e6: 461a mov r2, r3
|
|
80083e8: 687b ldr r3, [r7, #4]
|
|
80083ea: 865a strh r2, [r3, #50] ; 0x32
|
|
#endif /* TCP_CALCULATE_EFF_SEND_MSS */
|
|
|
|
pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
|
|
80083ec: 687b ldr r3, [r7, #4]
|
|
80083ee: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
80083f0: 009a lsls r2, r3, #2
|
|
80083f2: 687b ldr r3, [r7, #4]
|
|
80083f4: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
80083f6: 005b lsls r3, r3, #1
|
|
80083f8: f241 111c movw r1, #4380 ; 0x111c
|
|
80083fc: 428b cmp r3, r1
|
|
80083fe: bf38 it cc
|
|
8008400: 460b movcc r3, r1
|
|
8008402: 429a cmp r2, r3
|
|
8008404: d204 bcs.n 8008410 <tcp_process+0x210>
|
|
8008406: 687b ldr r3, [r7, #4]
|
|
8008408: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
800840a: 009b lsls r3, r3, #2
|
|
800840c: b29b uxth r3, r3
|
|
800840e: e00d b.n 800842c <tcp_process+0x22c>
|
|
8008410: 687b ldr r3, [r7, #4]
|
|
8008412: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
8008414: 005b lsls r3, r3, #1
|
|
8008416: f241 121c movw r2, #4380 ; 0x111c
|
|
800841a: 4293 cmp r3, r2
|
|
800841c: d904 bls.n 8008428 <tcp_process+0x228>
|
|
800841e: 687b ldr r3, [r7, #4]
|
|
8008420: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
8008422: 005b lsls r3, r3, #1
|
|
8008424: b29b uxth r3, r3
|
|
8008426: e001 b.n 800842c <tcp_process+0x22c>
|
|
8008428: f241 131c movw r3, #4380 ; 0x111c
|
|
800842c: 687a ldr r2, [r7, #4]
|
|
800842e: 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));
|
|
8008432: 687b ldr r3, [r7, #4]
|
|
8008434: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
|
|
8008438: 2b00 cmp r3, #0
|
|
800843a: d106 bne.n 800844a <tcp_process+0x24a>
|
|
800843c: 4b13 ldr r3, [pc, #76] ; (800848c <tcp_process+0x28c>)
|
|
800843e: f44f 725b mov.w r2, #876 ; 0x36c
|
|
8008442: 491c ldr r1, [pc, #112] ; (80084b4 <tcp_process+0x2b4>)
|
|
8008444: 4813 ldr r0, [pc, #76] ; (8008494 <tcp_process+0x294>)
|
|
8008446: f008 f857 bl 80104f8 <printf>
|
|
--pcb->snd_queuelen;
|
|
800844a: 687b ldr r3, [r7, #4]
|
|
800844c: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
|
|
8008450: 3b01 subs r3, #1
|
|
8008452: b29a uxth r2, r3
|
|
8008454: 687b ldr r3, [r7, #4]
|
|
8008456: 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;
|
|
800845a: 687b ldr r3, [r7, #4]
|
|
800845c: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
800845e: 61fb str r3, [r7, #28]
|
|
if (rseg == NULL) {
|
|
8008460: 69fb ldr r3, [r7, #28]
|
|
8008462: 2b00 cmp r3, #0
|
|
8008464: d12a bne.n 80084bc <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;
|
|
8008466: 687b ldr r3, [r7, #4]
|
|
8008468: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
800846a: 61fb str r3, [r7, #28]
|
|
LWIP_ASSERT("no segment to free", rseg != NULL);
|
|
800846c: 69fb ldr r3, [r7, #28]
|
|
800846e: 2b00 cmp r3, #0
|
|
8008470: d106 bne.n 8008480 <tcp_process+0x280>
|
|
8008472: 4b06 ldr r3, [pc, #24] ; (800848c <tcp_process+0x28c>)
|
|
8008474: f44f 725d mov.w r2, #884 ; 0x374
|
|
8008478: 490f ldr r1, [pc, #60] ; (80084b8 <tcp_process+0x2b8>)
|
|
800847a: 4806 ldr r0, [pc, #24] ; (8008494 <tcp_process+0x294>)
|
|
800847c: f008 f83c bl 80104f8 <printf>
|
|
pcb->unsent = rseg->next;
|
|
8008480: 69fb ldr r3, [r7, #28]
|
|
8008482: 681a ldr r2, [r3, #0]
|
|
8008484: 687b ldr r3, [r7, #4]
|
|
8008486: 66da str r2, [r3, #108] ; 0x6c
|
|
8008488: e01c b.n 80084c4 <tcp_process+0x2c4>
|
|
800848a: bf00 nop
|
|
800848c: 08016284 .word 0x08016284
|
|
8008490: 080164bc .word 0x080164bc
|
|
8008494: 080162d0 .word 0x080162d0
|
|
8008498: 20008c44 .word 0x20008c44
|
|
800849c: 20008c3c .word 0x20008c3c
|
|
80084a0: 20008c38 .word 0x20008c38
|
|
80084a4: 080164d8 .word 0x080164d8
|
|
80084a8: 20008c45 .word 0x20008c45
|
|
80084ac: 20008c00 .word 0x20008c00
|
|
80084b0: 20008c28 .word 0x20008c28
|
|
80084b4: 080164f8 .word 0x080164f8
|
|
80084b8: 08016510 .word 0x08016510
|
|
} else {
|
|
pcb->unacked = rseg->next;
|
|
80084bc: 69fb ldr r3, [r7, #28]
|
|
80084be: 681a ldr r2, [r3, #0]
|
|
80084c0: 687b ldr r3, [r7, #4]
|
|
80084c2: 671a str r2, [r3, #112] ; 0x70
|
|
}
|
|
tcp_seg_free(rseg);
|
|
80084c4: 69f8 ldr r0, [r7, #28]
|
|
80084c6: f7fe fd22 bl 8006f0e <tcp_seg_free>
|
|
|
|
/* If there's nothing left to acknowledge, stop the retransmit
|
|
timer, otherwise reset it to start again */
|
|
if (pcb->unacked == NULL) {
|
|
80084ca: 687b ldr r3, [r7, #4]
|
|
80084cc: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
80084ce: 2b00 cmp r3, #0
|
|
80084d0: d104 bne.n 80084dc <tcp_process+0x2dc>
|
|
pcb->rtime = -1;
|
|
80084d2: 687b ldr r3, [r7, #4]
|
|
80084d4: f64f 72ff movw r2, #65535 ; 0xffff
|
|
80084d8: 861a strh r2, [r3, #48] ; 0x30
|
|
80084da: e006 b.n 80084ea <tcp_process+0x2ea>
|
|
} else {
|
|
pcb->rtime = 0;
|
|
80084dc: 687b ldr r3, [r7, #4]
|
|
80084de: 2200 movs r2, #0
|
|
80084e0: 861a strh r2, [r3, #48] ; 0x30
|
|
pcb->nrtx = 0;
|
|
80084e2: 687b ldr r3, [r7, #4]
|
|
80084e4: 2200 movs r2, #0
|
|
80084e6: 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);
|
|
80084ea: 687b ldr r3, [r7, #4]
|
|
80084ec: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
|
|
80084f0: 2b00 cmp r3, #0
|
|
80084f2: d00a beq.n 800850a <tcp_process+0x30a>
|
|
80084f4: 687b ldr r3, [r7, #4]
|
|
80084f6: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
|
|
80084fa: 687a ldr r2, [r7, #4]
|
|
80084fc: 6910 ldr r0, [r2, #16]
|
|
80084fe: 2200 movs r2, #0
|
|
8008500: 6879 ldr r1, [r7, #4]
|
|
8008502: 4798 blx r3
|
|
8008504: 4603 mov r3, r0
|
|
8008506: 76bb strb r3, [r7, #26]
|
|
8008508: e001 b.n 800850e <tcp_process+0x30e>
|
|
800850a: 2300 movs r3, #0
|
|
800850c: 76bb strb r3, [r7, #26]
|
|
if (err == ERR_ABRT) {
|
|
800850e: f997 301a ldrsb.w r3, [r7, #26]
|
|
8008512: f113 0f0d cmn.w r3, #13
|
|
8008516: d102 bne.n 800851e <tcp_process+0x31e>
|
|
return ERR_ABRT;
|
|
8008518: f06f 030c mvn.w r3, #12
|
|
800851c: e250 b.n 80089c0 <tcp_process+0x7c0>
|
|
}
|
|
tcp_ack_now(pcb);
|
|
800851e: 687b ldr r3, [r7, #4]
|
|
8008520: 8b5b ldrh r3, [r3, #26]
|
|
8008522: f043 0302 orr.w r3, r3, #2
|
|
8008526: b29a uxth r2, r3
|
|
8008528: 687b ldr r3, [r7, #4]
|
|
800852a: 835a strh r2, [r3, #26]
|
|
if (pcb->nrtx < TCP_SYNMAXRTX) {
|
|
pcb->rtime = 0;
|
|
tcp_rexmit_rto(pcb);
|
|
}
|
|
}
|
|
break;
|
|
800852c: e23a b.n 80089a4 <tcp_process+0x7a4>
|
|
else if (flags & TCP_ACK) {
|
|
800852e: 4b98 ldr r3, [pc, #608] ; (8008790 <tcp_process+0x590>)
|
|
8008530: 781b ldrb r3, [r3, #0]
|
|
8008532: f003 0310 and.w r3, r3, #16
|
|
8008536: 2b00 cmp r3, #0
|
|
8008538: f000 8234 beq.w 80089a4 <tcp_process+0x7a4>
|
|
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
|
|
800853c: 4b95 ldr r3, [pc, #596] ; (8008794 <tcp_process+0x594>)
|
|
800853e: 6819 ldr r1, [r3, #0]
|
|
8008540: 4b95 ldr r3, [pc, #596] ; (8008798 <tcp_process+0x598>)
|
|
8008542: 881b ldrh r3, [r3, #0]
|
|
8008544: 461a mov r2, r3
|
|
8008546: 4b95 ldr r3, [pc, #596] ; (800879c <tcp_process+0x59c>)
|
|
8008548: 681b ldr r3, [r3, #0]
|
|
800854a: 18d0 adds r0, r2, r3
|
|
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
|
|
800854c: 4b94 ldr r3, [pc, #592] ; (80087a0 <tcp_process+0x5a0>)
|
|
800854e: 681b ldr r3, [r3, #0]
|
|
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
|
|
8008550: 885b ldrh r3, [r3, #2]
|
|
8008552: b29b uxth r3, r3
|
|
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
|
|
8008554: 4a92 ldr r2, [pc, #584] ; (80087a0 <tcp_process+0x5a0>)
|
|
8008556: 6812 ldr r2, [r2, #0]
|
|
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
|
|
8008558: 8812 ldrh r2, [r2, #0]
|
|
800855a: b292 uxth r2, r2
|
|
800855c: 9202 str r2, [sp, #8]
|
|
800855e: 9301 str r3, [sp, #4]
|
|
8008560: 4b90 ldr r3, [pc, #576] ; (80087a4 <tcp_process+0x5a4>)
|
|
8008562: 9300 str r3, [sp, #0]
|
|
8008564: 4b90 ldr r3, [pc, #576] ; (80087a8 <tcp_process+0x5a8>)
|
|
8008566: 4602 mov r2, r0
|
|
8008568: 6878 ldr r0, [r7, #4]
|
|
800856a: f002 fc85 bl 800ae78 <tcp_rst>
|
|
if (pcb->nrtx < TCP_SYNMAXRTX) {
|
|
800856e: 687b ldr r3, [r7, #4]
|
|
8008570: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
|
|
8008574: 2b05 cmp r3, #5
|
|
8008576: f200 8215 bhi.w 80089a4 <tcp_process+0x7a4>
|
|
pcb->rtime = 0;
|
|
800857a: 687b ldr r3, [r7, #4]
|
|
800857c: 2200 movs r2, #0
|
|
800857e: 861a strh r2, [r3, #48] ; 0x30
|
|
tcp_rexmit_rto(pcb);
|
|
8008580: 6878 ldr r0, [r7, #4]
|
|
8008582: f002 fa4f bl 800aa24 <tcp_rexmit_rto>
|
|
break;
|
|
8008586: e20d b.n 80089a4 <tcp_process+0x7a4>
|
|
case SYN_RCVD:
|
|
if (flags & TCP_ACK) {
|
|
8008588: 4b81 ldr r3, [pc, #516] ; (8008790 <tcp_process+0x590>)
|
|
800858a: 781b ldrb r3, [r3, #0]
|
|
800858c: f003 0310 and.w r3, r3, #16
|
|
8008590: 2b00 cmp r3, #0
|
|
8008592: f000 80a1 beq.w 80086d8 <tcp_process+0x4d8>
|
|
/* expected ACK number? */
|
|
if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
|
|
8008596: 4b7f ldr r3, [pc, #508] ; (8008794 <tcp_process+0x594>)
|
|
8008598: 681a ldr r2, [r3, #0]
|
|
800859a: 687b ldr r3, [r7, #4]
|
|
800859c: 6c5b ldr r3, [r3, #68] ; 0x44
|
|
800859e: 1ad3 subs r3, r2, r3
|
|
80085a0: 3b01 subs r3, #1
|
|
80085a2: 2b00 cmp r3, #0
|
|
80085a4: db7e blt.n 80086a4 <tcp_process+0x4a4>
|
|
80085a6: 4b7b ldr r3, [pc, #492] ; (8008794 <tcp_process+0x594>)
|
|
80085a8: 681a ldr r2, [r3, #0]
|
|
80085aa: 687b ldr r3, [r7, #4]
|
|
80085ac: 6d1b ldr r3, [r3, #80] ; 0x50
|
|
80085ae: 1ad3 subs r3, r2, r3
|
|
80085b0: 2b00 cmp r3, #0
|
|
80085b2: dc77 bgt.n 80086a4 <tcp_process+0x4a4>
|
|
pcb->state = ESTABLISHED;
|
|
80085b4: 687b ldr r3, [r7, #4]
|
|
80085b6: 2204 movs r2, #4
|
|
80085b8: 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) {
|
|
80085ba: 687b ldr r3, [r7, #4]
|
|
80085bc: 6fdb ldr r3, [r3, #124] ; 0x7c
|
|
80085be: 2b00 cmp r3, #0
|
|
80085c0: d102 bne.n 80085c8 <tcp_process+0x3c8>
|
|
/* listen pcb might be closed by now */
|
|
err = ERR_VAL;
|
|
80085c2: 23fa movs r3, #250 ; 0xfa
|
|
80085c4: 76bb strb r3, [r7, #26]
|
|
80085c6: e01d b.n 8008604 <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);
|
|
80085c8: 687b ldr r3, [r7, #4]
|
|
80085ca: 6fdb ldr r3, [r3, #124] ; 0x7c
|
|
80085cc: 699b ldr r3, [r3, #24]
|
|
80085ce: 2b00 cmp r3, #0
|
|
80085d0: d106 bne.n 80085e0 <tcp_process+0x3e0>
|
|
80085d2: 4b76 ldr r3, [pc, #472] ; (80087ac <tcp_process+0x5ac>)
|
|
80085d4: f44f 726a mov.w r2, #936 ; 0x3a8
|
|
80085d8: 4975 ldr r1, [pc, #468] ; (80087b0 <tcp_process+0x5b0>)
|
|
80085da: 4876 ldr r0, [pc, #472] ; (80087b4 <tcp_process+0x5b4>)
|
|
80085dc: f007 ff8c bl 80104f8 <printf>
|
|
#endif
|
|
tcp_backlog_accepted(pcb);
|
|
/* Call the accept function. */
|
|
TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err);
|
|
80085e0: 687b ldr r3, [r7, #4]
|
|
80085e2: 6fdb ldr r3, [r3, #124] ; 0x7c
|
|
80085e4: 699b ldr r3, [r3, #24]
|
|
80085e6: 2b00 cmp r3, #0
|
|
80085e8: d00a beq.n 8008600 <tcp_process+0x400>
|
|
80085ea: 687b ldr r3, [r7, #4]
|
|
80085ec: 6fdb ldr r3, [r3, #124] ; 0x7c
|
|
80085ee: 699b ldr r3, [r3, #24]
|
|
80085f0: 687a ldr r2, [r7, #4]
|
|
80085f2: 6910 ldr r0, [r2, #16]
|
|
80085f4: 2200 movs r2, #0
|
|
80085f6: 6879 ldr r1, [r7, #4]
|
|
80085f8: 4798 blx r3
|
|
80085fa: 4603 mov r3, r0
|
|
80085fc: 76bb strb r3, [r7, #26]
|
|
80085fe: e001 b.n 8008604 <tcp_process+0x404>
|
|
8008600: 23f0 movs r3, #240 ; 0xf0
|
|
8008602: 76bb strb r3, [r7, #26]
|
|
}
|
|
if (err != ERR_OK) {
|
|
8008604: f997 301a ldrsb.w r3, [r7, #26]
|
|
8008608: 2b00 cmp r3, #0
|
|
800860a: d00a beq.n 8008622 <tcp_process+0x422>
|
|
/* If the accept function returns with an error, we abort
|
|
* the connection. */
|
|
/* Already aborted? */
|
|
if (err != ERR_ABRT) {
|
|
800860c: f997 301a ldrsb.w r3, [r7, #26]
|
|
8008610: f113 0f0d cmn.w r3, #13
|
|
8008614: d002 beq.n 800861c <tcp_process+0x41c>
|
|
tcp_abort(pcb);
|
|
8008616: 6878 ldr r0, [r7, #4]
|
|
8008618: f7fd ff8e bl 8006538 <tcp_abort>
|
|
}
|
|
return ERR_ABRT;
|
|
800861c: f06f 030c mvn.w r3, #12
|
|
8008620: e1ce b.n 80089c0 <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);
|
|
8008622: 6878 ldr r0, [r7, #4]
|
|
8008624: f000 fae0 bl 8008be8 <tcp_receive>
|
|
|
|
/* Prevent ACK for SYN to generate a sent event */
|
|
if (recv_acked != 0) {
|
|
8008628: 4b63 ldr r3, [pc, #396] ; (80087b8 <tcp_process+0x5b8>)
|
|
800862a: 881b ldrh r3, [r3, #0]
|
|
800862c: 2b00 cmp r3, #0
|
|
800862e: d005 beq.n 800863c <tcp_process+0x43c>
|
|
recv_acked--;
|
|
8008630: 4b61 ldr r3, [pc, #388] ; (80087b8 <tcp_process+0x5b8>)
|
|
8008632: 881b ldrh r3, [r3, #0]
|
|
8008634: 3b01 subs r3, #1
|
|
8008636: b29a uxth r2, r3
|
|
8008638: 4b5f ldr r3, [pc, #380] ; (80087b8 <tcp_process+0x5b8>)
|
|
800863a: 801a strh r2, [r3, #0]
|
|
}
|
|
|
|
pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
|
|
800863c: 687b ldr r3, [r7, #4]
|
|
800863e: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
8008640: 009a lsls r2, r3, #2
|
|
8008642: 687b ldr r3, [r7, #4]
|
|
8008644: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
8008646: 005b lsls r3, r3, #1
|
|
8008648: f241 111c movw r1, #4380 ; 0x111c
|
|
800864c: 428b cmp r3, r1
|
|
800864e: bf38 it cc
|
|
8008650: 460b movcc r3, r1
|
|
8008652: 429a cmp r2, r3
|
|
8008654: d204 bcs.n 8008660 <tcp_process+0x460>
|
|
8008656: 687b ldr r3, [r7, #4]
|
|
8008658: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
800865a: 009b lsls r3, r3, #2
|
|
800865c: b29b uxth r3, r3
|
|
800865e: e00d b.n 800867c <tcp_process+0x47c>
|
|
8008660: 687b ldr r3, [r7, #4]
|
|
8008662: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
8008664: 005b lsls r3, r3, #1
|
|
8008666: f241 121c movw r2, #4380 ; 0x111c
|
|
800866a: 4293 cmp r3, r2
|
|
800866c: d904 bls.n 8008678 <tcp_process+0x478>
|
|
800866e: 687b ldr r3, [r7, #4]
|
|
8008670: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
8008672: 005b lsls r3, r3, #1
|
|
8008674: b29b uxth r3, r3
|
|
8008676: e001 b.n 800867c <tcp_process+0x47c>
|
|
8008678: f241 131c movw r3, #4380 ; 0x111c
|
|
800867c: 687a ldr r2, [r7, #4]
|
|
800867e: 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) {
|
|
8008682: 4b4e ldr r3, [pc, #312] ; (80087bc <tcp_process+0x5bc>)
|
|
8008684: 781b ldrb r3, [r3, #0]
|
|
8008686: f003 0320 and.w r3, r3, #32
|
|
800868a: 2b00 cmp r3, #0
|
|
800868c: d037 beq.n 80086fe <tcp_process+0x4fe>
|
|
tcp_ack_now(pcb);
|
|
800868e: 687b ldr r3, [r7, #4]
|
|
8008690: 8b5b ldrh r3, [r3, #26]
|
|
8008692: f043 0302 orr.w r3, r3, #2
|
|
8008696: b29a uxth r2, r3
|
|
8008698: 687b ldr r3, [r7, #4]
|
|
800869a: 835a strh r2, [r3, #26]
|
|
pcb->state = CLOSE_WAIT;
|
|
800869c: 687b ldr r3, [r7, #4]
|
|
800869e: 2207 movs r2, #7
|
|
80086a0: 751a strb r2, [r3, #20]
|
|
if (recv_flags & TF_GOT_FIN) {
|
|
80086a2: e02c b.n 80086fe <tcp_process+0x4fe>
|
|
}
|
|
} else {
|
|
/* incorrect ACK number, send RST */
|
|
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
|
|
80086a4: 4b3b ldr r3, [pc, #236] ; (8008794 <tcp_process+0x594>)
|
|
80086a6: 6819 ldr r1, [r3, #0]
|
|
80086a8: 4b3b ldr r3, [pc, #236] ; (8008798 <tcp_process+0x598>)
|
|
80086aa: 881b ldrh r3, [r3, #0]
|
|
80086ac: 461a mov r2, r3
|
|
80086ae: 4b3b ldr r3, [pc, #236] ; (800879c <tcp_process+0x59c>)
|
|
80086b0: 681b ldr r3, [r3, #0]
|
|
80086b2: 18d0 adds r0, r2, r3
|
|
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
|
|
80086b4: 4b3a ldr r3, [pc, #232] ; (80087a0 <tcp_process+0x5a0>)
|
|
80086b6: 681b ldr r3, [r3, #0]
|
|
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
|
|
80086b8: 885b ldrh r3, [r3, #2]
|
|
80086ba: b29b uxth r3, r3
|
|
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
|
|
80086bc: 4a38 ldr r2, [pc, #224] ; (80087a0 <tcp_process+0x5a0>)
|
|
80086be: 6812 ldr r2, [r2, #0]
|
|
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
|
|
80086c0: 8812 ldrh r2, [r2, #0]
|
|
80086c2: b292 uxth r2, r2
|
|
80086c4: 9202 str r2, [sp, #8]
|
|
80086c6: 9301 str r3, [sp, #4]
|
|
80086c8: 4b36 ldr r3, [pc, #216] ; (80087a4 <tcp_process+0x5a4>)
|
|
80086ca: 9300 str r3, [sp, #0]
|
|
80086cc: 4b36 ldr r3, [pc, #216] ; (80087a8 <tcp_process+0x5a8>)
|
|
80086ce: 4602 mov r2, r0
|
|
80086d0: 6878 ldr r0, [r7, #4]
|
|
80086d2: f002 fbd1 bl 800ae78 <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;
|
|
80086d6: e167 b.n 80089a8 <tcp_process+0x7a8>
|
|
} else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) {
|
|
80086d8: 4b2d ldr r3, [pc, #180] ; (8008790 <tcp_process+0x590>)
|
|
80086da: 781b ldrb r3, [r3, #0]
|
|
80086dc: f003 0302 and.w r3, r3, #2
|
|
80086e0: 2b00 cmp r3, #0
|
|
80086e2: f000 8161 beq.w 80089a8 <tcp_process+0x7a8>
|
|
80086e6: 687b ldr r3, [r7, #4]
|
|
80086e8: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
80086ea: 1e5a subs r2, r3, #1
|
|
80086ec: 4b2b ldr r3, [pc, #172] ; (800879c <tcp_process+0x59c>)
|
|
80086ee: 681b ldr r3, [r3, #0]
|
|
80086f0: 429a cmp r2, r3
|
|
80086f2: f040 8159 bne.w 80089a8 <tcp_process+0x7a8>
|
|
tcp_rexmit(pcb);
|
|
80086f6: 6878 ldr r0, [r7, #4]
|
|
80086f8: f002 f9b6 bl 800aa68 <tcp_rexmit>
|
|
break;
|
|
80086fc: e154 b.n 80089a8 <tcp_process+0x7a8>
|
|
80086fe: e153 b.n 80089a8 <tcp_process+0x7a8>
|
|
case CLOSE_WAIT:
|
|
/* FALLTHROUGH */
|
|
case ESTABLISHED:
|
|
tcp_receive(pcb);
|
|
8008700: 6878 ldr r0, [r7, #4]
|
|
8008702: f000 fa71 bl 8008be8 <tcp_receive>
|
|
if (recv_flags & TF_GOT_FIN) { /* passive close */
|
|
8008706: 4b2d ldr r3, [pc, #180] ; (80087bc <tcp_process+0x5bc>)
|
|
8008708: 781b ldrb r3, [r3, #0]
|
|
800870a: f003 0320 and.w r3, r3, #32
|
|
800870e: 2b00 cmp r3, #0
|
|
8008710: f000 814c beq.w 80089ac <tcp_process+0x7ac>
|
|
tcp_ack_now(pcb);
|
|
8008714: 687b ldr r3, [r7, #4]
|
|
8008716: 8b5b ldrh r3, [r3, #26]
|
|
8008718: f043 0302 orr.w r3, r3, #2
|
|
800871c: b29a uxth r2, r3
|
|
800871e: 687b ldr r3, [r7, #4]
|
|
8008720: 835a strh r2, [r3, #26]
|
|
pcb->state = CLOSE_WAIT;
|
|
8008722: 687b ldr r3, [r7, #4]
|
|
8008724: 2207 movs r2, #7
|
|
8008726: 751a strb r2, [r3, #20]
|
|
}
|
|
break;
|
|
8008728: e140 b.n 80089ac <tcp_process+0x7ac>
|
|
case FIN_WAIT_1:
|
|
tcp_receive(pcb);
|
|
800872a: 6878 ldr r0, [r7, #4]
|
|
800872c: f000 fa5c bl 8008be8 <tcp_receive>
|
|
if (recv_flags & TF_GOT_FIN) {
|
|
8008730: 4b22 ldr r3, [pc, #136] ; (80087bc <tcp_process+0x5bc>)
|
|
8008732: 781b ldrb r3, [r3, #0]
|
|
8008734: f003 0320 and.w r3, r3, #32
|
|
8008738: 2b00 cmp r3, #0
|
|
800873a: d071 beq.n 8008820 <tcp_process+0x620>
|
|
if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
|
|
800873c: 4b14 ldr r3, [pc, #80] ; (8008790 <tcp_process+0x590>)
|
|
800873e: 781b ldrb r3, [r3, #0]
|
|
8008740: f003 0310 and.w r3, r3, #16
|
|
8008744: 2b00 cmp r3, #0
|
|
8008746: d060 beq.n 800880a <tcp_process+0x60a>
|
|
8008748: 687b ldr r3, [r7, #4]
|
|
800874a: 6d1a ldr r2, [r3, #80] ; 0x50
|
|
800874c: 4b11 ldr r3, [pc, #68] ; (8008794 <tcp_process+0x594>)
|
|
800874e: 681b ldr r3, [r3, #0]
|
|
8008750: 429a cmp r2, r3
|
|
8008752: d15a bne.n 800880a <tcp_process+0x60a>
|
|
pcb->unsent == NULL) {
|
|
8008754: 687b ldr r3, [r7, #4]
|
|
8008756: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
|
|
8008758: 2b00 cmp r3, #0
|
|
800875a: d156 bne.n 800880a <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);
|
|
800875c: 687b ldr r3, [r7, #4]
|
|
800875e: 8b5b ldrh r3, [r3, #26]
|
|
8008760: f043 0302 orr.w r3, r3, #2
|
|
8008764: b29a uxth r2, r3
|
|
8008766: 687b ldr r3, [r7, #4]
|
|
8008768: 835a strh r2, [r3, #26]
|
|
tcp_pcb_purge(pcb);
|
|
800876a: 6878 ldr r0, [r7, #4]
|
|
800876c: f7fe fdbc bl 80072e8 <tcp_pcb_purge>
|
|
TCP_RMV_ACTIVE(pcb);
|
|
8008770: 4b13 ldr r3, [pc, #76] ; (80087c0 <tcp_process+0x5c0>)
|
|
8008772: 681b ldr r3, [r3, #0]
|
|
8008774: 687a ldr r2, [r7, #4]
|
|
8008776: 429a cmp r2, r3
|
|
8008778: d105 bne.n 8008786 <tcp_process+0x586>
|
|
800877a: 4b11 ldr r3, [pc, #68] ; (80087c0 <tcp_process+0x5c0>)
|
|
800877c: 681b ldr r3, [r3, #0]
|
|
800877e: 68db ldr r3, [r3, #12]
|
|
8008780: 4a0f ldr r2, [pc, #60] ; (80087c0 <tcp_process+0x5c0>)
|
|
8008782: 6013 str r3, [r2, #0]
|
|
8008784: e02e b.n 80087e4 <tcp_process+0x5e4>
|
|
8008786: 4b0e ldr r3, [pc, #56] ; (80087c0 <tcp_process+0x5c0>)
|
|
8008788: 681b ldr r3, [r3, #0]
|
|
800878a: 617b str r3, [r7, #20]
|
|
800878c: e027 b.n 80087de <tcp_process+0x5de>
|
|
800878e: bf00 nop
|
|
8008790: 20008c44 .word 0x20008c44
|
|
8008794: 20008c3c .word 0x20008c3c
|
|
8008798: 20008c42 .word 0x20008c42
|
|
800879c: 20008c38 .word 0x20008c38
|
|
80087a0: 20008c28 .word 0x20008c28
|
|
80087a4: 20005680 .word 0x20005680
|
|
80087a8: 20005684 .word 0x20005684
|
|
80087ac: 08016284 .word 0x08016284
|
|
80087b0: 08016524 .word 0x08016524
|
|
80087b4: 080162d0 .word 0x080162d0
|
|
80087b8: 20008c40 .word 0x20008c40
|
|
80087bc: 20008c45 .word 0x20008c45
|
|
80087c0: 20008c0c .word 0x20008c0c
|
|
80087c4: 697b ldr r3, [r7, #20]
|
|
80087c6: 68db ldr r3, [r3, #12]
|
|
80087c8: 687a ldr r2, [r7, #4]
|
|
80087ca: 429a cmp r2, r3
|
|
80087cc: d104 bne.n 80087d8 <tcp_process+0x5d8>
|
|
80087ce: 687b ldr r3, [r7, #4]
|
|
80087d0: 68da ldr r2, [r3, #12]
|
|
80087d2: 697b ldr r3, [r7, #20]
|
|
80087d4: 60da str r2, [r3, #12]
|
|
80087d6: e005 b.n 80087e4 <tcp_process+0x5e4>
|
|
80087d8: 697b ldr r3, [r7, #20]
|
|
80087da: 68db ldr r3, [r3, #12]
|
|
80087dc: 617b str r3, [r7, #20]
|
|
80087de: 697b ldr r3, [r7, #20]
|
|
80087e0: 2b00 cmp r3, #0
|
|
80087e2: d1ef bne.n 80087c4 <tcp_process+0x5c4>
|
|
80087e4: 687b ldr r3, [r7, #4]
|
|
80087e6: 2200 movs r2, #0
|
|
80087e8: 60da str r2, [r3, #12]
|
|
80087ea: 4b77 ldr r3, [pc, #476] ; (80089c8 <tcp_process+0x7c8>)
|
|
80087ec: 2201 movs r2, #1
|
|
80087ee: 701a strb r2, [r3, #0]
|
|
pcb->state = TIME_WAIT;
|
|
80087f0: 687b ldr r3, [r7, #4]
|
|
80087f2: 220a movs r2, #10
|
|
80087f4: 751a strb r2, [r3, #20]
|
|
TCP_REG(&tcp_tw_pcbs, pcb);
|
|
80087f6: 4b75 ldr r3, [pc, #468] ; (80089cc <tcp_process+0x7cc>)
|
|
80087f8: 681a ldr r2, [r3, #0]
|
|
80087fa: 687b ldr r3, [r7, #4]
|
|
80087fc: 60da str r2, [r3, #12]
|
|
80087fe: 4a73 ldr r2, [pc, #460] ; (80089cc <tcp_process+0x7cc>)
|
|
8008800: 687b ldr r3, [r7, #4]
|
|
8008802: 6013 str r3, [r2, #0]
|
|
8008804: f002 fcfa bl 800b1fc <tcp_timer_needed>
|
|
}
|
|
} else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
|
|
pcb->unsent == NULL) {
|
|
pcb->state = FIN_WAIT_2;
|
|
}
|
|
break;
|
|
8008808: e0d2 b.n 80089b0 <tcp_process+0x7b0>
|
|
tcp_ack_now(pcb);
|
|
800880a: 687b ldr r3, [r7, #4]
|
|
800880c: 8b5b ldrh r3, [r3, #26]
|
|
800880e: f043 0302 orr.w r3, r3, #2
|
|
8008812: b29a uxth r2, r3
|
|
8008814: 687b ldr r3, [r7, #4]
|
|
8008816: 835a strh r2, [r3, #26]
|
|
pcb->state = CLOSING;
|
|
8008818: 687b ldr r3, [r7, #4]
|
|
800881a: 2208 movs r2, #8
|
|
800881c: 751a strb r2, [r3, #20]
|
|
break;
|
|
800881e: e0c7 b.n 80089b0 <tcp_process+0x7b0>
|
|
} else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
|
|
8008820: 4b6b ldr r3, [pc, #428] ; (80089d0 <tcp_process+0x7d0>)
|
|
8008822: 781b ldrb r3, [r3, #0]
|
|
8008824: f003 0310 and.w r3, r3, #16
|
|
8008828: 2b00 cmp r3, #0
|
|
800882a: f000 80c1 beq.w 80089b0 <tcp_process+0x7b0>
|
|
800882e: 687b ldr r3, [r7, #4]
|
|
8008830: 6d1a ldr r2, [r3, #80] ; 0x50
|
|
8008832: 4b68 ldr r3, [pc, #416] ; (80089d4 <tcp_process+0x7d4>)
|
|
8008834: 681b ldr r3, [r3, #0]
|
|
8008836: 429a cmp r2, r3
|
|
8008838: f040 80ba bne.w 80089b0 <tcp_process+0x7b0>
|
|
pcb->unsent == NULL) {
|
|
800883c: 687b ldr r3, [r7, #4]
|
|
800883e: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
} else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
|
|
8008840: 2b00 cmp r3, #0
|
|
8008842: f040 80b5 bne.w 80089b0 <tcp_process+0x7b0>
|
|
pcb->state = FIN_WAIT_2;
|
|
8008846: 687b ldr r3, [r7, #4]
|
|
8008848: 2206 movs r2, #6
|
|
800884a: 751a strb r2, [r3, #20]
|
|
break;
|
|
800884c: e0b0 b.n 80089b0 <tcp_process+0x7b0>
|
|
case FIN_WAIT_2:
|
|
tcp_receive(pcb);
|
|
800884e: 6878 ldr r0, [r7, #4]
|
|
8008850: f000 f9ca bl 8008be8 <tcp_receive>
|
|
if (recv_flags & TF_GOT_FIN) {
|
|
8008854: 4b60 ldr r3, [pc, #384] ; (80089d8 <tcp_process+0x7d8>)
|
|
8008856: 781b ldrb r3, [r3, #0]
|
|
8008858: f003 0320 and.w r3, r3, #32
|
|
800885c: 2b00 cmp r3, #0
|
|
800885e: f000 80a9 beq.w 80089b4 <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);
|
|
8008862: 687b ldr r3, [r7, #4]
|
|
8008864: 8b5b ldrh r3, [r3, #26]
|
|
8008866: f043 0302 orr.w r3, r3, #2
|
|
800886a: b29a uxth r2, r3
|
|
800886c: 687b ldr r3, [r7, #4]
|
|
800886e: 835a strh r2, [r3, #26]
|
|
tcp_pcb_purge(pcb);
|
|
8008870: 6878 ldr r0, [r7, #4]
|
|
8008872: f7fe fd39 bl 80072e8 <tcp_pcb_purge>
|
|
TCP_RMV_ACTIVE(pcb);
|
|
8008876: 4b59 ldr r3, [pc, #356] ; (80089dc <tcp_process+0x7dc>)
|
|
8008878: 681b ldr r3, [r3, #0]
|
|
800887a: 687a ldr r2, [r7, #4]
|
|
800887c: 429a cmp r2, r3
|
|
800887e: d105 bne.n 800888c <tcp_process+0x68c>
|
|
8008880: 4b56 ldr r3, [pc, #344] ; (80089dc <tcp_process+0x7dc>)
|
|
8008882: 681b ldr r3, [r3, #0]
|
|
8008884: 68db ldr r3, [r3, #12]
|
|
8008886: 4a55 ldr r2, [pc, #340] ; (80089dc <tcp_process+0x7dc>)
|
|
8008888: 6013 str r3, [r2, #0]
|
|
800888a: e013 b.n 80088b4 <tcp_process+0x6b4>
|
|
800888c: 4b53 ldr r3, [pc, #332] ; (80089dc <tcp_process+0x7dc>)
|
|
800888e: 681b ldr r3, [r3, #0]
|
|
8008890: 613b str r3, [r7, #16]
|
|
8008892: e00c b.n 80088ae <tcp_process+0x6ae>
|
|
8008894: 693b ldr r3, [r7, #16]
|
|
8008896: 68db ldr r3, [r3, #12]
|
|
8008898: 687a ldr r2, [r7, #4]
|
|
800889a: 429a cmp r2, r3
|
|
800889c: d104 bne.n 80088a8 <tcp_process+0x6a8>
|
|
800889e: 687b ldr r3, [r7, #4]
|
|
80088a0: 68da ldr r2, [r3, #12]
|
|
80088a2: 693b ldr r3, [r7, #16]
|
|
80088a4: 60da str r2, [r3, #12]
|
|
80088a6: e005 b.n 80088b4 <tcp_process+0x6b4>
|
|
80088a8: 693b ldr r3, [r7, #16]
|
|
80088aa: 68db ldr r3, [r3, #12]
|
|
80088ac: 613b str r3, [r7, #16]
|
|
80088ae: 693b ldr r3, [r7, #16]
|
|
80088b0: 2b00 cmp r3, #0
|
|
80088b2: d1ef bne.n 8008894 <tcp_process+0x694>
|
|
80088b4: 687b ldr r3, [r7, #4]
|
|
80088b6: 2200 movs r2, #0
|
|
80088b8: 60da str r2, [r3, #12]
|
|
80088ba: 4b43 ldr r3, [pc, #268] ; (80089c8 <tcp_process+0x7c8>)
|
|
80088bc: 2201 movs r2, #1
|
|
80088be: 701a strb r2, [r3, #0]
|
|
pcb->state = TIME_WAIT;
|
|
80088c0: 687b ldr r3, [r7, #4]
|
|
80088c2: 220a movs r2, #10
|
|
80088c4: 751a strb r2, [r3, #20]
|
|
TCP_REG(&tcp_tw_pcbs, pcb);
|
|
80088c6: 4b41 ldr r3, [pc, #260] ; (80089cc <tcp_process+0x7cc>)
|
|
80088c8: 681a ldr r2, [r3, #0]
|
|
80088ca: 687b ldr r3, [r7, #4]
|
|
80088cc: 60da str r2, [r3, #12]
|
|
80088ce: 4a3f ldr r2, [pc, #252] ; (80089cc <tcp_process+0x7cc>)
|
|
80088d0: 687b ldr r3, [r7, #4]
|
|
80088d2: 6013 str r3, [r2, #0]
|
|
80088d4: f002 fc92 bl 800b1fc <tcp_timer_needed>
|
|
}
|
|
break;
|
|
80088d8: e06c b.n 80089b4 <tcp_process+0x7b4>
|
|
case CLOSING:
|
|
tcp_receive(pcb);
|
|
80088da: 6878 ldr r0, [r7, #4]
|
|
80088dc: f000 f984 bl 8008be8 <tcp_receive>
|
|
if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
|
|
80088e0: 4b3b ldr r3, [pc, #236] ; (80089d0 <tcp_process+0x7d0>)
|
|
80088e2: 781b ldrb r3, [r3, #0]
|
|
80088e4: f003 0310 and.w r3, r3, #16
|
|
80088e8: 2b00 cmp r3, #0
|
|
80088ea: d065 beq.n 80089b8 <tcp_process+0x7b8>
|
|
80088ec: 687b ldr r3, [r7, #4]
|
|
80088ee: 6d1a ldr r2, [r3, #80] ; 0x50
|
|
80088f0: 4b38 ldr r3, [pc, #224] ; (80089d4 <tcp_process+0x7d4>)
|
|
80088f2: 681b ldr r3, [r3, #0]
|
|
80088f4: 429a cmp r2, r3
|
|
80088f6: d15f bne.n 80089b8 <tcp_process+0x7b8>
|
|
80088f8: 687b ldr r3, [r7, #4]
|
|
80088fa: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
80088fc: 2b00 cmp r3, #0
|
|
80088fe: d15b bne.n 80089b8 <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);
|
|
8008900: 6878 ldr r0, [r7, #4]
|
|
8008902: f7fe fcf1 bl 80072e8 <tcp_pcb_purge>
|
|
TCP_RMV_ACTIVE(pcb);
|
|
8008906: 4b35 ldr r3, [pc, #212] ; (80089dc <tcp_process+0x7dc>)
|
|
8008908: 681b ldr r3, [r3, #0]
|
|
800890a: 687a ldr r2, [r7, #4]
|
|
800890c: 429a cmp r2, r3
|
|
800890e: d105 bne.n 800891c <tcp_process+0x71c>
|
|
8008910: 4b32 ldr r3, [pc, #200] ; (80089dc <tcp_process+0x7dc>)
|
|
8008912: 681b ldr r3, [r3, #0]
|
|
8008914: 68db ldr r3, [r3, #12]
|
|
8008916: 4a31 ldr r2, [pc, #196] ; (80089dc <tcp_process+0x7dc>)
|
|
8008918: 6013 str r3, [r2, #0]
|
|
800891a: e013 b.n 8008944 <tcp_process+0x744>
|
|
800891c: 4b2f ldr r3, [pc, #188] ; (80089dc <tcp_process+0x7dc>)
|
|
800891e: 681b ldr r3, [r3, #0]
|
|
8008920: 60fb str r3, [r7, #12]
|
|
8008922: e00c b.n 800893e <tcp_process+0x73e>
|
|
8008924: 68fb ldr r3, [r7, #12]
|
|
8008926: 68db ldr r3, [r3, #12]
|
|
8008928: 687a ldr r2, [r7, #4]
|
|
800892a: 429a cmp r2, r3
|
|
800892c: d104 bne.n 8008938 <tcp_process+0x738>
|
|
800892e: 687b ldr r3, [r7, #4]
|
|
8008930: 68da ldr r2, [r3, #12]
|
|
8008932: 68fb ldr r3, [r7, #12]
|
|
8008934: 60da str r2, [r3, #12]
|
|
8008936: e005 b.n 8008944 <tcp_process+0x744>
|
|
8008938: 68fb ldr r3, [r7, #12]
|
|
800893a: 68db ldr r3, [r3, #12]
|
|
800893c: 60fb str r3, [r7, #12]
|
|
800893e: 68fb ldr r3, [r7, #12]
|
|
8008940: 2b00 cmp r3, #0
|
|
8008942: d1ef bne.n 8008924 <tcp_process+0x724>
|
|
8008944: 687b ldr r3, [r7, #4]
|
|
8008946: 2200 movs r2, #0
|
|
8008948: 60da str r2, [r3, #12]
|
|
800894a: 4b1f ldr r3, [pc, #124] ; (80089c8 <tcp_process+0x7c8>)
|
|
800894c: 2201 movs r2, #1
|
|
800894e: 701a strb r2, [r3, #0]
|
|
pcb->state = TIME_WAIT;
|
|
8008950: 687b ldr r3, [r7, #4]
|
|
8008952: 220a movs r2, #10
|
|
8008954: 751a strb r2, [r3, #20]
|
|
TCP_REG(&tcp_tw_pcbs, pcb);
|
|
8008956: 4b1d ldr r3, [pc, #116] ; (80089cc <tcp_process+0x7cc>)
|
|
8008958: 681a ldr r2, [r3, #0]
|
|
800895a: 687b ldr r3, [r7, #4]
|
|
800895c: 60da str r2, [r3, #12]
|
|
800895e: 4a1b ldr r2, [pc, #108] ; (80089cc <tcp_process+0x7cc>)
|
|
8008960: 687b ldr r3, [r7, #4]
|
|
8008962: 6013 str r3, [r2, #0]
|
|
8008964: f002 fc4a bl 800b1fc <tcp_timer_needed>
|
|
}
|
|
break;
|
|
8008968: e026 b.n 80089b8 <tcp_process+0x7b8>
|
|
case LAST_ACK:
|
|
tcp_receive(pcb);
|
|
800896a: 6878 ldr r0, [r7, #4]
|
|
800896c: f000 f93c bl 8008be8 <tcp_receive>
|
|
if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
|
|
8008970: 4b17 ldr r3, [pc, #92] ; (80089d0 <tcp_process+0x7d0>)
|
|
8008972: 781b ldrb r3, [r3, #0]
|
|
8008974: f003 0310 and.w r3, r3, #16
|
|
8008978: 2b00 cmp r3, #0
|
|
800897a: d01f beq.n 80089bc <tcp_process+0x7bc>
|
|
800897c: 687b ldr r3, [r7, #4]
|
|
800897e: 6d1a ldr r2, [r3, #80] ; 0x50
|
|
8008980: 4b14 ldr r3, [pc, #80] ; (80089d4 <tcp_process+0x7d4>)
|
|
8008982: 681b ldr r3, [r3, #0]
|
|
8008984: 429a cmp r2, r3
|
|
8008986: d119 bne.n 80089bc <tcp_process+0x7bc>
|
|
8008988: 687b ldr r3, [r7, #4]
|
|
800898a: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
800898c: 2b00 cmp r3, #0
|
|
800898e: d115 bne.n 80089bc <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;
|
|
8008990: 4b11 ldr r3, [pc, #68] ; (80089d8 <tcp_process+0x7d8>)
|
|
8008992: 781b ldrb r3, [r3, #0]
|
|
8008994: f043 0310 orr.w r3, r3, #16
|
|
8008998: b2da uxtb r2, r3
|
|
800899a: 4b0f ldr r3, [pc, #60] ; (80089d8 <tcp_process+0x7d8>)
|
|
800899c: 701a strb r2, [r3, #0]
|
|
}
|
|
break;
|
|
800899e: e00d b.n 80089bc <tcp_process+0x7bc>
|
|
default:
|
|
break;
|
|
80089a0: bf00 nop
|
|
80089a2: e00c b.n 80089be <tcp_process+0x7be>
|
|
break;
|
|
80089a4: bf00 nop
|
|
80089a6: e00a b.n 80089be <tcp_process+0x7be>
|
|
break;
|
|
80089a8: bf00 nop
|
|
80089aa: e008 b.n 80089be <tcp_process+0x7be>
|
|
break;
|
|
80089ac: bf00 nop
|
|
80089ae: e006 b.n 80089be <tcp_process+0x7be>
|
|
break;
|
|
80089b0: bf00 nop
|
|
80089b2: e004 b.n 80089be <tcp_process+0x7be>
|
|
break;
|
|
80089b4: bf00 nop
|
|
80089b6: e002 b.n 80089be <tcp_process+0x7be>
|
|
break;
|
|
80089b8: bf00 nop
|
|
80089ba: e000 b.n 80089be <tcp_process+0x7be>
|
|
break;
|
|
80089bc: bf00 nop
|
|
}
|
|
return ERR_OK;
|
|
80089be: 2300 movs r3, #0
|
|
}
|
|
80089c0: 4618 mov r0, r3
|
|
80089c2: 3724 adds r7, #36 ; 0x24
|
|
80089c4: 46bd mov sp, r7
|
|
80089c6: bd90 pop {r4, r7, pc}
|
|
80089c8: 20008c14 .word 0x20008c14
|
|
80089cc: 20008c10 .word 0x20008c10
|
|
80089d0: 20008c44 .word 0x20008c44
|
|
80089d4: 20008c3c .word 0x20008c3c
|
|
80089d8: 20008c45 .word 0x20008c45
|
|
80089dc: 20008c0c .word 0x20008c0c
|
|
|
|
080089e0 <tcp_oos_insert_segment>:
|
|
*
|
|
* Called from tcp_receive()
|
|
*/
|
|
static void
|
|
tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next)
|
|
{
|
|
80089e0: b590 push {r4, r7, lr}
|
|
80089e2: b085 sub sp, #20
|
|
80089e4: af00 add r7, sp, #0
|
|
80089e6: 6078 str r0, [r7, #4]
|
|
80089e8: 6039 str r1, [r7, #0]
|
|
struct tcp_seg *old_seg;
|
|
|
|
LWIP_ASSERT("tcp_oos_insert_segment: invalid cseg", cseg != NULL);
|
|
80089ea: 687b ldr r3, [r7, #4]
|
|
80089ec: 2b00 cmp r3, #0
|
|
80089ee: d106 bne.n 80089fe <tcp_oos_insert_segment+0x1e>
|
|
80089f0: 4b3b ldr r3, [pc, #236] ; (8008ae0 <tcp_oos_insert_segment+0x100>)
|
|
80089f2: f240 421f movw r2, #1055 ; 0x41f
|
|
80089f6: 493b ldr r1, [pc, #236] ; (8008ae4 <tcp_oos_insert_segment+0x104>)
|
|
80089f8: 483b ldr r0, [pc, #236] ; (8008ae8 <tcp_oos_insert_segment+0x108>)
|
|
80089fa: f007 fd7d bl 80104f8 <printf>
|
|
|
|
if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) {
|
|
80089fe: 687b ldr r3, [r7, #4]
|
|
8008a00: 68db ldr r3, [r3, #12]
|
|
8008a02: 899b ldrh r3, [r3, #12]
|
|
8008a04: b29b uxth r3, r3
|
|
8008a06: 4618 mov r0, r3
|
|
8008a08: f7fb fc94 bl 8004334 <lwip_htons>
|
|
8008a0c: 4603 mov r3, r0
|
|
8008a0e: b2db uxtb r3, r3
|
|
8008a10: f003 0301 and.w r3, r3, #1
|
|
8008a14: 2b00 cmp r3, #0
|
|
8008a16: d028 beq.n 8008a6a <tcp_oos_insert_segment+0x8a>
|
|
/* received segment overlaps all following segments */
|
|
tcp_segs_free(next);
|
|
8008a18: 6838 ldr r0, [r7, #0]
|
|
8008a1a: f7fe fa63 bl 8006ee4 <tcp_segs_free>
|
|
next = NULL;
|
|
8008a1e: 2300 movs r3, #0
|
|
8008a20: 603b str r3, [r7, #0]
|
|
8008a22: e056 b.n 8008ad2 <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) {
|
|
8008a24: 683b ldr r3, [r7, #0]
|
|
8008a26: 68db ldr r3, [r3, #12]
|
|
8008a28: 899b ldrh r3, [r3, #12]
|
|
8008a2a: b29b uxth r3, r3
|
|
8008a2c: 4618 mov r0, r3
|
|
8008a2e: f7fb fc81 bl 8004334 <lwip_htons>
|
|
8008a32: 4603 mov r3, r0
|
|
8008a34: b2db uxtb r3, r3
|
|
8008a36: f003 0301 and.w r3, r3, #1
|
|
8008a3a: 2b00 cmp r3, #0
|
|
8008a3c: d00d beq.n 8008a5a <tcp_oos_insert_segment+0x7a>
|
|
TCPH_SET_FLAG(cseg->tcphdr, TCP_FIN);
|
|
8008a3e: 687b ldr r3, [r7, #4]
|
|
8008a40: 68db ldr r3, [r3, #12]
|
|
8008a42: 899b ldrh r3, [r3, #12]
|
|
8008a44: b29c uxth r4, r3
|
|
8008a46: 2001 movs r0, #1
|
|
8008a48: f7fb fc74 bl 8004334 <lwip_htons>
|
|
8008a4c: 4603 mov r3, r0
|
|
8008a4e: 461a mov r2, r3
|
|
8008a50: 687b ldr r3, [r7, #4]
|
|
8008a52: 68db ldr r3, [r3, #12]
|
|
8008a54: 4322 orrs r2, r4
|
|
8008a56: b292 uxth r2, r2
|
|
8008a58: 819a strh r2, [r3, #12]
|
|
}
|
|
old_seg = next;
|
|
8008a5a: 683b ldr r3, [r7, #0]
|
|
8008a5c: 60fb str r3, [r7, #12]
|
|
next = next->next;
|
|
8008a5e: 683b ldr r3, [r7, #0]
|
|
8008a60: 681b ldr r3, [r3, #0]
|
|
8008a62: 603b str r3, [r7, #0]
|
|
tcp_seg_free(old_seg);
|
|
8008a64: 68f8 ldr r0, [r7, #12]
|
|
8008a66: f7fe fa52 bl 8006f0e <tcp_seg_free>
|
|
while (next &&
|
|
8008a6a: 683b ldr r3, [r7, #0]
|
|
8008a6c: 2b00 cmp r3, #0
|
|
8008a6e: d00e beq.n 8008a8e <tcp_oos_insert_segment+0xae>
|
|
TCP_SEQ_GEQ((seqno + cseg->len),
|
|
8008a70: 687b ldr r3, [r7, #4]
|
|
8008a72: 891b ldrh r3, [r3, #8]
|
|
8008a74: 461a mov r2, r3
|
|
8008a76: 4b1d ldr r3, [pc, #116] ; (8008aec <tcp_oos_insert_segment+0x10c>)
|
|
8008a78: 681b ldr r3, [r3, #0]
|
|
8008a7a: 441a add r2, r3
|
|
8008a7c: 683b ldr r3, [r7, #0]
|
|
8008a7e: 68db ldr r3, [r3, #12]
|
|
8008a80: 685b ldr r3, [r3, #4]
|
|
8008a82: 6839 ldr r1, [r7, #0]
|
|
8008a84: 8909 ldrh r1, [r1, #8]
|
|
8008a86: 440b add r3, r1
|
|
8008a88: 1ad3 subs r3, r2, r3
|
|
while (next &&
|
|
8008a8a: 2b00 cmp r3, #0
|
|
8008a8c: daca bge.n 8008a24 <tcp_oos_insert_segment+0x44>
|
|
}
|
|
if (next &&
|
|
8008a8e: 683b ldr r3, [r7, #0]
|
|
8008a90: 2b00 cmp r3, #0
|
|
8008a92: d01e beq.n 8008ad2 <tcp_oos_insert_segment+0xf2>
|
|
TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) {
|
|
8008a94: 687b ldr r3, [r7, #4]
|
|
8008a96: 891b ldrh r3, [r3, #8]
|
|
8008a98: 461a mov r2, r3
|
|
8008a9a: 4b14 ldr r3, [pc, #80] ; (8008aec <tcp_oos_insert_segment+0x10c>)
|
|
8008a9c: 681b ldr r3, [r3, #0]
|
|
8008a9e: 441a add r2, r3
|
|
8008aa0: 683b ldr r3, [r7, #0]
|
|
8008aa2: 68db ldr r3, [r3, #12]
|
|
8008aa4: 685b ldr r3, [r3, #4]
|
|
8008aa6: 1ad3 subs r3, r2, r3
|
|
if (next &&
|
|
8008aa8: 2b00 cmp r3, #0
|
|
8008aaa: dd12 ble.n 8008ad2 <tcp_oos_insert_segment+0xf2>
|
|
/* We need to trim the incoming segment. */
|
|
cseg->len = (u16_t)(next->tcphdr->seqno - seqno);
|
|
8008aac: 683b ldr r3, [r7, #0]
|
|
8008aae: 68db ldr r3, [r3, #12]
|
|
8008ab0: 685b ldr r3, [r3, #4]
|
|
8008ab2: b29a uxth r2, r3
|
|
8008ab4: 4b0d ldr r3, [pc, #52] ; (8008aec <tcp_oos_insert_segment+0x10c>)
|
|
8008ab6: 681b ldr r3, [r3, #0]
|
|
8008ab8: b29b uxth r3, r3
|
|
8008aba: 1ad3 subs r3, r2, r3
|
|
8008abc: b29a uxth r2, r3
|
|
8008abe: 687b ldr r3, [r7, #4]
|
|
8008ac0: 811a strh r2, [r3, #8]
|
|
pbuf_realloc(cseg->p, cseg->len);
|
|
8008ac2: 687b ldr r3, [r7, #4]
|
|
8008ac4: 685a ldr r2, [r3, #4]
|
|
8008ac6: 687b ldr r3, [r7, #4]
|
|
8008ac8: 891b ldrh r3, [r3, #8]
|
|
8008aca: 4619 mov r1, r3
|
|
8008acc: 4610 mov r0, r2
|
|
8008ace: f7fc fe15 bl 80056fc <pbuf_realloc>
|
|
}
|
|
}
|
|
cseg->next = next;
|
|
8008ad2: 687b ldr r3, [r7, #4]
|
|
8008ad4: 683a ldr r2, [r7, #0]
|
|
8008ad6: 601a str r2, [r3, #0]
|
|
}
|
|
8008ad8: bf00 nop
|
|
8008ada: 3714 adds r7, #20
|
|
8008adc: 46bd mov sp, r7
|
|
8008ade: bd90 pop {r4, r7, pc}
|
|
8008ae0: 08016284 .word 0x08016284
|
|
8008ae4: 08016544 .word 0x08016544
|
|
8008ae8: 080162d0 .word 0x080162d0
|
|
8008aec: 20008c38 .word 0x20008c38
|
|
|
|
08008af0 <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)
|
|
{
|
|
8008af0: b5b0 push {r4, r5, r7, lr}
|
|
8008af2: b086 sub sp, #24
|
|
8008af4: af00 add r7, sp, #0
|
|
8008af6: 60f8 str r0, [r7, #12]
|
|
8008af8: 60b9 str r1, [r7, #8]
|
|
8008afa: 607a str r2, [r7, #4]
|
|
8008afc: 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 &&
|
|
8008afe: e03e b.n 8008b7e <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;
|
|
8008b00: 68bb ldr r3, [r7, #8]
|
|
8008b02: 617b str r3, [r7, #20]
|
|
seg_list = seg_list->next;
|
|
8008b04: 68bb ldr r3, [r7, #8]
|
|
8008b06: 681b ldr r3, [r3, #0]
|
|
8008b08: 60bb str r3, [r7, #8]
|
|
|
|
clen = pbuf_clen(next->p);
|
|
8008b0a: 697b ldr r3, [r7, #20]
|
|
8008b0c: 685b ldr r3, [r3, #4]
|
|
8008b0e: 4618 mov r0, r3
|
|
8008b10: f7fd f802 bl 8005b18 <pbuf_clen>
|
|
8008b14: 4603 mov r3, r0
|
|
8008b16: 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));
|
|
8008b18: 68fb ldr r3, [r7, #12]
|
|
8008b1a: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
|
|
8008b1e: 8a7a ldrh r2, [r7, #18]
|
|
8008b20: 429a cmp r2, r3
|
|
8008b22: d906 bls.n 8008b32 <tcp_free_acked_segments+0x42>
|
|
8008b24: 4b2a ldr r3, [pc, #168] ; (8008bd0 <tcp_free_acked_segments+0xe0>)
|
|
8008b26: f240 4257 movw r2, #1111 ; 0x457
|
|
8008b2a: 492a ldr r1, [pc, #168] ; (8008bd4 <tcp_free_acked_segments+0xe4>)
|
|
8008b2c: 482a ldr r0, [pc, #168] ; (8008bd8 <tcp_free_acked_segments+0xe8>)
|
|
8008b2e: f007 fce3 bl 80104f8 <printf>
|
|
|
|
pcb->snd_queuelen = (u16_t)(pcb->snd_queuelen - clen);
|
|
8008b32: 68fb ldr r3, [r7, #12]
|
|
8008b34: f8b3 2066 ldrh.w r2, [r3, #102] ; 0x66
|
|
8008b38: 8a7b ldrh r3, [r7, #18]
|
|
8008b3a: 1ad3 subs r3, r2, r3
|
|
8008b3c: b29a uxth r2, r3
|
|
8008b3e: 68fb ldr r3, [r7, #12]
|
|
8008b40: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
|
|
recv_acked = (tcpwnd_size_t)(recv_acked + next->len);
|
|
8008b44: 697b ldr r3, [r7, #20]
|
|
8008b46: 891a ldrh r2, [r3, #8]
|
|
8008b48: 4b24 ldr r3, [pc, #144] ; (8008bdc <tcp_free_acked_segments+0xec>)
|
|
8008b4a: 881b ldrh r3, [r3, #0]
|
|
8008b4c: 4413 add r3, r2
|
|
8008b4e: b29a uxth r2, r3
|
|
8008b50: 4b22 ldr r3, [pc, #136] ; (8008bdc <tcp_free_acked_segments+0xec>)
|
|
8008b52: 801a strh r2, [r3, #0]
|
|
tcp_seg_free(next);
|
|
8008b54: 6978 ldr r0, [r7, #20]
|
|
8008b56: f7fe f9da bl 8006f0e <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) {
|
|
8008b5a: 68fb ldr r3, [r7, #12]
|
|
8008b5c: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
|
|
8008b60: 2b00 cmp r3, #0
|
|
8008b62: d00c beq.n 8008b7e <tcp_free_acked_segments+0x8e>
|
|
LWIP_ASSERT("tcp_receive: valid queue length",
|
|
8008b64: 68bb ldr r3, [r7, #8]
|
|
8008b66: 2b00 cmp r3, #0
|
|
8008b68: d109 bne.n 8008b7e <tcp_free_acked_segments+0x8e>
|
|
8008b6a: 683b ldr r3, [r7, #0]
|
|
8008b6c: 2b00 cmp r3, #0
|
|
8008b6e: d106 bne.n 8008b7e <tcp_free_acked_segments+0x8e>
|
|
8008b70: 4b17 ldr r3, [pc, #92] ; (8008bd0 <tcp_free_acked_segments+0xe0>)
|
|
8008b72: f240 4261 movw r2, #1121 ; 0x461
|
|
8008b76: 491a ldr r1, [pc, #104] ; (8008be0 <tcp_free_acked_segments+0xf0>)
|
|
8008b78: 4817 ldr r0, [pc, #92] ; (8008bd8 <tcp_free_acked_segments+0xe8>)
|
|
8008b7a: f007 fcbd bl 80104f8 <printf>
|
|
while (seg_list != NULL &&
|
|
8008b7e: 68bb ldr r3, [r7, #8]
|
|
8008b80: 2b00 cmp r3, #0
|
|
8008b82: d020 beq.n 8008bc6 <tcp_free_acked_segments+0xd6>
|
|
TCP_SEQ_LEQ(lwip_ntohl(seg_list->tcphdr->seqno) +
|
|
8008b84: 68bb ldr r3, [r7, #8]
|
|
8008b86: 68db ldr r3, [r3, #12]
|
|
8008b88: 685b ldr r3, [r3, #4]
|
|
8008b8a: 4618 mov r0, r3
|
|
8008b8c: f7fb fbe7 bl 800435e <lwip_htonl>
|
|
8008b90: 4604 mov r4, r0
|
|
8008b92: 68bb ldr r3, [r7, #8]
|
|
8008b94: 891b ldrh r3, [r3, #8]
|
|
8008b96: 461d mov r5, r3
|
|
8008b98: 68bb ldr r3, [r7, #8]
|
|
8008b9a: 68db ldr r3, [r3, #12]
|
|
8008b9c: 899b ldrh r3, [r3, #12]
|
|
8008b9e: b29b uxth r3, r3
|
|
8008ba0: 4618 mov r0, r3
|
|
8008ba2: f7fb fbc7 bl 8004334 <lwip_htons>
|
|
8008ba6: 4603 mov r3, r0
|
|
8008ba8: b2db uxtb r3, r3
|
|
8008baa: f003 0303 and.w r3, r3, #3
|
|
8008bae: 2b00 cmp r3, #0
|
|
8008bb0: d001 beq.n 8008bb6 <tcp_free_acked_segments+0xc6>
|
|
8008bb2: 2301 movs r3, #1
|
|
8008bb4: e000 b.n 8008bb8 <tcp_free_acked_segments+0xc8>
|
|
8008bb6: 2300 movs r3, #0
|
|
8008bb8: 442b add r3, r5
|
|
8008bba: 18e2 adds r2, r4, r3
|
|
8008bbc: 4b09 ldr r3, [pc, #36] ; (8008be4 <tcp_free_acked_segments+0xf4>)
|
|
8008bbe: 681b ldr r3, [r3, #0]
|
|
8008bc0: 1ad3 subs r3, r2, r3
|
|
while (seg_list != NULL &&
|
|
8008bc2: 2b00 cmp r3, #0
|
|
8008bc4: dd9c ble.n 8008b00 <tcp_free_acked_segments+0x10>
|
|
seg_list != NULL || dbg_other_seg_list != NULL);
|
|
}
|
|
}
|
|
return seg_list;
|
|
8008bc6: 68bb ldr r3, [r7, #8]
|
|
}
|
|
8008bc8: 4618 mov r0, r3
|
|
8008bca: 3718 adds r7, #24
|
|
8008bcc: 46bd mov sp, r7
|
|
8008bce: bdb0 pop {r4, r5, r7, pc}
|
|
8008bd0: 08016284 .word 0x08016284
|
|
8008bd4: 0801656c .word 0x0801656c
|
|
8008bd8: 080162d0 .word 0x080162d0
|
|
8008bdc: 20008c40 .word 0x20008c40
|
|
8008be0: 08016594 .word 0x08016594
|
|
8008be4: 20008c3c .word 0x20008c3c
|
|
|
|
08008be8 <tcp_receive>:
|
|
*
|
|
* Called from tcp_process().
|
|
*/
|
|
static void
|
|
tcp_receive(struct tcp_pcb *pcb)
|
|
{
|
|
8008be8: b5b0 push {r4, r5, r7, lr}
|
|
8008bea: b094 sub sp, #80 ; 0x50
|
|
8008bec: af00 add r7, sp, #0
|
|
8008bee: 6078 str r0, [r7, #4]
|
|
s16_t m;
|
|
u32_t right_wnd_edge;
|
|
int found_dupack = 0;
|
|
8008bf0: 2300 movs r3, #0
|
|
8008bf2: 64bb str r3, [r7, #72] ; 0x48
|
|
|
|
LWIP_ASSERT("tcp_receive: invalid pcb", pcb != NULL);
|
|
8008bf4: 687b ldr r3, [r7, #4]
|
|
8008bf6: 2b00 cmp r3, #0
|
|
8008bf8: d106 bne.n 8008c08 <tcp_receive+0x20>
|
|
8008bfa: 4b91 ldr r3, [pc, #580] ; (8008e40 <tcp_receive+0x258>)
|
|
8008bfc: f240 427b movw r2, #1147 ; 0x47b
|
|
8008c00: 4990 ldr r1, [pc, #576] ; (8008e44 <tcp_receive+0x25c>)
|
|
8008c02: 4891 ldr r0, [pc, #580] ; (8008e48 <tcp_receive+0x260>)
|
|
8008c04: f007 fc78 bl 80104f8 <printf>
|
|
LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED);
|
|
8008c08: 687b ldr r3, [r7, #4]
|
|
8008c0a: 7d1b ldrb r3, [r3, #20]
|
|
8008c0c: 2b03 cmp r3, #3
|
|
8008c0e: d806 bhi.n 8008c1e <tcp_receive+0x36>
|
|
8008c10: 4b8b ldr r3, [pc, #556] ; (8008e40 <tcp_receive+0x258>)
|
|
8008c12: f240 427c movw r2, #1148 ; 0x47c
|
|
8008c16: 498d ldr r1, [pc, #564] ; (8008e4c <tcp_receive+0x264>)
|
|
8008c18: 488b ldr r0, [pc, #556] ; (8008e48 <tcp_receive+0x260>)
|
|
8008c1a: f007 fc6d bl 80104f8 <printf>
|
|
|
|
if (flags & TCP_ACK) {
|
|
8008c1e: 4b8c ldr r3, [pc, #560] ; (8008e50 <tcp_receive+0x268>)
|
|
8008c20: 781b ldrb r3, [r3, #0]
|
|
8008c22: f003 0310 and.w r3, r3, #16
|
|
8008c26: 2b00 cmp r3, #0
|
|
8008c28: f000 8264 beq.w 80090f4 <tcp_receive+0x50c>
|
|
right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2;
|
|
8008c2c: 687b ldr r3, [r7, #4]
|
|
8008c2e: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
|
|
8008c32: 461a mov r2, r3
|
|
8008c34: 687b ldr r3, [r7, #4]
|
|
8008c36: 6d9b ldr r3, [r3, #88] ; 0x58
|
|
8008c38: 4413 add r3, r2
|
|
8008c3a: 633b str r3, [r7, #48] ; 0x30
|
|
|
|
/* Update window. */
|
|
if (TCP_SEQ_LT(pcb->snd_wl1, seqno) ||
|
|
8008c3c: 687b ldr r3, [r7, #4]
|
|
8008c3e: 6d5a ldr r2, [r3, #84] ; 0x54
|
|
8008c40: 4b84 ldr r3, [pc, #528] ; (8008e54 <tcp_receive+0x26c>)
|
|
8008c42: 681b ldr r3, [r3, #0]
|
|
8008c44: 1ad3 subs r3, r2, r3
|
|
8008c46: 2b00 cmp r3, #0
|
|
8008c48: db1b blt.n 8008c82 <tcp_receive+0x9a>
|
|
(pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
|
|
8008c4a: 687b ldr r3, [r7, #4]
|
|
8008c4c: 6d5a ldr r2, [r3, #84] ; 0x54
|
|
8008c4e: 4b81 ldr r3, [pc, #516] ; (8008e54 <tcp_receive+0x26c>)
|
|
8008c50: 681b ldr r3, [r3, #0]
|
|
if (TCP_SEQ_LT(pcb->snd_wl1, seqno) ||
|
|
8008c52: 429a cmp r2, r3
|
|
8008c54: d106 bne.n 8008c64 <tcp_receive+0x7c>
|
|
(pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
|
|
8008c56: 687b ldr r3, [r7, #4]
|
|
8008c58: 6d9a ldr r2, [r3, #88] ; 0x58
|
|
8008c5a: 4b7f ldr r3, [pc, #508] ; (8008e58 <tcp_receive+0x270>)
|
|
8008c5c: 681b ldr r3, [r3, #0]
|
|
8008c5e: 1ad3 subs r3, r2, r3
|
|
8008c60: 2b00 cmp r3, #0
|
|
8008c62: db0e blt.n 8008c82 <tcp_receive+0x9a>
|
|
(pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) {
|
|
8008c64: 687b ldr r3, [r7, #4]
|
|
8008c66: 6d9a ldr r2, [r3, #88] ; 0x58
|
|
8008c68: 4b7b ldr r3, [pc, #492] ; (8008e58 <tcp_receive+0x270>)
|
|
8008c6a: 681b ldr r3, [r3, #0]
|
|
(pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
|
|
8008c6c: 429a cmp r2, r3
|
|
8008c6e: d125 bne.n 8008cbc <tcp_receive+0xd4>
|
|
(pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) {
|
|
8008c70: 4b7a ldr r3, [pc, #488] ; (8008e5c <tcp_receive+0x274>)
|
|
8008c72: 681b ldr r3, [r3, #0]
|
|
8008c74: 89db ldrh r3, [r3, #14]
|
|
8008c76: b29a uxth r2, r3
|
|
8008c78: 687b ldr r3, [r7, #4]
|
|
8008c7a: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
|
|
8008c7e: 429a cmp r2, r3
|
|
8008c80: d91c bls.n 8008cbc <tcp_receive+0xd4>
|
|
pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd);
|
|
8008c82: 4b76 ldr r3, [pc, #472] ; (8008e5c <tcp_receive+0x274>)
|
|
8008c84: 681b ldr r3, [r3, #0]
|
|
8008c86: 89db ldrh r3, [r3, #14]
|
|
8008c88: b29a uxth r2, r3
|
|
8008c8a: 687b ldr r3, [r7, #4]
|
|
8008c8c: 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) {
|
|
8008c90: 687b ldr r3, [r7, #4]
|
|
8008c92: f8b3 2062 ldrh.w r2, [r3, #98] ; 0x62
|
|
8008c96: 687b ldr r3, [r7, #4]
|
|
8008c98: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
|
|
8008c9c: 429a cmp r2, r3
|
|
8008c9e: d205 bcs.n 8008cac <tcp_receive+0xc4>
|
|
pcb->snd_wnd_max = pcb->snd_wnd;
|
|
8008ca0: 687b ldr r3, [r7, #4]
|
|
8008ca2: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
|
|
8008ca6: 687b ldr r3, [r7, #4]
|
|
8008ca8: f8a3 2062 strh.w r2, [r3, #98] ; 0x62
|
|
}
|
|
pcb->snd_wl1 = seqno;
|
|
8008cac: 4b69 ldr r3, [pc, #420] ; (8008e54 <tcp_receive+0x26c>)
|
|
8008cae: 681a ldr r2, [r3, #0]
|
|
8008cb0: 687b ldr r3, [r7, #4]
|
|
8008cb2: 655a str r2, [r3, #84] ; 0x54
|
|
pcb->snd_wl2 = ackno;
|
|
8008cb4: 4b68 ldr r3, [pc, #416] ; (8008e58 <tcp_receive+0x270>)
|
|
8008cb6: 681a ldr r2, [r3, #0]
|
|
8008cb8: 687b ldr r3, [r7, #4]
|
|
8008cba: 659a str r2, [r3, #88] ; 0x58
|
|
* If it only passes 1, should reset dupack counter
|
|
*
|
|
*/
|
|
|
|
/* Clause 1 */
|
|
if (TCP_SEQ_LEQ(ackno, pcb->lastack)) {
|
|
8008cbc: 4b66 ldr r3, [pc, #408] ; (8008e58 <tcp_receive+0x270>)
|
|
8008cbe: 681a ldr r2, [r3, #0]
|
|
8008cc0: 687b ldr r3, [r7, #4]
|
|
8008cc2: 6c5b ldr r3, [r3, #68] ; 0x44
|
|
8008cc4: 1ad3 subs r3, r2, r3
|
|
8008cc6: 2b00 cmp r3, #0
|
|
8008cc8: dc58 bgt.n 8008d7c <tcp_receive+0x194>
|
|
/* Clause 2 */
|
|
if (tcplen == 0) {
|
|
8008cca: 4b65 ldr r3, [pc, #404] ; (8008e60 <tcp_receive+0x278>)
|
|
8008ccc: 881b ldrh r3, [r3, #0]
|
|
8008cce: 2b00 cmp r3, #0
|
|
8008cd0: d14b bne.n 8008d6a <tcp_receive+0x182>
|
|
/* Clause 3 */
|
|
if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge) {
|
|
8008cd2: 687b ldr r3, [r7, #4]
|
|
8008cd4: 6d9b ldr r3, [r3, #88] ; 0x58
|
|
8008cd6: 687a ldr r2, [r7, #4]
|
|
8008cd8: f8b2 2060 ldrh.w r2, [r2, #96] ; 0x60
|
|
8008cdc: 4413 add r3, r2
|
|
8008cde: 6b3a ldr r2, [r7, #48] ; 0x30
|
|
8008ce0: 429a cmp r2, r3
|
|
8008ce2: d142 bne.n 8008d6a <tcp_receive+0x182>
|
|
/* Clause 4 */
|
|
if (pcb->rtime >= 0) {
|
|
8008ce4: 687b ldr r3, [r7, #4]
|
|
8008ce6: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
|
|
8008cea: 2b00 cmp r3, #0
|
|
8008cec: db3d blt.n 8008d6a <tcp_receive+0x182>
|
|
/* Clause 5 */
|
|
if (pcb->lastack == ackno) {
|
|
8008cee: 687b ldr r3, [r7, #4]
|
|
8008cf0: 6c5a ldr r2, [r3, #68] ; 0x44
|
|
8008cf2: 4b59 ldr r3, [pc, #356] ; (8008e58 <tcp_receive+0x270>)
|
|
8008cf4: 681b ldr r3, [r3, #0]
|
|
8008cf6: 429a cmp r2, r3
|
|
8008cf8: d137 bne.n 8008d6a <tcp_receive+0x182>
|
|
found_dupack = 1;
|
|
8008cfa: 2301 movs r3, #1
|
|
8008cfc: 64bb str r3, [r7, #72] ; 0x48
|
|
if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) {
|
|
8008cfe: 687b ldr r3, [r7, #4]
|
|
8008d00: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
|
|
8008d04: 2bff cmp r3, #255 ; 0xff
|
|
8008d06: d007 beq.n 8008d18 <tcp_receive+0x130>
|
|
++pcb->dupacks;
|
|
8008d08: 687b ldr r3, [r7, #4]
|
|
8008d0a: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
|
|
8008d0e: 3301 adds r3, #1
|
|
8008d10: b2da uxtb r2, r3
|
|
8008d12: 687b ldr r3, [r7, #4]
|
|
8008d14: f883 2043 strb.w r2, [r3, #67] ; 0x43
|
|
}
|
|
if (pcb->dupacks > 3) {
|
|
8008d18: 687b ldr r3, [r7, #4]
|
|
8008d1a: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
|
|
8008d1e: 2b03 cmp r3, #3
|
|
8008d20: d91b bls.n 8008d5a <tcp_receive+0x172>
|
|
/* Inflate the congestion window */
|
|
TCP_WND_INC(pcb->cwnd, pcb->mss);
|
|
8008d22: 687b ldr r3, [r7, #4]
|
|
8008d24: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
|
|
8008d28: 687b ldr r3, [r7, #4]
|
|
8008d2a: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
8008d2c: 4413 add r3, r2
|
|
8008d2e: b29a uxth r2, r3
|
|
8008d30: 687b ldr r3, [r7, #4]
|
|
8008d32: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
|
|
8008d36: 429a cmp r2, r3
|
|
8008d38: d30a bcc.n 8008d50 <tcp_receive+0x168>
|
|
8008d3a: 687b ldr r3, [r7, #4]
|
|
8008d3c: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
|
|
8008d40: 687b ldr r3, [r7, #4]
|
|
8008d42: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
8008d44: 4413 add r3, r2
|
|
8008d46: b29a uxth r2, r3
|
|
8008d48: 687b ldr r3, [r7, #4]
|
|
8008d4a: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
|
|
8008d4e: e004 b.n 8008d5a <tcp_receive+0x172>
|
|
8008d50: 687b ldr r3, [r7, #4]
|
|
8008d52: f64f 72ff movw r2, #65535 ; 0xffff
|
|
8008d56: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
|
|
}
|
|
if (pcb->dupacks >= 3) {
|
|
8008d5a: 687b ldr r3, [r7, #4]
|
|
8008d5c: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
|
|
8008d60: 2b02 cmp r3, #2
|
|
8008d62: d902 bls.n 8008d6a <tcp_receive+0x182>
|
|
/* Do fast retransmit (checked via TF_INFR, not via dupacks count) */
|
|
tcp_rexmit_fast(pcb);
|
|
8008d64: 6878 ldr r0, [r7, #4]
|
|
8008d66: f001 feeb bl 800ab40 <tcp_rexmit_fast>
|
|
}
|
|
}
|
|
}
|
|
/* If Clause (1) or more is true, but not a duplicate ack, reset
|
|
* count of consecutive duplicate acks */
|
|
if (!found_dupack) {
|
|
8008d6a: 6cbb ldr r3, [r7, #72] ; 0x48
|
|
8008d6c: 2b00 cmp r3, #0
|
|
8008d6e: f040 8161 bne.w 8009034 <tcp_receive+0x44c>
|
|
pcb->dupacks = 0;
|
|
8008d72: 687b ldr r3, [r7, #4]
|
|
8008d74: 2200 movs r2, #0
|
|
8008d76: f883 2043 strb.w r2, [r3, #67] ; 0x43
|
|
8008d7a: e15b b.n 8009034 <tcp_receive+0x44c>
|
|
}
|
|
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
|
|
8008d7c: 4b36 ldr r3, [pc, #216] ; (8008e58 <tcp_receive+0x270>)
|
|
8008d7e: 681a ldr r2, [r3, #0]
|
|
8008d80: 687b ldr r3, [r7, #4]
|
|
8008d82: 6c5b ldr r3, [r3, #68] ; 0x44
|
|
8008d84: 1ad3 subs r3, r2, r3
|
|
8008d86: 3b01 subs r3, #1
|
|
8008d88: 2b00 cmp r3, #0
|
|
8008d8a: f2c0 814e blt.w 800902a <tcp_receive+0x442>
|
|
8008d8e: 4b32 ldr r3, [pc, #200] ; (8008e58 <tcp_receive+0x270>)
|
|
8008d90: 681a ldr r2, [r3, #0]
|
|
8008d92: 687b ldr r3, [r7, #4]
|
|
8008d94: 6d1b ldr r3, [r3, #80] ; 0x50
|
|
8008d96: 1ad3 subs r3, r2, r3
|
|
8008d98: 2b00 cmp r3, #0
|
|
8008d9a: f300 8146 bgt.w 800902a <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) {
|
|
8008d9e: 687b ldr r3, [r7, #4]
|
|
8008da0: 8b5b ldrh r3, [r3, #26]
|
|
8008da2: f003 0304 and.w r3, r3, #4
|
|
8008da6: 2b00 cmp r3, #0
|
|
8008da8: d010 beq.n 8008dcc <tcp_receive+0x1e4>
|
|
tcp_clear_flags(pcb, TF_INFR);
|
|
8008daa: 687b ldr r3, [r7, #4]
|
|
8008dac: 8b5b ldrh r3, [r3, #26]
|
|
8008dae: f023 0304 bic.w r3, r3, #4
|
|
8008db2: b29a uxth r2, r3
|
|
8008db4: 687b ldr r3, [r7, #4]
|
|
8008db6: 835a strh r2, [r3, #26]
|
|
pcb->cwnd = pcb->ssthresh;
|
|
8008db8: 687b ldr r3, [r7, #4]
|
|
8008dba: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a
|
|
8008dbe: 687b ldr r3, [r7, #4]
|
|
8008dc0: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
|
|
pcb->bytes_acked = 0;
|
|
8008dc4: 687b ldr r3, [r7, #4]
|
|
8008dc6: 2200 movs r2, #0
|
|
8008dc8: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
|
|
}
|
|
|
|
/* Reset the number of retransmissions. */
|
|
pcb->nrtx = 0;
|
|
8008dcc: 687b ldr r3, [r7, #4]
|
|
8008dce: 2200 movs r2, #0
|
|
8008dd0: f883 2042 strb.w r2, [r3, #66] ; 0x42
|
|
|
|
/* Reset the retransmission time-out. */
|
|
pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv);
|
|
8008dd4: 687b ldr r3, [r7, #4]
|
|
8008dd6: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
|
|
8008dda: 10db asrs r3, r3, #3
|
|
8008ddc: b21b sxth r3, r3
|
|
8008dde: b29a uxth r2, r3
|
|
8008de0: 687b ldr r3, [r7, #4]
|
|
8008de2: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
|
|
8008de6: b29b uxth r3, r3
|
|
8008de8: 4413 add r3, r2
|
|
8008dea: b29b uxth r3, r3
|
|
8008dec: b21a sxth r2, r3
|
|
8008dee: 687b ldr r3, [r7, #4]
|
|
8008df0: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
|
|
|
|
/* Record how much data this ACK acks */
|
|
acked = (tcpwnd_size_t)(ackno - pcb->lastack);
|
|
8008df4: 4b18 ldr r3, [pc, #96] ; (8008e58 <tcp_receive+0x270>)
|
|
8008df6: 681b ldr r3, [r3, #0]
|
|
8008df8: b29a uxth r2, r3
|
|
8008dfa: 687b ldr r3, [r7, #4]
|
|
8008dfc: 6c5b ldr r3, [r3, #68] ; 0x44
|
|
8008dfe: b29b uxth r3, r3
|
|
8008e00: 1ad3 subs r3, r2, r3
|
|
8008e02: 85fb strh r3, [r7, #46] ; 0x2e
|
|
|
|
/* Reset the fast retransmit variables. */
|
|
pcb->dupacks = 0;
|
|
8008e04: 687b ldr r3, [r7, #4]
|
|
8008e06: 2200 movs r2, #0
|
|
8008e08: f883 2043 strb.w r2, [r3, #67] ; 0x43
|
|
pcb->lastack = ackno;
|
|
8008e0c: 4b12 ldr r3, [pc, #72] ; (8008e58 <tcp_receive+0x270>)
|
|
8008e0e: 681a ldr r2, [r3, #0]
|
|
8008e10: 687b ldr r3, [r7, #4]
|
|
8008e12: 645a str r2, [r3, #68] ; 0x44
|
|
|
|
/* Update the congestion control variables (cwnd and
|
|
ssthresh). */
|
|
if (pcb->state >= ESTABLISHED) {
|
|
8008e14: 687b ldr r3, [r7, #4]
|
|
8008e16: 7d1b ldrb r3, [r3, #20]
|
|
8008e18: 2b03 cmp r3, #3
|
|
8008e1a: f240 8097 bls.w 8008f4c <tcp_receive+0x364>
|
|
if (pcb->cwnd < pcb->ssthresh) {
|
|
8008e1e: 687b ldr r3, [r7, #4]
|
|
8008e20: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
|
|
8008e24: 687b ldr r3, [r7, #4]
|
|
8008e26: f8b3 304a ldrh.w r3, [r3, #74] ; 0x4a
|
|
8008e2a: 429a cmp r2, r3
|
|
8008e2c: d245 bcs.n 8008eba <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;
|
|
8008e2e: 687b ldr r3, [r7, #4]
|
|
8008e30: 8b5b ldrh r3, [r3, #26]
|
|
8008e32: f403 6300 and.w r3, r3, #2048 ; 0x800
|
|
8008e36: 2b00 cmp r3, #0
|
|
8008e38: d014 beq.n 8008e64 <tcp_receive+0x27c>
|
|
8008e3a: 2301 movs r3, #1
|
|
8008e3c: e013 b.n 8008e66 <tcp_receive+0x27e>
|
|
8008e3e: bf00 nop
|
|
8008e40: 08016284 .word 0x08016284
|
|
8008e44: 080165b4 .word 0x080165b4
|
|
8008e48: 080162d0 .word 0x080162d0
|
|
8008e4c: 080165d0 .word 0x080165d0
|
|
8008e50: 20008c44 .word 0x20008c44
|
|
8008e54: 20008c38 .word 0x20008c38
|
|
8008e58: 20008c3c .word 0x20008c3c
|
|
8008e5c: 20008c28 .word 0x20008c28
|
|
8008e60: 20008c42 .word 0x20008c42
|
|
8008e64: 2302 movs r3, #2
|
|
8008e66: 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));
|
|
8008e6a: f897 302d ldrb.w r3, [r7, #45] ; 0x2d
|
|
8008e6e: b29a uxth r2, r3
|
|
8008e70: 687b ldr r3, [r7, #4]
|
|
8008e72: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
8008e74: fb12 f303 smulbb r3, r2, r3
|
|
8008e78: b29b uxth r3, r3
|
|
8008e7a: 8dfa ldrh r2, [r7, #46] ; 0x2e
|
|
8008e7c: 4293 cmp r3, r2
|
|
8008e7e: bf28 it cs
|
|
8008e80: 4613 movcs r3, r2
|
|
8008e82: 857b strh r3, [r7, #42] ; 0x2a
|
|
TCP_WND_INC(pcb->cwnd, increase);
|
|
8008e84: 687b ldr r3, [r7, #4]
|
|
8008e86: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
|
|
8008e8a: 8d7b ldrh r3, [r7, #42] ; 0x2a
|
|
8008e8c: 4413 add r3, r2
|
|
8008e8e: b29a uxth r2, r3
|
|
8008e90: 687b ldr r3, [r7, #4]
|
|
8008e92: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
|
|
8008e96: 429a cmp r2, r3
|
|
8008e98: d309 bcc.n 8008eae <tcp_receive+0x2c6>
|
|
8008e9a: 687b ldr r3, [r7, #4]
|
|
8008e9c: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
|
|
8008ea0: 8d7b ldrh r3, [r7, #42] ; 0x2a
|
|
8008ea2: 4413 add r3, r2
|
|
8008ea4: b29a uxth r2, r3
|
|
8008ea6: 687b ldr r3, [r7, #4]
|
|
8008ea8: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
|
|
8008eac: e04e b.n 8008f4c <tcp_receive+0x364>
|
|
8008eae: 687b ldr r3, [r7, #4]
|
|
8008eb0: f64f 72ff movw r2, #65535 ; 0xffff
|
|
8008eb4: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
|
|
8008eb8: e048 b.n 8008f4c <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);
|
|
8008eba: 687b ldr r3, [r7, #4]
|
|
8008ebc: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
|
|
8008ec0: 8dfb ldrh r3, [r7, #46] ; 0x2e
|
|
8008ec2: 4413 add r3, r2
|
|
8008ec4: b29a uxth r2, r3
|
|
8008ec6: 687b ldr r3, [r7, #4]
|
|
8008ec8: f8b3 306a ldrh.w r3, [r3, #106] ; 0x6a
|
|
8008ecc: 429a cmp r2, r3
|
|
8008ece: d309 bcc.n 8008ee4 <tcp_receive+0x2fc>
|
|
8008ed0: 687b ldr r3, [r7, #4]
|
|
8008ed2: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
|
|
8008ed6: 8dfb ldrh r3, [r7, #46] ; 0x2e
|
|
8008ed8: 4413 add r3, r2
|
|
8008eda: b29a uxth r2, r3
|
|
8008edc: 687b ldr r3, [r7, #4]
|
|
8008ede: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
|
|
8008ee2: e004 b.n 8008eee <tcp_receive+0x306>
|
|
8008ee4: 687b ldr r3, [r7, #4]
|
|
8008ee6: f64f 72ff movw r2, #65535 ; 0xffff
|
|
8008eea: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
|
|
if (pcb->bytes_acked >= pcb->cwnd) {
|
|
8008eee: 687b ldr r3, [r7, #4]
|
|
8008ef0: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
|
|
8008ef4: 687b ldr r3, [r7, #4]
|
|
8008ef6: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
|
|
8008efa: 429a cmp r2, r3
|
|
8008efc: d326 bcc.n 8008f4c <tcp_receive+0x364>
|
|
pcb->bytes_acked = (tcpwnd_size_t)(pcb->bytes_acked - pcb->cwnd);
|
|
8008efe: 687b ldr r3, [r7, #4]
|
|
8008f00: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
|
|
8008f04: 687b ldr r3, [r7, #4]
|
|
8008f06: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
|
|
8008f0a: 1ad3 subs r3, r2, r3
|
|
8008f0c: b29a uxth r2, r3
|
|
8008f0e: 687b ldr r3, [r7, #4]
|
|
8008f10: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
|
|
TCP_WND_INC(pcb->cwnd, pcb->mss);
|
|
8008f14: 687b ldr r3, [r7, #4]
|
|
8008f16: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
|
|
8008f1a: 687b ldr r3, [r7, #4]
|
|
8008f1c: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
8008f1e: 4413 add r3, r2
|
|
8008f20: b29a uxth r2, r3
|
|
8008f22: 687b ldr r3, [r7, #4]
|
|
8008f24: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
|
|
8008f28: 429a cmp r2, r3
|
|
8008f2a: d30a bcc.n 8008f42 <tcp_receive+0x35a>
|
|
8008f2c: 687b ldr r3, [r7, #4]
|
|
8008f2e: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
|
|
8008f32: 687b ldr r3, [r7, #4]
|
|
8008f34: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
8008f36: 4413 add r3, r2
|
|
8008f38: b29a uxth r2, r3
|
|
8008f3a: 687b ldr r3, [r7, #4]
|
|
8008f3c: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
|
|
8008f40: e004 b.n 8008f4c <tcp_receive+0x364>
|
|
8008f42: 687b ldr r3, [r7, #4]
|
|
8008f44: f64f 72ff movw r2, #65535 ; 0xffff
|
|
8008f48: 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);
|
|
8008f4c: 687b ldr r3, [r7, #4]
|
|
8008f4e: 6f19 ldr r1, [r3, #112] ; 0x70
|
|
8008f50: 687b ldr r3, [r7, #4]
|
|
8008f52: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
8008f54: 4a98 ldr r2, [pc, #608] ; (80091b8 <tcp_receive+0x5d0>)
|
|
8008f56: 6878 ldr r0, [r7, #4]
|
|
8008f58: f7ff fdca bl 8008af0 <tcp_free_acked_segments>
|
|
8008f5c: 4602 mov r2, r0
|
|
8008f5e: 687b ldr r3, [r7, #4]
|
|
8008f60: 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);
|
|
8008f62: 687b ldr r3, [r7, #4]
|
|
8008f64: 6ed9 ldr r1, [r3, #108] ; 0x6c
|
|
8008f66: 687b ldr r3, [r7, #4]
|
|
8008f68: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
8008f6a: 4a94 ldr r2, [pc, #592] ; (80091bc <tcp_receive+0x5d4>)
|
|
8008f6c: 6878 ldr r0, [r7, #4]
|
|
8008f6e: f7ff fdbf bl 8008af0 <tcp_free_acked_segments>
|
|
8008f72: 4602 mov r2, r0
|
|
8008f74: 687b ldr r3, [r7, #4]
|
|
8008f76: 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) {
|
|
8008f78: 687b ldr r3, [r7, #4]
|
|
8008f7a: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
8008f7c: 2b00 cmp r3, #0
|
|
8008f7e: d104 bne.n 8008f8a <tcp_receive+0x3a2>
|
|
pcb->rtime = -1;
|
|
8008f80: 687b ldr r3, [r7, #4]
|
|
8008f82: f64f 72ff movw r2, #65535 ; 0xffff
|
|
8008f86: 861a strh r2, [r3, #48] ; 0x30
|
|
8008f88: e002 b.n 8008f90 <tcp_receive+0x3a8>
|
|
} else {
|
|
pcb->rtime = 0;
|
|
8008f8a: 687b ldr r3, [r7, #4]
|
|
8008f8c: 2200 movs r2, #0
|
|
8008f8e: 861a strh r2, [r3, #48] ; 0x30
|
|
}
|
|
|
|
pcb->polltmr = 0;
|
|
8008f90: 687b ldr r3, [r7, #4]
|
|
8008f92: 2200 movs r2, #0
|
|
8008f94: 771a strb r2, [r3, #28]
|
|
|
|
#if TCP_OVERSIZE
|
|
if (pcb->unsent == NULL) {
|
|
8008f96: 687b ldr r3, [r7, #4]
|
|
8008f98: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
8008f9a: 2b00 cmp r3, #0
|
|
8008f9c: d103 bne.n 8008fa6 <tcp_receive+0x3be>
|
|
pcb->unsent_oversize = 0;
|
|
8008f9e: 687b ldr r3, [r7, #4]
|
|
8008fa0: 2200 movs r2, #0
|
|
8008fa2: 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);
|
|
8008fa6: 687b ldr r3, [r7, #4]
|
|
8008fa8: f8b3 2064 ldrh.w r2, [r3, #100] ; 0x64
|
|
8008fac: 4b84 ldr r3, [pc, #528] ; (80091c0 <tcp_receive+0x5d8>)
|
|
8008fae: 881b ldrh r3, [r3, #0]
|
|
8008fb0: 4413 add r3, r2
|
|
8008fb2: b29a uxth r2, r3
|
|
8008fb4: 687b ldr r3, [r7, #4]
|
|
8008fb6: f8a3 2064 strh.w r2, [r3, #100] ; 0x64
|
|
/* check if this ACK ends our retransmission of in-flight data */
|
|
if (pcb->flags & TF_RTO) {
|
|
8008fba: 687b ldr r3, [r7, #4]
|
|
8008fbc: 8b5b ldrh r3, [r3, #26]
|
|
8008fbe: f403 6300 and.w r3, r3, #2048 ; 0x800
|
|
8008fc2: 2b00 cmp r3, #0
|
|
8008fc4: d035 beq.n 8009032 <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) {
|
|
8008fc6: 687b ldr r3, [r7, #4]
|
|
8008fc8: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
8008fca: 2b00 cmp r3, #0
|
|
8008fcc: d118 bne.n 8009000 <tcp_receive+0x418>
|
|
if ((pcb->unsent == NULL) ||
|
|
8008fce: 687b ldr r3, [r7, #4]
|
|
8008fd0: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
8008fd2: 2b00 cmp r3, #0
|
|
8008fd4: d00c beq.n 8008ff0 <tcp_receive+0x408>
|
|
(TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unsent->tcphdr->seqno)))) {
|
|
8008fd6: 687b ldr r3, [r7, #4]
|
|
8008fd8: 6cdc ldr r4, [r3, #76] ; 0x4c
|
|
8008fda: 687b ldr r3, [r7, #4]
|
|
8008fdc: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
8008fde: 68db ldr r3, [r3, #12]
|
|
8008fe0: 685b ldr r3, [r3, #4]
|
|
8008fe2: 4618 mov r0, r3
|
|
8008fe4: f7fb f9bb bl 800435e <lwip_htonl>
|
|
8008fe8: 4603 mov r3, r0
|
|
8008fea: 1ae3 subs r3, r4, r3
|
|
if ((pcb->unsent == NULL) ||
|
|
8008fec: 2b00 cmp r3, #0
|
|
8008fee: dc20 bgt.n 8009032 <tcp_receive+0x44a>
|
|
tcp_clear_flags(pcb, TF_RTO);
|
|
8008ff0: 687b ldr r3, [r7, #4]
|
|
8008ff2: 8b5b ldrh r3, [r3, #26]
|
|
8008ff4: f423 6300 bic.w r3, r3, #2048 ; 0x800
|
|
8008ff8: b29a uxth r2, r3
|
|
8008ffa: 687b ldr r3, [r7, #4]
|
|
8008ffc: 835a strh r2, [r3, #26]
|
|
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
|
|
8008ffe: e018 b.n 8009032 <tcp_receive+0x44a>
|
|
}
|
|
} else if (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unacked->tcphdr->seqno))) {
|
|
8009000: 687b ldr r3, [r7, #4]
|
|
8009002: 6cdc ldr r4, [r3, #76] ; 0x4c
|
|
8009004: 687b ldr r3, [r7, #4]
|
|
8009006: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
8009008: 68db ldr r3, [r3, #12]
|
|
800900a: 685b ldr r3, [r3, #4]
|
|
800900c: 4618 mov r0, r3
|
|
800900e: f7fb f9a6 bl 800435e <lwip_htonl>
|
|
8009012: 4603 mov r3, r0
|
|
8009014: 1ae3 subs r3, r4, r3
|
|
8009016: 2b00 cmp r3, #0
|
|
8009018: dc0b bgt.n 8009032 <tcp_receive+0x44a>
|
|
tcp_clear_flags(pcb, TF_RTO);
|
|
800901a: 687b ldr r3, [r7, #4]
|
|
800901c: 8b5b ldrh r3, [r3, #26]
|
|
800901e: f423 6300 bic.w r3, r3, #2048 ; 0x800
|
|
8009022: b29a uxth r2, r3
|
|
8009024: 687b ldr r3, [r7, #4]
|
|
8009026: 835a strh r2, [r3, #26]
|
|
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
|
|
8009028: e003 b.n 8009032 <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);
|
|
800902a: 6878 ldr r0, [r7, #4]
|
|
800902c: f001 ff76 bl 800af1c <tcp_send_empty_ack>
|
|
8009030: e000 b.n 8009034 <tcp_receive+0x44c>
|
|
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
|
|
8009032: 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)) {
|
|
8009034: 687b ldr r3, [r7, #4]
|
|
8009036: 6b5b ldr r3, [r3, #52] ; 0x34
|
|
8009038: 2b00 cmp r3, #0
|
|
800903a: d05b beq.n 80090f4 <tcp_receive+0x50c>
|
|
800903c: 687b ldr r3, [r7, #4]
|
|
800903e: 6b9a ldr r2, [r3, #56] ; 0x38
|
|
8009040: 4b60 ldr r3, [pc, #384] ; (80091c4 <tcp_receive+0x5dc>)
|
|
8009042: 681b ldr r3, [r3, #0]
|
|
8009044: 1ad3 subs r3, r2, r3
|
|
8009046: 2b00 cmp r3, #0
|
|
8009048: da54 bge.n 80090f4 <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);
|
|
800904a: 4b5f ldr r3, [pc, #380] ; (80091c8 <tcp_receive+0x5e0>)
|
|
800904c: 681b ldr r3, [r3, #0]
|
|
800904e: b29a uxth r2, r3
|
|
8009050: 687b ldr r3, [r7, #4]
|
|
8009052: 6b5b ldr r3, [r3, #52] ; 0x34
|
|
8009054: b29b uxth r3, r3
|
|
8009056: 1ad3 subs r3, r2, r3
|
|
8009058: b29b uxth r3, r3
|
|
800905a: 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));
|
|
800905e: f8b7 204e ldrh.w r2, [r7, #78] ; 0x4e
|
|
8009062: 687b ldr r3, [r7, #4]
|
|
8009064: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
|
|
8009068: 10db asrs r3, r3, #3
|
|
800906a: b21b sxth r3, r3
|
|
800906c: b29b uxth r3, r3
|
|
800906e: 1ad3 subs r3, r2, r3
|
|
8009070: b29b uxth r3, r3
|
|
8009072: f8a7 304e strh.w r3, [r7, #78] ; 0x4e
|
|
pcb->sa = (s16_t)(pcb->sa + m);
|
|
8009076: 687b ldr r3, [r7, #4]
|
|
8009078: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
|
|
800907c: b29a uxth r2, r3
|
|
800907e: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e
|
|
8009082: 4413 add r3, r2
|
|
8009084: b29b uxth r3, r3
|
|
8009086: b21a sxth r2, r3
|
|
8009088: 687b ldr r3, [r7, #4]
|
|
800908a: 879a strh r2, [r3, #60] ; 0x3c
|
|
if (m < 0) {
|
|
800908c: f9b7 304e ldrsh.w r3, [r7, #78] ; 0x4e
|
|
8009090: 2b00 cmp r3, #0
|
|
8009092: da05 bge.n 80090a0 <tcp_receive+0x4b8>
|
|
m = (s16_t) - m;
|
|
8009094: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e
|
|
8009098: 425b negs r3, r3
|
|
800909a: b29b uxth r3, r3
|
|
800909c: f8a7 304e strh.w r3, [r7, #78] ; 0x4e
|
|
}
|
|
m = (s16_t)(m - (pcb->sv >> 2));
|
|
80090a0: f8b7 204e ldrh.w r2, [r7, #78] ; 0x4e
|
|
80090a4: 687b ldr r3, [r7, #4]
|
|
80090a6: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
|
|
80090aa: 109b asrs r3, r3, #2
|
|
80090ac: b21b sxth r3, r3
|
|
80090ae: b29b uxth r3, r3
|
|
80090b0: 1ad3 subs r3, r2, r3
|
|
80090b2: b29b uxth r3, r3
|
|
80090b4: f8a7 304e strh.w r3, [r7, #78] ; 0x4e
|
|
pcb->sv = (s16_t)(pcb->sv + m);
|
|
80090b8: 687b ldr r3, [r7, #4]
|
|
80090ba: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
|
|
80090be: b29a uxth r2, r3
|
|
80090c0: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e
|
|
80090c4: 4413 add r3, r2
|
|
80090c6: b29b uxth r3, r3
|
|
80090c8: b21a sxth r2, r3
|
|
80090ca: 687b ldr r3, [r7, #4]
|
|
80090cc: 87da strh r2, [r3, #62] ; 0x3e
|
|
pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv);
|
|
80090ce: 687b ldr r3, [r7, #4]
|
|
80090d0: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
|
|
80090d4: 10db asrs r3, r3, #3
|
|
80090d6: b21b sxth r3, r3
|
|
80090d8: b29a uxth r2, r3
|
|
80090da: 687b ldr r3, [r7, #4]
|
|
80090dc: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
|
|
80090e0: b29b uxth r3, r3
|
|
80090e2: 4413 add r3, r2
|
|
80090e4: b29b uxth r3, r3
|
|
80090e6: b21a sxth r2, r3
|
|
80090e8: 687b ldr r3, [r7, #4]
|
|
80090ea: 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;
|
|
80090ee: 687b ldr r3, [r7, #4]
|
|
80090f0: 2200 movs r2, #0
|
|
80090f2: 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)) {
|
|
80090f4: 4b35 ldr r3, [pc, #212] ; (80091cc <tcp_receive+0x5e4>)
|
|
80090f6: 881b ldrh r3, [r3, #0]
|
|
80090f8: 2b00 cmp r3, #0
|
|
80090fa: f000 84e2 beq.w 8009ac2 <tcp_receive+0xeda>
|
|
80090fe: 687b ldr r3, [r7, #4]
|
|
8009100: 7d1b ldrb r3, [r3, #20]
|
|
8009102: 2b06 cmp r3, #6
|
|
8009104: f200 84dd bhi.w 8009ac2 <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)) {
|
|
8009108: 687b ldr r3, [r7, #4]
|
|
800910a: 6a5a ldr r2, [r3, #36] ; 0x24
|
|
800910c: 4b30 ldr r3, [pc, #192] ; (80091d0 <tcp_receive+0x5e8>)
|
|
800910e: 681b ldr r3, [r3, #0]
|
|
8009110: 1ad3 subs r3, r2, r3
|
|
8009112: 3b01 subs r3, #1
|
|
8009114: 2b00 cmp r3, #0
|
|
8009116: f2c0 808f blt.w 8009238 <tcp_receive+0x650>
|
|
800911a: 687b ldr r3, [r7, #4]
|
|
800911c: 6a5a ldr r2, [r3, #36] ; 0x24
|
|
800911e: 4b2b ldr r3, [pc, #172] ; (80091cc <tcp_receive+0x5e4>)
|
|
8009120: 881b ldrh r3, [r3, #0]
|
|
8009122: 4619 mov r1, r3
|
|
8009124: 4b2a ldr r3, [pc, #168] ; (80091d0 <tcp_receive+0x5e8>)
|
|
8009126: 681b ldr r3, [r3, #0]
|
|
8009128: 440b add r3, r1
|
|
800912a: 1ad3 subs r3, r2, r3
|
|
800912c: 3301 adds r3, #1
|
|
800912e: 2b00 cmp r3, #0
|
|
8009130: f300 8082 bgt.w 8009238 <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;
|
|
8009134: 4b27 ldr r3, [pc, #156] ; (80091d4 <tcp_receive+0x5ec>)
|
|
8009136: 685b ldr r3, [r3, #4]
|
|
8009138: 647b str r3, [r7, #68] ; 0x44
|
|
u32_t off32 = pcb->rcv_nxt - seqno;
|
|
800913a: 687b ldr r3, [r7, #4]
|
|
800913c: 6a5a ldr r2, [r3, #36] ; 0x24
|
|
800913e: 4b24 ldr r3, [pc, #144] ; (80091d0 <tcp_receive+0x5e8>)
|
|
8009140: 681b ldr r3, [r3, #0]
|
|
8009142: 1ad3 subs r3, r2, r3
|
|
8009144: 627b str r3, [r7, #36] ; 0x24
|
|
u16_t new_tot_len, off;
|
|
LWIP_ASSERT("inseg.p != NULL", inseg.p);
|
|
8009146: 4b23 ldr r3, [pc, #140] ; (80091d4 <tcp_receive+0x5ec>)
|
|
8009148: 685b ldr r3, [r3, #4]
|
|
800914a: 2b00 cmp r3, #0
|
|
800914c: d106 bne.n 800915c <tcp_receive+0x574>
|
|
800914e: 4b22 ldr r3, [pc, #136] ; (80091d8 <tcp_receive+0x5f0>)
|
|
8009150: f240 5294 movw r2, #1428 ; 0x594
|
|
8009154: 4921 ldr r1, [pc, #132] ; (80091dc <tcp_receive+0x5f4>)
|
|
8009156: 4822 ldr r0, [pc, #136] ; (80091e0 <tcp_receive+0x5f8>)
|
|
8009158: f007 f9ce bl 80104f8 <printf>
|
|
LWIP_ASSERT("insane offset!", (off32 < 0xffff));
|
|
800915c: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800915e: f64f 72fe movw r2, #65534 ; 0xfffe
|
|
8009162: 4293 cmp r3, r2
|
|
8009164: d906 bls.n 8009174 <tcp_receive+0x58c>
|
|
8009166: 4b1c ldr r3, [pc, #112] ; (80091d8 <tcp_receive+0x5f0>)
|
|
8009168: f240 5295 movw r2, #1429 ; 0x595
|
|
800916c: 491d ldr r1, [pc, #116] ; (80091e4 <tcp_receive+0x5fc>)
|
|
800916e: 481c ldr r0, [pc, #112] ; (80091e0 <tcp_receive+0x5f8>)
|
|
8009170: f007 f9c2 bl 80104f8 <printf>
|
|
off = (u16_t)off32;
|
|
8009174: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
8009176: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
|
|
LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off));
|
|
800917a: 4b16 ldr r3, [pc, #88] ; (80091d4 <tcp_receive+0x5ec>)
|
|
800917c: 685b ldr r3, [r3, #4]
|
|
800917e: 891b ldrh r3, [r3, #8]
|
|
8009180: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
|
|
8009184: 429a cmp r2, r3
|
|
8009186: d906 bls.n 8009196 <tcp_receive+0x5ae>
|
|
8009188: 4b13 ldr r3, [pc, #76] ; (80091d8 <tcp_receive+0x5f0>)
|
|
800918a: f240 5297 movw r2, #1431 ; 0x597
|
|
800918e: 4916 ldr r1, [pc, #88] ; (80091e8 <tcp_receive+0x600>)
|
|
8009190: 4813 ldr r0, [pc, #76] ; (80091e0 <tcp_receive+0x5f8>)
|
|
8009192: f007 f9b1 bl 80104f8 <printf>
|
|
inseg.len -= off;
|
|
8009196: 4b0f ldr r3, [pc, #60] ; (80091d4 <tcp_receive+0x5ec>)
|
|
8009198: 891a ldrh r2, [r3, #8]
|
|
800919a: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
|
|
800919e: 1ad3 subs r3, r2, r3
|
|
80091a0: b29a uxth r2, r3
|
|
80091a2: 4b0c ldr r3, [pc, #48] ; (80091d4 <tcp_receive+0x5ec>)
|
|
80091a4: 811a strh r2, [r3, #8]
|
|
new_tot_len = (u16_t)(inseg.p->tot_len - off);
|
|
80091a6: 4b0b ldr r3, [pc, #44] ; (80091d4 <tcp_receive+0x5ec>)
|
|
80091a8: 685b ldr r3, [r3, #4]
|
|
80091aa: 891a ldrh r2, [r3, #8]
|
|
80091ac: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
|
|
80091b0: 1ad3 subs r3, r2, r3
|
|
80091b2: 847b strh r3, [r7, #34] ; 0x22
|
|
while (p->len < off) {
|
|
80091b4: e02a b.n 800920c <tcp_receive+0x624>
|
|
80091b6: bf00 nop
|
|
80091b8: 080165ec .word 0x080165ec
|
|
80091bc: 080165f4 .word 0x080165f4
|
|
80091c0: 20008c40 .word 0x20008c40
|
|
80091c4: 20008c3c .word 0x20008c3c
|
|
80091c8: 20008c00 .word 0x20008c00
|
|
80091cc: 20008c42 .word 0x20008c42
|
|
80091d0: 20008c38 .word 0x20008c38
|
|
80091d4: 20008c18 .word 0x20008c18
|
|
80091d8: 08016284 .word 0x08016284
|
|
80091dc: 080165fc .word 0x080165fc
|
|
80091e0: 080162d0 .word 0x080162d0
|
|
80091e4: 0801660c .word 0x0801660c
|
|
80091e8: 0801661c .word 0x0801661c
|
|
off -= p->len;
|
|
80091ec: 6c7b ldr r3, [r7, #68] ; 0x44
|
|
80091ee: 895b ldrh r3, [r3, #10]
|
|
80091f0: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
|
|
80091f4: 1ad3 subs r3, r2, r3
|
|
80091f6: 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;
|
|
80091fa: 6c7b ldr r3, [r7, #68] ; 0x44
|
|
80091fc: 8c7a ldrh r2, [r7, #34] ; 0x22
|
|
80091fe: 811a strh r2, [r3, #8]
|
|
p->len = 0;
|
|
8009200: 6c7b ldr r3, [r7, #68] ; 0x44
|
|
8009202: 2200 movs r2, #0
|
|
8009204: 815a strh r2, [r3, #10]
|
|
p = p->next;
|
|
8009206: 6c7b ldr r3, [r7, #68] ; 0x44
|
|
8009208: 681b ldr r3, [r3, #0]
|
|
800920a: 647b str r3, [r7, #68] ; 0x44
|
|
while (p->len < off) {
|
|
800920c: 6c7b ldr r3, [r7, #68] ; 0x44
|
|
800920e: 895b ldrh r3, [r3, #10]
|
|
8009210: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
|
|
8009214: 429a cmp r2, r3
|
|
8009216: d8e9 bhi.n 80091ec <tcp_receive+0x604>
|
|
}
|
|
/* cannot fail... */
|
|
pbuf_remove_header(p, off);
|
|
8009218: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
|
|
800921c: 4619 mov r1, r3
|
|
800921e: 6c78 ldr r0, [r7, #68] ; 0x44
|
|
8009220: f7fc fb6c bl 80058fc <pbuf_remove_header>
|
|
inseg.tcphdr->seqno = seqno = pcb->rcv_nxt;
|
|
8009224: 687b ldr r3, [r7, #4]
|
|
8009226: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
8009228: 4a91 ldr r2, [pc, #580] ; (8009470 <tcp_receive+0x888>)
|
|
800922a: 6013 str r3, [r2, #0]
|
|
800922c: 4b91 ldr r3, [pc, #580] ; (8009474 <tcp_receive+0x88c>)
|
|
800922e: 68db ldr r3, [r3, #12]
|
|
8009230: 4a8f ldr r2, [pc, #572] ; (8009470 <tcp_receive+0x888>)
|
|
8009232: 6812 ldr r2, [r2, #0]
|
|
8009234: 605a str r2, [r3, #4]
|
|
if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) {
|
|
8009236: e00d b.n 8009254 <tcp_receive+0x66c>
|
|
} else {
|
|
if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) {
|
|
8009238: 4b8d ldr r3, [pc, #564] ; (8009470 <tcp_receive+0x888>)
|
|
800923a: 681a ldr r2, [r3, #0]
|
|
800923c: 687b ldr r3, [r7, #4]
|
|
800923e: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
8009240: 1ad3 subs r3, r2, r3
|
|
8009242: 2b00 cmp r3, #0
|
|
8009244: da06 bge.n 8009254 <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);
|
|
8009246: 687b ldr r3, [r7, #4]
|
|
8009248: 8b5b ldrh r3, [r3, #26]
|
|
800924a: f043 0302 orr.w r3, r3, #2
|
|
800924e: b29a uxth r2, r3
|
|
8009250: 687b ldr r3, [r7, #4]
|
|
8009252: 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,
|
|
8009254: 4b86 ldr r3, [pc, #536] ; (8009470 <tcp_receive+0x888>)
|
|
8009256: 681a ldr r2, [r3, #0]
|
|
8009258: 687b ldr r3, [r7, #4]
|
|
800925a: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800925c: 1ad3 subs r3, r2, r3
|
|
800925e: 2b00 cmp r3, #0
|
|
8009260: f2c0 842a blt.w 8009ab8 <tcp_receive+0xed0>
|
|
8009264: 4b82 ldr r3, [pc, #520] ; (8009470 <tcp_receive+0x888>)
|
|
8009266: 681a ldr r2, [r3, #0]
|
|
8009268: 687b ldr r3, [r7, #4]
|
|
800926a: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800926c: 6879 ldr r1, [r7, #4]
|
|
800926e: 8d09 ldrh r1, [r1, #40] ; 0x28
|
|
8009270: 440b add r3, r1
|
|
8009272: 1ad3 subs r3, r2, r3
|
|
8009274: 3301 adds r3, #1
|
|
8009276: 2b00 cmp r3, #0
|
|
8009278: f300 841e bgt.w 8009ab8 <tcp_receive+0xed0>
|
|
pcb->rcv_nxt + pcb->rcv_wnd - 1)) {
|
|
if (pcb->rcv_nxt == seqno) {
|
|
800927c: 687b ldr r3, [r7, #4]
|
|
800927e: 6a5a ldr r2, [r3, #36] ; 0x24
|
|
8009280: 4b7b ldr r3, [pc, #492] ; (8009470 <tcp_receive+0x888>)
|
|
8009282: 681b ldr r3, [r3, #0]
|
|
8009284: 429a cmp r2, r3
|
|
8009286: f040 829a bne.w 80097be <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);
|
|
800928a: 4b7a ldr r3, [pc, #488] ; (8009474 <tcp_receive+0x88c>)
|
|
800928c: 891c ldrh r4, [r3, #8]
|
|
800928e: 4b79 ldr r3, [pc, #484] ; (8009474 <tcp_receive+0x88c>)
|
|
8009290: 68db ldr r3, [r3, #12]
|
|
8009292: 899b ldrh r3, [r3, #12]
|
|
8009294: b29b uxth r3, r3
|
|
8009296: 4618 mov r0, r3
|
|
8009298: f7fb f84c bl 8004334 <lwip_htons>
|
|
800929c: 4603 mov r3, r0
|
|
800929e: b2db uxtb r3, r3
|
|
80092a0: f003 0303 and.w r3, r3, #3
|
|
80092a4: 2b00 cmp r3, #0
|
|
80092a6: d001 beq.n 80092ac <tcp_receive+0x6c4>
|
|
80092a8: 2301 movs r3, #1
|
|
80092aa: e000 b.n 80092ae <tcp_receive+0x6c6>
|
|
80092ac: 2300 movs r3, #0
|
|
80092ae: 4423 add r3, r4
|
|
80092b0: b29a uxth r2, r3
|
|
80092b2: 4b71 ldr r3, [pc, #452] ; (8009478 <tcp_receive+0x890>)
|
|
80092b4: 801a strh r2, [r3, #0]
|
|
|
|
if (tcplen > pcb->rcv_wnd) {
|
|
80092b6: 687b ldr r3, [r7, #4]
|
|
80092b8: 8d1a ldrh r2, [r3, #40] ; 0x28
|
|
80092ba: 4b6f ldr r3, [pc, #444] ; (8009478 <tcp_receive+0x890>)
|
|
80092bc: 881b ldrh r3, [r3, #0]
|
|
80092be: 429a cmp r2, r3
|
|
80092c0: d275 bcs.n 80093ae <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) {
|
|
80092c2: 4b6c ldr r3, [pc, #432] ; (8009474 <tcp_receive+0x88c>)
|
|
80092c4: 68db ldr r3, [r3, #12]
|
|
80092c6: 899b ldrh r3, [r3, #12]
|
|
80092c8: b29b uxth r3, r3
|
|
80092ca: 4618 mov r0, r3
|
|
80092cc: f7fb f832 bl 8004334 <lwip_htons>
|
|
80092d0: 4603 mov r3, r0
|
|
80092d2: b2db uxtb r3, r3
|
|
80092d4: f003 0301 and.w r3, r3, #1
|
|
80092d8: 2b00 cmp r3, #0
|
|
80092da: d01f beq.n 800931c <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);
|
|
80092dc: 4b65 ldr r3, [pc, #404] ; (8009474 <tcp_receive+0x88c>)
|
|
80092de: 68db ldr r3, [r3, #12]
|
|
80092e0: 899b ldrh r3, [r3, #12]
|
|
80092e2: b29b uxth r3, r3
|
|
80092e4: b21b sxth r3, r3
|
|
80092e6: f423 537c bic.w r3, r3, #16128 ; 0x3f00
|
|
80092ea: b21c sxth r4, r3
|
|
80092ec: 4b61 ldr r3, [pc, #388] ; (8009474 <tcp_receive+0x88c>)
|
|
80092ee: 68db ldr r3, [r3, #12]
|
|
80092f0: 899b ldrh r3, [r3, #12]
|
|
80092f2: b29b uxth r3, r3
|
|
80092f4: 4618 mov r0, r3
|
|
80092f6: f7fb f81d bl 8004334 <lwip_htons>
|
|
80092fa: 4603 mov r3, r0
|
|
80092fc: b2db uxtb r3, r3
|
|
80092fe: b29b uxth r3, r3
|
|
8009300: f003 033e and.w r3, r3, #62 ; 0x3e
|
|
8009304: b29b uxth r3, r3
|
|
8009306: 4618 mov r0, r3
|
|
8009308: f7fb f814 bl 8004334 <lwip_htons>
|
|
800930c: 4603 mov r3, r0
|
|
800930e: b21b sxth r3, r3
|
|
8009310: 4323 orrs r3, r4
|
|
8009312: b21a sxth r2, r3
|
|
8009314: 4b57 ldr r3, [pc, #348] ; (8009474 <tcp_receive+0x88c>)
|
|
8009316: 68db ldr r3, [r3, #12]
|
|
8009318: b292 uxth r2, r2
|
|
800931a: 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;
|
|
800931c: 687b ldr r3, [r7, #4]
|
|
800931e: 8d1a ldrh r2, [r3, #40] ; 0x28
|
|
8009320: 4b54 ldr r3, [pc, #336] ; (8009474 <tcp_receive+0x88c>)
|
|
8009322: 811a strh r2, [r3, #8]
|
|
if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) {
|
|
8009324: 4b53 ldr r3, [pc, #332] ; (8009474 <tcp_receive+0x88c>)
|
|
8009326: 68db ldr r3, [r3, #12]
|
|
8009328: 899b ldrh r3, [r3, #12]
|
|
800932a: b29b uxth r3, r3
|
|
800932c: 4618 mov r0, r3
|
|
800932e: f7fb f801 bl 8004334 <lwip_htons>
|
|
8009332: 4603 mov r3, r0
|
|
8009334: b2db uxtb r3, r3
|
|
8009336: f003 0302 and.w r3, r3, #2
|
|
800933a: 2b00 cmp r3, #0
|
|
800933c: d005 beq.n 800934a <tcp_receive+0x762>
|
|
inseg.len -= 1;
|
|
800933e: 4b4d ldr r3, [pc, #308] ; (8009474 <tcp_receive+0x88c>)
|
|
8009340: 891b ldrh r3, [r3, #8]
|
|
8009342: 3b01 subs r3, #1
|
|
8009344: b29a uxth r2, r3
|
|
8009346: 4b4b ldr r3, [pc, #300] ; (8009474 <tcp_receive+0x88c>)
|
|
8009348: 811a strh r2, [r3, #8]
|
|
}
|
|
pbuf_realloc(inseg.p, inseg.len);
|
|
800934a: 4b4a ldr r3, [pc, #296] ; (8009474 <tcp_receive+0x88c>)
|
|
800934c: 685b ldr r3, [r3, #4]
|
|
800934e: 4a49 ldr r2, [pc, #292] ; (8009474 <tcp_receive+0x88c>)
|
|
8009350: 8912 ldrh r2, [r2, #8]
|
|
8009352: 4611 mov r1, r2
|
|
8009354: 4618 mov r0, r3
|
|
8009356: f7fc f9d1 bl 80056fc <pbuf_realloc>
|
|
tcplen = TCP_TCPLEN(&inseg);
|
|
800935a: 4b46 ldr r3, [pc, #280] ; (8009474 <tcp_receive+0x88c>)
|
|
800935c: 891c ldrh r4, [r3, #8]
|
|
800935e: 4b45 ldr r3, [pc, #276] ; (8009474 <tcp_receive+0x88c>)
|
|
8009360: 68db ldr r3, [r3, #12]
|
|
8009362: 899b ldrh r3, [r3, #12]
|
|
8009364: b29b uxth r3, r3
|
|
8009366: 4618 mov r0, r3
|
|
8009368: f7fa ffe4 bl 8004334 <lwip_htons>
|
|
800936c: 4603 mov r3, r0
|
|
800936e: b2db uxtb r3, r3
|
|
8009370: f003 0303 and.w r3, r3, #3
|
|
8009374: 2b00 cmp r3, #0
|
|
8009376: d001 beq.n 800937c <tcp_receive+0x794>
|
|
8009378: 2301 movs r3, #1
|
|
800937a: e000 b.n 800937e <tcp_receive+0x796>
|
|
800937c: 2300 movs r3, #0
|
|
800937e: 4423 add r3, r4
|
|
8009380: b29a uxth r2, r3
|
|
8009382: 4b3d ldr r3, [pc, #244] ; (8009478 <tcp_receive+0x890>)
|
|
8009384: 801a strh r2, [r3, #0]
|
|
LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n",
|
|
8009386: 4b3c ldr r3, [pc, #240] ; (8009478 <tcp_receive+0x890>)
|
|
8009388: 881b ldrh r3, [r3, #0]
|
|
800938a: 461a mov r2, r3
|
|
800938c: 4b38 ldr r3, [pc, #224] ; (8009470 <tcp_receive+0x888>)
|
|
800938e: 681b ldr r3, [r3, #0]
|
|
8009390: 441a add r2, r3
|
|
8009392: 687b ldr r3, [r7, #4]
|
|
8009394: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
8009396: 6879 ldr r1, [r7, #4]
|
|
8009398: 8d09 ldrh r1, [r1, #40] ; 0x28
|
|
800939a: 440b add r3, r1
|
|
800939c: 429a cmp r2, r3
|
|
800939e: d006 beq.n 80093ae <tcp_receive+0x7c6>
|
|
80093a0: 4b36 ldr r3, [pc, #216] ; (800947c <tcp_receive+0x894>)
|
|
80093a2: f240 52cb movw r2, #1483 ; 0x5cb
|
|
80093a6: 4936 ldr r1, [pc, #216] ; (8009480 <tcp_receive+0x898>)
|
|
80093a8: 4836 ldr r0, [pc, #216] ; (8009484 <tcp_receive+0x89c>)
|
|
80093aa: f007 f8a5 bl 80104f8 <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) {
|
|
80093ae: 687b ldr r3, [r7, #4]
|
|
80093b0: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
80093b2: 2b00 cmp r3, #0
|
|
80093b4: f000 80e7 beq.w 8009586 <tcp_receive+0x99e>
|
|
if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
|
|
80093b8: 4b2e ldr r3, [pc, #184] ; (8009474 <tcp_receive+0x88c>)
|
|
80093ba: 68db ldr r3, [r3, #12]
|
|
80093bc: 899b ldrh r3, [r3, #12]
|
|
80093be: b29b uxth r3, r3
|
|
80093c0: 4618 mov r0, r3
|
|
80093c2: f7fa ffb7 bl 8004334 <lwip_htons>
|
|
80093c6: 4603 mov r3, r0
|
|
80093c8: b2db uxtb r3, r3
|
|
80093ca: f003 0301 and.w r3, r3, #1
|
|
80093ce: 2b00 cmp r3, #0
|
|
80093d0: d010 beq.n 80093f4 <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) {
|
|
80093d2: e00a b.n 80093ea <tcp_receive+0x802>
|
|
struct tcp_seg *old_ooseq = pcb->ooseq;
|
|
80093d4: 687b ldr r3, [r7, #4]
|
|
80093d6: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
80093d8: 60fb str r3, [r7, #12]
|
|
pcb->ooseq = pcb->ooseq->next;
|
|
80093da: 687b ldr r3, [r7, #4]
|
|
80093dc: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
80093de: 681a ldr r2, [r3, #0]
|
|
80093e0: 687b ldr r3, [r7, #4]
|
|
80093e2: 675a str r2, [r3, #116] ; 0x74
|
|
tcp_seg_free(old_ooseq);
|
|
80093e4: 68f8 ldr r0, [r7, #12]
|
|
80093e6: f7fd fd92 bl 8006f0e <tcp_seg_free>
|
|
while (pcb->ooseq != NULL) {
|
|
80093ea: 687b ldr r3, [r7, #4]
|
|
80093ec: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
80093ee: 2b00 cmp r3, #0
|
|
80093f0: d1f0 bne.n 80093d4 <tcp_receive+0x7ec>
|
|
80093f2: e0c8 b.n 8009586 <tcp_receive+0x99e>
|
|
}
|
|
} else {
|
|
struct tcp_seg *next = pcb->ooseq;
|
|
80093f4: 687b ldr r3, [r7, #4]
|
|
80093f6: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
80093f8: 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 &&
|
|
80093fa: e052 b.n 80094a2 <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 &&
|
|
80093fc: 6bfb ldr r3, [r7, #60] ; 0x3c
|
|
80093fe: 68db ldr r3, [r3, #12]
|
|
8009400: 899b ldrh r3, [r3, #12]
|
|
8009402: b29b uxth r3, r3
|
|
8009404: 4618 mov r0, r3
|
|
8009406: f7fa ff95 bl 8004334 <lwip_htons>
|
|
800940a: 4603 mov r3, r0
|
|
800940c: b2db uxtb r3, r3
|
|
800940e: f003 0301 and.w r3, r3, #1
|
|
8009412: 2b00 cmp r3, #0
|
|
8009414: d03d beq.n 8009492 <tcp_receive+0x8aa>
|
|
(TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) == 0) {
|
|
8009416: 4b17 ldr r3, [pc, #92] ; (8009474 <tcp_receive+0x88c>)
|
|
8009418: 68db ldr r3, [r3, #12]
|
|
800941a: 899b ldrh r3, [r3, #12]
|
|
800941c: b29b uxth r3, r3
|
|
800941e: 4618 mov r0, r3
|
|
8009420: f7fa ff88 bl 8004334 <lwip_htons>
|
|
8009424: 4603 mov r3, r0
|
|
8009426: b2db uxtb r3, r3
|
|
8009428: f003 0302 and.w r3, r3, #2
|
|
if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 &&
|
|
800942c: 2b00 cmp r3, #0
|
|
800942e: d130 bne.n 8009492 <tcp_receive+0x8aa>
|
|
TCPH_SET_FLAG(inseg.tcphdr, TCP_FIN);
|
|
8009430: 4b10 ldr r3, [pc, #64] ; (8009474 <tcp_receive+0x88c>)
|
|
8009432: 68db ldr r3, [r3, #12]
|
|
8009434: 899b ldrh r3, [r3, #12]
|
|
8009436: b29c uxth r4, r3
|
|
8009438: 2001 movs r0, #1
|
|
800943a: f7fa ff7b bl 8004334 <lwip_htons>
|
|
800943e: 4603 mov r3, r0
|
|
8009440: 461a mov r2, r3
|
|
8009442: 4b0c ldr r3, [pc, #48] ; (8009474 <tcp_receive+0x88c>)
|
|
8009444: 68db ldr r3, [r3, #12]
|
|
8009446: 4322 orrs r2, r4
|
|
8009448: b292 uxth r2, r2
|
|
800944a: 819a strh r2, [r3, #12]
|
|
tcplen = TCP_TCPLEN(&inseg);
|
|
800944c: 4b09 ldr r3, [pc, #36] ; (8009474 <tcp_receive+0x88c>)
|
|
800944e: 891c ldrh r4, [r3, #8]
|
|
8009450: 4b08 ldr r3, [pc, #32] ; (8009474 <tcp_receive+0x88c>)
|
|
8009452: 68db ldr r3, [r3, #12]
|
|
8009454: 899b ldrh r3, [r3, #12]
|
|
8009456: b29b uxth r3, r3
|
|
8009458: 4618 mov r0, r3
|
|
800945a: f7fa ff6b bl 8004334 <lwip_htons>
|
|
800945e: 4603 mov r3, r0
|
|
8009460: b2db uxtb r3, r3
|
|
8009462: f003 0303 and.w r3, r3, #3
|
|
8009466: 2b00 cmp r3, #0
|
|
8009468: d00e beq.n 8009488 <tcp_receive+0x8a0>
|
|
800946a: 2301 movs r3, #1
|
|
800946c: e00d b.n 800948a <tcp_receive+0x8a2>
|
|
800946e: bf00 nop
|
|
8009470: 20008c38 .word 0x20008c38
|
|
8009474: 20008c18 .word 0x20008c18
|
|
8009478: 20008c42 .word 0x20008c42
|
|
800947c: 08016284 .word 0x08016284
|
|
8009480: 0801662c .word 0x0801662c
|
|
8009484: 080162d0 .word 0x080162d0
|
|
8009488: 2300 movs r3, #0
|
|
800948a: 4423 add r3, r4
|
|
800948c: b29a uxth r2, r3
|
|
800948e: 4b98 ldr r3, [pc, #608] ; (80096f0 <tcp_receive+0xb08>)
|
|
8009490: 801a strh r2, [r3, #0]
|
|
}
|
|
tmp = next;
|
|
8009492: 6bfb ldr r3, [r7, #60] ; 0x3c
|
|
8009494: 613b str r3, [r7, #16]
|
|
next = next->next;
|
|
8009496: 6bfb ldr r3, [r7, #60] ; 0x3c
|
|
8009498: 681b ldr r3, [r3, #0]
|
|
800949a: 63fb str r3, [r7, #60] ; 0x3c
|
|
tcp_seg_free(tmp);
|
|
800949c: 6938 ldr r0, [r7, #16]
|
|
800949e: f7fd fd36 bl 8006f0e <tcp_seg_free>
|
|
while (next &&
|
|
80094a2: 6bfb ldr r3, [r7, #60] ; 0x3c
|
|
80094a4: 2b00 cmp r3, #0
|
|
80094a6: d00e beq.n 80094c6 <tcp_receive+0x8de>
|
|
TCP_SEQ_GEQ(seqno + tcplen,
|
|
80094a8: 4b91 ldr r3, [pc, #580] ; (80096f0 <tcp_receive+0xb08>)
|
|
80094aa: 881b ldrh r3, [r3, #0]
|
|
80094ac: 461a mov r2, r3
|
|
80094ae: 4b91 ldr r3, [pc, #580] ; (80096f4 <tcp_receive+0xb0c>)
|
|
80094b0: 681b ldr r3, [r3, #0]
|
|
80094b2: 441a add r2, r3
|
|
80094b4: 6bfb ldr r3, [r7, #60] ; 0x3c
|
|
80094b6: 68db ldr r3, [r3, #12]
|
|
80094b8: 685b ldr r3, [r3, #4]
|
|
80094ba: 6bf9 ldr r1, [r7, #60] ; 0x3c
|
|
80094bc: 8909 ldrh r1, [r1, #8]
|
|
80094be: 440b add r3, r1
|
|
80094c0: 1ad3 subs r3, r2, r3
|
|
while (next &&
|
|
80094c2: 2b00 cmp r3, #0
|
|
80094c4: da9a bge.n 80093fc <tcp_receive+0x814>
|
|
}
|
|
/* Now trim right side of inseg if it overlaps with the first
|
|
* segment on ooseq */
|
|
if (next &&
|
|
80094c6: 6bfb ldr r3, [r7, #60] ; 0x3c
|
|
80094c8: 2b00 cmp r3, #0
|
|
80094ca: d059 beq.n 8009580 <tcp_receive+0x998>
|
|
TCP_SEQ_GT(seqno + tcplen,
|
|
80094cc: 4b88 ldr r3, [pc, #544] ; (80096f0 <tcp_receive+0xb08>)
|
|
80094ce: 881b ldrh r3, [r3, #0]
|
|
80094d0: 461a mov r2, r3
|
|
80094d2: 4b88 ldr r3, [pc, #544] ; (80096f4 <tcp_receive+0xb0c>)
|
|
80094d4: 681b ldr r3, [r3, #0]
|
|
80094d6: 441a add r2, r3
|
|
80094d8: 6bfb ldr r3, [r7, #60] ; 0x3c
|
|
80094da: 68db ldr r3, [r3, #12]
|
|
80094dc: 685b ldr r3, [r3, #4]
|
|
80094de: 1ad3 subs r3, r2, r3
|
|
if (next &&
|
|
80094e0: 2b00 cmp r3, #0
|
|
80094e2: dd4d ble.n 8009580 <tcp_receive+0x998>
|
|
next->tcphdr->seqno)) {
|
|
/* inseg cannot have FIN here (already processed above) */
|
|
inseg.len = (u16_t)(next->tcphdr->seqno - seqno);
|
|
80094e4: 6bfb ldr r3, [r7, #60] ; 0x3c
|
|
80094e6: 68db ldr r3, [r3, #12]
|
|
80094e8: 685b ldr r3, [r3, #4]
|
|
80094ea: b29a uxth r2, r3
|
|
80094ec: 4b81 ldr r3, [pc, #516] ; (80096f4 <tcp_receive+0xb0c>)
|
|
80094ee: 681b ldr r3, [r3, #0]
|
|
80094f0: b29b uxth r3, r3
|
|
80094f2: 1ad3 subs r3, r2, r3
|
|
80094f4: b29a uxth r2, r3
|
|
80094f6: 4b80 ldr r3, [pc, #512] ; (80096f8 <tcp_receive+0xb10>)
|
|
80094f8: 811a strh r2, [r3, #8]
|
|
if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) {
|
|
80094fa: 4b7f ldr r3, [pc, #508] ; (80096f8 <tcp_receive+0xb10>)
|
|
80094fc: 68db ldr r3, [r3, #12]
|
|
80094fe: 899b ldrh r3, [r3, #12]
|
|
8009500: b29b uxth r3, r3
|
|
8009502: 4618 mov r0, r3
|
|
8009504: f7fa ff16 bl 8004334 <lwip_htons>
|
|
8009508: 4603 mov r3, r0
|
|
800950a: b2db uxtb r3, r3
|
|
800950c: f003 0302 and.w r3, r3, #2
|
|
8009510: 2b00 cmp r3, #0
|
|
8009512: d005 beq.n 8009520 <tcp_receive+0x938>
|
|
inseg.len -= 1;
|
|
8009514: 4b78 ldr r3, [pc, #480] ; (80096f8 <tcp_receive+0xb10>)
|
|
8009516: 891b ldrh r3, [r3, #8]
|
|
8009518: 3b01 subs r3, #1
|
|
800951a: b29a uxth r2, r3
|
|
800951c: 4b76 ldr r3, [pc, #472] ; (80096f8 <tcp_receive+0xb10>)
|
|
800951e: 811a strh r2, [r3, #8]
|
|
}
|
|
pbuf_realloc(inseg.p, inseg.len);
|
|
8009520: 4b75 ldr r3, [pc, #468] ; (80096f8 <tcp_receive+0xb10>)
|
|
8009522: 685b ldr r3, [r3, #4]
|
|
8009524: 4a74 ldr r2, [pc, #464] ; (80096f8 <tcp_receive+0xb10>)
|
|
8009526: 8912 ldrh r2, [r2, #8]
|
|
8009528: 4611 mov r1, r2
|
|
800952a: 4618 mov r0, r3
|
|
800952c: f7fc f8e6 bl 80056fc <pbuf_realloc>
|
|
tcplen = TCP_TCPLEN(&inseg);
|
|
8009530: 4b71 ldr r3, [pc, #452] ; (80096f8 <tcp_receive+0xb10>)
|
|
8009532: 891c ldrh r4, [r3, #8]
|
|
8009534: 4b70 ldr r3, [pc, #448] ; (80096f8 <tcp_receive+0xb10>)
|
|
8009536: 68db ldr r3, [r3, #12]
|
|
8009538: 899b ldrh r3, [r3, #12]
|
|
800953a: b29b uxth r3, r3
|
|
800953c: 4618 mov r0, r3
|
|
800953e: f7fa fef9 bl 8004334 <lwip_htons>
|
|
8009542: 4603 mov r3, r0
|
|
8009544: b2db uxtb r3, r3
|
|
8009546: f003 0303 and.w r3, r3, #3
|
|
800954a: 2b00 cmp r3, #0
|
|
800954c: d001 beq.n 8009552 <tcp_receive+0x96a>
|
|
800954e: 2301 movs r3, #1
|
|
8009550: e000 b.n 8009554 <tcp_receive+0x96c>
|
|
8009552: 2300 movs r3, #0
|
|
8009554: 4423 add r3, r4
|
|
8009556: b29a uxth r2, r3
|
|
8009558: 4b65 ldr r3, [pc, #404] ; (80096f0 <tcp_receive+0xb08>)
|
|
800955a: 801a strh r2, [r3, #0]
|
|
LWIP_ASSERT("tcp_receive: segment not trimmed correctly to ooseq queue\n",
|
|
800955c: 4b64 ldr r3, [pc, #400] ; (80096f0 <tcp_receive+0xb08>)
|
|
800955e: 881b ldrh r3, [r3, #0]
|
|
8009560: 461a mov r2, r3
|
|
8009562: 4b64 ldr r3, [pc, #400] ; (80096f4 <tcp_receive+0xb0c>)
|
|
8009564: 681b ldr r3, [r3, #0]
|
|
8009566: 441a add r2, r3
|
|
8009568: 6bfb ldr r3, [r7, #60] ; 0x3c
|
|
800956a: 68db ldr r3, [r3, #12]
|
|
800956c: 685b ldr r3, [r3, #4]
|
|
800956e: 429a cmp r2, r3
|
|
8009570: d006 beq.n 8009580 <tcp_receive+0x998>
|
|
8009572: 4b62 ldr r3, [pc, #392] ; (80096fc <tcp_receive+0xb14>)
|
|
8009574: f240 52fc movw r2, #1532 ; 0x5fc
|
|
8009578: 4961 ldr r1, [pc, #388] ; (8009700 <tcp_receive+0xb18>)
|
|
800957a: 4862 ldr r0, [pc, #392] ; (8009704 <tcp_receive+0xb1c>)
|
|
800957c: f006 ffbc bl 80104f8 <printf>
|
|
(seqno + tcplen) == next->tcphdr->seqno);
|
|
}
|
|
pcb->ooseq = next;
|
|
8009580: 687b ldr r3, [r7, #4]
|
|
8009582: 6bfa ldr r2, [r7, #60] ; 0x3c
|
|
8009584: 675a str r2, [r3, #116] ; 0x74
|
|
}
|
|
}
|
|
#endif /* TCP_QUEUE_OOSEQ */
|
|
|
|
pcb->rcv_nxt = seqno + tcplen;
|
|
8009586: 4b5a ldr r3, [pc, #360] ; (80096f0 <tcp_receive+0xb08>)
|
|
8009588: 881b ldrh r3, [r3, #0]
|
|
800958a: 461a mov r2, r3
|
|
800958c: 4b59 ldr r3, [pc, #356] ; (80096f4 <tcp_receive+0xb0c>)
|
|
800958e: 681b ldr r3, [r3, #0]
|
|
8009590: 441a add r2, r3
|
|
8009592: 687b ldr r3, [r7, #4]
|
|
8009594: 625a str r2, [r3, #36] ; 0x24
|
|
|
|
/* Update the receiver's (our) window. */
|
|
LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen);
|
|
8009596: 687b ldr r3, [r7, #4]
|
|
8009598: 8d1a ldrh r2, [r3, #40] ; 0x28
|
|
800959a: 4b55 ldr r3, [pc, #340] ; (80096f0 <tcp_receive+0xb08>)
|
|
800959c: 881b ldrh r3, [r3, #0]
|
|
800959e: 429a cmp r2, r3
|
|
80095a0: d206 bcs.n 80095b0 <tcp_receive+0x9c8>
|
|
80095a2: 4b56 ldr r3, [pc, #344] ; (80096fc <tcp_receive+0xb14>)
|
|
80095a4: f240 6207 movw r2, #1543 ; 0x607
|
|
80095a8: 4957 ldr r1, [pc, #348] ; (8009708 <tcp_receive+0xb20>)
|
|
80095aa: 4856 ldr r0, [pc, #344] ; (8009704 <tcp_receive+0xb1c>)
|
|
80095ac: f006 ffa4 bl 80104f8 <printf>
|
|
pcb->rcv_wnd -= tcplen;
|
|
80095b0: 687b ldr r3, [r7, #4]
|
|
80095b2: 8d1a ldrh r2, [r3, #40] ; 0x28
|
|
80095b4: 4b4e ldr r3, [pc, #312] ; (80096f0 <tcp_receive+0xb08>)
|
|
80095b6: 881b ldrh r3, [r3, #0]
|
|
80095b8: 1ad3 subs r3, r2, r3
|
|
80095ba: b29a uxth r2, r3
|
|
80095bc: 687b ldr r3, [r7, #4]
|
|
80095be: 851a strh r2, [r3, #40] ; 0x28
|
|
|
|
tcp_update_rcv_ann_wnd(pcb);
|
|
80095c0: 6878 ldr r0, [r7, #4]
|
|
80095c2: f7fc ffc5 bl 8006550 <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) {
|
|
80095c6: 4b4c ldr r3, [pc, #304] ; (80096f8 <tcp_receive+0xb10>)
|
|
80095c8: 685b ldr r3, [r3, #4]
|
|
80095ca: 891b ldrh r3, [r3, #8]
|
|
80095cc: 2b00 cmp r3, #0
|
|
80095ce: d006 beq.n 80095de <tcp_receive+0x9f6>
|
|
recv_data = inseg.p;
|
|
80095d0: 4b49 ldr r3, [pc, #292] ; (80096f8 <tcp_receive+0xb10>)
|
|
80095d2: 685b ldr r3, [r3, #4]
|
|
80095d4: 4a4d ldr r2, [pc, #308] ; (800970c <tcp_receive+0xb24>)
|
|
80095d6: 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;
|
|
80095d8: 4b47 ldr r3, [pc, #284] ; (80096f8 <tcp_receive+0xb10>)
|
|
80095da: 2200 movs r2, #0
|
|
80095dc: 605a str r2, [r3, #4]
|
|
}
|
|
if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
|
|
80095de: 4b46 ldr r3, [pc, #280] ; (80096f8 <tcp_receive+0xb10>)
|
|
80095e0: 68db ldr r3, [r3, #12]
|
|
80095e2: 899b ldrh r3, [r3, #12]
|
|
80095e4: b29b uxth r3, r3
|
|
80095e6: 4618 mov r0, r3
|
|
80095e8: f7fa fea4 bl 8004334 <lwip_htons>
|
|
80095ec: 4603 mov r3, r0
|
|
80095ee: b2db uxtb r3, r3
|
|
80095f0: f003 0301 and.w r3, r3, #1
|
|
80095f4: 2b00 cmp r3, #0
|
|
80095f6: f000 80b8 beq.w 800976a <tcp_receive+0xb82>
|
|
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n"));
|
|
recv_flags |= TF_GOT_FIN;
|
|
80095fa: 4b45 ldr r3, [pc, #276] ; (8009710 <tcp_receive+0xb28>)
|
|
80095fc: 781b ldrb r3, [r3, #0]
|
|
80095fe: f043 0320 orr.w r3, r3, #32
|
|
8009602: b2da uxtb r2, r3
|
|
8009604: 4b42 ldr r3, [pc, #264] ; (8009710 <tcp_receive+0xb28>)
|
|
8009606: 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 &&
|
|
8009608: e0af b.n 800976a <tcp_receive+0xb82>
|
|
pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) {
|
|
|
|
struct tcp_seg *cseg = pcb->ooseq;
|
|
800960a: 687b ldr r3, [r7, #4]
|
|
800960c: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
800960e: 60bb str r3, [r7, #8]
|
|
seqno = pcb->ooseq->tcphdr->seqno;
|
|
8009610: 687b ldr r3, [r7, #4]
|
|
8009612: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
8009614: 68db ldr r3, [r3, #12]
|
|
8009616: 685b ldr r3, [r3, #4]
|
|
8009618: 4a36 ldr r2, [pc, #216] ; (80096f4 <tcp_receive+0xb0c>)
|
|
800961a: 6013 str r3, [r2, #0]
|
|
|
|
pcb->rcv_nxt += TCP_TCPLEN(cseg);
|
|
800961c: 68bb ldr r3, [r7, #8]
|
|
800961e: 891b ldrh r3, [r3, #8]
|
|
8009620: 461c mov r4, r3
|
|
8009622: 68bb ldr r3, [r7, #8]
|
|
8009624: 68db ldr r3, [r3, #12]
|
|
8009626: 899b ldrh r3, [r3, #12]
|
|
8009628: b29b uxth r3, r3
|
|
800962a: 4618 mov r0, r3
|
|
800962c: f7fa fe82 bl 8004334 <lwip_htons>
|
|
8009630: 4603 mov r3, r0
|
|
8009632: b2db uxtb r3, r3
|
|
8009634: f003 0303 and.w r3, r3, #3
|
|
8009638: 2b00 cmp r3, #0
|
|
800963a: d001 beq.n 8009640 <tcp_receive+0xa58>
|
|
800963c: 2301 movs r3, #1
|
|
800963e: e000 b.n 8009642 <tcp_receive+0xa5a>
|
|
8009640: 2300 movs r3, #0
|
|
8009642: 191a adds r2, r3, r4
|
|
8009644: 687b ldr r3, [r7, #4]
|
|
8009646: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
8009648: 441a add r2, r3
|
|
800964a: 687b ldr r3, [r7, #4]
|
|
800964c: 625a str r2, [r3, #36] ; 0x24
|
|
LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n",
|
|
800964e: 687b ldr r3, [r7, #4]
|
|
8009650: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
8009652: 461c mov r4, r3
|
|
8009654: 68bb ldr r3, [r7, #8]
|
|
8009656: 891b ldrh r3, [r3, #8]
|
|
8009658: 461d mov r5, r3
|
|
800965a: 68bb ldr r3, [r7, #8]
|
|
800965c: 68db ldr r3, [r3, #12]
|
|
800965e: 899b ldrh r3, [r3, #12]
|
|
8009660: b29b uxth r3, r3
|
|
8009662: 4618 mov r0, r3
|
|
8009664: f7fa fe66 bl 8004334 <lwip_htons>
|
|
8009668: 4603 mov r3, r0
|
|
800966a: b2db uxtb r3, r3
|
|
800966c: f003 0303 and.w r3, r3, #3
|
|
8009670: 2b00 cmp r3, #0
|
|
8009672: d001 beq.n 8009678 <tcp_receive+0xa90>
|
|
8009674: 2301 movs r3, #1
|
|
8009676: e000 b.n 800967a <tcp_receive+0xa92>
|
|
8009678: 2300 movs r3, #0
|
|
800967a: 442b add r3, r5
|
|
800967c: 429c cmp r4, r3
|
|
800967e: d206 bcs.n 800968e <tcp_receive+0xaa6>
|
|
8009680: 4b1e ldr r3, [pc, #120] ; (80096fc <tcp_receive+0xb14>)
|
|
8009682: f240 622b movw r2, #1579 ; 0x62b
|
|
8009686: 4923 ldr r1, [pc, #140] ; (8009714 <tcp_receive+0xb2c>)
|
|
8009688: 481e ldr r0, [pc, #120] ; (8009704 <tcp_receive+0xb1c>)
|
|
800968a: f006 ff35 bl 80104f8 <printf>
|
|
pcb->rcv_wnd >= TCP_TCPLEN(cseg));
|
|
pcb->rcv_wnd -= TCP_TCPLEN(cseg);
|
|
800968e: 68bb ldr r3, [r7, #8]
|
|
8009690: 891b ldrh r3, [r3, #8]
|
|
8009692: 461c mov r4, r3
|
|
8009694: 68bb ldr r3, [r7, #8]
|
|
8009696: 68db ldr r3, [r3, #12]
|
|
8009698: 899b ldrh r3, [r3, #12]
|
|
800969a: b29b uxth r3, r3
|
|
800969c: 4618 mov r0, r3
|
|
800969e: f7fa fe49 bl 8004334 <lwip_htons>
|
|
80096a2: 4603 mov r3, r0
|
|
80096a4: b2db uxtb r3, r3
|
|
80096a6: f003 0303 and.w r3, r3, #3
|
|
80096aa: 2b00 cmp r3, #0
|
|
80096ac: d001 beq.n 80096b2 <tcp_receive+0xaca>
|
|
80096ae: 2301 movs r3, #1
|
|
80096b0: e000 b.n 80096b4 <tcp_receive+0xacc>
|
|
80096b2: 2300 movs r3, #0
|
|
80096b4: 1919 adds r1, r3, r4
|
|
80096b6: 687b ldr r3, [r7, #4]
|
|
80096b8: 8d1a ldrh r2, [r3, #40] ; 0x28
|
|
80096ba: b28b uxth r3, r1
|
|
80096bc: 1ad3 subs r3, r2, r3
|
|
80096be: b29a uxth r2, r3
|
|
80096c0: 687b ldr r3, [r7, #4]
|
|
80096c2: 851a strh r2, [r3, #40] ; 0x28
|
|
|
|
tcp_update_rcv_ann_wnd(pcb);
|
|
80096c4: 6878 ldr r0, [r7, #4]
|
|
80096c6: f7fc ff43 bl 8006550 <tcp_update_rcv_ann_wnd>
|
|
|
|
if (cseg->p->tot_len > 0) {
|
|
80096ca: 68bb ldr r3, [r7, #8]
|
|
80096cc: 685b ldr r3, [r3, #4]
|
|
80096ce: 891b ldrh r3, [r3, #8]
|
|
80096d0: 2b00 cmp r3, #0
|
|
80096d2: d028 beq.n 8009726 <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) {
|
|
80096d4: 4b0d ldr r3, [pc, #52] ; (800970c <tcp_receive+0xb24>)
|
|
80096d6: 681b ldr r3, [r3, #0]
|
|
80096d8: 2b00 cmp r3, #0
|
|
80096da: d01d beq.n 8009718 <tcp_receive+0xb30>
|
|
pbuf_cat(recv_data, cseg->p);
|
|
80096dc: 4b0b ldr r3, [pc, #44] ; (800970c <tcp_receive+0xb24>)
|
|
80096de: 681a ldr r2, [r3, #0]
|
|
80096e0: 68bb ldr r3, [r7, #8]
|
|
80096e2: 685b ldr r3, [r3, #4]
|
|
80096e4: 4619 mov r1, r3
|
|
80096e6: 4610 mov r0, r2
|
|
80096e8: f7fc fa50 bl 8005b8c <pbuf_cat>
|
|
80096ec: e018 b.n 8009720 <tcp_receive+0xb38>
|
|
80096ee: bf00 nop
|
|
80096f0: 20008c42 .word 0x20008c42
|
|
80096f4: 20008c38 .word 0x20008c38
|
|
80096f8: 20008c18 .word 0x20008c18
|
|
80096fc: 08016284 .word 0x08016284
|
|
8009700: 08016664 .word 0x08016664
|
|
8009704: 080162d0 .word 0x080162d0
|
|
8009708: 080166a0 .word 0x080166a0
|
|
800970c: 20008c48 .word 0x20008c48
|
|
8009710: 20008c45 .word 0x20008c45
|
|
8009714: 080166c0 .word 0x080166c0
|
|
} else {
|
|
recv_data = cseg->p;
|
|
8009718: 68bb ldr r3, [r7, #8]
|
|
800971a: 685b ldr r3, [r3, #4]
|
|
800971c: 4a70 ldr r2, [pc, #448] ; (80098e0 <tcp_receive+0xcf8>)
|
|
800971e: 6013 str r3, [r2, #0]
|
|
}
|
|
cseg->p = NULL;
|
|
8009720: 68bb ldr r3, [r7, #8]
|
|
8009722: 2200 movs r2, #0
|
|
8009724: 605a str r2, [r3, #4]
|
|
}
|
|
if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) {
|
|
8009726: 68bb ldr r3, [r7, #8]
|
|
8009728: 68db ldr r3, [r3, #12]
|
|
800972a: 899b ldrh r3, [r3, #12]
|
|
800972c: b29b uxth r3, r3
|
|
800972e: 4618 mov r0, r3
|
|
8009730: f7fa fe00 bl 8004334 <lwip_htons>
|
|
8009734: 4603 mov r3, r0
|
|
8009736: b2db uxtb r3, r3
|
|
8009738: f003 0301 and.w r3, r3, #1
|
|
800973c: 2b00 cmp r3, #0
|
|
800973e: d00d beq.n 800975c <tcp_receive+0xb74>
|
|
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: dequeued FIN.\n"));
|
|
recv_flags |= TF_GOT_FIN;
|
|
8009740: 4b68 ldr r3, [pc, #416] ; (80098e4 <tcp_receive+0xcfc>)
|
|
8009742: 781b ldrb r3, [r3, #0]
|
|
8009744: f043 0320 orr.w r3, r3, #32
|
|
8009748: b2da uxtb r2, r3
|
|
800974a: 4b66 ldr r3, [pc, #408] ; (80098e4 <tcp_receive+0xcfc>)
|
|
800974c: 701a strb r2, [r3, #0]
|
|
if (pcb->state == ESTABLISHED) { /* force passive close or we can move to active close */
|
|
800974e: 687b ldr r3, [r7, #4]
|
|
8009750: 7d1b ldrb r3, [r3, #20]
|
|
8009752: 2b04 cmp r3, #4
|
|
8009754: d102 bne.n 800975c <tcp_receive+0xb74>
|
|
pcb->state = CLOSE_WAIT;
|
|
8009756: 687b ldr r3, [r7, #4]
|
|
8009758: 2207 movs r2, #7
|
|
800975a: 751a strb r2, [r3, #20]
|
|
}
|
|
}
|
|
|
|
pcb->ooseq = cseg->next;
|
|
800975c: 68bb ldr r3, [r7, #8]
|
|
800975e: 681a ldr r2, [r3, #0]
|
|
8009760: 687b ldr r3, [r7, #4]
|
|
8009762: 675a str r2, [r3, #116] ; 0x74
|
|
tcp_seg_free(cseg);
|
|
8009764: 68b8 ldr r0, [r7, #8]
|
|
8009766: f7fd fbd2 bl 8006f0e <tcp_seg_free>
|
|
while (pcb->ooseq != NULL &&
|
|
800976a: 687b ldr r3, [r7, #4]
|
|
800976c: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
800976e: 2b00 cmp r3, #0
|
|
8009770: d008 beq.n 8009784 <tcp_receive+0xb9c>
|
|
pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) {
|
|
8009772: 687b ldr r3, [r7, #4]
|
|
8009774: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
8009776: 68db ldr r3, [r3, #12]
|
|
8009778: 685a ldr r2, [r3, #4]
|
|
800977a: 687b ldr r3, [r7, #4]
|
|
800977c: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
while (pcb->ooseq != NULL &&
|
|
800977e: 429a cmp r2, r3
|
|
8009780: f43f af43 beq.w 800960a <tcp_receive+0xa22>
|
|
#endif /* LWIP_TCP_SACK_OUT */
|
|
#endif /* TCP_QUEUE_OOSEQ */
|
|
|
|
|
|
/* Acknowledge the segment(s). */
|
|
tcp_ack(pcb);
|
|
8009784: 687b ldr r3, [r7, #4]
|
|
8009786: 8b5b ldrh r3, [r3, #26]
|
|
8009788: f003 0301 and.w r3, r3, #1
|
|
800978c: 2b00 cmp r3, #0
|
|
800978e: d00e beq.n 80097ae <tcp_receive+0xbc6>
|
|
8009790: 687b ldr r3, [r7, #4]
|
|
8009792: 8b5b ldrh r3, [r3, #26]
|
|
8009794: f023 0301 bic.w r3, r3, #1
|
|
8009798: b29a uxth r2, r3
|
|
800979a: 687b ldr r3, [r7, #4]
|
|
800979c: 835a strh r2, [r3, #26]
|
|
800979e: 687b ldr r3, [r7, #4]
|
|
80097a0: 8b5b ldrh r3, [r3, #26]
|
|
80097a2: f043 0302 orr.w r3, r3, #2
|
|
80097a6: b29a uxth r2, r3
|
|
80097a8: 687b ldr r3, [r7, #4]
|
|
80097aa: 835a strh r2, [r3, #26]
|
|
if (pcb->rcv_nxt == seqno) {
|
|
80097ac: e188 b.n 8009ac0 <tcp_receive+0xed8>
|
|
tcp_ack(pcb);
|
|
80097ae: 687b ldr r3, [r7, #4]
|
|
80097b0: 8b5b ldrh r3, [r3, #26]
|
|
80097b2: f043 0301 orr.w r3, r3, #1
|
|
80097b6: b29a uxth r2, r3
|
|
80097b8: 687b ldr r3, [r7, #4]
|
|
80097ba: 835a strh r2, [r3, #26]
|
|
if (pcb->rcv_nxt == seqno) {
|
|
80097bc: e180 b.n 8009ac0 <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) {
|
|
80097be: 687b ldr r3, [r7, #4]
|
|
80097c0: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
80097c2: 2b00 cmp r3, #0
|
|
80097c4: d106 bne.n 80097d4 <tcp_receive+0xbec>
|
|
pcb->ooseq = tcp_seg_copy(&inseg);
|
|
80097c6: 4848 ldr r0, [pc, #288] ; (80098e8 <tcp_receive+0xd00>)
|
|
80097c8: f7fd fbba bl 8006f40 <tcp_seg_copy>
|
|
80097cc: 4602 mov r2, r0
|
|
80097ce: 687b ldr r3, [r7, #4]
|
|
80097d0: 675a str r2, [r3, #116] ; 0x74
|
|
80097d2: e16d b.n 8009ab0 <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;
|
|
80097d4: 2300 movs r3, #0
|
|
80097d6: 637b str r3, [r7, #52] ; 0x34
|
|
for (next = pcb->ooseq; next != NULL; next = next->next) {
|
|
80097d8: 687b ldr r3, [r7, #4]
|
|
80097da: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
80097dc: 63bb str r3, [r7, #56] ; 0x38
|
|
80097de: e157 b.n 8009a90 <tcp_receive+0xea8>
|
|
if (seqno == next->tcphdr->seqno) {
|
|
80097e0: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
80097e2: 68db ldr r3, [r3, #12]
|
|
80097e4: 685a ldr r2, [r3, #4]
|
|
80097e6: 4b41 ldr r3, [pc, #260] ; (80098ec <tcp_receive+0xd04>)
|
|
80097e8: 681b ldr r3, [r3, #0]
|
|
80097ea: 429a cmp r2, r3
|
|
80097ec: d11d bne.n 800982a <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) {
|
|
80097ee: 4b3e ldr r3, [pc, #248] ; (80098e8 <tcp_receive+0xd00>)
|
|
80097f0: 891a ldrh r2, [r3, #8]
|
|
80097f2: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
80097f4: 891b ldrh r3, [r3, #8]
|
|
80097f6: 429a cmp r2, r3
|
|
80097f8: f240 814f bls.w 8009a9a <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);
|
|
80097fc: 483a ldr r0, [pc, #232] ; (80098e8 <tcp_receive+0xd00>)
|
|
80097fe: f7fd fb9f bl 8006f40 <tcp_seg_copy>
|
|
8009802: 6178 str r0, [r7, #20]
|
|
if (cseg != NULL) {
|
|
8009804: 697b ldr r3, [r7, #20]
|
|
8009806: 2b00 cmp r3, #0
|
|
8009808: f000 8149 beq.w 8009a9e <tcp_receive+0xeb6>
|
|
if (prev != NULL) {
|
|
800980c: 6b7b ldr r3, [r7, #52] ; 0x34
|
|
800980e: 2b00 cmp r3, #0
|
|
8009810: d003 beq.n 800981a <tcp_receive+0xc32>
|
|
prev->next = cseg;
|
|
8009812: 6b7b ldr r3, [r7, #52] ; 0x34
|
|
8009814: 697a ldr r2, [r7, #20]
|
|
8009816: 601a str r2, [r3, #0]
|
|
8009818: e002 b.n 8009820 <tcp_receive+0xc38>
|
|
} else {
|
|
pcb->ooseq = cseg;
|
|
800981a: 687b ldr r3, [r7, #4]
|
|
800981c: 697a ldr r2, [r7, #20]
|
|
800981e: 675a str r2, [r3, #116] ; 0x74
|
|
}
|
|
tcp_oos_insert_segment(cseg, next);
|
|
8009820: 6bb9 ldr r1, [r7, #56] ; 0x38
|
|
8009822: 6978 ldr r0, [r7, #20]
|
|
8009824: f7ff f8dc bl 80089e0 <tcp_oos_insert_segment>
|
|
}
|
|
break;
|
|
8009828: e139 b.n 8009a9e <tcp_receive+0xeb6>
|
|
segment was smaller than the old one; in either
|
|
case, we ditch the incoming segment. */
|
|
break;
|
|
}
|
|
} else {
|
|
if (prev == NULL) {
|
|
800982a: 6b7b ldr r3, [r7, #52] ; 0x34
|
|
800982c: 2b00 cmp r3, #0
|
|
800982e: d117 bne.n 8009860 <tcp_receive+0xc78>
|
|
if (TCP_SEQ_LT(seqno, next->tcphdr->seqno)) {
|
|
8009830: 4b2e ldr r3, [pc, #184] ; (80098ec <tcp_receive+0xd04>)
|
|
8009832: 681a ldr r2, [r3, #0]
|
|
8009834: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
8009836: 68db ldr r3, [r3, #12]
|
|
8009838: 685b ldr r3, [r3, #4]
|
|
800983a: 1ad3 subs r3, r2, r3
|
|
800983c: 2b00 cmp r3, #0
|
|
800983e: da57 bge.n 80098f0 <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);
|
|
8009840: 4829 ldr r0, [pc, #164] ; (80098e8 <tcp_receive+0xd00>)
|
|
8009842: f7fd fb7d bl 8006f40 <tcp_seg_copy>
|
|
8009846: 61b8 str r0, [r7, #24]
|
|
if (cseg != NULL) {
|
|
8009848: 69bb ldr r3, [r7, #24]
|
|
800984a: 2b00 cmp r3, #0
|
|
800984c: f000 8129 beq.w 8009aa2 <tcp_receive+0xeba>
|
|
pcb->ooseq = cseg;
|
|
8009850: 687b ldr r3, [r7, #4]
|
|
8009852: 69ba ldr r2, [r7, #24]
|
|
8009854: 675a str r2, [r3, #116] ; 0x74
|
|
tcp_oos_insert_segment(cseg, next);
|
|
8009856: 6bb9 ldr r1, [r7, #56] ; 0x38
|
|
8009858: 69b8 ldr r0, [r7, #24]
|
|
800985a: f7ff f8c1 bl 80089e0 <tcp_oos_insert_segment>
|
|
}
|
|
break;
|
|
800985e: e120 b.n 8009aa2 <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)) {
|
|
8009860: 4b22 ldr r3, [pc, #136] ; (80098ec <tcp_receive+0xd04>)
|
|
8009862: 681a ldr r2, [r3, #0]
|
|
8009864: 6b7b ldr r3, [r7, #52] ; 0x34
|
|
8009866: 68db ldr r3, [r3, #12]
|
|
8009868: 685b ldr r3, [r3, #4]
|
|
800986a: 1ad3 subs r3, r2, r3
|
|
800986c: 3b01 subs r3, #1
|
|
800986e: 2b00 cmp r3, #0
|
|
8009870: db3e blt.n 80098f0 <tcp_receive+0xd08>
|
|
8009872: 4b1e ldr r3, [pc, #120] ; (80098ec <tcp_receive+0xd04>)
|
|
8009874: 681a ldr r2, [r3, #0]
|
|
8009876: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
8009878: 68db ldr r3, [r3, #12]
|
|
800987a: 685b ldr r3, [r3, #4]
|
|
800987c: 1ad3 subs r3, r2, r3
|
|
800987e: 3301 adds r3, #1
|
|
8009880: 2b00 cmp r3, #0
|
|
8009882: dc35 bgt.n 80098f0 <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);
|
|
8009884: 4818 ldr r0, [pc, #96] ; (80098e8 <tcp_receive+0xd00>)
|
|
8009886: f7fd fb5b bl 8006f40 <tcp_seg_copy>
|
|
800988a: 61f8 str r0, [r7, #28]
|
|
if (cseg != NULL) {
|
|
800988c: 69fb ldr r3, [r7, #28]
|
|
800988e: 2b00 cmp r3, #0
|
|
8009890: f000 8109 beq.w 8009aa6 <tcp_receive+0xebe>
|
|
if (TCP_SEQ_GT(prev->tcphdr->seqno + prev->len, seqno)) {
|
|
8009894: 6b7b ldr r3, [r7, #52] ; 0x34
|
|
8009896: 68db ldr r3, [r3, #12]
|
|
8009898: 685b ldr r3, [r3, #4]
|
|
800989a: 6b7a ldr r2, [r7, #52] ; 0x34
|
|
800989c: 8912 ldrh r2, [r2, #8]
|
|
800989e: 441a add r2, r3
|
|
80098a0: 4b12 ldr r3, [pc, #72] ; (80098ec <tcp_receive+0xd04>)
|
|
80098a2: 681b ldr r3, [r3, #0]
|
|
80098a4: 1ad3 subs r3, r2, r3
|
|
80098a6: 2b00 cmp r3, #0
|
|
80098a8: dd12 ble.n 80098d0 <tcp_receive+0xce8>
|
|
/* We need to trim the prev segment. */
|
|
prev->len = (u16_t)(seqno - prev->tcphdr->seqno);
|
|
80098aa: 4b10 ldr r3, [pc, #64] ; (80098ec <tcp_receive+0xd04>)
|
|
80098ac: 681b ldr r3, [r3, #0]
|
|
80098ae: b29a uxth r2, r3
|
|
80098b0: 6b7b ldr r3, [r7, #52] ; 0x34
|
|
80098b2: 68db ldr r3, [r3, #12]
|
|
80098b4: 685b ldr r3, [r3, #4]
|
|
80098b6: b29b uxth r3, r3
|
|
80098b8: 1ad3 subs r3, r2, r3
|
|
80098ba: b29a uxth r2, r3
|
|
80098bc: 6b7b ldr r3, [r7, #52] ; 0x34
|
|
80098be: 811a strh r2, [r3, #8]
|
|
pbuf_realloc(prev->p, prev->len);
|
|
80098c0: 6b7b ldr r3, [r7, #52] ; 0x34
|
|
80098c2: 685a ldr r2, [r3, #4]
|
|
80098c4: 6b7b ldr r3, [r7, #52] ; 0x34
|
|
80098c6: 891b ldrh r3, [r3, #8]
|
|
80098c8: 4619 mov r1, r3
|
|
80098ca: 4610 mov r0, r2
|
|
80098cc: f7fb ff16 bl 80056fc <pbuf_realloc>
|
|
}
|
|
prev->next = cseg;
|
|
80098d0: 6b7b ldr r3, [r7, #52] ; 0x34
|
|
80098d2: 69fa ldr r2, [r7, #28]
|
|
80098d4: 601a str r2, [r3, #0]
|
|
tcp_oos_insert_segment(cseg, next);
|
|
80098d6: 6bb9 ldr r1, [r7, #56] ; 0x38
|
|
80098d8: 69f8 ldr r0, [r7, #28]
|
|
80098da: f7ff f881 bl 80089e0 <tcp_oos_insert_segment>
|
|
}
|
|
break;
|
|
80098de: e0e2 b.n 8009aa6 <tcp_receive+0xebe>
|
|
80098e0: 20008c48 .word 0x20008c48
|
|
80098e4: 20008c45 .word 0x20008c45
|
|
80098e8: 20008c18 .word 0x20008c18
|
|
80098ec: 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;
|
|
80098f0: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
80098f2: 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 &&
|
|
80098f4: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
80098f6: 681b ldr r3, [r3, #0]
|
|
80098f8: 2b00 cmp r3, #0
|
|
80098fa: f040 80c6 bne.w 8009a8a <tcp_receive+0xea2>
|
|
TCP_SEQ_GT(seqno, next->tcphdr->seqno)) {
|
|
80098fe: 4b80 ldr r3, [pc, #512] ; (8009b00 <tcp_receive+0xf18>)
|
|
8009900: 681a ldr r2, [r3, #0]
|
|
8009902: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
8009904: 68db ldr r3, [r3, #12]
|
|
8009906: 685b ldr r3, [r3, #4]
|
|
8009908: 1ad3 subs r3, r2, r3
|
|
if (next->next == NULL &&
|
|
800990a: 2b00 cmp r3, #0
|
|
800990c: f340 80bd ble.w 8009a8a <tcp_receive+0xea2>
|
|
if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) {
|
|
8009910: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
8009912: 68db ldr r3, [r3, #12]
|
|
8009914: 899b ldrh r3, [r3, #12]
|
|
8009916: b29b uxth r3, r3
|
|
8009918: 4618 mov r0, r3
|
|
800991a: f7fa fd0b bl 8004334 <lwip_htons>
|
|
800991e: 4603 mov r3, r0
|
|
8009920: b2db uxtb r3, r3
|
|
8009922: f003 0301 and.w r3, r3, #1
|
|
8009926: 2b00 cmp r3, #0
|
|
8009928: f040 80bf bne.w 8009aaa <tcp_receive+0xec2>
|
|
/* segment "next" already contains all data */
|
|
break;
|
|
}
|
|
next->next = tcp_seg_copy(&inseg);
|
|
800992c: 4875 ldr r0, [pc, #468] ; (8009b04 <tcp_receive+0xf1c>)
|
|
800992e: f7fd fb07 bl 8006f40 <tcp_seg_copy>
|
|
8009932: 4602 mov r2, r0
|
|
8009934: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
8009936: 601a str r2, [r3, #0]
|
|
if (next->next != NULL) {
|
|
8009938: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
800993a: 681b ldr r3, [r3, #0]
|
|
800993c: 2b00 cmp r3, #0
|
|
800993e: f000 80b6 beq.w 8009aae <tcp_receive+0xec6>
|
|
if (TCP_SEQ_GT(next->tcphdr->seqno + next->len, seqno)) {
|
|
8009942: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
8009944: 68db ldr r3, [r3, #12]
|
|
8009946: 685b ldr r3, [r3, #4]
|
|
8009948: 6bba ldr r2, [r7, #56] ; 0x38
|
|
800994a: 8912 ldrh r2, [r2, #8]
|
|
800994c: 441a add r2, r3
|
|
800994e: 4b6c ldr r3, [pc, #432] ; (8009b00 <tcp_receive+0xf18>)
|
|
8009950: 681b ldr r3, [r3, #0]
|
|
8009952: 1ad3 subs r3, r2, r3
|
|
8009954: 2b00 cmp r3, #0
|
|
8009956: dd12 ble.n 800997e <tcp_receive+0xd96>
|
|
/* We need to trim the last segment. */
|
|
next->len = (u16_t)(seqno - next->tcphdr->seqno);
|
|
8009958: 4b69 ldr r3, [pc, #420] ; (8009b00 <tcp_receive+0xf18>)
|
|
800995a: 681b ldr r3, [r3, #0]
|
|
800995c: b29a uxth r2, r3
|
|
800995e: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
8009960: 68db ldr r3, [r3, #12]
|
|
8009962: 685b ldr r3, [r3, #4]
|
|
8009964: b29b uxth r3, r3
|
|
8009966: 1ad3 subs r3, r2, r3
|
|
8009968: b29a uxth r2, r3
|
|
800996a: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
800996c: 811a strh r2, [r3, #8]
|
|
pbuf_realloc(next->p, next->len);
|
|
800996e: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
8009970: 685a ldr r2, [r3, #4]
|
|
8009972: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
8009974: 891b ldrh r3, [r3, #8]
|
|
8009976: 4619 mov r1, r3
|
|
8009978: 4610 mov r0, r2
|
|
800997a: f7fb febf bl 80056fc <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)) {
|
|
800997e: 4b62 ldr r3, [pc, #392] ; (8009b08 <tcp_receive+0xf20>)
|
|
8009980: 881b ldrh r3, [r3, #0]
|
|
8009982: 461a mov r2, r3
|
|
8009984: 4b5e ldr r3, [pc, #376] ; (8009b00 <tcp_receive+0xf18>)
|
|
8009986: 681b ldr r3, [r3, #0]
|
|
8009988: 441a add r2, r3
|
|
800998a: 687b ldr r3, [r7, #4]
|
|
800998c: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800998e: 6879 ldr r1, [r7, #4]
|
|
8009990: 8d09 ldrh r1, [r1, #40] ; 0x28
|
|
8009992: 440b add r3, r1
|
|
8009994: 1ad3 subs r3, r2, r3
|
|
8009996: 2b00 cmp r3, #0
|
|
8009998: f340 8089 ble.w 8009aae <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) {
|
|
800999c: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
800999e: 681b ldr r3, [r3, #0]
|
|
80099a0: 68db ldr r3, [r3, #12]
|
|
80099a2: 899b ldrh r3, [r3, #12]
|
|
80099a4: b29b uxth r3, r3
|
|
80099a6: 4618 mov r0, r3
|
|
80099a8: f7fa fcc4 bl 8004334 <lwip_htons>
|
|
80099ac: 4603 mov r3, r0
|
|
80099ae: b2db uxtb r3, r3
|
|
80099b0: f003 0301 and.w r3, r3, #1
|
|
80099b4: 2b00 cmp r3, #0
|
|
80099b6: d022 beq.n 80099fe <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);
|
|
80099b8: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
80099ba: 681b ldr r3, [r3, #0]
|
|
80099bc: 68db ldr r3, [r3, #12]
|
|
80099be: 899b ldrh r3, [r3, #12]
|
|
80099c0: b29b uxth r3, r3
|
|
80099c2: b21b sxth r3, r3
|
|
80099c4: f423 537c bic.w r3, r3, #16128 ; 0x3f00
|
|
80099c8: b21c sxth r4, r3
|
|
80099ca: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
80099cc: 681b ldr r3, [r3, #0]
|
|
80099ce: 68db ldr r3, [r3, #12]
|
|
80099d0: 899b ldrh r3, [r3, #12]
|
|
80099d2: b29b uxth r3, r3
|
|
80099d4: 4618 mov r0, r3
|
|
80099d6: f7fa fcad bl 8004334 <lwip_htons>
|
|
80099da: 4603 mov r3, r0
|
|
80099dc: b2db uxtb r3, r3
|
|
80099de: b29b uxth r3, r3
|
|
80099e0: f003 033e and.w r3, r3, #62 ; 0x3e
|
|
80099e4: b29b uxth r3, r3
|
|
80099e6: 4618 mov r0, r3
|
|
80099e8: f7fa fca4 bl 8004334 <lwip_htons>
|
|
80099ec: 4603 mov r3, r0
|
|
80099ee: b21b sxth r3, r3
|
|
80099f0: 4323 orrs r3, r4
|
|
80099f2: b21a sxth r2, r3
|
|
80099f4: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
80099f6: 681b ldr r3, [r3, #0]
|
|
80099f8: 68db ldr r3, [r3, #12]
|
|
80099fa: b292 uxth r2, r2
|
|
80099fc: 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);
|
|
80099fe: 687b ldr r3, [r7, #4]
|
|
8009a00: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
8009a02: b29a uxth r2, r3
|
|
8009a04: 687b ldr r3, [r7, #4]
|
|
8009a06: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
8009a08: 4413 add r3, r2
|
|
8009a0a: b299 uxth r1, r3
|
|
8009a0c: 4b3c ldr r3, [pc, #240] ; (8009b00 <tcp_receive+0xf18>)
|
|
8009a0e: 681b ldr r3, [r3, #0]
|
|
8009a10: b29a uxth r2, r3
|
|
8009a12: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
8009a14: 681b ldr r3, [r3, #0]
|
|
8009a16: 1a8a subs r2, r1, r2
|
|
8009a18: b292 uxth r2, r2
|
|
8009a1a: 811a strh r2, [r3, #8]
|
|
pbuf_realloc(next->next->p, next->next->len);
|
|
8009a1c: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
8009a1e: 681b ldr r3, [r3, #0]
|
|
8009a20: 685a ldr r2, [r3, #4]
|
|
8009a22: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
8009a24: 681b ldr r3, [r3, #0]
|
|
8009a26: 891b ldrh r3, [r3, #8]
|
|
8009a28: 4619 mov r1, r3
|
|
8009a2a: 4610 mov r0, r2
|
|
8009a2c: f7fb fe66 bl 80056fc <pbuf_realloc>
|
|
tcplen = TCP_TCPLEN(next->next);
|
|
8009a30: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
8009a32: 681b ldr r3, [r3, #0]
|
|
8009a34: 891c ldrh r4, [r3, #8]
|
|
8009a36: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
8009a38: 681b ldr r3, [r3, #0]
|
|
8009a3a: 68db ldr r3, [r3, #12]
|
|
8009a3c: 899b ldrh r3, [r3, #12]
|
|
8009a3e: b29b uxth r3, r3
|
|
8009a40: 4618 mov r0, r3
|
|
8009a42: f7fa fc77 bl 8004334 <lwip_htons>
|
|
8009a46: 4603 mov r3, r0
|
|
8009a48: b2db uxtb r3, r3
|
|
8009a4a: f003 0303 and.w r3, r3, #3
|
|
8009a4e: 2b00 cmp r3, #0
|
|
8009a50: d001 beq.n 8009a56 <tcp_receive+0xe6e>
|
|
8009a52: 2301 movs r3, #1
|
|
8009a54: e000 b.n 8009a58 <tcp_receive+0xe70>
|
|
8009a56: 2300 movs r3, #0
|
|
8009a58: 4423 add r3, r4
|
|
8009a5a: b29a uxth r2, r3
|
|
8009a5c: 4b2a ldr r3, [pc, #168] ; (8009b08 <tcp_receive+0xf20>)
|
|
8009a5e: 801a strh r2, [r3, #0]
|
|
LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n",
|
|
8009a60: 4b29 ldr r3, [pc, #164] ; (8009b08 <tcp_receive+0xf20>)
|
|
8009a62: 881b ldrh r3, [r3, #0]
|
|
8009a64: 461a mov r2, r3
|
|
8009a66: 4b26 ldr r3, [pc, #152] ; (8009b00 <tcp_receive+0xf18>)
|
|
8009a68: 681b ldr r3, [r3, #0]
|
|
8009a6a: 441a add r2, r3
|
|
8009a6c: 687b ldr r3, [r7, #4]
|
|
8009a6e: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
8009a70: 6879 ldr r1, [r7, #4]
|
|
8009a72: 8d09 ldrh r1, [r1, #40] ; 0x28
|
|
8009a74: 440b add r3, r1
|
|
8009a76: 429a cmp r2, r3
|
|
8009a78: d019 beq.n 8009aae <tcp_receive+0xec6>
|
|
8009a7a: 4b24 ldr r3, [pc, #144] ; (8009b0c <tcp_receive+0xf24>)
|
|
8009a7c: f44f 62df mov.w r2, #1784 ; 0x6f8
|
|
8009a80: 4923 ldr r1, [pc, #140] ; (8009b10 <tcp_receive+0xf28>)
|
|
8009a82: 4824 ldr r0, [pc, #144] ; (8009b14 <tcp_receive+0xf2c>)
|
|
8009a84: f006 fd38 bl 80104f8 <printf>
|
|
(seqno + tcplen) == (pcb->rcv_nxt + pcb->rcv_wnd));
|
|
}
|
|
}
|
|
break;
|
|
8009a88: e011 b.n 8009aae <tcp_receive+0xec6>
|
|
for (next = pcb->ooseq; next != NULL; next = next->next) {
|
|
8009a8a: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
8009a8c: 681b ldr r3, [r3, #0]
|
|
8009a8e: 63bb str r3, [r7, #56] ; 0x38
|
|
8009a90: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
8009a92: 2b00 cmp r3, #0
|
|
8009a94: f47f aea4 bne.w 80097e0 <tcp_receive+0xbf8>
|
|
8009a98: e00a b.n 8009ab0 <tcp_receive+0xec8>
|
|
break;
|
|
8009a9a: bf00 nop
|
|
8009a9c: e008 b.n 8009ab0 <tcp_receive+0xec8>
|
|
break;
|
|
8009a9e: bf00 nop
|
|
8009aa0: e006 b.n 8009ab0 <tcp_receive+0xec8>
|
|
break;
|
|
8009aa2: bf00 nop
|
|
8009aa4: e004 b.n 8009ab0 <tcp_receive+0xec8>
|
|
break;
|
|
8009aa6: bf00 nop
|
|
8009aa8: e002 b.n 8009ab0 <tcp_receive+0xec8>
|
|
break;
|
|
8009aaa: bf00 nop
|
|
8009aac: e000 b.n 8009ab0 <tcp_receive+0xec8>
|
|
break;
|
|
8009aae: 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);
|
|
8009ab0: 6878 ldr r0, [r7, #4]
|
|
8009ab2: f001 fa33 bl 800af1c <tcp_send_empty_ack>
|
|
if (pcb->rcv_nxt == seqno) {
|
|
8009ab6: e003 b.n 8009ac0 <tcp_receive+0xed8>
|
|
}
|
|
} else {
|
|
/* The incoming segment is not within the window. */
|
|
tcp_send_empty_ack(pcb);
|
|
8009ab8: 6878 ldr r0, [r7, #4]
|
|
8009aba: f001 fa2f bl 800af1c <tcp_send_empty_ack>
|
|
if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
|
|
8009abe: e01a b.n 8009af6 <tcp_receive+0xf0e>
|
|
8009ac0: e019 b.n 8009af6 <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)) {
|
|
8009ac2: 4b0f ldr r3, [pc, #60] ; (8009b00 <tcp_receive+0xf18>)
|
|
8009ac4: 681a ldr r2, [r3, #0]
|
|
8009ac6: 687b ldr r3, [r7, #4]
|
|
8009ac8: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
8009aca: 1ad3 subs r3, r2, r3
|
|
8009acc: 2b00 cmp r3, #0
|
|
8009ace: db0a blt.n 8009ae6 <tcp_receive+0xefe>
|
|
8009ad0: 4b0b ldr r3, [pc, #44] ; (8009b00 <tcp_receive+0xf18>)
|
|
8009ad2: 681a ldr r2, [r3, #0]
|
|
8009ad4: 687b ldr r3, [r7, #4]
|
|
8009ad6: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
8009ad8: 6879 ldr r1, [r7, #4]
|
|
8009ada: 8d09 ldrh r1, [r1, #40] ; 0x28
|
|
8009adc: 440b add r3, r1
|
|
8009ade: 1ad3 subs r3, r2, r3
|
|
8009ae0: 3301 adds r3, #1
|
|
8009ae2: 2b00 cmp r3, #0
|
|
8009ae4: dd07 ble.n 8009af6 <tcp_receive+0xf0e>
|
|
tcp_ack_now(pcb);
|
|
8009ae6: 687b ldr r3, [r7, #4]
|
|
8009ae8: 8b5b ldrh r3, [r3, #26]
|
|
8009aea: f043 0302 orr.w r3, r3, #2
|
|
8009aee: b29a uxth r2, r3
|
|
8009af0: 687b ldr r3, [r7, #4]
|
|
8009af2: 835a strh r2, [r3, #26]
|
|
}
|
|
}
|
|
}
|
|
8009af4: e7ff b.n 8009af6 <tcp_receive+0xf0e>
|
|
8009af6: bf00 nop
|
|
8009af8: 3750 adds r7, #80 ; 0x50
|
|
8009afa: 46bd mov sp, r7
|
|
8009afc: bdb0 pop {r4, r5, r7, pc}
|
|
8009afe: bf00 nop
|
|
8009b00: 20008c38 .word 0x20008c38
|
|
8009b04: 20008c18 .word 0x20008c18
|
|
8009b08: 20008c42 .word 0x20008c42
|
|
8009b0c: 08016284 .word 0x08016284
|
|
8009b10: 0801662c .word 0x0801662c
|
|
8009b14: 080162d0 .word 0x080162d0
|
|
|
|
08009b18 <tcp_get_next_optbyte>:
|
|
|
|
static u8_t
|
|
tcp_get_next_optbyte(void)
|
|
{
|
|
8009b18: b480 push {r7}
|
|
8009b1a: b083 sub sp, #12
|
|
8009b1c: af00 add r7, sp, #0
|
|
u16_t optidx = tcp_optidx++;
|
|
8009b1e: 4b15 ldr r3, [pc, #84] ; (8009b74 <tcp_get_next_optbyte+0x5c>)
|
|
8009b20: 881b ldrh r3, [r3, #0]
|
|
8009b22: 1c5a adds r2, r3, #1
|
|
8009b24: b291 uxth r1, r2
|
|
8009b26: 4a13 ldr r2, [pc, #76] ; (8009b74 <tcp_get_next_optbyte+0x5c>)
|
|
8009b28: 8011 strh r1, [r2, #0]
|
|
8009b2a: 80fb strh r3, [r7, #6]
|
|
if ((tcphdr_opt2 == NULL) || (optidx < tcphdr_opt1len)) {
|
|
8009b2c: 4b12 ldr r3, [pc, #72] ; (8009b78 <tcp_get_next_optbyte+0x60>)
|
|
8009b2e: 681b ldr r3, [r3, #0]
|
|
8009b30: 2b00 cmp r3, #0
|
|
8009b32: d004 beq.n 8009b3e <tcp_get_next_optbyte+0x26>
|
|
8009b34: 4b11 ldr r3, [pc, #68] ; (8009b7c <tcp_get_next_optbyte+0x64>)
|
|
8009b36: 881b ldrh r3, [r3, #0]
|
|
8009b38: 88fa ldrh r2, [r7, #6]
|
|
8009b3a: 429a cmp r2, r3
|
|
8009b3c: d208 bcs.n 8009b50 <tcp_get_next_optbyte+0x38>
|
|
u8_t *opts = (u8_t *)tcphdr + TCP_HLEN;
|
|
8009b3e: 4b10 ldr r3, [pc, #64] ; (8009b80 <tcp_get_next_optbyte+0x68>)
|
|
8009b40: 681b ldr r3, [r3, #0]
|
|
8009b42: 3314 adds r3, #20
|
|
8009b44: 603b str r3, [r7, #0]
|
|
return opts[optidx];
|
|
8009b46: 88fb ldrh r3, [r7, #6]
|
|
8009b48: 683a ldr r2, [r7, #0]
|
|
8009b4a: 4413 add r3, r2
|
|
8009b4c: 781b ldrb r3, [r3, #0]
|
|
8009b4e: e00b b.n 8009b68 <tcp_get_next_optbyte+0x50>
|
|
} else {
|
|
u8_t idx = (u8_t)(optidx - tcphdr_opt1len);
|
|
8009b50: 88fb ldrh r3, [r7, #6]
|
|
8009b52: b2da uxtb r2, r3
|
|
8009b54: 4b09 ldr r3, [pc, #36] ; (8009b7c <tcp_get_next_optbyte+0x64>)
|
|
8009b56: 881b ldrh r3, [r3, #0]
|
|
8009b58: b2db uxtb r3, r3
|
|
8009b5a: 1ad3 subs r3, r2, r3
|
|
8009b5c: 717b strb r3, [r7, #5]
|
|
return tcphdr_opt2[idx];
|
|
8009b5e: 4b06 ldr r3, [pc, #24] ; (8009b78 <tcp_get_next_optbyte+0x60>)
|
|
8009b60: 681a ldr r2, [r3, #0]
|
|
8009b62: 797b ldrb r3, [r7, #5]
|
|
8009b64: 4413 add r3, r2
|
|
8009b66: 781b ldrb r3, [r3, #0]
|
|
}
|
|
}
|
|
8009b68: 4618 mov r0, r3
|
|
8009b6a: 370c adds r7, #12
|
|
8009b6c: 46bd mov sp, r7
|
|
8009b6e: f85d 7b04 ldr.w r7, [sp], #4
|
|
8009b72: 4770 bx lr
|
|
8009b74: 20008c34 .word 0x20008c34
|
|
8009b78: 20008c30 .word 0x20008c30
|
|
8009b7c: 20008c2e .word 0x20008c2e
|
|
8009b80: 20008c28 .word 0x20008c28
|
|
|
|
08009b84 <tcp_parseopt>:
|
|
*
|
|
* @param pcb the tcp_pcb for which a segment arrived
|
|
*/
|
|
static void
|
|
tcp_parseopt(struct tcp_pcb *pcb)
|
|
{
|
|
8009b84: b580 push {r7, lr}
|
|
8009b86: b084 sub sp, #16
|
|
8009b88: af00 add r7, sp, #0
|
|
8009b8a: 6078 str r0, [r7, #4]
|
|
u16_t mss;
|
|
#if LWIP_TCP_TIMESTAMPS
|
|
u32_t tsval;
|
|
#endif
|
|
|
|
LWIP_ASSERT("tcp_parseopt: invalid pcb", pcb != NULL);
|
|
8009b8c: 687b ldr r3, [r7, #4]
|
|
8009b8e: 2b00 cmp r3, #0
|
|
8009b90: d106 bne.n 8009ba0 <tcp_parseopt+0x1c>
|
|
8009b92: 4b32 ldr r3, [pc, #200] ; (8009c5c <tcp_parseopt+0xd8>)
|
|
8009b94: f240 727d movw r2, #1917 ; 0x77d
|
|
8009b98: 4931 ldr r1, [pc, #196] ; (8009c60 <tcp_parseopt+0xdc>)
|
|
8009b9a: 4832 ldr r0, [pc, #200] ; (8009c64 <tcp_parseopt+0xe0>)
|
|
8009b9c: f006 fcac bl 80104f8 <printf>
|
|
|
|
/* Parse the TCP MSS option, if present. */
|
|
if (tcphdr_optlen != 0) {
|
|
8009ba0: 4b31 ldr r3, [pc, #196] ; (8009c68 <tcp_parseopt+0xe4>)
|
|
8009ba2: 881b ldrh r3, [r3, #0]
|
|
8009ba4: 2b00 cmp r3, #0
|
|
8009ba6: d055 beq.n 8009c54 <tcp_parseopt+0xd0>
|
|
for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) {
|
|
8009ba8: 4b30 ldr r3, [pc, #192] ; (8009c6c <tcp_parseopt+0xe8>)
|
|
8009baa: 2200 movs r2, #0
|
|
8009bac: 801a strh r2, [r3, #0]
|
|
8009bae: e045 b.n 8009c3c <tcp_parseopt+0xb8>
|
|
u8_t opt = tcp_get_next_optbyte();
|
|
8009bb0: f7ff ffb2 bl 8009b18 <tcp_get_next_optbyte>
|
|
8009bb4: 4603 mov r3, r0
|
|
8009bb6: 73fb strb r3, [r7, #15]
|
|
switch (opt) {
|
|
8009bb8: 7bfb ldrb r3, [r7, #15]
|
|
8009bba: 2b02 cmp r3, #2
|
|
8009bbc: d006 beq.n 8009bcc <tcp_parseopt+0x48>
|
|
8009bbe: 2b02 cmp r3, #2
|
|
8009bc0: dc2b bgt.n 8009c1a <tcp_parseopt+0x96>
|
|
8009bc2: 2b00 cmp r3, #0
|
|
8009bc4: d041 beq.n 8009c4a <tcp_parseopt+0xc6>
|
|
8009bc6: 2b01 cmp r3, #1
|
|
8009bc8: d127 bne.n 8009c1a <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;
|
|
8009bca: e037 b.n 8009c3c <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) {
|
|
8009bcc: f7ff ffa4 bl 8009b18 <tcp_get_next_optbyte>
|
|
8009bd0: 4603 mov r3, r0
|
|
8009bd2: 2b04 cmp r3, #4
|
|
8009bd4: d13b bne.n 8009c4e <tcp_parseopt+0xca>
|
|
8009bd6: 4b25 ldr r3, [pc, #148] ; (8009c6c <tcp_parseopt+0xe8>)
|
|
8009bd8: 881b ldrh r3, [r3, #0]
|
|
8009bda: 3301 adds r3, #1
|
|
8009bdc: 4a22 ldr r2, [pc, #136] ; (8009c68 <tcp_parseopt+0xe4>)
|
|
8009bde: 8812 ldrh r2, [r2, #0]
|
|
8009be0: 4293 cmp r3, r2
|
|
8009be2: da34 bge.n 8009c4e <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);
|
|
8009be4: f7ff ff98 bl 8009b18 <tcp_get_next_optbyte>
|
|
8009be8: 4603 mov r3, r0
|
|
8009bea: b29b uxth r3, r3
|
|
8009bec: 021b lsls r3, r3, #8
|
|
8009bee: 81bb strh r3, [r7, #12]
|
|
mss |= tcp_get_next_optbyte();
|
|
8009bf0: f7ff ff92 bl 8009b18 <tcp_get_next_optbyte>
|
|
8009bf4: 4603 mov r3, r0
|
|
8009bf6: b29a uxth r2, r3
|
|
8009bf8: 89bb ldrh r3, [r7, #12]
|
|
8009bfa: 4313 orrs r3, r2
|
|
8009bfc: 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;
|
|
8009bfe: 89bb ldrh r3, [r7, #12]
|
|
8009c00: f5b3 7f06 cmp.w r3, #536 ; 0x218
|
|
8009c04: d804 bhi.n 8009c10 <tcp_parseopt+0x8c>
|
|
8009c06: 89bb ldrh r3, [r7, #12]
|
|
8009c08: 2b00 cmp r3, #0
|
|
8009c0a: d001 beq.n 8009c10 <tcp_parseopt+0x8c>
|
|
8009c0c: 89ba ldrh r2, [r7, #12]
|
|
8009c0e: e001 b.n 8009c14 <tcp_parseopt+0x90>
|
|
8009c10: f44f 7206 mov.w r2, #536 ; 0x218
|
|
8009c14: 687b ldr r3, [r7, #4]
|
|
8009c16: 865a strh r2, [r3, #50] ; 0x32
|
|
break;
|
|
8009c18: e010 b.n 8009c3c <tcp_parseopt+0xb8>
|
|
}
|
|
break;
|
|
#endif /* LWIP_TCP_SACK_OUT */
|
|
default:
|
|
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n"));
|
|
data = tcp_get_next_optbyte();
|
|
8009c1a: f7ff ff7d bl 8009b18 <tcp_get_next_optbyte>
|
|
8009c1e: 4603 mov r3, r0
|
|
8009c20: 72fb strb r3, [r7, #11]
|
|
if (data < 2) {
|
|
8009c22: 7afb ldrb r3, [r7, #11]
|
|
8009c24: 2b01 cmp r3, #1
|
|
8009c26: d914 bls.n 8009c52 <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;
|
|
8009c28: 7afb ldrb r3, [r7, #11]
|
|
8009c2a: b29a uxth r2, r3
|
|
8009c2c: 4b0f ldr r3, [pc, #60] ; (8009c6c <tcp_parseopt+0xe8>)
|
|
8009c2e: 881b ldrh r3, [r3, #0]
|
|
8009c30: 4413 add r3, r2
|
|
8009c32: b29b uxth r3, r3
|
|
8009c34: 3b02 subs r3, #2
|
|
8009c36: b29a uxth r2, r3
|
|
8009c38: 4b0c ldr r3, [pc, #48] ; (8009c6c <tcp_parseopt+0xe8>)
|
|
8009c3a: 801a strh r2, [r3, #0]
|
|
for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) {
|
|
8009c3c: 4b0b ldr r3, [pc, #44] ; (8009c6c <tcp_parseopt+0xe8>)
|
|
8009c3e: 881a ldrh r2, [r3, #0]
|
|
8009c40: 4b09 ldr r3, [pc, #36] ; (8009c68 <tcp_parseopt+0xe4>)
|
|
8009c42: 881b ldrh r3, [r3, #0]
|
|
8009c44: 429a cmp r2, r3
|
|
8009c46: d3b3 bcc.n 8009bb0 <tcp_parseopt+0x2c>
|
|
8009c48: e004 b.n 8009c54 <tcp_parseopt+0xd0>
|
|
return;
|
|
8009c4a: bf00 nop
|
|
8009c4c: e002 b.n 8009c54 <tcp_parseopt+0xd0>
|
|
return;
|
|
8009c4e: bf00 nop
|
|
8009c50: e000 b.n 8009c54 <tcp_parseopt+0xd0>
|
|
return;
|
|
8009c52: bf00 nop
|
|
}
|
|
}
|
|
}
|
|
}
|
|
8009c54: 3710 adds r7, #16
|
|
8009c56: 46bd mov sp, r7
|
|
8009c58: bd80 pop {r7, pc}
|
|
8009c5a: bf00 nop
|
|
8009c5c: 08016284 .word 0x08016284
|
|
8009c60: 080166e8 .word 0x080166e8
|
|
8009c64: 080162d0 .word 0x080162d0
|
|
8009c68: 20008c2c .word 0x20008c2c
|
|
8009c6c: 20008c34 .word 0x20008c34
|
|
|
|
08009c70 <tcp_trigger_input_pcb_close>:
|
|
|
|
void
|
|
tcp_trigger_input_pcb_close(void)
|
|
{
|
|
8009c70: b480 push {r7}
|
|
8009c72: af00 add r7, sp, #0
|
|
recv_flags |= TF_CLOSED;
|
|
8009c74: 4b05 ldr r3, [pc, #20] ; (8009c8c <tcp_trigger_input_pcb_close+0x1c>)
|
|
8009c76: 781b ldrb r3, [r3, #0]
|
|
8009c78: f043 0310 orr.w r3, r3, #16
|
|
8009c7c: b2da uxtb r2, r3
|
|
8009c7e: 4b03 ldr r3, [pc, #12] ; (8009c8c <tcp_trigger_input_pcb_close+0x1c>)
|
|
8009c80: 701a strb r2, [r3, #0]
|
|
}
|
|
8009c82: bf00 nop
|
|
8009c84: 46bd mov sp, r7
|
|
8009c86: f85d 7b04 ldr.w r7, [sp], #4
|
|
8009c8a: 4770 bx lr
|
|
8009c8c: 20008c45 .word 0x20008c45
|
|
|
|
08009c90 <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)
|
|
{
|
|
8009c90: b580 push {r7, lr}
|
|
8009c92: b084 sub sp, #16
|
|
8009c94: af00 add r7, sp, #0
|
|
8009c96: 60f8 str r0, [r7, #12]
|
|
8009c98: 60b9 str r1, [r7, #8]
|
|
8009c9a: 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)) {
|
|
8009c9c: 68fb ldr r3, [r7, #12]
|
|
8009c9e: 2b00 cmp r3, #0
|
|
8009ca0: d00a beq.n 8009cb8 <tcp_route+0x28>
|
|
8009ca2: 68fb ldr r3, [r7, #12]
|
|
8009ca4: 7a1b ldrb r3, [r3, #8]
|
|
8009ca6: 2b00 cmp r3, #0
|
|
8009ca8: d006 beq.n 8009cb8 <tcp_route+0x28>
|
|
return netif_get_by_index(pcb->netif_idx);
|
|
8009caa: 68fb ldr r3, [r7, #12]
|
|
8009cac: 7a1b ldrb r3, [r3, #8]
|
|
8009cae: 4618 mov r0, r3
|
|
8009cb0: f7fb fb4a bl 8005348 <netif_get_by_index>
|
|
8009cb4: 4603 mov r3, r0
|
|
8009cb6: e003 b.n 8009cc0 <tcp_route+0x30>
|
|
} else {
|
|
return ip_route(src, dst);
|
|
8009cb8: 6878 ldr r0, [r7, #4]
|
|
8009cba: f005 f871 bl 800eda0 <ip4_route>
|
|
8009cbe: 4603 mov r3, r0
|
|
}
|
|
}
|
|
8009cc0: 4618 mov r0, r3
|
|
8009cc2: 3710 adds r7, #16
|
|
8009cc4: 46bd mov sp, r7
|
|
8009cc6: bd80 pop {r7, pc}
|
|
|
|
08009cc8 <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)
|
|
{
|
|
8009cc8: b590 push {r4, r7, lr}
|
|
8009cca: b087 sub sp, #28
|
|
8009ccc: af00 add r7, sp, #0
|
|
8009cce: 60f8 str r0, [r7, #12]
|
|
8009cd0: 60b9 str r1, [r7, #8]
|
|
8009cd2: 603b str r3, [r7, #0]
|
|
8009cd4: 4613 mov r3, r2
|
|
8009cd6: 71fb strb r3, [r7, #7]
|
|
struct tcp_seg *seg;
|
|
u8_t optlen;
|
|
|
|
LWIP_ASSERT("tcp_create_segment: invalid pcb", pcb != NULL);
|
|
8009cd8: 68fb ldr r3, [r7, #12]
|
|
8009cda: 2b00 cmp r3, #0
|
|
8009cdc: d105 bne.n 8009cea <tcp_create_segment+0x22>
|
|
8009cde: 4b44 ldr r3, [pc, #272] ; (8009df0 <tcp_create_segment+0x128>)
|
|
8009ce0: 22a3 movs r2, #163 ; 0xa3
|
|
8009ce2: 4944 ldr r1, [pc, #272] ; (8009df4 <tcp_create_segment+0x12c>)
|
|
8009ce4: 4844 ldr r0, [pc, #272] ; (8009df8 <tcp_create_segment+0x130>)
|
|
8009ce6: f006 fc07 bl 80104f8 <printf>
|
|
LWIP_ASSERT("tcp_create_segment: invalid pbuf", p != NULL);
|
|
8009cea: 68bb ldr r3, [r7, #8]
|
|
8009cec: 2b00 cmp r3, #0
|
|
8009cee: d105 bne.n 8009cfc <tcp_create_segment+0x34>
|
|
8009cf0: 4b3f ldr r3, [pc, #252] ; (8009df0 <tcp_create_segment+0x128>)
|
|
8009cf2: 22a4 movs r2, #164 ; 0xa4
|
|
8009cf4: 4941 ldr r1, [pc, #260] ; (8009dfc <tcp_create_segment+0x134>)
|
|
8009cf6: 4840 ldr r0, [pc, #256] ; (8009df8 <tcp_create_segment+0x130>)
|
|
8009cf8: f006 fbfe bl 80104f8 <printf>
|
|
|
|
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb);
|
|
8009cfc: f897 3028 ldrb.w r3, [r7, #40] ; 0x28
|
|
8009d00: 009b lsls r3, r3, #2
|
|
8009d02: b2db uxtb r3, r3
|
|
8009d04: f003 0304 and.w r3, r3, #4
|
|
8009d08: 75fb strb r3, [r7, #23]
|
|
|
|
if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) {
|
|
8009d0a: 2003 movs r0, #3
|
|
8009d0c: f7fa ff8a bl 8004c24 <memp_malloc>
|
|
8009d10: 6138 str r0, [r7, #16]
|
|
8009d12: 693b ldr r3, [r7, #16]
|
|
8009d14: 2b00 cmp r3, #0
|
|
8009d16: d104 bne.n 8009d22 <tcp_create_segment+0x5a>
|
|
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no memory.\n"));
|
|
pbuf_free(p);
|
|
8009d18: 68b8 ldr r0, [r7, #8]
|
|
8009d1a: f7fb fe75 bl 8005a08 <pbuf_free>
|
|
return NULL;
|
|
8009d1e: 2300 movs r3, #0
|
|
8009d20: e061 b.n 8009de6 <tcp_create_segment+0x11e>
|
|
}
|
|
seg->flags = optflags;
|
|
8009d22: 693b ldr r3, [r7, #16]
|
|
8009d24: f897 2028 ldrb.w r2, [r7, #40] ; 0x28
|
|
8009d28: 729a strb r2, [r3, #10]
|
|
seg->next = NULL;
|
|
8009d2a: 693b ldr r3, [r7, #16]
|
|
8009d2c: 2200 movs r2, #0
|
|
8009d2e: 601a str r2, [r3, #0]
|
|
seg->p = p;
|
|
8009d30: 693b ldr r3, [r7, #16]
|
|
8009d32: 68ba ldr r2, [r7, #8]
|
|
8009d34: 605a str r2, [r3, #4]
|
|
LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen);
|
|
8009d36: 68bb ldr r3, [r7, #8]
|
|
8009d38: 891a ldrh r2, [r3, #8]
|
|
8009d3a: 7dfb ldrb r3, [r7, #23]
|
|
8009d3c: b29b uxth r3, r3
|
|
8009d3e: 429a cmp r2, r3
|
|
8009d40: d205 bcs.n 8009d4e <tcp_create_segment+0x86>
|
|
8009d42: 4b2b ldr r3, [pc, #172] ; (8009df0 <tcp_create_segment+0x128>)
|
|
8009d44: 22b0 movs r2, #176 ; 0xb0
|
|
8009d46: 492e ldr r1, [pc, #184] ; (8009e00 <tcp_create_segment+0x138>)
|
|
8009d48: 482b ldr r0, [pc, #172] ; (8009df8 <tcp_create_segment+0x130>)
|
|
8009d4a: f006 fbd5 bl 80104f8 <printf>
|
|
seg->len = p->tot_len - optlen;
|
|
8009d4e: 68bb ldr r3, [r7, #8]
|
|
8009d50: 891a ldrh r2, [r3, #8]
|
|
8009d52: 7dfb ldrb r3, [r7, #23]
|
|
8009d54: b29b uxth r3, r3
|
|
8009d56: 1ad3 subs r3, r2, r3
|
|
8009d58: b29a uxth r2, r3
|
|
8009d5a: 693b ldr r3, [r7, #16]
|
|
8009d5c: 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)) {
|
|
8009d5e: 2114 movs r1, #20
|
|
8009d60: 68b8 ldr r0, [r7, #8]
|
|
8009d62: f7fb fdbb bl 80058dc <pbuf_add_header>
|
|
8009d66: 4603 mov r3, r0
|
|
8009d68: 2b00 cmp r3, #0
|
|
8009d6a: d004 beq.n 8009d76 <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);
|
|
8009d6c: 6938 ldr r0, [r7, #16]
|
|
8009d6e: f7fd f8ce bl 8006f0e <tcp_seg_free>
|
|
return NULL;
|
|
8009d72: 2300 movs r3, #0
|
|
8009d74: e037 b.n 8009de6 <tcp_create_segment+0x11e>
|
|
}
|
|
seg->tcphdr = (struct tcp_hdr *)seg->p->payload;
|
|
8009d76: 693b ldr r3, [r7, #16]
|
|
8009d78: 685b ldr r3, [r3, #4]
|
|
8009d7a: 685a ldr r2, [r3, #4]
|
|
8009d7c: 693b ldr r3, [r7, #16]
|
|
8009d7e: 60da str r2, [r3, #12]
|
|
seg->tcphdr->src = lwip_htons(pcb->local_port);
|
|
8009d80: 68fb ldr r3, [r7, #12]
|
|
8009d82: 8ada ldrh r2, [r3, #22]
|
|
8009d84: 693b ldr r3, [r7, #16]
|
|
8009d86: 68dc ldr r4, [r3, #12]
|
|
8009d88: 4610 mov r0, r2
|
|
8009d8a: f7fa fad3 bl 8004334 <lwip_htons>
|
|
8009d8e: 4603 mov r3, r0
|
|
8009d90: 8023 strh r3, [r4, #0]
|
|
seg->tcphdr->dest = lwip_htons(pcb->remote_port);
|
|
8009d92: 68fb ldr r3, [r7, #12]
|
|
8009d94: 8b1a ldrh r2, [r3, #24]
|
|
8009d96: 693b ldr r3, [r7, #16]
|
|
8009d98: 68dc ldr r4, [r3, #12]
|
|
8009d9a: 4610 mov r0, r2
|
|
8009d9c: f7fa faca bl 8004334 <lwip_htons>
|
|
8009da0: 4603 mov r3, r0
|
|
8009da2: 8063 strh r3, [r4, #2]
|
|
seg->tcphdr->seqno = lwip_htonl(seqno);
|
|
8009da4: 693b ldr r3, [r7, #16]
|
|
8009da6: 68dc ldr r4, [r3, #12]
|
|
8009da8: 6838 ldr r0, [r7, #0]
|
|
8009daa: f7fa fad8 bl 800435e <lwip_htonl>
|
|
8009dae: 4603 mov r3, r0
|
|
8009db0: 6063 str r3, [r4, #4]
|
|
/* ackno is set in tcp_output */
|
|
TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), hdrflags);
|
|
8009db2: 7dfb ldrb r3, [r7, #23]
|
|
8009db4: 089b lsrs r3, r3, #2
|
|
8009db6: b2db uxtb r3, r3
|
|
8009db8: b29b uxth r3, r3
|
|
8009dba: 3305 adds r3, #5
|
|
8009dbc: b29b uxth r3, r3
|
|
8009dbe: 031b lsls r3, r3, #12
|
|
8009dc0: b29a uxth r2, r3
|
|
8009dc2: 79fb ldrb r3, [r7, #7]
|
|
8009dc4: b29b uxth r3, r3
|
|
8009dc6: 4313 orrs r3, r2
|
|
8009dc8: b29a uxth r2, r3
|
|
8009dca: 693b ldr r3, [r7, #16]
|
|
8009dcc: 68dc ldr r4, [r3, #12]
|
|
8009dce: 4610 mov r0, r2
|
|
8009dd0: f7fa fab0 bl 8004334 <lwip_htons>
|
|
8009dd4: 4603 mov r3, r0
|
|
8009dd6: 81a3 strh r3, [r4, #12]
|
|
/* wnd and chksum are set in tcp_output */
|
|
seg->tcphdr->urgp = 0;
|
|
8009dd8: 693b ldr r3, [r7, #16]
|
|
8009dda: 68db ldr r3, [r3, #12]
|
|
8009ddc: 2200 movs r2, #0
|
|
8009dde: 749a strb r2, [r3, #18]
|
|
8009de0: 2200 movs r2, #0
|
|
8009de2: 74da strb r2, [r3, #19]
|
|
return seg;
|
|
8009de4: 693b ldr r3, [r7, #16]
|
|
}
|
|
8009de6: 4618 mov r0, r3
|
|
8009de8: 371c adds r7, #28
|
|
8009dea: 46bd mov sp, r7
|
|
8009dec: bd90 pop {r4, r7, pc}
|
|
8009dee: bf00 nop
|
|
8009df0: 08016704 .word 0x08016704
|
|
8009df4: 08016738 .word 0x08016738
|
|
8009df8: 08016758 .word 0x08016758
|
|
8009dfc: 08016780 .word 0x08016780
|
|
8009e00: 080167a4 .word 0x080167a4
|
|
|
|
08009e04 <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)
|
|
{
|
|
8009e04: b590 push {r4, r7, lr}
|
|
8009e06: b08b sub sp, #44 ; 0x2c
|
|
8009e08: af02 add r7, sp, #8
|
|
8009e0a: 6078 str r0, [r7, #4]
|
|
8009e0c: 460b mov r3, r1
|
|
8009e0e: 807b strh r3, [r7, #2]
|
|
struct tcp_seg *seg = NULL, *useg = NULL;
|
|
8009e10: 2300 movs r3, #0
|
|
8009e12: 61fb str r3, [r7, #28]
|
|
8009e14: 2300 movs r3, #0
|
|
8009e16: 617b str r3, [r7, #20]
|
|
struct pbuf *p = NULL;
|
|
8009e18: 2300 movs r3, #0
|
|
8009e1a: 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);
|
|
8009e1c: 687b ldr r3, [r7, #4]
|
|
8009e1e: 2b00 cmp r3, #0
|
|
8009e20: d106 bne.n 8009e30 <tcp_split_unsent_seg+0x2c>
|
|
8009e22: 4b95 ldr r3, [pc, #596] ; (800a078 <tcp_split_unsent_seg+0x274>)
|
|
8009e24: f240 324b movw r2, #843 ; 0x34b
|
|
8009e28: 4994 ldr r1, [pc, #592] ; (800a07c <tcp_split_unsent_seg+0x278>)
|
|
8009e2a: 4895 ldr r0, [pc, #596] ; (800a080 <tcp_split_unsent_seg+0x27c>)
|
|
8009e2c: f006 fb64 bl 80104f8 <printf>
|
|
|
|
useg = pcb->unsent;
|
|
8009e30: 687b ldr r3, [r7, #4]
|
|
8009e32: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
8009e34: 617b str r3, [r7, #20]
|
|
if (useg == NULL) {
|
|
8009e36: 697b ldr r3, [r7, #20]
|
|
8009e38: 2b00 cmp r3, #0
|
|
8009e3a: d102 bne.n 8009e42 <tcp_split_unsent_seg+0x3e>
|
|
return ERR_MEM;
|
|
8009e3c: f04f 33ff mov.w r3, #4294967295
|
|
8009e40: e116 b.n 800a070 <tcp_split_unsent_seg+0x26c>
|
|
}
|
|
|
|
if (split == 0) {
|
|
8009e42: 887b ldrh r3, [r7, #2]
|
|
8009e44: 2b00 cmp r3, #0
|
|
8009e46: d109 bne.n 8009e5c <tcp_split_unsent_seg+0x58>
|
|
LWIP_ASSERT("Can't split segment into length 0", 0);
|
|
8009e48: 4b8b ldr r3, [pc, #556] ; (800a078 <tcp_split_unsent_seg+0x274>)
|
|
8009e4a: f240 3253 movw r2, #851 ; 0x353
|
|
8009e4e: 498d ldr r1, [pc, #564] ; (800a084 <tcp_split_unsent_seg+0x280>)
|
|
8009e50: 488b ldr r0, [pc, #556] ; (800a080 <tcp_split_unsent_seg+0x27c>)
|
|
8009e52: f006 fb51 bl 80104f8 <printf>
|
|
return ERR_VAL;
|
|
8009e56: f06f 0305 mvn.w r3, #5
|
|
8009e5a: e109 b.n 800a070 <tcp_split_unsent_seg+0x26c>
|
|
}
|
|
|
|
if (useg->len <= split) {
|
|
8009e5c: 697b ldr r3, [r7, #20]
|
|
8009e5e: 891b ldrh r3, [r3, #8]
|
|
8009e60: 887a ldrh r2, [r7, #2]
|
|
8009e62: 429a cmp r2, r3
|
|
8009e64: d301 bcc.n 8009e6a <tcp_split_unsent_seg+0x66>
|
|
return ERR_OK;
|
|
8009e66: 2300 movs r3, #0
|
|
8009e68: e102 b.n 800a070 <tcp_split_unsent_seg+0x26c>
|
|
}
|
|
|
|
LWIP_ASSERT("split <= mss", split <= pcb->mss);
|
|
8009e6a: 687b ldr r3, [r7, #4]
|
|
8009e6c: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
8009e6e: 887a ldrh r2, [r7, #2]
|
|
8009e70: 429a cmp r2, r3
|
|
8009e72: d906 bls.n 8009e82 <tcp_split_unsent_seg+0x7e>
|
|
8009e74: 4b80 ldr r3, [pc, #512] ; (800a078 <tcp_split_unsent_seg+0x274>)
|
|
8009e76: f240 325b movw r2, #859 ; 0x35b
|
|
8009e7a: 4983 ldr r1, [pc, #524] ; (800a088 <tcp_split_unsent_seg+0x284>)
|
|
8009e7c: 4880 ldr r0, [pc, #512] ; (800a080 <tcp_split_unsent_seg+0x27c>)
|
|
8009e7e: f006 fb3b bl 80104f8 <printf>
|
|
LWIP_ASSERT("useg->len > 0", useg->len > 0);
|
|
8009e82: 697b ldr r3, [r7, #20]
|
|
8009e84: 891b ldrh r3, [r3, #8]
|
|
8009e86: 2b00 cmp r3, #0
|
|
8009e88: d106 bne.n 8009e98 <tcp_split_unsent_seg+0x94>
|
|
8009e8a: 4b7b ldr r3, [pc, #492] ; (800a078 <tcp_split_unsent_seg+0x274>)
|
|
8009e8c: f44f 7257 mov.w r2, #860 ; 0x35c
|
|
8009e90: 497e ldr r1, [pc, #504] ; (800a08c <tcp_split_unsent_seg+0x288>)
|
|
8009e92: 487b ldr r0, [pc, #492] ; (800a080 <tcp_split_unsent_seg+0x27c>)
|
|
8009e94: f006 fb30 bl 80104f8 <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;
|
|
8009e98: 697b ldr r3, [r7, #20]
|
|
8009e9a: 7a9b ldrb r3, [r3, #10]
|
|
8009e9c: 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);
|
|
8009e9e: 7bfb ldrb r3, [r7, #15]
|
|
8009ea0: 009b lsls r3, r3, #2
|
|
8009ea2: b2db uxtb r3, r3
|
|
8009ea4: f003 0304 and.w r3, r3, #4
|
|
8009ea8: 73bb strb r3, [r7, #14]
|
|
remainder = useg->len - split;
|
|
8009eaa: 697b ldr r3, [r7, #20]
|
|
8009eac: 891a ldrh r2, [r3, #8]
|
|
8009eae: 887b ldrh r3, [r7, #2]
|
|
8009eb0: 1ad3 subs r3, r2, r3
|
|
8009eb2: 81bb strh r3, [r7, #12]
|
|
|
|
/* Create new pbuf for the remainder of the split */
|
|
p = pbuf_alloc(PBUF_TRANSPORT, remainder + optlen, PBUF_RAM);
|
|
8009eb4: 7bbb ldrb r3, [r7, #14]
|
|
8009eb6: b29a uxth r2, r3
|
|
8009eb8: 89bb ldrh r3, [r7, #12]
|
|
8009eba: 4413 add r3, r2
|
|
8009ebc: b29b uxth r3, r3
|
|
8009ebe: f44f 7220 mov.w r2, #640 ; 0x280
|
|
8009ec2: 4619 mov r1, r3
|
|
8009ec4: 2036 movs r0, #54 ; 0x36
|
|
8009ec6: f7fb fabb bl 8005440 <pbuf_alloc>
|
|
8009eca: 6138 str r0, [r7, #16]
|
|
if (p == NULL) {
|
|
8009ecc: 693b ldr r3, [r7, #16]
|
|
8009ece: 2b00 cmp r3, #0
|
|
8009ed0: f000 80b7 beq.w 800a042 <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;
|
|
8009ed4: 697b ldr r3, [r7, #20]
|
|
8009ed6: 685b ldr r3, [r3, #4]
|
|
8009ed8: 891a ldrh r2, [r3, #8]
|
|
8009eda: 697b ldr r3, [r7, #20]
|
|
8009edc: 891b ldrh r3, [r3, #8]
|
|
8009ede: 1ad3 subs r3, r2, r3
|
|
8009ee0: b29a uxth r2, r3
|
|
8009ee2: 887b ldrh r3, [r7, #2]
|
|
8009ee4: 4413 add r3, r2
|
|
8009ee6: 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) {
|
|
8009ee8: 697b ldr r3, [r7, #20]
|
|
8009eea: 6858 ldr r0, [r3, #4]
|
|
8009eec: 693b ldr r3, [r7, #16]
|
|
8009eee: 685a ldr r2, [r3, #4]
|
|
8009ef0: 7bbb ldrb r3, [r7, #14]
|
|
8009ef2: 18d1 adds r1, r2, r3
|
|
8009ef4: 897b ldrh r3, [r7, #10]
|
|
8009ef6: 89ba ldrh r2, [r7, #12]
|
|
8009ef8: f7fb ff80 bl 8005dfc <pbuf_copy_partial>
|
|
8009efc: 4603 mov r3, r0
|
|
8009efe: 461a mov r2, r3
|
|
8009f00: 89bb ldrh r3, [r7, #12]
|
|
8009f02: 4293 cmp r3, r2
|
|
8009f04: f040 809f bne.w 800a046 <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);
|
|
8009f08: 697b ldr r3, [r7, #20]
|
|
8009f0a: 68db ldr r3, [r3, #12]
|
|
8009f0c: 899b ldrh r3, [r3, #12]
|
|
8009f0e: b29b uxth r3, r3
|
|
8009f10: 4618 mov r0, r3
|
|
8009f12: f7fa fa0f bl 8004334 <lwip_htons>
|
|
8009f16: 4603 mov r3, r0
|
|
8009f18: b2db uxtb r3, r3
|
|
8009f1a: f003 033f and.w r3, r3, #63 ; 0x3f
|
|
8009f1e: 76fb strb r3, [r7, #27]
|
|
remainder_flags = 0; /* ACK added in tcp_output() */
|
|
8009f20: 2300 movs r3, #0
|
|
8009f22: 76bb strb r3, [r7, #26]
|
|
|
|
if (split_flags & TCP_PSH) {
|
|
8009f24: 7efb ldrb r3, [r7, #27]
|
|
8009f26: f003 0308 and.w r3, r3, #8
|
|
8009f2a: 2b00 cmp r3, #0
|
|
8009f2c: d007 beq.n 8009f3e <tcp_split_unsent_seg+0x13a>
|
|
split_flags &= ~TCP_PSH;
|
|
8009f2e: 7efb ldrb r3, [r7, #27]
|
|
8009f30: f023 0308 bic.w r3, r3, #8
|
|
8009f34: 76fb strb r3, [r7, #27]
|
|
remainder_flags |= TCP_PSH;
|
|
8009f36: 7ebb ldrb r3, [r7, #26]
|
|
8009f38: f043 0308 orr.w r3, r3, #8
|
|
8009f3c: 76bb strb r3, [r7, #26]
|
|
}
|
|
if (split_flags & TCP_FIN) {
|
|
8009f3e: 7efb ldrb r3, [r7, #27]
|
|
8009f40: f003 0301 and.w r3, r3, #1
|
|
8009f44: 2b00 cmp r3, #0
|
|
8009f46: d007 beq.n 8009f58 <tcp_split_unsent_seg+0x154>
|
|
split_flags &= ~TCP_FIN;
|
|
8009f48: 7efb ldrb r3, [r7, #27]
|
|
8009f4a: f023 0301 bic.w r3, r3, #1
|
|
8009f4e: 76fb strb r3, [r7, #27]
|
|
remainder_flags |= TCP_FIN;
|
|
8009f50: 7ebb ldrb r3, [r7, #26]
|
|
8009f52: f043 0301 orr.w r3, r3, #1
|
|
8009f56: 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);
|
|
8009f58: 697b ldr r3, [r7, #20]
|
|
8009f5a: 68db ldr r3, [r3, #12]
|
|
8009f5c: 685b ldr r3, [r3, #4]
|
|
8009f5e: 4618 mov r0, r3
|
|
8009f60: f7fa f9fd bl 800435e <lwip_htonl>
|
|
8009f64: 4602 mov r2, r0
|
|
8009f66: 887b ldrh r3, [r7, #2]
|
|
8009f68: 18d1 adds r1, r2, r3
|
|
8009f6a: 7eba ldrb r2, [r7, #26]
|
|
8009f6c: 7bfb ldrb r3, [r7, #15]
|
|
8009f6e: 9300 str r3, [sp, #0]
|
|
8009f70: 460b mov r3, r1
|
|
8009f72: 6939 ldr r1, [r7, #16]
|
|
8009f74: 6878 ldr r0, [r7, #4]
|
|
8009f76: f7ff fea7 bl 8009cc8 <tcp_create_segment>
|
|
8009f7a: 61f8 str r0, [r7, #28]
|
|
if (seg == NULL) {
|
|
8009f7c: 69fb ldr r3, [r7, #28]
|
|
8009f7e: 2b00 cmp r3, #0
|
|
8009f80: d063 beq.n 800a04a <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);
|
|
8009f82: 697b ldr r3, [r7, #20]
|
|
8009f84: 685b ldr r3, [r3, #4]
|
|
8009f86: 4618 mov r0, r3
|
|
8009f88: f7fb fdc6 bl 8005b18 <pbuf_clen>
|
|
8009f8c: 4603 mov r3, r0
|
|
8009f8e: 461a mov r2, r3
|
|
8009f90: 687b ldr r3, [r7, #4]
|
|
8009f92: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
|
|
8009f96: 1a9b subs r3, r3, r2
|
|
8009f98: b29a uxth r2, r3
|
|
8009f9a: 687b ldr r3, [r7, #4]
|
|
8009f9c: 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);
|
|
8009fa0: 697b ldr r3, [r7, #20]
|
|
8009fa2: 6858 ldr r0, [r3, #4]
|
|
8009fa4: 697b ldr r3, [r7, #20]
|
|
8009fa6: 685b ldr r3, [r3, #4]
|
|
8009fa8: 891a ldrh r2, [r3, #8]
|
|
8009faa: 89bb ldrh r3, [r7, #12]
|
|
8009fac: 1ad3 subs r3, r2, r3
|
|
8009fae: b29b uxth r3, r3
|
|
8009fb0: 4619 mov r1, r3
|
|
8009fb2: f7fb fba3 bl 80056fc <pbuf_realloc>
|
|
useg->len -= remainder;
|
|
8009fb6: 697b ldr r3, [r7, #20]
|
|
8009fb8: 891a ldrh r2, [r3, #8]
|
|
8009fba: 89bb ldrh r3, [r7, #12]
|
|
8009fbc: 1ad3 subs r3, r2, r3
|
|
8009fbe: b29a uxth r2, r3
|
|
8009fc0: 697b ldr r3, [r7, #20]
|
|
8009fc2: 811a strh r2, [r3, #8]
|
|
TCPH_SET_FLAG(useg->tcphdr, split_flags);
|
|
8009fc4: 697b ldr r3, [r7, #20]
|
|
8009fc6: 68db ldr r3, [r3, #12]
|
|
8009fc8: 899b ldrh r3, [r3, #12]
|
|
8009fca: b29c uxth r4, r3
|
|
8009fcc: 7efb ldrb r3, [r7, #27]
|
|
8009fce: b29b uxth r3, r3
|
|
8009fd0: 4618 mov r0, r3
|
|
8009fd2: f7fa f9af bl 8004334 <lwip_htons>
|
|
8009fd6: 4603 mov r3, r0
|
|
8009fd8: 461a mov r2, r3
|
|
8009fda: 697b ldr r3, [r7, #20]
|
|
8009fdc: 68db ldr r3, [r3, #12]
|
|
8009fde: 4322 orrs r2, r4
|
|
8009fe0: b292 uxth r2, r2
|
|
8009fe2: 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);
|
|
8009fe4: 697b ldr r3, [r7, #20]
|
|
8009fe6: 685b ldr r3, [r3, #4]
|
|
8009fe8: 4618 mov r0, r3
|
|
8009fea: f7fb fd95 bl 8005b18 <pbuf_clen>
|
|
8009fee: 4603 mov r3, r0
|
|
8009ff0: 461a mov r2, r3
|
|
8009ff2: 687b ldr r3, [r7, #4]
|
|
8009ff4: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
|
|
8009ff8: 4413 add r3, r2
|
|
8009ffa: b29a uxth r2, r3
|
|
8009ffc: 687b ldr r3, [r7, #4]
|
|
8009ffe: 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);
|
|
800a002: 69fb ldr r3, [r7, #28]
|
|
800a004: 685b ldr r3, [r3, #4]
|
|
800a006: 4618 mov r0, r3
|
|
800a008: f7fb fd86 bl 8005b18 <pbuf_clen>
|
|
800a00c: 4603 mov r3, r0
|
|
800a00e: 461a mov r2, r3
|
|
800a010: 687b ldr r3, [r7, #4]
|
|
800a012: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
|
|
800a016: 4413 add r3, r2
|
|
800a018: b29a uxth r2, r3
|
|
800a01a: 687b ldr r3, [r7, #4]
|
|
800a01c: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
|
|
|
|
/* Finally insert remainder into queue after split (which stays head) */
|
|
seg->next = useg->next;
|
|
800a020: 697b ldr r3, [r7, #20]
|
|
800a022: 681a ldr r2, [r3, #0]
|
|
800a024: 69fb ldr r3, [r7, #28]
|
|
800a026: 601a str r2, [r3, #0]
|
|
useg->next = seg;
|
|
800a028: 697b ldr r3, [r7, #20]
|
|
800a02a: 69fa ldr r2, [r7, #28]
|
|
800a02c: 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) {
|
|
800a02e: 69fb ldr r3, [r7, #28]
|
|
800a030: 681b ldr r3, [r3, #0]
|
|
800a032: 2b00 cmp r3, #0
|
|
800a034: d103 bne.n 800a03e <tcp_split_unsent_seg+0x23a>
|
|
pcb->unsent_oversize = 0;
|
|
800a036: 687b ldr r3, [r7, #4]
|
|
800a038: 2200 movs r2, #0
|
|
800a03a: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
|
|
}
|
|
#endif /* TCP_OVERSIZE */
|
|
|
|
return ERR_OK;
|
|
800a03e: 2300 movs r3, #0
|
|
800a040: e016 b.n 800a070 <tcp_split_unsent_seg+0x26c>
|
|
goto memerr;
|
|
800a042: bf00 nop
|
|
800a044: e002 b.n 800a04c <tcp_split_unsent_seg+0x248>
|
|
goto memerr;
|
|
800a046: bf00 nop
|
|
800a048: e000 b.n 800a04c <tcp_split_unsent_seg+0x248>
|
|
goto memerr;
|
|
800a04a: bf00 nop
|
|
memerr:
|
|
TCP_STATS_INC(tcp.memerr);
|
|
|
|
LWIP_ASSERT("seg == NULL", seg == NULL);
|
|
800a04c: 69fb ldr r3, [r7, #28]
|
|
800a04e: 2b00 cmp r3, #0
|
|
800a050: d006 beq.n 800a060 <tcp_split_unsent_seg+0x25c>
|
|
800a052: 4b09 ldr r3, [pc, #36] ; (800a078 <tcp_split_unsent_seg+0x274>)
|
|
800a054: f44f 7276 mov.w r2, #984 ; 0x3d8
|
|
800a058: 490d ldr r1, [pc, #52] ; (800a090 <tcp_split_unsent_seg+0x28c>)
|
|
800a05a: 4809 ldr r0, [pc, #36] ; (800a080 <tcp_split_unsent_seg+0x27c>)
|
|
800a05c: f006 fa4c bl 80104f8 <printf>
|
|
if (p != NULL) {
|
|
800a060: 693b ldr r3, [r7, #16]
|
|
800a062: 2b00 cmp r3, #0
|
|
800a064: d002 beq.n 800a06c <tcp_split_unsent_seg+0x268>
|
|
pbuf_free(p);
|
|
800a066: 6938 ldr r0, [r7, #16]
|
|
800a068: f7fb fcce bl 8005a08 <pbuf_free>
|
|
}
|
|
|
|
return ERR_MEM;
|
|
800a06c: f04f 33ff mov.w r3, #4294967295
|
|
}
|
|
800a070: 4618 mov r0, r3
|
|
800a072: 3724 adds r7, #36 ; 0x24
|
|
800a074: 46bd mov sp, r7
|
|
800a076: bd90 pop {r4, r7, pc}
|
|
800a078: 08016704 .word 0x08016704
|
|
800a07c: 08016a98 .word 0x08016a98
|
|
800a080: 08016758 .word 0x08016758
|
|
800a084: 08016abc .word 0x08016abc
|
|
800a088: 08016ae0 .word 0x08016ae0
|
|
800a08c: 08016af0 .word 0x08016af0
|
|
800a090: 08016b00 .word 0x08016b00
|
|
|
|
0800a094 <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)
|
|
{
|
|
800a094: b590 push {r4, r7, lr}
|
|
800a096: b085 sub sp, #20
|
|
800a098: af00 add r7, sp, #0
|
|
800a09a: 6078 str r0, [r7, #4]
|
|
LWIP_ASSERT("tcp_send_fin: invalid pcb", pcb != NULL);
|
|
800a09c: 687b ldr r3, [r7, #4]
|
|
800a09e: 2b00 cmp r3, #0
|
|
800a0a0: d106 bne.n 800a0b0 <tcp_send_fin+0x1c>
|
|
800a0a2: 4b21 ldr r3, [pc, #132] ; (800a128 <tcp_send_fin+0x94>)
|
|
800a0a4: f240 32eb movw r2, #1003 ; 0x3eb
|
|
800a0a8: 4920 ldr r1, [pc, #128] ; (800a12c <tcp_send_fin+0x98>)
|
|
800a0aa: 4821 ldr r0, [pc, #132] ; (800a130 <tcp_send_fin+0x9c>)
|
|
800a0ac: f006 fa24 bl 80104f8 <printf>
|
|
|
|
/* first, try to add the fin to the last unsent segment */
|
|
if (pcb->unsent != NULL) {
|
|
800a0b0: 687b ldr r3, [r7, #4]
|
|
800a0b2: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
800a0b4: 2b00 cmp r3, #0
|
|
800a0b6: d02e beq.n 800a116 <tcp_send_fin+0x82>
|
|
struct tcp_seg *last_unsent;
|
|
for (last_unsent = pcb->unsent; last_unsent->next != NULL;
|
|
800a0b8: 687b ldr r3, [r7, #4]
|
|
800a0ba: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
800a0bc: 60fb str r3, [r7, #12]
|
|
800a0be: e002 b.n 800a0c6 <tcp_send_fin+0x32>
|
|
last_unsent = last_unsent->next);
|
|
800a0c0: 68fb ldr r3, [r7, #12]
|
|
800a0c2: 681b ldr r3, [r3, #0]
|
|
800a0c4: 60fb str r3, [r7, #12]
|
|
for (last_unsent = pcb->unsent; last_unsent->next != NULL;
|
|
800a0c6: 68fb ldr r3, [r7, #12]
|
|
800a0c8: 681b ldr r3, [r3, #0]
|
|
800a0ca: 2b00 cmp r3, #0
|
|
800a0cc: d1f8 bne.n 800a0c0 <tcp_send_fin+0x2c>
|
|
|
|
if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) {
|
|
800a0ce: 68fb ldr r3, [r7, #12]
|
|
800a0d0: 68db ldr r3, [r3, #12]
|
|
800a0d2: 899b ldrh r3, [r3, #12]
|
|
800a0d4: b29b uxth r3, r3
|
|
800a0d6: 4618 mov r0, r3
|
|
800a0d8: f7fa f92c bl 8004334 <lwip_htons>
|
|
800a0dc: 4603 mov r3, r0
|
|
800a0de: b2db uxtb r3, r3
|
|
800a0e0: f003 0307 and.w r3, r3, #7
|
|
800a0e4: 2b00 cmp r3, #0
|
|
800a0e6: d116 bne.n 800a116 <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);
|
|
800a0e8: 68fb ldr r3, [r7, #12]
|
|
800a0ea: 68db ldr r3, [r3, #12]
|
|
800a0ec: 899b ldrh r3, [r3, #12]
|
|
800a0ee: b29c uxth r4, r3
|
|
800a0f0: 2001 movs r0, #1
|
|
800a0f2: f7fa f91f bl 8004334 <lwip_htons>
|
|
800a0f6: 4603 mov r3, r0
|
|
800a0f8: 461a mov r2, r3
|
|
800a0fa: 68fb ldr r3, [r7, #12]
|
|
800a0fc: 68db ldr r3, [r3, #12]
|
|
800a0fe: 4322 orrs r2, r4
|
|
800a100: b292 uxth r2, r2
|
|
800a102: 819a strh r2, [r3, #12]
|
|
tcp_set_flags(pcb, TF_FIN);
|
|
800a104: 687b ldr r3, [r7, #4]
|
|
800a106: 8b5b ldrh r3, [r3, #26]
|
|
800a108: f043 0320 orr.w r3, r3, #32
|
|
800a10c: b29a uxth r2, r3
|
|
800a10e: 687b ldr r3, [r7, #4]
|
|
800a110: 835a strh r2, [r3, #26]
|
|
return ERR_OK;
|
|
800a112: 2300 movs r3, #0
|
|
800a114: e004 b.n 800a120 <tcp_send_fin+0x8c>
|
|
}
|
|
}
|
|
/* no data, no length, flags, copy=1, no optdata */
|
|
return tcp_enqueue_flags(pcb, TCP_FIN);
|
|
800a116: 2101 movs r1, #1
|
|
800a118: 6878 ldr r0, [r7, #4]
|
|
800a11a: f000 f80b bl 800a134 <tcp_enqueue_flags>
|
|
800a11e: 4603 mov r3, r0
|
|
}
|
|
800a120: 4618 mov r0, r3
|
|
800a122: 3714 adds r7, #20
|
|
800a124: 46bd mov sp, r7
|
|
800a126: bd90 pop {r4, r7, pc}
|
|
800a128: 08016704 .word 0x08016704
|
|
800a12c: 08016b0c .word 0x08016b0c
|
|
800a130: 08016758 .word 0x08016758
|
|
|
|
0800a134 <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)
|
|
{
|
|
800a134: b580 push {r7, lr}
|
|
800a136: b08a sub sp, #40 ; 0x28
|
|
800a138: af02 add r7, sp, #8
|
|
800a13a: 6078 str r0, [r7, #4]
|
|
800a13c: 460b mov r3, r1
|
|
800a13e: 70fb strb r3, [r7, #3]
|
|
struct pbuf *p;
|
|
struct tcp_seg *seg;
|
|
u8_t optflags = 0;
|
|
800a140: 2300 movs r3, #0
|
|
800a142: 77fb strb r3, [r7, #31]
|
|
u8_t optlen = 0;
|
|
800a144: 2300 movs r3, #0
|
|
800a146: 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)",
|
|
800a148: 78fb ldrb r3, [r7, #3]
|
|
800a14a: f003 0303 and.w r3, r3, #3
|
|
800a14e: 2b00 cmp r3, #0
|
|
800a150: d106 bne.n 800a160 <tcp_enqueue_flags+0x2c>
|
|
800a152: 4b67 ldr r3, [pc, #412] ; (800a2f0 <tcp_enqueue_flags+0x1bc>)
|
|
800a154: f240 4211 movw r2, #1041 ; 0x411
|
|
800a158: 4966 ldr r1, [pc, #408] ; (800a2f4 <tcp_enqueue_flags+0x1c0>)
|
|
800a15a: 4867 ldr r0, [pc, #412] ; (800a2f8 <tcp_enqueue_flags+0x1c4>)
|
|
800a15c: f006 f9cc bl 80104f8 <printf>
|
|
(flags & (TCP_SYN | TCP_FIN)) != 0);
|
|
LWIP_ASSERT("tcp_enqueue_flags: invalid pcb", pcb != NULL);
|
|
800a160: 687b ldr r3, [r7, #4]
|
|
800a162: 2b00 cmp r3, #0
|
|
800a164: d106 bne.n 800a174 <tcp_enqueue_flags+0x40>
|
|
800a166: 4b62 ldr r3, [pc, #392] ; (800a2f0 <tcp_enqueue_flags+0x1bc>)
|
|
800a168: f240 4213 movw r2, #1043 ; 0x413
|
|
800a16c: 4963 ldr r1, [pc, #396] ; (800a2fc <tcp_enqueue_flags+0x1c8>)
|
|
800a16e: 4862 ldr r0, [pc, #392] ; (800a2f8 <tcp_enqueue_flags+0x1c4>)
|
|
800a170: f006 f9c2 bl 80104f8 <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) {
|
|
800a174: 78fb ldrb r3, [r7, #3]
|
|
800a176: f003 0302 and.w r3, r3, #2
|
|
800a17a: 2b00 cmp r3, #0
|
|
800a17c: d001 beq.n 800a182 <tcp_enqueue_flags+0x4e>
|
|
optflags = TF_SEG_OPTS_MSS;
|
|
800a17e: 2301 movs r3, #1
|
|
800a180: 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);
|
|
800a182: 7ffb ldrb r3, [r7, #31]
|
|
800a184: 009b lsls r3, r3, #2
|
|
800a186: b2db uxtb r3, r3
|
|
800a188: f003 0304 and.w r3, r3, #4
|
|
800a18c: 75fb strb r3, [r7, #23]
|
|
|
|
/* Allocate pbuf with room for TCP header + options */
|
|
if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) {
|
|
800a18e: 7dfb ldrb r3, [r7, #23]
|
|
800a190: b29b uxth r3, r3
|
|
800a192: f44f 7220 mov.w r2, #640 ; 0x280
|
|
800a196: 4619 mov r1, r3
|
|
800a198: 2036 movs r0, #54 ; 0x36
|
|
800a19a: f7fb f951 bl 8005440 <pbuf_alloc>
|
|
800a19e: 6138 str r0, [r7, #16]
|
|
800a1a0: 693b ldr r3, [r7, #16]
|
|
800a1a2: 2b00 cmp r3, #0
|
|
800a1a4: d109 bne.n 800a1ba <tcp_enqueue_flags+0x86>
|
|
tcp_set_flags(pcb, TF_NAGLEMEMERR);
|
|
800a1a6: 687b ldr r3, [r7, #4]
|
|
800a1a8: 8b5b ldrh r3, [r3, #26]
|
|
800a1aa: f043 0380 orr.w r3, r3, #128 ; 0x80
|
|
800a1ae: b29a uxth r2, r3
|
|
800a1b0: 687b ldr r3, [r7, #4]
|
|
800a1b2: 835a strh r2, [r3, #26]
|
|
TCP_STATS_INC(tcp.memerr);
|
|
return ERR_MEM;
|
|
800a1b4: f04f 33ff mov.w r3, #4294967295
|
|
800a1b8: e095 b.n 800a2e6 <tcp_enqueue_flags+0x1b2>
|
|
}
|
|
LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen",
|
|
800a1ba: 693b ldr r3, [r7, #16]
|
|
800a1bc: 895a ldrh r2, [r3, #10]
|
|
800a1be: 7dfb ldrb r3, [r7, #23]
|
|
800a1c0: b29b uxth r3, r3
|
|
800a1c2: 429a cmp r2, r3
|
|
800a1c4: d206 bcs.n 800a1d4 <tcp_enqueue_flags+0xa0>
|
|
800a1c6: 4b4a ldr r3, [pc, #296] ; (800a2f0 <tcp_enqueue_flags+0x1bc>)
|
|
800a1c8: f240 4239 movw r2, #1081 ; 0x439
|
|
800a1cc: 494c ldr r1, [pc, #304] ; (800a300 <tcp_enqueue_flags+0x1cc>)
|
|
800a1ce: 484a ldr r0, [pc, #296] ; (800a2f8 <tcp_enqueue_flags+0x1c4>)
|
|
800a1d0: f006 f992 bl 80104f8 <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) {
|
|
800a1d4: 687b ldr r3, [r7, #4]
|
|
800a1d6: 6dd9 ldr r1, [r3, #92] ; 0x5c
|
|
800a1d8: 78fa ldrb r2, [r7, #3]
|
|
800a1da: 7ffb ldrb r3, [r7, #31]
|
|
800a1dc: 9300 str r3, [sp, #0]
|
|
800a1de: 460b mov r3, r1
|
|
800a1e0: 6939 ldr r1, [r7, #16]
|
|
800a1e2: 6878 ldr r0, [r7, #4]
|
|
800a1e4: f7ff fd70 bl 8009cc8 <tcp_create_segment>
|
|
800a1e8: 60f8 str r0, [r7, #12]
|
|
800a1ea: 68fb ldr r3, [r7, #12]
|
|
800a1ec: 2b00 cmp r3, #0
|
|
800a1ee: d109 bne.n 800a204 <tcp_enqueue_flags+0xd0>
|
|
tcp_set_flags(pcb, TF_NAGLEMEMERR);
|
|
800a1f0: 687b ldr r3, [r7, #4]
|
|
800a1f2: 8b5b ldrh r3, [r3, #26]
|
|
800a1f4: f043 0380 orr.w r3, r3, #128 ; 0x80
|
|
800a1f8: b29a uxth r2, r3
|
|
800a1fa: 687b ldr r3, [r7, #4]
|
|
800a1fc: 835a strh r2, [r3, #26]
|
|
TCP_STATS_INC(tcp.memerr);
|
|
return ERR_MEM;
|
|
800a1fe: f04f 33ff mov.w r3, #4294967295
|
|
800a202: e070 b.n 800a2e6 <tcp_enqueue_flags+0x1b2>
|
|
}
|
|
LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0);
|
|
800a204: 68fb ldr r3, [r7, #12]
|
|
800a206: 68db ldr r3, [r3, #12]
|
|
800a208: f003 0303 and.w r3, r3, #3
|
|
800a20c: 2b00 cmp r3, #0
|
|
800a20e: d006 beq.n 800a21e <tcp_enqueue_flags+0xea>
|
|
800a210: 4b37 ldr r3, [pc, #220] ; (800a2f0 <tcp_enqueue_flags+0x1bc>)
|
|
800a212: f240 4242 movw r2, #1090 ; 0x442
|
|
800a216: 493b ldr r1, [pc, #236] ; (800a304 <tcp_enqueue_flags+0x1d0>)
|
|
800a218: 4837 ldr r0, [pc, #220] ; (800a2f8 <tcp_enqueue_flags+0x1c4>)
|
|
800a21a: f006 f96d bl 80104f8 <printf>
|
|
LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0);
|
|
800a21e: 68fb ldr r3, [r7, #12]
|
|
800a220: 891b ldrh r3, [r3, #8]
|
|
800a222: 2b00 cmp r3, #0
|
|
800a224: d006 beq.n 800a234 <tcp_enqueue_flags+0x100>
|
|
800a226: 4b32 ldr r3, [pc, #200] ; (800a2f0 <tcp_enqueue_flags+0x1bc>)
|
|
800a228: f240 4243 movw r2, #1091 ; 0x443
|
|
800a22c: 4936 ldr r1, [pc, #216] ; (800a308 <tcp_enqueue_flags+0x1d4>)
|
|
800a22e: 4832 ldr r0, [pc, #200] ; (800a2f8 <tcp_enqueue_flags+0x1c4>)
|
|
800a230: f006 f962 bl 80104f8 <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) {
|
|
800a234: 687b ldr r3, [r7, #4]
|
|
800a236: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
800a238: 2b00 cmp r3, #0
|
|
800a23a: d103 bne.n 800a244 <tcp_enqueue_flags+0x110>
|
|
pcb->unsent = seg;
|
|
800a23c: 687b ldr r3, [r7, #4]
|
|
800a23e: 68fa ldr r2, [r7, #12]
|
|
800a240: 66da str r2, [r3, #108] ; 0x6c
|
|
800a242: e00d b.n 800a260 <tcp_enqueue_flags+0x12c>
|
|
} else {
|
|
struct tcp_seg *useg;
|
|
for (useg = pcb->unsent; useg->next != NULL; useg = useg->next);
|
|
800a244: 687b ldr r3, [r7, #4]
|
|
800a246: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
800a248: 61bb str r3, [r7, #24]
|
|
800a24a: e002 b.n 800a252 <tcp_enqueue_flags+0x11e>
|
|
800a24c: 69bb ldr r3, [r7, #24]
|
|
800a24e: 681b ldr r3, [r3, #0]
|
|
800a250: 61bb str r3, [r7, #24]
|
|
800a252: 69bb ldr r3, [r7, #24]
|
|
800a254: 681b ldr r3, [r3, #0]
|
|
800a256: 2b00 cmp r3, #0
|
|
800a258: d1f8 bne.n 800a24c <tcp_enqueue_flags+0x118>
|
|
useg->next = seg;
|
|
800a25a: 69bb ldr r3, [r7, #24]
|
|
800a25c: 68fa ldr r2, [r7, #12]
|
|
800a25e: 601a str r2, [r3, #0]
|
|
}
|
|
#if TCP_OVERSIZE
|
|
/* The new unsent tail has no space */
|
|
pcb->unsent_oversize = 0;
|
|
800a260: 687b ldr r3, [r7, #4]
|
|
800a262: 2200 movs r2, #0
|
|
800a264: 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)) {
|
|
800a268: 78fb ldrb r3, [r7, #3]
|
|
800a26a: f003 0302 and.w r3, r3, #2
|
|
800a26e: 2b00 cmp r3, #0
|
|
800a270: d104 bne.n 800a27c <tcp_enqueue_flags+0x148>
|
|
800a272: 78fb ldrb r3, [r7, #3]
|
|
800a274: f003 0301 and.w r3, r3, #1
|
|
800a278: 2b00 cmp r3, #0
|
|
800a27a: d004 beq.n 800a286 <tcp_enqueue_flags+0x152>
|
|
pcb->snd_lbb++;
|
|
800a27c: 687b ldr r3, [r7, #4]
|
|
800a27e: 6ddb ldr r3, [r3, #92] ; 0x5c
|
|
800a280: 1c5a adds r2, r3, #1
|
|
800a282: 687b ldr r3, [r7, #4]
|
|
800a284: 65da str r2, [r3, #92] ; 0x5c
|
|
/* optlen does not influence snd_buf */
|
|
}
|
|
if (flags & TCP_FIN) {
|
|
800a286: 78fb ldrb r3, [r7, #3]
|
|
800a288: f003 0301 and.w r3, r3, #1
|
|
800a28c: 2b00 cmp r3, #0
|
|
800a28e: d006 beq.n 800a29e <tcp_enqueue_flags+0x16a>
|
|
tcp_set_flags(pcb, TF_FIN);
|
|
800a290: 687b ldr r3, [r7, #4]
|
|
800a292: 8b5b ldrh r3, [r3, #26]
|
|
800a294: f043 0320 orr.w r3, r3, #32
|
|
800a298: b29a uxth r2, r3
|
|
800a29a: 687b ldr r3, [r7, #4]
|
|
800a29c: 835a strh r2, [r3, #26]
|
|
}
|
|
|
|
/* update number of segments on the queues */
|
|
pcb->snd_queuelen += pbuf_clen(seg->p);
|
|
800a29e: 68fb ldr r3, [r7, #12]
|
|
800a2a0: 685b ldr r3, [r3, #4]
|
|
800a2a2: 4618 mov r0, r3
|
|
800a2a4: f7fb fc38 bl 8005b18 <pbuf_clen>
|
|
800a2a8: 4603 mov r3, r0
|
|
800a2aa: 461a mov r2, r3
|
|
800a2ac: 687b ldr r3, [r7, #4]
|
|
800a2ae: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
|
|
800a2b2: 4413 add r3, r2
|
|
800a2b4: b29a uxth r2, r3
|
|
800a2b6: 687b ldr r3, [r7, #4]
|
|
800a2b8: 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) {
|
|
800a2bc: 687b ldr r3, [r7, #4]
|
|
800a2be: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
|
|
800a2c2: 2b00 cmp r3, #0
|
|
800a2c4: d00e beq.n 800a2e4 <tcp_enqueue_flags+0x1b0>
|
|
LWIP_ASSERT("tcp_enqueue_flags: invalid queue length",
|
|
800a2c6: 687b ldr r3, [r7, #4]
|
|
800a2c8: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
800a2ca: 2b00 cmp r3, #0
|
|
800a2cc: d10a bne.n 800a2e4 <tcp_enqueue_flags+0x1b0>
|
|
800a2ce: 687b ldr r3, [r7, #4]
|
|
800a2d0: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
800a2d2: 2b00 cmp r3, #0
|
|
800a2d4: d106 bne.n 800a2e4 <tcp_enqueue_flags+0x1b0>
|
|
800a2d6: 4b06 ldr r3, [pc, #24] ; (800a2f0 <tcp_enqueue_flags+0x1bc>)
|
|
800a2d8: f240 4265 movw r2, #1125 ; 0x465
|
|
800a2dc: 490b ldr r1, [pc, #44] ; (800a30c <tcp_enqueue_flags+0x1d8>)
|
|
800a2de: 4806 ldr r0, [pc, #24] ; (800a2f8 <tcp_enqueue_flags+0x1c4>)
|
|
800a2e0: f006 f90a bl 80104f8 <printf>
|
|
pcb->unacked != NULL || pcb->unsent != NULL);
|
|
}
|
|
|
|
return ERR_OK;
|
|
800a2e4: 2300 movs r3, #0
|
|
}
|
|
800a2e6: 4618 mov r0, r3
|
|
800a2e8: 3720 adds r7, #32
|
|
800a2ea: 46bd mov sp, r7
|
|
800a2ec: bd80 pop {r7, pc}
|
|
800a2ee: bf00 nop
|
|
800a2f0: 08016704 .word 0x08016704
|
|
800a2f4: 08016b28 .word 0x08016b28
|
|
800a2f8: 08016758 .word 0x08016758
|
|
800a2fc: 08016b80 .word 0x08016b80
|
|
800a300: 08016ba0 .word 0x08016ba0
|
|
800a304: 08016bdc .word 0x08016bdc
|
|
800a308: 08016bf4 .word 0x08016bf4
|
|
800a30c: 08016c20 .word 0x08016c20
|
|
|
|
0800a310 <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)
|
|
{
|
|
800a310: b5b0 push {r4, r5, r7, lr}
|
|
800a312: b08a sub sp, #40 ; 0x28
|
|
800a314: af00 add r7, sp, #0
|
|
800a316: 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);
|
|
800a318: 687b ldr r3, [r7, #4]
|
|
800a31a: 2b00 cmp r3, #0
|
|
800a31c: d106 bne.n 800a32c <tcp_output+0x1c>
|
|
800a31e: 4b8a ldr r3, [pc, #552] ; (800a548 <tcp_output+0x238>)
|
|
800a320: f240 42e1 movw r2, #1249 ; 0x4e1
|
|
800a324: 4989 ldr r1, [pc, #548] ; (800a54c <tcp_output+0x23c>)
|
|
800a326: 488a ldr r0, [pc, #552] ; (800a550 <tcp_output+0x240>)
|
|
800a328: f006 f8e6 bl 80104f8 <printf>
|
|
/* pcb->state LISTEN not allowed here */
|
|
LWIP_ASSERT("don't call tcp_output for listen-pcbs",
|
|
800a32c: 687b ldr r3, [r7, #4]
|
|
800a32e: 7d1b ldrb r3, [r3, #20]
|
|
800a330: 2b01 cmp r3, #1
|
|
800a332: d106 bne.n 800a342 <tcp_output+0x32>
|
|
800a334: 4b84 ldr r3, [pc, #528] ; (800a548 <tcp_output+0x238>)
|
|
800a336: f240 42e3 movw r2, #1251 ; 0x4e3
|
|
800a33a: 4986 ldr r1, [pc, #536] ; (800a554 <tcp_output+0x244>)
|
|
800a33c: 4884 ldr r0, [pc, #528] ; (800a550 <tcp_output+0x240>)
|
|
800a33e: f006 f8db bl 80104f8 <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) {
|
|
800a342: 4b85 ldr r3, [pc, #532] ; (800a558 <tcp_output+0x248>)
|
|
800a344: 681b ldr r3, [r3, #0]
|
|
800a346: 687a ldr r2, [r7, #4]
|
|
800a348: 429a cmp r2, r3
|
|
800a34a: d101 bne.n 800a350 <tcp_output+0x40>
|
|
return ERR_OK;
|
|
800a34c: 2300 movs r3, #0
|
|
800a34e: e1ce b.n 800a6ee <tcp_output+0x3de>
|
|
}
|
|
|
|
wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd);
|
|
800a350: 687b ldr r3, [r7, #4]
|
|
800a352: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
|
|
800a356: 687b ldr r3, [r7, #4]
|
|
800a358: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
|
|
800a35c: 4293 cmp r3, r2
|
|
800a35e: bf28 it cs
|
|
800a360: 4613 movcs r3, r2
|
|
800a362: b29b uxth r3, r3
|
|
800a364: 61bb str r3, [r7, #24]
|
|
|
|
seg = pcb->unsent;
|
|
800a366: 687b ldr r3, [r7, #4]
|
|
800a368: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
800a36a: 627b str r3, [r7, #36] ; 0x24
|
|
|
|
if (seg == NULL) {
|
|
800a36c: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a36e: 2b00 cmp r3, #0
|
|
800a370: d10b bne.n 800a38a <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) {
|
|
800a372: 687b ldr r3, [r7, #4]
|
|
800a374: 8b5b ldrh r3, [r3, #26]
|
|
800a376: f003 0302 and.w r3, r3, #2
|
|
800a37a: 2b00 cmp r3, #0
|
|
800a37c: f000 81aa beq.w 800a6d4 <tcp_output+0x3c4>
|
|
return tcp_send_empty_ack(pcb);
|
|
800a380: 6878 ldr r0, [r7, #4]
|
|
800a382: f000 fdcb bl 800af1c <tcp_send_empty_ack>
|
|
800a386: 4603 mov r3, r0
|
|
800a388: e1b1 b.n 800a6ee <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);
|
|
800a38a: 6879 ldr r1, [r7, #4]
|
|
800a38c: 687b ldr r3, [r7, #4]
|
|
800a38e: 3304 adds r3, #4
|
|
800a390: 461a mov r2, r3
|
|
800a392: 6878 ldr r0, [r7, #4]
|
|
800a394: f7ff fc7c bl 8009c90 <tcp_route>
|
|
800a398: 6178 str r0, [r7, #20]
|
|
if (netif == NULL) {
|
|
800a39a: 697b ldr r3, [r7, #20]
|
|
800a39c: 2b00 cmp r3, #0
|
|
800a39e: d102 bne.n 800a3a6 <tcp_output+0x96>
|
|
return ERR_RTE;
|
|
800a3a0: f06f 0303 mvn.w r3, #3
|
|
800a3a4: e1a3 b.n 800a6ee <tcp_output+0x3de>
|
|
}
|
|
|
|
/* If we don't have a local IP address, we get one from netif */
|
|
if (ip_addr_isany(&pcb->local_ip)) {
|
|
800a3a6: 687b ldr r3, [r7, #4]
|
|
800a3a8: 2b00 cmp r3, #0
|
|
800a3aa: d003 beq.n 800a3b4 <tcp_output+0xa4>
|
|
800a3ac: 687b ldr r3, [r7, #4]
|
|
800a3ae: 681b ldr r3, [r3, #0]
|
|
800a3b0: 2b00 cmp r3, #0
|
|
800a3b2: d111 bne.n 800a3d8 <tcp_output+0xc8>
|
|
const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, &pcb->remote_ip);
|
|
800a3b4: 697b ldr r3, [r7, #20]
|
|
800a3b6: 2b00 cmp r3, #0
|
|
800a3b8: d002 beq.n 800a3c0 <tcp_output+0xb0>
|
|
800a3ba: 697b ldr r3, [r7, #20]
|
|
800a3bc: 3304 adds r3, #4
|
|
800a3be: e000 b.n 800a3c2 <tcp_output+0xb2>
|
|
800a3c0: 2300 movs r3, #0
|
|
800a3c2: 613b str r3, [r7, #16]
|
|
if (local_ip == NULL) {
|
|
800a3c4: 693b ldr r3, [r7, #16]
|
|
800a3c6: 2b00 cmp r3, #0
|
|
800a3c8: d102 bne.n 800a3d0 <tcp_output+0xc0>
|
|
return ERR_RTE;
|
|
800a3ca: f06f 0303 mvn.w r3, #3
|
|
800a3ce: e18e b.n 800a6ee <tcp_output+0x3de>
|
|
}
|
|
ip_addr_copy(pcb->local_ip, *local_ip);
|
|
800a3d0: 693b ldr r3, [r7, #16]
|
|
800a3d2: 681a ldr r2, [r3, #0]
|
|
800a3d4: 687b ldr r3, [r7, #4]
|
|
800a3d6: 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) {
|
|
800a3d8: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a3da: 68db ldr r3, [r3, #12]
|
|
800a3dc: 685b ldr r3, [r3, #4]
|
|
800a3de: 4618 mov r0, r3
|
|
800a3e0: f7f9 ffbd bl 800435e <lwip_htonl>
|
|
800a3e4: 4602 mov r2, r0
|
|
800a3e6: 687b ldr r3, [r7, #4]
|
|
800a3e8: 6c5b ldr r3, [r3, #68] ; 0x44
|
|
800a3ea: 1ad3 subs r3, r2, r3
|
|
800a3ec: 6a7a ldr r2, [r7, #36] ; 0x24
|
|
800a3ee: 8912 ldrh r2, [r2, #8]
|
|
800a3f0: 4413 add r3, r2
|
|
800a3f2: 69ba ldr r2, [r7, #24]
|
|
800a3f4: 429a cmp r2, r3
|
|
800a3f6: d227 bcs.n 800a448 <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) {
|
|
800a3f8: 687b ldr r3, [r7, #4]
|
|
800a3fa: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
|
|
800a3fe: 461a mov r2, r3
|
|
800a400: 69bb ldr r3, [r7, #24]
|
|
800a402: 4293 cmp r3, r2
|
|
800a404: d114 bne.n 800a430 <tcp_output+0x120>
|
|
800a406: 687b ldr r3, [r7, #4]
|
|
800a408: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
800a40a: 2b00 cmp r3, #0
|
|
800a40c: d110 bne.n 800a430 <tcp_output+0x120>
|
|
800a40e: 687b ldr r3, [r7, #4]
|
|
800a410: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
|
|
800a414: 2b00 cmp r3, #0
|
|
800a416: d10b bne.n 800a430 <tcp_output+0x120>
|
|
pcb->persist_cnt = 0;
|
|
800a418: 687b ldr r3, [r7, #4]
|
|
800a41a: 2200 movs r2, #0
|
|
800a41c: f883 2098 strb.w r2, [r3, #152] ; 0x98
|
|
pcb->persist_backoff = 1;
|
|
800a420: 687b ldr r3, [r7, #4]
|
|
800a422: 2201 movs r2, #1
|
|
800a424: f883 2099 strb.w r2, [r3, #153] ; 0x99
|
|
pcb->persist_probe = 0;
|
|
800a428: 687b ldr r3, [r7, #4]
|
|
800a42a: 2200 movs r2, #0
|
|
800a42c: 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) {
|
|
800a430: 687b ldr r3, [r7, #4]
|
|
800a432: 8b5b ldrh r3, [r3, #26]
|
|
800a434: f003 0302 and.w r3, r3, #2
|
|
800a438: 2b00 cmp r3, #0
|
|
800a43a: f000 814d beq.w 800a6d8 <tcp_output+0x3c8>
|
|
return tcp_send_empty_ack(pcb);
|
|
800a43e: 6878 ldr r0, [r7, #4]
|
|
800a440: f000 fd6c bl 800af1c <tcp_send_empty_ack>
|
|
800a444: 4603 mov r3, r0
|
|
800a446: e152 b.n 800a6ee <tcp_output+0x3de>
|
|
}
|
|
goto output_done;
|
|
}
|
|
/* Stop persist timer, above conditions are not active */
|
|
pcb->persist_backoff = 0;
|
|
800a448: 687b ldr r3, [r7, #4]
|
|
800a44a: 2200 movs r2, #0
|
|
800a44c: f883 2099 strb.w r2, [r3, #153] ; 0x99
|
|
|
|
/* useg should point to last segment on unacked queue */
|
|
useg = pcb->unacked;
|
|
800a450: 687b ldr r3, [r7, #4]
|
|
800a452: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
800a454: 623b str r3, [r7, #32]
|
|
if (useg != NULL) {
|
|
800a456: 6a3b ldr r3, [r7, #32]
|
|
800a458: 2b00 cmp r3, #0
|
|
800a45a: f000 811c beq.w 800a696 <tcp_output+0x386>
|
|
for (; useg->next != NULL; useg = useg->next);
|
|
800a45e: e002 b.n 800a466 <tcp_output+0x156>
|
|
800a460: 6a3b ldr r3, [r7, #32]
|
|
800a462: 681b ldr r3, [r3, #0]
|
|
800a464: 623b str r3, [r7, #32]
|
|
800a466: 6a3b ldr r3, [r7, #32]
|
|
800a468: 681b ldr r3, [r3, #0]
|
|
800a46a: 2b00 cmp r3, #0
|
|
800a46c: d1f8 bne.n 800a460 <tcp_output+0x150>
|
|
}
|
|
/* data available and window allows it to be sent? */
|
|
while (seg != NULL &&
|
|
800a46e: e112 b.n 800a696 <tcp_output+0x386>
|
|
lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) {
|
|
LWIP_ASSERT("RST not expected here!",
|
|
800a470: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a472: 68db ldr r3, [r3, #12]
|
|
800a474: 899b ldrh r3, [r3, #12]
|
|
800a476: b29b uxth r3, r3
|
|
800a478: 4618 mov r0, r3
|
|
800a47a: f7f9 ff5b bl 8004334 <lwip_htons>
|
|
800a47e: 4603 mov r3, r0
|
|
800a480: b2db uxtb r3, r3
|
|
800a482: f003 0304 and.w r3, r3, #4
|
|
800a486: 2b00 cmp r3, #0
|
|
800a488: d006 beq.n 800a498 <tcp_output+0x188>
|
|
800a48a: 4b2f ldr r3, [pc, #188] ; (800a548 <tcp_output+0x238>)
|
|
800a48c: f240 5236 movw r2, #1334 ; 0x536
|
|
800a490: 4932 ldr r1, [pc, #200] ; (800a55c <tcp_output+0x24c>)
|
|
800a492: 482f ldr r0, [pc, #188] ; (800a550 <tcp_output+0x240>)
|
|
800a494: f006 f830 bl 80104f8 <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) &&
|
|
800a498: 687b ldr r3, [r7, #4]
|
|
800a49a: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
800a49c: 2b00 cmp r3, #0
|
|
800a49e: d01f beq.n 800a4e0 <tcp_output+0x1d0>
|
|
800a4a0: 687b ldr r3, [r7, #4]
|
|
800a4a2: 8b5b ldrh r3, [r3, #26]
|
|
800a4a4: f003 0344 and.w r3, r3, #68 ; 0x44
|
|
800a4a8: 2b00 cmp r3, #0
|
|
800a4aa: d119 bne.n 800a4e0 <tcp_output+0x1d0>
|
|
800a4ac: 687b ldr r3, [r7, #4]
|
|
800a4ae: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
800a4b0: 2b00 cmp r3, #0
|
|
800a4b2: d00b beq.n 800a4cc <tcp_output+0x1bc>
|
|
800a4b4: 687b ldr r3, [r7, #4]
|
|
800a4b6: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
800a4b8: 681b ldr r3, [r3, #0]
|
|
800a4ba: 2b00 cmp r3, #0
|
|
800a4bc: d110 bne.n 800a4e0 <tcp_output+0x1d0>
|
|
800a4be: 687b ldr r3, [r7, #4]
|
|
800a4c0: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
800a4c2: 891a ldrh r2, [r3, #8]
|
|
800a4c4: 687b ldr r3, [r7, #4]
|
|
800a4c6: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
800a4c8: 429a cmp r2, r3
|
|
800a4ca: d209 bcs.n 800a4e0 <tcp_output+0x1d0>
|
|
800a4cc: 687b ldr r3, [r7, #4]
|
|
800a4ce: f8b3 3064 ldrh.w r3, [r3, #100] ; 0x64
|
|
800a4d2: 2b00 cmp r3, #0
|
|
800a4d4: d004 beq.n 800a4e0 <tcp_output+0x1d0>
|
|
800a4d6: 687b ldr r3, [r7, #4]
|
|
800a4d8: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
|
|
800a4dc: 2b08 cmp r3, #8
|
|
800a4de: d901 bls.n 800a4e4 <tcp_output+0x1d4>
|
|
800a4e0: 2301 movs r3, #1
|
|
800a4e2: e000 b.n 800a4e6 <tcp_output+0x1d6>
|
|
800a4e4: 2300 movs r3, #0
|
|
800a4e6: 2b00 cmp r3, #0
|
|
800a4e8: d106 bne.n 800a4f8 <tcp_output+0x1e8>
|
|
((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)) {
|
|
800a4ea: 687b ldr r3, [r7, #4]
|
|
800a4ec: 8b5b ldrh r3, [r3, #26]
|
|
800a4ee: f003 03a0 and.w r3, r3, #160 ; 0xa0
|
|
if ((tcp_do_output_nagle(pcb) == 0) &&
|
|
800a4f2: 2b00 cmp r3, #0
|
|
800a4f4: f000 80e4 beq.w 800a6c0 <tcp_output+0x3b0>
|
|
pcb->lastack,
|
|
lwip_ntohl(seg->tcphdr->seqno), pcb->lastack, i));
|
|
++i;
|
|
#endif /* TCP_CWND_DEBUG */
|
|
|
|
if (pcb->state != SYN_SENT) {
|
|
800a4f8: 687b ldr r3, [r7, #4]
|
|
800a4fa: 7d1b ldrb r3, [r3, #20]
|
|
800a4fc: 2b02 cmp r3, #2
|
|
800a4fe: d00d beq.n 800a51c <tcp_output+0x20c>
|
|
TCPH_SET_FLAG(seg->tcphdr, TCP_ACK);
|
|
800a500: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a502: 68db ldr r3, [r3, #12]
|
|
800a504: 899b ldrh r3, [r3, #12]
|
|
800a506: b29c uxth r4, r3
|
|
800a508: 2010 movs r0, #16
|
|
800a50a: f7f9 ff13 bl 8004334 <lwip_htons>
|
|
800a50e: 4603 mov r3, r0
|
|
800a510: 461a mov r2, r3
|
|
800a512: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a514: 68db ldr r3, [r3, #12]
|
|
800a516: 4322 orrs r2, r4
|
|
800a518: b292 uxth r2, r2
|
|
800a51a: 819a strh r2, [r3, #12]
|
|
}
|
|
|
|
err = tcp_output_segment(seg, pcb, netif);
|
|
800a51c: 697a ldr r2, [r7, #20]
|
|
800a51e: 6879 ldr r1, [r7, #4]
|
|
800a520: 6a78 ldr r0, [r7, #36] ; 0x24
|
|
800a522: f000 f909 bl 800a738 <tcp_output_segment>
|
|
800a526: 4603 mov r3, r0
|
|
800a528: 73fb strb r3, [r7, #15]
|
|
if (err != ERR_OK) {
|
|
800a52a: f997 300f ldrsb.w r3, [r7, #15]
|
|
800a52e: 2b00 cmp r3, #0
|
|
800a530: d016 beq.n 800a560 <tcp_output+0x250>
|
|
/* segment could not be sent, for whatever reason */
|
|
tcp_set_flags(pcb, TF_NAGLEMEMERR);
|
|
800a532: 687b ldr r3, [r7, #4]
|
|
800a534: 8b5b ldrh r3, [r3, #26]
|
|
800a536: f043 0380 orr.w r3, r3, #128 ; 0x80
|
|
800a53a: b29a uxth r2, r3
|
|
800a53c: 687b ldr r3, [r7, #4]
|
|
800a53e: 835a strh r2, [r3, #26]
|
|
return err;
|
|
800a540: f997 300f ldrsb.w r3, [r7, #15]
|
|
800a544: e0d3 b.n 800a6ee <tcp_output+0x3de>
|
|
800a546: bf00 nop
|
|
800a548: 08016704 .word 0x08016704
|
|
800a54c: 08016c48 .word 0x08016c48
|
|
800a550: 08016758 .word 0x08016758
|
|
800a554: 08016c60 .word 0x08016c60
|
|
800a558: 20008c4c .word 0x20008c4c
|
|
800a55c: 08016c88 .word 0x08016c88
|
|
}
|
|
#if TCP_OVERSIZE_DBGCHECK
|
|
seg->oversize_left = 0;
|
|
#endif /* TCP_OVERSIZE_DBGCHECK */
|
|
pcb->unsent = seg->next;
|
|
800a560: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a562: 681a ldr r2, [r3, #0]
|
|
800a564: 687b ldr r3, [r7, #4]
|
|
800a566: 66da str r2, [r3, #108] ; 0x6c
|
|
if (pcb->state != SYN_SENT) {
|
|
800a568: 687b ldr r3, [r7, #4]
|
|
800a56a: 7d1b ldrb r3, [r3, #20]
|
|
800a56c: 2b02 cmp r3, #2
|
|
800a56e: d006 beq.n 800a57e <tcp_output+0x26e>
|
|
tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
|
|
800a570: 687b ldr r3, [r7, #4]
|
|
800a572: 8b5b ldrh r3, [r3, #26]
|
|
800a574: f023 0303 bic.w r3, r3, #3
|
|
800a578: b29a uxth r2, r3
|
|
800a57a: 687b ldr r3, [r7, #4]
|
|
800a57c: 835a strh r2, [r3, #26]
|
|
}
|
|
snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
|
|
800a57e: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a580: 68db ldr r3, [r3, #12]
|
|
800a582: 685b ldr r3, [r3, #4]
|
|
800a584: 4618 mov r0, r3
|
|
800a586: f7f9 feea bl 800435e <lwip_htonl>
|
|
800a58a: 4604 mov r4, r0
|
|
800a58c: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a58e: 891b ldrh r3, [r3, #8]
|
|
800a590: 461d mov r5, r3
|
|
800a592: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a594: 68db ldr r3, [r3, #12]
|
|
800a596: 899b ldrh r3, [r3, #12]
|
|
800a598: b29b uxth r3, r3
|
|
800a59a: 4618 mov r0, r3
|
|
800a59c: f7f9 feca bl 8004334 <lwip_htons>
|
|
800a5a0: 4603 mov r3, r0
|
|
800a5a2: b2db uxtb r3, r3
|
|
800a5a4: f003 0303 and.w r3, r3, #3
|
|
800a5a8: 2b00 cmp r3, #0
|
|
800a5aa: d001 beq.n 800a5b0 <tcp_output+0x2a0>
|
|
800a5ac: 2301 movs r3, #1
|
|
800a5ae: e000 b.n 800a5b2 <tcp_output+0x2a2>
|
|
800a5b0: 2300 movs r3, #0
|
|
800a5b2: 442b add r3, r5
|
|
800a5b4: 4423 add r3, r4
|
|
800a5b6: 60bb str r3, [r7, #8]
|
|
if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) {
|
|
800a5b8: 687b ldr r3, [r7, #4]
|
|
800a5ba: 6d1a ldr r2, [r3, #80] ; 0x50
|
|
800a5bc: 68bb ldr r3, [r7, #8]
|
|
800a5be: 1ad3 subs r3, r2, r3
|
|
800a5c0: 2b00 cmp r3, #0
|
|
800a5c2: da02 bge.n 800a5ca <tcp_output+0x2ba>
|
|
pcb->snd_nxt = snd_nxt;
|
|
800a5c4: 687b ldr r3, [r7, #4]
|
|
800a5c6: 68ba ldr r2, [r7, #8]
|
|
800a5c8: 651a str r2, [r3, #80] ; 0x50
|
|
}
|
|
/* put segment on unacknowledged list if length > 0 */
|
|
if (TCP_TCPLEN(seg) > 0) {
|
|
800a5ca: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a5cc: 891b ldrh r3, [r3, #8]
|
|
800a5ce: 461c mov r4, r3
|
|
800a5d0: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a5d2: 68db ldr r3, [r3, #12]
|
|
800a5d4: 899b ldrh r3, [r3, #12]
|
|
800a5d6: b29b uxth r3, r3
|
|
800a5d8: 4618 mov r0, r3
|
|
800a5da: f7f9 feab bl 8004334 <lwip_htons>
|
|
800a5de: 4603 mov r3, r0
|
|
800a5e0: b2db uxtb r3, r3
|
|
800a5e2: f003 0303 and.w r3, r3, #3
|
|
800a5e6: 2b00 cmp r3, #0
|
|
800a5e8: d001 beq.n 800a5ee <tcp_output+0x2de>
|
|
800a5ea: 2301 movs r3, #1
|
|
800a5ec: e000 b.n 800a5f0 <tcp_output+0x2e0>
|
|
800a5ee: 2300 movs r3, #0
|
|
800a5f0: 4423 add r3, r4
|
|
800a5f2: 2b00 cmp r3, #0
|
|
800a5f4: d049 beq.n 800a68a <tcp_output+0x37a>
|
|
seg->next = NULL;
|
|
800a5f6: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a5f8: 2200 movs r2, #0
|
|
800a5fa: 601a str r2, [r3, #0]
|
|
/* unacked list is empty? */
|
|
if (pcb->unacked == NULL) {
|
|
800a5fc: 687b ldr r3, [r7, #4]
|
|
800a5fe: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
800a600: 2b00 cmp r3, #0
|
|
800a602: d105 bne.n 800a610 <tcp_output+0x300>
|
|
pcb->unacked = seg;
|
|
800a604: 687b ldr r3, [r7, #4]
|
|
800a606: 6a7a ldr r2, [r7, #36] ; 0x24
|
|
800a608: 671a str r2, [r3, #112] ; 0x70
|
|
useg = seg;
|
|
800a60a: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a60c: 623b str r3, [r7, #32]
|
|
800a60e: e03f b.n 800a690 <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))) {
|
|
800a610: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a612: 68db ldr r3, [r3, #12]
|
|
800a614: 685b ldr r3, [r3, #4]
|
|
800a616: 4618 mov r0, r3
|
|
800a618: f7f9 fea1 bl 800435e <lwip_htonl>
|
|
800a61c: 4604 mov r4, r0
|
|
800a61e: 6a3b ldr r3, [r7, #32]
|
|
800a620: 68db ldr r3, [r3, #12]
|
|
800a622: 685b ldr r3, [r3, #4]
|
|
800a624: 4618 mov r0, r3
|
|
800a626: f7f9 fe9a bl 800435e <lwip_htonl>
|
|
800a62a: 4603 mov r3, r0
|
|
800a62c: 1ae3 subs r3, r4, r3
|
|
800a62e: 2b00 cmp r3, #0
|
|
800a630: da24 bge.n 800a67c <tcp_output+0x36c>
|
|
/* add segment to before tail of unacked list, keeping the list sorted */
|
|
struct tcp_seg **cur_seg = &(pcb->unacked);
|
|
800a632: 687b ldr r3, [r7, #4]
|
|
800a634: 3370 adds r3, #112 ; 0x70
|
|
800a636: 61fb str r3, [r7, #28]
|
|
while (*cur_seg &&
|
|
800a638: e002 b.n 800a640 <tcp_output+0x330>
|
|
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
|
|
cur_seg = &((*cur_seg)->next );
|
|
800a63a: 69fb ldr r3, [r7, #28]
|
|
800a63c: 681b ldr r3, [r3, #0]
|
|
800a63e: 61fb str r3, [r7, #28]
|
|
while (*cur_seg &&
|
|
800a640: 69fb ldr r3, [r7, #28]
|
|
800a642: 681b ldr r3, [r3, #0]
|
|
800a644: 2b00 cmp r3, #0
|
|
800a646: d011 beq.n 800a66c <tcp_output+0x35c>
|
|
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
|
|
800a648: 69fb ldr r3, [r7, #28]
|
|
800a64a: 681b ldr r3, [r3, #0]
|
|
800a64c: 68db ldr r3, [r3, #12]
|
|
800a64e: 685b ldr r3, [r3, #4]
|
|
800a650: 4618 mov r0, r3
|
|
800a652: f7f9 fe84 bl 800435e <lwip_htonl>
|
|
800a656: 4604 mov r4, r0
|
|
800a658: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a65a: 68db ldr r3, [r3, #12]
|
|
800a65c: 685b ldr r3, [r3, #4]
|
|
800a65e: 4618 mov r0, r3
|
|
800a660: f7f9 fe7d bl 800435e <lwip_htonl>
|
|
800a664: 4603 mov r3, r0
|
|
800a666: 1ae3 subs r3, r4, r3
|
|
while (*cur_seg &&
|
|
800a668: 2b00 cmp r3, #0
|
|
800a66a: dbe6 blt.n 800a63a <tcp_output+0x32a>
|
|
}
|
|
seg->next = (*cur_seg);
|
|
800a66c: 69fb ldr r3, [r7, #28]
|
|
800a66e: 681a ldr r2, [r3, #0]
|
|
800a670: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a672: 601a str r2, [r3, #0]
|
|
(*cur_seg) = seg;
|
|
800a674: 69fb ldr r3, [r7, #28]
|
|
800a676: 6a7a ldr r2, [r7, #36] ; 0x24
|
|
800a678: 601a str r2, [r3, #0]
|
|
800a67a: e009 b.n 800a690 <tcp_output+0x380>
|
|
} else {
|
|
/* add segment to tail of unacked list */
|
|
useg->next = seg;
|
|
800a67c: 6a3b ldr r3, [r7, #32]
|
|
800a67e: 6a7a ldr r2, [r7, #36] ; 0x24
|
|
800a680: 601a str r2, [r3, #0]
|
|
useg = useg->next;
|
|
800a682: 6a3b ldr r3, [r7, #32]
|
|
800a684: 681b ldr r3, [r3, #0]
|
|
800a686: 623b str r3, [r7, #32]
|
|
800a688: e002 b.n 800a690 <tcp_output+0x380>
|
|
}
|
|
}
|
|
/* do not queue empty segments on the unacked list */
|
|
} else {
|
|
tcp_seg_free(seg);
|
|
800a68a: 6a78 ldr r0, [r7, #36] ; 0x24
|
|
800a68c: f7fc fc3f bl 8006f0e <tcp_seg_free>
|
|
}
|
|
seg = pcb->unsent;
|
|
800a690: 687b ldr r3, [r7, #4]
|
|
800a692: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
800a694: 627b str r3, [r7, #36] ; 0x24
|
|
while (seg != NULL &&
|
|
800a696: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a698: 2b00 cmp r3, #0
|
|
800a69a: d012 beq.n 800a6c2 <tcp_output+0x3b2>
|
|
lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) {
|
|
800a69c: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800a69e: 68db ldr r3, [r3, #12]
|
|
800a6a0: 685b ldr r3, [r3, #4]
|
|
800a6a2: 4618 mov r0, r3
|
|
800a6a4: f7f9 fe5b bl 800435e <lwip_htonl>
|
|
800a6a8: 4602 mov r2, r0
|
|
800a6aa: 687b ldr r3, [r7, #4]
|
|
800a6ac: 6c5b ldr r3, [r3, #68] ; 0x44
|
|
800a6ae: 1ad3 subs r3, r2, r3
|
|
800a6b0: 6a7a ldr r2, [r7, #36] ; 0x24
|
|
800a6b2: 8912 ldrh r2, [r2, #8]
|
|
800a6b4: 4413 add r3, r2
|
|
while (seg != NULL &&
|
|
800a6b6: 69ba ldr r2, [r7, #24]
|
|
800a6b8: 429a cmp r2, r3
|
|
800a6ba: f4bf aed9 bcs.w 800a470 <tcp_output+0x160>
|
|
800a6be: e000 b.n 800a6c2 <tcp_output+0x3b2>
|
|
break;
|
|
800a6c0: bf00 nop
|
|
}
|
|
#if TCP_OVERSIZE
|
|
if (pcb->unsent == NULL) {
|
|
800a6c2: 687b ldr r3, [r7, #4]
|
|
800a6c4: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
800a6c6: 2b00 cmp r3, #0
|
|
800a6c8: d108 bne.n 800a6dc <tcp_output+0x3cc>
|
|
/* last unsent has been removed, reset unsent_oversize */
|
|
pcb->unsent_oversize = 0;
|
|
800a6ca: 687b ldr r3, [r7, #4]
|
|
800a6cc: 2200 movs r2, #0
|
|
800a6ce: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
|
|
800a6d2: e004 b.n 800a6de <tcp_output+0x3ce>
|
|
goto output_done;
|
|
800a6d4: bf00 nop
|
|
800a6d6: e002 b.n 800a6de <tcp_output+0x3ce>
|
|
goto output_done;
|
|
800a6d8: bf00 nop
|
|
800a6da: e000 b.n 800a6de <tcp_output+0x3ce>
|
|
}
|
|
#endif /* TCP_OVERSIZE */
|
|
|
|
output_done:
|
|
800a6dc: bf00 nop
|
|
tcp_clear_flags(pcb, TF_NAGLEMEMERR);
|
|
800a6de: 687b ldr r3, [r7, #4]
|
|
800a6e0: 8b5b ldrh r3, [r3, #26]
|
|
800a6e2: f023 0380 bic.w r3, r3, #128 ; 0x80
|
|
800a6e6: b29a uxth r2, r3
|
|
800a6e8: 687b ldr r3, [r7, #4]
|
|
800a6ea: 835a strh r2, [r3, #26]
|
|
return ERR_OK;
|
|
800a6ec: 2300 movs r3, #0
|
|
}
|
|
800a6ee: 4618 mov r0, r3
|
|
800a6f0: 3728 adds r7, #40 ; 0x28
|
|
800a6f2: 46bd mov sp, r7
|
|
800a6f4: bdb0 pop {r4, r5, r7, pc}
|
|
800a6f6: bf00 nop
|
|
|
|
0800a6f8 <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)
|
|
{
|
|
800a6f8: b580 push {r7, lr}
|
|
800a6fa: b082 sub sp, #8
|
|
800a6fc: af00 add r7, sp, #0
|
|
800a6fe: 6078 str r0, [r7, #4]
|
|
LWIP_ASSERT("tcp_output_segment_busy: invalid seg", seg != NULL);
|
|
800a700: 687b ldr r3, [r7, #4]
|
|
800a702: 2b00 cmp r3, #0
|
|
800a704: d106 bne.n 800a714 <tcp_output_segment_busy+0x1c>
|
|
800a706: 4b09 ldr r3, [pc, #36] ; (800a72c <tcp_output_segment_busy+0x34>)
|
|
800a708: f240 529a movw r2, #1434 ; 0x59a
|
|
800a70c: 4908 ldr r1, [pc, #32] ; (800a730 <tcp_output_segment_busy+0x38>)
|
|
800a70e: 4809 ldr r0, [pc, #36] ; (800a734 <tcp_output_segment_busy+0x3c>)
|
|
800a710: f005 fef2 bl 80104f8 <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) {
|
|
800a714: 687b ldr r3, [r7, #4]
|
|
800a716: 685b ldr r3, [r3, #4]
|
|
800a718: 7b9b ldrb r3, [r3, #14]
|
|
800a71a: 2b01 cmp r3, #1
|
|
800a71c: d001 beq.n 800a722 <tcp_output_segment_busy+0x2a>
|
|
/* other reference found */
|
|
return 1;
|
|
800a71e: 2301 movs r3, #1
|
|
800a720: e000 b.n 800a724 <tcp_output_segment_busy+0x2c>
|
|
}
|
|
/* no other references found */
|
|
return 0;
|
|
800a722: 2300 movs r3, #0
|
|
}
|
|
800a724: 4618 mov r0, r3
|
|
800a726: 3708 adds r7, #8
|
|
800a728: 46bd mov sp, r7
|
|
800a72a: bd80 pop {r7, pc}
|
|
800a72c: 08016704 .word 0x08016704
|
|
800a730: 08016ca0 .word 0x08016ca0
|
|
800a734: 08016758 .word 0x08016758
|
|
|
|
0800a738 <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)
|
|
{
|
|
800a738: b5b0 push {r4, r5, r7, lr}
|
|
800a73a: b08c sub sp, #48 ; 0x30
|
|
800a73c: af04 add r7, sp, #16
|
|
800a73e: 60f8 str r0, [r7, #12]
|
|
800a740: 60b9 str r1, [r7, #8]
|
|
800a742: 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);
|
|
800a744: 68fb ldr r3, [r7, #12]
|
|
800a746: 2b00 cmp r3, #0
|
|
800a748: d106 bne.n 800a758 <tcp_output_segment+0x20>
|
|
800a74a: 4b63 ldr r3, [pc, #396] ; (800a8d8 <tcp_output_segment+0x1a0>)
|
|
800a74c: f44f 62b7 mov.w r2, #1464 ; 0x5b8
|
|
800a750: 4962 ldr r1, [pc, #392] ; (800a8dc <tcp_output_segment+0x1a4>)
|
|
800a752: 4863 ldr r0, [pc, #396] ; (800a8e0 <tcp_output_segment+0x1a8>)
|
|
800a754: f005 fed0 bl 80104f8 <printf>
|
|
LWIP_ASSERT("tcp_output_segment: invalid pcb", pcb != NULL);
|
|
800a758: 68bb ldr r3, [r7, #8]
|
|
800a75a: 2b00 cmp r3, #0
|
|
800a75c: d106 bne.n 800a76c <tcp_output_segment+0x34>
|
|
800a75e: 4b5e ldr r3, [pc, #376] ; (800a8d8 <tcp_output_segment+0x1a0>)
|
|
800a760: f240 52b9 movw r2, #1465 ; 0x5b9
|
|
800a764: 495f ldr r1, [pc, #380] ; (800a8e4 <tcp_output_segment+0x1ac>)
|
|
800a766: 485e ldr r0, [pc, #376] ; (800a8e0 <tcp_output_segment+0x1a8>)
|
|
800a768: f005 fec6 bl 80104f8 <printf>
|
|
LWIP_ASSERT("tcp_output_segment: invalid netif", netif != NULL);
|
|
800a76c: 687b ldr r3, [r7, #4]
|
|
800a76e: 2b00 cmp r3, #0
|
|
800a770: d106 bne.n 800a780 <tcp_output_segment+0x48>
|
|
800a772: 4b59 ldr r3, [pc, #356] ; (800a8d8 <tcp_output_segment+0x1a0>)
|
|
800a774: f240 52ba movw r2, #1466 ; 0x5ba
|
|
800a778: 495b ldr r1, [pc, #364] ; (800a8e8 <tcp_output_segment+0x1b0>)
|
|
800a77a: 4859 ldr r0, [pc, #356] ; (800a8e0 <tcp_output_segment+0x1a8>)
|
|
800a77c: f005 febc bl 80104f8 <printf>
|
|
|
|
if (tcp_output_segment_busy(seg)) {
|
|
800a780: 68f8 ldr r0, [r7, #12]
|
|
800a782: f7ff ffb9 bl 800a6f8 <tcp_output_segment_busy>
|
|
800a786: 4603 mov r3, r0
|
|
800a788: 2b00 cmp r3, #0
|
|
800a78a: d001 beq.n 800a790 <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;
|
|
800a78c: 2300 movs r3, #0
|
|
800a78e: e09f b.n 800a8d0 <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);
|
|
800a790: 68bb ldr r3, [r7, #8]
|
|
800a792: 6a5a ldr r2, [r3, #36] ; 0x24
|
|
800a794: 68fb ldr r3, [r7, #12]
|
|
800a796: 68dc ldr r4, [r3, #12]
|
|
800a798: 4610 mov r0, r2
|
|
800a79a: f7f9 fde0 bl 800435e <lwip_htonl>
|
|
800a79e: 4603 mov r3, r0
|
|
800a7a0: 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)));
|
|
800a7a2: 68bb ldr r3, [r7, #8]
|
|
800a7a4: 8d5a ldrh r2, [r3, #42] ; 0x2a
|
|
800a7a6: 68fb ldr r3, [r7, #12]
|
|
800a7a8: 68dc ldr r4, [r3, #12]
|
|
800a7aa: 4610 mov r0, r2
|
|
800a7ac: f7f9 fdc2 bl 8004334 <lwip_htons>
|
|
800a7b0: 4603 mov r3, r0
|
|
800a7b2: 81e3 strh r3, [r4, #14]
|
|
}
|
|
|
|
pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd;
|
|
800a7b4: 68bb ldr r3, [r7, #8]
|
|
800a7b6: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800a7b8: 68ba ldr r2, [r7, #8]
|
|
800a7ba: 8d52 ldrh r2, [r2, #42] ; 0x2a
|
|
800a7bc: 441a add r2, r3
|
|
800a7be: 68bb ldr r3, [r7, #8]
|
|
800a7c0: 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);
|
|
800a7c2: 68fb ldr r3, [r7, #12]
|
|
800a7c4: 68db ldr r3, [r3, #12]
|
|
800a7c6: 3314 adds r3, #20
|
|
800a7c8: 61fb str r3, [r7, #28]
|
|
if (seg->flags & TF_SEG_OPTS_MSS) {
|
|
800a7ca: 68fb ldr r3, [r7, #12]
|
|
800a7cc: 7a9b ldrb r3, [r3, #10]
|
|
800a7ce: f003 0301 and.w r3, r3, #1
|
|
800a7d2: 2b00 cmp r3, #0
|
|
800a7d4: d015 beq.n 800a802 <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);
|
|
800a7d6: 68bb ldr r3, [r7, #8]
|
|
800a7d8: 3304 adds r3, #4
|
|
800a7da: 461a mov r2, r3
|
|
800a7dc: 6879 ldr r1, [r7, #4]
|
|
800a7de: f44f 7006 mov.w r0, #536 ; 0x218
|
|
800a7e2: f7fc fe8b bl 80074fc <tcp_eff_send_mss_netif>
|
|
800a7e6: 4603 mov r3, r0
|
|
800a7e8: 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);
|
|
800a7ea: 8b7b ldrh r3, [r7, #26]
|
|
800a7ec: f043 7301 orr.w r3, r3, #33816576 ; 0x2040000
|
|
800a7f0: 4618 mov r0, r3
|
|
800a7f2: f7f9 fdb4 bl 800435e <lwip_htonl>
|
|
800a7f6: 4602 mov r2, r0
|
|
800a7f8: 69fb ldr r3, [r7, #28]
|
|
800a7fa: 601a str r2, [r3, #0]
|
|
opts += 1;
|
|
800a7fc: 69fb ldr r3, [r7, #28]
|
|
800a7fe: 3304 adds r3, #4
|
|
800a800: 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) {
|
|
800a802: 68bb ldr r3, [r7, #8]
|
|
800a804: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
|
|
800a808: 2b00 cmp r3, #0
|
|
800a80a: da02 bge.n 800a812 <tcp_output_segment+0xda>
|
|
pcb->rtime = 0;
|
|
800a80c: 68bb ldr r3, [r7, #8]
|
|
800a80e: 2200 movs r2, #0
|
|
800a810: 861a strh r2, [r3, #48] ; 0x30
|
|
}
|
|
|
|
if (pcb->rttest == 0) {
|
|
800a812: 68bb ldr r3, [r7, #8]
|
|
800a814: 6b5b ldr r3, [r3, #52] ; 0x34
|
|
800a816: 2b00 cmp r3, #0
|
|
800a818: d10c bne.n 800a834 <tcp_output_segment+0xfc>
|
|
pcb->rttest = tcp_ticks;
|
|
800a81a: 4b34 ldr r3, [pc, #208] ; (800a8ec <tcp_output_segment+0x1b4>)
|
|
800a81c: 681a ldr r2, [r3, #0]
|
|
800a81e: 68bb ldr r3, [r7, #8]
|
|
800a820: 635a str r2, [r3, #52] ; 0x34
|
|
pcb->rtseq = lwip_ntohl(seg->tcphdr->seqno);
|
|
800a822: 68fb ldr r3, [r7, #12]
|
|
800a824: 68db ldr r3, [r3, #12]
|
|
800a826: 685b ldr r3, [r3, #4]
|
|
800a828: 4618 mov r0, r3
|
|
800a82a: f7f9 fd98 bl 800435e <lwip_htonl>
|
|
800a82e: 4602 mov r2, r0
|
|
800a830: 68bb ldr r3, [r7, #8]
|
|
800a832: 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);
|
|
800a834: 68fb ldr r3, [r7, #12]
|
|
800a836: 68da ldr r2, [r3, #12]
|
|
800a838: 68fb ldr r3, [r7, #12]
|
|
800a83a: 685b ldr r3, [r3, #4]
|
|
800a83c: 685b ldr r3, [r3, #4]
|
|
800a83e: 1ad3 subs r3, r2, r3
|
|
800a840: 833b strh r3, [r7, #24]
|
|
if (len == 0) {
|
|
/** Exclude retransmitted segments from this count. */
|
|
MIB2_STATS_INC(mib2.tcpoutsegs);
|
|
}
|
|
|
|
seg->p->len -= len;
|
|
800a842: 68fb ldr r3, [r7, #12]
|
|
800a844: 685b ldr r3, [r3, #4]
|
|
800a846: 8959 ldrh r1, [r3, #10]
|
|
800a848: 68fb ldr r3, [r7, #12]
|
|
800a84a: 685b ldr r3, [r3, #4]
|
|
800a84c: 8b3a ldrh r2, [r7, #24]
|
|
800a84e: 1a8a subs r2, r1, r2
|
|
800a850: b292 uxth r2, r2
|
|
800a852: 815a strh r2, [r3, #10]
|
|
seg->p->tot_len -= len;
|
|
800a854: 68fb ldr r3, [r7, #12]
|
|
800a856: 685b ldr r3, [r3, #4]
|
|
800a858: 8919 ldrh r1, [r3, #8]
|
|
800a85a: 68fb ldr r3, [r7, #12]
|
|
800a85c: 685b ldr r3, [r3, #4]
|
|
800a85e: 8b3a ldrh r2, [r7, #24]
|
|
800a860: 1a8a subs r2, r1, r2
|
|
800a862: b292 uxth r2, r2
|
|
800a864: 811a strh r2, [r3, #8]
|
|
|
|
seg->p->payload = seg->tcphdr;
|
|
800a866: 68fb ldr r3, [r7, #12]
|
|
800a868: 685b ldr r3, [r3, #4]
|
|
800a86a: 68fa ldr r2, [r7, #12]
|
|
800a86c: 68d2 ldr r2, [r2, #12]
|
|
800a86e: 605a str r2, [r3, #4]
|
|
|
|
seg->tcphdr->chksum = 0;
|
|
800a870: 68fb ldr r3, [r7, #12]
|
|
800a872: 68db ldr r3, [r3, #12]
|
|
800a874: 2200 movs r2, #0
|
|
800a876: 741a strb r2, [r3, #16]
|
|
800a878: 2200 movs r2, #0
|
|
800a87a: 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));
|
|
800a87c: 68fb ldr r3, [r7, #12]
|
|
800a87e: 68db ldr r3, [r3, #12]
|
|
800a880: f103 0214 add.w r2, r3, #20
|
|
800a884: 68fb ldr r3, [r7, #12]
|
|
800a886: 7a9b ldrb r3, [r3, #10]
|
|
800a888: 009b lsls r3, r3, #2
|
|
800a88a: f003 0304 and.w r3, r3, #4
|
|
800a88e: 4413 add r3, r2
|
|
800a890: 69fa ldr r2, [r7, #28]
|
|
800a892: 429a cmp r2, r3
|
|
800a894: d006 beq.n 800a8a4 <tcp_output_segment+0x16c>
|
|
800a896: 4b10 ldr r3, [pc, #64] ; (800a8d8 <tcp_output_segment+0x1a0>)
|
|
800a898: f240 621c movw r2, #1564 ; 0x61c
|
|
800a89c: 4914 ldr r1, [pc, #80] ; (800a8f0 <tcp_output_segment+0x1b8>)
|
|
800a89e: 4810 ldr r0, [pc, #64] ; (800a8e0 <tcp_output_segment+0x1a8>)
|
|
800a8a0: f005 fe2a bl 80104f8 <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,
|
|
800a8a4: 68fb ldr r3, [r7, #12]
|
|
800a8a6: 6858 ldr r0, [r3, #4]
|
|
800a8a8: 68b9 ldr r1, [r7, #8]
|
|
800a8aa: 68bb ldr r3, [r7, #8]
|
|
800a8ac: 1d1c adds r4, r3, #4
|
|
800a8ae: 68bb ldr r3, [r7, #8]
|
|
800a8b0: 7add ldrb r5, [r3, #11]
|
|
800a8b2: 68bb ldr r3, [r7, #8]
|
|
800a8b4: 7a9b ldrb r3, [r3, #10]
|
|
800a8b6: 687a ldr r2, [r7, #4]
|
|
800a8b8: 9202 str r2, [sp, #8]
|
|
800a8ba: 2206 movs r2, #6
|
|
800a8bc: 9201 str r2, [sp, #4]
|
|
800a8be: 9300 str r3, [sp, #0]
|
|
800a8c0: 462b mov r3, r5
|
|
800a8c2: 4622 mov r2, r4
|
|
800a8c4: f004 fc48 bl 800f158 <ip4_output_if>
|
|
800a8c8: 4603 mov r3, r0
|
|
800a8ca: 75fb strb r3, [r7, #23]
|
|
seg->chksum = SWAP_BYTES_IN_WORD(seg->chksum);
|
|
seg->chksum_swapped = 1;
|
|
}
|
|
#endif
|
|
|
|
return err;
|
|
800a8cc: f997 3017 ldrsb.w r3, [r7, #23]
|
|
}
|
|
800a8d0: 4618 mov r0, r3
|
|
800a8d2: 3720 adds r7, #32
|
|
800a8d4: 46bd mov sp, r7
|
|
800a8d6: bdb0 pop {r4, r5, r7, pc}
|
|
800a8d8: 08016704 .word 0x08016704
|
|
800a8dc: 08016cc8 .word 0x08016cc8
|
|
800a8e0: 08016758 .word 0x08016758
|
|
800a8e4: 08016ce8 .word 0x08016ce8
|
|
800a8e8: 08016d08 .word 0x08016d08
|
|
800a8ec: 20008c00 .word 0x20008c00
|
|
800a8f0: 08016d2c .word 0x08016d2c
|
|
|
|
0800a8f4 <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)
|
|
{
|
|
800a8f4: b5b0 push {r4, r5, r7, lr}
|
|
800a8f6: b084 sub sp, #16
|
|
800a8f8: af00 add r7, sp, #0
|
|
800a8fa: 6078 str r0, [r7, #4]
|
|
struct tcp_seg *seg;
|
|
|
|
LWIP_ASSERT("tcp_rexmit_rto_prepare: invalid pcb", pcb != NULL);
|
|
800a8fc: 687b ldr r3, [r7, #4]
|
|
800a8fe: 2b00 cmp r3, #0
|
|
800a900: d106 bne.n 800a910 <tcp_rexmit_rto_prepare+0x1c>
|
|
800a902: 4b31 ldr r3, [pc, #196] ; (800a9c8 <tcp_rexmit_rto_prepare+0xd4>)
|
|
800a904: f240 6263 movw r2, #1635 ; 0x663
|
|
800a908: 4930 ldr r1, [pc, #192] ; (800a9cc <tcp_rexmit_rto_prepare+0xd8>)
|
|
800a90a: 4831 ldr r0, [pc, #196] ; (800a9d0 <tcp_rexmit_rto_prepare+0xdc>)
|
|
800a90c: f005 fdf4 bl 80104f8 <printf>
|
|
|
|
if (pcb->unacked == NULL) {
|
|
800a910: 687b ldr r3, [r7, #4]
|
|
800a912: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
800a914: 2b00 cmp r3, #0
|
|
800a916: d102 bne.n 800a91e <tcp_rexmit_rto_prepare+0x2a>
|
|
return ERR_VAL;
|
|
800a918: f06f 0305 mvn.w r3, #5
|
|
800a91c: e050 b.n 800a9c0 <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) {
|
|
800a91e: 687b ldr r3, [r7, #4]
|
|
800a920: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
800a922: 60fb str r3, [r7, #12]
|
|
800a924: e00b b.n 800a93e <tcp_rexmit_rto_prepare+0x4a>
|
|
if (tcp_output_segment_busy(seg)) {
|
|
800a926: 68f8 ldr r0, [r7, #12]
|
|
800a928: f7ff fee6 bl 800a6f8 <tcp_output_segment_busy>
|
|
800a92c: 4603 mov r3, r0
|
|
800a92e: 2b00 cmp r3, #0
|
|
800a930: d002 beq.n 800a938 <tcp_rexmit_rto_prepare+0x44>
|
|
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n"));
|
|
return ERR_VAL;
|
|
800a932: f06f 0305 mvn.w r3, #5
|
|
800a936: e043 b.n 800a9c0 <tcp_rexmit_rto_prepare+0xcc>
|
|
for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) {
|
|
800a938: 68fb ldr r3, [r7, #12]
|
|
800a93a: 681b ldr r3, [r3, #0]
|
|
800a93c: 60fb str r3, [r7, #12]
|
|
800a93e: 68fb ldr r3, [r7, #12]
|
|
800a940: 681b ldr r3, [r3, #0]
|
|
800a942: 2b00 cmp r3, #0
|
|
800a944: d1ef bne.n 800a926 <tcp_rexmit_rto_prepare+0x32>
|
|
}
|
|
}
|
|
if (tcp_output_segment_busy(seg)) {
|
|
800a946: 68f8 ldr r0, [r7, #12]
|
|
800a948: f7ff fed6 bl 800a6f8 <tcp_output_segment_busy>
|
|
800a94c: 4603 mov r3, r0
|
|
800a94e: 2b00 cmp r3, #0
|
|
800a950: d002 beq.n 800a958 <tcp_rexmit_rto_prepare+0x64>
|
|
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n"));
|
|
return ERR_VAL;
|
|
800a952: f06f 0305 mvn.w r3, #5
|
|
800a956: e033 b.n 800a9c0 <tcp_rexmit_rto_prepare+0xcc>
|
|
}
|
|
/* concatenate unsent queue after unacked queue */
|
|
seg->next = pcb->unsent;
|
|
800a958: 687b ldr r3, [r7, #4]
|
|
800a95a: 6eda ldr r2, [r3, #108] ; 0x6c
|
|
800a95c: 68fb ldr r3, [r7, #12]
|
|
800a95e: 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;
|
|
800a960: 687b ldr r3, [r7, #4]
|
|
800a962: 6f1a ldr r2, [r3, #112] ; 0x70
|
|
800a964: 687b ldr r3, [r7, #4]
|
|
800a966: 66da str r2, [r3, #108] ; 0x6c
|
|
/* unacked queue is now empty */
|
|
pcb->unacked = NULL;
|
|
800a968: 687b ldr r3, [r7, #4]
|
|
800a96a: 2200 movs r2, #0
|
|
800a96c: 671a str r2, [r3, #112] ; 0x70
|
|
|
|
/* Mark RTO in-progress */
|
|
tcp_set_flags(pcb, TF_RTO);
|
|
800a96e: 687b ldr r3, [r7, #4]
|
|
800a970: 8b5b ldrh r3, [r3, #26]
|
|
800a972: f443 6300 orr.w r3, r3, #2048 ; 0x800
|
|
800a976: b29a uxth r2, r3
|
|
800a978: 687b ldr r3, [r7, #4]
|
|
800a97a: 835a strh r2, [r3, #26]
|
|
/* Record the next byte following retransmit */
|
|
pcb->rto_end = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
|
|
800a97c: 68fb ldr r3, [r7, #12]
|
|
800a97e: 68db ldr r3, [r3, #12]
|
|
800a980: 685b ldr r3, [r3, #4]
|
|
800a982: 4618 mov r0, r3
|
|
800a984: f7f9 fceb bl 800435e <lwip_htonl>
|
|
800a988: 4604 mov r4, r0
|
|
800a98a: 68fb ldr r3, [r7, #12]
|
|
800a98c: 891b ldrh r3, [r3, #8]
|
|
800a98e: 461d mov r5, r3
|
|
800a990: 68fb ldr r3, [r7, #12]
|
|
800a992: 68db ldr r3, [r3, #12]
|
|
800a994: 899b ldrh r3, [r3, #12]
|
|
800a996: b29b uxth r3, r3
|
|
800a998: 4618 mov r0, r3
|
|
800a99a: f7f9 fccb bl 8004334 <lwip_htons>
|
|
800a99e: 4603 mov r3, r0
|
|
800a9a0: b2db uxtb r3, r3
|
|
800a9a2: f003 0303 and.w r3, r3, #3
|
|
800a9a6: 2b00 cmp r3, #0
|
|
800a9a8: d001 beq.n 800a9ae <tcp_rexmit_rto_prepare+0xba>
|
|
800a9aa: 2301 movs r3, #1
|
|
800a9ac: e000 b.n 800a9b0 <tcp_rexmit_rto_prepare+0xbc>
|
|
800a9ae: 2300 movs r3, #0
|
|
800a9b0: 442b add r3, r5
|
|
800a9b2: 18e2 adds r2, r4, r3
|
|
800a9b4: 687b ldr r3, [r7, #4]
|
|
800a9b6: 64da str r2, [r3, #76] ; 0x4c
|
|
/* Don't take any RTT measurements after retransmitting. */
|
|
pcb->rttest = 0;
|
|
800a9b8: 687b ldr r3, [r7, #4]
|
|
800a9ba: 2200 movs r2, #0
|
|
800a9bc: 635a str r2, [r3, #52] ; 0x34
|
|
|
|
return ERR_OK;
|
|
800a9be: 2300 movs r3, #0
|
|
}
|
|
800a9c0: 4618 mov r0, r3
|
|
800a9c2: 3710 adds r7, #16
|
|
800a9c4: 46bd mov sp, r7
|
|
800a9c6: bdb0 pop {r4, r5, r7, pc}
|
|
800a9c8: 08016704 .word 0x08016704
|
|
800a9cc: 08016d40 .word 0x08016d40
|
|
800a9d0: 08016758 .word 0x08016758
|
|
|
|
0800a9d4 <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)
|
|
{
|
|
800a9d4: b580 push {r7, lr}
|
|
800a9d6: b082 sub sp, #8
|
|
800a9d8: af00 add r7, sp, #0
|
|
800a9da: 6078 str r0, [r7, #4]
|
|
LWIP_ASSERT("tcp_rexmit_rto_commit: invalid pcb", pcb != NULL);
|
|
800a9dc: 687b ldr r3, [r7, #4]
|
|
800a9de: 2b00 cmp r3, #0
|
|
800a9e0: d106 bne.n 800a9f0 <tcp_rexmit_rto_commit+0x1c>
|
|
800a9e2: 4b0d ldr r3, [pc, #52] ; (800aa18 <tcp_rexmit_rto_commit+0x44>)
|
|
800a9e4: f44f 62d3 mov.w r2, #1688 ; 0x698
|
|
800a9e8: 490c ldr r1, [pc, #48] ; (800aa1c <tcp_rexmit_rto_commit+0x48>)
|
|
800a9ea: 480d ldr r0, [pc, #52] ; (800aa20 <tcp_rexmit_rto_commit+0x4c>)
|
|
800a9ec: f005 fd84 bl 80104f8 <printf>
|
|
|
|
/* increment number of retransmissions */
|
|
if (pcb->nrtx < 0xFF) {
|
|
800a9f0: 687b ldr r3, [r7, #4]
|
|
800a9f2: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
|
|
800a9f6: 2bff cmp r3, #255 ; 0xff
|
|
800a9f8: d007 beq.n 800aa0a <tcp_rexmit_rto_commit+0x36>
|
|
++pcb->nrtx;
|
|
800a9fa: 687b ldr r3, [r7, #4]
|
|
800a9fc: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
|
|
800aa00: 3301 adds r3, #1
|
|
800aa02: b2da uxtb r2, r3
|
|
800aa04: 687b ldr r3, [r7, #4]
|
|
800aa06: f883 2042 strb.w r2, [r3, #66] ; 0x42
|
|
}
|
|
/* Do the actual retransmission */
|
|
tcp_output(pcb);
|
|
800aa0a: 6878 ldr r0, [r7, #4]
|
|
800aa0c: f7ff fc80 bl 800a310 <tcp_output>
|
|
}
|
|
800aa10: bf00 nop
|
|
800aa12: 3708 adds r7, #8
|
|
800aa14: 46bd mov sp, r7
|
|
800aa16: bd80 pop {r7, pc}
|
|
800aa18: 08016704 .word 0x08016704
|
|
800aa1c: 08016d64 .word 0x08016d64
|
|
800aa20: 08016758 .word 0x08016758
|
|
|
|
0800aa24 <tcp_rexmit_rto>:
|
|
*
|
|
* @param pcb the tcp_pcb for which to re-enqueue all unacked segments
|
|
*/
|
|
void
|
|
tcp_rexmit_rto(struct tcp_pcb *pcb)
|
|
{
|
|
800aa24: b580 push {r7, lr}
|
|
800aa26: b082 sub sp, #8
|
|
800aa28: af00 add r7, sp, #0
|
|
800aa2a: 6078 str r0, [r7, #4]
|
|
LWIP_ASSERT("tcp_rexmit_rto: invalid pcb", pcb != NULL);
|
|
800aa2c: 687b ldr r3, [r7, #4]
|
|
800aa2e: 2b00 cmp r3, #0
|
|
800aa30: d106 bne.n 800aa40 <tcp_rexmit_rto+0x1c>
|
|
800aa32: 4b0a ldr r3, [pc, #40] ; (800aa5c <tcp_rexmit_rto+0x38>)
|
|
800aa34: f240 62ad movw r2, #1709 ; 0x6ad
|
|
800aa38: 4909 ldr r1, [pc, #36] ; (800aa60 <tcp_rexmit_rto+0x3c>)
|
|
800aa3a: 480a ldr r0, [pc, #40] ; (800aa64 <tcp_rexmit_rto+0x40>)
|
|
800aa3c: f005 fd5c bl 80104f8 <printf>
|
|
|
|
if (tcp_rexmit_rto_prepare(pcb) == ERR_OK) {
|
|
800aa40: 6878 ldr r0, [r7, #4]
|
|
800aa42: f7ff ff57 bl 800a8f4 <tcp_rexmit_rto_prepare>
|
|
800aa46: 4603 mov r3, r0
|
|
800aa48: 2b00 cmp r3, #0
|
|
800aa4a: d102 bne.n 800aa52 <tcp_rexmit_rto+0x2e>
|
|
tcp_rexmit_rto_commit(pcb);
|
|
800aa4c: 6878 ldr r0, [r7, #4]
|
|
800aa4e: f7ff ffc1 bl 800a9d4 <tcp_rexmit_rto_commit>
|
|
}
|
|
}
|
|
800aa52: bf00 nop
|
|
800aa54: 3708 adds r7, #8
|
|
800aa56: 46bd mov sp, r7
|
|
800aa58: bd80 pop {r7, pc}
|
|
800aa5a: bf00 nop
|
|
800aa5c: 08016704 .word 0x08016704
|
|
800aa60: 08016d88 .word 0x08016d88
|
|
800aa64: 08016758 .word 0x08016758
|
|
|
|
0800aa68 <tcp_rexmit>:
|
|
*
|
|
* @param pcb the tcp_pcb for which to retransmit the first unacked segment
|
|
*/
|
|
err_t
|
|
tcp_rexmit(struct tcp_pcb *pcb)
|
|
{
|
|
800aa68: b590 push {r4, r7, lr}
|
|
800aa6a: b085 sub sp, #20
|
|
800aa6c: af00 add r7, sp, #0
|
|
800aa6e: 6078 str r0, [r7, #4]
|
|
struct tcp_seg *seg;
|
|
struct tcp_seg **cur_seg;
|
|
|
|
LWIP_ASSERT("tcp_rexmit: invalid pcb", pcb != NULL);
|
|
800aa70: 687b ldr r3, [r7, #4]
|
|
800aa72: 2b00 cmp r3, #0
|
|
800aa74: d106 bne.n 800aa84 <tcp_rexmit+0x1c>
|
|
800aa76: 4b2f ldr r3, [pc, #188] ; (800ab34 <tcp_rexmit+0xcc>)
|
|
800aa78: f240 62c1 movw r2, #1729 ; 0x6c1
|
|
800aa7c: 492e ldr r1, [pc, #184] ; (800ab38 <tcp_rexmit+0xd0>)
|
|
800aa7e: 482f ldr r0, [pc, #188] ; (800ab3c <tcp_rexmit+0xd4>)
|
|
800aa80: f005 fd3a bl 80104f8 <printf>
|
|
|
|
if (pcb->unacked == NULL) {
|
|
800aa84: 687b ldr r3, [r7, #4]
|
|
800aa86: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
800aa88: 2b00 cmp r3, #0
|
|
800aa8a: d102 bne.n 800aa92 <tcp_rexmit+0x2a>
|
|
return ERR_VAL;
|
|
800aa8c: f06f 0305 mvn.w r3, #5
|
|
800aa90: e04c b.n 800ab2c <tcp_rexmit+0xc4>
|
|
}
|
|
|
|
seg = pcb->unacked;
|
|
800aa92: 687b ldr r3, [r7, #4]
|
|
800aa94: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
800aa96: 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)) {
|
|
800aa98: 68b8 ldr r0, [r7, #8]
|
|
800aa9a: f7ff fe2d bl 800a6f8 <tcp_output_segment_busy>
|
|
800aa9e: 4603 mov r3, r0
|
|
800aaa0: 2b00 cmp r3, #0
|
|
800aaa2: d002 beq.n 800aaaa <tcp_rexmit+0x42>
|
|
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit busy\n"));
|
|
return ERR_VAL;
|
|
800aaa4: f06f 0305 mvn.w r3, #5
|
|
800aaa8: e040 b.n 800ab2c <tcp_rexmit+0xc4>
|
|
}
|
|
|
|
/* Move the first unacked segment to the unsent queue */
|
|
/* Keep the unsent queue sorted. */
|
|
pcb->unacked = seg->next;
|
|
800aaaa: 68bb ldr r3, [r7, #8]
|
|
800aaac: 681a ldr r2, [r3, #0]
|
|
800aaae: 687b ldr r3, [r7, #4]
|
|
800aab0: 671a str r2, [r3, #112] ; 0x70
|
|
|
|
cur_seg = &(pcb->unsent);
|
|
800aab2: 687b ldr r3, [r7, #4]
|
|
800aab4: 336c adds r3, #108 ; 0x6c
|
|
800aab6: 60fb str r3, [r7, #12]
|
|
while (*cur_seg &&
|
|
800aab8: e002 b.n 800aac0 <tcp_rexmit+0x58>
|
|
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
|
|
cur_seg = &((*cur_seg)->next );
|
|
800aaba: 68fb ldr r3, [r7, #12]
|
|
800aabc: 681b ldr r3, [r3, #0]
|
|
800aabe: 60fb str r3, [r7, #12]
|
|
while (*cur_seg &&
|
|
800aac0: 68fb ldr r3, [r7, #12]
|
|
800aac2: 681b ldr r3, [r3, #0]
|
|
800aac4: 2b00 cmp r3, #0
|
|
800aac6: d011 beq.n 800aaec <tcp_rexmit+0x84>
|
|
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
|
|
800aac8: 68fb ldr r3, [r7, #12]
|
|
800aaca: 681b ldr r3, [r3, #0]
|
|
800aacc: 68db ldr r3, [r3, #12]
|
|
800aace: 685b ldr r3, [r3, #4]
|
|
800aad0: 4618 mov r0, r3
|
|
800aad2: f7f9 fc44 bl 800435e <lwip_htonl>
|
|
800aad6: 4604 mov r4, r0
|
|
800aad8: 68bb ldr r3, [r7, #8]
|
|
800aada: 68db ldr r3, [r3, #12]
|
|
800aadc: 685b ldr r3, [r3, #4]
|
|
800aade: 4618 mov r0, r3
|
|
800aae0: f7f9 fc3d bl 800435e <lwip_htonl>
|
|
800aae4: 4603 mov r3, r0
|
|
800aae6: 1ae3 subs r3, r4, r3
|
|
while (*cur_seg &&
|
|
800aae8: 2b00 cmp r3, #0
|
|
800aaea: dbe6 blt.n 800aaba <tcp_rexmit+0x52>
|
|
}
|
|
seg->next = *cur_seg;
|
|
800aaec: 68fb ldr r3, [r7, #12]
|
|
800aaee: 681a ldr r2, [r3, #0]
|
|
800aaf0: 68bb ldr r3, [r7, #8]
|
|
800aaf2: 601a str r2, [r3, #0]
|
|
*cur_seg = seg;
|
|
800aaf4: 68fb ldr r3, [r7, #12]
|
|
800aaf6: 68ba ldr r2, [r7, #8]
|
|
800aaf8: 601a str r2, [r3, #0]
|
|
#if TCP_OVERSIZE
|
|
if (seg->next == NULL) {
|
|
800aafa: 68bb ldr r3, [r7, #8]
|
|
800aafc: 681b ldr r3, [r3, #0]
|
|
800aafe: 2b00 cmp r3, #0
|
|
800ab00: d103 bne.n 800ab0a <tcp_rexmit+0xa2>
|
|
/* the retransmitted segment is last in unsent, so reset unsent_oversize */
|
|
pcb->unsent_oversize = 0;
|
|
800ab02: 687b ldr r3, [r7, #4]
|
|
800ab04: 2200 movs r2, #0
|
|
800ab06: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
|
|
}
|
|
#endif /* TCP_OVERSIZE */
|
|
|
|
if (pcb->nrtx < 0xFF) {
|
|
800ab0a: 687b ldr r3, [r7, #4]
|
|
800ab0c: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
|
|
800ab10: 2bff cmp r3, #255 ; 0xff
|
|
800ab12: d007 beq.n 800ab24 <tcp_rexmit+0xbc>
|
|
++pcb->nrtx;
|
|
800ab14: 687b ldr r3, [r7, #4]
|
|
800ab16: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
|
|
800ab1a: 3301 adds r3, #1
|
|
800ab1c: b2da uxtb r2, r3
|
|
800ab1e: 687b ldr r3, [r7, #4]
|
|
800ab20: f883 2042 strb.w r2, [r3, #66] ; 0x42
|
|
}
|
|
|
|
/* Don't take any rtt measurements after retransmitting. */
|
|
pcb->rttest = 0;
|
|
800ab24: 687b ldr r3, [r7, #4]
|
|
800ab26: 2200 movs r2, #0
|
|
800ab28: 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;
|
|
800ab2a: 2300 movs r3, #0
|
|
}
|
|
800ab2c: 4618 mov r0, r3
|
|
800ab2e: 3714 adds r7, #20
|
|
800ab30: 46bd mov sp, r7
|
|
800ab32: bd90 pop {r4, r7, pc}
|
|
800ab34: 08016704 .word 0x08016704
|
|
800ab38: 08016da4 .word 0x08016da4
|
|
800ab3c: 08016758 .word 0x08016758
|
|
|
|
0800ab40 <tcp_rexmit_fast>:
|
|
*
|
|
* @param pcb the tcp_pcb for which to retransmit the first unacked segment
|
|
*/
|
|
void
|
|
tcp_rexmit_fast(struct tcp_pcb *pcb)
|
|
{
|
|
800ab40: b580 push {r7, lr}
|
|
800ab42: b082 sub sp, #8
|
|
800ab44: af00 add r7, sp, #0
|
|
800ab46: 6078 str r0, [r7, #4]
|
|
LWIP_ASSERT("tcp_rexmit_fast: invalid pcb", pcb != NULL);
|
|
800ab48: 687b ldr r3, [r7, #4]
|
|
800ab4a: 2b00 cmp r3, #0
|
|
800ab4c: d106 bne.n 800ab5c <tcp_rexmit_fast+0x1c>
|
|
800ab4e: 4b2a ldr r3, [pc, #168] ; (800abf8 <tcp_rexmit_fast+0xb8>)
|
|
800ab50: f240 62f9 movw r2, #1785 ; 0x6f9
|
|
800ab54: 4929 ldr r1, [pc, #164] ; (800abfc <tcp_rexmit_fast+0xbc>)
|
|
800ab56: 482a ldr r0, [pc, #168] ; (800ac00 <tcp_rexmit_fast+0xc0>)
|
|
800ab58: f005 fcce bl 80104f8 <printf>
|
|
|
|
if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) {
|
|
800ab5c: 687b ldr r3, [r7, #4]
|
|
800ab5e: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
800ab60: 2b00 cmp r3, #0
|
|
800ab62: d044 beq.n 800abee <tcp_rexmit_fast+0xae>
|
|
800ab64: 687b ldr r3, [r7, #4]
|
|
800ab66: 8b5b ldrh r3, [r3, #26]
|
|
800ab68: f003 0304 and.w r3, r3, #4
|
|
800ab6c: 2b00 cmp r3, #0
|
|
800ab6e: d13e bne.n 800abee <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) {
|
|
800ab70: 6878 ldr r0, [r7, #4]
|
|
800ab72: f7ff ff79 bl 800aa68 <tcp_rexmit>
|
|
800ab76: 4603 mov r3, r0
|
|
800ab78: 2b00 cmp r3, #0
|
|
800ab7a: d138 bne.n 800abee <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;
|
|
800ab7c: 687b ldr r3, [r7, #4]
|
|
800ab7e: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
|
|
800ab82: 687b ldr r3, [r7, #4]
|
|
800ab84: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
|
|
800ab88: 4293 cmp r3, r2
|
|
800ab8a: bf28 it cs
|
|
800ab8c: 4613 movcs r3, r2
|
|
800ab8e: b29b uxth r3, r3
|
|
800ab90: 0fda lsrs r2, r3, #31
|
|
800ab92: 4413 add r3, r2
|
|
800ab94: 105b asrs r3, r3, #1
|
|
800ab96: b29a uxth r2, r3
|
|
800ab98: 687b ldr r3, [r7, #4]
|
|
800ab9a: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
|
|
|
|
/* The minimum value for ssthresh should be 2 MSS */
|
|
if (pcb->ssthresh < (2U * pcb->mss)) {
|
|
800ab9e: 687b ldr r3, [r7, #4]
|
|
800aba0: f8b3 304a ldrh.w r3, [r3, #74] ; 0x4a
|
|
800aba4: 461a mov r2, r3
|
|
800aba6: 687b ldr r3, [r7, #4]
|
|
800aba8: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
800abaa: 005b lsls r3, r3, #1
|
|
800abac: 429a cmp r2, r3
|
|
800abae: d206 bcs.n 800abbe <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;
|
|
800abb0: 687b ldr r3, [r7, #4]
|
|
800abb2: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
800abb4: 005b lsls r3, r3, #1
|
|
800abb6: b29a uxth r2, r3
|
|
800abb8: 687b ldr r3, [r7, #4]
|
|
800abba: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
|
|
}
|
|
|
|
pcb->cwnd = pcb->ssthresh + 3 * pcb->mss;
|
|
800abbe: 687b ldr r3, [r7, #4]
|
|
800abc0: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a
|
|
800abc4: 687b ldr r3, [r7, #4]
|
|
800abc6: 8e5b ldrh r3, [r3, #50] ; 0x32
|
|
800abc8: 4619 mov r1, r3
|
|
800abca: 0049 lsls r1, r1, #1
|
|
800abcc: 440b add r3, r1
|
|
800abce: b29b uxth r3, r3
|
|
800abd0: 4413 add r3, r2
|
|
800abd2: b29a uxth r2, r3
|
|
800abd4: 687b ldr r3, [r7, #4]
|
|
800abd6: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
|
|
tcp_set_flags(pcb, TF_INFR);
|
|
800abda: 687b ldr r3, [r7, #4]
|
|
800abdc: 8b5b ldrh r3, [r3, #26]
|
|
800abde: f043 0304 orr.w r3, r3, #4
|
|
800abe2: b29a uxth r2, r3
|
|
800abe4: 687b ldr r3, [r7, #4]
|
|
800abe6: 835a strh r2, [r3, #26]
|
|
|
|
/* Reset the retransmission timer to prevent immediate rto retransmissions */
|
|
pcb->rtime = 0;
|
|
800abe8: 687b ldr r3, [r7, #4]
|
|
800abea: 2200 movs r2, #0
|
|
800abec: 861a strh r2, [r3, #48] ; 0x30
|
|
}
|
|
}
|
|
}
|
|
800abee: bf00 nop
|
|
800abf0: 3708 adds r7, #8
|
|
800abf2: 46bd mov sp, r7
|
|
800abf4: bd80 pop {r7, pc}
|
|
800abf6: bf00 nop
|
|
800abf8: 08016704 .word 0x08016704
|
|
800abfc: 08016dbc .word 0x08016dbc
|
|
800ac00: 08016758 .word 0x08016758
|
|
|
|
0800ac04 <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)
|
|
{
|
|
800ac04: b580 push {r7, lr}
|
|
800ac06: b086 sub sp, #24
|
|
800ac08: af00 add r7, sp, #0
|
|
800ac0a: 60f8 str r0, [r7, #12]
|
|
800ac0c: 607b str r3, [r7, #4]
|
|
800ac0e: 460b mov r3, r1
|
|
800ac10: 817b strh r3, [r7, #10]
|
|
800ac12: 4613 mov r3, r2
|
|
800ac14: 813b strh r3, [r7, #8]
|
|
struct tcp_hdr *tcphdr;
|
|
struct pbuf *p;
|
|
|
|
p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM);
|
|
800ac16: 897a ldrh r2, [r7, #10]
|
|
800ac18: 893b ldrh r3, [r7, #8]
|
|
800ac1a: 4413 add r3, r2
|
|
800ac1c: b29b uxth r3, r3
|
|
800ac1e: 3314 adds r3, #20
|
|
800ac20: b29b uxth r3, r3
|
|
800ac22: f44f 7220 mov.w r2, #640 ; 0x280
|
|
800ac26: 4619 mov r1, r3
|
|
800ac28: 2022 movs r0, #34 ; 0x22
|
|
800ac2a: f7fa fc09 bl 8005440 <pbuf_alloc>
|
|
800ac2e: 6178 str r0, [r7, #20]
|
|
if (p != NULL) {
|
|
800ac30: 697b ldr r3, [r7, #20]
|
|
800ac32: 2b00 cmp r3, #0
|
|
800ac34: d04d beq.n 800acd2 <tcp_output_alloc_header_common+0xce>
|
|
LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr",
|
|
800ac36: 897b ldrh r3, [r7, #10]
|
|
800ac38: 3313 adds r3, #19
|
|
800ac3a: 697a ldr r2, [r7, #20]
|
|
800ac3c: 8952 ldrh r2, [r2, #10]
|
|
800ac3e: 4293 cmp r3, r2
|
|
800ac40: db06 blt.n 800ac50 <tcp_output_alloc_header_common+0x4c>
|
|
800ac42: 4b26 ldr r3, [pc, #152] ; (800acdc <tcp_output_alloc_header_common+0xd8>)
|
|
800ac44: f240 7223 movw r2, #1827 ; 0x723
|
|
800ac48: 4925 ldr r1, [pc, #148] ; (800ace0 <tcp_output_alloc_header_common+0xdc>)
|
|
800ac4a: 4826 ldr r0, [pc, #152] ; (800ace4 <tcp_output_alloc_header_common+0xe0>)
|
|
800ac4c: f005 fc54 bl 80104f8 <printf>
|
|
(p->len >= TCP_HLEN + optlen));
|
|
tcphdr = (struct tcp_hdr *)p->payload;
|
|
800ac50: 697b ldr r3, [r7, #20]
|
|
800ac52: 685b ldr r3, [r3, #4]
|
|
800ac54: 613b str r3, [r7, #16]
|
|
tcphdr->src = lwip_htons(src_port);
|
|
800ac56: 8c3b ldrh r3, [r7, #32]
|
|
800ac58: 4618 mov r0, r3
|
|
800ac5a: f7f9 fb6b bl 8004334 <lwip_htons>
|
|
800ac5e: 4603 mov r3, r0
|
|
800ac60: 461a mov r2, r3
|
|
800ac62: 693b ldr r3, [r7, #16]
|
|
800ac64: 801a strh r2, [r3, #0]
|
|
tcphdr->dest = lwip_htons(dst_port);
|
|
800ac66: 8cbb ldrh r3, [r7, #36] ; 0x24
|
|
800ac68: 4618 mov r0, r3
|
|
800ac6a: f7f9 fb63 bl 8004334 <lwip_htons>
|
|
800ac6e: 4603 mov r3, r0
|
|
800ac70: 461a mov r2, r3
|
|
800ac72: 693b ldr r3, [r7, #16]
|
|
800ac74: 805a strh r2, [r3, #2]
|
|
tcphdr->seqno = seqno_be;
|
|
800ac76: 693b ldr r3, [r7, #16]
|
|
800ac78: 687a ldr r2, [r7, #4]
|
|
800ac7a: 605a str r2, [r3, #4]
|
|
tcphdr->ackno = lwip_htonl(ackno);
|
|
800ac7c: 68f8 ldr r0, [r7, #12]
|
|
800ac7e: f7f9 fb6e bl 800435e <lwip_htonl>
|
|
800ac82: 4602 mov r2, r0
|
|
800ac84: 693b ldr r3, [r7, #16]
|
|
800ac86: 609a str r2, [r3, #8]
|
|
TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), flags);
|
|
800ac88: 897b ldrh r3, [r7, #10]
|
|
800ac8a: 089b lsrs r3, r3, #2
|
|
800ac8c: b29b uxth r3, r3
|
|
800ac8e: 3305 adds r3, #5
|
|
800ac90: b29b uxth r3, r3
|
|
800ac92: 031b lsls r3, r3, #12
|
|
800ac94: b29a uxth r2, r3
|
|
800ac96: f897 3028 ldrb.w r3, [r7, #40] ; 0x28
|
|
800ac9a: b29b uxth r3, r3
|
|
800ac9c: 4313 orrs r3, r2
|
|
800ac9e: b29b uxth r3, r3
|
|
800aca0: 4618 mov r0, r3
|
|
800aca2: f7f9 fb47 bl 8004334 <lwip_htons>
|
|
800aca6: 4603 mov r3, r0
|
|
800aca8: 461a mov r2, r3
|
|
800acaa: 693b ldr r3, [r7, #16]
|
|
800acac: 819a strh r2, [r3, #12]
|
|
tcphdr->wnd = lwip_htons(wnd);
|
|
800acae: 8dbb ldrh r3, [r7, #44] ; 0x2c
|
|
800acb0: 4618 mov r0, r3
|
|
800acb2: f7f9 fb3f bl 8004334 <lwip_htons>
|
|
800acb6: 4603 mov r3, r0
|
|
800acb8: 461a mov r2, r3
|
|
800acba: 693b ldr r3, [r7, #16]
|
|
800acbc: 81da strh r2, [r3, #14]
|
|
tcphdr->chksum = 0;
|
|
800acbe: 693b ldr r3, [r7, #16]
|
|
800acc0: 2200 movs r2, #0
|
|
800acc2: 741a strb r2, [r3, #16]
|
|
800acc4: 2200 movs r2, #0
|
|
800acc6: 745a strb r2, [r3, #17]
|
|
tcphdr->urgp = 0;
|
|
800acc8: 693b ldr r3, [r7, #16]
|
|
800acca: 2200 movs r2, #0
|
|
800accc: 749a strb r2, [r3, #18]
|
|
800acce: 2200 movs r2, #0
|
|
800acd0: 74da strb r2, [r3, #19]
|
|
}
|
|
return p;
|
|
800acd2: 697b ldr r3, [r7, #20]
|
|
}
|
|
800acd4: 4618 mov r0, r3
|
|
800acd6: 3718 adds r7, #24
|
|
800acd8: 46bd mov sp, r7
|
|
800acda: bd80 pop {r7, pc}
|
|
800acdc: 08016704 .word 0x08016704
|
|
800ace0: 08016ddc .word 0x08016ddc
|
|
800ace4: 08016758 .word 0x08016758
|
|
|
|
0800ace8 <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 */)
|
|
{
|
|
800ace8: b5b0 push {r4, r5, r7, lr}
|
|
800acea: b08a sub sp, #40 ; 0x28
|
|
800acec: af04 add r7, sp, #16
|
|
800acee: 60f8 str r0, [r7, #12]
|
|
800acf0: 607b str r3, [r7, #4]
|
|
800acf2: 460b mov r3, r1
|
|
800acf4: 817b strh r3, [r7, #10]
|
|
800acf6: 4613 mov r3, r2
|
|
800acf8: 813b strh r3, [r7, #8]
|
|
struct pbuf *p;
|
|
|
|
LWIP_ASSERT("tcp_output_alloc_header: invalid pcb", pcb != NULL);
|
|
800acfa: 68fb ldr r3, [r7, #12]
|
|
800acfc: 2b00 cmp r3, #0
|
|
800acfe: d106 bne.n 800ad0e <tcp_output_alloc_header+0x26>
|
|
800ad00: 4b15 ldr r3, [pc, #84] ; (800ad58 <tcp_output_alloc_header+0x70>)
|
|
800ad02: f240 7242 movw r2, #1858 ; 0x742
|
|
800ad06: 4915 ldr r1, [pc, #84] ; (800ad5c <tcp_output_alloc_header+0x74>)
|
|
800ad08: 4815 ldr r0, [pc, #84] ; (800ad60 <tcp_output_alloc_header+0x78>)
|
|
800ad0a: f005 fbf5 bl 80104f8 <printf>
|
|
|
|
p = tcp_output_alloc_header_common(pcb->rcv_nxt, optlen, datalen,
|
|
800ad0e: 68fb ldr r3, [r7, #12]
|
|
800ad10: 6a58 ldr r0, [r3, #36] ; 0x24
|
|
800ad12: 68fb ldr r3, [r7, #12]
|
|
800ad14: 8adb ldrh r3, [r3, #22]
|
|
800ad16: 68fa ldr r2, [r7, #12]
|
|
800ad18: 8b12 ldrh r2, [r2, #24]
|
|
800ad1a: 68f9 ldr r1, [r7, #12]
|
|
800ad1c: 8d49 ldrh r1, [r1, #42] ; 0x2a
|
|
800ad1e: 893d ldrh r5, [r7, #8]
|
|
800ad20: 897c ldrh r4, [r7, #10]
|
|
800ad22: 9103 str r1, [sp, #12]
|
|
800ad24: 2110 movs r1, #16
|
|
800ad26: 9102 str r1, [sp, #8]
|
|
800ad28: 9201 str r2, [sp, #4]
|
|
800ad2a: 9300 str r3, [sp, #0]
|
|
800ad2c: 687b ldr r3, [r7, #4]
|
|
800ad2e: 462a mov r2, r5
|
|
800ad30: 4621 mov r1, r4
|
|
800ad32: f7ff ff67 bl 800ac04 <tcp_output_alloc_header_common>
|
|
800ad36: 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) {
|
|
800ad38: 697b ldr r3, [r7, #20]
|
|
800ad3a: 2b00 cmp r3, #0
|
|
800ad3c: d006 beq.n 800ad4c <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;
|
|
800ad3e: 68fb ldr r3, [r7, #12]
|
|
800ad40: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800ad42: 68fa ldr r2, [r7, #12]
|
|
800ad44: 8d52 ldrh r2, [r2, #42] ; 0x2a
|
|
800ad46: 441a add r2, r3
|
|
800ad48: 68fb ldr r3, [r7, #12]
|
|
800ad4a: 62da str r2, [r3, #44] ; 0x2c
|
|
}
|
|
return p;
|
|
800ad4c: 697b ldr r3, [r7, #20]
|
|
}
|
|
800ad4e: 4618 mov r0, r3
|
|
800ad50: 3718 adds r7, #24
|
|
800ad52: 46bd mov sp, r7
|
|
800ad54: bdb0 pop {r4, r5, r7, pc}
|
|
800ad56: bf00 nop
|
|
800ad58: 08016704 .word 0x08016704
|
|
800ad5c: 08016e0c .word 0x08016e0c
|
|
800ad60: 08016758 .word 0x08016758
|
|
|
|
0800ad64 <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)
|
|
{
|
|
800ad64: b580 push {r7, lr}
|
|
800ad66: b088 sub sp, #32
|
|
800ad68: af00 add r7, sp, #0
|
|
800ad6a: 60f8 str r0, [r7, #12]
|
|
800ad6c: 60b9 str r1, [r7, #8]
|
|
800ad6e: 4611 mov r1, r2
|
|
800ad70: 461a mov r2, r3
|
|
800ad72: 460b mov r3, r1
|
|
800ad74: 71fb strb r3, [r7, #7]
|
|
800ad76: 4613 mov r3, r2
|
|
800ad78: 71bb strb r3, [r7, #6]
|
|
struct tcp_hdr *tcphdr;
|
|
u32_t *opts;
|
|
u16_t sacks_len = 0;
|
|
800ad7a: 2300 movs r3, #0
|
|
800ad7c: 83fb strh r3, [r7, #30]
|
|
|
|
LWIP_ASSERT("tcp_output_fill_options: invalid pbuf", p != NULL);
|
|
800ad7e: 68bb ldr r3, [r7, #8]
|
|
800ad80: 2b00 cmp r3, #0
|
|
800ad82: d106 bne.n 800ad92 <tcp_output_fill_options+0x2e>
|
|
800ad84: 4b13 ldr r3, [pc, #76] ; (800add4 <tcp_output_fill_options+0x70>)
|
|
800ad86: f240 7256 movw r2, #1878 ; 0x756
|
|
800ad8a: 4913 ldr r1, [pc, #76] ; (800add8 <tcp_output_fill_options+0x74>)
|
|
800ad8c: 4813 ldr r0, [pc, #76] ; (800addc <tcp_output_fill_options+0x78>)
|
|
800ad8e: f005 fbb3 bl 80104f8 <printf>
|
|
|
|
tcphdr = (struct tcp_hdr *)p->payload;
|
|
800ad92: 68bb ldr r3, [r7, #8]
|
|
800ad94: 685b ldr r3, [r3, #4]
|
|
800ad96: 61bb str r3, [r7, #24]
|
|
opts = (u32_t *)(void *)(tcphdr + 1);
|
|
800ad98: 69bb ldr r3, [r7, #24]
|
|
800ad9a: 3314 adds r3, #20
|
|
800ad9c: 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));
|
|
800ad9e: 69bb ldr r3, [r7, #24]
|
|
800ada0: f103 0214 add.w r2, r3, #20
|
|
800ada4: 8bfb ldrh r3, [r7, #30]
|
|
800ada6: 009b lsls r3, r3, #2
|
|
800ada8: 4619 mov r1, r3
|
|
800adaa: 79fb ldrb r3, [r7, #7]
|
|
800adac: 009b lsls r3, r3, #2
|
|
800adae: f003 0304 and.w r3, r3, #4
|
|
800adb2: 440b add r3, r1
|
|
800adb4: 4413 add r3, r2
|
|
800adb6: 697a ldr r2, [r7, #20]
|
|
800adb8: 429a cmp r2, r3
|
|
800adba: d006 beq.n 800adca <tcp_output_fill_options+0x66>
|
|
800adbc: 4b05 ldr r3, [pc, #20] ; (800add4 <tcp_output_fill_options+0x70>)
|
|
800adbe: f240 7275 movw r2, #1909 ; 0x775
|
|
800adc2: 4907 ldr r1, [pc, #28] ; (800ade0 <tcp_output_fill_options+0x7c>)
|
|
800adc4: 4805 ldr r0, [pc, #20] ; (800addc <tcp_output_fill_options+0x78>)
|
|
800adc6: f005 fb97 bl 80104f8 <printf>
|
|
LWIP_UNUSED_ARG(optflags); /* for LWIP_NOASSERT */
|
|
LWIP_UNUSED_ARG(opts); /* for LWIP_NOASSERT */
|
|
}
|
|
800adca: bf00 nop
|
|
800adcc: 3720 adds r7, #32
|
|
800adce: 46bd mov sp, r7
|
|
800add0: bd80 pop {r7, pc}
|
|
800add2: bf00 nop
|
|
800add4: 08016704 .word 0x08016704
|
|
800add8: 08016e34 .word 0x08016e34
|
|
800addc: 08016758 .word 0x08016758
|
|
800ade0: 08016d2c .word 0x08016d2c
|
|
|
|
0800ade4 <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)
|
|
{
|
|
800ade4: b580 push {r7, lr}
|
|
800ade6: b08a sub sp, #40 ; 0x28
|
|
800ade8: af04 add r7, sp, #16
|
|
800adea: 60f8 str r0, [r7, #12]
|
|
800adec: 60b9 str r1, [r7, #8]
|
|
800adee: 607a str r2, [r7, #4]
|
|
800adf0: 603b str r3, [r7, #0]
|
|
err_t err;
|
|
struct netif *netif;
|
|
|
|
LWIP_ASSERT("tcp_output_control_segment: invalid pbuf", p != NULL);
|
|
800adf2: 68bb ldr r3, [r7, #8]
|
|
800adf4: 2b00 cmp r3, #0
|
|
800adf6: d106 bne.n 800ae06 <tcp_output_control_segment+0x22>
|
|
800adf8: 4b1c ldr r3, [pc, #112] ; (800ae6c <tcp_output_control_segment+0x88>)
|
|
800adfa: f240 7287 movw r2, #1927 ; 0x787
|
|
800adfe: 491c ldr r1, [pc, #112] ; (800ae70 <tcp_output_control_segment+0x8c>)
|
|
800ae00: 481c ldr r0, [pc, #112] ; (800ae74 <tcp_output_control_segment+0x90>)
|
|
800ae02: f005 fb79 bl 80104f8 <printf>
|
|
|
|
netif = tcp_route(pcb, src, dst);
|
|
800ae06: 683a ldr r2, [r7, #0]
|
|
800ae08: 6879 ldr r1, [r7, #4]
|
|
800ae0a: 68f8 ldr r0, [r7, #12]
|
|
800ae0c: f7fe ff40 bl 8009c90 <tcp_route>
|
|
800ae10: 6138 str r0, [r7, #16]
|
|
if (netif == NULL) {
|
|
800ae12: 693b ldr r3, [r7, #16]
|
|
800ae14: 2b00 cmp r3, #0
|
|
800ae16: d102 bne.n 800ae1e <tcp_output_control_segment+0x3a>
|
|
err = ERR_RTE;
|
|
800ae18: 23fc movs r3, #252 ; 0xfc
|
|
800ae1a: 75fb strb r3, [r7, #23]
|
|
800ae1c: e01c b.n 800ae58 <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) {
|
|
800ae1e: 68fb ldr r3, [r7, #12]
|
|
800ae20: 2b00 cmp r3, #0
|
|
800ae22: d006 beq.n 800ae32 <tcp_output_control_segment+0x4e>
|
|
NETIF_SET_HINTS(netif, LWIP_CONST_CAST(struct netif_hint*, &(pcb->netif_hints)));
|
|
ttl = pcb->ttl;
|
|
800ae24: 68fb ldr r3, [r7, #12]
|
|
800ae26: 7adb ldrb r3, [r3, #11]
|
|
800ae28: 75bb strb r3, [r7, #22]
|
|
tos = pcb->tos;
|
|
800ae2a: 68fb ldr r3, [r7, #12]
|
|
800ae2c: 7a9b ldrb r3, [r3, #10]
|
|
800ae2e: 757b strb r3, [r7, #21]
|
|
800ae30: e003 b.n 800ae3a <tcp_output_control_segment+0x56>
|
|
} else {
|
|
/* Send output with hardcoded TTL/HL since we have no access to the pcb */
|
|
ttl = TCP_TTL;
|
|
800ae32: 23ff movs r3, #255 ; 0xff
|
|
800ae34: 75bb strb r3, [r7, #22]
|
|
tos = 0;
|
|
800ae36: 2300 movs r3, #0
|
|
800ae38: 757b strb r3, [r7, #21]
|
|
}
|
|
TCP_STATS_INC(tcp.xmit);
|
|
err = ip_output_if(p, src, dst, ttl, tos, IP_PROTO_TCP, netif);
|
|
800ae3a: 7dba ldrb r2, [r7, #22]
|
|
800ae3c: 693b ldr r3, [r7, #16]
|
|
800ae3e: 9302 str r3, [sp, #8]
|
|
800ae40: 2306 movs r3, #6
|
|
800ae42: 9301 str r3, [sp, #4]
|
|
800ae44: 7d7b ldrb r3, [r7, #21]
|
|
800ae46: 9300 str r3, [sp, #0]
|
|
800ae48: 4613 mov r3, r2
|
|
800ae4a: 683a ldr r2, [r7, #0]
|
|
800ae4c: 6879 ldr r1, [r7, #4]
|
|
800ae4e: 68b8 ldr r0, [r7, #8]
|
|
800ae50: f004 f982 bl 800f158 <ip4_output_if>
|
|
800ae54: 4603 mov r3, r0
|
|
800ae56: 75fb strb r3, [r7, #23]
|
|
NETIF_RESET_HINTS(netif);
|
|
}
|
|
pbuf_free(p);
|
|
800ae58: 68b8 ldr r0, [r7, #8]
|
|
800ae5a: f7fa fdd5 bl 8005a08 <pbuf_free>
|
|
return err;
|
|
800ae5e: f997 3017 ldrsb.w r3, [r7, #23]
|
|
}
|
|
800ae62: 4618 mov r0, r3
|
|
800ae64: 3718 adds r7, #24
|
|
800ae66: 46bd mov sp, r7
|
|
800ae68: bd80 pop {r7, pc}
|
|
800ae6a: bf00 nop
|
|
800ae6c: 08016704 .word 0x08016704
|
|
800ae70: 08016e5c .word 0x08016e5c
|
|
800ae74: 08016758 .word 0x08016758
|
|
|
|
0800ae78 <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)
|
|
{
|
|
800ae78: b590 push {r4, r7, lr}
|
|
800ae7a: b08b sub sp, #44 ; 0x2c
|
|
800ae7c: af04 add r7, sp, #16
|
|
800ae7e: 60f8 str r0, [r7, #12]
|
|
800ae80: 60b9 str r1, [r7, #8]
|
|
800ae82: 607a str r2, [r7, #4]
|
|
800ae84: 603b str r3, [r7, #0]
|
|
struct pbuf *p;
|
|
u16_t wnd;
|
|
u8_t optlen;
|
|
|
|
LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL);
|
|
800ae86: 683b ldr r3, [r7, #0]
|
|
800ae88: 2b00 cmp r3, #0
|
|
800ae8a: d106 bne.n 800ae9a <tcp_rst+0x22>
|
|
800ae8c: 4b1f ldr r3, [pc, #124] ; (800af0c <tcp_rst+0x94>)
|
|
800ae8e: f240 72c4 movw r2, #1988 ; 0x7c4
|
|
800ae92: 491f ldr r1, [pc, #124] ; (800af10 <tcp_rst+0x98>)
|
|
800ae94: 481f ldr r0, [pc, #124] ; (800af14 <tcp_rst+0x9c>)
|
|
800ae96: f005 fb2f bl 80104f8 <printf>
|
|
LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL);
|
|
800ae9a: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800ae9c: 2b00 cmp r3, #0
|
|
800ae9e: d106 bne.n 800aeae <tcp_rst+0x36>
|
|
800aea0: 4b1a ldr r3, [pc, #104] ; (800af0c <tcp_rst+0x94>)
|
|
800aea2: f240 72c5 movw r2, #1989 ; 0x7c5
|
|
800aea6: 491c ldr r1, [pc, #112] ; (800af18 <tcp_rst+0xa0>)
|
|
800aea8: 481a ldr r0, [pc, #104] ; (800af14 <tcp_rst+0x9c>)
|
|
800aeaa: f005 fb25 bl 80104f8 <printf>
|
|
|
|
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);
|
|
800aeae: 2300 movs r3, #0
|
|
800aeb0: 75fb strb r3, [r7, #23]
|
|
|
|
#if LWIP_WND_SCALE
|
|
wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF));
|
|
#else
|
|
wnd = PP_HTONS(TCP_WND);
|
|
800aeb2: f246 0308 movw r3, #24584 ; 0x6008
|
|
800aeb6: 82bb strh r3, [r7, #20]
|
|
#endif
|
|
|
|
p = tcp_output_alloc_header_common(ackno, optlen, 0, lwip_htonl(seqno), local_port,
|
|
800aeb8: 7dfb ldrb r3, [r7, #23]
|
|
800aeba: b29c uxth r4, r3
|
|
800aebc: 68b8 ldr r0, [r7, #8]
|
|
800aebe: f7f9 fa4e bl 800435e <lwip_htonl>
|
|
800aec2: 4602 mov r2, r0
|
|
800aec4: 8abb ldrh r3, [r7, #20]
|
|
800aec6: 9303 str r3, [sp, #12]
|
|
800aec8: 2314 movs r3, #20
|
|
800aeca: 9302 str r3, [sp, #8]
|
|
800aecc: 8e3b ldrh r3, [r7, #48] ; 0x30
|
|
800aece: 9301 str r3, [sp, #4]
|
|
800aed0: 8dbb ldrh r3, [r7, #44] ; 0x2c
|
|
800aed2: 9300 str r3, [sp, #0]
|
|
800aed4: 4613 mov r3, r2
|
|
800aed6: 2200 movs r2, #0
|
|
800aed8: 4621 mov r1, r4
|
|
800aeda: 6878 ldr r0, [r7, #4]
|
|
800aedc: f7ff fe92 bl 800ac04 <tcp_output_alloc_header_common>
|
|
800aee0: 6138 str r0, [r7, #16]
|
|
remote_port, TCP_RST | TCP_ACK, wnd);
|
|
if (p == NULL) {
|
|
800aee2: 693b ldr r3, [r7, #16]
|
|
800aee4: 2b00 cmp r3, #0
|
|
800aee6: d00c beq.n 800af02 <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);
|
|
800aee8: 7dfb ldrb r3, [r7, #23]
|
|
800aeea: 2200 movs r2, #0
|
|
800aeec: 6939 ldr r1, [r7, #16]
|
|
800aeee: 68f8 ldr r0, [r7, #12]
|
|
800aef0: f7ff ff38 bl 800ad64 <tcp_output_fill_options>
|
|
|
|
MIB2_STATS_INC(mib2.tcpoutrsts);
|
|
|
|
tcp_output_control_segment(pcb, p, local_ip, remote_ip);
|
|
800aef4: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800aef6: 683a ldr r2, [r7, #0]
|
|
800aef8: 6939 ldr r1, [r7, #16]
|
|
800aefa: 68f8 ldr r0, [r7, #12]
|
|
800aefc: f7ff ff72 bl 800ade4 <tcp_output_control_segment>
|
|
800af00: e000 b.n 800af04 <tcp_rst+0x8c>
|
|
return;
|
|
800af02: bf00 nop
|
|
LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno));
|
|
}
|
|
800af04: 371c adds r7, #28
|
|
800af06: 46bd mov sp, r7
|
|
800af08: bd90 pop {r4, r7, pc}
|
|
800af0a: bf00 nop
|
|
800af0c: 08016704 .word 0x08016704
|
|
800af10: 08016e88 .word 0x08016e88
|
|
800af14: 08016758 .word 0x08016758
|
|
800af18: 08016ea4 .word 0x08016ea4
|
|
|
|
0800af1c <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)
|
|
{
|
|
800af1c: b590 push {r4, r7, lr}
|
|
800af1e: b087 sub sp, #28
|
|
800af20: af00 add r7, sp, #0
|
|
800af22: 6078 str r0, [r7, #4]
|
|
err_t err;
|
|
struct pbuf *p;
|
|
u8_t optlen, optflags = 0;
|
|
800af24: 2300 movs r3, #0
|
|
800af26: 75fb strb r3, [r7, #23]
|
|
u8_t num_sacks = 0;
|
|
800af28: 2300 movs r3, #0
|
|
800af2a: 75bb strb r3, [r7, #22]
|
|
|
|
LWIP_ASSERT("tcp_send_empty_ack: invalid pcb", pcb != NULL);
|
|
800af2c: 687b ldr r3, [r7, #4]
|
|
800af2e: 2b00 cmp r3, #0
|
|
800af30: d106 bne.n 800af40 <tcp_send_empty_ack+0x24>
|
|
800af32: 4b28 ldr r3, [pc, #160] ; (800afd4 <tcp_send_empty_ack+0xb8>)
|
|
800af34: f240 72ea movw r2, #2026 ; 0x7ea
|
|
800af38: 4927 ldr r1, [pc, #156] ; (800afd8 <tcp_send_empty_ack+0xbc>)
|
|
800af3a: 4828 ldr r0, [pc, #160] ; (800afdc <tcp_send_empty_ack+0xc0>)
|
|
800af3c: f005 fadc bl 80104f8 <printf>
|
|
#if LWIP_TCP_TIMESTAMPS
|
|
if (pcb->flags & TF_TIMESTAMP) {
|
|
optflags = TF_SEG_OPTS_TS;
|
|
}
|
|
#endif
|
|
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb);
|
|
800af40: 7dfb ldrb r3, [r7, #23]
|
|
800af42: 009b lsls r3, r3, #2
|
|
800af44: b2db uxtb r3, r3
|
|
800af46: f003 0304 and.w r3, r3, #4
|
|
800af4a: 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));
|
|
800af4c: 7d7b ldrb r3, [r7, #21]
|
|
800af4e: b29c uxth r4, r3
|
|
800af50: 687b ldr r3, [r7, #4]
|
|
800af52: 6d1b ldr r3, [r3, #80] ; 0x50
|
|
800af54: 4618 mov r0, r3
|
|
800af56: f7f9 fa02 bl 800435e <lwip_htonl>
|
|
800af5a: 4603 mov r3, r0
|
|
800af5c: 2200 movs r2, #0
|
|
800af5e: 4621 mov r1, r4
|
|
800af60: 6878 ldr r0, [r7, #4]
|
|
800af62: f7ff fec1 bl 800ace8 <tcp_output_alloc_header>
|
|
800af66: 6138 str r0, [r7, #16]
|
|
if (p == NULL) {
|
|
800af68: 693b ldr r3, [r7, #16]
|
|
800af6a: 2b00 cmp r3, #0
|
|
800af6c: d109 bne.n 800af82 <tcp_send_empty_ack+0x66>
|
|
/* let tcp_fasttmr retry sending this ACK */
|
|
tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
|
|
800af6e: 687b ldr r3, [r7, #4]
|
|
800af70: 8b5b ldrh r3, [r3, #26]
|
|
800af72: f043 0303 orr.w r3, r3, #3
|
|
800af76: b29a uxth r2, r3
|
|
800af78: 687b ldr r3, [r7, #4]
|
|
800af7a: 835a strh r2, [r3, #26]
|
|
LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n"));
|
|
return ERR_BUF;
|
|
800af7c: f06f 0301 mvn.w r3, #1
|
|
800af80: e023 b.n 800afca <tcp_send_empty_ack+0xae>
|
|
}
|
|
tcp_output_fill_options(pcb, p, optflags, num_sacks);
|
|
800af82: 7dbb ldrb r3, [r7, #22]
|
|
800af84: 7dfa ldrb r2, [r7, #23]
|
|
800af86: 6939 ldr r1, [r7, #16]
|
|
800af88: 6878 ldr r0, [r7, #4]
|
|
800af8a: f7ff feeb bl 800ad64 <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);
|
|
800af8e: 687a ldr r2, [r7, #4]
|
|
800af90: 687b ldr r3, [r7, #4]
|
|
800af92: 3304 adds r3, #4
|
|
800af94: 6939 ldr r1, [r7, #16]
|
|
800af96: 6878 ldr r0, [r7, #4]
|
|
800af98: f7ff ff24 bl 800ade4 <tcp_output_control_segment>
|
|
800af9c: 4603 mov r3, r0
|
|
800af9e: 73fb strb r3, [r7, #15]
|
|
if (err != ERR_OK) {
|
|
800afa0: f997 300f ldrsb.w r3, [r7, #15]
|
|
800afa4: 2b00 cmp r3, #0
|
|
800afa6: d007 beq.n 800afb8 <tcp_send_empty_ack+0x9c>
|
|
/* let tcp_fasttmr retry sending this ACK */
|
|
tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
|
|
800afa8: 687b ldr r3, [r7, #4]
|
|
800afaa: 8b5b ldrh r3, [r3, #26]
|
|
800afac: f043 0303 orr.w r3, r3, #3
|
|
800afb0: b29a uxth r2, r3
|
|
800afb2: 687b ldr r3, [r7, #4]
|
|
800afb4: 835a strh r2, [r3, #26]
|
|
800afb6: e006 b.n 800afc6 <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);
|
|
800afb8: 687b ldr r3, [r7, #4]
|
|
800afba: 8b5b ldrh r3, [r3, #26]
|
|
800afbc: f023 0303 bic.w r3, r3, #3
|
|
800afc0: b29a uxth r2, r3
|
|
800afc2: 687b ldr r3, [r7, #4]
|
|
800afc4: 835a strh r2, [r3, #26]
|
|
}
|
|
|
|
return err;
|
|
800afc6: f997 300f ldrsb.w r3, [r7, #15]
|
|
}
|
|
800afca: 4618 mov r0, r3
|
|
800afcc: 371c adds r7, #28
|
|
800afce: 46bd mov sp, r7
|
|
800afd0: bd90 pop {r4, r7, pc}
|
|
800afd2: bf00 nop
|
|
800afd4: 08016704 .word 0x08016704
|
|
800afd8: 08016ec0 .word 0x08016ec0
|
|
800afdc: 08016758 .word 0x08016758
|
|
|
|
0800afe0 <tcp_keepalive>:
|
|
*
|
|
* @param pcb the tcp_pcb for which to send a keepalive packet
|
|
*/
|
|
err_t
|
|
tcp_keepalive(struct tcp_pcb *pcb)
|
|
{
|
|
800afe0: b590 push {r4, r7, lr}
|
|
800afe2: b087 sub sp, #28
|
|
800afe4: af00 add r7, sp, #0
|
|
800afe6: 6078 str r0, [r7, #4]
|
|
err_t err;
|
|
struct pbuf *p;
|
|
u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);
|
|
800afe8: 2300 movs r3, #0
|
|
800afea: 75fb strb r3, [r7, #23]
|
|
|
|
LWIP_ASSERT("tcp_keepalive: invalid pcb", pcb != NULL);
|
|
800afec: 687b ldr r3, [r7, #4]
|
|
800afee: 2b00 cmp r3, #0
|
|
800aff0: d106 bne.n 800b000 <tcp_keepalive+0x20>
|
|
800aff2: 4b18 ldr r3, [pc, #96] ; (800b054 <tcp_keepalive+0x74>)
|
|
800aff4: f640 0224 movw r2, #2084 ; 0x824
|
|
800aff8: 4917 ldr r1, [pc, #92] ; (800b058 <tcp_keepalive+0x78>)
|
|
800affa: 4818 ldr r0, [pc, #96] ; (800b05c <tcp_keepalive+0x7c>)
|
|
800affc: f005 fa7c bl 80104f8 <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));
|
|
800b000: 7dfb ldrb r3, [r7, #23]
|
|
800b002: b29c uxth r4, r3
|
|
800b004: 687b ldr r3, [r7, #4]
|
|
800b006: 6d1b ldr r3, [r3, #80] ; 0x50
|
|
800b008: 3b01 subs r3, #1
|
|
800b00a: 4618 mov r0, r3
|
|
800b00c: f7f9 f9a7 bl 800435e <lwip_htonl>
|
|
800b010: 4603 mov r3, r0
|
|
800b012: 2200 movs r2, #0
|
|
800b014: 4621 mov r1, r4
|
|
800b016: 6878 ldr r0, [r7, #4]
|
|
800b018: f7ff fe66 bl 800ace8 <tcp_output_alloc_header>
|
|
800b01c: 6138 str r0, [r7, #16]
|
|
if (p == NULL) {
|
|
800b01e: 693b ldr r3, [r7, #16]
|
|
800b020: 2b00 cmp r3, #0
|
|
800b022: d102 bne.n 800b02a <tcp_keepalive+0x4a>
|
|
LWIP_DEBUGF(TCP_DEBUG,
|
|
("tcp_keepalive: could not allocate memory for pbuf\n"));
|
|
return ERR_MEM;
|
|
800b024: f04f 33ff mov.w r3, #4294967295
|
|
800b028: e010 b.n 800b04c <tcp_keepalive+0x6c>
|
|
}
|
|
tcp_output_fill_options(pcb, p, 0, optlen);
|
|
800b02a: 7dfb ldrb r3, [r7, #23]
|
|
800b02c: 2200 movs r2, #0
|
|
800b02e: 6939 ldr r1, [r7, #16]
|
|
800b030: 6878 ldr r0, [r7, #4]
|
|
800b032: f7ff fe97 bl 800ad64 <tcp_output_fill_options>
|
|
err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
|
|
800b036: 687a ldr r2, [r7, #4]
|
|
800b038: 687b ldr r3, [r7, #4]
|
|
800b03a: 3304 adds r3, #4
|
|
800b03c: 6939 ldr r1, [r7, #16]
|
|
800b03e: 6878 ldr r0, [r7, #4]
|
|
800b040: f7ff fed0 bl 800ade4 <tcp_output_control_segment>
|
|
800b044: 4603 mov r3, r0
|
|
800b046: 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;
|
|
800b048: f997 300f ldrsb.w r3, [r7, #15]
|
|
}
|
|
800b04c: 4618 mov r0, r3
|
|
800b04e: 371c adds r7, #28
|
|
800b050: 46bd mov sp, r7
|
|
800b052: bd90 pop {r4, r7, pc}
|
|
800b054: 08016704 .word 0x08016704
|
|
800b058: 08016ee0 .word 0x08016ee0
|
|
800b05c: 08016758 .word 0x08016758
|
|
|
|
0800b060 <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)
|
|
{
|
|
800b060: b590 push {r4, r7, lr}
|
|
800b062: b08b sub sp, #44 ; 0x2c
|
|
800b064: af00 add r7, sp, #0
|
|
800b066: 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);
|
|
800b068: 2300 movs r3, #0
|
|
800b06a: f887 3027 strb.w r3, [r7, #39] ; 0x27
|
|
|
|
LWIP_ASSERT("tcp_zero_window_probe: invalid pcb", pcb != NULL);
|
|
800b06e: 687b ldr r3, [r7, #4]
|
|
800b070: 2b00 cmp r3, #0
|
|
800b072: d106 bne.n 800b082 <tcp_zero_window_probe+0x22>
|
|
800b074: 4b4c ldr r3, [pc, #304] ; (800b1a8 <tcp_zero_window_probe+0x148>)
|
|
800b076: f640 024f movw r2, #2127 ; 0x84f
|
|
800b07a: 494c ldr r1, [pc, #304] ; (800b1ac <tcp_zero_window_probe+0x14c>)
|
|
800b07c: 484c ldr r0, [pc, #304] ; (800b1b0 <tcp_zero_window_probe+0x150>)
|
|
800b07e: f005 fa3b bl 80104f8 <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;
|
|
800b082: 687b ldr r3, [r7, #4]
|
|
800b084: 6edb ldr r3, [r3, #108] ; 0x6c
|
|
800b086: 623b str r3, [r7, #32]
|
|
if (seg == NULL) {
|
|
800b088: 6a3b ldr r3, [r7, #32]
|
|
800b08a: 2b00 cmp r3, #0
|
|
800b08c: d101 bne.n 800b092 <tcp_zero_window_probe+0x32>
|
|
/* Not expected, persist timer should be off when the send buffer is empty */
|
|
return ERR_OK;
|
|
800b08e: 2300 movs r3, #0
|
|
800b090: e086 b.n 800b1a0 <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) {
|
|
800b092: 687b ldr r3, [r7, #4]
|
|
800b094: f893 309a ldrb.w r3, [r3, #154] ; 0x9a
|
|
800b098: 2bff cmp r3, #255 ; 0xff
|
|
800b09a: d007 beq.n 800b0ac <tcp_zero_window_probe+0x4c>
|
|
++pcb->persist_probe;
|
|
800b09c: 687b ldr r3, [r7, #4]
|
|
800b09e: f893 309a ldrb.w r3, [r3, #154] ; 0x9a
|
|
800b0a2: 3301 adds r3, #1
|
|
800b0a4: b2da uxtb r2, r3
|
|
800b0a6: 687b ldr r3, [r7, #4]
|
|
800b0a8: f883 209a strb.w r2, [r3, #154] ; 0x9a
|
|
}
|
|
|
|
is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0);
|
|
800b0ac: 6a3b ldr r3, [r7, #32]
|
|
800b0ae: 68db ldr r3, [r3, #12]
|
|
800b0b0: 899b ldrh r3, [r3, #12]
|
|
800b0b2: b29b uxth r3, r3
|
|
800b0b4: 4618 mov r0, r3
|
|
800b0b6: f7f9 f93d bl 8004334 <lwip_htons>
|
|
800b0ba: 4603 mov r3, r0
|
|
800b0bc: b2db uxtb r3, r3
|
|
800b0be: f003 0301 and.w r3, r3, #1
|
|
800b0c2: 2b00 cmp r3, #0
|
|
800b0c4: d005 beq.n 800b0d2 <tcp_zero_window_probe+0x72>
|
|
800b0c6: 6a3b ldr r3, [r7, #32]
|
|
800b0c8: 891b ldrh r3, [r3, #8]
|
|
800b0ca: 2b00 cmp r3, #0
|
|
800b0cc: d101 bne.n 800b0d2 <tcp_zero_window_probe+0x72>
|
|
800b0ce: 2301 movs r3, #1
|
|
800b0d0: e000 b.n 800b0d4 <tcp_zero_window_probe+0x74>
|
|
800b0d2: 2300 movs r3, #0
|
|
800b0d4: 77fb strb r3, [r7, #31]
|
|
/* we want to send one seqno: either FIN or data (no options) */
|
|
len = is_fin ? 0 : 1;
|
|
800b0d6: 7ffb ldrb r3, [r7, #31]
|
|
800b0d8: 2b00 cmp r3, #0
|
|
800b0da: bf0c ite eq
|
|
800b0dc: 2301 moveq r3, #1
|
|
800b0de: 2300 movne r3, #0
|
|
800b0e0: b2db uxtb r3, r3
|
|
800b0e2: 83bb strh r3, [r7, #28]
|
|
|
|
p = tcp_output_alloc_header(pcb, optlen, len, seg->tcphdr->seqno);
|
|
800b0e4: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800b0e8: b299 uxth r1, r3
|
|
800b0ea: 6a3b ldr r3, [r7, #32]
|
|
800b0ec: 68db ldr r3, [r3, #12]
|
|
800b0ee: 685b ldr r3, [r3, #4]
|
|
800b0f0: 8bba ldrh r2, [r7, #28]
|
|
800b0f2: 6878 ldr r0, [r7, #4]
|
|
800b0f4: f7ff fdf8 bl 800ace8 <tcp_output_alloc_header>
|
|
800b0f8: 61b8 str r0, [r7, #24]
|
|
if (p == NULL) {
|
|
800b0fa: 69bb ldr r3, [r7, #24]
|
|
800b0fc: 2b00 cmp r3, #0
|
|
800b0fe: d102 bne.n 800b106 <tcp_zero_window_probe+0xa6>
|
|
LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n"));
|
|
return ERR_MEM;
|
|
800b100: f04f 33ff mov.w r3, #4294967295
|
|
800b104: e04c b.n 800b1a0 <tcp_zero_window_probe+0x140>
|
|
}
|
|
tcphdr = (struct tcp_hdr *)p->payload;
|
|
800b106: 69bb ldr r3, [r7, #24]
|
|
800b108: 685b ldr r3, [r3, #4]
|
|
800b10a: 617b str r3, [r7, #20]
|
|
|
|
if (is_fin) {
|
|
800b10c: 7ffb ldrb r3, [r7, #31]
|
|
800b10e: 2b00 cmp r3, #0
|
|
800b110: d011 beq.n 800b136 <tcp_zero_window_probe+0xd6>
|
|
/* FIN segment, no data */
|
|
TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN);
|
|
800b112: 697b ldr r3, [r7, #20]
|
|
800b114: 899b ldrh r3, [r3, #12]
|
|
800b116: b29b uxth r3, r3
|
|
800b118: b21b sxth r3, r3
|
|
800b11a: f423 537c bic.w r3, r3, #16128 ; 0x3f00
|
|
800b11e: b21c sxth r4, r3
|
|
800b120: 2011 movs r0, #17
|
|
800b122: f7f9 f907 bl 8004334 <lwip_htons>
|
|
800b126: 4603 mov r3, r0
|
|
800b128: b21b sxth r3, r3
|
|
800b12a: 4323 orrs r3, r4
|
|
800b12c: b21b sxth r3, r3
|
|
800b12e: b29a uxth r2, r3
|
|
800b130: 697b ldr r3, [r7, #20]
|
|
800b132: 819a strh r2, [r3, #12]
|
|
800b134: e010 b.n 800b158 <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);
|
|
800b136: 69bb ldr r3, [r7, #24]
|
|
800b138: 685b ldr r3, [r3, #4]
|
|
800b13a: 3314 adds r3, #20
|
|
800b13c: 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);
|
|
800b13e: 6a3b ldr r3, [r7, #32]
|
|
800b140: 6858 ldr r0, [r3, #4]
|
|
800b142: 6a3b ldr r3, [r7, #32]
|
|
800b144: 685b ldr r3, [r3, #4]
|
|
800b146: 891a ldrh r2, [r3, #8]
|
|
800b148: 6a3b ldr r3, [r7, #32]
|
|
800b14a: 891b ldrh r3, [r3, #8]
|
|
800b14c: 1ad3 subs r3, r2, r3
|
|
800b14e: b29b uxth r3, r3
|
|
800b150: 2201 movs r2, #1
|
|
800b152: 6939 ldr r1, [r7, #16]
|
|
800b154: f7fa fe52 bl 8005dfc <pbuf_copy_partial>
|
|
}
|
|
|
|
/* The byte may be acknowledged without the window being opened. */
|
|
snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + 1;
|
|
800b158: 6a3b ldr r3, [r7, #32]
|
|
800b15a: 68db ldr r3, [r3, #12]
|
|
800b15c: 685b ldr r3, [r3, #4]
|
|
800b15e: 4618 mov r0, r3
|
|
800b160: f7f9 f8fd bl 800435e <lwip_htonl>
|
|
800b164: 4603 mov r3, r0
|
|
800b166: 3301 adds r3, #1
|
|
800b168: 60fb str r3, [r7, #12]
|
|
if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) {
|
|
800b16a: 687b ldr r3, [r7, #4]
|
|
800b16c: 6d1a ldr r2, [r3, #80] ; 0x50
|
|
800b16e: 68fb ldr r3, [r7, #12]
|
|
800b170: 1ad3 subs r3, r2, r3
|
|
800b172: 2b00 cmp r3, #0
|
|
800b174: da02 bge.n 800b17c <tcp_zero_window_probe+0x11c>
|
|
pcb->snd_nxt = snd_nxt;
|
|
800b176: 687b ldr r3, [r7, #4]
|
|
800b178: 68fa ldr r2, [r7, #12]
|
|
800b17a: 651a str r2, [r3, #80] ; 0x50
|
|
}
|
|
tcp_output_fill_options(pcb, p, 0, optlen);
|
|
800b17c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800b180: 2200 movs r2, #0
|
|
800b182: 69b9 ldr r1, [r7, #24]
|
|
800b184: 6878 ldr r0, [r7, #4]
|
|
800b186: f7ff fded bl 800ad64 <tcp_output_fill_options>
|
|
|
|
err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
|
|
800b18a: 687a ldr r2, [r7, #4]
|
|
800b18c: 687b ldr r3, [r7, #4]
|
|
800b18e: 3304 adds r3, #4
|
|
800b190: 69b9 ldr r1, [r7, #24]
|
|
800b192: 6878 ldr r0, [r7, #4]
|
|
800b194: f7ff fe26 bl 800ade4 <tcp_output_control_segment>
|
|
800b198: 4603 mov r3, r0
|
|
800b19a: 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;
|
|
800b19c: f997 300b ldrsb.w r3, [r7, #11]
|
|
}
|
|
800b1a0: 4618 mov r0, r3
|
|
800b1a2: 372c adds r7, #44 ; 0x2c
|
|
800b1a4: 46bd mov sp, r7
|
|
800b1a6: bd90 pop {r4, r7, pc}
|
|
800b1a8: 08016704 .word 0x08016704
|
|
800b1ac: 08016efc .word 0x08016efc
|
|
800b1b0: 08016758 .word 0x08016758
|
|
|
|
0800b1b4 <tcpip_tcp_timer>:
|
|
*
|
|
* @param arg unused argument
|
|
*/
|
|
static void
|
|
tcpip_tcp_timer(void *arg)
|
|
{
|
|
800b1b4: b580 push {r7, lr}
|
|
800b1b6: b082 sub sp, #8
|
|
800b1b8: af00 add r7, sp, #0
|
|
800b1ba: 6078 str r0, [r7, #4]
|
|
LWIP_UNUSED_ARG(arg);
|
|
|
|
/* call TCP timer handler */
|
|
tcp_tmr();
|
|
800b1bc: f7fa ff0c bl 8005fd8 <tcp_tmr>
|
|
/* timer still needed? */
|
|
if (tcp_active_pcbs || tcp_tw_pcbs) {
|
|
800b1c0: 4b0a ldr r3, [pc, #40] ; (800b1ec <tcpip_tcp_timer+0x38>)
|
|
800b1c2: 681b ldr r3, [r3, #0]
|
|
800b1c4: 2b00 cmp r3, #0
|
|
800b1c6: d103 bne.n 800b1d0 <tcpip_tcp_timer+0x1c>
|
|
800b1c8: 4b09 ldr r3, [pc, #36] ; (800b1f0 <tcpip_tcp_timer+0x3c>)
|
|
800b1ca: 681b ldr r3, [r3, #0]
|
|
800b1cc: 2b00 cmp r3, #0
|
|
800b1ce: d005 beq.n 800b1dc <tcpip_tcp_timer+0x28>
|
|
/* restart timer */
|
|
sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);
|
|
800b1d0: 2200 movs r2, #0
|
|
800b1d2: 4908 ldr r1, [pc, #32] ; (800b1f4 <tcpip_tcp_timer+0x40>)
|
|
800b1d4: 20fa movs r0, #250 ; 0xfa
|
|
800b1d6: f000 f8f3 bl 800b3c0 <sys_timeout>
|
|
800b1da: e003 b.n 800b1e4 <tcpip_tcp_timer+0x30>
|
|
} else {
|
|
/* disable timer */
|
|
tcpip_tcp_timer_active = 0;
|
|
800b1dc: 4b06 ldr r3, [pc, #24] ; (800b1f8 <tcpip_tcp_timer+0x44>)
|
|
800b1de: 2200 movs r2, #0
|
|
800b1e0: 601a str r2, [r3, #0]
|
|
}
|
|
}
|
|
800b1e2: bf00 nop
|
|
800b1e4: bf00 nop
|
|
800b1e6: 3708 adds r7, #8
|
|
800b1e8: 46bd mov sp, r7
|
|
800b1ea: bd80 pop {r7, pc}
|
|
800b1ec: 20008c0c .word 0x20008c0c
|
|
800b1f0: 20008c10 .word 0x20008c10
|
|
800b1f4: 0800b1b5 .word 0x0800b1b5
|
|
800b1f8: 20008c58 .word 0x20008c58
|
|
|
|
0800b1fc <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)
|
|
{
|
|
800b1fc: b580 push {r7, lr}
|
|
800b1fe: 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)) {
|
|
800b200: 4b0a ldr r3, [pc, #40] ; (800b22c <tcp_timer_needed+0x30>)
|
|
800b202: 681b ldr r3, [r3, #0]
|
|
800b204: 2b00 cmp r3, #0
|
|
800b206: d10f bne.n 800b228 <tcp_timer_needed+0x2c>
|
|
800b208: 4b09 ldr r3, [pc, #36] ; (800b230 <tcp_timer_needed+0x34>)
|
|
800b20a: 681b ldr r3, [r3, #0]
|
|
800b20c: 2b00 cmp r3, #0
|
|
800b20e: d103 bne.n 800b218 <tcp_timer_needed+0x1c>
|
|
800b210: 4b08 ldr r3, [pc, #32] ; (800b234 <tcp_timer_needed+0x38>)
|
|
800b212: 681b ldr r3, [r3, #0]
|
|
800b214: 2b00 cmp r3, #0
|
|
800b216: d007 beq.n 800b228 <tcp_timer_needed+0x2c>
|
|
/* enable and start timer */
|
|
tcpip_tcp_timer_active = 1;
|
|
800b218: 4b04 ldr r3, [pc, #16] ; (800b22c <tcp_timer_needed+0x30>)
|
|
800b21a: 2201 movs r2, #1
|
|
800b21c: 601a str r2, [r3, #0]
|
|
sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);
|
|
800b21e: 2200 movs r2, #0
|
|
800b220: 4905 ldr r1, [pc, #20] ; (800b238 <tcp_timer_needed+0x3c>)
|
|
800b222: 20fa movs r0, #250 ; 0xfa
|
|
800b224: f000 f8cc bl 800b3c0 <sys_timeout>
|
|
}
|
|
}
|
|
800b228: bf00 nop
|
|
800b22a: bd80 pop {r7, pc}
|
|
800b22c: 20008c58 .word 0x20008c58
|
|
800b230: 20008c0c .word 0x20008c0c
|
|
800b234: 20008c10 .word 0x20008c10
|
|
800b238: 0800b1b5 .word 0x0800b1b5
|
|
|
|
0800b23c <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
|
|
{
|
|
800b23c: b580 push {r7, lr}
|
|
800b23e: b086 sub sp, #24
|
|
800b240: af00 add r7, sp, #0
|
|
800b242: 60f8 str r0, [r7, #12]
|
|
800b244: 60b9 str r1, [r7, #8]
|
|
800b246: 607a str r2, [r7, #4]
|
|
struct sys_timeo *timeout, *t;
|
|
|
|
timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT);
|
|
800b248: 2006 movs r0, #6
|
|
800b24a: f7f9 fceb bl 8004c24 <memp_malloc>
|
|
800b24e: 6138 str r0, [r7, #16]
|
|
if (timeout == NULL) {
|
|
800b250: 693b ldr r3, [r7, #16]
|
|
800b252: 2b00 cmp r3, #0
|
|
800b254: d109 bne.n 800b26a <sys_timeout_abs+0x2e>
|
|
LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL);
|
|
800b256: 693b ldr r3, [r7, #16]
|
|
800b258: 2b00 cmp r3, #0
|
|
800b25a: d151 bne.n 800b300 <sys_timeout_abs+0xc4>
|
|
800b25c: 4b2a ldr r3, [pc, #168] ; (800b308 <sys_timeout_abs+0xcc>)
|
|
800b25e: 22be movs r2, #190 ; 0xbe
|
|
800b260: 492a ldr r1, [pc, #168] ; (800b30c <sys_timeout_abs+0xd0>)
|
|
800b262: 482b ldr r0, [pc, #172] ; (800b310 <sys_timeout_abs+0xd4>)
|
|
800b264: f005 f948 bl 80104f8 <printf>
|
|
return;
|
|
800b268: e04a b.n 800b300 <sys_timeout_abs+0xc4>
|
|
}
|
|
|
|
timeout->next = NULL;
|
|
800b26a: 693b ldr r3, [r7, #16]
|
|
800b26c: 2200 movs r2, #0
|
|
800b26e: 601a str r2, [r3, #0]
|
|
timeout->h = handler;
|
|
800b270: 693b ldr r3, [r7, #16]
|
|
800b272: 68ba ldr r2, [r7, #8]
|
|
800b274: 609a str r2, [r3, #8]
|
|
timeout->arg = arg;
|
|
800b276: 693b ldr r3, [r7, #16]
|
|
800b278: 687a ldr r2, [r7, #4]
|
|
800b27a: 60da str r2, [r3, #12]
|
|
timeout->time = abs_time;
|
|
800b27c: 693b ldr r3, [r7, #16]
|
|
800b27e: 68fa ldr r2, [r7, #12]
|
|
800b280: 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) {
|
|
800b282: 4b24 ldr r3, [pc, #144] ; (800b314 <sys_timeout_abs+0xd8>)
|
|
800b284: 681b ldr r3, [r3, #0]
|
|
800b286: 2b00 cmp r3, #0
|
|
800b288: d103 bne.n 800b292 <sys_timeout_abs+0x56>
|
|
next_timeout = timeout;
|
|
800b28a: 4a22 ldr r2, [pc, #136] ; (800b314 <sys_timeout_abs+0xd8>)
|
|
800b28c: 693b ldr r3, [r7, #16]
|
|
800b28e: 6013 str r3, [r2, #0]
|
|
return;
|
|
800b290: e037 b.n 800b302 <sys_timeout_abs+0xc6>
|
|
}
|
|
if (TIME_LESS_THAN(timeout->time, next_timeout->time)) {
|
|
800b292: 693b ldr r3, [r7, #16]
|
|
800b294: 685a ldr r2, [r3, #4]
|
|
800b296: 4b1f ldr r3, [pc, #124] ; (800b314 <sys_timeout_abs+0xd8>)
|
|
800b298: 681b ldr r3, [r3, #0]
|
|
800b29a: 685b ldr r3, [r3, #4]
|
|
800b29c: 1ad3 subs r3, r2, r3
|
|
800b29e: 0fdb lsrs r3, r3, #31
|
|
800b2a0: f003 0301 and.w r3, r3, #1
|
|
800b2a4: b2db uxtb r3, r3
|
|
800b2a6: 2b00 cmp r3, #0
|
|
800b2a8: d007 beq.n 800b2ba <sys_timeout_abs+0x7e>
|
|
timeout->next = next_timeout;
|
|
800b2aa: 4b1a ldr r3, [pc, #104] ; (800b314 <sys_timeout_abs+0xd8>)
|
|
800b2ac: 681a ldr r2, [r3, #0]
|
|
800b2ae: 693b ldr r3, [r7, #16]
|
|
800b2b0: 601a str r2, [r3, #0]
|
|
next_timeout = timeout;
|
|
800b2b2: 4a18 ldr r2, [pc, #96] ; (800b314 <sys_timeout_abs+0xd8>)
|
|
800b2b4: 693b ldr r3, [r7, #16]
|
|
800b2b6: 6013 str r3, [r2, #0]
|
|
800b2b8: e023 b.n 800b302 <sys_timeout_abs+0xc6>
|
|
} else {
|
|
for (t = next_timeout; t != NULL; t = t->next) {
|
|
800b2ba: 4b16 ldr r3, [pc, #88] ; (800b314 <sys_timeout_abs+0xd8>)
|
|
800b2bc: 681b ldr r3, [r3, #0]
|
|
800b2be: 617b str r3, [r7, #20]
|
|
800b2c0: e01a b.n 800b2f8 <sys_timeout_abs+0xbc>
|
|
if ((t->next == NULL) || TIME_LESS_THAN(timeout->time, t->next->time)) {
|
|
800b2c2: 697b ldr r3, [r7, #20]
|
|
800b2c4: 681b ldr r3, [r3, #0]
|
|
800b2c6: 2b00 cmp r3, #0
|
|
800b2c8: d00b beq.n 800b2e2 <sys_timeout_abs+0xa6>
|
|
800b2ca: 693b ldr r3, [r7, #16]
|
|
800b2cc: 685a ldr r2, [r3, #4]
|
|
800b2ce: 697b ldr r3, [r7, #20]
|
|
800b2d0: 681b ldr r3, [r3, #0]
|
|
800b2d2: 685b ldr r3, [r3, #4]
|
|
800b2d4: 1ad3 subs r3, r2, r3
|
|
800b2d6: 0fdb lsrs r3, r3, #31
|
|
800b2d8: f003 0301 and.w r3, r3, #1
|
|
800b2dc: b2db uxtb r3, r3
|
|
800b2de: 2b00 cmp r3, #0
|
|
800b2e0: d007 beq.n 800b2f2 <sys_timeout_abs+0xb6>
|
|
timeout->next = t->next;
|
|
800b2e2: 697b ldr r3, [r7, #20]
|
|
800b2e4: 681a ldr r2, [r3, #0]
|
|
800b2e6: 693b ldr r3, [r7, #16]
|
|
800b2e8: 601a str r2, [r3, #0]
|
|
t->next = timeout;
|
|
800b2ea: 697b ldr r3, [r7, #20]
|
|
800b2ec: 693a ldr r2, [r7, #16]
|
|
800b2ee: 601a str r2, [r3, #0]
|
|
break;
|
|
800b2f0: e007 b.n 800b302 <sys_timeout_abs+0xc6>
|
|
for (t = next_timeout; t != NULL; t = t->next) {
|
|
800b2f2: 697b ldr r3, [r7, #20]
|
|
800b2f4: 681b ldr r3, [r3, #0]
|
|
800b2f6: 617b str r3, [r7, #20]
|
|
800b2f8: 697b ldr r3, [r7, #20]
|
|
800b2fa: 2b00 cmp r3, #0
|
|
800b2fc: d1e1 bne.n 800b2c2 <sys_timeout_abs+0x86>
|
|
800b2fe: e000 b.n 800b302 <sys_timeout_abs+0xc6>
|
|
return;
|
|
800b300: bf00 nop
|
|
}
|
|
}
|
|
}
|
|
}
|
|
800b302: 3718 adds r7, #24
|
|
800b304: 46bd mov sp, r7
|
|
800b306: bd80 pop {r7, pc}
|
|
800b308: 08016f20 .word 0x08016f20
|
|
800b30c: 08016f54 .word 0x08016f54
|
|
800b310: 08016f94 .word 0x08016f94
|
|
800b314: 20008c50 .word 0x20008c50
|
|
|
|
0800b318 <lwip_cyclic_timer>:
|
|
#if !LWIP_TESTMODE
|
|
static
|
|
#endif
|
|
void
|
|
lwip_cyclic_timer(void *arg)
|
|
{
|
|
800b318: b580 push {r7, lr}
|
|
800b31a: b086 sub sp, #24
|
|
800b31c: af00 add r7, sp, #0
|
|
800b31e: 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;
|
|
800b320: 687b ldr r3, [r7, #4]
|
|
800b322: 617b str r3, [r7, #20]
|
|
|
|
#if LWIP_DEBUG_TIMERNAMES
|
|
LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: %s()\n", cyclic->handler_name));
|
|
#endif
|
|
cyclic->handler();
|
|
800b324: 697b ldr r3, [r7, #20]
|
|
800b326: 685b ldr r3, [r3, #4]
|
|
800b328: 4798 blx r3
|
|
|
|
now = sys_now();
|
|
800b32a: f7f8 fdeb bl 8003f04 <sys_now>
|
|
800b32e: 6138 str r0, [r7, #16]
|
|
next_timeout_time = (u32_t)(current_timeout_due_time + cyclic->interval_ms); /* overflow handled by TIME_LESS_THAN macro */
|
|
800b330: 697b ldr r3, [r7, #20]
|
|
800b332: 681a ldr r2, [r3, #0]
|
|
800b334: 4b0f ldr r3, [pc, #60] ; (800b374 <lwip_cyclic_timer+0x5c>)
|
|
800b336: 681b ldr r3, [r3, #0]
|
|
800b338: 4413 add r3, r2
|
|
800b33a: 60fb str r3, [r7, #12]
|
|
if (TIME_LESS_THAN(next_timeout_time, now)) {
|
|
800b33c: 68fa ldr r2, [r7, #12]
|
|
800b33e: 693b ldr r3, [r7, #16]
|
|
800b340: 1ad3 subs r3, r2, r3
|
|
800b342: 0fdb lsrs r3, r3, #31
|
|
800b344: f003 0301 and.w r3, r3, #1
|
|
800b348: b2db uxtb r3, r3
|
|
800b34a: 2b00 cmp r3, #0
|
|
800b34c: d009 beq.n 800b362 <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);
|
|
800b34e: 697b ldr r3, [r7, #20]
|
|
800b350: 681a ldr r2, [r3, #0]
|
|
800b352: 693b ldr r3, [r7, #16]
|
|
800b354: 4413 add r3, r2
|
|
800b356: 687a ldr r2, [r7, #4]
|
|
800b358: 4907 ldr r1, [pc, #28] ; (800b378 <lwip_cyclic_timer+0x60>)
|
|
800b35a: 4618 mov r0, r3
|
|
800b35c: f7ff ff6e bl 800b23c <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
|
|
}
|
|
}
|
|
800b360: e004 b.n 800b36c <lwip_cyclic_timer+0x54>
|
|
sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg);
|
|
800b362: 687a ldr r2, [r7, #4]
|
|
800b364: 4904 ldr r1, [pc, #16] ; (800b378 <lwip_cyclic_timer+0x60>)
|
|
800b366: 68f8 ldr r0, [r7, #12]
|
|
800b368: f7ff ff68 bl 800b23c <sys_timeout_abs>
|
|
}
|
|
800b36c: bf00 nop
|
|
800b36e: 3718 adds r7, #24
|
|
800b370: 46bd mov sp, r7
|
|
800b372: bd80 pop {r7, pc}
|
|
800b374: 20008c54 .word 0x20008c54
|
|
800b378: 0800b319 .word 0x0800b319
|
|
|
|
0800b37c <sys_timeouts_init>:
|
|
|
|
/** Initialize this module */
|
|
void sys_timeouts_init(void)
|
|
{
|
|
800b37c: b580 push {r7, lr}
|
|
800b37e: b082 sub sp, #8
|
|
800b380: 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++) {
|
|
800b382: 2301 movs r3, #1
|
|
800b384: 607b str r3, [r7, #4]
|
|
800b386: e00e b.n 800b3a6 <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]));
|
|
800b388: 4a0b ldr r2, [pc, #44] ; (800b3b8 <sys_timeouts_init+0x3c>)
|
|
800b38a: 687b ldr r3, [r7, #4]
|
|
800b38c: f852 0033 ldr.w r0, [r2, r3, lsl #3]
|
|
800b390: 687b ldr r3, [r7, #4]
|
|
800b392: 00db lsls r3, r3, #3
|
|
800b394: 4a08 ldr r2, [pc, #32] ; (800b3b8 <sys_timeouts_init+0x3c>)
|
|
800b396: 4413 add r3, r2
|
|
800b398: 461a mov r2, r3
|
|
800b39a: 4908 ldr r1, [pc, #32] ; (800b3bc <sys_timeouts_init+0x40>)
|
|
800b39c: f000 f810 bl 800b3c0 <sys_timeout>
|
|
for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) {
|
|
800b3a0: 687b ldr r3, [r7, #4]
|
|
800b3a2: 3301 adds r3, #1
|
|
800b3a4: 607b str r3, [r7, #4]
|
|
800b3a6: 687b ldr r3, [r7, #4]
|
|
800b3a8: 2b04 cmp r3, #4
|
|
800b3aa: d9ed bls.n 800b388 <sys_timeouts_init+0xc>
|
|
}
|
|
}
|
|
800b3ac: bf00 nop
|
|
800b3ae: bf00 nop
|
|
800b3b0: 3708 adds r7, #8
|
|
800b3b2: 46bd mov sp, r7
|
|
800b3b4: bd80 pop {r7, pc}
|
|
800b3b6: bf00 nop
|
|
800b3b8: 08017f14 .word 0x08017f14
|
|
800b3bc: 0800b319 .word 0x0800b319
|
|
|
|
0800b3c0 <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 */
|
|
{
|
|
800b3c0: b580 push {r7, lr}
|
|
800b3c2: b086 sub sp, #24
|
|
800b3c4: af00 add r7, sp, #0
|
|
800b3c6: 60f8 str r0, [r7, #12]
|
|
800b3c8: 60b9 str r1, [r7, #8]
|
|
800b3ca: 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));
|
|
800b3cc: 68fb ldr r3, [r7, #12]
|
|
800b3ce: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
|
|
800b3d2: d306 bcc.n 800b3e2 <sys_timeout+0x22>
|
|
800b3d4: 4b0a ldr r3, [pc, #40] ; (800b400 <sys_timeout+0x40>)
|
|
800b3d6: f240 1229 movw r2, #297 ; 0x129
|
|
800b3da: 490a ldr r1, [pc, #40] ; (800b404 <sys_timeout+0x44>)
|
|
800b3dc: 480a ldr r0, [pc, #40] ; (800b408 <sys_timeout+0x48>)
|
|
800b3de: f005 f88b bl 80104f8 <printf>
|
|
|
|
next_timeout_time = (u32_t)(sys_now() + msecs); /* overflow handled by TIME_LESS_THAN macro */
|
|
800b3e2: f7f8 fd8f bl 8003f04 <sys_now>
|
|
800b3e6: 4602 mov r2, r0
|
|
800b3e8: 68fb ldr r3, [r7, #12]
|
|
800b3ea: 4413 add r3, r2
|
|
800b3ec: 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);
|
|
800b3ee: 687a ldr r2, [r7, #4]
|
|
800b3f0: 68b9 ldr r1, [r7, #8]
|
|
800b3f2: 6978 ldr r0, [r7, #20]
|
|
800b3f4: f7ff ff22 bl 800b23c <sys_timeout_abs>
|
|
#endif
|
|
}
|
|
800b3f8: bf00 nop
|
|
800b3fa: 3718 adds r7, #24
|
|
800b3fc: 46bd mov sp, r7
|
|
800b3fe: bd80 pop {r7, pc}
|
|
800b400: 08016f20 .word 0x08016f20
|
|
800b404: 08016fbc .word 0x08016fbc
|
|
800b408: 08016f94 .word 0x08016f94
|
|
|
|
0800b40c <sys_check_timeouts>:
|
|
*
|
|
* Must be called periodically from your main loop.
|
|
*/
|
|
void
|
|
sys_check_timeouts(void)
|
|
{
|
|
800b40c: b580 push {r7, lr}
|
|
800b40e: b084 sub sp, #16
|
|
800b410: 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();
|
|
800b412: f7f8 fd77 bl 8003f04 <sys_now>
|
|
800b416: 60f8 str r0, [r7, #12]
|
|
do {
|
|
struct sys_timeo *tmptimeout;
|
|
sys_timeout_handler handler;
|
|
void *arg;
|
|
|
|
PBUF_CHECK_FREE_OOSEQ();
|
|
800b418: 4b1a ldr r3, [pc, #104] ; (800b484 <sys_check_timeouts+0x78>)
|
|
800b41a: 781b ldrb r3, [r3, #0]
|
|
800b41c: b2db uxtb r3, r3
|
|
800b41e: 2b00 cmp r3, #0
|
|
800b420: d001 beq.n 800b426 <sys_check_timeouts+0x1a>
|
|
800b422: f7f9 ffb7 bl 8005394 <pbuf_free_ooseq>
|
|
|
|
tmptimeout = next_timeout;
|
|
800b426: 4b18 ldr r3, [pc, #96] ; (800b488 <sys_check_timeouts+0x7c>)
|
|
800b428: 681b ldr r3, [r3, #0]
|
|
800b42a: 60bb str r3, [r7, #8]
|
|
if (tmptimeout == NULL) {
|
|
800b42c: 68bb ldr r3, [r7, #8]
|
|
800b42e: 2b00 cmp r3, #0
|
|
800b430: d022 beq.n 800b478 <sys_check_timeouts+0x6c>
|
|
return;
|
|
}
|
|
|
|
if (TIME_LESS_THAN(now, tmptimeout->time)) {
|
|
800b432: 68bb ldr r3, [r7, #8]
|
|
800b434: 685b ldr r3, [r3, #4]
|
|
800b436: 68fa ldr r2, [r7, #12]
|
|
800b438: 1ad3 subs r3, r2, r3
|
|
800b43a: 0fdb lsrs r3, r3, #31
|
|
800b43c: f003 0301 and.w r3, r3, #1
|
|
800b440: b2db uxtb r3, r3
|
|
800b442: 2b00 cmp r3, #0
|
|
800b444: d11a bne.n 800b47c <sys_check_timeouts+0x70>
|
|
return;
|
|
}
|
|
|
|
/* Timeout has expired */
|
|
next_timeout = tmptimeout->next;
|
|
800b446: 68bb ldr r3, [r7, #8]
|
|
800b448: 681b ldr r3, [r3, #0]
|
|
800b44a: 4a0f ldr r2, [pc, #60] ; (800b488 <sys_check_timeouts+0x7c>)
|
|
800b44c: 6013 str r3, [r2, #0]
|
|
handler = tmptimeout->h;
|
|
800b44e: 68bb ldr r3, [r7, #8]
|
|
800b450: 689b ldr r3, [r3, #8]
|
|
800b452: 607b str r3, [r7, #4]
|
|
arg = tmptimeout->arg;
|
|
800b454: 68bb ldr r3, [r7, #8]
|
|
800b456: 68db ldr r3, [r3, #12]
|
|
800b458: 603b str r3, [r7, #0]
|
|
current_timeout_due_time = tmptimeout->time;
|
|
800b45a: 68bb ldr r3, [r7, #8]
|
|
800b45c: 685b ldr r3, [r3, #4]
|
|
800b45e: 4a0b ldr r2, [pc, #44] ; (800b48c <sys_check_timeouts+0x80>)
|
|
800b460: 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);
|
|
800b462: 68b9 ldr r1, [r7, #8]
|
|
800b464: 2006 movs r0, #6
|
|
800b466: f7f9 fc4d bl 8004d04 <memp_free>
|
|
if (handler != NULL) {
|
|
800b46a: 687b ldr r3, [r7, #4]
|
|
800b46c: 2b00 cmp r3, #0
|
|
800b46e: d0d3 beq.n 800b418 <sys_check_timeouts+0xc>
|
|
handler(arg);
|
|
800b470: 687b ldr r3, [r7, #4]
|
|
800b472: 6838 ldr r0, [r7, #0]
|
|
800b474: 4798 blx r3
|
|
do {
|
|
800b476: e7cf b.n 800b418 <sys_check_timeouts+0xc>
|
|
return;
|
|
800b478: bf00 nop
|
|
800b47a: e000 b.n 800b47e <sys_check_timeouts+0x72>
|
|
return;
|
|
800b47c: bf00 nop
|
|
}
|
|
LWIP_TCPIP_THREAD_ALIVE();
|
|
|
|
/* Repeat until all expired timers have been called */
|
|
} while (1);
|
|
}
|
|
800b47e: 3710 adds r7, #16
|
|
800b480: 46bd mov sp, r7
|
|
800b482: bd80 pop {r7, pc}
|
|
800b484: 20008bfd .word 0x20008bfd
|
|
800b488: 20008c50 .word 0x20008c50
|
|
800b48c: 20008c54 .word 0x20008c54
|
|
|
|
0800b490 <udp_init>:
|
|
/**
|
|
* Initialize this module.
|
|
*/
|
|
void
|
|
udp_init(void)
|
|
{
|
|
800b490: b580 push {r7, lr}
|
|
800b492: af00 add r7, sp, #0
|
|
#ifdef LWIP_RAND
|
|
udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());
|
|
800b494: f005 f842 bl 801051c <rand>
|
|
800b498: 4603 mov r3, r0
|
|
800b49a: b29b uxth r3, r3
|
|
800b49c: f3c3 030d ubfx r3, r3, #0, #14
|
|
800b4a0: b29b uxth r3, r3
|
|
800b4a2: f5a3 4380 sub.w r3, r3, #16384 ; 0x4000
|
|
800b4a6: b29a uxth r2, r3
|
|
800b4a8: 4b01 ldr r3, [pc, #4] ; (800b4b0 <udp_init+0x20>)
|
|
800b4aa: 801a strh r2, [r3, #0]
|
|
#endif /* LWIP_RAND */
|
|
}
|
|
800b4ac: bf00 nop
|
|
800b4ae: bd80 pop {r7, pc}
|
|
800b4b0: 20000028 .word 0x20000028
|
|
|
|
0800b4b4 <udp_new_port>:
|
|
*
|
|
* @return a new (free) local UDP port number
|
|
*/
|
|
static u16_t
|
|
udp_new_port(void)
|
|
{
|
|
800b4b4: b480 push {r7}
|
|
800b4b6: b083 sub sp, #12
|
|
800b4b8: af00 add r7, sp, #0
|
|
u16_t n = 0;
|
|
800b4ba: 2300 movs r3, #0
|
|
800b4bc: 80fb strh r3, [r7, #6]
|
|
struct udp_pcb *pcb;
|
|
|
|
again:
|
|
if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) {
|
|
800b4be: 4b17 ldr r3, [pc, #92] ; (800b51c <udp_new_port+0x68>)
|
|
800b4c0: 881b ldrh r3, [r3, #0]
|
|
800b4c2: 1c5a adds r2, r3, #1
|
|
800b4c4: b291 uxth r1, r2
|
|
800b4c6: 4a15 ldr r2, [pc, #84] ; (800b51c <udp_new_port+0x68>)
|
|
800b4c8: 8011 strh r1, [r2, #0]
|
|
800b4ca: f64f 72ff movw r2, #65535 ; 0xffff
|
|
800b4ce: 4293 cmp r3, r2
|
|
800b4d0: d103 bne.n 800b4da <udp_new_port+0x26>
|
|
udp_port = UDP_LOCAL_PORT_RANGE_START;
|
|
800b4d2: 4b12 ldr r3, [pc, #72] ; (800b51c <udp_new_port+0x68>)
|
|
800b4d4: f44f 4240 mov.w r2, #49152 ; 0xc000
|
|
800b4d8: 801a strh r2, [r3, #0]
|
|
}
|
|
/* Check all PCBs. */
|
|
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
|
|
800b4da: 4b11 ldr r3, [pc, #68] ; (800b520 <udp_new_port+0x6c>)
|
|
800b4dc: 681b ldr r3, [r3, #0]
|
|
800b4de: 603b str r3, [r7, #0]
|
|
800b4e0: e011 b.n 800b506 <udp_new_port+0x52>
|
|
if (pcb->local_port == udp_port) {
|
|
800b4e2: 683b ldr r3, [r7, #0]
|
|
800b4e4: 8a5a ldrh r2, [r3, #18]
|
|
800b4e6: 4b0d ldr r3, [pc, #52] ; (800b51c <udp_new_port+0x68>)
|
|
800b4e8: 881b ldrh r3, [r3, #0]
|
|
800b4ea: 429a cmp r2, r3
|
|
800b4ec: d108 bne.n 800b500 <udp_new_port+0x4c>
|
|
if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) {
|
|
800b4ee: 88fb ldrh r3, [r7, #6]
|
|
800b4f0: 3301 adds r3, #1
|
|
800b4f2: 80fb strh r3, [r7, #6]
|
|
800b4f4: 88fb ldrh r3, [r7, #6]
|
|
800b4f6: f5b3 4f80 cmp.w r3, #16384 ; 0x4000
|
|
800b4fa: d3e0 bcc.n 800b4be <udp_new_port+0xa>
|
|
return 0;
|
|
800b4fc: 2300 movs r3, #0
|
|
800b4fe: e007 b.n 800b510 <udp_new_port+0x5c>
|
|
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
|
|
800b500: 683b ldr r3, [r7, #0]
|
|
800b502: 68db ldr r3, [r3, #12]
|
|
800b504: 603b str r3, [r7, #0]
|
|
800b506: 683b ldr r3, [r7, #0]
|
|
800b508: 2b00 cmp r3, #0
|
|
800b50a: d1ea bne.n 800b4e2 <udp_new_port+0x2e>
|
|
}
|
|
goto again;
|
|
}
|
|
}
|
|
return udp_port;
|
|
800b50c: 4b03 ldr r3, [pc, #12] ; (800b51c <udp_new_port+0x68>)
|
|
800b50e: 881b ldrh r3, [r3, #0]
|
|
}
|
|
800b510: 4618 mov r0, r3
|
|
800b512: 370c adds r7, #12
|
|
800b514: 46bd mov sp, r7
|
|
800b516: f85d 7b04 ldr.w r7, [sp], #4
|
|
800b51a: 4770 bx lr
|
|
800b51c: 20000028 .word 0x20000028
|
|
800b520: 20008c5c .word 0x20008c5c
|
|
|
|
0800b524 <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)
|
|
{
|
|
800b524: b580 push {r7, lr}
|
|
800b526: b084 sub sp, #16
|
|
800b528: af00 add r7, sp, #0
|
|
800b52a: 60f8 str r0, [r7, #12]
|
|
800b52c: 60b9 str r1, [r7, #8]
|
|
800b52e: 4613 mov r3, r2
|
|
800b530: 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);
|
|
800b532: 68fb ldr r3, [r7, #12]
|
|
800b534: 2b00 cmp r3, #0
|
|
800b536: d105 bne.n 800b544 <udp_input_local_match+0x20>
|
|
800b538: 4b27 ldr r3, [pc, #156] ; (800b5d8 <udp_input_local_match+0xb4>)
|
|
800b53a: 2287 movs r2, #135 ; 0x87
|
|
800b53c: 4927 ldr r1, [pc, #156] ; (800b5dc <udp_input_local_match+0xb8>)
|
|
800b53e: 4828 ldr r0, [pc, #160] ; (800b5e0 <udp_input_local_match+0xbc>)
|
|
800b540: f004 ffda bl 80104f8 <printf>
|
|
LWIP_ASSERT("udp_input_local_match: invalid netif", inp != NULL);
|
|
800b544: 68bb ldr r3, [r7, #8]
|
|
800b546: 2b00 cmp r3, #0
|
|
800b548: d105 bne.n 800b556 <udp_input_local_match+0x32>
|
|
800b54a: 4b23 ldr r3, [pc, #140] ; (800b5d8 <udp_input_local_match+0xb4>)
|
|
800b54c: 2288 movs r2, #136 ; 0x88
|
|
800b54e: 4925 ldr r1, [pc, #148] ; (800b5e4 <udp_input_local_match+0xc0>)
|
|
800b550: 4823 ldr r0, [pc, #140] ; (800b5e0 <udp_input_local_match+0xbc>)
|
|
800b552: f004 ffd1 bl 80104f8 <printf>
|
|
|
|
/* check if PCB is bound to specific netif */
|
|
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
|
|
800b556: 68fb ldr r3, [r7, #12]
|
|
800b558: 7a1b ldrb r3, [r3, #8]
|
|
800b55a: 2b00 cmp r3, #0
|
|
800b55c: d00b beq.n 800b576 <udp_input_local_match+0x52>
|
|
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
|
|
800b55e: 68fb ldr r3, [r7, #12]
|
|
800b560: 7a1a ldrb r2, [r3, #8]
|
|
800b562: 4b21 ldr r3, [pc, #132] ; (800b5e8 <udp_input_local_match+0xc4>)
|
|
800b564: 685b ldr r3, [r3, #4]
|
|
800b566: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
|
|
800b56a: 3301 adds r3, #1
|
|
800b56c: b2db uxtb r3, r3
|
|
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
|
|
800b56e: 429a cmp r2, r3
|
|
800b570: d001 beq.n 800b576 <udp_input_local_match+0x52>
|
|
return 0;
|
|
800b572: 2300 movs r3, #0
|
|
800b574: e02b b.n 800b5ce <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) {
|
|
800b576: 79fb ldrb r3, [r7, #7]
|
|
800b578: 2b00 cmp r3, #0
|
|
800b57a: d018 beq.n 800b5ae <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)) ||
|
|
800b57c: 68fb ldr r3, [r7, #12]
|
|
800b57e: 2b00 cmp r3, #0
|
|
800b580: d013 beq.n 800b5aa <udp_input_local_match+0x86>
|
|
800b582: 68fb ldr r3, [r7, #12]
|
|
800b584: 681b ldr r3, [r3, #0]
|
|
800b586: 2b00 cmp r3, #0
|
|
800b588: d00f beq.n 800b5aa <udp_input_local_match+0x86>
|
|
((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) ||
|
|
800b58a: 4b17 ldr r3, [pc, #92] ; (800b5e8 <udp_input_local_match+0xc4>)
|
|
800b58c: 695b ldr r3, [r3, #20]
|
|
if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
|
|
800b58e: f1b3 3fff cmp.w r3, #4294967295
|
|
800b592: d00a beq.n 800b5aa <udp_input_local_match+0x86>
|
|
ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) {
|
|
800b594: 68fb ldr r3, [r7, #12]
|
|
800b596: 681a ldr r2, [r3, #0]
|
|
800b598: 4b13 ldr r3, [pc, #76] ; (800b5e8 <udp_input_local_match+0xc4>)
|
|
800b59a: 695b ldr r3, [r3, #20]
|
|
800b59c: 405a eors r2, r3
|
|
800b59e: 68bb ldr r3, [r7, #8]
|
|
800b5a0: 3308 adds r3, #8
|
|
800b5a2: 681b ldr r3, [r3, #0]
|
|
800b5a4: 4013 ands r3, r2
|
|
((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) ||
|
|
800b5a6: 2b00 cmp r3, #0
|
|
800b5a8: d110 bne.n 800b5cc <udp_input_local_match+0xa8>
|
|
return 1;
|
|
800b5aa: 2301 movs r3, #1
|
|
800b5ac: e00f b.n 800b5ce <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())) {
|
|
800b5ae: 68fb ldr r3, [r7, #12]
|
|
800b5b0: 2b00 cmp r3, #0
|
|
800b5b2: d009 beq.n 800b5c8 <udp_input_local_match+0xa4>
|
|
800b5b4: 68fb ldr r3, [r7, #12]
|
|
800b5b6: 681b ldr r3, [r3, #0]
|
|
800b5b8: 2b00 cmp r3, #0
|
|
800b5ba: d005 beq.n 800b5c8 <udp_input_local_match+0xa4>
|
|
800b5bc: 68fb ldr r3, [r7, #12]
|
|
800b5be: 681a ldr r2, [r3, #0]
|
|
800b5c0: 4b09 ldr r3, [pc, #36] ; (800b5e8 <udp_input_local_match+0xc4>)
|
|
800b5c2: 695b ldr r3, [r3, #20]
|
|
800b5c4: 429a cmp r2, r3
|
|
800b5c6: d101 bne.n 800b5cc <udp_input_local_match+0xa8>
|
|
return 1;
|
|
800b5c8: 2301 movs r3, #1
|
|
800b5ca: e000 b.n 800b5ce <udp_input_local_match+0xaa>
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
800b5cc: 2300 movs r3, #0
|
|
}
|
|
800b5ce: 4618 mov r0, r3
|
|
800b5d0: 3710 adds r7, #16
|
|
800b5d2: 46bd mov sp, r7
|
|
800b5d4: bd80 pop {r7, pc}
|
|
800b5d6: bf00 nop
|
|
800b5d8: 08017008 .word 0x08017008
|
|
800b5dc: 08017038 .word 0x08017038
|
|
800b5e0: 0801705c .word 0x0801705c
|
|
800b5e4: 08017084 .word 0x08017084
|
|
800b5e8: 20005670 .word 0x20005670
|
|
|
|
0800b5ec <udp_input>:
|
|
* @param inp network interface on which the datagram was received.
|
|
*
|
|
*/
|
|
void
|
|
udp_input(struct pbuf *p, struct netif *inp)
|
|
{
|
|
800b5ec: b590 push {r4, r7, lr}
|
|
800b5ee: b08d sub sp, #52 ; 0x34
|
|
800b5f0: af02 add r7, sp, #8
|
|
800b5f2: 6078 str r0, [r7, #4]
|
|
800b5f4: 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;
|
|
800b5f6: 2300 movs r3, #0
|
|
800b5f8: 76fb strb r3, [r7, #27]
|
|
|
|
LWIP_UNUSED_ARG(inp);
|
|
|
|
LWIP_ASSERT_CORE_LOCKED();
|
|
|
|
LWIP_ASSERT("udp_input: invalid pbuf", p != NULL);
|
|
800b5fa: 687b ldr r3, [r7, #4]
|
|
800b5fc: 2b00 cmp r3, #0
|
|
800b5fe: d105 bne.n 800b60c <udp_input+0x20>
|
|
800b600: 4b7c ldr r3, [pc, #496] ; (800b7f4 <udp_input+0x208>)
|
|
800b602: 22cf movs r2, #207 ; 0xcf
|
|
800b604: 497c ldr r1, [pc, #496] ; (800b7f8 <udp_input+0x20c>)
|
|
800b606: 487d ldr r0, [pc, #500] ; (800b7fc <udp_input+0x210>)
|
|
800b608: f004 ff76 bl 80104f8 <printf>
|
|
LWIP_ASSERT("udp_input: invalid netif", inp != NULL);
|
|
800b60c: 683b ldr r3, [r7, #0]
|
|
800b60e: 2b00 cmp r3, #0
|
|
800b610: d105 bne.n 800b61e <udp_input+0x32>
|
|
800b612: 4b78 ldr r3, [pc, #480] ; (800b7f4 <udp_input+0x208>)
|
|
800b614: 22d0 movs r2, #208 ; 0xd0
|
|
800b616: 497a ldr r1, [pc, #488] ; (800b800 <udp_input+0x214>)
|
|
800b618: 4878 ldr r0, [pc, #480] ; (800b7fc <udp_input+0x210>)
|
|
800b61a: f004 ff6d bl 80104f8 <printf>
|
|
PERF_START;
|
|
|
|
UDP_STATS_INC(udp.recv);
|
|
|
|
/* Check minimum length (UDP header) */
|
|
if (p->len < UDP_HLEN) {
|
|
800b61e: 687b ldr r3, [r7, #4]
|
|
800b620: 895b ldrh r3, [r3, #10]
|
|
800b622: 2b07 cmp r3, #7
|
|
800b624: d803 bhi.n 800b62e <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);
|
|
800b626: 6878 ldr r0, [r7, #4]
|
|
800b628: f7fa f9ee bl 8005a08 <pbuf_free>
|
|
goto end;
|
|
800b62c: e0de b.n 800b7ec <udp_input+0x200>
|
|
}
|
|
|
|
udphdr = (struct udp_hdr *)p->payload;
|
|
800b62e: 687b ldr r3, [r7, #4]
|
|
800b630: 685b ldr r3, [r3, #4]
|
|
800b632: 617b str r3, [r7, #20]
|
|
|
|
/* is broadcast packet ? */
|
|
broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif());
|
|
800b634: 4b73 ldr r3, [pc, #460] ; (800b804 <udp_input+0x218>)
|
|
800b636: 695b ldr r3, [r3, #20]
|
|
800b638: 4a72 ldr r2, [pc, #456] ; (800b804 <udp_input+0x218>)
|
|
800b63a: 6812 ldr r2, [r2, #0]
|
|
800b63c: 4611 mov r1, r2
|
|
800b63e: 4618 mov r0, r3
|
|
800b640: f003 fe62 bl 800f308 <ip4_addr_isbroadcast_u32>
|
|
800b644: 4603 mov r3, r0
|
|
800b646: 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);
|
|
800b648: 697b ldr r3, [r7, #20]
|
|
800b64a: 881b ldrh r3, [r3, #0]
|
|
800b64c: b29b uxth r3, r3
|
|
800b64e: 4618 mov r0, r3
|
|
800b650: f7f8 fe70 bl 8004334 <lwip_htons>
|
|
800b654: 4603 mov r3, r0
|
|
800b656: 823b strh r3, [r7, #16]
|
|
dest = lwip_ntohs(udphdr->dest);
|
|
800b658: 697b ldr r3, [r7, #20]
|
|
800b65a: 885b ldrh r3, [r3, #2]
|
|
800b65c: b29b uxth r3, r3
|
|
800b65e: 4618 mov r0, r3
|
|
800b660: f7f8 fe68 bl 8004334 <lwip_htons>
|
|
800b664: 4603 mov r3, r0
|
|
800b666: 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;
|
|
800b668: 2300 movs r3, #0
|
|
800b66a: 627b str r3, [r7, #36] ; 0x24
|
|
prev = NULL;
|
|
800b66c: 2300 movs r3, #0
|
|
800b66e: 623b str r3, [r7, #32]
|
|
uncon_pcb = NULL;
|
|
800b670: 2300 movs r3, #0
|
|
800b672: 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) {
|
|
800b674: 4b64 ldr r3, [pc, #400] ; (800b808 <udp_input+0x21c>)
|
|
800b676: 681b ldr r3, [r3, #0]
|
|
800b678: 627b str r3, [r7, #36] ; 0x24
|
|
800b67a: e054 b.n 800b726 <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) &&
|
|
800b67c: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b67e: 8a5b ldrh r3, [r3, #18]
|
|
800b680: 89fa ldrh r2, [r7, #14]
|
|
800b682: 429a cmp r2, r3
|
|
800b684: d14a bne.n 800b71c <udp_input+0x130>
|
|
(udp_input_local_match(pcb, inp, broadcast) != 0)) {
|
|
800b686: 7cfb ldrb r3, [r7, #19]
|
|
800b688: 461a mov r2, r3
|
|
800b68a: 6839 ldr r1, [r7, #0]
|
|
800b68c: 6a78 ldr r0, [r7, #36] ; 0x24
|
|
800b68e: f7ff ff49 bl 800b524 <udp_input_local_match>
|
|
800b692: 4603 mov r3, r0
|
|
if ((pcb->local_port == dest) &&
|
|
800b694: 2b00 cmp r3, #0
|
|
800b696: d041 beq.n 800b71c <udp_input+0x130>
|
|
if ((pcb->flags & UDP_FLAGS_CONNECTED) == 0) {
|
|
800b698: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b69a: 7c1b ldrb r3, [r3, #16]
|
|
800b69c: f003 0304 and.w r3, r3, #4
|
|
800b6a0: 2b00 cmp r3, #0
|
|
800b6a2: d11d bne.n 800b6e0 <udp_input+0xf4>
|
|
if (uncon_pcb == NULL) {
|
|
800b6a4: 69fb ldr r3, [r7, #28]
|
|
800b6a6: 2b00 cmp r3, #0
|
|
800b6a8: d102 bne.n 800b6b0 <udp_input+0xc4>
|
|
/* the first unconnected matching PCB */
|
|
uncon_pcb = pcb;
|
|
800b6aa: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b6ac: 61fb str r3, [r7, #28]
|
|
800b6ae: e017 b.n 800b6e0 <udp_input+0xf4>
|
|
#if LWIP_IPV4
|
|
} else if (broadcast && ip4_current_dest_addr()->addr == IPADDR_BROADCAST) {
|
|
800b6b0: 7cfb ldrb r3, [r7, #19]
|
|
800b6b2: 2b00 cmp r3, #0
|
|
800b6b4: d014 beq.n 800b6e0 <udp_input+0xf4>
|
|
800b6b6: 4b53 ldr r3, [pc, #332] ; (800b804 <udp_input+0x218>)
|
|
800b6b8: 695b ldr r3, [r3, #20]
|
|
800b6ba: f1b3 3fff cmp.w r3, #4294967295
|
|
800b6be: d10f bne.n 800b6e0 <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))) {
|
|
800b6c0: 69fb ldr r3, [r7, #28]
|
|
800b6c2: 681a ldr r2, [r3, #0]
|
|
800b6c4: 683b ldr r3, [r7, #0]
|
|
800b6c6: 3304 adds r3, #4
|
|
800b6c8: 681b ldr r3, [r3, #0]
|
|
800b6ca: 429a cmp r2, r3
|
|
800b6cc: d008 beq.n 800b6e0 <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))) {
|
|
800b6ce: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b6d0: 681a ldr r2, [r3, #0]
|
|
800b6d2: 683b ldr r3, [r7, #0]
|
|
800b6d4: 3304 adds r3, #4
|
|
800b6d6: 681b ldr r3, [r3, #0]
|
|
800b6d8: 429a cmp r2, r3
|
|
800b6da: d101 bne.n 800b6e0 <udp_input+0xf4>
|
|
/* better match */
|
|
uncon_pcb = pcb;
|
|
800b6dc: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b6de: 61fb str r3, [r7, #28]
|
|
}
|
|
#endif /* SO_REUSE */
|
|
}
|
|
|
|
/* compare PCB remote addr+port to UDP source addr+port */
|
|
if ((pcb->remote_port == src) &&
|
|
800b6e0: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b6e2: 8a9b ldrh r3, [r3, #20]
|
|
800b6e4: 8a3a ldrh r2, [r7, #16]
|
|
800b6e6: 429a cmp r2, r3
|
|
800b6e8: d118 bne.n 800b71c <udp_input+0x130>
|
|
(ip_addr_isany_val(pcb->remote_ip) ||
|
|
800b6ea: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b6ec: 685b ldr r3, [r3, #4]
|
|
if ((pcb->remote_port == src) &&
|
|
800b6ee: 2b00 cmp r3, #0
|
|
800b6f0: d005 beq.n 800b6fe <udp_input+0x112>
|
|
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) {
|
|
800b6f2: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b6f4: 685a ldr r2, [r3, #4]
|
|
800b6f6: 4b43 ldr r3, [pc, #268] ; (800b804 <udp_input+0x218>)
|
|
800b6f8: 691b ldr r3, [r3, #16]
|
|
(ip_addr_isany_val(pcb->remote_ip) ||
|
|
800b6fa: 429a cmp r2, r3
|
|
800b6fc: d10e bne.n 800b71c <udp_input+0x130>
|
|
/* the first fully matching PCB */
|
|
if (prev != NULL) {
|
|
800b6fe: 6a3b ldr r3, [r7, #32]
|
|
800b700: 2b00 cmp r3, #0
|
|
800b702: d014 beq.n 800b72e <udp_input+0x142>
|
|
/* move the pcb to the front of udp_pcbs so that is
|
|
found faster next time */
|
|
prev->next = pcb->next;
|
|
800b704: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b706: 68da ldr r2, [r3, #12]
|
|
800b708: 6a3b ldr r3, [r7, #32]
|
|
800b70a: 60da str r2, [r3, #12]
|
|
pcb->next = udp_pcbs;
|
|
800b70c: 4b3e ldr r3, [pc, #248] ; (800b808 <udp_input+0x21c>)
|
|
800b70e: 681a ldr r2, [r3, #0]
|
|
800b710: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b712: 60da str r2, [r3, #12]
|
|
udp_pcbs = pcb;
|
|
800b714: 4a3c ldr r2, [pc, #240] ; (800b808 <udp_input+0x21c>)
|
|
800b716: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b718: 6013 str r3, [r2, #0]
|
|
} else {
|
|
UDP_STATS_INC(udp.cachehit);
|
|
}
|
|
break;
|
|
800b71a: e008 b.n 800b72e <udp_input+0x142>
|
|
}
|
|
}
|
|
|
|
prev = pcb;
|
|
800b71c: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b71e: 623b str r3, [r7, #32]
|
|
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
|
|
800b720: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b722: 68db ldr r3, [r3, #12]
|
|
800b724: 627b str r3, [r7, #36] ; 0x24
|
|
800b726: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b728: 2b00 cmp r3, #0
|
|
800b72a: d1a7 bne.n 800b67c <udp_input+0x90>
|
|
800b72c: e000 b.n 800b730 <udp_input+0x144>
|
|
break;
|
|
800b72e: bf00 nop
|
|
}
|
|
/* no fully matching pcb found? then look for an unconnected pcb */
|
|
if (pcb == NULL) {
|
|
800b730: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b732: 2b00 cmp r3, #0
|
|
800b734: d101 bne.n 800b73a <udp_input+0x14e>
|
|
pcb = uncon_pcb;
|
|
800b736: 69fb ldr r3, [r7, #28]
|
|
800b738: 627b str r3, [r7, #36] ; 0x24
|
|
}
|
|
|
|
/* Check checksum if this is a match or if it was directed at us. */
|
|
if (pcb != NULL) {
|
|
800b73a: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b73c: 2b00 cmp r3, #0
|
|
800b73e: d002 beq.n 800b746 <udp_input+0x15a>
|
|
for_us = 1;
|
|
800b740: 2301 movs r3, #1
|
|
800b742: 76fb strb r3, [r7, #27]
|
|
800b744: e00a b.n 800b75c <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());
|
|
800b746: 683b ldr r3, [r7, #0]
|
|
800b748: 3304 adds r3, #4
|
|
800b74a: 681a ldr r2, [r3, #0]
|
|
800b74c: 4b2d ldr r3, [pc, #180] ; (800b804 <udp_input+0x218>)
|
|
800b74e: 695b ldr r3, [r3, #20]
|
|
800b750: 429a cmp r2, r3
|
|
800b752: bf0c ite eq
|
|
800b754: 2301 moveq r3, #1
|
|
800b756: 2300 movne r3, #0
|
|
800b758: b2db uxtb r3, r3
|
|
800b75a: 76fb strb r3, [r7, #27]
|
|
}
|
|
#endif /* LWIP_IPV4 */
|
|
}
|
|
|
|
if (for_us) {
|
|
800b75c: 7efb ldrb r3, [r7, #27]
|
|
800b75e: 2b00 cmp r3, #0
|
|
800b760: d041 beq.n 800b7e6 <udp_input+0x1fa>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endif /* CHECKSUM_CHECK_UDP */
|
|
if (pbuf_remove_header(p, UDP_HLEN)) {
|
|
800b762: 2108 movs r1, #8
|
|
800b764: 6878 ldr r0, [r7, #4]
|
|
800b766: f7fa f8c9 bl 80058fc <pbuf_remove_header>
|
|
800b76a: 4603 mov r3, r0
|
|
800b76c: 2b00 cmp r3, #0
|
|
800b76e: d00a beq.n 800b786 <udp_input+0x19a>
|
|
/* Can we cope with this failing? Just assert for now */
|
|
LWIP_ASSERT("pbuf_remove_header failed\n", 0);
|
|
800b770: 4b20 ldr r3, [pc, #128] ; (800b7f4 <udp_input+0x208>)
|
|
800b772: f44f 72b8 mov.w r2, #368 ; 0x170
|
|
800b776: 4925 ldr r1, [pc, #148] ; (800b80c <udp_input+0x220>)
|
|
800b778: 4820 ldr r0, [pc, #128] ; (800b7fc <udp_input+0x210>)
|
|
800b77a: f004 febd bl 80104f8 <printf>
|
|
UDP_STATS_INC(udp.drop);
|
|
MIB2_STATS_INC(mib2.udpinerrors);
|
|
pbuf_free(p);
|
|
800b77e: 6878 ldr r0, [r7, #4]
|
|
800b780: f7fa f942 bl 8005a08 <pbuf_free>
|
|
goto end;
|
|
800b784: e032 b.n 800b7ec <udp_input+0x200>
|
|
}
|
|
|
|
if (pcb != NULL) {
|
|
800b786: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b788: 2b00 cmp r3, #0
|
|
800b78a: d012 beq.n 800b7b2 <udp_input+0x1c6>
|
|
}
|
|
}
|
|
}
|
|
#endif /* SO_REUSE && SO_REUSE_RXTOALL */
|
|
/* callback */
|
|
if (pcb->recv != NULL) {
|
|
800b78c: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b78e: 699b ldr r3, [r3, #24]
|
|
800b790: 2b00 cmp r3, #0
|
|
800b792: d00a beq.n 800b7aa <udp_input+0x1be>
|
|
/* now the recv function is responsible for freeing p */
|
|
pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src);
|
|
800b794: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b796: 699c ldr r4, [r3, #24]
|
|
800b798: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800b79a: 69d8 ldr r0, [r3, #28]
|
|
800b79c: 8a3b ldrh r3, [r7, #16]
|
|
800b79e: 9300 str r3, [sp, #0]
|
|
800b7a0: 4b1b ldr r3, [pc, #108] ; (800b810 <udp_input+0x224>)
|
|
800b7a2: 687a ldr r2, [r7, #4]
|
|
800b7a4: 6a79 ldr r1, [r7, #36] ; 0x24
|
|
800b7a6: 47a0 blx r4
|
|
} else {
|
|
pbuf_free(p);
|
|
}
|
|
end:
|
|
PERF_STOP("udp_input");
|
|
return;
|
|
800b7a8: e021 b.n 800b7ee <udp_input+0x202>
|
|
pbuf_free(p);
|
|
800b7aa: 6878 ldr r0, [r7, #4]
|
|
800b7ac: f7fa f92c bl 8005a08 <pbuf_free>
|
|
goto end;
|
|
800b7b0: e01c b.n 800b7ec <udp_input+0x200>
|
|
if (!broadcast && !ip_addr_ismulticast(ip_current_dest_addr())) {
|
|
800b7b2: 7cfb ldrb r3, [r7, #19]
|
|
800b7b4: 2b00 cmp r3, #0
|
|
800b7b6: d112 bne.n 800b7de <udp_input+0x1f2>
|
|
800b7b8: 4b12 ldr r3, [pc, #72] ; (800b804 <udp_input+0x218>)
|
|
800b7ba: 695b ldr r3, [r3, #20]
|
|
800b7bc: f003 03f0 and.w r3, r3, #240 ; 0xf0
|
|
800b7c0: 2be0 cmp r3, #224 ; 0xe0
|
|
800b7c2: d00c beq.n 800b7de <udp_input+0x1f2>
|
|
pbuf_header_force(p, (s16_t)(ip_current_header_tot_len() + UDP_HLEN));
|
|
800b7c4: 4b0f ldr r3, [pc, #60] ; (800b804 <udp_input+0x218>)
|
|
800b7c6: 899b ldrh r3, [r3, #12]
|
|
800b7c8: 3308 adds r3, #8
|
|
800b7ca: b29b uxth r3, r3
|
|
800b7cc: b21b sxth r3, r3
|
|
800b7ce: 4619 mov r1, r3
|
|
800b7d0: 6878 ldr r0, [r7, #4]
|
|
800b7d2: f7fa f906 bl 80059e2 <pbuf_header_force>
|
|
icmp_port_unreach(ip_current_is_v6(), p);
|
|
800b7d6: 2103 movs r1, #3
|
|
800b7d8: 6878 ldr r0, [r7, #4]
|
|
800b7da: f003 fa57 bl 800ec8c <icmp_dest_unreach>
|
|
pbuf_free(p);
|
|
800b7de: 6878 ldr r0, [r7, #4]
|
|
800b7e0: f7fa f912 bl 8005a08 <pbuf_free>
|
|
return;
|
|
800b7e4: e003 b.n 800b7ee <udp_input+0x202>
|
|
pbuf_free(p);
|
|
800b7e6: 6878 ldr r0, [r7, #4]
|
|
800b7e8: f7fa f90e bl 8005a08 <pbuf_free>
|
|
return;
|
|
800b7ec: bf00 nop
|
|
UDP_STATS_INC(udp.drop);
|
|
MIB2_STATS_INC(mib2.udpinerrors);
|
|
pbuf_free(p);
|
|
PERF_STOP("udp_input");
|
|
#endif /* CHECKSUM_CHECK_UDP */
|
|
}
|
|
800b7ee: 372c adds r7, #44 ; 0x2c
|
|
800b7f0: 46bd mov sp, r7
|
|
800b7f2: bd90 pop {r4, r7, pc}
|
|
800b7f4: 08017008 .word 0x08017008
|
|
800b7f8: 080170ac .word 0x080170ac
|
|
800b7fc: 0801705c .word 0x0801705c
|
|
800b800: 080170c4 .word 0x080170c4
|
|
800b804: 20005670 .word 0x20005670
|
|
800b808: 20008c5c .word 0x20008c5c
|
|
800b80c: 080170e0 .word 0x080170e0
|
|
800b810: 20005680 .word 0x20005680
|
|
|
|
0800b814 <udp_sendto>:
|
|
* @see udp_disconnect() udp_send()
|
|
*/
|
|
err_t
|
|
udp_sendto(struct udp_pcb *pcb, struct pbuf *p,
|
|
const ip_addr_t *dst_ip, u16_t dst_port)
|
|
{
|
|
800b814: b580 push {r7, lr}
|
|
800b816: b088 sub sp, #32
|
|
800b818: af02 add r7, sp, #8
|
|
800b81a: 60f8 str r0, [r7, #12]
|
|
800b81c: 60b9 str r1, [r7, #8]
|
|
800b81e: 607a str r2, [r7, #4]
|
|
800b820: 807b strh r3, [r7, #2]
|
|
u16_t dst_port, u8_t have_chksum, u16_t chksum)
|
|
{
|
|
#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */
|
|
struct netif *netif;
|
|
|
|
LWIP_ERROR("udp_sendto: invalid pcb", pcb != NULL, return ERR_ARG);
|
|
800b822: 68fb ldr r3, [r7, #12]
|
|
800b824: 2b00 cmp r3, #0
|
|
800b826: d109 bne.n 800b83c <udp_sendto+0x28>
|
|
800b828: 4b23 ldr r3, [pc, #140] ; (800b8b8 <udp_sendto+0xa4>)
|
|
800b82a: f44f 7206 mov.w r2, #536 ; 0x218
|
|
800b82e: 4923 ldr r1, [pc, #140] ; (800b8bc <udp_sendto+0xa8>)
|
|
800b830: 4823 ldr r0, [pc, #140] ; (800b8c0 <udp_sendto+0xac>)
|
|
800b832: f004 fe61 bl 80104f8 <printf>
|
|
800b836: f06f 030f mvn.w r3, #15
|
|
800b83a: e038 b.n 800b8ae <udp_sendto+0x9a>
|
|
LWIP_ERROR("udp_sendto: invalid pbuf", p != NULL, return ERR_ARG);
|
|
800b83c: 68bb ldr r3, [r7, #8]
|
|
800b83e: 2b00 cmp r3, #0
|
|
800b840: d109 bne.n 800b856 <udp_sendto+0x42>
|
|
800b842: 4b1d ldr r3, [pc, #116] ; (800b8b8 <udp_sendto+0xa4>)
|
|
800b844: f240 2219 movw r2, #537 ; 0x219
|
|
800b848: 491e ldr r1, [pc, #120] ; (800b8c4 <udp_sendto+0xb0>)
|
|
800b84a: 481d ldr r0, [pc, #116] ; (800b8c0 <udp_sendto+0xac>)
|
|
800b84c: f004 fe54 bl 80104f8 <printf>
|
|
800b850: f06f 030f mvn.w r3, #15
|
|
800b854: e02b b.n 800b8ae <udp_sendto+0x9a>
|
|
LWIP_ERROR("udp_sendto: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
|
|
800b856: 687b ldr r3, [r7, #4]
|
|
800b858: 2b00 cmp r3, #0
|
|
800b85a: d109 bne.n 800b870 <udp_sendto+0x5c>
|
|
800b85c: 4b16 ldr r3, [pc, #88] ; (800b8b8 <udp_sendto+0xa4>)
|
|
800b85e: f240 221a movw r2, #538 ; 0x21a
|
|
800b862: 4919 ldr r1, [pc, #100] ; (800b8c8 <udp_sendto+0xb4>)
|
|
800b864: 4816 ldr r0, [pc, #88] ; (800b8c0 <udp_sendto+0xac>)
|
|
800b866: f004 fe47 bl 80104f8 <printf>
|
|
800b86a: f06f 030f mvn.w r3, #15
|
|
800b86e: e01e b.n 800b8ae <udp_sendto+0x9a>
|
|
return ERR_VAL;
|
|
}
|
|
|
|
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_send\n"));
|
|
|
|
if (pcb->netif_idx != NETIF_NO_INDEX) {
|
|
800b870: 68fb ldr r3, [r7, #12]
|
|
800b872: 7a1b ldrb r3, [r3, #8]
|
|
800b874: 2b00 cmp r3, #0
|
|
800b876: d006 beq.n 800b886 <udp_sendto+0x72>
|
|
netif = netif_get_by_index(pcb->netif_idx);
|
|
800b878: 68fb ldr r3, [r7, #12]
|
|
800b87a: 7a1b ldrb r3, [r3, #8]
|
|
800b87c: 4618 mov r0, r3
|
|
800b87e: f7f9 fd63 bl 8005348 <netif_get_by_index>
|
|
800b882: 6178 str r0, [r7, #20]
|
|
800b884: e003 b.n 800b88e <udp_sendto+0x7a>
|
|
|
|
if (netif == NULL)
|
|
#endif /* LWIP_MULTICAST_TX_OPTIONS */
|
|
{
|
|
/* find the outgoing network interface for this packet */
|
|
netif = ip_route(&pcb->local_ip, dst_ip);
|
|
800b886: 6878 ldr r0, [r7, #4]
|
|
800b888: f003 fa8a bl 800eda0 <ip4_route>
|
|
800b88c: 6178 str r0, [r7, #20]
|
|
}
|
|
}
|
|
|
|
/* no outgoing network interface could be found? */
|
|
if (netif == NULL) {
|
|
800b88e: 697b ldr r3, [r7, #20]
|
|
800b890: 2b00 cmp r3, #0
|
|
800b892: d102 bne.n 800b89a <udp_sendto+0x86>
|
|
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: No route to "));
|
|
ip_addr_debug_print(UDP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, dst_ip);
|
|
LWIP_DEBUGF(UDP_DEBUG, ("\n"));
|
|
UDP_STATS_INC(udp.rterr);
|
|
return ERR_RTE;
|
|
800b894: f06f 0303 mvn.w r3, #3
|
|
800b898: e009 b.n 800b8ae <udp_sendto+0x9a>
|
|
}
|
|
#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP
|
|
return udp_sendto_if_chksum(pcb, p, dst_ip, dst_port, netif, have_chksum, chksum);
|
|
#else /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */
|
|
return udp_sendto_if(pcb, p, dst_ip, dst_port, netif);
|
|
800b89a: 887a ldrh r2, [r7, #2]
|
|
800b89c: 697b ldr r3, [r7, #20]
|
|
800b89e: 9300 str r3, [sp, #0]
|
|
800b8a0: 4613 mov r3, r2
|
|
800b8a2: 687a ldr r2, [r7, #4]
|
|
800b8a4: 68b9 ldr r1, [r7, #8]
|
|
800b8a6: 68f8 ldr r0, [r7, #12]
|
|
800b8a8: f000 f810 bl 800b8cc <udp_sendto_if>
|
|
800b8ac: 4603 mov r3, r0
|
|
#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */
|
|
}
|
|
800b8ae: 4618 mov r0, r3
|
|
800b8b0: 3718 adds r7, #24
|
|
800b8b2: 46bd mov sp, r7
|
|
800b8b4: bd80 pop {r7, pc}
|
|
800b8b6: bf00 nop
|
|
800b8b8: 08017008 .word 0x08017008
|
|
800b8bc: 0801712c .word 0x0801712c
|
|
800b8c0: 0801705c .word 0x0801705c
|
|
800b8c4: 08017144 .word 0x08017144
|
|
800b8c8: 08017160 .word 0x08017160
|
|
|
|
0800b8cc <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)
|
|
{
|
|
800b8cc: b580 push {r7, lr}
|
|
800b8ce: b088 sub sp, #32
|
|
800b8d0: af02 add r7, sp, #8
|
|
800b8d2: 60f8 str r0, [r7, #12]
|
|
800b8d4: 60b9 str r1, [r7, #8]
|
|
800b8d6: 607a str r2, [r7, #4]
|
|
800b8d8: 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);
|
|
800b8da: 68fb ldr r3, [r7, #12]
|
|
800b8dc: 2b00 cmp r3, #0
|
|
800b8de: d109 bne.n 800b8f4 <udp_sendto_if+0x28>
|
|
800b8e0: 4b2e ldr r3, [pc, #184] ; (800b99c <udp_sendto_if+0xd0>)
|
|
800b8e2: f44f 7220 mov.w r2, #640 ; 0x280
|
|
800b8e6: 492e ldr r1, [pc, #184] ; (800b9a0 <udp_sendto_if+0xd4>)
|
|
800b8e8: 482e ldr r0, [pc, #184] ; (800b9a4 <udp_sendto_if+0xd8>)
|
|
800b8ea: f004 fe05 bl 80104f8 <printf>
|
|
800b8ee: f06f 030f mvn.w r3, #15
|
|
800b8f2: e04f b.n 800b994 <udp_sendto_if+0xc8>
|
|
LWIP_ERROR("udp_sendto_if: invalid pbuf", p != NULL, return ERR_ARG);
|
|
800b8f4: 68bb ldr r3, [r7, #8]
|
|
800b8f6: 2b00 cmp r3, #0
|
|
800b8f8: d109 bne.n 800b90e <udp_sendto_if+0x42>
|
|
800b8fa: 4b28 ldr r3, [pc, #160] ; (800b99c <udp_sendto_if+0xd0>)
|
|
800b8fc: f240 2281 movw r2, #641 ; 0x281
|
|
800b900: 4929 ldr r1, [pc, #164] ; (800b9a8 <udp_sendto_if+0xdc>)
|
|
800b902: 4828 ldr r0, [pc, #160] ; (800b9a4 <udp_sendto_if+0xd8>)
|
|
800b904: f004 fdf8 bl 80104f8 <printf>
|
|
800b908: f06f 030f mvn.w r3, #15
|
|
800b90c: e042 b.n 800b994 <udp_sendto_if+0xc8>
|
|
LWIP_ERROR("udp_sendto_if: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
|
|
800b90e: 687b ldr r3, [r7, #4]
|
|
800b910: 2b00 cmp r3, #0
|
|
800b912: d109 bne.n 800b928 <udp_sendto_if+0x5c>
|
|
800b914: 4b21 ldr r3, [pc, #132] ; (800b99c <udp_sendto_if+0xd0>)
|
|
800b916: f240 2282 movw r2, #642 ; 0x282
|
|
800b91a: 4924 ldr r1, [pc, #144] ; (800b9ac <udp_sendto_if+0xe0>)
|
|
800b91c: 4821 ldr r0, [pc, #132] ; (800b9a4 <udp_sendto_if+0xd8>)
|
|
800b91e: f004 fdeb bl 80104f8 <printf>
|
|
800b922: f06f 030f mvn.w r3, #15
|
|
800b926: e035 b.n 800b994 <udp_sendto_if+0xc8>
|
|
LWIP_ERROR("udp_sendto_if: invalid netif", netif != NULL, return ERR_ARG);
|
|
800b928: 6a3b ldr r3, [r7, #32]
|
|
800b92a: 2b00 cmp r3, #0
|
|
800b92c: d109 bne.n 800b942 <udp_sendto_if+0x76>
|
|
800b92e: 4b1b ldr r3, [pc, #108] ; (800b99c <udp_sendto_if+0xd0>)
|
|
800b930: f240 2283 movw r2, #643 ; 0x283
|
|
800b934: 491e ldr r1, [pc, #120] ; (800b9b0 <udp_sendto_if+0xe4>)
|
|
800b936: 481b ldr r0, [pc, #108] ; (800b9a4 <udp_sendto_if+0xd8>)
|
|
800b938: f004 fdde bl 80104f8 <printf>
|
|
800b93c: f06f 030f mvn.w r3, #15
|
|
800b940: e028 b.n 800b994 <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)) ||
|
|
800b942: 68fb ldr r3, [r7, #12]
|
|
800b944: 2b00 cmp r3, #0
|
|
800b946: d009 beq.n 800b95c <udp_sendto_if+0x90>
|
|
800b948: 68fb ldr r3, [r7, #12]
|
|
800b94a: 681b ldr r3, [r3, #0]
|
|
800b94c: 2b00 cmp r3, #0
|
|
800b94e: d005 beq.n 800b95c <udp_sendto_if+0x90>
|
|
ip4_addr_ismulticast(ip_2_ip4(&pcb->local_ip))) {
|
|
800b950: 68fb ldr r3, [r7, #12]
|
|
800b952: 681b ldr r3, [r3, #0]
|
|
800b954: f003 03f0 and.w r3, r3, #240 ; 0xf0
|
|
if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
|
|
800b958: 2be0 cmp r3, #224 ; 0xe0
|
|
800b95a: d103 bne.n 800b964 <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);
|
|
800b95c: 6a3b ldr r3, [r7, #32]
|
|
800b95e: 3304 adds r3, #4
|
|
800b960: 617b str r3, [r7, #20]
|
|
800b962: e00b b.n 800b97c <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))) {
|
|
800b964: 68fb ldr r3, [r7, #12]
|
|
800b966: 681a ldr r2, [r3, #0]
|
|
800b968: 6a3b ldr r3, [r7, #32]
|
|
800b96a: 3304 adds r3, #4
|
|
800b96c: 681b ldr r3, [r3, #0]
|
|
800b96e: 429a cmp r2, r3
|
|
800b970: d002 beq.n 800b978 <udp_sendto_if+0xac>
|
|
/* local_ip doesn't match, drop the packet */
|
|
return ERR_RTE;
|
|
800b972: f06f 0303 mvn.w r3, #3
|
|
800b976: e00d b.n 800b994 <udp_sendto_if+0xc8>
|
|
}
|
|
/* use UDP PCB local IP address as source address */
|
|
src_ip = &pcb->local_ip;
|
|
800b978: 68fb ldr r3, [r7, #12]
|
|
800b97a: 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);
|
|
800b97c: 887a ldrh r2, [r7, #2]
|
|
800b97e: 697b ldr r3, [r7, #20]
|
|
800b980: 9301 str r3, [sp, #4]
|
|
800b982: 6a3b ldr r3, [r7, #32]
|
|
800b984: 9300 str r3, [sp, #0]
|
|
800b986: 4613 mov r3, r2
|
|
800b988: 687a ldr r2, [r7, #4]
|
|
800b98a: 68b9 ldr r1, [r7, #8]
|
|
800b98c: 68f8 ldr r0, [r7, #12]
|
|
800b98e: f000 f811 bl 800b9b4 <udp_sendto_if_src>
|
|
800b992: 4603 mov r3, r0
|
|
#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */
|
|
}
|
|
800b994: 4618 mov r0, r3
|
|
800b996: 3718 adds r7, #24
|
|
800b998: 46bd mov sp, r7
|
|
800b99a: bd80 pop {r7, pc}
|
|
800b99c: 08017008 .word 0x08017008
|
|
800b9a0: 0801717c .word 0x0801717c
|
|
800b9a4: 0801705c .word 0x0801705c
|
|
800b9a8: 08017198 .word 0x08017198
|
|
800b9ac: 080171b4 .word 0x080171b4
|
|
800b9b0: 080171d4 .word 0x080171d4
|
|
|
|
0800b9b4 <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)
|
|
{
|
|
800b9b4: b580 push {r7, lr}
|
|
800b9b6: b08c sub sp, #48 ; 0x30
|
|
800b9b8: af04 add r7, sp, #16
|
|
800b9ba: 60f8 str r0, [r7, #12]
|
|
800b9bc: 60b9 str r1, [r7, #8]
|
|
800b9be: 607a str r2, [r7, #4]
|
|
800b9c0: 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);
|
|
800b9c2: 68fb ldr r3, [r7, #12]
|
|
800b9c4: 2b00 cmp r3, #0
|
|
800b9c6: d109 bne.n 800b9dc <udp_sendto_if_src+0x28>
|
|
800b9c8: 4b65 ldr r3, [pc, #404] ; (800bb60 <udp_sendto_if_src+0x1ac>)
|
|
800b9ca: f240 22d1 movw r2, #721 ; 0x2d1
|
|
800b9ce: 4965 ldr r1, [pc, #404] ; (800bb64 <udp_sendto_if_src+0x1b0>)
|
|
800b9d0: 4865 ldr r0, [pc, #404] ; (800bb68 <udp_sendto_if_src+0x1b4>)
|
|
800b9d2: f004 fd91 bl 80104f8 <printf>
|
|
800b9d6: f06f 030f mvn.w r3, #15
|
|
800b9da: e0bc b.n 800bb56 <udp_sendto_if_src+0x1a2>
|
|
LWIP_ERROR("udp_sendto_if_src: invalid pbuf", p != NULL, return ERR_ARG);
|
|
800b9dc: 68bb ldr r3, [r7, #8]
|
|
800b9de: 2b00 cmp r3, #0
|
|
800b9e0: d109 bne.n 800b9f6 <udp_sendto_if_src+0x42>
|
|
800b9e2: 4b5f ldr r3, [pc, #380] ; (800bb60 <udp_sendto_if_src+0x1ac>)
|
|
800b9e4: f240 22d2 movw r2, #722 ; 0x2d2
|
|
800b9e8: 4960 ldr r1, [pc, #384] ; (800bb6c <udp_sendto_if_src+0x1b8>)
|
|
800b9ea: 485f ldr r0, [pc, #380] ; (800bb68 <udp_sendto_if_src+0x1b4>)
|
|
800b9ec: f004 fd84 bl 80104f8 <printf>
|
|
800b9f0: f06f 030f mvn.w r3, #15
|
|
800b9f4: e0af b.n 800bb56 <udp_sendto_if_src+0x1a2>
|
|
LWIP_ERROR("udp_sendto_if_src: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
|
|
800b9f6: 687b ldr r3, [r7, #4]
|
|
800b9f8: 2b00 cmp r3, #0
|
|
800b9fa: d109 bne.n 800ba10 <udp_sendto_if_src+0x5c>
|
|
800b9fc: 4b58 ldr r3, [pc, #352] ; (800bb60 <udp_sendto_if_src+0x1ac>)
|
|
800b9fe: f240 22d3 movw r2, #723 ; 0x2d3
|
|
800ba02: 495b ldr r1, [pc, #364] ; (800bb70 <udp_sendto_if_src+0x1bc>)
|
|
800ba04: 4858 ldr r0, [pc, #352] ; (800bb68 <udp_sendto_if_src+0x1b4>)
|
|
800ba06: f004 fd77 bl 80104f8 <printf>
|
|
800ba0a: f06f 030f mvn.w r3, #15
|
|
800ba0e: e0a2 b.n 800bb56 <udp_sendto_if_src+0x1a2>
|
|
LWIP_ERROR("udp_sendto_if_src: invalid src_ip", src_ip != NULL, return ERR_ARG);
|
|
800ba10: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800ba12: 2b00 cmp r3, #0
|
|
800ba14: d109 bne.n 800ba2a <udp_sendto_if_src+0x76>
|
|
800ba16: 4b52 ldr r3, [pc, #328] ; (800bb60 <udp_sendto_if_src+0x1ac>)
|
|
800ba18: f44f 7235 mov.w r2, #724 ; 0x2d4
|
|
800ba1c: 4955 ldr r1, [pc, #340] ; (800bb74 <udp_sendto_if_src+0x1c0>)
|
|
800ba1e: 4852 ldr r0, [pc, #328] ; (800bb68 <udp_sendto_if_src+0x1b4>)
|
|
800ba20: f004 fd6a bl 80104f8 <printf>
|
|
800ba24: f06f 030f mvn.w r3, #15
|
|
800ba28: e095 b.n 800bb56 <udp_sendto_if_src+0x1a2>
|
|
LWIP_ERROR("udp_sendto_if_src: invalid netif", netif != NULL, return ERR_ARG);
|
|
800ba2a: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800ba2c: 2b00 cmp r3, #0
|
|
800ba2e: d109 bne.n 800ba44 <udp_sendto_if_src+0x90>
|
|
800ba30: 4b4b ldr r3, [pc, #300] ; (800bb60 <udp_sendto_if_src+0x1ac>)
|
|
800ba32: f240 22d5 movw r2, #725 ; 0x2d5
|
|
800ba36: 4950 ldr r1, [pc, #320] ; (800bb78 <udp_sendto_if_src+0x1c4>)
|
|
800ba38: 484b ldr r0, [pc, #300] ; (800bb68 <udp_sendto_if_src+0x1b4>)
|
|
800ba3a: f004 fd5d bl 80104f8 <printf>
|
|
800ba3e: f06f 030f mvn.w r3, #15
|
|
800ba42: e088 b.n 800bb56 <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) {
|
|
800ba44: 68fb ldr r3, [r7, #12]
|
|
800ba46: 8a5b ldrh r3, [r3, #18]
|
|
800ba48: 2b00 cmp r3, #0
|
|
800ba4a: d10f bne.n 800ba6c <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);
|
|
800ba4c: 68f9 ldr r1, [r7, #12]
|
|
800ba4e: 68fb ldr r3, [r7, #12]
|
|
800ba50: 8a5b ldrh r3, [r3, #18]
|
|
800ba52: 461a mov r2, r3
|
|
800ba54: 68f8 ldr r0, [r7, #12]
|
|
800ba56: f000 f893 bl 800bb80 <udp_bind>
|
|
800ba5a: 4603 mov r3, r0
|
|
800ba5c: 76fb strb r3, [r7, #27]
|
|
if (err != ERR_OK) {
|
|
800ba5e: f997 301b ldrsb.w r3, [r7, #27]
|
|
800ba62: 2b00 cmp r3, #0
|
|
800ba64: d002 beq.n 800ba6c <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;
|
|
800ba66: f997 301b ldrsb.w r3, [r7, #27]
|
|
800ba6a: e074 b.n 800bb56 <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) {
|
|
800ba6c: 68bb ldr r3, [r7, #8]
|
|
800ba6e: 891b ldrh r3, [r3, #8]
|
|
800ba70: f64f 72f7 movw r2, #65527 ; 0xfff7
|
|
800ba74: 4293 cmp r3, r2
|
|
800ba76: d902 bls.n 800ba7e <udp_sendto_if_src+0xca>
|
|
return ERR_MEM;
|
|
800ba78: f04f 33ff mov.w r3, #4294967295
|
|
800ba7c: e06b b.n 800bb56 <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)) {
|
|
800ba7e: 2108 movs r1, #8
|
|
800ba80: 68b8 ldr r0, [r7, #8]
|
|
800ba82: f7f9 ff2b bl 80058dc <pbuf_add_header>
|
|
800ba86: 4603 mov r3, r0
|
|
800ba88: 2b00 cmp r3, #0
|
|
800ba8a: d015 beq.n 800bab8 <udp_sendto_if_src+0x104>
|
|
/* allocate header in a separate new pbuf */
|
|
q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM);
|
|
800ba8c: f44f 7220 mov.w r2, #640 ; 0x280
|
|
800ba90: 2108 movs r1, #8
|
|
800ba92: 2022 movs r0, #34 ; 0x22
|
|
800ba94: f7f9 fcd4 bl 8005440 <pbuf_alloc>
|
|
800ba98: 61f8 str r0, [r7, #28]
|
|
/* new header pbuf could not be allocated? */
|
|
if (q == NULL) {
|
|
800ba9a: 69fb ldr r3, [r7, #28]
|
|
800ba9c: 2b00 cmp r3, #0
|
|
800ba9e: d102 bne.n 800baa6 <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;
|
|
800baa0: f04f 33ff mov.w r3, #4294967295
|
|
800baa4: e057 b.n 800bb56 <udp_sendto_if_src+0x1a2>
|
|
}
|
|
if (p->tot_len != 0) {
|
|
800baa6: 68bb ldr r3, [r7, #8]
|
|
800baa8: 891b ldrh r3, [r3, #8]
|
|
800baaa: 2b00 cmp r3, #0
|
|
800baac: d006 beq.n 800babc <udp_sendto_if_src+0x108>
|
|
/* chain header q in front of given pbuf p (only if p contains data) */
|
|
pbuf_chain(q, p);
|
|
800baae: 68b9 ldr r1, [r7, #8]
|
|
800bab0: 69f8 ldr r0, [r7, #28]
|
|
800bab2: f7fa f8c1 bl 8005c38 <pbuf_chain>
|
|
800bab6: e001 b.n 800babc <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;
|
|
800bab8: 68bb ldr r3, [r7, #8]
|
|
800baba: 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",
|
|
800babc: 69fb ldr r3, [r7, #28]
|
|
800babe: 895b ldrh r3, [r3, #10]
|
|
800bac0: 2b07 cmp r3, #7
|
|
800bac2: d806 bhi.n 800bad2 <udp_sendto_if_src+0x11e>
|
|
800bac4: 4b26 ldr r3, [pc, #152] ; (800bb60 <udp_sendto_if_src+0x1ac>)
|
|
800bac6: f240 320d movw r2, #781 ; 0x30d
|
|
800baca: 492c ldr r1, [pc, #176] ; (800bb7c <udp_sendto_if_src+0x1c8>)
|
|
800bacc: 4826 ldr r0, [pc, #152] ; (800bb68 <udp_sendto_if_src+0x1b4>)
|
|
800bace: f004 fd13 bl 80104f8 <printf>
|
|
(q->len >= sizeof(struct udp_hdr)));
|
|
/* q now represents the packet to be sent */
|
|
udphdr = (struct udp_hdr *)q->payload;
|
|
800bad2: 69fb ldr r3, [r7, #28]
|
|
800bad4: 685b ldr r3, [r3, #4]
|
|
800bad6: 617b str r3, [r7, #20]
|
|
udphdr->src = lwip_htons(pcb->local_port);
|
|
800bad8: 68fb ldr r3, [r7, #12]
|
|
800bada: 8a5b ldrh r3, [r3, #18]
|
|
800badc: 4618 mov r0, r3
|
|
800bade: f7f8 fc29 bl 8004334 <lwip_htons>
|
|
800bae2: 4603 mov r3, r0
|
|
800bae4: 461a mov r2, r3
|
|
800bae6: 697b ldr r3, [r7, #20]
|
|
800bae8: 801a strh r2, [r3, #0]
|
|
udphdr->dest = lwip_htons(dst_port);
|
|
800baea: 887b ldrh r3, [r7, #2]
|
|
800baec: 4618 mov r0, r3
|
|
800baee: f7f8 fc21 bl 8004334 <lwip_htons>
|
|
800baf2: 4603 mov r3, r0
|
|
800baf4: 461a mov r2, r3
|
|
800baf6: 697b ldr r3, [r7, #20]
|
|
800baf8: 805a strh r2, [r3, #2]
|
|
/* in UDP, 0 checksum means 'no checksum' */
|
|
udphdr->chksum = 0x0000;
|
|
800bafa: 697b ldr r3, [r7, #20]
|
|
800bafc: 2200 movs r2, #0
|
|
800bafe: 719a strb r2, [r3, #6]
|
|
800bb00: 2200 movs r2, #0
|
|
800bb02: 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);
|
|
800bb04: 69fb ldr r3, [r7, #28]
|
|
800bb06: 891b ldrh r3, [r3, #8]
|
|
800bb08: 4618 mov r0, r3
|
|
800bb0a: f7f8 fc13 bl 8004334 <lwip_htons>
|
|
800bb0e: 4603 mov r3, r0
|
|
800bb10: 461a mov r2, r3
|
|
800bb12: 697b ldr r3, [r7, #20]
|
|
800bb14: 809a strh r2, [r3, #4]
|
|
}
|
|
udphdr->chksum = udpchksum;
|
|
}
|
|
}
|
|
#endif /* CHECKSUM_GEN_UDP */
|
|
ip_proto = IP_PROTO_UDP;
|
|
800bb16: 2311 movs r3, #17
|
|
800bb18: 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;
|
|
800bb1a: 68fb ldr r3, [r7, #12]
|
|
800bb1c: 7adb ldrb r3, [r3, #11]
|
|
800bb1e: 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);
|
|
800bb20: 68fb ldr r3, [r7, #12]
|
|
800bb22: 7a9b ldrb r3, [r3, #10]
|
|
800bb24: 7cb9 ldrb r1, [r7, #18]
|
|
800bb26: 6aba ldr r2, [r7, #40] ; 0x28
|
|
800bb28: 9202 str r2, [sp, #8]
|
|
800bb2a: 7cfa ldrb r2, [r7, #19]
|
|
800bb2c: 9201 str r2, [sp, #4]
|
|
800bb2e: 9300 str r3, [sp, #0]
|
|
800bb30: 460b mov r3, r1
|
|
800bb32: 687a ldr r2, [r7, #4]
|
|
800bb34: 6af9 ldr r1, [r7, #44] ; 0x2c
|
|
800bb36: 69f8 ldr r0, [r7, #28]
|
|
800bb38: f003 fb38 bl 800f1ac <ip4_output_if_src>
|
|
800bb3c: 4603 mov r3, r0
|
|
800bb3e: 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) {
|
|
800bb40: 69fa ldr r2, [r7, #28]
|
|
800bb42: 68bb ldr r3, [r7, #8]
|
|
800bb44: 429a cmp r2, r3
|
|
800bb46: d004 beq.n 800bb52 <udp_sendto_if_src+0x19e>
|
|
/* free the header pbuf */
|
|
pbuf_free(q);
|
|
800bb48: 69f8 ldr r0, [r7, #28]
|
|
800bb4a: f7f9 ff5d bl 8005a08 <pbuf_free>
|
|
q = NULL;
|
|
800bb4e: 2300 movs r3, #0
|
|
800bb50: 61fb str r3, [r7, #28]
|
|
/* p is still referenced by the caller, and will live on */
|
|
}
|
|
|
|
UDP_STATS_INC(udp.xmit);
|
|
return err;
|
|
800bb52: f997 301b ldrsb.w r3, [r7, #27]
|
|
}
|
|
800bb56: 4618 mov r0, r3
|
|
800bb58: 3720 adds r7, #32
|
|
800bb5a: 46bd mov sp, r7
|
|
800bb5c: bd80 pop {r7, pc}
|
|
800bb5e: bf00 nop
|
|
800bb60: 08017008 .word 0x08017008
|
|
800bb64: 080171f4 .word 0x080171f4
|
|
800bb68: 0801705c .word 0x0801705c
|
|
800bb6c: 08017214 .word 0x08017214
|
|
800bb70: 08017234 .word 0x08017234
|
|
800bb74: 08017258 .word 0x08017258
|
|
800bb78: 0801727c .word 0x0801727c
|
|
800bb7c: 080172a0 .word 0x080172a0
|
|
|
|
0800bb80 <udp_bind>:
|
|
*
|
|
* @see udp_disconnect()
|
|
*/
|
|
err_t
|
|
udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
|
|
{
|
|
800bb80: b580 push {r7, lr}
|
|
800bb82: b086 sub sp, #24
|
|
800bb84: af00 add r7, sp, #0
|
|
800bb86: 60f8 str r0, [r7, #12]
|
|
800bb88: 60b9 str r1, [r7, #8]
|
|
800bb8a: 4613 mov r3, r2
|
|
800bb8c: 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) {
|
|
800bb8e: 68bb ldr r3, [r7, #8]
|
|
800bb90: 2b00 cmp r3, #0
|
|
800bb92: d101 bne.n 800bb98 <udp_bind+0x18>
|
|
ipaddr = IP4_ADDR_ANY;
|
|
800bb94: 4b39 ldr r3, [pc, #228] ; (800bc7c <udp_bind+0xfc>)
|
|
800bb96: 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);
|
|
800bb98: 68fb ldr r3, [r7, #12]
|
|
800bb9a: 2b00 cmp r3, #0
|
|
800bb9c: d109 bne.n 800bbb2 <udp_bind+0x32>
|
|
800bb9e: 4b38 ldr r3, [pc, #224] ; (800bc80 <udp_bind+0x100>)
|
|
800bba0: f240 32b7 movw r2, #951 ; 0x3b7
|
|
800bba4: 4937 ldr r1, [pc, #220] ; (800bc84 <udp_bind+0x104>)
|
|
800bba6: 4838 ldr r0, [pc, #224] ; (800bc88 <udp_bind+0x108>)
|
|
800bba8: f004 fca6 bl 80104f8 <printf>
|
|
800bbac: f06f 030f mvn.w r3, #15
|
|
800bbb0: e060 b.n 800bc74 <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;
|
|
800bbb2: 2300 movs r3, #0
|
|
800bbb4: 74fb strb r3, [r7, #19]
|
|
/* Check for double bind and rebind of the same pcb */
|
|
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
|
|
800bbb6: 4b35 ldr r3, [pc, #212] ; (800bc8c <udp_bind+0x10c>)
|
|
800bbb8: 681b ldr r3, [r3, #0]
|
|
800bbba: 617b str r3, [r7, #20]
|
|
800bbbc: e009 b.n 800bbd2 <udp_bind+0x52>
|
|
/* is this UDP PCB already on active list? */
|
|
if (pcb == ipcb) {
|
|
800bbbe: 68fa ldr r2, [r7, #12]
|
|
800bbc0: 697b ldr r3, [r7, #20]
|
|
800bbc2: 429a cmp r2, r3
|
|
800bbc4: d102 bne.n 800bbcc <udp_bind+0x4c>
|
|
rebind = 1;
|
|
800bbc6: 2301 movs r3, #1
|
|
800bbc8: 74fb strb r3, [r7, #19]
|
|
break;
|
|
800bbca: e005 b.n 800bbd8 <udp_bind+0x58>
|
|
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
|
|
800bbcc: 697b ldr r3, [r7, #20]
|
|
800bbce: 68db ldr r3, [r3, #12]
|
|
800bbd0: 617b str r3, [r7, #20]
|
|
800bbd2: 697b ldr r3, [r7, #20]
|
|
800bbd4: 2b00 cmp r3, #0
|
|
800bbd6: d1f2 bne.n 800bbbe <udp_bind+0x3e>
|
|
ipaddr = &zoned_ipaddr;
|
|
}
|
|
#endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */
|
|
|
|
/* no port specified? */
|
|
if (port == 0) {
|
|
800bbd8: 88fb ldrh r3, [r7, #6]
|
|
800bbda: 2b00 cmp r3, #0
|
|
800bbdc: d109 bne.n 800bbf2 <udp_bind+0x72>
|
|
port = udp_new_port();
|
|
800bbde: f7ff fc69 bl 800b4b4 <udp_new_port>
|
|
800bbe2: 4603 mov r3, r0
|
|
800bbe4: 80fb strh r3, [r7, #6]
|
|
if (port == 0) {
|
|
800bbe6: 88fb ldrh r3, [r7, #6]
|
|
800bbe8: 2b00 cmp r3, #0
|
|
800bbea: d12c bne.n 800bc46 <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;
|
|
800bbec: f06f 0307 mvn.w r3, #7
|
|
800bbf0: e040 b.n 800bc74 <udp_bind+0xf4>
|
|
}
|
|
} else {
|
|
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
|
|
800bbf2: 4b26 ldr r3, [pc, #152] ; (800bc8c <udp_bind+0x10c>)
|
|
800bbf4: 681b ldr r3, [r3, #0]
|
|
800bbf6: 617b str r3, [r7, #20]
|
|
800bbf8: e022 b.n 800bc40 <udp_bind+0xc0>
|
|
if (pcb != ipcb) {
|
|
800bbfa: 68fa ldr r2, [r7, #12]
|
|
800bbfc: 697b ldr r3, [r7, #20]
|
|
800bbfe: 429a cmp r2, r3
|
|
800bc00: d01b beq.n 800bc3a <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) &&
|
|
800bc02: 697b ldr r3, [r7, #20]
|
|
800bc04: 8a5b ldrh r3, [r3, #18]
|
|
800bc06: 88fa ldrh r2, [r7, #6]
|
|
800bc08: 429a cmp r2, r3
|
|
800bc0a: d116 bne.n 800bc3a <udp_bind+0xba>
|
|
/* IP address matches or any IP used? */
|
|
(ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
|
|
800bc0c: 697b ldr r3, [r7, #20]
|
|
800bc0e: 681a ldr r2, [r3, #0]
|
|
800bc10: 68bb ldr r3, [r7, #8]
|
|
800bc12: 681b ldr r3, [r3, #0]
|
|
if ((ipcb->local_port == port) &&
|
|
800bc14: 429a cmp r2, r3
|
|
800bc16: d00d beq.n 800bc34 <udp_bind+0xb4>
|
|
(ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
|
|
800bc18: 68bb ldr r3, [r7, #8]
|
|
800bc1a: 2b00 cmp r3, #0
|
|
800bc1c: d00a beq.n 800bc34 <udp_bind+0xb4>
|
|
800bc1e: 68bb ldr r3, [r7, #8]
|
|
800bc20: 681b ldr r3, [r3, #0]
|
|
800bc22: 2b00 cmp r3, #0
|
|
800bc24: d006 beq.n 800bc34 <udp_bind+0xb4>
|
|
ip_addr_isany(&ipcb->local_ip))) {
|
|
800bc26: 697b ldr r3, [r7, #20]
|
|
(ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
|
|
800bc28: 2b00 cmp r3, #0
|
|
800bc2a: d003 beq.n 800bc34 <udp_bind+0xb4>
|
|
ip_addr_isany(&ipcb->local_ip))) {
|
|
800bc2c: 697b ldr r3, [r7, #20]
|
|
800bc2e: 681b ldr r3, [r3, #0]
|
|
800bc30: 2b00 cmp r3, #0
|
|
800bc32: d102 bne.n 800bc3a <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;
|
|
800bc34: f06f 0307 mvn.w r3, #7
|
|
800bc38: e01c b.n 800bc74 <udp_bind+0xf4>
|
|
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
|
|
800bc3a: 697b ldr r3, [r7, #20]
|
|
800bc3c: 68db ldr r3, [r3, #12]
|
|
800bc3e: 617b str r3, [r7, #20]
|
|
800bc40: 697b ldr r3, [r7, #20]
|
|
800bc42: 2b00 cmp r3, #0
|
|
800bc44: d1d9 bne.n 800bbfa <udp_bind+0x7a>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
ip_addr_set_ipaddr(&pcb->local_ip, ipaddr);
|
|
800bc46: 68bb ldr r3, [r7, #8]
|
|
800bc48: 2b00 cmp r3, #0
|
|
800bc4a: d002 beq.n 800bc52 <udp_bind+0xd2>
|
|
800bc4c: 68bb ldr r3, [r7, #8]
|
|
800bc4e: 681b ldr r3, [r3, #0]
|
|
800bc50: e000 b.n 800bc54 <udp_bind+0xd4>
|
|
800bc52: 2300 movs r3, #0
|
|
800bc54: 68fa ldr r2, [r7, #12]
|
|
800bc56: 6013 str r3, [r2, #0]
|
|
|
|
pcb->local_port = port;
|
|
800bc58: 68fb ldr r3, [r7, #12]
|
|
800bc5a: 88fa ldrh r2, [r7, #6]
|
|
800bc5c: 825a strh r2, [r3, #18]
|
|
mib2_udp_bind(pcb);
|
|
/* pcb not active yet? */
|
|
if (rebind == 0) {
|
|
800bc5e: 7cfb ldrb r3, [r7, #19]
|
|
800bc60: 2b00 cmp r3, #0
|
|
800bc62: d106 bne.n 800bc72 <udp_bind+0xf2>
|
|
/* place the PCB on the active list if not already there */
|
|
pcb->next = udp_pcbs;
|
|
800bc64: 4b09 ldr r3, [pc, #36] ; (800bc8c <udp_bind+0x10c>)
|
|
800bc66: 681a ldr r2, [r3, #0]
|
|
800bc68: 68fb ldr r3, [r7, #12]
|
|
800bc6a: 60da str r2, [r3, #12]
|
|
udp_pcbs = pcb;
|
|
800bc6c: 4a07 ldr r2, [pc, #28] ; (800bc8c <udp_bind+0x10c>)
|
|
800bc6e: 68fb ldr r3, [r7, #12]
|
|
800bc70: 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;
|
|
800bc72: 2300 movs r3, #0
|
|
}
|
|
800bc74: 4618 mov r0, r3
|
|
800bc76: 3718 adds r7, #24
|
|
800bc78: 46bd mov sp, r7
|
|
800bc7a: bd80 pop {r7, pc}
|
|
800bc7c: 08017f3c .word 0x08017f3c
|
|
800bc80: 08017008 .word 0x08017008
|
|
800bc84: 080172d0 .word 0x080172d0
|
|
800bc88: 0801705c .word 0x0801705c
|
|
800bc8c: 20008c5c .word 0x20008c5c
|
|
|
|
0800bc90 <udp_connect>:
|
|
*
|
|
* @see udp_disconnect()
|
|
*/
|
|
err_t
|
|
udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
|
|
{
|
|
800bc90: b580 push {r7, lr}
|
|
800bc92: b086 sub sp, #24
|
|
800bc94: af00 add r7, sp, #0
|
|
800bc96: 60f8 str r0, [r7, #12]
|
|
800bc98: 60b9 str r1, [r7, #8]
|
|
800bc9a: 4613 mov r3, r2
|
|
800bc9c: 80fb strh r3, [r7, #6]
|
|
struct udp_pcb *ipcb;
|
|
|
|
LWIP_ASSERT_CORE_LOCKED();
|
|
|
|
LWIP_ERROR("udp_connect: invalid pcb", pcb != NULL, return ERR_ARG);
|
|
800bc9e: 68fb ldr r3, [r7, #12]
|
|
800bca0: 2b00 cmp r3, #0
|
|
800bca2: d109 bne.n 800bcb8 <udp_connect+0x28>
|
|
800bca4: 4b2c ldr r3, [pc, #176] ; (800bd58 <udp_connect+0xc8>)
|
|
800bca6: f240 4235 movw r2, #1077 ; 0x435
|
|
800bcaa: 492c ldr r1, [pc, #176] ; (800bd5c <udp_connect+0xcc>)
|
|
800bcac: 482c ldr r0, [pc, #176] ; (800bd60 <udp_connect+0xd0>)
|
|
800bcae: f004 fc23 bl 80104f8 <printf>
|
|
800bcb2: f06f 030f mvn.w r3, #15
|
|
800bcb6: e04b b.n 800bd50 <udp_connect+0xc0>
|
|
LWIP_ERROR("udp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
|
|
800bcb8: 68bb ldr r3, [r7, #8]
|
|
800bcba: 2b00 cmp r3, #0
|
|
800bcbc: d109 bne.n 800bcd2 <udp_connect+0x42>
|
|
800bcbe: 4b26 ldr r3, [pc, #152] ; (800bd58 <udp_connect+0xc8>)
|
|
800bcc0: f240 4236 movw r2, #1078 ; 0x436
|
|
800bcc4: 4927 ldr r1, [pc, #156] ; (800bd64 <udp_connect+0xd4>)
|
|
800bcc6: 4826 ldr r0, [pc, #152] ; (800bd60 <udp_connect+0xd0>)
|
|
800bcc8: f004 fc16 bl 80104f8 <printf>
|
|
800bccc: f06f 030f mvn.w r3, #15
|
|
800bcd0: e03e b.n 800bd50 <udp_connect+0xc0>
|
|
|
|
if (pcb->local_port == 0) {
|
|
800bcd2: 68fb ldr r3, [r7, #12]
|
|
800bcd4: 8a5b ldrh r3, [r3, #18]
|
|
800bcd6: 2b00 cmp r3, #0
|
|
800bcd8: d10f bne.n 800bcfa <udp_connect+0x6a>
|
|
err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port);
|
|
800bcda: 68f9 ldr r1, [r7, #12]
|
|
800bcdc: 68fb ldr r3, [r7, #12]
|
|
800bcde: 8a5b ldrh r3, [r3, #18]
|
|
800bce0: 461a mov r2, r3
|
|
800bce2: 68f8 ldr r0, [r7, #12]
|
|
800bce4: f7ff ff4c bl 800bb80 <udp_bind>
|
|
800bce8: 4603 mov r3, r0
|
|
800bcea: 74fb strb r3, [r7, #19]
|
|
if (err != ERR_OK) {
|
|
800bcec: f997 3013 ldrsb.w r3, [r7, #19]
|
|
800bcf0: 2b00 cmp r3, #0
|
|
800bcf2: d002 beq.n 800bcfa <udp_connect+0x6a>
|
|
return err;
|
|
800bcf4: f997 3013 ldrsb.w r3, [r7, #19]
|
|
800bcf8: e02a b.n 800bd50 <udp_connect+0xc0>
|
|
}
|
|
}
|
|
|
|
ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr);
|
|
800bcfa: 68bb ldr r3, [r7, #8]
|
|
800bcfc: 2b00 cmp r3, #0
|
|
800bcfe: d002 beq.n 800bd06 <udp_connect+0x76>
|
|
800bd00: 68bb ldr r3, [r7, #8]
|
|
800bd02: 681b ldr r3, [r3, #0]
|
|
800bd04: e000 b.n 800bd08 <udp_connect+0x78>
|
|
800bd06: 2300 movs r3, #0
|
|
800bd08: 68fa ldr r2, [r7, #12]
|
|
800bd0a: 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;
|
|
800bd0c: 68fb ldr r3, [r7, #12]
|
|
800bd0e: 88fa ldrh r2, [r7, #6]
|
|
800bd10: 829a strh r2, [r3, #20]
|
|
pcb->flags |= UDP_FLAGS_CONNECTED;
|
|
800bd12: 68fb ldr r3, [r7, #12]
|
|
800bd14: 7c1b ldrb r3, [r3, #16]
|
|
800bd16: f043 0304 orr.w r3, r3, #4
|
|
800bd1a: b2da uxtb r2, r3
|
|
800bd1c: 68fb ldr r3, [r7, #12]
|
|
800bd1e: 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) {
|
|
800bd20: 4b11 ldr r3, [pc, #68] ; (800bd68 <udp_connect+0xd8>)
|
|
800bd22: 681b ldr r3, [r3, #0]
|
|
800bd24: 617b str r3, [r7, #20]
|
|
800bd26: e008 b.n 800bd3a <udp_connect+0xaa>
|
|
if (pcb == ipcb) {
|
|
800bd28: 68fa ldr r2, [r7, #12]
|
|
800bd2a: 697b ldr r3, [r7, #20]
|
|
800bd2c: 429a cmp r2, r3
|
|
800bd2e: d101 bne.n 800bd34 <udp_connect+0xa4>
|
|
/* already on the list, just return */
|
|
return ERR_OK;
|
|
800bd30: 2300 movs r3, #0
|
|
800bd32: e00d b.n 800bd50 <udp_connect+0xc0>
|
|
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
|
|
800bd34: 697b ldr r3, [r7, #20]
|
|
800bd36: 68db ldr r3, [r3, #12]
|
|
800bd38: 617b str r3, [r7, #20]
|
|
800bd3a: 697b ldr r3, [r7, #20]
|
|
800bd3c: 2b00 cmp r3, #0
|
|
800bd3e: d1f3 bne.n 800bd28 <udp_connect+0x98>
|
|
}
|
|
}
|
|
/* PCB not yet on the list, add PCB now */
|
|
pcb->next = udp_pcbs;
|
|
800bd40: 4b09 ldr r3, [pc, #36] ; (800bd68 <udp_connect+0xd8>)
|
|
800bd42: 681a ldr r2, [r3, #0]
|
|
800bd44: 68fb ldr r3, [r7, #12]
|
|
800bd46: 60da str r2, [r3, #12]
|
|
udp_pcbs = pcb;
|
|
800bd48: 4a07 ldr r2, [pc, #28] ; (800bd68 <udp_connect+0xd8>)
|
|
800bd4a: 68fb ldr r3, [r7, #12]
|
|
800bd4c: 6013 str r3, [r2, #0]
|
|
return ERR_OK;
|
|
800bd4e: 2300 movs r3, #0
|
|
}
|
|
800bd50: 4618 mov r0, r3
|
|
800bd52: 3718 adds r7, #24
|
|
800bd54: 46bd mov sp, r7
|
|
800bd56: bd80 pop {r7, pc}
|
|
800bd58: 08017008 .word 0x08017008
|
|
800bd5c: 080172e8 .word 0x080172e8
|
|
800bd60: 0801705c .word 0x0801705c
|
|
800bd64: 08017304 .word 0x08017304
|
|
800bd68: 20008c5c .word 0x20008c5c
|
|
|
|
0800bd6c <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)
|
|
{
|
|
800bd6c: b580 push {r7, lr}
|
|
800bd6e: b084 sub sp, #16
|
|
800bd70: af00 add r7, sp, #0
|
|
800bd72: 60f8 str r0, [r7, #12]
|
|
800bd74: 60b9 str r1, [r7, #8]
|
|
800bd76: 607a str r2, [r7, #4]
|
|
LWIP_ASSERT_CORE_LOCKED();
|
|
|
|
LWIP_ERROR("udp_recv: invalid pcb", pcb != NULL, return);
|
|
800bd78: 68fb ldr r3, [r7, #12]
|
|
800bd7a: 2b00 cmp r3, #0
|
|
800bd7c: d107 bne.n 800bd8e <udp_recv+0x22>
|
|
800bd7e: 4b08 ldr r3, [pc, #32] ; (800bda0 <udp_recv+0x34>)
|
|
800bd80: f240 428a movw r2, #1162 ; 0x48a
|
|
800bd84: 4907 ldr r1, [pc, #28] ; (800bda4 <udp_recv+0x38>)
|
|
800bd86: 4808 ldr r0, [pc, #32] ; (800bda8 <udp_recv+0x3c>)
|
|
800bd88: f004 fbb6 bl 80104f8 <printf>
|
|
800bd8c: e005 b.n 800bd9a <udp_recv+0x2e>
|
|
|
|
/* remember recv() callback and user data */
|
|
pcb->recv = recv;
|
|
800bd8e: 68fb ldr r3, [r7, #12]
|
|
800bd90: 68ba ldr r2, [r7, #8]
|
|
800bd92: 619a str r2, [r3, #24]
|
|
pcb->recv_arg = recv_arg;
|
|
800bd94: 68fb ldr r3, [r7, #12]
|
|
800bd96: 687a ldr r2, [r7, #4]
|
|
800bd98: 61da str r2, [r3, #28]
|
|
}
|
|
800bd9a: 3710 adds r7, #16
|
|
800bd9c: 46bd mov sp, r7
|
|
800bd9e: bd80 pop {r7, pc}
|
|
800bda0: 08017008 .word 0x08017008
|
|
800bda4: 0801733c .word 0x0801733c
|
|
800bda8: 0801705c .word 0x0801705c
|
|
|
|
0800bdac <udp_remove>:
|
|
*
|
|
* @see udp_new()
|
|
*/
|
|
void
|
|
udp_remove(struct udp_pcb *pcb)
|
|
{
|
|
800bdac: b580 push {r7, lr}
|
|
800bdae: b084 sub sp, #16
|
|
800bdb0: af00 add r7, sp, #0
|
|
800bdb2: 6078 str r0, [r7, #4]
|
|
struct udp_pcb *pcb2;
|
|
|
|
LWIP_ASSERT_CORE_LOCKED();
|
|
|
|
LWIP_ERROR("udp_remove: invalid pcb", pcb != NULL, return);
|
|
800bdb4: 687b ldr r3, [r7, #4]
|
|
800bdb6: 2b00 cmp r3, #0
|
|
800bdb8: d107 bne.n 800bdca <udp_remove+0x1e>
|
|
800bdba: 4b19 ldr r3, [pc, #100] ; (800be20 <udp_remove+0x74>)
|
|
800bdbc: f240 42a1 movw r2, #1185 ; 0x4a1
|
|
800bdc0: 4918 ldr r1, [pc, #96] ; (800be24 <udp_remove+0x78>)
|
|
800bdc2: 4819 ldr r0, [pc, #100] ; (800be28 <udp_remove+0x7c>)
|
|
800bdc4: f004 fb98 bl 80104f8 <printf>
|
|
800bdc8: e026 b.n 800be18 <udp_remove+0x6c>
|
|
|
|
mib2_udp_unbind(pcb);
|
|
/* pcb to be removed is first in list? */
|
|
if (udp_pcbs == pcb) {
|
|
800bdca: 4b18 ldr r3, [pc, #96] ; (800be2c <udp_remove+0x80>)
|
|
800bdcc: 681b ldr r3, [r3, #0]
|
|
800bdce: 687a ldr r2, [r7, #4]
|
|
800bdd0: 429a cmp r2, r3
|
|
800bdd2: d105 bne.n 800bde0 <udp_remove+0x34>
|
|
/* make list start at 2nd pcb */
|
|
udp_pcbs = udp_pcbs->next;
|
|
800bdd4: 4b15 ldr r3, [pc, #84] ; (800be2c <udp_remove+0x80>)
|
|
800bdd6: 681b ldr r3, [r3, #0]
|
|
800bdd8: 68db ldr r3, [r3, #12]
|
|
800bdda: 4a14 ldr r2, [pc, #80] ; (800be2c <udp_remove+0x80>)
|
|
800bddc: 6013 str r3, [r2, #0]
|
|
800bdde: e017 b.n 800be10 <udp_remove+0x64>
|
|
/* pcb not 1st in list */
|
|
} else {
|
|
for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) {
|
|
800bde0: 4b12 ldr r3, [pc, #72] ; (800be2c <udp_remove+0x80>)
|
|
800bde2: 681b ldr r3, [r3, #0]
|
|
800bde4: 60fb str r3, [r7, #12]
|
|
800bde6: e010 b.n 800be0a <udp_remove+0x5e>
|
|
/* find pcb in udp_pcbs list */
|
|
if (pcb2->next != NULL && pcb2->next == pcb) {
|
|
800bde8: 68fb ldr r3, [r7, #12]
|
|
800bdea: 68db ldr r3, [r3, #12]
|
|
800bdec: 2b00 cmp r3, #0
|
|
800bdee: d009 beq.n 800be04 <udp_remove+0x58>
|
|
800bdf0: 68fb ldr r3, [r7, #12]
|
|
800bdf2: 68db ldr r3, [r3, #12]
|
|
800bdf4: 687a ldr r2, [r7, #4]
|
|
800bdf6: 429a cmp r2, r3
|
|
800bdf8: d104 bne.n 800be04 <udp_remove+0x58>
|
|
/* remove pcb from list */
|
|
pcb2->next = pcb->next;
|
|
800bdfa: 687b ldr r3, [r7, #4]
|
|
800bdfc: 68da ldr r2, [r3, #12]
|
|
800bdfe: 68fb ldr r3, [r7, #12]
|
|
800be00: 60da str r2, [r3, #12]
|
|
break;
|
|
800be02: e005 b.n 800be10 <udp_remove+0x64>
|
|
for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) {
|
|
800be04: 68fb ldr r3, [r7, #12]
|
|
800be06: 68db ldr r3, [r3, #12]
|
|
800be08: 60fb str r3, [r7, #12]
|
|
800be0a: 68fb ldr r3, [r7, #12]
|
|
800be0c: 2b00 cmp r3, #0
|
|
800be0e: d1eb bne.n 800bde8 <udp_remove+0x3c>
|
|
}
|
|
}
|
|
}
|
|
memp_free(MEMP_UDP_PCB, pcb);
|
|
800be10: 6879 ldr r1, [r7, #4]
|
|
800be12: 2000 movs r0, #0
|
|
800be14: f7f8 ff76 bl 8004d04 <memp_free>
|
|
}
|
|
800be18: 3710 adds r7, #16
|
|
800be1a: 46bd mov sp, r7
|
|
800be1c: bd80 pop {r7, pc}
|
|
800be1e: bf00 nop
|
|
800be20: 08017008 .word 0x08017008
|
|
800be24: 08017354 .word 0x08017354
|
|
800be28: 0801705c .word 0x0801705c
|
|
800be2c: 20008c5c .word 0x20008c5c
|
|
|
|
0800be30 <udp_new>:
|
|
*
|
|
* @see udp_remove()
|
|
*/
|
|
struct udp_pcb *
|
|
udp_new(void)
|
|
{
|
|
800be30: b580 push {r7, lr}
|
|
800be32: b082 sub sp, #8
|
|
800be34: af00 add r7, sp, #0
|
|
struct udp_pcb *pcb;
|
|
|
|
LWIP_ASSERT_CORE_LOCKED();
|
|
|
|
pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB);
|
|
800be36: 2000 movs r0, #0
|
|
800be38: f7f8 fef4 bl 8004c24 <memp_malloc>
|
|
800be3c: 6078 str r0, [r7, #4]
|
|
/* could allocate UDP PCB? */
|
|
if (pcb != NULL) {
|
|
800be3e: 687b ldr r3, [r7, #4]
|
|
800be40: 2b00 cmp r3, #0
|
|
800be42: d007 beq.n 800be54 <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));
|
|
800be44: 2220 movs r2, #32
|
|
800be46: 2100 movs r1, #0
|
|
800be48: 6878 ldr r0, [r7, #4]
|
|
800be4a: f004 fb4d bl 80104e8 <memset>
|
|
pcb->ttl = UDP_TTL;
|
|
800be4e: 687b ldr r3, [r7, #4]
|
|
800be50: 22ff movs r2, #255 ; 0xff
|
|
800be52: 72da strb r2, [r3, #11]
|
|
#if LWIP_MULTICAST_TX_OPTIONS
|
|
udp_set_multicast_ttl(pcb, UDP_TTL);
|
|
#endif /* LWIP_MULTICAST_TX_OPTIONS */
|
|
}
|
|
return pcb;
|
|
800be54: 687b ldr r3, [r7, #4]
|
|
}
|
|
800be56: 4618 mov r0, r3
|
|
800be58: 3708 adds r7, #8
|
|
800be5a: 46bd mov sp, r7
|
|
800be5c: bd80 pop {r7, pc}
|
|
...
|
|
|
|
0800be60 <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)
|
|
{
|
|
800be60: b480 push {r7}
|
|
800be62: b085 sub sp, #20
|
|
800be64: af00 add r7, sp, #0
|
|
800be66: 6078 str r0, [r7, #4]
|
|
800be68: 6039 str r1, [r7, #0]
|
|
struct udp_pcb *upcb;
|
|
|
|
if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) {
|
|
800be6a: 687b ldr r3, [r7, #4]
|
|
800be6c: 2b00 cmp r3, #0
|
|
800be6e: d01e beq.n 800beae <udp_netif_ip_addr_changed+0x4e>
|
|
800be70: 687b ldr r3, [r7, #4]
|
|
800be72: 681b ldr r3, [r3, #0]
|
|
800be74: 2b00 cmp r3, #0
|
|
800be76: d01a beq.n 800beae <udp_netif_ip_addr_changed+0x4e>
|
|
800be78: 683b ldr r3, [r7, #0]
|
|
800be7a: 2b00 cmp r3, #0
|
|
800be7c: d017 beq.n 800beae <udp_netif_ip_addr_changed+0x4e>
|
|
800be7e: 683b ldr r3, [r7, #0]
|
|
800be80: 681b ldr r3, [r3, #0]
|
|
800be82: 2b00 cmp r3, #0
|
|
800be84: d013 beq.n 800beae <udp_netif_ip_addr_changed+0x4e>
|
|
for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) {
|
|
800be86: 4b0d ldr r3, [pc, #52] ; (800bebc <udp_netif_ip_addr_changed+0x5c>)
|
|
800be88: 681b ldr r3, [r3, #0]
|
|
800be8a: 60fb str r3, [r7, #12]
|
|
800be8c: e00c b.n 800bea8 <udp_netif_ip_addr_changed+0x48>
|
|
/* PCB bound to current local interface address? */
|
|
if (ip_addr_cmp(&upcb->local_ip, old_addr)) {
|
|
800be8e: 68fb ldr r3, [r7, #12]
|
|
800be90: 681a ldr r2, [r3, #0]
|
|
800be92: 687b ldr r3, [r7, #4]
|
|
800be94: 681b ldr r3, [r3, #0]
|
|
800be96: 429a cmp r2, r3
|
|
800be98: d103 bne.n 800bea2 <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);
|
|
800be9a: 683b ldr r3, [r7, #0]
|
|
800be9c: 681a ldr r2, [r3, #0]
|
|
800be9e: 68fb ldr r3, [r7, #12]
|
|
800bea0: 601a str r2, [r3, #0]
|
|
for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) {
|
|
800bea2: 68fb ldr r3, [r7, #12]
|
|
800bea4: 68db ldr r3, [r3, #12]
|
|
800bea6: 60fb str r3, [r7, #12]
|
|
800bea8: 68fb ldr r3, [r7, #12]
|
|
800beaa: 2b00 cmp r3, #0
|
|
800beac: d1ef bne.n 800be8e <udp_netif_ip_addr_changed+0x2e>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
800beae: bf00 nop
|
|
800beb0: 3714 adds r7, #20
|
|
800beb2: 46bd mov sp, r7
|
|
800beb4: f85d 7b04 ldr.w r7, [sp], #4
|
|
800beb8: 4770 bx lr
|
|
800beba: bf00 nop
|
|
800bebc: 20008c5c .word 0x20008c5c
|
|
|
|
0800bec0 <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)
|
|
{
|
|
800bec0: b580 push {r7, lr}
|
|
800bec2: af00 add r7, sp, #0
|
|
if (dhcp_pcb_refcount == 0) {
|
|
800bec4: 4b20 ldr r3, [pc, #128] ; (800bf48 <dhcp_inc_pcb_refcount+0x88>)
|
|
800bec6: 781b ldrb r3, [r3, #0]
|
|
800bec8: 2b00 cmp r3, #0
|
|
800beca: d133 bne.n 800bf34 <dhcp_inc_pcb_refcount+0x74>
|
|
LWIP_ASSERT("dhcp_inc_pcb_refcount(): memory leak", dhcp_pcb == NULL);
|
|
800becc: 4b1f ldr r3, [pc, #124] ; (800bf4c <dhcp_inc_pcb_refcount+0x8c>)
|
|
800bece: 681b ldr r3, [r3, #0]
|
|
800bed0: 2b00 cmp r3, #0
|
|
800bed2: d005 beq.n 800bee0 <dhcp_inc_pcb_refcount+0x20>
|
|
800bed4: 4b1e ldr r3, [pc, #120] ; (800bf50 <dhcp_inc_pcb_refcount+0x90>)
|
|
800bed6: 22e5 movs r2, #229 ; 0xe5
|
|
800bed8: 491e ldr r1, [pc, #120] ; (800bf54 <dhcp_inc_pcb_refcount+0x94>)
|
|
800beda: 481f ldr r0, [pc, #124] ; (800bf58 <dhcp_inc_pcb_refcount+0x98>)
|
|
800bedc: f004 fb0c bl 80104f8 <printf>
|
|
|
|
/* allocate UDP PCB */
|
|
dhcp_pcb = udp_new();
|
|
800bee0: f7ff ffa6 bl 800be30 <udp_new>
|
|
800bee4: 4603 mov r3, r0
|
|
800bee6: 4a19 ldr r2, [pc, #100] ; (800bf4c <dhcp_inc_pcb_refcount+0x8c>)
|
|
800bee8: 6013 str r3, [r2, #0]
|
|
|
|
if (dhcp_pcb == NULL) {
|
|
800beea: 4b18 ldr r3, [pc, #96] ; (800bf4c <dhcp_inc_pcb_refcount+0x8c>)
|
|
800beec: 681b ldr r3, [r3, #0]
|
|
800beee: 2b00 cmp r3, #0
|
|
800bef0: d102 bne.n 800bef8 <dhcp_inc_pcb_refcount+0x38>
|
|
return ERR_MEM;
|
|
800bef2: f04f 33ff mov.w r3, #4294967295
|
|
800bef6: e024 b.n 800bf42 <dhcp_inc_pcb_refcount+0x82>
|
|
}
|
|
|
|
ip_set_option(dhcp_pcb, SOF_BROADCAST);
|
|
800bef8: 4b14 ldr r3, [pc, #80] ; (800bf4c <dhcp_inc_pcb_refcount+0x8c>)
|
|
800befa: 681b ldr r3, [r3, #0]
|
|
800befc: 7a5a ldrb r2, [r3, #9]
|
|
800befe: 4b13 ldr r3, [pc, #76] ; (800bf4c <dhcp_inc_pcb_refcount+0x8c>)
|
|
800bf00: 681b ldr r3, [r3, #0]
|
|
800bf02: f042 0220 orr.w r2, r2, #32
|
|
800bf06: b2d2 uxtb r2, r2
|
|
800bf08: 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);
|
|
800bf0a: 4b10 ldr r3, [pc, #64] ; (800bf4c <dhcp_inc_pcb_refcount+0x8c>)
|
|
800bf0c: 681b ldr r3, [r3, #0]
|
|
800bf0e: 2244 movs r2, #68 ; 0x44
|
|
800bf10: 4912 ldr r1, [pc, #72] ; (800bf5c <dhcp_inc_pcb_refcount+0x9c>)
|
|
800bf12: 4618 mov r0, r3
|
|
800bf14: f7ff fe34 bl 800bb80 <udp_bind>
|
|
udp_connect(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_SERVER);
|
|
800bf18: 4b0c ldr r3, [pc, #48] ; (800bf4c <dhcp_inc_pcb_refcount+0x8c>)
|
|
800bf1a: 681b ldr r3, [r3, #0]
|
|
800bf1c: 2243 movs r2, #67 ; 0x43
|
|
800bf1e: 490f ldr r1, [pc, #60] ; (800bf5c <dhcp_inc_pcb_refcount+0x9c>)
|
|
800bf20: 4618 mov r0, r3
|
|
800bf22: f7ff feb5 bl 800bc90 <udp_connect>
|
|
udp_recv(dhcp_pcb, dhcp_recv, NULL);
|
|
800bf26: 4b09 ldr r3, [pc, #36] ; (800bf4c <dhcp_inc_pcb_refcount+0x8c>)
|
|
800bf28: 681b ldr r3, [r3, #0]
|
|
800bf2a: 2200 movs r2, #0
|
|
800bf2c: 490c ldr r1, [pc, #48] ; (800bf60 <dhcp_inc_pcb_refcount+0xa0>)
|
|
800bf2e: 4618 mov r0, r3
|
|
800bf30: f7ff ff1c bl 800bd6c <udp_recv>
|
|
}
|
|
|
|
dhcp_pcb_refcount++;
|
|
800bf34: 4b04 ldr r3, [pc, #16] ; (800bf48 <dhcp_inc_pcb_refcount+0x88>)
|
|
800bf36: 781b ldrb r3, [r3, #0]
|
|
800bf38: 3301 adds r3, #1
|
|
800bf3a: b2da uxtb r2, r3
|
|
800bf3c: 4b02 ldr r3, [pc, #8] ; (800bf48 <dhcp_inc_pcb_refcount+0x88>)
|
|
800bf3e: 701a strb r2, [r3, #0]
|
|
|
|
return ERR_OK;
|
|
800bf40: 2300 movs r3, #0
|
|
}
|
|
800bf42: 4618 mov r0, r3
|
|
800bf44: bd80 pop {r7, pc}
|
|
800bf46: bf00 nop
|
|
800bf48: 20008c8c .word 0x20008c8c
|
|
800bf4c: 20008c88 .word 0x20008c88
|
|
800bf50: 0801736c .word 0x0801736c
|
|
800bf54: 080173a4 .word 0x080173a4
|
|
800bf58: 080173cc .word 0x080173cc
|
|
800bf5c: 08017f3c .word 0x08017f3c
|
|
800bf60: 0800d7f5 .word 0x0800d7f5
|
|
|
|
0800bf64 <dhcp_dec_pcb_refcount>:
|
|
|
|
/** Free DHCP PCB if the last netif stops using it */
|
|
static void
|
|
dhcp_dec_pcb_refcount(void)
|
|
{
|
|
800bf64: b580 push {r7, lr}
|
|
800bf66: af00 add r7, sp, #0
|
|
LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0));
|
|
800bf68: 4b0e ldr r3, [pc, #56] ; (800bfa4 <dhcp_dec_pcb_refcount+0x40>)
|
|
800bf6a: 781b ldrb r3, [r3, #0]
|
|
800bf6c: 2b00 cmp r3, #0
|
|
800bf6e: d105 bne.n 800bf7c <dhcp_dec_pcb_refcount+0x18>
|
|
800bf70: 4b0d ldr r3, [pc, #52] ; (800bfa8 <dhcp_dec_pcb_refcount+0x44>)
|
|
800bf72: 22ff movs r2, #255 ; 0xff
|
|
800bf74: 490d ldr r1, [pc, #52] ; (800bfac <dhcp_dec_pcb_refcount+0x48>)
|
|
800bf76: 480e ldr r0, [pc, #56] ; (800bfb0 <dhcp_dec_pcb_refcount+0x4c>)
|
|
800bf78: f004 fabe bl 80104f8 <printf>
|
|
dhcp_pcb_refcount--;
|
|
800bf7c: 4b09 ldr r3, [pc, #36] ; (800bfa4 <dhcp_dec_pcb_refcount+0x40>)
|
|
800bf7e: 781b ldrb r3, [r3, #0]
|
|
800bf80: 3b01 subs r3, #1
|
|
800bf82: b2da uxtb r2, r3
|
|
800bf84: 4b07 ldr r3, [pc, #28] ; (800bfa4 <dhcp_dec_pcb_refcount+0x40>)
|
|
800bf86: 701a strb r2, [r3, #0]
|
|
|
|
if (dhcp_pcb_refcount == 0) {
|
|
800bf88: 4b06 ldr r3, [pc, #24] ; (800bfa4 <dhcp_dec_pcb_refcount+0x40>)
|
|
800bf8a: 781b ldrb r3, [r3, #0]
|
|
800bf8c: 2b00 cmp r3, #0
|
|
800bf8e: d107 bne.n 800bfa0 <dhcp_dec_pcb_refcount+0x3c>
|
|
udp_remove(dhcp_pcb);
|
|
800bf90: 4b08 ldr r3, [pc, #32] ; (800bfb4 <dhcp_dec_pcb_refcount+0x50>)
|
|
800bf92: 681b ldr r3, [r3, #0]
|
|
800bf94: 4618 mov r0, r3
|
|
800bf96: f7ff ff09 bl 800bdac <udp_remove>
|
|
dhcp_pcb = NULL;
|
|
800bf9a: 4b06 ldr r3, [pc, #24] ; (800bfb4 <dhcp_dec_pcb_refcount+0x50>)
|
|
800bf9c: 2200 movs r2, #0
|
|
800bf9e: 601a str r2, [r3, #0]
|
|
}
|
|
}
|
|
800bfa0: bf00 nop
|
|
800bfa2: bd80 pop {r7, pc}
|
|
800bfa4: 20008c8c .word 0x20008c8c
|
|
800bfa8: 0801736c .word 0x0801736c
|
|
800bfac: 080173f4 .word 0x080173f4
|
|
800bfb0: 080173cc .word 0x080173cc
|
|
800bfb4: 20008c88 .word 0x20008c88
|
|
|
|
0800bfb8 <dhcp_handle_nak>:
|
|
*
|
|
* @param netif the netif under DHCP control
|
|
*/
|
|
static void
|
|
dhcp_handle_nak(struct netif *netif)
|
|
{
|
|
800bfb8: b580 push {r7, lr}
|
|
800bfba: b084 sub sp, #16
|
|
800bfbc: af00 add r7, sp, #0
|
|
800bfbe: 6078 str r0, [r7, #4]
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800bfc0: 687b ldr r3, [r7, #4]
|
|
800bfc2: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800bfc4: 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);
|
|
800bfc6: 210c movs r1, #12
|
|
800bfc8: 68f8 ldr r0, [r7, #12]
|
|
800bfca: f001 f855 bl 800d078 <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);
|
|
800bfce: 4b06 ldr r3, [pc, #24] ; (800bfe8 <dhcp_handle_nak+0x30>)
|
|
800bfd0: 4a05 ldr r2, [pc, #20] ; (800bfe8 <dhcp_handle_nak+0x30>)
|
|
800bfd2: 4905 ldr r1, [pc, #20] ; (800bfe8 <dhcp_handle_nak+0x30>)
|
|
800bfd4: 6878 ldr r0, [r7, #4]
|
|
800bfd6: f7f9 f837 bl 8005048 <netif_set_addr>
|
|
/* We can immediately restart discovery */
|
|
dhcp_discover(netif);
|
|
800bfda: 6878 ldr r0, [r7, #4]
|
|
800bfdc: f000 fc48 bl 800c870 <dhcp_discover>
|
|
}
|
|
800bfe0: bf00 nop
|
|
800bfe2: 3710 adds r7, #16
|
|
800bfe4: 46bd mov sp, r7
|
|
800bfe6: bd80 pop {r7, pc}
|
|
800bfe8: 08017f3c .word 0x08017f3c
|
|
|
|
0800bfec <dhcp_check>:
|
|
*
|
|
* @param netif the netif under DHCP control
|
|
*/
|
|
static void
|
|
dhcp_check(struct netif *netif)
|
|
{
|
|
800bfec: b580 push {r7, lr}
|
|
800bfee: b084 sub sp, #16
|
|
800bff0: af00 add r7, sp, #0
|
|
800bff2: 6078 str r0, [r7, #4]
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800bff4: 687b ldr r3, [r7, #4]
|
|
800bff6: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800bff8: 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);
|
|
800bffa: 2108 movs r1, #8
|
|
800bffc: 68f8 ldr r0, [r7, #12]
|
|
800bffe: f001 f83b bl 800d078 <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);
|
|
800c002: 68fb ldr r3, [r7, #12]
|
|
800c004: 331c adds r3, #28
|
|
800c006: 2200 movs r2, #0
|
|
800c008: 4619 mov r1, r3
|
|
800c00a: 6878 ldr r0, [r7, #4]
|
|
800c00c: f002 fb3c bl 800e688 <etharp_query>
|
|
800c010: 4603 mov r3, r0
|
|
800c012: 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) {
|
|
800c014: 68fb ldr r3, [r7, #12]
|
|
800c016: 799b ldrb r3, [r3, #6]
|
|
800c018: 2bff cmp r3, #255 ; 0xff
|
|
800c01a: d005 beq.n 800c028 <dhcp_check+0x3c>
|
|
dhcp->tries++;
|
|
800c01c: 68fb ldr r3, [r7, #12]
|
|
800c01e: 799b ldrb r3, [r3, #6]
|
|
800c020: 3301 adds r3, #1
|
|
800c022: b2da uxtb r2, r3
|
|
800c024: 68fb ldr r3, [r7, #12]
|
|
800c026: 719a strb r2, [r3, #6]
|
|
}
|
|
msecs = 500;
|
|
800c028: f44f 73fa mov.w r3, #500 ; 0x1f4
|
|
800c02c: 813b strh r3, [r7, #8]
|
|
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
|
|
800c02e: 893b ldrh r3, [r7, #8]
|
|
800c030: f203 13f3 addw r3, r3, #499 ; 0x1f3
|
|
800c034: 4a06 ldr r2, [pc, #24] ; (800c050 <dhcp_check+0x64>)
|
|
800c036: fb82 1203 smull r1, r2, r2, r3
|
|
800c03a: 1152 asrs r2, r2, #5
|
|
800c03c: 17db asrs r3, r3, #31
|
|
800c03e: 1ad3 subs r3, r2, r3
|
|
800c040: b29a uxth r2, r3
|
|
800c042: 68fb ldr r3, [r7, #12]
|
|
800c044: 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));
|
|
}
|
|
800c046: bf00 nop
|
|
800c048: 3710 adds r7, #16
|
|
800c04a: 46bd mov sp, r7
|
|
800c04c: bd80 pop {r7, pc}
|
|
800c04e: bf00 nop
|
|
800c050: 10624dd3 .word 0x10624dd3
|
|
|
|
0800c054 <dhcp_handle_offer>:
|
|
*
|
|
* @param netif the netif under DHCP control
|
|
*/
|
|
static void
|
|
dhcp_handle_offer(struct netif *netif, struct dhcp_msg *msg_in)
|
|
{
|
|
800c054: b580 push {r7, lr}
|
|
800c056: b084 sub sp, #16
|
|
800c058: af00 add r7, sp, #0
|
|
800c05a: 6078 str r0, [r7, #4]
|
|
800c05c: 6039 str r1, [r7, #0]
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800c05e: 687b ldr r3, [r7, #4]
|
|
800c060: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800c062: 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)) {
|
|
800c064: 4b0c ldr r3, [pc, #48] ; (800c098 <dhcp_handle_offer+0x44>)
|
|
800c066: 789b ldrb r3, [r3, #2]
|
|
800c068: 2b00 cmp r3, #0
|
|
800c06a: d011 beq.n 800c090 <dhcp_handle_offer+0x3c>
|
|
dhcp->request_timeout = 0; /* stop timer */
|
|
800c06c: 68fb ldr r3, [r7, #12]
|
|
800c06e: 2200 movs r2, #0
|
|
800c070: 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)));
|
|
800c072: 4b0a ldr r3, [pc, #40] ; (800c09c <dhcp_handle_offer+0x48>)
|
|
800c074: 689b ldr r3, [r3, #8]
|
|
800c076: 4618 mov r0, r3
|
|
800c078: f7f8 f971 bl 800435e <lwip_htonl>
|
|
800c07c: 4602 mov r2, r0
|
|
800c07e: 68fb ldr r3, [r7, #12]
|
|
800c080: 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);
|
|
800c082: 683b ldr r3, [r7, #0]
|
|
800c084: 691a ldr r2, [r3, #16]
|
|
800c086: 68fb ldr r3, [r7, #12]
|
|
800c088: 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);
|
|
800c08a: 6878 ldr r0, [r7, #4]
|
|
800c08c: f000 f808 bl 800c0a0 <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));
|
|
}
|
|
}
|
|
800c090: bf00 nop
|
|
800c092: 3710 adds r7, #16
|
|
800c094: 46bd mov sp, r7
|
|
800c096: bd80 pop {r7, pc}
|
|
800c098: 20008c80 .word 0x20008c80
|
|
800c09c: 20008c60 .word 0x20008c60
|
|
|
|
0800c0a0 <dhcp_select>:
|
|
* @param netif the netif under DHCP control
|
|
* @return lwIP specific error (see error.h)
|
|
*/
|
|
static err_t
|
|
dhcp_select(struct netif *netif)
|
|
{
|
|
800c0a0: b5b0 push {r4, r5, r7, lr}
|
|
800c0a2: b08a sub sp, #40 ; 0x28
|
|
800c0a4: af02 add r7, sp, #8
|
|
800c0a6: 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;);
|
|
800c0a8: 687b ldr r3, [r7, #4]
|
|
800c0aa: 2b00 cmp r3, #0
|
|
800c0ac: d109 bne.n 800c0c2 <dhcp_select+0x22>
|
|
800c0ae: 4b71 ldr r3, [pc, #452] ; (800c274 <dhcp_select+0x1d4>)
|
|
800c0b0: f240 1277 movw r2, #375 ; 0x177
|
|
800c0b4: 4970 ldr r1, [pc, #448] ; (800c278 <dhcp_select+0x1d8>)
|
|
800c0b6: 4871 ldr r0, [pc, #452] ; (800c27c <dhcp_select+0x1dc>)
|
|
800c0b8: f004 fa1e bl 80104f8 <printf>
|
|
800c0bc: f06f 030f mvn.w r3, #15
|
|
800c0c0: e0d3 b.n 800c26a <dhcp_select+0x1ca>
|
|
dhcp = netif_dhcp_data(netif);
|
|
800c0c2: 687b ldr r3, [r7, #4]
|
|
800c0c4: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800c0c6: 61bb str r3, [r7, #24]
|
|
LWIP_ERROR("dhcp_select: dhcp != NULL", (dhcp != NULL), return ERR_VAL;);
|
|
800c0c8: 69bb ldr r3, [r7, #24]
|
|
800c0ca: 2b00 cmp r3, #0
|
|
800c0cc: d109 bne.n 800c0e2 <dhcp_select+0x42>
|
|
800c0ce: 4b69 ldr r3, [pc, #420] ; (800c274 <dhcp_select+0x1d4>)
|
|
800c0d0: f240 1279 movw r2, #377 ; 0x179
|
|
800c0d4: 496a ldr r1, [pc, #424] ; (800c280 <dhcp_select+0x1e0>)
|
|
800c0d6: 4869 ldr r0, [pc, #420] ; (800c27c <dhcp_select+0x1dc>)
|
|
800c0d8: f004 fa0e bl 80104f8 <printf>
|
|
800c0dc: f06f 0305 mvn.w r3, #5
|
|
800c0e0: e0c3 b.n 800c26a <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);
|
|
800c0e2: 2101 movs r1, #1
|
|
800c0e4: 69b8 ldr r0, [r7, #24]
|
|
800c0e6: f000 ffc7 bl 800d078 <dhcp_set_state>
|
|
|
|
/* create and initialize the DHCP message header */
|
|
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
|
|
800c0ea: f107 030c add.w r3, r7, #12
|
|
800c0ee: 2203 movs r2, #3
|
|
800c0f0: 69b9 ldr r1, [r7, #24]
|
|
800c0f2: 6878 ldr r0, [r7, #4]
|
|
800c0f4: f001 fc4c bl 800d990 <dhcp_create_msg>
|
|
800c0f8: 6178 str r0, [r7, #20]
|
|
if (p_out != NULL) {
|
|
800c0fa: 697b ldr r3, [r7, #20]
|
|
800c0fc: 2b00 cmp r3, #0
|
|
800c0fe: f000 8085 beq.w 800c20c <dhcp_select+0x16c>
|
|
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
|
|
800c102: 697b ldr r3, [r7, #20]
|
|
800c104: 685b ldr r3, [r3, #4]
|
|
800c106: 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);
|
|
800c108: 89b8 ldrh r0, [r7, #12]
|
|
800c10a: 693b ldr r3, [r7, #16]
|
|
800c10c: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800c110: 2302 movs r3, #2
|
|
800c112: 2239 movs r2, #57 ; 0x39
|
|
800c114: f000 ffca bl 800d0ac <dhcp_option>
|
|
800c118: 4603 mov r3, r0
|
|
800c11a: 81bb strh r3, [r7, #12]
|
|
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
|
|
800c11c: 89b8 ldrh r0, [r7, #12]
|
|
800c11e: 693b ldr r3, [r7, #16]
|
|
800c120: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800c124: 687b ldr r3, [r7, #4]
|
|
800c126: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
800c128: 461a mov r2, r3
|
|
800c12a: f001 f819 bl 800d160 <dhcp_option_short>
|
|
800c12e: 4603 mov r3, r0
|
|
800c130: 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);
|
|
800c132: 89b8 ldrh r0, [r7, #12]
|
|
800c134: 693b ldr r3, [r7, #16]
|
|
800c136: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800c13a: 2304 movs r3, #4
|
|
800c13c: 2232 movs r2, #50 ; 0x32
|
|
800c13e: f000 ffb5 bl 800d0ac <dhcp_option>
|
|
800c142: 4603 mov r3, r0
|
|
800c144: 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)));
|
|
800c146: 89bc ldrh r4, [r7, #12]
|
|
800c148: 693b ldr r3, [r7, #16]
|
|
800c14a: f103 05f0 add.w r5, r3, #240 ; 0xf0
|
|
800c14e: 69bb ldr r3, [r7, #24]
|
|
800c150: 69db ldr r3, [r3, #28]
|
|
800c152: 4618 mov r0, r3
|
|
800c154: f7f8 f903 bl 800435e <lwip_htonl>
|
|
800c158: 4603 mov r3, r0
|
|
800c15a: 461a mov r2, r3
|
|
800c15c: 4629 mov r1, r5
|
|
800c15e: 4620 mov r0, r4
|
|
800c160: f001 f830 bl 800d1c4 <dhcp_option_long>
|
|
800c164: 4603 mov r3, r0
|
|
800c166: 81bb strh r3, [r7, #12]
|
|
|
|
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4);
|
|
800c168: 89b8 ldrh r0, [r7, #12]
|
|
800c16a: 693b ldr r3, [r7, #16]
|
|
800c16c: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800c170: 2304 movs r3, #4
|
|
800c172: 2236 movs r2, #54 ; 0x36
|
|
800c174: f000 ff9a bl 800d0ac <dhcp_option>
|
|
800c178: 4603 mov r3, r0
|
|
800c17a: 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))));
|
|
800c17c: 89bc ldrh r4, [r7, #12]
|
|
800c17e: 693b ldr r3, [r7, #16]
|
|
800c180: f103 05f0 add.w r5, r3, #240 ; 0xf0
|
|
800c184: 69bb ldr r3, [r7, #24]
|
|
800c186: 699b ldr r3, [r3, #24]
|
|
800c188: 4618 mov r0, r3
|
|
800c18a: f7f8 f8e8 bl 800435e <lwip_htonl>
|
|
800c18e: 4603 mov r3, r0
|
|
800c190: 461a mov r2, r3
|
|
800c192: 4629 mov r1, r5
|
|
800c194: 4620 mov r0, r4
|
|
800c196: f001 f815 bl 800d1c4 <dhcp_option_long>
|
|
800c19a: 4603 mov r3, r0
|
|
800c19c: 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));
|
|
800c19e: 89b8 ldrh r0, [r7, #12]
|
|
800c1a0: 693b ldr r3, [r7, #16]
|
|
800c1a2: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800c1a6: 2303 movs r3, #3
|
|
800c1a8: 2237 movs r2, #55 ; 0x37
|
|
800c1aa: f000 ff7f bl 800d0ac <dhcp_option>
|
|
800c1ae: 4603 mov r3, r0
|
|
800c1b0: 81bb strh r3, [r7, #12]
|
|
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
|
|
800c1b2: 2300 movs r3, #0
|
|
800c1b4: 77bb strb r3, [r7, #30]
|
|
800c1b6: e00e b.n 800c1d6 <dhcp_select+0x136>
|
|
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
|
|
800c1b8: 89b8 ldrh r0, [r7, #12]
|
|
800c1ba: 693b ldr r3, [r7, #16]
|
|
800c1bc: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800c1c0: 7fbb ldrb r3, [r7, #30]
|
|
800c1c2: 4a30 ldr r2, [pc, #192] ; (800c284 <dhcp_select+0x1e4>)
|
|
800c1c4: 5cd3 ldrb r3, [r2, r3]
|
|
800c1c6: 461a mov r2, r3
|
|
800c1c8: f000 ffa4 bl 800d114 <dhcp_option_byte>
|
|
800c1cc: 4603 mov r3, r0
|
|
800c1ce: 81bb strh r3, [r7, #12]
|
|
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
|
|
800c1d0: 7fbb ldrb r3, [r7, #30]
|
|
800c1d2: 3301 adds r3, #1
|
|
800c1d4: 77bb strb r3, [r7, #30]
|
|
800c1d6: 7fbb ldrb r3, [r7, #30]
|
|
800c1d8: 2b02 cmp r3, #2
|
|
800c1da: d9ed bls.n 800c1b8 <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);
|
|
800c1dc: 89b8 ldrh r0, [r7, #12]
|
|
800c1de: 693b ldr r3, [r7, #16]
|
|
800c1e0: 33f0 adds r3, #240 ; 0xf0
|
|
800c1e2: 697a ldr r2, [r7, #20]
|
|
800c1e4: 4619 mov r1, r3
|
|
800c1e6: f001 fca9 bl 800db3c <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);
|
|
800c1ea: 4b27 ldr r3, [pc, #156] ; (800c288 <dhcp_select+0x1e8>)
|
|
800c1ec: 6818 ldr r0, [r3, #0]
|
|
800c1ee: 4b27 ldr r3, [pc, #156] ; (800c28c <dhcp_select+0x1ec>)
|
|
800c1f0: 9301 str r3, [sp, #4]
|
|
800c1f2: 687b ldr r3, [r7, #4]
|
|
800c1f4: 9300 str r3, [sp, #0]
|
|
800c1f6: 2343 movs r3, #67 ; 0x43
|
|
800c1f8: 4a25 ldr r2, [pc, #148] ; (800c290 <dhcp_select+0x1f0>)
|
|
800c1fa: 6979 ldr r1, [r7, #20]
|
|
800c1fc: f7ff fbda bl 800b9b4 <udp_sendto_if_src>
|
|
800c200: 4603 mov r3, r0
|
|
800c202: 77fb strb r3, [r7, #31]
|
|
pbuf_free(p_out);
|
|
800c204: 6978 ldr r0, [r7, #20]
|
|
800c206: f7f9 fbff bl 8005a08 <pbuf_free>
|
|
800c20a: e001 b.n 800c210 <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;
|
|
800c20c: 23ff movs r3, #255 ; 0xff
|
|
800c20e: 77fb strb r3, [r7, #31]
|
|
}
|
|
if (dhcp->tries < 255) {
|
|
800c210: 69bb ldr r3, [r7, #24]
|
|
800c212: 799b ldrb r3, [r3, #6]
|
|
800c214: 2bff cmp r3, #255 ; 0xff
|
|
800c216: d005 beq.n 800c224 <dhcp_select+0x184>
|
|
dhcp->tries++;
|
|
800c218: 69bb ldr r3, [r7, #24]
|
|
800c21a: 799b ldrb r3, [r3, #6]
|
|
800c21c: 3301 adds r3, #1
|
|
800c21e: b2da uxtb r2, r3
|
|
800c220: 69bb ldr r3, [r7, #24]
|
|
800c222: 719a strb r2, [r3, #6]
|
|
}
|
|
msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000);
|
|
800c224: 69bb ldr r3, [r7, #24]
|
|
800c226: 799b ldrb r3, [r3, #6]
|
|
800c228: 2b05 cmp r3, #5
|
|
800c22a: d80d bhi.n 800c248 <dhcp_select+0x1a8>
|
|
800c22c: 69bb ldr r3, [r7, #24]
|
|
800c22e: 799b ldrb r3, [r3, #6]
|
|
800c230: 461a mov r2, r3
|
|
800c232: 2301 movs r3, #1
|
|
800c234: 4093 lsls r3, r2
|
|
800c236: b29b uxth r3, r3
|
|
800c238: 461a mov r2, r3
|
|
800c23a: 0152 lsls r2, r2, #5
|
|
800c23c: 1ad2 subs r2, r2, r3
|
|
800c23e: 0092 lsls r2, r2, #2
|
|
800c240: 4413 add r3, r2
|
|
800c242: 00db lsls r3, r3, #3
|
|
800c244: b29b uxth r3, r3
|
|
800c246: e001 b.n 800c24c <dhcp_select+0x1ac>
|
|
800c248: f64e 2360 movw r3, #60000 ; 0xea60
|
|
800c24c: 81fb strh r3, [r7, #14]
|
|
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
|
|
800c24e: 89fb ldrh r3, [r7, #14]
|
|
800c250: f203 13f3 addw r3, r3, #499 ; 0x1f3
|
|
800c254: 4a0f ldr r2, [pc, #60] ; (800c294 <dhcp_select+0x1f4>)
|
|
800c256: fb82 1203 smull r1, r2, r2, r3
|
|
800c25a: 1152 asrs r2, r2, #5
|
|
800c25c: 17db asrs r3, r3, #31
|
|
800c25e: 1ad3 subs r3, r2, r3
|
|
800c260: b29a uxth r2, r3
|
|
800c262: 69bb ldr r3, [r7, #24]
|
|
800c264: 811a strh r2, [r3, #8]
|
|
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs));
|
|
return result;
|
|
800c266: f997 301f ldrsb.w r3, [r7, #31]
|
|
}
|
|
800c26a: 4618 mov r0, r3
|
|
800c26c: 3720 adds r7, #32
|
|
800c26e: 46bd mov sp, r7
|
|
800c270: bdb0 pop {r4, r5, r7, pc}
|
|
800c272: bf00 nop
|
|
800c274: 0801736c .word 0x0801736c
|
|
800c278: 08017418 .word 0x08017418
|
|
800c27c: 080173cc .word 0x080173cc
|
|
800c280: 08017434 .word 0x08017434
|
|
800c284: 2000002c .word 0x2000002c
|
|
800c288: 20008c88 .word 0x20008c88
|
|
800c28c: 08017f3c .word 0x08017f3c
|
|
800c290: 08017f40 .word 0x08017f40
|
|
800c294: 10624dd3 .word 0x10624dd3
|
|
|
|
0800c298 <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)
|
|
{
|
|
800c298: b580 push {r7, lr}
|
|
800c29a: b082 sub sp, #8
|
|
800c29c: 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) {
|
|
800c29e: 4b27 ldr r3, [pc, #156] ; (800c33c <dhcp_coarse_tmr+0xa4>)
|
|
800c2a0: 681b ldr r3, [r3, #0]
|
|
800c2a2: 607b str r3, [r7, #4]
|
|
800c2a4: e042 b.n 800c32c <dhcp_coarse_tmr+0x94>
|
|
/* only act on DHCP configured interfaces */
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800c2a6: 687b ldr r3, [r7, #4]
|
|
800c2a8: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800c2aa: 603b str r3, [r7, #0]
|
|
if ((dhcp != NULL) && (dhcp->state != DHCP_STATE_OFF)) {
|
|
800c2ac: 683b ldr r3, [r7, #0]
|
|
800c2ae: 2b00 cmp r3, #0
|
|
800c2b0: d039 beq.n 800c326 <dhcp_coarse_tmr+0x8e>
|
|
800c2b2: 683b ldr r3, [r7, #0]
|
|
800c2b4: 795b ldrb r3, [r3, #5]
|
|
800c2b6: 2b00 cmp r3, #0
|
|
800c2b8: d035 beq.n 800c326 <dhcp_coarse_tmr+0x8e>
|
|
/* compare lease time to expire timeout */
|
|
if (dhcp->t0_timeout && (++dhcp->lease_used == dhcp->t0_timeout)) {
|
|
800c2ba: 683b ldr r3, [r7, #0]
|
|
800c2bc: 8a9b ldrh r3, [r3, #20]
|
|
800c2be: 2b00 cmp r3, #0
|
|
800c2c0: d012 beq.n 800c2e8 <dhcp_coarse_tmr+0x50>
|
|
800c2c2: 683b ldr r3, [r7, #0]
|
|
800c2c4: 8a5b ldrh r3, [r3, #18]
|
|
800c2c6: 3301 adds r3, #1
|
|
800c2c8: b29a uxth r2, r3
|
|
800c2ca: 683b ldr r3, [r7, #0]
|
|
800c2cc: 825a strh r2, [r3, #18]
|
|
800c2ce: 683b ldr r3, [r7, #0]
|
|
800c2d0: 8a5a ldrh r2, [r3, #18]
|
|
800c2d2: 683b ldr r3, [r7, #0]
|
|
800c2d4: 8a9b ldrh r3, [r3, #20]
|
|
800c2d6: 429a cmp r2, r3
|
|
800c2d8: d106 bne.n 800c2e8 <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);
|
|
800c2da: 6878 ldr r0, [r7, #4]
|
|
800c2dc: f000 fe32 bl 800cf44 <dhcp_release_and_stop>
|
|
dhcp_start(netif);
|
|
800c2e0: 6878 ldr r0, [r7, #4]
|
|
800c2e2: f000 f969 bl 800c5b8 <dhcp_start>
|
|
800c2e6: e01e b.n 800c326 <dhcp_coarse_tmr+0x8e>
|
|
/* timer is active (non zero), and triggers (zeroes) now? */
|
|
} else if (dhcp->t2_rebind_time && (dhcp->t2_rebind_time-- == 1)) {
|
|
800c2e8: 683b ldr r3, [r7, #0]
|
|
800c2ea: 8a1b ldrh r3, [r3, #16]
|
|
800c2ec: 2b00 cmp r3, #0
|
|
800c2ee: d00b beq.n 800c308 <dhcp_coarse_tmr+0x70>
|
|
800c2f0: 683b ldr r3, [r7, #0]
|
|
800c2f2: 8a1b ldrh r3, [r3, #16]
|
|
800c2f4: 1e5a subs r2, r3, #1
|
|
800c2f6: b291 uxth r1, r2
|
|
800c2f8: 683a ldr r2, [r7, #0]
|
|
800c2fa: 8211 strh r1, [r2, #16]
|
|
800c2fc: 2b01 cmp r3, #1
|
|
800c2fe: d103 bne.n 800c308 <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);
|
|
800c300: 6878 ldr r0, [r7, #4]
|
|
800c302: f000 f8c6 bl 800c492 <dhcp_t2_timeout>
|
|
800c306: e00e b.n 800c326 <dhcp_coarse_tmr+0x8e>
|
|
/* timer is active (non zero), and triggers (zeroes) now */
|
|
} else if (dhcp->t1_renew_time && (dhcp->t1_renew_time-- == 1)) {
|
|
800c308: 683b ldr r3, [r7, #0]
|
|
800c30a: 89db ldrh r3, [r3, #14]
|
|
800c30c: 2b00 cmp r3, #0
|
|
800c30e: d00a beq.n 800c326 <dhcp_coarse_tmr+0x8e>
|
|
800c310: 683b ldr r3, [r7, #0]
|
|
800c312: 89db ldrh r3, [r3, #14]
|
|
800c314: 1e5a subs r2, r3, #1
|
|
800c316: b291 uxth r1, r2
|
|
800c318: 683a ldr r2, [r7, #0]
|
|
800c31a: 81d1 strh r1, [r2, #14]
|
|
800c31c: 2b01 cmp r3, #1
|
|
800c31e: d102 bne.n 800c326 <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);
|
|
800c320: 6878 ldr r0, [r7, #4]
|
|
800c322: f000 f888 bl 800c436 <dhcp_t1_timeout>
|
|
NETIF_FOREACH(netif) {
|
|
800c326: 687b ldr r3, [r7, #4]
|
|
800c328: 681b ldr r3, [r3, #0]
|
|
800c32a: 607b str r3, [r7, #4]
|
|
800c32c: 687b ldr r3, [r7, #4]
|
|
800c32e: 2b00 cmp r3, #0
|
|
800c330: d1b9 bne.n 800c2a6 <dhcp_coarse_tmr+0xe>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
800c332: bf00 nop
|
|
800c334: bf00 nop
|
|
800c336: 3708 adds r7, #8
|
|
800c338: 46bd mov sp, r7
|
|
800c33a: bd80 pop {r7, pc}
|
|
800c33c: 20008bf4 .word 0x20008bf4
|
|
|
|
0800c340 <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)
|
|
{
|
|
800c340: b580 push {r7, lr}
|
|
800c342: b082 sub sp, #8
|
|
800c344: af00 add r7, sp, #0
|
|
struct netif *netif;
|
|
/* loop through netif's */
|
|
NETIF_FOREACH(netif) {
|
|
800c346: 4b16 ldr r3, [pc, #88] ; (800c3a0 <dhcp_fine_tmr+0x60>)
|
|
800c348: 681b ldr r3, [r3, #0]
|
|
800c34a: 607b str r3, [r7, #4]
|
|
800c34c: e020 b.n 800c390 <dhcp_fine_tmr+0x50>
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800c34e: 687b ldr r3, [r7, #4]
|
|
800c350: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800c352: 603b str r3, [r7, #0]
|
|
/* only act on DHCP configured interfaces */
|
|
if (dhcp != NULL) {
|
|
800c354: 683b ldr r3, [r7, #0]
|
|
800c356: 2b00 cmp r3, #0
|
|
800c358: d017 beq.n 800c38a <dhcp_fine_tmr+0x4a>
|
|
/* timer is active (non zero), and is about to trigger now */
|
|
if (dhcp->request_timeout > 1) {
|
|
800c35a: 683b ldr r3, [r7, #0]
|
|
800c35c: 891b ldrh r3, [r3, #8]
|
|
800c35e: 2b01 cmp r3, #1
|
|
800c360: d906 bls.n 800c370 <dhcp_fine_tmr+0x30>
|
|
dhcp->request_timeout--;
|
|
800c362: 683b ldr r3, [r7, #0]
|
|
800c364: 891b ldrh r3, [r3, #8]
|
|
800c366: 3b01 subs r3, #1
|
|
800c368: b29a uxth r2, r3
|
|
800c36a: 683b ldr r3, [r7, #0]
|
|
800c36c: 811a strh r2, [r3, #8]
|
|
800c36e: e00c b.n 800c38a <dhcp_fine_tmr+0x4a>
|
|
} else if (dhcp->request_timeout == 1) {
|
|
800c370: 683b ldr r3, [r7, #0]
|
|
800c372: 891b ldrh r3, [r3, #8]
|
|
800c374: 2b01 cmp r3, #1
|
|
800c376: d108 bne.n 800c38a <dhcp_fine_tmr+0x4a>
|
|
dhcp->request_timeout--;
|
|
800c378: 683b ldr r3, [r7, #0]
|
|
800c37a: 891b ldrh r3, [r3, #8]
|
|
800c37c: 3b01 subs r3, #1
|
|
800c37e: b29a uxth r2, r3
|
|
800c380: 683b ldr r3, [r7, #0]
|
|
800c382: 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);
|
|
800c384: 6878 ldr r0, [r7, #4]
|
|
800c386: f000 f80d bl 800c3a4 <dhcp_timeout>
|
|
NETIF_FOREACH(netif) {
|
|
800c38a: 687b ldr r3, [r7, #4]
|
|
800c38c: 681b ldr r3, [r3, #0]
|
|
800c38e: 607b str r3, [r7, #4]
|
|
800c390: 687b ldr r3, [r7, #4]
|
|
800c392: 2b00 cmp r3, #0
|
|
800c394: d1db bne.n 800c34e <dhcp_fine_tmr+0xe>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
800c396: bf00 nop
|
|
800c398: bf00 nop
|
|
800c39a: 3708 adds r7, #8
|
|
800c39c: 46bd mov sp, r7
|
|
800c39e: bd80 pop {r7, pc}
|
|
800c3a0: 20008bf4 .word 0x20008bf4
|
|
|
|
0800c3a4 <dhcp_timeout>:
|
|
*
|
|
* @param netif the netif under DHCP control
|
|
*/
|
|
static void
|
|
dhcp_timeout(struct netif *netif)
|
|
{
|
|
800c3a4: b580 push {r7, lr}
|
|
800c3a6: b084 sub sp, #16
|
|
800c3a8: af00 add r7, sp, #0
|
|
800c3aa: 6078 str r0, [r7, #4]
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800c3ac: 687b ldr r3, [r7, #4]
|
|
800c3ae: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800c3b0: 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)) {
|
|
800c3b2: 68fb ldr r3, [r7, #12]
|
|
800c3b4: 795b ldrb r3, [r3, #5]
|
|
800c3b6: 2b0c cmp r3, #12
|
|
800c3b8: d003 beq.n 800c3c2 <dhcp_timeout+0x1e>
|
|
800c3ba: 68fb ldr r3, [r7, #12]
|
|
800c3bc: 795b ldrb r3, [r3, #5]
|
|
800c3be: 2b06 cmp r3, #6
|
|
800c3c0: d103 bne.n 800c3ca <dhcp_timeout+0x26>
|
|
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout(): restarting discovery\n"));
|
|
dhcp_discover(netif);
|
|
800c3c2: 6878 ldr r0, [r7, #4]
|
|
800c3c4: f000 fa54 bl 800c870 <dhcp_discover>
|
|
dhcp_reboot(netif);
|
|
} else {
|
|
dhcp_discover(netif);
|
|
}
|
|
}
|
|
}
|
|
800c3c8: e031 b.n 800c42e <dhcp_timeout+0x8a>
|
|
} else if (dhcp->state == DHCP_STATE_REQUESTING) {
|
|
800c3ca: 68fb ldr r3, [r7, #12]
|
|
800c3cc: 795b ldrb r3, [r3, #5]
|
|
800c3ce: 2b01 cmp r3, #1
|
|
800c3d0: d10e bne.n 800c3f0 <dhcp_timeout+0x4c>
|
|
if (dhcp->tries <= 5) {
|
|
800c3d2: 68fb ldr r3, [r7, #12]
|
|
800c3d4: 799b ldrb r3, [r3, #6]
|
|
800c3d6: 2b05 cmp r3, #5
|
|
800c3d8: d803 bhi.n 800c3e2 <dhcp_timeout+0x3e>
|
|
dhcp_select(netif);
|
|
800c3da: 6878 ldr r0, [r7, #4]
|
|
800c3dc: f7ff fe60 bl 800c0a0 <dhcp_select>
|
|
}
|
|
800c3e0: e025 b.n 800c42e <dhcp_timeout+0x8a>
|
|
dhcp_release_and_stop(netif);
|
|
800c3e2: 6878 ldr r0, [r7, #4]
|
|
800c3e4: f000 fdae bl 800cf44 <dhcp_release_and_stop>
|
|
dhcp_start(netif);
|
|
800c3e8: 6878 ldr r0, [r7, #4]
|
|
800c3ea: f000 f8e5 bl 800c5b8 <dhcp_start>
|
|
}
|
|
800c3ee: e01e b.n 800c42e <dhcp_timeout+0x8a>
|
|
} else if (dhcp->state == DHCP_STATE_CHECKING) {
|
|
800c3f0: 68fb ldr r3, [r7, #12]
|
|
800c3f2: 795b ldrb r3, [r3, #5]
|
|
800c3f4: 2b08 cmp r3, #8
|
|
800c3f6: d10b bne.n 800c410 <dhcp_timeout+0x6c>
|
|
if (dhcp->tries <= 1) {
|
|
800c3f8: 68fb ldr r3, [r7, #12]
|
|
800c3fa: 799b ldrb r3, [r3, #6]
|
|
800c3fc: 2b01 cmp r3, #1
|
|
800c3fe: d803 bhi.n 800c408 <dhcp_timeout+0x64>
|
|
dhcp_check(netif);
|
|
800c400: 6878 ldr r0, [r7, #4]
|
|
800c402: f7ff fdf3 bl 800bfec <dhcp_check>
|
|
}
|
|
800c406: e012 b.n 800c42e <dhcp_timeout+0x8a>
|
|
dhcp_bind(netif);
|
|
800c408: 6878 ldr r0, [r7, #4]
|
|
800c40a: f000 fad3 bl 800c9b4 <dhcp_bind>
|
|
}
|
|
800c40e: e00e b.n 800c42e <dhcp_timeout+0x8a>
|
|
} else if (dhcp->state == DHCP_STATE_REBOOTING) {
|
|
800c410: 68fb ldr r3, [r7, #12]
|
|
800c412: 795b ldrb r3, [r3, #5]
|
|
800c414: 2b03 cmp r3, #3
|
|
800c416: d10a bne.n 800c42e <dhcp_timeout+0x8a>
|
|
if (dhcp->tries < REBOOT_TRIES) {
|
|
800c418: 68fb ldr r3, [r7, #12]
|
|
800c41a: 799b ldrb r3, [r3, #6]
|
|
800c41c: 2b01 cmp r3, #1
|
|
800c41e: d803 bhi.n 800c428 <dhcp_timeout+0x84>
|
|
dhcp_reboot(netif);
|
|
800c420: 6878 ldr r0, [r7, #4]
|
|
800c422: f000 fcd9 bl 800cdd8 <dhcp_reboot>
|
|
}
|
|
800c426: e002 b.n 800c42e <dhcp_timeout+0x8a>
|
|
dhcp_discover(netif);
|
|
800c428: 6878 ldr r0, [r7, #4]
|
|
800c42a: f000 fa21 bl 800c870 <dhcp_discover>
|
|
}
|
|
800c42e: bf00 nop
|
|
800c430: 3710 adds r7, #16
|
|
800c432: 46bd mov sp, r7
|
|
800c434: bd80 pop {r7, pc}
|
|
|
|
0800c436 <dhcp_t1_timeout>:
|
|
*
|
|
* @param netif the netif under DHCP control
|
|
*/
|
|
static void
|
|
dhcp_t1_timeout(struct netif *netif)
|
|
{
|
|
800c436: b580 push {r7, lr}
|
|
800c438: b084 sub sp, #16
|
|
800c43a: af00 add r7, sp, #0
|
|
800c43c: 6078 str r0, [r7, #4]
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800c43e: 687b ldr r3, [r7, #4]
|
|
800c440: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800c442: 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) ||
|
|
800c444: 68fb ldr r3, [r7, #12]
|
|
800c446: 795b ldrb r3, [r3, #5]
|
|
800c448: 2b01 cmp r3, #1
|
|
800c44a: d007 beq.n 800c45c <dhcp_t1_timeout+0x26>
|
|
800c44c: 68fb ldr r3, [r7, #12]
|
|
800c44e: 795b ldrb r3, [r3, #5]
|
|
800c450: 2b0a cmp r3, #10
|
|
800c452: d003 beq.n 800c45c <dhcp_t1_timeout+0x26>
|
|
(dhcp->state == DHCP_STATE_RENEWING)) {
|
|
800c454: 68fb ldr r3, [r7, #12]
|
|
800c456: 795b ldrb r3, [r3, #5]
|
|
if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
|
|
800c458: 2b05 cmp r3, #5
|
|
800c45a: d116 bne.n 800c48a <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);
|
|
800c45c: 6878 ldr r0, [r7, #4]
|
|
800c45e: f000 fb83 bl 800cb68 <dhcp_renew>
|
|
/* Calculate next timeout */
|
|
if (((dhcp->t2_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) {
|
|
800c462: 68fb ldr r3, [r7, #12]
|
|
800c464: 899b ldrh r3, [r3, #12]
|
|
800c466: 461a mov r2, r3
|
|
800c468: 68fb ldr r3, [r7, #12]
|
|
800c46a: 8a5b ldrh r3, [r3, #18]
|
|
800c46c: 1ad3 subs r3, r2, r3
|
|
800c46e: 2b01 cmp r3, #1
|
|
800c470: dd0b ble.n 800c48a <dhcp_t1_timeout+0x54>
|
|
dhcp->t1_renew_time = (u16_t)((dhcp->t2_timeout - dhcp->lease_used) / 2);
|
|
800c472: 68fb ldr r3, [r7, #12]
|
|
800c474: 899b ldrh r3, [r3, #12]
|
|
800c476: 461a mov r2, r3
|
|
800c478: 68fb ldr r3, [r7, #12]
|
|
800c47a: 8a5b ldrh r3, [r3, #18]
|
|
800c47c: 1ad3 subs r3, r2, r3
|
|
800c47e: 0fda lsrs r2, r3, #31
|
|
800c480: 4413 add r3, r2
|
|
800c482: 105b asrs r3, r3, #1
|
|
800c484: b29a uxth r2, r3
|
|
800c486: 68fb ldr r3, [r7, #12]
|
|
800c488: 81da strh r2, [r3, #14]
|
|
}
|
|
}
|
|
}
|
|
800c48a: bf00 nop
|
|
800c48c: 3710 adds r7, #16
|
|
800c48e: 46bd mov sp, r7
|
|
800c490: bd80 pop {r7, pc}
|
|
|
|
0800c492 <dhcp_t2_timeout>:
|
|
*
|
|
* @param netif the netif under DHCP control
|
|
*/
|
|
static void
|
|
dhcp_t2_timeout(struct netif *netif)
|
|
{
|
|
800c492: b580 push {r7, lr}
|
|
800c494: b084 sub sp, #16
|
|
800c496: af00 add r7, sp, #0
|
|
800c498: 6078 str r0, [r7, #4]
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800c49a: 687b ldr r3, [r7, #4]
|
|
800c49c: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800c49e: 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) ||
|
|
800c4a0: 68fb ldr r3, [r7, #12]
|
|
800c4a2: 795b ldrb r3, [r3, #5]
|
|
800c4a4: 2b01 cmp r3, #1
|
|
800c4a6: d00b beq.n 800c4c0 <dhcp_t2_timeout+0x2e>
|
|
800c4a8: 68fb ldr r3, [r7, #12]
|
|
800c4aa: 795b ldrb r3, [r3, #5]
|
|
800c4ac: 2b0a cmp r3, #10
|
|
800c4ae: d007 beq.n 800c4c0 <dhcp_t2_timeout+0x2e>
|
|
(dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) {
|
|
800c4b0: 68fb ldr r3, [r7, #12]
|
|
800c4b2: 795b ldrb r3, [r3, #5]
|
|
if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
|
|
800c4b4: 2b05 cmp r3, #5
|
|
800c4b6: d003 beq.n 800c4c0 <dhcp_t2_timeout+0x2e>
|
|
(dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) {
|
|
800c4b8: 68fb ldr r3, [r7, #12]
|
|
800c4ba: 795b ldrb r3, [r3, #5]
|
|
800c4bc: 2b04 cmp r3, #4
|
|
800c4be: d116 bne.n 800c4ee <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);
|
|
800c4c0: 6878 ldr r0, [r7, #4]
|
|
800c4c2: f000 fbed bl 800cca0 <dhcp_rebind>
|
|
/* Calculate next timeout */
|
|
if (((dhcp->t0_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) {
|
|
800c4c6: 68fb ldr r3, [r7, #12]
|
|
800c4c8: 8a9b ldrh r3, [r3, #20]
|
|
800c4ca: 461a mov r2, r3
|
|
800c4cc: 68fb ldr r3, [r7, #12]
|
|
800c4ce: 8a5b ldrh r3, [r3, #18]
|
|
800c4d0: 1ad3 subs r3, r2, r3
|
|
800c4d2: 2b01 cmp r3, #1
|
|
800c4d4: dd0b ble.n 800c4ee <dhcp_t2_timeout+0x5c>
|
|
dhcp->t2_rebind_time = (u16_t)((dhcp->t0_timeout - dhcp->lease_used) / 2);
|
|
800c4d6: 68fb ldr r3, [r7, #12]
|
|
800c4d8: 8a9b ldrh r3, [r3, #20]
|
|
800c4da: 461a mov r2, r3
|
|
800c4dc: 68fb ldr r3, [r7, #12]
|
|
800c4de: 8a5b ldrh r3, [r3, #18]
|
|
800c4e0: 1ad3 subs r3, r2, r3
|
|
800c4e2: 0fda lsrs r2, r3, #31
|
|
800c4e4: 4413 add r3, r2
|
|
800c4e6: 105b asrs r3, r3, #1
|
|
800c4e8: b29a uxth r2, r3
|
|
800c4ea: 68fb ldr r3, [r7, #12]
|
|
800c4ec: 821a strh r2, [r3, #16]
|
|
}
|
|
}
|
|
}
|
|
800c4ee: bf00 nop
|
|
800c4f0: 3710 adds r7, #16
|
|
800c4f2: 46bd mov sp, r7
|
|
800c4f4: bd80 pop {r7, pc}
|
|
...
|
|
|
|
0800c4f8 <dhcp_handle_ack>:
|
|
*
|
|
* @param netif the netif under DHCP control
|
|
*/
|
|
static void
|
|
dhcp_handle_ack(struct netif *netif, struct dhcp_msg *msg_in)
|
|
{
|
|
800c4f8: b580 push {r7, lr}
|
|
800c4fa: b084 sub sp, #16
|
|
800c4fc: af00 add r7, sp, #0
|
|
800c4fe: 6078 str r0, [r7, #4]
|
|
800c500: 6039 str r1, [r7, #0]
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800c502: 687b ldr r3, [r7, #4]
|
|
800c504: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800c506: 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);
|
|
800c508: 68fb ldr r3, [r7, #12]
|
|
800c50a: 2200 movs r2, #0
|
|
800c50c: 621a str r2, [r3, #32]
|
|
ip4_addr_set_zero(&dhcp->offered_gw_addr);
|
|
800c50e: 68fb ldr r3, [r7, #12]
|
|
800c510: 2200 movs r2, #0
|
|
800c512: 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)) {
|
|
800c514: 4b26 ldr r3, [pc, #152] ; (800c5b0 <dhcp_handle_ack+0xb8>)
|
|
800c516: 78db ldrb r3, [r3, #3]
|
|
800c518: 2b00 cmp r3, #0
|
|
800c51a: d003 beq.n 800c524 <dhcp_handle_ack+0x2c>
|
|
/* remember offered lease time */
|
|
dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME);
|
|
800c51c: 4b25 ldr r3, [pc, #148] ; (800c5b4 <dhcp_handle_ack+0xbc>)
|
|
800c51e: 68da ldr r2, [r3, #12]
|
|
800c520: 68fb ldr r3, [r7, #12]
|
|
800c522: 629a str r2, [r3, #40] ; 0x28
|
|
}
|
|
/* renewal period given? */
|
|
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) {
|
|
800c524: 4b22 ldr r3, [pc, #136] ; (800c5b0 <dhcp_handle_ack+0xb8>)
|
|
800c526: 791b ldrb r3, [r3, #4]
|
|
800c528: 2b00 cmp r3, #0
|
|
800c52a: d004 beq.n 800c536 <dhcp_handle_ack+0x3e>
|
|
/* remember given renewal period */
|
|
dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1);
|
|
800c52c: 4b21 ldr r3, [pc, #132] ; (800c5b4 <dhcp_handle_ack+0xbc>)
|
|
800c52e: 691a ldr r2, [r3, #16]
|
|
800c530: 68fb ldr r3, [r7, #12]
|
|
800c532: 62da str r2, [r3, #44] ; 0x2c
|
|
800c534: e004 b.n 800c540 <dhcp_handle_ack+0x48>
|
|
} else {
|
|
/* calculate safe periods for renewal */
|
|
dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2;
|
|
800c536: 68fb ldr r3, [r7, #12]
|
|
800c538: 6a9b ldr r3, [r3, #40] ; 0x28
|
|
800c53a: 085a lsrs r2, r3, #1
|
|
800c53c: 68fb ldr r3, [r7, #12]
|
|
800c53e: 62da str r2, [r3, #44] ; 0x2c
|
|
}
|
|
|
|
/* renewal period given? */
|
|
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) {
|
|
800c540: 4b1b ldr r3, [pc, #108] ; (800c5b0 <dhcp_handle_ack+0xb8>)
|
|
800c542: 795b ldrb r3, [r3, #5]
|
|
800c544: 2b00 cmp r3, #0
|
|
800c546: d004 beq.n 800c552 <dhcp_handle_ack+0x5a>
|
|
/* remember given rebind period */
|
|
dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2);
|
|
800c548: 4b1a ldr r3, [pc, #104] ; (800c5b4 <dhcp_handle_ack+0xbc>)
|
|
800c54a: 695a ldr r2, [r3, #20]
|
|
800c54c: 68fb ldr r3, [r7, #12]
|
|
800c54e: 631a str r2, [r3, #48] ; 0x30
|
|
800c550: e007 b.n 800c562 <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;
|
|
800c552: 68fb ldr r3, [r7, #12]
|
|
800c554: 6a9a ldr r2, [r3, #40] ; 0x28
|
|
800c556: 4613 mov r3, r2
|
|
800c558: 00db lsls r3, r3, #3
|
|
800c55a: 1a9b subs r3, r3, r2
|
|
800c55c: 08da lsrs r2, r3, #3
|
|
800c55e: 68fb ldr r3, [r7, #12]
|
|
800c560: 631a str r2, [r3, #48] ; 0x30
|
|
}
|
|
|
|
/* (y)our internet address */
|
|
ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr);
|
|
800c562: 683b ldr r3, [r7, #0]
|
|
800c564: 691a ldr r2, [r3, #16]
|
|
800c566: 68fb ldr r3, [r7, #12]
|
|
800c568: 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)) {
|
|
800c56a: 4b11 ldr r3, [pc, #68] ; (800c5b0 <dhcp_handle_ack+0xb8>)
|
|
800c56c: 799b ldrb r3, [r3, #6]
|
|
800c56e: 2b00 cmp r3, #0
|
|
800c570: d00b beq.n 800c58a <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)));
|
|
800c572: 4b10 ldr r3, [pc, #64] ; (800c5b4 <dhcp_handle_ack+0xbc>)
|
|
800c574: 699b ldr r3, [r3, #24]
|
|
800c576: 4618 mov r0, r3
|
|
800c578: f7f7 fef1 bl 800435e <lwip_htonl>
|
|
800c57c: 4602 mov r2, r0
|
|
800c57e: 68fb ldr r3, [r7, #12]
|
|
800c580: 621a str r2, [r3, #32]
|
|
dhcp->subnet_mask_given = 1;
|
|
800c582: 68fb ldr r3, [r7, #12]
|
|
800c584: 2201 movs r2, #1
|
|
800c586: 71da strb r2, [r3, #7]
|
|
800c588: e002 b.n 800c590 <dhcp_handle_ack+0x98>
|
|
} else {
|
|
dhcp->subnet_mask_given = 0;
|
|
800c58a: 68fb ldr r3, [r7, #12]
|
|
800c58c: 2200 movs r2, #0
|
|
800c58e: 71da strb r2, [r3, #7]
|
|
}
|
|
|
|
/* gateway router */
|
|
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) {
|
|
800c590: 4b07 ldr r3, [pc, #28] ; (800c5b0 <dhcp_handle_ack+0xb8>)
|
|
800c592: 79db ldrb r3, [r3, #7]
|
|
800c594: 2b00 cmp r3, #0
|
|
800c596: d007 beq.n 800c5a8 <dhcp_handle_ack+0xb0>
|
|
ip4_addr_set_u32(&dhcp->offered_gw_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER)));
|
|
800c598: 4b06 ldr r3, [pc, #24] ; (800c5b4 <dhcp_handle_ack+0xbc>)
|
|
800c59a: 69db ldr r3, [r3, #28]
|
|
800c59c: 4618 mov r0, r3
|
|
800c59e: f7f7 fede bl 800435e <lwip_htonl>
|
|
800c5a2: 4602 mov r2, r0
|
|
800c5a4: 68fb ldr r3, [r7, #12]
|
|
800c5a6: 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 */
|
|
}
|
|
800c5a8: bf00 nop
|
|
800c5aa: 3710 adds r7, #16
|
|
800c5ac: 46bd mov sp, r7
|
|
800c5ae: bd80 pop {r7, pc}
|
|
800c5b0: 20008c80 .word 0x20008c80
|
|
800c5b4: 20008c60 .word 0x20008c60
|
|
|
|
0800c5b8 <dhcp_start>:
|
|
* - ERR_OK - No error
|
|
* - ERR_MEM - Out of memory
|
|
*/
|
|
err_t
|
|
dhcp_start(struct netif *netif)
|
|
{
|
|
800c5b8: b580 push {r7, lr}
|
|
800c5ba: b084 sub sp, #16
|
|
800c5bc: af00 add r7, sp, #0
|
|
800c5be: 6078 str r0, [r7, #4]
|
|
struct dhcp *dhcp;
|
|
err_t result;
|
|
|
|
LWIP_ASSERT_CORE_LOCKED();
|
|
LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;);
|
|
800c5c0: 687b ldr r3, [r7, #4]
|
|
800c5c2: 2b00 cmp r3, #0
|
|
800c5c4: d109 bne.n 800c5da <dhcp_start+0x22>
|
|
800c5c6: 4b37 ldr r3, [pc, #220] ; (800c6a4 <dhcp_start+0xec>)
|
|
800c5c8: f240 22e7 movw r2, #743 ; 0x2e7
|
|
800c5cc: 4936 ldr r1, [pc, #216] ; (800c6a8 <dhcp_start+0xf0>)
|
|
800c5ce: 4837 ldr r0, [pc, #220] ; (800c6ac <dhcp_start+0xf4>)
|
|
800c5d0: f003 ff92 bl 80104f8 <printf>
|
|
800c5d4: f06f 030f mvn.w r3, #15
|
|
800c5d8: e060 b.n 800c69c <dhcp_start+0xe4>
|
|
LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;);
|
|
800c5da: 687b ldr r3, [r7, #4]
|
|
800c5dc: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
800c5e0: f003 0301 and.w r3, r3, #1
|
|
800c5e4: 2b00 cmp r3, #0
|
|
800c5e6: d109 bne.n 800c5fc <dhcp_start+0x44>
|
|
800c5e8: 4b2e ldr r3, [pc, #184] ; (800c6a4 <dhcp_start+0xec>)
|
|
800c5ea: f44f 723a mov.w r2, #744 ; 0x2e8
|
|
800c5ee: 4930 ldr r1, [pc, #192] ; (800c6b0 <dhcp_start+0xf8>)
|
|
800c5f0: 482e ldr r0, [pc, #184] ; (800c6ac <dhcp_start+0xf4>)
|
|
800c5f2: f003 ff81 bl 80104f8 <printf>
|
|
800c5f6: f06f 030f mvn.w r3, #15
|
|
800c5fa: e04f b.n 800c69c <dhcp_start+0xe4>
|
|
dhcp = netif_dhcp_data(netif);
|
|
800c5fc: 687b ldr r3, [r7, #4]
|
|
800c5fe: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800c600: 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) {
|
|
800c602: 687b ldr r3, [r7, #4]
|
|
800c604: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
800c606: f5b3 7f10 cmp.w r3, #576 ; 0x240
|
|
800c60a: d202 bcs.n 800c612 <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;
|
|
800c60c: f04f 33ff mov.w r3, #4294967295
|
|
800c610: e044 b.n 800c69c <dhcp_start+0xe4>
|
|
}
|
|
|
|
/* no DHCP client attached yet? */
|
|
if (dhcp == NULL) {
|
|
800c612: 68fb ldr r3, [r7, #12]
|
|
800c614: 2b00 cmp r3, #0
|
|
800c616: d10d bne.n 800c634 <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));
|
|
800c618: 2034 movs r0, #52 ; 0x34
|
|
800c61a: f7f8 f973 bl 8004904 <mem_malloc>
|
|
800c61e: 60f8 str r0, [r7, #12]
|
|
if (dhcp == NULL) {
|
|
800c620: 68fb ldr r3, [r7, #12]
|
|
800c622: 2b00 cmp r3, #0
|
|
800c624: d102 bne.n 800c62c <dhcp_start+0x74>
|
|
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not allocate dhcp\n"));
|
|
return ERR_MEM;
|
|
800c626: f04f 33ff mov.w r3, #4294967295
|
|
800c62a: e037 b.n 800c69c <dhcp_start+0xe4>
|
|
}
|
|
|
|
/* store this dhcp client in the netif */
|
|
netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp);
|
|
800c62c: 687b ldr r3, [r7, #4]
|
|
800c62e: 68fa ldr r2, [r7, #12]
|
|
800c630: 625a str r2, [r3, #36] ; 0x24
|
|
800c632: e005 b.n 800c640 <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) {
|
|
800c634: 68fb ldr r3, [r7, #12]
|
|
800c636: 791b ldrb r3, [r3, #4]
|
|
800c638: 2b00 cmp r3, #0
|
|
800c63a: d001 beq.n 800c640 <dhcp_start+0x88>
|
|
dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */
|
|
800c63c: f7ff fc92 bl 800bf64 <dhcp_dec_pcb_refcount>
|
|
}
|
|
/* dhcp is cleared below, no need to reset flag*/
|
|
}
|
|
|
|
/* clear data structure */
|
|
memset(dhcp, 0, sizeof(struct dhcp));
|
|
800c640: 2234 movs r2, #52 ; 0x34
|
|
800c642: 2100 movs r1, #0
|
|
800c644: 68f8 ldr r0, [r7, #12]
|
|
800c646: f003 ff4f bl 80104e8 <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 */
|
|
800c64a: f7ff fc39 bl 800bec0 <dhcp_inc_pcb_refcount>
|
|
800c64e: 4603 mov r3, r0
|
|
800c650: 2b00 cmp r3, #0
|
|
800c652: d002 beq.n 800c65a <dhcp_start+0xa2>
|
|
return ERR_MEM;
|
|
800c654: f04f 33ff mov.w r3, #4294967295
|
|
800c658: e020 b.n 800c69c <dhcp_start+0xe4>
|
|
}
|
|
dhcp->pcb_allocated = 1;
|
|
800c65a: 68fb ldr r3, [r7, #12]
|
|
800c65c: 2201 movs r2, #1
|
|
800c65e: 711a strb r2, [r3, #4]
|
|
|
|
if (!netif_is_link_up(netif)) {
|
|
800c660: 687b ldr r3, [r7, #4]
|
|
800c662: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
800c666: f003 0304 and.w r3, r3, #4
|
|
800c66a: 2b00 cmp r3, #0
|
|
800c66c: d105 bne.n 800c67a <dhcp_start+0xc2>
|
|
/* set state INIT and wait for dhcp_network_changed() to call dhcp_discover() */
|
|
dhcp_set_state(dhcp, DHCP_STATE_INIT);
|
|
800c66e: 2102 movs r1, #2
|
|
800c670: 68f8 ldr r0, [r7, #12]
|
|
800c672: f000 fd01 bl 800d078 <dhcp_set_state>
|
|
return ERR_OK;
|
|
800c676: 2300 movs r3, #0
|
|
800c678: e010 b.n 800c69c <dhcp_start+0xe4>
|
|
}
|
|
|
|
/* (re)start the DHCP negotiation */
|
|
result = dhcp_discover(netif);
|
|
800c67a: 6878 ldr r0, [r7, #4]
|
|
800c67c: f000 f8f8 bl 800c870 <dhcp_discover>
|
|
800c680: 4603 mov r3, r0
|
|
800c682: 72fb strb r3, [r7, #11]
|
|
if (result != ERR_OK) {
|
|
800c684: f997 300b ldrsb.w r3, [r7, #11]
|
|
800c688: 2b00 cmp r3, #0
|
|
800c68a: d005 beq.n 800c698 <dhcp_start+0xe0>
|
|
/* free resources allocated above */
|
|
dhcp_release_and_stop(netif);
|
|
800c68c: 6878 ldr r0, [r7, #4]
|
|
800c68e: f000 fc59 bl 800cf44 <dhcp_release_and_stop>
|
|
return ERR_MEM;
|
|
800c692: f04f 33ff mov.w r3, #4294967295
|
|
800c696: e001 b.n 800c69c <dhcp_start+0xe4>
|
|
}
|
|
return result;
|
|
800c698: f997 300b ldrsb.w r3, [r7, #11]
|
|
}
|
|
800c69c: 4618 mov r0, r3
|
|
800c69e: 3710 adds r7, #16
|
|
800c6a0: 46bd mov sp, r7
|
|
800c6a2: bd80 pop {r7, pc}
|
|
800c6a4: 0801736c .word 0x0801736c
|
|
800c6a8: 08017450 .word 0x08017450
|
|
800c6ac: 080173cc .word 0x080173cc
|
|
800c6b0: 08017494 .word 0x08017494
|
|
|
|
0800c6b4 <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)
|
|
{
|
|
800c6b4: b580 push {r7, lr}
|
|
800c6b6: b084 sub sp, #16
|
|
800c6b8: af00 add r7, sp, #0
|
|
800c6ba: 6078 str r0, [r7, #4]
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800c6bc: 687b ldr r3, [r7, #4]
|
|
800c6be: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800c6c0: 60fb str r3, [r7, #12]
|
|
|
|
if (!dhcp) {
|
|
800c6c2: 68fb ldr r3, [r7, #12]
|
|
800c6c4: 2b00 cmp r3, #0
|
|
800c6c6: d025 beq.n 800c714 <dhcp_network_changed+0x60>
|
|
return;
|
|
}
|
|
switch (dhcp->state) {
|
|
800c6c8: 68fb ldr r3, [r7, #12]
|
|
800c6ca: 795b ldrb r3, [r3, #5]
|
|
800c6cc: 2b0a cmp r3, #10
|
|
800c6ce: d008 beq.n 800c6e2 <dhcp_network_changed+0x2e>
|
|
800c6d0: 2b0a cmp r3, #10
|
|
800c6d2: dc0d bgt.n 800c6f0 <dhcp_network_changed+0x3c>
|
|
800c6d4: 2b00 cmp r3, #0
|
|
800c6d6: d01f beq.n 800c718 <dhcp_network_changed+0x64>
|
|
800c6d8: 2b00 cmp r3, #0
|
|
800c6da: db09 blt.n 800c6f0 <dhcp_network_changed+0x3c>
|
|
800c6dc: 3b03 subs r3, #3
|
|
800c6de: 2b02 cmp r3, #2
|
|
800c6e0: d806 bhi.n 800c6f0 <dhcp_network_changed+0x3c>
|
|
case DHCP_STATE_REBINDING:
|
|
case DHCP_STATE_RENEWING:
|
|
case DHCP_STATE_BOUND:
|
|
case DHCP_STATE_REBOOTING:
|
|
dhcp->tries = 0;
|
|
800c6e2: 68fb ldr r3, [r7, #12]
|
|
800c6e4: 2200 movs r2, #0
|
|
800c6e6: 719a strb r2, [r3, #6]
|
|
dhcp_reboot(netif);
|
|
800c6e8: 6878 ldr r0, [r7, #4]
|
|
800c6ea: f000 fb75 bl 800cdd8 <dhcp_reboot>
|
|
break;
|
|
800c6ee: e014 b.n 800c71a <dhcp_network_changed+0x66>
|
|
case DHCP_STATE_OFF:
|
|
/* stay off */
|
|
break;
|
|
default:
|
|
LWIP_ASSERT("invalid dhcp->state", dhcp->state <= DHCP_STATE_BACKING_OFF);
|
|
800c6f0: 68fb ldr r3, [r7, #12]
|
|
800c6f2: 795b ldrb r3, [r3, #5]
|
|
800c6f4: 2b0c cmp r3, #12
|
|
800c6f6: d906 bls.n 800c706 <dhcp_network_changed+0x52>
|
|
800c6f8: 4b09 ldr r3, [pc, #36] ; (800c720 <dhcp_network_changed+0x6c>)
|
|
800c6fa: f240 326d movw r2, #877 ; 0x36d
|
|
800c6fe: 4909 ldr r1, [pc, #36] ; (800c724 <dhcp_network_changed+0x70>)
|
|
800c700: 4809 ldr r0, [pc, #36] ; (800c728 <dhcp_network_changed+0x74>)
|
|
800c702: f003 fef9 bl 80104f8 <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;
|
|
800c706: 68fb ldr r3, [r7, #12]
|
|
800c708: 2200 movs r2, #0
|
|
800c70a: 719a strb r2, [r3, #6]
|
|
dhcp_discover(netif);
|
|
800c70c: 6878 ldr r0, [r7, #4]
|
|
800c70e: f000 f8af bl 800c870 <dhcp_discover>
|
|
break;
|
|
800c712: e002 b.n 800c71a <dhcp_network_changed+0x66>
|
|
return;
|
|
800c714: bf00 nop
|
|
800c716: e000 b.n 800c71a <dhcp_network_changed+0x66>
|
|
break;
|
|
800c718: bf00 nop
|
|
}
|
|
}
|
|
800c71a: 3710 adds r7, #16
|
|
800c71c: 46bd mov sp, r7
|
|
800c71e: bd80 pop {r7, pc}
|
|
800c720: 0801736c .word 0x0801736c
|
|
800c724: 080174b8 .word 0x080174b8
|
|
800c728: 080173cc .word 0x080173cc
|
|
|
|
0800c72c <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)
|
|
{
|
|
800c72c: b580 push {r7, lr}
|
|
800c72e: b084 sub sp, #16
|
|
800c730: af00 add r7, sp, #0
|
|
800c732: 6078 str r0, [r7, #4]
|
|
800c734: 6039 str r1, [r7, #0]
|
|
struct dhcp *dhcp;
|
|
|
|
LWIP_ERROR("netif != NULL", (netif != NULL), return;);
|
|
800c736: 687b ldr r3, [r7, #4]
|
|
800c738: 2b00 cmp r3, #0
|
|
800c73a: d107 bne.n 800c74c <dhcp_arp_reply+0x20>
|
|
800c73c: 4b0e ldr r3, [pc, #56] ; (800c778 <dhcp_arp_reply+0x4c>)
|
|
800c73e: f240 328b movw r2, #907 ; 0x38b
|
|
800c742: 490e ldr r1, [pc, #56] ; (800c77c <dhcp_arp_reply+0x50>)
|
|
800c744: 480e ldr r0, [pc, #56] ; (800c780 <dhcp_arp_reply+0x54>)
|
|
800c746: f003 fed7 bl 80104f8 <printf>
|
|
800c74a: e012 b.n 800c772 <dhcp_arp_reply+0x46>
|
|
dhcp = netif_dhcp_data(netif);
|
|
800c74c: 687b ldr r3, [r7, #4]
|
|
800c74e: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800c750: 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)) {
|
|
800c752: 68fb ldr r3, [r7, #12]
|
|
800c754: 2b00 cmp r3, #0
|
|
800c756: d00c beq.n 800c772 <dhcp_arp_reply+0x46>
|
|
800c758: 68fb ldr r3, [r7, #12]
|
|
800c75a: 795b ldrb r3, [r3, #5]
|
|
800c75c: 2b08 cmp r3, #8
|
|
800c75e: d108 bne.n 800c772 <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)) {
|
|
800c760: 683b ldr r3, [r7, #0]
|
|
800c762: 681a ldr r2, [r3, #0]
|
|
800c764: 68fb ldr r3, [r7, #12]
|
|
800c766: 69db ldr r3, [r3, #28]
|
|
800c768: 429a cmp r2, r3
|
|
800c76a: d102 bne.n 800c772 <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);
|
|
800c76c: 6878 ldr r0, [r7, #4]
|
|
800c76e: f000 f809 bl 800c784 <dhcp_decline>
|
|
}
|
|
}
|
|
}
|
|
800c772: 3710 adds r7, #16
|
|
800c774: 46bd mov sp, r7
|
|
800c776: bd80 pop {r7, pc}
|
|
800c778: 0801736c .word 0x0801736c
|
|
800c77c: 08017450 .word 0x08017450
|
|
800c780: 080173cc .word 0x080173cc
|
|
|
|
0800c784 <dhcp_decline>:
|
|
*
|
|
* @param netif the netif under DHCP control
|
|
*/
|
|
static err_t
|
|
dhcp_decline(struct netif *netif)
|
|
{
|
|
800c784: b5b0 push {r4, r5, r7, lr}
|
|
800c786: b08a sub sp, #40 ; 0x28
|
|
800c788: af02 add r7, sp, #8
|
|
800c78a: 6078 str r0, [r7, #4]
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800c78c: 687b ldr r3, [r7, #4]
|
|
800c78e: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800c790: 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);
|
|
800c792: 210c movs r1, #12
|
|
800c794: 69b8 ldr r0, [r7, #24]
|
|
800c796: f000 fc6f bl 800d078 <dhcp_set_state>
|
|
/* create and initialize the DHCP message header */
|
|
p_out = dhcp_create_msg(netif, dhcp, DHCP_DECLINE, &options_out_len);
|
|
800c79a: f107 030c add.w r3, r7, #12
|
|
800c79e: 2204 movs r2, #4
|
|
800c7a0: 69b9 ldr r1, [r7, #24]
|
|
800c7a2: 6878 ldr r0, [r7, #4]
|
|
800c7a4: f001 f8f4 bl 800d990 <dhcp_create_msg>
|
|
800c7a8: 6178 str r0, [r7, #20]
|
|
if (p_out != NULL) {
|
|
800c7aa: 697b ldr r3, [r7, #20]
|
|
800c7ac: 2b00 cmp r3, #0
|
|
800c7ae: d035 beq.n 800c81c <dhcp_decline+0x98>
|
|
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
|
|
800c7b0: 697b ldr r3, [r7, #20]
|
|
800c7b2: 685b ldr r3, [r3, #4]
|
|
800c7b4: 613b str r3, [r7, #16]
|
|
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
|
|
800c7b6: 89b8 ldrh r0, [r7, #12]
|
|
800c7b8: 693b ldr r3, [r7, #16]
|
|
800c7ba: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800c7be: 2304 movs r3, #4
|
|
800c7c0: 2232 movs r2, #50 ; 0x32
|
|
800c7c2: f000 fc73 bl 800d0ac <dhcp_option>
|
|
800c7c6: 4603 mov r3, r0
|
|
800c7c8: 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)));
|
|
800c7ca: 89bc ldrh r4, [r7, #12]
|
|
800c7cc: 693b ldr r3, [r7, #16]
|
|
800c7ce: f103 05f0 add.w r5, r3, #240 ; 0xf0
|
|
800c7d2: 69bb ldr r3, [r7, #24]
|
|
800c7d4: 69db ldr r3, [r3, #28]
|
|
800c7d6: 4618 mov r0, r3
|
|
800c7d8: f7f7 fdc1 bl 800435e <lwip_htonl>
|
|
800c7dc: 4603 mov r3, r0
|
|
800c7de: 461a mov r2, r3
|
|
800c7e0: 4629 mov r1, r5
|
|
800c7e2: 4620 mov r0, r4
|
|
800c7e4: f000 fcee bl 800d1c4 <dhcp_option_long>
|
|
800c7e8: 4603 mov r3, r0
|
|
800c7ea: 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);
|
|
800c7ec: 89b8 ldrh r0, [r7, #12]
|
|
800c7ee: 693b ldr r3, [r7, #16]
|
|
800c7f0: 33f0 adds r3, #240 ; 0xf0
|
|
800c7f2: 697a ldr r2, [r7, #20]
|
|
800c7f4: 4619 mov r1, r3
|
|
800c7f6: f001 f9a1 bl 800db3c <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);
|
|
800c7fa: 4b19 ldr r3, [pc, #100] ; (800c860 <dhcp_decline+0xdc>)
|
|
800c7fc: 6818 ldr r0, [r3, #0]
|
|
800c7fe: 4b19 ldr r3, [pc, #100] ; (800c864 <dhcp_decline+0xe0>)
|
|
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: 4a17 ldr r2, [pc, #92] ; (800c868 <dhcp_decline+0xe4>)
|
|
800c80a: 6979 ldr r1, [r7, #20]
|
|
800c80c: f7ff f8d2 bl 800b9b4 <udp_sendto_if_src>
|
|
800c810: 4603 mov r3, r0
|
|
800c812: 77fb strb r3, [r7, #31]
|
|
pbuf_free(p_out);
|
|
800c814: 6978 ldr r0, [r7, #20]
|
|
800c816: f7f9 f8f7 bl 8005a08 <pbuf_free>
|
|
800c81a: e001 b.n 800c820 <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;
|
|
800c81c: 23ff movs r3, #255 ; 0xff
|
|
800c81e: 77fb strb r3, [r7, #31]
|
|
}
|
|
if (dhcp->tries < 255) {
|
|
800c820: 69bb ldr r3, [r7, #24]
|
|
800c822: 799b ldrb r3, [r3, #6]
|
|
800c824: 2bff cmp r3, #255 ; 0xff
|
|
800c826: d005 beq.n 800c834 <dhcp_decline+0xb0>
|
|
dhcp->tries++;
|
|
800c828: 69bb ldr r3, [r7, #24]
|
|
800c82a: 799b ldrb r3, [r3, #6]
|
|
800c82c: 3301 adds r3, #1
|
|
800c82e: b2da uxtb r2, r3
|
|
800c830: 69bb ldr r3, [r7, #24]
|
|
800c832: 719a strb r2, [r3, #6]
|
|
}
|
|
msecs = 10 * 1000;
|
|
800c834: f242 7310 movw r3, #10000 ; 0x2710
|
|
800c838: 81fb strh r3, [r7, #14]
|
|
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
|
|
800c83a: 89fb ldrh r3, [r7, #14]
|
|
800c83c: f203 13f3 addw r3, r3, #499 ; 0x1f3
|
|
800c840: 4a0a ldr r2, [pc, #40] ; (800c86c <dhcp_decline+0xe8>)
|
|
800c842: fb82 1203 smull r1, r2, r2, r3
|
|
800c846: 1152 asrs r2, r2, #5
|
|
800c848: 17db asrs r3, r3, #31
|
|
800c84a: 1ad3 subs r3, r2, r3
|
|
800c84c: b29a uxth r2, r3
|
|
800c84e: 69bb ldr r3, [r7, #24]
|
|
800c850: 811a strh r2, [r3, #8]
|
|
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline(): set request timeout %"U16_F" msecs\n", msecs));
|
|
return result;
|
|
800c852: f997 301f ldrsb.w r3, [r7, #31]
|
|
}
|
|
800c856: 4618 mov r0, r3
|
|
800c858: 3720 adds r7, #32
|
|
800c85a: 46bd mov sp, r7
|
|
800c85c: bdb0 pop {r4, r5, r7, pc}
|
|
800c85e: bf00 nop
|
|
800c860: 20008c88 .word 0x20008c88
|
|
800c864: 08017f3c .word 0x08017f3c
|
|
800c868: 08017f40 .word 0x08017f40
|
|
800c86c: 10624dd3 .word 0x10624dd3
|
|
|
|
0800c870 <dhcp_discover>:
|
|
*
|
|
* @param netif the netif under DHCP control
|
|
*/
|
|
static err_t
|
|
dhcp_discover(struct netif *netif)
|
|
{
|
|
800c870: b580 push {r7, lr}
|
|
800c872: b08a sub sp, #40 ; 0x28
|
|
800c874: af02 add r7, sp, #8
|
|
800c876: 6078 str r0, [r7, #4]
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800c878: 687b ldr r3, [r7, #4]
|
|
800c87a: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800c87c: 61bb str r3, [r7, #24]
|
|
err_t result = ERR_OK;
|
|
800c87e: 2300 movs r3, #0
|
|
800c880: 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);
|
|
800c882: 69bb ldr r3, [r7, #24]
|
|
800c884: 2200 movs r2, #0
|
|
800c886: 61da str r2, [r3, #28]
|
|
dhcp_set_state(dhcp, DHCP_STATE_SELECTING);
|
|
800c888: 2106 movs r1, #6
|
|
800c88a: 69b8 ldr r0, [r7, #24]
|
|
800c88c: f000 fbf4 bl 800d078 <dhcp_set_state>
|
|
/* create and initialize the DHCP message header */
|
|
p_out = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER, &options_out_len);
|
|
800c890: f107 0308 add.w r3, r7, #8
|
|
800c894: 2201 movs r2, #1
|
|
800c896: 69b9 ldr r1, [r7, #24]
|
|
800c898: 6878 ldr r0, [r7, #4]
|
|
800c89a: f001 f879 bl 800d990 <dhcp_create_msg>
|
|
800c89e: 6138 str r0, [r7, #16]
|
|
if (p_out != NULL) {
|
|
800c8a0: 693b ldr r3, [r7, #16]
|
|
800c8a2: 2b00 cmp r3, #0
|
|
800c8a4: d04b beq.n 800c93e <dhcp_discover+0xce>
|
|
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
|
|
800c8a6: 693b ldr r3, [r7, #16]
|
|
800c8a8: 685b ldr r3, [r3, #4]
|
|
800c8aa: 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);
|
|
800c8ac: 8938 ldrh r0, [r7, #8]
|
|
800c8ae: 68fb ldr r3, [r7, #12]
|
|
800c8b0: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800c8b4: 2302 movs r3, #2
|
|
800c8b6: 2239 movs r2, #57 ; 0x39
|
|
800c8b8: f000 fbf8 bl 800d0ac <dhcp_option>
|
|
800c8bc: 4603 mov r3, r0
|
|
800c8be: 813b strh r3, [r7, #8]
|
|
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
|
|
800c8c0: 8938 ldrh r0, [r7, #8]
|
|
800c8c2: 68fb ldr r3, [r7, #12]
|
|
800c8c4: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800c8c8: 687b ldr r3, [r7, #4]
|
|
800c8ca: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
800c8cc: 461a mov r2, r3
|
|
800c8ce: f000 fc47 bl 800d160 <dhcp_option_short>
|
|
800c8d2: 4603 mov r3, r0
|
|
800c8d4: 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));
|
|
800c8d6: 8938 ldrh r0, [r7, #8]
|
|
800c8d8: 68fb ldr r3, [r7, #12]
|
|
800c8da: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800c8de: 2303 movs r3, #3
|
|
800c8e0: 2237 movs r2, #55 ; 0x37
|
|
800c8e2: f000 fbe3 bl 800d0ac <dhcp_option>
|
|
800c8e6: 4603 mov r3, r0
|
|
800c8e8: 813b strh r3, [r7, #8]
|
|
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
|
|
800c8ea: 2300 movs r3, #0
|
|
800c8ec: 77fb strb r3, [r7, #31]
|
|
800c8ee: e00e b.n 800c90e <dhcp_discover+0x9e>
|
|
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
|
|
800c8f0: 8938 ldrh r0, [r7, #8]
|
|
800c8f2: 68fb ldr r3, [r7, #12]
|
|
800c8f4: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800c8f8: 7ffb ldrb r3, [r7, #31]
|
|
800c8fa: 4a29 ldr r2, [pc, #164] ; (800c9a0 <dhcp_discover+0x130>)
|
|
800c8fc: 5cd3 ldrb r3, [r2, r3]
|
|
800c8fe: 461a mov r2, r3
|
|
800c900: f000 fc08 bl 800d114 <dhcp_option_byte>
|
|
800c904: 4603 mov r3, r0
|
|
800c906: 813b strh r3, [r7, #8]
|
|
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
|
|
800c908: 7ffb ldrb r3, [r7, #31]
|
|
800c90a: 3301 adds r3, #1
|
|
800c90c: 77fb strb r3, [r7, #31]
|
|
800c90e: 7ffb ldrb r3, [r7, #31]
|
|
800c910: 2b02 cmp r3, #2
|
|
800c912: d9ed bls.n 800c8f0 <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);
|
|
800c914: 8938 ldrh r0, [r7, #8]
|
|
800c916: 68fb ldr r3, [r7, #12]
|
|
800c918: 33f0 adds r3, #240 ; 0xf0
|
|
800c91a: 693a ldr r2, [r7, #16]
|
|
800c91c: 4619 mov r1, r3
|
|
800c91e: f001 f90d bl 800db3c <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);
|
|
800c922: 4b20 ldr r3, [pc, #128] ; (800c9a4 <dhcp_discover+0x134>)
|
|
800c924: 6818 ldr r0, [r3, #0]
|
|
800c926: 4b20 ldr r3, [pc, #128] ; (800c9a8 <dhcp_discover+0x138>)
|
|
800c928: 9301 str r3, [sp, #4]
|
|
800c92a: 687b ldr r3, [r7, #4]
|
|
800c92c: 9300 str r3, [sp, #0]
|
|
800c92e: 2343 movs r3, #67 ; 0x43
|
|
800c930: 4a1e ldr r2, [pc, #120] ; (800c9ac <dhcp_discover+0x13c>)
|
|
800c932: 6939 ldr r1, [r7, #16]
|
|
800c934: f7ff f83e bl 800b9b4 <udp_sendto_if_src>
|
|
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n"));
|
|
pbuf_free(p_out);
|
|
800c938: 6938 ldr r0, [r7, #16]
|
|
800c93a: f7f9 f865 bl 8005a08 <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) {
|
|
800c93e: 69bb ldr r3, [r7, #24]
|
|
800c940: 799b ldrb r3, [r3, #6]
|
|
800c942: 2bff cmp r3, #255 ; 0xff
|
|
800c944: d005 beq.n 800c952 <dhcp_discover+0xe2>
|
|
dhcp->tries++;
|
|
800c946: 69bb ldr r3, [r7, #24]
|
|
800c948: 799b ldrb r3, [r3, #6]
|
|
800c94a: 3301 adds r3, #1
|
|
800c94c: b2da uxtb r2, r3
|
|
800c94e: 69bb ldr r3, [r7, #24]
|
|
800c950: 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);
|
|
800c952: 69bb ldr r3, [r7, #24]
|
|
800c954: 799b ldrb r3, [r3, #6]
|
|
800c956: 2b05 cmp r3, #5
|
|
800c958: d80d bhi.n 800c976 <dhcp_discover+0x106>
|
|
800c95a: 69bb ldr r3, [r7, #24]
|
|
800c95c: 799b ldrb r3, [r3, #6]
|
|
800c95e: 461a mov r2, r3
|
|
800c960: 2301 movs r3, #1
|
|
800c962: 4093 lsls r3, r2
|
|
800c964: b29b uxth r3, r3
|
|
800c966: 461a mov r2, r3
|
|
800c968: 0152 lsls r2, r2, #5
|
|
800c96a: 1ad2 subs r2, r2, r3
|
|
800c96c: 0092 lsls r2, r2, #2
|
|
800c96e: 4413 add r3, r2
|
|
800c970: 00db lsls r3, r3, #3
|
|
800c972: b29b uxth r3, r3
|
|
800c974: e001 b.n 800c97a <dhcp_discover+0x10a>
|
|
800c976: f64e 2360 movw r3, #60000 ; 0xea60
|
|
800c97a: 817b strh r3, [r7, #10]
|
|
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
|
|
800c97c: 897b ldrh r3, [r7, #10]
|
|
800c97e: f203 13f3 addw r3, r3, #499 ; 0x1f3
|
|
800c982: 4a0b ldr r2, [pc, #44] ; (800c9b0 <dhcp_discover+0x140>)
|
|
800c984: fb82 1203 smull r1, r2, r2, r3
|
|
800c988: 1152 asrs r2, r2, #5
|
|
800c98a: 17db asrs r3, r3, #31
|
|
800c98c: 1ad3 subs r3, r2, r3
|
|
800c98e: b29a uxth r2, r3
|
|
800c990: 69bb ldr r3, [r7, #24]
|
|
800c992: 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;
|
|
800c994: f997 3017 ldrsb.w r3, [r7, #23]
|
|
}
|
|
800c998: 4618 mov r0, r3
|
|
800c99a: 3720 adds r7, #32
|
|
800c99c: 46bd mov sp, r7
|
|
800c99e: bd80 pop {r7, pc}
|
|
800c9a0: 2000002c .word 0x2000002c
|
|
800c9a4: 20008c88 .word 0x20008c88
|
|
800c9a8: 08017f3c .word 0x08017f3c
|
|
800c9ac: 08017f40 .word 0x08017f40
|
|
800c9b0: 10624dd3 .word 0x10624dd3
|
|
|
|
0800c9b4 <dhcp_bind>:
|
|
*
|
|
* @param netif network interface to bind to the offered address
|
|
*/
|
|
static void
|
|
dhcp_bind(struct netif *netif)
|
|
{
|
|
800c9b4: b580 push {r7, lr}
|
|
800c9b6: b088 sub sp, #32
|
|
800c9b8: af00 add r7, sp, #0
|
|
800c9ba: 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;);
|
|
800c9bc: 687b ldr r3, [r7, #4]
|
|
800c9be: 2b00 cmp r3, #0
|
|
800c9c0: d107 bne.n 800c9d2 <dhcp_bind+0x1e>
|
|
800c9c2: 4b64 ldr r3, [pc, #400] ; (800cb54 <dhcp_bind+0x1a0>)
|
|
800c9c4: f240 4215 movw r2, #1045 ; 0x415
|
|
800c9c8: 4963 ldr r1, [pc, #396] ; (800cb58 <dhcp_bind+0x1a4>)
|
|
800c9ca: 4864 ldr r0, [pc, #400] ; (800cb5c <dhcp_bind+0x1a8>)
|
|
800c9cc: f003 fd94 bl 80104f8 <printf>
|
|
800c9d0: e0bc b.n 800cb4c <dhcp_bind+0x198>
|
|
dhcp = netif_dhcp_data(netif);
|
|
800c9d2: 687b ldr r3, [r7, #4]
|
|
800c9d4: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800c9d6: 61bb str r3, [r7, #24]
|
|
LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;);
|
|
800c9d8: 69bb ldr r3, [r7, #24]
|
|
800c9da: 2b00 cmp r3, #0
|
|
800c9dc: d107 bne.n 800c9ee <dhcp_bind+0x3a>
|
|
800c9de: 4b5d ldr r3, [pc, #372] ; (800cb54 <dhcp_bind+0x1a0>)
|
|
800c9e0: f240 4217 movw r2, #1047 ; 0x417
|
|
800c9e4: 495e ldr r1, [pc, #376] ; (800cb60 <dhcp_bind+0x1ac>)
|
|
800c9e6: 485d ldr r0, [pc, #372] ; (800cb5c <dhcp_bind+0x1a8>)
|
|
800c9e8: f003 fd86 bl 80104f8 <printf>
|
|
800c9ec: e0ae b.n 800cb4c <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;
|
|
800c9ee: 69bb ldr r3, [r7, #24]
|
|
800c9f0: 2200 movs r2, #0
|
|
800c9f2: 825a strh r2, [r3, #18]
|
|
|
|
if (dhcp->offered_t0_lease != 0xffffffffUL) {
|
|
800c9f4: 69bb ldr r3, [r7, #24]
|
|
800c9f6: 6a9b ldr r3, [r3, #40] ; 0x28
|
|
800c9f8: f1b3 3fff cmp.w r3, #4294967295
|
|
800c9fc: d019 beq.n 800ca32 <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;
|
|
800c9fe: 69bb ldr r3, [r7, #24]
|
|
800ca00: 6a9b ldr r3, [r3, #40] ; 0x28
|
|
800ca02: 331e adds r3, #30
|
|
800ca04: 4a57 ldr r2, [pc, #348] ; (800cb64 <dhcp_bind+0x1b0>)
|
|
800ca06: fba2 2303 umull r2, r3, r2, r3
|
|
800ca0a: 095b lsrs r3, r3, #5
|
|
800ca0c: 61fb str r3, [r7, #28]
|
|
if (timeout > 0xffff) {
|
|
800ca0e: 69fb ldr r3, [r7, #28]
|
|
800ca10: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
|
|
800ca14: d302 bcc.n 800ca1c <dhcp_bind+0x68>
|
|
timeout = 0xffff;
|
|
800ca16: f64f 73ff movw r3, #65535 ; 0xffff
|
|
800ca1a: 61fb str r3, [r7, #28]
|
|
}
|
|
dhcp->t0_timeout = (u16_t)timeout;
|
|
800ca1c: 69fb ldr r3, [r7, #28]
|
|
800ca1e: b29a uxth r2, r3
|
|
800ca20: 69bb ldr r3, [r7, #24]
|
|
800ca22: 829a strh r2, [r3, #20]
|
|
if (dhcp->t0_timeout == 0) {
|
|
800ca24: 69bb ldr r3, [r7, #24]
|
|
800ca26: 8a9b ldrh r3, [r3, #20]
|
|
800ca28: 2b00 cmp r3, #0
|
|
800ca2a: d102 bne.n 800ca32 <dhcp_bind+0x7e>
|
|
dhcp->t0_timeout = 1;
|
|
800ca2c: 69bb ldr r3, [r7, #24]
|
|
800ca2e: 2201 movs r2, #1
|
|
800ca30: 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) {
|
|
800ca32: 69bb ldr r3, [r7, #24]
|
|
800ca34: 6adb ldr r3, [r3, #44] ; 0x2c
|
|
800ca36: f1b3 3fff cmp.w r3, #4294967295
|
|
800ca3a: d01d beq.n 800ca78 <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;
|
|
800ca3c: 69bb ldr r3, [r7, #24]
|
|
800ca3e: 6adb ldr r3, [r3, #44] ; 0x2c
|
|
800ca40: 331e adds r3, #30
|
|
800ca42: 4a48 ldr r2, [pc, #288] ; (800cb64 <dhcp_bind+0x1b0>)
|
|
800ca44: fba2 2303 umull r2, r3, r2, r3
|
|
800ca48: 095b lsrs r3, r3, #5
|
|
800ca4a: 61fb str r3, [r7, #28]
|
|
if (timeout > 0xffff) {
|
|
800ca4c: 69fb ldr r3, [r7, #28]
|
|
800ca4e: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
|
|
800ca52: d302 bcc.n 800ca5a <dhcp_bind+0xa6>
|
|
timeout = 0xffff;
|
|
800ca54: f64f 73ff movw r3, #65535 ; 0xffff
|
|
800ca58: 61fb str r3, [r7, #28]
|
|
}
|
|
dhcp->t1_timeout = (u16_t)timeout;
|
|
800ca5a: 69fb ldr r3, [r7, #28]
|
|
800ca5c: b29a uxth r2, r3
|
|
800ca5e: 69bb ldr r3, [r7, #24]
|
|
800ca60: 815a strh r2, [r3, #10]
|
|
if (dhcp->t1_timeout == 0) {
|
|
800ca62: 69bb ldr r3, [r7, #24]
|
|
800ca64: 895b ldrh r3, [r3, #10]
|
|
800ca66: 2b00 cmp r3, #0
|
|
800ca68: d102 bne.n 800ca70 <dhcp_bind+0xbc>
|
|
dhcp->t1_timeout = 1;
|
|
800ca6a: 69bb ldr r3, [r7, #24]
|
|
800ca6c: 2201 movs r2, #1
|
|
800ca6e: 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;
|
|
800ca70: 69bb ldr r3, [r7, #24]
|
|
800ca72: 895a ldrh r2, [r3, #10]
|
|
800ca74: 69bb ldr r3, [r7, #24]
|
|
800ca76: 81da strh r2, [r3, #14]
|
|
}
|
|
/* set renewal period timer */
|
|
if (dhcp->offered_t2_rebind != 0xffffffffUL) {
|
|
800ca78: 69bb ldr r3, [r7, #24]
|
|
800ca7a: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
800ca7c: f1b3 3fff cmp.w r3, #4294967295
|
|
800ca80: d01d beq.n 800cabe <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;
|
|
800ca82: 69bb ldr r3, [r7, #24]
|
|
800ca84: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
800ca86: 331e adds r3, #30
|
|
800ca88: 4a36 ldr r2, [pc, #216] ; (800cb64 <dhcp_bind+0x1b0>)
|
|
800ca8a: fba2 2303 umull r2, r3, r2, r3
|
|
800ca8e: 095b lsrs r3, r3, #5
|
|
800ca90: 61fb str r3, [r7, #28]
|
|
if (timeout > 0xffff) {
|
|
800ca92: 69fb ldr r3, [r7, #28]
|
|
800ca94: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
|
|
800ca98: d302 bcc.n 800caa0 <dhcp_bind+0xec>
|
|
timeout = 0xffff;
|
|
800ca9a: f64f 73ff movw r3, #65535 ; 0xffff
|
|
800ca9e: 61fb str r3, [r7, #28]
|
|
}
|
|
dhcp->t2_timeout = (u16_t)timeout;
|
|
800caa0: 69fb ldr r3, [r7, #28]
|
|
800caa2: b29a uxth r2, r3
|
|
800caa4: 69bb ldr r3, [r7, #24]
|
|
800caa6: 819a strh r2, [r3, #12]
|
|
if (dhcp->t2_timeout == 0) {
|
|
800caa8: 69bb ldr r3, [r7, #24]
|
|
800caaa: 899b ldrh r3, [r3, #12]
|
|
800caac: 2b00 cmp r3, #0
|
|
800caae: d102 bne.n 800cab6 <dhcp_bind+0x102>
|
|
dhcp->t2_timeout = 1;
|
|
800cab0: 69bb ldr r3, [r7, #24]
|
|
800cab2: 2201 movs r2, #1
|
|
800cab4: 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;
|
|
800cab6: 69bb ldr r3, [r7, #24]
|
|
800cab8: 899a ldrh r2, [r3, #12]
|
|
800caba: 69bb ldr r3, [r7, #24]
|
|
800cabc: 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)) {
|
|
800cabe: 69bb ldr r3, [r7, #24]
|
|
800cac0: 895a ldrh r2, [r3, #10]
|
|
800cac2: 69bb ldr r3, [r7, #24]
|
|
800cac4: 899b ldrh r3, [r3, #12]
|
|
800cac6: 429a cmp r2, r3
|
|
800cac8: d306 bcc.n 800cad8 <dhcp_bind+0x124>
|
|
800caca: 69bb ldr r3, [r7, #24]
|
|
800cacc: 899b ldrh r3, [r3, #12]
|
|
800cace: 2b00 cmp r3, #0
|
|
800cad0: d002 beq.n 800cad8 <dhcp_bind+0x124>
|
|
dhcp->t1_timeout = 0;
|
|
800cad2: 69bb ldr r3, [r7, #24]
|
|
800cad4: 2200 movs r2, #0
|
|
800cad6: 815a strh r2, [r3, #10]
|
|
}
|
|
|
|
if (dhcp->subnet_mask_given) {
|
|
800cad8: 69bb ldr r3, [r7, #24]
|
|
800cada: 79db ldrb r3, [r3, #7]
|
|
800cadc: 2b00 cmp r3, #0
|
|
800cade: d003 beq.n 800cae8 <dhcp_bind+0x134>
|
|
/* copy offered network mask */
|
|
ip4_addr_copy(sn_mask, dhcp->offered_sn_mask);
|
|
800cae0: 69bb ldr r3, [r7, #24]
|
|
800cae2: 6a1b ldr r3, [r3, #32]
|
|
800cae4: 613b str r3, [r7, #16]
|
|
800cae6: e014 b.n 800cb12 <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);
|
|
800cae8: 69bb ldr r3, [r7, #24]
|
|
800caea: 331c adds r3, #28
|
|
800caec: 781b ldrb r3, [r3, #0]
|
|
800caee: 75fb strb r3, [r7, #23]
|
|
if (first_octet <= 127) {
|
|
800caf0: f997 3017 ldrsb.w r3, [r7, #23]
|
|
800caf4: 2b00 cmp r3, #0
|
|
800caf6: db02 blt.n 800cafe <dhcp_bind+0x14a>
|
|
ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL));
|
|
800caf8: 23ff movs r3, #255 ; 0xff
|
|
800cafa: 613b str r3, [r7, #16]
|
|
800cafc: e009 b.n 800cb12 <dhcp_bind+0x15e>
|
|
} else if (first_octet >= 192) {
|
|
800cafe: 7dfb ldrb r3, [r7, #23]
|
|
800cb00: 2bbf cmp r3, #191 ; 0xbf
|
|
800cb02: d903 bls.n 800cb0c <dhcp_bind+0x158>
|
|
ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL));
|
|
800cb04: f06f 437f mvn.w r3, #4278190080 ; 0xff000000
|
|
800cb08: 613b str r3, [r7, #16]
|
|
800cb0a: e002 b.n 800cb12 <dhcp_bind+0x15e>
|
|
} else {
|
|
ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL));
|
|
800cb0c: f64f 73ff movw r3, #65535 ; 0xffff
|
|
800cb10: 613b str r3, [r7, #16]
|
|
}
|
|
}
|
|
|
|
ip4_addr_copy(gw_addr, dhcp->offered_gw_addr);
|
|
800cb12: 69bb ldr r3, [r7, #24]
|
|
800cb14: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800cb16: 60fb str r3, [r7, #12]
|
|
/* gateway address not given? */
|
|
if (ip4_addr_isany_val(gw_addr)) {
|
|
800cb18: 68fb ldr r3, [r7, #12]
|
|
800cb1a: 2b00 cmp r3, #0
|
|
800cb1c: d108 bne.n 800cb30 <dhcp_bind+0x17c>
|
|
/* copy network address */
|
|
ip4_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask);
|
|
800cb1e: 69bb ldr r3, [r7, #24]
|
|
800cb20: 69da ldr r2, [r3, #28]
|
|
800cb22: 693b ldr r3, [r7, #16]
|
|
800cb24: 4013 ands r3, r2
|
|
800cb26: 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));
|
|
800cb28: 68fb ldr r3, [r7, #12]
|
|
800cb2a: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000
|
|
800cb2e: 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);
|
|
800cb30: 210a movs r1, #10
|
|
800cb32: 69b8 ldr r0, [r7, #24]
|
|
800cb34: f000 faa0 bl 800d078 <dhcp_set_state>
|
|
|
|
netif_set_addr(netif, &dhcp->offered_ip_addr, &sn_mask, &gw_addr);
|
|
800cb38: 69bb ldr r3, [r7, #24]
|
|
800cb3a: f103 011c add.w r1, r3, #28
|
|
800cb3e: f107 030c add.w r3, r7, #12
|
|
800cb42: f107 0210 add.w r2, r7, #16
|
|
800cb46: 6878 ldr r0, [r7, #4]
|
|
800cb48: f7f8 fa7e bl 8005048 <netif_set_addr>
|
|
/* interface is used by routing now that an address is set */
|
|
}
|
|
800cb4c: 3720 adds r7, #32
|
|
800cb4e: 46bd mov sp, r7
|
|
800cb50: bd80 pop {r7, pc}
|
|
800cb52: bf00 nop
|
|
800cb54: 0801736c .word 0x0801736c
|
|
800cb58: 080174cc .word 0x080174cc
|
|
800cb5c: 080173cc .word 0x080173cc
|
|
800cb60: 080174e8 .word 0x080174e8
|
|
800cb64: 88888889 .word 0x88888889
|
|
|
|
0800cb68 <dhcp_renew>:
|
|
*
|
|
* @param netif network interface which must renew its lease
|
|
*/
|
|
err_t
|
|
dhcp_renew(struct netif *netif)
|
|
{
|
|
800cb68: b580 push {r7, lr}
|
|
800cb6a: b08a sub sp, #40 ; 0x28
|
|
800cb6c: af02 add r7, sp, #8
|
|
800cb6e: 6078 str r0, [r7, #4]
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800cb70: 687b ldr r3, [r7, #4]
|
|
800cb72: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800cb74: 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);
|
|
800cb76: 2105 movs r1, #5
|
|
800cb78: 69b8 ldr r0, [r7, #24]
|
|
800cb7a: f000 fa7d bl 800d078 <dhcp_set_state>
|
|
|
|
/* create and initialize the DHCP message header */
|
|
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
|
|
800cb7e: f107 030c add.w r3, r7, #12
|
|
800cb82: 2203 movs r2, #3
|
|
800cb84: 69b9 ldr r1, [r7, #24]
|
|
800cb86: 6878 ldr r0, [r7, #4]
|
|
800cb88: f000 ff02 bl 800d990 <dhcp_create_msg>
|
|
800cb8c: 6178 str r0, [r7, #20]
|
|
if (p_out != NULL) {
|
|
800cb8e: 697b ldr r3, [r7, #20]
|
|
800cb90: 2b00 cmp r3, #0
|
|
800cb92: d04e beq.n 800cc32 <dhcp_renew+0xca>
|
|
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
|
|
800cb94: 697b ldr r3, [r7, #20]
|
|
800cb96: 685b ldr r3, [r3, #4]
|
|
800cb98: 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);
|
|
800cb9a: 89b8 ldrh r0, [r7, #12]
|
|
800cb9c: 693b ldr r3, [r7, #16]
|
|
800cb9e: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800cba2: 2302 movs r3, #2
|
|
800cba4: 2239 movs r2, #57 ; 0x39
|
|
800cba6: f000 fa81 bl 800d0ac <dhcp_option>
|
|
800cbaa: 4603 mov r3, r0
|
|
800cbac: 81bb strh r3, [r7, #12]
|
|
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
|
|
800cbae: 89b8 ldrh r0, [r7, #12]
|
|
800cbb0: 693b ldr r3, [r7, #16]
|
|
800cbb2: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800cbb6: 687b ldr r3, [r7, #4]
|
|
800cbb8: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
800cbba: 461a mov r2, r3
|
|
800cbbc: f000 fad0 bl 800d160 <dhcp_option_short>
|
|
800cbc0: 4603 mov r3, r0
|
|
800cbc2: 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));
|
|
800cbc4: 89b8 ldrh r0, [r7, #12]
|
|
800cbc6: 693b ldr r3, [r7, #16]
|
|
800cbc8: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800cbcc: 2303 movs r3, #3
|
|
800cbce: 2237 movs r2, #55 ; 0x37
|
|
800cbd0: f000 fa6c bl 800d0ac <dhcp_option>
|
|
800cbd4: 4603 mov r3, r0
|
|
800cbd6: 81bb strh r3, [r7, #12]
|
|
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
|
|
800cbd8: 2300 movs r3, #0
|
|
800cbda: 77bb strb r3, [r7, #30]
|
|
800cbdc: e00e b.n 800cbfc <dhcp_renew+0x94>
|
|
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
|
|
800cbde: 89b8 ldrh r0, [r7, #12]
|
|
800cbe0: 693b ldr r3, [r7, #16]
|
|
800cbe2: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800cbe6: 7fbb ldrb r3, [r7, #30]
|
|
800cbe8: 4a2a ldr r2, [pc, #168] ; (800cc94 <dhcp_renew+0x12c>)
|
|
800cbea: 5cd3 ldrb r3, [r2, r3]
|
|
800cbec: 461a mov r2, r3
|
|
800cbee: f000 fa91 bl 800d114 <dhcp_option_byte>
|
|
800cbf2: 4603 mov r3, r0
|
|
800cbf4: 81bb strh r3, [r7, #12]
|
|
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
|
|
800cbf6: 7fbb ldrb r3, [r7, #30]
|
|
800cbf8: 3301 adds r3, #1
|
|
800cbfa: 77bb strb r3, [r7, #30]
|
|
800cbfc: 7fbb ldrb r3, [r7, #30]
|
|
800cbfe: 2b02 cmp r3, #2
|
|
800cc00: d9ed bls.n 800cbde <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);
|
|
800cc02: 89b8 ldrh r0, [r7, #12]
|
|
800cc04: 693b ldr r3, [r7, #16]
|
|
800cc06: 33f0 adds r3, #240 ; 0xf0
|
|
800cc08: 697a ldr r2, [r7, #20]
|
|
800cc0a: 4619 mov r1, r3
|
|
800cc0c: f000 ff96 bl 800db3c <dhcp_option_trailer>
|
|
|
|
result = udp_sendto_if(dhcp_pcb, p_out, &dhcp->server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif);
|
|
800cc10: 4b21 ldr r3, [pc, #132] ; (800cc98 <dhcp_renew+0x130>)
|
|
800cc12: 6818 ldr r0, [r3, #0]
|
|
800cc14: 69bb ldr r3, [r7, #24]
|
|
800cc16: f103 0218 add.w r2, r3, #24
|
|
800cc1a: 687b ldr r3, [r7, #4]
|
|
800cc1c: 9300 str r3, [sp, #0]
|
|
800cc1e: 2343 movs r3, #67 ; 0x43
|
|
800cc20: 6979 ldr r1, [r7, #20]
|
|
800cc22: f7fe fe53 bl 800b8cc <udp_sendto_if>
|
|
800cc26: 4603 mov r3, r0
|
|
800cc28: 77fb strb r3, [r7, #31]
|
|
pbuf_free(p_out);
|
|
800cc2a: 6978 ldr r0, [r7, #20]
|
|
800cc2c: f7f8 feec bl 8005a08 <pbuf_free>
|
|
800cc30: e001 b.n 800cc36 <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;
|
|
800cc32: 23ff movs r3, #255 ; 0xff
|
|
800cc34: 77fb strb r3, [r7, #31]
|
|
}
|
|
if (dhcp->tries < 255) {
|
|
800cc36: 69bb ldr r3, [r7, #24]
|
|
800cc38: 799b ldrb r3, [r3, #6]
|
|
800cc3a: 2bff cmp r3, #255 ; 0xff
|
|
800cc3c: d005 beq.n 800cc4a <dhcp_renew+0xe2>
|
|
dhcp->tries++;
|
|
800cc3e: 69bb ldr r3, [r7, #24]
|
|
800cc40: 799b ldrb r3, [r3, #6]
|
|
800cc42: 3301 adds r3, #1
|
|
800cc44: b2da uxtb r2, r3
|
|
800cc46: 69bb ldr r3, [r7, #24]
|
|
800cc48: 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);
|
|
800cc4a: 69bb ldr r3, [r7, #24]
|
|
800cc4c: 799b ldrb r3, [r3, #6]
|
|
800cc4e: 2b09 cmp r3, #9
|
|
800cc50: d80a bhi.n 800cc68 <dhcp_renew+0x100>
|
|
800cc52: 69bb ldr r3, [r7, #24]
|
|
800cc54: 799b ldrb r3, [r3, #6]
|
|
800cc56: b29b uxth r3, r3
|
|
800cc58: 461a mov r2, r3
|
|
800cc5a: 0152 lsls r2, r2, #5
|
|
800cc5c: 1ad2 subs r2, r2, r3
|
|
800cc5e: 0092 lsls r2, r2, #2
|
|
800cc60: 4413 add r3, r2
|
|
800cc62: 011b lsls r3, r3, #4
|
|
800cc64: b29b uxth r3, r3
|
|
800cc66: e001 b.n 800cc6c <dhcp_renew+0x104>
|
|
800cc68: f644 6320 movw r3, #20000 ; 0x4e20
|
|
800cc6c: 81fb strh r3, [r7, #14]
|
|
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
|
|
800cc6e: 89fb ldrh r3, [r7, #14]
|
|
800cc70: f203 13f3 addw r3, r3, #499 ; 0x1f3
|
|
800cc74: 4a09 ldr r2, [pc, #36] ; (800cc9c <dhcp_renew+0x134>)
|
|
800cc76: fb82 1203 smull r1, r2, r2, r3
|
|
800cc7a: 1152 asrs r2, r2, #5
|
|
800cc7c: 17db asrs r3, r3, #31
|
|
800cc7e: 1ad3 subs r3, r2, r3
|
|
800cc80: b29a uxth r2, r3
|
|
800cc82: 69bb ldr r3, [r7, #24]
|
|
800cc84: 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;
|
|
800cc86: f997 301f ldrsb.w r3, [r7, #31]
|
|
}
|
|
800cc8a: 4618 mov r0, r3
|
|
800cc8c: 3720 adds r7, #32
|
|
800cc8e: 46bd mov sp, r7
|
|
800cc90: bd80 pop {r7, pc}
|
|
800cc92: bf00 nop
|
|
800cc94: 2000002c .word 0x2000002c
|
|
800cc98: 20008c88 .word 0x20008c88
|
|
800cc9c: 10624dd3 .word 0x10624dd3
|
|
|
|
0800cca0 <dhcp_rebind>:
|
|
*
|
|
* @param netif network interface which must rebind with a DHCP server
|
|
*/
|
|
static err_t
|
|
dhcp_rebind(struct netif *netif)
|
|
{
|
|
800cca0: b580 push {r7, lr}
|
|
800cca2: b08a sub sp, #40 ; 0x28
|
|
800cca4: af02 add r7, sp, #8
|
|
800cca6: 6078 str r0, [r7, #4]
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800cca8: 687b ldr r3, [r7, #4]
|
|
800ccaa: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800ccac: 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);
|
|
800ccae: 2104 movs r1, #4
|
|
800ccb0: 69b8 ldr r0, [r7, #24]
|
|
800ccb2: f000 f9e1 bl 800d078 <dhcp_set_state>
|
|
|
|
/* create and initialize the DHCP message header */
|
|
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
|
|
800ccb6: f107 030c add.w r3, r7, #12
|
|
800ccba: 2203 movs r2, #3
|
|
800ccbc: 69b9 ldr r1, [r7, #24]
|
|
800ccbe: 6878 ldr r0, [r7, #4]
|
|
800ccc0: f000 fe66 bl 800d990 <dhcp_create_msg>
|
|
800ccc4: 6178 str r0, [r7, #20]
|
|
if (p_out != NULL) {
|
|
800ccc6: 697b ldr r3, [r7, #20]
|
|
800ccc8: 2b00 cmp r3, #0
|
|
800ccca: d04c beq.n 800cd66 <dhcp_rebind+0xc6>
|
|
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
|
|
800cccc: 697b ldr r3, [r7, #20]
|
|
800ccce: 685b ldr r3, [r3, #4]
|
|
800ccd0: 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);
|
|
800ccd2: 89b8 ldrh r0, [r7, #12]
|
|
800ccd4: 693b ldr r3, [r7, #16]
|
|
800ccd6: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800ccda: 2302 movs r3, #2
|
|
800ccdc: 2239 movs r2, #57 ; 0x39
|
|
800ccde: f000 f9e5 bl 800d0ac <dhcp_option>
|
|
800cce2: 4603 mov r3, r0
|
|
800cce4: 81bb strh r3, [r7, #12]
|
|
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
|
|
800cce6: 89b8 ldrh r0, [r7, #12]
|
|
800cce8: 693b ldr r3, [r7, #16]
|
|
800ccea: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800ccee: 687b ldr r3, [r7, #4]
|
|
800ccf0: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
800ccf2: 461a mov r2, r3
|
|
800ccf4: f000 fa34 bl 800d160 <dhcp_option_short>
|
|
800ccf8: 4603 mov r3, r0
|
|
800ccfa: 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));
|
|
800ccfc: 89b8 ldrh r0, [r7, #12]
|
|
800ccfe: 693b ldr r3, [r7, #16]
|
|
800cd00: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800cd04: 2303 movs r3, #3
|
|
800cd06: 2237 movs r2, #55 ; 0x37
|
|
800cd08: f000 f9d0 bl 800d0ac <dhcp_option>
|
|
800cd0c: 4603 mov r3, r0
|
|
800cd0e: 81bb strh r3, [r7, #12]
|
|
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
|
|
800cd10: 2300 movs r3, #0
|
|
800cd12: 77bb strb r3, [r7, #30]
|
|
800cd14: e00e b.n 800cd34 <dhcp_rebind+0x94>
|
|
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
|
|
800cd16: 89b8 ldrh r0, [r7, #12]
|
|
800cd18: 693b ldr r3, [r7, #16]
|
|
800cd1a: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800cd1e: 7fbb ldrb r3, [r7, #30]
|
|
800cd20: 4a29 ldr r2, [pc, #164] ; (800cdc8 <dhcp_rebind+0x128>)
|
|
800cd22: 5cd3 ldrb r3, [r2, r3]
|
|
800cd24: 461a mov r2, r3
|
|
800cd26: f000 f9f5 bl 800d114 <dhcp_option_byte>
|
|
800cd2a: 4603 mov r3, r0
|
|
800cd2c: 81bb strh r3, [r7, #12]
|
|
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
|
|
800cd2e: 7fbb ldrb r3, [r7, #30]
|
|
800cd30: 3301 adds r3, #1
|
|
800cd32: 77bb strb r3, [r7, #30]
|
|
800cd34: 7fbb ldrb r3, [r7, #30]
|
|
800cd36: 2b02 cmp r3, #2
|
|
800cd38: d9ed bls.n 800cd16 <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);
|
|
800cd3a: 89b8 ldrh r0, [r7, #12]
|
|
800cd3c: 693b ldr r3, [r7, #16]
|
|
800cd3e: 33f0 adds r3, #240 ; 0xf0
|
|
800cd40: 697a ldr r2, [r7, #20]
|
|
800cd42: 4619 mov r1, r3
|
|
800cd44: f000 fefa bl 800db3c <dhcp_option_trailer>
|
|
|
|
/* broadcast to server */
|
|
result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif);
|
|
800cd48: 4b20 ldr r3, [pc, #128] ; (800cdcc <dhcp_rebind+0x12c>)
|
|
800cd4a: 6818 ldr r0, [r3, #0]
|
|
800cd4c: 687b ldr r3, [r7, #4]
|
|
800cd4e: 9300 str r3, [sp, #0]
|
|
800cd50: 2343 movs r3, #67 ; 0x43
|
|
800cd52: 4a1f ldr r2, [pc, #124] ; (800cdd0 <dhcp_rebind+0x130>)
|
|
800cd54: 6979 ldr r1, [r7, #20]
|
|
800cd56: f7fe fdb9 bl 800b8cc <udp_sendto_if>
|
|
800cd5a: 4603 mov r3, r0
|
|
800cd5c: 77fb strb r3, [r7, #31]
|
|
pbuf_free(p_out);
|
|
800cd5e: 6978 ldr r0, [r7, #20]
|
|
800cd60: f7f8 fe52 bl 8005a08 <pbuf_free>
|
|
800cd64: e001 b.n 800cd6a <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;
|
|
800cd66: 23ff movs r3, #255 ; 0xff
|
|
800cd68: 77fb strb r3, [r7, #31]
|
|
}
|
|
if (dhcp->tries < 255) {
|
|
800cd6a: 69bb ldr r3, [r7, #24]
|
|
800cd6c: 799b ldrb r3, [r3, #6]
|
|
800cd6e: 2bff cmp r3, #255 ; 0xff
|
|
800cd70: d005 beq.n 800cd7e <dhcp_rebind+0xde>
|
|
dhcp->tries++;
|
|
800cd72: 69bb ldr r3, [r7, #24]
|
|
800cd74: 799b ldrb r3, [r3, #6]
|
|
800cd76: 3301 adds r3, #1
|
|
800cd78: b2da uxtb r2, r3
|
|
800cd7a: 69bb ldr r3, [r7, #24]
|
|
800cd7c: 719a strb r2, [r3, #6]
|
|
}
|
|
msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
|
|
800cd7e: 69bb ldr r3, [r7, #24]
|
|
800cd80: 799b ldrb r3, [r3, #6]
|
|
800cd82: 2b09 cmp r3, #9
|
|
800cd84: d80a bhi.n 800cd9c <dhcp_rebind+0xfc>
|
|
800cd86: 69bb ldr r3, [r7, #24]
|
|
800cd88: 799b ldrb r3, [r3, #6]
|
|
800cd8a: b29b uxth r3, r3
|
|
800cd8c: 461a mov r2, r3
|
|
800cd8e: 0152 lsls r2, r2, #5
|
|
800cd90: 1ad2 subs r2, r2, r3
|
|
800cd92: 0092 lsls r2, r2, #2
|
|
800cd94: 4413 add r3, r2
|
|
800cd96: 00db lsls r3, r3, #3
|
|
800cd98: b29b uxth r3, r3
|
|
800cd9a: e001 b.n 800cda0 <dhcp_rebind+0x100>
|
|
800cd9c: f242 7310 movw r3, #10000 ; 0x2710
|
|
800cda0: 81fb strh r3, [r7, #14]
|
|
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
|
|
800cda2: 89fb ldrh r3, [r7, #14]
|
|
800cda4: f203 13f3 addw r3, r3, #499 ; 0x1f3
|
|
800cda8: 4a0a ldr r2, [pc, #40] ; (800cdd4 <dhcp_rebind+0x134>)
|
|
800cdaa: fb82 1203 smull r1, r2, r2, r3
|
|
800cdae: 1152 asrs r2, r2, #5
|
|
800cdb0: 17db asrs r3, r3, #31
|
|
800cdb2: 1ad3 subs r3, r2, r3
|
|
800cdb4: b29a uxth r2, r3
|
|
800cdb6: 69bb ldr r3, [r7, #24]
|
|
800cdb8: 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;
|
|
800cdba: f997 301f ldrsb.w r3, [r7, #31]
|
|
}
|
|
800cdbe: 4618 mov r0, r3
|
|
800cdc0: 3720 adds r7, #32
|
|
800cdc2: 46bd mov sp, r7
|
|
800cdc4: bd80 pop {r7, pc}
|
|
800cdc6: bf00 nop
|
|
800cdc8: 2000002c .word 0x2000002c
|
|
800cdcc: 20008c88 .word 0x20008c88
|
|
800cdd0: 08017f40 .word 0x08017f40
|
|
800cdd4: 10624dd3 .word 0x10624dd3
|
|
|
|
0800cdd8 <dhcp_reboot>:
|
|
*
|
|
* @param netif network interface which must reboot
|
|
*/
|
|
static err_t
|
|
dhcp_reboot(struct netif *netif)
|
|
{
|
|
800cdd8: b5b0 push {r4, r5, r7, lr}
|
|
800cdda: b08a sub sp, #40 ; 0x28
|
|
800cddc: af02 add r7, sp, #8
|
|
800cdde: 6078 str r0, [r7, #4]
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800cde0: 687b ldr r3, [r7, #4]
|
|
800cde2: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800cde4: 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);
|
|
800cde6: 2103 movs r1, #3
|
|
800cde8: 69b8 ldr r0, [r7, #24]
|
|
800cdea: f000 f945 bl 800d078 <dhcp_set_state>
|
|
|
|
/* create and initialize the DHCP message header */
|
|
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
|
|
800cdee: f107 030c add.w r3, r7, #12
|
|
800cdf2: 2203 movs r2, #3
|
|
800cdf4: 69b9 ldr r1, [r7, #24]
|
|
800cdf6: 6878 ldr r0, [r7, #4]
|
|
800cdf8: f000 fdca bl 800d990 <dhcp_create_msg>
|
|
800cdfc: 6178 str r0, [r7, #20]
|
|
if (p_out != NULL) {
|
|
800cdfe: 697b ldr r3, [r7, #20]
|
|
800ce00: 2b00 cmp r3, #0
|
|
800ce02: d066 beq.n 800ced2 <dhcp_reboot+0xfa>
|
|
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
|
|
800ce04: 697b ldr r3, [r7, #20]
|
|
800ce06: 685b ldr r3, [r3, #4]
|
|
800ce08: 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);
|
|
800ce0a: 89b8 ldrh r0, [r7, #12]
|
|
800ce0c: 693b ldr r3, [r7, #16]
|
|
800ce0e: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800ce12: 2302 movs r3, #2
|
|
800ce14: 2239 movs r2, #57 ; 0x39
|
|
800ce16: f000 f949 bl 800d0ac <dhcp_option>
|
|
800ce1a: 4603 mov r3, r0
|
|
800ce1c: 81bb strh r3, [r7, #12]
|
|
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN_MIN_REQUIRED);
|
|
800ce1e: 89b8 ldrh r0, [r7, #12]
|
|
800ce20: 693b ldr r3, [r7, #16]
|
|
800ce22: 33f0 adds r3, #240 ; 0xf0
|
|
800ce24: f44f 7210 mov.w r2, #576 ; 0x240
|
|
800ce28: 4619 mov r1, r3
|
|
800ce2a: f000 f999 bl 800d160 <dhcp_option_short>
|
|
800ce2e: 4603 mov r3, r0
|
|
800ce30: 81bb strh r3, [r7, #12]
|
|
|
|
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
|
|
800ce32: 89b8 ldrh r0, [r7, #12]
|
|
800ce34: 693b ldr r3, [r7, #16]
|
|
800ce36: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800ce3a: 2304 movs r3, #4
|
|
800ce3c: 2232 movs r2, #50 ; 0x32
|
|
800ce3e: f000 f935 bl 800d0ac <dhcp_option>
|
|
800ce42: 4603 mov r3, r0
|
|
800ce44: 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)));
|
|
800ce46: 89bc ldrh r4, [r7, #12]
|
|
800ce48: 693b ldr r3, [r7, #16]
|
|
800ce4a: f103 05f0 add.w r5, r3, #240 ; 0xf0
|
|
800ce4e: 69bb ldr r3, [r7, #24]
|
|
800ce50: 69db ldr r3, [r3, #28]
|
|
800ce52: 4618 mov r0, r3
|
|
800ce54: f7f7 fa83 bl 800435e <lwip_htonl>
|
|
800ce58: 4603 mov r3, r0
|
|
800ce5a: 461a mov r2, r3
|
|
800ce5c: 4629 mov r1, r5
|
|
800ce5e: 4620 mov r0, r4
|
|
800ce60: f000 f9b0 bl 800d1c4 <dhcp_option_long>
|
|
800ce64: 4603 mov r3, r0
|
|
800ce66: 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));
|
|
800ce68: 89b8 ldrh r0, [r7, #12]
|
|
800ce6a: 693b ldr r3, [r7, #16]
|
|
800ce6c: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800ce70: 2303 movs r3, #3
|
|
800ce72: 2237 movs r2, #55 ; 0x37
|
|
800ce74: f000 f91a bl 800d0ac <dhcp_option>
|
|
800ce78: 4603 mov r3, r0
|
|
800ce7a: 81bb strh r3, [r7, #12]
|
|
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
|
|
800ce7c: 2300 movs r3, #0
|
|
800ce7e: 77bb strb r3, [r7, #30]
|
|
800ce80: e00e b.n 800cea0 <dhcp_reboot+0xc8>
|
|
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
|
|
800ce82: 89b8 ldrh r0, [r7, #12]
|
|
800ce84: 693b ldr r3, [r7, #16]
|
|
800ce86: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800ce8a: 7fbb ldrb r3, [r7, #30]
|
|
800ce8c: 4a29 ldr r2, [pc, #164] ; (800cf34 <dhcp_reboot+0x15c>)
|
|
800ce8e: 5cd3 ldrb r3, [r2, r3]
|
|
800ce90: 461a mov r2, r3
|
|
800ce92: f000 f93f bl 800d114 <dhcp_option_byte>
|
|
800ce96: 4603 mov r3, r0
|
|
800ce98: 81bb strh r3, [r7, #12]
|
|
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
|
|
800ce9a: 7fbb ldrb r3, [r7, #30]
|
|
800ce9c: 3301 adds r3, #1
|
|
800ce9e: 77bb strb r3, [r7, #30]
|
|
800cea0: 7fbb ldrb r3, [r7, #30]
|
|
800cea2: 2b02 cmp r3, #2
|
|
800cea4: d9ed bls.n 800ce82 <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);
|
|
800cea6: 89b8 ldrh r0, [r7, #12]
|
|
800cea8: 693b ldr r3, [r7, #16]
|
|
800ceaa: 33f0 adds r3, #240 ; 0xf0
|
|
800ceac: 697a ldr r2, [r7, #20]
|
|
800ceae: 4619 mov r1, r3
|
|
800ceb0: f000 fe44 bl 800db3c <dhcp_option_trailer>
|
|
|
|
/* broadcast to server */
|
|
result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif);
|
|
800ceb4: 4b20 ldr r3, [pc, #128] ; (800cf38 <dhcp_reboot+0x160>)
|
|
800ceb6: 6818 ldr r0, [r3, #0]
|
|
800ceb8: 687b ldr r3, [r7, #4]
|
|
800ceba: 9300 str r3, [sp, #0]
|
|
800cebc: 2343 movs r3, #67 ; 0x43
|
|
800cebe: 4a1f ldr r2, [pc, #124] ; (800cf3c <dhcp_reboot+0x164>)
|
|
800cec0: 6979 ldr r1, [r7, #20]
|
|
800cec2: f7fe fd03 bl 800b8cc <udp_sendto_if>
|
|
800cec6: 4603 mov r3, r0
|
|
800cec8: 77fb strb r3, [r7, #31]
|
|
pbuf_free(p_out);
|
|
800ceca: 6978 ldr r0, [r7, #20]
|
|
800cecc: f7f8 fd9c bl 8005a08 <pbuf_free>
|
|
800ced0: e001 b.n 800ced6 <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;
|
|
800ced2: 23ff movs r3, #255 ; 0xff
|
|
800ced4: 77fb strb r3, [r7, #31]
|
|
}
|
|
if (dhcp->tries < 255) {
|
|
800ced6: 69bb ldr r3, [r7, #24]
|
|
800ced8: 799b ldrb r3, [r3, #6]
|
|
800ceda: 2bff cmp r3, #255 ; 0xff
|
|
800cedc: d005 beq.n 800ceea <dhcp_reboot+0x112>
|
|
dhcp->tries++;
|
|
800cede: 69bb ldr r3, [r7, #24]
|
|
800cee0: 799b ldrb r3, [r3, #6]
|
|
800cee2: 3301 adds r3, #1
|
|
800cee4: b2da uxtb r2, r3
|
|
800cee6: 69bb ldr r3, [r7, #24]
|
|
800cee8: 719a strb r2, [r3, #6]
|
|
}
|
|
msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
|
|
800ceea: 69bb ldr r3, [r7, #24]
|
|
800ceec: 799b ldrb r3, [r3, #6]
|
|
800ceee: 2b09 cmp r3, #9
|
|
800cef0: d80a bhi.n 800cf08 <dhcp_reboot+0x130>
|
|
800cef2: 69bb ldr r3, [r7, #24]
|
|
800cef4: 799b ldrb r3, [r3, #6]
|
|
800cef6: b29b uxth r3, r3
|
|
800cef8: 461a mov r2, r3
|
|
800cefa: 0152 lsls r2, r2, #5
|
|
800cefc: 1ad2 subs r2, r2, r3
|
|
800cefe: 0092 lsls r2, r2, #2
|
|
800cf00: 4413 add r3, r2
|
|
800cf02: 00db lsls r3, r3, #3
|
|
800cf04: b29b uxth r3, r3
|
|
800cf06: e001 b.n 800cf0c <dhcp_reboot+0x134>
|
|
800cf08: f242 7310 movw r3, #10000 ; 0x2710
|
|
800cf0c: 81fb strh r3, [r7, #14]
|
|
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
|
|
800cf0e: 89fb ldrh r3, [r7, #14]
|
|
800cf10: f203 13f3 addw r3, r3, #499 ; 0x1f3
|
|
800cf14: 4a0a ldr r2, [pc, #40] ; (800cf40 <dhcp_reboot+0x168>)
|
|
800cf16: fb82 1203 smull r1, r2, r2, r3
|
|
800cf1a: 1152 asrs r2, r2, #5
|
|
800cf1c: 17db asrs r3, r3, #31
|
|
800cf1e: 1ad3 subs r3, r2, r3
|
|
800cf20: b29a uxth r2, r3
|
|
800cf22: 69bb ldr r3, [r7, #24]
|
|
800cf24: 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;
|
|
800cf26: f997 301f ldrsb.w r3, [r7, #31]
|
|
}
|
|
800cf2a: 4618 mov r0, r3
|
|
800cf2c: 3720 adds r7, #32
|
|
800cf2e: 46bd mov sp, r7
|
|
800cf30: bdb0 pop {r4, r5, r7, pc}
|
|
800cf32: bf00 nop
|
|
800cf34: 2000002c .word 0x2000002c
|
|
800cf38: 20008c88 .word 0x20008c88
|
|
800cf3c: 08017f40 .word 0x08017f40
|
|
800cf40: 10624dd3 .word 0x10624dd3
|
|
|
|
0800cf44 <dhcp_release_and_stop>:
|
|
*
|
|
* @param netif network interface
|
|
*/
|
|
void
|
|
dhcp_release_and_stop(struct netif *netif)
|
|
{
|
|
800cf44: b5b0 push {r4, r5, r7, lr}
|
|
800cf46: b08a sub sp, #40 ; 0x28
|
|
800cf48: af02 add r7, sp, #8
|
|
800cf4a: 6078 str r0, [r7, #4]
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800cf4c: 687b ldr r3, [r7, #4]
|
|
800cf4e: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800cf50: 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) {
|
|
800cf52: 69fb ldr r3, [r7, #28]
|
|
800cf54: 2b00 cmp r3, #0
|
|
800cf56: f000 8084 beq.w 800d062 <dhcp_release_and_stop+0x11e>
|
|
return;
|
|
}
|
|
|
|
/* already off? -> nothing to do */
|
|
if (dhcp->state == DHCP_STATE_OFF) {
|
|
800cf5a: 69fb ldr r3, [r7, #28]
|
|
800cf5c: 795b ldrb r3, [r3, #5]
|
|
800cf5e: 2b00 cmp r3, #0
|
|
800cf60: f000 8081 beq.w 800d066 <dhcp_release_and_stop+0x122>
|
|
return;
|
|
}
|
|
|
|
ip_addr_copy(server_ip_addr, dhcp->server_ip_addr);
|
|
800cf64: 69fb ldr r3, [r7, #28]
|
|
800cf66: 699b ldr r3, [r3, #24]
|
|
800cf68: 613b str r3, [r7, #16]
|
|
|
|
/* clean old DHCP offer */
|
|
ip_addr_set_zero_ip4(&dhcp->server_ip_addr);
|
|
800cf6a: 69fb ldr r3, [r7, #28]
|
|
800cf6c: 2200 movs r2, #0
|
|
800cf6e: 619a str r2, [r3, #24]
|
|
ip4_addr_set_zero(&dhcp->offered_ip_addr);
|
|
800cf70: 69fb ldr r3, [r7, #28]
|
|
800cf72: 2200 movs r2, #0
|
|
800cf74: 61da str r2, [r3, #28]
|
|
ip4_addr_set_zero(&dhcp->offered_sn_mask);
|
|
800cf76: 69fb ldr r3, [r7, #28]
|
|
800cf78: 2200 movs r2, #0
|
|
800cf7a: 621a str r2, [r3, #32]
|
|
ip4_addr_set_zero(&dhcp->offered_gw_addr);
|
|
800cf7c: 69fb ldr r3, [r7, #28]
|
|
800cf7e: 2200 movs r2, #0
|
|
800cf80: 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;
|
|
800cf82: 69fb ldr r3, [r7, #28]
|
|
800cf84: 2200 movs r2, #0
|
|
800cf86: 631a str r2, [r3, #48] ; 0x30
|
|
800cf88: 69fb ldr r3, [r7, #28]
|
|
800cf8a: 6b1a ldr r2, [r3, #48] ; 0x30
|
|
800cf8c: 69fb ldr r3, [r7, #28]
|
|
800cf8e: 62da str r2, [r3, #44] ; 0x2c
|
|
800cf90: 69fb ldr r3, [r7, #28]
|
|
800cf92: 6ada ldr r2, [r3, #44] ; 0x2c
|
|
800cf94: 69fb ldr r3, [r7, #28]
|
|
800cf96: 629a str r2, [r3, #40] ; 0x28
|
|
dhcp->t1_renew_time = dhcp->t2_rebind_time = dhcp->lease_used = dhcp->t0_timeout = 0;
|
|
800cf98: 69fb ldr r3, [r7, #28]
|
|
800cf9a: 2200 movs r2, #0
|
|
800cf9c: 829a strh r2, [r3, #20]
|
|
800cf9e: 69fb ldr r3, [r7, #28]
|
|
800cfa0: 8a9a ldrh r2, [r3, #20]
|
|
800cfa2: 69fb ldr r3, [r7, #28]
|
|
800cfa4: 825a strh r2, [r3, #18]
|
|
800cfa6: 69fb ldr r3, [r7, #28]
|
|
800cfa8: 8a5a ldrh r2, [r3, #18]
|
|
800cfaa: 69fb ldr r3, [r7, #28]
|
|
800cfac: 821a strh r2, [r3, #16]
|
|
800cfae: 69fb ldr r3, [r7, #28]
|
|
800cfb0: 8a1a ldrh r2, [r3, #16]
|
|
800cfb2: 69fb ldr r3, [r7, #28]
|
|
800cfb4: 81da strh r2, [r3, #14]
|
|
|
|
/* send release message when current IP was assigned via DHCP */
|
|
if (dhcp_supplied_address(netif)) {
|
|
800cfb6: 6878 ldr r0, [r7, #4]
|
|
800cfb8: f000 fdee bl 800db98 <dhcp_supplied_address>
|
|
800cfbc: 4603 mov r3, r0
|
|
800cfbe: 2b00 cmp r3, #0
|
|
800cfc0: d03b beq.n 800d03a <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);
|
|
800cfc2: f107 030e add.w r3, r7, #14
|
|
800cfc6: 2207 movs r2, #7
|
|
800cfc8: 69f9 ldr r1, [r7, #28]
|
|
800cfca: 6878 ldr r0, [r7, #4]
|
|
800cfcc: f000 fce0 bl 800d990 <dhcp_create_msg>
|
|
800cfd0: 61b8 str r0, [r7, #24]
|
|
if (p_out != NULL) {
|
|
800cfd2: 69bb ldr r3, [r7, #24]
|
|
800cfd4: 2b00 cmp r3, #0
|
|
800cfd6: d030 beq.n 800d03a <dhcp_release_and_stop+0xf6>
|
|
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
|
|
800cfd8: 69bb ldr r3, [r7, #24]
|
|
800cfda: 685b ldr r3, [r3, #4]
|
|
800cfdc: 617b str r3, [r7, #20]
|
|
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4);
|
|
800cfde: 89f8 ldrh r0, [r7, #14]
|
|
800cfe0: 697b ldr r3, [r7, #20]
|
|
800cfe2: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800cfe6: 2304 movs r3, #4
|
|
800cfe8: 2236 movs r2, #54 ; 0x36
|
|
800cfea: f000 f85f bl 800d0ac <dhcp_option>
|
|
800cfee: 4603 mov r3, r0
|
|
800cff0: 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))));
|
|
800cff2: 89fc ldrh r4, [r7, #14]
|
|
800cff4: 697b ldr r3, [r7, #20]
|
|
800cff6: f103 05f0 add.w r5, r3, #240 ; 0xf0
|
|
800cffa: 693b ldr r3, [r7, #16]
|
|
800cffc: 4618 mov r0, r3
|
|
800cffe: f7f7 f9ae bl 800435e <lwip_htonl>
|
|
800d002: 4603 mov r3, r0
|
|
800d004: 461a mov r2, r3
|
|
800d006: 4629 mov r1, r5
|
|
800d008: 4620 mov r0, r4
|
|
800d00a: f000 f8db bl 800d1c4 <dhcp_option_long>
|
|
800d00e: 4603 mov r3, r0
|
|
800d010: 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);
|
|
800d012: 89f8 ldrh r0, [r7, #14]
|
|
800d014: 697b ldr r3, [r7, #20]
|
|
800d016: 33f0 adds r3, #240 ; 0xf0
|
|
800d018: 69ba ldr r2, [r7, #24]
|
|
800d01a: 4619 mov r1, r3
|
|
800d01c: f000 fd8e bl 800db3c <dhcp_option_trailer>
|
|
|
|
udp_sendto_if(dhcp_pcb, p_out, &server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif);
|
|
800d020: 4b13 ldr r3, [pc, #76] ; (800d070 <dhcp_release_and_stop+0x12c>)
|
|
800d022: 6818 ldr r0, [r3, #0]
|
|
800d024: f107 0210 add.w r2, r7, #16
|
|
800d028: 687b ldr r3, [r7, #4]
|
|
800d02a: 9300 str r3, [sp, #0]
|
|
800d02c: 2343 movs r3, #67 ; 0x43
|
|
800d02e: 69b9 ldr r1, [r7, #24]
|
|
800d030: f7fe fc4c bl 800b8cc <udp_sendto_if>
|
|
pbuf_free(p_out);
|
|
800d034: 69b8 ldr r0, [r7, #24]
|
|
800d036: f7f8 fce7 bl 8005a08 <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);
|
|
800d03a: 4b0e ldr r3, [pc, #56] ; (800d074 <dhcp_release_and_stop+0x130>)
|
|
800d03c: 4a0d ldr r2, [pc, #52] ; (800d074 <dhcp_release_and_stop+0x130>)
|
|
800d03e: 490d ldr r1, [pc, #52] ; (800d074 <dhcp_release_and_stop+0x130>)
|
|
800d040: 6878 ldr r0, [r7, #4]
|
|
800d042: f7f8 f801 bl 8005048 <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);
|
|
800d046: 2100 movs r1, #0
|
|
800d048: 69f8 ldr r0, [r7, #28]
|
|
800d04a: f000 f815 bl 800d078 <dhcp_set_state>
|
|
|
|
if (dhcp->pcb_allocated != 0) {
|
|
800d04e: 69fb ldr r3, [r7, #28]
|
|
800d050: 791b ldrb r3, [r3, #4]
|
|
800d052: 2b00 cmp r3, #0
|
|
800d054: d008 beq.n 800d068 <dhcp_release_and_stop+0x124>
|
|
dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */
|
|
800d056: f7fe ff85 bl 800bf64 <dhcp_dec_pcb_refcount>
|
|
dhcp->pcb_allocated = 0;
|
|
800d05a: 69fb ldr r3, [r7, #28]
|
|
800d05c: 2200 movs r2, #0
|
|
800d05e: 711a strb r2, [r3, #4]
|
|
800d060: e002 b.n 800d068 <dhcp_release_and_stop+0x124>
|
|
return;
|
|
800d062: bf00 nop
|
|
800d064: e000 b.n 800d068 <dhcp_release_and_stop+0x124>
|
|
return;
|
|
800d066: bf00 nop
|
|
}
|
|
}
|
|
800d068: 3720 adds r7, #32
|
|
800d06a: 46bd mov sp, r7
|
|
800d06c: bdb0 pop {r4, r5, r7, pc}
|
|
800d06e: bf00 nop
|
|
800d070: 20008c88 .word 0x20008c88
|
|
800d074: 08017f3c .word 0x08017f3c
|
|
|
|
0800d078 <dhcp_set_state>:
|
|
*
|
|
* If the state changed, reset the number of tries.
|
|
*/
|
|
static void
|
|
dhcp_set_state(struct dhcp *dhcp, u8_t new_state)
|
|
{
|
|
800d078: b480 push {r7}
|
|
800d07a: b083 sub sp, #12
|
|
800d07c: af00 add r7, sp, #0
|
|
800d07e: 6078 str r0, [r7, #4]
|
|
800d080: 460b mov r3, r1
|
|
800d082: 70fb strb r3, [r7, #3]
|
|
if (new_state != dhcp->state) {
|
|
800d084: 687b ldr r3, [r7, #4]
|
|
800d086: 795b ldrb r3, [r3, #5]
|
|
800d088: 78fa ldrb r2, [r7, #3]
|
|
800d08a: 429a cmp r2, r3
|
|
800d08c: d008 beq.n 800d0a0 <dhcp_set_state+0x28>
|
|
dhcp->state = new_state;
|
|
800d08e: 687b ldr r3, [r7, #4]
|
|
800d090: 78fa ldrb r2, [r7, #3]
|
|
800d092: 715a strb r2, [r3, #5]
|
|
dhcp->tries = 0;
|
|
800d094: 687b ldr r3, [r7, #4]
|
|
800d096: 2200 movs r2, #0
|
|
800d098: 719a strb r2, [r3, #6]
|
|
dhcp->request_timeout = 0;
|
|
800d09a: 687b ldr r3, [r7, #4]
|
|
800d09c: 2200 movs r2, #0
|
|
800d09e: 811a strh r2, [r3, #8]
|
|
}
|
|
}
|
|
800d0a0: bf00 nop
|
|
800d0a2: 370c adds r7, #12
|
|
800d0a4: 46bd mov sp, r7
|
|
800d0a6: f85d 7b04 ldr.w r7, [sp], #4
|
|
800d0aa: 4770 bx lr
|
|
|
|
0800d0ac <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)
|
|
{
|
|
800d0ac: b580 push {r7, lr}
|
|
800d0ae: b082 sub sp, #8
|
|
800d0b0: af00 add r7, sp, #0
|
|
800d0b2: 6039 str r1, [r7, #0]
|
|
800d0b4: 4611 mov r1, r2
|
|
800d0b6: 461a mov r2, r3
|
|
800d0b8: 4603 mov r3, r0
|
|
800d0ba: 80fb strh r3, [r7, #6]
|
|
800d0bc: 460b mov r3, r1
|
|
800d0be: 717b strb r3, [r7, #5]
|
|
800d0c0: 4613 mov r3, r2
|
|
800d0c2: 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);
|
|
800d0c4: 88fa ldrh r2, [r7, #6]
|
|
800d0c6: 793b ldrb r3, [r7, #4]
|
|
800d0c8: 4413 add r3, r2
|
|
800d0ca: 3302 adds r3, #2
|
|
800d0cc: 2b44 cmp r3, #68 ; 0x44
|
|
800d0ce: d906 bls.n 800d0de <dhcp_option+0x32>
|
|
800d0d0: 4b0d ldr r3, [pc, #52] ; (800d108 <dhcp_option+0x5c>)
|
|
800d0d2: f240 529a movw r2, #1434 ; 0x59a
|
|
800d0d6: 490d ldr r1, [pc, #52] ; (800d10c <dhcp_option+0x60>)
|
|
800d0d8: 480d ldr r0, [pc, #52] ; (800d110 <dhcp_option+0x64>)
|
|
800d0da: f003 fa0d bl 80104f8 <printf>
|
|
options[options_out_len++] = option_type;
|
|
800d0de: 88fb ldrh r3, [r7, #6]
|
|
800d0e0: 1c5a adds r2, r3, #1
|
|
800d0e2: 80fa strh r2, [r7, #6]
|
|
800d0e4: 461a mov r2, r3
|
|
800d0e6: 683b ldr r3, [r7, #0]
|
|
800d0e8: 4413 add r3, r2
|
|
800d0ea: 797a ldrb r2, [r7, #5]
|
|
800d0ec: 701a strb r2, [r3, #0]
|
|
options[options_out_len++] = option_len;
|
|
800d0ee: 88fb ldrh r3, [r7, #6]
|
|
800d0f0: 1c5a adds r2, r3, #1
|
|
800d0f2: 80fa strh r2, [r7, #6]
|
|
800d0f4: 461a mov r2, r3
|
|
800d0f6: 683b ldr r3, [r7, #0]
|
|
800d0f8: 4413 add r3, r2
|
|
800d0fa: 793a ldrb r2, [r7, #4]
|
|
800d0fc: 701a strb r2, [r3, #0]
|
|
return options_out_len;
|
|
800d0fe: 88fb ldrh r3, [r7, #6]
|
|
}
|
|
800d100: 4618 mov r0, r3
|
|
800d102: 3708 adds r7, #8
|
|
800d104: 46bd mov sp, r7
|
|
800d106: bd80 pop {r7, pc}
|
|
800d108: 0801736c .word 0x0801736c
|
|
800d10c: 08017500 .word 0x08017500
|
|
800d110: 080173cc .word 0x080173cc
|
|
|
|
0800d114 <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)
|
|
{
|
|
800d114: b580 push {r7, lr}
|
|
800d116: b082 sub sp, #8
|
|
800d118: af00 add r7, sp, #0
|
|
800d11a: 4603 mov r3, r0
|
|
800d11c: 6039 str r1, [r7, #0]
|
|
800d11e: 80fb strh r3, [r7, #6]
|
|
800d120: 4613 mov r3, r2
|
|
800d122: 717b strb r3, [r7, #5]
|
|
LWIP_ASSERT("dhcp_option_byte: options_out_len < DHCP_OPTIONS_LEN", options_out_len < DHCP_OPTIONS_LEN);
|
|
800d124: 88fb ldrh r3, [r7, #6]
|
|
800d126: 2b43 cmp r3, #67 ; 0x43
|
|
800d128: d906 bls.n 800d138 <dhcp_option_byte+0x24>
|
|
800d12a: 4b0a ldr r3, [pc, #40] ; (800d154 <dhcp_option_byte+0x40>)
|
|
800d12c: f240 52a6 movw r2, #1446 ; 0x5a6
|
|
800d130: 4909 ldr r1, [pc, #36] ; (800d158 <dhcp_option_byte+0x44>)
|
|
800d132: 480a ldr r0, [pc, #40] ; (800d15c <dhcp_option_byte+0x48>)
|
|
800d134: f003 f9e0 bl 80104f8 <printf>
|
|
options[options_out_len++] = value;
|
|
800d138: 88fb ldrh r3, [r7, #6]
|
|
800d13a: 1c5a adds r2, r3, #1
|
|
800d13c: 80fa strh r2, [r7, #6]
|
|
800d13e: 461a mov r2, r3
|
|
800d140: 683b ldr r3, [r7, #0]
|
|
800d142: 4413 add r3, r2
|
|
800d144: 797a ldrb r2, [r7, #5]
|
|
800d146: 701a strb r2, [r3, #0]
|
|
return options_out_len;
|
|
800d148: 88fb ldrh r3, [r7, #6]
|
|
}
|
|
800d14a: 4618 mov r0, r3
|
|
800d14c: 3708 adds r7, #8
|
|
800d14e: 46bd mov sp, r7
|
|
800d150: bd80 pop {r7, pc}
|
|
800d152: bf00 nop
|
|
800d154: 0801736c .word 0x0801736c
|
|
800d158: 08017544 .word 0x08017544
|
|
800d15c: 080173cc .word 0x080173cc
|
|
|
|
0800d160 <dhcp_option_short>:
|
|
|
|
static u16_t
|
|
dhcp_option_short(u16_t options_out_len, u8_t *options, u16_t value)
|
|
{
|
|
800d160: b580 push {r7, lr}
|
|
800d162: b082 sub sp, #8
|
|
800d164: af00 add r7, sp, #0
|
|
800d166: 4603 mov r3, r0
|
|
800d168: 6039 str r1, [r7, #0]
|
|
800d16a: 80fb strh r3, [r7, #6]
|
|
800d16c: 4613 mov r3, r2
|
|
800d16e: 80bb strh r3, [r7, #4]
|
|
LWIP_ASSERT("dhcp_option_short: options_out_len + 2 <= DHCP_OPTIONS_LEN", options_out_len + 2U <= DHCP_OPTIONS_LEN);
|
|
800d170: 88fb ldrh r3, [r7, #6]
|
|
800d172: 3302 adds r3, #2
|
|
800d174: 2b44 cmp r3, #68 ; 0x44
|
|
800d176: d906 bls.n 800d186 <dhcp_option_short+0x26>
|
|
800d178: 4b0f ldr r3, [pc, #60] ; (800d1b8 <dhcp_option_short+0x58>)
|
|
800d17a: f240 52ae movw r2, #1454 ; 0x5ae
|
|
800d17e: 490f ldr r1, [pc, #60] ; (800d1bc <dhcp_option_short+0x5c>)
|
|
800d180: 480f ldr r0, [pc, #60] ; (800d1c0 <dhcp_option_short+0x60>)
|
|
800d182: f003 f9b9 bl 80104f8 <printf>
|
|
options[options_out_len++] = (u8_t)((value & 0xff00U) >> 8);
|
|
800d186: 88bb ldrh r3, [r7, #4]
|
|
800d188: 0a1b lsrs r3, r3, #8
|
|
800d18a: b29a uxth r2, r3
|
|
800d18c: 88fb ldrh r3, [r7, #6]
|
|
800d18e: 1c59 adds r1, r3, #1
|
|
800d190: 80f9 strh r1, [r7, #6]
|
|
800d192: 4619 mov r1, r3
|
|
800d194: 683b ldr r3, [r7, #0]
|
|
800d196: 440b add r3, r1
|
|
800d198: b2d2 uxtb r2, r2
|
|
800d19a: 701a strb r2, [r3, #0]
|
|
options[options_out_len++] = (u8_t) (value & 0x00ffU);
|
|
800d19c: 88fb ldrh r3, [r7, #6]
|
|
800d19e: 1c5a adds r2, r3, #1
|
|
800d1a0: 80fa strh r2, [r7, #6]
|
|
800d1a2: 461a mov r2, r3
|
|
800d1a4: 683b ldr r3, [r7, #0]
|
|
800d1a6: 4413 add r3, r2
|
|
800d1a8: 88ba ldrh r2, [r7, #4]
|
|
800d1aa: b2d2 uxtb r2, r2
|
|
800d1ac: 701a strb r2, [r3, #0]
|
|
return options_out_len;
|
|
800d1ae: 88fb ldrh r3, [r7, #6]
|
|
}
|
|
800d1b0: 4618 mov r0, r3
|
|
800d1b2: 3708 adds r7, #8
|
|
800d1b4: 46bd mov sp, r7
|
|
800d1b6: bd80 pop {r7, pc}
|
|
800d1b8: 0801736c .word 0x0801736c
|
|
800d1bc: 0801757c .word 0x0801757c
|
|
800d1c0: 080173cc .word 0x080173cc
|
|
|
|
0800d1c4 <dhcp_option_long>:
|
|
|
|
static u16_t
|
|
dhcp_option_long(u16_t options_out_len, u8_t *options, u32_t value)
|
|
{
|
|
800d1c4: b580 push {r7, lr}
|
|
800d1c6: b084 sub sp, #16
|
|
800d1c8: af00 add r7, sp, #0
|
|
800d1ca: 4603 mov r3, r0
|
|
800d1cc: 60b9 str r1, [r7, #8]
|
|
800d1ce: 607a str r2, [r7, #4]
|
|
800d1d0: 81fb strh r3, [r7, #14]
|
|
LWIP_ASSERT("dhcp_option_long: options_out_len + 4 <= DHCP_OPTIONS_LEN", options_out_len + 4U <= DHCP_OPTIONS_LEN);
|
|
800d1d2: 89fb ldrh r3, [r7, #14]
|
|
800d1d4: 3304 adds r3, #4
|
|
800d1d6: 2b44 cmp r3, #68 ; 0x44
|
|
800d1d8: d906 bls.n 800d1e8 <dhcp_option_long+0x24>
|
|
800d1da: 4b19 ldr r3, [pc, #100] ; (800d240 <dhcp_option_long+0x7c>)
|
|
800d1dc: f240 52b7 movw r2, #1463 ; 0x5b7
|
|
800d1e0: 4918 ldr r1, [pc, #96] ; (800d244 <dhcp_option_long+0x80>)
|
|
800d1e2: 4819 ldr r0, [pc, #100] ; (800d248 <dhcp_option_long+0x84>)
|
|
800d1e4: f003 f988 bl 80104f8 <printf>
|
|
options[options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24);
|
|
800d1e8: 687b ldr r3, [r7, #4]
|
|
800d1ea: 0e1a lsrs r2, r3, #24
|
|
800d1ec: 89fb ldrh r3, [r7, #14]
|
|
800d1ee: 1c59 adds r1, r3, #1
|
|
800d1f0: 81f9 strh r1, [r7, #14]
|
|
800d1f2: 4619 mov r1, r3
|
|
800d1f4: 68bb ldr r3, [r7, #8]
|
|
800d1f6: 440b add r3, r1
|
|
800d1f8: b2d2 uxtb r2, r2
|
|
800d1fa: 701a strb r2, [r3, #0]
|
|
options[options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16);
|
|
800d1fc: 687b ldr r3, [r7, #4]
|
|
800d1fe: 0c1a lsrs r2, r3, #16
|
|
800d200: 89fb ldrh r3, [r7, #14]
|
|
800d202: 1c59 adds r1, r3, #1
|
|
800d204: 81f9 strh r1, [r7, #14]
|
|
800d206: 4619 mov r1, r3
|
|
800d208: 68bb ldr r3, [r7, #8]
|
|
800d20a: 440b add r3, r1
|
|
800d20c: b2d2 uxtb r2, r2
|
|
800d20e: 701a strb r2, [r3, #0]
|
|
options[options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8);
|
|
800d210: 687b ldr r3, [r7, #4]
|
|
800d212: 0a1a lsrs r2, r3, #8
|
|
800d214: 89fb ldrh r3, [r7, #14]
|
|
800d216: 1c59 adds r1, r3, #1
|
|
800d218: 81f9 strh r1, [r7, #14]
|
|
800d21a: 4619 mov r1, r3
|
|
800d21c: 68bb ldr r3, [r7, #8]
|
|
800d21e: 440b add r3, r1
|
|
800d220: b2d2 uxtb r2, r2
|
|
800d222: 701a strb r2, [r3, #0]
|
|
options[options_out_len++] = (u8_t)((value & 0x000000ffUL));
|
|
800d224: 89fb ldrh r3, [r7, #14]
|
|
800d226: 1c5a adds r2, r3, #1
|
|
800d228: 81fa strh r2, [r7, #14]
|
|
800d22a: 461a mov r2, r3
|
|
800d22c: 68bb ldr r3, [r7, #8]
|
|
800d22e: 4413 add r3, r2
|
|
800d230: 687a ldr r2, [r7, #4]
|
|
800d232: b2d2 uxtb r2, r2
|
|
800d234: 701a strb r2, [r3, #0]
|
|
return options_out_len;
|
|
800d236: 89fb ldrh r3, [r7, #14]
|
|
}
|
|
800d238: 4618 mov r0, r3
|
|
800d23a: 3710 adds r7, #16
|
|
800d23c: 46bd mov sp, r7
|
|
800d23e: bd80 pop {r7, pc}
|
|
800d240: 0801736c .word 0x0801736c
|
|
800d244: 080175b8 .word 0x080175b8
|
|
800d248: 080173cc .word 0x080173cc
|
|
|
|
0800d24c <dhcp_parse_reply>:
|
|
* use that further on.
|
|
*
|
|
*/
|
|
static err_t
|
|
dhcp_parse_reply(struct pbuf *p, struct dhcp *dhcp)
|
|
{
|
|
800d24c: b580 push {r7, lr}
|
|
800d24e: b090 sub sp, #64 ; 0x40
|
|
800d250: af00 add r7, sp, #0
|
|
800d252: 6078 str r0, [r7, #4]
|
|
800d254: 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;
|
|
800d256: 2300 movs r3, #0
|
|
800d258: 62fb str r3, [r7, #44] ; 0x2c
|
|
int parse_sname_as_options = 0;
|
|
800d25a: 2300 movs r3, #0
|
|
800d25c: 62bb str r3, [r7, #40] ; 0x28
|
|
#endif
|
|
|
|
LWIP_UNUSED_ARG(dhcp);
|
|
|
|
/* clear received options */
|
|
dhcp_clear_all_options(dhcp);
|
|
800d25e: 2208 movs r2, #8
|
|
800d260: 2100 movs r1, #0
|
|
800d262: 48b5 ldr r0, [pc, #724] ; (800d538 <dhcp_parse_reply+0x2ec>)
|
|
800d264: f003 f940 bl 80104e8 <memset>
|
|
/* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */
|
|
if (p->len < DHCP_SNAME_OFS) {
|
|
800d268: 687b ldr r3, [r7, #4]
|
|
800d26a: 895b ldrh r3, [r3, #10]
|
|
800d26c: 2b2b cmp r3, #43 ; 0x2b
|
|
800d26e: d802 bhi.n 800d276 <dhcp_parse_reply+0x2a>
|
|
return ERR_BUF;
|
|
800d270: f06f 0301 mvn.w r3, #1
|
|
800d274: e2a7 b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
}
|
|
msg_in = (struct dhcp_msg *)p->payload;
|
|
800d276: 687b ldr r3, [r7, #4]
|
|
800d278: 685b ldr r3, [r3, #4]
|
|
800d27a: 61bb str r3, [r7, #24]
|
|
#endif /* LWIP_DHCP_BOOTP_FILE */
|
|
|
|
/* parse options */
|
|
|
|
/* start with options field */
|
|
options_idx = DHCP_OPTIONS_OFS;
|
|
800d27c: 23f0 movs r3, #240 ; 0xf0
|
|
800d27e: 86fb strh r3, [r7, #54] ; 0x36
|
|
/* parse options to the end of the received packet */
|
|
options_idx_max = p->tot_len;
|
|
800d280: 687b ldr r3, [r7, #4]
|
|
800d282: 891b ldrh r3, [r3, #8]
|
|
800d284: 86bb strh r3, [r7, #52] ; 0x34
|
|
again:
|
|
q = p;
|
|
800d286: 687b ldr r3, [r7, #4]
|
|
800d288: 633b str r3, [r7, #48] ; 0x30
|
|
while ((q != NULL) && (options_idx >= q->len)) {
|
|
800d28a: e00c b.n 800d2a6 <dhcp_parse_reply+0x5a>
|
|
options_idx = (u16_t)(options_idx - q->len);
|
|
800d28c: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800d28e: 895b ldrh r3, [r3, #10]
|
|
800d290: 8efa ldrh r2, [r7, #54] ; 0x36
|
|
800d292: 1ad3 subs r3, r2, r3
|
|
800d294: 86fb strh r3, [r7, #54] ; 0x36
|
|
options_idx_max = (u16_t)(options_idx_max - q->len);
|
|
800d296: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800d298: 895b ldrh r3, [r3, #10]
|
|
800d29a: 8eba ldrh r2, [r7, #52] ; 0x34
|
|
800d29c: 1ad3 subs r3, r2, r3
|
|
800d29e: 86bb strh r3, [r7, #52] ; 0x34
|
|
q = q->next;
|
|
800d2a0: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800d2a2: 681b ldr r3, [r3, #0]
|
|
800d2a4: 633b str r3, [r7, #48] ; 0x30
|
|
while ((q != NULL) && (options_idx >= q->len)) {
|
|
800d2a6: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800d2a8: 2b00 cmp r3, #0
|
|
800d2aa: d004 beq.n 800d2b6 <dhcp_parse_reply+0x6a>
|
|
800d2ac: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800d2ae: 895b ldrh r3, [r3, #10]
|
|
800d2b0: 8efa ldrh r2, [r7, #54] ; 0x36
|
|
800d2b2: 429a cmp r2, r3
|
|
800d2b4: d2ea bcs.n 800d28c <dhcp_parse_reply+0x40>
|
|
}
|
|
if (q == NULL) {
|
|
800d2b6: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800d2b8: 2b00 cmp r3, #0
|
|
800d2ba: d102 bne.n 800d2c2 <dhcp_parse_reply+0x76>
|
|
return ERR_BUF;
|
|
800d2bc: f06f 0301 mvn.w r3, #1
|
|
800d2c0: e281 b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
}
|
|
offset = options_idx;
|
|
800d2c2: 8efb ldrh r3, [r7, #54] ; 0x36
|
|
800d2c4: 877b strh r3, [r7, #58] ; 0x3a
|
|
offset_max = options_idx_max;
|
|
800d2c6: 8ebb ldrh r3, [r7, #52] ; 0x34
|
|
800d2c8: 873b strh r3, [r7, #56] ; 0x38
|
|
options = (u8_t *)q->payload;
|
|
800d2ca: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800d2cc: 685b ldr r3, [r3, #4]
|
|
800d2ce: 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)) {
|
|
800d2d0: e239 b.n 800d746 <dhcp_parse_reply+0x4fa>
|
|
u8_t op = options[offset];
|
|
800d2d2: 8f7b ldrh r3, [r7, #58] ; 0x3a
|
|
800d2d4: 6bfa ldr r2, [r7, #60] ; 0x3c
|
|
800d2d6: 4413 add r3, r2
|
|
800d2d8: 781b ldrb r3, [r3, #0]
|
|
800d2da: 75fb strb r3, [r7, #23]
|
|
u8_t len;
|
|
u8_t decode_len = 0;
|
|
800d2dc: 2300 movs r3, #0
|
|
800d2de: f887 3026 strb.w r3, [r7, #38] ; 0x26
|
|
int decode_idx = -1;
|
|
800d2e2: f04f 33ff mov.w r3, #4294967295
|
|
800d2e6: 623b str r3, [r7, #32]
|
|
u16_t val_offset = (u16_t)(offset + 2);
|
|
800d2e8: 8f7b ldrh r3, [r7, #58] ; 0x3a
|
|
800d2ea: 3302 adds r3, #2
|
|
800d2ec: 83fb strh r3, [r7, #30]
|
|
if (val_offset < offset) {
|
|
800d2ee: 8bfa ldrh r2, [r7, #30]
|
|
800d2f0: 8f7b ldrh r3, [r7, #58] ; 0x3a
|
|
800d2f2: 429a cmp r2, r3
|
|
800d2f4: d202 bcs.n 800d2fc <dhcp_parse_reply+0xb0>
|
|
/* overflow */
|
|
return ERR_BUF;
|
|
800d2f6: f06f 0301 mvn.w r3, #1
|
|
800d2fa: e264 b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
}
|
|
/* len byte might be in the next pbuf */
|
|
if ((offset + 1) < q->len) {
|
|
800d2fc: 8f7b ldrh r3, [r7, #58] ; 0x3a
|
|
800d2fe: 3301 adds r3, #1
|
|
800d300: 6b3a ldr r2, [r7, #48] ; 0x30
|
|
800d302: 8952 ldrh r2, [r2, #10]
|
|
800d304: 4293 cmp r3, r2
|
|
800d306: da07 bge.n 800d318 <dhcp_parse_reply+0xcc>
|
|
len = options[offset + 1];
|
|
800d308: 8f7b ldrh r3, [r7, #58] ; 0x3a
|
|
800d30a: 3301 adds r3, #1
|
|
800d30c: 6bfa ldr r2, [r7, #60] ; 0x3c
|
|
800d30e: 4413 add r3, r2
|
|
800d310: 781b ldrb r3, [r3, #0]
|
|
800d312: f887 3027 strb.w r3, [r7, #39] ; 0x27
|
|
800d316: e00b b.n 800d330 <dhcp_parse_reply+0xe4>
|
|
} else {
|
|
len = (q->next != NULL ? ((u8_t *)q->next->payload)[0] : 0);
|
|
800d318: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800d31a: 681b ldr r3, [r3, #0]
|
|
800d31c: 2b00 cmp r3, #0
|
|
800d31e: d004 beq.n 800d32a <dhcp_parse_reply+0xde>
|
|
800d320: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800d322: 681b ldr r3, [r3, #0]
|
|
800d324: 685b ldr r3, [r3, #4]
|
|
800d326: 781b ldrb r3, [r3, #0]
|
|
800d328: e000 b.n 800d32c <dhcp_parse_reply+0xe0>
|
|
800d32a: 2300 movs r3, #0
|
|
800d32c: 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;
|
|
800d330: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800d334: f887 3026 strb.w r3, [r7, #38] ; 0x26
|
|
switch (op) {
|
|
800d338: 7dfb ldrb r3, [r7, #23]
|
|
800d33a: 2b3b cmp r3, #59 ; 0x3b
|
|
800d33c: f200 812c bhi.w 800d598 <dhcp_parse_reply+0x34c>
|
|
800d340: a201 add r2, pc, #4 ; (adr r2, 800d348 <dhcp_parse_reply+0xfc>)
|
|
800d342: f852 f023 ldr.w pc, [r2, r3, lsl #2]
|
|
800d346: bf00 nop
|
|
800d348: 0800d439 .word 0x0800d439
|
|
800d34c: 0800d449 .word 0x0800d449
|
|
800d350: 0800d599 .word 0x0800d599
|
|
800d354: 0800d46b .word 0x0800d46b
|
|
800d358: 0800d599 .word 0x0800d599
|
|
800d35c: 0800d599 .word 0x0800d599
|
|
800d360: 0800d599 .word 0x0800d599
|
|
800d364: 0800d599 .word 0x0800d599
|
|
800d368: 0800d599 .word 0x0800d599
|
|
800d36c: 0800d599 .word 0x0800d599
|
|
800d370: 0800d599 .word 0x0800d599
|
|
800d374: 0800d599 .word 0x0800d599
|
|
800d378: 0800d599 .word 0x0800d599
|
|
800d37c: 0800d599 .word 0x0800d599
|
|
800d380: 0800d599 .word 0x0800d599
|
|
800d384: 0800d599 .word 0x0800d599
|
|
800d388: 0800d599 .word 0x0800d599
|
|
800d38c: 0800d599 .word 0x0800d599
|
|
800d390: 0800d599 .word 0x0800d599
|
|
800d394: 0800d599 .word 0x0800d599
|
|
800d398: 0800d599 .word 0x0800d599
|
|
800d39c: 0800d599 .word 0x0800d599
|
|
800d3a0: 0800d599 .word 0x0800d599
|
|
800d3a4: 0800d599 .word 0x0800d599
|
|
800d3a8: 0800d599 .word 0x0800d599
|
|
800d3ac: 0800d599 .word 0x0800d599
|
|
800d3b0: 0800d599 .word 0x0800d599
|
|
800d3b4: 0800d599 .word 0x0800d599
|
|
800d3b8: 0800d599 .word 0x0800d599
|
|
800d3bc: 0800d599 .word 0x0800d599
|
|
800d3c0: 0800d599 .word 0x0800d599
|
|
800d3c4: 0800d599 .word 0x0800d599
|
|
800d3c8: 0800d599 .word 0x0800d599
|
|
800d3cc: 0800d599 .word 0x0800d599
|
|
800d3d0: 0800d599 .word 0x0800d599
|
|
800d3d4: 0800d599 .word 0x0800d599
|
|
800d3d8: 0800d599 .word 0x0800d599
|
|
800d3dc: 0800d599 .word 0x0800d599
|
|
800d3e0: 0800d599 .word 0x0800d599
|
|
800d3e4: 0800d599 .word 0x0800d599
|
|
800d3e8: 0800d599 .word 0x0800d599
|
|
800d3ec: 0800d599 .word 0x0800d599
|
|
800d3f0: 0800d599 .word 0x0800d599
|
|
800d3f4: 0800d599 .word 0x0800d599
|
|
800d3f8: 0800d599 .word 0x0800d599
|
|
800d3fc: 0800d599 .word 0x0800d599
|
|
800d400: 0800d599 .word 0x0800d599
|
|
800d404: 0800d599 .word 0x0800d599
|
|
800d408: 0800d599 .word 0x0800d599
|
|
800d40c: 0800d599 .word 0x0800d599
|
|
800d410: 0800d599 .word 0x0800d599
|
|
800d414: 0800d497 .word 0x0800d497
|
|
800d418: 0800d4b9 .word 0x0800d4b9
|
|
800d41c: 0800d4f5 .word 0x0800d4f5
|
|
800d420: 0800d517 .word 0x0800d517
|
|
800d424: 0800d599 .word 0x0800d599
|
|
800d428: 0800d599 .word 0x0800d599
|
|
800d42c: 0800d599 .word 0x0800d599
|
|
800d430: 0800d555 .word 0x0800d555
|
|
800d434: 0800d577 .word 0x0800d577
|
|
/* case(DHCP_OPTION_END): handled above */
|
|
case (DHCP_OPTION_PAD):
|
|
/* special option: no len encoded */
|
|
decode_len = len = 0;
|
|
800d438: 2300 movs r3, #0
|
|
800d43a: f887 3027 strb.w r3, [r7, #39] ; 0x27
|
|
800d43e: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800d442: f887 3026 strb.w r3, [r7, #38] ; 0x26
|
|
/* will be increased below */
|
|
break;
|
|
800d446: e0ab b.n 800d5a0 <dhcp_parse_reply+0x354>
|
|
case (DHCP_OPTION_SUBNET_MASK):
|
|
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
|
|
800d448: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800d44c: 2b04 cmp r3, #4
|
|
800d44e: d009 beq.n 800d464 <dhcp_parse_reply+0x218>
|
|
800d450: 4b3a ldr r3, [pc, #232] ; (800d53c <dhcp_parse_reply+0x2f0>)
|
|
800d452: f240 622e movw r2, #1582 ; 0x62e
|
|
800d456: 493a ldr r1, [pc, #232] ; (800d540 <dhcp_parse_reply+0x2f4>)
|
|
800d458: 483a ldr r0, [pc, #232] ; (800d544 <dhcp_parse_reply+0x2f8>)
|
|
800d45a: f003 f84d bl 80104f8 <printf>
|
|
800d45e: f06f 0305 mvn.w r3, #5
|
|
800d462: e1b0 b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
decode_idx = DHCP_OPTION_IDX_SUBNET_MASK;
|
|
800d464: 2306 movs r3, #6
|
|
800d466: 623b str r3, [r7, #32]
|
|
break;
|
|
800d468: e09a b.n 800d5a0 <dhcp_parse_reply+0x354>
|
|
case (DHCP_OPTION_ROUTER):
|
|
decode_len = 4; /* only copy the first given router */
|
|
800d46a: 2304 movs r3, #4
|
|
800d46c: f887 3026 strb.w r3, [r7, #38] ; 0x26
|
|
LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;);
|
|
800d470: f897 2027 ldrb.w r2, [r7, #39] ; 0x27
|
|
800d474: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
|
|
800d478: 429a cmp r2, r3
|
|
800d47a: d209 bcs.n 800d490 <dhcp_parse_reply+0x244>
|
|
800d47c: 4b2f ldr r3, [pc, #188] ; (800d53c <dhcp_parse_reply+0x2f0>)
|
|
800d47e: f240 6233 movw r2, #1587 ; 0x633
|
|
800d482: 4931 ldr r1, [pc, #196] ; (800d548 <dhcp_parse_reply+0x2fc>)
|
|
800d484: 482f ldr r0, [pc, #188] ; (800d544 <dhcp_parse_reply+0x2f8>)
|
|
800d486: f003 f837 bl 80104f8 <printf>
|
|
800d48a: f06f 0305 mvn.w r3, #5
|
|
800d48e: e19a b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
decode_idx = DHCP_OPTION_IDX_ROUTER;
|
|
800d490: 2307 movs r3, #7
|
|
800d492: 623b str r3, [r7, #32]
|
|
break;
|
|
800d494: e084 b.n 800d5a0 <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;);
|
|
800d496: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800d49a: 2b04 cmp r3, #4
|
|
800d49c: d009 beq.n 800d4b2 <dhcp_parse_reply+0x266>
|
|
800d49e: 4b27 ldr r3, [pc, #156] ; (800d53c <dhcp_parse_reply+0x2f0>)
|
|
800d4a0: f240 6241 movw r2, #1601 ; 0x641
|
|
800d4a4: 4926 ldr r1, [pc, #152] ; (800d540 <dhcp_parse_reply+0x2f4>)
|
|
800d4a6: 4827 ldr r0, [pc, #156] ; (800d544 <dhcp_parse_reply+0x2f8>)
|
|
800d4a8: f003 f826 bl 80104f8 <printf>
|
|
800d4ac: f06f 0305 mvn.w r3, #5
|
|
800d4b0: e189 b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
decode_idx = DHCP_OPTION_IDX_LEASE_TIME;
|
|
800d4b2: 2303 movs r3, #3
|
|
800d4b4: 623b str r3, [r7, #32]
|
|
break;
|
|
800d4b6: e073 b.n 800d5a0 <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;);
|
|
800d4b8: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800d4bc: 2b01 cmp r3, #1
|
|
800d4be: d009 beq.n 800d4d4 <dhcp_parse_reply+0x288>
|
|
800d4c0: 4b1e ldr r3, [pc, #120] ; (800d53c <dhcp_parse_reply+0x2f0>)
|
|
800d4c2: f240 624f movw r2, #1615 ; 0x64f
|
|
800d4c6: 4921 ldr r1, [pc, #132] ; (800d54c <dhcp_parse_reply+0x300>)
|
|
800d4c8: 481e ldr r0, [pc, #120] ; (800d544 <dhcp_parse_reply+0x2f8>)
|
|
800d4ca: f003 f815 bl 80104f8 <printf>
|
|
800d4ce: f06f 0305 mvn.w r3, #5
|
|
800d4d2: e178 b.n 800d7c6 <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;);
|
|
800d4d4: 8efb ldrh r3, [r7, #54] ; 0x36
|
|
800d4d6: 2bf0 cmp r3, #240 ; 0xf0
|
|
800d4d8: d009 beq.n 800d4ee <dhcp_parse_reply+0x2a2>
|
|
800d4da: 4b18 ldr r3, [pc, #96] ; (800d53c <dhcp_parse_reply+0x2f0>)
|
|
800d4dc: f240 6251 movw r2, #1617 ; 0x651
|
|
800d4e0: 491b ldr r1, [pc, #108] ; (800d550 <dhcp_parse_reply+0x304>)
|
|
800d4e2: 4818 ldr r0, [pc, #96] ; (800d544 <dhcp_parse_reply+0x2f8>)
|
|
800d4e4: f003 f808 bl 80104f8 <printf>
|
|
800d4e8: f06f 0305 mvn.w r3, #5
|
|
800d4ec: e16b b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
decode_idx = DHCP_OPTION_IDX_OVERLOAD;
|
|
800d4ee: 2300 movs r3, #0
|
|
800d4f0: 623b str r3, [r7, #32]
|
|
break;
|
|
800d4f2: e055 b.n 800d5a0 <dhcp_parse_reply+0x354>
|
|
case (DHCP_OPTION_MESSAGE_TYPE):
|
|
LWIP_ERROR("len == 1", len == 1, return ERR_VAL;);
|
|
800d4f4: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800d4f8: 2b01 cmp r3, #1
|
|
800d4fa: d009 beq.n 800d510 <dhcp_parse_reply+0x2c4>
|
|
800d4fc: 4b0f ldr r3, [pc, #60] ; (800d53c <dhcp_parse_reply+0x2f0>)
|
|
800d4fe: f240 6255 movw r2, #1621 ; 0x655
|
|
800d502: 4912 ldr r1, [pc, #72] ; (800d54c <dhcp_parse_reply+0x300>)
|
|
800d504: 480f ldr r0, [pc, #60] ; (800d544 <dhcp_parse_reply+0x2f8>)
|
|
800d506: f002 fff7 bl 80104f8 <printf>
|
|
800d50a: f06f 0305 mvn.w r3, #5
|
|
800d50e: e15a b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
decode_idx = DHCP_OPTION_IDX_MSG_TYPE;
|
|
800d510: 2301 movs r3, #1
|
|
800d512: 623b str r3, [r7, #32]
|
|
break;
|
|
800d514: e044 b.n 800d5a0 <dhcp_parse_reply+0x354>
|
|
case (DHCP_OPTION_SERVER_ID):
|
|
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
|
|
800d516: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800d51a: 2b04 cmp r3, #4
|
|
800d51c: d009 beq.n 800d532 <dhcp_parse_reply+0x2e6>
|
|
800d51e: 4b07 ldr r3, [pc, #28] ; (800d53c <dhcp_parse_reply+0x2f0>)
|
|
800d520: f240 6259 movw r2, #1625 ; 0x659
|
|
800d524: 4906 ldr r1, [pc, #24] ; (800d540 <dhcp_parse_reply+0x2f4>)
|
|
800d526: 4807 ldr r0, [pc, #28] ; (800d544 <dhcp_parse_reply+0x2f8>)
|
|
800d528: f002 ffe6 bl 80104f8 <printf>
|
|
800d52c: f06f 0305 mvn.w r3, #5
|
|
800d530: e149 b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
decode_idx = DHCP_OPTION_IDX_SERVER_ID;
|
|
800d532: 2302 movs r3, #2
|
|
800d534: 623b str r3, [r7, #32]
|
|
break;
|
|
800d536: e033 b.n 800d5a0 <dhcp_parse_reply+0x354>
|
|
800d538: 20008c80 .word 0x20008c80
|
|
800d53c: 0801736c .word 0x0801736c
|
|
800d540: 080175f4 .word 0x080175f4
|
|
800d544: 080173cc .word 0x080173cc
|
|
800d548: 08017600 .word 0x08017600
|
|
800d54c: 08017614 .word 0x08017614
|
|
800d550: 08017620 .word 0x08017620
|
|
case (DHCP_OPTION_T1):
|
|
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
|
|
800d554: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800d558: 2b04 cmp r3, #4
|
|
800d55a: d009 beq.n 800d570 <dhcp_parse_reply+0x324>
|
|
800d55c: 4b9c ldr r3, [pc, #624] ; (800d7d0 <dhcp_parse_reply+0x584>)
|
|
800d55e: f240 625d movw r2, #1629 ; 0x65d
|
|
800d562: 499c ldr r1, [pc, #624] ; (800d7d4 <dhcp_parse_reply+0x588>)
|
|
800d564: 489c ldr r0, [pc, #624] ; (800d7d8 <dhcp_parse_reply+0x58c>)
|
|
800d566: f002 ffc7 bl 80104f8 <printf>
|
|
800d56a: f06f 0305 mvn.w r3, #5
|
|
800d56e: e12a b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
decode_idx = DHCP_OPTION_IDX_T1;
|
|
800d570: 2304 movs r3, #4
|
|
800d572: 623b str r3, [r7, #32]
|
|
break;
|
|
800d574: e014 b.n 800d5a0 <dhcp_parse_reply+0x354>
|
|
case (DHCP_OPTION_T2):
|
|
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
|
|
800d576: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800d57a: 2b04 cmp r3, #4
|
|
800d57c: d009 beq.n 800d592 <dhcp_parse_reply+0x346>
|
|
800d57e: 4b94 ldr r3, [pc, #592] ; (800d7d0 <dhcp_parse_reply+0x584>)
|
|
800d580: f240 6261 movw r2, #1633 ; 0x661
|
|
800d584: 4993 ldr r1, [pc, #588] ; (800d7d4 <dhcp_parse_reply+0x588>)
|
|
800d586: 4894 ldr r0, [pc, #592] ; (800d7d8 <dhcp_parse_reply+0x58c>)
|
|
800d588: f002 ffb6 bl 80104f8 <printf>
|
|
800d58c: f06f 0305 mvn.w r3, #5
|
|
800d590: e119 b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
decode_idx = DHCP_OPTION_IDX_T2;
|
|
800d592: 2305 movs r3, #5
|
|
800d594: 623b str r3, [r7, #32]
|
|
break;
|
|
800d596: e003 b.n 800d5a0 <dhcp_parse_reply+0x354>
|
|
default:
|
|
decode_len = 0;
|
|
800d598: 2300 movs r3, #0
|
|
800d59a: 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;
|
|
800d59e: bf00 nop
|
|
}
|
|
if (op == DHCP_OPTION_PAD) {
|
|
800d5a0: 7dfb ldrb r3, [r7, #23]
|
|
800d5a2: 2b00 cmp r3, #0
|
|
800d5a4: d103 bne.n 800d5ae <dhcp_parse_reply+0x362>
|
|
offset++;
|
|
800d5a6: 8f7b ldrh r3, [r7, #58] ; 0x3a
|
|
800d5a8: 3301 adds r3, #1
|
|
800d5aa: 877b strh r3, [r7, #58] ; 0x3a
|
|
800d5ac: e0a1 b.n 800d6f2 <dhcp_parse_reply+0x4a6>
|
|
} else {
|
|
if (offset + len + 2 > 0xFFFF) {
|
|
800d5ae: 8f7a ldrh r2, [r7, #58] ; 0x3a
|
|
800d5b0: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800d5b4: 4413 add r3, r2
|
|
800d5b6: f64f 72fd movw r2, #65533 ; 0xfffd
|
|
800d5ba: 4293 cmp r3, r2
|
|
800d5bc: dd02 ble.n 800d5c4 <dhcp_parse_reply+0x378>
|
|
/* overflow */
|
|
return ERR_BUF;
|
|
800d5be: f06f 0301 mvn.w r3, #1
|
|
800d5c2: e100 b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
}
|
|
offset = (u16_t)(offset + len + 2);
|
|
800d5c4: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800d5c8: b29a uxth r2, r3
|
|
800d5ca: 8f7b ldrh r3, [r7, #58] ; 0x3a
|
|
800d5cc: 4413 add r3, r2
|
|
800d5ce: b29b uxth r3, r3
|
|
800d5d0: 3302 adds r3, #2
|
|
800d5d2: 877b strh r3, [r7, #58] ; 0x3a
|
|
if (decode_len > 0) {
|
|
800d5d4: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
|
|
800d5d8: 2b00 cmp r3, #0
|
|
800d5da: f000 808a beq.w 800d6f2 <dhcp_parse_reply+0x4a6>
|
|
u32_t value = 0;
|
|
800d5de: 2300 movs r3, #0
|
|
800d5e0: 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);
|
|
800d5e2: 6a3b ldr r3, [r7, #32]
|
|
800d5e4: 2b00 cmp r3, #0
|
|
800d5e6: db02 blt.n 800d5ee <dhcp_parse_reply+0x3a2>
|
|
800d5e8: 6a3b ldr r3, [r7, #32]
|
|
800d5ea: 2b07 cmp r3, #7
|
|
800d5ec: dd06 ble.n 800d5fc <dhcp_parse_reply+0x3b0>
|
|
800d5ee: 4b78 ldr r3, [pc, #480] ; (800d7d0 <dhcp_parse_reply+0x584>)
|
|
800d5f0: f44f 62cf mov.w r2, #1656 ; 0x678
|
|
800d5f4: 4979 ldr r1, [pc, #484] ; (800d7dc <dhcp_parse_reply+0x590>)
|
|
800d5f6: 4878 ldr r0, [pc, #480] ; (800d7d8 <dhcp_parse_reply+0x58c>)
|
|
800d5f8: f002 ff7e bl 80104f8 <printf>
|
|
if (!dhcp_option_given(dhcp, decode_idx)) {
|
|
800d5fc: 4a78 ldr r2, [pc, #480] ; (800d7e0 <dhcp_parse_reply+0x594>)
|
|
800d5fe: 6a3b ldr r3, [r7, #32]
|
|
800d600: 4413 add r3, r2
|
|
800d602: 781b ldrb r3, [r3, #0]
|
|
800d604: 2b00 cmp r3, #0
|
|
800d606: d174 bne.n 800d6f2 <dhcp_parse_reply+0x4a6>
|
|
copy_len = LWIP_MIN(decode_len, 4);
|
|
800d608: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
|
|
800d60c: 2b04 cmp r3, #4
|
|
800d60e: bf28 it cs
|
|
800d610: 2304 movcs r3, #4
|
|
800d612: b2db uxtb r3, r3
|
|
800d614: 82bb strh r3, [r7, #20]
|
|
if (pbuf_copy_partial(q, &value, copy_len, val_offset) != copy_len) {
|
|
800d616: 8bfb ldrh r3, [r7, #30]
|
|
800d618: 8aba ldrh r2, [r7, #20]
|
|
800d61a: f107 0108 add.w r1, r7, #8
|
|
800d61e: 6b38 ldr r0, [r7, #48] ; 0x30
|
|
800d620: f7f8 fbec bl 8005dfc <pbuf_copy_partial>
|
|
800d624: 4603 mov r3, r0
|
|
800d626: 461a mov r2, r3
|
|
800d628: 8abb ldrh r3, [r7, #20]
|
|
800d62a: 4293 cmp r3, r2
|
|
800d62c: d002 beq.n 800d634 <dhcp_parse_reply+0x3e8>
|
|
return ERR_BUF;
|
|
800d62e: f06f 0301 mvn.w r3, #1
|
|
800d632: e0c8 b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
}
|
|
if (decode_len > 4) {
|
|
800d634: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
|
|
800d638: 2b04 cmp r3, #4
|
|
800d63a: d933 bls.n 800d6a4 <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;);
|
|
800d63c: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
|
|
800d640: f003 0303 and.w r3, r3, #3
|
|
800d644: b2db uxtb r3, r3
|
|
800d646: 2b00 cmp r3, #0
|
|
800d648: d009 beq.n 800d65e <dhcp_parse_reply+0x412>
|
|
800d64a: 4b61 ldr r3, [pc, #388] ; (800d7d0 <dhcp_parse_reply+0x584>)
|
|
800d64c: f240 6281 movw r2, #1665 ; 0x681
|
|
800d650: 4964 ldr r1, [pc, #400] ; (800d7e4 <dhcp_parse_reply+0x598>)
|
|
800d652: 4861 ldr r0, [pc, #388] ; (800d7d8 <dhcp_parse_reply+0x58c>)
|
|
800d654: f002 ff50 bl 80104f8 <printf>
|
|
800d658: f06f 0305 mvn.w r3, #5
|
|
800d65c: e0b3 b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
dhcp_got_option(dhcp, decode_idx);
|
|
800d65e: 4a60 ldr r2, [pc, #384] ; (800d7e0 <dhcp_parse_reply+0x594>)
|
|
800d660: 6a3b ldr r3, [r7, #32]
|
|
800d662: 4413 add r3, r2
|
|
800d664: 2201 movs r2, #1
|
|
800d666: 701a strb r2, [r3, #0]
|
|
dhcp_set_option_value(dhcp, decode_idx, lwip_htonl(value));
|
|
800d668: 68bb ldr r3, [r7, #8]
|
|
800d66a: 4618 mov r0, r3
|
|
800d66c: f7f6 fe77 bl 800435e <lwip_htonl>
|
|
800d670: 4602 mov r2, r0
|
|
800d672: 495d ldr r1, [pc, #372] ; (800d7e8 <dhcp_parse_reply+0x59c>)
|
|
800d674: 6a3b ldr r3, [r7, #32]
|
|
800d676: f841 2023 str.w r2, [r1, r3, lsl #2]
|
|
decode_len = (u8_t)(decode_len - 4);
|
|
800d67a: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
|
|
800d67e: 3b04 subs r3, #4
|
|
800d680: f887 3026 strb.w r3, [r7, #38] ; 0x26
|
|
next_val_offset = (u16_t)(val_offset + 4);
|
|
800d684: 8bfb ldrh r3, [r7, #30]
|
|
800d686: 3304 adds r3, #4
|
|
800d688: 827b strh r3, [r7, #18]
|
|
if (next_val_offset < val_offset) {
|
|
800d68a: 8a7a ldrh r2, [r7, #18]
|
|
800d68c: 8bfb ldrh r3, [r7, #30]
|
|
800d68e: 429a cmp r2, r3
|
|
800d690: d202 bcs.n 800d698 <dhcp_parse_reply+0x44c>
|
|
/* overflow */
|
|
return ERR_BUF;
|
|
800d692: f06f 0301 mvn.w r3, #1
|
|
800d696: e096 b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
}
|
|
val_offset = next_val_offset;
|
|
800d698: 8a7b ldrh r3, [r7, #18]
|
|
800d69a: 83fb strh r3, [r7, #30]
|
|
decode_idx++;
|
|
800d69c: 6a3b ldr r3, [r7, #32]
|
|
800d69e: 3301 adds r3, #1
|
|
800d6a0: 623b str r3, [r7, #32]
|
|
goto decode_next;
|
|
800d6a2: e79e b.n 800d5e2 <dhcp_parse_reply+0x396>
|
|
} else if (decode_len == 4) {
|
|
800d6a4: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
|
|
800d6a8: 2b04 cmp r3, #4
|
|
800d6aa: d106 bne.n 800d6ba <dhcp_parse_reply+0x46e>
|
|
value = lwip_ntohl(value);
|
|
800d6ac: 68bb ldr r3, [r7, #8]
|
|
800d6ae: 4618 mov r0, r3
|
|
800d6b0: f7f6 fe55 bl 800435e <lwip_htonl>
|
|
800d6b4: 4603 mov r3, r0
|
|
800d6b6: 60bb str r3, [r7, #8]
|
|
800d6b8: e011 b.n 800d6de <dhcp_parse_reply+0x492>
|
|
} else {
|
|
LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;);
|
|
800d6ba: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
|
|
800d6be: 2b01 cmp r3, #1
|
|
800d6c0: d009 beq.n 800d6d6 <dhcp_parse_reply+0x48a>
|
|
800d6c2: 4b43 ldr r3, [pc, #268] ; (800d7d0 <dhcp_parse_reply+0x584>)
|
|
800d6c4: f44f 62d2 mov.w r2, #1680 ; 0x690
|
|
800d6c8: 4948 ldr r1, [pc, #288] ; (800d7ec <dhcp_parse_reply+0x5a0>)
|
|
800d6ca: 4843 ldr r0, [pc, #268] ; (800d7d8 <dhcp_parse_reply+0x58c>)
|
|
800d6cc: f002 ff14 bl 80104f8 <printf>
|
|
800d6d0: f06f 0305 mvn.w r3, #5
|
|
800d6d4: e077 b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
value = ((u8_t *)&value)[0];
|
|
800d6d6: f107 0308 add.w r3, r7, #8
|
|
800d6da: 781b ldrb r3, [r3, #0]
|
|
800d6dc: 60bb str r3, [r7, #8]
|
|
}
|
|
dhcp_got_option(dhcp, decode_idx);
|
|
800d6de: 4a40 ldr r2, [pc, #256] ; (800d7e0 <dhcp_parse_reply+0x594>)
|
|
800d6e0: 6a3b ldr r3, [r7, #32]
|
|
800d6e2: 4413 add r3, r2
|
|
800d6e4: 2201 movs r2, #1
|
|
800d6e6: 701a strb r2, [r3, #0]
|
|
dhcp_set_option_value(dhcp, decode_idx, value);
|
|
800d6e8: 68ba ldr r2, [r7, #8]
|
|
800d6ea: 493f ldr r1, [pc, #252] ; (800d7e8 <dhcp_parse_reply+0x59c>)
|
|
800d6ec: 6a3b ldr r3, [r7, #32]
|
|
800d6ee: f841 2023 str.w r2, [r1, r3, lsl #2]
|
|
}
|
|
}
|
|
}
|
|
if (offset >= q->len) {
|
|
800d6f2: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800d6f4: 895b ldrh r3, [r3, #10]
|
|
800d6f6: 8f7a ldrh r2, [r7, #58] ; 0x3a
|
|
800d6f8: 429a cmp r2, r3
|
|
800d6fa: d324 bcc.n 800d746 <dhcp_parse_reply+0x4fa>
|
|
offset = (u16_t)(offset - q->len);
|
|
800d6fc: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800d6fe: 895b ldrh r3, [r3, #10]
|
|
800d700: 8f7a ldrh r2, [r7, #58] ; 0x3a
|
|
800d702: 1ad3 subs r3, r2, r3
|
|
800d704: 877b strh r3, [r7, #58] ; 0x3a
|
|
offset_max = (u16_t)(offset_max - q->len);
|
|
800d706: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800d708: 895b ldrh r3, [r3, #10]
|
|
800d70a: 8f3a ldrh r2, [r7, #56] ; 0x38
|
|
800d70c: 1ad3 subs r3, r2, r3
|
|
800d70e: 873b strh r3, [r7, #56] ; 0x38
|
|
if (offset < offset_max) {
|
|
800d710: 8f7a ldrh r2, [r7, #58] ; 0x3a
|
|
800d712: 8f3b ldrh r3, [r7, #56] ; 0x38
|
|
800d714: 429a cmp r2, r3
|
|
800d716: d213 bcs.n 800d740 <dhcp_parse_reply+0x4f4>
|
|
q = q->next;
|
|
800d718: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800d71a: 681b ldr r3, [r3, #0]
|
|
800d71c: 633b str r3, [r7, #48] ; 0x30
|
|
LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;);
|
|
800d71e: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800d720: 2b00 cmp r3, #0
|
|
800d722: d109 bne.n 800d738 <dhcp_parse_reply+0x4ec>
|
|
800d724: 4b2a ldr r3, [pc, #168] ; (800d7d0 <dhcp_parse_reply+0x584>)
|
|
800d726: f240 629d movw r2, #1693 ; 0x69d
|
|
800d72a: 4931 ldr r1, [pc, #196] ; (800d7f0 <dhcp_parse_reply+0x5a4>)
|
|
800d72c: 482a ldr r0, [pc, #168] ; (800d7d8 <dhcp_parse_reply+0x58c>)
|
|
800d72e: f002 fee3 bl 80104f8 <printf>
|
|
800d732: f06f 0305 mvn.w r3, #5
|
|
800d736: e046 b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
options = (u8_t *)q->payload;
|
|
800d738: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800d73a: 685b ldr r3, [r3, #4]
|
|
800d73c: 63fb str r3, [r7, #60] ; 0x3c
|
|
800d73e: e002 b.n 800d746 <dhcp_parse_reply+0x4fa>
|
|
} else {
|
|
/* We've run out of bytes, probably no end marker. Don't proceed. */
|
|
return ERR_BUF;
|
|
800d740: f06f 0301 mvn.w r3, #1
|
|
800d744: e03f b.n 800d7c6 <dhcp_parse_reply+0x57a>
|
|
while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) {
|
|
800d746: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800d748: 2b00 cmp r3, #0
|
|
800d74a: d00a beq.n 800d762 <dhcp_parse_reply+0x516>
|
|
800d74c: 8f7a ldrh r2, [r7, #58] ; 0x3a
|
|
800d74e: 8f3b ldrh r3, [r7, #56] ; 0x38
|
|
800d750: 429a cmp r2, r3
|
|
800d752: d206 bcs.n 800d762 <dhcp_parse_reply+0x516>
|
|
800d754: 8f7b ldrh r3, [r7, #58] ; 0x3a
|
|
800d756: 6bfa ldr r2, [r7, #60] ; 0x3c
|
|
800d758: 4413 add r3, r2
|
|
800d75a: 781b ldrb r3, [r3, #0]
|
|
800d75c: 2bff cmp r3, #255 ; 0xff
|
|
800d75e: f47f adb8 bne.w 800d2d2 <dhcp_parse_reply+0x86>
|
|
}
|
|
}
|
|
}
|
|
/* is this an overloaded message? */
|
|
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) {
|
|
800d762: 4b1f ldr r3, [pc, #124] ; (800d7e0 <dhcp_parse_reply+0x594>)
|
|
800d764: 781b ldrb r3, [r3, #0]
|
|
800d766: 2b00 cmp r3, #0
|
|
800d768: d018 beq.n 800d79c <dhcp_parse_reply+0x550>
|
|
u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD);
|
|
800d76a: 4b1f ldr r3, [pc, #124] ; (800d7e8 <dhcp_parse_reply+0x59c>)
|
|
800d76c: 681b ldr r3, [r3, #0]
|
|
800d76e: 60fb str r3, [r7, #12]
|
|
dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD);
|
|
800d770: 4b1b ldr r3, [pc, #108] ; (800d7e0 <dhcp_parse_reply+0x594>)
|
|
800d772: 2200 movs r2, #0
|
|
800d774: 701a strb r2, [r3, #0]
|
|
if (overload == DHCP_OVERLOAD_FILE) {
|
|
800d776: 68fb ldr r3, [r7, #12]
|
|
800d778: 2b01 cmp r3, #1
|
|
800d77a: d102 bne.n 800d782 <dhcp_parse_reply+0x536>
|
|
parse_file_as_options = 1;
|
|
800d77c: 2301 movs r3, #1
|
|
800d77e: 62fb str r3, [r7, #44] ; 0x2c
|
|
800d780: e00c b.n 800d79c <dhcp_parse_reply+0x550>
|
|
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n"));
|
|
} else if (overload == DHCP_OVERLOAD_SNAME) {
|
|
800d782: 68fb ldr r3, [r7, #12]
|
|
800d784: 2b02 cmp r3, #2
|
|
800d786: d102 bne.n 800d78e <dhcp_parse_reply+0x542>
|
|
parse_sname_as_options = 1;
|
|
800d788: 2301 movs r3, #1
|
|
800d78a: 62bb str r3, [r7, #40] ; 0x28
|
|
800d78c: e006 b.n 800d79c <dhcp_parse_reply+0x550>
|
|
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n"));
|
|
} else if (overload == DHCP_OVERLOAD_SNAME_FILE) {
|
|
800d78e: 68fb ldr r3, [r7, #12]
|
|
800d790: 2b03 cmp r3, #3
|
|
800d792: d103 bne.n 800d79c <dhcp_parse_reply+0x550>
|
|
parse_sname_as_options = 1;
|
|
800d794: 2301 movs r3, #1
|
|
800d796: 62bb str r3, [r7, #40] ; 0x28
|
|
parse_file_as_options = 1;
|
|
800d798: 2301 movs r3, #1
|
|
800d79a: 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) {
|
|
800d79c: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800d79e: 2b00 cmp r3, #0
|
|
800d7a0: d006 beq.n 800d7b0 <dhcp_parse_reply+0x564>
|
|
/* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */
|
|
parse_file_as_options = 0;
|
|
800d7a2: 2300 movs r3, #0
|
|
800d7a4: 62fb str r3, [r7, #44] ; 0x2c
|
|
options_idx = DHCP_FILE_OFS;
|
|
800d7a6: 236c movs r3, #108 ; 0x6c
|
|
800d7a8: 86fb strh r3, [r7, #54] ; 0x36
|
|
options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN;
|
|
800d7aa: 23ec movs r3, #236 ; 0xec
|
|
800d7ac: 86bb strh r3, [r7, #52] ; 0x34
|
|
#if LWIP_DHCP_BOOTP_FILE
|
|
file_overloaded = 1;
|
|
#endif
|
|
goto again;
|
|
800d7ae: e56a b.n 800d286 <dhcp_parse_reply+0x3a>
|
|
} else if (parse_sname_as_options) {
|
|
800d7b0: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800d7b2: 2b00 cmp r3, #0
|
|
800d7b4: d006 beq.n 800d7c4 <dhcp_parse_reply+0x578>
|
|
parse_sname_as_options = 0;
|
|
800d7b6: 2300 movs r3, #0
|
|
800d7b8: 62bb str r3, [r7, #40] ; 0x28
|
|
options_idx = DHCP_SNAME_OFS;
|
|
800d7ba: 232c movs r3, #44 ; 0x2c
|
|
800d7bc: 86fb strh r3, [r7, #54] ; 0x36
|
|
options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN;
|
|
800d7be: 236c movs r3, #108 ; 0x6c
|
|
800d7c0: 86bb strh r3, [r7, #52] ; 0x34
|
|
goto again;
|
|
800d7c2: e560 b.n 800d286 <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;
|
|
800d7c4: 2300 movs r3, #0
|
|
}
|
|
800d7c6: 4618 mov r0, r3
|
|
800d7c8: 3740 adds r7, #64 ; 0x40
|
|
800d7ca: 46bd mov sp, r7
|
|
800d7cc: bd80 pop {r7, pc}
|
|
800d7ce: bf00 nop
|
|
800d7d0: 0801736c .word 0x0801736c
|
|
800d7d4: 080175f4 .word 0x080175f4
|
|
800d7d8: 080173cc .word 0x080173cc
|
|
800d7dc: 08017638 .word 0x08017638
|
|
800d7e0: 20008c80 .word 0x20008c80
|
|
800d7e4: 0801764c .word 0x0801764c
|
|
800d7e8: 20008c60 .word 0x20008c60
|
|
800d7ec: 08017664 .word 0x08017664
|
|
800d7f0: 08017678 .word 0x08017678
|
|
|
|
0800d7f4 <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)
|
|
{
|
|
800d7f4: b580 push {r7, lr}
|
|
800d7f6: b08a sub sp, #40 ; 0x28
|
|
800d7f8: af00 add r7, sp, #0
|
|
800d7fa: 60f8 str r0, [r7, #12]
|
|
800d7fc: 60b9 str r1, [r7, #8]
|
|
800d7fe: 607a str r2, [r7, #4]
|
|
800d800: 603b str r3, [r7, #0]
|
|
struct netif *netif = ip_current_input_netif();
|
|
800d802: 4b60 ldr r3, [pc, #384] ; (800d984 <dhcp_recv+0x190>)
|
|
800d804: 685b ldr r3, [r3, #4]
|
|
800d806: 623b str r3, [r7, #32]
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800d808: 6a3b ldr r3, [r7, #32]
|
|
800d80a: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800d80c: 61fb str r3, [r7, #28]
|
|
struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload;
|
|
800d80e: 687b ldr r3, [r7, #4]
|
|
800d810: 685b ldr r3, [r3, #4]
|
|
800d812: 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)) {
|
|
800d814: 69fb ldr r3, [r7, #28]
|
|
800d816: 2b00 cmp r3, #0
|
|
800d818: f000 809d beq.w 800d956 <dhcp_recv+0x162>
|
|
800d81c: 69fb ldr r3, [r7, #28]
|
|
800d81e: 791b ldrb r3, [r3, #4]
|
|
800d820: 2b00 cmp r3, #0
|
|
800d822: f000 8098 beq.w 800d956 <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) {
|
|
800d826: 687b ldr r3, [r7, #4]
|
|
800d828: 895b ldrh r3, [r3, #10]
|
|
800d82a: 2b2b cmp r3, #43 ; 0x2b
|
|
800d82c: f240 8095 bls.w 800d95a <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) {
|
|
800d830: 69bb ldr r3, [r7, #24]
|
|
800d832: 781b ldrb r3, [r3, #0]
|
|
800d834: 2b02 cmp r3, #2
|
|
800d836: f040 8092 bne.w 800d95e <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++) {
|
|
800d83a: 2300 movs r3, #0
|
|
800d83c: f887 3027 strb.w r3, [r7, #39] ; 0x27
|
|
800d840: e012 b.n 800d868 <dhcp_recv+0x74>
|
|
if (netif->hwaddr[i] != reply_msg->chaddr[i]) {
|
|
800d842: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800d846: 6a3a ldr r2, [r7, #32]
|
|
800d848: 4413 add r3, r2
|
|
800d84a: f893 202a ldrb.w r2, [r3, #42] ; 0x2a
|
|
800d84e: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800d852: 69b9 ldr r1, [r7, #24]
|
|
800d854: 440b add r3, r1
|
|
800d856: 7f1b ldrb r3, [r3, #28]
|
|
800d858: 429a cmp r2, r3
|
|
800d85a: f040 8082 bne.w 800d962 <dhcp_recv+0x16e>
|
|
for (i = 0; i < netif->hwaddr_len && i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
|
|
800d85e: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800d862: 3301 adds r3, #1
|
|
800d864: f887 3027 strb.w r3, [r7, #39] ; 0x27
|
|
800d868: 6a3b ldr r3, [r7, #32]
|
|
800d86a: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
|
|
800d86e: f897 2027 ldrb.w r2, [r7, #39] ; 0x27
|
|
800d872: 429a cmp r2, r3
|
|
800d874: d203 bcs.n 800d87e <dhcp_recv+0x8a>
|
|
800d876: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
|
|
800d87a: 2b05 cmp r3, #5
|
|
800d87c: d9e1 bls.n 800d842 <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) {
|
|
800d87e: 69bb ldr r3, [r7, #24]
|
|
800d880: 685b ldr r3, [r3, #4]
|
|
800d882: 4618 mov r0, r3
|
|
800d884: f7f6 fd6b bl 800435e <lwip_htonl>
|
|
800d888: 4602 mov r2, r0
|
|
800d88a: 69fb ldr r3, [r7, #28]
|
|
800d88c: 681b ldr r3, [r3, #0]
|
|
800d88e: 429a cmp r2, r3
|
|
800d890: d169 bne.n 800d966 <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) {
|
|
800d892: 69f9 ldr r1, [r7, #28]
|
|
800d894: 6878 ldr r0, [r7, #4]
|
|
800d896: f7ff fcd9 bl 800d24c <dhcp_parse_reply>
|
|
800d89a: 4603 mov r3, r0
|
|
800d89c: 2b00 cmp r3, #0
|
|
800d89e: d164 bne.n 800d96a <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)) {
|
|
800d8a0: 4b39 ldr r3, [pc, #228] ; (800d988 <dhcp_recv+0x194>)
|
|
800d8a2: 785b ldrb r3, [r3, #1]
|
|
800d8a4: 2b00 cmp r3, #0
|
|
800d8a6: d062 beq.n 800d96e <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;
|
|
800d8a8: 687b ldr r3, [r7, #4]
|
|
800d8aa: 685b ldr r3, [r3, #4]
|
|
800d8ac: 617b str r3, [r7, #20]
|
|
/* read DHCP message type */
|
|
msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE);
|
|
800d8ae: 4b37 ldr r3, [pc, #220] ; (800d98c <dhcp_recv+0x198>)
|
|
800d8b0: 685b ldr r3, [r3, #4]
|
|
800d8b2: 74fb strb r3, [r7, #19]
|
|
/* message type is DHCP ACK? */
|
|
if (msg_type == DHCP_ACK) {
|
|
800d8b4: 7cfb ldrb r3, [r7, #19]
|
|
800d8b6: 2b05 cmp r3, #5
|
|
800d8b8: d12a bne.n 800d910 <dhcp_recv+0x11c>
|
|
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n"));
|
|
/* in requesting state? */
|
|
if (dhcp->state == DHCP_STATE_REQUESTING) {
|
|
800d8ba: 69fb ldr r3, [r7, #28]
|
|
800d8bc: 795b ldrb r3, [r3, #5]
|
|
800d8be: 2b01 cmp r3, #1
|
|
800d8c0: d112 bne.n 800d8e8 <dhcp_recv+0xf4>
|
|
dhcp_handle_ack(netif, msg_in);
|
|
800d8c2: 6979 ldr r1, [r7, #20]
|
|
800d8c4: 6a38 ldr r0, [r7, #32]
|
|
800d8c6: f7fe fe17 bl 800c4f8 <dhcp_handle_ack>
|
|
#if DHCP_DOES_ARP_CHECK
|
|
if ((netif->flags & NETIF_FLAG_ETHARP) != 0) {
|
|
800d8ca: 6a3b ldr r3, [r7, #32]
|
|
800d8cc: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
800d8d0: f003 0308 and.w r3, r3, #8
|
|
800d8d4: 2b00 cmp r3, #0
|
|
800d8d6: d003 beq.n 800d8e0 <dhcp_recv+0xec>
|
|
/* check if the acknowledged lease address is already in use */
|
|
dhcp_check(netif);
|
|
800d8d8: 6a38 ldr r0, [r7, #32]
|
|
800d8da: f7fe fb87 bl 800bfec <dhcp_check>
|
|
800d8de: e049 b.n 800d974 <dhcp_recv+0x180>
|
|
} else {
|
|
/* bind interface to the acknowledged lease address */
|
|
dhcp_bind(netif);
|
|
800d8e0: 6a38 ldr r0, [r7, #32]
|
|
800d8e2: f7ff f867 bl 800c9b4 <dhcp_bind>
|
|
800d8e6: e045 b.n 800d974 <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) ||
|
|
800d8e8: 69fb ldr r3, [r7, #28]
|
|
800d8ea: 795b ldrb r3, [r3, #5]
|
|
800d8ec: 2b03 cmp r3, #3
|
|
800d8ee: d007 beq.n 800d900 <dhcp_recv+0x10c>
|
|
800d8f0: 69fb ldr r3, [r7, #28]
|
|
800d8f2: 795b ldrb r3, [r3, #5]
|
|
800d8f4: 2b04 cmp r3, #4
|
|
800d8f6: d003 beq.n 800d900 <dhcp_recv+0x10c>
|
|
(dhcp->state == DHCP_STATE_RENEWING)) {
|
|
800d8f8: 69fb ldr r3, [r7, #28]
|
|
800d8fa: 795b ldrb r3, [r3, #5]
|
|
else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) ||
|
|
800d8fc: 2b05 cmp r3, #5
|
|
800d8fe: d139 bne.n 800d974 <dhcp_recv+0x180>
|
|
dhcp_handle_ack(netif, msg_in);
|
|
800d900: 6979 ldr r1, [r7, #20]
|
|
800d902: 6a38 ldr r0, [r7, #32]
|
|
800d904: f7fe fdf8 bl 800c4f8 <dhcp_handle_ack>
|
|
dhcp_bind(netif);
|
|
800d908: 6a38 ldr r0, [r7, #32]
|
|
800d90a: f7ff f853 bl 800c9b4 <dhcp_bind>
|
|
800d90e: e031 b.n 800d974 <dhcp_recv+0x180>
|
|
}
|
|
}
|
|
/* received a DHCP_NAK in appropriate state? */
|
|
else if ((msg_type == DHCP_NAK) &&
|
|
800d910: 7cfb ldrb r3, [r7, #19]
|
|
800d912: 2b06 cmp r3, #6
|
|
800d914: d113 bne.n 800d93e <dhcp_recv+0x14a>
|
|
((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
|
|
800d916: 69fb ldr r3, [r7, #28]
|
|
800d918: 795b ldrb r3, [r3, #5]
|
|
else if ((msg_type == DHCP_NAK) &&
|
|
800d91a: 2b03 cmp r3, #3
|
|
800d91c: d00b beq.n 800d936 <dhcp_recv+0x142>
|
|
((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
|
|
800d91e: 69fb ldr r3, [r7, #28]
|
|
800d920: 795b ldrb r3, [r3, #5]
|
|
800d922: 2b01 cmp r3, #1
|
|
800d924: d007 beq.n 800d936 <dhcp_recv+0x142>
|
|
(dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) {
|
|
800d926: 69fb ldr r3, [r7, #28]
|
|
800d928: 795b ldrb r3, [r3, #5]
|
|
((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
|
|
800d92a: 2b04 cmp r3, #4
|
|
800d92c: d003 beq.n 800d936 <dhcp_recv+0x142>
|
|
(dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) {
|
|
800d92e: 69fb ldr r3, [r7, #28]
|
|
800d930: 795b ldrb r3, [r3, #5]
|
|
800d932: 2b05 cmp r3, #5
|
|
800d934: d103 bne.n 800d93e <dhcp_recv+0x14a>
|
|
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_NAK received\n"));
|
|
dhcp_handle_nak(netif);
|
|
800d936: 6a38 ldr r0, [r7, #32]
|
|
800d938: f7fe fb3e bl 800bfb8 <dhcp_handle_nak>
|
|
800d93c: e01a b.n 800d974 <dhcp_recv+0x180>
|
|
}
|
|
/* received a DHCP_OFFER in DHCP_STATE_SELECTING state? */
|
|
else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_STATE_SELECTING)) {
|
|
800d93e: 7cfb ldrb r3, [r7, #19]
|
|
800d940: 2b02 cmp r3, #2
|
|
800d942: d116 bne.n 800d972 <dhcp_recv+0x17e>
|
|
800d944: 69fb ldr r3, [r7, #28]
|
|
800d946: 795b ldrb r3, [r3, #5]
|
|
800d948: 2b06 cmp r3, #6
|
|
800d94a: d112 bne.n 800d972 <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);
|
|
800d94c: 6979 ldr r1, [r7, #20]
|
|
800d94e: 6a38 ldr r0, [r7, #32]
|
|
800d950: f7fe fb80 bl 800c054 <dhcp_handle_offer>
|
|
800d954: e00e b.n 800d974 <dhcp_recv+0x180>
|
|
goto free_pbuf_and_return;
|
|
800d956: bf00 nop
|
|
800d958: e00c b.n 800d974 <dhcp_recv+0x180>
|
|
goto free_pbuf_and_return;
|
|
800d95a: bf00 nop
|
|
800d95c: e00a b.n 800d974 <dhcp_recv+0x180>
|
|
goto free_pbuf_and_return;
|
|
800d95e: bf00 nop
|
|
800d960: e008 b.n 800d974 <dhcp_recv+0x180>
|
|
goto free_pbuf_and_return;
|
|
800d962: bf00 nop
|
|
800d964: e006 b.n 800d974 <dhcp_recv+0x180>
|
|
goto free_pbuf_and_return;
|
|
800d966: bf00 nop
|
|
800d968: e004 b.n 800d974 <dhcp_recv+0x180>
|
|
goto free_pbuf_and_return;
|
|
800d96a: bf00 nop
|
|
800d96c: e002 b.n 800d974 <dhcp_recv+0x180>
|
|
goto free_pbuf_and_return;
|
|
800d96e: bf00 nop
|
|
800d970: e000 b.n 800d974 <dhcp_recv+0x180>
|
|
}
|
|
|
|
free_pbuf_and_return:
|
|
800d972: bf00 nop
|
|
pbuf_free(p);
|
|
800d974: 6878 ldr r0, [r7, #4]
|
|
800d976: f7f8 f847 bl 8005a08 <pbuf_free>
|
|
}
|
|
800d97a: bf00 nop
|
|
800d97c: 3728 adds r7, #40 ; 0x28
|
|
800d97e: 46bd mov sp, r7
|
|
800d980: bd80 pop {r7, pc}
|
|
800d982: bf00 nop
|
|
800d984: 20005670 .word 0x20005670
|
|
800d988: 20008c80 .word 0x20008c80
|
|
800d98c: 20008c60 .word 0x20008c60
|
|
|
|
0800d990 <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)
|
|
{
|
|
800d990: b580 push {r7, lr}
|
|
800d992: b088 sub sp, #32
|
|
800d994: af00 add r7, sp, #0
|
|
800d996: 60f8 str r0, [r7, #12]
|
|
800d998: 60b9 str r1, [r7, #8]
|
|
800d99a: 603b str r3, [r7, #0]
|
|
800d99c: 4613 mov r3, r2
|
|
800d99e: 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;);
|
|
800d9a0: 68fb ldr r3, [r7, #12]
|
|
800d9a2: 2b00 cmp r3, #0
|
|
800d9a4: d108 bne.n 800d9b8 <dhcp_create_msg+0x28>
|
|
800d9a6: 4b5f ldr r3, [pc, #380] ; (800db24 <dhcp_create_msg+0x194>)
|
|
800d9a8: f240 7269 movw r2, #1897 ; 0x769
|
|
800d9ac: 495e ldr r1, [pc, #376] ; (800db28 <dhcp_create_msg+0x198>)
|
|
800d9ae: 485f ldr r0, [pc, #380] ; (800db2c <dhcp_create_msg+0x19c>)
|
|
800d9b0: f002 fda2 bl 80104f8 <printf>
|
|
800d9b4: 2300 movs r3, #0
|
|
800d9b6: e0b1 b.n 800db1c <dhcp_create_msg+0x18c>
|
|
LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return NULL;);
|
|
800d9b8: 68bb ldr r3, [r7, #8]
|
|
800d9ba: 2b00 cmp r3, #0
|
|
800d9bc: d108 bne.n 800d9d0 <dhcp_create_msg+0x40>
|
|
800d9be: 4b59 ldr r3, [pc, #356] ; (800db24 <dhcp_create_msg+0x194>)
|
|
800d9c0: f240 726a movw r2, #1898 ; 0x76a
|
|
800d9c4: 495a ldr r1, [pc, #360] ; (800db30 <dhcp_create_msg+0x1a0>)
|
|
800d9c6: 4859 ldr r0, [pc, #356] ; (800db2c <dhcp_create_msg+0x19c>)
|
|
800d9c8: f002 fd96 bl 80104f8 <printf>
|
|
800d9cc: 2300 movs r3, #0
|
|
800d9ce: e0a5 b.n 800db1c <dhcp_create_msg+0x18c>
|
|
p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM);
|
|
800d9d0: f44f 7220 mov.w r2, #640 ; 0x280
|
|
800d9d4: f44f 719a mov.w r1, #308 ; 0x134
|
|
800d9d8: 2036 movs r0, #54 ; 0x36
|
|
800d9da: f7f7 fd31 bl 8005440 <pbuf_alloc>
|
|
800d9de: 61b8 str r0, [r7, #24]
|
|
if (p_out == NULL) {
|
|
800d9e0: 69bb ldr r3, [r7, #24]
|
|
800d9e2: 2b00 cmp r3, #0
|
|
800d9e4: d101 bne.n 800d9ea <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;
|
|
800d9e6: 2300 movs r3, #0
|
|
800d9e8: e098 b.n 800db1c <dhcp_create_msg+0x18c>
|
|
}
|
|
LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg",
|
|
800d9ea: 69bb ldr r3, [r7, #24]
|
|
800d9ec: 895b ldrh r3, [r3, #10]
|
|
800d9ee: f5b3 7f9a cmp.w r3, #308 ; 0x134
|
|
800d9f2: d206 bcs.n 800da02 <dhcp_create_msg+0x72>
|
|
800d9f4: 4b4b ldr r3, [pc, #300] ; (800db24 <dhcp_create_msg+0x194>)
|
|
800d9f6: f240 7271 movw r2, #1905 ; 0x771
|
|
800d9fa: 494e ldr r1, [pc, #312] ; (800db34 <dhcp_create_msg+0x1a4>)
|
|
800d9fc: 484b ldr r0, [pc, #300] ; (800db2c <dhcp_create_msg+0x19c>)
|
|
800d9fe: f002 fd7b bl 80104f8 <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)) {
|
|
800da02: 79fb ldrb r3, [r7, #7]
|
|
800da04: 2b03 cmp r3, #3
|
|
800da06: d103 bne.n 800da10 <dhcp_create_msg+0x80>
|
|
800da08: 68bb ldr r3, [r7, #8]
|
|
800da0a: 795b ldrb r3, [r3, #5]
|
|
800da0c: 2b03 cmp r3, #3
|
|
800da0e: d10d bne.n 800da2c <dhcp_create_msg+0x9c>
|
|
/* reuse transaction identifier in retransmissions */
|
|
if (dhcp->tries == 0) {
|
|
800da10: 68bb ldr r3, [r7, #8]
|
|
800da12: 799b ldrb r3, [r3, #6]
|
|
800da14: 2b00 cmp r3, #0
|
|
800da16: d105 bne.n 800da24 <dhcp_create_msg+0x94>
|
|
#if DHCP_CREATE_RAND_XID && defined(LWIP_RAND)
|
|
xid = LWIP_RAND();
|
|
800da18: f002 fd80 bl 801051c <rand>
|
|
800da1c: 4603 mov r3, r0
|
|
800da1e: 461a mov r2, r3
|
|
800da20: 4b45 ldr r3, [pc, #276] ; (800db38 <dhcp_create_msg+0x1a8>)
|
|
800da22: 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;
|
|
800da24: 4b44 ldr r3, [pc, #272] ; (800db38 <dhcp_create_msg+0x1a8>)
|
|
800da26: 681a ldr r2, [r3, #0]
|
|
800da28: 68bb ldr r3, [r7, #8]
|
|
800da2a: 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;
|
|
800da2c: 69bb ldr r3, [r7, #24]
|
|
800da2e: 685b ldr r3, [r3, #4]
|
|
800da30: 617b str r3, [r7, #20]
|
|
memset(msg_out, 0, sizeof(struct dhcp_msg));
|
|
800da32: f44f 729a mov.w r2, #308 ; 0x134
|
|
800da36: 2100 movs r1, #0
|
|
800da38: 6978 ldr r0, [r7, #20]
|
|
800da3a: f002 fd55 bl 80104e8 <memset>
|
|
|
|
msg_out->op = DHCP_BOOTREQUEST;
|
|
800da3e: 697b ldr r3, [r7, #20]
|
|
800da40: 2201 movs r2, #1
|
|
800da42: 701a strb r2, [r3, #0]
|
|
/* @todo: make link layer independent */
|
|
msg_out->htype = LWIP_IANA_HWTYPE_ETHERNET;
|
|
800da44: 697b ldr r3, [r7, #20]
|
|
800da46: 2201 movs r2, #1
|
|
800da48: 705a strb r2, [r3, #1]
|
|
msg_out->hlen = netif->hwaddr_len;
|
|
800da4a: 68fb ldr r3, [r7, #12]
|
|
800da4c: f893 2030 ldrb.w r2, [r3, #48] ; 0x30
|
|
800da50: 697b ldr r3, [r7, #20]
|
|
800da52: 709a strb r2, [r3, #2]
|
|
msg_out->xid = lwip_htonl(dhcp->xid);
|
|
800da54: 68bb ldr r3, [r7, #8]
|
|
800da56: 681b ldr r3, [r3, #0]
|
|
800da58: 4618 mov r0, r3
|
|
800da5a: f7f6 fc80 bl 800435e <lwip_htonl>
|
|
800da5e: 4602 mov r2, r0
|
|
800da60: 697b ldr r3, [r7, #20]
|
|
800da62: 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) ||
|
|
800da64: 79fb ldrb r3, [r7, #7]
|
|
800da66: 2b08 cmp r3, #8
|
|
800da68: d010 beq.n 800da8c <dhcp_create_msg+0xfc>
|
|
800da6a: 79fb ldrb r3, [r7, #7]
|
|
800da6c: 2b04 cmp r3, #4
|
|
800da6e: d00d beq.n 800da8c <dhcp_create_msg+0xfc>
|
|
800da70: 79fb ldrb r3, [r7, #7]
|
|
800da72: 2b07 cmp r3, #7
|
|
800da74: d00a beq.n 800da8c <dhcp_create_msg+0xfc>
|
|
800da76: 79fb ldrb r3, [r7, #7]
|
|
800da78: 2b03 cmp r3, #3
|
|
800da7a: d10c bne.n 800da96 <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))) {
|
|
800da7c: 68bb ldr r3, [r7, #8]
|
|
800da7e: 795b ldrb r3, [r3, #5]
|
|
((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */
|
|
800da80: 2b05 cmp r3, #5
|
|
800da82: d003 beq.n 800da8c <dhcp_create_msg+0xfc>
|
|
((dhcp->state == DHCP_STATE_RENEWING) || dhcp->state == DHCP_STATE_REBINDING))) {
|
|
800da84: 68bb ldr r3, [r7, #8]
|
|
800da86: 795b ldrb r3, [r3, #5]
|
|
800da88: 2b04 cmp r3, #4
|
|
800da8a: d104 bne.n 800da96 <dhcp_create_msg+0x106>
|
|
ip4_addr_copy(msg_out->ciaddr, *netif_ip4_addr(netif));
|
|
800da8c: 68fb ldr r3, [r7, #12]
|
|
800da8e: 3304 adds r3, #4
|
|
800da90: 681a ldr r2, [r3, #0]
|
|
800da92: 697b ldr r3, [r7, #20]
|
|
800da94: 60da str r2, [r3, #12]
|
|
}
|
|
for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
|
|
800da96: 2300 movs r3, #0
|
|
800da98: 83fb strh r3, [r7, #30]
|
|
800da9a: e00c b.n 800dab6 <dhcp_create_msg+0x126>
|
|
/* copy netif hardware address (padded with zeroes through memset already) */
|
|
msg_out->chaddr[i] = netif->hwaddr[i];
|
|
800da9c: 8bfa ldrh r2, [r7, #30]
|
|
800da9e: 8bfb ldrh r3, [r7, #30]
|
|
800daa0: 68f9 ldr r1, [r7, #12]
|
|
800daa2: 440a add r2, r1
|
|
800daa4: f892 102a ldrb.w r1, [r2, #42] ; 0x2a
|
|
800daa8: 697a ldr r2, [r7, #20]
|
|
800daaa: 4413 add r3, r2
|
|
800daac: 460a mov r2, r1
|
|
800daae: 771a strb r2, [r3, #28]
|
|
for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
|
|
800dab0: 8bfb ldrh r3, [r7, #30]
|
|
800dab2: 3301 adds r3, #1
|
|
800dab4: 83fb strh r3, [r7, #30]
|
|
800dab6: 8bfb ldrh r3, [r7, #30]
|
|
800dab8: 2b05 cmp r3, #5
|
|
800daba: d9ef bls.n 800da9c <dhcp_create_msg+0x10c>
|
|
}
|
|
msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE);
|
|
800dabc: 697b ldr r3, [r7, #20]
|
|
800dabe: 2200 movs r2, #0
|
|
800dac0: f042 0263 orr.w r2, r2, #99 ; 0x63
|
|
800dac4: f883 20ec strb.w r2, [r3, #236] ; 0xec
|
|
800dac8: 2200 movs r2, #0
|
|
800daca: f062 027d orn r2, r2, #125 ; 0x7d
|
|
800dace: f883 20ed strb.w r2, [r3, #237] ; 0xed
|
|
800dad2: 2200 movs r2, #0
|
|
800dad4: f042 0253 orr.w r2, r2, #83 ; 0x53
|
|
800dad8: f883 20ee strb.w r2, [r3, #238] ; 0xee
|
|
800dadc: 2200 movs r2, #0
|
|
800dade: f042 0263 orr.w r2, r2, #99 ; 0x63
|
|
800dae2: 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);
|
|
800dae6: 697b ldr r3, [r7, #20]
|
|
800dae8: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800daec: 2301 movs r3, #1
|
|
800daee: 2235 movs r2, #53 ; 0x35
|
|
800daf0: 2000 movs r0, #0
|
|
800daf2: f7ff fadb bl 800d0ac <dhcp_option>
|
|
800daf6: 4603 mov r3, r0
|
|
800daf8: 827b strh r3, [r7, #18]
|
|
options_out_len_loc = dhcp_option_byte(options_out_len_loc, msg_out->options, message_type);
|
|
800dafa: 697b ldr r3, [r7, #20]
|
|
800dafc: f103 01f0 add.w r1, r3, #240 ; 0xf0
|
|
800db00: 79fa ldrb r2, [r7, #7]
|
|
800db02: 8a7b ldrh r3, [r7, #18]
|
|
800db04: 4618 mov r0, r3
|
|
800db06: f7ff fb05 bl 800d114 <dhcp_option_byte>
|
|
800db0a: 4603 mov r3, r0
|
|
800db0c: 827b strh r3, [r7, #18]
|
|
if (options_out_len) {
|
|
800db0e: 683b ldr r3, [r7, #0]
|
|
800db10: 2b00 cmp r3, #0
|
|
800db12: d002 beq.n 800db1a <dhcp_create_msg+0x18a>
|
|
*options_out_len = options_out_len_loc;
|
|
800db14: 683b ldr r3, [r7, #0]
|
|
800db16: 8a7a ldrh r2, [r7, #18]
|
|
800db18: 801a strh r2, [r3, #0]
|
|
}
|
|
return p_out;
|
|
800db1a: 69bb ldr r3, [r7, #24]
|
|
}
|
|
800db1c: 4618 mov r0, r3
|
|
800db1e: 3720 adds r7, #32
|
|
800db20: 46bd mov sp, r7
|
|
800db22: bd80 pop {r7, pc}
|
|
800db24: 0801736c .word 0x0801736c
|
|
800db28: 0801768c .word 0x0801768c
|
|
800db2c: 080173cc .word 0x080173cc
|
|
800db30: 080176ac .word 0x080176ac
|
|
800db34: 080176cc .word 0x080176cc
|
|
800db38: 20008c90 .word 0x20008c90
|
|
|
|
0800db3c <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)
|
|
{
|
|
800db3c: b580 push {r7, lr}
|
|
800db3e: b084 sub sp, #16
|
|
800db40: af00 add r7, sp, #0
|
|
800db42: 4603 mov r3, r0
|
|
800db44: 60b9 str r1, [r7, #8]
|
|
800db46: 607a str r2, [r7, #4]
|
|
800db48: 81fb strh r3, [r7, #14]
|
|
options[options_out_len++] = DHCP_OPTION_END;
|
|
800db4a: 89fb ldrh r3, [r7, #14]
|
|
800db4c: 1c5a adds r2, r3, #1
|
|
800db4e: 81fa strh r2, [r7, #14]
|
|
800db50: 461a mov r2, r3
|
|
800db52: 68bb ldr r3, [r7, #8]
|
|
800db54: 4413 add r3, r2
|
|
800db56: 22ff movs r2, #255 ; 0xff
|
|
800db58: 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)) &&
|
|
800db5a: e007 b.n 800db6c <dhcp_option_trailer+0x30>
|
|
(options_out_len < DHCP_OPTIONS_LEN)) {
|
|
/* add a fill/padding byte */
|
|
options[options_out_len++] = 0;
|
|
800db5c: 89fb ldrh r3, [r7, #14]
|
|
800db5e: 1c5a adds r2, r3, #1
|
|
800db60: 81fa strh r2, [r7, #14]
|
|
800db62: 461a mov r2, r3
|
|
800db64: 68bb ldr r3, [r7, #8]
|
|
800db66: 4413 add r3, r2
|
|
800db68: 2200 movs r2, #0
|
|
800db6a: 701a strb r2, [r3, #0]
|
|
while (((options_out_len < DHCP_MIN_OPTIONS_LEN) || (options_out_len & 3)) &&
|
|
800db6c: 89fb ldrh r3, [r7, #14]
|
|
800db6e: 2b43 cmp r3, #67 ; 0x43
|
|
800db70: d904 bls.n 800db7c <dhcp_option_trailer+0x40>
|
|
800db72: 89fb ldrh r3, [r7, #14]
|
|
800db74: f003 0303 and.w r3, r3, #3
|
|
800db78: 2b00 cmp r3, #0
|
|
800db7a: d002 beq.n 800db82 <dhcp_option_trailer+0x46>
|
|
800db7c: 89fb ldrh r3, [r7, #14]
|
|
800db7e: 2b43 cmp r3, #67 ; 0x43
|
|
800db80: d9ec bls.n 800db5c <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));
|
|
800db82: 89fb ldrh r3, [r7, #14]
|
|
800db84: 33f0 adds r3, #240 ; 0xf0
|
|
800db86: b29b uxth r3, r3
|
|
800db88: 4619 mov r1, r3
|
|
800db8a: 6878 ldr r0, [r7, #4]
|
|
800db8c: f7f7 fdb6 bl 80056fc <pbuf_realloc>
|
|
}
|
|
800db90: bf00 nop
|
|
800db92: 3710 adds r7, #16
|
|
800db94: 46bd mov sp, r7
|
|
800db96: bd80 pop {r7, pc}
|
|
|
|
0800db98 <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)
|
|
{
|
|
800db98: b480 push {r7}
|
|
800db9a: b085 sub sp, #20
|
|
800db9c: af00 add r7, sp, #0
|
|
800db9e: 6078 str r0, [r7, #4]
|
|
if ((netif != NULL) && (netif_dhcp_data(netif) != NULL)) {
|
|
800dba0: 687b ldr r3, [r7, #4]
|
|
800dba2: 2b00 cmp r3, #0
|
|
800dba4: d017 beq.n 800dbd6 <dhcp_supplied_address+0x3e>
|
|
800dba6: 687b ldr r3, [r7, #4]
|
|
800dba8: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800dbaa: 2b00 cmp r3, #0
|
|
800dbac: d013 beq.n 800dbd6 <dhcp_supplied_address+0x3e>
|
|
struct dhcp *dhcp = netif_dhcp_data(netif);
|
|
800dbae: 687b ldr r3, [r7, #4]
|
|
800dbb0: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
800dbb2: 60fb str r3, [r7, #12]
|
|
return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) ||
|
|
800dbb4: 68fb ldr r3, [r7, #12]
|
|
800dbb6: 795b ldrb r3, [r3, #5]
|
|
800dbb8: 2b0a cmp r3, #10
|
|
800dbba: d007 beq.n 800dbcc <dhcp_supplied_address+0x34>
|
|
800dbbc: 68fb ldr r3, [r7, #12]
|
|
800dbbe: 795b ldrb r3, [r3, #5]
|
|
800dbc0: 2b05 cmp r3, #5
|
|
800dbc2: d003 beq.n 800dbcc <dhcp_supplied_address+0x34>
|
|
(dhcp->state == DHCP_STATE_REBINDING);
|
|
800dbc4: 68fb ldr r3, [r7, #12]
|
|
800dbc6: 795b ldrb r3, [r3, #5]
|
|
return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) ||
|
|
800dbc8: 2b04 cmp r3, #4
|
|
800dbca: d101 bne.n 800dbd0 <dhcp_supplied_address+0x38>
|
|
800dbcc: 2301 movs r3, #1
|
|
800dbce: e000 b.n 800dbd2 <dhcp_supplied_address+0x3a>
|
|
800dbd0: 2300 movs r3, #0
|
|
800dbd2: b2db uxtb r3, r3
|
|
800dbd4: e000 b.n 800dbd8 <dhcp_supplied_address+0x40>
|
|
}
|
|
return 0;
|
|
800dbd6: 2300 movs r3, #0
|
|
}
|
|
800dbd8: 4618 mov r0, r3
|
|
800dbda: 3714 adds r7, #20
|
|
800dbdc: 46bd mov sp, r7
|
|
800dbde: f85d 7b04 ldr.w r7, [sp], #4
|
|
800dbe2: 4770 bx lr
|
|
|
|
0800dbe4 <etharp_free_entry>:
|
|
#endif /* ARP_QUEUEING */
|
|
|
|
/** Clean up ARP table entries */
|
|
static void
|
|
etharp_free_entry(int i)
|
|
{
|
|
800dbe4: b580 push {r7, lr}
|
|
800dbe6: b082 sub sp, #8
|
|
800dbe8: af00 add r7, sp, #0
|
|
800dbea: 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) {
|
|
800dbec: 4915 ldr r1, [pc, #84] ; (800dc44 <etharp_free_entry+0x60>)
|
|
800dbee: 687a ldr r2, [r7, #4]
|
|
800dbf0: 4613 mov r3, r2
|
|
800dbf2: 005b lsls r3, r3, #1
|
|
800dbf4: 4413 add r3, r2
|
|
800dbf6: 00db lsls r3, r3, #3
|
|
800dbf8: 440b add r3, r1
|
|
800dbfa: 681b ldr r3, [r3, #0]
|
|
800dbfc: 2b00 cmp r3, #0
|
|
800dbfe: d013 beq.n 800dc28 <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);
|
|
800dc00: 4910 ldr r1, [pc, #64] ; (800dc44 <etharp_free_entry+0x60>)
|
|
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: 681b ldr r3, [r3, #0]
|
|
800dc10: 4618 mov r0, r3
|
|
800dc12: f7f7 fef9 bl 8005a08 <pbuf_free>
|
|
arp_table[i].q = NULL;
|
|
800dc16: 490b ldr r1, [pc, #44] ; (800dc44 <etharp_free_entry+0x60>)
|
|
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: 2200 movs r2, #0
|
|
800dc26: 601a str r2, [r3, #0]
|
|
}
|
|
/* recycle entry for re-use */
|
|
arp_table[i].state = ETHARP_STATE_EMPTY;
|
|
800dc28: 4906 ldr r1, [pc, #24] ; (800dc44 <etharp_free_entry+0x60>)
|
|
800dc2a: 687a ldr r2, [r7, #4]
|
|
800dc2c: 4613 mov r3, r2
|
|
800dc2e: 005b lsls r3, r3, #1
|
|
800dc30: 4413 add r3, r2
|
|
800dc32: 00db lsls r3, r3, #3
|
|
800dc34: 440b add r3, r1
|
|
800dc36: 3314 adds r3, #20
|
|
800dc38: 2200 movs r2, #0
|
|
800dc3a: 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 */
|
|
}
|
|
800dc3c: bf00 nop
|
|
800dc3e: 3708 adds r7, #8
|
|
800dc40: 46bd mov sp, r7
|
|
800dc42: bd80 pop {r7, pc}
|
|
800dc44: 20008c94 .word 0x20008c94
|
|
|
|
0800dc48 <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)
|
|
{
|
|
800dc48: b580 push {r7, lr}
|
|
800dc4a: b082 sub sp, #8
|
|
800dc4c: 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) {
|
|
800dc4e: 2300 movs r3, #0
|
|
800dc50: 607b str r3, [r7, #4]
|
|
800dc52: e096 b.n 800dd82 <etharp_tmr+0x13a>
|
|
u8_t state = arp_table[i].state;
|
|
800dc54: 494f ldr r1, [pc, #316] ; (800dd94 <etharp_tmr+0x14c>)
|
|
800dc56: 687a ldr r2, [r7, #4]
|
|
800dc58: 4613 mov r3, r2
|
|
800dc5a: 005b lsls r3, r3, #1
|
|
800dc5c: 4413 add r3, r2
|
|
800dc5e: 00db lsls r3, r3, #3
|
|
800dc60: 440b add r3, r1
|
|
800dc62: 3314 adds r3, #20
|
|
800dc64: 781b ldrb r3, [r3, #0]
|
|
800dc66: 70fb strb r3, [r7, #3]
|
|
if (state != ETHARP_STATE_EMPTY
|
|
800dc68: 78fb ldrb r3, [r7, #3]
|
|
800dc6a: 2b00 cmp r3, #0
|
|
800dc6c: f000 8086 beq.w 800dd7c <etharp_tmr+0x134>
|
|
#if ETHARP_SUPPORT_STATIC_ENTRIES
|
|
&& (state != ETHARP_STATE_STATIC)
|
|
#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
|
|
) {
|
|
arp_table[i].ctime++;
|
|
800dc70: 4948 ldr r1, [pc, #288] ; (800dd94 <etharp_tmr+0x14c>)
|
|
800dc72: 687a ldr r2, [r7, #4]
|
|
800dc74: 4613 mov r3, r2
|
|
800dc76: 005b lsls r3, r3, #1
|
|
800dc78: 4413 add r3, r2
|
|
800dc7a: 00db lsls r3, r3, #3
|
|
800dc7c: 440b add r3, r1
|
|
800dc7e: 3312 adds r3, #18
|
|
800dc80: 881b ldrh r3, [r3, #0]
|
|
800dc82: 3301 adds r3, #1
|
|
800dc84: b298 uxth r0, r3
|
|
800dc86: 4943 ldr r1, [pc, #268] ; (800dd94 <etharp_tmr+0x14c>)
|
|
800dc88: 687a ldr r2, [r7, #4]
|
|
800dc8a: 4613 mov r3, r2
|
|
800dc8c: 005b lsls r3, r3, #1
|
|
800dc8e: 4413 add r3, r2
|
|
800dc90: 00db lsls r3, r3, #3
|
|
800dc92: 440b add r3, r1
|
|
800dc94: 3312 adds r3, #18
|
|
800dc96: 4602 mov r2, r0
|
|
800dc98: 801a strh r2, [r3, #0]
|
|
if ((arp_table[i].ctime >= ARP_MAXAGE) ||
|
|
800dc9a: 493e ldr r1, [pc, #248] ; (800dd94 <etharp_tmr+0x14c>)
|
|
800dc9c: 687a ldr r2, [r7, #4]
|
|
800dc9e: 4613 mov r3, r2
|
|
800dca0: 005b lsls r3, r3, #1
|
|
800dca2: 4413 add r3, r2
|
|
800dca4: 00db lsls r3, r3, #3
|
|
800dca6: 440b add r3, r1
|
|
800dca8: 3312 adds r3, #18
|
|
800dcaa: 881b ldrh r3, [r3, #0]
|
|
800dcac: f5b3 7f96 cmp.w r3, #300 ; 0x12c
|
|
800dcb0: d215 bcs.n 800dcde <etharp_tmr+0x96>
|
|
((arp_table[i].state == ETHARP_STATE_PENDING) &&
|
|
800dcb2: 4938 ldr r1, [pc, #224] ; (800dd94 <etharp_tmr+0x14c>)
|
|
800dcb4: 687a ldr r2, [r7, #4]
|
|
800dcb6: 4613 mov r3, r2
|
|
800dcb8: 005b lsls r3, r3, #1
|
|
800dcba: 4413 add r3, r2
|
|
800dcbc: 00db lsls r3, r3, #3
|
|
800dcbe: 440b add r3, r1
|
|
800dcc0: 3314 adds r3, #20
|
|
800dcc2: 781b ldrb r3, [r3, #0]
|
|
if ((arp_table[i].ctime >= ARP_MAXAGE) ||
|
|
800dcc4: 2b01 cmp r3, #1
|
|
800dcc6: d10e bne.n 800dce6 <etharp_tmr+0x9e>
|
|
(arp_table[i].ctime >= ARP_MAXPENDING))) {
|
|
800dcc8: 4932 ldr r1, [pc, #200] ; (800dd94 <etharp_tmr+0x14c>)
|
|
800dcca: 687a ldr r2, [r7, #4]
|
|
800dccc: 4613 mov r3, r2
|
|
800dcce: 005b lsls r3, r3, #1
|
|
800dcd0: 4413 add r3, r2
|
|
800dcd2: 00db lsls r3, r3, #3
|
|
800dcd4: 440b add r3, r1
|
|
800dcd6: 3312 adds r3, #18
|
|
800dcd8: 881b ldrh r3, [r3, #0]
|
|
((arp_table[i].state == ETHARP_STATE_PENDING) &&
|
|
800dcda: 2b04 cmp r3, #4
|
|
800dcdc: d903 bls.n 800dce6 <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);
|
|
800dcde: 6878 ldr r0, [r7, #4]
|
|
800dce0: f7ff ff80 bl 800dbe4 <etharp_free_entry>
|
|
800dce4: e04a b.n 800dd7c <etharp_tmr+0x134>
|
|
} else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_1) {
|
|
800dce6: 492b ldr r1, [pc, #172] ; (800dd94 <etharp_tmr+0x14c>)
|
|
800dce8: 687a ldr r2, [r7, #4]
|
|
800dcea: 4613 mov r3, r2
|
|
800dcec: 005b lsls r3, r3, #1
|
|
800dcee: 4413 add r3, r2
|
|
800dcf0: 00db lsls r3, r3, #3
|
|
800dcf2: 440b add r3, r1
|
|
800dcf4: 3314 adds r3, #20
|
|
800dcf6: 781b ldrb r3, [r3, #0]
|
|
800dcf8: 2b03 cmp r3, #3
|
|
800dcfa: d10a bne.n 800dd12 <etharp_tmr+0xca>
|
|
/* Don't send more than one request every 2 seconds. */
|
|
arp_table[i].state = ETHARP_STATE_STABLE_REREQUESTING_2;
|
|
800dcfc: 4925 ldr r1, [pc, #148] ; (800dd94 <etharp_tmr+0x14c>)
|
|
800dcfe: 687a ldr r2, [r7, #4]
|
|
800dd00: 4613 mov r3, r2
|
|
800dd02: 005b lsls r3, r3, #1
|
|
800dd04: 4413 add r3, r2
|
|
800dd06: 00db lsls r3, r3, #3
|
|
800dd08: 440b add r3, r1
|
|
800dd0a: 3314 adds r3, #20
|
|
800dd0c: 2204 movs r2, #4
|
|
800dd0e: 701a strb r2, [r3, #0]
|
|
800dd10: e034 b.n 800dd7c <etharp_tmr+0x134>
|
|
} else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_2) {
|
|
800dd12: 4920 ldr r1, [pc, #128] ; (800dd94 <etharp_tmr+0x14c>)
|
|
800dd14: 687a ldr r2, [r7, #4]
|
|
800dd16: 4613 mov r3, r2
|
|
800dd18: 005b lsls r3, r3, #1
|
|
800dd1a: 4413 add r3, r2
|
|
800dd1c: 00db lsls r3, r3, #3
|
|
800dd1e: 440b add r3, r1
|
|
800dd20: 3314 adds r3, #20
|
|
800dd22: 781b ldrb r3, [r3, #0]
|
|
800dd24: 2b04 cmp r3, #4
|
|
800dd26: d10a bne.n 800dd3e <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;
|
|
800dd28: 491a ldr r1, [pc, #104] ; (800dd94 <etharp_tmr+0x14c>)
|
|
800dd2a: 687a ldr r2, [r7, #4]
|
|
800dd2c: 4613 mov r3, r2
|
|
800dd2e: 005b lsls r3, r3, #1
|
|
800dd30: 4413 add r3, r2
|
|
800dd32: 00db lsls r3, r3, #3
|
|
800dd34: 440b add r3, r1
|
|
800dd36: 3314 adds r3, #20
|
|
800dd38: 2202 movs r2, #2
|
|
800dd3a: 701a strb r2, [r3, #0]
|
|
800dd3c: e01e b.n 800dd7c <etharp_tmr+0x134>
|
|
} else if (arp_table[i].state == ETHARP_STATE_PENDING) {
|
|
800dd3e: 4915 ldr r1, [pc, #84] ; (800dd94 <etharp_tmr+0x14c>)
|
|
800dd40: 687a ldr r2, [r7, #4]
|
|
800dd42: 4613 mov r3, r2
|
|
800dd44: 005b lsls r3, r3, #1
|
|
800dd46: 4413 add r3, r2
|
|
800dd48: 00db lsls r3, r3, #3
|
|
800dd4a: 440b add r3, r1
|
|
800dd4c: 3314 adds r3, #20
|
|
800dd4e: 781b ldrb r3, [r3, #0]
|
|
800dd50: 2b01 cmp r3, #1
|
|
800dd52: d113 bne.n 800dd7c <etharp_tmr+0x134>
|
|
/* still pending, resend an ARP query */
|
|
etharp_request(arp_table[i].netif, &arp_table[i].ipaddr);
|
|
800dd54: 490f ldr r1, [pc, #60] ; (800dd94 <etharp_tmr+0x14c>)
|
|
800dd56: 687a ldr r2, [r7, #4]
|
|
800dd58: 4613 mov r3, r2
|
|
800dd5a: 005b lsls r3, r3, #1
|
|
800dd5c: 4413 add r3, r2
|
|
800dd5e: 00db lsls r3, r3, #3
|
|
800dd60: 440b add r3, r1
|
|
800dd62: 3308 adds r3, #8
|
|
800dd64: 6818 ldr r0, [r3, #0]
|
|
800dd66: 687a ldr r2, [r7, #4]
|
|
800dd68: 4613 mov r3, r2
|
|
800dd6a: 005b lsls r3, r3, #1
|
|
800dd6c: 4413 add r3, r2
|
|
800dd6e: 00db lsls r3, r3, #3
|
|
800dd70: 4a08 ldr r2, [pc, #32] ; (800dd94 <etharp_tmr+0x14c>)
|
|
800dd72: 4413 add r3, r2
|
|
800dd74: 3304 adds r3, #4
|
|
800dd76: 4619 mov r1, r3
|
|
800dd78: f000 fe72 bl 800ea60 <etharp_request>
|
|
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
|
|
800dd7c: 687b ldr r3, [r7, #4]
|
|
800dd7e: 3301 adds r3, #1
|
|
800dd80: 607b str r3, [r7, #4]
|
|
800dd82: 687b ldr r3, [r7, #4]
|
|
800dd84: 2b09 cmp r3, #9
|
|
800dd86: f77f af65 ble.w 800dc54 <etharp_tmr+0xc>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
800dd8a: bf00 nop
|
|
800dd8c: bf00 nop
|
|
800dd8e: 3708 adds r7, #8
|
|
800dd90: 46bd mov sp, r7
|
|
800dd92: bd80 pop {r7, pc}
|
|
800dd94: 20008c94 .word 0x20008c94
|
|
|
|
0800dd98 <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)
|
|
{
|
|
800dd98: b580 push {r7, lr}
|
|
800dd9a: b08a sub sp, #40 ; 0x28
|
|
800dd9c: af00 add r7, sp, #0
|
|
800dd9e: 60f8 str r0, [r7, #12]
|
|
800dda0: 460b mov r3, r1
|
|
800dda2: 607a str r2, [r7, #4]
|
|
800dda4: 72fb strb r3, [r7, #11]
|
|
s16_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE;
|
|
800dda6: 230a movs r3, #10
|
|
800dda8: 84fb strh r3, [r7, #38] ; 0x26
|
|
800ddaa: 230a movs r3, #10
|
|
800ddac: 84bb strh r3, [r7, #36] ; 0x24
|
|
s16_t empty = ARP_TABLE_SIZE;
|
|
800ddae: 230a movs r3, #10
|
|
800ddb0: 847b strh r3, [r7, #34] ; 0x22
|
|
s16_t i = 0;
|
|
800ddb2: 2300 movs r3, #0
|
|
800ddb4: 843b strh r3, [r7, #32]
|
|
/* oldest entry with packets on queue */
|
|
s16_t old_queue = ARP_TABLE_SIZE;
|
|
800ddb6: 230a movs r3, #10
|
|
800ddb8: 83fb strh r3, [r7, #30]
|
|
/* its age */
|
|
u16_t age_queue = 0, age_pending = 0, age_stable = 0;
|
|
800ddba: 2300 movs r3, #0
|
|
800ddbc: 83bb strh r3, [r7, #28]
|
|
800ddbe: 2300 movs r3, #0
|
|
800ddc0: 837b strh r3, [r7, #26]
|
|
800ddc2: 2300 movs r3, #0
|
|
800ddc4: 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) {
|
|
800ddc6: 2300 movs r3, #0
|
|
800ddc8: 843b strh r3, [r7, #32]
|
|
800ddca: e0ae b.n 800df2a <etharp_find_entry+0x192>
|
|
u8_t state = arp_table[i].state;
|
|
800ddcc: f9b7 2020 ldrsh.w r2, [r7, #32]
|
|
800ddd0: 49a6 ldr r1, [pc, #664] ; (800e06c <etharp_find_entry+0x2d4>)
|
|
800ddd2: 4613 mov r3, r2
|
|
800ddd4: 005b lsls r3, r3, #1
|
|
800ddd6: 4413 add r3, r2
|
|
800ddd8: 00db lsls r3, r3, #3
|
|
800ddda: 440b add r3, r1
|
|
800dddc: 3314 adds r3, #20
|
|
800ddde: 781b ldrb r3, [r3, #0]
|
|
800dde0: 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)) {
|
|
800dde2: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22
|
|
800dde6: 2b0a cmp r3, #10
|
|
800dde8: d105 bne.n 800ddf6 <etharp_find_entry+0x5e>
|
|
800ddea: 7dfb ldrb r3, [r7, #23]
|
|
800ddec: 2b00 cmp r3, #0
|
|
800ddee: d102 bne.n 800ddf6 <etharp_find_entry+0x5e>
|
|
LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %d\n", (int)i));
|
|
/* remember first empty entry */
|
|
empty = i;
|
|
800ddf0: 8c3b ldrh r3, [r7, #32]
|
|
800ddf2: 847b strh r3, [r7, #34] ; 0x22
|
|
800ddf4: e095 b.n 800df22 <etharp_find_entry+0x18a>
|
|
} else if (state != ETHARP_STATE_EMPTY) {
|
|
800ddf6: 7dfb ldrb r3, [r7, #23]
|
|
800ddf8: 2b00 cmp r3, #0
|
|
800ddfa: f000 8092 beq.w 800df22 <etharp_find_entry+0x18a>
|
|
LWIP_ASSERT("state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE",
|
|
800ddfe: 7dfb ldrb r3, [r7, #23]
|
|
800de00: 2b01 cmp r3, #1
|
|
800de02: d009 beq.n 800de18 <etharp_find_entry+0x80>
|
|
800de04: 7dfb ldrb r3, [r7, #23]
|
|
800de06: 2b01 cmp r3, #1
|
|
800de08: d806 bhi.n 800de18 <etharp_find_entry+0x80>
|
|
800de0a: 4b99 ldr r3, [pc, #612] ; (800e070 <etharp_find_entry+0x2d8>)
|
|
800de0c: f240 1223 movw r2, #291 ; 0x123
|
|
800de10: 4998 ldr r1, [pc, #608] ; (800e074 <etharp_find_entry+0x2dc>)
|
|
800de12: 4899 ldr r0, [pc, #612] ; (800e078 <etharp_find_entry+0x2e0>)
|
|
800de14: f002 fb70 bl 80104f8 <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)
|
|
800de18: 68fb ldr r3, [r7, #12]
|
|
800de1a: 2b00 cmp r3, #0
|
|
800de1c: d020 beq.n 800de60 <etharp_find_entry+0xc8>
|
|
800de1e: 68fb ldr r3, [r7, #12]
|
|
800de20: 6819 ldr r1, [r3, #0]
|
|
800de22: f9b7 2020 ldrsh.w r2, [r7, #32]
|
|
800de26: 4891 ldr r0, [pc, #580] ; (800e06c <etharp_find_entry+0x2d4>)
|
|
800de28: 4613 mov r3, r2
|
|
800de2a: 005b lsls r3, r3, #1
|
|
800de2c: 4413 add r3, r2
|
|
800de2e: 00db lsls r3, r3, #3
|
|
800de30: 4403 add r3, r0
|
|
800de32: 3304 adds r3, #4
|
|
800de34: 681b ldr r3, [r3, #0]
|
|
800de36: 4299 cmp r1, r3
|
|
800de38: d112 bne.n 800de60 <etharp_find_entry+0xc8>
|
|
#if ETHARP_TABLE_MATCH_NETIF
|
|
&& ((netif == NULL) || (netif == arp_table[i].netif))
|
|
800de3a: 687b ldr r3, [r7, #4]
|
|
800de3c: 2b00 cmp r3, #0
|
|
800de3e: d00c beq.n 800de5a <etharp_find_entry+0xc2>
|
|
800de40: f9b7 2020 ldrsh.w r2, [r7, #32]
|
|
800de44: 4989 ldr r1, [pc, #548] ; (800e06c <etharp_find_entry+0x2d4>)
|
|
800de46: 4613 mov r3, r2
|
|
800de48: 005b lsls r3, r3, #1
|
|
800de4a: 4413 add r3, r2
|
|
800de4c: 00db lsls r3, r3, #3
|
|
800de4e: 440b add r3, r1
|
|
800de50: 3308 adds r3, #8
|
|
800de52: 681b ldr r3, [r3, #0]
|
|
800de54: 687a ldr r2, [r7, #4]
|
|
800de56: 429a cmp r2, r3
|
|
800de58: d102 bne.n 800de60 <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;
|
|
800de5a: f9b7 3020 ldrsh.w r3, [r7, #32]
|
|
800de5e: e100 b.n 800e062 <etharp_find_entry+0x2ca>
|
|
}
|
|
/* pending entry? */
|
|
if (state == ETHARP_STATE_PENDING) {
|
|
800de60: 7dfb ldrb r3, [r7, #23]
|
|
800de62: 2b01 cmp r3, #1
|
|
800de64: d140 bne.n 800dee8 <etharp_find_entry+0x150>
|
|
/* pending with queued packets? */
|
|
if (arp_table[i].q != NULL) {
|
|
800de66: f9b7 2020 ldrsh.w r2, [r7, #32]
|
|
800de6a: 4980 ldr r1, [pc, #512] ; (800e06c <etharp_find_entry+0x2d4>)
|
|
800de6c: 4613 mov r3, r2
|
|
800de6e: 005b lsls r3, r3, #1
|
|
800de70: 4413 add r3, r2
|
|
800de72: 00db lsls r3, r3, #3
|
|
800de74: 440b add r3, r1
|
|
800de76: 681b ldr r3, [r3, #0]
|
|
800de78: 2b00 cmp r3, #0
|
|
800de7a: d01a beq.n 800deb2 <etharp_find_entry+0x11a>
|
|
if (arp_table[i].ctime >= age_queue) {
|
|
800de7c: f9b7 2020 ldrsh.w r2, [r7, #32]
|
|
800de80: 497a ldr r1, [pc, #488] ; (800e06c <etharp_find_entry+0x2d4>)
|
|
800de82: 4613 mov r3, r2
|
|
800de84: 005b lsls r3, r3, #1
|
|
800de86: 4413 add r3, r2
|
|
800de88: 00db lsls r3, r3, #3
|
|
800de8a: 440b add r3, r1
|
|
800de8c: 3312 adds r3, #18
|
|
800de8e: 881b ldrh r3, [r3, #0]
|
|
800de90: 8bba ldrh r2, [r7, #28]
|
|
800de92: 429a cmp r2, r3
|
|
800de94: d845 bhi.n 800df22 <etharp_find_entry+0x18a>
|
|
old_queue = i;
|
|
800de96: 8c3b ldrh r3, [r7, #32]
|
|
800de98: 83fb strh r3, [r7, #30]
|
|
age_queue = arp_table[i].ctime;
|
|
800de9a: f9b7 2020 ldrsh.w r2, [r7, #32]
|
|
800de9e: 4973 ldr r1, [pc, #460] ; (800e06c <etharp_find_entry+0x2d4>)
|
|
800dea0: 4613 mov r3, r2
|
|
800dea2: 005b lsls r3, r3, #1
|
|
800dea4: 4413 add r3, r2
|
|
800dea6: 00db lsls r3, r3, #3
|
|
800dea8: 440b add r3, r1
|
|
800deaa: 3312 adds r3, #18
|
|
800deac: 881b ldrh r3, [r3, #0]
|
|
800deae: 83bb strh r3, [r7, #28]
|
|
800deb0: e037 b.n 800df22 <etharp_find_entry+0x18a>
|
|
}
|
|
} else
|
|
/* pending without queued packets? */
|
|
{
|
|
if (arp_table[i].ctime >= age_pending) {
|
|
800deb2: f9b7 2020 ldrsh.w r2, [r7, #32]
|
|
800deb6: 496d ldr r1, [pc, #436] ; (800e06c <etharp_find_entry+0x2d4>)
|
|
800deb8: 4613 mov r3, r2
|
|
800deba: 005b lsls r3, r3, #1
|
|
800debc: 4413 add r3, r2
|
|
800debe: 00db lsls r3, r3, #3
|
|
800dec0: 440b add r3, r1
|
|
800dec2: 3312 adds r3, #18
|
|
800dec4: 881b ldrh r3, [r3, #0]
|
|
800dec6: 8b7a ldrh r2, [r7, #26]
|
|
800dec8: 429a cmp r2, r3
|
|
800deca: d82a bhi.n 800df22 <etharp_find_entry+0x18a>
|
|
old_pending = i;
|
|
800decc: 8c3b ldrh r3, [r7, #32]
|
|
800dece: 84fb strh r3, [r7, #38] ; 0x26
|
|
age_pending = arp_table[i].ctime;
|
|
800ded0: f9b7 2020 ldrsh.w r2, [r7, #32]
|
|
800ded4: 4965 ldr r1, [pc, #404] ; (800e06c <etharp_find_entry+0x2d4>)
|
|
800ded6: 4613 mov r3, r2
|
|
800ded8: 005b lsls r3, r3, #1
|
|
800deda: 4413 add r3, r2
|
|
800dedc: 00db lsls r3, r3, #3
|
|
800dede: 440b add r3, r1
|
|
800dee0: 3312 adds r3, #18
|
|
800dee2: 881b ldrh r3, [r3, #0]
|
|
800dee4: 837b strh r3, [r7, #26]
|
|
800dee6: e01c b.n 800df22 <etharp_find_entry+0x18a>
|
|
}
|
|
}
|
|
/* stable entry? */
|
|
} else if (state >= ETHARP_STATE_STABLE) {
|
|
800dee8: 7dfb ldrb r3, [r7, #23]
|
|
800deea: 2b01 cmp r3, #1
|
|
800deec: d919 bls.n 800df22 <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) {
|
|
800deee: f9b7 2020 ldrsh.w r2, [r7, #32]
|
|
800def2: 495e ldr r1, [pc, #376] ; (800e06c <etharp_find_entry+0x2d4>)
|
|
800def4: 4613 mov r3, r2
|
|
800def6: 005b lsls r3, r3, #1
|
|
800def8: 4413 add r3, r2
|
|
800defa: 00db lsls r3, r3, #3
|
|
800defc: 440b add r3, r1
|
|
800defe: 3312 adds r3, #18
|
|
800df00: 881b ldrh r3, [r3, #0]
|
|
800df02: 8b3a ldrh r2, [r7, #24]
|
|
800df04: 429a cmp r2, r3
|
|
800df06: d80c bhi.n 800df22 <etharp_find_entry+0x18a>
|
|
old_stable = i;
|
|
800df08: 8c3b ldrh r3, [r7, #32]
|
|
800df0a: 84bb strh r3, [r7, #36] ; 0x24
|
|
age_stable = arp_table[i].ctime;
|
|
800df0c: f9b7 2020 ldrsh.w r2, [r7, #32]
|
|
800df10: 4956 ldr r1, [pc, #344] ; (800e06c <etharp_find_entry+0x2d4>)
|
|
800df12: 4613 mov r3, r2
|
|
800df14: 005b lsls r3, r3, #1
|
|
800df16: 4413 add r3, r2
|
|
800df18: 00db lsls r3, r3, #3
|
|
800df1a: 440b add r3, r1
|
|
800df1c: 3312 adds r3, #18
|
|
800df1e: 881b ldrh r3, [r3, #0]
|
|
800df20: 833b strh r3, [r7, #24]
|
|
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
|
|
800df22: 8c3b ldrh r3, [r7, #32]
|
|
800df24: 3301 adds r3, #1
|
|
800df26: b29b uxth r3, r3
|
|
800df28: 843b strh r3, [r7, #32]
|
|
800df2a: f9b7 3020 ldrsh.w r3, [r7, #32]
|
|
800df2e: 2b09 cmp r3, #9
|
|
800df30: f77f af4c ble.w 800ddcc <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) ||
|
|
800df34: 7afb ldrb r3, [r7, #11]
|
|
800df36: f003 0302 and.w r3, r3, #2
|
|
800df3a: 2b00 cmp r3, #0
|
|
800df3c: d108 bne.n 800df50 <etharp_find_entry+0x1b8>
|
|
800df3e: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22
|
|
800df42: 2b0a cmp r3, #10
|
|
800df44: d107 bne.n 800df56 <etharp_find_entry+0x1be>
|
|
/* or no empty entry found and not allowed to recycle? */
|
|
((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) {
|
|
800df46: 7afb ldrb r3, [r7, #11]
|
|
800df48: f003 0301 and.w r3, r3, #1
|
|
800df4c: 2b00 cmp r3, #0
|
|
800df4e: d102 bne.n 800df56 <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;
|
|
800df50: f04f 33ff mov.w r3, #4294967295
|
|
800df54: e085 b.n 800e062 <etharp_find_entry+0x2ca>
|
|
*
|
|
* { ETHARP_FLAG_TRY_HARD is set at this point }
|
|
*/
|
|
|
|
/* 1) empty entry available? */
|
|
if (empty < ARP_TABLE_SIZE) {
|
|
800df56: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22
|
|
800df5a: 2b09 cmp r3, #9
|
|
800df5c: dc02 bgt.n 800df64 <etharp_find_entry+0x1cc>
|
|
i = empty;
|
|
800df5e: 8c7b ldrh r3, [r7, #34] ; 0x22
|
|
800df60: 843b strh r3, [r7, #32]
|
|
800df62: e039 b.n 800dfd8 <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) {
|
|
800df64: f9b7 3024 ldrsh.w r3, [r7, #36] ; 0x24
|
|
800df68: 2b09 cmp r3, #9
|
|
800df6a: dc14 bgt.n 800df96 <etharp_find_entry+0x1fe>
|
|
/* recycle oldest stable*/
|
|
i = old_stable;
|
|
800df6c: 8cbb ldrh r3, [r7, #36] ; 0x24
|
|
800df6e: 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);
|
|
800df70: f9b7 2020 ldrsh.w r2, [r7, #32]
|
|
800df74: 493d ldr r1, [pc, #244] ; (800e06c <etharp_find_entry+0x2d4>)
|
|
800df76: 4613 mov r3, r2
|
|
800df78: 005b lsls r3, r3, #1
|
|
800df7a: 4413 add r3, r2
|
|
800df7c: 00db lsls r3, r3, #3
|
|
800df7e: 440b add r3, r1
|
|
800df80: 681b ldr r3, [r3, #0]
|
|
800df82: 2b00 cmp r3, #0
|
|
800df84: d018 beq.n 800dfb8 <etharp_find_entry+0x220>
|
|
800df86: 4b3a ldr r3, [pc, #232] ; (800e070 <etharp_find_entry+0x2d8>)
|
|
800df88: f240 126d movw r2, #365 ; 0x16d
|
|
800df8c: 493b ldr r1, [pc, #236] ; (800e07c <etharp_find_entry+0x2e4>)
|
|
800df8e: 483a ldr r0, [pc, #232] ; (800e078 <etharp_find_entry+0x2e0>)
|
|
800df90: f002 fab2 bl 80104f8 <printf>
|
|
800df94: e010 b.n 800dfb8 <etharp_find_entry+0x220>
|
|
/* 3) found recyclable pending entry without queued packets? */
|
|
} else if (old_pending < ARP_TABLE_SIZE) {
|
|
800df96: f9b7 3026 ldrsh.w r3, [r7, #38] ; 0x26
|
|
800df9a: 2b09 cmp r3, #9
|
|
800df9c: dc02 bgt.n 800dfa4 <etharp_find_entry+0x20c>
|
|
/* recycle oldest pending */
|
|
i = old_pending;
|
|
800df9e: 8cfb ldrh r3, [r7, #38] ; 0x26
|
|
800dfa0: 843b strh r3, [r7, #32]
|
|
800dfa2: e009 b.n 800dfb8 <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) {
|
|
800dfa4: f9b7 301e ldrsh.w r3, [r7, #30]
|
|
800dfa8: 2b09 cmp r3, #9
|
|
800dfaa: dc02 bgt.n 800dfb2 <etharp_find_entry+0x21a>
|
|
/* recycle oldest pending (queued packets are free in etharp_free_entry) */
|
|
i = old_queue;
|
|
800dfac: 8bfb ldrh r3, [r7, #30]
|
|
800dfae: 843b strh r3, [r7, #32]
|
|
800dfb0: e002 b.n 800dfb8 <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;
|
|
800dfb2: f04f 33ff mov.w r3, #4294967295
|
|
800dfb6: e054 b.n 800e062 <etharp_find_entry+0x2ca>
|
|
}
|
|
|
|
/* { empty or recyclable entry found } */
|
|
LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE);
|
|
800dfb8: f9b7 3020 ldrsh.w r3, [r7, #32]
|
|
800dfbc: 2b09 cmp r3, #9
|
|
800dfbe: dd06 ble.n 800dfce <etharp_find_entry+0x236>
|
|
800dfc0: 4b2b ldr r3, [pc, #172] ; (800e070 <etharp_find_entry+0x2d8>)
|
|
800dfc2: f240 127f movw r2, #383 ; 0x17f
|
|
800dfc6: 492e ldr r1, [pc, #184] ; (800e080 <etharp_find_entry+0x2e8>)
|
|
800dfc8: 482b ldr r0, [pc, #172] ; (800e078 <etharp_find_entry+0x2e0>)
|
|
800dfca: f002 fa95 bl 80104f8 <printf>
|
|
etharp_free_entry(i);
|
|
800dfce: f9b7 3020 ldrsh.w r3, [r7, #32]
|
|
800dfd2: 4618 mov r0, r3
|
|
800dfd4: f7ff fe06 bl 800dbe4 <etharp_free_entry>
|
|
}
|
|
|
|
LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE);
|
|
800dfd8: f9b7 3020 ldrsh.w r3, [r7, #32]
|
|
800dfdc: 2b09 cmp r3, #9
|
|
800dfde: dd06 ble.n 800dfee <etharp_find_entry+0x256>
|
|
800dfe0: 4b23 ldr r3, [pc, #140] ; (800e070 <etharp_find_entry+0x2d8>)
|
|
800dfe2: f240 1283 movw r2, #387 ; 0x183
|
|
800dfe6: 4926 ldr r1, [pc, #152] ; (800e080 <etharp_find_entry+0x2e8>)
|
|
800dfe8: 4823 ldr r0, [pc, #140] ; (800e078 <etharp_find_entry+0x2e0>)
|
|
800dfea: f002 fa85 bl 80104f8 <printf>
|
|
LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY",
|
|
800dfee: f9b7 2020 ldrsh.w r2, [r7, #32]
|
|
800dff2: 491e ldr r1, [pc, #120] ; (800e06c <etharp_find_entry+0x2d4>)
|
|
800dff4: 4613 mov r3, r2
|
|
800dff6: 005b lsls r3, r3, #1
|
|
800dff8: 4413 add r3, r2
|
|
800dffa: 00db lsls r3, r3, #3
|
|
800dffc: 440b add r3, r1
|
|
800dffe: 3314 adds r3, #20
|
|
800e000: 781b ldrb r3, [r3, #0]
|
|
800e002: 2b00 cmp r3, #0
|
|
800e004: d006 beq.n 800e014 <etharp_find_entry+0x27c>
|
|
800e006: 4b1a ldr r3, [pc, #104] ; (800e070 <etharp_find_entry+0x2d8>)
|
|
800e008: f44f 72c2 mov.w r2, #388 ; 0x184
|
|
800e00c: 491d ldr r1, [pc, #116] ; (800e084 <etharp_find_entry+0x2ec>)
|
|
800e00e: 481a ldr r0, [pc, #104] ; (800e078 <etharp_find_entry+0x2e0>)
|
|
800e010: f002 fa72 bl 80104f8 <printf>
|
|
arp_table[i].state == ETHARP_STATE_EMPTY);
|
|
|
|
/* IP address given? */
|
|
if (ipaddr != NULL) {
|
|
800e014: 68fb ldr r3, [r7, #12]
|
|
800e016: 2b00 cmp r3, #0
|
|
800e018: d00b beq.n 800e032 <etharp_find_entry+0x29a>
|
|
/* set IP address */
|
|
ip4_addr_copy(arp_table[i].ipaddr, *ipaddr);
|
|
800e01a: f9b7 2020 ldrsh.w r2, [r7, #32]
|
|
800e01e: 68fb ldr r3, [r7, #12]
|
|
800e020: 6819 ldr r1, [r3, #0]
|
|
800e022: 4812 ldr r0, [pc, #72] ; (800e06c <etharp_find_entry+0x2d4>)
|
|
800e024: 4613 mov r3, r2
|
|
800e026: 005b lsls r3, r3, #1
|
|
800e028: 4413 add r3, r2
|
|
800e02a: 00db lsls r3, r3, #3
|
|
800e02c: 4403 add r3, r0
|
|
800e02e: 3304 adds r3, #4
|
|
800e030: 6019 str r1, [r3, #0]
|
|
}
|
|
arp_table[i].ctime = 0;
|
|
800e032: f9b7 2020 ldrsh.w r2, [r7, #32]
|
|
800e036: 490d ldr r1, [pc, #52] ; (800e06c <etharp_find_entry+0x2d4>)
|
|
800e038: 4613 mov r3, r2
|
|
800e03a: 005b lsls r3, r3, #1
|
|
800e03c: 4413 add r3, r2
|
|
800e03e: 00db lsls r3, r3, #3
|
|
800e040: 440b add r3, r1
|
|
800e042: 3312 adds r3, #18
|
|
800e044: 2200 movs r2, #0
|
|
800e046: 801a strh r2, [r3, #0]
|
|
#if ETHARP_TABLE_MATCH_NETIF
|
|
arp_table[i].netif = netif;
|
|
800e048: f9b7 2020 ldrsh.w r2, [r7, #32]
|
|
800e04c: 4907 ldr r1, [pc, #28] ; (800e06c <etharp_find_entry+0x2d4>)
|
|
800e04e: 4613 mov r3, r2
|
|
800e050: 005b lsls r3, r3, #1
|
|
800e052: 4413 add r3, r2
|
|
800e054: 00db lsls r3, r3, #3
|
|
800e056: 440b add r3, r1
|
|
800e058: 3308 adds r3, #8
|
|
800e05a: 687a ldr r2, [r7, #4]
|
|
800e05c: 601a str r2, [r3, #0]
|
|
#endif /* ETHARP_TABLE_MATCH_NETIF */
|
|
return (s16_t)i;
|
|
800e05e: f9b7 3020 ldrsh.w r3, [r7, #32]
|
|
}
|
|
800e062: 4618 mov r0, r3
|
|
800e064: 3728 adds r7, #40 ; 0x28
|
|
800e066: 46bd mov sp, r7
|
|
800e068: bd80 pop {r7, pc}
|
|
800e06a: bf00 nop
|
|
800e06c: 20008c94 .word 0x20008c94
|
|
800e070: 0801770c .word 0x0801770c
|
|
800e074: 08017744 .word 0x08017744
|
|
800e078: 08017784 .word 0x08017784
|
|
800e07c: 080177ac .word 0x080177ac
|
|
800e080: 080177c4 .word 0x080177c4
|
|
800e084: 080177d8 .word 0x080177d8
|
|
|
|
0800e088 <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)
|
|
{
|
|
800e088: b580 push {r7, lr}
|
|
800e08a: b088 sub sp, #32
|
|
800e08c: af02 add r7, sp, #8
|
|
800e08e: 60f8 str r0, [r7, #12]
|
|
800e090: 60b9 str r1, [r7, #8]
|
|
800e092: 607a str r2, [r7, #4]
|
|
800e094: 70fb strb r3, [r7, #3]
|
|
s16_t i;
|
|
LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN);
|
|
800e096: 68fb ldr r3, [r7, #12]
|
|
800e098: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
|
|
800e09c: 2b06 cmp r3, #6
|
|
800e09e: d006 beq.n 800e0ae <etharp_update_arp_entry+0x26>
|
|
800e0a0: 4b48 ldr r3, [pc, #288] ; (800e1c4 <etharp_update_arp_entry+0x13c>)
|
|
800e0a2: f240 12a9 movw r2, #425 ; 0x1a9
|
|
800e0a6: 4948 ldr r1, [pc, #288] ; (800e1c8 <etharp_update_arp_entry+0x140>)
|
|
800e0a8: 4848 ldr r0, [pc, #288] ; (800e1cc <etharp_update_arp_entry+0x144>)
|
|
800e0aa: f002 fa25 bl 80104f8 <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) ||
|
|
800e0ae: 68bb ldr r3, [r7, #8]
|
|
800e0b0: 2b00 cmp r3, #0
|
|
800e0b2: d012 beq.n 800e0da <etharp_update_arp_entry+0x52>
|
|
800e0b4: 68bb ldr r3, [r7, #8]
|
|
800e0b6: 681b ldr r3, [r3, #0]
|
|
800e0b8: 2b00 cmp r3, #0
|
|
800e0ba: d00e beq.n 800e0da <etharp_update_arp_entry+0x52>
|
|
ip4_addr_isbroadcast(ipaddr, netif) ||
|
|
800e0bc: 68bb ldr r3, [r7, #8]
|
|
800e0be: 681b ldr r3, [r3, #0]
|
|
800e0c0: 68f9 ldr r1, [r7, #12]
|
|
800e0c2: 4618 mov r0, r3
|
|
800e0c4: f001 f920 bl 800f308 <ip4_addr_isbroadcast_u32>
|
|
800e0c8: 4603 mov r3, r0
|
|
if (ip4_addr_isany(ipaddr) ||
|
|
800e0ca: 2b00 cmp r3, #0
|
|
800e0cc: d105 bne.n 800e0da <etharp_update_arp_entry+0x52>
|
|
ip4_addr_ismulticast(ipaddr)) {
|
|
800e0ce: 68bb ldr r3, [r7, #8]
|
|
800e0d0: 681b ldr r3, [r3, #0]
|
|
800e0d2: f003 03f0 and.w r3, r3, #240 ; 0xf0
|
|
ip4_addr_isbroadcast(ipaddr, netif) ||
|
|
800e0d6: 2be0 cmp r3, #224 ; 0xe0
|
|
800e0d8: d102 bne.n 800e0e0 <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;
|
|
800e0da: f06f 030f mvn.w r3, #15
|
|
800e0de: e06c b.n 800e1ba <etharp_update_arp_entry+0x132>
|
|
}
|
|
/* find or create ARP entry */
|
|
i = etharp_find_entry(ipaddr, flags, netif);
|
|
800e0e0: 78fb ldrb r3, [r7, #3]
|
|
800e0e2: 68fa ldr r2, [r7, #12]
|
|
800e0e4: 4619 mov r1, r3
|
|
800e0e6: 68b8 ldr r0, [r7, #8]
|
|
800e0e8: f7ff fe56 bl 800dd98 <etharp_find_entry>
|
|
800e0ec: 4603 mov r3, r0
|
|
800e0ee: 82fb strh r3, [r7, #22]
|
|
/* bail out if no entry could be found */
|
|
if (i < 0) {
|
|
800e0f0: f9b7 3016 ldrsh.w r3, [r7, #22]
|
|
800e0f4: 2b00 cmp r3, #0
|
|
800e0f6: da02 bge.n 800e0fe <etharp_update_arp_entry+0x76>
|
|
return (err_t)i;
|
|
800e0f8: 8afb ldrh r3, [r7, #22]
|
|
800e0fa: b25b sxtb r3, r3
|
|
800e0fc: e05d b.n 800e1ba <etharp_update_arp_entry+0x132>
|
|
return ERR_VAL;
|
|
} else
|
|
#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
|
|
{
|
|
/* mark it stable */
|
|
arp_table[i].state = ETHARP_STATE_STABLE;
|
|
800e0fe: f9b7 2016 ldrsh.w r2, [r7, #22]
|
|
800e102: 4933 ldr r1, [pc, #204] ; (800e1d0 <etharp_update_arp_entry+0x148>)
|
|
800e104: 4613 mov r3, r2
|
|
800e106: 005b lsls r3, r3, #1
|
|
800e108: 4413 add r3, r2
|
|
800e10a: 00db lsls r3, r3, #3
|
|
800e10c: 440b add r3, r1
|
|
800e10e: 3314 adds r3, #20
|
|
800e110: 2202 movs r2, #2
|
|
800e112: 701a strb r2, [r3, #0]
|
|
}
|
|
|
|
/* record network interface */
|
|
arp_table[i].netif = netif;
|
|
800e114: f9b7 2016 ldrsh.w r2, [r7, #22]
|
|
800e118: 492d ldr r1, [pc, #180] ; (800e1d0 <etharp_update_arp_entry+0x148>)
|
|
800e11a: 4613 mov r3, r2
|
|
800e11c: 005b lsls r3, r3, #1
|
|
800e11e: 4413 add r3, r2
|
|
800e120: 00db lsls r3, r3, #3
|
|
800e122: 440b add r3, r1
|
|
800e124: 3308 adds r3, #8
|
|
800e126: 68fa ldr r2, [r7, #12]
|
|
800e128: 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);
|
|
800e12a: f9b7 2016 ldrsh.w r2, [r7, #22]
|
|
800e12e: 4613 mov r3, r2
|
|
800e130: 005b lsls r3, r3, #1
|
|
800e132: 4413 add r3, r2
|
|
800e134: 00db lsls r3, r3, #3
|
|
800e136: 3308 adds r3, #8
|
|
800e138: 4a25 ldr r2, [pc, #148] ; (800e1d0 <etharp_update_arp_entry+0x148>)
|
|
800e13a: 4413 add r3, r2
|
|
800e13c: 3304 adds r3, #4
|
|
800e13e: 2206 movs r2, #6
|
|
800e140: 6879 ldr r1, [r7, #4]
|
|
800e142: 4618 mov r0, r3
|
|
800e144: f002 f9a8 bl 8010498 <memcpy>
|
|
/* reset time stamp */
|
|
arp_table[i].ctime = 0;
|
|
800e148: f9b7 2016 ldrsh.w r2, [r7, #22]
|
|
800e14c: 4920 ldr r1, [pc, #128] ; (800e1d0 <etharp_update_arp_entry+0x148>)
|
|
800e14e: 4613 mov r3, r2
|
|
800e150: 005b lsls r3, r3, #1
|
|
800e152: 4413 add r3, r2
|
|
800e154: 00db lsls r3, r3, #3
|
|
800e156: 440b add r3, r1
|
|
800e158: 3312 adds r3, #18
|
|
800e15a: 2200 movs r2, #0
|
|
800e15c: 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) {
|
|
800e15e: f9b7 2016 ldrsh.w r2, [r7, #22]
|
|
800e162: 491b ldr r1, [pc, #108] ; (800e1d0 <etharp_update_arp_entry+0x148>)
|
|
800e164: 4613 mov r3, r2
|
|
800e166: 005b lsls r3, r3, #1
|
|
800e168: 4413 add r3, r2
|
|
800e16a: 00db lsls r3, r3, #3
|
|
800e16c: 440b add r3, r1
|
|
800e16e: 681b ldr r3, [r3, #0]
|
|
800e170: 2b00 cmp r3, #0
|
|
800e172: d021 beq.n 800e1b8 <etharp_update_arp_entry+0x130>
|
|
struct pbuf *p = arp_table[i].q;
|
|
800e174: f9b7 2016 ldrsh.w r2, [r7, #22]
|
|
800e178: 4915 ldr r1, [pc, #84] ; (800e1d0 <etharp_update_arp_entry+0x148>)
|
|
800e17a: 4613 mov r3, r2
|
|
800e17c: 005b lsls r3, r3, #1
|
|
800e17e: 4413 add r3, r2
|
|
800e180: 00db lsls r3, r3, #3
|
|
800e182: 440b add r3, r1
|
|
800e184: 681b ldr r3, [r3, #0]
|
|
800e186: 613b str r3, [r7, #16]
|
|
arp_table[i].q = NULL;
|
|
800e188: f9b7 2016 ldrsh.w r2, [r7, #22]
|
|
800e18c: 4910 ldr r1, [pc, #64] ; (800e1d0 <etharp_update_arp_entry+0x148>)
|
|
800e18e: 4613 mov r3, r2
|
|
800e190: 005b lsls r3, r3, #1
|
|
800e192: 4413 add r3, r2
|
|
800e194: 00db lsls r3, r3, #3
|
|
800e196: 440b add r3, r1
|
|
800e198: 2200 movs r2, #0
|
|
800e19a: 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);
|
|
800e19c: 68fb ldr r3, [r7, #12]
|
|
800e19e: f103 022a add.w r2, r3, #42 ; 0x2a
|
|
800e1a2: f44f 6300 mov.w r3, #2048 ; 0x800
|
|
800e1a6: 9300 str r3, [sp, #0]
|
|
800e1a8: 687b ldr r3, [r7, #4]
|
|
800e1aa: 6939 ldr r1, [r7, #16]
|
|
800e1ac: 68f8 ldr r0, [r7, #12]
|
|
800e1ae: f002 f8f7 bl 80103a0 <ethernet_output>
|
|
/* free the queued IP packet */
|
|
pbuf_free(p);
|
|
800e1b2: 6938 ldr r0, [r7, #16]
|
|
800e1b4: f7f7 fc28 bl 8005a08 <pbuf_free>
|
|
}
|
|
return ERR_OK;
|
|
800e1b8: 2300 movs r3, #0
|
|
}
|
|
800e1ba: 4618 mov r0, r3
|
|
800e1bc: 3718 adds r7, #24
|
|
800e1be: 46bd mov sp, r7
|
|
800e1c0: bd80 pop {r7, pc}
|
|
800e1c2: bf00 nop
|
|
800e1c4: 0801770c .word 0x0801770c
|
|
800e1c8: 08017804 .word 0x08017804
|
|
800e1cc: 08017784 .word 0x08017784
|
|
800e1d0: 20008c94 .word 0x20008c94
|
|
|
|
0800e1d4 <etharp_cleanup_netif>:
|
|
*
|
|
* @param netif points to a network interface
|
|
*/
|
|
void
|
|
etharp_cleanup_netif(struct netif *netif)
|
|
{
|
|
800e1d4: b580 push {r7, lr}
|
|
800e1d6: b084 sub sp, #16
|
|
800e1d8: af00 add r7, sp, #0
|
|
800e1da: 6078 str r0, [r7, #4]
|
|
int i;
|
|
|
|
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
|
|
800e1dc: 2300 movs r3, #0
|
|
800e1de: 60fb str r3, [r7, #12]
|
|
800e1e0: e01e b.n 800e220 <etharp_cleanup_netif+0x4c>
|
|
u8_t state = arp_table[i].state;
|
|
800e1e2: 4913 ldr r1, [pc, #76] ; (800e230 <etharp_cleanup_netif+0x5c>)
|
|
800e1e4: 68fa ldr r2, [r7, #12]
|
|
800e1e6: 4613 mov r3, r2
|
|
800e1e8: 005b lsls r3, r3, #1
|
|
800e1ea: 4413 add r3, r2
|
|
800e1ec: 00db lsls r3, r3, #3
|
|
800e1ee: 440b add r3, r1
|
|
800e1f0: 3314 adds r3, #20
|
|
800e1f2: 781b ldrb r3, [r3, #0]
|
|
800e1f4: 72fb strb r3, [r7, #11]
|
|
if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) {
|
|
800e1f6: 7afb ldrb r3, [r7, #11]
|
|
800e1f8: 2b00 cmp r3, #0
|
|
800e1fa: d00e beq.n 800e21a <etharp_cleanup_netif+0x46>
|
|
800e1fc: 490c ldr r1, [pc, #48] ; (800e230 <etharp_cleanup_netif+0x5c>)
|
|
800e1fe: 68fa ldr r2, [r7, #12]
|
|
800e200: 4613 mov r3, r2
|
|
800e202: 005b lsls r3, r3, #1
|
|
800e204: 4413 add r3, r2
|
|
800e206: 00db lsls r3, r3, #3
|
|
800e208: 440b add r3, r1
|
|
800e20a: 3308 adds r3, #8
|
|
800e20c: 681b ldr r3, [r3, #0]
|
|
800e20e: 687a ldr r2, [r7, #4]
|
|
800e210: 429a cmp r2, r3
|
|
800e212: d102 bne.n 800e21a <etharp_cleanup_netif+0x46>
|
|
etharp_free_entry(i);
|
|
800e214: 68f8 ldr r0, [r7, #12]
|
|
800e216: f7ff fce5 bl 800dbe4 <etharp_free_entry>
|
|
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
|
|
800e21a: 68fb ldr r3, [r7, #12]
|
|
800e21c: 3301 adds r3, #1
|
|
800e21e: 60fb str r3, [r7, #12]
|
|
800e220: 68fb ldr r3, [r7, #12]
|
|
800e222: 2b09 cmp r3, #9
|
|
800e224: dddd ble.n 800e1e2 <etharp_cleanup_netif+0xe>
|
|
}
|
|
}
|
|
}
|
|
800e226: bf00 nop
|
|
800e228: bf00 nop
|
|
800e22a: 3710 adds r7, #16
|
|
800e22c: 46bd mov sp, r7
|
|
800e22e: bd80 pop {r7, pc}
|
|
800e230: 20008c94 .word 0x20008c94
|
|
|
|
0800e234 <etharp_input>:
|
|
*
|
|
* @see pbuf_free()
|
|
*/
|
|
void
|
|
etharp_input(struct pbuf *p, struct netif *netif)
|
|
{
|
|
800e234: b5b0 push {r4, r5, r7, lr}
|
|
800e236: b08a sub sp, #40 ; 0x28
|
|
800e238: af04 add r7, sp, #16
|
|
800e23a: 6078 str r0, [r7, #4]
|
|
800e23c: 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;);
|
|
800e23e: 683b ldr r3, [r7, #0]
|
|
800e240: 2b00 cmp r3, #0
|
|
800e242: d107 bne.n 800e254 <etharp_input+0x20>
|
|
800e244: 4b3f ldr r3, [pc, #252] ; (800e344 <etharp_input+0x110>)
|
|
800e246: f240 228a movw r2, #650 ; 0x28a
|
|
800e24a: 493f ldr r1, [pc, #252] ; (800e348 <etharp_input+0x114>)
|
|
800e24c: 483f ldr r0, [pc, #252] ; (800e34c <etharp_input+0x118>)
|
|
800e24e: f002 f953 bl 80104f8 <printf>
|
|
800e252: e074 b.n 800e33e <etharp_input+0x10a>
|
|
|
|
hdr = (struct etharp_hdr *)p->payload;
|
|
800e254: 687b ldr r3, [r7, #4]
|
|
800e256: 685b ldr r3, [r3, #4]
|
|
800e258: 613b str r3, [r7, #16]
|
|
|
|
/* RFC 826 "Packet Reception": */
|
|
if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) ||
|
|
800e25a: 693b ldr r3, [r7, #16]
|
|
800e25c: 881b ldrh r3, [r3, #0]
|
|
800e25e: b29b uxth r3, r3
|
|
800e260: f5b3 7f80 cmp.w r3, #256 ; 0x100
|
|
800e264: d10c bne.n 800e280 <etharp_input+0x4c>
|
|
(hdr->hwlen != ETH_HWADDR_LEN) ||
|
|
800e266: 693b ldr r3, [r7, #16]
|
|
800e268: 791b ldrb r3, [r3, #4]
|
|
if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) ||
|
|
800e26a: 2b06 cmp r3, #6
|
|
800e26c: d108 bne.n 800e280 <etharp_input+0x4c>
|
|
(hdr->protolen != sizeof(ip4_addr_t)) ||
|
|
800e26e: 693b ldr r3, [r7, #16]
|
|
800e270: 795b ldrb r3, [r3, #5]
|
|
(hdr->hwlen != ETH_HWADDR_LEN) ||
|
|
800e272: 2b04 cmp r3, #4
|
|
800e274: d104 bne.n 800e280 <etharp_input+0x4c>
|
|
(hdr->proto != PP_HTONS(ETHTYPE_IP))) {
|
|
800e276: 693b ldr r3, [r7, #16]
|
|
800e278: 885b ldrh r3, [r3, #2]
|
|
800e27a: b29b uxth r3, r3
|
|
(hdr->protolen != sizeof(ip4_addr_t)) ||
|
|
800e27c: 2b08 cmp r3, #8
|
|
800e27e: d003 beq.n 800e288 <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);
|
|
800e280: 6878 ldr r0, [r7, #4]
|
|
800e282: f7f7 fbc1 bl 8005a08 <pbuf_free>
|
|
return;
|
|
800e286: e05a b.n 800e33e <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);
|
|
800e288: 693b ldr r3, [r7, #16]
|
|
800e28a: 330e adds r3, #14
|
|
800e28c: 681b ldr r3, [r3, #0]
|
|
800e28e: 60fb str r3, [r7, #12]
|
|
IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&dipaddr, &hdr->dipaddr);
|
|
800e290: 693b ldr r3, [r7, #16]
|
|
800e292: 3318 adds r3, #24
|
|
800e294: 681b ldr r3, [r3, #0]
|
|
800e296: 60bb str r3, [r7, #8]
|
|
|
|
/* this interface is not configured? */
|
|
if (ip4_addr_isany_val(*netif_ip4_addr(netif))) {
|
|
800e298: 683b ldr r3, [r7, #0]
|
|
800e29a: 3304 adds r3, #4
|
|
800e29c: 681b ldr r3, [r3, #0]
|
|
800e29e: 2b00 cmp r3, #0
|
|
800e2a0: d102 bne.n 800e2a8 <etharp_input+0x74>
|
|
for_us = 0;
|
|
800e2a2: 2300 movs r3, #0
|
|
800e2a4: 75fb strb r3, [r7, #23]
|
|
800e2a6: e009 b.n 800e2bc <etharp_input+0x88>
|
|
} else {
|
|
/* ARP packet directed to us? */
|
|
for_us = (u8_t)ip4_addr_cmp(&dipaddr, netif_ip4_addr(netif));
|
|
800e2a8: 68ba ldr r2, [r7, #8]
|
|
800e2aa: 683b ldr r3, [r7, #0]
|
|
800e2ac: 3304 adds r3, #4
|
|
800e2ae: 681b ldr r3, [r3, #0]
|
|
800e2b0: 429a cmp r2, r3
|
|
800e2b2: bf0c ite eq
|
|
800e2b4: 2301 moveq r3, #1
|
|
800e2b6: 2300 movne r3, #0
|
|
800e2b8: b2db uxtb r3, r3
|
|
800e2ba: 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),
|
|
800e2bc: 693b ldr r3, [r7, #16]
|
|
800e2be: f103 0208 add.w r2, r3, #8
|
|
800e2c2: 7dfb ldrb r3, [r7, #23]
|
|
800e2c4: 2b00 cmp r3, #0
|
|
800e2c6: d001 beq.n 800e2cc <etharp_input+0x98>
|
|
800e2c8: 2301 movs r3, #1
|
|
800e2ca: e000 b.n 800e2ce <etharp_input+0x9a>
|
|
800e2cc: 2302 movs r3, #2
|
|
800e2ce: f107 010c add.w r1, r7, #12
|
|
800e2d2: 6838 ldr r0, [r7, #0]
|
|
800e2d4: f7ff fed8 bl 800e088 <etharp_update_arp_entry>
|
|
for_us ? ETHARP_FLAG_TRY_HARD : ETHARP_FLAG_FIND_ONLY);
|
|
|
|
/* now act on the message itself */
|
|
switch (hdr->opcode) {
|
|
800e2d8: 693b ldr r3, [r7, #16]
|
|
800e2da: 88db ldrh r3, [r3, #6]
|
|
800e2dc: b29b uxth r3, r3
|
|
800e2de: f5b3 7f80 cmp.w r3, #256 ; 0x100
|
|
800e2e2: d003 beq.n 800e2ec <etharp_input+0xb8>
|
|
800e2e4: f5b3 7f00 cmp.w r3, #512 ; 0x200
|
|
800e2e8: d01e beq.n 800e328 <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;
|
|
800e2ea: e025 b.n 800e338 <etharp_input+0x104>
|
|
if (for_us) {
|
|
800e2ec: 7dfb ldrb r3, [r7, #23]
|
|
800e2ee: 2b00 cmp r3, #0
|
|
800e2f0: d021 beq.n 800e336 <etharp_input+0x102>
|
|
(struct eth_addr *)netif->hwaddr, &hdr->shwaddr,
|
|
800e2f2: 683b ldr r3, [r7, #0]
|
|
800e2f4: f103 002a add.w r0, r3, #42 ; 0x2a
|
|
800e2f8: 693b ldr r3, [r7, #16]
|
|
800e2fa: f103 0408 add.w r4, r3, #8
|
|
(struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif),
|
|
800e2fe: 683b ldr r3, [r7, #0]
|
|
800e300: f103 052a add.w r5, r3, #42 ; 0x2a
|
|
800e304: 683b ldr r3, [r7, #0]
|
|
800e306: 3304 adds r3, #4
|
|
&hdr->shwaddr, &sipaddr,
|
|
800e308: 693a ldr r2, [r7, #16]
|
|
800e30a: 3208 adds r2, #8
|
|
etharp_raw(netif,
|
|
800e30c: 2102 movs r1, #2
|
|
800e30e: 9103 str r1, [sp, #12]
|
|
800e310: f107 010c add.w r1, r7, #12
|
|
800e314: 9102 str r1, [sp, #8]
|
|
800e316: 9201 str r2, [sp, #4]
|
|
800e318: 9300 str r3, [sp, #0]
|
|
800e31a: 462b mov r3, r5
|
|
800e31c: 4622 mov r2, r4
|
|
800e31e: 4601 mov r1, r0
|
|
800e320: 6838 ldr r0, [r7, #0]
|
|
800e322: f000 faef bl 800e904 <etharp_raw>
|
|
break;
|
|
800e326: e006 b.n 800e336 <etharp_input+0x102>
|
|
dhcp_arp_reply(netif, &sipaddr);
|
|
800e328: f107 030c add.w r3, r7, #12
|
|
800e32c: 4619 mov r1, r3
|
|
800e32e: 6838 ldr r0, [r7, #0]
|
|
800e330: f7fe f9fc bl 800c72c <dhcp_arp_reply>
|
|
break;
|
|
800e334: e000 b.n 800e338 <etharp_input+0x104>
|
|
break;
|
|
800e336: bf00 nop
|
|
}
|
|
/* free ARP packet */
|
|
pbuf_free(p);
|
|
800e338: 6878 ldr r0, [r7, #4]
|
|
800e33a: f7f7 fb65 bl 8005a08 <pbuf_free>
|
|
}
|
|
800e33e: 3718 adds r7, #24
|
|
800e340: 46bd mov sp, r7
|
|
800e342: bdb0 pop {r4, r5, r7, pc}
|
|
800e344: 0801770c .word 0x0801770c
|
|
800e348: 0801785c .word 0x0801785c
|
|
800e34c: 08017784 .word 0x08017784
|
|
|
|
0800e350 <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)
|
|
{
|
|
800e350: b580 push {r7, lr}
|
|
800e352: b086 sub sp, #24
|
|
800e354: af02 add r7, sp, #8
|
|
800e356: 60f8 str r0, [r7, #12]
|
|
800e358: 60b9 str r1, [r7, #8]
|
|
800e35a: 4613 mov r3, r2
|
|
800e35c: 71fb strb r3, [r7, #7]
|
|
LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE",
|
|
800e35e: 79fa ldrb r2, [r7, #7]
|
|
800e360: 4944 ldr r1, [pc, #272] ; (800e474 <etharp_output_to_arp_index+0x124>)
|
|
800e362: 4613 mov r3, r2
|
|
800e364: 005b lsls r3, r3, #1
|
|
800e366: 4413 add r3, r2
|
|
800e368: 00db lsls r3, r3, #3
|
|
800e36a: 440b add r3, r1
|
|
800e36c: 3314 adds r3, #20
|
|
800e36e: 781b ldrb r3, [r3, #0]
|
|
800e370: 2b01 cmp r3, #1
|
|
800e372: d806 bhi.n 800e382 <etharp_output_to_arp_index+0x32>
|
|
800e374: 4b40 ldr r3, [pc, #256] ; (800e478 <etharp_output_to_arp_index+0x128>)
|
|
800e376: f240 22ee movw r2, #750 ; 0x2ee
|
|
800e37a: 4940 ldr r1, [pc, #256] ; (800e47c <etharp_output_to_arp_index+0x12c>)
|
|
800e37c: 4840 ldr r0, [pc, #256] ; (800e480 <etharp_output_to_arp_index+0x130>)
|
|
800e37e: f002 f8bb bl 80104f8 <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) {
|
|
800e382: 79fa ldrb r2, [r7, #7]
|
|
800e384: 493b ldr r1, [pc, #236] ; (800e474 <etharp_output_to_arp_index+0x124>)
|
|
800e386: 4613 mov r3, r2
|
|
800e388: 005b lsls r3, r3, #1
|
|
800e38a: 4413 add r3, r2
|
|
800e38c: 00db lsls r3, r3, #3
|
|
800e38e: 440b add r3, r1
|
|
800e390: 3314 adds r3, #20
|
|
800e392: 781b ldrb r3, [r3, #0]
|
|
800e394: 2b02 cmp r3, #2
|
|
800e396: d153 bne.n 800e440 <etharp_output_to_arp_index+0xf0>
|
|
if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_BROADCAST) {
|
|
800e398: 79fa ldrb r2, [r7, #7]
|
|
800e39a: 4936 ldr r1, [pc, #216] ; (800e474 <etharp_output_to_arp_index+0x124>)
|
|
800e39c: 4613 mov r3, r2
|
|
800e39e: 005b lsls r3, r3, #1
|
|
800e3a0: 4413 add r3, r2
|
|
800e3a2: 00db lsls r3, r3, #3
|
|
800e3a4: 440b add r3, r1
|
|
800e3a6: 3312 adds r3, #18
|
|
800e3a8: 881b ldrh r3, [r3, #0]
|
|
800e3aa: f5b3 7f8e cmp.w r3, #284 ; 0x11c
|
|
800e3ae: d919 bls.n 800e3e4 <etharp_output_to_arp_index+0x94>
|
|
/* issue a standard request using broadcast */
|
|
if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) {
|
|
800e3b0: 79fa ldrb r2, [r7, #7]
|
|
800e3b2: 4613 mov r3, r2
|
|
800e3b4: 005b lsls r3, r3, #1
|
|
800e3b6: 4413 add r3, r2
|
|
800e3b8: 00db lsls r3, r3, #3
|
|
800e3ba: 4a2e ldr r2, [pc, #184] ; (800e474 <etharp_output_to_arp_index+0x124>)
|
|
800e3bc: 4413 add r3, r2
|
|
800e3be: 3304 adds r3, #4
|
|
800e3c0: 4619 mov r1, r3
|
|
800e3c2: 68f8 ldr r0, [r7, #12]
|
|
800e3c4: f000 fb4c bl 800ea60 <etharp_request>
|
|
800e3c8: 4603 mov r3, r0
|
|
800e3ca: 2b00 cmp r3, #0
|
|
800e3cc: d138 bne.n 800e440 <etharp_output_to_arp_index+0xf0>
|
|
arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1;
|
|
800e3ce: 79fa ldrb r2, [r7, #7]
|
|
800e3d0: 4928 ldr r1, [pc, #160] ; (800e474 <etharp_output_to_arp_index+0x124>)
|
|
800e3d2: 4613 mov r3, r2
|
|
800e3d4: 005b lsls r3, r3, #1
|
|
800e3d6: 4413 add r3, r2
|
|
800e3d8: 00db lsls r3, r3, #3
|
|
800e3da: 440b add r3, r1
|
|
800e3dc: 3314 adds r3, #20
|
|
800e3de: 2203 movs r2, #3
|
|
800e3e0: 701a strb r2, [r3, #0]
|
|
800e3e2: e02d b.n 800e440 <etharp_output_to_arp_index+0xf0>
|
|
}
|
|
} else if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_UNICAST) {
|
|
800e3e4: 79fa ldrb r2, [r7, #7]
|
|
800e3e6: 4923 ldr r1, [pc, #140] ; (800e474 <etharp_output_to_arp_index+0x124>)
|
|
800e3e8: 4613 mov r3, r2
|
|
800e3ea: 005b lsls r3, r3, #1
|
|
800e3ec: 4413 add r3, r2
|
|
800e3ee: 00db lsls r3, r3, #3
|
|
800e3f0: 440b add r3, r1
|
|
800e3f2: 3312 adds r3, #18
|
|
800e3f4: 881b ldrh r3, [r3, #0]
|
|
800e3f6: f5b3 7f87 cmp.w r3, #270 ; 0x10e
|
|
800e3fa: d321 bcc.n 800e440 <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) {
|
|
800e3fc: 79fa ldrb r2, [r7, #7]
|
|
800e3fe: 4613 mov r3, r2
|
|
800e400: 005b lsls r3, r3, #1
|
|
800e402: 4413 add r3, r2
|
|
800e404: 00db lsls r3, r3, #3
|
|
800e406: 4a1b ldr r2, [pc, #108] ; (800e474 <etharp_output_to_arp_index+0x124>)
|
|
800e408: 4413 add r3, r2
|
|
800e40a: 1d19 adds r1, r3, #4
|
|
800e40c: 79fa ldrb r2, [r7, #7]
|
|
800e40e: 4613 mov r3, r2
|
|
800e410: 005b lsls r3, r3, #1
|
|
800e412: 4413 add r3, r2
|
|
800e414: 00db lsls r3, r3, #3
|
|
800e416: 3308 adds r3, #8
|
|
800e418: 4a16 ldr r2, [pc, #88] ; (800e474 <etharp_output_to_arp_index+0x124>)
|
|
800e41a: 4413 add r3, r2
|
|
800e41c: 3304 adds r3, #4
|
|
800e41e: 461a mov r2, r3
|
|
800e420: 68f8 ldr r0, [r7, #12]
|
|
800e422: f000 fafb bl 800ea1c <etharp_request_dst>
|
|
800e426: 4603 mov r3, r0
|
|
800e428: 2b00 cmp r3, #0
|
|
800e42a: d109 bne.n 800e440 <etharp_output_to_arp_index+0xf0>
|
|
arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1;
|
|
800e42c: 79fa ldrb r2, [r7, #7]
|
|
800e42e: 4911 ldr r1, [pc, #68] ; (800e474 <etharp_output_to_arp_index+0x124>)
|
|
800e430: 4613 mov r3, r2
|
|
800e432: 005b lsls r3, r3, #1
|
|
800e434: 4413 add r3, r2
|
|
800e436: 00db lsls r3, r3, #3
|
|
800e438: 440b add r3, r1
|
|
800e43a: 3314 adds r3, #20
|
|
800e43c: 2203 movs r2, #3
|
|
800e43e: 701a strb r2, [r3, #0]
|
|
}
|
|
}
|
|
}
|
|
|
|
return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP);
|
|
800e440: 68fb ldr r3, [r7, #12]
|
|
800e442: f103 012a add.w r1, r3, #42 ; 0x2a
|
|
800e446: 79fa ldrb r2, [r7, #7]
|
|
800e448: 4613 mov r3, r2
|
|
800e44a: 005b lsls r3, r3, #1
|
|
800e44c: 4413 add r3, r2
|
|
800e44e: 00db lsls r3, r3, #3
|
|
800e450: 3308 adds r3, #8
|
|
800e452: 4a08 ldr r2, [pc, #32] ; (800e474 <etharp_output_to_arp_index+0x124>)
|
|
800e454: 4413 add r3, r2
|
|
800e456: 3304 adds r3, #4
|
|
800e458: f44f 6200 mov.w r2, #2048 ; 0x800
|
|
800e45c: 9200 str r2, [sp, #0]
|
|
800e45e: 460a mov r2, r1
|
|
800e460: 68b9 ldr r1, [r7, #8]
|
|
800e462: 68f8 ldr r0, [r7, #12]
|
|
800e464: f001 ff9c bl 80103a0 <ethernet_output>
|
|
800e468: 4603 mov r3, r0
|
|
}
|
|
800e46a: 4618 mov r0, r3
|
|
800e46c: 3710 adds r7, #16
|
|
800e46e: 46bd mov sp, r7
|
|
800e470: bd80 pop {r7, pc}
|
|
800e472: bf00 nop
|
|
800e474: 20008c94 .word 0x20008c94
|
|
800e478: 0801770c .word 0x0801770c
|
|
800e47c: 0801787c .word 0x0801787c
|
|
800e480: 08017784 .word 0x08017784
|
|
|
|
0800e484 <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)
|
|
{
|
|
800e484: b580 push {r7, lr}
|
|
800e486: b08a sub sp, #40 ; 0x28
|
|
800e488: af02 add r7, sp, #8
|
|
800e48a: 60f8 str r0, [r7, #12]
|
|
800e48c: 60b9 str r1, [r7, #8]
|
|
800e48e: 607a str r2, [r7, #4]
|
|
const struct eth_addr *dest;
|
|
struct eth_addr mcastaddr;
|
|
const ip4_addr_t *dst_addr = ipaddr;
|
|
800e490: 687b ldr r3, [r7, #4]
|
|
800e492: 61bb str r3, [r7, #24]
|
|
|
|
LWIP_ASSERT_CORE_LOCKED();
|
|
LWIP_ASSERT("netif != NULL", netif != NULL);
|
|
800e494: 68fb ldr r3, [r7, #12]
|
|
800e496: 2b00 cmp r3, #0
|
|
800e498: d106 bne.n 800e4a8 <etharp_output+0x24>
|
|
800e49a: 4b73 ldr r3, [pc, #460] ; (800e668 <etharp_output+0x1e4>)
|
|
800e49c: f240 321e movw r2, #798 ; 0x31e
|
|
800e4a0: 4972 ldr r1, [pc, #456] ; (800e66c <etharp_output+0x1e8>)
|
|
800e4a2: 4873 ldr r0, [pc, #460] ; (800e670 <etharp_output+0x1ec>)
|
|
800e4a4: f002 f828 bl 80104f8 <printf>
|
|
LWIP_ASSERT("q != NULL", q != NULL);
|
|
800e4a8: 68bb ldr r3, [r7, #8]
|
|
800e4aa: 2b00 cmp r3, #0
|
|
800e4ac: d106 bne.n 800e4bc <etharp_output+0x38>
|
|
800e4ae: 4b6e ldr r3, [pc, #440] ; (800e668 <etharp_output+0x1e4>)
|
|
800e4b0: f240 321f movw r2, #799 ; 0x31f
|
|
800e4b4: 496f ldr r1, [pc, #444] ; (800e674 <etharp_output+0x1f0>)
|
|
800e4b6: 486e ldr r0, [pc, #440] ; (800e670 <etharp_output+0x1ec>)
|
|
800e4b8: f002 f81e bl 80104f8 <printf>
|
|
LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL);
|
|
800e4bc: 687b ldr r3, [r7, #4]
|
|
800e4be: 2b00 cmp r3, #0
|
|
800e4c0: d106 bne.n 800e4d0 <etharp_output+0x4c>
|
|
800e4c2: 4b69 ldr r3, [pc, #420] ; (800e668 <etharp_output+0x1e4>)
|
|
800e4c4: f44f 7248 mov.w r2, #800 ; 0x320
|
|
800e4c8: 496b ldr r1, [pc, #428] ; (800e678 <etharp_output+0x1f4>)
|
|
800e4ca: 4869 ldr r0, [pc, #420] ; (800e670 <etharp_output+0x1ec>)
|
|
800e4cc: f002 f814 bl 80104f8 <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)) {
|
|
800e4d0: 687b ldr r3, [r7, #4]
|
|
800e4d2: 681b ldr r3, [r3, #0]
|
|
800e4d4: 68f9 ldr r1, [r7, #12]
|
|
800e4d6: 4618 mov r0, r3
|
|
800e4d8: f000 ff16 bl 800f308 <ip4_addr_isbroadcast_u32>
|
|
800e4dc: 4603 mov r3, r0
|
|
800e4de: 2b00 cmp r3, #0
|
|
800e4e0: d002 beq.n 800e4e8 <etharp_output+0x64>
|
|
/* broadcast on Ethernet also */
|
|
dest = (const struct eth_addr *)ðbroadcast;
|
|
800e4e2: 4b66 ldr r3, [pc, #408] ; (800e67c <etharp_output+0x1f8>)
|
|
800e4e4: 61fb str r3, [r7, #28]
|
|
800e4e6: e0af b.n 800e648 <etharp_output+0x1c4>
|
|
/* multicast destination IP address? */
|
|
} else if (ip4_addr_ismulticast(ipaddr)) {
|
|
800e4e8: 687b ldr r3, [r7, #4]
|
|
800e4ea: 681b ldr r3, [r3, #0]
|
|
800e4ec: f003 03f0 and.w r3, r3, #240 ; 0xf0
|
|
800e4f0: 2be0 cmp r3, #224 ; 0xe0
|
|
800e4f2: d118 bne.n 800e526 <etharp_output+0xa2>
|
|
/* Hash IP multicast address to MAC address.*/
|
|
mcastaddr.addr[0] = LL_IP4_MULTICAST_ADDR_0;
|
|
800e4f4: 2301 movs r3, #1
|
|
800e4f6: 743b strb r3, [r7, #16]
|
|
mcastaddr.addr[1] = LL_IP4_MULTICAST_ADDR_1;
|
|
800e4f8: 2300 movs r3, #0
|
|
800e4fa: 747b strb r3, [r7, #17]
|
|
mcastaddr.addr[2] = LL_IP4_MULTICAST_ADDR_2;
|
|
800e4fc: 235e movs r3, #94 ; 0x5e
|
|
800e4fe: 74bb strb r3, [r7, #18]
|
|
mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f;
|
|
800e500: 687b ldr r3, [r7, #4]
|
|
800e502: 3301 adds r3, #1
|
|
800e504: 781b ldrb r3, [r3, #0]
|
|
800e506: f003 037f and.w r3, r3, #127 ; 0x7f
|
|
800e50a: b2db uxtb r3, r3
|
|
800e50c: 74fb strb r3, [r7, #19]
|
|
mcastaddr.addr[4] = ip4_addr3(ipaddr);
|
|
800e50e: 687b ldr r3, [r7, #4]
|
|
800e510: 3302 adds r3, #2
|
|
800e512: 781b ldrb r3, [r3, #0]
|
|
800e514: 753b strb r3, [r7, #20]
|
|
mcastaddr.addr[5] = ip4_addr4(ipaddr);
|
|
800e516: 687b ldr r3, [r7, #4]
|
|
800e518: 3303 adds r3, #3
|
|
800e51a: 781b ldrb r3, [r3, #0]
|
|
800e51c: 757b strb r3, [r7, #21]
|
|
/* destination Ethernet address is multicast */
|
|
dest = &mcastaddr;
|
|
800e51e: f107 0310 add.w r3, r7, #16
|
|
800e522: 61fb str r3, [r7, #28]
|
|
800e524: e090 b.n 800e648 <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)) &&
|
|
800e526: 687b ldr r3, [r7, #4]
|
|
800e528: 681a ldr r2, [r3, #0]
|
|
800e52a: 68fb ldr r3, [r7, #12]
|
|
800e52c: 3304 adds r3, #4
|
|
800e52e: 681b ldr r3, [r3, #0]
|
|
800e530: 405a eors r2, r3
|
|
800e532: 68fb ldr r3, [r7, #12]
|
|
800e534: 3308 adds r3, #8
|
|
800e536: 681b ldr r3, [r3, #0]
|
|
800e538: 4013 ands r3, r2
|
|
800e53a: 2b00 cmp r3, #0
|
|
800e53c: d012 beq.n 800e564 <etharp_output+0xe0>
|
|
!ip4_addr_islinklocal(ipaddr)) {
|
|
800e53e: 687b ldr r3, [r7, #4]
|
|
800e540: 681b ldr r3, [r3, #0]
|
|
800e542: b29b uxth r3, r3
|
|
if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) &&
|
|
800e544: f64f 62a9 movw r2, #65193 ; 0xfea9
|
|
800e548: 4293 cmp r3, r2
|
|
800e54a: d00b beq.n 800e564 <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))) {
|
|
800e54c: 68fb ldr r3, [r7, #12]
|
|
800e54e: 330c adds r3, #12
|
|
800e550: 681b ldr r3, [r3, #0]
|
|
800e552: 2b00 cmp r3, #0
|
|
800e554: d003 beq.n 800e55e <etharp_output+0xda>
|
|
/* send to hardware address of default gateway IP address */
|
|
dst_addr = netif_ip4_gw(netif);
|
|
800e556: 68fb ldr r3, [r7, #12]
|
|
800e558: 330c adds r3, #12
|
|
800e55a: 61bb str r3, [r7, #24]
|
|
800e55c: e002 b.n 800e564 <etharp_output+0xe0>
|
|
/* no default gateway available */
|
|
} else {
|
|
/* no route to destination error (default gateway missing) */
|
|
return ERR_RTE;
|
|
800e55e: f06f 0303 mvn.w r3, #3
|
|
800e562: e07d b.n 800e660 <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) &&
|
|
800e564: 4b46 ldr r3, [pc, #280] ; (800e680 <etharp_output+0x1fc>)
|
|
800e566: 781b ldrb r3, [r3, #0]
|
|
800e568: 4619 mov r1, r3
|
|
800e56a: 4a46 ldr r2, [pc, #280] ; (800e684 <etharp_output+0x200>)
|
|
800e56c: 460b mov r3, r1
|
|
800e56e: 005b lsls r3, r3, #1
|
|
800e570: 440b add r3, r1
|
|
800e572: 00db lsls r3, r3, #3
|
|
800e574: 4413 add r3, r2
|
|
800e576: 3314 adds r3, #20
|
|
800e578: 781b ldrb r3, [r3, #0]
|
|
800e57a: 2b01 cmp r3, #1
|
|
800e57c: d925 bls.n 800e5ca <etharp_output+0x146>
|
|
#if ETHARP_TABLE_MATCH_NETIF
|
|
(arp_table[etharp_cached_entry].netif == netif) &&
|
|
800e57e: 4b40 ldr r3, [pc, #256] ; (800e680 <etharp_output+0x1fc>)
|
|
800e580: 781b ldrb r3, [r3, #0]
|
|
800e582: 4619 mov r1, r3
|
|
800e584: 4a3f ldr r2, [pc, #252] ; (800e684 <etharp_output+0x200>)
|
|
800e586: 460b mov r3, r1
|
|
800e588: 005b lsls r3, r3, #1
|
|
800e58a: 440b add r3, r1
|
|
800e58c: 00db lsls r3, r3, #3
|
|
800e58e: 4413 add r3, r2
|
|
800e590: 3308 adds r3, #8
|
|
800e592: 681b ldr r3, [r3, #0]
|
|
if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) &&
|
|
800e594: 68fa ldr r2, [r7, #12]
|
|
800e596: 429a cmp r2, r3
|
|
800e598: d117 bne.n 800e5ca <etharp_output+0x146>
|
|
#endif
|
|
(ip4_addr_cmp(dst_addr, &arp_table[etharp_cached_entry].ipaddr))) {
|
|
800e59a: 69bb ldr r3, [r7, #24]
|
|
800e59c: 681a ldr r2, [r3, #0]
|
|
800e59e: 4b38 ldr r3, [pc, #224] ; (800e680 <etharp_output+0x1fc>)
|
|
800e5a0: 781b ldrb r3, [r3, #0]
|
|
800e5a2: 4618 mov r0, r3
|
|
800e5a4: 4937 ldr r1, [pc, #220] ; (800e684 <etharp_output+0x200>)
|
|
800e5a6: 4603 mov r3, r0
|
|
800e5a8: 005b lsls r3, r3, #1
|
|
800e5aa: 4403 add r3, r0
|
|
800e5ac: 00db lsls r3, r3, #3
|
|
800e5ae: 440b add r3, r1
|
|
800e5b0: 3304 adds r3, #4
|
|
800e5b2: 681b ldr r3, [r3, #0]
|
|
(arp_table[etharp_cached_entry].netif == netif) &&
|
|
800e5b4: 429a cmp r2, r3
|
|
800e5b6: d108 bne.n 800e5ca <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);
|
|
800e5b8: 4b31 ldr r3, [pc, #196] ; (800e680 <etharp_output+0x1fc>)
|
|
800e5ba: 781b ldrb r3, [r3, #0]
|
|
800e5bc: 461a mov r2, r3
|
|
800e5be: 68b9 ldr r1, [r7, #8]
|
|
800e5c0: 68f8 ldr r0, [r7, #12]
|
|
800e5c2: f7ff fec5 bl 800e350 <etharp_output_to_arp_index>
|
|
800e5c6: 4603 mov r3, r0
|
|
800e5c8: e04a b.n 800e660 <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++) {
|
|
800e5ca: 2300 movs r3, #0
|
|
800e5cc: 75fb strb r3, [r7, #23]
|
|
800e5ce: e031 b.n 800e634 <etharp_output+0x1b0>
|
|
if ((arp_table[i].state >= ETHARP_STATE_STABLE) &&
|
|
800e5d0: 7dfa ldrb r2, [r7, #23]
|
|
800e5d2: 492c ldr r1, [pc, #176] ; (800e684 <etharp_output+0x200>)
|
|
800e5d4: 4613 mov r3, r2
|
|
800e5d6: 005b lsls r3, r3, #1
|
|
800e5d8: 4413 add r3, r2
|
|
800e5da: 00db lsls r3, r3, #3
|
|
800e5dc: 440b add r3, r1
|
|
800e5de: 3314 adds r3, #20
|
|
800e5e0: 781b ldrb r3, [r3, #0]
|
|
800e5e2: 2b01 cmp r3, #1
|
|
800e5e4: d923 bls.n 800e62e <etharp_output+0x1aa>
|
|
#if ETHARP_TABLE_MATCH_NETIF
|
|
(arp_table[i].netif == netif) &&
|
|
800e5e6: 7dfa ldrb r2, [r7, #23]
|
|
800e5e8: 4926 ldr r1, [pc, #152] ; (800e684 <etharp_output+0x200>)
|
|
800e5ea: 4613 mov r3, r2
|
|
800e5ec: 005b lsls r3, r3, #1
|
|
800e5ee: 4413 add r3, r2
|
|
800e5f0: 00db lsls r3, r3, #3
|
|
800e5f2: 440b add r3, r1
|
|
800e5f4: 3308 adds r3, #8
|
|
800e5f6: 681b ldr r3, [r3, #0]
|
|
if ((arp_table[i].state >= ETHARP_STATE_STABLE) &&
|
|
800e5f8: 68fa ldr r2, [r7, #12]
|
|
800e5fa: 429a cmp r2, r3
|
|
800e5fc: d117 bne.n 800e62e <etharp_output+0x1aa>
|
|
#endif
|
|
(ip4_addr_cmp(dst_addr, &arp_table[i].ipaddr))) {
|
|
800e5fe: 69bb ldr r3, [r7, #24]
|
|
800e600: 6819 ldr r1, [r3, #0]
|
|
800e602: 7dfa ldrb r2, [r7, #23]
|
|
800e604: 481f ldr r0, [pc, #124] ; (800e684 <etharp_output+0x200>)
|
|
800e606: 4613 mov r3, r2
|
|
800e608: 005b lsls r3, r3, #1
|
|
800e60a: 4413 add r3, r2
|
|
800e60c: 00db lsls r3, r3, #3
|
|
800e60e: 4403 add r3, r0
|
|
800e610: 3304 adds r3, #4
|
|
800e612: 681b ldr r3, [r3, #0]
|
|
(arp_table[i].netif == netif) &&
|
|
800e614: 4299 cmp r1, r3
|
|
800e616: d10a bne.n 800e62e <etharp_output+0x1aa>
|
|
/* found an existing, stable entry */
|
|
ETHARP_SET_ADDRHINT(netif, i);
|
|
800e618: 4a19 ldr r2, [pc, #100] ; (800e680 <etharp_output+0x1fc>)
|
|
800e61a: 7dfb ldrb r3, [r7, #23]
|
|
800e61c: 7013 strb r3, [r2, #0]
|
|
return etharp_output_to_arp_index(netif, q, i);
|
|
800e61e: 7dfb ldrb r3, [r7, #23]
|
|
800e620: 461a mov r2, r3
|
|
800e622: 68b9 ldr r1, [r7, #8]
|
|
800e624: 68f8 ldr r0, [r7, #12]
|
|
800e626: f7ff fe93 bl 800e350 <etharp_output_to_arp_index>
|
|
800e62a: 4603 mov r3, r0
|
|
800e62c: e018 b.n 800e660 <etharp_output+0x1dc>
|
|
for (i = 0; i < ARP_TABLE_SIZE; i++) {
|
|
800e62e: 7dfb ldrb r3, [r7, #23]
|
|
800e630: 3301 adds r3, #1
|
|
800e632: 75fb strb r3, [r7, #23]
|
|
800e634: 7dfb ldrb r3, [r7, #23]
|
|
800e636: 2b09 cmp r3, #9
|
|
800e638: d9ca bls.n 800e5d0 <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);
|
|
800e63a: 68ba ldr r2, [r7, #8]
|
|
800e63c: 69b9 ldr r1, [r7, #24]
|
|
800e63e: 68f8 ldr r0, [r7, #12]
|
|
800e640: f000 f822 bl 800e688 <etharp_query>
|
|
800e644: 4603 mov r3, r0
|
|
800e646: e00b b.n 800e660 <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);
|
|
800e648: 68fb ldr r3, [r7, #12]
|
|
800e64a: f103 022a add.w r2, r3, #42 ; 0x2a
|
|
800e64e: f44f 6300 mov.w r3, #2048 ; 0x800
|
|
800e652: 9300 str r3, [sp, #0]
|
|
800e654: 69fb ldr r3, [r7, #28]
|
|
800e656: 68b9 ldr r1, [r7, #8]
|
|
800e658: 68f8 ldr r0, [r7, #12]
|
|
800e65a: f001 fea1 bl 80103a0 <ethernet_output>
|
|
800e65e: 4603 mov r3, r0
|
|
}
|
|
800e660: 4618 mov r0, r3
|
|
800e662: 3720 adds r7, #32
|
|
800e664: 46bd mov sp, r7
|
|
800e666: bd80 pop {r7, pc}
|
|
800e668: 0801770c .word 0x0801770c
|
|
800e66c: 0801785c .word 0x0801785c
|
|
800e670: 08017784 .word 0x08017784
|
|
800e674: 080178ac .word 0x080178ac
|
|
800e678: 0801784c .word 0x0801784c
|
|
800e67c: 08017f44 .word 0x08017f44
|
|
800e680: 20008d84 .word 0x20008d84
|
|
800e684: 20008c94 .word 0x20008c94
|
|
|
|
0800e688 <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)
|
|
{
|
|
800e688: b580 push {r7, lr}
|
|
800e68a: b08c sub sp, #48 ; 0x30
|
|
800e68c: af02 add r7, sp, #8
|
|
800e68e: 60f8 str r0, [r7, #12]
|
|
800e690: 60b9 str r1, [r7, #8]
|
|
800e692: 607a str r2, [r7, #4]
|
|
struct eth_addr *srcaddr = (struct eth_addr *)netif->hwaddr;
|
|
800e694: 68fb ldr r3, [r7, #12]
|
|
800e696: 332a adds r3, #42 ; 0x2a
|
|
800e698: 617b str r3, [r7, #20]
|
|
err_t result = ERR_MEM;
|
|
800e69a: 23ff movs r3, #255 ; 0xff
|
|
800e69c: f887 3027 strb.w r3, [r7, #39] ; 0x27
|
|
int is_new_entry = 0;
|
|
800e6a0: 2300 movs r3, #0
|
|
800e6a2: 623b str r3, [r7, #32]
|
|
s16_t i_err;
|
|
netif_addr_idx_t i;
|
|
|
|
/* non-unicast address? */
|
|
if (ip4_addr_isbroadcast(ipaddr, netif) ||
|
|
800e6a4: 68bb ldr r3, [r7, #8]
|
|
800e6a6: 681b ldr r3, [r3, #0]
|
|
800e6a8: 68f9 ldr r1, [r7, #12]
|
|
800e6aa: 4618 mov r0, r3
|
|
800e6ac: f000 fe2c bl 800f308 <ip4_addr_isbroadcast_u32>
|
|
800e6b0: 4603 mov r3, r0
|
|
800e6b2: 2b00 cmp r3, #0
|
|
800e6b4: d10c bne.n 800e6d0 <etharp_query+0x48>
|
|
ip4_addr_ismulticast(ipaddr) ||
|
|
800e6b6: 68bb ldr r3, [r7, #8]
|
|
800e6b8: 681b ldr r3, [r3, #0]
|
|
800e6ba: f003 03f0 and.w r3, r3, #240 ; 0xf0
|
|
if (ip4_addr_isbroadcast(ipaddr, netif) ||
|
|
800e6be: 2be0 cmp r3, #224 ; 0xe0
|
|
800e6c0: d006 beq.n 800e6d0 <etharp_query+0x48>
|
|
ip4_addr_ismulticast(ipaddr) ||
|
|
800e6c2: 68bb ldr r3, [r7, #8]
|
|
800e6c4: 2b00 cmp r3, #0
|
|
800e6c6: d003 beq.n 800e6d0 <etharp_query+0x48>
|
|
ip4_addr_isany(ipaddr)) {
|
|
800e6c8: 68bb ldr r3, [r7, #8]
|
|
800e6ca: 681b ldr r3, [r3, #0]
|
|
800e6cc: 2b00 cmp r3, #0
|
|
800e6ce: d102 bne.n 800e6d6 <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;
|
|
800e6d0: f06f 030f mvn.w r3, #15
|
|
800e6d4: e101 b.n 800e8da <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);
|
|
800e6d6: 68fa ldr r2, [r7, #12]
|
|
800e6d8: 2101 movs r1, #1
|
|
800e6da: 68b8 ldr r0, [r7, #8]
|
|
800e6dc: f7ff fb5c bl 800dd98 <etharp_find_entry>
|
|
800e6e0: 4603 mov r3, r0
|
|
800e6e2: 827b strh r3, [r7, #18]
|
|
|
|
/* could not find or create entry? */
|
|
if (i_err < 0) {
|
|
800e6e4: f9b7 3012 ldrsh.w r3, [r7, #18]
|
|
800e6e8: 2b00 cmp r3, #0
|
|
800e6ea: da02 bge.n 800e6f2 <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;
|
|
800e6ec: 8a7b ldrh r3, [r7, #18]
|
|
800e6ee: b25b sxtb r3, r3
|
|
800e6f0: e0f3 b.n 800e8da <etharp_query+0x252>
|
|
}
|
|
LWIP_ASSERT("type overflow", (size_t)i_err < NETIF_ADDR_IDX_MAX);
|
|
800e6f2: 8a7b ldrh r3, [r7, #18]
|
|
800e6f4: 2b7e cmp r3, #126 ; 0x7e
|
|
800e6f6: d906 bls.n 800e706 <etharp_query+0x7e>
|
|
800e6f8: 4b7a ldr r3, [pc, #488] ; (800e8e4 <etharp_query+0x25c>)
|
|
800e6fa: f240 32c1 movw r2, #961 ; 0x3c1
|
|
800e6fe: 497a ldr r1, [pc, #488] ; (800e8e8 <etharp_query+0x260>)
|
|
800e700: 487a ldr r0, [pc, #488] ; (800e8ec <etharp_query+0x264>)
|
|
800e702: f001 fef9 bl 80104f8 <printf>
|
|
i = (netif_addr_idx_t)i_err;
|
|
800e706: 8a7b ldrh r3, [r7, #18]
|
|
800e708: 747b strb r3, [r7, #17]
|
|
|
|
/* mark a fresh entry as pending (we just sent a request) */
|
|
if (arp_table[i].state == ETHARP_STATE_EMPTY) {
|
|
800e70a: 7c7a ldrb r2, [r7, #17]
|
|
800e70c: 4978 ldr r1, [pc, #480] ; (800e8f0 <etharp_query+0x268>)
|
|
800e70e: 4613 mov r3, r2
|
|
800e710: 005b lsls r3, r3, #1
|
|
800e712: 4413 add r3, r2
|
|
800e714: 00db lsls r3, r3, #3
|
|
800e716: 440b add r3, r1
|
|
800e718: 3314 adds r3, #20
|
|
800e71a: 781b ldrb r3, [r3, #0]
|
|
800e71c: 2b00 cmp r3, #0
|
|
800e71e: d115 bne.n 800e74c <etharp_query+0xc4>
|
|
is_new_entry = 1;
|
|
800e720: 2301 movs r3, #1
|
|
800e722: 623b str r3, [r7, #32]
|
|
arp_table[i].state = ETHARP_STATE_PENDING;
|
|
800e724: 7c7a ldrb r2, [r7, #17]
|
|
800e726: 4972 ldr r1, [pc, #456] ; (800e8f0 <etharp_query+0x268>)
|
|
800e728: 4613 mov r3, r2
|
|
800e72a: 005b lsls r3, r3, #1
|
|
800e72c: 4413 add r3, r2
|
|
800e72e: 00db lsls r3, r3, #3
|
|
800e730: 440b add r3, r1
|
|
800e732: 3314 adds r3, #20
|
|
800e734: 2201 movs r2, #1
|
|
800e736: 701a strb r2, [r3, #0]
|
|
/* record network interface for re-sending arp request in etharp_tmr */
|
|
arp_table[i].netif = netif;
|
|
800e738: 7c7a ldrb r2, [r7, #17]
|
|
800e73a: 496d ldr r1, [pc, #436] ; (800e8f0 <etharp_query+0x268>)
|
|
800e73c: 4613 mov r3, r2
|
|
800e73e: 005b lsls r3, r3, #1
|
|
800e740: 4413 add r3, r2
|
|
800e742: 00db lsls r3, r3, #3
|
|
800e744: 440b add r3, r1
|
|
800e746: 3308 adds r3, #8
|
|
800e748: 68fa ldr r2, [r7, #12]
|
|
800e74a: 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",
|
|
800e74c: 7c7a ldrb r2, [r7, #17]
|
|
800e74e: 4968 ldr r1, [pc, #416] ; (800e8f0 <etharp_query+0x268>)
|
|
800e750: 4613 mov r3, r2
|
|
800e752: 005b lsls r3, r3, #1
|
|
800e754: 4413 add r3, r2
|
|
800e756: 00db lsls r3, r3, #3
|
|
800e758: 440b add r3, r1
|
|
800e75a: 3314 adds r3, #20
|
|
800e75c: 781b ldrb r3, [r3, #0]
|
|
800e75e: 2b01 cmp r3, #1
|
|
800e760: d011 beq.n 800e786 <etharp_query+0xfe>
|
|
800e762: 7c7a ldrb r2, [r7, #17]
|
|
800e764: 4962 ldr r1, [pc, #392] ; (800e8f0 <etharp_query+0x268>)
|
|
800e766: 4613 mov r3, r2
|
|
800e768: 005b lsls r3, r3, #1
|
|
800e76a: 4413 add r3, r2
|
|
800e76c: 00db lsls r3, r3, #3
|
|
800e76e: 440b add r3, r1
|
|
800e770: 3314 adds r3, #20
|
|
800e772: 781b ldrb r3, [r3, #0]
|
|
800e774: 2b01 cmp r3, #1
|
|
800e776: d806 bhi.n 800e786 <etharp_query+0xfe>
|
|
800e778: 4b5a ldr r3, [pc, #360] ; (800e8e4 <etharp_query+0x25c>)
|
|
800e77a: f240 32cd movw r2, #973 ; 0x3cd
|
|
800e77e: 495d ldr r1, [pc, #372] ; (800e8f4 <etharp_query+0x26c>)
|
|
800e780: 485a ldr r0, [pc, #360] ; (800e8ec <etharp_query+0x264>)
|
|
800e782: f001 feb9 bl 80104f8 <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)) {
|
|
800e786: 6a3b ldr r3, [r7, #32]
|
|
800e788: 2b00 cmp r3, #0
|
|
800e78a: d102 bne.n 800e792 <etharp_query+0x10a>
|
|
800e78c: 687b ldr r3, [r7, #4]
|
|
800e78e: 2b00 cmp r3, #0
|
|
800e790: d10c bne.n 800e7ac <etharp_query+0x124>
|
|
/* try to resolve it; send out ARP request */
|
|
result = etharp_request(netif, ipaddr);
|
|
800e792: 68b9 ldr r1, [r7, #8]
|
|
800e794: 68f8 ldr r0, [r7, #12]
|
|
800e796: f000 f963 bl 800ea60 <etharp_request>
|
|
800e79a: 4603 mov r3, r0
|
|
800e79c: 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) {
|
|
800e7a0: 687b ldr r3, [r7, #4]
|
|
800e7a2: 2b00 cmp r3, #0
|
|
800e7a4: d102 bne.n 800e7ac <etharp_query+0x124>
|
|
return result;
|
|
800e7a6: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27
|
|
800e7aa: e096 b.n 800e8da <etharp_query+0x252>
|
|
}
|
|
}
|
|
|
|
/* packet given? */
|
|
LWIP_ASSERT("q != NULL", q != NULL);
|
|
800e7ac: 687b ldr r3, [r7, #4]
|
|
800e7ae: 2b00 cmp r3, #0
|
|
800e7b0: d106 bne.n 800e7c0 <etharp_query+0x138>
|
|
800e7b2: 4b4c ldr r3, [pc, #304] ; (800e8e4 <etharp_query+0x25c>)
|
|
800e7b4: f240 32e1 movw r2, #993 ; 0x3e1
|
|
800e7b8: 494f ldr r1, [pc, #316] ; (800e8f8 <etharp_query+0x270>)
|
|
800e7ba: 484c ldr r0, [pc, #304] ; (800e8ec <etharp_query+0x264>)
|
|
800e7bc: f001 fe9c bl 80104f8 <printf>
|
|
/* stable entry? */
|
|
if (arp_table[i].state >= ETHARP_STATE_STABLE) {
|
|
800e7c0: 7c7a ldrb r2, [r7, #17]
|
|
800e7c2: 494b ldr r1, [pc, #300] ; (800e8f0 <etharp_query+0x268>)
|
|
800e7c4: 4613 mov r3, r2
|
|
800e7c6: 005b lsls r3, r3, #1
|
|
800e7c8: 4413 add r3, r2
|
|
800e7ca: 00db lsls r3, r3, #3
|
|
800e7cc: 440b add r3, r1
|
|
800e7ce: 3314 adds r3, #20
|
|
800e7d0: 781b ldrb r3, [r3, #0]
|
|
800e7d2: 2b01 cmp r3, #1
|
|
800e7d4: d917 bls.n 800e806 <etharp_query+0x17e>
|
|
/* we have a valid IP->Ethernet address mapping */
|
|
ETHARP_SET_ADDRHINT(netif, i);
|
|
800e7d6: 4a49 ldr r2, [pc, #292] ; (800e8fc <etharp_query+0x274>)
|
|
800e7d8: 7c7b ldrb r3, [r7, #17]
|
|
800e7da: 7013 strb r3, [r2, #0]
|
|
/* send the packet */
|
|
result = ethernet_output(netif, q, srcaddr, &(arp_table[i].ethaddr), ETHTYPE_IP);
|
|
800e7dc: 7c7a ldrb r2, [r7, #17]
|
|
800e7de: 4613 mov r3, r2
|
|
800e7e0: 005b lsls r3, r3, #1
|
|
800e7e2: 4413 add r3, r2
|
|
800e7e4: 00db lsls r3, r3, #3
|
|
800e7e6: 3308 adds r3, #8
|
|
800e7e8: 4a41 ldr r2, [pc, #260] ; (800e8f0 <etharp_query+0x268>)
|
|
800e7ea: 4413 add r3, r2
|
|
800e7ec: 3304 adds r3, #4
|
|
800e7ee: f44f 6200 mov.w r2, #2048 ; 0x800
|
|
800e7f2: 9200 str r2, [sp, #0]
|
|
800e7f4: 697a ldr r2, [r7, #20]
|
|
800e7f6: 6879 ldr r1, [r7, #4]
|
|
800e7f8: 68f8 ldr r0, [r7, #12]
|
|
800e7fa: f001 fdd1 bl 80103a0 <ethernet_output>
|
|
800e7fe: 4603 mov r3, r0
|
|
800e800: f887 3027 strb.w r3, [r7, #39] ; 0x27
|
|
800e804: e067 b.n 800e8d6 <etharp_query+0x24e>
|
|
/* pending entry? (either just created or already pending */
|
|
} else if (arp_table[i].state == ETHARP_STATE_PENDING) {
|
|
800e806: 7c7a ldrb r2, [r7, #17]
|
|
800e808: 4939 ldr r1, [pc, #228] ; (800e8f0 <etharp_query+0x268>)
|
|
800e80a: 4613 mov r3, r2
|
|
800e80c: 005b lsls r3, r3, #1
|
|
800e80e: 4413 add r3, r2
|
|
800e810: 00db lsls r3, r3, #3
|
|
800e812: 440b add r3, r1
|
|
800e814: 3314 adds r3, #20
|
|
800e816: 781b ldrb r3, [r3, #0]
|
|
800e818: 2b01 cmp r3, #1
|
|
800e81a: d15c bne.n 800e8d6 <etharp_query+0x24e>
|
|
/* entry is still pending, queue the given packet 'q' */
|
|
struct pbuf *p;
|
|
int copy_needed = 0;
|
|
800e81c: 2300 movs r3, #0
|
|
800e81e: 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;
|
|
800e820: 687b ldr r3, [r7, #4]
|
|
800e822: 61fb str r3, [r7, #28]
|
|
while (p) {
|
|
800e824: e01c b.n 800e860 <etharp_query+0x1d8>
|
|
LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0));
|
|
800e826: 69fb ldr r3, [r7, #28]
|
|
800e828: 895a ldrh r2, [r3, #10]
|
|
800e82a: 69fb ldr r3, [r7, #28]
|
|
800e82c: 891b ldrh r3, [r3, #8]
|
|
800e82e: 429a cmp r2, r3
|
|
800e830: d10a bne.n 800e848 <etharp_query+0x1c0>
|
|
800e832: 69fb ldr r3, [r7, #28]
|
|
800e834: 681b ldr r3, [r3, #0]
|
|
800e836: 2b00 cmp r3, #0
|
|
800e838: d006 beq.n 800e848 <etharp_query+0x1c0>
|
|
800e83a: 4b2a ldr r3, [pc, #168] ; (800e8e4 <etharp_query+0x25c>)
|
|
800e83c: f240 32f1 movw r2, #1009 ; 0x3f1
|
|
800e840: 492f ldr r1, [pc, #188] ; (800e900 <etharp_query+0x278>)
|
|
800e842: 482a ldr r0, [pc, #168] ; (800e8ec <etharp_query+0x264>)
|
|
800e844: f001 fe58 bl 80104f8 <printf>
|
|
if (PBUF_NEEDS_COPY(p)) {
|
|
800e848: 69fb ldr r3, [r7, #28]
|
|
800e84a: 7b1b ldrb r3, [r3, #12]
|
|
800e84c: f003 0340 and.w r3, r3, #64 ; 0x40
|
|
800e850: 2b00 cmp r3, #0
|
|
800e852: d002 beq.n 800e85a <etharp_query+0x1d2>
|
|
copy_needed = 1;
|
|
800e854: 2301 movs r3, #1
|
|
800e856: 61bb str r3, [r7, #24]
|
|
break;
|
|
800e858: e005 b.n 800e866 <etharp_query+0x1de>
|
|
}
|
|
p = p->next;
|
|
800e85a: 69fb ldr r3, [r7, #28]
|
|
800e85c: 681b ldr r3, [r3, #0]
|
|
800e85e: 61fb str r3, [r7, #28]
|
|
while (p) {
|
|
800e860: 69fb ldr r3, [r7, #28]
|
|
800e862: 2b00 cmp r3, #0
|
|
800e864: d1df bne.n 800e826 <etharp_query+0x19e>
|
|
}
|
|
if (copy_needed) {
|
|
800e866: 69bb ldr r3, [r7, #24]
|
|
800e868: 2b00 cmp r3, #0
|
|
800e86a: d007 beq.n 800e87c <etharp_query+0x1f4>
|
|
/* copy the whole packet into new pbufs */
|
|
p = pbuf_clone(PBUF_LINK, PBUF_RAM, q);
|
|
800e86c: 687a ldr r2, [r7, #4]
|
|
800e86e: f44f 7120 mov.w r1, #640 ; 0x280
|
|
800e872: 200e movs r0, #14
|
|
800e874: f7f7 fb34 bl 8005ee0 <pbuf_clone>
|
|
800e878: 61f8 str r0, [r7, #28]
|
|
800e87a: e004 b.n 800e886 <etharp_query+0x1fe>
|
|
} else {
|
|
/* referencing the old pbuf is enough */
|
|
p = q;
|
|
800e87c: 687b ldr r3, [r7, #4]
|
|
800e87e: 61fb str r3, [r7, #28]
|
|
pbuf_ref(p);
|
|
800e880: 69f8 ldr r0, [r7, #28]
|
|
800e882: f7f7 f961 bl 8005b48 <pbuf_ref>
|
|
}
|
|
/* packet could be taken over? */
|
|
if (p != NULL) {
|
|
800e886: 69fb ldr r3, [r7, #28]
|
|
800e888: 2b00 cmp r3, #0
|
|
800e88a: d021 beq.n 800e8d0 <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) {
|
|
800e88c: 7c7a ldrb r2, [r7, #17]
|
|
800e88e: 4918 ldr r1, [pc, #96] ; (800e8f0 <etharp_query+0x268>)
|
|
800e890: 4613 mov r3, r2
|
|
800e892: 005b lsls r3, r3, #1
|
|
800e894: 4413 add r3, r2
|
|
800e896: 00db lsls r3, r3, #3
|
|
800e898: 440b add r3, r1
|
|
800e89a: 681b ldr r3, [r3, #0]
|
|
800e89c: 2b00 cmp r3, #0
|
|
800e89e: d00a beq.n 800e8b6 <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);
|
|
800e8a0: 7c7a ldrb r2, [r7, #17]
|
|
800e8a2: 4913 ldr r1, [pc, #76] ; (800e8f0 <etharp_query+0x268>)
|
|
800e8a4: 4613 mov r3, r2
|
|
800e8a6: 005b lsls r3, r3, #1
|
|
800e8a8: 4413 add r3, r2
|
|
800e8aa: 00db lsls r3, r3, #3
|
|
800e8ac: 440b add r3, r1
|
|
800e8ae: 681b ldr r3, [r3, #0]
|
|
800e8b0: 4618 mov r0, r3
|
|
800e8b2: f7f7 f8a9 bl 8005a08 <pbuf_free>
|
|
}
|
|
arp_table[i].q = p;
|
|
800e8b6: 7c7a ldrb r2, [r7, #17]
|
|
800e8b8: 490d ldr r1, [pc, #52] ; (800e8f0 <etharp_query+0x268>)
|
|
800e8ba: 4613 mov r3, r2
|
|
800e8bc: 005b lsls r3, r3, #1
|
|
800e8be: 4413 add r3, r2
|
|
800e8c0: 00db lsls r3, r3, #3
|
|
800e8c2: 440b add r3, r1
|
|
800e8c4: 69fa ldr r2, [r7, #28]
|
|
800e8c6: 601a str r2, [r3, #0]
|
|
result = ERR_OK;
|
|
800e8c8: 2300 movs r3, #0
|
|
800e8ca: f887 3027 strb.w r3, [r7, #39] ; 0x27
|
|
800e8ce: e002 b.n 800e8d6 <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;
|
|
800e8d0: 23ff movs r3, #255 ; 0xff
|
|
800e8d2: f887 3027 strb.w r3, [r7, #39] ; 0x27
|
|
}
|
|
}
|
|
return result;
|
|
800e8d6: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27
|
|
}
|
|
800e8da: 4618 mov r0, r3
|
|
800e8dc: 3728 adds r7, #40 ; 0x28
|
|
800e8de: 46bd mov sp, r7
|
|
800e8e0: bd80 pop {r7, pc}
|
|
800e8e2: bf00 nop
|
|
800e8e4: 0801770c .word 0x0801770c
|
|
800e8e8: 080178b8 .word 0x080178b8
|
|
800e8ec: 08017784 .word 0x08017784
|
|
800e8f0: 20008c94 .word 0x20008c94
|
|
800e8f4: 080178c8 .word 0x080178c8
|
|
800e8f8: 080178ac .word 0x080178ac
|
|
800e8fc: 20008d84 .word 0x20008d84
|
|
800e900: 080178f0 .word 0x080178f0
|
|
|
|
0800e904 <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)
|
|
{
|
|
800e904: b580 push {r7, lr}
|
|
800e906: b08a sub sp, #40 ; 0x28
|
|
800e908: af02 add r7, sp, #8
|
|
800e90a: 60f8 str r0, [r7, #12]
|
|
800e90c: 60b9 str r1, [r7, #8]
|
|
800e90e: 607a str r2, [r7, #4]
|
|
800e910: 603b str r3, [r7, #0]
|
|
struct pbuf *p;
|
|
err_t result = ERR_OK;
|
|
800e912: 2300 movs r3, #0
|
|
800e914: 77fb strb r3, [r7, #31]
|
|
struct etharp_hdr *hdr;
|
|
|
|
LWIP_ASSERT("netif != NULL", netif != NULL);
|
|
800e916: 68fb ldr r3, [r7, #12]
|
|
800e918: 2b00 cmp r3, #0
|
|
800e91a: d106 bne.n 800e92a <etharp_raw+0x26>
|
|
800e91c: 4b3a ldr r3, [pc, #232] ; (800ea08 <etharp_raw+0x104>)
|
|
800e91e: f240 4257 movw r2, #1111 ; 0x457
|
|
800e922: 493a ldr r1, [pc, #232] ; (800ea0c <etharp_raw+0x108>)
|
|
800e924: 483a ldr r0, [pc, #232] ; (800ea10 <etharp_raw+0x10c>)
|
|
800e926: f001 fde7 bl 80104f8 <printf>
|
|
|
|
/* allocate a pbuf for the outgoing ARP request packet */
|
|
p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_HDR, PBUF_RAM);
|
|
800e92a: f44f 7220 mov.w r2, #640 ; 0x280
|
|
800e92e: 211c movs r1, #28
|
|
800e930: 200e movs r0, #14
|
|
800e932: f7f6 fd85 bl 8005440 <pbuf_alloc>
|
|
800e936: 61b8 str r0, [r7, #24]
|
|
/* could allocate a pbuf for an ARP request? */
|
|
if (p == NULL) {
|
|
800e938: 69bb ldr r3, [r7, #24]
|
|
800e93a: 2b00 cmp r3, #0
|
|
800e93c: d102 bne.n 800e944 <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;
|
|
800e93e: f04f 33ff mov.w r3, #4294967295
|
|
800e942: e05d b.n 800ea00 <etharp_raw+0xfc>
|
|
}
|
|
LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr",
|
|
800e944: 69bb ldr r3, [r7, #24]
|
|
800e946: 895b ldrh r3, [r3, #10]
|
|
800e948: 2b1b cmp r3, #27
|
|
800e94a: d806 bhi.n 800e95a <etharp_raw+0x56>
|
|
800e94c: 4b2e ldr r3, [pc, #184] ; (800ea08 <etharp_raw+0x104>)
|
|
800e94e: f240 4262 movw r2, #1122 ; 0x462
|
|
800e952: 4930 ldr r1, [pc, #192] ; (800ea14 <etharp_raw+0x110>)
|
|
800e954: 482e ldr r0, [pc, #184] ; (800ea10 <etharp_raw+0x10c>)
|
|
800e956: f001 fdcf bl 80104f8 <printf>
|
|
(p->len >= SIZEOF_ETHARP_HDR));
|
|
|
|
hdr = (struct etharp_hdr *)p->payload;
|
|
800e95a: 69bb ldr r3, [r7, #24]
|
|
800e95c: 685b ldr r3, [r3, #4]
|
|
800e95e: 617b str r3, [r7, #20]
|
|
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n"));
|
|
hdr->opcode = lwip_htons(opcode);
|
|
800e960: 8ebb ldrh r3, [r7, #52] ; 0x34
|
|
800e962: 4618 mov r0, r3
|
|
800e964: f7f5 fce6 bl 8004334 <lwip_htons>
|
|
800e968: 4603 mov r3, r0
|
|
800e96a: 461a mov r2, r3
|
|
800e96c: 697b ldr r3, [r7, #20]
|
|
800e96e: 80da strh r2, [r3, #6]
|
|
|
|
LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!",
|
|
800e970: 68fb ldr r3, [r7, #12]
|
|
800e972: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
|
|
800e976: 2b06 cmp r3, #6
|
|
800e978: d006 beq.n 800e988 <etharp_raw+0x84>
|
|
800e97a: 4b23 ldr r3, [pc, #140] ; (800ea08 <etharp_raw+0x104>)
|
|
800e97c: f240 4269 movw r2, #1129 ; 0x469
|
|
800e980: 4925 ldr r1, [pc, #148] ; (800ea18 <etharp_raw+0x114>)
|
|
800e982: 4823 ldr r0, [pc, #140] ; (800ea10 <etharp_raw+0x10c>)
|
|
800e984: f001 fdb8 bl 80104f8 <printf>
|
|
(netif->hwaddr_len == ETH_HWADDR_LEN));
|
|
|
|
/* Write the ARP MAC-Addresses */
|
|
SMEMCPY(&hdr->shwaddr, hwsrc_addr, ETH_HWADDR_LEN);
|
|
800e988: 697b ldr r3, [r7, #20]
|
|
800e98a: 3308 adds r3, #8
|
|
800e98c: 2206 movs r2, #6
|
|
800e98e: 6839 ldr r1, [r7, #0]
|
|
800e990: 4618 mov r0, r3
|
|
800e992: f001 fd81 bl 8010498 <memcpy>
|
|
SMEMCPY(&hdr->dhwaddr, hwdst_addr, ETH_HWADDR_LEN);
|
|
800e996: 697b ldr r3, [r7, #20]
|
|
800e998: 3312 adds r3, #18
|
|
800e99a: 2206 movs r2, #6
|
|
800e99c: 6af9 ldr r1, [r7, #44] ; 0x2c
|
|
800e99e: 4618 mov r0, r3
|
|
800e9a0: f001 fd7a bl 8010498 <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);
|
|
800e9a4: 697b ldr r3, [r7, #20]
|
|
800e9a6: 330e adds r3, #14
|
|
800e9a8: 6aba ldr r2, [r7, #40] ; 0x28
|
|
800e9aa: 6812 ldr r2, [r2, #0]
|
|
800e9ac: 601a str r2, [r3, #0]
|
|
IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->dipaddr, ipdst_addr);
|
|
800e9ae: 697b ldr r3, [r7, #20]
|
|
800e9b0: 3318 adds r3, #24
|
|
800e9b2: 6b3a ldr r2, [r7, #48] ; 0x30
|
|
800e9b4: 6812 ldr r2, [r2, #0]
|
|
800e9b6: 601a str r2, [r3, #0]
|
|
|
|
hdr->hwtype = PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET);
|
|
800e9b8: 697b ldr r3, [r7, #20]
|
|
800e9ba: 2200 movs r2, #0
|
|
800e9bc: 701a strb r2, [r3, #0]
|
|
800e9be: 2200 movs r2, #0
|
|
800e9c0: f042 0201 orr.w r2, r2, #1
|
|
800e9c4: 705a strb r2, [r3, #1]
|
|
hdr->proto = PP_HTONS(ETHTYPE_IP);
|
|
800e9c6: 697b ldr r3, [r7, #20]
|
|
800e9c8: 2200 movs r2, #0
|
|
800e9ca: f042 0208 orr.w r2, r2, #8
|
|
800e9ce: 709a strb r2, [r3, #2]
|
|
800e9d0: 2200 movs r2, #0
|
|
800e9d2: 70da strb r2, [r3, #3]
|
|
/* set hwlen and protolen */
|
|
hdr->hwlen = ETH_HWADDR_LEN;
|
|
800e9d4: 697b ldr r3, [r7, #20]
|
|
800e9d6: 2206 movs r2, #6
|
|
800e9d8: 711a strb r2, [r3, #4]
|
|
hdr->protolen = sizeof(ip4_addr_t);
|
|
800e9da: 697b ldr r3, [r7, #20]
|
|
800e9dc: 2204 movs r2, #4
|
|
800e9de: 715a strb r2, [r3, #5]
|
|
if (ip4_addr_islinklocal(ipsrc_addr)) {
|
|
ethernet_output(netif, p, ethsrc_addr, ðbroadcast, ETHTYPE_ARP);
|
|
} else
|
|
#endif /* LWIP_AUTOIP */
|
|
{
|
|
ethernet_output(netif, p, ethsrc_addr, ethdst_addr, ETHTYPE_ARP);
|
|
800e9e0: f640 0306 movw r3, #2054 ; 0x806
|
|
800e9e4: 9300 str r3, [sp, #0]
|
|
800e9e6: 687b ldr r3, [r7, #4]
|
|
800e9e8: 68ba ldr r2, [r7, #8]
|
|
800e9ea: 69b9 ldr r1, [r7, #24]
|
|
800e9ec: 68f8 ldr r0, [r7, #12]
|
|
800e9ee: f001 fcd7 bl 80103a0 <ethernet_output>
|
|
}
|
|
|
|
ETHARP_STATS_INC(etharp.xmit);
|
|
/* free ARP query packet */
|
|
pbuf_free(p);
|
|
800e9f2: 69b8 ldr r0, [r7, #24]
|
|
800e9f4: f7f7 f808 bl 8005a08 <pbuf_free>
|
|
p = NULL;
|
|
800e9f8: 2300 movs r3, #0
|
|
800e9fa: 61bb str r3, [r7, #24]
|
|
/* could not allocate pbuf for ARP request */
|
|
|
|
return result;
|
|
800e9fc: f997 301f ldrsb.w r3, [r7, #31]
|
|
}
|
|
800ea00: 4618 mov r0, r3
|
|
800ea02: 3720 adds r7, #32
|
|
800ea04: 46bd mov sp, r7
|
|
800ea06: bd80 pop {r7, pc}
|
|
800ea08: 0801770c .word 0x0801770c
|
|
800ea0c: 0801785c .word 0x0801785c
|
|
800ea10: 08017784 .word 0x08017784
|
|
800ea14: 0801790c .word 0x0801790c
|
|
800ea18: 08017940 .word 0x08017940
|
|
|
|
0800ea1c <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)
|
|
{
|
|
800ea1c: b580 push {r7, lr}
|
|
800ea1e: b088 sub sp, #32
|
|
800ea20: af04 add r7, sp, #16
|
|
800ea22: 60f8 str r0, [r7, #12]
|
|
800ea24: 60b9 str r1, [r7, #8]
|
|
800ea26: 607a str r2, [r7, #4]
|
|
return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr,
|
|
800ea28: 68fb ldr r3, [r7, #12]
|
|
800ea2a: f103 012a add.w r1, r3, #42 ; 0x2a
|
|
(struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), ðzero,
|
|
800ea2e: 68fb ldr r3, [r7, #12]
|
|
800ea30: f103 002a add.w r0, r3, #42 ; 0x2a
|
|
800ea34: 68fb ldr r3, [r7, #12]
|
|
800ea36: 3304 adds r3, #4
|
|
return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr,
|
|
800ea38: 2201 movs r2, #1
|
|
800ea3a: 9203 str r2, [sp, #12]
|
|
800ea3c: 68ba ldr r2, [r7, #8]
|
|
800ea3e: 9202 str r2, [sp, #8]
|
|
800ea40: 4a06 ldr r2, [pc, #24] ; (800ea5c <etharp_request_dst+0x40>)
|
|
800ea42: 9201 str r2, [sp, #4]
|
|
800ea44: 9300 str r3, [sp, #0]
|
|
800ea46: 4603 mov r3, r0
|
|
800ea48: 687a ldr r2, [r7, #4]
|
|
800ea4a: 68f8 ldr r0, [r7, #12]
|
|
800ea4c: f7ff ff5a bl 800e904 <etharp_raw>
|
|
800ea50: 4603 mov r3, r0
|
|
ipaddr, ARP_REQUEST);
|
|
}
|
|
800ea52: 4618 mov r0, r3
|
|
800ea54: 3710 adds r7, #16
|
|
800ea56: 46bd mov sp, r7
|
|
800ea58: bd80 pop {r7, pc}
|
|
800ea5a: bf00 nop
|
|
800ea5c: 08017f4c .word 0x08017f4c
|
|
|
|
0800ea60 <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)
|
|
{
|
|
800ea60: b580 push {r7, lr}
|
|
800ea62: b082 sub sp, #8
|
|
800ea64: af00 add r7, sp, #0
|
|
800ea66: 6078 str r0, [r7, #4]
|
|
800ea68: 6039 str r1, [r7, #0]
|
|
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n"));
|
|
return etharp_request_dst(netif, ipaddr, ðbroadcast);
|
|
800ea6a: 4a05 ldr r2, [pc, #20] ; (800ea80 <etharp_request+0x20>)
|
|
800ea6c: 6839 ldr r1, [r7, #0]
|
|
800ea6e: 6878 ldr r0, [r7, #4]
|
|
800ea70: f7ff ffd4 bl 800ea1c <etharp_request_dst>
|
|
800ea74: 4603 mov r3, r0
|
|
}
|
|
800ea76: 4618 mov r0, r3
|
|
800ea78: 3708 adds r7, #8
|
|
800ea7a: 46bd mov sp, r7
|
|
800ea7c: bd80 pop {r7, pc}
|
|
800ea7e: bf00 nop
|
|
800ea80: 08017f44 .word 0x08017f44
|
|
|
|
0800ea84 <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)
|
|
{
|
|
800ea84: b580 push {r7, lr}
|
|
800ea86: b08e sub sp, #56 ; 0x38
|
|
800ea88: af04 add r7, sp, #16
|
|
800ea8a: 6078 str r0, [r7, #4]
|
|
800ea8c: 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();
|
|
800ea8e: 4b79 ldr r3, [pc, #484] ; (800ec74 <icmp_input+0x1f0>)
|
|
800ea90: 689b ldr r3, [r3, #8]
|
|
800ea92: 627b str r3, [r7, #36] ; 0x24
|
|
hlen = IPH_HL_BYTES(iphdr_in);
|
|
800ea94: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800ea96: 781b ldrb r3, [r3, #0]
|
|
800ea98: f003 030f and.w r3, r3, #15
|
|
800ea9c: b2db uxtb r3, r3
|
|
800ea9e: 009b lsls r3, r3, #2
|
|
800eaa0: b2db uxtb r3, r3
|
|
800eaa2: 847b strh r3, [r7, #34] ; 0x22
|
|
if (hlen < IP_HLEN) {
|
|
800eaa4: 8c7b ldrh r3, [r7, #34] ; 0x22
|
|
800eaa6: 2b13 cmp r3, #19
|
|
800eaa8: f240 80cd bls.w 800ec46 <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) {
|
|
800eaac: 687b ldr r3, [r7, #4]
|
|
800eaae: 895b ldrh r3, [r3, #10]
|
|
800eab0: 2b03 cmp r3, #3
|
|
800eab2: f240 80ca bls.w 800ec4a <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);
|
|
800eab6: 687b ldr r3, [r7, #4]
|
|
800eab8: 685b ldr r3, [r3, #4]
|
|
800eaba: 781b ldrb r3, [r3, #0]
|
|
800eabc: 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) {
|
|
800eac0: f897 3021 ldrb.w r3, [r7, #33] ; 0x21
|
|
800eac4: 2b00 cmp r3, #0
|
|
800eac6: f000 80b7 beq.w 800ec38 <icmp_input+0x1b4>
|
|
800eaca: 2b08 cmp r3, #8
|
|
800eacc: f040 80b7 bne.w 800ec3e <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();
|
|
800ead0: 4b69 ldr r3, [pc, #420] ; (800ec78 <icmp_input+0x1f4>)
|
|
800ead2: 61fb str r3, [r7, #28]
|
|
/* multicast destination address? */
|
|
if (ip4_addr_ismulticast(ip4_current_dest_addr())) {
|
|
800ead4: 4b67 ldr r3, [pc, #412] ; (800ec74 <icmp_input+0x1f0>)
|
|
800ead6: 695b ldr r3, [r3, #20]
|
|
800ead8: f003 03f0 and.w r3, r3, #240 ; 0xf0
|
|
800eadc: 2be0 cmp r3, #224 ; 0xe0
|
|
800eade: f000 80bb beq.w 800ec58 <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())) {
|
|
800eae2: 4b64 ldr r3, [pc, #400] ; (800ec74 <icmp_input+0x1f0>)
|
|
800eae4: 695b ldr r3, [r3, #20]
|
|
800eae6: 4a63 ldr r2, [pc, #396] ; (800ec74 <icmp_input+0x1f0>)
|
|
800eae8: 6812 ldr r2, [r2, #0]
|
|
800eaea: 4611 mov r1, r2
|
|
800eaec: 4618 mov r0, r3
|
|
800eaee: f000 fc0b bl 800f308 <ip4_addr_isbroadcast_u32>
|
|
800eaf2: 4603 mov r3, r0
|
|
800eaf4: 2b00 cmp r3, #0
|
|
800eaf6: f040 80b1 bne.w 800ec5c <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)) {
|
|
800eafa: 687b ldr r3, [r7, #4]
|
|
800eafc: 891b ldrh r3, [r3, #8]
|
|
800eafe: 2b07 cmp r3, #7
|
|
800eb00: f240 80a5 bls.w 800ec4e <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)) {
|
|
800eb04: 8c7b ldrh r3, [r7, #34] ; 0x22
|
|
800eb06: 330e adds r3, #14
|
|
800eb08: 4619 mov r1, r3
|
|
800eb0a: 6878 ldr r0, [r7, #4]
|
|
800eb0c: f7f6 fee6 bl 80058dc <pbuf_add_header>
|
|
800eb10: 4603 mov r3, r0
|
|
800eb12: 2b00 cmp r3, #0
|
|
800eb14: d04b beq.n 800ebae <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);
|
|
800eb16: 687b ldr r3, [r7, #4]
|
|
800eb18: 891a ldrh r2, [r3, #8]
|
|
800eb1a: 8c7b ldrh r3, [r7, #34] ; 0x22
|
|
800eb1c: 4413 add r3, r2
|
|
800eb1e: 837b strh r3, [r7, #26]
|
|
if (alloc_len < p->tot_len) {
|
|
800eb20: 687b ldr r3, [r7, #4]
|
|
800eb22: 891b ldrh r3, [r3, #8]
|
|
800eb24: 8b7a ldrh r2, [r7, #26]
|
|
800eb26: 429a cmp r2, r3
|
|
800eb28: f0c0 809a bcc.w 800ec60 <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);
|
|
800eb2c: 8b7b ldrh r3, [r7, #26]
|
|
800eb2e: f44f 7220 mov.w r2, #640 ; 0x280
|
|
800eb32: 4619 mov r1, r3
|
|
800eb34: 200e movs r0, #14
|
|
800eb36: f7f6 fc83 bl 8005440 <pbuf_alloc>
|
|
800eb3a: 6178 str r0, [r7, #20]
|
|
if (r == NULL) {
|
|
800eb3c: 697b ldr r3, [r7, #20]
|
|
800eb3e: 2b00 cmp r3, #0
|
|
800eb40: f000 8090 beq.w 800ec64 <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)) {
|
|
800eb44: 697b ldr r3, [r7, #20]
|
|
800eb46: 895b ldrh r3, [r3, #10]
|
|
800eb48: 461a mov r2, r3
|
|
800eb4a: 8c7b ldrh r3, [r7, #34] ; 0x22
|
|
800eb4c: 3308 adds r3, #8
|
|
800eb4e: 429a cmp r2, r3
|
|
800eb50: d203 bcs.n 800eb5a <icmp_input+0xd6>
|
|
LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("first pbuf cannot hold the ICMP header"));
|
|
pbuf_free(r);
|
|
800eb52: 6978 ldr r0, [r7, #20]
|
|
800eb54: f7f6 ff58 bl 8005a08 <pbuf_free>
|
|
goto icmperr;
|
|
800eb58: e085 b.n 800ec66 <icmp_input+0x1e2>
|
|
}
|
|
/* copy the ip header */
|
|
MEMCPY(r->payload, iphdr_in, hlen);
|
|
800eb5a: 697b ldr r3, [r7, #20]
|
|
800eb5c: 685b ldr r3, [r3, #4]
|
|
800eb5e: 8c7a ldrh r2, [r7, #34] ; 0x22
|
|
800eb60: 6a79 ldr r1, [r7, #36] ; 0x24
|
|
800eb62: 4618 mov r0, r3
|
|
800eb64: f001 fc98 bl 8010498 <memcpy>
|
|
/* switch r->payload back to icmp header (cannot fail) */
|
|
if (pbuf_remove_header(r, hlen)) {
|
|
800eb68: 8c7b ldrh r3, [r7, #34] ; 0x22
|
|
800eb6a: 4619 mov r1, r3
|
|
800eb6c: 6978 ldr r0, [r7, #20]
|
|
800eb6e: f7f6 fec5 bl 80058fc <pbuf_remove_header>
|
|
800eb72: 4603 mov r3, r0
|
|
800eb74: 2b00 cmp r3, #0
|
|
800eb76: d009 beq.n 800eb8c <icmp_input+0x108>
|
|
LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0);
|
|
800eb78: 4b40 ldr r3, [pc, #256] ; (800ec7c <icmp_input+0x1f8>)
|
|
800eb7a: 22b6 movs r2, #182 ; 0xb6
|
|
800eb7c: 4940 ldr r1, [pc, #256] ; (800ec80 <icmp_input+0x1fc>)
|
|
800eb7e: 4841 ldr r0, [pc, #260] ; (800ec84 <icmp_input+0x200>)
|
|
800eb80: f001 fcba bl 80104f8 <printf>
|
|
pbuf_free(r);
|
|
800eb84: 6978 ldr r0, [r7, #20]
|
|
800eb86: f7f6 ff3f bl 8005a08 <pbuf_free>
|
|
goto icmperr;
|
|
800eb8a: e06c b.n 800ec66 <icmp_input+0x1e2>
|
|
}
|
|
/* copy the rest of the packet without ip header */
|
|
if (pbuf_copy(r, p) != ERR_OK) {
|
|
800eb8c: 6879 ldr r1, [r7, #4]
|
|
800eb8e: 6978 ldr r0, [r7, #20]
|
|
800eb90: f7f7 f862 bl 8005c58 <pbuf_copy>
|
|
800eb94: 4603 mov r3, r0
|
|
800eb96: 2b00 cmp r3, #0
|
|
800eb98: d003 beq.n 800eba2 <icmp_input+0x11e>
|
|
LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("icmp_input: copying to new pbuf failed"));
|
|
pbuf_free(r);
|
|
800eb9a: 6978 ldr r0, [r7, #20]
|
|
800eb9c: f7f6 ff34 bl 8005a08 <pbuf_free>
|
|
goto icmperr;
|
|
800eba0: e061 b.n 800ec66 <icmp_input+0x1e2>
|
|
}
|
|
/* free the original p */
|
|
pbuf_free(p);
|
|
800eba2: 6878 ldr r0, [r7, #4]
|
|
800eba4: f7f6 ff30 bl 8005a08 <pbuf_free>
|
|
/* we now have an identical copy of p that has room for link headers */
|
|
p = r;
|
|
800eba8: 697b ldr r3, [r7, #20]
|
|
800ebaa: 607b str r3, [r7, #4]
|
|
800ebac: e00f b.n 800ebce <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)) {
|
|
800ebae: 8c7b ldrh r3, [r7, #34] ; 0x22
|
|
800ebb0: 330e adds r3, #14
|
|
800ebb2: 4619 mov r1, r3
|
|
800ebb4: 6878 ldr r0, [r7, #4]
|
|
800ebb6: f7f6 fea1 bl 80058fc <pbuf_remove_header>
|
|
800ebba: 4603 mov r3, r0
|
|
800ebbc: 2b00 cmp r3, #0
|
|
800ebbe: d006 beq.n 800ebce <icmp_input+0x14a>
|
|
LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0);
|
|
800ebc0: 4b2e ldr r3, [pc, #184] ; (800ec7c <icmp_input+0x1f8>)
|
|
800ebc2: 22c7 movs r2, #199 ; 0xc7
|
|
800ebc4: 4930 ldr r1, [pc, #192] ; (800ec88 <icmp_input+0x204>)
|
|
800ebc6: 482f ldr r0, [pc, #188] ; (800ec84 <icmp_input+0x200>)
|
|
800ebc8: f001 fc96 bl 80104f8 <printf>
|
|
goto icmperr;
|
|
800ebcc: e04b b.n 800ec66 <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;
|
|
800ebce: 687b ldr r3, [r7, #4]
|
|
800ebd0: 685b ldr r3, [r3, #4]
|
|
800ebd2: 613b str r3, [r7, #16]
|
|
if (pbuf_add_header(p, hlen)) {
|
|
800ebd4: 8c7b ldrh r3, [r7, #34] ; 0x22
|
|
800ebd6: 4619 mov r1, r3
|
|
800ebd8: 6878 ldr r0, [r7, #4]
|
|
800ebda: f7f6 fe7f bl 80058dc <pbuf_add_header>
|
|
800ebde: 4603 mov r3, r0
|
|
800ebe0: 2b00 cmp r3, #0
|
|
800ebe2: d12b bne.n 800ec3c <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;
|
|
800ebe4: 687b ldr r3, [r7, #4]
|
|
800ebe6: 685b ldr r3, [r3, #4]
|
|
800ebe8: 60fb str r3, [r7, #12]
|
|
ip4_addr_copy(iphdr->src, *src);
|
|
800ebea: 69fb ldr r3, [r7, #28]
|
|
800ebec: 681a ldr r2, [r3, #0]
|
|
800ebee: 68fb ldr r3, [r7, #12]
|
|
800ebf0: 60da str r2, [r3, #12]
|
|
ip4_addr_copy(iphdr->dest, *ip4_current_src_addr());
|
|
800ebf2: 4b20 ldr r3, [pc, #128] ; (800ec74 <icmp_input+0x1f0>)
|
|
800ebf4: 691a ldr r2, [r3, #16]
|
|
800ebf6: 68fb ldr r3, [r7, #12]
|
|
800ebf8: 611a str r2, [r3, #16]
|
|
ICMPH_TYPE_SET(iecho, ICMP_ER);
|
|
800ebfa: 693b ldr r3, [r7, #16]
|
|
800ebfc: 2200 movs r2, #0
|
|
800ebfe: 701a strb r2, [r3, #0]
|
|
else {
|
|
iecho->chksum = 0;
|
|
}
|
|
#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */
|
|
#else /* CHECKSUM_GEN_ICMP */
|
|
iecho->chksum = 0;
|
|
800ec00: 693b ldr r3, [r7, #16]
|
|
800ec02: 2200 movs r2, #0
|
|
800ec04: 709a strb r2, [r3, #2]
|
|
800ec06: 2200 movs r2, #0
|
|
800ec08: 70da strb r2, [r3, #3]
|
|
#endif /* CHECKSUM_GEN_ICMP */
|
|
|
|
/* Set the correct TTL and recalculate the header checksum. */
|
|
IPH_TTL_SET(iphdr, ICMP_TTL);
|
|
800ec0a: 68fb ldr r3, [r7, #12]
|
|
800ec0c: 22ff movs r2, #255 ; 0xff
|
|
800ec0e: 721a strb r2, [r3, #8]
|
|
IPH_CHKSUM_SET(iphdr, 0);
|
|
800ec10: 68fb ldr r3, [r7, #12]
|
|
800ec12: 2200 movs r2, #0
|
|
800ec14: 729a strb r2, [r3, #10]
|
|
800ec16: 2200 movs r2, #0
|
|
800ec18: 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,
|
|
800ec1a: 683b ldr r3, [r7, #0]
|
|
800ec1c: 9302 str r3, [sp, #8]
|
|
800ec1e: 2301 movs r3, #1
|
|
800ec20: 9301 str r3, [sp, #4]
|
|
800ec22: 2300 movs r3, #0
|
|
800ec24: 9300 str r3, [sp, #0]
|
|
800ec26: 23ff movs r3, #255 ; 0xff
|
|
800ec28: 2200 movs r2, #0
|
|
800ec2a: 69f9 ldr r1, [r7, #28]
|
|
800ec2c: 6878 ldr r0, [r7, #4]
|
|
800ec2e: f000 fa93 bl 800f158 <ip4_output_if>
|
|
800ec32: 4603 mov r3, r0
|
|
800ec34: 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;
|
|
800ec36: e001 b.n 800ec3c <icmp_input+0x1b8>
|
|
break;
|
|
800ec38: bf00 nop
|
|
800ec3a: e000 b.n 800ec3e <icmp_input+0x1ba>
|
|
break;
|
|
800ec3c: 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);
|
|
800ec3e: 6878 ldr r0, [r7, #4]
|
|
800ec40: f7f6 fee2 bl 8005a08 <pbuf_free>
|
|
return;
|
|
800ec44: e013 b.n 800ec6e <icmp_input+0x1ea>
|
|
goto lenerr;
|
|
800ec46: bf00 nop
|
|
800ec48: e002 b.n 800ec50 <icmp_input+0x1cc>
|
|
goto lenerr;
|
|
800ec4a: bf00 nop
|
|
800ec4c: e000 b.n 800ec50 <icmp_input+0x1cc>
|
|
goto lenerr;
|
|
800ec4e: bf00 nop
|
|
lenerr:
|
|
pbuf_free(p);
|
|
800ec50: 6878 ldr r0, [r7, #4]
|
|
800ec52: f7f6 fed9 bl 8005a08 <pbuf_free>
|
|
ICMP_STATS_INC(icmp.lenerr);
|
|
MIB2_STATS_INC(mib2.icmpinerrors);
|
|
return;
|
|
800ec56: e00a b.n 800ec6e <icmp_input+0x1ea>
|
|
goto icmperr;
|
|
800ec58: bf00 nop
|
|
800ec5a: e004 b.n 800ec66 <icmp_input+0x1e2>
|
|
goto icmperr;
|
|
800ec5c: bf00 nop
|
|
800ec5e: e002 b.n 800ec66 <icmp_input+0x1e2>
|
|
goto icmperr;
|
|
800ec60: bf00 nop
|
|
800ec62: e000 b.n 800ec66 <icmp_input+0x1e2>
|
|
goto icmperr;
|
|
800ec64: bf00 nop
|
|
#if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING
|
|
icmperr:
|
|
pbuf_free(p);
|
|
800ec66: 6878 ldr r0, [r7, #4]
|
|
800ec68: f7f6 fece bl 8005a08 <pbuf_free>
|
|
ICMP_STATS_INC(icmp.err);
|
|
MIB2_STATS_INC(mib2.icmpinerrors);
|
|
return;
|
|
800ec6c: bf00 nop
|
|
#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING */
|
|
}
|
|
800ec6e: 3728 adds r7, #40 ; 0x28
|
|
800ec70: 46bd mov sp, r7
|
|
800ec72: bd80 pop {r7, pc}
|
|
800ec74: 20005670 .word 0x20005670
|
|
800ec78: 20005684 .word 0x20005684
|
|
800ec7c: 08017984 .word 0x08017984
|
|
800ec80: 080179bc .word 0x080179bc
|
|
800ec84: 080179f4 .word 0x080179f4
|
|
800ec88: 08017a1c .word 0x08017a1c
|
|
|
|
0800ec8c <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)
|
|
{
|
|
800ec8c: b580 push {r7, lr}
|
|
800ec8e: b082 sub sp, #8
|
|
800ec90: af00 add r7, sp, #0
|
|
800ec92: 6078 str r0, [r7, #4]
|
|
800ec94: 460b mov r3, r1
|
|
800ec96: 70fb strb r3, [r7, #3]
|
|
MIB2_STATS_INC(mib2.icmpoutdestunreachs);
|
|
icmp_send_response(p, ICMP_DUR, t);
|
|
800ec98: 78fb ldrb r3, [r7, #3]
|
|
800ec9a: 461a mov r2, r3
|
|
800ec9c: 2103 movs r1, #3
|
|
800ec9e: 6878 ldr r0, [r7, #4]
|
|
800eca0: f000 f814 bl 800eccc <icmp_send_response>
|
|
}
|
|
800eca4: bf00 nop
|
|
800eca6: 3708 adds r7, #8
|
|
800eca8: 46bd mov sp, r7
|
|
800ecaa: bd80 pop {r7, pc}
|
|
|
|
0800ecac <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)
|
|
{
|
|
800ecac: b580 push {r7, lr}
|
|
800ecae: b082 sub sp, #8
|
|
800ecb0: af00 add r7, sp, #0
|
|
800ecb2: 6078 str r0, [r7, #4]
|
|
800ecb4: 460b mov r3, r1
|
|
800ecb6: 70fb strb r3, [r7, #3]
|
|
MIB2_STATS_INC(mib2.icmpouttimeexcds);
|
|
icmp_send_response(p, ICMP_TE, t);
|
|
800ecb8: 78fb ldrb r3, [r7, #3]
|
|
800ecba: 461a mov r2, r3
|
|
800ecbc: 210b movs r1, #11
|
|
800ecbe: 6878 ldr r0, [r7, #4]
|
|
800ecc0: f000 f804 bl 800eccc <icmp_send_response>
|
|
}
|
|
800ecc4: bf00 nop
|
|
800ecc6: 3708 adds r7, #8
|
|
800ecc8: 46bd mov sp, r7
|
|
800ecca: bd80 pop {r7, pc}
|
|
|
|
0800eccc <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)
|
|
{
|
|
800eccc: b580 push {r7, lr}
|
|
800ecce: b08c sub sp, #48 ; 0x30
|
|
800ecd0: af04 add r7, sp, #16
|
|
800ecd2: 6078 str r0, [r7, #4]
|
|
800ecd4: 460b mov r3, r1
|
|
800ecd6: 70fb strb r3, [r7, #3]
|
|
800ecd8: 4613 mov r3, r2
|
|
800ecda: 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,
|
|
800ecdc: f44f 7220 mov.w r2, #640 ; 0x280
|
|
800ece0: 2124 movs r1, #36 ; 0x24
|
|
800ece2: 2022 movs r0, #34 ; 0x22
|
|
800ece4: f7f6 fbac bl 8005440 <pbuf_alloc>
|
|
800ece8: 61f8 str r0, [r7, #28]
|
|
PBUF_RAM);
|
|
if (q == NULL) {
|
|
800ecea: 69fb ldr r3, [r7, #28]
|
|
800ecec: 2b00 cmp r3, #0
|
|
800ecee: d04c beq.n 800ed8a <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",
|
|
800ecf0: 69fb ldr r3, [r7, #28]
|
|
800ecf2: 895b ldrh r3, [r3, #10]
|
|
800ecf4: 2b23 cmp r3, #35 ; 0x23
|
|
800ecf6: d806 bhi.n 800ed06 <icmp_send_response+0x3a>
|
|
800ecf8: 4b26 ldr r3, [pc, #152] ; (800ed94 <icmp_send_response+0xc8>)
|
|
800ecfa: f44f 72b4 mov.w r2, #360 ; 0x168
|
|
800ecfe: 4926 ldr r1, [pc, #152] ; (800ed98 <icmp_send_response+0xcc>)
|
|
800ed00: 4826 ldr r0, [pc, #152] ; (800ed9c <icmp_send_response+0xd0>)
|
|
800ed02: f001 fbf9 bl 80104f8 <printf>
|
|
(q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE)));
|
|
|
|
iphdr = (struct ip_hdr *)p->payload;
|
|
800ed06: 687b ldr r3, [r7, #4]
|
|
800ed08: 685b ldr r3, [r3, #4]
|
|
800ed0a: 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;
|
|
800ed0c: 69fb ldr r3, [r7, #28]
|
|
800ed0e: 685b ldr r3, [r3, #4]
|
|
800ed10: 617b str r3, [r7, #20]
|
|
icmphdr->type = type;
|
|
800ed12: 697b ldr r3, [r7, #20]
|
|
800ed14: 78fa ldrb r2, [r7, #3]
|
|
800ed16: 701a strb r2, [r3, #0]
|
|
icmphdr->code = code;
|
|
800ed18: 697b ldr r3, [r7, #20]
|
|
800ed1a: 78ba ldrb r2, [r7, #2]
|
|
800ed1c: 705a strb r2, [r3, #1]
|
|
icmphdr->id = 0;
|
|
800ed1e: 697b ldr r3, [r7, #20]
|
|
800ed20: 2200 movs r2, #0
|
|
800ed22: 711a strb r2, [r3, #4]
|
|
800ed24: 2200 movs r2, #0
|
|
800ed26: 715a strb r2, [r3, #5]
|
|
icmphdr->seqno = 0;
|
|
800ed28: 697b ldr r3, [r7, #20]
|
|
800ed2a: 2200 movs r2, #0
|
|
800ed2c: 719a strb r2, [r3, #6]
|
|
800ed2e: 2200 movs r2, #0
|
|
800ed30: 71da strb r2, [r3, #7]
|
|
|
|
/* copy fields from original packet */
|
|
SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload,
|
|
800ed32: 69fb ldr r3, [r7, #28]
|
|
800ed34: 685b ldr r3, [r3, #4]
|
|
800ed36: f103 0008 add.w r0, r3, #8
|
|
800ed3a: 687b ldr r3, [r7, #4]
|
|
800ed3c: 685b ldr r3, [r3, #4]
|
|
800ed3e: 221c movs r2, #28
|
|
800ed40: 4619 mov r1, r3
|
|
800ed42: f001 fba9 bl 8010498 <memcpy>
|
|
IP_HLEN + ICMP_DEST_UNREACH_DATASIZE);
|
|
|
|
ip4_addr_copy(iphdr_src, iphdr->src);
|
|
800ed46: 69bb ldr r3, [r7, #24]
|
|
800ed48: 68db ldr r3, [r3, #12]
|
|
800ed4a: 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);
|
|
800ed4c: f107 030c add.w r3, r7, #12
|
|
800ed50: 4618 mov r0, r3
|
|
800ed52: f000 f825 bl 800eda0 <ip4_route>
|
|
800ed56: 6138 str r0, [r7, #16]
|
|
#endif
|
|
if (netif != NULL) {
|
|
800ed58: 693b ldr r3, [r7, #16]
|
|
800ed5a: 2b00 cmp r3, #0
|
|
800ed5c: d011 beq.n 800ed82 <icmp_send_response+0xb6>
|
|
/* calculate checksum */
|
|
icmphdr->chksum = 0;
|
|
800ed5e: 697b ldr r3, [r7, #20]
|
|
800ed60: 2200 movs r2, #0
|
|
800ed62: 709a strb r2, [r3, #2]
|
|
800ed64: 2200 movs r2, #0
|
|
800ed66: 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);
|
|
800ed68: f107 020c add.w r2, r7, #12
|
|
800ed6c: 693b ldr r3, [r7, #16]
|
|
800ed6e: 9302 str r3, [sp, #8]
|
|
800ed70: 2301 movs r3, #1
|
|
800ed72: 9301 str r3, [sp, #4]
|
|
800ed74: 2300 movs r3, #0
|
|
800ed76: 9300 str r3, [sp, #0]
|
|
800ed78: 23ff movs r3, #255 ; 0xff
|
|
800ed7a: 2100 movs r1, #0
|
|
800ed7c: 69f8 ldr r0, [r7, #28]
|
|
800ed7e: f000 f9eb bl 800f158 <ip4_output_if>
|
|
}
|
|
pbuf_free(q);
|
|
800ed82: 69f8 ldr r0, [r7, #28]
|
|
800ed84: f7f6 fe40 bl 8005a08 <pbuf_free>
|
|
800ed88: e000 b.n 800ed8c <icmp_send_response+0xc0>
|
|
return;
|
|
800ed8a: bf00 nop
|
|
}
|
|
800ed8c: 3720 adds r7, #32
|
|
800ed8e: 46bd mov sp, r7
|
|
800ed90: bd80 pop {r7, pc}
|
|
800ed92: bf00 nop
|
|
800ed94: 08017984 .word 0x08017984
|
|
800ed98: 08017a50 .word 0x08017a50
|
|
800ed9c: 080179f4 .word 0x080179f4
|
|
|
|
0800eda0 <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)
|
|
{
|
|
800eda0: b480 push {r7}
|
|
800eda2: b085 sub sp, #20
|
|
800eda4: af00 add r7, sp, #0
|
|
800eda6: 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) {
|
|
800eda8: 4b33 ldr r3, [pc, #204] ; (800ee78 <ip4_route+0xd8>)
|
|
800edaa: 681b ldr r3, [r3, #0]
|
|
800edac: 60fb str r3, [r7, #12]
|
|
800edae: e036 b.n 800ee1e <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))) {
|
|
800edb0: 68fb ldr r3, [r7, #12]
|
|
800edb2: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
800edb6: f003 0301 and.w r3, r3, #1
|
|
800edba: b2db uxtb r3, r3
|
|
800edbc: 2b00 cmp r3, #0
|
|
800edbe: d02b beq.n 800ee18 <ip4_route+0x78>
|
|
800edc0: 68fb ldr r3, [r7, #12]
|
|
800edc2: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
800edc6: 089b lsrs r3, r3, #2
|
|
800edc8: f003 0301 and.w r3, r3, #1
|
|
800edcc: b2db uxtb r3, r3
|
|
800edce: 2b00 cmp r3, #0
|
|
800edd0: d022 beq.n 800ee18 <ip4_route+0x78>
|
|
800edd2: 68fb ldr r3, [r7, #12]
|
|
800edd4: 3304 adds r3, #4
|
|
800edd6: 681b ldr r3, [r3, #0]
|
|
800edd8: 2b00 cmp r3, #0
|
|
800edda: d01d beq.n 800ee18 <ip4_route+0x78>
|
|
/* network mask matches? */
|
|
if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) {
|
|
800eddc: 687b ldr r3, [r7, #4]
|
|
800edde: 681a ldr r2, [r3, #0]
|
|
800ede0: 68fb ldr r3, [r7, #12]
|
|
800ede2: 3304 adds r3, #4
|
|
800ede4: 681b ldr r3, [r3, #0]
|
|
800ede6: 405a eors r2, r3
|
|
800ede8: 68fb ldr r3, [r7, #12]
|
|
800edea: 3308 adds r3, #8
|
|
800edec: 681b ldr r3, [r3, #0]
|
|
800edee: 4013 ands r3, r2
|
|
800edf0: 2b00 cmp r3, #0
|
|
800edf2: d101 bne.n 800edf8 <ip4_route+0x58>
|
|
/* return netif on which to forward IP packet */
|
|
return netif;
|
|
800edf4: 68fb ldr r3, [r7, #12]
|
|
800edf6: e038 b.n 800ee6a <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))) {
|
|
800edf8: 68fb ldr r3, [r7, #12]
|
|
800edfa: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
800edfe: f003 0302 and.w r3, r3, #2
|
|
800ee02: 2b00 cmp r3, #0
|
|
800ee04: d108 bne.n 800ee18 <ip4_route+0x78>
|
|
800ee06: 687b ldr r3, [r7, #4]
|
|
800ee08: 681a ldr r2, [r3, #0]
|
|
800ee0a: 68fb ldr r3, [r7, #12]
|
|
800ee0c: 330c adds r3, #12
|
|
800ee0e: 681b ldr r3, [r3, #0]
|
|
800ee10: 429a cmp r2, r3
|
|
800ee12: d101 bne.n 800ee18 <ip4_route+0x78>
|
|
/* return netif on which to forward IP packet */
|
|
return netif;
|
|
800ee14: 68fb ldr r3, [r7, #12]
|
|
800ee16: e028 b.n 800ee6a <ip4_route+0xca>
|
|
NETIF_FOREACH(netif) {
|
|
800ee18: 68fb ldr r3, [r7, #12]
|
|
800ee1a: 681b ldr r3, [r3, #0]
|
|
800ee1c: 60fb str r3, [r7, #12]
|
|
800ee1e: 68fb ldr r3, [r7, #12]
|
|
800ee20: 2b00 cmp r3, #0
|
|
800ee22: d1c5 bne.n 800edb0 <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) ||
|
|
800ee24: 4b15 ldr r3, [pc, #84] ; (800ee7c <ip4_route+0xdc>)
|
|
800ee26: 681b ldr r3, [r3, #0]
|
|
800ee28: 2b00 cmp r3, #0
|
|
800ee2a: d01a beq.n 800ee62 <ip4_route+0xc2>
|
|
800ee2c: 4b13 ldr r3, [pc, #76] ; (800ee7c <ip4_route+0xdc>)
|
|
800ee2e: 681b ldr r3, [r3, #0]
|
|
800ee30: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
800ee34: f003 0301 and.w r3, r3, #1
|
|
800ee38: 2b00 cmp r3, #0
|
|
800ee3a: d012 beq.n 800ee62 <ip4_route+0xc2>
|
|
800ee3c: 4b0f ldr r3, [pc, #60] ; (800ee7c <ip4_route+0xdc>)
|
|
800ee3e: 681b ldr r3, [r3, #0]
|
|
800ee40: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
800ee44: f003 0304 and.w r3, r3, #4
|
|
800ee48: 2b00 cmp r3, #0
|
|
800ee4a: d00a beq.n 800ee62 <ip4_route+0xc2>
|
|
ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) {
|
|
800ee4c: 4b0b ldr r3, [pc, #44] ; (800ee7c <ip4_route+0xdc>)
|
|
800ee4e: 681b ldr r3, [r3, #0]
|
|
800ee50: 3304 adds r3, #4
|
|
800ee52: 681b ldr r3, [r3, #0]
|
|
if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) ||
|
|
800ee54: 2b00 cmp r3, #0
|
|
800ee56: d004 beq.n 800ee62 <ip4_route+0xc2>
|
|
ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) {
|
|
800ee58: 687b ldr r3, [r7, #4]
|
|
800ee5a: 681b ldr r3, [r3, #0]
|
|
800ee5c: b2db uxtb r3, r3
|
|
800ee5e: 2b7f cmp r3, #127 ; 0x7f
|
|
800ee60: d101 bne.n 800ee66 <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;
|
|
800ee62: 2300 movs r3, #0
|
|
800ee64: e001 b.n 800ee6a <ip4_route+0xca>
|
|
}
|
|
|
|
return netif_default;
|
|
800ee66: 4b05 ldr r3, [pc, #20] ; (800ee7c <ip4_route+0xdc>)
|
|
800ee68: 681b ldr r3, [r3, #0]
|
|
}
|
|
800ee6a: 4618 mov r0, r3
|
|
800ee6c: 3714 adds r7, #20
|
|
800ee6e: 46bd mov sp, r7
|
|
800ee70: f85d 7b04 ldr.w r7, [sp], #4
|
|
800ee74: 4770 bx lr
|
|
800ee76: bf00 nop
|
|
800ee78: 20008bf4 .word 0x20008bf4
|
|
800ee7c: 20008bf8 .word 0x20008bf8
|
|
|
|
0800ee80 <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)
|
|
{
|
|
800ee80: b580 push {r7, lr}
|
|
800ee82: b082 sub sp, #8
|
|
800ee84: af00 add r7, sp, #0
|
|
800ee86: 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)))) {
|
|
800ee88: 687b ldr r3, [r7, #4]
|
|
800ee8a: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
800ee8e: f003 0301 and.w r3, r3, #1
|
|
800ee92: b2db uxtb r3, r3
|
|
800ee94: 2b00 cmp r3, #0
|
|
800ee96: d016 beq.n 800eec6 <ip4_input_accept+0x46>
|
|
800ee98: 687b ldr r3, [r7, #4]
|
|
800ee9a: 3304 adds r3, #4
|
|
800ee9c: 681b ldr r3, [r3, #0]
|
|
800ee9e: 2b00 cmp r3, #0
|
|
800eea0: d011 beq.n 800eec6 <ip4_input_accept+0x46>
|
|
/* unicast to this interface address? */
|
|
if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) ||
|
|
800eea2: 4b0b ldr r3, [pc, #44] ; (800eed0 <ip4_input_accept+0x50>)
|
|
800eea4: 695a ldr r2, [r3, #20]
|
|
800eea6: 687b ldr r3, [r7, #4]
|
|
800eea8: 3304 adds r3, #4
|
|
800eeaa: 681b ldr r3, [r3, #0]
|
|
800eeac: 429a cmp r2, r3
|
|
800eeae: d008 beq.n 800eec2 <ip4_input_accept+0x42>
|
|
/* or broadcast on this interface network address? */
|
|
ip4_addr_isbroadcast(ip4_current_dest_addr(), netif)
|
|
800eeb0: 4b07 ldr r3, [pc, #28] ; (800eed0 <ip4_input_accept+0x50>)
|
|
800eeb2: 695b ldr r3, [r3, #20]
|
|
800eeb4: 6879 ldr r1, [r7, #4]
|
|
800eeb6: 4618 mov r0, r3
|
|
800eeb8: f000 fa26 bl 800f308 <ip4_addr_isbroadcast_u32>
|
|
800eebc: 4603 mov r3, r0
|
|
if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) ||
|
|
800eebe: 2b00 cmp r3, #0
|
|
800eec0: d001 beq.n 800eec6 <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;
|
|
800eec2: 2301 movs r3, #1
|
|
800eec4: e000 b.n 800eec8 <ip4_input_accept+0x48>
|
|
/* accept on this netif */
|
|
return 1;
|
|
}
|
|
#endif /* LWIP_AUTOIP */
|
|
}
|
|
return 0;
|
|
800eec6: 2300 movs r3, #0
|
|
}
|
|
800eec8: 4618 mov r0, r3
|
|
800eeca: 3708 adds r7, #8
|
|
800eecc: 46bd mov sp, r7
|
|
800eece: bd80 pop {r7, pc}
|
|
800eed0: 20005670 .word 0x20005670
|
|
|
|
0800eed4 <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)
|
|
{
|
|
800eed4: b580 push {r7, lr}
|
|
800eed6: b088 sub sp, #32
|
|
800eed8: af00 add r7, sp, #0
|
|
800eeda: 6078 str r0, [r7, #4]
|
|
800eedc: 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;
|
|
800eede: 2301 movs r3, #1
|
|
800eee0: 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;
|
|
800eee2: 687b ldr r3, [r7, #4]
|
|
800eee4: 685b ldr r3, [r3, #4]
|
|
800eee6: 61fb str r3, [r7, #28]
|
|
if (IPH_V(iphdr) != 4) {
|
|
800eee8: 69fb ldr r3, [r7, #28]
|
|
800eeea: 781b ldrb r3, [r3, #0]
|
|
800eeec: 091b lsrs r3, r3, #4
|
|
800eeee: b2db uxtb r3, r3
|
|
800eef0: 2b04 cmp r3, #4
|
|
800eef2: d004 beq.n 800eefe <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);
|
|
800eef4: 6878 ldr r0, [r7, #4]
|
|
800eef6: f7f6 fd87 bl 8005a08 <pbuf_free>
|
|
IP_STATS_INC(ip.err);
|
|
IP_STATS_INC(ip.drop);
|
|
MIB2_STATS_INC(mib2.ipinhdrerrors);
|
|
return ERR_OK;
|
|
800eefa: 2300 movs r3, #0
|
|
800eefc: e123 b.n 800f146 <ip4_input+0x272>
|
|
return ERR_OK;
|
|
}
|
|
#endif
|
|
|
|
/* obtain IP header length in bytes */
|
|
iphdr_hlen = IPH_HL_BYTES(iphdr);
|
|
800eefe: 69fb ldr r3, [r7, #28]
|
|
800ef00: 781b ldrb r3, [r3, #0]
|
|
800ef02: f003 030f and.w r3, r3, #15
|
|
800ef06: b2db uxtb r3, r3
|
|
800ef08: 009b lsls r3, r3, #2
|
|
800ef0a: b2db uxtb r3, r3
|
|
800ef0c: 827b strh r3, [r7, #18]
|
|
/* obtain ip length in bytes */
|
|
iphdr_len = lwip_ntohs(IPH_LEN(iphdr));
|
|
800ef0e: 69fb ldr r3, [r7, #28]
|
|
800ef10: 885b ldrh r3, [r3, #2]
|
|
800ef12: b29b uxth r3, r3
|
|
800ef14: 4618 mov r0, r3
|
|
800ef16: f7f5 fa0d bl 8004334 <lwip_htons>
|
|
800ef1a: 4603 mov r3, r0
|
|
800ef1c: 823b strh r3, [r7, #16]
|
|
|
|
/* Trim pbuf. This is especially required for packets < 60 bytes. */
|
|
if (iphdr_len < p->tot_len) {
|
|
800ef1e: 687b ldr r3, [r7, #4]
|
|
800ef20: 891b ldrh r3, [r3, #8]
|
|
800ef22: 8a3a ldrh r2, [r7, #16]
|
|
800ef24: 429a cmp r2, r3
|
|
800ef26: d204 bcs.n 800ef32 <ip4_input+0x5e>
|
|
pbuf_realloc(p, iphdr_len);
|
|
800ef28: 8a3b ldrh r3, [r7, #16]
|
|
800ef2a: 4619 mov r1, r3
|
|
800ef2c: 6878 ldr r0, [r7, #4]
|
|
800ef2e: f7f6 fbe5 bl 80056fc <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)) {
|
|
800ef32: 687b ldr r3, [r7, #4]
|
|
800ef34: 895b ldrh r3, [r3, #10]
|
|
800ef36: 8a7a ldrh r2, [r7, #18]
|
|
800ef38: 429a cmp r2, r3
|
|
800ef3a: d807 bhi.n 800ef4c <ip4_input+0x78>
|
|
800ef3c: 687b ldr r3, [r7, #4]
|
|
800ef3e: 891b ldrh r3, [r3, #8]
|
|
800ef40: 8a3a ldrh r2, [r7, #16]
|
|
800ef42: 429a cmp r2, r3
|
|
800ef44: d802 bhi.n 800ef4c <ip4_input+0x78>
|
|
800ef46: 8a7b ldrh r3, [r7, #18]
|
|
800ef48: 2b13 cmp r3, #19
|
|
800ef4a: d804 bhi.n 800ef56 <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);
|
|
800ef4c: 6878 ldr r0, [r7, #4]
|
|
800ef4e: f7f6 fd5b bl 8005a08 <pbuf_free>
|
|
IP_STATS_INC(ip.lenerr);
|
|
IP_STATS_INC(ip.drop);
|
|
MIB2_STATS_INC(mib2.ipindiscards);
|
|
return ERR_OK;
|
|
800ef52: 2300 movs r3, #0
|
|
800ef54: e0f7 b.n 800f146 <ip4_input+0x272>
|
|
}
|
|
}
|
|
#endif
|
|
|
|
/* copy IP addresses to aligned ip_addr_t */
|
|
ip_addr_copy_from_ip4(ip_data.current_iphdr_dest, iphdr->dest);
|
|
800ef56: 69fb ldr r3, [r7, #28]
|
|
800ef58: 691b ldr r3, [r3, #16]
|
|
800ef5a: 4a7d ldr r2, [pc, #500] ; (800f150 <ip4_input+0x27c>)
|
|
800ef5c: 6153 str r3, [r2, #20]
|
|
ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src);
|
|
800ef5e: 69fb ldr r3, [r7, #28]
|
|
800ef60: 68db ldr r3, [r3, #12]
|
|
800ef62: 4a7b ldr r2, [pc, #492] ; (800f150 <ip4_input+0x27c>)
|
|
800ef64: 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())) {
|
|
800ef66: 4b7a ldr r3, [pc, #488] ; (800f150 <ip4_input+0x27c>)
|
|
800ef68: 695b ldr r3, [r3, #20]
|
|
800ef6a: f003 03f0 and.w r3, r3, #240 ; 0xf0
|
|
800ef6e: 2be0 cmp r3, #224 ; 0xe0
|
|
800ef70: d112 bne.n 800ef98 <ip4_input+0xc4>
|
|
netif = inp;
|
|
} else {
|
|
netif = NULL;
|
|
}
|
|
#else /* LWIP_IGMP */
|
|
if ((netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) {
|
|
800ef72: 683b ldr r3, [r7, #0]
|
|
800ef74: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
800ef78: f003 0301 and.w r3, r3, #1
|
|
800ef7c: b2db uxtb r3, r3
|
|
800ef7e: 2b00 cmp r3, #0
|
|
800ef80: d007 beq.n 800ef92 <ip4_input+0xbe>
|
|
800ef82: 683b ldr r3, [r7, #0]
|
|
800ef84: 3304 adds r3, #4
|
|
800ef86: 681b ldr r3, [r3, #0]
|
|
800ef88: 2b00 cmp r3, #0
|
|
800ef8a: d002 beq.n 800ef92 <ip4_input+0xbe>
|
|
netif = inp;
|
|
800ef8c: 683b ldr r3, [r7, #0]
|
|
800ef8e: 61bb str r3, [r7, #24]
|
|
800ef90: e02a b.n 800efe8 <ip4_input+0x114>
|
|
} else {
|
|
netif = NULL;
|
|
800ef92: 2300 movs r3, #0
|
|
800ef94: 61bb str r3, [r7, #24]
|
|
800ef96: e027 b.n 800efe8 <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)) {
|
|
800ef98: 6838 ldr r0, [r7, #0]
|
|
800ef9a: f7ff ff71 bl 800ee80 <ip4_input_accept>
|
|
800ef9e: 4603 mov r3, r0
|
|
800efa0: 2b00 cmp r3, #0
|
|
800efa2: d002 beq.n 800efaa <ip4_input+0xd6>
|
|
netif = inp;
|
|
800efa4: 683b ldr r3, [r7, #0]
|
|
800efa6: 61bb str r3, [r7, #24]
|
|
800efa8: e01e b.n 800efe8 <ip4_input+0x114>
|
|
} else {
|
|
netif = NULL;
|
|
800efaa: 2300 movs r3, #0
|
|
800efac: 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()))
|
|
800efae: 4b68 ldr r3, [pc, #416] ; (800f150 <ip4_input+0x27c>)
|
|
800efb0: 695b ldr r3, [r3, #20]
|
|
800efb2: b2db uxtb r3, r3
|
|
800efb4: 2b7f cmp r3, #127 ; 0x7f
|
|
800efb6: d017 beq.n 800efe8 <ip4_input+0x114>
|
|
#endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */
|
|
{
|
|
#if !LWIP_SINGLE_NETIF
|
|
NETIF_FOREACH(netif) {
|
|
800efb8: 4b66 ldr r3, [pc, #408] ; (800f154 <ip4_input+0x280>)
|
|
800efba: 681b ldr r3, [r3, #0]
|
|
800efbc: 61bb str r3, [r7, #24]
|
|
800efbe: e00e b.n 800efde <ip4_input+0x10a>
|
|
if (netif == inp) {
|
|
800efc0: 69ba ldr r2, [r7, #24]
|
|
800efc2: 683b ldr r3, [r7, #0]
|
|
800efc4: 429a cmp r2, r3
|
|
800efc6: d006 beq.n 800efd6 <ip4_input+0x102>
|
|
/* we checked that before already */
|
|
continue;
|
|
}
|
|
if (ip4_input_accept(netif)) {
|
|
800efc8: 69b8 ldr r0, [r7, #24]
|
|
800efca: f7ff ff59 bl 800ee80 <ip4_input_accept>
|
|
800efce: 4603 mov r3, r0
|
|
800efd0: 2b00 cmp r3, #0
|
|
800efd2: d108 bne.n 800efe6 <ip4_input+0x112>
|
|
800efd4: e000 b.n 800efd8 <ip4_input+0x104>
|
|
continue;
|
|
800efd6: bf00 nop
|
|
NETIF_FOREACH(netif) {
|
|
800efd8: 69bb ldr r3, [r7, #24]
|
|
800efda: 681b ldr r3, [r3, #0]
|
|
800efdc: 61bb str r3, [r7, #24]
|
|
800efde: 69bb ldr r3, [r7, #24]
|
|
800efe0: 2b00 cmp r3, #0
|
|
800efe2: d1ed bne.n 800efc0 <ip4_input+0xec>
|
|
800efe4: e000 b.n 800efe8 <ip4_input+0x114>
|
|
break;
|
|
800efe6: 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) {
|
|
800efe8: 69bb ldr r3, [r7, #24]
|
|
800efea: 2b00 cmp r3, #0
|
|
800efec: d111 bne.n 800f012 <ip4_input+0x13e>
|
|
/* remote port is DHCP server? */
|
|
if (IPH_PROTO(iphdr) == IP_PROTO_UDP) {
|
|
800efee: 69fb ldr r3, [r7, #28]
|
|
800eff0: 7a5b ldrb r3, [r3, #9]
|
|
800eff2: 2b11 cmp r3, #17
|
|
800eff4: d10d bne.n 800f012 <ip4_input+0x13e>
|
|
const struct udp_hdr *udphdr = (const struct udp_hdr *)((const u8_t *)iphdr + iphdr_hlen);
|
|
800eff6: 8a7b ldrh r3, [r7, #18]
|
|
800eff8: 69fa ldr r2, [r7, #28]
|
|
800effa: 4413 add r3, r2
|
|
800effc: 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)) {
|
|
800effe: 68fb ldr r3, [r7, #12]
|
|
800f000: 885b ldrh r3, [r3, #2]
|
|
800f002: b29b uxth r3, r3
|
|
800f004: f5b3 4f88 cmp.w r3, #17408 ; 0x4400
|
|
800f008: d103 bne.n 800f012 <ip4_input+0x13e>
|
|
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: DHCP packet accepted.\n"));
|
|
netif = inp;
|
|
800f00a: 683b ldr r3, [r7, #0]
|
|
800f00c: 61bb str r3, [r7, #24]
|
|
check_ip_src = 0;
|
|
800f00e: 2300 movs r3, #0
|
|
800f010: 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
|
|
800f012: 697b ldr r3, [r7, #20]
|
|
800f014: 2b00 cmp r3, #0
|
|
800f016: d017 beq.n 800f048 <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())
|
|
800f018: 4b4d ldr r3, [pc, #308] ; (800f150 <ip4_input+0x27c>)
|
|
800f01a: 691b ldr r3, [r3, #16]
|
|
800f01c: 2b00 cmp r3, #0
|
|
800f01e: d013 beq.n 800f048 <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)) ||
|
|
800f020: 4b4b ldr r3, [pc, #300] ; (800f150 <ip4_input+0x27c>)
|
|
800f022: 691b ldr r3, [r3, #16]
|
|
800f024: 6839 ldr r1, [r7, #0]
|
|
800f026: 4618 mov r0, r3
|
|
800f028: f000 f96e bl 800f308 <ip4_addr_isbroadcast_u32>
|
|
800f02c: 4603 mov r3, r0
|
|
800f02e: 2b00 cmp r3, #0
|
|
800f030: d105 bne.n 800f03e <ip4_input+0x16a>
|
|
(ip4_addr_ismulticast(ip4_current_src_addr()))) {
|
|
800f032: 4b47 ldr r3, [pc, #284] ; (800f150 <ip4_input+0x27c>)
|
|
800f034: 691b ldr r3, [r3, #16]
|
|
800f036: f003 03f0 and.w r3, r3, #240 ; 0xf0
|
|
if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) ||
|
|
800f03a: 2be0 cmp r3, #224 ; 0xe0
|
|
800f03c: d104 bne.n 800f048 <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);
|
|
800f03e: 6878 ldr r0, [r7, #4]
|
|
800f040: f7f6 fce2 bl 8005a08 <pbuf_free>
|
|
IP_STATS_INC(ip.drop);
|
|
MIB2_STATS_INC(mib2.ipinaddrerrors);
|
|
MIB2_STATS_INC(mib2.ipindiscards);
|
|
return ERR_OK;
|
|
800f044: 2300 movs r3, #0
|
|
800f046: e07e b.n 800f146 <ip4_input+0x272>
|
|
}
|
|
}
|
|
|
|
/* packet not for us? */
|
|
if (netif == NULL) {
|
|
800f048: 69bb ldr r3, [r7, #24]
|
|
800f04a: 2b00 cmp r3, #0
|
|
800f04c: d104 bne.n 800f058 <ip4_input+0x184>
|
|
{
|
|
IP_STATS_INC(ip.drop);
|
|
MIB2_STATS_INC(mib2.ipinaddrerrors);
|
|
MIB2_STATS_INC(mib2.ipindiscards);
|
|
}
|
|
pbuf_free(p);
|
|
800f04e: 6878 ldr r0, [r7, #4]
|
|
800f050: f7f6 fcda bl 8005a08 <pbuf_free>
|
|
return ERR_OK;
|
|
800f054: 2300 movs r3, #0
|
|
800f056: e076 b.n 800f146 <ip4_input+0x272>
|
|
}
|
|
/* packet consists of multiple fragments? */
|
|
if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) {
|
|
800f058: 69fb ldr r3, [r7, #28]
|
|
800f05a: 88db ldrh r3, [r3, #6]
|
|
800f05c: b29b uxth r3, r3
|
|
800f05e: 461a mov r2, r3
|
|
800f060: f64f 733f movw r3, #65343 ; 0xff3f
|
|
800f064: 4013 ands r3, r2
|
|
800f066: 2b00 cmp r3, #0
|
|
800f068: d00b beq.n 800f082 <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);
|
|
800f06a: 6878 ldr r0, [r7, #4]
|
|
800f06c: f000 fdd0 bl 800fc10 <ip4_reass>
|
|
800f070: 6078 str r0, [r7, #4]
|
|
/* packet not fully reassembled yet? */
|
|
if (p == NULL) {
|
|
800f072: 687b ldr r3, [r7, #4]
|
|
800f074: 2b00 cmp r3, #0
|
|
800f076: d101 bne.n 800f07c <ip4_input+0x1a8>
|
|
return ERR_OK;
|
|
800f078: 2300 movs r3, #0
|
|
800f07a: e064 b.n 800f146 <ip4_input+0x272>
|
|
}
|
|
iphdr = (const struct ip_hdr *)p->payload;
|
|
800f07c: 687b ldr r3, [r7, #4]
|
|
800f07e: 685b ldr r3, [r3, #4]
|
|
800f080: 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;
|
|
800f082: 4a33 ldr r2, [pc, #204] ; (800f150 <ip4_input+0x27c>)
|
|
800f084: 69bb ldr r3, [r7, #24]
|
|
800f086: 6013 str r3, [r2, #0]
|
|
ip_data.current_input_netif = inp;
|
|
800f088: 4a31 ldr r2, [pc, #196] ; (800f150 <ip4_input+0x27c>)
|
|
800f08a: 683b ldr r3, [r7, #0]
|
|
800f08c: 6053 str r3, [r2, #4]
|
|
ip_data.current_ip4_header = iphdr;
|
|
800f08e: 4a30 ldr r2, [pc, #192] ; (800f150 <ip4_input+0x27c>)
|
|
800f090: 69fb ldr r3, [r7, #28]
|
|
800f092: 6093 str r3, [r2, #8]
|
|
ip_data.current_ip_header_tot_len = IPH_HL_BYTES(iphdr);
|
|
800f094: 69fb ldr r3, [r7, #28]
|
|
800f096: 781b ldrb r3, [r3, #0]
|
|
800f098: f003 030f and.w r3, r3, #15
|
|
800f09c: b2db uxtb r3, r3
|
|
800f09e: 009b lsls r3, r3, #2
|
|
800f0a0: b2db uxtb r3, r3
|
|
800f0a2: b29a uxth r2, r3
|
|
800f0a4: 4b2a ldr r3, [pc, #168] ; (800f150 <ip4_input+0x27c>)
|
|
800f0a6: 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. */
|
|
800f0a8: 8a7b ldrh r3, [r7, #18]
|
|
800f0aa: 4619 mov r1, r3
|
|
800f0ac: 6878 ldr r0, [r7, #4]
|
|
800f0ae: f7f6 fc25 bl 80058fc <pbuf_remove_header>
|
|
|
|
switch (IPH_PROTO(iphdr)) {
|
|
800f0b2: 69fb ldr r3, [r7, #28]
|
|
800f0b4: 7a5b ldrb r3, [r3, #9]
|
|
800f0b6: 2b11 cmp r3, #17
|
|
800f0b8: d006 beq.n 800f0c8 <ip4_input+0x1f4>
|
|
800f0ba: 2b11 cmp r3, #17
|
|
800f0bc: dc13 bgt.n 800f0e6 <ip4_input+0x212>
|
|
800f0be: 2b01 cmp r3, #1
|
|
800f0c0: d00c beq.n 800f0dc <ip4_input+0x208>
|
|
800f0c2: 2b06 cmp r3, #6
|
|
800f0c4: d005 beq.n 800f0d2 <ip4_input+0x1fe>
|
|
800f0c6: e00e b.n 800f0e6 <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);
|
|
800f0c8: 6839 ldr r1, [r7, #0]
|
|
800f0ca: 6878 ldr r0, [r7, #4]
|
|
800f0cc: f7fc fa8e bl 800b5ec <udp_input>
|
|
break;
|
|
800f0d0: e026 b.n 800f120 <ip4_input+0x24c>
|
|
#endif /* LWIP_UDP */
|
|
#if LWIP_TCP
|
|
case IP_PROTO_TCP:
|
|
MIB2_STATS_INC(mib2.ipindelivers);
|
|
tcp_input(p, inp);
|
|
800f0d2: 6839 ldr r1, [r7, #0]
|
|
800f0d4: 6878 ldr r0, [r7, #4]
|
|
800f0d6: f7f8 facf bl 8007678 <tcp_input>
|
|
break;
|
|
800f0da: e021 b.n 800f120 <ip4_input+0x24c>
|
|
#endif /* LWIP_TCP */
|
|
#if LWIP_ICMP
|
|
case IP_PROTO_ICMP:
|
|
MIB2_STATS_INC(mib2.ipindelivers);
|
|
icmp_input(p, inp);
|
|
800f0dc: 6839 ldr r1, [r7, #0]
|
|
800f0de: 6878 ldr r0, [r7, #4]
|
|
800f0e0: f7ff fcd0 bl 800ea84 <icmp_input>
|
|
break;
|
|
800f0e4: e01c b.n 800f120 <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) &&
|
|
800f0e6: 4b1a ldr r3, [pc, #104] ; (800f150 <ip4_input+0x27c>)
|
|
800f0e8: 695b ldr r3, [r3, #20]
|
|
800f0ea: 69b9 ldr r1, [r7, #24]
|
|
800f0ec: 4618 mov r0, r3
|
|
800f0ee: f000 f90b bl 800f308 <ip4_addr_isbroadcast_u32>
|
|
800f0f2: 4603 mov r3, r0
|
|
800f0f4: 2b00 cmp r3, #0
|
|
800f0f6: d10f bne.n 800f118 <ip4_input+0x244>
|
|
!ip4_addr_ismulticast(ip4_current_dest_addr())) {
|
|
800f0f8: 4b15 ldr r3, [pc, #84] ; (800f150 <ip4_input+0x27c>)
|
|
800f0fa: 695b ldr r3, [r3, #20]
|
|
800f0fc: f003 03f0 and.w r3, r3, #240 ; 0xf0
|
|
if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) &&
|
|
800f100: 2be0 cmp r3, #224 ; 0xe0
|
|
800f102: d009 beq.n 800f118 <ip4_input+0x244>
|
|
pbuf_header_force(p, (s16_t)iphdr_hlen); /* Move to ip header, no check necessary. */
|
|
800f104: f9b7 3012 ldrsh.w r3, [r7, #18]
|
|
800f108: 4619 mov r1, r3
|
|
800f10a: 6878 ldr r0, [r7, #4]
|
|
800f10c: f7f6 fc69 bl 80059e2 <pbuf_header_force>
|
|
icmp_dest_unreach(p, ICMP_DUR_PROTO);
|
|
800f110: 2102 movs r1, #2
|
|
800f112: 6878 ldr r0, [r7, #4]
|
|
800f114: f7ff fdba bl 800ec8c <icmp_dest_unreach>
|
|
|
|
IP_STATS_INC(ip.proterr);
|
|
IP_STATS_INC(ip.drop);
|
|
MIB2_STATS_INC(mib2.ipinunknownprotos);
|
|
}
|
|
pbuf_free(p);
|
|
800f118: 6878 ldr r0, [r7, #4]
|
|
800f11a: f7f6 fc75 bl 8005a08 <pbuf_free>
|
|
break;
|
|
800f11e: bf00 nop
|
|
}
|
|
}
|
|
|
|
/* @todo: this is not really necessary... */
|
|
ip_data.current_netif = NULL;
|
|
800f120: 4b0b ldr r3, [pc, #44] ; (800f150 <ip4_input+0x27c>)
|
|
800f122: 2200 movs r2, #0
|
|
800f124: 601a str r2, [r3, #0]
|
|
ip_data.current_input_netif = NULL;
|
|
800f126: 4b0a ldr r3, [pc, #40] ; (800f150 <ip4_input+0x27c>)
|
|
800f128: 2200 movs r2, #0
|
|
800f12a: 605a str r2, [r3, #4]
|
|
ip_data.current_ip4_header = NULL;
|
|
800f12c: 4b08 ldr r3, [pc, #32] ; (800f150 <ip4_input+0x27c>)
|
|
800f12e: 2200 movs r2, #0
|
|
800f130: 609a str r2, [r3, #8]
|
|
ip_data.current_ip_header_tot_len = 0;
|
|
800f132: 4b07 ldr r3, [pc, #28] ; (800f150 <ip4_input+0x27c>)
|
|
800f134: 2200 movs r2, #0
|
|
800f136: 819a strh r2, [r3, #12]
|
|
ip4_addr_set_any(ip4_current_src_addr());
|
|
800f138: 4b05 ldr r3, [pc, #20] ; (800f150 <ip4_input+0x27c>)
|
|
800f13a: 2200 movs r2, #0
|
|
800f13c: 611a str r2, [r3, #16]
|
|
ip4_addr_set_any(ip4_current_dest_addr());
|
|
800f13e: 4b04 ldr r3, [pc, #16] ; (800f150 <ip4_input+0x27c>)
|
|
800f140: 2200 movs r2, #0
|
|
800f142: 615a str r2, [r3, #20]
|
|
|
|
return ERR_OK;
|
|
800f144: 2300 movs r3, #0
|
|
}
|
|
800f146: 4618 mov r0, r3
|
|
800f148: 3720 adds r7, #32
|
|
800f14a: 46bd mov sp, r7
|
|
800f14c: bd80 pop {r7, pc}
|
|
800f14e: bf00 nop
|
|
800f150: 20005670 .word 0x20005670
|
|
800f154: 20008bf4 .word 0x20008bf4
|
|
|
|
0800f158 <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)
|
|
{
|
|
800f158: b580 push {r7, lr}
|
|
800f15a: b08a sub sp, #40 ; 0x28
|
|
800f15c: af04 add r7, sp, #16
|
|
800f15e: 60f8 str r0, [r7, #12]
|
|
800f160: 60b9 str r1, [r7, #8]
|
|
800f162: 607a str r2, [r7, #4]
|
|
800f164: 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;
|
|
800f166: 68bb ldr r3, [r7, #8]
|
|
800f168: 617b str r3, [r7, #20]
|
|
if (dest != LWIP_IP_HDRINCL) {
|
|
800f16a: 687b ldr r3, [r7, #4]
|
|
800f16c: 2b00 cmp r3, #0
|
|
800f16e: d009 beq.n 800f184 <ip4_output_if+0x2c>
|
|
if (ip4_addr_isany(src)) {
|
|
800f170: 68bb ldr r3, [r7, #8]
|
|
800f172: 2b00 cmp r3, #0
|
|
800f174: d003 beq.n 800f17e <ip4_output_if+0x26>
|
|
800f176: 68bb ldr r3, [r7, #8]
|
|
800f178: 681b ldr r3, [r3, #0]
|
|
800f17a: 2b00 cmp r3, #0
|
|
800f17c: d102 bne.n 800f184 <ip4_output_if+0x2c>
|
|
src_used = netif_ip4_addr(netif);
|
|
800f17e: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800f180: 3304 adds r3, #4
|
|
800f182: 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);
|
|
800f184: 78fa ldrb r2, [r7, #3]
|
|
800f186: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800f188: 9302 str r3, [sp, #8]
|
|
800f18a: f897 3024 ldrb.w r3, [r7, #36] ; 0x24
|
|
800f18e: 9301 str r3, [sp, #4]
|
|
800f190: f897 3020 ldrb.w r3, [r7, #32]
|
|
800f194: 9300 str r3, [sp, #0]
|
|
800f196: 4613 mov r3, r2
|
|
800f198: 687a ldr r2, [r7, #4]
|
|
800f19a: 6979 ldr r1, [r7, #20]
|
|
800f19c: 68f8 ldr r0, [r7, #12]
|
|
800f19e: f000 f805 bl 800f1ac <ip4_output_if_src>
|
|
800f1a2: 4603 mov r3, r0
|
|
#endif /* IP_OPTIONS_SEND */
|
|
}
|
|
800f1a4: 4618 mov r0, r3
|
|
800f1a6: 3718 adds r7, #24
|
|
800f1a8: 46bd mov sp, r7
|
|
800f1aa: bd80 pop {r7, pc}
|
|
|
|
0800f1ac <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)
|
|
{
|
|
800f1ac: b580 push {r7, lr}
|
|
800f1ae: b088 sub sp, #32
|
|
800f1b0: af00 add r7, sp, #0
|
|
800f1b2: 60f8 str r0, [r7, #12]
|
|
800f1b4: 60b9 str r1, [r7, #8]
|
|
800f1b6: 607a str r2, [r7, #4]
|
|
800f1b8: 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);
|
|
800f1ba: 68fb ldr r3, [r7, #12]
|
|
800f1bc: 7b9b ldrb r3, [r3, #14]
|
|
800f1be: 2b01 cmp r3, #1
|
|
800f1c0: d006 beq.n 800f1d0 <ip4_output_if_src+0x24>
|
|
800f1c2: 4b4b ldr r3, [pc, #300] ; (800f2f0 <ip4_output_if_src+0x144>)
|
|
800f1c4: f44f 7255 mov.w r2, #852 ; 0x354
|
|
800f1c8: 494a ldr r1, [pc, #296] ; (800f2f4 <ip4_output_if_src+0x148>)
|
|
800f1ca: 484b ldr r0, [pc, #300] ; (800f2f8 <ip4_output_if_src+0x14c>)
|
|
800f1cc: f001 f994 bl 80104f8 <printf>
|
|
|
|
MIB2_STATS_INC(mib2.ipoutrequests);
|
|
|
|
/* Should the IP header be generated or is it already included in p? */
|
|
if (dest != LWIP_IP_HDRINCL) {
|
|
800f1d0: 687b ldr r3, [r7, #4]
|
|
800f1d2: 2b00 cmp r3, #0
|
|
800f1d4: d060 beq.n 800f298 <ip4_output_if_src+0xec>
|
|
u16_t ip_hlen = IP_HLEN;
|
|
800f1d6: 2314 movs r3, #20
|
|
800f1d8: 837b strh r3, [r7, #26]
|
|
}
|
|
#endif /* CHECKSUM_GEN_IP_INLINE */
|
|
}
|
|
#endif /* IP_OPTIONS_SEND */
|
|
/* generate IP header */
|
|
if (pbuf_add_header(p, IP_HLEN)) {
|
|
800f1da: 2114 movs r1, #20
|
|
800f1dc: 68f8 ldr r0, [r7, #12]
|
|
800f1de: f7f6 fb7d bl 80058dc <pbuf_add_header>
|
|
800f1e2: 4603 mov r3, r0
|
|
800f1e4: 2b00 cmp r3, #0
|
|
800f1e6: d002 beq.n 800f1ee <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;
|
|
800f1e8: f06f 0301 mvn.w r3, #1
|
|
800f1ec: e07c b.n 800f2e8 <ip4_output_if_src+0x13c>
|
|
}
|
|
|
|
iphdr = (struct ip_hdr *)p->payload;
|
|
800f1ee: 68fb ldr r3, [r7, #12]
|
|
800f1f0: 685b ldr r3, [r3, #4]
|
|
800f1f2: 61fb str r3, [r7, #28]
|
|
LWIP_ASSERT("check that first pbuf can hold struct ip_hdr",
|
|
800f1f4: 68fb ldr r3, [r7, #12]
|
|
800f1f6: 895b ldrh r3, [r3, #10]
|
|
800f1f8: 2b13 cmp r3, #19
|
|
800f1fa: d806 bhi.n 800f20a <ip4_output_if_src+0x5e>
|
|
800f1fc: 4b3c ldr r3, [pc, #240] ; (800f2f0 <ip4_output_if_src+0x144>)
|
|
800f1fe: f44f 7262 mov.w r2, #904 ; 0x388
|
|
800f202: 493e ldr r1, [pc, #248] ; (800f2fc <ip4_output_if_src+0x150>)
|
|
800f204: 483c ldr r0, [pc, #240] ; (800f2f8 <ip4_output_if_src+0x14c>)
|
|
800f206: f001 f977 bl 80104f8 <printf>
|
|
(p->len >= sizeof(struct ip_hdr)));
|
|
|
|
IPH_TTL_SET(iphdr, ttl);
|
|
800f20a: 69fb ldr r3, [r7, #28]
|
|
800f20c: 78fa ldrb r2, [r7, #3]
|
|
800f20e: 721a strb r2, [r3, #8]
|
|
IPH_PROTO_SET(iphdr, proto);
|
|
800f210: 69fb ldr r3, [r7, #28]
|
|
800f212: f897 202c ldrb.w r2, [r7, #44] ; 0x2c
|
|
800f216: 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);
|
|
800f218: 687b ldr r3, [r7, #4]
|
|
800f21a: 681a ldr r2, [r3, #0]
|
|
800f21c: 69fb ldr r3, [r7, #28]
|
|
800f21e: 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);
|
|
800f220: 8b7b ldrh r3, [r7, #26]
|
|
800f222: 089b lsrs r3, r3, #2
|
|
800f224: b29b uxth r3, r3
|
|
800f226: b2db uxtb r3, r3
|
|
800f228: f043 0340 orr.w r3, r3, #64 ; 0x40
|
|
800f22c: b2da uxtb r2, r3
|
|
800f22e: 69fb ldr r3, [r7, #28]
|
|
800f230: 701a strb r2, [r3, #0]
|
|
IPH_TOS_SET(iphdr, tos);
|
|
800f232: 69fb ldr r3, [r7, #28]
|
|
800f234: f897 2028 ldrb.w r2, [r7, #40] ; 0x28
|
|
800f238: 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));
|
|
800f23a: 68fb ldr r3, [r7, #12]
|
|
800f23c: 891b ldrh r3, [r3, #8]
|
|
800f23e: 4618 mov r0, r3
|
|
800f240: f7f5 f878 bl 8004334 <lwip_htons>
|
|
800f244: 4603 mov r3, r0
|
|
800f246: 461a mov r2, r3
|
|
800f248: 69fb ldr r3, [r7, #28]
|
|
800f24a: 805a strh r2, [r3, #2]
|
|
#if CHECKSUM_GEN_IP_INLINE
|
|
chk_sum += iphdr->_len;
|
|
#endif /* CHECKSUM_GEN_IP_INLINE */
|
|
IPH_OFFSET_SET(iphdr, 0);
|
|
800f24c: 69fb ldr r3, [r7, #28]
|
|
800f24e: 2200 movs r2, #0
|
|
800f250: 719a strb r2, [r3, #6]
|
|
800f252: 2200 movs r2, #0
|
|
800f254: 71da strb r2, [r3, #7]
|
|
IPH_ID_SET(iphdr, lwip_htons(ip_id));
|
|
800f256: 4b2a ldr r3, [pc, #168] ; (800f300 <ip4_output_if_src+0x154>)
|
|
800f258: 881b ldrh r3, [r3, #0]
|
|
800f25a: 4618 mov r0, r3
|
|
800f25c: f7f5 f86a bl 8004334 <lwip_htons>
|
|
800f260: 4603 mov r3, r0
|
|
800f262: 461a mov r2, r3
|
|
800f264: 69fb ldr r3, [r7, #28]
|
|
800f266: 809a strh r2, [r3, #4]
|
|
#if CHECKSUM_GEN_IP_INLINE
|
|
chk_sum += iphdr->_id;
|
|
#endif /* CHECKSUM_GEN_IP_INLINE */
|
|
++ip_id;
|
|
800f268: 4b25 ldr r3, [pc, #148] ; (800f300 <ip4_output_if_src+0x154>)
|
|
800f26a: 881b ldrh r3, [r3, #0]
|
|
800f26c: 3301 adds r3, #1
|
|
800f26e: b29a uxth r2, r3
|
|
800f270: 4b23 ldr r3, [pc, #140] ; (800f300 <ip4_output_if_src+0x154>)
|
|
800f272: 801a strh r2, [r3, #0]
|
|
|
|
if (src == NULL) {
|
|
800f274: 68bb ldr r3, [r7, #8]
|
|
800f276: 2b00 cmp r3, #0
|
|
800f278: d104 bne.n 800f284 <ip4_output_if_src+0xd8>
|
|
ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4);
|
|
800f27a: 4b22 ldr r3, [pc, #136] ; (800f304 <ip4_output_if_src+0x158>)
|
|
800f27c: 681a ldr r2, [r3, #0]
|
|
800f27e: 69fb ldr r3, [r7, #28]
|
|
800f280: 60da str r2, [r3, #12]
|
|
800f282: e003 b.n 800f28c <ip4_output_if_src+0xe0>
|
|
} else {
|
|
/* src cannot be NULL here */
|
|
ip4_addr_copy(iphdr->src, *src);
|
|
800f284: 68bb ldr r3, [r7, #8]
|
|
800f286: 681a ldr r2, [r3, #0]
|
|
800f288: 69fb ldr r3, [r7, #28]
|
|
800f28a: 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);
|
|
800f28c: 69fb ldr r3, [r7, #28]
|
|
800f28e: 2200 movs r2, #0
|
|
800f290: 729a strb r2, [r3, #10]
|
|
800f292: 2200 movs r2, #0
|
|
800f294: 72da strb r2, [r3, #11]
|
|
800f296: e00f b.n 800f2b8 <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) {
|
|
800f298: 68fb ldr r3, [r7, #12]
|
|
800f29a: 895b ldrh r3, [r3, #10]
|
|
800f29c: 2b13 cmp r3, #19
|
|
800f29e: d802 bhi.n 800f2a6 <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;
|
|
800f2a0: f06f 0301 mvn.w r3, #1
|
|
800f2a4: e020 b.n 800f2e8 <ip4_output_if_src+0x13c>
|
|
}
|
|
iphdr = (struct ip_hdr *)p->payload;
|
|
800f2a6: 68fb ldr r3, [r7, #12]
|
|
800f2a8: 685b ldr r3, [r3, #4]
|
|
800f2aa: 61fb str r3, [r7, #28]
|
|
ip4_addr_copy(dest_addr, iphdr->dest);
|
|
800f2ac: 69fb ldr r3, [r7, #28]
|
|
800f2ae: 691b ldr r3, [r3, #16]
|
|
800f2b0: 617b str r3, [r7, #20]
|
|
dest = &dest_addr;
|
|
800f2b2: f107 0314 add.w r3, r7, #20
|
|
800f2b6: 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)) {
|
|
800f2b8: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800f2ba: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
800f2bc: 2b00 cmp r3, #0
|
|
800f2be: d00c beq.n 800f2da <ip4_output_if_src+0x12e>
|
|
800f2c0: 68fb ldr r3, [r7, #12]
|
|
800f2c2: 891a ldrh r2, [r3, #8]
|
|
800f2c4: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800f2c6: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
800f2c8: 429a cmp r2, r3
|
|
800f2ca: d906 bls.n 800f2da <ip4_output_if_src+0x12e>
|
|
return ip4_frag(p, netif, dest);
|
|
800f2cc: 687a ldr r2, [r7, #4]
|
|
800f2ce: 6b39 ldr r1, [r7, #48] ; 0x30
|
|
800f2d0: 68f8 ldr r0, [r7, #12]
|
|
800f2d2: f000 fe91 bl 800fff8 <ip4_frag>
|
|
800f2d6: 4603 mov r3, r0
|
|
800f2d8: e006 b.n 800f2e8 <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);
|
|
800f2da: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800f2dc: 695b ldr r3, [r3, #20]
|
|
800f2de: 687a ldr r2, [r7, #4]
|
|
800f2e0: 68f9 ldr r1, [r7, #12]
|
|
800f2e2: 6b38 ldr r0, [r7, #48] ; 0x30
|
|
800f2e4: 4798 blx r3
|
|
800f2e6: 4603 mov r3, r0
|
|
}
|
|
800f2e8: 4618 mov r0, r3
|
|
800f2ea: 3720 adds r7, #32
|
|
800f2ec: 46bd mov sp, r7
|
|
800f2ee: bd80 pop {r7, pc}
|
|
800f2f0: 08017a7c .word 0x08017a7c
|
|
800f2f4: 08017ab0 .word 0x08017ab0
|
|
800f2f8: 08017abc .word 0x08017abc
|
|
800f2fc: 08017ae4 .word 0x08017ae4
|
|
800f300: 20008d86 .word 0x20008d86
|
|
800f304: 08017f3c .word 0x08017f3c
|
|
|
|
0800f308 <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)
|
|
{
|
|
800f308: b480 push {r7}
|
|
800f30a: b085 sub sp, #20
|
|
800f30c: af00 add r7, sp, #0
|
|
800f30e: 6078 str r0, [r7, #4]
|
|
800f310: 6039 str r1, [r7, #0]
|
|
ip4_addr_t ipaddr;
|
|
ip4_addr_set_u32(&ipaddr, addr);
|
|
800f312: 687b ldr r3, [r7, #4]
|
|
800f314: 60fb str r3, [r7, #12]
|
|
|
|
/* all ones (broadcast) or all zeroes (old skool broadcast) */
|
|
if ((~addr == IPADDR_ANY) ||
|
|
800f316: 687b ldr r3, [r7, #4]
|
|
800f318: f1b3 3fff cmp.w r3, #4294967295
|
|
800f31c: d002 beq.n 800f324 <ip4_addr_isbroadcast_u32+0x1c>
|
|
800f31e: 687b ldr r3, [r7, #4]
|
|
800f320: 2b00 cmp r3, #0
|
|
800f322: d101 bne.n 800f328 <ip4_addr_isbroadcast_u32+0x20>
|
|
(addr == IPADDR_ANY)) {
|
|
return 1;
|
|
800f324: 2301 movs r3, #1
|
|
800f326: e02a b.n 800f37e <ip4_addr_isbroadcast_u32+0x76>
|
|
/* no broadcast support on this network interface? */
|
|
} else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) {
|
|
800f328: 683b ldr r3, [r7, #0]
|
|
800f32a: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
800f32e: f003 0302 and.w r3, r3, #2
|
|
800f332: 2b00 cmp r3, #0
|
|
800f334: d101 bne.n 800f33a <ip4_addr_isbroadcast_u32+0x32>
|
|
/* the given address cannot be a broadcast address
|
|
* nor can we check against any broadcast addresses */
|
|
return 0;
|
|
800f336: 2300 movs r3, #0
|
|
800f338: e021 b.n 800f37e <ip4_addr_isbroadcast_u32+0x76>
|
|
/* address matches network interface address exactly? => no broadcast */
|
|
} else if (addr == ip4_addr_get_u32(netif_ip4_addr(netif))) {
|
|
800f33a: 683b ldr r3, [r7, #0]
|
|
800f33c: 3304 adds r3, #4
|
|
800f33e: 681b ldr r3, [r3, #0]
|
|
800f340: 687a ldr r2, [r7, #4]
|
|
800f342: 429a cmp r2, r3
|
|
800f344: d101 bne.n 800f34a <ip4_addr_isbroadcast_u32+0x42>
|
|
return 0;
|
|
800f346: 2300 movs r3, #0
|
|
800f348: e019 b.n 800f37e <ip4_addr_isbroadcast_u32+0x76>
|
|
/* on the same (sub) network... */
|
|
} else if (ip4_addr_netcmp(&ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif))
|
|
800f34a: 68fa ldr r2, [r7, #12]
|
|
800f34c: 683b ldr r3, [r7, #0]
|
|
800f34e: 3304 adds r3, #4
|
|
800f350: 681b ldr r3, [r3, #0]
|
|
800f352: 405a eors r2, r3
|
|
800f354: 683b ldr r3, [r7, #0]
|
|
800f356: 3308 adds r3, #8
|
|
800f358: 681b ldr r3, [r3, #0]
|
|
800f35a: 4013 ands r3, r2
|
|
800f35c: 2b00 cmp r3, #0
|
|
800f35e: d10d bne.n 800f37c <ip4_addr_isbroadcast_u32+0x74>
|
|
/* ...and host identifier bits are all ones? =>... */
|
|
&& ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) ==
|
|
800f360: 683b ldr r3, [r7, #0]
|
|
800f362: 3308 adds r3, #8
|
|
800f364: 681b ldr r3, [r3, #0]
|
|
800f366: 43da mvns r2, r3
|
|
800f368: 687b ldr r3, [r7, #4]
|
|
800f36a: 401a ands r2, r3
|
|
(IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) {
|
|
800f36c: 683b ldr r3, [r7, #0]
|
|
800f36e: 3308 adds r3, #8
|
|
800f370: 681b ldr r3, [r3, #0]
|
|
800f372: 43db mvns r3, r3
|
|
&& ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) ==
|
|
800f374: 429a cmp r2, r3
|
|
800f376: d101 bne.n 800f37c <ip4_addr_isbroadcast_u32+0x74>
|
|
/* => network broadcast address */
|
|
return 1;
|
|
800f378: 2301 movs r3, #1
|
|
800f37a: e000 b.n 800f37e <ip4_addr_isbroadcast_u32+0x76>
|
|
} else {
|
|
return 0;
|
|
800f37c: 2300 movs r3, #0
|
|
}
|
|
}
|
|
800f37e: 4618 mov r0, r3
|
|
800f380: 3714 adds r7, #20
|
|
800f382: 46bd mov sp, r7
|
|
800f384: f85d 7b04 ldr.w r7, [sp], #4
|
|
800f388: 4770 bx lr
|
|
|
|
0800f38a <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)
|
|
{
|
|
800f38a: b580 push {r7, lr}
|
|
800f38c: b084 sub sp, #16
|
|
800f38e: af00 add r7, sp, #0
|
|
800f390: 6078 str r0, [r7, #4]
|
|
ip4_addr_t val;
|
|
|
|
if (ip4addr_aton(cp, &val)) {
|
|
800f392: f107 030c add.w r3, r7, #12
|
|
800f396: 4619 mov r1, r3
|
|
800f398: 6878 ldr r0, [r7, #4]
|
|
800f39a: f000 f80b bl 800f3b4 <ip4addr_aton>
|
|
800f39e: 4603 mov r3, r0
|
|
800f3a0: 2b00 cmp r3, #0
|
|
800f3a2: d001 beq.n 800f3a8 <ipaddr_addr+0x1e>
|
|
return ip4_addr_get_u32(&val);
|
|
800f3a4: 68fb ldr r3, [r7, #12]
|
|
800f3a6: e001 b.n 800f3ac <ipaddr_addr+0x22>
|
|
}
|
|
return (IPADDR_NONE);
|
|
800f3a8: f04f 33ff mov.w r3, #4294967295
|
|
}
|
|
800f3ac: 4618 mov r0, r3
|
|
800f3ae: 3710 adds r7, #16
|
|
800f3b0: 46bd mov sp, r7
|
|
800f3b2: bd80 pop {r7, pc}
|
|
|
|
0800f3b4 <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)
|
|
{
|
|
800f3b4: b580 push {r7, lr}
|
|
800f3b6: b08a sub sp, #40 ; 0x28
|
|
800f3b8: af00 add r7, sp, #0
|
|
800f3ba: 6078 str r0, [r7, #4]
|
|
800f3bc: 6039 str r1, [r7, #0]
|
|
u32_t val;
|
|
u8_t base;
|
|
char c;
|
|
u32_t parts[4];
|
|
u32_t *pp = parts;
|
|
800f3be: f107 030c add.w r3, r7, #12
|
|
800f3c2: 61fb str r3, [r7, #28]
|
|
|
|
c = *cp;
|
|
800f3c4: 687b ldr r3, [r7, #4]
|
|
800f3c6: 781b ldrb r3, [r3, #0]
|
|
800f3c8: 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)) {
|
|
800f3cc: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
|
|
800f3d0: 3301 adds r3, #1
|
|
800f3d2: 4a89 ldr r2, [pc, #548] ; (800f5f8 <ip4addr_aton+0x244>)
|
|
800f3d4: 4413 add r3, r2
|
|
800f3d6: 781b ldrb r3, [r3, #0]
|
|
800f3d8: f003 0304 and.w r3, r3, #4
|
|
800f3dc: 2b00 cmp r3, #0
|
|
800f3de: d101 bne.n 800f3e4 <ip4addr_aton+0x30>
|
|
return 0;
|
|
800f3e0: 2300 movs r3, #0
|
|
800f3e2: e105 b.n 800f5f0 <ip4addr_aton+0x23c>
|
|
}
|
|
val = 0;
|
|
800f3e4: 2300 movs r3, #0
|
|
800f3e6: 627b str r3, [r7, #36] ; 0x24
|
|
base = 10;
|
|
800f3e8: 230a movs r3, #10
|
|
800f3ea: f887 3023 strb.w r3, [r7, #35] ; 0x23
|
|
if (c == '0') {
|
|
800f3ee: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
|
|
800f3f2: 2b30 cmp r3, #48 ; 0x30
|
|
800f3f4: d11c bne.n 800f430 <ip4addr_aton+0x7c>
|
|
c = *++cp;
|
|
800f3f6: 687b ldr r3, [r7, #4]
|
|
800f3f8: 3301 adds r3, #1
|
|
800f3fa: 607b str r3, [r7, #4]
|
|
800f3fc: 687b ldr r3, [r7, #4]
|
|
800f3fe: 781b ldrb r3, [r3, #0]
|
|
800f400: f887 3022 strb.w r3, [r7, #34] ; 0x22
|
|
if (c == 'x' || c == 'X') {
|
|
800f404: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
|
|
800f408: 2b78 cmp r3, #120 ; 0x78
|
|
800f40a: d003 beq.n 800f414 <ip4addr_aton+0x60>
|
|
800f40c: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
|
|
800f410: 2b58 cmp r3, #88 ; 0x58
|
|
800f412: d10a bne.n 800f42a <ip4addr_aton+0x76>
|
|
base = 16;
|
|
800f414: 2310 movs r3, #16
|
|
800f416: f887 3023 strb.w r3, [r7, #35] ; 0x23
|
|
c = *++cp;
|
|
800f41a: 687b ldr r3, [r7, #4]
|
|
800f41c: 3301 adds r3, #1
|
|
800f41e: 607b str r3, [r7, #4]
|
|
800f420: 687b ldr r3, [r7, #4]
|
|
800f422: 781b ldrb r3, [r3, #0]
|
|
800f424: f887 3022 strb.w r3, [r7, #34] ; 0x22
|
|
800f428: e002 b.n 800f430 <ip4addr_aton+0x7c>
|
|
} else {
|
|
base = 8;
|
|
800f42a: 2308 movs r3, #8
|
|
800f42c: f887 3023 strb.w r3, [r7, #35] ; 0x23
|
|
}
|
|
}
|
|
for (;;) {
|
|
if (lwip_isdigit(c)) {
|
|
800f430: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
|
|
800f434: 3301 adds r3, #1
|
|
800f436: 4a70 ldr r2, [pc, #448] ; (800f5f8 <ip4addr_aton+0x244>)
|
|
800f438: 4413 add r3, r2
|
|
800f43a: 781b ldrb r3, [r3, #0]
|
|
800f43c: f003 0304 and.w r3, r3, #4
|
|
800f440: 2b00 cmp r3, #0
|
|
800f442: d011 beq.n 800f468 <ip4addr_aton+0xb4>
|
|
val = (val * base) + (u32_t)(c - '0');
|
|
800f444: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
|
|
800f448: 6a7a ldr r2, [r7, #36] ; 0x24
|
|
800f44a: fb03 f202 mul.w r2, r3, r2
|
|
800f44e: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
|
|
800f452: 4413 add r3, r2
|
|
800f454: 3b30 subs r3, #48 ; 0x30
|
|
800f456: 627b str r3, [r7, #36] ; 0x24
|
|
c = *++cp;
|
|
800f458: 687b ldr r3, [r7, #4]
|
|
800f45a: 3301 adds r3, #1
|
|
800f45c: 607b str r3, [r7, #4]
|
|
800f45e: 687b ldr r3, [r7, #4]
|
|
800f460: 781b ldrb r3, [r3, #0]
|
|
800f462: f887 3022 strb.w r3, [r7, #34] ; 0x22
|
|
800f466: e7e3 b.n 800f430 <ip4addr_aton+0x7c>
|
|
} else if (base == 16 && lwip_isxdigit(c)) {
|
|
800f468: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
|
|
800f46c: 2b10 cmp r3, #16
|
|
800f46e: d127 bne.n 800f4c0 <ip4addr_aton+0x10c>
|
|
800f470: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
|
|
800f474: 3301 adds r3, #1
|
|
800f476: 4a60 ldr r2, [pc, #384] ; (800f5f8 <ip4addr_aton+0x244>)
|
|
800f478: 4413 add r3, r2
|
|
800f47a: 781b ldrb r3, [r3, #0]
|
|
800f47c: f003 0344 and.w r3, r3, #68 ; 0x44
|
|
800f480: 2b00 cmp r3, #0
|
|
800f482: d01d beq.n 800f4c0 <ip4addr_aton+0x10c>
|
|
val = (val << 4) | (u32_t)(c + 10 - (lwip_islower(c) ? 'a' : 'A'));
|
|
800f484: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800f486: 011b lsls r3, r3, #4
|
|
800f488: f897 2022 ldrb.w r2, [r7, #34] ; 0x22
|
|
800f48c: f102 010a add.w r1, r2, #10
|
|
800f490: f897 2022 ldrb.w r2, [r7, #34] ; 0x22
|
|
800f494: 3201 adds r2, #1
|
|
800f496: 4858 ldr r0, [pc, #352] ; (800f5f8 <ip4addr_aton+0x244>)
|
|
800f498: 4402 add r2, r0
|
|
800f49a: 7812 ldrb r2, [r2, #0]
|
|
800f49c: f002 0203 and.w r2, r2, #3
|
|
800f4a0: 2a02 cmp r2, #2
|
|
800f4a2: d101 bne.n 800f4a8 <ip4addr_aton+0xf4>
|
|
800f4a4: 2261 movs r2, #97 ; 0x61
|
|
800f4a6: e000 b.n 800f4aa <ip4addr_aton+0xf6>
|
|
800f4a8: 2241 movs r2, #65 ; 0x41
|
|
800f4aa: 1a8a subs r2, r1, r2
|
|
800f4ac: 4313 orrs r3, r2
|
|
800f4ae: 627b str r3, [r7, #36] ; 0x24
|
|
c = *++cp;
|
|
800f4b0: 687b ldr r3, [r7, #4]
|
|
800f4b2: 3301 adds r3, #1
|
|
800f4b4: 607b str r3, [r7, #4]
|
|
800f4b6: 687b ldr r3, [r7, #4]
|
|
800f4b8: 781b ldrb r3, [r3, #0]
|
|
800f4ba: f887 3022 strb.w r3, [r7, #34] ; 0x22
|
|
if (lwip_isdigit(c)) {
|
|
800f4be: e7b7 b.n 800f430 <ip4addr_aton+0x7c>
|
|
} else {
|
|
break;
|
|
}
|
|
}
|
|
if (c == '.') {
|
|
800f4c0: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
|
|
800f4c4: 2b2e cmp r3, #46 ; 0x2e
|
|
800f4c6: d114 bne.n 800f4f2 <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) {
|
|
800f4c8: f107 030c add.w r3, r7, #12
|
|
800f4cc: 330c adds r3, #12
|
|
800f4ce: 69fa ldr r2, [r7, #28]
|
|
800f4d0: 429a cmp r2, r3
|
|
800f4d2: d301 bcc.n 800f4d8 <ip4addr_aton+0x124>
|
|
return 0;
|
|
800f4d4: 2300 movs r3, #0
|
|
800f4d6: e08b b.n 800f5f0 <ip4addr_aton+0x23c>
|
|
}
|
|
*pp++ = val;
|
|
800f4d8: 69fb ldr r3, [r7, #28]
|
|
800f4da: 1d1a adds r2, r3, #4
|
|
800f4dc: 61fa str r2, [r7, #28]
|
|
800f4de: 6a7a ldr r2, [r7, #36] ; 0x24
|
|
800f4e0: 601a str r2, [r3, #0]
|
|
c = *++cp;
|
|
800f4e2: 687b ldr r3, [r7, #4]
|
|
800f4e4: 3301 adds r3, #1
|
|
800f4e6: 607b str r3, [r7, #4]
|
|
800f4e8: 687b ldr r3, [r7, #4]
|
|
800f4ea: 781b ldrb r3, [r3, #0]
|
|
800f4ec: f887 3022 strb.w r3, [r7, #34] ; 0x22
|
|
if (!lwip_isdigit(c)) {
|
|
800f4f0: e76c b.n 800f3cc <ip4addr_aton+0x18>
|
|
} else {
|
|
break;
|
|
800f4f2: bf00 nop
|
|
}
|
|
}
|
|
/*
|
|
* Check for trailing characters.
|
|
*/
|
|
if (c != '\0' && !lwip_isspace(c)) {
|
|
800f4f4: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
|
|
800f4f8: 2b00 cmp r3, #0
|
|
800f4fa: d00b beq.n 800f514 <ip4addr_aton+0x160>
|
|
800f4fc: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
|
|
800f500: 3301 adds r3, #1
|
|
800f502: 4a3d ldr r2, [pc, #244] ; (800f5f8 <ip4addr_aton+0x244>)
|
|
800f504: 4413 add r3, r2
|
|
800f506: 781b ldrb r3, [r3, #0]
|
|
800f508: f003 0308 and.w r3, r3, #8
|
|
800f50c: 2b00 cmp r3, #0
|
|
800f50e: d101 bne.n 800f514 <ip4addr_aton+0x160>
|
|
return 0;
|
|
800f510: 2300 movs r3, #0
|
|
800f512: e06d b.n 800f5f0 <ip4addr_aton+0x23c>
|
|
}
|
|
/*
|
|
* Concoct the address according to
|
|
* the number of parts specified.
|
|
*/
|
|
switch (pp - parts + 1) {
|
|
800f514: f107 030c add.w r3, r7, #12
|
|
800f518: 69fa ldr r2, [r7, #28]
|
|
800f51a: 1ad3 subs r3, r2, r3
|
|
800f51c: 109b asrs r3, r3, #2
|
|
800f51e: 3301 adds r3, #1
|
|
800f520: 2b04 cmp r3, #4
|
|
800f522: d853 bhi.n 800f5cc <ip4addr_aton+0x218>
|
|
800f524: a201 add r2, pc, #4 ; (adr r2, 800f52c <ip4addr_aton+0x178>)
|
|
800f526: f852 f023 ldr.w pc, [r2, r3, lsl #2]
|
|
800f52a: bf00 nop
|
|
800f52c: 0800f541 .word 0x0800f541
|
|
800f530: 0800f5db .word 0x0800f5db
|
|
800f534: 0800f545 .word 0x0800f545
|
|
800f538: 0800f567 .word 0x0800f567
|
|
800f53c: 0800f595 .word 0x0800f595
|
|
|
|
case 0:
|
|
return 0; /* initial nondigit */
|
|
800f540: 2300 movs r3, #0
|
|
800f542: e055 b.n 800f5f0 <ip4addr_aton+0x23c>
|
|
|
|
case 1: /* a -- 32 bits */
|
|
break;
|
|
|
|
case 2: /* a.b -- 8.24 bits */
|
|
if (val > 0xffffffUL) {
|
|
800f544: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800f546: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000
|
|
800f54a: d301 bcc.n 800f550 <ip4addr_aton+0x19c>
|
|
return 0;
|
|
800f54c: 2300 movs r3, #0
|
|
800f54e: e04f b.n 800f5f0 <ip4addr_aton+0x23c>
|
|
}
|
|
if (parts[0] > 0xff) {
|
|
800f550: 68fb ldr r3, [r7, #12]
|
|
800f552: 2bff cmp r3, #255 ; 0xff
|
|
800f554: d901 bls.n 800f55a <ip4addr_aton+0x1a6>
|
|
return 0;
|
|
800f556: 2300 movs r3, #0
|
|
800f558: e04a b.n 800f5f0 <ip4addr_aton+0x23c>
|
|
}
|
|
val |= parts[0] << 24;
|
|
800f55a: 68fb ldr r3, [r7, #12]
|
|
800f55c: 061b lsls r3, r3, #24
|
|
800f55e: 6a7a ldr r2, [r7, #36] ; 0x24
|
|
800f560: 4313 orrs r3, r2
|
|
800f562: 627b str r3, [r7, #36] ; 0x24
|
|
break;
|
|
800f564: e03a b.n 800f5dc <ip4addr_aton+0x228>
|
|
|
|
case 3: /* a.b.c -- 8.8.16 bits */
|
|
if (val > 0xffff) {
|
|
800f566: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800f568: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
|
|
800f56c: d301 bcc.n 800f572 <ip4addr_aton+0x1be>
|
|
return 0;
|
|
800f56e: 2300 movs r3, #0
|
|
800f570: e03e b.n 800f5f0 <ip4addr_aton+0x23c>
|
|
}
|
|
if ((parts[0] > 0xff) || (parts[1] > 0xff)) {
|
|
800f572: 68fb ldr r3, [r7, #12]
|
|
800f574: 2bff cmp r3, #255 ; 0xff
|
|
800f576: d802 bhi.n 800f57e <ip4addr_aton+0x1ca>
|
|
800f578: 693b ldr r3, [r7, #16]
|
|
800f57a: 2bff cmp r3, #255 ; 0xff
|
|
800f57c: d901 bls.n 800f582 <ip4addr_aton+0x1ce>
|
|
return 0;
|
|
800f57e: 2300 movs r3, #0
|
|
800f580: e036 b.n 800f5f0 <ip4addr_aton+0x23c>
|
|
}
|
|
val |= (parts[0] << 24) | (parts[1] << 16);
|
|
800f582: 68fb ldr r3, [r7, #12]
|
|
800f584: 061a lsls r2, r3, #24
|
|
800f586: 693b ldr r3, [r7, #16]
|
|
800f588: 041b lsls r3, r3, #16
|
|
800f58a: 4313 orrs r3, r2
|
|
800f58c: 6a7a ldr r2, [r7, #36] ; 0x24
|
|
800f58e: 4313 orrs r3, r2
|
|
800f590: 627b str r3, [r7, #36] ; 0x24
|
|
break;
|
|
800f592: e023 b.n 800f5dc <ip4addr_aton+0x228>
|
|
|
|
case 4: /* a.b.c.d -- 8.8.8.8 bits */
|
|
if (val > 0xff) {
|
|
800f594: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800f596: 2bff cmp r3, #255 ; 0xff
|
|
800f598: d901 bls.n 800f59e <ip4addr_aton+0x1ea>
|
|
return 0;
|
|
800f59a: 2300 movs r3, #0
|
|
800f59c: e028 b.n 800f5f0 <ip4addr_aton+0x23c>
|
|
}
|
|
if ((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff)) {
|
|
800f59e: 68fb ldr r3, [r7, #12]
|
|
800f5a0: 2bff cmp r3, #255 ; 0xff
|
|
800f5a2: d805 bhi.n 800f5b0 <ip4addr_aton+0x1fc>
|
|
800f5a4: 693b ldr r3, [r7, #16]
|
|
800f5a6: 2bff cmp r3, #255 ; 0xff
|
|
800f5a8: d802 bhi.n 800f5b0 <ip4addr_aton+0x1fc>
|
|
800f5aa: 697b ldr r3, [r7, #20]
|
|
800f5ac: 2bff cmp r3, #255 ; 0xff
|
|
800f5ae: d901 bls.n 800f5b4 <ip4addr_aton+0x200>
|
|
return 0;
|
|
800f5b0: 2300 movs r3, #0
|
|
800f5b2: e01d b.n 800f5f0 <ip4addr_aton+0x23c>
|
|
}
|
|
val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
|
|
800f5b4: 68fb ldr r3, [r7, #12]
|
|
800f5b6: 061a lsls r2, r3, #24
|
|
800f5b8: 693b ldr r3, [r7, #16]
|
|
800f5ba: 041b lsls r3, r3, #16
|
|
800f5bc: 431a orrs r2, r3
|
|
800f5be: 697b ldr r3, [r7, #20]
|
|
800f5c0: 021b lsls r3, r3, #8
|
|
800f5c2: 4313 orrs r3, r2
|
|
800f5c4: 6a7a ldr r2, [r7, #36] ; 0x24
|
|
800f5c6: 4313 orrs r3, r2
|
|
800f5c8: 627b str r3, [r7, #36] ; 0x24
|
|
break;
|
|
800f5ca: e007 b.n 800f5dc <ip4addr_aton+0x228>
|
|
default:
|
|
LWIP_ASSERT("unhandled", 0);
|
|
800f5cc: 4b0b ldr r3, [pc, #44] ; (800f5fc <ip4addr_aton+0x248>)
|
|
800f5ce: 22f9 movs r2, #249 ; 0xf9
|
|
800f5d0: 490b ldr r1, [pc, #44] ; (800f600 <ip4addr_aton+0x24c>)
|
|
800f5d2: 480c ldr r0, [pc, #48] ; (800f604 <ip4addr_aton+0x250>)
|
|
800f5d4: f000 ff90 bl 80104f8 <printf>
|
|
break;
|
|
800f5d8: e000 b.n 800f5dc <ip4addr_aton+0x228>
|
|
break;
|
|
800f5da: bf00 nop
|
|
}
|
|
if (addr) {
|
|
800f5dc: 683b ldr r3, [r7, #0]
|
|
800f5de: 2b00 cmp r3, #0
|
|
800f5e0: d005 beq.n 800f5ee <ip4addr_aton+0x23a>
|
|
ip4_addr_set_u32(addr, lwip_htonl(val));
|
|
800f5e2: 6a78 ldr r0, [r7, #36] ; 0x24
|
|
800f5e4: f7f4 febb bl 800435e <lwip_htonl>
|
|
800f5e8: 4602 mov r2, r0
|
|
800f5ea: 683b ldr r3, [r7, #0]
|
|
800f5ec: 601a str r2, [r3, #0]
|
|
}
|
|
return 1;
|
|
800f5ee: 2301 movs r3, #1
|
|
}
|
|
800f5f0: 4618 mov r0, r3
|
|
800f5f2: 3728 adds r7, #40 ; 0x28
|
|
800f5f4: 46bd mov sp, r7
|
|
800f5f6: bd80 pop {r7, pc}
|
|
800f5f8: 08017f52 .word 0x08017f52
|
|
800f5fc: 08017b14 .word 0x08017b14
|
|
800f600: 08017b50 .word 0x08017b50
|
|
800f604: 08017b5c .word 0x08017b5c
|
|
|
|
0800f608 <ip_reass_tmr>:
|
|
*
|
|
* Should be called every 1000 msec (defined by IP_TMR_INTERVAL).
|
|
*/
|
|
void
|
|
ip_reass_tmr(void)
|
|
{
|
|
800f608: b580 push {r7, lr}
|
|
800f60a: b084 sub sp, #16
|
|
800f60c: af00 add r7, sp, #0
|
|
struct ip_reassdata *r, *prev = NULL;
|
|
800f60e: 2300 movs r3, #0
|
|
800f610: 60bb str r3, [r7, #8]
|
|
|
|
r = reassdatagrams;
|
|
800f612: 4b12 ldr r3, [pc, #72] ; (800f65c <ip_reass_tmr+0x54>)
|
|
800f614: 681b ldr r3, [r3, #0]
|
|
800f616: 60fb str r3, [r7, #12]
|
|
while (r != NULL) {
|
|
800f618: e018 b.n 800f64c <ip_reass_tmr+0x44>
|
|
/* Decrement the timer. Once it reaches 0,
|
|
* clean up the incomplete fragment assembly */
|
|
if (r->timer > 0) {
|
|
800f61a: 68fb ldr r3, [r7, #12]
|
|
800f61c: 7fdb ldrb r3, [r3, #31]
|
|
800f61e: 2b00 cmp r3, #0
|
|
800f620: d00b beq.n 800f63a <ip_reass_tmr+0x32>
|
|
r->timer--;
|
|
800f622: 68fb ldr r3, [r7, #12]
|
|
800f624: 7fdb ldrb r3, [r3, #31]
|
|
800f626: 3b01 subs r3, #1
|
|
800f628: b2da uxtb r2, r3
|
|
800f62a: 68fb ldr r3, [r7, #12]
|
|
800f62c: 77da strb r2, [r3, #31]
|
|
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer dec %"U16_F"\n", (u16_t)r->timer));
|
|
prev = r;
|
|
800f62e: 68fb ldr r3, [r7, #12]
|
|
800f630: 60bb str r3, [r7, #8]
|
|
r = r->next;
|
|
800f632: 68fb ldr r3, [r7, #12]
|
|
800f634: 681b ldr r3, [r3, #0]
|
|
800f636: 60fb str r3, [r7, #12]
|
|
800f638: e008 b.n 800f64c <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;
|
|
800f63a: 68fb ldr r3, [r7, #12]
|
|
800f63c: 607b str r3, [r7, #4]
|
|
/* get the next pointer before freeing */
|
|
r = r->next;
|
|
800f63e: 68fb ldr r3, [r7, #12]
|
|
800f640: 681b ldr r3, [r3, #0]
|
|
800f642: 60fb str r3, [r7, #12]
|
|
/* free the helper struct and all enqueued pbufs */
|
|
ip_reass_free_complete_datagram(tmp, prev);
|
|
800f644: 68b9 ldr r1, [r7, #8]
|
|
800f646: 6878 ldr r0, [r7, #4]
|
|
800f648: f000 f80a bl 800f660 <ip_reass_free_complete_datagram>
|
|
while (r != NULL) {
|
|
800f64c: 68fb ldr r3, [r7, #12]
|
|
800f64e: 2b00 cmp r3, #0
|
|
800f650: d1e3 bne.n 800f61a <ip_reass_tmr+0x12>
|
|
}
|
|
}
|
|
}
|
|
800f652: bf00 nop
|
|
800f654: bf00 nop
|
|
800f656: 3710 adds r7, #16
|
|
800f658: 46bd mov sp, r7
|
|
800f65a: bd80 pop {r7, pc}
|
|
800f65c: 20008d88 .word 0x20008d88
|
|
|
|
0800f660 <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)
|
|
{
|
|
800f660: b580 push {r7, lr}
|
|
800f662: b088 sub sp, #32
|
|
800f664: af00 add r7, sp, #0
|
|
800f666: 6078 str r0, [r7, #4]
|
|
800f668: 6039 str r1, [r7, #0]
|
|
u16_t pbufs_freed = 0;
|
|
800f66a: 2300 movs r3, #0
|
|
800f66c: 83fb strh r3, [r7, #30]
|
|
u16_t clen;
|
|
struct pbuf *p;
|
|
struct ip_reass_helper *iprh;
|
|
|
|
LWIP_ASSERT("prev != ipr", prev != ipr);
|
|
800f66e: 683a ldr r2, [r7, #0]
|
|
800f670: 687b ldr r3, [r7, #4]
|
|
800f672: 429a cmp r2, r3
|
|
800f674: d105 bne.n 800f682 <ip_reass_free_complete_datagram+0x22>
|
|
800f676: 4b45 ldr r3, [pc, #276] ; (800f78c <ip_reass_free_complete_datagram+0x12c>)
|
|
800f678: 22ab movs r2, #171 ; 0xab
|
|
800f67a: 4945 ldr r1, [pc, #276] ; (800f790 <ip_reass_free_complete_datagram+0x130>)
|
|
800f67c: 4845 ldr r0, [pc, #276] ; (800f794 <ip_reass_free_complete_datagram+0x134>)
|
|
800f67e: f000 ff3b bl 80104f8 <printf>
|
|
if (prev != NULL) {
|
|
800f682: 683b ldr r3, [r7, #0]
|
|
800f684: 2b00 cmp r3, #0
|
|
800f686: d00a beq.n 800f69e <ip_reass_free_complete_datagram+0x3e>
|
|
LWIP_ASSERT("prev->next == ipr", prev->next == ipr);
|
|
800f688: 683b ldr r3, [r7, #0]
|
|
800f68a: 681b ldr r3, [r3, #0]
|
|
800f68c: 687a ldr r2, [r7, #4]
|
|
800f68e: 429a cmp r2, r3
|
|
800f690: d005 beq.n 800f69e <ip_reass_free_complete_datagram+0x3e>
|
|
800f692: 4b3e ldr r3, [pc, #248] ; (800f78c <ip_reass_free_complete_datagram+0x12c>)
|
|
800f694: 22ad movs r2, #173 ; 0xad
|
|
800f696: 4940 ldr r1, [pc, #256] ; (800f798 <ip_reass_free_complete_datagram+0x138>)
|
|
800f698: 483e ldr r0, [pc, #248] ; (800f794 <ip_reass_free_complete_datagram+0x134>)
|
|
800f69a: f000 ff2d bl 80104f8 <printf>
|
|
}
|
|
|
|
MIB2_STATS_INC(mib2.ipreasmfails);
|
|
#if LWIP_ICMP
|
|
iprh = (struct ip_reass_helper *)ipr->p->payload;
|
|
800f69e: 687b ldr r3, [r7, #4]
|
|
800f6a0: 685b ldr r3, [r3, #4]
|
|
800f6a2: 685b ldr r3, [r3, #4]
|
|
800f6a4: 617b str r3, [r7, #20]
|
|
if (iprh->start == 0) {
|
|
800f6a6: 697b ldr r3, [r7, #20]
|
|
800f6a8: 889b ldrh r3, [r3, #4]
|
|
800f6aa: b29b uxth r3, r3
|
|
800f6ac: 2b00 cmp r3, #0
|
|
800f6ae: d12a bne.n 800f706 <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;
|
|
800f6b0: 687b ldr r3, [r7, #4]
|
|
800f6b2: 685b ldr r3, [r3, #4]
|
|
800f6b4: 61bb str r3, [r7, #24]
|
|
ipr->p = iprh->next_pbuf;
|
|
800f6b6: 697b ldr r3, [r7, #20]
|
|
800f6b8: 681a ldr r2, [r3, #0]
|
|
800f6ba: 687b ldr r3, [r7, #4]
|
|
800f6bc: 605a str r2, [r3, #4]
|
|
/* Then, copy the original header into it. */
|
|
SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN);
|
|
800f6be: 69bb ldr r3, [r7, #24]
|
|
800f6c0: 6858 ldr r0, [r3, #4]
|
|
800f6c2: 687b ldr r3, [r7, #4]
|
|
800f6c4: 3308 adds r3, #8
|
|
800f6c6: 2214 movs r2, #20
|
|
800f6c8: 4619 mov r1, r3
|
|
800f6ca: f000 fee5 bl 8010498 <memcpy>
|
|
icmp_time_exceeded(p, ICMP_TE_FRAG);
|
|
800f6ce: 2101 movs r1, #1
|
|
800f6d0: 69b8 ldr r0, [r7, #24]
|
|
800f6d2: f7ff faeb bl 800ecac <icmp_time_exceeded>
|
|
clen = pbuf_clen(p);
|
|
800f6d6: 69b8 ldr r0, [r7, #24]
|
|
800f6d8: f7f6 fa1e bl 8005b18 <pbuf_clen>
|
|
800f6dc: 4603 mov r3, r0
|
|
800f6de: 827b strh r3, [r7, #18]
|
|
LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
|
|
800f6e0: 8bfa ldrh r2, [r7, #30]
|
|
800f6e2: 8a7b ldrh r3, [r7, #18]
|
|
800f6e4: 4413 add r3, r2
|
|
800f6e6: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
|
|
800f6ea: db05 blt.n 800f6f8 <ip_reass_free_complete_datagram+0x98>
|
|
800f6ec: 4b27 ldr r3, [pc, #156] ; (800f78c <ip_reass_free_complete_datagram+0x12c>)
|
|
800f6ee: 22bc movs r2, #188 ; 0xbc
|
|
800f6f0: 492a ldr r1, [pc, #168] ; (800f79c <ip_reass_free_complete_datagram+0x13c>)
|
|
800f6f2: 4828 ldr r0, [pc, #160] ; (800f794 <ip_reass_free_complete_datagram+0x134>)
|
|
800f6f4: f000 ff00 bl 80104f8 <printf>
|
|
pbufs_freed = (u16_t)(pbufs_freed + clen);
|
|
800f6f8: 8bfa ldrh r2, [r7, #30]
|
|
800f6fa: 8a7b ldrh r3, [r7, #18]
|
|
800f6fc: 4413 add r3, r2
|
|
800f6fe: 83fb strh r3, [r7, #30]
|
|
pbuf_free(p);
|
|
800f700: 69b8 ldr r0, [r7, #24]
|
|
800f702: f7f6 f981 bl 8005a08 <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;
|
|
800f706: 687b ldr r3, [r7, #4]
|
|
800f708: 685b ldr r3, [r3, #4]
|
|
800f70a: 61bb str r3, [r7, #24]
|
|
while (p != NULL) {
|
|
800f70c: e01f b.n 800f74e <ip_reass_free_complete_datagram+0xee>
|
|
struct pbuf *pcur;
|
|
iprh = (struct ip_reass_helper *)p->payload;
|
|
800f70e: 69bb ldr r3, [r7, #24]
|
|
800f710: 685b ldr r3, [r3, #4]
|
|
800f712: 617b str r3, [r7, #20]
|
|
pcur = p;
|
|
800f714: 69bb ldr r3, [r7, #24]
|
|
800f716: 60fb str r3, [r7, #12]
|
|
/* get the next pointer before freeing */
|
|
p = iprh->next_pbuf;
|
|
800f718: 697b ldr r3, [r7, #20]
|
|
800f71a: 681b ldr r3, [r3, #0]
|
|
800f71c: 61bb str r3, [r7, #24]
|
|
clen = pbuf_clen(pcur);
|
|
800f71e: 68f8 ldr r0, [r7, #12]
|
|
800f720: f7f6 f9fa bl 8005b18 <pbuf_clen>
|
|
800f724: 4603 mov r3, r0
|
|
800f726: 827b strh r3, [r7, #18]
|
|
LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
|
|
800f728: 8bfa ldrh r2, [r7, #30]
|
|
800f72a: 8a7b ldrh r3, [r7, #18]
|
|
800f72c: 4413 add r3, r2
|
|
800f72e: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
|
|
800f732: db05 blt.n 800f740 <ip_reass_free_complete_datagram+0xe0>
|
|
800f734: 4b15 ldr r3, [pc, #84] ; (800f78c <ip_reass_free_complete_datagram+0x12c>)
|
|
800f736: 22cc movs r2, #204 ; 0xcc
|
|
800f738: 4918 ldr r1, [pc, #96] ; (800f79c <ip_reass_free_complete_datagram+0x13c>)
|
|
800f73a: 4816 ldr r0, [pc, #88] ; (800f794 <ip_reass_free_complete_datagram+0x134>)
|
|
800f73c: f000 fedc bl 80104f8 <printf>
|
|
pbufs_freed = (u16_t)(pbufs_freed + clen);
|
|
800f740: 8bfa ldrh r2, [r7, #30]
|
|
800f742: 8a7b ldrh r3, [r7, #18]
|
|
800f744: 4413 add r3, r2
|
|
800f746: 83fb strh r3, [r7, #30]
|
|
pbuf_free(pcur);
|
|
800f748: 68f8 ldr r0, [r7, #12]
|
|
800f74a: f7f6 f95d bl 8005a08 <pbuf_free>
|
|
while (p != NULL) {
|
|
800f74e: 69bb ldr r3, [r7, #24]
|
|
800f750: 2b00 cmp r3, #0
|
|
800f752: d1dc bne.n 800f70e <ip_reass_free_complete_datagram+0xae>
|
|
}
|
|
/* Then, unchain the struct ip_reassdata from the list and free it. */
|
|
ip_reass_dequeue_datagram(ipr, prev);
|
|
800f754: 6839 ldr r1, [r7, #0]
|
|
800f756: 6878 ldr r0, [r7, #4]
|
|
800f758: f000 f8c2 bl 800f8e0 <ip_reass_dequeue_datagram>
|
|
LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed);
|
|
800f75c: 4b10 ldr r3, [pc, #64] ; (800f7a0 <ip_reass_free_complete_datagram+0x140>)
|
|
800f75e: 881b ldrh r3, [r3, #0]
|
|
800f760: 8bfa ldrh r2, [r7, #30]
|
|
800f762: 429a cmp r2, r3
|
|
800f764: d905 bls.n 800f772 <ip_reass_free_complete_datagram+0x112>
|
|
800f766: 4b09 ldr r3, [pc, #36] ; (800f78c <ip_reass_free_complete_datagram+0x12c>)
|
|
800f768: 22d2 movs r2, #210 ; 0xd2
|
|
800f76a: 490e ldr r1, [pc, #56] ; (800f7a4 <ip_reass_free_complete_datagram+0x144>)
|
|
800f76c: 4809 ldr r0, [pc, #36] ; (800f794 <ip_reass_free_complete_datagram+0x134>)
|
|
800f76e: f000 fec3 bl 80104f8 <printf>
|
|
ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - pbufs_freed);
|
|
800f772: 4b0b ldr r3, [pc, #44] ; (800f7a0 <ip_reass_free_complete_datagram+0x140>)
|
|
800f774: 881a ldrh r2, [r3, #0]
|
|
800f776: 8bfb ldrh r3, [r7, #30]
|
|
800f778: 1ad3 subs r3, r2, r3
|
|
800f77a: b29a uxth r2, r3
|
|
800f77c: 4b08 ldr r3, [pc, #32] ; (800f7a0 <ip_reass_free_complete_datagram+0x140>)
|
|
800f77e: 801a strh r2, [r3, #0]
|
|
|
|
return pbufs_freed;
|
|
800f780: 8bfb ldrh r3, [r7, #30]
|
|
}
|
|
800f782: 4618 mov r0, r3
|
|
800f784: 3720 adds r7, #32
|
|
800f786: 46bd mov sp, r7
|
|
800f788: bd80 pop {r7, pc}
|
|
800f78a: bf00 nop
|
|
800f78c: 08017b84 .word 0x08017b84
|
|
800f790: 08017bc0 .word 0x08017bc0
|
|
800f794: 08017bcc .word 0x08017bcc
|
|
800f798: 08017bf4 .word 0x08017bf4
|
|
800f79c: 08017c08 .word 0x08017c08
|
|
800f7a0: 20008d8c .word 0x20008d8c
|
|
800f7a4: 08017c28 .word 0x08017c28
|
|
|
|
0800f7a8 <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)
|
|
{
|
|
800f7a8: b580 push {r7, lr}
|
|
800f7aa: b08a sub sp, #40 ; 0x28
|
|
800f7ac: af00 add r7, sp, #0
|
|
800f7ae: 6078 str r0, [r7, #4]
|
|
800f7b0: 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;
|
|
800f7b2: 2300 movs r3, #0
|
|
800f7b4: 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;
|
|
800f7b6: 2300 movs r3, #0
|
|
800f7b8: 623b str r3, [r7, #32]
|
|
prev = NULL;
|
|
800f7ba: 2300 movs r3, #0
|
|
800f7bc: 61fb str r3, [r7, #28]
|
|
oldest_prev = NULL;
|
|
800f7be: 2300 movs r3, #0
|
|
800f7c0: 61bb str r3, [r7, #24]
|
|
other_datagrams = 0;
|
|
800f7c2: 2300 movs r3, #0
|
|
800f7c4: 613b str r3, [r7, #16]
|
|
r = reassdatagrams;
|
|
800f7c6: 4b28 ldr r3, [pc, #160] ; (800f868 <ip_reass_remove_oldest_datagram+0xc0>)
|
|
800f7c8: 681b ldr r3, [r3, #0]
|
|
800f7ca: 627b str r3, [r7, #36] ; 0x24
|
|
while (r != NULL) {
|
|
800f7cc: e030 b.n 800f830 <ip_reass_remove_oldest_datagram+0x88>
|
|
if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) {
|
|
800f7ce: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800f7d0: 695a ldr r2, [r3, #20]
|
|
800f7d2: 687b ldr r3, [r7, #4]
|
|
800f7d4: 68db ldr r3, [r3, #12]
|
|
800f7d6: 429a cmp r2, r3
|
|
800f7d8: d10c bne.n 800f7f4 <ip_reass_remove_oldest_datagram+0x4c>
|
|
800f7da: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800f7dc: 699a ldr r2, [r3, #24]
|
|
800f7de: 687b ldr r3, [r7, #4]
|
|
800f7e0: 691b ldr r3, [r3, #16]
|
|
800f7e2: 429a cmp r2, r3
|
|
800f7e4: d106 bne.n 800f7f4 <ip_reass_remove_oldest_datagram+0x4c>
|
|
800f7e6: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800f7e8: 899a ldrh r2, [r3, #12]
|
|
800f7ea: 687b ldr r3, [r7, #4]
|
|
800f7ec: 889b ldrh r3, [r3, #4]
|
|
800f7ee: b29b uxth r3, r3
|
|
800f7f0: 429a cmp r2, r3
|
|
800f7f2: d014 beq.n 800f81e <ip_reass_remove_oldest_datagram+0x76>
|
|
/* Not the same datagram as fraghdr */
|
|
other_datagrams++;
|
|
800f7f4: 693b ldr r3, [r7, #16]
|
|
800f7f6: 3301 adds r3, #1
|
|
800f7f8: 613b str r3, [r7, #16]
|
|
if (oldest == NULL) {
|
|
800f7fa: 6a3b ldr r3, [r7, #32]
|
|
800f7fc: 2b00 cmp r3, #0
|
|
800f7fe: d104 bne.n 800f80a <ip_reass_remove_oldest_datagram+0x62>
|
|
oldest = r;
|
|
800f800: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800f802: 623b str r3, [r7, #32]
|
|
oldest_prev = prev;
|
|
800f804: 69fb ldr r3, [r7, #28]
|
|
800f806: 61bb str r3, [r7, #24]
|
|
800f808: e009 b.n 800f81e <ip_reass_remove_oldest_datagram+0x76>
|
|
} else if (r->timer <= oldest->timer) {
|
|
800f80a: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800f80c: 7fda ldrb r2, [r3, #31]
|
|
800f80e: 6a3b ldr r3, [r7, #32]
|
|
800f810: 7fdb ldrb r3, [r3, #31]
|
|
800f812: 429a cmp r2, r3
|
|
800f814: d803 bhi.n 800f81e <ip_reass_remove_oldest_datagram+0x76>
|
|
/* older than the previous oldest */
|
|
oldest = r;
|
|
800f816: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800f818: 623b str r3, [r7, #32]
|
|
oldest_prev = prev;
|
|
800f81a: 69fb ldr r3, [r7, #28]
|
|
800f81c: 61bb str r3, [r7, #24]
|
|
}
|
|
}
|
|
if (r->next != NULL) {
|
|
800f81e: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800f820: 681b ldr r3, [r3, #0]
|
|
800f822: 2b00 cmp r3, #0
|
|
800f824: d001 beq.n 800f82a <ip_reass_remove_oldest_datagram+0x82>
|
|
prev = r;
|
|
800f826: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800f828: 61fb str r3, [r7, #28]
|
|
}
|
|
r = r->next;
|
|
800f82a: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800f82c: 681b ldr r3, [r3, #0]
|
|
800f82e: 627b str r3, [r7, #36] ; 0x24
|
|
while (r != NULL) {
|
|
800f830: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800f832: 2b00 cmp r3, #0
|
|
800f834: d1cb bne.n 800f7ce <ip_reass_remove_oldest_datagram+0x26>
|
|
}
|
|
if (oldest != NULL) {
|
|
800f836: 6a3b ldr r3, [r7, #32]
|
|
800f838: 2b00 cmp r3, #0
|
|
800f83a: d008 beq.n 800f84e <ip_reass_remove_oldest_datagram+0xa6>
|
|
pbufs_freed_current = ip_reass_free_complete_datagram(oldest, oldest_prev);
|
|
800f83c: 69b9 ldr r1, [r7, #24]
|
|
800f83e: 6a38 ldr r0, [r7, #32]
|
|
800f840: f7ff ff0e bl 800f660 <ip_reass_free_complete_datagram>
|
|
800f844: 60f8 str r0, [r7, #12]
|
|
pbufs_freed += pbufs_freed_current;
|
|
800f846: 697a ldr r2, [r7, #20]
|
|
800f848: 68fb ldr r3, [r7, #12]
|
|
800f84a: 4413 add r3, r2
|
|
800f84c: 617b str r3, [r7, #20]
|
|
}
|
|
} while ((pbufs_freed < pbufs_needed) && (other_datagrams > 1));
|
|
800f84e: 697a ldr r2, [r7, #20]
|
|
800f850: 683b ldr r3, [r7, #0]
|
|
800f852: 429a cmp r2, r3
|
|
800f854: da02 bge.n 800f85c <ip_reass_remove_oldest_datagram+0xb4>
|
|
800f856: 693b ldr r3, [r7, #16]
|
|
800f858: 2b01 cmp r3, #1
|
|
800f85a: dcac bgt.n 800f7b6 <ip_reass_remove_oldest_datagram+0xe>
|
|
return pbufs_freed;
|
|
800f85c: 697b ldr r3, [r7, #20]
|
|
}
|
|
800f85e: 4618 mov r0, r3
|
|
800f860: 3728 adds r7, #40 ; 0x28
|
|
800f862: 46bd mov sp, r7
|
|
800f864: bd80 pop {r7, pc}
|
|
800f866: bf00 nop
|
|
800f868: 20008d88 .word 0x20008d88
|
|
|
|
0800f86c <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)
|
|
{
|
|
800f86c: b580 push {r7, lr}
|
|
800f86e: b084 sub sp, #16
|
|
800f870: af00 add r7, sp, #0
|
|
800f872: 6078 str r0, [r7, #4]
|
|
800f874: 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);
|
|
800f876: 2004 movs r0, #4
|
|
800f878: f7f5 f9d4 bl 8004c24 <memp_malloc>
|
|
800f87c: 60f8 str r0, [r7, #12]
|
|
if (ipr == NULL) {
|
|
800f87e: 68fb ldr r3, [r7, #12]
|
|
800f880: 2b00 cmp r3, #0
|
|
800f882: d110 bne.n 800f8a6 <ip_reass_enqueue_new_datagram+0x3a>
|
|
#if IP_REASS_FREE_OLDEST
|
|
if (ip_reass_remove_oldest_datagram(fraghdr, clen) >= clen) {
|
|
800f884: 6839 ldr r1, [r7, #0]
|
|
800f886: 6878 ldr r0, [r7, #4]
|
|
800f888: f7ff ff8e bl 800f7a8 <ip_reass_remove_oldest_datagram>
|
|
800f88c: 4602 mov r2, r0
|
|
800f88e: 683b ldr r3, [r7, #0]
|
|
800f890: 4293 cmp r3, r2
|
|
800f892: dc03 bgt.n 800f89c <ip_reass_enqueue_new_datagram+0x30>
|
|
ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA);
|
|
800f894: 2004 movs r0, #4
|
|
800f896: f7f5 f9c5 bl 8004c24 <memp_malloc>
|
|
800f89a: 60f8 str r0, [r7, #12]
|
|
}
|
|
if (ipr == NULL)
|
|
800f89c: 68fb ldr r3, [r7, #12]
|
|
800f89e: 2b00 cmp r3, #0
|
|
800f8a0: d101 bne.n 800f8a6 <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;
|
|
800f8a2: 2300 movs r3, #0
|
|
800f8a4: e016 b.n 800f8d4 <ip_reass_enqueue_new_datagram+0x68>
|
|
}
|
|
}
|
|
memset(ipr, 0, sizeof(struct ip_reassdata));
|
|
800f8a6: 2220 movs r2, #32
|
|
800f8a8: 2100 movs r1, #0
|
|
800f8aa: 68f8 ldr r0, [r7, #12]
|
|
800f8ac: f000 fe1c bl 80104e8 <memset>
|
|
ipr->timer = IP_REASS_MAXAGE;
|
|
800f8b0: 68fb ldr r3, [r7, #12]
|
|
800f8b2: 220f movs r2, #15
|
|
800f8b4: 77da strb r2, [r3, #31]
|
|
|
|
/* enqueue the new structure to the front of the list */
|
|
ipr->next = reassdatagrams;
|
|
800f8b6: 4b09 ldr r3, [pc, #36] ; (800f8dc <ip_reass_enqueue_new_datagram+0x70>)
|
|
800f8b8: 681a ldr r2, [r3, #0]
|
|
800f8ba: 68fb ldr r3, [r7, #12]
|
|
800f8bc: 601a str r2, [r3, #0]
|
|
reassdatagrams = ipr;
|
|
800f8be: 4a07 ldr r2, [pc, #28] ; (800f8dc <ip_reass_enqueue_new_datagram+0x70>)
|
|
800f8c0: 68fb ldr r3, [r7, #12]
|
|
800f8c2: 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);
|
|
800f8c4: 68fb ldr r3, [r7, #12]
|
|
800f8c6: 3308 adds r3, #8
|
|
800f8c8: 2214 movs r2, #20
|
|
800f8ca: 6879 ldr r1, [r7, #4]
|
|
800f8cc: 4618 mov r0, r3
|
|
800f8ce: f000 fde3 bl 8010498 <memcpy>
|
|
return ipr;
|
|
800f8d2: 68fb ldr r3, [r7, #12]
|
|
}
|
|
800f8d4: 4618 mov r0, r3
|
|
800f8d6: 3710 adds r7, #16
|
|
800f8d8: 46bd mov sp, r7
|
|
800f8da: bd80 pop {r7, pc}
|
|
800f8dc: 20008d88 .word 0x20008d88
|
|
|
|
0800f8e0 <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)
|
|
{
|
|
800f8e0: b580 push {r7, lr}
|
|
800f8e2: b082 sub sp, #8
|
|
800f8e4: af00 add r7, sp, #0
|
|
800f8e6: 6078 str r0, [r7, #4]
|
|
800f8e8: 6039 str r1, [r7, #0]
|
|
/* dequeue the reass struct */
|
|
if (reassdatagrams == ipr) {
|
|
800f8ea: 4b10 ldr r3, [pc, #64] ; (800f92c <ip_reass_dequeue_datagram+0x4c>)
|
|
800f8ec: 681b ldr r3, [r3, #0]
|
|
800f8ee: 687a ldr r2, [r7, #4]
|
|
800f8f0: 429a cmp r2, r3
|
|
800f8f2: d104 bne.n 800f8fe <ip_reass_dequeue_datagram+0x1e>
|
|
/* it was the first in the list */
|
|
reassdatagrams = ipr->next;
|
|
800f8f4: 687b ldr r3, [r7, #4]
|
|
800f8f6: 681b ldr r3, [r3, #0]
|
|
800f8f8: 4a0c ldr r2, [pc, #48] ; (800f92c <ip_reass_dequeue_datagram+0x4c>)
|
|
800f8fa: 6013 str r3, [r2, #0]
|
|
800f8fc: e00d b.n 800f91a <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);
|
|
800f8fe: 683b ldr r3, [r7, #0]
|
|
800f900: 2b00 cmp r3, #0
|
|
800f902: d106 bne.n 800f912 <ip_reass_dequeue_datagram+0x32>
|
|
800f904: 4b0a ldr r3, [pc, #40] ; (800f930 <ip_reass_dequeue_datagram+0x50>)
|
|
800f906: f240 1245 movw r2, #325 ; 0x145
|
|
800f90a: 490a ldr r1, [pc, #40] ; (800f934 <ip_reass_dequeue_datagram+0x54>)
|
|
800f90c: 480a ldr r0, [pc, #40] ; (800f938 <ip_reass_dequeue_datagram+0x58>)
|
|
800f90e: f000 fdf3 bl 80104f8 <printf>
|
|
prev->next = ipr->next;
|
|
800f912: 687b ldr r3, [r7, #4]
|
|
800f914: 681a ldr r2, [r3, #0]
|
|
800f916: 683b ldr r3, [r7, #0]
|
|
800f918: 601a str r2, [r3, #0]
|
|
}
|
|
|
|
/* now we can free the ip_reassdata struct */
|
|
memp_free(MEMP_REASSDATA, ipr);
|
|
800f91a: 6879 ldr r1, [r7, #4]
|
|
800f91c: 2004 movs r0, #4
|
|
800f91e: f7f5 f9f1 bl 8004d04 <memp_free>
|
|
}
|
|
800f922: bf00 nop
|
|
800f924: 3708 adds r7, #8
|
|
800f926: 46bd mov sp, r7
|
|
800f928: bd80 pop {r7, pc}
|
|
800f92a: bf00 nop
|
|
800f92c: 20008d88 .word 0x20008d88
|
|
800f930: 08017b84 .word 0x08017b84
|
|
800f934: 08017c4c .word 0x08017c4c
|
|
800f938: 08017bcc .word 0x08017bcc
|
|
|
|
0800f93c <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)
|
|
{
|
|
800f93c: b580 push {r7, lr}
|
|
800f93e: b08c sub sp, #48 ; 0x30
|
|
800f940: af00 add r7, sp, #0
|
|
800f942: 60f8 str r0, [r7, #12]
|
|
800f944: 60b9 str r1, [r7, #8]
|
|
800f946: 607a str r2, [r7, #4]
|
|
struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev = NULL;
|
|
800f948: 2300 movs r3, #0
|
|
800f94a: 62bb str r3, [r7, #40] ; 0x28
|
|
struct pbuf *q;
|
|
u16_t offset, len;
|
|
u8_t hlen;
|
|
struct ip_hdr *fraghdr;
|
|
int valid = 1;
|
|
800f94c: 2301 movs r3, #1
|
|
800f94e: 623b str r3, [r7, #32]
|
|
|
|
/* Extract length and fragment offset from current fragment */
|
|
fraghdr = (struct ip_hdr *)new_p->payload;
|
|
800f950: 68bb ldr r3, [r7, #8]
|
|
800f952: 685b ldr r3, [r3, #4]
|
|
800f954: 61fb str r3, [r7, #28]
|
|
len = lwip_ntohs(IPH_LEN(fraghdr));
|
|
800f956: 69fb ldr r3, [r7, #28]
|
|
800f958: 885b ldrh r3, [r3, #2]
|
|
800f95a: b29b uxth r3, r3
|
|
800f95c: 4618 mov r0, r3
|
|
800f95e: f7f4 fce9 bl 8004334 <lwip_htons>
|
|
800f962: 4603 mov r3, r0
|
|
800f964: 837b strh r3, [r7, #26]
|
|
hlen = IPH_HL_BYTES(fraghdr);
|
|
800f966: 69fb ldr r3, [r7, #28]
|
|
800f968: 781b ldrb r3, [r3, #0]
|
|
800f96a: f003 030f and.w r3, r3, #15
|
|
800f96e: b2db uxtb r3, r3
|
|
800f970: 009b lsls r3, r3, #2
|
|
800f972: 767b strb r3, [r7, #25]
|
|
if (hlen > len) {
|
|
800f974: 7e7b ldrb r3, [r7, #25]
|
|
800f976: b29b uxth r3, r3
|
|
800f978: 8b7a ldrh r2, [r7, #26]
|
|
800f97a: 429a cmp r2, r3
|
|
800f97c: d202 bcs.n 800f984 <ip_reass_chain_frag_into_datagram_and_validate+0x48>
|
|
/* invalid datagram */
|
|
return IP_REASS_VALIDATE_PBUF_DROPPED;
|
|
800f97e: f04f 33ff mov.w r3, #4294967295
|
|
800f982: e135 b.n 800fbf0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
|
|
}
|
|
len = (u16_t)(len - hlen);
|
|
800f984: 7e7b ldrb r3, [r7, #25]
|
|
800f986: b29b uxth r3, r3
|
|
800f988: 8b7a ldrh r2, [r7, #26]
|
|
800f98a: 1ad3 subs r3, r2, r3
|
|
800f98c: 837b strh r3, [r7, #26]
|
|
offset = IPH_OFFSET_BYTES(fraghdr);
|
|
800f98e: 69fb ldr r3, [r7, #28]
|
|
800f990: 88db ldrh r3, [r3, #6]
|
|
800f992: b29b uxth r3, r3
|
|
800f994: 4618 mov r0, r3
|
|
800f996: f7f4 fccd bl 8004334 <lwip_htons>
|
|
800f99a: 4603 mov r3, r0
|
|
800f99c: f3c3 030c ubfx r3, r3, #0, #13
|
|
800f9a0: b29b uxth r3, r3
|
|
800f9a2: 00db lsls r3, r3, #3
|
|
800f9a4: 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;
|
|
800f9a6: 68bb ldr r3, [r7, #8]
|
|
800f9a8: 685b ldr r3, [r3, #4]
|
|
800f9aa: 62fb str r3, [r7, #44] ; 0x2c
|
|
iprh->next_pbuf = NULL;
|
|
800f9ac: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800f9ae: 2200 movs r2, #0
|
|
800f9b0: 701a strb r2, [r3, #0]
|
|
800f9b2: 2200 movs r2, #0
|
|
800f9b4: 705a strb r2, [r3, #1]
|
|
800f9b6: 2200 movs r2, #0
|
|
800f9b8: 709a strb r2, [r3, #2]
|
|
800f9ba: 2200 movs r2, #0
|
|
800f9bc: 70da strb r2, [r3, #3]
|
|
iprh->start = offset;
|
|
800f9be: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800f9c0: 8afa ldrh r2, [r7, #22]
|
|
800f9c2: 809a strh r2, [r3, #4]
|
|
iprh->end = (u16_t)(offset + len);
|
|
800f9c4: 8afa ldrh r2, [r7, #22]
|
|
800f9c6: 8b7b ldrh r3, [r7, #26]
|
|
800f9c8: 4413 add r3, r2
|
|
800f9ca: b29a uxth r2, r3
|
|
800f9cc: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800f9ce: 80da strh r2, [r3, #6]
|
|
if (iprh->end < offset) {
|
|
800f9d0: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800f9d2: 88db ldrh r3, [r3, #6]
|
|
800f9d4: b29b uxth r3, r3
|
|
800f9d6: 8afa ldrh r2, [r7, #22]
|
|
800f9d8: 429a cmp r2, r3
|
|
800f9da: d902 bls.n 800f9e2 <ip_reass_chain_frag_into_datagram_and_validate+0xa6>
|
|
/* u16_t overflow, cannot handle this */
|
|
return IP_REASS_VALIDATE_PBUF_DROPPED;
|
|
800f9dc: f04f 33ff mov.w r3, #4294967295
|
|
800f9e0: e106 b.n 800fbf0 <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;) {
|
|
800f9e2: 68fb ldr r3, [r7, #12]
|
|
800f9e4: 685b ldr r3, [r3, #4]
|
|
800f9e6: 627b str r3, [r7, #36] ; 0x24
|
|
800f9e8: e068 b.n 800fabc <ip_reass_chain_frag_into_datagram_and_validate+0x180>
|
|
iprh_tmp = (struct ip_reass_helper *)q->payload;
|
|
800f9ea: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800f9ec: 685b ldr r3, [r3, #4]
|
|
800f9ee: 613b str r3, [r7, #16]
|
|
if (iprh->start < iprh_tmp->start) {
|
|
800f9f0: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800f9f2: 889b ldrh r3, [r3, #4]
|
|
800f9f4: b29a uxth r2, r3
|
|
800f9f6: 693b ldr r3, [r7, #16]
|
|
800f9f8: 889b ldrh r3, [r3, #4]
|
|
800f9fa: b29b uxth r3, r3
|
|
800f9fc: 429a cmp r2, r3
|
|
800f9fe: d235 bcs.n 800fa6c <ip_reass_chain_frag_into_datagram_and_validate+0x130>
|
|
/* the new pbuf should be inserted before this */
|
|
iprh->next_pbuf = q;
|
|
800fa00: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fa02: 6a7a ldr r2, [r7, #36] ; 0x24
|
|
800fa04: 601a str r2, [r3, #0]
|
|
if (iprh_prev != NULL) {
|
|
800fa06: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fa08: 2b00 cmp r3, #0
|
|
800fa0a: d020 beq.n 800fa4e <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)) {
|
|
800fa0c: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fa0e: 889b ldrh r3, [r3, #4]
|
|
800fa10: b29a uxth r2, r3
|
|
800fa12: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fa14: 88db ldrh r3, [r3, #6]
|
|
800fa16: b29b uxth r3, r3
|
|
800fa18: 429a cmp r2, r3
|
|
800fa1a: d307 bcc.n 800fa2c <ip_reass_chain_frag_into_datagram_and_validate+0xf0>
|
|
800fa1c: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fa1e: 88db ldrh r3, [r3, #6]
|
|
800fa20: b29a uxth r2, r3
|
|
800fa22: 693b ldr r3, [r7, #16]
|
|
800fa24: 889b ldrh r3, [r3, #4]
|
|
800fa26: b29b uxth r3, r3
|
|
800fa28: 429a cmp r2, r3
|
|
800fa2a: d902 bls.n 800fa32 <ip_reass_chain_frag_into_datagram_and_validate+0xf6>
|
|
/* fragment overlaps with previous or following, throw away */
|
|
return IP_REASS_VALIDATE_PBUF_DROPPED;
|
|
800fa2c: f04f 33ff mov.w r3, #4294967295
|
|
800fa30: e0de b.n 800fbf0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
|
|
}
|
|
#endif /* IP_REASS_CHECK_OVERLAP */
|
|
iprh_prev->next_pbuf = new_p;
|
|
800fa32: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fa34: 68ba ldr r2, [r7, #8]
|
|
800fa36: 601a str r2, [r3, #0]
|
|
if (iprh_prev->end != iprh->start) {
|
|
800fa38: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fa3a: 88db ldrh r3, [r3, #6]
|
|
800fa3c: b29a uxth r2, r3
|
|
800fa3e: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fa40: 889b ldrh r3, [r3, #4]
|
|
800fa42: b29b uxth r3, r3
|
|
800fa44: 429a cmp r2, r3
|
|
800fa46: d03d beq.n 800fac4 <ip_reass_chain_frag_into_datagram_and_validate+0x188>
|
|
/* There is a fragment missing between the current
|
|
* and the previous fragment */
|
|
valid = 0;
|
|
800fa48: 2300 movs r3, #0
|
|
800fa4a: 623b str r3, [r7, #32]
|
|
}
|
|
#endif /* IP_REASS_CHECK_OVERLAP */
|
|
/* fragment with the lowest offset */
|
|
ipr->p = new_p;
|
|
}
|
|
break;
|
|
800fa4c: e03a b.n 800fac4 <ip_reass_chain_frag_into_datagram_and_validate+0x188>
|
|
if (iprh->end > iprh_tmp->start) {
|
|
800fa4e: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fa50: 88db ldrh r3, [r3, #6]
|
|
800fa52: b29a uxth r2, r3
|
|
800fa54: 693b ldr r3, [r7, #16]
|
|
800fa56: 889b ldrh r3, [r3, #4]
|
|
800fa58: b29b uxth r3, r3
|
|
800fa5a: 429a cmp r2, r3
|
|
800fa5c: d902 bls.n 800fa64 <ip_reass_chain_frag_into_datagram_and_validate+0x128>
|
|
return IP_REASS_VALIDATE_PBUF_DROPPED;
|
|
800fa5e: f04f 33ff mov.w r3, #4294967295
|
|
800fa62: e0c5 b.n 800fbf0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
|
|
ipr->p = new_p;
|
|
800fa64: 68fb ldr r3, [r7, #12]
|
|
800fa66: 68ba ldr r2, [r7, #8]
|
|
800fa68: 605a str r2, [r3, #4]
|
|
break;
|
|
800fa6a: e02b b.n 800fac4 <ip_reass_chain_frag_into_datagram_and_validate+0x188>
|
|
} else if (iprh->start == iprh_tmp->start) {
|
|
800fa6c: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fa6e: 889b ldrh r3, [r3, #4]
|
|
800fa70: b29a uxth r2, r3
|
|
800fa72: 693b ldr r3, [r7, #16]
|
|
800fa74: 889b ldrh r3, [r3, #4]
|
|
800fa76: b29b uxth r3, r3
|
|
800fa78: 429a cmp r2, r3
|
|
800fa7a: d102 bne.n 800fa82 <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;
|
|
800fa7c: f04f 33ff mov.w r3, #4294967295
|
|
800fa80: e0b6 b.n 800fbf0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
|
|
#if IP_REASS_CHECK_OVERLAP
|
|
} else if (iprh->start < iprh_tmp->end) {
|
|
800fa82: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fa84: 889b ldrh r3, [r3, #4]
|
|
800fa86: b29a uxth r2, r3
|
|
800fa88: 693b ldr r3, [r7, #16]
|
|
800fa8a: 88db ldrh r3, [r3, #6]
|
|
800fa8c: b29b uxth r3, r3
|
|
800fa8e: 429a cmp r2, r3
|
|
800fa90: d202 bcs.n 800fa98 <ip_reass_chain_frag_into_datagram_and_validate+0x15c>
|
|
/* overlap: no need to keep the new datagram */
|
|
return IP_REASS_VALIDATE_PBUF_DROPPED;
|
|
800fa92: f04f 33ff mov.w r3, #4294967295
|
|
800fa96: e0ab b.n 800fbf0 <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) {
|
|
800fa98: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fa9a: 2b00 cmp r3, #0
|
|
800fa9c: d009 beq.n 800fab2 <ip_reass_chain_frag_into_datagram_and_validate+0x176>
|
|
if (iprh_prev->end != iprh_tmp->start) {
|
|
800fa9e: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800faa0: 88db ldrh r3, [r3, #6]
|
|
800faa2: b29a uxth r2, r3
|
|
800faa4: 693b ldr r3, [r7, #16]
|
|
800faa6: 889b ldrh r3, [r3, #4]
|
|
800faa8: b29b uxth r3, r3
|
|
800faaa: 429a cmp r2, r3
|
|
800faac: d001 beq.n 800fab2 <ip_reass_chain_frag_into_datagram_and_validate+0x176>
|
|
/* There is a fragment missing between the current
|
|
* and the previous fragment */
|
|
valid = 0;
|
|
800faae: 2300 movs r3, #0
|
|
800fab0: 623b str r3, [r7, #32]
|
|
}
|
|
}
|
|
}
|
|
q = iprh_tmp->next_pbuf;
|
|
800fab2: 693b ldr r3, [r7, #16]
|
|
800fab4: 681b ldr r3, [r3, #0]
|
|
800fab6: 627b str r3, [r7, #36] ; 0x24
|
|
iprh_prev = iprh_tmp;
|
|
800fab8: 693b ldr r3, [r7, #16]
|
|
800faba: 62bb str r3, [r7, #40] ; 0x28
|
|
for (q = ipr->p; q != NULL;) {
|
|
800fabc: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800fabe: 2b00 cmp r3, #0
|
|
800fac0: d193 bne.n 800f9ea <ip_reass_chain_frag_into_datagram_and_validate+0xae>
|
|
800fac2: e000 b.n 800fac6 <ip_reass_chain_frag_into_datagram_and_validate+0x18a>
|
|
break;
|
|
800fac4: bf00 nop
|
|
}
|
|
|
|
/* If q is NULL, then we made it to the end of the list. Determine what to do now */
|
|
if (q == NULL) {
|
|
800fac6: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800fac8: 2b00 cmp r3, #0
|
|
800faca: d12d bne.n 800fb28 <ip_reass_chain_frag_into_datagram_and_validate+0x1ec>
|
|
if (iprh_prev != NULL) {
|
|
800facc: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800face: 2b00 cmp r3, #0
|
|
800fad0: d01c beq.n 800fb0c <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);
|
|
800fad2: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fad4: 88db ldrh r3, [r3, #6]
|
|
800fad6: b29a uxth r2, r3
|
|
800fad8: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fada: 889b ldrh r3, [r3, #4]
|
|
800fadc: b29b uxth r3, r3
|
|
800fade: 429a cmp r2, r3
|
|
800fae0: d906 bls.n 800faf0 <ip_reass_chain_frag_into_datagram_and_validate+0x1b4>
|
|
800fae2: 4b45 ldr r3, [pc, #276] ; (800fbf8 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
|
|
800fae4: f44f 72db mov.w r2, #438 ; 0x1b6
|
|
800fae8: 4944 ldr r1, [pc, #272] ; (800fbfc <ip_reass_chain_frag_into_datagram_and_validate+0x2c0>)
|
|
800faea: 4845 ldr r0, [pc, #276] ; (800fc00 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
|
|
800faec: f000 fd04 bl 80104f8 <printf>
|
|
#endif /* IP_REASS_CHECK_OVERLAP */
|
|
iprh_prev->next_pbuf = new_p;
|
|
800faf0: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800faf2: 68ba ldr r2, [r7, #8]
|
|
800faf4: 601a str r2, [r3, #0]
|
|
if (iprh_prev->end != iprh->start) {
|
|
800faf6: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800faf8: 88db ldrh r3, [r3, #6]
|
|
800fafa: b29a uxth r2, r3
|
|
800fafc: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fafe: 889b ldrh r3, [r3, #4]
|
|
800fb00: b29b uxth r3, r3
|
|
800fb02: 429a cmp r2, r3
|
|
800fb04: d010 beq.n 800fb28 <ip_reass_chain_frag_into_datagram_and_validate+0x1ec>
|
|
valid = 0;
|
|
800fb06: 2300 movs r3, #0
|
|
800fb08: 623b str r3, [r7, #32]
|
|
800fb0a: e00d b.n 800fb28 <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!",
|
|
800fb0c: 68fb ldr r3, [r7, #12]
|
|
800fb0e: 685b ldr r3, [r3, #4]
|
|
800fb10: 2b00 cmp r3, #0
|
|
800fb12: d006 beq.n 800fb22 <ip_reass_chain_frag_into_datagram_and_validate+0x1e6>
|
|
800fb14: 4b38 ldr r3, [pc, #224] ; (800fbf8 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
|
|
800fb16: f44f 72df mov.w r2, #446 ; 0x1be
|
|
800fb1a: 493a ldr r1, [pc, #232] ; (800fc04 <ip_reass_chain_frag_into_datagram_and_validate+0x2c8>)
|
|
800fb1c: 4838 ldr r0, [pc, #224] ; (800fc00 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
|
|
800fb1e: f000 fceb bl 80104f8 <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;
|
|
800fb22: 68fb ldr r3, [r7, #12]
|
|
800fb24: 68ba ldr r2, [r7, #8]
|
|
800fb26: 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)) {
|
|
800fb28: 687b ldr r3, [r7, #4]
|
|
800fb2a: 2b00 cmp r3, #0
|
|
800fb2c: d105 bne.n 800fb3a <ip_reass_chain_frag_into_datagram_and_validate+0x1fe>
|
|
800fb2e: 68fb ldr r3, [r7, #12]
|
|
800fb30: 7f9b ldrb r3, [r3, #30]
|
|
800fb32: f003 0301 and.w r3, r3, #1
|
|
800fb36: 2b00 cmp r3, #0
|
|
800fb38: d059 beq.n 800fbee <ip_reass_chain_frag_into_datagram_and_validate+0x2b2>
|
|
/* and had no holes so far */
|
|
if (valid) {
|
|
800fb3a: 6a3b ldr r3, [r7, #32]
|
|
800fb3c: 2b00 cmp r3, #0
|
|
800fb3e: d04f beq.n 800fbe0 <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)) {
|
|
800fb40: 68fb ldr r3, [r7, #12]
|
|
800fb42: 685b ldr r3, [r3, #4]
|
|
800fb44: 2b00 cmp r3, #0
|
|
800fb46: d006 beq.n 800fb56 <ip_reass_chain_frag_into_datagram_and_validate+0x21a>
|
|
800fb48: 68fb ldr r3, [r7, #12]
|
|
800fb4a: 685b ldr r3, [r3, #4]
|
|
800fb4c: 685b ldr r3, [r3, #4]
|
|
800fb4e: 889b ldrh r3, [r3, #4]
|
|
800fb50: b29b uxth r3, r3
|
|
800fb52: 2b00 cmp r3, #0
|
|
800fb54: d002 beq.n 800fb5c <ip_reass_chain_frag_into_datagram_and_validate+0x220>
|
|
valid = 0;
|
|
800fb56: 2300 movs r3, #0
|
|
800fb58: 623b str r3, [r7, #32]
|
|
800fb5a: e041 b.n 800fbe0 <ip_reass_chain_frag_into_datagram_and_validate+0x2a4>
|
|
} else {
|
|
/* and check that there are no holes after this datagram */
|
|
iprh_prev = iprh;
|
|
800fb5c: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fb5e: 62bb str r3, [r7, #40] ; 0x28
|
|
q = iprh->next_pbuf;
|
|
800fb60: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fb62: 681b ldr r3, [r3, #0]
|
|
800fb64: 627b str r3, [r7, #36] ; 0x24
|
|
while (q != NULL) {
|
|
800fb66: e012 b.n 800fb8e <ip_reass_chain_frag_into_datagram_and_validate+0x252>
|
|
iprh = (struct ip_reass_helper *)q->payload;
|
|
800fb68: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800fb6a: 685b ldr r3, [r3, #4]
|
|
800fb6c: 62fb str r3, [r7, #44] ; 0x2c
|
|
if (iprh_prev->end != iprh->start) {
|
|
800fb6e: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fb70: 88db ldrh r3, [r3, #6]
|
|
800fb72: b29a uxth r2, r3
|
|
800fb74: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fb76: 889b ldrh r3, [r3, #4]
|
|
800fb78: b29b uxth r3, r3
|
|
800fb7a: 429a cmp r2, r3
|
|
800fb7c: d002 beq.n 800fb84 <ip_reass_chain_frag_into_datagram_and_validate+0x248>
|
|
valid = 0;
|
|
800fb7e: 2300 movs r3, #0
|
|
800fb80: 623b str r3, [r7, #32]
|
|
break;
|
|
800fb82: e007 b.n 800fb94 <ip_reass_chain_frag_into_datagram_and_validate+0x258>
|
|
}
|
|
iprh_prev = iprh;
|
|
800fb84: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fb86: 62bb str r3, [r7, #40] ; 0x28
|
|
q = iprh->next_pbuf;
|
|
800fb88: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fb8a: 681b ldr r3, [r3, #0]
|
|
800fb8c: 627b str r3, [r7, #36] ; 0x24
|
|
while (q != NULL) {
|
|
800fb8e: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
800fb90: 2b00 cmp r3, #0
|
|
800fb92: d1e9 bne.n 800fb68 <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) {
|
|
800fb94: 6a3b ldr r3, [r7, #32]
|
|
800fb96: 2b00 cmp r3, #0
|
|
800fb98: d022 beq.n 800fbe0 <ip_reass_chain_frag_into_datagram_and_validate+0x2a4>
|
|
LWIP_ASSERT("sanity check", ipr->p != NULL);
|
|
800fb9a: 68fb ldr r3, [r7, #12]
|
|
800fb9c: 685b ldr r3, [r3, #4]
|
|
800fb9e: 2b00 cmp r3, #0
|
|
800fba0: d106 bne.n 800fbb0 <ip_reass_chain_frag_into_datagram_and_validate+0x274>
|
|
800fba2: 4b15 ldr r3, [pc, #84] ; (800fbf8 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
|
|
800fba4: f240 12df movw r2, #479 ; 0x1df
|
|
800fba8: 4917 ldr r1, [pc, #92] ; (800fc08 <ip_reass_chain_frag_into_datagram_and_validate+0x2cc>)
|
|
800fbaa: 4815 ldr r0, [pc, #84] ; (800fc00 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
|
|
800fbac: f000 fca4 bl 80104f8 <printf>
|
|
LWIP_ASSERT("sanity check",
|
|
800fbb0: 68fb ldr r3, [r7, #12]
|
|
800fbb2: 685b ldr r3, [r3, #4]
|
|
800fbb4: 685b ldr r3, [r3, #4]
|
|
800fbb6: 6afa ldr r2, [r7, #44] ; 0x2c
|
|
800fbb8: 429a cmp r2, r3
|
|
800fbba: d106 bne.n 800fbca <ip_reass_chain_frag_into_datagram_and_validate+0x28e>
|
|
800fbbc: 4b0e ldr r3, [pc, #56] ; (800fbf8 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
|
|
800fbbe: f44f 72f0 mov.w r2, #480 ; 0x1e0
|
|
800fbc2: 4911 ldr r1, [pc, #68] ; (800fc08 <ip_reass_chain_frag_into_datagram_and_validate+0x2cc>)
|
|
800fbc4: 480e ldr r0, [pc, #56] ; (800fc00 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
|
|
800fbc6: f000 fc97 bl 80104f8 <printf>
|
|
((struct ip_reass_helper *)ipr->p->payload) != iprh);
|
|
LWIP_ASSERT("validate_datagram:next_pbuf!=NULL",
|
|
800fbca: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fbcc: 681b ldr r3, [r3, #0]
|
|
800fbce: 2b00 cmp r3, #0
|
|
800fbd0: d006 beq.n 800fbe0 <ip_reass_chain_frag_into_datagram_and_validate+0x2a4>
|
|
800fbd2: 4b09 ldr r3, [pc, #36] ; (800fbf8 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
|
|
800fbd4: f44f 72f1 mov.w r2, #482 ; 0x1e2
|
|
800fbd8: 490c ldr r1, [pc, #48] ; (800fc0c <ip_reass_chain_frag_into_datagram_and_validate+0x2d0>)
|
|
800fbda: 4809 ldr r0, [pc, #36] ; (800fc00 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
|
|
800fbdc: f000 fc8c bl 80104f8 <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;
|
|
800fbe0: 6a3b ldr r3, [r7, #32]
|
|
800fbe2: 2b00 cmp r3, #0
|
|
800fbe4: bf14 ite ne
|
|
800fbe6: 2301 movne r3, #1
|
|
800fbe8: 2300 moveq r3, #0
|
|
800fbea: b2db uxtb r3, r3
|
|
800fbec: e000 b.n 800fbf0 <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! */
|
|
800fbee: 2300 movs r3, #0
|
|
}
|
|
800fbf0: 4618 mov r0, r3
|
|
800fbf2: 3730 adds r7, #48 ; 0x30
|
|
800fbf4: 46bd mov sp, r7
|
|
800fbf6: bd80 pop {r7, pc}
|
|
800fbf8: 08017b84 .word 0x08017b84
|
|
800fbfc: 08017c68 .word 0x08017c68
|
|
800fc00: 08017bcc .word 0x08017bcc
|
|
800fc04: 08017c88 .word 0x08017c88
|
|
800fc08: 08017cc0 .word 0x08017cc0
|
|
800fc0c: 08017cd0 .word 0x08017cd0
|
|
|
|
0800fc10 <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)
|
|
{
|
|
800fc10: b580 push {r7, lr}
|
|
800fc12: b08e sub sp, #56 ; 0x38
|
|
800fc14: af00 add r7, sp, #0
|
|
800fc16: 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;
|
|
800fc18: 687b ldr r3, [r7, #4]
|
|
800fc1a: 685b ldr r3, [r3, #4]
|
|
800fc1c: 62bb str r3, [r7, #40] ; 0x28
|
|
|
|
if (IPH_HL_BYTES(fraghdr) != IP_HLEN) {
|
|
800fc1e: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fc20: 781b ldrb r3, [r3, #0]
|
|
800fc22: f003 030f and.w r3, r3, #15
|
|
800fc26: b2db uxtb r3, r3
|
|
800fc28: 009b lsls r3, r3, #2
|
|
800fc2a: b2db uxtb r3, r3
|
|
800fc2c: 2b14 cmp r3, #20
|
|
800fc2e: f040 8171 bne.w 800ff14 <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);
|
|
800fc32: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fc34: 88db ldrh r3, [r3, #6]
|
|
800fc36: b29b uxth r3, r3
|
|
800fc38: 4618 mov r0, r3
|
|
800fc3a: f7f4 fb7b bl 8004334 <lwip_htons>
|
|
800fc3e: 4603 mov r3, r0
|
|
800fc40: f3c3 030c ubfx r3, r3, #0, #13
|
|
800fc44: b29b uxth r3, r3
|
|
800fc46: 00db lsls r3, r3, #3
|
|
800fc48: 84fb strh r3, [r7, #38] ; 0x26
|
|
len = lwip_ntohs(IPH_LEN(fraghdr));
|
|
800fc4a: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fc4c: 885b ldrh r3, [r3, #2]
|
|
800fc4e: b29b uxth r3, r3
|
|
800fc50: 4618 mov r0, r3
|
|
800fc52: f7f4 fb6f bl 8004334 <lwip_htons>
|
|
800fc56: 4603 mov r3, r0
|
|
800fc58: 84bb strh r3, [r7, #36] ; 0x24
|
|
hlen = IPH_HL_BYTES(fraghdr);
|
|
800fc5a: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fc5c: 781b ldrb r3, [r3, #0]
|
|
800fc5e: f003 030f and.w r3, r3, #15
|
|
800fc62: b2db uxtb r3, r3
|
|
800fc64: 009b lsls r3, r3, #2
|
|
800fc66: f887 3023 strb.w r3, [r7, #35] ; 0x23
|
|
if (hlen > len) {
|
|
800fc6a: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
|
|
800fc6e: b29b uxth r3, r3
|
|
800fc70: 8cba ldrh r2, [r7, #36] ; 0x24
|
|
800fc72: 429a cmp r2, r3
|
|
800fc74: f0c0 8150 bcc.w 800ff18 <ip4_reass+0x308>
|
|
/* invalid datagram */
|
|
goto nullreturn;
|
|
}
|
|
len = (u16_t)(len - hlen);
|
|
800fc78: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
|
|
800fc7c: b29b uxth r3, r3
|
|
800fc7e: 8cba ldrh r2, [r7, #36] ; 0x24
|
|
800fc80: 1ad3 subs r3, r2, r3
|
|
800fc82: 84bb strh r3, [r7, #36] ; 0x24
|
|
|
|
/* Check if we are allowed to enqueue more datagrams. */
|
|
clen = pbuf_clen(p);
|
|
800fc84: 6878 ldr r0, [r7, #4]
|
|
800fc86: f7f5 ff47 bl 8005b18 <pbuf_clen>
|
|
800fc8a: 4603 mov r3, r0
|
|
800fc8c: 843b strh r3, [r7, #32]
|
|
if ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) {
|
|
800fc8e: 4b8c ldr r3, [pc, #560] ; (800fec0 <ip4_reass+0x2b0>)
|
|
800fc90: 881b ldrh r3, [r3, #0]
|
|
800fc92: 461a mov r2, r3
|
|
800fc94: 8c3b ldrh r3, [r7, #32]
|
|
800fc96: 4413 add r3, r2
|
|
800fc98: 2b0a cmp r3, #10
|
|
800fc9a: dd10 ble.n 800fcbe <ip4_reass+0xae>
|
|
#if IP_REASS_FREE_OLDEST
|
|
if (!ip_reass_remove_oldest_datagram(fraghdr, clen) ||
|
|
800fc9c: 8c3b ldrh r3, [r7, #32]
|
|
800fc9e: 4619 mov r1, r3
|
|
800fca0: 6ab8 ldr r0, [r7, #40] ; 0x28
|
|
800fca2: f7ff fd81 bl 800f7a8 <ip_reass_remove_oldest_datagram>
|
|
800fca6: 4603 mov r3, r0
|
|
800fca8: 2b00 cmp r3, #0
|
|
800fcaa: f000 8137 beq.w 800ff1c <ip4_reass+0x30c>
|
|
((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS))
|
|
800fcae: 4b84 ldr r3, [pc, #528] ; (800fec0 <ip4_reass+0x2b0>)
|
|
800fcb0: 881b ldrh r3, [r3, #0]
|
|
800fcb2: 461a mov r2, r3
|
|
800fcb4: 8c3b ldrh r3, [r7, #32]
|
|
800fcb6: 4413 add r3, r2
|
|
if (!ip_reass_remove_oldest_datagram(fraghdr, clen) ||
|
|
800fcb8: 2b0a cmp r3, #10
|
|
800fcba: f300 812f bgt.w 800ff1c <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) {
|
|
800fcbe: 4b81 ldr r3, [pc, #516] ; (800fec4 <ip4_reass+0x2b4>)
|
|
800fcc0: 681b ldr r3, [r3, #0]
|
|
800fcc2: 633b str r3, [r7, #48] ; 0x30
|
|
800fcc4: e015 b.n 800fcf2 <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)) {
|
|
800fcc6: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fcc8: 695a ldr r2, [r3, #20]
|
|
800fcca: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fccc: 68db ldr r3, [r3, #12]
|
|
800fcce: 429a cmp r2, r3
|
|
800fcd0: d10c bne.n 800fcec <ip4_reass+0xdc>
|
|
800fcd2: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fcd4: 699a ldr r2, [r3, #24]
|
|
800fcd6: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fcd8: 691b ldr r3, [r3, #16]
|
|
800fcda: 429a cmp r2, r3
|
|
800fcdc: d106 bne.n 800fcec <ip4_reass+0xdc>
|
|
800fcde: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fce0: 899a ldrh r2, [r3, #12]
|
|
800fce2: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fce4: 889b ldrh r3, [r3, #4]
|
|
800fce6: b29b uxth r3, r3
|
|
800fce8: 429a cmp r2, r3
|
|
800fcea: d006 beq.n 800fcfa <ip4_reass+0xea>
|
|
for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) {
|
|
800fcec: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fcee: 681b ldr r3, [r3, #0]
|
|
800fcf0: 633b str r3, [r7, #48] ; 0x30
|
|
800fcf2: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fcf4: 2b00 cmp r3, #0
|
|
800fcf6: d1e6 bne.n 800fcc6 <ip4_reass+0xb6>
|
|
800fcf8: e000 b.n 800fcfc <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;
|
|
800fcfa: bf00 nop
|
|
}
|
|
}
|
|
|
|
if (ipr == NULL) {
|
|
800fcfc: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fcfe: 2b00 cmp r3, #0
|
|
800fd00: d109 bne.n 800fd16 <ip4_reass+0x106>
|
|
/* Enqueue a new datagram into the datagram queue */
|
|
ipr = ip_reass_enqueue_new_datagram(fraghdr, clen);
|
|
800fd02: 8c3b ldrh r3, [r7, #32]
|
|
800fd04: 4619 mov r1, r3
|
|
800fd06: 6ab8 ldr r0, [r7, #40] ; 0x28
|
|
800fd08: f7ff fdb0 bl 800f86c <ip_reass_enqueue_new_datagram>
|
|
800fd0c: 6338 str r0, [r7, #48] ; 0x30
|
|
/* Bail if unable to enqueue */
|
|
if (ipr == NULL) {
|
|
800fd0e: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fd10: 2b00 cmp r3, #0
|
|
800fd12: d11c bne.n 800fd4e <ip4_reass+0x13e>
|
|
goto nullreturn;
|
|
800fd14: e105 b.n 800ff22 <ip4_reass+0x312>
|
|
}
|
|
} else {
|
|
if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) &&
|
|
800fd16: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fd18: 88db ldrh r3, [r3, #6]
|
|
800fd1a: b29b uxth r3, r3
|
|
800fd1c: 4618 mov r0, r3
|
|
800fd1e: f7f4 fb09 bl 8004334 <lwip_htons>
|
|
800fd22: 4603 mov r3, r0
|
|
800fd24: f3c3 030c ubfx r3, r3, #0, #13
|
|
800fd28: 2b00 cmp r3, #0
|
|
800fd2a: d110 bne.n 800fd4e <ip4_reass+0x13e>
|
|
((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) {
|
|
800fd2c: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fd2e: 89db ldrh r3, [r3, #14]
|
|
800fd30: 4618 mov r0, r3
|
|
800fd32: f7f4 faff bl 8004334 <lwip_htons>
|
|
800fd36: 4603 mov r3, r0
|
|
800fd38: f3c3 030c ubfx r3, r3, #0, #13
|
|
if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) &&
|
|
800fd3c: 2b00 cmp r3, #0
|
|
800fd3e: d006 beq.n 800fd4e <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);
|
|
800fd40: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fd42: 3308 adds r3, #8
|
|
800fd44: 2214 movs r2, #20
|
|
800fd46: 6ab9 ldr r1, [r7, #40] ; 0x28
|
|
800fd48: 4618 mov r0, r3
|
|
800fd4a: f000 fba5 bl 8010498 <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;
|
|
800fd4e: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fd50: 88db ldrh r3, [r3, #6]
|
|
800fd52: b29b uxth r3, r3
|
|
800fd54: f003 0320 and.w r3, r3, #32
|
|
800fd58: 2b00 cmp r3, #0
|
|
800fd5a: bf0c ite eq
|
|
800fd5c: 2301 moveq r3, #1
|
|
800fd5e: 2300 movne r3, #0
|
|
800fd60: b2db uxtb r3, r3
|
|
800fd62: 61fb str r3, [r7, #28]
|
|
if (is_last) {
|
|
800fd64: 69fb ldr r3, [r7, #28]
|
|
800fd66: 2b00 cmp r3, #0
|
|
800fd68: d00e beq.n 800fd88 <ip4_reass+0x178>
|
|
u16_t datagram_len = (u16_t)(offset + len);
|
|
800fd6a: 8cfa ldrh r2, [r7, #38] ; 0x26
|
|
800fd6c: 8cbb ldrh r3, [r7, #36] ; 0x24
|
|
800fd6e: 4413 add r3, r2
|
|
800fd70: 837b strh r3, [r7, #26]
|
|
if ((datagram_len < offset) || (datagram_len > (0xFFFF - IP_HLEN))) {
|
|
800fd72: 8b7a ldrh r2, [r7, #26]
|
|
800fd74: 8cfb ldrh r3, [r7, #38] ; 0x26
|
|
800fd76: 429a cmp r2, r3
|
|
800fd78: f0c0 80a0 bcc.w 800febc <ip4_reass+0x2ac>
|
|
800fd7c: 8b7b ldrh r3, [r7, #26]
|
|
800fd7e: f64f 72eb movw r2, #65515 ; 0xffeb
|
|
800fd82: 4293 cmp r3, r2
|
|
800fd84: f200 809a bhi.w 800febc <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);
|
|
800fd88: 69fa ldr r2, [r7, #28]
|
|
800fd8a: 6879 ldr r1, [r7, #4]
|
|
800fd8c: 6b38 ldr r0, [r7, #48] ; 0x30
|
|
800fd8e: f7ff fdd5 bl 800f93c <ip_reass_chain_frag_into_datagram_and_validate>
|
|
800fd92: 6178 str r0, [r7, #20]
|
|
if (valid == IP_REASS_VALIDATE_PBUF_DROPPED) {
|
|
800fd94: 697b ldr r3, [r7, #20]
|
|
800fd96: f1b3 3fff cmp.w r3, #4294967295
|
|
800fd9a: f000 809b beq.w 800fed4 <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);
|
|
800fd9e: 4b48 ldr r3, [pc, #288] ; (800fec0 <ip4_reass+0x2b0>)
|
|
800fda0: 881a ldrh r2, [r3, #0]
|
|
800fda2: 8c3b ldrh r3, [r7, #32]
|
|
800fda4: 4413 add r3, r2
|
|
800fda6: b29a uxth r2, r3
|
|
800fda8: 4b45 ldr r3, [pc, #276] ; (800fec0 <ip4_reass+0x2b0>)
|
|
800fdaa: 801a strh r2, [r3, #0]
|
|
if (is_last) {
|
|
800fdac: 69fb ldr r3, [r7, #28]
|
|
800fdae: 2b00 cmp r3, #0
|
|
800fdb0: d00d beq.n 800fdce <ip4_reass+0x1be>
|
|
u16_t datagram_len = (u16_t)(offset + len);
|
|
800fdb2: 8cfa ldrh r2, [r7, #38] ; 0x26
|
|
800fdb4: 8cbb ldrh r3, [r7, #36] ; 0x24
|
|
800fdb6: 4413 add r3, r2
|
|
800fdb8: 827b strh r3, [r7, #18]
|
|
ipr->datagram_len = datagram_len;
|
|
800fdba: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fdbc: 8a7a ldrh r2, [r7, #18]
|
|
800fdbe: 839a strh r2, [r3, #28]
|
|
ipr->flags |= IP_REASS_FLAG_LASTFRAG;
|
|
800fdc0: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fdc2: 7f9b ldrb r3, [r3, #30]
|
|
800fdc4: f043 0301 orr.w r3, r3, #1
|
|
800fdc8: b2da uxtb r2, r3
|
|
800fdca: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fdcc: 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) {
|
|
800fdce: 697b ldr r3, [r7, #20]
|
|
800fdd0: 2b01 cmp r3, #1
|
|
800fdd2: d171 bne.n 800feb8 <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);
|
|
800fdd4: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fdd6: 8b9b ldrh r3, [r3, #28]
|
|
800fdd8: 3314 adds r3, #20
|
|
800fdda: 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;
|
|
800fddc: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fdde: 685b ldr r3, [r3, #4]
|
|
800fde0: 685b ldr r3, [r3, #4]
|
|
800fde2: 681b ldr r3, [r3, #0]
|
|
800fde4: 637b str r3, [r7, #52] ; 0x34
|
|
|
|
/* copy the original ip header back to the first pbuf */
|
|
fraghdr = (struct ip_hdr *)(ipr->p->payload);
|
|
800fde6: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fde8: 685b ldr r3, [r3, #4]
|
|
800fdea: 685b ldr r3, [r3, #4]
|
|
800fdec: 62bb str r3, [r7, #40] ; 0x28
|
|
SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN);
|
|
800fdee: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fdf0: 3308 adds r3, #8
|
|
800fdf2: 2214 movs r2, #20
|
|
800fdf4: 4619 mov r1, r3
|
|
800fdf6: 6ab8 ldr r0, [r7, #40] ; 0x28
|
|
800fdf8: f000 fb4e bl 8010498 <memcpy>
|
|
IPH_LEN_SET(fraghdr, lwip_htons(datagram_len));
|
|
800fdfc: 8a3b ldrh r3, [r7, #16]
|
|
800fdfe: 4618 mov r0, r3
|
|
800fe00: f7f4 fa98 bl 8004334 <lwip_htons>
|
|
800fe04: 4603 mov r3, r0
|
|
800fe06: 461a mov r2, r3
|
|
800fe08: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fe0a: 805a strh r2, [r3, #2]
|
|
IPH_OFFSET_SET(fraghdr, 0);
|
|
800fe0c: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fe0e: 2200 movs r2, #0
|
|
800fe10: 719a strb r2, [r3, #6]
|
|
800fe12: 2200 movs r2, #0
|
|
800fe14: 71da strb r2, [r3, #7]
|
|
IPH_CHKSUM_SET(fraghdr, 0);
|
|
800fe16: 6abb ldr r3, [r7, #40] ; 0x28
|
|
800fe18: 2200 movs r2, #0
|
|
800fe1a: 729a strb r2, [r3, #10]
|
|
800fe1c: 2200 movs r2, #0
|
|
800fe1e: 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;
|
|
800fe20: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fe22: 685b ldr r3, [r3, #4]
|
|
800fe24: 607b str r3, [r7, #4]
|
|
|
|
/* chain together the pbufs contained within the reass_data list. */
|
|
while (r != NULL) {
|
|
800fe26: e00d b.n 800fe44 <ip4_reass+0x234>
|
|
iprh = (struct ip_reass_helper *)r->payload;
|
|
800fe28: 6b7b ldr r3, [r7, #52] ; 0x34
|
|
800fe2a: 685b ldr r3, [r3, #4]
|
|
800fe2c: 60fb str r3, [r7, #12]
|
|
|
|
/* hide the ip header for every succeeding fragment */
|
|
pbuf_remove_header(r, IP_HLEN);
|
|
800fe2e: 2114 movs r1, #20
|
|
800fe30: 6b78 ldr r0, [r7, #52] ; 0x34
|
|
800fe32: f7f5 fd63 bl 80058fc <pbuf_remove_header>
|
|
pbuf_cat(p, r);
|
|
800fe36: 6b79 ldr r1, [r7, #52] ; 0x34
|
|
800fe38: 6878 ldr r0, [r7, #4]
|
|
800fe3a: f7f5 fea7 bl 8005b8c <pbuf_cat>
|
|
r = iprh->next_pbuf;
|
|
800fe3e: 68fb ldr r3, [r7, #12]
|
|
800fe40: 681b ldr r3, [r3, #0]
|
|
800fe42: 637b str r3, [r7, #52] ; 0x34
|
|
while (r != NULL) {
|
|
800fe44: 6b7b ldr r3, [r7, #52] ; 0x34
|
|
800fe46: 2b00 cmp r3, #0
|
|
800fe48: d1ee bne.n 800fe28 <ip4_reass+0x218>
|
|
}
|
|
|
|
/* find the previous entry in the linked list */
|
|
if (ipr == reassdatagrams) {
|
|
800fe4a: 4b1e ldr r3, [pc, #120] ; (800fec4 <ip4_reass+0x2b4>)
|
|
800fe4c: 681b ldr r3, [r3, #0]
|
|
800fe4e: 6b3a ldr r2, [r7, #48] ; 0x30
|
|
800fe50: 429a cmp r2, r3
|
|
800fe52: d102 bne.n 800fe5a <ip4_reass+0x24a>
|
|
ipr_prev = NULL;
|
|
800fe54: 2300 movs r3, #0
|
|
800fe56: 62fb str r3, [r7, #44] ; 0x2c
|
|
800fe58: e010 b.n 800fe7c <ip4_reass+0x26c>
|
|
} else {
|
|
for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) {
|
|
800fe5a: 4b1a ldr r3, [pc, #104] ; (800fec4 <ip4_reass+0x2b4>)
|
|
800fe5c: 681b ldr r3, [r3, #0]
|
|
800fe5e: 62fb str r3, [r7, #44] ; 0x2c
|
|
800fe60: e007 b.n 800fe72 <ip4_reass+0x262>
|
|
if (ipr_prev->next == ipr) {
|
|
800fe62: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fe64: 681b ldr r3, [r3, #0]
|
|
800fe66: 6b3a ldr r2, [r7, #48] ; 0x30
|
|
800fe68: 429a cmp r2, r3
|
|
800fe6a: d006 beq.n 800fe7a <ip4_reass+0x26a>
|
|
for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) {
|
|
800fe6c: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fe6e: 681b ldr r3, [r3, #0]
|
|
800fe70: 62fb str r3, [r7, #44] ; 0x2c
|
|
800fe72: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
800fe74: 2b00 cmp r3, #0
|
|
800fe76: d1f4 bne.n 800fe62 <ip4_reass+0x252>
|
|
800fe78: e000 b.n 800fe7c <ip4_reass+0x26c>
|
|
break;
|
|
800fe7a: bf00 nop
|
|
}
|
|
}
|
|
}
|
|
|
|
/* release the sources allocate for the fragment queue entry */
|
|
ip_reass_dequeue_datagram(ipr, ipr_prev);
|
|
800fe7c: 6af9 ldr r1, [r7, #44] ; 0x2c
|
|
800fe7e: 6b38 ldr r0, [r7, #48] ; 0x30
|
|
800fe80: f7ff fd2e bl 800f8e0 <ip_reass_dequeue_datagram>
|
|
|
|
/* and adjust the number of pbufs currently queued for reassembly. */
|
|
clen = pbuf_clen(p);
|
|
800fe84: 6878 ldr r0, [r7, #4]
|
|
800fe86: f7f5 fe47 bl 8005b18 <pbuf_clen>
|
|
800fe8a: 4603 mov r3, r0
|
|
800fe8c: 843b strh r3, [r7, #32]
|
|
LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen);
|
|
800fe8e: 4b0c ldr r3, [pc, #48] ; (800fec0 <ip4_reass+0x2b0>)
|
|
800fe90: 881b ldrh r3, [r3, #0]
|
|
800fe92: 8c3a ldrh r2, [r7, #32]
|
|
800fe94: 429a cmp r2, r3
|
|
800fe96: d906 bls.n 800fea6 <ip4_reass+0x296>
|
|
800fe98: 4b0b ldr r3, [pc, #44] ; (800fec8 <ip4_reass+0x2b8>)
|
|
800fe9a: f240 229b movw r2, #667 ; 0x29b
|
|
800fe9e: 490b ldr r1, [pc, #44] ; (800fecc <ip4_reass+0x2bc>)
|
|
800fea0: 480b ldr r0, [pc, #44] ; (800fed0 <ip4_reass+0x2c0>)
|
|
800fea2: f000 fb29 bl 80104f8 <printf>
|
|
ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - clen);
|
|
800fea6: 4b06 ldr r3, [pc, #24] ; (800fec0 <ip4_reass+0x2b0>)
|
|
800fea8: 881a ldrh r2, [r3, #0]
|
|
800feaa: 8c3b ldrh r3, [r7, #32]
|
|
800feac: 1ad3 subs r3, r2, r3
|
|
800feae: b29a uxth r2, r3
|
|
800feb0: 4b03 ldr r3, [pc, #12] ; (800fec0 <ip4_reass+0x2b0>)
|
|
800feb2: 801a strh r2, [r3, #0]
|
|
|
|
MIB2_STATS_INC(mib2.ipreasmoks);
|
|
|
|
/* Return the pbuf chain */
|
|
return p;
|
|
800feb4: 687b ldr r3, [r7, #4]
|
|
800feb6: e038 b.n 800ff2a <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;
|
|
800feb8: 2300 movs r3, #0
|
|
800feba: e036 b.n 800ff2a <ip4_reass+0x31a>
|
|
goto nullreturn_ipr;
|
|
800febc: bf00 nop
|
|
800febe: e00a b.n 800fed6 <ip4_reass+0x2c6>
|
|
800fec0: 20008d8c .word 0x20008d8c
|
|
800fec4: 20008d88 .word 0x20008d88
|
|
800fec8: 08017b84 .word 0x08017b84
|
|
800fecc: 08017cf4 .word 0x08017cf4
|
|
800fed0: 08017bcc .word 0x08017bcc
|
|
goto nullreturn_ipr;
|
|
800fed4: bf00 nop
|
|
|
|
nullreturn_ipr:
|
|
LWIP_ASSERT("ipr != NULL", ipr != NULL);
|
|
800fed6: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800fed8: 2b00 cmp r3, #0
|
|
800feda: d106 bne.n 800feea <ip4_reass+0x2da>
|
|
800fedc: 4b15 ldr r3, [pc, #84] ; (800ff34 <ip4_reass+0x324>)
|
|
800fede: f44f 722a mov.w r2, #680 ; 0x2a8
|
|
800fee2: 4915 ldr r1, [pc, #84] ; (800ff38 <ip4_reass+0x328>)
|
|
800fee4: 4815 ldr r0, [pc, #84] ; (800ff3c <ip4_reass+0x32c>)
|
|
800fee6: f000 fb07 bl 80104f8 <printf>
|
|
if (ipr->p == NULL) {
|
|
800feea: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
800feec: 685b ldr r3, [r3, #4]
|
|
800feee: 2b00 cmp r3, #0
|
|
800fef0: d116 bne.n 800ff20 <ip4_reass+0x310>
|
|
/* dropped pbuf after creating a new datagram entry: remove the entry, too */
|
|
LWIP_ASSERT("not firstalthough just enqueued", ipr == reassdatagrams);
|
|
800fef2: 4b13 ldr r3, [pc, #76] ; (800ff40 <ip4_reass+0x330>)
|
|
800fef4: 681b ldr r3, [r3, #0]
|
|
800fef6: 6b3a ldr r2, [r7, #48] ; 0x30
|
|
800fef8: 429a cmp r2, r3
|
|
800fefa: d006 beq.n 800ff0a <ip4_reass+0x2fa>
|
|
800fefc: 4b0d ldr r3, [pc, #52] ; (800ff34 <ip4_reass+0x324>)
|
|
800fefe: f240 22ab movw r2, #683 ; 0x2ab
|
|
800ff02: 4910 ldr r1, [pc, #64] ; (800ff44 <ip4_reass+0x334>)
|
|
800ff04: 480d ldr r0, [pc, #52] ; (800ff3c <ip4_reass+0x32c>)
|
|
800ff06: f000 faf7 bl 80104f8 <printf>
|
|
ip_reass_dequeue_datagram(ipr, NULL);
|
|
800ff0a: 2100 movs r1, #0
|
|
800ff0c: 6b38 ldr r0, [r7, #48] ; 0x30
|
|
800ff0e: f7ff fce7 bl 800f8e0 <ip_reass_dequeue_datagram>
|
|
800ff12: e006 b.n 800ff22 <ip4_reass+0x312>
|
|
goto nullreturn;
|
|
800ff14: bf00 nop
|
|
800ff16: e004 b.n 800ff22 <ip4_reass+0x312>
|
|
goto nullreturn;
|
|
800ff18: bf00 nop
|
|
800ff1a: e002 b.n 800ff22 <ip4_reass+0x312>
|
|
goto nullreturn;
|
|
800ff1c: bf00 nop
|
|
800ff1e: e000 b.n 800ff22 <ip4_reass+0x312>
|
|
}
|
|
|
|
nullreturn:
|
|
800ff20: bf00 nop
|
|
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: nullreturn\n"));
|
|
IPFRAG_STATS_INC(ip_frag.drop);
|
|
pbuf_free(p);
|
|
800ff22: 6878 ldr r0, [r7, #4]
|
|
800ff24: f7f5 fd70 bl 8005a08 <pbuf_free>
|
|
return NULL;
|
|
800ff28: 2300 movs r3, #0
|
|
}
|
|
800ff2a: 4618 mov r0, r3
|
|
800ff2c: 3738 adds r7, #56 ; 0x38
|
|
800ff2e: 46bd mov sp, r7
|
|
800ff30: bd80 pop {r7, pc}
|
|
800ff32: bf00 nop
|
|
800ff34: 08017b84 .word 0x08017b84
|
|
800ff38: 08017d10 .word 0x08017d10
|
|
800ff3c: 08017bcc .word 0x08017bcc
|
|
800ff40: 20008d88 .word 0x20008d88
|
|
800ff44: 08017d1c .word 0x08017d1c
|
|
|
|
0800ff48 <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)
|
|
{
|
|
800ff48: b580 push {r7, lr}
|
|
800ff4a: af00 add r7, sp, #0
|
|
return (struct pbuf_custom_ref *)memp_malloc(MEMP_FRAG_PBUF);
|
|
800ff4c: 2005 movs r0, #5
|
|
800ff4e: f7f4 fe69 bl 8004c24 <memp_malloc>
|
|
800ff52: 4603 mov r3, r0
|
|
}
|
|
800ff54: 4618 mov r0, r3
|
|
800ff56: bd80 pop {r7, pc}
|
|
|
|
0800ff58 <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)
|
|
{
|
|
800ff58: b580 push {r7, lr}
|
|
800ff5a: b082 sub sp, #8
|
|
800ff5c: af00 add r7, sp, #0
|
|
800ff5e: 6078 str r0, [r7, #4]
|
|
LWIP_ASSERT("p != NULL", p != NULL);
|
|
800ff60: 687b ldr r3, [r7, #4]
|
|
800ff62: 2b00 cmp r3, #0
|
|
800ff64: d106 bne.n 800ff74 <ip_frag_free_pbuf_custom_ref+0x1c>
|
|
800ff66: 4b07 ldr r3, [pc, #28] ; (800ff84 <ip_frag_free_pbuf_custom_ref+0x2c>)
|
|
800ff68: f44f 7231 mov.w r2, #708 ; 0x2c4
|
|
800ff6c: 4906 ldr r1, [pc, #24] ; (800ff88 <ip_frag_free_pbuf_custom_ref+0x30>)
|
|
800ff6e: 4807 ldr r0, [pc, #28] ; (800ff8c <ip_frag_free_pbuf_custom_ref+0x34>)
|
|
800ff70: f000 fac2 bl 80104f8 <printf>
|
|
memp_free(MEMP_FRAG_PBUF, p);
|
|
800ff74: 6879 ldr r1, [r7, #4]
|
|
800ff76: 2005 movs r0, #5
|
|
800ff78: f7f4 fec4 bl 8004d04 <memp_free>
|
|
}
|
|
800ff7c: bf00 nop
|
|
800ff7e: 3708 adds r7, #8
|
|
800ff80: 46bd mov sp, r7
|
|
800ff82: bd80 pop {r7, pc}
|
|
800ff84: 08017b84 .word 0x08017b84
|
|
800ff88: 08017d3c .word 0x08017d3c
|
|
800ff8c: 08017bcc .word 0x08017bcc
|
|
|
|
0800ff90 <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)
|
|
{
|
|
800ff90: b580 push {r7, lr}
|
|
800ff92: b084 sub sp, #16
|
|
800ff94: af00 add r7, sp, #0
|
|
800ff96: 6078 str r0, [r7, #4]
|
|
struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref *)p;
|
|
800ff98: 687b ldr r3, [r7, #4]
|
|
800ff9a: 60fb str r3, [r7, #12]
|
|
LWIP_ASSERT("pcr != NULL", pcr != NULL);
|
|
800ff9c: 68fb ldr r3, [r7, #12]
|
|
800ff9e: 2b00 cmp r3, #0
|
|
800ffa0: d106 bne.n 800ffb0 <ipfrag_free_pbuf_custom+0x20>
|
|
800ffa2: 4b11 ldr r3, [pc, #68] ; (800ffe8 <ipfrag_free_pbuf_custom+0x58>)
|
|
800ffa4: f240 22ce movw r2, #718 ; 0x2ce
|
|
800ffa8: 4910 ldr r1, [pc, #64] ; (800ffec <ipfrag_free_pbuf_custom+0x5c>)
|
|
800ffaa: 4811 ldr r0, [pc, #68] ; (800fff0 <ipfrag_free_pbuf_custom+0x60>)
|
|
800ffac: f000 faa4 bl 80104f8 <printf>
|
|
LWIP_ASSERT("pcr == p", (void *)pcr == (void *)p);
|
|
800ffb0: 68fa ldr r2, [r7, #12]
|
|
800ffb2: 687b ldr r3, [r7, #4]
|
|
800ffb4: 429a cmp r2, r3
|
|
800ffb6: d006 beq.n 800ffc6 <ipfrag_free_pbuf_custom+0x36>
|
|
800ffb8: 4b0b ldr r3, [pc, #44] ; (800ffe8 <ipfrag_free_pbuf_custom+0x58>)
|
|
800ffba: f240 22cf movw r2, #719 ; 0x2cf
|
|
800ffbe: 490d ldr r1, [pc, #52] ; (800fff4 <ipfrag_free_pbuf_custom+0x64>)
|
|
800ffc0: 480b ldr r0, [pc, #44] ; (800fff0 <ipfrag_free_pbuf_custom+0x60>)
|
|
800ffc2: f000 fa99 bl 80104f8 <printf>
|
|
if (pcr->original != NULL) {
|
|
800ffc6: 68fb ldr r3, [r7, #12]
|
|
800ffc8: 695b ldr r3, [r3, #20]
|
|
800ffca: 2b00 cmp r3, #0
|
|
800ffcc: d004 beq.n 800ffd8 <ipfrag_free_pbuf_custom+0x48>
|
|
pbuf_free(pcr->original);
|
|
800ffce: 68fb ldr r3, [r7, #12]
|
|
800ffd0: 695b ldr r3, [r3, #20]
|
|
800ffd2: 4618 mov r0, r3
|
|
800ffd4: f7f5 fd18 bl 8005a08 <pbuf_free>
|
|
}
|
|
ip_frag_free_pbuf_custom_ref(pcr);
|
|
800ffd8: 68f8 ldr r0, [r7, #12]
|
|
800ffda: f7ff ffbd bl 800ff58 <ip_frag_free_pbuf_custom_ref>
|
|
}
|
|
800ffde: bf00 nop
|
|
800ffe0: 3710 adds r7, #16
|
|
800ffe2: 46bd mov sp, r7
|
|
800ffe4: bd80 pop {r7, pc}
|
|
800ffe6: bf00 nop
|
|
800ffe8: 08017b84 .word 0x08017b84
|
|
800ffec: 08017d48 .word 0x08017d48
|
|
800fff0: 08017bcc .word 0x08017bcc
|
|
800fff4: 08017d54 .word 0x08017d54
|
|
|
|
0800fff8 <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)
|
|
{
|
|
800fff8: b580 push {r7, lr}
|
|
800fffa: b094 sub sp, #80 ; 0x50
|
|
800fffc: af02 add r7, sp, #8
|
|
800fffe: 60f8 str r0, [r7, #12]
|
|
8010000: 60b9 str r1, [r7, #8]
|
|
8010002: 607a str r2, [r7, #4]
|
|
struct pbuf *rambuf;
|
|
#if !LWIP_NETIF_TX_SINGLE_PBUF
|
|
struct pbuf *newpbuf;
|
|
u16_t newpbuflen = 0;
|
|
8010004: 2300 movs r3, #0
|
|
8010006: 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);
|
|
801000a: 68bb ldr r3, [r7, #8]
|
|
801000c: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
801000e: 3b14 subs r3, #20
|
|
8010010: 2b00 cmp r3, #0
|
|
8010012: da00 bge.n 8010016 <ip4_frag+0x1e>
|
|
8010014: 3307 adds r3, #7
|
|
8010016: 10db asrs r3, r3, #3
|
|
8010018: 877b strh r3, [r7, #58] ; 0x3a
|
|
u16_t left, fragsize;
|
|
u16_t ofo;
|
|
int last;
|
|
u16_t poff = IP_HLEN;
|
|
801001a: 2314 movs r3, #20
|
|
801001c: 87fb strh r3, [r7, #62] ; 0x3e
|
|
u16_t tmp;
|
|
int mf_set;
|
|
|
|
original_iphdr = (struct ip_hdr *)p->payload;
|
|
801001e: 68fb ldr r3, [r7, #12]
|
|
8010020: 685b ldr r3, [r3, #4]
|
|
8010022: 637b str r3, [r7, #52] ; 0x34
|
|
iphdr = original_iphdr;
|
|
8010024: 6b7b ldr r3, [r7, #52] ; 0x34
|
|
8010026: 633b str r3, [r7, #48] ; 0x30
|
|
if (IPH_HL_BYTES(iphdr) != IP_HLEN) {
|
|
8010028: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
801002a: 781b ldrb r3, [r3, #0]
|
|
801002c: f003 030f and.w r3, r3, #15
|
|
8010030: b2db uxtb r3, r3
|
|
8010032: 009b lsls r3, r3, #2
|
|
8010034: b2db uxtb r3, r3
|
|
8010036: 2b14 cmp r3, #20
|
|
8010038: d002 beq.n 8010040 <ip4_frag+0x48>
|
|
/* ip4_frag() does not support IP options */
|
|
return ERR_VAL;
|
|
801003a: f06f 0305 mvn.w r3, #5
|
|
801003e: e110 b.n 8010262 <ip4_frag+0x26a>
|
|
}
|
|
LWIP_ERROR("ip4_frag(): pbuf too short", p->len >= IP_HLEN, return ERR_VAL);
|
|
8010040: 68fb ldr r3, [r7, #12]
|
|
8010042: 895b ldrh r3, [r3, #10]
|
|
8010044: 2b13 cmp r3, #19
|
|
8010046: d809 bhi.n 801005c <ip4_frag+0x64>
|
|
8010048: 4b88 ldr r3, [pc, #544] ; (801026c <ip4_frag+0x274>)
|
|
801004a: f44f 723f mov.w r2, #764 ; 0x2fc
|
|
801004e: 4988 ldr r1, [pc, #544] ; (8010270 <ip4_frag+0x278>)
|
|
8010050: 4888 ldr r0, [pc, #544] ; (8010274 <ip4_frag+0x27c>)
|
|
8010052: f000 fa51 bl 80104f8 <printf>
|
|
8010056: f06f 0305 mvn.w r3, #5
|
|
801005a: e102 b.n 8010262 <ip4_frag+0x26a>
|
|
|
|
/* Save original offset */
|
|
tmp = lwip_ntohs(IPH_OFFSET(iphdr));
|
|
801005c: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
801005e: 88db ldrh r3, [r3, #6]
|
|
8010060: b29b uxth r3, r3
|
|
8010062: 4618 mov r0, r3
|
|
8010064: f7f4 f966 bl 8004334 <lwip_htons>
|
|
8010068: 4603 mov r3, r0
|
|
801006a: 87bb strh r3, [r7, #60] ; 0x3c
|
|
ofo = tmp & IP_OFFMASK;
|
|
801006c: 8fbb ldrh r3, [r7, #60] ; 0x3c
|
|
801006e: f3c3 030c ubfx r3, r3, #0, #13
|
|
8010072: 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;
|
|
8010076: 8fbb ldrh r3, [r7, #60] ; 0x3c
|
|
8010078: f403 5300 and.w r3, r3, #8192 ; 0x2000
|
|
801007c: 62fb str r3, [r7, #44] ; 0x2c
|
|
|
|
left = (u16_t)(p->tot_len - IP_HLEN);
|
|
801007e: 68fb ldr r3, [r7, #12]
|
|
8010080: 891b ldrh r3, [r3, #8]
|
|
8010082: 3b14 subs r3, #20
|
|
8010084: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
|
|
|
|
while (left) {
|
|
8010088: e0e1 b.n 801024e <ip4_frag+0x256>
|
|
/* Fill this fragment */
|
|
fragsize = LWIP_MIN(left, (u16_t)(nfb * 8));
|
|
801008a: 8f7b ldrh r3, [r7, #58] ; 0x3a
|
|
801008c: 00db lsls r3, r3, #3
|
|
801008e: b29b uxth r3, r3
|
|
8010090: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
|
|
8010094: 4293 cmp r3, r2
|
|
8010096: bf28 it cs
|
|
8010098: 4613 movcs r3, r2
|
|
801009a: 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);
|
|
801009c: f44f 7220 mov.w r2, #640 ; 0x280
|
|
80100a0: 2114 movs r1, #20
|
|
80100a2: 200e movs r0, #14
|
|
80100a4: f7f5 f9cc bl 8005440 <pbuf_alloc>
|
|
80100a8: 6278 str r0, [r7, #36] ; 0x24
|
|
if (rambuf == NULL) {
|
|
80100aa: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
80100ac: 2b00 cmp r3, #0
|
|
80100ae: f000 80d5 beq.w 801025c <ip4_frag+0x264>
|
|
goto memerr;
|
|
}
|
|
LWIP_ASSERT("this needs a pbuf in one piece!",
|
|
80100b2: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
80100b4: 895b ldrh r3, [r3, #10]
|
|
80100b6: 2b13 cmp r3, #19
|
|
80100b8: d806 bhi.n 80100c8 <ip4_frag+0xd0>
|
|
80100ba: 4b6c ldr r3, [pc, #432] ; (801026c <ip4_frag+0x274>)
|
|
80100bc: f44f 7249 mov.w r2, #804 ; 0x324
|
|
80100c0: 496d ldr r1, [pc, #436] ; (8010278 <ip4_frag+0x280>)
|
|
80100c2: 486c ldr r0, [pc, #432] ; (8010274 <ip4_frag+0x27c>)
|
|
80100c4: f000 fa18 bl 80104f8 <printf>
|
|
(rambuf->len >= (IP_HLEN)));
|
|
SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN);
|
|
80100c8: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
80100ca: 685b ldr r3, [r3, #4]
|
|
80100cc: 2214 movs r2, #20
|
|
80100ce: 6b79 ldr r1, [r7, #52] ; 0x34
|
|
80100d0: 4618 mov r0, r3
|
|
80100d2: f000 f9e1 bl 8010498 <memcpy>
|
|
iphdr = (struct ip_hdr *)rambuf->payload;
|
|
80100d6: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
80100d8: 685b ldr r3, [r3, #4]
|
|
80100da: 633b str r3, [r7, #48] ; 0x30
|
|
|
|
left_to_copy = fragsize;
|
|
80100dc: 8d7b ldrh r3, [r7, #42] ; 0x2a
|
|
80100de: f8a7 3044 strh.w r3, [r7, #68] ; 0x44
|
|
while (left_to_copy) {
|
|
80100e2: e064 b.n 80101ae <ip4_frag+0x1b6>
|
|
struct pbuf_custom_ref *pcr;
|
|
u16_t plen = (u16_t)(p->len - poff);
|
|
80100e4: 68fb ldr r3, [r7, #12]
|
|
80100e6: 895a ldrh r2, [r3, #10]
|
|
80100e8: 8ffb ldrh r3, [r7, #62] ; 0x3e
|
|
80100ea: 1ad3 subs r3, r2, r3
|
|
80100ec: 83fb strh r3, [r7, #30]
|
|
LWIP_ASSERT("p->len >= poff", p->len >= poff);
|
|
80100ee: 68fb ldr r3, [r7, #12]
|
|
80100f0: 895b ldrh r3, [r3, #10]
|
|
80100f2: 8ffa ldrh r2, [r7, #62] ; 0x3e
|
|
80100f4: 429a cmp r2, r3
|
|
80100f6: d906 bls.n 8010106 <ip4_frag+0x10e>
|
|
80100f8: 4b5c ldr r3, [pc, #368] ; (801026c <ip4_frag+0x274>)
|
|
80100fa: f240 322d movw r2, #813 ; 0x32d
|
|
80100fe: 495f ldr r1, [pc, #380] ; (801027c <ip4_frag+0x284>)
|
|
8010100: 485c ldr r0, [pc, #368] ; (8010274 <ip4_frag+0x27c>)
|
|
8010102: f000 f9f9 bl 80104f8 <printf>
|
|
newpbuflen = LWIP_MIN(left_to_copy, plen);
|
|
8010106: 8bfa ldrh r2, [r7, #30]
|
|
8010108: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
|
|
801010c: 4293 cmp r3, r2
|
|
801010e: bf28 it cs
|
|
8010110: 4613 movcs r3, r2
|
|
8010112: f8a7 3046 strh.w r3, [r7, #70] ; 0x46
|
|
/* Is this pbuf already empty? */
|
|
if (!newpbuflen) {
|
|
8010116: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46
|
|
801011a: 2b00 cmp r3, #0
|
|
801011c: d105 bne.n 801012a <ip4_frag+0x132>
|
|
poff = 0;
|
|
801011e: 2300 movs r3, #0
|
|
8010120: 87fb strh r3, [r7, #62] ; 0x3e
|
|
p = p->next;
|
|
8010122: 68fb ldr r3, [r7, #12]
|
|
8010124: 681b ldr r3, [r3, #0]
|
|
8010126: 60fb str r3, [r7, #12]
|
|
continue;
|
|
8010128: e041 b.n 80101ae <ip4_frag+0x1b6>
|
|
}
|
|
pcr = ip_frag_alloc_pbuf_custom_ref();
|
|
801012a: f7ff ff0d bl 800ff48 <ip_frag_alloc_pbuf_custom_ref>
|
|
801012e: 61b8 str r0, [r7, #24]
|
|
if (pcr == NULL) {
|
|
8010130: 69bb ldr r3, [r7, #24]
|
|
8010132: 2b00 cmp r3, #0
|
|
8010134: d103 bne.n 801013e <ip4_frag+0x146>
|
|
pbuf_free(rambuf);
|
|
8010136: 6a78 ldr r0, [r7, #36] ; 0x24
|
|
8010138: f7f5 fc66 bl 8005a08 <pbuf_free>
|
|
goto memerr;
|
|
801013c: e08f b.n 801025e <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,
|
|
801013e: 69b8 ldr r0, [r7, #24]
|
|
(u8_t *)p->payload + poff, newpbuflen);
|
|
8010140: 68fb ldr r3, [r7, #12]
|
|
8010142: 685a ldr r2, [r3, #4]
|
|
newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc,
|
|
8010144: 8ffb ldrh r3, [r7, #62] ; 0x3e
|
|
8010146: 4413 add r3, r2
|
|
8010148: f8b7 1046 ldrh.w r1, [r7, #70] ; 0x46
|
|
801014c: f8b7 2046 ldrh.w r2, [r7, #70] ; 0x46
|
|
8010150: 9201 str r2, [sp, #4]
|
|
8010152: 9300 str r3, [sp, #0]
|
|
8010154: 4603 mov r3, r0
|
|
8010156: 2241 movs r2, #65 ; 0x41
|
|
8010158: 2000 movs r0, #0
|
|
801015a: f7f5 fa9b bl 8005694 <pbuf_alloced_custom>
|
|
801015e: 6178 str r0, [r7, #20]
|
|
if (newpbuf == NULL) {
|
|
8010160: 697b ldr r3, [r7, #20]
|
|
8010162: 2b00 cmp r3, #0
|
|
8010164: d106 bne.n 8010174 <ip4_frag+0x17c>
|
|
ip_frag_free_pbuf_custom_ref(pcr);
|
|
8010166: 69b8 ldr r0, [r7, #24]
|
|
8010168: f7ff fef6 bl 800ff58 <ip_frag_free_pbuf_custom_ref>
|
|
pbuf_free(rambuf);
|
|
801016c: 6a78 ldr r0, [r7, #36] ; 0x24
|
|
801016e: f7f5 fc4b bl 8005a08 <pbuf_free>
|
|
goto memerr;
|
|
8010172: e074 b.n 801025e <ip4_frag+0x266>
|
|
}
|
|
pbuf_ref(p);
|
|
8010174: 68f8 ldr r0, [r7, #12]
|
|
8010176: f7f5 fce7 bl 8005b48 <pbuf_ref>
|
|
pcr->original = p;
|
|
801017a: 69bb ldr r3, [r7, #24]
|
|
801017c: 68fa ldr r2, [r7, #12]
|
|
801017e: 615a str r2, [r3, #20]
|
|
pcr->pc.custom_free_function = ipfrag_free_pbuf_custom;
|
|
8010180: 69bb ldr r3, [r7, #24]
|
|
8010182: 4a3f ldr r2, [pc, #252] ; (8010280 <ip4_frag+0x288>)
|
|
8010184: 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);
|
|
8010186: 6979 ldr r1, [r7, #20]
|
|
8010188: 6a78 ldr r0, [r7, #36] ; 0x24
|
|
801018a: f7f5 fcff bl 8005b8c <pbuf_cat>
|
|
left_to_copy = (u16_t)(left_to_copy - newpbuflen);
|
|
801018e: f8b7 2044 ldrh.w r2, [r7, #68] ; 0x44
|
|
8010192: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46
|
|
8010196: 1ad3 subs r3, r2, r3
|
|
8010198: f8a7 3044 strh.w r3, [r7, #68] ; 0x44
|
|
if (left_to_copy) {
|
|
801019c: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
|
|
80101a0: 2b00 cmp r3, #0
|
|
80101a2: d004 beq.n 80101ae <ip4_frag+0x1b6>
|
|
poff = 0;
|
|
80101a4: 2300 movs r3, #0
|
|
80101a6: 87fb strh r3, [r7, #62] ; 0x3e
|
|
p = p->next;
|
|
80101a8: 68fb ldr r3, [r7, #12]
|
|
80101aa: 681b ldr r3, [r3, #0]
|
|
80101ac: 60fb str r3, [r7, #12]
|
|
while (left_to_copy) {
|
|
80101ae: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
|
|
80101b2: 2b00 cmp r3, #0
|
|
80101b4: d196 bne.n 80100e4 <ip4_frag+0xec>
|
|
}
|
|
}
|
|
poff = (u16_t)(poff + newpbuflen);
|
|
80101b6: 8ffa ldrh r2, [r7, #62] ; 0x3e
|
|
80101b8: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46
|
|
80101bc: 4413 add r3, r2
|
|
80101be: 87fb strh r3, [r7, #62] ; 0x3e
|
|
#endif /* LWIP_NETIF_TX_SINGLE_PBUF */
|
|
|
|
/* Correct header */
|
|
last = (left <= netif->mtu - IP_HLEN);
|
|
80101c0: 68bb ldr r3, [r7, #8]
|
|
80101c2: 8d1b ldrh r3, [r3, #40] ; 0x28
|
|
80101c4: f1a3 0213 sub.w r2, r3, #19
|
|
80101c8: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
|
|
80101cc: 429a cmp r2, r3
|
|
80101ce: bfcc ite gt
|
|
80101d0: 2301 movgt r3, #1
|
|
80101d2: 2300 movle r3, #0
|
|
80101d4: b2db uxtb r3, r3
|
|
80101d6: 623b str r3, [r7, #32]
|
|
|
|
/* Set new offset and MF flag */
|
|
tmp = (IP_OFFMASK & (ofo));
|
|
80101d8: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40
|
|
80101dc: f3c3 030c ubfx r3, r3, #0, #13
|
|
80101e0: 87bb strh r3, [r7, #60] ; 0x3c
|
|
if (!last || mf_set) {
|
|
80101e2: 6a3b ldr r3, [r7, #32]
|
|
80101e4: 2b00 cmp r3, #0
|
|
80101e6: d002 beq.n 80101ee <ip4_frag+0x1f6>
|
|
80101e8: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
80101ea: 2b00 cmp r3, #0
|
|
80101ec: d003 beq.n 80101f6 <ip4_frag+0x1fe>
|
|
/* the last fragment has MF set if the input frame had it */
|
|
tmp = tmp | IP_MF;
|
|
80101ee: 8fbb ldrh r3, [r7, #60] ; 0x3c
|
|
80101f0: f443 5300 orr.w r3, r3, #8192 ; 0x2000
|
|
80101f4: 87bb strh r3, [r7, #60] ; 0x3c
|
|
}
|
|
IPH_OFFSET_SET(iphdr, lwip_htons(tmp));
|
|
80101f6: 8fbb ldrh r3, [r7, #60] ; 0x3c
|
|
80101f8: 4618 mov r0, r3
|
|
80101fa: f7f4 f89b bl 8004334 <lwip_htons>
|
|
80101fe: 4603 mov r3, r0
|
|
8010200: 461a mov r2, r3
|
|
8010202: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
8010204: 80da strh r2, [r3, #6]
|
|
IPH_LEN_SET(iphdr, lwip_htons((u16_t)(fragsize + IP_HLEN)));
|
|
8010206: 8d7b ldrh r3, [r7, #42] ; 0x2a
|
|
8010208: 3314 adds r3, #20
|
|
801020a: b29b uxth r3, r3
|
|
801020c: 4618 mov r0, r3
|
|
801020e: f7f4 f891 bl 8004334 <lwip_htons>
|
|
8010212: 4603 mov r3, r0
|
|
8010214: 461a mov r2, r3
|
|
8010216: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
8010218: 805a strh r2, [r3, #2]
|
|
IPH_CHKSUM_SET(iphdr, 0);
|
|
801021a: 6b3b ldr r3, [r7, #48] ; 0x30
|
|
801021c: 2200 movs r2, #0
|
|
801021e: 729a strb r2, [r3, #10]
|
|
8010220: 2200 movs r2, #0
|
|
8010222: 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);
|
|
8010224: 68bb ldr r3, [r7, #8]
|
|
8010226: 695b ldr r3, [r3, #20]
|
|
8010228: 687a ldr r2, [r7, #4]
|
|
801022a: 6a79 ldr r1, [r7, #36] ; 0x24
|
|
801022c: 68b8 ldr r0, [r7, #8]
|
|
801022e: 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);
|
|
8010230: 6a78 ldr r0, [r7, #36] ; 0x24
|
|
8010232: f7f5 fbe9 bl 8005a08 <pbuf_free>
|
|
left = (u16_t)(left - fragsize);
|
|
8010236: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
|
|
801023a: 8d7b ldrh r3, [r7, #42] ; 0x2a
|
|
801023c: 1ad3 subs r3, r2, r3
|
|
801023e: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
|
|
ofo = (u16_t)(ofo + nfb);
|
|
8010242: f8b7 2040 ldrh.w r2, [r7, #64] ; 0x40
|
|
8010246: 8f7b ldrh r3, [r7, #58] ; 0x3a
|
|
8010248: 4413 add r3, r2
|
|
801024a: f8a7 3040 strh.w r3, [r7, #64] ; 0x40
|
|
while (left) {
|
|
801024e: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
|
|
8010252: 2b00 cmp r3, #0
|
|
8010254: f47f af19 bne.w 801008a <ip4_frag+0x92>
|
|
}
|
|
MIB2_STATS_INC(mib2.ipfragoks);
|
|
return ERR_OK;
|
|
8010258: 2300 movs r3, #0
|
|
801025a: e002 b.n 8010262 <ip4_frag+0x26a>
|
|
goto memerr;
|
|
801025c: bf00 nop
|
|
memerr:
|
|
MIB2_STATS_INC(mib2.ipfragfails);
|
|
return ERR_MEM;
|
|
801025e: f04f 33ff mov.w r3, #4294967295
|
|
}
|
|
8010262: 4618 mov r0, r3
|
|
8010264: 3748 adds r7, #72 ; 0x48
|
|
8010266: 46bd mov sp, r7
|
|
8010268: bd80 pop {r7, pc}
|
|
801026a: bf00 nop
|
|
801026c: 08017b84 .word 0x08017b84
|
|
8010270: 08017d60 .word 0x08017d60
|
|
8010274: 08017bcc .word 0x08017bcc
|
|
8010278: 08017d7c .word 0x08017d7c
|
|
801027c: 08017d9c .word 0x08017d9c
|
|
8010280: 0800ff91 .word 0x0800ff91
|
|
|
|
08010284 <ethernet_input>:
|
|
* @see ETHARP_SUPPORT_VLAN
|
|
* @see LWIP_HOOK_VLAN_CHECK
|
|
*/
|
|
err_t
|
|
ethernet_input(struct pbuf *p, struct netif *netif)
|
|
{
|
|
8010284: b580 push {r7, lr}
|
|
8010286: b086 sub sp, #24
|
|
8010288: af00 add r7, sp, #0
|
|
801028a: 6078 str r0, [r7, #4]
|
|
801028c: 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;
|
|
801028e: 230e movs r3, #14
|
|
8010290: 82fb strh r3, [r7, #22]
|
|
#endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */
|
|
|
|
LWIP_ASSERT_CORE_LOCKED();
|
|
|
|
if (p->len <= SIZEOF_ETH_HDR) {
|
|
8010292: 687b ldr r3, [r7, #4]
|
|
8010294: 895b ldrh r3, [r3, #10]
|
|
8010296: 2b0e cmp r3, #14
|
|
8010298: d96e bls.n 8010378 <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) {
|
|
801029a: 687b ldr r3, [r7, #4]
|
|
801029c: 7bdb ldrb r3, [r3, #15]
|
|
801029e: 2b00 cmp r3, #0
|
|
80102a0: d106 bne.n 80102b0 <ethernet_input+0x2c>
|
|
p->if_idx = netif_get_index(netif);
|
|
80102a2: 683b ldr r3, [r7, #0]
|
|
80102a4: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
|
|
80102a8: 3301 adds r3, #1
|
|
80102aa: b2da uxtb r2, r3
|
|
80102ac: 687b ldr r3, [r7, #4]
|
|
80102ae: 73da strb r2, [r3, #15]
|
|
}
|
|
|
|
/* points to packet payload, which starts with an Ethernet header */
|
|
ethhdr = (struct eth_hdr *)p->payload;
|
|
80102b0: 687b ldr r3, [r7, #4]
|
|
80102b2: 685b ldr r3, [r3, #4]
|
|
80102b4: 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;
|
|
80102b6: 693b ldr r3, [r7, #16]
|
|
80102b8: 7b1a ldrb r2, [r3, #12]
|
|
80102ba: 7b5b ldrb r3, [r3, #13]
|
|
80102bc: 021b lsls r3, r3, #8
|
|
80102be: 4313 orrs r3, r2
|
|
80102c0: 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) {
|
|
80102c2: 693b ldr r3, [r7, #16]
|
|
80102c4: 781b ldrb r3, [r3, #0]
|
|
80102c6: f003 0301 and.w r3, r3, #1
|
|
80102ca: 2b00 cmp r3, #0
|
|
80102cc: d023 beq.n 8010316 <ethernet_input+0x92>
|
|
/* this might be a multicast or broadcast packet */
|
|
if (ethhdr->dest.addr[0] == LL_IP4_MULTICAST_ADDR_0) {
|
|
80102ce: 693b ldr r3, [r7, #16]
|
|
80102d0: 781b ldrb r3, [r3, #0]
|
|
80102d2: 2b01 cmp r3, #1
|
|
80102d4: d10f bne.n 80102f6 <ethernet_input+0x72>
|
|
#if LWIP_IPV4
|
|
if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) &&
|
|
80102d6: 693b ldr r3, [r7, #16]
|
|
80102d8: 785b ldrb r3, [r3, #1]
|
|
80102da: 2b00 cmp r3, #0
|
|
80102dc: d11b bne.n 8010316 <ethernet_input+0x92>
|
|
(ethhdr->dest.addr[2] == LL_IP4_MULTICAST_ADDR_2)) {
|
|
80102de: 693b ldr r3, [r7, #16]
|
|
80102e0: 789b ldrb r3, [r3, #2]
|
|
if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) &&
|
|
80102e2: 2b5e cmp r3, #94 ; 0x5e
|
|
80102e4: d117 bne.n 8010316 <ethernet_input+0x92>
|
|
/* mark the pbuf as link-layer multicast */
|
|
p->flags |= PBUF_FLAG_LLMCAST;
|
|
80102e6: 687b ldr r3, [r7, #4]
|
|
80102e8: 7b5b ldrb r3, [r3, #13]
|
|
80102ea: f043 0310 orr.w r3, r3, #16
|
|
80102ee: b2da uxtb r2, r3
|
|
80102f0: 687b ldr r3, [r7, #4]
|
|
80102f2: 735a strb r2, [r3, #13]
|
|
80102f4: e00f b.n 8010316 <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(ðhdr->dest, ðbroadcast)) {
|
|
80102f6: 693b ldr r3, [r7, #16]
|
|
80102f8: 2206 movs r2, #6
|
|
80102fa: 4928 ldr r1, [pc, #160] ; (801039c <ethernet_input+0x118>)
|
|
80102fc: 4618 mov r0, r3
|
|
80102fe: f000 f8bb bl 8010478 <memcmp>
|
|
8010302: 4603 mov r3, r0
|
|
8010304: 2b00 cmp r3, #0
|
|
8010306: d106 bne.n 8010316 <ethernet_input+0x92>
|
|
/* mark the pbuf as link-layer broadcast */
|
|
p->flags |= PBUF_FLAG_LLBCAST;
|
|
8010308: 687b ldr r3, [r7, #4]
|
|
801030a: 7b5b ldrb r3, [r3, #13]
|
|
801030c: f043 0308 orr.w r3, r3, #8
|
|
8010310: b2da uxtb r2, r3
|
|
8010312: 687b ldr r3, [r7, #4]
|
|
8010314: 735a strb r2, [r3, #13]
|
|
}
|
|
}
|
|
|
|
switch (type) {
|
|
8010316: 89fb ldrh r3, [r7, #14]
|
|
8010318: 2b08 cmp r3, #8
|
|
801031a: d003 beq.n 8010324 <ethernet_input+0xa0>
|
|
801031c: f5b3 6fc1 cmp.w r3, #1544 ; 0x608
|
|
8010320: d014 beq.n 801034c <ethernet_input+0xc8>
|
|
}
|
|
#endif
|
|
ETHARP_STATS_INC(etharp.proterr);
|
|
ETHARP_STATS_INC(etharp.drop);
|
|
MIB2_STATS_NETIF_INC(netif, ifinunknownprotos);
|
|
goto free_and_return;
|
|
8010322: e032 b.n 801038a <ethernet_input+0x106>
|
|
if (!(netif->flags & NETIF_FLAG_ETHARP)) {
|
|
8010324: 683b ldr r3, [r7, #0]
|
|
8010326: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
801032a: f003 0308 and.w r3, r3, #8
|
|
801032e: 2b00 cmp r3, #0
|
|
8010330: d024 beq.n 801037c <ethernet_input+0xf8>
|
|
if (pbuf_remove_header(p, next_hdr_offset)) {
|
|
8010332: 8afb ldrh r3, [r7, #22]
|
|
8010334: 4619 mov r1, r3
|
|
8010336: 6878 ldr r0, [r7, #4]
|
|
8010338: f7f5 fae0 bl 80058fc <pbuf_remove_header>
|
|
801033c: 4603 mov r3, r0
|
|
801033e: 2b00 cmp r3, #0
|
|
8010340: d11e bne.n 8010380 <ethernet_input+0xfc>
|
|
ip4_input(p, netif);
|
|
8010342: 6839 ldr r1, [r7, #0]
|
|
8010344: 6878 ldr r0, [r7, #4]
|
|
8010346: f7fe fdc5 bl 800eed4 <ip4_input>
|
|
break;
|
|
801034a: e013 b.n 8010374 <ethernet_input+0xf0>
|
|
if (!(netif->flags & NETIF_FLAG_ETHARP)) {
|
|
801034c: 683b ldr r3, [r7, #0]
|
|
801034e: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
|
|
8010352: f003 0308 and.w r3, r3, #8
|
|
8010356: 2b00 cmp r3, #0
|
|
8010358: d014 beq.n 8010384 <ethernet_input+0x100>
|
|
if (pbuf_remove_header(p, next_hdr_offset)) {
|
|
801035a: 8afb ldrh r3, [r7, #22]
|
|
801035c: 4619 mov r1, r3
|
|
801035e: 6878 ldr r0, [r7, #4]
|
|
8010360: f7f5 facc bl 80058fc <pbuf_remove_header>
|
|
8010364: 4603 mov r3, r0
|
|
8010366: 2b00 cmp r3, #0
|
|
8010368: d10e bne.n 8010388 <ethernet_input+0x104>
|
|
etharp_input(p, netif);
|
|
801036a: 6839 ldr r1, [r7, #0]
|
|
801036c: 6878 ldr r0, [r7, #4]
|
|
801036e: f7fd ff61 bl 800e234 <etharp_input>
|
|
break;
|
|
8010372: bf00 nop
|
|
}
|
|
|
|
/* This means the pbuf is freed or consumed,
|
|
so the caller doesn't have to free it again */
|
|
return ERR_OK;
|
|
8010374: 2300 movs r3, #0
|
|
8010376: e00c b.n 8010392 <ethernet_input+0x10e>
|
|
goto free_and_return;
|
|
8010378: bf00 nop
|
|
801037a: e006 b.n 801038a <ethernet_input+0x106>
|
|
goto free_and_return;
|
|
801037c: bf00 nop
|
|
801037e: e004 b.n 801038a <ethernet_input+0x106>
|
|
goto free_and_return;
|
|
8010380: bf00 nop
|
|
8010382: e002 b.n 801038a <ethernet_input+0x106>
|
|
goto free_and_return;
|
|
8010384: bf00 nop
|
|
8010386: e000 b.n 801038a <ethernet_input+0x106>
|
|
goto free_and_return;
|
|
8010388: bf00 nop
|
|
|
|
free_and_return:
|
|
pbuf_free(p);
|
|
801038a: 6878 ldr r0, [r7, #4]
|
|
801038c: f7f5 fb3c bl 8005a08 <pbuf_free>
|
|
return ERR_OK;
|
|
8010390: 2300 movs r3, #0
|
|
}
|
|
8010392: 4618 mov r0, r3
|
|
8010394: 3718 adds r7, #24
|
|
8010396: 46bd mov sp, r7
|
|
8010398: bd80 pop {r7, pc}
|
|
801039a: bf00 nop
|
|
801039c: 08017f44 .word 0x08017f44
|
|
|
|
080103a0 <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) {
|
|
80103a0: b580 push {r7, lr}
|
|
80103a2: b086 sub sp, #24
|
|
80103a4: af00 add r7, sp, #0
|
|
80103a6: 60f8 str r0, [r7, #12]
|
|
80103a8: 60b9 str r1, [r7, #8]
|
|
80103aa: 607a str r2, [r7, #4]
|
|
80103ac: 603b str r3, [r7, #0]
|
|
struct eth_hdr *ethhdr;
|
|
u16_t eth_type_be = lwip_htons(eth_type);
|
|
80103ae: 8c3b ldrh r3, [r7, #32]
|
|
80103b0: 4618 mov r0, r3
|
|
80103b2: f7f3 ffbf bl 8004334 <lwip_htons>
|
|
80103b6: 4603 mov r3, r0
|
|
80103b8: 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) {
|
|
80103ba: 210e movs r1, #14
|
|
80103bc: 68b8 ldr r0, [r7, #8]
|
|
80103be: f7f5 fa8d bl 80058dc <pbuf_add_header>
|
|
80103c2: 4603 mov r3, r0
|
|
80103c4: 2b00 cmp r3, #0
|
|
80103c6: d125 bne.n 8010414 <ethernet_output+0x74>
|
|
}
|
|
}
|
|
|
|
LWIP_ASSERT_CORE_LOCKED();
|
|
|
|
ethhdr = (struct eth_hdr *)p->payload;
|
|
80103c8: 68bb ldr r3, [r7, #8]
|
|
80103ca: 685b ldr r3, [r3, #4]
|
|
80103cc: 613b str r3, [r7, #16]
|
|
ethhdr->type = eth_type_be;
|
|
80103ce: 693b ldr r3, [r7, #16]
|
|
80103d0: 8afa ldrh r2, [r7, #22]
|
|
80103d2: 819a strh r2, [r3, #12]
|
|
SMEMCPY(ðhdr->dest, dst, ETH_HWADDR_LEN);
|
|
80103d4: 693b ldr r3, [r7, #16]
|
|
80103d6: 2206 movs r2, #6
|
|
80103d8: 6839 ldr r1, [r7, #0]
|
|
80103da: 4618 mov r0, r3
|
|
80103dc: f000 f85c bl 8010498 <memcpy>
|
|
SMEMCPY(ðhdr->src, src, ETH_HWADDR_LEN);
|
|
80103e0: 693b ldr r3, [r7, #16]
|
|
80103e2: 3306 adds r3, #6
|
|
80103e4: 2206 movs r2, #6
|
|
80103e6: 6879 ldr r1, [r7, #4]
|
|
80103e8: 4618 mov r0, r3
|
|
80103ea: f000 f855 bl 8010498 <memcpy>
|
|
|
|
LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!",
|
|
80103ee: 68fb ldr r3, [r7, #12]
|
|
80103f0: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
|
|
80103f4: 2b06 cmp r3, #6
|
|
80103f6: d006 beq.n 8010406 <ethernet_output+0x66>
|
|
80103f8: 4b0a ldr r3, [pc, #40] ; (8010424 <ethernet_output+0x84>)
|
|
80103fa: f44f 7299 mov.w r2, #306 ; 0x132
|
|
80103fe: 490a ldr r1, [pc, #40] ; (8010428 <ethernet_output+0x88>)
|
|
8010400: 480a ldr r0, [pc, #40] ; (801042c <ethernet_output+0x8c>)
|
|
8010402: f000 f879 bl 80104f8 <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);
|
|
8010406: 68fb ldr r3, [r7, #12]
|
|
8010408: 699b ldr r3, [r3, #24]
|
|
801040a: 68b9 ldr r1, [r7, #8]
|
|
801040c: 68f8 ldr r0, [r7, #12]
|
|
801040e: 4798 blx r3
|
|
8010410: 4603 mov r3, r0
|
|
8010412: e002 b.n 801041a <ethernet_output+0x7a>
|
|
goto pbuf_header_failed;
|
|
8010414: 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;
|
|
8010416: f06f 0301 mvn.w r3, #1
|
|
}
|
|
801041a: 4618 mov r0, r3
|
|
801041c: 3718 adds r7, #24
|
|
801041e: 46bd mov sp, r7
|
|
8010420: bd80 pop {r7, pc}
|
|
8010422: bf00 nop
|
|
8010424: 08017dac .word 0x08017dac
|
|
8010428: 08017de4 .word 0x08017de4
|
|
801042c: 08017e18 .word 0x08017e18
|
|
|
|
08010430 <__libc_init_array>:
|
|
8010430: b570 push {r4, r5, r6, lr}
|
|
8010432: 4d0d ldr r5, [pc, #52] ; (8010468 <__libc_init_array+0x38>)
|
|
8010434: 4c0d ldr r4, [pc, #52] ; (801046c <__libc_init_array+0x3c>)
|
|
8010436: 1b64 subs r4, r4, r5
|
|
8010438: 10a4 asrs r4, r4, #2
|
|
801043a: 2600 movs r6, #0
|
|
801043c: 42a6 cmp r6, r4
|
|
801043e: d109 bne.n 8010454 <__libc_init_array+0x24>
|
|
8010440: 4d0b ldr r5, [pc, #44] ; (8010470 <__libc_init_array+0x40>)
|
|
8010442: 4c0c ldr r4, [pc, #48] ; (8010474 <__libc_init_array+0x44>)
|
|
8010444: f004 fdd0 bl 8014fe8 <_init>
|
|
8010448: 1b64 subs r4, r4, r5
|
|
801044a: 10a4 asrs r4, r4, #2
|
|
801044c: 2600 movs r6, #0
|
|
801044e: 42a6 cmp r6, r4
|
|
8010450: d105 bne.n 801045e <__libc_init_array+0x2e>
|
|
8010452: bd70 pop {r4, r5, r6, pc}
|
|
8010454: f855 3b04 ldr.w r3, [r5], #4
|
|
8010458: 4798 blx r3
|
|
801045a: 3601 adds r6, #1
|
|
801045c: e7ee b.n 801043c <__libc_init_array+0xc>
|
|
801045e: f855 3b04 ldr.w r3, [r5], #4
|
|
8010462: 4798 blx r3
|
|
8010464: 3601 adds r6, #1
|
|
8010466: e7f2 b.n 801044e <__libc_init_array+0x1e>
|
|
8010468: 080182f4 .word 0x080182f4
|
|
801046c: 080182f4 .word 0x080182f4
|
|
8010470: 080182f4 .word 0x080182f4
|
|
8010474: 080182fc .word 0x080182fc
|
|
|
|
08010478 <memcmp>:
|
|
8010478: b510 push {r4, lr}
|
|
801047a: 3901 subs r1, #1
|
|
801047c: 4402 add r2, r0
|
|
801047e: 4290 cmp r0, r2
|
|
8010480: d101 bne.n 8010486 <memcmp+0xe>
|
|
8010482: 2000 movs r0, #0
|
|
8010484: e005 b.n 8010492 <memcmp+0x1a>
|
|
8010486: 7803 ldrb r3, [r0, #0]
|
|
8010488: f811 4f01 ldrb.w r4, [r1, #1]!
|
|
801048c: 42a3 cmp r3, r4
|
|
801048e: d001 beq.n 8010494 <memcmp+0x1c>
|
|
8010490: 1b18 subs r0, r3, r4
|
|
8010492: bd10 pop {r4, pc}
|
|
8010494: 3001 adds r0, #1
|
|
8010496: e7f2 b.n 801047e <memcmp+0x6>
|
|
|
|
08010498 <memcpy>:
|
|
8010498: 440a add r2, r1
|
|
801049a: 4291 cmp r1, r2
|
|
801049c: f100 33ff add.w r3, r0, #4294967295
|
|
80104a0: d100 bne.n 80104a4 <memcpy+0xc>
|
|
80104a2: 4770 bx lr
|
|
80104a4: b510 push {r4, lr}
|
|
80104a6: f811 4b01 ldrb.w r4, [r1], #1
|
|
80104aa: f803 4f01 strb.w r4, [r3, #1]!
|
|
80104ae: 4291 cmp r1, r2
|
|
80104b0: d1f9 bne.n 80104a6 <memcpy+0xe>
|
|
80104b2: bd10 pop {r4, pc}
|
|
|
|
080104b4 <memmove>:
|
|
80104b4: 4288 cmp r0, r1
|
|
80104b6: b510 push {r4, lr}
|
|
80104b8: eb01 0402 add.w r4, r1, r2
|
|
80104bc: d902 bls.n 80104c4 <memmove+0x10>
|
|
80104be: 4284 cmp r4, r0
|
|
80104c0: 4623 mov r3, r4
|
|
80104c2: d807 bhi.n 80104d4 <memmove+0x20>
|
|
80104c4: 1e43 subs r3, r0, #1
|
|
80104c6: 42a1 cmp r1, r4
|
|
80104c8: d008 beq.n 80104dc <memmove+0x28>
|
|
80104ca: f811 2b01 ldrb.w r2, [r1], #1
|
|
80104ce: f803 2f01 strb.w r2, [r3, #1]!
|
|
80104d2: e7f8 b.n 80104c6 <memmove+0x12>
|
|
80104d4: 4402 add r2, r0
|
|
80104d6: 4601 mov r1, r0
|
|
80104d8: 428a cmp r2, r1
|
|
80104da: d100 bne.n 80104de <memmove+0x2a>
|
|
80104dc: bd10 pop {r4, pc}
|
|
80104de: f813 4d01 ldrb.w r4, [r3, #-1]!
|
|
80104e2: f802 4d01 strb.w r4, [r2, #-1]!
|
|
80104e6: e7f7 b.n 80104d8 <memmove+0x24>
|
|
|
|
080104e8 <memset>:
|
|
80104e8: 4402 add r2, r0
|
|
80104ea: 4603 mov r3, r0
|
|
80104ec: 4293 cmp r3, r2
|
|
80104ee: d100 bne.n 80104f2 <memset+0xa>
|
|
80104f0: 4770 bx lr
|
|
80104f2: f803 1b01 strb.w r1, [r3], #1
|
|
80104f6: e7f9 b.n 80104ec <memset+0x4>
|
|
|
|
080104f8 <printf>:
|
|
80104f8: b40f push {r0, r1, r2, r3}
|
|
80104fa: b507 push {r0, r1, r2, lr}
|
|
80104fc: 4906 ldr r1, [pc, #24] ; (8010518 <printf+0x20>)
|
|
80104fe: ab04 add r3, sp, #16
|
|
8010500: 6808 ldr r0, [r1, #0]
|
|
8010502: f853 2b04 ldr.w r2, [r3], #4
|
|
8010506: 6881 ldr r1, [r0, #8]
|
|
8010508: 9301 str r3, [sp, #4]
|
|
801050a: f000 f82d bl 8010568 <_vfprintf_r>
|
|
801050e: b003 add sp, #12
|
|
8010510: f85d eb04 ldr.w lr, [sp], #4
|
|
8010514: b004 add sp, #16
|
|
8010516: 4770 bx lr
|
|
8010518: 20000030 .word 0x20000030
|
|
|
|
0801051c <rand>:
|
|
801051c: 4b0a ldr r3, [pc, #40] ; (8010548 <rand+0x2c>)
|
|
801051e: 4a0b ldr r2, [pc, #44] ; (801054c <rand+0x30>)
|
|
8010520: 490b ldr r1, [pc, #44] ; (8010550 <rand+0x34>)
|
|
8010522: b510 push {r4, lr}
|
|
8010524: 681c ldr r4, [r3, #0]
|
|
8010526: f8d4 00a8 ldr.w r0, [r4, #168] ; 0xa8
|
|
801052a: f8d4 30ac ldr.w r3, [r4, #172] ; 0xac
|
|
801052e: 4342 muls r2, r0
|
|
8010530: fb01 2203 mla r2, r1, r3, r2
|
|
8010534: fba0 0101 umull r0, r1, r0, r1
|
|
8010538: 1c43 adds r3, r0, #1
|
|
801053a: eb42 0001 adc.w r0, r2, r1
|
|
801053e: e9c4 302a strd r3, r0, [r4, #168] ; 0xa8
|
|
8010542: f020 4000 bic.w r0, r0, #2147483648 ; 0x80000000
|
|
8010546: bd10 pop {r4, pc}
|
|
8010548: 20000030 .word 0x20000030
|
|
801054c: 5851f42d .word 0x5851f42d
|
|
8010550: 4c957f2d .word 0x4c957f2d
|
|
|
|
08010554 <strcpy>:
|
|
8010554: 4603 mov r3, r0
|
|
8010556: f811 2b01 ldrb.w r2, [r1], #1
|
|
801055a: f803 2b01 strb.w r2, [r3], #1
|
|
801055e: 2a00 cmp r2, #0
|
|
8010560: d1f9 bne.n 8010556 <strcpy+0x2>
|
|
8010562: 4770 bx lr
|
|
8010564: 0000 movs r0, r0
|
|
...
|
|
|
|
08010568 <_vfprintf_r>:
|
|
8010568: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
|
|
801056c: ed2d 8b04 vpush {d8-d9}
|
|
8010570: b0cf sub sp, #316 ; 0x13c
|
|
8010572: 4689 mov r9, r1
|
|
8010574: 4690 mov r8, r2
|
|
8010576: 461c mov r4, r3
|
|
8010578: 461e mov r6, r3
|
|
801057a: 4682 mov sl, r0
|
|
801057c: f002 fbaa bl 8012cd4 <_localeconv_r>
|
|
8010580: 6803 ldr r3, [r0, #0]
|
|
8010582: 9313 str r3, [sp, #76] ; 0x4c
|
|
8010584: 4618 mov r0, r3
|
|
8010586: f7ef fe33 bl 80001f0 <strlen>
|
|
801058a: 900e str r0, [sp, #56] ; 0x38
|
|
801058c: f1ba 0f00 cmp.w sl, #0
|
|
8010590: d005 beq.n 801059e <_vfprintf_r+0x36>
|
|
8010592: f8da 3038 ldr.w r3, [sl, #56] ; 0x38
|
|
8010596: b913 cbnz r3, 801059e <_vfprintf_r+0x36>
|
|
8010598: 4650 mov r0, sl
|
|
801059a: f002 fa2b bl 80129f4 <__sinit>
|
|
801059e: f8d9 3064 ldr.w r3, [r9, #100] ; 0x64
|
|
80105a2: 07d8 lsls r0, r3, #31
|
|
80105a4: d407 bmi.n 80105b6 <_vfprintf_r+0x4e>
|
|
80105a6: f8b9 300c ldrh.w r3, [r9, #12]
|
|
80105aa: 0599 lsls r1, r3, #22
|
|
80105ac: d403 bmi.n 80105b6 <_vfprintf_r+0x4e>
|
|
80105ae: f8d9 0058 ldr.w r0, [r9, #88] ; 0x58
|
|
80105b2: f002 fb95 bl 8012ce0 <__retarget_lock_acquire_recursive>
|
|
80105b6: f9b9 300c ldrsh.w r3, [r9, #12]
|
|
80105ba: 049a lsls r2, r3, #18
|
|
80105bc: d409 bmi.n 80105d2 <_vfprintf_r+0x6a>
|
|
80105be: f443 5300 orr.w r3, r3, #8192 ; 0x2000
|
|
80105c2: f8a9 300c strh.w r3, [r9, #12]
|
|
80105c6: f8d9 3064 ldr.w r3, [r9, #100] ; 0x64
|
|
80105ca: f423 5300 bic.w r3, r3, #8192 ; 0x2000
|
|
80105ce: f8c9 3064 str.w r3, [r9, #100] ; 0x64
|
|
80105d2: f8b9 300c ldrh.w r3, [r9, #12]
|
|
80105d6: 071b lsls r3, r3, #28
|
|
80105d8: d502 bpl.n 80105e0 <_vfprintf_r+0x78>
|
|
80105da: f8d9 3010 ldr.w r3, [r9, #16]
|
|
80105de: b9d3 cbnz r3, 8010616 <_vfprintf_r+0xae>
|
|
80105e0: 4649 mov r1, r9
|
|
80105e2: 4650 mov r0, sl
|
|
80105e4: f001 fa3a bl 8011a5c <__swsetup_r>
|
|
80105e8: b1a8 cbz r0, 8010616 <_vfprintf_r+0xae>
|
|
80105ea: f8d9 3064 ldr.w r3, [r9, #100] ; 0x64
|
|
80105ee: 07df lsls r7, r3, #31
|
|
80105f0: d508 bpl.n 8010604 <_vfprintf_r+0x9c>
|
|
80105f2: f04f 33ff mov.w r3, #4294967295
|
|
80105f6: 930f str r3, [sp, #60] ; 0x3c
|
|
80105f8: 980f ldr r0, [sp, #60] ; 0x3c
|
|
80105fa: b04f add sp, #316 ; 0x13c
|
|
80105fc: ecbd 8b04 vpop {d8-d9}
|
|
8010600: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
|
|
8010604: f8b9 300c ldrh.w r3, [r9, #12]
|
|
8010608: 059e lsls r6, r3, #22
|
|
801060a: d4f2 bmi.n 80105f2 <_vfprintf_r+0x8a>
|
|
801060c: f8d9 0058 ldr.w r0, [r9, #88] ; 0x58
|
|
8010610: f002 fb67 bl 8012ce2 <__retarget_lock_release_recursive>
|
|
8010614: e7ed b.n 80105f2 <_vfprintf_r+0x8a>
|
|
8010616: f8b9 300c ldrh.w r3, [r9, #12]
|
|
801061a: f003 021a and.w r2, r3, #26
|
|
801061e: 2a0a cmp r2, #10
|
|
8010620: d118 bne.n 8010654 <_vfprintf_r+0xec>
|
|
8010622: f9b9 200e ldrsh.w r2, [r9, #14]
|
|
8010626: 2a00 cmp r2, #0
|
|
8010628: db14 blt.n 8010654 <_vfprintf_r+0xec>
|
|
801062a: f8d9 2064 ldr.w r2, [r9, #100] ; 0x64
|
|
801062e: 07d5 lsls r5, r2, #31
|
|
8010630: d405 bmi.n 801063e <_vfprintf_r+0xd6>
|
|
8010632: 0598 lsls r0, r3, #22
|
|
8010634: d403 bmi.n 801063e <_vfprintf_r+0xd6>
|
|
8010636: f8d9 0058 ldr.w r0, [r9, #88] ; 0x58
|
|
801063a: f002 fb52 bl 8012ce2 <__retarget_lock_release_recursive>
|
|
801063e: 4623 mov r3, r4
|
|
8010640: 4642 mov r2, r8
|
|
8010642: 4649 mov r1, r9
|
|
8010644: 4650 mov r0, sl
|
|
8010646: b04f add sp, #316 ; 0x13c
|
|
8010648: ecbd 8b04 vpop {d8-d9}
|
|
801064c: e8bd 4ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
|
|
8010650: f001 b9c4 b.w 80119dc <__sbprintf>
|
|
8010654: ed9f 7b92 vldr d7, [pc, #584] ; 80108a0 <_vfprintf_r+0x338>
|
|
8010658: 2500 movs r5, #0
|
|
801065a: e9cd 5523 strd r5, r5, [sp, #140] ; 0x8c
|
|
801065e: ed8d 7b0c vstr d7, [sp, #48] ; 0x30
|
|
8010662: e9cd 5515 strd r5, r5, [sp, #84] ; 0x54
|
|
8010666: ac25 add r4, sp, #148 ; 0x94
|
|
8010668: 9422 str r4, [sp, #136] ; 0x88
|
|
801066a: 9505 str r5, [sp, #20]
|
|
801066c: 950a str r5, [sp, #40] ; 0x28
|
|
801066e: 9512 str r5, [sp, #72] ; 0x48
|
|
8010670: 9514 str r5, [sp, #80] ; 0x50
|
|
8010672: 950f str r5, [sp, #60] ; 0x3c
|
|
8010674: 4643 mov r3, r8
|
|
8010676: 461d mov r5, r3
|
|
8010678: f813 2b01 ldrb.w r2, [r3], #1
|
|
801067c: b10a cbz r2, 8010682 <_vfprintf_r+0x11a>
|
|
801067e: 2a25 cmp r2, #37 ; 0x25
|
|
8010680: d1f9 bne.n 8010676 <_vfprintf_r+0x10e>
|
|
8010682: ebb5 0708 subs.w r7, r5, r8
|
|
8010686: d00d beq.n 80106a4 <_vfprintf_r+0x13c>
|
|
8010688: 9b24 ldr r3, [sp, #144] ; 0x90
|
|
801068a: 443b add r3, r7
|
|
801068c: 9324 str r3, [sp, #144] ; 0x90
|
|
801068e: 9b23 ldr r3, [sp, #140] ; 0x8c
|
|
8010690: 3301 adds r3, #1
|
|
8010692: 2b07 cmp r3, #7
|
|
8010694: e9c4 8700 strd r8, r7, [r4]
|
|
8010698: 9323 str r3, [sp, #140] ; 0x8c
|
|
801069a: dc79 bgt.n 8010790 <_vfprintf_r+0x228>
|
|
801069c: 3408 adds r4, #8
|
|
801069e: 9b0f ldr r3, [sp, #60] ; 0x3c
|
|
80106a0: 443b add r3, r7
|
|
80106a2: 930f str r3, [sp, #60] ; 0x3c
|
|
80106a4: 782b ldrb r3, [r5, #0]
|
|
80106a6: 2b00 cmp r3, #0
|
|
80106a8: f001 8154 beq.w 8011954 <_vfprintf_r+0x13ec>
|
|
80106ac: 2300 movs r3, #0
|
|
80106ae: f04f 32ff mov.w r2, #4294967295
|
|
80106b2: 3501 adds r5, #1
|
|
80106b4: f88d 306b strb.w r3, [sp, #107] ; 0x6b
|
|
80106b8: 9204 str r2, [sp, #16]
|
|
80106ba: 9310 str r3, [sp, #64] ; 0x40
|
|
80106bc: 469b mov fp, r3
|
|
80106be: 270a movs r7, #10
|
|
80106c0: 212b movs r1, #43 ; 0x2b
|
|
80106c2: 462b mov r3, r5
|
|
80106c4: f813 2b01 ldrb.w r2, [r3], #1
|
|
80106c8: 9206 str r2, [sp, #24]
|
|
80106ca: 930b str r3, [sp, #44] ; 0x2c
|
|
80106cc: 9b06 ldr r3, [sp, #24]
|
|
80106ce: 3b20 subs r3, #32
|
|
80106d0: 2b5a cmp r3, #90 ; 0x5a
|
|
80106d2: f200 85c8 bhi.w 8011266 <_vfprintf_r+0xcfe>
|
|
80106d6: e8df f013 tbh [pc, r3, lsl #1]
|
|
80106da: 007e .short 0x007e
|
|
80106dc: 05c605c6 .word 0x05c605c6
|
|
80106e0: 05c60086 .word 0x05c60086
|
|
80106e4: 05c605c6 .word 0x05c605c6
|
|
80106e8: 05c60065 .word 0x05c60065
|
|
80106ec: 008905c6 .word 0x008905c6
|
|
80106f0: 05c60093 .word 0x05c60093
|
|
80106f4: 00960090 .word 0x00960090
|
|
80106f8: 00b205c6 .word 0x00b205c6
|
|
80106fc: 00b500b5 .word 0x00b500b5
|
|
8010700: 00b500b5 .word 0x00b500b5
|
|
8010704: 00b500b5 .word 0x00b500b5
|
|
8010708: 00b500b5 .word 0x00b500b5
|
|
801070c: 05c600b5 .word 0x05c600b5
|
|
8010710: 05c605c6 .word 0x05c605c6
|
|
8010714: 05c605c6 .word 0x05c605c6
|
|
8010718: 05c605c6 .word 0x05c605c6
|
|
801071c: 05c6012a .word 0x05c6012a
|
|
8010720: 00fa00e7 .word 0x00fa00e7
|
|
8010724: 012a012a .word 0x012a012a
|
|
8010728: 05c6012a .word 0x05c6012a
|
|
801072c: 05c605c6 .word 0x05c605c6
|
|
8010730: 00c505c6 .word 0x00c505c6
|
|
8010734: 05c605c6 .word 0x05c605c6
|
|
8010738: 05c604a0 .word 0x05c604a0
|
|
801073c: 05c605c6 .word 0x05c605c6
|
|
8010740: 05c604ea .word 0x05c604ea
|
|
8010744: 05c6050b .word 0x05c6050b
|
|
8010748: 052d05c6 .word 0x052d05c6
|
|
801074c: 05c605c6 .word 0x05c605c6
|
|
8010750: 05c605c6 .word 0x05c605c6
|
|
8010754: 05c605c6 .word 0x05c605c6
|
|
8010758: 05c605c6 .word 0x05c605c6
|
|
801075c: 05c6012a .word 0x05c6012a
|
|
8010760: 00fc00e7 .word 0x00fc00e7
|
|
8010764: 012a012a .word 0x012a012a
|
|
8010768: 00c8012a .word 0x00c8012a
|
|
801076c: 00dc00fc .word 0x00dc00fc
|
|
8010770: 00d505c6 .word 0x00d505c6
|
|
8010774: 047b05c6 .word 0x047b05c6
|
|
8010778: 04d804a2 .word 0x04d804a2
|
|
801077c: 05c600dc .word 0x05c600dc
|
|
8010780: 007c04ea .word 0x007c04ea
|
|
8010784: 05c6050d .word 0x05c6050d
|
|
8010788: 054c05c6 .word 0x054c05c6
|
|
801078c: 007c05c6 .word 0x007c05c6
|
|
8010790: aa22 add r2, sp, #136 ; 0x88
|
|
8010792: 4649 mov r1, r9
|
|
8010794: 4650 mov r0, sl
|
|
8010796: f003 f93a bl 8013a0e <__sprint_r>
|
|
801079a: 2800 cmp r0, #0
|
|
801079c: f040 8135 bne.w 8010a0a <_vfprintf_r+0x4a2>
|
|
80107a0: ac25 add r4, sp, #148 ; 0x94
|
|
80107a2: e77c b.n 801069e <_vfprintf_r+0x136>
|
|
80107a4: 4650 mov r0, sl
|
|
80107a6: f002 fa95 bl 8012cd4 <_localeconv_r>
|
|
80107aa: 6843 ldr r3, [r0, #4]
|
|
80107ac: 9314 str r3, [sp, #80] ; 0x50
|
|
80107ae: 4618 mov r0, r3
|
|
80107b0: f7ef fd1e bl 80001f0 <strlen>
|
|
80107b4: 9012 str r0, [sp, #72] ; 0x48
|
|
80107b6: 4650 mov r0, sl
|
|
80107b8: f002 fa8c bl 8012cd4 <_localeconv_r>
|
|
80107bc: 6883 ldr r3, [r0, #8]
|
|
80107be: 930a str r3, [sp, #40] ; 0x28
|
|
80107c0: 9b12 ldr r3, [sp, #72] ; 0x48
|
|
80107c2: 212b movs r1, #43 ; 0x2b
|
|
80107c4: b12b cbz r3, 80107d2 <_vfprintf_r+0x26a>
|
|
80107c6: 9b0a ldr r3, [sp, #40] ; 0x28
|
|
80107c8: b11b cbz r3, 80107d2 <_vfprintf_r+0x26a>
|
|
80107ca: 781b ldrb r3, [r3, #0]
|
|
80107cc: b10b cbz r3, 80107d2 <_vfprintf_r+0x26a>
|
|
80107ce: f44b 6b80 orr.w fp, fp, #1024 ; 0x400
|
|
80107d2: 9d0b ldr r5, [sp, #44] ; 0x2c
|
|
80107d4: e775 b.n 80106c2 <_vfprintf_r+0x15a>
|
|
80107d6: f89d 306b ldrb.w r3, [sp, #107] ; 0x6b
|
|
80107da: 2b00 cmp r3, #0
|
|
80107dc: d1f9 bne.n 80107d2 <_vfprintf_r+0x26a>
|
|
80107de: 2320 movs r3, #32
|
|
80107e0: f88d 306b strb.w r3, [sp, #107] ; 0x6b
|
|
80107e4: e7f5 b.n 80107d2 <_vfprintf_r+0x26a>
|
|
80107e6: f04b 0b01 orr.w fp, fp, #1
|
|
80107ea: e7f2 b.n 80107d2 <_vfprintf_r+0x26a>
|
|
80107ec: f856 3b04 ldr.w r3, [r6], #4
|
|
80107f0: 9310 str r3, [sp, #64] ; 0x40
|
|
80107f2: 2b00 cmp r3, #0
|
|
80107f4: daed bge.n 80107d2 <_vfprintf_r+0x26a>
|
|
80107f6: 425b negs r3, r3
|
|
80107f8: 9310 str r3, [sp, #64] ; 0x40
|
|
80107fa: f04b 0b04 orr.w fp, fp, #4
|
|
80107fe: e7e8 b.n 80107d2 <_vfprintf_r+0x26a>
|
|
8010800: f88d 106b strb.w r1, [sp, #107] ; 0x6b
|
|
8010804: e7e5 b.n 80107d2 <_vfprintf_r+0x26a>
|
|
8010806: 9b0b ldr r3, [sp, #44] ; 0x2c
|
|
8010808: f813 2b01 ldrb.w r2, [r3], #1
|
|
801080c: 9206 str r2, [sp, #24]
|
|
801080e: 2a2a cmp r2, #42 ; 0x2a
|
|
8010810: d112 bne.n 8010838 <_vfprintf_r+0x2d0>
|
|
8010812: f856 0b04 ldr.w r0, [r6], #4
|
|
8010816: 930b str r3, [sp, #44] ; 0x2c
|
|
8010818: ea40 72e0 orr.w r2, r0, r0, asr #31
|
|
801081c: 9204 str r2, [sp, #16]
|
|
801081e: e7d8 b.n 80107d2 <_vfprintf_r+0x26a>
|
|
8010820: 9804 ldr r0, [sp, #16]
|
|
8010822: fb07 2200 mla r2, r7, r0, r2
|
|
8010826: 9204 str r2, [sp, #16]
|
|
8010828: f813 2b01 ldrb.w r2, [r3], #1
|
|
801082c: 9206 str r2, [sp, #24]
|
|
801082e: 9a06 ldr r2, [sp, #24]
|
|
8010830: 3a30 subs r2, #48 ; 0x30
|
|
8010832: 2a09 cmp r2, #9
|
|
8010834: d9f4 bls.n 8010820 <_vfprintf_r+0x2b8>
|
|
8010836: e748 b.n 80106ca <_vfprintf_r+0x162>
|
|
8010838: 2200 movs r2, #0
|
|
801083a: 9204 str r2, [sp, #16]
|
|
801083c: e7f7 b.n 801082e <_vfprintf_r+0x2c6>
|
|
801083e: f04b 0b80 orr.w fp, fp, #128 ; 0x80
|
|
8010842: e7c6 b.n 80107d2 <_vfprintf_r+0x26a>
|
|
8010844: 2200 movs r2, #0
|
|
8010846: 9b0b ldr r3, [sp, #44] ; 0x2c
|
|
8010848: 9210 str r2, [sp, #64] ; 0x40
|
|
801084a: 9a06 ldr r2, [sp, #24]
|
|
801084c: 9810 ldr r0, [sp, #64] ; 0x40
|
|
801084e: 3a30 subs r2, #48 ; 0x30
|
|
8010850: fb07 2200 mla r2, r7, r0, r2
|
|
8010854: 9210 str r2, [sp, #64] ; 0x40
|
|
8010856: f813 2b01 ldrb.w r2, [r3], #1
|
|
801085a: 9206 str r2, [sp, #24]
|
|
801085c: 3a30 subs r2, #48 ; 0x30
|
|
801085e: 2a09 cmp r2, #9
|
|
8010860: d9f3 bls.n 801084a <_vfprintf_r+0x2e2>
|
|
8010862: e732 b.n 80106ca <_vfprintf_r+0x162>
|
|
8010864: f04b 0b08 orr.w fp, fp, #8
|
|
8010868: e7b3 b.n 80107d2 <_vfprintf_r+0x26a>
|
|
801086a: 9b0b ldr r3, [sp, #44] ; 0x2c
|
|
801086c: 781b ldrb r3, [r3, #0]
|
|
801086e: 2b68 cmp r3, #104 ; 0x68
|
|
8010870: bf01 itttt eq
|
|
8010872: 9b0b ldreq r3, [sp, #44] ; 0x2c
|
|
8010874: 3301 addeq r3, #1
|
|
8010876: 930b streq r3, [sp, #44] ; 0x2c
|
|
8010878: f44b 7b00 orreq.w fp, fp, #512 ; 0x200
|
|
801087c: bf18 it ne
|
|
801087e: f04b 0b40 orrne.w fp, fp, #64 ; 0x40
|
|
8010882: e7a6 b.n 80107d2 <_vfprintf_r+0x26a>
|
|
8010884: 9b0b ldr r3, [sp, #44] ; 0x2c
|
|
8010886: 781b ldrb r3, [r3, #0]
|
|
8010888: 2b6c cmp r3, #108 ; 0x6c
|
|
801088a: d105 bne.n 8010898 <_vfprintf_r+0x330>
|
|
801088c: 9b0b ldr r3, [sp, #44] ; 0x2c
|
|
801088e: 3301 adds r3, #1
|
|
8010890: 930b str r3, [sp, #44] ; 0x2c
|
|
8010892: f04b 0b20 orr.w fp, fp, #32
|
|
8010896: e79c b.n 80107d2 <_vfprintf_r+0x26a>
|
|
8010898: f04b 0b10 orr.w fp, fp, #16
|
|
801089c: e799 b.n 80107d2 <_vfprintf_r+0x26a>
|
|
801089e: bf00 nop
|
|
...
|
|
80108a8: 4632 mov r2, r6
|
|
80108aa: 2000 movs r0, #0
|
|
80108ac: f852 3b04 ldr.w r3, [r2], #4
|
|
80108b0: 9207 str r2, [sp, #28]
|
|
80108b2: f88d 30d4 strb.w r3, [sp, #212] ; 0xd4
|
|
80108b6: f88d 006b strb.w r0, [sp, #107] ; 0x6b
|
|
80108ba: 2301 movs r3, #1
|
|
80108bc: e9cd 0008 strd r0, r0, [sp, #32]
|
|
80108c0: 9003 str r0, [sp, #12]
|
|
80108c2: 9304 str r3, [sp, #16]
|
|
80108c4: 4606 mov r6, r0
|
|
80108c6: 4605 mov r5, r0
|
|
80108c8: f10d 08d4 add.w r8, sp, #212 ; 0xd4
|
|
80108cc: e1c6 b.n 8010c5c <_vfprintf_r+0x6f4>
|
|
80108ce: f04b 0b10 orr.w fp, fp, #16
|
|
80108d2: f01b 0f20 tst.w fp, #32
|
|
80108d6: d012 beq.n 80108fe <_vfprintf_r+0x396>
|
|
80108d8: 3607 adds r6, #7
|
|
80108da: f026 0307 bic.w r3, r6, #7
|
|
80108de: 461a mov r2, r3
|
|
80108e0: 685d ldr r5, [r3, #4]
|
|
80108e2: f852 6b08 ldr.w r6, [r2], #8
|
|
80108e6: 9207 str r2, [sp, #28]
|
|
80108e8: 2d00 cmp r5, #0
|
|
80108ea: da06 bge.n 80108fa <_vfprintf_r+0x392>
|
|
80108ec: 4276 negs r6, r6
|
|
80108ee: f04f 032d mov.w r3, #45 ; 0x2d
|
|
80108f2: eb65 0545 sbc.w r5, r5, r5, lsl #1
|
|
80108f6: f88d 306b strb.w r3, [sp, #107] ; 0x6b
|
|
80108fa: 2301 movs r3, #1
|
|
80108fc: e3a0 b.n 8011040 <_vfprintf_r+0xad8>
|
|
80108fe: 4633 mov r3, r6
|
|
8010900: f01b 0f10 tst.w fp, #16
|
|
8010904: f853 5b04 ldr.w r5, [r3], #4
|
|
8010908: 9307 str r3, [sp, #28]
|
|
801090a: d002 beq.n 8010912 <_vfprintf_r+0x3aa>
|
|
801090c: 462e mov r6, r5
|
|
801090e: 17ed asrs r5, r5, #31
|
|
8010910: e7ea b.n 80108e8 <_vfprintf_r+0x380>
|
|
8010912: f01b 0f40 tst.w fp, #64 ; 0x40
|
|
8010916: d003 beq.n 8010920 <_vfprintf_r+0x3b8>
|
|
8010918: b22e sxth r6, r5
|
|
801091a: f345 35c0 sbfx r5, r5, #15, #1
|
|
801091e: e7e3 b.n 80108e8 <_vfprintf_r+0x380>
|
|
8010920: f41b 7f00 tst.w fp, #512 ; 0x200
|
|
8010924: d0f2 beq.n 801090c <_vfprintf_r+0x3a4>
|
|
8010926: b26e sxtb r6, r5
|
|
8010928: f345 15c0 sbfx r5, r5, #7, #1
|
|
801092c: e7dc b.n 80108e8 <_vfprintf_r+0x380>
|
|
801092e: 3607 adds r6, #7
|
|
8010930: f026 0307 bic.w r3, r6, #7
|
|
8010934: ecb3 7b02 vldmia r3!, {d7}
|
|
8010938: ed8d 7b0c vstr d7, [sp, #48] ; 0x30
|
|
801093c: 9307 str r3, [sp, #28]
|
|
801093e: 9b0c ldr r3, [sp, #48] ; 0x30
|
|
8010940: ee09 3a10 vmov s18, r3
|
|
8010944: 9b0d ldr r3, [sp, #52] ; 0x34
|
|
8010946: f023 4300 bic.w r3, r3, #2147483648 ; 0x80000000
|
|
801094a: ee09 3a90 vmov s19, r3
|
|
801094e: f04f 32ff mov.w r2, #4294967295
|
|
8010952: 4b3f ldr r3, [pc, #252] ; (8010a50 <_vfprintf_r+0x4e8>)
|
|
8010954: ec51 0b19 vmov r0, r1, d9
|
|
8010958: f7f0 f8f8 bl 8000b4c <__aeabi_dcmpun>
|
|
801095c: bb10 cbnz r0, 80109a4 <_vfprintf_r+0x43c>
|
|
801095e: 4b3c ldr r3, [pc, #240] ; (8010a50 <_vfprintf_r+0x4e8>)
|
|
8010960: ec51 0b19 vmov r0, r1, d9
|
|
8010964: f04f 32ff mov.w r2, #4294967295
|
|
8010968: f7f0 f8d2 bl 8000b10 <__aeabi_dcmple>
|
|
801096c: b9d0 cbnz r0, 80109a4 <_vfprintf_r+0x43c>
|
|
801096e: e9dd 010c ldrd r0, r1, [sp, #48] ; 0x30
|
|
8010972: 2200 movs r2, #0
|
|
8010974: 2300 movs r3, #0
|
|
8010976: f7f0 f8c1 bl 8000afc <__aeabi_dcmplt>
|
|
801097a: b110 cbz r0, 8010982 <_vfprintf_r+0x41a>
|
|
801097c: 232d movs r3, #45 ; 0x2d
|
|
801097e: f88d 306b strb.w r3, [sp, #107] ; 0x6b
|
|
8010982: 4a34 ldr r2, [pc, #208] ; (8010a54 <_vfprintf_r+0x4ec>)
|
|
8010984: 4834 ldr r0, [pc, #208] ; (8010a58 <_vfprintf_r+0x4f0>)
|
|
8010986: 9b06 ldr r3, [sp, #24]
|
|
8010988: 2100 movs r1, #0
|
|
801098a: 2b47 cmp r3, #71 ; 0x47
|
|
801098c: bfd4 ite le
|
|
801098e: 4690 movle r8, r2
|
|
8010990: 4680 movgt r8, r0
|
|
8010992: 2303 movs r3, #3
|
|
8010994: e9cd 1303 strd r1, r3, [sp, #12]
|
|
8010998: f02b 0b80 bic.w fp, fp, #128 ; 0x80
|
|
801099c: 2600 movs r6, #0
|
|
801099e: 4633 mov r3, r6
|
|
80109a0: f001 b812 b.w 80119c8 <_vfprintf_r+0x1460>
|
|
80109a4: e9dd 230c ldrd r2, r3, [sp, #48] ; 0x30
|
|
80109a8: 4610 mov r0, r2
|
|
80109aa: 4619 mov r1, r3
|
|
80109ac: f7f0 f8ce bl 8000b4c <__aeabi_dcmpun>
|
|
80109b0: b140 cbz r0, 80109c4 <_vfprintf_r+0x45c>
|
|
80109b2: 9b0d ldr r3, [sp, #52] ; 0x34
|
|
80109b4: 4a29 ldr r2, [pc, #164] ; (8010a5c <_vfprintf_r+0x4f4>)
|
|
80109b6: 482a ldr r0, [pc, #168] ; (8010a60 <_vfprintf_r+0x4f8>)
|
|
80109b8: 2b00 cmp r3, #0
|
|
80109ba: bfbc itt lt
|
|
80109bc: 232d movlt r3, #45 ; 0x2d
|
|
80109be: f88d 306b strblt.w r3, [sp, #107] ; 0x6b
|
|
80109c2: e7e0 b.n 8010986 <_vfprintf_r+0x41e>
|
|
80109c4: 9b06 ldr r3, [sp, #24]
|
|
80109c6: f023 0320 bic.w r3, r3, #32
|
|
80109ca: 2b41 cmp r3, #65 ; 0x41
|
|
80109cc: 9308 str r3, [sp, #32]
|
|
80109ce: d12e bne.n 8010a2e <_vfprintf_r+0x4c6>
|
|
80109d0: 2330 movs r3, #48 ; 0x30
|
|
80109d2: f88d 306c strb.w r3, [sp, #108] ; 0x6c
|
|
80109d6: 9b06 ldr r3, [sp, #24]
|
|
80109d8: 2b61 cmp r3, #97 ; 0x61
|
|
80109da: bf0c ite eq
|
|
80109dc: 2378 moveq r3, #120 ; 0x78
|
|
80109de: 2358 movne r3, #88 ; 0x58
|
|
80109e0: f88d 306d strb.w r3, [sp, #109] ; 0x6d
|
|
80109e4: 9b04 ldr r3, [sp, #16]
|
|
80109e6: 2b63 cmp r3, #99 ; 0x63
|
|
80109e8: f04b 0b02 orr.w fp, fp, #2
|
|
80109ec: dd3a ble.n 8010a64 <_vfprintf_r+0x4fc>
|
|
80109ee: 1c59 adds r1, r3, #1
|
|
80109f0: 4650 mov r0, sl
|
|
80109f2: f002 f9e3 bl 8012dbc <_malloc_r>
|
|
80109f6: 4680 mov r8, r0
|
|
80109f8: 2800 cmp r0, #0
|
|
80109fa: f040 8207 bne.w 8010e0c <_vfprintf_r+0x8a4>
|
|
80109fe: f8b9 300c ldrh.w r3, [r9, #12]
|
|
8010a02: f043 0340 orr.w r3, r3, #64 ; 0x40
|
|
8010a06: f8a9 300c strh.w r3, [r9, #12]
|
|
8010a0a: f8d9 3064 ldr.w r3, [r9, #100] ; 0x64
|
|
8010a0e: 07d9 lsls r1, r3, #31
|
|
8010a10: d407 bmi.n 8010a22 <_vfprintf_r+0x4ba>
|
|
8010a12: f8b9 300c ldrh.w r3, [r9, #12]
|
|
8010a16: 059a lsls r2, r3, #22
|
|
8010a18: d403 bmi.n 8010a22 <_vfprintf_r+0x4ba>
|
|
8010a1a: f8d9 0058 ldr.w r0, [r9, #88] ; 0x58
|
|
8010a1e: f002 f960 bl 8012ce2 <__retarget_lock_release_recursive>
|
|
8010a22: f8b9 300c ldrh.w r3, [r9, #12]
|
|
8010a26: 065b lsls r3, r3, #25
|
|
8010a28: f57f ade6 bpl.w 80105f8 <_vfprintf_r+0x90>
|
|
8010a2c: e5e1 b.n 80105f2 <_vfprintf_r+0x8a>
|
|
8010a2e: 9b04 ldr r3, [sp, #16]
|
|
8010a30: 3301 adds r3, #1
|
|
8010a32: f000 81ed beq.w 8010e10 <_vfprintf_r+0x8a8>
|
|
8010a36: 9b08 ldr r3, [sp, #32]
|
|
8010a38: 2b47 cmp r3, #71 ; 0x47
|
|
8010a3a: f040 81ec bne.w 8010e16 <_vfprintf_r+0x8ae>
|
|
8010a3e: 9b04 ldr r3, [sp, #16]
|
|
8010a40: 2b00 cmp r3, #0
|
|
8010a42: f040 81e8 bne.w 8010e16 <_vfprintf_r+0x8ae>
|
|
8010a46: 9303 str r3, [sp, #12]
|
|
8010a48: 2301 movs r3, #1
|
|
8010a4a: 9304 str r3, [sp, #16]
|
|
8010a4c: e00d b.n 8010a6a <_vfprintf_r+0x502>
|
|
8010a4e: bf00 nop
|
|
8010a50: 7fefffff .word 0x7fefffff
|
|
8010a54: 08018058 .word 0x08018058
|
|
8010a58: 0801805c .word 0x0801805c
|
|
8010a5c: 08018060 .word 0x08018060
|
|
8010a60: 08018064 .word 0x08018064
|
|
8010a64: 9003 str r0, [sp, #12]
|
|
8010a66: f10d 08d4 add.w r8, sp, #212 ; 0xd4
|
|
8010a6a: f44b 7380 orr.w r3, fp, #256 ; 0x100
|
|
8010a6e: 9311 str r3, [sp, #68] ; 0x44
|
|
8010a70: 9b0d ldr r3, [sp, #52] ; 0x34
|
|
8010a72: 2b00 cmp r3, #0
|
|
8010a74: f280 81d1 bge.w 8010e1a <_vfprintf_r+0x8b2>
|
|
8010a78: 9b0c ldr r3, [sp, #48] ; 0x30
|
|
8010a7a: ee08 3a10 vmov s16, r3
|
|
8010a7e: 9b0d ldr r3, [sp, #52] ; 0x34
|
|
8010a80: f103 4300 add.w r3, r3, #2147483648 ; 0x80000000
|
|
8010a84: ee08 3a90 vmov s17, r3
|
|
8010a88: 232d movs r3, #45 ; 0x2d
|
|
8010a8a: 9318 str r3, [sp, #96] ; 0x60
|
|
8010a8c: 9b08 ldr r3, [sp, #32]
|
|
8010a8e: 2b41 cmp r3, #65 ; 0x41
|
|
8010a90: f040 81e1 bne.w 8010e56 <_vfprintf_r+0x8ee>
|
|
8010a94: eeb0 0a48 vmov.f32 s0, s16
|
|
8010a98: eef0 0a68 vmov.f32 s1, s17
|
|
8010a9c: a81c add r0, sp, #112 ; 0x70
|
|
8010a9e: f002 ff0b bl 80138b8 <frexp>
|
|
8010aa2: 2200 movs r2, #0
|
|
8010aa4: f04f 537f mov.w r3, #1069547520 ; 0x3fc00000
|
|
8010aa8: ec51 0b10 vmov r0, r1, d0
|
|
8010aac: f7ef fdb4 bl 8000618 <__aeabi_dmul>
|
|
8010ab0: 2200 movs r2, #0
|
|
8010ab2: 2300 movs r3, #0
|
|
8010ab4: 4606 mov r6, r0
|
|
8010ab6: 460f mov r7, r1
|
|
8010ab8: f7f0 f816 bl 8000ae8 <__aeabi_dcmpeq>
|
|
8010abc: b108 cbz r0, 8010ac2 <_vfprintf_r+0x55a>
|
|
8010abe: 2301 movs r3, #1
|
|
8010ac0: 931c str r3, [sp, #112] ; 0x70
|
|
8010ac2: 4ba7 ldr r3, [pc, #668] ; (8010d60 <_vfprintf_r+0x7f8>)
|
|
8010ac4: 4aa7 ldr r2, [pc, #668] ; (8010d64 <_vfprintf_r+0x7fc>)
|
|
8010ac6: 9906 ldr r1, [sp, #24]
|
|
8010ac8: 2961 cmp r1, #97 ; 0x61
|
|
8010aca: bf18 it ne
|
|
8010acc: 461a movne r2, r3
|
|
8010ace: 9b04 ldr r3, [sp, #16]
|
|
8010ad0: 9217 str r2, [sp, #92] ; 0x5c
|
|
8010ad2: 3b01 subs r3, #1
|
|
8010ad4: 9305 str r3, [sp, #20]
|
|
8010ad6: 4645 mov r5, r8
|
|
8010ad8: 4ba3 ldr r3, [pc, #652] ; (8010d68 <_vfprintf_r+0x800>)
|
|
8010ada: 2200 movs r2, #0
|
|
8010adc: 4630 mov r0, r6
|
|
8010ade: 4639 mov r1, r7
|
|
8010ae0: f7ef fd9a bl 8000618 <__aeabi_dmul>
|
|
8010ae4: 460f mov r7, r1
|
|
8010ae6: 4606 mov r6, r0
|
|
8010ae8: f7f0 f846 bl 8000b78 <__aeabi_d2iz>
|
|
8010aec: 9019 str r0, [sp, #100] ; 0x64
|
|
8010aee: f7ef fd29 bl 8000544 <__aeabi_i2d>
|
|
8010af2: 4602 mov r2, r0
|
|
8010af4: 460b mov r3, r1
|
|
8010af6: 4630 mov r0, r6
|
|
8010af8: 4639 mov r1, r7
|
|
8010afa: f7ef fbd5 bl 80002a8 <__aeabi_dsub>
|
|
8010afe: 9a19 ldr r2, [sp, #100] ; 0x64
|
|
8010b00: 9b17 ldr r3, [sp, #92] ; 0x5c
|
|
8010b02: 5c9b ldrb r3, [r3, r2]
|
|
8010b04: f805 3b01 strb.w r3, [r5], #1
|
|
8010b08: 9b05 ldr r3, [sp, #20]
|
|
8010b0a: 9309 str r3, [sp, #36] ; 0x24
|
|
8010b0c: 1c5a adds r2, r3, #1
|
|
8010b0e: 4606 mov r6, r0
|
|
8010b10: 460f mov r7, r1
|
|
8010b12: d007 beq.n 8010b24 <_vfprintf_r+0x5bc>
|
|
8010b14: 3b01 subs r3, #1
|
|
8010b16: 9305 str r3, [sp, #20]
|
|
8010b18: 2200 movs r2, #0
|
|
8010b1a: 2300 movs r3, #0
|
|
8010b1c: f7ef ffe4 bl 8000ae8 <__aeabi_dcmpeq>
|
|
8010b20: 2800 cmp r0, #0
|
|
8010b22: d0d9 beq.n 8010ad8 <_vfprintf_r+0x570>
|
|
8010b24: 4b91 ldr r3, [pc, #580] ; (8010d6c <_vfprintf_r+0x804>)
|
|
8010b26: 2200 movs r2, #0
|
|
8010b28: 4630 mov r0, r6
|
|
8010b2a: 4639 mov r1, r7
|
|
8010b2c: f7f0 f804 bl 8000b38 <__aeabi_dcmpgt>
|
|
8010b30: b960 cbnz r0, 8010b4c <_vfprintf_r+0x5e4>
|
|
8010b32: 4b8e ldr r3, [pc, #568] ; (8010d6c <_vfprintf_r+0x804>)
|
|
8010b34: 2200 movs r2, #0
|
|
8010b36: 4630 mov r0, r6
|
|
8010b38: 4639 mov r1, r7
|
|
8010b3a: f7ef ffd5 bl 8000ae8 <__aeabi_dcmpeq>
|
|
8010b3e: 2800 cmp r0, #0
|
|
8010b40: f000 8184 beq.w 8010e4c <_vfprintf_r+0x8e4>
|
|
8010b44: 9b19 ldr r3, [sp, #100] ; 0x64
|
|
8010b46: 07da lsls r2, r3, #31
|
|
8010b48: f140 8180 bpl.w 8010e4c <_vfprintf_r+0x8e4>
|
|
8010b4c: 9b17 ldr r3, [sp, #92] ; 0x5c
|
|
8010b4e: 9520 str r5, [sp, #128] ; 0x80
|
|
8010b50: 7bd9 ldrb r1, [r3, #15]
|
|
8010b52: 2030 movs r0, #48 ; 0x30
|
|
8010b54: 9a20 ldr r2, [sp, #128] ; 0x80
|
|
8010b56: 1e53 subs r3, r2, #1
|
|
8010b58: 9320 str r3, [sp, #128] ; 0x80
|
|
8010b5a: f812 3c01 ldrb.w r3, [r2, #-1]
|
|
8010b5e: 428b cmp r3, r1
|
|
8010b60: f000 8163 beq.w 8010e2a <_vfprintf_r+0x8c2>
|
|
8010b64: 2b39 cmp r3, #57 ; 0x39
|
|
8010b66: bf0b itete eq
|
|
8010b68: 9b17 ldreq r3, [sp, #92] ; 0x5c
|
|
8010b6a: 3301 addne r3, #1
|
|
8010b6c: 7a9b ldrbeq r3, [r3, #10]
|
|
8010b6e: b2db uxtbne r3, r3
|
|
8010b70: f802 3c01 strb.w r3, [r2, #-1]
|
|
8010b74: eba5 0308 sub.w r3, r5, r8
|
|
8010b78: 9305 str r3, [sp, #20]
|
|
8010b7a: 9b08 ldr r3, [sp, #32]
|
|
8010b7c: 9d1c ldr r5, [sp, #112] ; 0x70
|
|
8010b7e: 2b47 cmp r3, #71 ; 0x47
|
|
8010b80: f040 81b1 bne.w 8010ee6 <_vfprintf_r+0x97e>
|
|
8010b84: 1ceb adds r3, r5, #3
|
|
8010b86: db03 blt.n 8010b90 <_vfprintf_r+0x628>
|
|
8010b88: 9b04 ldr r3, [sp, #16]
|
|
8010b8a: 42ab cmp r3, r5
|
|
8010b8c: f280 81d6 bge.w 8010f3c <_vfprintf_r+0x9d4>
|
|
8010b90: 9b06 ldr r3, [sp, #24]
|
|
8010b92: 3b02 subs r3, #2
|
|
8010b94: 9306 str r3, [sp, #24]
|
|
8010b96: 9906 ldr r1, [sp, #24]
|
|
8010b98: f89d 2018 ldrb.w r2, [sp, #24]
|
|
8010b9c: f021 0120 bic.w r1, r1, #32
|
|
8010ba0: 2941 cmp r1, #65 ; 0x41
|
|
8010ba2: bf08 it eq
|
|
8010ba4: 320f addeq r2, #15
|
|
8010ba6: f105 33ff add.w r3, r5, #4294967295
|
|
8010baa: bf06 itte eq
|
|
8010bac: b2d2 uxtbeq r2, r2
|
|
8010bae: 2101 moveq r1, #1
|
|
8010bb0: 2100 movne r1, #0
|
|
8010bb2: 2b00 cmp r3, #0
|
|
8010bb4: 931c str r3, [sp, #112] ; 0x70
|
|
8010bb6: bfb8 it lt
|
|
8010bb8: f1c5 0301 rsblt r3, r5, #1
|
|
8010bbc: f88d 2078 strb.w r2, [sp, #120] ; 0x78
|
|
8010bc0: bfb4 ite lt
|
|
8010bc2: 222d movlt r2, #45 ; 0x2d
|
|
8010bc4: 222b movge r2, #43 ; 0x2b
|
|
8010bc6: 2b09 cmp r3, #9
|
|
8010bc8: f88d 2079 strb.w r2, [sp, #121] ; 0x79
|
|
8010bcc: f340 81a4 ble.w 8010f18 <_vfprintf_r+0x9b0>
|
|
8010bd0: f10d 0287 add.w r2, sp, #135 ; 0x87
|
|
8010bd4: 260a movs r6, #10
|
|
8010bd6: 4611 mov r1, r2
|
|
8010bd8: fb93 f5f6 sdiv r5, r3, r6
|
|
8010bdc: fb06 3015 mls r0, r6, r5, r3
|
|
8010be0: 3030 adds r0, #48 ; 0x30
|
|
8010be2: f801 0c01 strb.w r0, [r1, #-1]
|
|
8010be6: 4618 mov r0, r3
|
|
8010be8: 2863 cmp r0, #99 ; 0x63
|
|
8010bea: f102 32ff add.w r2, r2, #4294967295
|
|
8010bee: 462b mov r3, r5
|
|
8010bf0: dcf1 bgt.n 8010bd6 <_vfprintf_r+0x66e>
|
|
8010bf2: 3330 adds r3, #48 ; 0x30
|
|
8010bf4: 1e88 subs r0, r1, #2
|
|
8010bf6: f802 3c01 strb.w r3, [r2, #-1]
|
|
8010bfa: f10d 0587 add.w r5, sp, #135 ; 0x87
|
|
8010bfe: f10d 027a add.w r2, sp, #122 ; 0x7a
|
|
8010c02: 4603 mov r3, r0
|
|
8010c04: 42ab cmp r3, r5
|
|
8010c06: f0c0 8182 bcc.w 8010f0e <_vfprintf_r+0x9a6>
|
|
8010c0a: f10d 0289 add.w r2, sp, #137 ; 0x89
|
|
8010c0e: 1a52 subs r2, r2, r1
|
|
8010c10: 42a8 cmp r0, r5
|
|
8010c12: bf88 it hi
|
|
8010c14: 2200 movhi r2, #0
|
|
8010c16: f10d 037a add.w r3, sp, #122 ; 0x7a
|
|
8010c1a: 441a add r2, r3
|
|
8010c1c: ab1e add r3, sp, #120 ; 0x78
|
|
8010c1e: 1ad3 subs r3, r2, r3
|
|
8010c20: 9a05 ldr r2, [sp, #20]
|
|
8010c22: 9315 str r3, [sp, #84] ; 0x54
|
|
8010c24: 2a01 cmp r2, #1
|
|
8010c26: 4413 add r3, r2
|
|
8010c28: 9304 str r3, [sp, #16]
|
|
8010c2a: dc02 bgt.n 8010c32 <_vfprintf_r+0x6ca>
|
|
8010c2c: f01b 0f01 tst.w fp, #1
|
|
8010c30: d003 beq.n 8010c3a <_vfprintf_r+0x6d2>
|
|
8010c32: 9b04 ldr r3, [sp, #16]
|
|
8010c34: 9a0e ldr r2, [sp, #56] ; 0x38
|
|
8010c36: 4413 add r3, r2
|
|
8010c38: 9304 str r3, [sp, #16]
|
|
8010c3a: f42b 6380 bic.w r3, fp, #1024 ; 0x400
|
|
8010c3e: f443 7380 orr.w r3, r3, #256 ; 0x100
|
|
8010c42: 9311 str r3, [sp, #68] ; 0x44
|
|
8010c44: 2300 movs r3, #0
|
|
8010c46: e9cd 3308 strd r3, r3, [sp, #32]
|
|
8010c4a: 461d mov r5, r3
|
|
8010c4c: 9b18 ldr r3, [sp, #96] ; 0x60
|
|
8010c4e: b113 cbz r3, 8010c56 <_vfprintf_r+0x6ee>
|
|
8010c50: 232d movs r3, #45 ; 0x2d
|
|
8010c52: f88d 306b strb.w r3, [sp, #107] ; 0x6b
|
|
8010c56: f8dd b044 ldr.w fp, [sp, #68] ; 0x44
|
|
8010c5a: 2600 movs r6, #0
|
|
8010c5c: 9b04 ldr r3, [sp, #16]
|
|
8010c5e: 42b3 cmp r3, r6
|
|
8010c60: bfb8 it lt
|
|
8010c62: 4633 movlt r3, r6
|
|
8010c64: 9311 str r3, [sp, #68] ; 0x44
|
|
8010c66: f89d 306b ldrb.w r3, [sp, #107] ; 0x6b
|
|
8010c6a: b113 cbz r3, 8010c72 <_vfprintf_r+0x70a>
|
|
8010c6c: 9b11 ldr r3, [sp, #68] ; 0x44
|
|
8010c6e: 3301 adds r3, #1
|
|
8010c70: 9311 str r3, [sp, #68] ; 0x44
|
|
8010c72: f01b 0302 ands.w r3, fp, #2
|
|
8010c76: 9317 str r3, [sp, #92] ; 0x5c
|
|
8010c78: bf1e ittt ne
|
|
8010c7a: 9b11 ldrne r3, [sp, #68] ; 0x44
|
|
8010c7c: 3302 addne r3, #2
|
|
8010c7e: 9311 strne r3, [sp, #68] ; 0x44
|
|
8010c80: f01b 0384 ands.w r3, fp, #132 ; 0x84
|
|
8010c84: 9318 str r3, [sp, #96] ; 0x60
|
|
8010c86: d11f bne.n 8010cc8 <_vfprintf_r+0x760>
|
|
8010c88: e9dd 3210 ldrd r3, r2, [sp, #64] ; 0x40
|
|
8010c8c: 1a9f subs r7, r3, r2
|
|
8010c8e: 2f00 cmp r7, #0
|
|
8010c90: dd1a ble.n 8010cc8 <_vfprintf_r+0x760>
|
|
8010c92: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
|
|
8010c96: 4836 ldr r0, [pc, #216] ; (8010d70 <_vfprintf_r+0x808>)
|
|
8010c98: 6020 str r0, [r4, #0]
|
|
8010c9a: 2f10 cmp r7, #16
|
|
8010c9c: f103 0301 add.w r3, r3, #1
|
|
8010ca0: f104 0108 add.w r1, r4, #8
|
|
8010ca4: f300 82ee bgt.w 8011284 <_vfprintf_r+0xd1c>
|
|
8010ca8: 443a add r2, r7
|
|
8010caa: 2b07 cmp r3, #7
|
|
8010cac: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
|
|
8010cb0: 6067 str r7, [r4, #4]
|
|
8010cb2: f340 82fa ble.w 80112aa <_vfprintf_r+0xd42>
|
|
8010cb6: aa22 add r2, sp, #136 ; 0x88
|
|
8010cb8: 4649 mov r1, r9
|
|
8010cba: 4650 mov r0, sl
|
|
8010cbc: f002 fea7 bl 8013a0e <__sprint_r>
|
|
8010cc0: 2800 cmp r0, #0
|
|
8010cc2: f040 8625 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
8010cc6: ac25 add r4, sp, #148 ; 0x94
|
|
8010cc8: f89d 306b ldrb.w r3, [sp, #107] ; 0x6b
|
|
8010ccc: b173 cbz r3, 8010cec <_vfprintf_r+0x784>
|
|
8010cce: f10d 036b add.w r3, sp, #107 ; 0x6b
|
|
8010cd2: 6023 str r3, [r4, #0]
|
|
8010cd4: 2301 movs r3, #1
|
|
8010cd6: 6063 str r3, [r4, #4]
|
|
8010cd8: 9b24 ldr r3, [sp, #144] ; 0x90
|
|
8010cda: 3301 adds r3, #1
|
|
8010cdc: 9324 str r3, [sp, #144] ; 0x90
|
|
8010cde: 9b23 ldr r3, [sp, #140] ; 0x8c
|
|
8010ce0: 3301 adds r3, #1
|
|
8010ce2: 2b07 cmp r3, #7
|
|
8010ce4: 9323 str r3, [sp, #140] ; 0x8c
|
|
8010ce6: f300 82e2 bgt.w 80112ae <_vfprintf_r+0xd46>
|
|
8010cea: 3408 adds r4, #8
|
|
8010cec: 9b17 ldr r3, [sp, #92] ; 0x5c
|
|
8010cee: b16b cbz r3, 8010d0c <_vfprintf_r+0x7a4>
|
|
8010cf0: ab1b add r3, sp, #108 ; 0x6c
|
|
8010cf2: 6023 str r3, [r4, #0]
|
|
8010cf4: 2302 movs r3, #2
|
|
8010cf6: 6063 str r3, [r4, #4]
|
|
8010cf8: 9b24 ldr r3, [sp, #144] ; 0x90
|
|
8010cfa: 3302 adds r3, #2
|
|
8010cfc: 9324 str r3, [sp, #144] ; 0x90
|
|
8010cfe: 9b23 ldr r3, [sp, #140] ; 0x8c
|
|
8010d00: 3301 adds r3, #1
|
|
8010d02: 2b07 cmp r3, #7
|
|
8010d04: 9323 str r3, [sp, #140] ; 0x8c
|
|
8010d06: f300 82dc bgt.w 80112c2 <_vfprintf_r+0xd5a>
|
|
8010d0a: 3408 adds r4, #8
|
|
8010d0c: 9b18 ldr r3, [sp, #96] ; 0x60
|
|
8010d0e: 2b80 cmp r3, #128 ; 0x80
|
|
8010d10: d11f bne.n 8010d52 <_vfprintf_r+0x7ea>
|
|
8010d12: e9dd 3210 ldrd r3, r2, [sp, #64] ; 0x40
|
|
8010d16: 1a9f subs r7, r3, r2
|
|
8010d18: 2f00 cmp r7, #0
|
|
8010d1a: dd1a ble.n 8010d52 <_vfprintf_r+0x7ea>
|
|
8010d1c: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
|
|
8010d20: 4814 ldr r0, [pc, #80] ; (8010d74 <_vfprintf_r+0x80c>)
|
|
8010d22: 6020 str r0, [r4, #0]
|
|
8010d24: 2f10 cmp r7, #16
|
|
8010d26: f103 0301 add.w r3, r3, #1
|
|
8010d2a: f104 0108 add.w r1, r4, #8
|
|
8010d2e: f300 82d2 bgt.w 80112d6 <_vfprintf_r+0xd6e>
|
|
8010d32: 6067 str r7, [r4, #4]
|
|
8010d34: 2b07 cmp r3, #7
|
|
8010d36: 4417 add r7, r2
|
|
8010d38: e9cd 3723 strd r3, r7, [sp, #140] ; 0x8c
|
|
8010d3c: f340 82de ble.w 80112fc <_vfprintf_r+0xd94>
|
|
8010d40: aa22 add r2, sp, #136 ; 0x88
|
|
8010d42: 4649 mov r1, r9
|
|
8010d44: 4650 mov r0, sl
|
|
8010d46: f002 fe62 bl 8013a0e <__sprint_r>
|
|
8010d4a: 2800 cmp r0, #0
|
|
8010d4c: f040 85e0 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
8010d50: ac25 add r4, sp, #148 ; 0x94
|
|
8010d52: 9b04 ldr r3, [sp, #16]
|
|
8010d54: 1af6 subs r6, r6, r3
|
|
8010d56: 2e00 cmp r6, #0
|
|
8010d58: dd28 ble.n 8010dac <_vfprintf_r+0x844>
|
|
8010d5a: 4f06 ldr r7, [pc, #24] ; (8010d74 <_vfprintf_r+0x80c>)
|
|
8010d5c: e00c b.n 8010d78 <_vfprintf_r+0x810>
|
|
8010d5e: bf00 nop
|
|
8010d60: 08018079 .word 0x08018079
|
|
8010d64: 08018068 .word 0x08018068
|
|
8010d68: 40300000 .word 0x40300000
|
|
8010d6c: 3fe00000 .word 0x3fe00000
|
|
8010d70: 0801808c .word 0x0801808c
|
|
8010d74: 0801809c .word 0x0801809c
|
|
8010d78: 6027 str r7, [r4, #0]
|
|
8010d7a: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
|
|
8010d7e: 2e10 cmp r6, #16
|
|
8010d80: f103 0301 add.w r3, r3, #1
|
|
8010d84: f104 0108 add.w r1, r4, #8
|
|
8010d88: f300 82ba bgt.w 8011300 <_vfprintf_r+0xd98>
|
|
8010d8c: 6066 str r6, [r4, #4]
|
|
8010d8e: 2b07 cmp r3, #7
|
|
8010d90: 4416 add r6, r2
|
|
8010d92: e9cd 3623 strd r3, r6, [sp, #140] ; 0x8c
|
|
8010d96: f340 82c6 ble.w 8011326 <_vfprintf_r+0xdbe>
|
|
8010d9a: aa22 add r2, sp, #136 ; 0x88
|
|
8010d9c: 4649 mov r1, r9
|
|
8010d9e: 4650 mov r0, sl
|
|
8010da0: f002 fe35 bl 8013a0e <__sprint_r>
|
|
8010da4: 2800 cmp r0, #0
|
|
8010da6: f040 85b3 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
8010daa: ac25 add r4, sp, #148 ; 0x94
|
|
8010dac: f41b 7f80 tst.w fp, #256 ; 0x100
|
|
8010db0: 9e24 ldr r6, [sp, #144] ; 0x90
|
|
8010db2: f040 82bf bne.w 8011334 <_vfprintf_r+0xdcc>
|
|
8010db6: 9b04 ldr r3, [sp, #16]
|
|
8010db8: f8c4 8000 str.w r8, [r4]
|
|
8010dbc: 441e add r6, r3
|
|
8010dbe: 6063 str r3, [r4, #4]
|
|
8010dc0: 9624 str r6, [sp, #144] ; 0x90
|
|
8010dc2: 9b23 ldr r3, [sp, #140] ; 0x8c
|
|
8010dc4: 3301 adds r3, #1
|
|
8010dc6: 2b07 cmp r3, #7
|
|
8010dc8: 9323 str r3, [sp, #140] ; 0x8c
|
|
8010dca: f300 82f8 bgt.w 80113be <_vfprintf_r+0xe56>
|
|
8010dce: 3408 adds r4, #8
|
|
8010dd0: f01b 0f04 tst.w fp, #4
|
|
8010dd4: f040 857e bne.w 80118d4 <_vfprintf_r+0x136c>
|
|
8010dd8: e9dd 320f ldrd r3, r2, [sp, #60] ; 0x3c
|
|
8010ddc: 9911 ldr r1, [sp, #68] ; 0x44
|
|
8010dde: 428a cmp r2, r1
|
|
8010de0: bfac ite ge
|
|
8010de2: 189b addge r3, r3, r2
|
|
8010de4: 185b addlt r3, r3, r1
|
|
8010de6: 930f str r3, [sp, #60] ; 0x3c
|
|
8010de8: 9b24 ldr r3, [sp, #144] ; 0x90
|
|
8010dea: b13b cbz r3, 8010dfc <_vfprintf_r+0x894>
|
|
8010dec: aa22 add r2, sp, #136 ; 0x88
|
|
8010dee: 4649 mov r1, r9
|
|
8010df0: 4650 mov r0, sl
|
|
8010df2: f002 fe0c bl 8013a0e <__sprint_r>
|
|
8010df6: 2800 cmp r0, #0
|
|
8010df8: f040 858a bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
8010dfc: 2300 movs r3, #0
|
|
8010dfe: 9323 str r3, [sp, #140] ; 0x8c
|
|
8010e00: 9b03 ldr r3, [sp, #12]
|
|
8010e02: 2b00 cmp r3, #0
|
|
8010e04: f040 85a0 bne.w 8011948 <_vfprintf_r+0x13e0>
|
|
8010e08: ac25 add r4, sp, #148 ; 0x94
|
|
8010e0a: e0ec b.n 8010fe6 <_vfprintf_r+0xa7e>
|
|
8010e0c: 9003 str r0, [sp, #12]
|
|
8010e0e: e62c b.n 8010a6a <_vfprintf_r+0x502>
|
|
8010e10: 9003 str r0, [sp, #12]
|
|
8010e12: 2306 movs r3, #6
|
|
8010e14: e619 b.n 8010a4a <_vfprintf_r+0x4e2>
|
|
8010e16: 9003 str r0, [sp, #12]
|
|
8010e18: e627 b.n 8010a6a <_vfprintf_r+0x502>
|
|
8010e1a: ed9d 7b0c vldr d7, [sp, #48] ; 0x30
|
|
8010e1e: 2300 movs r3, #0
|
|
8010e20: eeb0 8a47 vmov.f32 s16, s14
|
|
8010e24: eef0 8a67 vmov.f32 s17, s15
|
|
8010e28: e62f b.n 8010a8a <_vfprintf_r+0x522>
|
|
8010e2a: f802 0c01 strb.w r0, [r2, #-1]
|
|
8010e2e: e691 b.n 8010b54 <_vfprintf_r+0x5ec>
|
|
8010e30: f803 0b01 strb.w r0, [r3], #1
|
|
8010e34: 1aca subs r2, r1, r3
|
|
8010e36: 2a00 cmp r2, #0
|
|
8010e38: dafa bge.n 8010e30 <_vfprintf_r+0x8c8>
|
|
8010e3a: 9a09 ldr r2, [sp, #36] ; 0x24
|
|
8010e3c: 9b09 ldr r3, [sp, #36] ; 0x24
|
|
8010e3e: 3201 adds r2, #1
|
|
8010e40: f103 0301 add.w r3, r3, #1
|
|
8010e44: bfb8 it lt
|
|
8010e46: 2300 movlt r3, #0
|
|
8010e48: 441d add r5, r3
|
|
8010e4a: e693 b.n 8010b74 <_vfprintf_r+0x60c>
|
|
8010e4c: 9a09 ldr r2, [sp, #36] ; 0x24
|
|
8010e4e: 462b mov r3, r5
|
|
8010e50: 18a9 adds r1, r5, r2
|
|
8010e52: 2030 movs r0, #48 ; 0x30
|
|
8010e54: e7ee b.n 8010e34 <_vfprintf_r+0x8cc>
|
|
8010e56: 9b08 ldr r3, [sp, #32]
|
|
8010e58: 2b46 cmp r3, #70 ; 0x46
|
|
8010e5a: d005 beq.n 8010e68 <_vfprintf_r+0x900>
|
|
8010e5c: 2b45 cmp r3, #69 ; 0x45
|
|
8010e5e: d11b bne.n 8010e98 <_vfprintf_r+0x930>
|
|
8010e60: 9b04 ldr r3, [sp, #16]
|
|
8010e62: 1c5d adds r5, r3, #1
|
|
8010e64: 2102 movs r1, #2
|
|
8010e66: e001 b.n 8010e6c <_vfprintf_r+0x904>
|
|
8010e68: 9d04 ldr r5, [sp, #16]
|
|
8010e6a: 2103 movs r1, #3
|
|
8010e6c: ab20 add r3, sp, #128 ; 0x80
|
|
8010e6e: 9301 str r3, [sp, #4]
|
|
8010e70: ab1d add r3, sp, #116 ; 0x74
|
|
8010e72: 9300 str r3, [sp, #0]
|
|
8010e74: 462a mov r2, r5
|
|
8010e76: ab1c add r3, sp, #112 ; 0x70
|
|
8010e78: 4650 mov r0, sl
|
|
8010e7a: eeb0 0a48 vmov.f32 s0, s16
|
|
8010e7e: eef0 0a68 vmov.f32 s1, s17
|
|
8010e82: f000 fee1 bl 8011c48 <_dtoa_r>
|
|
8010e86: 9b08 ldr r3, [sp, #32]
|
|
8010e88: 2b47 cmp r3, #71 ; 0x47
|
|
8010e8a: 4680 mov r8, r0
|
|
8010e8c: d106 bne.n 8010e9c <_vfprintf_r+0x934>
|
|
8010e8e: f01b 0f01 tst.w fp, #1
|
|
8010e92: d103 bne.n 8010e9c <_vfprintf_r+0x934>
|
|
8010e94: 9d20 ldr r5, [sp, #128] ; 0x80
|
|
8010e96: e66d b.n 8010b74 <_vfprintf_r+0x60c>
|
|
8010e98: 9d04 ldr r5, [sp, #16]
|
|
8010e9a: e7e3 b.n 8010e64 <_vfprintf_r+0x8fc>
|
|
8010e9c: 9b08 ldr r3, [sp, #32]
|
|
8010e9e: 2b46 cmp r3, #70 ; 0x46
|
|
8010ea0: eb08 0605 add.w r6, r8, r5
|
|
8010ea4: d10f bne.n 8010ec6 <_vfprintf_r+0x95e>
|
|
8010ea6: f898 3000 ldrb.w r3, [r8]
|
|
8010eaa: 2b30 cmp r3, #48 ; 0x30
|
|
8010eac: d109 bne.n 8010ec2 <_vfprintf_r+0x95a>
|
|
8010eae: ec51 0b18 vmov r0, r1, d8
|
|
8010eb2: 2200 movs r2, #0
|
|
8010eb4: 2300 movs r3, #0
|
|
8010eb6: f7ef fe17 bl 8000ae8 <__aeabi_dcmpeq>
|
|
8010eba: b910 cbnz r0, 8010ec2 <_vfprintf_r+0x95a>
|
|
8010ebc: f1c5 0501 rsb r5, r5, #1
|
|
8010ec0: 951c str r5, [sp, #112] ; 0x70
|
|
8010ec2: 9b1c ldr r3, [sp, #112] ; 0x70
|
|
8010ec4: 441e add r6, r3
|
|
8010ec6: ec51 0b18 vmov r0, r1, d8
|
|
8010eca: 2200 movs r2, #0
|
|
8010ecc: 2300 movs r3, #0
|
|
8010ece: f7ef fe0b bl 8000ae8 <__aeabi_dcmpeq>
|
|
8010ed2: b100 cbz r0, 8010ed6 <_vfprintf_r+0x96e>
|
|
8010ed4: 9620 str r6, [sp, #128] ; 0x80
|
|
8010ed6: 2230 movs r2, #48 ; 0x30
|
|
8010ed8: 9b20 ldr r3, [sp, #128] ; 0x80
|
|
8010eda: 429e cmp r6, r3
|
|
8010edc: d9da bls.n 8010e94 <_vfprintf_r+0x92c>
|
|
8010ede: 1c59 adds r1, r3, #1
|
|
8010ee0: 9120 str r1, [sp, #128] ; 0x80
|
|
8010ee2: 701a strb r2, [r3, #0]
|
|
8010ee4: e7f8 b.n 8010ed8 <_vfprintf_r+0x970>
|
|
8010ee6: 9b08 ldr r3, [sp, #32]
|
|
8010ee8: 2b46 cmp r3, #70 ; 0x46
|
|
8010eea: f47f ae54 bne.w 8010b96 <_vfprintf_r+0x62e>
|
|
8010eee: 9a04 ldr r2, [sp, #16]
|
|
8010ef0: f00b 0301 and.w r3, fp, #1
|
|
8010ef4: 2d00 cmp r5, #0
|
|
8010ef6: ea43 0302 orr.w r3, r3, r2
|
|
8010efa: dd1a ble.n 8010f32 <_vfprintf_r+0x9ca>
|
|
8010efc: 2b00 cmp r3, #0
|
|
8010efe: d034 beq.n 8010f6a <_vfprintf_r+0xa02>
|
|
8010f00: 9b0e ldr r3, [sp, #56] ; 0x38
|
|
8010f02: 18eb adds r3, r5, r3
|
|
8010f04: 441a add r2, r3
|
|
8010f06: 9204 str r2, [sp, #16]
|
|
8010f08: 2366 movs r3, #102 ; 0x66
|
|
8010f0a: 9306 str r3, [sp, #24]
|
|
8010f0c: e033 b.n 8010f76 <_vfprintf_r+0xa0e>
|
|
8010f0e: f813 6b01 ldrb.w r6, [r3], #1
|
|
8010f12: f802 6b01 strb.w r6, [r2], #1
|
|
8010f16: e675 b.n 8010c04 <_vfprintf_r+0x69c>
|
|
8010f18: b941 cbnz r1, 8010f2c <_vfprintf_r+0x9c4>
|
|
8010f1a: 2230 movs r2, #48 ; 0x30
|
|
8010f1c: f88d 207a strb.w r2, [sp, #122] ; 0x7a
|
|
8010f20: f10d 027b add.w r2, sp, #123 ; 0x7b
|
|
8010f24: 3330 adds r3, #48 ; 0x30
|
|
8010f26: f802 3b01 strb.w r3, [r2], #1
|
|
8010f2a: e677 b.n 8010c1c <_vfprintf_r+0x6b4>
|
|
8010f2c: f10d 027a add.w r2, sp, #122 ; 0x7a
|
|
8010f30: e7f8 b.n 8010f24 <_vfprintf_r+0x9bc>
|
|
8010f32: b1e3 cbz r3, 8010f6e <_vfprintf_r+0xa06>
|
|
8010f34: 9b0e ldr r3, [sp, #56] ; 0x38
|
|
8010f36: 9a04 ldr r2, [sp, #16]
|
|
8010f38: 3301 adds r3, #1
|
|
8010f3a: e7e3 b.n 8010f04 <_vfprintf_r+0x99c>
|
|
8010f3c: 9b05 ldr r3, [sp, #20]
|
|
8010f3e: 42ab cmp r3, r5
|
|
8010f40: dc07 bgt.n 8010f52 <_vfprintf_r+0x9ea>
|
|
8010f42: f01b 0f01 tst.w fp, #1
|
|
8010f46: d02d beq.n 8010fa4 <_vfprintf_r+0xa3c>
|
|
8010f48: 9b0e ldr r3, [sp, #56] ; 0x38
|
|
8010f4a: 18eb adds r3, r5, r3
|
|
8010f4c: 9304 str r3, [sp, #16]
|
|
8010f4e: 2367 movs r3, #103 ; 0x67
|
|
8010f50: e7db b.n 8010f0a <_vfprintf_r+0x9a2>
|
|
8010f52: 9b05 ldr r3, [sp, #20]
|
|
8010f54: 9a0e ldr r2, [sp, #56] ; 0x38
|
|
8010f56: 2d00 cmp r5, #0
|
|
8010f58: 4413 add r3, r2
|
|
8010f5a: 9304 str r3, [sp, #16]
|
|
8010f5c: dcf7 bgt.n 8010f4e <_vfprintf_r+0x9e6>
|
|
8010f5e: 9a04 ldr r2, [sp, #16]
|
|
8010f60: f1c5 0301 rsb r3, r5, #1
|
|
8010f64: 441a add r2, r3
|
|
8010f66: 9204 str r2, [sp, #16]
|
|
8010f68: e7f1 b.n 8010f4e <_vfprintf_r+0x9e6>
|
|
8010f6a: 9504 str r5, [sp, #16]
|
|
8010f6c: e7cc b.n 8010f08 <_vfprintf_r+0x9a0>
|
|
8010f6e: 2366 movs r3, #102 ; 0x66
|
|
8010f70: 9306 str r3, [sp, #24]
|
|
8010f72: 2301 movs r3, #1
|
|
8010f74: 9304 str r3, [sp, #16]
|
|
8010f76: f41b 6380 ands.w r3, fp, #1024 ; 0x400
|
|
8010f7a: 9309 str r3, [sp, #36] ; 0x24
|
|
8010f7c: d025 beq.n 8010fca <_vfprintf_r+0xa62>
|
|
8010f7e: 2300 movs r3, #0
|
|
8010f80: 2d00 cmp r5, #0
|
|
8010f82: e9cd 3308 strd r3, r3, [sp, #32]
|
|
8010f86: f77f ae61 ble.w 8010c4c <_vfprintf_r+0x6e4>
|
|
8010f8a: 9b0a ldr r3, [sp, #40] ; 0x28
|
|
8010f8c: 781b ldrb r3, [r3, #0]
|
|
8010f8e: 2bff cmp r3, #255 ; 0xff
|
|
8010f90: d10a bne.n 8010fa8 <_vfprintf_r+0xa40>
|
|
8010f92: e9dd 2308 ldrd r2, r3, [sp, #32]
|
|
8010f96: 9912 ldr r1, [sp, #72] ; 0x48
|
|
8010f98: 4413 add r3, r2
|
|
8010f9a: 9a04 ldr r2, [sp, #16]
|
|
8010f9c: fb01 2303 mla r3, r1, r3, r2
|
|
8010fa0: 9304 str r3, [sp, #16]
|
|
8010fa2: e653 b.n 8010c4c <_vfprintf_r+0x6e4>
|
|
8010fa4: 9504 str r5, [sp, #16]
|
|
8010fa6: e7d2 b.n 8010f4e <_vfprintf_r+0x9e6>
|
|
8010fa8: 42ab cmp r3, r5
|
|
8010faa: daf2 bge.n 8010f92 <_vfprintf_r+0xa2a>
|
|
8010fac: 1aed subs r5, r5, r3
|
|
8010fae: 9b0a ldr r3, [sp, #40] ; 0x28
|
|
8010fb0: 785b ldrb r3, [r3, #1]
|
|
8010fb2: b133 cbz r3, 8010fc2 <_vfprintf_r+0xa5a>
|
|
8010fb4: 9b09 ldr r3, [sp, #36] ; 0x24
|
|
8010fb6: 3301 adds r3, #1
|
|
8010fb8: 9309 str r3, [sp, #36] ; 0x24
|
|
8010fba: 9b0a ldr r3, [sp, #40] ; 0x28
|
|
8010fbc: 3301 adds r3, #1
|
|
8010fbe: 930a str r3, [sp, #40] ; 0x28
|
|
8010fc0: e7e3 b.n 8010f8a <_vfprintf_r+0xa22>
|
|
8010fc2: 9b08 ldr r3, [sp, #32]
|
|
8010fc4: 3301 adds r3, #1
|
|
8010fc6: 9308 str r3, [sp, #32]
|
|
8010fc8: e7df b.n 8010f8a <_vfprintf_r+0xa22>
|
|
8010fca: 9b09 ldr r3, [sp, #36] ; 0x24
|
|
8010fcc: 9308 str r3, [sp, #32]
|
|
8010fce: e63d b.n 8010c4c <_vfprintf_r+0x6e4>
|
|
8010fd0: 1d33 adds r3, r6, #4
|
|
8010fd2: f01b 0f20 tst.w fp, #32
|
|
8010fd6: 9307 str r3, [sp, #28]
|
|
8010fd8: d00a beq.n 8010ff0 <_vfprintf_r+0xa88>
|
|
8010fda: 9a0f ldr r2, [sp, #60] ; 0x3c
|
|
8010fdc: 6833 ldr r3, [r6, #0]
|
|
8010fde: 990f ldr r1, [sp, #60] ; 0x3c
|
|
8010fe0: 17d2 asrs r2, r2, #31
|
|
8010fe2: e9c3 1200 strd r1, r2, [r3]
|
|
8010fe6: 9e07 ldr r6, [sp, #28]
|
|
8010fe8: f8dd 802c ldr.w r8, [sp, #44] ; 0x2c
|
|
8010fec: f7ff bb42 b.w 8010674 <_vfprintf_r+0x10c>
|
|
8010ff0: f01b 0f10 tst.w fp, #16
|
|
8010ff4: d003 beq.n 8010ffe <_vfprintf_r+0xa96>
|
|
8010ff6: 6833 ldr r3, [r6, #0]
|
|
8010ff8: 9a0f ldr r2, [sp, #60] ; 0x3c
|
|
8010ffa: 601a str r2, [r3, #0]
|
|
8010ffc: e7f3 b.n 8010fe6 <_vfprintf_r+0xa7e>
|
|
8010ffe: f01b 0f40 tst.w fp, #64 ; 0x40
|
|
8011002: d003 beq.n 801100c <_vfprintf_r+0xaa4>
|
|
8011004: 6833 ldr r3, [r6, #0]
|
|
8011006: 9a0f ldr r2, [sp, #60] ; 0x3c
|
|
8011008: 801a strh r2, [r3, #0]
|
|
801100a: e7ec b.n 8010fe6 <_vfprintf_r+0xa7e>
|
|
801100c: f41b 7f00 tst.w fp, #512 ; 0x200
|
|
8011010: d0f1 beq.n 8010ff6 <_vfprintf_r+0xa8e>
|
|
8011012: 6833 ldr r3, [r6, #0]
|
|
8011014: 9a0f ldr r2, [sp, #60] ; 0x3c
|
|
8011016: 701a strb r2, [r3, #0]
|
|
8011018: e7e5 b.n 8010fe6 <_vfprintf_r+0xa7e>
|
|
801101a: f04b 0b10 orr.w fp, fp, #16
|
|
801101e: f01b 0320 ands.w r3, fp, #32
|
|
8011022: d01f beq.n 8011064 <_vfprintf_r+0xafc>
|
|
8011024: 3607 adds r6, #7
|
|
8011026: f026 0307 bic.w r3, r6, #7
|
|
801102a: 461a mov r2, r3
|
|
801102c: 685d ldr r5, [r3, #4]
|
|
801102e: f852 6b08 ldr.w r6, [r2], #8
|
|
8011032: 9207 str r2, [sp, #28]
|
|
8011034: f42b 6b80 bic.w fp, fp, #1024 ; 0x400
|
|
8011038: 2300 movs r3, #0
|
|
801103a: 2200 movs r2, #0
|
|
801103c: f88d 206b strb.w r2, [sp, #107] ; 0x6b
|
|
8011040: 9a04 ldr r2, [sp, #16]
|
|
8011042: 3201 adds r2, #1
|
|
8011044: f000 8495 beq.w 8011972 <_vfprintf_r+0x140a>
|
|
8011048: ea56 0205 orrs.w r2, r6, r5
|
|
801104c: f02b 0780 bic.w r7, fp, #128 ; 0x80
|
|
8011050: f040 8494 bne.w 801197c <_vfprintf_r+0x1414>
|
|
8011054: 9a04 ldr r2, [sp, #16]
|
|
8011056: 2a00 cmp r2, #0
|
|
8011058: f000 80fa beq.w 8011250 <_vfprintf_r+0xce8>
|
|
801105c: 2b01 cmp r3, #1
|
|
801105e: f040 8490 bne.w 8011982 <_vfprintf_r+0x141a>
|
|
8011062: e09f b.n 80111a4 <_vfprintf_r+0xc3c>
|
|
8011064: 4632 mov r2, r6
|
|
8011066: f01b 0510 ands.w r5, fp, #16
|
|
801106a: f852 6b04 ldr.w r6, [r2], #4
|
|
801106e: 9207 str r2, [sp, #28]
|
|
8011070: d001 beq.n 8011076 <_vfprintf_r+0xb0e>
|
|
8011072: 461d mov r5, r3
|
|
8011074: e7de b.n 8011034 <_vfprintf_r+0xacc>
|
|
8011076: f01b 0340 ands.w r3, fp, #64 ; 0x40
|
|
801107a: d001 beq.n 8011080 <_vfprintf_r+0xb18>
|
|
801107c: b2b6 uxth r6, r6
|
|
801107e: e7d9 b.n 8011034 <_vfprintf_r+0xacc>
|
|
8011080: f41b 7500 ands.w r5, fp, #512 ; 0x200
|
|
8011084: d0d6 beq.n 8011034 <_vfprintf_r+0xacc>
|
|
8011086: b2f6 uxtb r6, r6
|
|
8011088: e7f3 b.n 8011072 <_vfprintf_r+0xb0a>
|
|
801108a: 4633 mov r3, r6
|
|
801108c: 2278 movs r2, #120 ; 0x78
|
|
801108e: f853 6b04 ldr.w r6, [r3], #4
|
|
8011092: 9307 str r3, [sp, #28]
|
|
8011094: 2330 movs r3, #48 ; 0x30
|
|
8011096: f88d 306c strb.w r3, [sp, #108] ; 0x6c
|
|
801109a: 4ba4 ldr r3, [pc, #656] ; (801132c <_vfprintf_r+0xdc4>)
|
|
801109c: 9316 str r3, [sp, #88] ; 0x58
|
|
801109e: 2500 movs r5, #0
|
|
80110a0: f04b 0b02 orr.w fp, fp, #2
|
|
80110a4: f88d 206d strb.w r2, [sp, #109] ; 0x6d
|
|
80110a8: 2302 movs r3, #2
|
|
80110aa: 9206 str r2, [sp, #24]
|
|
80110ac: e7c5 b.n 801103a <_vfprintf_r+0xad2>
|
|
80110ae: 4633 mov r3, r6
|
|
80110b0: 2500 movs r5, #0
|
|
80110b2: f853 8b04 ldr.w r8, [r3], #4
|
|
80110b6: 9307 str r3, [sp, #28]
|
|
80110b8: 9b04 ldr r3, [sp, #16]
|
|
80110ba: f88d 506b strb.w r5, [sp, #107] ; 0x6b
|
|
80110be: 1c5e adds r6, r3, #1
|
|
80110c0: d010 beq.n 80110e4 <_vfprintf_r+0xb7c>
|
|
80110c2: 461a mov r2, r3
|
|
80110c4: 4629 mov r1, r5
|
|
80110c6: 4640 mov r0, r8
|
|
80110c8: f7ef f89a bl 8000200 <memchr>
|
|
80110cc: 9003 str r0, [sp, #12]
|
|
80110ce: 2800 cmp r0, #0
|
|
80110d0: f000 80d5 beq.w 801127e <_vfprintf_r+0xd16>
|
|
80110d4: eba0 0308 sub.w r3, r0, r8
|
|
80110d8: e9cd 5303 strd r5, r3, [sp, #12]
|
|
80110dc: e9cd 5508 strd r5, r5, [sp, #32]
|
|
80110e0: 462e mov r6, r5
|
|
80110e2: e5bb b.n 8010c5c <_vfprintf_r+0x6f4>
|
|
80110e4: 4640 mov r0, r8
|
|
80110e6: f7ef f883 bl 80001f0 <strlen>
|
|
80110ea: e9cd 5003 strd r5, r0, [sp, #12]
|
|
80110ee: e455 b.n 801099c <_vfprintf_r+0x434>
|
|
80110f0: f04b 0b10 orr.w fp, fp, #16
|
|
80110f4: f01b 0320 ands.w r3, fp, #32
|
|
80110f8: d009 beq.n 801110e <_vfprintf_r+0xba6>
|
|
80110fa: 3607 adds r6, #7
|
|
80110fc: f026 0307 bic.w r3, r6, #7
|
|
8011100: 461a mov r2, r3
|
|
8011102: 685d ldr r5, [r3, #4]
|
|
8011104: f852 6b08 ldr.w r6, [r2], #8
|
|
8011108: 9207 str r2, [sp, #28]
|
|
801110a: 2301 movs r3, #1
|
|
801110c: e795 b.n 801103a <_vfprintf_r+0xad2>
|
|
801110e: 4632 mov r2, r6
|
|
8011110: f01b 0510 ands.w r5, fp, #16
|
|
8011114: f852 6b04 ldr.w r6, [r2], #4
|
|
8011118: 9207 str r2, [sp, #28]
|
|
801111a: d001 beq.n 8011120 <_vfprintf_r+0xbb8>
|
|
801111c: 461d mov r5, r3
|
|
801111e: e7f4 b.n 801110a <_vfprintf_r+0xba2>
|
|
8011120: f01b 0340 ands.w r3, fp, #64 ; 0x40
|
|
8011124: d001 beq.n 801112a <_vfprintf_r+0xbc2>
|
|
8011126: b2b6 uxth r6, r6
|
|
8011128: e7ef b.n 801110a <_vfprintf_r+0xba2>
|
|
801112a: f41b 7500 ands.w r5, fp, #512 ; 0x200
|
|
801112e: d0ec beq.n 801110a <_vfprintf_r+0xba2>
|
|
8011130: b2f6 uxtb r6, r6
|
|
8011132: e7f3 b.n 801111c <_vfprintf_r+0xbb4>
|
|
8011134: 4b7e ldr r3, [pc, #504] ; (8011330 <_vfprintf_r+0xdc8>)
|
|
8011136: 9316 str r3, [sp, #88] ; 0x58
|
|
8011138: f01b 0320 ands.w r3, fp, #32
|
|
801113c: d01b beq.n 8011176 <_vfprintf_r+0xc0e>
|
|
801113e: 3607 adds r6, #7
|
|
8011140: f026 0307 bic.w r3, r6, #7
|
|
8011144: 461a mov r2, r3
|
|
8011146: 685d ldr r5, [r3, #4]
|
|
8011148: f852 6b08 ldr.w r6, [r2], #8
|
|
801114c: 9207 str r2, [sp, #28]
|
|
801114e: f01b 0f01 tst.w fp, #1
|
|
8011152: d00a beq.n 801116a <_vfprintf_r+0xc02>
|
|
8011154: ea56 0305 orrs.w r3, r6, r5
|
|
8011158: d007 beq.n 801116a <_vfprintf_r+0xc02>
|
|
801115a: 2330 movs r3, #48 ; 0x30
|
|
801115c: f88d 306c strb.w r3, [sp, #108] ; 0x6c
|
|
8011160: 9b06 ldr r3, [sp, #24]
|
|
8011162: f88d 306d strb.w r3, [sp, #109] ; 0x6d
|
|
8011166: f04b 0b02 orr.w fp, fp, #2
|
|
801116a: f42b 6b80 bic.w fp, fp, #1024 ; 0x400
|
|
801116e: 2302 movs r3, #2
|
|
8011170: e763 b.n 801103a <_vfprintf_r+0xad2>
|
|
8011172: 4b6e ldr r3, [pc, #440] ; (801132c <_vfprintf_r+0xdc4>)
|
|
8011174: e7df b.n 8011136 <_vfprintf_r+0xbce>
|
|
8011176: 4632 mov r2, r6
|
|
8011178: f01b 0510 ands.w r5, fp, #16
|
|
801117c: f852 6b04 ldr.w r6, [r2], #4
|
|
8011180: 9207 str r2, [sp, #28]
|
|
8011182: d001 beq.n 8011188 <_vfprintf_r+0xc20>
|
|
8011184: 461d mov r5, r3
|
|
8011186: e7e2 b.n 801114e <_vfprintf_r+0xbe6>
|
|
8011188: f01b 0340 ands.w r3, fp, #64 ; 0x40
|
|
801118c: d001 beq.n 8011192 <_vfprintf_r+0xc2a>
|
|
801118e: b2b6 uxth r6, r6
|
|
8011190: e7dd b.n 801114e <_vfprintf_r+0xbe6>
|
|
8011192: f41b 7500 ands.w r5, fp, #512 ; 0x200
|
|
8011196: d0da beq.n 801114e <_vfprintf_r+0xbe6>
|
|
8011198: b2f6 uxtb r6, r6
|
|
801119a: e7f3 b.n 8011184 <_vfprintf_r+0xc1c>
|
|
801119c: 2e0a cmp r6, #10
|
|
801119e: f175 0300 sbcs.w r3, r5, #0
|
|
80111a2: d206 bcs.n 80111b2 <_vfprintf_r+0xc4a>
|
|
80111a4: 3630 adds r6, #48 ; 0x30
|
|
80111a6: f88d 6137 strb.w r6, [sp, #311] ; 0x137
|
|
80111aa: f20d 1837 addw r8, sp, #311 ; 0x137
|
|
80111ae: f000 bc03 b.w 80119b8 <_vfprintf_r+0x1450>
|
|
80111b2: 2300 movs r3, #0
|
|
80111b4: 9305 str r3, [sp, #20]
|
|
80111b6: f407 6380 and.w r3, r7, #1024 ; 0x400
|
|
80111ba: f50d 7b9c add.w fp, sp, #312 ; 0x138
|
|
80111be: 9303 str r3, [sp, #12]
|
|
80111c0: 220a movs r2, #10
|
|
80111c2: 2300 movs r3, #0
|
|
80111c4: 4630 mov r0, r6
|
|
80111c6: 4629 mov r1, r5
|
|
80111c8: f7ef fcfe bl 8000bc8 <__aeabi_uldivmod>
|
|
80111cc: 9b05 ldr r3, [sp, #20]
|
|
80111ce: 3301 adds r3, #1
|
|
80111d0: 9305 str r3, [sp, #20]
|
|
80111d2: 9b03 ldr r3, [sp, #12]
|
|
80111d4: 3230 adds r2, #48 ; 0x30
|
|
80111d6: f10b 38ff add.w r8, fp, #4294967295
|
|
80111da: f80b 2c01 strb.w r2, [fp, #-1]
|
|
80111de: b1d3 cbz r3, 8011216 <_vfprintf_r+0xcae>
|
|
80111e0: 9b0a ldr r3, [sp, #40] ; 0x28
|
|
80111e2: 9a05 ldr r2, [sp, #20]
|
|
80111e4: 781b ldrb r3, [r3, #0]
|
|
80111e6: 429a cmp r2, r3
|
|
80111e8: d115 bne.n 8011216 <_vfprintf_r+0xcae>
|
|
80111ea: 2aff cmp r2, #255 ; 0xff
|
|
80111ec: d013 beq.n 8011216 <_vfprintf_r+0xcae>
|
|
80111ee: 2e0a cmp r6, #10
|
|
80111f0: f175 0300 sbcs.w r3, r5, #0
|
|
80111f4: d30f bcc.n 8011216 <_vfprintf_r+0xcae>
|
|
80111f6: 9b12 ldr r3, [sp, #72] ; 0x48
|
|
80111f8: 9914 ldr r1, [sp, #80] ; 0x50
|
|
80111fa: eba8 0803 sub.w r8, r8, r3
|
|
80111fe: 461a mov r2, r3
|
|
8011200: 4640 mov r0, r8
|
|
8011202: f002 fbe4 bl 80139ce <strncpy>
|
|
8011206: 9b0a ldr r3, [sp, #40] ; 0x28
|
|
8011208: 785b ldrb r3, [r3, #1]
|
|
801120a: b11b cbz r3, 8011214 <_vfprintf_r+0xcac>
|
|
801120c: 9b0a ldr r3, [sp, #40] ; 0x28
|
|
801120e: 3301 adds r3, #1
|
|
8011210: 930a str r3, [sp, #40] ; 0x28
|
|
8011212: 2300 movs r3, #0
|
|
8011214: 9305 str r3, [sp, #20]
|
|
8011216: 2300 movs r3, #0
|
|
8011218: 220a movs r2, #10
|
|
801121a: 4630 mov r0, r6
|
|
801121c: 4629 mov r1, r5
|
|
801121e: f7ef fcd3 bl 8000bc8 <__aeabi_uldivmod>
|
|
8011222: 2e0a cmp r6, #10
|
|
8011224: f175 0300 sbcs.w r3, r5, #0
|
|
8011228: f0c0 83c6 bcc.w 80119b8 <_vfprintf_r+0x1450>
|
|
801122c: 4606 mov r6, r0
|
|
801122e: 460d mov r5, r1
|
|
8011230: 46c3 mov fp, r8
|
|
8011232: e7c5 b.n 80111c0 <_vfprintf_r+0xc58>
|
|
8011234: f006 030f and.w r3, r6, #15
|
|
8011238: 9a16 ldr r2, [sp, #88] ; 0x58
|
|
801123a: 0936 lsrs r6, r6, #4
|
|
801123c: 5cd3 ldrb r3, [r2, r3]
|
|
801123e: f808 3d01 strb.w r3, [r8, #-1]!
|
|
8011242: ea46 7605 orr.w r6, r6, r5, lsl #28
|
|
8011246: 092d lsrs r5, r5, #4
|
|
8011248: ea56 0305 orrs.w r3, r6, r5
|
|
801124c: d1f2 bne.n 8011234 <_vfprintf_r+0xccc>
|
|
801124e: e3b3 b.n 80119b8 <_vfprintf_r+0x1450>
|
|
8011250: b933 cbnz r3, 8011260 <_vfprintf_r+0xcf8>
|
|
8011252: f01b 0f01 tst.w fp, #1
|
|
8011256: d003 beq.n 8011260 <_vfprintf_r+0xcf8>
|
|
8011258: 2330 movs r3, #48 ; 0x30
|
|
801125a: f88d 3137 strb.w r3, [sp, #311] ; 0x137
|
|
801125e: e7a4 b.n 80111aa <_vfprintf_r+0xc42>
|
|
8011260: f50d 789c add.w r8, sp, #312 ; 0x138
|
|
8011264: e3a8 b.n 80119b8 <_vfprintf_r+0x1450>
|
|
8011266: 9b06 ldr r3, [sp, #24]
|
|
8011268: 2b00 cmp r3, #0
|
|
801126a: f000 8373 beq.w 8011954 <_vfprintf_r+0x13ec>
|
|
801126e: 2000 movs r0, #0
|
|
8011270: f88d 30d4 strb.w r3, [sp, #212] ; 0xd4
|
|
8011274: f88d 006b strb.w r0, [sp, #107] ; 0x6b
|
|
8011278: 9607 str r6, [sp, #28]
|
|
801127a: f7ff bb1e b.w 80108ba <_vfprintf_r+0x352>
|
|
801127e: 9e03 ldr r6, [sp, #12]
|
|
8011280: f7ff bb8d b.w 801099e <_vfprintf_r+0x436>
|
|
8011284: 2010 movs r0, #16
|
|
8011286: 4402 add r2, r0
|
|
8011288: 2b07 cmp r3, #7
|
|
801128a: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
|
|
801128e: 6060 str r0, [r4, #4]
|
|
8011290: dd08 ble.n 80112a4 <_vfprintf_r+0xd3c>
|
|
8011292: aa22 add r2, sp, #136 ; 0x88
|
|
8011294: 4649 mov r1, r9
|
|
8011296: 4650 mov r0, sl
|
|
8011298: f002 fbb9 bl 8013a0e <__sprint_r>
|
|
801129c: 2800 cmp r0, #0
|
|
801129e: f040 8337 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
80112a2: a925 add r1, sp, #148 ; 0x94
|
|
80112a4: 3f10 subs r7, #16
|
|
80112a6: 460c mov r4, r1
|
|
80112a8: e4f3 b.n 8010c92 <_vfprintf_r+0x72a>
|
|
80112aa: 460c mov r4, r1
|
|
80112ac: e50c b.n 8010cc8 <_vfprintf_r+0x760>
|
|
80112ae: aa22 add r2, sp, #136 ; 0x88
|
|
80112b0: 4649 mov r1, r9
|
|
80112b2: 4650 mov r0, sl
|
|
80112b4: f002 fbab bl 8013a0e <__sprint_r>
|
|
80112b8: 2800 cmp r0, #0
|
|
80112ba: f040 8329 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
80112be: ac25 add r4, sp, #148 ; 0x94
|
|
80112c0: e514 b.n 8010cec <_vfprintf_r+0x784>
|
|
80112c2: aa22 add r2, sp, #136 ; 0x88
|
|
80112c4: 4649 mov r1, r9
|
|
80112c6: 4650 mov r0, sl
|
|
80112c8: f002 fba1 bl 8013a0e <__sprint_r>
|
|
80112cc: 2800 cmp r0, #0
|
|
80112ce: f040 831f bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
80112d2: ac25 add r4, sp, #148 ; 0x94
|
|
80112d4: e51a b.n 8010d0c <_vfprintf_r+0x7a4>
|
|
80112d6: 2010 movs r0, #16
|
|
80112d8: 4402 add r2, r0
|
|
80112da: 2b07 cmp r3, #7
|
|
80112dc: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
|
|
80112e0: 6060 str r0, [r4, #4]
|
|
80112e2: dd08 ble.n 80112f6 <_vfprintf_r+0xd8e>
|
|
80112e4: aa22 add r2, sp, #136 ; 0x88
|
|
80112e6: 4649 mov r1, r9
|
|
80112e8: 4650 mov r0, sl
|
|
80112ea: f002 fb90 bl 8013a0e <__sprint_r>
|
|
80112ee: 2800 cmp r0, #0
|
|
80112f0: f040 830e bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
80112f4: a925 add r1, sp, #148 ; 0x94
|
|
80112f6: 3f10 subs r7, #16
|
|
80112f8: 460c mov r4, r1
|
|
80112fa: e50f b.n 8010d1c <_vfprintf_r+0x7b4>
|
|
80112fc: 460c mov r4, r1
|
|
80112fe: e528 b.n 8010d52 <_vfprintf_r+0x7ea>
|
|
8011300: 2010 movs r0, #16
|
|
8011302: 4402 add r2, r0
|
|
8011304: 2b07 cmp r3, #7
|
|
8011306: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
|
|
801130a: 6060 str r0, [r4, #4]
|
|
801130c: dd08 ble.n 8011320 <_vfprintf_r+0xdb8>
|
|
801130e: aa22 add r2, sp, #136 ; 0x88
|
|
8011310: 4649 mov r1, r9
|
|
8011312: 4650 mov r0, sl
|
|
8011314: f002 fb7b bl 8013a0e <__sprint_r>
|
|
8011318: 2800 cmp r0, #0
|
|
801131a: f040 82f9 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
801131e: a925 add r1, sp, #148 ; 0x94
|
|
8011320: 3e10 subs r6, #16
|
|
8011322: 460c mov r4, r1
|
|
8011324: e528 b.n 8010d78 <_vfprintf_r+0x810>
|
|
8011326: 460c mov r4, r1
|
|
8011328: e540 b.n 8010dac <_vfprintf_r+0x844>
|
|
801132a: bf00 nop
|
|
801132c: 08018068 .word 0x08018068
|
|
8011330: 08018079 .word 0x08018079
|
|
8011334: 9b06 ldr r3, [sp, #24]
|
|
8011336: 2b65 cmp r3, #101 ; 0x65
|
|
8011338: f340 8232 ble.w 80117a0 <_vfprintf_r+0x1238>
|
|
801133c: e9dd 010c ldrd r0, r1, [sp, #48] ; 0x30
|
|
8011340: 2200 movs r2, #0
|
|
8011342: 2300 movs r3, #0
|
|
8011344: f7ef fbd0 bl 8000ae8 <__aeabi_dcmpeq>
|
|
8011348: 2800 cmp r0, #0
|
|
801134a: d068 beq.n 801141e <_vfprintf_r+0xeb6>
|
|
801134c: 4b6d ldr r3, [pc, #436] ; (8011504 <_vfprintf_r+0xf9c>)
|
|
801134e: 6023 str r3, [r4, #0]
|
|
8011350: 2301 movs r3, #1
|
|
8011352: 441e add r6, r3
|
|
8011354: 6063 str r3, [r4, #4]
|
|
8011356: 9b23 ldr r3, [sp, #140] ; 0x8c
|
|
8011358: 9624 str r6, [sp, #144] ; 0x90
|
|
801135a: 3301 adds r3, #1
|
|
801135c: 2b07 cmp r3, #7
|
|
801135e: 9323 str r3, [sp, #140] ; 0x8c
|
|
8011360: dc37 bgt.n 80113d2 <_vfprintf_r+0xe6a>
|
|
8011362: 3408 adds r4, #8
|
|
8011364: 9b1c ldr r3, [sp, #112] ; 0x70
|
|
8011366: 9a05 ldr r2, [sp, #20]
|
|
8011368: 4293 cmp r3, r2
|
|
801136a: db03 blt.n 8011374 <_vfprintf_r+0xe0c>
|
|
801136c: f01b 0f01 tst.w fp, #1
|
|
8011370: f43f ad2e beq.w 8010dd0 <_vfprintf_r+0x868>
|
|
8011374: 9b13 ldr r3, [sp, #76] ; 0x4c
|
|
8011376: 6023 str r3, [r4, #0]
|
|
8011378: 9b0e ldr r3, [sp, #56] ; 0x38
|
|
801137a: 9a0e ldr r2, [sp, #56] ; 0x38
|
|
801137c: 6063 str r3, [r4, #4]
|
|
801137e: 9b24 ldr r3, [sp, #144] ; 0x90
|
|
8011380: 4413 add r3, r2
|
|
8011382: 9324 str r3, [sp, #144] ; 0x90
|
|
8011384: 9b23 ldr r3, [sp, #140] ; 0x8c
|
|
8011386: 3301 adds r3, #1
|
|
8011388: 2b07 cmp r3, #7
|
|
801138a: 9323 str r3, [sp, #140] ; 0x8c
|
|
801138c: dc2b bgt.n 80113e6 <_vfprintf_r+0xe7e>
|
|
801138e: 3408 adds r4, #8
|
|
8011390: 9b05 ldr r3, [sp, #20]
|
|
8011392: 1e5d subs r5, r3, #1
|
|
8011394: 2d00 cmp r5, #0
|
|
8011396: f77f ad1b ble.w 8010dd0 <_vfprintf_r+0x868>
|
|
801139a: 4e5b ldr r6, [pc, #364] ; (8011508 <_vfprintf_r+0xfa0>)
|
|
801139c: 2710 movs r7, #16
|
|
801139e: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
|
|
80113a2: 2d10 cmp r5, #16
|
|
80113a4: f103 0301 add.w r3, r3, #1
|
|
80113a8: f104 0108 add.w r1, r4, #8
|
|
80113ac: 6026 str r6, [r4, #0]
|
|
80113ae: dc24 bgt.n 80113fa <_vfprintf_r+0xe92>
|
|
80113b0: 442a add r2, r5
|
|
80113b2: 6065 str r5, [r4, #4]
|
|
80113b4: 9224 str r2, [sp, #144] ; 0x90
|
|
80113b6: 2b07 cmp r3, #7
|
|
80113b8: 9323 str r3, [sp, #140] ; 0x8c
|
|
80113ba: f340 8288 ble.w 80118ce <_vfprintf_r+0x1366>
|
|
80113be: aa22 add r2, sp, #136 ; 0x88
|
|
80113c0: 4649 mov r1, r9
|
|
80113c2: 4650 mov r0, sl
|
|
80113c4: f002 fb23 bl 8013a0e <__sprint_r>
|
|
80113c8: 2800 cmp r0, #0
|
|
80113ca: f040 82a1 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
80113ce: ac25 add r4, sp, #148 ; 0x94
|
|
80113d0: e4fe b.n 8010dd0 <_vfprintf_r+0x868>
|
|
80113d2: aa22 add r2, sp, #136 ; 0x88
|
|
80113d4: 4649 mov r1, r9
|
|
80113d6: 4650 mov r0, sl
|
|
80113d8: f002 fb19 bl 8013a0e <__sprint_r>
|
|
80113dc: 2800 cmp r0, #0
|
|
80113de: f040 8297 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
80113e2: ac25 add r4, sp, #148 ; 0x94
|
|
80113e4: e7be b.n 8011364 <_vfprintf_r+0xdfc>
|
|
80113e6: aa22 add r2, sp, #136 ; 0x88
|
|
80113e8: 4649 mov r1, r9
|
|
80113ea: 4650 mov r0, sl
|
|
80113ec: f002 fb0f bl 8013a0e <__sprint_r>
|
|
80113f0: 2800 cmp r0, #0
|
|
80113f2: f040 828d bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
80113f6: ac25 add r4, sp, #148 ; 0x94
|
|
80113f8: e7ca b.n 8011390 <_vfprintf_r+0xe28>
|
|
80113fa: 3210 adds r2, #16
|
|
80113fc: 2b07 cmp r3, #7
|
|
80113fe: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
|
|
8011402: 6067 str r7, [r4, #4]
|
|
8011404: dd08 ble.n 8011418 <_vfprintf_r+0xeb0>
|
|
8011406: aa22 add r2, sp, #136 ; 0x88
|
|
8011408: 4649 mov r1, r9
|
|
801140a: 4650 mov r0, sl
|
|
801140c: f002 faff bl 8013a0e <__sprint_r>
|
|
8011410: 2800 cmp r0, #0
|
|
8011412: f040 827d bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
8011416: a925 add r1, sp, #148 ; 0x94
|
|
8011418: 3d10 subs r5, #16
|
|
801141a: 460c mov r4, r1
|
|
801141c: e7bf b.n 801139e <_vfprintf_r+0xe36>
|
|
801141e: 9b1c ldr r3, [sp, #112] ; 0x70
|
|
8011420: 2b00 cmp r3, #0
|
|
8011422: dc73 bgt.n 801150c <_vfprintf_r+0xfa4>
|
|
8011424: 4b37 ldr r3, [pc, #220] ; (8011504 <_vfprintf_r+0xf9c>)
|
|
8011426: 6023 str r3, [r4, #0]
|
|
8011428: 2301 movs r3, #1
|
|
801142a: 441e add r6, r3
|
|
801142c: 6063 str r3, [r4, #4]
|
|
801142e: 9b23 ldr r3, [sp, #140] ; 0x8c
|
|
8011430: 9624 str r6, [sp, #144] ; 0x90
|
|
8011432: 3301 adds r3, #1
|
|
8011434: 2b07 cmp r3, #7
|
|
8011436: 9323 str r3, [sp, #140] ; 0x8c
|
|
8011438: dc3d bgt.n 80114b6 <_vfprintf_r+0xf4e>
|
|
801143a: 3408 adds r4, #8
|
|
801143c: 9905 ldr r1, [sp, #20]
|
|
801143e: 9a1c ldr r2, [sp, #112] ; 0x70
|
|
8011440: 9b24 ldr r3, [sp, #144] ; 0x90
|
|
8011442: 430a orrs r2, r1
|
|
8011444: f00b 0101 and.w r1, fp, #1
|
|
8011448: 430a orrs r2, r1
|
|
801144a: f43f acc1 beq.w 8010dd0 <_vfprintf_r+0x868>
|
|
801144e: 9a13 ldr r2, [sp, #76] ; 0x4c
|
|
8011450: 6022 str r2, [r4, #0]
|
|
8011452: 9a0e ldr r2, [sp, #56] ; 0x38
|
|
8011454: 6062 str r2, [r4, #4]
|
|
8011456: 4413 add r3, r2
|
|
8011458: 9324 str r3, [sp, #144] ; 0x90
|
|
801145a: 9b23 ldr r3, [sp, #140] ; 0x8c
|
|
801145c: 3301 adds r3, #1
|
|
801145e: 2b07 cmp r3, #7
|
|
8011460: 9323 str r3, [sp, #140] ; 0x8c
|
|
8011462: dc32 bgt.n 80114ca <_vfprintf_r+0xf62>
|
|
8011464: 3408 adds r4, #8
|
|
8011466: 9d1c ldr r5, [sp, #112] ; 0x70
|
|
8011468: 2d00 cmp r5, #0
|
|
801146a: da1b bge.n 80114a4 <_vfprintf_r+0xf3c>
|
|
801146c: 4e26 ldr r6, [pc, #152] ; (8011508 <_vfprintf_r+0xfa0>)
|
|
801146e: 426d negs r5, r5
|
|
8011470: 4623 mov r3, r4
|
|
8011472: 2710 movs r7, #16
|
|
8011474: e9dd 2123 ldrd r2, r1, [sp, #140] ; 0x8c
|
|
8011478: 2d10 cmp r5, #16
|
|
801147a: f102 0201 add.w r2, r2, #1
|
|
801147e: f104 0408 add.w r4, r4, #8
|
|
8011482: 601e str r6, [r3, #0]
|
|
8011484: dc2b bgt.n 80114de <_vfprintf_r+0xf76>
|
|
8011486: 605d str r5, [r3, #4]
|
|
8011488: 2a07 cmp r2, #7
|
|
801148a: 440d add r5, r1
|
|
801148c: e9cd 2523 strd r2, r5, [sp, #140] ; 0x8c
|
|
8011490: dd08 ble.n 80114a4 <_vfprintf_r+0xf3c>
|
|
8011492: aa22 add r2, sp, #136 ; 0x88
|
|
8011494: 4649 mov r1, r9
|
|
8011496: 4650 mov r0, sl
|
|
8011498: f002 fab9 bl 8013a0e <__sprint_r>
|
|
801149c: 2800 cmp r0, #0
|
|
801149e: f040 8237 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
80114a2: ac25 add r4, sp, #148 ; 0x94
|
|
80114a4: 9b05 ldr r3, [sp, #20]
|
|
80114a6: 9a05 ldr r2, [sp, #20]
|
|
80114a8: 6063 str r3, [r4, #4]
|
|
80114aa: 9b24 ldr r3, [sp, #144] ; 0x90
|
|
80114ac: f8c4 8000 str.w r8, [r4]
|
|
80114b0: 4413 add r3, r2
|
|
80114b2: 9324 str r3, [sp, #144] ; 0x90
|
|
80114b4: e485 b.n 8010dc2 <_vfprintf_r+0x85a>
|
|
80114b6: aa22 add r2, sp, #136 ; 0x88
|
|
80114b8: 4649 mov r1, r9
|
|
80114ba: 4650 mov r0, sl
|
|
80114bc: f002 faa7 bl 8013a0e <__sprint_r>
|
|
80114c0: 2800 cmp r0, #0
|
|
80114c2: f040 8225 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
80114c6: ac25 add r4, sp, #148 ; 0x94
|
|
80114c8: e7b8 b.n 801143c <_vfprintf_r+0xed4>
|
|
80114ca: aa22 add r2, sp, #136 ; 0x88
|
|
80114cc: 4649 mov r1, r9
|
|
80114ce: 4650 mov r0, sl
|
|
80114d0: f002 fa9d bl 8013a0e <__sprint_r>
|
|
80114d4: 2800 cmp r0, #0
|
|
80114d6: f040 821b bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
80114da: ac25 add r4, sp, #148 ; 0x94
|
|
80114dc: e7c3 b.n 8011466 <_vfprintf_r+0xefe>
|
|
80114de: 3110 adds r1, #16
|
|
80114e0: 2a07 cmp r2, #7
|
|
80114e2: e9cd 2123 strd r2, r1, [sp, #140] ; 0x8c
|
|
80114e6: 605f str r7, [r3, #4]
|
|
80114e8: dd08 ble.n 80114fc <_vfprintf_r+0xf94>
|
|
80114ea: aa22 add r2, sp, #136 ; 0x88
|
|
80114ec: 4649 mov r1, r9
|
|
80114ee: 4650 mov r0, sl
|
|
80114f0: f002 fa8d bl 8013a0e <__sprint_r>
|
|
80114f4: 2800 cmp r0, #0
|
|
80114f6: f040 820b bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
80114fa: ac25 add r4, sp, #148 ; 0x94
|
|
80114fc: 3d10 subs r5, #16
|
|
80114fe: 4623 mov r3, r4
|
|
8011500: e7b8 b.n 8011474 <_vfprintf_r+0xf0c>
|
|
8011502: bf00 nop
|
|
8011504: 0801808a .word 0x0801808a
|
|
8011508: 0801809c .word 0x0801809c
|
|
801150c: 9f05 ldr r7, [sp, #20]
|
|
801150e: 42af cmp r7, r5
|
|
8011510: bfa8 it ge
|
|
8011512: 462f movge r7, r5
|
|
8011514: 2f00 cmp r7, #0
|
|
8011516: dd09 ble.n 801152c <_vfprintf_r+0xfc4>
|
|
8011518: 9b23 ldr r3, [sp, #140] ; 0x8c
|
|
801151a: 3301 adds r3, #1
|
|
801151c: 443e add r6, r7
|
|
801151e: 2b07 cmp r3, #7
|
|
8011520: e9c4 8700 strd r8, r7, [r4]
|
|
8011524: 9624 str r6, [sp, #144] ; 0x90
|
|
8011526: 9323 str r3, [sp, #140] ; 0x8c
|
|
8011528: dc75 bgt.n 8011616 <_vfprintf_r+0x10ae>
|
|
801152a: 3408 adds r4, #8
|
|
801152c: 2f00 cmp r7, #0
|
|
801152e: bfac ite ge
|
|
8011530: 1bee subge r6, r5, r7
|
|
8011532: 462e movlt r6, r5
|
|
8011534: 2e00 cmp r6, #0
|
|
8011536: dd18 ble.n 801156a <_vfprintf_r+0x1002>
|
|
8011538: 4f98 ldr r7, [pc, #608] ; (801179c <_vfprintf_r+0x1234>)
|
|
801153a: 6027 str r7, [r4, #0]
|
|
801153c: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
|
|
8011540: 2e10 cmp r6, #16
|
|
8011542: f103 0301 add.w r3, r3, #1
|
|
8011546: f104 0108 add.w r1, r4, #8
|
|
801154a: dc6e bgt.n 801162a <_vfprintf_r+0x10c2>
|
|
801154c: 6066 str r6, [r4, #4]
|
|
801154e: 2b07 cmp r3, #7
|
|
8011550: 4416 add r6, r2
|
|
8011552: e9cd 3623 strd r3, r6, [sp, #140] ; 0x8c
|
|
8011556: dd7b ble.n 8011650 <_vfprintf_r+0x10e8>
|
|
8011558: aa22 add r2, sp, #136 ; 0x88
|
|
801155a: 4649 mov r1, r9
|
|
801155c: 4650 mov r0, sl
|
|
801155e: f002 fa56 bl 8013a0e <__sprint_r>
|
|
8011562: 2800 cmp r0, #0
|
|
8011564: f040 81d4 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
8011568: ac25 add r4, sp, #148 ; 0x94
|
|
801156a: f41b 6f80 tst.w fp, #1024 ; 0x400
|
|
801156e: 4445 add r5, r8
|
|
8011570: d00a beq.n 8011588 <_vfprintf_r+0x1020>
|
|
8011572: 9b09 ldr r3, [sp, #36] ; 0x24
|
|
8011574: 2b00 cmp r3, #0
|
|
8011576: d16d bne.n 8011654 <_vfprintf_r+0x10ec>
|
|
8011578: 9b08 ldr r3, [sp, #32]
|
|
801157a: 2b00 cmp r3, #0
|
|
801157c: d16d bne.n 801165a <_vfprintf_r+0x10f2>
|
|
801157e: 9b05 ldr r3, [sp, #20]
|
|
8011580: 4443 add r3, r8
|
|
8011582: 429d cmp r5, r3
|
|
8011584: bf28 it cs
|
|
8011586: 461d movcs r5, r3
|
|
8011588: 9b1c ldr r3, [sp, #112] ; 0x70
|
|
801158a: 9a05 ldr r2, [sp, #20]
|
|
801158c: 4293 cmp r3, r2
|
|
801158e: db02 blt.n 8011596 <_vfprintf_r+0x102e>
|
|
8011590: f01b 0f01 tst.w fp, #1
|
|
8011594: d00e beq.n 80115b4 <_vfprintf_r+0x104c>
|
|
8011596: 9b13 ldr r3, [sp, #76] ; 0x4c
|
|
8011598: 6023 str r3, [r4, #0]
|
|
801159a: 9b0e ldr r3, [sp, #56] ; 0x38
|
|
801159c: 9a0e ldr r2, [sp, #56] ; 0x38
|
|
801159e: 6063 str r3, [r4, #4]
|
|
80115a0: 9b24 ldr r3, [sp, #144] ; 0x90
|
|
80115a2: 4413 add r3, r2
|
|
80115a4: 9324 str r3, [sp, #144] ; 0x90
|
|
80115a6: 9b23 ldr r3, [sp, #140] ; 0x8c
|
|
80115a8: 3301 adds r3, #1
|
|
80115aa: 2b07 cmp r3, #7
|
|
80115ac: 9323 str r3, [sp, #140] ; 0x8c
|
|
80115ae: f300 80cf bgt.w 8011750 <_vfprintf_r+0x11e8>
|
|
80115b2: 3408 adds r4, #8
|
|
80115b4: 9b05 ldr r3, [sp, #20]
|
|
80115b6: 9e1c ldr r6, [sp, #112] ; 0x70
|
|
80115b8: eb08 0203 add.w r2, r8, r3
|
|
80115bc: 1b9e subs r6, r3, r6
|
|
80115be: 1b52 subs r2, r2, r5
|
|
80115c0: 4296 cmp r6, r2
|
|
80115c2: bfa8 it ge
|
|
80115c4: 4616 movge r6, r2
|
|
80115c6: 2e00 cmp r6, #0
|
|
80115c8: dd0b ble.n 80115e2 <_vfprintf_r+0x107a>
|
|
80115ca: 9b24 ldr r3, [sp, #144] ; 0x90
|
|
80115cc: 4433 add r3, r6
|
|
80115ce: 9324 str r3, [sp, #144] ; 0x90
|
|
80115d0: 9b23 ldr r3, [sp, #140] ; 0x8c
|
|
80115d2: 3301 adds r3, #1
|
|
80115d4: 2b07 cmp r3, #7
|
|
80115d6: e9c4 5600 strd r5, r6, [r4]
|
|
80115da: 9323 str r3, [sp, #140] ; 0x8c
|
|
80115dc: f300 80c2 bgt.w 8011764 <_vfprintf_r+0x11fc>
|
|
80115e0: 3408 adds r4, #8
|
|
80115e2: 9d1c ldr r5, [sp, #112] ; 0x70
|
|
80115e4: 9b05 ldr r3, [sp, #20]
|
|
80115e6: 2e00 cmp r6, #0
|
|
80115e8: eba3 0505 sub.w r5, r3, r5
|
|
80115ec: bfa8 it ge
|
|
80115ee: 1bad subge r5, r5, r6
|
|
80115f0: 2d00 cmp r5, #0
|
|
80115f2: f77f abed ble.w 8010dd0 <_vfprintf_r+0x868>
|
|
80115f6: 4e69 ldr r6, [pc, #420] ; (801179c <_vfprintf_r+0x1234>)
|
|
80115f8: 2710 movs r7, #16
|
|
80115fa: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
|
|
80115fe: 2d10 cmp r5, #16
|
|
8011600: f103 0301 add.w r3, r3, #1
|
|
8011604: f104 0108 add.w r1, r4, #8
|
|
8011608: 6026 str r6, [r4, #0]
|
|
801160a: f300 80b5 bgt.w 8011778 <_vfprintf_r+0x1210>
|
|
801160e: 6065 str r5, [r4, #4]
|
|
8011610: 4415 add r5, r2
|
|
8011612: 9524 str r5, [sp, #144] ; 0x90
|
|
8011614: e6cf b.n 80113b6 <_vfprintf_r+0xe4e>
|
|
8011616: aa22 add r2, sp, #136 ; 0x88
|
|
8011618: 4649 mov r1, r9
|
|
801161a: 4650 mov r0, sl
|
|
801161c: f002 f9f7 bl 8013a0e <__sprint_r>
|
|
8011620: 2800 cmp r0, #0
|
|
8011622: f040 8175 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
8011626: ac25 add r4, sp, #148 ; 0x94
|
|
8011628: e780 b.n 801152c <_vfprintf_r+0xfc4>
|
|
801162a: 2010 movs r0, #16
|
|
801162c: 4402 add r2, r0
|
|
801162e: 2b07 cmp r3, #7
|
|
8011630: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
|
|
8011634: 6060 str r0, [r4, #4]
|
|
8011636: dd08 ble.n 801164a <_vfprintf_r+0x10e2>
|
|
8011638: aa22 add r2, sp, #136 ; 0x88
|
|
801163a: 4649 mov r1, r9
|
|
801163c: 4650 mov r0, sl
|
|
801163e: f002 f9e6 bl 8013a0e <__sprint_r>
|
|
8011642: 2800 cmp r0, #0
|
|
8011644: f040 8164 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
8011648: a925 add r1, sp, #148 ; 0x94
|
|
801164a: 3e10 subs r6, #16
|
|
801164c: 460c mov r4, r1
|
|
801164e: e774 b.n 801153a <_vfprintf_r+0xfd2>
|
|
8011650: 460c mov r4, r1
|
|
8011652: e78a b.n 801156a <_vfprintf_r+0x1002>
|
|
8011654: 9b08 ldr r3, [sp, #32]
|
|
8011656: 2b00 cmp r3, #0
|
|
8011658: d04a beq.n 80116f0 <_vfprintf_r+0x1188>
|
|
801165a: 9b08 ldr r3, [sp, #32]
|
|
801165c: 3b01 subs r3, #1
|
|
801165e: 9308 str r3, [sp, #32]
|
|
8011660: 9b14 ldr r3, [sp, #80] ; 0x50
|
|
8011662: 6023 str r3, [r4, #0]
|
|
8011664: 9b12 ldr r3, [sp, #72] ; 0x48
|
|
8011666: 9a12 ldr r2, [sp, #72] ; 0x48
|
|
8011668: 6063 str r3, [r4, #4]
|
|
801166a: 9b24 ldr r3, [sp, #144] ; 0x90
|
|
801166c: 4413 add r3, r2
|
|
801166e: 9324 str r3, [sp, #144] ; 0x90
|
|
8011670: 9b23 ldr r3, [sp, #140] ; 0x8c
|
|
8011672: 3301 adds r3, #1
|
|
8011674: 2b07 cmp r3, #7
|
|
8011676: 9323 str r3, [sp, #140] ; 0x8c
|
|
8011678: dc41 bgt.n 80116fe <_vfprintf_r+0x1196>
|
|
801167a: 3408 adds r4, #8
|
|
801167c: 9b05 ldr r3, [sp, #20]
|
|
801167e: 9a0a ldr r2, [sp, #40] ; 0x28
|
|
8011680: eb08 0703 add.w r7, r8, r3
|
|
8011684: 1b7b subs r3, r7, r5
|
|
8011686: 7817 ldrb r7, [r2, #0]
|
|
8011688: 429f cmp r7, r3
|
|
801168a: bfa8 it ge
|
|
801168c: 461f movge r7, r3
|
|
801168e: 2f00 cmp r7, #0
|
|
8011690: dd0a ble.n 80116a8 <_vfprintf_r+0x1140>
|
|
8011692: 9b24 ldr r3, [sp, #144] ; 0x90
|
|
8011694: 443b add r3, r7
|
|
8011696: 9324 str r3, [sp, #144] ; 0x90
|
|
8011698: 9b23 ldr r3, [sp, #140] ; 0x8c
|
|
801169a: 3301 adds r3, #1
|
|
801169c: 2b07 cmp r3, #7
|
|
801169e: e9c4 5700 strd r5, r7, [r4]
|
|
80116a2: 9323 str r3, [sp, #140] ; 0x8c
|
|
80116a4: dc35 bgt.n 8011712 <_vfprintf_r+0x11aa>
|
|
80116a6: 3408 adds r4, #8
|
|
80116a8: 9b0a ldr r3, [sp, #40] ; 0x28
|
|
80116aa: 781e ldrb r6, [r3, #0]
|
|
80116ac: 2f00 cmp r7, #0
|
|
80116ae: bfa8 it ge
|
|
80116b0: 1bf6 subge r6, r6, r7
|
|
80116b2: 2e00 cmp r6, #0
|
|
80116b4: dd18 ble.n 80116e8 <_vfprintf_r+0x1180>
|
|
80116b6: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
|
|
80116ba: 4838 ldr r0, [pc, #224] ; (801179c <_vfprintf_r+0x1234>)
|
|
80116bc: 6020 str r0, [r4, #0]
|
|
80116be: 2e10 cmp r6, #16
|
|
80116c0: f103 0301 add.w r3, r3, #1
|
|
80116c4: f104 0108 add.w r1, r4, #8
|
|
80116c8: dc2d bgt.n 8011726 <_vfprintf_r+0x11be>
|
|
80116ca: 6066 str r6, [r4, #4]
|
|
80116cc: 2b07 cmp r3, #7
|
|
80116ce: 4416 add r6, r2
|
|
80116d0: e9cd 3623 strd r3, r6, [sp, #140] ; 0x8c
|
|
80116d4: dd3a ble.n 801174c <_vfprintf_r+0x11e4>
|
|
80116d6: aa22 add r2, sp, #136 ; 0x88
|
|
80116d8: 4649 mov r1, r9
|
|
80116da: 4650 mov r0, sl
|
|
80116dc: f002 f997 bl 8013a0e <__sprint_r>
|
|
80116e0: 2800 cmp r0, #0
|
|
80116e2: f040 8115 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
80116e6: ac25 add r4, sp, #148 ; 0x94
|
|
80116e8: 9b0a ldr r3, [sp, #40] ; 0x28
|
|
80116ea: 781b ldrb r3, [r3, #0]
|
|
80116ec: 441d add r5, r3
|
|
80116ee: e740 b.n 8011572 <_vfprintf_r+0x100a>
|
|
80116f0: 9b0a ldr r3, [sp, #40] ; 0x28
|
|
80116f2: 3b01 subs r3, #1
|
|
80116f4: 930a str r3, [sp, #40] ; 0x28
|
|
80116f6: 9b09 ldr r3, [sp, #36] ; 0x24
|
|
80116f8: 3b01 subs r3, #1
|
|
80116fa: 9309 str r3, [sp, #36] ; 0x24
|
|
80116fc: e7b0 b.n 8011660 <_vfprintf_r+0x10f8>
|
|
80116fe: aa22 add r2, sp, #136 ; 0x88
|
|
8011700: 4649 mov r1, r9
|
|
8011702: 4650 mov r0, sl
|
|
8011704: f002 f983 bl 8013a0e <__sprint_r>
|
|
8011708: 2800 cmp r0, #0
|
|
801170a: f040 8101 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
801170e: ac25 add r4, sp, #148 ; 0x94
|
|
8011710: e7b4 b.n 801167c <_vfprintf_r+0x1114>
|
|
8011712: aa22 add r2, sp, #136 ; 0x88
|
|
8011714: 4649 mov r1, r9
|
|
8011716: 4650 mov r0, sl
|
|
8011718: f002 f979 bl 8013a0e <__sprint_r>
|
|
801171c: 2800 cmp r0, #0
|
|
801171e: f040 80f7 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
8011722: ac25 add r4, sp, #148 ; 0x94
|
|
8011724: e7c0 b.n 80116a8 <_vfprintf_r+0x1140>
|
|
8011726: 2010 movs r0, #16
|
|
8011728: 4402 add r2, r0
|
|
801172a: 2b07 cmp r3, #7
|
|
801172c: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
|
|
8011730: 6060 str r0, [r4, #4]
|
|
8011732: dd08 ble.n 8011746 <_vfprintf_r+0x11de>
|
|
8011734: aa22 add r2, sp, #136 ; 0x88
|
|
8011736: 4649 mov r1, r9
|
|
8011738: 4650 mov r0, sl
|
|
801173a: f002 f968 bl 8013a0e <__sprint_r>
|
|
801173e: 2800 cmp r0, #0
|
|
8011740: f040 80e6 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
8011744: a925 add r1, sp, #148 ; 0x94
|
|
8011746: 3e10 subs r6, #16
|
|
8011748: 460c mov r4, r1
|
|
801174a: e7b4 b.n 80116b6 <_vfprintf_r+0x114e>
|
|
801174c: 460c mov r4, r1
|
|
801174e: e7cb b.n 80116e8 <_vfprintf_r+0x1180>
|
|
8011750: aa22 add r2, sp, #136 ; 0x88
|
|
8011752: 4649 mov r1, r9
|
|
8011754: 4650 mov r0, sl
|
|
8011756: f002 f95a bl 8013a0e <__sprint_r>
|
|
801175a: 2800 cmp r0, #0
|
|
801175c: f040 80d8 bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
8011760: ac25 add r4, sp, #148 ; 0x94
|
|
8011762: e727 b.n 80115b4 <_vfprintf_r+0x104c>
|
|
8011764: aa22 add r2, sp, #136 ; 0x88
|
|
8011766: 4649 mov r1, r9
|
|
8011768: 4650 mov r0, sl
|
|
801176a: f002 f950 bl 8013a0e <__sprint_r>
|
|
801176e: 2800 cmp r0, #0
|
|
8011770: f040 80ce bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
8011774: ac25 add r4, sp, #148 ; 0x94
|
|
8011776: e734 b.n 80115e2 <_vfprintf_r+0x107a>
|
|
8011778: 3210 adds r2, #16
|
|
801177a: 2b07 cmp r3, #7
|
|
801177c: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
|
|
8011780: 6067 str r7, [r4, #4]
|
|
8011782: dd08 ble.n 8011796 <_vfprintf_r+0x122e>
|
|
8011784: aa22 add r2, sp, #136 ; 0x88
|
|
8011786: 4649 mov r1, r9
|
|
8011788: 4650 mov r0, sl
|
|
801178a: f002 f940 bl 8013a0e <__sprint_r>
|
|
801178e: 2800 cmp r0, #0
|
|
8011790: f040 80be bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
8011794: a925 add r1, sp, #148 ; 0x94
|
|
8011796: 3d10 subs r5, #16
|
|
8011798: 460c mov r4, r1
|
|
801179a: e72e b.n 80115fa <_vfprintf_r+0x1092>
|
|
801179c: 0801809c .word 0x0801809c
|
|
80117a0: 9a05 ldr r2, [sp, #20]
|
|
80117a2: 9b23 ldr r3, [sp, #140] ; 0x8c
|
|
80117a4: 2a01 cmp r2, #1
|
|
80117a6: f106 0601 add.w r6, r6, #1
|
|
80117aa: f103 0301 add.w r3, r3, #1
|
|
80117ae: f104 0508 add.w r5, r4, #8
|
|
80117b2: dc02 bgt.n 80117ba <_vfprintf_r+0x1252>
|
|
80117b4: f01b 0f01 tst.w fp, #1
|
|
80117b8: d07e beq.n 80118b8 <_vfprintf_r+0x1350>
|
|
80117ba: 2201 movs r2, #1
|
|
80117bc: 2b07 cmp r3, #7
|
|
80117be: e9cd 3623 strd r3, r6, [sp, #140] ; 0x8c
|
|
80117c2: f8c4 8000 str.w r8, [r4]
|
|
80117c6: 6062 str r2, [r4, #4]
|
|
80117c8: dd08 ble.n 80117dc <_vfprintf_r+0x1274>
|
|
80117ca: aa22 add r2, sp, #136 ; 0x88
|
|
80117cc: 4649 mov r1, r9
|
|
80117ce: 4650 mov r0, sl
|
|
80117d0: f002 f91d bl 8013a0e <__sprint_r>
|
|
80117d4: 2800 cmp r0, #0
|
|
80117d6: f040 809b bne.w 8011910 <_vfprintf_r+0x13a8>
|
|
80117da: ad25 add r5, sp, #148 ; 0x94
|
|
80117dc: 9b13 ldr r3, [sp, #76] ; 0x4c
|
|
80117de: 602b str r3, [r5, #0]
|
|
80117e0: 9b0e ldr r3, [sp, #56] ; 0x38
|
|
80117e2: 9a0e ldr r2, [sp, #56] ; 0x38
|
|
80117e4: 606b str r3, [r5, #4]
|
|
80117e6: 9b24 ldr r3, [sp, #144] ; 0x90
|
|
80117e8: 4413 add r3, r2
|
|
80117ea: 9324 str r3, [sp, #144] ; 0x90
|
|
80117ec: 9b23 ldr r3, [sp, #140] ; 0x8c
|
|
80117ee: 3301 adds r3, #1
|
|
80117f0: 2b07 cmp r3, #7
|
|
80117f2: 9323 str r3, [sp, #140] ; 0x8c
|
|
80117f4: dc32 bgt.n 801185c <_vfprintf_r+0x12f4>
|
|
80117f6: 3508 adds r5, #8
|
|
80117f8: 9b05 ldr r3, [sp, #20]
|
|
80117fa: e9dd 010c ldrd r0, r1, [sp, #48] ; 0x30
|
|
80117fe: 1e5c subs r4, r3, #1
|
|
8011800: 2200 movs r2, #0
|
|
8011802: 2300 movs r3, #0
|
|
8011804: f7ef f970 bl 8000ae8 <__aeabi_dcmpeq>
|
|
8011808: 2800 cmp r0, #0
|
|
801180a: d130 bne.n 801186e <_vfprintf_r+0x1306>
|
|
801180c: 9923 ldr r1, [sp, #140] ; 0x8c
|
|
801180e: 9b24 ldr r3, [sp, #144] ; 0x90
|
|
8011810: 9a05 ldr r2, [sp, #20]
|
|
8011812: 3101 adds r1, #1
|
|
8011814: 3b01 subs r3, #1
|
|
8011816: f108 0001 add.w r0, r8, #1
|
|
801181a: 4413 add r3, r2
|
|
801181c: 2907 cmp r1, #7
|
|
801181e: e9c5 0400 strd r0, r4, [r5]
|
|
8011822: e9cd 1323 strd r1, r3, [sp, #140] ; 0x8c
|
|
8011826: dd50 ble.n 80118ca <_vfprintf_r+0x1362>
|
|
8011828: aa22 add r2, sp, #136 ; 0x88
|
|
801182a: 4649 mov r1, r9
|
|
801182c: 4650 mov r0, sl
|
|
801182e: f002 f8ee bl 8013a0e <__sprint_r>
|
|
8011832: 2800 cmp r0, #0
|
|
8011834: d16c bne.n 8011910 <_vfprintf_r+0x13a8>
|
|
8011836: ad25 add r5, sp, #148 ; 0x94
|
|
8011838: ab1e add r3, sp, #120 ; 0x78
|
|
801183a: 602b str r3, [r5, #0]
|
|
801183c: 9b15 ldr r3, [sp, #84] ; 0x54
|
|
801183e: 9a15 ldr r2, [sp, #84] ; 0x54
|
|
8011840: 606b str r3, [r5, #4]
|
|
8011842: 9b24 ldr r3, [sp, #144] ; 0x90
|
|
8011844: 4413 add r3, r2
|
|
8011846: 9324 str r3, [sp, #144] ; 0x90
|
|
8011848: 9b23 ldr r3, [sp, #140] ; 0x8c
|
|
801184a: 3301 adds r3, #1
|
|
801184c: 2b07 cmp r3, #7
|
|
801184e: 9323 str r3, [sp, #140] ; 0x8c
|
|
8011850: f73f adb5 bgt.w 80113be <_vfprintf_r+0xe56>
|
|
8011854: f105 0408 add.w r4, r5, #8
|
|
8011858: f7ff baba b.w 8010dd0 <_vfprintf_r+0x868>
|
|
801185c: aa22 add r2, sp, #136 ; 0x88
|
|
801185e: 4649 mov r1, r9
|
|
8011860: 4650 mov r0, sl
|
|
8011862: f002 f8d4 bl 8013a0e <__sprint_r>
|
|
8011866: 2800 cmp r0, #0
|
|
8011868: d152 bne.n 8011910 <_vfprintf_r+0x13a8>
|
|
801186a: ad25 add r5, sp, #148 ; 0x94
|
|
801186c: e7c4 b.n 80117f8 <_vfprintf_r+0x1290>
|
|
801186e: 2c00 cmp r4, #0
|
|
8011870: dde2 ble.n 8011838 <_vfprintf_r+0x12d0>
|
|
8011872: 4e58 ldr r6, [pc, #352] ; (80119d4 <_vfprintf_r+0x146c>)
|
|
8011874: 2710 movs r7, #16
|
|
8011876: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
|
|
801187a: 2c10 cmp r4, #16
|
|
801187c: f103 0301 add.w r3, r3, #1
|
|
8011880: f105 0108 add.w r1, r5, #8
|
|
8011884: 602e str r6, [r5, #0]
|
|
8011886: dc07 bgt.n 8011898 <_vfprintf_r+0x1330>
|
|
8011888: 606c str r4, [r5, #4]
|
|
801188a: 2b07 cmp r3, #7
|
|
801188c: 4414 add r4, r2
|
|
801188e: e9cd 3423 strd r3, r4, [sp, #140] ; 0x8c
|
|
8011892: dcc9 bgt.n 8011828 <_vfprintf_r+0x12c0>
|
|
8011894: 460d mov r5, r1
|
|
8011896: e7cf b.n 8011838 <_vfprintf_r+0x12d0>
|
|
8011898: 3210 adds r2, #16
|
|
801189a: 2b07 cmp r3, #7
|
|
801189c: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
|
|
80118a0: 606f str r7, [r5, #4]
|
|
80118a2: dd06 ble.n 80118b2 <_vfprintf_r+0x134a>
|
|
80118a4: aa22 add r2, sp, #136 ; 0x88
|
|
80118a6: 4649 mov r1, r9
|
|
80118a8: 4650 mov r0, sl
|
|
80118aa: f002 f8b0 bl 8013a0e <__sprint_r>
|
|
80118ae: bb78 cbnz r0, 8011910 <_vfprintf_r+0x13a8>
|
|
80118b0: a925 add r1, sp, #148 ; 0x94
|
|
80118b2: 3c10 subs r4, #16
|
|
80118b4: 460d mov r5, r1
|
|
80118b6: e7de b.n 8011876 <_vfprintf_r+0x130e>
|
|
80118b8: 2201 movs r2, #1
|
|
80118ba: 2b07 cmp r3, #7
|
|
80118bc: e9cd 3623 strd r3, r6, [sp, #140] ; 0x8c
|
|
80118c0: f8c4 8000 str.w r8, [r4]
|
|
80118c4: 6062 str r2, [r4, #4]
|
|
80118c6: ddb7 ble.n 8011838 <_vfprintf_r+0x12d0>
|
|
80118c8: e7ae b.n 8011828 <_vfprintf_r+0x12c0>
|
|
80118ca: 3508 adds r5, #8
|
|
80118cc: e7b4 b.n 8011838 <_vfprintf_r+0x12d0>
|
|
80118ce: 460c mov r4, r1
|
|
80118d0: f7ff ba7e b.w 8010dd0 <_vfprintf_r+0x868>
|
|
80118d4: e9dd 3210 ldrd r3, r2, [sp, #64] ; 0x40
|
|
80118d8: 1a9d subs r5, r3, r2
|
|
80118da: 2d00 cmp r5, #0
|
|
80118dc: f77f aa7c ble.w 8010dd8 <_vfprintf_r+0x870>
|
|
80118e0: 4e3d ldr r6, [pc, #244] ; (80119d8 <_vfprintf_r+0x1470>)
|
|
80118e2: 2710 movs r7, #16
|
|
80118e4: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
|
|
80118e8: 2d10 cmp r5, #16
|
|
80118ea: f103 0301 add.w r3, r3, #1
|
|
80118ee: 6026 str r6, [r4, #0]
|
|
80118f0: dc18 bgt.n 8011924 <_vfprintf_r+0x13bc>
|
|
80118f2: 6065 str r5, [r4, #4]
|
|
80118f4: 2b07 cmp r3, #7
|
|
80118f6: 4415 add r5, r2
|
|
80118f8: e9cd 3523 strd r3, r5, [sp, #140] ; 0x8c
|
|
80118fc: f77f aa6c ble.w 8010dd8 <_vfprintf_r+0x870>
|
|
8011900: aa22 add r2, sp, #136 ; 0x88
|
|
8011902: 4649 mov r1, r9
|
|
8011904: 4650 mov r0, sl
|
|
8011906: f002 f882 bl 8013a0e <__sprint_r>
|
|
801190a: 2800 cmp r0, #0
|
|
801190c: f43f aa64 beq.w 8010dd8 <_vfprintf_r+0x870>
|
|
8011910: 9b03 ldr r3, [sp, #12]
|
|
8011912: 2b00 cmp r3, #0
|
|
8011914: f43f a879 beq.w 8010a0a <_vfprintf_r+0x4a2>
|
|
8011918: 4619 mov r1, r3
|
|
801191a: 4650 mov r0, sl
|
|
801191c: f001 f8fa bl 8012b14 <_free_r>
|
|
8011920: f7ff b873 b.w 8010a0a <_vfprintf_r+0x4a2>
|
|
8011924: 3210 adds r2, #16
|
|
8011926: 2b07 cmp r3, #7
|
|
8011928: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
|
|
801192c: 6067 str r7, [r4, #4]
|
|
801192e: dc02 bgt.n 8011936 <_vfprintf_r+0x13ce>
|
|
8011930: 3408 adds r4, #8
|
|
8011932: 3d10 subs r5, #16
|
|
8011934: e7d6 b.n 80118e4 <_vfprintf_r+0x137c>
|
|
8011936: aa22 add r2, sp, #136 ; 0x88
|
|
8011938: 4649 mov r1, r9
|
|
801193a: 4650 mov r0, sl
|
|
801193c: f002 f867 bl 8013a0e <__sprint_r>
|
|
8011940: 2800 cmp r0, #0
|
|
8011942: d1e5 bne.n 8011910 <_vfprintf_r+0x13a8>
|
|
8011944: ac25 add r4, sp, #148 ; 0x94
|
|
8011946: e7f4 b.n 8011932 <_vfprintf_r+0x13ca>
|
|
8011948: 9903 ldr r1, [sp, #12]
|
|
801194a: 4650 mov r0, sl
|
|
801194c: f001 f8e2 bl 8012b14 <_free_r>
|
|
8011950: f7ff ba5a b.w 8010e08 <_vfprintf_r+0x8a0>
|
|
8011954: 9b24 ldr r3, [sp, #144] ; 0x90
|
|
8011956: b91b cbnz r3, 8011960 <_vfprintf_r+0x13f8>
|
|
8011958: 2300 movs r3, #0
|
|
801195a: 9323 str r3, [sp, #140] ; 0x8c
|
|
801195c: f7ff b855 b.w 8010a0a <_vfprintf_r+0x4a2>
|
|
8011960: aa22 add r2, sp, #136 ; 0x88
|
|
8011962: 4649 mov r1, r9
|
|
8011964: 4650 mov r0, sl
|
|
8011966: f002 f852 bl 8013a0e <__sprint_r>
|
|
801196a: 2800 cmp r0, #0
|
|
801196c: d0f4 beq.n 8011958 <_vfprintf_r+0x13f0>
|
|
801196e: f7ff b84c b.w 8010a0a <_vfprintf_r+0x4a2>
|
|
8011972: ea56 0205 orrs.w r2, r6, r5
|
|
8011976: 465f mov r7, fp
|
|
8011978: f43f ab70 beq.w 801105c <_vfprintf_r+0xaf4>
|
|
801197c: 2b01 cmp r3, #1
|
|
801197e: f43f ac0d beq.w 801119c <_vfprintf_r+0xc34>
|
|
8011982: 2b02 cmp r3, #2
|
|
8011984: f50d 789c add.w r8, sp, #312 ; 0x138
|
|
8011988: f43f ac54 beq.w 8011234 <_vfprintf_r+0xccc>
|
|
801198c: f006 0307 and.w r3, r6, #7
|
|
8011990: 08f6 lsrs r6, r6, #3
|
|
8011992: ea46 7645 orr.w r6, r6, r5, lsl #29
|
|
8011996: 08ed lsrs r5, r5, #3
|
|
8011998: 3330 adds r3, #48 ; 0x30
|
|
801199a: ea56 0105 orrs.w r1, r6, r5
|
|
801199e: 4642 mov r2, r8
|
|
80119a0: f808 3d01 strb.w r3, [r8, #-1]!
|
|
80119a4: d1f2 bne.n 801198c <_vfprintf_r+0x1424>
|
|
80119a6: 07f8 lsls r0, r7, #31
|
|
80119a8: d506 bpl.n 80119b8 <_vfprintf_r+0x1450>
|
|
80119aa: 2b30 cmp r3, #48 ; 0x30
|
|
80119ac: d004 beq.n 80119b8 <_vfprintf_r+0x1450>
|
|
80119ae: 2330 movs r3, #48 ; 0x30
|
|
80119b0: f808 3c01 strb.w r3, [r8, #-1]
|
|
80119b4: f1a2 0802 sub.w r8, r2, #2
|
|
80119b8: ab4e add r3, sp, #312 ; 0x138
|
|
80119ba: eba3 0308 sub.w r3, r3, r8
|
|
80119be: 9e04 ldr r6, [sp, #16]
|
|
80119c0: 9304 str r3, [sp, #16]
|
|
80119c2: 2300 movs r3, #0
|
|
80119c4: 46bb mov fp, r7
|
|
80119c6: 9303 str r3, [sp, #12]
|
|
80119c8: e9cd 3308 strd r3, r3, [sp, #32]
|
|
80119cc: 461d mov r5, r3
|
|
80119ce: f7ff b945 b.w 8010c5c <_vfprintf_r+0x6f4>
|
|
80119d2: bf00 nop
|
|
80119d4: 0801809c .word 0x0801809c
|
|
80119d8: 0801808c .word 0x0801808c
|
|
|
|
080119dc <__sbprintf>:
|
|
80119dc: b570 push {r4, r5, r6, lr}
|
|
80119de: 460c mov r4, r1
|
|
80119e0: 8989 ldrh r1, [r1, #12]
|
|
80119e2: f5ad 6d8e sub.w sp, sp, #1136 ; 0x470
|
|
80119e6: f021 0102 bic.w r1, r1, #2
|
|
80119ea: f8ad 1014 strh.w r1, [sp, #20]
|
|
80119ee: 6e61 ldr r1, [r4, #100] ; 0x64
|
|
80119f0: 911b str r1, [sp, #108] ; 0x6c
|
|
80119f2: 89e1 ldrh r1, [r4, #14]
|
|
80119f4: f8ad 1016 strh.w r1, [sp, #22]
|
|
80119f8: 69e1 ldr r1, [r4, #28]
|
|
80119fa: 9109 str r1, [sp, #36] ; 0x24
|
|
80119fc: 6a61 ldr r1, [r4, #36] ; 0x24
|
|
80119fe: 910b str r1, [sp, #44] ; 0x2c
|
|
8011a00: a91c add r1, sp, #112 ; 0x70
|
|
8011a02: 9102 str r1, [sp, #8]
|
|
8011a04: 9106 str r1, [sp, #24]
|
|
8011a06: f44f 6180 mov.w r1, #1024 ; 0x400
|
|
8011a0a: 4606 mov r6, r0
|
|
8011a0c: 9104 str r1, [sp, #16]
|
|
8011a0e: 9107 str r1, [sp, #28]
|
|
8011a10: a818 add r0, sp, #96 ; 0x60
|
|
8011a12: 2100 movs r1, #0
|
|
8011a14: e9cd 3200 strd r3, r2, [sp]
|
|
8011a18: 9108 str r1, [sp, #32]
|
|
8011a1a: f001 f95f bl 8012cdc <__retarget_lock_init_recursive>
|
|
8011a1e: e9dd 3200 ldrd r3, r2, [sp]
|
|
8011a22: a902 add r1, sp, #8
|
|
8011a24: 4630 mov r0, r6
|
|
8011a26: f7fe fd9f bl 8010568 <_vfprintf_r>
|
|
8011a2a: 1e05 subs r5, r0, #0
|
|
8011a2c: db07 blt.n 8011a3e <__sbprintf+0x62>
|
|
8011a2e: a902 add r1, sp, #8
|
|
8011a30: 4630 mov r0, r6
|
|
8011a32: f000 ff73 bl 801291c <_fflush_r>
|
|
8011a36: 2800 cmp r0, #0
|
|
8011a38: bf18 it ne
|
|
8011a3a: f04f 35ff movne.w r5, #4294967295
|
|
8011a3e: f8bd 3014 ldrh.w r3, [sp, #20]
|
|
8011a42: 9818 ldr r0, [sp, #96] ; 0x60
|
|
8011a44: 065b lsls r3, r3, #25
|
|
8011a46: bf42 ittt mi
|
|
8011a48: 89a3 ldrhmi r3, [r4, #12]
|
|
8011a4a: f043 0340 orrmi.w r3, r3, #64 ; 0x40
|
|
8011a4e: 81a3 strhmi r3, [r4, #12]
|
|
8011a50: f001 f945 bl 8012cde <__retarget_lock_close_recursive>
|
|
8011a54: 4628 mov r0, r5
|
|
8011a56: f50d 6d8e add.w sp, sp, #1136 ; 0x470
|
|
8011a5a: bd70 pop {r4, r5, r6, pc}
|
|
|
|
08011a5c <__swsetup_r>:
|
|
8011a5c: b538 push {r3, r4, r5, lr}
|
|
8011a5e: 4b2a ldr r3, [pc, #168] ; (8011b08 <__swsetup_r+0xac>)
|
|
8011a60: 4605 mov r5, r0
|
|
8011a62: 6818 ldr r0, [r3, #0]
|
|
8011a64: 460c mov r4, r1
|
|
8011a66: b118 cbz r0, 8011a70 <__swsetup_r+0x14>
|
|
8011a68: 6b83 ldr r3, [r0, #56] ; 0x38
|
|
8011a6a: b90b cbnz r3, 8011a70 <__swsetup_r+0x14>
|
|
8011a6c: f000 ffc2 bl 80129f4 <__sinit>
|
|
8011a70: 89a3 ldrh r3, [r4, #12]
|
|
8011a72: f9b4 200c ldrsh.w r2, [r4, #12]
|
|
8011a76: 0718 lsls r0, r3, #28
|
|
8011a78: d422 bmi.n 8011ac0 <__swsetup_r+0x64>
|
|
8011a7a: 06d9 lsls r1, r3, #27
|
|
8011a7c: d407 bmi.n 8011a8e <__swsetup_r+0x32>
|
|
8011a7e: 2309 movs r3, #9
|
|
8011a80: 602b str r3, [r5, #0]
|
|
8011a82: f042 0340 orr.w r3, r2, #64 ; 0x40
|
|
8011a86: 81a3 strh r3, [r4, #12]
|
|
8011a88: f04f 30ff mov.w r0, #4294967295
|
|
8011a8c: e034 b.n 8011af8 <__swsetup_r+0x9c>
|
|
8011a8e: 0758 lsls r0, r3, #29
|
|
8011a90: d512 bpl.n 8011ab8 <__swsetup_r+0x5c>
|
|
8011a92: 6b21 ldr r1, [r4, #48] ; 0x30
|
|
8011a94: b141 cbz r1, 8011aa8 <__swsetup_r+0x4c>
|
|
8011a96: f104 0340 add.w r3, r4, #64 ; 0x40
|
|
8011a9a: 4299 cmp r1, r3
|
|
8011a9c: d002 beq.n 8011aa4 <__swsetup_r+0x48>
|
|
8011a9e: 4628 mov r0, r5
|
|
8011aa0: f001 f838 bl 8012b14 <_free_r>
|
|
8011aa4: 2300 movs r3, #0
|
|
8011aa6: 6323 str r3, [r4, #48] ; 0x30
|
|
8011aa8: 89a3 ldrh r3, [r4, #12]
|
|
8011aaa: f023 0324 bic.w r3, r3, #36 ; 0x24
|
|
8011aae: 81a3 strh r3, [r4, #12]
|
|
8011ab0: 2300 movs r3, #0
|
|
8011ab2: 6063 str r3, [r4, #4]
|
|
8011ab4: 6923 ldr r3, [r4, #16]
|
|
8011ab6: 6023 str r3, [r4, #0]
|
|
8011ab8: 89a3 ldrh r3, [r4, #12]
|
|
8011aba: f043 0308 orr.w r3, r3, #8
|
|
8011abe: 81a3 strh r3, [r4, #12]
|
|
8011ac0: 6923 ldr r3, [r4, #16]
|
|
8011ac2: b94b cbnz r3, 8011ad8 <__swsetup_r+0x7c>
|
|
8011ac4: 89a3 ldrh r3, [r4, #12]
|
|
8011ac6: f403 7320 and.w r3, r3, #640 ; 0x280
|
|
8011aca: f5b3 7f00 cmp.w r3, #512 ; 0x200
|
|
8011ace: d003 beq.n 8011ad8 <__swsetup_r+0x7c>
|
|
8011ad0: 4621 mov r1, r4
|
|
8011ad2: 4628 mov r0, r5
|
|
8011ad4: f001 f932 bl 8012d3c <__smakebuf_r>
|
|
8011ad8: 89a0 ldrh r0, [r4, #12]
|
|
8011ada: f9b4 200c ldrsh.w r2, [r4, #12]
|
|
8011ade: f010 0301 ands.w r3, r0, #1
|
|
8011ae2: d00a beq.n 8011afa <__swsetup_r+0x9e>
|
|
8011ae4: 2300 movs r3, #0
|
|
8011ae6: 60a3 str r3, [r4, #8]
|
|
8011ae8: 6963 ldr r3, [r4, #20]
|
|
8011aea: 425b negs r3, r3
|
|
8011aec: 61a3 str r3, [r4, #24]
|
|
8011aee: 6923 ldr r3, [r4, #16]
|
|
8011af0: b943 cbnz r3, 8011b04 <__swsetup_r+0xa8>
|
|
8011af2: f010 0080 ands.w r0, r0, #128 ; 0x80
|
|
8011af6: d1c4 bne.n 8011a82 <__swsetup_r+0x26>
|
|
8011af8: bd38 pop {r3, r4, r5, pc}
|
|
8011afa: 0781 lsls r1, r0, #30
|
|
8011afc: bf58 it pl
|
|
8011afe: 6963 ldrpl r3, [r4, #20]
|
|
8011b00: 60a3 str r3, [r4, #8]
|
|
8011b02: e7f4 b.n 8011aee <__swsetup_r+0x92>
|
|
8011b04: 2000 movs r0, #0
|
|
8011b06: e7f7 b.n 8011af8 <__swsetup_r+0x9c>
|
|
8011b08: 20000030 .word 0x20000030
|
|
|
|
08011b0c <register_fini>:
|
|
8011b0c: 4b02 ldr r3, [pc, #8] ; (8011b18 <register_fini+0xc>)
|
|
8011b0e: b113 cbz r3, 8011b16 <register_fini+0xa>
|
|
8011b10: 4802 ldr r0, [pc, #8] ; (8011b1c <register_fini+0x10>)
|
|
8011b12: f000 b805 b.w 8011b20 <atexit>
|
|
8011b16: 4770 bx lr
|
|
8011b18: 00000000 .word 0x00000000
|
|
8011b1c: 08012a45 .word 0x08012a45
|
|
|
|
08011b20 <atexit>:
|
|
8011b20: 2300 movs r3, #0
|
|
8011b22: 4601 mov r1, r0
|
|
8011b24: 461a mov r2, r3
|
|
8011b26: 4618 mov r0, r3
|
|
8011b28: f002 bc8c b.w 8014444 <__register_exitproc>
|
|
|
|
08011b2c <quorem>:
|
|
8011b2c: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
|
|
8011b30: 6903 ldr r3, [r0, #16]
|
|
8011b32: 690c ldr r4, [r1, #16]
|
|
8011b34: 42a3 cmp r3, r4
|
|
8011b36: 4607 mov r7, r0
|
|
8011b38: f2c0 8081 blt.w 8011c3e <quorem+0x112>
|
|
8011b3c: 3c01 subs r4, #1
|
|
8011b3e: f101 0814 add.w r8, r1, #20
|
|
8011b42: f100 0514 add.w r5, r0, #20
|
|
8011b46: eb05 0384 add.w r3, r5, r4, lsl #2
|
|
8011b4a: 9301 str r3, [sp, #4]
|
|
8011b4c: f858 3024 ldr.w r3, [r8, r4, lsl #2]
|
|
8011b50: f855 2024 ldr.w r2, [r5, r4, lsl #2]
|
|
8011b54: 3301 adds r3, #1
|
|
8011b56: 429a cmp r2, r3
|
|
8011b58: ea4f 0b84 mov.w fp, r4, lsl #2
|
|
8011b5c: eb08 0984 add.w r9, r8, r4, lsl #2
|
|
8011b60: fbb2 f6f3 udiv r6, r2, r3
|
|
8011b64: d331 bcc.n 8011bca <quorem+0x9e>
|
|
8011b66: f04f 0e00 mov.w lr, #0
|
|
8011b6a: 4640 mov r0, r8
|
|
8011b6c: 46ac mov ip, r5
|
|
8011b6e: 46f2 mov sl, lr
|
|
8011b70: f850 2b04 ldr.w r2, [r0], #4
|
|
8011b74: b293 uxth r3, r2
|
|
8011b76: fb06 e303 mla r3, r6, r3, lr
|
|
8011b7a: ea4f 4e13 mov.w lr, r3, lsr #16
|
|
8011b7e: b29b uxth r3, r3
|
|
8011b80: ebaa 0303 sub.w r3, sl, r3
|
|
8011b84: f8dc a000 ldr.w sl, [ip]
|
|
8011b88: 0c12 lsrs r2, r2, #16
|
|
8011b8a: fa13 f38a uxtah r3, r3, sl
|
|
8011b8e: fb06 e202 mla r2, r6, r2, lr
|
|
8011b92: 9300 str r3, [sp, #0]
|
|
8011b94: 9b00 ldr r3, [sp, #0]
|
|
8011b96: ea4f 4e12 mov.w lr, r2, lsr #16
|
|
8011b9a: b292 uxth r2, r2
|
|
8011b9c: ebc2 421a rsb r2, r2, sl, lsr #16
|
|
8011ba0: eb02 4223 add.w r2, r2, r3, asr #16
|
|
8011ba4: f8bd 3000 ldrh.w r3, [sp]
|
|
8011ba8: 4581 cmp r9, r0
|
|
8011baa: ea43 4302 orr.w r3, r3, r2, lsl #16
|
|
8011bae: f84c 3b04 str.w r3, [ip], #4
|
|
8011bb2: ea4f 4a22 mov.w sl, r2, asr #16
|
|
8011bb6: d2db bcs.n 8011b70 <quorem+0x44>
|
|
8011bb8: f855 300b ldr.w r3, [r5, fp]
|
|
8011bbc: b92b cbnz r3, 8011bca <quorem+0x9e>
|
|
8011bbe: 9b01 ldr r3, [sp, #4]
|
|
8011bc0: 3b04 subs r3, #4
|
|
8011bc2: 429d cmp r5, r3
|
|
8011bc4: 461a mov r2, r3
|
|
8011bc6: d32e bcc.n 8011c26 <quorem+0xfa>
|
|
8011bc8: 613c str r4, [r7, #16]
|
|
8011bca: 4638 mov r0, r7
|
|
8011bcc: f001 fd72 bl 80136b4 <__mcmp>
|
|
8011bd0: 2800 cmp r0, #0
|
|
8011bd2: db24 blt.n 8011c1e <quorem+0xf2>
|
|
8011bd4: 3601 adds r6, #1
|
|
8011bd6: 4628 mov r0, r5
|
|
8011bd8: f04f 0c00 mov.w ip, #0
|
|
8011bdc: f858 2b04 ldr.w r2, [r8], #4
|
|
8011be0: f8d0 e000 ldr.w lr, [r0]
|
|
8011be4: b293 uxth r3, r2
|
|
8011be6: ebac 0303 sub.w r3, ip, r3
|
|
8011bea: 0c12 lsrs r2, r2, #16
|
|
8011bec: fa13 f38e uxtah r3, r3, lr
|
|
8011bf0: ebc2 421e rsb r2, r2, lr, lsr #16
|
|
8011bf4: eb02 4223 add.w r2, r2, r3, asr #16
|
|
8011bf8: b29b uxth r3, r3
|
|
8011bfa: ea43 4302 orr.w r3, r3, r2, lsl #16
|
|
8011bfe: 45c1 cmp r9, r8
|
|
8011c00: f840 3b04 str.w r3, [r0], #4
|
|
8011c04: ea4f 4c22 mov.w ip, r2, asr #16
|
|
8011c08: d2e8 bcs.n 8011bdc <quorem+0xb0>
|
|
8011c0a: f855 2024 ldr.w r2, [r5, r4, lsl #2]
|
|
8011c0e: eb05 0384 add.w r3, r5, r4, lsl #2
|
|
8011c12: b922 cbnz r2, 8011c1e <quorem+0xf2>
|
|
8011c14: 3b04 subs r3, #4
|
|
8011c16: 429d cmp r5, r3
|
|
8011c18: 461a mov r2, r3
|
|
8011c1a: d30a bcc.n 8011c32 <quorem+0x106>
|
|
8011c1c: 613c str r4, [r7, #16]
|
|
8011c1e: 4630 mov r0, r6
|
|
8011c20: b003 add sp, #12
|
|
8011c22: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
|
|
8011c26: 6812 ldr r2, [r2, #0]
|
|
8011c28: 3b04 subs r3, #4
|
|
8011c2a: 2a00 cmp r2, #0
|
|
8011c2c: d1cc bne.n 8011bc8 <quorem+0x9c>
|
|
8011c2e: 3c01 subs r4, #1
|
|
8011c30: e7c7 b.n 8011bc2 <quorem+0x96>
|
|
8011c32: 6812 ldr r2, [r2, #0]
|
|
8011c34: 3b04 subs r3, #4
|
|
8011c36: 2a00 cmp r2, #0
|
|
8011c38: d1f0 bne.n 8011c1c <quorem+0xf0>
|
|
8011c3a: 3c01 subs r4, #1
|
|
8011c3c: e7eb b.n 8011c16 <quorem+0xea>
|
|
8011c3e: 2000 movs r0, #0
|
|
8011c40: e7ee b.n 8011c20 <quorem+0xf4>
|
|
8011c42: 0000 movs r0, r0
|
|
8011c44: 0000 movs r0, r0
|
|
...
|
|
|
|
08011c48 <_dtoa_r>:
|
|
8011c48: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
|
|
8011c4c: ed2d 8b04 vpush {d8-d9}
|
|
8011c50: b093 sub sp, #76 ; 0x4c
|
|
8011c52: ec57 6b10 vmov r6, r7, d0
|
|
8011c56: 9106 str r1, [sp, #24]
|
|
8011c58: 6c01 ldr r1, [r0, #64] ; 0x40
|
|
8011c5a: 9d20 ldr r5, [sp, #128] ; 0x80
|
|
8011c5c: 9209 str r2, [sp, #36] ; 0x24
|
|
8011c5e: ee10 aa10 vmov sl, s0
|
|
8011c62: 4604 mov r4, r0
|
|
8011c64: 930c str r3, [sp, #48] ; 0x30
|
|
8011c66: 46bb mov fp, r7
|
|
8011c68: b141 cbz r1, 8011c7c <_dtoa_r+0x34>
|
|
8011c6a: 6c42 ldr r2, [r0, #68] ; 0x44
|
|
8011c6c: 604a str r2, [r1, #4]
|
|
8011c6e: 2301 movs r3, #1
|
|
8011c70: 4093 lsls r3, r2
|
|
8011c72: 608b str r3, [r1, #8]
|
|
8011c74: f001 fb0f bl 8013296 <_Bfree>
|
|
8011c78: 2300 movs r3, #0
|
|
8011c7a: 6423 str r3, [r4, #64] ; 0x40
|
|
8011c7c: 1e3b subs r3, r7, #0
|
|
8011c7e: bfaa itet ge
|
|
8011c80: 2300 movge r3, #0
|
|
8011c82: f023 4b00 biclt.w fp, r3, #2147483648 ; 0x80000000
|
|
8011c86: 602b strge r3, [r5, #0]
|
|
8011c88: 4ba3 ldr r3, [pc, #652] ; (8011f18 <_dtoa_r+0x2d0>)
|
|
8011c8a: bfbc itt lt
|
|
8011c8c: 2201 movlt r2, #1
|
|
8011c8e: 602a strlt r2, [r5, #0]
|
|
8011c90: ea33 030b bics.w r3, r3, fp
|
|
8011c94: d11b bne.n 8011cce <_dtoa_r+0x86>
|
|
8011c96: 9a0c ldr r2, [sp, #48] ; 0x30
|
|
8011c98: f242 730f movw r3, #9999 ; 0x270f
|
|
8011c9c: 6013 str r3, [r2, #0]
|
|
8011c9e: f3cb 0313 ubfx r3, fp, #0, #20
|
|
8011ca2: 4333 orrs r3, r6
|
|
8011ca4: f000 8590 beq.w 80127c8 <_dtoa_r+0xb80>
|
|
8011ca8: 9b21 ldr r3, [sp, #132] ; 0x84
|
|
8011caa: b90b cbnz r3, 8011cb0 <_dtoa_r+0x68>
|
|
8011cac: 4b9b ldr r3, [pc, #620] ; (8011f1c <_dtoa_r+0x2d4>)
|
|
8011cae: e022 b.n 8011cf6 <_dtoa_r+0xae>
|
|
8011cb0: 4b9a ldr r3, [pc, #616] ; (8011f1c <_dtoa_r+0x2d4>)
|
|
8011cb2: 9301 str r3, [sp, #4]
|
|
8011cb4: 3303 adds r3, #3
|
|
8011cb6: 9a21 ldr r2, [sp, #132] ; 0x84
|
|
8011cb8: 6013 str r3, [r2, #0]
|
|
8011cba: 9801 ldr r0, [sp, #4]
|
|
8011cbc: b013 add sp, #76 ; 0x4c
|
|
8011cbe: ecbd 8b04 vpop {d8-d9}
|
|
8011cc2: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
|
|
8011cc6: 4b96 ldr r3, [pc, #600] ; (8011f20 <_dtoa_r+0x2d8>)
|
|
8011cc8: 9301 str r3, [sp, #4]
|
|
8011cca: 3308 adds r3, #8
|
|
8011ccc: e7f3 b.n 8011cb6 <_dtoa_r+0x6e>
|
|
8011cce: 2200 movs r2, #0
|
|
8011cd0: 2300 movs r3, #0
|
|
8011cd2: 4650 mov r0, sl
|
|
8011cd4: 4659 mov r1, fp
|
|
8011cd6: f7ee ff07 bl 8000ae8 <__aeabi_dcmpeq>
|
|
8011cda: ec4b ab19 vmov d9, sl, fp
|
|
8011cde: 4680 mov r8, r0
|
|
8011ce0: b158 cbz r0, 8011cfa <_dtoa_r+0xb2>
|
|
8011ce2: 9a0c ldr r2, [sp, #48] ; 0x30
|
|
8011ce4: 2301 movs r3, #1
|
|
8011ce6: 6013 str r3, [r2, #0]
|
|
8011ce8: 9b21 ldr r3, [sp, #132] ; 0x84
|
|
8011cea: 2b00 cmp r3, #0
|
|
8011cec: f000 8569 beq.w 80127c2 <_dtoa_r+0xb7a>
|
|
8011cf0: 488c ldr r0, [pc, #560] ; (8011f24 <_dtoa_r+0x2dc>)
|
|
8011cf2: 6018 str r0, [r3, #0]
|
|
8011cf4: 1e43 subs r3, r0, #1
|
|
8011cf6: 9301 str r3, [sp, #4]
|
|
8011cf8: e7df b.n 8011cba <_dtoa_r+0x72>
|
|
8011cfa: ec4b ab10 vmov d0, sl, fp
|
|
8011cfe: aa10 add r2, sp, #64 ; 0x40
|
|
8011d00: a911 add r1, sp, #68 ; 0x44
|
|
8011d02: 4620 mov r0, r4
|
|
8011d04: f001 fd7c bl 8013800 <__d2b>
|
|
8011d08: f3cb 550a ubfx r5, fp, #20, #11
|
|
8011d0c: ee08 0a10 vmov s16, r0
|
|
8011d10: 2d00 cmp r5, #0
|
|
8011d12: f000 8082 beq.w 8011e1a <_dtoa_r+0x1d2>
|
|
8011d16: ee19 3a90 vmov r3, s19
|
|
8011d1a: f3c3 0313 ubfx r3, r3, #0, #20
|
|
8011d1e: f043 577f orr.w r7, r3, #1069547520 ; 0x3fc00000
|
|
8011d22: 4656 mov r6, sl
|
|
8011d24: f447 1740 orr.w r7, r7, #3145728 ; 0x300000
|
|
8011d28: f2a5 35ff subw r5, r5, #1023 ; 0x3ff
|
|
8011d2c: f8cd 8038 str.w r8, [sp, #56] ; 0x38
|
|
8011d30: 4b7d ldr r3, [pc, #500] ; (8011f28 <_dtoa_r+0x2e0>)
|
|
8011d32: 2200 movs r2, #0
|
|
8011d34: 4630 mov r0, r6
|
|
8011d36: 4639 mov r1, r7
|
|
8011d38: f7ee fab6 bl 80002a8 <__aeabi_dsub>
|
|
8011d3c: a370 add r3, pc, #448 ; (adr r3, 8011f00 <_dtoa_r+0x2b8>)
|
|
8011d3e: e9d3 2300 ldrd r2, r3, [r3]
|
|
8011d42: f7ee fc69 bl 8000618 <__aeabi_dmul>
|
|
8011d46: a370 add r3, pc, #448 ; (adr r3, 8011f08 <_dtoa_r+0x2c0>)
|
|
8011d48: e9d3 2300 ldrd r2, r3, [r3]
|
|
8011d4c: f7ee faae bl 80002ac <__adddf3>
|
|
8011d50: 4606 mov r6, r0
|
|
8011d52: 4628 mov r0, r5
|
|
8011d54: 460f mov r7, r1
|
|
8011d56: f7ee fbf5 bl 8000544 <__aeabi_i2d>
|
|
8011d5a: a36d add r3, pc, #436 ; (adr r3, 8011f10 <_dtoa_r+0x2c8>)
|
|
8011d5c: e9d3 2300 ldrd r2, r3, [r3]
|
|
8011d60: f7ee fc5a bl 8000618 <__aeabi_dmul>
|
|
8011d64: 4602 mov r2, r0
|
|
8011d66: 460b mov r3, r1
|
|
8011d68: 4630 mov r0, r6
|
|
8011d6a: 4639 mov r1, r7
|
|
8011d6c: f7ee fa9e bl 80002ac <__adddf3>
|
|
8011d70: 4606 mov r6, r0
|
|
8011d72: 460f mov r7, r1
|
|
8011d74: f7ee ff00 bl 8000b78 <__aeabi_d2iz>
|
|
8011d78: 2200 movs r2, #0
|
|
8011d7a: 9000 str r0, [sp, #0]
|
|
8011d7c: 2300 movs r3, #0
|
|
8011d7e: 4630 mov r0, r6
|
|
8011d80: 4639 mov r1, r7
|
|
8011d82: f7ee febb bl 8000afc <__aeabi_dcmplt>
|
|
8011d86: b150 cbz r0, 8011d9e <_dtoa_r+0x156>
|
|
8011d88: 9800 ldr r0, [sp, #0]
|
|
8011d8a: f7ee fbdb bl 8000544 <__aeabi_i2d>
|
|
8011d8e: 4632 mov r2, r6
|
|
8011d90: 463b mov r3, r7
|
|
8011d92: f7ee fea9 bl 8000ae8 <__aeabi_dcmpeq>
|
|
8011d96: b910 cbnz r0, 8011d9e <_dtoa_r+0x156>
|
|
8011d98: 9b00 ldr r3, [sp, #0]
|
|
8011d9a: 3b01 subs r3, #1
|
|
8011d9c: 9300 str r3, [sp, #0]
|
|
8011d9e: 9b00 ldr r3, [sp, #0]
|
|
8011da0: 2b16 cmp r3, #22
|
|
8011da2: d858 bhi.n 8011e56 <_dtoa_r+0x20e>
|
|
8011da4: 9a00 ldr r2, [sp, #0]
|
|
8011da6: 4b61 ldr r3, [pc, #388] ; (8011f2c <_dtoa_r+0x2e4>)
|
|
8011da8: eb03 03c2 add.w r3, r3, r2, lsl #3
|
|
8011dac: e9d3 2300 ldrd r2, r3, [r3]
|
|
8011db0: ec51 0b19 vmov r0, r1, d9
|
|
8011db4: f7ee fea2 bl 8000afc <__aeabi_dcmplt>
|
|
8011db8: 2800 cmp r0, #0
|
|
8011dba: d04e beq.n 8011e5a <_dtoa_r+0x212>
|
|
8011dbc: 9b00 ldr r3, [sp, #0]
|
|
8011dbe: 3b01 subs r3, #1
|
|
8011dc0: 9300 str r3, [sp, #0]
|
|
8011dc2: 2300 movs r3, #0
|
|
8011dc4: 930b str r3, [sp, #44] ; 0x2c
|
|
8011dc6: 9b10 ldr r3, [sp, #64] ; 0x40
|
|
8011dc8: 1b5d subs r5, r3, r5
|
|
8011dca: 1e6b subs r3, r5, #1
|
|
8011dcc: 9305 str r3, [sp, #20]
|
|
8011dce: bf45 ittet mi
|
|
8011dd0: f1c5 0301 rsbmi r3, r5, #1
|
|
8011dd4: 9304 strmi r3, [sp, #16]
|
|
8011dd6: 2300 movpl r3, #0
|
|
8011dd8: 2300 movmi r3, #0
|
|
8011dda: bf4c ite mi
|
|
8011ddc: 9305 strmi r3, [sp, #20]
|
|
8011dde: 9304 strpl r3, [sp, #16]
|
|
8011de0: 9b00 ldr r3, [sp, #0]
|
|
8011de2: 2b00 cmp r3, #0
|
|
8011de4: db3b blt.n 8011e5e <_dtoa_r+0x216>
|
|
8011de6: 9b05 ldr r3, [sp, #20]
|
|
8011de8: 9a00 ldr r2, [sp, #0]
|
|
8011dea: 920a str r2, [sp, #40] ; 0x28
|
|
8011dec: 4413 add r3, r2
|
|
8011dee: 9305 str r3, [sp, #20]
|
|
8011df0: 2300 movs r3, #0
|
|
8011df2: 9307 str r3, [sp, #28]
|
|
8011df4: 9b06 ldr r3, [sp, #24]
|
|
8011df6: 2b09 cmp r3, #9
|
|
8011df8: d869 bhi.n 8011ece <_dtoa_r+0x286>
|
|
8011dfa: 2b05 cmp r3, #5
|
|
8011dfc: bfc4 itt gt
|
|
8011dfe: 3b04 subgt r3, #4
|
|
8011e00: 9306 strgt r3, [sp, #24]
|
|
8011e02: 9b06 ldr r3, [sp, #24]
|
|
8011e04: f1a3 0302 sub.w r3, r3, #2
|
|
8011e08: bfcc ite gt
|
|
8011e0a: 2500 movgt r5, #0
|
|
8011e0c: 2501 movle r5, #1
|
|
8011e0e: 2b03 cmp r3, #3
|
|
8011e10: d868 bhi.n 8011ee4 <_dtoa_r+0x29c>
|
|
8011e12: e8df f003 tbb [pc, r3]
|
|
8011e16: 3a2d .short 0x3a2d
|
|
8011e18: 5a38 .short 0x5a38
|
|
8011e1a: e9dd 5310 ldrd r5, r3, [sp, #64] ; 0x40
|
|
8011e1e: 441d add r5, r3
|
|
8011e20: f205 4332 addw r3, r5, #1074 ; 0x432
|
|
8011e24: 2b20 cmp r3, #32
|
|
8011e26: bfc1 itttt gt
|
|
8011e28: f1c3 0340 rsbgt r3, r3, #64 ; 0x40
|
|
8011e2c: f205 4012 addwgt r0, r5, #1042 ; 0x412
|
|
8011e30: fa0b f303 lslgt.w r3, fp, r3
|
|
8011e34: fa26 f000 lsrgt.w r0, r6, r0
|
|
8011e38: bfda itte le
|
|
8011e3a: f1c3 0320 rsble r3, r3, #32
|
|
8011e3e: fa06 f003 lslle.w r0, r6, r3
|
|
8011e42: 4318 orrgt r0, r3
|
|
8011e44: f7ee fb6e bl 8000524 <__aeabi_ui2d>
|
|
8011e48: 2301 movs r3, #1
|
|
8011e4a: 4606 mov r6, r0
|
|
8011e4c: f1a1 77f8 sub.w r7, r1, #32505856 ; 0x1f00000
|
|
8011e50: 3d01 subs r5, #1
|
|
8011e52: 930e str r3, [sp, #56] ; 0x38
|
|
8011e54: e76c b.n 8011d30 <_dtoa_r+0xe8>
|
|
8011e56: 2301 movs r3, #1
|
|
8011e58: e7b4 b.n 8011dc4 <_dtoa_r+0x17c>
|
|
8011e5a: 900b str r0, [sp, #44] ; 0x2c
|
|
8011e5c: e7b3 b.n 8011dc6 <_dtoa_r+0x17e>
|
|
8011e5e: 9b04 ldr r3, [sp, #16]
|
|
8011e60: 9a00 ldr r2, [sp, #0]
|
|
8011e62: 1a9b subs r3, r3, r2
|
|
8011e64: 9304 str r3, [sp, #16]
|
|
8011e66: 4253 negs r3, r2
|
|
8011e68: 9307 str r3, [sp, #28]
|
|
8011e6a: 2300 movs r3, #0
|
|
8011e6c: 930a str r3, [sp, #40] ; 0x28
|
|
8011e6e: e7c1 b.n 8011df4 <_dtoa_r+0x1ac>
|
|
8011e70: 2300 movs r3, #0
|
|
8011e72: 9308 str r3, [sp, #32]
|
|
8011e74: 9b09 ldr r3, [sp, #36] ; 0x24
|
|
8011e76: 2b00 cmp r3, #0
|
|
8011e78: dc37 bgt.n 8011eea <_dtoa_r+0x2a2>
|
|
8011e7a: 2301 movs r3, #1
|
|
8011e7c: e9cd 3302 strd r3, r3, [sp, #8]
|
|
8011e80: 461a mov r2, r3
|
|
8011e82: 9209 str r2, [sp, #36] ; 0x24
|
|
8011e84: e00c b.n 8011ea0 <_dtoa_r+0x258>
|
|
8011e86: 2301 movs r3, #1
|
|
8011e88: e7f3 b.n 8011e72 <_dtoa_r+0x22a>
|
|
8011e8a: 2300 movs r3, #0
|
|
8011e8c: 9a09 ldr r2, [sp, #36] ; 0x24
|
|
8011e8e: 9308 str r3, [sp, #32]
|
|
8011e90: 9b00 ldr r3, [sp, #0]
|
|
8011e92: 4413 add r3, r2
|
|
8011e94: 9302 str r3, [sp, #8]
|
|
8011e96: 3301 adds r3, #1
|
|
8011e98: 2b01 cmp r3, #1
|
|
8011e9a: 9303 str r3, [sp, #12]
|
|
8011e9c: bfb8 it lt
|
|
8011e9e: 2301 movlt r3, #1
|
|
8011ea0: 2200 movs r2, #0
|
|
8011ea2: 6462 str r2, [r4, #68] ; 0x44
|
|
8011ea4: 2204 movs r2, #4
|
|
8011ea6: f102 0014 add.w r0, r2, #20
|
|
8011eaa: 4298 cmp r0, r3
|
|
8011eac: 6c61 ldr r1, [r4, #68] ; 0x44
|
|
8011eae: d920 bls.n 8011ef2 <_dtoa_r+0x2aa>
|
|
8011eb0: 4620 mov r0, r4
|
|
8011eb2: f001 f9cb bl 801324c <_Balloc>
|
|
8011eb6: 9001 str r0, [sp, #4]
|
|
8011eb8: 2800 cmp r0, #0
|
|
8011eba: d13d bne.n 8011f38 <_dtoa_r+0x2f0>
|
|
8011ebc: 4b1c ldr r3, [pc, #112] ; (8011f30 <_dtoa_r+0x2e8>)
|
|
8011ebe: 4602 mov r2, r0
|
|
8011ec0: f44f 71d5 mov.w r1, #426 ; 0x1aa
|
|
8011ec4: 481b ldr r0, [pc, #108] ; (8011f34 <_dtoa_r+0x2ec>)
|
|
8011ec6: f002 faff bl 80144c8 <__assert_func>
|
|
8011eca: 2301 movs r3, #1
|
|
8011ecc: e7de b.n 8011e8c <_dtoa_r+0x244>
|
|
8011ece: 2501 movs r5, #1
|
|
8011ed0: 2300 movs r3, #0
|
|
8011ed2: 9306 str r3, [sp, #24]
|
|
8011ed4: 9508 str r5, [sp, #32]
|
|
8011ed6: f04f 33ff mov.w r3, #4294967295
|
|
8011eda: e9cd 3302 strd r3, r3, [sp, #8]
|
|
8011ede: 2200 movs r2, #0
|
|
8011ee0: 2312 movs r3, #18
|
|
8011ee2: e7ce b.n 8011e82 <_dtoa_r+0x23a>
|
|
8011ee4: 2301 movs r3, #1
|
|
8011ee6: 9308 str r3, [sp, #32]
|
|
8011ee8: e7f5 b.n 8011ed6 <_dtoa_r+0x28e>
|
|
8011eea: 9b09 ldr r3, [sp, #36] ; 0x24
|
|
8011eec: e9cd 3302 strd r3, r3, [sp, #8]
|
|
8011ef0: e7d6 b.n 8011ea0 <_dtoa_r+0x258>
|
|
8011ef2: 3101 adds r1, #1
|
|
8011ef4: 6461 str r1, [r4, #68] ; 0x44
|
|
8011ef6: 0052 lsls r2, r2, #1
|
|
8011ef8: e7d5 b.n 8011ea6 <_dtoa_r+0x25e>
|
|
8011efa: bf00 nop
|
|
8011efc: f3af 8000 nop.w
|
|
8011f00: 636f4361 .word 0x636f4361
|
|
8011f04: 3fd287a7 .word 0x3fd287a7
|
|
8011f08: 8b60c8b3 .word 0x8b60c8b3
|
|
8011f0c: 3fc68a28 .word 0x3fc68a28
|
|
8011f10: 509f79fb .word 0x509f79fb
|
|
8011f14: 3fd34413 .word 0x3fd34413
|
|
8011f18: 7ff00000 .word 0x7ff00000
|
|
8011f1c: 080180ac .word 0x080180ac
|
|
8011f20: 080180b0 .word 0x080180b0
|
|
8011f24: 0801808b .word 0x0801808b
|
|
8011f28: 3ff80000 .word 0x3ff80000
|
|
8011f2c: 080181b0 .word 0x080181b0
|
|
8011f30: 080180b9 .word 0x080180b9
|
|
8011f34: 080180ca .word 0x080180ca
|
|
8011f38: 9b01 ldr r3, [sp, #4]
|
|
8011f3a: 6423 str r3, [r4, #64] ; 0x40
|
|
8011f3c: 9b03 ldr r3, [sp, #12]
|
|
8011f3e: 2b0e cmp r3, #14
|
|
8011f40: f200 809d bhi.w 801207e <_dtoa_r+0x436>
|
|
8011f44: 2d00 cmp r5, #0
|
|
8011f46: f000 809a beq.w 801207e <_dtoa_r+0x436>
|
|
8011f4a: 9b00 ldr r3, [sp, #0]
|
|
8011f4c: 2b00 cmp r3, #0
|
|
8011f4e: dd32 ble.n 8011fb6 <_dtoa_r+0x36e>
|
|
8011f50: 4ab7 ldr r2, [pc, #732] ; (8012230 <_dtoa_r+0x5e8>)
|
|
8011f52: f003 030f and.w r3, r3, #15
|
|
8011f56: eb02 03c3 add.w r3, r2, r3, lsl #3
|
|
8011f5a: e9d3 8900 ldrd r8, r9, [r3]
|
|
8011f5e: 9b00 ldr r3, [sp, #0]
|
|
8011f60: 05d8 lsls r0, r3, #23
|
|
8011f62: ea4f 1723 mov.w r7, r3, asr #4
|
|
8011f66: d516 bpl.n 8011f96 <_dtoa_r+0x34e>
|
|
8011f68: 4bb2 ldr r3, [pc, #712] ; (8012234 <_dtoa_r+0x5ec>)
|
|
8011f6a: ec51 0b19 vmov r0, r1, d9
|
|
8011f6e: e9d3 2308 ldrd r2, r3, [r3, #32]
|
|
8011f72: f7ee fc7b bl 800086c <__aeabi_ddiv>
|
|
8011f76: f007 070f and.w r7, r7, #15
|
|
8011f7a: 4682 mov sl, r0
|
|
8011f7c: 468b mov fp, r1
|
|
8011f7e: 2503 movs r5, #3
|
|
8011f80: 4eac ldr r6, [pc, #688] ; (8012234 <_dtoa_r+0x5ec>)
|
|
8011f82: b957 cbnz r7, 8011f9a <_dtoa_r+0x352>
|
|
8011f84: 4642 mov r2, r8
|
|
8011f86: 464b mov r3, r9
|
|
8011f88: 4650 mov r0, sl
|
|
8011f8a: 4659 mov r1, fp
|
|
8011f8c: f7ee fc6e bl 800086c <__aeabi_ddiv>
|
|
8011f90: 4682 mov sl, r0
|
|
8011f92: 468b mov fp, r1
|
|
8011f94: e028 b.n 8011fe8 <_dtoa_r+0x3a0>
|
|
8011f96: 2502 movs r5, #2
|
|
8011f98: e7f2 b.n 8011f80 <_dtoa_r+0x338>
|
|
8011f9a: 07f9 lsls r1, r7, #31
|
|
8011f9c: d508 bpl.n 8011fb0 <_dtoa_r+0x368>
|
|
8011f9e: 4640 mov r0, r8
|
|
8011fa0: 4649 mov r1, r9
|
|
8011fa2: e9d6 2300 ldrd r2, r3, [r6]
|
|
8011fa6: f7ee fb37 bl 8000618 <__aeabi_dmul>
|
|
8011faa: 3501 adds r5, #1
|
|
8011fac: 4680 mov r8, r0
|
|
8011fae: 4689 mov r9, r1
|
|
8011fb0: 107f asrs r7, r7, #1
|
|
8011fb2: 3608 adds r6, #8
|
|
8011fb4: e7e5 b.n 8011f82 <_dtoa_r+0x33a>
|
|
8011fb6: f000 809b beq.w 80120f0 <_dtoa_r+0x4a8>
|
|
8011fba: 9b00 ldr r3, [sp, #0]
|
|
8011fbc: 4f9d ldr r7, [pc, #628] ; (8012234 <_dtoa_r+0x5ec>)
|
|
8011fbe: 425e negs r6, r3
|
|
8011fc0: 4b9b ldr r3, [pc, #620] ; (8012230 <_dtoa_r+0x5e8>)
|
|
8011fc2: f006 020f and.w r2, r6, #15
|
|
8011fc6: eb03 03c2 add.w r3, r3, r2, lsl #3
|
|
8011fca: e9d3 2300 ldrd r2, r3, [r3]
|
|
8011fce: ec51 0b19 vmov r0, r1, d9
|
|
8011fd2: f7ee fb21 bl 8000618 <__aeabi_dmul>
|
|
8011fd6: 1136 asrs r6, r6, #4
|
|
8011fd8: 4682 mov sl, r0
|
|
8011fda: 468b mov fp, r1
|
|
8011fdc: 2300 movs r3, #0
|
|
8011fde: 2502 movs r5, #2
|
|
8011fe0: 2e00 cmp r6, #0
|
|
8011fe2: d17a bne.n 80120da <_dtoa_r+0x492>
|
|
8011fe4: 2b00 cmp r3, #0
|
|
8011fe6: d1d3 bne.n 8011f90 <_dtoa_r+0x348>
|
|
8011fe8: 9b0b ldr r3, [sp, #44] ; 0x2c
|
|
8011fea: 2b00 cmp r3, #0
|
|
8011fec: f000 8082 beq.w 80120f4 <_dtoa_r+0x4ac>
|
|
8011ff0: 4b91 ldr r3, [pc, #580] ; (8012238 <_dtoa_r+0x5f0>)
|
|
8011ff2: 2200 movs r2, #0
|
|
8011ff4: 4650 mov r0, sl
|
|
8011ff6: 4659 mov r1, fp
|
|
8011ff8: f7ee fd80 bl 8000afc <__aeabi_dcmplt>
|
|
8011ffc: 2800 cmp r0, #0
|
|
8011ffe: d079 beq.n 80120f4 <_dtoa_r+0x4ac>
|
|
8012000: 9b03 ldr r3, [sp, #12]
|
|
8012002: 2b00 cmp r3, #0
|
|
8012004: d076 beq.n 80120f4 <_dtoa_r+0x4ac>
|
|
8012006: 9b02 ldr r3, [sp, #8]
|
|
8012008: 2b00 cmp r3, #0
|
|
801200a: dd36 ble.n 801207a <_dtoa_r+0x432>
|
|
801200c: 9b00 ldr r3, [sp, #0]
|
|
801200e: 4650 mov r0, sl
|
|
8012010: 4659 mov r1, fp
|
|
8012012: 1e5f subs r7, r3, #1
|
|
8012014: 2200 movs r2, #0
|
|
8012016: 4b89 ldr r3, [pc, #548] ; (801223c <_dtoa_r+0x5f4>)
|
|
8012018: f7ee fafe bl 8000618 <__aeabi_dmul>
|
|
801201c: 9e02 ldr r6, [sp, #8]
|
|
801201e: 4682 mov sl, r0
|
|
8012020: 468b mov fp, r1
|
|
8012022: 3501 adds r5, #1
|
|
8012024: 4628 mov r0, r5
|
|
8012026: f7ee fa8d bl 8000544 <__aeabi_i2d>
|
|
801202a: 4652 mov r2, sl
|
|
801202c: 465b mov r3, fp
|
|
801202e: f7ee faf3 bl 8000618 <__aeabi_dmul>
|
|
8012032: 4b83 ldr r3, [pc, #524] ; (8012240 <_dtoa_r+0x5f8>)
|
|
8012034: 2200 movs r2, #0
|
|
8012036: f7ee f939 bl 80002ac <__adddf3>
|
|
801203a: 46d0 mov r8, sl
|
|
801203c: 46d9 mov r9, fp
|
|
801203e: 4682 mov sl, r0
|
|
8012040: f1a1 7b50 sub.w fp, r1, #54525952 ; 0x3400000
|
|
8012044: 2e00 cmp r6, #0
|
|
8012046: d158 bne.n 80120fa <_dtoa_r+0x4b2>
|
|
8012048: 4b7e ldr r3, [pc, #504] ; (8012244 <_dtoa_r+0x5fc>)
|
|
801204a: 2200 movs r2, #0
|
|
801204c: 4640 mov r0, r8
|
|
801204e: 4649 mov r1, r9
|
|
8012050: f7ee f92a bl 80002a8 <__aeabi_dsub>
|
|
8012054: 4652 mov r2, sl
|
|
8012056: 465b mov r3, fp
|
|
8012058: 4680 mov r8, r0
|
|
801205a: 4689 mov r9, r1
|
|
801205c: f7ee fd6c bl 8000b38 <__aeabi_dcmpgt>
|
|
8012060: 2800 cmp r0, #0
|
|
8012062: f040 8296 bne.w 8012592 <_dtoa_r+0x94a>
|
|
8012066: 4652 mov r2, sl
|
|
8012068: f10b 4300 add.w r3, fp, #2147483648 ; 0x80000000
|
|
801206c: 4640 mov r0, r8
|
|
801206e: 4649 mov r1, r9
|
|
8012070: f7ee fd44 bl 8000afc <__aeabi_dcmplt>
|
|
8012074: 2800 cmp r0, #0
|
|
8012076: f040 828a bne.w 801258e <_dtoa_r+0x946>
|
|
801207a: ec5b ab19 vmov sl, fp, d9
|
|
801207e: 9b11 ldr r3, [sp, #68] ; 0x44
|
|
8012080: 2b00 cmp r3, #0
|
|
8012082: f2c0 8149 blt.w 8012318 <_dtoa_r+0x6d0>
|
|
8012086: 9a00 ldr r2, [sp, #0]
|
|
8012088: 2a0e cmp r2, #14
|
|
801208a: f300 8145 bgt.w 8012318 <_dtoa_r+0x6d0>
|
|
801208e: 4b68 ldr r3, [pc, #416] ; (8012230 <_dtoa_r+0x5e8>)
|
|
8012090: eb03 03c2 add.w r3, r3, r2, lsl #3
|
|
8012094: e9d3 8900 ldrd r8, r9, [r3]
|
|
8012098: 9b09 ldr r3, [sp, #36] ; 0x24
|
|
801209a: 2b00 cmp r3, #0
|
|
801209c: f280 80d6 bge.w 801224c <_dtoa_r+0x604>
|
|
80120a0: 9b03 ldr r3, [sp, #12]
|
|
80120a2: 2b00 cmp r3, #0
|
|
80120a4: f300 80d2 bgt.w 801224c <_dtoa_r+0x604>
|
|
80120a8: f040 8270 bne.w 801258c <_dtoa_r+0x944>
|
|
80120ac: 4b65 ldr r3, [pc, #404] ; (8012244 <_dtoa_r+0x5fc>)
|
|
80120ae: 2200 movs r2, #0
|
|
80120b0: 4640 mov r0, r8
|
|
80120b2: 4649 mov r1, r9
|
|
80120b4: f7ee fab0 bl 8000618 <__aeabi_dmul>
|
|
80120b8: 4652 mov r2, sl
|
|
80120ba: 465b mov r3, fp
|
|
80120bc: f7ee fd32 bl 8000b24 <__aeabi_dcmpge>
|
|
80120c0: 9e03 ldr r6, [sp, #12]
|
|
80120c2: 4637 mov r7, r6
|
|
80120c4: 2800 cmp r0, #0
|
|
80120c6: f040 8246 bne.w 8012556 <_dtoa_r+0x90e>
|
|
80120ca: 9d01 ldr r5, [sp, #4]
|
|
80120cc: 2331 movs r3, #49 ; 0x31
|
|
80120ce: f805 3b01 strb.w r3, [r5], #1
|
|
80120d2: 9b00 ldr r3, [sp, #0]
|
|
80120d4: 3301 adds r3, #1
|
|
80120d6: 9300 str r3, [sp, #0]
|
|
80120d8: e241 b.n 801255e <_dtoa_r+0x916>
|
|
80120da: 07f2 lsls r2, r6, #31
|
|
80120dc: d505 bpl.n 80120ea <_dtoa_r+0x4a2>
|
|
80120de: e9d7 2300 ldrd r2, r3, [r7]
|
|
80120e2: f7ee fa99 bl 8000618 <__aeabi_dmul>
|
|
80120e6: 3501 adds r5, #1
|
|
80120e8: 2301 movs r3, #1
|
|
80120ea: 1076 asrs r6, r6, #1
|
|
80120ec: 3708 adds r7, #8
|
|
80120ee: e777 b.n 8011fe0 <_dtoa_r+0x398>
|
|
80120f0: 2502 movs r5, #2
|
|
80120f2: e779 b.n 8011fe8 <_dtoa_r+0x3a0>
|
|
80120f4: 9f00 ldr r7, [sp, #0]
|
|
80120f6: 9e03 ldr r6, [sp, #12]
|
|
80120f8: e794 b.n 8012024 <_dtoa_r+0x3dc>
|
|
80120fa: 9901 ldr r1, [sp, #4]
|
|
80120fc: 4b4c ldr r3, [pc, #304] ; (8012230 <_dtoa_r+0x5e8>)
|
|
80120fe: 4431 add r1, r6
|
|
8012100: 910d str r1, [sp, #52] ; 0x34
|
|
8012102: 9908 ldr r1, [sp, #32]
|
|
8012104: eb03 03c6 add.w r3, r3, r6, lsl #3
|
|
8012108: e953 2302 ldrd r2, r3, [r3, #-8]
|
|
801210c: 2900 cmp r1, #0
|
|
801210e: d043 beq.n 8012198 <_dtoa_r+0x550>
|
|
8012110: 494d ldr r1, [pc, #308] ; (8012248 <_dtoa_r+0x600>)
|
|
8012112: 2000 movs r0, #0
|
|
8012114: f7ee fbaa bl 800086c <__aeabi_ddiv>
|
|
8012118: 4652 mov r2, sl
|
|
801211a: 465b mov r3, fp
|
|
801211c: f7ee f8c4 bl 80002a8 <__aeabi_dsub>
|
|
8012120: 9d01 ldr r5, [sp, #4]
|
|
8012122: 4682 mov sl, r0
|
|
8012124: 468b mov fp, r1
|
|
8012126: 4649 mov r1, r9
|
|
8012128: 4640 mov r0, r8
|
|
801212a: f7ee fd25 bl 8000b78 <__aeabi_d2iz>
|
|
801212e: 4606 mov r6, r0
|
|
8012130: f7ee fa08 bl 8000544 <__aeabi_i2d>
|
|
8012134: 4602 mov r2, r0
|
|
8012136: 460b mov r3, r1
|
|
8012138: 4640 mov r0, r8
|
|
801213a: 4649 mov r1, r9
|
|
801213c: f7ee f8b4 bl 80002a8 <__aeabi_dsub>
|
|
8012140: 3630 adds r6, #48 ; 0x30
|
|
8012142: f805 6b01 strb.w r6, [r5], #1
|
|
8012146: 4652 mov r2, sl
|
|
8012148: 465b mov r3, fp
|
|
801214a: 4680 mov r8, r0
|
|
801214c: 4689 mov r9, r1
|
|
801214e: f7ee fcd5 bl 8000afc <__aeabi_dcmplt>
|
|
8012152: 2800 cmp r0, #0
|
|
8012154: d163 bne.n 801221e <_dtoa_r+0x5d6>
|
|
8012156: 4642 mov r2, r8
|
|
8012158: 464b mov r3, r9
|
|
801215a: 4937 ldr r1, [pc, #220] ; (8012238 <_dtoa_r+0x5f0>)
|
|
801215c: 2000 movs r0, #0
|
|
801215e: f7ee f8a3 bl 80002a8 <__aeabi_dsub>
|
|
8012162: 4652 mov r2, sl
|
|
8012164: 465b mov r3, fp
|
|
8012166: f7ee fcc9 bl 8000afc <__aeabi_dcmplt>
|
|
801216a: 2800 cmp r0, #0
|
|
801216c: f040 80b6 bne.w 80122dc <_dtoa_r+0x694>
|
|
8012170: 9b0d ldr r3, [sp, #52] ; 0x34
|
|
8012172: 429d cmp r5, r3
|
|
8012174: d081 beq.n 801207a <_dtoa_r+0x432>
|
|
8012176: 4b31 ldr r3, [pc, #196] ; (801223c <_dtoa_r+0x5f4>)
|
|
8012178: 2200 movs r2, #0
|
|
801217a: 4650 mov r0, sl
|
|
801217c: 4659 mov r1, fp
|
|
801217e: f7ee fa4b bl 8000618 <__aeabi_dmul>
|
|
8012182: 4b2e ldr r3, [pc, #184] ; (801223c <_dtoa_r+0x5f4>)
|
|
8012184: 4682 mov sl, r0
|
|
8012186: 468b mov fp, r1
|
|
8012188: 4640 mov r0, r8
|
|
801218a: 4649 mov r1, r9
|
|
801218c: 2200 movs r2, #0
|
|
801218e: f7ee fa43 bl 8000618 <__aeabi_dmul>
|
|
8012192: 4680 mov r8, r0
|
|
8012194: 4689 mov r9, r1
|
|
8012196: e7c6 b.n 8012126 <_dtoa_r+0x4de>
|
|
8012198: 4650 mov r0, sl
|
|
801219a: 4659 mov r1, fp
|
|
801219c: f7ee fa3c bl 8000618 <__aeabi_dmul>
|
|
80121a0: 9b0d ldr r3, [sp, #52] ; 0x34
|
|
80121a2: 9d01 ldr r5, [sp, #4]
|
|
80121a4: 930f str r3, [sp, #60] ; 0x3c
|
|
80121a6: 4682 mov sl, r0
|
|
80121a8: 468b mov fp, r1
|
|
80121aa: 4649 mov r1, r9
|
|
80121ac: 4640 mov r0, r8
|
|
80121ae: f7ee fce3 bl 8000b78 <__aeabi_d2iz>
|
|
80121b2: 4606 mov r6, r0
|
|
80121b4: f7ee f9c6 bl 8000544 <__aeabi_i2d>
|
|
80121b8: 3630 adds r6, #48 ; 0x30
|
|
80121ba: 4602 mov r2, r0
|
|
80121bc: 460b mov r3, r1
|
|
80121be: 4640 mov r0, r8
|
|
80121c0: 4649 mov r1, r9
|
|
80121c2: f7ee f871 bl 80002a8 <__aeabi_dsub>
|
|
80121c6: f805 6b01 strb.w r6, [r5], #1
|
|
80121ca: 9b0d ldr r3, [sp, #52] ; 0x34
|
|
80121cc: 429d cmp r5, r3
|
|
80121ce: 4680 mov r8, r0
|
|
80121d0: 4689 mov r9, r1
|
|
80121d2: f04f 0200 mov.w r2, #0
|
|
80121d6: d124 bne.n 8012222 <_dtoa_r+0x5da>
|
|
80121d8: 4b1b ldr r3, [pc, #108] ; (8012248 <_dtoa_r+0x600>)
|
|
80121da: 4650 mov r0, sl
|
|
80121dc: 4659 mov r1, fp
|
|
80121de: f7ee f865 bl 80002ac <__adddf3>
|
|
80121e2: 4602 mov r2, r0
|
|
80121e4: 460b mov r3, r1
|
|
80121e6: 4640 mov r0, r8
|
|
80121e8: 4649 mov r1, r9
|
|
80121ea: f7ee fca5 bl 8000b38 <__aeabi_dcmpgt>
|
|
80121ee: 2800 cmp r0, #0
|
|
80121f0: d174 bne.n 80122dc <_dtoa_r+0x694>
|
|
80121f2: 4652 mov r2, sl
|
|
80121f4: 465b mov r3, fp
|
|
80121f6: 4914 ldr r1, [pc, #80] ; (8012248 <_dtoa_r+0x600>)
|
|
80121f8: 2000 movs r0, #0
|
|
80121fa: f7ee f855 bl 80002a8 <__aeabi_dsub>
|
|
80121fe: 4602 mov r2, r0
|
|
8012200: 460b mov r3, r1
|
|
8012202: 4640 mov r0, r8
|
|
8012204: 4649 mov r1, r9
|
|
8012206: f7ee fc79 bl 8000afc <__aeabi_dcmplt>
|
|
801220a: 2800 cmp r0, #0
|
|
801220c: f43f af35 beq.w 801207a <_dtoa_r+0x432>
|
|
8012210: 9d0f ldr r5, [sp, #60] ; 0x3c
|
|
8012212: 1e6b subs r3, r5, #1
|
|
8012214: 930f str r3, [sp, #60] ; 0x3c
|
|
8012216: f815 3c01 ldrb.w r3, [r5, #-1]
|
|
801221a: 2b30 cmp r3, #48 ; 0x30
|
|
801221c: d0f8 beq.n 8012210 <_dtoa_r+0x5c8>
|
|
801221e: 9700 str r7, [sp, #0]
|
|
8012220: e04a b.n 80122b8 <_dtoa_r+0x670>
|
|
8012222: 4b06 ldr r3, [pc, #24] ; (801223c <_dtoa_r+0x5f4>)
|
|
8012224: f7ee f9f8 bl 8000618 <__aeabi_dmul>
|
|
8012228: 4680 mov r8, r0
|
|
801222a: 4689 mov r9, r1
|
|
801222c: e7bd b.n 80121aa <_dtoa_r+0x562>
|
|
801222e: bf00 nop
|
|
8012230: 080181b0 .word 0x080181b0
|
|
8012234: 08018188 .word 0x08018188
|
|
8012238: 3ff00000 .word 0x3ff00000
|
|
801223c: 40240000 .word 0x40240000
|
|
8012240: 401c0000 .word 0x401c0000
|
|
8012244: 40140000 .word 0x40140000
|
|
8012248: 3fe00000 .word 0x3fe00000
|
|
801224c: 9d01 ldr r5, [sp, #4]
|
|
801224e: 4656 mov r6, sl
|
|
8012250: 465f mov r7, fp
|
|
8012252: 4642 mov r2, r8
|
|
8012254: 464b mov r3, r9
|
|
8012256: 4630 mov r0, r6
|
|
8012258: 4639 mov r1, r7
|
|
801225a: f7ee fb07 bl 800086c <__aeabi_ddiv>
|
|
801225e: f7ee fc8b bl 8000b78 <__aeabi_d2iz>
|
|
8012262: 4682 mov sl, r0
|
|
8012264: f7ee f96e bl 8000544 <__aeabi_i2d>
|
|
8012268: 4642 mov r2, r8
|
|
801226a: 464b mov r3, r9
|
|
801226c: f7ee f9d4 bl 8000618 <__aeabi_dmul>
|
|
8012270: 4602 mov r2, r0
|
|
8012272: 460b mov r3, r1
|
|
8012274: 4630 mov r0, r6
|
|
8012276: 4639 mov r1, r7
|
|
8012278: f10a 0630 add.w r6, sl, #48 ; 0x30
|
|
801227c: f7ee f814 bl 80002a8 <__aeabi_dsub>
|
|
8012280: f805 6b01 strb.w r6, [r5], #1
|
|
8012284: 9e01 ldr r6, [sp, #4]
|
|
8012286: 9f03 ldr r7, [sp, #12]
|
|
8012288: 1bae subs r6, r5, r6
|
|
801228a: 42b7 cmp r7, r6
|
|
801228c: 4602 mov r2, r0
|
|
801228e: 460b mov r3, r1
|
|
8012290: d135 bne.n 80122fe <_dtoa_r+0x6b6>
|
|
8012292: f7ee f80b bl 80002ac <__adddf3>
|
|
8012296: 4642 mov r2, r8
|
|
8012298: 464b mov r3, r9
|
|
801229a: 4606 mov r6, r0
|
|
801229c: 460f mov r7, r1
|
|
801229e: f7ee fc4b bl 8000b38 <__aeabi_dcmpgt>
|
|
80122a2: b9d0 cbnz r0, 80122da <_dtoa_r+0x692>
|
|
80122a4: 4642 mov r2, r8
|
|
80122a6: 464b mov r3, r9
|
|
80122a8: 4630 mov r0, r6
|
|
80122aa: 4639 mov r1, r7
|
|
80122ac: f7ee fc1c bl 8000ae8 <__aeabi_dcmpeq>
|
|
80122b0: b110 cbz r0, 80122b8 <_dtoa_r+0x670>
|
|
80122b2: f01a 0f01 tst.w sl, #1
|
|
80122b6: d110 bne.n 80122da <_dtoa_r+0x692>
|
|
80122b8: 4620 mov r0, r4
|
|
80122ba: ee18 1a10 vmov r1, s16
|
|
80122be: f000 ffea bl 8013296 <_Bfree>
|
|
80122c2: 2300 movs r3, #0
|
|
80122c4: 9800 ldr r0, [sp, #0]
|
|
80122c6: 702b strb r3, [r5, #0]
|
|
80122c8: 9b0c ldr r3, [sp, #48] ; 0x30
|
|
80122ca: 3001 adds r0, #1
|
|
80122cc: 6018 str r0, [r3, #0]
|
|
80122ce: 9b21 ldr r3, [sp, #132] ; 0x84
|
|
80122d0: 2b00 cmp r3, #0
|
|
80122d2: f43f acf2 beq.w 8011cba <_dtoa_r+0x72>
|
|
80122d6: 601d str r5, [r3, #0]
|
|
80122d8: e4ef b.n 8011cba <_dtoa_r+0x72>
|
|
80122da: 9f00 ldr r7, [sp, #0]
|
|
80122dc: 462b mov r3, r5
|
|
80122de: 461d mov r5, r3
|
|
80122e0: f813 2d01 ldrb.w r2, [r3, #-1]!
|
|
80122e4: 2a39 cmp r2, #57 ; 0x39
|
|
80122e6: d106 bne.n 80122f6 <_dtoa_r+0x6ae>
|
|
80122e8: 9a01 ldr r2, [sp, #4]
|
|
80122ea: 429a cmp r2, r3
|
|
80122ec: d1f7 bne.n 80122de <_dtoa_r+0x696>
|
|
80122ee: 9901 ldr r1, [sp, #4]
|
|
80122f0: 2230 movs r2, #48 ; 0x30
|
|
80122f2: 3701 adds r7, #1
|
|
80122f4: 700a strb r2, [r1, #0]
|
|
80122f6: 781a ldrb r2, [r3, #0]
|
|
80122f8: 3201 adds r2, #1
|
|
80122fa: 701a strb r2, [r3, #0]
|
|
80122fc: e78f b.n 801221e <_dtoa_r+0x5d6>
|
|
80122fe: 4ba6 ldr r3, [pc, #664] ; (8012598 <_dtoa_r+0x950>)
|
|
8012300: 2200 movs r2, #0
|
|
8012302: f7ee f989 bl 8000618 <__aeabi_dmul>
|
|
8012306: 2200 movs r2, #0
|
|
8012308: 2300 movs r3, #0
|
|
801230a: 4606 mov r6, r0
|
|
801230c: 460f mov r7, r1
|
|
801230e: f7ee fbeb bl 8000ae8 <__aeabi_dcmpeq>
|
|
8012312: 2800 cmp r0, #0
|
|
8012314: d09d beq.n 8012252 <_dtoa_r+0x60a>
|
|
8012316: e7cf b.n 80122b8 <_dtoa_r+0x670>
|
|
8012318: 9a08 ldr r2, [sp, #32]
|
|
801231a: 2a00 cmp r2, #0
|
|
801231c: f000 80d7 beq.w 80124ce <_dtoa_r+0x886>
|
|
8012320: 9a06 ldr r2, [sp, #24]
|
|
8012322: 2a01 cmp r2, #1
|
|
8012324: f300 80ba bgt.w 801249c <_dtoa_r+0x854>
|
|
8012328: 9a0e ldr r2, [sp, #56] ; 0x38
|
|
801232a: 2a00 cmp r2, #0
|
|
801232c: f000 80b2 beq.w 8012494 <_dtoa_r+0x84c>
|
|
8012330: f203 4333 addw r3, r3, #1075 ; 0x433
|
|
8012334: 9e07 ldr r6, [sp, #28]
|
|
8012336: 9d04 ldr r5, [sp, #16]
|
|
8012338: 9a04 ldr r2, [sp, #16]
|
|
801233a: 441a add r2, r3
|
|
801233c: 9204 str r2, [sp, #16]
|
|
801233e: 9a05 ldr r2, [sp, #20]
|
|
8012340: 2101 movs r1, #1
|
|
8012342: 441a add r2, r3
|
|
8012344: 4620 mov r0, r4
|
|
8012346: 9205 str r2, [sp, #20]
|
|
8012348: f001 f844 bl 80133d4 <__i2b>
|
|
801234c: 4607 mov r7, r0
|
|
801234e: 2d00 cmp r5, #0
|
|
8012350: dd0c ble.n 801236c <_dtoa_r+0x724>
|
|
8012352: 9b05 ldr r3, [sp, #20]
|
|
8012354: 2b00 cmp r3, #0
|
|
8012356: dd09 ble.n 801236c <_dtoa_r+0x724>
|
|
8012358: 42ab cmp r3, r5
|
|
801235a: 9a04 ldr r2, [sp, #16]
|
|
801235c: bfa8 it ge
|
|
801235e: 462b movge r3, r5
|
|
8012360: 1ad2 subs r2, r2, r3
|
|
8012362: 9204 str r2, [sp, #16]
|
|
8012364: 9a05 ldr r2, [sp, #20]
|
|
8012366: 1aed subs r5, r5, r3
|
|
8012368: 1ad3 subs r3, r2, r3
|
|
801236a: 9305 str r3, [sp, #20]
|
|
801236c: 9b07 ldr r3, [sp, #28]
|
|
801236e: b31b cbz r3, 80123b8 <_dtoa_r+0x770>
|
|
8012370: 9b08 ldr r3, [sp, #32]
|
|
8012372: 2b00 cmp r3, #0
|
|
8012374: f000 80af beq.w 80124d6 <_dtoa_r+0x88e>
|
|
8012378: 2e00 cmp r6, #0
|
|
801237a: dd13 ble.n 80123a4 <_dtoa_r+0x75c>
|
|
801237c: 4639 mov r1, r7
|
|
801237e: 4632 mov r2, r6
|
|
8012380: 4620 mov r0, r4
|
|
8012382: f001 f8e7 bl 8013554 <__pow5mult>
|
|
8012386: ee18 2a10 vmov r2, s16
|
|
801238a: 4601 mov r1, r0
|
|
801238c: 4607 mov r7, r0
|
|
801238e: 4620 mov r0, r4
|
|
8012390: f001 f836 bl 8013400 <__multiply>
|
|
8012394: ee18 1a10 vmov r1, s16
|
|
8012398: 4680 mov r8, r0
|
|
801239a: 4620 mov r0, r4
|
|
801239c: f000 ff7b bl 8013296 <_Bfree>
|
|
80123a0: ee08 8a10 vmov s16, r8
|
|
80123a4: 9b07 ldr r3, [sp, #28]
|
|
80123a6: 1b9a subs r2, r3, r6
|
|
80123a8: d006 beq.n 80123b8 <_dtoa_r+0x770>
|
|
80123aa: ee18 1a10 vmov r1, s16
|
|
80123ae: 4620 mov r0, r4
|
|
80123b0: f001 f8d0 bl 8013554 <__pow5mult>
|
|
80123b4: ee08 0a10 vmov s16, r0
|
|
80123b8: 2101 movs r1, #1
|
|
80123ba: 4620 mov r0, r4
|
|
80123bc: f001 f80a bl 80133d4 <__i2b>
|
|
80123c0: 9b0a ldr r3, [sp, #40] ; 0x28
|
|
80123c2: 2b00 cmp r3, #0
|
|
80123c4: 4606 mov r6, r0
|
|
80123c6: f340 8088 ble.w 80124da <_dtoa_r+0x892>
|
|
80123ca: 461a mov r2, r3
|
|
80123cc: 4601 mov r1, r0
|
|
80123ce: 4620 mov r0, r4
|
|
80123d0: f001 f8c0 bl 8013554 <__pow5mult>
|
|
80123d4: 9b06 ldr r3, [sp, #24]
|
|
80123d6: 2b01 cmp r3, #1
|
|
80123d8: 4606 mov r6, r0
|
|
80123da: f340 8081 ble.w 80124e0 <_dtoa_r+0x898>
|
|
80123de: f04f 0800 mov.w r8, #0
|
|
80123e2: 6933 ldr r3, [r6, #16]
|
|
80123e4: eb06 0383 add.w r3, r6, r3, lsl #2
|
|
80123e8: 6918 ldr r0, [r3, #16]
|
|
80123ea: f000 ffa3 bl 8013334 <__hi0bits>
|
|
80123ee: f1c0 0020 rsb r0, r0, #32
|
|
80123f2: 9b05 ldr r3, [sp, #20]
|
|
80123f4: 4418 add r0, r3
|
|
80123f6: f010 001f ands.w r0, r0, #31
|
|
80123fa: f000 8092 beq.w 8012522 <_dtoa_r+0x8da>
|
|
80123fe: f1c0 0320 rsb r3, r0, #32
|
|
8012402: 2b04 cmp r3, #4
|
|
8012404: f340 808a ble.w 801251c <_dtoa_r+0x8d4>
|
|
8012408: f1c0 001c rsb r0, r0, #28
|
|
801240c: 9b04 ldr r3, [sp, #16]
|
|
801240e: 4403 add r3, r0
|
|
8012410: 9304 str r3, [sp, #16]
|
|
8012412: 9b05 ldr r3, [sp, #20]
|
|
8012414: 4403 add r3, r0
|
|
8012416: 4405 add r5, r0
|
|
8012418: 9305 str r3, [sp, #20]
|
|
801241a: 9b04 ldr r3, [sp, #16]
|
|
801241c: 2b00 cmp r3, #0
|
|
801241e: dd07 ble.n 8012430 <_dtoa_r+0x7e8>
|
|
8012420: ee18 1a10 vmov r1, s16
|
|
8012424: 461a mov r2, r3
|
|
8012426: 4620 mov r0, r4
|
|
8012428: f001 f8d4 bl 80135d4 <__lshift>
|
|
801242c: ee08 0a10 vmov s16, r0
|
|
8012430: 9b05 ldr r3, [sp, #20]
|
|
8012432: 2b00 cmp r3, #0
|
|
8012434: dd05 ble.n 8012442 <_dtoa_r+0x7fa>
|
|
8012436: 4631 mov r1, r6
|
|
8012438: 461a mov r2, r3
|
|
801243a: 4620 mov r0, r4
|
|
801243c: f001 f8ca bl 80135d4 <__lshift>
|
|
8012440: 4606 mov r6, r0
|
|
8012442: 9b0b ldr r3, [sp, #44] ; 0x2c
|
|
8012444: 2b00 cmp r3, #0
|
|
8012446: d06e beq.n 8012526 <_dtoa_r+0x8de>
|
|
8012448: ee18 0a10 vmov r0, s16
|
|
801244c: 4631 mov r1, r6
|
|
801244e: f001 f931 bl 80136b4 <__mcmp>
|
|
8012452: 2800 cmp r0, #0
|
|
8012454: da67 bge.n 8012526 <_dtoa_r+0x8de>
|
|
8012456: 9b00 ldr r3, [sp, #0]
|
|
8012458: 3b01 subs r3, #1
|
|
801245a: ee18 1a10 vmov r1, s16
|
|
801245e: 9300 str r3, [sp, #0]
|
|
8012460: 220a movs r2, #10
|
|
8012462: 2300 movs r3, #0
|
|
8012464: 4620 mov r0, r4
|
|
8012466: f000 ff1f bl 80132a8 <__multadd>
|
|
801246a: 9b08 ldr r3, [sp, #32]
|
|
801246c: ee08 0a10 vmov s16, r0
|
|
8012470: 2b00 cmp r3, #0
|
|
8012472: f000 81b0 beq.w 80127d6 <_dtoa_r+0xb8e>
|
|
8012476: 2300 movs r3, #0
|
|
8012478: 4639 mov r1, r7
|
|
801247a: 220a movs r2, #10
|
|
801247c: 4620 mov r0, r4
|
|
801247e: f000 ff13 bl 80132a8 <__multadd>
|
|
8012482: 9b02 ldr r3, [sp, #8]
|
|
8012484: 2b00 cmp r3, #0
|
|
8012486: 4607 mov r7, r0
|
|
8012488: f300 808e bgt.w 80125a8 <_dtoa_r+0x960>
|
|
801248c: 9b06 ldr r3, [sp, #24]
|
|
801248e: 2b02 cmp r3, #2
|
|
8012490: dc51 bgt.n 8012536 <_dtoa_r+0x8ee>
|
|
8012492: e089 b.n 80125a8 <_dtoa_r+0x960>
|
|
8012494: 9b10 ldr r3, [sp, #64] ; 0x40
|
|
8012496: f1c3 0336 rsb r3, r3, #54 ; 0x36
|
|
801249a: e74b b.n 8012334 <_dtoa_r+0x6ec>
|
|
801249c: 9b03 ldr r3, [sp, #12]
|
|
801249e: 1e5e subs r6, r3, #1
|
|
80124a0: 9b07 ldr r3, [sp, #28]
|
|
80124a2: 42b3 cmp r3, r6
|
|
80124a4: bfbf itttt lt
|
|
80124a6: 9b07 ldrlt r3, [sp, #28]
|
|
80124a8: 9607 strlt r6, [sp, #28]
|
|
80124aa: 1af2 sublt r2, r6, r3
|
|
80124ac: 9b0a ldrlt r3, [sp, #40] ; 0x28
|
|
80124ae: bfb6 itet lt
|
|
80124b0: 189b addlt r3, r3, r2
|
|
80124b2: 1b9e subge r6, r3, r6
|
|
80124b4: 930a strlt r3, [sp, #40] ; 0x28
|
|
80124b6: 9b03 ldr r3, [sp, #12]
|
|
80124b8: bfb8 it lt
|
|
80124ba: 2600 movlt r6, #0
|
|
80124bc: 2b00 cmp r3, #0
|
|
80124be: bfb7 itett lt
|
|
80124c0: e9dd 2303 ldrdlt r2, r3, [sp, #12]
|
|
80124c4: e9dd 3503 ldrdge r3, r5, [sp, #12]
|
|
80124c8: 1a9d sublt r5, r3, r2
|
|
80124ca: 2300 movlt r3, #0
|
|
80124cc: e734 b.n 8012338 <_dtoa_r+0x6f0>
|
|
80124ce: 9e07 ldr r6, [sp, #28]
|
|
80124d0: 9d04 ldr r5, [sp, #16]
|
|
80124d2: 9f08 ldr r7, [sp, #32]
|
|
80124d4: e73b b.n 801234e <_dtoa_r+0x706>
|
|
80124d6: 9a07 ldr r2, [sp, #28]
|
|
80124d8: e767 b.n 80123aa <_dtoa_r+0x762>
|
|
80124da: 9b06 ldr r3, [sp, #24]
|
|
80124dc: 2b01 cmp r3, #1
|
|
80124de: dc18 bgt.n 8012512 <_dtoa_r+0x8ca>
|
|
80124e0: f1ba 0f00 cmp.w sl, #0
|
|
80124e4: d115 bne.n 8012512 <_dtoa_r+0x8ca>
|
|
80124e6: f3cb 0313 ubfx r3, fp, #0, #20
|
|
80124ea: b993 cbnz r3, 8012512 <_dtoa_r+0x8ca>
|
|
80124ec: f02b 4300 bic.w r3, fp, #2147483648 ; 0x80000000
|
|
80124f0: 0d1b lsrs r3, r3, #20
|
|
80124f2: 051b lsls r3, r3, #20
|
|
80124f4: b183 cbz r3, 8012518 <_dtoa_r+0x8d0>
|
|
80124f6: 9b04 ldr r3, [sp, #16]
|
|
80124f8: 3301 adds r3, #1
|
|
80124fa: 9304 str r3, [sp, #16]
|
|
80124fc: 9b05 ldr r3, [sp, #20]
|
|
80124fe: 3301 adds r3, #1
|
|
8012500: 9305 str r3, [sp, #20]
|
|
8012502: f04f 0801 mov.w r8, #1
|
|
8012506: 9b0a ldr r3, [sp, #40] ; 0x28
|
|
8012508: 2b00 cmp r3, #0
|
|
801250a: f47f af6a bne.w 80123e2 <_dtoa_r+0x79a>
|
|
801250e: 2001 movs r0, #1
|
|
8012510: e76f b.n 80123f2 <_dtoa_r+0x7aa>
|
|
8012512: f04f 0800 mov.w r8, #0
|
|
8012516: e7f6 b.n 8012506 <_dtoa_r+0x8be>
|
|
8012518: 4698 mov r8, r3
|
|
801251a: e7f4 b.n 8012506 <_dtoa_r+0x8be>
|
|
801251c: f43f af7d beq.w 801241a <_dtoa_r+0x7d2>
|
|
8012520: 4618 mov r0, r3
|
|
8012522: 301c adds r0, #28
|
|
8012524: e772 b.n 801240c <_dtoa_r+0x7c4>
|
|
8012526: 9b03 ldr r3, [sp, #12]
|
|
8012528: 2b00 cmp r3, #0
|
|
801252a: dc37 bgt.n 801259c <_dtoa_r+0x954>
|
|
801252c: 9b06 ldr r3, [sp, #24]
|
|
801252e: 2b02 cmp r3, #2
|
|
8012530: dd34 ble.n 801259c <_dtoa_r+0x954>
|
|
8012532: 9b03 ldr r3, [sp, #12]
|
|
8012534: 9302 str r3, [sp, #8]
|
|
8012536: 9b02 ldr r3, [sp, #8]
|
|
8012538: b96b cbnz r3, 8012556 <_dtoa_r+0x90e>
|
|
801253a: 4631 mov r1, r6
|
|
801253c: 2205 movs r2, #5
|
|
801253e: 4620 mov r0, r4
|
|
8012540: f000 feb2 bl 80132a8 <__multadd>
|
|
8012544: 4601 mov r1, r0
|
|
8012546: 4606 mov r6, r0
|
|
8012548: ee18 0a10 vmov r0, s16
|
|
801254c: f001 f8b2 bl 80136b4 <__mcmp>
|
|
8012550: 2800 cmp r0, #0
|
|
8012552: f73f adba bgt.w 80120ca <_dtoa_r+0x482>
|
|
8012556: 9b09 ldr r3, [sp, #36] ; 0x24
|
|
8012558: 9d01 ldr r5, [sp, #4]
|
|
801255a: 43db mvns r3, r3
|
|
801255c: 9300 str r3, [sp, #0]
|
|
801255e: f04f 0800 mov.w r8, #0
|
|
8012562: 4631 mov r1, r6
|
|
8012564: 4620 mov r0, r4
|
|
8012566: f000 fe96 bl 8013296 <_Bfree>
|
|
801256a: 2f00 cmp r7, #0
|
|
801256c: f43f aea4 beq.w 80122b8 <_dtoa_r+0x670>
|
|
8012570: f1b8 0f00 cmp.w r8, #0
|
|
8012574: d005 beq.n 8012582 <_dtoa_r+0x93a>
|
|
8012576: 45b8 cmp r8, r7
|
|
8012578: d003 beq.n 8012582 <_dtoa_r+0x93a>
|
|
801257a: 4641 mov r1, r8
|
|
801257c: 4620 mov r0, r4
|
|
801257e: f000 fe8a bl 8013296 <_Bfree>
|
|
8012582: 4639 mov r1, r7
|
|
8012584: 4620 mov r0, r4
|
|
8012586: f000 fe86 bl 8013296 <_Bfree>
|
|
801258a: e695 b.n 80122b8 <_dtoa_r+0x670>
|
|
801258c: 2600 movs r6, #0
|
|
801258e: 4637 mov r7, r6
|
|
8012590: e7e1 b.n 8012556 <_dtoa_r+0x90e>
|
|
8012592: 9700 str r7, [sp, #0]
|
|
8012594: 4637 mov r7, r6
|
|
8012596: e598 b.n 80120ca <_dtoa_r+0x482>
|
|
8012598: 40240000 .word 0x40240000
|
|
801259c: 9b08 ldr r3, [sp, #32]
|
|
801259e: 2b00 cmp r3, #0
|
|
80125a0: f000 80c9 beq.w 8012736 <_dtoa_r+0xaee>
|
|
80125a4: 9b03 ldr r3, [sp, #12]
|
|
80125a6: 9302 str r3, [sp, #8]
|
|
80125a8: 2d00 cmp r5, #0
|
|
80125aa: dd05 ble.n 80125b8 <_dtoa_r+0x970>
|
|
80125ac: 4639 mov r1, r7
|
|
80125ae: 462a mov r2, r5
|
|
80125b0: 4620 mov r0, r4
|
|
80125b2: f001 f80f bl 80135d4 <__lshift>
|
|
80125b6: 4607 mov r7, r0
|
|
80125b8: f1b8 0f00 cmp.w r8, #0
|
|
80125bc: d05a beq.n 8012674 <_dtoa_r+0xa2c>
|
|
80125be: 6879 ldr r1, [r7, #4]
|
|
80125c0: 4620 mov r0, r4
|
|
80125c2: f000 fe43 bl 801324c <_Balloc>
|
|
80125c6: 4605 mov r5, r0
|
|
80125c8: b920 cbnz r0, 80125d4 <_dtoa_r+0x98c>
|
|
80125ca: 4b87 ldr r3, [pc, #540] ; (80127e8 <_dtoa_r+0xba0>)
|
|
80125cc: 4602 mov r2, r0
|
|
80125ce: f240 21ea movw r1, #746 ; 0x2ea
|
|
80125d2: e477 b.n 8011ec4 <_dtoa_r+0x27c>
|
|
80125d4: 693a ldr r2, [r7, #16]
|
|
80125d6: 3202 adds r2, #2
|
|
80125d8: 0092 lsls r2, r2, #2
|
|
80125da: f107 010c add.w r1, r7, #12
|
|
80125de: 300c adds r0, #12
|
|
80125e0: f7fd ff5a bl 8010498 <memcpy>
|
|
80125e4: 2201 movs r2, #1
|
|
80125e6: 4629 mov r1, r5
|
|
80125e8: 4620 mov r0, r4
|
|
80125ea: f000 fff3 bl 80135d4 <__lshift>
|
|
80125ee: 9b01 ldr r3, [sp, #4]
|
|
80125f0: f103 0901 add.w r9, r3, #1
|
|
80125f4: e9dd 2301 ldrd r2, r3, [sp, #4]
|
|
80125f8: 4413 add r3, r2
|
|
80125fa: 9305 str r3, [sp, #20]
|
|
80125fc: f00a 0301 and.w r3, sl, #1
|
|
8012600: 46b8 mov r8, r7
|
|
8012602: 9304 str r3, [sp, #16]
|
|
8012604: 4607 mov r7, r0
|
|
8012606: 4631 mov r1, r6
|
|
8012608: ee18 0a10 vmov r0, s16
|
|
801260c: f7ff fa8e bl 8011b2c <quorem>
|
|
8012610: 4641 mov r1, r8
|
|
8012612: 9002 str r0, [sp, #8]
|
|
8012614: f100 0a30 add.w sl, r0, #48 ; 0x30
|
|
8012618: ee18 0a10 vmov r0, s16
|
|
801261c: f001 f84a bl 80136b4 <__mcmp>
|
|
8012620: 463a mov r2, r7
|
|
8012622: 9003 str r0, [sp, #12]
|
|
8012624: 4631 mov r1, r6
|
|
8012626: 4620 mov r0, r4
|
|
8012628: f001 f860 bl 80136ec <__mdiff>
|
|
801262c: 68c2 ldr r2, [r0, #12]
|
|
801262e: f109 3bff add.w fp, r9, #4294967295
|
|
8012632: 4605 mov r5, r0
|
|
8012634: bb02 cbnz r2, 8012678 <_dtoa_r+0xa30>
|
|
8012636: 4601 mov r1, r0
|
|
8012638: ee18 0a10 vmov r0, s16
|
|
801263c: f001 f83a bl 80136b4 <__mcmp>
|
|
8012640: 4602 mov r2, r0
|
|
8012642: 4629 mov r1, r5
|
|
8012644: 4620 mov r0, r4
|
|
8012646: 9207 str r2, [sp, #28]
|
|
8012648: f000 fe25 bl 8013296 <_Bfree>
|
|
801264c: e9dd 3206 ldrd r3, r2, [sp, #24]
|
|
8012650: ea43 0102 orr.w r1, r3, r2
|
|
8012654: 9b04 ldr r3, [sp, #16]
|
|
8012656: 430b orrs r3, r1
|
|
8012658: 464d mov r5, r9
|
|
801265a: d10f bne.n 801267c <_dtoa_r+0xa34>
|
|
801265c: f1ba 0f39 cmp.w sl, #57 ; 0x39
|
|
8012660: d02a beq.n 80126b8 <_dtoa_r+0xa70>
|
|
8012662: 9b03 ldr r3, [sp, #12]
|
|
8012664: 2b00 cmp r3, #0
|
|
8012666: dd02 ble.n 801266e <_dtoa_r+0xa26>
|
|
8012668: 9b02 ldr r3, [sp, #8]
|
|
801266a: f103 0a31 add.w sl, r3, #49 ; 0x31
|
|
801266e: f88b a000 strb.w sl, [fp]
|
|
8012672: e776 b.n 8012562 <_dtoa_r+0x91a>
|
|
8012674: 4638 mov r0, r7
|
|
8012676: e7ba b.n 80125ee <_dtoa_r+0x9a6>
|
|
8012678: 2201 movs r2, #1
|
|
801267a: e7e2 b.n 8012642 <_dtoa_r+0x9fa>
|
|
801267c: 9b03 ldr r3, [sp, #12]
|
|
801267e: 2b00 cmp r3, #0
|
|
8012680: db04 blt.n 801268c <_dtoa_r+0xa44>
|
|
8012682: 9906 ldr r1, [sp, #24]
|
|
8012684: 430b orrs r3, r1
|
|
8012686: 9904 ldr r1, [sp, #16]
|
|
8012688: 430b orrs r3, r1
|
|
801268a: d122 bne.n 80126d2 <_dtoa_r+0xa8a>
|
|
801268c: 2a00 cmp r2, #0
|
|
801268e: ddee ble.n 801266e <_dtoa_r+0xa26>
|
|
8012690: ee18 1a10 vmov r1, s16
|
|
8012694: 2201 movs r2, #1
|
|
8012696: 4620 mov r0, r4
|
|
8012698: f000 ff9c bl 80135d4 <__lshift>
|
|
801269c: 4631 mov r1, r6
|
|
801269e: ee08 0a10 vmov s16, r0
|
|
80126a2: f001 f807 bl 80136b4 <__mcmp>
|
|
80126a6: 2800 cmp r0, #0
|
|
80126a8: dc03 bgt.n 80126b2 <_dtoa_r+0xa6a>
|
|
80126aa: d1e0 bne.n 801266e <_dtoa_r+0xa26>
|
|
80126ac: f01a 0f01 tst.w sl, #1
|
|
80126b0: d0dd beq.n 801266e <_dtoa_r+0xa26>
|
|
80126b2: f1ba 0f39 cmp.w sl, #57 ; 0x39
|
|
80126b6: d1d7 bne.n 8012668 <_dtoa_r+0xa20>
|
|
80126b8: 2339 movs r3, #57 ; 0x39
|
|
80126ba: f88b 3000 strb.w r3, [fp]
|
|
80126be: 462b mov r3, r5
|
|
80126c0: 461d mov r5, r3
|
|
80126c2: 3b01 subs r3, #1
|
|
80126c4: f815 2c01 ldrb.w r2, [r5, #-1]
|
|
80126c8: 2a39 cmp r2, #57 ; 0x39
|
|
80126ca: d071 beq.n 80127b0 <_dtoa_r+0xb68>
|
|
80126cc: 3201 adds r2, #1
|
|
80126ce: 701a strb r2, [r3, #0]
|
|
80126d0: e747 b.n 8012562 <_dtoa_r+0x91a>
|
|
80126d2: 2a00 cmp r2, #0
|
|
80126d4: dd07 ble.n 80126e6 <_dtoa_r+0xa9e>
|
|
80126d6: f1ba 0f39 cmp.w sl, #57 ; 0x39
|
|
80126da: d0ed beq.n 80126b8 <_dtoa_r+0xa70>
|
|
80126dc: f10a 0301 add.w r3, sl, #1
|
|
80126e0: f88b 3000 strb.w r3, [fp]
|
|
80126e4: e73d b.n 8012562 <_dtoa_r+0x91a>
|
|
80126e6: 9b05 ldr r3, [sp, #20]
|
|
80126e8: f809 ac01 strb.w sl, [r9, #-1]
|
|
80126ec: 4599 cmp r9, r3
|
|
80126ee: d047 beq.n 8012780 <_dtoa_r+0xb38>
|
|
80126f0: ee18 1a10 vmov r1, s16
|
|
80126f4: 2300 movs r3, #0
|
|
80126f6: 220a movs r2, #10
|
|
80126f8: 4620 mov r0, r4
|
|
80126fa: f000 fdd5 bl 80132a8 <__multadd>
|
|
80126fe: 45b8 cmp r8, r7
|
|
8012700: ee08 0a10 vmov s16, r0
|
|
8012704: f04f 0300 mov.w r3, #0
|
|
8012708: f04f 020a mov.w r2, #10
|
|
801270c: 4641 mov r1, r8
|
|
801270e: 4620 mov r0, r4
|
|
8012710: d106 bne.n 8012720 <_dtoa_r+0xad8>
|
|
8012712: f000 fdc9 bl 80132a8 <__multadd>
|
|
8012716: 4680 mov r8, r0
|
|
8012718: 4607 mov r7, r0
|
|
801271a: f109 0901 add.w r9, r9, #1
|
|
801271e: e772 b.n 8012606 <_dtoa_r+0x9be>
|
|
8012720: f000 fdc2 bl 80132a8 <__multadd>
|
|
8012724: 4639 mov r1, r7
|
|
8012726: 4680 mov r8, r0
|
|
8012728: 2300 movs r3, #0
|
|
801272a: 220a movs r2, #10
|
|
801272c: 4620 mov r0, r4
|
|
801272e: f000 fdbb bl 80132a8 <__multadd>
|
|
8012732: 4607 mov r7, r0
|
|
8012734: e7f1 b.n 801271a <_dtoa_r+0xad2>
|
|
8012736: 9b03 ldr r3, [sp, #12]
|
|
8012738: 9302 str r3, [sp, #8]
|
|
801273a: 9d01 ldr r5, [sp, #4]
|
|
801273c: ee18 0a10 vmov r0, s16
|
|
8012740: 4631 mov r1, r6
|
|
8012742: f7ff f9f3 bl 8011b2c <quorem>
|
|
8012746: f100 0a30 add.w sl, r0, #48 ; 0x30
|
|
801274a: 9b01 ldr r3, [sp, #4]
|
|
801274c: f805 ab01 strb.w sl, [r5], #1
|
|
8012750: 1aea subs r2, r5, r3
|
|
8012752: 9b02 ldr r3, [sp, #8]
|
|
8012754: 4293 cmp r3, r2
|
|
8012756: dd09 ble.n 801276c <_dtoa_r+0xb24>
|
|
8012758: ee18 1a10 vmov r1, s16
|
|
801275c: 2300 movs r3, #0
|
|
801275e: 220a movs r2, #10
|
|
8012760: 4620 mov r0, r4
|
|
8012762: f000 fda1 bl 80132a8 <__multadd>
|
|
8012766: ee08 0a10 vmov s16, r0
|
|
801276a: e7e7 b.n 801273c <_dtoa_r+0xaf4>
|
|
801276c: 9b02 ldr r3, [sp, #8]
|
|
801276e: 2b00 cmp r3, #0
|
|
8012770: bfc8 it gt
|
|
8012772: 461d movgt r5, r3
|
|
8012774: 9b01 ldr r3, [sp, #4]
|
|
8012776: bfd8 it le
|
|
8012778: 2501 movle r5, #1
|
|
801277a: 441d add r5, r3
|
|
801277c: f04f 0800 mov.w r8, #0
|
|
8012780: ee18 1a10 vmov r1, s16
|
|
8012784: 2201 movs r2, #1
|
|
8012786: 4620 mov r0, r4
|
|
8012788: f000 ff24 bl 80135d4 <__lshift>
|
|
801278c: 4631 mov r1, r6
|
|
801278e: ee08 0a10 vmov s16, r0
|
|
8012792: f000 ff8f bl 80136b4 <__mcmp>
|
|
8012796: 2800 cmp r0, #0
|
|
8012798: dc91 bgt.n 80126be <_dtoa_r+0xa76>
|
|
801279a: d102 bne.n 80127a2 <_dtoa_r+0xb5a>
|
|
801279c: f01a 0f01 tst.w sl, #1
|
|
80127a0: d18d bne.n 80126be <_dtoa_r+0xa76>
|
|
80127a2: 462b mov r3, r5
|
|
80127a4: 461d mov r5, r3
|
|
80127a6: f813 2d01 ldrb.w r2, [r3, #-1]!
|
|
80127aa: 2a30 cmp r2, #48 ; 0x30
|
|
80127ac: d0fa beq.n 80127a4 <_dtoa_r+0xb5c>
|
|
80127ae: e6d8 b.n 8012562 <_dtoa_r+0x91a>
|
|
80127b0: 9a01 ldr r2, [sp, #4]
|
|
80127b2: 429a cmp r2, r3
|
|
80127b4: d184 bne.n 80126c0 <_dtoa_r+0xa78>
|
|
80127b6: 9b00 ldr r3, [sp, #0]
|
|
80127b8: 3301 adds r3, #1
|
|
80127ba: 9300 str r3, [sp, #0]
|
|
80127bc: 2331 movs r3, #49 ; 0x31
|
|
80127be: 7013 strb r3, [r2, #0]
|
|
80127c0: e6cf b.n 8012562 <_dtoa_r+0x91a>
|
|
80127c2: 4b0a ldr r3, [pc, #40] ; (80127ec <_dtoa_r+0xba4>)
|
|
80127c4: f7ff ba97 b.w 8011cf6 <_dtoa_r+0xae>
|
|
80127c8: 9b21 ldr r3, [sp, #132] ; 0x84
|
|
80127ca: 2b00 cmp r3, #0
|
|
80127cc: f47f aa7b bne.w 8011cc6 <_dtoa_r+0x7e>
|
|
80127d0: 4b07 ldr r3, [pc, #28] ; (80127f0 <_dtoa_r+0xba8>)
|
|
80127d2: f7ff ba90 b.w 8011cf6 <_dtoa_r+0xae>
|
|
80127d6: 9b02 ldr r3, [sp, #8]
|
|
80127d8: 2b00 cmp r3, #0
|
|
80127da: dcae bgt.n 801273a <_dtoa_r+0xaf2>
|
|
80127dc: 9b06 ldr r3, [sp, #24]
|
|
80127de: 2b02 cmp r3, #2
|
|
80127e0: f73f aea9 bgt.w 8012536 <_dtoa_r+0x8ee>
|
|
80127e4: e7a9 b.n 801273a <_dtoa_r+0xaf2>
|
|
80127e6: bf00 nop
|
|
80127e8: 080180b9 .word 0x080180b9
|
|
80127ec: 0801808a .word 0x0801808a
|
|
80127f0: 080180b0 .word 0x080180b0
|
|
|
|
080127f4 <__errno>:
|
|
80127f4: 4b01 ldr r3, [pc, #4] ; (80127fc <__errno+0x8>)
|
|
80127f6: 6818 ldr r0, [r3, #0]
|
|
80127f8: 4770 bx lr
|
|
80127fa: bf00 nop
|
|
80127fc: 20000030 .word 0x20000030
|
|
|
|
08012800 <__sflush_r>:
|
|
8012800: 898b ldrh r3, [r1, #12]
|
|
8012802: f9b1 200c ldrsh.w r2, [r1, #12]
|
|
8012806: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
|
|
801280a: 4605 mov r5, r0
|
|
801280c: 0718 lsls r0, r3, #28
|
|
801280e: 460c mov r4, r1
|
|
8012810: d45f bmi.n 80128d2 <__sflush_r+0xd2>
|
|
8012812: 684b ldr r3, [r1, #4]
|
|
8012814: f442 6200 orr.w r2, r2, #2048 ; 0x800
|
|
8012818: 2b00 cmp r3, #0
|
|
801281a: 818a strh r2, [r1, #12]
|
|
801281c: dc05 bgt.n 801282a <__sflush_r+0x2a>
|
|
801281e: 6bcb ldr r3, [r1, #60] ; 0x3c
|
|
8012820: 2b00 cmp r3, #0
|
|
8012822: dc02 bgt.n 801282a <__sflush_r+0x2a>
|
|
8012824: 2000 movs r0, #0
|
|
8012826: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
|
|
801282a: 6aa6 ldr r6, [r4, #40] ; 0x28
|
|
801282c: 2e00 cmp r6, #0
|
|
801282e: d0f9 beq.n 8012824 <__sflush_r+0x24>
|
|
8012830: 2300 movs r3, #0
|
|
8012832: f412 5280 ands.w r2, r2, #4096 ; 0x1000
|
|
8012836: 682f ldr r7, [r5, #0]
|
|
8012838: 602b str r3, [r5, #0]
|
|
801283a: d036 beq.n 80128aa <__sflush_r+0xaa>
|
|
801283c: 6d20 ldr r0, [r4, #80] ; 0x50
|
|
801283e: 89a3 ldrh r3, [r4, #12]
|
|
8012840: 075a lsls r2, r3, #29
|
|
8012842: d505 bpl.n 8012850 <__sflush_r+0x50>
|
|
8012844: 6863 ldr r3, [r4, #4]
|
|
8012846: 1ac0 subs r0, r0, r3
|
|
8012848: 6b23 ldr r3, [r4, #48] ; 0x30
|
|
801284a: b10b cbz r3, 8012850 <__sflush_r+0x50>
|
|
801284c: 6be3 ldr r3, [r4, #60] ; 0x3c
|
|
801284e: 1ac0 subs r0, r0, r3
|
|
8012850: 2300 movs r3, #0
|
|
8012852: 4602 mov r2, r0
|
|
8012854: 6aa6 ldr r6, [r4, #40] ; 0x28
|
|
8012856: 69e1 ldr r1, [r4, #28]
|
|
8012858: 4628 mov r0, r5
|
|
801285a: 47b0 blx r6
|
|
801285c: 1c43 adds r3, r0, #1
|
|
801285e: 89a3 ldrh r3, [r4, #12]
|
|
8012860: d106 bne.n 8012870 <__sflush_r+0x70>
|
|
8012862: 6829 ldr r1, [r5, #0]
|
|
8012864: 291d cmp r1, #29
|
|
8012866: d830 bhi.n 80128ca <__sflush_r+0xca>
|
|
8012868: 4a2b ldr r2, [pc, #172] ; (8012918 <__sflush_r+0x118>)
|
|
801286a: 40ca lsrs r2, r1
|
|
801286c: 07d6 lsls r6, r2, #31
|
|
801286e: d52c bpl.n 80128ca <__sflush_r+0xca>
|
|
8012870: f423 6300 bic.w r3, r3, #2048 ; 0x800
|
|
8012874: b21b sxth r3, r3
|
|
8012876: 2200 movs r2, #0
|
|
8012878: 6062 str r2, [r4, #4]
|
|
801287a: 04d9 lsls r1, r3, #19
|
|
801287c: 6922 ldr r2, [r4, #16]
|
|
801287e: 81a3 strh r3, [r4, #12]
|
|
8012880: 6022 str r2, [r4, #0]
|
|
8012882: d504 bpl.n 801288e <__sflush_r+0x8e>
|
|
8012884: 1c42 adds r2, r0, #1
|
|
8012886: d101 bne.n 801288c <__sflush_r+0x8c>
|
|
8012888: 682b ldr r3, [r5, #0]
|
|
801288a: b903 cbnz r3, 801288e <__sflush_r+0x8e>
|
|
801288c: 6520 str r0, [r4, #80] ; 0x50
|
|
801288e: 6b21 ldr r1, [r4, #48] ; 0x30
|
|
8012890: 602f str r7, [r5, #0]
|
|
8012892: 2900 cmp r1, #0
|
|
8012894: d0c6 beq.n 8012824 <__sflush_r+0x24>
|
|
8012896: f104 0340 add.w r3, r4, #64 ; 0x40
|
|
801289a: 4299 cmp r1, r3
|
|
801289c: d002 beq.n 80128a4 <__sflush_r+0xa4>
|
|
801289e: 4628 mov r0, r5
|
|
80128a0: f000 f938 bl 8012b14 <_free_r>
|
|
80128a4: 2000 movs r0, #0
|
|
80128a6: 6320 str r0, [r4, #48] ; 0x30
|
|
80128a8: e7bd b.n 8012826 <__sflush_r+0x26>
|
|
80128aa: 69e1 ldr r1, [r4, #28]
|
|
80128ac: 2301 movs r3, #1
|
|
80128ae: 4628 mov r0, r5
|
|
80128b0: 47b0 blx r6
|
|
80128b2: 1c41 adds r1, r0, #1
|
|
80128b4: d1c3 bne.n 801283e <__sflush_r+0x3e>
|
|
80128b6: 682b ldr r3, [r5, #0]
|
|
80128b8: 2b00 cmp r3, #0
|
|
80128ba: d0c0 beq.n 801283e <__sflush_r+0x3e>
|
|
80128bc: 2b1d cmp r3, #29
|
|
80128be: d001 beq.n 80128c4 <__sflush_r+0xc4>
|
|
80128c0: 2b16 cmp r3, #22
|
|
80128c2: d101 bne.n 80128c8 <__sflush_r+0xc8>
|
|
80128c4: 602f str r7, [r5, #0]
|
|
80128c6: e7ad b.n 8012824 <__sflush_r+0x24>
|
|
80128c8: 89a3 ldrh r3, [r4, #12]
|
|
80128ca: f043 0340 orr.w r3, r3, #64 ; 0x40
|
|
80128ce: 81a3 strh r3, [r4, #12]
|
|
80128d0: e7a9 b.n 8012826 <__sflush_r+0x26>
|
|
80128d2: 690f ldr r7, [r1, #16]
|
|
80128d4: 2f00 cmp r7, #0
|
|
80128d6: d0a5 beq.n 8012824 <__sflush_r+0x24>
|
|
80128d8: 079b lsls r3, r3, #30
|
|
80128da: 680e ldr r6, [r1, #0]
|
|
80128dc: bf08 it eq
|
|
80128de: 694b ldreq r3, [r1, #20]
|
|
80128e0: 600f str r7, [r1, #0]
|
|
80128e2: bf18 it ne
|
|
80128e4: 2300 movne r3, #0
|
|
80128e6: eba6 0807 sub.w r8, r6, r7
|
|
80128ea: 608b str r3, [r1, #8]
|
|
80128ec: f1b8 0f00 cmp.w r8, #0
|
|
80128f0: dd98 ble.n 8012824 <__sflush_r+0x24>
|
|
80128f2: 69e1 ldr r1, [r4, #28]
|
|
80128f4: 6a66 ldr r6, [r4, #36] ; 0x24
|
|
80128f6: 4643 mov r3, r8
|
|
80128f8: 463a mov r2, r7
|
|
80128fa: 4628 mov r0, r5
|
|
80128fc: 47b0 blx r6
|
|
80128fe: 2800 cmp r0, #0
|
|
8012900: dc06 bgt.n 8012910 <__sflush_r+0x110>
|
|
8012902: 89a3 ldrh r3, [r4, #12]
|
|
8012904: f043 0340 orr.w r3, r3, #64 ; 0x40
|
|
8012908: 81a3 strh r3, [r4, #12]
|
|
801290a: f04f 30ff mov.w r0, #4294967295
|
|
801290e: e78a b.n 8012826 <__sflush_r+0x26>
|
|
8012910: 4407 add r7, r0
|
|
8012912: eba8 0800 sub.w r8, r8, r0
|
|
8012916: e7e9 b.n 80128ec <__sflush_r+0xec>
|
|
8012918: 20400001 .word 0x20400001
|
|
|
|
0801291c <_fflush_r>:
|
|
801291c: b538 push {r3, r4, r5, lr}
|
|
801291e: 460c mov r4, r1
|
|
8012920: 4605 mov r5, r0
|
|
8012922: b118 cbz r0, 801292c <_fflush_r+0x10>
|
|
8012924: 6b83 ldr r3, [r0, #56] ; 0x38
|
|
8012926: b90b cbnz r3, 801292c <_fflush_r+0x10>
|
|
8012928: f000 f864 bl 80129f4 <__sinit>
|
|
801292c: f9b4 300c ldrsh.w r3, [r4, #12]
|
|
8012930: b1bb cbz r3, 8012962 <_fflush_r+0x46>
|
|
8012932: 6e62 ldr r2, [r4, #100] ; 0x64
|
|
8012934: 07d0 lsls r0, r2, #31
|
|
8012936: d404 bmi.n 8012942 <_fflush_r+0x26>
|
|
8012938: 0599 lsls r1, r3, #22
|
|
801293a: d402 bmi.n 8012942 <_fflush_r+0x26>
|
|
801293c: 6da0 ldr r0, [r4, #88] ; 0x58
|
|
801293e: f000 f9cf bl 8012ce0 <__retarget_lock_acquire_recursive>
|
|
8012942: 4628 mov r0, r5
|
|
8012944: 4621 mov r1, r4
|
|
8012946: f7ff ff5b bl 8012800 <__sflush_r>
|
|
801294a: 6e63 ldr r3, [r4, #100] ; 0x64
|
|
801294c: 07da lsls r2, r3, #31
|
|
801294e: 4605 mov r5, r0
|
|
8012950: d405 bmi.n 801295e <_fflush_r+0x42>
|
|
8012952: 89a3 ldrh r3, [r4, #12]
|
|
8012954: 059b lsls r3, r3, #22
|
|
8012956: d402 bmi.n 801295e <_fflush_r+0x42>
|
|
8012958: 6da0 ldr r0, [r4, #88] ; 0x58
|
|
801295a: f000 f9c2 bl 8012ce2 <__retarget_lock_release_recursive>
|
|
801295e: 4628 mov r0, r5
|
|
8012960: bd38 pop {r3, r4, r5, pc}
|
|
8012962: 461d mov r5, r3
|
|
8012964: e7fb b.n 801295e <_fflush_r+0x42>
|
|
...
|
|
|
|
08012968 <std>:
|
|
8012968: 2300 movs r3, #0
|
|
801296a: b510 push {r4, lr}
|
|
801296c: 4604 mov r4, r0
|
|
801296e: e9c0 3300 strd r3, r3, [r0]
|
|
8012972: e9c0 3304 strd r3, r3, [r0, #16]
|
|
8012976: 6083 str r3, [r0, #8]
|
|
8012978: 8181 strh r1, [r0, #12]
|
|
801297a: 6643 str r3, [r0, #100] ; 0x64
|
|
801297c: 81c2 strh r2, [r0, #14]
|
|
801297e: 6183 str r3, [r0, #24]
|
|
8012980: 4619 mov r1, r3
|
|
8012982: 2208 movs r2, #8
|
|
8012984: 305c adds r0, #92 ; 0x5c
|
|
8012986: f7fd fdaf bl 80104e8 <memset>
|
|
801298a: 4b07 ldr r3, [pc, #28] ; (80129a8 <std+0x40>)
|
|
801298c: 6223 str r3, [r4, #32]
|
|
801298e: 4b07 ldr r3, [pc, #28] ; (80129ac <std+0x44>)
|
|
8012990: 6263 str r3, [r4, #36] ; 0x24
|
|
8012992: 4b07 ldr r3, [pc, #28] ; (80129b0 <std+0x48>)
|
|
8012994: 62a3 str r3, [r4, #40] ; 0x28
|
|
8012996: 4b07 ldr r3, [pc, #28] ; (80129b4 <std+0x4c>)
|
|
8012998: 61e4 str r4, [r4, #28]
|
|
801299a: 62e3 str r3, [r4, #44] ; 0x2c
|
|
801299c: f104 0058 add.w r0, r4, #88 ; 0x58
|
|
80129a0: e8bd 4010 ldmia.w sp!, {r4, lr}
|
|
80129a4: f000 b99a b.w 8012cdc <__retarget_lock_init_recursive>
|
|
80129a8: 08013949 .word 0x08013949
|
|
80129ac: 0801396b .word 0x0801396b
|
|
80129b0: 080139a3 .word 0x080139a3
|
|
80129b4: 080139c7 .word 0x080139c7
|
|
|
|
080129b8 <_cleanup_r>:
|
|
80129b8: 4901 ldr r1, [pc, #4] ; (80129c0 <_cleanup_r+0x8>)
|
|
80129ba: f000 b96b b.w 8012c94 <_fwalk_reent>
|
|
80129be: bf00 nop
|
|
80129c0: 08014591 .word 0x08014591
|
|
|
|
080129c4 <__sfp_lock_acquire>:
|
|
80129c4: 4801 ldr r0, [pc, #4] ; (80129cc <__sfp_lock_acquire+0x8>)
|
|
80129c6: f000 b98b b.w 8012ce0 <__retarget_lock_acquire_recursive>
|
|
80129ca: bf00 nop
|
|
80129cc: 20008d90 .word 0x20008d90
|
|
|
|
080129d0 <__sfp_lock_release>:
|
|
80129d0: 4801 ldr r0, [pc, #4] ; (80129d8 <__sfp_lock_release+0x8>)
|
|
80129d2: f000 b986 b.w 8012ce2 <__retarget_lock_release_recursive>
|
|
80129d6: bf00 nop
|
|
80129d8: 20008d90 .word 0x20008d90
|
|
|
|
080129dc <__sinit_lock_acquire>:
|
|
80129dc: 4801 ldr r0, [pc, #4] ; (80129e4 <__sinit_lock_acquire+0x8>)
|
|
80129de: f000 b97f b.w 8012ce0 <__retarget_lock_acquire_recursive>
|
|
80129e2: bf00 nop
|
|
80129e4: 20008d91 .word 0x20008d91
|
|
|
|
080129e8 <__sinit_lock_release>:
|
|
80129e8: 4801 ldr r0, [pc, #4] ; (80129f0 <__sinit_lock_release+0x8>)
|
|
80129ea: f000 b97a b.w 8012ce2 <__retarget_lock_release_recursive>
|
|
80129ee: bf00 nop
|
|
80129f0: 20008d91 .word 0x20008d91
|
|
|
|
080129f4 <__sinit>:
|
|
80129f4: b510 push {r4, lr}
|
|
80129f6: 4604 mov r4, r0
|
|
80129f8: f7ff fff0 bl 80129dc <__sinit_lock_acquire>
|
|
80129fc: 6ba2 ldr r2, [r4, #56] ; 0x38
|
|
80129fe: b11a cbz r2, 8012a08 <__sinit+0x14>
|
|
8012a00: e8bd 4010 ldmia.w sp!, {r4, lr}
|
|
8012a04: f7ff bff0 b.w 80129e8 <__sinit_lock_release>
|
|
8012a08: 4b0d ldr r3, [pc, #52] ; (8012a40 <__sinit+0x4c>)
|
|
8012a0a: 63e3 str r3, [r4, #60] ; 0x3c
|
|
8012a0c: 2303 movs r3, #3
|
|
8012a0e: f8c4 32e4 str.w r3, [r4, #740] ; 0x2e4
|
|
8012a12: f504 733b add.w r3, r4, #748 ; 0x2ec
|
|
8012a16: f8c4 32e8 str.w r3, [r4, #744] ; 0x2e8
|
|
8012a1a: 6860 ldr r0, [r4, #4]
|
|
8012a1c: f8c4 22e0 str.w r2, [r4, #736] ; 0x2e0
|
|
8012a20: 2104 movs r1, #4
|
|
8012a22: f7ff ffa1 bl 8012968 <std>
|
|
8012a26: 68a0 ldr r0, [r4, #8]
|
|
8012a28: 2201 movs r2, #1
|
|
8012a2a: 2109 movs r1, #9
|
|
8012a2c: f7ff ff9c bl 8012968 <std>
|
|
8012a30: 68e0 ldr r0, [r4, #12]
|
|
8012a32: 2202 movs r2, #2
|
|
8012a34: 2112 movs r1, #18
|
|
8012a36: f7ff ff97 bl 8012968 <std>
|
|
8012a3a: 2301 movs r3, #1
|
|
8012a3c: 63a3 str r3, [r4, #56] ; 0x38
|
|
8012a3e: e7df b.n 8012a00 <__sinit+0xc>
|
|
8012a40: 080129b9 .word 0x080129b9
|
|
|
|
08012a44 <__libc_fini_array>:
|
|
8012a44: b538 push {r3, r4, r5, lr}
|
|
8012a46: 4d07 ldr r5, [pc, #28] ; (8012a64 <__libc_fini_array+0x20>)
|
|
8012a48: 4c07 ldr r4, [pc, #28] ; (8012a68 <__libc_fini_array+0x24>)
|
|
8012a4a: 1b64 subs r4, r4, r5
|
|
8012a4c: 10a4 asrs r4, r4, #2
|
|
8012a4e: b91c cbnz r4, 8012a58 <__libc_fini_array+0x14>
|
|
8012a50: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr}
|
|
8012a54: f002 bace b.w 8014ff4 <_fini>
|
|
8012a58: 3c01 subs r4, #1
|
|
8012a5a: f855 3024 ldr.w r3, [r5, r4, lsl #2]
|
|
8012a5e: 4798 blx r3
|
|
8012a60: e7f5 b.n 8012a4e <__libc_fini_array+0xa>
|
|
8012a62: bf00 nop
|
|
8012a64: 080182fc .word 0x080182fc
|
|
8012a68: 08018300 .word 0x08018300
|
|
|
|
08012a6c <_malloc_trim_r>:
|
|
8012a6c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
|
|
8012a70: 4606 mov r6, r0
|
|
8012a72: 2008 movs r0, #8
|
|
8012a74: 460c mov r4, r1
|
|
8012a76: f000 ffbd bl 80139f4 <sysconf>
|
|
8012a7a: 4f23 ldr r7, [pc, #140] ; (8012b08 <_malloc_trim_r+0x9c>)
|
|
8012a7c: 4680 mov r8, r0
|
|
8012a7e: 4630 mov r0, r6
|
|
8012a80: f000 fbd8 bl 8013234 <__malloc_lock>
|
|
8012a84: 68bb ldr r3, [r7, #8]
|
|
8012a86: 685d ldr r5, [r3, #4]
|
|
8012a88: f025 0503 bic.w r5, r5, #3
|
|
8012a8c: 1b2c subs r4, r5, r4
|
|
8012a8e: 3c11 subs r4, #17
|
|
8012a90: 4444 add r4, r8
|
|
8012a92: fbb4 f4f8 udiv r4, r4, r8
|
|
8012a96: 3c01 subs r4, #1
|
|
8012a98: fb08 f404 mul.w r4, r8, r4
|
|
8012a9c: 45a0 cmp r8, r4
|
|
8012a9e: dd05 ble.n 8012aac <_malloc_trim_r+0x40>
|
|
8012aa0: 4630 mov r0, r6
|
|
8012aa2: f000 fbcd bl 8013240 <__malloc_unlock>
|
|
8012aa6: 2000 movs r0, #0
|
|
8012aa8: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
|
|
8012aac: 2100 movs r1, #0
|
|
8012aae: 4630 mov r0, r6
|
|
8012ab0: f000 ff3a bl 8013928 <_sbrk_r>
|
|
8012ab4: 68bb ldr r3, [r7, #8]
|
|
8012ab6: 442b add r3, r5
|
|
8012ab8: 4298 cmp r0, r3
|
|
8012aba: d1f1 bne.n 8012aa0 <_malloc_trim_r+0x34>
|
|
8012abc: 4261 negs r1, r4
|
|
8012abe: 4630 mov r0, r6
|
|
8012ac0: f000 ff32 bl 8013928 <_sbrk_r>
|
|
8012ac4: 3001 adds r0, #1
|
|
8012ac6: d110 bne.n 8012aea <_malloc_trim_r+0x7e>
|
|
8012ac8: 2100 movs r1, #0
|
|
8012aca: 4630 mov r0, r6
|
|
8012acc: f000 ff2c bl 8013928 <_sbrk_r>
|
|
8012ad0: 68ba ldr r2, [r7, #8]
|
|
8012ad2: 1a83 subs r3, r0, r2
|
|
8012ad4: 2b0f cmp r3, #15
|
|
8012ad6: dde3 ble.n 8012aa0 <_malloc_trim_r+0x34>
|
|
8012ad8: 490c ldr r1, [pc, #48] ; (8012b0c <_malloc_trim_r+0xa0>)
|
|
8012ada: 6809 ldr r1, [r1, #0]
|
|
8012adc: 1a40 subs r0, r0, r1
|
|
8012ade: 490c ldr r1, [pc, #48] ; (8012b10 <_malloc_trim_r+0xa4>)
|
|
8012ae0: f043 0301 orr.w r3, r3, #1
|
|
8012ae4: 6008 str r0, [r1, #0]
|
|
8012ae6: 6053 str r3, [r2, #4]
|
|
8012ae8: e7da b.n 8012aa0 <_malloc_trim_r+0x34>
|
|
8012aea: 68bb ldr r3, [r7, #8]
|
|
8012aec: 4a08 ldr r2, [pc, #32] ; (8012b10 <_malloc_trim_r+0xa4>)
|
|
8012aee: 1b2d subs r5, r5, r4
|
|
8012af0: f045 0501 orr.w r5, r5, #1
|
|
8012af4: 605d str r5, [r3, #4]
|
|
8012af6: 6813 ldr r3, [r2, #0]
|
|
8012af8: 4630 mov r0, r6
|
|
8012afa: 1b1b subs r3, r3, r4
|
|
8012afc: 6013 str r3, [r2, #0]
|
|
8012afe: f000 fb9f bl 8013240 <__malloc_unlock>
|
|
8012b02: 2001 movs r0, #1
|
|
8012b04: e7d0 b.n 8012aa8 <_malloc_trim_r+0x3c>
|
|
8012b06: bf00 nop
|
|
8012b08: 20000464 .word 0x20000464
|
|
8012b0c: 2000086c .word 0x2000086c
|
|
8012b10: 20008d94 .word 0x20008d94
|
|
|
|
08012b14 <_free_r>:
|
|
8012b14: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
8012b16: 4605 mov r5, r0
|
|
8012b18: 460f mov r7, r1
|
|
8012b1a: 2900 cmp r1, #0
|
|
8012b1c: f000 80b1 beq.w 8012c82 <_free_r+0x16e>
|
|
8012b20: f000 fb88 bl 8013234 <__malloc_lock>
|
|
8012b24: f857 2c04 ldr.w r2, [r7, #-4]
|
|
8012b28: 4856 ldr r0, [pc, #344] ; (8012c84 <_free_r+0x170>)
|
|
8012b2a: f022 0401 bic.w r4, r2, #1
|
|
8012b2e: f1a7 0308 sub.w r3, r7, #8
|
|
8012b32: eb03 0c04 add.w ip, r3, r4
|
|
8012b36: 6881 ldr r1, [r0, #8]
|
|
8012b38: f8dc 6004 ldr.w r6, [ip, #4]
|
|
8012b3c: 4561 cmp r1, ip
|
|
8012b3e: f026 0603 bic.w r6, r6, #3
|
|
8012b42: f002 0201 and.w r2, r2, #1
|
|
8012b46: d11b bne.n 8012b80 <_free_r+0x6c>
|
|
8012b48: 4434 add r4, r6
|
|
8012b4a: b93a cbnz r2, 8012b5c <_free_r+0x48>
|
|
8012b4c: f857 2c08 ldr.w r2, [r7, #-8]
|
|
8012b50: 1a9b subs r3, r3, r2
|
|
8012b52: 4414 add r4, r2
|
|
8012b54: e9d3 1202 ldrd r1, r2, [r3, #8]
|
|
8012b58: 60ca str r2, [r1, #12]
|
|
8012b5a: 6091 str r1, [r2, #8]
|
|
8012b5c: f044 0201 orr.w r2, r4, #1
|
|
8012b60: 605a str r2, [r3, #4]
|
|
8012b62: 6083 str r3, [r0, #8]
|
|
8012b64: 4b48 ldr r3, [pc, #288] ; (8012c88 <_free_r+0x174>)
|
|
8012b66: 681b ldr r3, [r3, #0]
|
|
8012b68: 42a3 cmp r3, r4
|
|
8012b6a: d804 bhi.n 8012b76 <_free_r+0x62>
|
|
8012b6c: 4b47 ldr r3, [pc, #284] ; (8012c8c <_free_r+0x178>)
|
|
8012b6e: 4628 mov r0, r5
|
|
8012b70: 6819 ldr r1, [r3, #0]
|
|
8012b72: f7ff ff7b bl 8012a6c <_malloc_trim_r>
|
|
8012b76: 4628 mov r0, r5
|
|
8012b78: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr}
|
|
8012b7c: f000 bb60 b.w 8013240 <__malloc_unlock>
|
|
8012b80: f8cc 6004 str.w r6, [ip, #4]
|
|
8012b84: 2a00 cmp r2, #0
|
|
8012b86: d138 bne.n 8012bfa <_free_r+0xe6>
|
|
8012b88: f857 1c08 ldr.w r1, [r7, #-8]
|
|
8012b8c: 1a5b subs r3, r3, r1
|
|
8012b8e: 440c add r4, r1
|
|
8012b90: 6899 ldr r1, [r3, #8]
|
|
8012b92: f100 0708 add.w r7, r0, #8
|
|
8012b96: 42b9 cmp r1, r7
|
|
8012b98: d031 beq.n 8012bfe <_free_r+0xea>
|
|
8012b9a: 68df ldr r7, [r3, #12]
|
|
8012b9c: 60cf str r7, [r1, #12]
|
|
8012b9e: 60b9 str r1, [r7, #8]
|
|
8012ba0: eb0c 0106 add.w r1, ip, r6
|
|
8012ba4: 6849 ldr r1, [r1, #4]
|
|
8012ba6: 07c9 lsls r1, r1, #31
|
|
8012ba8: d40b bmi.n 8012bc2 <_free_r+0xae>
|
|
8012baa: f8dc 1008 ldr.w r1, [ip, #8]
|
|
8012bae: 4434 add r4, r6
|
|
8012bb0: bb3a cbnz r2, 8012c02 <_free_r+0xee>
|
|
8012bb2: 4e37 ldr r6, [pc, #220] ; (8012c90 <_free_r+0x17c>)
|
|
8012bb4: 42b1 cmp r1, r6
|
|
8012bb6: d124 bne.n 8012c02 <_free_r+0xee>
|
|
8012bb8: e9c0 3304 strd r3, r3, [r0, #16]
|
|
8012bbc: e9c3 1102 strd r1, r1, [r3, #8]
|
|
8012bc0: 2201 movs r2, #1
|
|
8012bc2: f044 0101 orr.w r1, r4, #1
|
|
8012bc6: 6059 str r1, [r3, #4]
|
|
8012bc8: 511c str r4, [r3, r4]
|
|
8012bca: 2a00 cmp r2, #0
|
|
8012bcc: d1d3 bne.n 8012b76 <_free_r+0x62>
|
|
8012bce: f5b4 7f00 cmp.w r4, #512 ; 0x200
|
|
8012bd2: d21b bcs.n 8012c0c <_free_r+0xf8>
|
|
8012bd4: 0961 lsrs r1, r4, #5
|
|
8012bd6: 08e2 lsrs r2, r4, #3
|
|
8012bd8: 2401 movs r4, #1
|
|
8012bda: 408c lsls r4, r1
|
|
8012bdc: 6841 ldr r1, [r0, #4]
|
|
8012bde: 3201 adds r2, #1
|
|
8012be0: 430c orrs r4, r1
|
|
8012be2: 6044 str r4, [r0, #4]
|
|
8012be4: eb00 01c2 add.w r1, r0, r2, lsl #3
|
|
8012be8: f850 4032 ldr.w r4, [r0, r2, lsl #3]
|
|
8012bec: 3908 subs r1, #8
|
|
8012bee: e9c3 4102 strd r4, r1, [r3, #8]
|
|
8012bf2: f840 3032 str.w r3, [r0, r2, lsl #3]
|
|
8012bf6: 60e3 str r3, [r4, #12]
|
|
8012bf8: e7bd b.n 8012b76 <_free_r+0x62>
|
|
8012bfa: 2200 movs r2, #0
|
|
8012bfc: e7d0 b.n 8012ba0 <_free_r+0x8c>
|
|
8012bfe: 2201 movs r2, #1
|
|
8012c00: e7ce b.n 8012ba0 <_free_r+0x8c>
|
|
8012c02: f8dc 600c ldr.w r6, [ip, #12]
|
|
8012c06: 60ce str r6, [r1, #12]
|
|
8012c08: 60b1 str r1, [r6, #8]
|
|
8012c0a: e7da b.n 8012bc2 <_free_r+0xae>
|
|
8012c0c: f5b4 6f20 cmp.w r4, #2560 ; 0xa00
|
|
8012c10: ea4f 2254 mov.w r2, r4, lsr #9
|
|
8012c14: d214 bcs.n 8012c40 <_free_r+0x12c>
|
|
8012c16: 09a2 lsrs r2, r4, #6
|
|
8012c18: 3238 adds r2, #56 ; 0x38
|
|
8012c1a: 1c51 adds r1, r2, #1
|
|
8012c1c: eb00 06c2 add.w r6, r0, r2, lsl #3
|
|
8012c20: f850 1031 ldr.w r1, [r0, r1, lsl #3]
|
|
8012c24: 428e cmp r6, r1
|
|
8012c26: d125 bne.n 8012c74 <_free_r+0x160>
|
|
8012c28: 2401 movs r4, #1
|
|
8012c2a: 1092 asrs r2, r2, #2
|
|
8012c2c: fa04 f202 lsl.w r2, r4, r2
|
|
8012c30: 6844 ldr r4, [r0, #4]
|
|
8012c32: 4322 orrs r2, r4
|
|
8012c34: 6042 str r2, [r0, #4]
|
|
8012c36: e9c3 1602 strd r1, r6, [r3, #8]
|
|
8012c3a: 60b3 str r3, [r6, #8]
|
|
8012c3c: 60cb str r3, [r1, #12]
|
|
8012c3e: e79a b.n 8012b76 <_free_r+0x62>
|
|
8012c40: 2a14 cmp r2, #20
|
|
8012c42: d801 bhi.n 8012c48 <_free_r+0x134>
|
|
8012c44: 325b adds r2, #91 ; 0x5b
|
|
8012c46: e7e8 b.n 8012c1a <_free_r+0x106>
|
|
8012c48: 2a54 cmp r2, #84 ; 0x54
|
|
8012c4a: d802 bhi.n 8012c52 <_free_r+0x13e>
|
|
8012c4c: 0b22 lsrs r2, r4, #12
|
|
8012c4e: 326e adds r2, #110 ; 0x6e
|
|
8012c50: e7e3 b.n 8012c1a <_free_r+0x106>
|
|
8012c52: f5b2 7faa cmp.w r2, #340 ; 0x154
|
|
8012c56: d802 bhi.n 8012c5e <_free_r+0x14a>
|
|
8012c58: 0be2 lsrs r2, r4, #15
|
|
8012c5a: 3277 adds r2, #119 ; 0x77
|
|
8012c5c: e7dd b.n 8012c1a <_free_r+0x106>
|
|
8012c5e: f240 5154 movw r1, #1364 ; 0x554
|
|
8012c62: 428a cmp r2, r1
|
|
8012c64: bf9a itte ls
|
|
8012c66: 0ca2 lsrls r2, r4, #18
|
|
8012c68: 327c addls r2, #124 ; 0x7c
|
|
8012c6a: 227e movhi r2, #126 ; 0x7e
|
|
8012c6c: e7d5 b.n 8012c1a <_free_r+0x106>
|
|
8012c6e: 6889 ldr r1, [r1, #8]
|
|
8012c70: 428e cmp r6, r1
|
|
8012c72: d004 beq.n 8012c7e <_free_r+0x16a>
|
|
8012c74: 684a ldr r2, [r1, #4]
|
|
8012c76: f022 0203 bic.w r2, r2, #3
|
|
8012c7a: 42a2 cmp r2, r4
|
|
8012c7c: d8f7 bhi.n 8012c6e <_free_r+0x15a>
|
|
8012c7e: 68ce ldr r6, [r1, #12]
|
|
8012c80: e7d9 b.n 8012c36 <_free_r+0x122>
|
|
8012c82: bdf8 pop {r3, r4, r5, r6, r7, pc}
|
|
8012c84: 20000464 .word 0x20000464
|
|
8012c88: 20000870 .word 0x20000870
|
|
8012c8c: 20008dc4 .word 0x20008dc4
|
|
8012c90: 2000046c .word 0x2000046c
|
|
|
|
08012c94 <_fwalk_reent>:
|
|
8012c94: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
|
|
8012c98: 4606 mov r6, r0
|
|
8012c9a: 4688 mov r8, r1
|
|
8012c9c: f500 7438 add.w r4, r0, #736 ; 0x2e0
|
|
8012ca0: 2700 movs r7, #0
|
|
8012ca2: e9d4 9501 ldrd r9, r5, [r4, #4]
|
|
8012ca6: f1b9 0901 subs.w r9, r9, #1
|
|
8012caa: d505 bpl.n 8012cb8 <_fwalk_reent+0x24>
|
|
8012cac: 6824 ldr r4, [r4, #0]
|
|
8012cae: 2c00 cmp r4, #0
|
|
8012cb0: d1f7 bne.n 8012ca2 <_fwalk_reent+0xe>
|
|
8012cb2: 4638 mov r0, r7
|
|
8012cb4: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
|
|
8012cb8: 89ab ldrh r3, [r5, #12]
|
|
8012cba: 2b01 cmp r3, #1
|
|
8012cbc: d907 bls.n 8012cce <_fwalk_reent+0x3a>
|
|
8012cbe: f9b5 300e ldrsh.w r3, [r5, #14]
|
|
8012cc2: 3301 adds r3, #1
|
|
8012cc4: d003 beq.n 8012cce <_fwalk_reent+0x3a>
|
|
8012cc6: 4629 mov r1, r5
|
|
8012cc8: 4630 mov r0, r6
|
|
8012cca: 47c0 blx r8
|
|
8012ccc: 4307 orrs r7, r0
|
|
8012cce: 3568 adds r5, #104 ; 0x68
|
|
8012cd0: e7e9 b.n 8012ca6 <_fwalk_reent+0x12>
|
|
...
|
|
|
|
08012cd4 <_localeconv_r>:
|
|
8012cd4: 4800 ldr r0, [pc, #0] ; (8012cd8 <_localeconv_r+0x4>)
|
|
8012cd6: 4770 bx lr
|
|
8012cd8: 20000964 .word 0x20000964
|
|
|
|
08012cdc <__retarget_lock_init_recursive>:
|
|
8012cdc: 4770 bx lr
|
|
|
|
08012cde <__retarget_lock_close_recursive>:
|
|
8012cde: 4770 bx lr
|
|
|
|
08012ce0 <__retarget_lock_acquire_recursive>:
|
|
8012ce0: 4770 bx lr
|
|
|
|
08012ce2 <__retarget_lock_release_recursive>:
|
|
8012ce2: 4770 bx lr
|
|
|
|
08012ce4 <__swhatbuf_r>:
|
|
8012ce4: b570 push {r4, r5, r6, lr}
|
|
8012ce6: 460e mov r6, r1
|
|
8012ce8: f9b1 100e ldrsh.w r1, [r1, #14]
|
|
8012cec: 2900 cmp r1, #0
|
|
8012cee: b096 sub sp, #88 ; 0x58
|
|
8012cf0: 4614 mov r4, r2
|
|
8012cf2: 461d mov r5, r3
|
|
8012cf4: da0a bge.n 8012d0c <__swhatbuf_r+0x28>
|
|
8012cf6: f9b6 100c ldrsh.w r1, [r6, #12]
|
|
8012cfa: 2300 movs r3, #0
|
|
8012cfc: f011 0080 ands.w r0, r1, #128 ; 0x80
|
|
8012d00: 602b str r3, [r5, #0]
|
|
8012d02: d116 bne.n 8012d32 <__swhatbuf_r+0x4e>
|
|
8012d04: f44f 6380 mov.w r3, #1024 ; 0x400
|
|
8012d08: 6023 str r3, [r4, #0]
|
|
8012d0a: e015 b.n 8012d38 <__swhatbuf_r+0x54>
|
|
8012d0c: 466a mov r2, sp
|
|
8012d0e: f001 fd15 bl 801473c <_fstat_r>
|
|
8012d12: 2800 cmp r0, #0
|
|
8012d14: dbef blt.n 8012cf6 <__swhatbuf_r+0x12>
|
|
8012d16: 9a01 ldr r2, [sp, #4]
|
|
8012d18: f402 4270 and.w r2, r2, #61440 ; 0xf000
|
|
8012d1c: f5a2 5300 sub.w r3, r2, #8192 ; 0x2000
|
|
8012d20: 425a negs r2, r3
|
|
8012d22: 415a adcs r2, r3
|
|
8012d24: f44f 6380 mov.w r3, #1024 ; 0x400
|
|
8012d28: 602a str r2, [r5, #0]
|
|
8012d2a: f44f 6000 mov.w r0, #2048 ; 0x800
|
|
8012d2e: 6023 str r3, [r4, #0]
|
|
8012d30: e002 b.n 8012d38 <__swhatbuf_r+0x54>
|
|
8012d32: 2240 movs r2, #64 ; 0x40
|
|
8012d34: 6022 str r2, [r4, #0]
|
|
8012d36: 4618 mov r0, r3
|
|
8012d38: b016 add sp, #88 ; 0x58
|
|
8012d3a: bd70 pop {r4, r5, r6, pc}
|
|
|
|
08012d3c <__smakebuf_r>:
|
|
8012d3c: 898b ldrh r3, [r1, #12]
|
|
8012d3e: b573 push {r0, r1, r4, r5, r6, lr}
|
|
8012d40: 079d lsls r5, r3, #30
|
|
8012d42: 4606 mov r6, r0
|
|
8012d44: 460c mov r4, r1
|
|
8012d46: d507 bpl.n 8012d58 <__smakebuf_r+0x1c>
|
|
8012d48: f104 0343 add.w r3, r4, #67 ; 0x43
|
|
8012d4c: 6023 str r3, [r4, #0]
|
|
8012d4e: 6123 str r3, [r4, #16]
|
|
8012d50: 2301 movs r3, #1
|
|
8012d52: 6163 str r3, [r4, #20]
|
|
8012d54: b002 add sp, #8
|
|
8012d56: bd70 pop {r4, r5, r6, pc}
|
|
8012d58: ab01 add r3, sp, #4
|
|
8012d5a: 466a mov r2, sp
|
|
8012d5c: f7ff ffc2 bl 8012ce4 <__swhatbuf_r>
|
|
8012d60: 9900 ldr r1, [sp, #0]
|
|
8012d62: 4605 mov r5, r0
|
|
8012d64: 4630 mov r0, r6
|
|
8012d66: f000 f829 bl 8012dbc <_malloc_r>
|
|
8012d6a: b948 cbnz r0, 8012d80 <__smakebuf_r+0x44>
|
|
8012d6c: f9b4 300c ldrsh.w r3, [r4, #12]
|
|
8012d70: 059a lsls r2, r3, #22
|
|
8012d72: d4ef bmi.n 8012d54 <__smakebuf_r+0x18>
|
|
8012d74: f023 0303 bic.w r3, r3, #3
|
|
8012d78: f043 0302 orr.w r3, r3, #2
|
|
8012d7c: 81a3 strh r3, [r4, #12]
|
|
8012d7e: e7e3 b.n 8012d48 <__smakebuf_r+0xc>
|
|
8012d80: 4b0d ldr r3, [pc, #52] ; (8012db8 <__smakebuf_r+0x7c>)
|
|
8012d82: 63f3 str r3, [r6, #60] ; 0x3c
|
|
8012d84: 89a3 ldrh r3, [r4, #12]
|
|
8012d86: 6020 str r0, [r4, #0]
|
|
8012d88: f043 0380 orr.w r3, r3, #128 ; 0x80
|
|
8012d8c: 81a3 strh r3, [r4, #12]
|
|
8012d8e: 9b00 ldr r3, [sp, #0]
|
|
8012d90: 6163 str r3, [r4, #20]
|
|
8012d92: 9b01 ldr r3, [sp, #4]
|
|
8012d94: 6120 str r0, [r4, #16]
|
|
8012d96: b15b cbz r3, 8012db0 <__smakebuf_r+0x74>
|
|
8012d98: f9b4 100e ldrsh.w r1, [r4, #14]
|
|
8012d9c: 4630 mov r0, r6
|
|
8012d9e: f001 fe29 bl 80149f4 <_isatty_r>
|
|
8012da2: b128 cbz r0, 8012db0 <__smakebuf_r+0x74>
|
|
8012da4: 89a3 ldrh r3, [r4, #12]
|
|
8012da6: f023 0303 bic.w r3, r3, #3
|
|
8012daa: f043 0301 orr.w r3, r3, #1
|
|
8012dae: 81a3 strh r3, [r4, #12]
|
|
8012db0: 89a0 ldrh r0, [r4, #12]
|
|
8012db2: 4305 orrs r5, r0
|
|
8012db4: 81a5 strh r5, [r4, #12]
|
|
8012db6: e7cd b.n 8012d54 <__smakebuf_r+0x18>
|
|
8012db8: 080129b9 .word 0x080129b9
|
|
|
|
08012dbc <_malloc_r>:
|
|
8012dbc: f101 030b add.w r3, r1, #11
|
|
8012dc0: 2b16 cmp r3, #22
|
|
8012dc2: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
|
|
8012dc6: 4605 mov r5, r0
|
|
8012dc8: d906 bls.n 8012dd8 <_malloc_r+0x1c>
|
|
8012dca: f033 0707 bics.w r7, r3, #7
|
|
8012dce: d504 bpl.n 8012dda <_malloc_r+0x1e>
|
|
8012dd0: 230c movs r3, #12
|
|
8012dd2: 602b str r3, [r5, #0]
|
|
8012dd4: 2400 movs r4, #0
|
|
8012dd6: e1a5 b.n 8013124 <_malloc_r+0x368>
|
|
8012dd8: 2710 movs r7, #16
|
|
8012dda: 42b9 cmp r1, r7
|
|
8012ddc: d8f8 bhi.n 8012dd0 <_malloc_r+0x14>
|
|
8012dde: 4628 mov r0, r5
|
|
8012de0: f000 fa28 bl 8013234 <__malloc_lock>
|
|
8012de4: f5b7 7ffc cmp.w r7, #504 ; 0x1f8
|
|
8012de8: 4eb0 ldr r6, [pc, #704] ; (80130ac <_malloc_r+0x2f0>)
|
|
8012dea: d237 bcs.n 8012e5c <_malloc_r+0xa0>
|
|
8012dec: f107 0208 add.w r2, r7, #8
|
|
8012df0: 4432 add r2, r6
|
|
8012df2: f1a2 0108 sub.w r1, r2, #8
|
|
8012df6: 6854 ldr r4, [r2, #4]
|
|
8012df8: 428c cmp r4, r1
|
|
8012dfa: ea4f 03d7 mov.w r3, r7, lsr #3
|
|
8012dfe: d102 bne.n 8012e06 <_malloc_r+0x4a>
|
|
8012e00: 68d4 ldr r4, [r2, #12]
|
|
8012e02: 42a2 cmp r2, r4
|
|
8012e04: d010 beq.n 8012e28 <_malloc_r+0x6c>
|
|
8012e06: 6863 ldr r3, [r4, #4]
|
|
8012e08: e9d4 1202 ldrd r1, r2, [r4, #8]
|
|
8012e0c: f023 0303 bic.w r3, r3, #3
|
|
8012e10: 60ca str r2, [r1, #12]
|
|
8012e12: 4423 add r3, r4
|
|
8012e14: 6091 str r1, [r2, #8]
|
|
8012e16: 685a ldr r2, [r3, #4]
|
|
8012e18: f042 0201 orr.w r2, r2, #1
|
|
8012e1c: 605a str r2, [r3, #4]
|
|
8012e1e: 4628 mov r0, r5
|
|
8012e20: f000 fa0e bl 8013240 <__malloc_unlock>
|
|
8012e24: 3408 adds r4, #8
|
|
8012e26: e17d b.n 8013124 <_malloc_r+0x368>
|
|
8012e28: 3302 adds r3, #2
|
|
8012e2a: 6934 ldr r4, [r6, #16]
|
|
8012e2c: 49a0 ldr r1, [pc, #640] ; (80130b0 <_malloc_r+0x2f4>)
|
|
8012e2e: 428c cmp r4, r1
|
|
8012e30: d077 beq.n 8012f22 <_malloc_r+0x166>
|
|
8012e32: 6862 ldr r2, [r4, #4]
|
|
8012e34: f022 0c03 bic.w ip, r2, #3
|
|
8012e38: ebac 0007 sub.w r0, ip, r7
|
|
8012e3c: 280f cmp r0, #15
|
|
8012e3e: dd48 ble.n 8012ed2 <_malloc_r+0x116>
|
|
8012e40: 19e2 adds r2, r4, r7
|
|
8012e42: f040 0301 orr.w r3, r0, #1
|
|
8012e46: f047 0701 orr.w r7, r7, #1
|
|
8012e4a: 6067 str r7, [r4, #4]
|
|
8012e4c: e9c6 2204 strd r2, r2, [r6, #16]
|
|
8012e50: e9c2 1102 strd r1, r1, [r2, #8]
|
|
8012e54: 6053 str r3, [r2, #4]
|
|
8012e56: f844 000c str.w r0, [r4, ip]
|
|
8012e5a: e7e0 b.n 8012e1e <_malloc_r+0x62>
|
|
8012e5c: 0a7b lsrs r3, r7, #9
|
|
8012e5e: d02a beq.n 8012eb6 <_malloc_r+0xfa>
|
|
8012e60: 2b04 cmp r3, #4
|
|
8012e62: d812 bhi.n 8012e8a <_malloc_r+0xce>
|
|
8012e64: 09bb lsrs r3, r7, #6
|
|
8012e66: 3338 adds r3, #56 ; 0x38
|
|
8012e68: 1c5a adds r2, r3, #1
|
|
8012e6a: eb06 02c2 add.w r2, r6, r2, lsl #3
|
|
8012e6e: f1a2 0c08 sub.w ip, r2, #8
|
|
8012e72: 6854 ldr r4, [r2, #4]
|
|
8012e74: 4564 cmp r4, ip
|
|
8012e76: d006 beq.n 8012e86 <_malloc_r+0xca>
|
|
8012e78: 6862 ldr r2, [r4, #4]
|
|
8012e7a: f022 0203 bic.w r2, r2, #3
|
|
8012e7e: 1bd0 subs r0, r2, r7
|
|
8012e80: 280f cmp r0, #15
|
|
8012e82: dd1c ble.n 8012ebe <_malloc_r+0x102>
|
|
8012e84: 3b01 subs r3, #1
|
|
8012e86: 3301 adds r3, #1
|
|
8012e88: e7cf b.n 8012e2a <_malloc_r+0x6e>
|
|
8012e8a: 2b14 cmp r3, #20
|
|
8012e8c: d801 bhi.n 8012e92 <_malloc_r+0xd6>
|
|
8012e8e: 335b adds r3, #91 ; 0x5b
|
|
8012e90: e7ea b.n 8012e68 <_malloc_r+0xac>
|
|
8012e92: 2b54 cmp r3, #84 ; 0x54
|
|
8012e94: d802 bhi.n 8012e9c <_malloc_r+0xe0>
|
|
8012e96: 0b3b lsrs r3, r7, #12
|
|
8012e98: 336e adds r3, #110 ; 0x6e
|
|
8012e9a: e7e5 b.n 8012e68 <_malloc_r+0xac>
|
|
8012e9c: f5b3 7faa cmp.w r3, #340 ; 0x154
|
|
8012ea0: d802 bhi.n 8012ea8 <_malloc_r+0xec>
|
|
8012ea2: 0bfb lsrs r3, r7, #15
|
|
8012ea4: 3377 adds r3, #119 ; 0x77
|
|
8012ea6: e7df b.n 8012e68 <_malloc_r+0xac>
|
|
8012ea8: f240 5254 movw r2, #1364 ; 0x554
|
|
8012eac: 4293 cmp r3, r2
|
|
8012eae: d804 bhi.n 8012eba <_malloc_r+0xfe>
|
|
8012eb0: 0cbb lsrs r3, r7, #18
|
|
8012eb2: 337c adds r3, #124 ; 0x7c
|
|
8012eb4: e7d8 b.n 8012e68 <_malloc_r+0xac>
|
|
8012eb6: 233f movs r3, #63 ; 0x3f
|
|
8012eb8: e7d6 b.n 8012e68 <_malloc_r+0xac>
|
|
8012eba: 237e movs r3, #126 ; 0x7e
|
|
8012ebc: e7d4 b.n 8012e68 <_malloc_r+0xac>
|
|
8012ebe: 2800 cmp r0, #0
|
|
8012ec0: 68e1 ldr r1, [r4, #12]
|
|
8012ec2: db04 blt.n 8012ece <_malloc_r+0x112>
|
|
8012ec4: 68a3 ldr r3, [r4, #8]
|
|
8012ec6: 60d9 str r1, [r3, #12]
|
|
8012ec8: 608b str r3, [r1, #8]
|
|
8012eca: 18a3 adds r3, r4, r2
|
|
8012ecc: e7a3 b.n 8012e16 <_malloc_r+0x5a>
|
|
8012ece: 460c mov r4, r1
|
|
8012ed0: e7d0 b.n 8012e74 <_malloc_r+0xb8>
|
|
8012ed2: 2800 cmp r0, #0
|
|
8012ed4: e9c6 1104 strd r1, r1, [r6, #16]
|
|
8012ed8: db07 blt.n 8012eea <_malloc_r+0x12e>
|
|
8012eda: 44a4 add ip, r4
|
|
8012edc: f8dc 3004 ldr.w r3, [ip, #4]
|
|
8012ee0: f043 0301 orr.w r3, r3, #1
|
|
8012ee4: f8cc 3004 str.w r3, [ip, #4]
|
|
8012ee8: e799 b.n 8012e1e <_malloc_r+0x62>
|
|
8012eea: f5bc 7f00 cmp.w ip, #512 ; 0x200
|
|
8012eee: 6870 ldr r0, [r6, #4]
|
|
8012ef0: f080 8096 bcs.w 8013020 <_malloc_r+0x264>
|
|
8012ef4: ea4f 02dc mov.w r2, ip, lsr #3
|
|
8012ef8: ea4f 1e5c mov.w lr, ip, lsr #5
|
|
8012efc: f04f 0c01 mov.w ip, #1
|
|
8012f00: 3201 adds r2, #1
|
|
8012f02: fa0c fc0e lsl.w ip, ip, lr
|
|
8012f06: ea4c 0000 orr.w r0, ip, r0
|
|
8012f0a: 6070 str r0, [r6, #4]
|
|
8012f0c: f856 c032 ldr.w ip, [r6, r2, lsl #3]
|
|
8012f10: eb06 00c2 add.w r0, r6, r2, lsl #3
|
|
8012f14: 3808 subs r0, #8
|
|
8012f16: e9c4 c002 strd ip, r0, [r4, #8]
|
|
8012f1a: f846 4032 str.w r4, [r6, r2, lsl #3]
|
|
8012f1e: f8cc 400c str.w r4, [ip, #12]
|
|
8012f22: 2001 movs r0, #1
|
|
8012f24: 109a asrs r2, r3, #2
|
|
8012f26: fa00 f202 lsl.w r2, r0, r2
|
|
8012f2a: 6870 ldr r0, [r6, #4]
|
|
8012f2c: 4290 cmp r0, r2
|
|
8012f2e: d326 bcc.n 8012f7e <_malloc_r+0x1c2>
|
|
8012f30: 4210 tst r0, r2
|
|
8012f32: d106 bne.n 8012f42 <_malloc_r+0x186>
|
|
8012f34: f023 0303 bic.w r3, r3, #3
|
|
8012f38: 0052 lsls r2, r2, #1
|
|
8012f3a: 4210 tst r0, r2
|
|
8012f3c: f103 0304 add.w r3, r3, #4
|
|
8012f40: d0fa beq.n 8012f38 <_malloc_r+0x17c>
|
|
8012f42: eb06 08c3 add.w r8, r6, r3, lsl #3
|
|
8012f46: 46c1 mov r9, r8
|
|
8012f48: 469e mov lr, r3
|
|
8012f4a: f8d9 400c ldr.w r4, [r9, #12]
|
|
8012f4e: 454c cmp r4, r9
|
|
8012f50: f040 80ba bne.w 80130c8 <_malloc_r+0x30c>
|
|
8012f54: f10e 0e01 add.w lr, lr, #1
|
|
8012f58: f01e 0f03 tst.w lr, #3
|
|
8012f5c: f109 0908 add.w r9, r9, #8
|
|
8012f60: d1f3 bne.n 8012f4a <_malloc_r+0x18e>
|
|
8012f62: 0798 lsls r0, r3, #30
|
|
8012f64: f040 80e4 bne.w 8013130 <_malloc_r+0x374>
|
|
8012f68: 6873 ldr r3, [r6, #4]
|
|
8012f6a: ea23 0302 bic.w r3, r3, r2
|
|
8012f6e: 6073 str r3, [r6, #4]
|
|
8012f70: 6870 ldr r0, [r6, #4]
|
|
8012f72: 0052 lsls r2, r2, #1
|
|
8012f74: 4290 cmp r0, r2
|
|
8012f76: d302 bcc.n 8012f7e <_malloc_r+0x1c2>
|
|
8012f78: 2a00 cmp r2, #0
|
|
8012f7a: f040 80e6 bne.w 801314a <_malloc_r+0x38e>
|
|
8012f7e: f8d6 a008 ldr.w sl, [r6, #8]
|
|
8012f82: f8da 3004 ldr.w r3, [sl, #4]
|
|
8012f86: f023 0903 bic.w r9, r3, #3
|
|
8012f8a: 45b9 cmp r9, r7
|
|
8012f8c: d304 bcc.n 8012f98 <_malloc_r+0x1dc>
|
|
8012f8e: eba9 0207 sub.w r2, r9, r7
|
|
8012f92: 2a0f cmp r2, #15
|
|
8012f94: f300 8142 bgt.w 801321c <_malloc_r+0x460>
|
|
8012f98: 4b46 ldr r3, [pc, #280] ; (80130b4 <_malloc_r+0x2f8>)
|
|
8012f9a: 6819 ldr r1, [r3, #0]
|
|
8012f9c: 3110 adds r1, #16
|
|
8012f9e: 4439 add r1, r7
|
|
8012fa0: 2008 movs r0, #8
|
|
8012fa2: 9101 str r1, [sp, #4]
|
|
8012fa4: f000 fd26 bl 80139f4 <sysconf>
|
|
8012fa8: 4a43 ldr r2, [pc, #268] ; (80130b8 <_malloc_r+0x2fc>)
|
|
8012faa: 9901 ldr r1, [sp, #4]
|
|
8012fac: 6813 ldr r3, [r2, #0]
|
|
8012fae: 3301 adds r3, #1
|
|
8012fb0: bf1f itttt ne
|
|
8012fb2: f101 31ff addne.w r1, r1, #4294967295
|
|
8012fb6: 1809 addne r1, r1, r0
|
|
8012fb8: 4243 negne r3, r0
|
|
8012fba: 4019 andne r1, r3
|
|
8012fbc: 4680 mov r8, r0
|
|
8012fbe: 4628 mov r0, r5
|
|
8012fc0: 9101 str r1, [sp, #4]
|
|
8012fc2: f000 fcb1 bl 8013928 <_sbrk_r>
|
|
8012fc6: 1c42 adds r2, r0, #1
|
|
8012fc8: eb0a 0b09 add.w fp, sl, r9
|
|
8012fcc: 4604 mov r4, r0
|
|
8012fce: f000 80f8 beq.w 80131c2 <_malloc_r+0x406>
|
|
8012fd2: 4583 cmp fp, r0
|
|
8012fd4: 9901 ldr r1, [sp, #4]
|
|
8012fd6: 4a38 ldr r2, [pc, #224] ; (80130b8 <_malloc_r+0x2fc>)
|
|
8012fd8: d902 bls.n 8012fe0 <_malloc_r+0x224>
|
|
8012fda: 45b2 cmp sl, r6
|
|
8012fdc: f040 80f1 bne.w 80131c2 <_malloc_r+0x406>
|
|
8012fe0: 4b36 ldr r3, [pc, #216] ; (80130bc <_malloc_r+0x300>)
|
|
8012fe2: 6818 ldr r0, [r3, #0]
|
|
8012fe4: 45a3 cmp fp, r4
|
|
8012fe6: eb00 0e01 add.w lr, r0, r1
|
|
8012fea: f8c3 e000 str.w lr, [r3]
|
|
8012fee: f108 3cff add.w ip, r8, #4294967295
|
|
8012ff2: f040 80ac bne.w 801314e <_malloc_r+0x392>
|
|
8012ff6: ea1b 0f0c tst.w fp, ip
|
|
8012ffa: f040 80a8 bne.w 801314e <_malloc_r+0x392>
|
|
8012ffe: 68b2 ldr r2, [r6, #8]
|
|
8013000: 4449 add r1, r9
|
|
8013002: f041 0101 orr.w r1, r1, #1
|
|
8013006: 6051 str r1, [r2, #4]
|
|
8013008: 4a2d ldr r2, [pc, #180] ; (80130c0 <_malloc_r+0x304>)
|
|
801300a: 681b ldr r3, [r3, #0]
|
|
801300c: 6811 ldr r1, [r2, #0]
|
|
801300e: 428b cmp r3, r1
|
|
8013010: bf88 it hi
|
|
8013012: 6013 strhi r3, [r2, #0]
|
|
8013014: 4a2b ldr r2, [pc, #172] ; (80130c4 <_malloc_r+0x308>)
|
|
8013016: 6811 ldr r1, [r2, #0]
|
|
8013018: 428b cmp r3, r1
|
|
801301a: bf88 it hi
|
|
801301c: 6013 strhi r3, [r2, #0]
|
|
801301e: e0d0 b.n 80131c2 <_malloc_r+0x406>
|
|
8013020: f5bc 6f20 cmp.w ip, #2560 ; 0xa00
|
|
8013024: ea4f 225c mov.w r2, ip, lsr #9
|
|
8013028: d218 bcs.n 801305c <_malloc_r+0x2a0>
|
|
801302a: ea4f 129c mov.w r2, ip, lsr #6
|
|
801302e: 3238 adds r2, #56 ; 0x38
|
|
8013030: f102 0e01 add.w lr, r2, #1
|
|
8013034: eb06 08c2 add.w r8, r6, r2, lsl #3
|
|
8013038: f856 e03e ldr.w lr, [r6, lr, lsl #3]
|
|
801303c: 45f0 cmp r8, lr
|
|
801303e: d12b bne.n 8013098 <_malloc_r+0x2dc>
|
|
8013040: 1092 asrs r2, r2, #2
|
|
8013042: f04f 0c01 mov.w ip, #1
|
|
8013046: fa0c f202 lsl.w r2, ip, r2
|
|
801304a: 4310 orrs r0, r2
|
|
801304c: 6070 str r0, [r6, #4]
|
|
801304e: e9c4 e802 strd lr, r8, [r4, #8]
|
|
8013052: f8c8 4008 str.w r4, [r8, #8]
|
|
8013056: f8ce 400c str.w r4, [lr, #12]
|
|
801305a: e762 b.n 8012f22 <_malloc_r+0x166>
|
|
801305c: 2a14 cmp r2, #20
|
|
801305e: d801 bhi.n 8013064 <_malloc_r+0x2a8>
|
|
8013060: 325b adds r2, #91 ; 0x5b
|
|
8013062: e7e5 b.n 8013030 <_malloc_r+0x274>
|
|
8013064: 2a54 cmp r2, #84 ; 0x54
|
|
8013066: d803 bhi.n 8013070 <_malloc_r+0x2b4>
|
|
8013068: ea4f 321c mov.w r2, ip, lsr #12
|
|
801306c: 326e adds r2, #110 ; 0x6e
|
|
801306e: e7df b.n 8013030 <_malloc_r+0x274>
|
|
8013070: f5b2 7faa cmp.w r2, #340 ; 0x154
|
|
8013074: d803 bhi.n 801307e <_malloc_r+0x2c2>
|
|
8013076: ea4f 32dc mov.w r2, ip, lsr #15
|
|
801307a: 3277 adds r2, #119 ; 0x77
|
|
801307c: e7d8 b.n 8013030 <_malloc_r+0x274>
|
|
801307e: f240 5e54 movw lr, #1364 ; 0x554
|
|
8013082: 4572 cmp r2, lr
|
|
8013084: bf9a itte ls
|
|
8013086: ea4f 429c movls.w r2, ip, lsr #18
|
|
801308a: 327c addls r2, #124 ; 0x7c
|
|
801308c: 227e movhi r2, #126 ; 0x7e
|
|
801308e: e7cf b.n 8013030 <_malloc_r+0x274>
|
|
8013090: f8de e008 ldr.w lr, [lr, #8]
|
|
8013094: 45f0 cmp r8, lr
|
|
8013096: d005 beq.n 80130a4 <_malloc_r+0x2e8>
|
|
8013098: f8de 2004 ldr.w r2, [lr, #4]
|
|
801309c: f022 0203 bic.w r2, r2, #3
|
|
80130a0: 4562 cmp r2, ip
|
|
80130a2: d8f5 bhi.n 8013090 <_malloc_r+0x2d4>
|
|
80130a4: f8de 800c ldr.w r8, [lr, #12]
|
|
80130a8: e7d1 b.n 801304e <_malloc_r+0x292>
|
|
80130aa: bf00 nop
|
|
80130ac: 20000464 .word 0x20000464
|
|
80130b0: 2000046c .word 0x2000046c
|
|
80130b4: 20008dc4 .word 0x20008dc4
|
|
80130b8: 2000086c .word 0x2000086c
|
|
80130bc: 20008d94 .word 0x20008d94
|
|
80130c0: 20008dbc .word 0x20008dbc
|
|
80130c4: 20008dc0 .word 0x20008dc0
|
|
80130c8: 6860 ldr r0, [r4, #4]
|
|
80130ca: f8d4 c00c ldr.w ip, [r4, #12]
|
|
80130ce: f020 0003 bic.w r0, r0, #3
|
|
80130d2: eba0 0a07 sub.w sl, r0, r7
|
|
80130d6: f1ba 0f0f cmp.w sl, #15
|
|
80130da: dd12 ble.n 8013102 <_malloc_r+0x346>
|
|
80130dc: 68a3 ldr r3, [r4, #8]
|
|
80130de: 19e2 adds r2, r4, r7
|
|
80130e0: f047 0701 orr.w r7, r7, #1
|
|
80130e4: 6067 str r7, [r4, #4]
|
|
80130e6: f8c3 c00c str.w ip, [r3, #12]
|
|
80130ea: f8cc 3008 str.w r3, [ip, #8]
|
|
80130ee: f04a 0301 orr.w r3, sl, #1
|
|
80130f2: e9c6 2204 strd r2, r2, [r6, #16]
|
|
80130f6: e9c2 1102 strd r1, r1, [r2, #8]
|
|
80130fa: 6053 str r3, [r2, #4]
|
|
80130fc: f844 a000 str.w sl, [r4, r0]
|
|
8013100: e68d b.n 8012e1e <_malloc_r+0x62>
|
|
8013102: f1ba 0f00 cmp.w sl, #0
|
|
8013106: db11 blt.n 801312c <_malloc_r+0x370>
|
|
8013108: 4420 add r0, r4
|
|
801310a: 6843 ldr r3, [r0, #4]
|
|
801310c: f043 0301 orr.w r3, r3, #1
|
|
8013110: 6043 str r3, [r0, #4]
|
|
8013112: f854 3f08 ldr.w r3, [r4, #8]!
|
|
8013116: 4628 mov r0, r5
|
|
8013118: f8c3 c00c str.w ip, [r3, #12]
|
|
801311c: f8cc 3008 str.w r3, [ip, #8]
|
|
8013120: f000 f88e bl 8013240 <__malloc_unlock>
|
|
8013124: 4620 mov r0, r4
|
|
8013126: b003 add sp, #12
|
|
8013128: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
|
|
801312c: 4664 mov r4, ip
|
|
801312e: e70e b.n 8012f4e <_malloc_r+0x192>
|
|
8013130: f858 0908 ldr.w r0, [r8], #-8
|
|
8013134: 4540 cmp r0, r8
|
|
8013136: f103 33ff add.w r3, r3, #4294967295
|
|
801313a: f43f af12 beq.w 8012f62 <_malloc_r+0x1a6>
|
|
801313e: e717 b.n 8012f70 <_malloc_r+0x1b4>
|
|
8013140: 3304 adds r3, #4
|
|
8013142: 0052 lsls r2, r2, #1
|
|
8013144: 4210 tst r0, r2
|
|
8013146: d0fb beq.n 8013140 <_malloc_r+0x384>
|
|
8013148: e6fb b.n 8012f42 <_malloc_r+0x186>
|
|
801314a: 4673 mov r3, lr
|
|
801314c: e7fa b.n 8013144 <_malloc_r+0x388>
|
|
801314e: 6810 ldr r0, [r2, #0]
|
|
8013150: 3001 adds r0, #1
|
|
8013152: bf1b ittet ne
|
|
8013154: eba4 0b0b subne.w fp, r4, fp
|
|
8013158: eb0b 020e addne.w r2, fp, lr
|
|
801315c: 6014 streq r4, [r2, #0]
|
|
801315e: 601a strne r2, [r3, #0]
|
|
8013160: f014 0b07 ands.w fp, r4, #7
|
|
8013164: bf1a itte ne
|
|
8013166: f1cb 0008 rsbne r0, fp, #8
|
|
801316a: 1824 addne r4, r4, r0
|
|
801316c: 4658 moveq r0, fp
|
|
801316e: 1862 adds r2, r4, r1
|
|
8013170: ea02 010c and.w r1, r2, ip
|
|
8013174: 4480 add r8, r0
|
|
8013176: eba8 0801 sub.w r8, r8, r1
|
|
801317a: ea08 080c and.w r8, r8, ip
|
|
801317e: 4641 mov r1, r8
|
|
8013180: 4628 mov r0, r5
|
|
8013182: 9201 str r2, [sp, #4]
|
|
8013184: f000 fbd0 bl 8013928 <_sbrk_r>
|
|
8013188: 1c43 adds r3, r0, #1
|
|
801318a: 9a01 ldr r2, [sp, #4]
|
|
801318c: 4b28 ldr r3, [pc, #160] ; (8013230 <_malloc_r+0x474>)
|
|
801318e: d107 bne.n 80131a0 <_malloc_r+0x3e4>
|
|
8013190: f1bb 0f00 cmp.w fp, #0
|
|
8013194: d023 beq.n 80131de <_malloc_r+0x422>
|
|
8013196: f1ab 0008 sub.w r0, fp, #8
|
|
801319a: 4410 add r0, r2
|
|
801319c: f04f 0800 mov.w r8, #0
|
|
80131a0: 681a ldr r2, [r3, #0]
|
|
80131a2: 60b4 str r4, [r6, #8]
|
|
80131a4: 1b00 subs r0, r0, r4
|
|
80131a6: 4440 add r0, r8
|
|
80131a8: 4442 add r2, r8
|
|
80131aa: f040 0001 orr.w r0, r0, #1
|
|
80131ae: 45b2 cmp sl, r6
|
|
80131b0: 601a str r2, [r3, #0]
|
|
80131b2: 6060 str r0, [r4, #4]
|
|
80131b4: f43f af28 beq.w 8013008 <_malloc_r+0x24c>
|
|
80131b8: f1b9 0f0f cmp.w r9, #15
|
|
80131bc: d812 bhi.n 80131e4 <_malloc_r+0x428>
|
|
80131be: 2301 movs r3, #1
|
|
80131c0: 6063 str r3, [r4, #4]
|
|
80131c2: 68b3 ldr r3, [r6, #8]
|
|
80131c4: 685b ldr r3, [r3, #4]
|
|
80131c6: f023 0303 bic.w r3, r3, #3
|
|
80131ca: 42bb cmp r3, r7
|
|
80131cc: eba3 0207 sub.w r2, r3, r7
|
|
80131d0: d301 bcc.n 80131d6 <_malloc_r+0x41a>
|
|
80131d2: 2a0f cmp r2, #15
|
|
80131d4: dc22 bgt.n 801321c <_malloc_r+0x460>
|
|
80131d6: 4628 mov r0, r5
|
|
80131d8: f000 f832 bl 8013240 <__malloc_unlock>
|
|
80131dc: e5fa b.n 8012dd4 <_malloc_r+0x18>
|
|
80131de: 4610 mov r0, r2
|
|
80131e0: 46d8 mov r8, fp
|
|
80131e2: e7dd b.n 80131a0 <_malloc_r+0x3e4>
|
|
80131e4: f8da 2004 ldr.w r2, [sl, #4]
|
|
80131e8: f1a9 090c sub.w r9, r9, #12
|
|
80131ec: f029 0907 bic.w r9, r9, #7
|
|
80131f0: f002 0201 and.w r2, r2, #1
|
|
80131f4: ea42 0209 orr.w r2, r2, r9
|
|
80131f8: f8ca 2004 str.w r2, [sl, #4]
|
|
80131fc: 2105 movs r1, #5
|
|
80131fe: eb0a 0209 add.w r2, sl, r9
|
|
8013202: f1b9 0f0f cmp.w r9, #15
|
|
8013206: e9c2 1101 strd r1, r1, [r2, #4]
|
|
801320a: f67f aefd bls.w 8013008 <_malloc_r+0x24c>
|
|
801320e: f10a 0108 add.w r1, sl, #8
|
|
8013212: 4628 mov r0, r5
|
|
8013214: f7ff fc7e bl 8012b14 <_free_r>
|
|
8013218: 4b05 ldr r3, [pc, #20] ; (8013230 <_malloc_r+0x474>)
|
|
801321a: e6f5 b.n 8013008 <_malloc_r+0x24c>
|
|
801321c: 68b4 ldr r4, [r6, #8]
|
|
801321e: f047 0301 orr.w r3, r7, #1
|
|
8013222: 4427 add r7, r4
|
|
8013224: f042 0201 orr.w r2, r2, #1
|
|
8013228: 6063 str r3, [r4, #4]
|
|
801322a: 60b7 str r7, [r6, #8]
|
|
801322c: 607a str r2, [r7, #4]
|
|
801322e: e5f6 b.n 8012e1e <_malloc_r+0x62>
|
|
8013230: 20008d94 .word 0x20008d94
|
|
|
|
08013234 <__malloc_lock>:
|
|
8013234: 4801 ldr r0, [pc, #4] ; (801323c <__malloc_lock+0x8>)
|
|
8013236: f7ff bd53 b.w 8012ce0 <__retarget_lock_acquire_recursive>
|
|
801323a: bf00 nop
|
|
801323c: 20008d8f .word 0x20008d8f
|
|
|
|
08013240 <__malloc_unlock>:
|
|
8013240: 4801 ldr r0, [pc, #4] ; (8013248 <__malloc_unlock+0x8>)
|
|
8013242: f7ff bd4e b.w 8012ce2 <__retarget_lock_release_recursive>
|
|
8013246: bf00 nop
|
|
8013248: 20008d8f .word 0x20008d8f
|
|
|
|
0801324c <_Balloc>:
|
|
801324c: 6cc3 ldr r3, [r0, #76] ; 0x4c
|
|
801324e: b570 push {r4, r5, r6, lr}
|
|
8013250: 4605 mov r5, r0
|
|
8013252: 460c mov r4, r1
|
|
8013254: b17b cbz r3, 8013276 <_Balloc+0x2a>
|
|
8013256: 6ceb ldr r3, [r5, #76] ; 0x4c
|
|
8013258: f853 0024 ldr.w r0, [r3, r4, lsl #2]
|
|
801325c: b9a0 cbnz r0, 8013288 <_Balloc+0x3c>
|
|
801325e: 2101 movs r1, #1
|
|
8013260: fa01 f604 lsl.w r6, r1, r4
|
|
8013264: 1d72 adds r2, r6, #5
|
|
8013266: 0092 lsls r2, r2, #2
|
|
8013268: 4628 mov r0, r5
|
|
801326a: f001 f94b bl 8014504 <_calloc_r>
|
|
801326e: b148 cbz r0, 8013284 <_Balloc+0x38>
|
|
8013270: e9c0 4601 strd r4, r6, [r0, #4]
|
|
8013274: e00b b.n 801328e <_Balloc+0x42>
|
|
8013276: 2221 movs r2, #33 ; 0x21
|
|
8013278: 2104 movs r1, #4
|
|
801327a: f001 f943 bl 8014504 <_calloc_r>
|
|
801327e: 64e8 str r0, [r5, #76] ; 0x4c
|
|
8013280: 2800 cmp r0, #0
|
|
8013282: d1e8 bne.n 8013256 <_Balloc+0xa>
|
|
8013284: 2000 movs r0, #0
|
|
8013286: bd70 pop {r4, r5, r6, pc}
|
|
8013288: 6802 ldr r2, [r0, #0]
|
|
801328a: f843 2024 str.w r2, [r3, r4, lsl #2]
|
|
801328e: 2300 movs r3, #0
|
|
8013290: e9c0 3303 strd r3, r3, [r0, #12]
|
|
8013294: e7f7 b.n 8013286 <_Balloc+0x3a>
|
|
|
|
08013296 <_Bfree>:
|
|
8013296: b131 cbz r1, 80132a6 <_Bfree+0x10>
|
|
8013298: 6cc3 ldr r3, [r0, #76] ; 0x4c
|
|
801329a: 684a ldr r2, [r1, #4]
|
|
801329c: f853 0022 ldr.w r0, [r3, r2, lsl #2]
|
|
80132a0: 6008 str r0, [r1, #0]
|
|
80132a2: f843 1022 str.w r1, [r3, r2, lsl #2]
|
|
80132a6: 4770 bx lr
|
|
|
|
080132a8 <__multadd>:
|
|
80132a8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
|
|
80132ac: 690d ldr r5, [r1, #16]
|
|
80132ae: 4607 mov r7, r0
|
|
80132b0: 460c mov r4, r1
|
|
80132b2: 461e mov r6, r3
|
|
80132b4: f101 0c14 add.w ip, r1, #20
|
|
80132b8: 2000 movs r0, #0
|
|
80132ba: f8dc 3000 ldr.w r3, [ip]
|
|
80132be: b299 uxth r1, r3
|
|
80132c0: fb02 6101 mla r1, r2, r1, r6
|
|
80132c4: 0c1e lsrs r6, r3, #16
|
|
80132c6: 0c0b lsrs r3, r1, #16
|
|
80132c8: fb02 3306 mla r3, r2, r6, r3
|
|
80132cc: b289 uxth r1, r1
|
|
80132ce: 3001 adds r0, #1
|
|
80132d0: eb01 4103 add.w r1, r1, r3, lsl #16
|
|
80132d4: 4285 cmp r5, r0
|
|
80132d6: f84c 1b04 str.w r1, [ip], #4
|
|
80132da: ea4f 4613 mov.w r6, r3, lsr #16
|
|
80132de: dcec bgt.n 80132ba <__multadd+0x12>
|
|
80132e0: b30e cbz r6, 8013326 <__multadd+0x7e>
|
|
80132e2: 68a3 ldr r3, [r4, #8]
|
|
80132e4: 42ab cmp r3, r5
|
|
80132e6: dc19 bgt.n 801331c <__multadd+0x74>
|
|
80132e8: 6861 ldr r1, [r4, #4]
|
|
80132ea: 4638 mov r0, r7
|
|
80132ec: 3101 adds r1, #1
|
|
80132ee: f7ff ffad bl 801324c <_Balloc>
|
|
80132f2: 4680 mov r8, r0
|
|
80132f4: b928 cbnz r0, 8013302 <__multadd+0x5a>
|
|
80132f6: 4602 mov r2, r0
|
|
80132f8: 4b0c ldr r3, [pc, #48] ; (801332c <__multadd+0x84>)
|
|
80132fa: 480d ldr r0, [pc, #52] ; (8013330 <__multadd+0x88>)
|
|
80132fc: 21b5 movs r1, #181 ; 0xb5
|
|
80132fe: f001 f8e3 bl 80144c8 <__assert_func>
|
|
8013302: 6922 ldr r2, [r4, #16]
|
|
8013304: 3202 adds r2, #2
|
|
8013306: f104 010c add.w r1, r4, #12
|
|
801330a: 0092 lsls r2, r2, #2
|
|
801330c: 300c adds r0, #12
|
|
801330e: f7fd f8c3 bl 8010498 <memcpy>
|
|
8013312: 4621 mov r1, r4
|
|
8013314: 4638 mov r0, r7
|
|
8013316: f7ff ffbe bl 8013296 <_Bfree>
|
|
801331a: 4644 mov r4, r8
|
|
801331c: eb04 0385 add.w r3, r4, r5, lsl #2
|
|
8013320: 3501 adds r5, #1
|
|
8013322: 615e str r6, [r3, #20]
|
|
8013324: 6125 str r5, [r4, #16]
|
|
8013326: 4620 mov r0, r4
|
|
8013328: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
|
|
801332c: 080180b9 .word 0x080180b9
|
|
8013330: 08018125 .word 0x08018125
|
|
|
|
08013334 <__hi0bits>:
|
|
8013334: 0c03 lsrs r3, r0, #16
|
|
8013336: 041b lsls r3, r3, #16
|
|
8013338: b9d3 cbnz r3, 8013370 <__hi0bits+0x3c>
|
|
801333a: 0400 lsls r0, r0, #16
|
|
801333c: 2310 movs r3, #16
|
|
801333e: f010 4f7f tst.w r0, #4278190080 ; 0xff000000
|
|
8013342: bf04 itt eq
|
|
8013344: 0200 lsleq r0, r0, #8
|
|
8013346: 3308 addeq r3, #8
|
|
8013348: f010 4f70 tst.w r0, #4026531840 ; 0xf0000000
|
|
801334c: bf04 itt eq
|
|
801334e: 0100 lsleq r0, r0, #4
|
|
8013350: 3304 addeq r3, #4
|
|
8013352: f010 4f40 tst.w r0, #3221225472 ; 0xc0000000
|
|
8013356: bf04 itt eq
|
|
8013358: 0080 lsleq r0, r0, #2
|
|
801335a: 3302 addeq r3, #2
|
|
801335c: 2800 cmp r0, #0
|
|
801335e: db05 blt.n 801336c <__hi0bits+0x38>
|
|
8013360: f010 4f80 tst.w r0, #1073741824 ; 0x40000000
|
|
8013364: f103 0301 add.w r3, r3, #1
|
|
8013368: bf08 it eq
|
|
801336a: 2320 moveq r3, #32
|
|
801336c: 4618 mov r0, r3
|
|
801336e: 4770 bx lr
|
|
8013370: 2300 movs r3, #0
|
|
8013372: e7e4 b.n 801333e <__hi0bits+0xa>
|
|
|
|
08013374 <__lo0bits>:
|
|
8013374: 6803 ldr r3, [r0, #0]
|
|
8013376: f013 0207 ands.w r2, r3, #7
|
|
801337a: 4601 mov r1, r0
|
|
801337c: d00b beq.n 8013396 <__lo0bits+0x22>
|
|
801337e: 07da lsls r2, r3, #31
|
|
8013380: d423 bmi.n 80133ca <__lo0bits+0x56>
|
|
8013382: 0798 lsls r0, r3, #30
|
|
8013384: bf49 itett mi
|
|
8013386: 085b lsrmi r3, r3, #1
|
|
8013388: 089b lsrpl r3, r3, #2
|
|
801338a: 2001 movmi r0, #1
|
|
801338c: 600b strmi r3, [r1, #0]
|
|
801338e: bf5c itt pl
|
|
8013390: 600b strpl r3, [r1, #0]
|
|
8013392: 2002 movpl r0, #2
|
|
8013394: 4770 bx lr
|
|
8013396: b298 uxth r0, r3
|
|
8013398: b9a8 cbnz r0, 80133c6 <__lo0bits+0x52>
|
|
801339a: 0c1b lsrs r3, r3, #16
|
|
801339c: 2010 movs r0, #16
|
|
801339e: b2da uxtb r2, r3
|
|
80133a0: b90a cbnz r2, 80133a6 <__lo0bits+0x32>
|
|
80133a2: 3008 adds r0, #8
|
|
80133a4: 0a1b lsrs r3, r3, #8
|
|
80133a6: 071a lsls r2, r3, #28
|
|
80133a8: bf04 itt eq
|
|
80133aa: 091b lsreq r3, r3, #4
|
|
80133ac: 3004 addeq r0, #4
|
|
80133ae: 079a lsls r2, r3, #30
|
|
80133b0: bf04 itt eq
|
|
80133b2: 089b lsreq r3, r3, #2
|
|
80133b4: 3002 addeq r0, #2
|
|
80133b6: 07da lsls r2, r3, #31
|
|
80133b8: d403 bmi.n 80133c2 <__lo0bits+0x4e>
|
|
80133ba: 085b lsrs r3, r3, #1
|
|
80133bc: f100 0001 add.w r0, r0, #1
|
|
80133c0: d005 beq.n 80133ce <__lo0bits+0x5a>
|
|
80133c2: 600b str r3, [r1, #0]
|
|
80133c4: 4770 bx lr
|
|
80133c6: 4610 mov r0, r2
|
|
80133c8: e7e9 b.n 801339e <__lo0bits+0x2a>
|
|
80133ca: 2000 movs r0, #0
|
|
80133cc: 4770 bx lr
|
|
80133ce: 2020 movs r0, #32
|
|
80133d0: 4770 bx lr
|
|
...
|
|
|
|
080133d4 <__i2b>:
|
|
80133d4: b510 push {r4, lr}
|
|
80133d6: 460c mov r4, r1
|
|
80133d8: 2101 movs r1, #1
|
|
80133da: f7ff ff37 bl 801324c <_Balloc>
|
|
80133de: 4602 mov r2, r0
|
|
80133e0: b928 cbnz r0, 80133ee <__i2b+0x1a>
|
|
80133e2: 4b05 ldr r3, [pc, #20] ; (80133f8 <__i2b+0x24>)
|
|
80133e4: 4805 ldr r0, [pc, #20] ; (80133fc <__i2b+0x28>)
|
|
80133e6: f44f 71a0 mov.w r1, #320 ; 0x140
|
|
80133ea: f001 f86d bl 80144c8 <__assert_func>
|
|
80133ee: 2301 movs r3, #1
|
|
80133f0: 6144 str r4, [r0, #20]
|
|
80133f2: 6103 str r3, [r0, #16]
|
|
80133f4: bd10 pop {r4, pc}
|
|
80133f6: bf00 nop
|
|
80133f8: 080180b9 .word 0x080180b9
|
|
80133fc: 08018125 .word 0x08018125
|
|
|
|
08013400 <__multiply>:
|
|
8013400: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
|
|
8013404: 4691 mov r9, r2
|
|
8013406: 690a ldr r2, [r1, #16]
|
|
8013408: f8d9 3010 ldr.w r3, [r9, #16]
|
|
801340c: 429a cmp r2, r3
|
|
801340e: bfb8 it lt
|
|
8013410: 460b movlt r3, r1
|
|
8013412: 460c mov r4, r1
|
|
8013414: bfbc itt lt
|
|
8013416: 464c movlt r4, r9
|
|
8013418: 4699 movlt r9, r3
|
|
801341a: 6927 ldr r7, [r4, #16]
|
|
801341c: f8d9 a010 ldr.w sl, [r9, #16]
|
|
8013420: 68a3 ldr r3, [r4, #8]
|
|
8013422: 6861 ldr r1, [r4, #4]
|
|
8013424: eb07 060a add.w r6, r7, sl
|
|
8013428: 42b3 cmp r3, r6
|
|
801342a: b085 sub sp, #20
|
|
801342c: bfb8 it lt
|
|
801342e: 3101 addlt r1, #1
|
|
8013430: f7ff ff0c bl 801324c <_Balloc>
|
|
8013434: b930 cbnz r0, 8013444 <__multiply+0x44>
|
|
8013436: 4602 mov r2, r0
|
|
8013438: 4b44 ldr r3, [pc, #272] ; (801354c <__multiply+0x14c>)
|
|
801343a: 4845 ldr r0, [pc, #276] ; (8013550 <__multiply+0x150>)
|
|
801343c: f240 115d movw r1, #349 ; 0x15d
|
|
8013440: f001 f842 bl 80144c8 <__assert_func>
|
|
8013444: f100 0514 add.w r5, r0, #20
|
|
8013448: eb05 0886 add.w r8, r5, r6, lsl #2
|
|
801344c: 462b mov r3, r5
|
|
801344e: 2200 movs r2, #0
|
|
8013450: 4543 cmp r3, r8
|
|
8013452: d321 bcc.n 8013498 <__multiply+0x98>
|
|
8013454: f104 0314 add.w r3, r4, #20
|
|
8013458: eb03 0787 add.w r7, r3, r7, lsl #2
|
|
801345c: f109 0314 add.w r3, r9, #20
|
|
8013460: eb03 028a add.w r2, r3, sl, lsl #2
|
|
8013464: 9202 str r2, [sp, #8]
|
|
8013466: 1b3a subs r2, r7, r4
|
|
8013468: 3a15 subs r2, #21
|
|
801346a: f022 0203 bic.w r2, r2, #3
|
|
801346e: 3204 adds r2, #4
|
|
8013470: f104 0115 add.w r1, r4, #21
|
|
8013474: 428f cmp r7, r1
|
|
8013476: bf38 it cc
|
|
8013478: 2204 movcc r2, #4
|
|
801347a: 9201 str r2, [sp, #4]
|
|
801347c: 9a02 ldr r2, [sp, #8]
|
|
801347e: 9303 str r3, [sp, #12]
|
|
8013480: 429a cmp r2, r3
|
|
8013482: d80c bhi.n 801349e <__multiply+0x9e>
|
|
8013484: 2e00 cmp r6, #0
|
|
8013486: dd03 ble.n 8013490 <__multiply+0x90>
|
|
8013488: f858 3d04 ldr.w r3, [r8, #-4]!
|
|
801348c: 2b00 cmp r3, #0
|
|
801348e: d05a beq.n 8013546 <__multiply+0x146>
|
|
8013490: 6106 str r6, [r0, #16]
|
|
8013492: b005 add sp, #20
|
|
8013494: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
|
|
8013498: f843 2b04 str.w r2, [r3], #4
|
|
801349c: e7d8 b.n 8013450 <__multiply+0x50>
|
|
801349e: f8b3 a000 ldrh.w sl, [r3]
|
|
80134a2: f1ba 0f00 cmp.w sl, #0
|
|
80134a6: d024 beq.n 80134f2 <__multiply+0xf2>
|
|
80134a8: f104 0e14 add.w lr, r4, #20
|
|
80134ac: 46a9 mov r9, r5
|
|
80134ae: f04f 0c00 mov.w ip, #0
|
|
80134b2: f85e 2b04 ldr.w r2, [lr], #4
|
|
80134b6: f8d9 1000 ldr.w r1, [r9]
|
|
80134ba: fa1f fb82 uxth.w fp, r2
|
|
80134be: b289 uxth r1, r1
|
|
80134c0: fb0a 110b mla r1, sl, fp, r1
|
|
80134c4: ea4f 4b12 mov.w fp, r2, lsr #16
|
|
80134c8: f8d9 2000 ldr.w r2, [r9]
|
|
80134cc: 4461 add r1, ip
|
|
80134ce: ea4f 4c12 mov.w ip, r2, lsr #16
|
|
80134d2: fb0a c20b mla r2, sl, fp, ip
|
|
80134d6: eb02 4211 add.w r2, r2, r1, lsr #16
|
|
80134da: b289 uxth r1, r1
|
|
80134dc: ea41 4102 orr.w r1, r1, r2, lsl #16
|
|
80134e0: 4577 cmp r7, lr
|
|
80134e2: f849 1b04 str.w r1, [r9], #4
|
|
80134e6: ea4f 4c12 mov.w ip, r2, lsr #16
|
|
80134ea: d8e2 bhi.n 80134b2 <__multiply+0xb2>
|
|
80134ec: 9a01 ldr r2, [sp, #4]
|
|
80134ee: f845 c002 str.w ip, [r5, r2]
|
|
80134f2: 9a03 ldr r2, [sp, #12]
|
|
80134f4: f8b2 9002 ldrh.w r9, [r2, #2]
|
|
80134f8: 3304 adds r3, #4
|
|
80134fa: f1b9 0f00 cmp.w r9, #0
|
|
80134fe: d020 beq.n 8013542 <__multiply+0x142>
|
|
8013500: 6829 ldr r1, [r5, #0]
|
|
8013502: f104 0c14 add.w ip, r4, #20
|
|
8013506: 46ae mov lr, r5
|
|
8013508: f04f 0a00 mov.w sl, #0
|
|
801350c: f8bc b000 ldrh.w fp, [ip]
|
|
8013510: f8be 2002 ldrh.w r2, [lr, #2]
|
|
8013514: fb09 220b mla r2, r9, fp, r2
|
|
8013518: 4492 add sl, r2
|
|
801351a: b289 uxth r1, r1
|
|
801351c: ea41 410a orr.w r1, r1, sl, lsl #16
|
|
8013520: f84e 1b04 str.w r1, [lr], #4
|
|
8013524: f85c 2b04 ldr.w r2, [ip], #4
|
|
8013528: f8be 1000 ldrh.w r1, [lr]
|
|
801352c: 0c12 lsrs r2, r2, #16
|
|
801352e: fb09 1102 mla r1, r9, r2, r1
|
|
8013532: eb01 411a add.w r1, r1, sl, lsr #16
|
|
8013536: 4567 cmp r7, ip
|
|
8013538: ea4f 4a11 mov.w sl, r1, lsr #16
|
|
801353c: d8e6 bhi.n 801350c <__multiply+0x10c>
|
|
801353e: 9a01 ldr r2, [sp, #4]
|
|
8013540: 50a9 str r1, [r5, r2]
|
|
8013542: 3504 adds r5, #4
|
|
8013544: e79a b.n 801347c <__multiply+0x7c>
|
|
8013546: 3e01 subs r6, #1
|
|
8013548: e79c b.n 8013484 <__multiply+0x84>
|
|
801354a: bf00 nop
|
|
801354c: 080180b9 .word 0x080180b9
|
|
8013550: 08018125 .word 0x08018125
|
|
|
|
08013554 <__pow5mult>:
|
|
8013554: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
|
|
8013558: 4615 mov r5, r2
|
|
801355a: f012 0203 ands.w r2, r2, #3
|
|
801355e: 4606 mov r6, r0
|
|
8013560: 460f mov r7, r1
|
|
8013562: d007 beq.n 8013574 <__pow5mult+0x20>
|
|
8013564: 4c1a ldr r4, [pc, #104] ; (80135d0 <__pow5mult+0x7c>)
|
|
8013566: 3a01 subs r2, #1
|
|
8013568: 2300 movs r3, #0
|
|
801356a: f854 2022 ldr.w r2, [r4, r2, lsl #2]
|
|
801356e: f7ff fe9b bl 80132a8 <__multadd>
|
|
8013572: 4607 mov r7, r0
|
|
8013574: 10ad asrs r5, r5, #2
|
|
8013576: d027 beq.n 80135c8 <__pow5mult+0x74>
|
|
8013578: 6cb4 ldr r4, [r6, #72] ; 0x48
|
|
801357a: b944 cbnz r4, 801358e <__pow5mult+0x3a>
|
|
801357c: f240 2171 movw r1, #625 ; 0x271
|
|
8013580: 4630 mov r0, r6
|
|
8013582: f7ff ff27 bl 80133d4 <__i2b>
|
|
8013586: 2300 movs r3, #0
|
|
8013588: 64b0 str r0, [r6, #72] ; 0x48
|
|
801358a: 4604 mov r4, r0
|
|
801358c: 6003 str r3, [r0, #0]
|
|
801358e: f04f 0900 mov.w r9, #0
|
|
8013592: 07eb lsls r3, r5, #31
|
|
8013594: d50a bpl.n 80135ac <__pow5mult+0x58>
|
|
8013596: 4639 mov r1, r7
|
|
8013598: 4622 mov r2, r4
|
|
801359a: 4630 mov r0, r6
|
|
801359c: f7ff ff30 bl 8013400 <__multiply>
|
|
80135a0: 4639 mov r1, r7
|
|
80135a2: 4680 mov r8, r0
|
|
80135a4: 4630 mov r0, r6
|
|
80135a6: f7ff fe76 bl 8013296 <_Bfree>
|
|
80135aa: 4647 mov r7, r8
|
|
80135ac: 106d asrs r5, r5, #1
|
|
80135ae: d00b beq.n 80135c8 <__pow5mult+0x74>
|
|
80135b0: 6820 ldr r0, [r4, #0]
|
|
80135b2: b938 cbnz r0, 80135c4 <__pow5mult+0x70>
|
|
80135b4: 4622 mov r2, r4
|
|
80135b6: 4621 mov r1, r4
|
|
80135b8: 4630 mov r0, r6
|
|
80135ba: f7ff ff21 bl 8013400 <__multiply>
|
|
80135be: 6020 str r0, [r4, #0]
|
|
80135c0: f8c0 9000 str.w r9, [r0]
|
|
80135c4: 4604 mov r4, r0
|
|
80135c6: e7e4 b.n 8013592 <__pow5mult+0x3e>
|
|
80135c8: 4638 mov r0, r7
|
|
80135ca: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
|
|
80135ce: bf00 nop
|
|
80135d0: 08018278 .word 0x08018278
|
|
|
|
080135d4 <__lshift>:
|
|
80135d4: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
|
|
80135d8: 460c mov r4, r1
|
|
80135da: 6849 ldr r1, [r1, #4]
|
|
80135dc: 6923 ldr r3, [r4, #16]
|
|
80135de: eb03 1862 add.w r8, r3, r2, asr #5
|
|
80135e2: 68a3 ldr r3, [r4, #8]
|
|
80135e4: 4607 mov r7, r0
|
|
80135e6: 4691 mov r9, r2
|
|
80135e8: ea4f 1a62 mov.w sl, r2, asr #5
|
|
80135ec: f108 0601 add.w r6, r8, #1
|
|
80135f0: 42b3 cmp r3, r6
|
|
80135f2: db0b blt.n 801360c <__lshift+0x38>
|
|
80135f4: 4638 mov r0, r7
|
|
80135f6: f7ff fe29 bl 801324c <_Balloc>
|
|
80135fa: 4605 mov r5, r0
|
|
80135fc: b948 cbnz r0, 8013612 <__lshift+0x3e>
|
|
80135fe: 4602 mov r2, r0
|
|
8013600: 4b2a ldr r3, [pc, #168] ; (80136ac <__lshift+0xd8>)
|
|
8013602: 482b ldr r0, [pc, #172] ; (80136b0 <__lshift+0xdc>)
|
|
8013604: f240 11d9 movw r1, #473 ; 0x1d9
|
|
8013608: f000 ff5e bl 80144c8 <__assert_func>
|
|
801360c: 3101 adds r1, #1
|
|
801360e: 005b lsls r3, r3, #1
|
|
8013610: e7ee b.n 80135f0 <__lshift+0x1c>
|
|
8013612: 2300 movs r3, #0
|
|
8013614: f100 0114 add.w r1, r0, #20
|
|
8013618: f100 0210 add.w r2, r0, #16
|
|
801361c: 4618 mov r0, r3
|
|
801361e: 4553 cmp r3, sl
|
|
8013620: db37 blt.n 8013692 <__lshift+0xbe>
|
|
8013622: 6920 ldr r0, [r4, #16]
|
|
8013624: ea2a 7aea bic.w sl, sl, sl, asr #31
|
|
8013628: f104 0314 add.w r3, r4, #20
|
|
801362c: f019 091f ands.w r9, r9, #31
|
|
8013630: eb01 018a add.w r1, r1, sl, lsl #2
|
|
8013634: eb03 0080 add.w r0, r3, r0, lsl #2
|
|
8013638: d02f beq.n 801369a <__lshift+0xc6>
|
|
801363a: f1c9 0e20 rsb lr, r9, #32
|
|
801363e: 468a mov sl, r1
|
|
8013640: f04f 0c00 mov.w ip, #0
|
|
8013644: 681a ldr r2, [r3, #0]
|
|
8013646: fa02 f209 lsl.w r2, r2, r9
|
|
801364a: ea42 020c orr.w r2, r2, ip
|
|
801364e: f84a 2b04 str.w r2, [sl], #4
|
|
8013652: f853 2b04 ldr.w r2, [r3], #4
|
|
8013656: 4298 cmp r0, r3
|
|
8013658: fa22 fc0e lsr.w ip, r2, lr
|
|
801365c: d8f2 bhi.n 8013644 <__lshift+0x70>
|
|
801365e: 1b03 subs r3, r0, r4
|
|
8013660: 3b15 subs r3, #21
|
|
8013662: f023 0303 bic.w r3, r3, #3
|
|
8013666: 3304 adds r3, #4
|
|
8013668: f104 0215 add.w r2, r4, #21
|
|
801366c: 4290 cmp r0, r2
|
|
801366e: bf38 it cc
|
|
8013670: 2304 movcc r3, #4
|
|
8013672: f841 c003 str.w ip, [r1, r3]
|
|
8013676: f1bc 0f00 cmp.w ip, #0
|
|
801367a: d001 beq.n 8013680 <__lshift+0xac>
|
|
801367c: f108 0602 add.w r6, r8, #2
|
|
8013680: 3e01 subs r6, #1
|
|
8013682: 4638 mov r0, r7
|
|
8013684: 612e str r6, [r5, #16]
|
|
8013686: 4621 mov r1, r4
|
|
8013688: f7ff fe05 bl 8013296 <_Bfree>
|
|
801368c: 4628 mov r0, r5
|
|
801368e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
|
|
8013692: f842 0f04 str.w r0, [r2, #4]!
|
|
8013696: 3301 adds r3, #1
|
|
8013698: e7c1 b.n 801361e <__lshift+0x4a>
|
|
801369a: 3904 subs r1, #4
|
|
801369c: f853 2b04 ldr.w r2, [r3], #4
|
|
80136a0: f841 2f04 str.w r2, [r1, #4]!
|
|
80136a4: 4298 cmp r0, r3
|
|
80136a6: d8f9 bhi.n 801369c <__lshift+0xc8>
|
|
80136a8: e7ea b.n 8013680 <__lshift+0xac>
|
|
80136aa: bf00 nop
|
|
80136ac: 080180b9 .word 0x080180b9
|
|
80136b0: 08018125 .word 0x08018125
|
|
|
|
080136b4 <__mcmp>:
|
|
80136b4: b530 push {r4, r5, lr}
|
|
80136b6: 6902 ldr r2, [r0, #16]
|
|
80136b8: 690c ldr r4, [r1, #16]
|
|
80136ba: 1b12 subs r2, r2, r4
|
|
80136bc: d10e bne.n 80136dc <__mcmp+0x28>
|
|
80136be: f100 0314 add.w r3, r0, #20
|
|
80136c2: 3114 adds r1, #20
|
|
80136c4: eb03 0084 add.w r0, r3, r4, lsl #2
|
|
80136c8: eb01 0184 add.w r1, r1, r4, lsl #2
|
|
80136cc: f850 5d04 ldr.w r5, [r0, #-4]!
|
|
80136d0: f851 4d04 ldr.w r4, [r1, #-4]!
|
|
80136d4: 42a5 cmp r5, r4
|
|
80136d6: d003 beq.n 80136e0 <__mcmp+0x2c>
|
|
80136d8: d305 bcc.n 80136e6 <__mcmp+0x32>
|
|
80136da: 2201 movs r2, #1
|
|
80136dc: 4610 mov r0, r2
|
|
80136de: bd30 pop {r4, r5, pc}
|
|
80136e0: 4283 cmp r3, r0
|
|
80136e2: d3f3 bcc.n 80136cc <__mcmp+0x18>
|
|
80136e4: e7fa b.n 80136dc <__mcmp+0x28>
|
|
80136e6: f04f 32ff mov.w r2, #4294967295
|
|
80136ea: e7f7 b.n 80136dc <__mcmp+0x28>
|
|
|
|
080136ec <__mdiff>:
|
|
80136ec: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
|
|
80136f0: 460c mov r4, r1
|
|
80136f2: 4606 mov r6, r0
|
|
80136f4: 4611 mov r1, r2
|
|
80136f6: 4620 mov r0, r4
|
|
80136f8: 4690 mov r8, r2
|
|
80136fa: f7ff ffdb bl 80136b4 <__mcmp>
|
|
80136fe: 1e05 subs r5, r0, #0
|
|
8013700: d110 bne.n 8013724 <__mdiff+0x38>
|
|
8013702: 4629 mov r1, r5
|
|
8013704: 4630 mov r0, r6
|
|
8013706: f7ff fda1 bl 801324c <_Balloc>
|
|
801370a: b930 cbnz r0, 801371a <__mdiff+0x2e>
|
|
801370c: 4b3a ldr r3, [pc, #232] ; (80137f8 <__mdiff+0x10c>)
|
|
801370e: 4602 mov r2, r0
|
|
8013710: f240 2132 movw r1, #562 ; 0x232
|
|
8013714: 4839 ldr r0, [pc, #228] ; (80137fc <__mdiff+0x110>)
|
|
8013716: f000 fed7 bl 80144c8 <__assert_func>
|
|
801371a: 2301 movs r3, #1
|
|
801371c: e9c0 3504 strd r3, r5, [r0, #16]
|
|
8013720: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
|
|
8013724: bfa4 itt ge
|
|
8013726: 4643 movge r3, r8
|
|
8013728: 46a0 movge r8, r4
|
|
801372a: 4630 mov r0, r6
|
|
801372c: f8d8 1004 ldr.w r1, [r8, #4]
|
|
8013730: bfa6 itte ge
|
|
8013732: 461c movge r4, r3
|
|
8013734: 2500 movge r5, #0
|
|
8013736: 2501 movlt r5, #1
|
|
8013738: f7ff fd88 bl 801324c <_Balloc>
|
|
801373c: b920 cbnz r0, 8013748 <__mdiff+0x5c>
|
|
801373e: 4b2e ldr r3, [pc, #184] ; (80137f8 <__mdiff+0x10c>)
|
|
8013740: 4602 mov r2, r0
|
|
8013742: f44f 7110 mov.w r1, #576 ; 0x240
|
|
8013746: e7e5 b.n 8013714 <__mdiff+0x28>
|
|
8013748: f8d8 7010 ldr.w r7, [r8, #16]
|
|
801374c: 6926 ldr r6, [r4, #16]
|
|
801374e: 60c5 str r5, [r0, #12]
|
|
8013750: f104 0914 add.w r9, r4, #20
|
|
8013754: f108 0514 add.w r5, r8, #20
|
|
8013758: f100 0e14 add.w lr, r0, #20
|
|
801375c: eb05 0c87 add.w ip, r5, r7, lsl #2
|
|
8013760: eb09 0686 add.w r6, r9, r6, lsl #2
|
|
8013764: f108 0210 add.w r2, r8, #16
|
|
8013768: 46f2 mov sl, lr
|
|
801376a: 2100 movs r1, #0
|
|
801376c: f859 3b04 ldr.w r3, [r9], #4
|
|
8013770: f852 bf04 ldr.w fp, [r2, #4]!
|
|
8013774: fa1f f883 uxth.w r8, r3
|
|
8013778: fa11 f18b uxtah r1, r1, fp
|
|
801377c: 0c1b lsrs r3, r3, #16
|
|
801377e: eba1 0808 sub.w r8, r1, r8
|
|
8013782: ebc3 431b rsb r3, r3, fp, lsr #16
|
|
8013786: eb03 4328 add.w r3, r3, r8, asr #16
|
|
801378a: fa1f f888 uxth.w r8, r8
|
|
801378e: 1419 asrs r1, r3, #16
|
|
8013790: 454e cmp r6, r9
|
|
8013792: ea48 4303 orr.w r3, r8, r3, lsl #16
|
|
8013796: f84a 3b04 str.w r3, [sl], #4
|
|
801379a: d8e7 bhi.n 801376c <__mdiff+0x80>
|
|
801379c: 1b33 subs r3, r6, r4
|
|
801379e: 3b15 subs r3, #21
|
|
80137a0: f023 0303 bic.w r3, r3, #3
|
|
80137a4: 3304 adds r3, #4
|
|
80137a6: 3415 adds r4, #21
|
|
80137a8: 42a6 cmp r6, r4
|
|
80137aa: bf38 it cc
|
|
80137ac: 2304 movcc r3, #4
|
|
80137ae: 441d add r5, r3
|
|
80137b0: 4473 add r3, lr
|
|
80137b2: 469e mov lr, r3
|
|
80137b4: 462e mov r6, r5
|
|
80137b6: 4566 cmp r6, ip
|
|
80137b8: d30e bcc.n 80137d8 <__mdiff+0xec>
|
|
80137ba: f10c 0203 add.w r2, ip, #3
|
|
80137be: 1b52 subs r2, r2, r5
|
|
80137c0: f022 0203 bic.w r2, r2, #3
|
|
80137c4: 3d03 subs r5, #3
|
|
80137c6: 45ac cmp ip, r5
|
|
80137c8: bf38 it cc
|
|
80137ca: 2200 movcc r2, #0
|
|
80137cc: 441a add r2, r3
|
|
80137ce: f852 3d04 ldr.w r3, [r2, #-4]!
|
|
80137d2: b17b cbz r3, 80137f4 <__mdiff+0x108>
|
|
80137d4: 6107 str r7, [r0, #16]
|
|
80137d6: e7a3 b.n 8013720 <__mdiff+0x34>
|
|
80137d8: f856 8b04 ldr.w r8, [r6], #4
|
|
80137dc: fa11 f288 uxtah r2, r1, r8
|
|
80137e0: 1414 asrs r4, r2, #16
|
|
80137e2: eb04 4418 add.w r4, r4, r8, lsr #16
|
|
80137e6: b292 uxth r2, r2
|
|
80137e8: ea42 4204 orr.w r2, r2, r4, lsl #16
|
|
80137ec: f84e 2b04 str.w r2, [lr], #4
|
|
80137f0: 1421 asrs r1, r4, #16
|
|
80137f2: e7e0 b.n 80137b6 <__mdiff+0xca>
|
|
80137f4: 3f01 subs r7, #1
|
|
80137f6: e7ea b.n 80137ce <__mdiff+0xe2>
|
|
80137f8: 080180b9 .word 0x080180b9
|
|
80137fc: 08018125 .word 0x08018125
|
|
|
|
08013800 <__d2b>:
|
|
8013800: e92d 43f7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, lr}
|
|
8013804: 4689 mov r9, r1
|
|
8013806: 2101 movs r1, #1
|
|
8013808: ec57 6b10 vmov r6, r7, d0
|
|
801380c: 4690 mov r8, r2
|
|
801380e: f7ff fd1d bl 801324c <_Balloc>
|
|
8013812: 4604 mov r4, r0
|
|
8013814: b930 cbnz r0, 8013824 <__d2b+0x24>
|
|
8013816: 4602 mov r2, r0
|
|
8013818: 4b25 ldr r3, [pc, #148] ; (80138b0 <__d2b+0xb0>)
|
|
801381a: 4826 ldr r0, [pc, #152] ; (80138b4 <__d2b+0xb4>)
|
|
801381c: f240 310a movw r1, #778 ; 0x30a
|
|
8013820: f000 fe52 bl 80144c8 <__assert_func>
|
|
8013824: f3c7 550a ubfx r5, r7, #20, #11
|
|
8013828: f3c7 0313 ubfx r3, r7, #0, #20
|
|
801382c: bb35 cbnz r5, 801387c <__d2b+0x7c>
|
|
801382e: 2e00 cmp r6, #0
|
|
8013830: 9301 str r3, [sp, #4]
|
|
8013832: d028 beq.n 8013886 <__d2b+0x86>
|
|
8013834: 4668 mov r0, sp
|
|
8013836: 9600 str r6, [sp, #0]
|
|
8013838: f7ff fd9c bl 8013374 <__lo0bits>
|
|
801383c: 9900 ldr r1, [sp, #0]
|
|
801383e: b300 cbz r0, 8013882 <__d2b+0x82>
|
|
8013840: 9a01 ldr r2, [sp, #4]
|
|
8013842: f1c0 0320 rsb r3, r0, #32
|
|
8013846: fa02 f303 lsl.w r3, r2, r3
|
|
801384a: 430b orrs r3, r1
|
|
801384c: 40c2 lsrs r2, r0
|
|
801384e: 6163 str r3, [r4, #20]
|
|
8013850: 9201 str r2, [sp, #4]
|
|
8013852: 9b01 ldr r3, [sp, #4]
|
|
8013854: 61a3 str r3, [r4, #24]
|
|
8013856: 2b00 cmp r3, #0
|
|
8013858: bf14 ite ne
|
|
801385a: 2202 movne r2, #2
|
|
801385c: 2201 moveq r2, #1
|
|
801385e: 6122 str r2, [r4, #16]
|
|
8013860: b1d5 cbz r5, 8013898 <__d2b+0x98>
|
|
8013862: f2a5 4533 subw r5, r5, #1075 ; 0x433
|
|
8013866: 4405 add r5, r0
|
|
8013868: f8c9 5000 str.w r5, [r9]
|
|
801386c: f1c0 0035 rsb r0, r0, #53 ; 0x35
|
|
8013870: f8c8 0000 str.w r0, [r8]
|
|
8013874: 4620 mov r0, r4
|
|
8013876: b003 add sp, #12
|
|
8013878: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
|
|
801387c: f443 1380 orr.w r3, r3, #1048576 ; 0x100000
|
|
8013880: e7d5 b.n 801382e <__d2b+0x2e>
|
|
8013882: 6161 str r1, [r4, #20]
|
|
8013884: e7e5 b.n 8013852 <__d2b+0x52>
|
|
8013886: a801 add r0, sp, #4
|
|
8013888: f7ff fd74 bl 8013374 <__lo0bits>
|
|
801388c: 9b01 ldr r3, [sp, #4]
|
|
801388e: 6163 str r3, [r4, #20]
|
|
8013890: 2201 movs r2, #1
|
|
8013892: 6122 str r2, [r4, #16]
|
|
8013894: 3020 adds r0, #32
|
|
8013896: e7e3 b.n 8013860 <__d2b+0x60>
|
|
8013898: eb04 0382 add.w r3, r4, r2, lsl #2
|
|
801389c: f2a0 4032 subw r0, r0, #1074 ; 0x432
|
|
80138a0: f8c9 0000 str.w r0, [r9]
|
|
80138a4: 6918 ldr r0, [r3, #16]
|
|
80138a6: f7ff fd45 bl 8013334 <__hi0bits>
|
|
80138aa: ebc0 1042 rsb r0, r0, r2, lsl #5
|
|
80138ae: e7df b.n 8013870 <__d2b+0x70>
|
|
80138b0: 080180b9 .word 0x080180b9
|
|
80138b4: 08018125 .word 0x08018125
|
|
|
|
080138b8 <frexp>:
|
|
80138b8: b570 push {r4, r5, r6, lr}
|
|
80138ba: 2100 movs r1, #0
|
|
80138bc: ec55 4b10 vmov r4, r5, d0
|
|
80138c0: 6001 str r1, [r0, #0]
|
|
80138c2: 4916 ldr r1, [pc, #88] ; (801391c <frexp+0x64>)
|
|
80138c4: f025 4200 bic.w r2, r5, #2147483648 ; 0x80000000
|
|
80138c8: 428a cmp r2, r1
|
|
80138ca: 4606 mov r6, r0
|
|
80138cc: 462b mov r3, r5
|
|
80138ce: dc22 bgt.n 8013916 <frexp+0x5e>
|
|
80138d0: ee10 1a10 vmov r1, s0
|
|
80138d4: 4311 orrs r1, r2
|
|
80138d6: d01e beq.n 8013916 <frexp+0x5e>
|
|
80138d8: 4911 ldr r1, [pc, #68] ; (8013920 <frexp+0x68>)
|
|
80138da: 4029 ands r1, r5
|
|
80138dc: b969 cbnz r1, 80138fa <frexp+0x42>
|
|
80138de: 4b11 ldr r3, [pc, #68] ; (8013924 <frexp+0x6c>)
|
|
80138e0: 2200 movs r2, #0
|
|
80138e2: ee10 0a10 vmov r0, s0
|
|
80138e6: 4629 mov r1, r5
|
|
80138e8: f7ec fe96 bl 8000618 <__aeabi_dmul>
|
|
80138ec: 460b mov r3, r1
|
|
80138ee: f021 4200 bic.w r2, r1, #2147483648 ; 0x80000000
|
|
80138f2: f06f 0135 mvn.w r1, #53 ; 0x35
|
|
80138f6: 4604 mov r4, r0
|
|
80138f8: 6031 str r1, [r6, #0]
|
|
80138fa: 6831 ldr r1, [r6, #0]
|
|
80138fc: 1512 asrs r2, r2, #20
|
|
80138fe: f023 43ff bic.w r3, r3, #2139095040 ; 0x7f800000
|
|
8013902: f2a2 32fe subw r2, r2, #1022 ; 0x3fe
|
|
8013906: f423 03e0 bic.w r3, r3, #7340032 ; 0x700000
|
|
801390a: 440a add r2, r1
|
|
801390c: f043 557f orr.w r5, r3, #1069547520 ; 0x3fc00000
|
|
8013910: 6032 str r2, [r6, #0]
|
|
8013912: f445 1500 orr.w r5, r5, #2097152 ; 0x200000
|
|
8013916: ec45 4b10 vmov d0, r4, r5
|
|
801391a: bd70 pop {r4, r5, r6, pc}
|
|
801391c: 7fefffff .word 0x7fefffff
|
|
8013920: 7ff00000 .word 0x7ff00000
|
|
8013924: 43500000 .word 0x43500000
|
|
|
|
08013928 <_sbrk_r>:
|
|
8013928: b538 push {r3, r4, r5, lr}
|
|
801392a: 4d06 ldr r5, [pc, #24] ; (8013944 <_sbrk_r+0x1c>)
|
|
801392c: 2300 movs r3, #0
|
|
801392e: 4604 mov r4, r0
|
|
8013930: 4608 mov r0, r1
|
|
8013932: 602b str r3, [r5, #0]
|
|
8013934: f001 fb40 bl 8014fb8 <_sbrk>
|
|
8013938: 1c43 adds r3, r0, #1
|
|
801393a: d102 bne.n 8013942 <_sbrk_r+0x1a>
|
|
801393c: 682b ldr r3, [r5, #0]
|
|
801393e: b103 cbz r3, 8013942 <_sbrk_r+0x1a>
|
|
8013940: 6023 str r3, [r4, #0]
|
|
8013942: bd38 pop {r3, r4, r5, pc}
|
|
8013944: 20008dc8 .word 0x20008dc8
|
|
|
|
08013948 <__sread>:
|
|
8013948: b510 push {r4, lr}
|
|
801394a: 460c mov r4, r1
|
|
801394c: f9b1 100e ldrsh.w r1, [r1, #14]
|
|
8013950: f001 f88a bl 8014a68 <_read_r>
|
|
8013954: 2800 cmp r0, #0
|
|
8013956: bfab itete ge
|
|
8013958: 6d23 ldrge r3, [r4, #80] ; 0x50
|
|
801395a: 89a3 ldrhlt r3, [r4, #12]
|
|
801395c: 181b addge r3, r3, r0
|
|
801395e: f423 5380 biclt.w r3, r3, #4096 ; 0x1000
|
|
8013962: bfac ite ge
|
|
8013964: 6523 strge r3, [r4, #80] ; 0x50
|
|
8013966: 81a3 strhlt r3, [r4, #12]
|
|
8013968: bd10 pop {r4, pc}
|
|
|
|
0801396a <__swrite>:
|
|
801396a: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
|
|
801396e: 461f mov r7, r3
|
|
8013970: 898b ldrh r3, [r1, #12]
|
|
8013972: 05db lsls r3, r3, #23
|
|
8013974: 4605 mov r5, r0
|
|
8013976: 460c mov r4, r1
|
|
8013978: 4616 mov r6, r2
|
|
801397a: d505 bpl.n 8013988 <__swrite+0x1e>
|
|
801397c: f9b1 100e ldrsh.w r1, [r1, #14]
|
|
8013980: 2302 movs r3, #2
|
|
8013982: 2200 movs r2, #0
|
|
8013984: f001 f84c bl 8014a20 <_lseek_r>
|
|
8013988: 89a3 ldrh r3, [r4, #12]
|
|
801398a: f9b4 100e ldrsh.w r1, [r4, #14]
|
|
801398e: f423 5380 bic.w r3, r3, #4096 ; 0x1000
|
|
8013992: 81a3 strh r3, [r4, #12]
|
|
8013994: 4632 mov r2, r6
|
|
8013996: 463b mov r3, r7
|
|
8013998: 4628 mov r0, r5
|
|
801399a: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr}
|
|
801399e: f000 bd3f b.w 8014420 <_write_r>
|
|
|
|
080139a2 <__sseek>:
|
|
80139a2: b510 push {r4, lr}
|
|
80139a4: 460c mov r4, r1
|
|
80139a6: f9b1 100e ldrsh.w r1, [r1, #14]
|
|
80139aa: f001 f839 bl 8014a20 <_lseek_r>
|
|
80139ae: 1c43 adds r3, r0, #1
|
|
80139b0: 89a3 ldrh r3, [r4, #12]
|
|
80139b2: bf15 itete ne
|
|
80139b4: 6520 strne r0, [r4, #80] ; 0x50
|
|
80139b6: f423 5380 biceq.w r3, r3, #4096 ; 0x1000
|
|
80139ba: f443 5380 orrne.w r3, r3, #4096 ; 0x1000
|
|
80139be: 81a3 strheq r3, [r4, #12]
|
|
80139c0: bf18 it ne
|
|
80139c2: 81a3 strhne r3, [r4, #12]
|
|
80139c4: bd10 pop {r4, pc}
|
|
|
|
080139c6 <__sclose>:
|
|
80139c6: f9b1 100e ldrsh.w r1, [r1, #14]
|
|
80139ca: f000 bdd1 b.w 8014570 <_close_r>
|
|
|
|
080139ce <strncpy>:
|
|
80139ce: b510 push {r4, lr}
|
|
80139d0: 3901 subs r1, #1
|
|
80139d2: 4603 mov r3, r0
|
|
80139d4: b132 cbz r2, 80139e4 <strncpy+0x16>
|
|
80139d6: f811 4f01 ldrb.w r4, [r1, #1]!
|
|
80139da: f803 4b01 strb.w r4, [r3], #1
|
|
80139de: 3a01 subs r2, #1
|
|
80139e0: 2c00 cmp r4, #0
|
|
80139e2: d1f7 bne.n 80139d4 <strncpy+0x6>
|
|
80139e4: 441a add r2, r3
|
|
80139e6: 2100 movs r1, #0
|
|
80139e8: 4293 cmp r3, r2
|
|
80139ea: d100 bne.n 80139ee <strncpy+0x20>
|
|
80139ec: bd10 pop {r4, pc}
|
|
80139ee: f803 1b01 strb.w r1, [r3], #1
|
|
80139f2: e7f9 b.n 80139e8 <strncpy+0x1a>
|
|
|
|
080139f4 <sysconf>:
|
|
80139f4: 2808 cmp r0, #8
|
|
80139f6: b508 push {r3, lr}
|
|
80139f8: d006 beq.n 8013a08 <sysconf+0x14>
|
|
80139fa: f7fe fefb bl 80127f4 <__errno>
|
|
80139fe: 2316 movs r3, #22
|
|
8013a00: 6003 str r3, [r0, #0]
|
|
8013a02: f04f 30ff mov.w r0, #4294967295
|
|
8013a06: bd08 pop {r3, pc}
|
|
8013a08: f44f 5080 mov.w r0, #4096 ; 0x1000
|
|
8013a0c: e7fb b.n 8013a06 <sysconf+0x12>
|
|
|
|
08013a0e <__sprint_r>:
|
|
8013a0e: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
|
|
8013a12: 6893 ldr r3, [r2, #8]
|
|
8013a14: 4680 mov r8, r0
|
|
8013a16: 460f mov r7, r1
|
|
8013a18: 4614 mov r4, r2
|
|
8013a1a: b91b cbnz r3, 8013a24 <__sprint_r+0x16>
|
|
8013a1c: 6053 str r3, [r2, #4]
|
|
8013a1e: 4618 mov r0, r3
|
|
8013a20: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
|
|
8013a24: 6e4b ldr r3, [r1, #100] ; 0x64
|
|
8013a26: 049d lsls r5, r3, #18
|
|
8013a28: d520 bpl.n 8013a6c <__sprint_r+0x5e>
|
|
8013a2a: 6815 ldr r5, [r2, #0]
|
|
8013a2c: 3508 adds r5, #8
|
|
8013a2e: e955 b602 ldrd fp, r6, [r5, #-8]
|
|
8013a32: f04f 0900 mov.w r9, #0
|
|
8013a36: ea4f 0a96 mov.w sl, r6, lsr #2
|
|
8013a3a: 45ca cmp sl, r9
|
|
8013a3c: dc0b bgt.n 8013a56 <__sprint_r+0x48>
|
|
8013a3e: 68a3 ldr r3, [r4, #8]
|
|
8013a40: f026 0003 bic.w r0, r6, #3
|
|
8013a44: 1a18 subs r0, r3, r0
|
|
8013a46: 60a0 str r0, [r4, #8]
|
|
8013a48: 3508 adds r5, #8
|
|
8013a4a: 2800 cmp r0, #0
|
|
8013a4c: d1ef bne.n 8013a2e <__sprint_r+0x20>
|
|
8013a4e: 2300 movs r3, #0
|
|
8013a50: e9c4 3301 strd r3, r3, [r4, #4]
|
|
8013a54: e7e4 b.n 8013a20 <__sprint_r+0x12>
|
|
8013a56: f85b 1029 ldr.w r1, [fp, r9, lsl #2]
|
|
8013a5a: 463a mov r2, r7
|
|
8013a5c: 4640 mov r0, r8
|
|
8013a5e: f000 fe42 bl 80146e6 <_fputwc_r>
|
|
8013a62: 1c43 adds r3, r0, #1
|
|
8013a64: d0f3 beq.n 8013a4e <__sprint_r+0x40>
|
|
8013a66: f109 0901 add.w r9, r9, #1
|
|
8013a6a: e7e6 b.n 8013a3a <__sprint_r+0x2c>
|
|
8013a6c: f000 fe78 bl 8014760 <__sfvwrite_r>
|
|
8013a70: e7ed b.n 8013a4e <__sprint_r+0x40>
|
|
...
|
|
|
|
08013a74 <_vfiprintf_r>:
|
|
8013a74: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
|
|
8013a78: ed2d 8b02 vpush {d8}
|
|
8013a7c: b0b9 sub sp, #228 ; 0xe4
|
|
8013a7e: 460f mov r7, r1
|
|
8013a80: 9201 str r2, [sp, #4]
|
|
8013a82: 461d mov r5, r3
|
|
8013a84: 461c mov r4, r3
|
|
8013a86: 4681 mov r9, r0
|
|
8013a88: b118 cbz r0, 8013a92 <_vfiprintf_r+0x1e>
|
|
8013a8a: 6b83 ldr r3, [r0, #56] ; 0x38
|
|
8013a8c: b90b cbnz r3, 8013a92 <_vfiprintf_r+0x1e>
|
|
8013a8e: f7fe ffb1 bl 80129f4 <__sinit>
|
|
8013a92: 6e7b ldr r3, [r7, #100] ; 0x64
|
|
8013a94: 07d8 lsls r0, r3, #31
|
|
8013a96: d405 bmi.n 8013aa4 <_vfiprintf_r+0x30>
|
|
8013a98: 89bb ldrh r3, [r7, #12]
|
|
8013a9a: 0599 lsls r1, r3, #22
|
|
8013a9c: d402 bmi.n 8013aa4 <_vfiprintf_r+0x30>
|
|
8013a9e: 6db8 ldr r0, [r7, #88] ; 0x58
|
|
8013aa0: f7ff f91e bl 8012ce0 <__retarget_lock_acquire_recursive>
|
|
8013aa4: f9b7 300c ldrsh.w r3, [r7, #12]
|
|
8013aa8: 049a lsls r2, r3, #18
|
|
8013aaa: d406 bmi.n 8013aba <_vfiprintf_r+0x46>
|
|
8013aac: f443 5300 orr.w r3, r3, #8192 ; 0x2000
|
|
8013ab0: 81bb strh r3, [r7, #12]
|
|
8013ab2: 6e7b ldr r3, [r7, #100] ; 0x64
|
|
8013ab4: f423 5300 bic.w r3, r3, #8192 ; 0x2000
|
|
8013ab8: 667b str r3, [r7, #100] ; 0x64
|
|
8013aba: 89bb ldrh r3, [r7, #12]
|
|
8013abc: 071e lsls r6, r3, #28
|
|
8013abe: d501 bpl.n 8013ac4 <_vfiprintf_r+0x50>
|
|
8013ac0: 693b ldr r3, [r7, #16]
|
|
8013ac2: b9bb cbnz r3, 8013af4 <_vfiprintf_r+0x80>
|
|
8013ac4: 4639 mov r1, r7
|
|
8013ac6: 4648 mov r0, r9
|
|
8013ac8: f7fd ffc8 bl 8011a5c <__swsetup_r>
|
|
8013acc: b190 cbz r0, 8013af4 <_vfiprintf_r+0x80>
|
|
8013ace: 6e7b ldr r3, [r7, #100] ; 0x64
|
|
8013ad0: 07d8 lsls r0, r3, #31
|
|
8013ad2: d508 bpl.n 8013ae6 <_vfiprintf_r+0x72>
|
|
8013ad4: f04f 33ff mov.w r3, #4294967295
|
|
8013ad8: 9302 str r3, [sp, #8]
|
|
8013ada: 9802 ldr r0, [sp, #8]
|
|
8013adc: b039 add sp, #228 ; 0xe4
|
|
8013ade: ecbd 8b02 vpop {d8}
|
|
8013ae2: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
|
|
8013ae6: 89bb ldrh r3, [r7, #12]
|
|
8013ae8: 0599 lsls r1, r3, #22
|
|
8013aea: d4f3 bmi.n 8013ad4 <_vfiprintf_r+0x60>
|
|
8013aec: 6db8 ldr r0, [r7, #88] ; 0x58
|
|
8013aee: f7ff f8f8 bl 8012ce2 <__retarget_lock_release_recursive>
|
|
8013af2: e7ef b.n 8013ad4 <_vfiprintf_r+0x60>
|
|
8013af4: 89bb ldrh r3, [r7, #12]
|
|
8013af6: f003 021a and.w r2, r3, #26
|
|
8013afa: 2a0a cmp r2, #10
|
|
8013afc: d116 bne.n 8013b2c <_vfiprintf_r+0xb8>
|
|
8013afe: f9b7 200e ldrsh.w r2, [r7, #14]
|
|
8013b02: 2a00 cmp r2, #0
|
|
8013b04: db12 blt.n 8013b2c <_vfiprintf_r+0xb8>
|
|
8013b06: 6e7a ldr r2, [r7, #100] ; 0x64
|
|
8013b08: 07d2 lsls r2, r2, #31
|
|
8013b0a: d404 bmi.n 8013b16 <_vfiprintf_r+0xa2>
|
|
8013b0c: 059e lsls r6, r3, #22
|
|
8013b0e: d402 bmi.n 8013b16 <_vfiprintf_r+0xa2>
|
|
8013b10: 6db8 ldr r0, [r7, #88] ; 0x58
|
|
8013b12: f7ff f8e6 bl 8012ce2 <__retarget_lock_release_recursive>
|
|
8013b16: 9a01 ldr r2, [sp, #4]
|
|
8013b18: 462b mov r3, r5
|
|
8013b1a: 4639 mov r1, r7
|
|
8013b1c: 4648 mov r0, r9
|
|
8013b1e: b039 add sp, #228 ; 0xe4
|
|
8013b20: ecbd 8b02 vpop {d8}
|
|
8013b24: e8bd 4ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
|
|
8013b28: f000 bc3a b.w 80143a0 <__sbprintf>
|
|
8013b2c: 2300 movs r3, #0
|
|
8013b2e: e9cd 330d strd r3, r3, [sp, #52] ; 0x34
|
|
8013b32: e9cd 3305 strd r3, r3, [sp, #20]
|
|
8013b36: ae0f add r6, sp, #60 ; 0x3c
|
|
8013b38: ee08 3a10 vmov s16, r3
|
|
8013b3c: 960c str r6, [sp, #48] ; 0x30
|
|
8013b3e: 9307 str r3, [sp, #28]
|
|
8013b40: 9302 str r3, [sp, #8]
|
|
8013b42: 9b01 ldr r3, [sp, #4]
|
|
8013b44: 461d mov r5, r3
|
|
8013b46: f813 2b01 ldrb.w r2, [r3], #1
|
|
8013b4a: b10a cbz r2, 8013b50 <_vfiprintf_r+0xdc>
|
|
8013b4c: 2a25 cmp r2, #37 ; 0x25
|
|
8013b4e: d1f9 bne.n 8013b44 <_vfiprintf_r+0xd0>
|
|
8013b50: 9b01 ldr r3, [sp, #4]
|
|
8013b52: ebb5 0803 subs.w r8, r5, r3
|
|
8013b56: d00d beq.n 8013b74 <_vfiprintf_r+0x100>
|
|
8013b58: e9c6 3800 strd r3, r8, [r6]
|
|
8013b5c: 9b0e ldr r3, [sp, #56] ; 0x38
|
|
8013b5e: 4443 add r3, r8
|
|
8013b60: 930e str r3, [sp, #56] ; 0x38
|
|
8013b62: 9b0d ldr r3, [sp, #52] ; 0x34
|
|
8013b64: 3301 adds r3, #1
|
|
8013b66: 2b07 cmp r3, #7
|
|
8013b68: 930d str r3, [sp, #52] ; 0x34
|
|
8013b6a: dc75 bgt.n 8013c58 <_vfiprintf_r+0x1e4>
|
|
8013b6c: 3608 adds r6, #8
|
|
8013b6e: 9b02 ldr r3, [sp, #8]
|
|
8013b70: 4443 add r3, r8
|
|
8013b72: 9302 str r3, [sp, #8]
|
|
8013b74: 782b ldrb r3, [r5, #0]
|
|
8013b76: 2b00 cmp r3, #0
|
|
8013b78: f000 83d6 beq.w 8014328 <_vfiprintf_r+0x8b4>
|
|
8013b7c: 2300 movs r3, #0
|
|
8013b7e: f04f 31ff mov.w r1, #4294967295
|
|
8013b82: 1c6a adds r2, r5, #1
|
|
8013b84: f88d 302b strb.w r3, [sp, #43] ; 0x2b
|
|
8013b88: 9100 str r1, [sp, #0]
|
|
8013b8a: 9303 str r3, [sp, #12]
|
|
8013b8c: 469a mov sl, r3
|
|
8013b8e: f812 3b01 ldrb.w r3, [r2], #1
|
|
8013b92: 9201 str r2, [sp, #4]
|
|
8013b94: f1a3 0220 sub.w r2, r3, #32
|
|
8013b98: 2a5a cmp r2, #90 ; 0x5a
|
|
8013b9a: f200 831f bhi.w 80141dc <_vfiprintf_r+0x768>
|
|
8013b9e: e8df f012 tbh [pc, r2, lsl #1]
|
|
8013ba2: 009b .short 0x009b
|
|
8013ba4: 031d031d .word 0x031d031d
|
|
8013ba8: 031d00a3 .word 0x031d00a3
|
|
8013bac: 031d031d .word 0x031d031d
|
|
8013bb0: 031d0082 .word 0x031d0082
|
|
8013bb4: 00a6031d .word 0x00a6031d
|
|
8013bb8: 031d00b0 .word 0x031d00b0
|
|
8013bbc: 00b200ad .word 0x00b200ad
|
|
8013bc0: 00cd031d .word 0x00cd031d
|
|
8013bc4: 00d000d0 .word 0x00d000d0
|
|
8013bc8: 00d000d0 .word 0x00d000d0
|
|
8013bcc: 00d000d0 .word 0x00d000d0
|
|
8013bd0: 00d000d0 .word 0x00d000d0
|
|
8013bd4: 031d00d0 .word 0x031d00d0
|
|
8013bd8: 031d031d .word 0x031d031d
|
|
8013bdc: 031d031d .word 0x031d031d
|
|
8013be0: 031d031d .word 0x031d031d
|
|
8013be4: 031d031d .word 0x031d031d
|
|
8013be8: 010800fa .word 0x010800fa
|
|
8013bec: 031d031d .word 0x031d031d
|
|
8013bf0: 031d031d .word 0x031d031d
|
|
8013bf4: 031d031d .word 0x031d031d
|
|
8013bf8: 031d031d .word 0x031d031d
|
|
8013bfc: 031d031d .word 0x031d031d
|
|
8013c00: 031d0158 .word 0x031d0158
|
|
8013c04: 031d031d .word 0x031d031d
|
|
8013c08: 031d01a1 .word 0x031d01a1
|
|
8013c0c: 031d027e .word 0x031d027e
|
|
8013c10: 029e031d .word 0x029e031d
|
|
8013c14: 031d031d .word 0x031d031d
|
|
8013c18: 031d031d .word 0x031d031d
|
|
8013c1c: 031d031d .word 0x031d031d
|
|
8013c20: 031d031d .word 0x031d031d
|
|
8013c24: 031d031d .word 0x031d031d
|
|
8013c28: 010a00fa .word 0x010a00fa
|
|
8013c2c: 031d031d .word 0x031d031d
|
|
8013c30: 00e0031d .word 0x00e0031d
|
|
8013c34: 00f4010a .word 0x00f4010a
|
|
8013c38: 00ed031d .word 0x00ed031d
|
|
8013c3c: 0136031d .word 0x0136031d
|
|
8013c40: 018f015a .word 0x018f015a
|
|
8013c44: 031d00f4 .word 0x031d00f4
|
|
8013c48: 009901a1 .word 0x009901a1
|
|
8013c4c: 031d0280 .word 0x031d0280
|
|
8013c50: 0065031d .word 0x0065031d
|
|
8013c54: 0099031d .word 0x0099031d
|
|
8013c58: aa0c add r2, sp, #48 ; 0x30
|
|
8013c5a: 4639 mov r1, r7
|
|
8013c5c: 4648 mov r0, r9
|
|
8013c5e: f7ff fed6 bl 8013a0e <__sprint_r>
|
|
8013c62: 2800 cmp r0, #0
|
|
8013c64: f040 833f bne.w 80142e6 <_vfiprintf_r+0x872>
|
|
8013c68: ae0f add r6, sp, #60 ; 0x3c
|
|
8013c6a: e780 b.n 8013b6e <_vfiprintf_r+0xfa>
|
|
8013c6c: 4a9c ldr r2, [pc, #624] ; (8013ee0 <_vfiprintf_r+0x46c>)
|
|
8013c6e: 9205 str r2, [sp, #20]
|
|
8013c70: f01a 0220 ands.w r2, sl, #32
|
|
8013c74: f000 8235 beq.w 80140e2 <_vfiprintf_r+0x66e>
|
|
8013c78: 3407 adds r4, #7
|
|
8013c7a: f024 0207 bic.w r2, r4, #7
|
|
8013c7e: 4693 mov fp, r2
|
|
8013c80: 6855 ldr r5, [r2, #4]
|
|
8013c82: f85b 4b08 ldr.w r4, [fp], #8
|
|
8013c86: f01a 0f01 tst.w sl, #1
|
|
8013c8a: d009 beq.n 8013ca0 <_vfiprintf_r+0x22c>
|
|
8013c8c: ea54 0205 orrs.w r2, r4, r5
|
|
8013c90: bf1f itttt ne
|
|
8013c92: 2230 movne r2, #48 ; 0x30
|
|
8013c94: f88d 202c strbne.w r2, [sp, #44] ; 0x2c
|
|
8013c98: f88d 302d strbne.w r3, [sp, #45] ; 0x2d
|
|
8013c9c: f04a 0a02 orrne.w sl, sl, #2
|
|
8013ca0: f42a 6a80 bic.w sl, sl, #1024 ; 0x400
|
|
8013ca4: e11a b.n 8013edc <_vfiprintf_r+0x468>
|
|
8013ca6: 4648 mov r0, r9
|
|
8013ca8: f7ff f814 bl 8012cd4 <_localeconv_r>
|
|
8013cac: 6843 ldr r3, [r0, #4]
|
|
8013cae: 4618 mov r0, r3
|
|
8013cb0: ee08 3a10 vmov s16, r3
|
|
8013cb4: f7ec fa9c bl 80001f0 <strlen>
|
|
8013cb8: 9007 str r0, [sp, #28]
|
|
8013cba: 4648 mov r0, r9
|
|
8013cbc: f7ff f80a bl 8012cd4 <_localeconv_r>
|
|
8013cc0: 6883 ldr r3, [r0, #8]
|
|
8013cc2: 9306 str r3, [sp, #24]
|
|
8013cc4: 9b07 ldr r3, [sp, #28]
|
|
8013cc6: b12b cbz r3, 8013cd4 <_vfiprintf_r+0x260>
|
|
8013cc8: 9b06 ldr r3, [sp, #24]
|
|
8013cca: b11b cbz r3, 8013cd4 <_vfiprintf_r+0x260>
|
|
8013ccc: 781b ldrb r3, [r3, #0]
|
|
8013cce: b10b cbz r3, 8013cd4 <_vfiprintf_r+0x260>
|
|
8013cd0: f44a 6a80 orr.w sl, sl, #1024 ; 0x400
|
|
8013cd4: 9a01 ldr r2, [sp, #4]
|
|
8013cd6: e75a b.n 8013b8e <_vfiprintf_r+0x11a>
|
|
8013cd8: f89d 302b ldrb.w r3, [sp, #43] ; 0x2b
|
|
8013cdc: 2b00 cmp r3, #0
|
|
8013cde: d1f9 bne.n 8013cd4 <_vfiprintf_r+0x260>
|
|
8013ce0: 2320 movs r3, #32
|
|
8013ce2: f88d 302b strb.w r3, [sp, #43] ; 0x2b
|
|
8013ce6: e7f5 b.n 8013cd4 <_vfiprintf_r+0x260>
|
|
8013ce8: f04a 0a01 orr.w sl, sl, #1
|
|
8013cec: e7f2 b.n 8013cd4 <_vfiprintf_r+0x260>
|
|
8013cee: f854 3b04 ldr.w r3, [r4], #4
|
|
8013cf2: 9303 str r3, [sp, #12]
|
|
8013cf4: 2b00 cmp r3, #0
|
|
8013cf6: daed bge.n 8013cd4 <_vfiprintf_r+0x260>
|
|
8013cf8: 425b negs r3, r3
|
|
8013cfa: 9303 str r3, [sp, #12]
|
|
8013cfc: f04a 0a04 orr.w sl, sl, #4
|
|
8013d00: e7e8 b.n 8013cd4 <_vfiprintf_r+0x260>
|
|
8013d02: 232b movs r3, #43 ; 0x2b
|
|
8013d04: e7ed b.n 8013ce2 <_vfiprintf_r+0x26e>
|
|
8013d06: 9a01 ldr r2, [sp, #4]
|
|
8013d08: f812 3b01 ldrb.w r3, [r2], #1
|
|
8013d0c: 2b2a cmp r3, #42 ; 0x2a
|
|
8013d0e: d112 bne.n 8013d36 <_vfiprintf_r+0x2c2>
|
|
8013d10: f854 0b04 ldr.w r0, [r4], #4
|
|
8013d14: ea40 73e0 orr.w r3, r0, r0, asr #31
|
|
8013d18: e9cd 3200 strd r3, r2, [sp]
|
|
8013d1c: e7da b.n 8013cd4 <_vfiprintf_r+0x260>
|
|
8013d1e: 9b00 ldr r3, [sp, #0]
|
|
8013d20: 200a movs r0, #10
|
|
8013d22: fb00 1303 mla r3, r0, r3, r1
|
|
8013d26: 9300 str r3, [sp, #0]
|
|
8013d28: f812 3b01 ldrb.w r3, [r2], #1
|
|
8013d2c: f1a3 0130 sub.w r1, r3, #48 ; 0x30
|
|
8013d30: 2909 cmp r1, #9
|
|
8013d32: d9f4 bls.n 8013d1e <_vfiprintf_r+0x2aa>
|
|
8013d34: e72d b.n 8013b92 <_vfiprintf_r+0x11e>
|
|
8013d36: 2100 movs r1, #0
|
|
8013d38: 9100 str r1, [sp, #0]
|
|
8013d3a: e7f7 b.n 8013d2c <_vfiprintf_r+0x2b8>
|
|
8013d3c: f04a 0a80 orr.w sl, sl, #128 ; 0x80
|
|
8013d40: e7c8 b.n 8013cd4 <_vfiprintf_r+0x260>
|
|
8013d42: 2100 movs r1, #0
|
|
8013d44: 9a01 ldr r2, [sp, #4]
|
|
8013d46: 9103 str r1, [sp, #12]
|
|
8013d48: 9903 ldr r1, [sp, #12]
|
|
8013d4a: 3b30 subs r3, #48 ; 0x30
|
|
8013d4c: 200a movs r0, #10
|
|
8013d4e: fb00 3301 mla r3, r0, r1, r3
|
|
8013d52: 9303 str r3, [sp, #12]
|
|
8013d54: f812 3b01 ldrb.w r3, [r2], #1
|
|
8013d58: f1a3 0130 sub.w r1, r3, #48 ; 0x30
|
|
8013d5c: 2909 cmp r1, #9
|
|
8013d5e: d9f3 bls.n 8013d48 <_vfiprintf_r+0x2d4>
|
|
8013d60: e717 b.n 8013b92 <_vfiprintf_r+0x11e>
|
|
8013d62: 9b01 ldr r3, [sp, #4]
|
|
8013d64: 781b ldrb r3, [r3, #0]
|
|
8013d66: 2b68 cmp r3, #104 ; 0x68
|
|
8013d68: bf01 itttt eq
|
|
8013d6a: 9b01 ldreq r3, [sp, #4]
|
|
8013d6c: 3301 addeq r3, #1
|
|
8013d6e: 9301 streq r3, [sp, #4]
|
|
8013d70: f44a 7a00 orreq.w sl, sl, #512 ; 0x200
|
|
8013d74: bf18 it ne
|
|
8013d76: f04a 0a40 orrne.w sl, sl, #64 ; 0x40
|
|
8013d7a: e7ab b.n 8013cd4 <_vfiprintf_r+0x260>
|
|
8013d7c: 9b01 ldr r3, [sp, #4]
|
|
8013d7e: 781b ldrb r3, [r3, #0]
|
|
8013d80: 2b6c cmp r3, #108 ; 0x6c
|
|
8013d82: d105 bne.n 8013d90 <_vfiprintf_r+0x31c>
|
|
8013d84: 9b01 ldr r3, [sp, #4]
|
|
8013d86: 3301 adds r3, #1
|
|
8013d88: 9301 str r3, [sp, #4]
|
|
8013d8a: f04a 0a20 orr.w sl, sl, #32
|
|
8013d8e: e7a1 b.n 8013cd4 <_vfiprintf_r+0x260>
|
|
8013d90: f04a 0a10 orr.w sl, sl, #16
|
|
8013d94: e79e b.n 8013cd4 <_vfiprintf_r+0x260>
|
|
8013d96: 46a3 mov fp, r4
|
|
8013d98: 2100 movs r1, #0
|
|
8013d9a: f85b 3b04 ldr.w r3, [fp], #4
|
|
8013d9e: f88d 307c strb.w r3, [sp, #124] ; 0x7c
|
|
8013da2: f88d 102b strb.w r1, [sp, #43] ; 0x2b
|
|
8013da6: 2301 movs r3, #1
|
|
8013da8: 9300 str r3, [sp, #0]
|
|
8013daa: 460d mov r5, r1
|
|
8013dac: f10d 087c add.w r8, sp, #124 ; 0x7c
|
|
8013db0: e0ad b.n 8013f0e <_vfiprintf_r+0x49a>
|
|
8013db2: f04a 0a10 orr.w sl, sl, #16
|
|
8013db6: f01a 0f20 tst.w sl, #32
|
|
8013dba: d011 beq.n 8013de0 <_vfiprintf_r+0x36c>
|
|
8013dbc: 3407 adds r4, #7
|
|
8013dbe: f024 0307 bic.w r3, r4, #7
|
|
8013dc2: 469b mov fp, r3
|
|
8013dc4: 685d ldr r5, [r3, #4]
|
|
8013dc6: f85b 4b08 ldr.w r4, [fp], #8
|
|
8013dca: 2d00 cmp r5, #0
|
|
8013dcc: da06 bge.n 8013ddc <_vfiprintf_r+0x368>
|
|
8013dce: 4264 negs r4, r4
|
|
8013dd0: f04f 032d mov.w r3, #45 ; 0x2d
|
|
8013dd4: eb65 0545 sbc.w r5, r5, r5, lsl #1
|
|
8013dd8: f88d 302b strb.w r3, [sp, #43] ; 0x2b
|
|
8013ddc: 2301 movs r3, #1
|
|
8013dde: e04a b.n 8013e76 <_vfiprintf_r+0x402>
|
|
8013de0: 46a3 mov fp, r4
|
|
8013de2: f01a 0f10 tst.w sl, #16
|
|
8013de6: f85b 5b04 ldr.w r5, [fp], #4
|
|
8013dea: d002 beq.n 8013df2 <_vfiprintf_r+0x37e>
|
|
8013dec: 462c mov r4, r5
|
|
8013dee: 17ed asrs r5, r5, #31
|
|
8013df0: e7eb b.n 8013dca <_vfiprintf_r+0x356>
|
|
8013df2: f01a 0f40 tst.w sl, #64 ; 0x40
|
|
8013df6: d003 beq.n 8013e00 <_vfiprintf_r+0x38c>
|
|
8013df8: b22c sxth r4, r5
|
|
8013dfa: f345 35c0 sbfx r5, r5, #15, #1
|
|
8013dfe: e7e4 b.n 8013dca <_vfiprintf_r+0x356>
|
|
8013e00: f41a 7f00 tst.w sl, #512 ; 0x200
|
|
8013e04: d0f2 beq.n 8013dec <_vfiprintf_r+0x378>
|
|
8013e06: b26c sxtb r4, r5
|
|
8013e08: f345 15c0 sbfx r5, r5, #7, #1
|
|
8013e0c: e7dd b.n 8013dca <_vfiprintf_r+0x356>
|
|
8013e0e: f01a 0f20 tst.w sl, #32
|
|
8013e12: f104 0b04 add.w fp, r4, #4
|
|
8013e16: d007 beq.n 8013e28 <_vfiprintf_r+0x3b4>
|
|
8013e18: 9a02 ldr r2, [sp, #8]
|
|
8013e1a: 6823 ldr r3, [r4, #0]
|
|
8013e1c: 9902 ldr r1, [sp, #8]
|
|
8013e1e: 17d2 asrs r2, r2, #31
|
|
8013e20: e9c3 1200 strd r1, r2, [r3]
|
|
8013e24: 465c mov r4, fp
|
|
8013e26: e68c b.n 8013b42 <_vfiprintf_r+0xce>
|
|
8013e28: f01a 0f10 tst.w sl, #16
|
|
8013e2c: d003 beq.n 8013e36 <_vfiprintf_r+0x3c2>
|
|
8013e2e: 6823 ldr r3, [r4, #0]
|
|
8013e30: 9a02 ldr r2, [sp, #8]
|
|
8013e32: 601a str r2, [r3, #0]
|
|
8013e34: e7f6 b.n 8013e24 <_vfiprintf_r+0x3b0>
|
|
8013e36: f01a 0f40 tst.w sl, #64 ; 0x40
|
|
8013e3a: d003 beq.n 8013e44 <_vfiprintf_r+0x3d0>
|
|
8013e3c: 6823 ldr r3, [r4, #0]
|
|
8013e3e: 9a02 ldr r2, [sp, #8]
|
|
8013e40: 801a strh r2, [r3, #0]
|
|
8013e42: e7ef b.n 8013e24 <_vfiprintf_r+0x3b0>
|
|
8013e44: f41a 7f00 tst.w sl, #512 ; 0x200
|
|
8013e48: d0f1 beq.n 8013e2e <_vfiprintf_r+0x3ba>
|
|
8013e4a: 6823 ldr r3, [r4, #0]
|
|
8013e4c: 9a02 ldr r2, [sp, #8]
|
|
8013e4e: 701a strb r2, [r3, #0]
|
|
8013e50: e7e8 b.n 8013e24 <_vfiprintf_r+0x3b0>
|
|
8013e52: f04a 0a10 orr.w sl, sl, #16
|
|
8013e56: f01a 0320 ands.w r3, sl, #32
|
|
8013e5a: d01f beq.n 8013e9c <_vfiprintf_r+0x428>
|
|
8013e5c: 3407 adds r4, #7
|
|
8013e5e: f024 0307 bic.w r3, r4, #7
|
|
8013e62: 469b mov fp, r3
|
|
8013e64: 685d ldr r5, [r3, #4]
|
|
8013e66: f85b 4b08 ldr.w r4, [fp], #8
|
|
8013e6a: f42a 6a80 bic.w sl, sl, #1024 ; 0x400
|
|
8013e6e: 2300 movs r3, #0
|
|
8013e70: 2200 movs r2, #0
|
|
8013e72: f88d 202b strb.w r2, [sp, #43] ; 0x2b
|
|
8013e76: 9a00 ldr r2, [sp, #0]
|
|
8013e78: 3201 adds r2, #1
|
|
8013e7a: f000 8262 beq.w 8014342 <_vfiprintf_r+0x8ce>
|
|
8013e7e: f02a 0280 bic.w r2, sl, #128 ; 0x80
|
|
8013e82: 9204 str r2, [sp, #16]
|
|
8013e84: ea54 0205 orrs.w r2, r4, r5
|
|
8013e88: f040 8261 bne.w 801434e <_vfiprintf_r+0x8da>
|
|
8013e8c: 9a00 ldr r2, [sp, #0]
|
|
8013e8e: 2a00 cmp r2, #0
|
|
8013e90: f000 8199 beq.w 80141c6 <_vfiprintf_r+0x752>
|
|
8013e94: 2b01 cmp r3, #1
|
|
8013e96: f040 825d bne.w 8014354 <_vfiprintf_r+0x8e0>
|
|
8013e9a: e139 b.n 8014110 <_vfiprintf_r+0x69c>
|
|
8013e9c: 46a3 mov fp, r4
|
|
8013e9e: f01a 0510 ands.w r5, sl, #16
|
|
8013ea2: f85b 4b04 ldr.w r4, [fp], #4
|
|
8013ea6: d001 beq.n 8013eac <_vfiprintf_r+0x438>
|
|
8013ea8: 461d mov r5, r3
|
|
8013eaa: e7de b.n 8013e6a <_vfiprintf_r+0x3f6>
|
|
8013eac: f01a 0340 ands.w r3, sl, #64 ; 0x40
|
|
8013eb0: d001 beq.n 8013eb6 <_vfiprintf_r+0x442>
|
|
8013eb2: b2a4 uxth r4, r4
|
|
8013eb4: e7d9 b.n 8013e6a <_vfiprintf_r+0x3f6>
|
|
8013eb6: f41a 7500 ands.w r5, sl, #512 ; 0x200
|
|
8013eba: d0d6 beq.n 8013e6a <_vfiprintf_r+0x3f6>
|
|
8013ebc: b2e4 uxtb r4, r4
|
|
8013ebe: e7f3 b.n 8013ea8 <_vfiprintf_r+0x434>
|
|
8013ec0: 2330 movs r3, #48 ; 0x30
|
|
8013ec2: 46a3 mov fp, r4
|
|
8013ec4: f88d 302c strb.w r3, [sp, #44] ; 0x2c
|
|
8013ec8: 2378 movs r3, #120 ; 0x78
|
|
8013eca: f88d 302d strb.w r3, [sp, #45] ; 0x2d
|
|
8013ece: f85b 4b04 ldr.w r4, [fp], #4
|
|
8013ed2: 4b03 ldr r3, [pc, #12] ; (8013ee0 <_vfiprintf_r+0x46c>)
|
|
8013ed4: 9305 str r3, [sp, #20]
|
|
8013ed6: 2500 movs r5, #0
|
|
8013ed8: f04a 0a02 orr.w sl, sl, #2
|
|
8013edc: 2302 movs r3, #2
|
|
8013ede: e7c7 b.n 8013e70 <_vfiprintf_r+0x3fc>
|
|
8013ee0: 08018068 .word 0x08018068
|
|
8013ee4: 9b00 ldr r3, [sp, #0]
|
|
8013ee6: 46a3 mov fp, r4
|
|
8013ee8: 2500 movs r5, #0
|
|
8013eea: 1c5c adds r4, r3, #1
|
|
8013eec: f85b 8b04 ldr.w r8, [fp], #4
|
|
8013ef0: f88d 502b strb.w r5, [sp, #43] ; 0x2b
|
|
8013ef4: f000 80ce beq.w 8014094 <_vfiprintf_r+0x620>
|
|
8013ef8: 461a mov r2, r3
|
|
8013efa: 4629 mov r1, r5
|
|
8013efc: 4640 mov r0, r8
|
|
8013efe: f7ec f97f bl 8000200 <memchr>
|
|
8013f02: 2800 cmp r0, #0
|
|
8013f04: f000 8174 beq.w 80141f0 <_vfiprintf_r+0x77c>
|
|
8013f08: eba0 0308 sub.w r3, r0, r8
|
|
8013f0c: 9300 str r3, [sp, #0]
|
|
8013f0e: 9b00 ldr r3, [sp, #0]
|
|
8013f10: 42ab cmp r3, r5
|
|
8013f12: bfb8 it lt
|
|
8013f14: 462b movlt r3, r5
|
|
8013f16: 9304 str r3, [sp, #16]
|
|
8013f18: f89d 302b ldrb.w r3, [sp, #43] ; 0x2b
|
|
8013f1c: b113 cbz r3, 8013f24 <_vfiprintf_r+0x4b0>
|
|
8013f1e: 9b04 ldr r3, [sp, #16]
|
|
8013f20: 3301 adds r3, #1
|
|
8013f22: 9304 str r3, [sp, #16]
|
|
8013f24: f01a 0302 ands.w r3, sl, #2
|
|
8013f28: 9308 str r3, [sp, #32]
|
|
8013f2a: bf1e ittt ne
|
|
8013f2c: 9b04 ldrne r3, [sp, #16]
|
|
8013f2e: 3302 addne r3, #2
|
|
8013f30: 9304 strne r3, [sp, #16]
|
|
8013f32: f01a 0384 ands.w r3, sl, #132 ; 0x84
|
|
8013f36: 9309 str r3, [sp, #36] ; 0x24
|
|
8013f38: d11f bne.n 8013f7a <_vfiprintf_r+0x506>
|
|
8013f3a: e9dd 3203 ldrd r3, r2, [sp, #12]
|
|
8013f3e: 1a9c subs r4, r3, r2
|
|
8013f40: 2c00 cmp r4, #0
|
|
8013f42: dd1a ble.n 8013f7a <_vfiprintf_r+0x506>
|
|
8013f44: e9dd 320d ldrd r3, r2, [sp, #52] ; 0x34
|
|
8013f48: 48aa ldr r0, [pc, #680] ; (80141f4 <_vfiprintf_r+0x780>)
|
|
8013f4a: 6030 str r0, [r6, #0]
|
|
8013f4c: 2c10 cmp r4, #16
|
|
8013f4e: f103 0301 add.w r3, r3, #1
|
|
8013f52: f106 0108 add.w r1, r6, #8
|
|
8013f56: f300 8153 bgt.w 8014200 <_vfiprintf_r+0x78c>
|
|
8013f5a: 6074 str r4, [r6, #4]
|
|
8013f5c: 2b07 cmp r3, #7
|
|
8013f5e: 4414 add r4, r2
|
|
8013f60: e9cd 340d strd r3, r4, [sp, #52] ; 0x34
|
|
8013f64: f340 815e ble.w 8014224 <_vfiprintf_r+0x7b0>
|
|
8013f68: aa0c add r2, sp, #48 ; 0x30
|
|
8013f6a: 4639 mov r1, r7
|
|
8013f6c: 4648 mov r0, r9
|
|
8013f6e: f7ff fd4e bl 8013a0e <__sprint_r>
|
|
8013f72: 2800 cmp r0, #0
|
|
8013f74: f040 81b7 bne.w 80142e6 <_vfiprintf_r+0x872>
|
|
8013f78: ae0f add r6, sp, #60 ; 0x3c
|
|
8013f7a: f89d 302b ldrb.w r3, [sp, #43] ; 0x2b
|
|
8013f7e: b173 cbz r3, 8013f9e <_vfiprintf_r+0x52a>
|
|
8013f80: f10d 022b add.w r2, sp, #43 ; 0x2b
|
|
8013f84: 9b0d ldr r3, [sp, #52] ; 0x34
|
|
8013f86: 6032 str r2, [r6, #0]
|
|
8013f88: 2201 movs r2, #1
|
|
8013f8a: 6072 str r2, [r6, #4]
|
|
8013f8c: 9a0e ldr r2, [sp, #56] ; 0x38
|
|
8013f8e: 3301 adds r3, #1
|
|
8013f90: 3201 adds r2, #1
|
|
8013f92: 2b07 cmp r3, #7
|
|
8013f94: e9cd 320d strd r3, r2, [sp, #52] ; 0x34
|
|
8013f98: f300 8146 bgt.w 8014228 <_vfiprintf_r+0x7b4>
|
|
8013f9c: 3608 adds r6, #8
|
|
8013f9e: 9b08 ldr r3, [sp, #32]
|
|
8013fa0: b16b cbz r3, 8013fbe <_vfiprintf_r+0x54a>
|
|
8013fa2: aa0b add r2, sp, #44 ; 0x2c
|
|
8013fa4: 9b0d ldr r3, [sp, #52] ; 0x34
|
|
8013fa6: 6032 str r2, [r6, #0]
|
|
8013fa8: 2202 movs r2, #2
|
|
8013faa: 6072 str r2, [r6, #4]
|
|
8013fac: 9a0e ldr r2, [sp, #56] ; 0x38
|
|
8013fae: 3301 adds r3, #1
|
|
8013fb0: 3202 adds r2, #2
|
|
8013fb2: 2b07 cmp r3, #7
|
|
8013fb4: e9cd 320d strd r3, r2, [sp, #52] ; 0x34
|
|
8013fb8: f300 813f bgt.w 801423a <_vfiprintf_r+0x7c6>
|
|
8013fbc: 3608 adds r6, #8
|
|
8013fbe: 9b09 ldr r3, [sp, #36] ; 0x24
|
|
8013fc0: 2b80 cmp r3, #128 ; 0x80
|
|
8013fc2: d11f bne.n 8014004 <_vfiprintf_r+0x590>
|
|
8013fc4: e9dd 3203 ldrd r3, r2, [sp, #12]
|
|
8013fc8: 1a9c subs r4, r3, r2
|
|
8013fca: 2c00 cmp r4, #0
|
|
8013fcc: dd1a ble.n 8014004 <_vfiprintf_r+0x590>
|
|
8013fce: e9dd 320d ldrd r3, r2, [sp, #52] ; 0x34
|
|
8013fd2: 4889 ldr r0, [pc, #548] ; (80141f8 <_vfiprintf_r+0x784>)
|
|
8013fd4: 6030 str r0, [r6, #0]
|
|
8013fd6: 2c10 cmp r4, #16
|
|
8013fd8: f103 0301 add.w r3, r3, #1
|
|
8013fdc: f106 0108 add.w r1, r6, #8
|
|
8013fe0: f300 8134 bgt.w 801424c <_vfiprintf_r+0x7d8>
|
|
8013fe4: 6074 str r4, [r6, #4]
|
|
8013fe6: 2b07 cmp r3, #7
|
|
8013fe8: 4414 add r4, r2
|
|
8013fea: e9cd 340d strd r3, r4, [sp, #52] ; 0x34
|
|
8013fee: f340 813f ble.w 8014270 <_vfiprintf_r+0x7fc>
|
|
8013ff2: aa0c add r2, sp, #48 ; 0x30
|
|
8013ff4: 4639 mov r1, r7
|
|
8013ff6: 4648 mov r0, r9
|
|
8013ff8: f7ff fd09 bl 8013a0e <__sprint_r>
|
|
8013ffc: 2800 cmp r0, #0
|
|
8013ffe: f040 8172 bne.w 80142e6 <_vfiprintf_r+0x872>
|
|
8014002: ae0f add r6, sp, #60 ; 0x3c
|
|
8014004: 9b00 ldr r3, [sp, #0]
|
|
8014006: 1aec subs r4, r5, r3
|
|
8014008: 2c00 cmp r4, #0
|
|
801400a: dd1a ble.n 8014042 <_vfiprintf_r+0x5ce>
|
|
801400c: 4d7a ldr r5, [pc, #488] ; (80141f8 <_vfiprintf_r+0x784>)
|
|
801400e: 6035 str r5, [r6, #0]
|
|
8014010: e9dd 310d ldrd r3, r1, [sp, #52] ; 0x34
|
|
8014014: 2c10 cmp r4, #16
|
|
8014016: f103 0301 add.w r3, r3, #1
|
|
801401a: f106 0208 add.w r2, r6, #8
|
|
801401e: f300 8129 bgt.w 8014274 <_vfiprintf_r+0x800>
|
|
8014022: 6074 str r4, [r6, #4]
|
|
8014024: 2b07 cmp r3, #7
|
|
8014026: 440c add r4, r1
|
|
8014028: e9cd 340d strd r3, r4, [sp, #52] ; 0x34
|
|
801402c: f340 8133 ble.w 8014296 <_vfiprintf_r+0x822>
|
|
8014030: aa0c add r2, sp, #48 ; 0x30
|
|
8014032: 4639 mov r1, r7
|
|
8014034: 4648 mov r0, r9
|
|
8014036: f7ff fcea bl 8013a0e <__sprint_r>
|
|
801403a: 2800 cmp r0, #0
|
|
801403c: f040 8153 bne.w 80142e6 <_vfiprintf_r+0x872>
|
|
8014040: ae0f add r6, sp, #60 ; 0x3c
|
|
8014042: 9b00 ldr r3, [sp, #0]
|
|
8014044: 980e ldr r0, [sp, #56] ; 0x38
|
|
8014046: 6073 str r3, [r6, #4]
|
|
8014048: 4418 add r0, r3
|
|
801404a: 9b0d ldr r3, [sp, #52] ; 0x34
|
|
801404c: f8c6 8000 str.w r8, [r6]
|
|
8014050: 3301 adds r3, #1
|
|
8014052: 2b07 cmp r3, #7
|
|
8014054: 900e str r0, [sp, #56] ; 0x38
|
|
8014056: 930d str r3, [sp, #52] ; 0x34
|
|
8014058: f300 811f bgt.w 801429a <_vfiprintf_r+0x826>
|
|
801405c: f106 0308 add.w r3, r6, #8
|
|
8014060: f01a 0f04 tst.w sl, #4
|
|
8014064: f040 8121 bne.w 80142aa <_vfiprintf_r+0x836>
|
|
8014068: e9dd 3202 ldrd r3, r2, [sp, #8]
|
|
801406c: 9904 ldr r1, [sp, #16]
|
|
801406e: 428a cmp r2, r1
|
|
8014070: bfac ite ge
|
|
8014072: 189b addge r3, r3, r2
|
|
8014074: 185b addlt r3, r3, r1
|
|
8014076: 9302 str r3, [sp, #8]
|
|
8014078: 9b0e ldr r3, [sp, #56] ; 0x38
|
|
801407a: b13b cbz r3, 801408c <_vfiprintf_r+0x618>
|
|
801407c: aa0c add r2, sp, #48 ; 0x30
|
|
801407e: 4639 mov r1, r7
|
|
8014080: 4648 mov r0, r9
|
|
8014082: f7ff fcc4 bl 8013a0e <__sprint_r>
|
|
8014086: 2800 cmp r0, #0
|
|
8014088: f040 812d bne.w 80142e6 <_vfiprintf_r+0x872>
|
|
801408c: 2300 movs r3, #0
|
|
801408e: 930d str r3, [sp, #52] ; 0x34
|
|
8014090: ae0f add r6, sp, #60 ; 0x3c
|
|
8014092: e6c7 b.n 8013e24 <_vfiprintf_r+0x3b0>
|
|
8014094: 4640 mov r0, r8
|
|
8014096: f7ec f8ab bl 80001f0 <strlen>
|
|
801409a: 9000 str r0, [sp, #0]
|
|
801409c: e737 b.n 8013f0e <_vfiprintf_r+0x49a>
|
|
801409e: f04a 0a10 orr.w sl, sl, #16
|
|
80140a2: f01a 0320 ands.w r3, sl, #32
|
|
80140a6: d008 beq.n 80140ba <_vfiprintf_r+0x646>
|
|
80140a8: 3407 adds r4, #7
|
|
80140aa: f024 0307 bic.w r3, r4, #7
|
|
80140ae: 469b mov fp, r3
|
|
80140b0: 685d ldr r5, [r3, #4]
|
|
80140b2: f85b 4b08 ldr.w r4, [fp], #8
|
|
80140b6: 2301 movs r3, #1
|
|
80140b8: e6da b.n 8013e70 <_vfiprintf_r+0x3fc>
|
|
80140ba: 46a3 mov fp, r4
|
|
80140bc: f01a 0510 ands.w r5, sl, #16
|
|
80140c0: f85b 4b04 ldr.w r4, [fp], #4
|
|
80140c4: d001 beq.n 80140ca <_vfiprintf_r+0x656>
|
|
80140c6: 461d mov r5, r3
|
|
80140c8: e7f5 b.n 80140b6 <_vfiprintf_r+0x642>
|
|
80140ca: f01a 0340 ands.w r3, sl, #64 ; 0x40
|
|
80140ce: d001 beq.n 80140d4 <_vfiprintf_r+0x660>
|
|
80140d0: b2a4 uxth r4, r4
|
|
80140d2: e7f0 b.n 80140b6 <_vfiprintf_r+0x642>
|
|
80140d4: f41a 7500 ands.w r5, sl, #512 ; 0x200
|
|
80140d8: d0ed beq.n 80140b6 <_vfiprintf_r+0x642>
|
|
80140da: b2e4 uxtb r4, r4
|
|
80140dc: e7f3 b.n 80140c6 <_vfiprintf_r+0x652>
|
|
80140de: 4a47 ldr r2, [pc, #284] ; (80141fc <_vfiprintf_r+0x788>)
|
|
80140e0: e5c5 b.n 8013c6e <_vfiprintf_r+0x1fa>
|
|
80140e2: 46a3 mov fp, r4
|
|
80140e4: f01a 0510 ands.w r5, sl, #16
|
|
80140e8: f85b 4b04 ldr.w r4, [fp], #4
|
|
80140ec: d001 beq.n 80140f2 <_vfiprintf_r+0x67e>
|
|
80140ee: 4615 mov r5, r2
|
|
80140f0: e5c9 b.n 8013c86 <_vfiprintf_r+0x212>
|
|
80140f2: f01a 0240 ands.w r2, sl, #64 ; 0x40
|
|
80140f6: d001 beq.n 80140fc <_vfiprintf_r+0x688>
|
|
80140f8: b2a4 uxth r4, r4
|
|
80140fa: e5c4 b.n 8013c86 <_vfiprintf_r+0x212>
|
|
80140fc: f41a 7500 ands.w r5, sl, #512 ; 0x200
|
|
8014100: f43f adc1 beq.w 8013c86 <_vfiprintf_r+0x212>
|
|
8014104: b2e4 uxtb r4, r4
|
|
8014106: e7f2 b.n 80140ee <_vfiprintf_r+0x67a>
|
|
8014108: 2c0a cmp r4, #10
|
|
801410a: f175 0300 sbcs.w r3, r5, #0
|
|
801410e: d205 bcs.n 801411c <_vfiprintf_r+0x6a8>
|
|
8014110: 3430 adds r4, #48 ; 0x30
|
|
8014112: f88d 40df strb.w r4, [sp, #223] ; 0xdf
|
|
8014116: f10d 08df add.w r8, sp, #223 ; 0xdf
|
|
801411a: e137 b.n 801438c <_vfiprintf_r+0x918>
|
|
801411c: ab38 add r3, sp, #224 ; 0xe0
|
|
801411e: 9308 str r3, [sp, #32]
|
|
8014120: 9b04 ldr r3, [sp, #16]
|
|
8014122: f403 6380 and.w r3, r3, #1024 ; 0x400
|
|
8014126: f04f 0a00 mov.w sl, #0
|
|
801412a: 9309 str r3, [sp, #36] ; 0x24
|
|
801412c: 9b08 ldr r3, [sp, #32]
|
|
801412e: 220a movs r2, #10
|
|
8014130: f103 38ff add.w r8, r3, #4294967295
|
|
8014134: 4620 mov r0, r4
|
|
8014136: 2300 movs r3, #0
|
|
8014138: 4629 mov r1, r5
|
|
801413a: f7ec fd45 bl 8000bc8 <__aeabi_uldivmod>
|
|
801413e: 9b08 ldr r3, [sp, #32]
|
|
8014140: 3230 adds r2, #48 ; 0x30
|
|
8014142: f803 2c01 strb.w r2, [r3, #-1]
|
|
8014146: 9b09 ldr r3, [sp, #36] ; 0x24
|
|
8014148: f10a 0a01 add.w sl, sl, #1
|
|
801414c: b1db cbz r3, 8014186 <_vfiprintf_r+0x712>
|
|
801414e: 9b06 ldr r3, [sp, #24]
|
|
8014150: 781b ldrb r3, [r3, #0]
|
|
8014152: 4553 cmp r3, sl
|
|
8014154: d117 bne.n 8014186 <_vfiprintf_r+0x712>
|
|
8014156: f1ba 0fff cmp.w sl, #255 ; 0xff
|
|
801415a: d014 beq.n 8014186 <_vfiprintf_r+0x712>
|
|
801415c: 2c0a cmp r4, #10
|
|
801415e: f175 0300 sbcs.w r3, r5, #0
|
|
8014162: d310 bcc.n 8014186 <_vfiprintf_r+0x712>
|
|
8014164: 9b07 ldr r3, [sp, #28]
|
|
8014166: eba8 0803 sub.w r8, r8, r3
|
|
801416a: 461a mov r2, r3
|
|
801416c: ee18 1a10 vmov r1, s16
|
|
8014170: 4640 mov r0, r8
|
|
8014172: f7ff fc2c bl 80139ce <strncpy>
|
|
8014176: 9b06 ldr r3, [sp, #24]
|
|
8014178: 785b ldrb r3, [r3, #1]
|
|
801417a: b1a3 cbz r3, 80141a6 <_vfiprintf_r+0x732>
|
|
801417c: 9b06 ldr r3, [sp, #24]
|
|
801417e: 3301 adds r3, #1
|
|
8014180: 9306 str r3, [sp, #24]
|
|
8014182: f04f 0a00 mov.w sl, #0
|
|
8014186: 2300 movs r3, #0
|
|
8014188: 220a movs r2, #10
|
|
801418a: 4620 mov r0, r4
|
|
801418c: 4629 mov r1, r5
|
|
801418e: f7ec fd1b bl 8000bc8 <__aeabi_uldivmod>
|
|
8014192: 2c0a cmp r4, #10
|
|
8014194: f175 0300 sbcs.w r3, r5, #0
|
|
8014198: f0c0 80f8 bcc.w 801438c <_vfiprintf_r+0x918>
|
|
801419c: 4604 mov r4, r0
|
|
801419e: 460d mov r5, r1
|
|
80141a0: f8cd 8020 str.w r8, [sp, #32]
|
|
80141a4: e7c2 b.n 801412c <_vfiprintf_r+0x6b8>
|
|
80141a6: 469a mov sl, r3
|
|
80141a8: e7ed b.n 8014186 <_vfiprintf_r+0x712>
|
|
80141aa: f004 030f and.w r3, r4, #15
|
|
80141ae: 9a05 ldr r2, [sp, #20]
|
|
80141b0: 0924 lsrs r4, r4, #4
|
|
80141b2: 5cd3 ldrb r3, [r2, r3]
|
|
80141b4: f808 3d01 strb.w r3, [r8, #-1]!
|
|
80141b8: ea44 7405 orr.w r4, r4, r5, lsl #28
|
|
80141bc: 092d lsrs r5, r5, #4
|
|
80141be: ea54 0305 orrs.w r3, r4, r5
|
|
80141c2: d1f2 bne.n 80141aa <_vfiprintf_r+0x736>
|
|
80141c4: e0e2 b.n 801438c <_vfiprintf_r+0x918>
|
|
80141c6: b933 cbnz r3, 80141d6 <_vfiprintf_r+0x762>
|
|
80141c8: f01a 0f01 tst.w sl, #1
|
|
80141cc: d003 beq.n 80141d6 <_vfiprintf_r+0x762>
|
|
80141ce: 2330 movs r3, #48 ; 0x30
|
|
80141d0: f88d 30df strb.w r3, [sp, #223] ; 0xdf
|
|
80141d4: e79f b.n 8014116 <_vfiprintf_r+0x6a2>
|
|
80141d6: f10d 08e0 add.w r8, sp, #224 ; 0xe0
|
|
80141da: e0d7 b.n 801438c <_vfiprintf_r+0x918>
|
|
80141dc: 2b00 cmp r3, #0
|
|
80141de: f000 80a3 beq.w 8014328 <_vfiprintf_r+0x8b4>
|
|
80141e2: 2100 movs r1, #0
|
|
80141e4: f88d 307c strb.w r3, [sp, #124] ; 0x7c
|
|
80141e8: f88d 102b strb.w r1, [sp, #43] ; 0x2b
|
|
80141ec: 46a3 mov fp, r4
|
|
80141ee: e5da b.n 8013da6 <_vfiprintf_r+0x332>
|
|
80141f0: 4605 mov r5, r0
|
|
80141f2: e68c b.n 8013f0e <_vfiprintf_r+0x49a>
|
|
80141f4: 08018284 .word 0x08018284
|
|
80141f8: 08018294 .word 0x08018294
|
|
80141fc: 08018079 .word 0x08018079
|
|
8014200: 2010 movs r0, #16
|
|
8014202: 4402 add r2, r0
|
|
8014204: 2b07 cmp r3, #7
|
|
8014206: e9cd 320d strd r3, r2, [sp, #52] ; 0x34
|
|
801420a: 6070 str r0, [r6, #4]
|
|
801420c: dd07 ble.n 801421e <_vfiprintf_r+0x7aa>
|
|
801420e: aa0c add r2, sp, #48 ; 0x30
|
|
8014210: 4639 mov r1, r7
|
|
8014212: 4648 mov r0, r9
|
|
8014214: f7ff fbfb bl 8013a0e <__sprint_r>
|
|
8014218: 2800 cmp r0, #0
|
|
801421a: d164 bne.n 80142e6 <_vfiprintf_r+0x872>
|
|
801421c: a90f add r1, sp, #60 ; 0x3c
|
|
801421e: 3c10 subs r4, #16
|
|
8014220: 460e mov r6, r1
|
|
8014222: e68f b.n 8013f44 <_vfiprintf_r+0x4d0>
|
|
8014224: 460e mov r6, r1
|
|
8014226: e6a8 b.n 8013f7a <_vfiprintf_r+0x506>
|
|
8014228: aa0c add r2, sp, #48 ; 0x30
|
|
801422a: 4639 mov r1, r7
|
|
801422c: 4648 mov r0, r9
|
|
801422e: f7ff fbee bl 8013a0e <__sprint_r>
|
|
8014232: 2800 cmp r0, #0
|
|
8014234: d157 bne.n 80142e6 <_vfiprintf_r+0x872>
|
|
8014236: ae0f add r6, sp, #60 ; 0x3c
|
|
8014238: e6b1 b.n 8013f9e <_vfiprintf_r+0x52a>
|
|
801423a: aa0c add r2, sp, #48 ; 0x30
|
|
801423c: 4639 mov r1, r7
|
|
801423e: 4648 mov r0, r9
|
|
8014240: f7ff fbe5 bl 8013a0e <__sprint_r>
|
|
8014244: 2800 cmp r0, #0
|
|
8014246: d14e bne.n 80142e6 <_vfiprintf_r+0x872>
|
|
8014248: ae0f add r6, sp, #60 ; 0x3c
|
|
801424a: e6b8 b.n 8013fbe <_vfiprintf_r+0x54a>
|
|
801424c: 2010 movs r0, #16
|
|
801424e: 4402 add r2, r0
|
|
8014250: 2b07 cmp r3, #7
|
|
8014252: e9cd 320d strd r3, r2, [sp, #52] ; 0x34
|
|
8014256: 6070 str r0, [r6, #4]
|
|
8014258: dd07 ble.n 801426a <_vfiprintf_r+0x7f6>
|
|
801425a: aa0c add r2, sp, #48 ; 0x30
|
|
801425c: 4639 mov r1, r7
|
|
801425e: 4648 mov r0, r9
|
|
8014260: f7ff fbd5 bl 8013a0e <__sprint_r>
|
|
8014264: 2800 cmp r0, #0
|
|
8014266: d13e bne.n 80142e6 <_vfiprintf_r+0x872>
|
|
8014268: a90f add r1, sp, #60 ; 0x3c
|
|
801426a: 3c10 subs r4, #16
|
|
801426c: 460e mov r6, r1
|
|
801426e: e6ae b.n 8013fce <_vfiprintf_r+0x55a>
|
|
8014270: 460e mov r6, r1
|
|
8014272: e6c7 b.n 8014004 <_vfiprintf_r+0x590>
|
|
8014274: 2010 movs r0, #16
|
|
8014276: 4401 add r1, r0
|
|
8014278: 2b07 cmp r3, #7
|
|
801427a: e9cd 310d strd r3, r1, [sp, #52] ; 0x34
|
|
801427e: 6070 str r0, [r6, #4]
|
|
8014280: dd06 ble.n 8014290 <_vfiprintf_r+0x81c>
|
|
8014282: aa0c add r2, sp, #48 ; 0x30
|
|
8014284: 4639 mov r1, r7
|
|
8014286: 4648 mov r0, r9
|
|
8014288: f7ff fbc1 bl 8013a0e <__sprint_r>
|
|
801428c: bb58 cbnz r0, 80142e6 <_vfiprintf_r+0x872>
|
|
801428e: aa0f add r2, sp, #60 ; 0x3c
|
|
8014290: 3c10 subs r4, #16
|
|
8014292: 4616 mov r6, r2
|
|
8014294: e6bb b.n 801400e <_vfiprintf_r+0x59a>
|
|
8014296: 4616 mov r6, r2
|
|
8014298: e6d3 b.n 8014042 <_vfiprintf_r+0x5ce>
|
|
801429a: aa0c add r2, sp, #48 ; 0x30
|
|
801429c: 4639 mov r1, r7
|
|
801429e: 4648 mov r0, r9
|
|
80142a0: f7ff fbb5 bl 8013a0e <__sprint_r>
|
|
80142a4: b9f8 cbnz r0, 80142e6 <_vfiprintf_r+0x872>
|
|
80142a6: ab0f add r3, sp, #60 ; 0x3c
|
|
80142a8: e6da b.n 8014060 <_vfiprintf_r+0x5ec>
|
|
80142aa: e9dd 2103 ldrd r2, r1, [sp, #12]
|
|
80142ae: 1a54 subs r4, r2, r1
|
|
80142b0: 2c00 cmp r4, #0
|
|
80142b2: f77f aed9 ble.w 8014068 <_vfiprintf_r+0x5f4>
|
|
80142b6: 4d39 ldr r5, [pc, #228] ; (801439c <_vfiprintf_r+0x928>)
|
|
80142b8: 2610 movs r6, #16
|
|
80142ba: e9dd 210d ldrd r2, r1, [sp, #52] ; 0x34
|
|
80142be: 2c10 cmp r4, #16
|
|
80142c0: f102 0201 add.w r2, r2, #1
|
|
80142c4: 601d str r5, [r3, #0]
|
|
80142c6: dc1d bgt.n 8014304 <_vfiprintf_r+0x890>
|
|
80142c8: 605c str r4, [r3, #4]
|
|
80142ca: 2a07 cmp r2, #7
|
|
80142cc: 440c add r4, r1
|
|
80142ce: e9cd 240d strd r2, r4, [sp, #52] ; 0x34
|
|
80142d2: f77f aec9 ble.w 8014068 <_vfiprintf_r+0x5f4>
|
|
80142d6: aa0c add r2, sp, #48 ; 0x30
|
|
80142d8: 4639 mov r1, r7
|
|
80142da: 4648 mov r0, r9
|
|
80142dc: f7ff fb97 bl 8013a0e <__sprint_r>
|
|
80142e0: 2800 cmp r0, #0
|
|
80142e2: f43f aec1 beq.w 8014068 <_vfiprintf_r+0x5f4>
|
|
80142e6: 6e7b ldr r3, [r7, #100] ; 0x64
|
|
80142e8: 07d9 lsls r1, r3, #31
|
|
80142ea: d405 bmi.n 80142f8 <_vfiprintf_r+0x884>
|
|
80142ec: 89bb ldrh r3, [r7, #12]
|
|
80142ee: 059a lsls r2, r3, #22
|
|
80142f0: d402 bmi.n 80142f8 <_vfiprintf_r+0x884>
|
|
80142f2: 6db8 ldr r0, [r7, #88] ; 0x58
|
|
80142f4: f7fe fcf5 bl 8012ce2 <__retarget_lock_release_recursive>
|
|
80142f8: 89bb ldrh r3, [r7, #12]
|
|
80142fa: 065b lsls r3, r3, #25
|
|
80142fc: f57f abed bpl.w 8013ada <_vfiprintf_r+0x66>
|
|
8014300: f7ff bbe8 b.w 8013ad4 <_vfiprintf_r+0x60>
|
|
8014304: 3110 adds r1, #16
|
|
8014306: 2a07 cmp r2, #7
|
|
8014308: e9cd 210d strd r2, r1, [sp, #52] ; 0x34
|
|
801430c: 605e str r6, [r3, #4]
|
|
801430e: dc02 bgt.n 8014316 <_vfiprintf_r+0x8a2>
|
|
8014310: 3308 adds r3, #8
|
|
8014312: 3c10 subs r4, #16
|
|
8014314: e7d1 b.n 80142ba <_vfiprintf_r+0x846>
|
|
8014316: aa0c add r2, sp, #48 ; 0x30
|
|
8014318: 4639 mov r1, r7
|
|
801431a: 4648 mov r0, r9
|
|
801431c: f7ff fb77 bl 8013a0e <__sprint_r>
|
|
8014320: 2800 cmp r0, #0
|
|
8014322: d1e0 bne.n 80142e6 <_vfiprintf_r+0x872>
|
|
8014324: ab0f add r3, sp, #60 ; 0x3c
|
|
8014326: e7f4 b.n 8014312 <_vfiprintf_r+0x89e>
|
|
8014328: 9b0e ldr r3, [sp, #56] ; 0x38
|
|
801432a: b913 cbnz r3, 8014332 <_vfiprintf_r+0x8be>
|
|
801432c: 2300 movs r3, #0
|
|
801432e: 930d str r3, [sp, #52] ; 0x34
|
|
8014330: e7d9 b.n 80142e6 <_vfiprintf_r+0x872>
|
|
8014332: aa0c add r2, sp, #48 ; 0x30
|
|
8014334: 4639 mov r1, r7
|
|
8014336: 4648 mov r0, r9
|
|
8014338: f7ff fb69 bl 8013a0e <__sprint_r>
|
|
801433c: 2800 cmp r0, #0
|
|
801433e: d0f5 beq.n 801432c <_vfiprintf_r+0x8b8>
|
|
8014340: e7d1 b.n 80142e6 <_vfiprintf_r+0x872>
|
|
8014342: ea54 0205 orrs.w r2, r4, r5
|
|
8014346: f8cd a010 str.w sl, [sp, #16]
|
|
801434a: f43f ada3 beq.w 8013e94 <_vfiprintf_r+0x420>
|
|
801434e: 2b01 cmp r3, #1
|
|
8014350: f43f aeda beq.w 8014108 <_vfiprintf_r+0x694>
|
|
8014354: 2b02 cmp r3, #2
|
|
8014356: f10d 08e0 add.w r8, sp, #224 ; 0xe0
|
|
801435a: f43f af26 beq.w 80141aa <_vfiprintf_r+0x736>
|
|
801435e: f004 0307 and.w r3, r4, #7
|
|
8014362: 08e4 lsrs r4, r4, #3
|
|
8014364: ea44 7445 orr.w r4, r4, r5, lsl #29
|
|
8014368: 08ed lsrs r5, r5, #3
|
|
801436a: 3330 adds r3, #48 ; 0x30
|
|
801436c: ea54 0105 orrs.w r1, r4, r5
|
|
8014370: 4642 mov r2, r8
|
|
8014372: f808 3d01 strb.w r3, [r8, #-1]!
|
|
8014376: d1f2 bne.n 801435e <_vfiprintf_r+0x8ea>
|
|
8014378: 9904 ldr r1, [sp, #16]
|
|
801437a: 07c8 lsls r0, r1, #31
|
|
801437c: d506 bpl.n 801438c <_vfiprintf_r+0x918>
|
|
801437e: 2b30 cmp r3, #48 ; 0x30
|
|
8014380: d004 beq.n 801438c <_vfiprintf_r+0x918>
|
|
8014382: 2330 movs r3, #48 ; 0x30
|
|
8014384: f808 3c01 strb.w r3, [r8, #-1]
|
|
8014388: f1a2 0802 sub.w r8, r2, #2
|
|
801438c: ab38 add r3, sp, #224 ; 0xe0
|
|
801438e: eba3 0308 sub.w r3, r3, r8
|
|
8014392: 9d00 ldr r5, [sp, #0]
|
|
8014394: f8dd a010 ldr.w sl, [sp, #16]
|
|
8014398: 9300 str r3, [sp, #0]
|
|
801439a: e5b8 b.n 8013f0e <_vfiprintf_r+0x49a>
|
|
801439c: 08018284 .word 0x08018284
|
|
|
|
080143a0 <__sbprintf>:
|
|
80143a0: b570 push {r4, r5, r6, lr}
|
|
80143a2: 460c mov r4, r1
|
|
80143a4: 8989 ldrh r1, [r1, #12]
|
|
80143a6: f5ad 6d8e sub.w sp, sp, #1136 ; 0x470
|
|
80143aa: f021 0102 bic.w r1, r1, #2
|
|
80143ae: f8ad 1014 strh.w r1, [sp, #20]
|
|
80143b2: 6e61 ldr r1, [r4, #100] ; 0x64
|
|
80143b4: 911b str r1, [sp, #108] ; 0x6c
|
|
80143b6: 89e1 ldrh r1, [r4, #14]
|
|
80143b8: f8ad 1016 strh.w r1, [sp, #22]
|
|
80143bc: 69e1 ldr r1, [r4, #28]
|
|
80143be: 9109 str r1, [sp, #36] ; 0x24
|
|
80143c0: 6a61 ldr r1, [r4, #36] ; 0x24
|
|
80143c2: 910b str r1, [sp, #44] ; 0x2c
|
|
80143c4: a91c add r1, sp, #112 ; 0x70
|
|
80143c6: 9102 str r1, [sp, #8]
|
|
80143c8: 9106 str r1, [sp, #24]
|
|
80143ca: f44f 6180 mov.w r1, #1024 ; 0x400
|
|
80143ce: 4606 mov r6, r0
|
|
80143d0: 9104 str r1, [sp, #16]
|
|
80143d2: 9107 str r1, [sp, #28]
|
|
80143d4: a818 add r0, sp, #96 ; 0x60
|
|
80143d6: 2100 movs r1, #0
|
|
80143d8: e9cd 3200 strd r3, r2, [sp]
|
|
80143dc: 9108 str r1, [sp, #32]
|
|
80143de: f7fe fc7d bl 8012cdc <__retarget_lock_init_recursive>
|
|
80143e2: e9dd 3200 ldrd r3, r2, [sp]
|
|
80143e6: a902 add r1, sp, #8
|
|
80143e8: 4630 mov r0, r6
|
|
80143ea: f7ff fb43 bl 8013a74 <_vfiprintf_r>
|
|
80143ee: 1e05 subs r5, r0, #0
|
|
80143f0: db07 blt.n 8014402 <__sbprintf+0x62>
|
|
80143f2: a902 add r1, sp, #8
|
|
80143f4: 4630 mov r0, r6
|
|
80143f6: f7fe fa91 bl 801291c <_fflush_r>
|
|
80143fa: 2800 cmp r0, #0
|
|
80143fc: bf18 it ne
|
|
80143fe: f04f 35ff movne.w r5, #4294967295
|
|
8014402: f8bd 3014 ldrh.w r3, [sp, #20]
|
|
8014406: 9818 ldr r0, [sp, #96] ; 0x60
|
|
8014408: 065b lsls r3, r3, #25
|
|
801440a: bf42 ittt mi
|
|
801440c: 89a3 ldrhmi r3, [r4, #12]
|
|
801440e: f043 0340 orrmi.w r3, r3, #64 ; 0x40
|
|
8014412: 81a3 strhmi r3, [r4, #12]
|
|
8014414: f7fe fc63 bl 8012cde <__retarget_lock_close_recursive>
|
|
8014418: 4628 mov r0, r5
|
|
801441a: f50d 6d8e add.w sp, sp, #1136 ; 0x470
|
|
801441e: bd70 pop {r4, r5, r6, pc}
|
|
|
|
08014420 <_write_r>:
|
|
8014420: b538 push {r3, r4, r5, lr}
|
|
8014422: 4d07 ldr r5, [pc, #28] ; (8014440 <_write_r+0x20>)
|
|
8014424: 4604 mov r4, r0
|
|
8014426: 4608 mov r0, r1
|
|
8014428: 4611 mov r1, r2
|
|
801442a: 2200 movs r2, #0
|
|
801442c: 602a str r2, [r5, #0]
|
|
801442e: 461a mov r2, r3
|
|
8014430: f000 fdd0 bl 8014fd4 <_write>
|
|
8014434: 1c43 adds r3, r0, #1
|
|
8014436: d102 bne.n 801443e <_write_r+0x1e>
|
|
8014438: 682b ldr r3, [r5, #0]
|
|
801443a: b103 cbz r3, 801443e <_write_r+0x1e>
|
|
801443c: 6023 str r3, [r4, #0]
|
|
801443e: bd38 pop {r3, r4, r5, pc}
|
|
8014440: 20008dc8 .word 0x20008dc8
|
|
|
|
08014444 <__register_exitproc>:
|
|
8014444: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
|
|
8014448: f8df a078 ldr.w sl, [pc, #120] ; 80144c4 <__register_exitproc+0x80>
|
|
801444c: 4606 mov r6, r0
|
|
801444e: f8da 0000 ldr.w r0, [sl]
|
|
8014452: 4698 mov r8, r3
|
|
8014454: 460f mov r7, r1
|
|
8014456: 4691 mov r9, r2
|
|
8014458: f7fe fc42 bl 8012ce0 <__retarget_lock_acquire_recursive>
|
|
801445c: 4b18 ldr r3, [pc, #96] ; (80144c0 <__register_exitproc+0x7c>)
|
|
801445e: 681b ldr r3, [r3, #0]
|
|
8014460: f8d3 4148 ldr.w r4, [r3, #328] ; 0x148
|
|
8014464: b91c cbnz r4, 801446e <__register_exitproc+0x2a>
|
|
8014466: f503 74a6 add.w r4, r3, #332 ; 0x14c
|
|
801446a: f8c3 4148 str.w r4, [r3, #328] ; 0x148
|
|
801446e: 6865 ldr r5, [r4, #4]
|
|
8014470: f8da 0000 ldr.w r0, [sl]
|
|
8014474: 2d1f cmp r5, #31
|
|
8014476: dd05 ble.n 8014484 <__register_exitproc+0x40>
|
|
8014478: f7fe fc33 bl 8012ce2 <__retarget_lock_release_recursive>
|
|
801447c: f04f 30ff mov.w r0, #4294967295
|
|
8014480: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
|
|
8014484: b19e cbz r6, 80144ae <__register_exitproc+0x6a>
|
|
8014486: eb04 0185 add.w r1, r4, r5, lsl #2
|
|
801448a: 2201 movs r2, #1
|
|
801448c: f8c1 9088 str.w r9, [r1, #136] ; 0x88
|
|
8014490: f8d4 3188 ldr.w r3, [r4, #392] ; 0x188
|
|
8014494: 40aa lsls r2, r5
|
|
8014496: 4313 orrs r3, r2
|
|
8014498: f8c4 3188 str.w r3, [r4, #392] ; 0x188
|
|
801449c: 2e02 cmp r6, #2
|
|
801449e: f8c1 8108 str.w r8, [r1, #264] ; 0x108
|
|
80144a2: bf02 ittt eq
|
|
80144a4: f8d4 318c ldreq.w r3, [r4, #396] ; 0x18c
|
|
80144a8: 4313 orreq r3, r2
|
|
80144aa: f8c4 318c streq.w r3, [r4, #396] ; 0x18c
|
|
80144ae: 1c6b adds r3, r5, #1
|
|
80144b0: 3502 adds r5, #2
|
|
80144b2: 6063 str r3, [r4, #4]
|
|
80144b4: f844 7025 str.w r7, [r4, r5, lsl #2]
|
|
80144b8: f7fe fc13 bl 8012ce2 <__retarget_lock_release_recursive>
|
|
80144bc: 2000 movs r0, #0
|
|
80144be: e7df b.n 8014480 <__register_exitproc+0x3c>
|
|
80144c0: 08018054 .word 0x08018054
|
|
80144c4: 20000460 .word 0x20000460
|
|
|
|
080144c8 <__assert_func>:
|
|
80144c8: b51f push {r0, r1, r2, r3, r4, lr}
|
|
80144ca: 4614 mov r4, r2
|
|
80144cc: 461a mov r2, r3
|
|
80144ce: 4b09 ldr r3, [pc, #36] ; (80144f4 <__assert_func+0x2c>)
|
|
80144d0: 681b ldr r3, [r3, #0]
|
|
80144d2: 4605 mov r5, r0
|
|
80144d4: 68d8 ldr r0, [r3, #12]
|
|
80144d6: b14c cbz r4, 80144ec <__assert_func+0x24>
|
|
80144d8: 4b07 ldr r3, [pc, #28] ; (80144f8 <__assert_func+0x30>)
|
|
80144da: 9100 str r1, [sp, #0]
|
|
80144dc: e9cd 3401 strd r3, r4, [sp, #4]
|
|
80144e0: 4906 ldr r1, [pc, #24] ; (80144fc <__assert_func+0x34>)
|
|
80144e2: 462b mov r3, r5
|
|
80144e4: f000 f8ac bl 8014640 <fiprintf>
|
|
80144e8: f000 fce1 bl 8014eae <abort>
|
|
80144ec: 4b04 ldr r3, [pc, #16] ; (8014500 <__assert_func+0x38>)
|
|
80144ee: 461c mov r4, r3
|
|
80144f0: e7f3 b.n 80144da <__assert_func+0x12>
|
|
80144f2: bf00 nop
|
|
80144f4: 20000030 .word 0x20000030
|
|
80144f8: 080182a4 .word 0x080182a4
|
|
80144fc: 080182b1 .word 0x080182b1
|
|
8014500: 080182df .word 0x080182df
|
|
|
|
08014504 <_calloc_r>:
|
|
8014504: b538 push {r3, r4, r5, lr}
|
|
8014506: fba1 1502 umull r1, r5, r1, r2
|
|
801450a: b92d cbnz r5, 8014518 <_calloc_r+0x14>
|
|
801450c: f7fe fc56 bl 8012dbc <_malloc_r>
|
|
8014510: 4604 mov r4, r0
|
|
8014512: b938 cbnz r0, 8014524 <_calloc_r+0x20>
|
|
8014514: 4620 mov r0, r4
|
|
8014516: bd38 pop {r3, r4, r5, pc}
|
|
8014518: f7fe f96c bl 80127f4 <__errno>
|
|
801451c: 230c movs r3, #12
|
|
801451e: 6003 str r3, [r0, #0]
|
|
8014520: 2400 movs r4, #0
|
|
8014522: e7f7 b.n 8014514 <_calloc_r+0x10>
|
|
8014524: f850 2c04 ldr.w r2, [r0, #-4]
|
|
8014528: f022 0203 bic.w r2, r2, #3
|
|
801452c: 3a04 subs r2, #4
|
|
801452e: 2a24 cmp r2, #36 ; 0x24
|
|
8014530: d819 bhi.n 8014566 <_calloc_r+0x62>
|
|
8014532: 2a13 cmp r2, #19
|
|
8014534: d915 bls.n 8014562 <_calloc_r+0x5e>
|
|
8014536: 2a1b cmp r2, #27
|
|
8014538: e9c0 5500 strd r5, r5, [r0]
|
|
801453c: d806 bhi.n 801454c <_calloc_r+0x48>
|
|
801453e: f100 0308 add.w r3, r0, #8
|
|
8014542: 2200 movs r2, #0
|
|
8014544: e9c3 2200 strd r2, r2, [r3]
|
|
8014548: 609a str r2, [r3, #8]
|
|
801454a: e7e3 b.n 8014514 <_calloc_r+0x10>
|
|
801454c: 2a24 cmp r2, #36 ; 0x24
|
|
801454e: e9c0 5502 strd r5, r5, [r0, #8]
|
|
8014552: bf11 iteee ne
|
|
8014554: f100 0310 addne.w r3, r0, #16
|
|
8014558: 6105 streq r5, [r0, #16]
|
|
801455a: f100 0318 addeq.w r3, r0, #24
|
|
801455e: 6145 streq r5, [r0, #20]
|
|
8014560: e7ef b.n 8014542 <_calloc_r+0x3e>
|
|
8014562: 4603 mov r3, r0
|
|
8014564: e7ed b.n 8014542 <_calloc_r+0x3e>
|
|
8014566: 4629 mov r1, r5
|
|
8014568: f7fb ffbe bl 80104e8 <memset>
|
|
801456c: e7d2 b.n 8014514 <_calloc_r+0x10>
|
|
...
|
|
|
|
08014570 <_close_r>:
|
|
8014570: b538 push {r3, r4, r5, lr}
|
|
8014572: 4d06 ldr r5, [pc, #24] ; (801458c <_close_r+0x1c>)
|
|
8014574: 2300 movs r3, #0
|
|
8014576: 4604 mov r4, r0
|
|
8014578: 4608 mov r0, r1
|
|
801457a: 602b str r3, [r5, #0]
|
|
801457c: f000 fce4 bl 8014f48 <_close>
|
|
8014580: 1c43 adds r3, r0, #1
|
|
8014582: d102 bne.n 801458a <_close_r+0x1a>
|
|
8014584: 682b ldr r3, [r5, #0]
|
|
8014586: b103 cbz r3, 801458a <_close_r+0x1a>
|
|
8014588: 6023 str r3, [r4, #0]
|
|
801458a: bd38 pop {r3, r4, r5, pc}
|
|
801458c: 20008dc8 .word 0x20008dc8
|
|
|
|
08014590 <_fclose_r>:
|
|
8014590: b570 push {r4, r5, r6, lr}
|
|
8014592: 4606 mov r6, r0
|
|
8014594: 460c mov r4, r1
|
|
8014596: b911 cbnz r1, 801459e <_fclose_r+0xe>
|
|
8014598: 2500 movs r5, #0
|
|
801459a: 4628 mov r0, r5
|
|
801459c: bd70 pop {r4, r5, r6, pc}
|
|
801459e: b118 cbz r0, 80145a8 <_fclose_r+0x18>
|
|
80145a0: 6b83 ldr r3, [r0, #56] ; 0x38
|
|
80145a2: b90b cbnz r3, 80145a8 <_fclose_r+0x18>
|
|
80145a4: f7fe fa26 bl 80129f4 <__sinit>
|
|
80145a8: 6e63 ldr r3, [r4, #100] ; 0x64
|
|
80145aa: 07d8 lsls r0, r3, #31
|
|
80145ac: d405 bmi.n 80145ba <_fclose_r+0x2a>
|
|
80145ae: 89a3 ldrh r3, [r4, #12]
|
|
80145b0: 0599 lsls r1, r3, #22
|
|
80145b2: d402 bmi.n 80145ba <_fclose_r+0x2a>
|
|
80145b4: 6da0 ldr r0, [r4, #88] ; 0x58
|
|
80145b6: f7fe fb93 bl 8012ce0 <__retarget_lock_acquire_recursive>
|
|
80145ba: f9b4 300c ldrsh.w r3, [r4, #12]
|
|
80145be: b93b cbnz r3, 80145d0 <_fclose_r+0x40>
|
|
80145c0: 6e65 ldr r5, [r4, #100] ; 0x64
|
|
80145c2: f015 0501 ands.w r5, r5, #1
|
|
80145c6: d1e7 bne.n 8014598 <_fclose_r+0x8>
|
|
80145c8: 6da0 ldr r0, [r4, #88] ; 0x58
|
|
80145ca: f7fe fb8a bl 8012ce2 <__retarget_lock_release_recursive>
|
|
80145ce: e7e4 b.n 801459a <_fclose_r+0xa>
|
|
80145d0: 4621 mov r1, r4
|
|
80145d2: 4630 mov r0, r6
|
|
80145d4: f7fe f914 bl 8012800 <__sflush_r>
|
|
80145d8: 6ae3 ldr r3, [r4, #44] ; 0x2c
|
|
80145da: 4605 mov r5, r0
|
|
80145dc: b133 cbz r3, 80145ec <_fclose_r+0x5c>
|
|
80145de: 69e1 ldr r1, [r4, #28]
|
|
80145e0: 4630 mov r0, r6
|
|
80145e2: 4798 blx r3
|
|
80145e4: 2800 cmp r0, #0
|
|
80145e6: bfb8 it lt
|
|
80145e8: f04f 35ff movlt.w r5, #4294967295
|
|
80145ec: 89a3 ldrh r3, [r4, #12]
|
|
80145ee: 061a lsls r2, r3, #24
|
|
80145f0: d503 bpl.n 80145fa <_fclose_r+0x6a>
|
|
80145f2: 6921 ldr r1, [r4, #16]
|
|
80145f4: 4630 mov r0, r6
|
|
80145f6: f7fe fa8d bl 8012b14 <_free_r>
|
|
80145fa: 6b21 ldr r1, [r4, #48] ; 0x30
|
|
80145fc: b141 cbz r1, 8014610 <_fclose_r+0x80>
|
|
80145fe: f104 0340 add.w r3, r4, #64 ; 0x40
|
|
8014602: 4299 cmp r1, r3
|
|
8014604: d002 beq.n 801460c <_fclose_r+0x7c>
|
|
8014606: 4630 mov r0, r6
|
|
8014608: f7fe fa84 bl 8012b14 <_free_r>
|
|
801460c: 2300 movs r3, #0
|
|
801460e: 6323 str r3, [r4, #48] ; 0x30
|
|
8014610: 6c61 ldr r1, [r4, #68] ; 0x44
|
|
8014612: b121 cbz r1, 801461e <_fclose_r+0x8e>
|
|
8014614: 4630 mov r0, r6
|
|
8014616: f7fe fa7d bl 8012b14 <_free_r>
|
|
801461a: 2300 movs r3, #0
|
|
801461c: 6463 str r3, [r4, #68] ; 0x44
|
|
801461e: f7fe f9d1 bl 80129c4 <__sfp_lock_acquire>
|
|
8014622: 2300 movs r3, #0
|
|
8014624: 81a3 strh r3, [r4, #12]
|
|
8014626: 6e63 ldr r3, [r4, #100] ; 0x64
|
|
8014628: 07db lsls r3, r3, #31
|
|
801462a: d402 bmi.n 8014632 <_fclose_r+0xa2>
|
|
801462c: 6da0 ldr r0, [r4, #88] ; 0x58
|
|
801462e: f7fe fb58 bl 8012ce2 <__retarget_lock_release_recursive>
|
|
8014632: 6da0 ldr r0, [r4, #88] ; 0x58
|
|
8014634: f7fe fb53 bl 8012cde <__retarget_lock_close_recursive>
|
|
8014638: f7fe f9ca bl 80129d0 <__sfp_lock_release>
|
|
801463c: e7ad b.n 801459a <_fclose_r+0xa>
|
|
...
|
|
|
|
08014640 <fiprintf>:
|
|
8014640: b40e push {r1, r2, r3}
|
|
8014642: b503 push {r0, r1, lr}
|
|
8014644: 4601 mov r1, r0
|
|
8014646: ab03 add r3, sp, #12
|
|
8014648: 4805 ldr r0, [pc, #20] ; (8014660 <fiprintf+0x20>)
|
|
801464a: f853 2b04 ldr.w r2, [r3], #4
|
|
801464e: 6800 ldr r0, [r0, #0]
|
|
8014650: 9301 str r3, [sp, #4]
|
|
8014652: f7ff fa0f bl 8013a74 <_vfiprintf_r>
|
|
8014656: b002 add sp, #8
|
|
8014658: f85d eb04 ldr.w lr, [sp], #4
|
|
801465c: b003 add sp, #12
|
|
801465e: 4770 bx lr
|
|
8014660: 20000030 .word 0x20000030
|
|
|
|
08014664 <__fputwc>:
|
|
8014664: e92d 43f7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, lr}
|
|
8014668: 4680 mov r8, r0
|
|
801466a: 460e mov r6, r1
|
|
801466c: 4615 mov r5, r2
|
|
801466e: f000 f9d1 bl 8014a14 <__locale_mb_cur_max>
|
|
8014672: 2801 cmp r0, #1
|
|
8014674: d11c bne.n 80146b0 <__fputwc+0x4c>
|
|
8014676: 1e73 subs r3, r6, #1
|
|
8014678: 2bfe cmp r3, #254 ; 0xfe
|
|
801467a: d819 bhi.n 80146b0 <__fputwc+0x4c>
|
|
801467c: f88d 6004 strb.w r6, [sp, #4]
|
|
8014680: 4604 mov r4, r0
|
|
8014682: 2700 movs r7, #0
|
|
8014684: f10d 0904 add.w r9, sp, #4
|
|
8014688: 42a7 cmp r7, r4
|
|
801468a: d020 beq.n 80146ce <__fputwc+0x6a>
|
|
801468c: 68ab ldr r3, [r5, #8]
|
|
801468e: f817 1009 ldrb.w r1, [r7, r9]
|
|
8014692: 3b01 subs r3, #1
|
|
8014694: 2b00 cmp r3, #0
|
|
8014696: 60ab str r3, [r5, #8]
|
|
8014698: da04 bge.n 80146a4 <__fputwc+0x40>
|
|
801469a: 69aa ldr r2, [r5, #24]
|
|
801469c: 4293 cmp r3, r2
|
|
801469e: db1a blt.n 80146d6 <__fputwc+0x72>
|
|
80146a0: 290a cmp r1, #10
|
|
80146a2: d018 beq.n 80146d6 <__fputwc+0x72>
|
|
80146a4: 682b ldr r3, [r5, #0]
|
|
80146a6: 1c5a adds r2, r3, #1
|
|
80146a8: 602a str r2, [r5, #0]
|
|
80146aa: 7019 strb r1, [r3, #0]
|
|
80146ac: 3701 adds r7, #1
|
|
80146ae: e7eb b.n 8014688 <__fputwc+0x24>
|
|
80146b0: a901 add r1, sp, #4
|
|
80146b2: f105 035c add.w r3, r5, #92 ; 0x5c
|
|
80146b6: 4632 mov r2, r6
|
|
80146b8: 4640 mov r0, r8
|
|
80146ba: f000 fbd5 bl 8014e68 <_wcrtomb_r>
|
|
80146be: 1c41 adds r1, r0, #1
|
|
80146c0: 4604 mov r4, r0
|
|
80146c2: d1de bne.n 8014682 <__fputwc+0x1e>
|
|
80146c4: 89ab ldrh r3, [r5, #12]
|
|
80146c6: f043 0340 orr.w r3, r3, #64 ; 0x40
|
|
80146ca: 81ab strh r3, [r5, #12]
|
|
80146cc: 4606 mov r6, r0
|
|
80146ce: 4630 mov r0, r6
|
|
80146d0: b003 add sp, #12
|
|
80146d2: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
|
|
80146d6: 462a mov r2, r5
|
|
80146d8: 4640 mov r0, r8
|
|
80146da: f000 fb7b bl 8014dd4 <__swbuf_r>
|
|
80146de: 1c42 adds r2, r0, #1
|
|
80146e0: d1e4 bne.n 80146ac <__fputwc+0x48>
|
|
80146e2: 4606 mov r6, r0
|
|
80146e4: e7f3 b.n 80146ce <__fputwc+0x6a>
|
|
|
|
080146e6 <_fputwc_r>:
|
|
80146e6: 6e53 ldr r3, [r2, #100] ; 0x64
|
|
80146e8: b537 push {r0, r1, r2, r4, r5, lr}
|
|
80146ea: 4614 mov r4, r2
|
|
80146ec: 07da lsls r2, r3, #31
|
|
80146ee: 4605 mov r5, r0
|
|
80146f0: d407 bmi.n 8014702 <_fputwc_r+0x1c>
|
|
80146f2: 89a3 ldrh r3, [r4, #12]
|
|
80146f4: 059b lsls r3, r3, #22
|
|
80146f6: d404 bmi.n 8014702 <_fputwc_r+0x1c>
|
|
80146f8: 6da0 ldr r0, [r4, #88] ; 0x58
|
|
80146fa: 9101 str r1, [sp, #4]
|
|
80146fc: f7fe faf0 bl 8012ce0 <__retarget_lock_acquire_recursive>
|
|
8014700: 9901 ldr r1, [sp, #4]
|
|
8014702: f9b4 300c ldrsh.w r3, [r4, #12]
|
|
8014706: 0498 lsls r0, r3, #18
|
|
8014708: d406 bmi.n 8014718 <_fputwc_r+0x32>
|
|
801470a: f443 5300 orr.w r3, r3, #8192 ; 0x2000
|
|
801470e: 81a3 strh r3, [r4, #12]
|
|
8014710: 6e63 ldr r3, [r4, #100] ; 0x64
|
|
8014712: f443 5300 orr.w r3, r3, #8192 ; 0x2000
|
|
8014716: 6663 str r3, [r4, #100] ; 0x64
|
|
8014718: 4622 mov r2, r4
|
|
801471a: 4628 mov r0, r5
|
|
801471c: f7ff ffa2 bl 8014664 <__fputwc>
|
|
8014720: 6e63 ldr r3, [r4, #100] ; 0x64
|
|
8014722: 07da lsls r2, r3, #31
|
|
8014724: 4605 mov r5, r0
|
|
8014726: d405 bmi.n 8014734 <_fputwc_r+0x4e>
|
|
8014728: 89a3 ldrh r3, [r4, #12]
|
|
801472a: 059b lsls r3, r3, #22
|
|
801472c: d402 bmi.n 8014734 <_fputwc_r+0x4e>
|
|
801472e: 6da0 ldr r0, [r4, #88] ; 0x58
|
|
8014730: f7fe fad7 bl 8012ce2 <__retarget_lock_release_recursive>
|
|
8014734: 4628 mov r0, r5
|
|
8014736: b003 add sp, #12
|
|
8014738: bd30 pop {r4, r5, pc}
|
|
...
|
|
|
|
0801473c <_fstat_r>:
|
|
801473c: b538 push {r3, r4, r5, lr}
|
|
801473e: 4d07 ldr r5, [pc, #28] ; (801475c <_fstat_r+0x20>)
|
|
8014740: 2300 movs r3, #0
|
|
8014742: 4604 mov r4, r0
|
|
8014744: 4608 mov r0, r1
|
|
8014746: 4611 mov r1, r2
|
|
8014748: 602b str r3, [r5, #0]
|
|
801474a: f000 fc05 bl 8014f58 <_fstat>
|
|
801474e: 1c43 adds r3, r0, #1
|
|
8014750: d102 bne.n 8014758 <_fstat_r+0x1c>
|
|
8014752: 682b ldr r3, [r5, #0]
|
|
8014754: b103 cbz r3, 8014758 <_fstat_r+0x1c>
|
|
8014756: 6023 str r3, [r4, #0]
|
|
8014758: bd38 pop {r3, r4, r5, pc}
|
|
801475a: bf00 nop
|
|
801475c: 20008dc8 .word 0x20008dc8
|
|
|
|
08014760 <__sfvwrite_r>:
|
|
8014760: 6893 ldr r3, [r2, #8]
|
|
8014762: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
|
|
8014766: 4606 mov r6, r0
|
|
8014768: 460c mov r4, r1
|
|
801476a: 4690 mov r8, r2
|
|
801476c: b91b cbnz r3, 8014776 <__sfvwrite_r+0x16>
|
|
801476e: 2000 movs r0, #0
|
|
8014770: b003 add sp, #12
|
|
8014772: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
|
|
8014776: 898b ldrh r3, [r1, #12]
|
|
8014778: 0718 lsls r0, r3, #28
|
|
801477a: d550 bpl.n 801481e <__sfvwrite_r+0xbe>
|
|
801477c: 690b ldr r3, [r1, #16]
|
|
801477e: 2b00 cmp r3, #0
|
|
8014780: d04d beq.n 801481e <__sfvwrite_r+0xbe>
|
|
8014782: 89a3 ldrh r3, [r4, #12]
|
|
8014784: f8d8 7000 ldr.w r7, [r8]
|
|
8014788: f013 0902 ands.w r9, r3, #2
|
|
801478c: d16c bne.n 8014868 <__sfvwrite_r+0x108>
|
|
801478e: f013 0301 ands.w r3, r3, #1
|
|
8014792: f000 809c beq.w 80148ce <__sfvwrite_r+0x16e>
|
|
8014796: 4648 mov r0, r9
|
|
8014798: 46ca mov sl, r9
|
|
801479a: 46cb mov fp, r9
|
|
801479c: f1bb 0f00 cmp.w fp, #0
|
|
80147a0: f000 8103 beq.w 80149aa <__sfvwrite_r+0x24a>
|
|
80147a4: b950 cbnz r0, 80147bc <__sfvwrite_r+0x5c>
|
|
80147a6: 465a mov r2, fp
|
|
80147a8: 210a movs r1, #10
|
|
80147aa: 4650 mov r0, sl
|
|
80147ac: f7eb fd28 bl 8000200 <memchr>
|
|
80147b0: 2800 cmp r0, #0
|
|
80147b2: f000 80ff beq.w 80149b4 <__sfvwrite_r+0x254>
|
|
80147b6: 3001 adds r0, #1
|
|
80147b8: eba0 090a sub.w r9, r0, sl
|
|
80147bc: 6820 ldr r0, [r4, #0]
|
|
80147be: 6921 ldr r1, [r4, #16]
|
|
80147c0: 6963 ldr r3, [r4, #20]
|
|
80147c2: 45d9 cmp r9, fp
|
|
80147c4: 464a mov r2, r9
|
|
80147c6: bf28 it cs
|
|
80147c8: 465a movcs r2, fp
|
|
80147ca: 4288 cmp r0, r1
|
|
80147cc: f240 80f5 bls.w 80149ba <__sfvwrite_r+0x25a>
|
|
80147d0: 68a5 ldr r5, [r4, #8]
|
|
80147d2: 441d add r5, r3
|
|
80147d4: 42aa cmp r2, r5
|
|
80147d6: f340 80f0 ble.w 80149ba <__sfvwrite_r+0x25a>
|
|
80147da: 4651 mov r1, sl
|
|
80147dc: 462a mov r2, r5
|
|
80147de: f7fb fe69 bl 80104b4 <memmove>
|
|
80147e2: 6823 ldr r3, [r4, #0]
|
|
80147e4: 442b add r3, r5
|
|
80147e6: 6023 str r3, [r4, #0]
|
|
80147e8: 4621 mov r1, r4
|
|
80147ea: 4630 mov r0, r6
|
|
80147ec: f7fe f896 bl 801291c <_fflush_r>
|
|
80147f0: 2800 cmp r0, #0
|
|
80147f2: d167 bne.n 80148c4 <__sfvwrite_r+0x164>
|
|
80147f4: ebb9 0905 subs.w r9, r9, r5
|
|
80147f8: f040 80f7 bne.w 80149ea <__sfvwrite_r+0x28a>
|
|
80147fc: 4621 mov r1, r4
|
|
80147fe: 4630 mov r0, r6
|
|
8014800: f7fe f88c bl 801291c <_fflush_r>
|
|
8014804: 2800 cmp r0, #0
|
|
8014806: d15d bne.n 80148c4 <__sfvwrite_r+0x164>
|
|
8014808: f8d8 2008 ldr.w r2, [r8, #8]
|
|
801480c: 44aa add sl, r5
|
|
801480e: ebab 0b05 sub.w fp, fp, r5
|
|
8014812: 1b55 subs r5, r2, r5
|
|
8014814: f8c8 5008 str.w r5, [r8, #8]
|
|
8014818: 2d00 cmp r5, #0
|
|
801481a: d1bf bne.n 801479c <__sfvwrite_r+0x3c>
|
|
801481c: e7a7 b.n 801476e <__sfvwrite_r+0xe>
|
|
801481e: 4621 mov r1, r4
|
|
8014820: 4630 mov r0, r6
|
|
8014822: f7fd f91b bl 8011a5c <__swsetup_r>
|
|
8014826: 2800 cmp r0, #0
|
|
8014828: d0ab beq.n 8014782 <__sfvwrite_r+0x22>
|
|
801482a: f04f 30ff mov.w r0, #4294967295
|
|
801482e: e79f b.n 8014770 <__sfvwrite_r+0x10>
|
|
8014830: e9d7 b900 ldrd fp, r9, [r7]
|
|
8014834: 3708 adds r7, #8
|
|
8014836: f1b9 0f00 cmp.w r9, #0
|
|
801483a: d0f9 beq.n 8014830 <__sfvwrite_r+0xd0>
|
|
801483c: 45d1 cmp r9, sl
|
|
801483e: 464b mov r3, r9
|
|
8014840: 69e1 ldr r1, [r4, #28]
|
|
8014842: 6a65 ldr r5, [r4, #36] ; 0x24
|
|
8014844: bf28 it cs
|
|
8014846: 4653 movcs r3, sl
|
|
8014848: 465a mov r2, fp
|
|
801484a: 4630 mov r0, r6
|
|
801484c: 47a8 blx r5
|
|
801484e: 2800 cmp r0, #0
|
|
8014850: dd38 ble.n 80148c4 <__sfvwrite_r+0x164>
|
|
8014852: f8d8 3008 ldr.w r3, [r8, #8]
|
|
8014856: 4483 add fp, r0
|
|
8014858: eba9 0900 sub.w r9, r9, r0
|
|
801485c: 1a18 subs r0, r3, r0
|
|
801485e: f8c8 0008 str.w r0, [r8, #8]
|
|
8014862: 2800 cmp r0, #0
|
|
8014864: d1e7 bne.n 8014836 <__sfvwrite_r+0xd6>
|
|
8014866: e782 b.n 801476e <__sfvwrite_r+0xe>
|
|
8014868: f04f 0b00 mov.w fp, #0
|
|
801486c: f8df a180 ldr.w sl, [pc, #384] ; 80149f0 <__sfvwrite_r+0x290>
|
|
8014870: 46d9 mov r9, fp
|
|
8014872: e7e0 b.n 8014836 <__sfvwrite_r+0xd6>
|
|
8014874: e9d7 9a00 ldrd r9, sl, [r7]
|
|
8014878: 3708 adds r7, #8
|
|
801487a: f1ba 0f00 cmp.w sl, #0
|
|
801487e: d0f9 beq.n 8014874 <__sfvwrite_r+0x114>
|
|
8014880: 89a3 ldrh r3, [r4, #12]
|
|
8014882: 6820 ldr r0, [r4, #0]
|
|
8014884: 68a2 ldr r2, [r4, #8]
|
|
8014886: 0599 lsls r1, r3, #22
|
|
8014888: d563 bpl.n 8014952 <__sfvwrite_r+0x1f2>
|
|
801488a: 4552 cmp r2, sl
|
|
801488c: d836 bhi.n 80148fc <__sfvwrite_r+0x19c>
|
|
801488e: f413 6f90 tst.w r3, #1152 ; 0x480
|
|
8014892: d033 beq.n 80148fc <__sfvwrite_r+0x19c>
|
|
8014894: 6921 ldr r1, [r4, #16]
|
|
8014896: 6965 ldr r5, [r4, #20]
|
|
8014898: eba0 0b01 sub.w fp, r0, r1
|
|
801489c: eb05 0545 add.w r5, r5, r5, lsl #1
|
|
80148a0: eb05 75d5 add.w r5, r5, r5, lsr #31
|
|
80148a4: f10b 0201 add.w r2, fp, #1
|
|
80148a8: 106d asrs r5, r5, #1
|
|
80148aa: 4452 add r2, sl
|
|
80148ac: 4295 cmp r5, r2
|
|
80148ae: bf38 it cc
|
|
80148b0: 4615 movcc r5, r2
|
|
80148b2: 055b lsls r3, r3, #21
|
|
80148b4: d53d bpl.n 8014932 <__sfvwrite_r+0x1d2>
|
|
80148b6: 4629 mov r1, r5
|
|
80148b8: 4630 mov r0, r6
|
|
80148ba: f7fe fa7f bl 8012dbc <_malloc_r>
|
|
80148be: b948 cbnz r0, 80148d4 <__sfvwrite_r+0x174>
|
|
80148c0: 230c movs r3, #12
|
|
80148c2: 6033 str r3, [r6, #0]
|
|
80148c4: 89a3 ldrh r3, [r4, #12]
|
|
80148c6: f043 0340 orr.w r3, r3, #64 ; 0x40
|
|
80148ca: 81a3 strh r3, [r4, #12]
|
|
80148cc: e7ad b.n 801482a <__sfvwrite_r+0xca>
|
|
80148ce: 4699 mov r9, r3
|
|
80148d0: 469a mov sl, r3
|
|
80148d2: e7d2 b.n 801487a <__sfvwrite_r+0x11a>
|
|
80148d4: 465a mov r2, fp
|
|
80148d6: 6921 ldr r1, [r4, #16]
|
|
80148d8: 9001 str r0, [sp, #4]
|
|
80148da: f7fb fddd bl 8010498 <memcpy>
|
|
80148de: 89a2 ldrh r2, [r4, #12]
|
|
80148e0: 9b01 ldr r3, [sp, #4]
|
|
80148e2: f422 6290 bic.w r2, r2, #1152 ; 0x480
|
|
80148e6: f042 0280 orr.w r2, r2, #128 ; 0x80
|
|
80148ea: 81a2 strh r2, [r4, #12]
|
|
80148ec: 6123 str r3, [r4, #16]
|
|
80148ee: 6165 str r5, [r4, #20]
|
|
80148f0: 445b add r3, fp
|
|
80148f2: eba5 050b sub.w r5, r5, fp
|
|
80148f6: 6023 str r3, [r4, #0]
|
|
80148f8: 4652 mov r2, sl
|
|
80148fa: 60a5 str r5, [r4, #8]
|
|
80148fc: 4552 cmp r2, sl
|
|
80148fe: bf28 it cs
|
|
8014900: 4652 movcs r2, sl
|
|
8014902: 6820 ldr r0, [r4, #0]
|
|
8014904: 9201 str r2, [sp, #4]
|
|
8014906: 4649 mov r1, r9
|
|
8014908: f7fb fdd4 bl 80104b4 <memmove>
|
|
801490c: 68a3 ldr r3, [r4, #8]
|
|
801490e: 9a01 ldr r2, [sp, #4]
|
|
8014910: 1a9b subs r3, r3, r2
|
|
8014912: 60a3 str r3, [r4, #8]
|
|
8014914: 6823 ldr r3, [r4, #0]
|
|
8014916: 441a add r2, r3
|
|
8014918: 4655 mov r5, sl
|
|
801491a: 6022 str r2, [r4, #0]
|
|
801491c: f8d8 0008 ldr.w r0, [r8, #8]
|
|
8014920: 44a9 add r9, r5
|
|
8014922: ebaa 0a05 sub.w sl, sl, r5
|
|
8014926: 1b45 subs r5, r0, r5
|
|
8014928: f8c8 5008 str.w r5, [r8, #8]
|
|
801492c: 2d00 cmp r5, #0
|
|
801492e: d1a4 bne.n 801487a <__sfvwrite_r+0x11a>
|
|
8014930: e71d b.n 801476e <__sfvwrite_r+0xe>
|
|
8014932: 462a mov r2, r5
|
|
8014934: 4630 mov r0, r6
|
|
8014936: f000 f8a9 bl 8014a8c <_realloc_r>
|
|
801493a: 4603 mov r3, r0
|
|
801493c: 2800 cmp r0, #0
|
|
801493e: d1d5 bne.n 80148ec <__sfvwrite_r+0x18c>
|
|
8014940: 6921 ldr r1, [r4, #16]
|
|
8014942: 4630 mov r0, r6
|
|
8014944: f7fe f8e6 bl 8012b14 <_free_r>
|
|
8014948: 89a3 ldrh r3, [r4, #12]
|
|
801494a: f023 0380 bic.w r3, r3, #128 ; 0x80
|
|
801494e: 81a3 strh r3, [r4, #12]
|
|
8014950: e7b6 b.n 80148c0 <__sfvwrite_r+0x160>
|
|
8014952: 6923 ldr r3, [r4, #16]
|
|
8014954: 4283 cmp r3, r0
|
|
8014956: d302 bcc.n 801495e <__sfvwrite_r+0x1fe>
|
|
8014958: 6961 ldr r1, [r4, #20]
|
|
801495a: 4551 cmp r1, sl
|
|
801495c: d915 bls.n 801498a <__sfvwrite_r+0x22a>
|
|
801495e: 4552 cmp r2, sl
|
|
8014960: bf28 it cs
|
|
8014962: 4652 movcs r2, sl
|
|
8014964: 4649 mov r1, r9
|
|
8014966: 4615 mov r5, r2
|
|
8014968: f7fb fda4 bl 80104b4 <memmove>
|
|
801496c: 68a3 ldr r3, [r4, #8]
|
|
801496e: 6822 ldr r2, [r4, #0]
|
|
8014970: 1b5b subs r3, r3, r5
|
|
8014972: 442a add r2, r5
|
|
8014974: 60a3 str r3, [r4, #8]
|
|
8014976: 6022 str r2, [r4, #0]
|
|
8014978: 2b00 cmp r3, #0
|
|
801497a: d1cf bne.n 801491c <__sfvwrite_r+0x1bc>
|
|
801497c: 4621 mov r1, r4
|
|
801497e: 4630 mov r0, r6
|
|
8014980: f7fd ffcc bl 801291c <_fflush_r>
|
|
8014984: 2800 cmp r0, #0
|
|
8014986: d0c9 beq.n 801491c <__sfvwrite_r+0x1bc>
|
|
8014988: e79c b.n 80148c4 <__sfvwrite_r+0x164>
|
|
801498a: f06f 4300 mvn.w r3, #2147483648 ; 0x80000000
|
|
801498e: 459a cmp sl, r3
|
|
8014990: bf38 it cc
|
|
8014992: 4653 movcc r3, sl
|
|
8014994: 6a65 ldr r5, [r4, #36] ; 0x24
|
|
8014996: fb93 f3f1 sdiv r3, r3, r1
|
|
801499a: 464a mov r2, r9
|
|
801499c: 434b muls r3, r1
|
|
801499e: 4630 mov r0, r6
|
|
80149a0: 69e1 ldr r1, [r4, #28]
|
|
80149a2: 47a8 blx r5
|
|
80149a4: 1e05 subs r5, r0, #0
|
|
80149a6: dcb9 bgt.n 801491c <__sfvwrite_r+0x1bc>
|
|
80149a8: e78c b.n 80148c4 <__sfvwrite_r+0x164>
|
|
80149aa: e9d7 ab00 ldrd sl, fp, [r7]
|
|
80149ae: 2000 movs r0, #0
|
|
80149b0: 3708 adds r7, #8
|
|
80149b2: e6f3 b.n 801479c <__sfvwrite_r+0x3c>
|
|
80149b4: f10b 0901 add.w r9, fp, #1
|
|
80149b8: e700 b.n 80147bc <__sfvwrite_r+0x5c>
|
|
80149ba: 4293 cmp r3, r2
|
|
80149bc: dc08 bgt.n 80149d0 <__sfvwrite_r+0x270>
|
|
80149be: 6a65 ldr r5, [r4, #36] ; 0x24
|
|
80149c0: 69e1 ldr r1, [r4, #28]
|
|
80149c2: 4652 mov r2, sl
|
|
80149c4: 4630 mov r0, r6
|
|
80149c6: 47a8 blx r5
|
|
80149c8: 1e05 subs r5, r0, #0
|
|
80149ca: f73f af13 bgt.w 80147f4 <__sfvwrite_r+0x94>
|
|
80149ce: e779 b.n 80148c4 <__sfvwrite_r+0x164>
|
|
80149d0: 4651 mov r1, sl
|
|
80149d2: 9201 str r2, [sp, #4]
|
|
80149d4: f7fb fd6e bl 80104b4 <memmove>
|
|
80149d8: 9a01 ldr r2, [sp, #4]
|
|
80149da: 68a3 ldr r3, [r4, #8]
|
|
80149dc: 1a9b subs r3, r3, r2
|
|
80149de: 60a3 str r3, [r4, #8]
|
|
80149e0: 6823 ldr r3, [r4, #0]
|
|
80149e2: 4413 add r3, r2
|
|
80149e4: 6023 str r3, [r4, #0]
|
|
80149e6: 4615 mov r5, r2
|
|
80149e8: e704 b.n 80147f4 <__sfvwrite_r+0x94>
|
|
80149ea: 2001 movs r0, #1
|
|
80149ec: e70c b.n 8014808 <__sfvwrite_r+0xa8>
|
|
80149ee: bf00 nop
|
|
80149f0: 7ffffc00 .word 0x7ffffc00
|
|
|
|
080149f4 <_isatty_r>:
|
|
80149f4: b538 push {r3, r4, r5, lr}
|
|
80149f6: 4d06 ldr r5, [pc, #24] ; (8014a10 <_isatty_r+0x1c>)
|
|
80149f8: 2300 movs r3, #0
|
|
80149fa: 4604 mov r4, r0
|
|
80149fc: 4608 mov r0, r1
|
|
80149fe: 602b str r3, [r5, #0]
|
|
8014a00: f000 faba bl 8014f78 <_isatty>
|
|
8014a04: 1c43 adds r3, r0, #1
|
|
8014a06: d102 bne.n 8014a0e <_isatty_r+0x1a>
|
|
8014a08: 682b ldr r3, [r5, #0]
|
|
8014a0a: b103 cbz r3, 8014a0e <_isatty_r+0x1a>
|
|
8014a0c: 6023 str r3, [r4, #0]
|
|
8014a0e: bd38 pop {r3, r4, r5, pc}
|
|
8014a10: 20008dc8 .word 0x20008dc8
|
|
|
|
08014a14 <__locale_mb_cur_max>:
|
|
8014a14: 4b01 ldr r3, [pc, #4] ; (8014a1c <__locale_mb_cur_max+0x8>)
|
|
8014a16: f893 0128 ldrb.w r0, [r3, #296] ; 0x128
|
|
8014a1a: 4770 bx lr
|
|
8014a1c: 20000874 .word 0x20000874
|
|
|
|
08014a20 <_lseek_r>:
|
|
8014a20: b538 push {r3, r4, r5, lr}
|
|
8014a22: 4d07 ldr r5, [pc, #28] ; (8014a40 <_lseek_r+0x20>)
|
|
8014a24: 4604 mov r4, r0
|
|
8014a26: 4608 mov r0, r1
|
|
8014a28: 4611 mov r1, r2
|
|
8014a2a: 2200 movs r2, #0
|
|
8014a2c: 602a str r2, [r5, #0]
|
|
8014a2e: 461a mov r2, r3
|
|
8014a30: f000 fab2 bl 8014f98 <_lseek>
|
|
8014a34: 1c43 adds r3, r0, #1
|
|
8014a36: d102 bne.n 8014a3e <_lseek_r+0x1e>
|
|
8014a38: 682b ldr r3, [r5, #0]
|
|
8014a3a: b103 cbz r3, 8014a3e <_lseek_r+0x1e>
|
|
8014a3c: 6023 str r3, [r4, #0]
|
|
8014a3e: bd38 pop {r3, r4, r5, pc}
|
|
8014a40: 20008dc8 .word 0x20008dc8
|
|
|
|
08014a44 <__ascii_mbtowc>:
|
|
8014a44: b082 sub sp, #8
|
|
8014a46: b901 cbnz r1, 8014a4a <__ascii_mbtowc+0x6>
|
|
8014a48: a901 add r1, sp, #4
|
|
8014a4a: b142 cbz r2, 8014a5e <__ascii_mbtowc+0x1a>
|
|
8014a4c: b14b cbz r3, 8014a62 <__ascii_mbtowc+0x1e>
|
|
8014a4e: 7813 ldrb r3, [r2, #0]
|
|
8014a50: 600b str r3, [r1, #0]
|
|
8014a52: 7812 ldrb r2, [r2, #0]
|
|
8014a54: 1e10 subs r0, r2, #0
|
|
8014a56: bf18 it ne
|
|
8014a58: 2001 movne r0, #1
|
|
8014a5a: b002 add sp, #8
|
|
8014a5c: 4770 bx lr
|
|
8014a5e: 4610 mov r0, r2
|
|
8014a60: e7fb b.n 8014a5a <__ascii_mbtowc+0x16>
|
|
8014a62: f06f 0001 mvn.w r0, #1
|
|
8014a66: e7f8 b.n 8014a5a <__ascii_mbtowc+0x16>
|
|
|
|
08014a68 <_read_r>:
|
|
8014a68: b538 push {r3, r4, r5, lr}
|
|
8014a6a: 4d07 ldr r5, [pc, #28] ; (8014a88 <_read_r+0x20>)
|
|
8014a6c: 4604 mov r4, r0
|
|
8014a6e: 4608 mov r0, r1
|
|
8014a70: 4611 mov r1, r2
|
|
8014a72: 2200 movs r2, #0
|
|
8014a74: 602a str r2, [r5, #0]
|
|
8014a76: 461a mov r2, r3
|
|
8014a78: f000 fa96 bl 8014fa8 <_read>
|
|
8014a7c: 1c43 adds r3, r0, #1
|
|
8014a7e: d102 bne.n 8014a86 <_read_r+0x1e>
|
|
8014a80: 682b ldr r3, [r5, #0]
|
|
8014a82: b103 cbz r3, 8014a86 <_read_r+0x1e>
|
|
8014a84: 6023 str r3, [r4, #0]
|
|
8014a86: bd38 pop {r3, r4, r5, pc}
|
|
8014a88: 20008dc8 .word 0x20008dc8
|
|
|
|
08014a8c <_realloc_r>:
|
|
8014a8c: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
|
|
8014a90: 4681 mov r9, r0
|
|
8014a92: 460c mov r4, r1
|
|
8014a94: b929 cbnz r1, 8014aa2 <_realloc_r+0x16>
|
|
8014a96: 4611 mov r1, r2
|
|
8014a98: b003 add sp, #12
|
|
8014a9a: e8bd 4ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
|
|
8014a9e: f7fe b98d b.w 8012dbc <_malloc_r>
|
|
8014aa2: 9201 str r2, [sp, #4]
|
|
8014aa4: f7fe fbc6 bl 8013234 <__malloc_lock>
|
|
8014aa8: 9a01 ldr r2, [sp, #4]
|
|
8014aaa: f102 080b add.w r8, r2, #11
|
|
8014aae: f1b8 0f16 cmp.w r8, #22
|
|
8014ab2: d90b bls.n 8014acc <_realloc_r+0x40>
|
|
8014ab4: f038 0807 bics.w r8, r8, #7
|
|
8014ab8: d50a bpl.n 8014ad0 <_realloc_r+0x44>
|
|
8014aba: 230c movs r3, #12
|
|
8014abc: f8c9 3000 str.w r3, [r9]
|
|
8014ac0: f04f 0b00 mov.w fp, #0
|
|
8014ac4: 4658 mov r0, fp
|
|
8014ac6: b003 add sp, #12
|
|
8014ac8: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
|
|
8014acc: f04f 0810 mov.w r8, #16
|
|
8014ad0: 4590 cmp r8, r2
|
|
8014ad2: d3f2 bcc.n 8014aba <_realloc_r+0x2e>
|
|
8014ad4: f854 5c04 ldr.w r5, [r4, #-4]
|
|
8014ad8: f025 0603 bic.w r6, r5, #3
|
|
8014adc: 45b0 cmp r8, r6
|
|
8014ade: f1a4 0a08 sub.w sl, r4, #8
|
|
8014ae2: f340 816e ble.w 8014dc2 <_realloc_r+0x336>
|
|
8014ae6: 499b ldr r1, [pc, #620] ; (8014d54 <_realloc_r+0x2c8>)
|
|
8014ae8: f8d1 c008 ldr.w ip, [r1, #8]
|
|
8014aec: eb0a 0306 add.w r3, sl, r6
|
|
8014af0: 459c cmp ip, r3
|
|
8014af2: 6859 ldr r1, [r3, #4]
|
|
8014af4: d005 beq.n 8014b02 <_realloc_r+0x76>
|
|
8014af6: f021 0001 bic.w r0, r1, #1
|
|
8014afa: 4418 add r0, r3
|
|
8014afc: 6840 ldr r0, [r0, #4]
|
|
8014afe: 07c7 lsls r7, r0, #31
|
|
8014b00: d427 bmi.n 8014b52 <_realloc_r+0xc6>
|
|
8014b02: f021 0103 bic.w r1, r1, #3
|
|
8014b06: 459c cmp ip, r3
|
|
8014b08: eb06 0701 add.w r7, r6, r1
|
|
8014b0c: d119 bne.n 8014b42 <_realloc_r+0xb6>
|
|
8014b0e: f108 0010 add.w r0, r8, #16
|
|
8014b12: 42b8 cmp r0, r7
|
|
8014b14: dc1f bgt.n 8014b56 <_realloc_r+0xca>
|
|
8014b16: eb0a 0308 add.w r3, sl, r8
|
|
8014b1a: 4a8e ldr r2, [pc, #568] ; (8014d54 <_realloc_r+0x2c8>)
|
|
8014b1c: eba7 0708 sub.w r7, r7, r8
|
|
8014b20: f047 0701 orr.w r7, r7, #1
|
|
8014b24: 6093 str r3, [r2, #8]
|
|
8014b26: 605f str r7, [r3, #4]
|
|
8014b28: f854 3c04 ldr.w r3, [r4, #-4]
|
|
8014b2c: f003 0301 and.w r3, r3, #1
|
|
8014b30: ea43 0308 orr.w r3, r3, r8
|
|
8014b34: f844 3c04 str.w r3, [r4, #-4]
|
|
8014b38: 4648 mov r0, r9
|
|
8014b3a: f7fe fb81 bl 8013240 <__malloc_unlock>
|
|
8014b3e: 46a3 mov fp, r4
|
|
8014b40: e7c0 b.n 8014ac4 <_realloc_r+0x38>
|
|
8014b42: 45b8 cmp r8, r7
|
|
8014b44: dc07 bgt.n 8014b56 <_realloc_r+0xca>
|
|
8014b46: e9d3 3202 ldrd r3, r2, [r3, #8]
|
|
8014b4a: 60da str r2, [r3, #12]
|
|
8014b4c: 6093 str r3, [r2, #8]
|
|
8014b4e: 4655 mov r5, sl
|
|
8014b50: e07f b.n 8014c52 <_realloc_r+0x1c6>
|
|
8014b52: 2100 movs r1, #0
|
|
8014b54: 460b mov r3, r1
|
|
8014b56: 07e8 lsls r0, r5, #31
|
|
8014b58: f100 80e5 bmi.w 8014d26 <_realloc_r+0x29a>
|
|
8014b5c: f854 5c08 ldr.w r5, [r4, #-8]
|
|
8014b60: ebaa 0505 sub.w r5, sl, r5
|
|
8014b64: 6868 ldr r0, [r5, #4]
|
|
8014b66: f020 0003 bic.w r0, r0, #3
|
|
8014b6a: eb00 0b06 add.w fp, r0, r6
|
|
8014b6e: 2b00 cmp r3, #0
|
|
8014b70: f000 80a5 beq.w 8014cbe <_realloc_r+0x232>
|
|
8014b74: 459c cmp ip, r3
|
|
8014b76: eb01 070b add.w r7, r1, fp
|
|
8014b7a: d14a bne.n 8014c12 <_realloc_r+0x186>
|
|
8014b7c: f108 0310 add.w r3, r8, #16
|
|
8014b80: 42bb cmp r3, r7
|
|
8014b82: f300 809c bgt.w 8014cbe <_realloc_r+0x232>
|
|
8014b86: 46ab mov fp, r5
|
|
8014b88: 68eb ldr r3, [r5, #12]
|
|
8014b8a: f85b 2f08 ldr.w r2, [fp, #8]!
|
|
8014b8e: 60d3 str r3, [r2, #12]
|
|
8014b90: 609a str r2, [r3, #8]
|
|
8014b92: 1f32 subs r2, r6, #4
|
|
8014b94: 2a24 cmp r2, #36 ; 0x24
|
|
8014b96: d837 bhi.n 8014c08 <_realloc_r+0x17c>
|
|
8014b98: 2a13 cmp r2, #19
|
|
8014b9a: d933 bls.n 8014c04 <_realloc_r+0x178>
|
|
8014b9c: 6823 ldr r3, [r4, #0]
|
|
8014b9e: 60ab str r3, [r5, #8]
|
|
8014ba0: 6863 ldr r3, [r4, #4]
|
|
8014ba2: 60eb str r3, [r5, #12]
|
|
8014ba4: 2a1b cmp r2, #27
|
|
8014ba6: d81b bhi.n 8014be0 <_realloc_r+0x154>
|
|
8014ba8: 3408 adds r4, #8
|
|
8014baa: f105 0310 add.w r3, r5, #16
|
|
8014bae: 6822 ldr r2, [r4, #0]
|
|
8014bb0: 601a str r2, [r3, #0]
|
|
8014bb2: 6862 ldr r2, [r4, #4]
|
|
8014bb4: 605a str r2, [r3, #4]
|
|
8014bb6: 68a2 ldr r2, [r4, #8]
|
|
8014bb8: 609a str r2, [r3, #8]
|
|
8014bba: eb05 0308 add.w r3, r5, r8
|
|
8014bbe: 4a65 ldr r2, [pc, #404] ; (8014d54 <_realloc_r+0x2c8>)
|
|
8014bc0: eba7 0708 sub.w r7, r7, r8
|
|
8014bc4: f047 0701 orr.w r7, r7, #1
|
|
8014bc8: 6093 str r3, [r2, #8]
|
|
8014bca: 605f str r7, [r3, #4]
|
|
8014bcc: 686b ldr r3, [r5, #4]
|
|
8014bce: f003 0301 and.w r3, r3, #1
|
|
8014bd2: ea43 0308 orr.w r3, r3, r8
|
|
8014bd6: 606b str r3, [r5, #4]
|
|
8014bd8: 4648 mov r0, r9
|
|
8014bda: f7fe fb31 bl 8013240 <__malloc_unlock>
|
|
8014bde: e771 b.n 8014ac4 <_realloc_r+0x38>
|
|
8014be0: 68a3 ldr r3, [r4, #8]
|
|
8014be2: 612b str r3, [r5, #16]
|
|
8014be4: 68e3 ldr r3, [r4, #12]
|
|
8014be6: 616b str r3, [r5, #20]
|
|
8014be8: 2a24 cmp r2, #36 ; 0x24
|
|
8014bea: bf01 itttt eq
|
|
8014bec: 6923 ldreq r3, [r4, #16]
|
|
8014bee: 61ab streq r3, [r5, #24]
|
|
8014bf0: 6962 ldreq r2, [r4, #20]
|
|
8014bf2: 61ea streq r2, [r5, #28]
|
|
8014bf4: bf19 ittee ne
|
|
8014bf6: 3410 addne r4, #16
|
|
8014bf8: f105 0318 addne.w r3, r5, #24
|
|
8014bfc: f105 0320 addeq.w r3, r5, #32
|
|
8014c00: 3418 addeq r4, #24
|
|
8014c02: e7d4 b.n 8014bae <_realloc_r+0x122>
|
|
8014c04: 465b mov r3, fp
|
|
8014c06: e7d2 b.n 8014bae <_realloc_r+0x122>
|
|
8014c08: 4621 mov r1, r4
|
|
8014c0a: 4658 mov r0, fp
|
|
8014c0c: f7fb fc52 bl 80104b4 <memmove>
|
|
8014c10: e7d3 b.n 8014bba <_realloc_r+0x12e>
|
|
8014c12: 45b8 cmp r8, r7
|
|
8014c14: dc53 bgt.n 8014cbe <_realloc_r+0x232>
|
|
8014c16: e9d3 3202 ldrd r3, r2, [r3, #8]
|
|
8014c1a: 4628 mov r0, r5
|
|
8014c1c: 60da str r2, [r3, #12]
|
|
8014c1e: 6093 str r3, [r2, #8]
|
|
8014c20: f850 2f08 ldr.w r2, [r0, #8]!
|
|
8014c24: 68eb ldr r3, [r5, #12]
|
|
8014c26: 60d3 str r3, [r2, #12]
|
|
8014c28: 609a str r2, [r3, #8]
|
|
8014c2a: 1f32 subs r2, r6, #4
|
|
8014c2c: 2a24 cmp r2, #36 ; 0x24
|
|
8014c2e: d842 bhi.n 8014cb6 <_realloc_r+0x22a>
|
|
8014c30: 2a13 cmp r2, #19
|
|
8014c32: d908 bls.n 8014c46 <_realloc_r+0x1ba>
|
|
8014c34: 6823 ldr r3, [r4, #0]
|
|
8014c36: 60ab str r3, [r5, #8]
|
|
8014c38: 6863 ldr r3, [r4, #4]
|
|
8014c3a: 60eb str r3, [r5, #12]
|
|
8014c3c: 2a1b cmp r2, #27
|
|
8014c3e: d828 bhi.n 8014c92 <_realloc_r+0x206>
|
|
8014c40: 3408 adds r4, #8
|
|
8014c42: f105 0010 add.w r0, r5, #16
|
|
8014c46: 6823 ldr r3, [r4, #0]
|
|
8014c48: 6003 str r3, [r0, #0]
|
|
8014c4a: 6863 ldr r3, [r4, #4]
|
|
8014c4c: 6043 str r3, [r0, #4]
|
|
8014c4e: 68a3 ldr r3, [r4, #8]
|
|
8014c50: 6083 str r3, [r0, #8]
|
|
8014c52: 686b ldr r3, [r5, #4]
|
|
8014c54: eba7 0008 sub.w r0, r7, r8
|
|
8014c58: 280f cmp r0, #15
|
|
8014c5a: f003 0301 and.w r3, r3, #1
|
|
8014c5e: eb05 0207 add.w r2, r5, r7
|
|
8014c62: f240 80b0 bls.w 8014dc6 <_realloc_r+0x33a>
|
|
8014c66: eb05 0108 add.w r1, r5, r8
|
|
8014c6a: ea48 0303 orr.w r3, r8, r3
|
|
8014c6e: f040 0001 orr.w r0, r0, #1
|
|
8014c72: 606b str r3, [r5, #4]
|
|
8014c74: 6048 str r0, [r1, #4]
|
|
8014c76: 6853 ldr r3, [r2, #4]
|
|
8014c78: f043 0301 orr.w r3, r3, #1
|
|
8014c7c: 6053 str r3, [r2, #4]
|
|
8014c7e: 3108 adds r1, #8
|
|
8014c80: 4648 mov r0, r9
|
|
8014c82: f7fd ff47 bl 8012b14 <_free_r>
|
|
8014c86: 4648 mov r0, r9
|
|
8014c88: f7fe fada bl 8013240 <__malloc_unlock>
|
|
8014c8c: f105 0b08 add.w fp, r5, #8
|
|
8014c90: e718 b.n 8014ac4 <_realloc_r+0x38>
|
|
8014c92: 68a3 ldr r3, [r4, #8]
|
|
8014c94: 612b str r3, [r5, #16]
|
|
8014c96: 68e3 ldr r3, [r4, #12]
|
|
8014c98: 616b str r3, [r5, #20]
|
|
8014c9a: 2a24 cmp r2, #36 ; 0x24
|
|
8014c9c: bf01 itttt eq
|
|
8014c9e: 6923 ldreq r3, [r4, #16]
|
|
8014ca0: 61ab streq r3, [r5, #24]
|
|
8014ca2: 6963 ldreq r3, [r4, #20]
|
|
8014ca4: 61eb streq r3, [r5, #28]
|
|
8014ca6: bf19 ittee ne
|
|
8014ca8: 3410 addne r4, #16
|
|
8014caa: f105 0018 addne.w r0, r5, #24
|
|
8014cae: f105 0020 addeq.w r0, r5, #32
|
|
8014cb2: 3418 addeq r4, #24
|
|
8014cb4: e7c7 b.n 8014c46 <_realloc_r+0x1ba>
|
|
8014cb6: 4621 mov r1, r4
|
|
8014cb8: f7fb fbfc bl 80104b4 <memmove>
|
|
8014cbc: e7c9 b.n 8014c52 <_realloc_r+0x1c6>
|
|
8014cbe: 45d8 cmp r8, fp
|
|
8014cc0: dc31 bgt.n 8014d26 <_realloc_r+0x29a>
|
|
8014cc2: 4628 mov r0, r5
|
|
8014cc4: 68eb ldr r3, [r5, #12]
|
|
8014cc6: f850 2f08 ldr.w r2, [r0, #8]!
|
|
8014cca: 60d3 str r3, [r2, #12]
|
|
8014ccc: 609a str r2, [r3, #8]
|
|
8014cce: 1f32 subs r2, r6, #4
|
|
8014cd0: 2a24 cmp r2, #36 ; 0x24
|
|
8014cd2: d824 bhi.n 8014d1e <_realloc_r+0x292>
|
|
8014cd4: 2a13 cmp r2, #19
|
|
8014cd6: d908 bls.n 8014cea <_realloc_r+0x25e>
|
|
8014cd8: 6823 ldr r3, [r4, #0]
|
|
8014cda: 60ab str r3, [r5, #8]
|
|
8014cdc: 6863 ldr r3, [r4, #4]
|
|
8014cde: 60eb str r3, [r5, #12]
|
|
8014ce0: 2a1b cmp r2, #27
|
|
8014ce2: d80a bhi.n 8014cfa <_realloc_r+0x26e>
|
|
8014ce4: 3408 adds r4, #8
|
|
8014ce6: f105 0010 add.w r0, r5, #16
|
|
8014cea: 6823 ldr r3, [r4, #0]
|
|
8014cec: 6003 str r3, [r0, #0]
|
|
8014cee: 6863 ldr r3, [r4, #4]
|
|
8014cf0: 6043 str r3, [r0, #4]
|
|
8014cf2: 68a3 ldr r3, [r4, #8]
|
|
8014cf4: 6083 str r3, [r0, #8]
|
|
8014cf6: 465f mov r7, fp
|
|
8014cf8: e7ab b.n 8014c52 <_realloc_r+0x1c6>
|
|
8014cfa: 68a3 ldr r3, [r4, #8]
|
|
8014cfc: 612b str r3, [r5, #16]
|
|
8014cfe: 68e3 ldr r3, [r4, #12]
|
|
8014d00: 616b str r3, [r5, #20]
|
|
8014d02: 2a24 cmp r2, #36 ; 0x24
|
|
8014d04: bf01 itttt eq
|
|
8014d06: 6923 ldreq r3, [r4, #16]
|
|
8014d08: 61ab streq r3, [r5, #24]
|
|
8014d0a: 6963 ldreq r3, [r4, #20]
|
|
8014d0c: 61eb streq r3, [r5, #28]
|
|
8014d0e: bf19 ittee ne
|
|
8014d10: 3410 addne r4, #16
|
|
8014d12: f105 0018 addne.w r0, r5, #24
|
|
8014d16: f105 0020 addeq.w r0, r5, #32
|
|
8014d1a: 3418 addeq r4, #24
|
|
8014d1c: e7e5 b.n 8014cea <_realloc_r+0x25e>
|
|
8014d1e: 4621 mov r1, r4
|
|
8014d20: f7fb fbc8 bl 80104b4 <memmove>
|
|
8014d24: e7e7 b.n 8014cf6 <_realloc_r+0x26a>
|
|
8014d26: 4611 mov r1, r2
|
|
8014d28: 4648 mov r0, r9
|
|
8014d2a: f7fe f847 bl 8012dbc <_malloc_r>
|
|
8014d2e: 4683 mov fp, r0
|
|
8014d30: 2800 cmp r0, #0
|
|
8014d32: f43f af51 beq.w 8014bd8 <_realloc_r+0x14c>
|
|
8014d36: f854 3c04 ldr.w r3, [r4, #-4]
|
|
8014d3a: f023 0301 bic.w r3, r3, #1
|
|
8014d3e: 4453 add r3, sl
|
|
8014d40: f1a0 0208 sub.w r2, r0, #8
|
|
8014d44: 4293 cmp r3, r2
|
|
8014d46: d107 bne.n 8014d58 <_realloc_r+0x2cc>
|
|
8014d48: f850 7c04 ldr.w r7, [r0, #-4]
|
|
8014d4c: f027 0703 bic.w r7, r7, #3
|
|
8014d50: 4437 add r7, r6
|
|
8014d52: e6fc b.n 8014b4e <_realloc_r+0xc2>
|
|
8014d54: 20000464 .word 0x20000464
|
|
8014d58: 1f32 subs r2, r6, #4
|
|
8014d5a: 2a24 cmp r2, #36 ; 0x24
|
|
8014d5c: d82d bhi.n 8014dba <_realloc_r+0x32e>
|
|
8014d5e: 2a13 cmp r2, #19
|
|
8014d60: d928 bls.n 8014db4 <_realloc_r+0x328>
|
|
8014d62: 6823 ldr r3, [r4, #0]
|
|
8014d64: 6003 str r3, [r0, #0]
|
|
8014d66: 6863 ldr r3, [r4, #4]
|
|
8014d68: 6043 str r3, [r0, #4]
|
|
8014d6a: 2a1b cmp r2, #27
|
|
8014d6c: d80e bhi.n 8014d8c <_realloc_r+0x300>
|
|
8014d6e: f104 0208 add.w r2, r4, #8
|
|
8014d72: f100 0308 add.w r3, r0, #8
|
|
8014d76: 6811 ldr r1, [r2, #0]
|
|
8014d78: 6019 str r1, [r3, #0]
|
|
8014d7a: 6851 ldr r1, [r2, #4]
|
|
8014d7c: 6059 str r1, [r3, #4]
|
|
8014d7e: 6892 ldr r2, [r2, #8]
|
|
8014d80: 609a str r2, [r3, #8]
|
|
8014d82: 4621 mov r1, r4
|
|
8014d84: 4648 mov r0, r9
|
|
8014d86: f7fd fec5 bl 8012b14 <_free_r>
|
|
8014d8a: e725 b.n 8014bd8 <_realloc_r+0x14c>
|
|
8014d8c: 68a3 ldr r3, [r4, #8]
|
|
8014d8e: 6083 str r3, [r0, #8]
|
|
8014d90: 68e3 ldr r3, [r4, #12]
|
|
8014d92: 60c3 str r3, [r0, #12]
|
|
8014d94: 2a24 cmp r2, #36 ; 0x24
|
|
8014d96: bf01 itttt eq
|
|
8014d98: 6923 ldreq r3, [r4, #16]
|
|
8014d9a: 6103 streq r3, [r0, #16]
|
|
8014d9c: 6961 ldreq r1, [r4, #20]
|
|
8014d9e: 6141 streq r1, [r0, #20]
|
|
8014da0: bf19 ittee ne
|
|
8014da2: f104 0210 addne.w r2, r4, #16
|
|
8014da6: f100 0310 addne.w r3, r0, #16
|
|
8014daa: f104 0218 addeq.w r2, r4, #24
|
|
8014dae: f100 0318 addeq.w r3, r0, #24
|
|
8014db2: e7e0 b.n 8014d76 <_realloc_r+0x2ea>
|
|
8014db4: 4603 mov r3, r0
|
|
8014db6: 4622 mov r2, r4
|
|
8014db8: e7dd b.n 8014d76 <_realloc_r+0x2ea>
|
|
8014dba: 4621 mov r1, r4
|
|
8014dbc: f7fb fb7a bl 80104b4 <memmove>
|
|
8014dc0: e7df b.n 8014d82 <_realloc_r+0x2f6>
|
|
8014dc2: 4637 mov r7, r6
|
|
8014dc4: e6c3 b.n 8014b4e <_realloc_r+0xc2>
|
|
8014dc6: 431f orrs r7, r3
|
|
8014dc8: 606f str r7, [r5, #4]
|
|
8014dca: 6853 ldr r3, [r2, #4]
|
|
8014dcc: f043 0301 orr.w r3, r3, #1
|
|
8014dd0: 6053 str r3, [r2, #4]
|
|
8014dd2: e758 b.n 8014c86 <_realloc_r+0x1fa>
|
|
|
|
08014dd4 <__swbuf_r>:
|
|
8014dd4: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
8014dd6: 460e mov r6, r1
|
|
8014dd8: 4614 mov r4, r2
|
|
8014dda: 4605 mov r5, r0
|
|
8014ddc: b118 cbz r0, 8014de6 <__swbuf_r+0x12>
|
|
8014dde: 6b83 ldr r3, [r0, #56] ; 0x38
|
|
8014de0: b90b cbnz r3, 8014de6 <__swbuf_r+0x12>
|
|
8014de2: f7fd fe07 bl 80129f4 <__sinit>
|
|
8014de6: 69a3 ldr r3, [r4, #24]
|
|
8014de8: 60a3 str r3, [r4, #8]
|
|
8014dea: 89a3 ldrh r3, [r4, #12]
|
|
8014dec: 0719 lsls r1, r3, #28
|
|
8014dee: d529 bpl.n 8014e44 <__swbuf_r+0x70>
|
|
8014df0: 6923 ldr r3, [r4, #16]
|
|
8014df2: b33b cbz r3, 8014e44 <__swbuf_r+0x70>
|
|
8014df4: f9b4 300c ldrsh.w r3, [r4, #12]
|
|
8014df8: b2f6 uxtb r6, r6
|
|
8014dfa: 049a lsls r2, r3, #18
|
|
8014dfc: 4637 mov r7, r6
|
|
8014dfe: d52a bpl.n 8014e56 <__swbuf_r+0x82>
|
|
8014e00: 6823 ldr r3, [r4, #0]
|
|
8014e02: 6920 ldr r0, [r4, #16]
|
|
8014e04: 1a18 subs r0, r3, r0
|
|
8014e06: 6963 ldr r3, [r4, #20]
|
|
8014e08: 4283 cmp r3, r0
|
|
8014e0a: dc04 bgt.n 8014e16 <__swbuf_r+0x42>
|
|
8014e0c: 4621 mov r1, r4
|
|
8014e0e: 4628 mov r0, r5
|
|
8014e10: f7fd fd84 bl 801291c <_fflush_r>
|
|
8014e14: b9e0 cbnz r0, 8014e50 <__swbuf_r+0x7c>
|
|
8014e16: 68a3 ldr r3, [r4, #8]
|
|
8014e18: 3b01 subs r3, #1
|
|
8014e1a: 60a3 str r3, [r4, #8]
|
|
8014e1c: 6823 ldr r3, [r4, #0]
|
|
8014e1e: 1c5a adds r2, r3, #1
|
|
8014e20: 6022 str r2, [r4, #0]
|
|
8014e22: 701e strb r6, [r3, #0]
|
|
8014e24: 6962 ldr r2, [r4, #20]
|
|
8014e26: 1c43 adds r3, r0, #1
|
|
8014e28: 429a cmp r2, r3
|
|
8014e2a: d004 beq.n 8014e36 <__swbuf_r+0x62>
|
|
8014e2c: 89a3 ldrh r3, [r4, #12]
|
|
8014e2e: 07db lsls r3, r3, #31
|
|
8014e30: d506 bpl.n 8014e40 <__swbuf_r+0x6c>
|
|
8014e32: 2e0a cmp r6, #10
|
|
8014e34: d104 bne.n 8014e40 <__swbuf_r+0x6c>
|
|
8014e36: 4621 mov r1, r4
|
|
8014e38: 4628 mov r0, r5
|
|
8014e3a: f7fd fd6f bl 801291c <_fflush_r>
|
|
8014e3e: b938 cbnz r0, 8014e50 <__swbuf_r+0x7c>
|
|
8014e40: 4638 mov r0, r7
|
|
8014e42: bdf8 pop {r3, r4, r5, r6, r7, pc}
|
|
8014e44: 4621 mov r1, r4
|
|
8014e46: 4628 mov r0, r5
|
|
8014e48: f7fc fe08 bl 8011a5c <__swsetup_r>
|
|
8014e4c: 2800 cmp r0, #0
|
|
8014e4e: d0d1 beq.n 8014df4 <__swbuf_r+0x20>
|
|
8014e50: f04f 37ff mov.w r7, #4294967295
|
|
8014e54: e7f4 b.n 8014e40 <__swbuf_r+0x6c>
|
|
8014e56: f443 5300 orr.w r3, r3, #8192 ; 0x2000
|
|
8014e5a: 81a3 strh r3, [r4, #12]
|
|
8014e5c: 6e63 ldr r3, [r4, #100] ; 0x64
|
|
8014e5e: f423 5300 bic.w r3, r3, #8192 ; 0x2000
|
|
8014e62: 6663 str r3, [r4, #100] ; 0x64
|
|
8014e64: e7cc b.n 8014e00 <__swbuf_r+0x2c>
|
|
...
|
|
|
|
08014e68 <_wcrtomb_r>:
|
|
8014e68: b5f0 push {r4, r5, r6, r7, lr}
|
|
8014e6a: 4c09 ldr r4, [pc, #36] ; (8014e90 <_wcrtomb_r+0x28>)
|
|
8014e6c: b085 sub sp, #20
|
|
8014e6e: f8d4 70e0 ldr.w r7, [r4, #224] ; 0xe0
|
|
8014e72: 4605 mov r5, r0
|
|
8014e74: 461e mov r6, r3
|
|
8014e76: b909 cbnz r1, 8014e7c <_wcrtomb_r+0x14>
|
|
8014e78: 460a mov r2, r1
|
|
8014e7a: a901 add r1, sp, #4
|
|
8014e7c: 47b8 blx r7
|
|
8014e7e: 1c43 adds r3, r0, #1
|
|
8014e80: bf01 itttt eq
|
|
8014e82: 2300 moveq r3, #0
|
|
8014e84: 6033 streq r3, [r6, #0]
|
|
8014e86: 238a moveq r3, #138 ; 0x8a
|
|
8014e88: 602b streq r3, [r5, #0]
|
|
8014e8a: b005 add sp, #20
|
|
8014e8c: bdf0 pop {r4, r5, r6, r7, pc}
|
|
8014e8e: bf00 nop
|
|
8014e90: 20000874 .word 0x20000874
|
|
|
|
08014e94 <__ascii_wctomb>:
|
|
8014e94: b149 cbz r1, 8014eaa <__ascii_wctomb+0x16>
|
|
8014e96: 2aff cmp r2, #255 ; 0xff
|
|
8014e98: bf85 ittet hi
|
|
8014e9a: 238a movhi r3, #138 ; 0x8a
|
|
8014e9c: 6003 strhi r3, [r0, #0]
|
|
8014e9e: 700a strbls r2, [r1, #0]
|
|
8014ea0: f04f 30ff movhi.w r0, #4294967295
|
|
8014ea4: bf98 it ls
|
|
8014ea6: 2001 movls r0, #1
|
|
8014ea8: 4770 bx lr
|
|
8014eaa: 4608 mov r0, r1
|
|
8014eac: 4770 bx lr
|
|
|
|
08014eae <abort>:
|
|
8014eae: b508 push {r3, lr}
|
|
8014eb0: 2006 movs r0, #6
|
|
8014eb2: f000 f82d bl 8014f10 <raise>
|
|
8014eb6: 2001 movs r0, #1
|
|
8014eb8: f000 f894 bl 8014fe4 <_exit>
|
|
|
|
08014ebc <_raise_r>:
|
|
8014ebc: 291f cmp r1, #31
|
|
8014ebe: b538 push {r3, r4, r5, lr}
|
|
8014ec0: 4604 mov r4, r0
|
|
8014ec2: 460d mov r5, r1
|
|
8014ec4: d904 bls.n 8014ed0 <_raise_r+0x14>
|
|
8014ec6: 2316 movs r3, #22
|
|
8014ec8: 6003 str r3, [r0, #0]
|
|
8014eca: f04f 30ff mov.w r0, #4294967295
|
|
8014ece: bd38 pop {r3, r4, r5, pc}
|
|
8014ed0: f8d0 22dc ldr.w r2, [r0, #732] ; 0x2dc
|
|
8014ed4: b112 cbz r2, 8014edc <_raise_r+0x20>
|
|
8014ed6: f852 3021 ldr.w r3, [r2, r1, lsl #2]
|
|
8014eda: b94b cbnz r3, 8014ef0 <_raise_r+0x34>
|
|
8014edc: 4620 mov r0, r4
|
|
8014ede: f000 f831 bl 8014f44 <_getpid_r>
|
|
8014ee2: 462a mov r2, r5
|
|
8014ee4: 4601 mov r1, r0
|
|
8014ee6: 4620 mov r0, r4
|
|
8014ee8: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr}
|
|
8014eec: f000 b818 b.w 8014f20 <_kill_r>
|
|
8014ef0: 2b01 cmp r3, #1
|
|
8014ef2: d00a beq.n 8014f0a <_raise_r+0x4e>
|
|
8014ef4: 1c59 adds r1, r3, #1
|
|
8014ef6: d103 bne.n 8014f00 <_raise_r+0x44>
|
|
8014ef8: 2316 movs r3, #22
|
|
8014efa: 6003 str r3, [r0, #0]
|
|
8014efc: 2001 movs r0, #1
|
|
8014efe: e7e6 b.n 8014ece <_raise_r+0x12>
|
|
8014f00: 2400 movs r4, #0
|
|
8014f02: f842 4025 str.w r4, [r2, r5, lsl #2]
|
|
8014f06: 4628 mov r0, r5
|
|
8014f08: 4798 blx r3
|
|
8014f0a: 2000 movs r0, #0
|
|
8014f0c: e7df b.n 8014ece <_raise_r+0x12>
|
|
...
|
|
|
|
08014f10 <raise>:
|
|
8014f10: 4b02 ldr r3, [pc, #8] ; (8014f1c <raise+0xc>)
|
|
8014f12: 4601 mov r1, r0
|
|
8014f14: 6818 ldr r0, [r3, #0]
|
|
8014f16: f7ff bfd1 b.w 8014ebc <_raise_r>
|
|
8014f1a: bf00 nop
|
|
8014f1c: 20000030 .word 0x20000030
|
|
|
|
08014f20 <_kill_r>:
|
|
8014f20: b538 push {r3, r4, r5, lr}
|
|
8014f22: 4d07 ldr r5, [pc, #28] ; (8014f40 <_kill_r+0x20>)
|
|
8014f24: 2300 movs r3, #0
|
|
8014f26: 4604 mov r4, r0
|
|
8014f28: 4608 mov r0, r1
|
|
8014f2a: 4611 mov r1, r2
|
|
8014f2c: 602b str r3, [r5, #0]
|
|
8014f2e: f000 f82b bl 8014f88 <_kill>
|
|
8014f32: 1c43 adds r3, r0, #1
|
|
8014f34: d102 bne.n 8014f3c <_kill_r+0x1c>
|
|
8014f36: 682b ldr r3, [r5, #0]
|
|
8014f38: b103 cbz r3, 8014f3c <_kill_r+0x1c>
|
|
8014f3a: 6023 str r3, [r4, #0]
|
|
8014f3c: bd38 pop {r3, r4, r5, pc}
|
|
8014f3e: bf00 nop
|
|
8014f40: 20008dc8 .word 0x20008dc8
|
|
|
|
08014f44 <_getpid_r>:
|
|
8014f44: f000 b810 b.w 8014f68 <_getpid>
|
|
|
|
08014f48 <_close>:
|
|
8014f48: 4b02 ldr r3, [pc, #8] ; (8014f54 <_close+0xc>)
|
|
8014f4a: 2258 movs r2, #88 ; 0x58
|
|
8014f4c: 601a str r2, [r3, #0]
|
|
8014f4e: f04f 30ff mov.w r0, #4294967295
|
|
8014f52: 4770 bx lr
|
|
8014f54: 20008dc8 .word 0x20008dc8
|
|
|
|
08014f58 <_fstat>:
|
|
8014f58: 4b02 ldr r3, [pc, #8] ; (8014f64 <_fstat+0xc>)
|
|
8014f5a: 2258 movs r2, #88 ; 0x58
|
|
8014f5c: 601a str r2, [r3, #0]
|
|
8014f5e: f04f 30ff mov.w r0, #4294967295
|
|
8014f62: 4770 bx lr
|
|
8014f64: 20008dc8 .word 0x20008dc8
|
|
|
|
08014f68 <_getpid>:
|
|
8014f68: 4b02 ldr r3, [pc, #8] ; (8014f74 <_getpid+0xc>)
|
|
8014f6a: 2258 movs r2, #88 ; 0x58
|
|
8014f6c: 601a str r2, [r3, #0]
|
|
8014f6e: f04f 30ff mov.w r0, #4294967295
|
|
8014f72: 4770 bx lr
|
|
8014f74: 20008dc8 .word 0x20008dc8
|
|
|
|
08014f78 <_isatty>:
|
|
8014f78: 4b02 ldr r3, [pc, #8] ; (8014f84 <_isatty+0xc>)
|
|
8014f7a: 2258 movs r2, #88 ; 0x58
|
|
8014f7c: 601a str r2, [r3, #0]
|
|
8014f7e: 2000 movs r0, #0
|
|
8014f80: 4770 bx lr
|
|
8014f82: bf00 nop
|
|
8014f84: 20008dc8 .word 0x20008dc8
|
|
|
|
08014f88 <_kill>:
|
|
8014f88: 4b02 ldr r3, [pc, #8] ; (8014f94 <_kill+0xc>)
|
|
8014f8a: 2258 movs r2, #88 ; 0x58
|
|
8014f8c: 601a str r2, [r3, #0]
|
|
8014f8e: f04f 30ff mov.w r0, #4294967295
|
|
8014f92: 4770 bx lr
|
|
8014f94: 20008dc8 .word 0x20008dc8
|
|
|
|
08014f98 <_lseek>:
|
|
8014f98: 4b02 ldr r3, [pc, #8] ; (8014fa4 <_lseek+0xc>)
|
|
8014f9a: 2258 movs r2, #88 ; 0x58
|
|
8014f9c: 601a str r2, [r3, #0]
|
|
8014f9e: f04f 30ff mov.w r0, #4294967295
|
|
8014fa2: 4770 bx lr
|
|
8014fa4: 20008dc8 .word 0x20008dc8
|
|
|
|
08014fa8 <_read>:
|
|
8014fa8: 4b02 ldr r3, [pc, #8] ; (8014fb4 <_read+0xc>)
|
|
8014faa: 2258 movs r2, #88 ; 0x58
|
|
8014fac: 601a str r2, [r3, #0]
|
|
8014fae: f04f 30ff mov.w r0, #4294967295
|
|
8014fb2: 4770 bx lr
|
|
8014fb4: 20008dc8 .word 0x20008dc8
|
|
|
|
08014fb8 <_sbrk>:
|
|
8014fb8: 4a04 ldr r2, [pc, #16] ; (8014fcc <_sbrk+0x14>)
|
|
8014fba: 6811 ldr r1, [r2, #0]
|
|
8014fbc: 4603 mov r3, r0
|
|
8014fbe: b909 cbnz r1, 8014fc4 <_sbrk+0xc>
|
|
8014fc0: 4903 ldr r1, [pc, #12] ; (8014fd0 <_sbrk+0x18>)
|
|
8014fc2: 6011 str r1, [r2, #0]
|
|
8014fc4: 6810 ldr r0, [r2, #0]
|
|
8014fc6: 4403 add r3, r0
|
|
8014fc8: 6013 str r3, [r2, #0]
|
|
8014fca: 4770 bx lr
|
|
8014fcc: 20008dcc .word 0x20008dcc
|
|
8014fd0: 20008dd0 .word 0x20008dd0
|
|
|
|
08014fd4 <_write>:
|
|
8014fd4: 4b02 ldr r3, [pc, #8] ; (8014fe0 <_write+0xc>)
|
|
8014fd6: 2258 movs r2, #88 ; 0x58
|
|
8014fd8: 601a str r2, [r3, #0]
|
|
8014fda: f04f 30ff mov.w r0, #4294967295
|
|
8014fde: 4770 bx lr
|
|
8014fe0: 20008dc8 .word 0x20008dc8
|
|
|
|
08014fe4 <_exit>:
|
|
8014fe4: e7fe b.n 8014fe4 <_exit>
|
|
...
|
|
|
|
08014fe8 <_init>:
|
|
8014fe8: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
8014fea: bf00 nop
|
|
8014fec: bcf8 pop {r3, r4, r5, r6, r7}
|
|
8014fee: bc08 pop {r3}
|
|
8014ff0: 469e mov lr, r3
|
|
8014ff2: 4770 bx lr
|
|
|
|
08014ff4 <_fini>:
|
|
8014ff4: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
8014ff6: bf00 nop
|
|
8014ff8: bcf8 pop {r3, r4, r5, r6, r7}
|
|
8014ffa: bc08 pop {r3}
|
|
8014ffc: 469e mov lr, r3
|
|
8014ffe: 4770 bx lr
|