lwip_test.elf: file format elf32-littlearm Sections: Idx Name Size VMA LMA File off Algn 0 .isr_vector 000002cc 08000000 08000000 00010000 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .text 000112d4 080002d0 080002d0 000102d0 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .rodata 000039e4 080115a4 080115a4 000215a4 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .init_array 00000004 08014f88 08014f88 00024f88 2**2 CONTENTS, ALLOC, LOAD, DATA 4 .fini_array 00000004 08014f8c 08014f8c 00024f8c 2**2 CONTENTS, ALLOC, LOAD, DATA 5 .data 000000d0 24000000 08014f90 00030000 2**2 CONTENTS, ALLOC, LOAD, DATA 6 .bss 00007d48 240000d0 08015060 000300d0 2**2 ALLOC 7 ._user_heap_stack 00000600 24007e18 08015060 00037e18 2**0 ALLOC 8 .lwip_sec 00000160 30000000 30000000 00040000 2**2 ALLOC 9 .ARM.attributes 0000002e 00000000 00000000 000300d0 2**0 CONTENTS, READONLY 10 .comment 00000043 00000000 00000000 000300fe 2**0 CONTENTS, READONLY 11 .debug_info 0001f0ff 00000000 00000000 00030141 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 12 .debug_abbrev 000054e0 00000000 00000000 0004f240 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 13 .debug_aranges 00001508 00000000 00000000 00054720 2**3 CONTENTS, READONLY, DEBUGGING, OCTETS 14 .debug_rnglists 00001094 00000000 00000000 00055c28 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 15 .debug_macro 0003e829 00000000 00000000 00056cbc 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 16 .debug_line 00026379 00000000 00000000 000954e5 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 17 .debug_str 00150dcb 00000000 00000000 000bb85e 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 18 .debug_frame 00005dfc 00000000 00000000 0020c62c 2**2 CONTENTS, READONLY, DEBUGGING, OCTETS 19 .debug_line_str 0000004a 00000000 00000000 00212428 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS Disassembly of section .text: 080002d0 <__do_global_dtors_aux>: 80002d0: b510 push {r4, lr} 80002d2: 4c05 ldr r4, [pc, #20] ; (80002e8 <__do_global_dtors_aux+0x18>) 80002d4: 7823 ldrb r3, [r4, #0] 80002d6: b933 cbnz r3, 80002e6 <__do_global_dtors_aux+0x16> 80002d8: 4b04 ldr r3, [pc, #16] ; (80002ec <__do_global_dtors_aux+0x1c>) 80002da: b113 cbz r3, 80002e2 <__do_global_dtors_aux+0x12> 80002dc: 4804 ldr r0, [pc, #16] ; (80002f0 <__do_global_dtors_aux+0x20>) 80002de: f3af 8000 nop.w 80002e2: 2301 movs r3, #1 80002e4: 7023 strb r3, [r4, #0] 80002e6: bd10 pop {r4, pc} 80002e8: 240000d0 .word 0x240000d0 80002ec: 00000000 .word 0x00000000 80002f0: 0801158c .word 0x0801158c 080002f4 : 80002f4: b508 push {r3, lr} 80002f6: 4b03 ldr r3, [pc, #12] ; (8000304 ) 80002f8: b11b cbz r3, 8000302 80002fa: 4903 ldr r1, [pc, #12] ; (8000308 ) 80002fc: 4803 ldr r0, [pc, #12] ; (800030c ) 80002fe: f3af 8000 nop.w 8000302: bd08 pop {r3, pc} 8000304: 00000000 .word 0x00000000 8000308: 240000d4 .word 0x240000d4 800030c: 0801158c .word 0x0801158c 08000310 : 8000310: f001 01ff and.w r1, r1, #255 ; 0xff 8000314: 2a10 cmp r2, #16 8000316: db2b blt.n 8000370 8000318: f010 0f07 tst.w r0, #7 800031c: d008 beq.n 8000330 800031e: f810 3b01 ldrb.w r3, [r0], #1 8000322: 3a01 subs r2, #1 8000324: 428b cmp r3, r1 8000326: d02d beq.n 8000384 8000328: f010 0f07 tst.w r0, #7 800032c: b342 cbz r2, 8000380 800032e: d1f6 bne.n 800031e 8000330: b4f0 push {r4, r5, r6, r7} 8000332: ea41 2101 orr.w r1, r1, r1, lsl #8 8000336: ea41 4101 orr.w r1, r1, r1, lsl #16 800033a: f022 0407 bic.w r4, r2, #7 800033e: f07f 0700 mvns.w r7, #0 8000342: 2300 movs r3, #0 8000344: e8f0 5602 ldrd r5, r6, [r0], #8 8000348: 3c08 subs r4, #8 800034a: ea85 0501 eor.w r5, r5, r1 800034e: ea86 0601 eor.w r6, r6, r1 8000352: fa85 f547 uadd8 r5, r5, r7 8000356: faa3 f587 sel r5, r3, r7 800035a: fa86 f647 uadd8 r6, r6, r7 800035e: faa5 f687 sel r6, r5, r7 8000362: b98e cbnz r6, 8000388 8000364: d1ee bne.n 8000344 8000366: bcf0 pop {r4, r5, r6, r7} 8000368: f001 01ff and.w r1, r1, #255 ; 0xff 800036c: f002 0207 and.w r2, r2, #7 8000370: b132 cbz r2, 8000380 8000372: f810 3b01 ldrb.w r3, [r0], #1 8000376: 3a01 subs r2, #1 8000378: ea83 0301 eor.w r3, r3, r1 800037c: b113 cbz r3, 8000384 800037e: d1f8 bne.n 8000372 8000380: 2000 movs r0, #0 8000382: 4770 bx lr 8000384: 3801 subs r0, #1 8000386: 4770 bx lr 8000388: 2d00 cmp r5, #0 800038a: bf06 itte eq 800038c: 4635 moveq r5, r6 800038e: 3803 subeq r0, #3 8000390: 3807 subne r0, #7 8000392: f015 0f01 tst.w r5, #1 8000396: d107 bne.n 80003a8 8000398: 3001 adds r0, #1 800039a: f415 7f80 tst.w r5, #256 ; 0x100 800039e: bf02 ittt eq 80003a0: 3001 addeq r0, #1 80003a2: f415 3fc0 tsteq.w r5, #98304 ; 0x18000 80003a6: 3001 addeq r0, #1 80003a8: bcf0 pop {r4, r5, r6, r7} 80003aa: 3801 subs r0, #1 80003ac: 4770 bx lr 80003ae: bf00 nop 080003b0 : 80003b0: 4603 mov r3, r0 80003b2: f813 2b01 ldrb.w r2, [r3], #1 80003b6: 2a00 cmp r2, #0 80003b8: d1fb bne.n 80003b2 80003ba: 1a18 subs r0, r3, r0 80003bc: 3801 subs r0, #1 80003be: 4770 bx lr 080003c0 : \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. \param [in] ch Character to transmit. \returns Character to transmit. */ __STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch) { 80003c0: b480 push {r7} 80003c2: b083 sub sp, #12 80003c4: af00 add r7, sp, #0 80003c6: 6078 str r0, [r7, #4] if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */ 80003c8: f04f 4360 mov.w r3, #3758096384 ; 0xe0000000 80003cc: f8d3 3e80 ldr.w r3, [r3, #3712] ; 0xe80 80003d0: f003 0301 and.w r3, r3, #1 80003d4: 2b00 cmp r3, #0 80003d6: d013 beq.n 8000400 ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ 80003d8: f04f 4360 mov.w r3, #3758096384 ; 0xe0000000 80003dc: f8d3 3e00 ldr.w r3, [r3, #3584] ; 0xe00 80003e0: f003 0301 and.w r3, r3, #1 if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */ 80003e4: 2b00 cmp r3, #0 80003e6: d00b beq.n 8000400 { while (ITM->PORT[0U].u32 == 0UL) 80003e8: e000 b.n 80003ec { __NOP(); 80003ea: bf00 nop while (ITM->PORT[0U].u32 == 0UL) 80003ec: f04f 4360 mov.w r3, #3758096384 ; 0xe0000000 80003f0: 681b ldr r3, [r3, #0] 80003f2: 2b00 cmp r3, #0 80003f4: d0f9 beq.n 80003ea } ITM->PORT[0U].u8 = (uint8_t)ch; 80003f6: f04f 4360 mov.w r3, #3758096384 ; 0xe0000000 80003fa: 687a ldr r2, [r7, #4] 80003fc: b2d2 uxtb r2, r2 80003fe: 701a strb r2, [r3, #0] } return (ch); 8000400: 687b ldr r3, [r7, #4] } 8000402: 4618 mov r0, r3 8000404: 370c adds r7, #12 8000406: 46bd mov sp, r7 8000408: f85d 7b04 ldr.w r7, [sp], #4 800040c: 4770 bx lr 0800040e <_write>: /* Private user code ---------------------------------------------------------*/ /* USER CODE BEGIN 0 */ #define min(x, y) (x) < (y) ? (x) : (y) #define max(x, y) (x) > (y) ? (x) : (y) int _write(int32_t file, uint8_t *ptr, int32_t len) { 800040e: b580 push {r7, lr} 8000410: b086 sub sp, #24 8000412: af00 add r7, sp, #0 8000414: 60f8 str r0, [r7, #12] 8000416: 60b9 str r1, [r7, #8] 8000418: 607a str r2, [r7, #4] for (int32_t i = 0; i < len; ++i) 800041a: 2300 movs r3, #0 800041c: 617b str r3, [r7, #20] 800041e: e009 b.n 8000434 <_write+0x26> ITM_SendChar(*ptr++); 8000420: 68bb ldr r3, [r7, #8] 8000422: 1c5a adds r2, r3, #1 8000424: 60ba str r2, [r7, #8] 8000426: 781b ldrb r3, [r3, #0] 8000428: 4618 mov r0, r3 800042a: f7ff ffc9 bl 80003c0 for (int32_t i = 0; i < len; ++i) 800042e: 697b ldr r3, [r7, #20] 8000430: 3301 adds r3, #1 8000432: 617b str r3, [r7, #20] 8000434: 697a ldr r2, [r7, #20] 8000436: 687b ldr r3, [r7, #4] 8000438: 429a cmp r2, r3 800043a: dbf1 blt.n 8000420 <_write+0x12> return len; 800043c: 687b ldr r3, [r7, #4] } 800043e: 4618 mov r0, r3 8000440: 3718 adds r7, #24 8000442: 46bd mov sp, r7 8000444: bd80 pop {r7, pc} ... 08000448 : extern void LOG_ERROR(const char *format, ...) { 8000448: b40f push {r0, r1, r2, r3} 800044a: b580 push {r7, lr} 800044c: b082 sub sp, #8 800044e: af00 add r7, sp, #0 va_list args; va_start(args, format); 8000450: f107 0314 add.w r3, r7, #20 8000454: 607b str r3, [r7, #4] fprintf(stderr, "ERROR: "); 8000456: 4b0f ldr r3, [pc, #60] ; (8000494 ) 8000458: 681b ldr r3, [r3, #0] 800045a: 68db ldr r3, [r3, #12] 800045c: 2207 movs r2, #7 800045e: 2101 movs r1, #1 8000460: 480d ldr r0, [pc, #52] ; (8000498 ) 8000462: f010 fba3 bl 8010bac vfprintf(stderr, format, args); 8000466: 4b0b ldr r3, [pc, #44] ; (8000494 ) 8000468: 681b ldr r3, [r3, #0] 800046a: 68db ldr r3, [r3, #12] 800046c: 687a ldr r2, [r7, #4] 800046e: 6939 ldr r1, [r7, #16] 8000470: 4618 mov r0, r3 8000472: f010 f8f3 bl 801065c fprintf(stderr, "\r\n"); 8000476: 4b07 ldr r3, [pc, #28] ; (8000494 ) 8000478: 681b ldr r3, [r3, #0] 800047a: 68db ldr r3, [r3, #12] 800047c: 2202 movs r2, #2 800047e: 2101 movs r1, #1 8000480: 4806 ldr r0, [pc, #24] ; (800049c ) 8000482: f010 fb93 bl 8010bac va_end(args); } 8000486: bf00 nop 8000488: 3708 adds r7, #8 800048a: 46bd mov sp, r7 800048c: e8bd 4080 ldmia.w sp!, {r7, lr} 8000490: b004 add sp, #16 8000492: 4770 bx lr 8000494: 240000cc .word 0x240000cc 8000498: 080115a4 .word 0x080115a4 800049c: 080115ac .word 0x080115ac 080004a0 : extern void LOG_TRACE(const char *message) { 80004a0: b580 push {r7, lr} 80004a2: b082 sub sp, #8 80004a4: af00 add r7, sp, #0 80004a6: 6078 str r0, [r7, #4] printf("TRACE: %s \r\n", message); 80004a8: 6879 ldr r1, [r7, #4] 80004aa: 4803 ldr r0, [pc, #12] ; (80004b8 ) 80004ac: f010 fb8c bl 8010bc8 } 80004b0: bf00 nop 80004b2: 3708 adds r7, #8 80004b4: 46bd mov sp, r7 80004b6: bd80 pop {r7, pc} 80004b8: 080115b0 .word 0x080115b0 080004bc : LOG_ERROR("lwftp_retrieve failed (%d)", error); } // FTP session will continue with RETR and sink callbacks } static uint data_source(void *arg, const char **pptr, uint maxlen) { 80004bc: b480 push {r7} 80004be: b087 sub sp, #28 80004c0: af00 add r7, sp, #0 80004c2: 60f8 str r0, [r7, #12] 80004c4: 60b9 str r1, [r7, #8] 80004c6: 607a str r2, [r7, #4] static const uint mylen = 12345; static const char *const mydata = (char*) 0x20000000; static uint offset = 0; uint len = 0; 80004c8: 2300 movs r3, #0 80004ca: 617b str r3, [r7, #20] // Check for data request or data sent notice if (pptr) { 80004cc: 68bb ldr r3, [r7, #8] 80004ce: 2b00 cmp r3, #0 80004d0: d013 beq.n 80004fa len = mylen - offset; 80004d2: 4b15 ldr r3, [pc, #84] ; (8000528 ) 80004d4: 681a ldr r2, [r3, #0] 80004d6: 4b15 ldr r3, [pc, #84] ; (800052c ) 80004d8: 681b ldr r3, [r3, #0] 80004da: 1ad3 subs r3, r2, r3 80004dc: 617b str r3, [r7, #20] if (len > maxlen) 80004de: 697a ldr r2, [r7, #20] 80004e0: 687b ldr r3, [r7, #4] 80004e2: 429a cmp r2, r3 80004e4: d901 bls.n 80004ea len = maxlen; 80004e6: 687b ldr r3, [r7, #4] 80004e8: 617b str r3, [r7, #20] *pptr = mydata + offset; 80004ea: 4b11 ldr r3, [pc, #68] ; (8000530 ) 80004ec: 681a ldr r2, [r3, #0] 80004ee: 4b0f ldr r3, [pc, #60] ; (800052c ) 80004f0: 681b ldr r3, [r3, #0] 80004f2: 441a add r2, r3 80004f4: 68bb ldr r3, [r7, #8] 80004f6: 601a str r2, [r3, #0] 80004f8: e00f b.n 800051a } else { offset += maxlen; 80004fa: 4b0c ldr r3, [pc, #48] ; (800052c ) 80004fc: 681a ldr r2, [r3, #0] 80004fe: 687b ldr r3, [r7, #4] 8000500: 4413 add r3, r2 8000502: 4a0a ldr r2, [pc, #40] ; (800052c ) 8000504: 6013 str r3, [r2, #0] if (offset > mylen) 8000506: 4b09 ldr r3, [pc, #36] ; (800052c ) 8000508: 681a ldr r2, [r3, #0] 800050a: 4b07 ldr r3, [pc, #28] ; (8000528 ) 800050c: 681b ldr r3, [r3, #0] 800050e: 429a cmp r2, r3 8000510: d903 bls.n 800051a offset = mylen; 8000512: 4b05 ldr r3, [pc, #20] ; (8000528 ) 8000514: 681b ldr r3, [r3, #0] 8000516: 4a05 ldr r2, [pc, #20] ; (800052c ) 8000518: 6013 str r3, [r2, #0] } return len; 800051a: 697b ldr r3, [r7, #20] } 800051c: 4618 mov r0, r3 800051e: 371c adds r7, #28 8000520: 46bd mov sp, r7 8000522: f85d 7b04 ldr.w r7, [sp], #4 8000526: 4770 bx lr 8000528: 08014c78 .word 0x08014c78 800052c: 240000ec .word 0x240000ec 8000530: 08014c7c .word 0x08014c7c 08000534 : static void ftp_connect_callback(void *arg, int result) { 8000534: b580 push {r7, lr} 8000536: b084 sub sp, #16 8000538: af00 add r7, sp, #0 800053a: 6078 str r0, [r7, #4] 800053c: 6039 str r1, [r7, #0] lwftp_session_t *s = (lwftp_session_t*) arg; 800053e: 687b ldr r3, [r7, #4] 8000540: 60fb str r3, [r7, #12] err_t error; if (result == LWFTP_RESULT_LOGGED) { 8000542: 683b ldr r3, [r7, #0] 8000544: 2b02 cmp r3, #2 8000546: d103 bne.n 8000550 LOG_TRACE("login success !!!!! \r\n"); 8000548: 4806 ldr r0, [pc, #24] ; (8000564 ) 800054a: f7ff ffa9 bl 80004a0 800054e: e002 b.n 8000556 } else { LOG_TRACE("login failed !!!!! \r\n"); 8000550: 4805 ldr r0, [pc, #20] ; (8000568 ) 8000552: f7ff ffa5 bl 80004a0 // return lwftp_close(s); // } return // Continue with STOR request s->data_source = data_source; 8000556: 68fb ldr r3, [r7, #12] 8000558: 4a04 ldr r2, [pc, #16] ; (800056c ) 800055a: 619a str r2, [r3, #24] error = lwftp_store(s); if (error != LWFTP_RESULT_INPROGRESS) { LOG_ERROR("lwftp_store failed (%d)", error); } // FTP session will continue with STOR and source callbacks } 800055c: 3710 adds r7, #16 800055e: 46bd mov sp, r7 8000560: bd80 pop {r7, pc} 8000562: bf00 nop 8000564: 08011610 .word 0x08011610 8000568: 08011628 .word 0x08011628 800056c: 080004bd .word 0x080004bd 08000570 : static void ftp_test(void) { 8000570: b580 push {r7, lr} 8000572: b082 sub sp, #8 8000574: af00 add r7, sp, #0 static lwftp_session_t s; // static content for the whole FTP session err_t error; // Initialize session data memset(&s, 0, sizeof(s)); 8000576: 2234 movs r2, #52 ; 0x34 8000578: 2100 movs r1, #0 800057a: 4814 ldr r0, [pc, #80] ; (80005cc ) 800057c: f010 fc82 bl 8010e84 IP4_ADDR(&s.server_ip, 192, 168, 0, 100); 8000580: 4b12 ldr r3, [pc, #72] ; (80005cc ) 8000582: 4a13 ldr r2, [pc, #76] ; (80005d0 ) 8000584: 601a str r2, [r3, #0] s.server_port = 21; 8000586: 4b11 ldr r3, [pc, #68] ; (80005cc ) 8000588: 2215 movs r2, #21 800058a: 809a strh r2, [r3, #4] s.done_fn = ftp_connect_callback; 800058c: 4b0f ldr r3, [pc, #60] ; (80005cc ) 800058e: 4a11 ldr r2, [pc, #68] ; (80005d4 ) 8000590: 621a str r2, [r3, #32] s.user = "anonymous"; // Anonymous client 8000592: 4b0e ldr r3, [pc, #56] ; (80005cc ) 8000594: 4a10 ldr r2, [pc, #64] ; (80005d8 ) 8000596: 60da str r2, [r3, #12] s.pass = "space2lim@naver.com"; 8000598: 4b0c ldr r3, [pc, #48] ; (80005cc ) 800059a: 4a10 ldr r2, [pc, #64] ; (80005dc ) 800059c: 611a str r2, [r3, #16] // We have no extra user data, simply use the session structure s.handle = &s; 800059e: 4b0b ldr r3, [pc, #44] ; (80005cc ) 80005a0: 4a0a ldr r2, [pc, #40] ; (80005cc ) 80005a2: 615a str r2, [r3, #20] // Start the connection state machine error = lwftp_connect(&s); 80005a4: 4809 ldr r0, [pc, #36] ; (80005cc ) 80005a6: f004 fa09 bl 80049bc 80005aa: 4603 mov r3, r0 80005ac: 71fb strb r3, [r7, #7] if (error != LWFTP_RESULT_INPROGRESS) { 80005ae: f997 3007 ldrsb.w r3, [r7, #7] 80005b2: 2b01 cmp r3, #1 80005b4: d005 beq.n 80005c2 LOG_ERROR("lwftp_connect failed (%d)", error); 80005b6: f997 3007 ldrsb.w r3, [r7, #7] 80005ba: 4619 mov r1, r3 80005bc: 4808 ldr r0, [pc, #32] ; (80005e0 ) 80005be: f7ff ff43 bl 8000448 } // FTP session will continue with the connection callback } 80005c2: bf00 nop 80005c4: 3708 adds r7, #8 80005c6: 46bd mov sp, r7 80005c8: bd80 pop {r7, pc} 80005ca: bf00 nop 80005cc: 240000f0 .word 0x240000f0 80005d0: 6400a8c0 .word 0x6400a8c0 80005d4: 08000535 .word 0x08000535 80005d8: 08011640 .word 0x08011640 80005dc: 0801164c .word 0x0801164c 80005e0: 08011660 .word 0x08011660 080005e4
: /** * @brief The application entry point. * @retval int */ int main(void) { 80005e4: b580 push {r7, lr} 80005e6: b084 sub sp, #16 80005e8: af00 add r7, sp, #0 /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MPU Configuration--------------------------------------------------------*/ MPU_Config(); 80005ea: f000 f929 bl 8000840 if (SCB->CCR & SCB_CCR_IC_Msk) return; /* return if ICache is already enabled */ 80005ee: 4b38 ldr r3, [pc, #224] ; (80006d0 ) 80005f0: 695b ldr r3, [r3, #20] 80005f2: f403 3300 and.w r3, r3, #131072 ; 0x20000 80005f6: 2b00 cmp r3, #0 80005f8: d11b bne.n 8000632 \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"); 80005fa: f3bf 8f4f dsb sy } 80005fe: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8000600: f3bf 8f6f isb sy } 8000604: bf00 nop SCB->ICIALLU = 0UL; /* invalidate I-Cache */ 8000606: 4b32 ldr r3, [pc, #200] ; (80006d0 ) 8000608: 2200 movs r2, #0 800060a: f8c3 2250 str.w r2, [r3, #592] ; 0x250 __ASM volatile ("dsb 0xF":::"memory"); 800060e: f3bf 8f4f dsb sy } 8000612: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8000614: f3bf 8f6f isb sy } 8000618: bf00 nop SCB->CCR |= (uint32_t)SCB_CCR_IC_Msk; /* enable I-Cache */ 800061a: 4b2d ldr r3, [pc, #180] ; (80006d0 ) 800061c: 695b ldr r3, [r3, #20] 800061e: 4a2c ldr r2, [pc, #176] ; (80006d0 ) 8000620: f443 3300 orr.w r3, r3, #131072 ; 0x20000 8000624: 6153 str r3, [r2, #20] __ASM volatile ("dsb 0xF":::"memory"); 8000626: f3bf 8f4f dsb sy } 800062a: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 800062c: f3bf 8f6f isb sy } 8000630: e000 b.n 8000634 if (SCB->CCR & SCB_CCR_IC_Msk) return; /* return if ICache is already enabled */ 8000632: bf00 nop if (SCB->CCR & SCB_CCR_DC_Msk) return; /* return if DCache is already enabled */ 8000634: 4b26 ldr r3, [pc, #152] ; (80006d0 ) 8000636: 695b ldr r3, [r3, #20] 8000638: f403 3380 and.w r3, r3, #65536 ; 0x10000 800063c: 2b00 cmp r3, #0 800063e: d138 bne.n 80006b2 SCB->CSSELR = 0U; /* select Level 1 data cache */ 8000640: 4b23 ldr r3, [pc, #140] ; (80006d0 ) 8000642: 2200 movs r2, #0 8000644: f8c3 2084 str.w r2, [r3, #132] ; 0x84 __ASM volatile ("dsb 0xF":::"memory"); 8000648: f3bf 8f4f dsb sy } 800064c: bf00 nop ccsidr = SCB->CCSIDR; 800064e: 4b20 ldr r3, [pc, #128] ; (80006d0 ) 8000650: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80 8000654: 60fb str r3, [r7, #12] sets = (uint32_t)(CCSIDR_SETS(ccsidr)); 8000656: 68fb ldr r3, [r7, #12] 8000658: 0b5b lsrs r3, r3, #13 800065a: f3c3 030e ubfx r3, r3, #0, #15 800065e: 60bb str r3, [r7, #8] ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); 8000660: 68fb ldr r3, [r7, #12] 8000662: 08db lsrs r3, r3, #3 8000664: f3c3 0309 ubfx r3, r3, #0, #10 8000668: 607b str r3, [r7, #4] SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) | 800066a: 68bb ldr r3, [r7, #8] 800066c: 015a lsls r2, r3, #5 800066e: f643 73e0 movw r3, #16352 ; 0x3fe0 8000672: 4013 ands r3, r2 ((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) ); 8000674: 687a ldr r2, [r7, #4] 8000676: 0792 lsls r2, r2, #30 SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) | 8000678: 4915 ldr r1, [pc, #84] ; (80006d0 ) 800067a: 4313 orrs r3, r2 800067c: f8c1 3260 str.w r3, [r1, #608] ; 0x260 } while (ways-- != 0U); 8000680: 687b ldr r3, [r7, #4] 8000682: 1e5a subs r2, r3, #1 8000684: 607a str r2, [r7, #4] 8000686: 2b00 cmp r3, #0 8000688: d1ef bne.n 800066a } while(sets-- != 0U); 800068a: 68bb ldr r3, [r7, #8] 800068c: 1e5a subs r2, r3, #1 800068e: 60ba str r2, [r7, #8] 8000690: 2b00 cmp r3, #0 8000692: d1e5 bne.n 8000660 __ASM volatile ("dsb 0xF":::"memory"); 8000694: f3bf 8f4f dsb sy } 8000698: bf00 nop SCB->CCR |= (uint32_t)SCB_CCR_DC_Msk; /* enable D-Cache */ 800069a: 4b0d ldr r3, [pc, #52] ; (80006d0 ) 800069c: 695b ldr r3, [r3, #20] 800069e: 4a0c ldr r2, [pc, #48] ; (80006d0 ) 80006a0: f443 3380 orr.w r3, r3, #65536 ; 0x10000 80006a4: 6153 str r3, [r2, #20] __ASM volatile ("dsb 0xF":::"memory"); 80006a6: f3bf 8f4f dsb sy } 80006aa: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 80006ac: f3bf 8f6f isb sy } 80006b0: e000 b.n 80006b4 if (SCB->CCR & SCB_CCR_DC_Msk) return; /* return if DCache is already enabled */ 80006b2: bf00 nop SCB_EnableDCache(); /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); 80006b4: f000 fc24 bl 8000f00 /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); 80006b8: f000 f80c bl 80006d4 /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); 80006bc: f000 f878 bl 80007b0 MX_LWIP_Init(); 80006c0: f004 fa04 bl 8004acc /* Infinite loop */ /* USER CODE BEGIN WHILE */ /* ============ LWFTP Code ============*/ ftp_test(); 80006c4: f7ff ff54 bl 8000570 // ftp_connect(); while (1) { MX_LWIP_Process(); 80006c8: f004 fb40 bl 8004d4c 80006cc: e7fc b.n 80006c8 80006ce: bf00 nop 80006d0: e000ed00 .word 0xe000ed00 080006d4 : /** * @brief System Clock Configuration * @retval None */ void SystemClock_Config(void) { 80006d4: b580 push {r7, lr} 80006d6: b09c sub sp, #112 ; 0x70 80006d8: af00 add r7, sp, #0 RCC_OscInitTypeDef RCC_OscInitStruct = { 0 }; 80006da: f107 0324 add.w r3, r7, #36 ; 0x24 80006de: 224c movs r2, #76 ; 0x4c 80006e0: 2100 movs r1, #0 80006e2: 4618 mov r0, r3 80006e4: f010 fbce bl 8010e84 RCC_ClkInitTypeDef RCC_ClkInitStruct = { 0 }; 80006e8: 1d3b adds r3, r7, #4 80006ea: 2220 movs r2, #32 80006ec: 2100 movs r1, #0 80006ee: 4618 mov r0, r3 80006f0: f010 fbc8 bl 8010e84 /** Supply configuration update enable */ HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY); 80006f4: 2002 movs r0, #2 80006f6: f002 fce9 bl 80030cc /** Configure the main internal regulator output voltage */ __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0); 80006fa: 2300 movs r3, #0 80006fc: 603b str r3, [r7, #0] 80006fe: 4b2b ldr r3, [pc, #172] ; (80007ac ) 8000700: 699b ldr r3, [r3, #24] 8000702: 4a2a ldr r2, [pc, #168] ; (80007ac ) 8000704: f423 4340 bic.w r3, r3, #49152 ; 0xc000 8000708: 6193 str r3, [r2, #24] 800070a: 4b28 ldr r3, [pc, #160] ; (80007ac ) 800070c: 699b ldr r3, [r3, #24] 800070e: f403 4340 and.w r3, r3, #49152 ; 0xc000 8000712: 603b str r3, [r7, #0] 8000714: 683b ldr r3, [r7, #0] while (!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) { 8000716: bf00 nop 8000718: 4b24 ldr r3, [pc, #144] ; (80007ac ) 800071a: 699b ldr r3, [r3, #24] 800071c: f403 5300 and.w r3, r3, #8192 ; 0x2000 8000720: f5b3 5f00 cmp.w r3, #8192 ; 0x2000 8000724: d1f8 bne.n 8000718 } /** Initializes the RCC Oscillators according to the specified parameters * in the RCC_OscInitTypeDef structure. */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; 8000726: 2301 movs r3, #1 8000728: 627b str r3, [r7, #36] ; 0x24 RCC_OscInitStruct.HSEState = RCC_HSE_ON; 800072a: f44f 3380 mov.w r3, #65536 ; 0x10000 800072e: 62bb str r3, [r7, #40] ; 0x28 RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; 8000730: 2302 movs r3, #2 8000732: 64bb str r3, [r7, #72] ; 0x48 RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; 8000734: 2302 movs r3, #2 8000736: 64fb str r3, [r7, #76] ; 0x4c RCC_OscInitStruct.PLL.PLLM = 5; 8000738: 2305 movs r3, #5 800073a: 653b str r3, [r7, #80] ; 0x50 RCC_OscInitStruct.PLL.PLLN = 96; 800073c: 2360 movs r3, #96 ; 0x60 800073e: 657b str r3, [r7, #84] ; 0x54 RCC_OscInitStruct.PLL.PLLP = 1; 8000740: 2301 movs r3, #1 8000742: 65bb str r3, [r7, #88] ; 0x58 RCC_OscInitStruct.PLL.PLLQ = 2; 8000744: 2302 movs r3, #2 8000746: 65fb str r3, [r7, #92] ; 0x5c RCC_OscInitStruct.PLL.PLLR = 2; 8000748: 2302 movs r3, #2 800074a: 663b str r3, [r7, #96] ; 0x60 RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_2; 800074c: 2308 movs r3, #8 800074e: 667b str r3, [r7, #100] ; 0x64 RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE; 8000750: 2300 movs r3, #0 8000752: 66bb str r3, [r7, #104] ; 0x68 RCC_OscInitStruct.PLL.PLLFRACN = 0; 8000754: 2300 movs r3, #0 8000756: 66fb str r3, [r7, #108] ; 0x6c if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { 8000758: f107 0324 add.w r3, r7, #36 ; 0x24 800075c: 4618 mov r0, r3 800075e: f002 fcef bl 8003140 8000762: 4603 mov r3, r0 8000764: 2b00 cmp r3, #0 8000766: d001 beq.n 800076c Error_Handler(); 8000768: f000 f8b7 bl 80008da } /** Initializes the CPU, AHB and APB buses clocks */ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK 800076c: 233f movs r3, #63 ; 0x3f 800076e: 607b str r3, [r7, #4] | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2 | RCC_CLOCKTYPE_D3PCLK1 | RCC_CLOCKTYPE_D1PCLK1; RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; 8000770: 2303 movs r3, #3 8000772: 60bb str r3, [r7, #8] RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1; 8000774: 2300 movs r3, #0 8000776: 60fb str r3, [r7, #12] RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2; 8000778: 2308 movs r3, #8 800077a: 613b str r3, [r7, #16] RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2; 800077c: 2340 movs r3, #64 ; 0x40 800077e: 617b str r3, [r7, #20] RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2; 8000780: 2340 movs r3, #64 ; 0x40 8000782: 61bb str r3, [r7, #24] RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2; 8000784: f44f 6380 mov.w r3, #1024 ; 0x400 8000788: 61fb str r3, [r7, #28] RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2; 800078a: 2340 movs r3, #64 ; 0x40 800078c: 623b str r3, [r7, #32] if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK) { 800078e: 1d3b adds r3, r7, #4 8000790: 2103 movs r1, #3 8000792: 4618 mov r0, r3 8000794: f003 f8ae bl 80038f4 8000798: 4603 mov r3, r0 800079a: 2b00 cmp r3, #0 800079c: d001 beq.n 80007a2 Error_Handler(); 800079e: f000 f89c bl 80008da } } 80007a2: bf00 nop 80007a4: 3770 adds r7, #112 ; 0x70 80007a6: 46bd mov sp, r7 80007a8: bd80 pop {r7, pc} 80007aa: bf00 nop 80007ac: 58024800 .word 0x58024800 080007b0 : /** * @brief GPIO Initialization Function * @param None * @retval None */ static void MX_GPIO_Init(void) { 80007b0: b480 push {r7} 80007b2: b085 sub sp, #20 80007b4: af00 add r7, sp, #0 /* USER CODE BEGIN MX_GPIO_Init_1 */ /* USER CODE END MX_GPIO_Init_1 */ /* GPIO Ports Clock Enable */ __HAL_RCC_GPIOB_CLK_ENABLE(); 80007b6: 4b21 ldr r3, [pc, #132] ; (800083c ) 80007b8: f8d3 30e0 ldr.w r3, [r3, #224] ; 0xe0 80007bc: 4a1f ldr r2, [pc, #124] ; (800083c ) 80007be: f043 0302 orr.w r3, r3, #2 80007c2: f8c2 30e0 str.w r3, [r2, #224] ; 0xe0 80007c6: 4b1d ldr r3, [pc, #116] ; (800083c ) 80007c8: f8d3 30e0 ldr.w r3, [r3, #224] ; 0xe0 80007cc: f003 0302 and.w r3, r3, #2 80007d0: 60fb str r3, [r7, #12] 80007d2: 68fb ldr r3, [r7, #12] __HAL_RCC_GPIOA_CLK_ENABLE(); 80007d4: 4b19 ldr r3, [pc, #100] ; (800083c ) 80007d6: f8d3 30e0 ldr.w r3, [r3, #224] ; 0xe0 80007da: 4a18 ldr r2, [pc, #96] ; (800083c ) 80007dc: f043 0301 orr.w r3, r3, #1 80007e0: f8c2 30e0 str.w r3, [r2, #224] ; 0xe0 80007e4: 4b15 ldr r3, [pc, #84] ; (800083c ) 80007e6: f8d3 30e0 ldr.w r3, [r3, #224] ; 0xe0 80007ea: f003 0301 and.w r3, r3, #1 80007ee: 60bb str r3, [r7, #8] 80007f0: 68bb ldr r3, [r7, #8] __HAL_RCC_GPIOH_CLK_ENABLE(); 80007f2: 4b12 ldr r3, [pc, #72] ; (800083c ) 80007f4: f8d3 30e0 ldr.w r3, [r3, #224] ; 0xe0 80007f8: 4a10 ldr r2, [pc, #64] ; (800083c ) 80007fa: f043 0380 orr.w r3, r3, #128 ; 0x80 80007fe: f8c2 30e0 str.w r3, [r2, #224] ; 0xe0 8000802: 4b0e ldr r3, [pc, #56] ; (800083c ) 8000804: f8d3 30e0 ldr.w r3, [r3, #224] ; 0xe0 8000808: f003 0380 and.w r3, r3, #128 ; 0x80 800080c: 607b str r3, [r7, #4] 800080e: 687b ldr r3, [r7, #4] __HAL_RCC_GPIOC_CLK_ENABLE(); 8000810: 4b0a ldr r3, [pc, #40] ; (800083c ) 8000812: f8d3 30e0 ldr.w r3, [r3, #224] ; 0xe0 8000816: 4a09 ldr r2, [pc, #36] ; (800083c ) 8000818: f043 0304 orr.w r3, r3, #4 800081c: f8c2 30e0 str.w r3, [r2, #224] ; 0xe0 8000820: 4b06 ldr r3, [pc, #24] ; (800083c ) 8000822: f8d3 30e0 ldr.w r3, [r3, #224] ; 0xe0 8000826: f003 0304 and.w r3, r3, #4 800082a: 603b str r3, [r7, #0] 800082c: 683b ldr r3, [r7, #0] /* USER CODE BEGIN MX_GPIO_Init_2 */ /* USER CODE END MX_GPIO_Init_2 */ } 800082e: bf00 nop 8000830: 3714 adds r7, #20 8000832: 46bd mov sp, r7 8000834: f85d 7b04 ldr.w r7, [sp], #4 8000838: 4770 bx lr 800083a: bf00 nop 800083c: 58024400 .word 0x58024400 08000840 : /* USER CODE END 4 */ /* MPU Configuration */ void MPU_Config(void) { 8000840: b580 push {r7, lr} 8000842: b084 sub sp, #16 8000844: af00 add r7, sp, #0 MPU_Region_InitTypeDef MPU_InitStruct = { 0 }; 8000846: 463b mov r3, r7 8000848: 2200 movs r2, #0 800084a: 601a str r2, [r3, #0] 800084c: 605a str r2, [r3, #4] 800084e: 609a str r2, [r3, #8] 8000850: 60da str r2, [r3, #12] /* Disables the MPU */ HAL_MPU_Disable(); 8000852: f000 fd0b bl 800126c /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; 8000856: 2301 movs r3, #1 8000858: 703b strb r3, [r7, #0] MPU_InitStruct.Number = MPU_REGION_NUMBER0; 800085a: 2300 movs r3, #0 800085c: 707b strb r3, [r7, #1] MPU_InitStruct.BaseAddress = 0x0; 800085e: 2300 movs r3, #0 8000860: 607b str r3, [r7, #4] MPU_InitStruct.Size = MPU_REGION_SIZE_4GB; 8000862: 231f movs r3, #31 8000864: 723b strb r3, [r7, #8] MPU_InitStruct.SubRegionDisable = 0x87; 8000866: 2387 movs r3, #135 ; 0x87 8000868: 727b strb r3, [r7, #9] MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; 800086a: 2300 movs r3, #0 800086c: 72bb strb r3, [r7, #10] MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS; 800086e: 2300 movs r3, #0 8000870: 72fb strb r3, [r7, #11] MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE; 8000872: 2301 movs r3, #1 8000874: 733b strb r3, [r7, #12] MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; 8000876: 2301 movs r3, #1 8000878: 737b strb r3, [r7, #13] MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; 800087a: 2300 movs r3, #0 800087c: 73bb strb r3, [r7, #14] MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; 800087e: 2300 movs r3, #0 8000880: 73fb strb r3, [r7, #15] HAL_MPU_ConfigRegion(&MPU_InitStruct); 8000882: 463b mov r3, r7 8000884: 4618 mov r0, r3 8000886: f000 fd29 bl 80012dc /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Number = MPU_REGION_NUMBER1; 800088a: 2301 movs r3, #1 800088c: 707b strb r3, [r7, #1] MPU_InitStruct.BaseAddress = 0x30000000; 800088e: f04f 5340 mov.w r3, #805306368 ; 0x30000000 8000892: 607b str r3, [r7, #4] MPU_InitStruct.Size = MPU_REGION_SIZE_32KB; 8000894: 230e movs r3, #14 8000896: 723b strb r3, [r7, #8] MPU_InitStruct.SubRegionDisable = 0x0; 8000898: 2300 movs r3, #0 800089a: 727b strb r3, [r7, #9] MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1; 800089c: 2301 movs r3, #1 800089e: 72bb strb r3, [r7, #10] MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; 80008a0: 2303 movs r3, #3 80008a2: 72fb strb r3, [r7, #11] MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE; 80008a4: 2300 movs r3, #0 80008a6: 737b strb r3, [r7, #13] HAL_MPU_ConfigRegion(&MPU_InitStruct); 80008a8: 463b mov r3, r7 80008aa: 4618 mov r0, r3 80008ac: f000 fd16 bl 80012dc /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Number = MPU_REGION_NUMBER2; 80008b0: 2302 movs r3, #2 80008b2: 707b strb r3, [r7, #1] MPU_InitStruct.Size = MPU_REGION_SIZE_512B; 80008b4: 2308 movs r3, #8 80008b6: 723b strb r3, [r7, #8] MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; 80008b8: 2300 movs r3, #0 80008ba: 72bb strb r3, [r7, #10] MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; 80008bc: 2301 movs r3, #1 80008be: 737b strb r3, [r7, #13] MPU_InitStruct.IsBufferable = MPU_ACCESS_BUFFERABLE; 80008c0: 2301 movs r3, #1 80008c2: 73fb strb r3, [r7, #15] HAL_MPU_ConfigRegion(&MPU_InitStruct); 80008c4: 463b mov r3, r7 80008c6: 4618 mov r0, r3 80008c8: f000 fd08 bl 80012dc /* Enables the MPU */ HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT); 80008cc: 2004 movs r0, #4 80008ce: f000 fce5 bl 800129c } 80008d2: bf00 nop 80008d4: 3710 adds r7, #16 80008d6: 46bd mov sp, r7 80008d8: bd80 pop {r7, pc} 080008da : /** * @brief This function is executed in case of error occurrence. * @retval None */ void Error_Handler(void) { 80008da: b480 push {r7} 80008dc: af00 add r7, sp, #0 __ASM volatile ("cpsid i" : : : "memory"); 80008de: b672 cpsid i } 80008e0: 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) { 80008e2: e7fe b.n 80008e2 080008e4 : /* USER CODE END 0 */ /** * Initializes the Global MSP. */ void HAL_MspInit(void) { 80008e4: b480 push {r7} 80008e6: b083 sub sp, #12 80008e8: af00 add r7, sp, #0 /* USER CODE BEGIN MspInit 0 */ /* USER CODE END MspInit 0 */ __HAL_RCC_SYSCFG_CLK_ENABLE(); 80008ea: 4b0a ldr r3, [pc, #40] ; (8000914 ) 80008ec: f8d3 30f4 ldr.w r3, [r3, #244] ; 0xf4 80008f0: 4a08 ldr r2, [pc, #32] ; (8000914 ) 80008f2: f043 0302 orr.w r3, r3, #2 80008f6: f8c2 30f4 str.w r3, [r2, #244] ; 0xf4 80008fa: 4b06 ldr r3, [pc, #24] ; (8000914 ) 80008fc: f8d3 30f4 ldr.w r3, [r3, #244] ; 0xf4 8000900: f003 0302 and.w r3, r3, #2 8000904: 607b str r3, [r7, #4] 8000906: 687b ldr r3, [r7, #4] /* System interrupt init*/ /* USER CODE BEGIN MspInit 1 */ /* USER CODE END MspInit 1 */ } 8000908: bf00 nop 800090a: 370c adds r7, #12 800090c: 46bd mov sp, r7 800090e: f85d 7b04 ldr.w r7, [sp], #4 8000912: 4770 bx lr 8000914: 58024400 .word 0x58024400 08000918 : /******************************************************************************/ /** * @brief This function handles Non maskable interrupt. */ void NMI_Handler(void) { 8000918: b480 push {r7} 800091a: 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) 800091c: e7fe b.n 800091c 0800091e : /** * @brief This function handles Hard fault interrupt. */ void HardFault_Handler(void) { 800091e: b480 push {r7} 8000920: af00 add r7, sp, #0 /* USER CODE BEGIN HardFault_IRQn 0 */ /* USER CODE END HardFault_IRQn 0 */ while (1) 8000922: e7fe b.n 8000922 08000924 : /** * @brief This function handles Memory management fault. */ void MemManage_Handler(void) { 8000924: b480 push {r7} 8000926: af00 add r7, sp, #0 /* USER CODE BEGIN MemoryManagement_IRQn 0 */ /* USER CODE END MemoryManagement_IRQn 0 */ while (1) 8000928: e7fe b.n 8000928 0800092a : /** * @brief This function handles Pre-fetch fault, memory access fault. */ void BusFault_Handler(void) { 800092a: b480 push {r7} 800092c: af00 add r7, sp, #0 /* USER CODE BEGIN BusFault_IRQn 0 */ /* USER CODE END BusFault_IRQn 0 */ while (1) 800092e: e7fe b.n 800092e 08000930 : /** * @brief This function handles Undefined instruction or illegal state. */ void UsageFault_Handler(void) { 8000930: b480 push {r7} 8000932: af00 add r7, sp, #0 /* USER CODE BEGIN UsageFault_IRQn 0 */ /* USER CODE END UsageFault_IRQn 0 */ while (1) 8000934: e7fe b.n 8000934 08000936 : /** * @brief This function handles System service call via SWI instruction. */ void SVC_Handler(void) { 8000936: b480 push {r7} 8000938: af00 add r7, sp, #0 /* USER CODE END SVCall_IRQn 0 */ /* USER CODE BEGIN SVCall_IRQn 1 */ /* USER CODE END SVCall_IRQn 1 */ } 800093a: bf00 nop 800093c: 46bd mov sp, r7 800093e: f85d 7b04 ldr.w r7, [sp], #4 8000942: 4770 bx lr 08000944 : /** * @brief This function handles Debug monitor. */ void DebugMon_Handler(void) { 8000944: b480 push {r7} 8000946: af00 add r7, sp, #0 /* USER CODE END DebugMonitor_IRQn 0 */ /* USER CODE BEGIN DebugMonitor_IRQn 1 */ /* USER CODE END DebugMonitor_IRQn 1 */ } 8000948: bf00 nop 800094a: 46bd mov sp, r7 800094c: f85d 7b04 ldr.w r7, [sp], #4 8000950: 4770 bx lr 08000952 : /** * @brief This function handles Pendable request for system service. */ void PendSV_Handler(void) { 8000952: b480 push {r7} 8000954: af00 add r7, sp, #0 /* USER CODE END PendSV_IRQn 0 */ /* USER CODE BEGIN PendSV_IRQn 1 */ /* USER CODE END PendSV_IRQn 1 */ } 8000956: bf00 nop 8000958: 46bd mov sp, r7 800095a: f85d 7b04 ldr.w r7, [sp], #4 800095e: 4770 bx lr 08000960 : /** * @brief This function handles System tick timer. */ void SysTick_Handler(void) { 8000960: b580 push {r7, lr} 8000962: af00 add r7, sp, #0 /* USER CODE BEGIN SysTick_IRQn 0 */ /* USER CODE END SysTick_IRQn 0 */ HAL_IncTick(); 8000964: f000 fb3e bl 8000fe4 /* USER CODE BEGIN SysTick_IRQn 1 */ /* USER CODE END SysTick_IRQn 1 */ } 8000968: bf00 nop 800096a: bd80 pop {r7, pc} 0800096c : /** * @brief This function handles Ethernet global interrupt. */ void ETH_IRQHandler(void) { 800096c: b580 push {r7, lr} 800096e: af00 add r7, sp, #0 /* USER CODE BEGIN ETH_IRQn 0 */ /* USER CODE END ETH_IRQn 0 */ HAL_ETH_IRQHandler(&heth); 8000970: 4802 ldr r0, [pc, #8] ; (800097c ) 8000972: f001 f855 bl 8001a20 /* USER CODE BEGIN ETH_IRQn 1 */ /* USER CODE END ETH_IRQn 1 */ } 8000976: bf00 nop 8000978: bd80 pop {r7, pc} 800097a: bf00 nop 800097c: 24004b08 .word 0x24004b08 08000980 <_getpid>: void initialise_monitor_handles() { } int _getpid(void) { 8000980: b480 push {r7} 8000982: af00 add r7, sp, #0 return 1; 8000984: 2301 movs r3, #1 } 8000986: 4618 mov r0, r3 8000988: 46bd mov sp, r7 800098a: f85d 7b04 ldr.w r7, [sp], #4 800098e: 4770 bx lr 08000990 <_kill>: int _kill(int pid, int sig) { 8000990: b480 push {r7} 8000992: b083 sub sp, #12 8000994: af00 add r7, sp, #0 8000996: 6078 str r0, [r7, #4] 8000998: 6039 str r1, [r7, #0] (void)pid; (void)sig; errno = EINVAL; 800099a: 4b05 ldr r3, [pc, #20] ; (80009b0 <_kill+0x20>) 800099c: 2216 movs r2, #22 800099e: 601a str r2, [r3, #0] return -1; 80009a0: f04f 33ff mov.w r3, #4294967295 } 80009a4: 4618 mov r0, r3 80009a6: 370c adds r7, #12 80009a8: 46bd mov sp, r7 80009aa: f85d 7b04 ldr.w r7, [sp], #4 80009ae: 4770 bx lr 80009b0: 24007e08 .word 0x24007e08 080009b4 <_exit>: void _exit (int status) { 80009b4: b580 push {r7, lr} 80009b6: b082 sub sp, #8 80009b8: af00 add r7, sp, #0 80009ba: 6078 str r0, [r7, #4] _kill(status, -1); 80009bc: f04f 31ff mov.w r1, #4294967295 80009c0: 6878 ldr r0, [r7, #4] 80009c2: f7ff ffe5 bl 8000990 <_kill> while (1) {} /* Make sure we hang here */ 80009c6: e7fe b.n 80009c6 <_exit+0x12> 080009c8 <_read>: } __attribute__((weak)) int _read(int file, char *ptr, int len) { 80009c8: b580 push {r7, lr} 80009ca: b086 sub sp, #24 80009cc: af00 add r7, sp, #0 80009ce: 60f8 str r0, [r7, #12] 80009d0: 60b9 str r1, [r7, #8] 80009d2: 607a str r2, [r7, #4] (void)file; int DataIdx; for (DataIdx = 0; DataIdx < len; DataIdx++) 80009d4: 2300 movs r3, #0 80009d6: 617b str r3, [r7, #20] 80009d8: e00a b.n 80009f0 <_read+0x28> { *ptr++ = __io_getchar(); 80009da: f3af 8000 nop.w 80009de: 4601 mov r1, r0 80009e0: 68bb ldr r3, [r7, #8] 80009e2: 1c5a adds r2, r3, #1 80009e4: 60ba str r2, [r7, #8] 80009e6: b2ca uxtb r2, r1 80009e8: 701a strb r2, [r3, #0] for (DataIdx = 0; DataIdx < len; DataIdx++) 80009ea: 697b ldr r3, [r7, #20] 80009ec: 3301 adds r3, #1 80009ee: 617b str r3, [r7, #20] 80009f0: 697a ldr r2, [r7, #20] 80009f2: 687b ldr r3, [r7, #4] 80009f4: 429a cmp r2, r3 80009f6: dbf0 blt.n 80009da <_read+0x12> } return len; 80009f8: 687b ldr r3, [r7, #4] } 80009fa: 4618 mov r0, r3 80009fc: 3718 adds r7, #24 80009fe: 46bd mov sp, r7 8000a00: bd80 pop {r7, pc} 08000a02 <_close>: } return len; } int _close(int file) { 8000a02: b480 push {r7} 8000a04: b083 sub sp, #12 8000a06: af00 add r7, sp, #0 8000a08: 6078 str r0, [r7, #4] (void)file; return -1; 8000a0a: f04f 33ff mov.w r3, #4294967295 } 8000a0e: 4618 mov r0, r3 8000a10: 370c adds r7, #12 8000a12: 46bd mov sp, r7 8000a14: f85d 7b04 ldr.w r7, [sp], #4 8000a18: 4770 bx lr 08000a1a <_fstat>: int _fstat(int file, struct stat *st) { 8000a1a: b480 push {r7} 8000a1c: b083 sub sp, #12 8000a1e: af00 add r7, sp, #0 8000a20: 6078 str r0, [r7, #4] 8000a22: 6039 str r1, [r7, #0] (void)file; st->st_mode = S_IFCHR; 8000a24: 683b ldr r3, [r7, #0] 8000a26: f44f 5200 mov.w r2, #8192 ; 0x2000 8000a2a: 605a str r2, [r3, #4] return 0; 8000a2c: 2300 movs r3, #0 } 8000a2e: 4618 mov r0, r3 8000a30: 370c adds r7, #12 8000a32: 46bd mov sp, r7 8000a34: f85d 7b04 ldr.w r7, [sp], #4 8000a38: 4770 bx lr 08000a3a <_isatty>: int _isatty(int file) { 8000a3a: b480 push {r7} 8000a3c: b083 sub sp, #12 8000a3e: af00 add r7, sp, #0 8000a40: 6078 str r0, [r7, #4] (void)file; return 1; 8000a42: 2301 movs r3, #1 } 8000a44: 4618 mov r0, r3 8000a46: 370c adds r7, #12 8000a48: 46bd mov sp, r7 8000a4a: f85d 7b04 ldr.w r7, [sp], #4 8000a4e: 4770 bx lr 08000a50 <_lseek>: int _lseek(int file, int ptr, int dir) { 8000a50: b480 push {r7} 8000a52: b085 sub sp, #20 8000a54: af00 add r7, sp, #0 8000a56: 60f8 str r0, [r7, #12] 8000a58: 60b9 str r1, [r7, #8] 8000a5a: 607a str r2, [r7, #4] (void)file; (void)ptr; (void)dir; return 0; 8000a5c: 2300 movs r3, #0 } 8000a5e: 4618 mov r0, r3 8000a60: 3714 adds r7, #20 8000a62: 46bd mov sp, r7 8000a64: f85d 7b04 ldr.w r7, [sp], #4 8000a68: 4770 bx lr ... 08000a6c <_sbrk>: * * @param incr Memory size * @return Pointer to allocated memory */ void *_sbrk(ptrdiff_t incr) { 8000a6c: b480 push {r7} 8000a6e: b087 sub sp, #28 8000a70: af00 add r7, sp, #0 8000a72: 6078 str r0, [r7, #4] extern uint8_t _end; /* Symbol defined in the linker script */ extern uint8_t _estack; /* Symbol defined in the linker script */ extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */ const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size; 8000a74: 4a14 ldr r2, [pc, #80] ; (8000ac8 <_sbrk+0x5c>) 8000a76: 4b15 ldr r3, [pc, #84] ; (8000acc <_sbrk+0x60>) 8000a78: 1ad3 subs r3, r2, r3 8000a7a: 617b str r3, [r7, #20] const uint8_t *max_heap = (uint8_t *)stack_limit; 8000a7c: 697b ldr r3, [r7, #20] 8000a7e: 613b str r3, [r7, #16] uint8_t *prev_heap_end; /* Initialize heap end at first call */ if (NULL == __sbrk_heap_end) 8000a80: 4b13 ldr r3, [pc, #76] ; (8000ad0 <_sbrk+0x64>) 8000a82: 681b ldr r3, [r3, #0] 8000a84: 2b00 cmp r3, #0 8000a86: d102 bne.n 8000a8e <_sbrk+0x22> { __sbrk_heap_end = &_end; 8000a88: 4b11 ldr r3, [pc, #68] ; (8000ad0 <_sbrk+0x64>) 8000a8a: 4a12 ldr r2, [pc, #72] ; (8000ad4 <_sbrk+0x68>) 8000a8c: 601a str r2, [r3, #0] } /* Protect heap from growing into the reserved MSP stack */ if (__sbrk_heap_end + incr > max_heap) 8000a8e: 4b10 ldr r3, [pc, #64] ; (8000ad0 <_sbrk+0x64>) 8000a90: 681a ldr r2, [r3, #0] 8000a92: 687b ldr r3, [r7, #4] 8000a94: 4413 add r3, r2 8000a96: 693a ldr r2, [r7, #16] 8000a98: 429a cmp r2, r3 8000a9a: d205 bcs.n 8000aa8 <_sbrk+0x3c> { errno = ENOMEM; 8000a9c: 4b0e ldr r3, [pc, #56] ; (8000ad8 <_sbrk+0x6c>) 8000a9e: 220c movs r2, #12 8000aa0: 601a str r2, [r3, #0] return (void *)-1; 8000aa2: f04f 33ff mov.w r3, #4294967295 8000aa6: e009 b.n 8000abc <_sbrk+0x50> } prev_heap_end = __sbrk_heap_end; 8000aa8: 4b09 ldr r3, [pc, #36] ; (8000ad0 <_sbrk+0x64>) 8000aaa: 681b ldr r3, [r3, #0] 8000aac: 60fb str r3, [r7, #12] __sbrk_heap_end += incr; 8000aae: 4b08 ldr r3, [pc, #32] ; (8000ad0 <_sbrk+0x64>) 8000ab0: 681a ldr r2, [r3, #0] 8000ab2: 687b ldr r3, [r7, #4] 8000ab4: 4413 add r3, r2 8000ab6: 4a06 ldr r2, [pc, #24] ; (8000ad0 <_sbrk+0x64>) 8000ab8: 6013 str r3, [r2, #0] return (void *)prev_heap_end; 8000aba: 68fb ldr r3, [r7, #12] } 8000abc: 4618 mov r0, r3 8000abe: 371c adds r7, #28 8000ac0: 46bd mov sp, r7 8000ac2: f85d 7b04 ldr.w r7, [sp], #4 8000ac6: 4770 bx lr 8000ac8: 24050000 .word 0x24050000 8000acc: 00000400 .word 0x00000400 8000ad0: 24000124 .word 0x24000124 8000ad4: 24007e18 .word 0x24007e18 8000ad8: 24007e08 .word 0x24007e08 08000adc : * configuration. * @param None * @retval None */ void SystemInit (void) { 8000adc: b480 push {r7} 8000ade: b083 sub sp, #12 8000ae0: af00 add r7, sp, #0 __IO uint32_t tmpreg; #endif /* DATA_IN_D2_SRAM */ /* FPU settings ------------------------------------------------------------*/ #if (__FPU_PRESENT == 1) && (__FPU_USED == 1) SCB->CPACR |= ((3UL << (10*2))|(3UL << (11*2))); /* set CP10 and CP11 Full Access */ 8000ae2: 4b3a ldr r3, [pc, #232] ; (8000bcc ) 8000ae4: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 8000ae8: 4a38 ldr r2, [pc, #224] ; (8000bcc ) 8000aea: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000 8000aee: f8c2 3088 str.w r3, [r2, #136] ; 0x88 #endif /* Reset the RCC clock configuration to the default reset state ------------*/ /* Increasing the CPU frequency */ if(FLASH_LATENCY_DEFAULT > (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) 8000af2: 4b37 ldr r3, [pc, #220] ; (8000bd0 ) 8000af4: 681b ldr r3, [r3, #0] 8000af6: f003 030f and.w r3, r3, #15 8000afa: 2b06 cmp r3, #6 8000afc: d807 bhi.n 8000b0e { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); 8000afe: 4b34 ldr r3, [pc, #208] ; (8000bd0 ) 8000b00: 681b ldr r3, [r3, #0] 8000b02: f023 030f bic.w r3, r3, #15 8000b06: 4a32 ldr r2, [pc, #200] ; (8000bd0 ) 8000b08: f043 0307 orr.w r3, r3, #7 8000b0c: 6013 str r3, [r2, #0] } /* Set HSION bit */ RCC->CR |= RCC_CR_HSION; 8000b0e: 4b31 ldr r3, [pc, #196] ; (8000bd4 ) 8000b10: 681b ldr r3, [r3, #0] 8000b12: 4a30 ldr r2, [pc, #192] ; (8000bd4 ) 8000b14: f043 0301 orr.w r3, r3, #1 8000b18: 6013 str r3, [r2, #0] /* Reset CFGR register */ RCC->CFGR = 0x00000000; 8000b1a: 4b2e ldr r3, [pc, #184] ; (8000bd4 ) 8000b1c: 2200 movs r2, #0 8000b1e: 611a str r2, [r3, #16] /* Reset HSEON, HSECSSON, CSION, HSI48ON, CSIKERON, PLL1ON, PLL2ON and PLL3ON bits */ RCC->CR &= 0xEAF6ED7FU; 8000b20: 4b2c ldr r3, [pc, #176] ; (8000bd4 ) 8000b22: 681a ldr r2, [r3, #0] 8000b24: 492b ldr r1, [pc, #172] ; (8000bd4 ) 8000b26: 4b2c ldr r3, [pc, #176] ; (8000bd8 ) 8000b28: 4013 ands r3, r2 8000b2a: 600b str r3, [r1, #0] /* Decreasing the number of wait states because of lower CPU frequency */ if(FLASH_LATENCY_DEFAULT < (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) 8000b2c: 4b28 ldr r3, [pc, #160] ; (8000bd0 ) 8000b2e: 681b ldr r3, [r3, #0] 8000b30: f003 0308 and.w r3, r3, #8 8000b34: 2b00 cmp r3, #0 8000b36: d007 beq.n 8000b48 { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); 8000b38: 4b25 ldr r3, [pc, #148] ; (8000bd0 ) 8000b3a: 681b ldr r3, [r3, #0] 8000b3c: f023 030f bic.w r3, r3, #15 8000b40: 4a23 ldr r2, [pc, #140] ; (8000bd0 ) 8000b42: f043 0307 orr.w r3, r3, #7 8000b46: 6013 str r3, [r2, #0] } #if defined(D3_SRAM_BASE) /* Reset D1CFGR register */ RCC->D1CFGR = 0x00000000; 8000b48: 4b22 ldr r3, [pc, #136] ; (8000bd4 ) 8000b4a: 2200 movs r2, #0 8000b4c: 619a str r2, [r3, #24] /* Reset D2CFGR register */ RCC->D2CFGR = 0x00000000; 8000b4e: 4b21 ldr r3, [pc, #132] ; (8000bd4 ) 8000b50: 2200 movs r2, #0 8000b52: 61da str r2, [r3, #28] /* Reset D3CFGR register */ RCC->D3CFGR = 0x00000000; 8000b54: 4b1f ldr r3, [pc, #124] ; (8000bd4 ) 8000b56: 2200 movs r2, #0 8000b58: 621a str r2, [r3, #32] /* Reset SRDCFGR register */ RCC->SRDCFGR = 0x00000000; #endif /* Reset PLLCKSELR register */ RCC->PLLCKSELR = 0x02020200; 8000b5a: 4b1e ldr r3, [pc, #120] ; (8000bd4 ) 8000b5c: 4a1f ldr r2, [pc, #124] ; (8000bdc ) 8000b5e: 629a str r2, [r3, #40] ; 0x28 /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x01FF0000; 8000b60: 4b1c ldr r3, [pc, #112] ; (8000bd4 ) 8000b62: 4a1f ldr r2, [pc, #124] ; (8000be0 ) 8000b64: 62da str r2, [r3, #44] ; 0x2c /* Reset PLL1DIVR register */ RCC->PLL1DIVR = 0x01010280; 8000b66: 4b1b ldr r3, [pc, #108] ; (8000bd4 ) 8000b68: 4a1e ldr r2, [pc, #120] ; (8000be4 ) 8000b6a: 631a str r2, [r3, #48] ; 0x30 /* Reset PLL1FRACR register */ RCC->PLL1FRACR = 0x00000000; 8000b6c: 4b19 ldr r3, [pc, #100] ; (8000bd4 ) 8000b6e: 2200 movs r2, #0 8000b70: 635a str r2, [r3, #52] ; 0x34 /* Reset PLL2DIVR register */ RCC->PLL2DIVR = 0x01010280; 8000b72: 4b18 ldr r3, [pc, #96] ; (8000bd4 ) 8000b74: 4a1b ldr r2, [pc, #108] ; (8000be4 ) 8000b76: 639a str r2, [r3, #56] ; 0x38 /* Reset PLL2FRACR register */ RCC->PLL2FRACR = 0x00000000; 8000b78: 4b16 ldr r3, [pc, #88] ; (8000bd4 ) 8000b7a: 2200 movs r2, #0 8000b7c: 63da str r2, [r3, #60] ; 0x3c /* Reset PLL3DIVR register */ RCC->PLL3DIVR = 0x01010280; 8000b7e: 4b15 ldr r3, [pc, #84] ; (8000bd4 ) 8000b80: 4a18 ldr r2, [pc, #96] ; (8000be4 ) 8000b82: 641a str r2, [r3, #64] ; 0x40 /* Reset PLL3FRACR register */ RCC->PLL3FRACR = 0x00000000; 8000b84: 4b13 ldr r3, [pc, #76] ; (8000bd4 ) 8000b86: 2200 movs r2, #0 8000b88: 645a str r2, [r3, #68] ; 0x44 /* Reset HSEBYP bit */ RCC->CR &= 0xFFFBFFFFU; 8000b8a: 4b12 ldr r3, [pc, #72] ; (8000bd4 ) 8000b8c: 681b ldr r3, [r3, #0] 8000b8e: 4a11 ldr r2, [pc, #68] ; (8000bd4 ) 8000b90: f423 2380 bic.w r3, r3, #262144 ; 0x40000 8000b94: 6013 str r3, [r2, #0] /* Disable all interrupts */ RCC->CIER = 0x00000000; 8000b96: 4b0f ldr r3, [pc, #60] ; (8000bd4 ) 8000b98: 2200 movs r2, #0 8000b9a: 661a str r2, [r3, #96] ; 0x60 #if defined(DATA_IN_D2_SRAM) /* in case of initialized data in D2 SRAM (AHB SRAM), enable the D2 SRAM clock (AHB SRAM clock) */ #if defined(RCC_AHB2ENR_D2SRAM3EN) RCC->AHB2ENR |= (RCC_AHB2ENR_D2SRAM1EN | RCC_AHB2ENR_D2SRAM2EN | RCC_AHB2ENR_D2SRAM3EN); #elif defined(RCC_AHB2ENR_D2SRAM2EN) RCC->AHB2ENR |= (RCC_AHB2ENR_D2SRAM1EN | RCC_AHB2ENR_D2SRAM2EN); 8000b9c: 4b0d ldr r3, [pc, #52] ; (8000bd4 ) 8000b9e: f8d3 30dc ldr.w r3, [r3, #220] ; 0xdc 8000ba2: 4a0c ldr r2, [pc, #48] ; (8000bd4 ) 8000ba4: f043 43c0 orr.w r3, r3, #1610612736 ; 0x60000000 8000ba8: f8c2 30dc str.w r3, [r2, #220] ; 0xdc #else RCC->AHB2ENR |= (RCC_AHB2ENR_AHBSRAM1EN | RCC_AHB2ENR_AHBSRAM2EN); #endif /* RCC_AHB2ENR_D2SRAM3EN */ tmpreg = RCC->AHB2ENR; 8000bac: 4b09 ldr r3, [pc, #36] ; (8000bd4 ) 8000bae: f8d3 30dc ldr.w r3, [r3, #220] ; 0xdc 8000bb2: 607b str r3, [r7, #4] (void) tmpreg; 8000bb4: 687b ldr r3, [r7, #4] /* * Disable the FMC bank1 (enabled after reset). * This, prevents CPU speculation access on this bank which blocks the use of FMC during * 24us. During this time the others FMC master (such as LTDC) cannot use it! */ FMC_Bank1_R->BTCR[0] = 0x000030D2; 8000bb6: 4b0c ldr r3, [pc, #48] ; (8000be8 ) 8000bb8: f243 02d2 movw r2, #12498 ; 0x30d2 8000bbc: 601a str r2, [r3, #0] #if defined(USER_VECT_TAB_ADDRESS) SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal D1 AXI-RAM or in Internal FLASH */ #endif /* USER_VECT_TAB_ADDRESS */ #endif /*DUAL_CORE && CORE_CM4*/ } 8000bbe: bf00 nop 8000bc0: 370c adds r7, #12 8000bc2: 46bd mov sp, r7 8000bc4: f85d 7b04 ldr.w r7, [sp], #4 8000bc8: 4770 bx lr 8000bca: bf00 nop 8000bcc: e000ed00 .word 0xe000ed00 8000bd0: 52002000 .word 0x52002000 8000bd4: 58024400 .word 0x58024400 8000bd8: eaf6ed7f .word 0xeaf6ed7f 8000bdc: 02020200 .word 0x02020200 8000be0: 01ff0000 .word 0x01ff0000 8000be4: 01010280 .word 0x01010280 8000be8: 52004000 .word 0x52004000 08000bec : .section .text.Reset_Handler .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: ldr sp, =_estack /* set stack pointer */ 8000bec: f8df d034 ldr.w sp, [pc, #52] ; 8000c24 /* Call the clock system initialization function.*/ bl SystemInit 8000bf0: f7ff ff74 bl 8000adc /* Copy the data segment initializers from flash to SRAM */ ldr r0, =_sdata 8000bf4: 480c ldr r0, [pc, #48] ; (8000c28 ) ldr r1, =_edata 8000bf6: 490d ldr r1, [pc, #52] ; (8000c2c ) ldr r2, =_sidata 8000bf8: 4a0d ldr r2, [pc, #52] ; (8000c30 ) movs r3, #0 8000bfa: 2300 movs r3, #0 b LoopCopyDataInit 8000bfc: e002 b.n 8000c04 08000bfe : CopyDataInit: ldr r4, [r2, r3] 8000bfe: 58d4 ldr r4, [r2, r3] str r4, [r0, r3] 8000c00: 50c4 str r4, [r0, r3] adds r3, r3, #4 8000c02: 3304 adds r3, #4 08000c04 : LoopCopyDataInit: adds r4, r0, r3 8000c04: 18c4 adds r4, r0, r3 cmp r4, r1 8000c06: 428c cmp r4, r1 bcc CopyDataInit 8000c08: d3f9 bcc.n 8000bfe /* Zero fill the bss segment. */ ldr r2, =_sbss 8000c0a: 4a0a ldr r2, [pc, #40] ; (8000c34 ) ldr r4, =_ebss 8000c0c: 4c0a ldr r4, [pc, #40] ; (8000c38 ) movs r3, #0 8000c0e: 2300 movs r3, #0 b LoopFillZerobss 8000c10: e001 b.n 8000c16 08000c12 : FillZerobss: str r3, [r2] 8000c12: 6013 str r3, [r2, #0] adds r2, r2, #4 8000c14: 3204 adds r2, #4 08000c16 : LoopFillZerobss: cmp r2, r4 8000c16: 42a2 cmp r2, r4 bcc FillZerobss 8000c18: d3fb bcc.n 8000c12 /* Call static constructors */ bl __libc_init_array 8000c1a: f010 f98f bl 8010f3c <__libc_init_array> /* Call the application's entry point.*/ bl main 8000c1e: f7ff fce1 bl 80005e4
bx lr 8000c22: 4770 bx lr ldr sp, =_estack /* set stack pointer */ 8000c24: 24050000 .word 0x24050000 ldr r0, =_sdata 8000c28: 24000000 .word 0x24000000 ldr r1, =_edata 8000c2c: 240000d0 .word 0x240000d0 ldr r2, =_sidata 8000c30: 08014f90 .word 0x08014f90 ldr r2, =_sbss 8000c34: 240000d0 .word 0x240000d0 ldr r4, =_ebss 8000c38: 24007e18 .word 0x24007e18 08000c3c : * @retval None */ .section .text.Default_Handler,"ax",%progbits Default_Handler: Infinite_Loop: b Infinite_Loop 8000c3c: e7fe b.n 8000c3c 08000c3e : * @param ioctx: holds device IO functions. * @retval LAN8742_STATUS_OK if OK * LAN8742_STATUS_ERROR if missing mandatory function */ int32_t LAN8742_RegisterBusIO(lan8742_Object_t *pObj, lan8742_IOCtx_t *ioctx) { 8000c3e: b480 push {r7} 8000c40: b083 sub sp, #12 8000c42: af00 add r7, sp, #0 8000c44: 6078 str r0, [r7, #4] 8000c46: 6039 str r1, [r7, #0] if(!pObj || !ioctx->ReadReg || !ioctx->WriteReg || !ioctx->GetTick) 8000c48: 687b ldr r3, [r7, #4] 8000c4a: 2b00 cmp r3, #0 8000c4c: d00b beq.n 8000c66 8000c4e: 683b ldr r3, [r7, #0] 8000c50: 68db ldr r3, [r3, #12] 8000c52: 2b00 cmp r3, #0 8000c54: d007 beq.n 8000c66 8000c56: 683b ldr r3, [r7, #0] 8000c58: 689b ldr r3, [r3, #8] 8000c5a: 2b00 cmp r3, #0 8000c5c: d003 beq.n 8000c66 8000c5e: 683b ldr r3, [r7, #0] 8000c60: 691b ldr r3, [r3, #16] 8000c62: 2b00 cmp r3, #0 8000c64: d102 bne.n 8000c6c { return LAN8742_STATUS_ERROR; 8000c66: f04f 33ff mov.w r3, #4294967295 8000c6a: e014 b.n 8000c96 } pObj->IO.Init = ioctx->Init; 8000c6c: 683b ldr r3, [r7, #0] 8000c6e: 681a ldr r2, [r3, #0] 8000c70: 687b ldr r3, [r7, #4] 8000c72: 609a str r2, [r3, #8] pObj->IO.DeInit = ioctx->DeInit; 8000c74: 683b ldr r3, [r7, #0] 8000c76: 685a ldr r2, [r3, #4] 8000c78: 687b ldr r3, [r7, #4] 8000c7a: 60da str r2, [r3, #12] pObj->IO.ReadReg = ioctx->ReadReg; 8000c7c: 683b ldr r3, [r7, #0] 8000c7e: 68da ldr r2, [r3, #12] 8000c80: 687b ldr r3, [r7, #4] 8000c82: 615a str r2, [r3, #20] pObj->IO.WriteReg = ioctx->WriteReg; 8000c84: 683b ldr r3, [r7, #0] 8000c86: 689a ldr r2, [r3, #8] 8000c88: 687b ldr r3, [r7, #4] 8000c8a: 611a str r2, [r3, #16] pObj->IO.GetTick = ioctx->GetTick; 8000c8c: 683b ldr r3, [r7, #0] 8000c8e: 691a ldr r2, [r3, #16] 8000c90: 687b ldr r3, [r7, #4] 8000c92: 619a str r2, [r3, #24] return LAN8742_STATUS_OK; 8000c94: 2300 movs r3, #0 } 8000c96: 4618 mov r0, r3 8000c98: 370c adds r7, #12 8000c9a: 46bd mov sp, r7 8000c9c: f85d 7b04 ldr.w r7, [sp], #4 8000ca0: 4770 bx lr 08000ca2 : * LAN8742_STATUS_READ_ERROR if connot read register * LAN8742_STATUS_WRITE_ERROR if connot write to register * LAN8742_STATUS_RESET_TIMEOUT if cannot perform a software reset */ int32_t LAN8742_Init(lan8742_Object_t *pObj) { 8000ca2: b580 push {r7, lr} 8000ca4: b086 sub sp, #24 8000ca6: af00 add r7, sp, #0 8000ca8: 6078 str r0, [r7, #4] uint32_t tickstart = 0, regvalue = 0, addr = 0; 8000caa: 2300 movs r3, #0 8000cac: 60fb str r3, [r7, #12] 8000cae: 2300 movs r3, #0 8000cb0: 60bb str r3, [r7, #8] 8000cb2: 2300 movs r3, #0 8000cb4: 617b str r3, [r7, #20] int32_t status = LAN8742_STATUS_OK; 8000cb6: 2300 movs r3, #0 8000cb8: 613b str r3, [r7, #16] if(pObj->Is_Initialized == 0) 8000cba: 687b ldr r3, [r7, #4] 8000cbc: 685b ldr r3, [r3, #4] 8000cbe: 2b00 cmp r3, #0 8000cc0: d17c bne.n 8000dbc { if(pObj->IO.Init != 0) 8000cc2: 687b ldr r3, [r7, #4] 8000cc4: 689b ldr r3, [r3, #8] 8000cc6: 2b00 cmp r3, #0 8000cc8: d002 beq.n 8000cd0 { /* GPIO and Clocks initialization */ pObj->IO.Init(); 8000cca: 687b ldr r3, [r7, #4] 8000ccc: 689b ldr r3, [r3, #8] 8000cce: 4798 blx r3 } /* for later check */ pObj->DevAddr = LAN8742_MAX_DEV_ADDR + 1; 8000cd0: 687b ldr r3, [r7, #4] 8000cd2: 2220 movs r2, #32 8000cd4: 601a str r2, [r3, #0] /* Get the device address from special mode register */ for(addr = 0; addr <= LAN8742_MAX_DEV_ADDR; addr ++) 8000cd6: 2300 movs r3, #0 8000cd8: 617b str r3, [r7, #20] 8000cda: e01c b.n 8000d16 { if(pObj->IO.ReadReg(addr, LAN8742_SMR, ®value) < 0) 8000cdc: 687b ldr r3, [r7, #4] 8000cde: 695b ldr r3, [r3, #20] 8000ce0: f107 0208 add.w r2, r7, #8 8000ce4: 2112 movs r1, #18 8000ce6: 6978 ldr r0, [r7, #20] 8000ce8: 4798 blx r3 8000cea: 4603 mov r3, r0 8000cec: 2b00 cmp r3, #0 8000cee: da03 bge.n 8000cf8 { status = LAN8742_STATUS_READ_ERROR; 8000cf0: f06f 0304 mvn.w r3, #4 8000cf4: 613b str r3, [r7, #16] /* Can't read from this device address continue with next address */ continue; 8000cf6: e00b b.n 8000d10 } if((regvalue & LAN8742_SMR_PHY_ADDR) == addr) 8000cf8: 68bb ldr r3, [r7, #8] 8000cfa: f003 031f and.w r3, r3, #31 8000cfe: 697a ldr r2, [r7, #20] 8000d00: 429a cmp r2, r3 8000d02: d105 bne.n 8000d10 { pObj->DevAddr = addr; 8000d04: 687b ldr r3, [r7, #4] 8000d06: 697a ldr r2, [r7, #20] 8000d08: 601a str r2, [r3, #0] status = LAN8742_STATUS_OK; 8000d0a: 2300 movs r3, #0 8000d0c: 613b str r3, [r7, #16] break; 8000d0e: e005 b.n 8000d1c for(addr = 0; addr <= LAN8742_MAX_DEV_ADDR; addr ++) 8000d10: 697b ldr r3, [r7, #20] 8000d12: 3301 adds r3, #1 8000d14: 617b str r3, [r7, #20] 8000d16: 697b ldr r3, [r7, #20] 8000d18: 2b1f cmp r3, #31 8000d1a: d9df bls.n 8000cdc } } if(pObj->DevAddr > LAN8742_MAX_DEV_ADDR) 8000d1c: 687b ldr r3, [r7, #4] 8000d1e: 681b ldr r3, [r3, #0] 8000d20: 2b1f cmp r3, #31 8000d22: d902 bls.n 8000d2a { status = LAN8742_STATUS_ADDRESS_ERROR; 8000d24: f06f 0302 mvn.w r3, #2 8000d28: 613b str r3, [r7, #16] } /* if device address is matched */ if(status == LAN8742_STATUS_OK) 8000d2a: 693b ldr r3, [r7, #16] 8000d2c: 2b00 cmp r3, #0 8000d2e: d145 bne.n 8000dbc { /* set a software reset */ if(pObj->IO.WriteReg(pObj->DevAddr, LAN8742_BCR, LAN8742_BCR_SOFT_RESET) >= 0) 8000d30: 687b ldr r3, [r7, #4] 8000d32: 691b ldr r3, [r3, #16] 8000d34: 687a ldr r2, [r7, #4] 8000d36: 6810 ldr r0, [r2, #0] 8000d38: f44f 4200 mov.w r2, #32768 ; 0x8000 8000d3c: 2100 movs r1, #0 8000d3e: 4798 blx r3 8000d40: 4603 mov r3, r0 8000d42: 2b00 cmp r3, #0 8000d44: db37 blt.n 8000db6 { /* get software reset status */ if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BCR, ®value) >= 0) 8000d46: 687b ldr r3, [r7, #4] 8000d48: 695b ldr r3, [r3, #20] 8000d4a: 687a ldr r2, [r7, #4] 8000d4c: 6810 ldr r0, [r2, #0] 8000d4e: f107 0208 add.w r2, r7, #8 8000d52: 2100 movs r1, #0 8000d54: 4798 blx r3 8000d56: 4603 mov r3, r0 8000d58: 2b00 cmp r3, #0 8000d5a: db28 blt.n 8000dae { tickstart = pObj->IO.GetTick(); 8000d5c: 687b ldr r3, [r7, #4] 8000d5e: 699b ldr r3, [r3, #24] 8000d60: 4798 blx r3 8000d62: 4603 mov r3, r0 8000d64: 60fb str r3, [r7, #12] /* wait until software reset is done or timeout occured */ while(regvalue & LAN8742_BCR_SOFT_RESET) 8000d66: e01c b.n 8000da2 { if((pObj->IO.GetTick() - tickstart) <= LAN8742_SW_RESET_TO) 8000d68: 687b ldr r3, [r7, #4] 8000d6a: 699b ldr r3, [r3, #24] 8000d6c: 4798 blx r3 8000d6e: 4603 mov r3, r0 8000d70: 461a mov r2, r3 8000d72: 68fb ldr r3, [r7, #12] 8000d74: 1ad3 subs r3, r2, r3 8000d76: f5b3 7ffa cmp.w r3, #500 ; 0x1f4 8000d7a: d80e bhi.n 8000d9a { if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BCR, ®value) < 0) 8000d7c: 687b ldr r3, [r7, #4] 8000d7e: 695b ldr r3, [r3, #20] 8000d80: 687a ldr r2, [r7, #4] 8000d82: 6810 ldr r0, [r2, #0] 8000d84: f107 0208 add.w r2, r7, #8 8000d88: 2100 movs r1, #0 8000d8a: 4798 blx r3 8000d8c: 4603 mov r3, r0 8000d8e: 2b00 cmp r3, #0 8000d90: da07 bge.n 8000da2 { status = LAN8742_STATUS_READ_ERROR; 8000d92: f06f 0304 mvn.w r3, #4 8000d96: 613b str r3, [r7, #16] break; 8000d98: e010 b.n 8000dbc } } else { status = LAN8742_STATUS_RESET_TIMEOUT; 8000d9a: f06f 0301 mvn.w r3, #1 8000d9e: 613b str r3, [r7, #16] break; 8000da0: e00c b.n 8000dbc while(regvalue & LAN8742_BCR_SOFT_RESET) 8000da2: 68bb ldr r3, [r7, #8] 8000da4: f403 4300 and.w r3, r3, #32768 ; 0x8000 8000da8: 2b00 cmp r3, #0 8000daa: d1dd bne.n 8000d68 8000dac: e006 b.n 8000dbc } } } else { status = LAN8742_STATUS_READ_ERROR; 8000dae: f06f 0304 mvn.w r3, #4 8000db2: 613b str r3, [r7, #16] 8000db4: e002 b.n 8000dbc } } else { status = LAN8742_STATUS_WRITE_ERROR; 8000db6: f06f 0303 mvn.w r3, #3 8000dba: 613b str r3, [r7, #16] } } } if(status == LAN8742_STATUS_OK) 8000dbc: 693b ldr r3, [r7, #16] 8000dbe: 2b00 cmp r3, #0 8000dc0: d112 bne.n 8000de8 { tickstart = pObj->IO.GetTick(); 8000dc2: 687b ldr r3, [r7, #4] 8000dc4: 699b ldr r3, [r3, #24] 8000dc6: 4798 blx r3 8000dc8: 4603 mov r3, r0 8000dca: 60fb str r3, [r7, #12] /* Wait for 2s to perform initialization */ while((pObj->IO.GetTick() - tickstart) <= LAN8742_INIT_TO) 8000dcc: bf00 nop 8000dce: 687b ldr r3, [r7, #4] 8000dd0: 699b ldr r3, [r3, #24] 8000dd2: 4798 blx r3 8000dd4: 4603 mov r3, r0 8000dd6: 461a mov r2, r3 8000dd8: 68fb ldr r3, [r7, #12] 8000dda: 1ad3 subs r3, r2, r3 8000ddc: f5b3 6ffa cmp.w r3, #2000 ; 0x7d0 8000de0: d9f5 bls.n 8000dce { } pObj->Is_Initialized = 1; 8000de2: 687b ldr r3, [r7, #4] 8000de4: 2201 movs r2, #1 8000de6: 605a str r2, [r3, #4] } return status; 8000de8: 693b ldr r3, [r7, #16] } 8000dea: 4618 mov r0, r3 8000dec: 3718 adds r7, #24 8000dee: 46bd mov sp, r7 8000df0: bd80 pop {r7, pc} 08000df2 : * LAN8742_STATUS_10MBITS_HALFDUPLEX if 10Mb/s HD * LAN8742_STATUS_READ_ERROR if connot read register * LAN8742_STATUS_WRITE_ERROR if connot write to register */ int32_t LAN8742_GetLinkState(lan8742_Object_t *pObj) { 8000df2: b580 push {r7, lr} 8000df4: b084 sub sp, #16 8000df6: af00 add r7, sp, #0 8000df8: 6078 str r0, [r7, #4] uint32_t readval = 0; 8000dfa: 2300 movs r3, #0 8000dfc: 60fb str r3, [r7, #12] /* Read Status register */ if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BSR, &readval) < 0) 8000dfe: 687b ldr r3, [r7, #4] 8000e00: 695b ldr r3, [r3, #20] 8000e02: 687a ldr r2, [r7, #4] 8000e04: 6810 ldr r0, [r2, #0] 8000e06: f107 020c add.w r2, r7, #12 8000e0a: 2101 movs r1, #1 8000e0c: 4798 blx r3 8000e0e: 4603 mov r3, r0 8000e10: 2b00 cmp r3, #0 8000e12: da02 bge.n 8000e1a { return LAN8742_STATUS_READ_ERROR; 8000e14: f06f 0304 mvn.w r3, #4 8000e18: e06e b.n 8000ef8 } /* Read Status register again */ if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BSR, &readval) < 0) 8000e1a: 687b ldr r3, [r7, #4] 8000e1c: 695b ldr r3, [r3, #20] 8000e1e: 687a ldr r2, [r7, #4] 8000e20: 6810 ldr r0, [r2, #0] 8000e22: f107 020c add.w r2, r7, #12 8000e26: 2101 movs r1, #1 8000e28: 4798 blx r3 8000e2a: 4603 mov r3, r0 8000e2c: 2b00 cmp r3, #0 8000e2e: da02 bge.n 8000e36 { return LAN8742_STATUS_READ_ERROR; 8000e30: f06f 0304 mvn.w r3, #4 8000e34: e060 b.n 8000ef8 } if((readval & LAN8742_BSR_LINK_STATUS) == 0) 8000e36: 68fb ldr r3, [r7, #12] 8000e38: f003 0304 and.w r3, r3, #4 8000e3c: 2b00 cmp r3, #0 8000e3e: d101 bne.n 8000e44 { /* Return Link Down status */ return LAN8742_STATUS_LINK_DOWN; 8000e40: 2301 movs r3, #1 8000e42: e059 b.n 8000ef8 } /* Check Auto negotiaition */ if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BCR, &readval) < 0) 8000e44: 687b ldr r3, [r7, #4] 8000e46: 695b ldr r3, [r3, #20] 8000e48: 687a ldr r2, [r7, #4] 8000e4a: 6810 ldr r0, [r2, #0] 8000e4c: f107 020c add.w r2, r7, #12 8000e50: 2100 movs r1, #0 8000e52: 4798 blx r3 8000e54: 4603 mov r3, r0 8000e56: 2b00 cmp r3, #0 8000e58: da02 bge.n 8000e60 { return LAN8742_STATUS_READ_ERROR; 8000e5a: f06f 0304 mvn.w r3, #4 8000e5e: e04b b.n 8000ef8 } if((readval & LAN8742_BCR_AUTONEGO_EN) != LAN8742_BCR_AUTONEGO_EN) 8000e60: 68fb ldr r3, [r7, #12] 8000e62: f403 5380 and.w r3, r3, #4096 ; 0x1000 8000e66: 2b00 cmp r3, #0 8000e68: d11b bne.n 8000ea2 { if(((readval & LAN8742_BCR_SPEED_SELECT) == LAN8742_BCR_SPEED_SELECT) && ((readval & LAN8742_BCR_DUPLEX_MODE) == LAN8742_BCR_DUPLEX_MODE)) 8000e6a: 68fb ldr r3, [r7, #12] 8000e6c: f403 5300 and.w r3, r3, #8192 ; 0x2000 8000e70: 2b00 cmp r3, #0 8000e72: d006 beq.n 8000e82 8000e74: 68fb ldr r3, [r7, #12] 8000e76: f403 7380 and.w r3, r3, #256 ; 0x100 8000e7a: 2b00 cmp r3, #0 8000e7c: d001 beq.n 8000e82 { return LAN8742_STATUS_100MBITS_FULLDUPLEX; 8000e7e: 2302 movs r3, #2 8000e80: e03a b.n 8000ef8 } else if ((readval & LAN8742_BCR_SPEED_SELECT) == LAN8742_BCR_SPEED_SELECT) 8000e82: 68fb ldr r3, [r7, #12] 8000e84: f403 5300 and.w r3, r3, #8192 ; 0x2000 8000e88: 2b00 cmp r3, #0 8000e8a: d001 beq.n 8000e90 { return LAN8742_STATUS_100MBITS_HALFDUPLEX; 8000e8c: 2303 movs r3, #3 8000e8e: e033 b.n 8000ef8 } else if ((readval & LAN8742_BCR_DUPLEX_MODE) == LAN8742_BCR_DUPLEX_MODE) 8000e90: 68fb ldr r3, [r7, #12] 8000e92: f403 7380 and.w r3, r3, #256 ; 0x100 8000e96: 2b00 cmp r3, #0 8000e98: d001 beq.n 8000e9e { return LAN8742_STATUS_10MBITS_FULLDUPLEX; 8000e9a: 2304 movs r3, #4 8000e9c: e02c b.n 8000ef8 } else { return LAN8742_STATUS_10MBITS_HALFDUPLEX; 8000e9e: 2305 movs r3, #5 8000ea0: e02a b.n 8000ef8 } } else /* Auto Nego enabled */ { if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_PHYSCSR, &readval) < 0) 8000ea2: 687b ldr r3, [r7, #4] 8000ea4: 695b ldr r3, [r3, #20] 8000ea6: 687a ldr r2, [r7, #4] 8000ea8: 6810 ldr r0, [r2, #0] 8000eaa: f107 020c add.w r2, r7, #12 8000eae: 211f movs r1, #31 8000eb0: 4798 blx r3 8000eb2: 4603 mov r3, r0 8000eb4: 2b00 cmp r3, #0 8000eb6: da02 bge.n 8000ebe { return LAN8742_STATUS_READ_ERROR; 8000eb8: f06f 0304 mvn.w r3, #4 8000ebc: e01c b.n 8000ef8 } /* Check if auto nego not done */ if((readval & LAN8742_PHYSCSR_AUTONEGO_DONE) == 0) 8000ebe: 68fb ldr r3, [r7, #12] 8000ec0: f403 5380 and.w r3, r3, #4096 ; 0x1000 8000ec4: 2b00 cmp r3, #0 8000ec6: d101 bne.n 8000ecc { return LAN8742_STATUS_AUTONEGO_NOTDONE; 8000ec8: 2306 movs r3, #6 8000eca: e015 b.n 8000ef8 } if((readval & LAN8742_PHYSCSR_HCDSPEEDMASK) == LAN8742_PHYSCSR_100BTX_FD) 8000ecc: 68fb ldr r3, [r7, #12] 8000ece: f003 031c and.w r3, r3, #28 8000ed2: 2b18 cmp r3, #24 8000ed4: d101 bne.n 8000eda { return LAN8742_STATUS_100MBITS_FULLDUPLEX; 8000ed6: 2302 movs r3, #2 8000ed8: e00e b.n 8000ef8 } else if ((readval & LAN8742_PHYSCSR_HCDSPEEDMASK) == LAN8742_PHYSCSR_100BTX_HD) 8000eda: 68fb ldr r3, [r7, #12] 8000edc: f003 031c and.w r3, r3, #28 8000ee0: 2b08 cmp r3, #8 8000ee2: d101 bne.n 8000ee8 { return LAN8742_STATUS_100MBITS_HALFDUPLEX; 8000ee4: 2303 movs r3, #3 8000ee6: e007 b.n 8000ef8 } else if ((readval & LAN8742_PHYSCSR_HCDSPEEDMASK) == LAN8742_PHYSCSR_10BT_FD) 8000ee8: 68fb ldr r3, [r7, #12] 8000eea: f003 031c and.w r3, r3, #28 8000eee: 2b14 cmp r3, #20 8000ef0: d101 bne.n 8000ef6 { return LAN8742_STATUS_10MBITS_FULLDUPLEX; 8000ef2: 2304 movs r3, #4 8000ef4: e000 b.n 8000ef8 } else { return LAN8742_STATUS_10MBITS_HALFDUPLEX; 8000ef6: 2305 movs r3, #5 } } } 8000ef8: 4618 mov r0, r3 8000efa: 3710 adds r7, #16 8000efc: 46bd mov sp, r7 8000efe: bd80 pop {r7, pc} 08000f00 : * 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) { 8000f00: b580 push {r7, lr} 8000f02: b082 sub sp, #8 8000f04: af00 add r7, sp, #0 __HAL_ART_CONFIG_BASE_ADDRESS(0x08100000UL); /* Configure the Cortex-M4 ART Base address to the Flash Bank 2 : */ __HAL_ART_ENABLE(); /* Enable the Cortex-M4 ART */ #endif /* DUAL_CORE && CORE_CM4 */ /* Set Interrupt Group Priority */ HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4); 8000f06: 2003 movs r0, #3 8000f08: f000 f970 bl 80011ec /* Update the SystemCoreClock global variable */ #if defined(RCC_D1CFGR_D1CPRE) common_system_clock = HAL_RCC_GetSysClockFreq() >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_D1CPRE)>> RCC_D1CFGR_D1CPRE_Pos]) & 0x1FU); 8000f0c: f002 fea8 bl 8003c60 8000f10: 4602 mov r2, r0 8000f12: 4b15 ldr r3, [pc, #84] ; (8000f68 ) 8000f14: 699b ldr r3, [r3, #24] 8000f16: 0a1b lsrs r3, r3, #8 8000f18: f003 030f and.w r3, r3, #15 8000f1c: 4913 ldr r1, [pc, #76] ; (8000f6c ) 8000f1e: 5ccb ldrb r3, [r1, r3] 8000f20: f003 031f and.w r3, r3, #31 8000f24: fa22 f303 lsr.w r3, r2, r3 8000f28: 607b str r3, [r7, #4] common_system_clock = HAL_RCC_GetSysClockFreq() >> ((D1CorePrescTable[(RCC->CDCFGR1 & RCC_CDCFGR1_CDCPRE)>> RCC_CDCFGR1_CDCPRE_Pos]) & 0x1FU); #endif /* Update the SystemD2Clock global variable */ #if defined(RCC_D1CFGR_HPRE) SystemD2Clock = (common_system_clock >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_HPRE)>> RCC_D1CFGR_HPRE_Pos]) & 0x1FU)); 8000f2a: 4b0f ldr r3, [pc, #60] ; (8000f68 ) 8000f2c: 699b ldr r3, [r3, #24] 8000f2e: f003 030f and.w r3, r3, #15 8000f32: 4a0e ldr r2, [pc, #56] ; (8000f6c ) 8000f34: 5cd3 ldrb r3, [r2, r3] 8000f36: f003 031f and.w r3, r3, #31 8000f3a: 687a ldr r2, [r7, #4] 8000f3c: fa22 f303 lsr.w r3, r2, r3 8000f40: 4a0b ldr r2, [pc, #44] ; (8000f70 ) 8000f42: 6013 str r3, [r2, #0] #endif #if defined(DUAL_CORE) && defined(CORE_CM4) SystemCoreClock = SystemD2Clock; #else SystemCoreClock = common_system_clock; 8000f44: 4a0b ldr r2, [pc, #44] ; (8000f74 ) 8000f46: 687b ldr r3, [r7, #4] 8000f48: 6013 str r3, [r2, #0] #endif /* DUAL_CORE && CORE_CM4 */ /* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */ if(HAL_InitTick(TICK_INT_PRIORITY) != HAL_OK) 8000f4a: 200f movs r0, #15 8000f4c: f000 f814 bl 8000f78 8000f50: 4603 mov r3, r0 8000f52: 2b00 cmp r3, #0 8000f54: d001 beq.n 8000f5a { return HAL_ERROR; 8000f56: 2301 movs r3, #1 8000f58: e002 b.n 8000f60 } /* Init the low level hardware */ HAL_MspInit(); 8000f5a: f7ff fcc3 bl 80008e4 /* Return function status */ return HAL_OK; 8000f5e: 2300 movs r3, #0 } 8000f60: 4618 mov r0, r3 8000f62: 3708 adds r7, #8 8000f64: 46bd mov sp, r7 8000f66: bd80 pop {r7, pc} 8000f68: 58024400 .word 0x58024400 8000f6c: 08014c80 .word 0x08014c80 8000f70: 24000004 .word 0x24000004 8000f74: 24000000 .word 0x24000000 08000f78 : * implementation in user file. * @param TickPriority: Tick interrupt priority. * @retval HAL status */ __weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) { 8000f78: b580 push {r7, lr} 8000f7a: b082 sub sp, #8 8000f7c: af00 add r7, sp, #0 8000f7e: 6078 str r0, [r7, #4] /* Check uwTickFreq for MisraC 2012 (even if uwTickFreq is a enum type that don't take the value zero)*/ if((uint32_t)uwTickFreq == 0UL) 8000f80: 4b15 ldr r3, [pc, #84] ; (8000fd8 ) 8000f82: 781b ldrb r3, [r3, #0] 8000f84: 2b00 cmp r3, #0 8000f86: d101 bne.n 8000f8c { return HAL_ERROR; 8000f88: 2301 movs r3, #1 8000f8a: e021 b.n 8000fd0 } /* Configure the SysTick to have interrupt in 1ms time basis*/ if (HAL_SYSTICK_Config(SystemCoreClock / (1000UL / (uint32_t)uwTickFreq)) > 0U) 8000f8c: 4b13 ldr r3, [pc, #76] ; (8000fdc ) 8000f8e: 681a ldr r2, [r3, #0] 8000f90: 4b11 ldr r3, [pc, #68] ; (8000fd8 ) 8000f92: 781b ldrb r3, [r3, #0] 8000f94: 4619 mov r1, r3 8000f96: f44f 737a mov.w r3, #1000 ; 0x3e8 8000f9a: fbb3 f3f1 udiv r3, r3, r1 8000f9e: fbb2 f3f3 udiv r3, r2, r3 8000fa2: 4618 mov r0, r3 8000fa4: f000 f955 bl 8001252 8000fa8: 4603 mov r3, r0 8000faa: 2b00 cmp r3, #0 8000fac: d001 beq.n 8000fb2 { return HAL_ERROR; 8000fae: 2301 movs r3, #1 8000fb0: e00e b.n 8000fd0 } /* Configure the SysTick IRQ priority */ if (TickPriority < (1UL << __NVIC_PRIO_BITS)) 8000fb2: 687b ldr r3, [r7, #4] 8000fb4: 2b0f cmp r3, #15 8000fb6: d80a bhi.n 8000fce { HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U); 8000fb8: 2200 movs r2, #0 8000fba: 6879 ldr r1, [r7, #4] 8000fbc: f04f 30ff mov.w r0, #4294967295 8000fc0: f000 f91f bl 8001202 uwTickPrio = TickPriority; 8000fc4: 4a06 ldr r2, [pc, #24] ; (8000fe0 ) 8000fc6: 687b ldr r3, [r7, #4] 8000fc8: 6013 str r3, [r2, #0] { return HAL_ERROR; } /* Return function status */ return HAL_OK; 8000fca: 2300 movs r3, #0 8000fcc: e000 b.n 8000fd0 return HAL_ERROR; 8000fce: 2301 movs r3, #1 } 8000fd0: 4618 mov r0, r3 8000fd2: 3708 adds r7, #8 8000fd4: 46bd mov sp, r7 8000fd6: bd80 pop {r7, pc} 8000fd8: 2400000c .word 0x2400000c 8000fdc: 24000000 .word 0x24000000 8000fe0: 24000008 .word 0x24000008 08000fe4 : * @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) { 8000fe4: b480 push {r7} 8000fe6: af00 add r7, sp, #0 uwTick += (uint32_t)uwTickFreq; 8000fe8: 4b06 ldr r3, [pc, #24] ; (8001004 ) 8000fea: 781b ldrb r3, [r3, #0] 8000fec: 461a mov r2, r3 8000fee: 4b06 ldr r3, [pc, #24] ; (8001008 ) 8000ff0: 681b ldr r3, [r3, #0] 8000ff2: 4413 add r3, r2 8000ff4: 4a04 ldr r2, [pc, #16] ; (8001008 ) 8000ff6: 6013 str r3, [r2, #0] } 8000ff8: bf00 nop 8000ffa: 46bd mov sp, r7 8000ffc: f85d 7b04 ldr.w r7, [sp], #4 8001000: 4770 bx lr 8001002: bf00 nop 8001004: 2400000c .word 0x2400000c 8001008: 24000128 .word 0x24000128 0800100c : * @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) { 800100c: b480 push {r7} 800100e: af00 add r7, sp, #0 return uwTick; 8001010: 4b03 ldr r3, [pc, #12] ; (8001020 ) 8001012: 681b ldr r3, [r3, #0] } 8001014: 4618 mov r0, r3 8001016: 46bd mov sp, r7 8001018: f85d 7b04 ldr.w r7, [sp], #4 800101c: 4770 bx lr 800101e: bf00 nop 8001020: 24000128 .word 0x24000128 08001024 : * @arg SYSCFG_ETH_MII : Select the Media Independent Interface * @arg SYSCFG_ETH_RMII: Select the Reduced Media Independent Interface * @retval None */ void HAL_SYSCFG_ETHInterfaceSelect(uint32_t SYSCFG_ETHInterface) { 8001024: b480 push {r7} 8001026: b083 sub sp, #12 8001028: af00 add r7, sp, #0 800102a: 6078 str r0, [r7, #4] /* Check the parameter */ assert_param(IS_SYSCFG_ETHERNET_CONFIG(SYSCFG_ETHInterface)); MODIFY_REG(SYSCFG->PMCR, SYSCFG_PMCR_EPIS_SEL, (uint32_t)(SYSCFG_ETHInterface)); 800102c: 4b06 ldr r3, [pc, #24] ; (8001048 ) 800102e: 685b ldr r3, [r3, #4] 8001030: f423 0260 bic.w r2, r3, #14680064 ; 0xe00000 8001034: 4904 ldr r1, [pc, #16] ; (8001048 ) 8001036: 687b ldr r3, [r7, #4] 8001038: 4313 orrs r3, r2 800103a: 604b str r3, [r1, #4] } 800103c: bf00 nop 800103e: 370c adds r7, #12 8001040: 46bd mov sp, r7 8001042: f85d 7b04 ldr.w r7, [sp], #4 8001046: 4770 bx lr 8001048: 58000400 .word 0x58000400 0800104c <__NVIC_SetPriorityGrouping>: { 800104c: b480 push {r7} 800104e: b085 sub sp, #20 8001050: af00 add r7, sp, #0 8001052: 6078 str r0, [r7, #4] uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ 8001054: 687b ldr r3, [r7, #4] 8001056: f003 0307 and.w r3, r3, #7 800105a: 60fb str r3, [r7, #12] reg_value = SCB->AIRCR; /* read old register configuration */ 800105c: 4b0b ldr r3, [pc, #44] ; (800108c <__NVIC_SetPriorityGrouping+0x40>) 800105e: 68db ldr r3, [r3, #12] 8001060: 60bb str r3, [r7, #8] reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ 8001062: 68ba ldr r2, [r7, #8] 8001064: f64f 03ff movw r3, #63743 ; 0xf8ff 8001068: 4013 ands r3, r2 800106a: 60bb str r3, [r7, #8] (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ 800106c: 68fb ldr r3, [r7, #12] 800106e: 021a lsls r2, r3, #8 ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | 8001070: 68bb ldr r3, [r7, #8] 8001072: 431a orrs r2, r3 reg_value = (reg_value | 8001074: 4b06 ldr r3, [pc, #24] ; (8001090 <__NVIC_SetPriorityGrouping+0x44>) 8001076: 4313 orrs r3, r2 8001078: 60bb str r3, [r7, #8] SCB->AIRCR = reg_value; 800107a: 4a04 ldr r2, [pc, #16] ; (800108c <__NVIC_SetPriorityGrouping+0x40>) 800107c: 68bb ldr r3, [r7, #8] 800107e: 60d3 str r3, [r2, #12] } 8001080: bf00 nop 8001082: 3714 adds r7, #20 8001084: 46bd mov sp, r7 8001086: f85d 7b04 ldr.w r7, [sp], #4 800108a: 4770 bx lr 800108c: e000ed00 .word 0xe000ed00 8001090: 05fa0000 .word 0x05fa0000 08001094 <__NVIC_GetPriorityGrouping>: { 8001094: b480 push {r7} 8001096: af00 add r7, sp, #0 return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); 8001098: 4b04 ldr r3, [pc, #16] ; (80010ac <__NVIC_GetPriorityGrouping+0x18>) 800109a: 68db ldr r3, [r3, #12] 800109c: 0a1b lsrs r3, r3, #8 800109e: f003 0307 and.w r3, r3, #7 } 80010a2: 4618 mov r0, r3 80010a4: 46bd mov sp, r7 80010a6: f85d 7b04 ldr.w r7, [sp], #4 80010aa: 4770 bx lr 80010ac: e000ed00 .word 0xe000ed00 080010b0 <__NVIC_EnableIRQ>: { 80010b0: b480 push {r7} 80010b2: b083 sub sp, #12 80010b4: af00 add r7, sp, #0 80010b6: 4603 mov r3, r0 80010b8: 80fb strh r3, [r7, #6] if ((int32_t)(IRQn) >= 0) 80010ba: f9b7 3006 ldrsh.w r3, [r7, #6] 80010be: 2b00 cmp r3, #0 80010c0: db0b blt.n 80010da <__NVIC_EnableIRQ+0x2a> NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); 80010c2: 88fb ldrh r3, [r7, #6] 80010c4: f003 021f and.w r2, r3, #31 80010c8: 4907 ldr r1, [pc, #28] ; (80010e8 <__NVIC_EnableIRQ+0x38>) 80010ca: f9b7 3006 ldrsh.w r3, [r7, #6] 80010ce: 095b lsrs r3, r3, #5 80010d0: 2001 movs r0, #1 80010d2: fa00 f202 lsl.w r2, r0, r2 80010d6: f841 2023 str.w r2, [r1, r3, lsl #2] } 80010da: bf00 nop 80010dc: 370c adds r7, #12 80010de: 46bd mov sp, r7 80010e0: f85d 7b04 ldr.w r7, [sp], #4 80010e4: 4770 bx lr 80010e6: bf00 nop 80010e8: e000e100 .word 0xe000e100 080010ec <__NVIC_SetPriority>: { 80010ec: b480 push {r7} 80010ee: b083 sub sp, #12 80010f0: af00 add r7, sp, #0 80010f2: 4603 mov r3, r0 80010f4: 6039 str r1, [r7, #0] 80010f6: 80fb strh r3, [r7, #6] if ((int32_t)(IRQn) >= 0) 80010f8: f9b7 3006 ldrsh.w r3, [r7, #6] 80010fc: 2b00 cmp r3, #0 80010fe: db0a blt.n 8001116 <__NVIC_SetPriority+0x2a> NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 8001100: 683b ldr r3, [r7, #0] 8001102: b2da uxtb r2, r3 8001104: 490c ldr r1, [pc, #48] ; (8001138 <__NVIC_SetPriority+0x4c>) 8001106: f9b7 3006 ldrsh.w r3, [r7, #6] 800110a: 0112 lsls r2, r2, #4 800110c: b2d2 uxtb r2, r2 800110e: 440b add r3, r1 8001110: f883 2300 strb.w r2, [r3, #768] ; 0x300 } 8001114: e00a b.n 800112c <__NVIC_SetPriority+0x40> SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 8001116: 683b ldr r3, [r7, #0] 8001118: b2da uxtb r2, r3 800111a: 4908 ldr r1, [pc, #32] ; (800113c <__NVIC_SetPriority+0x50>) 800111c: 88fb ldrh r3, [r7, #6] 800111e: f003 030f and.w r3, r3, #15 8001122: 3b04 subs r3, #4 8001124: 0112 lsls r2, r2, #4 8001126: b2d2 uxtb r2, r2 8001128: 440b add r3, r1 800112a: 761a strb r2, [r3, #24] } 800112c: bf00 nop 800112e: 370c adds r7, #12 8001130: 46bd mov sp, r7 8001132: f85d 7b04 ldr.w r7, [sp], #4 8001136: 4770 bx lr 8001138: e000e100 .word 0xe000e100 800113c: e000ed00 .word 0xe000ed00 08001140 : { 8001140: b480 push {r7} 8001142: b089 sub sp, #36 ; 0x24 8001144: af00 add r7, sp, #0 8001146: 60f8 str r0, [r7, #12] 8001148: 60b9 str r1, [r7, #8] 800114a: 607a str r2, [r7, #4] uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ 800114c: 68fb ldr r3, [r7, #12] 800114e: f003 0307 and.w r3, r3, #7 8001152: 61fb str r3, [r7, #28] PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); 8001154: 69fb ldr r3, [r7, #28] 8001156: f1c3 0307 rsb r3, r3, #7 800115a: 2b04 cmp r3, #4 800115c: bf28 it cs 800115e: 2304 movcs r3, #4 8001160: 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)); 8001162: 69fb ldr r3, [r7, #28] 8001164: 3304 adds r3, #4 8001166: 2b06 cmp r3, #6 8001168: d902 bls.n 8001170 800116a: 69fb ldr r3, [r7, #28] 800116c: 3b03 subs r3, #3 800116e: e000 b.n 8001172 8001170: 2300 movs r3, #0 8001172: 617b str r3, [r7, #20] ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | 8001174: f04f 32ff mov.w r2, #4294967295 8001178: 69bb ldr r3, [r7, #24] 800117a: fa02 f303 lsl.w r3, r2, r3 800117e: 43da mvns r2, r3 8001180: 68bb ldr r3, [r7, #8] 8001182: 401a ands r2, r3 8001184: 697b ldr r3, [r7, #20] 8001186: 409a lsls r2, r3 ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) 8001188: f04f 31ff mov.w r1, #4294967295 800118c: 697b ldr r3, [r7, #20] 800118e: fa01 f303 lsl.w r3, r1, r3 8001192: 43d9 mvns r1, r3 8001194: 687b ldr r3, [r7, #4] 8001196: 400b ands r3, r1 ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | 8001198: 4313 orrs r3, r2 } 800119a: 4618 mov r0, r3 800119c: 3724 adds r7, #36 ; 0x24 800119e: 46bd mov sp, r7 80011a0: f85d 7b04 ldr.w r7, [sp], #4 80011a4: 4770 bx lr ... 080011a8 : { 80011a8: b580 push {r7, lr} 80011aa: b082 sub sp, #8 80011ac: af00 add r7, sp, #0 80011ae: 6078 str r0, [r7, #4] if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) 80011b0: 687b ldr r3, [r7, #4] 80011b2: 3b01 subs r3, #1 80011b4: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000 80011b8: d301 bcc.n 80011be return (1UL); /* Reload value impossible */ 80011ba: 2301 movs r3, #1 80011bc: e00f b.n 80011de SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ 80011be: 4a0a ldr r2, [pc, #40] ; (80011e8 ) 80011c0: 687b ldr r3, [r7, #4] 80011c2: 3b01 subs r3, #1 80011c4: 6053 str r3, [r2, #4] NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ 80011c6: 210f movs r1, #15 80011c8: f04f 30ff mov.w r0, #4294967295 80011cc: f7ff ff8e bl 80010ec <__NVIC_SetPriority> SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ 80011d0: 4b05 ldr r3, [pc, #20] ; (80011e8 ) 80011d2: 2200 movs r2, #0 80011d4: 609a str r2, [r3, #8] SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | 80011d6: 4b04 ldr r3, [pc, #16] ; (80011e8 ) 80011d8: 2207 movs r2, #7 80011da: 601a str r2, [r3, #0] return (0UL); /* Function successful */ 80011dc: 2300 movs r3, #0 } 80011de: 4618 mov r0, r3 80011e0: 3708 adds r7, #8 80011e2: 46bd mov sp, r7 80011e4: bd80 pop {r7, pc} 80011e6: bf00 nop 80011e8: e000e010 .word 0xe000e010 080011ec : * @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) { 80011ec: b580 push {r7, lr} 80011ee: b082 sub sp, #8 80011f0: af00 add r7, sp, #0 80011f2: 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); 80011f4: 6878 ldr r0, [r7, #4] 80011f6: f7ff ff29 bl 800104c <__NVIC_SetPriorityGrouping> } 80011fa: bf00 nop 80011fc: 3708 adds r7, #8 80011fe: 46bd mov sp, r7 8001200: bd80 pop {r7, pc} 08001202 : * 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) { 8001202: b580 push {r7, lr} 8001204: b086 sub sp, #24 8001206: af00 add r7, sp, #0 8001208: 4603 mov r3, r0 800120a: 60b9 str r1, [r7, #8] 800120c: 607a str r2, [r7, #4] 800120e: 81fb strh r3, [r7, #14] /* Check the parameters */ assert_param(IS_NVIC_SUB_PRIORITY(SubPriority)); assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority)); prioritygroup = NVIC_GetPriorityGrouping(); 8001210: f7ff ff40 bl 8001094 <__NVIC_GetPriorityGrouping> 8001214: 6178 str r0, [r7, #20] NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority)); 8001216: 687a ldr r2, [r7, #4] 8001218: 68b9 ldr r1, [r7, #8] 800121a: 6978 ldr r0, [r7, #20] 800121c: f7ff ff90 bl 8001140 8001220: 4602 mov r2, r0 8001222: f9b7 300e ldrsh.w r3, [r7, #14] 8001226: 4611 mov r1, r2 8001228: 4618 mov r0, r3 800122a: f7ff ff5f bl 80010ec <__NVIC_SetPriority> } 800122e: bf00 nop 8001230: 3718 adds r7, #24 8001232: 46bd mov sp, r7 8001234: bd80 pop {r7, pc} 08001236 : * This parameter can be an enumerator of IRQn_Type enumeration * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32h7xxxx.h)) * @retval None */ void HAL_NVIC_EnableIRQ(IRQn_Type IRQn) { 8001236: b580 push {r7, lr} 8001238: b082 sub sp, #8 800123a: af00 add r7, sp, #0 800123c: 4603 mov r3, r0 800123e: 80fb strh r3, [r7, #6] /* Check the parameters */ assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); /* Enable interrupt */ NVIC_EnableIRQ(IRQn); 8001240: f9b7 3006 ldrsh.w r3, [r7, #6] 8001244: 4618 mov r0, r3 8001246: f7ff ff33 bl 80010b0 <__NVIC_EnableIRQ> } 800124a: bf00 nop 800124c: 3708 adds r7, #8 800124e: 46bd mov sp, r7 8001250: bd80 pop {r7, pc} 08001252 : * @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) { 8001252: b580 push {r7, lr} 8001254: b082 sub sp, #8 8001256: af00 add r7, sp, #0 8001258: 6078 str r0, [r7, #4] return SysTick_Config(TicksNumb); 800125a: 6878 ldr r0, [r7, #4] 800125c: f7ff ffa4 bl 80011a8 8001260: 4603 mov r3, r0 } 8001262: 4618 mov r0, r3 8001264: 3708 adds r7, #8 8001266: 46bd mov sp, r7 8001268: bd80 pop {r7, pc} ... 0800126c : /** * @brief Disables the MPU * @retval None */ void HAL_MPU_Disable(void) { 800126c: b480 push {r7} 800126e: af00 add r7, sp, #0 \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"); 8001270: f3bf 8f5f dmb sy } 8001274: bf00 nop /* Make sure outstanding transfers are done */ __DMB(); /* Disable fault exceptions */ SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; 8001276: 4b07 ldr r3, [pc, #28] ; (8001294 ) 8001278: 6a5b ldr r3, [r3, #36] ; 0x24 800127a: 4a06 ldr r2, [pc, #24] ; (8001294 ) 800127c: f423 3380 bic.w r3, r3, #65536 ; 0x10000 8001280: 6253 str r3, [r2, #36] ; 0x24 /* Disable the MPU and clear the control register*/ MPU->CTRL = 0; 8001282: 4b05 ldr r3, [pc, #20] ; (8001298 ) 8001284: 2200 movs r2, #0 8001286: 605a str r2, [r3, #4] } 8001288: bf00 nop 800128a: 46bd mov sp, r7 800128c: f85d 7b04 ldr.w r7, [sp], #4 8001290: 4770 bx lr 8001292: bf00 nop 8001294: e000ed00 .word 0xe000ed00 8001298: e000ed90 .word 0xe000ed90 0800129c : * @arg MPU_PRIVILEGED_DEFAULT * @arg MPU_HFNMI_PRIVDEF * @retval None */ void HAL_MPU_Enable(uint32_t MPU_Control) { 800129c: b480 push {r7} 800129e: b083 sub sp, #12 80012a0: af00 add r7, sp, #0 80012a2: 6078 str r0, [r7, #4] /* Enable the MPU */ MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk; 80012a4: 4a0b ldr r2, [pc, #44] ; (80012d4 ) 80012a6: 687b ldr r3, [r7, #4] 80012a8: f043 0301 orr.w r3, r3, #1 80012ac: 6053 str r3, [r2, #4] /* Enable fault exceptions */ SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; 80012ae: 4b0a ldr r3, [pc, #40] ; (80012d8 ) 80012b0: 6a5b ldr r3, [r3, #36] ; 0x24 80012b2: 4a09 ldr r2, [pc, #36] ; (80012d8 ) 80012b4: f443 3380 orr.w r3, r3, #65536 ; 0x10000 80012b8: 6253 str r3, [r2, #36] ; 0x24 __ASM volatile ("dsb 0xF":::"memory"); 80012ba: f3bf 8f4f dsb sy } 80012be: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 80012c0: f3bf 8f6f isb sy } 80012c4: bf00 nop /* Ensure MPU setting take effects */ __DSB(); __ISB(); } 80012c6: bf00 nop 80012c8: 370c adds r7, #12 80012ca: 46bd mov sp, r7 80012cc: f85d 7b04 ldr.w r7, [sp], #4 80012d0: 4770 bx lr 80012d2: bf00 nop 80012d4: e000ed90 .word 0xe000ed90 80012d8: e000ed00 .word 0xe000ed00 080012dc : * @param MPU_Init Pointer to a MPU_Region_InitTypeDef structure that contains * the initialization and configuration information. * @retval None */ void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init) { 80012dc: b480 push {r7} 80012de: b083 sub sp, #12 80012e0: af00 add r7, sp, #0 80012e2: 6078 str r0, [r7, #4] /* Check the parameters */ assert_param(IS_MPU_REGION_NUMBER(MPU_Init->Number)); assert_param(IS_MPU_REGION_ENABLE(MPU_Init->Enable)); /* Set the Region number */ MPU->RNR = MPU_Init->Number; 80012e4: 687b ldr r3, [r7, #4] 80012e6: 785a ldrb r2, [r3, #1] 80012e8: 4b1d ldr r3, [pc, #116] ; (8001360 ) 80012ea: 609a str r2, [r3, #8] if ((MPU_Init->Enable) != 0UL) 80012ec: 687b ldr r3, [r7, #4] 80012ee: 781b ldrb r3, [r3, #0] 80012f0: 2b00 cmp r3, #0 80012f2: d029 beq.n 8001348 assert_param(IS_MPU_ACCESS_CACHEABLE(MPU_Init->IsCacheable)); assert_param(IS_MPU_ACCESS_BUFFERABLE(MPU_Init->IsBufferable)); assert_param(IS_MPU_SUB_REGION_DISABLE(MPU_Init->SubRegionDisable)); assert_param(IS_MPU_REGION_SIZE(MPU_Init->Size)); MPU->RBAR = MPU_Init->BaseAddress; 80012f4: 4a1a ldr r2, [pc, #104] ; (8001360 ) 80012f6: 687b ldr r3, [r7, #4] 80012f8: 685b ldr r3, [r3, #4] 80012fa: 60d3 str r3, [r2, #12] MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 80012fc: 687b ldr r3, [r7, #4] 80012fe: 7b1b ldrb r3, [r3, #12] 8001300: 071a lsls r2, r3, #28 ((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) | 8001302: 687b ldr r3, [r7, #4] 8001304: 7adb ldrb r3, [r3, #11] 8001306: 061b lsls r3, r3, #24 MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 8001308: 431a orrs r2, r3 ((uint32_t)MPU_Init->TypeExtField << MPU_RASR_TEX_Pos) | 800130a: 687b ldr r3, [r7, #4] 800130c: 7a9b ldrb r3, [r3, #10] 800130e: 04db lsls r3, r3, #19 ((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) | 8001310: 431a orrs r2, r3 ((uint32_t)MPU_Init->IsShareable << MPU_RASR_S_Pos) | 8001312: 687b ldr r3, [r7, #4] 8001314: 7b5b ldrb r3, [r3, #13] 8001316: 049b lsls r3, r3, #18 ((uint32_t)MPU_Init->TypeExtField << MPU_RASR_TEX_Pos) | 8001318: 431a orrs r2, r3 ((uint32_t)MPU_Init->IsCacheable << MPU_RASR_C_Pos) | 800131a: 687b ldr r3, [r7, #4] 800131c: 7b9b ldrb r3, [r3, #14] 800131e: 045b lsls r3, r3, #17 ((uint32_t)MPU_Init->IsShareable << MPU_RASR_S_Pos) | 8001320: 431a orrs r2, r3 ((uint32_t)MPU_Init->IsBufferable << MPU_RASR_B_Pos) | 8001322: 687b ldr r3, [r7, #4] 8001324: 7bdb ldrb r3, [r3, #15] 8001326: 041b lsls r3, r3, #16 ((uint32_t)MPU_Init->IsCacheable << MPU_RASR_C_Pos) | 8001328: 431a orrs r2, r3 ((uint32_t)MPU_Init->SubRegionDisable << MPU_RASR_SRD_Pos) | 800132a: 687b ldr r3, [r7, #4] 800132c: 7a5b ldrb r3, [r3, #9] 800132e: 021b lsls r3, r3, #8 ((uint32_t)MPU_Init->IsBufferable << MPU_RASR_B_Pos) | 8001330: 431a orrs r2, r3 ((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) | 8001332: 687b ldr r3, [r7, #4] 8001334: 7a1b ldrb r3, [r3, #8] 8001336: 005b lsls r3, r3, #1 ((uint32_t)MPU_Init->SubRegionDisable << MPU_RASR_SRD_Pos) | 8001338: 4313 orrs r3, r2 ((uint32_t)MPU_Init->Enable << MPU_RASR_ENABLE_Pos); 800133a: 687a ldr r2, [r7, #4] 800133c: 7812 ldrb r2, [r2, #0] 800133e: 4611 mov r1, r2 MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 8001340: 4a07 ldr r2, [pc, #28] ; (8001360 ) ((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) | 8001342: 430b orrs r3, r1 MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 8001344: 6113 str r3, [r2, #16] else { MPU->RBAR = 0x00; MPU->RASR = 0x00; } } 8001346: e005 b.n 8001354 MPU->RBAR = 0x00; 8001348: 4b05 ldr r3, [pc, #20] ; (8001360 ) 800134a: 2200 movs r2, #0 800134c: 60da str r2, [r3, #12] MPU->RASR = 0x00; 800134e: 4b04 ldr r3, [pc, #16] ; (8001360 ) 8001350: 2200 movs r2, #0 8001352: 611a str r2, [r3, #16] } 8001354: bf00 nop 8001356: 370c adds r7, #12 8001358: 46bd mov sp, r7 800135a: f85d 7b04 ldr.w r7, [sp], #4 800135e: 4770 bx lr 8001360: e000ed90 .word 0xe000ed90 08001364 : * @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) { 8001364: b580 push {r7, lr} 8001366: b084 sub sp, #16 8001368: af00 add r7, sp, #0 800136a: 6078 str r0, [r7, #4] uint32_t tickstart; if (heth == NULL) 800136c: 687b ldr r3, [r7, #4] 800136e: 2b00 cmp r3, #0 8001370: d101 bne.n 8001376 { return HAL_ERROR; 8001372: 2301 movs r3, #1 8001374: e0cf b.n 8001516 } if (heth->gState == HAL_ETH_STATE_RESET) 8001376: 687b ldr r3, [r7, #4] 8001378: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84 800137c: 2b00 cmp r3, #0 800137e: d106 bne.n 800138e { heth->gState = HAL_ETH_STATE_BUSY; 8001380: 687b ldr r3, [r7, #4] 8001382: 2223 movs r2, #35 ; 0x23 8001384: 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); 8001388: 6878 ldr r0, [r7, #4] 800138a: f003 fe99 bl 80050c0 #endif /* (USE_HAL_ETH_REGISTER_CALLBACKS) */ } __HAL_RCC_SYSCFG_CLK_ENABLE(); 800138e: 4b64 ldr r3, [pc, #400] ; (8001520 ) 8001390: f8d3 30f4 ldr.w r3, [r3, #244] ; 0xf4 8001394: 4a62 ldr r2, [pc, #392] ; (8001520 ) 8001396: f043 0302 orr.w r3, r3, #2 800139a: f8c2 30f4 str.w r3, [r2, #244] ; 0xf4 800139e: 4b60 ldr r3, [pc, #384] ; (8001520 ) 80013a0: f8d3 30f4 ldr.w r3, [r3, #244] ; 0xf4 80013a4: f003 0302 and.w r3, r3, #2 80013a8: 60bb str r3, [r7, #8] 80013aa: 68bb ldr r3, [r7, #8] if (heth->Init.MediaInterface == HAL_ETH_MII_MODE) 80013ac: 687b ldr r3, [r7, #4] 80013ae: 7a1b ldrb r3, [r3, #8] 80013b0: 2b00 cmp r3, #0 80013b2: d103 bne.n 80013bc { HAL_SYSCFG_ETHInterfaceSelect(SYSCFG_ETH_MII); 80013b4: 2000 movs r0, #0 80013b6: f7ff fe35 bl 8001024 80013ba: e003 b.n 80013c4 } else { HAL_SYSCFG_ETHInterfaceSelect(SYSCFG_ETH_RMII); 80013bc: f44f 0000 mov.w r0, #8388608 ; 0x800000 80013c0: f7ff fe30 bl 8001024 } /* Dummy read to sync with ETH */ (void)SYSCFG->PMCR; 80013c4: 4b57 ldr r3, [pc, #348] ; (8001524 ) 80013c6: 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->DMAMR, ETH_DMAMR_SWR); 80013c8: 687b ldr r3, [r7, #4] 80013ca: 681b ldr r3, [r3, #0] 80013cc: f503 5380 add.w r3, r3, #4096 ; 0x1000 80013d0: 681b ldr r3, [r3, #0] 80013d2: 687a ldr r2, [r7, #4] 80013d4: 6812 ldr r2, [r2, #0] 80013d6: f043 0301 orr.w r3, r3, #1 80013da: f502 5280 add.w r2, r2, #4096 ; 0x1000 80013de: 6013 str r3, [r2, #0] /* Get tick */ tickstart = HAL_GetTick(); 80013e0: f7ff fe14 bl 800100c 80013e4: 60f8 str r0, [r7, #12] /* Wait for software reset */ while (READ_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR) > 0U) 80013e6: e011 b.n 800140c { if (((HAL_GetTick() - tickstart) > ETH_SWRESET_TIMEOUT)) 80013e8: f7ff fe10 bl 800100c 80013ec: 4602 mov r2, r0 80013ee: 68fb ldr r3, [r7, #12] 80013f0: 1ad3 subs r3, r2, r3 80013f2: f5b3 7ffa cmp.w r3, #500 ; 0x1f4 80013f6: d909 bls.n 800140c { /* Set Error Code */ heth->ErrorCode = HAL_ETH_ERROR_TIMEOUT; 80013f8: 687b ldr r3, [r7, #4] 80013fa: 2204 movs r2, #4 80013fc: f8c3 2088 str.w r2, [r3, #136] ; 0x88 /* Set State as Error */ heth->gState = HAL_ETH_STATE_ERROR; 8001400: 687b ldr r3, [r7, #4] 8001402: 22e0 movs r2, #224 ; 0xe0 8001404: f8c3 2084 str.w r2, [r3, #132] ; 0x84 /* Return Error */ return HAL_ERROR; 8001408: 2301 movs r3, #1 800140a: e084 b.n 8001516 while (READ_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR) > 0U) 800140c: 687b ldr r3, [r7, #4] 800140e: 681b ldr r3, [r3, #0] 8001410: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001414: 681b ldr r3, [r3, #0] 8001416: f003 0301 and.w r3, r3, #1 800141a: 2b00 cmp r3, #0 800141c: d1e4 bne.n 80013e8 } } /*------------------ MDIO CSR Clock Range Configuration --------------------*/ HAL_ETH_SetMDIOClockRange(heth); 800141e: 6878 ldr r0, [r7, #4] 8001420: f000 fee0 bl 80021e4 /*------------------ MAC LPI 1US Tic Counter Configuration --------------------*/ WRITE_REG(heth->Instance->MAC1USTCR, (((uint32_t)HAL_RCC_GetHCLKFreq() / ETH_MAC_US_TICK) - 1U)); 8001424: f002 fd96 bl 8003f54 8001428: 4603 mov r3, r0 800142a: 4a3f ldr r2, [pc, #252] ; (8001528 ) 800142c: fba2 2303 umull r2, r3, r2, r3 8001430: 0c9a lsrs r2, r3, #18 8001432: 687b ldr r3, [r7, #4] 8001434: 681b ldr r3, [r3, #0] 8001436: 3a01 subs r2, #1 8001438: f8c3 20dc str.w r2, [r3, #220] ; 0xdc /*------------------ MAC, MTL and DMA default Configuration ----------------*/ ETH_MACDMAConfig(heth); 800143c: 6878 ldr r0, [r7, #4] 800143e: f001 f8cb bl 80025d8 /* SET DSL to 64 bit */ MODIFY_REG(heth->Instance->DMACCR, ETH_DMACCR_DSL, ETH_DMACCR_DSL_64BIT); 8001442: 687b ldr r3, [r7, #4] 8001444: 681b ldr r3, [r3, #0] 8001446: f503 5380 add.w r3, r3, #4096 ; 0x1000 800144a: f8d3 3100 ldr.w r3, [r3, #256] ; 0x100 800144e: f423 13e0 bic.w r3, r3, #1835008 ; 0x1c0000 8001452: 687a ldr r2, [r7, #4] 8001454: 6812 ldr r2, [r2, #0] 8001456: f443 2300 orr.w r3, r3, #524288 ; 0x80000 800145a: f502 5280 add.w r2, r2, #4096 ; 0x1000 800145e: f8c2 3100 str.w r3, [r2, #256] ; 0x100 /* Set Receive Buffers Length (must be a multiple of 4) */ if ((heth->Init.RxBuffLen % 0x4U) != 0x0U) 8001462: 687b ldr r3, [r7, #4] 8001464: 695b ldr r3, [r3, #20] 8001466: f003 0303 and.w r3, r3, #3 800146a: 2b00 cmp r3, #0 800146c: d009 beq.n 8001482 { /* Set Error Code */ heth->ErrorCode = HAL_ETH_ERROR_PARAM; 800146e: 687b ldr r3, [r7, #4] 8001470: 2201 movs r2, #1 8001472: f8c3 2088 str.w r2, [r3, #136] ; 0x88 /* Set State as Error */ heth->gState = HAL_ETH_STATE_ERROR; 8001476: 687b ldr r3, [r7, #4] 8001478: 22e0 movs r2, #224 ; 0xe0 800147a: f8c3 2084 str.w r2, [r3, #132] ; 0x84 /* Return Error */ return HAL_ERROR; 800147e: 2301 movs r3, #1 8001480: e049 b.n 8001516 } else { MODIFY_REG(heth->Instance->DMACRCR, ETH_DMACRCR_RBSZ, ((heth->Init.RxBuffLen) << 1)); 8001482: 687b ldr r3, [r7, #4] 8001484: 681b ldr r3, [r3, #0] 8001486: f503 5380 add.w r3, r3, #4096 ; 0x1000 800148a: f8d3 2108 ldr.w r2, [r3, #264] ; 0x108 800148e: 4b27 ldr r3, [pc, #156] ; (800152c ) 8001490: 4013 ands r3, r2 8001492: 687a ldr r2, [r7, #4] 8001494: 6952 ldr r2, [r2, #20] 8001496: 0051 lsls r1, r2, #1 8001498: 687a ldr r2, [r7, #4] 800149a: 6812 ldr r2, [r2, #0] 800149c: 430b orrs r3, r1 800149e: f502 5280 add.w r2, r2, #4096 ; 0x1000 80014a2: f8c2 3108 str.w r3, [r2, #264] ; 0x108 } /*------------------ DMA Tx Descriptors Configuration ----------------------*/ ETH_DMATxDescListInit(heth); 80014a6: 6878 ldr r0, [r7, #4] 80014a8: f001 f933 bl 8002712 /*------------------ DMA Rx Descriptors Configuration ----------------------*/ ETH_DMARxDescListInit(heth); 80014ac: 6878 ldr r0, [r7, #4] 80014ae: f001 f979 bl 80027a4 /*--------------------- ETHERNET MAC Address Configuration ------------------*/ /* Set MAC addr bits 32 to 47 */ heth->Instance->MACA0HR = (((uint32_t)(heth->Init.MACAddr[5]) << 8) | (uint32_t)heth->Init.MACAddr[4]); 80014b2: 687b ldr r3, [r7, #4] 80014b4: 685b ldr r3, [r3, #4] 80014b6: 3305 adds r3, #5 80014b8: 781b ldrb r3, [r3, #0] 80014ba: 021a lsls r2, r3, #8 80014bc: 687b ldr r3, [r7, #4] 80014be: 685b ldr r3, [r3, #4] 80014c0: 3304 adds r3, #4 80014c2: 781b ldrb r3, [r3, #0] 80014c4: 4619 mov r1, r3 80014c6: 687b ldr r3, [r7, #4] 80014c8: 681b ldr r3, [r3, #0] 80014ca: 430a orrs r2, r1 80014cc: f8c3 2300 str.w r2, [r3, #768] ; 0x300 /* Set MAC addr bits 0 to 31 */ heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 80014d0: 687b ldr r3, [r7, #4] 80014d2: 685b ldr r3, [r3, #4] 80014d4: 3303 adds r3, #3 80014d6: 781b ldrb r3, [r3, #0] 80014d8: 061a lsls r2, r3, #24 80014da: 687b ldr r3, [r7, #4] 80014dc: 685b ldr r3, [r3, #4] 80014de: 3302 adds r3, #2 80014e0: 781b ldrb r3, [r3, #0] 80014e2: 041b lsls r3, r3, #16 80014e4: 431a orrs r2, r3 ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]); 80014e6: 687b ldr r3, [r7, #4] 80014e8: 685b ldr r3, [r3, #4] 80014ea: 3301 adds r3, #1 80014ec: 781b ldrb r3, [r3, #0] 80014ee: 021b lsls r3, r3, #8 heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 80014f0: 431a orrs r2, r3 ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]); 80014f2: 687b ldr r3, [r7, #4] 80014f4: 685b ldr r3, [r3, #4] 80014f6: 781b ldrb r3, [r3, #0] 80014f8: 4619 mov r1, r3 heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 80014fa: 687b ldr r3, [r7, #4] 80014fc: 681b ldr r3, [r3, #0] ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]); 80014fe: 430a orrs r2, r1 heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 8001500: f8c3 2304 str.w r2, [r3, #772] ; 0x304 heth->ErrorCode = HAL_ETH_ERROR_NONE; 8001504: 687b ldr r3, [r7, #4] 8001506: 2200 movs r2, #0 8001508: f8c3 2088 str.w r2, [r3, #136] ; 0x88 heth->gState = HAL_ETH_STATE_READY; 800150c: 687b ldr r3, [r7, #4] 800150e: 2210 movs r2, #16 8001510: f8c3 2084 str.w r2, [r3, #132] ; 0x84 return HAL_OK; 8001514: 2300 movs r3, #0 } 8001516: 4618 mov r0, r3 8001518: 3710 adds r7, #16 800151a: 46bd mov sp, r7 800151c: bd80 pop {r7, pc} 800151e: bf00 nop 8001520: 58024400 .word 0x58024400 8001524: 58000400 .word 0x58000400 8001528: 431bde83 .word 0x431bde83 800152c: ffff8001 .word 0xffff8001 08001530 : * @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) { 8001530: b580 push {r7, lr} 8001532: b082 sub sp, #8 8001534: af00 add r7, sp, #0 8001536: 6078 str r0, [r7, #4] if (heth->gState == HAL_ETH_STATE_READY) 8001538: 687b ldr r3, [r7, #4] 800153a: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84 800153e: 2b10 cmp r3, #16 8001540: d153 bne.n 80015ea { heth->gState = HAL_ETH_STATE_BUSY; 8001542: 687b ldr r3, [r7, #4] 8001544: 2223 movs r2, #35 ; 0x23 8001546: f8c3 2084 str.w r2, [r3, #132] ; 0x84 /* Set nombre of descriptors to build */ heth->RxDescList.RxBuildDescCnt = ETH_RX_DESC_CNT; 800154a: 687b ldr r3, [r7, #4] 800154c: 2204 movs r2, #4 800154e: 66da str r2, [r3, #108] ; 0x6c /* Build all descriptors */ ETH_UpdateDescriptor(heth); 8001550: 6878 ldr r0, [r7, #4] 8001552: f000 f9f6 bl 8001942 /* Enable the MAC transmission */ SET_BIT(heth->Instance->MACCR, ETH_MACCR_TE); 8001556: 687b ldr r3, [r7, #4] 8001558: 681b ldr r3, [r3, #0] 800155a: 681a ldr r2, [r3, #0] 800155c: 687b ldr r3, [r7, #4] 800155e: 681b ldr r3, [r3, #0] 8001560: f042 0202 orr.w r2, r2, #2 8001564: 601a str r2, [r3, #0] /* Enable the MAC reception */ SET_BIT(heth->Instance->MACCR, ETH_MACCR_RE); 8001566: 687b ldr r3, [r7, #4] 8001568: 681b ldr r3, [r3, #0] 800156a: 681a ldr r2, [r3, #0] 800156c: 687b ldr r3, [r7, #4] 800156e: 681b ldr r3, [r3, #0] 8001570: f042 0201 orr.w r2, r2, #1 8001574: 601a str r2, [r3, #0] /* Set the Flush Transmit FIFO bit */ SET_BIT(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_FTQ); 8001576: 687b ldr r3, [r7, #4] 8001578: 681b ldr r3, [r3, #0] 800157a: f8d3 2d00 ldr.w r2, [r3, #3328] ; 0xd00 800157e: 687b ldr r3, [r7, #4] 8001580: 681b ldr r3, [r3, #0] 8001582: f042 0201 orr.w r2, r2, #1 8001586: f8c3 2d00 str.w r2, [r3, #3328] ; 0xd00 /* Enable the DMA transmission */ SET_BIT(heth->Instance->DMACTCR, ETH_DMACTCR_ST); 800158a: 687b ldr r3, [r7, #4] 800158c: 681b ldr r3, [r3, #0] 800158e: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001592: f8d3 3104 ldr.w r3, [r3, #260] ; 0x104 8001596: 687a ldr r2, [r7, #4] 8001598: 6812 ldr r2, [r2, #0] 800159a: f043 0301 orr.w r3, r3, #1 800159e: f502 5280 add.w r2, r2, #4096 ; 0x1000 80015a2: f8c2 3104 str.w r3, [r2, #260] ; 0x104 /* Enable the DMA reception */ SET_BIT(heth->Instance->DMACRCR, ETH_DMACRCR_SR); 80015a6: 687b ldr r3, [r7, #4] 80015a8: 681b ldr r3, [r3, #0] 80015aa: f503 5380 add.w r3, r3, #4096 ; 0x1000 80015ae: f8d3 3108 ldr.w r3, [r3, #264] ; 0x108 80015b2: 687a ldr r2, [r7, #4] 80015b4: 6812 ldr r2, [r2, #0] 80015b6: f043 0301 orr.w r3, r3, #1 80015ba: f502 5280 add.w r2, r2, #4096 ; 0x1000 80015be: f8c2 3108 str.w r3, [r2, #264] ; 0x108 /* Clear Tx and Rx process stopped flags */ heth->Instance->DMACSR |= (ETH_DMACSR_TPS | ETH_DMACSR_RPS); 80015c2: 687b ldr r3, [r7, #4] 80015c4: 681b ldr r3, [r3, #0] 80015c6: f503 5380 add.w r3, r3, #4096 ; 0x1000 80015ca: f8d3 3160 ldr.w r3, [r3, #352] ; 0x160 80015ce: 687a ldr r2, [r7, #4] 80015d0: 6812 ldr r2, [r2, #0] 80015d2: f443 7381 orr.w r3, r3, #258 ; 0x102 80015d6: f502 5280 add.w r2, r2, #4096 ; 0x1000 80015da: f8c2 3160 str.w r3, [r2, #352] ; 0x160 heth->gState = HAL_ETH_STATE_STARTED; 80015de: 687b ldr r3, [r7, #4] 80015e0: 2223 movs r2, #35 ; 0x23 80015e2: f8c3 2084 str.w r2, [r3, #132] ; 0x84 return HAL_OK; 80015e6: 2300 movs r3, #0 80015e8: e000 b.n 80015ec } else { return HAL_ERROR; 80015ea: 2301 movs r3, #1 } } 80015ec: 4618 mov r0, r3 80015ee: 3708 adds r7, #8 80015f0: 46bd mov sp, r7 80015f2: bd80 pop {r7, pc} 080015f4 : * @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) { 80015f4: b480 push {r7} 80015f6: b083 sub sp, #12 80015f8: af00 add r7, sp, #0 80015fa: 6078 str r0, [r7, #4] if (heth->gState == HAL_ETH_STATE_STARTED) 80015fc: 687b ldr r3, [r7, #4] 80015fe: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84 8001602: 2b23 cmp r3, #35 ; 0x23 8001604: d13f bne.n 8001686 { /* Set the ETH peripheral state to BUSY */ heth->gState = HAL_ETH_STATE_BUSY; 8001606: 687b ldr r3, [r7, #4] 8001608: 2223 movs r2, #35 ; 0x23 800160a: f8c3 2084 str.w r2, [r3, #132] ; 0x84 /* Disable the DMA transmission */ CLEAR_BIT(heth->Instance->DMACTCR, ETH_DMACTCR_ST); 800160e: 687b ldr r3, [r7, #4] 8001610: 681b ldr r3, [r3, #0] 8001612: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001616: f8d3 3104 ldr.w r3, [r3, #260] ; 0x104 800161a: 687a ldr r2, [r7, #4] 800161c: 6812 ldr r2, [r2, #0] 800161e: f023 0301 bic.w r3, r3, #1 8001622: f502 5280 add.w r2, r2, #4096 ; 0x1000 8001626: f8c2 3104 str.w r3, [r2, #260] ; 0x104 /* Disable the DMA reception */ CLEAR_BIT(heth->Instance->DMACRCR, ETH_DMACRCR_SR); 800162a: 687b ldr r3, [r7, #4] 800162c: 681b ldr r3, [r3, #0] 800162e: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001632: f8d3 3108 ldr.w r3, [r3, #264] ; 0x108 8001636: 687a ldr r2, [r7, #4] 8001638: 6812 ldr r2, [r2, #0] 800163a: f023 0301 bic.w r3, r3, #1 800163e: f502 5280 add.w r2, r2, #4096 ; 0x1000 8001642: f8c2 3108 str.w r3, [r2, #264] ; 0x108 /* Disable the MAC reception */ CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_RE); 8001646: 687b ldr r3, [r7, #4] 8001648: 681b ldr r3, [r3, #0] 800164a: 681a ldr r2, [r3, #0] 800164c: 687b ldr r3, [r7, #4] 800164e: 681b ldr r3, [r3, #0] 8001650: f022 0201 bic.w r2, r2, #1 8001654: 601a str r2, [r3, #0] /* Set the Flush Transmit FIFO bit */ SET_BIT(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_FTQ); 8001656: 687b ldr r3, [r7, #4] 8001658: 681b ldr r3, [r3, #0] 800165a: f8d3 2d00 ldr.w r2, [r3, #3328] ; 0xd00 800165e: 687b ldr r3, [r7, #4] 8001660: 681b ldr r3, [r3, #0] 8001662: f042 0201 orr.w r2, r2, #1 8001666: f8c3 2d00 str.w r2, [r3, #3328] ; 0xd00 /* Disable the MAC transmission */ CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_TE); 800166a: 687b ldr r3, [r7, #4] 800166c: 681b ldr r3, [r3, #0] 800166e: 681a ldr r2, [r3, #0] 8001670: 687b ldr r3, [r7, #4] 8001672: 681b ldr r3, [r3, #0] 8001674: f022 0202 bic.w r2, r2, #2 8001678: 601a str r2, [r3, #0] heth->gState = HAL_ETH_STATE_READY; 800167a: 687b ldr r3, [r7, #4] 800167c: 2210 movs r2, #16 800167e: f8c3 2084 str.w r2, [r3, #132] ; 0x84 /* Return function status */ return HAL_OK; 8001682: 2300 movs r3, #0 8001684: e000 b.n 8001688 } else { return HAL_ERROR; 8001686: 2301 movs r3, #1 } } 8001688: 4618 mov r0, r3 800168a: 370c adds r7, #12 800168c: 46bd mov sp, r7 800168e: f85d 7b04 ldr.w r7, [sp], #4 8001692: 4770 bx lr 08001694 : * @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) { 8001694: b580 push {r7, lr} 8001696: b086 sub sp, #24 8001698: af00 add r7, sp, #0 800169a: 60f8 str r0, [r7, #12] 800169c: 60b9 str r1, [r7, #8] 800169e: 607a str r2, [r7, #4] uint32_t tickstart; ETH_DMADescTypeDef *dmatxdesc; if (pTxConfig == NULL) 80016a0: 68bb ldr r3, [r7, #8] 80016a2: 2b00 cmp r3, #0 80016a4: d109 bne.n 80016ba { heth->ErrorCode |= HAL_ETH_ERROR_PARAM; 80016a6: 68fb ldr r3, [r7, #12] 80016a8: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 80016ac: f043 0201 orr.w r2, r3, #1 80016b0: 68fb ldr r3, [r7, #12] 80016b2: f8c3 2088 str.w r2, [r3, #136] ; 0x88 return HAL_ERROR; 80016b6: 2301 movs r3, #1 80016b8: e07f b.n 80017ba } if (heth->gState == HAL_ETH_STATE_STARTED) 80016ba: 68fb ldr r3, [r7, #12] 80016bc: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84 80016c0: 2b23 cmp r3, #35 ; 0x23 80016c2: d179 bne.n 80017b8 { /* Config DMA Tx descriptor by Tx Packet info */ if (ETH_Prepare_Tx_Descriptors(heth, pTxConfig, 0) != HAL_ETH_ERROR_NONE) 80016c4: 2200 movs r2, #0 80016c6: 68b9 ldr r1, [r7, #8] 80016c8: 68f8 ldr r0, [r7, #12] 80016ca: f001 f8c9 bl 8002860 80016ce: 4603 mov r3, r0 80016d0: 2b00 cmp r3, #0 80016d2: d009 beq.n 80016e8 { /* Set the ETH error code */ heth->ErrorCode |= HAL_ETH_ERROR_BUSY; 80016d4: 68fb ldr r3, [r7, #12] 80016d6: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 80016da: f043 0202 orr.w r2, r3, #2 80016de: 68fb ldr r3, [r7, #12] 80016e0: f8c3 2088 str.w r2, [r3, #136] ; 0x88 return HAL_ERROR; 80016e4: 2301 movs r3, #1 80016e6: e068 b.n 80017ba __ASM volatile ("dsb 0xF":::"memory"); 80016e8: f3bf 8f4f dsb sy } 80016ec: bf00 nop } /* Ensure completion of descriptor preparation before transmission start */ __DSB(); dmatxdesc = (ETH_DMADescTypeDef *)(&heth->TxDescList)->TxDesc[heth->TxDescList.CurTxDesc]; 80016ee: 68fb ldr r3, [r7, #12] 80016f0: 6a9a ldr r2, [r3, #40] ; 0x28 80016f2: 68fb ldr r3, [r7, #12] 80016f4: 3206 adds r2, #6 80016f6: f853 3022 ldr.w r3, [r3, r2, lsl #2] 80016fa: 617b str r3, [r7, #20] /* Incr current tx desc index */ INCR_TX_DESC_INDEX(heth->TxDescList.CurTxDesc, 1U); 80016fc: 68fb ldr r3, [r7, #12] 80016fe: 6a9b ldr r3, [r3, #40] ; 0x28 8001700: 1c5a adds r2, r3, #1 8001702: 68fb ldr r3, [r7, #12] 8001704: 629a str r2, [r3, #40] ; 0x28 8001706: 68fb ldr r3, [r7, #12] 8001708: 6a9b ldr r3, [r3, #40] ; 0x28 800170a: 2b03 cmp r3, #3 800170c: d904 bls.n 8001718 800170e: 68fb ldr r3, [r7, #12] 8001710: 6a9b ldr r3, [r3, #40] ; 0x28 8001712: 1f1a subs r2, r3, #4 8001714: 68fb ldr r3, [r7, #12] 8001716: 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->DMACTDTPR, (uint32_t)(heth->TxDescList.TxDesc[heth->TxDescList.CurTxDesc])); 8001718: 68fb ldr r3, [r7, #12] 800171a: 6a99 ldr r1, [r3, #40] ; 0x28 800171c: 68fb ldr r3, [r7, #12] 800171e: 681a ldr r2, [r3, #0] 8001720: 68fb ldr r3, [r7, #12] 8001722: 3106 adds r1, #6 8001724: f853 3021 ldr.w r3, [r3, r1, lsl #2] 8001728: f502 5280 add.w r2, r2, #4096 ; 0x1000 800172c: f8c2 3120 str.w r3, [r2, #288] ; 0x120 tickstart = HAL_GetTick(); 8001730: f7ff fc6c bl 800100c 8001734: 6138 str r0, [r7, #16] /* Wait for data to be transmitted or timeout occurred */ while ((dmatxdesc->DESC3 & ETH_DMATXNDESCWBF_OWN) != (uint32_t)RESET) 8001736: e039 b.n 80017ac { if ((heth->Instance->DMACSR & ETH_DMACSR_FBE) != (uint32_t)RESET) 8001738: 68fb ldr r3, [r7, #12] 800173a: 681b ldr r3, [r3, #0] 800173c: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001740: f8d3 3160 ldr.w r3, [r3, #352] ; 0x160 8001744: f403 5380 and.w r3, r3, #4096 ; 0x1000 8001748: 2b00 cmp r3, #0 800174a: d012 beq.n 8001772 { heth->ErrorCode |= HAL_ETH_ERROR_DMA; 800174c: 68fb ldr r3, [r7, #12] 800174e: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 8001752: f043 0208 orr.w r2, r3, #8 8001756: 68fb ldr r3, [r7, #12] 8001758: f8c3 2088 str.w r2, [r3, #136] ; 0x88 heth->DMAErrorCode = heth->Instance->DMACSR; 800175c: 68fb ldr r3, [r7, #12] 800175e: 681b ldr r3, [r3, #0] 8001760: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001764: f8d3 2160 ldr.w r2, [r3, #352] ; 0x160 8001768: 68fb ldr r3, [r7, #12] 800176a: f8c3 208c str.w r2, [r3, #140] ; 0x8c /* Return function status */ return HAL_ERROR; 800176e: 2301 movs r3, #1 8001770: e023 b.n 80017ba } /* Check for the Timeout */ if (Timeout != HAL_MAX_DELAY) 8001772: 687b ldr r3, [r7, #4] 8001774: f1b3 3fff cmp.w r3, #4294967295 8001778: d018 beq.n 80017ac { if (((HAL_GetTick() - tickstart) > Timeout) || (Timeout == 0U)) 800177a: f7ff fc47 bl 800100c 800177e: 4602 mov r2, r0 8001780: 693b ldr r3, [r7, #16] 8001782: 1ad3 subs r3, r2, r3 8001784: 687a ldr r2, [r7, #4] 8001786: 429a cmp r2, r3 8001788: d302 bcc.n 8001790 800178a: 687b ldr r3, [r7, #4] 800178c: 2b00 cmp r3, #0 800178e: d10d bne.n 80017ac { heth->ErrorCode |= HAL_ETH_ERROR_TIMEOUT; 8001790: 68fb ldr r3, [r7, #12] 8001792: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 8001796: f043 0204 orr.w r2, r3, #4 800179a: 68fb ldr r3, [r7, #12] 800179c: f8c3 2088 str.w r2, [r3, #136] ; 0x88 /* Clear TX descriptor so that we can proceed */ dmatxdesc->DESC3 = (ETH_DMATXNDESCWBF_FD | ETH_DMATXNDESCWBF_LD); 80017a0: 697b ldr r3, [r7, #20] 80017a2: f04f 5240 mov.w r2, #805306368 ; 0x30000000 80017a6: 60da str r2, [r3, #12] return HAL_ERROR; 80017a8: 2301 movs r3, #1 80017aa: e006 b.n 80017ba while ((dmatxdesc->DESC3 & ETH_DMATXNDESCWBF_OWN) != (uint32_t)RESET) 80017ac: 697b ldr r3, [r7, #20] 80017ae: 68db ldr r3, [r3, #12] 80017b0: 2b00 cmp r3, #0 80017b2: dbc1 blt.n 8001738 } } } /* Return function status */ return HAL_OK; 80017b4: 2300 movs r3, #0 80017b6: e000 b.n 80017ba } else { return HAL_ERROR; 80017b8: 2301 movs r3, #1 } } 80017ba: 4618 mov r0, r3 80017bc: 3718 adds r7, #24 80017be: 46bd mov sp, r7 80017c0: bd80 pop {r7, pc} 080017c2 : * 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) { 80017c2: b580 push {r7, lr} 80017c4: b088 sub sp, #32 80017c6: af00 add r7, sp, #0 80017c8: 6078 str r0, [r7, #4] 80017ca: 6039 str r1, [r7, #0] uint32_t descidx; ETH_DMADescTypeDef *dmarxdesc; uint32_t desccnt = 0U; 80017cc: 2300 movs r3, #0 80017ce: 617b str r3, [r7, #20] uint32_t desccntmax; uint32_t bufflength; uint8_t rxdataready = 0U; 80017d0: 2300 movs r3, #0 80017d2: 73fb strb r3, [r7, #15] if (pAppBuff == NULL) 80017d4: 683b ldr r3, [r7, #0] 80017d6: 2b00 cmp r3, #0 80017d8: d109 bne.n 80017ee { heth->ErrorCode |= HAL_ETH_ERROR_PARAM; 80017da: 687b ldr r3, [r7, #4] 80017dc: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 80017e0: f043 0201 orr.w r2, r3, #1 80017e4: 687b ldr r3, [r7, #4] 80017e6: f8c3 2088 str.w r2, [r3, #136] ; 0x88 return HAL_ERROR; 80017ea: 2301 movs r3, #1 80017ec: e0a5 b.n 800193a } if (heth->gState != HAL_ETH_STATE_STARTED) 80017ee: 687b ldr r3, [r7, #4] 80017f0: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84 80017f4: 2b23 cmp r3, #35 ; 0x23 80017f6: d001 beq.n 80017fc { return HAL_ERROR; 80017f8: 2301 movs r3, #1 80017fa: e09e b.n 800193a } descidx = heth->RxDescList.RxDescIdx; 80017fc: 687b ldr r3, [r7, #4] 80017fe: 6ddb ldr r3, [r3, #92] ; 0x5c 8001800: 61fb str r3, [r7, #28] dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 8001802: 687b ldr r3, [r7, #4] 8001804: 69fa ldr r2, [r7, #28] 8001806: 3212 adds r2, #18 8001808: f853 3022 ldr.w r3, [r3, r2, lsl #2] 800180c: 61bb str r3, [r7, #24] desccntmax = ETH_RX_DESC_CNT - heth->RxDescList.RxBuildDescCnt; 800180e: 687b ldr r3, [r7, #4] 8001810: 6edb ldr r3, [r3, #108] ; 0x6c 8001812: f1c3 0304 rsb r3, r3, #4 8001816: 60bb str r3, [r7, #8] /* Check if descriptor is not owned by DMA */ while ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_OWN) == (uint32_t)RESET) && (desccnt < desccntmax) 8001818: e067 b.n 80018ea && (rxdataready == 0U)) { if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_CTXT) != (uint32_t)RESET) 800181a: 69bb ldr r3, [r7, #24] 800181c: 68db ldr r3, [r3, #12] 800181e: f003 4380 and.w r3, r3, #1073741824 ; 0x40000000 8001822: 2b00 cmp r3, #0 8001824: d007 beq.n 8001836 { /* Get timestamp high */ heth->RxDescList.TimeStamp.TimeStampHigh = dmarxdesc->DESC1; 8001826: 69bb ldr r3, [r7, #24] 8001828: 685a ldr r2, [r3, #4] 800182a: 687b ldr r3, [r7, #4] 800182c: 679a str r2, [r3, #120] ; 0x78 /* Get timestamp low */ heth->RxDescList.TimeStamp.TimeStampLow = dmarxdesc->DESC0; 800182e: 69bb ldr r3, [r7, #24] 8001830: 681a ldr r2, [r3, #0] 8001832: 687b ldr r3, [r7, #4] 8001834: 675a str r2, [r3, #116] ; 0x74 } if ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_FD) != (uint32_t)RESET) || (heth->RxDescList.pRxStart != NULL)) 8001836: 69bb ldr r3, [r7, #24] 8001838: 68db ldr r3, [r3, #12] 800183a: f003 5300 and.w r3, r3, #536870912 ; 0x20000000 800183e: 2b00 cmp r3, #0 8001840: d103 bne.n 800184a 8001842: 687b ldr r3, [r7, #4] 8001844: 6fdb ldr r3, [r3, #124] ; 0x7c 8001846: 2b00 cmp r3, #0 8001848: d03d beq.n 80018c6 { /* Check if first descriptor */ if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_FD) != (uint32_t)RESET) 800184a: 69bb ldr r3, [r7, #24] 800184c: 68db ldr r3, [r3, #12] 800184e: f003 5300 and.w r3, r3, #536870912 ; 0x20000000 8001852: 2b00 cmp r3, #0 8001854: d005 beq.n 8001862 { heth->RxDescList.RxDescCnt = 0; 8001856: 687b ldr r3, [r7, #4] 8001858: 2200 movs r2, #0 800185a: 661a str r2, [r3, #96] ; 0x60 heth->RxDescList.RxDataLength = 0; 800185c: 687b ldr r3, [r7, #4] 800185e: 2200 movs r2, #0 8001860: 665a str r2, [r3, #100] ; 0x64 } /* Check if last descriptor */ bufflength = heth->Init.RxBuffLen; 8001862: 687b ldr r3, [r7, #4] 8001864: 695b ldr r3, [r3, #20] 8001866: 613b str r3, [r7, #16] if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_LD) != (uint32_t)RESET) 8001868: 69bb ldr r3, [r7, #24] 800186a: 68db ldr r3, [r3, #12] 800186c: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 8001870: 2b00 cmp r3, #0 8001872: d00d beq.n 8001890 { bufflength = READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_PL) - heth->RxDescList.RxDataLength; 8001874: 69bb ldr r3, [r7, #24] 8001876: 68db ldr r3, [r3, #12] 8001878: f3c3 020e ubfx r2, r3, #0, #15 800187c: 687b ldr r3, [r7, #4] 800187e: 6e5b ldr r3, [r3, #100] ; 0x64 8001880: 1ad3 subs r3, r2, r3 8001882: 613b str r3, [r7, #16] /* Save Last descriptor index */ heth->RxDescList.pRxLastRxDesc = dmarxdesc->DESC3; 8001884: 69bb ldr r3, [r7, #24] 8001886: 68da ldr r2, [r3, #12] 8001888: 687b ldr r3, [r7, #4] 800188a: 671a str r2, [r3, #112] ; 0x70 /* Packet ready */ rxdataready = 1; 800188c: 2301 movs r3, #1 800188e: 73fb strb r3, [r7, #15] /*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, 8001890: 687b ldr r3, [r7, #4] 8001892: f103 007c add.w r0, r3, #124 ; 0x7c 8001896: 687b ldr r3, [r7, #4] 8001898: f103 0180 add.w r1, r3, #128 ; 0x80 (uint8_t *)dmarxdesc->BackupAddr0, (uint16_t) bufflength); 800189c: 69bb ldr r3, [r7, #24] 800189e: 691b ldr r3, [r3, #16] HAL_ETH_RxLinkCallback(&heth->RxDescList.pRxStart, &heth->RxDescList.pRxEnd, 80018a0: 461a mov r2, r3 80018a2: 693b ldr r3, [r7, #16] 80018a4: b29b uxth r3, r3 80018a6: f003 fdc9 bl 800543c #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ heth->RxDescList.RxDescCnt++; 80018aa: 687b ldr r3, [r7, #4] 80018ac: 6e1b ldr r3, [r3, #96] ; 0x60 80018ae: 1c5a adds r2, r3, #1 80018b0: 687b ldr r3, [r7, #4] 80018b2: 661a str r2, [r3, #96] ; 0x60 heth->RxDescList.RxDataLength += bufflength; 80018b4: 687b ldr r3, [r7, #4] 80018b6: 6e5a ldr r2, [r3, #100] ; 0x64 80018b8: 693b ldr r3, [r7, #16] 80018ba: 441a add r2, r3 80018bc: 687b ldr r3, [r7, #4] 80018be: 665a str r2, [r3, #100] ; 0x64 /* Clear buffer pointer */ dmarxdesc->BackupAddr0 = 0; 80018c0: 69bb ldr r3, [r7, #24] 80018c2: 2200 movs r2, #0 80018c4: 611a str r2, [r3, #16] } /* Increment current rx descriptor index */ INCR_RX_DESC_INDEX(descidx, 1U); 80018c6: 69fb ldr r3, [r7, #28] 80018c8: 3301 adds r3, #1 80018ca: 61fb str r3, [r7, #28] 80018cc: 69fb ldr r3, [r7, #28] 80018ce: 2b03 cmp r3, #3 80018d0: d902 bls.n 80018d8 80018d2: 69fb ldr r3, [r7, #28] 80018d4: 3b04 subs r3, #4 80018d6: 61fb str r3, [r7, #28] /* Get current descriptor address */ dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 80018d8: 687b ldr r3, [r7, #4] 80018da: 69fa ldr r2, [r7, #28] 80018dc: 3212 adds r2, #18 80018de: f853 3022 ldr.w r3, [r3, r2, lsl #2] 80018e2: 61bb str r3, [r7, #24] desccnt++; 80018e4: 697b ldr r3, [r7, #20] 80018e6: 3301 adds r3, #1 80018e8: 617b str r3, [r7, #20] while ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_OWN) == (uint32_t)RESET) && (desccnt < desccntmax) 80018ea: 69bb ldr r3, [r7, #24] 80018ec: 68db ldr r3, [r3, #12] && (rxdataready == 0U)) 80018ee: 2b00 cmp r3, #0 80018f0: db06 blt.n 8001900 while ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_OWN) == (uint32_t)RESET) && (desccnt < desccntmax) 80018f2: 697a ldr r2, [r7, #20] 80018f4: 68bb ldr r3, [r7, #8] 80018f6: 429a cmp r2, r3 80018f8: d202 bcs.n 8001900 && (rxdataready == 0U)) 80018fa: 7bfb ldrb r3, [r7, #15] 80018fc: 2b00 cmp r3, #0 80018fe: d08c beq.n 800181a } heth->RxDescList.RxBuildDescCnt += desccnt; 8001900: 687b ldr r3, [r7, #4] 8001902: 6eda ldr r2, [r3, #108] ; 0x6c 8001904: 697b ldr r3, [r7, #20] 8001906: 441a add r2, r3 8001908: 687b ldr r3, [r7, #4] 800190a: 66da str r2, [r3, #108] ; 0x6c if ((heth->RxDescList.RxBuildDescCnt) != 0U) 800190c: 687b ldr r3, [r7, #4] 800190e: 6edb ldr r3, [r3, #108] ; 0x6c 8001910: 2b00 cmp r3, #0 8001912: d002 beq.n 800191a { /* Update Descriptors */ ETH_UpdateDescriptor(heth); 8001914: 6878 ldr r0, [r7, #4] 8001916: f000 f814 bl 8001942 } heth->RxDescList.RxDescIdx = descidx; 800191a: 687b ldr r3, [r7, #4] 800191c: 69fa ldr r2, [r7, #28] 800191e: 65da str r2, [r3, #92] ; 0x5c if (rxdataready == 1U) 8001920: 7bfb ldrb r3, [r7, #15] 8001922: 2b01 cmp r3, #1 8001924: d108 bne.n 8001938 { /* Return received packet */ *pAppBuff = heth->RxDescList.pRxStart; 8001926: 687b ldr r3, [r7, #4] 8001928: 6fda ldr r2, [r3, #124] ; 0x7c 800192a: 683b ldr r3, [r7, #0] 800192c: 601a str r2, [r3, #0] /* Reset first element */ heth->RxDescList.pRxStart = NULL; 800192e: 687b ldr r3, [r7, #4] 8001930: 2200 movs r2, #0 8001932: 67da str r2, [r3, #124] ; 0x7c return HAL_OK; 8001934: 2300 movs r3, #0 8001936: e000 b.n 800193a } /* Packet not ready */ return HAL_ERROR; 8001938: 2301 movs r3, #1 } 800193a: 4618 mov r0, r3 800193c: 3720 adds r7, #32 800193e: 46bd mov sp, r7 8001940: bd80 pop {r7, pc} 08001942 : * @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) { 8001942: b580 push {r7, lr} 8001944: b088 sub sp, #32 8001946: af00 add r7, sp, #0 8001948: 6078 str r0, [r7, #4] uint32_t descidx; uint32_t desccount; ETH_DMADescTypeDef *dmarxdesc; uint8_t *buff = NULL; 800194a: 2300 movs r3, #0 800194c: 60fb str r3, [r7, #12] uint8_t allocStatus = 1U; 800194e: 2301 movs r3, #1 8001950: 74fb strb r3, [r7, #19] descidx = heth->RxDescList.RxBuildDescIdx; 8001952: 687b ldr r3, [r7, #4] 8001954: 6e9b ldr r3, [r3, #104] ; 0x68 8001956: 61fb str r3, [r7, #28] dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 8001958: 687b ldr r3, [r7, #4] 800195a: 69fa ldr r2, [r7, #28] 800195c: 3212 adds r2, #18 800195e: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8001962: 617b str r3, [r7, #20] desccount = heth->RxDescList.RxBuildDescCnt; 8001964: 687b ldr r3, [r7, #4] 8001966: 6edb ldr r3, [r3, #108] ; 0x6c 8001968: 61bb str r3, [r7, #24] while ((desccount > 0U) && (allocStatus != 0U)) 800196a: e03b b.n 80019e4 { /* Check if a buffer's attached the descriptor */ if (READ_REG(dmarxdesc->BackupAddr0) == 0U) 800196c: 697b ldr r3, [r7, #20] 800196e: 691b ldr r3, [r3, #16] 8001970: 2b00 cmp r3, #0 8001972: d112 bne.n 800199a #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /*Call registered Allocate callback*/ heth->rxAllocateCallback(&buff); #else /* Allocate callback */ HAL_ETH_RxAllocateCallback(&buff); 8001974: f107 030c add.w r3, r7, #12 8001978: 4618 mov r0, r3 800197a: f003 fd2f bl 80053dc #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ if (buff == NULL) 800197e: 68fb ldr r3, [r7, #12] 8001980: 2b00 cmp r3, #0 8001982: d102 bne.n 800198a { allocStatus = 0U; 8001984: 2300 movs r3, #0 8001986: 74fb strb r3, [r7, #19] 8001988: e007 b.n 800199a } else { WRITE_REG(dmarxdesc->BackupAddr0, (uint32_t)buff); 800198a: 68fb ldr r3, [r7, #12] 800198c: 461a mov r2, r3 800198e: 697b ldr r3, [r7, #20] 8001990: 611a str r2, [r3, #16] WRITE_REG(dmarxdesc->DESC0, (uint32_t)buff); 8001992: 68fb ldr r3, [r7, #12] 8001994: 461a mov r2, r3 8001996: 697b ldr r3, [r7, #20] 8001998: 601a str r2, [r3, #0] } } if (allocStatus != 0U) 800199a: 7cfb ldrb r3, [r7, #19] 800199c: 2b00 cmp r3, #0 800199e: d021 beq.n 80019e4 __ASM volatile ("dmb 0xF":::"memory"); 80019a0: f3bf 8f5f dmb sy } 80019a4: bf00 nop { /* Ensure rest of descriptor is written to RAM before the OWN bit */ __DMB(); if (heth->RxDescList.ItMode != 0U) 80019a6: 687b ldr r3, [r7, #4] 80019a8: 6d9b ldr r3, [r3, #88] ; 0x58 80019aa: 2b00 cmp r3, #0 80019ac: d004 beq.n 80019b8 { WRITE_REG(dmarxdesc->DESC3, ETH_DMARXNDESCRF_OWN | ETH_DMARXNDESCRF_BUF1V | ETH_DMARXNDESCRF_IOC); 80019ae: 697b ldr r3, [r7, #20] 80019b0: f04f 4241 mov.w r2, #3238002688 ; 0xc1000000 80019b4: 60da str r2, [r3, #12] 80019b6: e003 b.n 80019c0 } else { WRITE_REG(dmarxdesc->DESC3, ETH_DMARXNDESCRF_OWN | ETH_DMARXNDESCRF_BUF1V); 80019b8: 697b ldr r3, [r7, #20] 80019ba: f04f 4201 mov.w r2, #2164260864 ; 0x81000000 80019be: 60da str r2, [r3, #12] } /* Increment current rx descriptor index */ INCR_RX_DESC_INDEX(descidx, 1U); 80019c0: 69fb ldr r3, [r7, #28] 80019c2: 3301 adds r3, #1 80019c4: 61fb str r3, [r7, #28] 80019c6: 69fb ldr r3, [r7, #28] 80019c8: 2b03 cmp r3, #3 80019ca: d902 bls.n 80019d2 80019cc: 69fb ldr r3, [r7, #28] 80019ce: 3b04 subs r3, #4 80019d0: 61fb str r3, [r7, #28] /* Get current descriptor address */ dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 80019d2: 687b ldr r3, [r7, #4] 80019d4: 69fa ldr r2, [r7, #28] 80019d6: 3212 adds r2, #18 80019d8: f853 3022 ldr.w r3, [r3, r2, lsl #2] 80019dc: 617b str r3, [r7, #20] desccount--; 80019de: 69bb ldr r3, [r7, #24] 80019e0: 3b01 subs r3, #1 80019e2: 61bb str r3, [r7, #24] while ((desccount > 0U) && (allocStatus != 0U)) 80019e4: 69bb ldr r3, [r7, #24] 80019e6: 2b00 cmp r3, #0 80019e8: d002 beq.n 80019f0 80019ea: 7cfb ldrb r3, [r7, #19] 80019ec: 2b00 cmp r3, #0 80019ee: d1bd bne.n 800196c } } if (heth->RxDescList.RxBuildDescCnt != desccount) 80019f0: 687b ldr r3, [r7, #4] 80019f2: 6edb ldr r3, [r3, #108] ; 0x6c 80019f4: 69ba ldr r2, [r7, #24] 80019f6: 429a cmp r2, r3 80019f8: d00d beq.n 8001a16 { /* Set the Tail pointer address */ WRITE_REG(heth->Instance->DMACRDTPR, 0); 80019fa: 687b ldr r3, [r7, #4] 80019fc: 681b ldr r3, [r3, #0] 80019fe: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001a02: 461a mov r2, r3 8001a04: 2300 movs r3, #0 8001a06: f8c2 3128 str.w r3, [r2, #296] ; 0x128 heth->RxDescList.RxBuildDescIdx = descidx; 8001a0a: 687b ldr r3, [r7, #4] 8001a0c: 69fa ldr r2, [r7, #28] 8001a0e: 669a str r2, [r3, #104] ; 0x68 heth->RxDescList.RxBuildDescCnt = desccount; 8001a10: 687b ldr r3, [r7, #4] 8001a12: 69ba ldr r2, [r7, #24] 8001a14: 66da str r2, [r3, #108] ; 0x6c } } 8001a16: bf00 nop 8001a18: 3720 adds r7, #32 8001a1a: 46bd mov sp, r7 8001a1c: bd80 pop {r7, pc} ... 08001a20 : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval HAL status */ void HAL_ETH_IRQHandler(ETH_HandleTypeDef *heth) { 8001a20: b580 push {r7, lr} 8001a22: b084 sub sp, #16 8001a24: af00 add r7, sp, #0 8001a26: 6078 str r0, [r7, #4] uint32_t macirqenable; /* Packet received */ if (__HAL_ETH_DMA_GET_IT(heth, ETH_DMACSR_RI)) 8001a28: 687b ldr r3, [r7, #4] 8001a2a: 681b ldr r3, [r3, #0] 8001a2c: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001a30: f8d3 3160 ldr.w r3, [r3, #352] ; 0x160 8001a34: f003 0340 and.w r3, r3, #64 ; 0x40 8001a38: 2b40 cmp r3, #64 ; 0x40 8001a3a: d115 bne.n 8001a68 { if (__HAL_ETH_DMA_GET_IT_SOURCE(heth, ETH_DMACIER_RIE)) 8001a3c: 687b ldr r3, [r7, #4] 8001a3e: 681b ldr r3, [r3, #0] 8001a40: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001a44: f8d3 3134 ldr.w r3, [r3, #308] ; 0x134 8001a48: f003 0340 and.w r3, r3, #64 ; 0x40 8001a4c: 2b40 cmp r3, #64 ; 0x40 8001a4e: d10b bne.n 8001a68 { /* Clear the Eth DMA Rx IT pending bits */ __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMACSR_RI | ETH_DMACSR_NIS); 8001a50: 687b ldr r3, [r7, #4] 8001a52: 681b ldr r3, [r3, #0] 8001a54: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001a58: 461a mov r2, r3 8001a5a: f248 0340 movw r3, #32832 ; 0x8040 8001a5e: f8c2 3160 str.w r3, [r2, #352] ; 0x160 #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /*Call registered Receive complete callback*/ heth->RxCpltCallback(heth); #else /* Receive complete callback */ HAL_ETH_RxCpltCallback(heth); 8001a62: 6878 ldr r0, [r7, #4] 8001a64: f000 f8f6 bl 8001c54 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ } } /* Packet transmitted */ if (__HAL_ETH_DMA_GET_IT(heth, ETH_DMACSR_TI)) 8001a68: 687b ldr r3, [r7, #4] 8001a6a: 681b ldr r3, [r3, #0] 8001a6c: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001a70: f8d3 3160 ldr.w r3, [r3, #352] ; 0x160 8001a74: f003 0301 and.w r3, r3, #1 8001a78: 2b01 cmp r3, #1 8001a7a: d115 bne.n 8001aa8 { if (__HAL_ETH_DMA_GET_IT_SOURCE(heth, ETH_DMACIER_TIE)) 8001a7c: 687b ldr r3, [r7, #4] 8001a7e: 681b ldr r3, [r3, #0] 8001a80: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001a84: f8d3 3134 ldr.w r3, [r3, #308] ; 0x134 8001a88: f003 0301 and.w r3, r3, #1 8001a8c: 2b01 cmp r3, #1 8001a8e: d10b bne.n 8001aa8 { /* Clear the Eth DMA Tx IT pending bits */ __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMACSR_TI | ETH_DMACSR_NIS); 8001a90: 687b ldr r3, [r7, #4] 8001a92: 681b ldr r3, [r3, #0] 8001a94: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001a98: 461a mov r2, r3 8001a9a: f248 0301 movw r3, #32769 ; 0x8001 8001a9e: f8c2 3160 str.w r3, [r2, #352] ; 0x160 #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /*Call registered Transmit complete callback*/ heth->TxCpltCallback(heth); #else /* Transfer complete callback */ HAL_ETH_TxCpltCallback(heth); 8001aa2: 6878 ldr r0, [r7, #4] 8001aa4: f000 f8cc bl 8001c40 } } /* ETH DMA Error */ if (__HAL_ETH_DMA_GET_IT(heth, ETH_DMACSR_AIS)) 8001aa8: 687b ldr r3, [r7, #4] 8001aaa: 681b ldr r3, [r3, #0] 8001aac: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001ab0: f8d3 3160 ldr.w r3, [r3, #352] ; 0x160 8001ab4: f403 4380 and.w r3, r3, #16384 ; 0x4000 8001ab8: f5b3 4f80 cmp.w r3, #16384 ; 0x4000 8001abc: d153 bne.n 8001b66 { if (__HAL_ETH_DMA_GET_IT_SOURCE(heth, ETH_DMACIER_AIE)) 8001abe: 687b ldr r3, [r7, #4] 8001ac0: 681b ldr r3, [r3, #0] 8001ac2: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001ac6: f8d3 3134 ldr.w r3, [r3, #308] ; 0x134 8001aca: f403 4380 and.w r3, r3, #16384 ; 0x4000 8001ace: f5b3 4f80 cmp.w r3, #16384 ; 0x4000 8001ad2: d148 bne.n 8001b66 { heth->ErrorCode |= HAL_ETH_ERROR_DMA; 8001ad4: 687b ldr r3, [r7, #4] 8001ad6: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 8001ada: f043 0208 orr.w r2, r3, #8 8001ade: 687b ldr r3, [r7, #4] 8001ae0: f8c3 2088 str.w r2, [r3, #136] ; 0x88 /* if fatal bus error occurred */ if (__HAL_ETH_DMA_GET_IT(heth, ETH_DMACSR_FBE)) 8001ae4: 687b ldr r3, [r7, #4] 8001ae6: 681b ldr r3, [r3, #0] 8001ae8: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001aec: f8d3 3160 ldr.w r3, [r3, #352] ; 0x160 8001af0: f403 5380 and.w r3, r3, #4096 ; 0x1000 8001af4: f5b3 5f80 cmp.w r3, #4096 ; 0x1000 8001af8: d11e bne.n 8001b38 { /* Get DMA error code */ heth->DMAErrorCode = READ_BIT(heth->Instance->DMACSR, (ETH_DMACSR_FBE | ETH_DMACSR_TPS | ETH_DMACSR_RPS)); 8001afa: 687b ldr r3, [r7, #4] 8001afc: 681b ldr r3, [r3, #0] 8001afe: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001b02: f8d3 2160 ldr.w r2, [r3, #352] ; 0x160 8001b06: f241 1302 movw r3, #4354 ; 0x1102 8001b0a: 4013 ands r3, r2 8001b0c: 687a ldr r2, [r7, #4] 8001b0e: f8c2 308c str.w r3, [r2, #140] ; 0x8c /* Disable all interrupts */ __HAL_ETH_DMA_DISABLE_IT(heth, ETH_DMACIER_NIE | ETH_DMACIER_AIE); 8001b12: 687b ldr r3, [r7, #4] 8001b14: 681b ldr r3, [r3, #0] 8001b16: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001b1a: f8d3 3134 ldr.w r3, [r3, #308] ; 0x134 8001b1e: 687a ldr r2, [r7, #4] 8001b20: 6812 ldr r2, [r2, #0] 8001b22: f423 4340 bic.w r3, r3, #49152 ; 0xc000 8001b26: f502 5280 add.w r2, r2, #4096 ; 0x1000 8001b2a: f8c2 3134 str.w r3, [r2, #308] ; 0x134 /* Set HAL state to ERROR */ heth->gState = HAL_ETH_STATE_ERROR; 8001b2e: 687b ldr r3, [r7, #4] 8001b30: 22e0 movs r2, #224 ; 0xe0 8001b32: f8c3 2084 str.w r2, [r3, #132] ; 0x84 8001b36: e013 b.n 8001b60 } else { /* Get DMA error status */ heth->DMAErrorCode = READ_BIT(heth->Instance->DMACSR, (ETH_DMACSR_CDE | ETH_DMACSR_ETI | ETH_DMACSR_RWT | 8001b38: 687b ldr r3, [r7, #4] 8001b3a: 681b ldr r3, [r3, #0] 8001b3c: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001b40: f8d3 3160 ldr.w r3, [r3, #352] ; 0x160 8001b44: f403 42cd and.w r2, r3, #26240 ; 0x6680 8001b48: 687b ldr r3, [r7, #4] 8001b4a: f8c3 208c str.w r2, [r3, #140] ; 0x8c ETH_DMACSR_RBU | ETH_DMACSR_AIS)); /* Clear the interrupt summary flag */ __HAL_ETH_DMA_CLEAR_IT(heth, (ETH_DMACSR_CDE | ETH_DMACSR_ETI | ETH_DMACSR_RWT | 8001b4e: 687b ldr r3, [r7, #4] 8001b50: 681b ldr r3, [r3, #0] 8001b52: f503 5380 add.w r3, r3, #4096 ; 0x1000 8001b56: 461a mov r2, r3 8001b58: f44f 43cd mov.w r3, #26240 ; 0x6680 8001b5c: f8c2 3160 str.w r3, [r2, #352] ; 0x160 #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /* Call registered Error callback*/ heth->ErrorCallback(heth); #else /* Ethernet DMA Error callback */ HAL_ETH_ErrorCallback(heth); 8001b60: 6878 ldr r0, [r7, #4] 8001b62: f000 f881 bl 8001c68 } } /* ETH MAC Error IT */ macirqenable = heth->Instance->MACIER; 8001b66: 687b ldr r3, [r7, #4] 8001b68: 681b ldr r3, [r3, #0] 8001b6a: f8d3 30b4 ldr.w r3, [r3, #180] ; 0xb4 8001b6e: 60fb str r3, [r7, #12] if (((macirqenable & ETH_MACIER_RXSTSIE) == ETH_MACIER_RXSTSIE) || \ 8001b70: 68fb ldr r3, [r7, #12] 8001b72: f403 4380 and.w r3, r3, #16384 ; 0x4000 8001b76: 2b00 cmp r3, #0 8001b78: d104 bne.n 8001b84 ((macirqenable & ETH_MACIER_TXSTSIE) == ETH_MACIER_TXSTSIE)) 8001b7a: 68fb ldr r3, [r7, #12] 8001b7c: f403 5300 and.w r3, r3, #8192 ; 0x2000 if (((macirqenable & ETH_MACIER_RXSTSIE) == ETH_MACIER_RXSTSIE) || \ 8001b80: 2b00 cmp r3, #0 8001b82: d019 beq.n 8001bb8 { heth->ErrorCode |= HAL_ETH_ERROR_MAC; 8001b84: 687b ldr r3, [r7, #4] 8001b86: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 8001b8a: f043 0210 orr.w r2, r3, #16 8001b8e: 687b ldr r3, [r7, #4] 8001b90: f8c3 2088 str.w r2, [r3, #136] ; 0x88 /* Get MAC Rx Tx status and clear Status register pending bit */ heth->MACErrorCode = READ_REG(heth->Instance->MACRXTXSR); 8001b94: 687b ldr r3, [r7, #4] 8001b96: 681b ldr r3, [r3, #0] 8001b98: f8d3 20b8 ldr.w r2, [r3, #184] ; 0xb8 8001b9c: 687b ldr r3, [r7, #4] 8001b9e: f8c3 2090 str.w r2, [r3, #144] ; 0x90 heth->gState = HAL_ETH_STATE_ERROR; 8001ba2: 687b ldr r3, [r7, #4] 8001ba4: 22e0 movs r2, #224 ; 0xe0 8001ba6: f8c3 2084 str.w r2, [r3, #132] ; 0x84 #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /* Call registered Error callback*/ heth->ErrorCallback(heth); #else /* Ethernet Error callback */ HAL_ETH_ErrorCallback(heth); 8001baa: 6878 ldr r0, [r7, #4] 8001bac: f000 f85c bl 8001c68 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ heth->MACErrorCode = (uint32_t)(0x0U); 8001bb0: 687b ldr r3, [r7, #4] 8001bb2: 2200 movs r2, #0 8001bb4: f8c3 2090 str.w r2, [r3, #144] ; 0x90 } /* ETH PMT IT */ if (__HAL_ETH_MAC_GET_IT(heth, ETH_MAC_PMT_IT)) 8001bb8: 687b ldr r3, [r7, #4] 8001bba: 681b ldr r3, [r3, #0] 8001bbc: f8d3 30b0 ldr.w r3, [r3, #176] ; 0xb0 8001bc0: f003 0310 and.w r3, r3, #16 8001bc4: 2b10 cmp r3, #16 8001bc6: d10f bne.n 8001be8 { /* Get MAC Wake-up source and clear the status register pending bit */ heth->MACWakeUpEvent = READ_BIT(heth->Instance->MACPCSR, (ETH_MACPCSR_RWKPRCVD | ETH_MACPCSR_MGKPRCVD)); 8001bc8: 687b ldr r3, [r7, #4] 8001bca: 681b ldr r3, [r3, #0] 8001bcc: f8d3 30c0 ldr.w r3, [r3, #192] ; 0xc0 8001bd0: f003 0260 and.w r2, r3, #96 ; 0x60 8001bd4: 687b ldr r3, [r7, #4] 8001bd6: f8c3 2094 str.w r2, [r3, #148] ; 0x94 #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /* Call registered PMT callback*/ heth->PMTCallback(heth); #else /* Ethernet PMT callback */ HAL_ETH_PMTCallback(heth); 8001bda: 6878 ldr r0, [r7, #4] 8001bdc: f000 f84e bl 8001c7c #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ heth->MACWakeUpEvent = (uint32_t)(0x0U); 8001be0: 687b ldr r3, [r7, #4] 8001be2: 2200 movs r2, #0 8001be4: f8c3 2094 str.w r2, [r3, #148] ; 0x94 } /* ETH EEE IT */ if (__HAL_ETH_MAC_GET_IT(heth, ETH_MAC_LPI_IT)) 8001be8: 687b ldr r3, [r7, #4] 8001bea: 681b ldr r3, [r3, #0] 8001bec: f8d3 30b0 ldr.w r3, [r3, #176] ; 0xb0 8001bf0: f003 0320 and.w r3, r3, #32 8001bf4: 2b20 cmp r3, #32 8001bf6: d10f bne.n 8001c18 { /* Get MAC LPI interrupt source and clear the status register pending bit */ heth->MACLPIEvent = READ_BIT(heth->Instance->MACPCSR, 0x0000000FU); 8001bf8: 687b ldr r3, [r7, #4] 8001bfa: 681b ldr r3, [r3, #0] 8001bfc: f8d3 30c0 ldr.w r3, [r3, #192] ; 0xc0 8001c00: f003 020f and.w r2, r3, #15 8001c04: 687b ldr r3, [r7, #4] 8001c06: f8c3 2098 str.w r2, [r3, #152] ; 0x98 #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /* Call registered EEE callback*/ heth->EEECallback(heth); #else /* Ethernet EEE callback */ HAL_ETH_EEECallback(heth); 8001c0a: 6878 ldr r0, [r7, #4] 8001c0c: f000 f840 bl 8001c90 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ heth->MACLPIEvent = (uint32_t)(0x0U); 8001c10: 687b ldr r3, [r7, #4] 8001c12: 2200 movs r2, #0 8001c14: f8c3 2098 str.w r2, [r3, #152] ; 0x98 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ } } #else /* USE_HAL_ETH_REGISTER_CALLBACKS */ /* check ETH WAKEUP exti flag */ if (__HAL_ETH_WAKEUP_EXTI_GET_FLAG(ETH_WAKEUP_EXTI_LINE) != (uint32_t)RESET) 8001c18: 4b08 ldr r3, [pc, #32] ; (8001c3c ) 8001c1a: 6a9b ldr r3, [r3, #40] ; 0x28 8001c1c: f403 0380 and.w r3, r3, #4194304 ; 0x400000 8001c20: 2b00 cmp r3, #0 8001c22: d006 beq.n 8001c32 { /* Clear ETH WAKEUP Exti pending bit */ __HAL_ETH_WAKEUP_EXTI_CLEAR_FLAG(ETH_WAKEUP_EXTI_LINE); 8001c24: 4b05 ldr r3, [pc, #20] ; (8001c3c ) 8001c26: f44f 0280 mov.w r2, #4194304 ; 0x400000 8001c2a: 629a str r2, [r3, #40] ; 0x28 #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /* Call registered WakeUp callback*/ heth->WakeUpCallback(heth); #else /* ETH WAKEUP callback */ HAL_ETH_WakeUpCallback(heth); 8001c2c: 6878 ldr r0, [r7, #4] 8001c2e: f000 f839 bl 8001ca4 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ } #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ } 8001c32: bf00 nop 8001c34: 3710 adds r7, #16 8001c36: 46bd mov sp, r7 8001c38: bd80 pop {r7, pc} 8001c3a: bf00 nop 8001c3c: 58000080 .word 0x58000080 08001c40 : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_TxCpltCallback(ETH_HandleTypeDef *heth) { 8001c40: b480 push {r7} 8001c42: b083 sub sp, #12 8001c44: af00 add r7, sp, #0 8001c46: 6078 str r0, [r7, #4] /* Prevent unused argument(s) compilation warning */ UNUSED(heth); /* NOTE : This function Should not be modified, when the callback is needed, the HAL_ETH_TxCpltCallback could be implemented in the user file */ } 8001c48: bf00 nop 8001c4a: 370c adds r7, #12 8001c4c: 46bd mov sp, r7 8001c4e: f85d 7b04 ldr.w r7, [sp], #4 8001c52: 4770 bx lr 08001c54 : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef *heth) { 8001c54: b480 push {r7} 8001c56: b083 sub sp, #12 8001c58: af00 add r7, sp, #0 8001c5a: 6078 str r0, [r7, #4] /* Prevent unused argument(s) compilation warning */ UNUSED(heth); /* NOTE : This function Should not be modified, when the callback is needed, the HAL_ETH_RxCpltCallback could be implemented in the user file */ } 8001c5c: bf00 nop 8001c5e: 370c adds r7, #12 8001c60: 46bd mov sp, r7 8001c62: f85d 7b04 ldr.w r7, [sp], #4 8001c66: 4770 bx lr 08001c68 : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *heth) { 8001c68: b480 push {r7} 8001c6a: b083 sub sp, #12 8001c6c: af00 add r7, sp, #0 8001c6e: 6078 str r0, [r7, #4] /* Prevent unused argument(s) compilation warning */ UNUSED(heth); /* NOTE : This function Should not be modified, when the callback is needed, the HAL_ETH_ErrorCallback could be implemented in the user file */ } 8001c70: bf00 nop 8001c72: 370c adds r7, #12 8001c74: 46bd mov sp, r7 8001c76: f85d 7b04 ldr.w r7, [sp], #4 8001c7a: 4770 bx lr 08001c7c : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_PMTCallback(ETH_HandleTypeDef *heth) { 8001c7c: b480 push {r7} 8001c7e: b083 sub sp, #12 8001c80: af00 add r7, sp, #0 8001c82: 6078 str r0, [r7, #4] /* Prevent unused argument(s) compilation warning */ UNUSED(heth); /* NOTE : This function Should not be modified, when the callback is needed, the HAL_ETH_PMTCallback could be implemented in the user file */ } 8001c84: bf00 nop 8001c86: 370c adds r7, #12 8001c88: 46bd mov sp, r7 8001c8a: f85d 7b04 ldr.w r7, [sp], #4 8001c8e: 4770 bx lr 08001c90 : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_EEECallback(ETH_HandleTypeDef *heth) { 8001c90: b480 push {r7} 8001c92: b083 sub sp, #12 8001c94: af00 add r7, sp, #0 8001c96: 6078 str r0, [r7, #4] /* Prevent unused argument(s) compilation warning */ UNUSED(heth); /* NOTE : This function Should not be modified, when the callback is needed, the HAL_ETH_EEECallback could be implemented in the user file */ } 8001c98: bf00 nop 8001c9a: 370c adds r7, #12 8001c9c: 46bd mov sp, r7 8001c9e: f85d 7b04 ldr.w r7, [sp], #4 8001ca2: 4770 bx lr 08001ca4 : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_WakeUpCallback(ETH_HandleTypeDef *heth) { 8001ca4: b480 push {r7} 8001ca6: b083 sub sp, #12 8001ca8: af00 add r7, sp, #0 8001caa: 6078 str r0, [r7, #4] /* Prevent unused argument(s) compilation warning */ UNUSED(heth); /* NOTE : This function Should not be modified, when the callback is needed, the HAL_ETH_WakeUpCallback could be implemented in the user file */ } 8001cac: bf00 nop 8001cae: 370c adds r7, #12 8001cb0: 46bd mov sp, r7 8001cb2: f85d 7b04 ldr.w r7, [sp], #4 8001cb6: 4770 bx lr 08001cb8 : * @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) { 8001cb8: b580 push {r7, lr} 8001cba: b086 sub sp, #24 8001cbc: af00 add r7, sp, #0 8001cbe: 60f8 str r0, [r7, #12] 8001cc0: 60b9 str r1, [r7, #8] 8001cc2: 607a str r2, [r7, #4] 8001cc4: 603b str r3, [r7, #0] uint32_t tickstart; uint32_t tmpreg; /* Check for the Busy flag */ if (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) != (uint32_t)RESET) 8001cc6: 68fb ldr r3, [r7, #12] 8001cc8: 681b ldr r3, [r3, #0] 8001cca: f8d3 3200 ldr.w r3, [r3, #512] ; 0x200 8001cce: f003 0301 and.w r3, r3, #1 8001cd2: 2b00 cmp r3, #0 8001cd4: d001 beq.n 8001cda { return HAL_ERROR; 8001cd6: 2301 movs r3, #1 8001cd8: e03e b.n 8001d58 } /* Get the MACMDIOAR value */ WRITE_REG(tmpreg, heth->Instance->MACMDIOAR); 8001cda: 68fb ldr r3, [r7, #12] 8001cdc: 681b ldr r3, [r3, #0] 8001cde: f8d3 3200 ldr.w r3, [r3, #512] ; 0x200 8001ce2: 617b str r3, [r7, #20] - Set the PHY device address - Set the PHY register address - Set the read mode - Set the MII Busy bit */ MODIFY_REG(tmpreg, ETH_MACMDIOAR_PA, (PHYAddr << 21)); 8001ce4: 697b ldr r3, [r7, #20] 8001ce6: f023 7278 bic.w r2, r3, #65011712 ; 0x3e00000 8001cea: 68bb ldr r3, [r7, #8] 8001cec: 055b lsls r3, r3, #21 8001cee: 4313 orrs r3, r2 8001cf0: 617b str r3, [r7, #20] MODIFY_REG(tmpreg, ETH_MACMDIOAR_RDA, (PHYReg << 16)); 8001cf2: 697b ldr r3, [r7, #20] 8001cf4: f423 12f8 bic.w r2, r3, #2031616 ; 0x1f0000 8001cf8: 687b ldr r3, [r7, #4] 8001cfa: 041b lsls r3, r3, #16 8001cfc: 4313 orrs r3, r2 8001cfe: 617b str r3, [r7, #20] MODIFY_REG(tmpreg, ETH_MACMDIOAR_MOC, ETH_MACMDIOAR_MOC_RD); 8001d00: 697b ldr r3, [r7, #20] 8001d02: f043 030c orr.w r3, r3, #12 8001d06: 617b str r3, [r7, #20] SET_BIT(tmpreg, ETH_MACMDIOAR_MB); 8001d08: 697b ldr r3, [r7, #20] 8001d0a: f043 0301 orr.w r3, r3, #1 8001d0e: 617b str r3, [r7, #20] /* Write the result value into the MDII Address register */ WRITE_REG(heth->Instance->MACMDIOAR, tmpreg); 8001d10: 68fb ldr r3, [r7, #12] 8001d12: 681b ldr r3, [r3, #0] 8001d14: 697a ldr r2, [r7, #20] 8001d16: f8c3 2200 str.w r2, [r3, #512] ; 0x200 tickstart = HAL_GetTick(); 8001d1a: f7ff f977 bl 800100c 8001d1e: 6138 str r0, [r7, #16] /* Wait for the Busy flag */ while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 8001d20: e009 b.n 8001d36 { if (((HAL_GetTick() - tickstart) > ETH_MDIO_BUS_TIMEOUT)) 8001d22: f7ff f973 bl 800100c 8001d26: 4602 mov r2, r0 8001d28: 693b ldr r3, [r7, #16] 8001d2a: 1ad3 subs r3, r2, r3 8001d2c: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8 8001d30: d901 bls.n 8001d36 { return HAL_ERROR; 8001d32: 2301 movs r3, #1 8001d34: e010 b.n 8001d58 while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 8001d36: 68fb ldr r3, [r7, #12] 8001d38: 681b ldr r3, [r3, #0] 8001d3a: f8d3 3200 ldr.w r3, [r3, #512] ; 0x200 8001d3e: f003 0301 and.w r3, r3, #1 8001d42: 2b00 cmp r3, #0 8001d44: d1ed bne.n 8001d22 } } /* Get MACMIIDR value */ WRITE_REG(*pRegValue, (uint16_t)heth->Instance->MACMDIODR); 8001d46: 68fb ldr r3, [r7, #12] 8001d48: 681b ldr r3, [r3, #0] 8001d4a: f8d3 3204 ldr.w r3, [r3, #516] ; 0x204 8001d4e: b29b uxth r3, r3 8001d50: 461a mov r2, r3 8001d52: 683b ldr r3, [r7, #0] 8001d54: 601a str r2, [r3, #0] return HAL_OK; 8001d56: 2300 movs r3, #0 } 8001d58: 4618 mov r0, r3 8001d5a: 3718 adds r7, #24 8001d5c: 46bd mov sp, r7 8001d5e: bd80 pop {r7, pc} 08001d60 : * @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) { 8001d60: b580 push {r7, lr} 8001d62: b086 sub sp, #24 8001d64: af00 add r7, sp, #0 8001d66: 60f8 str r0, [r7, #12] 8001d68: 60b9 str r1, [r7, #8] 8001d6a: 607a str r2, [r7, #4] 8001d6c: 603b str r3, [r7, #0] uint32_t tickstart; uint32_t tmpreg; /* Check for the Busy flag */ if (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) != (uint32_t)RESET) 8001d6e: 68fb ldr r3, [r7, #12] 8001d70: 681b ldr r3, [r3, #0] 8001d72: f8d3 3200 ldr.w r3, [r3, #512] ; 0x200 8001d76: f003 0301 and.w r3, r3, #1 8001d7a: 2b00 cmp r3, #0 8001d7c: d001 beq.n 8001d82 { return HAL_ERROR; 8001d7e: 2301 movs r3, #1 8001d80: e03c b.n 8001dfc } /* Get the MACMDIOAR value */ WRITE_REG(tmpreg, heth->Instance->MACMDIOAR); 8001d82: 68fb ldr r3, [r7, #12] 8001d84: 681b ldr r3, [r3, #0] 8001d86: f8d3 3200 ldr.w r3, [r3, #512] ; 0x200 8001d8a: 617b str r3, [r7, #20] - Set the PHY device address - Set the PHY register address - Set the write mode - Set the MII Busy bit */ MODIFY_REG(tmpreg, ETH_MACMDIOAR_PA, (PHYAddr << 21)); 8001d8c: 697b ldr r3, [r7, #20] 8001d8e: f023 7278 bic.w r2, r3, #65011712 ; 0x3e00000 8001d92: 68bb ldr r3, [r7, #8] 8001d94: 055b lsls r3, r3, #21 8001d96: 4313 orrs r3, r2 8001d98: 617b str r3, [r7, #20] MODIFY_REG(tmpreg, ETH_MACMDIOAR_RDA, (PHYReg << 16)); 8001d9a: 697b ldr r3, [r7, #20] 8001d9c: f423 12f8 bic.w r2, r3, #2031616 ; 0x1f0000 8001da0: 687b ldr r3, [r7, #4] 8001da2: 041b lsls r3, r3, #16 8001da4: 4313 orrs r3, r2 8001da6: 617b str r3, [r7, #20] MODIFY_REG(tmpreg, ETH_MACMDIOAR_MOC, ETH_MACMDIOAR_MOC_WR); 8001da8: 697b ldr r3, [r7, #20] 8001daa: f023 030c bic.w r3, r3, #12 8001dae: f043 0304 orr.w r3, r3, #4 8001db2: 617b str r3, [r7, #20] SET_BIT(tmpreg, ETH_MACMDIOAR_MB); 8001db4: 697b ldr r3, [r7, #20] 8001db6: f043 0301 orr.w r3, r3, #1 8001dba: 617b str r3, [r7, #20] /* Give the value to the MII data register */ WRITE_REG(ETH->MACMDIODR, (uint16_t)RegValue); 8001dbc: 683b ldr r3, [r7, #0] 8001dbe: b29a uxth r2, r3 8001dc0: 4b10 ldr r3, [pc, #64] ; (8001e04 ) 8001dc2: f8c3 2204 str.w r2, [r3, #516] ; 0x204 /* Write the result value into the MII Address register */ WRITE_REG(ETH->MACMDIOAR, tmpreg); 8001dc6: 4a0f ldr r2, [pc, #60] ; (8001e04 ) 8001dc8: 697b ldr r3, [r7, #20] 8001dca: f8c2 3200 str.w r3, [r2, #512] ; 0x200 tickstart = HAL_GetTick(); 8001dce: f7ff f91d bl 800100c 8001dd2: 6138 str r0, [r7, #16] /* Wait for the Busy flag */ while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 8001dd4: e009 b.n 8001dea { if (((HAL_GetTick() - tickstart) > ETH_MDIO_BUS_TIMEOUT)) 8001dd6: f7ff f919 bl 800100c 8001dda: 4602 mov r2, r0 8001ddc: 693b ldr r3, [r7, #16] 8001dde: 1ad3 subs r3, r2, r3 8001de0: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8 8001de4: d901 bls.n 8001dea { return HAL_ERROR; 8001de6: 2301 movs r3, #1 8001de8: e008 b.n 8001dfc while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 8001dea: 68fb ldr r3, [r7, #12] 8001dec: 681b ldr r3, [r3, #0] 8001dee: f8d3 3200 ldr.w r3, [r3, #512] ; 0x200 8001df2: f003 0301 and.w r3, r3, #1 8001df6: 2b00 cmp r3, #0 8001df8: d1ed bne.n 8001dd6 } } return HAL_OK; 8001dfa: 2300 movs r3, #0 } 8001dfc: 4618 mov r0, r3 8001dfe: 3718 adds r7, #24 8001e00: 46bd mov sp, r7 8001e02: bd80 pop {r7, pc} 8001e04: 40028000 .word 0x40028000 08001e08 : * @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) { 8001e08: b480 push {r7} 8001e0a: b083 sub sp, #12 8001e0c: af00 add r7, sp, #0 8001e0e: 6078 str r0, [r7, #4] 8001e10: 6039 str r1, [r7, #0] if (macconf == NULL) 8001e12: 683b ldr r3, [r7, #0] 8001e14: 2b00 cmp r3, #0 8001e16: d101 bne.n 8001e1c { return HAL_ERROR; 8001e18: 2301 movs r3, #1 8001e1a: e1c3 b.n 80021a4 } /* Get MAC parameters */ macconf->PreambleLength = READ_BIT(heth->Instance->MACCR, ETH_MACCR_PRELEN); 8001e1c: 687b ldr r3, [r7, #4] 8001e1e: 681b ldr r3, [r3, #0] 8001e20: 681b ldr r3, [r3, #0] 8001e22: f003 020c and.w r2, r3, #12 8001e26: 683b ldr r3, [r7, #0] 8001e28: 62da str r2, [r3, #44] ; 0x2c macconf->DeferralCheck = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DC) >> 4) > 0U) ? ENABLE : DISABLE; 8001e2a: 687b ldr r3, [r7, #4] 8001e2c: 681b ldr r3, [r3, #0] 8001e2e: 681b ldr r3, [r3, #0] 8001e30: f003 0310 and.w r3, r3, #16 8001e34: 2b00 cmp r3, #0 8001e36: bf14 ite ne 8001e38: 2301 movne r3, #1 8001e3a: 2300 moveq r3, #0 8001e3c: b2db uxtb r3, r3 8001e3e: 461a mov r2, r3 8001e40: 683b ldr r3, [r7, #0] 8001e42: f883 2028 strb.w r2, [r3, #40] ; 0x28 macconf->BackOffLimit = READ_BIT(heth->Instance->MACCR, ETH_MACCR_BL); 8001e46: 687b ldr r3, [r7, #4] 8001e48: 681b ldr r3, [r3, #0] 8001e4a: 681b ldr r3, [r3, #0] 8001e4c: f003 0260 and.w r2, r3, #96 ; 0x60 8001e50: 683b ldr r3, [r7, #0] 8001e52: 625a str r2, [r3, #36] ; 0x24 macconf->RetryTransmission = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DR) >> 8) == 0U) ? ENABLE : DISABLE; 8001e54: 687b ldr r3, [r7, #4] 8001e56: 681b ldr r3, [r3, #0] 8001e58: 681b ldr r3, [r3, #0] 8001e5a: f403 7380 and.w r3, r3, #256 ; 0x100 8001e5e: 2b00 cmp r3, #0 8001e60: bf0c ite eq 8001e62: 2301 moveq r3, #1 8001e64: 2300 movne r3, #0 8001e66: b2db uxtb r3, r3 8001e68: 461a mov r2, r3 8001e6a: 683b ldr r3, [r7, #0] 8001e6c: f883 2020 strb.w r2, [r3, #32] macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DCRS) >> 9) > 0U) 8001e70: 687b ldr r3, [r7, #4] 8001e72: 681b ldr r3, [r3, #0] 8001e74: 681b ldr r3, [r3, #0] 8001e76: f403 7300 and.w r3, r3, #512 ; 0x200 ? ENABLE : DISABLE; 8001e7a: 2b00 cmp r3, #0 8001e7c: bf14 ite ne 8001e7e: 2301 movne r3, #1 8001e80: 2300 moveq r3, #0 8001e82: b2db uxtb r3, r3 8001e84: 461a mov r2, r3 macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DCRS) >> 9) > 0U) 8001e86: 683b ldr r3, [r7, #0] 8001e88: 77da strb r2, [r3, #31] macconf->ReceiveOwn = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DO) >> 10) == 0U) ? ENABLE : DISABLE; 8001e8a: 687b ldr r3, [r7, #4] 8001e8c: 681b ldr r3, [r3, #0] 8001e8e: 681b ldr r3, [r3, #0] 8001e90: f403 6380 and.w r3, r3, #1024 ; 0x400 8001e94: 2b00 cmp r3, #0 8001e96: bf0c ite eq 8001e98: 2301 moveq r3, #1 8001e9a: 2300 movne r3, #0 8001e9c: b2db uxtb r3, r3 8001e9e: 461a mov r2, r3 8001ea0: 683b ldr r3, [r7, #0] 8001ea2: 779a strb r2, [r3, #30] macconf->CarrierSenseBeforeTransmit = ((READ_BIT(heth->Instance->MACCR, 8001ea4: 687b ldr r3, [r7, #4] 8001ea6: 681b ldr r3, [r3, #0] 8001ea8: 681b ldr r3, [r3, #0] ETH_MACCR_ECRSFD) >> 11) > 0U) ? ENABLE : DISABLE; 8001eaa: f403 6300 and.w r3, r3, #2048 ; 0x800 8001eae: 2b00 cmp r3, #0 8001eb0: bf14 ite ne 8001eb2: 2301 movne r3, #1 8001eb4: 2300 moveq r3, #0 8001eb6: b2db uxtb r3, r3 8001eb8: 461a mov r2, r3 macconf->CarrierSenseBeforeTransmit = ((READ_BIT(heth->Instance->MACCR, 8001eba: 683b ldr r3, [r7, #0] 8001ebc: 775a strb r2, [r3, #29] macconf->LoopbackMode = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_LM) >> 12) > 0U) ? ENABLE : DISABLE; 8001ebe: 687b ldr r3, [r7, #4] 8001ec0: 681b ldr r3, [r3, #0] 8001ec2: 681b ldr r3, [r3, #0] 8001ec4: f403 5380 and.w r3, r3, #4096 ; 0x1000 8001ec8: 2b00 cmp r3, #0 8001eca: bf14 ite ne 8001ecc: 2301 movne r3, #1 8001ece: 2300 moveq r3, #0 8001ed0: b2db uxtb r3, r3 8001ed2: 461a mov r2, r3 8001ed4: 683b ldr r3, [r7, #0] 8001ed6: 771a strb r2, [r3, #28] macconf->DuplexMode = READ_BIT(heth->Instance->MACCR, ETH_MACCR_DM); 8001ed8: 687b ldr r3, [r7, #4] 8001eda: 681b ldr r3, [r3, #0] 8001edc: 681b ldr r3, [r3, #0] 8001ede: f403 5200 and.w r2, r3, #8192 ; 0x2000 8001ee2: 683b ldr r3, [r7, #0] 8001ee4: 619a str r2, [r3, #24] macconf->Speed = READ_BIT(heth->Instance->MACCR, ETH_MACCR_FES); 8001ee6: 687b ldr r3, [r7, #4] 8001ee8: 681b ldr r3, [r3, #0] 8001eea: 681b ldr r3, [r3, #0] 8001eec: f403 4280 and.w r2, r3, #16384 ; 0x4000 8001ef0: 683b ldr r3, [r7, #0] 8001ef2: 615a str r2, [r3, #20] macconf->JumboPacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_JE) >> 16) > 0U) ? ENABLE : DISABLE; 8001ef4: 687b ldr r3, [r7, #4] 8001ef6: 681b ldr r3, [r3, #0] 8001ef8: 681b ldr r3, [r3, #0] 8001efa: f403 3380 and.w r3, r3, #65536 ; 0x10000 8001efe: 2b00 cmp r3, #0 8001f00: bf14 ite ne 8001f02: 2301 movne r3, #1 8001f04: 2300 moveq r3, #0 8001f06: b2db uxtb r3, r3 8001f08: 461a mov r2, r3 8001f0a: 683b ldr r3, [r7, #0] 8001f0c: 749a strb r2, [r3, #18] macconf->Jabber = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_JD) >> 17) == 0U) ? ENABLE : DISABLE; 8001f0e: 687b ldr r3, [r7, #4] 8001f10: 681b ldr r3, [r3, #0] 8001f12: 681b ldr r3, [r3, #0] 8001f14: f403 3300 and.w r3, r3, #131072 ; 0x20000 8001f18: 2b00 cmp r3, #0 8001f1a: bf0c ite eq 8001f1c: 2301 moveq r3, #1 8001f1e: 2300 movne r3, #0 8001f20: b2db uxtb r3, r3 8001f22: 461a mov r2, r3 8001f24: 683b ldr r3, [r7, #0] 8001f26: 745a strb r2, [r3, #17] macconf->Watchdog = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_WD) >> 19) == 0U) ? ENABLE : DISABLE; 8001f28: 687b ldr r3, [r7, #4] 8001f2a: 681b ldr r3, [r3, #0] 8001f2c: 681b ldr r3, [r3, #0] 8001f2e: f403 2300 and.w r3, r3, #524288 ; 0x80000 8001f32: 2b00 cmp r3, #0 8001f34: bf0c ite eq 8001f36: 2301 moveq r3, #1 8001f38: 2300 movne r3, #0 8001f3a: b2db uxtb r3, r3 8001f3c: 461a mov r2, r3 8001f3e: 683b ldr r3, [r7, #0] 8001f40: 741a strb r2, [r3, #16] macconf->AutomaticPadCRCStrip = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_ACS) >> 20) > 0U) ? ENABLE : DISABLE; 8001f42: 687b ldr r3, [r7, #4] 8001f44: 681b ldr r3, [r3, #0] 8001f46: 681b ldr r3, [r3, #0] 8001f48: f403 1380 and.w r3, r3, #1048576 ; 0x100000 8001f4c: 2b00 cmp r3, #0 8001f4e: bf14 ite ne 8001f50: 2301 movne r3, #1 8001f52: 2300 moveq r3, #0 8001f54: b2db uxtb r3, r3 8001f56: 461a mov r2, r3 8001f58: 683b ldr r3, [r7, #0] 8001f5a: 73da strb r2, [r3, #15] macconf->CRCStripTypePacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_CST) >> 21) > 0U) ? ENABLE : DISABLE; 8001f5c: 687b ldr r3, [r7, #4] 8001f5e: 681b ldr r3, [r3, #0] 8001f60: 681b ldr r3, [r3, #0] 8001f62: f403 1300 and.w r3, r3, #2097152 ; 0x200000 8001f66: 2b00 cmp r3, #0 8001f68: bf14 ite ne 8001f6a: 2301 movne r3, #1 8001f6c: 2300 moveq r3, #0 8001f6e: b2db uxtb r3, r3 8001f70: 461a mov r2, r3 8001f72: 683b ldr r3, [r7, #0] 8001f74: 739a strb r2, [r3, #14] macconf->Support2KPacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_S2KP) >> 22) > 0U) ? ENABLE : DISABLE; 8001f76: 687b ldr r3, [r7, #4] 8001f78: 681b ldr r3, [r3, #0] 8001f7a: 681b ldr r3, [r3, #0] 8001f7c: f403 0380 and.w r3, r3, #4194304 ; 0x400000 8001f80: 2b00 cmp r3, #0 8001f82: bf14 ite ne 8001f84: 2301 movne r3, #1 8001f86: 2300 moveq r3, #0 8001f88: b2db uxtb r3, r3 8001f8a: 461a mov r2, r3 8001f8c: 683b ldr r3, [r7, #0] 8001f8e: 735a strb r2, [r3, #13] macconf->GiantPacketSizeLimitControl = ((READ_BIT(heth->Instance->MACCR, 8001f90: 687b ldr r3, [r7, #4] 8001f92: 681b ldr r3, [r3, #0] 8001f94: 681b ldr r3, [r3, #0] ETH_MACCR_GPSLCE) >> 23) > 0U) ? ENABLE : DISABLE; 8001f96: f403 0300 and.w r3, r3, #8388608 ; 0x800000 8001f9a: 2b00 cmp r3, #0 8001f9c: bf14 ite ne 8001f9e: 2301 movne r3, #1 8001fa0: 2300 moveq r3, #0 8001fa2: b2db uxtb r3, r3 8001fa4: 461a mov r2, r3 macconf->GiantPacketSizeLimitControl = ((READ_BIT(heth->Instance->MACCR, 8001fa6: 683b ldr r3, [r7, #0] 8001fa8: 731a strb r2, [r3, #12] macconf->InterPacketGapVal = READ_BIT(heth->Instance->MACCR, ETH_MACCR_IPG); 8001faa: 687b ldr r3, [r7, #4] 8001fac: 681b ldr r3, [r3, #0] 8001fae: 681b ldr r3, [r3, #0] 8001fb0: f003 62e0 and.w r2, r3, #117440512 ; 0x7000000 8001fb4: 683b ldr r3, [r7, #0] 8001fb6: 609a str r2, [r3, #8] macconf->ChecksumOffload = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_IPC) >> 27) > 0U) ? ENABLE : DISABLE; 8001fb8: 687b ldr r3, [r7, #4] 8001fba: 681b ldr r3, [r3, #0] 8001fbc: 681b ldr r3, [r3, #0] 8001fbe: f003 6300 and.w r3, r3, #134217728 ; 0x8000000 8001fc2: 2b00 cmp r3, #0 8001fc4: bf14 ite ne 8001fc6: 2301 movne r3, #1 8001fc8: 2300 moveq r3, #0 8001fca: b2db uxtb r3, r3 8001fcc: 461a mov r2, r3 8001fce: 683b ldr r3, [r7, #0] 8001fd0: 711a strb r2, [r3, #4] macconf->SourceAddrControl = READ_BIT(heth->Instance->MACCR, ETH_MACCR_SARC); 8001fd2: 687b ldr r3, [r7, #4] 8001fd4: 681b ldr r3, [r3, #0] 8001fd6: 681b ldr r3, [r3, #0] 8001fd8: f003 42e0 and.w r2, r3, #1879048192 ; 0x70000000 8001fdc: 683b ldr r3, [r7, #0] 8001fde: 601a str r2, [r3, #0] macconf->GiantPacketSizeLimit = READ_BIT(heth->Instance->MACECR, ETH_MACECR_GPSL); 8001fe0: 687b ldr r3, [r7, #4] 8001fe2: 681b ldr r3, [r3, #0] 8001fe4: 685b ldr r3, [r3, #4] 8001fe6: f3c3 020d ubfx r2, r3, #0, #14 8001fea: 683b ldr r3, [r7, #0] 8001fec: 635a str r2, [r3, #52] ; 0x34 macconf->CRCCheckingRxPackets = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_DCRCC) >> 16) == 0U) ? ENABLE : DISABLE; 8001fee: 687b ldr r3, [r7, #4] 8001ff0: 681b ldr r3, [r3, #0] 8001ff2: 685b ldr r3, [r3, #4] 8001ff4: f403 3380 and.w r3, r3, #65536 ; 0x10000 8001ff8: 2b00 cmp r3, #0 8001ffa: bf0c ite eq 8001ffc: 2301 moveq r3, #1 8001ffe: 2300 movne r3, #0 8002000: b2db uxtb r3, r3 8002002: 461a mov r2, r3 8002004: 683b ldr r3, [r7, #0] 8002006: f883 2032 strb.w r2, [r3, #50] ; 0x32 macconf->SlowProtocolDetect = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_SPEN) >> 17) > 0U) ? ENABLE : DISABLE; 800200a: 687b ldr r3, [r7, #4] 800200c: 681b ldr r3, [r3, #0] 800200e: 685b ldr r3, [r3, #4] 8002010: f403 3300 and.w r3, r3, #131072 ; 0x20000 8002014: 2b00 cmp r3, #0 8002016: bf14 ite ne 8002018: 2301 movne r3, #1 800201a: 2300 moveq r3, #0 800201c: b2db uxtb r3, r3 800201e: 461a mov r2, r3 8002020: 683b ldr r3, [r7, #0] 8002022: f883 2031 strb.w r2, [r3, #49] ; 0x31 macconf->UnicastSlowProtocolPacketDetect = ((READ_BIT(heth->Instance->MACECR, 8002026: 687b ldr r3, [r7, #4] 8002028: 681b ldr r3, [r3, #0] 800202a: 685b ldr r3, [r3, #4] ETH_MACECR_USP) >> 18) > 0U) ? ENABLE : DISABLE; 800202c: f403 2380 and.w r3, r3, #262144 ; 0x40000 8002030: 2b00 cmp r3, #0 8002032: bf14 ite ne 8002034: 2301 movne r3, #1 8002036: 2300 moveq r3, #0 8002038: b2db uxtb r3, r3 800203a: 461a mov r2, r3 macconf->UnicastSlowProtocolPacketDetect = ((READ_BIT(heth->Instance->MACECR, 800203c: 683b ldr r3, [r7, #0] 800203e: f883 2030 strb.w r2, [r3, #48] ; 0x30 macconf->ExtendedInterPacketGap = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPGEN) >> 24) > 0U) 8002042: 687b ldr r3, [r7, #4] 8002044: 681b ldr r3, [r3, #0] 8002046: 685b ldr r3, [r3, #4] 8002048: f003 7380 and.w r3, r3, #16777216 ; 0x1000000 ? ENABLE : DISABLE; 800204c: 2b00 cmp r3, #0 800204e: bf14 ite ne 8002050: 2301 movne r3, #1 8002052: 2300 moveq r3, #0 8002054: b2db uxtb r3, r3 8002056: 461a mov r2, r3 macconf->ExtendedInterPacketGap = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPGEN) >> 24) > 0U) 8002058: 683b ldr r3, [r7, #0] 800205a: f883 2038 strb.w r2, [r3, #56] ; 0x38 macconf->ExtendedInterPacketGapVal = READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPG) >> 25; 800205e: 687b ldr r3, [r7, #4] 8002060: 681b ldr r3, [r3, #0] 8002062: 685b ldr r3, [r3, #4] 8002064: 0e5b lsrs r3, r3, #25 8002066: f003 021f and.w r2, r3, #31 800206a: 683b ldr r3, [r7, #0] 800206c: 63da str r2, [r3, #60] ; 0x3c macconf->ProgrammableWatchdog = ((READ_BIT(heth->Instance->MACWTR, ETH_MACWTR_PWE) >> 8) > 0U) ? ENABLE : DISABLE; 800206e: 687b ldr r3, [r7, #4] 8002070: 681b ldr r3, [r3, #0] 8002072: 68db ldr r3, [r3, #12] 8002074: f403 7380 and.w r3, r3, #256 ; 0x100 8002078: 2b00 cmp r3, #0 800207a: bf14 ite ne 800207c: 2301 movne r3, #1 800207e: 2300 moveq r3, #0 8002080: b2db uxtb r3, r3 8002082: 461a mov r2, r3 8002084: 683b ldr r3, [r7, #0] 8002086: f883 2040 strb.w r2, [r3, #64] ; 0x40 macconf->WatchdogTimeout = READ_BIT(heth->Instance->MACWTR, ETH_MACWTR_WTO); 800208a: 687b ldr r3, [r7, #4] 800208c: 681b ldr r3, [r3, #0] 800208e: 68db ldr r3, [r3, #12] 8002090: f003 020f and.w r2, r3, #15 8002094: 683b ldr r3, [r7, #0] 8002096: 645a str r2, [r3, #68] ; 0x44 macconf->TransmitFlowControl = ((READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_TFE) >> 1) > 0U) ? ENABLE : DISABLE; 8002098: 687b ldr r3, [r7, #4] 800209a: 681b ldr r3, [r3, #0] 800209c: 6f1b ldr r3, [r3, #112] ; 0x70 800209e: f003 0302 and.w r3, r3, #2 80020a2: 2b00 cmp r3, #0 80020a4: bf14 ite ne 80020a6: 2301 movne r3, #1 80020a8: 2300 moveq r3, #0 80020aa: b2db uxtb r3, r3 80020ac: 461a mov r2, r3 80020ae: 683b ldr r3, [r7, #0] 80020b0: f883 2054 strb.w r2, [r3, #84] ; 0x54 macconf->ZeroQuantaPause = ((READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_DZPQ) >> 7) == 0U) ? ENABLE : DISABLE; 80020b4: 687b ldr r3, [r7, #4] 80020b6: 681b ldr r3, [r3, #0] 80020b8: 6f1b ldr r3, [r3, #112] ; 0x70 80020ba: f003 0380 and.w r3, r3, #128 ; 0x80 80020be: 2b00 cmp r3, #0 80020c0: bf0c ite eq 80020c2: 2301 moveq r3, #1 80020c4: 2300 movne r3, #0 80020c6: b2db uxtb r3, r3 80020c8: 461a mov r2, r3 80020ca: 683b ldr r3, [r7, #0] 80020cc: f883 204c strb.w r2, [r3, #76] ; 0x4c macconf->PauseLowThreshold = READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_PLT); 80020d0: 687b ldr r3, [r7, #4] 80020d2: 681b ldr r3, [r3, #0] 80020d4: 6f1b ldr r3, [r3, #112] ; 0x70 80020d6: f003 0270 and.w r2, r3, #112 ; 0x70 80020da: 683b ldr r3, [r7, #0] 80020dc: 651a str r2, [r3, #80] ; 0x50 macconf->PauseTime = (READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_PT) >> 16); 80020de: 687b ldr r3, [r7, #4] 80020e0: 681b ldr r3, [r3, #0] 80020e2: 6f1b ldr r3, [r3, #112] ; 0x70 80020e4: 0c1b lsrs r3, r3, #16 80020e6: b29a uxth r2, r3 80020e8: 683b ldr r3, [r7, #0] 80020ea: 649a str r2, [r3, #72] ; 0x48 macconf->ReceiveFlowControl = (READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_RFE) > 0U) ? ENABLE : DISABLE; 80020ec: 687b ldr r3, [r7, #4] 80020ee: 681b ldr r3, [r3, #0] 80020f0: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90 80020f4: f003 0301 and.w r3, r3, #1 80020f8: 2b00 cmp r3, #0 80020fa: bf14 ite ne 80020fc: 2301 movne r3, #1 80020fe: 2300 moveq r3, #0 8002100: b2db uxtb r3, r3 8002102: 461a mov r2, r3 8002104: 683b ldr r3, [r7, #0] 8002106: f883 2056 strb.w r2, [r3, #86] ; 0x56 macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_UP) >> 1) > 0U) 800210a: 687b ldr r3, [r7, #4] 800210c: 681b ldr r3, [r3, #0] 800210e: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90 8002112: f003 0302 and.w r3, r3, #2 ? ENABLE : DISABLE; 8002116: 2b00 cmp r3, #0 8002118: bf14 ite ne 800211a: 2301 movne r3, #1 800211c: 2300 moveq r3, #0 800211e: b2db uxtb r3, r3 8002120: 461a mov r2, r3 macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_UP) >> 1) > 0U) 8002122: 683b ldr r3, [r7, #0] 8002124: f883 2055 strb.w r2, [r3, #85] ; 0x55 macconf->TransmitQueueMode = READ_BIT(heth->Instance->MTLTQOMR, (ETH_MTLTQOMR_TTC | ETH_MTLTQOMR_TSF)); 8002128: 687b ldr r3, [r7, #4] 800212a: 681b ldr r3, [r3, #0] 800212c: f8d3 3d00 ldr.w r3, [r3, #3328] ; 0xd00 8002130: f003 0272 and.w r2, r3, #114 ; 0x72 8002134: 683b ldr r3, [r7, #0] 8002136: 659a str r2, [r3, #88] ; 0x58 macconf->ReceiveQueueMode = READ_BIT(heth->Instance->MTLRQOMR, (ETH_MTLRQOMR_RTC | ETH_MTLRQOMR_RSF)); 8002138: 687b ldr r3, [r7, #4] 800213a: 681b ldr r3, [r3, #0] 800213c: f8d3 3d30 ldr.w r3, [r3, #3376] ; 0xd30 8002140: f003 0223 and.w r2, r3, #35 ; 0x23 8002144: 683b ldr r3, [r7, #0] 8002146: 65da str r2, [r3, #92] ; 0x5c macconf->ForwardRxUndersizedGoodPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 8002148: 687b ldr r3, [r7, #4] 800214a: 681b ldr r3, [r3, #0] 800214c: f8d3 3d30 ldr.w r3, [r3, #3376] ; 0xd30 ETH_MTLRQOMR_FUP) >> 3) > 0U) ? ENABLE : DISABLE; 8002150: f003 0308 and.w r3, r3, #8 8002154: 2b00 cmp r3, #0 8002156: bf14 ite ne 8002158: 2301 movne r3, #1 800215a: 2300 moveq r3, #0 800215c: b2db uxtb r3, r3 800215e: 461a mov r2, r3 macconf->ForwardRxUndersizedGoodPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 8002160: 683b ldr r3, [r7, #0] 8002162: f883 2062 strb.w r2, [r3, #98] ; 0x62 macconf->ForwardRxErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR, ETH_MTLRQOMR_FEP) >> 4) > 0U) ? ENABLE : DISABLE; 8002166: 687b ldr r3, [r7, #4] 8002168: 681b ldr r3, [r3, #0] 800216a: f8d3 3d30 ldr.w r3, [r3, #3376] ; 0xd30 800216e: f003 0310 and.w r3, r3, #16 8002172: 2b00 cmp r3, #0 8002174: bf14 ite ne 8002176: 2301 movne r3, #1 8002178: 2300 moveq r3, #0 800217a: b2db uxtb r3, r3 800217c: 461a mov r2, r3 800217e: 683b ldr r3, [r7, #0] 8002180: f883 2061 strb.w r2, [r3, #97] ; 0x61 macconf->DropTCPIPChecksumErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 8002184: 687b ldr r3, [r7, #4] 8002186: 681b ldr r3, [r3, #0] 8002188: f8d3 3d30 ldr.w r3, [r3, #3376] ; 0xd30 ETH_MTLRQOMR_DISTCPEF) >> 6) == 0U) ? ENABLE : DISABLE; 800218c: f003 0340 and.w r3, r3, #64 ; 0x40 8002190: 2b00 cmp r3, #0 8002192: bf0c ite eq 8002194: 2301 moveq r3, #1 8002196: 2300 movne r3, #0 8002198: b2db uxtb r3, r3 800219a: 461a mov r2, r3 macconf->DropTCPIPChecksumErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 800219c: 683b ldr r3, [r7, #0] 800219e: f883 2060 strb.w r2, [r3, #96] ; 0x60 return HAL_OK; 80021a2: 2300 movs r3, #0 } 80021a4: 4618 mov r0, r3 80021a6: 370c adds r7, #12 80021a8: 46bd mov sp, r7 80021aa: f85d 7b04 ldr.w r7, [sp], #4 80021ae: 4770 bx lr 080021b0 : * @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) { 80021b0: b580 push {r7, lr} 80021b2: b082 sub sp, #8 80021b4: af00 add r7, sp, #0 80021b6: 6078 str r0, [r7, #4] 80021b8: 6039 str r1, [r7, #0] if (macconf == NULL) 80021ba: 683b ldr r3, [r7, #0] 80021bc: 2b00 cmp r3, #0 80021be: d101 bne.n 80021c4 { return HAL_ERROR; 80021c0: 2301 movs r3, #1 80021c2: e00b b.n 80021dc } if (heth->gState == HAL_ETH_STATE_READY) 80021c4: 687b ldr r3, [r7, #4] 80021c6: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84 80021ca: 2b10 cmp r3, #16 80021cc: d105 bne.n 80021da { ETH_SetMACConfig(heth, macconf); 80021ce: 6839 ldr r1, [r7, #0] 80021d0: 6878 ldr r0, [r7, #4] 80021d2: f000 f85f bl 8002294 return HAL_OK; 80021d6: 2300 movs r3, #0 80021d8: e000 b.n 80021dc } else { return HAL_ERROR; 80021da: 2301 movs r3, #1 } } 80021dc: 4618 mov r0, r3 80021de: 3708 adds r7, #8 80021e0: 46bd mov sp, r7 80021e2: bd80 pop {r7, pc} 080021e4 : * @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) { 80021e4: b580 push {r7, lr} 80021e6: b084 sub sp, #16 80021e8: af00 add r7, sp, #0 80021ea: 6078 str r0, [r7, #4] uint32_t hclk; uint32_t tmpreg; /* Get the ETHERNET MACMDIOAR value */ tmpreg = (heth->Instance)->MACMDIOAR; 80021ec: 687b ldr r3, [r7, #4] 80021ee: 681b ldr r3, [r3, #0] 80021f0: f8d3 3200 ldr.w r3, [r3, #512] ; 0x200 80021f4: 60fb str r3, [r7, #12] /* Clear CSR Clock Range bits */ tmpreg &= ~ETH_MACMDIOAR_CR; 80021f6: 68fb ldr r3, [r7, #12] 80021f8: f423 6370 bic.w r3, r3, #3840 ; 0xf00 80021fc: 60fb str r3, [r7, #12] /* Get hclk frequency value */ hclk = HAL_RCC_GetHCLKFreq(); 80021fe: f001 fea9 bl 8003f54 8002202: 60b8 str r0, [r7, #8] /* Set CR bits depending on hclk value */ if ((hclk >= 20000000U) && (hclk < 35000000U)) 8002204: 68bb ldr r3, [r7, #8] 8002206: 4a1e ldr r2, [pc, #120] ; (8002280 ) 8002208: 4293 cmp r3, r2 800220a: d908 bls.n 800221e 800220c: 68bb ldr r3, [r7, #8] 800220e: 4a1d ldr r2, [pc, #116] ; (8002284 ) 8002210: 4293 cmp r3, r2 8002212: d804 bhi.n 800221e { /* CSR Clock Range between 20-35 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV16; 8002214: 68fb ldr r3, [r7, #12] 8002216: f443 7300 orr.w r3, r3, #512 ; 0x200 800221a: 60fb str r3, [r7, #12] 800221c: e027 b.n 800226e } else if ((hclk >= 35000000U) && (hclk < 60000000U)) 800221e: 68bb ldr r3, [r7, #8] 8002220: 4a18 ldr r2, [pc, #96] ; (8002284 ) 8002222: 4293 cmp r3, r2 8002224: d908 bls.n 8002238 8002226: 68bb ldr r3, [r7, #8] 8002228: 4a17 ldr r2, [pc, #92] ; (8002288 ) 800222a: 4293 cmp r3, r2 800222c: d204 bcs.n 8002238 { /* CSR Clock Range between 35-60 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV26; 800222e: 68fb ldr r3, [r7, #12] 8002230: f443 7340 orr.w r3, r3, #768 ; 0x300 8002234: 60fb str r3, [r7, #12] 8002236: e01a b.n 800226e } else if ((hclk >= 60000000U) && (hclk < 100000000U)) 8002238: 68bb ldr r3, [r7, #8] 800223a: 4a13 ldr r2, [pc, #76] ; (8002288 ) 800223c: 4293 cmp r3, r2 800223e: d303 bcc.n 8002248 8002240: 68bb ldr r3, [r7, #8] 8002242: 4a12 ldr r2, [pc, #72] ; (800228c ) 8002244: 4293 cmp r3, r2 8002246: d911 bls.n 800226c { /* CSR Clock Range between 60-100 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV42; } else if ((hclk >= 100000000U) && (hclk < 150000000U)) 8002248: 68bb ldr r3, [r7, #8] 800224a: 4a10 ldr r2, [pc, #64] ; (800228c ) 800224c: 4293 cmp r3, r2 800224e: d908 bls.n 8002262 8002250: 68bb ldr r3, [r7, #8] 8002252: 4a0f ldr r2, [pc, #60] ; (8002290 ) 8002254: 4293 cmp r3, r2 8002256: d804 bhi.n 8002262 { /* CSR Clock Range between 100-150 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV62; 8002258: 68fb ldr r3, [r7, #12] 800225a: f443 7380 orr.w r3, r3, #256 ; 0x100 800225e: 60fb str r3, [r7, #12] 8002260: e005 b.n 800226e } else /* (hclk >= 150000000)&&(hclk <= 200000000) */ { /* CSR Clock Range between 150-200 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV102; 8002262: 68fb ldr r3, [r7, #12] 8002264: f443 6380 orr.w r3, r3, #1024 ; 0x400 8002268: 60fb str r3, [r7, #12] 800226a: e000 b.n 800226e tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV42; 800226c: bf00 nop } /* Configure the CSR Clock Range */ (heth->Instance)->MACMDIOAR = (uint32_t)tmpreg; 800226e: 687b ldr r3, [r7, #4] 8002270: 681b ldr r3, [r3, #0] 8002272: 68fa ldr r2, [r7, #12] 8002274: f8c3 2200 str.w r2, [r3, #512] ; 0x200 } 8002278: bf00 nop 800227a: 3710 adds r7, #16 800227c: 46bd mov sp, r7 800227e: bd80 pop {r7, pc} 8002280: 01312cff .word 0x01312cff 8002284: 02160ebf .word 0x02160ebf 8002288: 03938700 .word 0x03938700 800228c: 05f5e0ff .word 0x05f5e0ff 8002290: 08f0d17f .word 0x08f0d17f 08002294 : * @{ */ static void ETH_SetMACConfig(ETH_HandleTypeDef *heth, ETH_MACConfigTypeDef *macconf) { 8002294: b480 push {r7} 8002296: b085 sub sp, #20 8002298: af00 add r7, sp, #0 800229a: 6078 str r0, [r7, #4] 800229c: 6039 str r1, [r7, #0] uint32_t macregval; /*------------------------ MACCR Configuration --------------------*/ macregval = (macconf->InterPacketGapVal | 800229e: 683b ldr r3, [r7, #0] 80022a0: 689a ldr r2, [r3, #8] macconf->SourceAddrControl | 80022a2: 683b ldr r3, [r7, #0] 80022a4: 681b ldr r3, [r3, #0] macregval = (macconf->InterPacketGapVal | 80022a6: 431a orrs r2, r3 ((uint32_t)macconf->ChecksumOffload << 27) | 80022a8: 683b ldr r3, [r7, #0] 80022aa: 791b ldrb r3, [r3, #4] 80022ac: 06db lsls r3, r3, #27 macconf->SourceAddrControl | 80022ae: 431a orrs r2, r3 ((uint32_t)macconf->GiantPacketSizeLimitControl << 23) | 80022b0: 683b ldr r3, [r7, #0] 80022b2: 7b1b ldrb r3, [r3, #12] 80022b4: 05db lsls r3, r3, #23 ((uint32_t)macconf->ChecksumOffload << 27) | 80022b6: 431a orrs r2, r3 ((uint32_t)macconf->Support2KPacket << 22) | 80022b8: 683b ldr r3, [r7, #0] 80022ba: 7b5b ldrb r3, [r3, #13] 80022bc: 059b lsls r3, r3, #22 ((uint32_t)macconf->GiantPacketSizeLimitControl << 23) | 80022be: 431a orrs r2, r3 ((uint32_t)macconf->CRCStripTypePacket << 21) | 80022c0: 683b ldr r3, [r7, #0] 80022c2: 7b9b ldrb r3, [r3, #14] 80022c4: 055b lsls r3, r3, #21 ((uint32_t)macconf->Support2KPacket << 22) | 80022c6: 431a orrs r2, r3 ((uint32_t)macconf->AutomaticPadCRCStrip << 20) | 80022c8: 683b ldr r3, [r7, #0] 80022ca: 7bdb ldrb r3, [r3, #15] 80022cc: 051b lsls r3, r3, #20 ((uint32_t)macconf->CRCStripTypePacket << 21) | 80022ce: 4313 orrs r3, r2 ((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 19) | 80022d0: 683a ldr r2, [r7, #0] 80022d2: 7c12 ldrb r2, [r2, #16] 80022d4: 2a00 cmp r2, #0 80022d6: d102 bne.n 80022de 80022d8: f44f 2200 mov.w r2, #524288 ; 0x80000 80022dc: e000 b.n 80022e0 80022de: 2200 movs r2, #0 ((uint32_t)macconf->AutomaticPadCRCStrip << 20) | 80022e0: 4313 orrs r3, r2 ((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 17) | 80022e2: 683a ldr r2, [r7, #0] 80022e4: 7c52 ldrb r2, [r2, #17] 80022e6: 2a00 cmp r2, #0 80022e8: d102 bne.n 80022f0 80022ea: f44f 3200 mov.w r2, #131072 ; 0x20000 80022ee: e000 b.n 80022f2 80022f0: 2200 movs r2, #0 ((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 19) | 80022f2: 431a orrs r2, r3 ((uint32_t)macconf->JumboPacket << 16) | 80022f4: 683b ldr r3, [r7, #0] 80022f6: 7c9b ldrb r3, [r3, #18] 80022f8: 041b lsls r3, r3, #16 ((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 17) | 80022fa: 431a orrs r2, r3 macconf->Speed | 80022fc: 683b ldr r3, [r7, #0] 80022fe: 695b ldr r3, [r3, #20] ((uint32_t)macconf->JumboPacket << 16) | 8002300: 431a orrs r2, r3 macconf->DuplexMode | 8002302: 683b ldr r3, [r7, #0] 8002304: 699b ldr r3, [r3, #24] macconf->Speed | 8002306: 431a orrs r2, r3 ((uint32_t)macconf->LoopbackMode << 12) | 8002308: 683b ldr r3, [r7, #0] 800230a: 7f1b ldrb r3, [r3, #28] 800230c: 031b lsls r3, r3, #12 macconf->DuplexMode | 800230e: 431a orrs r2, r3 ((uint32_t)macconf->CarrierSenseBeforeTransmit << 11) | 8002310: 683b ldr r3, [r7, #0] 8002312: 7f5b ldrb r3, [r3, #29] 8002314: 02db lsls r3, r3, #11 ((uint32_t)macconf->LoopbackMode << 12) | 8002316: 4313 orrs r3, r2 ((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 10) | 8002318: 683a ldr r2, [r7, #0] 800231a: 7f92 ldrb r2, [r2, #30] 800231c: 2a00 cmp r2, #0 800231e: d102 bne.n 8002326 8002320: f44f 6280 mov.w r2, #1024 ; 0x400 8002324: e000 b.n 8002328 8002326: 2200 movs r2, #0 ((uint32_t)macconf->CarrierSenseBeforeTransmit << 11) | 8002328: 431a orrs r2, r3 ((uint32_t)macconf->CarrierSenseDuringTransmit << 9) | 800232a: 683b ldr r3, [r7, #0] 800232c: 7fdb ldrb r3, [r3, #31] 800232e: 025b lsls r3, r3, #9 ((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 10) | 8002330: 4313 orrs r3, r2 ((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 8) | 8002332: 683a ldr r2, [r7, #0] 8002334: f892 2020 ldrb.w r2, [r2, #32] 8002338: 2a00 cmp r2, #0 800233a: d102 bne.n 8002342 800233c: f44f 7280 mov.w r2, #256 ; 0x100 8002340: e000 b.n 8002344 8002342: 2200 movs r2, #0 ((uint32_t)macconf->CarrierSenseDuringTransmit << 9) | 8002344: 431a orrs r2, r3 macconf->BackOffLimit | 8002346: 683b ldr r3, [r7, #0] 8002348: 6a5b ldr r3, [r3, #36] ; 0x24 ((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 8) | 800234a: 431a orrs r2, r3 ((uint32_t)macconf->DeferralCheck << 4) | 800234c: 683b ldr r3, [r7, #0] 800234e: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 8002352: 011b lsls r3, r3, #4 macconf->BackOffLimit | 8002354: 431a orrs r2, r3 macconf->PreambleLength); 8002356: 683b ldr r3, [r7, #0] 8002358: 6adb ldr r3, [r3, #44] ; 0x2c macregval = (macconf->InterPacketGapVal | 800235a: 4313 orrs r3, r2 800235c: 60fb str r3, [r7, #12] /* Write to MACCR */ MODIFY_REG(heth->Instance->MACCR, ETH_MACCR_MASK, macregval); 800235e: 687b ldr r3, [r7, #4] 8002360: 681b ldr r3, [r3, #0] 8002362: 681a ldr r2, [r3, #0] 8002364: 4b56 ldr r3, [pc, #344] ; (80024c0 ) 8002366: 4013 ands r3, r2 8002368: 687a ldr r2, [r7, #4] 800236a: 6812 ldr r2, [r2, #0] 800236c: 68f9 ldr r1, [r7, #12] 800236e: 430b orrs r3, r1 8002370: 6013 str r3, [r2, #0] /*------------------------ MACECR Configuration --------------------*/ macregval = ((macconf->ExtendedInterPacketGapVal << 25) | 8002372: 683b ldr r3, [r7, #0] 8002374: 6bdb ldr r3, [r3, #60] ; 0x3c 8002376: 065a lsls r2, r3, #25 ((uint32_t)macconf->ExtendedInterPacketGap << 24) | 8002378: 683b ldr r3, [r7, #0] 800237a: f893 3038 ldrb.w r3, [r3, #56] ; 0x38 800237e: 061b lsls r3, r3, #24 macregval = ((macconf->ExtendedInterPacketGapVal << 25) | 8002380: 431a orrs r2, r3 ((uint32_t)macconf->UnicastSlowProtocolPacketDetect << 18) | 8002382: 683b ldr r3, [r7, #0] 8002384: f893 3030 ldrb.w r3, [r3, #48] ; 0x30 8002388: 049b lsls r3, r3, #18 ((uint32_t)macconf->ExtendedInterPacketGap << 24) | 800238a: 431a orrs r2, r3 ((uint32_t)macconf->SlowProtocolDetect << 17) | 800238c: 683b ldr r3, [r7, #0] 800238e: f893 3031 ldrb.w r3, [r3, #49] ; 0x31 8002392: 045b lsls r3, r3, #17 ((uint32_t)macconf->UnicastSlowProtocolPacketDetect << 18) | 8002394: 4313 orrs r3, r2 ((uint32_t)((macconf->CRCCheckingRxPackets == DISABLE) ? 1U : 0U) << 16) | 8002396: 683a ldr r2, [r7, #0] 8002398: f892 2032 ldrb.w r2, [r2, #50] ; 0x32 800239c: 2a00 cmp r2, #0 800239e: d102 bne.n 80023a6 80023a0: f44f 3280 mov.w r2, #65536 ; 0x10000 80023a4: e000 b.n 80023a8 80023a6: 2200 movs r2, #0 ((uint32_t)macconf->SlowProtocolDetect << 17) | 80023a8: 431a orrs r2, r3 macconf->GiantPacketSizeLimit); 80023aa: 683b ldr r3, [r7, #0] 80023ac: 6b5b ldr r3, [r3, #52] ; 0x34 macregval = ((macconf->ExtendedInterPacketGapVal << 25) | 80023ae: 4313 orrs r3, r2 80023b0: 60fb str r3, [r7, #12] /* Write to MACECR */ MODIFY_REG(heth->Instance->MACECR, ETH_MACECR_MASK, macregval); 80023b2: 687b ldr r3, [r7, #4] 80023b4: 681b ldr r3, [r3, #0] 80023b6: 685a ldr r2, [r3, #4] 80023b8: 4b42 ldr r3, [pc, #264] ; (80024c4 ) 80023ba: 4013 ands r3, r2 80023bc: 687a ldr r2, [r7, #4] 80023be: 6812 ldr r2, [r2, #0] 80023c0: 68f9 ldr r1, [r7, #12] 80023c2: 430b orrs r3, r1 80023c4: 6053 str r3, [r2, #4] /*------------------------ MACWTR Configuration --------------------*/ macregval = (((uint32_t)macconf->ProgrammableWatchdog << 8) | 80023c6: 683b ldr r3, [r7, #0] 80023c8: f893 3040 ldrb.w r3, [r3, #64] ; 0x40 80023cc: 021a lsls r2, r3, #8 macconf->WatchdogTimeout); 80023ce: 683b ldr r3, [r7, #0] 80023d0: 6c5b ldr r3, [r3, #68] ; 0x44 macregval = (((uint32_t)macconf->ProgrammableWatchdog << 8) | 80023d2: 4313 orrs r3, r2 80023d4: 60fb str r3, [r7, #12] /* Write to MACWTR */ MODIFY_REG(heth->Instance->MACWTR, ETH_MACWTR_MASK, macregval); 80023d6: 687b ldr r3, [r7, #4] 80023d8: 681b ldr r3, [r3, #0] 80023da: 68da ldr r2, [r3, #12] 80023dc: 4b3a ldr r3, [pc, #232] ; (80024c8 ) 80023de: 4013 ands r3, r2 80023e0: 687a ldr r2, [r7, #4] 80023e2: 6812 ldr r2, [r2, #0] 80023e4: 68f9 ldr r1, [r7, #12] 80023e6: 430b orrs r3, r1 80023e8: 60d3 str r3, [r2, #12] /*------------------------ MACTFCR Configuration --------------------*/ macregval = (((uint32_t)macconf->TransmitFlowControl << 1) | 80023ea: 683b ldr r3, [r7, #0] 80023ec: f893 3054 ldrb.w r3, [r3, #84] ; 0x54 80023f0: 005a lsls r2, r3, #1 macconf->PauseLowThreshold | 80023f2: 683b ldr r3, [r7, #0] 80023f4: 6d1b ldr r3, [r3, #80] ; 0x50 macregval = (((uint32_t)macconf->TransmitFlowControl << 1) | 80023f6: 4313 orrs r3, r2 ((uint32_t)((macconf->ZeroQuantaPause == DISABLE) ? 1U : 0U) << 7) | 80023f8: 683a ldr r2, [r7, #0] 80023fa: f892 204c ldrb.w r2, [r2, #76] ; 0x4c 80023fe: 2a00 cmp r2, #0 8002400: d101 bne.n 8002406 8002402: 2280 movs r2, #128 ; 0x80 8002404: e000 b.n 8002408 8002406: 2200 movs r2, #0 macconf->PauseLowThreshold | 8002408: 431a orrs r2, r3 (macconf->PauseTime << 16)); 800240a: 683b ldr r3, [r7, #0] 800240c: 6c9b ldr r3, [r3, #72] ; 0x48 800240e: 041b lsls r3, r3, #16 macregval = (((uint32_t)macconf->TransmitFlowControl << 1) | 8002410: 4313 orrs r3, r2 8002412: 60fb str r3, [r7, #12] /* Write to MACTFCR */ MODIFY_REG(heth->Instance->MACTFCR, ETH_MACTFCR_MASK, macregval); 8002414: 687b ldr r3, [r7, #4] 8002416: 681b ldr r3, [r3, #0] 8002418: 6f1a ldr r2, [r3, #112] ; 0x70 800241a: f64f 730d movw r3, #65293 ; 0xff0d 800241e: 4013 ands r3, r2 8002420: 687a ldr r2, [r7, #4] 8002422: 6812 ldr r2, [r2, #0] 8002424: 68f9 ldr r1, [r7, #12] 8002426: 430b orrs r3, r1 8002428: 6713 str r3, [r2, #112] ; 0x70 /*------------------------ MACRFCR Configuration --------------------*/ macregval = ((uint32_t)macconf->ReceiveFlowControl | 800242a: 683b ldr r3, [r7, #0] 800242c: f893 3056 ldrb.w r3, [r3, #86] ; 0x56 8002430: 461a mov r2, r3 ((uint32_t)macconf->UnicastPausePacketDetect << 1)); 8002432: 683b ldr r3, [r7, #0] 8002434: f893 3055 ldrb.w r3, [r3, #85] ; 0x55 8002438: 005b lsls r3, r3, #1 macregval = ((uint32_t)macconf->ReceiveFlowControl | 800243a: 4313 orrs r3, r2 800243c: 60fb str r3, [r7, #12] /* Write to MACRFCR */ MODIFY_REG(heth->Instance->MACRFCR, ETH_MACRFCR_MASK, macregval); 800243e: 687b ldr r3, [r7, #4] 8002440: 681b ldr r3, [r3, #0] 8002442: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90 8002446: f023 0103 bic.w r1, r3, #3 800244a: 687b ldr r3, [r7, #4] 800244c: 681b ldr r3, [r3, #0] 800244e: 68fa ldr r2, [r7, #12] 8002450: 430a orrs r2, r1 8002452: f8c3 2090 str.w r2, [r3, #144] ; 0x90 /*------------------------ MTLTQOMR Configuration --------------------*/ /* Write to MTLTQOMR */ MODIFY_REG(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_MASK, macconf->TransmitQueueMode); 8002456: 687b ldr r3, [r7, #4] 8002458: 681b ldr r3, [r3, #0] 800245a: f8d3 3d00 ldr.w r3, [r3, #3328] ; 0xd00 800245e: f023 0172 bic.w r1, r3, #114 ; 0x72 8002462: 683b ldr r3, [r7, #0] 8002464: 6d9a ldr r2, [r3, #88] ; 0x58 8002466: 687b ldr r3, [r7, #4] 8002468: 681b ldr r3, [r3, #0] 800246a: 430a orrs r2, r1 800246c: f8c3 2d00 str.w r2, [r3, #3328] ; 0xd00 /*------------------------ MTLRQOMR Configuration --------------------*/ macregval = (macconf->ReceiveQueueMode | 8002470: 683b ldr r3, [r7, #0] 8002472: 6ddb ldr r3, [r3, #92] ; 0x5c ((uint32_t)((macconf->DropTCPIPChecksumErrorPacket == DISABLE) ? 1U : 0U) << 6) | 8002474: 683a ldr r2, [r7, #0] 8002476: f892 2060 ldrb.w r2, [r2, #96] ; 0x60 800247a: 2a00 cmp r2, #0 800247c: d101 bne.n 8002482 800247e: 2240 movs r2, #64 ; 0x40 8002480: e000 b.n 8002484 8002482: 2200 movs r2, #0 macregval = (macconf->ReceiveQueueMode | 8002484: 431a orrs r2, r3 ((uint32_t)macconf->ForwardRxErrorPacket << 4) | 8002486: 683b ldr r3, [r7, #0] 8002488: f893 3061 ldrb.w r3, [r3, #97] ; 0x61 800248c: 011b lsls r3, r3, #4 ((uint32_t)((macconf->DropTCPIPChecksumErrorPacket == DISABLE) ? 1U : 0U) << 6) | 800248e: 431a orrs r2, r3 ((uint32_t)macconf->ForwardRxUndersizedGoodPacket << 3)); 8002490: 683b ldr r3, [r7, #0] 8002492: f893 3062 ldrb.w r3, [r3, #98] ; 0x62 8002496: 00db lsls r3, r3, #3 macregval = (macconf->ReceiveQueueMode | 8002498: 4313 orrs r3, r2 800249a: 60fb str r3, [r7, #12] /* Write to MTLRQOMR */ MODIFY_REG(heth->Instance->MTLRQOMR, ETH_MTLRQOMR_MASK, macregval); 800249c: 687b ldr r3, [r7, #4] 800249e: 681b ldr r3, [r3, #0] 80024a0: f8d3 3d30 ldr.w r3, [r3, #3376] ; 0xd30 80024a4: f023 017b bic.w r1, r3, #123 ; 0x7b 80024a8: 687b ldr r3, [r7, #4] 80024aa: 681b ldr r3, [r3, #0] 80024ac: 68fa ldr r2, [r7, #12] 80024ae: 430a orrs r2, r1 80024b0: f8c3 2d30 str.w r2, [r3, #3376] ; 0xd30 } 80024b4: bf00 nop 80024b6: 3714 adds r7, #20 80024b8: 46bd mov sp, r7 80024ba: f85d 7b04 ldr.w r7, [sp], #4 80024be: 4770 bx lr 80024c0: 00048083 .word 0x00048083 80024c4: c0f88000 .word 0xc0f88000 80024c8: fffffef0 .word 0xfffffef0 080024cc : static void ETH_SetDMAConfig(ETH_HandleTypeDef *heth, ETH_DMAConfigTypeDef *dmaconf) { 80024cc: b480 push {r7} 80024ce: b085 sub sp, #20 80024d0: af00 add r7, sp, #0 80024d2: 6078 str r0, [r7, #4] 80024d4: 6039 str r1, [r7, #0] uint32_t dmaregval; /*------------------------ DMAMR Configuration --------------------*/ MODIFY_REG(heth->Instance->DMAMR, ETH_DMAMR_MASK, dmaconf->DMAArbitration); 80024d6: 687b ldr r3, [r7, #4] 80024d8: 681b ldr r3, [r3, #0] 80024da: f503 5380 add.w r3, r3, #4096 ; 0x1000 80024de: 681a ldr r2, [r3, #0] 80024e0: 4b38 ldr r3, [pc, #224] ; (80025c4 ) 80024e2: 4013 ands r3, r2 80024e4: 683a ldr r2, [r7, #0] 80024e6: 6811 ldr r1, [r2, #0] 80024e8: 687a ldr r2, [r7, #4] 80024ea: 6812 ldr r2, [r2, #0] 80024ec: 430b orrs r3, r1 80024ee: f502 5280 add.w r2, r2, #4096 ; 0x1000 80024f2: 6013 str r3, [r2, #0] /*------------------------ DMASBMR Configuration --------------------*/ dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) | 80024f4: 683b ldr r3, [r7, #0] 80024f6: 791b ldrb r3, [r3, #4] 80024f8: 031a lsls r2, r3, #12 dmaconf->BurstMode | 80024fa: 683b ldr r3, [r7, #0] 80024fc: 689b ldr r3, [r3, #8] dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) | 80024fe: 431a orrs r2, r3 ((uint32_t)dmaconf->RebuildINCRxBurst << 15)); 8002500: 683b ldr r3, [r7, #0] 8002502: 7b1b ldrb r3, [r3, #12] 8002504: 03db lsls r3, r3, #15 dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) | 8002506: 4313 orrs r3, r2 8002508: 60fb str r3, [r7, #12] MODIFY_REG(heth->Instance->DMASBMR, ETH_DMASBMR_MASK, dmaregval); 800250a: 687b ldr r3, [r7, #4] 800250c: 681b ldr r3, [r3, #0] 800250e: f503 5380 add.w r3, r3, #4096 ; 0x1000 8002512: 685a ldr r2, [r3, #4] 8002514: 4b2c ldr r3, [pc, #176] ; (80025c8 ) 8002516: 4013 ands r3, r2 8002518: 687a ldr r2, [r7, #4] 800251a: 6812 ldr r2, [r2, #0] 800251c: 68f9 ldr r1, [r7, #12] 800251e: 430b orrs r3, r1 8002520: f502 5280 add.w r2, r2, #4096 ; 0x1000 8002524: 6053 str r3, [r2, #4] /*------------------------ DMACCR Configuration --------------------*/ dmaregval = (((uint32_t)dmaconf->PBLx8Mode << 16) | 8002526: 683b ldr r3, [r7, #0] 8002528: 7b5b ldrb r3, [r3, #13] 800252a: 041a lsls r2, r3, #16 dmaconf->MaximumSegmentSize); 800252c: 683b ldr r3, [r7, #0] 800252e: 6a1b ldr r3, [r3, #32] dmaregval = (((uint32_t)dmaconf->PBLx8Mode << 16) | 8002530: 4313 orrs r3, r2 8002532: 60fb str r3, [r7, #12] MODIFY_REG(heth->Instance->DMACCR, ETH_DMACCR_MASK, dmaregval); 8002534: 687b ldr r3, [r7, #4] 8002536: 681b ldr r3, [r3, #0] 8002538: f503 5380 add.w r3, r3, #4096 ; 0x1000 800253c: f8d3 2100 ldr.w r2, [r3, #256] ; 0x100 8002540: 4b22 ldr r3, [pc, #136] ; (80025cc ) 8002542: 4013 ands r3, r2 8002544: 687a ldr r2, [r7, #4] 8002546: 6812 ldr r2, [r2, #0] 8002548: 68f9 ldr r1, [r7, #12] 800254a: 430b orrs r3, r1 800254c: f502 5280 add.w r2, r2, #4096 ; 0x1000 8002550: f8c2 3100 str.w r3, [r2, #256] ; 0x100 /*------------------------ DMACTCR Configuration --------------------*/ dmaregval = (dmaconf->TxDMABurstLength | 8002554: 683b ldr r3, [r7, #0] 8002556: 691a ldr r2, [r3, #16] ((uint32_t)dmaconf->SecondPacketOperate << 4) | 8002558: 683b ldr r3, [r7, #0] 800255a: 7d1b ldrb r3, [r3, #20] 800255c: 011b lsls r3, r3, #4 dmaregval = (dmaconf->TxDMABurstLength | 800255e: 431a orrs r2, r3 ((uint32_t)dmaconf->TCPSegmentation << 12)); 8002560: 683b ldr r3, [r7, #0] 8002562: 7f5b ldrb r3, [r3, #29] 8002564: 031b lsls r3, r3, #12 dmaregval = (dmaconf->TxDMABurstLength | 8002566: 4313 orrs r3, r2 8002568: 60fb str r3, [r7, #12] MODIFY_REG(heth->Instance->DMACTCR, ETH_DMACTCR_MASK, dmaregval); 800256a: 687b ldr r3, [r7, #4] 800256c: 681b ldr r3, [r3, #0] 800256e: f503 5380 add.w r3, r3, #4096 ; 0x1000 8002572: f8d3 2104 ldr.w r2, [r3, #260] ; 0x104 8002576: 4b16 ldr r3, [pc, #88] ; (80025d0 ) 8002578: 4013 ands r3, r2 800257a: 687a ldr r2, [r7, #4] 800257c: 6812 ldr r2, [r2, #0] 800257e: 68f9 ldr r1, [r7, #12] 8002580: 430b orrs r3, r1 8002582: f502 5280 add.w r2, r2, #4096 ; 0x1000 8002586: f8c2 3104 str.w r3, [r2, #260] ; 0x104 /*------------------------ DMACRCR Configuration --------------------*/ dmaregval = (((uint32_t)dmaconf->FlushRxPacket << 31) | 800258a: 683b ldr r3, [r7, #0] 800258c: 7f1b ldrb r3, [r3, #28] 800258e: 07da lsls r2, r3, #31 dmaconf->RxDMABurstLength); 8002590: 683b ldr r3, [r7, #0] 8002592: 699b ldr r3, [r3, #24] dmaregval = (((uint32_t)dmaconf->FlushRxPacket << 31) | 8002594: 4313 orrs r3, r2 8002596: 60fb str r3, [r7, #12] /* Write to DMACRCR */ MODIFY_REG(heth->Instance->DMACRCR, ETH_DMACRCR_MASK, dmaregval); 8002598: 687b ldr r3, [r7, #4] 800259a: 681b ldr r3, [r3, #0] 800259c: f503 5380 add.w r3, r3, #4096 ; 0x1000 80025a0: f8d3 2108 ldr.w r2, [r3, #264] ; 0x108 80025a4: 4b0b ldr r3, [pc, #44] ; (80025d4 ) 80025a6: 4013 ands r3, r2 80025a8: 687a ldr r2, [r7, #4] 80025aa: 6812 ldr r2, [r2, #0] 80025ac: 68f9 ldr r1, [r7, #12] 80025ae: 430b orrs r3, r1 80025b0: f502 5280 add.w r2, r2, #4096 ; 0x1000 80025b4: f8c2 3108 str.w r3, [r2, #264] ; 0x108 } 80025b8: bf00 nop 80025ba: 3714 adds r7, #20 80025bc: 46bd mov sp, r7 80025be: f85d 7b04 ldr.w r7, [sp], #4 80025c2: 4770 bx lr 80025c4: ffff87fd .word 0xffff87fd 80025c8: ffff2ffe .word 0xffff2ffe 80025cc: fffec000 .word 0xfffec000 80025d0: ffc0efef .word 0xffc0efef 80025d4: 7fc0ffff .word 0x7fc0ffff 080025d8 : * @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) { 80025d8: b580 push {r7, lr} 80025da: b0a4 sub sp, #144 ; 0x90 80025dc: af00 add r7, sp, #0 80025de: 6078 str r0, [r7, #4] ETH_MACConfigTypeDef macDefaultConf; ETH_DMAConfigTypeDef dmaDefaultConf; /*--------------- ETHERNET MAC registers default Configuration --------------*/ macDefaultConf.AutomaticPadCRCStrip = ENABLE; 80025e0: 2301 movs r3, #1 80025e2: f887 303b strb.w r3, [r7, #59] ; 0x3b macDefaultConf.BackOffLimit = ETH_BACKOFFLIMIT_10; 80025e6: 2300 movs r3, #0 80025e8: 653b str r3, [r7, #80] ; 0x50 macDefaultConf.CarrierSenseBeforeTransmit = DISABLE; 80025ea: 2300 movs r3, #0 80025ec: f887 3049 strb.w r3, [r7, #73] ; 0x49 macDefaultConf.CarrierSenseDuringTransmit = DISABLE; 80025f0: 2300 movs r3, #0 80025f2: f887 304b strb.w r3, [r7, #75] ; 0x4b macDefaultConf.ChecksumOffload = ENABLE; 80025f6: 2301 movs r3, #1 80025f8: f887 3030 strb.w r3, [r7, #48] ; 0x30 macDefaultConf.CRCCheckingRxPackets = ENABLE; 80025fc: 2301 movs r3, #1 80025fe: f887 305e strb.w r3, [r7, #94] ; 0x5e macDefaultConf.CRCStripTypePacket = ENABLE; 8002602: 2301 movs r3, #1 8002604: f887 303a strb.w r3, [r7, #58] ; 0x3a macDefaultConf.DeferralCheck = DISABLE; 8002608: 2300 movs r3, #0 800260a: f887 3054 strb.w r3, [r7, #84] ; 0x54 macDefaultConf.DropTCPIPChecksumErrorPacket = ENABLE; 800260e: 2301 movs r3, #1 8002610: f887 308c strb.w r3, [r7, #140] ; 0x8c macDefaultConf.DuplexMode = ETH_FULLDUPLEX_MODE; 8002614: f44f 5300 mov.w r3, #8192 ; 0x2000 8002618: 647b str r3, [r7, #68] ; 0x44 macDefaultConf.ExtendedInterPacketGap = DISABLE; 800261a: 2300 movs r3, #0 800261c: f887 3064 strb.w r3, [r7, #100] ; 0x64 macDefaultConf.ExtendedInterPacketGapVal = 0x0; 8002620: 2300 movs r3, #0 8002622: 66bb str r3, [r7, #104] ; 0x68 macDefaultConf.ForwardRxErrorPacket = DISABLE; 8002624: 2300 movs r3, #0 8002626: f887 308d strb.w r3, [r7, #141] ; 0x8d macDefaultConf.ForwardRxUndersizedGoodPacket = DISABLE; 800262a: 2300 movs r3, #0 800262c: f887 308e strb.w r3, [r7, #142] ; 0x8e macDefaultConf.GiantPacketSizeLimit = 0x618; 8002630: f44f 63c3 mov.w r3, #1560 ; 0x618 8002634: 663b str r3, [r7, #96] ; 0x60 macDefaultConf.GiantPacketSizeLimitControl = DISABLE; 8002636: 2300 movs r3, #0 8002638: f887 3038 strb.w r3, [r7, #56] ; 0x38 macDefaultConf.InterPacketGapVal = ETH_INTERPACKETGAP_96BIT; 800263c: 2300 movs r3, #0 800263e: 637b str r3, [r7, #52] ; 0x34 macDefaultConf.Jabber = ENABLE; 8002640: 2301 movs r3, #1 8002642: f887 303d strb.w r3, [r7, #61] ; 0x3d macDefaultConf.JumboPacket = DISABLE; 8002646: 2300 movs r3, #0 8002648: f887 303e strb.w r3, [r7, #62] ; 0x3e macDefaultConf.LoopbackMode = DISABLE; 800264c: 2300 movs r3, #0 800264e: f887 3048 strb.w r3, [r7, #72] ; 0x48 macDefaultConf.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS_4; 8002652: 2300 movs r3, #0 8002654: 67fb str r3, [r7, #124] ; 0x7c macDefaultConf.PauseTime = 0x0; 8002656: 2300 movs r3, #0 8002658: 677b str r3, [r7, #116] ; 0x74 macDefaultConf.PreambleLength = ETH_PREAMBLELENGTH_7; 800265a: 2300 movs r3, #0 800265c: 65bb str r3, [r7, #88] ; 0x58 macDefaultConf.ProgrammableWatchdog = DISABLE; 800265e: 2300 movs r3, #0 8002660: f887 306c strb.w r3, [r7, #108] ; 0x6c macDefaultConf.ReceiveFlowControl = DISABLE; 8002664: 2300 movs r3, #0 8002666: f887 3082 strb.w r3, [r7, #130] ; 0x82 macDefaultConf.ReceiveOwn = ENABLE; 800266a: 2301 movs r3, #1 800266c: f887 304a strb.w r3, [r7, #74] ; 0x4a macDefaultConf.ReceiveQueueMode = ETH_RECEIVESTOREFORWARD; 8002670: 2320 movs r3, #32 8002672: f8c7 3088 str.w r3, [r7, #136] ; 0x88 macDefaultConf.RetryTransmission = ENABLE; 8002676: 2301 movs r3, #1 8002678: f887 304c strb.w r3, [r7, #76] ; 0x4c macDefaultConf.SlowProtocolDetect = DISABLE; 800267c: 2300 movs r3, #0 800267e: f887 305d strb.w r3, [r7, #93] ; 0x5d macDefaultConf.SourceAddrControl = ETH_SOURCEADDRESS_REPLACE_ADDR0; 8002682: f04f 5340 mov.w r3, #805306368 ; 0x30000000 8002686: 62fb str r3, [r7, #44] ; 0x2c macDefaultConf.Speed = ETH_SPEED_100M; 8002688: f44f 4380 mov.w r3, #16384 ; 0x4000 800268c: 643b str r3, [r7, #64] ; 0x40 macDefaultConf.Support2KPacket = DISABLE; 800268e: 2300 movs r3, #0 8002690: f887 3039 strb.w r3, [r7, #57] ; 0x39 macDefaultConf.TransmitQueueMode = ETH_TRANSMITSTOREFORWARD; 8002694: 2302 movs r3, #2 8002696: f8c7 3084 str.w r3, [r7, #132] ; 0x84 macDefaultConf.TransmitFlowControl = DISABLE; 800269a: 2300 movs r3, #0 800269c: f887 3080 strb.w r3, [r7, #128] ; 0x80 macDefaultConf.UnicastPausePacketDetect = DISABLE; 80026a0: 2300 movs r3, #0 80026a2: f887 3081 strb.w r3, [r7, #129] ; 0x81 macDefaultConf.UnicastSlowProtocolPacketDetect = DISABLE; 80026a6: 2300 movs r3, #0 80026a8: f887 305c strb.w r3, [r7, #92] ; 0x5c macDefaultConf.Watchdog = ENABLE; 80026ac: 2301 movs r3, #1 80026ae: f887 303c strb.w r3, [r7, #60] ; 0x3c macDefaultConf.WatchdogTimeout = ETH_MACWTR_WTO_2KB; 80026b2: 2300 movs r3, #0 80026b4: 673b str r3, [r7, #112] ; 0x70 macDefaultConf.ZeroQuantaPause = ENABLE; 80026b6: 2301 movs r3, #1 80026b8: f887 3078 strb.w r3, [r7, #120] ; 0x78 /* MAC default configuration */ ETH_SetMACConfig(heth, &macDefaultConf); 80026bc: f107 032c add.w r3, r7, #44 ; 0x2c 80026c0: 4619 mov r1, r3 80026c2: 6878 ldr r0, [r7, #4] 80026c4: f7ff fde6 bl 8002294 /*--------------- ETHERNET DMA registers default Configuration --------------*/ dmaDefaultConf.AddressAlignedBeats = ENABLE; 80026c8: 2301 movs r3, #1 80026ca: 733b strb r3, [r7, #12] dmaDefaultConf.BurstMode = ETH_BURSTLENGTH_FIXED; 80026cc: 2301 movs r3, #1 80026ce: 613b str r3, [r7, #16] dmaDefaultConf.DMAArbitration = ETH_DMAARBITRATION_RX1_TX1; 80026d0: 2300 movs r3, #0 80026d2: 60bb str r3, [r7, #8] dmaDefaultConf.FlushRxPacket = DISABLE; 80026d4: 2300 movs r3, #0 80026d6: f887 3024 strb.w r3, [r7, #36] ; 0x24 dmaDefaultConf.PBLx8Mode = DISABLE; 80026da: 2300 movs r3, #0 80026dc: 757b strb r3, [r7, #21] dmaDefaultConf.RebuildINCRxBurst = DISABLE; 80026de: 2300 movs r3, #0 80026e0: 753b strb r3, [r7, #20] dmaDefaultConf.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT; 80026e2: f44f 1300 mov.w r3, #2097152 ; 0x200000 80026e6: 623b str r3, [r7, #32] dmaDefaultConf.SecondPacketOperate = DISABLE; 80026e8: 2300 movs r3, #0 80026ea: 773b strb r3, [r7, #28] dmaDefaultConf.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT; 80026ec: f44f 1300 mov.w r3, #2097152 ; 0x200000 80026f0: 61bb str r3, [r7, #24] dmaDefaultConf.TCPSegmentation = DISABLE; 80026f2: 2300 movs r3, #0 80026f4: f887 3025 strb.w r3, [r7, #37] ; 0x25 dmaDefaultConf.MaximumSegmentSize = ETH_SEGMENT_SIZE_DEFAULT; 80026f8: f44f 7306 mov.w r3, #536 ; 0x218 80026fc: 62bb str r3, [r7, #40] ; 0x28 /* DMA default configuration */ ETH_SetDMAConfig(heth, &dmaDefaultConf); 80026fe: f107 0308 add.w r3, r7, #8 8002702: 4619 mov r1, r3 8002704: 6878 ldr r0, [r7, #4] 8002706: f7ff fee1 bl 80024cc } 800270a: bf00 nop 800270c: 3790 adds r7, #144 ; 0x90 800270e: 46bd mov sp, r7 8002710: bd80 pop {r7, pc} 08002712 : * @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) { 8002712: b480 push {r7} 8002714: b085 sub sp, #20 8002716: af00 add r7, sp, #0 8002718: 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++) 800271a: 2300 movs r3, #0 800271c: 60fb str r3, [r7, #12] 800271e: e01d b.n 800275c { dmatxdesc = heth->Init.TxDesc + i; 8002720: 687b ldr r3, [r7, #4] 8002722: 68d9 ldr r1, [r3, #12] 8002724: 68fa ldr r2, [r7, #12] 8002726: 4613 mov r3, r2 8002728: 005b lsls r3, r3, #1 800272a: 4413 add r3, r2 800272c: 00db lsls r3, r3, #3 800272e: 440b add r3, r1 8002730: 60bb str r3, [r7, #8] WRITE_REG(dmatxdesc->DESC0, 0x0); 8002732: 68bb ldr r3, [r7, #8] 8002734: 2200 movs r2, #0 8002736: 601a str r2, [r3, #0] WRITE_REG(dmatxdesc->DESC1, 0x0); 8002738: 68bb ldr r3, [r7, #8] 800273a: 2200 movs r2, #0 800273c: 605a str r2, [r3, #4] WRITE_REG(dmatxdesc->DESC2, 0x0); 800273e: 68bb ldr r3, [r7, #8] 8002740: 2200 movs r2, #0 8002742: 609a str r2, [r3, #8] WRITE_REG(dmatxdesc->DESC3, 0x0); 8002744: 68bb ldr r3, [r7, #8] 8002746: 2200 movs r2, #0 8002748: 60da str r2, [r3, #12] WRITE_REG(heth->TxDescList.TxDesc[i], (uint32_t)dmatxdesc); 800274a: 68b9 ldr r1, [r7, #8] 800274c: 687b ldr r3, [r7, #4] 800274e: 68fa ldr r2, [r7, #12] 8002750: 3206 adds r2, #6 8002752: f843 1022 str.w r1, [r3, r2, lsl #2] for (i = 0; i < (uint32_t)ETH_TX_DESC_CNT; i++) 8002756: 68fb ldr r3, [r7, #12] 8002758: 3301 adds r3, #1 800275a: 60fb str r3, [r7, #12] 800275c: 68fb ldr r3, [r7, #12] 800275e: 2b03 cmp r3, #3 8002760: d9de bls.n 8002720 } heth->TxDescList.CurTxDesc = 0; 8002762: 687b ldr r3, [r7, #4] 8002764: 2200 movs r2, #0 8002766: 629a str r2, [r3, #40] ; 0x28 /* Set Transmit Descriptor Ring Length */ WRITE_REG(heth->Instance->DMACTDRLR, (ETH_TX_DESC_CNT - 1U)); 8002768: 687b ldr r3, [r7, #4] 800276a: 681b ldr r3, [r3, #0] 800276c: f503 5380 add.w r3, r3, #4096 ; 0x1000 8002770: 461a mov r2, r3 8002772: 2303 movs r3, #3 8002774: f8c2 312c str.w r3, [r2, #300] ; 0x12c /* Set Transmit Descriptor List Address */ WRITE_REG(heth->Instance->DMACTDLAR, (uint32_t) heth->Init.TxDesc); 8002778: 687b ldr r3, [r7, #4] 800277a: 68da ldr r2, [r3, #12] 800277c: 687b ldr r3, [r7, #4] 800277e: 681b ldr r3, [r3, #0] 8002780: f503 5380 add.w r3, r3, #4096 ; 0x1000 8002784: f8c3 2114 str.w r2, [r3, #276] ; 0x114 /* Set Transmit Descriptor Tail pointer */ WRITE_REG(heth->Instance->DMACTDTPR, (uint32_t) heth->Init.TxDesc); 8002788: 687b ldr r3, [r7, #4] 800278a: 68da ldr r2, [r3, #12] 800278c: 687b ldr r3, [r7, #4] 800278e: 681b ldr r3, [r3, #0] 8002790: f503 5380 add.w r3, r3, #4096 ; 0x1000 8002794: f8c3 2120 str.w r2, [r3, #288] ; 0x120 } 8002798: bf00 nop 800279a: 3714 adds r7, #20 800279c: 46bd mov sp, r7 800279e: f85d 7b04 ldr.w r7, [sp], #4 80027a2: 4770 bx lr 080027a4 : * @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) { 80027a4: b480 push {r7} 80027a6: b085 sub sp, #20 80027a8: af00 add r7, sp, #0 80027aa: 6078 str r0, [r7, #4] ETH_DMADescTypeDef *dmarxdesc; uint32_t i; for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++) 80027ac: 2300 movs r3, #0 80027ae: 60fb str r3, [r7, #12] 80027b0: e023 b.n 80027fa { dmarxdesc = heth->Init.RxDesc + i; 80027b2: 687b ldr r3, [r7, #4] 80027b4: 6919 ldr r1, [r3, #16] 80027b6: 68fa ldr r2, [r7, #12] 80027b8: 4613 mov r3, r2 80027ba: 005b lsls r3, r3, #1 80027bc: 4413 add r3, r2 80027be: 00db lsls r3, r3, #3 80027c0: 440b add r3, r1 80027c2: 60bb str r3, [r7, #8] WRITE_REG(dmarxdesc->DESC0, 0x0); 80027c4: 68bb ldr r3, [r7, #8] 80027c6: 2200 movs r2, #0 80027c8: 601a str r2, [r3, #0] WRITE_REG(dmarxdesc->DESC1, 0x0); 80027ca: 68bb ldr r3, [r7, #8] 80027cc: 2200 movs r2, #0 80027ce: 605a str r2, [r3, #4] WRITE_REG(dmarxdesc->DESC2, 0x0); 80027d0: 68bb ldr r3, [r7, #8] 80027d2: 2200 movs r2, #0 80027d4: 609a str r2, [r3, #8] WRITE_REG(dmarxdesc->DESC3, 0x0); 80027d6: 68bb ldr r3, [r7, #8] 80027d8: 2200 movs r2, #0 80027da: 60da str r2, [r3, #12] WRITE_REG(dmarxdesc->BackupAddr0, 0x0); 80027dc: 68bb ldr r3, [r7, #8] 80027de: 2200 movs r2, #0 80027e0: 611a str r2, [r3, #16] WRITE_REG(dmarxdesc->BackupAddr1, 0x0); 80027e2: 68bb ldr r3, [r7, #8] 80027e4: 2200 movs r2, #0 80027e6: 615a str r2, [r3, #20] /* Set Rx descritors addresses */ WRITE_REG(heth->RxDescList.RxDesc[i], (uint32_t)dmarxdesc); 80027e8: 68b9 ldr r1, [r7, #8] 80027ea: 687b ldr r3, [r7, #4] 80027ec: 68fa ldr r2, [r7, #12] 80027ee: 3212 adds r2, #18 80027f0: f843 1022 str.w r1, [r3, r2, lsl #2] for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++) 80027f4: 68fb ldr r3, [r7, #12] 80027f6: 3301 adds r3, #1 80027f8: 60fb str r3, [r7, #12] 80027fa: 68fb ldr r3, [r7, #12] 80027fc: 2b03 cmp r3, #3 80027fe: d9d8 bls.n 80027b2 } WRITE_REG(heth->RxDescList.RxDescIdx, 0); 8002800: 687b ldr r3, [r7, #4] 8002802: 2200 movs r2, #0 8002804: 65da str r2, [r3, #92] ; 0x5c WRITE_REG(heth->RxDescList.RxDescCnt, 0); 8002806: 687b ldr r3, [r7, #4] 8002808: 2200 movs r2, #0 800280a: 661a str r2, [r3, #96] ; 0x60 WRITE_REG(heth->RxDescList.RxBuildDescIdx, 0); 800280c: 687b ldr r3, [r7, #4] 800280e: 2200 movs r2, #0 8002810: 669a str r2, [r3, #104] ; 0x68 WRITE_REG(heth->RxDescList.RxBuildDescCnt, 0); 8002812: 687b ldr r3, [r7, #4] 8002814: 2200 movs r2, #0 8002816: 66da str r2, [r3, #108] ; 0x6c WRITE_REG(heth->RxDescList.ItMode, 0); 8002818: 687b ldr r3, [r7, #4] 800281a: 2200 movs r2, #0 800281c: 659a str r2, [r3, #88] ; 0x58 /* Set Receive Descriptor Ring Length */ WRITE_REG(heth->Instance->DMACRDRLR, ((uint32_t)(ETH_RX_DESC_CNT - 1U))); 800281e: 687b ldr r3, [r7, #4] 8002820: 681b ldr r3, [r3, #0] 8002822: f503 5380 add.w r3, r3, #4096 ; 0x1000 8002826: 461a mov r2, r3 8002828: 2303 movs r3, #3 800282a: f8c2 3130 str.w r3, [r2, #304] ; 0x130 /* Set Receive Descriptor List Address */ WRITE_REG(heth->Instance->DMACRDLAR, (uint32_t) heth->Init.RxDesc); 800282e: 687b ldr r3, [r7, #4] 8002830: 691a ldr r2, [r3, #16] 8002832: 687b ldr r3, [r7, #4] 8002834: 681b ldr r3, [r3, #0] 8002836: f503 5380 add.w r3, r3, #4096 ; 0x1000 800283a: f8c3 211c str.w r2, [r3, #284] ; 0x11c /* Set Receive Descriptor Tail pointer Address */ WRITE_REG(heth->Instance->DMACRDTPR, ((uint32_t)(heth->Init.RxDesc + (uint32_t)(ETH_RX_DESC_CNT - 1U)))); 800283e: 687b ldr r3, [r7, #4] 8002840: 691b ldr r3, [r3, #16] 8002842: f103 0248 add.w r2, r3, #72 ; 0x48 8002846: 687b ldr r3, [r7, #4] 8002848: 681b ldr r3, [r3, #0] 800284a: f503 5380 add.w r3, r3, #4096 ; 0x1000 800284e: f8c3 2128 str.w r2, [r3, #296] ; 0x128 } 8002852: bf00 nop 8002854: 3714 adds r7, #20 8002856: 46bd mov sp, r7 8002858: f85d 7b04 ldr.w r7, [sp], #4 800285c: 4770 bx lr ... 08002860 : * @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) { 8002860: b480 push {r7} 8002862: b08d sub sp, #52 ; 0x34 8002864: af00 add r7, sp, #0 8002866: 60f8 str r0, [r7, #12] 8002868: 60b9 str r1, [r7, #8] 800286a: 607a str r2, [r7, #4] ETH_TxDescListTypeDef *dmatxdesclist = &heth->TxDescList; 800286c: 68fb ldr r3, [r7, #12] 800286e: 3318 adds r3, #24 8002870: 617b str r3, [r7, #20] uint32_t descidx = dmatxdesclist->CurTxDesc; 8002872: 697b ldr r3, [r7, #20] 8002874: 691b ldr r3, [r3, #16] 8002876: 62fb str r3, [r7, #44] ; 0x2c uint32_t firstdescidx = dmatxdesclist->CurTxDesc; 8002878: 697b ldr r3, [r7, #20] 800287a: 691b ldr r3, [r3, #16] 800287c: 613b str r3, [r7, #16] uint32_t idx; uint32_t descnbr = 0; 800287e: 2300 movs r3, #0 8002880: 627b str r3, [r7, #36] ; 0x24 ETH_DMADescTypeDef *dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 8002882: 697b ldr r3, [r7, #20] 8002884: 6afa ldr r2, [r7, #44] ; 0x2c 8002886: f853 3022 ldr.w r3, [r3, r2, lsl #2] 800288a: 623b str r3, [r7, #32] ETH_BufferTypeDef *txbuffer = pTxConfig->TxBuffer; 800288c: 68bb ldr r3, [r7, #8] 800288e: 689b ldr r3, [r3, #8] 8002890: 61fb str r3, [r7, #28] uint32_t bd_count = 0; 8002892: 2300 movs r3, #0 8002894: 61bb str r3, [r7, #24] /* Current Tx Descriptor Owned by DMA: cannot be used by the application */ if ((READ_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCWBF_OWN) == ETH_DMATXNDESCWBF_OWN) 8002896: 6a3b ldr r3, [r7, #32] 8002898: 68db ldr r3, [r3, #12] 800289a: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000 800289e: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000 80028a2: d007 beq.n 80028b4 || (dmatxdesclist->PacketAddress[descidx] != NULL)) 80028a4: 697a ldr r2, [r7, #20] 80028a6: 6afb ldr r3, [r7, #44] ; 0x2c 80028a8: 3304 adds r3, #4 80028aa: 009b lsls r3, r3, #2 80028ac: 4413 add r3, r2 80028ae: 685b ldr r3, [r3, #4] 80028b0: 2b00 cmp r3, #0 80028b2: d001 beq.n 80028b8 { return HAL_ETH_ERROR_BUSY; 80028b4: 2302 movs r3, #2 80028b6: e259 b.n 8002d6c /***************************************************************************/ /***************** Context descriptor configuration (Optional) **********/ /***************************************************************************/ /* If VLAN tag is enabled for this packet */ if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET) 80028b8: 68bb ldr r3, [r7, #8] 80028ba: 681b ldr r3, [r3, #0] 80028bc: f003 0304 and.w r3, r3, #4 80028c0: 2b00 cmp r3, #0 80028c2: d044 beq.n 800294e { /* Set vlan tag value */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXCDESC_VT, pTxConfig->VlanTag); 80028c4: 6a3b ldr r3, [r7, #32] 80028c6: 68da ldr r2, [r3, #12] 80028c8: 4b75 ldr r3, [pc, #468] ; (8002aa0 ) 80028ca: 4013 ands r3, r2 80028cc: 68ba ldr r2, [r7, #8] 80028ce: 6a52 ldr r2, [r2, #36] ; 0x24 80028d0: 431a orrs r2, r3 80028d2: 6a3b ldr r3, [r7, #32] 80028d4: 60da str r2, [r3, #12] /* Set vlan tag valid bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_VLTV); 80028d6: 6a3b ldr r3, [r7, #32] 80028d8: 68db ldr r3, [r3, #12] 80028da: f443 3280 orr.w r2, r3, #65536 ; 0x10000 80028de: 6a3b ldr r3, [r7, #32] 80028e0: 60da str r2, [r3, #12] /* Set the descriptor as the vlan input source */ SET_BIT(heth->Instance->MACVIR, ETH_MACVIR_VLTI); 80028e2: 68fb ldr r3, [r7, #12] 80028e4: 681b ldr r3, [r3, #0] 80028e6: 6e1a ldr r2, [r3, #96] ; 0x60 80028e8: 68fb ldr r3, [r7, #12] 80028ea: 681b ldr r3, [r3, #0] 80028ec: f442 1280 orr.w r2, r2, #1048576 ; 0x100000 80028f0: 661a str r2, [r3, #96] ; 0x60 /* if inner VLAN is enabled */ if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_INNERVLANTAG) != (uint32_t)RESET) 80028f2: 68bb ldr r3, [r7, #8] 80028f4: 681b ldr r3, [r3, #0] 80028f6: f003 0308 and.w r3, r3, #8 80028fa: 2b00 cmp r3, #0 80028fc: d027 beq.n 800294e { /* Set inner vlan tag value */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXCDESC_IVT, (pTxConfig->InnerVlanTag << 16)); 80028fe: 6a3b ldr r3, [r7, #32] 8002900: 689b ldr r3, [r3, #8] 8002902: b29a uxth r2, r3 8002904: 68bb ldr r3, [r7, #8] 8002906: 6adb ldr r3, [r3, #44] ; 0x2c 8002908: 041b lsls r3, r3, #16 800290a: 431a orrs r2, r3 800290c: 6a3b ldr r3, [r7, #32] 800290e: 609a str r2, [r3, #8] /* Set inner vlan tag valid bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_IVLTV); 8002910: 6a3b ldr r3, [r7, #32] 8002912: 68db ldr r3, [r3, #12] 8002914: f443 3200 orr.w r2, r3, #131072 ; 0x20000 8002918: 6a3b ldr r3, [r7, #32] 800291a: 60da str r2, [r3, #12] /* Set Vlan Tag control */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXCDESC_IVTIR, pTxConfig->InnerVlanCtrl); 800291c: 6a3b ldr r3, [r7, #32] 800291e: 68db ldr r3, [r3, #12] 8002920: f423 2240 bic.w r2, r3, #786432 ; 0xc0000 8002924: 68bb ldr r3, [r7, #8] 8002926: 6b1b ldr r3, [r3, #48] ; 0x30 8002928: 431a orrs r2, r3 800292a: 6a3b ldr r3, [r7, #32] 800292c: 60da str r2, [r3, #12] /* Set the descriptor as the inner vlan input source */ SET_BIT(heth->Instance->MACIVIR, ETH_MACIVIR_VLTI); 800292e: 68fb ldr r3, [r7, #12] 8002930: 681b ldr r3, [r3, #0] 8002932: 6e5a ldr r2, [r3, #100] ; 0x64 8002934: 68fb ldr r3, [r7, #12] 8002936: 681b ldr r3, [r3, #0] 8002938: f442 1280 orr.w r2, r2, #1048576 ; 0x100000 800293c: 665a str r2, [r3, #100] ; 0x64 /* Enable double VLAN processing */ SET_BIT(heth->Instance->MACVTR, ETH_MACVTR_EDVLP); 800293e: 68fb ldr r3, [r7, #12] 8002940: 681b ldr r3, [r3, #0] 8002942: 6d1a ldr r2, [r3, #80] ; 0x50 8002944: 68fb ldr r3, [r7, #12] 8002946: 681b ldr r3, [r3, #0] 8002948: f042 6280 orr.w r2, r2, #67108864 ; 0x4000000 800294c: 651a str r2, [r3, #80] ; 0x50 } } /* if tcp segmentation is enabled for this packet */ if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET) 800294e: 68bb ldr r3, [r7, #8] 8002950: 681b ldr r3, [r3, #0] 8002952: f003 0310 and.w r3, r3, #16 8002956: 2b00 cmp r3, #0 8002958: d00e beq.n 8002978 { /* Set MSS value */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXCDESC_MSS, pTxConfig->MaxSegmentSize); 800295a: 6a3b ldr r3, [r7, #32] 800295c: 689a ldr r2, [r3, #8] 800295e: 4b51 ldr r3, [pc, #324] ; (8002aa4 ) 8002960: 4013 ands r3, r2 8002962: 68ba ldr r2, [r7, #8] 8002964: 6992 ldr r2, [r2, #24] 8002966: 431a orrs r2, r3 8002968: 6a3b ldr r3, [r7, #32] 800296a: 609a str r2, [r3, #8] /* Set MSS valid bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_TCMSSV); 800296c: 6a3b ldr r3, [r7, #32] 800296e: 68db ldr r3, [r3, #12] 8002970: f043 6280 orr.w r2, r3, #67108864 ; 0x4000000 8002974: 6a3b ldr r3, [r7, #32] 8002976: 60da str r2, [r3, #12] } if ((READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET) 8002978: 68bb ldr r3, [r7, #8] 800297a: 681b ldr r3, [r3, #0] 800297c: f003 0304 and.w r3, r3, #4 8002980: 2b00 cmp r3, #0 8002982: d105 bne.n 8002990 || (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET)) 8002984: 68bb ldr r3, [r7, #8] 8002986: 681b ldr r3, [r3, #0] 8002988: f003 0310 and.w r3, r3, #16 800298c: 2b00 cmp r3, #0 800298e: d036 beq.n 80029fe { /* Set as context descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_CTXT); 8002990: 6a3b ldr r3, [r7, #32] 8002992: 68db ldr r3, [r3, #12] 8002994: f043 4280 orr.w r2, r3, #1073741824 ; 0x40000000 8002998: 6a3b ldr r3, [r7, #32] 800299a: 60da str r2, [r3, #12] __ASM volatile ("dmb 0xF":::"memory"); 800299c: f3bf 8f5f dmb sy } 80029a0: bf00 nop /* Ensure rest of descriptor is written to RAM before the OWN bit */ __DMB(); /* Set own bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_OWN); 80029a2: 6a3b ldr r3, [r7, #32] 80029a4: 68db ldr r3, [r3, #12] 80029a6: f043 4200 orr.w r2, r3, #2147483648 ; 0x80000000 80029aa: 6a3b ldr r3, [r7, #32] 80029ac: 60da str r2, [r3, #12] /* Increment current tx descriptor index */ INCR_TX_DESC_INDEX(descidx, 1U); 80029ae: 6afb ldr r3, [r7, #44] ; 0x2c 80029b0: 3301 adds r3, #1 80029b2: 62fb str r3, [r7, #44] ; 0x2c 80029b4: 6afb ldr r3, [r7, #44] ; 0x2c 80029b6: 2b03 cmp r3, #3 80029b8: d902 bls.n 80029c0 80029ba: 6afb ldr r3, [r7, #44] ; 0x2c 80029bc: 3b04 subs r3, #4 80029be: 62fb str r3, [r7, #44] ; 0x2c /* Get current descriptor address */ dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 80029c0: 697b ldr r3, [r7, #20] 80029c2: 6afa ldr r2, [r7, #44] ; 0x2c 80029c4: f853 3022 ldr.w r3, [r3, r2, lsl #2] 80029c8: 623b str r3, [r7, #32] descnbr += 1U; 80029ca: 6a7b ldr r3, [r7, #36] ; 0x24 80029cc: 3301 adds r3, #1 80029ce: 627b str r3, [r7, #36] ; 0x24 /* Current Tx Descriptor Owned by DMA: cannot be used by the application */ if (READ_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCWBF_OWN) == ETH_DMATXNDESCWBF_OWN) 80029d0: 6a3b ldr r3, [r7, #32] 80029d2: 68db ldr r3, [r3, #12] 80029d4: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000 80029d8: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000 80029dc: d10f bne.n 80029fe { dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[firstdescidx]; 80029de: 697b ldr r3, [r7, #20] 80029e0: 693a ldr r2, [r7, #16] 80029e2: f853 3022 ldr.w r3, [r3, r2, lsl #2] 80029e6: 623b str r3, [r7, #32] __ASM volatile ("dmb 0xF":::"memory"); 80029e8: f3bf 8f5f dmb sy } 80029ec: bf00 nop /* Ensure rest of descriptor is written to RAM before the OWN bit */ __DMB(); /* Clear own bit */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_OWN); 80029ee: 6a3b ldr r3, [r7, #32] 80029f0: 68db ldr r3, [r3, #12] 80029f2: f023 4200 bic.w r2, r3, #2147483648 ; 0x80000000 80029f6: 6a3b ldr r3, [r7, #32] 80029f8: 60da str r2, [r3, #12] return HAL_ETH_ERROR_BUSY; 80029fa: 2302 movs r3, #2 80029fc: e1b6 b.n 8002d6c /***************************************************************************/ /***************** Normal descriptors configuration *****************/ /***************************************************************************/ descnbr += 1U; 80029fe: 6a7b ldr r3, [r7, #36] ; 0x24 8002a00: 3301 adds r3, #1 8002a02: 627b str r3, [r7, #36] ; 0x24 /* Set header or buffer 1 address */ WRITE_REG(dmatxdesc->DESC0, (uint32_t)txbuffer->buffer); 8002a04: 69fb ldr r3, [r7, #28] 8002a06: 681b ldr r3, [r3, #0] 8002a08: 461a mov r2, r3 8002a0a: 6a3b ldr r3, [r7, #32] 8002a0c: 601a str r2, [r3, #0] /* Set header or buffer 1 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B1L, txbuffer->len); 8002a0e: 6a3b ldr r3, [r7, #32] 8002a10: 689a ldr r2, [r3, #8] 8002a12: 4b24 ldr r3, [pc, #144] ; (8002aa4 ) 8002a14: 4013 ands r3, r2 8002a16: 69fa ldr r2, [r7, #28] 8002a18: 6852 ldr r2, [r2, #4] 8002a1a: 431a orrs r2, r3 8002a1c: 6a3b ldr r3, [r7, #32] 8002a1e: 609a str r2, [r3, #8] if (txbuffer->next != NULL) 8002a20: 69fb ldr r3, [r7, #28] 8002a22: 689b ldr r3, [r3, #8] 8002a24: 2b00 cmp r3, #0 8002a26: d012 beq.n 8002a4e { txbuffer = txbuffer->next; 8002a28: 69fb ldr r3, [r7, #28] 8002a2a: 689b ldr r3, [r3, #8] 8002a2c: 61fb str r3, [r7, #28] /* Set buffer 2 address */ WRITE_REG(dmatxdesc->DESC1, (uint32_t)txbuffer->buffer); 8002a2e: 69fb ldr r3, [r7, #28] 8002a30: 681b ldr r3, [r3, #0] 8002a32: 461a mov r2, r3 8002a34: 6a3b ldr r3, [r7, #32] 8002a36: 605a str r2, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, (txbuffer->len << 16)); 8002a38: 6a3b ldr r3, [r7, #32] 8002a3a: 689a ldr r2, [r3, #8] 8002a3c: 4b1a ldr r3, [pc, #104] ; (8002aa8 ) 8002a3e: 4013 ands r3, r2 8002a40: 69fa ldr r2, [r7, #28] 8002a42: 6852 ldr r2, [r2, #4] 8002a44: 0412 lsls r2, r2, #16 8002a46: 431a orrs r2, r3 8002a48: 6a3b ldr r3, [r7, #32] 8002a4a: 609a str r2, [r3, #8] 8002a4c: e008 b.n 8002a60 } else { WRITE_REG(dmatxdesc->DESC1, 0x0); 8002a4e: 6a3b ldr r3, [r7, #32] 8002a50: 2200 movs r2, #0 8002a52: 605a str r2, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, 0x0U); 8002a54: 6a3b ldr r3, [r7, #32] 8002a56: 689a ldr r2, [r3, #8] 8002a58: 4b13 ldr r3, [pc, #76] ; (8002aa8 ) 8002a5a: 4013 ands r3, r2 8002a5c: 6a3a ldr r2, [r7, #32] 8002a5e: 6093 str r3, [r2, #8] } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET) 8002a60: 68bb ldr r3, [r7, #8] 8002a62: 681b ldr r3, [r3, #0] 8002a64: f003 0310 and.w r3, r3, #16 8002a68: 2b00 cmp r3, #0 8002a6a: d021 beq.n 8002ab0 { /* Set TCP Header length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_THL, (pTxConfig->TCPHeaderLen << 19)); 8002a6c: 6a3b ldr r3, [r7, #32] 8002a6e: 68db ldr r3, [r3, #12] 8002a70: f423 02f0 bic.w r2, r3, #7864320 ; 0x780000 8002a74: 68bb ldr r3, [r7, #8] 8002a76: 6a1b ldr r3, [r3, #32] 8002a78: 04db lsls r3, r3, #19 8002a7a: 431a orrs r2, r3 8002a7c: 6a3b ldr r3, [r7, #32] 8002a7e: 60da str r2, [r3, #12] /* Set TCP payload length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TPL, pTxConfig->PayloadLen); 8002a80: 6a3b ldr r3, [r7, #32] 8002a82: 68da ldr r2, [r3, #12] 8002a84: 4b09 ldr r3, [pc, #36] ; (8002aac ) 8002a86: 4013 ands r3, r2 8002a88: 68ba ldr r2, [r7, #8] 8002a8a: 69d2 ldr r2, [r2, #28] 8002a8c: 431a orrs r2, r3 8002a8e: 6a3b ldr r3, [r7, #32] 8002a90: 60da str r2, [r3, #12] /* Set TCP Segmentation Enabled bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TSE); 8002a92: 6a3b ldr r3, [r7, #32] 8002a94: 68db ldr r3, [r3, #12] 8002a96: f443 2280 orr.w r2, r3, #262144 ; 0x40000 8002a9a: 6a3b ldr r3, [r7, #32] 8002a9c: 60da str r2, [r3, #12] 8002a9e: e02e b.n 8002afe 8002aa0: ffff0000 .word 0xffff0000 8002aa4: ffffc000 .word 0xffffc000 8002aa8: c000ffff .word 0xc000ffff 8002aac: fffc0000 .word 0xfffc0000 } else { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FL, pTxConfig->Length); 8002ab0: 6a3b ldr r3, [r7, #32] 8002ab2: 68da ldr r2, [r3, #12] 8002ab4: 4b7b ldr r3, [pc, #492] ; (8002ca4 ) 8002ab6: 4013 ands r3, r2 8002ab8: 68ba ldr r2, [r7, #8] 8002aba: 6852 ldr r2, [r2, #4] 8002abc: 431a orrs r2, r3 8002abe: 6a3b ldr r3, [r7, #32] 8002ac0: 60da str r2, [r3, #12] if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CSUM) != (uint32_t)RESET) 8002ac2: 68bb ldr r3, [r7, #8] 8002ac4: 681b ldr r3, [r3, #0] 8002ac6: f003 0301 and.w r3, r3, #1 8002aca: 2b00 cmp r3, #0 8002acc: d008 beq.n 8002ae0 { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CIC, pTxConfig->ChecksumCtrl); 8002ace: 6a3b ldr r3, [r7, #32] 8002ad0: 68db ldr r3, [r3, #12] 8002ad2: f423 3240 bic.w r2, r3, #196608 ; 0x30000 8002ad6: 68bb ldr r3, [r7, #8] 8002ad8: 695b ldr r3, [r3, #20] 8002ada: 431a orrs r2, r3 8002adc: 6a3b ldr r3, [r7, #32] 8002ade: 60da str r2, [r3, #12] } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CRCPAD) != (uint32_t)RESET) 8002ae0: 68bb ldr r3, [r7, #8] 8002ae2: 681b ldr r3, [r3, #0] 8002ae4: f003 0320 and.w r3, r3, #32 8002ae8: 2b00 cmp r3, #0 8002aea: d008 beq.n 8002afe { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CPC, pTxConfig->CRCPadCtrl); 8002aec: 6a3b ldr r3, [r7, #32] 8002aee: 68db ldr r3, [r3, #12] 8002af0: f023 6240 bic.w r2, r3, #201326592 ; 0xc000000 8002af4: 68bb ldr r3, [r7, #8] 8002af6: 691b ldr r3, [r3, #16] 8002af8: 431a orrs r2, r3 8002afa: 6a3b ldr r3, [r7, #32] 8002afc: 60da str r2, [r3, #12] } } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET) 8002afe: 68bb ldr r3, [r7, #8] 8002b00: 681b ldr r3, [r3, #0] 8002b02: f003 0304 and.w r3, r3, #4 8002b06: 2b00 cmp r3, #0 8002b08: d008 beq.n 8002b1c { /* Set Vlan Tag control */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_VTIR, pTxConfig->VlanCtrl); 8002b0a: 6a3b ldr r3, [r7, #32] 8002b0c: 689b ldr r3, [r3, #8] 8002b0e: f423 4240 bic.w r2, r3, #49152 ; 0xc000 8002b12: 68bb ldr r3, [r7, #8] 8002b14: 6a9b ldr r3, [r3, #40] ; 0x28 8002b16: 431a orrs r2, r3 8002b18: 6a3b ldr r3, [r7, #32] 8002b1a: 609a str r2, [r3, #8] } /* Mark it as First Descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FD); 8002b1c: 6a3b ldr r3, [r7, #32] 8002b1e: 68db ldr r3, [r3, #12] 8002b20: f043 5200 orr.w r2, r3, #536870912 ; 0x20000000 8002b24: 6a3b ldr r3, [r7, #32] 8002b26: 60da str r2, [r3, #12] /* Mark it as NORMAL descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CTXT); 8002b28: 6a3b ldr r3, [r7, #32] 8002b2a: 68db ldr r3, [r3, #12] 8002b2c: f023 4280 bic.w r2, r3, #1073741824 ; 0x40000000 8002b30: 6a3b ldr r3, [r7, #32] 8002b32: 60da str r2, [r3, #12] __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(); /* set OWN bit of FIRST descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN); 8002b3a: 6a3b ldr r3, [r7, #32] 8002b3c: 68db ldr r3, [r3, #12] 8002b3e: f043 4200 orr.w r2, r3, #2147483648 ; 0x80000000 8002b42: 6a3b ldr r3, [r7, #32] 8002b44: 60da str r2, [r3, #12] /* If source address insertion/replacement is enabled for this packet */ if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_SAIC) != (uint32_t)RESET) 8002b46: 68bb ldr r3, [r7, #8] 8002b48: 681b ldr r3, [r3, #0] 8002b4a: f003 0302 and.w r3, r3, #2 8002b4e: 2b00 cmp r3, #0 8002b50: f000 80da beq.w 8002d08 { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_SAIC, pTxConfig->SrcAddrCtrl); 8002b54: 6a3b ldr r3, [r7, #32] 8002b56: 68db ldr r3, [r3, #12] 8002b58: f023 7260 bic.w r2, r3, #58720256 ; 0x3800000 8002b5c: 68bb ldr r3, [r7, #8] 8002b5e: 68db ldr r3, [r3, #12] 8002b60: 431a orrs r2, r3 8002b62: 6a3b ldr r3, [r7, #32] 8002b64: 60da str r2, [r3, #12] } /* only if the packet is split into more than one descriptors > 1 */ while (txbuffer->next != NULL) 8002b66: e0cf b.n 8002d08 { /* Clear the LD bit of previous descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_LD); 8002b68: 6a3b ldr r3, [r7, #32] 8002b6a: 68db ldr r3, [r3, #12] 8002b6c: f023 5280 bic.w r2, r3, #268435456 ; 0x10000000 8002b70: 6a3b ldr r3, [r7, #32] 8002b72: 60da str r2, [r3, #12] /* Increment current tx descriptor index */ INCR_TX_DESC_INDEX(descidx, 1U); 8002b74: 6afb ldr r3, [r7, #44] ; 0x2c 8002b76: 3301 adds r3, #1 8002b78: 62fb str r3, [r7, #44] ; 0x2c 8002b7a: 6afb ldr r3, [r7, #44] ; 0x2c 8002b7c: 2b03 cmp r3, #3 8002b7e: d902 bls.n 8002b86 8002b80: 6afb ldr r3, [r7, #44] ; 0x2c 8002b82: 3b04 subs r3, #4 8002b84: 62fb str r3, [r7, #44] ; 0x2c /* Get current descriptor address */ dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 8002b86: 697b ldr r3, [r7, #20] 8002b88: 6afa ldr r2, [r7, #44] ; 0x2c 8002b8a: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8002b8e: 623b str r3, [r7, #32] /* Clear the FD bit of new Descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FD); 8002b90: 6a3b ldr r3, [r7, #32] 8002b92: 68db ldr r3, [r3, #12] 8002b94: f023 5200 bic.w r2, r3, #536870912 ; 0x20000000 8002b98: 6a3b ldr r3, [r7, #32] 8002b9a: 60da str r2, [r3, #12] /* Current Tx Descriptor Owned by DMA: cannot be used by the application */ if ((READ_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN) == ETH_DMATXNDESCRF_OWN) 8002b9c: 6a3b ldr r3, [r7, #32] 8002b9e: 68db ldr r3, [r3, #12] 8002ba0: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000 8002ba4: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000 8002ba8: d007 beq.n 8002bba || (dmatxdesclist->PacketAddress[descidx] != NULL)) 8002baa: 697a ldr r2, [r7, #20] 8002bac: 6afb ldr r3, [r7, #44] ; 0x2c 8002bae: 3304 adds r3, #4 8002bb0: 009b lsls r3, r3, #2 8002bb2: 4413 add r3, r2 8002bb4: 685b ldr r3, [r3, #4] 8002bb6: 2b00 cmp r3, #0 8002bb8: d029 beq.n 8002c0e { descidx = firstdescidx; 8002bba: 693b ldr r3, [r7, #16] 8002bbc: 62fb str r3, [r7, #44] ; 0x2c dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 8002bbe: 697b ldr r3, [r7, #20] 8002bc0: 6afa ldr r2, [r7, #44] ; 0x2c 8002bc2: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8002bc6: 623b str r3, [r7, #32] /* clear previous desc own bit */ for (idx = 0; idx < descnbr; idx ++) 8002bc8: 2300 movs r3, #0 8002bca: 62bb str r3, [r7, #40] ; 0x28 8002bcc: e019 b.n 8002c02 __ASM volatile ("dmb 0xF":::"memory"); 8002bce: f3bf 8f5f dmb sy } 8002bd2: bf00 nop { /* Ensure rest of descriptor is written to RAM before the OWN bit */ __DMB(); CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN); 8002bd4: 6a3b ldr r3, [r7, #32] 8002bd6: 68db ldr r3, [r3, #12] 8002bd8: f023 4200 bic.w r2, r3, #2147483648 ; 0x80000000 8002bdc: 6a3b ldr r3, [r7, #32] 8002bde: 60da str r2, [r3, #12] /* Increment current tx descriptor index */ INCR_TX_DESC_INDEX(descidx, 1U); 8002be0: 6afb ldr r3, [r7, #44] ; 0x2c 8002be2: 3301 adds r3, #1 8002be4: 62fb str r3, [r7, #44] ; 0x2c 8002be6: 6afb ldr r3, [r7, #44] ; 0x2c 8002be8: 2b03 cmp r3, #3 8002bea: d902 bls.n 8002bf2 8002bec: 6afb ldr r3, [r7, #44] ; 0x2c 8002bee: 3b04 subs r3, #4 8002bf0: 62fb str r3, [r7, #44] ; 0x2c /* Get current descriptor address */ dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 8002bf2: 697b ldr r3, [r7, #20] 8002bf4: 6afa ldr r2, [r7, #44] ; 0x2c 8002bf6: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8002bfa: 623b str r3, [r7, #32] for (idx = 0; idx < descnbr; idx ++) 8002bfc: 6abb ldr r3, [r7, #40] ; 0x28 8002bfe: 3301 adds r3, #1 8002c00: 62bb str r3, [r7, #40] ; 0x28 8002c02: 6aba ldr r2, [r7, #40] ; 0x28 8002c04: 6a7b ldr r3, [r7, #36] ; 0x24 8002c06: 429a cmp r2, r3 8002c08: d3e1 bcc.n 8002bce } return HAL_ETH_ERROR_BUSY; 8002c0a: 2302 movs r3, #2 8002c0c: e0ae b.n 8002d6c } descnbr += 1U; 8002c0e: 6a7b ldr r3, [r7, #36] ; 0x24 8002c10: 3301 adds r3, #1 8002c12: 627b str r3, [r7, #36] ; 0x24 /* Get the next Tx buffer in the list */ txbuffer = txbuffer->next; 8002c14: 69fb ldr r3, [r7, #28] 8002c16: 689b ldr r3, [r3, #8] 8002c18: 61fb str r3, [r7, #28] /* Set header or buffer 1 address */ WRITE_REG(dmatxdesc->DESC0, (uint32_t)txbuffer->buffer); 8002c1a: 69fb ldr r3, [r7, #28] 8002c1c: 681b ldr r3, [r3, #0] 8002c1e: 461a mov r2, r3 8002c20: 6a3b ldr r3, [r7, #32] 8002c22: 601a str r2, [r3, #0] /* Set header or buffer 1 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B1L, txbuffer->len); 8002c24: 6a3b ldr r3, [r7, #32] 8002c26: 689a ldr r2, [r3, #8] 8002c28: 4b1f ldr r3, [pc, #124] ; (8002ca8 ) 8002c2a: 4013 ands r3, r2 8002c2c: 69fa ldr r2, [r7, #28] 8002c2e: 6852 ldr r2, [r2, #4] 8002c30: 431a orrs r2, r3 8002c32: 6a3b ldr r3, [r7, #32] 8002c34: 609a str r2, [r3, #8] if (txbuffer->next != NULL) 8002c36: 69fb ldr r3, [r7, #28] 8002c38: 689b ldr r3, [r3, #8] 8002c3a: 2b00 cmp r3, #0 8002c3c: d012 beq.n 8002c64 { /* Get the next Tx buffer in the list */ txbuffer = txbuffer->next; 8002c3e: 69fb ldr r3, [r7, #28] 8002c40: 689b ldr r3, [r3, #8] 8002c42: 61fb str r3, [r7, #28] /* Set buffer 2 address */ WRITE_REG(dmatxdesc->DESC1, (uint32_t)txbuffer->buffer); 8002c44: 69fb ldr r3, [r7, #28] 8002c46: 681b ldr r3, [r3, #0] 8002c48: 461a mov r2, r3 8002c4a: 6a3b ldr r3, [r7, #32] 8002c4c: 605a str r2, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, (txbuffer->len << 16)); 8002c4e: 6a3b ldr r3, [r7, #32] 8002c50: 689a ldr r2, [r3, #8] 8002c52: 4b16 ldr r3, [pc, #88] ; (8002cac ) 8002c54: 4013 ands r3, r2 8002c56: 69fa ldr r2, [r7, #28] 8002c58: 6852 ldr r2, [r2, #4] 8002c5a: 0412 lsls r2, r2, #16 8002c5c: 431a orrs r2, r3 8002c5e: 6a3b ldr r3, [r7, #32] 8002c60: 609a str r2, [r3, #8] 8002c62: e008 b.n 8002c76 } else { WRITE_REG(dmatxdesc->DESC1, 0x0); 8002c64: 6a3b ldr r3, [r7, #32] 8002c66: 2200 movs r2, #0 8002c68: 605a str r2, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, 0x0U); 8002c6a: 6a3b ldr r3, [r7, #32] 8002c6c: 689a ldr r2, [r3, #8] 8002c6e: 4b0f ldr r3, [pc, #60] ; (8002cac ) 8002c70: 4013 ands r3, r2 8002c72: 6a3a ldr r2, [r7, #32] 8002c74: 6093 str r3, [r2, #8] } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET) 8002c76: 68bb ldr r3, [r7, #8] 8002c78: 681b ldr r3, [r3, #0] 8002c7a: f003 0310 and.w r3, r3, #16 8002c7e: 2b00 cmp r3, #0 8002c80: d018 beq.n 8002cb4 { /* Set TCP payload length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TPL, pTxConfig->PayloadLen); 8002c82: 6a3b ldr r3, [r7, #32] 8002c84: 68da ldr r2, [r3, #12] 8002c86: 4b0a ldr r3, [pc, #40] ; (8002cb0 ) 8002c88: 4013 ands r3, r2 8002c8a: 68ba ldr r2, [r7, #8] 8002c8c: 69d2 ldr r2, [r2, #28] 8002c8e: 431a orrs r2, r3 8002c90: 6a3b ldr r3, [r7, #32] 8002c92: 60da str r2, [r3, #12] /* Set TCP Segmentation Enabled bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TSE); 8002c94: 6a3b ldr r3, [r7, #32] 8002c96: 68db ldr r3, [r3, #12] 8002c98: f443 2280 orr.w r2, r3, #262144 ; 0x40000 8002c9c: 6a3b ldr r3, [r7, #32] 8002c9e: 60da str r2, [r3, #12] 8002ca0: e020 b.n 8002ce4 8002ca2: bf00 nop 8002ca4: ffff8000 .word 0xffff8000 8002ca8: ffffc000 .word 0xffffc000 8002cac: c000ffff .word 0xc000ffff 8002cb0: fffc0000 .word 0xfffc0000 } else { /* Set the packet length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FL, pTxConfig->Length); 8002cb4: 6a3b ldr r3, [r7, #32] 8002cb6: 68da ldr r2, [r3, #12] 8002cb8: 4b2f ldr r3, [pc, #188] ; (8002d78 ) 8002cba: 4013 ands r3, r2 8002cbc: 68ba ldr r2, [r7, #8] 8002cbe: 6852 ldr r2, [r2, #4] 8002cc0: 431a orrs r2, r3 8002cc2: 6a3b ldr r3, [r7, #32] 8002cc4: 60da str r2, [r3, #12] if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CSUM) != (uint32_t)RESET) 8002cc6: 68bb ldr r3, [r7, #8] 8002cc8: 681b ldr r3, [r3, #0] 8002cca: f003 0301 and.w r3, r3, #1 8002cce: 2b00 cmp r3, #0 8002cd0: d008 beq.n 8002ce4 { /* Checksum Insertion Control */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CIC, pTxConfig->ChecksumCtrl); 8002cd2: 6a3b ldr r3, [r7, #32] 8002cd4: 68db ldr r3, [r3, #12] 8002cd6: f423 3240 bic.w r2, r3, #196608 ; 0x30000 8002cda: 68bb ldr r3, [r7, #8] 8002cdc: 695b ldr r3, [r3, #20] 8002cde: 431a orrs r2, r3 8002ce0: 6a3b ldr r3, [r7, #32] 8002ce2: 60da str r2, [r3, #12] } } bd_count += 1U; 8002ce4: 69bb ldr r3, [r7, #24] 8002ce6: 3301 adds r3, #1 8002ce8: 61bb str r3, [r7, #24] __ASM volatile ("dmb 0xF":::"memory"); 8002cea: f3bf 8f5f dmb sy } 8002cee: bf00 nop /* Ensure rest of descriptor is written to RAM before the OWN bit */ __DMB(); /* Set Own bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN); 8002cf0: 6a3b ldr r3, [r7, #32] 8002cf2: 68db ldr r3, [r3, #12] 8002cf4: f043 4200 orr.w r2, r3, #2147483648 ; 0x80000000 8002cf8: 6a3b ldr r3, [r7, #32] 8002cfa: 60da str r2, [r3, #12] /* Mark it as NORMAL descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CTXT); 8002cfc: 6a3b ldr r3, [r7, #32] 8002cfe: 68db ldr r3, [r3, #12] 8002d00: f023 4280 bic.w r2, r3, #1073741824 ; 0x40000000 8002d04: 6a3b ldr r3, [r7, #32] 8002d06: 60da str r2, [r3, #12] while (txbuffer->next != NULL) 8002d08: 69fb ldr r3, [r7, #28] 8002d0a: 689b ldr r3, [r3, #8] 8002d0c: 2b00 cmp r3, #0 8002d0e: f47f af2b bne.w 8002b68 } if (ItMode != ((uint32_t)RESET)) 8002d12: 687b ldr r3, [r7, #4] 8002d14: 2b00 cmp r3, #0 8002d16: d006 beq.n 8002d26 { /* Set Interrupt on completion bit */ SET_BIT(dmatxdesc->DESC2, ETH_DMATXNDESCRF_IOC); 8002d18: 6a3b ldr r3, [r7, #32] 8002d1a: 689b ldr r3, [r3, #8] 8002d1c: f043 4200 orr.w r2, r3, #2147483648 ; 0x80000000 8002d20: 6a3b ldr r3, [r7, #32] 8002d22: 609a str r2, [r3, #8] 8002d24: e005 b.n 8002d32 } else { /* Clear Interrupt on completion bit */ CLEAR_BIT(dmatxdesc->DESC2, ETH_DMATXNDESCRF_IOC); 8002d26: 6a3b ldr r3, [r7, #32] 8002d28: 689b ldr r3, [r3, #8] 8002d2a: f023 4200 bic.w r2, r3, #2147483648 ; 0x80000000 8002d2e: 6a3b ldr r3, [r7, #32] 8002d30: 609a str r2, [r3, #8] } /* Mark it as LAST descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_LD); 8002d32: 6a3b ldr r3, [r7, #32] 8002d34: 68db ldr r3, [r3, #12] 8002d36: f043 5280 orr.w r2, r3, #268435456 ; 0x10000000 8002d3a: 6a3b ldr r3, [r7, #32] 8002d3c: 60da str r2, [r3, #12] /* Save the current packet address to expose it to the application */ dmatxdesclist->PacketAddress[descidx] = dmatxdesclist->CurrentPacketAddress; 8002d3e: 697b ldr r3, [r7, #20] 8002d40: 6a5a ldr r2, [r3, #36] ; 0x24 8002d42: 6979 ldr r1, [r7, #20] 8002d44: 6afb ldr r3, [r7, #44] ; 0x2c 8002d46: 3304 adds r3, #4 8002d48: 009b lsls r3, r3, #2 8002d4a: 440b add r3, r1 8002d4c: 605a str r2, [r3, #4] dmatxdesclist->CurTxDesc = descidx; 8002d4e: 697b ldr r3, [r7, #20] 8002d50: 6afa ldr r2, [r7, #44] ; 0x2c 8002d52: 611a str r2, [r3, #16] __ASM volatile ("cpsid i" : : : "memory"); 8002d54: b672 cpsid i } 8002d56: bf00 nop /* disable the interrupt */ __disable_irq(); dmatxdesclist->BuffersInUse += bd_count + 1U; 8002d58: 697b ldr r3, [r7, #20] 8002d5a: 6a9a ldr r2, [r3, #40] ; 0x28 8002d5c: 69bb ldr r3, [r7, #24] 8002d5e: 4413 add r3, r2 8002d60: 1c5a adds r2, r3, #1 8002d62: 697b ldr r3, [r7, #20] 8002d64: 629a str r2, [r3, #40] ; 0x28 __ASM volatile ("cpsie i" : : : "memory"); 8002d66: b662 cpsie i } 8002d68: bf00 nop /* Enable interrupts back */ __enable_irq(); /* Return function status */ return HAL_ETH_ERROR_NONE; 8002d6a: 2300 movs r3, #0 } 8002d6c: 4618 mov r0, r3 8002d6e: 3734 adds r7, #52 ; 0x34 8002d70: 46bd mov sp, r7 8002d72: f85d 7b04 ldr.w r7, [sp], #4 8002d76: 4770 bx lr 8002d78: ffff8000 .word 0xffff8000 08002d7c : * @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) { 8002d7c: b480 push {r7} 8002d7e: b089 sub sp, #36 ; 0x24 8002d80: af00 add r7, sp, #0 8002d82: 6078 str r0, [r7, #4] 8002d84: 6039 str r1, [r7, #0] uint32_t position = 0x00U; 8002d86: 2300 movs r3, #0 8002d88: 61fb str r3, [r7, #28] EXTI_Core_TypeDef *EXTI_CurrentCPU; #if defined(DUAL_CORE) && defined(CORE_CM4) EXTI_CurrentCPU = EXTI_D2; /* EXTI for CM4 CPU */ #else EXTI_CurrentCPU = EXTI_D1; /* EXTI for CM7 CPU */ 8002d8a: 4b86 ldr r3, [pc, #536] ; (8002fa4 ) 8002d8c: 617b str r3, [r7, #20] 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 */ while (((GPIO_Init->Pin) >> position) != 0x00U) 8002d8e: e18c b.n 80030aa { /* Get current io position */ iocurrent = (GPIO_Init->Pin) & (1UL << position); 8002d90: 683b ldr r3, [r7, #0] 8002d92: 681a ldr r2, [r3, #0] 8002d94: 2101 movs r1, #1 8002d96: 69fb ldr r3, [r7, #28] 8002d98: fa01 f303 lsl.w r3, r1, r3 8002d9c: 4013 ands r3, r2 8002d9e: 613b str r3, [r7, #16] if (iocurrent != 0x00U) 8002da0: 693b ldr r3, [r7, #16] 8002da2: 2b00 cmp r3, #0 8002da4: f000 817e beq.w 80030a4 { /*--------------------- GPIO Mode Configuration ------------------------*/ /* In case of Output or Alternate function mode selection */ if (((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)) 8002da8: 683b ldr r3, [r7, #0] 8002daa: 685b ldr r3, [r3, #4] 8002dac: f003 0303 and.w r3, r3, #3 8002db0: 2b01 cmp r3, #1 8002db2: d005 beq.n 8002dc0 8002db4: 683b ldr r3, [r7, #0] 8002db6: 685b ldr r3, [r3, #4] 8002db8: f003 0303 and.w r3, r3, #3 8002dbc: 2b02 cmp r3, #2 8002dbe: d130 bne.n 8002e22 { /* Check the Speed parameter */ assert_param(IS_GPIO_SPEED(GPIO_Init->Speed)); /* Configure the IO Speed */ temp = GPIOx->OSPEEDR; 8002dc0: 687b ldr r3, [r7, #4] 8002dc2: 689b ldr r3, [r3, #8] 8002dc4: 61bb str r3, [r7, #24] temp &= ~(GPIO_OSPEEDR_OSPEED0 << (position * 2U)); 8002dc6: 69fb ldr r3, [r7, #28] 8002dc8: 005b lsls r3, r3, #1 8002dca: 2203 movs r2, #3 8002dcc: fa02 f303 lsl.w r3, r2, r3 8002dd0: 43db mvns r3, r3 8002dd2: 69ba ldr r2, [r7, #24] 8002dd4: 4013 ands r3, r2 8002dd6: 61bb str r3, [r7, #24] temp |= (GPIO_Init->Speed << (position * 2U)); 8002dd8: 683b ldr r3, [r7, #0] 8002dda: 68da ldr r2, [r3, #12] 8002ddc: 69fb ldr r3, [r7, #28] 8002dde: 005b lsls r3, r3, #1 8002de0: fa02 f303 lsl.w r3, r2, r3 8002de4: 69ba ldr r2, [r7, #24] 8002de6: 4313 orrs r3, r2 8002de8: 61bb str r3, [r7, #24] GPIOx->OSPEEDR = temp; 8002dea: 687b ldr r3, [r7, #4] 8002dec: 69ba ldr r2, [r7, #24] 8002dee: 609a str r2, [r3, #8] /* Configure the IO Output Type */ temp = GPIOx->OTYPER; 8002df0: 687b ldr r3, [r7, #4] 8002df2: 685b ldr r3, [r3, #4] 8002df4: 61bb str r3, [r7, #24] temp &= ~(GPIO_OTYPER_OT0 << position) ; 8002df6: 2201 movs r2, #1 8002df8: 69fb ldr r3, [r7, #28] 8002dfa: fa02 f303 lsl.w r3, r2, r3 8002dfe: 43db mvns r3, r3 8002e00: 69ba ldr r2, [r7, #24] 8002e02: 4013 ands r3, r2 8002e04: 61bb str r3, [r7, #24] temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position); 8002e06: 683b ldr r3, [r7, #0] 8002e08: 685b ldr r3, [r3, #4] 8002e0a: 091b lsrs r3, r3, #4 8002e0c: f003 0201 and.w r2, r3, #1 8002e10: 69fb ldr r3, [r7, #28] 8002e12: fa02 f303 lsl.w r3, r2, r3 8002e16: 69ba ldr r2, [r7, #24] 8002e18: 4313 orrs r3, r2 8002e1a: 61bb str r3, [r7, #24] GPIOx->OTYPER = temp; 8002e1c: 687b ldr r3, [r7, #4] 8002e1e: 69ba ldr r2, [r7, #24] 8002e20: 605a str r2, [r3, #4] } if ((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG) 8002e22: 683b ldr r3, [r7, #0] 8002e24: 685b ldr r3, [r3, #4] 8002e26: f003 0303 and.w r3, r3, #3 8002e2a: 2b03 cmp r3, #3 8002e2c: d017 beq.n 8002e5e { /* Check the Pull parameter */ assert_param(IS_GPIO_PULL(GPIO_Init->Pull)); /* Activate the Pull-up or Pull down resistor for the current IO */ temp = GPIOx->PUPDR; 8002e2e: 687b ldr r3, [r7, #4] 8002e30: 68db ldr r3, [r3, #12] 8002e32: 61bb str r3, [r7, #24] temp &= ~(GPIO_PUPDR_PUPD0 << (position * 2U)); 8002e34: 69fb ldr r3, [r7, #28] 8002e36: 005b lsls r3, r3, #1 8002e38: 2203 movs r2, #3 8002e3a: fa02 f303 lsl.w r3, r2, r3 8002e3e: 43db mvns r3, r3 8002e40: 69ba ldr r2, [r7, #24] 8002e42: 4013 ands r3, r2 8002e44: 61bb str r3, [r7, #24] temp |= ((GPIO_Init->Pull) << (position * 2U)); 8002e46: 683b ldr r3, [r7, #0] 8002e48: 689a ldr r2, [r3, #8] 8002e4a: 69fb ldr r3, [r7, #28] 8002e4c: 005b lsls r3, r3, #1 8002e4e: fa02 f303 lsl.w r3, r2, r3 8002e52: 69ba ldr r2, [r7, #24] 8002e54: 4313 orrs r3, r2 8002e56: 61bb str r3, [r7, #24] GPIOx->PUPDR = temp; 8002e58: 687b ldr r3, [r7, #4] 8002e5a: 69ba ldr r2, [r7, #24] 8002e5c: 60da str r2, [r3, #12] } /* In case of Alternate function mode selection */ if ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF) 8002e5e: 683b ldr r3, [r7, #0] 8002e60: 685b ldr r3, [r3, #4] 8002e62: f003 0303 and.w r3, r3, #3 8002e66: 2b02 cmp r3, #2 8002e68: d123 bne.n 8002eb2 /* Check the Alternate function parameters */ assert_param(IS_GPIO_AF_INSTANCE(GPIOx)); assert_param(IS_GPIO_AF(GPIO_Init->Alternate)); /* Configure Alternate function mapped with the current IO */ temp = GPIOx->AFR[position >> 3U]; 8002e6a: 69fb ldr r3, [r7, #28] 8002e6c: 08da lsrs r2, r3, #3 8002e6e: 687b ldr r3, [r7, #4] 8002e70: 3208 adds r2, #8 8002e72: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8002e76: 61bb str r3, [r7, #24] temp &= ~(0xFU << ((position & 0x07U) * 4U)); 8002e78: 69fb ldr r3, [r7, #28] 8002e7a: f003 0307 and.w r3, r3, #7 8002e7e: 009b lsls r3, r3, #2 8002e80: 220f movs r2, #15 8002e82: fa02 f303 lsl.w r3, r2, r3 8002e86: 43db mvns r3, r3 8002e88: 69ba ldr r2, [r7, #24] 8002e8a: 4013 ands r3, r2 8002e8c: 61bb str r3, [r7, #24] temp |= ((GPIO_Init->Alternate) << ((position & 0x07U) * 4U)); 8002e8e: 683b ldr r3, [r7, #0] 8002e90: 691a ldr r2, [r3, #16] 8002e92: 69fb ldr r3, [r7, #28] 8002e94: f003 0307 and.w r3, r3, #7 8002e98: 009b lsls r3, r3, #2 8002e9a: fa02 f303 lsl.w r3, r2, r3 8002e9e: 69ba ldr r2, [r7, #24] 8002ea0: 4313 orrs r3, r2 8002ea2: 61bb str r3, [r7, #24] GPIOx->AFR[position >> 3U] = temp; 8002ea4: 69fb ldr r3, [r7, #28] 8002ea6: 08da lsrs r2, r3, #3 8002ea8: 687b ldr r3, [r7, #4] 8002eaa: 3208 adds r2, #8 8002eac: 69b9 ldr r1, [r7, #24] 8002eae: f843 1022 str.w r1, [r3, r2, lsl #2] } /* Configure IO Direction mode (Input, Output, Alternate or Analog) */ temp = GPIOx->MODER; 8002eb2: 687b ldr r3, [r7, #4] 8002eb4: 681b ldr r3, [r3, #0] 8002eb6: 61bb str r3, [r7, #24] temp &= ~(GPIO_MODER_MODE0 << (position * 2U)); 8002eb8: 69fb ldr r3, [r7, #28] 8002eba: 005b lsls r3, r3, #1 8002ebc: 2203 movs r2, #3 8002ebe: fa02 f303 lsl.w r3, r2, r3 8002ec2: 43db mvns r3, r3 8002ec4: 69ba ldr r2, [r7, #24] 8002ec6: 4013 ands r3, r2 8002ec8: 61bb str r3, [r7, #24] temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2U)); 8002eca: 683b ldr r3, [r7, #0] 8002ecc: 685b ldr r3, [r3, #4] 8002ece: f003 0203 and.w r2, r3, #3 8002ed2: 69fb ldr r3, [r7, #28] 8002ed4: 005b lsls r3, r3, #1 8002ed6: fa02 f303 lsl.w r3, r2, r3 8002eda: 69ba ldr r2, [r7, #24] 8002edc: 4313 orrs r3, r2 8002ede: 61bb str r3, [r7, #24] GPIOx->MODER = temp; 8002ee0: 687b ldr r3, [r7, #4] 8002ee2: 69ba ldr r2, [r7, #24] 8002ee4: 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) 8002ee6: 683b ldr r3, [r7, #0] 8002ee8: 685b ldr r3, [r3, #4] 8002eea: f403 3340 and.w r3, r3, #196608 ; 0x30000 8002eee: 2b00 cmp r3, #0 8002ef0: f000 80d8 beq.w 80030a4 { /* Enable SYSCFG Clock */ __HAL_RCC_SYSCFG_CLK_ENABLE(); 8002ef4: 4b2c ldr r3, [pc, #176] ; (8002fa8 ) 8002ef6: f8d3 30f4 ldr.w r3, [r3, #244] ; 0xf4 8002efa: 4a2b ldr r2, [pc, #172] ; (8002fa8 ) 8002efc: f043 0302 orr.w r3, r3, #2 8002f00: f8c2 30f4 str.w r3, [r2, #244] ; 0xf4 8002f04: 4b28 ldr r3, [pc, #160] ; (8002fa8 ) 8002f06: f8d3 30f4 ldr.w r3, [r3, #244] ; 0xf4 8002f0a: f003 0302 and.w r3, r3, #2 8002f0e: 60fb str r3, [r7, #12] 8002f10: 68fb ldr r3, [r7, #12] temp = SYSCFG->EXTICR[position >> 2U]; 8002f12: 4a26 ldr r2, [pc, #152] ; (8002fac ) 8002f14: 69fb ldr r3, [r7, #28] 8002f16: 089b lsrs r3, r3, #2 8002f18: 3302 adds r3, #2 8002f1a: f852 3023 ldr.w r3, [r2, r3, lsl #2] 8002f1e: 61bb str r3, [r7, #24] temp &= ~(0x0FUL << (4U * (position & 0x03U))); 8002f20: 69fb ldr r3, [r7, #28] 8002f22: f003 0303 and.w r3, r3, #3 8002f26: 009b lsls r3, r3, #2 8002f28: 220f movs r2, #15 8002f2a: fa02 f303 lsl.w r3, r2, r3 8002f2e: 43db mvns r3, r3 8002f30: 69ba ldr r2, [r7, #24] 8002f32: 4013 ands r3, r2 8002f34: 61bb str r3, [r7, #24] temp |= (GPIO_GET_INDEX(GPIOx) << (4U * (position & 0x03U))); 8002f36: 687b ldr r3, [r7, #4] 8002f38: 4a1d ldr r2, [pc, #116] ; (8002fb0 ) 8002f3a: 4293 cmp r3, r2 8002f3c: d04a beq.n 8002fd4 8002f3e: 687b ldr r3, [r7, #4] 8002f40: 4a1c ldr r2, [pc, #112] ; (8002fb4 ) 8002f42: 4293 cmp r3, r2 8002f44: d02b beq.n 8002f9e 8002f46: 687b ldr r3, [r7, #4] 8002f48: 4a1b ldr r2, [pc, #108] ; (8002fb8 ) 8002f4a: 4293 cmp r3, r2 8002f4c: d025 beq.n 8002f9a 8002f4e: 687b ldr r3, [r7, #4] 8002f50: 4a1a ldr r2, [pc, #104] ; (8002fbc ) 8002f52: 4293 cmp r3, r2 8002f54: d01f beq.n 8002f96 8002f56: 687b ldr r3, [r7, #4] 8002f58: 4a19 ldr r2, [pc, #100] ; (8002fc0 ) 8002f5a: 4293 cmp r3, r2 8002f5c: d019 beq.n 8002f92 8002f5e: 687b ldr r3, [r7, #4] 8002f60: 4a18 ldr r2, [pc, #96] ; (8002fc4 ) 8002f62: 4293 cmp r3, r2 8002f64: d013 beq.n 8002f8e 8002f66: 687b ldr r3, [r7, #4] 8002f68: 4a17 ldr r2, [pc, #92] ; (8002fc8 ) 8002f6a: 4293 cmp r3, r2 8002f6c: d00d beq.n 8002f8a 8002f6e: 687b ldr r3, [r7, #4] 8002f70: 4a16 ldr r2, [pc, #88] ; (8002fcc ) 8002f72: 4293 cmp r3, r2 8002f74: d007 beq.n 8002f86 8002f76: 687b ldr r3, [r7, #4] 8002f78: 4a15 ldr r2, [pc, #84] ; (8002fd0 ) 8002f7a: 4293 cmp r3, r2 8002f7c: d101 bne.n 8002f82 8002f7e: 2309 movs r3, #9 8002f80: e029 b.n 8002fd6 8002f82: 230a movs r3, #10 8002f84: e027 b.n 8002fd6 8002f86: 2307 movs r3, #7 8002f88: e025 b.n 8002fd6 8002f8a: 2306 movs r3, #6 8002f8c: e023 b.n 8002fd6 8002f8e: 2305 movs r3, #5 8002f90: e021 b.n 8002fd6 8002f92: 2304 movs r3, #4 8002f94: e01f b.n 8002fd6 8002f96: 2303 movs r3, #3 8002f98: e01d b.n 8002fd6 8002f9a: 2302 movs r3, #2 8002f9c: e01b b.n 8002fd6 8002f9e: 2301 movs r3, #1 8002fa0: e019 b.n 8002fd6 8002fa2: bf00 nop 8002fa4: 58000080 .word 0x58000080 8002fa8: 58024400 .word 0x58024400 8002fac: 58000400 .word 0x58000400 8002fb0: 58020000 .word 0x58020000 8002fb4: 58020400 .word 0x58020400 8002fb8: 58020800 .word 0x58020800 8002fbc: 58020c00 .word 0x58020c00 8002fc0: 58021000 .word 0x58021000 8002fc4: 58021400 .word 0x58021400 8002fc8: 58021800 .word 0x58021800 8002fcc: 58021c00 .word 0x58021c00 8002fd0: 58022400 .word 0x58022400 8002fd4: 2300 movs r3, #0 8002fd6: 69fa ldr r2, [r7, #28] 8002fd8: f002 0203 and.w r2, r2, #3 8002fdc: 0092 lsls r2, r2, #2 8002fde: 4093 lsls r3, r2 8002fe0: 69ba ldr r2, [r7, #24] 8002fe2: 4313 orrs r3, r2 8002fe4: 61bb str r3, [r7, #24] SYSCFG->EXTICR[position >> 2U] = temp; 8002fe6: 4938 ldr r1, [pc, #224] ; (80030c8 ) 8002fe8: 69fb ldr r3, [r7, #28] 8002fea: 089b lsrs r3, r3, #2 8002fec: 3302 adds r3, #2 8002fee: 69ba ldr r2, [r7, #24] 8002ff0: f841 2023 str.w r2, [r1, r3, lsl #2] /* Clear Rising Falling edge configuration */ temp = EXTI->RTSR1; 8002ff4: f04f 43b0 mov.w r3, #1476395008 ; 0x58000000 8002ff8: 681b ldr r3, [r3, #0] 8002ffa: 61bb str r3, [r7, #24] temp &= ~(iocurrent); 8002ffc: 693b ldr r3, [r7, #16] 8002ffe: 43db mvns r3, r3 8003000: 69ba ldr r2, [r7, #24] 8003002: 4013 ands r3, r2 8003004: 61bb str r3, [r7, #24] if ((GPIO_Init->Mode & TRIGGER_RISING) != 0x00U) 8003006: 683b ldr r3, [r7, #0] 8003008: 685b ldr r3, [r3, #4] 800300a: f403 1380 and.w r3, r3, #1048576 ; 0x100000 800300e: 2b00 cmp r3, #0 8003010: d003 beq.n 800301a { temp |= iocurrent; 8003012: 69ba ldr r2, [r7, #24] 8003014: 693b ldr r3, [r7, #16] 8003016: 4313 orrs r3, r2 8003018: 61bb str r3, [r7, #24] } EXTI->RTSR1 = temp; 800301a: f04f 42b0 mov.w r2, #1476395008 ; 0x58000000 800301e: 69bb ldr r3, [r7, #24] 8003020: 6013 str r3, [r2, #0] temp = EXTI->FTSR1; 8003022: f04f 43b0 mov.w r3, #1476395008 ; 0x58000000 8003026: 685b ldr r3, [r3, #4] 8003028: 61bb str r3, [r7, #24] temp &= ~(iocurrent); 800302a: 693b ldr r3, [r7, #16] 800302c: 43db mvns r3, r3 800302e: 69ba ldr r2, [r7, #24] 8003030: 4013 ands r3, r2 8003032: 61bb str r3, [r7, #24] if ((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00U) 8003034: 683b ldr r3, [r7, #0] 8003036: 685b ldr r3, [r3, #4] 8003038: f403 1300 and.w r3, r3, #2097152 ; 0x200000 800303c: 2b00 cmp r3, #0 800303e: d003 beq.n 8003048 { temp |= iocurrent; 8003040: 69ba ldr r2, [r7, #24] 8003042: 693b ldr r3, [r7, #16] 8003044: 4313 orrs r3, r2 8003046: 61bb str r3, [r7, #24] } EXTI->FTSR1 = temp; 8003048: f04f 42b0 mov.w r2, #1476395008 ; 0x58000000 800304c: 69bb ldr r3, [r7, #24] 800304e: 6053 str r3, [r2, #4] temp = EXTI_CurrentCPU->EMR1; 8003050: 697b ldr r3, [r7, #20] 8003052: 685b ldr r3, [r3, #4] 8003054: 61bb str r3, [r7, #24] temp &= ~(iocurrent); 8003056: 693b ldr r3, [r7, #16] 8003058: 43db mvns r3, r3 800305a: 69ba ldr r2, [r7, #24] 800305c: 4013 ands r3, r2 800305e: 61bb str r3, [r7, #24] if ((GPIO_Init->Mode & EXTI_EVT) != 0x00U) 8003060: 683b ldr r3, [r7, #0] 8003062: 685b ldr r3, [r3, #4] 8003064: f403 3300 and.w r3, r3, #131072 ; 0x20000 8003068: 2b00 cmp r3, #0 800306a: d003 beq.n 8003074 { temp |= iocurrent; 800306c: 69ba ldr r2, [r7, #24] 800306e: 693b ldr r3, [r7, #16] 8003070: 4313 orrs r3, r2 8003072: 61bb str r3, [r7, #24] } EXTI_CurrentCPU->EMR1 = temp; 8003074: 697b ldr r3, [r7, #20] 8003076: 69ba ldr r2, [r7, #24] 8003078: 605a str r2, [r3, #4] /* Clear EXTI line configuration */ temp = EXTI_CurrentCPU->IMR1; 800307a: 697b ldr r3, [r7, #20] 800307c: 681b ldr r3, [r3, #0] 800307e: 61bb str r3, [r7, #24] temp &= ~(iocurrent); 8003080: 693b ldr r3, [r7, #16] 8003082: 43db mvns r3, r3 8003084: 69ba ldr r2, [r7, #24] 8003086: 4013 ands r3, r2 8003088: 61bb str r3, [r7, #24] if ((GPIO_Init->Mode & EXTI_IT) != 0x00U) 800308a: 683b ldr r3, [r7, #0] 800308c: 685b ldr r3, [r3, #4] 800308e: f403 3380 and.w r3, r3, #65536 ; 0x10000 8003092: 2b00 cmp r3, #0 8003094: d003 beq.n 800309e { temp |= iocurrent; 8003096: 69ba ldr r2, [r7, #24] 8003098: 693b ldr r3, [r7, #16] 800309a: 4313 orrs r3, r2 800309c: 61bb str r3, [r7, #24] } EXTI_CurrentCPU->IMR1 = temp; 800309e: 697b ldr r3, [r7, #20] 80030a0: 69ba ldr r2, [r7, #24] 80030a2: 601a str r2, [r3, #0] } } position++; 80030a4: 69fb ldr r3, [r7, #28] 80030a6: 3301 adds r3, #1 80030a8: 61fb str r3, [r7, #28] while (((GPIO_Init->Pin) >> position) != 0x00U) 80030aa: 683b ldr r3, [r7, #0] 80030ac: 681a ldr r2, [r3, #0] 80030ae: 69fb ldr r3, [r7, #28] 80030b0: fa22 f303 lsr.w r3, r2, r3 80030b4: 2b00 cmp r3, #0 80030b6: f47f ae6b bne.w 8002d90 } } 80030ba: bf00 nop 80030bc: bf00 nop 80030be: 3724 adds r7, #36 ; 0x24 80030c0: 46bd mov sp, r7 80030c2: f85d 7b04 ldr.w r7, [sp], #4 80030c6: 4770 bx lr 80030c8: 58000400 .word 0x58000400 080030cc : * PWR_SMPS_2V5_SUPPLIES_EXT are used only for lines that supports SMPS * regulator. * @retval HAL status. */ HAL_StatusTypeDef HAL_PWREx_ConfigSupply (uint32_t SupplySource) { 80030cc: b580 push {r7, lr} 80030ce: b084 sub sp, #16 80030d0: af00 add r7, sp, #0 80030d2: 6078 str r0, [r7, #4] /* Check the parameters */ assert_param (IS_PWR_SUPPLY (SupplySource)); /* Check if supply source was configured */ #if defined (PWR_FLAG_SCUEN) if (__HAL_PWR_GET_FLAG (PWR_FLAG_SCUEN) == 0U) 80030d4: 4b19 ldr r3, [pc, #100] ; (800313c ) 80030d6: 68db ldr r3, [r3, #12] 80030d8: f003 0304 and.w r3, r3, #4 80030dc: 2b04 cmp r3, #4 80030de: d00a beq.n 80030f6 #else if ((PWR->CR3 & (PWR_CR3_SMPSEN | PWR_CR3_LDOEN | PWR_CR3_BYPASS)) != (PWR_CR3_SMPSEN | PWR_CR3_LDOEN)) #endif /* defined (PWR_FLAG_SCUEN) */ { /* Check supply configuration */ if ((PWR->CR3 & PWR_SUPPLY_CONFIG_MASK) != SupplySource) 80030e0: 4b16 ldr r3, [pc, #88] ; (800313c ) 80030e2: 68db ldr r3, [r3, #12] 80030e4: f003 0307 and.w r3, r3, #7 80030e8: 687a ldr r2, [r7, #4] 80030ea: 429a cmp r2, r3 80030ec: d001 beq.n 80030f2 { /* Supply configuration update locked, can't apply a new supply config */ return HAL_ERROR; 80030ee: 2301 movs r3, #1 80030f0: e01f b.n 8003132 else { /* Supply configuration update locked, but new supply configuration matches with old supply configuration : nothing to do */ return HAL_OK; 80030f2: 2300 movs r3, #0 80030f4: e01d b.n 8003132 } } /* Set the power supply configuration */ MODIFY_REG (PWR->CR3, PWR_SUPPLY_CONFIG_MASK, SupplySource); 80030f6: 4b11 ldr r3, [pc, #68] ; (800313c ) 80030f8: 68db ldr r3, [r3, #12] 80030fa: f023 0207 bic.w r2, r3, #7 80030fe: 490f ldr r1, [pc, #60] ; (800313c ) 8003100: 687b ldr r3, [r7, #4] 8003102: 4313 orrs r3, r2 8003104: 60cb str r3, [r1, #12] /* Get tick */ tickstart = HAL_GetTick (); 8003106: f7fd ff81 bl 800100c 800310a: 60f8 str r0, [r7, #12] /* Wait till voltage level flag is set */ while (__HAL_PWR_GET_FLAG (PWR_FLAG_ACTVOSRDY) == 0U) 800310c: e009 b.n 8003122 { if ((HAL_GetTick () - tickstart) > PWR_FLAG_SETTING_DELAY) 800310e: f7fd ff7d bl 800100c 8003112: 4602 mov r2, r0 8003114: 68fb ldr r3, [r7, #12] 8003116: 1ad3 subs r3, r2, r3 8003118: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8 800311c: d901 bls.n 8003122 { return HAL_ERROR; 800311e: 2301 movs r3, #1 8003120: e007 b.n 8003132 while (__HAL_PWR_GET_FLAG (PWR_FLAG_ACTVOSRDY) == 0U) 8003122: 4b06 ldr r3, [pc, #24] ; (800313c ) 8003124: 685b ldr r3, [r3, #4] 8003126: f403 5300 and.w r3, r3, #8192 ; 0x2000 800312a: f5b3 5f00 cmp.w r3, #8192 ; 0x2000 800312e: d1ee bne.n 800310e } } } #endif /* defined (SMPS) */ return HAL_OK; 8003130: 2300 movs r3, #0 } 8003132: 4618 mov r0, r3 8003134: 3710 adds r7, #16 8003136: 46bd mov sp, r7 8003138: bd80 pop {r7, pc} 800313a: bf00 nop 800313c: 58024800 .word 0x58024800 08003140 : * supported by this function. 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) { 8003140: b580 push {r7, lr} 8003142: b08c sub sp, #48 ; 0x30 8003144: af00 add r7, sp, #0 8003146: 6078 str r0, [r7, #4] uint32_t tickstart; uint32_t temp1_pllckcfg, temp2_pllckcfg; /* Check Null pointer */ if (RCC_OscInitStruct == NULL) 8003148: 687b ldr r3, [r7, #4] 800314a: 2b00 cmp r3, #0 800314c: d101 bne.n 8003152 { return HAL_ERROR; 800314e: 2301 movs r3, #1 8003150: e3c8 b.n 80038e4 } /* Check the parameters */ assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType)); /*------------------------------- HSE Configuration ------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE) 8003152: 687b ldr r3, [r7, #4] 8003154: 681b ldr r3, [r3, #0] 8003156: f003 0301 and.w r3, r3, #1 800315a: 2b00 cmp r3, #0 800315c: f000 8087 beq.w 800326e { /* Check the parameters */ assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState)); const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); 8003160: 4b88 ldr r3, [pc, #544] ; (8003384 ) 8003162: 691b ldr r3, [r3, #16] 8003164: f003 0338 and.w r3, r3, #56 ; 0x38 8003168: 62fb str r3, [r7, #44] ; 0x2c const uint32_t temp_pllckselr = RCC->PLLCKSELR; 800316a: 4b86 ldr r3, [pc, #536] ; (8003384 ) 800316c: 6a9b ldr r3, [r3, #40] ; 0x28 800316e: 62bb str r3, [r7, #40] ; 0x28 /* When the HSE is used as system clock or clock source for PLL in these cases HSE will not disabled */ if ((temp_sysclksrc == RCC_CFGR_SWS_HSE) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_HSE))) 8003170: 6afb ldr r3, [r7, #44] ; 0x2c 8003172: 2b10 cmp r3, #16 8003174: d007 beq.n 8003186 8003176: 6afb ldr r3, [r7, #44] ; 0x2c 8003178: 2b18 cmp r3, #24 800317a: d110 bne.n 800319e 800317c: 6abb ldr r3, [r7, #40] ; 0x28 800317e: f003 0303 and.w r3, r3, #3 8003182: 2b02 cmp r3, #2 8003184: d10b bne.n 800319e { if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) 8003186: 4b7f ldr r3, [pc, #508] ; (8003384 ) 8003188: 681b ldr r3, [r3, #0] 800318a: f403 3300 and.w r3, r3, #131072 ; 0x20000 800318e: 2b00 cmp r3, #0 8003190: d06c beq.n 800326c 8003192: 687b ldr r3, [r7, #4] 8003194: 685b ldr r3, [r3, #4] 8003196: 2b00 cmp r3, #0 8003198: d168 bne.n 800326c { return HAL_ERROR; 800319a: 2301 movs r3, #1 800319c: e3a2 b.n 80038e4 } } else { /* Set the new HSE configuration ---------------------------------------*/ __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState); 800319e: 687b ldr r3, [r7, #4] 80031a0: 685b ldr r3, [r3, #4] 80031a2: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 80031a6: d106 bne.n 80031b6 80031a8: 4b76 ldr r3, [pc, #472] ; (8003384 ) 80031aa: 681b ldr r3, [r3, #0] 80031ac: 4a75 ldr r2, [pc, #468] ; (8003384 ) 80031ae: f443 3380 orr.w r3, r3, #65536 ; 0x10000 80031b2: 6013 str r3, [r2, #0] 80031b4: e02e b.n 8003214 80031b6: 687b ldr r3, [r7, #4] 80031b8: 685b ldr r3, [r3, #4] 80031ba: 2b00 cmp r3, #0 80031bc: d10c bne.n 80031d8 80031be: 4b71 ldr r3, [pc, #452] ; (8003384 ) 80031c0: 681b ldr r3, [r3, #0] 80031c2: 4a70 ldr r2, [pc, #448] ; (8003384 ) 80031c4: f423 3380 bic.w r3, r3, #65536 ; 0x10000 80031c8: 6013 str r3, [r2, #0] 80031ca: 4b6e ldr r3, [pc, #440] ; (8003384 ) 80031cc: 681b ldr r3, [r3, #0] 80031ce: 4a6d ldr r2, [pc, #436] ; (8003384 ) 80031d0: f423 2380 bic.w r3, r3, #262144 ; 0x40000 80031d4: 6013 str r3, [r2, #0] 80031d6: e01d b.n 8003214 80031d8: 687b ldr r3, [r7, #4] 80031da: 685b ldr r3, [r3, #4] 80031dc: f5b3 2fa0 cmp.w r3, #327680 ; 0x50000 80031e0: d10c bne.n 80031fc 80031e2: 4b68 ldr r3, [pc, #416] ; (8003384 ) 80031e4: 681b ldr r3, [r3, #0] 80031e6: 4a67 ldr r2, [pc, #412] ; (8003384 ) 80031e8: f443 2380 orr.w r3, r3, #262144 ; 0x40000 80031ec: 6013 str r3, [r2, #0] 80031ee: 4b65 ldr r3, [pc, #404] ; (8003384 ) 80031f0: 681b ldr r3, [r3, #0] 80031f2: 4a64 ldr r2, [pc, #400] ; (8003384 ) 80031f4: f443 3380 orr.w r3, r3, #65536 ; 0x10000 80031f8: 6013 str r3, [r2, #0] 80031fa: e00b b.n 8003214 80031fc: 4b61 ldr r3, [pc, #388] ; (8003384 ) 80031fe: 681b ldr r3, [r3, #0] 8003200: 4a60 ldr r2, [pc, #384] ; (8003384 ) 8003202: f423 3380 bic.w r3, r3, #65536 ; 0x10000 8003206: 6013 str r3, [r2, #0] 8003208: 4b5e ldr r3, [pc, #376] ; (8003384 ) 800320a: 681b ldr r3, [r3, #0] 800320c: 4a5d ldr r2, [pc, #372] ; (8003384 ) 800320e: f423 2380 bic.w r3, r3, #262144 ; 0x40000 8003212: 6013 str r3, [r2, #0] /* Check the HSE State */ if (RCC_OscInitStruct->HSEState != RCC_HSE_OFF) 8003214: 687b ldr r3, [r7, #4] 8003216: 685b ldr r3, [r3, #4] 8003218: 2b00 cmp r3, #0 800321a: d013 beq.n 8003244 { /* Get Start Tick*/ tickstart = HAL_GetTick(); 800321c: f7fd fef6 bl 800100c 8003220: 6278 str r0, [r7, #36] ; 0x24 /* Wait till HSE is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U) 8003222: e008 b.n 8003236 { if ((uint32_t)(HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE) 8003224: f7fd fef2 bl 800100c 8003228: 4602 mov r2, r0 800322a: 6a7b ldr r3, [r7, #36] ; 0x24 800322c: 1ad3 subs r3, r2, r3 800322e: 2b64 cmp r3, #100 ; 0x64 8003230: d901 bls.n 8003236 { return HAL_TIMEOUT; 8003232: 2303 movs r3, #3 8003234: e356 b.n 80038e4 while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U) 8003236: 4b53 ldr r3, [pc, #332] ; (8003384 ) 8003238: 681b ldr r3, [r3, #0] 800323a: f403 3300 and.w r3, r3, #131072 ; 0x20000 800323e: 2b00 cmp r3, #0 8003240: d0f0 beq.n 8003224 8003242: e014 b.n 800326e } } else { /* Get Start Tick*/ tickstart = HAL_GetTick(); 8003244: f7fd fee2 bl 800100c 8003248: 6278 str r0, [r7, #36] ; 0x24 /* Wait till HSE is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) 800324a: e008 b.n 800325e { if ((uint32_t)(HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE) 800324c: f7fd fede bl 800100c 8003250: 4602 mov r2, r0 8003252: 6a7b ldr r3, [r7, #36] ; 0x24 8003254: 1ad3 subs r3, r2, r3 8003256: 2b64 cmp r3, #100 ; 0x64 8003258: d901 bls.n 800325e { return HAL_TIMEOUT; 800325a: 2303 movs r3, #3 800325c: e342 b.n 80038e4 while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) 800325e: 4b49 ldr r3, [pc, #292] ; (8003384 ) 8003260: 681b ldr r3, [r3, #0] 8003262: f403 3300 and.w r3, r3, #131072 ; 0x20000 8003266: 2b00 cmp r3, #0 8003268: d1f0 bne.n 800324c 800326a: e000 b.n 800326e if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) 800326c: bf00 nop } } } } /*----------------------------- HSI Configuration --------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI) 800326e: 687b ldr r3, [r7, #4] 8003270: 681b ldr r3, [r3, #0] 8003272: f003 0302 and.w r3, r3, #2 8003276: 2b00 cmp r3, #0 8003278: f000 808c beq.w 8003394 /* Check the parameters */ assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState)); assert_param(IS_RCC_HSICALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue)); /* When the HSI is used as system clock it will not be disabled */ const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); 800327c: 4b41 ldr r3, [pc, #260] ; (8003384 ) 800327e: 691b ldr r3, [r3, #16] 8003280: f003 0338 and.w r3, r3, #56 ; 0x38 8003284: 623b str r3, [r7, #32] const uint32_t temp_pllckselr = RCC->PLLCKSELR; 8003286: 4b3f ldr r3, [pc, #252] ; (8003384 ) 8003288: 6a9b ldr r3, [r3, #40] ; 0x28 800328a: 61fb str r3, [r7, #28] if ((temp_sysclksrc == RCC_CFGR_SWS_HSI) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_HSI))) 800328c: 6a3b ldr r3, [r7, #32] 800328e: 2b00 cmp r3, #0 8003290: d007 beq.n 80032a2 8003292: 6a3b ldr r3, [r7, #32] 8003294: 2b18 cmp r3, #24 8003296: d137 bne.n 8003308 8003298: 69fb ldr r3, [r7, #28] 800329a: f003 0303 and.w r3, r3, #3 800329e: 2b00 cmp r3, #0 80032a0: d132 bne.n 8003308 { /* When HSI is used as system clock it will not be disabled */ if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF)) 80032a2: 4b38 ldr r3, [pc, #224] ; (8003384 ) 80032a4: 681b ldr r3, [r3, #0] 80032a6: f003 0304 and.w r3, r3, #4 80032aa: 2b00 cmp r3, #0 80032ac: d005 beq.n 80032ba 80032ae: 687b ldr r3, [r7, #4] 80032b0: 68db ldr r3, [r3, #12] 80032b2: 2b00 cmp r3, #0 80032b4: d101 bne.n 80032ba { return HAL_ERROR; 80032b6: 2301 movs r3, #1 80032b8: e314 b.n 80038e4 } /* Otherwise, only HSI division and calibration are allowed */ else { /* Enable the Internal High Speed oscillator (HSI, HSIDIV2, HSIDIV4, or HSIDIV8) */ __HAL_RCC_HSI_CONFIG(RCC_OscInitStruct->HSIState); 80032ba: 4b32 ldr r3, [pc, #200] ; (8003384 ) 80032bc: 681b ldr r3, [r3, #0] 80032be: f023 0219 bic.w r2, r3, #25 80032c2: 687b ldr r3, [r7, #4] 80032c4: 68db ldr r3, [r3, #12] 80032c6: 492f ldr r1, [pc, #188] ; (8003384 ) 80032c8: 4313 orrs r3, r2 80032ca: 600b str r3, [r1, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 80032cc: f7fd fe9e bl 800100c 80032d0: 6278 str r0, [r7, #36] ; 0x24 /* Wait till HSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 80032d2: e008 b.n 80032e6 { if ((uint32_t)(HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) 80032d4: f7fd fe9a bl 800100c 80032d8: 4602 mov r2, r0 80032da: 6a7b ldr r3, [r7, #36] ; 0x24 80032dc: 1ad3 subs r3, r2, r3 80032de: 2b02 cmp r3, #2 80032e0: d901 bls.n 80032e6 { return HAL_TIMEOUT; 80032e2: 2303 movs r3, #3 80032e4: e2fe b.n 80038e4 while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 80032e6: 4b27 ldr r3, [pc, #156] ; (8003384 ) 80032e8: 681b ldr r3, [r3, #0] 80032ea: f003 0304 and.w r3, r3, #4 80032ee: 2b00 cmp r3, #0 80032f0: d0f0 beq.n 80032d4 } } /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 80032f2: 4b24 ldr r3, [pc, #144] ; (8003384 ) 80032f4: 685b ldr r3, [r3, #4] 80032f6: f023 42fe bic.w r2, r3, #2130706432 ; 0x7f000000 80032fa: 687b ldr r3, [r7, #4] 80032fc: 691b ldr r3, [r3, #16] 80032fe: 061b lsls r3, r3, #24 8003300: 4920 ldr r1, [pc, #128] ; (8003384 ) 8003302: 4313 orrs r3, r2 8003304: 604b str r3, [r1, #4] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF)) 8003306: e045 b.n 8003394 } else { /* Check the HSI State */ if ((RCC_OscInitStruct->HSIState) != RCC_HSI_OFF) 8003308: 687b ldr r3, [r7, #4] 800330a: 68db ldr r3, [r3, #12] 800330c: 2b00 cmp r3, #0 800330e: d026 beq.n 800335e { /* Enable the Internal High Speed oscillator (HSI, HSIDIV2,HSIDIV4, or HSIDIV8) */ __HAL_RCC_HSI_CONFIG(RCC_OscInitStruct->HSIState); 8003310: 4b1c ldr r3, [pc, #112] ; (8003384 ) 8003312: 681b ldr r3, [r3, #0] 8003314: f023 0219 bic.w r2, r3, #25 8003318: 687b ldr r3, [r7, #4] 800331a: 68db ldr r3, [r3, #12] 800331c: 4919 ldr r1, [pc, #100] ; (8003384 ) 800331e: 4313 orrs r3, r2 8003320: 600b str r3, [r1, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 8003322: f7fd fe73 bl 800100c 8003326: 6278 str r0, [r7, #36] ; 0x24 /* Wait till HSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 8003328: e008 b.n 800333c { if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) 800332a: f7fd fe6f bl 800100c 800332e: 4602 mov r2, r0 8003330: 6a7b ldr r3, [r7, #36] ; 0x24 8003332: 1ad3 subs r3, r2, r3 8003334: 2b02 cmp r3, #2 8003336: d901 bls.n 800333c { return HAL_TIMEOUT; 8003338: 2303 movs r3, #3 800333a: e2d3 b.n 80038e4 while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 800333c: 4b11 ldr r3, [pc, #68] ; (8003384 ) 800333e: 681b ldr r3, [r3, #0] 8003340: f003 0304 and.w r3, r3, #4 8003344: 2b00 cmp r3, #0 8003346: d0f0 beq.n 800332a } } /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 8003348: 4b0e ldr r3, [pc, #56] ; (8003384 ) 800334a: 685b ldr r3, [r3, #4] 800334c: f023 42fe bic.w r2, r3, #2130706432 ; 0x7f000000 8003350: 687b ldr r3, [r7, #4] 8003352: 691b ldr r3, [r3, #16] 8003354: 061b lsls r3, r3, #24 8003356: 490b ldr r1, [pc, #44] ; (8003384 ) 8003358: 4313 orrs r3, r2 800335a: 604b str r3, [r1, #4] 800335c: e01a b.n 8003394 } else { /* Disable the Internal High Speed oscillator (HSI). */ __HAL_RCC_HSI_DISABLE(); 800335e: 4b09 ldr r3, [pc, #36] ; (8003384 ) 8003360: 681b ldr r3, [r3, #0] 8003362: 4a08 ldr r2, [pc, #32] ; (8003384 ) 8003364: f023 0301 bic.w r3, r3, #1 8003368: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800336a: f7fd fe4f bl 800100c 800336e: 6278 str r0, [r7, #36] ; 0x24 /* Wait till HSI is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) 8003370: e00a b.n 8003388 { if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) 8003372: f7fd fe4b bl 800100c 8003376: 4602 mov r2, r0 8003378: 6a7b ldr r3, [r7, #36] ; 0x24 800337a: 1ad3 subs r3, r2, r3 800337c: 2b02 cmp r3, #2 800337e: d903 bls.n 8003388 { return HAL_TIMEOUT; 8003380: 2303 movs r3, #3 8003382: e2af b.n 80038e4 8003384: 58024400 .word 0x58024400 while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) 8003388: 4b96 ldr r3, [pc, #600] ; (80035e4 ) 800338a: 681b ldr r3, [r3, #0] 800338c: f003 0304 and.w r3, r3, #4 8003390: 2b00 cmp r3, #0 8003392: d1ee bne.n 8003372 } } } } /*----------------------------- CSI Configuration --------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_CSI) == RCC_OSCILLATORTYPE_CSI) 8003394: 687b ldr r3, [r7, #4] 8003396: 681b ldr r3, [r3, #0] 8003398: f003 0310 and.w r3, r3, #16 800339c: 2b00 cmp r3, #0 800339e: d06a beq.n 8003476 /* Check the parameters */ assert_param(IS_RCC_CSI(RCC_OscInitStruct->CSIState)); assert_param(IS_RCC_CSICALIBRATION_VALUE(RCC_OscInitStruct->CSICalibrationValue)); /* When the CSI is used as system clock it will not disabled */ const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); 80033a0: 4b90 ldr r3, [pc, #576] ; (80035e4 ) 80033a2: 691b ldr r3, [r3, #16] 80033a4: f003 0338 and.w r3, r3, #56 ; 0x38 80033a8: 61bb str r3, [r7, #24] const uint32_t temp_pllckselr = RCC->PLLCKSELR; 80033aa: 4b8e ldr r3, [pc, #568] ; (80035e4 ) 80033ac: 6a9b ldr r3, [r3, #40] ; 0x28 80033ae: 617b str r3, [r7, #20] if ((temp_sysclksrc == RCC_CFGR_SWS_CSI) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_CSI))) 80033b0: 69bb ldr r3, [r7, #24] 80033b2: 2b08 cmp r3, #8 80033b4: d007 beq.n 80033c6 80033b6: 69bb ldr r3, [r7, #24] 80033b8: 2b18 cmp r3, #24 80033ba: d11b bne.n 80033f4 80033bc: 697b ldr r3, [r7, #20] 80033be: f003 0303 and.w r3, r3, #3 80033c2: 2b01 cmp r3, #1 80033c4: d116 bne.n 80033f4 { /* When CSI is used as system clock it will not disabled */ if ((__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) && (RCC_OscInitStruct->CSIState != RCC_CSI_ON)) 80033c6: 4b87 ldr r3, [pc, #540] ; (80035e4 ) 80033c8: 681b ldr r3, [r3, #0] 80033ca: f403 7380 and.w r3, r3, #256 ; 0x100 80033ce: 2b00 cmp r3, #0 80033d0: d005 beq.n 80033de 80033d2: 687b ldr r3, [r7, #4] 80033d4: 69db ldr r3, [r3, #28] 80033d6: 2b80 cmp r3, #128 ; 0x80 80033d8: d001 beq.n 80033de { return HAL_ERROR; 80033da: 2301 movs r3, #1 80033dc: e282 b.n 80038e4 } /* Otherwise, just the calibration is allowed */ else { /* Adjusts the Internal High Speed oscillator (CSI) calibration value.*/ __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue); 80033de: 4b81 ldr r3, [pc, #516] ; (80035e4 ) 80033e0: 68db ldr r3, [r3, #12] 80033e2: f023 527c bic.w r2, r3, #1056964608 ; 0x3f000000 80033e6: 687b ldr r3, [r7, #4] 80033e8: 6a1b ldr r3, [r3, #32] 80033ea: 061b lsls r3, r3, #24 80033ec: 497d ldr r1, [pc, #500] ; (80035e4 ) 80033ee: 4313 orrs r3, r2 80033f0: 60cb str r3, [r1, #12] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) && (RCC_OscInitStruct->CSIState != RCC_CSI_ON)) 80033f2: e040 b.n 8003476 } } else { /* Check the CSI State */ if ((RCC_OscInitStruct->CSIState) != RCC_CSI_OFF) 80033f4: 687b ldr r3, [r7, #4] 80033f6: 69db ldr r3, [r3, #28] 80033f8: 2b00 cmp r3, #0 80033fa: d023 beq.n 8003444 { /* Enable the Internal High Speed oscillator (CSI). */ __HAL_RCC_CSI_ENABLE(); 80033fc: 4b79 ldr r3, [pc, #484] ; (80035e4 ) 80033fe: 681b ldr r3, [r3, #0] 8003400: 4a78 ldr r2, [pc, #480] ; (80035e4 ) 8003402: f043 0380 orr.w r3, r3, #128 ; 0x80 8003406: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 8003408: f7fd fe00 bl 800100c 800340c: 6278 str r0, [r7, #36] ; 0x24 /* Wait till CSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U) 800340e: e008 b.n 8003422 { if ((HAL_GetTick() - tickstart) > CSI_TIMEOUT_VALUE) 8003410: f7fd fdfc bl 800100c 8003414: 4602 mov r2, r0 8003416: 6a7b ldr r3, [r7, #36] ; 0x24 8003418: 1ad3 subs r3, r2, r3 800341a: 2b02 cmp r3, #2 800341c: d901 bls.n 8003422 { return HAL_TIMEOUT; 800341e: 2303 movs r3, #3 8003420: e260 b.n 80038e4 while (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U) 8003422: 4b70 ldr r3, [pc, #448] ; (80035e4 ) 8003424: 681b ldr r3, [r3, #0] 8003426: f403 7380 and.w r3, r3, #256 ; 0x100 800342a: 2b00 cmp r3, #0 800342c: d0f0 beq.n 8003410 } } /* Adjusts the Internal High Speed oscillator (CSI) calibration value.*/ __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue); 800342e: 4b6d ldr r3, [pc, #436] ; (80035e4 ) 8003430: 68db ldr r3, [r3, #12] 8003432: f023 527c bic.w r2, r3, #1056964608 ; 0x3f000000 8003436: 687b ldr r3, [r7, #4] 8003438: 6a1b ldr r3, [r3, #32] 800343a: 061b lsls r3, r3, #24 800343c: 4969 ldr r1, [pc, #420] ; (80035e4 ) 800343e: 4313 orrs r3, r2 8003440: 60cb str r3, [r1, #12] 8003442: e018 b.n 8003476 } else { /* Disable the Internal High Speed oscillator (CSI). */ __HAL_RCC_CSI_DISABLE(); 8003444: 4b67 ldr r3, [pc, #412] ; (80035e4 ) 8003446: 681b ldr r3, [r3, #0] 8003448: 4a66 ldr r2, [pc, #408] ; (80035e4 ) 800344a: f023 0380 bic.w r3, r3, #128 ; 0x80 800344e: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 8003450: f7fd fddc bl 800100c 8003454: 6278 str r0, [r7, #36] ; 0x24 /* Wait till CSI is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) 8003456: e008 b.n 800346a { if ((HAL_GetTick() - tickstart) > CSI_TIMEOUT_VALUE) 8003458: f7fd fdd8 bl 800100c 800345c: 4602 mov r2, r0 800345e: 6a7b ldr r3, [r7, #36] ; 0x24 8003460: 1ad3 subs r3, r2, r3 8003462: 2b02 cmp r3, #2 8003464: d901 bls.n 800346a { return HAL_TIMEOUT; 8003466: 2303 movs r3, #3 8003468: e23c b.n 80038e4 while (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) 800346a: 4b5e ldr r3, [pc, #376] ; (80035e4 ) 800346c: 681b ldr r3, [r3, #0] 800346e: f403 7380 and.w r3, r3, #256 ; 0x100 8003472: 2b00 cmp r3, #0 8003474: d1f0 bne.n 8003458 } } } } /*------------------------------ LSI Configuration -------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI) 8003476: 687b ldr r3, [r7, #4] 8003478: 681b ldr r3, [r3, #0] 800347a: f003 0308 and.w r3, r3, #8 800347e: 2b00 cmp r3, #0 8003480: d036 beq.n 80034f0 { /* Check the parameters */ assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState)); /* Check the LSI State */ if ((RCC_OscInitStruct->LSIState) != RCC_LSI_OFF) 8003482: 687b ldr r3, [r7, #4] 8003484: 695b ldr r3, [r3, #20] 8003486: 2b00 cmp r3, #0 8003488: d019 beq.n 80034be { /* Enable the Internal Low Speed oscillator (LSI). */ __HAL_RCC_LSI_ENABLE(); 800348a: 4b56 ldr r3, [pc, #344] ; (80035e4 ) 800348c: 6f5b ldr r3, [r3, #116] ; 0x74 800348e: 4a55 ldr r2, [pc, #340] ; (80035e4 ) 8003490: f043 0301 orr.w r3, r3, #1 8003494: 6753 str r3, [r2, #116] ; 0x74 /* Get Start Tick*/ tickstart = HAL_GetTick(); 8003496: f7fd fdb9 bl 800100c 800349a: 6278 str r0, [r7, #36] ; 0x24 /* Wait till LSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == 0U) 800349c: e008 b.n 80034b0 { if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE) 800349e: f7fd fdb5 bl 800100c 80034a2: 4602 mov r2, r0 80034a4: 6a7b ldr r3, [r7, #36] ; 0x24 80034a6: 1ad3 subs r3, r2, r3 80034a8: 2b02 cmp r3, #2 80034aa: d901 bls.n 80034b0 { return HAL_TIMEOUT; 80034ac: 2303 movs r3, #3 80034ae: e219 b.n 80038e4 while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == 0U) 80034b0: 4b4c ldr r3, [pc, #304] ; (80035e4 ) 80034b2: 6f5b ldr r3, [r3, #116] ; 0x74 80034b4: f003 0302 and.w r3, r3, #2 80034b8: 2b00 cmp r3, #0 80034ba: d0f0 beq.n 800349e 80034bc: e018 b.n 80034f0 } } else { /* Disable the Internal Low Speed oscillator (LSI). */ __HAL_RCC_LSI_DISABLE(); 80034be: 4b49 ldr r3, [pc, #292] ; (80035e4 ) 80034c0: 6f5b ldr r3, [r3, #116] ; 0x74 80034c2: 4a48 ldr r2, [pc, #288] ; (80035e4 ) 80034c4: f023 0301 bic.w r3, r3, #1 80034c8: 6753 str r3, [r2, #116] ; 0x74 /* Get Start Tick*/ tickstart = HAL_GetTick(); 80034ca: f7fd fd9f bl 800100c 80034ce: 6278 str r0, [r7, #36] ; 0x24 /* Wait till LSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != 0U) 80034d0: e008 b.n 80034e4 { if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE) 80034d2: f7fd fd9b bl 800100c 80034d6: 4602 mov r2, r0 80034d8: 6a7b ldr r3, [r7, #36] ; 0x24 80034da: 1ad3 subs r3, r2, r3 80034dc: 2b02 cmp r3, #2 80034de: d901 bls.n 80034e4 { return HAL_TIMEOUT; 80034e0: 2303 movs r3, #3 80034e2: e1ff b.n 80038e4 while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != 0U) 80034e4: 4b3f ldr r3, [pc, #252] ; (80035e4 ) 80034e6: 6f5b ldr r3, [r3, #116] ; 0x74 80034e8: f003 0302 and.w r3, r3, #2 80034ec: 2b00 cmp r3, #0 80034ee: d1f0 bne.n 80034d2 } } } /*------------------------------ HSI48 Configuration -------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI48) == RCC_OSCILLATORTYPE_HSI48) 80034f0: 687b ldr r3, [r7, #4] 80034f2: 681b ldr r3, [r3, #0] 80034f4: f003 0320 and.w r3, r3, #32 80034f8: 2b00 cmp r3, #0 80034fa: d036 beq.n 800356a { /* Check the parameters */ assert_param(IS_RCC_HSI48(RCC_OscInitStruct->HSI48State)); /* Check the HSI48 State */ if ((RCC_OscInitStruct->HSI48State) != RCC_HSI48_OFF) 80034fc: 687b ldr r3, [r7, #4] 80034fe: 699b ldr r3, [r3, #24] 8003500: 2b00 cmp r3, #0 8003502: d019 beq.n 8003538 { /* Enable the Internal Low Speed oscillator (HSI48). */ __HAL_RCC_HSI48_ENABLE(); 8003504: 4b37 ldr r3, [pc, #220] ; (80035e4 ) 8003506: 681b ldr r3, [r3, #0] 8003508: 4a36 ldr r2, [pc, #216] ; (80035e4 ) 800350a: f443 5380 orr.w r3, r3, #4096 ; 0x1000 800350e: 6013 str r3, [r2, #0] /* Get time-out */ tickstart = HAL_GetTick(); 8003510: f7fd fd7c bl 800100c 8003514: 6278 str r0, [r7, #36] ; 0x24 /* Wait till HSI48 is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) == 0U) 8003516: e008 b.n 800352a { if ((HAL_GetTick() - tickstart) > HSI48_TIMEOUT_VALUE) 8003518: f7fd fd78 bl 800100c 800351c: 4602 mov r2, r0 800351e: 6a7b ldr r3, [r7, #36] ; 0x24 8003520: 1ad3 subs r3, r2, r3 8003522: 2b02 cmp r3, #2 8003524: d901 bls.n 800352a { return HAL_TIMEOUT; 8003526: 2303 movs r3, #3 8003528: e1dc b.n 80038e4 while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) == 0U) 800352a: 4b2e ldr r3, [pc, #184] ; (80035e4 ) 800352c: 681b ldr r3, [r3, #0] 800352e: f403 5300 and.w r3, r3, #8192 ; 0x2000 8003532: 2b00 cmp r3, #0 8003534: d0f0 beq.n 8003518 8003536: e018 b.n 800356a } } else { /* Disable the Internal Low Speed oscillator (HSI48). */ __HAL_RCC_HSI48_DISABLE(); 8003538: 4b2a ldr r3, [pc, #168] ; (80035e4 ) 800353a: 681b ldr r3, [r3, #0] 800353c: 4a29 ldr r2, [pc, #164] ; (80035e4 ) 800353e: f423 5380 bic.w r3, r3, #4096 ; 0x1000 8003542: 6013 str r3, [r2, #0] /* Get time-out */ tickstart = HAL_GetTick(); 8003544: f7fd fd62 bl 800100c 8003548: 6278 str r0, [r7, #36] ; 0x24 /* Wait till HSI48 is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) != 0U) 800354a: e008 b.n 800355e { if ((HAL_GetTick() - tickstart) > HSI48_TIMEOUT_VALUE) 800354c: f7fd fd5e bl 800100c 8003550: 4602 mov r2, r0 8003552: 6a7b ldr r3, [r7, #36] ; 0x24 8003554: 1ad3 subs r3, r2, r3 8003556: 2b02 cmp r3, #2 8003558: d901 bls.n 800355e { return HAL_TIMEOUT; 800355a: 2303 movs r3, #3 800355c: e1c2 b.n 80038e4 while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) != 0U) 800355e: 4b21 ldr r3, [pc, #132] ; (80035e4 ) 8003560: 681b ldr r3, [r3, #0] 8003562: f403 5300 and.w r3, r3, #8192 ; 0x2000 8003566: 2b00 cmp r3, #0 8003568: d1f0 bne.n 800354c } } } } /*------------------------------ LSE Configuration -------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE) 800356a: 687b ldr r3, [r7, #4] 800356c: 681b ldr r3, [r3, #0] 800356e: f003 0304 and.w r3, r3, #4 8003572: 2b00 cmp r3, #0 8003574: f000 8086 beq.w 8003684 { /* Check the parameters */ assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState)); /* Enable write access to Backup domain */ PWR->CR1 |= PWR_CR1_DBP; 8003578: 4b1b ldr r3, [pc, #108] ; (80035e8 ) 800357a: 681b ldr r3, [r3, #0] 800357c: 4a1a ldr r2, [pc, #104] ; (80035e8 ) 800357e: f443 7380 orr.w r3, r3, #256 ; 0x100 8003582: 6013 str r3, [r2, #0] /* Wait for Backup domain Write protection disable */ tickstart = HAL_GetTick(); 8003584: f7fd fd42 bl 800100c 8003588: 6278 str r0, [r7, #36] ; 0x24 while ((PWR->CR1 & PWR_CR1_DBP) == 0U) 800358a: e008 b.n 800359e { if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE) 800358c: f7fd fd3e bl 800100c 8003590: 4602 mov r2, r0 8003592: 6a7b ldr r3, [r7, #36] ; 0x24 8003594: 1ad3 subs r3, r2, r3 8003596: 2b64 cmp r3, #100 ; 0x64 8003598: d901 bls.n 800359e { return HAL_TIMEOUT; 800359a: 2303 movs r3, #3 800359c: e1a2 b.n 80038e4 while ((PWR->CR1 & PWR_CR1_DBP) == 0U) 800359e: 4b12 ldr r3, [pc, #72] ; (80035e8 ) 80035a0: 681b ldr r3, [r3, #0] 80035a2: f403 7380 and.w r3, r3, #256 ; 0x100 80035a6: 2b00 cmp r3, #0 80035a8: d0f0 beq.n 800358c } } /* Set the new LSE configuration -----------------------------------------*/ __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState); 80035aa: 687b ldr r3, [r7, #4] 80035ac: 689b ldr r3, [r3, #8] 80035ae: 2b01 cmp r3, #1 80035b0: d106 bne.n 80035c0 80035b2: 4b0c ldr r3, [pc, #48] ; (80035e4 ) 80035b4: 6f1b ldr r3, [r3, #112] ; 0x70 80035b6: 4a0b ldr r2, [pc, #44] ; (80035e4 ) 80035b8: f043 0301 orr.w r3, r3, #1 80035bc: 6713 str r3, [r2, #112] ; 0x70 80035be: e032 b.n 8003626 80035c0: 687b ldr r3, [r7, #4] 80035c2: 689b ldr r3, [r3, #8] 80035c4: 2b00 cmp r3, #0 80035c6: d111 bne.n 80035ec 80035c8: 4b06 ldr r3, [pc, #24] ; (80035e4 ) 80035ca: 6f1b ldr r3, [r3, #112] ; 0x70 80035cc: 4a05 ldr r2, [pc, #20] ; (80035e4 ) 80035ce: f023 0301 bic.w r3, r3, #1 80035d2: 6713 str r3, [r2, #112] ; 0x70 80035d4: 4b03 ldr r3, [pc, #12] ; (80035e4 ) 80035d6: 6f1b ldr r3, [r3, #112] ; 0x70 80035d8: 4a02 ldr r2, [pc, #8] ; (80035e4 ) 80035da: f023 0304 bic.w r3, r3, #4 80035de: 6713 str r3, [r2, #112] ; 0x70 80035e0: e021 b.n 8003626 80035e2: bf00 nop 80035e4: 58024400 .word 0x58024400 80035e8: 58024800 .word 0x58024800 80035ec: 687b ldr r3, [r7, #4] 80035ee: 689b ldr r3, [r3, #8] 80035f0: 2b05 cmp r3, #5 80035f2: d10c bne.n 800360e 80035f4: 4b83 ldr r3, [pc, #524] ; (8003804 ) 80035f6: 6f1b ldr r3, [r3, #112] ; 0x70 80035f8: 4a82 ldr r2, [pc, #520] ; (8003804 ) 80035fa: f043 0304 orr.w r3, r3, #4 80035fe: 6713 str r3, [r2, #112] ; 0x70 8003600: 4b80 ldr r3, [pc, #512] ; (8003804 ) 8003602: 6f1b ldr r3, [r3, #112] ; 0x70 8003604: 4a7f ldr r2, [pc, #508] ; (8003804 ) 8003606: f043 0301 orr.w r3, r3, #1 800360a: 6713 str r3, [r2, #112] ; 0x70 800360c: e00b b.n 8003626 800360e: 4b7d ldr r3, [pc, #500] ; (8003804 ) 8003610: 6f1b ldr r3, [r3, #112] ; 0x70 8003612: 4a7c ldr r2, [pc, #496] ; (8003804 ) 8003614: f023 0301 bic.w r3, r3, #1 8003618: 6713 str r3, [r2, #112] ; 0x70 800361a: 4b7a ldr r3, [pc, #488] ; (8003804 ) 800361c: 6f1b ldr r3, [r3, #112] ; 0x70 800361e: 4a79 ldr r2, [pc, #484] ; (8003804 ) 8003620: f023 0304 bic.w r3, r3, #4 8003624: 6713 str r3, [r2, #112] ; 0x70 /* Check the LSE State */ if ((RCC_OscInitStruct->LSEState) != RCC_LSE_OFF) 8003626: 687b ldr r3, [r7, #4] 8003628: 689b ldr r3, [r3, #8] 800362a: 2b00 cmp r3, #0 800362c: d015 beq.n 800365a { /* Get Start Tick*/ tickstart = HAL_GetTick(); 800362e: f7fd fced bl 800100c 8003632: 6278 str r0, [r7, #36] ; 0x24 /* Wait till LSE is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U) 8003634: e00a b.n 800364c { if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 8003636: f7fd fce9 bl 800100c 800363a: 4602 mov r2, r0 800363c: 6a7b ldr r3, [r7, #36] ; 0x24 800363e: 1ad3 subs r3, r2, r3 8003640: f241 3288 movw r2, #5000 ; 0x1388 8003644: 4293 cmp r3, r2 8003646: d901 bls.n 800364c { return HAL_TIMEOUT; 8003648: 2303 movs r3, #3 800364a: e14b b.n 80038e4 while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U) 800364c: 4b6d ldr r3, [pc, #436] ; (8003804 ) 800364e: 6f1b ldr r3, [r3, #112] ; 0x70 8003650: f003 0302 and.w r3, r3, #2 8003654: 2b00 cmp r3, #0 8003656: d0ee beq.n 8003636 8003658: e014 b.n 8003684 } } else { /* Get Start Tick*/ tickstart = HAL_GetTick(); 800365a: f7fd fcd7 bl 800100c 800365e: 6278 str r0, [r7, #36] ; 0x24 /* Wait till LSE is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != 0U) 8003660: e00a b.n 8003678 { if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 8003662: f7fd fcd3 bl 800100c 8003666: 4602 mov r2, r0 8003668: 6a7b ldr r3, [r7, #36] ; 0x24 800366a: 1ad3 subs r3, r2, r3 800366c: f241 3288 movw r2, #5000 ; 0x1388 8003670: 4293 cmp r3, r2 8003672: d901 bls.n 8003678 { return HAL_TIMEOUT; 8003674: 2303 movs r3, #3 8003676: e135 b.n 80038e4 while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != 0U) 8003678: 4b62 ldr r3, [pc, #392] ; (8003804 ) 800367a: 6f1b ldr r3, [r3, #112] ; 0x70 800367c: f003 0302 and.w r3, r3, #2 8003680: 2b00 cmp r3, #0 8003682: d1ee bne.n 8003662 } } /*-------------------------------- PLL Configuration -----------------------*/ /* Check the parameters */ assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState)); if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE) 8003684: 687b ldr r3, [r7, #4] 8003686: 6a5b ldr r3, [r3, #36] ; 0x24 8003688: 2b00 cmp r3, #0 800368a: f000 812a beq.w 80038e2 { /* Check if the PLL is used as system clock or not */ if (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_CFGR_SWS_PLL1) 800368e: 4b5d ldr r3, [pc, #372] ; (8003804 ) 8003690: 691b ldr r3, [r3, #16] 8003692: f003 0338 and.w r3, r3, #56 ; 0x38 8003696: 2b18 cmp r3, #24 8003698: f000 80ba beq.w 8003810 { if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON) 800369c: 687b ldr r3, [r7, #4] 800369e: 6a5b ldr r3, [r3, #36] ; 0x24 80036a0: 2b02 cmp r3, #2 80036a2: f040 8095 bne.w 80037d0 assert_param(IS_RCC_PLLQ_VALUE(RCC_OscInitStruct->PLL.PLLQ)); assert_param(IS_RCC_PLLR_VALUE(RCC_OscInitStruct->PLL.PLLR)); assert_param(IS_RCC_PLLFRACN_VALUE(RCC_OscInitStruct->PLL.PLLFRACN)); /* Disable the main PLL. */ __HAL_RCC_PLL_DISABLE(); 80036a6: 4b57 ldr r3, [pc, #348] ; (8003804 ) 80036a8: 681b ldr r3, [r3, #0] 80036aa: 4a56 ldr r2, [pc, #344] ; (8003804 ) 80036ac: f023 7380 bic.w r3, r3, #16777216 ; 0x1000000 80036b0: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 80036b2: f7fd fcab bl 800100c 80036b6: 6278 str r0, [r7, #36] ; 0x24 /* Wait till PLL is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 80036b8: e008 b.n 80036cc { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 80036ba: f7fd fca7 bl 800100c 80036be: 4602 mov r2, r0 80036c0: 6a7b ldr r3, [r7, #36] ; 0x24 80036c2: 1ad3 subs r3, r2, r3 80036c4: 2b02 cmp r3, #2 80036c6: d901 bls.n 80036cc { return HAL_TIMEOUT; 80036c8: 2303 movs r3, #3 80036ca: e10b b.n 80038e4 while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 80036cc: 4b4d ldr r3, [pc, #308] ; (8003804 ) 80036ce: 681b ldr r3, [r3, #0] 80036d0: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 80036d4: 2b00 cmp r3, #0 80036d6: d1f0 bne.n 80036ba } } /* Configure the main PLL clock source, multiplication and division factors. */ __HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource, 80036d8: 4b4a ldr r3, [pc, #296] ; (8003804 ) 80036da: 6a9a ldr r2, [r3, #40] ; 0x28 80036dc: 4b4a ldr r3, [pc, #296] ; (8003808 ) 80036de: 4013 ands r3, r2 80036e0: 687a ldr r2, [r7, #4] 80036e2: 6a91 ldr r1, [r2, #40] ; 0x28 80036e4: 687a ldr r2, [r7, #4] 80036e6: 6ad2 ldr r2, [r2, #44] ; 0x2c 80036e8: 0112 lsls r2, r2, #4 80036ea: 430a orrs r2, r1 80036ec: 4945 ldr r1, [pc, #276] ; (8003804 ) 80036ee: 4313 orrs r3, r2 80036f0: 628b str r3, [r1, #40] ; 0x28 80036f2: 687b ldr r3, [r7, #4] 80036f4: 6b1b ldr r3, [r3, #48] ; 0x30 80036f6: 3b01 subs r3, #1 80036f8: f3c3 0208 ubfx r2, r3, #0, #9 80036fc: 687b ldr r3, [r7, #4] 80036fe: 6b5b ldr r3, [r3, #52] ; 0x34 8003700: 3b01 subs r3, #1 8003702: 025b lsls r3, r3, #9 8003704: b29b uxth r3, r3 8003706: 431a orrs r2, r3 8003708: 687b ldr r3, [r7, #4] 800370a: 6b9b ldr r3, [r3, #56] ; 0x38 800370c: 3b01 subs r3, #1 800370e: 041b lsls r3, r3, #16 8003710: f403 03fe and.w r3, r3, #8323072 ; 0x7f0000 8003714: 431a orrs r2, r3 8003716: 687b ldr r3, [r7, #4] 8003718: 6bdb ldr r3, [r3, #60] ; 0x3c 800371a: 3b01 subs r3, #1 800371c: 061b lsls r3, r3, #24 800371e: f003 43fe and.w r3, r3, #2130706432 ; 0x7f000000 8003722: 4938 ldr r1, [pc, #224] ; (8003804 ) 8003724: 4313 orrs r3, r2 8003726: 630b str r3, [r1, #48] ; 0x30 RCC_OscInitStruct->PLL.PLLP, RCC_OscInitStruct->PLL.PLLQ, RCC_OscInitStruct->PLL.PLLR); /* Disable PLLFRACN . */ __HAL_RCC_PLLFRACN_DISABLE(); 8003728: 4b36 ldr r3, [pc, #216] ; (8003804 ) 800372a: 6adb ldr r3, [r3, #44] ; 0x2c 800372c: 4a35 ldr r2, [pc, #212] ; (8003804 ) 800372e: f023 0301 bic.w r3, r3, #1 8003732: 62d3 str r3, [r2, #44] ; 0x2c /* Configure PLL PLL1FRACN */ __HAL_RCC_PLLFRACN_CONFIG(RCC_OscInitStruct->PLL.PLLFRACN); 8003734: 4b33 ldr r3, [pc, #204] ; (8003804 ) 8003736: 6b5a ldr r2, [r3, #52] ; 0x34 8003738: 4b34 ldr r3, [pc, #208] ; (800380c ) 800373a: 4013 ands r3, r2 800373c: 687a ldr r2, [r7, #4] 800373e: 6c92 ldr r2, [r2, #72] ; 0x48 8003740: 00d2 lsls r2, r2, #3 8003742: 4930 ldr r1, [pc, #192] ; (8003804 ) 8003744: 4313 orrs r3, r2 8003746: 634b str r3, [r1, #52] ; 0x34 /* Select PLL1 input reference frequency range: VCI */ __HAL_RCC_PLL_VCIRANGE(RCC_OscInitStruct->PLL.PLLRGE) ; 8003748: 4b2e ldr r3, [pc, #184] ; (8003804 ) 800374a: 6adb ldr r3, [r3, #44] ; 0x2c 800374c: f023 020c bic.w r2, r3, #12 8003750: 687b ldr r3, [r7, #4] 8003752: 6c1b ldr r3, [r3, #64] ; 0x40 8003754: 492b ldr r1, [pc, #172] ; (8003804 ) 8003756: 4313 orrs r3, r2 8003758: 62cb str r3, [r1, #44] ; 0x2c /* Select PLL1 output frequency range : VCO */ __HAL_RCC_PLL_VCORANGE(RCC_OscInitStruct->PLL.PLLVCOSEL) ; 800375a: 4b2a ldr r3, [pc, #168] ; (8003804 ) 800375c: 6adb ldr r3, [r3, #44] ; 0x2c 800375e: f023 0202 bic.w r2, r3, #2 8003762: 687b ldr r3, [r7, #4] 8003764: 6c5b ldr r3, [r3, #68] ; 0x44 8003766: 4927 ldr r1, [pc, #156] ; (8003804 ) 8003768: 4313 orrs r3, r2 800376a: 62cb str r3, [r1, #44] ; 0x2c /* Enable PLL System Clock output. */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVP); 800376c: 4b25 ldr r3, [pc, #148] ; (8003804 ) 800376e: 6adb ldr r3, [r3, #44] ; 0x2c 8003770: 4a24 ldr r2, [pc, #144] ; (8003804 ) 8003772: f443 3380 orr.w r3, r3, #65536 ; 0x10000 8003776: 62d3 str r3, [r2, #44] ; 0x2c /* Enable PLL1Q Clock output. */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ); 8003778: 4b22 ldr r3, [pc, #136] ; (8003804 ) 800377a: 6adb ldr r3, [r3, #44] ; 0x2c 800377c: 4a21 ldr r2, [pc, #132] ; (8003804 ) 800377e: f443 3300 orr.w r3, r3, #131072 ; 0x20000 8003782: 62d3 str r3, [r2, #44] ; 0x2c /* Enable PLL1R Clock output. */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVR); 8003784: 4b1f ldr r3, [pc, #124] ; (8003804 ) 8003786: 6adb ldr r3, [r3, #44] ; 0x2c 8003788: 4a1e ldr r2, [pc, #120] ; (8003804 ) 800378a: f443 2380 orr.w r3, r3, #262144 ; 0x40000 800378e: 62d3 str r3, [r2, #44] ; 0x2c /* Enable PLL1FRACN . */ __HAL_RCC_PLLFRACN_ENABLE(); 8003790: 4b1c ldr r3, [pc, #112] ; (8003804 ) 8003792: 6adb ldr r3, [r3, #44] ; 0x2c 8003794: 4a1b ldr r2, [pc, #108] ; (8003804 ) 8003796: f043 0301 orr.w r3, r3, #1 800379a: 62d3 str r3, [r2, #44] ; 0x2c /* Enable the main PLL. */ __HAL_RCC_PLL_ENABLE(); 800379c: 4b19 ldr r3, [pc, #100] ; (8003804 ) 800379e: 681b ldr r3, [r3, #0] 80037a0: 4a18 ldr r2, [pc, #96] ; (8003804 ) 80037a2: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000 80037a6: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 80037a8: f7fd fc30 bl 800100c 80037ac: 6278 str r0, [r7, #36] ; 0x24 /* Wait till PLL is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U) 80037ae: e008 b.n 80037c2 { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 80037b0: f7fd fc2c bl 800100c 80037b4: 4602 mov r2, r0 80037b6: 6a7b ldr r3, [r7, #36] ; 0x24 80037b8: 1ad3 subs r3, r2, r3 80037ba: 2b02 cmp r3, #2 80037bc: d901 bls.n 80037c2 { return HAL_TIMEOUT; 80037be: 2303 movs r3, #3 80037c0: e090 b.n 80038e4 while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U) 80037c2: 4b10 ldr r3, [pc, #64] ; (8003804 ) 80037c4: 681b ldr r3, [r3, #0] 80037c6: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 80037ca: 2b00 cmp r3, #0 80037cc: d0f0 beq.n 80037b0 80037ce: e088 b.n 80038e2 } } else { /* Disable the main PLL. */ __HAL_RCC_PLL_DISABLE(); 80037d0: 4b0c ldr r3, [pc, #48] ; (8003804 ) 80037d2: 681b ldr r3, [r3, #0] 80037d4: 4a0b ldr r2, [pc, #44] ; (8003804 ) 80037d6: f023 7380 bic.w r3, r3, #16777216 ; 0x1000000 80037da: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 80037dc: f7fd fc16 bl 800100c 80037e0: 6278 str r0, [r7, #36] ; 0x24 /* Wait till PLL is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 80037e2: e008 b.n 80037f6 { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 80037e4: f7fd fc12 bl 800100c 80037e8: 4602 mov r2, r0 80037ea: 6a7b ldr r3, [r7, #36] ; 0x24 80037ec: 1ad3 subs r3, r2, r3 80037ee: 2b02 cmp r3, #2 80037f0: d901 bls.n 80037f6 { return HAL_TIMEOUT; 80037f2: 2303 movs r3, #3 80037f4: e076 b.n 80038e4 while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 80037f6: 4b03 ldr r3, [pc, #12] ; (8003804 ) 80037f8: 681b ldr r3, [r3, #0] 80037fa: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 80037fe: 2b00 cmp r3, #0 8003800: d1f0 bne.n 80037e4 8003802: e06e b.n 80038e2 8003804: 58024400 .word 0x58024400 8003808: fffffc0c .word 0xfffffc0c 800380c: ffff0007 .word 0xffff0007 } } else { /* Do not return HAL_ERROR if request repeats the current configuration */ temp1_pllckcfg = RCC->PLLCKSELR; 8003810: 4b36 ldr r3, [pc, #216] ; (80038ec ) 8003812: 6a9b ldr r3, [r3, #40] ; 0x28 8003814: 613b str r3, [r7, #16] temp2_pllckcfg = RCC->PLL1DIVR; 8003816: 4b35 ldr r3, [pc, #212] ; (80038ec ) 8003818: 6b1b ldr r3, [r3, #48] ; 0x30 800381a: 60fb str r3, [r7, #12] if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) || 800381c: 687b ldr r3, [r7, #4] 800381e: 6a5b ldr r3, [r3, #36] ; 0x24 8003820: 2b01 cmp r3, #1 8003822: d031 beq.n 8003888 (READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || 8003824: 693b ldr r3, [r7, #16] 8003826: f003 0203 and.w r2, r3, #3 800382a: 687b ldr r3, [r7, #4] 800382c: 6a9b ldr r3, [r3, #40] ; 0x28 if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) || 800382e: 429a cmp r2, r3 8003830: d12a bne.n 8003888 ((READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_DIVM1) >> RCC_PLLCKSELR_DIVM1_Pos) != RCC_OscInitStruct->PLL.PLLM) || 8003832: 693b ldr r3, [r7, #16] 8003834: 091b lsrs r3, r3, #4 8003836: f003 023f and.w r2, r3, #63 ; 0x3f 800383a: 687b ldr r3, [r7, #4] 800383c: 6adb ldr r3, [r3, #44] ; 0x2c (READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || 800383e: 429a cmp r2, r3 8003840: d122 bne.n 8003888 (READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_N1) != (RCC_OscInitStruct->PLL.PLLN - 1U)) || 8003842: 68fb ldr r3, [r7, #12] 8003844: f3c3 0208 ubfx r2, r3, #0, #9 8003848: 687b ldr r3, [r7, #4] 800384a: 6b1b ldr r3, [r3, #48] ; 0x30 800384c: 3b01 subs r3, #1 ((READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_DIVM1) >> RCC_PLLCKSELR_DIVM1_Pos) != RCC_OscInitStruct->PLL.PLLM) || 800384e: 429a cmp r2, r3 8003850: d11a bne.n 8003888 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_P1) >> RCC_PLL1DIVR_P1_Pos) != (RCC_OscInitStruct->PLL.PLLP - 1U)) || 8003852: 68fb ldr r3, [r7, #12] 8003854: 0a5b lsrs r3, r3, #9 8003856: f003 027f and.w r2, r3, #127 ; 0x7f 800385a: 687b ldr r3, [r7, #4] 800385c: 6b5b ldr r3, [r3, #52] ; 0x34 800385e: 3b01 subs r3, #1 (READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_N1) != (RCC_OscInitStruct->PLL.PLLN - 1U)) || 8003860: 429a cmp r2, r3 8003862: d111 bne.n 8003888 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_Q1) >> RCC_PLL1DIVR_Q1_Pos) != (RCC_OscInitStruct->PLL.PLLQ - 1U)) || 8003864: 68fb ldr r3, [r7, #12] 8003866: 0c1b lsrs r3, r3, #16 8003868: f003 027f and.w r2, r3, #127 ; 0x7f 800386c: 687b ldr r3, [r7, #4] 800386e: 6b9b ldr r3, [r3, #56] ; 0x38 8003870: 3b01 subs r3, #1 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_P1) >> RCC_PLL1DIVR_P1_Pos) != (RCC_OscInitStruct->PLL.PLLP - 1U)) || 8003872: 429a cmp r2, r3 8003874: d108 bne.n 8003888 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_R1) >> RCC_PLL1DIVR_R1_Pos) != (RCC_OscInitStruct->PLL.PLLR - 1U))) 8003876: 68fb ldr r3, [r7, #12] 8003878: 0e1b lsrs r3, r3, #24 800387a: f003 027f and.w r2, r3, #127 ; 0x7f 800387e: 687b ldr r3, [r7, #4] 8003880: 6bdb ldr r3, [r3, #60] ; 0x3c 8003882: 3b01 subs r3, #1 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_Q1) >> RCC_PLL1DIVR_Q1_Pos) != (RCC_OscInitStruct->PLL.PLLQ - 1U)) || 8003884: 429a cmp r2, r3 8003886: d001 beq.n 800388c { return HAL_ERROR; 8003888: 2301 movs r3, #1 800388a: e02b b.n 80038e4 } else { /* Check if only fractional part needs to be updated */ temp1_pllckcfg = ((RCC->PLL1FRACR & RCC_PLL1FRACR_FRACN1) >> RCC_PLL1FRACR_FRACN1_Pos); 800388c: 4b17 ldr r3, [pc, #92] ; (80038ec ) 800388e: 6b5b ldr r3, [r3, #52] ; 0x34 8003890: 08db lsrs r3, r3, #3 8003892: f3c3 030c ubfx r3, r3, #0, #13 8003896: 613b str r3, [r7, #16] if (RCC_OscInitStruct->PLL.PLLFRACN != temp1_pllckcfg) 8003898: 687b ldr r3, [r7, #4] 800389a: 6c9b ldr r3, [r3, #72] ; 0x48 800389c: 693a ldr r2, [r7, #16] 800389e: 429a cmp r2, r3 80038a0: d01f beq.n 80038e2 { assert_param(IS_RCC_PLLFRACN_VALUE(RCC_OscInitStruct->PLL.PLLFRACN)); /* Disable PLL1FRACEN */ __HAL_RCC_PLLFRACN_DISABLE(); 80038a2: 4b12 ldr r3, [pc, #72] ; (80038ec ) 80038a4: 6adb ldr r3, [r3, #44] ; 0x2c 80038a6: 4a11 ldr r2, [pc, #68] ; (80038ec ) 80038a8: f023 0301 bic.w r3, r3, #1 80038ac: 62d3 str r3, [r2, #44] ; 0x2c /* Get Start Tick*/ tickstart = HAL_GetTick(); 80038ae: f7fd fbad bl 800100c 80038b2: 6278 str r0, [r7, #36] ; 0x24 /* Wait at least 2 CK_REF (PLL input source divided by M) period to make sure next latched value will be taken into account. */ while ((HAL_GetTick() - tickstart) < PLL_FRAC_TIMEOUT_VALUE) 80038b4: bf00 nop 80038b6: f7fd fba9 bl 800100c 80038ba: 4602 mov r2, r0 80038bc: 6a7b ldr r3, [r7, #36] ; 0x24 80038be: 4293 cmp r3, r2 80038c0: d0f9 beq.n 80038b6 { } /* Configure PLL1 PLL1FRACN */ __HAL_RCC_PLLFRACN_CONFIG(RCC_OscInitStruct->PLL.PLLFRACN); 80038c2: 4b0a ldr r3, [pc, #40] ; (80038ec ) 80038c4: 6b5a ldr r2, [r3, #52] ; 0x34 80038c6: 4b0a ldr r3, [pc, #40] ; (80038f0 ) 80038c8: 4013 ands r3, r2 80038ca: 687a ldr r2, [r7, #4] 80038cc: 6c92 ldr r2, [r2, #72] ; 0x48 80038ce: 00d2 lsls r2, r2, #3 80038d0: 4906 ldr r1, [pc, #24] ; (80038ec ) 80038d2: 4313 orrs r3, r2 80038d4: 634b str r3, [r1, #52] ; 0x34 /* Enable PLL1FRACEN to latch new value. */ __HAL_RCC_PLLFRACN_ENABLE(); 80038d6: 4b05 ldr r3, [pc, #20] ; (80038ec ) 80038d8: 6adb ldr r3, [r3, #44] ; 0x2c 80038da: 4a04 ldr r2, [pc, #16] ; (80038ec ) 80038dc: f043 0301 orr.w r3, r3, #1 80038e0: 62d3 str r3, [r2, #44] ; 0x2c } } } } return HAL_OK; 80038e2: 2300 movs r3, #0 } 80038e4: 4618 mov r0, r3 80038e6: 3730 adds r7, #48 ; 0x30 80038e8: 46bd mov sp, r7 80038ea: bd80 pop {r7, pc} 80038ec: 58024400 .word 0x58024400 80038f0: ffff0007 .word 0xffff0007 080038f4 : * D1CPRE[3:0] bits to ensure that Domain1 core clock 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) { 80038f4: b580 push {r7, lr} 80038f6: b086 sub sp, #24 80038f8: af00 add r7, sp, #0 80038fa: 6078 str r0, [r7, #4] 80038fc: 6039 str r1, [r7, #0] HAL_StatusTypeDef halstatus; uint32_t tickstart; uint32_t common_system_clock; /* Check Null pointer */ if (RCC_ClkInitStruct == NULL) 80038fe: 687b ldr r3, [r7, #4] 8003900: 2b00 cmp r3, #0 8003902: d101 bne.n 8003908 { return HAL_ERROR; 8003904: 2301 movs r3, #1 8003906: e19c b.n 8003c42 /* 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 CPU frequency */ if (FLatency > __HAL_FLASH_GET_LATENCY()) 8003908: 4b8a ldr r3, [pc, #552] ; (8003b34 ) 800390a: 681b ldr r3, [r3, #0] 800390c: f003 030f and.w r3, r3, #15 8003910: 683a ldr r2, [r7, #0] 8003912: 429a cmp r2, r3 8003914: d910 bls.n 8003938 { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ __HAL_FLASH_SET_LATENCY(FLatency); 8003916: 4b87 ldr r3, [pc, #540] ; (8003b34 ) 8003918: 681b ldr r3, [r3, #0] 800391a: f023 020f bic.w r2, r3, #15 800391e: 4985 ldr r1, [pc, #532] ; (8003b34 ) 8003920: 683b ldr r3, [r7, #0] 8003922: 4313 orrs r3, r2 8003924: 600b str r3, [r1, #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) 8003926: 4b83 ldr r3, [pc, #524] ; (8003b34 ) 8003928: 681b ldr r3, [r3, #0] 800392a: f003 030f and.w r3, r3, #15 800392e: 683a ldr r2, [r7, #0] 8003930: 429a cmp r2, r3 8003932: d001 beq.n 8003938 { return HAL_ERROR; 8003934: 2301 movs r3, #1 8003936: e184 b.n 8003c42 } /* Increasing the BUS frequency divider */ /*-------------------------- D1PCLK1/CDPCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D1PCLK1) == RCC_CLOCKTYPE_D1PCLK1) 8003938: 687b ldr r3, [r7, #4] 800393a: 681b ldr r3, [r3, #0] 800393c: f003 0304 and.w r3, r3, #4 8003940: 2b00 cmp r3, #0 8003942: d010 beq.n 8003966 { #if defined (RCC_D1CFGR_D1PPRE) if ((RCC_ClkInitStruct->APB3CLKDivider) > (RCC->D1CFGR & RCC_D1CFGR_D1PPRE)) 8003944: 687b ldr r3, [r7, #4] 8003946: 691a ldr r2, [r3, #16] 8003948: 4b7b ldr r3, [pc, #492] ; (8003b38 ) 800394a: 699b ldr r3, [r3, #24] 800394c: f003 0370 and.w r3, r3, #112 ; 0x70 8003950: 429a cmp r2, r3 8003952: d908 bls.n 8003966 { assert_param(IS_RCC_D1PCLK1(RCC_ClkInitStruct->APB3CLKDivider)); MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1PPRE, RCC_ClkInitStruct->APB3CLKDivider); 8003954: 4b78 ldr r3, [pc, #480] ; (8003b38 ) 8003956: 699b ldr r3, [r3, #24] 8003958: f023 0270 bic.w r2, r3, #112 ; 0x70 800395c: 687b ldr r3, [r7, #4] 800395e: 691b ldr r3, [r3, #16] 8003960: 4975 ldr r1, [pc, #468] ; (8003b38 ) 8003962: 4313 orrs r3, r2 8003964: 618b str r3, [r1, #24] } #endif } /*-------------------------- PCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) 8003966: 687b ldr r3, [r7, #4] 8003968: 681b ldr r3, [r3, #0] 800396a: f003 0308 and.w r3, r3, #8 800396e: 2b00 cmp r3, #0 8003970: d010 beq.n 8003994 { #if defined (RCC_D2CFGR_D2PPRE1) if ((RCC_ClkInitStruct->APB1CLKDivider) > (RCC->D2CFGR & RCC_D2CFGR_D2PPRE1)) 8003972: 687b ldr r3, [r7, #4] 8003974: 695a ldr r2, [r3, #20] 8003976: 4b70 ldr r3, [pc, #448] ; (8003b38 ) 8003978: 69db ldr r3, [r3, #28] 800397a: f003 0370 and.w r3, r3, #112 ; 0x70 800397e: 429a cmp r2, r3 8003980: d908 bls.n 8003994 { assert_param(IS_RCC_PCLK1(RCC_ClkInitStruct->APB1CLKDivider)); MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE1, (RCC_ClkInitStruct->APB1CLKDivider)); 8003982: 4b6d ldr r3, [pc, #436] ; (8003b38 ) 8003984: 69db ldr r3, [r3, #28] 8003986: f023 0270 bic.w r2, r3, #112 ; 0x70 800398a: 687b ldr r3, [r7, #4] 800398c: 695b ldr r3, [r3, #20] 800398e: 496a ldr r1, [pc, #424] ; (8003b38 ) 8003990: 4313 orrs r3, r2 8003992: 61cb str r3, [r1, #28] MODIFY_REG(RCC->CDCFGR2, RCC_CDCFGR2_CDPPRE1, (RCC_ClkInitStruct->APB1CLKDivider)); } #endif } /*-------------------------- PCLK2 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) 8003994: 687b ldr r3, [r7, #4] 8003996: 681b ldr r3, [r3, #0] 8003998: f003 0310 and.w r3, r3, #16 800399c: 2b00 cmp r3, #0 800399e: d010 beq.n 80039c2 { #if defined(RCC_D2CFGR_D2PPRE2) if ((RCC_ClkInitStruct->APB2CLKDivider) > (RCC->D2CFGR & RCC_D2CFGR_D2PPRE2)) 80039a0: 687b ldr r3, [r7, #4] 80039a2: 699a ldr r2, [r3, #24] 80039a4: 4b64 ldr r3, [pc, #400] ; (8003b38 ) 80039a6: 69db ldr r3, [r3, #28] 80039a8: f403 63e0 and.w r3, r3, #1792 ; 0x700 80039ac: 429a cmp r2, r3 80039ae: d908 bls.n 80039c2 { assert_param(IS_RCC_PCLK2(RCC_ClkInitStruct->APB2CLKDivider)); MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE2, (RCC_ClkInitStruct->APB2CLKDivider)); 80039b0: 4b61 ldr r3, [pc, #388] ; (8003b38 ) 80039b2: 69db ldr r3, [r3, #28] 80039b4: f423 62e0 bic.w r2, r3, #1792 ; 0x700 80039b8: 687b ldr r3, [r7, #4] 80039ba: 699b ldr r3, [r3, #24] 80039bc: 495e ldr r1, [pc, #376] ; (8003b38 ) 80039be: 4313 orrs r3, r2 80039c0: 61cb str r3, [r1, #28] } #endif } /*-------------------------- D3PCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D3PCLK1) == RCC_CLOCKTYPE_D3PCLK1) 80039c2: 687b ldr r3, [r7, #4] 80039c4: 681b ldr r3, [r3, #0] 80039c6: f003 0320 and.w r3, r3, #32 80039ca: 2b00 cmp r3, #0 80039cc: d010 beq.n 80039f0 { #if defined(RCC_D3CFGR_D3PPRE) if ((RCC_ClkInitStruct->APB4CLKDivider) > (RCC->D3CFGR & RCC_D3CFGR_D3PPRE)) 80039ce: 687b ldr r3, [r7, #4] 80039d0: 69da ldr r2, [r3, #28] 80039d2: 4b59 ldr r3, [pc, #356] ; (8003b38 ) 80039d4: 6a1b ldr r3, [r3, #32] 80039d6: f003 0370 and.w r3, r3, #112 ; 0x70 80039da: 429a cmp r2, r3 80039dc: d908 bls.n 80039f0 { assert_param(IS_RCC_D3PCLK1(RCC_ClkInitStruct->APB4CLKDivider)); MODIFY_REG(RCC->D3CFGR, RCC_D3CFGR_D3PPRE, (RCC_ClkInitStruct->APB4CLKDivider)); 80039de: 4b56 ldr r3, [pc, #344] ; (8003b38 ) 80039e0: 6a1b ldr r3, [r3, #32] 80039e2: f023 0270 bic.w r2, r3, #112 ; 0x70 80039e6: 687b ldr r3, [r7, #4] 80039e8: 69db ldr r3, [r3, #28] 80039ea: 4953 ldr r1, [pc, #332] ; (8003b38 ) 80039ec: 4313 orrs r3, r2 80039ee: 620b str r3, [r1, #32] } #endif } /*-------------------------- HCLK Configuration --------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK) 80039f0: 687b ldr r3, [r7, #4] 80039f2: 681b ldr r3, [r3, #0] 80039f4: f003 0302 and.w r3, r3, #2 80039f8: 2b00 cmp r3, #0 80039fa: d010 beq.n 8003a1e { #if defined (RCC_D1CFGR_HPRE) if ((RCC_ClkInitStruct->AHBCLKDivider) > (RCC->D1CFGR & RCC_D1CFGR_HPRE)) 80039fc: 687b ldr r3, [r7, #4] 80039fe: 68da ldr r2, [r3, #12] 8003a00: 4b4d ldr r3, [pc, #308] ; (8003b38 ) 8003a02: 699b ldr r3, [r3, #24] 8003a04: f003 030f and.w r3, r3, #15 8003a08: 429a cmp r2, r3 8003a0a: d908 bls.n 8003a1e { /* Set the new HCLK clock divider */ assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider)); MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider); 8003a0c: 4b4a ldr r3, [pc, #296] ; (8003b38 ) 8003a0e: 699b ldr r3, [r3, #24] 8003a10: f023 020f bic.w r2, r3, #15 8003a14: 687b ldr r3, [r7, #4] 8003a16: 68db ldr r3, [r3, #12] 8003a18: 4947 ldr r1, [pc, #284] ; (8003b38 ) 8003a1a: 4313 orrs r3, r2 8003a1c: 618b str r3, [r1, #24] } #endif } /*------------------------- SYSCLK Configuration -------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK) 8003a1e: 687b ldr r3, [r7, #4] 8003a20: 681b ldr r3, [r3, #0] 8003a22: f003 0301 and.w r3, r3, #1 8003a26: 2b00 cmp r3, #0 8003a28: d055 beq.n 8003ad6 { assert_param(IS_RCC_SYSCLK(RCC_ClkInitStruct->SYSCLKDivider)); assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource)); #if defined(RCC_D1CFGR_D1CPRE) MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1CPRE, RCC_ClkInitStruct->SYSCLKDivider); 8003a2a: 4b43 ldr r3, [pc, #268] ; (8003b38 ) 8003a2c: 699b ldr r3, [r3, #24] 8003a2e: f423 6270 bic.w r2, r3, #3840 ; 0xf00 8003a32: 687b ldr r3, [r7, #4] 8003a34: 689b ldr r3, [r3, #8] 8003a36: 4940 ldr r1, [pc, #256] ; (8003b38 ) 8003a38: 4313 orrs r3, r2 8003a3a: 618b str r3, [r1, #24] #else MODIFY_REG(RCC->CDCFGR1, RCC_CDCFGR1_CDCPRE, RCC_ClkInitStruct->SYSCLKDivider); #endif /* HSE is selected as System Clock Source */ if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE) 8003a3c: 687b ldr r3, [r7, #4] 8003a3e: 685b ldr r3, [r3, #4] 8003a40: 2b02 cmp r3, #2 8003a42: d107 bne.n 8003a54 { /* Check the HSE ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U) 8003a44: 4b3c ldr r3, [pc, #240] ; (8003b38 ) 8003a46: 681b ldr r3, [r3, #0] 8003a48: f403 3300 and.w r3, r3, #131072 ; 0x20000 8003a4c: 2b00 cmp r3, #0 8003a4e: d121 bne.n 8003a94 { return HAL_ERROR; 8003a50: 2301 movs r3, #1 8003a52: e0f6 b.n 8003c42 } } /* PLL is selected as System Clock Source */ else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) 8003a54: 687b ldr r3, [r7, #4] 8003a56: 685b ldr r3, [r3, #4] 8003a58: 2b03 cmp r3, #3 8003a5a: d107 bne.n 8003a6c { /* Check the PLL ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U) 8003a5c: 4b36 ldr r3, [pc, #216] ; (8003b38 ) 8003a5e: 681b ldr r3, [r3, #0] 8003a60: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 8003a64: 2b00 cmp r3, #0 8003a66: d115 bne.n 8003a94 { return HAL_ERROR; 8003a68: 2301 movs r3, #1 8003a6a: e0ea b.n 8003c42 } } /* CSI is selected as System Clock Source */ else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_CSI) 8003a6c: 687b ldr r3, [r7, #4] 8003a6e: 685b ldr r3, [r3, #4] 8003a70: 2b01 cmp r3, #1 8003a72: d107 bne.n 8003a84 { /* Check the PLL ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U) 8003a74: 4b30 ldr r3, [pc, #192] ; (8003b38 ) 8003a76: 681b ldr r3, [r3, #0] 8003a78: f403 7380 and.w r3, r3, #256 ; 0x100 8003a7c: 2b00 cmp r3, #0 8003a7e: d109 bne.n 8003a94 { return HAL_ERROR; 8003a80: 2301 movs r3, #1 8003a82: e0de b.n 8003c42 } /* HSI is selected as System Clock Source */ else { /* Check the HSI ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 8003a84: 4b2c ldr r3, [pc, #176] ; (8003b38 ) 8003a86: 681b ldr r3, [r3, #0] 8003a88: f003 0304 and.w r3, r3, #4 8003a8c: 2b00 cmp r3, #0 8003a8e: d101 bne.n 8003a94 { return HAL_ERROR; 8003a90: 2301 movs r3, #1 8003a92: e0d6 b.n 8003c42 } } MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, RCC_ClkInitStruct->SYSCLKSource); 8003a94: 4b28 ldr r3, [pc, #160] ; (8003b38 ) 8003a96: 691b ldr r3, [r3, #16] 8003a98: f023 0207 bic.w r2, r3, #7 8003a9c: 687b ldr r3, [r7, #4] 8003a9e: 685b ldr r3, [r3, #4] 8003aa0: 4925 ldr r1, [pc, #148] ; (8003b38 ) 8003aa2: 4313 orrs r3, r2 8003aa4: 610b str r3, [r1, #16] /* Get Start Tick*/ tickstart = HAL_GetTick(); 8003aa6: f7fd fab1 bl 800100c 8003aaa: 6178 str r0, [r7, #20] while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) 8003aac: e00a b.n 8003ac4 { if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE) 8003aae: f7fd faad bl 800100c 8003ab2: 4602 mov r2, r0 8003ab4: 697b ldr r3, [r7, #20] 8003ab6: 1ad3 subs r3, r2, r3 8003ab8: f241 3288 movw r2, #5000 ; 0x1388 8003abc: 4293 cmp r3, r2 8003abe: d901 bls.n 8003ac4 { return HAL_TIMEOUT; 8003ac0: 2303 movs r3, #3 8003ac2: e0be b.n 8003c42 while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) 8003ac4: 4b1c ldr r3, [pc, #112] ; (8003b38 ) 8003ac6: 691b ldr r3, [r3, #16] 8003ac8: f003 0238 and.w r2, r3, #56 ; 0x38 8003acc: 687b ldr r3, [r7, #4] 8003ace: 685b ldr r3, [r3, #4] 8003ad0: 00db lsls r3, r3, #3 8003ad2: 429a cmp r2, r3 8003ad4: d1eb bne.n 8003aae } /* Decreasing the BUS frequency divider */ /*-------------------------- HCLK Configuration --------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK) 8003ad6: 687b ldr r3, [r7, #4] 8003ad8: 681b ldr r3, [r3, #0] 8003ada: f003 0302 and.w r3, r3, #2 8003ade: 2b00 cmp r3, #0 8003ae0: d010 beq.n 8003b04 { #if defined(RCC_D1CFGR_HPRE) if ((RCC_ClkInitStruct->AHBCLKDivider) < (RCC->D1CFGR & RCC_D1CFGR_HPRE)) 8003ae2: 687b ldr r3, [r7, #4] 8003ae4: 68da ldr r2, [r3, #12] 8003ae6: 4b14 ldr r3, [pc, #80] ; (8003b38 ) 8003ae8: 699b ldr r3, [r3, #24] 8003aea: f003 030f and.w r3, r3, #15 8003aee: 429a cmp r2, r3 8003af0: d208 bcs.n 8003b04 { /* Set the new HCLK clock divider */ assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider)); MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider); 8003af2: 4b11 ldr r3, [pc, #68] ; (8003b38 ) 8003af4: 699b ldr r3, [r3, #24] 8003af6: f023 020f bic.w r2, r3, #15 8003afa: 687b ldr r3, [r7, #4] 8003afc: 68db ldr r3, [r3, #12] 8003afe: 490e ldr r1, [pc, #56] ; (8003b38 ) 8003b00: 4313 orrs r3, r2 8003b02: 618b str r3, [r1, #24] } #endif } /* Decreasing the number of wait states because of lower CPU frequency */ if (FLatency < __HAL_FLASH_GET_LATENCY()) 8003b04: 4b0b ldr r3, [pc, #44] ; (8003b34 ) 8003b06: 681b ldr r3, [r3, #0] 8003b08: f003 030f and.w r3, r3, #15 8003b0c: 683a ldr r2, [r7, #0] 8003b0e: 429a cmp r2, r3 8003b10: d214 bcs.n 8003b3c { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ __HAL_FLASH_SET_LATENCY(FLatency); 8003b12: 4b08 ldr r3, [pc, #32] ; (8003b34 ) 8003b14: 681b ldr r3, [r3, #0] 8003b16: f023 020f bic.w r2, r3, #15 8003b1a: 4906 ldr r1, [pc, #24] ; (8003b34 ) 8003b1c: 683b ldr r3, [r7, #0] 8003b1e: 4313 orrs r3, r2 8003b20: 600b str r3, [r1, #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) 8003b22: 4b04 ldr r3, [pc, #16] ; (8003b34 ) 8003b24: 681b ldr r3, [r3, #0] 8003b26: f003 030f and.w r3, r3, #15 8003b2a: 683a ldr r2, [r7, #0] 8003b2c: 429a cmp r2, r3 8003b2e: d005 beq.n 8003b3c { return HAL_ERROR; 8003b30: 2301 movs r3, #1 8003b32: e086 b.n 8003c42 8003b34: 52002000 .word 0x52002000 8003b38: 58024400 .word 0x58024400 } } /*-------------------------- D1PCLK1/CDPCLK Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D1PCLK1) == RCC_CLOCKTYPE_D1PCLK1) 8003b3c: 687b ldr r3, [r7, #4] 8003b3e: 681b ldr r3, [r3, #0] 8003b40: f003 0304 and.w r3, r3, #4 8003b44: 2b00 cmp r3, #0 8003b46: d010 beq.n 8003b6a { #if defined(RCC_D1CFGR_D1PPRE) if ((RCC_ClkInitStruct->APB3CLKDivider) < (RCC->D1CFGR & RCC_D1CFGR_D1PPRE)) 8003b48: 687b ldr r3, [r7, #4] 8003b4a: 691a ldr r2, [r3, #16] 8003b4c: 4b3f ldr r3, [pc, #252] ; (8003c4c ) 8003b4e: 699b ldr r3, [r3, #24] 8003b50: f003 0370 and.w r3, r3, #112 ; 0x70 8003b54: 429a cmp r2, r3 8003b56: d208 bcs.n 8003b6a { assert_param(IS_RCC_D1PCLK1(RCC_ClkInitStruct->APB3CLKDivider)); MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1PPRE, RCC_ClkInitStruct->APB3CLKDivider); 8003b58: 4b3c ldr r3, [pc, #240] ; (8003c4c ) 8003b5a: 699b ldr r3, [r3, #24] 8003b5c: f023 0270 bic.w r2, r3, #112 ; 0x70 8003b60: 687b ldr r3, [r7, #4] 8003b62: 691b ldr r3, [r3, #16] 8003b64: 4939 ldr r1, [pc, #228] ; (8003c4c ) 8003b66: 4313 orrs r3, r2 8003b68: 618b str r3, [r1, #24] } #endif } /*-------------------------- PCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) 8003b6a: 687b ldr r3, [r7, #4] 8003b6c: 681b ldr r3, [r3, #0] 8003b6e: f003 0308 and.w r3, r3, #8 8003b72: 2b00 cmp r3, #0 8003b74: d010 beq.n 8003b98 { #if defined(RCC_D2CFGR_D2PPRE1) if ((RCC_ClkInitStruct->APB1CLKDivider) < (RCC->D2CFGR & RCC_D2CFGR_D2PPRE1)) 8003b76: 687b ldr r3, [r7, #4] 8003b78: 695a ldr r2, [r3, #20] 8003b7a: 4b34 ldr r3, [pc, #208] ; (8003c4c ) 8003b7c: 69db ldr r3, [r3, #28] 8003b7e: f003 0370 and.w r3, r3, #112 ; 0x70 8003b82: 429a cmp r2, r3 8003b84: d208 bcs.n 8003b98 { assert_param(IS_RCC_PCLK1(RCC_ClkInitStruct->APB1CLKDivider)); MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE1, (RCC_ClkInitStruct->APB1CLKDivider)); 8003b86: 4b31 ldr r3, [pc, #196] ; (8003c4c ) 8003b88: 69db ldr r3, [r3, #28] 8003b8a: f023 0270 bic.w r2, r3, #112 ; 0x70 8003b8e: 687b ldr r3, [r7, #4] 8003b90: 695b ldr r3, [r3, #20] 8003b92: 492e ldr r1, [pc, #184] ; (8003c4c ) 8003b94: 4313 orrs r3, r2 8003b96: 61cb str r3, [r1, #28] } #endif } /*-------------------------- PCLK2 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) 8003b98: 687b ldr r3, [r7, #4] 8003b9a: 681b ldr r3, [r3, #0] 8003b9c: f003 0310 and.w r3, r3, #16 8003ba0: 2b00 cmp r3, #0 8003ba2: d010 beq.n 8003bc6 { #if defined (RCC_D2CFGR_D2PPRE2) if ((RCC_ClkInitStruct->APB2CLKDivider) < (RCC->D2CFGR & RCC_D2CFGR_D2PPRE2)) 8003ba4: 687b ldr r3, [r7, #4] 8003ba6: 699a ldr r2, [r3, #24] 8003ba8: 4b28 ldr r3, [pc, #160] ; (8003c4c ) 8003baa: 69db ldr r3, [r3, #28] 8003bac: f403 63e0 and.w r3, r3, #1792 ; 0x700 8003bb0: 429a cmp r2, r3 8003bb2: d208 bcs.n 8003bc6 { assert_param(IS_RCC_PCLK2(RCC_ClkInitStruct->APB2CLKDivider)); MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE2, (RCC_ClkInitStruct->APB2CLKDivider)); 8003bb4: 4b25 ldr r3, [pc, #148] ; (8003c4c ) 8003bb6: 69db ldr r3, [r3, #28] 8003bb8: f423 62e0 bic.w r2, r3, #1792 ; 0x700 8003bbc: 687b ldr r3, [r7, #4] 8003bbe: 699b ldr r3, [r3, #24] 8003bc0: 4922 ldr r1, [pc, #136] ; (8003c4c ) 8003bc2: 4313 orrs r3, r2 8003bc4: 61cb str r3, [r1, #28] } #endif } /*-------------------------- D3PCLK1/SRDPCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D3PCLK1) == RCC_CLOCKTYPE_D3PCLK1) 8003bc6: 687b ldr r3, [r7, #4] 8003bc8: 681b ldr r3, [r3, #0] 8003bca: f003 0320 and.w r3, r3, #32 8003bce: 2b00 cmp r3, #0 8003bd0: d010 beq.n 8003bf4 { #if defined(RCC_D3CFGR_D3PPRE) if ((RCC_ClkInitStruct->APB4CLKDivider) < (RCC->D3CFGR & RCC_D3CFGR_D3PPRE)) 8003bd2: 687b ldr r3, [r7, #4] 8003bd4: 69da ldr r2, [r3, #28] 8003bd6: 4b1d ldr r3, [pc, #116] ; (8003c4c ) 8003bd8: 6a1b ldr r3, [r3, #32] 8003bda: f003 0370 and.w r3, r3, #112 ; 0x70 8003bde: 429a cmp r2, r3 8003be0: d208 bcs.n 8003bf4 { assert_param(IS_RCC_D3PCLK1(RCC_ClkInitStruct->APB4CLKDivider)); MODIFY_REG(RCC->D3CFGR, RCC_D3CFGR_D3PPRE, (RCC_ClkInitStruct->APB4CLKDivider)); 8003be2: 4b1a ldr r3, [pc, #104] ; (8003c4c ) 8003be4: 6a1b ldr r3, [r3, #32] 8003be6: f023 0270 bic.w r2, r3, #112 ; 0x70 8003bea: 687b ldr r3, [r7, #4] 8003bec: 69db ldr r3, [r3, #28] 8003bee: 4917 ldr r1, [pc, #92] ; (8003c4c ) 8003bf0: 4313 orrs r3, r2 8003bf2: 620b str r3, [r1, #32] #endif } /* Update the SystemCoreClock global variable */ #if defined(RCC_D1CFGR_D1CPRE) common_system_clock = HAL_RCC_GetSysClockFreq() >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_D1CPRE) >> RCC_D1CFGR_D1CPRE_Pos]) & 0x1FU); 8003bf4: f000 f834 bl 8003c60 8003bf8: 4602 mov r2, r0 8003bfa: 4b14 ldr r3, [pc, #80] ; (8003c4c ) 8003bfc: 699b ldr r3, [r3, #24] 8003bfe: 0a1b lsrs r3, r3, #8 8003c00: f003 030f and.w r3, r3, #15 8003c04: 4912 ldr r1, [pc, #72] ; (8003c50 ) 8003c06: 5ccb ldrb r3, [r1, r3] 8003c08: f003 031f and.w r3, r3, #31 8003c0c: fa22 f303 lsr.w r3, r2, r3 8003c10: 613b str r3, [r7, #16] #else common_system_clock = HAL_RCC_GetSysClockFreq() >> ((D1CorePrescTable[(RCC->CDCFGR1 & RCC_CDCFGR1_CDCPRE) >> RCC_CDCFGR1_CDCPRE_Pos]) & 0x1FU); #endif #if defined(RCC_D1CFGR_HPRE) SystemD2Clock = (common_system_clock >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_HPRE) >> RCC_D1CFGR_HPRE_Pos]) & 0x1FU)); 8003c12: 4b0e ldr r3, [pc, #56] ; (8003c4c ) 8003c14: 699b ldr r3, [r3, #24] 8003c16: f003 030f and.w r3, r3, #15 8003c1a: 4a0d ldr r2, [pc, #52] ; (8003c50 ) 8003c1c: 5cd3 ldrb r3, [r2, r3] 8003c1e: f003 031f and.w r3, r3, #31 8003c22: 693a ldr r2, [r7, #16] 8003c24: fa22 f303 lsr.w r3, r2, r3 8003c28: 4a0a ldr r2, [pc, #40] ; (8003c54 ) 8003c2a: 6013 str r3, [r2, #0] #endif #if defined(DUAL_CORE) && defined(CORE_CM4) SystemCoreClock = SystemD2Clock; #else SystemCoreClock = common_system_clock; 8003c2c: 4a0a ldr r2, [pc, #40] ; (8003c58 ) 8003c2e: 693b ldr r3, [r7, #16] 8003c30: 6013 str r3, [r2, #0] #endif /* DUAL_CORE && CORE_CM4 */ /* Configure the source of time base considering new system clocks settings*/ halstatus = HAL_InitTick(uwTickPrio); 8003c32: 4b0a ldr r3, [pc, #40] ; (8003c5c ) 8003c34: 681b ldr r3, [r3, #0] 8003c36: 4618 mov r0, r3 8003c38: f7fd f99e bl 8000f78 8003c3c: 4603 mov r3, r0 8003c3e: 73fb strb r3, [r7, #15] return halstatus; 8003c40: 7bfb ldrb r3, [r7, #15] } 8003c42: 4618 mov r0, r3 8003c44: 3718 adds r7, #24 8003c46: 46bd mov sp, r7 8003c48: bd80 pop {r7, pc} 8003c4a: bf00 nop 8003c4c: 58024400 .word 0x58024400 8003c50: 08014c80 .word 0x08014c80 8003c54: 24000004 .word 0x24000004 8003c58: 24000000 .word 0x24000000 8003c5c: 24000008 .word 0x24000008 08003c60 : * * * @retval SYSCLK frequency */ uint32_t HAL_RCC_GetSysClockFreq(void) { 8003c60: b480 push {r7} 8003c62: b089 sub sp, #36 ; 0x24 8003c64: af00 add r7, sp, #0 float_t fracn1, pllvco; uint32_t sysclockfreq; /* Get SYSCLK source -------------------------------------------------------*/ switch (RCC->CFGR & RCC_CFGR_SWS) 8003c66: 4bb3 ldr r3, [pc, #716] ; (8003f34 ) 8003c68: 691b ldr r3, [r3, #16] 8003c6a: f003 0338 and.w r3, r3, #56 ; 0x38 8003c6e: 2b18 cmp r3, #24 8003c70: f200 8155 bhi.w 8003f1e 8003c74: a201 add r2, pc, #4 ; (adr r2, 8003c7c ) 8003c76: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8003c7a: bf00 nop 8003c7c: 08003ce1 .word 0x08003ce1 8003c80: 08003f1f .word 0x08003f1f 8003c84: 08003f1f .word 0x08003f1f 8003c88: 08003f1f .word 0x08003f1f 8003c8c: 08003f1f .word 0x08003f1f 8003c90: 08003f1f .word 0x08003f1f 8003c94: 08003f1f .word 0x08003f1f 8003c98: 08003f1f .word 0x08003f1f 8003c9c: 08003d07 .word 0x08003d07 8003ca0: 08003f1f .word 0x08003f1f 8003ca4: 08003f1f .word 0x08003f1f 8003ca8: 08003f1f .word 0x08003f1f 8003cac: 08003f1f .word 0x08003f1f 8003cb0: 08003f1f .word 0x08003f1f 8003cb4: 08003f1f .word 0x08003f1f 8003cb8: 08003f1f .word 0x08003f1f 8003cbc: 08003d0d .word 0x08003d0d 8003cc0: 08003f1f .word 0x08003f1f 8003cc4: 08003f1f .word 0x08003f1f 8003cc8: 08003f1f .word 0x08003f1f 8003ccc: 08003f1f .word 0x08003f1f 8003cd0: 08003f1f .word 0x08003f1f 8003cd4: 08003f1f .word 0x08003f1f 8003cd8: 08003f1f .word 0x08003f1f 8003cdc: 08003d13 .word 0x08003d13 { case RCC_CFGR_SWS_HSI: /* HSI used as system clock source */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 8003ce0: 4b94 ldr r3, [pc, #592] ; (8003f34 ) 8003ce2: 681b ldr r3, [r3, #0] 8003ce4: f003 0320 and.w r3, r3, #32 8003ce8: 2b00 cmp r3, #0 8003cea: d009 beq.n 8003d00 { sysclockfreq = (uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3)); 8003cec: 4b91 ldr r3, [pc, #580] ; (8003f34 ) 8003cee: 681b ldr r3, [r3, #0] 8003cf0: 08db lsrs r3, r3, #3 8003cf2: f003 0303 and.w r3, r3, #3 8003cf6: 4a90 ldr r2, [pc, #576] ; (8003f38 ) 8003cf8: fa22 f303 lsr.w r3, r2, r3 8003cfc: 61bb str r3, [r7, #24] else { sysclockfreq = (uint32_t) HSI_VALUE; } break; 8003cfe: e111 b.n 8003f24 sysclockfreq = (uint32_t) HSI_VALUE; 8003d00: 4b8d ldr r3, [pc, #564] ; (8003f38 ) 8003d02: 61bb str r3, [r7, #24] break; 8003d04: e10e b.n 8003f24 case RCC_CFGR_SWS_CSI: /* CSI used as system clock source */ sysclockfreq = CSI_VALUE; 8003d06: 4b8d ldr r3, [pc, #564] ; (8003f3c ) 8003d08: 61bb str r3, [r7, #24] break; 8003d0a: e10b b.n 8003f24 case RCC_CFGR_SWS_HSE: /* HSE used as system clock source */ sysclockfreq = HSE_VALUE; 8003d0c: 4b8c ldr r3, [pc, #560] ; (8003f40 ) 8003d0e: 61bb str r3, [r7, #24] break; 8003d10: e108 b.n 8003f24 case RCC_CFGR_SWS_PLL1: /* PLL1 used as system clock source */ /* PLL_VCO = (HSE_VALUE or HSI_VALUE or CSI_VALUE/ PLLM) * PLLN SYSCLK = PLL_VCO / PLLR */ pllsource = (RCC->PLLCKSELR & RCC_PLLCKSELR_PLLSRC); 8003d12: 4b88 ldr r3, [pc, #544] ; (8003f34 ) 8003d14: 6a9b ldr r3, [r3, #40] ; 0x28 8003d16: f003 0303 and.w r3, r3, #3 8003d1a: 617b str r3, [r7, #20] pllm = ((RCC->PLLCKSELR & RCC_PLLCKSELR_DIVM1) >> 4) ; 8003d1c: 4b85 ldr r3, [pc, #532] ; (8003f34 ) 8003d1e: 6a9b ldr r3, [r3, #40] ; 0x28 8003d20: 091b lsrs r3, r3, #4 8003d22: f003 033f and.w r3, r3, #63 ; 0x3f 8003d26: 613b str r3, [r7, #16] pllfracen = ((RCC-> PLLCFGR & RCC_PLLCFGR_PLL1FRACEN) >> RCC_PLLCFGR_PLL1FRACEN_Pos); 8003d28: 4b82 ldr r3, [pc, #520] ; (8003f34 ) 8003d2a: 6adb ldr r3, [r3, #44] ; 0x2c 8003d2c: f003 0301 and.w r3, r3, #1 8003d30: 60fb str r3, [r7, #12] fracn1 = (float_t)(uint32_t)(pllfracen * ((RCC->PLL1FRACR & RCC_PLL1FRACR_FRACN1) >> 3)); 8003d32: 4b80 ldr r3, [pc, #512] ; (8003f34 ) 8003d34: 6b5b ldr r3, [r3, #52] ; 0x34 8003d36: 08db lsrs r3, r3, #3 8003d38: f3c3 030c ubfx r3, r3, #0, #13 8003d3c: 68fa ldr r2, [r7, #12] 8003d3e: fb02 f303 mul.w r3, r2, r3 8003d42: ee07 3a90 vmov s15, r3 8003d46: eef8 7a67 vcvt.f32.u32 s15, s15 8003d4a: edc7 7a02 vstr s15, [r7, #8] if (pllm != 0U) 8003d4e: 693b ldr r3, [r7, #16] 8003d50: 2b00 cmp r3, #0 8003d52: f000 80e1 beq.w 8003f18 8003d56: 697b ldr r3, [r7, #20] 8003d58: 2b02 cmp r3, #2 8003d5a: f000 8083 beq.w 8003e64 8003d5e: 697b ldr r3, [r7, #20] 8003d60: 2b02 cmp r3, #2 8003d62: f200 80a1 bhi.w 8003ea8 8003d66: 697b ldr r3, [r7, #20] 8003d68: 2b00 cmp r3, #0 8003d6a: d003 beq.n 8003d74 8003d6c: 697b ldr r3, [r7, #20] 8003d6e: 2b01 cmp r3, #1 8003d70: d056 beq.n 8003e20 8003d72: e099 b.n 8003ea8 { switch (pllsource) { case RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 8003d74: 4b6f ldr r3, [pc, #444] ; (8003f34 ) 8003d76: 681b ldr r3, [r3, #0] 8003d78: f003 0320 and.w r3, r3, #32 8003d7c: 2b00 cmp r3, #0 8003d7e: d02d beq.n 8003ddc { hsivalue = (HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3)); 8003d80: 4b6c ldr r3, [pc, #432] ; (8003f34 ) 8003d82: 681b ldr r3, [r3, #0] 8003d84: 08db lsrs r3, r3, #3 8003d86: f003 0303 and.w r3, r3, #3 8003d8a: 4a6b ldr r2, [pc, #428] ; (8003f38 ) 8003d8c: fa22 f303 lsr.w r3, r2, r3 8003d90: 607b str r3, [r7, #4] pllvco = ((float_t)hsivalue / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1 / (float_t)0x2000) + (float_t)1); 8003d92: 687b ldr r3, [r7, #4] 8003d94: ee07 3a90 vmov s15, r3 8003d98: eef8 6a67 vcvt.f32.u32 s13, s15 8003d9c: 693b ldr r3, [r7, #16] 8003d9e: ee07 3a90 vmov s15, r3 8003da2: eef8 7a67 vcvt.f32.u32 s15, s15 8003da6: ee86 7aa7 vdiv.f32 s14, s13, s15 8003daa: 4b62 ldr r3, [pc, #392] ; (8003f34 ) 8003dac: 6b1b ldr r3, [r3, #48] ; 0x30 8003dae: f3c3 0308 ubfx r3, r3, #0, #9 8003db2: ee07 3a90 vmov s15, r3 8003db6: eef8 6a67 vcvt.f32.u32 s13, s15 8003dba: ed97 6a02 vldr s12, [r7, #8] 8003dbe: eddf 5a61 vldr s11, [pc, #388] ; 8003f44 8003dc2: eec6 7a25 vdiv.f32 s15, s12, s11 8003dc6: ee76 7aa7 vadd.f32 s15, s13, s15 8003dca: eef7 6a00 vmov.f32 s13, #112 ; 0x3f800000 1.0 8003dce: ee77 7aa6 vadd.f32 s15, s15, s13 8003dd2: ee67 7a27 vmul.f32 s15, s14, s15 8003dd6: edc7 7a07 vstr s15, [r7, #28] } else { pllvco = ((float_t)HSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1 / (float_t)0x2000) + (float_t)1); } break; 8003dda: e087 b.n 8003eec pllvco = ((float_t)HSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1 / (float_t)0x2000) + (float_t)1); 8003ddc: 693b ldr r3, [r7, #16] 8003dde: ee07 3a90 vmov s15, r3 8003de2: eef8 7a67 vcvt.f32.u32 s15, s15 8003de6: eddf 6a58 vldr s13, [pc, #352] ; 8003f48 8003dea: ee86 7aa7 vdiv.f32 s14, s13, s15 8003dee: 4b51 ldr r3, [pc, #324] ; (8003f34 ) 8003df0: 6b1b ldr r3, [r3, #48] ; 0x30 8003df2: f3c3 0308 ubfx r3, r3, #0, #9 8003df6: ee07 3a90 vmov s15, r3 8003dfa: eef8 6a67 vcvt.f32.u32 s13, s15 8003dfe: ed97 6a02 vldr s12, [r7, #8] 8003e02: eddf 5a50 vldr s11, [pc, #320] ; 8003f44 8003e06: eec6 7a25 vdiv.f32 s15, s12, s11 8003e0a: ee76 7aa7 vadd.f32 s15, s13, s15 8003e0e: eef7 6a00 vmov.f32 s13, #112 ; 0x3f800000 1.0 8003e12: ee77 7aa6 vadd.f32 s15, s15, s13 8003e16: ee67 7a27 vmul.f32 s15, s14, s15 8003e1a: edc7 7a07 vstr s15, [r7, #28] break; 8003e1e: e065 b.n 8003eec case RCC_PLLSOURCE_CSI: /* CSI used as PLL clock source */ pllvco = ((float_t)CSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1 / (float_t)0x2000) + (float_t)1); 8003e20: 693b ldr r3, [r7, #16] 8003e22: ee07 3a90 vmov s15, r3 8003e26: eef8 7a67 vcvt.f32.u32 s15, s15 8003e2a: eddf 6a48 vldr s13, [pc, #288] ; 8003f4c 8003e2e: ee86 7aa7 vdiv.f32 s14, s13, s15 8003e32: 4b40 ldr r3, [pc, #256] ; (8003f34 ) 8003e34: 6b1b ldr r3, [r3, #48] ; 0x30 8003e36: f3c3 0308 ubfx r3, r3, #0, #9 8003e3a: ee07 3a90 vmov s15, r3 8003e3e: eef8 6a67 vcvt.f32.u32 s13, s15 8003e42: ed97 6a02 vldr s12, [r7, #8] 8003e46: eddf 5a3f vldr s11, [pc, #252] ; 8003f44 8003e4a: eec6 7a25 vdiv.f32 s15, s12, s11 8003e4e: ee76 7aa7 vadd.f32 s15, s13, s15 8003e52: eef7 6a00 vmov.f32 s13, #112 ; 0x3f800000 1.0 8003e56: ee77 7aa6 vadd.f32 s15, s15, s13 8003e5a: ee67 7a27 vmul.f32 s15, s14, s15 8003e5e: edc7 7a07 vstr s15, [r7, #28] break; 8003e62: e043 b.n 8003eec case RCC_PLLSOURCE_HSE: /* HSE used as PLL clock source */ pllvco = ((float_t)HSE_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1 / (float_t)0x2000) + (float_t)1); 8003e64: 693b ldr r3, [r7, #16] 8003e66: ee07 3a90 vmov s15, r3 8003e6a: eef8 7a67 vcvt.f32.u32 s15, s15 8003e6e: eddf 6a38 vldr s13, [pc, #224] ; 8003f50 8003e72: ee86 7aa7 vdiv.f32 s14, s13, s15 8003e76: 4b2f ldr r3, [pc, #188] ; (8003f34 ) 8003e78: 6b1b ldr r3, [r3, #48] ; 0x30 8003e7a: f3c3 0308 ubfx r3, r3, #0, #9 8003e7e: ee07 3a90 vmov s15, r3 8003e82: eef8 6a67 vcvt.f32.u32 s13, s15 8003e86: ed97 6a02 vldr s12, [r7, #8] 8003e8a: eddf 5a2e vldr s11, [pc, #184] ; 8003f44 8003e8e: eec6 7a25 vdiv.f32 s15, s12, s11 8003e92: ee76 7aa7 vadd.f32 s15, s13, s15 8003e96: eef7 6a00 vmov.f32 s13, #112 ; 0x3f800000 1.0 8003e9a: ee77 7aa6 vadd.f32 s15, s15, s13 8003e9e: ee67 7a27 vmul.f32 s15, s14, s15 8003ea2: edc7 7a07 vstr s15, [r7, #28] break; 8003ea6: e021 b.n 8003eec default: pllvco = ((float_t)CSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1 / (float_t)0x2000) + (float_t)1); 8003ea8: 693b ldr r3, [r7, #16] 8003eaa: ee07 3a90 vmov s15, r3 8003eae: eef8 7a67 vcvt.f32.u32 s15, s15 8003eb2: eddf 6a26 vldr s13, [pc, #152] ; 8003f4c 8003eb6: ee86 7aa7 vdiv.f32 s14, s13, s15 8003eba: 4b1e ldr r3, [pc, #120] ; (8003f34 ) 8003ebc: 6b1b ldr r3, [r3, #48] ; 0x30 8003ebe: f3c3 0308 ubfx r3, r3, #0, #9 8003ec2: ee07 3a90 vmov s15, r3 8003ec6: eef8 6a67 vcvt.f32.u32 s13, s15 8003eca: ed97 6a02 vldr s12, [r7, #8] 8003ece: eddf 5a1d vldr s11, [pc, #116] ; 8003f44 8003ed2: eec6 7a25 vdiv.f32 s15, s12, s11 8003ed6: ee76 7aa7 vadd.f32 s15, s13, s15 8003eda: eef7 6a00 vmov.f32 s13, #112 ; 0x3f800000 1.0 8003ede: ee77 7aa6 vadd.f32 s15, s15, s13 8003ee2: ee67 7a27 vmul.f32 s15, s14, s15 8003ee6: edc7 7a07 vstr s15, [r7, #28] break; 8003eea: bf00 nop } pllp = (((RCC->PLL1DIVR & RCC_PLL1DIVR_P1) >> 9) + 1U) ; 8003eec: 4b11 ldr r3, [pc, #68] ; (8003f34 ) 8003eee: 6b1b ldr r3, [r3, #48] ; 0x30 8003ef0: 0a5b lsrs r3, r3, #9 8003ef2: f003 037f and.w r3, r3, #127 ; 0x7f 8003ef6: 3301 adds r3, #1 8003ef8: 603b str r3, [r7, #0] sysclockfreq = (uint32_t)(float_t)(pllvco / (float_t)pllp); 8003efa: 683b ldr r3, [r7, #0] 8003efc: ee07 3a90 vmov s15, r3 8003f00: eeb8 7a67 vcvt.f32.u32 s14, s15 8003f04: edd7 6a07 vldr s13, [r7, #28] 8003f08: eec6 7a87 vdiv.f32 s15, s13, s14 8003f0c: eefc 7ae7 vcvt.u32.f32 s15, s15 8003f10: ee17 3a90 vmov r3, s15 8003f14: 61bb str r3, [r7, #24] } else { sysclockfreq = 0U; } break; 8003f16: e005 b.n 8003f24 sysclockfreq = 0U; 8003f18: 2300 movs r3, #0 8003f1a: 61bb str r3, [r7, #24] break; 8003f1c: e002 b.n 8003f24 default: sysclockfreq = CSI_VALUE; 8003f1e: 4b07 ldr r3, [pc, #28] ; (8003f3c ) 8003f20: 61bb str r3, [r7, #24] break; 8003f22: bf00 nop } return sysclockfreq; 8003f24: 69bb ldr r3, [r7, #24] } 8003f26: 4618 mov r0, r3 8003f28: 3724 adds r7, #36 ; 0x24 8003f2a: 46bd mov sp, r7 8003f2c: f85d 7b04 ldr.w r7, [sp], #4 8003f30: 4770 bx lr 8003f32: bf00 nop 8003f34: 58024400 .word 0x58024400 8003f38: 03d09000 .word 0x03d09000 8003f3c: 003d0900 .word 0x003d0900 8003f40: 017d7840 .word 0x017d7840 8003f44: 46000000 .word 0x46000000 8003f48: 4c742400 .word 0x4c742400 8003f4c: 4a742400 .word 0x4a742400 8003f50: 4bbebc20 .word 0x4bbebc20 08003f54 : * @note The SystemD2Clock CMSIS variable is used to store System domain2 Clock Frequency * and updated within this function * @retval HCLK frequency */ uint32_t HAL_RCC_GetHCLKFreq(void) { 8003f54: b580 push {r7, lr} 8003f56: b082 sub sp, #8 8003f58: af00 add r7, sp, #0 uint32_t common_system_clock; #if defined(RCC_D1CFGR_D1CPRE) common_system_clock = HAL_RCC_GetSysClockFreq() >> (D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_D1CPRE) >> RCC_D1CFGR_D1CPRE_Pos] & 0x1FU); 8003f5a: f7ff fe81 bl 8003c60 8003f5e: 4602 mov r2, r0 8003f60: 4b10 ldr r3, [pc, #64] ; (8003fa4 ) 8003f62: 699b ldr r3, [r3, #24] 8003f64: 0a1b lsrs r3, r3, #8 8003f66: f003 030f and.w r3, r3, #15 8003f6a: 490f ldr r1, [pc, #60] ; (8003fa8 ) 8003f6c: 5ccb ldrb r3, [r1, r3] 8003f6e: f003 031f and.w r3, r3, #31 8003f72: fa22 f303 lsr.w r3, r2, r3 8003f76: 607b str r3, [r7, #4] #else common_system_clock = HAL_RCC_GetSysClockFreq() >> (D1CorePrescTable[(RCC->CDCFGR1 & RCC_CDCFGR1_CDCPRE) >> RCC_CDCFGR1_CDCPRE_Pos] & 0x1FU); #endif #if defined(RCC_D1CFGR_HPRE) SystemD2Clock = (common_system_clock >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_HPRE) >> RCC_D1CFGR_HPRE_Pos]) & 0x1FU)); 8003f78: 4b0a ldr r3, [pc, #40] ; (8003fa4 ) 8003f7a: 699b ldr r3, [r3, #24] 8003f7c: f003 030f and.w r3, r3, #15 8003f80: 4a09 ldr r2, [pc, #36] ; (8003fa8 ) 8003f82: 5cd3 ldrb r3, [r2, r3] 8003f84: f003 031f and.w r3, r3, #31 8003f88: 687a ldr r2, [r7, #4] 8003f8a: fa22 f303 lsr.w r3, r2, r3 8003f8e: 4a07 ldr r2, [pc, #28] ; (8003fac ) 8003f90: 6013 str r3, [r2, #0] #endif #if defined(DUAL_CORE) && defined(CORE_CM4) SystemCoreClock = SystemD2Clock; #else SystemCoreClock = common_system_clock; 8003f92: 4a07 ldr r2, [pc, #28] ; (8003fb0 ) 8003f94: 687b ldr r3, [r7, #4] 8003f96: 6013 str r3, [r2, #0] #endif /* DUAL_CORE && CORE_CM4 */ return SystemD2Clock; 8003f98: 4b04 ldr r3, [pc, #16] ; (8003fac ) 8003f9a: 681b ldr r3, [r3, #0] } 8003f9c: 4618 mov r0, r3 8003f9e: 3708 adds r7, #8 8003fa0: 46bd mov sp, r7 8003fa2: bd80 pop {r7, pc} 8003fa4: 58024400 .word 0x58024400 8003fa8: 08014c80 .word 0x08014c80 8003fac: 24000004 .word 0x24000004 8003fb0: 24000000 .word 0x24000000 08003fb4 : struct pbuf *p); /** Close control or data pcb * @param pointer to lwftp session data */ static err_t lwftp_pcb_close(struct tcp_pcb *tpcb) { 8003fb4: b580 push {r7, lr} 8003fb6: b084 sub sp, #16 8003fb8: af00 add r7, sp, #0 8003fba: 6078 str r0, [r7, #4] err_t error; tcp_err(tpcb, NULL); 8003fbc: 2100 movs r1, #0 8003fbe: 6878 ldr r0, [r7, #4] 8003fc0: f004 fe24 bl 8008c0c tcp_recv(tpcb, NULL); 8003fc4: 2100 movs r1, #0 8003fc6: 6878 ldr r0, [r7, #4] 8003fc8: f004 fddc bl 8008b84 tcp_sent(tpcb, NULL); 8003fcc: 2100 movs r1, #0 8003fce: 6878 ldr r0, [r7, #4] 8003fd0: f004 fdfa bl 8008bc8 error = tcp_close(tpcb); 8003fd4: 6878 ldr r0, [r7, #4] 8003fd6: f003 fc9b bl 8007910 8003fda: 4603 mov r3, r0 8003fdc: 73fb strb r3, [r7, #15] if (error != ERR_OK) { 8003fde: f997 300f ldrsb.w r3, [r7, #15] 8003fe2: 2b00 cmp r3, #0 8003fe4: d002 beq.n 8003fec LWIP_DEBUGF(LWFTP_SEVERE, ("lwftp:pcb close failure, not implemented\n")); 8003fe6: 4804 ldr r0, [pc, #16] ; (8003ff8 ) 8003fe8: f00c fe5c bl 8010ca4 } return ERR_OK; 8003fec: 2300 movs r3, #0 } 8003fee: 4618 mov r0, r3 8003ff0: 3710 adds r7, #16 8003ff2: 46bd mov sp, r7 8003ff4: bd80 pop {r7, pc} 8003ff6: bf00 nop 8003ff8: 0801167c .word 0x0801167c 08003ffc : /** Send data * @param pointer to lwftp session data * @param pointer to PCB * @param number of bytes sent */ static err_t lwftp_send_next_data(lwftp_session_t *s) { 8003ffc: b580 push {r7, lr} 8003ffe: b086 sub sp, #24 8004000: af00 add r7, sp, #0 8004002: 6078 str r0, [r7, #4] const char *data; int len = 0; 8004004: 2300 movs r3, #0 8004006: 617b str r3, [r7, #20] err_t error = ERR_OK; 8004008: 2300 movs r3, #0 800400a: 74fb strb r3, [r7, #19] if (s->data_source) { 800400c: 687b ldr r3, [r7, #4] 800400e: 699b ldr r3, [r3, #24] 8004010: 2b00 cmp r3, #0 8004012: d026 beq.n 8004062 len = s->data_source(s->handle, &data, s->data_pcb->mss); 8004014: 687b ldr r3, [r7, #4] 8004016: 699b ldr r3, [r3, #24] 8004018: 687a ldr r2, [r7, #4] 800401a: 6950 ldr r0, [r2, #20] 800401c: 687a ldr r2, [r7, #4] 800401e: 6b12 ldr r2, [r2, #48] ; 0x30 8004020: 8e52 ldrh r2, [r2, #50] ; 0x32 8004022: f107 010c add.w r1, r7, #12 8004026: 4798 blx r3 8004028: 4603 mov r3, r0 800402a: 617b str r3, [r7, #20] if (len) { 800402c: 697b ldr r3, [r7, #20] 800402e: 2b00 cmp r3, #0 8004030: d017 beq.n 8004062 error = tcp_write(s->data_pcb, data, len, 0); 8004032: 687b ldr r3, [r7, #4] 8004034: 6b18 ldr r0, [r3, #48] ; 0x30 8004036: 68f9 ldr r1, [r7, #12] 8004038: 697b ldr r3, [r7, #20] 800403a: b29a uxth r2, r3 800403c: 2300 movs r3, #0 800403e: f007 fc91 bl 800b964 8004042: 4603 mov r3, r0 8004044: 74fb strb r3, [r7, #19] if (error != ERR_OK) { 8004046: f997 3013 ldrsb.w r3, [r7, #19] 800404a: 2b00 cmp r3, #0 800404c: d009 beq.n 8004062 LWIP_DEBUGF(LWFTP_SEVERE, ("lwftp:write failure (%s), not implemented\n",lwip_strerr(error))); 800404e: f997 3013 ldrsb.w r3, [r7, #19] 8004052: 4618 mov r0, r3 8004054: f001 fa5a bl 800550c 8004058: 4603 mov r3, r0 800405a: 4619 mov r1, r3 800405c: 480a ldr r0, [pc, #40] ; (8004088 ) 800405e: f00c fdb3 bl 8010bc8 } } } if (!len) { 8004062: 697b ldr r3, [r7, #20] 8004064: 2b00 cmp r3, #0 8004066: d10a bne.n 800407e LWIP_DEBUGF(LWFTP_STATE, ("lwftp:end of file\n")); 8004068: 4808 ldr r0, [pc, #32] ; (800408c ) 800406a: f00c fe1b bl 8010ca4 lwftp_pcb_close(s->data_pcb); 800406e: 687b ldr r3, [r7, #4] 8004070: 6b1b ldr r3, [r3, #48] ; 0x30 8004072: 4618 mov r0, r3 8004074: f7ff ff9e bl 8003fb4 s->data_pcb = NULL; 8004078: 687b ldr r3, [r7, #4] 800407a: 2200 movs r2, #0 800407c: 631a str r2, [r3, #48] ; 0x30 } return ERR_OK; 800407e: 2300 movs r3, #0 } 8004080: 4618 mov r0, r3 8004082: 3718 adds r7, #24 8004084: 46bd mov sp, r7 8004086: bd80 pop {r7, pc} 8004088: 080116a8 .word 0x080116a8 800408c: 080116d4 .word 0x080116d4 08004090 : * @param pointer to PCB * @param pointer to incoming pbuf * @param state of incoming process */ static err_t lwftp_data_recv(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err) { 8004090: b580 push {r7, lr} 8004092: b086 sub sp, #24 8004094: af00 add r7, sp, #0 8004096: 60f8 str r0, [r7, #12] 8004098: 60b9 str r1, [r7, #8] 800409a: 607a str r2, [r7, #4] 800409c: 70fb strb r3, [r7, #3] lwftp_session_t *s = (lwftp_session_t*) arg; 800409e: 68fb ldr r3, [r7, #12] 80040a0: 613b str r3, [r7, #16] if (p) { 80040a2: 687b ldr r3, [r7, #4] 80040a4: 2b00 cmp r3, #0 80040a6: d026 beq.n 80040f6 if (s->data_sink) { 80040a8: 693b ldr r3, [r7, #16] 80040aa: 69db ldr r3, [r3, #28] 80040ac: 2b00 cmp r3, #0 80040ae: d012 beq.n 80040d6 struct pbuf *q; for (q = p; q; q = q->next) { 80040b0: 687b ldr r3, [r7, #4] 80040b2: 617b str r3, [r7, #20] 80040b4: e00b b.n 80040ce s->data_sink(s->handle, q->payload, q->len); 80040b6: 693b ldr r3, [r7, #16] 80040b8: 69db ldr r3, [r3, #28] 80040ba: 693a ldr r2, [r7, #16] 80040bc: 6950 ldr r0, [r2, #20] 80040be: 697a ldr r2, [r7, #20] 80040c0: 6851 ldr r1, [r2, #4] 80040c2: 697a ldr r2, [r7, #20] 80040c4: 8952 ldrh r2, [r2, #10] 80040c6: 4798 blx r3 for (q = p; q; q = q->next) { 80040c8: 697b ldr r3, [r7, #20] 80040ca: 681b ldr r3, [r3, #0] 80040cc: 617b str r3, [r7, #20] 80040ce: 697b ldr r3, [r7, #20] 80040d0: 2b00 cmp r3, #0 80040d2: d1f0 bne.n 80040b6 80040d4: e005 b.n 80040e2 } } else { LWIP_DEBUGF(LWFTP_SEVERE, ("lwftp: sinking %d bytes\n",p->tot_len)); 80040d6: 687b ldr r3, [r7, #4] 80040d8: 891b ldrh r3, [r3, #8] 80040da: 4619 mov r1, r3 80040dc: 480e ldr r0, [pc, #56] ; (8004118 ) 80040de: f00c fd73 bl 8010bc8 } tcp_recved(tpcb, p->tot_len); 80040e2: 687b ldr r3, [r7, #4] 80040e4: 891b ldrh r3, [r3, #8] 80040e6: 4619 mov r1, r3 80040e8: 68b8 ldr r0, [r7, #8] 80040ea: f003 fd61 bl 8007bb0 pbuf_free(p); 80040ee: 6878 ldr r0, [r7, #4] 80040f0: f002 ff70 bl 8006fd4 80040f4: e00a b.n 800410c } else { // NULL pbuf shall lead to close the pcb. Close is postponed after // the session state machine updates. No need to close right here. // Instead we kindly tell data sink we are done if (s->data_sink) { 80040f6: 693b ldr r3, [r7, #16] 80040f8: 69db ldr r3, [r3, #28] 80040fa: 2b00 cmp r3, #0 80040fc: d006 beq.n 800410c s->data_sink(s->handle, NULL, 0); 80040fe: 693b ldr r3, [r7, #16] 8004100: 69db ldr r3, [r3, #28] 8004102: 693a ldr r2, [r7, #16] 8004104: 6950 ldr r0, [r2, #20] 8004106: 2200 movs r2, #0 8004108: 2100 movs r1, #0 800410a: 4798 blx r3 } } return ERR_OK; 800410c: 2300 movs r3, #0 } 800410e: 4618 mov r0, r3 8004110: 3718 adds r7, #24 8004112: 46bd mov sp, r7 8004114: bd80 pop {r7, pc} 8004116: bf00 nop 8004118: 080116e8 .word 0x080116e8 0800411c : /** Handle data connection acknowledge of sent data * @param pointer to lwftp session data * @param pointer to PCB * @param number of bytes sent */ static err_t lwftp_data_sent(void *arg, struct tcp_pcb *tpcb, u16_t len) { 800411c: b580 push {r7, lr} 800411e: b086 sub sp, #24 8004120: af00 add r7, sp, #0 8004122: 60f8 str r0, [r7, #12] 8004124: 60b9 str r1, [r7, #8] 8004126: 4613 mov r3, r2 8004128: 80fb strh r3, [r7, #6] lwftp_session_t *s = (lwftp_session_t*) arg; 800412a: 68fb ldr r3, [r7, #12] 800412c: 617b str r3, [r7, #20] if (s->data_source) { 800412e: 697b ldr r3, [r7, #20] 8004130: 699b ldr r3, [r3, #24] 8004132: 2b00 cmp r3, #0 8004134: d006 beq.n 8004144 s->data_source(s->handle, NULL, len); 8004136: 697b ldr r3, [r7, #20] 8004138: 699b ldr r3, [r3, #24] 800413a: 697a ldr r2, [r7, #20] 800413c: 6950 ldr r0, [r2, #20] 800413e: 88fa ldrh r2, [r7, #6] 8004140: 2100 movs r1, #0 8004142: 4798 blx r3 } return lwftp_send_next_data(s); 8004144: 6978 ldr r0, [r7, #20] 8004146: f7ff ff59 bl 8003ffc 800414a: 4603 mov r3, r0 } 800414c: 4618 mov r0, r3 800414e: 3718 adds r7, #24 8004150: 46bd mov sp, r7 8004152: bd80 pop {r7, pc} 08004154 : /** Handle data connection error * @param pointer to lwftp session data * @param state of connection */ static void lwftp_data_err(void *arg, err_t err) { 8004154: b580 push {r7, lr} 8004156: b084 sub sp, #16 8004158: af00 add r7, sp, #0 800415a: 6078 str r0, [r7, #4] 800415c: 460b mov r3, r1 800415e: 70fb strb r3, [r7, #3] LWIP_UNUSED_ARG(err); if (arg != NULL) { 8004160: 687b ldr r3, [r7, #4] 8004162: 2b00 cmp r3, #0 8004164: d01c beq.n 80041a0 lwftp_session_t *s = (lwftp_session_t*) arg; 8004166: 687b ldr r3, [r7, #4] 8004168: 60fb str r3, [r7, #12] LWIP_DEBUGF(LWFTP_WARNING, ("lwftp:failed/error connecting for data to server (%s)\n",lwip_strerr(err))); 800416a: f997 3003 ldrsb.w r3, [r7, #3] 800416e: 4618 mov r0, r3 8004170: f001 f9cc bl 800550c 8004174: 4603 mov r3, r0 8004176: 4619 mov r1, r3 8004178: 480b ldr r0, [pc, #44] ; (80041a8 ) 800417a: f00c fd25 bl 8010bc8 s->data_pcb = NULL; // No need to de-allocate PCB 800417e: 68fb ldr r3, [r7, #12] 8004180: 2200 movs r2, #0 8004182: 631a str r2, [r3, #48] ; 0x30 if (s->control_state == LWFTP_XFERING) { // gracefully move control session ahead 8004184: 68fb ldr r3, [r7, #12] 8004186: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 800418a: 2b09 cmp r3, #9 800418c: d108 bne.n 80041a0 s->control_state = LWFTP_DATAEND; 800418e: 68fb ldr r3, [r7, #12] 8004190: 220a movs r2, #10 8004192: f883 2028 strb.w r2, [r3, #40] ; 0x28 lwftp_control_process(s, NULL, NULL); 8004196: 2200 movs r2, #0 8004198: 2100 movs r1, #0 800419a: 68f8 ldr r0, [r7, #12] 800419c: f000 f97c bl 8004498 } } } 80041a0: bf00 nop 80041a2: 3710 adds r7, #16 80041a4: 46bd mov sp, r7 80041a6: bd80 pop {r7, pc} 80041a8: 08011704 .word 0x08011704 080041ac : /** Process newly connected PCB * @param pointer to lwftp session data * @param pointer to PCB * @param state of connection */ static err_t lwftp_data_connected(void *arg, struct tcp_pcb *tpcb, err_t err) { 80041ac: b580 push {r7, lr} 80041ae: b086 sub sp, #24 80041b0: af00 add r7, sp, #0 80041b2: 60f8 str r0, [r7, #12] 80041b4: 60b9 str r1, [r7, #8] 80041b6: 4613 mov r3, r2 80041b8: 71fb strb r3, [r7, #7] lwftp_session_t *s = (lwftp_session_t*) arg; 80041ba: 68fb ldr r3, [r7, #12] 80041bc: 617b str r3, [r7, #20] if (err == ERR_OK) { 80041be: f997 3007 ldrsb.w r3, [r7, #7] 80041c2: 2b00 cmp r3, #0 80041c4: d107 bne.n 80041d6 LWIP_DEBUGF(LWFTP_STATE, ("lwftp:connected for data to server\n")); 80041c6: 480c ldr r0, [pc, #48] ; (80041f8 ) 80041c8: f00c fd6c bl 8010ca4 s->data_state = LWFTP_CONNECTED; 80041cc: 697b ldr r3, [r7, #20] 80041ce: 2201 movs r2, #1 80041d0: f883 202a strb.w r2, [r3, #42] ; 0x2a 80041d4: e009 b.n 80041ea } else { LWIP_DEBUGF(LWFTP_WARNING, ("lwftp:err in data_connected (%s)\n",lwip_strerr(err))); 80041d6: f997 3007 ldrsb.w r3, [r7, #7] 80041da: 4618 mov r0, r3 80041dc: f001 f996 bl 800550c 80041e0: 4603 mov r3, r0 80041e2: 4619 mov r1, r3 80041e4: 4805 ldr r0, [pc, #20] ; (80041fc ) 80041e6: f00c fcef bl 8010bc8 } return err; 80041ea: f997 3007 ldrsb.w r3, [r7, #7] } 80041ee: 4618 mov r0, r3 80041f0: 3718 adds r7, #24 80041f2: 46bd mov sp, r7 80041f4: bd80 pop {r7, pc} 80041f6: bf00 nop 80041f8: 0801173c .word 0x0801173c 80041fc: 08011760 .word 0x08011760 08004200 : /** Open data connection for passive transfer * @param pointer to lwftp session data * @param pointer to incoming PASV response */ static err_t lwftp_data_open(lwftp_session_t *s, struct pbuf *p) { 8004200: b580 push {r7, lr} 8004202: b08a sub sp, #40 ; 0x28 8004204: af00 add r7, sp, #0 8004206: 6078 str r0, [r7, #4] 8004208: 6039 str r1, [r7, #0] char *ptr; ip_addr_t data_server; u16_t data_port; // Find server connection parameter ptr = strchr(p->payload, '('); 800420a: 683b ldr r3, [r7, #0] 800420c: 685b ldr r3, [r3, #4] 800420e: 2128 movs r1, #40 ; 0x28 8004210: 4618 mov r0, r3 8004212: f00c fe3f bl 8010e94 8004216: 4603 mov r3, r0 8004218: 613b str r3, [r7, #16] if (!ptr) 800421a: 693b ldr r3, [r7, #16] 800421c: 2b00 cmp r3, #0 800421e: d102 bne.n 8004226 return ERR_BUF; 8004220: f06f 0301 mvn.w r3, #1 8004224: e0ac b.n 8004380 do { unsigned int a = strtoul(ptr + 1, &ptr, 10); 8004226: 693b ldr r3, [r7, #16] 8004228: 3301 adds r3, #1 800422a: f107 0110 add.w r1, r7, #16 800422e: 220a movs r2, #10 8004230: 4618 mov r0, r3 8004232: f00c f8c5 bl 80103c0 8004236: 6278 str r0, [r7, #36] ; 0x24 unsigned int b = strtoul(ptr + 1, &ptr, 10); 8004238: 693b ldr r3, [r7, #16] 800423a: 3301 adds r3, #1 800423c: f107 0110 add.w r1, r7, #16 8004240: 220a movs r2, #10 8004242: 4618 mov r0, r3 8004244: f00c f8bc bl 80103c0 8004248: 6238 str r0, [r7, #32] unsigned int c = strtoul(ptr + 1, &ptr, 10); 800424a: 693b ldr r3, [r7, #16] 800424c: 3301 adds r3, #1 800424e: f107 0110 add.w r1, r7, #16 8004252: 220a movs r2, #10 8004254: 4618 mov r0, r3 8004256: f00c f8b3 bl 80103c0 800425a: 61f8 str r0, [r7, #28] unsigned int d = strtoul(ptr + 1, &ptr, 10); 800425c: 693b ldr r3, [r7, #16] 800425e: 3301 adds r3, #1 8004260: f107 0110 add.w r1, r7, #16 8004264: 220a movs r2, #10 8004266: 4618 mov r0, r3 8004268: f00c f8aa bl 80103c0 800426c: 61b8 str r0, [r7, #24] IP4_ADDR(&data_server, a, b, c, d); 800426e: 6a7b ldr r3, [r7, #36] ; 0x24 8004270: 061a lsls r2, r3, #24 8004272: 6a3b ldr r3, [r7, #32] 8004274: 041b lsls r3, r3, #16 8004276: f403 037f and.w r3, r3, #16711680 ; 0xff0000 800427a: 431a orrs r2, r3 800427c: 69fb ldr r3, [r7, #28] 800427e: 021b lsls r3, r3, #8 8004280: b29b uxth r3, r3 8004282: 431a orrs r2, r3 8004284: 69bb ldr r3, [r7, #24] 8004286: b2db uxtb r3, r3 8004288: 4313 orrs r3, r2 800428a: 061a lsls r2, r3, #24 800428c: 6a7b ldr r3, [r7, #36] ; 0x24 800428e: 0619 lsls r1, r3, #24 8004290: 6a3b ldr r3, [r7, #32] 8004292: 041b lsls r3, r3, #16 8004294: f403 037f and.w r3, r3, #16711680 ; 0xff0000 8004298: 4319 orrs r1, r3 800429a: 69fb ldr r3, [r7, #28] 800429c: 021b lsls r3, r3, #8 800429e: b29b uxth r3, r3 80042a0: 4319 orrs r1, r3 80042a2: 69bb ldr r3, [r7, #24] 80042a4: b2db uxtb r3, r3 80042a6: 430b orrs r3, r1 80042a8: 021b lsls r3, r3, #8 80042aa: f403 037f and.w r3, r3, #16711680 ; 0xff0000 80042ae: 431a orrs r2, r3 80042b0: 6a7b ldr r3, [r7, #36] ; 0x24 80042b2: 0619 lsls r1, r3, #24 80042b4: 6a3b ldr r3, [r7, #32] 80042b6: 041b lsls r3, r3, #16 80042b8: f403 037f and.w r3, r3, #16711680 ; 0xff0000 80042bc: 4319 orrs r1, r3 80042be: 69fb ldr r3, [r7, #28] 80042c0: 021b lsls r3, r3, #8 80042c2: b29b uxth r3, r3 80042c4: 4319 orrs r1, r3 80042c6: 69bb ldr r3, [r7, #24] 80042c8: b2db uxtb r3, r3 80042ca: 430b orrs r3, r1 80042cc: 0a1b lsrs r3, r3, #8 80042ce: f403 437f and.w r3, r3, #65280 ; 0xff00 80042d2: 431a orrs r2, r3 80042d4: 6a7b ldr r3, [r7, #36] ; 0x24 80042d6: 0619 lsls r1, r3, #24 80042d8: 6a3b ldr r3, [r7, #32] 80042da: 041b lsls r3, r3, #16 80042dc: f403 037f and.w r3, r3, #16711680 ; 0xff0000 80042e0: 4319 orrs r1, r3 80042e2: 69fb ldr r3, [r7, #28] 80042e4: 021b lsls r3, r3, #8 80042e6: b29b uxth r3, r3 80042e8: 4319 orrs r1, r3 80042ea: 69bb ldr r3, [r7, #24] 80042ec: b2db uxtb r3, r3 80042ee: 430b orrs r3, r1 80042f0: 0e1b lsrs r3, r3, #24 80042f2: 4313 orrs r3, r2 80042f4: 60fb str r3, [r7, #12] } while (0); data_port = strtoul(ptr + 1, &ptr, 10) << 8; 80042f6: 693b ldr r3, [r7, #16] 80042f8: 3301 adds r3, #1 80042fa: f107 0110 add.w r1, r7, #16 80042fe: 220a movs r2, #10 8004300: 4618 mov r0, r3 8004302: f00c f85d bl 80103c0 8004306: 4603 mov r3, r0 8004308: b29b uxth r3, r3 800430a: 021b lsls r3, r3, #8 800430c: 82fb strh r3, [r7, #22] data_port |= strtoul(ptr + 1, &ptr, 10) & 255; 800430e: 693b ldr r3, [r7, #16] 8004310: 3301 adds r3, #1 8004312: f107 0110 add.w r1, r7, #16 8004316: 220a movs r2, #10 8004318: 4618 mov r0, r3 800431a: f00c f851 bl 80103c0 800431e: 4603 mov r3, r0 8004320: b2db uxtb r3, r3 8004322: b29a uxth r2, r3 8004324: 8afb ldrh r3, [r7, #22] 8004326: 4313 orrs r3, r2 8004328: 82fb strh r3, [r7, #22] if (*ptr != ')') 800432a: 693b ldr r3, [r7, #16] 800432c: 781b ldrb r3, [r3, #0] 800432e: 2b29 cmp r3, #41 ; 0x29 8004330: d002 beq.n 8004338 return ERR_BUF; 8004332: f06f 0301 mvn.w r3, #1 8004336: e023 b.n 8004380 // Open data session tcp_arg(s->data_pcb, s); 8004338: 687b ldr r3, [r7, #4] 800433a: 6b1b ldr r3, [r3, #48] ; 0x30 800433c: 6879 ldr r1, [r7, #4] 800433e: 4618 mov r0, r3 8004340: f004 fc0e bl 8008b60 tcp_err(s->data_pcb, lwftp_data_err); 8004344: 687b ldr r3, [r7, #4] 8004346: 6b1b ldr r3, [r3, #48] ; 0x30 8004348: 490f ldr r1, [pc, #60] ; (8004388 ) 800434a: 4618 mov r0, r3 800434c: f004 fc5e bl 8008c0c tcp_recv(s->data_pcb, lwftp_data_recv); 8004350: 687b ldr r3, [r7, #4] 8004352: 6b1b ldr r3, [r3, #48] ; 0x30 8004354: 490d ldr r1, [pc, #52] ; (800438c ) 8004356: 4618 mov r0, r3 8004358: f004 fc14 bl 8008b84 tcp_sent(s->data_pcb, lwftp_data_sent); 800435c: 687b ldr r3, [r7, #4] 800435e: 6b1b ldr r3, [r3, #48] ; 0x30 8004360: 490b ldr r1, [pc, #44] ; (8004390 ) 8004362: 4618 mov r0, r3 8004364: f004 fc30 bl 8008bc8 error = tcp_connect(s->data_pcb, &data_server, data_port, 8004368: 687b ldr r3, [r7, #4] 800436a: 6b18 ldr r0, [r3, #48] ; 0x30 800436c: 8afa ldrh r2, [r7, #22] 800436e: f107 010c add.w r1, r7, #12 8004372: 4b08 ldr r3, [pc, #32] ; (8004394 ) 8004374: f003 fcb2 bl 8007cdc 8004378: 4603 mov r3, r0 800437a: 757b strb r3, [r7, #21] lwftp_data_connected); return error; 800437c: f997 3015 ldrsb.w r3, [r7, #21] } 8004380: 4618 mov r0, r3 8004382: 3728 adds r7, #40 ; 0x28 8004384: 46bd mov sp, r7 8004386: bd80 pop {r7, pc} 8004388: 08004155 .word 0x08004155 800438c: 08004091 .word 0x08004091 8004390: 0800411d .word 0x0800411d 8004394: 080041ad .word 0x080041ad 08004398 : /** Send a message to control connection * @param pointer to lwftp session data * @param pointer to message string */ static err_t lwftp_send_msg(lwftp_session_t *s, const char *msg, size_t len) { 8004398: b580 push {r7, lr} 800439a: b086 sub sp, #24 800439c: af00 add r7, sp, #0 800439e: 60f8 str r0, [r7, #12] 80043a0: 60b9 str r1, [r7, #8] 80043a2: 607a str r2, [r7, #4] err_t error; LWIP_DEBUGF(LWFTP_TRACE,("lwftp:sending %s",msg)); 80043a4: 68b9 ldr r1, [r7, #8] 80043a6: 4810 ldr r0, [pc, #64] ; (80043e8 ) 80043a8: f00c fc0e bl 8010bc8 error = tcp_write(s->control_pcb, msg, len, 0); 80043ac: 68fb ldr r3, [r7, #12] 80043ae: 6ad8 ldr r0, [r3, #44] ; 0x2c 80043b0: 687b ldr r3, [r7, #4] 80043b2: b29a uxth r2, r3 80043b4: 2300 movs r3, #0 80043b6: 68b9 ldr r1, [r7, #8] 80043b8: f007 fad4 bl 800b964 80043bc: 4603 mov r3, r0 80043be: 75fb strb r3, [r7, #23] if (error != ERR_OK) { 80043c0: f997 3017 ldrsb.w r3, [r7, #23] 80043c4: 2b00 cmp r3, #0 80043c6: d009 beq.n 80043dc LWIP_DEBUGF(LWFTP_WARNING, ("lwftp:cannot write (%s)\n",lwip_strerr(error))); 80043c8: f997 3017 ldrsb.w r3, [r7, #23] 80043cc: 4618 mov r0, r3 80043ce: f001 f89d bl 800550c 80043d2: 4603 mov r3, r0 80043d4: 4619 mov r1, r3 80043d6: 4805 ldr r0, [pc, #20] ; (80043ec ) 80043d8: f00c fbf6 bl 8010bc8 } return error; 80043dc: f997 3017 ldrsb.w r3, [r7, #23] } 80043e0: 4618 mov r0, r3 80043e2: 3718 adds r7, #24 80043e4: 46bd mov sp, r7 80043e6: bd80 pop {r7, pc} 80043e8: 08011784 .word 0x08011784 80043ec: 08011798 .word 0x08011798 080043f0 : /** Close data connection * @param pointer to lwftp session data * @param result to pass to callback fn (if called) */ static void lwftp_data_close(lwftp_session_t *s, int result) { 80043f0: b580 push {r7, lr} 80043f2: b082 sub sp, #8 80043f4: af00 add r7, sp, #0 80043f6: 6078 str r0, [r7, #4] 80043f8: 6039 str r1, [r7, #0] if (s->data_pcb) { 80043fa: 687b ldr r3, [r7, #4] 80043fc: 6b1b ldr r3, [r3, #48] ; 0x30 80043fe: 2b00 cmp r3, #0 8004400: d007 beq.n 8004412 lwftp_pcb_close(s->data_pcb); 8004402: 687b ldr r3, [r7, #4] 8004404: 6b1b ldr r3, [r3, #48] ; 0x30 8004406: 4618 mov r0, r3 8004408: f7ff fdd4 bl 8003fb4 s->data_pcb = NULL; 800440c: 687b ldr r3, [r7, #4] 800440e: 2200 movs r2, #0 8004410: 631a str r2, [r3, #48] ; 0x30 } if (s->done_fn) { 8004412: 687b ldr r3, [r7, #4] 8004414: 6a1b ldr r3, [r3, #32] 8004416: 2b00 cmp r3, #0 8004418: d006 beq.n 8004428 s->done_fn(s->handle, result); 800441a: 687b ldr r3, [r7, #4] 800441c: 6a1b ldr r3, [r3, #32] 800441e: 687a ldr r2, [r7, #4] 8004420: 6952 ldr r2, [r2, #20] 8004422: 6839 ldr r1, [r7, #0] 8004424: 4610 mov r0, r2 8004426: 4798 blx r3 } } 8004428: bf00 nop 800442a: 3708 adds r7, #8 800442c: 46bd mov sp, r7 800442e: bd80 pop {r7, pc} 08004430 : /** Close control connection * @param pointer to lwftp session data * @param result to pass to callback fn (if called) */ static void lwftp_control_close(lwftp_session_t *s, int result) { 8004430: b580 push {r7, lr} 8004432: b082 sub sp, #8 8004434: af00 add r7, sp, #0 8004436: 6078 str r0, [r7, #4] 8004438: 6039 str r1, [r7, #0] if (s->data_pcb) { 800443a: 687b ldr r3, [r7, #4] 800443c: 6b1b ldr r3, [r3, #48] ; 0x30 800443e: 2b00 cmp r3, #0 8004440: d007 beq.n 8004452 lwftp_pcb_close(s->data_pcb); 8004442: 687b ldr r3, [r7, #4] 8004444: 6b1b ldr r3, [r3, #48] ; 0x30 8004446: 4618 mov r0, r3 8004448: f7ff fdb4 bl 8003fb4 s->data_pcb = NULL; 800444c: 687b ldr r3, [r7, #4] 800444e: 2200 movs r2, #0 8004450: 631a str r2, [r3, #48] ; 0x30 } if (s->control_pcb) { 8004452: 687b ldr r3, [r7, #4] 8004454: 6adb ldr r3, [r3, #44] ; 0x2c 8004456: 2b00 cmp r3, #0 8004458: d007 beq.n 800446a lwftp_pcb_close(s->control_pcb); 800445a: 687b ldr r3, [r7, #4] 800445c: 6adb ldr r3, [r3, #44] ; 0x2c 800445e: 4618 mov r0, r3 8004460: f7ff fda8 bl 8003fb4 s->control_pcb = NULL; 8004464: 687b ldr r3, [r7, #4] 8004466: 2200 movs r2, #0 8004468: 62da str r2, [r3, #44] ; 0x2c } s->control_state = LWFTP_CLOSED; 800446a: 687b ldr r3, [r7, #4] 800446c: 2200 movs r2, #0 800446e: f883 2028 strb.w r2, [r3, #40] ; 0x28 if ((result >= 0) && s->done_fn) { 8004472: 683b ldr r3, [r7, #0] 8004474: 2b00 cmp r3, #0 8004476: db0a blt.n 800448e 8004478: 687b ldr r3, [r7, #4] 800447a: 6a1b ldr r3, [r3, #32] 800447c: 2b00 cmp r3, #0 800447e: d006 beq.n 800448e s->done_fn(s->handle, result); 8004480: 687b ldr r3, [r7, #4] 8004482: 6a1b ldr r3, [r3, #32] 8004484: 687a ldr r2, [r7, #4] 8004486: 6952 ldr r2, [r2, #20] 8004488: 6839 ldr r1, [r7, #0] 800448a: 4610 mov r0, r2 800448c: 4798 blx r3 } } 800448e: bf00 nop 8004490: 3708 adds r7, #8 8004492: 46bd mov sp, r7 8004494: bd80 pop {r7, pc} ... 08004498 : * @param pointer to lwftp session data * @param pointer to PCB * @param pointer to incoming data */ static void lwftp_control_process(lwftp_session_t *s, struct tcp_pcb *tpcb, struct pbuf *p) { 8004498: b590 push {r4, r7, lr} 800449a: b087 sub sp, #28 800449c: af00 add r7, sp, #0 800449e: 60f8 str r0, [r7, #12] 80044a0: 60b9 str r1, [r7, #8] 80044a2: 607a str r2, [r7, #4] uint response = 0; 80044a4: 2300 movs r3, #0 80044a6: 617b str r3, [r7, #20] int result = LWFTP_RESULT_ERR_SRVR_RESP; 80044a8: 230a movs r3, #10 80044aa: 613b str r3, [r7, #16] // Try to get response number if (p) { 80044ac: 687b ldr r3, [r7, #4] 80044ae: 2b00 cmp r3, #0 80044b0: d00b beq.n 80044ca response = strtoul(p->payload, NULL, 10); 80044b2: 687b ldr r3, [r7, #4] 80044b4: 685b ldr r3, [r3, #4] 80044b6: 220a movs r2, #10 80044b8: 2100 movs r1, #0 80044ba: 4618 mov r0, r3 80044bc: f00b ff80 bl 80103c0 80044c0: 6178 str r0, [r7, #20] LWIP_DEBUGF(LWFTP_TRACE, ("lwftp:got response %d\n",response)); 80044c2: 6979 ldr r1, [r7, #20] 80044c4: 48a8 ldr r0, [pc, #672] ; (8004768 ) 80044c6: f00c fb7f bl 8010bc8 } switch (s->control_state) { 80044ca: 68fb ldr r3, [r7, #12] 80044cc: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 80044d0: 3b01 subs r3, #1 80044d2: 2b0b cmp r3, #11 80044d4: f200 816d bhi.w 80047b2 80044d8: a201 add r2, pc, #4 ; (adr r2, 80044e0 ) 80044da: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80044de: bf00 nop 80044e0: 08004511 .word 0x08004511 80044e4: 08004561 .word 0x08004561 80044e8: 080045b5 .word 0x080045b5 80044ec: 080047b3 .word 0x080047b3 80044f0: 080045f5 .word 0x080045f5 80044f4: 08004621 .word 0x08004621 80044f8: 080046a7 .word 0x080046a7 80044fc: 080046f5 .word 0x080046f5 8004500: 08004727 .word 0x08004727 8004504: 0800474f .word 0x0800474f 8004508: 080047b3 .word 0x080047b3 800450c: 08004757 .word 0x08004757 case LWFTP_CONNECTED: if (response > 0) { 8004510: 697b ldr r3, [r7, #20] 8004512: 2b00 cmp r3, #0 8004514: f000 8155 beq.w 80047c2 if (response == 220) { 8004518: 697b ldr r3, [r7, #20] 800451a: 2bdc cmp r3, #220 ; 0xdc 800451c: d11b bne.n 8004556 lwftp_send_msg(s, PTRNLEN("USER ")); 800451e: 2205 movs r2, #5 8004520: 4992 ldr r1, [pc, #584] ; (800476c ) 8004522: 68f8 ldr r0, [r7, #12] 8004524: f7ff ff38 bl 8004398 lwftp_send_msg(s, s->user, strlen(s->user)); 8004528: 68fb ldr r3, [r7, #12] 800452a: 68dc ldr r4, [r3, #12] 800452c: 68fb ldr r3, [r7, #12] 800452e: 68db ldr r3, [r3, #12] 8004530: 4618 mov r0, r3 8004532: f7fb ff3d bl 80003b0 8004536: 4603 mov r3, r0 8004538: 461a mov r2, r3 800453a: 4621 mov r1, r4 800453c: 68f8 ldr r0, [r7, #12] 800453e: f7ff ff2b bl 8004398 lwftp_send_msg(s, PTRNLEN("\r\n")); 8004542: 2202 movs r2, #2 8004544: 498a ldr r1, [pc, #552] ; (8004770 ) 8004546: 68f8 ldr r0, [r7, #12] 8004548: f7ff ff26 bl 8004398 s->control_state = LWFTP_USER_SENT; 800454c: 68fb ldr r3, [r7, #12] 800454e: 2202 movs r2, #2 8004550: f883 2028 strb.w r2, [r3, #40] ; 0x28 } else { s->control_state = LWFTP_QUIT; } } break; 8004554: e135 b.n 80047c2 s->control_state = LWFTP_QUIT; 8004556: 68fb ldr r3, [r7, #12] 8004558: 220b movs r2, #11 800455a: f883 2028 strb.w r2, [r3, #40] ; 0x28 break; 800455e: e130 b.n 80047c2 case LWFTP_USER_SENT: if (response > 0) { 8004560: 697b ldr r3, [r7, #20] 8004562: 2b00 cmp r3, #0 8004564: f000 812f beq.w 80047c6 if (response == 331) { 8004568: 697b ldr r3, [r7, #20] 800456a: f240 124b movw r2, #331 ; 0x14b 800456e: 4293 cmp r3, r2 8004570: d11b bne.n 80045aa lwftp_send_msg(s, PTRNLEN("PASS ")); 8004572: 2205 movs r2, #5 8004574: 497f ldr r1, [pc, #508] ; (8004774 ) 8004576: 68f8 ldr r0, [r7, #12] 8004578: f7ff ff0e bl 8004398 lwftp_send_msg(s, s->pass, strlen(s->pass)); 800457c: 68fb ldr r3, [r7, #12] 800457e: 691c ldr r4, [r3, #16] 8004580: 68fb ldr r3, [r7, #12] 8004582: 691b ldr r3, [r3, #16] 8004584: 4618 mov r0, r3 8004586: f7fb ff13 bl 80003b0 800458a: 4603 mov r3, r0 800458c: 461a mov r2, r3 800458e: 4621 mov r1, r4 8004590: 68f8 ldr r0, [r7, #12] 8004592: f7ff ff01 bl 8004398 lwftp_send_msg(s, PTRNLEN("\r\n")); 8004596: 2202 movs r2, #2 8004598: 4975 ldr r1, [pc, #468] ; (8004770 ) 800459a: 68f8 ldr r0, [r7, #12] 800459c: f7ff fefc bl 8004398 s->control_state = LWFTP_PASS_SENT; 80045a0: 68fb ldr r3, [r7, #12] 80045a2: 2203 movs r2, #3 80045a4: f883 2028 strb.w r2, [r3, #40] ; 0x28 } else { s->control_state = LWFTP_QUIT; } } break; 80045a8: e10d b.n 80047c6 s->control_state = LWFTP_QUIT; 80045aa: 68fb ldr r3, [r7, #12] 80045ac: 220b movs r2, #11 80045ae: f883 2028 strb.w r2, [r3, #40] ; 0x28 break; 80045b2: e108 b.n 80047c6 case LWFTP_PASS_SENT: if (response > 0) { 80045b4: 697b ldr r3, [r7, #20] 80045b6: 2b00 cmp r3, #0 80045b8: f000 8107 beq.w 80047ca if (response == 230) { 80045bc: 697b ldr r3, [r7, #20] 80045be: 2be6 cmp r3, #230 ; 0xe6 80045c0: d113 bne.n 80045ea s->control_state = LWFTP_LOGGED; 80045c2: 68fb ldr r3, [r7, #12] 80045c4: 2204 movs r2, #4 80045c6: f883 2028 strb.w r2, [r3, #40] ; 0x28 LWIP_DEBUGF(LWFTP_STATE, ("lwftp: now logged in\n")); 80045ca: 486b ldr r0, [pc, #428] ; (8004778 ) 80045cc: f00c fb6a bl 8010ca4 if (s->done_fn) { 80045d0: 68fb ldr r3, [r7, #12] 80045d2: 6a1b ldr r3, [r3, #32] 80045d4: 2b00 cmp r3, #0 80045d6: f000 80f8 beq.w 80047ca s->done_fn(s->handle, LWFTP_RESULT_LOGGED); 80045da: 68fb ldr r3, [r7, #12] 80045dc: 6a1b ldr r3, [r3, #32] 80045de: 68fa ldr r2, [r7, #12] 80045e0: 6952 ldr r2, [r2, #20] 80045e2: 2102 movs r1, #2 80045e4: 4610 mov r0, r2 80045e6: 4798 blx r3 } } else { s->control_state = LWFTP_QUIT; } } break; 80045e8: e0ef b.n 80047ca s->control_state = LWFTP_QUIT; 80045ea: 68fb ldr r3, [r7, #12] 80045ec: 220b movs r2, #11 80045ee: f883 2028 strb.w r2, [r3, #40] ; 0x28 break; 80045f2: e0ea b.n 80047ca case LWFTP_TYPE_SENT: if (response > 0) { 80045f4: 697b ldr r3, [r7, #20] 80045f6: 2b00 cmp r3, #0 80045f8: f000 80e9 beq.w 80047ce if (response == 200) { 80045fc: 697b ldr r3, [r7, #20] 80045fe: 2bc8 cmp r3, #200 ; 0xc8 8004600: d109 bne.n 8004616 lwftp_send_msg(s, PTRNLEN("PASV\r\n")); 8004602: 2206 movs r2, #6 8004604: 495d ldr r1, [pc, #372] ; (800477c ) 8004606: 68f8 ldr r0, [r7, #12] 8004608: f7ff fec6 bl 8004398 s->control_state = LWFTP_PASV_SENT; 800460c: 68fb ldr r3, [r7, #12] 800460e: 2206 movs r2, #6 8004610: f883 2028 strb.w r2, [r3, #40] ; 0x28 } else { s->control_state = LWFTP_QUIT; } } break; 8004614: e0db b.n 80047ce s->control_state = LWFTP_QUIT; 8004616: 68fb ldr r3, [r7, #12] 8004618: 220b movs r2, #11 800461a: f883 2028 strb.w r2, [r3, #40] ; 0x28 break; 800461e: e0d6 b.n 80047ce case LWFTP_PASV_SENT: if (response > 0) { 8004620: 697b ldr r3, [r7, #20] 8004622: 2b00 cmp r3, #0 8004624: f000 80d5 beq.w 80047d2 if (response == 227) { 8004628: 697b ldr r3, [r7, #20] 800462a: 2be3 cmp r3, #227 ; 0xe3 800462c: d136 bne.n 800469c lwftp_data_open(s, p); 800462e: 6879 ldr r1, [r7, #4] 8004630: 68f8 ldr r0, [r7, #12] 8004632: f7ff fde5 bl 8004200 switch (s->target_state) { 8004636: 68fb ldr r3, [r7, #12] 8004638: f893 3029 ldrb.w r3, [r3, #41] ; 0x29 800463c: 2b07 cmp r3, #7 800463e: d007 beq.n 8004650 8004640: 2b08 cmp r3, #8 8004642: d10b bne.n 800465c case LWFTP_STOR_SENT: lwftp_send_msg(s, PTRNLEN("STOR ")); 8004644: 2205 movs r2, #5 8004646: 494e ldr r1, [pc, #312] ; (8004780 ) 8004648: 68f8 ldr r0, [r7, #12] 800464a: f7ff fea5 bl 8004398 break; 800464e: e00c b.n 800466a case LWFTP_RETR_SENT: lwftp_send_msg(s, PTRNLEN("RETR ")); 8004650: 2205 movs r2, #5 8004652: 494c ldr r1, [pc, #304] ; (8004784 ) 8004654: 68f8 ldr r0, [r7, #12] 8004656: f7ff fe9f bl 8004398 break; 800465a: e006 b.n 800466a default: LOG_ERROR("Unexpected internal state"); 800465c: 484a ldr r0, [pc, #296] ; (8004788 ) 800465e: f7fb fef3 bl 8000448 s->target_state = LWFTP_QUIT; 8004662: 68fb ldr r3, [r7, #12] 8004664: 220b movs r2, #11 8004666: f883 2029 strb.w r2, [r3, #41] ; 0x29 } lwftp_send_msg(s, s->remote_path, strlen(s->remote_path)); 800466a: 68fb ldr r3, [r7, #12] 800466c: 689c ldr r4, [r3, #8] 800466e: 68fb ldr r3, [r7, #12] 8004670: 689b ldr r3, [r3, #8] 8004672: 4618 mov r0, r3 8004674: f7fb fe9c bl 80003b0 8004678: 4603 mov r3, r0 800467a: 461a mov r2, r3 800467c: 4621 mov r1, r4 800467e: 68f8 ldr r0, [r7, #12] 8004680: f7ff fe8a bl 8004398 lwftp_send_msg(s, PTRNLEN("\r\n")); 8004684: 2202 movs r2, #2 8004686: 493a ldr r1, [pc, #232] ; (8004770 ) 8004688: 68f8 ldr r0, [r7, #12] 800468a: f7ff fe85 bl 8004398 s->control_state = s->target_state; 800468e: 68fb ldr r3, [r7, #12] 8004690: f893 2029 ldrb.w r2, [r3, #41] ; 0x29 8004694: 68fb ldr r3, [r7, #12] 8004696: f883 2028 strb.w r2, [r3, #40] ; 0x28 } else { s->control_state = LWFTP_QUIT; } } break; 800469a: e09a b.n 80047d2 s->control_state = LWFTP_QUIT; 800469c: 68fb ldr r3, [r7, #12] 800469e: 220b movs r2, #11 80046a0: f883 2028 strb.w r2, [r3, #40] ; 0x28 break; 80046a4: e095 b.n 80047d2 case LWFTP_RETR_SENT: if (response > 0) { 80046a6: 697b ldr r3, [r7, #20] 80046a8: 2b00 cmp r3, #0 80046aa: f000 8094 beq.w 80047d6 if (response == 150) { 80046ae: 697b ldr r3, [r7, #20] 80046b0: 2b96 cmp r3, #150 ; 0x96 80046b2: d104 bne.n 80046be s->control_state = LWFTP_XFERING; 80046b4: 68fb ldr r3, [r7, #12] 80046b6: 2209 movs r2, #9 80046b8: f883 2028 strb.w r2, [r3, #40] ; 0x28 } else { s->control_state = LWFTP_DATAEND; LWIP_DEBUGF(LWFTP_WARNING, ("lwftp:expected 150, received %d\n",response)); } } break; 80046bc: e08b b.n 80047d6 } else if (response == 550) { 80046be: 697b ldr r3, [r7, #20] 80046c0: f240 2226 movw r2, #550 ; 0x226 80046c4: 4293 cmp r3, r2 80046c6: d10c bne.n 80046e2 s->control_state = LWFTP_DATAEND; 80046c8: 68fb ldr r3, [r7, #12] 80046ca: 220a movs r2, #10 80046cc: f883 2028 strb.w r2, [r3, #40] ; 0x28 result = LWFTP_RESULT_ERR_FILENAME; 80046d0: 230d movs r3, #13 80046d2: 613b str r3, [r7, #16] LWIP_DEBUGF(LWFTP_WARNING, ("lwftp: Failed to open file '%s'\n", s->remote_path)); 80046d4: 68fb ldr r3, [r7, #12] 80046d6: 689b ldr r3, [r3, #8] 80046d8: 4619 mov r1, r3 80046da: 482c ldr r0, [pc, #176] ; (800478c ) 80046dc: f00c fa74 bl 8010bc8 break; 80046e0: e079 b.n 80047d6 s->control_state = LWFTP_DATAEND; 80046e2: 68fb ldr r3, [r7, #12] 80046e4: 220a movs r2, #10 80046e6: f883 2028 strb.w r2, [r3, #40] ; 0x28 LWIP_DEBUGF(LWFTP_WARNING, ("lwftp:expected 150, received %d\n",response)); 80046ea: 6979 ldr r1, [r7, #20] 80046ec: 4828 ldr r0, [pc, #160] ; (8004790 ) 80046ee: f00c fa6b bl 8010bc8 break; 80046f2: e070 b.n 80047d6 case LWFTP_STOR_SENT: if (response > 0) { 80046f4: 697b ldr r3, [r7, #20] 80046f6: 2b00 cmp r3, #0 80046f8: d06f beq.n 80047da if (response == 150) { 80046fa: 697b ldr r3, [r7, #20] 80046fc: 2b96 cmp r3, #150 ; 0x96 80046fe: d109 bne.n 8004714 s->control_state = LWFTP_XFERING; 8004700: 68fb ldr r3, [r7, #12] 8004702: 2209 movs r2, #9 8004704: f883 2028 strb.w r2, [r3, #40] ; 0x28 lwftp_data_sent(s, NULL, 0); 8004708: 2200 movs r2, #0 800470a: 2100 movs r1, #0 800470c: 68f8 ldr r0, [r7, #12] 800470e: f7ff fd05 bl 800411c } else { s->control_state = LWFTP_DATAEND; LWIP_DEBUGF(LWFTP_WARNING, ("lwftp:expected 150, received %d\n",response)); } } break; 8004712: e062 b.n 80047da s->control_state = LWFTP_DATAEND; 8004714: 68fb ldr r3, [r7, #12] 8004716: 220a movs r2, #10 8004718: f883 2028 strb.w r2, [r3, #40] ; 0x28 LWIP_DEBUGF(LWFTP_WARNING, ("lwftp:expected 150, received %d\n",response)); 800471c: 6979 ldr r1, [r7, #20] 800471e: 481c ldr r0, [pc, #112] ; (8004790 ) 8004720: f00c fa52 bl 8010bc8 break; 8004724: e059 b.n 80047da case LWFTP_XFERING: if (response > 0) { 8004726: 697b ldr r3, [r7, #20] 8004728: 2b00 cmp r3, #0 800472a: d058 beq.n 80047de if (response == 226) { 800472c: 697b ldr r3, [r7, #20] 800472e: 2be2 cmp r3, #226 ; 0xe2 8004730: d102 bne.n 8004738 result = LWFTP_RESULT_OK; 8004732: 2300 movs r3, #0 8004734: 613b str r3, [r7, #16] 8004736: e005 b.n 8004744 } else { result = LWFTP_RESULT_ERR_CLOSED; 8004738: 2308 movs r3, #8 800473a: 613b str r3, [r7, #16] LWIP_DEBUGF(LWFTP_WARNING, ("lwftp:expected 226, received %d\n",response)); 800473c: 6979 ldr r1, [r7, #20] 800473e: 4815 ldr r0, [pc, #84] ; (8004794 ) 8004740: f00c fa42 bl 8010bc8 } s->control_state = LWFTP_DATAEND; 8004744: 68fb ldr r3, [r7, #12] 8004746: 220a movs r2, #10 8004748: f883 2028 strb.w r2, [r3, #40] ; 0x28 } break; 800474c: e047 b.n 80047de case LWFTP_DATAEND: LOG_TRACE("forced end of data session"); 800474e: 4812 ldr r0, [pc, #72] ; (8004798 ) 8004750: f7fb fea6 bl 80004a0 break; 8004754: e046 b.n 80047e4 case LWFTP_QUIT_SENT: if (response > 0) { 8004756: 697b ldr r3, [r7, #20] 8004758: 2b00 cmp r3, #0 800475a: d042 beq.n 80047e2 if (response == 221) { 800475c: 697b ldr r3, [r7, #20] 800475e: 2bdd cmp r3, #221 ; 0xdd 8004760: d11c bne.n 800479c result = LWFTP_RESULT_OK; 8004762: 2300 movs r3, #0 8004764: 613b str r3, [r7, #16] 8004766: e01f b.n 80047a8 8004768: 080117b4 .word 0x080117b4 800476c: 080117cc .word 0x080117cc 8004770: 080117d4 .word 0x080117d4 8004774: 080117d8 .word 0x080117d8 8004778: 080117e0 .word 0x080117e0 800477c: 080117f8 .word 0x080117f8 8004780: 08011800 .word 0x08011800 8004784: 08011808 .word 0x08011808 8004788: 08011810 .word 0x08011810 800478c: 0801182c .word 0x0801182c 8004790: 08011850 .word 0x08011850 8004794: 08011874 .word 0x08011874 8004798: 08011898 .word 0x08011898 } else { result = LWFTP_RESULT_ERR_UNKNOWN; 800479c: 2303 movs r3, #3 800479e: 613b str r3, [r7, #16] LWIP_DEBUGF(LWFTP_WARNING, ("lwftp:expected 221, received %d\n",response)); 80047a0: 6979 ldr r1, [r7, #20] 80047a2: 482a ldr r0, [pc, #168] ; (800484c ) 80047a4: f00c fa10 bl 8010bc8 } s->control_state = LWFTP_CLOSING; 80047a8: 68fb ldr r3, [r7, #12] 80047aa: 220d movs r2, #13 80047ac: f883 2028 strb.w r2, [r3, #40] ; 0x28 } break; 80047b0: e017 b.n 80047e2 default: LWIP_DEBUGF(LWFTP_SEVERE, ("lwftp:unhandled state (%d)\n",s->control_state)); 80047b2: 68fb ldr r3, [r7, #12] 80047b4: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 80047b8: 4619 mov r1, r3 80047ba: 4825 ldr r0, [pc, #148] ; (8004850 ) 80047bc: f00c fa04 bl 8010bc8 80047c0: e010 b.n 80047e4 break; 80047c2: bf00 nop 80047c4: e00e b.n 80047e4 break; 80047c6: bf00 nop 80047c8: e00c b.n 80047e4 break; 80047ca: bf00 nop 80047cc: e00a b.n 80047e4 break; 80047ce: bf00 nop 80047d0: e008 b.n 80047e4 break; 80047d2: bf00 nop 80047d4: e006 b.n 80047e4 break; 80047d6: bf00 nop 80047d8: e004 b.n 80047e4 break; 80047da: bf00 nop 80047dc: e002 b.n 80047e4 break; 80047de: bf00 nop 80047e0: e000 b.n 80047e4 break; 80047e2: bf00 nop } // Free receiving pbuf if any if (p) { 80047e4: 687b ldr r3, [r7, #4] 80047e6: 2b00 cmp r3, #0 80047e8: d002 beq.n 80047f0 pbuf_free(p); 80047ea: 6878 ldr r0, [r7, #4] 80047ec: f002 fbf2 bl 8006fd4 } // Handle second step in state machine switch (s->control_state) { 80047f0: 68fb ldr r3, [r7, #12] 80047f2: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 80047f6: 2b0d cmp r3, #13 80047f8: d01e beq.n 8004838 80047fa: 2b0d cmp r3, #13 80047fc: dc21 bgt.n 8004842 80047fe: 2b0a cmp r3, #10 8004800: d002 beq.n 8004808 8004802: 2b0b cmp r3, #11 8004804: d009 beq.n 800481a lwftp_control_close(s, result); break; default: ; } } 8004806: e01c b.n 8004842 lwftp_data_close(s, result); 8004808: 6939 ldr r1, [r7, #16] 800480a: 68f8 ldr r0, [r7, #12] 800480c: f7ff fdf0 bl 80043f0 s->control_state = LWFTP_LOGGED; 8004810: 68fb ldr r3, [r7, #12] 8004812: 2204 movs r2, #4 8004814: f883 2028 strb.w r2, [r3, #40] ; 0x28 break; 8004818: e013 b.n 8004842 lwftp_send_msg(s, PTRNLEN("QUIT\r\n")); 800481a: 2206 movs r2, #6 800481c: 490d ldr r1, [pc, #52] ; (8004854 ) 800481e: 68f8 ldr r0, [r7, #12] 8004820: f7ff fdba bl 8004398 tcp_output(s->control_pcb); 8004824: 68fb ldr r3, [r7, #12] 8004826: 6adb ldr r3, [r3, #44] ; 0x2c 8004828: 4618 mov r0, r3 800482a: f007 fee3 bl 800c5f4 s->control_state = LWFTP_QUIT_SENT; 800482e: 68fb ldr r3, [r7, #12] 8004830: 220c movs r2, #12 8004832: f883 2028 strb.w r2, [r3, #40] ; 0x28 break; 8004836: e004 b.n 8004842 lwftp_control_close(s, result); 8004838: 6939 ldr r1, [r7, #16] 800483a: 68f8 ldr r0, [r7, #12] 800483c: f7ff fdf8 bl 8004430 break; 8004840: bf00 nop } 8004842: bf00 nop 8004844: 371c adds r7, #28 8004846: 46bd mov sp, r7 8004848: bd90 pop {r4, r7, pc} 800484a: bf00 nop 800484c: 080118b4 .word 0x080118b4 8004850: 080118d8 .word 0x080118d8 8004854: 080118f4 .word 0x080118f4 08004858 : * @param pointer to PCB * @param pointer to incoming pbuf * @param state of incoming process */ static err_t lwftp_control_recv(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err) { 8004858: b580 push {r7, lr} 800485a: b086 sub sp, #24 800485c: af00 add r7, sp, #0 800485e: 60f8 str r0, [r7, #12] 8004860: 60b9 str r1, [r7, #8] 8004862: 607a str r2, [r7, #4] 8004864: 70fb strb r3, [r7, #3] lwftp_session_t *s = (lwftp_session_t*) arg; 8004866: 68fb ldr r3, [r7, #12] 8004868: 617b str r3, [r7, #20] if (err == ERR_OK) { 800486a: f997 3003 ldrsb.w r3, [r7, #3] 800486e: 2b00 cmp r3, #0 8004870: d116 bne.n 80048a0 if (p) { 8004872: 687b ldr r3, [r7, #4] 8004874: 2b00 cmp r3, #0 8004876: d00b beq.n 8004890 tcp_recved(tpcb, p->tot_len); 8004878: 687b ldr r3, [r7, #4] 800487a: 891b ldrh r3, [r3, #8] 800487c: 4619 mov r1, r3 800487e: 68b8 ldr r0, [r7, #8] 8004880: f003 f996 bl 8007bb0 lwftp_control_process(s, tpcb, p); 8004884: 687a ldr r2, [r7, #4] 8004886: 68b9 ldr r1, [r7, #8] 8004888: 6978 ldr r0, [r7, #20] 800488a: f7ff fe05 bl 8004498 800488e: e015 b.n 80048bc } else { LWIP_DEBUGF(LWFTP_WARNING, ("lwftp:connection closed by remote host\n")); 8004890: 480d ldr r0, [pc, #52] ; (80048c8 ) 8004892: f00c fa07 bl 8010ca4 lwftp_control_close(s, LWFTP_RESULT_ERR_CLOSED); 8004896: 2108 movs r1, #8 8004898: 6978 ldr r0, [r7, #20] 800489a: f7ff fdc9 bl 8004430 800489e: e00d b.n 80048bc } } else { LWIP_DEBUGF(LWFTP_SERIOUS, ("lwftp:failed to receive (%s)\n",lwip_strerr(err))); 80048a0: f997 3003 ldrsb.w r3, [r7, #3] 80048a4: 4618 mov r0, r3 80048a6: f000 fe31 bl 800550c 80048aa: 4603 mov r3, r0 80048ac: 4619 mov r1, r3 80048ae: 4807 ldr r0, [pc, #28] ; (80048cc ) 80048b0: f00c f98a bl 8010bc8 lwftp_control_close(s, LWFTP_RESULT_ERR_UNKNOWN); 80048b4: 2103 movs r1, #3 80048b6: 6978 ldr r0, [r7, #20] 80048b8: f7ff fdba bl 8004430 } return err; 80048bc: f997 3003 ldrsb.w r3, [r7, #3] } 80048c0: 4618 mov r0, r3 80048c2: 3718 adds r7, #24 80048c4: 46bd mov sp, r7 80048c6: bd80 pop {r7, pc} 80048c8: 08011920 .word 0x08011920 80048cc: 08011948 .word 0x08011948 080048d0 : /** Handle control connection acknowledge of sent data * @param pointer to lwftp session data * @param pointer to PCB * @param number of bytes sent */ static err_t lwftp_control_sent(void *arg, struct tcp_pcb *tpcb, u16_t len) { 80048d0: b580 push {r7, lr} 80048d2: b084 sub sp, #16 80048d4: af00 add r7, sp, #0 80048d6: 60f8 str r0, [r7, #12] 80048d8: 60b9 str r1, [r7, #8] 80048da: 4613 mov r3, r2 80048dc: 80fb strh r3, [r7, #6] LWIP_DEBUGF(LWFTP_TRACE, ("lwftp:successfully sent %d bytes\n",len)); 80048de: 88fb ldrh r3, [r7, #6] 80048e0: 4619 mov r1, r3 80048e2: 4804 ldr r0, [pc, #16] ; (80048f4 ) 80048e4: f00c f970 bl 8010bc8 return ERR_OK; 80048e8: 2300 movs r3, #0 } 80048ea: 4618 mov r0, r3 80048ec: 3710 adds r7, #16 80048ee: 46bd mov sp, r7 80048f0: bd80 pop {r7, pc} 80048f2: bf00 nop 80048f4: 08011968 .word 0x08011968 080048f8 : /** Handle control connection error * @param pointer to lwftp session data * @param state of connection */ static void lwftp_control_err(void *arg, err_t err) { 80048f8: b580 push {r7, lr} 80048fa: b084 sub sp, #16 80048fc: af00 add r7, sp, #0 80048fe: 6078 str r0, [r7, #4] 8004900: 460b mov r3, r1 8004902: 70fb strb r3, [r7, #3] LWIP_UNUSED_ARG(err); if (arg != NULL) { 8004904: 687b ldr r3, [r7, #4] 8004906: 2b00 cmp r3, #0 8004908: d01f beq.n 800494a lwftp_session_t *s = (lwftp_session_t*) arg; 800490a: 687b ldr r3, [r7, #4] 800490c: 60bb str r3, [r7, #8] int result; if (s->control_state == LWFTP_CLOSED) { 800490e: 68bb ldr r3, [r7, #8] 8004910: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 8004914: 2b00 cmp r3, #0 8004916: d10c bne.n 8004932 LWIP_DEBUGF(LWFTP_WARNING, ("lwftp:failed to connect to server (%s)\n",lwip_strerr(err))); 8004918: f997 3003 ldrsb.w r3, [r7, #3] 800491c: 4618 mov r0, r3 800491e: f000 fdf5 bl 800550c 8004922: 4603 mov r3, r0 8004924: 4619 mov r1, r3 8004926: 480b ldr r0, [pc, #44] ; (8004954 ) 8004928: f00c f94e bl 8010bc8 result = LWFTP_RESULT_ERR_CONNECT; 800492c: 2306 movs r3, #6 800492e: 60fb str r3, [r7, #12] 8004930: e004 b.n 800493c } else { LWIP_DEBUGF(LWFTP_WARNING, ("lwftp:connection closed by remote host\n")); 8004932: 4809 ldr r0, [pc, #36] ; (8004958 ) 8004934: f00c f9b6 bl 8010ca4 result = LWFTP_RESULT_ERR_CLOSED; 8004938: 2308 movs r3, #8 800493a: 60fb str r3, [r7, #12] } s->control_pcb = NULL; // No need to de-allocate PCB 800493c: 68bb ldr r3, [r7, #8] 800493e: 2200 movs r2, #0 8004940: 62da str r2, [r3, #44] ; 0x2c lwftp_control_close(s, result); 8004942: 68f9 ldr r1, [r7, #12] 8004944: 68b8 ldr r0, [r7, #8] 8004946: f7ff fd73 bl 8004430 } } 800494a: bf00 nop 800494c: 3710 adds r7, #16 800494e: 46bd mov sp, r7 8004950: bd80 pop {r7, pc} 8004952: bf00 nop 8004954: 0801198c .word 0x0801198c 8004958: 08011920 .word 0x08011920 0800495c : /** Process newly connected PCB * @param pointer to lwftp session data * @param pointer to PCB * @param state of connection */ static err_t lwftp_control_connected(void *arg, struct tcp_pcb *tpcb, err_t err) { 800495c: b580 push {r7, lr} 800495e: b086 sub sp, #24 8004960: af00 add r7, sp, #0 8004962: 60f8 str r0, [r7, #12] 8004964: 60b9 str r1, [r7, #8] 8004966: 4613 mov r3, r2 8004968: 71fb strb r3, [r7, #7] lwftp_session_t *s = (lwftp_session_t*) arg; 800496a: 68fb ldr r3, [r7, #12] 800496c: 617b str r3, [r7, #20] if (err == ERR_OK) { 800496e: f997 3007 ldrsb.w r3, [r7, #7] 8004972: 2b00 cmp r3, #0 8004974: d103 bne.n 800497e LWIP_DEBUGF(LWFTP_STATE, ("lwftp:connected to server\n")); 8004976: 480f ldr r0, [pc, #60] ; (80049b4 ) 8004978: f00c f994 bl 8010ca4 800497c: e014 b.n 80049a8 } else { LWIP_DEBUGF(LWFTP_WARNING, ("lwftp:err in control_connected (%s)\n", lwip_strerr(err))); 800497e: f997 3007 ldrsb.w r3, [r7, #7] 8004982: 4618 mov r0, r3 8004984: f000 fdc2 bl 800550c 8004988: 4603 mov r3, r0 800498a: 4619 mov r1, r3 800498c: 480a ldr r0, [pc, #40] ; (80049b8 ) 800498e: f00c f91b bl 8010bc8 if (s->done_fn) { 8004992: 697b ldr r3, [r7, #20] 8004994: 6a1b ldr r3, [r3, #32] 8004996: 2b00 cmp r3, #0 8004998: d006 beq.n 80049a8 s->done_fn(s->handle, LWFTP_RESULT_ERR_CONNECT); // 연결 실패 상태 전달 800499a: 697b ldr r3, [r7, #20] 800499c: 6a1b ldr r3, [r3, #32] 800499e: 697a ldr r2, [r7, #20] 80049a0: 6952 ldr r2, [r2, #20] 80049a2: 2106 movs r1, #6 80049a4: 4610 mov r0, r2 80049a6: 4798 blx r3 } } return err; 80049a8: f997 3007 ldrsb.w r3, [r7, #7] } 80049ac: 4618 mov r0, r3 80049ae: 3718 adds r7, #24 80049b0: 46bd mov sp, r7 80049b2: bd80 pop {r7, pc} 80049b4: 080119b4 .word 0x080119b4 80049b8: 080119d0 .word 0x080119d0 080049bc : /** Open a control session * @param Session structure */ err_t lwftp_connect(lwftp_session_t *s) { 80049bc: b580 push {r7, lr} 80049be: b084 sub sp, #16 80049c0: af00 add r7, sp, #0 80049c2: 6078 str r0, [r7, #4] err_t error; enum lwftp_results retval = LWFTP_RESULT_ERR_UNKNOWN; 80049c4: 2303 movs r3, #3 80049c6: 73fb strb r3, [r7, #15] // Check user supplied data if ((s->control_state != LWFTP_CLOSED) || s->control_pcb || s->data_pcb 80049c8: 687b ldr r3, [r7, #4] 80049ca: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 80049ce: 2b00 cmp r3, #0 80049d0: d10f bne.n 80049f2 80049d2: 687b ldr r3, [r7, #4] 80049d4: 6adb ldr r3, [r3, #44] ; 0x2c 80049d6: 2b00 cmp r3, #0 80049d8: d10b bne.n 80049f2 80049da: 687b ldr r3, [r7, #4] 80049dc: 6b1b ldr r3, [r3, #48] ; 0x30 80049de: 2b00 cmp r3, #0 80049e0: d107 bne.n 80049f2 || !s->user || !s->pass) { 80049e2: 687b ldr r3, [r7, #4] 80049e4: 68db ldr r3, [r3, #12] 80049e6: 2b00 cmp r3, #0 80049e8: d003 beq.n 80049f2 80049ea: 687b ldr r3, [r7, #4] 80049ec: 691b ldr r3, [r3, #16] 80049ee: 2b00 cmp r3, #0 80049f0: d105 bne.n 80049fe LWIP_DEBUGF(LWFTP_WARNING, ("lwftp:invalid control session\n")); 80049f2: 482f ldr r0, [pc, #188] ; (8004ab0 ) 80049f4: f00c f956 bl 8010ca4 retval = LWFTP_RESULT_ERR_ARGUMENT; 80049f8: 2304 movs r3, #4 80049fa: 73fb strb r3, [r7, #15] goto exit; 80049fc: e046 b.n 8004a8c } // Get sessions pcb s->control_pcb = tcp_new(); 80049fe: f004 f8a7 bl 8008b50 8004a02: 4602 mov r2, r0 8004a04: 687b ldr r3, [r7, #4] 8004a06: 62da str r2, [r3, #44] ; 0x2c if (!s->control_pcb) { 8004a08: 687b ldr r3, [r7, #4] 8004a0a: 6adb ldr r3, [r3, #44] ; 0x2c 8004a0c: 2b00 cmp r3, #0 8004a0e: d105 bne.n 8004a1c LWIP_DEBUGF(LWFTP_SERIOUS, ("lwftp:cannot alloc control_pcb (low memory?)\n")); 8004a10: 4828 ldr r0, [pc, #160] ; (8004ab4 ) 8004a12: f00c f947 bl 8010ca4 retval = LWFTP_RESULT_ERR_MEMORY; 8004a16: 2305 movs r3, #5 8004a18: 73fb strb r3, [r7, #15] goto exit; 8004a1a: e037 b.n 8004a8c } // Open control session tcp_arg(s->control_pcb, s); 8004a1c: 687b ldr r3, [r7, #4] 8004a1e: 6adb ldr r3, [r3, #44] ; 0x2c 8004a20: 6879 ldr r1, [r7, #4] 8004a22: 4618 mov r0, r3 8004a24: f004 f89c bl 8008b60 tcp_err(s->control_pcb, lwftp_control_err); 8004a28: 687b ldr r3, [r7, #4] 8004a2a: 6adb ldr r3, [r3, #44] ; 0x2c 8004a2c: 4922 ldr r1, [pc, #136] ; (8004ab8 ) 8004a2e: 4618 mov r0, r3 8004a30: f004 f8ec bl 8008c0c tcp_recv(s->control_pcb, lwftp_control_recv); 8004a34: 687b ldr r3, [r7, #4] 8004a36: 6adb ldr r3, [r3, #44] ; 0x2c 8004a38: 4920 ldr r1, [pc, #128] ; (8004abc ) 8004a3a: 4618 mov r0, r3 8004a3c: f004 f8a2 bl 8008b84 tcp_sent(s->control_pcb, lwftp_control_sent); 8004a40: 687b ldr r3, [r7, #4] 8004a42: 6adb ldr r3, [r3, #44] ; 0x2c 8004a44: 491e ldr r1, [pc, #120] ; (8004ac0 ) 8004a46: 4618 mov r0, r3 8004a48: f004 f8be bl 8008bc8 error = tcp_connect(s->control_pcb, &s->server_ip, s->server_port, 8004a4c: 687b ldr r3, [r7, #4] 8004a4e: 6ad8 ldr r0, [r3, #44] ; 0x2c 8004a50: 6879 ldr r1, [r7, #4] 8004a52: 687b ldr r3, [r7, #4] 8004a54: 889a ldrh r2, [r3, #4] 8004a56: 4b1b ldr r3, [pc, #108] ; (8004ac4 ) 8004a58: f003 f940 bl 8007cdc 8004a5c: 4603 mov r3, r0 8004a5e: 73bb strb r3, [r7, #14] lwftp_control_connected); if (error == ERR_OK) { 8004a60: f997 300e ldrsb.w r3, [r7, #14] 8004a64: 2b00 cmp r3, #0 8004a66: d102 bne.n 8004a6e retval = LWFTP_RESULT_INPROGRESS; 8004a68: 2301 movs r3, #1 8004a6a: 73fb strb r3, [r7, #15] goto exit; 8004a6c: e00e b.n 8004a8c } // Release pcbs in case of failure LWIP_DEBUGF(LWFTP_SERIOUS, ("lwftp:cannot connect control_pcb (%s)\n", lwip_strerr(error))); 8004a6e: f997 300e ldrsb.w r3, [r7, #14] 8004a72: 4618 mov r0, r3 8004a74: f000 fd4a bl 800550c 8004a78: 4603 mov r3, r0 8004a7a: 4619 mov r1, r3 8004a7c: 4812 ldr r0, [pc, #72] ; (8004ac8 ) 8004a7e: f00c f8a3 bl 8010bc8 lwftp_control_close(s, -1); 8004a82: f04f 31ff mov.w r1, #4294967295 8004a86: 6878 ldr r0, [r7, #4] 8004a88: f7ff fcd2 bl 8004430 exit: if (s->done_fn) 8004a8c: 687b ldr r3, [r7, #4] 8004a8e: 6a1b ldr r3, [r3, #32] 8004a90: 2b00 cmp r3, #0 8004a92: d006 beq.n 8004aa2 s->done_fn(s->handle, retval); 8004a94: 687b ldr r3, [r7, #4] 8004a96: 6a1b ldr r3, [r3, #32] 8004a98: 687a ldr r2, [r7, #4] 8004a9a: 6952 ldr r2, [r2, #20] 8004a9c: 7bf9 ldrb r1, [r7, #15] 8004a9e: 4610 mov r0, r2 8004aa0: 4798 blx r3 return retval; 8004aa2: f997 300f ldrsb.w r3, [r7, #15] } 8004aa6: 4618 mov r0, r3 8004aa8: 3710 adds r7, #16 8004aaa: 46bd mov sp, r7 8004aac: bd80 pop {r7, pc} 8004aae: bf00 nop 8004ab0: 080119f8 .word 0x080119f8 8004ab4: 08011a18 .word 0x08011a18 8004ab8: 080048f9 .word 0x080048f9 8004abc: 08004859 .word 0x08004859 8004ac0: 080048d1 .word 0x080048d1 8004ac4: 0800495d .word 0x0800495d 8004ac8: 08011a48 .word 0x08011a48 08004acc : /** * LwIP initialization function */ void MX_LWIP_Init(void) { 8004acc: b580 push {r7, lr} 8004ace: b084 sub sp, #16 8004ad0: af04 add r7, sp, #16 /* IP addresses initialization */ IP_ADDRESS[0] = 192; 8004ad2: 4b87 ldr r3, [pc, #540] ; (8004cf0 ) 8004ad4: 22c0 movs r2, #192 ; 0xc0 8004ad6: 701a strb r2, [r3, #0] IP_ADDRESS[1] = 168; 8004ad8: 4b85 ldr r3, [pc, #532] ; (8004cf0 ) 8004ada: 22a8 movs r2, #168 ; 0xa8 8004adc: 705a strb r2, [r3, #1] IP_ADDRESS[2] = 0; 8004ade: 4b84 ldr r3, [pc, #528] ; (8004cf0 ) 8004ae0: 2200 movs r2, #0 8004ae2: 709a strb r2, [r3, #2] IP_ADDRESS[3] = 120; 8004ae4: 4b82 ldr r3, [pc, #520] ; (8004cf0 ) 8004ae6: 2278 movs r2, #120 ; 0x78 8004ae8: 70da strb r2, [r3, #3] NETMASK_ADDRESS[0] = 255; 8004aea: 4b82 ldr r3, [pc, #520] ; (8004cf4 ) 8004aec: 22ff movs r2, #255 ; 0xff 8004aee: 701a strb r2, [r3, #0] NETMASK_ADDRESS[1] = 255; 8004af0: 4b80 ldr r3, [pc, #512] ; (8004cf4 ) 8004af2: 22ff movs r2, #255 ; 0xff 8004af4: 705a strb r2, [r3, #1] NETMASK_ADDRESS[2] = 255; 8004af6: 4b7f ldr r3, [pc, #508] ; (8004cf4 ) 8004af8: 22ff movs r2, #255 ; 0xff 8004afa: 709a strb r2, [r3, #2] NETMASK_ADDRESS[3] = 0; 8004afc: 4b7d ldr r3, [pc, #500] ; (8004cf4 ) 8004afe: 2200 movs r2, #0 8004b00: 70da strb r2, [r3, #3] GATEWAY_ADDRESS[0] = 0; 8004b02: 4b7d ldr r3, [pc, #500] ; (8004cf8 ) 8004b04: 2200 movs r2, #0 8004b06: 701a strb r2, [r3, #0] GATEWAY_ADDRESS[1] = 0; 8004b08: 4b7b ldr r3, [pc, #492] ; (8004cf8 ) 8004b0a: 2200 movs r2, #0 8004b0c: 705a strb r2, [r3, #1] GATEWAY_ADDRESS[2] = 0; 8004b0e: 4b7a ldr r3, [pc, #488] ; (8004cf8 ) 8004b10: 2200 movs r2, #0 8004b12: 709a strb r2, [r3, #2] GATEWAY_ADDRESS[3] = 0; 8004b14: 4b78 ldr r3, [pc, #480] ; (8004cf8 ) 8004b16: 2200 movs r2, #0 8004b18: 70da strb r2, [r3, #3] /* USER CODE BEGIN IP_ADDRESSES */ /* USER CODE END IP_ADDRESSES */ /* Initilialize the LwIP stack without RTOS */ lwip_init(); 8004b1a: f000 fe01 bl 8005720 /* IP addresses initialization without DHCP (IPv4) */ IP4_ADDR(&ipaddr, IP_ADDRESS[0], IP_ADDRESS[1], IP_ADDRESS[2], IP_ADDRESS[3]); 8004b1e: 4b74 ldr r3, [pc, #464] ; (8004cf0 ) 8004b20: 781b ldrb r3, [r3, #0] 8004b22: 061a lsls r2, r3, #24 8004b24: 4b72 ldr r3, [pc, #456] ; (8004cf0 ) 8004b26: 785b ldrb r3, [r3, #1] 8004b28: 041b lsls r3, r3, #16 8004b2a: 431a orrs r2, r3 8004b2c: 4b70 ldr r3, [pc, #448] ; (8004cf0 ) 8004b2e: 789b ldrb r3, [r3, #2] 8004b30: 021b lsls r3, r3, #8 8004b32: 4313 orrs r3, r2 8004b34: 4a6e ldr r2, [pc, #440] ; (8004cf0 ) 8004b36: 78d2 ldrb r2, [r2, #3] 8004b38: 4313 orrs r3, r2 8004b3a: 061a lsls r2, r3, #24 8004b3c: 4b6c ldr r3, [pc, #432] ; (8004cf0 ) 8004b3e: 781b ldrb r3, [r3, #0] 8004b40: 0619 lsls r1, r3, #24 8004b42: 4b6b ldr r3, [pc, #428] ; (8004cf0 ) 8004b44: 785b ldrb r3, [r3, #1] 8004b46: 041b lsls r3, r3, #16 8004b48: 4319 orrs r1, r3 8004b4a: 4b69 ldr r3, [pc, #420] ; (8004cf0 ) 8004b4c: 789b ldrb r3, [r3, #2] 8004b4e: 021b lsls r3, r3, #8 8004b50: 430b orrs r3, r1 8004b52: 4967 ldr r1, [pc, #412] ; (8004cf0 ) 8004b54: 78c9 ldrb r1, [r1, #3] 8004b56: 430b orrs r3, r1 8004b58: 021b lsls r3, r3, #8 8004b5a: f403 037f and.w r3, r3, #16711680 ; 0xff0000 8004b5e: 431a orrs r2, r3 8004b60: 4b63 ldr r3, [pc, #396] ; (8004cf0 ) 8004b62: 781b ldrb r3, [r3, #0] 8004b64: 0619 lsls r1, r3, #24 8004b66: 4b62 ldr r3, [pc, #392] ; (8004cf0 ) 8004b68: 785b ldrb r3, [r3, #1] 8004b6a: 041b lsls r3, r3, #16 8004b6c: 4319 orrs r1, r3 8004b6e: 4b60 ldr r3, [pc, #384] ; (8004cf0 ) 8004b70: 789b ldrb r3, [r3, #2] 8004b72: 021b lsls r3, r3, #8 8004b74: 430b orrs r3, r1 8004b76: 495e ldr r1, [pc, #376] ; (8004cf0 ) 8004b78: 78c9 ldrb r1, [r1, #3] 8004b7a: 430b orrs r3, r1 8004b7c: 0a1b lsrs r3, r3, #8 8004b7e: f403 437f and.w r3, r3, #65280 ; 0xff00 8004b82: 431a orrs r2, r3 8004b84: 4b5a ldr r3, [pc, #360] ; (8004cf0 ) 8004b86: 781b ldrb r3, [r3, #0] 8004b88: 0619 lsls r1, r3, #24 8004b8a: 4b59 ldr r3, [pc, #356] ; (8004cf0 ) 8004b8c: 785b ldrb r3, [r3, #1] 8004b8e: 041b lsls r3, r3, #16 8004b90: 4319 orrs r1, r3 8004b92: 4b57 ldr r3, [pc, #348] ; (8004cf0 ) 8004b94: 789b ldrb r3, [r3, #2] 8004b96: 021b lsls r3, r3, #8 8004b98: 430b orrs r3, r1 8004b9a: 4955 ldr r1, [pc, #340] ; (8004cf0 ) 8004b9c: 78c9 ldrb r1, [r1, #3] 8004b9e: 430b orrs r3, r1 8004ba0: 0e1b lsrs r3, r3, #24 8004ba2: 4313 orrs r3, r2 8004ba4: 4a55 ldr r2, [pc, #340] ; (8004cfc ) 8004ba6: 6013 str r3, [r2, #0] IP4_ADDR(&netmask, NETMASK_ADDRESS[0], NETMASK_ADDRESS[1] , NETMASK_ADDRESS[2], NETMASK_ADDRESS[3]); 8004ba8: 4b52 ldr r3, [pc, #328] ; (8004cf4 ) 8004baa: 781b ldrb r3, [r3, #0] 8004bac: 061a lsls r2, r3, #24 8004bae: 4b51 ldr r3, [pc, #324] ; (8004cf4 ) 8004bb0: 785b ldrb r3, [r3, #1] 8004bb2: 041b lsls r3, r3, #16 8004bb4: 431a orrs r2, r3 8004bb6: 4b4f ldr r3, [pc, #316] ; (8004cf4 ) 8004bb8: 789b ldrb r3, [r3, #2] 8004bba: 021b lsls r3, r3, #8 8004bbc: 4313 orrs r3, r2 8004bbe: 4a4d ldr r2, [pc, #308] ; (8004cf4 ) 8004bc0: 78d2 ldrb r2, [r2, #3] 8004bc2: 4313 orrs r3, r2 8004bc4: 061a lsls r2, r3, #24 8004bc6: 4b4b ldr r3, [pc, #300] ; (8004cf4 ) 8004bc8: 781b ldrb r3, [r3, #0] 8004bca: 0619 lsls r1, r3, #24 8004bcc: 4b49 ldr r3, [pc, #292] ; (8004cf4 ) 8004bce: 785b ldrb r3, [r3, #1] 8004bd0: 041b lsls r3, r3, #16 8004bd2: 4319 orrs r1, r3 8004bd4: 4b47 ldr r3, [pc, #284] ; (8004cf4 ) 8004bd6: 789b ldrb r3, [r3, #2] 8004bd8: 021b lsls r3, r3, #8 8004bda: 430b orrs r3, r1 8004bdc: 4945 ldr r1, [pc, #276] ; (8004cf4 ) 8004bde: 78c9 ldrb r1, [r1, #3] 8004be0: 430b orrs r3, r1 8004be2: 021b lsls r3, r3, #8 8004be4: f403 037f and.w r3, r3, #16711680 ; 0xff0000 8004be8: 431a orrs r2, r3 8004bea: 4b42 ldr r3, [pc, #264] ; (8004cf4 ) 8004bec: 781b ldrb r3, [r3, #0] 8004bee: 0619 lsls r1, r3, #24 8004bf0: 4b40 ldr r3, [pc, #256] ; (8004cf4 ) 8004bf2: 785b ldrb r3, [r3, #1] 8004bf4: 041b lsls r3, r3, #16 8004bf6: 4319 orrs r1, r3 8004bf8: 4b3e ldr r3, [pc, #248] ; (8004cf4 ) 8004bfa: 789b ldrb r3, [r3, #2] 8004bfc: 021b lsls r3, r3, #8 8004bfe: 430b orrs r3, r1 8004c00: 493c ldr r1, [pc, #240] ; (8004cf4 ) 8004c02: 78c9 ldrb r1, [r1, #3] 8004c04: 430b orrs r3, r1 8004c06: 0a1b lsrs r3, r3, #8 8004c08: f403 437f and.w r3, r3, #65280 ; 0xff00 8004c0c: 431a orrs r2, r3 8004c0e: 4b39 ldr r3, [pc, #228] ; (8004cf4 ) 8004c10: 781b ldrb r3, [r3, #0] 8004c12: 0619 lsls r1, r3, #24 8004c14: 4b37 ldr r3, [pc, #220] ; (8004cf4 ) 8004c16: 785b ldrb r3, [r3, #1] 8004c18: 041b lsls r3, r3, #16 8004c1a: 4319 orrs r1, r3 8004c1c: 4b35 ldr r3, [pc, #212] ; (8004cf4 ) 8004c1e: 789b ldrb r3, [r3, #2] 8004c20: 021b lsls r3, r3, #8 8004c22: 430b orrs r3, r1 8004c24: 4933 ldr r1, [pc, #204] ; (8004cf4 ) 8004c26: 78c9 ldrb r1, [r1, #3] 8004c28: 430b orrs r3, r1 8004c2a: 0e1b lsrs r3, r3, #24 8004c2c: 4313 orrs r3, r2 8004c2e: 4a34 ldr r2, [pc, #208] ; (8004d00 ) 8004c30: 6013 str r3, [r2, #0] IP4_ADDR(&gw, GATEWAY_ADDRESS[0], GATEWAY_ADDRESS[1], GATEWAY_ADDRESS[2], GATEWAY_ADDRESS[3]); 8004c32: 4b31 ldr r3, [pc, #196] ; (8004cf8 ) 8004c34: 781b ldrb r3, [r3, #0] 8004c36: 061a lsls r2, r3, #24 8004c38: 4b2f ldr r3, [pc, #188] ; (8004cf8 ) 8004c3a: 785b ldrb r3, [r3, #1] 8004c3c: 041b lsls r3, r3, #16 8004c3e: 431a orrs r2, r3 8004c40: 4b2d ldr r3, [pc, #180] ; (8004cf8 ) 8004c42: 789b ldrb r3, [r3, #2] 8004c44: 021b lsls r3, r3, #8 8004c46: 4313 orrs r3, r2 8004c48: 4a2b ldr r2, [pc, #172] ; (8004cf8 ) 8004c4a: 78d2 ldrb r2, [r2, #3] 8004c4c: 4313 orrs r3, r2 8004c4e: 061a lsls r2, r3, #24 8004c50: 4b29 ldr r3, [pc, #164] ; (8004cf8 ) 8004c52: 781b ldrb r3, [r3, #0] 8004c54: 0619 lsls r1, r3, #24 8004c56: 4b28 ldr r3, [pc, #160] ; (8004cf8 ) 8004c58: 785b ldrb r3, [r3, #1] 8004c5a: 041b lsls r3, r3, #16 8004c5c: 4319 orrs r1, r3 8004c5e: 4b26 ldr r3, [pc, #152] ; (8004cf8 ) 8004c60: 789b ldrb r3, [r3, #2] 8004c62: 021b lsls r3, r3, #8 8004c64: 430b orrs r3, r1 8004c66: 4924 ldr r1, [pc, #144] ; (8004cf8 ) 8004c68: 78c9 ldrb r1, [r1, #3] 8004c6a: 430b orrs r3, r1 8004c6c: 021b lsls r3, r3, #8 8004c6e: f403 037f and.w r3, r3, #16711680 ; 0xff0000 8004c72: 431a orrs r2, r3 8004c74: 4b20 ldr r3, [pc, #128] ; (8004cf8 ) 8004c76: 781b ldrb r3, [r3, #0] 8004c78: 0619 lsls r1, r3, #24 8004c7a: 4b1f ldr r3, [pc, #124] ; (8004cf8 ) 8004c7c: 785b ldrb r3, [r3, #1] 8004c7e: 041b lsls r3, r3, #16 8004c80: 4319 orrs r1, r3 8004c82: 4b1d ldr r3, [pc, #116] ; (8004cf8 ) 8004c84: 789b ldrb r3, [r3, #2] 8004c86: 021b lsls r3, r3, #8 8004c88: 430b orrs r3, r1 8004c8a: 491b ldr r1, [pc, #108] ; (8004cf8 ) 8004c8c: 78c9 ldrb r1, [r1, #3] 8004c8e: 430b orrs r3, r1 8004c90: 0a1b lsrs r3, r3, #8 8004c92: f403 437f and.w r3, r3, #65280 ; 0xff00 8004c96: 431a orrs r2, r3 8004c98: 4b17 ldr r3, [pc, #92] ; (8004cf8 ) 8004c9a: 781b ldrb r3, [r3, #0] 8004c9c: 0619 lsls r1, r3, #24 8004c9e: 4b16 ldr r3, [pc, #88] ; (8004cf8 ) 8004ca0: 785b ldrb r3, [r3, #1] 8004ca2: 041b lsls r3, r3, #16 8004ca4: 4319 orrs r1, r3 8004ca6: 4b14 ldr r3, [pc, #80] ; (8004cf8 ) 8004ca8: 789b ldrb r3, [r3, #2] 8004caa: 021b lsls r3, r3, #8 8004cac: 430b orrs r3, r1 8004cae: 4912 ldr r1, [pc, #72] ; (8004cf8 ) 8004cb0: 78c9 ldrb r1, [r1, #3] 8004cb2: 430b orrs r3, r1 8004cb4: 0e1b lsrs r3, r3, #24 8004cb6: 4313 orrs r3, r2 8004cb8: 4a12 ldr r2, [pc, #72] ; (8004d04 ) 8004cba: 6013 str r3, [r2, #0] /* add the network interface (IPv4/IPv6) without RTOS */ netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, ðernet_input); 8004cbc: 4b12 ldr r3, [pc, #72] ; (8004d08 ) 8004cbe: 9302 str r3, [sp, #8] 8004cc0: 4b12 ldr r3, [pc, #72] ; (8004d0c ) 8004cc2: 9301 str r3, [sp, #4] 8004cc4: 2300 movs r3, #0 8004cc6: 9300 str r3, [sp, #0] 8004cc8: 4b0e ldr r3, [pc, #56] ; (8004d04 ) 8004cca: 4a0d ldr r2, [pc, #52] ; (8004d00 ) 8004ccc: 490b ldr r1, [pc, #44] ; (8004cfc ) 8004cce: 4810 ldr r0, [pc, #64] ; (8004d10 ) 8004cd0: f001 fa46 bl 8006160 /* Registers the default network interface */ netif_set_default(&gnetif); 8004cd4: 480e ldr r0, [pc, #56] ; (8004d10 ) 8004cd6: f001 fcd7 bl 8006688 /* We must always bring the network interface up connection or not... */ netif_set_up(&gnetif); 8004cda: 480d ldr r0, [pc, #52] ; (8004d10 ) 8004cdc: f001 fcf8 bl 80066d0 /* Set the link callback function, this function is called on change of link status*/ netif_set_link_callback(&gnetif, ethernet_link_status_updated); 8004ce0: 490c ldr r1, [pc, #48] ; (8004d14 ) 8004ce2: 480b ldr r0, [pc, #44] ; (8004d10 ) 8004ce4: f001 fdf6 bl 80068d4 /* Create the Ethernet link handler thread */ /* USER CODE BEGIN 3 */ /* USER CODE END 3 */ } 8004ce8: bf00 nop 8004cea: 46bd mov sp, r7 8004cec: bd80 pop {r7, pc} 8004cee: bf00 nop 8004cf0: 24000170 .word 0x24000170 8004cf4: 24000174 .word 0x24000174 8004cf8: 24000178 .word 0x24000178 8004cfc: 24000164 .word 0x24000164 8004d00: 24000168 .word 0x24000168 8004d04: 2400016c .word 0x2400016c 8004d08: 080100b5 .word 0x080100b5 8004d0c: 08005021 .word 0x08005021 8004d10: 24000130 .word 0x24000130 8004d14: 08004d69 .word 0x08004d69 08004d18 : * @brief Ethernet Link periodic check * @param netif * @retval None */ static void Ethernet_Link_Periodic_Handle(struct netif *netif) { 8004d18: b580 push {r7, lr} 8004d1a: b082 sub sp, #8 8004d1c: af00 add r7, sp, #0 8004d1e: 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) 8004d20: f7fc f974 bl 800100c 8004d24: 4602 mov r2, r0 8004d26: 4b08 ldr r3, [pc, #32] ; (8004d48 ) 8004d28: 681b ldr r3, [r3, #0] 8004d2a: 1ad3 subs r3, r2, r3 8004d2c: 2b63 cmp r3, #99 ; 0x63 8004d2e: d907 bls.n 8004d40 { EthernetLinkTimer = HAL_GetTick(); 8004d30: f7fc f96c bl 800100c 8004d34: 4603 mov r3, r0 8004d36: 4a04 ldr r2, [pc, #16] ; (8004d48 ) 8004d38: 6013 str r3, [r2, #0] ethernet_link_check_state(netif); 8004d3a: 6878 ldr r0, [r7, #4] 8004d3c: f000 fac2 bl 80052c4 } /* USER CODE BEGIN 4_4 */ /* USER CODE END 4_4 */ } 8004d40: bf00 nop 8004d42: 3708 adds r7, #8 8004d44: 46bd mov sp, r7 8004d46: bd80 pop {r7, pc} 8004d48: 2400012c .word 0x2400012c 08004d4c : * 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) { 8004d4c: b580 push {r7, lr} 8004d4e: af00 add r7, sp, #0 /* USER CODE BEGIN 4_1 */ /* USER CODE END 4_1 */ ethernetif_input(&gnetif); 8004d50: 4804 ldr r0, [pc, #16] ; (8004d64 ) 8004d52: f000 f945 bl 8004fe0 /* USER CODE BEGIN 4_2 */ /* USER CODE END 4_2 */ /* Handle timeouts */ sys_check_timeouts(); 8004d56: f008 fcd7 bl 800d708 Ethernet_Link_Periodic_Handle(&gnetif); 8004d5a: 4802 ldr r0, [pc, #8] ; (8004d64 ) 8004d5c: f7ff ffdc bl 8004d18 /* USER CODE BEGIN 4_3 */ /* USER CODE END 4_3 */ } 8004d60: bf00 nop 8004d62: bd80 pop {r7, pc} 8004d64: 24000130 .word 0x24000130 08004d68 : * @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) { 8004d68: b480 push {r7} 8004d6a: b083 sub sp, #12 8004d6c: af00 add r7, sp, #0 8004d6e: 6078 str r0, [r7, #4] else /* netif is down */ { /* USER CODE BEGIN 6 */ /* USER CODE END 6 */ } } 8004d70: bf00 nop 8004d72: 370c adds r7, #12 8004d74: 46bd mov sp, r7 8004d76: f85d 7b04 ldr.w r7, [sp], #4 8004d7a: 4770 bx lr 08004d7c : * * @param netif the already initialized lwip network interface structure * for this ethernetif */ static void low_level_init(struct netif *netif) { 8004d7c: b580 push {r7, lr} 8004d7e: b084 sub sp, #16 8004d80: af00 add r7, sp, #0 8004d82: 6078 str r0, [r7, #4] HAL_StatusTypeDef hal_eth_init_status = HAL_OK; 8004d84: 2300 movs r3, #0 8004d86: 73fb strb r3, [r7, #15] /* Start ETH HAL Init */ uint8_t MACAddr[6] ; heth.Instance = ETH; 8004d88: 4b3f ldr r3, [pc, #252] ; (8004e88 ) 8004d8a: 4a40 ldr r2, [pc, #256] ; (8004e8c ) 8004d8c: 601a str r2, [r3, #0] MACAddr[0] = 0x00; 8004d8e: 2300 movs r3, #0 8004d90: 723b strb r3, [r7, #8] MACAddr[1] = 0x80; 8004d92: 2380 movs r3, #128 ; 0x80 8004d94: 727b strb r3, [r7, #9] MACAddr[2] = 0xE1; 8004d96: 23e1 movs r3, #225 ; 0xe1 8004d98: 72bb strb r3, [r7, #10] MACAddr[3] = 0x00; 8004d9a: 2300 movs r3, #0 8004d9c: 72fb strb r3, [r7, #11] MACAddr[4] = 0x00; 8004d9e: 2300 movs r3, #0 8004da0: 733b strb r3, [r7, #12] MACAddr[5] = 0x00; 8004da2: 2300 movs r3, #0 8004da4: 737b strb r3, [r7, #13] heth.Init.MACAddr = &MACAddr[0]; 8004da6: 4a38 ldr r2, [pc, #224] ; (8004e88 ) 8004da8: f107 0308 add.w r3, r7, #8 8004dac: 6053 str r3, [r2, #4] heth.Init.MediaInterface = HAL_ETH_RMII_MODE; 8004dae: 4b36 ldr r3, [pc, #216] ; (8004e88 ) 8004db0: 2201 movs r2, #1 8004db2: 721a strb r2, [r3, #8] heth.Init.TxDesc = DMATxDscrTab; 8004db4: 4b34 ldr r3, [pc, #208] ; (8004e88 ) 8004db6: 4a36 ldr r2, [pc, #216] ; (8004e90 ) 8004db8: 60da str r2, [r3, #12] heth.Init.RxDesc = DMARxDscrTab; 8004dba: 4b33 ldr r3, [pc, #204] ; (8004e88 ) 8004dbc: 4a35 ldr r2, [pc, #212] ; (8004e94 ) 8004dbe: 611a str r2, [r3, #16] heth.Init.RxBuffLen = 1536; 8004dc0: 4b31 ldr r3, [pc, #196] ; (8004e88 ) 8004dc2: f44f 62c0 mov.w r2, #1536 ; 0x600 8004dc6: 615a str r2, [r3, #20] /* USER CODE BEGIN MACADDRESS */ /* USER CODE END MACADDRESS */ hal_eth_init_status = HAL_ETH_Init(&heth); 8004dc8: 482f ldr r0, [pc, #188] ; (8004e88 ) 8004dca: f7fc facb bl 8001364 8004dce: 4603 mov r3, r0 8004dd0: 73fb strb r3, [r7, #15] memset(&TxConfig, 0 , sizeof(ETH_TxPacketConfig)); 8004dd2: 2238 movs r2, #56 ; 0x38 8004dd4: 2100 movs r1, #0 8004dd6: 4830 ldr r0, [pc, #192] ; (8004e98 ) 8004dd8: f00c f854 bl 8010e84 TxConfig.Attributes = ETH_TX_PACKETS_FEATURES_CSUM | ETH_TX_PACKETS_FEATURES_CRCPAD; 8004ddc: 4b2e ldr r3, [pc, #184] ; (8004e98 ) 8004dde: 2221 movs r2, #33 ; 0x21 8004de0: 601a str r2, [r3, #0] TxConfig.ChecksumCtrl = ETH_CHECKSUM_IPHDR_PAYLOAD_INSERT_PHDR_CALC; 8004de2: 4b2d ldr r3, [pc, #180] ; (8004e98 ) 8004de4: f44f 3240 mov.w r2, #196608 ; 0x30000 8004de8: 615a str r2, [r3, #20] TxConfig.CRCPadCtrl = ETH_CRC_PAD_INSERT; 8004dea: 4b2b ldr r3, [pc, #172] ; (8004e98 ) 8004dec: 2200 movs r2, #0 8004dee: 611a str r2, [r3, #16] /* End ETH HAL Init */ /* Initialize the RX POOL */ LWIP_MEMPOOL_INIT(RX_POOL); 8004df0: 482a ldr r0, [pc, #168] ; (8004e9c ) 8004df2: f001 f875 bl 8005ee0 #if LWIP_ARP || LWIP_ETHERNET /* set MAC hardware address length */ netif->hwaddr_len = ETH_HWADDR_LEN; 8004df6: 687b ldr r3, [r7, #4] 8004df8: 2206 movs r2, #6 8004dfa: f883 202c strb.w r2, [r3, #44] ; 0x2c /* set MAC hardware address */ netif->hwaddr[0] = heth.Init.MACAddr[0]; 8004dfe: 4b22 ldr r3, [pc, #136] ; (8004e88 ) 8004e00: 685b ldr r3, [r3, #4] 8004e02: 781a ldrb r2, [r3, #0] 8004e04: 687b ldr r3, [r7, #4] 8004e06: f883 2026 strb.w r2, [r3, #38] ; 0x26 netif->hwaddr[1] = heth.Init.MACAddr[1]; 8004e0a: 4b1f ldr r3, [pc, #124] ; (8004e88 ) 8004e0c: 685b ldr r3, [r3, #4] 8004e0e: 785a ldrb r2, [r3, #1] 8004e10: 687b ldr r3, [r7, #4] 8004e12: f883 2027 strb.w r2, [r3, #39] ; 0x27 netif->hwaddr[2] = heth.Init.MACAddr[2]; 8004e16: 4b1c ldr r3, [pc, #112] ; (8004e88 ) 8004e18: 685b ldr r3, [r3, #4] 8004e1a: 789a ldrb r2, [r3, #2] 8004e1c: 687b ldr r3, [r7, #4] 8004e1e: f883 2028 strb.w r2, [r3, #40] ; 0x28 netif->hwaddr[3] = heth.Init.MACAddr[3]; 8004e22: 4b19 ldr r3, [pc, #100] ; (8004e88 ) 8004e24: 685b ldr r3, [r3, #4] 8004e26: 78da ldrb r2, [r3, #3] 8004e28: 687b ldr r3, [r7, #4] 8004e2a: f883 2029 strb.w r2, [r3, #41] ; 0x29 netif->hwaddr[4] = heth.Init.MACAddr[4]; 8004e2e: 4b16 ldr r3, [pc, #88] ; (8004e88 ) 8004e30: 685b ldr r3, [r3, #4] 8004e32: 791a ldrb r2, [r3, #4] 8004e34: 687b ldr r3, [r7, #4] 8004e36: f883 202a strb.w r2, [r3, #42] ; 0x2a netif->hwaddr[5] = heth.Init.MACAddr[5]; 8004e3a: 4b13 ldr r3, [pc, #76] ; (8004e88 ) 8004e3c: 685b ldr r3, [r3, #4] 8004e3e: 795a ldrb r2, [r3, #5] 8004e40: 687b ldr r3, [r7, #4] 8004e42: f883 202b strb.w r2, [r3, #43] ; 0x2b /* maximum transfer unit */ netif->mtu = ETH_MAX_PAYLOAD; 8004e46: 687b ldr r3, [r7, #4] 8004e48: f240 52dc movw r2, #1500 ; 0x5dc 8004e4c: 849a strh r2, [r3, #36] ; 0x24 /* 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; 8004e4e: 687b ldr r3, [r7, #4] 8004e50: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 8004e54: f043 030a orr.w r3, r3, #10 8004e58: b2da uxtb r2, r3 8004e5a: 687b ldr r3, [r7, #4] 8004e5c: f883 202d strb.w r2, [r3, #45] ; 0x2d /* USER CODE BEGIN PHY_PRE_CONFIG */ /* USER CODE END PHY_PRE_CONFIG */ /* Set PHY IO functions */ LAN8742_RegisterBusIO(&LAN8742, &LAN8742_IOCtx); 8004e60: 490f ldr r1, [pc, #60] ; (8004ea0 ) 8004e62: 4810 ldr r0, [pc, #64] ; (8004ea4 ) 8004e64: f7fb feeb bl 8000c3e /* Initialize the LAN8742 ETH PHY */ LAN8742_Init(&LAN8742); 8004e68: 480e ldr r0, [pc, #56] ; (8004ea4 ) 8004e6a: f7fb ff1a bl 8000ca2 if (hal_eth_init_status == HAL_OK) 8004e6e: 7bfb ldrb r3, [r7, #15] 8004e70: 2b00 cmp r3, #0 8004e72: d103 bne.n 8004e7c { /* Get link state */ ethernet_link_check_state(netif); 8004e74: 6878 ldr r0, [r7, #4] 8004e76: f000 fa25 bl 80052c4 #endif /* LWIP_ARP || LWIP_ETHERNET */ /* USER CODE BEGIN LOW_LEVEL_INIT */ /* USER CODE END LOW_LEVEL_INIT */ } 8004e7a: e001 b.n 8004e80 Error_Handler(); 8004e7c: f7fb fd2d bl 80008da } 8004e80: bf00 nop 8004e82: 3710 adds r7, #16 8004e84: 46bd mov sp, r7 8004e86: bd80 pop {r7, pc} 8004e88: 24004b08 .word 0x24004b08 8004e8c: 40028000 .word 0x40028000 8004e90: 30000100 .word 0x30000100 8004e94: 30000000 .word 0x30000000 8004e98: 24004bb8 .word 0x24004bb8 8004e9c: 08014c90 .word 0x08014c90 8004ea0: 24000010 .word 0x24000010 8004ea4: 24004bf0 .word 0x24004bf0 08004ea8 : * 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) { 8004ea8: b580 push {r7, lr} 8004eaa: b092 sub sp, #72 ; 0x48 8004eac: af00 add r7, sp, #0 8004eae: 6078 str r0, [r7, #4] 8004eb0: 6039 str r1, [r7, #0] uint32_t i = 0U; 8004eb2: 2300 movs r3, #0 8004eb4: 647b str r3, [r7, #68] ; 0x44 struct pbuf *q = NULL; 8004eb6: 2300 movs r3, #0 8004eb8: 643b str r3, [r7, #64] ; 0x40 err_t errval = ERR_OK; 8004eba: 2300 movs r3, #0 8004ebc: f887 303f strb.w r3, [r7, #63] ; 0x3f ETH_BufferTypeDef Txbuffer[ETH_TX_DESC_CNT] = {0}; 8004ec0: f107 030c add.w r3, r7, #12 8004ec4: 2230 movs r2, #48 ; 0x30 8004ec6: 2100 movs r1, #0 8004ec8: 4618 mov r0, r3 8004eca: f00b ffdb bl 8010e84 memset(Txbuffer, 0 , ETH_TX_DESC_CNT*sizeof(ETH_BufferTypeDef)); 8004ece: f107 030c add.w r3, r7, #12 8004ed2: 2230 movs r2, #48 ; 0x30 8004ed4: 2100 movs r1, #0 8004ed6: 4618 mov r0, r3 8004ed8: f00b ffd4 bl 8010e84 for(q = p; q != NULL; q = q->next) 8004edc: 683b ldr r3, [r7, #0] 8004ede: 643b str r3, [r7, #64] ; 0x40 8004ee0: e045 b.n 8004f6e { if(i >= ETH_TX_DESC_CNT) 8004ee2: 6c7b ldr r3, [r7, #68] ; 0x44 8004ee4: 2b03 cmp r3, #3 8004ee6: d902 bls.n 8004eee return ERR_IF; 8004ee8: f06f 030b mvn.w r3, #11 8004eec: e055 b.n 8004f9a Txbuffer[i].buffer = q->payload; 8004eee: 6c3b ldr r3, [r7, #64] ; 0x40 8004ef0: 6859 ldr r1, [r3, #4] 8004ef2: 6c7a ldr r2, [r7, #68] ; 0x44 8004ef4: 4613 mov r3, r2 8004ef6: 005b lsls r3, r3, #1 8004ef8: 4413 add r3, r2 8004efa: 009b lsls r3, r3, #2 8004efc: 3348 adds r3, #72 ; 0x48 8004efe: 443b add r3, r7 8004f00: 3b3c subs r3, #60 ; 0x3c 8004f02: 6019 str r1, [r3, #0] Txbuffer[i].len = q->len; 8004f04: 6c3b ldr r3, [r7, #64] ; 0x40 8004f06: 895b ldrh r3, [r3, #10] 8004f08: 4619 mov r1, r3 8004f0a: 6c7a ldr r2, [r7, #68] ; 0x44 8004f0c: 4613 mov r3, r2 8004f0e: 005b lsls r3, r3, #1 8004f10: 4413 add r3, r2 8004f12: 009b lsls r3, r3, #2 8004f14: 3348 adds r3, #72 ; 0x48 8004f16: 443b add r3, r7 8004f18: 3b38 subs r3, #56 ; 0x38 8004f1a: 6019 str r1, [r3, #0] if(i>0) 8004f1c: 6c7b ldr r3, [r7, #68] ; 0x44 8004f1e: 2b00 cmp r3, #0 8004f20: d011 beq.n 8004f46 { Txbuffer[i-1].next = &Txbuffer[i]; 8004f22: 6c7b ldr r3, [r7, #68] ; 0x44 8004f24: 1e5a subs r2, r3, #1 8004f26: f107 000c add.w r0, r7, #12 8004f2a: 6c79 ldr r1, [r7, #68] ; 0x44 8004f2c: 460b mov r3, r1 8004f2e: 005b lsls r3, r3, #1 8004f30: 440b add r3, r1 8004f32: 009b lsls r3, r3, #2 8004f34: 18c1 adds r1, r0, r3 8004f36: 4613 mov r3, r2 8004f38: 005b lsls r3, r3, #1 8004f3a: 4413 add r3, r2 8004f3c: 009b lsls r3, r3, #2 8004f3e: 3348 adds r3, #72 ; 0x48 8004f40: 443b add r3, r7 8004f42: 3b34 subs r3, #52 ; 0x34 8004f44: 6019 str r1, [r3, #0] } if(q->next == NULL) 8004f46: 6c3b ldr r3, [r7, #64] ; 0x40 8004f48: 681b ldr r3, [r3, #0] 8004f4a: 2b00 cmp r3, #0 8004f4c: d109 bne.n 8004f62 { Txbuffer[i].next = NULL; 8004f4e: 6c7a ldr r2, [r7, #68] ; 0x44 8004f50: 4613 mov r3, r2 8004f52: 005b lsls r3, r3, #1 8004f54: 4413 add r3, r2 8004f56: 009b lsls r3, r3, #2 8004f58: 3348 adds r3, #72 ; 0x48 8004f5a: 443b add r3, r7 8004f5c: 3b34 subs r3, #52 ; 0x34 8004f5e: 2200 movs r2, #0 8004f60: 601a str r2, [r3, #0] } i++; 8004f62: 6c7b ldr r3, [r7, #68] ; 0x44 8004f64: 3301 adds r3, #1 8004f66: 647b str r3, [r7, #68] ; 0x44 for(q = p; q != NULL; q = q->next) 8004f68: 6c3b ldr r3, [r7, #64] ; 0x40 8004f6a: 681b ldr r3, [r3, #0] 8004f6c: 643b str r3, [r7, #64] ; 0x40 8004f6e: 6c3b ldr r3, [r7, #64] ; 0x40 8004f70: 2b00 cmp r3, #0 8004f72: d1b6 bne.n 8004ee2 } TxConfig.Length = p->tot_len; 8004f74: 683b ldr r3, [r7, #0] 8004f76: 891b ldrh r3, [r3, #8] 8004f78: 461a mov r2, r3 8004f7a: 4b0a ldr r3, [pc, #40] ; (8004fa4 ) 8004f7c: 605a str r2, [r3, #4] TxConfig.TxBuffer = Txbuffer; 8004f7e: 4a09 ldr r2, [pc, #36] ; (8004fa4 ) 8004f80: f107 030c add.w r3, r7, #12 8004f84: 6093 str r3, [r2, #8] TxConfig.pData = p; 8004f86: 4a07 ldr r2, [pc, #28] ; (8004fa4 ) 8004f88: 683b ldr r3, [r7, #0] 8004f8a: 6353 str r3, [r2, #52] ; 0x34 HAL_ETH_Transmit(&heth, &TxConfig, ETH_DMA_TRANSMIT_TIMEOUT); 8004f8c: 2214 movs r2, #20 8004f8e: 4905 ldr r1, [pc, #20] ; (8004fa4 ) 8004f90: 4805 ldr r0, [pc, #20] ; (8004fa8 ) 8004f92: f7fc fb7f bl 8001694 return errval; 8004f96: f997 303f ldrsb.w r3, [r7, #63] ; 0x3f } 8004f9a: 4618 mov r0, r3 8004f9c: 3748 adds r7, #72 ; 0x48 8004f9e: 46bd mov sp, r7 8004fa0: bd80 pop {r7, pc} 8004fa2: bf00 nop 8004fa4: 24004bb8 .word 0x24004bb8 8004fa8: 24004b08 .word 0x24004b08 08004fac : * @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) { 8004fac: b580 push {r7, lr} 8004fae: b084 sub sp, #16 8004fb0: af00 add r7, sp, #0 8004fb2: 6078 str r0, [r7, #4] struct pbuf *p = NULL; 8004fb4: 2300 movs r3, #0 8004fb6: 60fb str r3, [r7, #12] if(RxAllocStatus == RX_ALLOC_OK) 8004fb8: 4b07 ldr r3, [pc, #28] ; (8004fd8 ) 8004fba: 781b ldrb r3, [r3, #0] 8004fbc: 2b00 cmp r3, #0 8004fbe: d105 bne.n 8004fcc { HAL_ETH_ReadData(&heth, (void **)&p); 8004fc0: f107 030c add.w r3, r7, #12 8004fc4: 4619 mov r1, r3 8004fc6: 4805 ldr r0, [pc, #20] ; (8004fdc ) 8004fc8: f7fc fbfb bl 80017c2 } return p; 8004fcc: 68fb ldr r3, [r7, #12] } 8004fce: 4618 mov r0, r3 8004fd0: 3710 adds r7, #16 8004fd2: 46bd mov sp, r7 8004fd4: bd80 pop {r7, pc} 8004fd6: bf00 nop 8004fd8: 24004b04 .word 0x24004b04 8004fdc: 24004b08 .word 0x24004b08 08004fe0 : * the appropriate input function is called. * * @param netif the lwip network interface structure for this ethernetif */ void ethernetif_input(struct netif *netif) { 8004fe0: b580 push {r7, lr} 8004fe2: b084 sub sp, #16 8004fe4: af00 add r7, sp, #0 8004fe6: 6078 str r0, [r7, #4] struct pbuf *p = NULL; 8004fe8: 2300 movs r3, #0 8004fea: 60fb str r3, [r7, #12] do { p = low_level_input( netif ); 8004fec: 6878 ldr r0, [r7, #4] 8004fee: f7ff ffdd bl 8004fac 8004ff2: 60f8 str r0, [r7, #12] if (p != NULL) 8004ff4: 68fb ldr r3, [r7, #12] 8004ff6: 2b00 cmp r3, #0 8004ff8: d00a beq.n 8005010 { if (netif->input( p, netif) != ERR_OK ) 8004ffa: 687b ldr r3, [r7, #4] 8004ffc: 691b ldr r3, [r3, #16] 8004ffe: 6879 ldr r1, [r7, #4] 8005000: 68f8 ldr r0, [r7, #12] 8005002: 4798 blx r3 8005004: 4603 mov r3, r0 8005006: 2b00 cmp r3, #0 8005008: d002 beq.n 8005010 { pbuf_free(p); 800500a: 68f8 ldr r0, [r7, #12] 800500c: f001 ffe2 bl 8006fd4 } } } while(p!=NULL); 8005010: 68fb ldr r3, [r7, #12] 8005012: 2b00 cmp r3, #0 8005014: d1ea bne.n 8004fec } 8005016: bf00 nop 8005018: bf00 nop 800501a: 3710 adds r7, #16 800501c: 46bd mov sp, r7 800501e: bd80 pop {r7, pc} 08005020 : * @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) { 8005020: b580 push {r7, lr} 8005022: b082 sub sp, #8 8005024: af00 add r7, sp, #0 8005026: 6078 str r0, [r7, #4] LWIP_ASSERT("netif != NULL", (netif != NULL)); 8005028: 687b ldr r3, [r7, #4] 800502a: 2b00 cmp r3, #0 800502c: d106 bne.n 800503c 800502e: 4b0e ldr r3, [pc, #56] ; (8005068 ) 8005030: f240 127b movw r2, #379 ; 0x17b 8005034: 490d ldr r1, [pc, #52] ; (800506c ) 8005036: 480e ldr r0, [pc, #56] ; (8005070 ) 8005038: f00b fdc6 bl 8010bc8 * 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; 800503c: 687b ldr r3, [r7, #4] 800503e: 2273 movs r2, #115 ; 0x73 8005040: f883 202e strb.w r2, [r3, #46] ; 0x2e netif->name[1] = IFNAME1; 8005044: 687b ldr r3, [r7, #4] 8005046: 2274 movs r2, #116 ; 0x74 8005048: f883 202f strb.w r2, [r3, #47] ; 0x2f * is available...) */ #if LWIP_IPV4 #if LWIP_ARP || LWIP_ETHERNET #if LWIP_ARP netif->output = etharp_output; 800504c: 687b ldr r3, [r7, #4] 800504e: 4a09 ldr r2, [pc, #36] ; (8005074 ) 8005050: 615a str r2, [r3, #20] #if LWIP_IPV6 netif->output_ip6 = ethip6_output; #endif /* LWIP_IPV6 */ netif->linkoutput = low_level_output; 8005052: 687b ldr r3, [r7, #4] 8005054: 4a08 ldr r2, [pc, #32] ; (8005078 ) 8005056: 619a str r2, [r3, #24] /* initialize the hardware */ low_level_init(netif); 8005058: 6878 ldr r0, [r7, #4] 800505a: f7ff fe8f bl 8004d7c return ERR_OK; 800505e: 2300 movs r3, #0 } 8005060: 4618 mov r0, r3 8005062: 3708 adds r7, #8 8005064: 46bd mov sp, r7 8005066: bd80 pop {r7, pc} 8005068: 08011b00 .word 0x08011b00 800506c: 08011b1c .word 0x08011b1c 8005070: 08011b2c .word 0x08011b2c 8005074: 0800e3f5 .word 0x0800e3f5 8005078: 08004ea9 .word 0x08004ea9 0800507c : * @brief Custom Rx pbuf free callback * @param pbuf: pbuf to be freed * @retval None */ void pbuf_free_custom(struct pbuf *p) { 800507c: b580 push {r7, lr} 800507e: b084 sub sp, #16 8005080: af00 add r7, sp, #0 8005082: 6078 str r0, [r7, #4] struct pbuf_custom* custom_pbuf = (struct pbuf_custom*)p; 8005084: 687b ldr r3, [r7, #4] 8005086: 60fb str r3, [r7, #12] LWIP_MEMPOOL_FREE(RX_POOL, custom_pbuf); 8005088: 68f9 ldr r1, [r7, #12] 800508a: 4807 ldr r0, [pc, #28] ; (80050a8 ) 800508c: f001 f812 bl 80060b4 /* 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) 8005090: 4b06 ldr r3, [pc, #24] ; (80050ac ) 8005092: 781b ldrb r3, [r3, #0] 8005094: 2b01 cmp r3, #1 8005096: d102 bne.n 800509e { RxAllocStatus = RX_ALLOC_OK; 8005098: 4b04 ldr r3, [pc, #16] ; (80050ac ) 800509a: 2200 movs r2, #0 800509c: 701a strb r2, [r3, #0] } } 800509e: bf00 nop 80050a0: 3710 adds r7, #16 80050a2: 46bd mov sp, r7 80050a4: bd80 pop {r7, pc} 80050a6: bf00 nop 80050a8: 08014c90 .word 0x08014c90 80050ac: 24004b04 .word 0x24004b04 080050b0 : * when LWIP_TIMERS == 1 and NO_SYS == 1 * @param None * @retval Current Time value */ u32_t sys_now(void) { 80050b0: b580 push {r7, lr} 80050b2: af00 add r7, sp, #0 return HAL_GetTick(); 80050b4: f7fb ffaa bl 800100c 80050b8: 4603 mov r3, r0 } 80050ba: 4618 mov r0, r3 80050bc: bd80 pop {r7, pc} ... 080050c0 : * @param ethHandle: ETH handle * @retval None */ void HAL_ETH_MspInit(ETH_HandleTypeDef* ethHandle) { 80050c0: b580 push {r7, lr} 80050c2: b08e sub sp, #56 ; 0x38 80050c4: af00 add r7, sp, #0 80050c6: 6078 str r0, [r7, #4] GPIO_InitTypeDef GPIO_InitStruct = {0}; 80050c8: f107 0324 add.w r3, r7, #36 ; 0x24 80050cc: 2200 movs r2, #0 80050ce: 601a str r2, [r3, #0] 80050d0: 605a str r2, [r3, #4] 80050d2: 609a str r2, [r3, #8] 80050d4: 60da str r2, [r3, #12] 80050d6: 611a str r2, [r3, #16] if(ethHandle->Instance==ETH) 80050d8: 687b ldr r3, [r7, #4] 80050da: 681b ldr r3, [r3, #0] 80050dc: 4a4d ldr r2, [pc, #308] ; (8005214 ) 80050de: 4293 cmp r3, r2 80050e0: f040 8093 bne.w 800520a { /* USER CODE BEGIN ETH_MspInit 0 */ /* USER CODE END ETH_MspInit 0 */ /* Enable Peripheral clock */ __HAL_RCC_ETH1MAC_CLK_ENABLE(); 80050e4: 4b4c ldr r3, [pc, #304] ; (8005218 ) 80050e6: f8d3 30d8 ldr.w r3, [r3, #216] ; 0xd8 80050ea: 4a4b ldr r2, [pc, #300] ; (8005218 ) 80050ec: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80050f0: f8c2 30d8 str.w r3, [r2, #216] ; 0xd8 80050f4: 4b48 ldr r3, [pc, #288] ; (8005218 ) 80050f6: f8d3 30d8 ldr.w r3, [r3, #216] ; 0xd8 80050fa: f403 4300 and.w r3, r3, #32768 ; 0x8000 80050fe: 623b str r3, [r7, #32] 8005100: 6a3b ldr r3, [r7, #32] __HAL_RCC_ETH1TX_CLK_ENABLE(); 8005102: 4b45 ldr r3, [pc, #276] ; (8005218 ) 8005104: f8d3 30d8 ldr.w r3, [r3, #216] ; 0xd8 8005108: 4a43 ldr r2, [pc, #268] ; (8005218 ) 800510a: f443 3380 orr.w r3, r3, #65536 ; 0x10000 800510e: f8c2 30d8 str.w r3, [r2, #216] ; 0xd8 8005112: 4b41 ldr r3, [pc, #260] ; (8005218 ) 8005114: f8d3 30d8 ldr.w r3, [r3, #216] ; 0xd8 8005118: f403 3380 and.w r3, r3, #65536 ; 0x10000 800511c: 61fb str r3, [r7, #28] 800511e: 69fb ldr r3, [r7, #28] __HAL_RCC_ETH1RX_CLK_ENABLE(); 8005120: 4b3d ldr r3, [pc, #244] ; (8005218 ) 8005122: f8d3 30d8 ldr.w r3, [r3, #216] ; 0xd8 8005126: 4a3c ldr r2, [pc, #240] ; (8005218 ) 8005128: f443 3300 orr.w r3, r3, #131072 ; 0x20000 800512c: f8c2 30d8 str.w r3, [r2, #216] ; 0xd8 8005130: 4b39 ldr r3, [pc, #228] ; (8005218 ) 8005132: f8d3 30d8 ldr.w r3, [r3, #216] ; 0xd8 8005136: f403 3300 and.w r3, r3, #131072 ; 0x20000 800513a: 61bb str r3, [r7, #24] 800513c: 69bb ldr r3, [r7, #24] __HAL_RCC_GPIOC_CLK_ENABLE(); 800513e: 4b36 ldr r3, [pc, #216] ; (8005218 ) 8005140: f8d3 30e0 ldr.w r3, [r3, #224] ; 0xe0 8005144: 4a34 ldr r2, [pc, #208] ; (8005218 ) 8005146: f043 0304 orr.w r3, r3, #4 800514a: f8c2 30e0 str.w r3, [r2, #224] ; 0xe0 800514e: 4b32 ldr r3, [pc, #200] ; (8005218 ) 8005150: f8d3 30e0 ldr.w r3, [r3, #224] ; 0xe0 8005154: f003 0304 and.w r3, r3, #4 8005158: 617b str r3, [r7, #20] 800515a: 697b ldr r3, [r7, #20] __HAL_RCC_GPIOA_CLK_ENABLE(); 800515c: 4b2e ldr r3, [pc, #184] ; (8005218 ) 800515e: f8d3 30e0 ldr.w r3, [r3, #224] ; 0xe0 8005162: 4a2d ldr r2, [pc, #180] ; (8005218 ) 8005164: f043 0301 orr.w r3, r3, #1 8005168: f8c2 30e0 str.w r3, [r2, #224] ; 0xe0 800516c: 4b2a ldr r3, [pc, #168] ; (8005218 ) 800516e: f8d3 30e0 ldr.w r3, [r3, #224] ; 0xe0 8005172: f003 0301 and.w r3, r3, #1 8005176: 613b str r3, [r7, #16] 8005178: 693b ldr r3, [r7, #16] __HAL_RCC_GPIOB_CLK_ENABLE(); 800517a: 4b27 ldr r3, [pc, #156] ; (8005218 ) 800517c: f8d3 30e0 ldr.w r3, [r3, #224] ; 0xe0 8005180: 4a25 ldr r2, [pc, #148] ; (8005218 ) 8005182: f043 0302 orr.w r3, r3, #2 8005186: f8c2 30e0 str.w r3, [r2, #224] ; 0xe0 800518a: 4b23 ldr r3, [pc, #140] ; (8005218 ) 800518c: f8d3 30e0 ldr.w r3, [r3, #224] ; 0xe0 8005190: f003 0302 and.w r3, r3, #2 8005194: 60fb str r3, [r7, #12] 8005196: 68fb ldr r3, [r7, #12] PB13 ------> ETH_TXD1 PA7 ------> ETH_CRS_DV PB11 ------> ETH_TX_EN PB12 ------> ETH_TXD0 */ GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5; 8005198: 2332 movs r3, #50 ; 0x32 800519a: 627b str r3, [r7, #36] ; 0x24 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 800519c: 2302 movs r3, #2 800519e: 62bb str r3, [r7, #40] ; 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 80051a0: 2300 movs r3, #0 80051a2: 62fb str r3, [r7, #44] ; 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 80051a4: 2303 movs r3, #3 80051a6: 633b str r3, [r7, #48] ; 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 80051a8: 230b movs r3, #11 80051aa: 637b str r3, [r7, #52] ; 0x34 HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); 80051ac: f107 0324 add.w r3, r7, #36 ; 0x24 80051b0: 4619 mov r1, r3 80051b2: 481a ldr r0, [pc, #104] ; (800521c ) 80051b4: f7fd fde2 bl 8002d7c GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_7; 80051b8: 2386 movs r3, #134 ; 0x86 80051ba: 627b str r3, [r7, #36] ; 0x24 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 80051bc: 2302 movs r3, #2 80051be: 62bb str r3, [r7, #40] ; 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 80051c0: 2300 movs r3, #0 80051c2: 62fb str r3, [r7, #44] ; 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 80051c4: 2303 movs r3, #3 80051c6: 633b str r3, [r7, #48] ; 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 80051c8: 230b movs r3, #11 80051ca: 637b str r3, [r7, #52] ; 0x34 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); 80051cc: f107 0324 add.w r3, r7, #36 ; 0x24 80051d0: 4619 mov r1, r3 80051d2: 4813 ldr r0, [pc, #76] ; (8005220 ) 80051d4: f7fd fdd2 bl 8002d7c GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_11|GPIO_PIN_12; 80051d8: f44f 5360 mov.w r3, #14336 ; 0x3800 80051dc: 627b str r3, [r7, #36] ; 0x24 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 80051de: 2302 movs r3, #2 80051e0: 62bb str r3, [r7, #40] ; 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 80051e2: 2300 movs r3, #0 80051e4: 62fb str r3, [r7, #44] ; 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 80051e6: 2303 movs r3, #3 80051e8: 633b str r3, [r7, #48] ; 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 80051ea: 230b movs r3, #11 80051ec: 637b str r3, [r7, #52] ; 0x34 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); 80051ee: f107 0324 add.w r3, r7, #36 ; 0x24 80051f2: 4619 mov r1, r3 80051f4: 480b ldr r0, [pc, #44] ; (8005224 ) 80051f6: f7fd fdc1 bl 8002d7c /* Peripheral interrupt init */ HAL_NVIC_SetPriority(ETH_IRQn, 0, 0); 80051fa: 2200 movs r2, #0 80051fc: 2100 movs r1, #0 80051fe: 203d movs r0, #61 ; 0x3d 8005200: f7fb ffff bl 8001202 HAL_NVIC_EnableIRQ(ETH_IRQn); 8005204: 203d movs r0, #61 ; 0x3d 8005206: f7fc f816 bl 8001236 /* USER CODE BEGIN ETH_MspInit 1 */ /* USER CODE END ETH_MspInit 1 */ } } 800520a: bf00 nop 800520c: 3738 adds r7, #56 ; 0x38 800520e: 46bd mov sp, r7 8005210: bd80 pop {r7, pc} 8005212: bf00 nop 8005214: 40028000 .word 0x40028000 8005218: 58024400 .word 0x58024400 800521c: 58020800 .word 0x58020800 8005220: 58020000 .word 0x58020000 8005224: 58020400 .word 0x58020400 08005228 : * @brief Initializes the MDIO interface GPIO and clocks. * @param None * @retval 0 if OK, -1 if ERROR */ int32_t ETH_PHY_IO_Init(void) { 8005228: b580 push {r7, lr} 800522a: 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); 800522c: 4802 ldr r0, [pc, #8] ; (8005238 ) 800522e: f7fc ffd9 bl 80021e4 return 0; 8005232: 2300 movs r3, #0 } 8005234: 4618 mov r0, r3 8005236: bd80 pop {r7, pc} 8005238: 24004b08 .word 0x24004b08 0800523c : * @brief De-Initializes the MDIO interface . * @param None * @retval 0 if OK, -1 if ERROR */ int32_t ETH_PHY_IO_DeInit (void) { 800523c: b480 push {r7} 800523e: af00 add r7, sp, #0 return 0; 8005240: 2300 movs r3, #0 } 8005242: 4618 mov r0, r3 8005244: 46bd mov sp, r7 8005246: f85d 7b04 ldr.w r7, [sp], #4 800524a: 4770 bx lr 0800524c : * @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) { 800524c: b580 push {r7, lr} 800524e: b084 sub sp, #16 8005250: af00 add r7, sp, #0 8005252: 60f8 str r0, [r7, #12] 8005254: 60b9 str r1, [r7, #8] 8005256: 607a str r2, [r7, #4] if(HAL_ETH_ReadPHYRegister(&heth, DevAddr, RegAddr, pRegVal) != HAL_OK) 8005258: 687b ldr r3, [r7, #4] 800525a: 68ba ldr r2, [r7, #8] 800525c: 68f9 ldr r1, [r7, #12] 800525e: 4807 ldr r0, [pc, #28] ; (800527c ) 8005260: f7fc fd2a bl 8001cb8 8005264: 4603 mov r3, r0 8005266: 2b00 cmp r3, #0 8005268: d002 beq.n 8005270 { return -1; 800526a: f04f 33ff mov.w r3, #4294967295 800526e: e000 b.n 8005272 } return 0; 8005270: 2300 movs r3, #0 } 8005272: 4618 mov r0, r3 8005274: 3710 adds r7, #16 8005276: 46bd mov sp, r7 8005278: bd80 pop {r7, pc} 800527a: bf00 nop 800527c: 24004b08 .word 0x24004b08 08005280 : * @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) { 8005280: b580 push {r7, lr} 8005282: b084 sub sp, #16 8005284: af00 add r7, sp, #0 8005286: 60f8 str r0, [r7, #12] 8005288: 60b9 str r1, [r7, #8] 800528a: 607a str r2, [r7, #4] if(HAL_ETH_WritePHYRegister(&heth, DevAddr, RegAddr, RegVal) != HAL_OK) 800528c: 687b ldr r3, [r7, #4] 800528e: 68ba ldr r2, [r7, #8] 8005290: 68f9 ldr r1, [r7, #12] 8005292: 4807 ldr r0, [pc, #28] ; (80052b0 ) 8005294: f7fc fd64 bl 8001d60 8005298: 4603 mov r3, r0 800529a: 2b00 cmp r3, #0 800529c: d002 beq.n 80052a4 { return -1; 800529e: f04f 33ff mov.w r3, #4294967295 80052a2: e000 b.n 80052a6 } return 0; 80052a4: 2300 movs r3, #0 } 80052a6: 4618 mov r0, r3 80052a8: 3710 adds r7, #16 80052aa: 46bd mov sp, r7 80052ac: bd80 pop {r7, pc} 80052ae: bf00 nop 80052b0: 24004b08 .word 0x24004b08 080052b4 : /** * @brief Get the time in millisecons used for internal PHY driver process. * @retval Time value */ int32_t ETH_PHY_IO_GetTick(void) { 80052b4: b580 push {r7, lr} 80052b6: af00 add r7, sp, #0 return HAL_GetTick(); 80052b8: f7fb fea8 bl 800100c 80052bc: 4603 mov r3, r0 } 80052be: 4618 mov r0, r3 80052c0: bd80 pop {r7, pc} ... 080052c4 : /** * @brief Check the ETH link state then update ETH driver and netif link accordingly. * @retval None */ void ethernet_link_check_state(struct netif *netif) { 80052c4: b580 push {r7, lr} 80052c6: b0a0 sub sp, #128 ; 0x80 80052c8: af00 add r7, sp, #0 80052ca: 6078 str r0, [r7, #4] ETH_MACConfigTypeDef MACConf = {0}; 80052cc: f107 030c add.w r3, r7, #12 80052d0: 2264 movs r2, #100 ; 0x64 80052d2: 2100 movs r1, #0 80052d4: 4618 mov r0, r3 80052d6: f00b fdd5 bl 8010e84 int32_t PHYLinkState = 0; 80052da: 2300 movs r3, #0 80052dc: 673b str r3, [r7, #112] ; 0x70 uint32_t linkchanged = 0U, speed = 0U, duplex = 0U; 80052de: 2300 movs r3, #0 80052e0: 67fb str r3, [r7, #124] ; 0x7c 80052e2: 2300 movs r3, #0 80052e4: 67bb str r3, [r7, #120] ; 0x78 80052e6: 2300 movs r3, #0 80052e8: 677b str r3, [r7, #116] ; 0x74 PHYLinkState = LAN8742_GetLinkState(&LAN8742); 80052ea: 483a ldr r0, [pc, #232] ; (80053d4 ) 80052ec: f7fb fd81 bl 8000df2 80052f0: 6738 str r0, [r7, #112] ; 0x70 if(netif_is_link_up(netif) && (PHYLinkState <= LAN8742_STATUS_LINK_DOWN)) 80052f2: 687b ldr r3, [r7, #4] 80052f4: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 80052f8: 089b lsrs r3, r3, #2 80052fa: f003 0301 and.w r3, r3, #1 80052fe: b2db uxtb r3, r3 8005300: 2b00 cmp r3, #0 8005302: d00c beq.n 800531e 8005304: 6f3b ldr r3, [r7, #112] ; 0x70 8005306: 2b01 cmp r3, #1 8005308: dc09 bgt.n 800531e { HAL_ETH_Stop(&heth); 800530a: 4833 ldr r0, [pc, #204] ; (80053d8 ) 800530c: f7fc f972 bl 80015f4 netif_set_down(netif); 8005310: 6878 ldr r0, [r7, #4] 8005312: f001 fa49 bl 80067a8 netif_set_link_down(netif); 8005316: 6878 ldr r0, [r7, #4] 8005318: f001 faac bl 8006874 netif_set_up(netif); netif_set_link_up(netif); } } } 800531c: e055 b.n 80053ca else if(!netif_is_link_up(netif) && (PHYLinkState > LAN8742_STATUS_LINK_DOWN)) 800531e: 687b ldr r3, [r7, #4] 8005320: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 8005324: f003 0304 and.w r3, r3, #4 8005328: 2b00 cmp r3, #0 800532a: d14e bne.n 80053ca 800532c: 6f3b ldr r3, [r7, #112] ; 0x70 800532e: 2b01 cmp r3, #1 8005330: dd4b ble.n 80053ca switch (PHYLinkState) 8005332: 6f3b ldr r3, [r7, #112] ; 0x70 8005334: 3b02 subs r3, #2 8005336: 2b03 cmp r3, #3 8005338: d82a bhi.n 8005390 800533a: a201 add r2, pc, #4 ; (adr r2, 8005340 ) 800533c: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8005340: 08005351 .word 0x08005351 8005344: 08005363 .word 0x08005363 8005348: 08005373 .word 0x08005373 800534c: 08005383 .word 0x08005383 duplex = ETH_FULLDUPLEX_MODE; 8005350: f44f 5300 mov.w r3, #8192 ; 0x2000 8005354: 677b str r3, [r7, #116] ; 0x74 speed = ETH_SPEED_100M; 8005356: f44f 4380 mov.w r3, #16384 ; 0x4000 800535a: 67bb str r3, [r7, #120] ; 0x78 linkchanged = 1; 800535c: 2301 movs r3, #1 800535e: 67fb str r3, [r7, #124] ; 0x7c break; 8005360: e017 b.n 8005392 duplex = ETH_HALFDUPLEX_MODE; 8005362: 2300 movs r3, #0 8005364: 677b str r3, [r7, #116] ; 0x74 speed = ETH_SPEED_100M; 8005366: f44f 4380 mov.w r3, #16384 ; 0x4000 800536a: 67bb str r3, [r7, #120] ; 0x78 linkchanged = 1; 800536c: 2301 movs r3, #1 800536e: 67fb str r3, [r7, #124] ; 0x7c break; 8005370: e00f b.n 8005392 duplex = ETH_FULLDUPLEX_MODE; 8005372: f44f 5300 mov.w r3, #8192 ; 0x2000 8005376: 677b str r3, [r7, #116] ; 0x74 speed = ETH_SPEED_10M; 8005378: 2300 movs r3, #0 800537a: 67bb str r3, [r7, #120] ; 0x78 linkchanged = 1; 800537c: 2301 movs r3, #1 800537e: 67fb str r3, [r7, #124] ; 0x7c break; 8005380: e007 b.n 8005392 duplex = ETH_HALFDUPLEX_MODE; 8005382: 2300 movs r3, #0 8005384: 677b str r3, [r7, #116] ; 0x74 speed = ETH_SPEED_10M; 8005386: 2300 movs r3, #0 8005388: 67bb str r3, [r7, #120] ; 0x78 linkchanged = 1; 800538a: 2301 movs r3, #1 800538c: 67fb str r3, [r7, #124] ; 0x7c break; 800538e: e000 b.n 8005392 break; 8005390: bf00 nop if(linkchanged) 8005392: 6ffb ldr r3, [r7, #124] ; 0x7c 8005394: 2b00 cmp r3, #0 8005396: d018 beq.n 80053ca HAL_ETH_GetMACConfig(&heth, &MACConf); 8005398: f107 030c add.w r3, r7, #12 800539c: 4619 mov r1, r3 800539e: 480e ldr r0, [pc, #56] ; (80053d8 ) 80053a0: f7fc fd32 bl 8001e08 MACConf.DuplexMode = duplex; 80053a4: 6f7b ldr r3, [r7, #116] ; 0x74 80053a6: 627b str r3, [r7, #36] ; 0x24 MACConf.Speed = speed; 80053a8: 6fbb ldr r3, [r7, #120] ; 0x78 80053aa: 623b str r3, [r7, #32] HAL_ETH_SetMACConfig(&heth, &MACConf); 80053ac: f107 030c add.w r3, r7, #12 80053b0: 4619 mov r1, r3 80053b2: 4809 ldr r0, [pc, #36] ; (80053d8 ) 80053b4: f7fc fefc bl 80021b0 HAL_ETH_Start(&heth); 80053b8: 4807 ldr r0, [pc, #28] ; (80053d8 ) 80053ba: f7fc f8b9 bl 8001530 netif_set_up(netif); 80053be: 6878 ldr r0, [r7, #4] 80053c0: f001 f986 bl 80066d0 netif_set_link_up(netif); 80053c4: 6878 ldr r0, [r7, #4] 80053c6: f001 fa21 bl 800680c } 80053ca: bf00 nop 80053cc: 3780 adds r7, #128 ; 0x80 80053ce: 46bd mov sp, r7 80053d0: bd80 pop {r7, pc} 80053d2: bf00 nop 80053d4: 24004bf0 .word 0x24004bf0 80053d8: 24004b08 .word 0x24004b08 080053dc : void HAL_ETH_RxAllocateCallback(uint8_t **buff) { 80053dc: b580 push {r7, lr} 80053de: b086 sub sp, #24 80053e0: af02 add r7, sp, #8 80053e2: 6078 str r0, [r7, #4] /* USER CODE BEGIN HAL ETH RxAllocateCallback */ struct pbuf_custom *p = LWIP_MEMPOOL_ALLOC(RX_POOL); 80053e4: 4812 ldr r0, [pc, #72] ; (8005430 ) 80053e6: f000 fdf7 bl 8005fd8 80053ea: 60f8 str r0, [r7, #12] if (p) 80053ec: 68fb ldr r3, [r7, #12] 80053ee: 2b00 cmp r3, #0 80053f0: d014 beq.n 800541c { /* Get the buff from the struct pbuf address. */ *buff = (uint8_t *)p + offsetof(RxBuff_t, buff); 80053f2: 68fb ldr r3, [r7, #12] 80053f4: f103 0220 add.w r2, r3, #32 80053f8: 687b ldr r3, [r7, #4] 80053fa: 601a str r2, [r3, #0] p->custom_free_function = pbuf_free_custom; 80053fc: 68fb ldr r3, [r7, #12] 80053fe: 4a0d ldr r2, [pc, #52] ; (8005434 ) 8005400: 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); 8005402: 687b ldr r3, [r7, #4] 8005404: 681b ldr r3, [r3, #0] 8005406: f44f 62c0 mov.w r2, #1536 ; 0x600 800540a: 9201 str r2, [sp, #4] 800540c: 9300 str r3, [sp, #0] 800540e: 68fb ldr r3, [r7, #12] 8005410: 2241 movs r2, #65 ; 0x41 8005412: 2100 movs r1, #0 8005414: 2000 movs r0, #0 8005416: f001 fc23 bl 8006c60 { RxAllocStatus = RX_ALLOC_ERROR; *buff = NULL; } /* USER CODE END HAL ETH RxAllocateCallback */ } 800541a: e005 b.n 8005428 RxAllocStatus = RX_ALLOC_ERROR; 800541c: 4b06 ldr r3, [pc, #24] ; (8005438 ) 800541e: 2201 movs r2, #1 8005420: 701a strb r2, [r3, #0] *buff = NULL; 8005422: 687b ldr r3, [r7, #4] 8005424: 2200 movs r2, #0 8005426: 601a str r2, [r3, #0] } 8005428: bf00 nop 800542a: 3710 adds r7, #16 800542c: 46bd mov sp, r7 800542e: bd80 pop {r7, pc} 8005430: 08014c90 .word 0x08014c90 8005434: 0800507d .word 0x0800507d 8005438: 24004b04 .word 0x24004b04 0800543c : void HAL_ETH_RxLinkCallback(void **pStart, void **pEnd, uint8_t *buff, uint16_t Length) { 800543c: b480 push {r7} 800543e: b08d sub sp, #52 ; 0x34 8005440: af00 add r7, sp, #0 8005442: 60f8 str r0, [r7, #12] 8005444: 60b9 str r1, [r7, #8] 8005446: 607a str r2, [r7, #4] 8005448: 807b strh r3, [r7, #2] /* USER CODE BEGIN HAL ETH RxLinkCallback */ struct pbuf **ppStart = (struct pbuf **)pStart; 800544a: 68fb ldr r3, [r7, #12] 800544c: 62bb str r3, [r7, #40] ; 0x28 struct pbuf **ppEnd = (struct pbuf **)pEnd; 800544e: 68bb ldr r3, [r7, #8] 8005450: 627b str r3, [r7, #36] ; 0x24 struct pbuf *p = NULL; 8005452: 2300 movs r3, #0 8005454: 62fb str r3, [r7, #44] ; 0x2c /* Get the struct pbuf from the buff address. */ p = (struct pbuf *)(buff - offsetof(RxBuff_t, buff)); 8005456: 687b ldr r3, [r7, #4] 8005458: 3b20 subs r3, #32 800545a: 62fb str r3, [r7, #44] ; 0x2c p->next = NULL; 800545c: 6afb ldr r3, [r7, #44] ; 0x2c 800545e: 2200 movs r2, #0 8005460: 601a str r2, [r3, #0] p->tot_len = 0; 8005462: 6afb ldr r3, [r7, #44] ; 0x2c 8005464: 2200 movs r2, #0 8005466: 811a strh r2, [r3, #8] p->len = Length; 8005468: 6afb ldr r3, [r7, #44] ; 0x2c 800546a: 887a ldrh r2, [r7, #2] 800546c: 815a strh r2, [r3, #10] /* Chain the buffer. */ if (!*ppStart) 800546e: 6abb ldr r3, [r7, #40] ; 0x28 8005470: 681b ldr r3, [r3, #0] 8005472: 2b00 cmp r3, #0 8005474: d103 bne.n 800547e { /* The first buffer of the packet. */ *ppStart = p; 8005476: 6abb ldr r3, [r7, #40] ; 0x28 8005478: 6afa ldr r2, [r7, #44] ; 0x2c 800547a: 601a str r2, [r3, #0] 800547c: e003 b.n 8005486 } else { /* Chain the buffer to the end of the packet. */ (*ppEnd)->next = p; 800547e: 6a7b ldr r3, [r7, #36] ; 0x24 8005480: 681b ldr r3, [r3, #0] 8005482: 6afa ldr r2, [r7, #44] ; 0x2c 8005484: 601a str r2, [r3, #0] } *ppEnd = p; 8005486: 6a7b ldr r3, [r7, #36] ; 0x24 8005488: 6afa ldr r2, [r7, #44] ; 0x2c 800548a: 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) 800548c: 6abb ldr r3, [r7, #40] ; 0x28 800548e: 681b ldr r3, [r3, #0] 8005490: 62fb str r3, [r7, #44] ; 0x2c 8005492: e009 b.n 80054a8 { p->tot_len += Length; 8005494: 6afb ldr r3, [r7, #44] ; 0x2c 8005496: 891a ldrh r2, [r3, #8] 8005498: 887b ldrh r3, [r7, #2] 800549a: 4413 add r3, r2 800549c: b29a uxth r2, r3 800549e: 6afb ldr r3, [r7, #44] ; 0x2c 80054a0: 811a strh r2, [r3, #8] for (p = *ppStart; p != NULL; p = p->next) 80054a2: 6afb ldr r3, [r7, #44] ; 0x2c 80054a4: 681b ldr r3, [r3, #0] 80054a6: 62fb str r3, [r7, #44] ; 0x2c 80054a8: 6afb ldr r3, [r7, #44] ; 0x2c 80054aa: 2b00 cmp r3, #0 80054ac: d1f2 bne.n 8005494 } /* Invalidate data cache because Rx DMA's writing to physical memory makes it stale. */ SCB_InvalidateDCache_by_Addr((uint32_t *)buff, Length); 80054ae: 887b ldrh r3, [r7, #2] 80054b0: 687a ldr r2, [r7, #4] 80054b2: 623a str r2, [r7, #32] 80054b4: 61fb str r3, [r7, #28] if ( dsize > 0 ) { 80054b6: 69fb ldr r3, [r7, #28] 80054b8: 2b00 cmp r3, #0 80054ba: dd1d ble.n 80054f8 int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U)); 80054bc: 6a3b ldr r3, [r7, #32] 80054be: f003 021f and.w r2, r3, #31 80054c2: 69fb ldr r3, [r7, #28] 80054c4: 4413 add r3, r2 80054c6: 61bb str r3, [r7, #24] uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */; 80054c8: 6a3b ldr r3, [r7, #32] 80054ca: 617b str r3, [r7, #20] __ASM volatile ("dsb 0xF":::"memory"); 80054cc: f3bf 8f4f dsb sy } 80054d0: bf00 nop SCB->DCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */ 80054d2: 4a0d ldr r2, [pc, #52] ; (8005508 ) 80054d4: 697b ldr r3, [r7, #20] 80054d6: f8c2 325c str.w r3, [r2, #604] ; 0x25c op_addr += __SCB_DCACHE_LINE_SIZE; 80054da: 697b ldr r3, [r7, #20] 80054dc: 3320 adds r3, #32 80054de: 617b str r3, [r7, #20] op_size -= __SCB_DCACHE_LINE_SIZE; 80054e0: 69bb ldr r3, [r7, #24] 80054e2: 3b20 subs r3, #32 80054e4: 61bb str r3, [r7, #24] } while ( op_size > 0 ); 80054e6: 69bb ldr r3, [r7, #24] 80054e8: 2b00 cmp r3, #0 80054ea: dcf2 bgt.n 80054d2 __ASM volatile ("dsb 0xF":::"memory"); 80054ec: f3bf 8f4f dsb sy } 80054f0: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 80054f2: f3bf 8f6f isb sy } 80054f6: bf00 nop } 80054f8: bf00 nop /* USER CODE END HAL ETH RxLinkCallback */ } 80054fa: bf00 nop 80054fc: 3734 adds r7, #52 ; 0x34 80054fe: 46bd mov sp, r7 8005500: f85d 7b04 ldr.w r7, [sp], #4 8005504: 4770 bx lr 8005506: bf00 nop 8005508: e000ed00 .word 0xe000ed00 0800550c : * @param err an lwip internal err_t * @return a string representation for err */ const char * lwip_strerr(err_t err) { 800550c: b480 push {r7} 800550e: b083 sub sp, #12 8005510: af00 add r7, sp, #0 8005512: 4603 mov r3, r0 8005514: 71fb strb r3, [r7, #7] if ((err > 0) || (-err >= (err_t)LWIP_ARRAYSIZE(err_strerr))) { 8005516: f997 3007 ldrsb.w r3, [r7, #7] 800551a: 2b00 cmp r3, #0 800551c: dc04 bgt.n 8005528 800551e: f997 3007 ldrsb.w r3, [r7, #7] 8005522: f113 0f10 cmn.w r3, #16 8005526: da01 bge.n 800552c return "Unknown error."; 8005528: 4b06 ldr r3, [pc, #24] ; (8005544 ) 800552a: e005 b.n 8005538 } return err_strerr[-err]; 800552c: f997 3007 ldrsb.w r3, [r7, #7] 8005530: 425b negs r3, r3 8005532: 4a05 ldr r2, [pc, #20] ; (8005548 ) 8005534: f852 3023 ldr.w r3, [r2, r3, lsl #2] } 8005538: 4618 mov r0, r3 800553a: 370c adds r7, #12 800553c: 46bd mov sp, r7 800553e: f85d 7b04 ldr.w r7, [sp], #4 8005542: 4770 bx lr 8005544: 08011c90 .word 0x08011c90 8005548: 24000024 .word 0x24000024 0800554c : * @param n u16_t in host byte order * @return n in network byte order */ u16_t lwip_htons(u16_t n) { 800554c: b480 push {r7} 800554e: b083 sub sp, #12 8005550: af00 add r7, sp, #0 8005552: 4603 mov r3, r0 8005554: 80fb strh r3, [r7, #6] return PP_HTONS(n); 8005556: 88fb ldrh r3, [r7, #6] 8005558: 021b lsls r3, r3, #8 800555a: b21a sxth r2, r3 800555c: 88fb ldrh r3, [r7, #6] 800555e: 0a1b lsrs r3, r3, #8 8005560: b29b uxth r3, r3 8005562: b21b sxth r3, r3 8005564: 4313 orrs r3, r2 8005566: b21b sxth r3, r3 8005568: b29b uxth r3, r3 } 800556a: 4618 mov r0, r3 800556c: 370c adds r7, #12 800556e: 46bd mov sp, r7 8005570: f85d 7b04 ldr.w r7, [sp], #4 8005574: 4770 bx lr 08005576 : * @param n u32_t in host byte order * @return n in network byte order */ u32_t lwip_htonl(u32_t n) { 8005576: b480 push {r7} 8005578: b083 sub sp, #12 800557a: af00 add r7, sp, #0 800557c: 6078 str r0, [r7, #4] return PP_HTONL(n); 800557e: 687b ldr r3, [r7, #4] 8005580: 061a lsls r2, r3, #24 8005582: 687b ldr r3, [r7, #4] 8005584: 021b lsls r3, r3, #8 8005586: f403 037f and.w r3, r3, #16711680 ; 0xff0000 800558a: 431a orrs r2, r3 800558c: 687b ldr r3, [r7, #4] 800558e: 0a1b lsrs r3, r3, #8 8005590: f403 437f and.w r3, r3, #65280 ; 0xff00 8005594: 431a orrs r2, r3 8005596: 687b ldr r3, [r7, #4] 8005598: 0e1b lsrs r3, r3, #24 800559a: 4313 orrs r3, r2 } 800559c: 4618 mov r0, r3 800559e: 370c adds r7, #12 80055a0: 46bd mov sp, r7 80055a2: f85d 7b04 ldr.w r7, [sp], #4 80055a6: 4770 bx lr 080055a8 : * @param len length of data to be summed * @return host order (!) lwip checksum (non-inverted Internet sum) */ u16_t lwip_standard_chksum(const void *dataptr, int len) { 80055a8: b480 push {r7} 80055aa: b089 sub sp, #36 ; 0x24 80055ac: af00 add r7, sp, #0 80055ae: 6078 str r0, [r7, #4] 80055b0: 6039 str r1, [r7, #0] const u8_t *pb = (const u8_t *)dataptr; 80055b2: 687b ldr r3, [r7, #4] 80055b4: 61fb str r3, [r7, #28] const u16_t *ps; u16_t t = 0; 80055b6: 2300 movs r3, #0 80055b8: 81fb strh r3, [r7, #14] u32_t sum = 0; 80055ba: 2300 movs r3, #0 80055bc: 617b str r3, [r7, #20] int odd = ((mem_ptr_t)pb & 1); 80055be: 69fb ldr r3, [r7, #28] 80055c0: f003 0301 and.w r3, r3, #1 80055c4: 613b str r3, [r7, #16] /* Get aligned to u16_t */ if (odd && len > 0) { 80055c6: 693b ldr r3, [r7, #16] 80055c8: 2b00 cmp r3, #0 80055ca: d00d beq.n 80055e8 80055cc: 683b ldr r3, [r7, #0] 80055ce: 2b00 cmp r3, #0 80055d0: dd0a ble.n 80055e8 ((u8_t *)&t)[1] = *pb++; 80055d2: 69fa ldr r2, [r7, #28] 80055d4: 1c53 adds r3, r2, #1 80055d6: 61fb str r3, [r7, #28] 80055d8: f107 030e add.w r3, r7, #14 80055dc: 3301 adds r3, #1 80055de: 7812 ldrb r2, [r2, #0] 80055e0: 701a strb r2, [r3, #0] len--; 80055e2: 683b ldr r3, [r7, #0] 80055e4: 3b01 subs r3, #1 80055e6: 603b str r3, [r7, #0] } /* Add the bulk of the data */ ps = (const u16_t *)(const void *)pb; 80055e8: 69fb ldr r3, [r7, #28] 80055ea: 61bb str r3, [r7, #24] while (len > 1) { 80055ec: e00a b.n 8005604 sum += *ps++; 80055ee: 69bb ldr r3, [r7, #24] 80055f0: 1c9a adds r2, r3, #2 80055f2: 61ba str r2, [r7, #24] 80055f4: 881b ldrh r3, [r3, #0] 80055f6: 461a mov r2, r3 80055f8: 697b ldr r3, [r7, #20] 80055fa: 4413 add r3, r2 80055fc: 617b str r3, [r7, #20] len -= 2; 80055fe: 683b ldr r3, [r7, #0] 8005600: 3b02 subs r3, #2 8005602: 603b str r3, [r7, #0] while (len > 1) { 8005604: 683b ldr r3, [r7, #0] 8005606: 2b01 cmp r3, #1 8005608: dcf1 bgt.n 80055ee } /* Consume left-over byte, if any */ if (len > 0) { 800560a: 683b ldr r3, [r7, #0] 800560c: 2b00 cmp r3, #0 800560e: dd04 ble.n 800561a ((u8_t *)&t)[0] = *(const u8_t *)ps; 8005610: f107 030e add.w r3, r7, #14 8005614: 69ba ldr r2, [r7, #24] 8005616: 7812 ldrb r2, [r2, #0] 8005618: 701a strb r2, [r3, #0] } /* Add end bytes */ sum += t; 800561a: 89fb ldrh r3, [r7, #14] 800561c: 461a mov r2, r3 800561e: 697b ldr r3, [r7, #20] 8005620: 4413 add r3, r2 8005622: 617b str r3, [r7, #20] /* Fold 32-bit sum to 16 bits calling this twice is probably faster than if statements... */ sum = FOLD_U32T(sum); 8005624: 697b ldr r3, [r7, #20] 8005626: 0c1a lsrs r2, r3, #16 8005628: 697b ldr r3, [r7, #20] 800562a: b29b uxth r3, r3 800562c: 4413 add r3, r2 800562e: 617b str r3, [r7, #20] sum = FOLD_U32T(sum); 8005630: 697b ldr r3, [r7, #20] 8005632: 0c1a lsrs r2, r3, #16 8005634: 697b ldr r3, [r7, #20] 8005636: b29b uxth r3, r3 8005638: 4413 add r3, r2 800563a: 617b str r3, [r7, #20] /* Swap if alignment was odd */ if (odd) { 800563c: 693b ldr r3, [r7, #16] 800563e: 2b00 cmp r3, #0 8005640: d007 beq.n 8005652 sum = SWAP_BYTES_IN_WORD(sum); 8005642: 697b ldr r3, [r7, #20] 8005644: 021b lsls r3, r3, #8 8005646: b29a uxth r2, r3 8005648: 697b ldr r3, [r7, #20] 800564a: 0a1b lsrs r3, r3, #8 800564c: b2db uxtb r3, r3 800564e: 4313 orrs r3, r2 8005650: 617b str r3, [r7, #20] } return (u16_t)sum; 8005652: 697b ldr r3, [r7, #20] 8005654: b29b uxth r3, r3 } 8005656: 4618 mov r0, r3 8005658: 3724 adds r7, #36 ; 0x24 800565a: 46bd mov sp, r7 800565c: f85d 7b04 ldr.w r7, [sp], #4 8005660: 4770 bx lr 08005662 : * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum(const void *dataptr, u16_t len) { 8005662: b580 push {r7, lr} 8005664: b082 sub sp, #8 8005666: af00 add r7, sp, #0 8005668: 6078 str r0, [r7, #4] 800566a: 460b mov r3, r1 800566c: 807b strh r3, [r7, #2] return (u16_t)~(unsigned int)LWIP_CHKSUM(dataptr, len); 800566e: 887b ldrh r3, [r7, #2] 8005670: 4619 mov r1, r3 8005672: 6878 ldr r0, [r7, #4] 8005674: f7ff ff98 bl 80055a8 8005678: 4603 mov r3, r0 800567a: 43db mvns r3, r3 800567c: b29b uxth r3, r3 } 800567e: 4618 mov r0, r3 8005680: 3708 adds r7, #8 8005682: 46bd mov sp, r7 8005684: bd80 pop {r7, pc} 08005686 : * @param p pbuf chain over that the checksum should be calculated * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum_pbuf(struct pbuf *p) { 8005686: b580 push {r7, lr} 8005688: b086 sub sp, #24 800568a: af00 add r7, sp, #0 800568c: 6078 str r0, [r7, #4] u32_t acc; struct pbuf *q; int swapped = 0; 800568e: 2300 movs r3, #0 8005690: 60fb str r3, [r7, #12] acc = 0; 8005692: 2300 movs r3, #0 8005694: 617b str r3, [r7, #20] for (q = p; q != NULL; q = q->next) { 8005696: 687b ldr r3, [r7, #4] 8005698: 613b str r3, [r7, #16] 800569a: e02b b.n 80056f4 acc += LWIP_CHKSUM(q->payload, q->len); 800569c: 693b ldr r3, [r7, #16] 800569e: 685a ldr r2, [r3, #4] 80056a0: 693b ldr r3, [r7, #16] 80056a2: 895b ldrh r3, [r3, #10] 80056a4: 4619 mov r1, r3 80056a6: 4610 mov r0, r2 80056a8: f7ff ff7e bl 80055a8 80056ac: 4603 mov r3, r0 80056ae: 461a mov r2, r3 80056b0: 697b ldr r3, [r7, #20] 80056b2: 4413 add r3, r2 80056b4: 617b str r3, [r7, #20] acc = FOLD_U32T(acc); 80056b6: 697b ldr r3, [r7, #20] 80056b8: 0c1a lsrs r2, r3, #16 80056ba: 697b ldr r3, [r7, #20] 80056bc: b29b uxth r3, r3 80056be: 4413 add r3, r2 80056c0: 617b str r3, [r7, #20] if (q->len % 2 != 0) { 80056c2: 693b ldr r3, [r7, #16] 80056c4: 895b ldrh r3, [r3, #10] 80056c6: f003 0301 and.w r3, r3, #1 80056ca: b29b uxth r3, r3 80056cc: 2b00 cmp r3, #0 80056ce: d00e beq.n 80056ee swapped = !swapped; 80056d0: 68fb ldr r3, [r7, #12] 80056d2: 2b00 cmp r3, #0 80056d4: bf0c ite eq 80056d6: 2301 moveq r3, #1 80056d8: 2300 movne r3, #0 80056da: b2db uxtb r3, r3 80056dc: 60fb str r3, [r7, #12] acc = SWAP_BYTES_IN_WORD(acc); 80056de: 697b ldr r3, [r7, #20] 80056e0: 021b lsls r3, r3, #8 80056e2: b29a uxth r2, r3 80056e4: 697b ldr r3, [r7, #20] 80056e6: 0a1b lsrs r3, r3, #8 80056e8: b2db uxtb r3, r3 80056ea: 4313 orrs r3, r2 80056ec: 617b str r3, [r7, #20] for (q = p; q != NULL; q = q->next) { 80056ee: 693b ldr r3, [r7, #16] 80056f0: 681b ldr r3, [r3, #0] 80056f2: 613b str r3, [r7, #16] 80056f4: 693b ldr r3, [r7, #16] 80056f6: 2b00 cmp r3, #0 80056f8: d1d0 bne.n 800569c } } if (swapped) { 80056fa: 68fb ldr r3, [r7, #12] 80056fc: 2b00 cmp r3, #0 80056fe: d007 beq.n 8005710 acc = SWAP_BYTES_IN_WORD(acc); 8005700: 697b ldr r3, [r7, #20] 8005702: 021b lsls r3, r3, #8 8005704: b29a uxth r2, r3 8005706: 697b ldr r3, [r7, #20] 8005708: 0a1b lsrs r3, r3, #8 800570a: b2db uxtb r3, r3 800570c: 4313 orrs r3, r2 800570e: 617b str r3, [r7, #20] } return (u16_t)~(acc & 0xffffUL); 8005710: 697b ldr r3, [r7, #20] 8005712: b29b uxth r3, r3 8005714: 43db mvns r3, r3 8005716: b29b uxth r3, r3 } 8005718: 4618 mov r0, r3 800571a: 3718 adds r7, #24 800571c: 46bd mov sp, r7 800571e: bd80 pop {r7, pc} 08005720 : * Initialize all modules. * Use this in NO_SYS mode. Use tcpip_init() otherwise. */ void lwip_init(void) { 8005720: b580 push {r7, lr} 8005722: b082 sub sp, #8 8005724: af00 add r7, sp, #0 #ifndef LWIP_SKIP_CONST_CHECK int a = 0; 8005726: 2300 movs r3, #0 8005728: 607b str r3, [r7, #4] /* Modules initialization */ stats_init(); #if !NO_SYS sys_init(); #endif /* !NO_SYS */ mem_init(); 800572a: f000 f8d9 bl 80058e0 memp_init(); 800572e: f000 fc07 bl 8005f40 pbuf_init(); netif_init(); 8005732: f000 fd0d bl 8006150 #endif /* LWIP_IPV4 */ #if LWIP_RAW raw_init(); #endif /* LWIP_RAW */ #if LWIP_UDP udp_init(); 8005736: f008 f829 bl 800d78c #endif /* LWIP_UDP */ #if LWIP_TCP tcp_init(); 800573a: f001 fed9 bl 80074f0 #if PPP_SUPPORT ppp_init(); #endif #if LWIP_TIMERS sys_timeouts_init(); 800573e: f007 ff9b bl 800d678 #endif /* LWIP_TIMERS */ } 8005742: bf00 nop 8005744: 3708 adds r7, #8 8005746: 46bd mov sp, r7 8005748: bd80 pop {r7, pc} ... 0800574c : #define mem_overflow_check_element(mem) #endif /* MEM_OVERFLOW_CHECK */ static struct mem * ptr_to_mem(mem_size_t ptr) { 800574c: b480 push {r7} 800574e: b083 sub sp, #12 8005750: af00 add r7, sp, #0 8005752: 4603 mov r3, r0 8005754: 80fb strh r3, [r7, #6] return (struct mem *)(void *)&ram[ptr]; 8005756: 4b05 ldr r3, [pc, #20] ; (800576c ) 8005758: 681a ldr r2, [r3, #0] 800575a: 88fb ldrh r3, [r7, #6] 800575c: 4413 add r3, r2 } 800575e: 4618 mov r0, r3 8005760: 370c adds r7, #12 8005762: 46bd mov sp, r7 8005764: f85d 7b04 ldr.w r7, [sp], #4 8005768: 4770 bx lr 800576a: bf00 nop 800576c: 24004c28 .word 0x24004c28 08005770 : static mem_size_t mem_to_ptr(void *mem) { 8005770: b480 push {r7} 8005772: b083 sub sp, #12 8005774: af00 add r7, sp, #0 8005776: 6078 str r0, [r7, #4] return (mem_size_t)((u8_t *)mem - ram); 8005778: 4b05 ldr r3, [pc, #20] ; (8005790 ) 800577a: 681b ldr r3, [r3, #0] 800577c: 687a ldr r2, [r7, #4] 800577e: 1ad3 subs r3, r2, r3 8005780: b29b uxth r3, r3 } 8005782: 4618 mov r0, r3 8005784: 370c adds r7, #12 8005786: 46bd mov sp, r7 8005788: f85d 7b04 ldr.w r7, [sp], #4 800578c: 4770 bx lr 800578e: bf00 nop 8005790: 24004c28 .word 0x24004c28 08005794 : * This assumes access to the heap is protected by the calling function * already. */ static void plug_holes(struct mem *mem) { 8005794: b590 push {r4, r7, lr} 8005796: b085 sub sp, #20 8005798: af00 add r7, sp, #0 800579a: 6078 str r0, [r7, #4] struct mem *nmem; struct mem *pmem; LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram); 800579c: 4b47 ldr r3, [pc, #284] ; (80058bc ) 800579e: 681b ldr r3, [r3, #0] 80057a0: 687a ldr r2, [r7, #4] 80057a2: 429a cmp r2, r3 80057a4: d206 bcs.n 80057b4 80057a6: 4b46 ldr r3, [pc, #280] ; (80058c0 ) 80057a8: f240 12df movw r2, #479 ; 0x1df 80057ac: 4945 ldr r1, [pc, #276] ; (80058c4 ) 80057ae: 4846 ldr r0, [pc, #280] ; (80058c8 ) 80057b0: f00b fa0a bl 8010bc8 LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end); 80057b4: 4b45 ldr r3, [pc, #276] ; (80058cc ) 80057b6: 681b ldr r3, [r3, #0] 80057b8: 687a ldr r2, [r7, #4] 80057ba: 429a cmp r2, r3 80057bc: d306 bcc.n 80057cc 80057be: 4b40 ldr r3, [pc, #256] ; (80058c0 ) 80057c0: f44f 72f0 mov.w r2, #480 ; 0x1e0 80057c4: 4942 ldr r1, [pc, #264] ; (80058d0 ) 80057c6: 4840 ldr r0, [pc, #256] ; (80058c8 ) 80057c8: f00b f9fe bl 8010bc8 LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0); 80057cc: 687b ldr r3, [r7, #4] 80057ce: 791b ldrb r3, [r3, #4] 80057d0: 2b00 cmp r3, #0 80057d2: d006 beq.n 80057e2 80057d4: 4b3a ldr r3, [pc, #232] ; (80058c0 ) 80057d6: f240 12e1 movw r2, #481 ; 0x1e1 80057da: 493e ldr r1, [pc, #248] ; (80058d4 ) 80057dc: 483a ldr r0, [pc, #232] ; (80058c8 ) 80057de: f00b f9f3 bl 8010bc8 /* plug hole forward */ LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED); 80057e2: 687b ldr r3, [r7, #4] 80057e4: 881b ldrh r3, [r3, #0] 80057e6: f647 52e8 movw r2, #32232 ; 0x7de8 80057ea: 4293 cmp r3, r2 80057ec: d906 bls.n 80057fc 80057ee: 4b34 ldr r3, [pc, #208] ; (80058c0 ) 80057f0: f44f 72f2 mov.w r2, #484 ; 0x1e4 80057f4: 4938 ldr r1, [pc, #224] ; (80058d8 ) 80057f6: 4834 ldr r0, [pc, #208] ; (80058c8 ) 80057f8: f00b f9e6 bl 8010bc8 nmem = ptr_to_mem(mem->next); 80057fc: 687b ldr r3, [r7, #4] 80057fe: 881b ldrh r3, [r3, #0] 8005800: 4618 mov r0, r3 8005802: f7ff ffa3 bl 800574c 8005806: 60f8 str r0, [r7, #12] if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { 8005808: 687a ldr r2, [r7, #4] 800580a: 68fb ldr r3, [r7, #12] 800580c: 429a cmp r2, r3 800580e: d025 beq.n 800585c 8005810: 68fb ldr r3, [r7, #12] 8005812: 791b ldrb r3, [r3, #4] 8005814: 2b00 cmp r3, #0 8005816: d121 bne.n 800585c 8005818: 4b2c ldr r3, [pc, #176] ; (80058cc ) 800581a: 681b ldr r3, [r3, #0] 800581c: 68fa ldr r2, [r7, #12] 800581e: 429a cmp r2, r3 8005820: d01c beq.n 800585c /* if mem->next is unused and not end of ram, combine mem and mem->next */ if (lfree == nmem) { 8005822: 4b2e ldr r3, [pc, #184] ; (80058dc ) 8005824: 681b ldr r3, [r3, #0] 8005826: 68fa ldr r2, [r7, #12] 8005828: 429a cmp r2, r3 800582a: d102 bne.n 8005832 lfree = mem; 800582c: 4a2b ldr r2, [pc, #172] ; (80058dc ) 800582e: 687b ldr r3, [r7, #4] 8005830: 6013 str r3, [r2, #0] } mem->next = nmem->next; 8005832: 68fb ldr r3, [r7, #12] 8005834: 881a ldrh r2, [r3, #0] 8005836: 687b ldr r3, [r7, #4] 8005838: 801a strh r2, [r3, #0] if (nmem->next != MEM_SIZE_ALIGNED) { 800583a: 68fb ldr r3, [r7, #12] 800583c: 881b ldrh r3, [r3, #0] 800583e: f647 52e8 movw r2, #32232 ; 0x7de8 8005842: 4293 cmp r3, r2 8005844: d00a beq.n 800585c ptr_to_mem(nmem->next)->prev = mem_to_ptr(mem); 8005846: 68fb ldr r3, [r7, #12] 8005848: 881b ldrh r3, [r3, #0] 800584a: 4618 mov r0, r3 800584c: f7ff ff7e bl 800574c 8005850: 4604 mov r4, r0 8005852: 6878 ldr r0, [r7, #4] 8005854: f7ff ff8c bl 8005770 8005858: 4603 mov r3, r0 800585a: 8063 strh r3, [r4, #2] } } /* plug hole backward */ pmem = ptr_to_mem(mem->prev); 800585c: 687b ldr r3, [r7, #4] 800585e: 885b ldrh r3, [r3, #2] 8005860: 4618 mov r0, r3 8005862: f7ff ff73 bl 800574c 8005866: 60b8 str r0, [r7, #8] if (pmem != mem && pmem->used == 0) { 8005868: 68ba ldr r2, [r7, #8] 800586a: 687b ldr r3, [r7, #4] 800586c: 429a cmp r2, r3 800586e: d020 beq.n 80058b2 8005870: 68bb ldr r3, [r7, #8] 8005872: 791b ldrb r3, [r3, #4] 8005874: 2b00 cmp r3, #0 8005876: d11c bne.n 80058b2 /* if mem->prev is unused, combine mem and mem->prev */ if (lfree == mem) { 8005878: 4b18 ldr r3, [pc, #96] ; (80058dc ) 800587a: 681b ldr r3, [r3, #0] 800587c: 687a ldr r2, [r7, #4] 800587e: 429a cmp r2, r3 8005880: d102 bne.n 8005888 lfree = pmem; 8005882: 4a16 ldr r2, [pc, #88] ; (80058dc ) 8005884: 68bb ldr r3, [r7, #8] 8005886: 6013 str r3, [r2, #0] } pmem->next = mem->next; 8005888: 687b ldr r3, [r7, #4] 800588a: 881a ldrh r2, [r3, #0] 800588c: 68bb ldr r3, [r7, #8] 800588e: 801a strh r2, [r3, #0] if (mem->next != MEM_SIZE_ALIGNED) { 8005890: 687b ldr r3, [r7, #4] 8005892: 881b ldrh r3, [r3, #0] 8005894: f647 52e8 movw r2, #32232 ; 0x7de8 8005898: 4293 cmp r3, r2 800589a: d00a beq.n 80058b2 ptr_to_mem(mem->next)->prev = mem_to_ptr(pmem); 800589c: 687b ldr r3, [r7, #4] 800589e: 881b ldrh r3, [r3, #0] 80058a0: 4618 mov r0, r3 80058a2: f7ff ff53 bl 800574c 80058a6: 4604 mov r4, r0 80058a8: 68b8 ldr r0, [r7, #8] 80058aa: f7ff ff61 bl 8005770 80058ae: 4603 mov r3, r0 80058b0: 8063 strh r3, [r4, #2] } } } 80058b2: bf00 nop 80058b4: 3714 adds r7, #20 80058b6: 46bd mov sp, r7 80058b8: bd90 pop {r4, r7, pc} 80058ba: bf00 nop 80058bc: 24004c28 .word 0x24004c28 80058c0: 08011ca0 .word 0x08011ca0 80058c4: 08011cd0 .word 0x08011cd0 80058c8: 08011ce8 .word 0x08011ce8 80058cc: 24004c2c .word 0x24004c2c 80058d0: 08011d10 .word 0x08011d10 80058d4: 08011d2c .word 0x08011d2c 80058d8: 08011d48 .word 0x08011d48 80058dc: 24004c30 .word 0x24004c30 080058e0 : /** * Zero the heap and initialize start, end and lowest-free */ void mem_init(void) { 80058e0: b580 push {r7, lr} 80058e2: b082 sub sp, #8 80058e4: 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); 80058e6: 4b16 ldr r3, [pc, #88] ; (8005940 ) 80058e8: 4a16 ldr r2, [pc, #88] ; (8005944 ) 80058ea: 601a str r2, [r3, #0] /* initialize the start of the heap */ mem = (struct mem *)(void *)ram; 80058ec: 4b14 ldr r3, [pc, #80] ; (8005940 ) 80058ee: 681b ldr r3, [r3, #0] 80058f0: 607b str r3, [r7, #4] mem->next = MEM_SIZE_ALIGNED; 80058f2: 687b ldr r3, [r7, #4] 80058f4: f647 52e8 movw r2, #32232 ; 0x7de8 80058f8: 801a strh r2, [r3, #0] mem->prev = 0; 80058fa: 687b ldr r3, [r7, #4] 80058fc: 2200 movs r2, #0 80058fe: 805a strh r2, [r3, #2] mem->used = 0; 8005900: 687b ldr r3, [r7, #4] 8005902: 2200 movs r2, #0 8005904: 711a strb r2, [r3, #4] /* initialize the end of the heap */ ram_end = ptr_to_mem(MEM_SIZE_ALIGNED); 8005906: f647 50e8 movw r0, #32232 ; 0x7de8 800590a: f7ff ff1f bl 800574c 800590e: 4603 mov r3, r0 8005910: 4a0d ldr r2, [pc, #52] ; (8005948 ) 8005912: 6013 str r3, [r2, #0] ram_end->used = 1; 8005914: 4b0c ldr r3, [pc, #48] ; (8005948 ) 8005916: 681b ldr r3, [r3, #0] 8005918: 2201 movs r2, #1 800591a: 711a strb r2, [r3, #4] ram_end->next = MEM_SIZE_ALIGNED; 800591c: 4b0a ldr r3, [pc, #40] ; (8005948 ) 800591e: 681b ldr r3, [r3, #0] 8005920: f647 52e8 movw r2, #32232 ; 0x7de8 8005924: 801a strh r2, [r3, #0] ram_end->prev = MEM_SIZE_ALIGNED; 8005926: 4b08 ldr r3, [pc, #32] ; (8005948 ) 8005928: 681b ldr r3, [r3, #0] 800592a: f647 52e8 movw r2, #32232 ; 0x7de8 800592e: 805a strh r2, [r3, #2] MEM_SANITY(); /* initialize the lowest-free pointer to the start of the heap */ lfree = (struct mem *)(void *)ram; 8005930: 4b03 ldr r3, [pc, #12] ; (8005940 ) 8005932: 681b ldr r3, [r3, #0] 8005934: 4a05 ldr r2, [pc, #20] ; (800594c ) 8005936: 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); } } 8005938: bf00 nop 800593a: 3708 adds r7, #8 800593c: 46bd mov sp, r7 800593e: bd80 pop {r7, pc} 8005940: 24004c28 .word 0x24004c28 8005944: 30000200 .word 0x30000200 8005948: 24004c2c .word 0x24004c2c 800594c: 24004c30 .word 0x24004c30 08005950 : /* Check if a struct mem is correctly linked. * If not, double-free is a possible reason. */ static int mem_link_valid(struct mem *mem) { 8005950: b580 push {r7, lr} 8005952: b086 sub sp, #24 8005954: af00 add r7, sp, #0 8005956: 6078 str r0, [r7, #4] struct mem *nmem, *pmem; mem_size_t rmem_idx; rmem_idx = mem_to_ptr(mem); 8005958: 6878 ldr r0, [r7, #4] 800595a: f7ff ff09 bl 8005770 800595e: 4603 mov r3, r0 8005960: 82fb strh r3, [r7, #22] nmem = ptr_to_mem(mem->next); 8005962: 687b ldr r3, [r7, #4] 8005964: 881b ldrh r3, [r3, #0] 8005966: 4618 mov r0, r3 8005968: f7ff fef0 bl 800574c 800596c: 6138 str r0, [r7, #16] pmem = ptr_to_mem(mem->prev); 800596e: 687b ldr r3, [r7, #4] 8005970: 885b ldrh r3, [r3, #2] 8005972: 4618 mov r0, r3 8005974: f7ff feea bl 800574c 8005978: 60f8 str r0, [r7, #12] if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) || 800597a: 687b ldr r3, [r7, #4] 800597c: 881b ldrh r3, [r3, #0] 800597e: f647 52e8 movw r2, #32232 ; 0x7de8 8005982: 4293 cmp r3, r2 8005984: d819 bhi.n 80059ba 8005986: 687b ldr r3, [r7, #4] 8005988: 885b ldrh r3, [r3, #2] 800598a: f647 52e8 movw r2, #32232 ; 0x7de8 800598e: 4293 cmp r3, r2 8005990: d813 bhi.n 80059ba ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) || 8005992: 687b ldr r3, [r7, #4] 8005994: 885b ldrh r3, [r3, #2] if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) || 8005996: 8afa ldrh r2, [r7, #22] 8005998: 429a cmp r2, r3 800599a: d004 beq.n 80059a6 ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) || 800599c: 68fb ldr r3, [r7, #12] 800599e: 881b ldrh r3, [r3, #0] 80059a0: 8afa ldrh r2, [r7, #22] 80059a2: 429a cmp r2, r3 80059a4: d109 bne.n 80059ba ((nmem != ram_end) && (nmem->prev != rmem_idx))) { 80059a6: 4b08 ldr r3, [pc, #32] ; (80059c8 ) 80059a8: 681b ldr r3, [r3, #0] ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) || 80059aa: 693a ldr r2, [r7, #16] 80059ac: 429a cmp r2, r3 80059ae: d006 beq.n 80059be ((nmem != ram_end) && (nmem->prev != rmem_idx))) { 80059b0: 693b ldr r3, [r7, #16] 80059b2: 885b ldrh r3, [r3, #2] 80059b4: 8afa ldrh r2, [r7, #22] 80059b6: 429a cmp r2, r3 80059b8: d001 beq.n 80059be return 0; 80059ba: 2300 movs r3, #0 80059bc: e000 b.n 80059c0 } return 1; 80059be: 2301 movs r3, #1 } 80059c0: 4618 mov r0, r3 80059c2: 3718 adds r7, #24 80059c4: 46bd mov sp, r7 80059c6: bd80 pop {r7, pc} 80059c8: 24004c2c .word 0x24004c2c 080059cc : * @param rmem is the data portion of a struct mem as returned by a previous * call to mem_malloc() */ void mem_free(void *rmem) { 80059cc: b580 push {r7, lr} 80059ce: b084 sub sp, #16 80059d0: af00 add r7, sp, #0 80059d2: 6078 str r0, [r7, #4] struct mem *mem; LWIP_MEM_FREE_DECL_PROTECT(); if (rmem == NULL) { 80059d4: 687b ldr r3, [r7, #4] 80059d6: 2b00 cmp r3, #0 80059d8: d103 bne.n 80059e2 LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("mem_free(p == NULL) was called.\n")); 80059da: 482f ldr r0, [pc, #188] ; (8005a98 ) 80059dc: f00b f962 bl 8010ca4 return; 80059e0: e057 b.n 8005a92 } if ((((mem_ptr_t)rmem) & (MEM_ALIGNMENT - 1)) != 0) { 80059e2: 687b ldr r3, [r7, #4] 80059e4: f003 0303 and.w r3, r3, #3 80059e8: 2b00 cmp r3, #0 80059ea: d00a beq.n 8005a02 LWIP_MEM_ILLEGAL_FREE("mem_free: sanity check alignment"); 80059ec: 4b2b ldr r3, [pc, #172] ; (8005a9c ) 80059ee: f240 2273 movw r2, #627 ; 0x273 80059f2: 492b ldr r1, [pc, #172] ; (8005aa0 ) 80059f4: 482b ldr r0, [pc, #172] ; (8005aa4 ) 80059f6: f00b f8e7 bl 8010bc8 LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: sanity check alignment\n")); 80059fa: 4829 ldr r0, [pc, #164] ; (8005aa0 ) 80059fc: f00b f952 bl 8010ca4 /* protect mem stats from concurrent access */ MEM_STATS_INC_LOCKED(illegal); return; 8005a00: e047 b.n 8005a92 } /* 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)); 8005a02: 687b ldr r3, [r7, #4] 8005a04: 3b08 subs r3, #8 8005a06: 60fb str r3, [r7, #12] if ((u8_t *)mem < ram || (u8_t *)rmem + MIN_SIZE_ALIGNED > (u8_t *)ram_end) { 8005a08: 4b27 ldr r3, [pc, #156] ; (8005aa8 ) 8005a0a: 681b ldr r3, [r3, #0] 8005a0c: 68fa ldr r2, [r7, #12] 8005a0e: 429a cmp r2, r3 8005a10: d306 bcc.n 8005a20 8005a12: 687b ldr r3, [r7, #4] 8005a14: f103 020c add.w r2, r3, #12 8005a18: 4b24 ldr r3, [pc, #144] ; (8005aac ) 8005a1a: 681b ldr r3, [r3, #0] 8005a1c: 429a cmp r2, r3 8005a1e: d90a bls.n 8005a36 LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory"); 8005a20: 4b1e ldr r3, [pc, #120] ; (8005a9c ) 8005a22: f240 227f movw r2, #639 ; 0x27f 8005a26: 4922 ldr r1, [pc, #136] ; (8005ab0 ) 8005a28: 481e ldr r0, [pc, #120] ; (8005aa4 ) 8005a2a: f00b f8cd bl 8010bc8 LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory\n")); 8005a2e: 4820 ldr r0, [pc, #128] ; (8005ab0 ) 8005a30: f00b f938 bl 8010ca4 /* protect mem stats from concurrent access */ MEM_STATS_INC_LOCKED(illegal); return; 8005a34: e02d b.n 8005a92 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) { 8005a36: 68fb ldr r3, [r7, #12] 8005a38: 791b ldrb r3, [r3, #4] 8005a3a: 2b00 cmp r3, #0 8005a3c: d10a bne.n 8005a54 LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: double free"); 8005a3e: 4b17 ldr r3, [pc, #92] ; (8005a9c ) 8005a40: f44f 7223 mov.w r2, #652 ; 0x28c 8005a44: 491b ldr r1, [pc, #108] ; (8005ab4 ) 8005a46: 4817 ldr r0, [pc, #92] ; (8005aa4 ) 8005a48: f00b f8be bl 8010bc8 LWIP_MEM_FREE_UNPROTECT(); LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory: double free?\n")); 8005a4c: 481a ldr r0, [pc, #104] ; (8005ab8 ) 8005a4e: f00b f929 bl 8010ca4 /* protect mem stats from concurrent access */ MEM_STATS_INC_LOCKED(illegal); return; 8005a52: e01e b.n 8005a92 } if (!mem_link_valid(mem)) { 8005a54: 68f8 ldr r0, [r7, #12] 8005a56: f7ff ff7b bl 8005950 8005a5a: 4603 mov r3, r0 8005a5c: 2b00 cmp r3, #0 8005a5e: d10a bne.n 8005a76 LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: non-linked: double free"); 8005a60: 4b0e ldr r3, [pc, #56] ; (8005a9c ) 8005a62: f240 2295 movw r2, #661 ; 0x295 8005a66: 4915 ldr r1, [pc, #84] ; (8005abc ) 8005a68: 480e ldr r0, [pc, #56] ; (8005aa4 ) 8005a6a: f00b f8ad bl 8010bc8 LWIP_MEM_FREE_UNPROTECT(); LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory: non-linked: double free?\n")); 8005a6e: 4814 ldr r0, [pc, #80] ; (8005ac0 ) 8005a70: f00b f918 bl 8010ca4 /* protect mem stats from concurrent access */ MEM_STATS_INC_LOCKED(illegal); return; 8005a74: e00d b.n 8005a92 } /* mem is now unused. */ mem->used = 0; 8005a76: 68fb ldr r3, [r7, #12] 8005a78: 2200 movs r2, #0 8005a7a: 711a strb r2, [r3, #4] if (mem < lfree) { 8005a7c: 4b11 ldr r3, [pc, #68] ; (8005ac4 ) 8005a7e: 681b ldr r3, [r3, #0] 8005a80: 68fa ldr r2, [r7, #12] 8005a82: 429a cmp r2, r3 8005a84: d202 bcs.n 8005a8c /* the newly freed struct is now the lowest */ lfree = mem; 8005a86: 4a0f ldr r2, [pc, #60] ; (8005ac4 ) 8005a88: 68fb ldr r3, [r7, #12] 8005a8a: 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); 8005a8c: 68f8 ldr r0, [r7, #12] 8005a8e: f7ff fe81 bl 8005794 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(); } 8005a92: 3710 adds r7, #16 8005a94: 46bd mov sp, r7 8005a96: bd80 pop {r7, pc} 8005a98: 08011d74 .word 0x08011d74 8005a9c: 08011ca0 .word 0x08011ca0 8005aa0: 08011d94 .word 0x08011d94 8005aa4: 08011ce8 .word 0x08011ce8 8005aa8: 24004c28 .word 0x24004c28 8005aac: 24004c2c .word 0x24004c2c 8005ab0: 08011db8 .word 0x08011db8 8005ab4: 08011dd4 .word 0x08011dd4 8005ab8: 08011dfc .word 0x08011dfc 8005abc: 08011e24 .word 0x08011e24 8005ac0: 08011e58 .word 0x08011e58 8005ac4: 24004c30 .word 0x24004c30 08005ac8 : * 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) { 8005ac8: b580 push {r7, lr} 8005aca: b088 sub sp, #32 8005acc: af00 add r7, sp, #0 8005ace: 6078 str r0, [r7, #4] 8005ad0: 460b mov r3, r1 8005ad2: 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); 8005ad4: 887b ldrh r3, [r7, #2] 8005ad6: 3303 adds r3, #3 8005ad8: b29b uxth r3, r3 8005ada: f023 0303 bic.w r3, r3, #3 8005ade: 83fb strh r3, [r7, #30] if (newsize < MIN_SIZE_ALIGNED) { 8005ae0: 8bfb ldrh r3, [r7, #30] 8005ae2: 2b0b cmp r3, #11 8005ae4: d801 bhi.n 8005aea /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; 8005ae6: 230c movs r3, #12 8005ae8: 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)) { 8005aea: 8bfb ldrh r3, [r7, #30] 8005aec: f647 52e8 movw r2, #32232 ; 0x7de8 8005af0: 4293 cmp r3, r2 8005af2: d803 bhi.n 8005afc 8005af4: 8bfa ldrh r2, [r7, #30] 8005af6: 887b ldrh r3, [r7, #2] 8005af8: 429a cmp r2, r3 8005afa: d201 bcs.n 8005b00 return NULL; 8005afc: 2300 movs r3, #0 8005afe: e0d3 b.n 8005ca8 } LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram && 8005b00: 4b6b ldr r3, [pc, #428] ; (8005cb0 ) 8005b02: 681b ldr r3, [r3, #0] 8005b04: 687a ldr r2, [r7, #4] 8005b06: 429a cmp r2, r3 8005b08: d304 bcc.n 8005b14 8005b0a: 4b6a ldr r3, [pc, #424] ; (8005cb4 ) 8005b0c: 681b ldr r3, [r3, #0] 8005b0e: 687a ldr r2, [r7, #4] 8005b10: 429a cmp r2, r3 8005b12: d306 bcc.n 8005b22 8005b14: 4b68 ldr r3, [pc, #416] ; (8005cb8 ) 8005b16: f240 22d1 movw r2, #721 ; 0x2d1 8005b1a: 4968 ldr r1, [pc, #416] ; (8005cbc ) 8005b1c: 4868 ldr r0, [pc, #416] ; (8005cc0 ) 8005b1e: f00b f853 bl 8010bc8 (u8_t *)rmem < (u8_t *)ram_end); if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { 8005b22: 4b63 ldr r3, [pc, #396] ; (8005cb0 ) 8005b24: 681b ldr r3, [r3, #0] 8005b26: 687a ldr r2, [r7, #4] 8005b28: 429a cmp r2, r3 8005b2a: d304 bcc.n 8005b36 8005b2c: 4b61 ldr r3, [pc, #388] ; (8005cb4 ) 8005b2e: 681b ldr r3, [r3, #0] 8005b30: 687a ldr r2, [r7, #4] 8005b32: 429a cmp r2, r3 8005b34: d304 bcc.n 8005b40 LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_trim: illegal memory\n")); 8005b36: 4863 ldr r0, [pc, #396] ; (8005cc4 ) 8005b38: f00b f8b4 bl 8010ca4 /* protect mem stats from concurrent access */ MEM_STATS_INC_LOCKED(illegal); return rmem; 8005b3c: 687b ldr r3, [r7, #4] 8005b3e: e0b3 b.n 8005ca8 } /* 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)); 8005b40: 687b ldr r3, [r7, #4] 8005b42: 3b08 subs r3, #8 8005b44: 61bb str r3, [r7, #24] #if MEM_OVERFLOW_CHECK mem_overflow_check_element(mem); #endif /* ... and its offset pointer */ ptr = mem_to_ptr(mem); 8005b46: 69b8 ldr r0, [r7, #24] 8005b48: f7ff fe12 bl 8005770 8005b4c: 4603 mov r3, r0 8005b4e: 82fb strh r3, [r7, #22] size = (mem_size_t)((mem_size_t)(mem->next - ptr) - (SIZEOF_STRUCT_MEM + MEM_SANITY_OVERHEAD)); 8005b50: 69bb ldr r3, [r7, #24] 8005b52: 881a ldrh r2, [r3, #0] 8005b54: 8afb ldrh r3, [r7, #22] 8005b56: 1ad3 subs r3, r2, r3 8005b58: b29b uxth r3, r3 8005b5a: 3b08 subs r3, #8 8005b5c: 82bb strh r3, [r7, #20] LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size); 8005b5e: 8bfa ldrh r2, [r7, #30] 8005b60: 8abb ldrh r3, [r7, #20] 8005b62: 429a cmp r2, r3 8005b64: d906 bls.n 8005b74 8005b66: 4b54 ldr r3, [pc, #336] ; (8005cb8 ) 8005b68: f44f 7239 mov.w r2, #740 ; 0x2e4 8005b6c: 4956 ldr r1, [pc, #344] ; (8005cc8 ) 8005b6e: 4854 ldr r0, [pc, #336] ; (8005cc0 ) 8005b70: f00b f82a bl 8010bc8 if (newsize > size) { 8005b74: 8bfa ldrh r2, [r7, #30] 8005b76: 8abb ldrh r3, [r7, #20] 8005b78: 429a cmp r2, r3 8005b7a: d901 bls.n 8005b80 /* not supported */ return NULL; 8005b7c: 2300 movs r3, #0 8005b7e: e093 b.n 8005ca8 } if (newsize == size) { 8005b80: 8bfa ldrh r2, [r7, #30] 8005b82: 8abb ldrh r3, [r7, #20] 8005b84: 429a cmp r2, r3 8005b86: d101 bne.n 8005b8c /* No change in size, simply return */ return rmem; 8005b88: 687b ldr r3, [r7, #4] 8005b8a: e08d b.n 8005ca8 } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); mem2 = ptr_to_mem(mem->next); 8005b8c: 69bb ldr r3, [r7, #24] 8005b8e: 881b ldrh r3, [r3, #0] 8005b90: 4618 mov r0, r3 8005b92: f7ff fddb bl 800574c 8005b96: 6138 str r0, [r7, #16] if (mem2->used == 0) { 8005b98: 693b ldr r3, [r7, #16] 8005b9a: 791b ldrb r3, [r3, #4] 8005b9c: 2b00 cmp r3, #0 8005b9e: d141 bne.n 8005c24 /* 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); 8005ba0: 69bb ldr r3, [r7, #24] 8005ba2: 881b ldrh r3, [r3, #0] 8005ba4: f647 52e8 movw r2, #32232 ; 0x7de8 8005ba8: 4293 cmp r3, r2 8005baa: d106 bne.n 8005bba 8005bac: 4b42 ldr r3, [pc, #264] ; (8005cb8 ) 8005bae: f240 22f5 movw r2, #757 ; 0x2f5 8005bb2: 4946 ldr r1, [pc, #280] ; (8005ccc ) 8005bb4: 4842 ldr r0, [pc, #264] ; (8005cc0 ) 8005bb6: f00b f807 bl 8010bc8 /* remember the old next pointer */ next = mem2->next; 8005bba: 693b ldr r3, [r7, #16] 8005bbc: 881b ldrh r3, [r3, #0] 8005bbe: 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); 8005bc0: 8afa ldrh r2, [r7, #22] 8005bc2: 8bfb ldrh r3, [r7, #30] 8005bc4: 4413 add r3, r2 8005bc6: b29b uxth r3, r3 8005bc8: 3308 adds r3, #8 8005bca: 81fb strh r3, [r7, #14] if (lfree == mem2) { 8005bcc: 4b40 ldr r3, [pc, #256] ; (8005cd0 ) 8005bce: 681b ldr r3, [r3, #0] 8005bd0: 693a ldr r2, [r7, #16] 8005bd2: 429a cmp r2, r3 8005bd4: d106 bne.n 8005be4 lfree = ptr_to_mem(ptr2); 8005bd6: 89fb ldrh r3, [r7, #14] 8005bd8: 4618 mov r0, r3 8005bda: f7ff fdb7 bl 800574c 8005bde: 4603 mov r3, r0 8005be0: 4a3b ldr r2, [pc, #236] ; (8005cd0 ) 8005be2: 6013 str r3, [r2, #0] } mem2 = ptr_to_mem(ptr2); 8005be4: 89fb ldrh r3, [r7, #14] 8005be6: 4618 mov r0, r3 8005be8: f7ff fdb0 bl 800574c 8005bec: 6138 str r0, [r7, #16] mem2->used = 0; 8005bee: 693b ldr r3, [r7, #16] 8005bf0: 2200 movs r2, #0 8005bf2: 711a strb r2, [r3, #4] /* restore the next pointer */ mem2->next = next; 8005bf4: 693b ldr r3, [r7, #16] 8005bf6: 89ba ldrh r2, [r7, #12] 8005bf8: 801a strh r2, [r3, #0] /* link it back to mem */ mem2->prev = ptr; 8005bfa: 693b ldr r3, [r7, #16] 8005bfc: 8afa ldrh r2, [r7, #22] 8005bfe: 805a strh r2, [r3, #2] /* link mem to it */ mem->next = ptr2; 8005c00: 69bb ldr r3, [r7, #24] 8005c02: 89fa ldrh r2, [r7, #14] 8005c04: 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) { 8005c06: 693b ldr r3, [r7, #16] 8005c08: 881b ldrh r3, [r3, #0] 8005c0a: f647 52e8 movw r2, #32232 ; 0x7de8 8005c0e: 4293 cmp r3, r2 8005c10: d049 beq.n 8005ca6 ptr_to_mem(mem2->next)->prev = ptr2; 8005c12: 693b ldr r3, [r7, #16] 8005c14: 881b ldrh r3, [r3, #0] 8005c16: 4618 mov r0, r3 8005c18: f7ff fd98 bl 800574c 8005c1c: 4602 mov r2, r0 8005c1e: 89fb ldrh r3, [r7, #14] 8005c20: 8053 strh r3, [r2, #2] 8005c22: e040 b.n 8005ca6 } 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) { 8005c24: 8bfb ldrh r3, [r7, #30] 8005c26: f103 0214 add.w r2, r3, #20 8005c2a: 8abb ldrh r3, [r7, #20] 8005c2c: 429a cmp r2, r3 8005c2e: d83a bhi.n 8005ca6 * 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); 8005c30: 8afa ldrh r2, [r7, #22] 8005c32: 8bfb ldrh r3, [r7, #30] 8005c34: 4413 add r3, r2 8005c36: b29b uxth r3, r3 8005c38: 3308 adds r3, #8 8005c3a: 81fb strh r3, [r7, #14] LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED); 8005c3c: 69bb ldr r3, [r7, #24] 8005c3e: 881b ldrh r3, [r3, #0] 8005c40: f647 52e8 movw r2, #32232 ; 0x7de8 8005c44: 4293 cmp r3, r2 8005c46: d106 bne.n 8005c56 8005c48: 4b1b ldr r3, [pc, #108] ; (8005cb8 ) 8005c4a: f240 3216 movw r2, #790 ; 0x316 8005c4e: 491f ldr r1, [pc, #124] ; (8005ccc ) 8005c50: 481b ldr r0, [pc, #108] ; (8005cc0 ) 8005c52: f00a ffb9 bl 8010bc8 mem2 = ptr_to_mem(ptr2); 8005c56: 89fb ldrh r3, [r7, #14] 8005c58: 4618 mov r0, r3 8005c5a: f7ff fd77 bl 800574c 8005c5e: 6138 str r0, [r7, #16] if (mem2 < lfree) { 8005c60: 4b1b ldr r3, [pc, #108] ; (8005cd0 ) 8005c62: 681b ldr r3, [r3, #0] 8005c64: 693a ldr r2, [r7, #16] 8005c66: 429a cmp r2, r3 8005c68: d202 bcs.n 8005c70 lfree = mem2; 8005c6a: 4a19 ldr r2, [pc, #100] ; (8005cd0 ) 8005c6c: 693b ldr r3, [r7, #16] 8005c6e: 6013 str r3, [r2, #0] } mem2->used = 0; 8005c70: 693b ldr r3, [r7, #16] 8005c72: 2200 movs r2, #0 8005c74: 711a strb r2, [r3, #4] mem2->next = mem->next; 8005c76: 69bb ldr r3, [r7, #24] 8005c78: 881a ldrh r2, [r3, #0] 8005c7a: 693b ldr r3, [r7, #16] 8005c7c: 801a strh r2, [r3, #0] mem2->prev = ptr; 8005c7e: 693b ldr r3, [r7, #16] 8005c80: 8afa ldrh r2, [r7, #22] 8005c82: 805a strh r2, [r3, #2] mem->next = ptr2; 8005c84: 69bb ldr r3, [r7, #24] 8005c86: 89fa ldrh r2, [r7, #14] 8005c88: 801a strh r2, [r3, #0] if (mem2->next != MEM_SIZE_ALIGNED) { 8005c8a: 693b ldr r3, [r7, #16] 8005c8c: 881b ldrh r3, [r3, #0] 8005c8e: f647 52e8 movw r2, #32232 ; 0x7de8 8005c92: 4293 cmp r3, r2 8005c94: d007 beq.n 8005ca6 ptr_to_mem(mem2->next)->prev = ptr2; 8005c96: 693b ldr r3, [r7, #16] 8005c98: 881b ldrh r3, [r3, #0] 8005c9a: 4618 mov r0, r3 8005c9c: f7ff fd56 bl 800574c 8005ca0: 4602 mov r2, r0 8005ca2: 89fb ldrh r3, [r7, #14] 8005ca4: 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; 8005ca6: 687b ldr r3, [r7, #4] } 8005ca8: 4618 mov r0, r3 8005caa: 3720 adds r7, #32 8005cac: 46bd mov sp, r7 8005cae: bd80 pop {r7, pc} 8005cb0: 24004c28 .word 0x24004c28 8005cb4: 24004c2c .word 0x24004c2c 8005cb8: 08011ca0 .word 0x08011ca0 8005cbc: 08011e8c .word 0x08011e8c 8005cc0: 08011ce8 .word 0x08011ce8 8005cc4: 08011ea4 .word 0x08011ea4 8005cc8: 08011ec0 .word 0x08011ec0 8005ccc: 08011ee0 .word 0x08011ee0 8005cd0: 24004c30 .word 0x24004c30 08005cd4 : * * Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT). */ void * mem_malloc(mem_size_t size_in) { 8005cd4: b580 push {r7, lr} 8005cd6: b088 sub sp, #32 8005cd8: af00 add r7, sp, #0 8005cda: 4603 mov r3, r0 8005cdc: 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) { 8005cde: 88fb ldrh r3, [r7, #6] 8005ce0: 2b00 cmp r3, #0 8005ce2: d101 bne.n 8005ce8 return NULL; 8005ce4: 2300 movs r3, #0 8005ce6: e0e3 b.n 8005eb0 } /* 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); 8005ce8: 88fb ldrh r3, [r7, #6] 8005cea: 3303 adds r3, #3 8005cec: b29b uxth r3, r3 8005cee: f023 0303 bic.w r3, r3, #3 8005cf2: 83bb strh r3, [r7, #28] if (size < MIN_SIZE_ALIGNED) { 8005cf4: 8bbb ldrh r3, [r7, #28] 8005cf6: 2b0b cmp r3, #11 8005cf8: d801 bhi.n 8005cfe /* every data block must be at least MIN_SIZE_ALIGNED long */ size = MIN_SIZE_ALIGNED; 8005cfa: 230c movs r3, #12 8005cfc: 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)) { 8005cfe: 8bbb ldrh r3, [r7, #28] 8005d00: f647 52e8 movw r2, #32232 ; 0x7de8 8005d04: 4293 cmp r3, r2 8005d06: d803 bhi.n 8005d10 8005d08: 8bba ldrh r2, [r7, #28] 8005d0a: 88fb ldrh r3, [r7, #6] 8005d0c: 429a cmp r2, r3 8005d0e: d201 bcs.n 8005d14 return NULL; 8005d10: 2300 movs r3, #0 8005d12: e0cd b.n 8005eb0 #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; 8005d14: 4b68 ldr r3, [pc, #416] ; (8005eb8 ) 8005d16: 681b ldr r3, [r3, #0] 8005d18: 4618 mov r0, r3 8005d1a: f7ff fd29 bl 8005770 8005d1e: 4603 mov r3, r0 8005d20: 83fb strh r3, [r7, #30] 8005d22: e0b6 b.n 8005e92 ptr = ptr_to_mem(ptr)->next) { mem = ptr_to_mem(ptr); 8005d24: 8bfb ldrh r3, [r7, #30] 8005d26: 4618 mov r0, r3 8005d28: f7ff fd10 bl 800574c 8005d2c: 6178 str r0, [r7, #20] local_mem_free_count = 1; break; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if ((!mem->used) && 8005d2e: 697b ldr r3, [r7, #20] 8005d30: 791b ldrb r3, [r3, #4] 8005d32: 2b00 cmp r3, #0 8005d34: f040 80a6 bne.w 8005e84 (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) { 8005d38: 697b ldr r3, [r7, #20] 8005d3a: 881b ldrh r3, [r3, #0] 8005d3c: 461a mov r2, r3 8005d3e: 8bfb ldrh r3, [r7, #30] 8005d40: 1ad3 subs r3, r2, r3 8005d42: f1a3 0208 sub.w r2, r3, #8 8005d46: 8bbb ldrh r3, [r7, #28] if ((!mem->used) && 8005d48: 429a cmp r2, r3 8005d4a: f0c0 809b bcc.w 8005e84 /* 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)) { 8005d4e: 697b ldr r3, [r7, #20] 8005d50: 881b ldrh r3, [r3, #0] 8005d52: 461a mov r2, r3 8005d54: 8bfb ldrh r3, [r7, #30] 8005d56: 1ad3 subs r3, r2, r3 8005d58: f1a3 0208 sub.w r2, r3, #8 8005d5c: 8bbb ldrh r3, [r7, #28] 8005d5e: 3314 adds r3, #20 8005d60: 429a cmp r2, r3 8005d62: d335 bcc.n 8005dd0 * 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); 8005d64: 8bfa ldrh r2, [r7, #30] 8005d66: 8bbb ldrh r3, [r7, #28] 8005d68: 4413 add r3, r2 8005d6a: b29b uxth r3, r3 8005d6c: 3308 adds r3, #8 8005d6e: 827b strh r3, [r7, #18] LWIP_ASSERT("invalid next ptr",ptr2 != MEM_SIZE_ALIGNED); 8005d70: 8a7b ldrh r3, [r7, #18] 8005d72: f647 52e8 movw r2, #32232 ; 0x7de8 8005d76: 4293 cmp r3, r2 8005d78: d106 bne.n 8005d88 8005d7a: 4b50 ldr r3, [pc, #320] ; (8005ebc ) 8005d7c: f240 3287 movw r2, #903 ; 0x387 8005d80: 494f ldr r1, [pc, #316] ; (8005ec0 ) 8005d82: 4850 ldr r0, [pc, #320] ; (8005ec4 ) 8005d84: f00a ff20 bl 8010bc8 /* create mem2 struct */ mem2 = ptr_to_mem(ptr2); 8005d88: 8a7b ldrh r3, [r7, #18] 8005d8a: 4618 mov r0, r3 8005d8c: f7ff fcde bl 800574c 8005d90: 60f8 str r0, [r7, #12] mem2->used = 0; 8005d92: 68fb ldr r3, [r7, #12] 8005d94: 2200 movs r2, #0 8005d96: 711a strb r2, [r3, #4] mem2->next = mem->next; 8005d98: 697b ldr r3, [r7, #20] 8005d9a: 881a ldrh r2, [r3, #0] 8005d9c: 68fb ldr r3, [r7, #12] 8005d9e: 801a strh r2, [r3, #0] mem2->prev = ptr; 8005da0: 68fb ldr r3, [r7, #12] 8005da2: 8bfa ldrh r2, [r7, #30] 8005da4: 805a strh r2, [r3, #2] /* and insert it between mem and mem->next */ mem->next = ptr2; 8005da6: 697b ldr r3, [r7, #20] 8005da8: 8a7a ldrh r2, [r7, #18] 8005daa: 801a strh r2, [r3, #0] mem->used = 1; 8005dac: 697b ldr r3, [r7, #20] 8005dae: 2201 movs r2, #1 8005db0: 711a strb r2, [r3, #4] if (mem2->next != MEM_SIZE_ALIGNED) { 8005db2: 68fb ldr r3, [r7, #12] 8005db4: 881b ldrh r3, [r3, #0] 8005db6: f647 52e8 movw r2, #32232 ; 0x7de8 8005dba: 4293 cmp r3, r2 8005dbc: d00b beq.n 8005dd6 ptr_to_mem(mem2->next)->prev = ptr2; 8005dbe: 68fb ldr r3, [r7, #12] 8005dc0: 881b ldrh r3, [r3, #0] 8005dc2: 4618 mov r0, r3 8005dc4: f7ff fcc2 bl 800574c 8005dc8: 4602 mov r2, r0 8005dca: 8a7b ldrh r3, [r7, #18] 8005dcc: 8053 strh r3, [r2, #2] 8005dce: e002 b.n 8005dd6 * 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; 8005dd0: 697b ldr r3, [r7, #20] 8005dd2: 2201 movs r2, #1 8005dd4: 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) { 8005dd6: 4b38 ldr r3, [pc, #224] ; (8005eb8 ) 8005dd8: 681b ldr r3, [r3, #0] 8005dda: 697a ldr r2, [r7, #20] 8005ddc: 429a cmp r2, r3 8005dde: d127 bne.n 8005e30 struct mem *cur = lfree; 8005de0: 4b35 ldr r3, [pc, #212] ; (8005eb8 ) 8005de2: 681b ldr r3, [r3, #0] 8005de4: 61bb str r3, [r7, #24] /* Find next free block after mem and update lowest free pointer */ while (cur->used && cur != ram_end) { 8005de6: e005 b.n 8005df4 /* 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); 8005de8: 69bb ldr r3, [r7, #24] 8005dea: 881b ldrh r3, [r3, #0] 8005dec: 4618 mov r0, r3 8005dee: f7ff fcad bl 800574c 8005df2: 61b8 str r0, [r7, #24] while (cur->used && cur != ram_end) { 8005df4: 69bb ldr r3, [r7, #24] 8005df6: 791b ldrb r3, [r3, #4] 8005df8: 2b00 cmp r3, #0 8005dfa: d004 beq.n 8005e06 8005dfc: 4b32 ldr r3, [pc, #200] ; (8005ec8 ) 8005dfe: 681b ldr r3, [r3, #0] 8005e00: 69ba ldr r2, [r7, #24] 8005e02: 429a cmp r2, r3 8005e04: d1f0 bne.n 8005de8 } lfree = cur; 8005e06: 4a2c ldr r2, [pc, #176] ; (8005eb8 ) 8005e08: 69bb ldr r3, [r7, #24] 8005e0a: 6013 str r3, [r2, #0] LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used))); 8005e0c: 4b2a ldr r3, [pc, #168] ; (8005eb8 ) 8005e0e: 681a ldr r2, [r3, #0] 8005e10: 4b2d ldr r3, [pc, #180] ; (8005ec8 ) 8005e12: 681b ldr r3, [r3, #0] 8005e14: 429a cmp r2, r3 8005e16: d00b beq.n 8005e30 8005e18: 4b27 ldr r3, [pc, #156] ; (8005eb8 ) 8005e1a: 681b ldr r3, [r3, #0] 8005e1c: 791b ldrb r3, [r3, #4] 8005e1e: 2b00 cmp r3, #0 8005e20: d006 beq.n 8005e30 8005e22: 4b26 ldr r3, [pc, #152] ; (8005ebc ) 8005e24: f240 32b5 movw r2, #949 ; 0x3b5 8005e28: 4928 ldr r1, [pc, #160] ; (8005ecc ) 8005e2a: 4826 ldr r0, [pc, #152] ; (8005ec4 ) 8005e2c: f00a fecc bl 8010bc8 } LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.", 8005e30: 8bba ldrh r2, [r7, #28] 8005e32: 697b ldr r3, [r7, #20] 8005e34: 4413 add r3, r2 8005e36: 3308 adds r3, #8 8005e38: 4a23 ldr r2, [pc, #140] ; (8005ec8 ) 8005e3a: 6812 ldr r2, [r2, #0] 8005e3c: 4293 cmp r3, r2 8005e3e: d906 bls.n 8005e4e 8005e40: 4b1e ldr r3, [pc, #120] ; (8005ebc ) 8005e42: f240 32b9 movw r2, #953 ; 0x3b9 8005e46: 4922 ldr r1, [pc, #136] ; (8005ed0 ) 8005e48: 481e ldr r0, [pc, #120] ; (8005ec4 ) 8005e4a: f00a febd bl 8010bc8 (mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end); LWIP_ASSERT("mem_malloc: allocated memory properly aligned.", 8005e4e: 697b ldr r3, [r7, #20] 8005e50: f003 0303 and.w r3, r3, #3 8005e54: 2b00 cmp r3, #0 8005e56: d006 beq.n 8005e66 8005e58: 4b18 ldr r3, [pc, #96] ; (8005ebc ) 8005e5a: f240 32bb movw r2, #955 ; 0x3bb 8005e5e: 491d ldr r1, [pc, #116] ; (8005ed4 ) 8005e60: 4818 ldr r0, [pc, #96] ; (8005ec4 ) 8005e62: f00a feb1 bl 8010bc8 ((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0); LWIP_ASSERT("mem_malloc: sanity check alignment", 8005e66: 697b ldr r3, [r7, #20] 8005e68: f003 0303 and.w r3, r3, #3 8005e6c: 2b00 cmp r3, #0 8005e6e: d006 beq.n 8005e7e 8005e70: 4b12 ldr r3, [pc, #72] ; (8005ebc ) 8005e72: f240 32bd movw r2, #957 ; 0x3bd 8005e76: 4918 ldr r1, [pc, #96] ; (8005ed8 ) 8005e78: 4812 ldr r0, [pc, #72] ; (8005ec4 ) 8005e7a: f00a fea5 bl 8010bc8 #if MEM_OVERFLOW_CHECK mem_overflow_init_element(mem, size_in); #endif MEM_SANITY(); return (u8_t *)mem + SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET; 8005e7e: 697b ldr r3, [r7, #20] 8005e80: 3308 adds r3, #8 8005e82: e015 b.n 8005eb0 ptr = ptr_to_mem(ptr)->next) { 8005e84: 8bfb ldrh r3, [r7, #30] 8005e86: 4618 mov r0, r3 8005e88: f7ff fc60 bl 800574c 8005e8c: 4603 mov r3, r0 8005e8e: 881b ldrh r3, [r3, #0] 8005e90: 83fb strh r3, [r7, #30] for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size; 8005e92: 8bfa ldrh r2, [r7, #30] 8005e94: 8bb9 ldrh r1, [r7, #28] 8005e96: f647 53e8 movw r3, #32232 ; 0x7de8 8005e9a: 1a5b subs r3, r3, r1 8005e9c: 429a cmp r2, r3 8005e9e: f4ff af41 bcc.w 8005d24 } while (local_mem_free_count != 0); #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)); 8005ea2: f9b7 301c ldrsh.w r3, [r7, #28] 8005ea6: 4619 mov r1, r3 8005ea8: 480c ldr r0, [pc, #48] ; (8005edc ) 8005eaa: f00a fe8d bl 8010bc8 return NULL; 8005eae: 2300 movs r3, #0 } 8005eb0: 4618 mov r0, r3 8005eb2: 3720 adds r7, #32 8005eb4: 46bd mov sp, r7 8005eb6: bd80 pop {r7, pc} 8005eb8: 24004c30 .word 0x24004c30 8005ebc: 08011ca0 .word 0x08011ca0 8005ec0: 08011ee0 .word 0x08011ee0 8005ec4: 08011ce8 .word 0x08011ce8 8005ec8: 24004c2c .word 0x24004c2c 8005ecc: 08011ef4 .word 0x08011ef4 8005ed0: 08011f10 .word 0x08011f10 8005ed4: 08011f40 .word 0x08011f40 8005ed8: 08011f70 .word 0x08011f70 8005edc: 08011f94 .word 0x08011f94 08005ee0 : * * @param desc pool to initialize */ void memp_init_pool(const struct memp_desc *desc) { 8005ee0: b480 push {r7} 8005ee2: b085 sub sp, #20 8005ee4: af00 add r7, sp, #0 8005ee6: 6078 str r0, [r7, #4] LWIP_UNUSED_ARG(desc); #else int i; struct memp *memp; *desc->tab = NULL; 8005ee8: 687b ldr r3, [r7, #4] 8005eea: 68db ldr r3, [r3, #12] 8005eec: 2200 movs r2, #0 8005eee: 601a str r2, [r3, #0] memp = (struct memp *)LWIP_MEM_ALIGN(desc->base); 8005ef0: 687b ldr r3, [r7, #4] 8005ef2: 689b ldr r3, [r3, #8] 8005ef4: 3303 adds r3, #3 8005ef6: f023 0303 bic.w r3, r3, #3 8005efa: 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) { 8005efc: 2300 movs r3, #0 8005efe: 60fb str r3, [r7, #12] 8005f00: e011 b.n 8005f26 memp->next = *desc->tab; 8005f02: 687b ldr r3, [r7, #4] 8005f04: 68db ldr r3, [r3, #12] 8005f06: 681a ldr r2, [r3, #0] 8005f08: 68bb ldr r3, [r7, #8] 8005f0a: 601a str r2, [r3, #0] *desc->tab = memp; 8005f0c: 687b ldr r3, [r7, #4] 8005f0e: 68db ldr r3, [r3, #12] 8005f10: 68ba ldr r2, [r7, #8] 8005f12: 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 8005f14: 687b ldr r3, [r7, #4] 8005f16: 889b ldrh r3, [r3, #4] 8005f18: 461a mov r2, r3 8005f1a: 68bb ldr r3, [r7, #8] 8005f1c: 4413 add r3, r2 8005f1e: 60bb str r3, [r7, #8] for (i = 0; i < desc->num; ++i) { 8005f20: 68fb ldr r3, [r7, #12] 8005f22: 3301 adds r3, #1 8005f24: 60fb str r3, [r7, #12] 8005f26: 687b ldr r3, [r7, #4] 8005f28: 88db ldrh r3, [r3, #6] 8005f2a: 461a mov r2, r3 8005f2c: 68fb ldr r3, [r7, #12] 8005f2e: 4293 cmp r3, r2 8005f30: dbe7 blt.n 8005f02 #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) */ } 8005f32: bf00 nop 8005f34: bf00 nop 8005f36: 3714 adds r7, #20 8005f38: 46bd mov sp, r7 8005f3a: f85d 7b04 ldr.w r7, [sp], #4 8005f3e: 4770 bx lr 08005f40 : * * Carves out memp_memory into linked lists for each pool-type. */ void memp_init(void) { 8005f40: b580 push {r7, lr} 8005f42: b082 sub sp, #8 8005f44: af00 add r7, sp, #0 u16_t i; /* for every pool: */ for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) { 8005f46: 2300 movs r3, #0 8005f48: 80fb strh r3, [r7, #6] 8005f4a: e009 b.n 8005f60 memp_init_pool(memp_pools[i]); 8005f4c: 88fb ldrh r3, [r7, #6] 8005f4e: 4a08 ldr r2, [pc, #32] ; (8005f70 ) 8005f50: f852 3023 ldr.w r3, [r2, r3, lsl #2] 8005f54: 4618 mov r0, r3 8005f56: f7ff ffc3 bl 8005ee0 for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) { 8005f5a: 88fb ldrh r3, [r7, #6] 8005f5c: 3301 adds r3, #1 8005f5e: 80fb strh r3, [r7, #6] 8005f60: 88fb ldrh r3, [r7, #6] 8005f62: 2b08 cmp r3, #8 8005f64: d9f2 bls.n 8005f4c #if MEMP_OVERFLOW_CHECK >= 2 /* check everything a first time to see if it worked */ memp_overflow_check_all(); #endif /* MEMP_OVERFLOW_CHECK >= 2 */ } 8005f66: bf00 nop 8005f68: bf00 nop 8005f6a: 3708 adds r7, #8 8005f6c: 46bd mov sp, r7 8005f6e: bd80 pop {r7, pc} 8005f70: 08014d30 .word 0x08014d30 08005f74 : #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 { 8005f74: b580 push {r7, lr} 8005f76: b084 sub sp, #16 8005f78: af00 add r7, sp, #0 8005f7a: 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; 8005f7c: 687b ldr r3, [r7, #4] 8005f7e: 68db ldr r3, [r3, #12] 8005f80: 681b ldr r3, [r3, #0] 8005f82: 60fb str r3, [r7, #12] #endif /* MEMP_MEM_MALLOC */ if (memp != NULL) { 8005f84: 68fb ldr r3, [r7, #12] 8005f86: 2b00 cmp r3, #0 8005f88: d012 beq.n 8005fb0 #if !MEMP_MEM_MALLOC #if MEMP_OVERFLOW_CHECK == 1 memp_overflow_check_element(memp, desc); #endif /* MEMP_OVERFLOW_CHECK */ *desc->tab = memp->next; 8005f8a: 687b ldr r3, [r7, #4] 8005f8c: 68db ldr r3, [r3, #12] 8005f8e: 68fa ldr r2, [r7, #12] 8005f90: 6812 ldr r2, [r2, #0] 8005f92: 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", 8005f94: 68fb ldr r3, [r7, #12] 8005f96: f003 0303 and.w r3, r3, #3 8005f9a: 2b00 cmp r3, #0 8005f9c: d006 beq.n 8005fac 8005f9e: 4b0a ldr r3, [pc, #40] ; (8005fc8 ) 8005fa0: f44f 728c mov.w r2, #280 ; 0x118 8005fa4: 4909 ldr r1, [pc, #36] ; (8005fcc ) 8005fa6: 480a ldr r0, [pc, #40] ; (8005fd0 ) 8005fa8: f00a fe0e bl 8010bc8 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); 8005fac: 68fb ldr r3, [r7, #12] 8005fae: e006 b.n 8005fbe } else { #if MEMP_STATS desc->stats->err++; #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)); 8005fb0: 687b ldr r3, [r7, #4] 8005fb2: 681b ldr r3, [r3, #0] 8005fb4: 4619 mov r1, r3 8005fb6: 4807 ldr r0, [pc, #28] ; (8005fd4 ) 8005fb8: f00a fe06 bl 8010bc8 } return NULL; 8005fbc: 2300 movs r3, #0 } 8005fbe: 4618 mov r0, r3 8005fc0: 3710 adds r7, #16 8005fc2: 46bd mov sp, r7 8005fc4: bd80 pop {r7, pc} 8005fc6: bf00 nop 8005fc8: 08012054 .word 0x08012054 8005fcc: 08012084 .word 0x08012084 8005fd0: 080120a8 .word 0x080120a8 8005fd4: 080120d0 .word 0x080120d0 08005fd8 : #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 { 8005fd8: b580 push {r7, lr} 8005fda: b082 sub sp, #8 8005fdc: af00 add r7, sp, #0 8005fde: 6078 str r0, [r7, #4] LWIP_ASSERT("invalid pool desc", desc != NULL); 8005fe0: 687b ldr r3, [r7, #4] 8005fe2: 2b00 cmp r3, #0 8005fe4: d106 bne.n 8005ff4 8005fe6: 4b0a ldr r3, [pc, #40] ; (8006010 ) 8005fe8: f44f 729e mov.w r2, #316 ; 0x13c 8005fec: 4909 ldr r1, [pc, #36] ; (8006014 ) 8005fee: 480a ldr r0, [pc, #40] ; (8006018 ) 8005ff0: f00a fdea bl 8010bc8 if (desc == NULL) { 8005ff4: 687b ldr r3, [r7, #4] 8005ff6: 2b00 cmp r3, #0 8005ff8: d101 bne.n 8005ffe return NULL; 8005ffa: 2300 movs r3, #0 8005ffc: e003 b.n 8006006 } #if !MEMP_OVERFLOW_CHECK return do_memp_malloc_pool(desc); 8005ffe: 6878 ldr r0, [r7, #4] 8006000: f7ff ffb8 bl 8005f74 8006004: 4603 mov r3, r0 #else return do_memp_malloc_pool_fn(desc, file, line); #endif } 8006006: 4618 mov r0, r3 8006008: 3708 adds r7, #8 800600a: 46bd mov sp, r7 800600c: bd80 pop {r7, pc} 800600e: bf00 nop 8006010: 08012054 .word 0x08012054 8006014: 080120f8 .word 0x080120f8 8006018: 080120a8 .word 0x080120a8 0800601c : #if !MEMP_OVERFLOW_CHECK memp_malloc(memp_t type) #else memp_malloc_fn(memp_t type, const char *file, const int line) #endif { 800601c: b580 push {r7, lr} 800601e: b084 sub sp, #16 8006020: af00 add r7, sp, #0 8006022: 4603 mov r3, r0 8006024: 71fb strb r3, [r7, #7] void *memp; LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 8006026: 79fb ldrb r3, [r7, #7] 8006028: 2b08 cmp r3, #8 800602a: d908 bls.n 800603e 800602c: 4b0a ldr r3, [pc, #40] ; (8006058 ) 800602e: f240 1257 movw r2, #343 ; 0x157 8006032: 490a ldr r1, [pc, #40] ; (800605c ) 8006034: 480a ldr r0, [pc, #40] ; (8006060 ) 8006036: f00a fdc7 bl 8010bc8 800603a: 2300 movs r3, #0 800603c: e008 b.n 8006050 #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]); 800603e: 79fb ldrb r3, [r7, #7] 8006040: 4a08 ldr r2, [pc, #32] ; (8006064 ) 8006042: f852 3023 ldr.w r3, [r2, r3, lsl #2] 8006046: 4618 mov r0, r3 8006048: f7ff ff94 bl 8005f74 800604c: 60f8 str r0, [r7, #12] #else memp = do_memp_malloc_pool_fn(memp_pools[type], file, line); #endif return memp; 800604e: 68fb ldr r3, [r7, #12] } 8006050: 4618 mov r0, r3 8006052: 3710 adds r7, #16 8006054: 46bd mov sp, r7 8006056: bd80 pop {r7, pc} 8006058: 08012054 .word 0x08012054 800605c: 0801210c .word 0x0801210c 8006060: 080120a8 .word 0x080120a8 8006064: 08014d30 .word 0x08014d30 08006068 : static void do_memp_free_pool(const struct memp_desc *desc, void *mem) { 8006068: b580 push {r7, lr} 800606a: b084 sub sp, #16 800606c: af00 add r7, sp, #0 800606e: 6078 str r0, [r7, #4] 8006070: 6039 str r1, [r7, #0] struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ASSERT("memp_free: mem properly aligned", 8006072: 683b ldr r3, [r7, #0] 8006074: f003 0303 and.w r3, r3, #3 8006078: 2b00 cmp r3, #0 800607a: d006 beq.n 800608a 800607c: 4b0a ldr r3, [pc, #40] ; (80060a8 ) 800607e: f44f 72b6 mov.w r2, #364 ; 0x16c 8006082: 490a ldr r1, [pc, #40] ; (80060ac ) 8006084: 480a ldr r0, [pc, #40] ; (80060b0 ) 8006086: f00a fd9f bl 8010bc8 ((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); 800608a: 683b ldr r3, [r7, #0] 800608c: 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; 800608e: 687b ldr r3, [r7, #4] 8006090: 68db ldr r3, [r3, #12] 8006092: 681a ldr r2, [r3, #0] 8006094: 68fb ldr r3, [r7, #12] 8006096: 601a str r2, [r3, #0] *desc->tab = memp; 8006098: 687b ldr r3, [r7, #4] 800609a: 68db ldr r3, [r3, #12] 800609c: 68fa ldr r2, [r7, #12] 800609e: 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 */ } 80060a0: bf00 nop 80060a2: 3710 adds r7, #16 80060a4: 46bd mov sp, r7 80060a6: bd80 pop {r7, pc} 80060a8: 08012054 .word 0x08012054 80060ac: 0801212c .word 0x0801212c 80060b0: 080120a8 .word 0x080120a8 080060b4 : * @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) { 80060b4: b580 push {r7, lr} 80060b6: b082 sub sp, #8 80060b8: af00 add r7, sp, #0 80060ba: 6078 str r0, [r7, #4] 80060bc: 6039 str r1, [r7, #0] LWIP_ASSERT("invalid pool desc", desc != NULL); 80060be: 687b ldr r3, [r7, #4] 80060c0: 2b00 cmp r3, #0 80060c2: d106 bne.n 80060d2 80060c4: 4b0a ldr r3, [pc, #40] ; (80060f0 ) 80060c6: f240 1295 movw r2, #405 ; 0x195 80060ca: 490a ldr r1, [pc, #40] ; (80060f4 ) 80060cc: 480a ldr r0, [pc, #40] ; (80060f8 ) 80060ce: f00a fd7b bl 8010bc8 if ((desc == NULL) || (mem == NULL)) { 80060d2: 687b ldr r3, [r7, #4] 80060d4: 2b00 cmp r3, #0 80060d6: d007 beq.n 80060e8 80060d8: 683b ldr r3, [r7, #0] 80060da: 2b00 cmp r3, #0 80060dc: d004 beq.n 80060e8 return; } do_memp_free_pool(desc, mem); 80060de: 6839 ldr r1, [r7, #0] 80060e0: 6878 ldr r0, [r7, #4] 80060e2: f7ff ffc1 bl 8006068 80060e6: e000 b.n 80060ea return; 80060e8: bf00 nop } 80060ea: 3708 adds r7, #8 80060ec: 46bd mov sp, r7 80060ee: bd80 pop {r7, pc} 80060f0: 08012054 .word 0x08012054 80060f4: 080120f8 .word 0x080120f8 80060f8: 080120a8 .word 0x080120a8 080060fc : * @param type the pool where to put mem * @param mem the memp element to free */ void memp_free(memp_t type, void *mem) { 80060fc: b580 push {r7, lr} 80060fe: b082 sub sp, #8 8006100: af00 add r7, sp, #0 8006102: 4603 mov r3, r0 8006104: 6039 str r1, [r7, #0] 8006106: 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;); 8006108: 79fb ldrb r3, [r7, #7] 800610a: 2b08 cmp r3, #8 800610c: d907 bls.n 800611e 800610e: 4b0c ldr r3, [pc, #48] ; (8006140 ) 8006110: f44f 72d5 mov.w r2, #426 ; 0x1aa 8006114: 490b ldr r1, [pc, #44] ; (8006144 ) 8006116: 480c ldr r0, [pc, #48] ; (8006148 ) 8006118: f00a fd56 bl 8010bc8 800611c: e00c b.n 8006138 if (mem == NULL) { 800611e: 683b ldr r3, [r7, #0] 8006120: 2b00 cmp r3, #0 8006122: d008 beq.n 8006136 #ifdef LWIP_HOOK_MEMP_AVAILABLE old_first = *memp_pools[type]->tab; #endif do_memp_free_pool(memp_pools[type], mem); 8006124: 79fb ldrb r3, [r7, #7] 8006126: 4a09 ldr r2, [pc, #36] ; (800614c ) 8006128: f852 3023 ldr.w r3, [r2, r3, lsl #2] 800612c: 6839 ldr r1, [r7, #0] 800612e: 4618 mov r0, r3 8006130: f7ff ff9a bl 8006068 8006134: e000 b.n 8006138 return; 8006136: bf00 nop #ifdef LWIP_HOOK_MEMP_AVAILABLE if (old_first == NULL) { LWIP_HOOK_MEMP_AVAILABLE(type); } #endif } 8006138: 3708 adds r7, #8 800613a: 46bd mov sp, r7 800613c: bd80 pop {r7, pc} 800613e: bf00 nop 8006140: 08012054 .word 0x08012054 8006144: 0801214c .word 0x0801214c 8006148: 080120a8 .word 0x080120a8 800614c: 08014d30 .word 0x08014d30 08006150 : } #endif /* LWIP_HAVE_LOOPIF */ void netif_init(void) { 8006150: b480 push {r7} 8006152: af00 add r7, sp, #0 netif_set_link_up(&loop_netif); netif_set_up(&loop_netif); #endif /* LWIP_HAVE_LOOPIF */ } 8006154: bf00 nop 8006156: 46bd mov sp, r7 8006158: f85d 7b04 ldr.w r7, [sp], #4 800615c: 4770 bx lr ... 08006160 : 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) { 8006160: b580 push {r7, lr} 8006162: b088 sub sp, #32 8006164: af02 add r7, sp, #8 8006166: 60f8 str r0, [r7, #12] 8006168: 60b9 str r1, [r7, #8] 800616a: 607a str r2, [r7, #4] 800616c: 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); 800616e: 68fb ldr r3, [r7, #12] 8006170: 2b00 cmp r3, #0 8006172: d108 bne.n 8006186 8006174: 4b96 ldr r3, [pc, #600] ; (80063d0 ) 8006176: f240 1227 movw r2, #295 ; 0x127 800617a: 4996 ldr r1, [pc, #600] ; (80063d4 ) 800617c: 4896 ldr r0, [pc, #600] ; (80063d8 ) 800617e: f00a fd23 bl 8010bc8 8006182: 2300 movs r3, #0 8006184: e14c b.n 8006420 LWIP_ERROR("netif_add: No init function given", init != NULL, return NULL); 8006186: 6a7b ldr r3, [r7, #36] ; 0x24 8006188: 2b00 cmp r3, #0 800618a: d108 bne.n 800619e 800618c: 4b90 ldr r3, [pc, #576] ; (80063d0 ) 800618e: f44f 7294 mov.w r2, #296 ; 0x128 8006192: 4992 ldr r1, [pc, #584] ; (80063dc ) 8006194: 4890 ldr r0, [pc, #576] ; (80063d8 ) 8006196: f00a fd17 bl 8010bc8 800619a: 2300 movs r3, #0 800619c: e140 b.n 8006420 #if LWIP_IPV4 if (ipaddr == NULL) { 800619e: 68bb ldr r3, [r7, #8] 80061a0: 2b00 cmp r3, #0 80061a2: d101 bne.n 80061a8 ipaddr = ip_2_ip4(IP4_ADDR_ANY); 80061a4: 4b8e ldr r3, [pc, #568] ; (80063e0 ) 80061a6: 60bb str r3, [r7, #8] } if (netmask == NULL) { 80061a8: 687b ldr r3, [r7, #4] 80061aa: 2b00 cmp r3, #0 80061ac: d101 bne.n 80061b2 netmask = ip_2_ip4(IP4_ADDR_ANY); 80061ae: 4b8c ldr r3, [pc, #560] ; (80063e0 ) 80061b0: 607b str r3, [r7, #4] } if (gw == NULL) { 80061b2: 683b ldr r3, [r7, #0] 80061b4: 2b00 cmp r3, #0 80061b6: d101 bne.n 80061bc gw = ip_2_ip4(IP4_ADDR_ANY); 80061b8: 4b89 ldr r3, [pc, #548] ; (80063e0 ) 80061ba: 603b str r3, [r7, #0] } /* reset new interface configuration state */ ip_addr_set_zero_ip4(&netif->ip_addr); 80061bc: 68fb ldr r3, [r7, #12] 80061be: 2200 movs r2, #0 80061c0: 605a str r2, [r3, #4] ip_addr_set_zero_ip4(&netif->netmask); 80061c2: 68fb ldr r3, [r7, #12] 80061c4: 2200 movs r2, #0 80061c6: 609a str r2, [r3, #8] ip_addr_set_zero_ip4(&netif->gw); 80061c8: 68fb ldr r3, [r7, #12] 80061ca: 2200 movs r2, #0 80061cc: 60da str r2, [r3, #12] netif->output = netif_null_output_ip4; 80061ce: 68fb ldr r3, [r7, #12] 80061d0: 4a84 ldr r2, [pc, #528] ; (80063e4 ) 80061d2: 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; 80061d4: 68fb ldr r3, [r7, #12] 80061d6: 2200 movs r2, #0 80061d8: 849a strh r2, [r3, #36] ; 0x24 netif->flags = 0; 80061da: 68fb ldr r3, [r7, #12] 80061dc: 2200 movs r2, #0 80061de: f883 202d strb.w r2, [r3, #45] ; 0x2d #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; 80061e2: 68fb ldr r3, [r7, #12] 80061e4: 2200 movs r2, #0 80061e6: 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; 80061e8: 68fb ldr r3, [r7, #12] 80061ea: 6a3a ldr r2, [r7, #32] 80061ec: 621a str r2, [r3, #32] netif->num = netif_num; 80061ee: 4b7e ldr r3, [pc, #504] ; (80063e8 ) 80061f0: 781a ldrb r2, [r3, #0] 80061f2: 68fb ldr r3, [r7, #12] 80061f4: f883 2030 strb.w r2, [r3, #48] ; 0x30 netif->input = input; 80061f8: 68fb ldr r3, [r7, #12] 80061fa: 6aba ldr r2, [r7, #40] ; 0x28 80061fc: 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); 80061fe: 683b ldr r3, [r7, #0] 8006200: 687a ldr r2, [r7, #4] 8006202: 68b9 ldr r1, [r7, #8] 8006204: 68f8 ldr r0, [r7, #12] 8006206: f000 f9f5 bl 80065f4 #endif /* LWIP_IPV4 */ /* call user specified initialization function for netif */ if (init(netif) != ERR_OK) { 800620a: 6a7b ldr r3, [r7, #36] ; 0x24 800620c: 68f8 ldr r0, [r7, #12] 800620e: 4798 blx r3 8006210: 4603 mov r3, r0 8006212: 2b00 cmp r3, #0 8006214: d001 beq.n 800621a return NULL; 8006216: 2300 movs r3, #0 8006218: e102 b.n 8006420 */ { struct netif *netif2; int num_netifs; do { if (netif->num == 255) { 800621a: 68fb ldr r3, [r7, #12] 800621c: f893 3030 ldrb.w r3, [r3, #48] ; 0x30 8006220: 2bff cmp r3, #255 ; 0xff 8006222: d103 bne.n 800622c netif->num = 0; 8006224: 68fb ldr r3, [r7, #12] 8006226: 2200 movs r2, #0 8006228: f883 2030 strb.w r2, [r3, #48] ; 0x30 } num_netifs = 0; 800622c: 2300 movs r3, #0 800622e: 613b str r3, [r7, #16] for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) { 8006230: 4b6e ldr r3, [pc, #440] ; (80063ec ) 8006232: 681b ldr r3, [r3, #0] 8006234: 617b str r3, [r7, #20] 8006236: e02b b.n 8006290 LWIP_ASSERT("netif already added", netif2 != netif); 8006238: 697a ldr r2, [r7, #20] 800623a: 68fb ldr r3, [r7, #12] 800623c: 429a cmp r2, r3 800623e: d106 bne.n 800624e 8006240: 4b63 ldr r3, [pc, #396] ; (80063d0 ) 8006242: f240 128b movw r2, #395 ; 0x18b 8006246: 496a ldr r1, [pc, #424] ; (80063f0 ) 8006248: 4863 ldr r0, [pc, #396] ; (80063d8 ) 800624a: f00a fcbd bl 8010bc8 num_netifs++; 800624e: 693b ldr r3, [r7, #16] 8006250: 3301 adds r3, #1 8006252: 613b str r3, [r7, #16] LWIP_ASSERT("too many netifs, max. supported number is 255", num_netifs <= 255); 8006254: 693b ldr r3, [r7, #16] 8006256: 2bff cmp r3, #255 ; 0xff 8006258: dd06 ble.n 8006268 800625a: 4b5d ldr r3, [pc, #372] ; (80063d0 ) 800625c: f240 128d movw r2, #397 ; 0x18d 8006260: 4964 ldr r1, [pc, #400] ; (80063f4 ) 8006262: 485d ldr r0, [pc, #372] ; (80063d8 ) 8006264: f00a fcb0 bl 8010bc8 if (netif2->num == netif->num) { 8006268: 697b ldr r3, [r7, #20] 800626a: f893 2030 ldrb.w r2, [r3, #48] ; 0x30 800626e: 68fb ldr r3, [r7, #12] 8006270: f893 3030 ldrb.w r3, [r3, #48] ; 0x30 8006274: 429a cmp r2, r3 8006276: d108 bne.n 800628a netif->num++; 8006278: 68fb ldr r3, [r7, #12] 800627a: f893 3030 ldrb.w r3, [r3, #48] ; 0x30 800627e: 3301 adds r3, #1 8006280: b2da uxtb r2, r3 8006282: 68fb ldr r3, [r7, #12] 8006284: f883 2030 strb.w r2, [r3, #48] ; 0x30 break; 8006288: e005 b.n 8006296 for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) { 800628a: 697b ldr r3, [r7, #20] 800628c: 681b ldr r3, [r3, #0] 800628e: 617b str r3, [r7, #20] 8006290: 697b ldr r3, [r7, #20] 8006292: 2b00 cmp r3, #0 8006294: d1d0 bne.n 8006238 } } } while (netif2 != NULL); 8006296: 697b ldr r3, [r7, #20] 8006298: 2b00 cmp r3, #0 800629a: d1be bne.n 800621a } if (netif->num == 254) { 800629c: 68fb ldr r3, [r7, #12] 800629e: f893 3030 ldrb.w r3, [r3, #48] ; 0x30 80062a2: 2bfe cmp r3, #254 ; 0xfe 80062a4: d103 bne.n 80062ae netif_num = 0; 80062a6: 4b50 ldr r3, [pc, #320] ; (80063e8 ) 80062a8: 2200 movs r2, #0 80062aa: 701a strb r2, [r3, #0] 80062ac: e006 b.n 80062bc } else { netif_num = (u8_t)(netif->num + 1); 80062ae: 68fb ldr r3, [r7, #12] 80062b0: f893 3030 ldrb.w r3, [r3, #48] ; 0x30 80062b4: 3301 adds r3, #1 80062b6: b2da uxtb r2, r3 80062b8: 4b4b ldr r3, [pc, #300] ; (80063e8 ) 80062ba: 701a strb r2, [r3, #0] } /* add this netif to the list */ netif->next = netif_list; 80062bc: 4b4b ldr r3, [pc, #300] ; (80063ec ) 80062be: 681a ldr r2, [r3, #0] 80062c0: 68fb ldr r3, [r7, #12] 80062c2: 601a str r2, [r3, #0] netif_list = netif; 80062c4: 4a49 ldr r2, [pc, #292] ; (80063ec ) 80062c6: 68fb ldr r3, [r7, #12] 80062c8: 6013 str r3, [r2, #0] if (netif->flags & NETIF_FLAG_IGMP) { igmp_start(netif); } #endif /* LWIP_IGMP */ LWIP_DEBUGF(NETIF_DEBUG, ("netif: added interface %c%c IP", 80062ca: 68fb ldr r3, [r7, #12] 80062cc: f893 302e ldrb.w r3, [r3, #46] ; 0x2e 80062d0: 4619 mov r1, r3 80062d2: 68fb ldr r3, [r7, #12] 80062d4: f893 302f ldrb.w r3, [r3, #47] ; 0x2f 80062d8: 461a mov r2, r3 80062da: 4847 ldr r0, [pc, #284] ; (80063f8 ) 80062dc: f00a fc74 bl 8010bc8 netif->name[0], netif->name[1])); #if LWIP_IPV4 LWIP_DEBUGF(NETIF_DEBUG, (" addr ")); 80062e0: 4846 ldr r0, [pc, #280] ; (80063fc ) 80062e2: f00a fc71 bl 8010bc8 ip4_addr_debug_print(NETIF_DEBUG, ipaddr); 80062e6: 68bb ldr r3, [r7, #8] 80062e8: 2b00 cmp r3, #0 80062ea: d003 beq.n 80062f4 80062ec: 68bb ldr r3, [r7, #8] 80062ee: 781b ldrb r3, [r3, #0] 80062f0: 4619 mov r1, r3 80062f2: e000 b.n 80062f6 80062f4: 2100 movs r1, #0 80062f6: 68bb ldr r3, [r7, #8] 80062f8: 2b00 cmp r3, #0 80062fa: d004 beq.n 8006306 80062fc: 68bb ldr r3, [r7, #8] 80062fe: 3301 adds r3, #1 8006300: 781b ldrb r3, [r3, #0] 8006302: 461a mov r2, r3 8006304: e000 b.n 8006308 8006306: 2200 movs r2, #0 8006308: 68bb ldr r3, [r7, #8] 800630a: 2b00 cmp r3, #0 800630c: d004 beq.n 8006318 800630e: 68bb ldr r3, [r7, #8] 8006310: 3302 adds r3, #2 8006312: 781b ldrb r3, [r3, #0] 8006314: 4618 mov r0, r3 8006316: e000 b.n 800631a 8006318: 2000 movs r0, #0 800631a: 68bb ldr r3, [r7, #8] 800631c: 2b00 cmp r3, #0 800631e: d003 beq.n 8006328 8006320: 68bb ldr r3, [r7, #8] 8006322: 3303 adds r3, #3 8006324: 781b ldrb r3, [r3, #0] 8006326: e000 b.n 800632a 8006328: 2300 movs r3, #0 800632a: 9300 str r3, [sp, #0] 800632c: 4603 mov r3, r0 800632e: 4834 ldr r0, [pc, #208] ; (8006400 ) 8006330: f00a fc4a bl 8010bc8 LWIP_DEBUGF(NETIF_DEBUG, (" netmask ")); 8006334: 4833 ldr r0, [pc, #204] ; (8006404 ) 8006336: f00a fc47 bl 8010bc8 ip4_addr_debug_print(NETIF_DEBUG, netmask); 800633a: 687b ldr r3, [r7, #4] 800633c: 2b00 cmp r3, #0 800633e: d003 beq.n 8006348 8006340: 687b ldr r3, [r7, #4] 8006342: 781b ldrb r3, [r3, #0] 8006344: 4619 mov r1, r3 8006346: e000 b.n 800634a 8006348: 2100 movs r1, #0 800634a: 687b ldr r3, [r7, #4] 800634c: 2b00 cmp r3, #0 800634e: d004 beq.n 800635a 8006350: 687b ldr r3, [r7, #4] 8006352: 3301 adds r3, #1 8006354: 781b ldrb r3, [r3, #0] 8006356: 461a mov r2, r3 8006358: e000 b.n 800635c 800635a: 2200 movs r2, #0 800635c: 687b ldr r3, [r7, #4] 800635e: 2b00 cmp r3, #0 8006360: d004 beq.n 800636c 8006362: 687b ldr r3, [r7, #4] 8006364: 3302 adds r3, #2 8006366: 781b ldrb r3, [r3, #0] 8006368: 4618 mov r0, r3 800636a: e000 b.n 800636e 800636c: 2000 movs r0, #0 800636e: 687b ldr r3, [r7, #4] 8006370: 2b00 cmp r3, #0 8006372: d003 beq.n 800637c 8006374: 687b ldr r3, [r7, #4] 8006376: 3303 adds r3, #3 8006378: 781b ldrb r3, [r3, #0] 800637a: e000 b.n 800637e 800637c: 2300 movs r3, #0 800637e: 9300 str r3, [sp, #0] 8006380: 4603 mov r3, r0 8006382: 481f ldr r0, [pc, #124] ; (8006400 ) 8006384: f00a fc20 bl 8010bc8 LWIP_DEBUGF(NETIF_DEBUG, (" gw ")); 8006388: 481f ldr r0, [pc, #124] ; (8006408 ) 800638a: f00a fc1d bl 8010bc8 ip4_addr_debug_print(NETIF_DEBUG, gw); 800638e: 683b ldr r3, [r7, #0] 8006390: 2b00 cmp r3, #0 8006392: d003 beq.n 800639c 8006394: 683b ldr r3, [r7, #0] 8006396: 781b ldrb r3, [r3, #0] 8006398: 4619 mov r1, r3 800639a: e000 b.n 800639e 800639c: 2100 movs r1, #0 800639e: 683b ldr r3, [r7, #0] 80063a0: 2b00 cmp r3, #0 80063a2: d004 beq.n 80063ae 80063a4: 683b ldr r3, [r7, #0] 80063a6: 3301 adds r3, #1 80063a8: 781b ldrb r3, [r3, #0] 80063aa: 461a mov r2, r3 80063ac: e000 b.n 80063b0 80063ae: 2200 movs r2, #0 80063b0: 683b ldr r3, [r7, #0] 80063b2: 2b00 cmp r3, #0 80063b4: d004 beq.n 80063c0 80063b6: 683b ldr r3, [r7, #0] 80063b8: 3302 adds r3, #2 80063ba: 781b ldrb r3, [r3, #0] 80063bc: 4618 mov r0, r3 80063be: e000 b.n 80063c2 80063c0: 2000 movs r0, #0 80063c2: 683b ldr r3, [r7, #0] 80063c4: 2b00 cmp r3, #0 80063c6: d021 beq.n 800640c 80063c8: 683b ldr r3, [r7, #0] 80063ca: 3303 adds r3, #3 80063cc: 781b ldrb r3, [r3, #0] 80063ce: e01e b.n 800640e 80063d0: 08012168 .word 0x08012168 80063d4: 080121fc .word 0x080121fc 80063d8: 080121b8 .word 0x080121b8 80063dc: 08012218 .word 0x08012218 80063e0: 08014d94 .word 0x08014d94 80063e4: 080068f7 .word 0x080068f7 80063e8: 24007b68 .word 0x24007b68 80063ec: 24007b60 .word 0x24007b60 80063f0: 0801223c .word 0x0801223c 80063f4: 08012250 .word 0x08012250 80063f8: 08012280 .word 0x08012280 80063fc: 080122a0 .word 0x080122a0 8006400: 080122a8 .word 0x080122a8 8006404: 080122b8 .word 0x080122b8 8006408: 080122c4 .word 0x080122c4 800640c: 2300 movs r3, #0 800640e: 9300 str r3, [sp, #0] 8006410: 4603 mov r3, r0 8006412: 4805 ldr r0, [pc, #20] ; (8006428 ) 8006414: f00a fbd8 bl 8010bc8 #endif /* LWIP_IPV4 */ LWIP_DEBUGF(NETIF_DEBUG, ("\n")); 8006418: 200a movs r0, #10 800641a: f00a fbe7 bl 8010bec netif_invoke_ext_callback(netif, LWIP_NSC_NETIF_ADDED, NULL); return netif; 800641e: 68fb ldr r3, [r7, #12] } 8006420: 4618 mov r0, r3 8006422: 3718 adds r7, #24 8006424: 46bd mov sp, r7 8006426: bd80 pop {r7, pc} 8006428: 080122a8 .word 0x080122a8 0800642c : static void netif_do_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr) { 800642c: b580 push {r7, lr} 800642e: b082 sub sp, #8 8006430: af00 add r7, sp, #0 8006432: 6078 str r0, [r7, #4] 8006434: 6039 str r1, [r7, #0] #if LWIP_TCP tcp_netif_ip_addr_changed(old_addr, new_addr); 8006436: 6839 ldr r1, [r7, #0] 8006438: 6878 ldr r0, [r7, #4] 800643a: f002 fd85 bl 8008f48 #endif /* LWIP_TCP */ #if LWIP_UDP udp_netif_ip_addr_changed(old_addr, new_addr); 800643e: 6839 ldr r1, [r7, #0] 8006440: 6878 ldr r0, [r7, #4] 8006442: f007 fb2d bl 800daa0 #endif /* LWIP_UDP */ #if LWIP_RAW raw_netif_ip_addr_changed(old_addr, new_addr); #endif /* LWIP_RAW */ } 8006446: bf00 nop 8006448: 3708 adds r7, #8 800644a: 46bd mov sp, r7 800644c: bd80 pop {r7, pc} ... 08006450 : #if LWIP_IPV4 static int netif_do_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr, ip_addr_t *old_addr) { 8006450: b580 push {r7, lr} 8006452: b086 sub sp, #24 8006454: af00 add r7, sp, #0 8006456: 60f8 str r0, [r7, #12] 8006458: 60b9 str r1, [r7, #8] 800645a: 607a str r2, [r7, #4] LWIP_ASSERT("invalid pointer", ipaddr != NULL); 800645c: 68bb ldr r3, [r7, #8] 800645e: 2b00 cmp r3, #0 8006460: d106 bne.n 8006470 8006462: 4b1e ldr r3, [pc, #120] ; (80064dc ) 8006464: f240 12cb movw r2, #459 ; 0x1cb 8006468: 491d ldr r1, [pc, #116] ; (80064e0 ) 800646a: 481e ldr r0, [pc, #120] ; (80064e4 ) 800646c: f00a fbac bl 8010bc8 LWIP_ASSERT("invalid pointer", old_addr != NULL); 8006470: 687b ldr r3, [r7, #4] 8006472: 2b00 cmp r3, #0 8006474: d106 bne.n 8006484 8006476: 4b19 ldr r3, [pc, #100] ; (80064dc ) 8006478: f44f 72e6 mov.w r2, #460 ; 0x1cc 800647c: 4918 ldr r1, [pc, #96] ; (80064e0 ) 800647e: 4819 ldr r0, [pc, #100] ; (80064e4 ) 8006480: f00a fba2 bl 8010bc8 /* address is actually being changed? */ if (ip4_addr_cmp(ipaddr, netif_ip4_addr(netif)) == 0) { 8006484: 68bb ldr r3, [r7, #8] 8006486: 681a ldr r2, [r3, #0] 8006488: 68fb ldr r3, [r7, #12] 800648a: 3304 adds r3, #4 800648c: 681b ldr r3, [r3, #0] 800648e: 429a cmp r2, r3 8006490: d01f beq.n 80064d2 ip_addr_t new_addr; *ip_2_ip4(&new_addr) = *ipaddr; 8006492: 68bb ldr r3, [r7, #8] 8006494: 681b ldr r3, [r3, #0] 8006496: 617b str r3, [r7, #20] IP_SET_TYPE_VAL(new_addr, IPADDR_TYPE_V4); ip_addr_copy(*old_addr, *netif_ip_addr4(netif)); 8006498: 68fb ldr r3, [r7, #12] 800649a: 3304 adds r3, #4 800649c: 681a ldr r2, [r3, #0] 800649e: 687b ldr r3, [r7, #4] 80064a0: 601a str r2, [r3, #0] LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: netif address being changed\n")); 80064a2: 4811 ldr r0, [pc, #68] ; (80064e8 ) 80064a4: f00a fbfe bl 8010ca4 netif_do_ip_addr_changed(old_addr, &new_addr); 80064a8: f107 0314 add.w r3, r7, #20 80064ac: 4619 mov r1, r3 80064ae: 6878 ldr r0, [r7, #4] 80064b0: f7ff ffbc bl 800642c 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); 80064b4: 68bb ldr r3, [r7, #8] 80064b6: 2b00 cmp r3, #0 80064b8: d002 beq.n 80064c0 80064ba: 68bb ldr r3, [r7, #8] 80064bc: 681b ldr r3, [r3, #0] 80064be: e000 b.n 80064c2 80064c0: 2300 movs r3, #0 80064c2: 68fa ldr r2, [r7, #12] 80064c4: 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); 80064c6: 2101 movs r1, #1 80064c8: 68f8 ldr r0, [r7, #12] 80064ca: f000 f92d bl 8006728 NETIF_STATUS_CALLBACK(netif); return 1; /* address changed */ 80064ce: 2301 movs r3, #1 80064d0: e000 b.n 80064d4 } return 0; /* address unchanged */ 80064d2: 2300 movs r3, #0 } 80064d4: 4618 mov r0, r3 80064d6: 3718 adds r7, #24 80064d8: 46bd mov sp, r7 80064da: bd80 pop {r7, pc} 80064dc: 08012168 .word 0x08012168 80064e0: 080122cc .word 0x080122cc 80064e4: 080121b8 .word 0x080121b8 80064e8: 080122dc .word 0x080122dc 080064ec : } } static int netif_do_set_netmask(struct netif *netif, const ip4_addr_t *netmask, ip_addr_t *old_nm) { 80064ec: b5b0 push {r4, r5, r7, lr} 80064ee: b088 sub sp, #32 80064f0: af04 add r7, sp, #16 80064f2: 60f8 str r0, [r7, #12] 80064f4: 60b9 str r1, [r7, #8] 80064f6: 607a str r2, [r7, #4] /* address is actually being changed? */ if (ip4_addr_cmp(netmask, netif_ip4_netmask(netif)) == 0) { 80064f8: 68bb ldr r3, [r7, #8] 80064fa: 681a ldr r2, [r3, #0] 80064fc: 68fb ldr r3, [r7, #12] 80064fe: 3308 adds r3, #8 8006500: 681b ldr r3, [r3, #0] 8006502: 429a cmp r2, r3 8006504: d02d beq.n 8006562 #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); 8006506: 68bb ldr r3, [r7, #8] 8006508: 2b00 cmp r3, #0 800650a: d002 beq.n 8006512 800650c: 68bb ldr r3, [r7, #8] 800650e: 681b ldr r3, [r3, #0] 8006510: e000 b.n 8006514 8006512: 2300 movs r3, #0 8006514: 68fa ldr r2, [r7, #12] 8006516: 6093 str r3, [r2, #8] IP_SET_TYPE_VAL(netif->netmask, IPADDR_TYPE_V4); mib2_add_route_ip4(0, netif); LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: netmask of interface %c%c set to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", 8006518: 68fb ldr r3, [r7, #12] 800651a: f893 302e ldrb.w r3, [r3, #46] ; 0x2e 800651e: 4618 mov r0, r3 8006520: 68fb ldr r3, [r7, #12] 8006522: f893 302f ldrb.w r3, [r3, #47] ; 0x2f 8006526: 461c mov r4, r3 8006528: 68fb ldr r3, [r7, #12] 800652a: 3308 adds r3, #8 800652c: 781b ldrb r3, [r3, #0] 800652e: 461d mov r5, r3 8006530: 68fb ldr r3, [r7, #12] 8006532: 3308 adds r3, #8 8006534: 3301 adds r3, #1 8006536: 781b ldrb r3, [r3, #0] 8006538: 461a mov r2, r3 800653a: 68fb ldr r3, [r7, #12] 800653c: 3308 adds r3, #8 800653e: 3302 adds r3, #2 8006540: 781b ldrb r3, [r3, #0] 8006542: 4619 mov r1, r3 8006544: 68fb ldr r3, [r7, #12] 8006546: 3308 adds r3, #8 8006548: 3303 adds r3, #3 800654a: 781b ldrb r3, [r3, #0] 800654c: 9302 str r3, [sp, #8] 800654e: 9101 str r1, [sp, #4] 8006550: 9200 str r2, [sp, #0] 8006552: 462b mov r3, r5 8006554: 4622 mov r2, r4 8006556: 4601 mov r1, r0 8006558: 4804 ldr r0, [pc, #16] ; (800656c ) 800655a: f00a fb35 bl 8010bc8 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 */ 800655e: 2301 movs r3, #1 8006560: e000 b.n 8006564 } return 0; /* netmask unchanged */ 8006562: 2300 movs r3, #0 } 8006564: 4618 mov r0, r3 8006566: 3710 adds r7, #16 8006568: 46bd mov sp, r7 800656a: bdb0 pop {r4, r5, r7, pc} 800656c: 0801232c .word 0x0801232c 08006570 : } } static int netif_do_set_gw(struct netif *netif, const ip4_addr_t *gw, ip_addr_t *old_gw) { 8006570: b5b0 push {r4, r5, r7, lr} 8006572: b088 sub sp, #32 8006574: af04 add r7, sp, #16 8006576: 60f8 str r0, [r7, #12] 8006578: 60b9 str r1, [r7, #8] 800657a: 607a str r2, [r7, #4] /* address is actually being changed? */ if (ip4_addr_cmp(gw, netif_ip4_gw(netif)) == 0) { 800657c: 68bb ldr r3, [r7, #8] 800657e: 681a ldr r2, [r3, #0] 8006580: 68fb ldr r3, [r7, #12] 8006582: 330c adds r3, #12 8006584: 681b ldr r3, [r3, #0] 8006586: 429a cmp r2, r3 8006588: d02d beq.n 80065e6 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); 800658a: 68bb ldr r3, [r7, #8] 800658c: 2b00 cmp r3, #0 800658e: d002 beq.n 8006596 8006590: 68bb ldr r3, [r7, #8] 8006592: 681b ldr r3, [r3, #0] 8006594: e000 b.n 8006598 8006596: 2300 movs r3, #0 8006598: 68fa ldr r2, [r7, #12] 800659a: 60d3 str r3, [r2, #12] IP_SET_TYPE_VAL(netif->gw, IPADDR_TYPE_V4); LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: GW address of interface %c%c set to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", 800659c: 68fb ldr r3, [r7, #12] 800659e: f893 302e ldrb.w r3, [r3, #46] ; 0x2e 80065a2: 4618 mov r0, r3 80065a4: 68fb ldr r3, [r7, #12] 80065a6: f893 302f ldrb.w r3, [r3, #47] ; 0x2f 80065aa: 461c mov r4, r3 80065ac: 68fb ldr r3, [r7, #12] 80065ae: 330c adds r3, #12 80065b0: 781b ldrb r3, [r3, #0] 80065b2: 461d mov r5, r3 80065b4: 68fb ldr r3, [r7, #12] 80065b6: 330c adds r3, #12 80065b8: 3301 adds r3, #1 80065ba: 781b ldrb r3, [r3, #0] 80065bc: 461a mov r2, r3 80065be: 68fb ldr r3, [r7, #12] 80065c0: 330c adds r3, #12 80065c2: 3302 adds r3, #2 80065c4: 781b ldrb r3, [r3, #0] 80065c6: 4619 mov r1, r3 80065c8: 68fb ldr r3, [r7, #12] 80065ca: 330c adds r3, #12 80065cc: 3303 adds r3, #3 80065ce: 781b ldrb r3, [r3, #0] 80065d0: 9302 str r3, [sp, #8] 80065d2: 9101 str r1, [sp, #4] 80065d4: 9200 str r2, [sp, #0] 80065d6: 462b mov r3, r5 80065d8: 4622 mov r2, r4 80065da: 4601 mov r1, r0 80065dc: 4804 ldr r0, [pc, #16] ; (80065f0 ) 80065de: f00a faf3 bl 8010bc8 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 */ 80065e2: 2301 movs r3, #1 80065e4: e000 b.n 80065e8 } return 0; /* gateway unchanged */ 80065e6: 2300 movs r3, #0 } 80065e8: 4618 mov r0, r3 80065ea: 3710 adds r7, #16 80065ec: 46bd mov sp, r7 80065ee: bdb0 pop {r4, r5, r7, pc} 80065f0: 0801238c .word 0x0801238c 080065f4 : * @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) { 80065f4: b580 push {r7, lr} 80065f6: b088 sub sp, #32 80065f8: af00 add r7, sp, #0 80065fa: 60f8 str r0, [r7, #12] 80065fc: 60b9 str r1, [r7, #8] 80065fe: 607a str r2, [r7, #4] 8006600: 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; 8006602: 2300 movs r3, #0 8006604: 61fb str r3, [r7, #28] ip_addr_t *old_gw = NULL; 8006606: 2300 movs r3, #0 8006608: 61bb str r3, [r7, #24] int remove; LWIP_ASSERT_CORE_LOCKED(); /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ if (ipaddr == NULL) { 800660a: 68bb ldr r3, [r7, #8] 800660c: 2b00 cmp r3, #0 800660e: d101 bne.n 8006614 ipaddr = IP4_ADDR_ANY4; 8006610: 4b1c ldr r3, [pc, #112] ; (8006684 ) 8006612: 60bb str r3, [r7, #8] } if (netmask == NULL) { 8006614: 687b ldr r3, [r7, #4] 8006616: 2b00 cmp r3, #0 8006618: d101 bne.n 800661e netmask = IP4_ADDR_ANY4; 800661a: 4b1a ldr r3, [pc, #104] ; (8006684 ) 800661c: 607b str r3, [r7, #4] } if (gw == NULL) { 800661e: 683b ldr r3, [r7, #0] 8006620: 2b00 cmp r3, #0 8006622: d101 bne.n 8006628 gw = IP4_ADDR_ANY4; 8006624: 4b17 ldr r3, [pc, #92] ; (8006684 ) 8006626: 603b str r3, [r7, #0] } remove = ip4_addr_isany(ipaddr); 8006628: 68bb ldr r3, [r7, #8] 800662a: 2b00 cmp r3, #0 800662c: d003 beq.n 8006636 800662e: 68bb ldr r3, [r7, #8] 8006630: 681b ldr r3, [r3, #0] 8006632: 2b00 cmp r3, #0 8006634: d101 bne.n 800663a 8006636: 2301 movs r3, #1 8006638: e000 b.n 800663c 800663a: 2300 movs r3, #0 800663c: 617b str r3, [r7, #20] if (remove) { 800663e: 697b ldr r3, [r7, #20] 8006640: 2b00 cmp r3, #0 8006642: d006 beq.n 8006652 /* 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)) { 8006644: f107 0310 add.w r3, r7, #16 8006648: 461a mov r2, r3 800664a: 68b9 ldr r1, [r7, #8] 800664c: 68f8 ldr r0, [r7, #12] 800664e: f7ff feff bl 8006450 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)) { 8006652: 69fa ldr r2, [r7, #28] 8006654: 6879 ldr r1, [r7, #4] 8006656: 68f8 ldr r0, [r7, #12] 8006658: f7ff ff48 bl 80064ec #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)) { 800665c: 69ba ldr r2, [r7, #24] 800665e: 6839 ldr r1, [r7, #0] 8006660: 68f8 ldr r0, [r7, #12] 8006662: f7ff ff85 bl 8006570 #if LWIP_NETIF_EXT_STATUS_CALLBACK change_reason |= LWIP_NSC_IPV4_GATEWAY_CHANGED; cb_args.ipv4_changed.old_gw = old_gw; #endif } if (!remove) { 8006666: 697b ldr r3, [r7, #20] 8006668: 2b00 cmp r3, #0 800666a: d106 bne.n 800667a /* set ipaddr last to ensure netmask/gw have been set when status callback is called */ if (netif_do_set_ipaddr(netif, ipaddr, &old_addr)) { 800666c: f107 0310 add.w r3, r7, #16 8006670: 461a mov r2, r3 8006672: 68b9 ldr r1, [r7, #8] 8006674: 68f8 ldr r0, [r7, #12] 8006676: f7ff feeb bl 8006450 if (change_reason != LWIP_NSC_NONE) { change_reason |= LWIP_NSC_IPV4_SETTINGS_CHANGED; netif_invoke_ext_callback(netif, change_reason, &cb_args); } #endif } 800667a: bf00 nop 800667c: 3720 adds r7, #32 800667e: 46bd mov sp, r7 8006680: bd80 pop {r7, pc} 8006682: bf00 nop 8006684: 08014d94 .word 0x08014d94 08006688 : * * @param netif the default network interface */ void netif_set_default(struct netif *netif) { 8006688: b580 push {r7, lr} 800668a: b082 sub sp, #8 800668c: af00 add r7, sp, #0 800668e: 6078 str r0, [r7, #4] mib2_remove_route_ip4(1, netif); } else { /* install default route */ mib2_add_route_ip4(1, netif); } netif_default = netif; 8006690: 4a0d ldr r2, [pc, #52] ; (80066c8 ) 8006692: 687b ldr r3, [r7, #4] 8006694: 6013 str r3, [r2, #0] LWIP_DEBUGF(NETIF_DEBUG, ("netif: setting default interface %c%c\n", 8006696: 687b ldr r3, [r7, #4] 8006698: 2b00 cmp r3, #0 800669a: d004 beq.n 80066a6 800669c: 687b ldr r3, [r7, #4] 800669e: f893 302e ldrb.w r3, [r3, #46] ; 0x2e 80066a2: 4619 mov r1, r3 80066a4: e000 b.n 80066a8 80066a6: 2127 movs r1, #39 ; 0x27 80066a8: 687b ldr r3, [r7, #4] 80066aa: 2b00 cmp r3, #0 80066ac: d003 beq.n 80066b6 80066ae: 687b ldr r3, [r7, #4] 80066b0: f893 302f ldrb.w r3, [r3, #47] ; 0x2f 80066b4: e000 b.n 80066b8 80066b6: 2327 movs r3, #39 ; 0x27 80066b8: 461a mov r2, r3 80066ba: 4804 ldr r0, [pc, #16] ; (80066cc ) 80066bc: f00a fa84 bl 8010bc8 netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\'')); } 80066c0: bf00 nop 80066c2: 3708 adds r7, #8 80066c4: 46bd mov sp, r7 80066c6: bd80 pop {r7, pc} 80066c8: 24007b64 .word 0x24007b64 80066cc: 08012400 .word 0x08012400 080066d0 : * Bring an interface up, available for processing * traffic. */ void netif_set_up(struct netif *netif) { 80066d0: b580 push {r7, lr} 80066d2: b082 sub sp, #8 80066d4: af00 add r7, sp, #0 80066d6: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); LWIP_ERROR("netif_set_up: invalid netif", netif != NULL, return); 80066d8: 687b ldr r3, [r7, #4] 80066da: 2b00 cmp r3, #0 80066dc: d107 bne.n 80066ee 80066de: 4b0f ldr r3, [pc, #60] ; (800671c ) 80066e0: f44f 7254 mov.w r2, #848 ; 0x350 80066e4: 490e ldr r1, [pc, #56] ; (8006720 ) 80066e6: 480f ldr r0, [pc, #60] ; (8006724 ) 80066e8: f00a fa6e bl 8010bc8 80066ec: e013 b.n 8006716 if (!(netif->flags & NETIF_FLAG_UP)) { 80066ee: 687b ldr r3, [r7, #4] 80066f0: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 80066f4: f003 0301 and.w r3, r3, #1 80066f8: 2b00 cmp r3, #0 80066fa: d10c bne.n 8006716 netif_set_flags(netif, NETIF_FLAG_UP); 80066fc: 687b ldr r3, [r7, #4] 80066fe: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 8006702: f043 0301 orr.w r3, r3, #1 8006706: b2da uxtb r2, r3 8006708: 687b ldr r3, [r7, #4] 800670a: f883 202d strb.w r2, [r3, #45] ; 0x2d 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); 800670e: 2103 movs r1, #3 8006710: 6878 ldr r0, [r7, #4] 8006712: f000 f809 bl 8006728 #if LWIP_IPV6 nd6_restart_netif(netif); #endif /* LWIP_IPV6 */ } } 8006716: 3708 adds r7, #8 8006718: 46bd mov sp, r7 800671a: bd80 pop {r7, pc} 800671c: 08012168 .word 0x08012168 8006720: 08012428 .word 0x08012428 8006724: 080121b8 .word 0x080121b8 08006728 : /** 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) { 8006728: b580 push {r7, lr} 800672a: b082 sub sp, #8 800672c: af00 add r7, sp, #0 800672e: 6078 str r0, [r7, #4] 8006730: 460b mov r3, r1 8006732: 70fb strb r3, [r7, #3] LWIP_ASSERT("netif_issue_reports: invalid netif", netif != NULL); 8006734: 687b ldr r3, [r7, #4] 8006736: 2b00 cmp r3, #0 8006738: d106 bne.n 8006748 800673a: 4b18 ldr r3, [pc, #96] ; (800679c ) 800673c: f240 326d movw r2, #877 ; 0x36d 8006740: 4917 ldr r1, [pc, #92] ; (80067a0 ) 8006742: 4818 ldr r0, [pc, #96] ; (80067a4 ) 8006744: f00a fa40 bl 8010bc8 /* Only send reports when both link and admin states are up */ if (!(netif->flags & NETIF_FLAG_LINK_UP) || 8006748: 687b ldr r3, [r7, #4] 800674a: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 800674e: f003 0304 and.w r3, r3, #4 8006752: 2b00 cmp r3, #0 8006754: d01e beq.n 8006794 !(netif->flags & NETIF_FLAG_UP)) { 8006756: 687b ldr r3, [r7, #4] 8006758: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 800675c: f003 0301 and.w r3, r3, #1 if (!(netif->flags & NETIF_FLAG_LINK_UP) || 8006760: 2b00 cmp r3, #0 8006762: d017 beq.n 8006794 return; } #if LWIP_IPV4 if ((report_type & NETIF_REPORT_TYPE_IPV4) && 8006764: 78fb ldrb r3, [r7, #3] 8006766: f003 0301 and.w r3, r3, #1 800676a: 2b00 cmp r3, #0 800676c: d013 beq.n 8006796 !ip4_addr_isany_val(*netif_ip4_addr(netif))) { 800676e: 687b ldr r3, [r7, #4] 8006770: 3304 adds r3, #4 8006772: 681b ldr r3, [r3, #0] if ((report_type & NETIF_REPORT_TYPE_IPV4) && 8006774: 2b00 cmp r3, #0 8006776: d00e beq.n 8006796 #if LWIP_ARP /* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */ if (netif->flags & (NETIF_FLAG_ETHARP)) { 8006778: 687b ldr r3, [r7, #4] 800677a: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 800677e: f003 0308 and.w r3, r3, #8 8006782: 2b00 cmp r3, #0 8006784: d007 beq.n 8006796 etharp_gratuitous(netif); 8006786: 687b ldr r3, [r7, #4] 8006788: 3304 adds r3, #4 800678a: 4619 mov r1, r3 800678c: 6878 ldr r0, [r7, #4] 800678e: f008 f91f bl 800e9d0 8006792: e000 b.n 8006796 return; 8006794: bf00 nop /* send mld memberships */ mld6_report_groups(netif); #endif /* LWIP_IPV6_MLD */ } #endif /* LWIP_IPV6 */ } 8006796: 3708 adds r7, #8 8006798: 46bd mov sp, r7 800679a: bd80 pop {r7, pc} 800679c: 08012168 .word 0x08012168 80067a0: 08012444 .word 0x08012444 80067a4: 080121b8 .word 0x080121b8 080067a8 : * @ingroup netif * Bring an interface down, disabling any traffic processing. */ void netif_set_down(struct netif *netif) { 80067a8: b580 push {r7, lr} 80067aa: b082 sub sp, #8 80067ac: af00 add r7, sp, #0 80067ae: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); LWIP_ERROR("netif_set_down: invalid netif", netif != NULL, return); 80067b0: 687b ldr r3, [r7, #4] 80067b2: 2b00 cmp r3, #0 80067b4: d107 bne.n 80067c6 80067b6: 4b12 ldr r3, [pc, #72] ; (8006800 ) 80067b8: f240 329b movw r2, #923 ; 0x39b 80067bc: 4911 ldr r1, [pc, #68] ; (8006804 ) 80067be: 4812 ldr r0, [pc, #72] ; (8006808 ) 80067c0: f00a fa02 bl 8010bc8 80067c4: e019 b.n 80067fa if (netif->flags & NETIF_FLAG_UP) { 80067c6: 687b ldr r3, [r7, #4] 80067c8: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 80067cc: f003 0301 and.w r3, r3, #1 80067d0: 2b00 cmp r3, #0 80067d2: d012 beq.n 80067fa args.status_changed.state = 0; netif_invoke_ext_callback(netif, LWIP_NSC_STATUS_CHANGED, &args); } #endif netif_clear_flags(netif, NETIF_FLAG_UP); 80067d4: 687b ldr r3, [r7, #4] 80067d6: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 80067da: f023 0301 bic.w r3, r3, #1 80067de: b2da uxtb r2, r3 80067e0: 687b ldr r3, [r7, #4] 80067e2: f883 202d strb.w r2, [r3, #45] ; 0x2d MIB2_COPY_SYSUPTIME_TO(&netif->ts); #if LWIP_IPV4 && LWIP_ARP if (netif->flags & NETIF_FLAG_ETHARP) { 80067e6: 687b ldr r3, [r7, #4] 80067e8: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 80067ec: f003 0308 and.w r3, r3, #8 80067f0: 2b00 cmp r3, #0 80067f2: d002 beq.n 80067fa etharp_cleanup_netif(netif); 80067f4: 6878 ldr r0, [r7, #4] 80067f6: f007 fca9 bl 800e14c nd6_cleanup_netif(netif); #endif /* LWIP_IPV6 */ NETIF_STATUS_CALLBACK(netif); } } 80067fa: 3708 adds r7, #8 80067fc: 46bd mov sp, r7 80067fe: bd80 pop {r7, pc} 8006800: 08012168 .word 0x08012168 8006804: 08012468 .word 0x08012468 8006808: 080121b8 .word 0x080121b8 0800680c : * @ingroup netif * Called by a driver when its link goes up */ void netif_set_link_up(struct netif *netif) { 800680c: b580 push {r7, lr} 800680e: b082 sub sp, #8 8006810: af00 add r7, sp, #0 8006812: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); LWIP_ERROR("netif_set_link_up: invalid netif", netif != NULL, return); 8006814: 687b ldr r3, [r7, #4] 8006816: 2b00 cmp r3, #0 8006818: d107 bne.n 800682a 800681a: 4b13 ldr r3, [pc, #76] ; (8006868 ) 800681c: f44f 7278 mov.w r2, #992 ; 0x3e0 8006820: 4912 ldr r1, [pc, #72] ; (800686c ) 8006822: 4813 ldr r0, [pc, #76] ; (8006870 ) 8006824: f00a f9d0 bl 8010bc8 8006828: e01b b.n 8006862 if (!(netif->flags & NETIF_FLAG_LINK_UP)) { 800682a: 687b ldr r3, [r7, #4] 800682c: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 8006830: f003 0304 and.w r3, r3, #4 8006834: 2b00 cmp r3, #0 8006836: d114 bne.n 8006862 netif_set_flags(netif, NETIF_FLAG_LINK_UP); 8006838: 687b ldr r3, [r7, #4] 800683a: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 800683e: f043 0304 orr.w r3, r3, #4 8006842: b2da uxtb r2, r3 8006844: 687b ldr r3, [r7, #4] 8006846: f883 202d strb.w r2, [r3, #45] ; 0x2d #if LWIP_AUTOIP autoip_network_changed(netif); #endif /* LWIP_AUTOIP */ netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4 | NETIF_REPORT_TYPE_IPV6); 800684a: 2103 movs r1, #3 800684c: 6878 ldr r0, [r7, #4] 800684e: f7ff ff6b bl 8006728 #if LWIP_IPV6 nd6_restart_netif(netif); #endif /* LWIP_IPV6 */ NETIF_LINK_CALLBACK(netif); 8006852: 687b ldr r3, [r7, #4] 8006854: 69db ldr r3, [r3, #28] 8006856: 2b00 cmp r3, #0 8006858: d003 beq.n 8006862 800685a: 687b ldr r3, [r7, #4] 800685c: 69db ldr r3, [r3, #28] 800685e: 6878 ldr r0, [r7, #4] 8006860: 4798 blx r3 args.link_changed.state = 1; netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args); } #endif } } 8006862: 3708 adds r7, #8 8006864: 46bd mov sp, r7 8006866: bd80 pop {r7, pc} 8006868: 08012168 .word 0x08012168 800686c: 08012488 .word 0x08012488 8006870: 080121b8 .word 0x080121b8 08006874 : * @ingroup netif * Called by a driver when its link goes down */ void netif_set_link_down(struct netif *netif) { 8006874: b580 push {r7, lr} 8006876: b082 sub sp, #8 8006878: af00 add r7, sp, #0 800687a: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); LWIP_ERROR("netif_set_link_down: invalid netif", netif != NULL, return); 800687c: 687b ldr r3, [r7, #4] 800687e: 2b00 cmp r3, #0 8006880: d107 bne.n 8006892 8006882: 4b11 ldr r3, [pc, #68] ; (80068c8 ) 8006884: f240 4206 movw r2, #1030 ; 0x406 8006888: 4910 ldr r1, [pc, #64] ; (80068cc ) 800688a: 4811 ldr r0, [pc, #68] ; (80068d0 ) 800688c: f00a f99c bl 8010bc8 8006890: e017 b.n 80068c2 if (netif->flags & NETIF_FLAG_LINK_UP) { 8006892: 687b ldr r3, [r7, #4] 8006894: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 8006898: f003 0304 and.w r3, r3, #4 800689c: 2b00 cmp r3, #0 800689e: d010 beq.n 80068c2 netif_clear_flags(netif, NETIF_FLAG_LINK_UP); 80068a0: 687b ldr r3, [r7, #4] 80068a2: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 80068a6: f023 0304 bic.w r3, r3, #4 80068aa: b2da uxtb r2, r3 80068ac: 687b ldr r3, [r7, #4] 80068ae: f883 202d strb.w r2, [r3, #45] ; 0x2d NETIF_LINK_CALLBACK(netif); 80068b2: 687b ldr r3, [r7, #4] 80068b4: 69db ldr r3, [r3, #28] 80068b6: 2b00 cmp r3, #0 80068b8: d003 beq.n 80068c2 80068ba: 687b ldr r3, [r7, #4] 80068bc: 69db ldr r3, [r3, #28] 80068be: 6878 ldr r0, [r7, #4] 80068c0: 4798 blx r3 args.link_changed.state = 0; netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args); } #endif } } 80068c2: 3708 adds r7, #8 80068c4: 46bd mov sp, r7 80068c6: bd80 pop {r7, pc} 80068c8: 08012168 .word 0x08012168 80068cc: 080124ac .word 0x080124ac 80068d0: 080121b8 .word 0x080121b8 080068d4 : * @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) { 80068d4: b480 push {r7} 80068d6: b083 sub sp, #12 80068d8: af00 add r7, sp, #0 80068da: 6078 str r0, [r7, #4] 80068dc: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); if (netif) { 80068de: 687b ldr r3, [r7, #4] 80068e0: 2b00 cmp r3, #0 80068e2: d002 beq.n 80068ea netif->link_callback = link_callback; 80068e4: 687b ldr r3, [r7, #4] 80068e6: 683a ldr r2, [r7, #0] 80068e8: 61da str r2, [r3, #28] } } 80068ea: bf00 nop 80068ec: 370c adds r7, #12 80068ee: 46bd mov sp, r7 80068f0: f85d 7b04 ldr.w r7, [sp], #4 80068f4: 4770 bx lr 080068f6 : #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) { 80068f6: b480 push {r7} 80068f8: b085 sub sp, #20 80068fa: af00 add r7, sp, #0 80068fc: 60f8 str r0, [r7, #12] 80068fe: 60b9 str r1, [r7, #8] 8006900: 607a str r2, [r7, #4] LWIP_UNUSED_ARG(netif); LWIP_UNUSED_ARG(p); LWIP_UNUSED_ARG(ipaddr); return ERR_IF; 8006902: f06f 030b mvn.w r3, #11 } 8006906: 4618 mov r0, r3 8006908: 3714 adds r7, #20 800690a: 46bd mov sp, r7 800690c: f85d 7b04 ldr.w r7, [sp], #4 8006910: 4770 bx lr ... 08006914 : * * @param idx index of netif to find */ struct netif * netif_get_by_index(u8_t idx) { 8006914: b480 push {r7} 8006916: b085 sub sp, #20 8006918: af00 add r7, sp, #0 800691a: 4603 mov r3, r0 800691c: 71fb strb r3, [r7, #7] struct netif *netif; LWIP_ASSERT_CORE_LOCKED(); if (idx != NETIF_NO_INDEX) { 800691e: 79fb ldrb r3, [r7, #7] 8006920: 2b00 cmp r3, #0 8006922: d013 beq.n 800694c NETIF_FOREACH(netif) { 8006924: 4b0d ldr r3, [pc, #52] ; (800695c ) 8006926: 681b ldr r3, [r3, #0] 8006928: 60fb str r3, [r7, #12] 800692a: e00c b.n 8006946 if (idx == netif_get_index(netif)) { 800692c: 68fb ldr r3, [r7, #12] 800692e: f893 3030 ldrb.w r3, [r3, #48] ; 0x30 8006932: 3301 adds r3, #1 8006934: b2db uxtb r3, r3 8006936: 79fa ldrb r2, [r7, #7] 8006938: 429a cmp r2, r3 800693a: d101 bne.n 8006940 return netif; /* found! */ 800693c: 68fb ldr r3, [r7, #12] 800693e: e006 b.n 800694e NETIF_FOREACH(netif) { 8006940: 68fb ldr r3, [r7, #12] 8006942: 681b ldr r3, [r3, #0] 8006944: 60fb str r3, [r7, #12] 8006946: 68fb ldr r3, [r7, #12] 8006948: 2b00 cmp r3, #0 800694a: d1ef bne.n 800692c } } } return NULL; 800694c: 2300 movs r3, #0 } 800694e: 4618 mov r0, r3 8006950: 3714 adds r7, #20 8006952: 46bd mov sp, r7 8006954: f85d 7b04 ldr.w r7, [sp], #4 8006958: 4770 bx lr 800695a: bf00 nop 800695c: 24007b60 .word 0x24007b60 08006960 : #if !NO_SYS static #endif /* !NO_SYS */ void pbuf_free_ooseq(void) { 8006960: b580 push {r7, lr} 8006962: b082 sub sp, #8 8006964: af00 add r7, sp, #0 struct tcp_pcb *pcb; SYS_ARCH_SET(pbuf_free_ooseq_pending, 0); 8006966: 4b0c ldr r3, [pc, #48] ; (8006998 ) 8006968: 2200 movs r2, #0 800696a: 701a strb r2, [r3, #0] for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) { 800696c: 4b0b ldr r3, [pc, #44] ; (800699c ) 800696e: 681b ldr r3, [r3, #0] 8006970: 607b str r3, [r7, #4] 8006972: e00a b.n 800698a if (pcb->ooseq != NULL) { 8006974: 687b ldr r3, [r7, #4] 8006976: 6f5b ldr r3, [r3, #116] ; 0x74 8006978: 2b00 cmp r3, #0 800697a: d003 beq.n 8006984 /** 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); 800697c: 6878 ldr r0, [r7, #4] 800697e: f002 fb21 bl 8008fc4 return; 8006982: e005 b.n 8006990 for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) { 8006984: 687b ldr r3, [r7, #4] 8006986: 68db ldr r3, [r3, #12] 8006988: 607b str r3, [r7, #4] 800698a: 687b ldr r3, [r7, #4] 800698c: 2b00 cmp r3, #0 800698e: d1f1 bne.n 8006974 } } } 8006990: 3708 adds r7, #8 8006992: 46bd mov sp, r7 8006994: bd80 pop {r7, pc} 8006996: bf00 nop 8006998: 24007b69 .word 0x24007b69 800699c: 24007b78 .word 0x24007b78 080069a0 : #endif /* !NO_SYS */ /** Queue a call to pbuf_free_ooseq if not already queued. */ static void pbuf_pool_is_empty(void) { 80069a0: b480 push {r7} 80069a2: af00 add r7, sp, #0 #ifndef PBUF_POOL_FREE_OOSEQ_QUEUE_CALL SYS_ARCH_SET(pbuf_free_ooseq_pending, 1); 80069a4: 4b03 ldr r3, [pc, #12] ; (80069b4 ) 80069a6: 2201 movs r2, #1 80069a8: 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 */ } 80069aa: bf00 nop 80069ac: 46bd mov sp, r7 80069ae: f85d 7b04 ldr.w r7, [sp], #4 80069b2: 4770 bx lr 80069b4: 24007b69 .word 0x24007b69 080069b8 : #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) { 80069b8: b480 push {r7} 80069ba: b085 sub sp, #20 80069bc: af00 add r7, sp, #0 80069be: 60f8 str r0, [r7, #12] 80069c0: 60b9 str r1, [r7, #8] 80069c2: 4611 mov r1, r2 80069c4: 461a mov r2, r3 80069c6: 460b mov r3, r1 80069c8: 80fb strh r3, [r7, #6] 80069ca: 4613 mov r3, r2 80069cc: 80bb strh r3, [r7, #4] p->next = NULL; 80069ce: 68fb ldr r3, [r7, #12] 80069d0: 2200 movs r2, #0 80069d2: 601a str r2, [r3, #0] p->payload = payload; 80069d4: 68fb ldr r3, [r7, #12] 80069d6: 68ba ldr r2, [r7, #8] 80069d8: 605a str r2, [r3, #4] p->tot_len = tot_len; 80069da: 68fb ldr r3, [r7, #12] 80069dc: 88fa ldrh r2, [r7, #6] 80069de: 811a strh r2, [r3, #8] p->len = len; 80069e0: 68fb ldr r3, [r7, #12] 80069e2: 88ba ldrh r2, [r7, #4] 80069e4: 815a strh r2, [r3, #10] p->type_internal = (u8_t)type; 80069e6: 8b3b ldrh r3, [r7, #24] 80069e8: b2da uxtb r2, r3 80069ea: 68fb ldr r3, [r7, #12] 80069ec: 731a strb r2, [r3, #12] p->flags = flags; 80069ee: 68fb ldr r3, [r7, #12] 80069f0: 7f3a ldrb r2, [r7, #28] 80069f2: 735a strb r2, [r3, #13] p->ref = 1; 80069f4: 68fb ldr r3, [r7, #12] 80069f6: 2201 movs r2, #1 80069f8: 739a strb r2, [r3, #14] p->if_idx = NETIF_NO_INDEX; 80069fa: 68fb ldr r3, [r7, #12] 80069fc: 2200 movs r2, #0 80069fe: 73da strb r2, [r3, #15] } 8006a00: bf00 nop 8006a02: 3714 adds r7, #20 8006a04: 46bd mov sp, r7 8006a06: f85d 7b04 ldr.w r7, [sp], #4 8006a0a: 4770 bx lr 08006a0c : * @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) { 8006a0c: b580 push {r7, lr} 8006a0e: b08c sub sp, #48 ; 0x30 8006a10: af02 add r7, sp, #8 8006a12: 4603 mov r3, r0 8006a14: 71fb strb r3, [r7, #7] 8006a16: 460b mov r3, r1 8006a18: 80bb strh r3, [r7, #4] 8006a1a: 4613 mov r3, r2 8006a1c: 807b strh r3, [r7, #2] struct pbuf *p; u16_t offset = (u16_t)layer; 8006a1e: 79fb ldrb r3, [r7, #7] 8006a20: 847b strh r3, [r7, #34] ; 0x22 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length)); switch (type) { 8006a22: 887b ldrh r3, [r7, #2] 8006a24: f5b3 7f20 cmp.w r3, #640 ; 0x280 8006a28: d07f beq.n 8006b2a 8006a2a: f5b3 7f20 cmp.w r3, #640 ; 0x280 8006a2e: f300 80c8 bgt.w 8006bc2 8006a32: f5b3 7fc1 cmp.w r3, #386 ; 0x182 8006a36: d010 beq.n 8006a5a 8006a38: f5b3 7fc1 cmp.w r3, #386 ; 0x182 8006a3c: f300 80c1 bgt.w 8006bc2 8006a40: 2b01 cmp r3, #1 8006a42: d002 beq.n 8006a4a 8006a44: 2b41 cmp r3, #65 ; 0x41 8006a46: f040 80bc bne.w 8006bc2 case PBUF_REF: /* fall through */ case PBUF_ROM: p = pbuf_alloc_reference(NULL, length, type); 8006a4a: 887a ldrh r2, [r7, #2] 8006a4c: 88bb ldrh r3, [r7, #4] 8006a4e: 4619 mov r1, r3 8006a50: 2000 movs r0, #0 8006a52: f000 f8d1 bl 8006bf8 8006a56: 6278 str r0, [r7, #36] ; 0x24 break; 8006a58: e0bd b.n 8006bd6 case PBUF_POOL: { struct pbuf *q, *last; u16_t rem_len; /* remaining length */ p = NULL; 8006a5a: 2300 movs r3, #0 8006a5c: 627b str r3, [r7, #36] ; 0x24 last = NULL; 8006a5e: 2300 movs r3, #0 8006a60: 61fb str r3, [r7, #28] rem_len = length; 8006a62: 88bb ldrh r3, [r7, #4] 8006a64: 837b strh r3, [r7, #26] do { u16_t qlen; q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); 8006a66: 2008 movs r0, #8 8006a68: f7ff fad8 bl 800601c 8006a6c: 6138 str r0, [r7, #16] if (q == NULL) { 8006a6e: 693b ldr r3, [r7, #16] 8006a70: 2b00 cmp r3, #0 8006a72: d109 bne.n 8006a88 PBUF_POOL_IS_EMPTY(); 8006a74: f7ff ff94 bl 80069a0 /* free chain so far allocated */ if (p) { 8006a78: 6a7b ldr r3, [r7, #36] ; 0x24 8006a7a: 2b00 cmp r3, #0 8006a7c: d002 beq.n 8006a84 pbuf_free(p); 8006a7e: 6a78 ldr r0, [r7, #36] ; 0x24 8006a80: f000 faa8 bl 8006fd4 } /* bail out unsuccessfully */ return NULL; 8006a84: 2300 movs r3, #0 8006a86: e0a7 b.n 8006bd8 } qlen = LWIP_MIN(rem_len, (u16_t)(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset))); 8006a88: 8c7b ldrh r3, [r7, #34] ; 0x22 8006a8a: 3303 adds r3, #3 8006a8c: b29b uxth r3, r3 8006a8e: f023 0303 bic.w r3, r3, #3 8006a92: b29b uxth r3, r3 8006a94: f5c3 7314 rsb r3, r3, #592 ; 0x250 8006a98: b29b uxth r3, r3 8006a9a: 8b7a ldrh r2, [r7, #26] 8006a9c: 4293 cmp r3, r2 8006a9e: bf28 it cs 8006aa0: 4613 movcs r3, r2 8006aa2: 81fb strh r3, [r7, #14] pbuf_init_alloced_pbuf(q, LWIP_MEM_ALIGN((void *)((u8_t *)q + SIZEOF_STRUCT_PBUF + offset)), 8006aa4: 8c7b ldrh r3, [r7, #34] ; 0x22 8006aa6: 3310 adds r3, #16 8006aa8: 693a ldr r2, [r7, #16] 8006aaa: 4413 add r3, r2 8006aac: 3303 adds r3, #3 8006aae: f023 0303 bic.w r3, r3, #3 8006ab2: 4618 mov r0, r3 8006ab4: 89f9 ldrh r1, [r7, #14] 8006ab6: 8b7a ldrh r2, [r7, #26] 8006ab8: 2300 movs r3, #0 8006aba: 9301 str r3, [sp, #4] 8006abc: 887b ldrh r3, [r7, #2] 8006abe: 9300 str r3, [sp, #0] 8006ac0: 460b mov r3, r1 8006ac2: 4601 mov r1, r0 8006ac4: 6938 ldr r0, [r7, #16] 8006ac6: f7ff ff77 bl 80069b8 rem_len, qlen, type, 0); LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", 8006aca: 693b ldr r3, [r7, #16] 8006acc: 685b ldr r3, [r3, #4] 8006ace: f003 0303 and.w r3, r3, #3 8006ad2: 2b00 cmp r3, #0 8006ad4: d006 beq.n 8006ae4 8006ad6: 4b42 ldr r3, [pc, #264] ; (8006be0 ) 8006ad8: f44f 7280 mov.w r2, #256 ; 0x100 8006adc: 4941 ldr r1, [pc, #260] ; (8006be4 ) 8006ade: 4842 ldr r0, [pc, #264] ; (8006be8 ) 8006ae0: f00a f872 bl 8010bc8 ((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0); LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT", 8006ae4: 8c7b ldrh r3, [r7, #34] ; 0x22 8006ae6: 3303 adds r3, #3 8006ae8: f023 0303 bic.w r3, r3, #3 8006aec: f5b3 7f14 cmp.w r3, #592 ; 0x250 8006af0: d106 bne.n 8006b00 8006af2: 4b3b ldr r3, [pc, #236] ; (8006be0 ) 8006af4: f44f 7281 mov.w r2, #258 ; 0x102 8006af8: 493c ldr r1, [pc, #240] ; (8006bec ) 8006afa: 483b ldr r0, [pc, #236] ; (8006be8 ) 8006afc: f00a f864 bl 8010bc8 (PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 ); if (p == NULL) { 8006b00: 6a7b ldr r3, [r7, #36] ; 0x24 8006b02: 2b00 cmp r3, #0 8006b04: d102 bne.n 8006b0c /* allocated head of pbuf chain (into p) */ p = q; 8006b06: 693b ldr r3, [r7, #16] 8006b08: 627b str r3, [r7, #36] ; 0x24 8006b0a: e002 b.n 8006b12 } else { /* make previous pbuf point to this pbuf */ last->next = q; 8006b0c: 69fb ldr r3, [r7, #28] 8006b0e: 693a ldr r2, [r7, #16] 8006b10: 601a str r2, [r3, #0] } last = q; 8006b12: 693b ldr r3, [r7, #16] 8006b14: 61fb str r3, [r7, #28] rem_len = (u16_t)(rem_len - qlen); 8006b16: 8b7a ldrh r2, [r7, #26] 8006b18: 89fb ldrh r3, [r7, #14] 8006b1a: 1ad3 subs r3, r2, r3 8006b1c: 837b strh r3, [r7, #26] offset = 0; 8006b1e: 2300 movs r3, #0 8006b20: 847b strh r3, [r7, #34] ; 0x22 } while (rem_len > 0); 8006b22: 8b7b ldrh r3, [r7, #26] 8006b24: 2b00 cmp r3, #0 8006b26: d19e bne.n 8006a66 break; 8006b28: e055 b.n 8006bd6 } case PBUF_RAM: { u16_t payload_len = (u16_t)(LWIP_MEM_ALIGN_SIZE(offset) + LWIP_MEM_ALIGN_SIZE(length)); 8006b2a: 8c7b ldrh r3, [r7, #34] ; 0x22 8006b2c: 3303 adds r3, #3 8006b2e: b29b uxth r3, r3 8006b30: f023 0303 bic.w r3, r3, #3 8006b34: b29a uxth r2, r3 8006b36: 88bb ldrh r3, [r7, #4] 8006b38: 3303 adds r3, #3 8006b3a: b29b uxth r3, r3 8006b3c: f023 0303 bic.w r3, r3, #3 8006b40: b29b uxth r3, r3 8006b42: 4413 add r3, r2 8006b44: 833b strh r3, [r7, #24] mem_size_t alloc_len = (mem_size_t)(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF) + payload_len); 8006b46: 8b3b ldrh r3, [r7, #24] 8006b48: 3310 adds r3, #16 8006b4a: 82fb strh r3, [r7, #22] /* bug #50040: Check for integer overflow when calculating alloc_len */ if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) || 8006b4c: 8b3a ldrh r2, [r7, #24] 8006b4e: 88bb ldrh r3, [r7, #4] 8006b50: 3303 adds r3, #3 8006b52: f023 0303 bic.w r3, r3, #3 8006b56: 429a cmp r2, r3 8006b58: d306 bcc.n 8006b68 (alloc_len < LWIP_MEM_ALIGN_SIZE(length))) { 8006b5a: 8afa ldrh r2, [r7, #22] 8006b5c: 88bb ldrh r3, [r7, #4] 8006b5e: 3303 adds r3, #3 8006b60: f023 0303 bic.w r3, r3, #3 if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) || 8006b64: 429a cmp r2, r3 8006b66: d201 bcs.n 8006b6c return NULL; 8006b68: 2300 movs r3, #0 8006b6a: e035 b.n 8006bd8 } /* If pbuf is to be allocated in RAM, allocate memory for it. */ p = (struct pbuf *)mem_malloc(alloc_len); 8006b6c: 8afb ldrh r3, [r7, #22] 8006b6e: 4618 mov r0, r3 8006b70: f7ff f8b0 bl 8005cd4 8006b74: 6278 str r0, [r7, #36] ; 0x24 if (p == NULL) { 8006b76: 6a7b ldr r3, [r7, #36] ; 0x24 8006b78: 2b00 cmp r3, #0 8006b7a: d101 bne.n 8006b80 return NULL; 8006b7c: 2300 movs r3, #0 8006b7e: e02b b.n 8006bd8 } pbuf_init_alloced_pbuf(p, LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)), 8006b80: 8c7b ldrh r3, [r7, #34] ; 0x22 8006b82: 3310 adds r3, #16 8006b84: 6a7a ldr r2, [r7, #36] ; 0x24 8006b86: 4413 add r3, r2 8006b88: 3303 adds r3, #3 8006b8a: f023 0303 bic.w r3, r3, #3 8006b8e: 4618 mov r0, r3 8006b90: 88b9 ldrh r1, [r7, #4] 8006b92: 88ba ldrh r2, [r7, #4] 8006b94: 2300 movs r3, #0 8006b96: 9301 str r3, [sp, #4] 8006b98: 887b ldrh r3, [r7, #2] 8006b9a: 9300 str r3, [sp, #0] 8006b9c: 460b mov r3, r1 8006b9e: 4601 mov r1, r0 8006ba0: 6a78 ldr r0, [r7, #36] ; 0x24 8006ba2: f7ff ff09 bl 80069b8 length, length, type, 0); LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned", 8006ba6: 6a7b ldr r3, [r7, #36] ; 0x24 8006ba8: 685b ldr r3, [r3, #4] 8006baa: f003 0303 and.w r3, r3, #3 8006bae: 2b00 cmp r3, #0 8006bb0: d010 beq.n 8006bd4 8006bb2: 4b0b ldr r3, [pc, #44] ; (8006be0 ) 8006bb4: f44f 7291 mov.w r2, #290 ; 0x122 8006bb8: 490d ldr r1, [pc, #52] ; (8006bf0 ) 8006bba: 480b ldr r0, [pc, #44] ; (8006be8 ) 8006bbc: f00a f804 bl 8010bc8 ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); break; 8006bc0: e008 b.n 8006bd4 } default: LWIP_ASSERT("pbuf_alloc: erroneous type", 0); 8006bc2: 4b07 ldr r3, [pc, #28] ; (8006be0 ) 8006bc4: f240 1227 movw r2, #295 ; 0x127 8006bc8: 490a ldr r1, [pc, #40] ; (8006bf4 ) 8006bca: 4807 ldr r0, [pc, #28] ; (8006be8 ) 8006bcc: f009 fffc bl 8010bc8 return NULL; 8006bd0: 2300 movs r3, #0 8006bd2: e001 b.n 8006bd8 break; 8006bd4: bf00 nop } LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p)); return p; 8006bd6: 6a7b ldr r3, [r7, #36] ; 0x24 } 8006bd8: 4618 mov r0, r3 8006bda: 3728 adds r7, #40 ; 0x28 8006bdc: 46bd mov sp, r7 8006bde: bd80 pop {r7, pc} 8006be0: 08012508 .word 0x08012508 8006be4: 08012538 .word 0x08012538 8006be8: 08012568 .word 0x08012568 8006bec: 08012590 .word 0x08012590 8006bf0: 080125c4 .word 0x080125c4 8006bf4: 080125f0 .word 0x080125f0 08006bf8 : * * @return the allocated pbuf. */ struct pbuf * pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type) { 8006bf8: b580 push {r7, lr} 8006bfa: b086 sub sp, #24 8006bfc: af02 add r7, sp, #8 8006bfe: 6078 str r0, [r7, #4] 8006c00: 460b mov r3, r1 8006c02: 807b strh r3, [r7, #2] 8006c04: 4613 mov r3, r2 8006c06: 803b strh r3, [r7, #0] struct pbuf *p; LWIP_ASSERT("invalid pbuf_type", (type == PBUF_REF) || (type == PBUF_ROM)); 8006c08: 883b ldrh r3, [r7, #0] 8006c0a: 2b41 cmp r3, #65 ; 0x41 8006c0c: d009 beq.n 8006c22 8006c0e: 883b ldrh r3, [r7, #0] 8006c10: 2b01 cmp r3, #1 8006c12: d006 beq.n 8006c22 8006c14: 4b0f ldr r3, [pc, #60] ; (8006c54 ) 8006c16: f44f 72a5 mov.w r2, #330 ; 0x14a 8006c1a: 490f ldr r1, [pc, #60] ; (8006c58 ) 8006c1c: 480f ldr r0, [pc, #60] ; (8006c5c ) 8006c1e: f009 ffd3 bl 8010bc8 /* only allocate memory for the pbuf structure */ p = (struct pbuf *)memp_malloc(MEMP_PBUF); 8006c22: 2007 movs r0, #7 8006c24: f7ff f9fa bl 800601c 8006c28: 60f8 str r0, [r7, #12] if (p == NULL) { 8006c2a: 68fb ldr r3, [r7, #12] 8006c2c: 2b00 cmp r3, #0 8006c2e: d101 bne.n 8006c34 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; 8006c30: 2300 movs r3, #0 8006c32: e00b b.n 8006c4c } pbuf_init_alloced_pbuf(p, payload, length, length, type, 0); 8006c34: 8879 ldrh r1, [r7, #2] 8006c36: 887a ldrh r2, [r7, #2] 8006c38: 2300 movs r3, #0 8006c3a: 9301 str r3, [sp, #4] 8006c3c: 883b ldrh r3, [r7, #0] 8006c3e: 9300 str r3, [sp, #0] 8006c40: 460b mov r3, r1 8006c42: 6879 ldr r1, [r7, #4] 8006c44: 68f8 ldr r0, [r7, #12] 8006c46: f7ff feb7 bl 80069b8 return p; 8006c4a: 68fb ldr r3, [r7, #12] } 8006c4c: 4618 mov r0, r3 8006c4e: 3710 adds r7, #16 8006c50: 46bd mov sp, r7 8006c52: bd80 pop {r7, pc} 8006c54: 08012508 .word 0x08012508 8006c58: 0801260c .word 0x0801260c 8006c5c: 08012568 .word 0x08012568 08006c60 : * 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) { 8006c60: b580 push {r7, lr} 8006c62: b088 sub sp, #32 8006c64: af02 add r7, sp, #8 8006c66: 607b str r3, [r7, #4] 8006c68: 4603 mov r3, r0 8006c6a: 73fb strb r3, [r7, #15] 8006c6c: 460b mov r3, r1 8006c6e: 81bb strh r3, [r7, #12] 8006c70: 4613 mov r3, r2 8006c72: 817b strh r3, [r7, #10] u16_t offset = (u16_t)l; 8006c74: 7bfb ldrb r3, [r7, #15] 8006c76: 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) { 8006c78: 8a7b ldrh r3, [r7, #18] 8006c7a: 3303 adds r3, #3 8006c7c: f023 0203 bic.w r2, r3, #3 8006c80: 89bb ldrh r3, [r7, #12] 8006c82: 441a add r2, r3 8006c84: 8cbb ldrh r3, [r7, #36] ; 0x24 8006c86: 429a cmp r2, r3 8006c88: d901 bls.n 8006c8e LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_WARNING, ("pbuf_alloced_custom(length=%"U16_F") buffer too short\n", length)); return NULL; 8006c8a: 2300 movs r3, #0 8006c8c: e018 b.n 8006cc0 } if (payload_mem != NULL) { 8006c8e: 6a3b ldr r3, [r7, #32] 8006c90: 2b00 cmp r3, #0 8006c92: d007 beq.n 8006ca4 payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset); 8006c94: 8a7b ldrh r3, [r7, #18] 8006c96: 3303 adds r3, #3 8006c98: f023 0303 bic.w r3, r3, #3 8006c9c: 6a3a ldr r2, [r7, #32] 8006c9e: 4413 add r3, r2 8006ca0: 617b str r3, [r7, #20] 8006ca2: e001 b.n 8006ca8 } else { payload = NULL; 8006ca4: 2300 movs r3, #0 8006ca6: 617b str r3, [r7, #20] } pbuf_init_alloced_pbuf(&p->pbuf, payload, length, length, type, PBUF_FLAG_IS_CUSTOM); 8006ca8: 6878 ldr r0, [r7, #4] 8006caa: 89b9 ldrh r1, [r7, #12] 8006cac: 89ba ldrh r2, [r7, #12] 8006cae: 2302 movs r3, #2 8006cb0: 9301 str r3, [sp, #4] 8006cb2: 897b ldrh r3, [r7, #10] 8006cb4: 9300 str r3, [sp, #0] 8006cb6: 460b mov r3, r1 8006cb8: 6979 ldr r1, [r7, #20] 8006cba: f7ff fe7d bl 80069b8 return &p->pbuf; 8006cbe: 687b ldr r3, [r7, #4] } 8006cc0: 4618 mov r0, r3 8006cc2: 3718 adds r7, #24 8006cc4: 46bd mov sp, r7 8006cc6: bd80 pop {r7, pc} 08006cc8 : * * @note Despite its name, pbuf_realloc cannot grow the size of a pbuf (chain). */ void pbuf_realloc(struct pbuf *p, u16_t new_len) { 8006cc8: b580 push {r7, lr} 8006cca: b084 sub sp, #16 8006ccc: af00 add r7, sp, #0 8006cce: 6078 str r0, [r7, #4] 8006cd0: 460b mov r3, r1 8006cd2: 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); 8006cd4: 687b ldr r3, [r7, #4] 8006cd6: 2b00 cmp r3, #0 8006cd8: d106 bne.n 8006ce8 8006cda: 4b3a ldr r3, [pc, #232] ; (8006dc4 ) 8006cdc: f44f 72cc mov.w r2, #408 ; 0x198 8006ce0: 4939 ldr r1, [pc, #228] ; (8006dc8 ) 8006ce2: 483a ldr r0, [pc, #232] ; (8006dcc ) 8006ce4: f009 ff70 bl 8010bc8 /* desired length larger than current length? */ if (new_len >= p->tot_len) { 8006ce8: 687b ldr r3, [r7, #4] 8006cea: 891b ldrh r3, [r3, #8] 8006cec: 887a ldrh r2, [r7, #2] 8006cee: 429a cmp r2, r3 8006cf0: d263 bcs.n 8006dba 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); 8006cf2: 687b ldr r3, [r7, #4] 8006cf4: 891a ldrh r2, [r3, #8] 8006cf6: 887b ldrh r3, [r7, #2] 8006cf8: 1ad3 subs r3, r2, r3 8006cfa: 813b strh r3, [r7, #8] /* first, step over any pbufs that should remain in the chain */ rem_len = new_len; 8006cfc: 887b ldrh r3, [r7, #2] 8006cfe: 817b strh r3, [r7, #10] q = p; 8006d00: 687b ldr r3, [r7, #4] 8006d02: 60fb str r3, [r7, #12] /* should this pbuf be kept? */ while (rem_len > q->len) { 8006d04: e018 b.n 8006d38 /* decrease remaining length by pbuf length */ rem_len = (u16_t)(rem_len - q->len); 8006d06: 68fb ldr r3, [r7, #12] 8006d08: 895b ldrh r3, [r3, #10] 8006d0a: 897a ldrh r2, [r7, #10] 8006d0c: 1ad3 subs r3, r2, r3 8006d0e: 817b strh r3, [r7, #10] /* decrease total length indicator */ q->tot_len = (u16_t)(q->tot_len - shrink); 8006d10: 68fb ldr r3, [r7, #12] 8006d12: 891a ldrh r2, [r3, #8] 8006d14: 893b ldrh r3, [r7, #8] 8006d16: 1ad3 subs r3, r2, r3 8006d18: b29a uxth r2, r3 8006d1a: 68fb ldr r3, [r7, #12] 8006d1c: 811a strh r2, [r3, #8] /* proceed to next pbuf in chain */ q = q->next; 8006d1e: 68fb ldr r3, [r7, #12] 8006d20: 681b ldr r3, [r3, #0] 8006d22: 60fb str r3, [r7, #12] LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL); 8006d24: 68fb ldr r3, [r7, #12] 8006d26: 2b00 cmp r3, #0 8006d28: d106 bne.n 8006d38 8006d2a: 4b26 ldr r3, [pc, #152] ; (8006dc4 ) 8006d2c: f240 12af movw r2, #431 ; 0x1af 8006d30: 4927 ldr r1, [pc, #156] ; (8006dd0 ) 8006d32: 4826 ldr r0, [pc, #152] ; (8006dcc ) 8006d34: f009 ff48 bl 8010bc8 while (rem_len > q->len) { 8006d38: 68fb ldr r3, [r7, #12] 8006d3a: 895b ldrh r3, [r3, #10] 8006d3c: 897a ldrh r2, [r7, #10] 8006d3e: 429a cmp r2, r3 8006d40: d8e1 bhi.n 8006d06 /* 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) 8006d42: 68fb ldr r3, [r7, #12] 8006d44: 7b1b ldrb r3, [r3, #12] 8006d46: f003 030f and.w r3, r3, #15 8006d4a: 2b00 cmp r3, #0 8006d4c: d121 bne.n 8006d92 8006d4e: 68fb ldr r3, [r7, #12] 8006d50: 895b ldrh r3, [r3, #10] 8006d52: 897a ldrh r2, [r7, #10] 8006d54: 429a cmp r2, r3 8006d56: d01c beq.n 8006d92 #if LWIP_SUPPORT_CUSTOM_PBUF && ((q->flags & PBUF_FLAG_IS_CUSTOM) == 0) 8006d58: 68fb ldr r3, [r7, #12] 8006d5a: 7b5b ldrb r3, [r3, #13] 8006d5c: f003 0302 and.w r3, r3, #2 8006d60: 2b00 cmp r3, #0 8006d62: d116 bne.n 8006d92 #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)); 8006d64: 68fb ldr r3, [r7, #12] 8006d66: 685a ldr r2, [r3, #4] 8006d68: 68fb ldr r3, [r7, #12] 8006d6a: 1ad3 subs r3, r2, r3 8006d6c: b29a uxth r2, r3 8006d6e: 897b ldrh r3, [r7, #10] 8006d70: 4413 add r3, r2 8006d72: b29b uxth r3, r3 8006d74: 4619 mov r1, r3 8006d76: 68f8 ldr r0, [r7, #12] 8006d78: f7fe fea6 bl 8005ac8 8006d7c: 60f8 str r0, [r7, #12] LWIP_ASSERT("mem_trim returned q == NULL", q != NULL); 8006d7e: 68fb ldr r3, [r7, #12] 8006d80: 2b00 cmp r3, #0 8006d82: d106 bne.n 8006d92 8006d84: 4b0f ldr r3, [pc, #60] ; (8006dc4 ) 8006d86: f240 12bd movw r2, #445 ; 0x1bd 8006d8a: 4912 ldr r1, [pc, #72] ; (8006dd4 ) 8006d8c: 480f ldr r0, [pc, #60] ; (8006dcc ) 8006d8e: f009 ff1b bl 8010bc8 } /* adjust length fields for new last pbuf */ q->len = rem_len; 8006d92: 68fb ldr r3, [r7, #12] 8006d94: 897a ldrh r2, [r7, #10] 8006d96: 815a strh r2, [r3, #10] q->tot_len = q->len; 8006d98: 68fb ldr r3, [r7, #12] 8006d9a: 895a ldrh r2, [r3, #10] 8006d9c: 68fb ldr r3, [r7, #12] 8006d9e: 811a strh r2, [r3, #8] /* any remaining pbufs in chain? */ if (q->next != NULL) { 8006da0: 68fb ldr r3, [r7, #12] 8006da2: 681b ldr r3, [r3, #0] 8006da4: 2b00 cmp r3, #0 8006da6: d004 beq.n 8006db2 /* free remaining pbufs in chain */ pbuf_free(q->next); 8006da8: 68fb ldr r3, [r7, #12] 8006daa: 681b ldr r3, [r3, #0] 8006dac: 4618 mov r0, r3 8006dae: f000 f911 bl 8006fd4 } /* q is last packet in chain */ q->next = NULL; 8006db2: 68fb ldr r3, [r7, #12] 8006db4: 2200 movs r2, #0 8006db6: 601a str r2, [r3, #0] 8006db8: e000 b.n 8006dbc return; 8006dba: bf00 nop } 8006dbc: 3710 adds r7, #16 8006dbe: 46bd mov sp, r7 8006dc0: bd80 pop {r7, pc} 8006dc2: bf00 nop 8006dc4: 08012508 .word 0x08012508 8006dc8: 08012620 .word 0x08012620 8006dcc: 08012568 .word 0x08012568 8006dd0: 08012638 .word 0x08012638 8006dd4: 08012650 .word 0x08012650 08006dd8 : * @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) { 8006dd8: b580 push {r7, lr} 8006dda: b086 sub sp, #24 8006ddc: af00 add r7, sp, #0 8006dde: 60f8 str r0, [r7, #12] 8006de0: 60b9 str r1, [r7, #8] 8006de2: 4613 mov r3, r2 8006de4: 71fb strb r3, [r7, #7] u16_t type_internal; void *payload; u16_t increment_magnitude; LWIP_ASSERT("p != NULL", p != NULL); 8006de6: 68fb ldr r3, [r7, #12] 8006de8: 2b00 cmp r3, #0 8006dea: d106 bne.n 8006dfa 8006dec: 4b2b ldr r3, [pc, #172] ; (8006e9c ) 8006dee: f240 12df movw r2, #479 ; 0x1df 8006df2: 492b ldr r1, [pc, #172] ; (8006ea0 ) 8006df4: 482b ldr r0, [pc, #172] ; (8006ea4 ) 8006df6: f009 fee7 bl 8010bc8 if ((p == NULL) || (header_size_increment > 0xFFFF)) { 8006dfa: 68fb ldr r3, [r7, #12] 8006dfc: 2b00 cmp r3, #0 8006dfe: d003 beq.n 8006e08 8006e00: 68bb ldr r3, [r7, #8] 8006e02: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 8006e06: d301 bcc.n 8006e0c return 1; 8006e08: 2301 movs r3, #1 8006e0a: e043 b.n 8006e94 } if (header_size_increment == 0) { 8006e0c: 68bb ldr r3, [r7, #8] 8006e0e: 2b00 cmp r3, #0 8006e10: d101 bne.n 8006e16 return 0; 8006e12: 2300 movs r3, #0 8006e14: e03e b.n 8006e94 } increment_magnitude = (u16_t)header_size_increment; 8006e16: 68bb ldr r3, [r7, #8] 8006e18: 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) { 8006e1a: 68fb ldr r3, [r7, #12] 8006e1c: 891a ldrh r2, [r3, #8] 8006e1e: 8a7b ldrh r3, [r7, #18] 8006e20: 4413 add r3, r2 8006e22: b29b uxth r3, r3 8006e24: 8a7a ldrh r2, [r7, #18] 8006e26: 429a cmp r2, r3 8006e28: d901 bls.n 8006e2e return 1; 8006e2a: 2301 movs r3, #1 8006e2c: e032 b.n 8006e94 } type_internal = p->type_internal; 8006e2e: 68fb ldr r3, [r7, #12] 8006e30: 7b1b ldrb r3, [r3, #12] 8006e32: 823b strh r3, [r7, #16] /* pbuf types containing payloads? */ if (type_internal & PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS) { 8006e34: 8a3b ldrh r3, [r7, #16] 8006e36: f003 0380 and.w r3, r3, #128 ; 0x80 8006e3a: 2b00 cmp r3, #0 8006e3c: d00c beq.n 8006e58 /* set new payload pointer */ payload = (u8_t *)p->payload - header_size_increment; 8006e3e: 68fb ldr r3, [r7, #12] 8006e40: 685a ldr r2, [r3, #4] 8006e42: 68bb ldr r3, [r7, #8] 8006e44: 425b negs r3, r3 8006e46: 4413 add r3, r2 8006e48: 617b str r3, [r7, #20] /* boundary check fails? */ if ((u8_t *)payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) { 8006e4a: 68fb ldr r3, [r7, #12] 8006e4c: 3310 adds r3, #16 8006e4e: 697a ldr r2, [r7, #20] 8006e50: 429a cmp r2, r3 8006e52: d20d bcs.n 8006e70 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; 8006e54: 2301 movs r3, #1 8006e56: e01d b.n 8006e94 } /* pbuf types referring to external payloads? */ } else { /* hide a header in the payload? */ if (force) { 8006e58: 79fb ldrb r3, [r7, #7] 8006e5a: 2b00 cmp r3, #0 8006e5c: d006 beq.n 8006e6c payload = (u8_t *)p->payload - header_size_increment; 8006e5e: 68fb ldr r3, [r7, #12] 8006e60: 685a ldr r2, [r3, #4] 8006e62: 68bb ldr r3, [r7, #8] 8006e64: 425b negs r3, r3 8006e66: 4413 add r3, r2 8006e68: 617b str r3, [r7, #20] 8006e6a: e001 b.n 8006e70 } else { /* cannot expand payload to front (yet!) * bail out unsuccessfully */ return 1; 8006e6c: 2301 movs r3, #1 8006e6e: e011 b.n 8006e94 } 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; 8006e70: 68fb ldr r3, [r7, #12] 8006e72: 697a ldr r2, [r7, #20] 8006e74: 605a str r2, [r3, #4] p->len = (u16_t)(p->len + increment_magnitude); 8006e76: 68fb ldr r3, [r7, #12] 8006e78: 895a ldrh r2, [r3, #10] 8006e7a: 8a7b ldrh r3, [r7, #18] 8006e7c: 4413 add r3, r2 8006e7e: b29a uxth r2, r3 8006e80: 68fb ldr r3, [r7, #12] 8006e82: 815a strh r2, [r3, #10] p->tot_len = (u16_t)(p->tot_len + increment_magnitude); 8006e84: 68fb ldr r3, [r7, #12] 8006e86: 891a ldrh r2, [r3, #8] 8006e88: 8a7b ldrh r3, [r7, #18] 8006e8a: 4413 add r3, r2 8006e8c: b29a uxth r2, r3 8006e8e: 68fb ldr r3, [r7, #12] 8006e90: 811a strh r2, [r3, #8] return 0; 8006e92: 2300 movs r3, #0 } 8006e94: 4618 mov r0, r3 8006e96: 3718 adds r7, #24 8006e98: 46bd mov sp, r7 8006e9a: bd80 pop {r7, pc} 8006e9c: 08012508 .word 0x08012508 8006ea0: 0801266c .word 0x0801266c 8006ea4: 08012568 .word 0x08012568 08006ea8 : * @return non-zero on failure, zero on success. * */ u8_t pbuf_add_header(struct pbuf *p, size_t header_size_increment) { 8006ea8: b580 push {r7, lr} 8006eaa: b082 sub sp, #8 8006eac: af00 add r7, sp, #0 8006eae: 6078 str r0, [r7, #4] 8006eb0: 6039 str r1, [r7, #0] return pbuf_add_header_impl(p, header_size_increment, 0); 8006eb2: 2200 movs r2, #0 8006eb4: 6839 ldr r1, [r7, #0] 8006eb6: 6878 ldr r0, [r7, #4] 8006eb8: f7ff ff8e bl 8006dd8 8006ebc: 4603 mov r3, r0 } 8006ebe: 4618 mov r0, r3 8006ec0: 3708 adds r7, #8 8006ec2: 46bd mov sp, r7 8006ec4: bd80 pop {r7, pc} ... 08006ec8 : * @return non-zero on failure, zero on success. * */ u8_t pbuf_remove_header(struct pbuf *p, size_t header_size_decrement) { 8006ec8: b580 push {r7, lr} 8006eca: b084 sub sp, #16 8006ecc: af00 add r7, sp, #0 8006ece: 6078 str r0, [r7, #4] 8006ed0: 6039 str r1, [r7, #0] void *payload; u16_t increment_magnitude; LWIP_ASSERT("p != NULL", p != NULL); 8006ed2: 687b ldr r3, [r7, #4] 8006ed4: 2b00 cmp r3, #0 8006ed6: d106 bne.n 8006ee6 8006ed8: 4b20 ldr r3, [pc, #128] ; (8006f5c ) 8006eda: f240 224b movw r2, #587 ; 0x24b 8006ede: 4920 ldr r1, [pc, #128] ; (8006f60 ) 8006ee0: 4820 ldr r0, [pc, #128] ; (8006f64 ) 8006ee2: f009 fe71 bl 8010bc8 if ((p == NULL) || (header_size_decrement > 0xFFFF)) { 8006ee6: 687b ldr r3, [r7, #4] 8006ee8: 2b00 cmp r3, #0 8006eea: d003 beq.n 8006ef4 8006eec: 683b ldr r3, [r7, #0] 8006eee: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 8006ef2: d301 bcc.n 8006ef8 return 1; 8006ef4: 2301 movs r3, #1 8006ef6: e02c b.n 8006f52 } if (header_size_decrement == 0) { 8006ef8: 683b ldr r3, [r7, #0] 8006efa: 2b00 cmp r3, #0 8006efc: d101 bne.n 8006f02 return 0; 8006efe: 2300 movs r3, #0 8006f00: e027 b.n 8006f52 } increment_magnitude = (u16_t)header_size_decrement; 8006f02: 683b ldr r3, [r7, #0] 8006f04: 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;); 8006f06: 687b ldr r3, [r7, #4] 8006f08: 895b ldrh r3, [r3, #10] 8006f0a: 89fa ldrh r2, [r7, #14] 8006f0c: 429a cmp r2, r3 8006f0e: d908 bls.n 8006f22 8006f10: 4b12 ldr r3, [pc, #72] ; (8006f5c ) 8006f12: f240 2255 movw r2, #597 ; 0x255 8006f16: 4914 ldr r1, [pc, #80] ; (8006f68 ) 8006f18: 4812 ldr r0, [pc, #72] ; (8006f64 ) 8006f1a: f009 fe55 bl 8010bc8 8006f1e: 2301 movs r3, #1 8006f20: e017 b.n 8006f52 /* remember current payload pointer */ payload = p->payload; 8006f22: 687b ldr r3, [r7, #4] 8006f24: 685b ldr r3, [r3, #4] 8006f26: 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; 8006f28: 687b ldr r3, [r7, #4] 8006f2a: 685a ldr r2, [r3, #4] 8006f2c: 683b ldr r3, [r7, #0] 8006f2e: 441a add r2, r3 8006f30: 687b ldr r3, [r7, #4] 8006f32: 605a str r2, [r3, #4] /* modify pbuf length fields */ p->len = (u16_t)(p->len - increment_magnitude); 8006f34: 687b ldr r3, [r7, #4] 8006f36: 895a ldrh r2, [r3, #10] 8006f38: 89fb ldrh r3, [r7, #14] 8006f3a: 1ad3 subs r3, r2, r3 8006f3c: b29a uxth r2, r3 8006f3e: 687b ldr r3, [r7, #4] 8006f40: 815a strh r2, [r3, #10] p->tot_len = (u16_t)(p->tot_len - increment_magnitude); 8006f42: 687b ldr r3, [r7, #4] 8006f44: 891a ldrh r2, [r3, #8] 8006f46: 89fb ldrh r3, [r7, #14] 8006f48: 1ad3 subs r3, r2, r3 8006f4a: b29a uxth r2, r3 8006f4c: 687b ldr r3, [r7, #4] 8006f4e: 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; 8006f50: 2300 movs r3, #0 } 8006f52: 4618 mov r0, r3 8006f54: 3710 adds r7, #16 8006f56: 46bd mov sp, r7 8006f58: bd80 pop {r7, pc} 8006f5a: bf00 nop 8006f5c: 08012508 .word 0x08012508 8006f60: 0801266c .word 0x0801266c 8006f64: 08012568 .word 0x08012568 8006f68: 08012678 .word 0x08012678 08006f6c : static u8_t pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force) { 8006f6c: b580 push {r7, lr} 8006f6e: b082 sub sp, #8 8006f70: af00 add r7, sp, #0 8006f72: 6078 str r0, [r7, #4] 8006f74: 460b mov r3, r1 8006f76: 807b strh r3, [r7, #2] 8006f78: 4613 mov r3, r2 8006f7a: 707b strb r3, [r7, #1] if (header_size_increment < 0) { 8006f7c: f9b7 3002 ldrsh.w r3, [r7, #2] 8006f80: 2b00 cmp r3, #0 8006f82: da08 bge.n 8006f96 return pbuf_remove_header(p, (size_t) - header_size_increment); 8006f84: f9b7 3002 ldrsh.w r3, [r7, #2] 8006f88: 425b negs r3, r3 8006f8a: 4619 mov r1, r3 8006f8c: 6878 ldr r0, [r7, #4] 8006f8e: f7ff ff9b bl 8006ec8 8006f92: 4603 mov r3, r0 8006f94: e007 b.n 8006fa6 } else { return pbuf_add_header_impl(p, (size_t)header_size_increment, force); 8006f96: f9b7 3002 ldrsh.w r3, [r7, #2] 8006f9a: 787a ldrb r2, [r7, #1] 8006f9c: 4619 mov r1, r3 8006f9e: 6878 ldr r0, [r7, #4] 8006fa0: f7ff ff1a bl 8006dd8 8006fa4: 4603 mov r3, r0 } } 8006fa6: 4618 mov r0, r3 8006fa8: 3708 adds r7, #8 8006faa: 46bd mov sp, r7 8006fac: bd80 pop {r7, pc} 08006fae : * 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) { 8006fae: b580 push {r7, lr} 8006fb0: b082 sub sp, #8 8006fb2: af00 add r7, sp, #0 8006fb4: 6078 str r0, [r7, #4] 8006fb6: 460b mov r3, r1 8006fb8: 807b strh r3, [r7, #2] return pbuf_header_impl(p, header_size_increment, 1); 8006fba: f9b7 3002 ldrsh.w r3, [r7, #2] 8006fbe: 2201 movs r2, #1 8006fc0: 4619 mov r1, r3 8006fc2: 6878 ldr r0, [r7, #4] 8006fc4: f7ff ffd2 bl 8006f6c 8006fc8: 4603 mov r3, r0 } 8006fca: 4618 mov r0, r3 8006fcc: 3708 adds r7, #8 8006fce: 46bd mov sp, r7 8006fd0: bd80 pop {r7, pc} ... 08006fd4 : * 1->1->1 becomes ....... * */ u8_t pbuf_free(struct pbuf *p) { 8006fd4: b580 push {r7, lr} 8006fd6: b086 sub sp, #24 8006fd8: af00 add r7, sp, #0 8006fda: 6078 str r0, [r7, #4] u8_t alloc_src; struct pbuf *q; u8_t count; if (p == NULL) { 8006fdc: 687b ldr r3, [r7, #4] 8006fde: 2b00 cmp r3, #0 8006fe0: d10b bne.n 8006ffa LWIP_ASSERT("p != NULL", p != NULL); 8006fe2: 687b ldr r3, [r7, #4] 8006fe4: 2b00 cmp r3, #0 8006fe6: d106 bne.n 8006ff6 8006fe8: 4b38 ldr r3, [pc, #224] ; (80070cc ) 8006fea: f44f 7237 mov.w r2, #732 ; 0x2dc 8006fee: 4938 ldr r1, [pc, #224] ; (80070d0 ) 8006ff0: 4838 ldr r0, [pc, #224] ; (80070d4 ) 8006ff2: f009 fde9 bl 8010bc8 /* 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; 8006ff6: 2300 movs r3, #0 8006ff8: e063 b.n 80070c2 } LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free(%p)\n", (void *)p)); PERF_START; count = 0; 8006ffa: 2300 movs r3, #0 8006ffc: 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) { 8006ffe: e05c b.n 80070ba /* 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); 8007000: 687b ldr r3, [r7, #4] 8007002: 7b9b ldrb r3, [r3, #14] 8007004: 2b00 cmp r3, #0 8007006: d106 bne.n 8007016 8007008: 4b30 ldr r3, [pc, #192] ; (80070cc ) 800700a: f240 22f1 movw r2, #753 ; 0x2f1 800700e: 4932 ldr r1, [pc, #200] ; (80070d8 ) 8007010: 4830 ldr r0, [pc, #192] ; (80070d4 ) 8007012: f009 fdd9 bl 8010bc8 /* decrease reference count (number of pointers to pbuf) */ ref = --(p->ref); 8007016: 687b ldr r3, [r7, #4] 8007018: 7b9b ldrb r3, [r3, #14] 800701a: 3b01 subs r3, #1 800701c: b2da uxtb r2, r3 800701e: 687b ldr r3, [r7, #4] 8007020: 739a strb r2, [r3, #14] 8007022: 687b ldr r3, [r7, #4] 8007024: 7b9b ldrb r3, [r3, #14] 8007026: 75bb strb r3, [r7, #22] SYS_ARCH_UNPROTECT(old_level); /* this pbuf is no longer referenced to? */ if (ref == 0) { 8007028: 7dbb ldrb r3, [r7, #22] 800702a: 2b00 cmp r3, #0 800702c: d143 bne.n 80070b6 /* remember next pbuf in chain for next iteration */ q = p->next; 800702e: 687b ldr r3, [r7, #4] 8007030: 681b ldr r3, [r3, #0] 8007032: 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); 8007034: 687b ldr r3, [r7, #4] 8007036: 7b1b ldrb r3, [r3, #12] 8007038: f003 030f and.w r3, r3, #15 800703c: 73fb strb r3, [r7, #15] #if LWIP_SUPPORT_CUSTOM_PBUF /* is this a custom pbuf? */ if ((p->flags & PBUF_FLAG_IS_CUSTOM) != 0) { 800703e: 687b ldr r3, [r7, #4] 8007040: 7b5b ldrb r3, [r3, #13] 8007042: f003 0302 and.w r3, r3, #2 8007046: 2b00 cmp r3, #0 8007048: d011 beq.n 800706e struct pbuf_custom *pc = (struct pbuf_custom *)p; 800704a: 687b ldr r3, [r7, #4] 800704c: 60bb str r3, [r7, #8] LWIP_ASSERT("pc->custom_free_function != NULL", pc->custom_free_function != NULL); 800704e: 68bb ldr r3, [r7, #8] 8007050: 691b ldr r3, [r3, #16] 8007052: 2b00 cmp r3, #0 8007054: d106 bne.n 8007064 8007056: 4b1d ldr r3, [pc, #116] ; (80070cc ) 8007058: f240 22ff movw r2, #767 ; 0x2ff 800705c: 491f ldr r1, [pc, #124] ; (80070dc ) 800705e: 481d ldr r0, [pc, #116] ; (80070d4 ) 8007060: f009 fdb2 bl 8010bc8 pc->custom_free_function(p); 8007064: 68bb ldr r3, [r7, #8] 8007066: 691b ldr r3, [r3, #16] 8007068: 6878 ldr r0, [r7, #4] 800706a: 4798 blx r3 800706c: e01d b.n 80070aa } 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) { 800706e: 7bfb ldrb r3, [r7, #15] 8007070: 2b02 cmp r3, #2 8007072: d104 bne.n 800707e memp_free(MEMP_PBUF_POOL, p); 8007074: 6879 ldr r1, [r7, #4] 8007076: 2008 movs r0, #8 8007078: f7ff f840 bl 80060fc 800707c: e015 b.n 80070aa /* is this a ROM or RAM referencing pbuf? */ } else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF) { 800707e: 7bfb ldrb r3, [r7, #15] 8007080: 2b01 cmp r3, #1 8007082: d104 bne.n 800708e memp_free(MEMP_PBUF, p); 8007084: 6879 ldr r1, [r7, #4] 8007086: 2007 movs r0, #7 8007088: f7ff f838 bl 80060fc 800708c: e00d b.n 80070aa /* type == PBUF_RAM */ } else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) { 800708e: 7bfb ldrb r3, [r7, #15] 8007090: 2b00 cmp r3, #0 8007092: d103 bne.n 800709c mem_free(p); 8007094: 6878 ldr r0, [r7, #4] 8007096: f7fe fc99 bl 80059cc 800709a: e006 b.n 80070aa } else { /* @todo: support freeing other types */ LWIP_ASSERT("invalid pbuf type", 0); 800709c: 4b0b ldr r3, [pc, #44] ; (80070cc ) 800709e: f240 320f movw r2, #783 ; 0x30f 80070a2: 490f ldr r1, [pc, #60] ; (80070e0 ) 80070a4: 480b ldr r0, [pc, #44] ; (80070d4 ) 80070a6: f009 fd8f bl 8010bc8 } } count++; 80070aa: 7dfb ldrb r3, [r7, #23] 80070ac: 3301 adds r3, #1 80070ae: 75fb strb r3, [r7, #23] /* proceed to next pbuf */ p = q; 80070b0: 693b ldr r3, [r7, #16] 80070b2: 607b str r3, [r7, #4] 80070b4: e001 b.n 80070ba /* 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; 80070b6: 2300 movs r3, #0 80070b8: 607b str r3, [r7, #4] while (p != NULL) { 80070ba: 687b ldr r3, [r7, #4] 80070bc: 2b00 cmp r3, #0 80070be: d19f bne.n 8007000 } } PERF_STOP("pbuf_free"); /* return number of de-allocated pbufs */ return count; 80070c0: 7dfb ldrb r3, [r7, #23] } 80070c2: 4618 mov r0, r3 80070c4: 3718 adds r7, #24 80070c6: 46bd mov sp, r7 80070c8: bd80 pop {r7, pc} 80070ca: bf00 nop 80070cc: 08012508 .word 0x08012508 80070d0: 0801266c .word 0x0801266c 80070d4: 08012568 .word 0x08012568 80070d8: 08012698 .word 0x08012698 80070dc: 080126b0 .word 0x080126b0 80070e0: 080126d4 .word 0x080126d4 080070e4 : * @param p first pbuf of chain * @return the number of pbufs in a chain */ u16_t pbuf_clen(const struct pbuf *p) { 80070e4: b480 push {r7} 80070e6: b085 sub sp, #20 80070e8: af00 add r7, sp, #0 80070ea: 6078 str r0, [r7, #4] u16_t len; len = 0; 80070ec: 2300 movs r3, #0 80070ee: 81fb strh r3, [r7, #14] while (p != NULL) { 80070f0: e005 b.n 80070fe ++len; 80070f2: 89fb ldrh r3, [r7, #14] 80070f4: 3301 adds r3, #1 80070f6: 81fb strh r3, [r7, #14] p = p->next; 80070f8: 687b ldr r3, [r7, #4] 80070fa: 681b ldr r3, [r3, #0] 80070fc: 607b str r3, [r7, #4] while (p != NULL) { 80070fe: 687b ldr r3, [r7, #4] 8007100: 2b00 cmp r3, #0 8007102: d1f6 bne.n 80070f2 } return len; 8007104: 89fb ldrh r3, [r7, #14] } 8007106: 4618 mov r0, r3 8007108: 3714 adds r7, #20 800710a: 46bd mov sp, r7 800710c: f85d 7b04 ldr.w r7, [sp], #4 8007110: 4770 bx lr ... 08007114 : * @param p pbuf to increase reference counter of * */ void pbuf_ref(struct pbuf *p) { 8007114: b580 push {r7, lr} 8007116: b082 sub sp, #8 8007118: af00 add r7, sp, #0 800711a: 6078 str r0, [r7, #4] /* pbuf given? */ if (p != NULL) { 800711c: 687b ldr r3, [r7, #4] 800711e: 2b00 cmp r3, #0 8007120: d010 beq.n 8007144 SYS_ARCH_SET(p->ref, (LWIP_PBUF_REF_T)(p->ref + 1)); 8007122: 687b ldr r3, [r7, #4] 8007124: 7b9b ldrb r3, [r3, #14] 8007126: 3301 adds r3, #1 8007128: b2da uxtb r2, r3 800712a: 687b ldr r3, [r7, #4] 800712c: 739a strb r2, [r3, #14] LWIP_ASSERT("pbuf ref overflow", p->ref > 0); 800712e: 687b ldr r3, [r7, #4] 8007130: 7b9b ldrb r3, [r3, #14] 8007132: 2b00 cmp r3, #0 8007134: d106 bne.n 8007144 8007136: 4b05 ldr r3, [pc, #20] ; (800714c ) 8007138: f240 3242 movw r2, #834 ; 0x342 800713c: 4904 ldr r1, [pc, #16] ; (8007150 ) 800713e: 4805 ldr r0, [pc, #20] ; (8007154 ) 8007140: f009 fd42 bl 8010bc8 } } 8007144: bf00 nop 8007146: 3708 adds r7, #8 8007148: 46bd mov sp, r7 800714a: bd80 pop {r7, pc} 800714c: 08012508 .word 0x08012508 8007150: 080126e8 .word 0x080126e8 8007154: 08012568 .word 0x08012568 08007158 : * * @see pbuf_chain() */ void pbuf_cat(struct pbuf *h, struct pbuf *t) { 8007158: b580 push {r7, lr} 800715a: b084 sub sp, #16 800715c: af00 add r7, sp, #0 800715e: 6078 str r0, [r7, #4] 8007160: 6039 str r1, [r7, #0] struct pbuf *p; LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)", 8007162: 687b ldr r3, [r7, #4] 8007164: 2b00 cmp r3, #0 8007166: d002 beq.n 800716e 8007168: 683b ldr r3, [r7, #0] 800716a: 2b00 cmp r3, #0 800716c: d107 bne.n 800717e 800716e: 4b20 ldr r3, [pc, #128] ; (80071f0 ) 8007170: f240 3259 movw r2, #857 ; 0x359 8007174: 491f ldr r1, [pc, #124] ; (80071f4 ) 8007176: 4820 ldr r0, [pc, #128] ; (80071f8 ) 8007178: f009 fd26 bl 8010bc8 800717c: e034 b.n 80071e8 ((h != NULL) && (t != NULL)), return;); /* proceed to last pbuf of chain */ for (p = h; p->next != NULL; p = p->next) { 800717e: 687b ldr r3, [r7, #4] 8007180: 60fb str r3, [r7, #12] 8007182: e00a b.n 800719a /* add total length of second chain to all totals of first chain */ p->tot_len = (u16_t)(p->tot_len + t->tot_len); 8007184: 68fb ldr r3, [r7, #12] 8007186: 891a ldrh r2, [r3, #8] 8007188: 683b ldr r3, [r7, #0] 800718a: 891b ldrh r3, [r3, #8] 800718c: 4413 add r3, r2 800718e: b29a uxth r2, r3 8007190: 68fb ldr r3, [r7, #12] 8007192: 811a strh r2, [r3, #8] for (p = h; p->next != NULL; p = p->next) { 8007194: 68fb ldr r3, [r7, #12] 8007196: 681b ldr r3, [r3, #0] 8007198: 60fb str r3, [r7, #12] 800719a: 68fb ldr r3, [r7, #12] 800719c: 681b ldr r3, [r3, #0] 800719e: 2b00 cmp r3, #0 80071a0: d1f0 bne.n 8007184 } /* { 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); 80071a2: 68fb ldr r3, [r7, #12] 80071a4: 891a ldrh r2, [r3, #8] 80071a6: 68fb ldr r3, [r7, #12] 80071a8: 895b ldrh r3, [r3, #10] 80071aa: 429a cmp r2, r3 80071ac: d006 beq.n 80071bc 80071ae: 4b10 ldr r3, [pc, #64] ; (80071f0 ) 80071b0: f240 3262 movw r2, #866 ; 0x362 80071b4: 4911 ldr r1, [pc, #68] ; (80071fc ) 80071b6: 4810 ldr r0, [pc, #64] ; (80071f8 ) 80071b8: f009 fd06 bl 8010bc8 LWIP_ASSERT("p->next == NULL", p->next == NULL); 80071bc: 68fb ldr r3, [r7, #12] 80071be: 681b ldr r3, [r3, #0] 80071c0: 2b00 cmp r3, #0 80071c2: d006 beq.n 80071d2 80071c4: 4b0a ldr r3, [pc, #40] ; (80071f0 ) 80071c6: f240 3263 movw r2, #867 ; 0x363 80071ca: 490d ldr r1, [pc, #52] ; (8007200 ) 80071cc: 480a ldr r0, [pc, #40] ; (80071f8 ) 80071ce: f009 fcfb bl 8010bc8 /* add total length of second chain to last pbuf total of first chain */ p->tot_len = (u16_t)(p->tot_len + t->tot_len); 80071d2: 68fb ldr r3, [r7, #12] 80071d4: 891a ldrh r2, [r3, #8] 80071d6: 683b ldr r3, [r7, #0] 80071d8: 891b ldrh r3, [r3, #8] 80071da: 4413 add r3, r2 80071dc: b29a uxth r2, r3 80071de: 68fb ldr r3, [r7, #12] 80071e0: 811a strh r2, [r3, #8] /* chain last pbuf of head (p) with first of tail (t) */ p->next = t; 80071e2: 68fb ldr r3, [r7, #12] 80071e4: 683a ldr r2, [r7, #0] 80071e6: 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. */ } 80071e8: 3710 adds r7, #16 80071ea: 46bd mov sp, r7 80071ec: bd80 pop {r7, pc} 80071ee: bf00 nop 80071f0: 08012508 .word 0x08012508 80071f4: 080126fc .word 0x080126fc 80071f8: 08012568 .word 0x08012568 80071fc: 08012734 .word 0x08012734 8007200: 08012764 .word 0x08012764 08007204 : * 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) { 8007204: b580 push {r7, lr} 8007206: b086 sub sp, #24 8007208: af00 add r7, sp, #0 800720a: 6078 str r0, [r7, #4] 800720c: 6039 str r1, [r7, #0] size_t offset_to = 0, offset_from = 0, len; 800720e: 2300 movs r3, #0 8007210: 617b str r3, [r7, #20] 8007212: 2300 movs r3, #0 8007214: 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) && 8007216: 687b ldr r3, [r7, #4] 8007218: 2b00 cmp r3, #0 800721a: d008 beq.n 800722e 800721c: 683b ldr r3, [r7, #0] 800721e: 2b00 cmp r3, #0 8007220: d005 beq.n 800722e 8007222: 687b ldr r3, [r7, #4] 8007224: 891a ldrh r2, [r3, #8] 8007226: 683b ldr r3, [r7, #0] 8007228: 891b ldrh r3, [r3, #8] 800722a: 429a cmp r2, r3 800722c: d209 bcs.n 8007242 800722e: 4b57 ldr r3, [pc, #348] ; (800738c ) 8007230: f240 32c9 movw r2, #969 ; 0x3c9 8007234: 4956 ldr r1, [pc, #344] ; (8007390 ) 8007236: 4857 ldr r0, [pc, #348] ; (8007394 ) 8007238: f009 fcc6 bl 8010bc8 800723c: f06f 030f mvn.w r3, #15 8007240: e09f b.n 8007382 (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)) { 8007242: 687b ldr r3, [r7, #4] 8007244: 895b ldrh r3, [r3, #10] 8007246: 461a mov r2, r3 8007248: 697b ldr r3, [r7, #20] 800724a: 1ad2 subs r2, r2, r3 800724c: 683b ldr r3, [r7, #0] 800724e: 895b ldrh r3, [r3, #10] 8007250: 4619 mov r1, r3 8007252: 693b ldr r3, [r7, #16] 8007254: 1acb subs r3, r1, r3 8007256: 429a cmp r2, r3 8007258: d306 bcc.n 8007268 /* complete current p_from fits into current p_to */ len = p_from->len - offset_from; 800725a: 683b ldr r3, [r7, #0] 800725c: 895b ldrh r3, [r3, #10] 800725e: 461a mov r2, r3 8007260: 693b ldr r3, [r7, #16] 8007262: 1ad3 subs r3, r2, r3 8007264: 60fb str r3, [r7, #12] 8007266: e005 b.n 8007274 } else { /* current p_from does not fit into current p_to */ len = p_to->len - offset_to; 8007268: 687b ldr r3, [r7, #4] 800726a: 895b ldrh r3, [r3, #10] 800726c: 461a mov r2, r3 800726e: 697b ldr r3, [r7, #20] 8007270: 1ad3 subs r3, r2, r3 8007272: 60fb str r3, [r7, #12] } MEMCPY((u8_t *)p_to->payload + offset_to, (u8_t *)p_from->payload + offset_from, len); 8007274: 687b ldr r3, [r7, #4] 8007276: 685a ldr r2, [r3, #4] 8007278: 697b ldr r3, [r7, #20] 800727a: 18d0 adds r0, r2, r3 800727c: 683b ldr r3, [r7, #0] 800727e: 685a ldr r2, [r3, #4] 8007280: 693b ldr r3, [r7, #16] 8007282: 4413 add r3, r2 8007284: 68fa ldr r2, [r7, #12] 8007286: 4619 mov r1, r3 8007288: f009 fe7f bl 8010f8a offset_to += len; 800728c: 697a ldr r2, [r7, #20] 800728e: 68fb ldr r3, [r7, #12] 8007290: 4413 add r3, r2 8007292: 617b str r3, [r7, #20] offset_from += len; 8007294: 693a ldr r2, [r7, #16] 8007296: 68fb ldr r3, [r7, #12] 8007298: 4413 add r3, r2 800729a: 613b str r3, [r7, #16] LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len); 800729c: 687b ldr r3, [r7, #4] 800729e: 895b ldrh r3, [r3, #10] 80072a0: 461a mov r2, r3 80072a2: 697b ldr r3, [r7, #20] 80072a4: 4293 cmp r3, r2 80072a6: d906 bls.n 80072b6 80072a8: 4b38 ldr r3, [pc, #224] ; (800738c ) 80072aa: f240 32d9 movw r2, #985 ; 0x3d9 80072ae: 493a ldr r1, [pc, #232] ; (8007398 ) 80072b0: 4838 ldr r0, [pc, #224] ; (8007394 ) 80072b2: f009 fc89 bl 8010bc8 LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); 80072b6: 683b ldr r3, [r7, #0] 80072b8: 895b ldrh r3, [r3, #10] 80072ba: 461a mov r2, r3 80072bc: 693b ldr r3, [r7, #16] 80072be: 4293 cmp r3, r2 80072c0: d906 bls.n 80072d0 80072c2: 4b32 ldr r3, [pc, #200] ; (800738c ) 80072c4: f240 32da movw r2, #986 ; 0x3da 80072c8: 4934 ldr r1, [pc, #208] ; (800739c ) 80072ca: 4832 ldr r0, [pc, #200] ; (8007394 ) 80072cc: f009 fc7c bl 8010bc8 if (offset_from >= p_from->len) { 80072d0: 683b ldr r3, [r7, #0] 80072d2: 895b ldrh r3, [r3, #10] 80072d4: 461a mov r2, r3 80072d6: 693b ldr r3, [r7, #16] 80072d8: 4293 cmp r3, r2 80072da: d304 bcc.n 80072e6 /* on to next p_from (if any) */ offset_from = 0; 80072dc: 2300 movs r3, #0 80072de: 613b str r3, [r7, #16] p_from = p_from->next; 80072e0: 683b ldr r3, [r7, #0] 80072e2: 681b ldr r3, [r3, #0] 80072e4: 603b str r3, [r7, #0] } if (offset_to == p_to->len) { 80072e6: 687b ldr r3, [r7, #4] 80072e8: 895b ldrh r3, [r3, #10] 80072ea: 461a mov r2, r3 80072ec: 697b ldr r3, [r7, #20] 80072ee: 4293 cmp r3, r2 80072f0: d114 bne.n 800731c /* on to next p_to (if any) */ offset_to = 0; 80072f2: 2300 movs r3, #0 80072f4: 617b str r3, [r7, #20] p_to = p_to->next; 80072f6: 687b ldr r3, [r7, #4] 80072f8: 681b ldr r3, [r3, #0] 80072fa: 607b str r3, [r7, #4] LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL), return ERR_ARG;); 80072fc: 687b ldr r3, [r7, #4] 80072fe: 2b00 cmp r3, #0 8007300: d10c bne.n 800731c 8007302: 683b ldr r3, [r7, #0] 8007304: 2b00 cmp r3, #0 8007306: d009 beq.n 800731c 8007308: 4b20 ldr r3, [pc, #128] ; (800738c ) 800730a: f44f 7279 mov.w r2, #996 ; 0x3e4 800730e: 4924 ldr r1, [pc, #144] ; (80073a0 ) 8007310: 4820 ldr r0, [pc, #128] ; (8007394 ) 8007312: f009 fc59 bl 8010bc8 8007316: f06f 030f mvn.w r3, #15 800731a: e032 b.n 8007382 } if ((p_from != NULL) && (p_from->len == p_from->tot_len)) { 800731c: 683b ldr r3, [r7, #0] 800731e: 2b00 cmp r3, #0 8007320: d013 beq.n 800734a 8007322: 683b ldr r3, [r7, #0] 8007324: 895a ldrh r2, [r3, #10] 8007326: 683b ldr r3, [r7, #0] 8007328: 891b ldrh r3, [r3, #8] 800732a: 429a cmp r2, r3 800732c: d10d bne.n 800734a /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!", 800732e: 683b ldr r3, [r7, #0] 8007330: 681b ldr r3, [r3, #0] 8007332: 2b00 cmp r3, #0 8007334: d009 beq.n 800734a 8007336: 4b15 ldr r3, [pc, #84] ; (800738c ) 8007338: f240 32e9 movw r2, #1001 ; 0x3e9 800733c: 4919 ldr r1, [pc, #100] ; (80073a4 ) 800733e: 4815 ldr r0, [pc, #84] ; (8007394 ) 8007340: f009 fc42 bl 8010bc8 8007344: f06f 0305 mvn.w r3, #5 8007348: e01b b.n 8007382 (p_from->next == NULL), return ERR_VAL;); } if ((p_to != NULL) && (p_to->len == p_to->tot_len)) { 800734a: 687b ldr r3, [r7, #4] 800734c: 2b00 cmp r3, #0 800734e: d013 beq.n 8007378 8007350: 687b ldr r3, [r7, #4] 8007352: 895a ldrh r2, [r3, #10] 8007354: 687b ldr r3, [r7, #4] 8007356: 891b ldrh r3, [r3, #8] 8007358: 429a cmp r2, r3 800735a: d10d bne.n 8007378 /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!", 800735c: 687b ldr r3, [r7, #4] 800735e: 681b ldr r3, [r3, #0] 8007360: 2b00 cmp r3, #0 8007362: d009 beq.n 8007378 8007364: 4b09 ldr r3, [pc, #36] ; (800738c ) 8007366: f240 32ee movw r2, #1006 ; 0x3ee 800736a: 490e ldr r1, [pc, #56] ; (80073a4 ) 800736c: 4809 ldr r0, [pc, #36] ; (8007394 ) 800736e: f009 fc2b bl 8010bc8 8007372: f06f 0305 mvn.w r3, #5 8007376: e004 b.n 8007382 (p_to->next == NULL), return ERR_VAL;); } } while (p_from); 8007378: 683b ldr r3, [r7, #0] 800737a: 2b00 cmp r3, #0 800737c: f47f af61 bne.w 8007242 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); return ERR_OK; 8007380: 2300 movs r3, #0 } 8007382: 4618 mov r0, r3 8007384: 3718 adds r7, #24 8007386: 46bd mov sp, r7 8007388: bd80 pop {r7, pc} 800738a: bf00 nop 800738c: 08012508 .word 0x08012508 8007390: 080127b0 .word 0x080127b0 8007394: 08012568 .word 0x08012568 8007398: 080127e0 .word 0x080127e0 800739c: 080127f8 .word 0x080127f8 80073a0: 08012814 .word 0x08012814 80073a4: 08012824 .word 0x08012824 080073a8 : * @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) { 80073a8: b580 push {r7, lr} 80073aa: b088 sub sp, #32 80073ac: af00 add r7, sp, #0 80073ae: 60f8 str r0, [r7, #12] 80073b0: 60b9 str r1, [r7, #8] 80073b2: 4611 mov r1, r2 80073b4: 461a mov r2, r3 80073b6: 460b mov r3, r1 80073b8: 80fb strh r3, [r7, #6] 80073ba: 4613 mov r3, r2 80073bc: 80bb strh r3, [r7, #4] const struct pbuf *p; u16_t left = 0; 80073be: 2300 movs r3, #0 80073c0: 837b strh r3, [r7, #26] u16_t buf_copy_len; u16_t copied_total = 0; 80073c2: 2300 movs r3, #0 80073c4: 82fb strh r3, [r7, #22] LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;); 80073c6: 68fb ldr r3, [r7, #12] 80073c8: 2b00 cmp r3, #0 80073ca: d108 bne.n 80073de 80073cc: 4b2b ldr r3, [pc, #172] ; (800747c ) 80073ce: f240 420a movw r2, #1034 ; 0x40a 80073d2: 492b ldr r1, [pc, #172] ; (8007480 ) 80073d4: 482b ldr r0, [pc, #172] ; (8007484 ) 80073d6: f009 fbf7 bl 8010bc8 80073da: 2300 movs r3, #0 80073dc: e04a b.n 8007474 LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;); 80073de: 68bb ldr r3, [r7, #8] 80073e0: 2b00 cmp r3, #0 80073e2: d108 bne.n 80073f6 80073e4: 4b25 ldr r3, [pc, #148] ; (800747c ) 80073e6: f240 420b movw r2, #1035 ; 0x40b 80073ea: 4927 ldr r1, [pc, #156] ; (8007488 ) 80073ec: 4825 ldr r0, [pc, #148] ; (8007484 ) 80073ee: f009 fbeb bl 8010bc8 80073f2: 2300 movs r3, #0 80073f4: e03e b.n 8007474 /* 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) { 80073f6: 68fb ldr r3, [r7, #12] 80073f8: 61fb str r3, [r7, #28] 80073fa: e034 b.n 8007466 if ((offset != 0) && (offset >= p->len)) { 80073fc: 88bb ldrh r3, [r7, #4] 80073fe: 2b00 cmp r3, #0 8007400: d00a beq.n 8007418 8007402: 69fb ldr r3, [r7, #28] 8007404: 895b ldrh r3, [r3, #10] 8007406: 88ba ldrh r2, [r7, #4] 8007408: 429a cmp r2, r3 800740a: d305 bcc.n 8007418 /* don't copy from this buffer -> on to the next */ offset = (u16_t)(offset - p->len); 800740c: 69fb ldr r3, [r7, #28] 800740e: 895b ldrh r3, [r3, #10] 8007410: 88ba ldrh r2, [r7, #4] 8007412: 1ad3 subs r3, r2, r3 8007414: 80bb strh r3, [r7, #4] 8007416: e023 b.n 8007460 } else { /* copy from this buffer. maybe only partially. */ buf_copy_len = (u16_t)(p->len - offset); 8007418: 69fb ldr r3, [r7, #28] 800741a: 895a ldrh r2, [r3, #10] 800741c: 88bb ldrh r3, [r7, #4] 800741e: 1ad3 subs r3, r2, r3 8007420: 833b strh r3, [r7, #24] if (buf_copy_len > len) { 8007422: 8b3a ldrh r2, [r7, #24] 8007424: 88fb ldrh r3, [r7, #6] 8007426: 429a cmp r2, r3 8007428: d901 bls.n 800742e buf_copy_len = len; 800742a: 88fb ldrh r3, [r7, #6] 800742c: 833b strh r3, [r7, #24] } /* copy the necessary parts of the buffer */ MEMCPY(&((char *)dataptr)[left], &((char *)p->payload)[offset], buf_copy_len); 800742e: 8b7b ldrh r3, [r7, #26] 8007430: 68ba ldr r2, [r7, #8] 8007432: 18d0 adds r0, r2, r3 8007434: 69fb ldr r3, [r7, #28] 8007436: 685a ldr r2, [r3, #4] 8007438: 88bb ldrh r3, [r7, #4] 800743a: 4413 add r3, r2 800743c: 8b3a ldrh r2, [r7, #24] 800743e: 4619 mov r1, r3 8007440: f009 fda3 bl 8010f8a copied_total = (u16_t)(copied_total + buf_copy_len); 8007444: 8afa ldrh r2, [r7, #22] 8007446: 8b3b ldrh r3, [r7, #24] 8007448: 4413 add r3, r2 800744a: 82fb strh r3, [r7, #22] left = (u16_t)(left + buf_copy_len); 800744c: 8b7a ldrh r2, [r7, #26] 800744e: 8b3b ldrh r3, [r7, #24] 8007450: 4413 add r3, r2 8007452: 837b strh r3, [r7, #26] len = (u16_t)(len - buf_copy_len); 8007454: 88fa ldrh r2, [r7, #6] 8007456: 8b3b ldrh r3, [r7, #24] 8007458: 1ad3 subs r3, r2, r3 800745a: 80fb strh r3, [r7, #6] offset = 0; 800745c: 2300 movs r3, #0 800745e: 80bb strh r3, [r7, #4] for (p = buf; len != 0 && p != NULL; p = p->next) { 8007460: 69fb ldr r3, [r7, #28] 8007462: 681b ldr r3, [r3, #0] 8007464: 61fb str r3, [r7, #28] 8007466: 88fb ldrh r3, [r7, #6] 8007468: 2b00 cmp r3, #0 800746a: d002 beq.n 8007472 800746c: 69fb ldr r3, [r7, #28] 800746e: 2b00 cmp r3, #0 8007470: d1c4 bne.n 80073fc } } return copied_total; 8007472: 8afb ldrh r3, [r7, #22] } 8007474: 4618 mov r0, r3 8007476: 3720 adds r7, #32 8007478: 46bd mov sp, r7 800747a: bd80 pop {r7, pc} 800747c: 08012508 .word 0x08012508 8007480: 08012850 .word 0x08012850 8007484: 08012568 .word 0x08012568 8007488: 08012870 .word 0x08012870 0800748c : * * @return a new pbuf or NULL if allocation fails */ struct pbuf * pbuf_clone(pbuf_layer layer, pbuf_type type, struct pbuf *p) { 800748c: b580 push {r7, lr} 800748e: b084 sub sp, #16 8007490: af00 add r7, sp, #0 8007492: 4603 mov r3, r0 8007494: 603a str r2, [r7, #0] 8007496: 71fb strb r3, [r7, #7] 8007498: 460b mov r3, r1 800749a: 80bb strh r3, [r7, #4] struct pbuf *q; err_t err; q = pbuf_alloc(layer, p->tot_len, type); 800749c: 683b ldr r3, [r7, #0] 800749e: 8919 ldrh r1, [r3, #8] 80074a0: 88ba ldrh r2, [r7, #4] 80074a2: 79fb ldrb r3, [r7, #7] 80074a4: 4618 mov r0, r3 80074a6: f7ff fab1 bl 8006a0c 80074aa: 60f8 str r0, [r7, #12] if (q == NULL) { 80074ac: 68fb ldr r3, [r7, #12] 80074ae: 2b00 cmp r3, #0 80074b0: d101 bne.n 80074b6 return NULL; 80074b2: 2300 movs r3, #0 80074b4: e011 b.n 80074da } err = pbuf_copy(q, p); 80074b6: 6839 ldr r1, [r7, #0] 80074b8: 68f8 ldr r0, [r7, #12] 80074ba: f7ff fea3 bl 8007204 80074be: 4603 mov r3, r0 80074c0: 72fb strb r3, [r7, #11] LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */ LWIP_ASSERT("pbuf_copy failed", err == ERR_OK); 80074c2: f997 300b ldrsb.w r3, [r7, #11] 80074c6: 2b00 cmp r3, #0 80074c8: d006 beq.n 80074d8 80074ca: 4b06 ldr r3, [pc, #24] ; (80074e4 ) 80074cc: f240 5224 movw r2, #1316 ; 0x524 80074d0: 4905 ldr r1, [pc, #20] ; (80074e8 ) 80074d2: 4806 ldr r0, [pc, #24] ; (80074ec ) 80074d4: f009 fb78 bl 8010bc8 return q; 80074d8: 68fb ldr r3, [r7, #12] } 80074da: 4618 mov r0, r3 80074dc: 3710 adds r7, #16 80074de: 46bd mov sp, r7 80074e0: bd80 pop {r7, pc} 80074e2: bf00 nop 80074e4: 08012508 .word 0x08012508 80074e8: 0801297c .word 0x0801297c 80074ec: 08012568 .word 0x08012568 080074f0 : /** * Initialize this module. */ void tcp_init(void) { 80074f0: b580 push {r7, lr} 80074f2: af00 add r7, sp, #0 #ifdef LWIP_RAND tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); 80074f4: f008 feb4 bl 8010260 80074f8: 4603 mov r3, r0 80074fa: b29b uxth r3, r3 80074fc: f3c3 030d ubfx r3, r3, #0, #14 8007500: b29b uxth r3, r3 8007502: f5a3 4380 sub.w r3, r3, #16384 ; 0x4000 8007506: b29a uxth r2, r3 8007508: 4b01 ldr r3, [pc, #4] ; (8007510 ) 800750a: 801a strh r2, [r3, #0] #endif /* LWIP_RAND */ } 800750c: bf00 nop 800750e: bd80 pop {r7, pc} 8007510: 24000068 .word 0x24000068 08007514 : /** Free a tcp pcb */ void tcp_free(struct tcp_pcb *pcb) { 8007514: b580 push {r7, lr} 8007516: b082 sub sp, #8 8007518: af00 add r7, sp, #0 800751a: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN); 800751c: 687b ldr r3, [r7, #4] 800751e: 7d1b ldrb r3, [r3, #20] 8007520: 2b01 cmp r3, #1 8007522: d105 bne.n 8007530 8007524: 4b06 ldr r3, [pc, #24] ; (8007540 ) 8007526: 22d4 movs r2, #212 ; 0xd4 8007528: 4906 ldr r1, [pc, #24] ; (8007544 ) 800752a: 4807 ldr r0, [pc, #28] ; (8007548 ) 800752c: f009 fb4c bl 8010bc8 #if LWIP_TCP_PCB_NUM_EXT_ARGS tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args); #endif memp_free(MEMP_TCP_PCB, pcb); 8007530: 6879 ldr r1, [r7, #4] 8007532: 2001 movs r0, #1 8007534: f7fe fde2 bl 80060fc } 8007538: bf00 nop 800753a: 3708 adds r7, #8 800753c: 46bd mov sp, r7 800753e: bd80 pop {r7, pc} 8007540: 08012a08 .word 0x08012a08 8007544: 08012a38 .word 0x08012a38 8007548: 08012a4c .word 0x08012a4c 0800754c : /** Free a tcp listen pcb */ static void tcp_free_listen(struct tcp_pcb *pcb) { 800754c: b580 push {r7, lr} 800754e: b082 sub sp, #8 8007550: af00 add r7, sp, #0 8007552: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN); 8007554: 687b ldr r3, [r7, #4] 8007556: 7d1b ldrb r3, [r3, #20] 8007558: 2b01 cmp r3, #1 800755a: d105 bne.n 8007568 800755c: 4b06 ldr r3, [pc, #24] ; (8007578 ) 800755e: 22df movs r2, #223 ; 0xdf 8007560: 4906 ldr r1, [pc, #24] ; (800757c ) 8007562: 4807 ldr r0, [pc, #28] ; (8007580 ) 8007564: f009 fb30 bl 8010bc8 #if LWIP_TCP_PCB_NUM_EXT_ARGS tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args); #endif memp_free(MEMP_TCP_PCB_LISTEN, pcb); 8007568: 6879 ldr r1, [r7, #4] 800756a: 2002 movs r0, #2 800756c: f7fe fdc6 bl 80060fc } 8007570: bf00 nop 8007572: 3708 adds r7, #8 8007574: 46bd mov sp, r7 8007576: bd80 pop {r7, pc} 8007578: 08012a08 .word 0x08012a08 800757c: 08012a74 .word 0x08012a74 8007580: 08012a4c .word 0x08012a4c 08007584 : /** * Called periodically to dispatch TCP timers. */ void tcp_tmr(void) { 8007584: b580 push {r7, lr} 8007586: af00 add r7, sp, #0 /* Call tcp_fasttmr() every 250 ms */ tcp_fasttmr(); 8007588: f001 f800 bl 800858c if (++tcp_timer & 1) { 800758c: 4b07 ldr r3, [pc, #28] ; (80075ac ) 800758e: 781b ldrb r3, [r3, #0] 8007590: 3301 adds r3, #1 8007592: b2da uxtb r2, r3 8007594: 4b05 ldr r3, [pc, #20] ; (80075ac ) 8007596: 701a strb r2, [r3, #0] 8007598: 4b04 ldr r3, [pc, #16] ; (80075ac ) 800759a: 781b ldrb r3, [r3, #0] 800759c: f003 0301 and.w r3, r3, #1 80075a0: 2b00 cmp r3, #0 80075a2: d001 beq.n 80075a8 /* Call tcp_slowtmr() every 500 ms, i.e., every other timer tcp_tmr() is called. */ tcp_slowtmr(); 80075a4: f000 fcb2 bl 8007f0c } } 80075a8: bf00 nop 80075aa: bd80 pop {r7, pc} 80075ac: 24007b81 .word 0x24007b81 080075b0 : /** 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) { 80075b0: b580 push {r7, lr} 80075b2: b084 sub sp, #16 80075b4: af00 add r7, sp, #0 80075b6: 6078 str r0, [r7, #4] 80075b8: 6039 str r1, [r7, #0] struct tcp_pcb *pcb; LWIP_ASSERT("tcp_remove_listener: invalid listener", lpcb != NULL); 80075ba: 683b ldr r3, [r7, #0] 80075bc: 2b00 cmp r3, #0 80075be: d105 bne.n 80075cc 80075c0: 4b0d ldr r3, [pc, #52] ; (80075f8 ) 80075c2: 22ff movs r2, #255 ; 0xff 80075c4: 490d ldr r1, [pc, #52] ; (80075fc ) 80075c6: 480e ldr r0, [pc, #56] ; (8007600 ) 80075c8: f009 fafe bl 8010bc8 for (pcb = list; pcb != NULL; pcb = pcb->next) { 80075cc: 687b ldr r3, [r7, #4] 80075ce: 60fb str r3, [r7, #12] 80075d0: e00a b.n 80075e8 if (pcb->listener == lpcb) { 80075d2: 68fb ldr r3, [r7, #12] 80075d4: 6fdb ldr r3, [r3, #124] ; 0x7c 80075d6: 683a ldr r2, [r7, #0] 80075d8: 429a cmp r2, r3 80075da: d102 bne.n 80075e2 pcb->listener = NULL; 80075dc: 68fb ldr r3, [r7, #12] 80075de: 2200 movs r2, #0 80075e0: 67da str r2, [r3, #124] ; 0x7c for (pcb = list; pcb != NULL; pcb = pcb->next) { 80075e2: 68fb ldr r3, [r7, #12] 80075e4: 68db ldr r3, [r3, #12] 80075e6: 60fb str r3, [r7, #12] 80075e8: 68fb ldr r3, [r7, #12] 80075ea: 2b00 cmp r3, #0 80075ec: d1f1 bne.n 80075d2 } } } 80075ee: bf00 nop 80075f0: bf00 nop 80075f2: 3710 adds r7, #16 80075f4: 46bd mov sp, r7 80075f6: bd80 pop {r7, pc} 80075f8: 08012a08 .word 0x08012a08 80075fc: 08012a90 .word 0x08012a90 8007600: 08012a4c .word 0x08012a4c 08007604 : /** 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) { 8007604: b580 push {r7, lr} 8007606: b084 sub sp, #16 8007608: af00 add r7, sp, #0 800760a: 6078 str r0, [r7, #4] #if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG size_t i; LWIP_ASSERT("pcb != NULL", pcb != NULL); 800760c: 687b ldr r3, [r7, #4] 800760e: 2b00 cmp r3, #0 8007610: d106 bne.n 8007620 8007612: 4b14 ldr r3, [pc, #80] ; (8007664 ) 8007614: f240 1211 movw r2, #273 ; 0x111 8007618: 4913 ldr r1, [pc, #76] ; (8007668 ) 800761a: 4814 ldr r0, [pc, #80] ; (800766c ) 800761c: f009 fad4 bl 8010bc8 LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN); 8007620: 687b ldr r3, [r7, #4] 8007622: 7d1b ldrb r3, [r3, #20] 8007624: 2b01 cmp r3, #1 8007626: d006 beq.n 8007636 8007628: 4b0e ldr r3, [pc, #56] ; (8007664 ) 800762a: f44f 7289 mov.w r2, #274 ; 0x112 800762e: 4910 ldr r1, [pc, #64] ; (8007670 ) 8007630: 480e ldr r0, [pc, #56] ; (800766c ) 8007632: f009 fac9 bl 8010bc8 for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) { 8007636: 2301 movs r3, #1 8007638: 60fb str r3, [r7, #12] 800763a: e00b b.n 8007654 tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen *)pcb); 800763c: 4a0d ldr r2, [pc, #52] ; (8007674 ) 800763e: 68fb ldr r3, [r7, #12] 8007640: f852 3023 ldr.w r3, [r2, r3, lsl #2] 8007644: 681b ldr r3, [r3, #0] 8007646: 6879 ldr r1, [r7, #4] 8007648: 4618 mov r0, r3 800764a: f7ff ffb1 bl 80075b0 for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) { 800764e: 68fb ldr r3, [r7, #12] 8007650: 3301 adds r3, #1 8007652: 60fb str r3, [r7, #12] 8007654: 68fb ldr r3, [r7, #12] 8007656: 2b03 cmp r3, #3 8007658: d9f0 bls.n 800763c } #endif LWIP_UNUSED_ARG(pcb); } 800765a: bf00 nop 800765c: bf00 nop 800765e: 3710 adds r7, #16 8007660: 46bd mov sp, r7 8007662: bd80 pop {r7, pc} 8007664: 08012a08 .word 0x08012a08 8007668: 08012ab8 .word 0x08012ab8 800766c: 08012a4c .word 0x08012a4c 8007670: 08012ac4 .word 0x08012ac4 8007674: 08014d6c .word 0x08014d6c 08007678 : * @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) { 8007678: b5b0 push {r4, r5, r7, lr} 800767a: b088 sub sp, #32 800767c: af04 add r7, sp, #16 800767e: 6078 str r0, [r7, #4] 8007680: 460b mov r3, r1 8007682: 70fb strb r3, [r7, #3] LWIP_ASSERT("tcp_close_shutdown: invalid pcb", pcb != NULL); 8007684: 687b ldr r3, [r7, #4] 8007686: 2b00 cmp r3, #0 8007688: d106 bne.n 8007698 800768a: 4b63 ldr r3, [pc, #396] ; (8007818 ) 800768c: f44f 72af mov.w r2, #350 ; 0x15e 8007690: 4962 ldr r1, [pc, #392] ; (800781c ) 8007692: 4863 ldr r0, [pc, #396] ; (8007820 ) 8007694: f009 fa98 bl 8010bc8 if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { 8007698: 78fb ldrb r3, [r7, #3] 800769a: 2b00 cmp r3, #0 800769c: d066 beq.n 800776c 800769e: 687b ldr r3, [r7, #4] 80076a0: 7d1b ldrb r3, [r3, #20] 80076a2: 2b04 cmp r3, #4 80076a4: d003 beq.n 80076ae 80076a6: 687b ldr r3, [r7, #4] 80076a8: 7d1b ldrb r3, [r3, #20] 80076aa: 2b07 cmp r3, #7 80076ac: d15e bne.n 800776c if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) { 80076ae: 687b ldr r3, [r7, #4] 80076b0: 6f9b ldr r3, [r3, #120] ; 0x78 80076b2: 2b00 cmp r3, #0 80076b4: d104 bne.n 80076c0 80076b6: 687b ldr r3, [r7, #4] 80076b8: 8d1b ldrh r3, [r3, #40] ; 0x28 80076ba: f5b3 6f06 cmp.w r3, #2144 ; 0x860 80076be: d055 beq.n 800776c /* 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); 80076c0: 687b ldr r3, [r7, #4] 80076c2: 8b5b ldrh r3, [r3, #26] 80076c4: f003 0310 and.w r3, r3, #16 80076c8: 2b00 cmp r3, #0 80076ca: d106 bne.n 80076da 80076cc: 4b52 ldr r3, [pc, #328] ; (8007818 ) 80076ce: f44f 72b2 mov.w r2, #356 ; 0x164 80076d2: 4954 ldr r1, [pc, #336] ; (8007824 ) 80076d4: 4852 ldr r0, [pc, #328] ; (8007820 ) 80076d6: f009 fa77 bl 8010bc8 /* 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, 80076da: 687b ldr r3, [r7, #4] 80076dc: 6d18 ldr r0, [r3, #80] ; 0x50 80076de: 687b ldr r3, [r7, #4] 80076e0: 6a5c ldr r4, [r3, #36] ; 0x24 80076e2: 687d ldr r5, [r7, #4] 80076e4: 687b ldr r3, [r7, #4] 80076e6: 3304 adds r3, #4 80076e8: 687a ldr r2, [r7, #4] 80076ea: 8ad2 ldrh r2, [r2, #22] 80076ec: 6879 ldr r1, [r7, #4] 80076ee: 8b09 ldrh r1, [r1, #24] 80076f0: 9102 str r1, [sp, #8] 80076f2: 9201 str r2, [sp, #4] 80076f4: 9300 str r3, [sp, #0] 80076f6: 462b mov r3, r5 80076f8: 4622 mov r2, r4 80076fa: 4601 mov r1, r0 80076fc: 6878 ldr r0, [r7, #4] 80076fe: f005 fd39 bl 800d174 pcb->local_port, pcb->remote_port); tcp_pcb_purge(pcb); 8007702: 6878 ldr r0, [r7, #4] 8007704: f001 faa4 bl 8008c50 TCP_RMV_ACTIVE(pcb); 8007708: 4b47 ldr r3, [pc, #284] ; (8007828 ) 800770a: 681b ldr r3, [r3, #0] 800770c: 687a ldr r2, [r7, #4] 800770e: 429a cmp r2, r3 8007710: d105 bne.n 800771e 8007712: 4b45 ldr r3, [pc, #276] ; (8007828 ) 8007714: 681b ldr r3, [r3, #0] 8007716: 68db ldr r3, [r3, #12] 8007718: 4a43 ldr r2, [pc, #268] ; (8007828 ) 800771a: 6013 str r3, [r2, #0] 800771c: e013 b.n 8007746 800771e: 4b42 ldr r3, [pc, #264] ; (8007828 ) 8007720: 681b ldr r3, [r3, #0] 8007722: 60fb str r3, [r7, #12] 8007724: e00c b.n 8007740 8007726: 68fb ldr r3, [r7, #12] 8007728: 68db ldr r3, [r3, #12] 800772a: 687a ldr r2, [r7, #4] 800772c: 429a cmp r2, r3 800772e: d104 bne.n 800773a 8007730: 687b ldr r3, [r7, #4] 8007732: 68da ldr r2, [r3, #12] 8007734: 68fb ldr r3, [r7, #12] 8007736: 60da str r2, [r3, #12] 8007738: e005 b.n 8007746 800773a: 68fb ldr r3, [r7, #12] 800773c: 68db ldr r3, [r3, #12] 800773e: 60fb str r3, [r7, #12] 8007740: 68fb ldr r3, [r7, #12] 8007742: 2b00 cmp r3, #0 8007744: d1ef bne.n 8007726 8007746: 687b ldr r3, [r7, #4] 8007748: 2200 movs r2, #0 800774a: 60da str r2, [r3, #12] 800774c: 4b37 ldr r3, [pc, #220] ; (800782c ) 800774e: 2201 movs r2, #1 8007750: 701a strb r2, [r3, #0] /* Deallocate the pcb since we already sent a RST for it */ if (tcp_input_pcb == pcb) { 8007752: 4b37 ldr r3, [pc, #220] ; (8007830 ) 8007754: 681b ldr r3, [r3, #0] 8007756: 687a ldr r2, [r7, #4] 8007758: 429a cmp r2, r3 800775a: d102 bne.n 8007762 /* prevent using a deallocated pcb: free it from tcp_input later */ tcp_trigger_input_pcb_close(); 800775c: f003 ff42 bl 800b5e4 8007760: e002 b.n 8007768 } else { tcp_free(pcb); 8007762: 6878 ldr r0, [r7, #4] 8007764: f7ff fed6 bl 8007514 } return ERR_OK; 8007768: 2300 movs r3, #0 800776a: e050 b.n 800780e } } /* - 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) { 800776c: 687b ldr r3, [r7, #4] 800776e: 7d1b ldrb r3, [r3, #20] 8007770: 2b02 cmp r3, #2 8007772: d03b beq.n 80077ec 8007774: 2b02 cmp r3, #2 8007776: dc44 bgt.n 8007802 8007778: 2b00 cmp r3, #0 800777a: d002 beq.n 8007782 800777c: 2b01 cmp r3, #1 800777e: d02a beq.n 80077d6 8007780: e03f b.n 8007802 * 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) { 8007782: 687b ldr r3, [r7, #4] 8007784: 8adb ldrh r3, [r3, #22] 8007786: 2b00 cmp r3, #0 8007788: d021 beq.n 80077ce TCP_RMV(&tcp_bound_pcbs, pcb); 800778a: 4b2a ldr r3, [pc, #168] ; (8007834 ) 800778c: 681b ldr r3, [r3, #0] 800778e: 687a ldr r2, [r7, #4] 8007790: 429a cmp r2, r3 8007792: d105 bne.n 80077a0 8007794: 4b27 ldr r3, [pc, #156] ; (8007834 ) 8007796: 681b ldr r3, [r3, #0] 8007798: 68db ldr r3, [r3, #12] 800779a: 4a26 ldr r2, [pc, #152] ; (8007834 ) 800779c: 6013 str r3, [r2, #0] 800779e: e013 b.n 80077c8 80077a0: 4b24 ldr r3, [pc, #144] ; (8007834 ) 80077a2: 681b ldr r3, [r3, #0] 80077a4: 60bb str r3, [r7, #8] 80077a6: e00c b.n 80077c2 80077a8: 68bb ldr r3, [r7, #8] 80077aa: 68db ldr r3, [r3, #12] 80077ac: 687a ldr r2, [r7, #4] 80077ae: 429a cmp r2, r3 80077b0: d104 bne.n 80077bc 80077b2: 687b ldr r3, [r7, #4] 80077b4: 68da ldr r2, [r3, #12] 80077b6: 68bb ldr r3, [r7, #8] 80077b8: 60da str r2, [r3, #12] 80077ba: e005 b.n 80077c8 80077bc: 68bb ldr r3, [r7, #8] 80077be: 68db ldr r3, [r3, #12] 80077c0: 60bb str r3, [r7, #8] 80077c2: 68bb ldr r3, [r7, #8] 80077c4: 2b00 cmp r3, #0 80077c6: d1ef bne.n 80077a8 80077c8: 687b ldr r3, [r7, #4] 80077ca: 2200 movs r2, #0 80077cc: 60da str r2, [r3, #12] } tcp_free(pcb); 80077ce: 6878 ldr r0, [r7, #4] 80077d0: f7ff fea0 bl 8007514 break; 80077d4: e01a b.n 800780c case LISTEN: tcp_listen_closed(pcb); 80077d6: 6878 ldr r0, [r7, #4] 80077d8: f7ff ff14 bl 8007604 tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb); 80077dc: 6879 ldr r1, [r7, #4] 80077de: 4816 ldr r0, [pc, #88] ; (8007838 ) 80077e0: f001 fa86 bl 8008cf0 tcp_free_listen(pcb); 80077e4: 6878 ldr r0, [r7, #4] 80077e6: f7ff feb1 bl 800754c break; 80077ea: e00f b.n 800780c case SYN_SENT: TCP_PCB_REMOVE_ACTIVE(pcb); 80077ec: 6879 ldr r1, [r7, #4] 80077ee: 480e ldr r0, [pc, #56] ; (8007828 ) 80077f0: f001 fa7e bl 8008cf0 80077f4: 4b0d ldr r3, [pc, #52] ; (800782c ) 80077f6: 2201 movs r2, #1 80077f8: 701a strb r2, [r3, #0] tcp_free(pcb); 80077fa: 6878 ldr r0, [r7, #4] 80077fc: f7ff fe8a bl 8007514 MIB2_STATS_INC(mib2.tcpattemptfails); break; 8007800: e004 b.n 800780c default: return tcp_close_shutdown_fin(pcb); 8007802: 6878 ldr r0, [r7, #4] 8007804: f000 f81a bl 800783c 8007808: 4603 mov r3, r0 800780a: e000 b.n 800780e } return ERR_OK; 800780c: 2300 movs r3, #0 } 800780e: 4618 mov r0, r3 8007810: 3710 adds r7, #16 8007812: 46bd mov sp, r7 8007814: bdb0 pop {r4, r5, r7, pc} 8007816: bf00 nop 8007818: 08012a08 .word 0x08012a08 800781c: 08012adc .word 0x08012adc 8007820: 08012a4c .word 0x08012a4c 8007824: 08012afc .word 0x08012afc 8007828: 24007b78 .word 0x24007b78 800782c: 24007b80 .word 0x24007b80 8007830: 24007bbc .word 0x24007bbc 8007834: 24007b70 .word 0x24007b70 8007838: 24007b74 .word 0x24007b74 0800783c : static err_t tcp_close_shutdown_fin(struct tcp_pcb *pcb) { 800783c: b580 push {r7, lr} 800783e: b084 sub sp, #16 8007840: af00 add r7, sp, #0 8007842: 6078 str r0, [r7, #4] err_t err; LWIP_ASSERT("pcb != NULL", pcb != NULL); 8007844: 687b ldr r3, [r7, #4] 8007846: 2b00 cmp r3, #0 8007848: d106 bne.n 8007858 800784a: 4b2e ldr r3, [pc, #184] ; (8007904 ) 800784c: f44f 72ce mov.w r2, #412 ; 0x19c 8007850: 492d ldr r1, [pc, #180] ; (8007908 ) 8007852: 482e ldr r0, [pc, #184] ; (800790c ) 8007854: f009 f9b8 bl 8010bc8 switch (pcb->state) { 8007858: 687b ldr r3, [r7, #4] 800785a: 7d1b ldrb r3, [r3, #20] 800785c: 2b07 cmp r3, #7 800785e: d020 beq.n 80078a2 8007860: 2b07 cmp r3, #7 8007862: dc2b bgt.n 80078bc 8007864: 2b03 cmp r3, #3 8007866: d002 beq.n 800786e 8007868: 2b04 cmp r3, #4 800786a: d00d beq.n 8007888 800786c: e026 b.n 80078bc case SYN_RCVD: err = tcp_send_fin(pcb); 800786e: 6878 ldr r0, [r7, #4] 8007870: f004 fd82 bl 800c378 8007874: 4603 mov r3, r0 8007876: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 8007878: f997 300f ldrsb.w r3, [r7, #15] 800787c: 2b00 cmp r3, #0 800787e: d11f bne.n 80078c0 tcp_backlog_accepted(pcb); MIB2_STATS_INC(mib2.tcpattemptfails); pcb->state = FIN_WAIT_1; 8007880: 687b ldr r3, [r7, #4] 8007882: 2205 movs r2, #5 8007884: 751a strb r2, [r3, #20] } break; 8007886: e01b b.n 80078c0 case ESTABLISHED: err = tcp_send_fin(pcb); 8007888: 6878 ldr r0, [r7, #4] 800788a: f004 fd75 bl 800c378 800788e: 4603 mov r3, r0 8007890: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 8007892: f997 300f ldrsb.w r3, [r7, #15] 8007896: 2b00 cmp r3, #0 8007898: d114 bne.n 80078c4 MIB2_STATS_INC(mib2.tcpestabresets); pcb->state = FIN_WAIT_1; 800789a: 687b ldr r3, [r7, #4] 800789c: 2205 movs r2, #5 800789e: 751a strb r2, [r3, #20] } break; 80078a0: e010 b.n 80078c4 case CLOSE_WAIT: err = tcp_send_fin(pcb); 80078a2: 6878 ldr r0, [r7, #4] 80078a4: f004 fd68 bl 800c378 80078a8: 4603 mov r3, r0 80078aa: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 80078ac: f997 300f ldrsb.w r3, [r7, #15] 80078b0: 2b00 cmp r3, #0 80078b2: d109 bne.n 80078c8 MIB2_STATS_INC(mib2.tcpestabresets); pcb->state = LAST_ACK; 80078b4: 687b ldr r3, [r7, #4] 80078b6: 2209 movs r2, #9 80078b8: 751a strb r2, [r3, #20] } break; 80078ba: e005 b.n 80078c8 default: /* Has already been closed, do nothing. */ return ERR_OK; 80078bc: 2300 movs r3, #0 80078be: e01c b.n 80078fa break; 80078c0: bf00 nop 80078c2: e002 b.n 80078ca break; 80078c4: bf00 nop 80078c6: e000 b.n 80078ca break; 80078c8: bf00 nop } if (err == ERR_OK) { 80078ca: f997 300f ldrsb.w r3, [r7, #15] 80078ce: 2b00 cmp r3, #0 80078d0: d103 bne.n 80078da /* 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); 80078d2: 6878 ldr r0, [r7, #4] 80078d4: f004 fe8e bl 800c5f4 80078d8: e00d b.n 80078f6 } else if (err == ERR_MEM) { 80078da: f997 300f ldrsb.w r3, [r7, #15] 80078de: f1b3 3fff cmp.w r3, #4294967295 80078e2: d108 bne.n 80078f6 /* Mark this pcb for closing. Closing is retried from tcp_tmr. */ tcp_set_flags(pcb, TF_CLOSEPEND); 80078e4: 687b ldr r3, [r7, #4] 80078e6: 8b5b ldrh r3, [r3, #26] 80078e8: f043 0308 orr.w r3, r3, #8 80078ec: b29a uxth r2, r3 80078ee: 687b ldr r3, [r7, #4] 80078f0: 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; 80078f2: 2300 movs r3, #0 80078f4: e001 b.n 80078fa } return err; 80078f6: f997 300f ldrsb.w r3, [r7, #15] } 80078fa: 4618 mov r0, r3 80078fc: 3710 adds r7, #16 80078fe: 46bd mov sp, r7 8007900: bd80 pop {r7, pc} 8007902: bf00 nop 8007904: 08012a08 .word 0x08012a08 8007908: 08012ab8 .word 0x08012ab8 800790c: 08012a4c .word 0x08012a4c 08007910 : * @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) { 8007910: b580 push {r7, lr} 8007912: b082 sub sp, #8 8007914: af00 add r7, sp, #0 8007916: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); LWIP_ERROR("tcp_close: invalid pcb", pcb != NULL, return ERR_ARG); 8007918: 687b ldr r3, [r7, #4] 800791a: 2b00 cmp r3, #0 800791c: d109 bne.n 8007932 800791e: 4b0f ldr r3, [pc, #60] ; (800795c ) 8007920: f44f 72f4 mov.w r2, #488 ; 0x1e8 8007924: 490e ldr r1, [pc, #56] ; (8007960 ) 8007926: 480f ldr r0, [pc, #60] ; (8007964 ) 8007928: f009 f94e bl 8010bc8 800792c: f06f 030f mvn.w r3, #15 8007930: e00f b.n 8007952 LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in ")); tcp_debug_print_state(pcb->state); if (pcb->state != LISTEN) { 8007932: 687b ldr r3, [r7, #4] 8007934: 7d1b ldrb r3, [r3, #20] 8007936: 2b01 cmp r3, #1 8007938: d006 beq.n 8007948 /* Set a flag not to receive any more data... */ tcp_set_flags(pcb, TF_RXCLOSED); 800793a: 687b ldr r3, [r7, #4] 800793c: 8b5b ldrh r3, [r3, #26] 800793e: f043 0310 orr.w r3, r3, #16 8007942: b29a uxth r2, r3 8007944: 687b ldr r3, [r7, #4] 8007946: 835a strh r2, [r3, #26] } /* ... and close */ return tcp_close_shutdown(pcb, 1); 8007948: 2101 movs r1, #1 800794a: 6878 ldr r0, [r7, #4] 800794c: f7ff fe94 bl 8007678 8007950: 4603 mov r3, r0 } 8007952: 4618 mov r0, r3 8007954: 3708 adds r7, #8 8007956: 46bd mov sp, r7 8007958: bd80 pop {r7, pc} 800795a: bf00 nop 800795c: 08012a08 .word 0x08012a08 8007960: 08012b18 .word 0x08012b18 8007964: 08012a4c .word 0x08012a4c 08007968 : * @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) { 8007968: b580 push {r7, lr} 800796a: b08e sub sp, #56 ; 0x38 800796c: af04 add r7, sp, #16 800796e: 6078 str r0, [r7, #4] 8007970: 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); 8007972: 687b ldr r3, [r7, #4] 8007974: 2b00 cmp r3, #0 8007976: d107 bne.n 8007988 8007978: 4b52 ldr r3, [pc, #328] ; (8007ac4 ) 800797a: f240 223d movw r2, #573 ; 0x23d 800797e: 4952 ldr r1, [pc, #328] ; (8007ac8 ) 8007980: 4852 ldr r0, [pc, #328] ; (8007acc ) 8007982: f009 f921 bl 8010bc8 8007986: e099 b.n 8007abc /* pcb->state LISTEN not allowed here */ LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs", 8007988: 687b ldr r3, [r7, #4] 800798a: 7d1b ldrb r3, [r3, #20] 800798c: 2b01 cmp r3, #1 800798e: d106 bne.n 800799e 8007990: 4b4c ldr r3, [pc, #304] ; (8007ac4 ) 8007992: f44f 7210 mov.w r2, #576 ; 0x240 8007996: 494e ldr r1, [pc, #312] ; (8007ad0 ) 8007998: 484c ldr r0, [pc, #304] ; (8007acc ) 800799a: f009 f915 bl 8010bc8 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) { 800799e: 687b ldr r3, [r7, #4] 80079a0: 7d1b ldrb r3, [r3, #20] 80079a2: 2b0a cmp r3, #10 80079a4: d107 bne.n 80079b6 tcp_pcb_remove(&tcp_tw_pcbs, pcb); 80079a6: 6879 ldr r1, [r7, #4] 80079a8: 484a ldr r0, [pc, #296] ; (8007ad4 ) 80079aa: f001 f9a1 bl 8008cf0 tcp_free(pcb); 80079ae: 6878 ldr r0, [r7, #4] 80079b0: f7ff fdb0 bl 8007514 80079b4: e082 b.n 8007abc } else { int send_rst = 0; 80079b6: 2300 movs r3, #0 80079b8: 627b str r3, [r7, #36] ; 0x24 u16_t local_port = 0; 80079ba: 2300 movs r3, #0 80079bc: 847b strh r3, [r7, #34] ; 0x22 enum tcp_state last_state; seqno = pcb->snd_nxt; 80079be: 687b ldr r3, [r7, #4] 80079c0: 6d1b ldr r3, [r3, #80] ; 0x50 80079c2: 61bb str r3, [r7, #24] ackno = pcb->rcv_nxt; 80079c4: 687b ldr r3, [r7, #4] 80079c6: 6a5b ldr r3, [r3, #36] ; 0x24 80079c8: 617b str r3, [r7, #20] #if LWIP_CALLBACK_API errf = pcb->errf; 80079ca: 687b ldr r3, [r7, #4] 80079cc: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90 80079d0: 613b str r3, [r7, #16] #endif /* LWIP_CALLBACK_API */ errf_arg = pcb->callback_arg; 80079d2: 687b ldr r3, [r7, #4] 80079d4: 691b ldr r3, [r3, #16] 80079d6: 60fb str r3, [r7, #12] if (pcb->state == CLOSED) { 80079d8: 687b ldr r3, [r7, #4] 80079da: 7d1b ldrb r3, [r3, #20] 80079dc: 2b00 cmp r3, #0 80079de: d126 bne.n 8007a2e if (pcb->local_port != 0) { 80079e0: 687b ldr r3, [r7, #4] 80079e2: 8adb ldrh r3, [r3, #22] 80079e4: 2b00 cmp r3, #0 80079e6: d02e beq.n 8007a46 /* bound, not yet opened */ TCP_RMV(&tcp_bound_pcbs, pcb); 80079e8: 4b3b ldr r3, [pc, #236] ; (8007ad8 ) 80079ea: 681b ldr r3, [r3, #0] 80079ec: 687a ldr r2, [r7, #4] 80079ee: 429a cmp r2, r3 80079f0: d105 bne.n 80079fe 80079f2: 4b39 ldr r3, [pc, #228] ; (8007ad8 ) 80079f4: 681b ldr r3, [r3, #0] 80079f6: 68db ldr r3, [r3, #12] 80079f8: 4a37 ldr r2, [pc, #220] ; (8007ad8 ) 80079fa: 6013 str r3, [r2, #0] 80079fc: e013 b.n 8007a26 80079fe: 4b36 ldr r3, [pc, #216] ; (8007ad8 ) 8007a00: 681b ldr r3, [r3, #0] 8007a02: 61fb str r3, [r7, #28] 8007a04: e00c b.n 8007a20 8007a06: 69fb ldr r3, [r7, #28] 8007a08: 68db ldr r3, [r3, #12] 8007a0a: 687a ldr r2, [r7, #4] 8007a0c: 429a cmp r2, r3 8007a0e: d104 bne.n 8007a1a 8007a10: 687b ldr r3, [r7, #4] 8007a12: 68da ldr r2, [r3, #12] 8007a14: 69fb ldr r3, [r7, #28] 8007a16: 60da str r2, [r3, #12] 8007a18: e005 b.n 8007a26 8007a1a: 69fb ldr r3, [r7, #28] 8007a1c: 68db ldr r3, [r3, #12] 8007a1e: 61fb str r3, [r7, #28] 8007a20: 69fb ldr r3, [r7, #28] 8007a22: 2b00 cmp r3, #0 8007a24: d1ef bne.n 8007a06 8007a26: 687b ldr r3, [r7, #4] 8007a28: 2200 movs r2, #0 8007a2a: 60da str r2, [r3, #12] 8007a2c: e00b b.n 8007a46 } } else { send_rst = reset; 8007a2e: 683b ldr r3, [r7, #0] 8007a30: 627b str r3, [r7, #36] ; 0x24 local_port = pcb->local_port; 8007a32: 687b ldr r3, [r7, #4] 8007a34: 8adb ldrh r3, [r3, #22] 8007a36: 847b strh r3, [r7, #34] ; 0x22 TCP_PCB_REMOVE_ACTIVE(pcb); 8007a38: 6879 ldr r1, [r7, #4] 8007a3a: 4828 ldr r0, [pc, #160] ; (8007adc ) 8007a3c: f001 f958 bl 8008cf0 8007a40: 4b27 ldr r3, [pc, #156] ; (8007ae0 ) 8007a42: 2201 movs r2, #1 8007a44: 701a strb r2, [r3, #0] } if (pcb->unacked != NULL) { 8007a46: 687b ldr r3, [r7, #4] 8007a48: 6f1b ldr r3, [r3, #112] ; 0x70 8007a4a: 2b00 cmp r3, #0 8007a4c: d004 beq.n 8007a58 tcp_segs_free(pcb->unacked); 8007a4e: 687b ldr r3, [r7, #4] 8007a50: 6f1b ldr r3, [r3, #112] ; 0x70 8007a52: 4618 mov r0, r3 8007a54: f000 fe7a bl 800874c } if (pcb->unsent != NULL) { 8007a58: 687b ldr r3, [r7, #4] 8007a5a: 6edb ldr r3, [r3, #108] ; 0x6c 8007a5c: 2b00 cmp r3, #0 8007a5e: d004 beq.n 8007a6a tcp_segs_free(pcb->unsent); 8007a60: 687b ldr r3, [r7, #4] 8007a62: 6edb ldr r3, [r3, #108] ; 0x6c 8007a64: 4618 mov r0, r3 8007a66: f000 fe71 bl 800874c } #if TCP_QUEUE_OOSEQ if (pcb->ooseq != NULL) { 8007a6a: 687b ldr r3, [r7, #4] 8007a6c: 6f5b ldr r3, [r3, #116] ; 0x74 8007a6e: 2b00 cmp r3, #0 8007a70: d004 beq.n 8007a7c tcp_segs_free(pcb->ooseq); 8007a72: 687b ldr r3, [r7, #4] 8007a74: 6f5b ldr r3, [r3, #116] ; 0x74 8007a76: 4618 mov r0, r3 8007a78: f000 fe68 bl 800874c } #endif /* TCP_QUEUE_OOSEQ */ tcp_backlog_accepted(pcb); if (send_rst) { 8007a7c: 6a7b ldr r3, [r7, #36] ; 0x24 8007a7e: 2b00 cmp r3, #0 8007a80: d00e beq.n 8007aa0 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); 8007a82: 6879 ldr r1, [r7, #4] 8007a84: 687b ldr r3, [r7, #4] 8007a86: 3304 adds r3, #4 8007a88: 687a ldr r2, [r7, #4] 8007a8a: 8b12 ldrh r2, [r2, #24] 8007a8c: 9202 str r2, [sp, #8] 8007a8e: 8c7a ldrh r2, [r7, #34] ; 0x22 8007a90: 9201 str r2, [sp, #4] 8007a92: 9300 str r3, [sp, #0] 8007a94: 460b mov r3, r1 8007a96: 697a ldr r2, [r7, #20] 8007a98: 69b9 ldr r1, [r7, #24] 8007a9a: 6878 ldr r0, [r7, #4] 8007a9c: f005 fb6a bl 800d174 } last_state = pcb->state; 8007aa0: 687b ldr r3, [r7, #4] 8007aa2: 7d1b ldrb r3, [r3, #20] 8007aa4: 72fb strb r3, [r7, #11] tcp_free(pcb); 8007aa6: 6878 ldr r0, [r7, #4] 8007aa8: f7ff fd34 bl 8007514 TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT); 8007aac: 693b ldr r3, [r7, #16] 8007aae: 2b00 cmp r3, #0 8007ab0: d004 beq.n 8007abc 8007ab2: 693b ldr r3, [r7, #16] 8007ab4: f06f 010c mvn.w r1, #12 8007ab8: 68f8 ldr r0, [r7, #12] 8007aba: 4798 blx r3 } } 8007abc: 3728 adds r7, #40 ; 0x28 8007abe: 46bd mov sp, r7 8007ac0: bd80 pop {r7, pc} 8007ac2: bf00 nop 8007ac4: 08012a08 .word 0x08012a08 8007ac8: 08012b4c .word 0x08012b4c 8007acc: 08012a4c .word 0x08012a4c 8007ad0: 08012b68 .word 0x08012b68 8007ad4: 24007b7c .word 0x24007b7c 8007ad8: 24007b70 .word 0x24007b70 8007adc: 24007b78 .word 0x24007b78 8007ae0: 24007b80 .word 0x24007b80 08007ae4 : * * @param pcb the tcp pcb to abort */ void tcp_abort(struct tcp_pcb *pcb) { 8007ae4: b580 push {r7, lr} 8007ae6: b082 sub sp, #8 8007ae8: af00 add r7, sp, #0 8007aea: 6078 str r0, [r7, #4] tcp_abandon(pcb, 1); 8007aec: 2101 movs r1, #1 8007aee: 6878 ldr r0, [r7, #4] 8007af0: f7ff ff3a bl 8007968 } 8007af4: bf00 nop 8007af6: 3708 adds r7, #8 8007af8: 46bd mov sp, r7 8007afa: bd80 pop {r7, pc} 08007afc : * 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) { 8007afc: b580 push {r7, lr} 8007afe: b084 sub sp, #16 8007b00: af00 add r7, sp, #0 8007b02: 6078 str r0, [r7, #4] u32_t new_right_edge; LWIP_ASSERT("tcp_update_rcv_ann_wnd: invalid pcb", pcb != NULL); 8007b04: 687b ldr r3, [r7, #4] 8007b06: 2b00 cmp r3, #0 8007b08: d106 bne.n 8007b18 8007b0a: 4b25 ldr r3, [pc, #148] ; (8007ba0 ) 8007b0c: f240 32a6 movw r2, #934 ; 0x3a6 8007b10: 4924 ldr r1, [pc, #144] ; (8007ba4 ) 8007b12: 4825 ldr r0, [pc, #148] ; (8007ba8 ) 8007b14: f009 f858 bl 8010bc8 new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; 8007b18: 687b ldr r3, [r7, #4] 8007b1a: 6a5b ldr r3, [r3, #36] ; 0x24 8007b1c: 687a ldr r2, [r7, #4] 8007b1e: 8d12 ldrh r2, [r2, #40] ; 0x28 8007b20: 4413 add r3, r2 8007b22: 60fb str r3, [r7, #12] if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { 8007b24: 687b ldr r3, [r7, #4] 8007b26: 6adb ldr r3, [r3, #44] ; 0x2c 8007b28: 687a ldr r2, [r7, #4] 8007b2a: 8e52 ldrh r2, [r2, #50] ; 0x32 8007b2c: f5b2 6f86 cmp.w r2, #1072 ; 0x430 8007b30: bf28 it cs 8007b32: f44f 6286 movcs.w r2, #1072 ; 0x430 8007b36: b292 uxth r2, r2 8007b38: 4413 add r3, r2 8007b3a: 68fa ldr r2, [r7, #12] 8007b3c: 1ad3 subs r3, r2, r3 8007b3e: 2b00 cmp r3, #0 8007b40: db08 blt.n 8007b54 /* we can advertise more window */ pcb->rcv_ann_wnd = pcb->rcv_wnd; 8007b42: 687b ldr r3, [r7, #4] 8007b44: 8d1a ldrh r2, [r3, #40] ; 0x28 8007b46: 687b ldr r3, [r7, #4] 8007b48: 855a strh r2, [r3, #42] ; 0x2a return new_right_edge - pcb->rcv_ann_right_edge; 8007b4a: 687b ldr r3, [r7, #4] 8007b4c: 6adb ldr r3, [r3, #44] ; 0x2c 8007b4e: 68fa ldr r2, [r7, #12] 8007b50: 1ad3 subs r3, r2, r3 8007b52: e020 b.n 8007b96 } else { if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) { 8007b54: 687b ldr r3, [r7, #4] 8007b56: 6a5a ldr r2, [r3, #36] ; 0x24 8007b58: 687b ldr r3, [r7, #4] 8007b5a: 6adb ldr r3, [r3, #44] ; 0x2c 8007b5c: 1ad3 subs r3, r2, r3 8007b5e: 2b00 cmp r3, #0 8007b60: dd03 ble.n 8007b6a /* 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; 8007b62: 687b ldr r3, [r7, #4] 8007b64: 2200 movs r2, #0 8007b66: 855a strh r2, [r3, #42] ; 0x2a 8007b68: e014 b.n 8007b94 } else { /* keep the right edge of window constant */ u32_t new_rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt; 8007b6a: 687b ldr r3, [r7, #4] 8007b6c: 6ada ldr r2, [r3, #44] ; 0x2c 8007b6e: 687b ldr r3, [r7, #4] 8007b70: 6a5b ldr r3, [r3, #36] ; 0x24 8007b72: 1ad3 subs r3, r2, r3 8007b74: 60bb str r3, [r7, #8] #if !LWIP_WND_SCALE LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff); 8007b76: 68bb ldr r3, [r7, #8] 8007b78: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 8007b7c: d306 bcc.n 8007b8c 8007b7e: 4b08 ldr r3, [pc, #32] ; (8007ba0 ) 8007b80: f240 32b6 movw r2, #950 ; 0x3b6 8007b84: 4909 ldr r1, [pc, #36] ; (8007bac ) 8007b86: 4808 ldr r0, [pc, #32] ; (8007ba8 ) 8007b88: f009 f81e bl 8010bc8 #endif pcb->rcv_ann_wnd = (tcpwnd_size_t)new_rcv_ann_wnd; 8007b8c: 68bb ldr r3, [r7, #8] 8007b8e: b29a uxth r2, r3 8007b90: 687b ldr r3, [r7, #4] 8007b92: 855a strh r2, [r3, #42] ; 0x2a } return 0; 8007b94: 2300 movs r3, #0 } } 8007b96: 4618 mov r0, r3 8007b98: 3710 adds r7, #16 8007b9a: 46bd mov sp, r7 8007b9c: bd80 pop {r7, pc} 8007b9e: bf00 nop 8007ba0: 08012a08 .word 0x08012a08 8007ba4: 08012c64 .word 0x08012c64 8007ba8: 08012a4c .word 0x08012a4c 8007bac: 08012c88 .word 0x08012c88 08007bb0 : * @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) { 8007bb0: b580 push {r7, lr} 8007bb2: b084 sub sp, #16 8007bb4: af00 add r7, sp, #0 8007bb6: 6078 str r0, [r7, #4] 8007bb8: 460b mov r3, r1 8007bba: 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); 8007bbc: 687b ldr r3, [r7, #4] 8007bbe: 2b00 cmp r3, #0 8007bc0: d107 bne.n 8007bd2 8007bc2: 4b1f ldr r3, [pc, #124] ; (8007c40 ) 8007bc4: f240 32cf movw r2, #975 ; 0x3cf 8007bc8: 491e ldr r1, [pc, #120] ; (8007c44 ) 8007bca: 481f ldr r0, [pc, #124] ; (8007c48 ) 8007bcc: f008 fffc bl 8010bc8 8007bd0: e032 b.n 8007c38 /* pcb->state LISTEN not allowed here */ LWIP_ASSERT("don't call tcp_recved for listen-pcbs", 8007bd2: 687b ldr r3, [r7, #4] 8007bd4: 7d1b ldrb r3, [r3, #20] 8007bd6: 2b01 cmp r3, #1 8007bd8: d106 bne.n 8007be8 8007bda: 4b19 ldr r3, [pc, #100] ; (8007c40 ) 8007bdc: f240 32d2 movw r2, #978 ; 0x3d2 8007be0: 491a ldr r1, [pc, #104] ; (8007c4c ) 8007be2: 4819 ldr r0, [pc, #100] ; (8007c48 ) 8007be4: f008 fff0 bl 8010bc8 pcb->state != LISTEN); rcv_wnd = (tcpwnd_size_t)(pcb->rcv_wnd + len); 8007be8: 687b ldr r3, [r7, #4] 8007bea: 8d1a ldrh r2, [r3, #40] ; 0x28 8007bec: 887b ldrh r3, [r7, #2] 8007bee: 4413 add r3, r2 8007bf0: 81fb strh r3, [r7, #14] if ((rcv_wnd > TCP_WND_MAX(pcb)) || (rcv_wnd < pcb->rcv_wnd)) { 8007bf2: 89fb ldrh r3, [r7, #14] 8007bf4: f5b3 6f06 cmp.w r3, #2144 ; 0x860 8007bf8: d804 bhi.n 8007c04 8007bfa: 687b ldr r3, [r7, #4] 8007bfc: 8d1b ldrh r3, [r3, #40] ; 0x28 8007bfe: 89fa ldrh r2, [r7, #14] 8007c00: 429a cmp r2, r3 8007c02: d204 bcs.n 8007c0e /* 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); 8007c04: 687b ldr r3, [r7, #4] 8007c06: f44f 6206 mov.w r2, #2144 ; 0x860 8007c0a: 851a strh r2, [r3, #40] ; 0x28 8007c0c: e002 b.n 8007c14 } else { pcb->rcv_wnd = rcv_wnd; 8007c0e: 687b ldr r3, [r7, #4] 8007c10: 89fa ldrh r2, [r7, #14] 8007c12: 851a strh r2, [r3, #40] ; 0x28 } wnd_inflation = tcp_update_rcv_ann_wnd(pcb); 8007c14: 6878 ldr r0, [r7, #4] 8007c16: f7ff ff71 bl 8007afc 8007c1a: 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) { 8007c1c: 68bb ldr r3, [r7, #8] 8007c1e: f5b3 7f06 cmp.w r3, #536 ; 0x218 8007c22: d309 bcc.n 8007c38 tcp_ack_now(pcb); 8007c24: 687b ldr r3, [r7, #4] 8007c26: 8b5b ldrh r3, [r3, #26] 8007c28: f043 0302 orr.w r3, r3, #2 8007c2c: b29a uxth r2, r3 8007c2e: 687b ldr r3, [r7, #4] 8007c30: 835a strh r2, [r3, #26] tcp_output(pcb); 8007c32: 6878 ldr r0, [r7, #4] 8007c34: f004 fcde bl 800c5f4 } 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))); } 8007c38: 3710 adds r7, #16 8007c3a: 46bd mov sp, r7 8007c3c: bd80 pop {r7, pc} 8007c3e: bf00 nop 8007c40: 08012a08 .word 0x08012a08 8007c44: 08012ca4 .word 0x08012ca4 8007c48: 08012a4c .word 0x08012a4c 8007c4c: 08012cbc .word 0x08012cbc 08007c50 : * * @return a new (free) local TCP port number */ static u16_t tcp_new_port(void) { 8007c50: b480 push {r7} 8007c52: b083 sub sp, #12 8007c54: af00 add r7, sp, #0 u8_t i; u16_t n = 0; 8007c56: 2300 movs r3, #0 8007c58: 80bb strh r3, [r7, #4] struct tcp_pcb *pcb; again: tcp_port++; 8007c5a: 4b1e ldr r3, [pc, #120] ; (8007cd4 ) 8007c5c: 881b ldrh r3, [r3, #0] 8007c5e: 3301 adds r3, #1 8007c60: b29a uxth r2, r3 8007c62: 4b1c ldr r3, [pc, #112] ; (8007cd4 ) 8007c64: 801a strh r2, [r3, #0] if (tcp_port == TCP_LOCAL_PORT_RANGE_END) { 8007c66: 4b1b ldr r3, [pc, #108] ; (8007cd4 ) 8007c68: 881b ldrh r3, [r3, #0] 8007c6a: f64f 72ff movw r2, #65535 ; 0xffff 8007c6e: 4293 cmp r3, r2 8007c70: d103 bne.n 8007c7a tcp_port = TCP_LOCAL_PORT_RANGE_START; 8007c72: 4b18 ldr r3, [pc, #96] ; (8007cd4 ) 8007c74: f44f 4240 mov.w r2, #49152 ; 0xc000 8007c78: 801a strh r2, [r3, #0] } /* Check all PCB lists. */ for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { 8007c7a: 2300 movs r3, #0 8007c7c: 71fb strb r3, [r7, #7] 8007c7e: e01e b.n 8007cbe for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { 8007c80: 79fb ldrb r3, [r7, #7] 8007c82: 4a15 ldr r2, [pc, #84] ; (8007cd8 ) 8007c84: f852 3023 ldr.w r3, [r2, r3, lsl #2] 8007c88: 681b ldr r3, [r3, #0] 8007c8a: 603b str r3, [r7, #0] 8007c8c: e011 b.n 8007cb2 if (pcb->local_port == tcp_port) { 8007c8e: 683b ldr r3, [r7, #0] 8007c90: 8ada ldrh r2, [r3, #22] 8007c92: 4b10 ldr r3, [pc, #64] ; (8007cd4 ) 8007c94: 881b ldrh r3, [r3, #0] 8007c96: 429a cmp r2, r3 8007c98: d108 bne.n 8007cac n++; 8007c9a: 88bb ldrh r3, [r7, #4] 8007c9c: 3301 adds r3, #1 8007c9e: 80bb strh r3, [r7, #4] if (n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) { 8007ca0: 88bb ldrh r3, [r7, #4] 8007ca2: f5b3 4f80 cmp.w r3, #16384 ; 0x4000 8007ca6: d3d8 bcc.n 8007c5a return 0; 8007ca8: 2300 movs r3, #0 8007caa: e00d b.n 8007cc8 for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { 8007cac: 683b ldr r3, [r7, #0] 8007cae: 68db ldr r3, [r3, #12] 8007cb0: 603b str r3, [r7, #0] 8007cb2: 683b ldr r3, [r7, #0] 8007cb4: 2b00 cmp r3, #0 8007cb6: d1ea bne.n 8007c8e for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { 8007cb8: 79fb ldrb r3, [r7, #7] 8007cba: 3301 adds r3, #1 8007cbc: 71fb strb r3, [r7, #7] 8007cbe: 79fb ldrb r3, [r7, #7] 8007cc0: 2b03 cmp r3, #3 8007cc2: d9dd bls.n 8007c80 } goto again; } } } return tcp_port; 8007cc4: 4b03 ldr r3, [pc, #12] ; (8007cd4 ) 8007cc6: 881b ldrh r3, [r3, #0] } 8007cc8: 4618 mov r0, r3 8007cca: 370c adds r7, #12 8007ccc: 46bd mov sp, r7 8007cce: f85d 7b04 ldr.w r7, [sp], #4 8007cd2: 4770 bx lr 8007cd4: 24000068 .word 0x24000068 8007cd8: 08014d6c .word 0x08014d6c 08007cdc : * other err_t values if connect request couldn't be sent */ err_t tcp_connect(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, tcp_connected_fn connected) { 8007cdc: b580 push {r7, lr} 8007cde: b08a sub sp, #40 ; 0x28 8007ce0: af00 add r7, sp, #0 8007ce2: 60f8 str r0, [r7, #12] 8007ce4: 60b9 str r1, [r7, #8] 8007ce6: 603b str r3, [r7, #0] 8007ce8: 4613 mov r3, r2 8007cea: 80fb strh r3, [r7, #6] struct netif *netif = NULL; 8007cec: 2300 movs r3, #0 8007cee: 627b str r3, [r7, #36] ; 0x24 u32_t iss; u16_t old_local_port; LWIP_ASSERT_CORE_LOCKED(); LWIP_ERROR("tcp_connect: invalid pcb", pcb != NULL, return ERR_ARG); 8007cf0: 68fb ldr r3, [r7, #12] 8007cf2: 2b00 cmp r3, #0 8007cf4: d109 bne.n 8007d0a 8007cf6: 4b7d ldr r3, [pc, #500] ; (8007eec ) 8007cf8: f240 4235 movw r2, #1077 ; 0x435 8007cfc: 497c ldr r1, [pc, #496] ; (8007ef0 ) 8007cfe: 487d ldr r0, [pc, #500] ; (8007ef4 ) 8007d00: f008 ff62 bl 8010bc8 8007d04: f06f 030f mvn.w r3, #15 8007d08: e0ec b.n 8007ee4 LWIP_ERROR("tcp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG); 8007d0a: 68bb ldr r3, [r7, #8] 8007d0c: 2b00 cmp r3, #0 8007d0e: d109 bne.n 8007d24 8007d10: 4b76 ldr r3, [pc, #472] ; (8007eec ) 8007d12: f240 4236 movw r2, #1078 ; 0x436 8007d16: 4978 ldr r1, [pc, #480] ; (8007ef8 ) 8007d18: 4876 ldr r0, [pc, #472] ; (8007ef4 ) 8007d1a: f008 ff55 bl 8010bc8 8007d1e: f06f 030f mvn.w r3, #15 8007d22: e0df b.n 8007ee4 LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN); 8007d24: 68fb ldr r3, [r7, #12] 8007d26: 7d1b ldrb r3, [r3, #20] 8007d28: 2b00 cmp r3, #0 8007d2a: d009 beq.n 8007d40 8007d2c: 4b6f ldr r3, [pc, #444] ; (8007eec ) 8007d2e: f44f 6287 mov.w r2, #1080 ; 0x438 8007d32: 4972 ldr r1, [pc, #456] ; (8007efc ) 8007d34: 486f ldr r0, [pc, #444] ; (8007ef4 ) 8007d36: f008 ff47 bl 8010bc8 8007d3a: f06f 0309 mvn.w r3, #9 8007d3e: e0d1 b.n 8007ee4 LWIP_DEBUGF(TCP_DEBUG, ("tcp_connect to port %"U16_F"\n", port)); ip_addr_set(&pcb->remote_ip, ipaddr); 8007d40: 68bb ldr r3, [r7, #8] 8007d42: 2b00 cmp r3, #0 8007d44: d002 beq.n 8007d4c 8007d46: 68bb ldr r3, [r7, #8] 8007d48: 681b ldr r3, [r3, #0] 8007d4a: e000 b.n 8007d4e 8007d4c: 2300 movs r3, #0 8007d4e: 68fa ldr r2, [r7, #12] 8007d50: 6053 str r3, [r2, #4] pcb->remote_port = port; 8007d52: 68fb ldr r3, [r7, #12] 8007d54: 88fa ldrh r2, [r7, #6] 8007d56: 831a strh r2, [r3, #24] if (pcb->netif_idx != NETIF_NO_INDEX) { 8007d58: 68fb ldr r3, [r7, #12] 8007d5a: 7a1b ldrb r3, [r3, #8] 8007d5c: 2b00 cmp r3, #0 8007d5e: d006 beq.n 8007d6e netif = netif_get_by_index(pcb->netif_idx); 8007d60: 68fb ldr r3, [r7, #12] 8007d62: 7a1b ldrb r3, [r3, #8] 8007d64: 4618 mov r0, r3 8007d66: f7fe fdd5 bl 8006914 8007d6a: 6278 str r0, [r7, #36] ; 0x24 8007d6c: e005 b.n 8007d7a } else { /* check if we have a route to the remote host */ netif = ip_route(&pcb->local_ip, &pcb->remote_ip); 8007d6e: 68fb ldr r3, [r7, #12] 8007d70: 3304 adds r3, #4 8007d72: 4618 mov r0, r3 8007d74: f007 f888 bl 800ee88 8007d78: 6278 str r0, [r7, #36] ; 0x24 } if (netif == NULL) { 8007d7a: 6a7b ldr r3, [r7, #36] ; 0x24 8007d7c: 2b00 cmp r3, #0 8007d7e: d102 bne.n 8007d86 /* Don't even try to send a SYN packet if we have no route since that will fail. */ return ERR_RTE; 8007d80: f06f 0303 mvn.w r3, #3 8007d84: e0ae b.n 8007ee4 } /* check if local IP has been assigned to pcb, if not, get one */ if (ip_addr_isany(&pcb->local_ip)) { 8007d86: 68fb ldr r3, [r7, #12] 8007d88: 2b00 cmp r3, #0 8007d8a: d003 beq.n 8007d94 8007d8c: 68fb ldr r3, [r7, #12] 8007d8e: 681b ldr r3, [r3, #0] 8007d90: 2b00 cmp r3, #0 8007d92: d111 bne.n 8007db8 const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, ipaddr); 8007d94: 6a7b ldr r3, [r7, #36] ; 0x24 8007d96: 2b00 cmp r3, #0 8007d98: d002 beq.n 8007da0 8007d9a: 6a7b ldr r3, [r7, #36] ; 0x24 8007d9c: 3304 adds r3, #4 8007d9e: e000 b.n 8007da2 8007da0: 2300 movs r3, #0 8007da2: 61fb str r3, [r7, #28] if (local_ip == NULL) { 8007da4: 69fb ldr r3, [r7, #28] 8007da6: 2b00 cmp r3, #0 8007da8: d102 bne.n 8007db0 return ERR_RTE; 8007daa: f06f 0303 mvn.w r3, #3 8007dae: e099 b.n 8007ee4 } ip_addr_copy(pcb->local_ip, *local_ip); 8007db0: 69fb ldr r3, [r7, #28] 8007db2: 681a ldr r2, [r3, #0] 8007db4: 68fb ldr r3, [r7, #12] 8007db6: 601a str r2, [r3, #0] ip6_addr_lacks_zone(ip_2_ip6(&pcb->remote_ip), IP6_UNICAST)) { ip6_addr_assign_zone(ip_2_ip6(&pcb->remote_ip), IP6_UNICAST, netif); } #endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */ old_local_port = pcb->local_port; 8007db8: 68fb ldr r3, [r7, #12] 8007dba: 8adb ldrh r3, [r3, #22] 8007dbc: 837b strh r3, [r7, #26] if (pcb->local_port == 0) { 8007dbe: 68fb ldr r3, [r7, #12] 8007dc0: 8adb ldrh r3, [r3, #22] 8007dc2: 2b00 cmp r3, #0 8007dc4: d10c bne.n 8007de0 pcb->local_port = tcp_new_port(); 8007dc6: f7ff ff43 bl 8007c50 8007dca: 4603 mov r3, r0 8007dcc: 461a mov r2, r3 8007dce: 68fb ldr r3, [r7, #12] 8007dd0: 82da strh r2, [r3, #22] if (pcb->local_port == 0) { 8007dd2: 68fb ldr r3, [r7, #12] 8007dd4: 8adb ldrh r3, [r3, #22] 8007dd6: 2b00 cmp r3, #0 8007dd8: d102 bne.n 8007de0 return ERR_BUF; 8007dda: f06f 0301 mvn.w r3, #1 8007dde: e081 b.n 8007ee4 } } #endif /* SO_REUSE */ } iss = tcp_next_iss(pcb); 8007de0: 68f8 ldr r0, [r7, #12] 8007de2: f001 f819 bl 8008e18 8007de6: 6178 str r0, [r7, #20] pcb->rcv_nxt = 0; 8007de8: 68fb ldr r3, [r7, #12] 8007dea: 2200 movs r2, #0 8007dec: 625a str r2, [r3, #36] ; 0x24 pcb->snd_nxt = iss; 8007dee: 68fb ldr r3, [r7, #12] 8007df0: 697a ldr r2, [r7, #20] 8007df2: 651a str r2, [r3, #80] ; 0x50 pcb->lastack = iss - 1; 8007df4: 697b ldr r3, [r7, #20] 8007df6: 1e5a subs r2, r3, #1 8007df8: 68fb ldr r3, [r7, #12] 8007dfa: 645a str r2, [r3, #68] ; 0x44 pcb->snd_wl2 = iss - 1; 8007dfc: 697b ldr r3, [r7, #20] 8007dfe: 1e5a subs r2, r3, #1 8007e00: 68fb ldr r3, [r7, #12] 8007e02: 659a str r2, [r3, #88] ; 0x58 pcb->snd_lbb = iss - 1; 8007e04: 697b ldr r3, [r7, #20] 8007e06: 1e5a subs r2, r3, #1 8007e08: 68fb ldr r3, [r7, #12] 8007e0a: 65da str r2, [r3, #92] ; 0x5c /* 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); 8007e0c: 68fb ldr r3, [r7, #12] 8007e0e: f44f 6206 mov.w r2, #2144 ; 0x860 8007e12: 855a strh r2, [r3, #42] ; 0x2a 8007e14: 68fb ldr r3, [r7, #12] 8007e16: 8d5a ldrh r2, [r3, #42] ; 0x2a 8007e18: 68fb ldr r3, [r7, #12] 8007e1a: 851a strh r2, [r3, #40] ; 0x28 pcb->rcv_ann_right_edge = pcb->rcv_nxt; 8007e1c: 68fb ldr r3, [r7, #12] 8007e1e: 6a5a ldr r2, [r3, #36] ; 0x24 8007e20: 68fb ldr r3, [r7, #12] 8007e22: 62da str r2, [r3, #44] ; 0x2c pcb->snd_wnd = TCP_WND; 8007e24: 68fb ldr r3, [r7, #12] 8007e26: f44f 6206 mov.w r2, #2144 ; 0x860 8007e2a: f8a3 2060 strh.w r2, [r3, #96] ; 0x60 /* 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; 8007e2e: 68fb ldr r3, [r7, #12] 8007e30: f44f 7206 mov.w r2, #536 ; 0x218 8007e34: 865a strh r2, [r3, #50] ; 0x32 #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss_netif(pcb->mss, netif, &pcb->remote_ip); 8007e36: 68fb ldr r3, [r7, #12] 8007e38: 8e58 ldrh r0, [r3, #50] ; 0x32 8007e3a: 68fb ldr r3, [r7, #12] 8007e3c: 3304 adds r3, #4 8007e3e: 461a mov r2, r3 8007e40: 6a79 ldr r1, [r7, #36] ; 0x24 8007e42: f001 f80f bl 8008e64 8007e46: 4603 mov r3, r0 8007e48: 461a mov r2, r3 8007e4a: 68fb ldr r3, [r7, #12] 8007e4c: 865a strh r2, [r3, #50] ; 0x32 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ pcb->cwnd = 1; 8007e4e: 68fb ldr r3, [r7, #12] 8007e50: 2201 movs r2, #1 8007e52: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 #if LWIP_CALLBACK_API pcb->connected = connected; 8007e56: 68fb ldr r3, [r7, #12] 8007e58: 683a ldr r2, [r7, #0] 8007e5a: f8c3 2088 str.w r2, [r3, #136] ; 0x88 #else /* LWIP_CALLBACK_API */ LWIP_UNUSED_ARG(connected); #endif /* LWIP_CALLBACK_API */ /* Send a SYN together with the MSS option. */ ret = tcp_enqueue_flags(pcb, TCP_SYN); 8007e5e: 2102 movs r1, #2 8007e60: 68f8 ldr r0, [r7, #12] 8007e62: f004 fad9 bl 800c418 8007e66: 4603 mov r3, r0 8007e68: 74fb strb r3, [r7, #19] if (ret == ERR_OK) { 8007e6a: f997 3013 ldrsb.w r3, [r7, #19] 8007e6e: 2b00 cmp r3, #0 8007e70: d136 bne.n 8007ee0 /* SYN segment was enqueued, changed the pcbs state now */ pcb->state = SYN_SENT; 8007e72: 68fb ldr r3, [r7, #12] 8007e74: 2202 movs r2, #2 8007e76: 751a strb r2, [r3, #20] if (old_local_port != 0) { 8007e78: 8b7b ldrh r3, [r7, #26] 8007e7a: 2b00 cmp r3, #0 8007e7c: d021 beq.n 8007ec2 TCP_RMV(&tcp_bound_pcbs, pcb); 8007e7e: 4b20 ldr r3, [pc, #128] ; (8007f00 ) 8007e80: 681b ldr r3, [r3, #0] 8007e82: 68fa ldr r2, [r7, #12] 8007e84: 429a cmp r2, r3 8007e86: d105 bne.n 8007e94 8007e88: 4b1d ldr r3, [pc, #116] ; (8007f00 ) 8007e8a: 681b ldr r3, [r3, #0] 8007e8c: 68db ldr r3, [r3, #12] 8007e8e: 4a1c ldr r2, [pc, #112] ; (8007f00 ) 8007e90: 6013 str r3, [r2, #0] 8007e92: e013 b.n 8007ebc 8007e94: 4b1a ldr r3, [pc, #104] ; (8007f00 ) 8007e96: 681b ldr r3, [r3, #0] 8007e98: 623b str r3, [r7, #32] 8007e9a: e00c b.n 8007eb6 8007e9c: 6a3b ldr r3, [r7, #32] 8007e9e: 68db ldr r3, [r3, #12] 8007ea0: 68fa ldr r2, [r7, #12] 8007ea2: 429a cmp r2, r3 8007ea4: d104 bne.n 8007eb0 8007ea6: 68fb ldr r3, [r7, #12] 8007ea8: 68da ldr r2, [r3, #12] 8007eaa: 6a3b ldr r3, [r7, #32] 8007eac: 60da str r2, [r3, #12] 8007eae: e005 b.n 8007ebc 8007eb0: 6a3b ldr r3, [r7, #32] 8007eb2: 68db ldr r3, [r3, #12] 8007eb4: 623b str r3, [r7, #32] 8007eb6: 6a3b ldr r3, [r7, #32] 8007eb8: 2b00 cmp r3, #0 8007eba: d1ef bne.n 8007e9c 8007ebc: 68fb ldr r3, [r7, #12] 8007ebe: 2200 movs r2, #0 8007ec0: 60da str r2, [r3, #12] } TCP_REG_ACTIVE(pcb); 8007ec2: 4b10 ldr r3, [pc, #64] ; (8007f04 ) 8007ec4: 681a ldr r2, [r3, #0] 8007ec6: 68fb ldr r3, [r7, #12] 8007ec8: 60da str r2, [r3, #12] 8007eca: 4a0e ldr r2, [pc, #56] ; (8007f04 ) 8007ecc: 68fb ldr r3, [r7, #12] 8007ece: 6013 str r3, [r2, #0] 8007ed0: f005 fb12 bl 800d4f8 8007ed4: 4b0c ldr r3, [pc, #48] ; (8007f08 ) 8007ed6: 2201 movs r2, #1 8007ed8: 701a strb r2, [r3, #0] MIB2_STATS_INC(mib2.tcpactiveopens); tcp_output(pcb); 8007eda: 68f8 ldr r0, [r7, #12] 8007edc: f004 fb8a bl 800c5f4 } return ret; 8007ee0: f997 3013 ldrsb.w r3, [r7, #19] } 8007ee4: 4618 mov r0, r3 8007ee6: 3728 adds r7, #40 ; 0x28 8007ee8: 46bd mov sp, r7 8007eea: bd80 pop {r7, pc} 8007eec: 08012a08 .word 0x08012a08 8007ef0: 08012ce4 .word 0x08012ce4 8007ef4: 08012a4c .word 0x08012a4c 8007ef8: 08012d00 .word 0x08012d00 8007efc: 08012d1c .word 0x08012d1c 8007f00: 24007b70 .word 0x24007b70 8007f04: 24007b78 .word 0x24007b78 8007f08: 24007b80 .word 0x24007b80 08007f0c : * * Automatically called from tcp_tmr(). */ void tcp_slowtmr(void) { 8007f0c: b5b0 push {r4, r5, r7, lr} 8007f0e: b090 sub sp, #64 ; 0x40 8007f10: 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; 8007f12: 2300 movs r3, #0 8007f14: f887 3025 strb.w r3, [r7, #37] ; 0x25 ++tcp_ticks; 8007f18: 4b94 ldr r3, [pc, #592] ; (800816c ) 8007f1a: 681b ldr r3, [r3, #0] 8007f1c: 3301 adds r3, #1 8007f1e: 4a93 ldr r2, [pc, #588] ; (800816c ) 8007f20: 6013 str r3, [r2, #0] ++tcp_timer_ctr; 8007f22: 4b93 ldr r3, [pc, #588] ; (8008170 ) 8007f24: 781b ldrb r3, [r3, #0] 8007f26: 3301 adds r3, #1 8007f28: b2da uxtb r2, r3 8007f2a: 4b91 ldr r3, [pc, #580] ; (8008170 ) 8007f2c: 701a strb r2, [r3, #0] tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; 8007f2e: 2300 movs r3, #0 8007f30: 62bb str r3, [r7, #40] ; 0x28 pcb = tcp_active_pcbs; 8007f32: 4b90 ldr r3, [pc, #576] ; (8008174 ) 8007f34: 681b ldr r3, [r3, #0] 8007f36: 62fb str r3, [r7, #44] ; 0x2c if (pcb == NULL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n")); } while (pcb != NULL) { 8007f38: e29d b.n 8008476 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: processing active pcb\n")); LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED); 8007f3a: 6afb ldr r3, [r7, #44] ; 0x2c 8007f3c: 7d1b ldrb r3, [r3, #20] 8007f3e: 2b00 cmp r3, #0 8007f40: d106 bne.n 8007f50 8007f42: 4b8d ldr r3, [pc, #564] ; (8008178 ) 8007f44: f240 42be movw r2, #1214 ; 0x4be 8007f48: 498c ldr r1, [pc, #560] ; (800817c ) 8007f4a: 488d ldr r0, [pc, #564] ; (8008180 ) 8007f4c: f008 fe3c bl 8010bc8 LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN); 8007f50: 6afb ldr r3, [r7, #44] ; 0x2c 8007f52: 7d1b ldrb r3, [r3, #20] 8007f54: 2b01 cmp r3, #1 8007f56: d106 bne.n 8007f66 8007f58: 4b87 ldr r3, [pc, #540] ; (8008178 ) 8007f5a: f240 42bf movw r2, #1215 ; 0x4bf 8007f5e: 4989 ldr r1, [pc, #548] ; (8008184 ) 8007f60: 4887 ldr r0, [pc, #540] ; (8008180 ) 8007f62: f008 fe31 bl 8010bc8 LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT); 8007f66: 6afb ldr r3, [r7, #44] ; 0x2c 8007f68: 7d1b ldrb r3, [r3, #20] 8007f6a: 2b0a cmp r3, #10 8007f6c: d106 bne.n 8007f7c 8007f6e: 4b82 ldr r3, [pc, #520] ; (8008178 ) 8007f70: f44f 6298 mov.w r2, #1216 ; 0x4c0 8007f74: 4984 ldr r1, [pc, #528] ; (8008188 ) 8007f76: 4882 ldr r0, [pc, #520] ; (8008180 ) 8007f78: f008 fe26 bl 8010bc8 if (pcb->last_timer == tcp_timer_ctr) { 8007f7c: 6afb ldr r3, [r7, #44] ; 0x2c 8007f7e: 7f9a ldrb r2, [r3, #30] 8007f80: 4b7b ldr r3, [pc, #492] ; (8008170 ) 8007f82: 781b ldrb r3, [r3, #0] 8007f84: 429a cmp r2, r3 8007f86: d105 bne.n 8007f94 /* skip this pcb, we have already processed it */ prev = pcb; 8007f88: 6afb ldr r3, [r7, #44] ; 0x2c 8007f8a: 62bb str r3, [r7, #40] ; 0x28 pcb = pcb->next; 8007f8c: 6afb ldr r3, [r7, #44] ; 0x2c 8007f8e: 68db ldr r3, [r3, #12] 8007f90: 62fb str r3, [r7, #44] ; 0x2c continue; 8007f92: e270 b.n 8008476 } pcb->last_timer = tcp_timer_ctr; 8007f94: 4b76 ldr r3, [pc, #472] ; (8008170 ) 8007f96: 781a ldrb r2, [r3, #0] 8007f98: 6afb ldr r3, [r7, #44] ; 0x2c 8007f9a: 779a strb r2, [r3, #30] pcb_remove = 0; 8007f9c: 2300 movs r3, #0 8007f9e: f887 3027 strb.w r3, [r7, #39] ; 0x27 pcb_reset = 0; 8007fa2: 2300 movs r3, #0 8007fa4: f887 3026 strb.w r3, [r7, #38] ; 0x26 if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) { 8007fa8: 6afb ldr r3, [r7, #44] ; 0x2c 8007faa: 7d1b ldrb r3, [r3, #20] 8007fac: 2b02 cmp r3, #2 8007fae: d10a bne.n 8007fc6 8007fb0: 6afb ldr r3, [r7, #44] ; 0x2c 8007fb2: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 8007fb6: 2b05 cmp r3, #5 8007fb8: d905 bls.n 8007fc6 ++pcb_remove; 8007fba: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 8007fbe: 3301 adds r3, #1 8007fc0: f887 3027 strb.w r3, [r7, #39] ; 0x27 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n")); 8007fc4: e11e b.n 8008204 } else if (pcb->nrtx >= TCP_MAXRTX) { 8007fc6: 6afb ldr r3, [r7, #44] ; 0x2c 8007fc8: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 8007fcc: 2b0b cmp r3, #11 8007fce: d905 bls.n 8007fdc ++pcb_remove; 8007fd0: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 8007fd4: 3301 adds r3, #1 8007fd6: f887 3027 strb.w r3, [r7, #39] ; 0x27 8007fda: e113 b.n 8008204 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); } else { if (pcb->persist_backoff > 0) { 8007fdc: 6afb ldr r3, [r7, #44] ; 0x2c 8007fde: f893 3099 ldrb.w r3, [r3, #153] ; 0x99 8007fe2: 2b00 cmp r3, #0 8007fe4: d075 beq.n 80080d2 LWIP_ASSERT("tcp_slowtimr: persist ticking with in-flight data", pcb->unacked == NULL); 8007fe6: 6afb ldr r3, [r7, #44] ; 0x2c 8007fe8: 6f1b ldr r3, [r3, #112] ; 0x70 8007fea: 2b00 cmp r3, #0 8007fec: d006 beq.n 8007ffc 8007fee: 4b62 ldr r3, [pc, #392] ; (8008178 ) 8007ff0: f240 42d4 movw r2, #1236 ; 0x4d4 8007ff4: 4965 ldr r1, [pc, #404] ; (800818c ) 8007ff6: 4862 ldr r0, [pc, #392] ; (8008180 ) 8007ff8: f008 fde6 bl 8010bc8 LWIP_ASSERT("tcp_slowtimr: persist ticking with empty send buffer", pcb->unsent != NULL); 8007ffc: 6afb ldr r3, [r7, #44] ; 0x2c 8007ffe: 6edb ldr r3, [r3, #108] ; 0x6c 8008000: 2b00 cmp r3, #0 8008002: d106 bne.n 8008012 8008004: 4b5c ldr r3, [pc, #368] ; (8008178 ) 8008006: f240 42d5 movw r2, #1237 ; 0x4d5 800800a: 4961 ldr r1, [pc, #388] ; (8008190 ) 800800c: 485c ldr r0, [pc, #368] ; (8008180 ) 800800e: f008 fddb bl 8010bc8 if (pcb->persist_probe >= TCP_MAXRTX) { 8008012: 6afb ldr r3, [r7, #44] ; 0x2c 8008014: f893 309a ldrb.w r3, [r3, #154] ; 0x9a 8008018: 2b0b cmp r3, #11 800801a: d905 bls.n 8008028 ++pcb_remove; /* max probes reached */ 800801c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 8008020: 3301 adds r3, #1 8008022: f887 3027 strb.w r3, [r7, #39] ; 0x27 8008026: e0ed b.n 8008204 } else { u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff - 1]; 8008028: 6afb ldr r3, [r7, #44] ; 0x2c 800802a: f893 3099 ldrb.w r3, [r3, #153] ; 0x99 800802e: 3b01 subs r3, #1 8008030: 4a58 ldr r2, [pc, #352] ; (8008194 ) 8008032: 5cd3 ldrb r3, [r2, r3] 8008034: 747b strb r3, [r7, #17] if (pcb->persist_cnt < backoff_cnt) { 8008036: 6afb ldr r3, [r7, #44] ; 0x2c 8008038: f893 3098 ldrb.w r3, [r3, #152] ; 0x98 800803c: 7c7a ldrb r2, [r7, #17] 800803e: 429a cmp r2, r3 8008040: d907 bls.n 8008052 pcb->persist_cnt++; 8008042: 6afb ldr r3, [r7, #44] ; 0x2c 8008044: f893 3098 ldrb.w r3, [r3, #152] ; 0x98 8008048: 3301 adds r3, #1 800804a: b2da uxtb r2, r3 800804c: 6afb ldr r3, [r7, #44] ; 0x2c 800804e: f883 2098 strb.w r2, [r3, #152] ; 0x98 } if (pcb->persist_cnt >= backoff_cnt) { 8008052: 6afb ldr r3, [r7, #44] ; 0x2c 8008054: f893 3098 ldrb.w r3, [r3, #152] ; 0x98 8008058: 7c7a ldrb r2, [r7, #17] 800805a: 429a cmp r2, r3 800805c: f200 80d2 bhi.w 8008204 int next_slot = 1; /* increment timer to next slot */ 8008060: 2301 movs r3, #1 8008062: 623b str r3, [r7, #32] /* If snd_wnd is zero, send 1 byte probes */ if (pcb->snd_wnd == 0) { 8008064: 6afb ldr r3, [r7, #44] ; 0x2c 8008066: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60 800806a: 2b00 cmp r3, #0 800806c: d108 bne.n 8008080 if (tcp_zero_window_probe(pcb) != ERR_OK) { 800806e: 6af8 ldr r0, [r7, #44] ; 0x2c 8008070: f005 f974 bl 800d35c 8008074: 4603 mov r3, r0 8008076: 2b00 cmp r3, #0 8008078: d014 beq.n 80080a4 next_slot = 0; /* try probe again with current slot */ 800807a: 2300 movs r3, #0 800807c: 623b str r3, [r7, #32] 800807e: e011 b.n 80080a4 } /* 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) { 8008080: 6afb ldr r3, [r7, #44] ; 0x2c 8008082: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60 8008086: 4619 mov r1, r3 8008088: 6af8 ldr r0, [r7, #44] ; 0x2c 800808a: f004 f829 bl 800c0e0 800808e: 4603 mov r3, r0 8008090: 2b00 cmp r3, #0 8008092: d107 bne.n 80080a4 if (tcp_output(pcb) == ERR_OK) { 8008094: 6af8 ldr r0, [r7, #44] ; 0x2c 8008096: f004 faad bl 800c5f4 800809a: 4603 mov r3, r0 800809c: 2b00 cmp r3, #0 800809e: d101 bne.n 80080a4 /* sending will cancel persist timer, else retry with current slot */ next_slot = 0; 80080a0: 2300 movs r3, #0 80080a2: 623b str r3, [r7, #32] } } } if (next_slot) { 80080a4: 6a3b ldr r3, [r7, #32] 80080a6: 2b00 cmp r3, #0 80080a8: f000 80ac beq.w 8008204 pcb->persist_cnt = 0; 80080ac: 6afb ldr r3, [r7, #44] ; 0x2c 80080ae: 2200 movs r2, #0 80080b0: f883 2098 strb.w r2, [r3, #152] ; 0x98 if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { 80080b4: 6afb ldr r3, [r7, #44] ; 0x2c 80080b6: f893 3099 ldrb.w r3, [r3, #153] ; 0x99 80080ba: 2b06 cmp r3, #6 80080bc: f200 80a2 bhi.w 8008204 pcb->persist_backoff++; 80080c0: 6afb ldr r3, [r7, #44] ; 0x2c 80080c2: f893 3099 ldrb.w r3, [r3, #153] ; 0x99 80080c6: 3301 adds r3, #1 80080c8: b2da uxtb r2, r3 80080ca: 6afb ldr r3, [r7, #44] ; 0x2c 80080cc: f883 2099 strb.w r2, [r3, #153] ; 0x99 80080d0: e098 b.n 8008204 } } } } else { /* Increase the retransmission timer if it is running */ if ((pcb->rtime >= 0) && (pcb->rtime < 0x7FFF)) { 80080d2: 6afb ldr r3, [r7, #44] ; 0x2c 80080d4: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30 80080d8: 2b00 cmp r3, #0 80080da: db0f blt.n 80080fc 80080dc: 6afb ldr r3, [r7, #44] ; 0x2c 80080de: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30 80080e2: f647 72ff movw r2, #32767 ; 0x7fff 80080e6: 4293 cmp r3, r2 80080e8: d008 beq.n 80080fc ++pcb->rtime; 80080ea: 6afb ldr r3, [r7, #44] ; 0x2c 80080ec: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30 80080f0: b29b uxth r3, r3 80080f2: 3301 adds r3, #1 80080f4: b29b uxth r3, r3 80080f6: b21a sxth r2, r3 80080f8: 6afb ldr r3, [r7, #44] ; 0x2c 80080fa: 861a strh r2, [r3, #48] ; 0x30 } if (pcb->rtime >= pcb->rto) { 80080fc: 6afb ldr r3, [r7, #44] ; 0x2c 80080fe: f9b3 2030 ldrsh.w r2, [r3, #48] ; 0x30 8008102: 6afb ldr r3, [r7, #44] ; 0x2c 8008104: f9b3 3040 ldrsh.w r3, [r3, #64] ; 0x40 8008108: 429a cmp r2, r3 800810a: db7b blt.n 8008204 " 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))) { 800810c: 6af8 ldr r0, [r7, #44] ; 0x2c 800810e: f004 fd67 bl 800cbe0 8008112: 4603 mov r3, r0 8008114: 2b00 cmp r3, #0 8008116: d007 beq.n 8008128 8008118: 6afb ldr r3, [r7, #44] ; 0x2c 800811a: 6f1b ldr r3, [r3, #112] ; 0x70 800811c: 2b00 cmp r3, #0 800811e: d171 bne.n 8008204 8008120: 6afb ldr r3, [r7, #44] ; 0x2c 8008122: 6edb ldr r3, [r3, #108] ; 0x6c 8008124: 2b00 cmp r3, #0 8008126: d06d beq.n 8008204 /* Double retransmission time-out unless we are trying to * connect to somebody (i.e., we are in SYN_SENT). */ if (pcb->state != SYN_SENT) { 8008128: 6afb ldr r3, [r7, #44] ; 0x2c 800812a: 7d1b ldrb r3, [r3, #20] 800812c: 2b02 cmp r3, #2 800812e: d03a beq.n 80081a6 u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff) - 1); 8008130: 6afb ldr r3, [r7, #44] ; 0x2c 8008132: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 8008136: 2b0c cmp r3, #12 8008138: bf28 it cs 800813a: 230c movcs r3, #12 800813c: 76fb strb r3, [r7, #27] int calc_rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx]; 800813e: 6afb ldr r3, [r7, #44] ; 0x2c 8008140: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c 8008144: 10db asrs r3, r3, #3 8008146: b21b sxth r3, r3 8008148: 461a mov r2, r3 800814a: 6afb ldr r3, [r7, #44] ; 0x2c 800814c: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e 8008150: 4413 add r3, r2 8008152: 7efa ldrb r2, [r7, #27] 8008154: 4910 ldr r1, [pc, #64] ; (8008198 ) 8008156: 5c8a ldrb r2, [r1, r2] 8008158: 4093 lsls r3, r2 800815a: 617b str r3, [r7, #20] pcb->rto = (s16_t)LWIP_MIN(calc_rto, 0x7FFF); 800815c: 697b ldr r3, [r7, #20] 800815e: f647 72fe movw r2, #32766 ; 0x7ffe 8008162: 4293 cmp r3, r2 8008164: dc1a bgt.n 800819c 8008166: 697b ldr r3, [r7, #20] 8008168: b21a sxth r2, r3 800816a: e019 b.n 80081a0 800816c: 24007b6c .word 0x24007b6c 8008170: 24007b82 .word 0x24007b82 8008174: 24007b78 .word 0x24007b78 8008178: 08012a08 .word 0x08012a08 800817c: 08012d4c .word 0x08012d4c 8008180: 08012a4c .word 0x08012a4c 8008184: 08012d78 .word 0x08012d78 8008188: 08012da4 .word 0x08012da4 800818c: 08012dd4 .word 0x08012dd4 8008190: 08012e08 .word 0x08012e08 8008194: 08014d64 .word 0x08014d64 8008198: 08014d54 .word 0x08014d54 800819c: f647 72ff movw r2, #32767 ; 0x7fff 80081a0: 6afb ldr r3, [r7, #44] ; 0x2c 80081a2: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 } /* Reset the retransmission timer. */ pcb->rtime = 0; 80081a6: 6afb ldr r3, [r7, #44] ; 0x2c 80081a8: 2200 movs r2, #0 80081aa: 861a strh r2, [r3, #48] ; 0x30 /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); 80081ac: 6afb ldr r3, [r7, #44] ; 0x2c 80081ae: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60 80081b2: 6afb ldr r3, [r7, #44] ; 0x2c 80081b4: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48 80081b8: 4293 cmp r3, r2 80081ba: bf28 it cs 80081bc: 4613 movcs r3, r2 80081be: 827b strh r3, [r7, #18] pcb->ssthresh = eff_wnd >> 1; 80081c0: 8a7b ldrh r3, [r7, #18] 80081c2: 085b lsrs r3, r3, #1 80081c4: b29a uxth r2, r3 80081c6: 6afb ldr r3, [r7, #44] ; 0x2c 80081c8: f8a3 204a strh.w r2, [r3, #74] ; 0x4a if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) { 80081cc: 6afb ldr r3, [r7, #44] ; 0x2c 80081ce: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a 80081d2: 6afb ldr r3, [r7, #44] ; 0x2c 80081d4: 8e5b ldrh r3, [r3, #50] ; 0x32 80081d6: 005b lsls r3, r3, #1 80081d8: b29b uxth r3, r3 80081da: 429a cmp r2, r3 80081dc: d206 bcs.n 80081ec pcb->ssthresh = (tcpwnd_size_t)(pcb->mss << 1); 80081de: 6afb ldr r3, [r7, #44] ; 0x2c 80081e0: 8e5b ldrh r3, [r3, #50] ; 0x32 80081e2: 005b lsls r3, r3, #1 80081e4: b29a uxth r2, r3 80081e6: 6afb ldr r3, [r7, #44] ; 0x2c 80081e8: f8a3 204a strh.w r2, [r3, #74] ; 0x4a } pcb->cwnd = pcb->mss; 80081ec: 6afb ldr r3, [r7, #44] ; 0x2c 80081ee: 8e5a ldrh r2, [r3, #50] ; 0x32 80081f0: 6afb ldr r3, [r7, #44] ; 0x2c 80081f2: 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; 80081f6: 6afb ldr r3, [r7, #44] ; 0x2c 80081f8: 2200 movs r2, #0 80081fa: 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); 80081fe: 6af8 ldr r0, [r7, #44] ; 0x2c 8008200: f004 fd68 bl 800ccd4 } } } } /* Check if this PCB has stayed too long in FIN-WAIT-2 */ if (pcb->state == FIN_WAIT_2) { 8008204: 6afb ldr r3, [r7, #44] ; 0x2c 8008206: 7d1b ldrb r3, [r3, #20] 8008208: 2b06 cmp r3, #6 800820a: d111 bne.n 8008230 /* If this PCB is in FIN_WAIT_2 because of SHUT_WR don't let it time out. */ if (pcb->flags & TF_RXCLOSED) { 800820c: 6afb ldr r3, [r7, #44] ; 0x2c 800820e: 8b5b ldrh r3, [r3, #26] 8008210: f003 0310 and.w r3, r3, #16 8008214: 2b00 cmp r3, #0 8008216: d00b beq.n 8008230 /* PCB was fully closed (either through close() or SHUT_RDWR): normal FIN-WAIT timeout handling. */ if ((u32_t)(tcp_ticks - pcb->tmr) > 8008218: 4b9c ldr r3, [pc, #624] ; (800848c ) 800821a: 681a ldr r2, [r3, #0] 800821c: 6afb ldr r3, [r7, #44] ; 0x2c 800821e: 6a1b ldr r3, [r3, #32] 8008220: 1ad3 subs r3, r2, r3 8008222: 2b28 cmp r3, #40 ; 0x28 8008224: d904 bls.n 8008230 TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) { ++pcb_remove; 8008226: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 800822a: 3301 adds r3, #1 800822c: f887 3027 strb.w r3, [r7, #39] ; 0x27 } } } /* Check if KEEPALIVE should be sent */ if (ip_get_option(pcb, SOF_KEEPALIVE) && 8008230: 6afb ldr r3, [r7, #44] ; 0x2c 8008232: 7a5b ldrb r3, [r3, #9] 8008234: f003 0308 and.w r3, r3, #8 8008238: 2b00 cmp r3, #0 800823a: d04a beq.n 80082d2 ((pcb->state == ESTABLISHED) || 800823c: 6afb ldr r3, [r7, #44] ; 0x2c 800823e: 7d1b ldrb r3, [r3, #20] if (ip_get_option(pcb, SOF_KEEPALIVE) && 8008240: 2b04 cmp r3, #4 8008242: d003 beq.n 800824c (pcb->state == CLOSE_WAIT))) { 8008244: 6afb ldr r3, [r7, #44] ; 0x2c 8008246: 7d1b ldrb r3, [r3, #20] ((pcb->state == ESTABLISHED) || 8008248: 2b07 cmp r3, #7 800824a: d142 bne.n 80082d2 if ((u32_t)(tcp_ticks - pcb->tmr) > 800824c: 4b8f ldr r3, [pc, #572] ; (800848c ) 800824e: 681a ldr r2, [r3, #0] 8008250: 6afb ldr r3, [r7, #44] ; 0x2c 8008252: 6a1b ldr r3, [r3, #32] 8008254: 1ad2 subs r2, r2, r3 (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) { 8008256: 6afb ldr r3, [r7, #44] ; 0x2c 8008258: f8d3 1094 ldr.w r1, [r3, #148] ; 0x94 800825c: 4b8c ldr r3, [pc, #560] ; (8008490 ) 800825e: 440b add r3, r1 8008260: 498c ldr r1, [pc, #560] ; (8008494 ) 8008262: fba1 1303 umull r1, r3, r1, r3 8008266: 095b lsrs r3, r3, #5 if ((u32_t)(tcp_ticks - pcb->tmr) > 8008268: 429a cmp r2, r3 800826a: d90a bls.n 8008282 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; 800826c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 8008270: 3301 adds r3, #1 8008272: f887 3027 strb.w r3, [r7, #39] ; 0x27 ++pcb_reset; 8008276: f897 3026 ldrb.w r3, [r7, #38] ; 0x26 800827a: 3301 adds r3, #1 800827c: f887 3026 strb.w r3, [r7, #38] ; 0x26 8008280: e027 b.n 80082d2 } else if ((u32_t)(tcp_ticks - pcb->tmr) > 8008282: 4b82 ldr r3, [pc, #520] ; (800848c ) 8008284: 681a ldr r2, [r3, #0] 8008286: 6afb ldr r3, [r7, #44] ; 0x2c 8008288: 6a1b ldr r3, [r3, #32] 800828a: 1ad2 subs r2, r2, r3 (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) 800828c: 6afb ldr r3, [r7, #44] ; 0x2c 800828e: f8d3 1094 ldr.w r1, [r3, #148] ; 0x94 8008292: 6afb ldr r3, [r7, #44] ; 0x2c 8008294: f893 309b ldrb.w r3, [r3, #155] ; 0x9b 8008298: 4618 mov r0, r3 800829a: 4b7f ldr r3, [pc, #508] ; (8008498 ) 800829c: fb00 f303 mul.w r3, r0, r3 80082a0: 440b add r3, r1 / TCP_SLOW_INTERVAL) { 80082a2: 497c ldr r1, [pc, #496] ; (8008494 ) 80082a4: fba1 1303 umull r1, r3, r1, r3 80082a8: 095b lsrs r3, r3, #5 } else if ((u32_t)(tcp_ticks - pcb->tmr) > 80082aa: 429a cmp r2, r3 80082ac: d911 bls.n 80082d2 err = tcp_keepalive(pcb); 80082ae: 6af8 ldr r0, [r7, #44] ; 0x2c 80082b0: f005 f814 bl 800d2dc 80082b4: 4603 mov r3, r0 80082b6: f887 3025 strb.w r3, [r7, #37] ; 0x25 if (err == ERR_OK) { 80082ba: f997 3025 ldrsb.w r3, [r7, #37] ; 0x25 80082be: 2b00 cmp r3, #0 80082c0: d107 bne.n 80082d2 pcb->keep_cnt_sent++; 80082c2: 6afb ldr r3, [r7, #44] ; 0x2c 80082c4: f893 309b ldrb.w r3, [r3, #155] ; 0x9b 80082c8: 3301 adds r3, #1 80082ca: b2da uxtb r2, r3 80082cc: 6afb ldr r3, [r7, #44] ; 0x2c 80082ce: 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 && 80082d2: 6afb ldr r3, [r7, #44] ; 0x2c 80082d4: 6f5b ldr r3, [r3, #116] ; 0x74 80082d6: 2b00 cmp r3, #0 80082d8: d011 beq.n 80082fe (tcp_ticks - pcb->tmr >= (u32_t)pcb->rto * TCP_OOSEQ_TIMEOUT)) { 80082da: 4b6c ldr r3, [pc, #432] ; (800848c ) 80082dc: 681a ldr r2, [r3, #0] 80082de: 6afb ldr r3, [r7, #44] ; 0x2c 80082e0: 6a1b ldr r3, [r3, #32] 80082e2: 1ad2 subs r2, r2, r3 80082e4: 6afb ldr r3, [r7, #44] ; 0x2c 80082e6: f9b3 3040 ldrsh.w r3, [r3, #64] ; 0x40 80082ea: 4619 mov r1, r3 80082ec: 460b mov r3, r1 80082ee: 005b lsls r3, r3, #1 80082f0: 440b add r3, r1 80082f2: 005b lsls r3, r3, #1 if (pcb->ooseq != NULL && 80082f4: 429a cmp r2, r3 80082f6: d302 bcc.n 80082fe LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: dropping OOSEQ queued data\n")); tcp_free_ooseq(pcb); 80082f8: 6af8 ldr r0, [r7, #44] ; 0x2c 80082fa: f000 fe63 bl 8008fc4 } #endif /* TCP_QUEUE_OOSEQ */ /* Check if this PCB has stayed too long in SYN-RCVD */ if (pcb->state == SYN_RCVD) { 80082fe: 6afb ldr r3, [r7, #44] ; 0x2c 8008300: 7d1b ldrb r3, [r3, #20] 8008302: 2b03 cmp r3, #3 8008304: d10b bne.n 800831e if ((u32_t)(tcp_ticks - pcb->tmr) > 8008306: 4b61 ldr r3, [pc, #388] ; (800848c ) 8008308: 681a ldr r2, [r3, #0] 800830a: 6afb ldr r3, [r7, #44] ; 0x2c 800830c: 6a1b ldr r3, [r3, #32] 800830e: 1ad3 subs r3, r2, r3 8008310: 2b28 cmp r3, #40 ; 0x28 8008312: d904 bls.n 800831e TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) { ++pcb_remove; 8008314: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 8008318: 3301 adds r3, #1 800831a: 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) { 800831e: 6afb ldr r3, [r7, #44] ; 0x2c 8008320: 7d1b ldrb r3, [r3, #20] 8008322: 2b09 cmp r3, #9 8008324: d10b bne.n 800833e if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { 8008326: 4b59 ldr r3, [pc, #356] ; (800848c ) 8008328: 681a ldr r2, [r3, #0] 800832a: 6afb ldr r3, [r7, #44] ; 0x2c 800832c: 6a1b ldr r3, [r3, #32] 800832e: 1ad3 subs r3, r2, r3 8008330: 2bf0 cmp r3, #240 ; 0xf0 8008332: d904 bls.n 800833e ++pcb_remove; 8008334: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 8008338: 3301 adds r3, #1 800833a: 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) { 800833e: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 8008342: 2b00 cmp r3, #0 8008344: d060 beq.n 8008408 struct tcp_pcb *pcb2; #if LWIP_CALLBACK_API tcp_err_fn err_fn = pcb->errf; 8008346: 6afb ldr r3, [r7, #44] ; 0x2c 8008348: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90 800834c: 60fb str r3, [r7, #12] #endif /* LWIP_CALLBACK_API */ void *err_arg; enum tcp_state last_state; tcp_pcb_purge(pcb); 800834e: 6af8 ldr r0, [r7, #44] ; 0x2c 8008350: f000 fc7e bl 8008c50 /* Remove PCB from tcp_active_pcbs list. */ if (prev != NULL) { 8008354: 6abb ldr r3, [r7, #40] ; 0x28 8008356: 2b00 cmp r3, #0 8008358: d010 beq.n 800837c LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs); 800835a: 4b50 ldr r3, [pc, #320] ; (800849c ) 800835c: 681b ldr r3, [r3, #0] 800835e: 6afa ldr r2, [r7, #44] ; 0x2c 8008360: 429a cmp r2, r3 8008362: d106 bne.n 8008372 8008364: 4b4e ldr r3, [pc, #312] ; (80084a0 ) 8008366: f240 526d movw r2, #1389 ; 0x56d 800836a: 494e ldr r1, [pc, #312] ; (80084a4 ) 800836c: 484e ldr r0, [pc, #312] ; (80084a8 ) 800836e: f008 fc2b bl 8010bc8 prev->next = pcb->next; 8008372: 6afb ldr r3, [r7, #44] ; 0x2c 8008374: 68da ldr r2, [r3, #12] 8008376: 6abb ldr r3, [r7, #40] ; 0x28 8008378: 60da str r2, [r3, #12] 800837a: e00f b.n 800839c } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb); 800837c: 4b47 ldr r3, [pc, #284] ; (800849c ) 800837e: 681b ldr r3, [r3, #0] 8008380: 6afa ldr r2, [r7, #44] ; 0x2c 8008382: 429a cmp r2, r3 8008384: d006 beq.n 8008394 8008386: 4b46 ldr r3, [pc, #280] ; (80084a0 ) 8008388: f240 5271 movw r2, #1393 ; 0x571 800838c: 4947 ldr r1, [pc, #284] ; (80084ac ) 800838e: 4846 ldr r0, [pc, #280] ; (80084a8 ) 8008390: f008 fc1a bl 8010bc8 tcp_active_pcbs = pcb->next; 8008394: 6afb ldr r3, [r7, #44] ; 0x2c 8008396: 68db ldr r3, [r3, #12] 8008398: 4a40 ldr r2, [pc, #256] ; (800849c ) 800839a: 6013 str r3, [r2, #0] } if (pcb_reset) { 800839c: f897 3026 ldrb.w r3, [r7, #38] ; 0x26 80083a0: 2b00 cmp r3, #0 80083a2: d013 beq.n 80083cc tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, 80083a4: 6afb ldr r3, [r7, #44] ; 0x2c 80083a6: 6d18 ldr r0, [r3, #80] ; 0x50 80083a8: 6afb ldr r3, [r7, #44] ; 0x2c 80083aa: 6a5c ldr r4, [r3, #36] ; 0x24 80083ac: 6afd ldr r5, [r7, #44] ; 0x2c 80083ae: 6afb ldr r3, [r7, #44] ; 0x2c 80083b0: 3304 adds r3, #4 80083b2: 6afa ldr r2, [r7, #44] ; 0x2c 80083b4: 8ad2 ldrh r2, [r2, #22] 80083b6: 6af9 ldr r1, [r7, #44] ; 0x2c 80083b8: 8b09 ldrh r1, [r1, #24] 80083ba: 9102 str r1, [sp, #8] 80083bc: 9201 str r2, [sp, #4] 80083be: 9300 str r3, [sp, #0] 80083c0: 462b mov r3, r5 80083c2: 4622 mov r2, r4 80083c4: 4601 mov r1, r0 80083c6: 6af8 ldr r0, [r7, #44] ; 0x2c 80083c8: f004 fed4 bl 800d174 pcb->local_port, pcb->remote_port); } err_arg = pcb->callback_arg; 80083cc: 6afb ldr r3, [r7, #44] ; 0x2c 80083ce: 691b ldr r3, [r3, #16] 80083d0: 60bb str r3, [r7, #8] last_state = pcb->state; 80083d2: 6afb ldr r3, [r7, #44] ; 0x2c 80083d4: 7d1b ldrb r3, [r3, #20] 80083d6: 71fb strb r3, [r7, #7] pcb2 = pcb; 80083d8: 6afb ldr r3, [r7, #44] ; 0x2c 80083da: 603b str r3, [r7, #0] pcb = pcb->next; 80083dc: 6afb ldr r3, [r7, #44] ; 0x2c 80083de: 68db ldr r3, [r3, #12] 80083e0: 62fb str r3, [r7, #44] ; 0x2c tcp_free(pcb2); 80083e2: 6838 ldr r0, [r7, #0] 80083e4: f7ff f896 bl 8007514 tcp_active_pcbs_changed = 0; 80083e8: 4b31 ldr r3, [pc, #196] ; (80084b0 ) 80083ea: 2200 movs r2, #0 80083ec: 701a strb r2, [r3, #0] TCP_EVENT_ERR(last_state, err_fn, err_arg, ERR_ABRT); 80083ee: 68fb ldr r3, [r7, #12] 80083f0: 2b00 cmp r3, #0 80083f2: d004 beq.n 80083fe 80083f4: 68fb ldr r3, [r7, #12] 80083f6: f06f 010c mvn.w r1, #12 80083fa: 68b8 ldr r0, [r7, #8] 80083fc: 4798 blx r3 if (tcp_active_pcbs_changed) { 80083fe: 4b2c ldr r3, [pc, #176] ; (80084b0 ) 8008400: 781b ldrb r3, [r3, #0] 8008402: 2b00 cmp r3, #0 8008404: d037 beq.n 8008476 goto tcp_slowtmr_start; 8008406: e592 b.n 8007f2e } } else { /* get the 'next' element now and work with 'prev' below (in case of abort) */ prev = pcb; 8008408: 6afb ldr r3, [r7, #44] ; 0x2c 800840a: 62bb str r3, [r7, #40] ; 0x28 pcb = pcb->next; 800840c: 6afb ldr r3, [r7, #44] ; 0x2c 800840e: 68db ldr r3, [r3, #12] 8008410: 62fb str r3, [r7, #44] ; 0x2c /* We check if we should poll the connection. */ ++prev->polltmr; 8008412: 6abb ldr r3, [r7, #40] ; 0x28 8008414: 7f1b ldrb r3, [r3, #28] 8008416: 3301 adds r3, #1 8008418: b2da uxtb r2, r3 800841a: 6abb ldr r3, [r7, #40] ; 0x28 800841c: 771a strb r2, [r3, #28] if (prev->polltmr >= prev->pollinterval) { 800841e: 6abb ldr r3, [r7, #40] ; 0x28 8008420: 7f1a ldrb r2, [r3, #28] 8008422: 6abb ldr r3, [r7, #40] ; 0x28 8008424: 7f5b ldrb r3, [r3, #29] 8008426: 429a cmp r2, r3 8008428: d325 bcc.n 8008476 prev->polltmr = 0; 800842a: 6abb ldr r3, [r7, #40] ; 0x28 800842c: 2200 movs r2, #0 800842e: 771a strb r2, [r3, #28] LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); tcp_active_pcbs_changed = 0; 8008430: 4b1f ldr r3, [pc, #124] ; (80084b0 ) 8008432: 2200 movs r2, #0 8008434: 701a strb r2, [r3, #0] TCP_EVENT_POLL(prev, err); 8008436: 6abb ldr r3, [r7, #40] ; 0x28 8008438: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c 800843c: 2b00 cmp r3, #0 800843e: d00b beq.n 8008458 8008440: 6abb ldr r3, [r7, #40] ; 0x28 8008442: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c 8008446: 6aba ldr r2, [r7, #40] ; 0x28 8008448: 6912 ldr r2, [r2, #16] 800844a: 6ab9 ldr r1, [r7, #40] ; 0x28 800844c: 4610 mov r0, r2 800844e: 4798 blx r3 8008450: 4603 mov r3, r0 8008452: f887 3025 strb.w r3, [r7, #37] ; 0x25 8008456: e002 b.n 800845e 8008458: 2300 movs r3, #0 800845a: f887 3025 strb.w r3, [r7, #37] ; 0x25 if (tcp_active_pcbs_changed) { 800845e: 4b14 ldr r3, [pc, #80] ; (80084b0 ) 8008460: 781b ldrb r3, [r3, #0] 8008462: 2b00 cmp r3, #0 8008464: d000 beq.n 8008468 goto tcp_slowtmr_start; 8008466: e562 b.n 8007f2e } /* if err == ERR_ABRT, 'prev' is already deallocated */ if (err == ERR_OK) { 8008468: f997 3025 ldrsb.w r3, [r7, #37] ; 0x25 800846c: 2b00 cmp r3, #0 800846e: d102 bne.n 8008476 tcp_output(prev); 8008470: 6ab8 ldr r0, [r7, #40] ; 0x28 8008472: f004 f8bf bl 800c5f4 while (pcb != NULL) { 8008476: 6afb ldr r3, [r7, #44] ; 0x2c 8008478: 2b00 cmp r3, #0 800847a: f47f ad5e bne.w 8007f3a } } /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; 800847e: 2300 movs r3, #0 8008480: 62bb str r3, [r7, #40] ; 0x28 pcb = tcp_tw_pcbs; 8008482: 4b0c ldr r3, [pc, #48] ; (80084b4 ) 8008484: 681b ldr r3, [r3, #0] 8008486: 62fb str r3, [r7, #44] ; 0x2c while (pcb != NULL) { 8008488: e069 b.n 800855e 800848a: bf00 nop 800848c: 24007b6c .word 0x24007b6c 8008490: 000a4cb8 .word 0x000a4cb8 8008494: 10624dd3 .word 0x10624dd3 8008498: 000124f8 .word 0x000124f8 800849c: 24007b78 .word 0x24007b78 80084a0: 08012a08 .word 0x08012a08 80084a4: 08012e40 .word 0x08012e40 80084a8: 08012a4c .word 0x08012a4c 80084ac: 08012e6c .word 0x08012e6c 80084b0: 24007b80 .word 0x24007b80 80084b4: 24007b7c .word 0x24007b7c LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); 80084b8: 6afb ldr r3, [r7, #44] ; 0x2c 80084ba: 7d1b ldrb r3, [r3, #20] 80084bc: 2b0a cmp r3, #10 80084be: d006 beq.n 80084ce 80084c0: 4b2b ldr r3, [pc, #172] ; (8008570 ) 80084c2: f240 52a1 movw r2, #1441 ; 0x5a1 80084c6: 492b ldr r1, [pc, #172] ; (8008574 ) 80084c8: 482b ldr r0, [pc, #172] ; (8008578 ) 80084ca: f008 fb7d bl 8010bc8 pcb_remove = 0; 80084ce: 2300 movs r3, #0 80084d0: 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) { 80084d4: 4b29 ldr r3, [pc, #164] ; (800857c ) 80084d6: 681a ldr r2, [r3, #0] 80084d8: 6afb ldr r3, [r7, #44] ; 0x2c 80084da: 6a1b ldr r3, [r3, #32] 80084dc: 1ad3 subs r3, r2, r3 80084de: 2bf0 cmp r3, #240 ; 0xf0 80084e0: d904 bls.n 80084ec ++pcb_remove; 80084e2: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 80084e6: 3301 adds r3, #1 80084e8: f887 3027 strb.w r3, [r7, #39] ; 0x27 } /* If the PCB should be removed, do it. */ if (pcb_remove) { 80084ec: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 80084f0: 2b00 cmp r3, #0 80084f2: d02f beq.n 8008554 struct tcp_pcb *pcb2; tcp_pcb_purge(pcb); 80084f4: 6af8 ldr r0, [r7, #44] ; 0x2c 80084f6: f000 fbab bl 8008c50 /* Remove PCB from tcp_tw_pcbs list. */ if (prev != NULL) { 80084fa: 6abb ldr r3, [r7, #40] ; 0x28 80084fc: 2b00 cmp r3, #0 80084fe: d010 beq.n 8008522 LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs); 8008500: 4b1f ldr r3, [pc, #124] ; (8008580 ) 8008502: 681b ldr r3, [r3, #0] 8008504: 6afa ldr r2, [r7, #44] ; 0x2c 8008506: 429a cmp r2, r3 8008508: d106 bne.n 8008518 800850a: 4b19 ldr r3, [pc, #100] ; (8008570 ) 800850c: f240 52af movw r2, #1455 ; 0x5af 8008510: 491c ldr r1, [pc, #112] ; (8008584 ) 8008512: 4819 ldr r0, [pc, #100] ; (8008578 ) 8008514: f008 fb58 bl 8010bc8 prev->next = pcb->next; 8008518: 6afb ldr r3, [r7, #44] ; 0x2c 800851a: 68da ldr r2, [r3, #12] 800851c: 6abb ldr r3, [r7, #40] ; 0x28 800851e: 60da str r2, [r3, #12] 8008520: e00f b.n 8008542 } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); 8008522: 4b17 ldr r3, [pc, #92] ; (8008580 ) 8008524: 681b ldr r3, [r3, #0] 8008526: 6afa ldr r2, [r7, #44] ; 0x2c 8008528: 429a cmp r2, r3 800852a: d006 beq.n 800853a 800852c: 4b10 ldr r3, [pc, #64] ; (8008570 ) 800852e: f240 52b3 movw r2, #1459 ; 0x5b3 8008532: 4915 ldr r1, [pc, #84] ; (8008588 ) 8008534: 4810 ldr r0, [pc, #64] ; (8008578 ) 8008536: f008 fb47 bl 8010bc8 tcp_tw_pcbs = pcb->next; 800853a: 6afb ldr r3, [r7, #44] ; 0x2c 800853c: 68db ldr r3, [r3, #12] 800853e: 4a10 ldr r2, [pc, #64] ; (8008580 ) 8008540: 6013 str r3, [r2, #0] } pcb2 = pcb; 8008542: 6afb ldr r3, [r7, #44] ; 0x2c 8008544: 61fb str r3, [r7, #28] pcb = pcb->next; 8008546: 6afb ldr r3, [r7, #44] ; 0x2c 8008548: 68db ldr r3, [r3, #12] 800854a: 62fb str r3, [r7, #44] ; 0x2c tcp_free(pcb2); 800854c: 69f8 ldr r0, [r7, #28] 800854e: f7fe ffe1 bl 8007514 8008552: e004 b.n 800855e } else { prev = pcb; 8008554: 6afb ldr r3, [r7, #44] ; 0x2c 8008556: 62bb str r3, [r7, #40] ; 0x28 pcb = pcb->next; 8008558: 6afb ldr r3, [r7, #44] ; 0x2c 800855a: 68db ldr r3, [r3, #12] 800855c: 62fb str r3, [r7, #44] ; 0x2c while (pcb != NULL) { 800855e: 6afb ldr r3, [r7, #44] ; 0x2c 8008560: 2b00 cmp r3, #0 8008562: d1a9 bne.n 80084b8 } } } 8008564: bf00 nop 8008566: bf00 nop 8008568: 3730 adds r7, #48 ; 0x30 800856a: 46bd mov sp, r7 800856c: bdb0 pop {r4, r5, r7, pc} 800856e: bf00 nop 8008570: 08012a08 .word 0x08012a08 8008574: 08012e98 .word 0x08012e98 8008578: 08012a4c .word 0x08012a4c 800857c: 24007b6c .word 0x24007b6c 8008580: 24007b7c .word 0x24007b7c 8008584: 08012ec8 .word 0x08012ec8 8008588: 08012ef0 .word 0x08012ef0 0800858c : * * Automatically called from tcp_tmr(). */ void tcp_fasttmr(void) { 800858c: b580 push {r7, lr} 800858e: b082 sub sp, #8 8008590: af00 add r7, sp, #0 struct tcp_pcb *pcb; ++tcp_timer_ctr; 8008592: 4b2d ldr r3, [pc, #180] ; (8008648 ) 8008594: 781b ldrb r3, [r3, #0] 8008596: 3301 adds r3, #1 8008598: b2da uxtb r2, r3 800859a: 4b2b ldr r3, [pc, #172] ; (8008648 ) 800859c: 701a strb r2, [r3, #0] tcp_fasttmr_start: pcb = tcp_active_pcbs; 800859e: 4b2b ldr r3, [pc, #172] ; (800864c ) 80085a0: 681b ldr r3, [r3, #0] 80085a2: 607b str r3, [r7, #4] while (pcb != NULL) { 80085a4: e048 b.n 8008638 if (pcb->last_timer != tcp_timer_ctr) { 80085a6: 687b ldr r3, [r7, #4] 80085a8: 7f9a ldrb r2, [r3, #30] 80085aa: 4b27 ldr r3, [pc, #156] ; (8008648 ) 80085ac: 781b ldrb r3, [r3, #0] 80085ae: 429a cmp r2, r3 80085b0: d03f beq.n 8008632 struct tcp_pcb *next; pcb->last_timer = tcp_timer_ctr; 80085b2: 4b25 ldr r3, [pc, #148] ; (8008648 ) 80085b4: 781a ldrb r2, [r3, #0] 80085b6: 687b ldr r3, [r7, #4] 80085b8: 779a strb r2, [r3, #30] /* send delayed ACKs */ if (pcb->flags & TF_ACK_DELAY) { 80085ba: 687b ldr r3, [r7, #4] 80085bc: 8b5b ldrh r3, [r3, #26] 80085be: f003 0301 and.w r3, r3, #1 80085c2: 2b00 cmp r3, #0 80085c4: d010 beq.n 80085e8 LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n")); tcp_ack_now(pcb); 80085c6: 687b ldr r3, [r7, #4] 80085c8: 8b5b ldrh r3, [r3, #26] 80085ca: f043 0302 orr.w r3, r3, #2 80085ce: b29a uxth r2, r3 80085d0: 687b ldr r3, [r7, #4] 80085d2: 835a strh r2, [r3, #26] tcp_output(pcb); 80085d4: 6878 ldr r0, [r7, #4] 80085d6: f004 f80d bl 800c5f4 tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 80085da: 687b ldr r3, [r7, #4] 80085dc: 8b5b ldrh r3, [r3, #26] 80085de: f023 0303 bic.w r3, r3, #3 80085e2: b29a uxth r2, r3 80085e4: 687b ldr r3, [r7, #4] 80085e6: 835a strh r2, [r3, #26] } /* send pending FIN */ if (pcb->flags & TF_CLOSEPEND) { 80085e8: 687b ldr r3, [r7, #4] 80085ea: 8b5b ldrh r3, [r3, #26] 80085ec: f003 0308 and.w r3, r3, #8 80085f0: 2b00 cmp r3, #0 80085f2: d009 beq.n 8008608 LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: pending FIN\n")); tcp_clear_flags(pcb, TF_CLOSEPEND); 80085f4: 687b ldr r3, [r7, #4] 80085f6: 8b5b ldrh r3, [r3, #26] 80085f8: f023 0308 bic.w r3, r3, #8 80085fc: b29a uxth r2, r3 80085fe: 687b ldr r3, [r7, #4] 8008600: 835a strh r2, [r3, #26] tcp_close_shutdown_fin(pcb); 8008602: 6878 ldr r0, [r7, #4] 8008604: f7ff f91a bl 800783c } next = pcb->next; 8008608: 687b ldr r3, [r7, #4] 800860a: 68db ldr r3, [r3, #12] 800860c: 603b str r3, [r7, #0] /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 800860e: 687b ldr r3, [r7, #4] 8008610: 6f9b ldr r3, [r3, #120] ; 0x78 8008612: 2b00 cmp r3, #0 8008614: d00a beq.n 800862c tcp_active_pcbs_changed = 0; 8008616: 4b0e ldr r3, [pc, #56] ; (8008650 ) 8008618: 2200 movs r2, #0 800861a: 701a strb r2, [r3, #0] tcp_process_refused_data(pcb); 800861c: 6878 ldr r0, [r7, #4] 800861e: f000 f819 bl 8008654 if (tcp_active_pcbs_changed) { 8008622: 4b0b ldr r3, [pc, #44] ; (8008650 ) 8008624: 781b ldrb r3, [r3, #0] 8008626: 2b00 cmp r3, #0 8008628: d000 beq.n 800862c /* application callback has changed the pcb list: restart the loop */ goto tcp_fasttmr_start; 800862a: e7b8 b.n 800859e } } pcb = next; 800862c: 683b ldr r3, [r7, #0] 800862e: 607b str r3, [r7, #4] 8008630: e002 b.n 8008638 } else { pcb = pcb->next; 8008632: 687b ldr r3, [r7, #4] 8008634: 68db ldr r3, [r3, #12] 8008636: 607b str r3, [r7, #4] while (pcb != NULL) { 8008638: 687b ldr r3, [r7, #4] 800863a: 2b00 cmp r3, #0 800863c: d1b3 bne.n 80085a6 } } } 800863e: bf00 nop 8008640: bf00 nop 8008642: 3708 adds r7, #8 8008644: 46bd mov sp, r7 8008646: bd80 pop {r7, pc} 8008648: 24007b82 .word 0x24007b82 800864c: 24007b78 .word 0x24007b78 8008650: 24007b80 .word 0x24007b80 08008654 : } /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { 8008654: b590 push {r4, r7, lr} 8008656: b085 sub sp, #20 8008658: af00 add r7, sp, #0 800865a: 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); 800865c: 687b ldr r3, [r7, #4] 800865e: 2b00 cmp r3, #0 8008660: d109 bne.n 8008676 8008662: 4b37 ldr r3, [pc, #220] ; (8008740 ) 8008664: f240 6209 movw r2, #1545 ; 0x609 8008668: 4936 ldr r1, [pc, #216] ; (8008744 ) 800866a: 4837 ldr r0, [pc, #220] ; (8008748 ) 800866c: f008 faac bl 8010bc8 8008670: f06f 030f mvn.w r3, #15 8008674: e060 b.n 8008738 #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; 8008676: 687b ldr r3, [r7, #4] 8008678: 6f9b ldr r3, [r3, #120] ; 0x78 800867a: 7b5b ldrb r3, [r3, #13] 800867c: 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; 800867e: 687b ldr r3, [r7, #4] 8008680: 6f9b ldr r3, [r3, #120] ; 0x78 8008682: 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; 8008684: 687b ldr r3, [r7, #4] 8008686: 2200 movs r2, #0 8008688: 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); 800868a: 687b ldr r3, [r7, #4] 800868c: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84 8008690: 2b00 cmp r3, #0 8008692: d00b beq.n 80086ac 8008694: 687b ldr r3, [r7, #4] 8008696: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84 800869a: 687b ldr r3, [r7, #4] 800869c: 6918 ldr r0, [r3, #16] 800869e: 2300 movs r3, #0 80086a0: 68ba ldr r2, [r7, #8] 80086a2: 6879 ldr r1, [r7, #4] 80086a4: 47a0 blx r4 80086a6: 4603 mov r3, r0 80086a8: 73fb strb r3, [r7, #15] 80086aa: e007 b.n 80086bc 80086ac: 2300 movs r3, #0 80086ae: 68ba ldr r2, [r7, #8] 80086b0: 6879 ldr r1, [r7, #4] 80086b2: 2000 movs r0, #0 80086b4: f000 f8a4 bl 8008800 80086b8: 4603 mov r3, r0 80086ba: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 80086bc: f997 300f ldrsb.w r3, [r7, #15] 80086c0: 2b00 cmp r3, #0 80086c2: d12a bne.n 800871a /* did refused_data include a FIN? */ if ((refused_flags & PBUF_FLAG_TCP_FIN) 80086c4: 7bbb ldrb r3, [r7, #14] 80086c6: f003 0320 and.w r3, r3, #32 80086ca: 2b00 cmp r3, #0 80086cc: d033 beq.n 8008736 && (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)) { 80086ce: 687b ldr r3, [r7, #4] 80086d0: 8d1b ldrh r3, [r3, #40] ; 0x28 80086d2: f5b3 6f06 cmp.w r3, #2144 ; 0x860 80086d6: d005 beq.n 80086e4 pcb->rcv_wnd++; 80086d8: 687b ldr r3, [r7, #4] 80086da: 8d1b ldrh r3, [r3, #40] ; 0x28 80086dc: 3301 adds r3, #1 80086de: b29a uxth r2, r3 80086e0: 687b ldr r3, [r7, #4] 80086e2: 851a strh r2, [r3, #40] ; 0x28 } TCP_EVENT_CLOSED(pcb, err); 80086e4: 687b ldr r3, [r7, #4] 80086e6: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84 80086ea: 2b00 cmp r3, #0 80086ec: d00b beq.n 8008706 80086ee: 687b ldr r3, [r7, #4] 80086f0: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84 80086f4: 687b ldr r3, [r7, #4] 80086f6: 6918 ldr r0, [r3, #16] 80086f8: 2300 movs r3, #0 80086fa: 2200 movs r2, #0 80086fc: 6879 ldr r1, [r7, #4] 80086fe: 47a0 blx r4 8008700: 4603 mov r3, r0 8008702: 73fb strb r3, [r7, #15] 8008704: e001 b.n 800870a 8008706: 2300 movs r3, #0 8008708: 73fb strb r3, [r7, #15] if (err == ERR_ABRT) { 800870a: f997 300f ldrsb.w r3, [r7, #15] 800870e: f113 0f0d cmn.w r3, #13 8008712: d110 bne.n 8008736 return ERR_ABRT; 8008714: f06f 030c mvn.w r3, #12 8008718: e00e b.n 8008738 } } } else if (err == ERR_ABRT) { 800871a: f997 300f ldrsb.w r3, [r7, #15] 800871e: f113 0f0d cmn.w r3, #13 8008722: d102 bne.n 800872a /* 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; 8008724: f06f 030c mvn.w r3, #12 8008728: e006 b.n 8008738 #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; 800872a: 687b ldr r3, [r7, #4] 800872c: 68ba ldr r2, [r7, #8] 800872e: 679a str r2, [r3, #120] ; 0x78 return ERR_INPROGRESS; 8008730: f06f 0304 mvn.w r3, #4 8008734: e000 b.n 8008738 } } return ERR_OK; 8008736: 2300 movs r3, #0 } 8008738: 4618 mov r0, r3 800873a: 3714 adds r7, #20 800873c: 46bd mov sp, r7 800873e: bd90 pop {r4, r7, pc} 8008740: 08012a08 .word 0x08012a08 8008744: 08012f18 .word 0x08012f18 8008748: 08012a4c .word 0x08012a4c 0800874c : * * @param seg tcp_seg list of TCP segments to free */ void tcp_segs_free(struct tcp_seg *seg) { 800874c: b580 push {r7, lr} 800874e: b084 sub sp, #16 8008750: af00 add r7, sp, #0 8008752: 6078 str r0, [r7, #4] while (seg != NULL) { 8008754: e007 b.n 8008766 struct tcp_seg *next = seg->next; 8008756: 687b ldr r3, [r7, #4] 8008758: 681b ldr r3, [r3, #0] 800875a: 60fb str r3, [r7, #12] tcp_seg_free(seg); 800875c: 6878 ldr r0, [r7, #4] 800875e: f000 f80a bl 8008776 seg = next; 8008762: 68fb ldr r3, [r7, #12] 8008764: 607b str r3, [r7, #4] while (seg != NULL) { 8008766: 687b ldr r3, [r7, #4] 8008768: 2b00 cmp r3, #0 800876a: d1f4 bne.n 8008756 } } 800876c: bf00 nop 800876e: bf00 nop 8008770: 3710 adds r7, #16 8008772: 46bd mov sp, r7 8008774: bd80 pop {r7, pc} 08008776 : * * @param seg single tcp_seg to free */ void tcp_seg_free(struct tcp_seg *seg) { 8008776: b580 push {r7, lr} 8008778: b082 sub sp, #8 800877a: af00 add r7, sp, #0 800877c: 6078 str r0, [r7, #4] if (seg != NULL) { 800877e: 687b ldr r3, [r7, #4] 8008780: 2b00 cmp r3, #0 8008782: d00c beq.n 800879e if (seg->p != NULL) { 8008784: 687b ldr r3, [r7, #4] 8008786: 685b ldr r3, [r3, #4] 8008788: 2b00 cmp r3, #0 800878a: d004 beq.n 8008796 pbuf_free(seg->p); 800878c: 687b ldr r3, [r7, #4] 800878e: 685b ldr r3, [r3, #4] 8008790: 4618 mov r0, r3 8008792: f7fe fc1f bl 8006fd4 #if TCP_DEBUG seg->p = NULL; #endif /* TCP_DEBUG */ } memp_free(MEMP_TCP_SEG, seg); 8008796: 6879 ldr r1, [r7, #4] 8008798: 2003 movs r0, #3 800879a: f7fd fcaf bl 80060fc } } 800879e: bf00 nop 80087a0: 3708 adds r7, #8 80087a2: 46bd mov sp, r7 80087a4: bd80 pop {r7, pc} ... 080087a8 : * @param seg the old tcp_seg * @return a copy of seg */ struct tcp_seg * tcp_seg_copy(struct tcp_seg *seg) { 80087a8: b580 push {r7, lr} 80087aa: b084 sub sp, #16 80087ac: af00 add r7, sp, #0 80087ae: 6078 str r0, [r7, #4] struct tcp_seg *cseg; LWIP_ASSERT("tcp_seg_copy: invalid seg", seg != NULL); 80087b0: 687b ldr r3, [r7, #4] 80087b2: 2b00 cmp r3, #0 80087b4: d106 bne.n 80087c4 80087b6: 4b0f ldr r3, [pc, #60] ; (80087f4 ) 80087b8: f240 6282 movw r2, #1666 ; 0x682 80087bc: 490e ldr r1, [pc, #56] ; (80087f8 ) 80087be: 480f ldr r0, [pc, #60] ; (80087fc ) 80087c0: f008 fa02 bl 8010bc8 cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG); 80087c4: 2003 movs r0, #3 80087c6: f7fd fc29 bl 800601c 80087ca: 60f8 str r0, [r7, #12] if (cseg == NULL) { 80087cc: 68fb ldr r3, [r7, #12] 80087ce: 2b00 cmp r3, #0 80087d0: d101 bne.n 80087d6 return NULL; 80087d2: 2300 movs r3, #0 80087d4: e00a b.n 80087ec } SMEMCPY((u8_t *)cseg, (const u8_t *)seg, sizeof(struct tcp_seg)); 80087d6: 2214 movs r2, #20 80087d8: 6879 ldr r1, [r7, #4] 80087da: 68f8 ldr r0, [r7, #12] 80087dc: f008 fbd5 bl 8010f8a pbuf_ref(cseg->p); 80087e0: 68fb ldr r3, [r7, #12] 80087e2: 685b ldr r3, [r3, #4] 80087e4: 4618 mov r0, r3 80087e6: f7fe fc95 bl 8007114 return cseg; 80087ea: 68fb ldr r3, [r7, #12] } 80087ec: 4618 mov r0, r3 80087ee: 3710 adds r7, #16 80087f0: 46bd mov sp, r7 80087f2: bd80 pop {r7, pc} 80087f4: 08012a08 .word 0x08012a08 80087f8: 08012f5c .word 0x08012f5c 80087fc: 08012a4c .word 0x08012a4c 08008800 : * 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) { 8008800: b580 push {r7, lr} 8008802: b084 sub sp, #16 8008804: af00 add r7, sp, #0 8008806: 60f8 str r0, [r7, #12] 8008808: 60b9 str r1, [r7, #8] 800880a: 607a str r2, [r7, #4] 800880c: 70fb strb r3, [r7, #3] LWIP_UNUSED_ARG(arg); LWIP_ERROR("tcp_recv_null: invalid pcb", pcb != NULL, return ERR_ARG); 800880e: 68bb ldr r3, [r7, #8] 8008810: 2b00 cmp r3, #0 8008812: d109 bne.n 8008828 8008814: 4b12 ldr r3, [pc, #72] ; (8008860 ) 8008816: f44f 62d3 mov.w r2, #1688 ; 0x698 800881a: 4912 ldr r1, [pc, #72] ; (8008864 ) 800881c: 4812 ldr r0, [pc, #72] ; (8008868 ) 800881e: f008 f9d3 bl 8010bc8 8008822: f06f 030f mvn.w r3, #15 8008826: e016 b.n 8008856 if (p != NULL) { 8008828: 687b ldr r3, [r7, #4] 800882a: 2b00 cmp r3, #0 800882c: d009 beq.n 8008842 tcp_recved(pcb, p->tot_len); 800882e: 687b ldr r3, [r7, #4] 8008830: 891b ldrh r3, [r3, #8] 8008832: 4619 mov r1, r3 8008834: 68b8 ldr r0, [r7, #8] 8008836: f7ff f9bb bl 8007bb0 pbuf_free(p); 800883a: 6878 ldr r0, [r7, #4] 800883c: f7fe fbca bl 8006fd4 8008840: e008 b.n 8008854 } else if (err == ERR_OK) { 8008842: f997 3003 ldrsb.w r3, [r7, #3] 8008846: 2b00 cmp r3, #0 8008848: d104 bne.n 8008854 return tcp_close(pcb); 800884a: 68b8 ldr r0, [r7, #8] 800884c: f7ff f860 bl 8007910 8008850: 4603 mov r3, r0 8008852: e000 b.n 8008856 } return ERR_OK; 8008854: 2300 movs r3, #0 } 8008856: 4618 mov r0, r3 8008858: 3710 adds r7, #16 800885a: 46bd mov sp, r7 800885c: bd80 pop {r7, pc} 800885e: bf00 nop 8008860: 08012a08 .word 0x08012a08 8008864: 08012f78 .word 0x08012f78 8008868: 08012a4c .word 0x08012a4c 0800886c : * * @param prio minimum priority */ static void tcp_kill_prio(u8_t prio) { 800886c: b580 push {r7, lr} 800886e: b086 sub sp, #24 8008870: af00 add r7, sp, #0 8008872: 4603 mov r3, r0 8008874: 71fb strb r3, [r7, #7] struct tcp_pcb *pcb, *inactive; u32_t inactivity; u8_t mprio; mprio = LWIP_MIN(TCP_PRIO_MAX, prio); 8008876: f997 3007 ldrsb.w r3, [r7, #7] 800887a: 2b00 cmp r3, #0 800887c: db01 blt.n 8008882 800887e: 79fb ldrb r3, [r7, #7] 8008880: e000 b.n 8008884 8008882: 237f movs r3, #127 ; 0x7f 8008884: 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) { 8008886: 7afb ldrb r3, [r7, #11] 8008888: 2b00 cmp r3, #0 800888a: d034 beq.n 80088f6 /* 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--; 800888c: 7afb ldrb r3, [r7, #11] 800888e: 3b01 subs r3, #1 8008890: 72fb strb r3, [r7, #11] inactivity = 0; 8008892: 2300 movs r3, #0 8008894: 60fb str r3, [r7, #12] inactive = NULL; 8008896: 2300 movs r3, #0 8008898: 613b str r3, [r7, #16] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 800889a: 4b19 ldr r3, [pc, #100] ; (8008900 ) 800889c: 681b ldr r3, [r3, #0] 800889e: 617b str r3, [r7, #20] 80088a0: e01f b.n 80088e2 /* lower prio is always a kill candidate */ if ((pcb->prio < mprio) || 80088a2: 697b ldr r3, [r7, #20] 80088a4: 7d5b ldrb r3, [r3, #21] 80088a6: 7afa ldrb r2, [r7, #11] 80088a8: 429a cmp r2, r3 80088aa: d80c bhi.n 80088c6 /* longer inactivity is also a kill candidate */ ((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) { 80088ac: 697b ldr r3, [r7, #20] 80088ae: 7d5b ldrb r3, [r3, #21] if ((pcb->prio < mprio) || 80088b0: 7afa ldrb r2, [r7, #11] 80088b2: 429a cmp r2, r3 80088b4: d112 bne.n 80088dc ((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) { 80088b6: 4b13 ldr r3, [pc, #76] ; (8008904 ) 80088b8: 681a ldr r2, [r3, #0] 80088ba: 697b ldr r3, [r7, #20] 80088bc: 6a1b ldr r3, [r3, #32] 80088be: 1ad3 subs r3, r2, r3 80088c0: 68fa ldr r2, [r7, #12] 80088c2: 429a cmp r2, r3 80088c4: d80a bhi.n 80088dc inactivity = tcp_ticks - pcb->tmr; 80088c6: 4b0f ldr r3, [pc, #60] ; (8008904 ) 80088c8: 681a ldr r2, [r3, #0] 80088ca: 697b ldr r3, [r7, #20] 80088cc: 6a1b ldr r3, [r3, #32] 80088ce: 1ad3 subs r3, r2, r3 80088d0: 60fb str r3, [r7, #12] inactive = pcb; 80088d2: 697b ldr r3, [r7, #20] 80088d4: 613b str r3, [r7, #16] mprio = pcb->prio; 80088d6: 697b ldr r3, [r7, #20] 80088d8: 7d5b ldrb r3, [r3, #21] 80088da: 72fb strb r3, [r7, #11] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 80088dc: 697b ldr r3, [r7, #20] 80088de: 68db ldr r3, [r3, #12] 80088e0: 617b str r3, [r7, #20] 80088e2: 697b ldr r3, [r7, #20] 80088e4: 2b00 cmp r3, #0 80088e6: d1dc bne.n 80088a2 } } if (inactive != NULL) { 80088e8: 693b ldr r3, [r7, #16] 80088ea: 2b00 cmp r3, #0 80088ec: d004 beq.n 80088f8 LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 80088ee: 6938 ldr r0, [r7, #16] 80088f0: f7ff f8f8 bl 8007ae4 80088f4: e000 b.n 80088f8 return; 80088f6: bf00 nop } } 80088f8: 3718 adds r7, #24 80088fa: 46bd mov sp, r7 80088fc: bd80 pop {r7, pc} 80088fe: bf00 nop 8008900: 24007b78 .word 0x24007b78 8008904: 24007b6c .word 0x24007b6c 08008908 : * 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) { 8008908: b580 push {r7, lr} 800890a: b086 sub sp, #24 800890c: af00 add r7, sp, #0 800890e: 4603 mov r3, r0 8008910: 71fb strb r3, [r7, #7] struct tcp_pcb *pcb, *inactive; u32_t inactivity; LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK)); 8008912: 79fb ldrb r3, [r7, #7] 8008914: 2b08 cmp r3, #8 8008916: d009 beq.n 800892c 8008918: 79fb ldrb r3, [r7, #7] 800891a: 2b09 cmp r3, #9 800891c: d006 beq.n 800892c 800891e: 4b1a ldr r3, [pc, #104] ; (8008988 ) 8008920: f240 62dd movw r2, #1757 ; 0x6dd 8008924: 4919 ldr r1, [pc, #100] ; (800898c ) 8008926: 481a ldr r0, [pc, #104] ; (8008990 ) 8008928: f008 f94e bl 8010bc8 inactivity = 0; 800892c: 2300 movs r3, #0 800892e: 60fb str r3, [r7, #12] inactive = NULL; 8008930: 2300 movs r3, #0 8008932: 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) { 8008934: 4b17 ldr r3, [pc, #92] ; (8008994 ) 8008936: 681b ldr r3, [r3, #0] 8008938: 617b str r3, [r7, #20] 800893a: e017 b.n 800896c if (pcb->state == state) { 800893c: 697b ldr r3, [r7, #20] 800893e: 7d1b ldrb r3, [r3, #20] 8008940: 79fa ldrb r2, [r7, #7] 8008942: 429a cmp r2, r3 8008944: d10f bne.n 8008966 if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 8008946: 4b14 ldr r3, [pc, #80] ; (8008998 ) 8008948: 681a ldr r2, [r3, #0] 800894a: 697b ldr r3, [r7, #20] 800894c: 6a1b ldr r3, [r3, #32] 800894e: 1ad3 subs r3, r2, r3 8008950: 68fa ldr r2, [r7, #12] 8008952: 429a cmp r2, r3 8008954: d807 bhi.n 8008966 inactivity = tcp_ticks - pcb->tmr; 8008956: 4b10 ldr r3, [pc, #64] ; (8008998 ) 8008958: 681a ldr r2, [r3, #0] 800895a: 697b ldr r3, [r7, #20] 800895c: 6a1b ldr r3, [r3, #32] 800895e: 1ad3 subs r3, r2, r3 8008960: 60fb str r3, [r7, #12] inactive = pcb; 8008962: 697b ldr r3, [r7, #20] 8008964: 613b str r3, [r7, #16] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 8008966: 697b ldr r3, [r7, #20] 8008968: 68db ldr r3, [r3, #12] 800896a: 617b str r3, [r7, #20] 800896c: 697b ldr r3, [r7, #20] 800896e: 2b00 cmp r3, #0 8008970: d1e4 bne.n 800893c } } } if (inactive != NULL) { 8008972: 693b ldr r3, [r7, #16] 8008974: 2b00 cmp r3, #0 8008976: d003 beq.n 8008980 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); 8008978: 2100 movs r1, #0 800897a: 6938 ldr r0, [r7, #16] 800897c: f7fe fff4 bl 8007968 } } 8008980: bf00 nop 8008982: 3718 adds r7, #24 8008984: 46bd mov sp, r7 8008986: bd80 pop {r7, pc} 8008988: 08012a08 .word 0x08012a08 800898c: 08012f94 .word 0x08012f94 8008990: 08012a4c .word 0x08012a4c 8008994: 24007b78 .word 0x24007b78 8008998: 24007b6c .word 0x24007b6c 0800899c : * 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) { 800899c: b580 push {r7, lr} 800899e: b084 sub sp, #16 80089a0: af00 add r7, sp, #0 struct tcp_pcb *pcb, *inactive; u32_t inactivity; inactivity = 0; 80089a2: 2300 movs r3, #0 80089a4: 607b str r3, [r7, #4] inactive = NULL; 80089a6: 2300 movs r3, #0 80089a8: 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) { 80089aa: 4b12 ldr r3, [pc, #72] ; (80089f4 ) 80089ac: 681b ldr r3, [r3, #0] 80089ae: 60fb str r3, [r7, #12] 80089b0: e012 b.n 80089d8 if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 80089b2: 4b11 ldr r3, [pc, #68] ; (80089f8 ) 80089b4: 681a ldr r2, [r3, #0] 80089b6: 68fb ldr r3, [r7, #12] 80089b8: 6a1b ldr r3, [r3, #32] 80089ba: 1ad3 subs r3, r2, r3 80089bc: 687a ldr r2, [r7, #4] 80089be: 429a cmp r2, r3 80089c0: d807 bhi.n 80089d2 inactivity = tcp_ticks - pcb->tmr; 80089c2: 4b0d ldr r3, [pc, #52] ; (80089f8 ) 80089c4: 681a ldr r2, [r3, #0] 80089c6: 68fb ldr r3, [r7, #12] 80089c8: 6a1b ldr r3, [r3, #32] 80089ca: 1ad3 subs r3, r2, r3 80089cc: 607b str r3, [r7, #4] inactive = pcb; 80089ce: 68fb ldr r3, [r7, #12] 80089d0: 60bb str r3, [r7, #8] for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 80089d2: 68fb ldr r3, [r7, #12] 80089d4: 68db ldr r3, [r3, #12] 80089d6: 60fb str r3, [r7, #12] 80089d8: 68fb ldr r3, [r7, #12] 80089da: 2b00 cmp r3, #0 80089dc: d1e9 bne.n 80089b2 } } if (inactive != NULL) { 80089de: 68bb ldr r3, [r7, #8] 80089e0: 2b00 cmp r3, #0 80089e2: d002 beq.n 80089ea LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 80089e4: 68b8 ldr r0, [r7, #8] 80089e6: f7ff f87d bl 8007ae4 } } 80089ea: bf00 nop 80089ec: 3710 adds r7, #16 80089ee: 46bd mov sp, r7 80089f0: bd80 pop {r7, pc} 80089f2: bf00 nop 80089f4: 24007b7c .word 0x24007b7c 80089f8: 24007b6c .word 0x24007b6c 080089fc : * 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) { 80089fc: b580 push {r7, lr} 80089fe: b082 sub sp, #8 8008a00: af00 add r7, sp, #0 struct tcp_pcb *pcb = tcp_active_pcbs; 8008a02: 4b10 ldr r3, [pc, #64] ; (8008a44 ) 8008a04: 681b ldr r3, [r3, #0] 8008a06: 607b str r3, [r7, #4] while (pcb != NULL) { 8008a08: e014 b.n 8008a34 struct tcp_pcb *next = pcb->next; 8008a0a: 687b ldr r3, [r7, #4] 8008a0c: 68db ldr r3, [r3, #12] 8008a0e: 603b str r3, [r7, #0] /* send pending FIN */ if (pcb->flags & TF_CLOSEPEND) { 8008a10: 687b ldr r3, [r7, #4] 8008a12: 8b5b ldrh r3, [r3, #26] 8008a14: f003 0308 and.w r3, r3, #8 8008a18: 2b00 cmp r3, #0 8008a1a: d009 beq.n 8008a30 LWIP_DEBUGF(TCP_DEBUG, ("tcp_handle_closepend: pending FIN\n")); tcp_clear_flags(pcb, TF_CLOSEPEND); 8008a1c: 687b ldr r3, [r7, #4] 8008a1e: 8b5b ldrh r3, [r3, #26] 8008a20: f023 0308 bic.w r3, r3, #8 8008a24: b29a uxth r2, r3 8008a26: 687b ldr r3, [r7, #4] 8008a28: 835a strh r2, [r3, #26] tcp_close_shutdown_fin(pcb); 8008a2a: 6878 ldr r0, [r7, #4] 8008a2c: f7fe ff06 bl 800783c } pcb = next; 8008a30: 683b ldr r3, [r7, #0] 8008a32: 607b str r3, [r7, #4] while (pcb != NULL) { 8008a34: 687b ldr r3, [r7, #4] 8008a36: 2b00 cmp r3, #0 8008a38: d1e7 bne.n 8008a0a } } 8008a3a: bf00 nop 8008a3c: bf00 nop 8008a3e: 3708 adds r7, #8 8008a40: 46bd mov sp, r7 8008a42: bd80 pop {r7, pc} 8008a44: 24007b78 .word 0x24007b78 08008a48 : * @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) { 8008a48: b580 push {r7, lr} 8008a4a: b084 sub sp, #16 8008a4c: af00 add r7, sp, #0 8008a4e: 4603 mov r3, r0 8008a50: 71fb strb r3, [r7, #7] struct tcp_pcb *pcb; LWIP_ASSERT_CORE_LOCKED(); pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 8008a52: 2001 movs r0, #1 8008a54: f7fd fae2 bl 800601c 8008a58: 60f8 str r0, [r7, #12] if (pcb == NULL) { 8008a5a: 68fb ldr r3, [r7, #12] 8008a5c: 2b00 cmp r3, #0 8008a5e: d126 bne.n 8008aae /* Try to send FIN for all pcbs stuck in TF_CLOSEPEND first */ tcp_handle_closepend(); 8008a60: f7ff ffcc bl 80089fc /* Try killing oldest connection in TIME-WAIT. */ LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest TIME-WAIT connection\n")); tcp_kill_timewait(); 8008a64: f7ff ff9a bl 800899c /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 8008a68: 2001 movs r0, #1 8008a6a: f7fd fad7 bl 800601c 8008a6e: 60f8 str r0, [r7, #12] if (pcb == NULL) { 8008a70: 68fb ldr r3, [r7, #12] 8008a72: 2b00 cmp r3, #0 8008a74: d11b bne.n 8008aae /* 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); 8008a76: 2009 movs r0, #9 8008a78: f7ff ff46 bl 8008908 /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 8008a7c: 2001 movs r0, #1 8008a7e: f7fd facd bl 800601c 8008a82: 60f8 str r0, [r7, #12] if (pcb == NULL) { 8008a84: 68fb ldr r3, [r7, #12] 8008a86: 2b00 cmp r3, #0 8008a88: d111 bne.n 8008aae /* Try killing oldest connection in CLOSING. */ LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest CLOSING connection\n")); tcp_kill_state(CLOSING); 8008a8a: 2008 movs r0, #8 8008a8c: f7ff ff3c bl 8008908 /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 8008a90: 2001 movs r0, #1 8008a92: f7fd fac3 bl 800601c 8008a96: 60f8 str r0, [r7, #12] if (pcb == NULL) { 8008a98: 68fb ldr r3, [r7, #12] 8008a9a: 2b00 cmp r3, #0 8008a9c: d107 bne.n 8008aae /* 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); 8008a9e: 79fb ldrb r3, [r7, #7] 8008aa0: 4618 mov r0, r3 8008aa2: f7ff fee3 bl 800886c /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 8008aa6: 2001 movs r0, #1 8008aa8: f7fd fab8 bl 800601c 8008aac: 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) { 8008aae: 68fb ldr r3, [r7, #12] 8008ab0: 2b00 cmp r3, #0 8008ab2: d03f beq.n 8008b34 /* zero out the whole pcb, so there is no need to initialize members to zero */ memset(pcb, 0, sizeof(struct tcp_pcb)); 8008ab4: 229c movs r2, #156 ; 0x9c 8008ab6: 2100 movs r1, #0 8008ab8: 68f8 ldr r0, [r7, #12] 8008aba: f008 f9e3 bl 8010e84 pcb->prio = prio; 8008abe: 68fb ldr r3, [r7, #12] 8008ac0: 79fa ldrb r2, [r7, #7] 8008ac2: 755a strb r2, [r3, #21] pcb->snd_buf = TCP_SND_BUF; 8008ac4: 68fb ldr r3, [r7, #12] 8008ac6: f44f 6286 mov.w r2, #1072 ; 0x430 8008aca: 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); 8008ace: 68fb ldr r3, [r7, #12] 8008ad0: f44f 6206 mov.w r2, #2144 ; 0x860 8008ad4: 855a strh r2, [r3, #42] ; 0x2a 8008ad6: 68fb ldr r3, [r7, #12] 8008ad8: 8d5a ldrh r2, [r3, #42] ; 0x2a 8008ada: 68fb ldr r3, [r7, #12] 8008adc: 851a strh r2, [r3, #40] ; 0x28 pcb->ttl = TCP_TTL; 8008ade: 68fb ldr r3, [r7, #12] 8008ae0: 22ff movs r2, #255 ; 0xff 8008ae2: 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; 8008ae4: 68fb ldr r3, [r7, #12] 8008ae6: f44f 7206 mov.w r2, #536 ; 0x218 8008aea: 865a strh r2, [r3, #50] ; 0x32 pcb->rto = 3000 / TCP_SLOW_INTERVAL; 8008aec: 68fb ldr r3, [r7, #12] 8008aee: 2206 movs r2, #6 8008af0: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 pcb->sv = 3000 / TCP_SLOW_INTERVAL; 8008af4: 68fb ldr r3, [r7, #12] 8008af6: 2206 movs r2, #6 8008af8: 87da strh r2, [r3, #62] ; 0x3e pcb->rtime = -1; 8008afa: 68fb ldr r3, [r7, #12] 8008afc: f64f 72ff movw r2, #65535 ; 0xffff 8008b00: 861a strh r2, [r3, #48] ; 0x30 pcb->cwnd = 1; 8008b02: 68fb ldr r3, [r7, #12] 8008b04: 2201 movs r2, #1 8008b06: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 pcb->tmr = tcp_ticks; 8008b0a: 4b0d ldr r3, [pc, #52] ; (8008b40 ) 8008b0c: 681a ldr r2, [r3, #0] 8008b0e: 68fb ldr r3, [r7, #12] 8008b10: 621a str r2, [r3, #32] pcb->last_timer = tcp_timer_ctr; 8008b12: 4b0c ldr r3, [pc, #48] ; (8008b44 ) 8008b14: 781a ldrb r2, [r3, #0] 8008b16: 68fb ldr r3, [r7, #12] 8008b18: 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; 8008b1a: 68fb ldr r3, [r7, #12] 8008b1c: f44f 6286 mov.w r2, #1072 ; 0x430 8008b20: f8a3 204a strh.w r2, [r3, #74] ; 0x4a #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; 8008b24: 68fb ldr r3, [r7, #12] 8008b26: 4a08 ldr r2, [pc, #32] ; (8008b48 ) 8008b28: f8c3 2084 str.w r2, [r3, #132] ; 0x84 #endif /* LWIP_CALLBACK_API */ /* Init KEEPALIVE timer */ pcb->keep_idle = TCP_KEEPIDLE_DEFAULT; 8008b2c: 68fb ldr r3, [r7, #12] 8008b2e: 4a07 ldr r2, [pc, #28] ; (8008b4c ) 8008b30: 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; 8008b34: 68fb ldr r3, [r7, #12] } 8008b36: 4618 mov r0, r3 8008b38: 3710 adds r7, #16 8008b3a: 46bd mov sp, r7 8008b3c: bd80 pop {r7, pc} 8008b3e: bf00 nop 8008b40: 24007b6c .word 0x24007b6c 8008b44: 24007b82 .word 0x24007b82 8008b48: 08008801 .word 0x08008801 8008b4c: 006ddd00 .word 0x006ddd00 08008b50 : * * @return a new tcp_pcb that initially is in state CLOSED */ struct tcp_pcb * tcp_new(void) { 8008b50: b580 push {r7, lr} 8008b52: af00 add r7, sp, #0 return tcp_alloc(TCP_PRIO_NORMAL); 8008b54: 2040 movs r0, #64 ; 0x40 8008b56: f7ff ff77 bl 8008a48 8008b5a: 4603 mov r3, r0 } 8008b5c: 4618 mov r0, r3 8008b5e: bd80 pop {r7, pc} 08008b60 : * @param pcb tcp_pcb to set the callback argument * @param arg void pointer argument to pass to callback functions */ void tcp_arg(struct tcp_pcb *pcb, void *arg) { 8008b60: b480 push {r7} 8008b62: b083 sub sp, #12 8008b64: af00 add r7, sp, #0 8008b66: 6078 str r0, [r7, #4] 8008b68: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); /* This function is allowed to be called for both listen pcbs and connection pcbs. */ if (pcb != NULL) { 8008b6a: 687b ldr r3, [r7, #4] 8008b6c: 2b00 cmp r3, #0 8008b6e: d002 beq.n 8008b76 pcb->callback_arg = arg; 8008b70: 687b ldr r3, [r7, #4] 8008b72: 683a ldr r2, [r7, #0] 8008b74: 611a str r2, [r3, #16] } } 8008b76: bf00 nop 8008b78: 370c adds r7, #12 8008b7a: 46bd mov sp, r7 8008b7c: f85d 7b04 ldr.w r7, [sp], #4 8008b80: 4770 bx lr ... 08008b84 : * @param pcb tcp_pcb to set the recv callback * @param recv callback function to call for this pcb when data is received */ void tcp_recv(struct tcp_pcb *pcb, tcp_recv_fn recv) { 8008b84: b580 push {r7, lr} 8008b86: b082 sub sp, #8 8008b88: af00 add r7, sp, #0 8008b8a: 6078 str r0, [r7, #4] 8008b8c: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); if (pcb != NULL) { 8008b8e: 687b ldr r3, [r7, #4] 8008b90: 2b00 cmp r3, #0 8008b92: d00e beq.n 8008bb2 LWIP_ASSERT("invalid socket state for recv callback", pcb->state != LISTEN); 8008b94: 687b ldr r3, [r7, #4] 8008b96: 7d1b ldrb r3, [r3, #20] 8008b98: 2b01 cmp r3, #1 8008b9a: d106 bne.n 8008baa 8008b9c: 4b07 ldr r3, [pc, #28] ; (8008bbc ) 8008b9e: f240 72df movw r2, #2015 ; 0x7df 8008ba2: 4907 ldr r1, [pc, #28] ; (8008bc0 ) 8008ba4: 4807 ldr r0, [pc, #28] ; (8008bc4 ) 8008ba6: f008 f80f bl 8010bc8 pcb->recv = recv; 8008baa: 687b ldr r3, [r7, #4] 8008bac: 683a ldr r2, [r7, #0] 8008bae: f8c3 2084 str.w r2, [r3, #132] ; 0x84 } } 8008bb2: bf00 nop 8008bb4: 3708 adds r7, #8 8008bb6: 46bd mov sp, r7 8008bb8: bd80 pop {r7, pc} 8008bba: bf00 nop 8008bbc: 08012a08 .word 0x08012a08 8008bc0: 08012fa4 .word 0x08012fa4 8008bc4: 08012a4c .word 0x08012a4c 08008bc8 : * @param pcb tcp_pcb to set the sent callback * @param sent callback function to call for this pcb when data is successfully sent */ void tcp_sent(struct tcp_pcb *pcb, tcp_sent_fn sent) { 8008bc8: b580 push {r7, lr} 8008bca: b082 sub sp, #8 8008bcc: af00 add r7, sp, #0 8008bce: 6078 str r0, [r7, #4] 8008bd0: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); if (pcb != NULL) { 8008bd2: 687b ldr r3, [r7, #4] 8008bd4: 2b00 cmp r3, #0 8008bd6: d00e beq.n 8008bf6 LWIP_ASSERT("invalid socket state for sent callback", pcb->state != LISTEN); 8008bd8: 687b ldr r3, [r7, #4] 8008bda: 7d1b ldrb r3, [r3, #20] 8008bdc: 2b01 cmp r3, #1 8008bde: d106 bne.n 8008bee 8008be0: 4b07 ldr r3, [pc, #28] ; (8008c00 ) 8008be2: f240 72f3 movw r2, #2035 ; 0x7f3 8008be6: 4907 ldr r1, [pc, #28] ; (8008c04 ) 8008be8: 4807 ldr r0, [pc, #28] ; (8008c08 ) 8008bea: f007 ffed bl 8010bc8 pcb->sent = sent; 8008bee: 687b ldr r3, [r7, #4] 8008bf0: 683a ldr r2, [r7, #0] 8008bf2: f8c3 2080 str.w r2, [r3, #128] ; 0x80 } } 8008bf6: bf00 nop 8008bf8: 3708 adds r7, #8 8008bfa: 46bd mov sp, r7 8008bfc: bd80 pop {r7, pc} 8008bfe: bf00 nop 8008c00: 08012a08 .word 0x08012a08 8008c04: 08012fcc .word 0x08012fcc 8008c08: 08012a4c .word 0x08012a4c 08008c0c : * @param err callback function to call for this pcb when a fatal error * has occurred on the connection */ void tcp_err(struct tcp_pcb *pcb, tcp_err_fn err) { 8008c0c: b580 push {r7, lr} 8008c0e: b082 sub sp, #8 8008c10: af00 add r7, sp, #0 8008c12: 6078 str r0, [r7, #4] 8008c14: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); if (pcb != NULL) { 8008c16: 687b ldr r3, [r7, #4] 8008c18: 2b00 cmp r3, #0 8008c1a: d00e beq.n 8008c3a LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN); 8008c1c: 687b ldr r3, [r7, #4] 8008c1e: 7d1b ldrb r3, [r3, #20] 8008c20: 2b01 cmp r3, #1 8008c22: d106 bne.n 8008c32 8008c24: 4b07 ldr r3, [pc, #28] ; (8008c44 ) 8008c26: f640 020d movw r2, #2061 ; 0x80d 8008c2a: 4907 ldr r1, [pc, #28] ; (8008c48 ) 8008c2c: 4807 ldr r0, [pc, #28] ; (8008c4c ) 8008c2e: f007 ffcb bl 8010bc8 pcb->errf = err; 8008c32: 687b ldr r3, [r7, #4] 8008c34: 683a ldr r2, [r7, #0] 8008c36: f8c3 2090 str.w r2, [r3, #144] ; 0x90 } } 8008c3a: bf00 nop 8008c3c: 3708 adds r7, #8 8008c3e: 46bd mov sp, r7 8008c40: bd80 pop {r7, pc} 8008c42: bf00 nop 8008c44: 08012a08 .word 0x08012a08 8008c48: 08012ff4 .word 0x08012ff4 8008c4c: 08012a4c .word 0x08012a4c 08008c50 : * * @param pcb tcp_pcb to purge. The pcb itself is not deallocated! */ void tcp_pcb_purge(struct tcp_pcb *pcb) { 8008c50: b580 push {r7, lr} 8008c52: b082 sub sp, #8 8008c54: af00 add r7, sp, #0 8008c56: 6078 str r0, [r7, #4] LWIP_ERROR("tcp_pcb_purge: invalid pcb", pcb != NULL, return); 8008c58: 687b ldr r3, [r7, #4] 8008c5a: 2b00 cmp r3, #0 8008c5c: d107 bne.n 8008c6e 8008c5e: 4b21 ldr r3, [pc, #132] ; (8008ce4 ) 8008c60: f640 0251 movw r2, #2129 ; 0x851 8008c64: 4920 ldr r1, [pc, #128] ; (8008ce8 ) 8008c66: 4821 ldr r0, [pc, #132] ; (8008cec ) 8008c68: f007 ffae bl 8010bc8 8008c6c: e037 b.n 8008cde if (pcb->state != CLOSED && 8008c6e: 687b ldr r3, [r7, #4] 8008c70: 7d1b ldrb r3, [r3, #20] 8008c72: 2b00 cmp r3, #0 8008c74: d033 beq.n 8008cde pcb->state != TIME_WAIT && 8008c76: 687b ldr r3, [r7, #4] 8008c78: 7d1b ldrb r3, [r3, #20] if (pcb->state != CLOSED && 8008c7a: 2b0a cmp r3, #10 8008c7c: d02f beq.n 8008cde pcb->state != LISTEN) { 8008c7e: 687b ldr r3, [r7, #4] 8008c80: 7d1b ldrb r3, [r3, #20] pcb->state != TIME_WAIT && 8008c82: 2b01 cmp r3, #1 8008c84: d02b beq.n 8008cde LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge\n")); tcp_backlog_accepted(pcb); if (pcb->refused_data != NULL) { 8008c86: 687b ldr r3, [r7, #4] 8008c88: 6f9b ldr r3, [r3, #120] ; 0x78 8008c8a: 2b00 cmp r3, #0 8008c8c: d007 beq.n 8008c9e LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n")); pbuf_free(pcb->refused_data); 8008c8e: 687b ldr r3, [r7, #4] 8008c90: 6f9b ldr r3, [r3, #120] ; 0x78 8008c92: 4618 mov r0, r3 8008c94: f7fe f99e bl 8006fd4 pcb->refused_data = NULL; 8008c98: 687b ldr r3, [r7, #4] 8008c9a: 2200 movs r2, #0 8008c9c: 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) { 8008c9e: 687b ldr r3, [r7, #4] 8008ca0: 6f5b ldr r3, [r3, #116] ; 0x74 8008ca2: 2b00 cmp r3, #0 8008ca4: d002 beq.n 8008cac LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->ooseq\n")); tcp_free_ooseq(pcb); 8008ca6: 6878 ldr r0, [r7, #4] 8008ca8: f000 f98c bl 8008fc4 } #endif /* TCP_QUEUE_OOSEQ */ /* Stop the retransmission timer as it will expect data on unacked queue if it fires */ pcb->rtime = -1; 8008cac: 687b ldr r3, [r7, #4] 8008cae: f64f 72ff movw r2, #65535 ; 0xffff 8008cb2: 861a strh r2, [r3, #48] ; 0x30 tcp_segs_free(pcb->unsent); 8008cb4: 687b ldr r3, [r7, #4] 8008cb6: 6edb ldr r3, [r3, #108] ; 0x6c 8008cb8: 4618 mov r0, r3 8008cba: f7ff fd47 bl 800874c tcp_segs_free(pcb->unacked); 8008cbe: 687b ldr r3, [r7, #4] 8008cc0: 6f1b ldr r3, [r3, #112] ; 0x70 8008cc2: 4618 mov r0, r3 8008cc4: f7ff fd42 bl 800874c pcb->unacked = pcb->unsent = NULL; 8008cc8: 687b ldr r3, [r7, #4] 8008cca: 2200 movs r2, #0 8008ccc: 66da str r2, [r3, #108] ; 0x6c 8008cce: 687b ldr r3, [r7, #4] 8008cd0: 6eda ldr r2, [r3, #108] ; 0x6c 8008cd2: 687b ldr r3, [r7, #4] 8008cd4: 671a str r2, [r3, #112] ; 0x70 #if TCP_OVERSIZE pcb->unsent_oversize = 0; 8008cd6: 687b ldr r3, [r7, #4] 8008cd8: 2200 movs r2, #0 8008cda: f8a3 2068 strh.w r2, [r3, #104] ; 0x68 #endif /* TCP_OVERSIZE */ } } 8008cde: 3708 adds r7, #8 8008ce0: 46bd mov sp, r7 8008ce2: bd80 pop {r7, pc} 8008ce4: 08012a08 .word 0x08012a08 8008ce8: 08013054 .word 0x08013054 8008cec: 08012a4c .word 0x08012a4c 08008cf0 : * @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) { 8008cf0: b580 push {r7, lr} 8008cf2: b084 sub sp, #16 8008cf4: af00 add r7, sp, #0 8008cf6: 6078 str r0, [r7, #4] 8008cf8: 6039 str r1, [r7, #0] LWIP_ASSERT("tcp_pcb_remove: invalid pcb", pcb != NULL); 8008cfa: 683b ldr r3, [r7, #0] 8008cfc: 2b00 cmp r3, #0 8008cfe: d106 bne.n 8008d0e 8008d00: 4b3e ldr r3, [pc, #248] ; (8008dfc ) 8008d02: f640 0283 movw r2, #2179 ; 0x883 8008d06: 493e ldr r1, [pc, #248] ; (8008e00 ) 8008d08: 483e ldr r0, [pc, #248] ; (8008e04 ) 8008d0a: f007 ff5d bl 8010bc8 LWIP_ASSERT("tcp_pcb_remove: invalid pcblist", pcblist != NULL); 8008d0e: 687b ldr r3, [r7, #4] 8008d10: 2b00 cmp r3, #0 8008d12: d106 bne.n 8008d22 8008d14: 4b39 ldr r3, [pc, #228] ; (8008dfc ) 8008d16: f640 0284 movw r2, #2180 ; 0x884 8008d1a: 493b ldr r1, [pc, #236] ; (8008e08 ) 8008d1c: 4839 ldr r0, [pc, #228] ; (8008e04 ) 8008d1e: f007 ff53 bl 8010bc8 TCP_RMV(pcblist, pcb); 8008d22: 687b ldr r3, [r7, #4] 8008d24: 681b ldr r3, [r3, #0] 8008d26: 683a ldr r2, [r7, #0] 8008d28: 429a cmp r2, r3 8008d2a: d105 bne.n 8008d38 8008d2c: 687b ldr r3, [r7, #4] 8008d2e: 681b ldr r3, [r3, #0] 8008d30: 68da ldr r2, [r3, #12] 8008d32: 687b ldr r3, [r7, #4] 8008d34: 601a str r2, [r3, #0] 8008d36: e013 b.n 8008d60 8008d38: 687b ldr r3, [r7, #4] 8008d3a: 681b ldr r3, [r3, #0] 8008d3c: 60fb str r3, [r7, #12] 8008d3e: e00c b.n 8008d5a 8008d40: 68fb ldr r3, [r7, #12] 8008d42: 68db ldr r3, [r3, #12] 8008d44: 683a ldr r2, [r7, #0] 8008d46: 429a cmp r2, r3 8008d48: d104 bne.n 8008d54 8008d4a: 683b ldr r3, [r7, #0] 8008d4c: 68da ldr r2, [r3, #12] 8008d4e: 68fb ldr r3, [r7, #12] 8008d50: 60da str r2, [r3, #12] 8008d52: e005 b.n 8008d60 8008d54: 68fb ldr r3, [r7, #12] 8008d56: 68db ldr r3, [r3, #12] 8008d58: 60fb str r3, [r7, #12] 8008d5a: 68fb ldr r3, [r7, #12] 8008d5c: 2b00 cmp r3, #0 8008d5e: d1ef bne.n 8008d40 8008d60: 683b ldr r3, [r7, #0] 8008d62: 2200 movs r2, #0 8008d64: 60da str r2, [r3, #12] tcp_pcb_purge(pcb); 8008d66: 6838 ldr r0, [r7, #0] 8008d68: f7ff ff72 bl 8008c50 /* if there is an outstanding delayed ACKs, send it */ if ((pcb->state != TIME_WAIT) && 8008d6c: 683b ldr r3, [r7, #0] 8008d6e: 7d1b ldrb r3, [r3, #20] 8008d70: 2b0a cmp r3, #10 8008d72: d013 beq.n 8008d9c (pcb->state != LISTEN) && 8008d74: 683b ldr r3, [r7, #0] 8008d76: 7d1b ldrb r3, [r3, #20] if ((pcb->state != TIME_WAIT) && 8008d78: 2b01 cmp r3, #1 8008d7a: d00f beq.n 8008d9c (pcb->flags & TF_ACK_DELAY)) { 8008d7c: 683b ldr r3, [r7, #0] 8008d7e: 8b5b ldrh r3, [r3, #26] 8008d80: f003 0301 and.w r3, r3, #1 (pcb->state != LISTEN) && 8008d84: 2b00 cmp r3, #0 8008d86: d009 beq.n 8008d9c tcp_ack_now(pcb); 8008d88: 683b ldr r3, [r7, #0] 8008d8a: 8b5b ldrh r3, [r3, #26] 8008d8c: f043 0302 orr.w r3, r3, #2 8008d90: b29a uxth r2, r3 8008d92: 683b ldr r3, [r7, #0] 8008d94: 835a strh r2, [r3, #26] tcp_output(pcb); 8008d96: 6838 ldr r0, [r7, #0] 8008d98: f003 fc2c bl 800c5f4 } if (pcb->state != LISTEN) { 8008d9c: 683b ldr r3, [r7, #0] 8008d9e: 7d1b ldrb r3, [r3, #20] 8008da0: 2b01 cmp r3, #1 8008da2: d020 beq.n 8008de6 LWIP_ASSERT("unsent segments leaking", pcb->unsent == NULL); 8008da4: 683b ldr r3, [r7, #0] 8008da6: 6edb ldr r3, [r3, #108] ; 0x6c 8008da8: 2b00 cmp r3, #0 8008daa: d006 beq.n 8008dba 8008dac: 4b13 ldr r3, [pc, #76] ; (8008dfc ) 8008dae: f640 0293 movw r2, #2195 ; 0x893 8008db2: 4916 ldr r1, [pc, #88] ; (8008e0c ) 8008db4: 4813 ldr r0, [pc, #76] ; (8008e04 ) 8008db6: f007 ff07 bl 8010bc8 LWIP_ASSERT("unacked segments leaking", pcb->unacked == NULL); 8008dba: 683b ldr r3, [r7, #0] 8008dbc: 6f1b ldr r3, [r3, #112] ; 0x70 8008dbe: 2b00 cmp r3, #0 8008dc0: d006 beq.n 8008dd0 8008dc2: 4b0e ldr r3, [pc, #56] ; (8008dfc ) 8008dc4: f640 0294 movw r2, #2196 ; 0x894 8008dc8: 4911 ldr r1, [pc, #68] ; (8008e10 ) 8008dca: 480e ldr r0, [pc, #56] ; (8008e04 ) 8008dcc: f007 fefc bl 8010bc8 #if TCP_QUEUE_OOSEQ LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL); 8008dd0: 683b ldr r3, [r7, #0] 8008dd2: 6f5b ldr r3, [r3, #116] ; 0x74 8008dd4: 2b00 cmp r3, #0 8008dd6: d006 beq.n 8008de6 8008dd8: 4b08 ldr r3, [pc, #32] ; (8008dfc ) 8008dda: f640 0296 movw r2, #2198 ; 0x896 8008dde: 490d ldr r1, [pc, #52] ; (8008e14 ) 8008de0: 4808 ldr r0, [pc, #32] ; (8008e04 ) 8008de2: f007 fef1 bl 8010bc8 #endif /* TCP_QUEUE_OOSEQ */ } pcb->state = CLOSED; 8008de6: 683b ldr r3, [r7, #0] 8008de8: 2200 movs r2, #0 8008dea: 751a strb r2, [r3, #20] /* reset the local port to prevent the pcb from being 'bound' */ pcb->local_port = 0; 8008dec: 683b ldr r3, [r7, #0] 8008dee: 2200 movs r2, #0 8008df0: 82da strh r2, [r3, #22] LWIP_ASSERT("tcp_pcb_remove: tcp_pcbs_sane()", tcp_pcbs_sane()); } 8008df2: bf00 nop 8008df4: 3710 adds r7, #16 8008df6: 46bd mov sp, r7 8008df8: bd80 pop {r7, pc} 8008dfa: bf00 nop 8008dfc: 08012a08 .word 0x08012a08 8008e00: 08013070 .word 0x08013070 8008e04: 08012a4c .word 0x08012a4c 8008e08: 0801308c .word 0x0801308c 8008e0c: 080130ac .word 0x080130ac 8008e10: 080130c4 .word 0x080130c4 8008e14: 080130e0 .word 0x080130e0 08008e18 : * * @return u32_t pseudo random sequence number */ u32_t tcp_next_iss(struct tcp_pcb *pcb) { 8008e18: b580 push {r7, lr} 8008e1a: b082 sub sp, #8 8008e1c: af00 add r7, sp, #0 8008e1e: 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); 8008e20: 687b ldr r3, [r7, #4] 8008e22: 2b00 cmp r3, #0 8008e24: d106 bne.n 8008e34 8008e26: 4b0a ldr r3, [pc, #40] ; (8008e50 ) 8008e28: f640 02af movw r2, #2223 ; 0x8af 8008e2c: 4909 ldr r1, [pc, #36] ; (8008e54 ) 8008e2e: 480a ldr r0, [pc, #40] ; (8008e58 ) 8008e30: f007 feca bl 8010bc8 LWIP_UNUSED_ARG(pcb); iss += tcp_ticks; /* XXX */ 8008e34: 4b09 ldr r3, [pc, #36] ; (8008e5c ) 8008e36: 681a ldr r2, [r3, #0] 8008e38: 4b09 ldr r3, [pc, #36] ; (8008e60 ) 8008e3a: 681b ldr r3, [r3, #0] 8008e3c: 4413 add r3, r2 8008e3e: 4a07 ldr r2, [pc, #28] ; (8008e5c ) 8008e40: 6013 str r3, [r2, #0] return iss; 8008e42: 4b06 ldr r3, [pc, #24] ; (8008e5c ) 8008e44: 681b ldr r3, [r3, #0] #endif /* LWIP_HOOK_TCP_ISN */ } 8008e46: 4618 mov r0, r3 8008e48: 3708 adds r7, #8 8008e4a: 46bd mov sp, r7 8008e4c: bd80 pop {r7, pc} 8008e4e: bf00 nop 8008e50: 08012a08 .word 0x08012a08 8008e54: 080130f8 .word 0x080130f8 8008e58: 08012a4c .word 0x08012a4c 8008e5c: 2400006c .word 0x2400006c 8008e60: 24007b6c .word 0x24007b6c 08008e64 : * 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) { 8008e64: b580 push {r7, lr} 8008e66: b086 sub sp, #24 8008e68: af00 add r7, sp, #0 8008e6a: 4603 mov r3, r0 8008e6c: 60b9 str r1, [r7, #8] 8008e6e: 607a str r2, [r7, #4] 8008e70: 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); 8008e72: 687b ldr r3, [r7, #4] 8008e74: 2b00 cmp r3, #0 8008e76: d106 bne.n 8008e86 8008e78: 4b14 ldr r3, [pc, #80] ; (8008ecc ) 8008e7a: f640 02c5 movw r2, #2245 ; 0x8c5 8008e7e: 4914 ldr r1, [pc, #80] ; (8008ed0 ) 8008e80: 4814 ldr r0, [pc, #80] ; (8008ed4 ) 8008e82: f007 fea1 bl 8010bc8 else #endif /* LWIP_IPV4 */ #endif /* LWIP_IPV6 */ #if LWIP_IPV4 { if (outif == NULL) { 8008e86: 68bb ldr r3, [r7, #8] 8008e88: 2b00 cmp r3, #0 8008e8a: d101 bne.n 8008e90 return sendmss; 8008e8c: 89fb ldrh r3, [r7, #14] 8008e8e: e019 b.n 8008ec4 } mtu = outif->mtu; 8008e90: 68bb ldr r3, [r7, #8] 8008e92: 8c9b ldrh r3, [r3, #36] ; 0x24 8008e94: 82fb strh r3, [r7, #22] } #endif /* LWIP_IPV4 */ if (mtu != 0) { 8008e96: 8afb ldrh r3, [r7, #22] 8008e98: 2b00 cmp r3, #0 8008e9a: d012 beq.n 8008ec2 else #endif /* LWIP_IPV4 */ #endif /* LWIP_IPV6 */ #if LWIP_IPV4 { offset = IP_HLEN + TCP_HLEN; 8008e9c: 2328 movs r3, #40 ; 0x28 8008e9e: 82bb strh r3, [r7, #20] } #endif /* LWIP_IPV4 */ mss_s = (mtu > offset) ? (u16_t)(mtu - offset) : 0; 8008ea0: 8afa ldrh r2, [r7, #22] 8008ea2: 8abb ldrh r3, [r7, #20] 8008ea4: 429a cmp r2, r3 8008ea6: d904 bls.n 8008eb2 8008ea8: 8afa ldrh r2, [r7, #22] 8008eaa: 8abb ldrh r3, [r7, #20] 8008eac: 1ad3 subs r3, r2, r3 8008eae: b29b uxth r3, r3 8008eb0: e000 b.n 8008eb4 8008eb2: 2300 movs r3, #0 8008eb4: 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); 8008eb6: 8a7a ldrh r2, [r7, #18] 8008eb8: 89fb ldrh r3, [r7, #14] 8008eba: 4293 cmp r3, r2 8008ebc: bf28 it cs 8008ebe: 4613 movcs r3, r2 8008ec0: 81fb strh r3, [r7, #14] } return sendmss; 8008ec2: 89fb ldrh r3, [r7, #14] } 8008ec4: 4618 mov r0, r3 8008ec6: 3718 adds r7, #24 8008ec8: 46bd mov sp, r7 8008eca: bd80 pop {r7, pc} 8008ecc: 08012a08 .word 0x08012a08 8008ed0: 08013114 .word 0x08013114 8008ed4: 08012a4c .word 0x08012a4c 08008ed8 : #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) { 8008ed8: b580 push {r7, lr} 8008eda: b084 sub sp, #16 8008edc: af00 add r7, sp, #0 8008ede: 6078 str r0, [r7, #4] 8008ee0: 6039 str r1, [r7, #0] struct tcp_pcb *pcb; pcb = pcb_list; 8008ee2: 683b ldr r3, [r7, #0] 8008ee4: 60fb str r3, [r7, #12] LWIP_ASSERT("tcp_netif_ip_addr_changed_pcblist: invalid old_addr", old_addr != NULL); 8008ee6: 687b ldr r3, [r7, #4] 8008ee8: 2b00 cmp r3, #0 8008eea: d11d bne.n 8008f28 8008eec: 4b12 ldr r3, [pc, #72] ; (8008f38 ) 8008eee: f44f 6210 mov.w r2, #2304 ; 0x900 8008ef2: 4912 ldr r1, [pc, #72] ; (8008f3c ) 8008ef4: 4812 ldr r0, [pc, #72] ; (8008f40 ) 8008ef6: f007 fe67 bl 8010bc8 while (pcb != NULL) { 8008efa: e015 b.n 8008f28 /* PCB bound to current local interface address? */ if (ip_addr_cmp(&pcb->local_ip, old_addr) 8008efc: 68fb ldr r3, [r7, #12] 8008efe: 681a ldr r2, [r3, #0] 8008f00: 687b ldr r3, [r7, #4] 8008f02: 681b ldr r3, [r3, #0] 8008f04: 429a cmp r2, r3 8008f06: d10c bne.n 8008f22 /* 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; 8008f08: 68fb ldr r3, [r7, #12] 8008f0a: 68db ldr r3, [r3, #12] 8008f0c: 60bb str r3, [r7, #8] LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: aborting TCP pcb %p\n", (void *)pcb)); 8008f0e: 68f9 ldr r1, [r7, #12] 8008f10: 480c ldr r0, [pc, #48] ; (8008f44 ) 8008f12: f007 fe59 bl 8010bc8 tcp_abort(pcb); 8008f16: 68f8 ldr r0, [r7, #12] 8008f18: f7fe fde4 bl 8007ae4 pcb = next; 8008f1c: 68bb ldr r3, [r7, #8] 8008f1e: 60fb str r3, [r7, #12] 8008f20: e002 b.n 8008f28 } else { pcb = pcb->next; 8008f22: 68fb ldr r3, [r7, #12] 8008f24: 68db ldr r3, [r3, #12] 8008f26: 60fb str r3, [r7, #12] while (pcb != NULL) { 8008f28: 68fb ldr r3, [r7, #12] 8008f2a: 2b00 cmp r3, #0 8008f2c: d1e6 bne.n 8008efc } } } 8008f2e: bf00 nop 8008f30: bf00 nop 8008f32: 3710 adds r7, #16 8008f34: 46bd mov sp, r7 8008f36: bd80 pop {r7, pc} 8008f38: 08012a08 .word 0x08012a08 8008f3c: 0801313c .word 0x0801313c 8008f40: 08012a4c .word 0x08012a4c 8008f44: 08013170 .word 0x08013170 08008f48 : * @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) { 8008f48: b580 push {r7, lr} 8008f4a: b084 sub sp, #16 8008f4c: af00 add r7, sp, #0 8008f4e: 6078 str r0, [r7, #4] 8008f50: 6039 str r1, [r7, #0] struct tcp_pcb_listen *lpcb; if (!ip_addr_isany(old_addr)) { 8008f52: 687b ldr r3, [r7, #4] 8008f54: 2b00 cmp r3, #0 8008f56: d02a beq.n 8008fae 8008f58: 687b ldr r3, [r7, #4] 8008f5a: 681b ldr r3, [r3, #0] 8008f5c: 2b00 cmp r3, #0 8008f5e: d026 beq.n 8008fae tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs); 8008f60: 4b15 ldr r3, [pc, #84] ; (8008fb8 ) 8008f62: 681b ldr r3, [r3, #0] 8008f64: 4619 mov r1, r3 8008f66: 6878 ldr r0, [r7, #4] 8008f68: f7ff ffb6 bl 8008ed8 tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_bound_pcbs); 8008f6c: 4b13 ldr r3, [pc, #76] ; (8008fbc ) 8008f6e: 681b ldr r3, [r3, #0] 8008f70: 4619 mov r1, r3 8008f72: 6878 ldr r0, [r7, #4] 8008f74: f7ff ffb0 bl 8008ed8 if (!ip_addr_isany(new_addr)) { 8008f78: 683b ldr r3, [r7, #0] 8008f7a: 2b00 cmp r3, #0 8008f7c: d017 beq.n 8008fae 8008f7e: 683b ldr r3, [r7, #0] 8008f80: 681b ldr r3, [r3, #0] 8008f82: 2b00 cmp r3, #0 8008f84: d013 beq.n 8008fae /* PCB bound to current local interface address? */ for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 8008f86: 4b0e ldr r3, [pc, #56] ; (8008fc0 ) 8008f88: 681b ldr r3, [r3, #0] 8008f8a: 60fb str r3, [r7, #12] 8008f8c: e00c b.n 8008fa8 /* PCB bound to current local interface address? */ if (ip_addr_cmp(&lpcb->local_ip, old_addr)) { 8008f8e: 68fb ldr r3, [r7, #12] 8008f90: 681a ldr r2, [r3, #0] 8008f92: 687b ldr r3, [r7, #4] 8008f94: 681b ldr r3, [r3, #0] 8008f96: 429a cmp r2, r3 8008f98: d103 bne.n 8008fa2 /* 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); 8008f9a: 683b ldr r3, [r7, #0] 8008f9c: 681a ldr r2, [r3, #0] 8008f9e: 68fb ldr r3, [r7, #12] 8008fa0: 601a str r2, [r3, #0] for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 8008fa2: 68fb ldr r3, [r7, #12] 8008fa4: 68db ldr r3, [r3, #12] 8008fa6: 60fb str r3, [r7, #12] 8008fa8: 68fb ldr r3, [r7, #12] 8008faa: 2b00 cmp r3, #0 8008fac: d1ef bne.n 8008f8e } } } } } 8008fae: bf00 nop 8008fb0: 3710 adds r7, #16 8008fb2: 46bd mov sp, r7 8008fb4: bd80 pop {r7, pc} 8008fb6: bf00 nop 8008fb8: 24007b78 .word 0x24007b78 8008fbc: 24007b70 .word 0x24007b70 8008fc0: 24007b74 .word 0x24007b74 08008fc4 : #if TCP_QUEUE_OOSEQ /* Free all ooseq pbufs (and possibly reset SACK state) */ void tcp_free_ooseq(struct tcp_pcb *pcb) { 8008fc4: b580 push {r7, lr} 8008fc6: b082 sub sp, #8 8008fc8: af00 add r7, sp, #0 8008fca: 6078 str r0, [r7, #4] if (pcb->ooseq) { 8008fcc: 687b ldr r3, [r7, #4] 8008fce: 6f5b ldr r3, [r3, #116] ; 0x74 8008fd0: 2b00 cmp r3, #0 8008fd2: d007 beq.n 8008fe4 tcp_segs_free(pcb->ooseq); 8008fd4: 687b ldr r3, [r7, #4] 8008fd6: 6f5b ldr r3, [r3, #116] ; 0x74 8008fd8: 4618 mov r0, r3 8008fda: f7ff fbb7 bl 800874c pcb->ooseq = NULL; 8008fde: 687b ldr r3, [r7, #4] 8008fe0: 2200 movs r2, #0 8008fe2: 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 */ } } 8008fe4: bf00 nop 8008fe6: 3708 adds r7, #8 8008fe8: 46bd mov sp, r7 8008fea: bd80 pop {r7, pc} 08008fec : * @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) { 8008fec: b590 push {r4, r7, lr} 8008fee: b08d sub sp, #52 ; 0x34 8008ff0: af04 add r7, sp, #16 8008ff2: 6078 str r0, [r7, #4] 8008ff4: 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); 8008ff6: 687b ldr r3, [r7, #4] 8008ff8: 2b00 cmp r3, #0 8008ffa: d105 bne.n 8009008 8008ffc: 4b9b ldr r3, [pc, #620] ; (800926c ) 8008ffe: 2283 movs r2, #131 ; 0x83 8009000: 499b ldr r1, [pc, #620] ; (8009270 ) 8009002: 489c ldr r0, [pc, #624] ; (8009274 ) 8009004: f007 fde0 bl 8010bc8 PERF_START; TCP_STATS_INC(tcp.recv); MIB2_STATS_INC(mib2.tcpinsegs); tcphdr = (struct tcp_hdr *)p->payload; 8009008: 687b ldr r3, [r7, #4] 800900a: 685b ldr r3, [r3, #4] 800900c: 4a9a ldr r2, [pc, #616] ; (8009278 ) 800900e: 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) { 8009010: 687b ldr r3, [r7, #4] 8009012: 895b ldrh r3, [r3, #10] 8009014: 2b13 cmp r3, #19 8009016: f240 83d1 bls.w 80097bc 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()) || 800901a: 4b98 ldr r3, [pc, #608] ; (800927c ) 800901c: 695b ldr r3, [r3, #20] 800901e: 4a97 ldr r2, [pc, #604] ; (800927c ) 8009020: 6812 ldr r2, [r2, #0] 8009022: 4611 mov r1, r2 8009024: 4618 mov r0, r3 8009026: f006 f9c5 bl 800f3b4 800902a: 4603 mov r3, r0 800902c: 2b00 cmp r3, #0 800902e: f040 83c7 bne.w 80097c0 ip_addr_ismulticast(ip_current_dest_addr())) { 8009032: 4b92 ldr r3, [pc, #584] ; (800927c ) 8009034: 695b ldr r3, [r3, #20] 8009036: f003 03f0 and.w r3, r3, #240 ; 0xf0 if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) || 800903a: 2be0 cmp r3, #224 ; 0xe0 800903c: f000 83c0 beq.w 80097c0 } } #endif /* CHECKSUM_CHECK_TCP */ /* sanity-check header length */ hdrlen_bytes = TCPH_HDRLEN_BYTES(tcphdr); 8009040: 4b8d ldr r3, [pc, #564] ; (8009278 ) 8009042: 681b ldr r3, [r3, #0] 8009044: 899b ldrh r3, [r3, #12] 8009046: b29b uxth r3, r3 8009048: 4618 mov r0, r3 800904a: f7fc fa7f bl 800554c 800904e: 4603 mov r3, r0 8009050: 0b1b lsrs r3, r3, #12 8009052: b29b uxth r3, r3 8009054: b2db uxtb r3, r3 8009056: 009b lsls r3, r3, #2 8009058: 74bb strb r3, [r7, #18] if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) { 800905a: 7cbb ldrb r3, [r7, #18] 800905c: 2b13 cmp r3, #19 800905e: f240 83b1 bls.w 80097c4 8009062: 7cbb ldrb r3, [r7, #18] 8009064: b29a uxth r2, r3 8009066: 687b ldr r3, [r7, #4] 8009068: 891b ldrh r3, [r3, #8] 800906a: 429a cmp r2, r3 800906c: f200 83aa bhi.w 80097c4 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); 8009070: 7cbb ldrb r3, [r7, #18] 8009072: b29b uxth r3, r3 8009074: 3b14 subs r3, #20 8009076: b29a uxth r2, r3 8009078: 4b81 ldr r3, [pc, #516] ; (8009280 ) 800907a: 801a strh r2, [r3, #0] tcphdr_opt2 = NULL; 800907c: 4b81 ldr r3, [pc, #516] ; (8009284 ) 800907e: 2200 movs r2, #0 8009080: 601a str r2, [r3, #0] if (p->len >= hdrlen_bytes) { 8009082: 687b ldr r3, [r7, #4] 8009084: 895a ldrh r2, [r3, #10] 8009086: 7cbb ldrb r3, [r7, #18] 8009088: b29b uxth r3, r3 800908a: 429a cmp r2, r3 800908c: d309 bcc.n 80090a2 /* all options are in the first pbuf */ tcphdr_opt1len = tcphdr_optlen; 800908e: 4b7c ldr r3, [pc, #496] ; (8009280 ) 8009090: 881a ldrh r2, [r3, #0] 8009092: 4b7d ldr r3, [pc, #500] ; (8009288 ) 8009094: 801a strh r2, [r3, #0] pbuf_remove_header(p, hdrlen_bytes); /* cannot fail */ 8009096: 7cbb ldrb r3, [r7, #18] 8009098: 4619 mov r1, r3 800909a: 6878 ldr r0, [r7, #4] 800909c: f7fd ff14 bl 8006ec8 80090a0: e04e b.n 8009140 } 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); 80090a2: 687b ldr r3, [r7, #4] 80090a4: 681b ldr r3, [r3, #0] 80090a6: 2b00 cmp r3, #0 80090a8: d105 bne.n 80090b6 80090aa: 4b70 ldr r3, [pc, #448] ; (800926c ) 80090ac: 22c2 movs r2, #194 ; 0xc2 80090ae: 4977 ldr r1, [pc, #476] ; (800928c ) 80090b0: 4870 ldr r0, [pc, #448] ; (8009274 ) 80090b2: f007 fd89 bl 8010bc8 /* advance over the TCP header (cannot fail) */ pbuf_remove_header(p, TCP_HLEN); 80090b6: 2114 movs r1, #20 80090b8: 6878 ldr r0, [r7, #4] 80090ba: f7fd ff05 bl 8006ec8 /* determine how long the first and second parts of the options are */ tcphdr_opt1len = p->len; 80090be: 687b ldr r3, [r7, #4] 80090c0: 895a ldrh r2, [r3, #10] 80090c2: 4b71 ldr r3, [pc, #452] ; (8009288 ) 80090c4: 801a strh r2, [r3, #0] opt2len = (u16_t)(tcphdr_optlen - tcphdr_opt1len); 80090c6: 4b6e ldr r3, [pc, #440] ; (8009280 ) 80090c8: 881a ldrh r2, [r3, #0] 80090ca: 4b6f ldr r3, [pc, #444] ; (8009288 ) 80090cc: 881b ldrh r3, [r3, #0] 80090ce: 1ad3 subs r3, r2, r3 80090d0: 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); 80090d2: 4b6d ldr r3, [pc, #436] ; (8009288 ) 80090d4: 881b ldrh r3, [r3, #0] 80090d6: 4619 mov r1, r3 80090d8: 6878 ldr r0, [r7, #4] 80090da: f7fd fef5 bl 8006ec8 /* check that the options fit in the second pbuf */ if (opt2len > p->next->len) { 80090de: 687b ldr r3, [r7, #4] 80090e0: 681b ldr r3, [r3, #0] 80090e2: 895b ldrh r3, [r3, #10] 80090e4: 8a3a ldrh r2, [r7, #16] 80090e6: 429a cmp r2, r3 80090e8: f200 836e bhi.w 80097c8 TCP_STATS_INC(tcp.lenerr); goto dropped; } /* remember the pointer to the second part of the options */ tcphdr_opt2 = (u8_t *)p->next->payload; 80090ec: 687b ldr r3, [r7, #4] 80090ee: 681b ldr r3, [r3, #0] 80090f0: 685b ldr r3, [r3, #4] 80090f2: 4a64 ldr r2, [pc, #400] ; (8009284 ) 80090f4: 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); 80090f6: 687b ldr r3, [r7, #4] 80090f8: 681b ldr r3, [r3, #0] 80090fa: 8a3a ldrh r2, [r7, #16] 80090fc: 4611 mov r1, r2 80090fe: 4618 mov r0, r3 8009100: f7fd fee2 bl 8006ec8 p->tot_len = (u16_t)(p->tot_len - opt2len); 8009104: 687b ldr r3, [r7, #4] 8009106: 891a ldrh r2, [r3, #8] 8009108: 8a3b ldrh r3, [r7, #16] 800910a: 1ad3 subs r3, r2, r3 800910c: b29a uxth r2, r3 800910e: 687b ldr r3, [r7, #4] 8009110: 811a strh r2, [r3, #8] LWIP_ASSERT("p->len == 0", p->len == 0); 8009112: 687b ldr r3, [r7, #4] 8009114: 895b ldrh r3, [r3, #10] 8009116: 2b00 cmp r3, #0 8009118: d005 beq.n 8009126 800911a: 4b54 ldr r3, [pc, #336] ; (800926c ) 800911c: 22df movs r2, #223 ; 0xdf 800911e: 495c ldr r1, [pc, #368] ; (8009290 ) 8009120: 4854 ldr r0, [pc, #336] ; (8009274 ) 8009122: f007 fd51 bl 8010bc8 LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len); 8009126: 687b ldr r3, [r7, #4] 8009128: 891a ldrh r2, [r3, #8] 800912a: 687b ldr r3, [r7, #4] 800912c: 681b ldr r3, [r3, #0] 800912e: 891b ldrh r3, [r3, #8] 8009130: 429a cmp r2, r3 8009132: d005 beq.n 8009140 8009134: 4b4d ldr r3, [pc, #308] ; (800926c ) 8009136: 22e0 movs r2, #224 ; 0xe0 8009138: 4956 ldr r1, [pc, #344] ; (8009294 ) 800913a: 484e ldr r0, [pc, #312] ; (8009274 ) 800913c: f007 fd44 bl 8010bc8 } /* Convert fields in TCP header to host byte order. */ tcphdr->src = lwip_ntohs(tcphdr->src); 8009140: 4b4d ldr r3, [pc, #308] ; (8009278 ) 8009142: 681b ldr r3, [r3, #0] 8009144: 881b ldrh r3, [r3, #0] 8009146: b29b uxth r3, r3 8009148: 4a4b ldr r2, [pc, #300] ; (8009278 ) 800914a: 6814 ldr r4, [r2, #0] 800914c: 4618 mov r0, r3 800914e: f7fc f9fd bl 800554c 8009152: 4603 mov r3, r0 8009154: 8023 strh r3, [r4, #0] tcphdr->dest = lwip_ntohs(tcphdr->dest); 8009156: 4b48 ldr r3, [pc, #288] ; (8009278 ) 8009158: 681b ldr r3, [r3, #0] 800915a: 885b ldrh r3, [r3, #2] 800915c: b29b uxth r3, r3 800915e: 4a46 ldr r2, [pc, #280] ; (8009278 ) 8009160: 6814 ldr r4, [r2, #0] 8009162: 4618 mov r0, r3 8009164: f7fc f9f2 bl 800554c 8009168: 4603 mov r3, r0 800916a: 8063 strh r3, [r4, #2] seqno = tcphdr->seqno = lwip_ntohl(tcphdr->seqno); 800916c: 4b42 ldr r3, [pc, #264] ; (8009278 ) 800916e: 681b ldr r3, [r3, #0] 8009170: 685b ldr r3, [r3, #4] 8009172: 4a41 ldr r2, [pc, #260] ; (8009278 ) 8009174: 6814 ldr r4, [r2, #0] 8009176: 4618 mov r0, r3 8009178: f7fc f9fd bl 8005576 800917c: 4603 mov r3, r0 800917e: 6063 str r3, [r4, #4] 8009180: 6863 ldr r3, [r4, #4] 8009182: 4a45 ldr r2, [pc, #276] ; (8009298 ) 8009184: 6013 str r3, [r2, #0] ackno = tcphdr->ackno = lwip_ntohl(tcphdr->ackno); 8009186: 4b3c ldr r3, [pc, #240] ; (8009278 ) 8009188: 681b ldr r3, [r3, #0] 800918a: 689b ldr r3, [r3, #8] 800918c: 4a3a ldr r2, [pc, #232] ; (8009278 ) 800918e: 6814 ldr r4, [r2, #0] 8009190: 4618 mov r0, r3 8009192: f7fc f9f0 bl 8005576 8009196: 4603 mov r3, r0 8009198: 60a3 str r3, [r4, #8] 800919a: 68a3 ldr r3, [r4, #8] 800919c: 4a3f ldr r2, [pc, #252] ; (800929c ) 800919e: 6013 str r3, [r2, #0] tcphdr->wnd = lwip_ntohs(tcphdr->wnd); 80091a0: 4b35 ldr r3, [pc, #212] ; (8009278 ) 80091a2: 681b ldr r3, [r3, #0] 80091a4: 89db ldrh r3, [r3, #14] 80091a6: b29b uxth r3, r3 80091a8: 4a33 ldr r2, [pc, #204] ; (8009278 ) 80091aa: 6814 ldr r4, [r2, #0] 80091ac: 4618 mov r0, r3 80091ae: f7fc f9cd bl 800554c 80091b2: 4603 mov r3, r0 80091b4: 81e3 strh r3, [r4, #14] flags = TCPH_FLAGS(tcphdr); 80091b6: 4b30 ldr r3, [pc, #192] ; (8009278 ) 80091b8: 681b ldr r3, [r3, #0] 80091ba: 899b ldrh r3, [r3, #12] 80091bc: b29b uxth r3, r3 80091be: 4618 mov r0, r3 80091c0: f7fc f9c4 bl 800554c 80091c4: 4603 mov r3, r0 80091c6: b2db uxtb r3, r3 80091c8: f003 033f and.w r3, r3, #63 ; 0x3f 80091cc: b2da uxtb r2, r3 80091ce: 4b34 ldr r3, [pc, #208] ; (80092a0 ) 80091d0: 701a strb r2, [r3, #0] tcplen = p->tot_len; 80091d2: 687b ldr r3, [r7, #4] 80091d4: 891a ldrh r2, [r3, #8] 80091d6: 4b33 ldr r3, [pc, #204] ; (80092a4 ) 80091d8: 801a strh r2, [r3, #0] if (flags & (TCP_FIN | TCP_SYN)) { 80091da: 4b31 ldr r3, [pc, #196] ; (80092a0 ) 80091dc: 781b ldrb r3, [r3, #0] 80091de: f003 0303 and.w r3, r3, #3 80091e2: 2b00 cmp r3, #0 80091e4: d00c beq.n 8009200 tcplen++; 80091e6: 4b2f ldr r3, [pc, #188] ; (80092a4 ) 80091e8: 881b ldrh r3, [r3, #0] 80091ea: 3301 adds r3, #1 80091ec: b29a uxth r2, r3 80091ee: 4b2d ldr r3, [pc, #180] ; (80092a4 ) 80091f0: 801a strh r2, [r3, #0] if (tcplen < p->tot_len) { 80091f2: 687b ldr r3, [r7, #4] 80091f4: 891a ldrh r2, [r3, #8] 80091f6: 4b2b ldr r3, [pc, #172] ; (80092a4 ) 80091f8: 881b ldrh r3, [r3, #0] 80091fa: 429a cmp r2, r3 80091fc: f200 82e6 bhi.w 80097cc } } /* Demultiplex an incoming segment. First, we check if it is destined for an active connection. */ prev = NULL; 8009200: 2300 movs r3, #0 8009202: 61fb str r3, [r7, #28] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 8009204: 4b28 ldr r3, [pc, #160] ; (80092a8 ) 8009206: 681b ldr r3, [r3, #0] 8009208: 61bb str r3, [r7, #24] 800920a: e09d b.n 8009348 LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); 800920c: 69bb ldr r3, [r7, #24] 800920e: 7d1b ldrb r3, [r3, #20] 8009210: 2b00 cmp r3, #0 8009212: d105 bne.n 8009220 8009214: 4b15 ldr r3, [pc, #84] ; (800926c ) 8009216: 22fb movs r2, #251 ; 0xfb 8009218: 4924 ldr r1, [pc, #144] ; (80092ac ) 800921a: 4816 ldr r0, [pc, #88] ; (8009274 ) 800921c: f007 fcd4 bl 8010bc8 LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); 8009220: 69bb ldr r3, [r7, #24] 8009222: 7d1b ldrb r3, [r3, #20] 8009224: 2b0a cmp r3, #10 8009226: d105 bne.n 8009234 8009228: 4b10 ldr r3, [pc, #64] ; (800926c ) 800922a: 22fc movs r2, #252 ; 0xfc 800922c: 4920 ldr r1, [pc, #128] ; (80092b0 ) 800922e: 4811 ldr r0, [pc, #68] ; (8009274 ) 8009230: f007 fcca bl 8010bc8 LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); 8009234: 69bb ldr r3, [r7, #24] 8009236: 7d1b ldrb r3, [r3, #20] 8009238: 2b01 cmp r3, #1 800923a: d105 bne.n 8009248 800923c: 4b0b ldr r3, [pc, #44] ; (800926c ) 800923e: 22fd movs r2, #253 ; 0xfd 8009240: 491c ldr r1, [pc, #112] ; (80092b4 ) 8009242: 480c ldr r0, [pc, #48] ; (8009274 ) 8009244: f007 fcc0 bl 8010bc8 /* check if PCB is bound to specific netif */ if ((pcb->netif_idx != NETIF_NO_INDEX) && 8009248: 69bb ldr r3, [r7, #24] 800924a: 7a1b ldrb r3, [r3, #8] 800924c: 2b00 cmp r3, #0 800924e: d033 beq.n 80092b8 (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 8009250: 69bb ldr r3, [r7, #24] 8009252: 7a1a ldrb r2, [r3, #8] 8009254: 4b09 ldr r3, [pc, #36] ; (800927c ) 8009256: 685b ldr r3, [r3, #4] 8009258: f893 3030 ldrb.w r3, [r3, #48] ; 0x30 800925c: 3301 adds r3, #1 800925e: b2db uxtb r3, r3 if ((pcb->netif_idx != NETIF_NO_INDEX) && 8009260: 429a cmp r2, r3 8009262: d029 beq.n 80092b8 prev = pcb; 8009264: 69bb ldr r3, [r7, #24] 8009266: 61fb str r3, [r7, #28] continue; 8009268: e06b b.n 8009342 800926a: bf00 nop 800926c: 08013198 .word 0x08013198 8009270: 080131cc .word 0x080131cc 8009274: 080131e4 .word 0x080131e4 8009278: 24007b98 .word 0x24007b98 800927c: 24004c10 .word 0x24004c10 8009280: 24007b9c .word 0x24007b9c 8009284: 24007ba0 .word 0x24007ba0 8009288: 24007b9e .word 0x24007b9e 800928c: 0801320c .word 0x0801320c 8009290: 0801321c .word 0x0801321c 8009294: 08013228 .word 0x08013228 8009298: 24007ba8 .word 0x24007ba8 800929c: 24007bac .word 0x24007bac 80092a0: 24007bb4 .word 0x24007bb4 80092a4: 24007bb2 .word 0x24007bb2 80092a8: 24007b78 .word 0x24007b78 80092ac: 08013248 .word 0x08013248 80092b0: 08013270 .word 0x08013270 80092b4: 0801329c .word 0x0801329c } if (pcb->remote_port == tcphdr->src && 80092b8: 69bb ldr r3, [r7, #24] 80092ba: 8b1a ldrh r2, [r3, #24] 80092bc: 4b72 ldr r3, [pc, #456] ; (8009488 ) 80092be: 681b ldr r3, [r3, #0] 80092c0: 881b ldrh r3, [r3, #0] 80092c2: b29b uxth r3, r3 80092c4: 429a cmp r2, r3 80092c6: d13a bne.n 800933e pcb->local_port == tcphdr->dest && 80092c8: 69bb ldr r3, [r7, #24] 80092ca: 8ada ldrh r2, [r3, #22] 80092cc: 4b6e ldr r3, [pc, #440] ; (8009488 ) 80092ce: 681b ldr r3, [r3, #0] 80092d0: 885b ldrh r3, [r3, #2] 80092d2: b29b uxth r3, r3 if (pcb->remote_port == tcphdr->src && 80092d4: 429a cmp r2, r3 80092d6: d132 bne.n 800933e ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 80092d8: 69bb ldr r3, [r7, #24] 80092da: 685a ldr r2, [r3, #4] 80092dc: 4b6b ldr r3, [pc, #428] ; (800948c ) 80092de: 691b ldr r3, [r3, #16] pcb->local_port == tcphdr->dest && 80092e0: 429a cmp r2, r3 80092e2: d12c bne.n 800933e ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { 80092e4: 69bb ldr r3, [r7, #24] 80092e6: 681a ldr r2, [r3, #0] 80092e8: 4b68 ldr r3, [pc, #416] ; (800948c ) 80092ea: 695b ldr r3, [r3, #20] ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 80092ec: 429a cmp r2, r3 80092ee: d126 bne.n 800933e /* 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); 80092f0: 69bb ldr r3, [r7, #24] 80092f2: 68db ldr r3, [r3, #12] 80092f4: 69ba ldr r2, [r7, #24] 80092f6: 429a cmp r2, r3 80092f8: d106 bne.n 8009308 80092fa: 4b65 ldr r3, [pc, #404] ; (8009490 ) 80092fc: f240 120d movw r2, #269 ; 0x10d 8009300: 4964 ldr r1, [pc, #400] ; (8009494 ) 8009302: 4865 ldr r0, [pc, #404] ; (8009498 ) 8009304: f007 fc60 bl 8010bc8 if (prev != NULL) { 8009308: 69fb ldr r3, [r7, #28] 800930a: 2b00 cmp r3, #0 800930c: d00a beq.n 8009324 prev->next = pcb->next; 800930e: 69bb ldr r3, [r7, #24] 8009310: 68da ldr r2, [r3, #12] 8009312: 69fb ldr r3, [r7, #28] 8009314: 60da str r2, [r3, #12] pcb->next = tcp_active_pcbs; 8009316: 4b61 ldr r3, [pc, #388] ; (800949c ) 8009318: 681a ldr r2, [r3, #0] 800931a: 69bb ldr r3, [r7, #24] 800931c: 60da str r2, [r3, #12] tcp_active_pcbs = pcb; 800931e: 4a5f ldr r2, [pc, #380] ; (800949c ) 8009320: 69bb ldr r3, [r7, #24] 8009322: 6013 str r3, [r2, #0] } else { TCP_STATS_INC(tcp.cachehit); } LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb); 8009324: 69bb ldr r3, [r7, #24] 8009326: 68db ldr r3, [r3, #12] 8009328: 69ba ldr r2, [r7, #24] 800932a: 429a cmp r2, r3 800932c: d111 bne.n 8009352 800932e: 4b58 ldr r3, [pc, #352] ; (8009490 ) 8009330: f240 1215 movw r2, #277 ; 0x115 8009334: 495a ldr r1, [pc, #360] ; (80094a0 ) 8009336: 4858 ldr r0, [pc, #352] ; (8009498 ) 8009338: f007 fc46 bl 8010bc8 break; 800933c: e009 b.n 8009352 } prev = pcb; 800933e: 69bb ldr r3, [r7, #24] 8009340: 61fb str r3, [r7, #28] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 8009342: 69bb ldr r3, [r7, #24] 8009344: 68db ldr r3, [r3, #12] 8009346: 61bb str r3, [r7, #24] 8009348: 69bb ldr r3, [r7, #24] 800934a: 2b00 cmp r3, #0 800934c: f47f af5e bne.w 800920c 8009350: e000 b.n 8009354 break; 8009352: bf00 nop } if (pcb == NULL) { 8009354: 69bb ldr r3, [r7, #24] 8009356: 2b00 cmp r3, #0 8009358: f040 80aa bne.w 80094b0 /* 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) { 800935c: 4b51 ldr r3, [pc, #324] ; (80094a4 ) 800935e: 681b ldr r3, [r3, #0] 8009360: 61bb str r3, [r7, #24] 8009362: e03f b.n 80093e4 LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); 8009364: 69bb ldr r3, [r7, #24] 8009366: 7d1b ldrb r3, [r3, #20] 8009368: 2b0a cmp r3, #10 800936a: d006 beq.n 800937a 800936c: 4b48 ldr r3, [pc, #288] ; (8009490 ) 800936e: f240 121f movw r2, #287 ; 0x11f 8009372: 494d ldr r1, [pc, #308] ; (80094a8 ) 8009374: 4848 ldr r0, [pc, #288] ; (8009498 ) 8009376: f007 fc27 bl 8010bc8 /* check if PCB is bound to specific netif */ if ((pcb->netif_idx != NETIF_NO_INDEX) && 800937a: 69bb ldr r3, [r7, #24] 800937c: 7a1b ldrb r3, [r3, #8] 800937e: 2b00 cmp r3, #0 8009380: d009 beq.n 8009396 (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 8009382: 69bb ldr r3, [r7, #24] 8009384: 7a1a ldrb r2, [r3, #8] 8009386: 4b41 ldr r3, [pc, #260] ; (800948c ) 8009388: 685b ldr r3, [r3, #4] 800938a: f893 3030 ldrb.w r3, [r3, #48] ; 0x30 800938e: 3301 adds r3, #1 8009390: b2db uxtb r3, r3 if ((pcb->netif_idx != NETIF_NO_INDEX) && 8009392: 429a cmp r2, r3 8009394: d122 bne.n 80093dc continue; } if (pcb->remote_port == tcphdr->src && 8009396: 69bb ldr r3, [r7, #24] 8009398: 8b1a ldrh r2, [r3, #24] 800939a: 4b3b ldr r3, [pc, #236] ; (8009488 ) 800939c: 681b ldr r3, [r3, #0] 800939e: 881b ldrh r3, [r3, #0] 80093a0: b29b uxth r3, r3 80093a2: 429a cmp r2, r3 80093a4: d11b bne.n 80093de pcb->local_port == tcphdr->dest && 80093a6: 69bb ldr r3, [r7, #24] 80093a8: 8ada ldrh r2, [r3, #22] 80093aa: 4b37 ldr r3, [pc, #220] ; (8009488 ) 80093ac: 681b ldr r3, [r3, #0] 80093ae: 885b ldrh r3, [r3, #2] 80093b0: b29b uxth r3, r3 if (pcb->remote_port == tcphdr->src && 80093b2: 429a cmp r2, r3 80093b4: d113 bne.n 80093de ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 80093b6: 69bb ldr r3, [r7, #24] 80093b8: 685a ldr r2, [r3, #4] 80093ba: 4b34 ldr r3, [pc, #208] ; (800948c ) 80093bc: 691b ldr r3, [r3, #16] pcb->local_port == tcphdr->dest && 80093be: 429a cmp r2, r3 80093c0: d10d bne.n 80093de ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { 80093c2: 69bb ldr r3, [r7, #24] 80093c4: 681a ldr r2, [r3, #0] 80093c6: 4b31 ldr r3, [pc, #196] ; (800948c ) 80093c8: 695b ldr r3, [r3, #20] ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 80093ca: 429a cmp r2, r3 80093cc: d107 bne.n 80093de #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); 80093ce: 69b8 ldr r0, [r7, #24] 80093d0: f000 fb56 bl 8009a80 } pbuf_free(p); 80093d4: 6878 ldr r0, [r7, #4] 80093d6: f7fd fdfd bl 8006fd4 return; 80093da: e1fd b.n 80097d8 continue; 80093dc: bf00 nop for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 80093de: 69bb ldr r3, [r7, #24] 80093e0: 68db ldr r3, [r3, #12] 80093e2: 61bb str r3, [r7, #24] 80093e4: 69bb ldr r3, [r7, #24] 80093e6: 2b00 cmp r3, #0 80093e8: d1bc bne.n 8009364 } } /* Finally, if we still did not get a match, we check all PCBs that are LISTENing for incoming connections. */ prev = NULL; 80093ea: 2300 movs r3, #0 80093ec: 61fb str r3, [r7, #28] for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 80093ee: 4b2f ldr r3, [pc, #188] ; (80094ac ) 80093f0: 681b ldr r3, [r3, #0] 80093f2: 617b str r3, [r7, #20] 80093f4: e02a b.n 800944c /* check if PCB is bound to specific netif */ if ((lpcb->netif_idx != NETIF_NO_INDEX) && 80093f6: 697b ldr r3, [r7, #20] 80093f8: 7a1b ldrb r3, [r3, #8] 80093fa: 2b00 cmp r3, #0 80093fc: d00c beq.n 8009418 (lpcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 80093fe: 697b ldr r3, [r7, #20] 8009400: 7a1a ldrb r2, [r3, #8] 8009402: 4b22 ldr r3, [pc, #136] ; (800948c ) 8009404: 685b ldr r3, [r3, #4] 8009406: f893 3030 ldrb.w r3, [r3, #48] ; 0x30 800940a: 3301 adds r3, #1 800940c: b2db uxtb r3, r3 if ((lpcb->netif_idx != NETIF_NO_INDEX) && 800940e: 429a cmp r2, r3 8009410: d002 beq.n 8009418 prev = (struct tcp_pcb *)lpcb; 8009412: 697b ldr r3, [r7, #20] 8009414: 61fb str r3, [r7, #28] continue; 8009416: e016 b.n 8009446 } if (lpcb->local_port == tcphdr->dest) { 8009418: 697b ldr r3, [r7, #20] 800941a: 8ada ldrh r2, [r3, #22] 800941c: 4b1a ldr r3, [pc, #104] ; (8009488 ) 800941e: 681b ldr r3, [r3, #0] 8009420: 885b ldrh r3, [r3, #2] 8009422: b29b uxth r3, r3 8009424: 429a cmp r2, r3 8009426: d10c bne.n 8009442 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())) { 8009428: 697b ldr r3, [r7, #20] 800942a: 681a ldr r2, [r3, #0] 800942c: 4b17 ldr r3, [pc, #92] ; (800948c ) 800942e: 695b ldr r3, [r3, #20] 8009430: 429a cmp r2, r3 8009432: d00f beq.n 8009454 /* found an exact match */ break; } else if (ip_addr_isany(&lpcb->local_ip)) { 8009434: 697b ldr r3, [r7, #20] 8009436: 2b00 cmp r3, #0 8009438: d00d beq.n 8009456 800943a: 697b ldr r3, [r7, #20] 800943c: 681b ldr r3, [r3, #0] 800943e: 2b00 cmp r3, #0 8009440: d009 beq.n 8009456 break; #endif /* SO_REUSE */ } } } prev = (struct tcp_pcb *)lpcb; 8009442: 697b ldr r3, [r7, #20] 8009444: 61fb str r3, [r7, #28] for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 8009446: 697b ldr r3, [r7, #20] 8009448: 68db ldr r3, [r3, #12] 800944a: 617b str r3, [r7, #20] 800944c: 697b ldr r3, [r7, #20] 800944e: 2b00 cmp r3, #0 8009450: d1d1 bne.n 80093f6 8009452: e000 b.n 8009456 break; 8009454: 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) { 8009456: 697b ldr r3, [r7, #20] 8009458: 2b00 cmp r3, #0 800945a: d029 beq.n 80094b0 /* 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) { 800945c: 69fb ldr r3, [r7, #28] 800945e: 2b00 cmp r3, #0 8009460: d00a beq.n 8009478 ((struct tcp_pcb_listen *)prev)->next = lpcb->next; 8009462: 697b ldr r3, [r7, #20] 8009464: 68da ldr r2, [r3, #12] 8009466: 69fb ldr r3, [r7, #28] 8009468: 60da str r2, [r3, #12] /* our successor is the remainder of the listening list */ lpcb->next = tcp_listen_pcbs.listen_pcbs; 800946a: 4b10 ldr r3, [pc, #64] ; (80094ac ) 800946c: 681a ldr r2, [r3, #0] 800946e: 697b ldr r3, [r7, #20] 8009470: 60da str r2, [r3, #12] /* put this listening pcb at the head of the listening list */ tcp_listen_pcbs.listen_pcbs = lpcb; 8009472: 4a0e ldr r2, [pc, #56] ; (80094ac ) 8009474: 697b ldr r3, [r7, #20] 8009476: 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); 8009478: 6978 ldr r0, [r7, #20] 800947a: f000 fa03 bl 8009884 } pbuf_free(p); 800947e: 6878 ldr r0, [r7, #4] 8009480: f7fd fda8 bl 8006fd4 return; 8009484: e1a8 b.n 80097d8 8009486: bf00 nop 8009488: 24007b98 .word 0x24007b98 800948c: 24004c10 .word 0x24004c10 8009490: 08013198 .word 0x08013198 8009494: 080132c4 .word 0x080132c4 8009498: 080131e4 .word 0x080131e4 800949c: 24007b78 .word 0x24007b78 80094a0: 080132f0 .word 0x080132f0 80094a4: 24007b7c .word 0x24007b7c 80094a8: 0801331c .word 0x0801331c 80094ac: 24007b74 .word 0x24007b74 tcphdr_opt1len, tcphdr_opt2, p) != ERR_OK) { pbuf_free(p); return; } #endif if (pcb != NULL) { 80094b0: 69bb ldr r3, [r7, #24] 80094b2: 2b00 cmp r3, #0 80094b4: f000 8158 beq.w 8009768 #if TCP_INPUT_DEBUG tcp_debug_print_state(pcb->state); #endif /* TCP_INPUT_DEBUG */ /* Set up a tcp_seg structure. */ inseg.next = NULL; 80094b8: 4b95 ldr r3, [pc, #596] ; (8009710 ) 80094ba: 2200 movs r2, #0 80094bc: 601a str r2, [r3, #0] inseg.len = p->tot_len; 80094be: 687b ldr r3, [r7, #4] 80094c0: 891a ldrh r2, [r3, #8] 80094c2: 4b93 ldr r3, [pc, #588] ; (8009710 ) 80094c4: 811a strh r2, [r3, #8] inseg.p = p; 80094c6: 4a92 ldr r2, [pc, #584] ; (8009710 ) 80094c8: 687b ldr r3, [r7, #4] 80094ca: 6053 str r3, [r2, #4] inseg.tcphdr = tcphdr; 80094cc: 4b91 ldr r3, [pc, #580] ; (8009714 ) 80094ce: 681b ldr r3, [r3, #0] 80094d0: 4a8f ldr r2, [pc, #572] ; (8009710 ) 80094d2: 6113 str r3, [r2, #16] recv_data = NULL; 80094d4: 4b90 ldr r3, [pc, #576] ; (8009718 ) 80094d6: 2200 movs r2, #0 80094d8: 601a str r2, [r3, #0] recv_flags = 0; 80094da: 4b90 ldr r3, [pc, #576] ; (800971c ) 80094dc: 2200 movs r2, #0 80094de: 701a strb r2, [r3, #0] recv_acked = 0; 80094e0: 4b8f ldr r3, [pc, #572] ; (8009720 ) 80094e2: 2200 movs r2, #0 80094e4: 801a strh r2, [r3, #0] if (flags & TCP_PSH) { 80094e6: 4b8f ldr r3, [pc, #572] ; (8009724 ) 80094e8: 781b ldrb r3, [r3, #0] 80094ea: f003 0308 and.w r3, r3, #8 80094ee: 2b00 cmp r3, #0 80094f0: d006 beq.n 8009500 p->flags |= PBUF_FLAG_PUSH; 80094f2: 687b ldr r3, [r7, #4] 80094f4: 7b5b ldrb r3, [r3, #13] 80094f6: f043 0301 orr.w r3, r3, #1 80094fa: b2da uxtb r2, r3 80094fc: 687b ldr r3, [r7, #4] 80094fe: 735a strb r2, [r3, #13] } /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 8009500: 69bb ldr r3, [r7, #24] 8009502: 6f9b ldr r3, [r3, #120] ; 0x78 8009504: 2b00 cmp r3, #0 8009506: d017 beq.n 8009538 if ((tcp_process_refused_data(pcb) == ERR_ABRT) || 8009508: 69b8 ldr r0, [r7, #24] 800950a: f7ff f8a3 bl 8008654 800950e: 4603 mov r3, r0 8009510: f113 0f0d cmn.w r3, #13 8009514: d007 beq.n 8009526 ((pcb->refused_data != NULL) && (tcplen > 0))) { 8009516: 69bb ldr r3, [r7, #24] 8009518: 6f9b ldr r3, [r3, #120] ; 0x78 if ((tcp_process_refused_data(pcb) == ERR_ABRT) || 800951a: 2b00 cmp r3, #0 800951c: d00c beq.n 8009538 ((pcb->refused_data != NULL) && (tcplen > 0))) { 800951e: 4b82 ldr r3, [pc, #520] ; (8009728 ) 8009520: 881b ldrh r3, [r3, #0] 8009522: 2b00 cmp r3, #0 8009524: d008 beq.n 8009538 /* pcb has been aborted or refused data is still refused and the new segment contains data */ if (pcb->rcv_ann_wnd == 0) { 8009526: 69bb ldr r3, [r7, #24] 8009528: 8d5b ldrh r3, [r3, #42] ; 0x2a 800952a: 2b00 cmp r3, #0 800952c: f040 80e3 bne.w 80096f6 /* this is a zero-window probe, we respond to it with current RCV.NXT and drop the data segment */ tcp_send_empty_ack(pcb); 8009530: 69b8 ldr r0, [r7, #24] 8009532: f003 fe71 bl 800d218 } TCP_STATS_INC(tcp.drop); MIB2_STATS_INC(mib2.tcpinerrs); goto aborted; 8009536: e0de b.n 80096f6 } } tcp_input_pcb = pcb; 8009538: 4a7c ldr r2, [pc, #496] ; (800972c ) 800953a: 69bb ldr r3, [r7, #24] 800953c: 6013 str r3, [r2, #0] err = tcp_process(pcb); 800953e: 69b8 ldr r0, [r7, #24] 8009540: f000 fb18 bl 8009b74 8009544: 4603 mov r3, r0 8009546: 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) { 8009548: f997 3013 ldrsb.w r3, [r7, #19] 800954c: f113 0f0d cmn.w r3, #13 8009550: f000 80d3 beq.w 80096fa if (recv_flags & TF_RESET) { 8009554: 4b71 ldr r3, [pc, #452] ; (800971c ) 8009556: 781b ldrb r3, [r3, #0] 8009558: f003 0308 and.w r3, r3, #8 800955c: 2b00 cmp r3, #0 800955e: d015 beq.n 800958c /* 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); 8009560: 69bb ldr r3, [r7, #24] 8009562: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90 8009566: 2b00 cmp r3, #0 8009568: d008 beq.n 800957c 800956a: 69bb ldr r3, [r7, #24] 800956c: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90 8009570: 69ba ldr r2, [r7, #24] 8009572: 6912 ldr r2, [r2, #16] 8009574: f06f 010d mvn.w r1, #13 8009578: 4610 mov r0, r2 800957a: 4798 blx r3 tcp_pcb_remove(&tcp_active_pcbs, pcb); 800957c: 69b9 ldr r1, [r7, #24] 800957e: 486c ldr r0, [pc, #432] ; (8009730 ) 8009580: f7ff fbb6 bl 8008cf0 tcp_free(pcb); 8009584: 69b8 ldr r0, [r7, #24] 8009586: f7fd ffc5 bl 8007514 800958a: e0da b.n 8009742 } else { err = ERR_OK; 800958c: 2300 movs r3, #0 800958e: 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) { 8009590: 4b63 ldr r3, [pc, #396] ; (8009720 ) 8009592: 881b ldrh r3, [r3, #0] 8009594: 2b00 cmp r3, #0 8009596: d01d beq.n 80095d4 while (acked > 0) { acked16 = (u16_t)LWIP_MIN(acked, 0xffffu); acked -= acked16; #else { acked16 = recv_acked; 8009598: 4b61 ldr r3, [pc, #388] ; (8009720 ) 800959a: 881b ldrh r3, [r3, #0] 800959c: 81fb strh r3, [r7, #14] #endif TCP_EVENT_SENT(pcb, (u16_t)acked16, err); 800959e: 69bb ldr r3, [r7, #24] 80095a0: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80 80095a4: 2b00 cmp r3, #0 80095a6: d00a beq.n 80095be 80095a8: 69bb ldr r3, [r7, #24] 80095aa: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80 80095ae: 69ba ldr r2, [r7, #24] 80095b0: 6910 ldr r0, [r2, #16] 80095b2: 89fa ldrh r2, [r7, #14] 80095b4: 69b9 ldr r1, [r7, #24] 80095b6: 4798 blx r3 80095b8: 4603 mov r3, r0 80095ba: 74fb strb r3, [r7, #19] 80095bc: e001 b.n 80095c2 80095be: 2300 movs r3, #0 80095c0: 74fb strb r3, [r7, #19] if (err == ERR_ABRT) { 80095c2: f997 3013 ldrsb.w r3, [r7, #19] 80095c6: f113 0f0d cmn.w r3, #13 80095ca: f000 8098 beq.w 80096fe goto aborted; } } recv_acked = 0; 80095ce: 4b54 ldr r3, [pc, #336] ; (8009720 ) 80095d0: 2200 movs r2, #0 80095d2: 801a strh r2, [r3, #0] } if (tcp_input_delayed_close(pcb)) { 80095d4: 69b8 ldr r0, [r7, #24] 80095d6: f000 f915 bl 8009804 80095da: 4603 mov r3, r0 80095dc: 2b00 cmp r3, #0 80095de: f040 8090 bne.w 8009702 #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) { 80095e2: 4b4d ldr r3, [pc, #308] ; (8009718 ) 80095e4: 681b ldr r3, [r3, #0] 80095e6: 2b00 cmp r3, #0 80095e8: d041 beq.n 800966e #endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL); 80095ea: 69bb ldr r3, [r7, #24] 80095ec: 6f9b ldr r3, [r3, #120] ; 0x78 80095ee: 2b00 cmp r3, #0 80095f0: d006 beq.n 8009600 80095f2: 4b50 ldr r3, [pc, #320] ; (8009734 ) 80095f4: f44f 72f3 mov.w r2, #486 ; 0x1e6 80095f8: 494f ldr r1, [pc, #316] ; (8009738 ) 80095fa: 4850 ldr r0, [pc, #320] ; (800973c ) 80095fc: f007 fae4 bl 8010bc8 if (pcb->flags & TF_RXCLOSED) { 8009600: 69bb ldr r3, [r7, #24] 8009602: 8b5b ldrh r3, [r3, #26] 8009604: f003 0310 and.w r3, r3, #16 8009608: 2b00 cmp r3, #0 800960a: d008 beq.n 800961e /* received data although already closed -> abort (send RST) to notify the remote host that not all data has been processed */ pbuf_free(recv_data); 800960c: 4b42 ldr r3, [pc, #264] ; (8009718 ) 800960e: 681b ldr r3, [r3, #0] 8009610: 4618 mov r0, r3 8009612: f7fd fcdf bl 8006fd4 #if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE if (rest != NULL) { pbuf_free(rest); } #endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ tcp_abort(pcb); 8009616: 69b8 ldr r0, [r7, #24] 8009618: f7fe fa64 bl 8007ae4 goto aborted; 800961c: e091 b.n 8009742 } /* Notify application that data has been received. */ TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err); 800961e: 69bb ldr r3, [r7, #24] 8009620: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84 8009624: 2b00 cmp r3, #0 8009626: d00c beq.n 8009642 8009628: 69bb ldr r3, [r7, #24] 800962a: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84 800962e: 69bb ldr r3, [r7, #24] 8009630: 6918 ldr r0, [r3, #16] 8009632: 4b39 ldr r3, [pc, #228] ; (8009718 ) 8009634: 681a ldr r2, [r3, #0] 8009636: 2300 movs r3, #0 8009638: 69b9 ldr r1, [r7, #24] 800963a: 47a0 blx r4 800963c: 4603 mov r3, r0 800963e: 74fb strb r3, [r7, #19] 8009640: e008 b.n 8009654 8009642: 4b35 ldr r3, [pc, #212] ; (8009718 ) 8009644: 681a ldr r2, [r3, #0] 8009646: 2300 movs r3, #0 8009648: 69b9 ldr r1, [r7, #24] 800964a: 2000 movs r0, #0 800964c: f7ff f8d8 bl 8008800 8009650: 4603 mov r3, r0 8009652: 74fb strb r3, [r7, #19] if (err == ERR_ABRT) { 8009654: f997 3013 ldrsb.w r3, [r7, #19] 8009658: f113 0f0d cmn.w r3, #13 800965c: d053 beq.n 8009706 #endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ goto aborted; } /* If the upper layer can't receive this data, store it */ if (err != ERR_OK) { 800965e: f997 3013 ldrsb.w r3, [r7, #19] 8009662: 2b00 cmp r3, #0 8009664: d003 beq.n 800966e #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; 8009666: 4b2c ldr r3, [pc, #176] ; (8009718 ) 8009668: 681a ldr r2, [r3, #0] 800966a: 69bb ldr r3, [r7, #24] 800966c: 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) { 800966e: 4b2b ldr r3, [pc, #172] ; (800971c ) 8009670: 781b ldrb r3, [r3, #0] 8009672: f003 0320 and.w r3, r3, #32 8009676: 2b00 cmp r3, #0 8009678: d030 beq.n 80096dc if (pcb->refused_data != NULL) { 800967a: 69bb ldr r3, [r7, #24] 800967c: 6f9b ldr r3, [r3, #120] ; 0x78 800967e: 2b00 cmp r3, #0 8009680: d009 beq.n 8009696 /* Delay this if we have refused data. */ pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN; 8009682: 69bb ldr r3, [r7, #24] 8009684: 6f9b ldr r3, [r3, #120] ; 0x78 8009686: 7b5a ldrb r2, [r3, #13] 8009688: 69bb ldr r3, [r7, #24] 800968a: 6f9b ldr r3, [r3, #120] ; 0x78 800968c: f042 0220 orr.w r2, r2, #32 8009690: b2d2 uxtb r2, r2 8009692: 735a strb r2, [r3, #13] 8009694: e022 b.n 80096dc } 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)) { 8009696: 69bb ldr r3, [r7, #24] 8009698: 8d1b ldrh r3, [r3, #40] ; 0x28 800969a: f5b3 6f06 cmp.w r3, #2144 ; 0x860 800969e: d005 beq.n 80096ac pcb->rcv_wnd++; 80096a0: 69bb ldr r3, [r7, #24] 80096a2: 8d1b ldrh r3, [r3, #40] ; 0x28 80096a4: 3301 adds r3, #1 80096a6: b29a uxth r2, r3 80096a8: 69bb ldr r3, [r7, #24] 80096aa: 851a strh r2, [r3, #40] ; 0x28 } TCP_EVENT_CLOSED(pcb, err); 80096ac: 69bb ldr r3, [r7, #24] 80096ae: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84 80096b2: 2b00 cmp r3, #0 80096b4: d00b beq.n 80096ce 80096b6: 69bb ldr r3, [r7, #24] 80096b8: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84 80096bc: 69bb ldr r3, [r7, #24] 80096be: 6918 ldr r0, [r3, #16] 80096c0: 2300 movs r3, #0 80096c2: 2200 movs r2, #0 80096c4: 69b9 ldr r1, [r7, #24] 80096c6: 47a0 blx r4 80096c8: 4603 mov r3, r0 80096ca: 74fb strb r3, [r7, #19] 80096cc: e001 b.n 80096d2 80096ce: 2300 movs r3, #0 80096d0: 74fb strb r3, [r7, #19] if (err == ERR_ABRT) { 80096d2: f997 3013 ldrsb.w r3, [r7, #19] 80096d6: f113 0f0d cmn.w r3, #13 80096da: d016 beq.n 800970a goto aborted; } } } tcp_input_pcb = NULL; 80096dc: 4b13 ldr r3, [pc, #76] ; (800972c ) 80096de: 2200 movs r2, #0 80096e0: 601a str r2, [r3, #0] if (tcp_input_delayed_close(pcb)) { 80096e2: 69b8 ldr r0, [r7, #24] 80096e4: f000 f88e bl 8009804 80096e8: 4603 mov r3, r0 80096ea: 2b00 cmp r3, #0 80096ec: d128 bne.n 8009740 goto aborted; } /* Try to send something out. */ tcp_output(pcb); 80096ee: 69b8 ldr r0, [r7, #24] 80096f0: f002 ff80 bl 800c5f4 80096f4: e025 b.n 8009742 goto aborted; 80096f6: bf00 nop 80096f8: e023 b.n 8009742 #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: 80096fa: bf00 nop 80096fc: e021 b.n 8009742 goto aborted; 80096fe: bf00 nop 8009700: e01f b.n 8009742 goto aborted; 8009702: bf00 nop 8009704: e01d b.n 8009742 goto aborted; 8009706: bf00 nop 8009708: e01b b.n 8009742 goto aborted; 800970a: bf00 nop 800970c: e019 b.n 8009742 800970e: bf00 nop 8009710: 24007b84 .word 0x24007b84 8009714: 24007b98 .word 0x24007b98 8009718: 24007bb8 .word 0x24007bb8 800971c: 24007bb5 .word 0x24007bb5 8009720: 24007bb0 .word 0x24007bb0 8009724: 24007bb4 .word 0x24007bb4 8009728: 24007bb2 .word 0x24007bb2 800972c: 24007bbc .word 0x24007bbc 8009730: 24007b78 .word 0x24007b78 8009734: 08013198 .word 0x08013198 8009738: 0801334c .word 0x0801334c 800973c: 080131e4 .word 0x080131e4 goto aborted; 8009740: bf00 nop tcp_input_pcb = NULL; 8009742: 4b27 ldr r3, [pc, #156] ; (80097e0 ) 8009744: 2200 movs r2, #0 8009746: 601a str r2, [r3, #0] recv_data = NULL; 8009748: 4b26 ldr r3, [pc, #152] ; (80097e4 ) 800974a: 2200 movs r2, #0 800974c: 601a str r2, [r3, #0] /* give up our reference to inseg.p */ if (inseg.p != NULL) { 800974e: 4b26 ldr r3, [pc, #152] ; (80097e8 ) 8009750: 685b ldr r3, [r3, #4] 8009752: 2b00 cmp r3, #0 8009754: d03f beq.n 80097d6 pbuf_free(inseg.p); 8009756: 4b24 ldr r3, [pc, #144] ; (80097e8 ) 8009758: 685b ldr r3, [r3, #4] 800975a: 4618 mov r0, r3 800975c: f7fd fc3a bl 8006fd4 inseg.p = NULL; 8009760: 4b21 ldr r3, [pc, #132] ; (80097e8 ) 8009762: 2200 movs r2, #0 8009764: 605a str r2, [r3, #4] pbuf_free(p); } LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane()); PERF_STOP("tcp_input"); return; 8009766: e036 b.n 80097d6 if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { 8009768: 4b20 ldr r3, [pc, #128] ; (80097ec ) 800976a: 681b ldr r3, [r3, #0] 800976c: 899b ldrh r3, [r3, #12] 800976e: b29b uxth r3, r3 8009770: 4618 mov r0, r3 8009772: f7fb feeb bl 800554c 8009776: 4603 mov r3, r0 8009778: b2db uxtb r3, r3 800977a: f003 0304 and.w r3, r3, #4 800977e: 2b00 cmp r3, #0 8009780: d118 bne.n 80097b4 tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(), 8009782: 4b1b ldr r3, [pc, #108] ; (80097f0 ) 8009784: 6819 ldr r1, [r3, #0] 8009786: 4b1b ldr r3, [pc, #108] ; (80097f4 ) 8009788: 881b ldrh r3, [r3, #0] 800978a: 461a mov r2, r3 800978c: 4b1a ldr r3, [pc, #104] ; (80097f8 ) 800978e: 681b ldr r3, [r3, #0] 8009790: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 8009792: 4b16 ldr r3, [pc, #88] ; (80097ec ) 8009794: 681b ldr r3, [r3, #0] tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(), 8009796: 885b ldrh r3, [r3, #2] 8009798: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 800979a: 4a14 ldr r2, [pc, #80] ; (80097ec ) 800979c: 6812 ldr r2, [r2, #0] tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(), 800979e: 8812 ldrh r2, [r2, #0] 80097a0: b292 uxth r2, r2 80097a2: 9202 str r2, [sp, #8] 80097a4: 9301 str r3, [sp, #4] 80097a6: 4b15 ldr r3, [pc, #84] ; (80097fc ) 80097a8: 9300 str r3, [sp, #0] 80097aa: 4b15 ldr r3, [pc, #84] ; (8009800 ) 80097ac: 4602 mov r2, r0 80097ae: 2000 movs r0, #0 80097b0: f003 fce0 bl 800d174 pbuf_free(p); 80097b4: 6878 ldr r0, [r7, #4] 80097b6: f7fd fc0d bl 8006fd4 return; 80097ba: e00c b.n 80097d6 goto dropped; 80097bc: bf00 nop 80097be: e006 b.n 80097ce goto dropped; 80097c0: bf00 nop 80097c2: e004 b.n 80097ce goto dropped; 80097c4: bf00 nop 80097c6: e002 b.n 80097ce goto dropped; 80097c8: bf00 nop 80097ca: e000 b.n 80097ce goto dropped; 80097cc: bf00 nop dropped: TCP_STATS_INC(tcp.drop); MIB2_STATS_INC(mib2.tcpinerrs); pbuf_free(p); 80097ce: 6878 ldr r0, [r7, #4] 80097d0: f7fd fc00 bl 8006fd4 80097d4: e000 b.n 80097d8 return; 80097d6: bf00 nop } 80097d8: 3724 adds r7, #36 ; 0x24 80097da: 46bd mov sp, r7 80097dc: bd90 pop {r4, r7, pc} 80097de: bf00 nop 80097e0: 24007bbc .word 0x24007bbc 80097e4: 24007bb8 .word 0x24007bb8 80097e8: 24007b84 .word 0x24007b84 80097ec: 24007b98 .word 0x24007b98 80097f0: 24007bac .word 0x24007bac 80097f4: 24007bb2 .word 0x24007bb2 80097f8: 24007ba8 .word 0x24007ba8 80097fc: 24004c20 .word 0x24004c20 8009800: 24004c24 .word 0x24004c24 08009804 : * any more. * @returns 1 if the pcb has been closed and deallocated, 0 otherwise */ static int tcp_input_delayed_close(struct tcp_pcb *pcb) { 8009804: b580 push {r7, lr} 8009806: b082 sub sp, #8 8009808: af00 add r7, sp, #0 800980a: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_input_delayed_close: invalid pcb", pcb != NULL); 800980c: 687b ldr r3, [r7, #4] 800980e: 2b00 cmp r3, #0 8009810: d106 bne.n 8009820 8009812: 4b17 ldr r3, [pc, #92] ; (8009870 ) 8009814: f240 225a movw r2, #602 ; 0x25a 8009818: 4916 ldr r1, [pc, #88] ; (8009874 ) 800981a: 4817 ldr r0, [pc, #92] ; (8009878 ) 800981c: f007 f9d4 bl 8010bc8 if (recv_flags & TF_CLOSED) { 8009820: 4b16 ldr r3, [pc, #88] ; (800987c ) 8009822: 781b ldrb r3, [r3, #0] 8009824: f003 0310 and.w r3, r3, #16 8009828: 2b00 cmp r3, #0 800982a: d01c beq.n 8009866 /* The connection has been closed and we will deallocate the PCB. */ if (!(pcb->flags & TF_RXCLOSED)) { 800982c: 687b ldr r3, [r7, #4] 800982e: 8b5b ldrh r3, [r3, #26] 8009830: f003 0310 and.w r3, r3, #16 8009834: 2b00 cmp r3, #0 8009836: d10d bne.n 8009854 /* 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); 8009838: 687b ldr r3, [r7, #4] 800983a: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90 800983e: 2b00 cmp r3, #0 8009840: d008 beq.n 8009854 8009842: 687b ldr r3, [r7, #4] 8009844: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90 8009848: 687a ldr r2, [r7, #4] 800984a: 6912 ldr r2, [r2, #16] 800984c: f06f 010e mvn.w r1, #14 8009850: 4610 mov r0, r2 8009852: 4798 blx r3 } tcp_pcb_remove(&tcp_active_pcbs, pcb); 8009854: 6879 ldr r1, [r7, #4] 8009856: 480a ldr r0, [pc, #40] ; (8009880 ) 8009858: f7ff fa4a bl 8008cf0 tcp_free(pcb); 800985c: 6878 ldr r0, [r7, #4] 800985e: f7fd fe59 bl 8007514 return 1; 8009862: 2301 movs r3, #1 8009864: e000 b.n 8009868 } return 0; 8009866: 2300 movs r3, #0 } 8009868: 4618 mov r0, r3 800986a: 3708 adds r7, #8 800986c: 46bd mov sp, r7 800986e: bd80 pop {r7, pc} 8009870: 08013198 .word 0x08013198 8009874: 08013368 .word 0x08013368 8009878: 080131e4 .word 0x080131e4 800987c: 24007bb5 .word 0x24007bb5 8009880: 24007b78 .word 0x24007b78 08009884 : * @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) { 8009884: b590 push {r4, r7, lr} 8009886: b08b sub sp, #44 ; 0x2c 8009888: af04 add r7, sp, #16 800988a: 6078 str r0, [r7, #4] struct tcp_pcb *npcb; u32_t iss; err_t rc; if (flags & TCP_RST) { 800988c: 4b6f ldr r3, [pc, #444] ; (8009a4c ) 800988e: 781b ldrb r3, [r3, #0] 8009890: f003 0304 and.w r3, r3, #4 8009894: 2b00 cmp r3, #0 8009896: f040 80d2 bne.w 8009a3e /* An incoming RST should be ignored. Return. */ return; } LWIP_ASSERT("tcp_listen_input: invalid pcb", pcb != NULL); 800989a: 687b ldr r3, [r7, #4] 800989c: 2b00 cmp r3, #0 800989e: d106 bne.n 80098ae 80098a0: 4b6b ldr r3, [pc, #428] ; (8009a50 ) 80098a2: f240 2281 movw r2, #641 ; 0x281 80098a6: 496b ldr r1, [pc, #428] ; (8009a54 ) 80098a8: 486b ldr r0, [pc, #428] ; (8009a58 ) 80098aa: f007 f98d bl 8010bc8 /* In the LISTEN state, we check for incoming SYN segments, creates a new PCB, and responds with a SYN|ACK. */ if (flags & TCP_ACK) { 80098ae: 4b67 ldr r3, [pc, #412] ; (8009a4c ) 80098b0: 781b ldrb r3, [r3, #0] 80098b2: f003 0310 and.w r3, r3, #16 80098b6: 2b00 cmp r3, #0 80098b8: d019 beq.n 80098ee /* 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(), 80098ba: 4b68 ldr r3, [pc, #416] ; (8009a5c ) 80098bc: 6819 ldr r1, [r3, #0] 80098be: 4b68 ldr r3, [pc, #416] ; (8009a60 ) 80098c0: 881b ldrh r3, [r3, #0] 80098c2: 461a mov r2, r3 80098c4: 4b67 ldr r3, [pc, #412] ; (8009a64 ) 80098c6: 681b ldr r3, [r3, #0] 80098c8: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 80098ca: 4b67 ldr r3, [pc, #412] ; (8009a68 ) 80098cc: 681b ldr r3, [r3, #0] tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 80098ce: 885b ldrh r3, [r3, #2] 80098d0: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 80098d2: 4a65 ldr r2, [pc, #404] ; (8009a68 ) 80098d4: 6812 ldr r2, [r2, #0] tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 80098d6: 8812 ldrh r2, [r2, #0] 80098d8: b292 uxth r2, r2 80098da: 9202 str r2, [sp, #8] 80098dc: 9301 str r3, [sp, #4] 80098de: 4b63 ldr r3, [pc, #396] ; (8009a6c ) 80098e0: 9300 str r3, [sp, #0] 80098e2: 4b63 ldr r3, [pc, #396] ; (8009a70 ) 80098e4: 4602 mov r2, r0 80098e6: 6878 ldr r0, [r7, #4] 80098e8: f003 fc44 bl 800d174 tcp_abandon(npcb, 0); return; } tcp_output(npcb); } return; 80098ec: e0a9 b.n 8009a42 } else if (flags & TCP_SYN) { 80098ee: 4b57 ldr r3, [pc, #348] ; (8009a4c ) 80098f0: 781b ldrb r3, [r3, #0] 80098f2: f003 0302 and.w r3, r3, #2 80098f6: 2b00 cmp r3, #0 80098f8: f000 80a3 beq.w 8009a42 npcb = tcp_alloc(pcb->prio); 80098fc: 687b ldr r3, [r7, #4] 80098fe: 7d5b ldrb r3, [r3, #21] 8009900: 4618 mov r0, r3 8009902: f7ff f8a1 bl 8008a48 8009906: 6178 str r0, [r7, #20] if (npcb == NULL) { 8009908: 697b ldr r3, [r7, #20] 800990a: 2b00 cmp r3, #0 800990c: d111 bne.n 8009932 TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err); 800990e: 687b ldr r3, [r7, #4] 8009910: 699b ldr r3, [r3, #24] 8009912: 2b00 cmp r3, #0 8009914: d00a beq.n 800992c 8009916: 687b ldr r3, [r7, #4] 8009918: 699b ldr r3, [r3, #24] 800991a: 687a ldr r2, [r7, #4] 800991c: 6910 ldr r0, [r2, #16] 800991e: f04f 32ff mov.w r2, #4294967295 8009922: 2100 movs r1, #0 8009924: 4798 blx r3 8009926: 4603 mov r3, r0 8009928: 73bb strb r3, [r7, #14] return; 800992a: e08b b.n 8009a44 TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err); 800992c: 23f0 movs r3, #240 ; 0xf0 800992e: 73bb strb r3, [r7, #14] return; 8009930: e088 b.n 8009a44 ip_addr_copy(npcb->local_ip, *ip_current_dest_addr()); 8009932: 4b50 ldr r3, [pc, #320] ; (8009a74 ) 8009934: 695a ldr r2, [r3, #20] 8009936: 697b ldr r3, [r7, #20] 8009938: 601a str r2, [r3, #0] ip_addr_copy(npcb->remote_ip, *ip_current_src_addr()); 800993a: 4b4e ldr r3, [pc, #312] ; (8009a74 ) 800993c: 691a ldr r2, [r3, #16] 800993e: 697b ldr r3, [r7, #20] 8009940: 605a str r2, [r3, #4] npcb->local_port = pcb->local_port; 8009942: 687b ldr r3, [r7, #4] 8009944: 8ada ldrh r2, [r3, #22] 8009946: 697b ldr r3, [r7, #20] 8009948: 82da strh r2, [r3, #22] npcb->remote_port = tcphdr->src; 800994a: 4b47 ldr r3, [pc, #284] ; (8009a68 ) 800994c: 681b ldr r3, [r3, #0] 800994e: 881b ldrh r3, [r3, #0] 8009950: b29a uxth r2, r3 8009952: 697b ldr r3, [r7, #20] 8009954: 831a strh r2, [r3, #24] npcb->state = SYN_RCVD; 8009956: 697b ldr r3, [r7, #20] 8009958: 2203 movs r2, #3 800995a: 751a strb r2, [r3, #20] npcb->rcv_nxt = seqno + 1; 800995c: 4b41 ldr r3, [pc, #260] ; (8009a64 ) 800995e: 681b ldr r3, [r3, #0] 8009960: 1c5a adds r2, r3, #1 8009962: 697b ldr r3, [r7, #20] 8009964: 625a str r2, [r3, #36] ; 0x24 npcb->rcv_ann_right_edge = npcb->rcv_nxt; 8009966: 697b ldr r3, [r7, #20] 8009968: 6a5a ldr r2, [r3, #36] ; 0x24 800996a: 697b ldr r3, [r7, #20] 800996c: 62da str r2, [r3, #44] ; 0x2c iss = tcp_next_iss(npcb); 800996e: 6978 ldr r0, [r7, #20] 8009970: f7ff fa52 bl 8008e18 8009974: 6138 str r0, [r7, #16] npcb->snd_wl2 = iss; 8009976: 697b ldr r3, [r7, #20] 8009978: 693a ldr r2, [r7, #16] 800997a: 659a str r2, [r3, #88] ; 0x58 npcb->snd_nxt = iss; 800997c: 697b ldr r3, [r7, #20] 800997e: 693a ldr r2, [r7, #16] 8009980: 651a str r2, [r3, #80] ; 0x50 npcb->lastack = iss; 8009982: 697b ldr r3, [r7, #20] 8009984: 693a ldr r2, [r7, #16] 8009986: 645a str r2, [r3, #68] ; 0x44 npcb->snd_lbb = iss; 8009988: 697b ldr r3, [r7, #20] 800998a: 693a ldr r2, [r7, #16] 800998c: 65da str r2, [r3, #92] ; 0x5c npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */ 800998e: 4b35 ldr r3, [pc, #212] ; (8009a64 ) 8009990: 681b ldr r3, [r3, #0] 8009992: 1e5a subs r2, r3, #1 8009994: 697b ldr r3, [r7, #20] 8009996: 655a str r2, [r3, #84] ; 0x54 npcb->callback_arg = pcb->callback_arg; 8009998: 687b ldr r3, [r7, #4] 800999a: 691a ldr r2, [r3, #16] 800999c: 697b ldr r3, [r7, #20] 800999e: 611a str r2, [r3, #16] npcb->listener = pcb; 80099a0: 697b ldr r3, [r7, #20] 80099a2: 687a ldr r2, [r7, #4] 80099a4: 67da str r2, [r3, #124] ; 0x7c npcb->so_options = pcb->so_options & SOF_INHERITED; 80099a6: 687b ldr r3, [r7, #4] 80099a8: 7a5b ldrb r3, [r3, #9] 80099aa: f003 030c and.w r3, r3, #12 80099ae: b2da uxtb r2, r3 80099b0: 697b ldr r3, [r7, #20] 80099b2: 725a strb r2, [r3, #9] npcb->netif_idx = pcb->netif_idx; 80099b4: 687b ldr r3, [r7, #4] 80099b6: 7a1a ldrb r2, [r3, #8] 80099b8: 697b ldr r3, [r7, #20] 80099ba: 721a strb r2, [r3, #8] TCP_REG_ACTIVE(npcb); 80099bc: 4b2e ldr r3, [pc, #184] ; (8009a78 ) 80099be: 681a ldr r2, [r3, #0] 80099c0: 697b ldr r3, [r7, #20] 80099c2: 60da str r2, [r3, #12] 80099c4: 4a2c ldr r2, [pc, #176] ; (8009a78 ) 80099c6: 697b ldr r3, [r7, #20] 80099c8: 6013 str r3, [r2, #0] 80099ca: f003 fd95 bl 800d4f8 80099ce: 4b2b ldr r3, [pc, #172] ; (8009a7c ) 80099d0: 2201 movs r2, #1 80099d2: 701a strb r2, [r3, #0] tcp_parseopt(npcb); 80099d4: 6978 ldr r0, [r7, #20] 80099d6: f001 fd8f bl 800b4f8 npcb->snd_wnd = tcphdr->wnd; 80099da: 4b23 ldr r3, [pc, #140] ; (8009a68 ) 80099dc: 681b ldr r3, [r3, #0] 80099de: 89db ldrh r3, [r3, #14] 80099e0: b29a uxth r2, r3 80099e2: 697b ldr r3, [r7, #20] 80099e4: f8a3 2060 strh.w r2, [r3, #96] ; 0x60 npcb->snd_wnd_max = npcb->snd_wnd; 80099e8: 697b ldr r3, [r7, #20] 80099ea: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60 80099ee: 697b ldr r3, [r7, #20] 80099f0: f8a3 2062 strh.w r2, [r3, #98] ; 0x62 npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, &npcb->remote_ip); 80099f4: 697b ldr r3, [r7, #20] 80099f6: 8e5c ldrh r4, [r3, #50] ; 0x32 80099f8: 697b ldr r3, [r7, #20] 80099fa: 3304 adds r3, #4 80099fc: 4618 mov r0, r3 80099fe: f005 fa43 bl 800ee88 8009a02: 4601 mov r1, r0 8009a04: 697b ldr r3, [r7, #20] 8009a06: 3304 adds r3, #4 8009a08: 461a mov r2, r3 8009a0a: 4620 mov r0, r4 8009a0c: f7ff fa2a bl 8008e64 8009a10: 4603 mov r3, r0 8009a12: 461a mov r2, r3 8009a14: 697b ldr r3, [r7, #20] 8009a16: 865a strh r2, [r3, #50] ; 0x32 rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK); 8009a18: 2112 movs r1, #18 8009a1a: 6978 ldr r0, [r7, #20] 8009a1c: f002 fcfc bl 800c418 8009a20: 4603 mov r3, r0 8009a22: 73fb strb r3, [r7, #15] if (rc != ERR_OK) { 8009a24: f997 300f ldrsb.w r3, [r7, #15] 8009a28: 2b00 cmp r3, #0 8009a2a: d004 beq.n 8009a36 tcp_abandon(npcb, 0); 8009a2c: 2100 movs r1, #0 8009a2e: 6978 ldr r0, [r7, #20] 8009a30: f7fd ff9a bl 8007968 return; 8009a34: e006 b.n 8009a44 tcp_output(npcb); 8009a36: 6978 ldr r0, [r7, #20] 8009a38: f002 fddc bl 800c5f4 return; 8009a3c: e001 b.n 8009a42 return; 8009a3e: bf00 nop 8009a40: e000 b.n 8009a44 return; 8009a42: bf00 nop } 8009a44: 371c adds r7, #28 8009a46: 46bd mov sp, r7 8009a48: bd90 pop {r4, r7, pc} 8009a4a: bf00 nop 8009a4c: 24007bb4 .word 0x24007bb4 8009a50: 08013198 .word 0x08013198 8009a54: 08013390 .word 0x08013390 8009a58: 080131e4 .word 0x080131e4 8009a5c: 24007bac .word 0x24007bac 8009a60: 24007bb2 .word 0x24007bb2 8009a64: 24007ba8 .word 0x24007ba8 8009a68: 24007b98 .word 0x24007b98 8009a6c: 24004c20 .word 0x24004c20 8009a70: 24004c24 .word 0x24004c24 8009a74: 24004c10 .word 0x24004c10 8009a78: 24007b78 .word 0x24007b78 8009a7c: 24007b80 .word 0x24007b80 08009a80 : * @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) { 8009a80: b580 push {r7, lr} 8009a82: b086 sub sp, #24 8009a84: af04 add r7, sp, #16 8009a86: 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) { 8009a88: 4b2f ldr r3, [pc, #188] ; (8009b48 ) 8009a8a: 781b ldrb r3, [r3, #0] 8009a8c: f003 0304 and.w r3, r3, #4 8009a90: 2b00 cmp r3, #0 8009a92: d153 bne.n 8009b3c return; } LWIP_ASSERT("tcp_timewait_input: invalid pcb", pcb != NULL); 8009a94: 687b ldr r3, [r7, #4] 8009a96: 2b00 cmp r3, #0 8009a98: d106 bne.n 8009aa8 8009a9a: 4b2c ldr r3, [pc, #176] ; (8009b4c ) 8009a9c: f240 22ee movw r2, #750 ; 0x2ee 8009aa0: 492b ldr r1, [pc, #172] ; (8009b50 ) 8009aa2: 482c ldr r0, [pc, #176] ; (8009b54 ) 8009aa4: f007 f890 bl 8010bc8 /* - fourth, check the SYN bit, */ if (flags & TCP_SYN) { 8009aa8: 4b27 ldr r3, [pc, #156] ; (8009b48 ) 8009aaa: 781b ldrb r3, [r3, #0] 8009aac: f003 0302 and.w r3, r3, #2 8009ab0: 2b00 cmp r3, #0 8009ab2: d02a beq.n 8009b0a /* 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)) { 8009ab4: 4b28 ldr r3, [pc, #160] ; (8009b58 ) 8009ab6: 681a ldr r2, [r3, #0] 8009ab8: 687b ldr r3, [r7, #4] 8009aba: 6a5b ldr r3, [r3, #36] ; 0x24 8009abc: 1ad3 subs r3, r2, r3 8009abe: 2b00 cmp r3, #0 8009ac0: db2d blt.n 8009b1e 8009ac2: 4b25 ldr r3, [pc, #148] ; (8009b58 ) 8009ac4: 681a ldr r2, [r3, #0] 8009ac6: 687b ldr r3, [r7, #4] 8009ac8: 6a5b ldr r3, [r3, #36] ; 0x24 8009aca: 6879 ldr r1, [r7, #4] 8009acc: 8d09 ldrh r1, [r1, #40] ; 0x28 8009ace: 440b add r3, r1 8009ad0: 1ad3 subs r3, r2, r3 8009ad2: 2b00 cmp r3, #0 8009ad4: dc23 bgt.n 8009b1e /* If the SYN is in the window it is an error, send a reset */ tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 8009ad6: 4b21 ldr r3, [pc, #132] ; (8009b5c ) 8009ad8: 6819 ldr r1, [r3, #0] 8009ada: 4b21 ldr r3, [pc, #132] ; (8009b60 ) 8009adc: 881b ldrh r3, [r3, #0] 8009ade: 461a mov r2, r3 8009ae0: 4b1d ldr r3, [pc, #116] ; (8009b58 ) 8009ae2: 681b ldr r3, [r3, #0] 8009ae4: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 8009ae6: 4b1f ldr r3, [pc, #124] ; (8009b64 ) 8009ae8: 681b ldr r3, [r3, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 8009aea: 885b ldrh r3, [r3, #2] 8009aec: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 8009aee: 4a1d ldr r2, [pc, #116] ; (8009b64 ) 8009af0: 6812 ldr r2, [r2, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 8009af2: 8812 ldrh r2, [r2, #0] 8009af4: b292 uxth r2, r2 8009af6: 9202 str r2, [sp, #8] 8009af8: 9301 str r3, [sp, #4] 8009afa: 4b1b ldr r3, [pc, #108] ; (8009b68 ) 8009afc: 9300 str r3, [sp, #0] 8009afe: 4b1b ldr r3, [pc, #108] ; (8009b6c ) 8009b00: 4602 mov r2, r0 8009b02: 6878 ldr r0, [r7, #4] 8009b04: f003 fb36 bl 800d174 return; 8009b08: e01b b.n 8009b42 } } else if (flags & TCP_FIN) { 8009b0a: 4b0f ldr r3, [pc, #60] ; (8009b48 ) 8009b0c: 781b ldrb r3, [r3, #0] 8009b0e: f003 0301 and.w r3, r3, #1 8009b12: 2b00 cmp r3, #0 8009b14: d003 beq.n 8009b1e /* - eighth, check the FIN bit: Remain in the TIME-WAIT state. Restart the 2 MSL time-wait timeout.*/ pcb->tmr = tcp_ticks; 8009b16: 4b16 ldr r3, [pc, #88] ; (8009b70 ) 8009b18: 681a ldr r2, [r3, #0] 8009b1a: 687b ldr r3, [r7, #4] 8009b1c: 621a str r2, [r3, #32] } if ((tcplen > 0)) { 8009b1e: 4b10 ldr r3, [pc, #64] ; (8009b60 ) 8009b20: 881b ldrh r3, [r3, #0] 8009b22: 2b00 cmp r3, #0 8009b24: d00c beq.n 8009b40 /* Acknowledge data, FIN or out-of-window SYN */ tcp_ack_now(pcb); 8009b26: 687b ldr r3, [r7, #4] 8009b28: 8b5b ldrh r3, [r3, #26] 8009b2a: f043 0302 orr.w r3, r3, #2 8009b2e: b29a uxth r2, r3 8009b30: 687b ldr r3, [r7, #4] 8009b32: 835a strh r2, [r3, #26] tcp_output(pcb); 8009b34: 6878 ldr r0, [r7, #4] 8009b36: f002 fd5d bl 800c5f4 } return; 8009b3a: e001 b.n 8009b40 return; 8009b3c: bf00 nop 8009b3e: e000 b.n 8009b42 return; 8009b40: bf00 nop } 8009b42: 3708 adds r7, #8 8009b44: 46bd mov sp, r7 8009b46: bd80 pop {r7, pc} 8009b48: 24007bb4 .word 0x24007bb4 8009b4c: 08013198 .word 0x08013198 8009b50: 080133b0 .word 0x080133b0 8009b54: 080131e4 .word 0x080131e4 8009b58: 24007ba8 .word 0x24007ba8 8009b5c: 24007bac .word 0x24007bac 8009b60: 24007bb2 .word 0x24007bb2 8009b64: 24007b98 .word 0x24007b98 8009b68: 24004c20 .word 0x24004c20 8009b6c: 24004c24 .word 0x24004c24 8009b70: 24007b6c .word 0x24007b6c 08009b74 : * @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) { 8009b74: b590 push {r4, r7, lr} 8009b76: b08d sub sp, #52 ; 0x34 8009b78: af04 add r7, sp, #16 8009b7a: 6078 str r0, [r7, #4] struct tcp_seg *rseg; u8_t acceptable = 0; 8009b7c: 2300 movs r3, #0 8009b7e: 77fb strb r3, [r7, #31] err_t err; err = ERR_OK; 8009b80: 2300 movs r3, #0 8009b82: 77bb strb r3, [r7, #30] LWIP_ASSERT("tcp_process: invalid pcb", pcb != NULL); 8009b84: 687b ldr r3, [r7, #4] 8009b86: 2b00 cmp r3, #0 8009b88: d106 bne.n 8009b98 8009b8a: 4b9d ldr r3, [pc, #628] ; (8009e00 ) 8009b8c: f44f 7247 mov.w r2, #796 ; 0x31c 8009b90: 499c ldr r1, [pc, #624] ; (8009e04 ) 8009b92: 489d ldr r0, [pc, #628] ; (8009e08 ) 8009b94: f007 f818 bl 8010bc8 /* Process incoming RST segments. */ if (flags & TCP_RST) { 8009b98: 4b9c ldr r3, [pc, #624] ; (8009e0c ) 8009b9a: 781b ldrb r3, [r3, #0] 8009b9c: f003 0304 and.w r3, r3, #4 8009ba0: 2b00 cmp r3, #0 8009ba2: d04e beq.n 8009c42 /* First, determine if the reset is acceptable. */ if (pcb->state == SYN_SENT) { 8009ba4: 687b ldr r3, [r7, #4] 8009ba6: 7d1b ldrb r3, [r3, #20] 8009ba8: 2b02 cmp r3, #2 8009baa: d108 bne.n 8009bbe /* "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) { 8009bac: 687b ldr r3, [r7, #4] 8009bae: 6d1a ldr r2, [r3, #80] ; 0x50 8009bb0: 4b97 ldr r3, [pc, #604] ; (8009e10 ) 8009bb2: 681b ldr r3, [r3, #0] 8009bb4: 429a cmp r2, r3 8009bb6: d123 bne.n 8009c00 acceptable = 1; 8009bb8: 2301 movs r3, #1 8009bba: 77fb strb r3, [r7, #31] 8009bbc: e020 b.n 8009c00 } } else { /* "In all states except SYN-SENT, all reset (RST) segments are validated by checking their SEQ-fields." */ if (seqno == pcb->rcv_nxt) { 8009bbe: 687b ldr r3, [r7, #4] 8009bc0: 6a5a ldr r2, [r3, #36] ; 0x24 8009bc2: 4b94 ldr r3, [pc, #592] ; (8009e14 ) 8009bc4: 681b ldr r3, [r3, #0] 8009bc6: 429a cmp r2, r3 8009bc8: d102 bne.n 8009bd0 acceptable = 1; 8009bca: 2301 movs r3, #1 8009bcc: 77fb strb r3, [r7, #31] 8009bce: e017 b.n 8009c00 } else if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 8009bd0: 4b90 ldr r3, [pc, #576] ; (8009e14 ) 8009bd2: 681a ldr r2, [r3, #0] 8009bd4: 687b ldr r3, [r7, #4] 8009bd6: 6a5b ldr r3, [r3, #36] ; 0x24 8009bd8: 1ad3 subs r3, r2, r3 8009bda: 2b00 cmp r3, #0 8009bdc: db10 blt.n 8009c00 8009bde: 4b8d ldr r3, [pc, #564] ; (8009e14 ) 8009be0: 681a ldr r2, [r3, #0] 8009be2: 687b ldr r3, [r7, #4] 8009be4: 6a5b ldr r3, [r3, #36] ; 0x24 8009be6: 6879 ldr r1, [r7, #4] 8009be8: 8d09 ldrh r1, [r1, #40] ; 0x28 8009bea: 440b add r3, r1 8009bec: 1ad3 subs r3, r2, r3 8009bee: 2b00 cmp r3, #0 8009bf0: dc06 bgt.n 8009c00 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); 8009bf2: 687b ldr r3, [r7, #4] 8009bf4: 8b5b ldrh r3, [r3, #26] 8009bf6: f043 0302 orr.w r3, r3, #2 8009bfa: b29a uxth r2, r3 8009bfc: 687b ldr r3, [r7, #4] 8009bfe: 835a strh r2, [r3, #26] } } if (acceptable) { 8009c00: 7ffb ldrb r3, [r7, #31] 8009c02: 2b00 cmp r3, #0 8009c04: d01b beq.n 8009c3e LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: Connection RESET\n")); LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED); 8009c06: 687b ldr r3, [r7, #4] 8009c08: 7d1b ldrb r3, [r3, #20] 8009c0a: 2b00 cmp r3, #0 8009c0c: d106 bne.n 8009c1c 8009c0e: 4b7c ldr r3, [pc, #496] ; (8009e00 ) 8009c10: f44f 724e mov.w r2, #824 ; 0x338 8009c14: 4980 ldr r1, [pc, #512] ; (8009e18 ) 8009c16: 487c ldr r0, [pc, #496] ; (8009e08 ) 8009c18: f006 ffd6 bl 8010bc8 recv_flags |= TF_RESET; 8009c1c: 4b7f ldr r3, [pc, #508] ; (8009e1c ) 8009c1e: 781b ldrb r3, [r3, #0] 8009c20: f043 0308 orr.w r3, r3, #8 8009c24: b2da uxtb r2, r3 8009c26: 4b7d ldr r3, [pc, #500] ; (8009e1c ) 8009c28: 701a strb r2, [r3, #0] tcp_clear_flags(pcb, TF_ACK_DELAY); 8009c2a: 687b ldr r3, [r7, #4] 8009c2c: 8b5b ldrh r3, [r3, #26] 8009c2e: f023 0301 bic.w r3, r3, #1 8009c32: b29a uxth r2, r3 8009c34: 687b ldr r3, [r7, #4] 8009c36: 835a strh r2, [r3, #26] return ERR_RST; 8009c38: f06f 030d mvn.w r3, #13 8009c3c: e37a b.n 800a334 } 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; 8009c3e: 2300 movs r3, #0 8009c40: e378 b.n 800a334 } } if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) { 8009c42: 4b72 ldr r3, [pc, #456] ; (8009e0c ) 8009c44: 781b ldrb r3, [r3, #0] 8009c46: f003 0302 and.w r3, r3, #2 8009c4a: 2b00 cmp r3, #0 8009c4c: d010 beq.n 8009c70 8009c4e: 687b ldr r3, [r7, #4] 8009c50: 7d1b ldrb r3, [r3, #20] 8009c52: 2b02 cmp r3, #2 8009c54: d00c beq.n 8009c70 8009c56: 687b ldr r3, [r7, #4] 8009c58: 7d1b ldrb r3, [r3, #20] 8009c5a: 2b03 cmp r3, #3 8009c5c: d008 beq.n 8009c70 /* Cope with new connection attempt after remote end crashed */ tcp_ack_now(pcb); 8009c5e: 687b ldr r3, [r7, #4] 8009c60: 8b5b ldrh r3, [r3, #26] 8009c62: f043 0302 orr.w r3, r3, #2 8009c66: b29a uxth r2, r3 8009c68: 687b ldr r3, [r7, #4] 8009c6a: 835a strh r2, [r3, #26] return ERR_OK; 8009c6c: 2300 movs r3, #0 8009c6e: e361 b.n 800a334 } if ((pcb->flags & TF_RXCLOSED) == 0) { 8009c70: 687b ldr r3, [r7, #4] 8009c72: 8b5b ldrh r3, [r3, #26] 8009c74: f003 0310 and.w r3, r3, #16 8009c78: 2b00 cmp r3, #0 8009c7a: d103 bne.n 8009c84 /* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */ pcb->tmr = tcp_ticks; 8009c7c: 4b68 ldr r3, [pc, #416] ; (8009e20 ) 8009c7e: 681a ldr r2, [r3, #0] 8009c80: 687b ldr r3, [r7, #4] 8009c82: 621a str r2, [r3, #32] } pcb->keep_cnt_sent = 0; 8009c84: 687b ldr r3, [r7, #4] 8009c86: 2200 movs r2, #0 8009c88: f883 209b strb.w r2, [r3, #155] ; 0x9b pcb->persist_probe = 0; 8009c8c: 687b ldr r3, [r7, #4] 8009c8e: 2200 movs r2, #0 8009c90: f883 209a strb.w r2, [r3, #154] ; 0x9a tcp_parseopt(pcb); 8009c94: 6878 ldr r0, [r7, #4] 8009c96: f001 fc2f bl 800b4f8 /* Do different things depending on the TCP state. */ switch (pcb->state) { 8009c9a: 687b ldr r3, [r7, #4] 8009c9c: 7d1b ldrb r3, [r3, #20] 8009c9e: 3b02 subs r3, #2 8009ca0: 2b07 cmp r3, #7 8009ca2: f200 8337 bhi.w 800a314 8009ca6: a201 add r2, pc, #4 ; (adr r2, 8009cac ) 8009ca8: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8009cac: 08009ccd .word 0x08009ccd 8009cb0: 08009efd .word 0x08009efd 8009cb4: 0800a075 .word 0x0800a075 8009cb8: 0800a09f .word 0x0800a09f 8009cbc: 0800a1c3 .word 0x0800a1c3 8009cc0: 0800a075 .word 0x0800a075 8009cc4: 0800a24f .word 0x0800a24f 8009cc8: 0800a2df .word 0x0800a2df 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) 8009ccc: 4b4f ldr r3, [pc, #316] ; (8009e0c ) 8009cce: 781b ldrb r3, [r3, #0] 8009cd0: f003 0310 and.w r3, r3, #16 8009cd4: 2b00 cmp r3, #0 8009cd6: f000 80e4 beq.w 8009ea2 8009cda: 4b4c ldr r3, [pc, #304] ; (8009e0c ) 8009cdc: 781b ldrb r3, [r3, #0] 8009cde: f003 0302 and.w r3, r3, #2 8009ce2: 2b00 cmp r3, #0 8009ce4: f000 80dd beq.w 8009ea2 && (ackno == pcb->lastack + 1)) { 8009ce8: 687b ldr r3, [r7, #4] 8009cea: 6c5b ldr r3, [r3, #68] ; 0x44 8009cec: 1c5a adds r2, r3, #1 8009cee: 4b48 ldr r3, [pc, #288] ; (8009e10 ) 8009cf0: 681b ldr r3, [r3, #0] 8009cf2: 429a cmp r2, r3 8009cf4: f040 80d5 bne.w 8009ea2 pcb->rcv_nxt = seqno + 1; 8009cf8: 4b46 ldr r3, [pc, #280] ; (8009e14 ) 8009cfa: 681b ldr r3, [r3, #0] 8009cfc: 1c5a adds r2, r3, #1 8009cfe: 687b ldr r3, [r7, #4] 8009d00: 625a str r2, [r3, #36] ; 0x24 pcb->rcv_ann_right_edge = pcb->rcv_nxt; 8009d02: 687b ldr r3, [r7, #4] 8009d04: 6a5a ldr r2, [r3, #36] ; 0x24 8009d06: 687b ldr r3, [r7, #4] 8009d08: 62da str r2, [r3, #44] ; 0x2c pcb->lastack = ackno; 8009d0a: 4b41 ldr r3, [pc, #260] ; (8009e10 ) 8009d0c: 681a ldr r2, [r3, #0] 8009d0e: 687b ldr r3, [r7, #4] 8009d10: 645a str r2, [r3, #68] ; 0x44 pcb->snd_wnd = tcphdr->wnd; 8009d12: 4b44 ldr r3, [pc, #272] ; (8009e24 ) 8009d14: 681b ldr r3, [r3, #0] 8009d16: 89db ldrh r3, [r3, #14] 8009d18: b29a uxth r2, r3 8009d1a: 687b ldr r3, [r7, #4] 8009d1c: f8a3 2060 strh.w r2, [r3, #96] ; 0x60 pcb->snd_wnd_max = pcb->snd_wnd; 8009d20: 687b ldr r3, [r7, #4] 8009d22: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60 8009d26: 687b ldr r3, [r7, #4] 8009d28: f8a3 2062 strh.w r2, [r3, #98] ; 0x62 pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ 8009d2c: 4b39 ldr r3, [pc, #228] ; (8009e14 ) 8009d2e: 681b ldr r3, [r3, #0] 8009d30: 1e5a subs r2, r3, #1 8009d32: 687b ldr r3, [r7, #4] 8009d34: 655a str r2, [r3, #84] ; 0x54 pcb->state = ESTABLISHED; 8009d36: 687b ldr r3, [r7, #4] 8009d38: 2204 movs r2, #4 8009d3a: 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); 8009d3c: 687b ldr r3, [r7, #4] 8009d3e: 8e5c ldrh r4, [r3, #50] ; 0x32 8009d40: 687b ldr r3, [r7, #4] 8009d42: 3304 adds r3, #4 8009d44: 4618 mov r0, r3 8009d46: f005 f89f bl 800ee88 8009d4a: 4601 mov r1, r0 8009d4c: 687b ldr r3, [r7, #4] 8009d4e: 3304 adds r3, #4 8009d50: 461a mov r2, r3 8009d52: 4620 mov r0, r4 8009d54: f7ff f886 bl 8008e64 8009d58: 4603 mov r3, r0 8009d5a: 461a mov r2, r3 8009d5c: 687b ldr r3, [r7, #4] 8009d5e: 865a strh r2, [r3, #50] ; 0x32 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); 8009d60: 687b ldr r3, [r7, #4] 8009d62: 8e5b ldrh r3, [r3, #50] ; 0x32 8009d64: 009a lsls r2, r3, #2 8009d66: 687b ldr r3, [r7, #4] 8009d68: 8e5b ldrh r3, [r3, #50] ; 0x32 8009d6a: 005b lsls r3, r3, #1 8009d6c: f241 111c movw r1, #4380 ; 0x111c 8009d70: 428b cmp r3, r1 8009d72: bf38 it cc 8009d74: 460b movcc r3, r1 8009d76: 429a cmp r2, r3 8009d78: d204 bcs.n 8009d84 8009d7a: 687b ldr r3, [r7, #4] 8009d7c: 8e5b ldrh r3, [r3, #50] ; 0x32 8009d7e: 009b lsls r3, r3, #2 8009d80: b29b uxth r3, r3 8009d82: e00d b.n 8009da0 8009d84: 687b ldr r3, [r7, #4] 8009d86: 8e5b ldrh r3, [r3, #50] ; 0x32 8009d88: 005b lsls r3, r3, #1 8009d8a: f241 121c movw r2, #4380 ; 0x111c 8009d8e: 4293 cmp r3, r2 8009d90: d904 bls.n 8009d9c 8009d92: 687b ldr r3, [r7, #4] 8009d94: 8e5b ldrh r3, [r3, #50] ; 0x32 8009d96: 005b lsls r3, r3, #1 8009d98: b29b uxth r3, r3 8009d9a: e001 b.n 8009da0 8009d9c: f241 131c movw r3, #4380 ; 0x111c 8009da0: 687a ldr r2, [r7, #4] 8009da2: 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)); 8009da6: 687b ldr r3, [r7, #4] 8009da8: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66 8009dac: 2b00 cmp r3, #0 8009dae: d106 bne.n 8009dbe 8009db0: 4b13 ldr r3, [pc, #76] ; (8009e00 ) 8009db2: f44f 725b mov.w r2, #876 ; 0x36c 8009db6: 491c ldr r1, [pc, #112] ; (8009e28 ) 8009db8: 4813 ldr r0, [pc, #76] ; (8009e08 ) 8009dba: f006 ff05 bl 8010bc8 --pcb->snd_queuelen; 8009dbe: 687b ldr r3, [r7, #4] 8009dc0: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66 8009dc4: 3b01 subs r3, #1 8009dc6: b29a uxth r2, r3 8009dc8: 687b ldr r3, [r7, #4] 8009dca: 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; 8009dce: 687b ldr r3, [r7, #4] 8009dd0: 6f1b ldr r3, [r3, #112] ; 0x70 8009dd2: 617b str r3, [r7, #20] if (rseg == NULL) { 8009dd4: 697b ldr r3, [r7, #20] 8009dd6: 2b00 cmp r3, #0 8009dd8: d12a bne.n 8009e30 /* might happen if tcp_output fails in tcp_rexmit_rto() in which case the segment is on the unsent list */ rseg = pcb->unsent; 8009dda: 687b ldr r3, [r7, #4] 8009ddc: 6edb ldr r3, [r3, #108] ; 0x6c 8009dde: 617b str r3, [r7, #20] LWIP_ASSERT("no segment to free", rseg != NULL); 8009de0: 697b ldr r3, [r7, #20] 8009de2: 2b00 cmp r3, #0 8009de4: d106 bne.n 8009df4 8009de6: 4b06 ldr r3, [pc, #24] ; (8009e00 ) 8009de8: f44f 725d mov.w r2, #884 ; 0x374 8009dec: 490f ldr r1, [pc, #60] ; (8009e2c ) 8009dee: 4806 ldr r0, [pc, #24] ; (8009e08 ) 8009df0: f006 feea bl 8010bc8 pcb->unsent = rseg->next; 8009df4: 697b ldr r3, [r7, #20] 8009df6: 681a ldr r2, [r3, #0] 8009df8: 687b ldr r3, [r7, #4] 8009dfa: 66da str r2, [r3, #108] ; 0x6c 8009dfc: e01c b.n 8009e38 8009dfe: bf00 nop 8009e00: 08013198 .word 0x08013198 8009e04: 080133d0 .word 0x080133d0 8009e08: 080131e4 .word 0x080131e4 8009e0c: 24007bb4 .word 0x24007bb4 8009e10: 24007bac .word 0x24007bac 8009e14: 24007ba8 .word 0x24007ba8 8009e18: 080133ec .word 0x080133ec 8009e1c: 24007bb5 .word 0x24007bb5 8009e20: 24007b6c .word 0x24007b6c 8009e24: 24007b98 .word 0x24007b98 8009e28: 0801340c .word 0x0801340c 8009e2c: 08013424 .word 0x08013424 } else { pcb->unacked = rseg->next; 8009e30: 697b ldr r3, [r7, #20] 8009e32: 681a ldr r2, [r3, #0] 8009e34: 687b ldr r3, [r7, #4] 8009e36: 671a str r2, [r3, #112] ; 0x70 } tcp_seg_free(rseg); 8009e38: 6978 ldr r0, [r7, #20] 8009e3a: f7fe fc9c bl 8008776 /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if (pcb->unacked == NULL) { 8009e3e: 687b ldr r3, [r7, #4] 8009e40: 6f1b ldr r3, [r3, #112] ; 0x70 8009e42: 2b00 cmp r3, #0 8009e44: d104 bne.n 8009e50 pcb->rtime = -1; 8009e46: 687b ldr r3, [r7, #4] 8009e48: f64f 72ff movw r2, #65535 ; 0xffff 8009e4c: 861a strh r2, [r3, #48] ; 0x30 8009e4e: e006 b.n 8009e5e } else { pcb->rtime = 0; 8009e50: 687b ldr r3, [r7, #4] 8009e52: 2200 movs r2, #0 8009e54: 861a strh r2, [r3, #48] ; 0x30 pcb->nrtx = 0; 8009e56: 687b ldr r3, [r7, #4] 8009e58: 2200 movs r2, #0 8009e5a: 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); 8009e5e: 687b ldr r3, [r7, #4] 8009e60: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 8009e64: 2b00 cmp r3, #0 8009e66: d00a beq.n 8009e7e 8009e68: 687b ldr r3, [r7, #4] 8009e6a: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 8009e6e: 687a ldr r2, [r7, #4] 8009e70: 6910 ldr r0, [r2, #16] 8009e72: 2200 movs r2, #0 8009e74: 6879 ldr r1, [r7, #4] 8009e76: 4798 blx r3 8009e78: 4603 mov r3, r0 8009e7a: 77bb strb r3, [r7, #30] 8009e7c: e001 b.n 8009e82 8009e7e: 2300 movs r3, #0 8009e80: 77bb strb r3, [r7, #30] if (err == ERR_ABRT) { 8009e82: f997 301e ldrsb.w r3, [r7, #30] 8009e86: f113 0f0d cmn.w r3, #13 8009e8a: d102 bne.n 8009e92 return ERR_ABRT; 8009e8c: f06f 030c mvn.w r3, #12 8009e90: e250 b.n 800a334 } tcp_ack_now(pcb); 8009e92: 687b ldr r3, [r7, #4] 8009e94: 8b5b ldrh r3, [r3, #26] 8009e96: f043 0302 orr.w r3, r3, #2 8009e9a: b29a uxth r2, r3 8009e9c: 687b ldr r3, [r7, #4] 8009e9e: 835a strh r2, [r3, #26] if (pcb->nrtx < TCP_SYNMAXRTX) { pcb->rtime = 0; tcp_rexmit_rto(pcb); } } break; 8009ea0: e23a b.n 800a318 else if (flags & TCP_ACK) { 8009ea2: 4b98 ldr r3, [pc, #608] ; (800a104 ) 8009ea4: 781b ldrb r3, [r3, #0] 8009ea6: f003 0310 and.w r3, r3, #16 8009eaa: 2b00 cmp r3, #0 8009eac: f000 8234 beq.w 800a318 tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 8009eb0: 4b95 ldr r3, [pc, #596] ; (800a108 ) 8009eb2: 6819 ldr r1, [r3, #0] 8009eb4: 4b95 ldr r3, [pc, #596] ; (800a10c ) 8009eb6: 881b ldrh r3, [r3, #0] 8009eb8: 461a mov r2, r3 8009eba: 4b95 ldr r3, [pc, #596] ; (800a110 ) 8009ebc: 681b ldr r3, [r3, #0] 8009ebe: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 8009ec0: 4b94 ldr r3, [pc, #592] ; (800a114 ) 8009ec2: 681b ldr r3, [r3, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 8009ec4: 885b ldrh r3, [r3, #2] 8009ec6: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 8009ec8: 4a92 ldr r2, [pc, #584] ; (800a114 ) 8009eca: 6812 ldr r2, [r2, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 8009ecc: 8812 ldrh r2, [r2, #0] 8009ece: b292 uxth r2, r2 8009ed0: 9202 str r2, [sp, #8] 8009ed2: 9301 str r3, [sp, #4] 8009ed4: 4b90 ldr r3, [pc, #576] ; (800a118 ) 8009ed6: 9300 str r3, [sp, #0] 8009ed8: 4b90 ldr r3, [pc, #576] ; (800a11c ) 8009eda: 4602 mov r2, r0 8009edc: 6878 ldr r0, [r7, #4] 8009ede: f003 f949 bl 800d174 if (pcb->nrtx < TCP_SYNMAXRTX) { 8009ee2: 687b ldr r3, [r7, #4] 8009ee4: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 8009ee8: 2b05 cmp r3, #5 8009eea: f200 8215 bhi.w 800a318 pcb->rtime = 0; 8009eee: 687b ldr r3, [r7, #4] 8009ef0: 2200 movs r2, #0 8009ef2: 861a strh r2, [r3, #48] ; 0x30 tcp_rexmit_rto(pcb); 8009ef4: 6878 ldr r0, [r7, #4] 8009ef6: f002 ff15 bl 800cd24 break; 8009efa: e20d b.n 800a318 case SYN_RCVD: if (flags & TCP_ACK) { 8009efc: 4b81 ldr r3, [pc, #516] ; (800a104 ) 8009efe: 781b ldrb r3, [r3, #0] 8009f00: f003 0310 and.w r3, r3, #16 8009f04: 2b00 cmp r3, #0 8009f06: f000 80a1 beq.w 800a04c /* expected ACK number? */ if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 8009f0a: 4b7f ldr r3, [pc, #508] ; (800a108 ) 8009f0c: 681a ldr r2, [r3, #0] 8009f0e: 687b ldr r3, [r7, #4] 8009f10: 6c5b ldr r3, [r3, #68] ; 0x44 8009f12: 1ad3 subs r3, r2, r3 8009f14: 3b01 subs r3, #1 8009f16: 2b00 cmp r3, #0 8009f18: db7e blt.n 800a018 8009f1a: 4b7b ldr r3, [pc, #492] ; (800a108 ) 8009f1c: 681a ldr r2, [r3, #0] 8009f1e: 687b ldr r3, [r7, #4] 8009f20: 6d1b ldr r3, [r3, #80] ; 0x50 8009f22: 1ad3 subs r3, r2, r3 8009f24: 2b00 cmp r3, #0 8009f26: dc77 bgt.n 800a018 pcb->state = ESTABLISHED; 8009f28: 687b ldr r3, [r7, #4] 8009f2a: 2204 movs r2, #4 8009f2c: 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) { 8009f2e: 687b ldr r3, [r7, #4] 8009f30: 6fdb ldr r3, [r3, #124] ; 0x7c 8009f32: 2b00 cmp r3, #0 8009f34: d102 bne.n 8009f3c /* listen pcb might be closed by now */ err = ERR_VAL; 8009f36: 23fa movs r3, #250 ; 0xfa 8009f38: 77bb strb r3, [r7, #30] 8009f3a: e01d b.n 8009f78 } else #endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */ { #if LWIP_CALLBACK_API LWIP_ASSERT("pcb->listener->accept != NULL", pcb->listener->accept != NULL); 8009f3c: 687b ldr r3, [r7, #4] 8009f3e: 6fdb ldr r3, [r3, #124] ; 0x7c 8009f40: 699b ldr r3, [r3, #24] 8009f42: 2b00 cmp r3, #0 8009f44: d106 bne.n 8009f54 8009f46: 4b76 ldr r3, [pc, #472] ; (800a120 ) 8009f48: f44f 726a mov.w r2, #936 ; 0x3a8 8009f4c: 4975 ldr r1, [pc, #468] ; (800a124 ) 8009f4e: 4876 ldr r0, [pc, #472] ; (800a128 ) 8009f50: f006 fe3a bl 8010bc8 #endif tcp_backlog_accepted(pcb); /* Call the accept function. */ TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err); 8009f54: 687b ldr r3, [r7, #4] 8009f56: 6fdb ldr r3, [r3, #124] ; 0x7c 8009f58: 699b ldr r3, [r3, #24] 8009f5a: 2b00 cmp r3, #0 8009f5c: d00a beq.n 8009f74 8009f5e: 687b ldr r3, [r7, #4] 8009f60: 6fdb ldr r3, [r3, #124] ; 0x7c 8009f62: 699b ldr r3, [r3, #24] 8009f64: 687a ldr r2, [r7, #4] 8009f66: 6910 ldr r0, [r2, #16] 8009f68: 2200 movs r2, #0 8009f6a: 6879 ldr r1, [r7, #4] 8009f6c: 4798 blx r3 8009f6e: 4603 mov r3, r0 8009f70: 77bb strb r3, [r7, #30] 8009f72: e001 b.n 8009f78 8009f74: 23f0 movs r3, #240 ; 0xf0 8009f76: 77bb strb r3, [r7, #30] } if (err != ERR_OK) { 8009f78: f997 301e ldrsb.w r3, [r7, #30] 8009f7c: 2b00 cmp r3, #0 8009f7e: d00a beq.n 8009f96 /* If the accept function returns with an error, we abort * the connection. */ /* Already aborted? */ if (err != ERR_ABRT) { 8009f80: f997 301e ldrsb.w r3, [r7, #30] 8009f84: f113 0f0d cmn.w r3, #13 8009f88: d002 beq.n 8009f90 tcp_abort(pcb); 8009f8a: 6878 ldr r0, [r7, #4] 8009f8c: f7fd fdaa bl 8007ae4 } return ERR_ABRT; 8009f90: f06f 030c mvn.w r3, #12 8009f94: e1ce b.n 800a334 } /* If there was any data contained within this ACK, * we'd better pass it on to the application as well. */ tcp_receive(pcb); 8009f96: 6878 ldr r0, [r7, #4] 8009f98: f000 fae0 bl 800a55c /* Prevent ACK for SYN to generate a sent event */ if (recv_acked != 0) { 8009f9c: 4b63 ldr r3, [pc, #396] ; (800a12c ) 8009f9e: 881b ldrh r3, [r3, #0] 8009fa0: 2b00 cmp r3, #0 8009fa2: d005 beq.n 8009fb0 recv_acked--; 8009fa4: 4b61 ldr r3, [pc, #388] ; (800a12c ) 8009fa6: 881b ldrh r3, [r3, #0] 8009fa8: 3b01 subs r3, #1 8009faa: b29a uxth r2, r3 8009fac: 4b5f ldr r3, [pc, #380] ; (800a12c ) 8009fae: 801a strh r2, [r3, #0] } pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); 8009fb0: 687b ldr r3, [r7, #4] 8009fb2: 8e5b ldrh r3, [r3, #50] ; 0x32 8009fb4: 009a lsls r2, r3, #2 8009fb6: 687b ldr r3, [r7, #4] 8009fb8: 8e5b ldrh r3, [r3, #50] ; 0x32 8009fba: 005b lsls r3, r3, #1 8009fbc: f241 111c movw r1, #4380 ; 0x111c 8009fc0: 428b cmp r3, r1 8009fc2: bf38 it cc 8009fc4: 460b movcc r3, r1 8009fc6: 429a cmp r2, r3 8009fc8: d204 bcs.n 8009fd4 8009fca: 687b ldr r3, [r7, #4] 8009fcc: 8e5b ldrh r3, [r3, #50] ; 0x32 8009fce: 009b lsls r3, r3, #2 8009fd0: b29b uxth r3, r3 8009fd2: e00d b.n 8009ff0 8009fd4: 687b ldr r3, [r7, #4] 8009fd6: 8e5b ldrh r3, [r3, #50] ; 0x32 8009fd8: 005b lsls r3, r3, #1 8009fda: f241 121c movw r2, #4380 ; 0x111c 8009fde: 4293 cmp r3, r2 8009fe0: d904 bls.n 8009fec 8009fe2: 687b ldr r3, [r7, #4] 8009fe4: 8e5b ldrh r3, [r3, #50] ; 0x32 8009fe6: 005b lsls r3, r3, #1 8009fe8: b29b uxth r3, r3 8009fea: e001 b.n 8009ff0 8009fec: f241 131c movw r3, #4380 ; 0x111c 8009ff0: 687a ldr r2, [r7, #4] 8009ff2: 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) { 8009ff6: 4b4e ldr r3, [pc, #312] ; (800a130 ) 8009ff8: 781b ldrb r3, [r3, #0] 8009ffa: f003 0320 and.w r3, r3, #32 8009ffe: 2b00 cmp r3, #0 800a000: d037 beq.n 800a072 tcp_ack_now(pcb); 800a002: 687b ldr r3, [r7, #4] 800a004: 8b5b ldrh r3, [r3, #26] 800a006: f043 0302 orr.w r3, r3, #2 800a00a: b29a uxth r2, r3 800a00c: 687b ldr r3, [r7, #4] 800a00e: 835a strh r2, [r3, #26] pcb->state = CLOSE_WAIT; 800a010: 687b ldr r3, [r7, #4] 800a012: 2207 movs r2, #7 800a014: 751a strb r2, [r3, #20] if (recv_flags & TF_GOT_FIN) { 800a016: e02c b.n 800a072 } } else { /* incorrect ACK number, send RST */ tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 800a018: 4b3b ldr r3, [pc, #236] ; (800a108 ) 800a01a: 6819 ldr r1, [r3, #0] 800a01c: 4b3b ldr r3, [pc, #236] ; (800a10c ) 800a01e: 881b ldrh r3, [r3, #0] 800a020: 461a mov r2, r3 800a022: 4b3b ldr r3, [pc, #236] ; (800a110 ) 800a024: 681b ldr r3, [r3, #0] 800a026: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 800a028: 4b3a ldr r3, [pc, #232] ; (800a114 ) 800a02a: 681b ldr r3, [r3, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 800a02c: 885b ldrh r3, [r3, #2] 800a02e: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 800a030: 4a38 ldr r2, [pc, #224] ; (800a114 ) 800a032: 6812 ldr r2, [r2, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 800a034: 8812 ldrh r2, [r2, #0] 800a036: b292 uxth r2, r2 800a038: 9202 str r2, [sp, #8] 800a03a: 9301 str r3, [sp, #4] 800a03c: 4b36 ldr r3, [pc, #216] ; (800a118 ) 800a03e: 9300 str r3, [sp, #0] 800a040: 4b36 ldr r3, [pc, #216] ; (800a11c ) 800a042: 4602 mov r2, r0 800a044: 6878 ldr r0, [r7, #4] 800a046: f003 f895 bl 800d174 } } 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; 800a04a: e167 b.n 800a31c } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { 800a04c: 4b2d ldr r3, [pc, #180] ; (800a104 ) 800a04e: 781b ldrb r3, [r3, #0] 800a050: f003 0302 and.w r3, r3, #2 800a054: 2b00 cmp r3, #0 800a056: f000 8161 beq.w 800a31c 800a05a: 687b ldr r3, [r7, #4] 800a05c: 6a5b ldr r3, [r3, #36] ; 0x24 800a05e: 1e5a subs r2, r3, #1 800a060: 4b2b ldr r3, [pc, #172] ; (800a110 ) 800a062: 681b ldr r3, [r3, #0] 800a064: 429a cmp r2, r3 800a066: f040 8159 bne.w 800a31c tcp_rexmit(pcb); 800a06a: 6878 ldr r0, [r7, #4] 800a06c: f002 fe7c bl 800cd68 break; 800a070: e154 b.n 800a31c 800a072: e153 b.n 800a31c case CLOSE_WAIT: /* FALLTHROUGH */ case ESTABLISHED: tcp_receive(pcb); 800a074: 6878 ldr r0, [r7, #4] 800a076: f000 fa71 bl 800a55c if (recv_flags & TF_GOT_FIN) { /* passive close */ 800a07a: 4b2d ldr r3, [pc, #180] ; (800a130 ) 800a07c: 781b ldrb r3, [r3, #0] 800a07e: f003 0320 and.w r3, r3, #32 800a082: 2b00 cmp r3, #0 800a084: f000 814c beq.w 800a320 tcp_ack_now(pcb); 800a088: 687b ldr r3, [r7, #4] 800a08a: 8b5b ldrh r3, [r3, #26] 800a08c: f043 0302 orr.w r3, r3, #2 800a090: b29a uxth r2, r3 800a092: 687b ldr r3, [r7, #4] 800a094: 835a strh r2, [r3, #26] pcb->state = CLOSE_WAIT; 800a096: 687b ldr r3, [r7, #4] 800a098: 2207 movs r2, #7 800a09a: 751a strb r2, [r3, #20] } break; 800a09c: e140 b.n 800a320 case FIN_WAIT_1: tcp_receive(pcb); 800a09e: 6878 ldr r0, [r7, #4] 800a0a0: f000 fa5c bl 800a55c if (recv_flags & TF_GOT_FIN) { 800a0a4: 4b22 ldr r3, [pc, #136] ; (800a130 ) 800a0a6: 781b ldrb r3, [r3, #0] 800a0a8: f003 0320 and.w r3, r3, #32 800a0ac: 2b00 cmp r3, #0 800a0ae: d071 beq.n 800a194 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 800a0b0: 4b14 ldr r3, [pc, #80] ; (800a104 ) 800a0b2: 781b ldrb r3, [r3, #0] 800a0b4: f003 0310 and.w r3, r3, #16 800a0b8: 2b00 cmp r3, #0 800a0ba: d060 beq.n 800a17e 800a0bc: 687b ldr r3, [r7, #4] 800a0be: 6d1a ldr r2, [r3, #80] ; 0x50 800a0c0: 4b11 ldr r3, [pc, #68] ; (800a108 ) 800a0c2: 681b ldr r3, [r3, #0] 800a0c4: 429a cmp r2, r3 800a0c6: d15a bne.n 800a17e pcb->unsent == NULL) { 800a0c8: 687b ldr r3, [r7, #4] 800a0ca: 6edb ldr r3, [r3, #108] ; 0x6c if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 800a0cc: 2b00 cmp r3, #0 800a0ce: d156 bne.n 800a17e 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); 800a0d0: 687b ldr r3, [r7, #4] 800a0d2: 8b5b ldrh r3, [r3, #26] 800a0d4: f043 0302 orr.w r3, r3, #2 800a0d8: b29a uxth r2, r3 800a0da: 687b ldr r3, [r7, #4] 800a0dc: 835a strh r2, [r3, #26] tcp_pcb_purge(pcb); 800a0de: 6878 ldr r0, [r7, #4] 800a0e0: f7fe fdb6 bl 8008c50 TCP_RMV_ACTIVE(pcb); 800a0e4: 4b13 ldr r3, [pc, #76] ; (800a134 ) 800a0e6: 681b ldr r3, [r3, #0] 800a0e8: 687a ldr r2, [r7, #4] 800a0ea: 429a cmp r2, r3 800a0ec: d105 bne.n 800a0fa 800a0ee: 4b11 ldr r3, [pc, #68] ; (800a134 ) 800a0f0: 681b ldr r3, [r3, #0] 800a0f2: 68db ldr r3, [r3, #12] 800a0f4: 4a0f ldr r2, [pc, #60] ; (800a134 ) 800a0f6: 6013 str r3, [r2, #0] 800a0f8: e02e b.n 800a158 800a0fa: 4b0e ldr r3, [pc, #56] ; (800a134 ) 800a0fc: 681b ldr r3, [r3, #0] 800a0fe: 613b str r3, [r7, #16] 800a100: e027 b.n 800a152 800a102: bf00 nop 800a104: 24007bb4 .word 0x24007bb4 800a108: 24007bac .word 0x24007bac 800a10c: 24007bb2 .word 0x24007bb2 800a110: 24007ba8 .word 0x24007ba8 800a114: 24007b98 .word 0x24007b98 800a118: 24004c20 .word 0x24004c20 800a11c: 24004c24 .word 0x24004c24 800a120: 08013198 .word 0x08013198 800a124: 08013438 .word 0x08013438 800a128: 080131e4 .word 0x080131e4 800a12c: 24007bb0 .word 0x24007bb0 800a130: 24007bb5 .word 0x24007bb5 800a134: 24007b78 .word 0x24007b78 800a138: 693b ldr r3, [r7, #16] 800a13a: 68db ldr r3, [r3, #12] 800a13c: 687a ldr r2, [r7, #4] 800a13e: 429a cmp r2, r3 800a140: d104 bne.n 800a14c 800a142: 687b ldr r3, [r7, #4] 800a144: 68da ldr r2, [r3, #12] 800a146: 693b ldr r3, [r7, #16] 800a148: 60da str r2, [r3, #12] 800a14a: e005 b.n 800a158 800a14c: 693b ldr r3, [r7, #16] 800a14e: 68db ldr r3, [r3, #12] 800a150: 613b str r3, [r7, #16] 800a152: 693b ldr r3, [r7, #16] 800a154: 2b00 cmp r3, #0 800a156: d1ef bne.n 800a138 800a158: 687b ldr r3, [r7, #4] 800a15a: 2200 movs r2, #0 800a15c: 60da str r2, [r3, #12] 800a15e: 4b77 ldr r3, [pc, #476] ; (800a33c ) 800a160: 2201 movs r2, #1 800a162: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 800a164: 687b ldr r3, [r7, #4] 800a166: 220a movs r2, #10 800a168: 751a strb r2, [r3, #20] TCP_REG(&tcp_tw_pcbs, pcb); 800a16a: 4b75 ldr r3, [pc, #468] ; (800a340 ) 800a16c: 681a ldr r2, [r3, #0] 800a16e: 687b ldr r3, [r7, #4] 800a170: 60da str r2, [r3, #12] 800a172: 4a73 ldr r2, [pc, #460] ; (800a340 ) 800a174: 687b ldr r3, [r7, #4] 800a176: 6013 str r3, [r2, #0] 800a178: f003 f9be bl 800d4f8 } } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && pcb->unsent == NULL) { pcb->state = FIN_WAIT_2; } break; 800a17c: e0d2 b.n 800a324 tcp_ack_now(pcb); 800a17e: 687b ldr r3, [r7, #4] 800a180: 8b5b ldrh r3, [r3, #26] 800a182: f043 0302 orr.w r3, r3, #2 800a186: b29a uxth r2, r3 800a188: 687b ldr r3, [r7, #4] 800a18a: 835a strh r2, [r3, #26] pcb->state = CLOSING; 800a18c: 687b ldr r3, [r7, #4] 800a18e: 2208 movs r2, #8 800a190: 751a strb r2, [r3, #20] break; 800a192: e0c7 b.n 800a324 } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 800a194: 4b6b ldr r3, [pc, #428] ; (800a344 ) 800a196: 781b ldrb r3, [r3, #0] 800a198: f003 0310 and.w r3, r3, #16 800a19c: 2b00 cmp r3, #0 800a19e: f000 80c1 beq.w 800a324 800a1a2: 687b ldr r3, [r7, #4] 800a1a4: 6d1a ldr r2, [r3, #80] ; 0x50 800a1a6: 4b68 ldr r3, [pc, #416] ; (800a348 ) 800a1a8: 681b ldr r3, [r3, #0] 800a1aa: 429a cmp r2, r3 800a1ac: f040 80ba bne.w 800a324 pcb->unsent == NULL) { 800a1b0: 687b ldr r3, [r7, #4] 800a1b2: 6edb ldr r3, [r3, #108] ; 0x6c } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 800a1b4: 2b00 cmp r3, #0 800a1b6: f040 80b5 bne.w 800a324 pcb->state = FIN_WAIT_2; 800a1ba: 687b ldr r3, [r7, #4] 800a1bc: 2206 movs r2, #6 800a1be: 751a strb r2, [r3, #20] break; 800a1c0: e0b0 b.n 800a324 case FIN_WAIT_2: tcp_receive(pcb); 800a1c2: 6878 ldr r0, [r7, #4] 800a1c4: f000 f9ca bl 800a55c if (recv_flags & TF_GOT_FIN) { 800a1c8: 4b60 ldr r3, [pc, #384] ; (800a34c ) 800a1ca: 781b ldrb r3, [r3, #0] 800a1cc: f003 0320 and.w r3, r3, #32 800a1d0: 2b00 cmp r3, #0 800a1d2: f000 80a9 beq.w 800a328 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); 800a1d6: 687b ldr r3, [r7, #4] 800a1d8: 8b5b ldrh r3, [r3, #26] 800a1da: f043 0302 orr.w r3, r3, #2 800a1de: b29a uxth r2, r3 800a1e0: 687b ldr r3, [r7, #4] 800a1e2: 835a strh r2, [r3, #26] tcp_pcb_purge(pcb); 800a1e4: 6878 ldr r0, [r7, #4] 800a1e6: f7fe fd33 bl 8008c50 TCP_RMV_ACTIVE(pcb); 800a1ea: 4b59 ldr r3, [pc, #356] ; (800a350 ) 800a1ec: 681b ldr r3, [r3, #0] 800a1ee: 687a ldr r2, [r7, #4] 800a1f0: 429a cmp r2, r3 800a1f2: d105 bne.n 800a200 800a1f4: 4b56 ldr r3, [pc, #344] ; (800a350 ) 800a1f6: 681b ldr r3, [r3, #0] 800a1f8: 68db ldr r3, [r3, #12] 800a1fa: 4a55 ldr r2, [pc, #340] ; (800a350 ) 800a1fc: 6013 str r3, [r2, #0] 800a1fe: e013 b.n 800a228 800a200: 4b53 ldr r3, [pc, #332] ; (800a350 ) 800a202: 681b ldr r3, [r3, #0] 800a204: 60fb str r3, [r7, #12] 800a206: e00c b.n 800a222 800a208: 68fb ldr r3, [r7, #12] 800a20a: 68db ldr r3, [r3, #12] 800a20c: 687a ldr r2, [r7, #4] 800a20e: 429a cmp r2, r3 800a210: d104 bne.n 800a21c 800a212: 687b ldr r3, [r7, #4] 800a214: 68da ldr r2, [r3, #12] 800a216: 68fb ldr r3, [r7, #12] 800a218: 60da str r2, [r3, #12] 800a21a: e005 b.n 800a228 800a21c: 68fb ldr r3, [r7, #12] 800a21e: 68db ldr r3, [r3, #12] 800a220: 60fb str r3, [r7, #12] 800a222: 68fb ldr r3, [r7, #12] 800a224: 2b00 cmp r3, #0 800a226: d1ef bne.n 800a208 800a228: 687b ldr r3, [r7, #4] 800a22a: 2200 movs r2, #0 800a22c: 60da str r2, [r3, #12] 800a22e: 4b43 ldr r3, [pc, #268] ; (800a33c ) 800a230: 2201 movs r2, #1 800a232: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 800a234: 687b ldr r3, [r7, #4] 800a236: 220a movs r2, #10 800a238: 751a strb r2, [r3, #20] TCP_REG(&tcp_tw_pcbs, pcb); 800a23a: 4b41 ldr r3, [pc, #260] ; (800a340 ) 800a23c: 681a ldr r2, [r3, #0] 800a23e: 687b ldr r3, [r7, #4] 800a240: 60da str r2, [r3, #12] 800a242: 4a3f ldr r2, [pc, #252] ; (800a340 ) 800a244: 687b ldr r3, [r7, #4] 800a246: 6013 str r3, [r2, #0] 800a248: f003 f956 bl 800d4f8 } break; 800a24c: e06c b.n 800a328 case CLOSING: tcp_receive(pcb); 800a24e: 6878 ldr r0, [r7, #4] 800a250: f000 f984 bl 800a55c if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { 800a254: 4b3b ldr r3, [pc, #236] ; (800a344 ) 800a256: 781b ldrb r3, [r3, #0] 800a258: f003 0310 and.w r3, r3, #16 800a25c: 2b00 cmp r3, #0 800a25e: d065 beq.n 800a32c 800a260: 687b ldr r3, [r7, #4] 800a262: 6d1a ldr r2, [r3, #80] ; 0x50 800a264: 4b38 ldr r3, [pc, #224] ; (800a348 ) 800a266: 681b ldr r3, [r3, #0] 800a268: 429a cmp r2, r3 800a26a: d15f bne.n 800a32c 800a26c: 687b ldr r3, [r7, #4] 800a26e: 6edb ldr r3, [r3, #108] ; 0x6c 800a270: 2b00 cmp r3, #0 800a272: d15b bne.n 800a32c LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); tcp_pcb_purge(pcb); 800a274: 6878 ldr r0, [r7, #4] 800a276: f7fe fceb bl 8008c50 TCP_RMV_ACTIVE(pcb); 800a27a: 4b35 ldr r3, [pc, #212] ; (800a350 ) 800a27c: 681b ldr r3, [r3, #0] 800a27e: 687a ldr r2, [r7, #4] 800a280: 429a cmp r2, r3 800a282: d105 bne.n 800a290 800a284: 4b32 ldr r3, [pc, #200] ; (800a350 ) 800a286: 681b ldr r3, [r3, #0] 800a288: 68db ldr r3, [r3, #12] 800a28a: 4a31 ldr r2, [pc, #196] ; (800a350 ) 800a28c: 6013 str r3, [r2, #0] 800a28e: e013 b.n 800a2b8 800a290: 4b2f ldr r3, [pc, #188] ; (800a350 ) 800a292: 681b ldr r3, [r3, #0] 800a294: 61bb str r3, [r7, #24] 800a296: e00c b.n 800a2b2 800a298: 69bb ldr r3, [r7, #24] 800a29a: 68db ldr r3, [r3, #12] 800a29c: 687a ldr r2, [r7, #4] 800a29e: 429a cmp r2, r3 800a2a0: d104 bne.n 800a2ac 800a2a2: 687b ldr r3, [r7, #4] 800a2a4: 68da ldr r2, [r3, #12] 800a2a6: 69bb ldr r3, [r7, #24] 800a2a8: 60da str r2, [r3, #12] 800a2aa: e005 b.n 800a2b8 800a2ac: 69bb ldr r3, [r7, #24] 800a2ae: 68db ldr r3, [r3, #12] 800a2b0: 61bb str r3, [r7, #24] 800a2b2: 69bb ldr r3, [r7, #24] 800a2b4: 2b00 cmp r3, #0 800a2b6: d1ef bne.n 800a298 800a2b8: 687b ldr r3, [r7, #4] 800a2ba: 2200 movs r2, #0 800a2bc: 60da str r2, [r3, #12] 800a2be: 4b1f ldr r3, [pc, #124] ; (800a33c ) 800a2c0: 2201 movs r2, #1 800a2c2: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 800a2c4: 687b ldr r3, [r7, #4] 800a2c6: 220a movs r2, #10 800a2c8: 751a strb r2, [r3, #20] TCP_REG(&tcp_tw_pcbs, pcb); 800a2ca: 4b1d ldr r3, [pc, #116] ; (800a340 ) 800a2cc: 681a ldr r2, [r3, #0] 800a2ce: 687b ldr r3, [r7, #4] 800a2d0: 60da str r2, [r3, #12] 800a2d2: 4a1b ldr r2, [pc, #108] ; (800a340 ) 800a2d4: 687b ldr r3, [r7, #4] 800a2d6: 6013 str r3, [r2, #0] 800a2d8: f003 f90e bl 800d4f8 } break; 800a2dc: e026 b.n 800a32c case LAST_ACK: tcp_receive(pcb); 800a2de: 6878 ldr r0, [r7, #4] 800a2e0: f000 f93c bl 800a55c if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { 800a2e4: 4b17 ldr r3, [pc, #92] ; (800a344 ) 800a2e6: 781b ldrb r3, [r3, #0] 800a2e8: f003 0310 and.w r3, r3, #16 800a2ec: 2b00 cmp r3, #0 800a2ee: d01f beq.n 800a330 800a2f0: 687b ldr r3, [r7, #4] 800a2f2: 6d1a ldr r2, [r3, #80] ; 0x50 800a2f4: 4b14 ldr r3, [pc, #80] ; (800a348 ) 800a2f6: 681b ldr r3, [r3, #0] 800a2f8: 429a cmp r2, r3 800a2fa: d119 bne.n 800a330 800a2fc: 687b ldr r3, [r7, #4] 800a2fe: 6edb ldr r3, [r3, #108] ; 0x6c 800a300: 2b00 cmp r3, #0 800a302: d115 bne.n 800a330 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; 800a304: 4b11 ldr r3, [pc, #68] ; (800a34c ) 800a306: 781b ldrb r3, [r3, #0] 800a308: f043 0310 orr.w r3, r3, #16 800a30c: b2da uxtb r2, r3 800a30e: 4b0f ldr r3, [pc, #60] ; (800a34c ) 800a310: 701a strb r2, [r3, #0] } break; 800a312: e00d b.n 800a330 default: break; 800a314: bf00 nop 800a316: e00c b.n 800a332 break; 800a318: bf00 nop 800a31a: e00a b.n 800a332 break; 800a31c: bf00 nop 800a31e: e008 b.n 800a332 break; 800a320: bf00 nop 800a322: e006 b.n 800a332 break; 800a324: bf00 nop 800a326: e004 b.n 800a332 break; 800a328: bf00 nop 800a32a: e002 b.n 800a332 break; 800a32c: bf00 nop 800a32e: e000 b.n 800a332 break; 800a330: bf00 nop } return ERR_OK; 800a332: 2300 movs r3, #0 } 800a334: 4618 mov r0, r3 800a336: 3724 adds r7, #36 ; 0x24 800a338: 46bd mov sp, r7 800a33a: bd90 pop {r4, r7, pc} 800a33c: 24007b80 .word 0x24007b80 800a340: 24007b7c .word 0x24007b7c 800a344: 24007bb4 .word 0x24007bb4 800a348: 24007bac .word 0x24007bac 800a34c: 24007bb5 .word 0x24007bb5 800a350: 24007b78 .word 0x24007b78 0800a354 : * * Called from tcp_receive() */ static void tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next) { 800a354: b590 push {r4, r7, lr} 800a356: b085 sub sp, #20 800a358: af00 add r7, sp, #0 800a35a: 6078 str r0, [r7, #4] 800a35c: 6039 str r1, [r7, #0] struct tcp_seg *old_seg; LWIP_ASSERT("tcp_oos_insert_segment: invalid cseg", cseg != NULL); 800a35e: 687b ldr r3, [r7, #4] 800a360: 2b00 cmp r3, #0 800a362: d106 bne.n 800a372 800a364: 4b3b ldr r3, [pc, #236] ; (800a454 ) 800a366: f240 421f movw r2, #1055 ; 0x41f 800a36a: 493b ldr r1, [pc, #236] ; (800a458 ) 800a36c: 483b ldr r0, [pc, #236] ; (800a45c ) 800a36e: f006 fc2b bl 8010bc8 if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { 800a372: 687b ldr r3, [r7, #4] 800a374: 691b ldr r3, [r3, #16] 800a376: 899b ldrh r3, [r3, #12] 800a378: b29b uxth r3, r3 800a37a: 4618 mov r0, r3 800a37c: f7fb f8e6 bl 800554c 800a380: 4603 mov r3, r0 800a382: b2db uxtb r3, r3 800a384: f003 0301 and.w r3, r3, #1 800a388: 2b00 cmp r3, #0 800a38a: d028 beq.n 800a3de /* received segment overlaps all following segments */ tcp_segs_free(next); 800a38c: 6838 ldr r0, [r7, #0] 800a38e: f7fe f9dd bl 800874c next = NULL; 800a392: 2300 movs r3, #0 800a394: 603b str r3, [r7, #0] 800a396: e056 b.n 800a446 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) { 800a398: 683b ldr r3, [r7, #0] 800a39a: 691b ldr r3, [r3, #16] 800a39c: 899b ldrh r3, [r3, #12] 800a39e: b29b uxth r3, r3 800a3a0: 4618 mov r0, r3 800a3a2: f7fb f8d3 bl 800554c 800a3a6: 4603 mov r3, r0 800a3a8: b2db uxtb r3, r3 800a3aa: f003 0301 and.w r3, r3, #1 800a3ae: 2b00 cmp r3, #0 800a3b0: d00d beq.n 800a3ce TCPH_SET_FLAG(cseg->tcphdr, TCP_FIN); 800a3b2: 687b ldr r3, [r7, #4] 800a3b4: 691b ldr r3, [r3, #16] 800a3b6: 899b ldrh r3, [r3, #12] 800a3b8: b29c uxth r4, r3 800a3ba: 2001 movs r0, #1 800a3bc: f7fb f8c6 bl 800554c 800a3c0: 4603 mov r3, r0 800a3c2: 461a mov r2, r3 800a3c4: 687b ldr r3, [r7, #4] 800a3c6: 691b ldr r3, [r3, #16] 800a3c8: 4322 orrs r2, r4 800a3ca: b292 uxth r2, r2 800a3cc: 819a strh r2, [r3, #12] } old_seg = next; 800a3ce: 683b ldr r3, [r7, #0] 800a3d0: 60fb str r3, [r7, #12] next = next->next; 800a3d2: 683b ldr r3, [r7, #0] 800a3d4: 681b ldr r3, [r3, #0] 800a3d6: 603b str r3, [r7, #0] tcp_seg_free(old_seg); 800a3d8: 68f8 ldr r0, [r7, #12] 800a3da: f7fe f9cc bl 8008776 while (next && 800a3de: 683b ldr r3, [r7, #0] 800a3e0: 2b00 cmp r3, #0 800a3e2: d00e beq.n 800a402 TCP_SEQ_GEQ((seqno + cseg->len), 800a3e4: 687b ldr r3, [r7, #4] 800a3e6: 891b ldrh r3, [r3, #8] 800a3e8: 461a mov r2, r3 800a3ea: 4b1d ldr r3, [pc, #116] ; (800a460 ) 800a3ec: 681b ldr r3, [r3, #0] 800a3ee: 441a add r2, r3 800a3f0: 683b ldr r3, [r7, #0] 800a3f2: 691b ldr r3, [r3, #16] 800a3f4: 685b ldr r3, [r3, #4] 800a3f6: 6839 ldr r1, [r7, #0] 800a3f8: 8909 ldrh r1, [r1, #8] 800a3fa: 440b add r3, r1 800a3fc: 1ad3 subs r3, r2, r3 while (next && 800a3fe: 2b00 cmp r3, #0 800a400: daca bge.n 800a398 } if (next && 800a402: 683b ldr r3, [r7, #0] 800a404: 2b00 cmp r3, #0 800a406: d01e beq.n 800a446 TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) { 800a408: 687b ldr r3, [r7, #4] 800a40a: 891b ldrh r3, [r3, #8] 800a40c: 461a mov r2, r3 800a40e: 4b14 ldr r3, [pc, #80] ; (800a460 ) 800a410: 681b ldr r3, [r3, #0] 800a412: 441a add r2, r3 800a414: 683b ldr r3, [r7, #0] 800a416: 691b ldr r3, [r3, #16] 800a418: 685b ldr r3, [r3, #4] 800a41a: 1ad3 subs r3, r2, r3 if (next && 800a41c: 2b00 cmp r3, #0 800a41e: dd12 ble.n 800a446 /* We need to trim the incoming segment. */ cseg->len = (u16_t)(next->tcphdr->seqno - seqno); 800a420: 683b ldr r3, [r7, #0] 800a422: 691b ldr r3, [r3, #16] 800a424: 685b ldr r3, [r3, #4] 800a426: b29a uxth r2, r3 800a428: 4b0d ldr r3, [pc, #52] ; (800a460 ) 800a42a: 681b ldr r3, [r3, #0] 800a42c: b29b uxth r3, r3 800a42e: 1ad3 subs r3, r2, r3 800a430: b29a uxth r2, r3 800a432: 687b ldr r3, [r7, #4] 800a434: 811a strh r2, [r3, #8] pbuf_realloc(cseg->p, cseg->len); 800a436: 687b ldr r3, [r7, #4] 800a438: 685a ldr r2, [r3, #4] 800a43a: 687b ldr r3, [r7, #4] 800a43c: 891b ldrh r3, [r3, #8] 800a43e: 4619 mov r1, r3 800a440: 4610 mov r0, r2 800a442: f7fc fc41 bl 8006cc8 } } cseg->next = next; 800a446: 687b ldr r3, [r7, #4] 800a448: 683a ldr r2, [r7, #0] 800a44a: 601a str r2, [r3, #0] } 800a44c: bf00 nop 800a44e: 3714 adds r7, #20 800a450: 46bd mov sp, r7 800a452: bd90 pop {r4, r7, pc} 800a454: 08013198 .word 0x08013198 800a458: 08013458 .word 0x08013458 800a45c: 080131e4 .word 0x080131e4 800a460: 24007ba8 .word 0x24007ba8 0800a464 : /** 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) { 800a464: b5b0 push {r4, r5, r7, lr} 800a466: b086 sub sp, #24 800a468: af00 add r7, sp, #0 800a46a: 60f8 str r0, [r7, #12] 800a46c: 60b9 str r1, [r7, #8] 800a46e: 607a str r2, [r7, #4] 800a470: 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 && 800a472: e03e b.n 800a4f2 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; 800a474: 68bb ldr r3, [r7, #8] 800a476: 617b str r3, [r7, #20] seg_list = seg_list->next; 800a478: 68bb ldr r3, [r7, #8] 800a47a: 681b ldr r3, [r3, #0] 800a47c: 60bb str r3, [r7, #8] clen = pbuf_clen(next->p); 800a47e: 697b ldr r3, [r7, #20] 800a480: 685b ldr r3, [r3, #4] 800a482: 4618 mov r0, r3 800a484: f7fc fe2e bl 80070e4 800a488: 4603 mov r3, r0 800a48a: 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)); 800a48c: 68fb ldr r3, [r7, #12] 800a48e: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66 800a492: 8a7a ldrh r2, [r7, #18] 800a494: 429a cmp r2, r3 800a496: d906 bls.n 800a4a6 800a498: 4b2a ldr r3, [pc, #168] ; (800a544 ) 800a49a: f240 4257 movw r2, #1111 ; 0x457 800a49e: 492a ldr r1, [pc, #168] ; (800a548 ) 800a4a0: 482a ldr r0, [pc, #168] ; (800a54c ) 800a4a2: f006 fb91 bl 8010bc8 pcb->snd_queuelen = (u16_t)(pcb->snd_queuelen - clen); 800a4a6: 68fb ldr r3, [r7, #12] 800a4a8: f8b3 2066 ldrh.w r2, [r3, #102] ; 0x66 800a4ac: 8a7b ldrh r3, [r7, #18] 800a4ae: 1ad3 subs r3, r2, r3 800a4b0: b29a uxth r2, r3 800a4b2: 68fb ldr r3, [r7, #12] 800a4b4: f8a3 2066 strh.w r2, [r3, #102] ; 0x66 recv_acked = (tcpwnd_size_t)(recv_acked + next->len); 800a4b8: 697b ldr r3, [r7, #20] 800a4ba: 891a ldrh r2, [r3, #8] 800a4bc: 4b24 ldr r3, [pc, #144] ; (800a550 ) 800a4be: 881b ldrh r3, [r3, #0] 800a4c0: 4413 add r3, r2 800a4c2: b29a uxth r2, r3 800a4c4: 4b22 ldr r3, [pc, #136] ; (800a550 ) 800a4c6: 801a strh r2, [r3, #0] tcp_seg_free(next); 800a4c8: 6978 ldr r0, [r7, #20] 800a4ca: f7fe f954 bl 8008776 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) { 800a4ce: 68fb ldr r3, [r7, #12] 800a4d0: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66 800a4d4: 2b00 cmp r3, #0 800a4d6: d00c beq.n 800a4f2 LWIP_ASSERT("tcp_receive: valid queue length", 800a4d8: 68bb ldr r3, [r7, #8] 800a4da: 2b00 cmp r3, #0 800a4dc: d109 bne.n 800a4f2 800a4de: 683b ldr r3, [r7, #0] 800a4e0: 2b00 cmp r3, #0 800a4e2: d106 bne.n 800a4f2 800a4e4: 4b17 ldr r3, [pc, #92] ; (800a544 ) 800a4e6: f240 4261 movw r2, #1121 ; 0x461 800a4ea: 491a ldr r1, [pc, #104] ; (800a554 ) 800a4ec: 4817 ldr r0, [pc, #92] ; (800a54c ) 800a4ee: f006 fb6b bl 8010bc8 while (seg_list != NULL && 800a4f2: 68bb ldr r3, [r7, #8] 800a4f4: 2b00 cmp r3, #0 800a4f6: d020 beq.n 800a53a TCP_SEQ_LEQ(lwip_ntohl(seg_list->tcphdr->seqno) + 800a4f8: 68bb ldr r3, [r7, #8] 800a4fa: 691b ldr r3, [r3, #16] 800a4fc: 685b ldr r3, [r3, #4] 800a4fe: 4618 mov r0, r3 800a500: f7fb f839 bl 8005576 800a504: 4604 mov r4, r0 800a506: 68bb ldr r3, [r7, #8] 800a508: 891b ldrh r3, [r3, #8] 800a50a: 461d mov r5, r3 800a50c: 68bb ldr r3, [r7, #8] 800a50e: 691b ldr r3, [r3, #16] 800a510: 899b ldrh r3, [r3, #12] 800a512: b29b uxth r3, r3 800a514: 4618 mov r0, r3 800a516: f7fb f819 bl 800554c 800a51a: 4603 mov r3, r0 800a51c: b2db uxtb r3, r3 800a51e: f003 0303 and.w r3, r3, #3 800a522: 2b00 cmp r3, #0 800a524: d001 beq.n 800a52a 800a526: 2301 movs r3, #1 800a528: e000 b.n 800a52c 800a52a: 2300 movs r3, #0 800a52c: 442b add r3, r5 800a52e: 18e2 adds r2, r4, r3 800a530: 4b09 ldr r3, [pc, #36] ; (800a558 ) 800a532: 681b ldr r3, [r3, #0] 800a534: 1ad3 subs r3, r2, r3 while (seg_list != NULL && 800a536: 2b00 cmp r3, #0 800a538: dd9c ble.n 800a474 seg_list != NULL || dbg_other_seg_list != NULL); } } return seg_list; 800a53a: 68bb ldr r3, [r7, #8] } 800a53c: 4618 mov r0, r3 800a53e: 3718 adds r7, #24 800a540: 46bd mov sp, r7 800a542: bdb0 pop {r4, r5, r7, pc} 800a544: 08013198 .word 0x08013198 800a548: 08013480 .word 0x08013480 800a54c: 080131e4 .word 0x080131e4 800a550: 24007bb0 .word 0x24007bb0 800a554: 080134a8 .word 0x080134a8 800a558: 24007bac .word 0x24007bac 0800a55c : * * Called from tcp_process(). */ static void tcp_receive(struct tcp_pcb *pcb) { 800a55c: b5b0 push {r4, r5, r7, lr} 800a55e: b094 sub sp, #80 ; 0x50 800a560: af00 add r7, sp, #0 800a562: 6078 str r0, [r7, #4] s16_t m; u32_t right_wnd_edge; int found_dupack = 0; 800a564: 2300 movs r3, #0 800a566: 64bb str r3, [r7, #72] ; 0x48 LWIP_ASSERT("tcp_receive: invalid pcb", pcb != NULL); 800a568: 687b ldr r3, [r7, #4] 800a56a: 2b00 cmp r3, #0 800a56c: d106 bne.n 800a57c 800a56e: 4b91 ldr r3, [pc, #580] ; (800a7b4 ) 800a570: f240 427b movw r2, #1147 ; 0x47b 800a574: 4990 ldr r1, [pc, #576] ; (800a7b8 ) 800a576: 4891 ldr r0, [pc, #580] ; (800a7bc ) 800a578: f006 fb26 bl 8010bc8 LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); 800a57c: 687b ldr r3, [r7, #4] 800a57e: 7d1b ldrb r3, [r3, #20] 800a580: 2b03 cmp r3, #3 800a582: d806 bhi.n 800a592 800a584: 4b8b ldr r3, [pc, #556] ; (800a7b4 ) 800a586: f240 427c movw r2, #1148 ; 0x47c 800a58a: 498d ldr r1, [pc, #564] ; (800a7c0 ) 800a58c: 488b ldr r0, [pc, #556] ; (800a7bc ) 800a58e: f006 fb1b bl 8010bc8 if (flags & TCP_ACK) { 800a592: 4b8c ldr r3, [pc, #560] ; (800a7c4 ) 800a594: 781b ldrb r3, [r3, #0] 800a596: f003 0310 and.w r3, r3, #16 800a59a: 2b00 cmp r3, #0 800a59c: f000 8264 beq.w 800aa68 right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; 800a5a0: 687b ldr r3, [r7, #4] 800a5a2: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60 800a5a6: 461a mov r2, r3 800a5a8: 687b ldr r3, [r7, #4] 800a5aa: 6d9b ldr r3, [r3, #88] ; 0x58 800a5ac: 4413 add r3, r2 800a5ae: 633b str r3, [r7, #48] ; 0x30 /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 800a5b0: 687b ldr r3, [r7, #4] 800a5b2: 6d5a ldr r2, [r3, #84] ; 0x54 800a5b4: 4b84 ldr r3, [pc, #528] ; (800a7c8 ) 800a5b6: 681b ldr r3, [r3, #0] 800a5b8: 1ad3 subs r3, r2, r3 800a5ba: 2b00 cmp r3, #0 800a5bc: db1b blt.n 800a5f6 (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 800a5be: 687b ldr r3, [r7, #4] 800a5c0: 6d5a ldr r2, [r3, #84] ; 0x54 800a5c2: 4b81 ldr r3, [pc, #516] ; (800a7c8 ) 800a5c4: 681b ldr r3, [r3, #0] if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 800a5c6: 429a cmp r2, r3 800a5c8: d106 bne.n 800a5d8 (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 800a5ca: 687b ldr r3, [r7, #4] 800a5cc: 6d9a ldr r2, [r3, #88] ; 0x58 800a5ce: 4b7f ldr r3, [pc, #508] ; (800a7cc ) 800a5d0: 681b ldr r3, [r3, #0] 800a5d2: 1ad3 subs r3, r2, r3 800a5d4: 2b00 cmp r3, #0 800a5d6: db0e blt.n 800a5f6 (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { 800a5d8: 687b ldr r3, [r7, #4] 800a5da: 6d9a ldr r2, [r3, #88] ; 0x58 800a5dc: 4b7b ldr r3, [pc, #492] ; (800a7cc ) 800a5de: 681b ldr r3, [r3, #0] (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 800a5e0: 429a cmp r2, r3 800a5e2: d125 bne.n 800a630 (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { 800a5e4: 4b7a ldr r3, [pc, #488] ; (800a7d0 ) 800a5e6: 681b ldr r3, [r3, #0] 800a5e8: 89db ldrh r3, [r3, #14] 800a5ea: b29a uxth r2, r3 800a5ec: 687b ldr r3, [r7, #4] 800a5ee: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60 800a5f2: 429a cmp r2, r3 800a5f4: d91c bls.n 800a630 pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd); 800a5f6: 4b76 ldr r3, [pc, #472] ; (800a7d0 ) 800a5f8: 681b ldr r3, [r3, #0] 800a5fa: 89db ldrh r3, [r3, #14] 800a5fc: b29a uxth r2, r3 800a5fe: 687b ldr r3, [r7, #4] 800a600: 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) { 800a604: 687b ldr r3, [r7, #4] 800a606: f8b3 2062 ldrh.w r2, [r3, #98] ; 0x62 800a60a: 687b ldr r3, [r7, #4] 800a60c: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60 800a610: 429a cmp r2, r3 800a612: d205 bcs.n 800a620 pcb->snd_wnd_max = pcb->snd_wnd; 800a614: 687b ldr r3, [r7, #4] 800a616: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60 800a61a: 687b ldr r3, [r7, #4] 800a61c: f8a3 2062 strh.w r2, [r3, #98] ; 0x62 } pcb->snd_wl1 = seqno; 800a620: 4b69 ldr r3, [pc, #420] ; (800a7c8 ) 800a622: 681a ldr r2, [r3, #0] 800a624: 687b ldr r3, [r7, #4] 800a626: 655a str r2, [r3, #84] ; 0x54 pcb->snd_wl2 = ackno; 800a628: 4b68 ldr r3, [pc, #416] ; (800a7cc ) 800a62a: 681a ldr r2, [r3, #0] 800a62c: 687b ldr r3, [r7, #4] 800a62e: 659a str r2, [r3, #88] ; 0x58 * If it only passes 1, should reset dupack counter * */ /* Clause 1 */ if (TCP_SEQ_LEQ(ackno, pcb->lastack)) { 800a630: 4b66 ldr r3, [pc, #408] ; (800a7cc ) 800a632: 681a ldr r2, [r3, #0] 800a634: 687b ldr r3, [r7, #4] 800a636: 6c5b ldr r3, [r3, #68] ; 0x44 800a638: 1ad3 subs r3, r2, r3 800a63a: 2b00 cmp r3, #0 800a63c: dc58 bgt.n 800a6f0 /* Clause 2 */ if (tcplen == 0) { 800a63e: 4b65 ldr r3, [pc, #404] ; (800a7d4 ) 800a640: 881b ldrh r3, [r3, #0] 800a642: 2b00 cmp r3, #0 800a644: d14b bne.n 800a6de /* Clause 3 */ if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge) { 800a646: 687b ldr r3, [r7, #4] 800a648: 6d9b ldr r3, [r3, #88] ; 0x58 800a64a: 687a ldr r2, [r7, #4] 800a64c: f8b2 2060 ldrh.w r2, [r2, #96] ; 0x60 800a650: 4413 add r3, r2 800a652: 6b3a ldr r2, [r7, #48] ; 0x30 800a654: 429a cmp r2, r3 800a656: d142 bne.n 800a6de /* Clause 4 */ if (pcb->rtime >= 0) { 800a658: 687b ldr r3, [r7, #4] 800a65a: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30 800a65e: 2b00 cmp r3, #0 800a660: db3d blt.n 800a6de /* Clause 5 */ if (pcb->lastack == ackno) { 800a662: 687b ldr r3, [r7, #4] 800a664: 6c5a ldr r2, [r3, #68] ; 0x44 800a666: 4b59 ldr r3, [pc, #356] ; (800a7cc ) 800a668: 681b ldr r3, [r3, #0] 800a66a: 429a cmp r2, r3 800a66c: d137 bne.n 800a6de found_dupack = 1; 800a66e: 2301 movs r3, #1 800a670: 64bb str r3, [r7, #72] ; 0x48 if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) { 800a672: 687b ldr r3, [r7, #4] 800a674: f893 3043 ldrb.w r3, [r3, #67] ; 0x43 800a678: 2bff cmp r3, #255 ; 0xff 800a67a: d007 beq.n 800a68c ++pcb->dupacks; 800a67c: 687b ldr r3, [r7, #4] 800a67e: f893 3043 ldrb.w r3, [r3, #67] ; 0x43 800a682: 3301 adds r3, #1 800a684: b2da uxtb r2, r3 800a686: 687b ldr r3, [r7, #4] 800a688: f883 2043 strb.w r2, [r3, #67] ; 0x43 } if (pcb->dupacks > 3) { 800a68c: 687b ldr r3, [r7, #4] 800a68e: f893 3043 ldrb.w r3, [r3, #67] ; 0x43 800a692: 2b03 cmp r3, #3 800a694: d91b bls.n 800a6ce /* Inflate the congestion window */ TCP_WND_INC(pcb->cwnd, pcb->mss); 800a696: 687b ldr r3, [r7, #4] 800a698: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 800a69c: 687b ldr r3, [r7, #4] 800a69e: 8e5b ldrh r3, [r3, #50] ; 0x32 800a6a0: 4413 add r3, r2 800a6a2: b29a uxth r2, r3 800a6a4: 687b ldr r3, [r7, #4] 800a6a6: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48 800a6aa: 429a cmp r2, r3 800a6ac: d30a bcc.n 800a6c4 800a6ae: 687b ldr r3, [r7, #4] 800a6b0: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 800a6b4: 687b ldr r3, [r7, #4] 800a6b6: 8e5b ldrh r3, [r3, #50] ; 0x32 800a6b8: 4413 add r3, r2 800a6ba: b29a uxth r2, r3 800a6bc: 687b ldr r3, [r7, #4] 800a6be: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 800a6c2: e004 b.n 800a6ce 800a6c4: 687b ldr r3, [r7, #4] 800a6c6: f64f 72ff movw r2, #65535 ; 0xffff 800a6ca: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 } if (pcb->dupacks >= 3) { 800a6ce: 687b ldr r3, [r7, #4] 800a6d0: f893 3043 ldrb.w r3, [r3, #67] ; 0x43 800a6d4: 2b02 cmp r3, #2 800a6d6: d902 bls.n 800a6de /* Do fast retransmit (checked via TF_INFR, not via dupacks count) */ tcp_rexmit_fast(pcb); 800a6d8: 6878 ldr r0, [r7, #4] 800a6da: f002 fbb1 bl 800ce40 } } } /* If Clause (1) or more is true, but not a duplicate ack, reset * count of consecutive duplicate acks */ if (!found_dupack) { 800a6de: 6cbb ldr r3, [r7, #72] ; 0x48 800a6e0: 2b00 cmp r3, #0 800a6e2: f040 8161 bne.w 800a9a8 pcb->dupacks = 0; 800a6e6: 687b ldr r3, [r7, #4] 800a6e8: 2200 movs r2, #0 800a6ea: f883 2043 strb.w r2, [r3, #67] ; 0x43 800a6ee: e15b b.n 800a9a8 } } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 800a6f0: 4b36 ldr r3, [pc, #216] ; (800a7cc ) 800a6f2: 681a ldr r2, [r3, #0] 800a6f4: 687b ldr r3, [r7, #4] 800a6f6: 6c5b ldr r3, [r3, #68] ; 0x44 800a6f8: 1ad3 subs r3, r2, r3 800a6fa: 3b01 subs r3, #1 800a6fc: 2b00 cmp r3, #0 800a6fe: f2c0 814e blt.w 800a99e 800a702: 4b32 ldr r3, [pc, #200] ; (800a7cc ) 800a704: 681a ldr r2, [r3, #0] 800a706: 687b ldr r3, [r7, #4] 800a708: 6d1b ldr r3, [r3, #80] ; 0x50 800a70a: 1ad3 subs r3, r2, r3 800a70c: 2b00 cmp r3, #0 800a70e: f300 8146 bgt.w 800a99e 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) { 800a712: 687b ldr r3, [r7, #4] 800a714: 8b5b ldrh r3, [r3, #26] 800a716: f003 0304 and.w r3, r3, #4 800a71a: 2b00 cmp r3, #0 800a71c: d010 beq.n 800a740 tcp_clear_flags(pcb, TF_INFR); 800a71e: 687b ldr r3, [r7, #4] 800a720: 8b5b ldrh r3, [r3, #26] 800a722: f023 0304 bic.w r3, r3, #4 800a726: b29a uxth r2, r3 800a728: 687b ldr r3, [r7, #4] 800a72a: 835a strh r2, [r3, #26] pcb->cwnd = pcb->ssthresh; 800a72c: 687b ldr r3, [r7, #4] 800a72e: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a 800a732: 687b ldr r3, [r7, #4] 800a734: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 pcb->bytes_acked = 0; 800a738: 687b ldr r3, [r7, #4] 800a73a: 2200 movs r2, #0 800a73c: f8a3 206a strh.w r2, [r3, #106] ; 0x6a } /* Reset the number of retransmissions. */ pcb->nrtx = 0; 800a740: 687b ldr r3, [r7, #4] 800a742: 2200 movs r2, #0 800a744: f883 2042 strb.w r2, [r3, #66] ; 0x42 /* Reset the retransmission time-out. */ pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv); 800a748: 687b ldr r3, [r7, #4] 800a74a: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c 800a74e: 10db asrs r3, r3, #3 800a750: b21b sxth r3, r3 800a752: b29a uxth r2, r3 800a754: 687b ldr r3, [r7, #4] 800a756: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e 800a75a: b29b uxth r3, r3 800a75c: 4413 add r3, r2 800a75e: b29b uxth r3, r3 800a760: b21a sxth r2, r3 800a762: 687b ldr r3, [r7, #4] 800a764: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 /* Record how much data this ACK acks */ acked = (tcpwnd_size_t)(ackno - pcb->lastack); 800a768: 4b18 ldr r3, [pc, #96] ; (800a7cc ) 800a76a: 681b ldr r3, [r3, #0] 800a76c: b29a uxth r2, r3 800a76e: 687b ldr r3, [r7, #4] 800a770: 6c5b ldr r3, [r3, #68] ; 0x44 800a772: b29b uxth r3, r3 800a774: 1ad3 subs r3, r2, r3 800a776: 85fb strh r3, [r7, #46] ; 0x2e /* Reset the fast retransmit variables. */ pcb->dupacks = 0; 800a778: 687b ldr r3, [r7, #4] 800a77a: 2200 movs r2, #0 800a77c: f883 2043 strb.w r2, [r3, #67] ; 0x43 pcb->lastack = ackno; 800a780: 4b12 ldr r3, [pc, #72] ; (800a7cc ) 800a782: 681a ldr r2, [r3, #0] 800a784: 687b ldr r3, [r7, #4] 800a786: 645a str r2, [r3, #68] ; 0x44 /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 800a788: 687b ldr r3, [r7, #4] 800a78a: 7d1b ldrb r3, [r3, #20] 800a78c: 2b03 cmp r3, #3 800a78e: f240 8097 bls.w 800a8c0 if (pcb->cwnd < pcb->ssthresh) { 800a792: 687b ldr r3, [r7, #4] 800a794: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 800a798: 687b ldr r3, [r7, #4] 800a79a: f8b3 304a ldrh.w r3, [r3, #74] ; 0x4a 800a79e: 429a cmp r2, r3 800a7a0: d245 bcs.n 800a82e tcpwnd_size_t increase; /* limit to 1 SMSS segment during period following RTO */ u8_t num_seg = (pcb->flags & TF_RTO) ? 1 : 2; 800a7a2: 687b ldr r3, [r7, #4] 800a7a4: 8b5b ldrh r3, [r3, #26] 800a7a6: f403 6300 and.w r3, r3, #2048 ; 0x800 800a7aa: 2b00 cmp r3, #0 800a7ac: d014 beq.n 800a7d8 800a7ae: 2301 movs r3, #1 800a7b0: e013 b.n 800a7da 800a7b2: bf00 nop 800a7b4: 08013198 .word 0x08013198 800a7b8: 080134c8 .word 0x080134c8 800a7bc: 080131e4 .word 0x080131e4 800a7c0: 080134e4 .word 0x080134e4 800a7c4: 24007bb4 .word 0x24007bb4 800a7c8: 24007ba8 .word 0x24007ba8 800a7cc: 24007bac .word 0x24007bac 800a7d0: 24007b98 .word 0x24007b98 800a7d4: 24007bb2 .word 0x24007bb2 800a7d8: 2302 movs r3, #2 800a7da: 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)); 800a7de: f897 302d ldrb.w r3, [r7, #45] ; 0x2d 800a7e2: b29a uxth r2, r3 800a7e4: 687b ldr r3, [r7, #4] 800a7e6: 8e5b ldrh r3, [r3, #50] ; 0x32 800a7e8: fb12 f303 smulbb r3, r2, r3 800a7ec: b29b uxth r3, r3 800a7ee: 8dfa ldrh r2, [r7, #46] ; 0x2e 800a7f0: 4293 cmp r3, r2 800a7f2: bf28 it cs 800a7f4: 4613 movcs r3, r2 800a7f6: 857b strh r3, [r7, #42] ; 0x2a TCP_WND_INC(pcb->cwnd, increase); 800a7f8: 687b ldr r3, [r7, #4] 800a7fa: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 800a7fe: 8d7b ldrh r3, [r7, #42] ; 0x2a 800a800: 4413 add r3, r2 800a802: b29a uxth r2, r3 800a804: 687b ldr r3, [r7, #4] 800a806: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48 800a80a: 429a cmp r2, r3 800a80c: d309 bcc.n 800a822 800a80e: 687b ldr r3, [r7, #4] 800a810: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 800a814: 8d7b ldrh r3, [r7, #42] ; 0x2a 800a816: 4413 add r3, r2 800a818: b29a uxth r2, r3 800a81a: 687b ldr r3, [r7, #4] 800a81c: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 800a820: e04e b.n 800a8c0 800a822: 687b ldr r3, [r7, #4] 800a824: f64f 72ff movw r2, #65535 ; 0xffff 800a828: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 800a82c: e048 b.n 800a8c0 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); 800a82e: 687b ldr r3, [r7, #4] 800a830: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a 800a834: 8dfb ldrh r3, [r7, #46] ; 0x2e 800a836: 4413 add r3, r2 800a838: b29a uxth r2, r3 800a83a: 687b ldr r3, [r7, #4] 800a83c: f8b3 306a ldrh.w r3, [r3, #106] ; 0x6a 800a840: 429a cmp r2, r3 800a842: d309 bcc.n 800a858 800a844: 687b ldr r3, [r7, #4] 800a846: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a 800a84a: 8dfb ldrh r3, [r7, #46] ; 0x2e 800a84c: 4413 add r3, r2 800a84e: b29a uxth r2, r3 800a850: 687b ldr r3, [r7, #4] 800a852: f8a3 206a strh.w r2, [r3, #106] ; 0x6a 800a856: e004 b.n 800a862 800a858: 687b ldr r3, [r7, #4] 800a85a: f64f 72ff movw r2, #65535 ; 0xffff 800a85e: f8a3 206a strh.w r2, [r3, #106] ; 0x6a if (pcb->bytes_acked >= pcb->cwnd) { 800a862: 687b ldr r3, [r7, #4] 800a864: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a 800a868: 687b ldr r3, [r7, #4] 800a86a: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48 800a86e: 429a cmp r2, r3 800a870: d326 bcc.n 800a8c0 pcb->bytes_acked = (tcpwnd_size_t)(pcb->bytes_acked - pcb->cwnd); 800a872: 687b ldr r3, [r7, #4] 800a874: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a 800a878: 687b ldr r3, [r7, #4] 800a87a: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48 800a87e: 1ad3 subs r3, r2, r3 800a880: b29a uxth r2, r3 800a882: 687b ldr r3, [r7, #4] 800a884: f8a3 206a strh.w r2, [r3, #106] ; 0x6a TCP_WND_INC(pcb->cwnd, pcb->mss); 800a888: 687b ldr r3, [r7, #4] 800a88a: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 800a88e: 687b ldr r3, [r7, #4] 800a890: 8e5b ldrh r3, [r3, #50] ; 0x32 800a892: 4413 add r3, r2 800a894: b29a uxth r2, r3 800a896: 687b ldr r3, [r7, #4] 800a898: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48 800a89c: 429a cmp r2, r3 800a89e: d30a bcc.n 800a8b6 800a8a0: 687b ldr r3, [r7, #4] 800a8a2: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 800a8a6: 687b ldr r3, [r7, #4] 800a8a8: 8e5b ldrh r3, [r3, #50] ; 0x32 800a8aa: 4413 add r3, r2 800a8ac: b29a uxth r2, r3 800a8ae: 687b ldr r3, [r7, #4] 800a8b0: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 800a8b4: e004 b.n 800a8c0 800a8b6: 687b ldr r3, [r7, #4] 800a8b8: f64f 72ff movw r2, #65535 ; 0xffff 800a8bc: 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); 800a8c0: 687b ldr r3, [r7, #4] 800a8c2: 6f19 ldr r1, [r3, #112] ; 0x70 800a8c4: 687b ldr r3, [r7, #4] 800a8c6: 6edb ldr r3, [r3, #108] ; 0x6c 800a8c8: 4a98 ldr r2, [pc, #608] ; (800ab2c ) 800a8ca: 6878 ldr r0, [r7, #4] 800a8cc: f7ff fdca bl 800a464 800a8d0: 4602 mov r2, r0 800a8d2: 687b ldr r3, [r7, #4] 800a8d4: 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); 800a8d6: 687b ldr r3, [r7, #4] 800a8d8: 6ed9 ldr r1, [r3, #108] ; 0x6c 800a8da: 687b ldr r3, [r7, #4] 800a8dc: 6f1b ldr r3, [r3, #112] ; 0x70 800a8de: 4a94 ldr r2, [pc, #592] ; (800ab30 ) 800a8e0: 6878 ldr r0, [r7, #4] 800a8e2: f7ff fdbf bl 800a464 800a8e6: 4602 mov r2, r0 800a8e8: 687b ldr r3, [r7, #4] 800a8ea: 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) { 800a8ec: 687b ldr r3, [r7, #4] 800a8ee: 6f1b ldr r3, [r3, #112] ; 0x70 800a8f0: 2b00 cmp r3, #0 800a8f2: d104 bne.n 800a8fe pcb->rtime = -1; 800a8f4: 687b ldr r3, [r7, #4] 800a8f6: f64f 72ff movw r2, #65535 ; 0xffff 800a8fa: 861a strh r2, [r3, #48] ; 0x30 800a8fc: e002 b.n 800a904 } else { pcb->rtime = 0; 800a8fe: 687b ldr r3, [r7, #4] 800a900: 2200 movs r2, #0 800a902: 861a strh r2, [r3, #48] ; 0x30 } pcb->polltmr = 0; 800a904: 687b ldr r3, [r7, #4] 800a906: 2200 movs r2, #0 800a908: 771a strb r2, [r3, #28] #if TCP_OVERSIZE if (pcb->unsent == NULL) { 800a90a: 687b ldr r3, [r7, #4] 800a90c: 6edb ldr r3, [r3, #108] ; 0x6c 800a90e: 2b00 cmp r3, #0 800a910: d103 bne.n 800a91a pcb->unsent_oversize = 0; 800a912: 687b ldr r3, [r7, #4] 800a914: 2200 movs r2, #0 800a916: 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); 800a91a: 687b ldr r3, [r7, #4] 800a91c: f8b3 2064 ldrh.w r2, [r3, #100] ; 0x64 800a920: 4b84 ldr r3, [pc, #528] ; (800ab34 ) 800a922: 881b ldrh r3, [r3, #0] 800a924: 4413 add r3, r2 800a926: b29a uxth r2, r3 800a928: 687b ldr r3, [r7, #4] 800a92a: f8a3 2064 strh.w r2, [r3, #100] ; 0x64 /* check if this ACK ends our retransmission of in-flight data */ if (pcb->flags & TF_RTO) { 800a92e: 687b ldr r3, [r7, #4] 800a930: 8b5b ldrh r3, [r3, #26] 800a932: f403 6300 and.w r3, r3, #2048 ; 0x800 800a936: 2b00 cmp r3, #0 800a938: d035 beq.n 800a9a6 /* 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) { 800a93a: 687b ldr r3, [r7, #4] 800a93c: 6f1b ldr r3, [r3, #112] ; 0x70 800a93e: 2b00 cmp r3, #0 800a940: d118 bne.n 800a974 if ((pcb->unsent == NULL) || 800a942: 687b ldr r3, [r7, #4] 800a944: 6edb ldr r3, [r3, #108] ; 0x6c 800a946: 2b00 cmp r3, #0 800a948: d00c beq.n 800a964 (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unsent->tcphdr->seqno)))) { 800a94a: 687b ldr r3, [r7, #4] 800a94c: 6cdc ldr r4, [r3, #76] ; 0x4c 800a94e: 687b ldr r3, [r7, #4] 800a950: 6edb ldr r3, [r3, #108] ; 0x6c 800a952: 691b ldr r3, [r3, #16] 800a954: 685b ldr r3, [r3, #4] 800a956: 4618 mov r0, r3 800a958: f7fa fe0d bl 8005576 800a95c: 4603 mov r3, r0 800a95e: 1ae3 subs r3, r4, r3 if ((pcb->unsent == NULL) || 800a960: 2b00 cmp r3, #0 800a962: dc20 bgt.n 800a9a6 tcp_clear_flags(pcb, TF_RTO); 800a964: 687b ldr r3, [r7, #4] 800a966: 8b5b ldrh r3, [r3, #26] 800a968: f423 6300 bic.w r3, r3, #2048 ; 0x800 800a96c: b29a uxth r2, r3 800a96e: 687b ldr r3, [r7, #4] 800a970: 835a strh r2, [r3, #26] } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 800a972: e018 b.n 800a9a6 } } else if (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unacked->tcphdr->seqno))) { 800a974: 687b ldr r3, [r7, #4] 800a976: 6cdc ldr r4, [r3, #76] ; 0x4c 800a978: 687b ldr r3, [r7, #4] 800a97a: 6f1b ldr r3, [r3, #112] ; 0x70 800a97c: 691b ldr r3, [r3, #16] 800a97e: 685b ldr r3, [r3, #4] 800a980: 4618 mov r0, r3 800a982: f7fa fdf8 bl 8005576 800a986: 4603 mov r3, r0 800a988: 1ae3 subs r3, r4, r3 800a98a: 2b00 cmp r3, #0 800a98c: dc0b bgt.n 800a9a6 tcp_clear_flags(pcb, TF_RTO); 800a98e: 687b ldr r3, [r7, #4] 800a990: 8b5b ldrh r3, [r3, #26] 800a992: f423 6300 bic.w r3, r3, #2048 ; 0x800 800a996: b29a uxth r2, r3 800a998: 687b ldr r3, [r7, #4] 800a99a: 835a strh r2, [r3, #26] } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 800a99c: e003 b.n 800a9a6 } } /* End of ACK for new data processing. */ } else { /* Out of sequence ACK, didn't really ack anything */ tcp_send_empty_ack(pcb); 800a99e: 6878 ldr r0, [r7, #4] 800a9a0: f002 fc3a bl 800d218 800a9a4: e000 b.n 800a9a8 } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 800a9a6: 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)) { 800a9a8: 687b ldr r3, [r7, #4] 800a9aa: 6b5b ldr r3, [r3, #52] ; 0x34 800a9ac: 2b00 cmp r3, #0 800a9ae: d05b beq.n 800aa68 800a9b0: 687b ldr r3, [r7, #4] 800a9b2: 6b9a ldr r2, [r3, #56] ; 0x38 800a9b4: 4b60 ldr r3, [pc, #384] ; (800ab38 ) 800a9b6: 681b ldr r3, [r3, #0] 800a9b8: 1ad3 subs r3, r2, r3 800a9ba: 2b00 cmp r3, #0 800a9bc: da54 bge.n 800aa68 /* 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); 800a9be: 4b5f ldr r3, [pc, #380] ; (800ab3c ) 800a9c0: 681b ldr r3, [r3, #0] 800a9c2: b29a uxth r2, r3 800a9c4: 687b ldr r3, [r7, #4] 800a9c6: 6b5b ldr r3, [r3, #52] ; 0x34 800a9c8: b29b uxth r3, r3 800a9ca: 1ad3 subs r3, r2, r3 800a9cc: b29b uxth r3, r3 800a9ce: 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)); 800a9d2: f8b7 204e ldrh.w r2, [r7, #78] ; 0x4e 800a9d6: 687b ldr r3, [r7, #4] 800a9d8: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c 800a9dc: 10db asrs r3, r3, #3 800a9de: b21b sxth r3, r3 800a9e0: b29b uxth r3, r3 800a9e2: 1ad3 subs r3, r2, r3 800a9e4: b29b uxth r3, r3 800a9e6: f8a7 304e strh.w r3, [r7, #78] ; 0x4e pcb->sa = (s16_t)(pcb->sa + m); 800a9ea: 687b ldr r3, [r7, #4] 800a9ec: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c 800a9f0: b29a uxth r2, r3 800a9f2: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e 800a9f6: 4413 add r3, r2 800a9f8: b29b uxth r3, r3 800a9fa: b21a sxth r2, r3 800a9fc: 687b ldr r3, [r7, #4] 800a9fe: 879a strh r2, [r3, #60] ; 0x3c if (m < 0) { 800aa00: f9b7 304e ldrsh.w r3, [r7, #78] ; 0x4e 800aa04: 2b00 cmp r3, #0 800aa06: da05 bge.n 800aa14 m = (s16_t) - m; 800aa08: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e 800aa0c: 425b negs r3, r3 800aa0e: b29b uxth r3, r3 800aa10: f8a7 304e strh.w r3, [r7, #78] ; 0x4e } m = (s16_t)(m - (pcb->sv >> 2)); 800aa14: f8b7 204e ldrh.w r2, [r7, #78] ; 0x4e 800aa18: 687b ldr r3, [r7, #4] 800aa1a: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e 800aa1e: 109b asrs r3, r3, #2 800aa20: b21b sxth r3, r3 800aa22: b29b uxth r3, r3 800aa24: 1ad3 subs r3, r2, r3 800aa26: b29b uxth r3, r3 800aa28: f8a7 304e strh.w r3, [r7, #78] ; 0x4e pcb->sv = (s16_t)(pcb->sv + m); 800aa2c: 687b ldr r3, [r7, #4] 800aa2e: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e 800aa32: b29a uxth r2, r3 800aa34: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e 800aa38: 4413 add r3, r2 800aa3a: b29b uxth r3, r3 800aa3c: b21a sxth r2, r3 800aa3e: 687b ldr r3, [r7, #4] 800aa40: 87da strh r2, [r3, #62] ; 0x3e pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv); 800aa42: 687b ldr r3, [r7, #4] 800aa44: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c 800aa48: 10db asrs r3, r3, #3 800aa4a: b21b sxth r3, r3 800aa4c: b29a uxth r2, r3 800aa4e: 687b ldr r3, [r7, #4] 800aa50: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e 800aa54: b29b uxth r3, r3 800aa56: 4413 add r3, r2 800aa58: b29b uxth r3, r3 800aa5a: b21a sxth r2, r3 800aa5c: 687b ldr r3, [r7, #4] 800aa5e: 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; 800aa62: 687b ldr r3, [r7, #4] 800aa64: 2200 movs r2, #0 800aa66: 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)) { 800aa68: 4b35 ldr r3, [pc, #212] ; (800ab40 ) 800aa6a: 881b ldrh r3, [r3, #0] 800aa6c: 2b00 cmp r3, #0 800aa6e: f000 84e2 beq.w 800b436 800aa72: 687b ldr r3, [r7, #4] 800aa74: 7d1b ldrb r3, [r3, #20] 800aa76: 2b06 cmp r3, #6 800aa78: f200 84dd bhi.w 800b436 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)) { 800aa7c: 687b ldr r3, [r7, #4] 800aa7e: 6a5a ldr r2, [r3, #36] ; 0x24 800aa80: 4b30 ldr r3, [pc, #192] ; (800ab44 ) 800aa82: 681b ldr r3, [r3, #0] 800aa84: 1ad3 subs r3, r2, r3 800aa86: 3b01 subs r3, #1 800aa88: 2b00 cmp r3, #0 800aa8a: f2c0 808f blt.w 800abac 800aa8e: 687b ldr r3, [r7, #4] 800aa90: 6a5a ldr r2, [r3, #36] ; 0x24 800aa92: 4b2b ldr r3, [pc, #172] ; (800ab40 ) 800aa94: 881b ldrh r3, [r3, #0] 800aa96: 4619 mov r1, r3 800aa98: 4b2a ldr r3, [pc, #168] ; (800ab44 ) 800aa9a: 681b ldr r3, [r3, #0] 800aa9c: 440b add r3, r1 800aa9e: 1ad3 subs r3, r2, r3 800aaa0: 3301 adds r3, #1 800aaa2: 2b00 cmp r3, #0 800aaa4: f300 8082 bgt.w 800abac 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; 800aaa8: 4b27 ldr r3, [pc, #156] ; (800ab48 ) 800aaaa: 685b ldr r3, [r3, #4] 800aaac: 647b str r3, [r7, #68] ; 0x44 u32_t off32 = pcb->rcv_nxt - seqno; 800aaae: 687b ldr r3, [r7, #4] 800aab0: 6a5a ldr r2, [r3, #36] ; 0x24 800aab2: 4b24 ldr r3, [pc, #144] ; (800ab44 ) 800aab4: 681b ldr r3, [r3, #0] 800aab6: 1ad3 subs r3, r2, r3 800aab8: 627b str r3, [r7, #36] ; 0x24 u16_t new_tot_len, off; LWIP_ASSERT("inseg.p != NULL", inseg.p); 800aaba: 4b23 ldr r3, [pc, #140] ; (800ab48 ) 800aabc: 685b ldr r3, [r3, #4] 800aabe: 2b00 cmp r3, #0 800aac0: d106 bne.n 800aad0 800aac2: 4b22 ldr r3, [pc, #136] ; (800ab4c ) 800aac4: f240 5294 movw r2, #1428 ; 0x594 800aac8: 4921 ldr r1, [pc, #132] ; (800ab50 ) 800aaca: 4822 ldr r0, [pc, #136] ; (800ab54 ) 800aacc: f006 f87c bl 8010bc8 LWIP_ASSERT("insane offset!", (off32 < 0xffff)); 800aad0: 6a7b ldr r3, [r7, #36] ; 0x24 800aad2: f64f 72fe movw r2, #65534 ; 0xfffe 800aad6: 4293 cmp r3, r2 800aad8: d906 bls.n 800aae8 800aada: 4b1c ldr r3, [pc, #112] ; (800ab4c ) 800aadc: f240 5295 movw r2, #1429 ; 0x595 800aae0: 491d ldr r1, [pc, #116] ; (800ab58 ) 800aae2: 481c ldr r0, [pc, #112] ; (800ab54 ) 800aae4: f006 f870 bl 8010bc8 off = (u16_t)off32; 800aae8: 6a7b ldr r3, [r7, #36] ; 0x24 800aaea: f8a7 3042 strh.w r3, [r7, #66] ; 0x42 LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); 800aaee: 4b16 ldr r3, [pc, #88] ; (800ab48 ) 800aaf0: 685b ldr r3, [r3, #4] 800aaf2: 891b ldrh r3, [r3, #8] 800aaf4: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42 800aaf8: 429a cmp r2, r3 800aafa: d906 bls.n 800ab0a 800aafc: 4b13 ldr r3, [pc, #76] ; (800ab4c ) 800aafe: f240 5297 movw r2, #1431 ; 0x597 800ab02: 4916 ldr r1, [pc, #88] ; (800ab5c ) 800ab04: 4813 ldr r0, [pc, #76] ; (800ab54 ) 800ab06: f006 f85f bl 8010bc8 inseg.len -= off; 800ab0a: 4b0f ldr r3, [pc, #60] ; (800ab48 ) 800ab0c: 891a ldrh r2, [r3, #8] 800ab0e: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42 800ab12: 1ad3 subs r3, r2, r3 800ab14: b29a uxth r2, r3 800ab16: 4b0c ldr r3, [pc, #48] ; (800ab48 ) 800ab18: 811a strh r2, [r3, #8] new_tot_len = (u16_t)(inseg.p->tot_len - off); 800ab1a: 4b0b ldr r3, [pc, #44] ; (800ab48 ) 800ab1c: 685b ldr r3, [r3, #4] 800ab1e: 891a ldrh r2, [r3, #8] 800ab20: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42 800ab24: 1ad3 subs r3, r2, r3 800ab26: 847b strh r3, [r7, #34] ; 0x22 while (p->len < off) { 800ab28: e02a b.n 800ab80 800ab2a: bf00 nop 800ab2c: 08013500 .word 0x08013500 800ab30: 08013508 .word 0x08013508 800ab34: 24007bb0 .word 0x24007bb0 800ab38: 24007bac .word 0x24007bac 800ab3c: 24007b6c .word 0x24007b6c 800ab40: 24007bb2 .word 0x24007bb2 800ab44: 24007ba8 .word 0x24007ba8 800ab48: 24007b84 .word 0x24007b84 800ab4c: 08013198 .word 0x08013198 800ab50: 08013510 .word 0x08013510 800ab54: 080131e4 .word 0x080131e4 800ab58: 08013520 .word 0x08013520 800ab5c: 08013530 .word 0x08013530 off -= p->len; 800ab60: 6c7b ldr r3, [r7, #68] ; 0x44 800ab62: 895b ldrh r3, [r3, #10] 800ab64: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42 800ab68: 1ad3 subs r3, r2, r3 800ab6a: 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; 800ab6e: 6c7b ldr r3, [r7, #68] ; 0x44 800ab70: 8c7a ldrh r2, [r7, #34] ; 0x22 800ab72: 811a strh r2, [r3, #8] p->len = 0; 800ab74: 6c7b ldr r3, [r7, #68] ; 0x44 800ab76: 2200 movs r2, #0 800ab78: 815a strh r2, [r3, #10] p = p->next; 800ab7a: 6c7b ldr r3, [r7, #68] ; 0x44 800ab7c: 681b ldr r3, [r3, #0] 800ab7e: 647b str r3, [r7, #68] ; 0x44 while (p->len < off) { 800ab80: 6c7b ldr r3, [r7, #68] ; 0x44 800ab82: 895b ldrh r3, [r3, #10] 800ab84: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42 800ab88: 429a cmp r2, r3 800ab8a: d8e9 bhi.n 800ab60 } /* cannot fail... */ pbuf_remove_header(p, off); 800ab8c: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42 800ab90: 4619 mov r1, r3 800ab92: 6c78 ldr r0, [r7, #68] ; 0x44 800ab94: f7fc f998 bl 8006ec8 inseg.tcphdr->seqno = seqno = pcb->rcv_nxt; 800ab98: 687b ldr r3, [r7, #4] 800ab9a: 6a5b ldr r3, [r3, #36] ; 0x24 800ab9c: 4a91 ldr r2, [pc, #580] ; (800ade4 ) 800ab9e: 6013 str r3, [r2, #0] 800aba0: 4b91 ldr r3, [pc, #580] ; (800ade8 ) 800aba2: 691b ldr r3, [r3, #16] 800aba4: 4a8f ldr r2, [pc, #572] ; (800ade4 ) 800aba6: 6812 ldr r2, [r2, #0] 800aba8: 605a str r2, [r3, #4] if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) { 800abaa: e00d b.n 800abc8 } else { if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) { 800abac: 4b8d ldr r3, [pc, #564] ; (800ade4 ) 800abae: 681a ldr r2, [r3, #0] 800abb0: 687b ldr r3, [r7, #4] 800abb2: 6a5b ldr r3, [r3, #36] ; 0x24 800abb4: 1ad3 subs r3, r2, r3 800abb6: 2b00 cmp r3, #0 800abb8: da06 bge.n 800abc8 /* 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); 800abba: 687b ldr r3, [r7, #4] 800abbc: 8b5b ldrh r3, [r3, #26] 800abbe: f043 0302 orr.w r3, r3, #2 800abc2: b29a uxth r2, r3 800abc4: 687b ldr r3, [r7, #4] 800abc6: 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, 800abc8: 4b86 ldr r3, [pc, #536] ; (800ade4 ) 800abca: 681a ldr r2, [r3, #0] 800abcc: 687b ldr r3, [r7, #4] 800abce: 6a5b ldr r3, [r3, #36] ; 0x24 800abd0: 1ad3 subs r3, r2, r3 800abd2: 2b00 cmp r3, #0 800abd4: f2c0 842a blt.w 800b42c 800abd8: 4b82 ldr r3, [pc, #520] ; (800ade4 ) 800abda: 681a ldr r2, [r3, #0] 800abdc: 687b ldr r3, [r7, #4] 800abde: 6a5b ldr r3, [r3, #36] ; 0x24 800abe0: 6879 ldr r1, [r7, #4] 800abe2: 8d09 ldrh r1, [r1, #40] ; 0x28 800abe4: 440b add r3, r1 800abe6: 1ad3 subs r3, r2, r3 800abe8: 3301 adds r3, #1 800abea: 2b00 cmp r3, #0 800abec: f300 841e bgt.w 800b42c pcb->rcv_nxt + pcb->rcv_wnd - 1)) { if (pcb->rcv_nxt == seqno) { 800abf0: 687b ldr r3, [r7, #4] 800abf2: 6a5a ldr r2, [r3, #36] ; 0x24 800abf4: 4b7b ldr r3, [pc, #492] ; (800ade4 ) 800abf6: 681b ldr r3, [r3, #0] 800abf8: 429a cmp r2, r3 800abfa: f040 829a bne.w 800b132 /* 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); 800abfe: 4b7a ldr r3, [pc, #488] ; (800ade8 ) 800ac00: 891c ldrh r4, [r3, #8] 800ac02: 4b79 ldr r3, [pc, #484] ; (800ade8 ) 800ac04: 691b ldr r3, [r3, #16] 800ac06: 899b ldrh r3, [r3, #12] 800ac08: b29b uxth r3, r3 800ac0a: 4618 mov r0, r3 800ac0c: f7fa fc9e bl 800554c 800ac10: 4603 mov r3, r0 800ac12: b2db uxtb r3, r3 800ac14: f003 0303 and.w r3, r3, #3 800ac18: 2b00 cmp r3, #0 800ac1a: d001 beq.n 800ac20 800ac1c: 2301 movs r3, #1 800ac1e: e000 b.n 800ac22 800ac20: 2300 movs r3, #0 800ac22: 4423 add r3, r4 800ac24: b29a uxth r2, r3 800ac26: 4b71 ldr r3, [pc, #452] ; (800adec ) 800ac28: 801a strh r2, [r3, #0] if (tcplen > pcb->rcv_wnd) { 800ac2a: 687b ldr r3, [r7, #4] 800ac2c: 8d1a ldrh r2, [r3, #40] ; 0x28 800ac2e: 4b6f ldr r3, [pc, #444] ; (800adec ) 800ac30: 881b ldrh r3, [r3, #0] 800ac32: 429a cmp r2, r3 800ac34: d275 bcs.n 800ad22 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) { 800ac36: 4b6c ldr r3, [pc, #432] ; (800ade8 ) 800ac38: 691b ldr r3, [r3, #16] 800ac3a: 899b ldrh r3, [r3, #12] 800ac3c: b29b uxth r3, r3 800ac3e: 4618 mov r0, r3 800ac40: f7fa fc84 bl 800554c 800ac44: 4603 mov r3, r0 800ac46: b2db uxtb r3, r3 800ac48: f003 0301 and.w r3, r3, #1 800ac4c: 2b00 cmp r3, #0 800ac4e: d01f beq.n 800ac90 /* 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); 800ac50: 4b65 ldr r3, [pc, #404] ; (800ade8 ) 800ac52: 691b ldr r3, [r3, #16] 800ac54: 899b ldrh r3, [r3, #12] 800ac56: b29b uxth r3, r3 800ac58: b21b sxth r3, r3 800ac5a: f423 537c bic.w r3, r3, #16128 ; 0x3f00 800ac5e: b21c sxth r4, r3 800ac60: 4b61 ldr r3, [pc, #388] ; (800ade8 ) 800ac62: 691b ldr r3, [r3, #16] 800ac64: 899b ldrh r3, [r3, #12] 800ac66: b29b uxth r3, r3 800ac68: 4618 mov r0, r3 800ac6a: f7fa fc6f bl 800554c 800ac6e: 4603 mov r3, r0 800ac70: b2db uxtb r3, r3 800ac72: b29b uxth r3, r3 800ac74: f003 033e and.w r3, r3, #62 ; 0x3e 800ac78: b29b uxth r3, r3 800ac7a: 4618 mov r0, r3 800ac7c: f7fa fc66 bl 800554c 800ac80: 4603 mov r3, r0 800ac82: b21b sxth r3, r3 800ac84: 4323 orrs r3, r4 800ac86: b21a sxth r2, r3 800ac88: 4b57 ldr r3, [pc, #348] ; (800ade8 ) 800ac8a: 691b ldr r3, [r3, #16] 800ac8c: b292 uxth r2, r2 800ac8e: 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; 800ac90: 687b ldr r3, [r7, #4] 800ac92: 8d1a ldrh r2, [r3, #40] ; 0x28 800ac94: 4b54 ldr r3, [pc, #336] ; (800ade8 ) 800ac96: 811a strh r2, [r3, #8] if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { 800ac98: 4b53 ldr r3, [pc, #332] ; (800ade8 ) 800ac9a: 691b ldr r3, [r3, #16] 800ac9c: 899b ldrh r3, [r3, #12] 800ac9e: b29b uxth r3, r3 800aca0: 4618 mov r0, r3 800aca2: f7fa fc53 bl 800554c 800aca6: 4603 mov r3, r0 800aca8: b2db uxtb r3, r3 800acaa: f003 0302 and.w r3, r3, #2 800acae: 2b00 cmp r3, #0 800acb0: d005 beq.n 800acbe inseg.len -= 1; 800acb2: 4b4d ldr r3, [pc, #308] ; (800ade8 ) 800acb4: 891b ldrh r3, [r3, #8] 800acb6: 3b01 subs r3, #1 800acb8: b29a uxth r2, r3 800acba: 4b4b ldr r3, [pc, #300] ; (800ade8 ) 800acbc: 811a strh r2, [r3, #8] } pbuf_realloc(inseg.p, inseg.len); 800acbe: 4b4a ldr r3, [pc, #296] ; (800ade8 ) 800acc0: 685b ldr r3, [r3, #4] 800acc2: 4a49 ldr r2, [pc, #292] ; (800ade8 ) 800acc4: 8912 ldrh r2, [r2, #8] 800acc6: 4611 mov r1, r2 800acc8: 4618 mov r0, r3 800acca: f7fb fffd bl 8006cc8 tcplen = TCP_TCPLEN(&inseg); 800acce: 4b46 ldr r3, [pc, #280] ; (800ade8 ) 800acd0: 891c ldrh r4, [r3, #8] 800acd2: 4b45 ldr r3, [pc, #276] ; (800ade8 ) 800acd4: 691b ldr r3, [r3, #16] 800acd6: 899b ldrh r3, [r3, #12] 800acd8: b29b uxth r3, r3 800acda: 4618 mov r0, r3 800acdc: f7fa fc36 bl 800554c 800ace0: 4603 mov r3, r0 800ace2: b2db uxtb r3, r3 800ace4: f003 0303 and.w r3, r3, #3 800ace8: 2b00 cmp r3, #0 800acea: d001 beq.n 800acf0 800acec: 2301 movs r3, #1 800acee: e000 b.n 800acf2 800acf0: 2300 movs r3, #0 800acf2: 4423 add r3, r4 800acf4: b29a uxth r2, r3 800acf6: 4b3d ldr r3, [pc, #244] ; (800adec ) 800acf8: 801a strh r2, [r3, #0] LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", 800acfa: 4b3c ldr r3, [pc, #240] ; (800adec ) 800acfc: 881b ldrh r3, [r3, #0] 800acfe: 461a mov r2, r3 800ad00: 4b38 ldr r3, [pc, #224] ; (800ade4 ) 800ad02: 681b ldr r3, [r3, #0] 800ad04: 441a add r2, r3 800ad06: 687b ldr r3, [r7, #4] 800ad08: 6a5b ldr r3, [r3, #36] ; 0x24 800ad0a: 6879 ldr r1, [r7, #4] 800ad0c: 8d09 ldrh r1, [r1, #40] ; 0x28 800ad0e: 440b add r3, r1 800ad10: 429a cmp r2, r3 800ad12: d006 beq.n 800ad22 800ad14: 4b36 ldr r3, [pc, #216] ; (800adf0 ) 800ad16: f240 52cb movw r2, #1483 ; 0x5cb 800ad1a: 4936 ldr r1, [pc, #216] ; (800adf4 ) 800ad1c: 4836 ldr r0, [pc, #216] ; (800adf8 ) 800ad1e: f005 ff53 bl 8010bc8 } #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) { 800ad22: 687b ldr r3, [r7, #4] 800ad24: 6f5b ldr r3, [r3, #116] ; 0x74 800ad26: 2b00 cmp r3, #0 800ad28: f000 80e7 beq.w 800aefa if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 800ad2c: 4b2e ldr r3, [pc, #184] ; (800ade8 ) 800ad2e: 691b ldr r3, [r3, #16] 800ad30: 899b ldrh r3, [r3, #12] 800ad32: b29b uxth r3, r3 800ad34: 4618 mov r0, r3 800ad36: f7fa fc09 bl 800554c 800ad3a: 4603 mov r3, r0 800ad3c: b2db uxtb r3, r3 800ad3e: f003 0301 and.w r3, r3, #1 800ad42: 2b00 cmp r3, #0 800ad44: d010 beq.n 800ad68 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) { 800ad46: e00a b.n 800ad5e struct tcp_seg *old_ooseq = pcb->ooseq; 800ad48: 687b ldr r3, [r7, #4] 800ad4a: 6f5b ldr r3, [r3, #116] ; 0x74 800ad4c: 60fb str r3, [r7, #12] pcb->ooseq = pcb->ooseq->next; 800ad4e: 687b ldr r3, [r7, #4] 800ad50: 6f5b ldr r3, [r3, #116] ; 0x74 800ad52: 681a ldr r2, [r3, #0] 800ad54: 687b ldr r3, [r7, #4] 800ad56: 675a str r2, [r3, #116] ; 0x74 tcp_seg_free(old_ooseq); 800ad58: 68f8 ldr r0, [r7, #12] 800ad5a: f7fd fd0c bl 8008776 while (pcb->ooseq != NULL) { 800ad5e: 687b ldr r3, [r7, #4] 800ad60: 6f5b ldr r3, [r3, #116] ; 0x74 800ad62: 2b00 cmp r3, #0 800ad64: d1f0 bne.n 800ad48 800ad66: e0c8 b.n 800aefa } } else { struct tcp_seg *next = pcb->ooseq; 800ad68: 687b ldr r3, [r7, #4] 800ad6a: 6f5b ldr r3, [r3, #116] ; 0x74 800ad6c: 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 && 800ad6e: e052 b.n 800ae16 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 && 800ad70: 6bfb ldr r3, [r7, #60] ; 0x3c 800ad72: 691b ldr r3, [r3, #16] 800ad74: 899b ldrh r3, [r3, #12] 800ad76: b29b uxth r3, r3 800ad78: 4618 mov r0, r3 800ad7a: f7fa fbe7 bl 800554c 800ad7e: 4603 mov r3, r0 800ad80: b2db uxtb r3, r3 800ad82: f003 0301 and.w r3, r3, #1 800ad86: 2b00 cmp r3, #0 800ad88: d03d beq.n 800ae06 (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) == 0) { 800ad8a: 4b17 ldr r3, [pc, #92] ; (800ade8 ) 800ad8c: 691b ldr r3, [r3, #16] 800ad8e: 899b ldrh r3, [r3, #12] 800ad90: b29b uxth r3, r3 800ad92: 4618 mov r0, r3 800ad94: f7fa fbda bl 800554c 800ad98: 4603 mov r3, r0 800ad9a: b2db uxtb r3, r3 800ad9c: f003 0302 and.w r3, r3, #2 if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 && 800ada0: 2b00 cmp r3, #0 800ada2: d130 bne.n 800ae06 TCPH_SET_FLAG(inseg.tcphdr, TCP_FIN); 800ada4: 4b10 ldr r3, [pc, #64] ; (800ade8 ) 800ada6: 691b ldr r3, [r3, #16] 800ada8: 899b ldrh r3, [r3, #12] 800adaa: b29c uxth r4, r3 800adac: 2001 movs r0, #1 800adae: f7fa fbcd bl 800554c 800adb2: 4603 mov r3, r0 800adb4: 461a mov r2, r3 800adb6: 4b0c ldr r3, [pc, #48] ; (800ade8 ) 800adb8: 691b ldr r3, [r3, #16] 800adba: 4322 orrs r2, r4 800adbc: b292 uxth r2, r2 800adbe: 819a strh r2, [r3, #12] tcplen = TCP_TCPLEN(&inseg); 800adc0: 4b09 ldr r3, [pc, #36] ; (800ade8 ) 800adc2: 891c ldrh r4, [r3, #8] 800adc4: 4b08 ldr r3, [pc, #32] ; (800ade8 ) 800adc6: 691b ldr r3, [r3, #16] 800adc8: 899b ldrh r3, [r3, #12] 800adca: b29b uxth r3, r3 800adcc: 4618 mov r0, r3 800adce: f7fa fbbd bl 800554c 800add2: 4603 mov r3, r0 800add4: b2db uxtb r3, r3 800add6: f003 0303 and.w r3, r3, #3 800adda: 2b00 cmp r3, #0 800addc: d00e beq.n 800adfc 800adde: 2301 movs r3, #1 800ade0: e00d b.n 800adfe 800ade2: bf00 nop 800ade4: 24007ba8 .word 0x24007ba8 800ade8: 24007b84 .word 0x24007b84 800adec: 24007bb2 .word 0x24007bb2 800adf0: 08013198 .word 0x08013198 800adf4: 08013540 .word 0x08013540 800adf8: 080131e4 .word 0x080131e4 800adfc: 2300 movs r3, #0 800adfe: 4423 add r3, r4 800ae00: b29a uxth r2, r3 800ae02: 4b98 ldr r3, [pc, #608] ; (800b064 ) 800ae04: 801a strh r2, [r3, #0] } tmp = next; 800ae06: 6bfb ldr r3, [r7, #60] ; 0x3c 800ae08: 613b str r3, [r7, #16] next = next->next; 800ae0a: 6bfb ldr r3, [r7, #60] ; 0x3c 800ae0c: 681b ldr r3, [r3, #0] 800ae0e: 63fb str r3, [r7, #60] ; 0x3c tcp_seg_free(tmp); 800ae10: 6938 ldr r0, [r7, #16] 800ae12: f7fd fcb0 bl 8008776 while (next && 800ae16: 6bfb ldr r3, [r7, #60] ; 0x3c 800ae18: 2b00 cmp r3, #0 800ae1a: d00e beq.n 800ae3a TCP_SEQ_GEQ(seqno + tcplen, 800ae1c: 4b91 ldr r3, [pc, #580] ; (800b064 ) 800ae1e: 881b ldrh r3, [r3, #0] 800ae20: 461a mov r2, r3 800ae22: 4b91 ldr r3, [pc, #580] ; (800b068 ) 800ae24: 681b ldr r3, [r3, #0] 800ae26: 441a add r2, r3 800ae28: 6bfb ldr r3, [r7, #60] ; 0x3c 800ae2a: 691b ldr r3, [r3, #16] 800ae2c: 685b ldr r3, [r3, #4] 800ae2e: 6bf9 ldr r1, [r7, #60] ; 0x3c 800ae30: 8909 ldrh r1, [r1, #8] 800ae32: 440b add r3, r1 800ae34: 1ad3 subs r3, r2, r3 while (next && 800ae36: 2b00 cmp r3, #0 800ae38: da9a bge.n 800ad70 } /* Now trim right side of inseg if it overlaps with the first * segment on ooseq */ if (next && 800ae3a: 6bfb ldr r3, [r7, #60] ; 0x3c 800ae3c: 2b00 cmp r3, #0 800ae3e: d059 beq.n 800aef4 TCP_SEQ_GT(seqno + tcplen, 800ae40: 4b88 ldr r3, [pc, #544] ; (800b064 ) 800ae42: 881b ldrh r3, [r3, #0] 800ae44: 461a mov r2, r3 800ae46: 4b88 ldr r3, [pc, #544] ; (800b068 ) 800ae48: 681b ldr r3, [r3, #0] 800ae4a: 441a add r2, r3 800ae4c: 6bfb ldr r3, [r7, #60] ; 0x3c 800ae4e: 691b ldr r3, [r3, #16] 800ae50: 685b ldr r3, [r3, #4] 800ae52: 1ad3 subs r3, r2, r3 if (next && 800ae54: 2b00 cmp r3, #0 800ae56: dd4d ble.n 800aef4 next->tcphdr->seqno)) { /* inseg cannot have FIN here (already processed above) */ inseg.len = (u16_t)(next->tcphdr->seqno - seqno); 800ae58: 6bfb ldr r3, [r7, #60] ; 0x3c 800ae5a: 691b ldr r3, [r3, #16] 800ae5c: 685b ldr r3, [r3, #4] 800ae5e: b29a uxth r2, r3 800ae60: 4b81 ldr r3, [pc, #516] ; (800b068 ) 800ae62: 681b ldr r3, [r3, #0] 800ae64: b29b uxth r3, r3 800ae66: 1ad3 subs r3, r2, r3 800ae68: b29a uxth r2, r3 800ae6a: 4b80 ldr r3, [pc, #512] ; (800b06c ) 800ae6c: 811a strh r2, [r3, #8] if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { 800ae6e: 4b7f ldr r3, [pc, #508] ; (800b06c ) 800ae70: 691b ldr r3, [r3, #16] 800ae72: 899b ldrh r3, [r3, #12] 800ae74: b29b uxth r3, r3 800ae76: 4618 mov r0, r3 800ae78: f7fa fb68 bl 800554c 800ae7c: 4603 mov r3, r0 800ae7e: b2db uxtb r3, r3 800ae80: f003 0302 and.w r3, r3, #2 800ae84: 2b00 cmp r3, #0 800ae86: d005 beq.n 800ae94 inseg.len -= 1; 800ae88: 4b78 ldr r3, [pc, #480] ; (800b06c ) 800ae8a: 891b ldrh r3, [r3, #8] 800ae8c: 3b01 subs r3, #1 800ae8e: b29a uxth r2, r3 800ae90: 4b76 ldr r3, [pc, #472] ; (800b06c ) 800ae92: 811a strh r2, [r3, #8] } pbuf_realloc(inseg.p, inseg.len); 800ae94: 4b75 ldr r3, [pc, #468] ; (800b06c ) 800ae96: 685b ldr r3, [r3, #4] 800ae98: 4a74 ldr r2, [pc, #464] ; (800b06c ) 800ae9a: 8912 ldrh r2, [r2, #8] 800ae9c: 4611 mov r1, r2 800ae9e: 4618 mov r0, r3 800aea0: f7fb ff12 bl 8006cc8 tcplen = TCP_TCPLEN(&inseg); 800aea4: 4b71 ldr r3, [pc, #452] ; (800b06c ) 800aea6: 891c ldrh r4, [r3, #8] 800aea8: 4b70 ldr r3, [pc, #448] ; (800b06c ) 800aeaa: 691b ldr r3, [r3, #16] 800aeac: 899b ldrh r3, [r3, #12] 800aeae: b29b uxth r3, r3 800aeb0: 4618 mov r0, r3 800aeb2: f7fa fb4b bl 800554c 800aeb6: 4603 mov r3, r0 800aeb8: b2db uxtb r3, r3 800aeba: f003 0303 and.w r3, r3, #3 800aebe: 2b00 cmp r3, #0 800aec0: d001 beq.n 800aec6 800aec2: 2301 movs r3, #1 800aec4: e000 b.n 800aec8 800aec6: 2300 movs r3, #0 800aec8: 4423 add r3, r4 800aeca: b29a uxth r2, r3 800aecc: 4b65 ldr r3, [pc, #404] ; (800b064 ) 800aece: 801a strh r2, [r3, #0] LWIP_ASSERT("tcp_receive: segment not trimmed correctly to ooseq queue\n", 800aed0: 4b64 ldr r3, [pc, #400] ; (800b064 ) 800aed2: 881b ldrh r3, [r3, #0] 800aed4: 461a mov r2, r3 800aed6: 4b64 ldr r3, [pc, #400] ; (800b068 ) 800aed8: 681b ldr r3, [r3, #0] 800aeda: 441a add r2, r3 800aedc: 6bfb ldr r3, [r7, #60] ; 0x3c 800aede: 691b ldr r3, [r3, #16] 800aee0: 685b ldr r3, [r3, #4] 800aee2: 429a cmp r2, r3 800aee4: d006 beq.n 800aef4 800aee6: 4b62 ldr r3, [pc, #392] ; (800b070 ) 800aee8: f240 52fc movw r2, #1532 ; 0x5fc 800aeec: 4961 ldr r1, [pc, #388] ; (800b074 ) 800aeee: 4862 ldr r0, [pc, #392] ; (800b078 ) 800aef0: f005 fe6a bl 8010bc8 (seqno + tcplen) == next->tcphdr->seqno); } pcb->ooseq = next; 800aef4: 687b ldr r3, [r7, #4] 800aef6: 6bfa ldr r2, [r7, #60] ; 0x3c 800aef8: 675a str r2, [r3, #116] ; 0x74 } } #endif /* TCP_QUEUE_OOSEQ */ pcb->rcv_nxt = seqno + tcplen; 800aefa: 4b5a ldr r3, [pc, #360] ; (800b064 ) 800aefc: 881b ldrh r3, [r3, #0] 800aefe: 461a mov r2, r3 800af00: 4b59 ldr r3, [pc, #356] ; (800b068 ) 800af02: 681b ldr r3, [r3, #0] 800af04: 441a add r2, r3 800af06: 687b ldr r3, [r7, #4] 800af08: 625a str r2, [r3, #36] ; 0x24 /* Update the receiver's (our) window. */ LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen); 800af0a: 687b ldr r3, [r7, #4] 800af0c: 8d1a ldrh r2, [r3, #40] ; 0x28 800af0e: 4b55 ldr r3, [pc, #340] ; (800b064 ) 800af10: 881b ldrh r3, [r3, #0] 800af12: 429a cmp r2, r3 800af14: d206 bcs.n 800af24 800af16: 4b56 ldr r3, [pc, #344] ; (800b070 ) 800af18: f240 6207 movw r2, #1543 ; 0x607 800af1c: 4957 ldr r1, [pc, #348] ; (800b07c ) 800af1e: 4856 ldr r0, [pc, #344] ; (800b078 ) 800af20: f005 fe52 bl 8010bc8 pcb->rcv_wnd -= tcplen; 800af24: 687b ldr r3, [r7, #4] 800af26: 8d1a ldrh r2, [r3, #40] ; 0x28 800af28: 4b4e ldr r3, [pc, #312] ; (800b064 ) 800af2a: 881b ldrh r3, [r3, #0] 800af2c: 1ad3 subs r3, r2, r3 800af2e: b29a uxth r2, r3 800af30: 687b ldr r3, [r7, #4] 800af32: 851a strh r2, [r3, #40] ; 0x28 tcp_update_rcv_ann_wnd(pcb); 800af34: 6878 ldr r0, [r7, #4] 800af36: f7fc fde1 bl 8007afc 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) { 800af3a: 4b4c ldr r3, [pc, #304] ; (800b06c ) 800af3c: 685b ldr r3, [r3, #4] 800af3e: 891b ldrh r3, [r3, #8] 800af40: 2b00 cmp r3, #0 800af42: d006 beq.n 800af52 recv_data = inseg.p; 800af44: 4b49 ldr r3, [pc, #292] ; (800b06c ) 800af46: 685b ldr r3, [r3, #4] 800af48: 4a4d ldr r2, [pc, #308] ; (800b080 ) 800af4a: 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; 800af4c: 4b47 ldr r3, [pc, #284] ; (800b06c ) 800af4e: 2200 movs r2, #0 800af50: 605a str r2, [r3, #4] } if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 800af52: 4b46 ldr r3, [pc, #280] ; (800b06c ) 800af54: 691b ldr r3, [r3, #16] 800af56: 899b ldrh r3, [r3, #12] 800af58: b29b uxth r3, r3 800af5a: 4618 mov r0, r3 800af5c: f7fa faf6 bl 800554c 800af60: 4603 mov r3, r0 800af62: b2db uxtb r3, r3 800af64: f003 0301 and.w r3, r3, #1 800af68: 2b00 cmp r3, #0 800af6a: f000 80b8 beq.w 800b0de LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n")); recv_flags |= TF_GOT_FIN; 800af6e: 4b45 ldr r3, [pc, #276] ; (800b084 ) 800af70: 781b ldrb r3, [r3, #0] 800af72: f043 0320 orr.w r3, r3, #32 800af76: b2da uxtb r2, r3 800af78: 4b42 ldr r3, [pc, #264] ; (800b084 ) 800af7a: 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 && 800af7c: e0af b.n 800b0de pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) { struct tcp_seg *cseg = pcb->ooseq; 800af7e: 687b ldr r3, [r7, #4] 800af80: 6f5b ldr r3, [r3, #116] ; 0x74 800af82: 60bb str r3, [r7, #8] seqno = pcb->ooseq->tcphdr->seqno; 800af84: 687b ldr r3, [r7, #4] 800af86: 6f5b ldr r3, [r3, #116] ; 0x74 800af88: 691b ldr r3, [r3, #16] 800af8a: 685b ldr r3, [r3, #4] 800af8c: 4a36 ldr r2, [pc, #216] ; (800b068 ) 800af8e: 6013 str r3, [r2, #0] pcb->rcv_nxt += TCP_TCPLEN(cseg); 800af90: 68bb ldr r3, [r7, #8] 800af92: 891b ldrh r3, [r3, #8] 800af94: 461c mov r4, r3 800af96: 68bb ldr r3, [r7, #8] 800af98: 691b ldr r3, [r3, #16] 800af9a: 899b ldrh r3, [r3, #12] 800af9c: b29b uxth r3, r3 800af9e: 4618 mov r0, r3 800afa0: f7fa fad4 bl 800554c 800afa4: 4603 mov r3, r0 800afa6: b2db uxtb r3, r3 800afa8: f003 0303 and.w r3, r3, #3 800afac: 2b00 cmp r3, #0 800afae: d001 beq.n 800afb4 800afb0: 2301 movs r3, #1 800afb2: e000 b.n 800afb6 800afb4: 2300 movs r3, #0 800afb6: 191a adds r2, r3, r4 800afb8: 687b ldr r3, [r7, #4] 800afba: 6a5b ldr r3, [r3, #36] ; 0x24 800afbc: 441a add r2, r3 800afbe: 687b ldr r3, [r7, #4] 800afc0: 625a str r2, [r3, #36] ; 0x24 LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n", 800afc2: 687b ldr r3, [r7, #4] 800afc4: 8d1b ldrh r3, [r3, #40] ; 0x28 800afc6: 461c mov r4, r3 800afc8: 68bb ldr r3, [r7, #8] 800afca: 891b ldrh r3, [r3, #8] 800afcc: 461d mov r5, r3 800afce: 68bb ldr r3, [r7, #8] 800afd0: 691b ldr r3, [r3, #16] 800afd2: 899b ldrh r3, [r3, #12] 800afd4: b29b uxth r3, r3 800afd6: 4618 mov r0, r3 800afd8: f7fa fab8 bl 800554c 800afdc: 4603 mov r3, r0 800afde: b2db uxtb r3, r3 800afe0: f003 0303 and.w r3, r3, #3 800afe4: 2b00 cmp r3, #0 800afe6: d001 beq.n 800afec 800afe8: 2301 movs r3, #1 800afea: e000 b.n 800afee 800afec: 2300 movs r3, #0 800afee: 442b add r3, r5 800aff0: 429c cmp r4, r3 800aff2: d206 bcs.n 800b002 800aff4: 4b1e ldr r3, [pc, #120] ; (800b070 ) 800aff6: f240 622b movw r2, #1579 ; 0x62b 800affa: 4923 ldr r1, [pc, #140] ; (800b088 ) 800affc: 481e ldr r0, [pc, #120] ; (800b078 ) 800affe: f005 fde3 bl 8010bc8 pcb->rcv_wnd >= TCP_TCPLEN(cseg)); pcb->rcv_wnd -= TCP_TCPLEN(cseg); 800b002: 68bb ldr r3, [r7, #8] 800b004: 891b ldrh r3, [r3, #8] 800b006: 461c mov r4, r3 800b008: 68bb ldr r3, [r7, #8] 800b00a: 691b ldr r3, [r3, #16] 800b00c: 899b ldrh r3, [r3, #12] 800b00e: b29b uxth r3, r3 800b010: 4618 mov r0, r3 800b012: f7fa fa9b bl 800554c 800b016: 4603 mov r3, r0 800b018: b2db uxtb r3, r3 800b01a: f003 0303 and.w r3, r3, #3 800b01e: 2b00 cmp r3, #0 800b020: d001 beq.n 800b026 800b022: 2301 movs r3, #1 800b024: e000 b.n 800b028 800b026: 2300 movs r3, #0 800b028: 1919 adds r1, r3, r4 800b02a: 687b ldr r3, [r7, #4] 800b02c: 8d1a ldrh r2, [r3, #40] ; 0x28 800b02e: b28b uxth r3, r1 800b030: 1ad3 subs r3, r2, r3 800b032: b29a uxth r2, r3 800b034: 687b ldr r3, [r7, #4] 800b036: 851a strh r2, [r3, #40] ; 0x28 tcp_update_rcv_ann_wnd(pcb); 800b038: 6878 ldr r0, [r7, #4] 800b03a: f7fc fd5f bl 8007afc if (cseg->p->tot_len > 0) { 800b03e: 68bb ldr r3, [r7, #8] 800b040: 685b ldr r3, [r3, #4] 800b042: 891b ldrh r3, [r3, #8] 800b044: 2b00 cmp r3, #0 800b046: d028 beq.n 800b09a /* 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) { 800b048: 4b0d ldr r3, [pc, #52] ; (800b080 ) 800b04a: 681b ldr r3, [r3, #0] 800b04c: 2b00 cmp r3, #0 800b04e: d01d beq.n 800b08c pbuf_cat(recv_data, cseg->p); 800b050: 4b0b ldr r3, [pc, #44] ; (800b080 ) 800b052: 681a ldr r2, [r3, #0] 800b054: 68bb ldr r3, [r7, #8] 800b056: 685b ldr r3, [r3, #4] 800b058: 4619 mov r1, r3 800b05a: 4610 mov r0, r2 800b05c: f7fc f87c bl 8007158 800b060: e018 b.n 800b094 800b062: bf00 nop 800b064: 24007bb2 .word 0x24007bb2 800b068: 24007ba8 .word 0x24007ba8 800b06c: 24007b84 .word 0x24007b84 800b070: 08013198 .word 0x08013198 800b074: 08013578 .word 0x08013578 800b078: 080131e4 .word 0x080131e4 800b07c: 080135b4 .word 0x080135b4 800b080: 24007bb8 .word 0x24007bb8 800b084: 24007bb5 .word 0x24007bb5 800b088: 080135d4 .word 0x080135d4 } else { recv_data = cseg->p; 800b08c: 68bb ldr r3, [r7, #8] 800b08e: 685b ldr r3, [r3, #4] 800b090: 4a70 ldr r2, [pc, #448] ; (800b254 ) 800b092: 6013 str r3, [r2, #0] } cseg->p = NULL; 800b094: 68bb ldr r3, [r7, #8] 800b096: 2200 movs r2, #0 800b098: 605a str r2, [r3, #4] } if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { 800b09a: 68bb ldr r3, [r7, #8] 800b09c: 691b ldr r3, [r3, #16] 800b09e: 899b ldrh r3, [r3, #12] 800b0a0: b29b uxth r3, r3 800b0a2: 4618 mov r0, r3 800b0a4: f7fa fa52 bl 800554c 800b0a8: 4603 mov r3, r0 800b0aa: b2db uxtb r3, r3 800b0ac: f003 0301 and.w r3, r3, #1 800b0b0: 2b00 cmp r3, #0 800b0b2: d00d beq.n 800b0d0 LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: dequeued FIN.\n")); recv_flags |= TF_GOT_FIN; 800b0b4: 4b68 ldr r3, [pc, #416] ; (800b258 ) 800b0b6: 781b ldrb r3, [r3, #0] 800b0b8: f043 0320 orr.w r3, r3, #32 800b0bc: b2da uxtb r2, r3 800b0be: 4b66 ldr r3, [pc, #408] ; (800b258 ) 800b0c0: 701a strb r2, [r3, #0] if (pcb->state == ESTABLISHED) { /* force passive close or we can move to active close */ 800b0c2: 687b ldr r3, [r7, #4] 800b0c4: 7d1b ldrb r3, [r3, #20] 800b0c6: 2b04 cmp r3, #4 800b0c8: d102 bne.n 800b0d0 pcb->state = CLOSE_WAIT; 800b0ca: 687b ldr r3, [r7, #4] 800b0cc: 2207 movs r2, #7 800b0ce: 751a strb r2, [r3, #20] } } pcb->ooseq = cseg->next; 800b0d0: 68bb ldr r3, [r7, #8] 800b0d2: 681a ldr r2, [r3, #0] 800b0d4: 687b ldr r3, [r7, #4] 800b0d6: 675a str r2, [r3, #116] ; 0x74 tcp_seg_free(cseg); 800b0d8: 68b8 ldr r0, [r7, #8] 800b0da: f7fd fb4c bl 8008776 while (pcb->ooseq != NULL && 800b0de: 687b ldr r3, [r7, #4] 800b0e0: 6f5b ldr r3, [r3, #116] ; 0x74 800b0e2: 2b00 cmp r3, #0 800b0e4: d008 beq.n 800b0f8 pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) { 800b0e6: 687b ldr r3, [r7, #4] 800b0e8: 6f5b ldr r3, [r3, #116] ; 0x74 800b0ea: 691b ldr r3, [r3, #16] 800b0ec: 685a ldr r2, [r3, #4] 800b0ee: 687b ldr r3, [r7, #4] 800b0f0: 6a5b ldr r3, [r3, #36] ; 0x24 while (pcb->ooseq != NULL && 800b0f2: 429a cmp r2, r3 800b0f4: f43f af43 beq.w 800af7e #endif /* LWIP_TCP_SACK_OUT */ #endif /* TCP_QUEUE_OOSEQ */ /* Acknowledge the segment(s). */ tcp_ack(pcb); 800b0f8: 687b ldr r3, [r7, #4] 800b0fa: 8b5b ldrh r3, [r3, #26] 800b0fc: f003 0301 and.w r3, r3, #1 800b100: 2b00 cmp r3, #0 800b102: d00e beq.n 800b122 800b104: 687b ldr r3, [r7, #4] 800b106: 8b5b ldrh r3, [r3, #26] 800b108: f023 0301 bic.w r3, r3, #1 800b10c: b29a uxth r2, r3 800b10e: 687b ldr r3, [r7, #4] 800b110: 835a strh r2, [r3, #26] 800b112: 687b ldr r3, [r7, #4] 800b114: 8b5b ldrh r3, [r3, #26] 800b116: f043 0302 orr.w r3, r3, #2 800b11a: b29a uxth r2, r3 800b11c: 687b ldr r3, [r7, #4] 800b11e: 835a strh r2, [r3, #26] if (pcb->rcv_nxt == seqno) { 800b120: e188 b.n 800b434 tcp_ack(pcb); 800b122: 687b ldr r3, [r7, #4] 800b124: 8b5b ldrh r3, [r3, #26] 800b126: f043 0301 orr.w r3, r3, #1 800b12a: b29a uxth r2, r3 800b12c: 687b ldr r3, [r7, #4] 800b12e: 835a strh r2, [r3, #26] if (pcb->rcv_nxt == seqno) { 800b130: e180 b.n 800b434 } 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) { 800b132: 687b ldr r3, [r7, #4] 800b134: 6f5b ldr r3, [r3, #116] ; 0x74 800b136: 2b00 cmp r3, #0 800b138: d106 bne.n 800b148 pcb->ooseq = tcp_seg_copy(&inseg); 800b13a: 4848 ldr r0, [pc, #288] ; (800b25c ) 800b13c: f7fd fb34 bl 80087a8 800b140: 4602 mov r2, r0 800b142: 687b ldr r3, [r7, #4] 800b144: 675a str r2, [r3, #116] ; 0x74 800b146: e16d b.n 800b424 #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; 800b148: 2300 movs r3, #0 800b14a: 637b str r3, [r7, #52] ; 0x34 for (next = pcb->ooseq; next != NULL; next = next->next) { 800b14c: 687b ldr r3, [r7, #4] 800b14e: 6f5b ldr r3, [r3, #116] ; 0x74 800b150: 63bb str r3, [r7, #56] ; 0x38 800b152: e157 b.n 800b404 if (seqno == next->tcphdr->seqno) { 800b154: 6bbb ldr r3, [r7, #56] ; 0x38 800b156: 691b ldr r3, [r3, #16] 800b158: 685a ldr r2, [r3, #4] 800b15a: 4b41 ldr r3, [pc, #260] ; (800b260 ) 800b15c: 681b ldr r3, [r3, #0] 800b15e: 429a cmp r2, r3 800b160: d11d bne.n 800b19e /* 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) { 800b162: 4b3e ldr r3, [pc, #248] ; (800b25c ) 800b164: 891a ldrh r2, [r3, #8] 800b166: 6bbb ldr r3, [r7, #56] ; 0x38 800b168: 891b ldrh r3, [r3, #8] 800b16a: 429a cmp r2, r3 800b16c: f240 814f bls.w 800b40e /* 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); 800b170: 483a ldr r0, [pc, #232] ; (800b25c ) 800b172: f7fd fb19 bl 80087a8 800b176: 6178 str r0, [r7, #20] if (cseg != NULL) { 800b178: 697b ldr r3, [r7, #20] 800b17a: 2b00 cmp r3, #0 800b17c: f000 8149 beq.w 800b412 if (prev != NULL) { 800b180: 6b7b ldr r3, [r7, #52] ; 0x34 800b182: 2b00 cmp r3, #0 800b184: d003 beq.n 800b18e prev->next = cseg; 800b186: 6b7b ldr r3, [r7, #52] ; 0x34 800b188: 697a ldr r2, [r7, #20] 800b18a: 601a str r2, [r3, #0] 800b18c: e002 b.n 800b194 } else { pcb->ooseq = cseg; 800b18e: 687b ldr r3, [r7, #4] 800b190: 697a ldr r2, [r7, #20] 800b192: 675a str r2, [r3, #116] ; 0x74 } tcp_oos_insert_segment(cseg, next); 800b194: 6bb9 ldr r1, [r7, #56] ; 0x38 800b196: 6978 ldr r0, [r7, #20] 800b198: f7ff f8dc bl 800a354 } break; 800b19c: e139 b.n 800b412 segment was smaller than the old one; in either case, we ditch the incoming segment. */ break; } } else { if (prev == NULL) { 800b19e: 6b7b ldr r3, [r7, #52] ; 0x34 800b1a0: 2b00 cmp r3, #0 800b1a2: d117 bne.n 800b1d4 if (TCP_SEQ_LT(seqno, next->tcphdr->seqno)) { 800b1a4: 4b2e ldr r3, [pc, #184] ; (800b260 ) 800b1a6: 681a ldr r2, [r3, #0] 800b1a8: 6bbb ldr r3, [r7, #56] ; 0x38 800b1aa: 691b ldr r3, [r3, #16] 800b1ac: 685b ldr r3, [r3, #4] 800b1ae: 1ad3 subs r3, r2, r3 800b1b0: 2b00 cmp r3, #0 800b1b2: da57 bge.n 800b264 /* 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); 800b1b4: 4829 ldr r0, [pc, #164] ; (800b25c ) 800b1b6: f7fd faf7 bl 80087a8 800b1ba: 61b8 str r0, [r7, #24] if (cseg != NULL) { 800b1bc: 69bb ldr r3, [r7, #24] 800b1be: 2b00 cmp r3, #0 800b1c0: f000 8129 beq.w 800b416 pcb->ooseq = cseg; 800b1c4: 687b ldr r3, [r7, #4] 800b1c6: 69ba ldr r2, [r7, #24] 800b1c8: 675a str r2, [r3, #116] ; 0x74 tcp_oos_insert_segment(cseg, next); 800b1ca: 6bb9 ldr r1, [r7, #56] ; 0x38 800b1cc: 69b8 ldr r0, [r7, #24] 800b1ce: f7ff f8c1 bl 800a354 } break; 800b1d2: e120 b.n 800b416 } } 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)) { 800b1d4: 4b22 ldr r3, [pc, #136] ; (800b260 ) 800b1d6: 681a ldr r2, [r3, #0] 800b1d8: 6b7b ldr r3, [r7, #52] ; 0x34 800b1da: 691b ldr r3, [r3, #16] 800b1dc: 685b ldr r3, [r3, #4] 800b1de: 1ad3 subs r3, r2, r3 800b1e0: 3b01 subs r3, #1 800b1e2: 2b00 cmp r3, #0 800b1e4: db3e blt.n 800b264 800b1e6: 4b1e ldr r3, [pc, #120] ; (800b260 ) 800b1e8: 681a ldr r2, [r3, #0] 800b1ea: 6bbb ldr r3, [r7, #56] ; 0x38 800b1ec: 691b ldr r3, [r3, #16] 800b1ee: 685b ldr r3, [r3, #4] 800b1f0: 1ad3 subs r3, r2, r3 800b1f2: 3301 adds r3, #1 800b1f4: 2b00 cmp r3, #0 800b1f6: dc35 bgt.n 800b264 /* 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); 800b1f8: 4818 ldr r0, [pc, #96] ; (800b25c ) 800b1fa: f7fd fad5 bl 80087a8 800b1fe: 61f8 str r0, [r7, #28] if (cseg != NULL) { 800b200: 69fb ldr r3, [r7, #28] 800b202: 2b00 cmp r3, #0 800b204: f000 8109 beq.w 800b41a if (TCP_SEQ_GT(prev->tcphdr->seqno + prev->len, seqno)) { 800b208: 6b7b ldr r3, [r7, #52] ; 0x34 800b20a: 691b ldr r3, [r3, #16] 800b20c: 685b ldr r3, [r3, #4] 800b20e: 6b7a ldr r2, [r7, #52] ; 0x34 800b210: 8912 ldrh r2, [r2, #8] 800b212: 441a add r2, r3 800b214: 4b12 ldr r3, [pc, #72] ; (800b260 ) 800b216: 681b ldr r3, [r3, #0] 800b218: 1ad3 subs r3, r2, r3 800b21a: 2b00 cmp r3, #0 800b21c: dd12 ble.n 800b244 /* We need to trim the prev segment. */ prev->len = (u16_t)(seqno - prev->tcphdr->seqno); 800b21e: 4b10 ldr r3, [pc, #64] ; (800b260 ) 800b220: 681b ldr r3, [r3, #0] 800b222: b29a uxth r2, r3 800b224: 6b7b ldr r3, [r7, #52] ; 0x34 800b226: 691b ldr r3, [r3, #16] 800b228: 685b ldr r3, [r3, #4] 800b22a: b29b uxth r3, r3 800b22c: 1ad3 subs r3, r2, r3 800b22e: b29a uxth r2, r3 800b230: 6b7b ldr r3, [r7, #52] ; 0x34 800b232: 811a strh r2, [r3, #8] pbuf_realloc(prev->p, prev->len); 800b234: 6b7b ldr r3, [r7, #52] ; 0x34 800b236: 685a ldr r2, [r3, #4] 800b238: 6b7b ldr r3, [r7, #52] ; 0x34 800b23a: 891b ldrh r3, [r3, #8] 800b23c: 4619 mov r1, r3 800b23e: 4610 mov r0, r2 800b240: f7fb fd42 bl 8006cc8 } prev->next = cseg; 800b244: 6b7b ldr r3, [r7, #52] ; 0x34 800b246: 69fa ldr r2, [r7, #28] 800b248: 601a str r2, [r3, #0] tcp_oos_insert_segment(cseg, next); 800b24a: 6bb9 ldr r1, [r7, #56] ; 0x38 800b24c: 69f8 ldr r0, [r7, #28] 800b24e: f7ff f881 bl 800a354 } break; 800b252: e0e2 b.n 800b41a 800b254: 24007bb8 .word 0x24007bb8 800b258: 24007bb5 .word 0x24007bb5 800b25c: 24007b84 .word 0x24007b84 800b260: 24007ba8 .word 0x24007ba8 #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; 800b264: 6bbb ldr r3, [r7, #56] ; 0x38 800b266: 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 && 800b268: 6bbb ldr r3, [r7, #56] ; 0x38 800b26a: 681b ldr r3, [r3, #0] 800b26c: 2b00 cmp r3, #0 800b26e: f040 80c6 bne.w 800b3fe TCP_SEQ_GT(seqno, next->tcphdr->seqno)) { 800b272: 4b80 ldr r3, [pc, #512] ; (800b474 ) 800b274: 681a ldr r2, [r3, #0] 800b276: 6bbb ldr r3, [r7, #56] ; 0x38 800b278: 691b ldr r3, [r3, #16] 800b27a: 685b ldr r3, [r3, #4] 800b27c: 1ad3 subs r3, r2, r3 if (next->next == NULL && 800b27e: 2b00 cmp r3, #0 800b280: f340 80bd ble.w 800b3fe if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) { 800b284: 6bbb ldr r3, [r7, #56] ; 0x38 800b286: 691b ldr r3, [r3, #16] 800b288: 899b ldrh r3, [r3, #12] 800b28a: b29b uxth r3, r3 800b28c: 4618 mov r0, r3 800b28e: f7fa f95d bl 800554c 800b292: 4603 mov r3, r0 800b294: b2db uxtb r3, r3 800b296: f003 0301 and.w r3, r3, #1 800b29a: 2b00 cmp r3, #0 800b29c: f040 80bf bne.w 800b41e /* segment "next" already contains all data */ break; } next->next = tcp_seg_copy(&inseg); 800b2a0: 4875 ldr r0, [pc, #468] ; (800b478 ) 800b2a2: f7fd fa81 bl 80087a8 800b2a6: 4602 mov r2, r0 800b2a8: 6bbb ldr r3, [r7, #56] ; 0x38 800b2aa: 601a str r2, [r3, #0] if (next->next != NULL) { 800b2ac: 6bbb ldr r3, [r7, #56] ; 0x38 800b2ae: 681b ldr r3, [r3, #0] 800b2b0: 2b00 cmp r3, #0 800b2b2: f000 80b6 beq.w 800b422 if (TCP_SEQ_GT(next->tcphdr->seqno + next->len, seqno)) { 800b2b6: 6bbb ldr r3, [r7, #56] ; 0x38 800b2b8: 691b ldr r3, [r3, #16] 800b2ba: 685b ldr r3, [r3, #4] 800b2bc: 6bba ldr r2, [r7, #56] ; 0x38 800b2be: 8912 ldrh r2, [r2, #8] 800b2c0: 441a add r2, r3 800b2c2: 4b6c ldr r3, [pc, #432] ; (800b474 ) 800b2c4: 681b ldr r3, [r3, #0] 800b2c6: 1ad3 subs r3, r2, r3 800b2c8: 2b00 cmp r3, #0 800b2ca: dd12 ble.n 800b2f2 /* We need to trim the last segment. */ next->len = (u16_t)(seqno - next->tcphdr->seqno); 800b2cc: 4b69 ldr r3, [pc, #420] ; (800b474 ) 800b2ce: 681b ldr r3, [r3, #0] 800b2d0: b29a uxth r2, r3 800b2d2: 6bbb ldr r3, [r7, #56] ; 0x38 800b2d4: 691b ldr r3, [r3, #16] 800b2d6: 685b ldr r3, [r3, #4] 800b2d8: b29b uxth r3, r3 800b2da: 1ad3 subs r3, r2, r3 800b2dc: b29a uxth r2, r3 800b2de: 6bbb ldr r3, [r7, #56] ; 0x38 800b2e0: 811a strh r2, [r3, #8] pbuf_realloc(next->p, next->len); 800b2e2: 6bbb ldr r3, [r7, #56] ; 0x38 800b2e4: 685a ldr r2, [r3, #4] 800b2e6: 6bbb ldr r3, [r7, #56] ; 0x38 800b2e8: 891b ldrh r3, [r3, #8] 800b2ea: 4619 mov r1, r3 800b2ec: 4610 mov r0, r2 800b2ee: f7fb fceb bl 8006cc8 } /* 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)) { 800b2f2: 4b62 ldr r3, [pc, #392] ; (800b47c ) 800b2f4: 881b ldrh r3, [r3, #0] 800b2f6: 461a mov r2, r3 800b2f8: 4b5e ldr r3, [pc, #376] ; (800b474 ) 800b2fa: 681b ldr r3, [r3, #0] 800b2fc: 441a add r2, r3 800b2fe: 687b ldr r3, [r7, #4] 800b300: 6a5b ldr r3, [r3, #36] ; 0x24 800b302: 6879 ldr r1, [r7, #4] 800b304: 8d09 ldrh r1, [r1, #40] ; 0x28 800b306: 440b add r3, r1 800b308: 1ad3 subs r3, r2, r3 800b30a: 2b00 cmp r3, #0 800b30c: f340 8089 ble.w 800b422 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) { 800b310: 6bbb ldr r3, [r7, #56] ; 0x38 800b312: 681b ldr r3, [r3, #0] 800b314: 691b ldr r3, [r3, #16] 800b316: 899b ldrh r3, [r3, #12] 800b318: b29b uxth r3, r3 800b31a: 4618 mov r0, r3 800b31c: f7fa f916 bl 800554c 800b320: 4603 mov r3, r0 800b322: b2db uxtb r3, r3 800b324: f003 0301 and.w r3, r3, #1 800b328: 2b00 cmp r3, #0 800b32a: d022 beq.n 800b372 /* 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); 800b32c: 6bbb ldr r3, [r7, #56] ; 0x38 800b32e: 681b ldr r3, [r3, #0] 800b330: 691b ldr r3, [r3, #16] 800b332: 899b ldrh r3, [r3, #12] 800b334: b29b uxth r3, r3 800b336: b21b sxth r3, r3 800b338: f423 537c bic.w r3, r3, #16128 ; 0x3f00 800b33c: b21c sxth r4, r3 800b33e: 6bbb ldr r3, [r7, #56] ; 0x38 800b340: 681b ldr r3, [r3, #0] 800b342: 691b ldr r3, [r3, #16] 800b344: 899b ldrh r3, [r3, #12] 800b346: b29b uxth r3, r3 800b348: 4618 mov r0, r3 800b34a: f7fa f8ff bl 800554c 800b34e: 4603 mov r3, r0 800b350: b2db uxtb r3, r3 800b352: b29b uxth r3, r3 800b354: f003 033e and.w r3, r3, #62 ; 0x3e 800b358: b29b uxth r3, r3 800b35a: 4618 mov r0, r3 800b35c: f7fa f8f6 bl 800554c 800b360: 4603 mov r3, r0 800b362: b21b sxth r3, r3 800b364: 4323 orrs r3, r4 800b366: b21a sxth r2, r3 800b368: 6bbb ldr r3, [r7, #56] ; 0x38 800b36a: 681b ldr r3, [r3, #0] 800b36c: 691b ldr r3, [r3, #16] 800b36e: b292 uxth r2, r2 800b370: 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); 800b372: 687b ldr r3, [r7, #4] 800b374: 6a5b ldr r3, [r3, #36] ; 0x24 800b376: b29a uxth r2, r3 800b378: 687b ldr r3, [r7, #4] 800b37a: 8d1b ldrh r3, [r3, #40] ; 0x28 800b37c: 4413 add r3, r2 800b37e: b299 uxth r1, r3 800b380: 4b3c ldr r3, [pc, #240] ; (800b474 ) 800b382: 681b ldr r3, [r3, #0] 800b384: b29a uxth r2, r3 800b386: 6bbb ldr r3, [r7, #56] ; 0x38 800b388: 681b ldr r3, [r3, #0] 800b38a: 1a8a subs r2, r1, r2 800b38c: b292 uxth r2, r2 800b38e: 811a strh r2, [r3, #8] pbuf_realloc(next->next->p, next->next->len); 800b390: 6bbb ldr r3, [r7, #56] ; 0x38 800b392: 681b ldr r3, [r3, #0] 800b394: 685a ldr r2, [r3, #4] 800b396: 6bbb ldr r3, [r7, #56] ; 0x38 800b398: 681b ldr r3, [r3, #0] 800b39a: 891b ldrh r3, [r3, #8] 800b39c: 4619 mov r1, r3 800b39e: 4610 mov r0, r2 800b3a0: f7fb fc92 bl 8006cc8 tcplen = TCP_TCPLEN(next->next); 800b3a4: 6bbb ldr r3, [r7, #56] ; 0x38 800b3a6: 681b ldr r3, [r3, #0] 800b3a8: 891c ldrh r4, [r3, #8] 800b3aa: 6bbb ldr r3, [r7, #56] ; 0x38 800b3ac: 681b ldr r3, [r3, #0] 800b3ae: 691b ldr r3, [r3, #16] 800b3b0: 899b ldrh r3, [r3, #12] 800b3b2: b29b uxth r3, r3 800b3b4: 4618 mov r0, r3 800b3b6: f7fa f8c9 bl 800554c 800b3ba: 4603 mov r3, r0 800b3bc: b2db uxtb r3, r3 800b3be: f003 0303 and.w r3, r3, #3 800b3c2: 2b00 cmp r3, #0 800b3c4: d001 beq.n 800b3ca 800b3c6: 2301 movs r3, #1 800b3c8: e000 b.n 800b3cc 800b3ca: 2300 movs r3, #0 800b3cc: 4423 add r3, r4 800b3ce: b29a uxth r2, r3 800b3d0: 4b2a ldr r3, [pc, #168] ; (800b47c ) 800b3d2: 801a strh r2, [r3, #0] LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", 800b3d4: 4b29 ldr r3, [pc, #164] ; (800b47c ) 800b3d6: 881b ldrh r3, [r3, #0] 800b3d8: 461a mov r2, r3 800b3da: 4b26 ldr r3, [pc, #152] ; (800b474 ) 800b3dc: 681b ldr r3, [r3, #0] 800b3de: 441a add r2, r3 800b3e0: 687b ldr r3, [r7, #4] 800b3e2: 6a5b ldr r3, [r3, #36] ; 0x24 800b3e4: 6879 ldr r1, [r7, #4] 800b3e6: 8d09 ldrh r1, [r1, #40] ; 0x28 800b3e8: 440b add r3, r1 800b3ea: 429a cmp r2, r3 800b3ec: d019 beq.n 800b422 800b3ee: 4b24 ldr r3, [pc, #144] ; (800b480 ) 800b3f0: f44f 62df mov.w r2, #1784 ; 0x6f8 800b3f4: 4923 ldr r1, [pc, #140] ; (800b484 ) 800b3f6: 4824 ldr r0, [pc, #144] ; (800b488 ) 800b3f8: f005 fbe6 bl 8010bc8 (seqno + tcplen) == (pcb->rcv_nxt + pcb->rcv_wnd)); } } break; 800b3fc: e011 b.n 800b422 for (next = pcb->ooseq; next != NULL; next = next->next) { 800b3fe: 6bbb ldr r3, [r7, #56] ; 0x38 800b400: 681b ldr r3, [r3, #0] 800b402: 63bb str r3, [r7, #56] ; 0x38 800b404: 6bbb ldr r3, [r7, #56] ; 0x38 800b406: 2b00 cmp r3, #0 800b408: f47f aea4 bne.w 800b154 800b40c: e00a b.n 800b424 break; 800b40e: bf00 nop 800b410: e008 b.n 800b424 break; 800b412: bf00 nop 800b414: e006 b.n 800b424 break; 800b416: bf00 nop 800b418: e004 b.n 800b424 break; 800b41a: bf00 nop 800b41c: e002 b.n 800b424 break; 800b41e: bf00 nop 800b420: e000 b.n 800b424 break; 800b422: 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); 800b424: 6878 ldr r0, [r7, #4] 800b426: f001 fef7 bl 800d218 if (pcb->rcv_nxt == seqno) { 800b42a: e003 b.n 800b434 } } else { /* The incoming segment is not within the window. */ tcp_send_empty_ack(pcb); 800b42c: 6878 ldr r0, [r7, #4] 800b42e: f001 fef3 bl 800d218 if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 800b432: e01a b.n 800b46a 800b434: e019 b.n 800b46a } } 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)) { 800b436: 4b0f ldr r3, [pc, #60] ; (800b474 ) 800b438: 681a ldr r2, [r3, #0] 800b43a: 687b ldr r3, [r7, #4] 800b43c: 6a5b ldr r3, [r3, #36] ; 0x24 800b43e: 1ad3 subs r3, r2, r3 800b440: 2b00 cmp r3, #0 800b442: db0a blt.n 800b45a 800b444: 4b0b ldr r3, [pc, #44] ; (800b474 ) 800b446: 681a ldr r2, [r3, #0] 800b448: 687b ldr r3, [r7, #4] 800b44a: 6a5b ldr r3, [r3, #36] ; 0x24 800b44c: 6879 ldr r1, [r7, #4] 800b44e: 8d09 ldrh r1, [r1, #40] ; 0x28 800b450: 440b add r3, r1 800b452: 1ad3 subs r3, r2, r3 800b454: 3301 adds r3, #1 800b456: 2b00 cmp r3, #0 800b458: dd07 ble.n 800b46a tcp_ack_now(pcb); 800b45a: 687b ldr r3, [r7, #4] 800b45c: 8b5b ldrh r3, [r3, #26] 800b45e: f043 0302 orr.w r3, r3, #2 800b462: b29a uxth r2, r3 800b464: 687b ldr r3, [r7, #4] 800b466: 835a strh r2, [r3, #26] } } } 800b468: e7ff b.n 800b46a 800b46a: bf00 nop 800b46c: 3750 adds r7, #80 ; 0x50 800b46e: 46bd mov sp, r7 800b470: bdb0 pop {r4, r5, r7, pc} 800b472: bf00 nop 800b474: 24007ba8 .word 0x24007ba8 800b478: 24007b84 .word 0x24007b84 800b47c: 24007bb2 .word 0x24007bb2 800b480: 08013198 .word 0x08013198 800b484: 08013540 .word 0x08013540 800b488: 080131e4 .word 0x080131e4 0800b48c : static u8_t tcp_get_next_optbyte(void) { 800b48c: b480 push {r7} 800b48e: b083 sub sp, #12 800b490: af00 add r7, sp, #0 u16_t optidx = tcp_optidx++; 800b492: 4b15 ldr r3, [pc, #84] ; (800b4e8 ) 800b494: 881b ldrh r3, [r3, #0] 800b496: 1c5a adds r2, r3, #1 800b498: b291 uxth r1, r2 800b49a: 4a13 ldr r2, [pc, #76] ; (800b4e8 ) 800b49c: 8011 strh r1, [r2, #0] 800b49e: 80fb strh r3, [r7, #6] if ((tcphdr_opt2 == NULL) || (optidx < tcphdr_opt1len)) { 800b4a0: 4b12 ldr r3, [pc, #72] ; (800b4ec ) 800b4a2: 681b ldr r3, [r3, #0] 800b4a4: 2b00 cmp r3, #0 800b4a6: d004 beq.n 800b4b2 800b4a8: 4b11 ldr r3, [pc, #68] ; (800b4f0 ) 800b4aa: 881b ldrh r3, [r3, #0] 800b4ac: 88fa ldrh r2, [r7, #6] 800b4ae: 429a cmp r2, r3 800b4b0: d208 bcs.n 800b4c4 u8_t *opts = (u8_t *)tcphdr + TCP_HLEN; 800b4b2: 4b10 ldr r3, [pc, #64] ; (800b4f4 ) 800b4b4: 681b ldr r3, [r3, #0] 800b4b6: 3314 adds r3, #20 800b4b8: 603b str r3, [r7, #0] return opts[optidx]; 800b4ba: 88fb ldrh r3, [r7, #6] 800b4bc: 683a ldr r2, [r7, #0] 800b4be: 4413 add r3, r2 800b4c0: 781b ldrb r3, [r3, #0] 800b4c2: e00b b.n 800b4dc } else { u8_t idx = (u8_t)(optidx - tcphdr_opt1len); 800b4c4: 88fb ldrh r3, [r7, #6] 800b4c6: b2da uxtb r2, r3 800b4c8: 4b09 ldr r3, [pc, #36] ; (800b4f0 ) 800b4ca: 881b ldrh r3, [r3, #0] 800b4cc: b2db uxtb r3, r3 800b4ce: 1ad3 subs r3, r2, r3 800b4d0: 717b strb r3, [r7, #5] return tcphdr_opt2[idx]; 800b4d2: 4b06 ldr r3, [pc, #24] ; (800b4ec ) 800b4d4: 681a ldr r2, [r3, #0] 800b4d6: 797b ldrb r3, [r7, #5] 800b4d8: 4413 add r3, r2 800b4da: 781b ldrb r3, [r3, #0] } } 800b4dc: 4618 mov r0, r3 800b4de: 370c adds r7, #12 800b4e0: 46bd mov sp, r7 800b4e2: f85d 7b04 ldr.w r7, [sp], #4 800b4e6: 4770 bx lr 800b4e8: 24007ba4 .word 0x24007ba4 800b4ec: 24007ba0 .word 0x24007ba0 800b4f0: 24007b9e .word 0x24007b9e 800b4f4: 24007b98 .word 0x24007b98 0800b4f8 : * * @param pcb the tcp_pcb for which a segment arrived */ static void tcp_parseopt(struct tcp_pcb *pcb) { 800b4f8: b580 push {r7, lr} 800b4fa: b084 sub sp, #16 800b4fc: af00 add r7, sp, #0 800b4fe: 6078 str r0, [r7, #4] u16_t mss; #if LWIP_TCP_TIMESTAMPS u32_t tsval; #endif LWIP_ASSERT("tcp_parseopt: invalid pcb", pcb != NULL); 800b500: 687b ldr r3, [r7, #4] 800b502: 2b00 cmp r3, #0 800b504: d106 bne.n 800b514 800b506: 4b32 ldr r3, [pc, #200] ; (800b5d0 ) 800b508: f240 727d movw r2, #1917 ; 0x77d 800b50c: 4931 ldr r1, [pc, #196] ; (800b5d4 ) 800b50e: 4832 ldr r0, [pc, #200] ; (800b5d8 ) 800b510: f005 fb5a bl 8010bc8 /* Parse the TCP MSS option, if present. */ if (tcphdr_optlen != 0) { 800b514: 4b31 ldr r3, [pc, #196] ; (800b5dc ) 800b516: 881b ldrh r3, [r3, #0] 800b518: 2b00 cmp r3, #0 800b51a: d055 beq.n 800b5c8 for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) { 800b51c: 4b30 ldr r3, [pc, #192] ; (800b5e0 ) 800b51e: 2200 movs r2, #0 800b520: 801a strh r2, [r3, #0] 800b522: e045 b.n 800b5b0 u8_t opt = tcp_get_next_optbyte(); 800b524: f7ff ffb2 bl 800b48c 800b528: 4603 mov r3, r0 800b52a: 73fb strb r3, [r7, #15] switch (opt) { 800b52c: 7bfb ldrb r3, [r7, #15] 800b52e: 2b02 cmp r3, #2 800b530: d006 beq.n 800b540 800b532: 2b02 cmp r3, #2 800b534: dc2b bgt.n 800b58e 800b536: 2b00 cmp r3, #0 800b538: d041 beq.n 800b5be 800b53a: 2b01 cmp r3, #1 800b53c: d127 bne.n 800b58e 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; 800b53e: e037 b.n 800b5b0 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) { 800b540: f7ff ffa4 bl 800b48c 800b544: 4603 mov r3, r0 800b546: 2b04 cmp r3, #4 800b548: d13b bne.n 800b5c2 800b54a: 4b25 ldr r3, [pc, #148] ; (800b5e0 ) 800b54c: 881b ldrh r3, [r3, #0] 800b54e: 3301 adds r3, #1 800b550: 4a22 ldr r2, [pc, #136] ; (800b5dc ) 800b552: 8812 ldrh r2, [r2, #0] 800b554: 4293 cmp r3, r2 800b556: da34 bge.n 800b5c2 /* 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); 800b558: f7ff ff98 bl 800b48c 800b55c: 4603 mov r3, r0 800b55e: b29b uxth r3, r3 800b560: 021b lsls r3, r3, #8 800b562: 81bb strh r3, [r7, #12] mss |= tcp_get_next_optbyte(); 800b564: f7ff ff92 bl 800b48c 800b568: 4603 mov r3, r0 800b56a: b29a uxth r2, r3 800b56c: 89bb ldrh r3, [r7, #12] 800b56e: 4313 orrs r3, r2 800b570: 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; 800b572: 89bb ldrh r3, [r7, #12] 800b574: f5b3 7f06 cmp.w r3, #536 ; 0x218 800b578: d804 bhi.n 800b584 800b57a: 89bb ldrh r3, [r7, #12] 800b57c: 2b00 cmp r3, #0 800b57e: d001 beq.n 800b584 800b580: 89ba ldrh r2, [r7, #12] 800b582: e001 b.n 800b588 800b584: f44f 7206 mov.w r2, #536 ; 0x218 800b588: 687b ldr r3, [r7, #4] 800b58a: 865a strh r2, [r3, #50] ; 0x32 break; 800b58c: e010 b.n 800b5b0 } break; #endif /* LWIP_TCP_SACK_OUT */ default: LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n")); data = tcp_get_next_optbyte(); 800b58e: f7ff ff7d bl 800b48c 800b592: 4603 mov r3, r0 800b594: 72fb strb r3, [r7, #11] if (data < 2) { 800b596: 7afb ldrb r3, [r7, #11] 800b598: 2b01 cmp r3, #1 800b59a: d914 bls.n 800b5c6 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; 800b59c: 7afb ldrb r3, [r7, #11] 800b59e: b29a uxth r2, r3 800b5a0: 4b0f ldr r3, [pc, #60] ; (800b5e0 ) 800b5a2: 881b ldrh r3, [r3, #0] 800b5a4: 4413 add r3, r2 800b5a6: b29b uxth r3, r3 800b5a8: 3b02 subs r3, #2 800b5aa: b29a uxth r2, r3 800b5ac: 4b0c ldr r3, [pc, #48] ; (800b5e0 ) 800b5ae: 801a strh r2, [r3, #0] for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) { 800b5b0: 4b0b ldr r3, [pc, #44] ; (800b5e0 ) 800b5b2: 881a ldrh r2, [r3, #0] 800b5b4: 4b09 ldr r3, [pc, #36] ; (800b5dc ) 800b5b6: 881b ldrh r3, [r3, #0] 800b5b8: 429a cmp r2, r3 800b5ba: d3b3 bcc.n 800b524 800b5bc: e004 b.n 800b5c8 return; 800b5be: bf00 nop 800b5c0: e002 b.n 800b5c8 return; 800b5c2: bf00 nop 800b5c4: e000 b.n 800b5c8 return; 800b5c6: bf00 nop } } } } 800b5c8: 3710 adds r7, #16 800b5ca: 46bd mov sp, r7 800b5cc: bd80 pop {r7, pc} 800b5ce: bf00 nop 800b5d0: 08013198 .word 0x08013198 800b5d4: 080135fc .word 0x080135fc 800b5d8: 080131e4 .word 0x080131e4 800b5dc: 24007b9c .word 0x24007b9c 800b5e0: 24007ba4 .word 0x24007ba4 0800b5e4 : void tcp_trigger_input_pcb_close(void) { 800b5e4: b480 push {r7} 800b5e6: af00 add r7, sp, #0 recv_flags |= TF_CLOSED; 800b5e8: 4b05 ldr r3, [pc, #20] ; (800b600 ) 800b5ea: 781b ldrb r3, [r3, #0] 800b5ec: f043 0310 orr.w r3, r3, #16 800b5f0: b2da uxtb r2, r3 800b5f2: 4b03 ldr r3, [pc, #12] ; (800b600 ) 800b5f4: 701a strb r2, [r3, #0] } 800b5f6: bf00 nop 800b5f8: 46bd mov sp, r7 800b5fa: f85d 7b04 ldr.w r7, [sp], #4 800b5fe: 4770 bx lr 800b600: 24007bb5 .word 0x24007bb5 0800b604 : 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) { 800b604: b580 push {r7, lr} 800b606: b084 sub sp, #16 800b608: af00 add r7, sp, #0 800b60a: 60f8 str r0, [r7, #12] 800b60c: 60b9 str r1, [r7, #8] 800b60e: 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)) { 800b610: 68fb ldr r3, [r7, #12] 800b612: 2b00 cmp r3, #0 800b614: d00a beq.n 800b62c 800b616: 68fb ldr r3, [r7, #12] 800b618: 7a1b ldrb r3, [r3, #8] 800b61a: 2b00 cmp r3, #0 800b61c: d006 beq.n 800b62c return netif_get_by_index(pcb->netif_idx); 800b61e: 68fb ldr r3, [r7, #12] 800b620: 7a1b ldrb r3, [r3, #8] 800b622: 4618 mov r0, r3 800b624: f7fb f976 bl 8006914 800b628: 4603 mov r3, r0 800b62a: e003 b.n 800b634 } else { return ip_route(src, dst); 800b62c: 6878 ldr r0, [r7, #4] 800b62e: f003 fc2b bl 800ee88 800b632: 4603 mov r3, r0 } } 800b634: 4618 mov r0, r3 800b636: 3710 adds r7, #16 800b638: 46bd mov sp, r7 800b63a: bd80 pop {r7, pc} 0800b63c : * 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) { 800b63c: b590 push {r4, r7, lr} 800b63e: b087 sub sp, #28 800b640: af00 add r7, sp, #0 800b642: 60f8 str r0, [r7, #12] 800b644: 60b9 str r1, [r7, #8] 800b646: 603b str r3, [r7, #0] 800b648: 4613 mov r3, r2 800b64a: 71fb strb r3, [r7, #7] struct tcp_seg *seg; u8_t optlen; LWIP_ASSERT("tcp_create_segment: invalid pcb", pcb != NULL); 800b64c: 68fb ldr r3, [r7, #12] 800b64e: 2b00 cmp r3, #0 800b650: d105 bne.n 800b65e 800b652: 4b45 ldr r3, [pc, #276] ; (800b768 ) 800b654: 22a3 movs r2, #163 ; 0xa3 800b656: 4945 ldr r1, [pc, #276] ; (800b76c ) 800b658: 4845 ldr r0, [pc, #276] ; (800b770 ) 800b65a: f005 fab5 bl 8010bc8 LWIP_ASSERT("tcp_create_segment: invalid pbuf", p != NULL); 800b65e: 68bb ldr r3, [r7, #8] 800b660: 2b00 cmp r3, #0 800b662: d105 bne.n 800b670 800b664: 4b40 ldr r3, [pc, #256] ; (800b768 ) 800b666: 22a4 movs r2, #164 ; 0xa4 800b668: 4942 ldr r1, [pc, #264] ; (800b774 ) 800b66a: 4841 ldr r0, [pc, #260] ; (800b770 ) 800b66c: f005 faac bl 8010bc8 optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb); 800b670: f897 3028 ldrb.w r3, [r7, #40] ; 0x28 800b674: 009b lsls r3, r3, #2 800b676: b2db uxtb r3, r3 800b678: f003 0304 and.w r3, r3, #4 800b67c: 75fb strb r3, [r7, #23] if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { 800b67e: 2003 movs r0, #3 800b680: f7fa fccc bl 800601c 800b684: 6138 str r0, [r7, #16] 800b686: 693b ldr r3, [r7, #16] 800b688: 2b00 cmp r3, #0 800b68a: d104 bne.n 800b696 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no memory.\n")); pbuf_free(p); 800b68c: 68b8 ldr r0, [r7, #8] 800b68e: f7fb fca1 bl 8006fd4 return NULL; 800b692: 2300 movs r3, #0 800b694: e064 b.n 800b760 } seg->flags = optflags; 800b696: 693b ldr r3, [r7, #16] 800b698: f897 2028 ldrb.w r2, [r7, #40] ; 0x28 800b69c: 731a strb r2, [r3, #12] seg->next = NULL; 800b69e: 693b ldr r3, [r7, #16] 800b6a0: 2200 movs r2, #0 800b6a2: 601a str r2, [r3, #0] seg->p = p; 800b6a4: 693b ldr r3, [r7, #16] 800b6a6: 68ba ldr r2, [r7, #8] 800b6a8: 605a str r2, [r3, #4] LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen); 800b6aa: 68bb ldr r3, [r7, #8] 800b6ac: 891a ldrh r2, [r3, #8] 800b6ae: 7dfb ldrb r3, [r7, #23] 800b6b0: b29b uxth r3, r3 800b6b2: 429a cmp r2, r3 800b6b4: d205 bcs.n 800b6c2 800b6b6: 4b2c ldr r3, [pc, #176] ; (800b768 ) 800b6b8: 22b0 movs r2, #176 ; 0xb0 800b6ba: 492f ldr r1, [pc, #188] ; (800b778 ) 800b6bc: 482c ldr r0, [pc, #176] ; (800b770 ) 800b6be: f005 fa83 bl 8010bc8 seg->len = p->tot_len - optlen; 800b6c2: 68bb ldr r3, [r7, #8] 800b6c4: 891a ldrh r2, [r3, #8] 800b6c6: 7dfb ldrb r3, [r7, #23] 800b6c8: b29b uxth r3, r3 800b6ca: 1ad3 subs r3, r2, r3 800b6cc: b29a uxth r2, r3 800b6ce: 693b ldr r3, [r7, #16] 800b6d0: 811a strh r2, [r3, #8] #if TCP_OVERSIZE_DBGCHECK seg->oversize_left = 0; 800b6d2: 693b ldr r3, [r7, #16] 800b6d4: 2200 movs r2, #0 800b6d6: 815a strh r2, [r3, #10] 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)) { 800b6d8: 2114 movs r1, #20 800b6da: 68b8 ldr r0, [r7, #8] 800b6dc: f7fb fbe4 bl 8006ea8 800b6e0: 4603 mov r3, r0 800b6e2: 2b00 cmp r3, #0 800b6e4: d004 beq.n 800b6f0 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); 800b6e6: 6938 ldr r0, [r7, #16] 800b6e8: f7fd f845 bl 8008776 return NULL; 800b6ec: 2300 movs r3, #0 800b6ee: e037 b.n 800b760 } seg->tcphdr = (struct tcp_hdr *)seg->p->payload; 800b6f0: 693b ldr r3, [r7, #16] 800b6f2: 685b ldr r3, [r3, #4] 800b6f4: 685a ldr r2, [r3, #4] 800b6f6: 693b ldr r3, [r7, #16] 800b6f8: 611a str r2, [r3, #16] seg->tcphdr->src = lwip_htons(pcb->local_port); 800b6fa: 68fb ldr r3, [r7, #12] 800b6fc: 8ada ldrh r2, [r3, #22] 800b6fe: 693b ldr r3, [r7, #16] 800b700: 691c ldr r4, [r3, #16] 800b702: 4610 mov r0, r2 800b704: f7f9 ff22 bl 800554c 800b708: 4603 mov r3, r0 800b70a: 8023 strh r3, [r4, #0] seg->tcphdr->dest = lwip_htons(pcb->remote_port); 800b70c: 68fb ldr r3, [r7, #12] 800b70e: 8b1a ldrh r2, [r3, #24] 800b710: 693b ldr r3, [r7, #16] 800b712: 691c ldr r4, [r3, #16] 800b714: 4610 mov r0, r2 800b716: f7f9 ff19 bl 800554c 800b71a: 4603 mov r3, r0 800b71c: 8063 strh r3, [r4, #2] seg->tcphdr->seqno = lwip_htonl(seqno); 800b71e: 693b ldr r3, [r7, #16] 800b720: 691c ldr r4, [r3, #16] 800b722: 6838 ldr r0, [r7, #0] 800b724: f7f9 ff27 bl 8005576 800b728: 4603 mov r3, r0 800b72a: 6063 str r3, [r4, #4] /* ackno is set in tcp_output */ TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), hdrflags); 800b72c: 7dfb ldrb r3, [r7, #23] 800b72e: 089b lsrs r3, r3, #2 800b730: b2db uxtb r3, r3 800b732: b29b uxth r3, r3 800b734: 3305 adds r3, #5 800b736: b29b uxth r3, r3 800b738: 031b lsls r3, r3, #12 800b73a: b29a uxth r2, r3 800b73c: 79fb ldrb r3, [r7, #7] 800b73e: b29b uxth r3, r3 800b740: 4313 orrs r3, r2 800b742: b29a uxth r2, r3 800b744: 693b ldr r3, [r7, #16] 800b746: 691c ldr r4, [r3, #16] 800b748: 4610 mov r0, r2 800b74a: f7f9 feff bl 800554c 800b74e: 4603 mov r3, r0 800b750: 81a3 strh r3, [r4, #12] /* wnd and chksum are set in tcp_output */ seg->tcphdr->urgp = 0; 800b752: 693b ldr r3, [r7, #16] 800b754: 691b ldr r3, [r3, #16] 800b756: 2200 movs r2, #0 800b758: 749a strb r2, [r3, #18] 800b75a: 2200 movs r2, #0 800b75c: 74da strb r2, [r3, #19] return seg; 800b75e: 693b ldr r3, [r7, #16] } 800b760: 4618 mov r0, r3 800b762: 371c adds r7, #28 800b764: 46bd mov sp, r7 800b766: bd90 pop {r4, r7, pc} 800b768: 08013618 .word 0x08013618 800b76c: 0801364c .word 0x0801364c 800b770: 0801366c .word 0x0801366c 800b774: 08013694 .word 0x08013694 800b778: 080136b8 .word 0x080136b8 0800b77c : #if TCP_OVERSIZE static struct pbuf * tcp_pbuf_prealloc(pbuf_layer layer, u16_t length, u16_t max_length, u16_t *oversize, const struct tcp_pcb *pcb, u8_t apiflags, u8_t first_seg) { 800b77c: b580 push {r7, lr} 800b77e: b086 sub sp, #24 800b780: af00 add r7, sp, #0 800b782: 607b str r3, [r7, #4] 800b784: 4603 mov r3, r0 800b786: 73fb strb r3, [r7, #15] 800b788: 460b mov r3, r1 800b78a: 81bb strh r3, [r7, #12] 800b78c: 4613 mov r3, r2 800b78e: 817b strh r3, [r7, #10] struct pbuf *p; u16_t alloc = length; 800b790: 89bb ldrh r3, [r7, #12] 800b792: 82fb strh r3, [r7, #22] LWIP_ASSERT("tcp_pbuf_prealloc: invalid oversize", oversize != NULL); 800b794: 687b ldr r3, [r7, #4] 800b796: 2b00 cmp r3, #0 800b798: d105 bne.n 800b7a6 800b79a: 4b30 ldr r3, [pc, #192] ; (800b85c ) 800b79c: 22e8 movs r2, #232 ; 0xe8 800b79e: 4930 ldr r1, [pc, #192] ; (800b860 ) 800b7a0: 4830 ldr r0, [pc, #192] ; (800b864 ) 800b7a2: f005 fa11 bl 8010bc8 LWIP_ASSERT("tcp_pbuf_prealloc: invalid pcb", pcb != NULL); 800b7a6: 6a3b ldr r3, [r7, #32] 800b7a8: 2b00 cmp r3, #0 800b7aa: d105 bne.n 800b7b8 800b7ac: 4b2b ldr r3, [pc, #172] ; (800b85c ) 800b7ae: 22e9 movs r2, #233 ; 0xe9 800b7b0: 492d ldr r1, [pc, #180] ; (800b868 ) 800b7b2: 482c ldr r0, [pc, #176] ; (800b864 ) 800b7b4: f005 fa08 bl 8010bc8 LWIP_UNUSED_ARG(pcb); LWIP_UNUSED_ARG(apiflags); LWIP_UNUSED_ARG(first_seg); alloc = max_length; #else /* LWIP_NETIF_TX_SINGLE_PBUF */ if (length < max_length) { 800b7b8: 89ba ldrh r2, [r7, #12] 800b7ba: 897b ldrh r3, [r7, #10] 800b7bc: 429a cmp r2, r3 800b7be: d221 bcs.n 800b804 * * Did the user set TCP_WRITE_FLAG_MORE? * * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || 800b7c0: f897 3024 ldrb.w r3, [r7, #36] ; 0x24 800b7c4: f003 0302 and.w r3, r3, #2 800b7c8: 2b00 cmp r3, #0 800b7ca: d111 bne.n 800b7f0 (!(pcb->flags & TF_NODELAY) && 800b7cc: 6a3b ldr r3, [r7, #32] 800b7ce: 8b5b ldrh r3, [r3, #26] 800b7d0: f003 0340 and.w r3, r3, #64 ; 0x40 if ((apiflags & TCP_WRITE_FLAG_MORE) || 800b7d4: 2b00 cmp r3, #0 800b7d6: d115 bne.n 800b804 (!(pcb->flags & TF_NODELAY) && 800b7d8: f897 3028 ldrb.w r3, [r7, #40] ; 0x28 800b7dc: 2b00 cmp r3, #0 800b7de: d007 beq.n 800b7f0 (!first_seg || pcb->unsent != NULL || 800b7e0: 6a3b ldr r3, [r7, #32] 800b7e2: 6edb ldr r3, [r3, #108] ; 0x6c (!first_seg || 800b7e4: 2b00 cmp r3, #0 800b7e6: d103 bne.n 800b7f0 pcb->unacked != NULL))) { 800b7e8: 6a3b ldr r3, [r7, #32] 800b7ea: 6f1b ldr r3, [r3, #112] ; 0x70 pcb->unsent != NULL || 800b7ec: 2b00 cmp r3, #0 800b7ee: d009 beq.n 800b804 alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(TCP_OVERSIZE_CALC_LENGTH(length))); 800b7f0: 89bb ldrh r3, [r7, #12] 800b7f2: f203 231b addw r3, r3, #539 ; 0x21b 800b7f6: f023 0203 bic.w r2, r3, #3 800b7fa: 897b ldrh r3, [r7, #10] 800b7fc: 4293 cmp r3, r2 800b7fe: bf28 it cs 800b800: 4613 movcs r3, r2 800b802: 82fb strh r3, [r7, #22] } } #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ p = pbuf_alloc(layer, alloc, PBUF_RAM); 800b804: 8af9 ldrh r1, [r7, #22] 800b806: 7bfb ldrb r3, [r7, #15] 800b808: f44f 7220 mov.w r2, #640 ; 0x280 800b80c: 4618 mov r0, r3 800b80e: f7fb f8fd bl 8006a0c 800b812: 6138 str r0, [r7, #16] if (p == NULL) { 800b814: 693b ldr r3, [r7, #16] 800b816: 2b00 cmp r3, #0 800b818: d101 bne.n 800b81e return NULL; 800b81a: 2300 movs r3, #0 800b81c: e019 b.n 800b852 } LWIP_ASSERT("need unchained pbuf", p->next == NULL); 800b81e: 693b ldr r3, [r7, #16] 800b820: 681b ldr r3, [r3, #0] 800b822: 2b00 cmp r3, #0 800b824: d006 beq.n 800b834 800b826: 4b0d ldr r3, [pc, #52] ; (800b85c ) 800b828: f240 120b movw r2, #267 ; 0x10b 800b82c: 490f ldr r1, [pc, #60] ; (800b86c ) 800b82e: 480d ldr r0, [pc, #52] ; (800b864 ) 800b830: f005 f9ca bl 8010bc8 *oversize = p->len - length; 800b834: 693b ldr r3, [r7, #16] 800b836: 895a ldrh r2, [r3, #10] 800b838: 89bb ldrh r3, [r7, #12] 800b83a: 1ad3 subs r3, r2, r3 800b83c: b29a uxth r2, r3 800b83e: 687b ldr r3, [r7, #4] 800b840: 801a strh r2, [r3, #0] /* trim p->len to the currently used size */ p->len = p->tot_len = length; 800b842: 693b ldr r3, [r7, #16] 800b844: 89ba ldrh r2, [r7, #12] 800b846: 811a strh r2, [r3, #8] 800b848: 693b ldr r3, [r7, #16] 800b84a: 891a ldrh r2, [r3, #8] 800b84c: 693b ldr r3, [r7, #16] 800b84e: 815a strh r2, [r3, #10] return p; 800b850: 693b ldr r3, [r7, #16] } 800b852: 4618 mov r0, r3 800b854: 3718 adds r7, #24 800b856: 46bd mov sp, r7 800b858: bd80 pop {r7, pc} 800b85a: bf00 nop 800b85c: 08013618 .word 0x08013618 800b860: 080136d0 .word 0x080136d0 800b864: 0801366c .word 0x0801366c 800b868: 080136f4 .word 0x080136f4 800b86c: 08013714 .word 0x08013714 0800b870 : * @param len length of data to send (checked agains snd_buf) * @return ERR_OK if tcp_write is allowed to proceed, another err_t otherwise */ static err_t tcp_write_checks(struct tcp_pcb *pcb, u16_t len) { 800b870: b580 push {r7, lr} 800b872: b082 sub sp, #8 800b874: af00 add r7, sp, #0 800b876: 6078 str r0, [r7, #4] 800b878: 460b mov r3, r1 800b87a: 807b strh r3, [r7, #2] LWIP_ASSERT("tcp_write_checks: invalid pcb", pcb != NULL); 800b87c: 687b ldr r3, [r7, #4] 800b87e: 2b00 cmp r3, #0 800b880: d106 bne.n 800b890 800b882: 4b33 ldr r3, [pc, #204] ; (800b950 ) 800b884: f240 1233 movw r2, #307 ; 0x133 800b888: 4932 ldr r1, [pc, #200] ; (800b954 ) 800b88a: 4833 ldr r0, [pc, #204] ; (800b958 ) 800b88c: f005 f99c bl 8010bc8 /* connection is in invalid state for data transmission? */ if ((pcb->state != ESTABLISHED) && 800b890: 687b ldr r3, [r7, #4] 800b892: 7d1b ldrb r3, [r3, #20] 800b894: 2b04 cmp r3, #4 800b896: d00e beq.n 800b8b6 (pcb->state != CLOSE_WAIT) && 800b898: 687b ldr r3, [r7, #4] 800b89a: 7d1b ldrb r3, [r3, #20] if ((pcb->state != ESTABLISHED) && 800b89c: 2b07 cmp r3, #7 800b89e: d00a beq.n 800b8b6 (pcb->state != SYN_SENT) && 800b8a0: 687b ldr r3, [r7, #4] 800b8a2: 7d1b ldrb r3, [r3, #20] (pcb->state != CLOSE_WAIT) && 800b8a4: 2b02 cmp r3, #2 800b8a6: d006 beq.n 800b8b6 (pcb->state != SYN_RCVD)) { 800b8a8: 687b ldr r3, [r7, #4] 800b8aa: 7d1b ldrb r3, [r3, #20] (pcb->state != SYN_SENT) && 800b8ac: 2b03 cmp r3, #3 800b8ae: d002 beq.n 800b8b6 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_STATE | LWIP_DBG_LEVEL_SEVERE, ("tcp_write() called in invalid state\n")); return ERR_CONN; 800b8b0: f06f 030a mvn.w r3, #10 800b8b4: e048 b.n 800b948 } else if (len == 0) { 800b8b6: 887b ldrh r3, [r7, #2] 800b8b8: 2b00 cmp r3, #0 800b8ba: d101 bne.n 800b8c0 return ERR_OK; 800b8bc: 2300 movs r3, #0 800b8be: e043 b.n 800b948 } /* fail on too much data */ if (len > pcb->snd_buf) { 800b8c0: 687b ldr r3, [r7, #4] 800b8c2: f8b3 3064 ldrh.w r3, [r3, #100] ; 0x64 800b8c6: 887a ldrh r2, [r7, #2] 800b8c8: 429a cmp r2, r3 800b8ca: d909 bls.n 800b8e0 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_write: too much data (len=%"U16_F" > snd_buf=%"TCPWNDSIZE_F")\n", len, pcb->snd_buf)); tcp_set_flags(pcb, TF_NAGLEMEMERR); 800b8cc: 687b ldr r3, [r7, #4] 800b8ce: 8b5b ldrh r3, [r3, #26] 800b8d0: f043 0380 orr.w r3, r3, #128 ; 0x80 800b8d4: b29a uxth r2, r3 800b8d6: 687b ldr r3, [r7, #4] 800b8d8: 835a strh r2, [r3, #26] return ERR_MEM; 800b8da: f04f 33ff mov.w r3, #4294967295 800b8de: e033 b.n 800b948 LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_write: queuelen: %"TCPWNDSIZE_F"\n", (tcpwnd_size_t)pcb->snd_queuelen)); /* If total number of pbufs on the unsent/unacked queues exceeds the * configured maximum, return an error */ /* check for configured max queuelen and possible overflow */ if (pcb->snd_queuelen >= LWIP_MIN(TCP_SND_QUEUELEN, (TCP_SNDQUEUELEN_OVERFLOW + 1))) { 800b8e0: 687b ldr r3, [r7, #4] 800b8e2: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66 800b8e6: 2b08 cmp r3, #8 800b8e8: d909 bls.n 800b8fe LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_write: too long queue %"U16_F" (max %"U16_F")\n", pcb->snd_queuelen, (u16_t)TCP_SND_QUEUELEN)); TCP_STATS_INC(tcp.memerr); tcp_set_flags(pcb, TF_NAGLEMEMERR); 800b8ea: 687b ldr r3, [r7, #4] 800b8ec: 8b5b ldrh r3, [r3, #26] 800b8ee: f043 0380 orr.w r3, r3, #128 ; 0x80 800b8f2: b29a uxth r2, r3 800b8f4: 687b ldr r3, [r7, #4] 800b8f6: 835a strh r2, [r3, #26] return ERR_MEM; 800b8f8: f04f 33ff mov.w r3, #4294967295 800b8fc: e024 b.n 800b948 } if (pcb->snd_queuelen != 0) { 800b8fe: 687b ldr r3, [r7, #4] 800b900: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66 800b904: 2b00 cmp r3, #0 800b906: d00f beq.n 800b928 LWIP_ASSERT("tcp_write: pbufs on queue => at least one queue non-empty", 800b908: 687b ldr r3, [r7, #4] 800b90a: 6f1b ldr r3, [r3, #112] ; 0x70 800b90c: 2b00 cmp r3, #0 800b90e: d11a bne.n 800b946 800b910: 687b ldr r3, [r7, #4] 800b912: 6edb ldr r3, [r3, #108] ; 0x6c 800b914: 2b00 cmp r3, #0 800b916: d116 bne.n 800b946 800b918: 4b0d ldr r3, [pc, #52] ; (800b950 ) 800b91a: f240 1255 movw r2, #341 ; 0x155 800b91e: 490f ldr r1, [pc, #60] ; (800b95c ) 800b920: 480d ldr r0, [pc, #52] ; (800b958 ) 800b922: f005 f951 bl 8010bc8 800b926: e00e b.n 800b946 pcb->unacked != NULL || pcb->unsent != NULL); } else { LWIP_ASSERT("tcp_write: no pbufs on queue => both queues empty", 800b928: 687b ldr r3, [r7, #4] 800b92a: 6f1b ldr r3, [r3, #112] ; 0x70 800b92c: 2b00 cmp r3, #0 800b92e: d103 bne.n 800b938 800b930: 687b ldr r3, [r7, #4] 800b932: 6edb ldr r3, [r3, #108] ; 0x6c 800b934: 2b00 cmp r3, #0 800b936: d006 beq.n 800b946 800b938: 4b05 ldr r3, [pc, #20] ; (800b950 ) 800b93a: f44f 72ac mov.w r2, #344 ; 0x158 800b93e: 4908 ldr r1, [pc, #32] ; (800b960 ) 800b940: 4805 ldr r0, [pc, #20] ; (800b958 ) 800b942: f005 f941 bl 8010bc8 pcb->unacked == NULL && pcb->unsent == NULL); } return ERR_OK; 800b946: 2300 movs r3, #0 } 800b948: 4618 mov r0, r3 800b94a: 3708 adds r7, #8 800b94c: 46bd mov sp, r7 800b94e: bd80 pop {r7, pc} 800b950: 08013618 .word 0x08013618 800b954: 08013728 .word 0x08013728 800b958: 0801366c .word 0x0801366c 800b95c: 08013748 .word 0x08013748 800b960: 08013784 .word 0x08013784 0800b964 : * - TCP_WRITE_FLAG_MORE (0x02) for TCP connection, PSH flag will not be set on last segment sent, * @return ERR_OK if enqueued, another err_t on error */ err_t tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) { 800b964: b590 push {r4, r7, lr} 800b966: b09d sub sp, #116 ; 0x74 800b968: af04 add r7, sp, #16 800b96a: 60f8 str r0, [r7, #12] 800b96c: 60b9 str r1, [r7, #8] 800b96e: 4611 mov r1, r2 800b970: 461a mov r2, r3 800b972: 460b mov r3, r1 800b974: 80fb strh r3, [r7, #6] 800b976: 4613 mov r3, r2 800b978: 717b strb r3, [r7, #5] struct pbuf *concat_p = NULL; 800b97a: 2300 movs r3, #0 800b97c: 63fb str r3, [r7, #60] ; 0x3c struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; 800b97e: 2300 movs r3, #0 800b980: 643b str r3, [r7, #64] ; 0x40 800b982: 2300 movs r3, #0 800b984: 657b str r3, [r7, #84] ; 0x54 800b986: 2300 movs r3, #0 800b988: 653b str r3, [r7, #80] ; 0x50 800b98a: 2300 movs r3, #0 800b98c: 64fb str r3, [r7, #76] ; 0x4c u16_t pos = 0; /* position in 'arg' data */ 800b98e: 2300 movs r3, #0 800b990: f8a7 304a strh.w r3, [r7, #74] ; 0x4a u16_t queuelen; u8_t optlen; u8_t optflags = 0; 800b994: 2300 movs r3, #0 800b996: f887 302b strb.w r3, [r7, #43] ; 0x2b #if TCP_OVERSIZE u16_t oversize = 0; 800b99a: 2300 movs r3, #0 800b99c: 82fb strh r3, [r7, #22] u16_t oversize_used = 0; 800b99e: 2300 movs r3, #0 800b9a0: f8a7 3046 strh.w r3, [r7, #70] ; 0x46 #if TCP_OVERSIZE_DBGCHECK u16_t oversize_add = 0; 800b9a4: 2300 movs r3, #0 800b9a6: f8a7 305a strh.w r3, [r7, #90] ; 0x5a #endif /* TCP_OVERSIZE_DBGCHECK*/ #endif /* TCP_OVERSIZE */ u16_t extendlen = 0; 800b9aa: 2300 movs r3, #0 800b9ac: f8a7 305e strh.w r3, [r7, #94] ; 0x5e u16_t concat_chksummed = 0; #endif /* TCP_CHECKSUM_ON_COPY */ err_t err; u16_t mss_local; LWIP_ERROR("tcp_write: invalid pcb", pcb != NULL, return ERR_ARG); 800b9b0: 68fb ldr r3, [r7, #12] 800b9b2: 2b00 cmp r3, #0 800b9b4: d109 bne.n 800b9ca 800b9b6: 4b9c ldr r3, [pc, #624] ; (800bc28 ) 800b9b8: f44f 72cf mov.w r2, #414 ; 0x19e 800b9bc: 499b ldr r1, [pc, #620] ; (800bc2c ) 800b9be: 489c ldr r0, [pc, #624] ; (800bc30 ) 800b9c0: f005 f902 bl 8010bc8 800b9c4: f06f 030f mvn.w r3, #15 800b9c8: e379 b.n 800c0be /* don't allocate segments bigger than half the maximum window we ever received */ mss_local = LWIP_MIN(pcb->mss, TCPWND_MIN16(pcb->snd_wnd_max / 2)); 800b9ca: 68fb ldr r3, [r7, #12] 800b9cc: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 800b9d0: 085b lsrs r3, r3, #1 800b9d2: b29a uxth r2, r3 800b9d4: 68fb ldr r3, [r7, #12] 800b9d6: 8e5b ldrh r3, [r3, #50] ; 0x32 800b9d8: 4293 cmp r3, r2 800b9da: bf28 it cs 800b9dc: 4613 movcs r3, r2 800b9de: 853b strh r3, [r7, #40] ; 0x28 mss_local = mss_local ? mss_local : pcb->mss; 800b9e0: 8d3b ldrh r3, [r7, #40] ; 0x28 800b9e2: 2b00 cmp r3, #0 800b9e4: d102 bne.n 800b9ec 800b9e6: 68fb ldr r3, [r7, #12] 800b9e8: 8e5b ldrh r3, [r3, #50] ; 0x32 800b9ea: e000 b.n 800b9ee 800b9ec: 8d3b ldrh r3, [r7, #40] ; 0x28 800b9ee: 853b strh r3, [r7, #40] ; 0x28 apiflags |= TCP_WRITE_FLAG_COPY; #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_write(pcb=%p, data=%p, len=%"U16_F", apiflags=%"U16_F")\n", (void *)pcb, arg, len, (u16_t)apiflags)); LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)", 800b9f0: 68bb ldr r3, [r7, #8] 800b9f2: 2b00 cmp r3, #0 800b9f4: d109 bne.n 800ba0a 800b9f6: 4b8c ldr r3, [pc, #560] ; (800bc28 ) 800b9f8: f240 12ad movw r2, #429 ; 0x1ad 800b9fc: 498d ldr r1, [pc, #564] ; (800bc34 ) 800b9fe: 488c ldr r0, [pc, #560] ; (800bc30 ) 800ba00: f005 f8e2 bl 8010bc8 800ba04: f06f 030f mvn.w r3, #15 800ba08: e359 b.n 800c0be arg != NULL, return ERR_ARG;); err = tcp_write_checks(pcb, len); 800ba0a: 88fb ldrh r3, [r7, #6] 800ba0c: 4619 mov r1, r3 800ba0e: 68f8 ldr r0, [r7, #12] 800ba10: f7ff ff2e bl 800b870 800ba14: 4603 mov r3, r0 800ba16: f887 3027 strb.w r3, [r7, #39] ; 0x27 if (err != ERR_OK) { 800ba1a: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27 800ba1e: 2b00 cmp r3, #0 800ba20: d002 beq.n 800ba28 return err; 800ba22: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27 800ba26: e34a b.n 800c0be } queuelen = pcb->snd_queuelen; 800ba28: 68fb ldr r3, [r7, #12] 800ba2a: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66 800ba2e: f8a7 3048 strh.w r3, [r7, #72] ; 0x48 /* ensure that segments can hold at least one data byte... */ mss_local = LWIP_MAX(mss_local, LWIP_TCP_OPT_LEN_TS + 1); } else #endif /* LWIP_TCP_TIMESTAMPS */ { optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); 800ba32: 2300 movs r3, #0 800ba34: f887 3026 strb.w r3, [r7, #38] ; 0x26 * * pos records progress as data is segmented. */ /* Find the tail of the unsent queue. */ if (pcb->unsent != NULL) { 800ba38: 68fb ldr r3, [r7, #12] 800ba3a: 6edb ldr r3, [r3, #108] ; 0x6c 800ba3c: 2b00 cmp r3, #0 800ba3e: f000 8127 beq.w 800bc90 u16_t space; u16_t unsent_optlen; /* @todo: this could be sped up by keeping last_unsent in the pcb */ for (last_unsent = pcb->unsent; last_unsent->next != NULL; 800ba42: 68fb ldr r3, [r7, #12] 800ba44: 6edb ldr r3, [r3, #108] ; 0x6c 800ba46: 643b str r3, [r7, #64] ; 0x40 800ba48: e002 b.n 800ba50 last_unsent = last_unsent->next); 800ba4a: 6c3b ldr r3, [r7, #64] ; 0x40 800ba4c: 681b ldr r3, [r3, #0] 800ba4e: 643b str r3, [r7, #64] ; 0x40 for (last_unsent = pcb->unsent; last_unsent->next != NULL; 800ba50: 6c3b ldr r3, [r7, #64] ; 0x40 800ba52: 681b ldr r3, [r3, #0] 800ba54: 2b00 cmp r3, #0 800ba56: d1f8 bne.n 800ba4a /* Usable space at the end of the last unsent segment */ unsent_optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(last_unsent->flags, pcb); 800ba58: 6c3b ldr r3, [r7, #64] ; 0x40 800ba5a: 7b1b ldrb r3, [r3, #12] 800ba5c: 009b lsls r3, r3, #2 800ba5e: b29b uxth r3, r3 800ba60: f003 0304 and.w r3, r3, #4 800ba64: 84bb strh r3, [r7, #36] ; 0x24 LWIP_ASSERT("mss_local is too small", mss_local >= last_unsent->len + unsent_optlen); 800ba66: 8d3a ldrh r2, [r7, #40] ; 0x28 800ba68: 6c3b ldr r3, [r7, #64] ; 0x40 800ba6a: 891b ldrh r3, [r3, #8] 800ba6c: 4619 mov r1, r3 800ba6e: 8cbb ldrh r3, [r7, #36] ; 0x24 800ba70: 440b add r3, r1 800ba72: 429a cmp r2, r3 800ba74: da06 bge.n 800ba84 800ba76: 4b6c ldr r3, [pc, #432] ; (800bc28 ) 800ba78: f44f 72f3 mov.w r2, #486 ; 0x1e6 800ba7c: 496e ldr r1, [pc, #440] ; (800bc38 ) 800ba7e: 486c ldr r0, [pc, #432] ; (800bc30 ) 800ba80: f005 f8a2 bl 8010bc8 space = mss_local - (last_unsent->len + unsent_optlen); 800ba84: 6c3b ldr r3, [r7, #64] ; 0x40 800ba86: 891a ldrh r2, [r3, #8] 800ba88: 8cbb ldrh r3, [r7, #36] ; 0x24 800ba8a: 4413 add r3, r2 800ba8c: b29b uxth r3, r3 800ba8e: 8d3a ldrh r2, [r7, #40] ; 0x28 800ba90: 1ad3 subs r3, r2, r3 800ba92: f8a7 305c strh.w r3, [r7, #92] ; 0x5c * function. */ #if TCP_OVERSIZE #if TCP_OVERSIZE_DBGCHECK /* check that pcb->unsent_oversize matches last_unsent->oversize_left */ LWIP_ASSERT("unsent_oversize mismatch (pcb vs. last_unsent)", 800ba96: 68fb ldr r3, [r7, #12] 800ba98: f8b3 2068 ldrh.w r2, [r3, #104] ; 0x68 800ba9c: 6c3b ldr r3, [r7, #64] ; 0x40 800ba9e: 895b ldrh r3, [r3, #10] 800baa0: 429a cmp r2, r3 800baa2: d006 beq.n 800bab2 800baa4: 4b60 ldr r3, [pc, #384] ; (800bc28 ) 800baa6: f240 12f3 movw r2, #499 ; 0x1f3 800baaa: 4964 ldr r1, [pc, #400] ; (800bc3c ) 800baac: 4860 ldr r0, [pc, #384] ; (800bc30 ) 800baae: f005 f88b bl 8010bc8 pcb->unsent_oversize == last_unsent->oversize_left); #endif /* TCP_OVERSIZE_DBGCHECK */ oversize = pcb->unsent_oversize; 800bab2: 68fb ldr r3, [r7, #12] 800bab4: f8b3 3068 ldrh.w r3, [r3, #104] ; 0x68 800bab8: 82fb strh r3, [r7, #22] if (oversize > 0) { 800baba: 8afb ldrh r3, [r7, #22] 800babc: 2b00 cmp r3, #0 800babe: d02e beq.n 800bb1e LWIP_ASSERT("inconsistent oversize vs. space", oversize <= space); 800bac0: 8afb ldrh r3, [r7, #22] 800bac2: f8b7 205c ldrh.w r2, [r7, #92] ; 0x5c 800bac6: 429a cmp r2, r3 800bac8: d206 bcs.n 800bad8 800baca: 4b57 ldr r3, [pc, #348] ; (800bc28 ) 800bacc: f44f 72fc mov.w r2, #504 ; 0x1f8 800bad0: 495b ldr r1, [pc, #364] ; (800bc40 ) 800bad2: 4857 ldr r0, [pc, #348] ; (800bc30 ) 800bad4: f005 f878 bl 8010bc8 seg = last_unsent; 800bad8: 6c3b ldr r3, [r7, #64] ; 0x40 800bada: 657b str r3, [r7, #84] ; 0x54 oversize_used = LWIP_MIN(space, LWIP_MIN(oversize, len)); 800badc: 8afb ldrh r3, [r7, #22] 800bade: 88fa ldrh r2, [r7, #6] 800bae0: 4293 cmp r3, r2 800bae2: bf28 it cs 800bae4: 4613 movcs r3, r2 800bae6: b29b uxth r3, r3 800bae8: f8b7 205c ldrh.w r2, [r7, #92] ; 0x5c 800baec: 4293 cmp r3, r2 800baee: bf28 it cs 800baf0: 4613 movcs r3, r2 800baf2: f8a7 3046 strh.w r3, [r7, #70] ; 0x46 pos += oversize_used; 800baf6: f8b7 204a ldrh.w r2, [r7, #74] ; 0x4a 800bafa: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46 800bafe: 4413 add r3, r2 800bb00: f8a7 304a strh.w r3, [r7, #74] ; 0x4a oversize -= oversize_used; 800bb04: 8afa ldrh r2, [r7, #22] 800bb06: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46 800bb0a: 1ad3 subs r3, r2, r3 800bb0c: b29b uxth r3, r3 800bb0e: 82fb strh r3, [r7, #22] space -= oversize_used; 800bb10: f8b7 205c ldrh.w r2, [r7, #92] ; 0x5c 800bb14: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46 800bb18: 1ad3 subs r3, r2, r3 800bb1a: f8a7 305c strh.w r3, [r7, #92] ; 0x5c } /* now we are either finished or oversize is zero */ LWIP_ASSERT("inconsistent oversize vs. len", (oversize == 0) || (pos == len)); 800bb1e: 8afb ldrh r3, [r7, #22] 800bb20: 2b00 cmp r3, #0 800bb22: d00b beq.n 800bb3c 800bb24: f8b7 204a ldrh.w r2, [r7, #74] ; 0x4a 800bb28: 88fb ldrh r3, [r7, #6] 800bb2a: 429a cmp r2, r3 800bb2c: d006 beq.n 800bb3c 800bb2e: 4b3e ldr r3, [pc, #248] ; (800bc28 ) 800bb30: f44f 7200 mov.w r2, #512 ; 0x200 800bb34: 4943 ldr r1, [pc, #268] ; (800bc44 ) 800bb36: 483e ldr r0, [pc, #248] ; (800bc30 ) 800bb38: f005 f846 bl 8010bc8 * * This phase is skipped for LWIP_NETIF_TX_SINGLE_PBUF as we could only execute * it after rexmit puts a segment from unacked to unsent and at this point, * oversize info is lost. */ if ((pos < len) && (space > 0) && (last_unsent->len > 0)) { 800bb3c: f8b7 204a ldrh.w r2, [r7, #74] ; 0x4a 800bb40: 88fb ldrh r3, [r7, #6] 800bb42: 429a cmp r2, r3 800bb44: f080 8172 bcs.w 800be2c 800bb48: f8b7 305c ldrh.w r3, [r7, #92] ; 0x5c 800bb4c: 2b00 cmp r3, #0 800bb4e: f000 816d beq.w 800be2c 800bb52: 6c3b ldr r3, [r7, #64] ; 0x40 800bb54: 891b ldrh r3, [r3, #8] 800bb56: 2b00 cmp r3, #0 800bb58: f000 8168 beq.w 800be2c u16_t seglen = LWIP_MIN(space, len - pos); 800bb5c: 88fa ldrh r2, [r7, #6] 800bb5e: f8b7 304a ldrh.w r3, [r7, #74] ; 0x4a 800bb62: 1ad2 subs r2, r2, r3 800bb64: f8b7 305c ldrh.w r3, [r7, #92] ; 0x5c 800bb68: 4293 cmp r3, r2 800bb6a: bfa8 it ge 800bb6c: 4613 movge r3, r2 800bb6e: 847b strh r3, [r7, #34] ; 0x22 seg = last_unsent; 800bb70: 6c3b ldr r3, [r7, #64] ; 0x40 800bb72: 657b str r3, [r7, #84] ; 0x54 /* Create a pbuf with a copy or reference to seglen bytes. We * can use PBUF_RAW here since the data appears in the middle of * a segment. A header will never be prepended. */ if (apiflags & TCP_WRITE_FLAG_COPY) { 800bb74: 797b ldrb r3, [r7, #5] 800bb76: f003 0301 and.w r3, r3, #1 800bb7a: 2b00 cmp r3, #0 800bb7c: d02b beq.n 800bbd6 /* Data is copied */ if ((concat_p = tcp_pbuf_prealloc(PBUF_RAW, seglen, space, &oversize, pcb, apiflags, 1)) == NULL) { 800bb7e: f107 0016 add.w r0, r7, #22 800bb82: f8b7 205c ldrh.w r2, [r7, #92] ; 0x5c 800bb86: 8c79 ldrh r1, [r7, #34] ; 0x22 800bb88: 2301 movs r3, #1 800bb8a: 9302 str r3, [sp, #8] 800bb8c: 797b ldrb r3, [r7, #5] 800bb8e: 9301 str r3, [sp, #4] 800bb90: 68fb ldr r3, [r7, #12] 800bb92: 9300 str r3, [sp, #0] 800bb94: 4603 mov r3, r0 800bb96: 2000 movs r0, #0 800bb98: f7ff fdf0 bl 800b77c 800bb9c: 63f8 str r0, [r7, #60] ; 0x3c 800bb9e: 6bfb ldr r3, [r7, #60] ; 0x3c 800bba0: 2b00 cmp r3, #0 800bba2: f000 825a beq.w 800c05a ("tcp_write : could not allocate memory for pbuf copy size %"U16_F"\n", seglen)); goto memerr; } #if TCP_OVERSIZE_DBGCHECK oversize_add = oversize; 800bba6: 8afb ldrh r3, [r7, #22] 800bba8: f8a7 305a strh.w r3, [r7, #90] ; 0x5a #endif /* TCP_OVERSIZE_DBGCHECK */ TCP_DATA_COPY2(concat_p->payload, (const u8_t *)arg + pos, seglen, &concat_chksum, &concat_chksum_swapped); 800bbac: 6bfb ldr r3, [r7, #60] ; 0x3c 800bbae: 6858 ldr r0, [r3, #4] 800bbb0: f8b7 304a ldrh.w r3, [r7, #74] ; 0x4a 800bbb4: 68ba ldr r2, [r7, #8] 800bbb6: 4413 add r3, r2 800bbb8: 8c7a ldrh r2, [r7, #34] ; 0x22 800bbba: 4619 mov r1, r3 800bbbc: f005 f9e5 bl 8010f8a #if TCP_CHECKSUM_ON_COPY concat_chksummed += seglen; #endif /* TCP_CHECKSUM_ON_COPY */ queuelen += pbuf_clen(concat_p); 800bbc0: 6bf8 ldr r0, [r7, #60] ; 0x3c 800bbc2: f7fb fa8f bl 80070e4 800bbc6: 4603 mov r3, r0 800bbc8: 461a mov r2, r3 800bbca: f8b7 3048 ldrh.w r3, [r7, #72] ; 0x48 800bbce: 4413 add r3, r2 800bbd0: f8a7 3048 strh.w r3, [r7, #72] ; 0x48 800bbd4: e055 b.n 800bc82 } else { /* Data is not copied */ /* If the last unsent pbuf is of type PBUF_ROM, try to extend it. */ struct pbuf *p; for (p = last_unsent->p; p->next != NULL; p = p->next); 800bbd6: 6c3b ldr r3, [r7, #64] ; 0x40 800bbd8: 685b ldr r3, [r3, #4] 800bbda: 63bb str r3, [r7, #56] ; 0x38 800bbdc: e002 b.n 800bbe4 800bbde: 6bbb ldr r3, [r7, #56] ; 0x38 800bbe0: 681b ldr r3, [r3, #0] 800bbe2: 63bb str r3, [r7, #56] ; 0x38 800bbe4: 6bbb ldr r3, [r7, #56] ; 0x38 800bbe6: 681b ldr r3, [r3, #0] 800bbe8: 2b00 cmp r3, #0 800bbea: d1f8 bne.n 800bbde if (((p->type_internal & (PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS | PBUF_TYPE_FLAG_DATA_VOLATILE)) == 0) && 800bbec: 6bbb ldr r3, [r7, #56] ; 0x38 800bbee: 7b1b ldrb r3, [r3, #12] 800bbf0: f003 03c0 and.w r3, r3, #192 ; 0xc0 800bbf4: 2b00 cmp r3, #0 800bbf6: d129 bne.n 800bc4c (const u8_t *)p->payload + p->len == (const u8_t *)arg) { 800bbf8: 6bbb ldr r3, [r7, #56] ; 0x38 800bbfa: 685b ldr r3, [r3, #4] 800bbfc: 6bba ldr r2, [r7, #56] ; 0x38 800bbfe: 8952 ldrh r2, [r2, #10] 800bc00: 4413 add r3, r2 if (((p->type_internal & (PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS | PBUF_TYPE_FLAG_DATA_VOLATILE)) == 0) && 800bc02: 68ba ldr r2, [r7, #8] 800bc04: 429a cmp r2, r3 800bc06: d121 bne.n 800bc4c LWIP_ASSERT("tcp_write: ROM pbufs cannot be oversized", pos == 0); 800bc08: f8b7 304a ldrh.w r3, [r7, #74] ; 0x4a 800bc0c: 2b00 cmp r3, #0 800bc0e: d006 beq.n 800bc1e 800bc10: 4b05 ldr r3, [pc, #20] ; (800bc28 ) 800bc12: f240 2231 movw r2, #561 ; 0x231 800bc16: 490c ldr r1, [pc, #48] ; (800bc48 ) 800bc18: 4805 ldr r0, [pc, #20] ; (800bc30 ) 800bc1a: f004 ffd5 bl 8010bc8 extendlen = seglen; 800bc1e: 8c7b ldrh r3, [r7, #34] ; 0x22 800bc20: f8a7 305e strh.w r3, [r7, #94] ; 0x5e 800bc24: e02d b.n 800bc82 800bc26: bf00 nop 800bc28: 08013618 .word 0x08013618 800bc2c: 080137b8 .word 0x080137b8 800bc30: 0801366c .word 0x0801366c 800bc34: 080137d0 .word 0x080137d0 800bc38: 08013804 .word 0x08013804 800bc3c: 0801381c .word 0x0801381c 800bc40: 0801384c .word 0x0801384c 800bc44: 0801386c .word 0x0801386c 800bc48: 0801388c .word 0x0801388c } else { if ((concat_p = pbuf_alloc(PBUF_RAW, seglen, PBUF_ROM)) == NULL) { 800bc4c: 8c7b ldrh r3, [r7, #34] ; 0x22 800bc4e: 2201 movs r2, #1 800bc50: 4619 mov r1, r3 800bc52: 2000 movs r0, #0 800bc54: f7fa feda bl 8006a0c 800bc58: 63f8 str r0, [r7, #60] ; 0x3c 800bc5a: 6bfb ldr r3, [r7, #60] ; 0x3c 800bc5c: 2b00 cmp r3, #0 800bc5e: f000 81fe beq.w 800c05e LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write: could not allocate memory for zero-copy pbuf\n")); goto memerr; } /* reference the non-volatile payload data */ ((struct pbuf_rom *)concat_p)->payload = (const u8_t *)arg + pos; 800bc62: f8b7 304a ldrh.w r3, [r7, #74] ; 0x4a 800bc66: 68ba ldr r2, [r7, #8] 800bc68: 441a add r2, r3 800bc6a: 6bfb ldr r3, [r7, #60] ; 0x3c 800bc6c: 605a str r2, [r3, #4] queuelen += pbuf_clen(concat_p); 800bc6e: 6bf8 ldr r0, [r7, #60] ; 0x3c 800bc70: f7fb fa38 bl 80070e4 800bc74: 4603 mov r3, r0 800bc76: 461a mov r2, r3 800bc78: f8b7 3048 ldrh.w r3, [r7, #72] ; 0x48 800bc7c: 4413 add r3, r2 800bc7e: f8a7 3048 strh.w r3, [r7, #72] ; 0x48 &concat_chksum, &concat_chksum_swapped); concat_chksummed += seglen; #endif /* TCP_CHECKSUM_ON_COPY */ } pos += seglen; 800bc82: f8b7 204a ldrh.w r2, [r7, #74] ; 0x4a 800bc86: 8c7b ldrh r3, [r7, #34] ; 0x22 800bc88: 4413 add r3, r2 800bc8a: f8a7 304a strh.w r3, [r7, #74] ; 0x4a 800bc8e: e0cd b.n 800be2c } #endif /* !LWIP_NETIF_TX_SINGLE_PBUF */ } else { #if TCP_OVERSIZE LWIP_ASSERT("unsent_oversize mismatch (pcb->unsent is NULL)", 800bc90: 68fb ldr r3, [r7, #12] 800bc92: f8b3 3068 ldrh.w r3, [r3, #104] ; 0x68 800bc96: 2b00 cmp r3, #0 800bc98: f000 80c8 beq.w 800be2c 800bc9c: 4b72 ldr r3, [pc, #456] ; (800be68 ) 800bc9e: f240 224a movw r2, #586 ; 0x24a 800bca2: 4972 ldr r1, [pc, #456] ; (800be6c ) 800bca4: 4872 ldr r0, [pc, #456] ; (800be70 ) 800bca6: f004 ff8f bl 8010bc8 * Phase 3: Create new segments. * * The new segments are chained together in the local 'queue' * variable, ready to be appended to pcb->unsent. */ while (pos < len) { 800bcaa: e0bf b.n 800be2c struct pbuf *p; u16_t left = len - pos; 800bcac: 88fa ldrh r2, [r7, #6] 800bcae: f8b7 304a ldrh.w r3, [r7, #74] ; 0x4a 800bcb2: 1ad3 subs r3, r2, r3 800bcb4: 843b strh r3, [r7, #32] u16_t max_len = mss_local - optlen; 800bcb6: f897 3026 ldrb.w r3, [r7, #38] ; 0x26 800bcba: b29b uxth r3, r3 800bcbc: 8d3a ldrh r2, [r7, #40] ; 0x28 800bcbe: 1ad3 subs r3, r2, r3 800bcc0: 83fb strh r3, [r7, #30] u16_t seglen = LWIP_MIN(left, max_len); 800bcc2: 8bfa ldrh r2, [r7, #30] 800bcc4: 8c3b ldrh r3, [r7, #32] 800bcc6: 4293 cmp r3, r2 800bcc8: bf28 it cs 800bcca: 4613 movcs r3, r2 800bccc: 83bb strh r3, [r7, #28] #if TCP_CHECKSUM_ON_COPY u16_t chksum = 0; u8_t chksum_swapped = 0; #endif /* TCP_CHECKSUM_ON_COPY */ if (apiflags & TCP_WRITE_FLAG_COPY) { 800bcce: 797b ldrb r3, [r7, #5] 800bcd0: f003 0301 and.w r3, r3, #1 800bcd4: 2b00 cmp r3, #0 800bcd6: d036 beq.n 800bd46 /* If copy is set, memory should be allocated and data copied * into pbuf */ if ((p = tcp_pbuf_prealloc(PBUF_TRANSPORT, seglen + optlen, mss_local, &oversize, pcb, apiflags, queue == NULL)) == NULL) { 800bcd8: f897 3026 ldrb.w r3, [r7, #38] ; 0x26 800bcdc: b29a uxth r2, r3 800bcde: 8bbb ldrh r3, [r7, #28] 800bce0: 4413 add r3, r2 800bce2: b299 uxth r1, r3 800bce4: 6cfb ldr r3, [r7, #76] ; 0x4c 800bce6: 2b00 cmp r3, #0 800bce8: bf0c ite eq 800bcea: 2301 moveq r3, #1 800bcec: 2300 movne r3, #0 800bcee: b2db uxtb r3, r3 800bcf0: f107 0016 add.w r0, r7, #22 800bcf4: 8d3a ldrh r2, [r7, #40] ; 0x28 800bcf6: 9302 str r3, [sp, #8] 800bcf8: 797b ldrb r3, [r7, #5] 800bcfa: 9301 str r3, [sp, #4] 800bcfc: 68fb ldr r3, [r7, #12] 800bcfe: 9300 str r3, [sp, #0] 800bd00: 4603 mov r3, r0 800bd02: 2036 movs r0, #54 ; 0x36 800bd04: f7ff fd3a bl 800b77c 800bd08: 6378 str r0, [r7, #52] ; 0x34 800bd0a: 6b7b ldr r3, [r7, #52] ; 0x34 800bd0c: 2b00 cmp r3, #0 800bd0e: f000 81a8 beq.w 800c062 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write : could not allocate memory for pbuf copy size %"U16_F"\n", seglen)); goto memerr; } LWIP_ASSERT("tcp_write: check that first pbuf can hold the complete seglen", 800bd12: 6b7b ldr r3, [r7, #52] ; 0x34 800bd14: 895b ldrh r3, [r3, #10] 800bd16: 8bba ldrh r2, [r7, #28] 800bd18: 429a cmp r2, r3 800bd1a: d906 bls.n 800bd2a 800bd1c: 4b52 ldr r3, [pc, #328] ; (800be68 ) 800bd1e: f240 2266 movw r2, #614 ; 0x266 800bd22: 4954 ldr r1, [pc, #336] ; (800be74 ) 800bd24: 4852 ldr r0, [pc, #328] ; (800be70 ) 800bd26: f004 ff4f bl 8010bc8 (p->len >= seglen)); TCP_DATA_COPY2((char *)p->payload + optlen, (const u8_t *)arg + pos, seglen, &chksum, &chksum_swapped); 800bd2a: 6b7b ldr r3, [r7, #52] ; 0x34 800bd2c: 685a ldr r2, [r3, #4] 800bd2e: f897 3026 ldrb.w r3, [r7, #38] ; 0x26 800bd32: 18d0 adds r0, r2, r3 800bd34: f8b7 304a ldrh.w r3, [r7, #74] ; 0x4a 800bd38: 68ba ldr r2, [r7, #8] 800bd3a: 4413 add r3, r2 800bd3c: 8bba ldrh r2, [r7, #28] 800bd3e: 4619 mov r1, r3 800bd40: f005 f923 bl 8010f8a 800bd44: e02f b.n 800bda6 * sent out on the link (as it has to be ACKed by the remote * party) we can safely use PBUF_ROM instead of PBUF_REF here. */ struct pbuf *p2; #if TCP_OVERSIZE LWIP_ASSERT("oversize == 0", oversize == 0); 800bd46: 8afb ldrh r3, [r7, #22] 800bd48: 2b00 cmp r3, #0 800bd4a: d006 beq.n 800bd5a 800bd4c: 4b46 ldr r3, [pc, #280] ; (800be68 ) 800bd4e: f240 2271 movw r2, #625 ; 0x271 800bd52: 4949 ldr r1, [pc, #292] ; (800be78 ) 800bd54: 4846 ldr r0, [pc, #280] ; (800be70 ) 800bd56: f004 ff37 bl 8010bc8 #endif /* TCP_OVERSIZE */ if ((p2 = pbuf_alloc(PBUF_TRANSPORT, seglen, PBUF_ROM)) == NULL) { 800bd5a: 8bbb ldrh r3, [r7, #28] 800bd5c: 2201 movs r2, #1 800bd5e: 4619 mov r1, r3 800bd60: 2036 movs r0, #54 ; 0x36 800bd62: f7fa fe53 bl 8006a0c 800bd66: 61b8 str r0, [r7, #24] 800bd68: 69bb ldr r3, [r7, #24] 800bd6a: 2b00 cmp r3, #0 800bd6c: f000 817b beq.w 800c066 chksum_swapped = 1; chksum = SWAP_BYTES_IN_WORD(chksum); } #endif /* TCP_CHECKSUM_ON_COPY */ /* reference the non-volatile payload data */ ((struct pbuf_rom *)p2)->payload = (const u8_t *)arg + pos; 800bd70: f8b7 304a ldrh.w r3, [r7, #74] ; 0x4a 800bd74: 68ba ldr r2, [r7, #8] 800bd76: 441a add r2, r3 800bd78: 69bb ldr r3, [r7, #24] 800bd7a: 605a str r2, [r3, #4] /* Second, allocate a pbuf for the headers. */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 800bd7c: f897 3026 ldrb.w r3, [r7, #38] ; 0x26 800bd80: b29b uxth r3, r3 800bd82: f44f 7220 mov.w r2, #640 ; 0x280 800bd86: 4619 mov r1, r3 800bd88: 2036 movs r0, #54 ; 0x36 800bd8a: f7fa fe3f bl 8006a0c 800bd8e: 6378 str r0, [r7, #52] ; 0x34 800bd90: 6b7b ldr r3, [r7, #52] ; 0x34 800bd92: 2b00 cmp r3, #0 800bd94: d103 bne.n 800bd9e /* If allocation fails, we have to deallocate the data pbuf as * well. */ pbuf_free(p2); 800bd96: 69b8 ldr r0, [r7, #24] 800bd98: f7fb f91c bl 8006fd4 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write: could not allocate memory for header pbuf\n")); goto memerr; 800bd9c: e166 b.n 800c06c } /* Concatenate the headers and data pbufs together. */ pbuf_cat(p/*header*/, p2/*data*/); 800bd9e: 69b9 ldr r1, [r7, #24] 800bda0: 6b78 ldr r0, [r7, #52] ; 0x34 800bda2: f7fb f9d9 bl 8007158 } queuelen += pbuf_clen(p); 800bda6: 6b78 ldr r0, [r7, #52] ; 0x34 800bda8: f7fb f99c bl 80070e4 800bdac: 4603 mov r3, r0 800bdae: 461a mov r2, r3 800bdb0: f8b7 3048 ldrh.w r3, [r7, #72] ; 0x48 800bdb4: 4413 add r3, r2 800bdb6: f8a7 3048 strh.w r3, [r7, #72] ; 0x48 /* Now that there are more segments queued, we check again if the * length of the queue exceeds the configured maximum or * overflows. */ if (queuelen > LWIP_MIN(TCP_SND_QUEUELEN, TCP_SNDQUEUELEN_OVERFLOW)) { 800bdba: f8b7 3048 ldrh.w r3, [r7, #72] ; 0x48 800bdbe: 2b09 cmp r3, #9 800bdc0: d903 bls.n 800bdca LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write: queue too long %"U16_F" (%d)\n", queuelen, (int)TCP_SND_QUEUELEN)); pbuf_free(p); 800bdc2: 6b78 ldr r0, [r7, #52] ; 0x34 800bdc4: f7fb f906 bl 8006fd4 goto memerr; 800bdc8: e150 b.n 800c06c } if ((seg = tcp_create_segment(pcb, p, 0, pcb->snd_lbb + pos, optflags)) == NULL) { 800bdca: 68fb ldr r3, [r7, #12] 800bdcc: 6dda ldr r2, [r3, #92] ; 0x5c 800bdce: f8b7 304a ldrh.w r3, [r7, #74] ; 0x4a 800bdd2: 441a add r2, r3 800bdd4: f897 302b ldrb.w r3, [r7, #43] ; 0x2b 800bdd8: 9300 str r3, [sp, #0] 800bdda: 4613 mov r3, r2 800bddc: 2200 movs r2, #0 800bdde: 6b79 ldr r1, [r7, #52] ; 0x34 800bde0: 68f8 ldr r0, [r7, #12] 800bde2: f7ff fc2b bl 800b63c 800bde6: 6578 str r0, [r7, #84] ; 0x54 800bde8: 6d7b ldr r3, [r7, #84] ; 0x54 800bdea: 2b00 cmp r3, #0 800bdec: f000 813d beq.w 800c06a goto memerr; } #if TCP_OVERSIZE_DBGCHECK seg->oversize_left = oversize; 800bdf0: 8afa ldrh r2, [r7, #22] 800bdf2: 6d7b ldr r3, [r7, #84] ; 0x54 800bdf4: 815a strh r2, [r3, #10] seg->chksum_swapped = chksum_swapped; seg->flags |= TF_SEG_DATA_CHECKSUMMED; #endif /* TCP_CHECKSUM_ON_COPY */ /* first segment of to-be-queued data? */ if (queue == NULL) { 800bdf6: 6cfb ldr r3, [r7, #76] ; 0x4c 800bdf8: 2b00 cmp r3, #0 800bdfa: d102 bne.n 800be02 queue = seg; 800bdfc: 6d7b ldr r3, [r7, #84] ; 0x54 800bdfe: 64fb str r3, [r7, #76] ; 0x4c 800be00: e00c b.n 800be1c } else { /* Attach the segment to the end of the queued segments */ LWIP_ASSERT("prev_seg != NULL", prev_seg != NULL); 800be02: 6d3b ldr r3, [r7, #80] ; 0x50 800be04: 2b00 cmp r3, #0 800be06: d106 bne.n 800be16 800be08: 4b17 ldr r3, [pc, #92] ; (800be68 ) 800be0a: f240 22ab movw r2, #683 ; 0x2ab 800be0e: 491b ldr r1, [pc, #108] ; (800be7c ) 800be10: 4817 ldr r0, [pc, #92] ; (800be70 ) 800be12: f004 fed9 bl 8010bc8 prev_seg->next = seg; 800be16: 6d3b ldr r3, [r7, #80] ; 0x50 800be18: 6d7a ldr r2, [r7, #84] ; 0x54 800be1a: 601a str r2, [r3, #0] } /* remember last segment of to-be-queued data for next iteration */ prev_seg = seg; 800be1c: 6d7b ldr r3, [r7, #84] ; 0x54 800be1e: 653b str r3, [r7, #80] ; 0x50 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_TRACE, ("tcp_write: queueing %"U32_F":%"U32_F"\n", lwip_ntohl(seg->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg))); pos += seglen; 800be20: f8b7 204a ldrh.w r2, [r7, #74] ; 0x4a 800be24: 8bbb ldrh r3, [r7, #28] 800be26: 4413 add r3, r2 800be28: f8a7 304a strh.w r3, [r7, #74] ; 0x4a while (pos < len) { 800be2c: f8b7 204a ldrh.w r2, [r7, #74] ; 0x4a 800be30: 88fb ldrh r3, [r7, #6] 800be32: 429a cmp r2, r3 800be34: f4ff af3a bcc.w 800bcac /* * All three segmentation phases were successful. We can commit the * transaction. */ #if TCP_OVERSIZE_DBGCHECK if ((last_unsent != NULL) && (oversize_add != 0)) { 800be38: 6c3b ldr r3, [r7, #64] ; 0x40 800be3a: 2b00 cmp r3, #0 800be3c: d00b beq.n 800be56 800be3e: f8b7 305a ldrh.w r3, [r7, #90] ; 0x5a 800be42: 2b00 cmp r3, #0 800be44: d007 beq.n 800be56 last_unsent->oversize_left += oversize_add; 800be46: 6c3b ldr r3, [r7, #64] ; 0x40 800be48: 895a ldrh r2, [r3, #10] 800be4a: f8b7 305a ldrh.w r3, [r7, #90] ; 0x5a 800be4e: 4413 add r3, r2 800be50: b29a uxth r2, r3 800be52: 6c3b ldr r3, [r7, #64] ; 0x40 800be54: 815a strh r2, [r3, #10] /* * Phase 1: If data has been added to the preallocated tail of * last_unsent, we update the length fields of the pbuf chain. */ #if TCP_OVERSIZE if (oversize_used > 0) { 800be56: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46 800be5a: 2b00 cmp r3, #0 800be5c: d052 beq.n 800bf04 struct pbuf *p; /* Bump tot_len of whole chain, len of tail */ for (p = last_unsent->p; p; p = p->next) { 800be5e: 6c3b ldr r3, [r7, #64] ; 0x40 800be60: 685b ldr r3, [r3, #4] 800be62: 633b str r3, [r7, #48] ; 0x30 800be64: e02e b.n 800bec4 800be66: bf00 nop 800be68: 08013618 .word 0x08013618 800be6c: 080138b8 .word 0x080138b8 800be70: 0801366c .word 0x0801366c 800be74: 080138e8 .word 0x080138e8 800be78: 08013928 .word 0x08013928 800be7c: 08013938 .word 0x08013938 p->tot_len += oversize_used; 800be80: 6b3b ldr r3, [r7, #48] ; 0x30 800be82: 891a ldrh r2, [r3, #8] 800be84: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46 800be88: 4413 add r3, r2 800be8a: b29a uxth r2, r3 800be8c: 6b3b ldr r3, [r7, #48] ; 0x30 800be8e: 811a strh r2, [r3, #8] if (p->next == NULL) { 800be90: 6b3b ldr r3, [r7, #48] ; 0x30 800be92: 681b ldr r3, [r3, #0] 800be94: 2b00 cmp r3, #0 800be96: d112 bne.n 800bebe TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent); 800be98: 6b3b ldr r3, [r7, #48] ; 0x30 800be9a: 685b ldr r3, [r3, #4] 800be9c: 6b3a ldr r2, [r7, #48] ; 0x30 800be9e: 8952 ldrh r2, [r2, #10] 800bea0: 4413 add r3, r2 800bea2: f8b7 2046 ldrh.w r2, [r7, #70] ; 0x46 800bea6: 68b9 ldr r1, [r7, #8] 800bea8: 4618 mov r0, r3 800beaa: f005 f86e bl 8010f8a p->len += oversize_used; 800beae: 6b3b ldr r3, [r7, #48] ; 0x30 800beb0: 895a ldrh r2, [r3, #10] 800beb2: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46 800beb6: 4413 add r3, r2 800beb8: b29a uxth r2, r3 800beba: 6b3b ldr r3, [r7, #48] ; 0x30 800bebc: 815a strh r2, [r3, #10] for (p = last_unsent->p; p; p = p->next) { 800bebe: 6b3b ldr r3, [r7, #48] ; 0x30 800bec0: 681b ldr r3, [r3, #0] 800bec2: 633b str r3, [r7, #48] ; 0x30 800bec4: 6b3b ldr r3, [r7, #48] ; 0x30 800bec6: 2b00 cmp r3, #0 800bec8: d1da bne.n 800be80 } } last_unsent->len += oversize_used; 800beca: 6c3b ldr r3, [r7, #64] ; 0x40 800becc: 891a ldrh r2, [r3, #8] 800bece: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46 800bed2: 4413 add r3, r2 800bed4: b29a uxth r2, r3 800bed6: 6c3b ldr r3, [r7, #64] ; 0x40 800bed8: 811a strh r2, [r3, #8] #if TCP_OVERSIZE_DBGCHECK LWIP_ASSERT("last_unsent->oversize_left >= oversize_used", 800beda: 6c3b ldr r3, [r7, #64] ; 0x40 800bedc: 895b ldrh r3, [r3, #10] 800bede: f8b7 2046 ldrh.w r2, [r7, #70] ; 0x46 800bee2: 429a cmp r2, r3 800bee4: d906 bls.n 800bef4 800bee6: 4b78 ldr r3, [pc, #480] ; (800c0c8 ) 800bee8: f240 22d3 movw r2, #723 ; 0x2d3 800beec: 4977 ldr r1, [pc, #476] ; (800c0cc ) 800beee: 4878 ldr r0, [pc, #480] ; (800c0d0 ) 800bef0: f004 fe6a bl 8010bc8 last_unsent->oversize_left >= oversize_used); last_unsent->oversize_left -= oversize_used; 800bef4: 6c3b ldr r3, [r7, #64] ; 0x40 800bef6: 895a ldrh r2, [r3, #10] 800bef8: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46 800befc: 1ad3 subs r3, r2, r3 800befe: b29a uxth r2, r3 800bf00: 6c3b ldr r3, [r7, #64] ; 0x40 800bf02: 815a strh r2, [r3, #10] #endif /* TCP_OVERSIZE_DBGCHECK */ } pcb->unsent_oversize = oversize; 800bf04: 8afa ldrh r2, [r7, #22] 800bf06: 68fb ldr r3, [r7, #12] 800bf08: f8a3 2068 strh.w r2, [r3, #104] ; 0x68 /* * Phase 2: concat_p can be concatenated onto last_unsent->p, unless we * determined that the last ROM pbuf can be extended to include the new data. */ if (concat_p != NULL) { 800bf0c: 6bfb ldr r3, [r7, #60] ; 0x3c 800bf0e: 2b00 cmp r3, #0 800bf10: d018 beq.n 800bf44 LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty", 800bf12: 6c3b ldr r3, [r7, #64] ; 0x40 800bf14: 2b00 cmp r3, #0 800bf16: d106 bne.n 800bf26 800bf18: 4b6b ldr r3, [pc, #428] ; (800c0c8 ) 800bf1a: f44f 7238 mov.w r2, #736 ; 0x2e0 800bf1e: 496d ldr r1, [pc, #436] ; (800c0d4 ) 800bf20: 486b ldr r0, [pc, #428] ; (800c0d0 ) 800bf22: f004 fe51 bl 8010bc8 (last_unsent != NULL)); pbuf_cat(last_unsent->p, concat_p); 800bf26: 6c3b ldr r3, [r7, #64] ; 0x40 800bf28: 685b ldr r3, [r3, #4] 800bf2a: 6bf9 ldr r1, [r7, #60] ; 0x3c 800bf2c: 4618 mov r0, r3 800bf2e: f7fb f913 bl 8007158 last_unsent->len += concat_p->tot_len; 800bf32: 6c3b ldr r3, [r7, #64] ; 0x40 800bf34: 891a ldrh r2, [r3, #8] 800bf36: 6bfb ldr r3, [r7, #60] ; 0x3c 800bf38: 891b ldrh r3, [r3, #8] 800bf3a: 4413 add r3, r2 800bf3c: b29a uxth r2, r3 800bf3e: 6c3b ldr r3, [r7, #64] ; 0x40 800bf40: 811a strh r2, [r3, #8] 800bf42: e03c b.n 800bfbe } else if (extendlen > 0) { 800bf44: f8b7 305e ldrh.w r3, [r7, #94] ; 0x5e 800bf48: 2b00 cmp r3, #0 800bf4a: d038 beq.n 800bfbe struct pbuf *p; LWIP_ASSERT("tcp_write: extension of reference requires reference", 800bf4c: 6c3b ldr r3, [r7, #64] ; 0x40 800bf4e: 2b00 cmp r3, #0 800bf50: d003 beq.n 800bf5a 800bf52: 6c3b ldr r3, [r7, #64] ; 0x40 800bf54: 685b ldr r3, [r3, #4] 800bf56: 2b00 cmp r3, #0 800bf58: d106 bne.n 800bf68 800bf5a: 4b5b ldr r3, [pc, #364] ; (800c0c8 ) 800bf5c: f240 22e6 movw r2, #742 ; 0x2e6 800bf60: 495d ldr r1, [pc, #372] ; (800c0d8 ) 800bf62: 485b ldr r0, [pc, #364] ; (800c0d0 ) 800bf64: f004 fe30 bl 8010bc8 last_unsent != NULL && last_unsent->p != NULL); for (p = last_unsent->p; p->next != NULL; p = p->next) { 800bf68: 6c3b ldr r3, [r7, #64] ; 0x40 800bf6a: 685b ldr r3, [r3, #4] 800bf6c: 62fb str r3, [r7, #44] ; 0x2c 800bf6e: e00a b.n 800bf86 p->tot_len += extendlen; 800bf70: 6afb ldr r3, [r7, #44] ; 0x2c 800bf72: 891a ldrh r2, [r3, #8] 800bf74: f8b7 305e ldrh.w r3, [r7, #94] ; 0x5e 800bf78: 4413 add r3, r2 800bf7a: b29a uxth r2, r3 800bf7c: 6afb ldr r3, [r7, #44] ; 0x2c 800bf7e: 811a strh r2, [r3, #8] for (p = last_unsent->p; p->next != NULL; p = p->next) { 800bf80: 6afb ldr r3, [r7, #44] ; 0x2c 800bf82: 681b ldr r3, [r3, #0] 800bf84: 62fb str r3, [r7, #44] ; 0x2c 800bf86: 6afb ldr r3, [r7, #44] ; 0x2c 800bf88: 681b ldr r3, [r3, #0] 800bf8a: 2b00 cmp r3, #0 800bf8c: d1f0 bne.n 800bf70 } p->tot_len += extendlen; 800bf8e: 6afb ldr r3, [r7, #44] ; 0x2c 800bf90: 891a ldrh r2, [r3, #8] 800bf92: f8b7 305e ldrh.w r3, [r7, #94] ; 0x5e 800bf96: 4413 add r3, r2 800bf98: b29a uxth r2, r3 800bf9a: 6afb ldr r3, [r7, #44] ; 0x2c 800bf9c: 811a strh r2, [r3, #8] p->len += extendlen; 800bf9e: 6afb ldr r3, [r7, #44] ; 0x2c 800bfa0: 895a ldrh r2, [r3, #10] 800bfa2: f8b7 305e ldrh.w r3, [r7, #94] ; 0x5e 800bfa6: 4413 add r3, r2 800bfa8: b29a uxth r2, r3 800bfaa: 6afb ldr r3, [r7, #44] ; 0x2c 800bfac: 815a strh r2, [r3, #10] last_unsent->len += extendlen; 800bfae: 6c3b ldr r3, [r7, #64] ; 0x40 800bfb0: 891a ldrh r2, [r3, #8] 800bfb2: f8b7 305e ldrh.w r3, [r7, #94] ; 0x5e 800bfb6: 4413 add r3, r2 800bfb8: b29a uxth r2, r3 800bfba: 6c3b ldr r3, [r7, #64] ; 0x40 800bfbc: 811a strh r2, [r3, #8] /* * Phase 3: Append queue to pcb->unsent. Queue may be NULL, but that * is harmless */ if (last_unsent == NULL) { 800bfbe: 6c3b ldr r3, [r7, #64] ; 0x40 800bfc0: 2b00 cmp r3, #0 800bfc2: d103 bne.n 800bfcc pcb->unsent = queue; 800bfc4: 68fb ldr r3, [r7, #12] 800bfc6: 6cfa ldr r2, [r7, #76] ; 0x4c 800bfc8: 66da str r2, [r3, #108] ; 0x6c 800bfca: e002 b.n 800bfd2 } else { last_unsent->next = queue; 800bfcc: 6c3b ldr r3, [r7, #64] ; 0x40 800bfce: 6cfa ldr r2, [r7, #76] ; 0x4c 800bfd0: 601a str r2, [r3, #0] } /* * Finally update the pcb state. */ pcb->snd_lbb += len; 800bfd2: 68fb ldr r3, [r7, #12] 800bfd4: 6dda ldr r2, [r3, #92] ; 0x5c 800bfd6: 88fb ldrh r3, [r7, #6] 800bfd8: 441a add r2, r3 800bfda: 68fb ldr r3, [r7, #12] 800bfdc: 65da str r2, [r3, #92] ; 0x5c pcb->snd_buf -= len; 800bfde: 68fb ldr r3, [r7, #12] 800bfe0: f8b3 2064 ldrh.w r2, [r3, #100] ; 0x64 800bfe4: 88fb ldrh r3, [r7, #6] 800bfe6: 1ad3 subs r3, r2, r3 800bfe8: b29a uxth r2, r3 800bfea: 68fb ldr r3, [r7, #12] 800bfec: f8a3 2064 strh.w r2, [r3, #100] ; 0x64 pcb->snd_queuelen = queuelen; 800bff0: 68fb ldr r3, [r7, #12] 800bff2: f8b7 2048 ldrh.w r2, [r7, #72] ; 0x48 800bff6: f8a3 2066 strh.w r2, [r3, #102] ; 0x66 LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_write: %"S16_F" (after enqueued)\n", pcb->snd_queuelen)); if (pcb->snd_queuelen != 0) { 800bffa: 68fb ldr r3, [r7, #12] 800bffc: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66 800c000: 2b00 cmp r3, #0 800c002: d00e beq.n 800c022 LWIP_ASSERT("tcp_write: valid queue length", 800c004: 68fb ldr r3, [r7, #12] 800c006: 6f1b ldr r3, [r3, #112] ; 0x70 800c008: 2b00 cmp r3, #0 800c00a: d10a bne.n 800c022 800c00c: 68fb ldr r3, [r7, #12] 800c00e: 6edb ldr r3, [r3, #108] ; 0x6c 800c010: 2b00 cmp r3, #0 800c012: d106 bne.n 800c022 800c014: 4b2c ldr r3, [pc, #176] ; (800c0c8 ) 800c016: f240 3212 movw r2, #786 ; 0x312 800c01a: 4930 ldr r1, [pc, #192] ; (800c0dc ) 800c01c: 482c ldr r0, [pc, #176] ; (800c0d0 ) 800c01e: f004 fdd3 bl 8010bc8 pcb->unacked != NULL || pcb->unsent != NULL); } /* Set the PSH flag in the last segment that we enqueued. */ if (seg != NULL && seg->tcphdr != NULL && ((apiflags & TCP_WRITE_FLAG_MORE) == 0)) { 800c022: 6d7b ldr r3, [r7, #84] ; 0x54 800c024: 2b00 cmp r3, #0 800c026: d016 beq.n 800c056 800c028: 6d7b ldr r3, [r7, #84] ; 0x54 800c02a: 691b ldr r3, [r3, #16] 800c02c: 2b00 cmp r3, #0 800c02e: d012 beq.n 800c056 800c030: 797b ldrb r3, [r7, #5] 800c032: f003 0302 and.w r3, r3, #2 800c036: 2b00 cmp r3, #0 800c038: d10d bne.n 800c056 TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); 800c03a: 6d7b ldr r3, [r7, #84] ; 0x54 800c03c: 691b ldr r3, [r3, #16] 800c03e: 899b ldrh r3, [r3, #12] 800c040: b29c uxth r4, r3 800c042: 2008 movs r0, #8 800c044: f7f9 fa82 bl 800554c 800c048: 4603 mov r3, r0 800c04a: 461a mov r2, r3 800c04c: 6d7b ldr r3, [r7, #84] ; 0x54 800c04e: 691b ldr r3, [r3, #16] 800c050: 4322 orrs r2, r4 800c052: b292 uxth r2, r2 800c054: 819a strh r2, [r3, #12] } return ERR_OK; 800c056: 2300 movs r3, #0 800c058: e031 b.n 800c0be goto memerr; 800c05a: bf00 nop 800c05c: e006 b.n 800c06c goto memerr; 800c05e: bf00 nop 800c060: e004 b.n 800c06c goto memerr; 800c062: bf00 nop 800c064: e002 b.n 800c06c goto memerr; 800c066: bf00 nop 800c068: e000 b.n 800c06c goto memerr; 800c06a: bf00 nop memerr: tcp_set_flags(pcb, TF_NAGLEMEMERR); 800c06c: 68fb ldr r3, [r7, #12] 800c06e: 8b5b ldrh r3, [r3, #26] 800c070: f043 0380 orr.w r3, r3, #128 ; 0x80 800c074: b29a uxth r2, r3 800c076: 68fb ldr r3, [r7, #12] 800c078: 835a strh r2, [r3, #26] TCP_STATS_INC(tcp.memerr); if (concat_p != NULL) { 800c07a: 6bfb ldr r3, [r7, #60] ; 0x3c 800c07c: 2b00 cmp r3, #0 800c07e: d002 beq.n 800c086 pbuf_free(concat_p); 800c080: 6bf8 ldr r0, [r7, #60] ; 0x3c 800c082: f7fa ffa7 bl 8006fd4 } if (queue != NULL) { 800c086: 6cfb ldr r3, [r7, #76] ; 0x4c 800c088: 2b00 cmp r3, #0 800c08a: d002 beq.n 800c092 tcp_segs_free(queue); 800c08c: 6cf8 ldr r0, [r7, #76] ; 0x4c 800c08e: f7fc fb5d bl 800874c } if (pcb->snd_queuelen != 0) { 800c092: 68fb ldr r3, [r7, #12] 800c094: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66 800c098: 2b00 cmp r3, #0 800c09a: d00e beq.n 800c0ba LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL || 800c09c: 68fb ldr r3, [r7, #12] 800c09e: 6f1b ldr r3, [r3, #112] ; 0x70 800c0a0: 2b00 cmp r3, #0 800c0a2: d10a bne.n 800c0ba 800c0a4: 68fb ldr r3, [r7, #12] 800c0a6: 6edb ldr r3, [r3, #108] ; 0x6c 800c0a8: 2b00 cmp r3, #0 800c0aa: d106 bne.n 800c0ba 800c0ac: 4b06 ldr r3, [pc, #24] ; (800c0c8 ) 800c0ae: f240 3227 movw r2, #807 ; 0x327 800c0b2: 490a ldr r1, [pc, #40] ; (800c0dc ) 800c0b4: 4806 ldr r0, [pc, #24] ; (800c0d0 ) 800c0b6: f004 fd87 bl 8010bc8 pcb->unsent != NULL); } LWIP_DEBUGF(TCP_QLEN_DEBUG | LWIP_DBG_STATE, ("tcp_write: %"S16_F" (with mem err)\n", pcb->snd_queuelen)); return ERR_MEM; 800c0ba: f04f 33ff mov.w r3, #4294967295 } 800c0be: 4618 mov r0, r3 800c0c0: 3764 adds r7, #100 ; 0x64 800c0c2: 46bd mov sp, r7 800c0c4: bd90 pop {r4, r7, pc} 800c0c6: bf00 nop 800c0c8: 08013618 .word 0x08013618 800c0cc: 0801394c .word 0x0801394c 800c0d0: 0801366c .word 0x0801366c 800c0d4: 08013978 .word 0x08013978 800c0d8: 080139b0 .word 0x080139b0 800c0dc: 080139e8 .word 0x080139e8 0800c0e0 : * @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) { 800c0e0: b590 push {r4, r7, lr} 800c0e2: b08b sub sp, #44 ; 0x2c 800c0e4: af02 add r7, sp, #8 800c0e6: 6078 str r0, [r7, #4] 800c0e8: 460b mov r3, r1 800c0ea: 807b strh r3, [r7, #2] struct tcp_seg *seg = NULL, *useg = NULL; 800c0ec: 2300 movs r3, #0 800c0ee: 61bb str r3, [r7, #24] 800c0f0: 2300 movs r3, #0 800c0f2: 617b str r3, [r7, #20] struct pbuf *p = NULL; 800c0f4: 2300 movs r3, #0 800c0f6: 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); 800c0f8: 687b ldr r3, [r7, #4] 800c0fa: 2b00 cmp r3, #0 800c0fc: d106 bne.n 800c10c 800c0fe: 4b97 ldr r3, [pc, #604] ; (800c35c ) 800c100: f240 324b movw r2, #843 ; 0x34b 800c104: 4996 ldr r1, [pc, #600] ; (800c360 ) 800c106: 4897 ldr r0, [pc, #604] ; (800c364 ) 800c108: f004 fd5e bl 8010bc8 useg = pcb->unsent; 800c10c: 687b ldr r3, [r7, #4] 800c10e: 6edb ldr r3, [r3, #108] ; 0x6c 800c110: 617b str r3, [r7, #20] if (useg == NULL) { 800c112: 697b ldr r3, [r7, #20] 800c114: 2b00 cmp r3, #0 800c116: d102 bne.n 800c11e return ERR_MEM; 800c118: f04f 33ff mov.w r3, #4294967295 800c11c: e119 b.n 800c352 } if (split == 0) { 800c11e: 887b ldrh r3, [r7, #2] 800c120: 2b00 cmp r3, #0 800c122: d109 bne.n 800c138 LWIP_ASSERT("Can't split segment into length 0", 0); 800c124: 4b8d ldr r3, [pc, #564] ; (800c35c ) 800c126: f240 3253 movw r2, #851 ; 0x353 800c12a: 498f ldr r1, [pc, #572] ; (800c368 ) 800c12c: 488d ldr r0, [pc, #564] ; (800c364 ) 800c12e: f004 fd4b bl 8010bc8 return ERR_VAL; 800c132: f06f 0305 mvn.w r3, #5 800c136: e10c b.n 800c352 } if (useg->len <= split) { 800c138: 697b ldr r3, [r7, #20] 800c13a: 891b ldrh r3, [r3, #8] 800c13c: 887a ldrh r2, [r7, #2] 800c13e: 429a cmp r2, r3 800c140: d301 bcc.n 800c146 return ERR_OK; 800c142: 2300 movs r3, #0 800c144: e105 b.n 800c352 } LWIP_ASSERT("split <= mss", split <= pcb->mss); 800c146: 687b ldr r3, [r7, #4] 800c148: 8e5b ldrh r3, [r3, #50] ; 0x32 800c14a: 887a ldrh r2, [r7, #2] 800c14c: 429a cmp r2, r3 800c14e: d906 bls.n 800c15e 800c150: 4b82 ldr r3, [pc, #520] ; (800c35c ) 800c152: f240 325b movw r2, #859 ; 0x35b 800c156: 4985 ldr r1, [pc, #532] ; (800c36c ) 800c158: 4882 ldr r0, [pc, #520] ; (800c364 ) 800c15a: f004 fd35 bl 8010bc8 LWIP_ASSERT("useg->len > 0", useg->len > 0); 800c15e: 697b ldr r3, [r7, #20] 800c160: 891b ldrh r3, [r3, #8] 800c162: 2b00 cmp r3, #0 800c164: d106 bne.n 800c174 800c166: 4b7d ldr r3, [pc, #500] ; (800c35c ) 800c168: f44f 7257 mov.w r2, #860 ; 0x35c 800c16c: 4980 ldr r1, [pc, #512] ; (800c370 ) 800c16e: 487d ldr r0, [pc, #500] ; (800c364 ) 800c170: f004 fd2a bl 8010bc8 * 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; 800c174: 697b ldr r3, [r7, #20] 800c176: 7b1b ldrb r3, [r3, #12] 800c178: 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); 800c17a: 7bfb ldrb r3, [r7, #15] 800c17c: 009b lsls r3, r3, #2 800c17e: b2db uxtb r3, r3 800c180: f003 0304 and.w r3, r3, #4 800c184: 73bb strb r3, [r7, #14] remainder = useg->len - split; 800c186: 697b ldr r3, [r7, #20] 800c188: 891a ldrh r2, [r3, #8] 800c18a: 887b ldrh r3, [r7, #2] 800c18c: 1ad3 subs r3, r2, r3 800c18e: 81bb strh r3, [r7, #12] /* Create new pbuf for the remainder of the split */ p = pbuf_alloc(PBUF_TRANSPORT, remainder + optlen, PBUF_RAM); 800c190: 7bbb ldrb r3, [r7, #14] 800c192: b29a uxth r2, r3 800c194: 89bb ldrh r3, [r7, #12] 800c196: 4413 add r3, r2 800c198: b29b uxth r3, r3 800c19a: f44f 7220 mov.w r2, #640 ; 0x280 800c19e: 4619 mov r1, r3 800c1a0: 2036 movs r0, #54 ; 0x36 800c1a2: f7fa fc33 bl 8006a0c 800c1a6: 6138 str r0, [r7, #16] if (p == NULL) { 800c1a8: 693b ldr r3, [r7, #16] 800c1aa: 2b00 cmp r3, #0 800c1ac: f000 80ba beq.w 800c324 ("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; 800c1b0: 697b ldr r3, [r7, #20] 800c1b2: 685b ldr r3, [r3, #4] 800c1b4: 891a ldrh r2, [r3, #8] 800c1b6: 697b ldr r3, [r7, #20] 800c1b8: 891b ldrh r3, [r3, #8] 800c1ba: 1ad3 subs r3, r2, r3 800c1bc: b29a uxth r2, r3 800c1be: 887b ldrh r3, [r7, #2] 800c1c0: 4413 add r3, r2 800c1c2: 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) { 800c1c4: 697b ldr r3, [r7, #20] 800c1c6: 6858 ldr r0, [r3, #4] 800c1c8: 693b ldr r3, [r7, #16] 800c1ca: 685a ldr r2, [r3, #4] 800c1cc: 7bbb ldrb r3, [r7, #14] 800c1ce: 18d1 adds r1, r2, r3 800c1d0: 897b ldrh r3, [r7, #10] 800c1d2: 89ba ldrh r2, [r7, #12] 800c1d4: f7fb f8e8 bl 80073a8 800c1d8: 4603 mov r3, r0 800c1da: 461a mov r2, r3 800c1dc: 89bb ldrh r3, [r7, #12] 800c1de: 4293 cmp r3, r2 800c1e0: f040 80a2 bne.w 800c328 #endif /* TCP_CHECKSUM_ON_COPY */ /* Options are created when calling tcp_output() */ /* Migrate flags from original segment */ split_flags = TCPH_FLAGS(useg->tcphdr); 800c1e4: 697b ldr r3, [r7, #20] 800c1e6: 691b ldr r3, [r3, #16] 800c1e8: 899b ldrh r3, [r3, #12] 800c1ea: b29b uxth r3, r3 800c1ec: 4618 mov r0, r3 800c1ee: f7f9 f9ad bl 800554c 800c1f2: 4603 mov r3, r0 800c1f4: b2db uxtb r3, r3 800c1f6: f003 033f and.w r3, r3, #63 ; 0x3f 800c1fa: 77fb strb r3, [r7, #31] remainder_flags = 0; /* ACK added in tcp_output() */ 800c1fc: 2300 movs r3, #0 800c1fe: 77bb strb r3, [r7, #30] if (split_flags & TCP_PSH) { 800c200: 7ffb ldrb r3, [r7, #31] 800c202: f003 0308 and.w r3, r3, #8 800c206: 2b00 cmp r3, #0 800c208: d007 beq.n 800c21a split_flags &= ~TCP_PSH; 800c20a: 7ffb ldrb r3, [r7, #31] 800c20c: f023 0308 bic.w r3, r3, #8 800c210: 77fb strb r3, [r7, #31] remainder_flags |= TCP_PSH; 800c212: 7fbb ldrb r3, [r7, #30] 800c214: f043 0308 orr.w r3, r3, #8 800c218: 77bb strb r3, [r7, #30] } if (split_flags & TCP_FIN) { 800c21a: 7ffb ldrb r3, [r7, #31] 800c21c: f003 0301 and.w r3, r3, #1 800c220: 2b00 cmp r3, #0 800c222: d007 beq.n 800c234 split_flags &= ~TCP_FIN; 800c224: 7ffb ldrb r3, [r7, #31] 800c226: f023 0301 bic.w r3, r3, #1 800c22a: 77fb strb r3, [r7, #31] remainder_flags |= TCP_FIN; 800c22c: 7fbb ldrb r3, [r7, #30] 800c22e: f043 0301 orr.w r3, r3, #1 800c232: 77bb strb r3, [r7, #30] } /* 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); 800c234: 697b ldr r3, [r7, #20] 800c236: 691b ldr r3, [r3, #16] 800c238: 685b ldr r3, [r3, #4] 800c23a: 4618 mov r0, r3 800c23c: f7f9 f99b bl 8005576 800c240: 4602 mov r2, r0 800c242: 887b ldrh r3, [r7, #2] 800c244: 18d1 adds r1, r2, r3 800c246: 7fba ldrb r2, [r7, #30] 800c248: 7bfb ldrb r3, [r7, #15] 800c24a: 9300 str r3, [sp, #0] 800c24c: 460b mov r3, r1 800c24e: 6939 ldr r1, [r7, #16] 800c250: 6878 ldr r0, [r7, #4] 800c252: f7ff f9f3 bl 800b63c 800c256: 61b8 str r0, [r7, #24] if (seg == NULL) { 800c258: 69bb ldr r3, [r7, #24] 800c25a: 2b00 cmp r3, #0 800c25c: d066 beq.n 800c32c 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); 800c25e: 697b ldr r3, [r7, #20] 800c260: 685b ldr r3, [r3, #4] 800c262: 4618 mov r0, r3 800c264: f7fa ff3e bl 80070e4 800c268: 4603 mov r3, r0 800c26a: 461a mov r2, r3 800c26c: 687b ldr r3, [r7, #4] 800c26e: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66 800c272: 1a9b subs r3, r3, r2 800c274: b29a uxth r2, r3 800c276: 687b ldr r3, [r7, #4] 800c278: 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); 800c27c: 697b ldr r3, [r7, #20] 800c27e: 6858 ldr r0, [r3, #4] 800c280: 697b ldr r3, [r7, #20] 800c282: 685b ldr r3, [r3, #4] 800c284: 891a ldrh r2, [r3, #8] 800c286: 89bb ldrh r3, [r7, #12] 800c288: 1ad3 subs r3, r2, r3 800c28a: b29b uxth r3, r3 800c28c: 4619 mov r1, r3 800c28e: f7fa fd1b bl 8006cc8 useg->len -= remainder; 800c292: 697b ldr r3, [r7, #20] 800c294: 891a ldrh r2, [r3, #8] 800c296: 89bb ldrh r3, [r7, #12] 800c298: 1ad3 subs r3, r2, r3 800c29a: b29a uxth r2, r3 800c29c: 697b ldr r3, [r7, #20] 800c29e: 811a strh r2, [r3, #8] TCPH_SET_FLAG(useg->tcphdr, split_flags); 800c2a0: 697b ldr r3, [r7, #20] 800c2a2: 691b ldr r3, [r3, #16] 800c2a4: 899b ldrh r3, [r3, #12] 800c2a6: b29c uxth r4, r3 800c2a8: 7ffb ldrb r3, [r7, #31] 800c2aa: b29b uxth r3, r3 800c2ac: 4618 mov r0, r3 800c2ae: f7f9 f94d bl 800554c 800c2b2: 4603 mov r3, r0 800c2b4: 461a mov r2, r3 800c2b6: 697b ldr r3, [r7, #20] 800c2b8: 691b ldr r3, [r3, #16] 800c2ba: 4322 orrs r2, r4 800c2bc: b292 uxth r2, r2 800c2be: 819a strh r2, [r3, #12] #if TCP_OVERSIZE_DBGCHECK /* By trimming, realloc may have actually shrunk the pbuf, so clear oversize_left */ useg->oversize_left = 0; 800c2c0: 697b ldr r3, [r7, #20] 800c2c2: 2200 movs r2, #0 800c2c4: 815a strh r2, [r3, #10] #endif /* TCP_OVERSIZE_DBGCHECK */ /* Add back to the queue with new trimmed pbuf */ pcb->snd_queuelen += pbuf_clen(useg->p); 800c2c6: 697b ldr r3, [r7, #20] 800c2c8: 685b ldr r3, [r3, #4] 800c2ca: 4618 mov r0, r3 800c2cc: f7fa ff0a bl 80070e4 800c2d0: 4603 mov r3, r0 800c2d2: 461a mov r2, r3 800c2d4: 687b ldr r3, [r7, #4] 800c2d6: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66 800c2da: 4413 add r3, r2 800c2dc: b29a uxth r2, r3 800c2de: 687b ldr r3, [r7, #4] 800c2e0: 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); 800c2e4: 69bb ldr r3, [r7, #24] 800c2e6: 685b ldr r3, [r3, #4] 800c2e8: 4618 mov r0, r3 800c2ea: f7fa fefb bl 80070e4 800c2ee: 4603 mov r3, r0 800c2f0: 461a mov r2, r3 800c2f2: 687b ldr r3, [r7, #4] 800c2f4: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66 800c2f8: 4413 add r3, r2 800c2fa: b29a uxth r2, r3 800c2fc: 687b ldr r3, [r7, #4] 800c2fe: f8a3 2066 strh.w r2, [r3, #102] ; 0x66 /* Finally insert remainder into queue after split (which stays head) */ seg->next = useg->next; 800c302: 697b ldr r3, [r7, #20] 800c304: 681a ldr r2, [r3, #0] 800c306: 69bb ldr r3, [r7, #24] 800c308: 601a str r2, [r3, #0] useg->next = seg; 800c30a: 697b ldr r3, [r7, #20] 800c30c: 69ba ldr r2, [r7, #24] 800c30e: 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) { 800c310: 69bb ldr r3, [r7, #24] 800c312: 681b ldr r3, [r3, #0] 800c314: 2b00 cmp r3, #0 800c316: d103 bne.n 800c320 pcb->unsent_oversize = 0; 800c318: 687b ldr r3, [r7, #4] 800c31a: 2200 movs r2, #0 800c31c: f8a3 2068 strh.w r2, [r3, #104] ; 0x68 } #endif /* TCP_OVERSIZE */ return ERR_OK; 800c320: 2300 movs r3, #0 800c322: e016 b.n 800c352 goto memerr; 800c324: bf00 nop 800c326: e002 b.n 800c32e goto memerr; 800c328: bf00 nop 800c32a: e000 b.n 800c32e goto memerr; 800c32c: bf00 nop memerr: TCP_STATS_INC(tcp.memerr); LWIP_ASSERT("seg == NULL", seg == NULL); 800c32e: 69bb ldr r3, [r7, #24] 800c330: 2b00 cmp r3, #0 800c332: d006 beq.n 800c342 800c334: 4b09 ldr r3, [pc, #36] ; (800c35c ) 800c336: f44f 7276 mov.w r2, #984 ; 0x3d8 800c33a: 490e ldr r1, [pc, #56] ; (800c374 ) 800c33c: 4809 ldr r0, [pc, #36] ; (800c364 ) 800c33e: f004 fc43 bl 8010bc8 if (p != NULL) { 800c342: 693b ldr r3, [r7, #16] 800c344: 2b00 cmp r3, #0 800c346: d002 beq.n 800c34e pbuf_free(p); 800c348: 6938 ldr r0, [r7, #16] 800c34a: f7fa fe43 bl 8006fd4 } return ERR_MEM; 800c34e: f04f 33ff mov.w r3, #4294967295 } 800c352: 4618 mov r0, r3 800c354: 3724 adds r7, #36 ; 0x24 800c356: 46bd mov sp, r7 800c358: bd90 pop {r4, r7, pc} 800c35a: bf00 nop 800c35c: 08013618 .word 0x08013618 800c360: 08013a08 .word 0x08013a08 800c364: 0801366c .word 0x0801366c 800c368: 08013a2c .word 0x08013a2c 800c36c: 08013a50 .word 0x08013a50 800c370: 08013a60 .word 0x08013a60 800c374: 08013a70 .word 0x08013a70 0800c378 : * @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) { 800c378: b590 push {r4, r7, lr} 800c37a: b085 sub sp, #20 800c37c: af00 add r7, sp, #0 800c37e: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_send_fin: invalid pcb", pcb != NULL); 800c380: 687b ldr r3, [r7, #4] 800c382: 2b00 cmp r3, #0 800c384: d106 bne.n 800c394 800c386: 4b21 ldr r3, [pc, #132] ; (800c40c ) 800c388: f240 32eb movw r2, #1003 ; 0x3eb 800c38c: 4920 ldr r1, [pc, #128] ; (800c410 ) 800c38e: 4821 ldr r0, [pc, #132] ; (800c414 ) 800c390: f004 fc1a bl 8010bc8 /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { 800c394: 687b ldr r3, [r7, #4] 800c396: 6edb ldr r3, [r3, #108] ; 0x6c 800c398: 2b00 cmp r3, #0 800c39a: d02e beq.n 800c3fa struct tcp_seg *last_unsent; for (last_unsent = pcb->unsent; last_unsent->next != NULL; 800c39c: 687b ldr r3, [r7, #4] 800c39e: 6edb ldr r3, [r3, #108] ; 0x6c 800c3a0: 60fb str r3, [r7, #12] 800c3a2: e002 b.n 800c3aa last_unsent = last_unsent->next); 800c3a4: 68fb ldr r3, [r7, #12] 800c3a6: 681b ldr r3, [r3, #0] 800c3a8: 60fb str r3, [r7, #12] for (last_unsent = pcb->unsent; last_unsent->next != NULL; 800c3aa: 68fb ldr r3, [r7, #12] 800c3ac: 681b ldr r3, [r3, #0] 800c3ae: 2b00 cmp r3, #0 800c3b0: d1f8 bne.n 800c3a4 if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { 800c3b2: 68fb ldr r3, [r7, #12] 800c3b4: 691b ldr r3, [r3, #16] 800c3b6: 899b ldrh r3, [r3, #12] 800c3b8: b29b uxth r3, r3 800c3ba: 4618 mov r0, r3 800c3bc: f7f9 f8c6 bl 800554c 800c3c0: 4603 mov r3, r0 800c3c2: b2db uxtb r3, r3 800c3c4: f003 0307 and.w r3, r3, #7 800c3c8: 2b00 cmp r3, #0 800c3ca: d116 bne.n 800c3fa /* no SYN/FIN/RST flag in the header, we can add the FIN flag */ TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN); 800c3cc: 68fb ldr r3, [r7, #12] 800c3ce: 691b ldr r3, [r3, #16] 800c3d0: 899b ldrh r3, [r3, #12] 800c3d2: b29c uxth r4, r3 800c3d4: 2001 movs r0, #1 800c3d6: f7f9 f8b9 bl 800554c 800c3da: 4603 mov r3, r0 800c3dc: 461a mov r2, r3 800c3de: 68fb ldr r3, [r7, #12] 800c3e0: 691b ldr r3, [r3, #16] 800c3e2: 4322 orrs r2, r4 800c3e4: b292 uxth r2, r2 800c3e6: 819a strh r2, [r3, #12] tcp_set_flags(pcb, TF_FIN); 800c3e8: 687b ldr r3, [r7, #4] 800c3ea: 8b5b ldrh r3, [r3, #26] 800c3ec: f043 0320 orr.w r3, r3, #32 800c3f0: b29a uxth r2, r3 800c3f2: 687b ldr r3, [r7, #4] 800c3f4: 835a strh r2, [r3, #26] return ERR_OK; 800c3f6: 2300 movs r3, #0 800c3f8: e004 b.n 800c404 } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); 800c3fa: 2101 movs r1, #1 800c3fc: 6878 ldr r0, [r7, #4] 800c3fe: f000 f80b bl 800c418 800c402: 4603 mov r3, r0 } 800c404: 4618 mov r0, r3 800c406: 3714 adds r7, #20 800c408: 46bd mov sp, r7 800c40a: bd90 pop {r4, r7, pc} 800c40c: 08013618 .word 0x08013618 800c410: 08013a7c .word 0x08013a7c 800c414: 0801366c .word 0x0801366c 0800c418 : * @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) { 800c418: b580 push {r7, lr} 800c41a: b088 sub sp, #32 800c41c: af02 add r7, sp, #8 800c41e: 6078 str r0, [r7, #4] 800c420: 460b mov r3, r1 800c422: 70fb strb r3, [r7, #3] struct pbuf *p; struct tcp_seg *seg; u8_t optflags = 0; 800c424: 2300 movs r3, #0 800c426: 75fb strb r3, [r7, #23] u8_t optlen = 0; 800c428: 2300 movs r3, #0 800c42a: 75bb strb r3, [r7, #22] 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)", 800c42c: 78fb ldrb r3, [r7, #3] 800c42e: f003 0303 and.w r3, r3, #3 800c432: 2b00 cmp r3, #0 800c434: d106 bne.n 800c444 800c436: 4b67 ldr r3, [pc, #412] ; (800c5d4 ) 800c438: f240 4211 movw r2, #1041 ; 0x411 800c43c: 4966 ldr r1, [pc, #408] ; (800c5d8 ) 800c43e: 4867 ldr r0, [pc, #412] ; (800c5dc ) 800c440: f004 fbc2 bl 8010bc8 (flags & (TCP_SYN | TCP_FIN)) != 0); LWIP_ASSERT("tcp_enqueue_flags: invalid pcb", pcb != NULL); 800c444: 687b ldr r3, [r7, #4] 800c446: 2b00 cmp r3, #0 800c448: d106 bne.n 800c458 800c44a: 4b62 ldr r3, [pc, #392] ; (800c5d4 ) 800c44c: f240 4213 movw r2, #1043 ; 0x413 800c450: 4963 ldr r1, [pc, #396] ; (800c5e0 ) 800c452: 4862 ldr r0, [pc, #392] ; (800c5dc ) 800c454: f004 fbb8 bl 8010bc8 /* 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) { 800c458: 78fb ldrb r3, [r7, #3] 800c45a: f003 0302 and.w r3, r3, #2 800c45e: 2b00 cmp r3, #0 800c460: d001 beq.n 800c466 optflags = TF_SEG_OPTS_MSS; 800c462: 2301 movs r3, #1 800c464: 75fb strb r3, [r7, #23] /* 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); 800c466: 7dfb ldrb r3, [r7, #23] 800c468: 009b lsls r3, r3, #2 800c46a: b2db uxtb r3, r3 800c46c: f003 0304 and.w r3, r3, #4 800c470: 75bb strb r3, [r7, #22] /* Allocate pbuf with room for TCP header + options */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 800c472: 7dbb ldrb r3, [r7, #22] 800c474: b29b uxth r3, r3 800c476: f44f 7220 mov.w r2, #640 ; 0x280 800c47a: 4619 mov r1, r3 800c47c: 2036 movs r0, #54 ; 0x36 800c47e: f7fa fac5 bl 8006a0c 800c482: 60f8 str r0, [r7, #12] 800c484: 68fb ldr r3, [r7, #12] 800c486: 2b00 cmp r3, #0 800c488: d109 bne.n 800c49e tcp_set_flags(pcb, TF_NAGLEMEMERR); 800c48a: 687b ldr r3, [r7, #4] 800c48c: 8b5b ldrh r3, [r3, #26] 800c48e: f043 0380 orr.w r3, r3, #128 ; 0x80 800c492: b29a uxth r2, r3 800c494: 687b ldr r3, [r7, #4] 800c496: 835a strh r2, [r3, #26] TCP_STATS_INC(tcp.memerr); return ERR_MEM; 800c498: f04f 33ff mov.w r3, #4294967295 800c49c: e095 b.n 800c5ca } LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen", 800c49e: 68fb ldr r3, [r7, #12] 800c4a0: 895a ldrh r2, [r3, #10] 800c4a2: 7dbb ldrb r3, [r7, #22] 800c4a4: b29b uxth r3, r3 800c4a6: 429a cmp r2, r3 800c4a8: d206 bcs.n 800c4b8 800c4aa: 4b4a ldr r3, [pc, #296] ; (800c5d4 ) 800c4ac: f240 4239 movw r2, #1081 ; 0x439 800c4b0: 494c ldr r1, [pc, #304] ; (800c5e4 ) 800c4b2: 484a ldr r0, [pc, #296] ; (800c5dc ) 800c4b4: f004 fb88 bl 8010bc8 (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) { 800c4b8: 687b ldr r3, [r7, #4] 800c4ba: 6dd9 ldr r1, [r3, #92] ; 0x5c 800c4bc: 78fa ldrb r2, [r7, #3] 800c4be: 7dfb ldrb r3, [r7, #23] 800c4c0: 9300 str r3, [sp, #0] 800c4c2: 460b mov r3, r1 800c4c4: 68f9 ldr r1, [r7, #12] 800c4c6: 6878 ldr r0, [r7, #4] 800c4c8: f7ff f8b8 bl 800b63c 800c4cc: 60b8 str r0, [r7, #8] 800c4ce: 68bb ldr r3, [r7, #8] 800c4d0: 2b00 cmp r3, #0 800c4d2: d109 bne.n 800c4e8 tcp_set_flags(pcb, TF_NAGLEMEMERR); 800c4d4: 687b ldr r3, [r7, #4] 800c4d6: 8b5b ldrh r3, [r3, #26] 800c4d8: f043 0380 orr.w r3, r3, #128 ; 0x80 800c4dc: b29a uxth r2, r3 800c4de: 687b ldr r3, [r7, #4] 800c4e0: 835a strh r2, [r3, #26] TCP_STATS_INC(tcp.memerr); return ERR_MEM; 800c4e2: f04f 33ff mov.w r3, #4294967295 800c4e6: e070 b.n 800c5ca } LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0); 800c4e8: 68bb ldr r3, [r7, #8] 800c4ea: 691b ldr r3, [r3, #16] 800c4ec: f003 0303 and.w r3, r3, #3 800c4f0: 2b00 cmp r3, #0 800c4f2: d006 beq.n 800c502 800c4f4: 4b37 ldr r3, [pc, #220] ; (800c5d4 ) 800c4f6: f240 4242 movw r2, #1090 ; 0x442 800c4fa: 493b ldr r1, [pc, #236] ; (800c5e8 ) 800c4fc: 4837 ldr r0, [pc, #220] ; (800c5dc ) 800c4fe: f004 fb63 bl 8010bc8 LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0); 800c502: 68bb ldr r3, [r7, #8] 800c504: 891b ldrh r3, [r3, #8] 800c506: 2b00 cmp r3, #0 800c508: d006 beq.n 800c518 800c50a: 4b32 ldr r3, [pc, #200] ; (800c5d4 ) 800c50c: f240 4243 movw r2, #1091 ; 0x443 800c510: 4936 ldr r1, [pc, #216] ; (800c5ec ) 800c512: 4832 ldr r0, [pc, #200] ; (800c5dc ) 800c514: f004 fb58 bl 8010bc8 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) { 800c518: 687b ldr r3, [r7, #4] 800c51a: 6edb ldr r3, [r3, #108] ; 0x6c 800c51c: 2b00 cmp r3, #0 800c51e: d103 bne.n 800c528 pcb->unsent = seg; 800c520: 687b ldr r3, [r7, #4] 800c522: 68ba ldr r2, [r7, #8] 800c524: 66da str r2, [r3, #108] ; 0x6c 800c526: e00d b.n 800c544 } else { struct tcp_seg *useg; for (useg = pcb->unsent; useg->next != NULL; useg = useg->next); 800c528: 687b ldr r3, [r7, #4] 800c52a: 6edb ldr r3, [r3, #108] ; 0x6c 800c52c: 613b str r3, [r7, #16] 800c52e: e002 b.n 800c536 800c530: 693b ldr r3, [r7, #16] 800c532: 681b ldr r3, [r3, #0] 800c534: 613b str r3, [r7, #16] 800c536: 693b ldr r3, [r7, #16] 800c538: 681b ldr r3, [r3, #0] 800c53a: 2b00 cmp r3, #0 800c53c: d1f8 bne.n 800c530 useg->next = seg; 800c53e: 693b ldr r3, [r7, #16] 800c540: 68ba ldr r2, [r7, #8] 800c542: 601a str r2, [r3, #0] } #if TCP_OVERSIZE /* The new unsent tail has no space */ pcb->unsent_oversize = 0; 800c544: 687b ldr r3, [r7, #4] 800c546: 2200 movs r2, #0 800c548: 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)) { 800c54c: 78fb ldrb r3, [r7, #3] 800c54e: f003 0302 and.w r3, r3, #2 800c552: 2b00 cmp r3, #0 800c554: d104 bne.n 800c560 800c556: 78fb ldrb r3, [r7, #3] 800c558: f003 0301 and.w r3, r3, #1 800c55c: 2b00 cmp r3, #0 800c55e: d004 beq.n 800c56a pcb->snd_lbb++; 800c560: 687b ldr r3, [r7, #4] 800c562: 6ddb ldr r3, [r3, #92] ; 0x5c 800c564: 1c5a adds r2, r3, #1 800c566: 687b ldr r3, [r7, #4] 800c568: 65da str r2, [r3, #92] ; 0x5c /* optlen does not influence snd_buf */ } if (flags & TCP_FIN) { 800c56a: 78fb ldrb r3, [r7, #3] 800c56c: f003 0301 and.w r3, r3, #1 800c570: 2b00 cmp r3, #0 800c572: d006 beq.n 800c582 tcp_set_flags(pcb, TF_FIN); 800c574: 687b ldr r3, [r7, #4] 800c576: 8b5b ldrh r3, [r3, #26] 800c578: f043 0320 orr.w r3, r3, #32 800c57c: b29a uxth r2, r3 800c57e: 687b ldr r3, [r7, #4] 800c580: 835a strh r2, [r3, #26] } /* update number of segments on the queues */ pcb->snd_queuelen += pbuf_clen(seg->p); 800c582: 68bb ldr r3, [r7, #8] 800c584: 685b ldr r3, [r3, #4] 800c586: 4618 mov r0, r3 800c588: f7fa fdac bl 80070e4 800c58c: 4603 mov r3, r0 800c58e: 461a mov r2, r3 800c590: 687b ldr r3, [r7, #4] 800c592: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66 800c596: 4413 add r3, r2 800c598: b29a uxth r2, r3 800c59a: 687b ldr r3, [r7, #4] 800c59c: 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) { 800c5a0: 687b ldr r3, [r7, #4] 800c5a2: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66 800c5a6: 2b00 cmp r3, #0 800c5a8: d00e beq.n 800c5c8 LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", 800c5aa: 687b ldr r3, [r7, #4] 800c5ac: 6f1b ldr r3, [r3, #112] ; 0x70 800c5ae: 2b00 cmp r3, #0 800c5b0: d10a bne.n 800c5c8 800c5b2: 687b ldr r3, [r7, #4] 800c5b4: 6edb ldr r3, [r3, #108] ; 0x6c 800c5b6: 2b00 cmp r3, #0 800c5b8: d106 bne.n 800c5c8 800c5ba: 4b06 ldr r3, [pc, #24] ; (800c5d4 ) 800c5bc: f240 4265 movw r2, #1125 ; 0x465 800c5c0: 490b ldr r1, [pc, #44] ; (800c5f0 ) 800c5c2: 4806 ldr r0, [pc, #24] ; (800c5dc ) 800c5c4: f004 fb00 bl 8010bc8 pcb->unacked != NULL || pcb->unsent != NULL); } return ERR_OK; 800c5c8: 2300 movs r3, #0 } 800c5ca: 4618 mov r0, r3 800c5cc: 3718 adds r7, #24 800c5ce: 46bd mov sp, r7 800c5d0: bd80 pop {r7, pc} 800c5d2: bf00 nop 800c5d4: 08013618 .word 0x08013618 800c5d8: 08013a98 .word 0x08013a98 800c5dc: 0801366c .word 0x0801366c 800c5e0: 08013af0 .word 0x08013af0 800c5e4: 08013b10 .word 0x08013b10 800c5e8: 08013b4c .word 0x08013b4c 800c5ec: 08013b64 .word 0x08013b64 800c5f0: 08013b90 .word 0x08013b90 0800c5f4 : * @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) { 800c5f4: b5b0 push {r4, r5, r7, lr} 800c5f6: b08a sub sp, #40 ; 0x28 800c5f8: af00 add r7, sp, #0 800c5fa: 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); 800c5fc: 687b ldr r3, [r7, #4] 800c5fe: 2b00 cmp r3, #0 800c600: d106 bne.n 800c610 800c602: 4b8a ldr r3, [pc, #552] ; (800c82c ) 800c604: f240 42e1 movw r2, #1249 ; 0x4e1 800c608: 4989 ldr r1, [pc, #548] ; (800c830 ) 800c60a: 488a ldr r0, [pc, #552] ; (800c834 ) 800c60c: f004 fadc bl 8010bc8 /* pcb->state LISTEN not allowed here */ LWIP_ASSERT("don't call tcp_output for listen-pcbs", 800c610: 687b ldr r3, [r7, #4] 800c612: 7d1b ldrb r3, [r3, #20] 800c614: 2b01 cmp r3, #1 800c616: d106 bne.n 800c626 800c618: 4b84 ldr r3, [pc, #528] ; (800c82c ) 800c61a: f240 42e3 movw r2, #1251 ; 0x4e3 800c61e: 4986 ldr r1, [pc, #536] ; (800c838 ) 800c620: 4884 ldr r0, [pc, #528] ; (800c834 ) 800c622: f004 fad1 bl 8010bc8 /* 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) { 800c626: 4b85 ldr r3, [pc, #532] ; (800c83c ) 800c628: 681b ldr r3, [r3, #0] 800c62a: 687a ldr r2, [r7, #4] 800c62c: 429a cmp r2, r3 800c62e: d101 bne.n 800c634 return ERR_OK; 800c630: 2300 movs r3, #0 800c632: e1d1 b.n 800c9d8 } wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); 800c634: 687b ldr r3, [r7, #4] 800c636: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 800c63a: 687b ldr r3, [r7, #4] 800c63c: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60 800c640: 4293 cmp r3, r2 800c642: bf28 it cs 800c644: 4613 movcs r3, r2 800c646: b29b uxth r3, r3 800c648: 61bb str r3, [r7, #24] seg = pcb->unsent; 800c64a: 687b ldr r3, [r7, #4] 800c64c: 6edb ldr r3, [r3, #108] ; 0x6c 800c64e: 627b str r3, [r7, #36] ; 0x24 if (seg == NULL) { 800c650: 6a7b ldr r3, [r7, #36] ; 0x24 800c652: 2b00 cmp r3, #0 800c654: d10b bne.n 800c66e ", 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) { 800c656: 687b ldr r3, [r7, #4] 800c658: 8b5b ldrh r3, [r3, #26] 800c65a: f003 0302 and.w r3, r3, #2 800c65e: 2b00 cmp r3, #0 800c660: f000 81ad beq.w 800c9be return tcp_send_empty_ack(pcb); 800c664: 6878 ldr r0, [r7, #4] 800c666: f000 fdd7 bl 800d218 800c66a: 4603 mov r3, r0 800c66c: e1b4 b.n 800c9d8 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); 800c66e: 6879 ldr r1, [r7, #4] 800c670: 687b ldr r3, [r7, #4] 800c672: 3304 adds r3, #4 800c674: 461a mov r2, r3 800c676: 6878 ldr r0, [r7, #4] 800c678: f7fe ffc4 bl 800b604 800c67c: 6178 str r0, [r7, #20] if (netif == NULL) { 800c67e: 697b ldr r3, [r7, #20] 800c680: 2b00 cmp r3, #0 800c682: d102 bne.n 800c68a return ERR_RTE; 800c684: f06f 0303 mvn.w r3, #3 800c688: e1a6 b.n 800c9d8 } /* If we don't have a local IP address, we get one from netif */ if (ip_addr_isany(&pcb->local_ip)) { 800c68a: 687b ldr r3, [r7, #4] 800c68c: 2b00 cmp r3, #0 800c68e: d003 beq.n 800c698 800c690: 687b ldr r3, [r7, #4] 800c692: 681b ldr r3, [r3, #0] 800c694: 2b00 cmp r3, #0 800c696: d111 bne.n 800c6bc const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, &pcb->remote_ip); 800c698: 697b ldr r3, [r7, #20] 800c69a: 2b00 cmp r3, #0 800c69c: d002 beq.n 800c6a4 800c69e: 697b ldr r3, [r7, #20] 800c6a0: 3304 adds r3, #4 800c6a2: e000 b.n 800c6a6 800c6a4: 2300 movs r3, #0 800c6a6: 613b str r3, [r7, #16] if (local_ip == NULL) { 800c6a8: 693b ldr r3, [r7, #16] 800c6aa: 2b00 cmp r3, #0 800c6ac: d102 bne.n 800c6b4 return ERR_RTE; 800c6ae: f06f 0303 mvn.w r3, #3 800c6b2: e191 b.n 800c9d8 } ip_addr_copy(pcb->local_ip, *local_ip); 800c6b4: 693b ldr r3, [r7, #16] 800c6b6: 681a ldr r2, [r3, #0] 800c6b8: 687b ldr r3, [r7, #4] 800c6ba: 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) { 800c6bc: 6a7b ldr r3, [r7, #36] ; 0x24 800c6be: 691b ldr r3, [r3, #16] 800c6c0: 685b ldr r3, [r3, #4] 800c6c2: 4618 mov r0, r3 800c6c4: f7f8 ff57 bl 8005576 800c6c8: 4602 mov r2, r0 800c6ca: 687b ldr r3, [r7, #4] 800c6cc: 6c5b ldr r3, [r3, #68] ; 0x44 800c6ce: 1ad3 subs r3, r2, r3 800c6d0: 6a7a ldr r2, [r7, #36] ; 0x24 800c6d2: 8912 ldrh r2, [r2, #8] 800c6d4: 4413 add r3, r2 800c6d6: 69ba ldr r2, [r7, #24] 800c6d8: 429a cmp r2, r3 800c6da: d227 bcs.n 800c72c * 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) { 800c6dc: 687b ldr r3, [r7, #4] 800c6de: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60 800c6e2: 461a mov r2, r3 800c6e4: 69bb ldr r3, [r7, #24] 800c6e6: 4293 cmp r3, r2 800c6e8: d114 bne.n 800c714 800c6ea: 687b ldr r3, [r7, #4] 800c6ec: 6f1b ldr r3, [r3, #112] ; 0x70 800c6ee: 2b00 cmp r3, #0 800c6f0: d110 bne.n 800c714 800c6f2: 687b ldr r3, [r7, #4] 800c6f4: f893 3099 ldrb.w r3, [r3, #153] ; 0x99 800c6f8: 2b00 cmp r3, #0 800c6fa: d10b bne.n 800c714 pcb->persist_cnt = 0; 800c6fc: 687b ldr r3, [r7, #4] 800c6fe: 2200 movs r2, #0 800c700: f883 2098 strb.w r2, [r3, #152] ; 0x98 pcb->persist_backoff = 1; 800c704: 687b ldr r3, [r7, #4] 800c706: 2201 movs r2, #1 800c708: f883 2099 strb.w r2, [r3, #153] ; 0x99 pcb->persist_probe = 0; 800c70c: 687b ldr r3, [r7, #4] 800c70e: 2200 movs r2, #0 800c710: 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) { 800c714: 687b ldr r3, [r7, #4] 800c716: 8b5b ldrh r3, [r3, #26] 800c718: f003 0302 and.w r3, r3, #2 800c71c: 2b00 cmp r3, #0 800c71e: f000 8150 beq.w 800c9c2 return tcp_send_empty_ack(pcb); 800c722: 6878 ldr r0, [r7, #4] 800c724: f000 fd78 bl 800d218 800c728: 4603 mov r3, r0 800c72a: e155 b.n 800c9d8 } goto output_done; } /* Stop persist timer, above conditions are not active */ pcb->persist_backoff = 0; 800c72c: 687b ldr r3, [r7, #4] 800c72e: 2200 movs r2, #0 800c730: f883 2099 strb.w r2, [r3, #153] ; 0x99 /* useg should point to last segment on unacked queue */ useg = pcb->unacked; 800c734: 687b ldr r3, [r7, #4] 800c736: 6f1b ldr r3, [r3, #112] ; 0x70 800c738: 623b str r3, [r7, #32] if (useg != NULL) { 800c73a: 6a3b ldr r3, [r7, #32] 800c73c: 2b00 cmp r3, #0 800c73e: f000 811f beq.w 800c980 for (; useg->next != NULL; useg = useg->next); 800c742: e002 b.n 800c74a 800c744: 6a3b ldr r3, [r7, #32] 800c746: 681b ldr r3, [r3, #0] 800c748: 623b str r3, [r7, #32] 800c74a: 6a3b ldr r3, [r7, #32] 800c74c: 681b ldr r3, [r3, #0] 800c74e: 2b00 cmp r3, #0 800c750: d1f8 bne.n 800c744 } /* data available and window allows it to be sent? */ while (seg != NULL && 800c752: e115 b.n 800c980 lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { LWIP_ASSERT("RST not expected here!", 800c754: 6a7b ldr r3, [r7, #36] ; 0x24 800c756: 691b ldr r3, [r3, #16] 800c758: 899b ldrh r3, [r3, #12] 800c75a: b29b uxth r3, r3 800c75c: 4618 mov r0, r3 800c75e: f7f8 fef5 bl 800554c 800c762: 4603 mov r3, r0 800c764: b2db uxtb r3, r3 800c766: f003 0304 and.w r3, r3, #4 800c76a: 2b00 cmp r3, #0 800c76c: d006 beq.n 800c77c 800c76e: 4b2f ldr r3, [pc, #188] ; (800c82c ) 800c770: f240 5236 movw r2, #1334 ; 0x536 800c774: 4932 ldr r1, [pc, #200] ; (800c840 ) 800c776: 482f ldr r0, [pc, #188] ; (800c834 ) 800c778: f004 fa26 bl 8010bc8 * - 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) && 800c77c: 687b ldr r3, [r7, #4] 800c77e: 6f1b ldr r3, [r3, #112] ; 0x70 800c780: 2b00 cmp r3, #0 800c782: d01f beq.n 800c7c4 800c784: 687b ldr r3, [r7, #4] 800c786: 8b5b ldrh r3, [r3, #26] 800c788: f003 0344 and.w r3, r3, #68 ; 0x44 800c78c: 2b00 cmp r3, #0 800c78e: d119 bne.n 800c7c4 800c790: 687b ldr r3, [r7, #4] 800c792: 6edb ldr r3, [r3, #108] ; 0x6c 800c794: 2b00 cmp r3, #0 800c796: d00b beq.n 800c7b0 800c798: 687b ldr r3, [r7, #4] 800c79a: 6edb ldr r3, [r3, #108] ; 0x6c 800c79c: 681b ldr r3, [r3, #0] 800c79e: 2b00 cmp r3, #0 800c7a0: d110 bne.n 800c7c4 800c7a2: 687b ldr r3, [r7, #4] 800c7a4: 6edb ldr r3, [r3, #108] ; 0x6c 800c7a6: 891a ldrh r2, [r3, #8] 800c7a8: 687b ldr r3, [r7, #4] 800c7aa: 8e5b ldrh r3, [r3, #50] ; 0x32 800c7ac: 429a cmp r2, r3 800c7ae: d209 bcs.n 800c7c4 800c7b0: 687b ldr r3, [r7, #4] 800c7b2: f8b3 3064 ldrh.w r3, [r3, #100] ; 0x64 800c7b6: 2b00 cmp r3, #0 800c7b8: d004 beq.n 800c7c4 800c7ba: 687b ldr r3, [r7, #4] 800c7bc: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66 800c7c0: 2b08 cmp r3, #8 800c7c2: d901 bls.n 800c7c8 800c7c4: 2301 movs r3, #1 800c7c6: e000 b.n 800c7ca 800c7c8: 2300 movs r3, #0 800c7ca: 2b00 cmp r3, #0 800c7cc: d106 bne.n 800c7dc ((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)) { 800c7ce: 687b ldr r3, [r7, #4] 800c7d0: 8b5b ldrh r3, [r3, #26] 800c7d2: f003 03a0 and.w r3, r3, #160 ; 0xa0 if ((tcp_do_output_nagle(pcb) == 0) && 800c7d6: 2b00 cmp r3, #0 800c7d8: f000 80e7 beq.w 800c9aa pcb->lastack, lwip_ntohl(seg->tcphdr->seqno), pcb->lastack, i)); ++i; #endif /* TCP_CWND_DEBUG */ if (pcb->state != SYN_SENT) { 800c7dc: 687b ldr r3, [r7, #4] 800c7de: 7d1b ldrb r3, [r3, #20] 800c7e0: 2b02 cmp r3, #2 800c7e2: d00d beq.n 800c800 TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); 800c7e4: 6a7b ldr r3, [r7, #36] ; 0x24 800c7e6: 691b ldr r3, [r3, #16] 800c7e8: 899b ldrh r3, [r3, #12] 800c7ea: b29c uxth r4, r3 800c7ec: 2010 movs r0, #16 800c7ee: f7f8 fead bl 800554c 800c7f2: 4603 mov r3, r0 800c7f4: 461a mov r2, r3 800c7f6: 6a7b ldr r3, [r7, #36] ; 0x24 800c7f8: 691b ldr r3, [r3, #16] 800c7fa: 4322 orrs r2, r4 800c7fc: b292 uxth r2, r2 800c7fe: 819a strh r2, [r3, #12] } err = tcp_output_segment(seg, pcb, netif); 800c800: 697a ldr r2, [r7, #20] 800c802: 6879 ldr r1, [r7, #4] 800c804: 6a78 ldr r0, [r7, #36] ; 0x24 800c806: f000 f90b bl 800ca20 800c80a: 4603 mov r3, r0 800c80c: 73fb strb r3, [r7, #15] if (err != ERR_OK) { 800c80e: f997 300f ldrsb.w r3, [r7, #15] 800c812: 2b00 cmp r3, #0 800c814: d016 beq.n 800c844 /* segment could not be sent, for whatever reason */ tcp_set_flags(pcb, TF_NAGLEMEMERR); 800c816: 687b ldr r3, [r7, #4] 800c818: 8b5b ldrh r3, [r3, #26] 800c81a: f043 0380 orr.w r3, r3, #128 ; 0x80 800c81e: b29a uxth r2, r3 800c820: 687b ldr r3, [r7, #4] 800c822: 835a strh r2, [r3, #26] return err; 800c824: f997 300f ldrsb.w r3, [r7, #15] 800c828: e0d6 b.n 800c9d8 800c82a: bf00 nop 800c82c: 08013618 .word 0x08013618 800c830: 08013bb8 .word 0x08013bb8 800c834: 0801366c .word 0x0801366c 800c838: 08013bd0 .word 0x08013bd0 800c83c: 24007bbc .word 0x24007bbc 800c840: 08013bf8 .word 0x08013bf8 } #if TCP_OVERSIZE_DBGCHECK seg->oversize_left = 0; 800c844: 6a7b ldr r3, [r7, #36] ; 0x24 800c846: 2200 movs r2, #0 800c848: 815a strh r2, [r3, #10] #endif /* TCP_OVERSIZE_DBGCHECK */ pcb->unsent = seg->next; 800c84a: 6a7b ldr r3, [r7, #36] ; 0x24 800c84c: 681a ldr r2, [r3, #0] 800c84e: 687b ldr r3, [r7, #4] 800c850: 66da str r2, [r3, #108] ; 0x6c if (pcb->state != SYN_SENT) { 800c852: 687b ldr r3, [r7, #4] 800c854: 7d1b ldrb r3, [r3, #20] 800c856: 2b02 cmp r3, #2 800c858: d006 beq.n 800c868 tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 800c85a: 687b ldr r3, [r7, #4] 800c85c: 8b5b ldrh r3, [r3, #26] 800c85e: f023 0303 bic.w r3, r3, #3 800c862: b29a uxth r2, r3 800c864: 687b ldr r3, [r7, #4] 800c866: 835a strh r2, [r3, #26] } snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); 800c868: 6a7b ldr r3, [r7, #36] ; 0x24 800c86a: 691b ldr r3, [r3, #16] 800c86c: 685b ldr r3, [r3, #4] 800c86e: 4618 mov r0, r3 800c870: f7f8 fe81 bl 8005576 800c874: 4604 mov r4, r0 800c876: 6a7b ldr r3, [r7, #36] ; 0x24 800c878: 891b ldrh r3, [r3, #8] 800c87a: 461d mov r5, r3 800c87c: 6a7b ldr r3, [r7, #36] ; 0x24 800c87e: 691b ldr r3, [r3, #16] 800c880: 899b ldrh r3, [r3, #12] 800c882: b29b uxth r3, r3 800c884: 4618 mov r0, r3 800c886: f7f8 fe61 bl 800554c 800c88a: 4603 mov r3, r0 800c88c: b2db uxtb r3, r3 800c88e: f003 0303 and.w r3, r3, #3 800c892: 2b00 cmp r3, #0 800c894: d001 beq.n 800c89a 800c896: 2301 movs r3, #1 800c898: e000 b.n 800c89c 800c89a: 2300 movs r3, #0 800c89c: 442b add r3, r5 800c89e: 4423 add r3, r4 800c8a0: 60bb str r3, [r7, #8] if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 800c8a2: 687b ldr r3, [r7, #4] 800c8a4: 6d1a ldr r2, [r3, #80] ; 0x50 800c8a6: 68bb ldr r3, [r7, #8] 800c8a8: 1ad3 subs r3, r2, r3 800c8aa: 2b00 cmp r3, #0 800c8ac: da02 bge.n 800c8b4 pcb->snd_nxt = snd_nxt; 800c8ae: 687b ldr r3, [r7, #4] 800c8b0: 68ba ldr r2, [r7, #8] 800c8b2: 651a str r2, [r3, #80] ; 0x50 } /* put segment on unacknowledged list if length > 0 */ if (TCP_TCPLEN(seg) > 0) { 800c8b4: 6a7b ldr r3, [r7, #36] ; 0x24 800c8b6: 891b ldrh r3, [r3, #8] 800c8b8: 461c mov r4, r3 800c8ba: 6a7b ldr r3, [r7, #36] ; 0x24 800c8bc: 691b ldr r3, [r3, #16] 800c8be: 899b ldrh r3, [r3, #12] 800c8c0: b29b uxth r3, r3 800c8c2: 4618 mov r0, r3 800c8c4: f7f8 fe42 bl 800554c 800c8c8: 4603 mov r3, r0 800c8ca: b2db uxtb r3, r3 800c8cc: f003 0303 and.w r3, r3, #3 800c8d0: 2b00 cmp r3, #0 800c8d2: d001 beq.n 800c8d8 800c8d4: 2301 movs r3, #1 800c8d6: e000 b.n 800c8da 800c8d8: 2300 movs r3, #0 800c8da: 4423 add r3, r4 800c8dc: 2b00 cmp r3, #0 800c8de: d049 beq.n 800c974 seg->next = NULL; 800c8e0: 6a7b ldr r3, [r7, #36] ; 0x24 800c8e2: 2200 movs r2, #0 800c8e4: 601a str r2, [r3, #0] /* unacked list is empty? */ if (pcb->unacked == NULL) { 800c8e6: 687b ldr r3, [r7, #4] 800c8e8: 6f1b ldr r3, [r3, #112] ; 0x70 800c8ea: 2b00 cmp r3, #0 800c8ec: d105 bne.n 800c8fa pcb->unacked = seg; 800c8ee: 687b ldr r3, [r7, #4] 800c8f0: 6a7a ldr r2, [r7, #36] ; 0x24 800c8f2: 671a str r2, [r3, #112] ; 0x70 useg = seg; 800c8f4: 6a7b ldr r3, [r7, #36] ; 0x24 800c8f6: 623b str r3, [r7, #32] 800c8f8: e03f b.n 800c97a /* 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))) { 800c8fa: 6a7b ldr r3, [r7, #36] ; 0x24 800c8fc: 691b ldr r3, [r3, #16] 800c8fe: 685b ldr r3, [r3, #4] 800c900: 4618 mov r0, r3 800c902: f7f8 fe38 bl 8005576 800c906: 4604 mov r4, r0 800c908: 6a3b ldr r3, [r7, #32] 800c90a: 691b ldr r3, [r3, #16] 800c90c: 685b ldr r3, [r3, #4] 800c90e: 4618 mov r0, r3 800c910: f7f8 fe31 bl 8005576 800c914: 4603 mov r3, r0 800c916: 1ae3 subs r3, r4, r3 800c918: 2b00 cmp r3, #0 800c91a: da24 bge.n 800c966 /* add segment to before tail of unacked list, keeping the list sorted */ struct tcp_seg **cur_seg = &(pcb->unacked); 800c91c: 687b ldr r3, [r7, #4] 800c91e: 3370 adds r3, #112 ; 0x70 800c920: 61fb str r3, [r7, #28] while (*cur_seg && 800c922: e002 b.n 800c92a TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 800c924: 69fb ldr r3, [r7, #28] 800c926: 681b ldr r3, [r3, #0] 800c928: 61fb str r3, [r7, #28] while (*cur_seg && 800c92a: 69fb ldr r3, [r7, #28] 800c92c: 681b ldr r3, [r3, #0] 800c92e: 2b00 cmp r3, #0 800c930: d011 beq.n 800c956 TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { 800c932: 69fb ldr r3, [r7, #28] 800c934: 681b ldr r3, [r3, #0] 800c936: 691b ldr r3, [r3, #16] 800c938: 685b ldr r3, [r3, #4] 800c93a: 4618 mov r0, r3 800c93c: f7f8 fe1b bl 8005576 800c940: 4604 mov r4, r0 800c942: 6a7b ldr r3, [r7, #36] ; 0x24 800c944: 691b ldr r3, [r3, #16] 800c946: 685b ldr r3, [r3, #4] 800c948: 4618 mov r0, r3 800c94a: f7f8 fe14 bl 8005576 800c94e: 4603 mov r3, r0 800c950: 1ae3 subs r3, r4, r3 while (*cur_seg && 800c952: 2b00 cmp r3, #0 800c954: dbe6 blt.n 800c924 } seg->next = (*cur_seg); 800c956: 69fb ldr r3, [r7, #28] 800c958: 681a ldr r2, [r3, #0] 800c95a: 6a7b ldr r3, [r7, #36] ; 0x24 800c95c: 601a str r2, [r3, #0] (*cur_seg) = seg; 800c95e: 69fb ldr r3, [r7, #28] 800c960: 6a7a ldr r2, [r7, #36] ; 0x24 800c962: 601a str r2, [r3, #0] 800c964: e009 b.n 800c97a } else { /* add segment to tail of unacked list */ useg->next = seg; 800c966: 6a3b ldr r3, [r7, #32] 800c968: 6a7a ldr r2, [r7, #36] ; 0x24 800c96a: 601a str r2, [r3, #0] useg = useg->next; 800c96c: 6a3b ldr r3, [r7, #32] 800c96e: 681b ldr r3, [r3, #0] 800c970: 623b str r3, [r7, #32] 800c972: e002 b.n 800c97a } } /* do not queue empty segments on the unacked list */ } else { tcp_seg_free(seg); 800c974: 6a78 ldr r0, [r7, #36] ; 0x24 800c976: f7fb fefe bl 8008776 } seg = pcb->unsent; 800c97a: 687b ldr r3, [r7, #4] 800c97c: 6edb ldr r3, [r3, #108] ; 0x6c 800c97e: 627b str r3, [r7, #36] ; 0x24 while (seg != NULL && 800c980: 6a7b ldr r3, [r7, #36] ; 0x24 800c982: 2b00 cmp r3, #0 800c984: d012 beq.n 800c9ac lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { 800c986: 6a7b ldr r3, [r7, #36] ; 0x24 800c988: 691b ldr r3, [r3, #16] 800c98a: 685b ldr r3, [r3, #4] 800c98c: 4618 mov r0, r3 800c98e: f7f8 fdf2 bl 8005576 800c992: 4602 mov r2, r0 800c994: 687b ldr r3, [r7, #4] 800c996: 6c5b ldr r3, [r3, #68] ; 0x44 800c998: 1ad3 subs r3, r2, r3 800c99a: 6a7a ldr r2, [r7, #36] ; 0x24 800c99c: 8912 ldrh r2, [r2, #8] 800c99e: 4413 add r3, r2 while (seg != NULL && 800c9a0: 69ba ldr r2, [r7, #24] 800c9a2: 429a cmp r2, r3 800c9a4: f4bf aed6 bcs.w 800c754 800c9a8: e000 b.n 800c9ac break; 800c9aa: bf00 nop } #if TCP_OVERSIZE if (pcb->unsent == NULL) { 800c9ac: 687b ldr r3, [r7, #4] 800c9ae: 6edb ldr r3, [r3, #108] ; 0x6c 800c9b0: 2b00 cmp r3, #0 800c9b2: d108 bne.n 800c9c6 /* last unsent has been removed, reset unsent_oversize */ pcb->unsent_oversize = 0; 800c9b4: 687b ldr r3, [r7, #4] 800c9b6: 2200 movs r2, #0 800c9b8: f8a3 2068 strh.w r2, [r3, #104] ; 0x68 800c9bc: e004 b.n 800c9c8 goto output_done; 800c9be: bf00 nop 800c9c0: e002 b.n 800c9c8 goto output_done; 800c9c2: bf00 nop 800c9c4: e000 b.n 800c9c8 } #endif /* TCP_OVERSIZE */ output_done: 800c9c6: bf00 nop tcp_clear_flags(pcb, TF_NAGLEMEMERR); 800c9c8: 687b ldr r3, [r7, #4] 800c9ca: 8b5b ldrh r3, [r3, #26] 800c9cc: f023 0380 bic.w r3, r3, #128 ; 0x80 800c9d0: b29a uxth r2, r3 800c9d2: 687b ldr r3, [r7, #4] 800c9d4: 835a strh r2, [r3, #26] return ERR_OK; 800c9d6: 2300 movs r3, #0 } 800c9d8: 4618 mov r0, r3 800c9da: 3728 adds r7, #40 ; 0x28 800c9dc: 46bd mov sp, r7 800c9de: bdb0 pop {r4, r5, r7, pc} 0800c9e0 : * @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) { 800c9e0: b580 push {r7, lr} 800c9e2: b082 sub sp, #8 800c9e4: af00 add r7, sp, #0 800c9e6: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_output_segment_busy: invalid seg", seg != NULL); 800c9e8: 687b ldr r3, [r7, #4] 800c9ea: 2b00 cmp r3, #0 800c9ec: d106 bne.n 800c9fc 800c9ee: 4b09 ldr r3, [pc, #36] ; (800ca14 ) 800c9f0: f240 529a movw r2, #1434 ; 0x59a 800c9f4: 4908 ldr r1, [pc, #32] ; (800ca18 ) 800c9f6: 4809 ldr r0, [pc, #36] ; (800ca1c ) 800c9f8: f004 f8e6 bl 8010bc8 /* 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) { 800c9fc: 687b ldr r3, [r7, #4] 800c9fe: 685b ldr r3, [r3, #4] 800ca00: 7b9b ldrb r3, [r3, #14] 800ca02: 2b01 cmp r3, #1 800ca04: d001 beq.n 800ca0a /* other reference found */ return 1; 800ca06: 2301 movs r3, #1 800ca08: e000 b.n 800ca0c } /* no other references found */ return 0; 800ca0a: 2300 movs r3, #0 } 800ca0c: 4618 mov r0, r3 800ca0e: 3708 adds r7, #8 800ca10: 46bd mov sp, r7 800ca12: bd80 pop {r7, pc} 800ca14: 08013618 .word 0x08013618 800ca18: 08013c10 .word 0x08013c10 800ca1c: 0801366c .word 0x0801366c 0800ca20 : * @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) { 800ca20: b5b0 push {r4, r5, r7, lr} 800ca22: b08c sub sp, #48 ; 0x30 800ca24: af04 add r7, sp, #16 800ca26: 60f8 str r0, [r7, #12] 800ca28: 60b9 str r1, [r7, #8] 800ca2a: 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); 800ca2c: 68fb ldr r3, [r7, #12] 800ca2e: 2b00 cmp r3, #0 800ca30: d106 bne.n 800ca40 800ca32: 4b64 ldr r3, [pc, #400] ; (800cbc4 ) 800ca34: f44f 62b7 mov.w r2, #1464 ; 0x5b8 800ca38: 4963 ldr r1, [pc, #396] ; (800cbc8 ) 800ca3a: 4864 ldr r0, [pc, #400] ; (800cbcc ) 800ca3c: f004 f8c4 bl 8010bc8 LWIP_ASSERT("tcp_output_segment: invalid pcb", pcb != NULL); 800ca40: 68bb ldr r3, [r7, #8] 800ca42: 2b00 cmp r3, #0 800ca44: d106 bne.n 800ca54 800ca46: 4b5f ldr r3, [pc, #380] ; (800cbc4 ) 800ca48: f240 52b9 movw r2, #1465 ; 0x5b9 800ca4c: 4960 ldr r1, [pc, #384] ; (800cbd0 ) 800ca4e: 485f ldr r0, [pc, #380] ; (800cbcc ) 800ca50: f004 f8ba bl 8010bc8 LWIP_ASSERT("tcp_output_segment: invalid netif", netif != NULL); 800ca54: 687b ldr r3, [r7, #4] 800ca56: 2b00 cmp r3, #0 800ca58: d106 bne.n 800ca68 800ca5a: 4b5a ldr r3, [pc, #360] ; (800cbc4 ) 800ca5c: f240 52ba movw r2, #1466 ; 0x5ba 800ca60: 495c ldr r1, [pc, #368] ; (800cbd4 ) 800ca62: 485a ldr r0, [pc, #360] ; (800cbcc ) 800ca64: f004 f8b0 bl 8010bc8 if (tcp_output_segment_busy(seg)) { 800ca68: 68f8 ldr r0, [r7, #12] 800ca6a: f7ff ffb9 bl 800c9e0 800ca6e: 4603 mov r3, r0 800ca70: 2b00 cmp r3, #0 800ca72: d001 beq.n 800ca78 /* 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; 800ca74: 2300 movs r3, #0 800ca76: e0a1 b.n 800cbbc } /* The TCP header has already been constructed, but the ackno and wnd fields remain. */ seg->tcphdr->ackno = lwip_htonl(pcb->rcv_nxt); 800ca78: 68bb ldr r3, [r7, #8] 800ca7a: 6a5a ldr r2, [r3, #36] ; 0x24 800ca7c: 68fb ldr r3, [r7, #12] 800ca7e: 691c ldr r4, [r3, #16] 800ca80: 4610 mov r0, r2 800ca82: f7f8 fd78 bl 8005576 800ca86: 4603 mov r3, r0 800ca88: 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))); 800ca8a: 68bb ldr r3, [r7, #8] 800ca8c: 8d5a ldrh r2, [r3, #42] ; 0x2a 800ca8e: 68fb ldr r3, [r7, #12] 800ca90: 691c ldr r4, [r3, #16] 800ca92: 4610 mov r0, r2 800ca94: f7f8 fd5a bl 800554c 800ca98: 4603 mov r3, r0 800ca9a: 81e3 strh r3, [r4, #14] } pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 800ca9c: 68bb ldr r3, [r7, #8] 800ca9e: 6a5b ldr r3, [r3, #36] ; 0x24 800caa0: 68ba ldr r2, [r7, #8] 800caa2: 8d52 ldrh r2, [r2, #42] ; 0x2a 800caa4: 441a add r2, r3 800caa6: 68bb ldr r3, [r7, #8] 800caa8: 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); 800caaa: 68fb ldr r3, [r7, #12] 800caac: 691b ldr r3, [r3, #16] 800caae: 3314 adds r3, #20 800cab0: 61fb str r3, [r7, #28] if (seg->flags & TF_SEG_OPTS_MSS) { 800cab2: 68fb ldr r3, [r7, #12] 800cab4: 7b1b ldrb r3, [r3, #12] 800cab6: f003 0301 and.w r3, r3, #1 800caba: 2b00 cmp r3, #0 800cabc: d015 beq.n 800caea u16_t mss; #if TCP_CALCULATE_EFF_SEND_MSS mss = tcp_eff_send_mss_netif(TCP_MSS, netif, &pcb->remote_ip); 800cabe: 68bb ldr r3, [r7, #8] 800cac0: 3304 adds r3, #4 800cac2: 461a mov r2, r3 800cac4: 6879 ldr r1, [r7, #4] 800cac6: f44f 7006 mov.w r0, #536 ; 0x218 800caca: f7fc f9cb bl 8008e64 800cace: 4603 mov r3, r0 800cad0: 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); 800cad2: 8b7b ldrh r3, [r7, #26] 800cad4: f043 7301 orr.w r3, r3, #33816576 ; 0x2040000 800cad8: 4618 mov r0, r3 800cada: f7f8 fd4c bl 8005576 800cade: 4602 mov r2, r0 800cae0: 69fb ldr r3, [r7, #28] 800cae2: 601a str r2, [r3, #0] opts += 1; 800cae4: 69fb ldr r3, [r7, #28] 800cae6: 3304 adds r3, #4 800cae8: 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) { 800caea: 68bb ldr r3, [r7, #8] 800caec: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30 800caf0: 2b00 cmp r3, #0 800caf2: da02 bge.n 800cafa pcb->rtime = 0; 800caf4: 68bb ldr r3, [r7, #8] 800caf6: 2200 movs r2, #0 800caf8: 861a strh r2, [r3, #48] ; 0x30 } if (pcb->rttest == 0) { 800cafa: 68bb ldr r3, [r7, #8] 800cafc: 6b5b ldr r3, [r3, #52] ; 0x34 800cafe: 2b00 cmp r3, #0 800cb00: d10c bne.n 800cb1c pcb->rttest = tcp_ticks; 800cb02: 4b35 ldr r3, [pc, #212] ; (800cbd8 ) 800cb04: 681a ldr r2, [r3, #0] 800cb06: 68bb ldr r3, [r7, #8] 800cb08: 635a str r2, [r3, #52] ; 0x34 pcb->rtseq = lwip_ntohl(seg->tcphdr->seqno); 800cb0a: 68fb ldr r3, [r7, #12] 800cb0c: 691b ldr r3, [r3, #16] 800cb0e: 685b ldr r3, [r3, #4] 800cb10: 4618 mov r0, r3 800cb12: f7f8 fd30 bl 8005576 800cb16: 4602 mov r2, r0 800cb18: 68bb ldr r3, [r7, #8] 800cb1a: 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); 800cb1c: 68fb ldr r3, [r7, #12] 800cb1e: 691a ldr r2, [r3, #16] 800cb20: 68fb ldr r3, [r7, #12] 800cb22: 685b ldr r3, [r3, #4] 800cb24: 685b ldr r3, [r3, #4] 800cb26: 1ad3 subs r3, r2, r3 800cb28: 833b strh r3, [r7, #24] if (len == 0) { /** Exclude retransmitted segments from this count. */ MIB2_STATS_INC(mib2.tcpoutsegs); } seg->p->len -= len; 800cb2a: 68fb ldr r3, [r7, #12] 800cb2c: 685b ldr r3, [r3, #4] 800cb2e: 8959 ldrh r1, [r3, #10] 800cb30: 68fb ldr r3, [r7, #12] 800cb32: 685b ldr r3, [r3, #4] 800cb34: 8b3a ldrh r2, [r7, #24] 800cb36: 1a8a subs r2, r1, r2 800cb38: b292 uxth r2, r2 800cb3a: 815a strh r2, [r3, #10] seg->p->tot_len -= len; 800cb3c: 68fb ldr r3, [r7, #12] 800cb3e: 685b ldr r3, [r3, #4] 800cb40: 8919 ldrh r1, [r3, #8] 800cb42: 68fb ldr r3, [r7, #12] 800cb44: 685b ldr r3, [r3, #4] 800cb46: 8b3a ldrh r2, [r7, #24] 800cb48: 1a8a subs r2, r1, r2 800cb4a: b292 uxth r2, r2 800cb4c: 811a strh r2, [r3, #8] seg->p->payload = seg->tcphdr; 800cb4e: 68fb ldr r3, [r7, #12] 800cb50: 685b ldr r3, [r3, #4] 800cb52: 68fa ldr r2, [r7, #12] 800cb54: 6912 ldr r2, [r2, #16] 800cb56: 605a str r2, [r3, #4] seg->tcphdr->chksum = 0; 800cb58: 68fb ldr r3, [r7, #12] 800cb5a: 691b ldr r3, [r3, #16] 800cb5c: 2200 movs r2, #0 800cb5e: 741a strb r2, [r3, #16] 800cb60: 2200 movs r2, #0 800cb62: 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)); 800cb64: 68fb ldr r3, [r7, #12] 800cb66: 691a ldr r2, [r3, #16] 800cb68: 68fb ldr r3, [r7, #12] 800cb6a: 7b1b ldrb r3, [r3, #12] 800cb6c: f003 0301 and.w r3, r3, #1 800cb70: 2b00 cmp r3, #0 800cb72: d001 beq.n 800cb78 800cb74: 2318 movs r3, #24 800cb76: e000 b.n 800cb7a 800cb78: 2314 movs r3, #20 800cb7a: 4413 add r3, r2 800cb7c: 69fa ldr r2, [r7, #28] 800cb7e: 429a cmp r2, r3 800cb80: d006 beq.n 800cb90 800cb82: 4b10 ldr r3, [pc, #64] ; (800cbc4 ) 800cb84: f240 621c movw r2, #1564 ; 0x61c 800cb88: 4914 ldr r1, [pc, #80] ; (800cbdc ) 800cb8a: 4810 ldr r0, [pc, #64] ; (800cbcc ) 800cb8c: f004 f81c bl 8010bc8 } #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, 800cb90: 68fb ldr r3, [r7, #12] 800cb92: 6858 ldr r0, [r3, #4] 800cb94: 68b9 ldr r1, [r7, #8] 800cb96: 68bb ldr r3, [r7, #8] 800cb98: 1d1c adds r4, r3, #4 800cb9a: 68bb ldr r3, [r7, #8] 800cb9c: 7add ldrb r5, [r3, #11] 800cb9e: 68bb ldr r3, [r7, #8] 800cba0: 7a9b ldrb r3, [r3, #10] 800cba2: 687a ldr r2, [r7, #4] 800cba4: 9202 str r2, [sp, #8] 800cba6: 2206 movs r2, #6 800cba8: 9201 str r2, [sp, #4] 800cbaa: 9300 str r3, [sp, #0] 800cbac: 462b mov r3, r5 800cbae: 4622 mov r2, r4 800cbb0: f002 fb28 bl 800f204 800cbb4: 4603 mov r3, r0 800cbb6: 75fb strb r3, [r7, #23] seg->chksum = SWAP_BYTES_IN_WORD(seg->chksum); seg->chksum_swapped = 1; } #endif return err; 800cbb8: f997 3017 ldrsb.w r3, [r7, #23] } 800cbbc: 4618 mov r0, r3 800cbbe: 3720 adds r7, #32 800cbc0: 46bd mov sp, r7 800cbc2: bdb0 pop {r4, r5, r7, pc} 800cbc4: 08013618 .word 0x08013618 800cbc8: 08013c38 .word 0x08013c38 800cbcc: 0801366c .word 0x0801366c 800cbd0: 08013c58 .word 0x08013c58 800cbd4: 08013c78 .word 0x08013c78 800cbd8: 24007b6c .word 0x24007b6c 800cbdc: 08013c9c .word 0x08013c9c 0800cbe0 : * * @param pcb the tcp_pcb for which to re-enqueue all unacked segments */ err_t tcp_rexmit_rto_prepare(struct tcp_pcb *pcb) { 800cbe0: b5b0 push {r4, r5, r7, lr} 800cbe2: b084 sub sp, #16 800cbe4: af00 add r7, sp, #0 800cbe6: 6078 str r0, [r7, #4] struct tcp_seg *seg; LWIP_ASSERT("tcp_rexmit_rto_prepare: invalid pcb", pcb != NULL); 800cbe8: 687b ldr r3, [r7, #4] 800cbea: 2b00 cmp r3, #0 800cbec: d106 bne.n 800cbfc 800cbee: 4b36 ldr r3, [pc, #216] ; (800ccc8 ) 800cbf0: f240 6263 movw r2, #1635 ; 0x663 800cbf4: 4935 ldr r1, [pc, #212] ; (800cccc ) 800cbf6: 4836 ldr r0, [pc, #216] ; (800ccd0 ) 800cbf8: f003 ffe6 bl 8010bc8 if (pcb->unacked == NULL) { 800cbfc: 687b ldr r3, [r7, #4] 800cbfe: 6f1b ldr r3, [r3, #112] ; 0x70 800cc00: 2b00 cmp r3, #0 800cc02: d102 bne.n 800cc0a return ERR_VAL; 800cc04: f06f 0305 mvn.w r3, #5 800cc08: e059 b.n 800ccbe /* 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) { 800cc0a: 687b ldr r3, [r7, #4] 800cc0c: 6f1b ldr r3, [r3, #112] ; 0x70 800cc0e: 60fb str r3, [r7, #12] 800cc10: e00b b.n 800cc2a if (tcp_output_segment_busy(seg)) { 800cc12: 68f8 ldr r0, [r7, #12] 800cc14: f7ff fee4 bl 800c9e0 800cc18: 4603 mov r3, r0 800cc1a: 2b00 cmp r3, #0 800cc1c: d002 beq.n 800cc24 LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n")); return ERR_VAL; 800cc1e: f06f 0305 mvn.w r3, #5 800cc22: e04c b.n 800ccbe for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) { 800cc24: 68fb ldr r3, [r7, #12] 800cc26: 681b ldr r3, [r3, #0] 800cc28: 60fb str r3, [r7, #12] 800cc2a: 68fb ldr r3, [r7, #12] 800cc2c: 681b ldr r3, [r3, #0] 800cc2e: 2b00 cmp r3, #0 800cc30: d1ef bne.n 800cc12 } } if (tcp_output_segment_busy(seg)) { 800cc32: 68f8 ldr r0, [r7, #12] 800cc34: f7ff fed4 bl 800c9e0 800cc38: 4603 mov r3, r0 800cc3a: 2b00 cmp r3, #0 800cc3c: d002 beq.n 800cc44 LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n")); return ERR_VAL; 800cc3e: f06f 0305 mvn.w r3, #5 800cc42: e03c b.n 800ccbe } /* concatenate unsent queue after unacked queue */ seg->next = pcb->unsent; 800cc44: 687b ldr r3, [r7, #4] 800cc46: 6eda ldr r2, [r3, #108] ; 0x6c 800cc48: 68fb ldr r3, [r7, #12] 800cc4a: 601a str r2, [r3, #0] #if TCP_OVERSIZE_DBGCHECK /* if last unsent changed, we need to update unsent_oversize */ if (pcb->unsent == NULL) { 800cc4c: 687b ldr r3, [r7, #4] 800cc4e: 6edb ldr r3, [r3, #108] ; 0x6c 800cc50: 2b00 cmp r3, #0 800cc52: d104 bne.n 800cc5e pcb->unsent_oversize = seg->oversize_left; 800cc54: 68fb ldr r3, [r7, #12] 800cc56: 895a ldrh r2, [r3, #10] 800cc58: 687b ldr r3, [r7, #4] 800cc5a: f8a3 2068 strh.w r2, [r3, #104] ; 0x68 } #endif /* TCP_OVERSIZE_DBGCHECK */ /* unsent queue is the concatenated queue (of unacked, unsent) */ pcb->unsent = pcb->unacked; 800cc5e: 687b ldr r3, [r7, #4] 800cc60: 6f1a ldr r2, [r3, #112] ; 0x70 800cc62: 687b ldr r3, [r7, #4] 800cc64: 66da str r2, [r3, #108] ; 0x6c /* unacked queue is now empty */ pcb->unacked = NULL; 800cc66: 687b ldr r3, [r7, #4] 800cc68: 2200 movs r2, #0 800cc6a: 671a str r2, [r3, #112] ; 0x70 /* Mark RTO in-progress */ tcp_set_flags(pcb, TF_RTO); 800cc6c: 687b ldr r3, [r7, #4] 800cc6e: 8b5b ldrh r3, [r3, #26] 800cc70: f443 6300 orr.w r3, r3, #2048 ; 0x800 800cc74: b29a uxth r2, r3 800cc76: 687b ldr r3, [r7, #4] 800cc78: 835a strh r2, [r3, #26] /* Record the next byte following retransmit */ pcb->rto_end = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); 800cc7a: 68fb ldr r3, [r7, #12] 800cc7c: 691b ldr r3, [r3, #16] 800cc7e: 685b ldr r3, [r3, #4] 800cc80: 4618 mov r0, r3 800cc82: f7f8 fc78 bl 8005576 800cc86: 4604 mov r4, r0 800cc88: 68fb ldr r3, [r7, #12] 800cc8a: 891b ldrh r3, [r3, #8] 800cc8c: 461d mov r5, r3 800cc8e: 68fb ldr r3, [r7, #12] 800cc90: 691b ldr r3, [r3, #16] 800cc92: 899b ldrh r3, [r3, #12] 800cc94: b29b uxth r3, r3 800cc96: 4618 mov r0, r3 800cc98: f7f8 fc58 bl 800554c 800cc9c: 4603 mov r3, r0 800cc9e: b2db uxtb r3, r3 800cca0: f003 0303 and.w r3, r3, #3 800cca4: 2b00 cmp r3, #0 800cca6: d001 beq.n 800ccac 800cca8: 2301 movs r3, #1 800ccaa: e000 b.n 800ccae 800ccac: 2300 movs r3, #0 800ccae: 442b add r3, r5 800ccb0: 18e2 adds r2, r4, r3 800ccb2: 687b ldr r3, [r7, #4] 800ccb4: 64da str r2, [r3, #76] ; 0x4c /* Don't take any RTT measurements after retransmitting. */ pcb->rttest = 0; 800ccb6: 687b ldr r3, [r7, #4] 800ccb8: 2200 movs r2, #0 800ccba: 635a str r2, [r3, #52] ; 0x34 return ERR_OK; 800ccbc: 2300 movs r3, #0 } 800ccbe: 4618 mov r0, r3 800ccc0: 3710 adds r7, #16 800ccc2: 46bd mov sp, r7 800ccc4: bdb0 pop {r4, r5, r7, pc} 800ccc6: bf00 nop 800ccc8: 08013618 .word 0x08013618 800cccc: 08013cb0 .word 0x08013cb0 800ccd0: 0801366c .word 0x0801366c 0800ccd4 : * * @param pcb the tcp_pcb for which to re-enqueue all unacked segments */ void tcp_rexmit_rto_commit(struct tcp_pcb *pcb) { 800ccd4: b580 push {r7, lr} 800ccd6: b082 sub sp, #8 800ccd8: af00 add r7, sp, #0 800ccda: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_rexmit_rto_commit: invalid pcb", pcb != NULL); 800ccdc: 687b ldr r3, [r7, #4] 800ccde: 2b00 cmp r3, #0 800cce0: d106 bne.n 800ccf0 800cce2: 4b0d ldr r3, [pc, #52] ; (800cd18 ) 800cce4: f44f 62d3 mov.w r2, #1688 ; 0x698 800cce8: 490c ldr r1, [pc, #48] ; (800cd1c ) 800ccea: 480d ldr r0, [pc, #52] ; (800cd20 ) 800ccec: f003 ff6c bl 8010bc8 /* increment number of retransmissions */ if (pcb->nrtx < 0xFF) { 800ccf0: 687b ldr r3, [r7, #4] 800ccf2: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 800ccf6: 2bff cmp r3, #255 ; 0xff 800ccf8: d007 beq.n 800cd0a ++pcb->nrtx; 800ccfa: 687b ldr r3, [r7, #4] 800ccfc: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 800cd00: 3301 adds r3, #1 800cd02: b2da uxtb r2, r3 800cd04: 687b ldr r3, [r7, #4] 800cd06: f883 2042 strb.w r2, [r3, #66] ; 0x42 } /* Do the actual retransmission */ tcp_output(pcb); 800cd0a: 6878 ldr r0, [r7, #4] 800cd0c: f7ff fc72 bl 800c5f4 } 800cd10: bf00 nop 800cd12: 3708 adds r7, #8 800cd14: 46bd mov sp, r7 800cd16: bd80 pop {r7, pc} 800cd18: 08013618 .word 0x08013618 800cd1c: 08013cd4 .word 0x08013cd4 800cd20: 0801366c .word 0x0801366c 0800cd24 : * * @param pcb the tcp_pcb for which to re-enqueue all unacked segments */ void tcp_rexmit_rto(struct tcp_pcb *pcb) { 800cd24: b580 push {r7, lr} 800cd26: b082 sub sp, #8 800cd28: af00 add r7, sp, #0 800cd2a: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_rexmit_rto: invalid pcb", pcb != NULL); 800cd2c: 687b ldr r3, [r7, #4] 800cd2e: 2b00 cmp r3, #0 800cd30: d106 bne.n 800cd40 800cd32: 4b0a ldr r3, [pc, #40] ; (800cd5c ) 800cd34: f240 62ad movw r2, #1709 ; 0x6ad 800cd38: 4909 ldr r1, [pc, #36] ; (800cd60 ) 800cd3a: 480a ldr r0, [pc, #40] ; (800cd64 ) 800cd3c: f003 ff44 bl 8010bc8 if (tcp_rexmit_rto_prepare(pcb) == ERR_OK) { 800cd40: 6878 ldr r0, [r7, #4] 800cd42: f7ff ff4d bl 800cbe0 800cd46: 4603 mov r3, r0 800cd48: 2b00 cmp r3, #0 800cd4a: d102 bne.n 800cd52 tcp_rexmit_rto_commit(pcb); 800cd4c: 6878 ldr r0, [r7, #4] 800cd4e: f7ff ffc1 bl 800ccd4 } } 800cd52: bf00 nop 800cd54: 3708 adds r7, #8 800cd56: 46bd mov sp, r7 800cd58: bd80 pop {r7, pc} 800cd5a: bf00 nop 800cd5c: 08013618 .word 0x08013618 800cd60: 08013cf8 .word 0x08013cf8 800cd64: 0801366c .word 0x0801366c 0800cd68 : * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ err_t tcp_rexmit(struct tcp_pcb *pcb) { 800cd68: b590 push {r4, r7, lr} 800cd6a: b085 sub sp, #20 800cd6c: af00 add r7, sp, #0 800cd6e: 6078 str r0, [r7, #4] struct tcp_seg *seg; struct tcp_seg **cur_seg; LWIP_ASSERT("tcp_rexmit: invalid pcb", pcb != NULL); 800cd70: 687b ldr r3, [r7, #4] 800cd72: 2b00 cmp r3, #0 800cd74: d106 bne.n 800cd84 800cd76: 4b2f ldr r3, [pc, #188] ; (800ce34 ) 800cd78: f240 62c1 movw r2, #1729 ; 0x6c1 800cd7c: 492e ldr r1, [pc, #184] ; (800ce38 ) 800cd7e: 482f ldr r0, [pc, #188] ; (800ce3c ) 800cd80: f003 ff22 bl 8010bc8 if (pcb->unacked == NULL) { 800cd84: 687b ldr r3, [r7, #4] 800cd86: 6f1b ldr r3, [r3, #112] ; 0x70 800cd88: 2b00 cmp r3, #0 800cd8a: d102 bne.n 800cd92 return ERR_VAL; 800cd8c: f06f 0305 mvn.w r3, #5 800cd90: e04c b.n 800ce2c } seg = pcb->unacked; 800cd92: 687b ldr r3, [r7, #4] 800cd94: 6f1b ldr r3, [r3, #112] ; 0x70 800cd96: 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)) { 800cd98: 68b8 ldr r0, [r7, #8] 800cd9a: f7ff fe21 bl 800c9e0 800cd9e: 4603 mov r3, r0 800cda0: 2b00 cmp r3, #0 800cda2: d002 beq.n 800cdaa LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit busy\n")); return ERR_VAL; 800cda4: f06f 0305 mvn.w r3, #5 800cda8: e040 b.n 800ce2c } /* Move the first unacked segment to the unsent queue */ /* Keep the unsent queue sorted. */ pcb->unacked = seg->next; 800cdaa: 68bb ldr r3, [r7, #8] 800cdac: 681a ldr r2, [r3, #0] 800cdae: 687b ldr r3, [r7, #4] 800cdb0: 671a str r2, [r3, #112] ; 0x70 cur_seg = &(pcb->unsent); 800cdb2: 687b ldr r3, [r7, #4] 800cdb4: 336c adds r3, #108 ; 0x6c 800cdb6: 60fb str r3, [r7, #12] while (*cur_seg && 800cdb8: e002 b.n 800cdc0 TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 800cdba: 68fb ldr r3, [r7, #12] 800cdbc: 681b ldr r3, [r3, #0] 800cdbe: 60fb str r3, [r7, #12] while (*cur_seg && 800cdc0: 68fb ldr r3, [r7, #12] 800cdc2: 681b ldr r3, [r3, #0] 800cdc4: 2b00 cmp r3, #0 800cdc6: d011 beq.n 800cdec TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { 800cdc8: 68fb ldr r3, [r7, #12] 800cdca: 681b ldr r3, [r3, #0] 800cdcc: 691b ldr r3, [r3, #16] 800cdce: 685b ldr r3, [r3, #4] 800cdd0: 4618 mov r0, r3 800cdd2: f7f8 fbd0 bl 8005576 800cdd6: 4604 mov r4, r0 800cdd8: 68bb ldr r3, [r7, #8] 800cdda: 691b ldr r3, [r3, #16] 800cddc: 685b ldr r3, [r3, #4] 800cdde: 4618 mov r0, r3 800cde0: f7f8 fbc9 bl 8005576 800cde4: 4603 mov r3, r0 800cde6: 1ae3 subs r3, r4, r3 while (*cur_seg && 800cde8: 2b00 cmp r3, #0 800cdea: dbe6 blt.n 800cdba } seg->next = *cur_seg; 800cdec: 68fb ldr r3, [r7, #12] 800cdee: 681a ldr r2, [r3, #0] 800cdf0: 68bb ldr r3, [r7, #8] 800cdf2: 601a str r2, [r3, #0] *cur_seg = seg; 800cdf4: 68fb ldr r3, [r7, #12] 800cdf6: 68ba ldr r2, [r7, #8] 800cdf8: 601a str r2, [r3, #0] #if TCP_OVERSIZE if (seg->next == NULL) { 800cdfa: 68bb ldr r3, [r7, #8] 800cdfc: 681b ldr r3, [r3, #0] 800cdfe: 2b00 cmp r3, #0 800ce00: d103 bne.n 800ce0a /* the retransmitted segment is last in unsent, so reset unsent_oversize */ pcb->unsent_oversize = 0; 800ce02: 687b ldr r3, [r7, #4] 800ce04: 2200 movs r2, #0 800ce06: f8a3 2068 strh.w r2, [r3, #104] ; 0x68 } #endif /* TCP_OVERSIZE */ if (pcb->nrtx < 0xFF) { 800ce0a: 687b ldr r3, [r7, #4] 800ce0c: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 800ce10: 2bff cmp r3, #255 ; 0xff 800ce12: d007 beq.n 800ce24 ++pcb->nrtx; 800ce14: 687b ldr r3, [r7, #4] 800ce16: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 800ce1a: 3301 adds r3, #1 800ce1c: b2da uxtb r2, r3 800ce1e: 687b ldr r3, [r7, #4] 800ce20: f883 2042 strb.w r2, [r3, #66] ; 0x42 } /* Don't take any rtt measurements after retransmitting. */ pcb->rttest = 0; 800ce24: 687b ldr r3, [r7, #4] 800ce26: 2200 movs r2, #0 800ce28: 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; 800ce2a: 2300 movs r3, #0 } 800ce2c: 4618 mov r0, r3 800ce2e: 3714 adds r7, #20 800ce30: 46bd mov sp, r7 800ce32: bd90 pop {r4, r7, pc} 800ce34: 08013618 .word 0x08013618 800ce38: 08013d14 .word 0x08013d14 800ce3c: 0801366c .word 0x0801366c 0800ce40 : * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ void tcp_rexmit_fast(struct tcp_pcb *pcb) { 800ce40: b580 push {r7, lr} 800ce42: b082 sub sp, #8 800ce44: af00 add r7, sp, #0 800ce46: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_rexmit_fast: invalid pcb", pcb != NULL); 800ce48: 687b ldr r3, [r7, #4] 800ce4a: 2b00 cmp r3, #0 800ce4c: d106 bne.n 800ce5c 800ce4e: 4b2a ldr r3, [pc, #168] ; (800cef8 ) 800ce50: f240 62f9 movw r2, #1785 ; 0x6f9 800ce54: 4929 ldr r1, [pc, #164] ; (800cefc ) 800ce56: 482a ldr r0, [pc, #168] ; (800cf00 ) 800ce58: f003 feb6 bl 8010bc8 if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { 800ce5c: 687b ldr r3, [r7, #4] 800ce5e: 6f1b ldr r3, [r3, #112] ; 0x70 800ce60: 2b00 cmp r3, #0 800ce62: d045 beq.n 800cef0 800ce64: 687b ldr r3, [r7, #4] 800ce66: 8b5b ldrh r3, [r3, #26] 800ce68: f003 0304 and.w r3, r3, #4 800ce6c: 2b00 cmp r3, #0 800ce6e: d13f bne.n 800cef0 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) { 800ce70: 6878 ldr r0, [r7, #4] 800ce72: f7ff ff79 bl 800cd68 800ce76: 4603 mov r3, r0 800ce78: 2b00 cmp r3, #0 800ce7a: d139 bne.n 800cef0 /* 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; 800ce7c: 687b ldr r3, [r7, #4] 800ce7e: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60 800ce82: 687b ldr r3, [r7, #4] 800ce84: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48 800ce88: 4293 cmp r3, r2 800ce8a: bf28 it cs 800ce8c: 4613 movcs r3, r2 800ce8e: b29b uxth r3, r3 800ce90: 2b00 cmp r3, #0 800ce92: da00 bge.n 800ce96 800ce94: 3301 adds r3, #1 800ce96: 105b asrs r3, r3, #1 800ce98: b29a uxth r2, r3 800ce9a: 687b ldr r3, [r7, #4] 800ce9c: f8a3 204a strh.w r2, [r3, #74] ; 0x4a /* The minimum value for ssthresh should be 2 MSS */ if (pcb->ssthresh < (2U * pcb->mss)) { 800cea0: 687b ldr r3, [r7, #4] 800cea2: f8b3 304a ldrh.w r3, [r3, #74] ; 0x4a 800cea6: 461a mov r2, r3 800cea8: 687b ldr r3, [r7, #4] 800ceaa: 8e5b ldrh r3, [r3, #50] ; 0x32 800ceac: 005b lsls r3, r3, #1 800ceae: 429a cmp r2, r3 800ceb0: d206 bcs.n 800cec0 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; 800ceb2: 687b ldr r3, [r7, #4] 800ceb4: 8e5b ldrh r3, [r3, #50] ; 0x32 800ceb6: 005b lsls r3, r3, #1 800ceb8: b29a uxth r2, r3 800ceba: 687b ldr r3, [r7, #4] 800cebc: f8a3 204a strh.w r2, [r3, #74] ; 0x4a } pcb->cwnd = pcb->ssthresh + 3 * pcb->mss; 800cec0: 687b ldr r3, [r7, #4] 800cec2: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a 800cec6: 687b ldr r3, [r7, #4] 800cec8: 8e5b ldrh r3, [r3, #50] ; 0x32 800ceca: 4619 mov r1, r3 800cecc: 0049 lsls r1, r1, #1 800cece: 440b add r3, r1 800ced0: b29b uxth r3, r3 800ced2: 4413 add r3, r2 800ced4: b29a uxth r2, r3 800ced6: 687b ldr r3, [r7, #4] 800ced8: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 tcp_set_flags(pcb, TF_INFR); 800cedc: 687b ldr r3, [r7, #4] 800cede: 8b5b ldrh r3, [r3, #26] 800cee0: f043 0304 orr.w r3, r3, #4 800cee4: b29a uxth r2, r3 800cee6: 687b ldr r3, [r7, #4] 800cee8: 835a strh r2, [r3, #26] /* Reset the retransmission timer to prevent immediate rto retransmissions */ pcb->rtime = 0; 800ceea: 687b ldr r3, [r7, #4] 800ceec: 2200 movs r2, #0 800ceee: 861a strh r2, [r3, #48] ; 0x30 } } } 800cef0: bf00 nop 800cef2: 3708 adds r7, #8 800cef4: 46bd mov sp, r7 800cef6: bd80 pop {r7, pc} 800cef8: 08013618 .word 0x08013618 800cefc: 08013d2c .word 0x08013d2c 800cf00: 0801366c .word 0x0801366c 0800cf04 : 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) { 800cf04: b580 push {r7, lr} 800cf06: b086 sub sp, #24 800cf08: af00 add r7, sp, #0 800cf0a: 60f8 str r0, [r7, #12] 800cf0c: 607b str r3, [r7, #4] 800cf0e: 460b mov r3, r1 800cf10: 817b strh r3, [r7, #10] 800cf12: 4613 mov r3, r2 800cf14: 813b strh r3, [r7, #8] struct tcp_hdr *tcphdr; struct pbuf *p; p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); 800cf16: 897a ldrh r2, [r7, #10] 800cf18: 893b ldrh r3, [r7, #8] 800cf1a: 4413 add r3, r2 800cf1c: b29b uxth r3, r3 800cf1e: 3314 adds r3, #20 800cf20: b29b uxth r3, r3 800cf22: f44f 7220 mov.w r2, #640 ; 0x280 800cf26: 4619 mov r1, r3 800cf28: 2022 movs r0, #34 ; 0x22 800cf2a: f7f9 fd6f bl 8006a0c 800cf2e: 6178 str r0, [r7, #20] if (p != NULL) { 800cf30: 697b ldr r3, [r7, #20] 800cf32: 2b00 cmp r3, #0 800cf34: d04d beq.n 800cfd2 LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", 800cf36: 897b ldrh r3, [r7, #10] 800cf38: 3313 adds r3, #19 800cf3a: 697a ldr r2, [r7, #20] 800cf3c: 8952 ldrh r2, [r2, #10] 800cf3e: 4293 cmp r3, r2 800cf40: db06 blt.n 800cf50 800cf42: 4b26 ldr r3, [pc, #152] ; (800cfdc ) 800cf44: f240 7223 movw r2, #1827 ; 0x723 800cf48: 4925 ldr r1, [pc, #148] ; (800cfe0 ) 800cf4a: 4826 ldr r0, [pc, #152] ; (800cfe4 ) 800cf4c: f003 fe3c bl 8010bc8 (p->len >= TCP_HLEN + optlen)); tcphdr = (struct tcp_hdr *)p->payload; 800cf50: 697b ldr r3, [r7, #20] 800cf52: 685b ldr r3, [r3, #4] 800cf54: 613b str r3, [r7, #16] tcphdr->src = lwip_htons(src_port); 800cf56: 8c3b ldrh r3, [r7, #32] 800cf58: 4618 mov r0, r3 800cf5a: f7f8 faf7 bl 800554c 800cf5e: 4603 mov r3, r0 800cf60: 461a mov r2, r3 800cf62: 693b ldr r3, [r7, #16] 800cf64: 801a strh r2, [r3, #0] tcphdr->dest = lwip_htons(dst_port); 800cf66: 8cbb ldrh r3, [r7, #36] ; 0x24 800cf68: 4618 mov r0, r3 800cf6a: f7f8 faef bl 800554c 800cf6e: 4603 mov r3, r0 800cf70: 461a mov r2, r3 800cf72: 693b ldr r3, [r7, #16] 800cf74: 805a strh r2, [r3, #2] tcphdr->seqno = seqno_be; 800cf76: 693b ldr r3, [r7, #16] 800cf78: 687a ldr r2, [r7, #4] 800cf7a: 605a str r2, [r3, #4] tcphdr->ackno = lwip_htonl(ackno); 800cf7c: 68f8 ldr r0, [r7, #12] 800cf7e: f7f8 fafa bl 8005576 800cf82: 4602 mov r2, r0 800cf84: 693b ldr r3, [r7, #16] 800cf86: 609a str r2, [r3, #8] TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), flags); 800cf88: 897b ldrh r3, [r7, #10] 800cf8a: 089b lsrs r3, r3, #2 800cf8c: b29b uxth r3, r3 800cf8e: 3305 adds r3, #5 800cf90: b29b uxth r3, r3 800cf92: 031b lsls r3, r3, #12 800cf94: b29a uxth r2, r3 800cf96: f897 3028 ldrb.w r3, [r7, #40] ; 0x28 800cf9a: b29b uxth r3, r3 800cf9c: 4313 orrs r3, r2 800cf9e: b29b uxth r3, r3 800cfa0: 4618 mov r0, r3 800cfa2: f7f8 fad3 bl 800554c 800cfa6: 4603 mov r3, r0 800cfa8: 461a mov r2, r3 800cfaa: 693b ldr r3, [r7, #16] 800cfac: 819a strh r2, [r3, #12] tcphdr->wnd = lwip_htons(wnd); 800cfae: 8dbb ldrh r3, [r7, #44] ; 0x2c 800cfb0: 4618 mov r0, r3 800cfb2: f7f8 facb bl 800554c 800cfb6: 4603 mov r3, r0 800cfb8: 461a mov r2, r3 800cfba: 693b ldr r3, [r7, #16] 800cfbc: 81da strh r2, [r3, #14] tcphdr->chksum = 0; 800cfbe: 693b ldr r3, [r7, #16] 800cfc0: 2200 movs r2, #0 800cfc2: 741a strb r2, [r3, #16] 800cfc4: 2200 movs r2, #0 800cfc6: 745a strb r2, [r3, #17] tcphdr->urgp = 0; 800cfc8: 693b ldr r3, [r7, #16] 800cfca: 2200 movs r2, #0 800cfcc: 749a strb r2, [r3, #18] 800cfce: 2200 movs r2, #0 800cfd0: 74da strb r2, [r3, #19] } return p; 800cfd2: 697b ldr r3, [r7, #20] } 800cfd4: 4618 mov r0, r3 800cfd6: 3718 adds r7, #24 800cfd8: 46bd mov sp, r7 800cfda: bd80 pop {r7, pc} 800cfdc: 08013618 .word 0x08013618 800cfe0: 08013d4c .word 0x08013d4c 800cfe4: 0801366c .word 0x0801366c 0800cfe8 : * @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 */) { 800cfe8: b5b0 push {r4, r5, r7, lr} 800cfea: b08a sub sp, #40 ; 0x28 800cfec: af04 add r7, sp, #16 800cfee: 60f8 str r0, [r7, #12] 800cff0: 607b str r3, [r7, #4] 800cff2: 460b mov r3, r1 800cff4: 817b strh r3, [r7, #10] 800cff6: 4613 mov r3, r2 800cff8: 813b strh r3, [r7, #8] struct pbuf *p; LWIP_ASSERT("tcp_output_alloc_header: invalid pcb", pcb != NULL); 800cffa: 68fb ldr r3, [r7, #12] 800cffc: 2b00 cmp r3, #0 800cffe: d106 bne.n 800d00e 800d000: 4b15 ldr r3, [pc, #84] ; (800d058 ) 800d002: f240 7242 movw r2, #1858 ; 0x742 800d006: 4915 ldr r1, [pc, #84] ; (800d05c ) 800d008: 4815 ldr r0, [pc, #84] ; (800d060 ) 800d00a: f003 fddd bl 8010bc8 p = tcp_output_alloc_header_common(pcb->rcv_nxt, optlen, datalen, 800d00e: 68fb ldr r3, [r7, #12] 800d010: 6a58 ldr r0, [r3, #36] ; 0x24 800d012: 68fb ldr r3, [r7, #12] 800d014: 8adb ldrh r3, [r3, #22] 800d016: 68fa ldr r2, [r7, #12] 800d018: 8b12 ldrh r2, [r2, #24] 800d01a: 68f9 ldr r1, [r7, #12] 800d01c: 8d49 ldrh r1, [r1, #42] ; 0x2a 800d01e: 893d ldrh r5, [r7, #8] 800d020: 897c ldrh r4, [r7, #10] 800d022: 9103 str r1, [sp, #12] 800d024: 2110 movs r1, #16 800d026: 9102 str r1, [sp, #8] 800d028: 9201 str r2, [sp, #4] 800d02a: 9300 str r3, [sp, #0] 800d02c: 687b ldr r3, [r7, #4] 800d02e: 462a mov r2, r5 800d030: 4621 mov r1, r4 800d032: f7ff ff67 bl 800cf04 800d036: 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) { 800d038: 697b ldr r3, [r7, #20] 800d03a: 2b00 cmp r3, #0 800d03c: d006 beq.n 800d04c /* If we're sending a packet, update the announced right window edge */ pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 800d03e: 68fb ldr r3, [r7, #12] 800d040: 6a5b ldr r3, [r3, #36] ; 0x24 800d042: 68fa ldr r2, [r7, #12] 800d044: 8d52 ldrh r2, [r2, #42] ; 0x2a 800d046: 441a add r2, r3 800d048: 68fb ldr r3, [r7, #12] 800d04a: 62da str r2, [r3, #44] ; 0x2c } return p; 800d04c: 697b ldr r3, [r7, #20] } 800d04e: 4618 mov r0, r3 800d050: 3718 adds r7, #24 800d052: 46bd mov sp, r7 800d054: bdb0 pop {r4, r5, r7, pc} 800d056: bf00 nop 800d058: 08013618 .word 0x08013618 800d05c: 08013d7c .word 0x08013d7c 800d060: 0801366c .word 0x0801366c 0800d064 : /* 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) { 800d064: b580 push {r7, lr} 800d066: b088 sub sp, #32 800d068: af00 add r7, sp, #0 800d06a: 60f8 str r0, [r7, #12] 800d06c: 60b9 str r1, [r7, #8] 800d06e: 4611 mov r1, r2 800d070: 461a mov r2, r3 800d072: 460b mov r3, r1 800d074: 71fb strb r3, [r7, #7] 800d076: 4613 mov r3, r2 800d078: 71bb strb r3, [r7, #6] struct tcp_hdr *tcphdr; u32_t *opts; u16_t sacks_len = 0; 800d07a: 2300 movs r3, #0 800d07c: 83fb strh r3, [r7, #30] LWIP_ASSERT("tcp_output_fill_options: invalid pbuf", p != NULL); 800d07e: 68bb ldr r3, [r7, #8] 800d080: 2b00 cmp r3, #0 800d082: d106 bne.n 800d092 800d084: 4b12 ldr r3, [pc, #72] ; (800d0d0 ) 800d086: f240 7256 movw r2, #1878 ; 0x756 800d08a: 4912 ldr r1, [pc, #72] ; (800d0d4 ) 800d08c: 4812 ldr r0, [pc, #72] ; (800d0d8 ) 800d08e: f003 fd9b bl 8010bc8 tcphdr = (struct tcp_hdr *)p->payload; 800d092: 68bb ldr r3, [r7, #8] 800d094: 685b ldr r3, [r3, #4] 800d096: 61bb str r3, [r7, #24] opts = (u32_t *)(void *)(tcphdr + 1); 800d098: 69bb ldr r3, [r7, #24] 800d09a: 3314 adds r3, #20 800d09c: 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)); 800d09e: 8bfb ldrh r3, [r7, #30] 800d0a0: 009b lsls r3, r3, #2 800d0a2: 461a mov r2, r3 800d0a4: 79fb ldrb r3, [r7, #7] 800d0a6: 009b lsls r3, r3, #2 800d0a8: f003 0304 and.w r3, r3, #4 800d0ac: 4413 add r3, r2 800d0ae: 3314 adds r3, #20 800d0b0: 69ba ldr r2, [r7, #24] 800d0b2: 4413 add r3, r2 800d0b4: 697a ldr r2, [r7, #20] 800d0b6: 429a cmp r2, r3 800d0b8: d006 beq.n 800d0c8 800d0ba: 4b05 ldr r3, [pc, #20] ; (800d0d0 ) 800d0bc: f240 7275 movw r2, #1909 ; 0x775 800d0c0: 4906 ldr r1, [pc, #24] ; (800d0dc ) 800d0c2: 4805 ldr r0, [pc, #20] ; (800d0d8 ) 800d0c4: f003 fd80 bl 8010bc8 LWIP_UNUSED_ARG(optflags); /* for LWIP_NOASSERT */ LWIP_UNUSED_ARG(opts); /* for LWIP_NOASSERT */ } 800d0c8: bf00 nop 800d0ca: 3720 adds r7, #32 800d0cc: 46bd mov sp, r7 800d0ce: bd80 pop {r7, pc} 800d0d0: 08013618 .word 0x08013618 800d0d4: 08013da4 .word 0x08013da4 800d0d8: 0801366c .word 0x0801366c 800d0dc: 08013c9c .word 0x08013c9c 0800d0e0 : * 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) { 800d0e0: b580 push {r7, lr} 800d0e2: b08a sub sp, #40 ; 0x28 800d0e4: af04 add r7, sp, #16 800d0e6: 60f8 str r0, [r7, #12] 800d0e8: 60b9 str r1, [r7, #8] 800d0ea: 607a str r2, [r7, #4] 800d0ec: 603b str r3, [r7, #0] err_t err; struct netif *netif; LWIP_ASSERT("tcp_output_control_segment: invalid pbuf", p != NULL); 800d0ee: 68bb ldr r3, [r7, #8] 800d0f0: 2b00 cmp r3, #0 800d0f2: d106 bne.n 800d102 800d0f4: 4b1c ldr r3, [pc, #112] ; (800d168 ) 800d0f6: f240 7287 movw r2, #1927 ; 0x787 800d0fa: 491c ldr r1, [pc, #112] ; (800d16c ) 800d0fc: 481c ldr r0, [pc, #112] ; (800d170 ) 800d0fe: f003 fd63 bl 8010bc8 netif = tcp_route(pcb, src, dst); 800d102: 683a ldr r2, [r7, #0] 800d104: 6879 ldr r1, [r7, #4] 800d106: 68f8 ldr r0, [r7, #12] 800d108: f7fe fa7c bl 800b604 800d10c: 6138 str r0, [r7, #16] if (netif == NULL) { 800d10e: 693b ldr r3, [r7, #16] 800d110: 2b00 cmp r3, #0 800d112: d102 bne.n 800d11a err = ERR_RTE; 800d114: 23fc movs r3, #252 ; 0xfc 800d116: 75fb strb r3, [r7, #23] 800d118: e01c b.n 800d154 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) { 800d11a: 68fb ldr r3, [r7, #12] 800d11c: 2b00 cmp r3, #0 800d11e: d006 beq.n 800d12e NETIF_SET_HINTS(netif, LWIP_CONST_CAST(struct netif_hint*, &(pcb->netif_hints))); ttl = pcb->ttl; 800d120: 68fb ldr r3, [r7, #12] 800d122: 7adb ldrb r3, [r3, #11] 800d124: 75bb strb r3, [r7, #22] tos = pcb->tos; 800d126: 68fb ldr r3, [r7, #12] 800d128: 7a9b ldrb r3, [r3, #10] 800d12a: 757b strb r3, [r7, #21] 800d12c: e003 b.n 800d136 } else { /* Send output with hardcoded TTL/HL since we have no access to the pcb */ ttl = TCP_TTL; 800d12e: 23ff movs r3, #255 ; 0xff 800d130: 75bb strb r3, [r7, #22] tos = 0; 800d132: 2300 movs r3, #0 800d134: 757b strb r3, [r7, #21] } TCP_STATS_INC(tcp.xmit); err = ip_output_if(p, src, dst, ttl, tos, IP_PROTO_TCP, netif); 800d136: 7dba ldrb r2, [r7, #22] 800d138: 693b ldr r3, [r7, #16] 800d13a: 9302 str r3, [sp, #8] 800d13c: 2306 movs r3, #6 800d13e: 9301 str r3, [sp, #4] 800d140: 7d7b ldrb r3, [r7, #21] 800d142: 9300 str r3, [sp, #0] 800d144: 4613 mov r3, r2 800d146: 683a ldr r2, [r7, #0] 800d148: 6879 ldr r1, [r7, #4] 800d14a: 68b8 ldr r0, [r7, #8] 800d14c: f002 f85a bl 800f204 800d150: 4603 mov r3, r0 800d152: 75fb strb r3, [r7, #23] NETIF_RESET_HINTS(netif); } pbuf_free(p); 800d154: 68b8 ldr r0, [r7, #8] 800d156: f7f9 ff3d bl 8006fd4 return err; 800d15a: f997 3017 ldrsb.w r3, [r7, #23] } 800d15e: 4618 mov r0, r3 800d160: 3718 adds r7, #24 800d162: 46bd mov sp, r7 800d164: bd80 pop {r7, pc} 800d166: bf00 nop 800d168: 08013618 .word 0x08013618 800d16c: 08013dcc .word 0x08013dcc 800d170: 0801366c .word 0x0801366c 0800d174 : */ 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) { 800d174: b590 push {r4, r7, lr} 800d176: b08b sub sp, #44 ; 0x2c 800d178: af04 add r7, sp, #16 800d17a: 60f8 str r0, [r7, #12] 800d17c: 60b9 str r1, [r7, #8] 800d17e: 607a str r2, [r7, #4] 800d180: 603b str r3, [r7, #0] struct pbuf *p; u16_t wnd; u8_t optlen; LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL); 800d182: 683b ldr r3, [r7, #0] 800d184: 2b00 cmp r3, #0 800d186: d106 bne.n 800d196 800d188: 4b1f ldr r3, [pc, #124] ; (800d208 ) 800d18a: f240 72c4 movw r2, #1988 ; 0x7c4 800d18e: 491f ldr r1, [pc, #124] ; (800d20c ) 800d190: 481f ldr r0, [pc, #124] ; (800d210 ) 800d192: f003 fd19 bl 8010bc8 LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL); 800d196: 6abb ldr r3, [r7, #40] ; 0x28 800d198: 2b00 cmp r3, #0 800d19a: d106 bne.n 800d1aa 800d19c: 4b1a ldr r3, [pc, #104] ; (800d208 ) 800d19e: f240 72c5 movw r2, #1989 ; 0x7c5 800d1a2: 491c ldr r1, [pc, #112] ; (800d214 ) 800d1a4: 481a ldr r0, [pc, #104] ; (800d210 ) 800d1a6: f003 fd0f bl 8010bc8 optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); 800d1aa: 2300 movs r3, #0 800d1ac: 75fb strb r3, [r7, #23] #if LWIP_WND_SCALE wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF)); #else wnd = PP_HTONS(TCP_WND); 800d1ae: f246 0308 movw r3, #24584 ; 0x6008 800d1b2: 82bb strh r3, [r7, #20] #endif p = tcp_output_alloc_header_common(ackno, optlen, 0, lwip_htonl(seqno), local_port, 800d1b4: 7dfb ldrb r3, [r7, #23] 800d1b6: b29c uxth r4, r3 800d1b8: 68b8 ldr r0, [r7, #8] 800d1ba: f7f8 f9dc bl 8005576 800d1be: 4602 mov r2, r0 800d1c0: 8abb ldrh r3, [r7, #20] 800d1c2: 9303 str r3, [sp, #12] 800d1c4: 2314 movs r3, #20 800d1c6: 9302 str r3, [sp, #8] 800d1c8: 8e3b ldrh r3, [r7, #48] ; 0x30 800d1ca: 9301 str r3, [sp, #4] 800d1cc: 8dbb ldrh r3, [r7, #44] ; 0x2c 800d1ce: 9300 str r3, [sp, #0] 800d1d0: 4613 mov r3, r2 800d1d2: 2200 movs r2, #0 800d1d4: 4621 mov r1, r4 800d1d6: 6878 ldr r0, [r7, #4] 800d1d8: f7ff fe94 bl 800cf04 800d1dc: 6138 str r0, [r7, #16] remote_port, TCP_RST | TCP_ACK, wnd); if (p == NULL) { 800d1de: 693b ldr r3, [r7, #16] 800d1e0: 2b00 cmp r3, #0 800d1e2: d00c beq.n 800d1fe LWIP_DEBUGF(TCP_DEBUG, ("tcp_rst: could not allocate memory for pbuf\n")); return; } tcp_output_fill_options(pcb, p, 0, optlen); 800d1e4: 7dfb ldrb r3, [r7, #23] 800d1e6: 2200 movs r2, #0 800d1e8: 6939 ldr r1, [r7, #16] 800d1ea: 68f8 ldr r0, [r7, #12] 800d1ec: f7ff ff3a bl 800d064 MIB2_STATS_INC(mib2.tcpoutrsts); tcp_output_control_segment(pcb, p, local_ip, remote_ip); 800d1f0: 6abb ldr r3, [r7, #40] ; 0x28 800d1f2: 683a ldr r2, [r7, #0] 800d1f4: 6939 ldr r1, [r7, #16] 800d1f6: 68f8 ldr r0, [r7, #12] 800d1f8: f7ff ff72 bl 800d0e0 800d1fc: e000 b.n 800d200 return; 800d1fe: bf00 nop LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); } 800d200: 371c adds r7, #28 800d202: 46bd mov sp, r7 800d204: bd90 pop {r4, r7, pc} 800d206: bf00 nop 800d208: 08013618 .word 0x08013618 800d20c: 08013df8 .word 0x08013df8 800d210: 0801366c .word 0x0801366c 800d214: 08013e14 .word 0x08013e14 0800d218 : * * @param pcb Protocol control block for the TCP connection to send the ACK */ err_t tcp_send_empty_ack(struct tcp_pcb *pcb) { 800d218: b590 push {r4, r7, lr} 800d21a: b087 sub sp, #28 800d21c: af00 add r7, sp, #0 800d21e: 6078 str r0, [r7, #4] err_t err; struct pbuf *p; u8_t optlen, optflags = 0; 800d220: 2300 movs r3, #0 800d222: 75fb strb r3, [r7, #23] u8_t num_sacks = 0; 800d224: 2300 movs r3, #0 800d226: 75bb strb r3, [r7, #22] LWIP_ASSERT("tcp_send_empty_ack: invalid pcb", pcb != NULL); 800d228: 687b ldr r3, [r7, #4] 800d22a: 2b00 cmp r3, #0 800d22c: d106 bne.n 800d23c 800d22e: 4b28 ldr r3, [pc, #160] ; (800d2d0 ) 800d230: f240 72ea movw r2, #2026 ; 0x7ea 800d234: 4927 ldr r1, [pc, #156] ; (800d2d4 ) 800d236: 4828 ldr r0, [pc, #160] ; (800d2d8 ) 800d238: f003 fcc6 bl 8010bc8 #if LWIP_TCP_TIMESTAMPS if (pcb->flags & TF_TIMESTAMP) { optflags = TF_SEG_OPTS_TS; } #endif optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb); 800d23c: 7dfb ldrb r3, [r7, #23] 800d23e: 009b lsls r3, r3, #2 800d240: b2db uxtb r3, r3 800d242: f003 0304 and.w r3, r3, #4 800d246: 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)); 800d248: 7d7b ldrb r3, [r7, #21] 800d24a: b29c uxth r4, r3 800d24c: 687b ldr r3, [r7, #4] 800d24e: 6d1b ldr r3, [r3, #80] ; 0x50 800d250: 4618 mov r0, r3 800d252: f7f8 f990 bl 8005576 800d256: 4603 mov r3, r0 800d258: 2200 movs r2, #0 800d25a: 4621 mov r1, r4 800d25c: 6878 ldr r0, [r7, #4] 800d25e: f7ff fec3 bl 800cfe8 800d262: 6138 str r0, [r7, #16] if (p == NULL) { 800d264: 693b ldr r3, [r7, #16] 800d266: 2b00 cmp r3, #0 800d268: d109 bne.n 800d27e /* let tcp_fasttmr retry sending this ACK */ tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 800d26a: 687b ldr r3, [r7, #4] 800d26c: 8b5b ldrh r3, [r3, #26] 800d26e: f043 0303 orr.w r3, r3, #3 800d272: b29a uxth r2, r3 800d274: 687b ldr r3, [r7, #4] 800d276: 835a strh r2, [r3, #26] LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n")); return ERR_BUF; 800d278: f06f 0301 mvn.w r3, #1 800d27c: e023 b.n 800d2c6 } tcp_output_fill_options(pcb, p, optflags, num_sacks); 800d27e: 7dbb ldrb r3, [r7, #22] 800d280: 7dfa ldrb r2, [r7, #23] 800d282: 6939 ldr r1, [r7, #16] 800d284: 6878 ldr r0, [r7, #4] 800d286: f7ff feed bl 800d064 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); 800d28a: 687a ldr r2, [r7, #4] 800d28c: 687b ldr r3, [r7, #4] 800d28e: 3304 adds r3, #4 800d290: 6939 ldr r1, [r7, #16] 800d292: 6878 ldr r0, [r7, #4] 800d294: f7ff ff24 bl 800d0e0 800d298: 4603 mov r3, r0 800d29a: 73fb strb r3, [r7, #15] if (err != ERR_OK) { 800d29c: f997 300f ldrsb.w r3, [r7, #15] 800d2a0: 2b00 cmp r3, #0 800d2a2: d007 beq.n 800d2b4 /* let tcp_fasttmr retry sending this ACK */ tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 800d2a4: 687b ldr r3, [r7, #4] 800d2a6: 8b5b ldrh r3, [r3, #26] 800d2a8: f043 0303 orr.w r3, r3, #3 800d2ac: b29a uxth r2, r3 800d2ae: 687b ldr r3, [r7, #4] 800d2b0: 835a strh r2, [r3, #26] 800d2b2: e006 b.n 800d2c2 } else { /* remove ACK flags from the PCB, as we sent an empty ACK now */ tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 800d2b4: 687b ldr r3, [r7, #4] 800d2b6: 8b5b ldrh r3, [r3, #26] 800d2b8: f023 0303 bic.w r3, r3, #3 800d2bc: b29a uxth r2, r3 800d2be: 687b ldr r3, [r7, #4] 800d2c0: 835a strh r2, [r3, #26] } return err; 800d2c2: f997 300f ldrsb.w r3, [r7, #15] } 800d2c6: 4618 mov r0, r3 800d2c8: 371c adds r7, #28 800d2ca: 46bd mov sp, r7 800d2cc: bd90 pop {r4, r7, pc} 800d2ce: bf00 nop 800d2d0: 08013618 .word 0x08013618 800d2d4: 08013e30 .word 0x08013e30 800d2d8: 0801366c .word 0x0801366c 0800d2dc : * * @param pcb the tcp_pcb for which to send a keepalive packet */ err_t tcp_keepalive(struct tcp_pcb *pcb) { 800d2dc: b590 push {r4, r7, lr} 800d2de: b085 sub sp, #20 800d2e0: af00 add r7, sp, #0 800d2e2: 6078 str r0, [r7, #4] err_t err; struct pbuf *p; u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); 800d2e4: 2300 movs r3, #0 800d2e6: 72bb strb r3, [r7, #10] LWIP_ASSERT("tcp_keepalive: invalid pcb", pcb != NULL); 800d2e8: 687b ldr r3, [r7, #4] 800d2ea: 2b00 cmp r3, #0 800d2ec: d106 bne.n 800d2fc 800d2ee: 4b18 ldr r3, [pc, #96] ; (800d350 ) 800d2f0: f640 0224 movw r2, #2084 ; 0x824 800d2f4: 4917 ldr r1, [pc, #92] ; (800d354 ) 800d2f6: 4818 ldr r0, [pc, #96] ; (800d358 ) 800d2f8: f003 fc66 bl 8010bc8 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)); 800d2fc: 7abb ldrb r3, [r7, #10] 800d2fe: b29c uxth r4, r3 800d300: 687b ldr r3, [r7, #4] 800d302: 6d1b ldr r3, [r3, #80] ; 0x50 800d304: 3b01 subs r3, #1 800d306: 4618 mov r0, r3 800d308: f7f8 f935 bl 8005576 800d30c: 4603 mov r3, r0 800d30e: 2200 movs r2, #0 800d310: 4621 mov r1, r4 800d312: 6878 ldr r0, [r7, #4] 800d314: f7ff fe68 bl 800cfe8 800d318: 60f8 str r0, [r7, #12] if (p == NULL) { 800d31a: 68fb ldr r3, [r7, #12] 800d31c: 2b00 cmp r3, #0 800d31e: d102 bne.n 800d326 LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: could not allocate memory for pbuf\n")); return ERR_MEM; 800d320: f04f 33ff mov.w r3, #4294967295 800d324: e010 b.n 800d348 } tcp_output_fill_options(pcb, p, 0, optlen); 800d326: 7abb ldrb r3, [r7, #10] 800d328: 2200 movs r2, #0 800d32a: 68f9 ldr r1, [r7, #12] 800d32c: 6878 ldr r0, [r7, #4] 800d32e: f7ff fe99 bl 800d064 err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip); 800d332: 687a ldr r2, [r7, #4] 800d334: 687b ldr r3, [r7, #4] 800d336: 3304 adds r3, #4 800d338: 68f9 ldr r1, [r7, #12] 800d33a: 6878 ldr r0, [r7, #4] 800d33c: f7ff fed0 bl 800d0e0 800d340: 4603 mov r3, r0 800d342: 72fb strb r3, [r7, #11] 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; 800d344: f997 300b ldrsb.w r3, [r7, #11] } 800d348: 4618 mov r0, r3 800d34a: 3714 adds r7, #20 800d34c: 46bd mov sp, r7 800d34e: bd90 pop {r4, r7, pc} 800d350: 08013618 .word 0x08013618 800d354: 08013e50 .word 0x08013e50 800d358: 0801366c .word 0x0801366c 0800d35c : * * @param pcb the tcp_pcb for which to send a zero-window probe packet */ err_t tcp_zero_window_probe(struct tcp_pcb *pcb) { 800d35c: b590 push {r4, r7, lr} 800d35e: b08b sub sp, #44 ; 0x2c 800d360: af00 add r7, sp, #0 800d362: 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); 800d364: 2300 movs r3, #0 800d366: 74fb strb r3, [r7, #19] LWIP_ASSERT("tcp_zero_window_probe: invalid pcb", pcb != NULL); 800d368: 687b ldr r3, [r7, #4] 800d36a: 2b00 cmp r3, #0 800d36c: d106 bne.n 800d37c 800d36e: 4b4d ldr r3, [pc, #308] ; (800d4a4 ) 800d370: f640 024f movw r2, #2127 ; 0x84f 800d374: 494c ldr r1, [pc, #304] ; (800d4a8 ) 800d376: 484d ldr r0, [pc, #308] ; (800d4ac ) 800d378: f003 fc26 bl 8010bc8 ("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; 800d37c: 687b ldr r3, [r7, #4] 800d37e: 6edb ldr r3, [r3, #108] ; 0x6c 800d380: 627b str r3, [r7, #36] ; 0x24 if (seg == NULL) { 800d382: 6a7b ldr r3, [r7, #36] ; 0x24 800d384: 2b00 cmp r3, #0 800d386: d101 bne.n 800d38c /* Not expected, persist timer should be off when the send buffer is empty */ return ERR_OK; 800d388: 2300 movs r3, #0 800d38a: e087 b.n 800d49c /* 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) { 800d38c: 687b ldr r3, [r7, #4] 800d38e: f893 309a ldrb.w r3, [r3, #154] ; 0x9a 800d392: 2bff cmp r3, #255 ; 0xff 800d394: d007 beq.n 800d3a6 ++pcb->persist_probe; 800d396: 687b ldr r3, [r7, #4] 800d398: f893 309a ldrb.w r3, [r3, #154] ; 0x9a 800d39c: 3301 adds r3, #1 800d39e: b2da uxtb r2, r3 800d3a0: 687b ldr r3, [r7, #4] 800d3a2: f883 209a strb.w r2, [r3, #154] ; 0x9a } is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 800d3a6: 6a7b ldr r3, [r7, #36] ; 0x24 800d3a8: 691b ldr r3, [r3, #16] 800d3aa: 899b ldrh r3, [r3, #12] 800d3ac: b29b uxth r3, r3 800d3ae: 4618 mov r0, r3 800d3b0: f7f8 f8cc bl 800554c 800d3b4: 4603 mov r3, r0 800d3b6: b2db uxtb r3, r3 800d3b8: f003 0301 and.w r3, r3, #1 800d3bc: 2b00 cmp r3, #0 800d3be: d005 beq.n 800d3cc 800d3c0: 6a7b ldr r3, [r7, #36] ; 0x24 800d3c2: 891b ldrh r3, [r3, #8] 800d3c4: 2b00 cmp r3, #0 800d3c6: d101 bne.n 800d3cc 800d3c8: 2301 movs r3, #1 800d3ca: e000 b.n 800d3ce 800d3cc: 2300 movs r3, #0 800d3ce: f887 3023 strb.w r3, [r7, #35] ; 0x23 /* we want to send one seqno: either FIN or data (no options) */ len = is_fin ? 0 : 1; 800d3d2: f897 3023 ldrb.w r3, [r7, #35] ; 0x23 800d3d6: 2b00 cmp r3, #0 800d3d8: bf0c ite eq 800d3da: 2301 moveq r3, #1 800d3dc: 2300 movne r3, #0 800d3de: b2db uxtb r3, r3 800d3e0: 843b strh r3, [r7, #32] p = tcp_output_alloc_header(pcb, optlen, len, seg->tcphdr->seqno); 800d3e2: 7cfb ldrb r3, [r7, #19] 800d3e4: b299 uxth r1, r3 800d3e6: 6a7b ldr r3, [r7, #36] ; 0x24 800d3e8: 691b ldr r3, [r3, #16] 800d3ea: 685b ldr r3, [r3, #4] 800d3ec: 8c3a ldrh r2, [r7, #32] 800d3ee: 6878 ldr r0, [r7, #4] 800d3f0: f7ff fdfa bl 800cfe8 800d3f4: 61f8 str r0, [r7, #28] if (p == NULL) { 800d3f6: 69fb ldr r3, [r7, #28] 800d3f8: 2b00 cmp r3, #0 800d3fa: d102 bne.n 800d402 LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n")); return ERR_MEM; 800d3fc: f04f 33ff mov.w r3, #4294967295 800d400: e04c b.n 800d49c } tcphdr = (struct tcp_hdr *)p->payload; 800d402: 69fb ldr r3, [r7, #28] 800d404: 685b ldr r3, [r3, #4] 800d406: 61bb str r3, [r7, #24] if (is_fin) { 800d408: f897 3023 ldrb.w r3, [r7, #35] ; 0x23 800d40c: 2b00 cmp r3, #0 800d40e: d011 beq.n 800d434 /* FIN segment, no data */ TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN); 800d410: 69bb ldr r3, [r7, #24] 800d412: 899b ldrh r3, [r3, #12] 800d414: b29b uxth r3, r3 800d416: b21b sxth r3, r3 800d418: f423 537c bic.w r3, r3, #16128 ; 0x3f00 800d41c: b21c sxth r4, r3 800d41e: 2011 movs r0, #17 800d420: f7f8 f894 bl 800554c 800d424: 4603 mov r3, r0 800d426: b21b sxth r3, r3 800d428: 4323 orrs r3, r4 800d42a: b21b sxth r3, r3 800d42c: b29a uxth r2, r3 800d42e: 69bb ldr r3, [r7, #24] 800d430: 819a strh r2, [r3, #12] 800d432: e010 b.n 800d456 } else { /* Data segment, copy in one byte from the head of the unacked queue */ char *d = ((char *)p->payload + TCP_HLEN); 800d434: 69fb ldr r3, [r7, #28] 800d436: 685b ldr r3, [r3, #4] 800d438: 3314 adds r3, #20 800d43a: 617b str r3, [r7, #20] /* 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); 800d43c: 6a7b ldr r3, [r7, #36] ; 0x24 800d43e: 6858 ldr r0, [r3, #4] 800d440: 6a7b ldr r3, [r7, #36] ; 0x24 800d442: 685b ldr r3, [r3, #4] 800d444: 891a ldrh r2, [r3, #8] 800d446: 6a7b ldr r3, [r7, #36] ; 0x24 800d448: 891b ldrh r3, [r3, #8] 800d44a: 1ad3 subs r3, r2, r3 800d44c: b29b uxth r3, r3 800d44e: 2201 movs r2, #1 800d450: 6979 ldr r1, [r7, #20] 800d452: f7f9 ffa9 bl 80073a8 } /* The byte may be acknowledged without the window being opened. */ snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + 1; 800d456: 6a7b ldr r3, [r7, #36] ; 0x24 800d458: 691b ldr r3, [r3, #16] 800d45a: 685b ldr r3, [r3, #4] 800d45c: 4618 mov r0, r3 800d45e: f7f8 f88a bl 8005576 800d462: 4603 mov r3, r0 800d464: 3301 adds r3, #1 800d466: 60fb str r3, [r7, #12] if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 800d468: 687b ldr r3, [r7, #4] 800d46a: 6d1a ldr r2, [r3, #80] ; 0x50 800d46c: 68fb ldr r3, [r7, #12] 800d46e: 1ad3 subs r3, r2, r3 800d470: 2b00 cmp r3, #0 800d472: da02 bge.n 800d47a pcb->snd_nxt = snd_nxt; 800d474: 687b ldr r3, [r7, #4] 800d476: 68fa ldr r2, [r7, #12] 800d478: 651a str r2, [r3, #80] ; 0x50 } tcp_output_fill_options(pcb, p, 0, optlen); 800d47a: 7cfb ldrb r3, [r7, #19] 800d47c: 2200 movs r2, #0 800d47e: 69f9 ldr r1, [r7, #28] 800d480: 6878 ldr r0, [r7, #4] 800d482: f7ff fdef bl 800d064 err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip); 800d486: 687a ldr r2, [r7, #4] 800d488: 687b ldr r3, [r7, #4] 800d48a: 3304 adds r3, #4 800d48c: 69f9 ldr r1, [r7, #28] 800d48e: 6878 ldr r0, [r7, #4] 800d490: f7ff fe26 bl 800d0e0 800d494: 4603 mov r3, r0 800d496: 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; 800d498: f997 300b ldrsb.w r3, [r7, #11] } 800d49c: 4618 mov r0, r3 800d49e: 372c adds r7, #44 ; 0x2c 800d4a0: 46bd mov sp, r7 800d4a2: bd90 pop {r4, r7, pc} 800d4a4: 08013618 .word 0x08013618 800d4a8: 08013e6c .word 0x08013e6c 800d4ac: 0801366c .word 0x0801366c 0800d4b0 : * * @param arg unused argument */ static void tcpip_tcp_timer(void *arg) { 800d4b0: b580 push {r7, lr} 800d4b2: b082 sub sp, #8 800d4b4: af00 add r7, sp, #0 800d4b6: 6078 str r0, [r7, #4] LWIP_UNUSED_ARG(arg); /* call TCP timer handler */ tcp_tmr(); 800d4b8: f7fa f864 bl 8007584 /* timer still needed? */ if (tcp_active_pcbs || tcp_tw_pcbs) { 800d4bc: 4b0a ldr r3, [pc, #40] ; (800d4e8 ) 800d4be: 681b ldr r3, [r3, #0] 800d4c0: 2b00 cmp r3, #0 800d4c2: d103 bne.n 800d4cc 800d4c4: 4b09 ldr r3, [pc, #36] ; (800d4ec ) 800d4c6: 681b ldr r3, [r3, #0] 800d4c8: 2b00 cmp r3, #0 800d4ca: d005 beq.n 800d4d8 /* restart timer */ sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 800d4cc: 2200 movs r2, #0 800d4ce: 4908 ldr r1, [pc, #32] ; (800d4f0 ) 800d4d0: 20fa movs r0, #250 ; 0xfa 800d4d2: f000 f8f3 bl 800d6bc 800d4d6: e003 b.n 800d4e0 } else { /* disable timer */ tcpip_tcp_timer_active = 0; 800d4d8: 4b06 ldr r3, [pc, #24] ; (800d4f4 ) 800d4da: 2200 movs r2, #0 800d4dc: 601a str r2, [r3, #0] } } 800d4de: bf00 nop 800d4e0: bf00 nop 800d4e2: 3708 adds r7, #8 800d4e4: 46bd mov sp, r7 800d4e6: bd80 pop {r7, pc} 800d4e8: 24007b78 .word 0x24007b78 800d4ec: 24007b7c .word 0x24007b7c 800d4f0: 0800d4b1 .word 0x0800d4b1 800d4f4: 24007bc8 .word 0x24007bc8 0800d4f8 : * the reason is to have the TCP timer only running when * there are active (or time-wait) PCBs. */ void tcp_timer_needed(void) { 800d4f8: b580 push {r7, lr} 800d4fa: 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)) { 800d4fc: 4b0a ldr r3, [pc, #40] ; (800d528 ) 800d4fe: 681b ldr r3, [r3, #0] 800d500: 2b00 cmp r3, #0 800d502: d10f bne.n 800d524 800d504: 4b09 ldr r3, [pc, #36] ; (800d52c ) 800d506: 681b ldr r3, [r3, #0] 800d508: 2b00 cmp r3, #0 800d50a: d103 bne.n 800d514 800d50c: 4b08 ldr r3, [pc, #32] ; (800d530 ) 800d50e: 681b ldr r3, [r3, #0] 800d510: 2b00 cmp r3, #0 800d512: d007 beq.n 800d524 /* enable and start timer */ tcpip_tcp_timer_active = 1; 800d514: 4b04 ldr r3, [pc, #16] ; (800d528 ) 800d516: 2201 movs r2, #1 800d518: 601a str r2, [r3, #0] sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 800d51a: 2200 movs r2, #0 800d51c: 4905 ldr r1, [pc, #20] ; (800d534 ) 800d51e: 20fa movs r0, #250 ; 0xfa 800d520: f000 f8cc bl 800d6bc } } 800d524: bf00 nop 800d526: bd80 pop {r7, pc} 800d528: 24007bc8 .word 0x24007bc8 800d52c: 24007b78 .word 0x24007b78 800d530: 24007b7c .word 0x24007b7c 800d534: 0800d4b1 .word 0x0800d4b1 0800d538 : #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 { 800d538: b580 push {r7, lr} 800d53a: b086 sub sp, #24 800d53c: af00 add r7, sp, #0 800d53e: 60f8 str r0, [r7, #12] 800d540: 60b9 str r1, [r7, #8] 800d542: 607a str r2, [r7, #4] struct sys_timeo *timeout, *t; timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); 800d544: 2006 movs r0, #6 800d546: f7f8 fd69 bl 800601c 800d54a: 6138 str r0, [r7, #16] if (timeout == NULL) { 800d54c: 693b ldr r3, [r7, #16] 800d54e: 2b00 cmp r3, #0 800d550: d109 bne.n 800d566 LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL); 800d552: 693b ldr r3, [r7, #16] 800d554: 2b00 cmp r3, #0 800d556: d151 bne.n 800d5fc 800d558: 4b2a ldr r3, [pc, #168] ; (800d604 ) 800d55a: 22be movs r2, #190 ; 0xbe 800d55c: 492a ldr r1, [pc, #168] ; (800d608 ) 800d55e: 482b ldr r0, [pc, #172] ; (800d60c ) 800d560: f003 fb32 bl 8010bc8 return; 800d564: e04a b.n 800d5fc } timeout->next = NULL; 800d566: 693b ldr r3, [r7, #16] 800d568: 2200 movs r2, #0 800d56a: 601a str r2, [r3, #0] timeout->h = handler; 800d56c: 693b ldr r3, [r7, #16] 800d56e: 68ba ldr r2, [r7, #8] 800d570: 609a str r2, [r3, #8] timeout->arg = arg; 800d572: 693b ldr r3, [r7, #16] 800d574: 687a ldr r2, [r7, #4] 800d576: 60da str r2, [r3, #12] timeout->time = abs_time; 800d578: 693b ldr r3, [r7, #16] 800d57a: 68fa ldr r2, [r7, #12] 800d57c: 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) { 800d57e: 4b24 ldr r3, [pc, #144] ; (800d610 ) 800d580: 681b ldr r3, [r3, #0] 800d582: 2b00 cmp r3, #0 800d584: d103 bne.n 800d58e next_timeout = timeout; 800d586: 4a22 ldr r2, [pc, #136] ; (800d610 ) 800d588: 693b ldr r3, [r7, #16] 800d58a: 6013 str r3, [r2, #0] return; 800d58c: e037 b.n 800d5fe } if (TIME_LESS_THAN(timeout->time, next_timeout->time)) { 800d58e: 693b ldr r3, [r7, #16] 800d590: 685a ldr r2, [r3, #4] 800d592: 4b1f ldr r3, [pc, #124] ; (800d610 ) 800d594: 681b ldr r3, [r3, #0] 800d596: 685b ldr r3, [r3, #4] 800d598: 1ad3 subs r3, r2, r3 800d59a: 0fdb lsrs r3, r3, #31 800d59c: f003 0301 and.w r3, r3, #1 800d5a0: b2db uxtb r3, r3 800d5a2: 2b00 cmp r3, #0 800d5a4: d007 beq.n 800d5b6 timeout->next = next_timeout; 800d5a6: 4b1a ldr r3, [pc, #104] ; (800d610 ) 800d5a8: 681a ldr r2, [r3, #0] 800d5aa: 693b ldr r3, [r7, #16] 800d5ac: 601a str r2, [r3, #0] next_timeout = timeout; 800d5ae: 4a18 ldr r2, [pc, #96] ; (800d610 ) 800d5b0: 693b ldr r3, [r7, #16] 800d5b2: 6013 str r3, [r2, #0] 800d5b4: e023 b.n 800d5fe } else { for (t = next_timeout; t != NULL; t = t->next) { 800d5b6: 4b16 ldr r3, [pc, #88] ; (800d610 ) 800d5b8: 681b ldr r3, [r3, #0] 800d5ba: 617b str r3, [r7, #20] 800d5bc: e01a b.n 800d5f4 if ((t->next == NULL) || TIME_LESS_THAN(timeout->time, t->next->time)) { 800d5be: 697b ldr r3, [r7, #20] 800d5c0: 681b ldr r3, [r3, #0] 800d5c2: 2b00 cmp r3, #0 800d5c4: d00b beq.n 800d5de 800d5c6: 693b ldr r3, [r7, #16] 800d5c8: 685a ldr r2, [r3, #4] 800d5ca: 697b ldr r3, [r7, #20] 800d5cc: 681b ldr r3, [r3, #0] 800d5ce: 685b ldr r3, [r3, #4] 800d5d0: 1ad3 subs r3, r2, r3 800d5d2: 0fdb lsrs r3, r3, #31 800d5d4: f003 0301 and.w r3, r3, #1 800d5d8: b2db uxtb r3, r3 800d5da: 2b00 cmp r3, #0 800d5dc: d007 beq.n 800d5ee timeout->next = t->next; 800d5de: 697b ldr r3, [r7, #20] 800d5e0: 681a ldr r2, [r3, #0] 800d5e2: 693b ldr r3, [r7, #16] 800d5e4: 601a str r2, [r3, #0] t->next = timeout; 800d5e6: 697b ldr r3, [r7, #20] 800d5e8: 693a ldr r2, [r7, #16] 800d5ea: 601a str r2, [r3, #0] break; 800d5ec: e007 b.n 800d5fe for (t = next_timeout; t != NULL; t = t->next) { 800d5ee: 697b ldr r3, [r7, #20] 800d5f0: 681b ldr r3, [r3, #0] 800d5f2: 617b str r3, [r7, #20] 800d5f4: 697b ldr r3, [r7, #20] 800d5f6: 2b00 cmp r3, #0 800d5f8: d1e1 bne.n 800d5be 800d5fa: e000 b.n 800d5fe return; 800d5fc: bf00 nop } } } } 800d5fe: 3718 adds r7, #24 800d600: 46bd mov sp, r7 800d602: bd80 pop {r7, pc} 800d604: 08013e90 .word 0x08013e90 800d608: 08013ec4 .word 0x08013ec4 800d60c: 08013f04 .word 0x08013f04 800d610: 24007bc0 .word 0x24007bc0 0800d614 : #if !LWIP_TESTMODE static #endif void lwip_cyclic_timer(void *arg) { 800d614: b580 push {r7, lr} 800d616: b086 sub sp, #24 800d618: af00 add r7, sp, #0 800d61a: 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; 800d61c: 687b ldr r3, [r7, #4] 800d61e: 617b str r3, [r7, #20] #if LWIP_DEBUG_TIMERNAMES LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: %s()\n", cyclic->handler_name)); #endif cyclic->handler(); 800d620: 697b ldr r3, [r7, #20] 800d622: 685b ldr r3, [r3, #4] 800d624: 4798 blx r3 now = sys_now(); 800d626: f7f7 fd43 bl 80050b0 800d62a: 6138 str r0, [r7, #16] next_timeout_time = (u32_t)(current_timeout_due_time + cyclic->interval_ms); /* overflow handled by TIME_LESS_THAN macro */ 800d62c: 697b ldr r3, [r7, #20] 800d62e: 681a ldr r2, [r3, #0] 800d630: 4b0f ldr r3, [pc, #60] ; (800d670 ) 800d632: 681b ldr r3, [r3, #0] 800d634: 4413 add r3, r2 800d636: 60fb str r3, [r7, #12] if (TIME_LESS_THAN(next_timeout_time, now)) { 800d638: 68fa ldr r2, [r7, #12] 800d63a: 693b ldr r3, [r7, #16] 800d63c: 1ad3 subs r3, r2, r3 800d63e: 0fdb lsrs r3, r3, #31 800d640: f003 0301 and.w r3, r3, #1 800d644: b2db uxtb r3, r3 800d646: 2b00 cmp r3, #0 800d648: d009 beq.n 800d65e /* 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); 800d64a: 697b ldr r3, [r7, #20] 800d64c: 681a ldr r2, [r3, #0] 800d64e: 693b ldr r3, [r7, #16] 800d650: 4413 add r3, r2 800d652: 687a ldr r2, [r7, #4] 800d654: 4907 ldr r1, [pc, #28] ; (800d674 ) 800d656: 4618 mov r0, r3 800d658: f7ff ff6e bl 800d538 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 } } 800d65c: e004 b.n 800d668 sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg); 800d65e: 687a ldr r2, [r7, #4] 800d660: 4904 ldr r1, [pc, #16] ; (800d674 ) 800d662: 68f8 ldr r0, [r7, #12] 800d664: f7ff ff68 bl 800d538 } 800d668: bf00 nop 800d66a: 3718 adds r7, #24 800d66c: 46bd mov sp, r7 800d66e: bd80 pop {r7, pc} 800d670: 24007bc4 .word 0x24007bc4 800d674: 0800d615 .word 0x0800d615 0800d678 : /** Initialize this module */ void sys_timeouts_init(void) { 800d678: b580 push {r7, lr} 800d67a: b082 sub sp, #8 800d67c: 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++) { 800d67e: 2301 movs r3, #1 800d680: 607b str r3, [r7, #4] 800d682: e00e b.n 800d6a2 /* 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])); 800d684: 4a0b ldr r2, [pc, #44] ; (800d6b4 ) 800d686: 687b ldr r3, [r7, #4] 800d688: f852 0033 ldr.w r0, [r2, r3, lsl #3] 800d68c: 687b ldr r3, [r7, #4] 800d68e: 00db lsls r3, r3, #3 800d690: 4a08 ldr r2, [pc, #32] ; (800d6b4 ) 800d692: 4413 add r3, r2 800d694: 461a mov r2, r3 800d696: 4908 ldr r1, [pc, #32] ; (800d6b8 ) 800d698: f000 f810 bl 800d6bc for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) { 800d69c: 687b ldr r3, [r7, #4] 800d69e: 3301 adds r3, #1 800d6a0: 607b str r3, [r7, #4] 800d6a2: 687b ldr r3, [r7, #4] 800d6a4: 2b02 cmp r3, #2 800d6a6: d9ed bls.n 800d684 } } 800d6a8: bf00 nop 800d6aa: bf00 nop 800d6ac: 3708 adds r7, #8 800d6ae: 46bd mov sp, r7 800d6b0: bd80 pop {r7, pc} 800d6b2: bf00 nop 800d6b4: 08014d7c .word 0x08014d7c 800d6b8: 0800d615 .word 0x0800d615 0800d6bc : 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 */ { 800d6bc: b580 push {r7, lr} 800d6be: b086 sub sp, #24 800d6c0: af00 add r7, sp, #0 800d6c2: 60f8 str r0, [r7, #12] 800d6c4: 60b9 str r1, [r7, #8] 800d6c6: 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)); 800d6c8: 68fb ldr r3, [r7, #12] 800d6ca: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000 800d6ce: d306 bcc.n 800d6de 800d6d0: 4b0a ldr r3, [pc, #40] ; (800d6fc ) 800d6d2: f240 1229 movw r2, #297 ; 0x129 800d6d6: 490a ldr r1, [pc, #40] ; (800d700 ) 800d6d8: 480a ldr r0, [pc, #40] ; (800d704 ) 800d6da: f003 fa75 bl 8010bc8 next_timeout_time = (u32_t)(sys_now() + msecs); /* overflow handled by TIME_LESS_THAN macro */ 800d6de: f7f7 fce7 bl 80050b0 800d6e2: 4602 mov r2, r0 800d6e4: 68fb ldr r3, [r7, #12] 800d6e6: 4413 add r3, r2 800d6e8: 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); 800d6ea: 687a ldr r2, [r7, #4] 800d6ec: 68b9 ldr r1, [r7, #8] 800d6ee: 6978 ldr r0, [r7, #20] 800d6f0: f7ff ff22 bl 800d538 #endif } 800d6f4: bf00 nop 800d6f6: 3718 adds r7, #24 800d6f8: 46bd mov sp, r7 800d6fa: bd80 pop {r7, pc} 800d6fc: 08013e90 .word 0x08013e90 800d700: 08013f2c .word 0x08013f2c 800d704: 08013f04 .word 0x08013f04 0800d708 : * * Must be called periodically from your main loop. */ void sys_check_timeouts(void) { 800d708: b580 push {r7, lr} 800d70a: b084 sub sp, #16 800d70c: 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(); 800d70e: f7f7 fccf bl 80050b0 800d712: 60f8 str r0, [r7, #12] do { struct sys_timeo *tmptimeout; sys_timeout_handler handler; void *arg; PBUF_CHECK_FREE_OOSEQ(); 800d714: 4b1a ldr r3, [pc, #104] ; (800d780 ) 800d716: 781b ldrb r3, [r3, #0] 800d718: b2db uxtb r3, r3 800d71a: 2b00 cmp r3, #0 800d71c: d001 beq.n 800d722 800d71e: f7f9 f91f bl 8006960 tmptimeout = next_timeout; 800d722: 4b18 ldr r3, [pc, #96] ; (800d784 ) 800d724: 681b ldr r3, [r3, #0] 800d726: 60bb str r3, [r7, #8] if (tmptimeout == NULL) { 800d728: 68bb ldr r3, [r7, #8] 800d72a: 2b00 cmp r3, #0 800d72c: d022 beq.n 800d774 return; } if (TIME_LESS_THAN(now, tmptimeout->time)) { 800d72e: 68bb ldr r3, [r7, #8] 800d730: 685b ldr r3, [r3, #4] 800d732: 68fa ldr r2, [r7, #12] 800d734: 1ad3 subs r3, r2, r3 800d736: 0fdb lsrs r3, r3, #31 800d738: f003 0301 and.w r3, r3, #1 800d73c: b2db uxtb r3, r3 800d73e: 2b00 cmp r3, #0 800d740: d11a bne.n 800d778 return; } /* Timeout has expired */ next_timeout = tmptimeout->next; 800d742: 68bb ldr r3, [r7, #8] 800d744: 681b ldr r3, [r3, #0] 800d746: 4a0f ldr r2, [pc, #60] ; (800d784 ) 800d748: 6013 str r3, [r2, #0] handler = tmptimeout->h; 800d74a: 68bb ldr r3, [r7, #8] 800d74c: 689b ldr r3, [r3, #8] 800d74e: 607b str r3, [r7, #4] arg = tmptimeout->arg; 800d750: 68bb ldr r3, [r7, #8] 800d752: 68db ldr r3, [r3, #12] 800d754: 603b str r3, [r7, #0] current_timeout_due_time = tmptimeout->time; 800d756: 68bb ldr r3, [r7, #8] 800d758: 685b ldr r3, [r3, #4] 800d75a: 4a0b ldr r2, [pc, #44] ; (800d788 ) 800d75c: 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); 800d75e: 68b9 ldr r1, [r7, #8] 800d760: 2006 movs r0, #6 800d762: f7f8 fccb bl 80060fc if (handler != NULL) { 800d766: 687b ldr r3, [r7, #4] 800d768: 2b00 cmp r3, #0 800d76a: d0d3 beq.n 800d714 handler(arg); 800d76c: 687b ldr r3, [r7, #4] 800d76e: 6838 ldr r0, [r7, #0] 800d770: 4798 blx r3 do { 800d772: e7cf b.n 800d714 return; 800d774: bf00 nop 800d776: e000 b.n 800d77a return; 800d778: bf00 nop } LWIP_TCPIP_THREAD_ALIVE(); /* Repeat until all expired timers have been called */ } while (1); } 800d77a: 3710 adds r7, #16 800d77c: 46bd mov sp, r7 800d77e: bd80 pop {r7, pc} 800d780: 24007b69 .word 0x24007b69 800d784: 24007bc0 .word 0x24007bc0 800d788: 24007bc4 .word 0x24007bc4 0800d78c : /** * Initialize this module. */ void udp_init(void) { 800d78c: b580 push {r7, lr} 800d78e: af00 add r7, sp, #0 #ifdef LWIP_RAND udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); 800d790: f002 fd66 bl 8010260 800d794: 4603 mov r3, r0 800d796: b29b uxth r3, r3 800d798: f3c3 030d ubfx r3, r3, #0, #14 800d79c: b29b uxth r3, r3 800d79e: f5a3 4380 sub.w r3, r3, #16384 ; 0x4000 800d7a2: b29a uxth r2, r3 800d7a4: 4b01 ldr r3, [pc, #4] ; (800d7ac ) 800d7a6: 801a strh r2, [r3, #0] #endif /* LWIP_RAND */ } 800d7a8: bf00 nop 800d7aa: bd80 pop {r7, pc} 800d7ac: 24000070 .word 0x24000070 0800d7b0 : * @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) { 800d7b0: b580 push {r7, lr} 800d7b2: b084 sub sp, #16 800d7b4: af00 add r7, sp, #0 800d7b6: 60f8 str r0, [r7, #12] 800d7b8: 60b9 str r1, [r7, #8] 800d7ba: 4613 mov r3, r2 800d7bc: 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); 800d7be: 68fb ldr r3, [r7, #12] 800d7c0: 2b00 cmp r3, #0 800d7c2: d105 bne.n 800d7d0 800d7c4: 4b27 ldr r3, [pc, #156] ; (800d864 ) 800d7c6: 2287 movs r2, #135 ; 0x87 800d7c8: 4927 ldr r1, [pc, #156] ; (800d868 ) 800d7ca: 4828 ldr r0, [pc, #160] ; (800d86c ) 800d7cc: f003 f9fc bl 8010bc8 LWIP_ASSERT("udp_input_local_match: invalid netif", inp != NULL); 800d7d0: 68bb ldr r3, [r7, #8] 800d7d2: 2b00 cmp r3, #0 800d7d4: d105 bne.n 800d7e2 800d7d6: 4b23 ldr r3, [pc, #140] ; (800d864 ) 800d7d8: 2288 movs r2, #136 ; 0x88 800d7da: 4925 ldr r1, [pc, #148] ; (800d870 ) 800d7dc: 4823 ldr r0, [pc, #140] ; (800d86c ) 800d7de: f003 f9f3 bl 8010bc8 /* check if PCB is bound to specific netif */ if ((pcb->netif_idx != NETIF_NO_INDEX) && 800d7e2: 68fb ldr r3, [r7, #12] 800d7e4: 7a1b ldrb r3, [r3, #8] 800d7e6: 2b00 cmp r3, #0 800d7e8: d00b beq.n 800d802 (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 800d7ea: 68fb ldr r3, [r7, #12] 800d7ec: 7a1a ldrb r2, [r3, #8] 800d7ee: 4b21 ldr r3, [pc, #132] ; (800d874 ) 800d7f0: 685b ldr r3, [r3, #4] 800d7f2: f893 3030 ldrb.w r3, [r3, #48] ; 0x30 800d7f6: 3301 adds r3, #1 800d7f8: b2db uxtb r3, r3 if ((pcb->netif_idx != NETIF_NO_INDEX) && 800d7fa: 429a cmp r2, r3 800d7fc: d001 beq.n 800d802 return 0; 800d7fe: 2300 movs r3, #0 800d800: e02b b.n 800d85a /* 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) { 800d802: 79fb ldrb r3, [r7, #7] 800d804: 2b00 cmp r3, #0 800d806: d018 beq.n 800d83a #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)) || 800d808: 68fb ldr r3, [r7, #12] 800d80a: 2b00 cmp r3, #0 800d80c: d013 beq.n 800d836 800d80e: 68fb ldr r3, [r7, #12] 800d810: 681b ldr r3, [r3, #0] 800d812: 2b00 cmp r3, #0 800d814: d00f beq.n 800d836 ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || 800d816: 4b17 ldr r3, [pc, #92] ; (800d874 ) 800d818: 695b ldr r3, [r3, #20] if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || 800d81a: f1b3 3fff cmp.w r3, #4294967295 800d81e: d00a beq.n 800d836 ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) { 800d820: 68fb ldr r3, [r7, #12] 800d822: 681a ldr r2, [r3, #0] 800d824: 4b13 ldr r3, [pc, #76] ; (800d874 ) 800d826: 695b ldr r3, [r3, #20] 800d828: 405a eors r2, r3 800d82a: 68bb ldr r3, [r7, #8] 800d82c: 3308 adds r3, #8 800d82e: 681b ldr r3, [r3, #0] 800d830: 4013 ands r3, r2 ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || 800d832: 2b00 cmp r3, #0 800d834: d110 bne.n 800d858 return 1; 800d836: 2301 movs r3, #1 800d838: e00f b.n 800d85a } } } 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())) { 800d83a: 68fb ldr r3, [r7, #12] 800d83c: 2b00 cmp r3, #0 800d83e: d009 beq.n 800d854 800d840: 68fb ldr r3, [r7, #12] 800d842: 681b ldr r3, [r3, #0] 800d844: 2b00 cmp r3, #0 800d846: d005 beq.n 800d854 800d848: 68fb ldr r3, [r7, #12] 800d84a: 681a ldr r2, [r3, #0] 800d84c: 4b09 ldr r3, [pc, #36] ; (800d874 ) 800d84e: 695b ldr r3, [r3, #20] 800d850: 429a cmp r2, r3 800d852: d101 bne.n 800d858 return 1; 800d854: 2301 movs r3, #1 800d856: e000 b.n 800d85a } } return 0; 800d858: 2300 movs r3, #0 } 800d85a: 4618 mov r0, r3 800d85c: 3710 adds r7, #16 800d85e: 46bd mov sp, r7 800d860: bd80 pop {r7, pc} 800d862: bf00 nop 800d864: 08013f78 .word 0x08013f78 800d868: 08013fa8 .word 0x08013fa8 800d86c: 08013fcc .word 0x08013fcc 800d870: 08013ff4 .word 0x08013ff4 800d874: 24004c10 .word 0x24004c10 0800d878 : * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 800d878: b590 push {r4, r7, lr} 800d87a: b08d sub sp, #52 ; 0x34 800d87c: af02 add r7, sp, #8 800d87e: 6078 str r0, [r7, #4] 800d880: 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; 800d882: 2300 movs r3, #0 800d884: 77fb strb r3, [r7, #31] LWIP_UNUSED_ARG(inp); LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("udp_input: invalid pbuf", p != NULL); 800d886: 687b ldr r3, [r7, #4] 800d888: 2b00 cmp r3, #0 800d88a: d105 bne.n 800d898 800d88c: 4b7c ldr r3, [pc, #496] ; (800da80 ) 800d88e: 22cf movs r2, #207 ; 0xcf 800d890: 497c ldr r1, [pc, #496] ; (800da84 ) 800d892: 487d ldr r0, [pc, #500] ; (800da88 ) 800d894: f003 f998 bl 8010bc8 LWIP_ASSERT("udp_input: invalid netif", inp != NULL); 800d898: 683b ldr r3, [r7, #0] 800d89a: 2b00 cmp r3, #0 800d89c: d105 bne.n 800d8aa 800d89e: 4b78 ldr r3, [pc, #480] ; (800da80 ) 800d8a0: 22d0 movs r2, #208 ; 0xd0 800d8a2: 497a ldr r1, [pc, #488] ; (800da8c ) 800d8a4: 4878 ldr r0, [pc, #480] ; (800da88 ) 800d8a6: f003 f98f bl 8010bc8 PERF_START; UDP_STATS_INC(udp.recv); /* Check minimum length (UDP header) */ if (p->len < UDP_HLEN) { 800d8aa: 687b ldr r3, [r7, #4] 800d8ac: 895b ldrh r3, [r3, #10] 800d8ae: 2b07 cmp r3, #7 800d8b0: d803 bhi.n 800d8ba 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); 800d8b2: 6878 ldr r0, [r7, #4] 800d8b4: f7f9 fb8e bl 8006fd4 goto end; 800d8b8: e0de b.n 800da78 } udphdr = (struct udp_hdr *)p->payload; 800d8ba: 687b ldr r3, [r7, #4] 800d8bc: 685b ldr r3, [r3, #4] 800d8be: 617b str r3, [r7, #20] /* is broadcast packet ? */ broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()); 800d8c0: 4b73 ldr r3, [pc, #460] ; (800da90 ) 800d8c2: 695b ldr r3, [r3, #20] 800d8c4: 4a72 ldr r2, [pc, #456] ; (800da90 ) 800d8c6: 6812 ldr r2, [r2, #0] 800d8c8: 4611 mov r1, r2 800d8ca: 4618 mov r0, r3 800d8cc: f001 fd72 bl 800f3b4 800d8d0: 4603 mov r3, r0 800d8d2: 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); 800d8d4: 697b ldr r3, [r7, #20] 800d8d6: 881b ldrh r3, [r3, #0] 800d8d8: b29b uxth r3, r3 800d8da: 4618 mov r0, r3 800d8dc: f7f7 fe36 bl 800554c 800d8e0: 4603 mov r3, r0 800d8e2: 823b strh r3, [r7, #16] dest = lwip_ntohs(udphdr->dest); 800d8e4: 697b ldr r3, [r7, #20] 800d8e6: 885b ldrh r3, [r3, #2] 800d8e8: b29b uxth r3, r3 800d8ea: 4618 mov r0, r3 800d8ec: f7f7 fe2e bl 800554c 800d8f0: 4603 mov r3, r0 800d8f2: 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; 800d8f4: 2300 movs r3, #0 800d8f6: 623b str r3, [r7, #32] prev = NULL; 800d8f8: 2300 movs r3, #0 800d8fa: 627b str r3, [r7, #36] ; 0x24 uncon_pcb = NULL; 800d8fc: 2300 movs r3, #0 800d8fe: 61bb str r3, [r7, #24] /* 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) { 800d900: 4b64 ldr r3, [pc, #400] ; (800da94 ) 800d902: 681b ldr r3, [r3, #0] 800d904: 623b str r3, [r7, #32] 800d906: e054 b.n 800d9b2 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) && 800d908: 6a3b ldr r3, [r7, #32] 800d90a: 8a5b ldrh r3, [r3, #18] 800d90c: 89fa ldrh r2, [r7, #14] 800d90e: 429a cmp r2, r3 800d910: d14a bne.n 800d9a8 (udp_input_local_match(pcb, inp, broadcast) != 0)) { 800d912: 7cfb ldrb r3, [r7, #19] 800d914: 461a mov r2, r3 800d916: 6839 ldr r1, [r7, #0] 800d918: 6a38 ldr r0, [r7, #32] 800d91a: f7ff ff49 bl 800d7b0 800d91e: 4603 mov r3, r0 if ((pcb->local_port == dest) && 800d920: 2b00 cmp r3, #0 800d922: d041 beq.n 800d9a8 if ((pcb->flags & UDP_FLAGS_CONNECTED) == 0) { 800d924: 6a3b ldr r3, [r7, #32] 800d926: 7c1b ldrb r3, [r3, #16] 800d928: f003 0304 and.w r3, r3, #4 800d92c: 2b00 cmp r3, #0 800d92e: d11d bne.n 800d96c if (uncon_pcb == NULL) { 800d930: 69bb ldr r3, [r7, #24] 800d932: 2b00 cmp r3, #0 800d934: d102 bne.n 800d93c /* the first unconnected matching PCB */ uncon_pcb = pcb; 800d936: 6a3b ldr r3, [r7, #32] 800d938: 61bb str r3, [r7, #24] 800d93a: e017 b.n 800d96c #if LWIP_IPV4 } else if (broadcast && ip4_current_dest_addr()->addr == IPADDR_BROADCAST) { 800d93c: 7cfb ldrb r3, [r7, #19] 800d93e: 2b00 cmp r3, #0 800d940: d014 beq.n 800d96c 800d942: 4b53 ldr r3, [pc, #332] ; (800da90 ) 800d944: 695b ldr r3, [r3, #20] 800d946: f1b3 3fff cmp.w r3, #4294967295 800d94a: d10f bne.n 800d96c /* 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))) { 800d94c: 69bb ldr r3, [r7, #24] 800d94e: 681a ldr r2, [r3, #0] 800d950: 683b ldr r3, [r7, #0] 800d952: 3304 adds r3, #4 800d954: 681b ldr r3, [r3, #0] 800d956: 429a cmp r2, r3 800d958: d008 beq.n 800d96c /* 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))) { 800d95a: 6a3b ldr r3, [r7, #32] 800d95c: 681a ldr r2, [r3, #0] 800d95e: 683b ldr r3, [r7, #0] 800d960: 3304 adds r3, #4 800d962: 681b ldr r3, [r3, #0] 800d964: 429a cmp r2, r3 800d966: d101 bne.n 800d96c /* better match */ uncon_pcb = pcb; 800d968: 6a3b ldr r3, [r7, #32] 800d96a: 61bb str r3, [r7, #24] } #endif /* SO_REUSE */ } /* compare PCB remote addr+port to UDP source addr+port */ if ((pcb->remote_port == src) && 800d96c: 6a3b ldr r3, [r7, #32] 800d96e: 8a9b ldrh r3, [r3, #20] 800d970: 8a3a ldrh r2, [r7, #16] 800d972: 429a cmp r2, r3 800d974: d118 bne.n 800d9a8 (ip_addr_isany_val(pcb->remote_ip) || 800d976: 6a3b ldr r3, [r7, #32] 800d978: 685b ldr r3, [r3, #4] if ((pcb->remote_port == src) && 800d97a: 2b00 cmp r3, #0 800d97c: d005 beq.n 800d98a ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) { 800d97e: 6a3b ldr r3, [r7, #32] 800d980: 685a ldr r2, [r3, #4] 800d982: 4b43 ldr r3, [pc, #268] ; (800da90 ) 800d984: 691b ldr r3, [r3, #16] (ip_addr_isany_val(pcb->remote_ip) || 800d986: 429a cmp r2, r3 800d988: d10e bne.n 800d9a8 /* the first fully matching PCB */ if (prev != NULL) { 800d98a: 6a7b ldr r3, [r7, #36] ; 0x24 800d98c: 2b00 cmp r3, #0 800d98e: d014 beq.n 800d9ba /* move the pcb to the front of udp_pcbs so that is found faster next time */ prev->next = pcb->next; 800d990: 6a3b ldr r3, [r7, #32] 800d992: 68da ldr r2, [r3, #12] 800d994: 6a7b ldr r3, [r7, #36] ; 0x24 800d996: 60da str r2, [r3, #12] pcb->next = udp_pcbs; 800d998: 4b3e ldr r3, [pc, #248] ; (800da94 ) 800d99a: 681a ldr r2, [r3, #0] 800d99c: 6a3b ldr r3, [r7, #32] 800d99e: 60da str r2, [r3, #12] udp_pcbs = pcb; 800d9a0: 4a3c ldr r2, [pc, #240] ; (800da94 ) 800d9a2: 6a3b ldr r3, [r7, #32] 800d9a4: 6013 str r3, [r2, #0] } else { UDP_STATS_INC(udp.cachehit); } break; 800d9a6: e008 b.n 800d9ba } } prev = pcb; 800d9a8: 6a3b ldr r3, [r7, #32] 800d9aa: 627b str r3, [r7, #36] ; 0x24 for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 800d9ac: 6a3b ldr r3, [r7, #32] 800d9ae: 68db ldr r3, [r3, #12] 800d9b0: 623b str r3, [r7, #32] 800d9b2: 6a3b ldr r3, [r7, #32] 800d9b4: 2b00 cmp r3, #0 800d9b6: d1a7 bne.n 800d908 800d9b8: e000 b.n 800d9bc break; 800d9ba: bf00 nop } /* no fully matching pcb found? then look for an unconnected pcb */ if (pcb == NULL) { 800d9bc: 6a3b ldr r3, [r7, #32] 800d9be: 2b00 cmp r3, #0 800d9c0: d101 bne.n 800d9c6 pcb = uncon_pcb; 800d9c2: 69bb ldr r3, [r7, #24] 800d9c4: 623b str r3, [r7, #32] } /* Check checksum if this is a match or if it was directed at us. */ if (pcb != NULL) { 800d9c6: 6a3b ldr r3, [r7, #32] 800d9c8: 2b00 cmp r3, #0 800d9ca: d002 beq.n 800d9d2 for_us = 1; 800d9cc: 2301 movs r3, #1 800d9ce: 77fb strb r3, [r7, #31] 800d9d0: e00a b.n 800d9e8 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()); 800d9d2: 683b ldr r3, [r7, #0] 800d9d4: 3304 adds r3, #4 800d9d6: 681a ldr r2, [r3, #0] 800d9d8: 4b2d ldr r3, [pc, #180] ; (800da90 ) 800d9da: 695b ldr r3, [r3, #20] 800d9dc: 429a cmp r2, r3 800d9de: bf0c ite eq 800d9e0: 2301 moveq r3, #1 800d9e2: 2300 movne r3, #0 800d9e4: b2db uxtb r3, r3 800d9e6: 77fb strb r3, [r7, #31] } #endif /* LWIP_IPV4 */ } if (for_us) { 800d9e8: 7ffb ldrb r3, [r7, #31] 800d9ea: 2b00 cmp r3, #0 800d9ec: d041 beq.n 800da72 } } } } #endif /* CHECKSUM_CHECK_UDP */ if (pbuf_remove_header(p, UDP_HLEN)) { 800d9ee: 2108 movs r1, #8 800d9f0: 6878 ldr r0, [r7, #4] 800d9f2: f7f9 fa69 bl 8006ec8 800d9f6: 4603 mov r3, r0 800d9f8: 2b00 cmp r3, #0 800d9fa: d00a beq.n 800da12 /* Can we cope with this failing? Just assert for now */ LWIP_ASSERT("pbuf_remove_header failed\n", 0); 800d9fc: 4b20 ldr r3, [pc, #128] ; (800da80 ) 800d9fe: f44f 72b8 mov.w r2, #368 ; 0x170 800da02: 4925 ldr r1, [pc, #148] ; (800da98 ) 800da04: 4820 ldr r0, [pc, #128] ; (800da88 ) 800da06: f003 f8df bl 8010bc8 UDP_STATS_INC(udp.drop); MIB2_STATS_INC(mib2.udpinerrors); pbuf_free(p); 800da0a: 6878 ldr r0, [r7, #4] 800da0c: f7f9 fae2 bl 8006fd4 goto end; 800da10: e032 b.n 800da78 } if (pcb != NULL) { 800da12: 6a3b ldr r3, [r7, #32] 800da14: 2b00 cmp r3, #0 800da16: d012 beq.n 800da3e } } } #endif /* SO_REUSE && SO_REUSE_RXTOALL */ /* callback */ if (pcb->recv != NULL) { 800da18: 6a3b ldr r3, [r7, #32] 800da1a: 699b ldr r3, [r3, #24] 800da1c: 2b00 cmp r3, #0 800da1e: d00a beq.n 800da36 /* now the recv function is responsible for freeing p */ pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src); 800da20: 6a3b ldr r3, [r7, #32] 800da22: 699c ldr r4, [r3, #24] 800da24: 6a3b ldr r3, [r7, #32] 800da26: 69d8 ldr r0, [r3, #28] 800da28: 8a3b ldrh r3, [r7, #16] 800da2a: 9300 str r3, [sp, #0] 800da2c: 4b1b ldr r3, [pc, #108] ; (800da9c ) 800da2e: 687a ldr r2, [r7, #4] 800da30: 6a39 ldr r1, [r7, #32] 800da32: 47a0 blx r4 } else { pbuf_free(p); } end: PERF_STOP("udp_input"); return; 800da34: e021 b.n 800da7a pbuf_free(p); 800da36: 6878 ldr r0, [r7, #4] 800da38: f7f9 facc bl 8006fd4 goto end; 800da3c: e01c b.n 800da78 if (!broadcast && !ip_addr_ismulticast(ip_current_dest_addr())) { 800da3e: 7cfb ldrb r3, [r7, #19] 800da40: 2b00 cmp r3, #0 800da42: d112 bne.n 800da6a 800da44: 4b12 ldr r3, [pc, #72] ; (800da90 ) 800da46: 695b ldr r3, [r3, #20] 800da48: f003 03f0 and.w r3, r3, #240 ; 0xf0 800da4c: 2be0 cmp r3, #224 ; 0xe0 800da4e: d00c beq.n 800da6a pbuf_header_force(p, (s16_t)(ip_current_header_tot_len() + UDP_HLEN)); 800da50: 4b0f ldr r3, [pc, #60] ; (800da90 ) 800da52: 899b ldrh r3, [r3, #12] 800da54: 3308 adds r3, #8 800da56: b29b uxth r3, r3 800da58: b21b sxth r3, r3 800da5a: 4619 mov r1, r3 800da5c: 6878 ldr r0, [r7, #4] 800da5e: f7f9 faa6 bl 8006fae icmp_port_unreach(ip_current_is_v6(), p); 800da62: 2103 movs r1, #3 800da64: 6878 ldr r0, [r7, #4] 800da66: f001 f93b bl 800ece0 pbuf_free(p); 800da6a: 6878 ldr r0, [r7, #4] 800da6c: f7f9 fab2 bl 8006fd4 return; 800da70: e003 b.n 800da7a pbuf_free(p); 800da72: 6878 ldr r0, [r7, #4] 800da74: f7f9 faae bl 8006fd4 return; 800da78: bf00 nop UDP_STATS_INC(udp.drop); MIB2_STATS_INC(mib2.udpinerrors); pbuf_free(p); PERF_STOP("udp_input"); #endif /* CHECKSUM_CHECK_UDP */ } 800da7a: 372c adds r7, #44 ; 0x2c 800da7c: 46bd mov sp, r7 800da7e: bd90 pop {r4, r7, pc} 800da80: 08013f78 .word 0x08013f78 800da84: 0801401c .word 0x0801401c 800da88: 08013fcc .word 0x08013fcc 800da8c: 08014034 .word 0x08014034 800da90: 24004c10 .word 0x24004c10 800da94: 24007bcc .word 0x24007bcc 800da98: 08014050 .word 0x08014050 800da9c: 24004c20 .word 0x24004c20 0800daa0 : * * @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) { 800daa0: b480 push {r7} 800daa2: b085 sub sp, #20 800daa4: af00 add r7, sp, #0 800daa6: 6078 str r0, [r7, #4] 800daa8: 6039 str r1, [r7, #0] struct udp_pcb *upcb; if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) { 800daaa: 687b ldr r3, [r7, #4] 800daac: 2b00 cmp r3, #0 800daae: d01e beq.n 800daee 800dab0: 687b ldr r3, [r7, #4] 800dab2: 681b ldr r3, [r3, #0] 800dab4: 2b00 cmp r3, #0 800dab6: d01a beq.n 800daee 800dab8: 683b ldr r3, [r7, #0] 800daba: 2b00 cmp r3, #0 800dabc: d017 beq.n 800daee 800dabe: 683b ldr r3, [r7, #0] 800dac0: 681b ldr r3, [r3, #0] 800dac2: 2b00 cmp r3, #0 800dac4: d013 beq.n 800daee for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) { 800dac6: 4b0d ldr r3, [pc, #52] ; (800dafc ) 800dac8: 681b ldr r3, [r3, #0] 800daca: 60fb str r3, [r7, #12] 800dacc: e00c b.n 800dae8 /* PCB bound to current local interface address? */ if (ip_addr_cmp(&upcb->local_ip, old_addr)) { 800dace: 68fb ldr r3, [r7, #12] 800dad0: 681a ldr r2, [r3, #0] 800dad2: 687b ldr r3, [r7, #4] 800dad4: 681b ldr r3, [r3, #0] 800dad6: 429a cmp r2, r3 800dad8: d103 bne.n 800dae2 /* 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); 800dada: 683b ldr r3, [r7, #0] 800dadc: 681a ldr r2, [r3, #0] 800dade: 68fb ldr r3, [r7, #12] 800dae0: 601a str r2, [r3, #0] for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) { 800dae2: 68fb ldr r3, [r7, #12] 800dae4: 68db ldr r3, [r3, #12] 800dae6: 60fb str r3, [r7, #12] 800dae8: 68fb ldr r3, [r7, #12] 800daea: 2b00 cmp r3, #0 800daec: d1ef bne.n 800dace } } } } 800daee: bf00 nop 800daf0: 3714 adds r7, #20 800daf2: 46bd mov sp, r7 800daf4: f85d 7b04 ldr.w r7, [sp], #4 800daf8: 4770 bx lr 800dafa: bf00 nop 800dafc: 24007bcc .word 0x24007bcc 0800db00 : #endif /* ARP_QUEUEING */ /** Clean up ARP table entries */ static void etharp_free_entry(int i) { 800db00: b580 push {r7, lr} 800db02: b082 sub sp, #8 800db04: af00 add r7, sp, #0 800db06: 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) { 800db08: 492b ldr r1, [pc, #172] ; (800dbb8 ) 800db0a: 687a ldr r2, [r7, #4] 800db0c: 4613 mov r3, r2 800db0e: 005b lsls r3, r3, #1 800db10: 4413 add r3, r2 800db12: 00db lsls r3, r3, #3 800db14: 440b add r3, r1 800db16: 681b ldr r3, [r3, #0] 800db18: 2b00 cmp r3, #0 800db1a: d013 beq.n 800db44 /* 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); 800db1c: 4926 ldr r1, [pc, #152] ; (800dbb8 ) 800db1e: 687a ldr r2, [r7, #4] 800db20: 4613 mov r3, r2 800db22: 005b lsls r3, r3, #1 800db24: 4413 add r3, r2 800db26: 00db lsls r3, r3, #3 800db28: 440b add r3, r1 800db2a: 681b ldr r3, [r3, #0] 800db2c: 4618 mov r0, r3 800db2e: f7f9 fa51 bl 8006fd4 arp_table[i].q = NULL; 800db32: 4921 ldr r1, [pc, #132] ; (800dbb8 ) 800db34: 687a ldr r2, [r7, #4] 800db36: 4613 mov r3, r2 800db38: 005b lsls r3, r3, #1 800db3a: 4413 add r3, r2 800db3c: 00db lsls r3, r3, #3 800db3e: 440b add r3, r1 800db40: 2200 movs r2, #0 800db42: 601a str r2, [r3, #0] } /* recycle entry for re-use */ arp_table[i].state = ETHARP_STATE_EMPTY; 800db44: 491c ldr r1, [pc, #112] ; (800dbb8 ) 800db46: 687a ldr r2, [r7, #4] 800db48: 4613 mov r3, r2 800db4a: 005b lsls r3, r3, #1 800db4c: 4413 add r3, r2 800db4e: 00db lsls r3, r3, #3 800db50: 440b add r3, r1 800db52: 3314 adds r3, #20 800db54: 2200 movs r2, #0 800db56: 701a strb r2, [r3, #0] #ifdef LWIP_DEBUG /* for debugging, clean out the complete entry */ arp_table[i].ctime = 0; 800db58: 4917 ldr r1, [pc, #92] ; (800dbb8 ) 800db5a: 687a ldr r2, [r7, #4] 800db5c: 4613 mov r3, r2 800db5e: 005b lsls r3, r3, #1 800db60: 4413 add r3, r2 800db62: 00db lsls r3, r3, #3 800db64: 440b add r3, r1 800db66: 3312 adds r3, #18 800db68: 2200 movs r2, #0 800db6a: 801a strh r2, [r3, #0] arp_table[i].netif = NULL; 800db6c: 4912 ldr r1, [pc, #72] ; (800dbb8 ) 800db6e: 687a ldr r2, [r7, #4] 800db70: 4613 mov r3, r2 800db72: 005b lsls r3, r3, #1 800db74: 4413 add r3, r2 800db76: 00db lsls r3, r3, #3 800db78: 440b add r3, r1 800db7a: 3308 adds r3, #8 800db7c: 2200 movs r2, #0 800db7e: 601a str r2, [r3, #0] ip4_addr_set_zero(&arp_table[i].ipaddr); 800db80: 490d ldr r1, [pc, #52] ; (800dbb8 ) 800db82: 687a ldr r2, [r7, #4] 800db84: 4613 mov r3, r2 800db86: 005b lsls r3, r3, #1 800db88: 4413 add r3, r2 800db8a: 00db lsls r3, r3, #3 800db8c: 440b add r3, r1 800db8e: 3304 adds r3, #4 800db90: 2200 movs r2, #0 800db92: 601a str r2, [r3, #0] arp_table[i].ethaddr = ethzero; 800db94: 4908 ldr r1, [pc, #32] ; (800dbb8 ) 800db96: 687a ldr r2, [r7, #4] 800db98: 4613 mov r3, r2 800db9a: 005b lsls r3, r3, #1 800db9c: 4413 add r3, r2 800db9e: 00db lsls r3, r3, #3 800dba0: 440b add r3, r1 800dba2: 3308 adds r3, #8 800dba4: 4a05 ldr r2, [pc, #20] ; (800dbbc ) 800dba6: 3304 adds r3, #4 800dba8: 6810 ldr r0, [r2, #0] 800dbaa: 6018 str r0, [r3, #0] 800dbac: 8892 ldrh r2, [r2, #4] 800dbae: 809a strh r2, [r3, #4] #endif /* LWIP_DEBUG */ } 800dbb0: bf00 nop 800dbb2: 3708 adds r7, #8 800dbb4: 46bd mov sp, r7 800dbb6: bd80 pop {r7, pc} 800dbb8: 24007bd0 .word 0x24007bd0 800dbbc: 08014da0 .word 0x08014da0 0800dbc0 : * 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) { 800dbc0: b580 push {r7, lr} 800dbc2: b082 sub sp, #8 800dbc4: 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) { 800dbc6: 2300 movs r3, #0 800dbc8: 607b str r3, [r7, #4] 800dbca: e096 b.n 800dcfa u8_t state = arp_table[i].state; 800dbcc: 494f ldr r1, [pc, #316] ; (800dd0c ) 800dbce: 687a ldr r2, [r7, #4] 800dbd0: 4613 mov r3, r2 800dbd2: 005b lsls r3, r3, #1 800dbd4: 4413 add r3, r2 800dbd6: 00db lsls r3, r3, #3 800dbd8: 440b add r3, r1 800dbda: 3314 adds r3, #20 800dbdc: 781b ldrb r3, [r3, #0] 800dbde: 70fb strb r3, [r7, #3] if (state != ETHARP_STATE_EMPTY 800dbe0: 78fb ldrb r3, [r7, #3] 800dbe2: 2b00 cmp r3, #0 800dbe4: f000 8086 beq.w 800dcf4 #if ETHARP_SUPPORT_STATIC_ENTRIES && (state != ETHARP_STATE_STATIC) #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ ) { arp_table[i].ctime++; 800dbe8: 4948 ldr r1, [pc, #288] ; (800dd0c ) 800dbea: 687a ldr r2, [r7, #4] 800dbec: 4613 mov r3, r2 800dbee: 005b lsls r3, r3, #1 800dbf0: 4413 add r3, r2 800dbf2: 00db lsls r3, r3, #3 800dbf4: 440b add r3, r1 800dbf6: 3312 adds r3, #18 800dbf8: 881b ldrh r3, [r3, #0] 800dbfa: 3301 adds r3, #1 800dbfc: b298 uxth r0, r3 800dbfe: 4943 ldr r1, [pc, #268] ; (800dd0c ) 800dc00: 687a ldr r2, [r7, #4] 800dc02: 4613 mov r3, r2 800dc04: 005b lsls r3, r3, #1 800dc06: 4413 add r3, r2 800dc08: 00db lsls r3, r3, #3 800dc0a: 440b add r3, r1 800dc0c: 3312 adds r3, #18 800dc0e: 4602 mov r2, r0 800dc10: 801a strh r2, [r3, #0] if ((arp_table[i].ctime >= ARP_MAXAGE) || 800dc12: 493e ldr r1, [pc, #248] ; (800dd0c ) 800dc14: 687a ldr r2, [r7, #4] 800dc16: 4613 mov r3, r2 800dc18: 005b lsls r3, r3, #1 800dc1a: 4413 add r3, r2 800dc1c: 00db lsls r3, r3, #3 800dc1e: 440b add r3, r1 800dc20: 3312 adds r3, #18 800dc22: 881b ldrh r3, [r3, #0] 800dc24: f5b3 7f96 cmp.w r3, #300 ; 0x12c 800dc28: d215 bcs.n 800dc56 ((arp_table[i].state == ETHARP_STATE_PENDING) && 800dc2a: 4938 ldr r1, [pc, #224] ; (800dd0c ) 800dc2c: 687a ldr r2, [r7, #4] 800dc2e: 4613 mov r3, r2 800dc30: 005b lsls r3, r3, #1 800dc32: 4413 add r3, r2 800dc34: 00db lsls r3, r3, #3 800dc36: 440b add r3, r1 800dc38: 3314 adds r3, #20 800dc3a: 781b ldrb r3, [r3, #0] if ((arp_table[i].ctime >= ARP_MAXAGE) || 800dc3c: 2b01 cmp r3, #1 800dc3e: d10e bne.n 800dc5e (arp_table[i].ctime >= ARP_MAXPENDING))) { 800dc40: 4932 ldr r1, [pc, #200] ; (800dd0c ) 800dc42: 687a ldr r2, [r7, #4] 800dc44: 4613 mov r3, r2 800dc46: 005b lsls r3, r3, #1 800dc48: 4413 add r3, r2 800dc4a: 00db lsls r3, r3, #3 800dc4c: 440b add r3, r1 800dc4e: 3312 adds r3, #18 800dc50: 881b ldrh r3, [r3, #0] ((arp_table[i].state == ETHARP_STATE_PENDING) && 800dc52: 2b04 cmp r3, #4 800dc54: d903 bls.n 800dc5e /* 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); 800dc56: 6878 ldr r0, [r7, #4] 800dc58: f7ff ff52 bl 800db00 800dc5c: e04a b.n 800dcf4 } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_1) { 800dc5e: 492b ldr r1, [pc, #172] ; (800dd0c ) 800dc60: 687a ldr r2, [r7, #4] 800dc62: 4613 mov r3, r2 800dc64: 005b lsls r3, r3, #1 800dc66: 4413 add r3, r2 800dc68: 00db lsls r3, r3, #3 800dc6a: 440b add r3, r1 800dc6c: 3314 adds r3, #20 800dc6e: 781b ldrb r3, [r3, #0] 800dc70: 2b03 cmp r3, #3 800dc72: d10a bne.n 800dc8a /* Don't send more than one request every 2 seconds. */ arp_table[i].state = ETHARP_STATE_STABLE_REREQUESTING_2; 800dc74: 4925 ldr r1, [pc, #148] ; (800dd0c ) 800dc76: 687a ldr r2, [r7, #4] 800dc78: 4613 mov r3, r2 800dc7a: 005b lsls r3, r3, #1 800dc7c: 4413 add r3, r2 800dc7e: 00db lsls r3, r3, #3 800dc80: 440b add r3, r1 800dc82: 3314 adds r3, #20 800dc84: 2204 movs r2, #4 800dc86: 701a strb r2, [r3, #0] 800dc88: e034 b.n 800dcf4 } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_2) { 800dc8a: 4920 ldr r1, [pc, #128] ; (800dd0c ) 800dc8c: 687a ldr r2, [r7, #4] 800dc8e: 4613 mov r3, r2 800dc90: 005b lsls r3, r3, #1 800dc92: 4413 add r3, r2 800dc94: 00db lsls r3, r3, #3 800dc96: 440b add r3, r1 800dc98: 3314 adds r3, #20 800dc9a: 781b ldrb r3, [r3, #0] 800dc9c: 2b04 cmp r3, #4 800dc9e: d10a bne.n 800dcb6 /* Reset state to stable, so that the next transmitted packet will re-send an ARP request. */ arp_table[i].state = ETHARP_STATE_STABLE; 800dca0: 491a ldr r1, [pc, #104] ; (800dd0c ) 800dca2: 687a ldr r2, [r7, #4] 800dca4: 4613 mov r3, r2 800dca6: 005b lsls r3, r3, #1 800dca8: 4413 add r3, r2 800dcaa: 00db lsls r3, r3, #3 800dcac: 440b add r3, r1 800dcae: 3314 adds r3, #20 800dcb0: 2202 movs r2, #2 800dcb2: 701a strb r2, [r3, #0] 800dcb4: e01e b.n 800dcf4 } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 800dcb6: 4915 ldr r1, [pc, #84] ; (800dd0c ) 800dcb8: 687a ldr r2, [r7, #4] 800dcba: 4613 mov r3, r2 800dcbc: 005b lsls r3, r3, #1 800dcbe: 4413 add r3, r2 800dcc0: 00db lsls r3, r3, #3 800dcc2: 440b add r3, r1 800dcc4: 3314 adds r3, #20 800dcc6: 781b ldrb r3, [r3, #0] 800dcc8: 2b01 cmp r3, #1 800dcca: d113 bne.n 800dcf4 /* still pending, resend an ARP query */ etharp_request(arp_table[i].netif, &arp_table[i].ipaddr); 800dccc: 490f ldr r1, [pc, #60] ; (800dd0c ) 800dcce: 687a ldr r2, [r7, #4] 800dcd0: 4613 mov r3, r2 800dcd2: 005b lsls r3, r3, #1 800dcd4: 4413 add r3, r2 800dcd6: 00db lsls r3, r3, #3 800dcd8: 440b add r3, r1 800dcda: 3308 adds r3, #8 800dcdc: 6818 ldr r0, [r3, #0] 800dcde: 687a ldr r2, [r7, #4] 800dce0: 4613 mov r3, r2 800dce2: 005b lsls r3, r3, #1 800dce4: 4413 add r3, r2 800dce6: 00db lsls r3, r3, #3 800dce8: 4a08 ldr r2, [pc, #32] ; (800dd0c ) 800dcea: 4413 add r3, r2 800dcec: 3304 adds r3, #4 800dcee: 4619 mov r1, r3 800dcf0: f000 fe6e bl 800e9d0 for (i = 0; i < ARP_TABLE_SIZE; ++i) { 800dcf4: 687b ldr r3, [r7, #4] 800dcf6: 3301 adds r3, #1 800dcf8: 607b str r3, [r7, #4] 800dcfa: 687b ldr r3, [r7, #4] 800dcfc: 2b09 cmp r3, #9 800dcfe: f77f af65 ble.w 800dbcc } } } } 800dd02: bf00 nop 800dd04: bf00 nop 800dd06: 3708 adds r7, #8 800dd08: 46bd mov sp, r7 800dd0a: bd80 pop {r7, pc} 800dd0c: 24007bd0 .word 0x24007bd0 0800dd10 : * @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) { 800dd10: b580 push {r7, lr} 800dd12: b08a sub sp, #40 ; 0x28 800dd14: af00 add r7, sp, #0 800dd16: 60f8 str r0, [r7, #12] 800dd18: 460b mov r3, r1 800dd1a: 607a str r2, [r7, #4] 800dd1c: 72fb strb r3, [r7, #11] s16_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; 800dd1e: 230a movs r3, #10 800dd20: 843b strh r3, [r7, #32] 800dd22: 230a movs r3, #10 800dd24: 847b strh r3, [r7, #34] ; 0x22 s16_t empty = ARP_TABLE_SIZE; 800dd26: 230a movs r3, #10 800dd28: 84bb strh r3, [r7, #36] ; 0x24 s16_t i = 0; 800dd2a: 2300 movs r3, #0 800dd2c: 84fb strh r3, [r7, #38] ; 0x26 /* oldest entry with packets on queue */ s16_t old_queue = ARP_TABLE_SIZE; 800dd2e: 230a movs r3, #10 800dd30: 83fb strh r3, [r7, #30] /* its age */ u16_t age_queue = 0, age_pending = 0, age_stable = 0; 800dd32: 2300 movs r3, #0 800dd34: 83bb strh r3, [r7, #28] 800dd36: 2300 movs r3, #0 800dd38: 837b strh r3, [r7, #26] 800dd3a: 2300 movs r3, #0 800dd3c: 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) { 800dd3e: 2300 movs r3, #0 800dd40: 84fb strh r3, [r7, #38] ; 0x26 800dd42: e0ae b.n 800dea2 u8_t state = arp_table[i].state; 800dd44: f9b7 2026 ldrsh.w r2, [r7, #38] ; 0x26 800dd48: 49a6 ldr r1, [pc, #664] ; (800dfe4 ) 800dd4a: 4613 mov r3, r2 800dd4c: 005b lsls r3, r3, #1 800dd4e: 4413 add r3, r2 800dd50: 00db lsls r3, r3, #3 800dd52: 440b add r3, r1 800dd54: 3314 adds r3, #20 800dd56: 781b ldrb r3, [r3, #0] 800dd58: 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)) { 800dd5a: f9b7 3024 ldrsh.w r3, [r7, #36] ; 0x24 800dd5e: 2b0a cmp r3, #10 800dd60: d105 bne.n 800dd6e 800dd62: 7dfb ldrb r3, [r7, #23] 800dd64: 2b00 cmp r3, #0 800dd66: d102 bne.n 800dd6e LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %d\n", (int)i)); /* remember first empty entry */ empty = i; 800dd68: 8cfb ldrh r3, [r7, #38] ; 0x26 800dd6a: 84bb strh r3, [r7, #36] ; 0x24 800dd6c: e095 b.n 800de9a } else if (state != ETHARP_STATE_EMPTY) { 800dd6e: 7dfb ldrb r3, [r7, #23] 800dd70: 2b00 cmp r3, #0 800dd72: f000 8092 beq.w 800de9a LWIP_ASSERT("state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE", 800dd76: 7dfb ldrb r3, [r7, #23] 800dd78: 2b01 cmp r3, #1 800dd7a: d009 beq.n 800dd90 800dd7c: 7dfb ldrb r3, [r7, #23] 800dd7e: 2b01 cmp r3, #1 800dd80: d806 bhi.n 800dd90 800dd82: 4b99 ldr r3, [pc, #612] ; (800dfe8 ) 800dd84: f240 1223 movw r2, #291 ; 0x123 800dd88: 4998 ldr r1, [pc, #608] ; (800dfec ) 800dd8a: 4899 ldr r0, [pc, #612] ; (800dff0 ) 800dd8c: f002 ff1c bl 8010bc8 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) 800dd90: 68fb ldr r3, [r7, #12] 800dd92: 2b00 cmp r3, #0 800dd94: d020 beq.n 800ddd8 800dd96: 68fb ldr r3, [r7, #12] 800dd98: 6819 ldr r1, [r3, #0] 800dd9a: f9b7 2026 ldrsh.w r2, [r7, #38] ; 0x26 800dd9e: 4891 ldr r0, [pc, #580] ; (800dfe4 ) 800dda0: 4613 mov r3, r2 800dda2: 005b lsls r3, r3, #1 800dda4: 4413 add r3, r2 800dda6: 00db lsls r3, r3, #3 800dda8: 4403 add r3, r0 800ddaa: 3304 adds r3, #4 800ddac: 681b ldr r3, [r3, #0] 800ddae: 4299 cmp r1, r3 800ddb0: d112 bne.n 800ddd8 #if ETHARP_TABLE_MATCH_NETIF && ((netif == NULL) || (netif == arp_table[i].netif)) 800ddb2: 687b ldr r3, [r7, #4] 800ddb4: 2b00 cmp r3, #0 800ddb6: d00c beq.n 800ddd2 800ddb8: f9b7 2026 ldrsh.w r2, [r7, #38] ; 0x26 800ddbc: 4989 ldr r1, [pc, #548] ; (800dfe4 ) 800ddbe: 4613 mov r3, r2 800ddc0: 005b lsls r3, r3, #1 800ddc2: 4413 add r3, r2 800ddc4: 00db lsls r3, r3, #3 800ddc6: 440b add r3, r1 800ddc8: 3308 adds r3, #8 800ddca: 681b ldr r3, [r3, #0] 800ddcc: 687a ldr r2, [r7, #4] 800ddce: 429a cmp r2, r3 800ddd0: d102 bne.n 800ddd8 #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; 800ddd2: f9b7 3026 ldrsh.w r3, [r7, #38] ; 0x26 800ddd6: e100 b.n 800dfda } /* pending entry? */ if (state == ETHARP_STATE_PENDING) { 800ddd8: 7dfb ldrb r3, [r7, #23] 800ddda: 2b01 cmp r3, #1 800dddc: d140 bne.n 800de60 /* pending with queued packets? */ if (arp_table[i].q != NULL) { 800ddde: f9b7 2026 ldrsh.w r2, [r7, #38] ; 0x26 800dde2: 4980 ldr r1, [pc, #512] ; (800dfe4 ) 800dde4: 4613 mov r3, r2 800dde6: 005b lsls r3, r3, #1 800dde8: 4413 add r3, r2 800ddea: 00db lsls r3, r3, #3 800ddec: 440b add r3, r1 800ddee: 681b ldr r3, [r3, #0] 800ddf0: 2b00 cmp r3, #0 800ddf2: d01a beq.n 800de2a if (arp_table[i].ctime >= age_queue) { 800ddf4: f9b7 2026 ldrsh.w r2, [r7, #38] ; 0x26 800ddf8: 497a ldr r1, [pc, #488] ; (800dfe4 ) 800ddfa: 4613 mov r3, r2 800ddfc: 005b lsls r3, r3, #1 800ddfe: 4413 add r3, r2 800de00: 00db lsls r3, r3, #3 800de02: 440b add r3, r1 800de04: 3312 adds r3, #18 800de06: 881b ldrh r3, [r3, #0] 800de08: 8bba ldrh r2, [r7, #28] 800de0a: 429a cmp r2, r3 800de0c: d845 bhi.n 800de9a old_queue = i; 800de0e: 8cfb ldrh r3, [r7, #38] ; 0x26 800de10: 83fb strh r3, [r7, #30] age_queue = arp_table[i].ctime; 800de12: f9b7 2026 ldrsh.w r2, [r7, #38] ; 0x26 800de16: 4973 ldr r1, [pc, #460] ; (800dfe4 ) 800de18: 4613 mov r3, r2 800de1a: 005b lsls r3, r3, #1 800de1c: 4413 add r3, r2 800de1e: 00db lsls r3, r3, #3 800de20: 440b add r3, r1 800de22: 3312 adds r3, #18 800de24: 881b ldrh r3, [r3, #0] 800de26: 83bb strh r3, [r7, #28] 800de28: e037 b.n 800de9a } } else /* pending without queued packets? */ { if (arp_table[i].ctime >= age_pending) { 800de2a: f9b7 2026 ldrsh.w r2, [r7, #38] ; 0x26 800de2e: 496d ldr r1, [pc, #436] ; (800dfe4 ) 800de30: 4613 mov r3, r2 800de32: 005b lsls r3, r3, #1 800de34: 4413 add r3, r2 800de36: 00db lsls r3, r3, #3 800de38: 440b add r3, r1 800de3a: 3312 adds r3, #18 800de3c: 881b ldrh r3, [r3, #0] 800de3e: 8b7a ldrh r2, [r7, #26] 800de40: 429a cmp r2, r3 800de42: d82a bhi.n 800de9a old_pending = i; 800de44: 8cfb ldrh r3, [r7, #38] ; 0x26 800de46: 843b strh r3, [r7, #32] age_pending = arp_table[i].ctime; 800de48: f9b7 2026 ldrsh.w r2, [r7, #38] ; 0x26 800de4c: 4965 ldr r1, [pc, #404] ; (800dfe4 ) 800de4e: 4613 mov r3, r2 800de50: 005b lsls r3, r3, #1 800de52: 4413 add r3, r2 800de54: 00db lsls r3, r3, #3 800de56: 440b add r3, r1 800de58: 3312 adds r3, #18 800de5a: 881b ldrh r3, [r3, #0] 800de5c: 837b strh r3, [r7, #26] 800de5e: e01c b.n 800de9a } } /* stable entry? */ } else if (state >= ETHARP_STATE_STABLE) { 800de60: 7dfb ldrb r3, [r7, #23] 800de62: 2b01 cmp r3, #1 800de64: d919 bls.n 800de9a /* 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) { 800de66: f9b7 2026 ldrsh.w r2, [r7, #38] ; 0x26 800de6a: 495e ldr r1, [pc, #376] ; (800dfe4 ) 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: 3312 adds r3, #18 800de78: 881b ldrh r3, [r3, #0] 800de7a: 8b3a ldrh r2, [r7, #24] 800de7c: 429a cmp r2, r3 800de7e: d80c bhi.n 800de9a old_stable = i; 800de80: 8cfb ldrh r3, [r7, #38] ; 0x26 800de82: 847b strh r3, [r7, #34] ; 0x22 age_stable = arp_table[i].ctime; 800de84: f9b7 2026 ldrsh.w r2, [r7, #38] ; 0x26 800de88: 4956 ldr r1, [pc, #344] ; (800dfe4 ) 800de8a: 4613 mov r3, r2 800de8c: 005b lsls r3, r3, #1 800de8e: 4413 add r3, r2 800de90: 00db lsls r3, r3, #3 800de92: 440b add r3, r1 800de94: 3312 adds r3, #18 800de96: 881b ldrh r3, [r3, #0] 800de98: 833b strh r3, [r7, #24] for (i = 0; i < ARP_TABLE_SIZE; ++i) { 800de9a: 8cfb ldrh r3, [r7, #38] ; 0x26 800de9c: 3301 adds r3, #1 800de9e: b29b uxth r3, r3 800dea0: 84fb strh r3, [r7, #38] ; 0x26 800dea2: f9b7 3026 ldrsh.w r3, [r7, #38] ; 0x26 800dea6: 2b09 cmp r3, #9 800dea8: f77f af4c ble.w 800dd44 } } /* { we have no match } => try to create a new entry */ /* don't create new entry, only search? */ if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) || 800deac: 7afb ldrb r3, [r7, #11] 800deae: f003 0302 and.w r3, r3, #2 800deb2: 2b00 cmp r3, #0 800deb4: d108 bne.n 800dec8 800deb6: f9b7 3024 ldrsh.w r3, [r7, #36] ; 0x24 800deba: 2b0a cmp r3, #10 800debc: d107 bne.n 800dece /* or no empty entry found and not allowed to recycle? */ ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { 800debe: 7afb ldrb r3, [r7, #11] 800dec0: f003 0301 and.w r3, r3, #1 800dec4: 2b00 cmp r3, #0 800dec6: d102 bne.n 800dece 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; 800dec8: f04f 33ff mov.w r3, #4294967295 800decc: e085 b.n 800dfda * * { ETHARP_FLAG_TRY_HARD is set at this point } */ /* 1) empty entry available? */ if (empty < ARP_TABLE_SIZE) { 800dece: f9b7 3024 ldrsh.w r3, [r7, #36] ; 0x24 800ded2: 2b09 cmp r3, #9 800ded4: dc02 bgt.n 800dedc i = empty; 800ded6: 8cbb ldrh r3, [r7, #36] ; 0x24 800ded8: 84fb strh r3, [r7, #38] ; 0x26 800deda: e039 b.n 800df50 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) { 800dedc: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22 800dee0: 2b09 cmp r3, #9 800dee2: dc14 bgt.n 800df0e /* recycle oldest stable*/ i = old_stable; 800dee4: 8c7b ldrh r3, [r7, #34] ; 0x22 800dee6: 84fb strh r3, [r7, #38] ; 0x26 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); 800dee8: f9b7 2026 ldrsh.w r2, [r7, #38] ; 0x26 800deec: 493d ldr r1, [pc, #244] ; (800dfe4 ) 800deee: 4613 mov r3, r2 800def0: 005b lsls r3, r3, #1 800def2: 4413 add r3, r2 800def4: 00db lsls r3, r3, #3 800def6: 440b add r3, r1 800def8: 681b ldr r3, [r3, #0] 800defa: 2b00 cmp r3, #0 800defc: d018 beq.n 800df30 800defe: 4b3a ldr r3, [pc, #232] ; (800dfe8 ) 800df00: f240 126d movw r2, #365 ; 0x16d 800df04: 493b ldr r1, [pc, #236] ; (800dff4 ) 800df06: 483a ldr r0, [pc, #232] ; (800dff0 ) 800df08: f002 fe5e bl 8010bc8 800df0c: e010 b.n 800df30 /* 3) found recyclable pending entry without queued packets? */ } else if (old_pending < ARP_TABLE_SIZE) { 800df0e: f9b7 3020 ldrsh.w r3, [r7, #32] 800df12: 2b09 cmp r3, #9 800df14: dc02 bgt.n 800df1c /* recycle oldest pending */ i = old_pending; 800df16: 8c3b ldrh r3, [r7, #32] 800df18: 84fb strh r3, [r7, #38] ; 0x26 800df1a: e009 b.n 800df30 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) { 800df1c: f9b7 301e ldrsh.w r3, [r7, #30] 800df20: 2b09 cmp r3, #9 800df22: dc02 bgt.n 800df2a /* recycle oldest pending (queued packets are free in etharp_free_entry) */ i = old_queue; 800df24: 8bfb ldrh r3, [r7, #30] 800df26: 84fb strh r3, [r7, #38] ; 0x26 800df28: e002 b.n 800df30 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; 800df2a: f04f 33ff mov.w r3, #4294967295 800df2e: e054 b.n 800dfda } /* { empty or recyclable entry found } */ LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); 800df30: f9b7 3026 ldrsh.w r3, [r7, #38] ; 0x26 800df34: 2b09 cmp r3, #9 800df36: dd06 ble.n 800df46 800df38: 4b2b ldr r3, [pc, #172] ; (800dfe8 ) 800df3a: f240 127f movw r2, #383 ; 0x17f 800df3e: 492e ldr r1, [pc, #184] ; (800dff8 ) 800df40: 482b ldr r0, [pc, #172] ; (800dff0 ) 800df42: f002 fe41 bl 8010bc8 etharp_free_entry(i); 800df46: f9b7 3026 ldrsh.w r3, [r7, #38] ; 0x26 800df4a: 4618 mov r0, r3 800df4c: f7ff fdd8 bl 800db00 } LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); 800df50: f9b7 3026 ldrsh.w r3, [r7, #38] ; 0x26 800df54: 2b09 cmp r3, #9 800df56: dd06 ble.n 800df66 800df58: 4b23 ldr r3, [pc, #140] ; (800dfe8 ) 800df5a: f240 1283 movw r2, #387 ; 0x183 800df5e: 4926 ldr r1, [pc, #152] ; (800dff8 ) 800df60: 4823 ldr r0, [pc, #140] ; (800dff0 ) 800df62: f002 fe31 bl 8010bc8 LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY", 800df66: f9b7 2026 ldrsh.w r2, [r7, #38] ; 0x26 800df6a: 491e ldr r1, [pc, #120] ; (800dfe4 ) 800df6c: 4613 mov r3, r2 800df6e: 005b lsls r3, r3, #1 800df70: 4413 add r3, r2 800df72: 00db lsls r3, r3, #3 800df74: 440b add r3, r1 800df76: 3314 adds r3, #20 800df78: 781b ldrb r3, [r3, #0] 800df7a: 2b00 cmp r3, #0 800df7c: d006 beq.n 800df8c 800df7e: 4b1a ldr r3, [pc, #104] ; (800dfe8 ) 800df80: f44f 72c2 mov.w r2, #388 ; 0x184 800df84: 491d ldr r1, [pc, #116] ; (800dffc ) 800df86: 481a ldr r0, [pc, #104] ; (800dff0 ) 800df88: f002 fe1e bl 8010bc8 arp_table[i].state == ETHARP_STATE_EMPTY); /* IP address given? */ if (ipaddr != NULL) { 800df8c: 68fb ldr r3, [r7, #12] 800df8e: 2b00 cmp r3, #0 800df90: d00b beq.n 800dfaa /* set IP address */ ip4_addr_copy(arp_table[i].ipaddr, *ipaddr); 800df92: f9b7 2026 ldrsh.w r2, [r7, #38] ; 0x26 800df96: 68fb ldr r3, [r7, #12] 800df98: 6819 ldr r1, [r3, #0] 800df9a: 4812 ldr r0, [pc, #72] ; (800dfe4 ) 800df9c: 4613 mov r3, r2 800df9e: 005b lsls r3, r3, #1 800dfa0: 4413 add r3, r2 800dfa2: 00db lsls r3, r3, #3 800dfa4: 4403 add r3, r0 800dfa6: 3304 adds r3, #4 800dfa8: 6019 str r1, [r3, #0] } arp_table[i].ctime = 0; 800dfaa: f9b7 2026 ldrsh.w r2, [r7, #38] ; 0x26 800dfae: 490d ldr r1, [pc, #52] ; (800dfe4 ) 800dfb0: 4613 mov r3, r2 800dfb2: 005b lsls r3, r3, #1 800dfb4: 4413 add r3, r2 800dfb6: 00db lsls r3, r3, #3 800dfb8: 440b add r3, r1 800dfba: 3312 adds r3, #18 800dfbc: 2200 movs r2, #0 800dfbe: 801a strh r2, [r3, #0] #if ETHARP_TABLE_MATCH_NETIF arp_table[i].netif = netif; 800dfc0: f9b7 2026 ldrsh.w r2, [r7, #38] ; 0x26 800dfc4: 4907 ldr r1, [pc, #28] ; (800dfe4 ) 800dfc6: 4613 mov r3, r2 800dfc8: 005b lsls r3, r3, #1 800dfca: 4413 add r3, r2 800dfcc: 00db lsls r3, r3, #3 800dfce: 440b add r3, r1 800dfd0: 3308 adds r3, #8 800dfd2: 687a ldr r2, [r7, #4] 800dfd4: 601a str r2, [r3, #0] #endif /* ETHARP_TABLE_MATCH_NETIF */ return (s16_t)i; 800dfd6: f9b7 3026 ldrsh.w r3, [r7, #38] ; 0x26 } 800dfda: 4618 mov r0, r3 800dfdc: 3728 adds r7, #40 ; 0x28 800dfde: 46bd mov sp, r7 800dfe0: bd80 pop {r7, pc} 800dfe2: bf00 nop 800dfe4: 24007bd0 .word 0x24007bd0 800dfe8: 080142dc .word 0x080142dc 800dfec: 08014314 .word 0x08014314 800dff0: 08014354 .word 0x08014354 800dff4: 0801437c .word 0x0801437c 800dff8: 08014394 .word 0x08014394 800dffc: 080143a8 .word 0x080143a8 0800e000 : * * @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) { 800e000: b580 push {r7, lr} 800e002: b088 sub sp, #32 800e004: af02 add r7, sp, #8 800e006: 60f8 str r0, [r7, #12] 800e008: 60b9 str r1, [r7, #8] 800e00a: 607a str r2, [r7, #4] 800e00c: 70fb strb r3, [r7, #3] s16_t i; LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN); 800e00e: 68fb ldr r3, [r7, #12] 800e010: f893 302c ldrb.w r3, [r3, #44] ; 0x2c 800e014: 2b06 cmp r3, #6 800e016: d006 beq.n 800e026 800e018: 4b48 ldr r3, [pc, #288] ; (800e13c ) 800e01a: f240 12a9 movw r2, #425 ; 0x1a9 800e01e: 4948 ldr r1, [pc, #288] ; (800e140 ) 800e020: 4848 ldr r0, [pc, #288] ; (800e144 ) 800e022: f002 fdd1 bl 8010bc8 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) || 800e026: 68bb ldr r3, [r7, #8] 800e028: 2b00 cmp r3, #0 800e02a: d012 beq.n 800e052 800e02c: 68bb ldr r3, [r7, #8] 800e02e: 681b ldr r3, [r3, #0] 800e030: 2b00 cmp r3, #0 800e032: d00e beq.n 800e052 ip4_addr_isbroadcast(ipaddr, netif) || 800e034: 68bb ldr r3, [r7, #8] 800e036: 681b ldr r3, [r3, #0] 800e038: 68f9 ldr r1, [r7, #12] 800e03a: 4618 mov r0, r3 800e03c: f001 f9ba bl 800f3b4 800e040: 4603 mov r3, r0 if (ip4_addr_isany(ipaddr) || 800e042: 2b00 cmp r3, #0 800e044: d105 bne.n 800e052 ip4_addr_ismulticast(ipaddr)) { 800e046: 68bb ldr r3, [r7, #8] 800e048: 681b ldr r3, [r3, #0] 800e04a: f003 03f0 and.w r3, r3, #240 ; 0xf0 ip4_addr_isbroadcast(ipaddr, netif) || 800e04e: 2be0 cmp r3, #224 ; 0xe0 800e050: d102 bne.n 800e058 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; 800e052: f06f 030f mvn.w r3, #15 800e056: e06c b.n 800e132 } /* find or create ARP entry */ i = etharp_find_entry(ipaddr, flags, netif); 800e058: 78fb ldrb r3, [r7, #3] 800e05a: 68fa ldr r2, [r7, #12] 800e05c: 4619 mov r1, r3 800e05e: 68b8 ldr r0, [r7, #8] 800e060: f7ff fe56 bl 800dd10 800e064: 4603 mov r3, r0 800e066: 82fb strh r3, [r7, #22] /* bail out if no entry could be found */ if (i < 0) { 800e068: f9b7 3016 ldrsh.w r3, [r7, #22] 800e06c: 2b00 cmp r3, #0 800e06e: da02 bge.n 800e076 return (err_t)i; 800e070: 8afb ldrh r3, [r7, #22] 800e072: b25b sxtb r3, r3 800e074: e05d b.n 800e132 return ERR_VAL; } else #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ { /* mark it stable */ arp_table[i].state = ETHARP_STATE_STABLE; 800e076: f9b7 2016 ldrsh.w r2, [r7, #22] 800e07a: 4933 ldr r1, [pc, #204] ; (800e148 ) 800e07c: 4613 mov r3, r2 800e07e: 005b lsls r3, r3, #1 800e080: 4413 add r3, r2 800e082: 00db lsls r3, r3, #3 800e084: 440b add r3, r1 800e086: 3314 adds r3, #20 800e088: 2202 movs r2, #2 800e08a: 701a strb r2, [r3, #0] } /* record network interface */ arp_table[i].netif = netif; 800e08c: f9b7 2016 ldrsh.w r2, [r7, #22] 800e090: 492d ldr r1, [pc, #180] ; (800e148 ) 800e092: 4613 mov r3, r2 800e094: 005b lsls r3, r3, #1 800e096: 4413 add r3, r2 800e098: 00db lsls r3, r3, #3 800e09a: 440b add r3, r1 800e09c: 3308 adds r3, #8 800e09e: 68fa ldr r2, [r7, #12] 800e0a0: 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); 800e0a2: f9b7 2016 ldrsh.w r2, [r7, #22] 800e0a6: 4613 mov r3, r2 800e0a8: 005b lsls r3, r3, #1 800e0aa: 4413 add r3, r2 800e0ac: 00db lsls r3, r3, #3 800e0ae: 3308 adds r3, #8 800e0b0: 4a25 ldr r2, [pc, #148] ; (800e148 ) 800e0b2: 4413 add r3, r2 800e0b4: 3304 adds r3, #4 800e0b6: 2206 movs r2, #6 800e0b8: 6879 ldr r1, [r7, #4] 800e0ba: 4618 mov r0, r3 800e0bc: f002 ff65 bl 8010f8a /* reset time stamp */ arp_table[i].ctime = 0; 800e0c0: f9b7 2016 ldrsh.w r2, [r7, #22] 800e0c4: 4920 ldr r1, [pc, #128] ; (800e148 ) 800e0c6: 4613 mov r3, r2 800e0c8: 005b lsls r3, r3, #1 800e0ca: 4413 add r3, r2 800e0cc: 00db lsls r3, r3, #3 800e0ce: 440b add r3, r1 800e0d0: 3312 adds r3, #18 800e0d2: 2200 movs r2, #0 800e0d4: 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) { 800e0d6: f9b7 2016 ldrsh.w r2, [r7, #22] 800e0da: 491b ldr r1, [pc, #108] ; (800e148 ) 800e0dc: 4613 mov r3, r2 800e0de: 005b lsls r3, r3, #1 800e0e0: 4413 add r3, r2 800e0e2: 00db lsls r3, r3, #3 800e0e4: 440b add r3, r1 800e0e6: 681b ldr r3, [r3, #0] 800e0e8: 2b00 cmp r3, #0 800e0ea: d021 beq.n 800e130 struct pbuf *p = arp_table[i].q; 800e0ec: f9b7 2016 ldrsh.w r2, [r7, #22] 800e0f0: 4915 ldr r1, [pc, #84] ; (800e148 ) 800e0f2: 4613 mov r3, r2 800e0f4: 005b lsls r3, r3, #1 800e0f6: 4413 add r3, r2 800e0f8: 00db lsls r3, r3, #3 800e0fa: 440b add r3, r1 800e0fc: 681b ldr r3, [r3, #0] 800e0fe: 613b str r3, [r7, #16] arp_table[i].q = NULL; 800e100: f9b7 2016 ldrsh.w r2, [r7, #22] 800e104: 4910 ldr r1, [pc, #64] ; (800e148 ) 800e106: 4613 mov r3, r2 800e108: 005b lsls r3, r3, #1 800e10a: 4413 add r3, r2 800e10c: 00db lsls r3, r3, #3 800e10e: 440b add r3, r1 800e110: 2200 movs r2, #0 800e112: 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); 800e114: 68fb ldr r3, [r7, #12] 800e116: f103 0226 add.w r2, r3, #38 ; 0x26 800e11a: f44f 6300 mov.w r3, #2048 ; 0x800 800e11e: 9300 str r3, [sp, #0] 800e120: 687b ldr r3, [r7, #4] 800e122: 6939 ldr r1, [r7, #16] 800e124: 68f8 ldr r0, [r7, #12] 800e126: f002 f853 bl 80101d0 /* free the queued IP packet */ pbuf_free(p); 800e12a: 6938 ldr r0, [r7, #16] 800e12c: f7f8 ff52 bl 8006fd4 } return ERR_OK; 800e130: 2300 movs r3, #0 } 800e132: 4618 mov r0, r3 800e134: 3718 adds r7, #24 800e136: 46bd mov sp, r7 800e138: bd80 pop {r7, pc} 800e13a: bf00 nop 800e13c: 080142dc .word 0x080142dc 800e140: 080143d4 .word 0x080143d4 800e144: 08014354 .word 0x08014354 800e148: 24007bd0 .word 0x24007bd0 0800e14c : * * @param netif points to a network interface */ void etharp_cleanup_netif(struct netif *netif) { 800e14c: b580 push {r7, lr} 800e14e: b084 sub sp, #16 800e150: af00 add r7, sp, #0 800e152: 6078 str r0, [r7, #4] int i; for (i = 0; i < ARP_TABLE_SIZE; ++i) { 800e154: 2300 movs r3, #0 800e156: 60fb str r3, [r7, #12] 800e158: e01e b.n 800e198 u8_t state = arp_table[i].state; 800e15a: 4913 ldr r1, [pc, #76] ; (800e1a8 ) 800e15c: 68fa ldr r2, [r7, #12] 800e15e: 4613 mov r3, r2 800e160: 005b lsls r3, r3, #1 800e162: 4413 add r3, r2 800e164: 00db lsls r3, r3, #3 800e166: 440b add r3, r1 800e168: 3314 adds r3, #20 800e16a: 781b ldrb r3, [r3, #0] 800e16c: 72fb strb r3, [r7, #11] if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) { 800e16e: 7afb ldrb r3, [r7, #11] 800e170: 2b00 cmp r3, #0 800e172: d00e beq.n 800e192 800e174: 490c ldr r1, [pc, #48] ; (800e1a8 ) 800e176: 68fa ldr r2, [r7, #12] 800e178: 4613 mov r3, r2 800e17a: 005b lsls r3, r3, #1 800e17c: 4413 add r3, r2 800e17e: 00db lsls r3, r3, #3 800e180: 440b add r3, r1 800e182: 3308 adds r3, #8 800e184: 681b ldr r3, [r3, #0] 800e186: 687a ldr r2, [r7, #4] 800e188: 429a cmp r2, r3 800e18a: d102 bne.n 800e192 etharp_free_entry(i); 800e18c: 68f8 ldr r0, [r7, #12] 800e18e: f7ff fcb7 bl 800db00 for (i = 0; i < ARP_TABLE_SIZE; ++i) { 800e192: 68fb ldr r3, [r7, #12] 800e194: 3301 adds r3, #1 800e196: 60fb str r3, [r7, #12] 800e198: 68fb ldr r3, [r7, #12] 800e19a: 2b09 cmp r3, #9 800e19c: dddd ble.n 800e15a } } } 800e19e: bf00 nop 800e1a0: bf00 nop 800e1a2: 3710 adds r7, #16 800e1a4: 46bd mov sp, r7 800e1a6: bd80 pop {r7, pc} 800e1a8: 24007bd0 .word 0x24007bd0 0800e1ac : * * @see pbuf_free() */ void etharp_input(struct pbuf *p, struct netif *netif) { 800e1ac: b5b0 push {r4, r5, r7, lr} 800e1ae: b08a sub sp, #40 ; 0x28 800e1b0: af04 add r7, sp, #16 800e1b2: 6078 str r0, [r7, #4] 800e1b4: 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;); 800e1b6: 683b ldr r3, [r7, #0] 800e1b8: 2b00 cmp r3, #0 800e1ba: d107 bne.n 800e1cc 800e1bc: 4b3d ldr r3, [pc, #244] ; (800e2b4 ) 800e1be: f240 228a movw r2, #650 ; 0x28a 800e1c2: 493d ldr r1, [pc, #244] ; (800e2b8 ) 800e1c4: 483d ldr r0, [pc, #244] ; (800e2bc ) 800e1c6: f002 fcff bl 8010bc8 800e1ca: e06f b.n 800e2ac hdr = (struct etharp_hdr *)p->payload; 800e1cc: 687b ldr r3, [r7, #4] 800e1ce: 685b ldr r3, [r3, #4] 800e1d0: 617b str r3, [r7, #20] /* RFC 826 "Packet Reception": */ if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) || 800e1d2: 697b ldr r3, [r7, #20] 800e1d4: 881b ldrh r3, [r3, #0] 800e1d6: b29b uxth r3, r3 800e1d8: f5b3 7f80 cmp.w r3, #256 ; 0x100 800e1dc: d10c bne.n 800e1f8 (hdr->hwlen != ETH_HWADDR_LEN) || 800e1de: 697b ldr r3, [r7, #20] 800e1e0: 791b ldrb r3, [r3, #4] if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) || 800e1e2: 2b06 cmp r3, #6 800e1e4: d108 bne.n 800e1f8 (hdr->protolen != sizeof(ip4_addr_t)) || 800e1e6: 697b ldr r3, [r7, #20] 800e1e8: 795b ldrb r3, [r3, #5] (hdr->hwlen != ETH_HWADDR_LEN) || 800e1ea: 2b04 cmp r3, #4 800e1ec: d104 bne.n 800e1f8 (hdr->proto != PP_HTONS(ETHTYPE_IP))) { 800e1ee: 697b ldr r3, [r7, #20] 800e1f0: 885b ldrh r3, [r3, #2] 800e1f2: b29b uxth r3, r3 (hdr->protolen != sizeof(ip4_addr_t)) || 800e1f4: 2b08 cmp r3, #8 800e1f6: d003 beq.n 800e200 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); 800e1f8: 6878 ldr r0, [r7, #4] 800e1fa: f7f8 feeb bl 8006fd4 return; 800e1fe: e055 b.n 800e2ac 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); 800e200: 697b ldr r3, [r7, #20] 800e202: 330e adds r3, #14 800e204: 681b ldr r3, [r3, #0] 800e206: 60fb str r3, [r7, #12] IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&dipaddr, &hdr->dipaddr); 800e208: 697b ldr r3, [r7, #20] 800e20a: 3318 adds r3, #24 800e20c: 681b ldr r3, [r3, #0] 800e20e: 60bb str r3, [r7, #8] /* this interface is not configured? */ if (ip4_addr_isany_val(*netif_ip4_addr(netif))) { 800e210: 683b ldr r3, [r7, #0] 800e212: 3304 adds r3, #4 800e214: 681b ldr r3, [r3, #0] 800e216: 2b00 cmp r3, #0 800e218: d102 bne.n 800e220 for_us = 0; 800e21a: 2300 movs r3, #0 800e21c: 74fb strb r3, [r7, #19] 800e21e: e009 b.n 800e234 } else { /* ARP packet directed to us? */ for_us = (u8_t)ip4_addr_cmp(&dipaddr, netif_ip4_addr(netif)); 800e220: 68ba ldr r2, [r7, #8] 800e222: 683b ldr r3, [r7, #0] 800e224: 3304 adds r3, #4 800e226: 681b ldr r3, [r3, #0] 800e228: 429a cmp r2, r3 800e22a: bf0c ite eq 800e22c: 2301 moveq r3, #1 800e22e: 2300 movne r3, #0 800e230: b2db uxtb r3, r3 800e232: 74fb strb r3, [r7, #19] /* 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), 800e234: 697b ldr r3, [r7, #20] 800e236: f103 0208 add.w r2, r3, #8 800e23a: 7cfb ldrb r3, [r7, #19] 800e23c: 2b00 cmp r3, #0 800e23e: d001 beq.n 800e244 800e240: 2301 movs r3, #1 800e242: e000 b.n 800e246 800e244: 2302 movs r3, #2 800e246: f107 010c add.w r1, r7, #12 800e24a: 6838 ldr r0, [r7, #0] 800e24c: f7ff fed8 bl 800e000 for_us ? ETHARP_FLAG_TRY_HARD : ETHARP_FLAG_FIND_ONLY); /* now act on the message itself */ switch (hdr->opcode) { 800e250: 697b ldr r3, [r7, #20] 800e252: 88db ldrh r3, [r3, #6] 800e254: b29b uxth r3, r3 800e256: f5b3 7f80 cmp.w r3, #256 ; 0x100 800e25a: d003 beq.n 800e264 800e25c: f5b3 7f00 cmp.w r3, #512 ; 0x200 800e260: d01e beq.n 800e2a0 #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; 800e262: e020 b.n 800e2a6 if (for_us) { 800e264: 7cfb ldrb r3, [r7, #19] 800e266: 2b00 cmp r3, #0 800e268: d01c beq.n 800e2a4 (struct eth_addr *)netif->hwaddr, &hdr->shwaddr, 800e26a: 683b ldr r3, [r7, #0] 800e26c: f103 0026 add.w r0, r3, #38 ; 0x26 800e270: 697b ldr r3, [r7, #20] 800e272: f103 0408 add.w r4, r3, #8 (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), 800e276: 683b ldr r3, [r7, #0] 800e278: f103 0526 add.w r5, r3, #38 ; 0x26 800e27c: 683b ldr r3, [r7, #0] 800e27e: 3304 adds r3, #4 &hdr->shwaddr, &sipaddr, 800e280: 697a ldr r2, [r7, #20] 800e282: 3208 adds r2, #8 etharp_raw(netif, 800e284: 2102 movs r1, #2 800e286: 9103 str r1, [sp, #12] 800e288: f107 010c add.w r1, r7, #12 800e28c: 9102 str r1, [sp, #8] 800e28e: 9201 str r2, [sp, #4] 800e290: 9300 str r3, [sp, #0] 800e292: 462b mov r3, r5 800e294: 4622 mov r2, r4 800e296: 4601 mov r1, r0 800e298: 6838 ldr r0, [r7, #0] 800e29a: f000 faeb bl 800e874 break; 800e29e: e001 b.n 800e2a4 break; 800e2a0: bf00 nop 800e2a2: e000 b.n 800e2a6 break; 800e2a4: bf00 nop } /* free ARP packet */ pbuf_free(p); 800e2a6: 6878 ldr r0, [r7, #4] 800e2a8: f7f8 fe94 bl 8006fd4 } 800e2ac: 3718 adds r7, #24 800e2ae: 46bd mov sp, r7 800e2b0: bdb0 pop {r4, r5, r7, pc} 800e2b2: bf00 nop 800e2b4: 080142dc .word 0x080142dc 800e2b8: 0801442c .word 0x0801442c 800e2bc: 08014354 .word 0x08014354 0800e2c0 : /** 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) { 800e2c0: b580 push {r7, lr} 800e2c2: b086 sub sp, #24 800e2c4: af02 add r7, sp, #8 800e2c6: 60f8 str r0, [r7, #12] 800e2c8: 60b9 str r1, [r7, #8] 800e2ca: 4613 mov r3, r2 800e2cc: 71fb strb r3, [r7, #7] LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", 800e2ce: 79fa ldrb r2, [r7, #7] 800e2d0: 4944 ldr r1, [pc, #272] ; (800e3e4 ) 800e2d2: 4613 mov r3, r2 800e2d4: 005b lsls r3, r3, #1 800e2d6: 4413 add r3, r2 800e2d8: 00db lsls r3, r3, #3 800e2da: 440b add r3, r1 800e2dc: 3314 adds r3, #20 800e2de: 781b ldrb r3, [r3, #0] 800e2e0: 2b01 cmp r3, #1 800e2e2: d806 bhi.n 800e2f2 800e2e4: 4b40 ldr r3, [pc, #256] ; (800e3e8 ) 800e2e6: f240 22ee movw r2, #750 ; 0x2ee 800e2ea: 4940 ldr r1, [pc, #256] ; (800e3ec ) 800e2ec: 4840 ldr r0, [pc, #256] ; (800e3f0 ) 800e2ee: f002 fc6b bl 8010bc8 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) { 800e2f2: 79fa ldrb r2, [r7, #7] 800e2f4: 493b ldr r1, [pc, #236] ; (800e3e4 ) 800e2f6: 4613 mov r3, r2 800e2f8: 005b lsls r3, r3, #1 800e2fa: 4413 add r3, r2 800e2fc: 00db lsls r3, r3, #3 800e2fe: 440b add r3, r1 800e300: 3314 adds r3, #20 800e302: 781b ldrb r3, [r3, #0] 800e304: 2b02 cmp r3, #2 800e306: d153 bne.n 800e3b0 if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_BROADCAST) { 800e308: 79fa ldrb r2, [r7, #7] 800e30a: 4936 ldr r1, [pc, #216] ; (800e3e4 ) 800e30c: 4613 mov r3, r2 800e30e: 005b lsls r3, r3, #1 800e310: 4413 add r3, r2 800e312: 00db lsls r3, r3, #3 800e314: 440b add r3, r1 800e316: 3312 adds r3, #18 800e318: 881b ldrh r3, [r3, #0] 800e31a: f5b3 7f8e cmp.w r3, #284 ; 0x11c 800e31e: d919 bls.n 800e354 /* issue a standard request using broadcast */ if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) { 800e320: 79fa ldrb r2, [r7, #7] 800e322: 4613 mov r3, r2 800e324: 005b lsls r3, r3, #1 800e326: 4413 add r3, r2 800e328: 00db lsls r3, r3, #3 800e32a: 4a2e ldr r2, [pc, #184] ; (800e3e4 ) 800e32c: 4413 add r3, r2 800e32e: 3304 adds r3, #4 800e330: 4619 mov r1, r3 800e332: 68f8 ldr r0, [r7, #12] 800e334: f000 fb4c bl 800e9d0 800e338: 4603 mov r3, r0 800e33a: 2b00 cmp r3, #0 800e33c: d138 bne.n 800e3b0 arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; 800e33e: 79fa ldrb r2, [r7, #7] 800e340: 4928 ldr r1, [pc, #160] ; (800e3e4 ) 800e342: 4613 mov r3, r2 800e344: 005b lsls r3, r3, #1 800e346: 4413 add r3, r2 800e348: 00db lsls r3, r3, #3 800e34a: 440b add r3, r1 800e34c: 3314 adds r3, #20 800e34e: 2203 movs r2, #3 800e350: 701a strb r2, [r3, #0] 800e352: e02d b.n 800e3b0 } } else if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_UNICAST) { 800e354: 79fa ldrb r2, [r7, #7] 800e356: 4923 ldr r1, [pc, #140] ; (800e3e4 ) 800e358: 4613 mov r3, r2 800e35a: 005b lsls r3, r3, #1 800e35c: 4413 add r3, r2 800e35e: 00db lsls r3, r3, #3 800e360: 440b add r3, r1 800e362: 3312 adds r3, #18 800e364: 881b ldrh r3, [r3, #0] 800e366: f5b3 7f87 cmp.w r3, #270 ; 0x10e 800e36a: d321 bcc.n 800e3b0 /* 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) { 800e36c: 79fa ldrb r2, [r7, #7] 800e36e: 4613 mov r3, r2 800e370: 005b lsls r3, r3, #1 800e372: 4413 add r3, r2 800e374: 00db lsls r3, r3, #3 800e376: 4a1b ldr r2, [pc, #108] ; (800e3e4 ) 800e378: 4413 add r3, r2 800e37a: 1d19 adds r1, r3, #4 800e37c: 79fa ldrb r2, [r7, #7] 800e37e: 4613 mov r3, r2 800e380: 005b lsls r3, r3, #1 800e382: 4413 add r3, r2 800e384: 00db lsls r3, r3, #3 800e386: 3308 adds r3, #8 800e388: 4a16 ldr r2, [pc, #88] ; (800e3e4 ) 800e38a: 4413 add r3, r2 800e38c: 3304 adds r3, #4 800e38e: 461a mov r2, r3 800e390: 68f8 ldr r0, [r7, #12] 800e392: f000 fafb bl 800e98c 800e396: 4603 mov r3, r0 800e398: 2b00 cmp r3, #0 800e39a: d109 bne.n 800e3b0 arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; 800e39c: 79fa ldrb r2, [r7, #7] 800e39e: 4911 ldr r1, [pc, #68] ; (800e3e4 ) 800e3a0: 4613 mov r3, r2 800e3a2: 005b lsls r3, r3, #1 800e3a4: 4413 add r3, r2 800e3a6: 00db lsls r3, r3, #3 800e3a8: 440b add r3, r1 800e3aa: 3314 adds r3, #20 800e3ac: 2203 movs r2, #3 800e3ae: 701a strb r2, [r3, #0] } } } return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP); 800e3b0: 68fb ldr r3, [r7, #12] 800e3b2: f103 0126 add.w r1, r3, #38 ; 0x26 800e3b6: 79fa ldrb r2, [r7, #7] 800e3b8: 4613 mov r3, r2 800e3ba: 005b lsls r3, r3, #1 800e3bc: 4413 add r3, r2 800e3be: 00db lsls r3, r3, #3 800e3c0: 3308 adds r3, #8 800e3c2: 4a08 ldr r2, [pc, #32] ; (800e3e4 ) 800e3c4: 4413 add r3, r2 800e3c6: 3304 adds r3, #4 800e3c8: f44f 6200 mov.w r2, #2048 ; 0x800 800e3cc: 9200 str r2, [sp, #0] 800e3ce: 460a mov r2, r1 800e3d0: 68b9 ldr r1, [r7, #8] 800e3d2: 68f8 ldr r0, [r7, #12] 800e3d4: f001 fefc bl 80101d0 800e3d8: 4603 mov r3, r0 } 800e3da: 4618 mov r0, r3 800e3dc: 3710 adds r7, #16 800e3de: 46bd mov sp, r7 800e3e0: bd80 pop {r7, pc} 800e3e2: bf00 nop 800e3e4: 24007bd0 .word 0x24007bd0 800e3e8: 080142dc .word 0x080142dc 800e3ec: 0801444c .word 0x0801444c 800e3f0: 08014354 .word 0x08014354 0800e3f4 : * - 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) { 800e3f4: b580 push {r7, lr} 800e3f6: b08a sub sp, #40 ; 0x28 800e3f8: af02 add r7, sp, #8 800e3fa: 60f8 str r0, [r7, #12] 800e3fc: 60b9 str r1, [r7, #8] 800e3fe: 607a str r2, [r7, #4] const struct eth_addr *dest; struct eth_addr mcastaddr; const ip4_addr_t *dst_addr = ipaddr; 800e400: 687b ldr r3, [r7, #4] 800e402: 61bb str r3, [r7, #24] LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("netif != NULL", netif != NULL); 800e404: 68fb ldr r3, [r7, #12] 800e406: 2b00 cmp r3, #0 800e408: d106 bne.n 800e418 800e40a: 4b73 ldr r3, [pc, #460] ; (800e5d8 ) 800e40c: f240 321e movw r2, #798 ; 0x31e 800e410: 4972 ldr r1, [pc, #456] ; (800e5dc ) 800e412: 4873 ldr r0, [pc, #460] ; (800e5e0 ) 800e414: f002 fbd8 bl 8010bc8 LWIP_ASSERT("q != NULL", q != NULL); 800e418: 68bb ldr r3, [r7, #8] 800e41a: 2b00 cmp r3, #0 800e41c: d106 bne.n 800e42c 800e41e: 4b6e ldr r3, [pc, #440] ; (800e5d8 ) 800e420: f240 321f movw r2, #799 ; 0x31f 800e424: 496f ldr r1, [pc, #444] ; (800e5e4 ) 800e426: 486e ldr r0, [pc, #440] ; (800e5e0 ) 800e428: f002 fbce bl 8010bc8 LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); 800e42c: 687b ldr r3, [r7, #4] 800e42e: 2b00 cmp r3, #0 800e430: d106 bne.n 800e440 800e432: 4b69 ldr r3, [pc, #420] ; (800e5d8 ) 800e434: f44f 7248 mov.w r2, #800 ; 0x320 800e438: 496b ldr r1, [pc, #428] ; (800e5e8 ) 800e43a: 4869 ldr r0, [pc, #420] ; (800e5e0 ) 800e43c: f002 fbc4 bl 8010bc8 /* 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)) { 800e440: 687b ldr r3, [r7, #4] 800e442: 681b ldr r3, [r3, #0] 800e444: 68f9 ldr r1, [r7, #12] 800e446: 4618 mov r0, r3 800e448: f000 ffb4 bl 800f3b4 800e44c: 4603 mov r3, r0 800e44e: 2b00 cmp r3, #0 800e450: d002 beq.n 800e458 /* broadcast on Ethernet also */ dest = (const struct eth_addr *)ðbroadcast; 800e452: 4b66 ldr r3, [pc, #408] ; (800e5ec ) 800e454: 61fb str r3, [r7, #28] 800e456: e0af b.n 800e5b8 /* multicast destination IP address? */ } else if (ip4_addr_ismulticast(ipaddr)) { 800e458: 687b ldr r3, [r7, #4] 800e45a: 681b ldr r3, [r3, #0] 800e45c: f003 03f0 and.w r3, r3, #240 ; 0xf0 800e460: 2be0 cmp r3, #224 ; 0xe0 800e462: d118 bne.n 800e496 /* Hash IP multicast address to MAC address.*/ mcastaddr.addr[0] = LL_IP4_MULTICAST_ADDR_0; 800e464: 2301 movs r3, #1 800e466: 743b strb r3, [r7, #16] mcastaddr.addr[1] = LL_IP4_MULTICAST_ADDR_1; 800e468: 2300 movs r3, #0 800e46a: 747b strb r3, [r7, #17] mcastaddr.addr[2] = LL_IP4_MULTICAST_ADDR_2; 800e46c: 235e movs r3, #94 ; 0x5e 800e46e: 74bb strb r3, [r7, #18] mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; 800e470: 687b ldr r3, [r7, #4] 800e472: 3301 adds r3, #1 800e474: 781b ldrb r3, [r3, #0] 800e476: f003 037f and.w r3, r3, #127 ; 0x7f 800e47a: b2db uxtb r3, r3 800e47c: 74fb strb r3, [r7, #19] mcastaddr.addr[4] = ip4_addr3(ipaddr); 800e47e: 687b ldr r3, [r7, #4] 800e480: 3302 adds r3, #2 800e482: 781b ldrb r3, [r3, #0] 800e484: 753b strb r3, [r7, #20] mcastaddr.addr[5] = ip4_addr4(ipaddr); 800e486: 687b ldr r3, [r7, #4] 800e488: 3303 adds r3, #3 800e48a: 781b ldrb r3, [r3, #0] 800e48c: 757b strb r3, [r7, #21] /* destination Ethernet address is multicast */ dest = &mcastaddr; 800e48e: f107 0310 add.w r3, r7, #16 800e492: 61fb str r3, [r7, #28] 800e494: e090 b.n 800e5b8 /* 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)) && 800e496: 687b ldr r3, [r7, #4] 800e498: 681a ldr r2, [r3, #0] 800e49a: 68fb ldr r3, [r7, #12] 800e49c: 3304 adds r3, #4 800e49e: 681b ldr r3, [r3, #0] 800e4a0: 405a eors r2, r3 800e4a2: 68fb ldr r3, [r7, #12] 800e4a4: 3308 adds r3, #8 800e4a6: 681b ldr r3, [r3, #0] 800e4a8: 4013 ands r3, r2 800e4aa: 2b00 cmp r3, #0 800e4ac: d012 beq.n 800e4d4 !ip4_addr_islinklocal(ipaddr)) { 800e4ae: 687b ldr r3, [r7, #4] 800e4b0: 681b ldr r3, [r3, #0] 800e4b2: b29b uxth r3, r3 if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) && 800e4b4: f64f 62a9 movw r2, #65193 ; 0xfea9 800e4b8: 4293 cmp r3, r2 800e4ba: d00b beq.n 800e4d4 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))) { 800e4bc: 68fb ldr r3, [r7, #12] 800e4be: 330c adds r3, #12 800e4c0: 681b ldr r3, [r3, #0] 800e4c2: 2b00 cmp r3, #0 800e4c4: d003 beq.n 800e4ce /* send to hardware address of default gateway IP address */ dst_addr = netif_ip4_gw(netif); 800e4c6: 68fb ldr r3, [r7, #12] 800e4c8: 330c adds r3, #12 800e4ca: 61bb str r3, [r7, #24] 800e4cc: e002 b.n 800e4d4 /* no default gateway available */ } else { /* no route to destination error (default gateway missing) */ return ERR_RTE; 800e4ce: f06f 0303 mvn.w r3, #3 800e4d2: e07d b.n 800e5d0 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) && 800e4d4: 4b46 ldr r3, [pc, #280] ; (800e5f0 ) 800e4d6: 781b ldrb r3, [r3, #0] 800e4d8: 4619 mov r1, r3 800e4da: 4a46 ldr r2, [pc, #280] ; (800e5f4 ) 800e4dc: 460b mov r3, r1 800e4de: 005b lsls r3, r3, #1 800e4e0: 440b add r3, r1 800e4e2: 00db lsls r3, r3, #3 800e4e4: 4413 add r3, r2 800e4e6: 3314 adds r3, #20 800e4e8: 781b ldrb r3, [r3, #0] 800e4ea: 2b01 cmp r3, #1 800e4ec: d925 bls.n 800e53a #if ETHARP_TABLE_MATCH_NETIF (arp_table[etharp_cached_entry].netif == netif) && 800e4ee: 4b40 ldr r3, [pc, #256] ; (800e5f0 ) 800e4f0: 781b ldrb r3, [r3, #0] 800e4f2: 4619 mov r1, r3 800e4f4: 4a3f ldr r2, [pc, #252] ; (800e5f4 ) 800e4f6: 460b mov r3, r1 800e4f8: 005b lsls r3, r3, #1 800e4fa: 440b add r3, r1 800e4fc: 00db lsls r3, r3, #3 800e4fe: 4413 add r3, r2 800e500: 3308 adds r3, #8 800e502: 681b ldr r3, [r3, #0] if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) && 800e504: 68fa ldr r2, [r7, #12] 800e506: 429a cmp r2, r3 800e508: d117 bne.n 800e53a #endif (ip4_addr_cmp(dst_addr, &arp_table[etharp_cached_entry].ipaddr))) { 800e50a: 69bb ldr r3, [r7, #24] 800e50c: 681a ldr r2, [r3, #0] 800e50e: 4b38 ldr r3, [pc, #224] ; (800e5f0 ) 800e510: 781b ldrb r3, [r3, #0] 800e512: 4618 mov r0, r3 800e514: 4937 ldr r1, [pc, #220] ; (800e5f4 ) 800e516: 4603 mov r3, r0 800e518: 005b lsls r3, r3, #1 800e51a: 4403 add r3, r0 800e51c: 00db lsls r3, r3, #3 800e51e: 440b add r3, r1 800e520: 3304 adds r3, #4 800e522: 681b ldr r3, [r3, #0] (arp_table[etharp_cached_entry].netif == netif) && 800e524: 429a cmp r2, r3 800e526: d108 bne.n 800e53a /* 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); 800e528: 4b31 ldr r3, [pc, #196] ; (800e5f0 ) 800e52a: 781b ldrb r3, [r3, #0] 800e52c: 461a mov r2, r3 800e52e: 68b9 ldr r1, [r7, #8] 800e530: 68f8 ldr r0, [r7, #12] 800e532: f7ff fec5 bl 800e2c0 800e536: 4603 mov r3, r0 800e538: e04a b.n 800e5d0 } #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++) { 800e53a: 2300 movs r3, #0 800e53c: 75fb strb r3, [r7, #23] 800e53e: e031 b.n 800e5a4 if ((arp_table[i].state >= ETHARP_STATE_STABLE) && 800e540: 7dfa ldrb r2, [r7, #23] 800e542: 492c ldr r1, [pc, #176] ; (800e5f4 ) 800e544: 4613 mov r3, r2 800e546: 005b lsls r3, r3, #1 800e548: 4413 add r3, r2 800e54a: 00db lsls r3, r3, #3 800e54c: 440b add r3, r1 800e54e: 3314 adds r3, #20 800e550: 781b ldrb r3, [r3, #0] 800e552: 2b01 cmp r3, #1 800e554: d923 bls.n 800e59e #if ETHARP_TABLE_MATCH_NETIF (arp_table[i].netif == netif) && 800e556: 7dfa ldrb r2, [r7, #23] 800e558: 4926 ldr r1, [pc, #152] ; (800e5f4 ) 800e55a: 4613 mov r3, r2 800e55c: 005b lsls r3, r3, #1 800e55e: 4413 add r3, r2 800e560: 00db lsls r3, r3, #3 800e562: 440b add r3, r1 800e564: 3308 adds r3, #8 800e566: 681b ldr r3, [r3, #0] if ((arp_table[i].state >= ETHARP_STATE_STABLE) && 800e568: 68fa ldr r2, [r7, #12] 800e56a: 429a cmp r2, r3 800e56c: d117 bne.n 800e59e #endif (ip4_addr_cmp(dst_addr, &arp_table[i].ipaddr))) { 800e56e: 69bb ldr r3, [r7, #24] 800e570: 6819 ldr r1, [r3, #0] 800e572: 7dfa ldrb r2, [r7, #23] 800e574: 481f ldr r0, [pc, #124] ; (800e5f4 ) 800e576: 4613 mov r3, r2 800e578: 005b lsls r3, r3, #1 800e57a: 4413 add r3, r2 800e57c: 00db lsls r3, r3, #3 800e57e: 4403 add r3, r0 800e580: 3304 adds r3, #4 800e582: 681b ldr r3, [r3, #0] (arp_table[i].netif == netif) && 800e584: 4299 cmp r1, r3 800e586: d10a bne.n 800e59e /* found an existing, stable entry */ ETHARP_SET_ADDRHINT(netif, i); 800e588: 4a19 ldr r2, [pc, #100] ; (800e5f0 ) 800e58a: 7dfb ldrb r3, [r7, #23] 800e58c: 7013 strb r3, [r2, #0] return etharp_output_to_arp_index(netif, q, i); 800e58e: 7dfb ldrb r3, [r7, #23] 800e590: 461a mov r2, r3 800e592: 68b9 ldr r1, [r7, #8] 800e594: 68f8 ldr r0, [r7, #12] 800e596: f7ff fe93 bl 800e2c0 800e59a: 4603 mov r3, r0 800e59c: e018 b.n 800e5d0 for (i = 0; i < ARP_TABLE_SIZE; i++) { 800e59e: 7dfb ldrb r3, [r7, #23] 800e5a0: 3301 adds r3, #1 800e5a2: 75fb strb r3, [r7, #23] 800e5a4: 7dfb ldrb r3, [r7, #23] 800e5a6: 2b09 cmp r3, #9 800e5a8: d9ca bls.n 800e540 } } /* no stable entry found, use the (slower) query function: queue on destination Ethernet address belonging to ipaddr */ return etharp_query(netif, dst_addr, q); 800e5aa: 68ba ldr r2, [r7, #8] 800e5ac: 69b9 ldr r1, [r7, #24] 800e5ae: 68f8 ldr r0, [r7, #12] 800e5b0: f000 f822 bl 800e5f8 800e5b4: 4603 mov r3, r0 800e5b6: e00b b.n 800e5d0 } /* 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); 800e5b8: 68fb ldr r3, [r7, #12] 800e5ba: f103 0226 add.w r2, r3, #38 ; 0x26 800e5be: f44f 6300 mov.w r3, #2048 ; 0x800 800e5c2: 9300 str r3, [sp, #0] 800e5c4: 69fb ldr r3, [r7, #28] 800e5c6: 68b9 ldr r1, [r7, #8] 800e5c8: 68f8 ldr r0, [r7, #12] 800e5ca: f001 fe01 bl 80101d0 800e5ce: 4603 mov r3, r0 } 800e5d0: 4618 mov r0, r3 800e5d2: 3720 adds r7, #32 800e5d4: 46bd mov sp, r7 800e5d6: bd80 pop {r7, pc} 800e5d8: 080142dc .word 0x080142dc 800e5dc: 0801442c .word 0x0801442c 800e5e0: 08014354 .word 0x08014354 800e5e4: 0801447c .word 0x0801447c 800e5e8: 0801441c .word 0x0801441c 800e5ec: 08014d98 .word 0x08014d98 800e5f0: 24007cc0 .word 0x24007cc0 800e5f4: 24007bd0 .word 0x24007bd0 0800e5f8 : * - 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) { 800e5f8: b580 push {r7, lr} 800e5fa: b08c sub sp, #48 ; 0x30 800e5fc: af02 add r7, sp, #8 800e5fe: 60f8 str r0, [r7, #12] 800e600: 60b9 str r1, [r7, #8] 800e602: 607a str r2, [r7, #4] struct eth_addr *srcaddr = (struct eth_addr *)netif->hwaddr; 800e604: 68fb ldr r3, [r7, #12] 800e606: 3326 adds r3, #38 ; 0x26 800e608: 617b str r3, [r7, #20] err_t result = ERR_MEM; 800e60a: 23ff movs r3, #255 ; 0xff 800e60c: f887 3027 strb.w r3, [r7, #39] ; 0x27 int is_new_entry = 0; 800e610: 2300 movs r3, #0 800e612: 623b str r3, [r7, #32] s16_t i_err; netif_addr_idx_t i; /* non-unicast address? */ if (ip4_addr_isbroadcast(ipaddr, netif) || 800e614: 68bb ldr r3, [r7, #8] 800e616: 681b ldr r3, [r3, #0] 800e618: 68f9 ldr r1, [r7, #12] 800e61a: 4618 mov r0, r3 800e61c: f000 feca bl 800f3b4 800e620: 4603 mov r3, r0 800e622: 2b00 cmp r3, #0 800e624: d10c bne.n 800e640 ip4_addr_ismulticast(ipaddr) || 800e626: 68bb ldr r3, [r7, #8] 800e628: 681b ldr r3, [r3, #0] 800e62a: f003 03f0 and.w r3, r3, #240 ; 0xf0 if (ip4_addr_isbroadcast(ipaddr, netif) || 800e62e: 2be0 cmp r3, #224 ; 0xe0 800e630: d006 beq.n 800e640 ip4_addr_ismulticast(ipaddr) || 800e632: 68bb ldr r3, [r7, #8] 800e634: 2b00 cmp r3, #0 800e636: d003 beq.n 800e640 ip4_addr_isany(ipaddr)) { 800e638: 68bb ldr r3, [r7, #8] 800e63a: 681b ldr r3, [r3, #0] 800e63c: 2b00 cmp r3, #0 800e63e: d102 bne.n 800e646 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: will not add non-unicast IP address to ARP cache\n")); return ERR_ARG; 800e640: f06f 030f mvn.w r3, #15 800e644: e101 b.n 800e84a } /* find entry in ARP cache, ask to create entry if queueing packet */ i_err = etharp_find_entry(ipaddr, ETHARP_FLAG_TRY_HARD, netif); 800e646: 68fa ldr r2, [r7, #12] 800e648: 2101 movs r1, #1 800e64a: 68b8 ldr r0, [r7, #8] 800e64c: f7ff fb60 bl 800dd10 800e650: 4603 mov r3, r0 800e652: 827b strh r3, [r7, #18] /* could not find or create entry? */ if (i_err < 0) { 800e654: f9b7 3012 ldrsh.w r3, [r7, #18] 800e658: 2b00 cmp r3, #0 800e65a: da02 bge.n 800e662 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; 800e65c: 8a7b ldrh r3, [r7, #18] 800e65e: b25b sxtb r3, r3 800e660: e0f3 b.n 800e84a } LWIP_ASSERT("type overflow", (size_t)i_err < NETIF_ADDR_IDX_MAX); 800e662: 8a7b ldrh r3, [r7, #18] 800e664: 2b7e cmp r3, #126 ; 0x7e 800e666: d906 bls.n 800e676 800e668: 4b7a ldr r3, [pc, #488] ; (800e854 ) 800e66a: f240 32c1 movw r2, #961 ; 0x3c1 800e66e: 497a ldr r1, [pc, #488] ; (800e858 ) 800e670: 487a ldr r0, [pc, #488] ; (800e85c ) 800e672: f002 faa9 bl 8010bc8 i = (netif_addr_idx_t)i_err; 800e676: 8a7b ldrh r3, [r7, #18] 800e678: 747b strb r3, [r7, #17] /* mark a fresh entry as pending (we just sent a request) */ if (arp_table[i].state == ETHARP_STATE_EMPTY) { 800e67a: 7c7a ldrb r2, [r7, #17] 800e67c: 4978 ldr r1, [pc, #480] ; (800e860 ) 800e67e: 4613 mov r3, r2 800e680: 005b lsls r3, r3, #1 800e682: 4413 add r3, r2 800e684: 00db lsls r3, r3, #3 800e686: 440b add r3, r1 800e688: 3314 adds r3, #20 800e68a: 781b ldrb r3, [r3, #0] 800e68c: 2b00 cmp r3, #0 800e68e: d115 bne.n 800e6bc is_new_entry = 1; 800e690: 2301 movs r3, #1 800e692: 623b str r3, [r7, #32] arp_table[i].state = ETHARP_STATE_PENDING; 800e694: 7c7a ldrb r2, [r7, #17] 800e696: 4972 ldr r1, [pc, #456] ; (800e860 ) 800e698: 4613 mov r3, r2 800e69a: 005b lsls r3, r3, #1 800e69c: 4413 add r3, r2 800e69e: 00db lsls r3, r3, #3 800e6a0: 440b add r3, r1 800e6a2: 3314 adds r3, #20 800e6a4: 2201 movs r2, #1 800e6a6: 701a strb r2, [r3, #0] /* record network interface for re-sending arp request in etharp_tmr */ arp_table[i].netif = netif; 800e6a8: 7c7a ldrb r2, [r7, #17] 800e6aa: 496d ldr r1, [pc, #436] ; (800e860 ) 800e6ac: 4613 mov r3, r2 800e6ae: 005b lsls r3, r3, #1 800e6b0: 4413 add r3, r2 800e6b2: 00db lsls r3, r3, #3 800e6b4: 440b add r3, r1 800e6b6: 3308 adds r3, #8 800e6b8: 68fa ldr r2, [r7, #12] 800e6ba: 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", 800e6bc: 7c7a ldrb r2, [r7, #17] 800e6be: 4968 ldr r1, [pc, #416] ; (800e860 ) 800e6c0: 4613 mov r3, r2 800e6c2: 005b lsls r3, r3, #1 800e6c4: 4413 add r3, r2 800e6c6: 00db lsls r3, r3, #3 800e6c8: 440b add r3, r1 800e6ca: 3314 adds r3, #20 800e6cc: 781b ldrb r3, [r3, #0] 800e6ce: 2b01 cmp r3, #1 800e6d0: d011 beq.n 800e6f6 800e6d2: 7c7a ldrb r2, [r7, #17] 800e6d4: 4962 ldr r1, [pc, #392] ; (800e860 ) 800e6d6: 4613 mov r3, r2 800e6d8: 005b lsls r3, r3, #1 800e6da: 4413 add r3, r2 800e6dc: 00db lsls r3, r3, #3 800e6de: 440b add r3, r1 800e6e0: 3314 adds r3, #20 800e6e2: 781b ldrb r3, [r3, #0] 800e6e4: 2b01 cmp r3, #1 800e6e6: d806 bhi.n 800e6f6 800e6e8: 4b5a ldr r3, [pc, #360] ; (800e854 ) 800e6ea: f240 32cd movw r2, #973 ; 0x3cd 800e6ee: 495d ldr r1, [pc, #372] ; (800e864 ) 800e6f0: 485a ldr r0, [pc, #360] ; (800e85c ) 800e6f2: f002 fa69 bl 8010bc8 ((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)) { 800e6f6: 6a3b ldr r3, [r7, #32] 800e6f8: 2b00 cmp r3, #0 800e6fa: d102 bne.n 800e702 800e6fc: 687b ldr r3, [r7, #4] 800e6fe: 2b00 cmp r3, #0 800e700: d10c bne.n 800e71c /* try to resolve it; send out ARP request */ result = etharp_request(netif, ipaddr); 800e702: 68b9 ldr r1, [r7, #8] 800e704: 68f8 ldr r0, [r7, #12] 800e706: f000 f963 bl 800e9d0 800e70a: 4603 mov r3, r0 800e70c: 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) { 800e710: 687b ldr r3, [r7, #4] 800e712: 2b00 cmp r3, #0 800e714: d102 bne.n 800e71c return result; 800e716: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27 800e71a: e096 b.n 800e84a } } /* packet given? */ LWIP_ASSERT("q != NULL", q != NULL); 800e71c: 687b ldr r3, [r7, #4] 800e71e: 2b00 cmp r3, #0 800e720: d106 bne.n 800e730 800e722: 4b4c ldr r3, [pc, #304] ; (800e854 ) 800e724: f240 32e1 movw r2, #993 ; 0x3e1 800e728: 494f ldr r1, [pc, #316] ; (800e868 ) 800e72a: 484c ldr r0, [pc, #304] ; (800e85c ) 800e72c: f002 fa4c bl 8010bc8 /* stable entry? */ if (arp_table[i].state >= ETHARP_STATE_STABLE) { 800e730: 7c7a ldrb r2, [r7, #17] 800e732: 494b ldr r1, [pc, #300] ; (800e860 ) 800e734: 4613 mov r3, r2 800e736: 005b lsls r3, r3, #1 800e738: 4413 add r3, r2 800e73a: 00db lsls r3, r3, #3 800e73c: 440b add r3, r1 800e73e: 3314 adds r3, #20 800e740: 781b ldrb r3, [r3, #0] 800e742: 2b01 cmp r3, #1 800e744: d917 bls.n 800e776 /* we have a valid IP->Ethernet address mapping */ ETHARP_SET_ADDRHINT(netif, i); 800e746: 4a49 ldr r2, [pc, #292] ; (800e86c ) 800e748: 7c7b ldrb r3, [r7, #17] 800e74a: 7013 strb r3, [r2, #0] /* send the packet */ result = ethernet_output(netif, q, srcaddr, &(arp_table[i].ethaddr), ETHTYPE_IP); 800e74c: 7c7a ldrb r2, [r7, #17] 800e74e: 4613 mov r3, r2 800e750: 005b lsls r3, r3, #1 800e752: 4413 add r3, r2 800e754: 00db lsls r3, r3, #3 800e756: 3308 adds r3, #8 800e758: 4a41 ldr r2, [pc, #260] ; (800e860 ) 800e75a: 4413 add r3, r2 800e75c: 3304 adds r3, #4 800e75e: f44f 6200 mov.w r2, #2048 ; 0x800 800e762: 9200 str r2, [sp, #0] 800e764: 697a ldr r2, [r7, #20] 800e766: 6879 ldr r1, [r7, #4] 800e768: 68f8 ldr r0, [r7, #12] 800e76a: f001 fd31 bl 80101d0 800e76e: 4603 mov r3, r0 800e770: f887 3027 strb.w r3, [r7, #39] ; 0x27 800e774: e067 b.n 800e846 /* pending entry? (either just created or already pending */ } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 800e776: 7c7a ldrb r2, [r7, #17] 800e778: 4939 ldr r1, [pc, #228] ; (800e860 ) 800e77a: 4613 mov r3, r2 800e77c: 005b lsls r3, r3, #1 800e77e: 4413 add r3, r2 800e780: 00db lsls r3, r3, #3 800e782: 440b add r3, r1 800e784: 3314 adds r3, #20 800e786: 781b ldrb r3, [r3, #0] 800e788: 2b01 cmp r3, #1 800e78a: d15c bne.n 800e846 /* entry is still pending, queue the given packet 'q' */ struct pbuf *p; int copy_needed = 0; 800e78c: 2300 movs r3, #0 800e78e: 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; 800e790: 687b ldr r3, [r7, #4] 800e792: 61fb str r3, [r7, #28] while (p) { 800e794: e01c b.n 800e7d0 LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0)); 800e796: 69fb ldr r3, [r7, #28] 800e798: 895a ldrh r2, [r3, #10] 800e79a: 69fb ldr r3, [r7, #28] 800e79c: 891b ldrh r3, [r3, #8] 800e79e: 429a cmp r2, r3 800e7a0: d10a bne.n 800e7b8 800e7a2: 69fb ldr r3, [r7, #28] 800e7a4: 681b ldr r3, [r3, #0] 800e7a6: 2b00 cmp r3, #0 800e7a8: d006 beq.n 800e7b8 800e7aa: 4b2a ldr r3, [pc, #168] ; (800e854 ) 800e7ac: f240 32f1 movw r2, #1009 ; 0x3f1 800e7b0: 492f ldr r1, [pc, #188] ; (800e870 ) 800e7b2: 482a ldr r0, [pc, #168] ; (800e85c ) 800e7b4: f002 fa08 bl 8010bc8 if (PBUF_NEEDS_COPY(p)) { 800e7b8: 69fb ldr r3, [r7, #28] 800e7ba: 7b1b ldrb r3, [r3, #12] 800e7bc: f003 0340 and.w r3, r3, #64 ; 0x40 800e7c0: 2b00 cmp r3, #0 800e7c2: d002 beq.n 800e7ca copy_needed = 1; 800e7c4: 2301 movs r3, #1 800e7c6: 61bb str r3, [r7, #24] break; 800e7c8: e005 b.n 800e7d6 } p = p->next; 800e7ca: 69fb ldr r3, [r7, #28] 800e7cc: 681b ldr r3, [r3, #0] 800e7ce: 61fb str r3, [r7, #28] while (p) { 800e7d0: 69fb ldr r3, [r7, #28] 800e7d2: 2b00 cmp r3, #0 800e7d4: d1df bne.n 800e796 } if (copy_needed) { 800e7d6: 69bb ldr r3, [r7, #24] 800e7d8: 2b00 cmp r3, #0 800e7da: d007 beq.n 800e7ec /* copy the whole packet into new pbufs */ p = pbuf_clone(PBUF_LINK, PBUF_RAM, q); 800e7dc: 687a ldr r2, [r7, #4] 800e7de: f44f 7120 mov.w r1, #640 ; 0x280 800e7e2: 200e movs r0, #14 800e7e4: f7f8 fe52 bl 800748c 800e7e8: 61f8 str r0, [r7, #28] 800e7ea: e004 b.n 800e7f6 } else { /* referencing the old pbuf is enough */ p = q; 800e7ec: 687b ldr r3, [r7, #4] 800e7ee: 61fb str r3, [r7, #28] pbuf_ref(p); 800e7f0: 69f8 ldr r0, [r7, #28] 800e7f2: f7f8 fc8f bl 8007114 } /* packet could be taken over? */ if (p != NULL) { 800e7f6: 69fb ldr r3, [r7, #28] 800e7f8: 2b00 cmp r3, #0 800e7fa: d021 beq.n 800e840 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) { 800e7fc: 7c7a ldrb r2, [r7, #17] 800e7fe: 4918 ldr r1, [pc, #96] ; (800e860 ) 800e800: 4613 mov r3, r2 800e802: 005b lsls r3, r3, #1 800e804: 4413 add r3, r2 800e806: 00db lsls r3, r3, #3 800e808: 440b add r3, r1 800e80a: 681b ldr r3, [r3, #0] 800e80c: 2b00 cmp r3, #0 800e80e: d00a beq.n 800e826 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); 800e810: 7c7a ldrb r2, [r7, #17] 800e812: 4913 ldr r1, [pc, #76] ; (800e860 ) 800e814: 4613 mov r3, r2 800e816: 005b lsls r3, r3, #1 800e818: 4413 add r3, r2 800e81a: 00db lsls r3, r3, #3 800e81c: 440b add r3, r1 800e81e: 681b ldr r3, [r3, #0] 800e820: 4618 mov r0, r3 800e822: f7f8 fbd7 bl 8006fd4 } arp_table[i].q = p; 800e826: 7c7a ldrb r2, [r7, #17] 800e828: 490d ldr r1, [pc, #52] ; (800e860 ) 800e82a: 4613 mov r3, r2 800e82c: 005b lsls r3, r3, #1 800e82e: 4413 add r3, r2 800e830: 00db lsls r3, r3, #3 800e832: 440b add r3, r1 800e834: 69fa ldr r2, [r7, #28] 800e836: 601a str r2, [r3, #0] result = ERR_OK; 800e838: 2300 movs r3, #0 800e83a: f887 3027 strb.w r3, [r7, #39] ; 0x27 800e83e: e002 b.n 800e846 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; 800e840: 23ff movs r3, #255 ; 0xff 800e842: f887 3027 strb.w r3, [r7, #39] ; 0x27 } } return result; 800e846: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27 } 800e84a: 4618 mov r0, r3 800e84c: 3728 adds r7, #40 ; 0x28 800e84e: 46bd mov sp, r7 800e850: bd80 pop {r7, pc} 800e852: bf00 nop 800e854: 080142dc .word 0x080142dc 800e858: 08014488 .word 0x08014488 800e85c: 08014354 .word 0x08014354 800e860: 24007bd0 .word 0x24007bd0 800e864: 08014498 .word 0x08014498 800e868: 0801447c .word 0x0801447c 800e86c: 24007cc0 .word 0x24007cc0 800e870: 080144c0 .word 0x080144c0 0800e874 : 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) { 800e874: b580 push {r7, lr} 800e876: b08a sub sp, #40 ; 0x28 800e878: af02 add r7, sp, #8 800e87a: 60f8 str r0, [r7, #12] 800e87c: 60b9 str r1, [r7, #8] 800e87e: 607a str r2, [r7, #4] 800e880: 603b str r3, [r7, #0] struct pbuf *p; err_t result = ERR_OK; 800e882: 2300 movs r3, #0 800e884: 77fb strb r3, [r7, #31] struct etharp_hdr *hdr; LWIP_ASSERT("netif != NULL", netif != NULL); 800e886: 68fb ldr r3, [r7, #12] 800e888: 2b00 cmp r3, #0 800e88a: d106 bne.n 800e89a 800e88c: 4b3a ldr r3, [pc, #232] ; (800e978 ) 800e88e: f240 4257 movw r2, #1111 ; 0x457 800e892: 493a ldr r1, [pc, #232] ; (800e97c ) 800e894: 483a ldr r0, [pc, #232] ; (800e980 ) 800e896: f002 f997 bl 8010bc8 /* allocate a pbuf for the outgoing ARP request packet */ p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_HDR, PBUF_RAM); 800e89a: f44f 7220 mov.w r2, #640 ; 0x280 800e89e: 211c movs r1, #28 800e8a0: 200e movs r0, #14 800e8a2: f7f8 f8b3 bl 8006a0c 800e8a6: 61b8 str r0, [r7, #24] /* could allocate a pbuf for an ARP request? */ if (p == NULL) { 800e8a8: 69bb ldr r3, [r7, #24] 800e8aa: 2b00 cmp r3, #0 800e8ac: d102 bne.n 800e8b4 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; 800e8ae: f04f 33ff mov.w r3, #4294967295 800e8b2: e05d b.n 800e970 } LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr", 800e8b4: 69bb ldr r3, [r7, #24] 800e8b6: 895b ldrh r3, [r3, #10] 800e8b8: 2b1b cmp r3, #27 800e8ba: d806 bhi.n 800e8ca 800e8bc: 4b2e ldr r3, [pc, #184] ; (800e978 ) 800e8be: f240 4262 movw r2, #1122 ; 0x462 800e8c2: 4930 ldr r1, [pc, #192] ; (800e984 ) 800e8c4: 482e ldr r0, [pc, #184] ; (800e980 ) 800e8c6: f002 f97f bl 8010bc8 (p->len >= SIZEOF_ETHARP_HDR)); hdr = (struct etharp_hdr *)p->payload; 800e8ca: 69bb ldr r3, [r7, #24] 800e8cc: 685b ldr r3, [r3, #4] 800e8ce: 617b str r3, [r7, #20] LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n")); hdr->opcode = lwip_htons(opcode); 800e8d0: 8ebb ldrh r3, [r7, #52] ; 0x34 800e8d2: 4618 mov r0, r3 800e8d4: f7f6 fe3a bl 800554c 800e8d8: 4603 mov r3, r0 800e8da: 461a mov r2, r3 800e8dc: 697b ldr r3, [r7, #20] 800e8de: 80da strh r2, [r3, #6] LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!", 800e8e0: 68fb ldr r3, [r7, #12] 800e8e2: f893 302c ldrb.w r3, [r3, #44] ; 0x2c 800e8e6: 2b06 cmp r3, #6 800e8e8: d006 beq.n 800e8f8 800e8ea: 4b23 ldr r3, [pc, #140] ; (800e978 ) 800e8ec: f240 4269 movw r2, #1129 ; 0x469 800e8f0: 4925 ldr r1, [pc, #148] ; (800e988 ) 800e8f2: 4823 ldr r0, [pc, #140] ; (800e980 ) 800e8f4: f002 f968 bl 8010bc8 (netif->hwaddr_len == ETH_HWADDR_LEN)); /* Write the ARP MAC-Addresses */ SMEMCPY(&hdr->shwaddr, hwsrc_addr, ETH_HWADDR_LEN); 800e8f8: 697b ldr r3, [r7, #20] 800e8fa: 3308 adds r3, #8 800e8fc: 2206 movs r2, #6 800e8fe: 6839 ldr r1, [r7, #0] 800e900: 4618 mov r0, r3 800e902: f002 fb42 bl 8010f8a SMEMCPY(&hdr->dhwaddr, hwdst_addr, ETH_HWADDR_LEN); 800e906: 697b ldr r3, [r7, #20] 800e908: 3312 adds r3, #18 800e90a: 2206 movs r2, #6 800e90c: 6af9 ldr r1, [r7, #44] ; 0x2c 800e90e: 4618 mov r0, r3 800e910: f002 fb3b bl 8010f8a /* 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); 800e914: 697b ldr r3, [r7, #20] 800e916: 330e adds r3, #14 800e918: 6aba ldr r2, [r7, #40] ; 0x28 800e91a: 6812 ldr r2, [r2, #0] 800e91c: 601a str r2, [r3, #0] IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->dipaddr, ipdst_addr); 800e91e: 697b ldr r3, [r7, #20] 800e920: 3318 adds r3, #24 800e922: 6b3a ldr r2, [r7, #48] ; 0x30 800e924: 6812 ldr r2, [r2, #0] 800e926: 601a str r2, [r3, #0] hdr->hwtype = PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET); 800e928: 697b ldr r3, [r7, #20] 800e92a: 2200 movs r2, #0 800e92c: 701a strb r2, [r3, #0] 800e92e: 2200 movs r2, #0 800e930: f042 0201 orr.w r2, r2, #1 800e934: 705a strb r2, [r3, #1] hdr->proto = PP_HTONS(ETHTYPE_IP); 800e936: 697b ldr r3, [r7, #20] 800e938: 2200 movs r2, #0 800e93a: f042 0208 orr.w r2, r2, #8 800e93e: 709a strb r2, [r3, #2] 800e940: 2200 movs r2, #0 800e942: 70da strb r2, [r3, #3] /* set hwlen and protolen */ hdr->hwlen = ETH_HWADDR_LEN; 800e944: 697b ldr r3, [r7, #20] 800e946: 2206 movs r2, #6 800e948: 711a strb r2, [r3, #4] hdr->protolen = sizeof(ip4_addr_t); 800e94a: 697b ldr r3, [r7, #20] 800e94c: 2204 movs r2, #4 800e94e: 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); 800e950: f640 0306 movw r3, #2054 ; 0x806 800e954: 9300 str r3, [sp, #0] 800e956: 687b ldr r3, [r7, #4] 800e958: 68ba ldr r2, [r7, #8] 800e95a: 69b9 ldr r1, [r7, #24] 800e95c: 68f8 ldr r0, [r7, #12] 800e95e: f001 fc37 bl 80101d0 } ETHARP_STATS_INC(etharp.xmit); /* free ARP query packet */ pbuf_free(p); 800e962: 69b8 ldr r0, [r7, #24] 800e964: f7f8 fb36 bl 8006fd4 p = NULL; 800e968: 2300 movs r3, #0 800e96a: 61bb str r3, [r7, #24] /* could not allocate pbuf for ARP request */ return result; 800e96c: f997 301f ldrsb.w r3, [r7, #31] } 800e970: 4618 mov r0, r3 800e972: 3720 adds r7, #32 800e974: 46bd mov sp, r7 800e976: bd80 pop {r7, pc} 800e978: 080142dc .word 0x080142dc 800e97c: 0801442c .word 0x0801442c 800e980: 08014354 .word 0x08014354 800e984: 080144dc .word 0x080144dc 800e988: 08014510 .word 0x08014510 0800e98c : * 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) { 800e98c: b580 push {r7, lr} 800e98e: b088 sub sp, #32 800e990: af04 add r7, sp, #16 800e992: 60f8 str r0, [r7, #12] 800e994: 60b9 str r1, [r7, #8] 800e996: 607a str r2, [r7, #4] return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr, 800e998: 68fb ldr r3, [r7, #12] 800e99a: f103 0126 add.w r1, r3, #38 ; 0x26 (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), ðzero, 800e99e: 68fb ldr r3, [r7, #12] 800e9a0: f103 0026 add.w r0, r3, #38 ; 0x26 800e9a4: 68fb ldr r3, [r7, #12] 800e9a6: 3304 adds r3, #4 return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr, 800e9a8: 2201 movs r2, #1 800e9aa: 9203 str r2, [sp, #12] 800e9ac: 68ba ldr r2, [r7, #8] 800e9ae: 9202 str r2, [sp, #8] 800e9b0: 4a06 ldr r2, [pc, #24] ; (800e9cc ) 800e9b2: 9201 str r2, [sp, #4] 800e9b4: 9300 str r3, [sp, #0] 800e9b6: 4603 mov r3, r0 800e9b8: 687a ldr r2, [r7, #4] 800e9ba: 68f8 ldr r0, [r7, #12] 800e9bc: f7ff ff5a bl 800e874 800e9c0: 4603 mov r3, r0 ipaddr, ARP_REQUEST); } 800e9c2: 4618 mov r0, r3 800e9c4: 3710 adds r7, #16 800e9c6: 46bd mov sp, r7 800e9c8: bd80 pop {r7, pc} 800e9ca: bf00 nop 800e9cc: 08014da0 .word 0x08014da0 0800e9d0 : * 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) { 800e9d0: b580 push {r7, lr} 800e9d2: b082 sub sp, #8 800e9d4: af00 add r7, sp, #0 800e9d6: 6078 str r0, [r7, #4] 800e9d8: 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); 800e9da: 4a05 ldr r2, [pc, #20] ; (800e9f0 ) 800e9dc: 6839 ldr r1, [r7, #0] 800e9de: 6878 ldr r0, [r7, #4] 800e9e0: f7ff ffd4 bl 800e98c 800e9e4: 4603 mov r3, r0 } 800e9e6: 4618 mov r0, r3 800e9e8: 3708 adds r7, #8 800e9ea: 46bd mov sp, r7 800e9ec: bd80 pop {r7, pc} 800e9ee: bf00 nop 800e9f0: 08014d98 .word 0x08014d98 0800e9f4 : * @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) { 800e9f4: b580 push {r7, lr} 800e9f6: b08e sub sp, #56 ; 0x38 800e9f8: af04 add r7, sp, #16 800e9fa: 6078 str r0, [r7, #4] 800e9fc: 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(); 800e9fe: 4ba4 ldr r3, [pc, #656] ; (800ec90 ) 800ea00: 689b ldr r3, [r3, #8] 800ea02: 627b str r3, [r7, #36] ; 0x24 hlen = IPH_HL_BYTES(iphdr_in); 800ea04: 6a7b ldr r3, [r7, #36] ; 0x24 800ea06: 781b ldrb r3, [r3, #0] 800ea08: f003 030f and.w r3, r3, #15 800ea0c: b2db uxtb r3, r3 800ea0e: 009b lsls r3, r3, #2 800ea10: b2db uxtb r3, r3 800ea12: 847b strh r3, [r7, #34] ; 0x22 if (hlen < IP_HLEN) { 800ea14: 8c7b ldrh r3, [r7, #34] ; 0x22 800ea16: 2b13 cmp r3, #19 800ea18: d805 bhi.n 800ea26 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short IP header (%"S16_F" bytes) received\n", hlen)); 800ea1a: 8c7b ldrh r3, [r7, #34] ; 0x22 800ea1c: 4619 mov r1, r3 800ea1e: 489d ldr r0, [pc, #628] ; (800ec94 ) 800ea20: f002 f8d2 bl 8010bc8 goto lenerr; 800ea24: e128 b.n 800ec78 } if (p->len < sizeof(u16_t) * 2) { 800ea26: 687b ldr r3, [r7, #4] 800ea28: 895b ldrh r3, [r3, #10] 800ea2a: 2b03 cmp r3, #3 800ea2c: d806 bhi.n 800ea3c LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len)); 800ea2e: 687b ldr r3, [r7, #4] 800ea30: 891b ldrh r3, [r3, #8] 800ea32: 4619 mov r1, r3 800ea34: 4898 ldr r0, [pc, #608] ; (800ec98 ) 800ea36: f002 f8c7 bl 8010bc8 goto lenerr; 800ea3a: e11d b.n 800ec78 } type = *((u8_t *)p->payload); 800ea3c: 687b ldr r3, [r7, #4] 800ea3e: 685b ldr r3, [r3, #4] 800ea40: 781b ldrb r3, [r3, #0] 800ea42: f887 3021 strb.w r3, [r7, #33] ; 0x21 #ifdef LWIP_DEBUG code = *(((u8_t *)p->payload) + 1); 800ea46: 687b ldr r3, [r7, #4] 800ea48: 685b ldr r3, [r3, #4] 800ea4a: 785b ldrb r3, [r3, #1] 800ea4c: f887 3020 strb.w r3, [r7, #32] /* if debug is enabled but debug statement below is somehow disabled: */ LWIP_UNUSED_ARG(code); #endif /* LWIP_DEBUG */ switch (type) { 800ea50: f897 3021 ldrb.w r3, [r7, #33] ; 0x21 800ea54: 2b00 cmp r3, #0 800ea56: f000 8108 beq.w 800ec6a 800ea5a: 2b08 cmp r3, #8 800ea5c: f040 80fc bne.w 800ec58 (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(); 800ea60: 4b8e ldr r3, [pc, #568] ; (800ec9c ) 800ea62: 61fb str r3, [r7, #28] /* multicast destination address? */ if (ip4_addr_ismulticast(ip4_current_dest_addr())) { 800ea64: 4b8a ldr r3, [pc, #552] ; (800ec90 ) 800ea66: 695b ldr r3, [r3, #20] 800ea68: f003 03f0 and.w r3, r3, #240 ; 0xf0 800ea6c: 2be0 cmp r3, #224 ; 0xe0 800ea6e: d103 bne.n 800ea78 #if LWIP_MULTICAST_PING /* For multicast, use address of receiving interface as source address */ src = netif_ip4_addr(inp); #else /* LWIP_MULTICAST_PING */ LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to multicast pings\n")); 800ea70: 488b ldr r0, [pc, #556] ; (800eca0 ) 800ea72: f002 f917 bl 8010ca4 goto icmperr; 800ea76: e103 b.n 800ec80 #endif /* LWIP_MULTICAST_PING */ } /* broadcast destination address? */ if (ip4_addr_isbroadcast(ip4_current_dest_addr(), ip_current_netif())) { 800ea78: 4b85 ldr r3, [pc, #532] ; (800ec90 ) 800ea7a: 695b ldr r3, [r3, #20] 800ea7c: 4a84 ldr r2, [pc, #528] ; (800ec90 ) 800ea7e: 6812 ldr r2, [r2, #0] 800ea80: 4611 mov r1, r2 800ea82: 4618 mov r0, r3 800ea84: f000 fc96 bl 800f3b4 800ea88: 4603 mov r3, r0 800ea8a: 2b00 cmp r3, #0 800ea8c: d003 beq.n 800ea96 #if LWIP_BROADCAST_PING /* For broadcast, use address of receiving interface as source address */ src = netif_ip4_addr(inp); #else /* LWIP_BROADCAST_PING */ LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to broadcast pings\n")); 800ea8e: 4885 ldr r0, [pc, #532] ; (800eca4 ) 800ea90: f002 f908 bl 8010ca4 goto icmperr; 800ea94: e0f4 b.n 800ec80 #endif /* LWIP_BROADCAST_PING */ } LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ping\n")); 800ea96: 4884 ldr r0, [pc, #528] ; (800eca8 ) 800ea98: f002 f904 bl 8010ca4 if (p->tot_len < sizeof(struct icmp_echo_hdr)) { 800ea9c: 687b ldr r3, [r7, #4] 800ea9e: 891b ldrh r3, [r3, #8] 800eaa0: 2b07 cmp r3, #7 800eaa2: d803 bhi.n 800eaac LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: bad ICMP echo received\n")); 800eaa4: 4881 ldr r0, [pc, #516] ; (800ecac ) 800eaa6: f002 f8fd bl 8010ca4 goto lenerr; 800eaaa: e0e5 b.n 800ec78 } #if CHECKSUM_CHECK_ICMP IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_CHECK_ICMP) { if (inet_chksum_pbuf(p) != 0) { 800eaac: 6878 ldr r0, [r7, #4] 800eaae: f7f6 fdea bl 8005686 800eab2: 4603 mov r3, r0 800eab4: 2b00 cmp r3, #0 800eab6: d006 beq.n 800eac6 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo\n")); 800eab8: 487d ldr r0, [pc, #500] ; (800ecb0 ) 800eaba: f002 f8f3 bl 8010ca4 pbuf_free(p); 800eabe: 6878 ldr r0, [r7, #4] 800eac0: f7f8 fa88 bl 8006fd4 ICMP_STATS_INC(icmp.chkerr); MIB2_STATS_INC(mib2.icmpinerrors); return; 800eac4: e0e0 b.n 800ec88 } } #endif #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN if (pbuf_add_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) { 800eac6: 8c7b ldrh r3, [r7, #34] ; 0x22 800eac8: 330e adds r3, #14 800eaca: 4619 mov r1, r3 800eacc: 6878 ldr r0, [r7, #4] 800eace: f7f8 f9eb bl 8006ea8 800ead2: 4603 mov r3, r0 800ead4: 2b00 cmp r3, #0 800ead6: d057 beq.n 800eb88 /* 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); 800ead8: 687b ldr r3, [r7, #4] 800eada: 891a ldrh r2, [r3, #8] 800eadc: 8c7b ldrh r3, [r7, #34] ; 0x22 800eade: 4413 add r3, r2 800eae0: 837b strh r3, [r7, #26] if (alloc_len < p->tot_len) { 800eae2: 687b ldr r3, [r7, #4] 800eae4: 891b ldrh r3, [r3, #8] 800eae6: 8b7a ldrh r2, [r7, #26] 800eae8: 429a cmp r2, r3 800eaea: d203 bcs.n 800eaf4 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed (tot_len overflow)\n")); 800eaec: 4871 ldr r0, [pc, #452] ; (800ecb4 ) 800eaee: f002 f8d9 bl 8010ca4 goto icmperr; 800eaf2: e0c5 b.n 800ec80 } /* allocate new packet buffer with space for link headers */ r = pbuf_alloc(PBUF_LINK, alloc_len, PBUF_RAM); 800eaf4: 8b7b ldrh r3, [r7, #26] 800eaf6: f44f 7220 mov.w r2, #640 ; 0x280 800eafa: 4619 mov r1, r3 800eafc: 200e movs r0, #14 800eafe: f7f7 ff85 bl 8006a0c 800eb02: 6178 str r0, [r7, #20] if (r == NULL) { 800eb04: 697b ldr r3, [r7, #20] 800eb06: 2b00 cmp r3, #0 800eb08: d103 bne.n 800eb12 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed\n")); 800eb0a: 486b ldr r0, [pc, #428] ; (800ecb8 ) 800eb0c: f002 f8ca bl 8010ca4 goto icmperr; 800eb10: e0b6 b.n 800ec80 } if (r->len < hlen + sizeof(struct icmp_echo_hdr)) { 800eb12: 697b ldr r3, [r7, #20] 800eb14: 895b ldrh r3, [r3, #10] 800eb16: 461a mov r2, r3 800eb18: 8c7b ldrh r3, [r7, #34] ; 0x22 800eb1a: 3308 adds r3, #8 800eb1c: 429a cmp r2, r3 800eb1e: d206 bcs.n 800eb2e LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("first pbuf cannot hold the ICMP header")); 800eb20: 4866 ldr r0, [pc, #408] ; (800ecbc ) 800eb22: f002 f851 bl 8010bc8 pbuf_free(r); 800eb26: 6978 ldr r0, [r7, #20] 800eb28: f7f8 fa54 bl 8006fd4 goto icmperr; 800eb2c: e0a8 b.n 800ec80 } /* copy the ip header */ MEMCPY(r->payload, iphdr_in, hlen); 800eb2e: 697b ldr r3, [r7, #20] 800eb30: 685b ldr r3, [r3, #4] 800eb32: 8c7a ldrh r2, [r7, #34] ; 0x22 800eb34: 6a79 ldr r1, [r7, #36] ; 0x24 800eb36: 4618 mov r0, r3 800eb38: f002 fa27 bl 8010f8a /* switch r->payload back to icmp header (cannot fail) */ if (pbuf_remove_header(r, hlen)) { 800eb3c: 8c7b ldrh r3, [r7, #34] ; 0x22 800eb3e: 4619 mov r1, r3 800eb40: 6978 ldr r0, [r7, #20] 800eb42: f7f8 f9c1 bl 8006ec8 800eb46: 4603 mov r3, r0 800eb48: 2b00 cmp r3, #0 800eb4a: d009 beq.n 800eb60 LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0); 800eb4c: 4b5c ldr r3, [pc, #368] ; (800ecc0 ) 800eb4e: 22b6 movs r2, #182 ; 0xb6 800eb50: 495c ldr r1, [pc, #368] ; (800ecc4 ) 800eb52: 485d ldr r0, [pc, #372] ; (800ecc8 ) 800eb54: f002 f838 bl 8010bc8 pbuf_free(r); 800eb58: 6978 ldr r0, [r7, #20] 800eb5a: f7f8 fa3b bl 8006fd4 goto icmperr; 800eb5e: e08f b.n 800ec80 } /* copy the rest of the packet without ip header */ if (pbuf_copy(r, p) != ERR_OK) { 800eb60: 6879 ldr r1, [r7, #4] 800eb62: 6978 ldr r0, [r7, #20] 800eb64: f7f8 fb4e bl 8007204 800eb68: 4603 mov r3, r0 800eb6a: 2b00 cmp r3, #0 800eb6c: d006 beq.n 800eb7c LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("icmp_input: copying to new pbuf failed")); 800eb6e: 4857 ldr r0, [pc, #348] ; (800eccc ) 800eb70: f002 f82a bl 8010bc8 pbuf_free(r); 800eb74: 6978 ldr r0, [r7, #20] 800eb76: f7f8 fa2d bl 8006fd4 goto icmperr; 800eb7a: e081 b.n 800ec80 } /* free the original p */ pbuf_free(p); 800eb7c: 6878 ldr r0, [r7, #4] 800eb7e: f7f8 fa29 bl 8006fd4 /* we now have an identical copy of p that has room for link headers */ p = r; 800eb82: 697b ldr r3, [r7, #20] 800eb84: 607b str r3, [r7, #4] 800eb86: e00f b.n 800eba8 } else { /* restore p->payload to point to icmp header (cannot fail) */ if (pbuf_remove_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) { 800eb88: 8c7b ldrh r3, [r7, #34] ; 0x22 800eb8a: 330e adds r3, #14 800eb8c: 4619 mov r1, r3 800eb8e: 6878 ldr r0, [r7, #4] 800eb90: f7f8 f99a bl 8006ec8 800eb94: 4603 mov r3, r0 800eb96: 2b00 cmp r3, #0 800eb98: d006 beq.n 800eba8 LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); 800eb9a: 4b49 ldr r3, [pc, #292] ; (800ecc0 ) 800eb9c: 22c7 movs r2, #199 ; 0xc7 800eb9e: 494c ldr r1, [pc, #304] ; (800ecd0 ) 800eba0: 4849 ldr r0, [pc, #292] ; (800ecc8 ) 800eba2: f002 f811 bl 8010bc8 goto icmperr; 800eba6: e06b b.n 800ec80 } #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; 800eba8: 687b ldr r3, [r7, #4] 800ebaa: 685b ldr r3, [r3, #4] 800ebac: 613b str r3, [r7, #16] if (pbuf_add_header(p, hlen)) { 800ebae: 8c7b ldrh r3, [r7, #34] ; 0x22 800ebb0: 4619 mov r1, r3 800ebb2: 6878 ldr r0, [r7, #4] 800ebb4: f7f8 f978 bl 8006ea8 800ebb8: 4603 mov r3, r0 800ebba: 2b00 cmp r3, #0 800ebbc: d003 beq.n 800ebc6 LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("Can't move over header in packet")); 800ebbe: 4845 ldr r0, [pc, #276] ; (800ecd4 ) 800ebc0: f002 f802 bl 8010bc8 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; 800ebc4: e053 b.n 800ec6e struct ip_hdr *iphdr = (struct ip_hdr *)p->payload; 800ebc6: 687b ldr r3, [r7, #4] 800ebc8: 685b ldr r3, [r3, #4] 800ebca: 60fb str r3, [r7, #12] ip4_addr_copy(iphdr->src, *src); 800ebcc: 69fb ldr r3, [r7, #28] 800ebce: 681a ldr r2, [r3, #0] 800ebd0: 68fb ldr r3, [r7, #12] 800ebd2: 60da str r2, [r3, #12] ip4_addr_copy(iphdr->dest, *ip4_current_src_addr()); 800ebd4: 4b2e ldr r3, [pc, #184] ; (800ec90 ) 800ebd6: 691a ldr r2, [r3, #16] 800ebd8: 68fb ldr r3, [r7, #12] 800ebda: 611a str r2, [r3, #16] ICMPH_TYPE_SET(iecho, ICMP_ER); 800ebdc: 693b ldr r3, [r7, #16] 800ebde: 2200 movs r2, #0 800ebe0: 701a strb r2, [r3, #0] if (iecho->chksum > PP_HTONS(0xffffU - (ICMP_ECHO << 8))) { 800ebe2: 693b ldr r3, [r7, #16] 800ebe4: 885b ldrh r3, [r3, #2] 800ebe6: b29b uxth r3, r3 800ebe8: f64f 72f7 movw r2, #65527 ; 0xfff7 800ebec: 4293 cmp r3, r2 800ebee: d907 bls.n 800ec00 iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS((u16_t)(ICMP_ECHO << 8)) + 1); 800ebf0: 693b ldr r3, [r7, #16] 800ebf2: 885b ldrh r3, [r3, #2] 800ebf4: b29b uxth r3, r3 800ebf6: 3309 adds r3, #9 800ebf8: b29a uxth r2, r3 800ebfa: 693b ldr r3, [r7, #16] 800ebfc: 805a strh r2, [r3, #2] 800ebfe: e006 b.n 800ec0e iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS(ICMP_ECHO << 8)); 800ec00: 693b ldr r3, [r7, #16] 800ec02: 885b ldrh r3, [r3, #2] 800ec04: b29b uxth r3, r3 800ec06: 3308 adds r3, #8 800ec08: b29a uxth r2, r3 800ec0a: 693b ldr r3, [r7, #16] 800ec0c: 805a strh r2, [r3, #2] IPH_TTL_SET(iphdr, ICMP_TTL); 800ec0e: 68fb ldr r3, [r7, #12] 800ec10: 22ff movs r2, #255 ; 0xff 800ec12: 721a strb r2, [r3, #8] IPH_CHKSUM_SET(iphdr, 0); 800ec14: 68fb ldr r3, [r7, #12] 800ec16: 2200 movs r2, #0 800ec18: 729a strb r2, [r3, #10] 800ec1a: 2200 movs r2, #0 800ec1c: 72da strb r2, [r3, #11] ret = ip4_output_if(p, src, LWIP_IP_HDRINCL, 800ec1e: 683b ldr r3, [r7, #0] 800ec20: 9302 str r3, [sp, #8] 800ec22: 2301 movs r3, #1 800ec24: 9301 str r3, [sp, #4] 800ec26: 2300 movs r3, #0 800ec28: 9300 str r3, [sp, #0] 800ec2a: 23ff movs r3, #255 ; 0xff 800ec2c: 2200 movs r2, #0 800ec2e: 69f9 ldr r1, [r7, #28] 800ec30: 6878 ldr r0, [r7, #4] 800ec32: f000 fae7 bl 800f204 800ec36: 4603 mov r3, r0 800ec38: 72fb strb r3, [r7, #11] if (ret != ERR_OK) { 800ec3a: f997 300b ldrsb.w r3, [r7, #11] 800ec3e: 2b00 cmp r3, #0 800ec40: d015 beq.n 800ec6e LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ip_output_if returned an error: %s\n", lwip_strerr(ret))); 800ec42: f997 300b ldrsb.w r3, [r7, #11] 800ec46: 4618 mov r0, r3 800ec48: f7f6 fc60 bl 800550c 800ec4c: 4603 mov r3, r0 800ec4e: 4619 mov r1, r3 800ec50: 4821 ldr r0, [pc, #132] ; (800ecd8 ) 800ec52: f001 ffb9 bl 8010bc8 break; 800ec56: e00a b.n 800ec6e } else if (type == ICMP_AM) { MIB2_STATS_INC(mib2.icmpinaddrmasks); } else if (type == ICMP_AMR) { MIB2_STATS_INC(mib2.icmpinaddrmaskreps); } LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n", 800ec58: f897 3021 ldrb.w r3, [r7, #33] ; 0x21 800ec5c: f897 2020 ldrb.w r2, [r7, #32] 800ec60: 4619 mov r1, r3 800ec62: 481e ldr r0, [pc, #120] ; (800ecdc ) 800ec64: f001 ffb0 bl 8010bc8 800ec68: e002 b.n 800ec70 break; 800ec6a: bf00 nop 800ec6c: e000 b.n 800ec70 break; 800ec6e: bf00 nop (s16_t)type, (s16_t)code)); ICMP_STATS_INC(icmp.proterr); ICMP_STATS_INC(icmp.drop); } pbuf_free(p); 800ec70: 6878 ldr r0, [r7, #4] 800ec72: f7f8 f9af bl 8006fd4 return; 800ec76: e007 b.n 800ec88 lenerr: pbuf_free(p); 800ec78: 6878 ldr r0, [r7, #4] 800ec7a: f7f8 f9ab bl 8006fd4 ICMP_STATS_INC(icmp.lenerr); MIB2_STATS_INC(mib2.icmpinerrors); return; 800ec7e: e003 b.n 800ec88 #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING icmperr: pbuf_free(p); 800ec80: 6878 ldr r0, [r7, #4] 800ec82: f7f8 f9a7 bl 8006fd4 ICMP_STATS_INC(icmp.err); MIB2_STATS_INC(mib2.icmpinerrors); return; 800ec86: bf00 nop #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING */ } 800ec88: 3728 adds r7, #40 ; 0x28 800ec8a: 46bd mov sp, r7 800ec8c: bd80 pop {r7, pc} 800ec8e: bf00 nop 800ec90: 24004c10 .word 0x24004c10 800ec94: 08014554 .word 0x08014554 800ec98: 08014588 .word 0x08014588 800ec9c: 24004c24 .word 0x24004c24 800eca0: 080145b8 .word 0x080145b8 800eca4: 080145e4 .word 0x080145e4 800eca8: 08014610 .word 0x08014610 800ecac: 08014624 .word 0x08014624 800ecb0: 08014648 .word 0x08014648 800ecb4: 0801467c .word 0x0801467c 800ecb8: 080146b8 .word 0x080146b8 800ecbc: 080146e0 .word 0x080146e0 800ecc0: 08014708 .word 0x08014708 800ecc4: 08014740 .word 0x08014740 800ecc8: 08014778 .word 0x08014778 800eccc: 080147a0 .word 0x080147a0 800ecd0: 080147c8 .word 0x080147c8 800ecd4: 080147fc .word 0x080147fc 800ecd8: 08014820 .word 0x08014820 800ecdc: 08014850 .word 0x08014850 0800ece0 : * 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) { 800ece0: b580 push {r7, lr} 800ece2: b082 sub sp, #8 800ece4: af00 add r7, sp, #0 800ece6: 6078 str r0, [r7, #4] 800ece8: 460b mov r3, r1 800ecea: 70fb strb r3, [r7, #3] MIB2_STATS_INC(mib2.icmpoutdestunreachs); icmp_send_response(p, ICMP_DUR, t); 800ecec: 78fb ldrb r3, [r7, #3] 800ecee: 461a mov r2, r3 800ecf0: 2103 movs r1, #3 800ecf2: 6878 ldr r0, [r7, #4] 800ecf4: f000 f814 bl 800ed20 } 800ecf8: bf00 nop 800ecfa: 3708 adds r7, #8 800ecfc: 46bd mov sp, r7 800ecfe: bd80 pop {r7, pc} 0800ed00 : * 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) { 800ed00: b580 push {r7, lr} 800ed02: b082 sub sp, #8 800ed04: af00 add r7, sp, #0 800ed06: 6078 str r0, [r7, #4] 800ed08: 460b mov r3, r1 800ed0a: 70fb strb r3, [r7, #3] MIB2_STATS_INC(mib2.icmpouttimeexcds); icmp_send_response(p, ICMP_TE, t); 800ed0c: 78fb ldrb r3, [r7, #3] 800ed0e: 461a mov r2, r3 800ed10: 210b movs r1, #11 800ed12: 6878 ldr r0, [r7, #4] 800ed14: f000 f804 bl 800ed20 } 800ed18: bf00 nop 800ed1a: 3708 adds r7, #8 800ed1c: 46bd mov sp, r7 800ed1e: bd80 pop {r7, pc} 0800ed20 : * @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) { 800ed20: b580 push {r7, lr} 800ed22: b08c sub sp, #48 ; 0x30 800ed24: af04 add r7, sp, #16 800ed26: 6078 str r0, [r7, #4] 800ed28: 460b mov r3, r1 800ed2a: 70fb strb r3, [r7, #3] 800ed2c: 4613 mov r3, r2 800ed2e: 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, 800ed30: f44f 7220 mov.w r2, #640 ; 0x280 800ed34: 2124 movs r1, #36 ; 0x24 800ed36: 2022 movs r0, #34 ; 0x22 800ed38: f7f7 fe68 bl 8006a0c 800ed3c: 61f8 str r0, [r7, #28] PBUF_RAM); if (q == NULL) { 800ed3e: 69fb ldr r3, [r7, #28] 800ed40: 2b00 cmp r3, #0 800ed42: d103 bne.n 800ed4c LWIP_DEBUGF(ICMP_DEBUG, ("icmp_time_exceeded: failed to allocate pbuf for ICMP packet.\n")); 800ed44: 4849 ldr r0, [pc, #292] ; (800ee6c ) 800ed46: f001 ffad bl 8010ca4 800ed4a: e08c b.n 800ee66 MIB2_STATS_INC(mib2.icmpouterrors); return; } LWIP_ASSERT("check that first pbuf can hold icmp message", 800ed4c: 69fb ldr r3, [r7, #28] 800ed4e: 895b ldrh r3, [r3, #10] 800ed50: 2b23 cmp r3, #35 ; 0x23 800ed52: d806 bhi.n 800ed62 800ed54: 4b46 ldr r3, [pc, #280] ; (800ee70 ) 800ed56: f44f 72b4 mov.w r2, #360 ; 0x168 800ed5a: 4946 ldr r1, [pc, #280] ; (800ee74 ) 800ed5c: 4846 ldr r0, [pc, #280] ; (800ee78 ) 800ed5e: f001 ff33 bl 8010bc8 (q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE))); iphdr = (struct ip_hdr *)p->payload; 800ed62: 687b ldr r3, [r7, #4] 800ed64: 685b ldr r3, [r3, #4] 800ed66: 61bb str r3, [r7, #24] LWIP_DEBUGF(ICMP_DEBUG, ("icmp_time_exceeded from ")); 800ed68: 4844 ldr r0, [pc, #272] ; (800ee7c ) 800ed6a: f001 ff2d bl 8010bc8 ip4_addr_debug_print_val(ICMP_DEBUG, iphdr->src); 800ed6e: 69bb ldr r3, [r7, #24] 800ed70: 68db ldr r3, [r3, #12] 800ed72: b2db uxtb r3, r3 800ed74: 4619 mov r1, r3 800ed76: 69bb ldr r3, [r7, #24] 800ed78: 68db ldr r3, [r3, #12] 800ed7a: 0a1b lsrs r3, r3, #8 800ed7c: b2db uxtb r3, r3 800ed7e: 461a mov r2, r3 800ed80: 69bb ldr r3, [r7, #24] 800ed82: 68db ldr r3, [r3, #12] 800ed84: 0c1b lsrs r3, r3, #16 800ed86: b2db uxtb r3, r3 800ed88: 4618 mov r0, r3 800ed8a: 69bb ldr r3, [r7, #24] 800ed8c: 68db ldr r3, [r3, #12] 800ed8e: 0e1b lsrs r3, r3, #24 800ed90: b2db uxtb r3, r3 800ed92: 9300 str r3, [sp, #0] 800ed94: 4603 mov r3, r0 800ed96: 483a ldr r0, [pc, #232] ; (800ee80 ) 800ed98: f001 ff16 bl 8010bc8 LWIP_DEBUGF(ICMP_DEBUG, (" to ")); 800ed9c: 4839 ldr r0, [pc, #228] ; (800ee84 ) 800ed9e: f001 ff13 bl 8010bc8 ip4_addr_debug_print_val(ICMP_DEBUG, iphdr->dest); 800eda2: 69bb ldr r3, [r7, #24] 800eda4: 691b ldr r3, [r3, #16] 800eda6: b2db uxtb r3, r3 800eda8: 4619 mov r1, r3 800edaa: 69bb ldr r3, [r7, #24] 800edac: 691b ldr r3, [r3, #16] 800edae: 0a1b lsrs r3, r3, #8 800edb0: b2db uxtb r3, r3 800edb2: 461a mov r2, r3 800edb4: 69bb ldr r3, [r7, #24] 800edb6: 691b ldr r3, [r3, #16] 800edb8: 0c1b lsrs r3, r3, #16 800edba: b2db uxtb r3, r3 800edbc: 4618 mov r0, r3 800edbe: 69bb ldr r3, [r7, #24] 800edc0: 691b ldr r3, [r3, #16] 800edc2: 0e1b lsrs r3, r3, #24 800edc4: b2db uxtb r3, r3 800edc6: 9300 str r3, [sp, #0] 800edc8: 4603 mov r3, r0 800edca: 482d ldr r0, [pc, #180] ; (800ee80 ) 800edcc: f001 fefc bl 8010bc8 LWIP_DEBUGF(ICMP_DEBUG, ("\n")); 800edd0: 200a movs r0, #10 800edd2: f001 ff0b bl 8010bec icmphdr = (struct icmp_echo_hdr *)q->payload; 800edd6: 69fb ldr r3, [r7, #28] 800edd8: 685b ldr r3, [r3, #4] 800edda: 617b str r3, [r7, #20] icmphdr->type = type; 800eddc: 697b ldr r3, [r7, #20] 800edde: 78fa ldrb r2, [r7, #3] 800ede0: 701a strb r2, [r3, #0] icmphdr->code = code; 800ede2: 697b ldr r3, [r7, #20] 800ede4: 78ba ldrb r2, [r7, #2] 800ede6: 705a strb r2, [r3, #1] icmphdr->id = 0; 800ede8: 697b ldr r3, [r7, #20] 800edea: 2200 movs r2, #0 800edec: 711a strb r2, [r3, #4] 800edee: 2200 movs r2, #0 800edf0: 715a strb r2, [r3, #5] icmphdr->seqno = 0; 800edf2: 697b ldr r3, [r7, #20] 800edf4: 2200 movs r2, #0 800edf6: 719a strb r2, [r3, #6] 800edf8: 2200 movs r2, #0 800edfa: 71da strb r2, [r3, #7] /* copy fields from original packet */ SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload, 800edfc: 69fb ldr r3, [r7, #28] 800edfe: 685b ldr r3, [r3, #4] 800ee00: f103 0008 add.w r0, r3, #8 800ee04: 687b ldr r3, [r7, #4] 800ee06: 685b ldr r3, [r3, #4] 800ee08: 221c movs r2, #28 800ee0a: 4619 mov r1, r3 800ee0c: f002 f8bd bl 8010f8a IP_HLEN + ICMP_DEST_UNREACH_DATASIZE); ip4_addr_copy(iphdr_src, iphdr->src); 800ee10: 69bb ldr r3, [r7, #24] 800ee12: 68db ldr r3, [r3, #12] 800ee14: 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); 800ee16: f107 030c add.w r3, r7, #12 800ee1a: 4618 mov r0, r3 800ee1c: f000 f834 bl 800ee88 800ee20: 6138 str r0, [r7, #16] #endif if (netif != NULL) { 800ee22: 693b ldr r3, [r7, #16] 800ee24: 2b00 cmp r3, #0 800ee26: d01b beq.n 800ee60 /* calculate checksum */ icmphdr->chksum = 0; 800ee28: 697b ldr r3, [r7, #20] 800ee2a: 2200 movs r2, #0 800ee2c: 709a strb r2, [r3, #2] 800ee2e: 2200 movs r2, #0 800ee30: 70da strb r2, [r3, #3] #if CHECKSUM_GEN_ICMP IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP) { icmphdr->chksum = inet_chksum(icmphdr, q->len); 800ee32: 69fb ldr r3, [r7, #28] 800ee34: 895b ldrh r3, [r3, #10] 800ee36: 4619 mov r1, r3 800ee38: 6978 ldr r0, [r7, #20] 800ee3a: f7f6 fc12 bl 8005662 800ee3e: 4603 mov r3, r0 800ee40: 461a mov r2, r3 800ee42: 697b ldr r3, [r7, #20] 800ee44: 805a strh r2, [r3, #2] } #endif ICMP_STATS_INC(icmp.xmit); ip4_output_if(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP, netif); 800ee46: f107 020c add.w r2, r7, #12 800ee4a: 693b ldr r3, [r7, #16] 800ee4c: 9302 str r3, [sp, #8] 800ee4e: 2301 movs r3, #1 800ee50: 9301 str r3, [sp, #4] 800ee52: 2300 movs r3, #0 800ee54: 9300 str r3, [sp, #0] 800ee56: 23ff movs r3, #255 ; 0xff 800ee58: 2100 movs r1, #0 800ee5a: 69f8 ldr r0, [r7, #28] 800ee5c: f000 f9d2 bl 800f204 } pbuf_free(q); 800ee60: 69f8 ldr r0, [r7, #28] 800ee62: f7f8 f8b7 bl 8006fd4 } 800ee66: 3720 adds r7, #32 800ee68: 46bd mov sp, r7 800ee6a: bd80 pop {r7, pc} 800ee6c: 08014884 .word 0x08014884 800ee70: 08014708 .word 0x08014708 800ee74: 080148c4 .word 0x080148c4 800ee78: 08014778 .word 0x08014778 800ee7c: 080148f0 .word 0x080148f0 800ee80: 0801490c .word 0x0801490c 800ee84: 0801491c .word 0x0801491c 0800ee88 : * @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) { 800ee88: b480 push {r7} 800ee8a: b085 sub sp, #20 800ee8c: af00 add r7, sp, #0 800ee8e: 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) { 800ee90: 4b33 ldr r3, [pc, #204] ; (800ef60 ) 800ee92: 681b ldr r3, [r3, #0] 800ee94: 60fb str r3, [r7, #12] 800ee96: e036 b.n 800ef06 /* 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))) { 800ee98: 68fb ldr r3, [r7, #12] 800ee9a: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 800ee9e: f003 0301 and.w r3, r3, #1 800eea2: b2db uxtb r3, r3 800eea4: 2b00 cmp r3, #0 800eea6: d02b beq.n 800ef00 800eea8: 68fb ldr r3, [r7, #12] 800eeaa: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 800eeae: 089b lsrs r3, r3, #2 800eeb0: f003 0301 and.w r3, r3, #1 800eeb4: b2db uxtb r3, r3 800eeb6: 2b00 cmp r3, #0 800eeb8: d022 beq.n 800ef00 800eeba: 68fb ldr r3, [r7, #12] 800eebc: 3304 adds r3, #4 800eebe: 681b ldr r3, [r3, #0] 800eec0: 2b00 cmp r3, #0 800eec2: d01d beq.n 800ef00 /* network mask matches? */ if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) { 800eec4: 687b ldr r3, [r7, #4] 800eec6: 681a ldr r2, [r3, #0] 800eec8: 68fb ldr r3, [r7, #12] 800eeca: 3304 adds r3, #4 800eecc: 681b ldr r3, [r3, #0] 800eece: 405a eors r2, r3 800eed0: 68fb ldr r3, [r7, #12] 800eed2: 3308 adds r3, #8 800eed4: 681b ldr r3, [r3, #0] 800eed6: 4013 ands r3, r2 800eed8: 2b00 cmp r3, #0 800eeda: d101 bne.n 800eee0 /* return netif on which to forward IP packet */ return netif; 800eedc: 68fb ldr r3, [r7, #12] 800eede: e038 b.n 800ef52 } /* 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))) { 800eee0: 68fb ldr r3, [r7, #12] 800eee2: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 800eee6: f003 0302 and.w r3, r3, #2 800eeea: 2b00 cmp r3, #0 800eeec: d108 bne.n 800ef00 800eeee: 687b ldr r3, [r7, #4] 800eef0: 681a ldr r2, [r3, #0] 800eef2: 68fb ldr r3, [r7, #12] 800eef4: 330c adds r3, #12 800eef6: 681b ldr r3, [r3, #0] 800eef8: 429a cmp r2, r3 800eefa: d101 bne.n 800ef00 /* return netif on which to forward IP packet */ return netif; 800eefc: 68fb ldr r3, [r7, #12] 800eefe: e028 b.n 800ef52 NETIF_FOREACH(netif) { 800ef00: 68fb ldr r3, [r7, #12] 800ef02: 681b ldr r3, [r3, #0] 800ef04: 60fb str r3, [r7, #12] 800ef06: 68fb ldr r3, [r7, #12] 800ef08: 2b00 cmp r3, #0 800ef0a: d1c5 bne.n 800ee98 return netif; } #endif #endif /* !LWIP_SINGLE_NETIF */ if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || 800ef0c: 4b15 ldr r3, [pc, #84] ; (800ef64 ) 800ef0e: 681b ldr r3, [r3, #0] 800ef10: 2b00 cmp r3, #0 800ef12: d01a beq.n 800ef4a 800ef14: 4b13 ldr r3, [pc, #76] ; (800ef64 ) 800ef16: 681b ldr r3, [r3, #0] 800ef18: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 800ef1c: f003 0301 and.w r3, r3, #1 800ef20: 2b00 cmp r3, #0 800ef22: d012 beq.n 800ef4a 800ef24: 4b0f ldr r3, [pc, #60] ; (800ef64 ) 800ef26: 681b ldr r3, [r3, #0] 800ef28: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 800ef2c: f003 0304 and.w r3, r3, #4 800ef30: 2b00 cmp r3, #0 800ef32: d00a beq.n 800ef4a ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) { 800ef34: 4b0b ldr r3, [pc, #44] ; (800ef64 ) 800ef36: 681b ldr r3, [r3, #0] 800ef38: 3304 adds r3, #4 800ef3a: 681b ldr r3, [r3, #0] if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || 800ef3c: 2b00 cmp r3, #0 800ef3e: d004 beq.n 800ef4a ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) { 800ef40: 687b ldr r3, [r7, #4] 800ef42: 681b ldr r3, [r3, #0] 800ef44: b2db uxtb r3, r3 800ef46: 2b7f cmp r3, #127 ; 0x7f 800ef48: d101 bne.n 800ef4e 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; 800ef4a: 2300 movs r3, #0 800ef4c: e001 b.n 800ef52 } return netif_default; 800ef4e: 4b05 ldr r3, [pc, #20] ; (800ef64 ) 800ef50: 681b ldr r3, [r3, #0] } 800ef52: 4618 mov r0, r3 800ef54: 3714 adds r7, #20 800ef56: 46bd mov sp, r7 800ef58: f85d 7b04 ldr.w r7, [sp], #4 800ef5c: 4770 bx lr 800ef5e: bf00 nop 800ef60: 24007b60 .word 0x24007b60 800ef64: 24007b64 .word 0x24007b64 0800ef68 : #endif /* IP_FORWARD */ /** Return true if the current input packet should be accepted on this netif */ static int ip4_input_accept(struct netif *netif) { 800ef68: b580 push {r7, lr} 800ef6a: b082 sub sp, #8 800ef6c: af00 add r7, sp, #0 800ef6e: 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)))) { 800ef70: 687b ldr r3, [r7, #4] 800ef72: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 800ef76: f003 0301 and.w r3, r3, #1 800ef7a: b2db uxtb r3, r3 800ef7c: 2b00 cmp r3, #0 800ef7e: d016 beq.n 800efae 800ef80: 687b ldr r3, [r7, #4] 800ef82: 3304 adds r3, #4 800ef84: 681b ldr r3, [r3, #0] 800ef86: 2b00 cmp r3, #0 800ef88: d011 beq.n 800efae /* unicast to this interface address? */ if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || 800ef8a: 4b0b ldr r3, [pc, #44] ; (800efb8 ) 800ef8c: 695a ldr r2, [r3, #20] 800ef8e: 687b ldr r3, [r7, #4] 800ef90: 3304 adds r3, #4 800ef92: 681b ldr r3, [r3, #0] 800ef94: 429a cmp r2, r3 800ef96: d008 beq.n 800efaa /* or broadcast on this interface network address? */ ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) 800ef98: 4b07 ldr r3, [pc, #28] ; (800efb8 ) 800ef9a: 695b ldr r3, [r3, #20] 800ef9c: 6879 ldr r1, [r7, #4] 800ef9e: 4618 mov r0, r3 800efa0: f000 fa08 bl 800f3b4 800efa4: 4603 mov r3, r0 if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || 800efa6: 2b00 cmp r3, #0 800efa8: d001 beq.n 800efae #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; 800efaa: 2301 movs r3, #1 800efac: e000 b.n 800efb0 /* accept on this netif */ return 1; } #endif /* LWIP_AUTOIP */ } return 0; 800efae: 2300 movs r3, #0 } 800efb0: 4618 mov r0, r3 800efb2: 3708 adds r7, #8 800efb4: 46bd mov sp, r7 800efb6: bd80 pop {r7, pc} 800efb8: 24004c10 .word 0x24004c10 0800efbc : * @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) { 800efbc: b580 push {r7, lr} 800efbe: b086 sub sp, #24 800efc0: af00 add r7, sp, #0 800efc2: 6078 str r0, [r7, #4] 800efc4: 6039 str r1, [r7, #0] IP_STATS_INC(ip.recv); MIB2_STATS_INC(mib2.ipinreceives); /* identify the IP header */ iphdr = (struct ip_hdr *)p->payload; 800efc6: 687b ldr r3, [r7, #4] 800efc8: 685b ldr r3, [r3, #4] 800efca: 613b str r3, [r7, #16] if (IPH_V(iphdr) != 4) { 800efcc: 693b ldr r3, [r7, #16] 800efce: 781b ldrb r3, [r3, #0] 800efd0: 091b lsrs r3, r3, #4 800efd2: b2db uxtb r3, r3 800efd4: 2b04 cmp r3, #4 800efd6: d004 beq.n 800efe2 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); 800efd8: 6878 ldr r0, [r7, #4] 800efda: f7f7 fffb bl 8006fd4 IP_STATS_INC(ip.err); IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipinhdrerrors); return ERR_OK; 800efde: 2300 movs r3, #0 800efe0: e107 b.n 800f1f2 return ERR_OK; } #endif /* obtain IP header length in bytes */ iphdr_hlen = IPH_HL_BYTES(iphdr); 800efe2: 693b ldr r3, [r7, #16] 800efe4: 781b ldrb r3, [r3, #0] 800efe6: f003 030f and.w r3, r3, #15 800efea: b2db uxtb r3, r3 800efec: 009b lsls r3, r3, #2 800efee: b2db uxtb r3, r3 800eff0: 81fb strh r3, [r7, #14] /* obtain ip length in bytes */ iphdr_len = lwip_ntohs(IPH_LEN(iphdr)); 800eff2: 693b ldr r3, [r7, #16] 800eff4: 885b ldrh r3, [r3, #2] 800eff6: b29b uxth r3, r3 800eff8: 4618 mov r0, r3 800effa: f7f6 faa7 bl 800554c 800effe: 4603 mov r3, r0 800f000: 81bb strh r3, [r7, #12] /* Trim pbuf. This is especially required for packets < 60 bytes. */ if (iphdr_len < p->tot_len) { 800f002: 687b ldr r3, [r7, #4] 800f004: 891b ldrh r3, [r3, #8] 800f006: 89ba ldrh r2, [r7, #12] 800f008: 429a cmp r2, r3 800f00a: d204 bcs.n 800f016 pbuf_realloc(p, iphdr_len); 800f00c: 89bb ldrh r3, [r7, #12] 800f00e: 4619 mov r1, r3 800f010: 6878 ldr r0, [r7, #4] 800f012: f7f7 fe59 bl 8006cc8 } /* 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)) { 800f016: 687b ldr r3, [r7, #4] 800f018: 895b ldrh r3, [r3, #10] 800f01a: 89fa ldrh r2, [r7, #14] 800f01c: 429a cmp r2, r3 800f01e: d807 bhi.n 800f030 800f020: 687b ldr r3, [r7, #4] 800f022: 891b ldrh r3, [r3, #8] 800f024: 89ba ldrh r2, [r7, #12] 800f026: 429a cmp r2, r3 800f028: d802 bhi.n 800f030 800f02a: 89fb ldrh r3, [r7, #14] 800f02c: 2b13 cmp r3, #19 800f02e: d804 bhi.n 800f03a 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); 800f030: 6878 ldr r0, [r7, #4] 800f032: f7f7 ffcf bl 8006fd4 IP_STATS_INC(ip.lenerr); IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipindiscards); return ERR_OK; 800f036: 2300 movs r3, #0 800f038: e0db b.n 800f1f2 } } #endif /* copy IP addresses to aligned ip_addr_t */ ip_addr_copy_from_ip4(ip_data.current_iphdr_dest, iphdr->dest); 800f03a: 693b ldr r3, [r7, #16] 800f03c: 691b ldr r3, [r3, #16] 800f03e: 4a6f ldr r2, [pc, #444] ; (800f1fc ) 800f040: 6153 str r3, [r2, #20] ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src); 800f042: 693b ldr r3, [r7, #16] 800f044: 68db ldr r3, [r3, #12] 800f046: 4a6d ldr r2, [pc, #436] ; (800f1fc ) 800f048: 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())) { 800f04a: 4b6c ldr r3, [pc, #432] ; (800f1fc ) 800f04c: 695b ldr r3, [r3, #20] 800f04e: f003 03f0 and.w r3, r3, #240 ; 0xf0 800f052: 2be0 cmp r3, #224 ; 0xe0 800f054: d112 bne.n 800f07c netif = inp; } else { netif = NULL; } #else /* LWIP_IGMP */ if ((netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) { 800f056: 683b ldr r3, [r7, #0] 800f058: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 800f05c: f003 0301 and.w r3, r3, #1 800f060: b2db uxtb r3, r3 800f062: 2b00 cmp r3, #0 800f064: d007 beq.n 800f076 800f066: 683b ldr r3, [r7, #0] 800f068: 3304 adds r3, #4 800f06a: 681b ldr r3, [r3, #0] 800f06c: 2b00 cmp r3, #0 800f06e: d002 beq.n 800f076 netif = inp; 800f070: 683b ldr r3, [r7, #0] 800f072: 617b str r3, [r7, #20] 800f074: e02a b.n 800f0cc } else { netif = NULL; 800f076: 2300 movs r3, #0 800f078: 617b str r3, [r7, #20] 800f07a: e027 b.n 800f0cc } #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)) { 800f07c: 6838 ldr r0, [r7, #0] 800f07e: f7ff ff73 bl 800ef68 800f082: 4603 mov r3, r0 800f084: 2b00 cmp r3, #0 800f086: d002 beq.n 800f08e netif = inp; 800f088: 683b ldr r3, [r7, #0] 800f08a: 617b str r3, [r7, #20] 800f08c: e01e b.n 800f0cc } else { netif = NULL; 800f08e: 2300 movs r3, #0 800f090: 617b str r3, [r7, #20] #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())) 800f092: 4b5a ldr r3, [pc, #360] ; (800f1fc ) 800f094: 695b ldr r3, [r3, #20] 800f096: b2db uxtb r3, r3 800f098: 2b7f cmp r3, #127 ; 0x7f 800f09a: d017 beq.n 800f0cc #endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */ { #if !LWIP_SINGLE_NETIF NETIF_FOREACH(netif) { 800f09c: 4b58 ldr r3, [pc, #352] ; (800f200 ) 800f09e: 681b ldr r3, [r3, #0] 800f0a0: 617b str r3, [r7, #20] 800f0a2: e00e b.n 800f0c2 if (netif == inp) { 800f0a4: 697a ldr r2, [r7, #20] 800f0a6: 683b ldr r3, [r7, #0] 800f0a8: 429a cmp r2, r3 800f0aa: d006 beq.n 800f0ba /* we checked that before already */ continue; } if (ip4_input_accept(netif)) { 800f0ac: 6978 ldr r0, [r7, #20] 800f0ae: f7ff ff5b bl 800ef68 800f0b2: 4603 mov r3, r0 800f0b4: 2b00 cmp r3, #0 800f0b6: d108 bne.n 800f0ca 800f0b8: e000 b.n 800f0bc continue; 800f0ba: bf00 nop NETIF_FOREACH(netif) { 800f0bc: 697b ldr r3, [r7, #20] 800f0be: 681b ldr r3, [r3, #0] 800f0c0: 617b str r3, [r7, #20] 800f0c2: 697b ldr r3, [r7, #20] 800f0c4: 2b00 cmp r3, #0 800f0c6: d1ed bne.n 800f0a4 800f0c8: e000 b.n 800f0cc break; 800f0ca: bf00 nop && !ip4_addr_isany_val(*ip4_current_src_addr()) #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ ) #endif /* LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING */ { if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) || 800f0cc: 4b4b ldr r3, [pc, #300] ; (800f1fc ) 800f0ce: 691b ldr r3, [r3, #16] 800f0d0: 6839 ldr r1, [r7, #0] 800f0d2: 4618 mov r0, r3 800f0d4: f000 f96e bl 800f3b4 800f0d8: 4603 mov r3, r0 800f0da: 2b00 cmp r3, #0 800f0dc: d105 bne.n 800f0ea (ip4_addr_ismulticast(ip4_current_src_addr()))) { 800f0de: 4b47 ldr r3, [pc, #284] ; (800f1fc ) 800f0e0: 691b ldr r3, [r3, #16] 800f0e2: f003 03f0 and.w r3, r3, #240 ; 0xf0 if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) || 800f0e6: 2be0 cmp r3, #224 ; 0xe0 800f0e8: d104 bne.n 800f0f4 /* 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); 800f0ea: 6878 ldr r0, [r7, #4] 800f0ec: f7f7 ff72 bl 8006fd4 IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipinaddrerrors); MIB2_STATS_INC(mib2.ipindiscards); return ERR_OK; 800f0f0: 2300 movs r3, #0 800f0f2: e07e b.n 800f1f2 } } /* packet not for us? */ if (netif == NULL) { 800f0f4: 697b ldr r3, [r7, #20] 800f0f6: 2b00 cmp r3, #0 800f0f8: d104 bne.n 800f104 { IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipinaddrerrors); MIB2_STATS_INC(mib2.ipindiscards); } pbuf_free(p); 800f0fa: 6878 ldr r0, [r7, #4] 800f0fc: f7f7 ff6a bl 8006fd4 return ERR_OK; 800f100: 2300 movs r3, #0 800f102: e076 b.n 800f1f2 } /* packet consists of multiple fragments? */ if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { 800f104: 693b ldr r3, [r7, #16] 800f106: 88db ldrh r3, [r3, #6] 800f108: b29b uxth r3, r3 800f10a: 461a mov r2, r3 800f10c: f64f 733f movw r3, #65343 ; 0xff3f 800f110: 4013 ands r3, r2 800f112: 2b00 cmp r3, #0 800f114: d00b beq.n 800f12e #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); 800f116: 6878 ldr r0, [r7, #4] 800f118: f000 fc92 bl 800fa40 800f11c: 6078 str r0, [r7, #4] /* packet not fully reassembled yet? */ if (p == NULL) { 800f11e: 687b ldr r3, [r7, #4] 800f120: 2b00 cmp r3, #0 800f122: d101 bne.n 800f128 return ERR_OK; 800f124: 2300 movs r3, #0 800f126: e064 b.n 800f1f2 } iphdr = (const struct ip_hdr *)p->payload; 800f128: 687b ldr r3, [r7, #4] 800f12a: 685b ldr r3, [r3, #4] 800f12c: 613b str r3, [r7, #16] /* 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; 800f12e: 4a33 ldr r2, [pc, #204] ; (800f1fc ) 800f130: 697b ldr r3, [r7, #20] 800f132: 6013 str r3, [r2, #0] ip_data.current_input_netif = inp; 800f134: 4a31 ldr r2, [pc, #196] ; (800f1fc ) 800f136: 683b ldr r3, [r7, #0] 800f138: 6053 str r3, [r2, #4] ip_data.current_ip4_header = iphdr; 800f13a: 4a30 ldr r2, [pc, #192] ; (800f1fc ) 800f13c: 693b ldr r3, [r7, #16] 800f13e: 6093 str r3, [r2, #8] ip_data.current_ip_header_tot_len = IPH_HL_BYTES(iphdr); 800f140: 693b ldr r3, [r7, #16] 800f142: 781b ldrb r3, [r3, #0] 800f144: f003 030f and.w r3, r3, #15 800f148: b2db uxtb r3, r3 800f14a: 009b lsls r3, r3, #2 800f14c: b2db uxtb r3, r3 800f14e: b29a uxth r2, r3 800f150: 4b2a ldr r3, [pc, #168] ; (800f1fc ) 800f152: 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. */ 800f154: 89fb ldrh r3, [r7, #14] 800f156: 4619 mov r1, r3 800f158: 6878 ldr r0, [r7, #4] 800f15a: f7f7 feb5 bl 8006ec8 switch (IPH_PROTO(iphdr)) { 800f15e: 693b ldr r3, [r7, #16] 800f160: 7a5b ldrb r3, [r3, #9] 800f162: 2b11 cmp r3, #17 800f164: d006 beq.n 800f174 800f166: 2b11 cmp r3, #17 800f168: dc13 bgt.n 800f192 800f16a: 2b01 cmp r3, #1 800f16c: d00c beq.n 800f188 800f16e: 2b06 cmp r3, #6 800f170: d005 beq.n 800f17e 800f172: e00e b.n 800f192 case IP_PROTO_UDP: #if LWIP_UDPLITE case IP_PROTO_UDPLITE: #endif /* LWIP_UDPLITE */ MIB2_STATS_INC(mib2.ipindelivers); udp_input(p, inp); 800f174: 6839 ldr r1, [r7, #0] 800f176: 6878 ldr r0, [r7, #4] 800f178: f7fe fb7e bl 800d878 break; 800f17c: e026 b.n 800f1cc #endif /* LWIP_UDP */ #if LWIP_TCP case IP_PROTO_TCP: MIB2_STATS_INC(mib2.ipindelivers); tcp_input(p, inp); 800f17e: 6839 ldr r1, [r7, #0] 800f180: 6878 ldr r0, [r7, #4] 800f182: f7f9 ff33 bl 8008fec break; 800f186: e021 b.n 800f1cc #endif /* LWIP_TCP */ #if LWIP_ICMP case IP_PROTO_ICMP: MIB2_STATS_INC(mib2.ipindelivers); icmp_input(p, inp); 800f188: 6839 ldr r1, [r7, #0] 800f18a: 6878 ldr r0, [r7, #4] 800f18c: f7ff fc32 bl 800e9f4 break; 800f190: e01c b.n 800f1cc } 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) && 800f192: 4b1a ldr r3, [pc, #104] ; (800f1fc ) 800f194: 695b ldr r3, [r3, #20] 800f196: 6979 ldr r1, [r7, #20] 800f198: 4618 mov r0, r3 800f19a: f000 f90b bl 800f3b4 800f19e: 4603 mov r3, r0 800f1a0: 2b00 cmp r3, #0 800f1a2: d10f bne.n 800f1c4 !ip4_addr_ismulticast(ip4_current_dest_addr())) { 800f1a4: 4b15 ldr r3, [pc, #84] ; (800f1fc ) 800f1a6: 695b ldr r3, [r3, #20] 800f1a8: f003 03f0 and.w r3, r3, #240 ; 0xf0 if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) && 800f1ac: 2be0 cmp r3, #224 ; 0xe0 800f1ae: d009 beq.n 800f1c4 pbuf_header_force(p, (s16_t)iphdr_hlen); /* Move to ip header, no check necessary. */ 800f1b0: f9b7 300e ldrsh.w r3, [r7, #14] 800f1b4: 4619 mov r1, r3 800f1b6: 6878 ldr r0, [r7, #4] 800f1b8: f7f7 fef9 bl 8006fae icmp_dest_unreach(p, ICMP_DUR_PROTO); 800f1bc: 2102 movs r1, #2 800f1be: 6878 ldr r0, [r7, #4] 800f1c0: f7ff fd8e bl 800ece0 IP_STATS_INC(ip.proterr); IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipinunknownprotos); } pbuf_free(p); 800f1c4: 6878 ldr r0, [r7, #4] 800f1c6: f7f7 ff05 bl 8006fd4 break; 800f1ca: bf00 nop } } /* @todo: this is not really necessary... */ ip_data.current_netif = NULL; 800f1cc: 4b0b ldr r3, [pc, #44] ; (800f1fc ) 800f1ce: 2200 movs r2, #0 800f1d0: 601a str r2, [r3, #0] ip_data.current_input_netif = NULL; 800f1d2: 4b0a ldr r3, [pc, #40] ; (800f1fc ) 800f1d4: 2200 movs r2, #0 800f1d6: 605a str r2, [r3, #4] ip_data.current_ip4_header = NULL; 800f1d8: 4b08 ldr r3, [pc, #32] ; (800f1fc ) 800f1da: 2200 movs r2, #0 800f1dc: 609a str r2, [r3, #8] ip_data.current_ip_header_tot_len = 0; 800f1de: 4b07 ldr r3, [pc, #28] ; (800f1fc ) 800f1e0: 2200 movs r2, #0 800f1e2: 819a strh r2, [r3, #12] ip4_addr_set_any(ip4_current_src_addr()); 800f1e4: 4b05 ldr r3, [pc, #20] ; (800f1fc ) 800f1e6: 2200 movs r2, #0 800f1e8: 611a str r2, [r3, #16] ip4_addr_set_any(ip4_current_dest_addr()); 800f1ea: 4b04 ldr r3, [pc, #16] ; (800f1fc ) 800f1ec: 2200 movs r2, #0 800f1ee: 615a str r2, [r3, #20] return ERR_OK; 800f1f0: 2300 movs r3, #0 } 800f1f2: 4618 mov r0, r3 800f1f4: 3718 adds r7, #24 800f1f6: 46bd mov sp, r7 800f1f8: bd80 pop {r7, pc} 800f1fa: bf00 nop 800f1fc: 24004c10 .word 0x24004c10 800f200: 24007b60 .word 0x24007b60 0800f204 : */ 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) { 800f204: b580 push {r7, lr} 800f206: b08a sub sp, #40 ; 0x28 800f208: af04 add r7, sp, #16 800f20a: 60f8 str r0, [r7, #12] 800f20c: 60b9 str r1, [r7, #8] 800f20e: 607a str r2, [r7, #4] 800f210: 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; 800f212: 68bb ldr r3, [r7, #8] 800f214: 617b str r3, [r7, #20] if (dest != LWIP_IP_HDRINCL) { 800f216: 687b ldr r3, [r7, #4] 800f218: 2b00 cmp r3, #0 800f21a: d009 beq.n 800f230 if (ip4_addr_isany(src)) { 800f21c: 68bb ldr r3, [r7, #8] 800f21e: 2b00 cmp r3, #0 800f220: d003 beq.n 800f22a 800f222: 68bb ldr r3, [r7, #8] 800f224: 681b ldr r3, [r3, #0] 800f226: 2b00 cmp r3, #0 800f228: d102 bne.n 800f230 src_used = netif_ip4_addr(netif); 800f22a: 6abb ldr r3, [r7, #40] ; 0x28 800f22c: 3304 adds r3, #4 800f22e: 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); 800f230: 78fa ldrb r2, [r7, #3] 800f232: 6abb ldr r3, [r7, #40] ; 0x28 800f234: 9302 str r3, [sp, #8] 800f236: f897 3024 ldrb.w r3, [r7, #36] ; 0x24 800f23a: 9301 str r3, [sp, #4] 800f23c: f897 3020 ldrb.w r3, [r7, #32] 800f240: 9300 str r3, [sp, #0] 800f242: 4613 mov r3, r2 800f244: 687a ldr r2, [r7, #4] 800f246: 6979 ldr r1, [r7, #20] 800f248: 68f8 ldr r0, [r7, #12] 800f24a: f000 f805 bl 800f258 800f24e: 4603 mov r3, r0 #endif /* IP_OPTIONS_SEND */ } 800f250: 4618 mov r0, r3 800f252: 3718 adds r7, #24 800f254: 46bd mov sp, r7 800f256: bd80 pop {r7, pc} 0800f258 : */ 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) { 800f258: b580 push {r7, lr} 800f25a: b088 sub sp, #32 800f25c: af00 add r7, sp, #0 800f25e: 60f8 str r0, [r7, #12] 800f260: 60b9 str r1, [r7, #8] 800f262: 607a str r2, [r7, #4] 800f264: 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); 800f266: 68fb ldr r3, [r7, #12] 800f268: 7b9b ldrb r3, [r3, #14] 800f26a: 2b01 cmp r3, #1 800f26c: d006 beq.n 800f27c 800f26e: 4b4b ldr r3, [pc, #300] ; (800f39c ) 800f270: f44f 7255 mov.w r2, #852 ; 0x354 800f274: 494a ldr r1, [pc, #296] ; (800f3a0 ) 800f276: 484b ldr r0, [pc, #300] ; (800f3a4 ) 800f278: f001 fca6 bl 8010bc8 MIB2_STATS_INC(mib2.ipoutrequests); /* Should the IP header be generated or is it already included in p? */ if (dest != LWIP_IP_HDRINCL) { 800f27c: 687b ldr r3, [r7, #4] 800f27e: 2b00 cmp r3, #0 800f280: d060 beq.n 800f344 u16_t ip_hlen = IP_HLEN; 800f282: 2314 movs r3, #20 800f284: 837b strh r3, [r7, #26] } #endif /* CHECKSUM_GEN_IP_INLINE */ } #endif /* IP_OPTIONS_SEND */ /* generate IP header */ if (pbuf_add_header(p, IP_HLEN)) { 800f286: 2114 movs r1, #20 800f288: 68f8 ldr r0, [r7, #12] 800f28a: f7f7 fe0d bl 8006ea8 800f28e: 4603 mov r3, r0 800f290: 2b00 cmp r3, #0 800f292: d002 beq.n 800f29a 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; 800f294: f06f 0301 mvn.w r3, #1 800f298: e07c b.n 800f394 } iphdr = (struct ip_hdr *)p->payload; 800f29a: 68fb ldr r3, [r7, #12] 800f29c: 685b ldr r3, [r3, #4] 800f29e: 61fb str r3, [r7, #28] LWIP_ASSERT("check that first pbuf can hold struct ip_hdr", 800f2a0: 68fb ldr r3, [r7, #12] 800f2a2: 895b ldrh r3, [r3, #10] 800f2a4: 2b13 cmp r3, #19 800f2a6: d806 bhi.n 800f2b6 800f2a8: 4b3c ldr r3, [pc, #240] ; (800f39c ) 800f2aa: f44f 7262 mov.w r2, #904 ; 0x388 800f2ae: 493e ldr r1, [pc, #248] ; (800f3a8 ) 800f2b0: 483c ldr r0, [pc, #240] ; (800f3a4 ) 800f2b2: f001 fc89 bl 8010bc8 (p->len >= sizeof(struct ip_hdr))); IPH_TTL_SET(iphdr, ttl); 800f2b6: 69fb ldr r3, [r7, #28] 800f2b8: 78fa ldrb r2, [r7, #3] 800f2ba: 721a strb r2, [r3, #8] IPH_PROTO_SET(iphdr, proto); 800f2bc: 69fb ldr r3, [r7, #28] 800f2be: f897 202c ldrb.w r2, [r7, #44] ; 0x2c 800f2c2: 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); 800f2c4: 687b ldr r3, [r7, #4] 800f2c6: 681a ldr r2, [r3, #0] 800f2c8: 69fb ldr r3, [r7, #28] 800f2ca: 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); 800f2cc: 8b7b ldrh r3, [r7, #26] 800f2ce: 089b lsrs r3, r3, #2 800f2d0: b29b uxth r3, r3 800f2d2: b2db uxtb r3, r3 800f2d4: f043 0340 orr.w r3, r3, #64 ; 0x40 800f2d8: b2da uxtb r2, r3 800f2da: 69fb ldr r3, [r7, #28] 800f2dc: 701a strb r2, [r3, #0] IPH_TOS_SET(iphdr, tos); 800f2de: 69fb ldr r3, [r7, #28] 800f2e0: f897 2028 ldrb.w r2, [r7, #40] ; 0x28 800f2e4: 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)); 800f2e6: 68fb ldr r3, [r7, #12] 800f2e8: 891b ldrh r3, [r3, #8] 800f2ea: 4618 mov r0, r3 800f2ec: f7f6 f92e bl 800554c 800f2f0: 4603 mov r3, r0 800f2f2: 461a mov r2, r3 800f2f4: 69fb ldr r3, [r7, #28] 800f2f6: 805a strh r2, [r3, #2] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_len; #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_OFFSET_SET(iphdr, 0); 800f2f8: 69fb ldr r3, [r7, #28] 800f2fa: 2200 movs r2, #0 800f2fc: 719a strb r2, [r3, #6] 800f2fe: 2200 movs r2, #0 800f300: 71da strb r2, [r3, #7] IPH_ID_SET(iphdr, lwip_htons(ip_id)); 800f302: 4b2a ldr r3, [pc, #168] ; (800f3ac ) 800f304: 881b ldrh r3, [r3, #0] 800f306: 4618 mov r0, r3 800f308: f7f6 f920 bl 800554c 800f30c: 4603 mov r3, r0 800f30e: 461a mov r2, r3 800f310: 69fb ldr r3, [r7, #28] 800f312: 809a strh r2, [r3, #4] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_id; #endif /* CHECKSUM_GEN_IP_INLINE */ ++ip_id; 800f314: 4b25 ldr r3, [pc, #148] ; (800f3ac ) 800f316: 881b ldrh r3, [r3, #0] 800f318: 3301 adds r3, #1 800f31a: b29a uxth r2, r3 800f31c: 4b23 ldr r3, [pc, #140] ; (800f3ac ) 800f31e: 801a strh r2, [r3, #0] if (src == NULL) { 800f320: 68bb ldr r3, [r7, #8] 800f322: 2b00 cmp r3, #0 800f324: d104 bne.n 800f330 ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4); 800f326: 4b22 ldr r3, [pc, #136] ; (800f3b0 ) 800f328: 681a ldr r2, [r3, #0] 800f32a: 69fb ldr r3, [r7, #28] 800f32c: 60da str r2, [r3, #12] 800f32e: e003 b.n 800f338 } else { /* src cannot be NULL here */ ip4_addr_copy(iphdr->src, *src); 800f330: 68bb ldr r3, [r7, #8] 800f332: 681a ldr r2, [r3, #0] 800f334: 69fb ldr r3, [r7, #28] 800f336: 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); 800f338: 69fb ldr r3, [r7, #28] 800f33a: 2200 movs r2, #0 800f33c: 729a strb r2, [r3, #10] 800f33e: 2200 movs r2, #0 800f340: 72da strb r2, [r3, #11] 800f342: e00f b.n 800f364 } #endif /* CHECKSUM_GEN_IP */ #endif /* CHECKSUM_GEN_IP_INLINE */ } else { /* IP header already included in p */ if (p->len < IP_HLEN) { 800f344: 68fb ldr r3, [r7, #12] 800f346: 895b ldrh r3, [r3, #10] 800f348: 2b13 cmp r3, #19 800f34a: d802 bhi.n 800f352 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; 800f34c: f06f 0301 mvn.w r3, #1 800f350: e020 b.n 800f394 } iphdr = (struct ip_hdr *)p->payload; 800f352: 68fb ldr r3, [r7, #12] 800f354: 685b ldr r3, [r3, #4] 800f356: 61fb str r3, [r7, #28] ip4_addr_copy(dest_addr, iphdr->dest); 800f358: 69fb ldr r3, [r7, #28] 800f35a: 691b ldr r3, [r3, #16] 800f35c: 617b str r3, [r7, #20] dest = &dest_addr; 800f35e: f107 0314 add.w r3, r7, #20 800f362: 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)) { 800f364: 6b3b ldr r3, [r7, #48] ; 0x30 800f366: 8c9b ldrh r3, [r3, #36] ; 0x24 800f368: 2b00 cmp r3, #0 800f36a: d00c beq.n 800f386 800f36c: 68fb ldr r3, [r7, #12] 800f36e: 891a ldrh r2, [r3, #8] 800f370: 6b3b ldr r3, [r7, #48] ; 0x30 800f372: 8c9b ldrh r3, [r3, #36] ; 0x24 800f374: 429a cmp r2, r3 800f376: d906 bls.n 800f386 return ip4_frag(p, netif, dest); 800f378: 687a ldr r2, [r7, #4] 800f37a: 6b39 ldr r1, [r7, #48] ; 0x30 800f37c: 68f8 ldr r0, [r7, #12] 800f37e: f000 fd53 bl 800fe28 800f382: 4603 mov r3, r0 800f384: e006 b.n 800f394 } #endif /* IP_FRAG */ LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: call netif->output()\n")); return netif->output(netif, p, dest); 800f386: 6b3b ldr r3, [r7, #48] ; 0x30 800f388: 695b ldr r3, [r3, #20] 800f38a: 687a ldr r2, [r7, #4] 800f38c: 68f9 ldr r1, [r7, #12] 800f38e: 6b38 ldr r0, [r7, #48] ; 0x30 800f390: 4798 blx r3 800f392: 4603 mov r3, r0 } 800f394: 4618 mov r0, r3 800f396: 3720 adds r7, #32 800f398: 46bd mov sp, r7 800f39a: bd80 pop {r7, pc} 800f39c: 08014924 .word 0x08014924 800f3a0: 08014958 .word 0x08014958 800f3a4: 08014964 .word 0x08014964 800f3a8: 0801498c .word 0x0801498c 800f3ac: 24007cc2 .word 0x24007cc2 800f3b0: 08014d94 .word 0x08014d94 0800f3b4 : * @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) { 800f3b4: b480 push {r7} 800f3b6: b085 sub sp, #20 800f3b8: af00 add r7, sp, #0 800f3ba: 6078 str r0, [r7, #4] 800f3bc: 6039 str r1, [r7, #0] ip4_addr_t ipaddr; ip4_addr_set_u32(&ipaddr, addr); 800f3be: 687b ldr r3, [r7, #4] 800f3c0: 60fb str r3, [r7, #12] /* all ones (broadcast) or all zeroes (old skool broadcast) */ if ((~addr == IPADDR_ANY) || 800f3c2: 687b ldr r3, [r7, #4] 800f3c4: f1b3 3fff cmp.w r3, #4294967295 800f3c8: d002 beq.n 800f3d0 800f3ca: 687b ldr r3, [r7, #4] 800f3cc: 2b00 cmp r3, #0 800f3ce: d101 bne.n 800f3d4 (addr == IPADDR_ANY)) { return 1; 800f3d0: 2301 movs r3, #1 800f3d2: e02a b.n 800f42a /* no broadcast support on this network interface? */ } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { 800f3d4: 683b ldr r3, [r7, #0] 800f3d6: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 800f3da: f003 0302 and.w r3, r3, #2 800f3de: 2b00 cmp r3, #0 800f3e0: d101 bne.n 800f3e6 /* the given address cannot be a broadcast address * nor can we check against any broadcast addresses */ return 0; 800f3e2: 2300 movs r3, #0 800f3e4: e021 b.n 800f42a /* address matches network interface address exactly? => no broadcast */ } else if (addr == ip4_addr_get_u32(netif_ip4_addr(netif))) { 800f3e6: 683b ldr r3, [r7, #0] 800f3e8: 3304 adds r3, #4 800f3ea: 681b ldr r3, [r3, #0] 800f3ec: 687a ldr r2, [r7, #4] 800f3ee: 429a cmp r2, r3 800f3f0: d101 bne.n 800f3f6 return 0; 800f3f2: 2300 movs r3, #0 800f3f4: e019 b.n 800f42a /* on the same (sub) network... */ } else if (ip4_addr_netcmp(&ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) 800f3f6: 68fa ldr r2, [r7, #12] 800f3f8: 683b ldr r3, [r7, #0] 800f3fa: 3304 adds r3, #4 800f3fc: 681b ldr r3, [r3, #0] 800f3fe: 405a eors r2, r3 800f400: 683b ldr r3, [r7, #0] 800f402: 3308 adds r3, #8 800f404: 681b ldr r3, [r3, #0] 800f406: 4013 ands r3, r2 800f408: 2b00 cmp r3, #0 800f40a: d10d bne.n 800f428 /* ...and host identifier bits are all ones? =>... */ && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) == 800f40c: 683b ldr r3, [r7, #0] 800f40e: 3308 adds r3, #8 800f410: 681b ldr r3, [r3, #0] 800f412: 43da mvns r2, r3 800f414: 687b ldr r3, [r7, #4] 800f416: 401a ands r2, r3 (IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) { 800f418: 683b ldr r3, [r7, #0] 800f41a: 3308 adds r3, #8 800f41c: 681b ldr r3, [r3, #0] 800f41e: 43db mvns r3, r3 && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) == 800f420: 429a cmp r2, r3 800f422: d101 bne.n 800f428 /* => network broadcast address */ return 1; 800f424: 2301 movs r3, #1 800f426: e000 b.n 800f42a } else { return 0; 800f428: 2300 movs r3, #0 } } 800f42a: 4618 mov r0, r3 800f42c: 3714 adds r7, #20 800f42e: 46bd mov sp, r7 800f430: f85d 7b04 ldr.w r7, [sp], #4 800f434: 4770 bx lr ... 0800f438 : * * Should be called every 1000 msec (defined by IP_TMR_INTERVAL). */ void ip_reass_tmr(void) { 800f438: b580 push {r7, lr} 800f43a: b084 sub sp, #16 800f43c: af00 add r7, sp, #0 struct ip_reassdata *r, *prev = NULL; 800f43e: 2300 movs r3, #0 800f440: 60bb str r3, [r7, #8] r = reassdatagrams; 800f442: 4b12 ldr r3, [pc, #72] ; (800f48c ) 800f444: 681b ldr r3, [r3, #0] 800f446: 60fb str r3, [r7, #12] while (r != NULL) { 800f448: e018 b.n 800f47c /* Decrement the timer. Once it reaches 0, * clean up the incomplete fragment assembly */ if (r->timer > 0) { 800f44a: 68fb ldr r3, [r7, #12] 800f44c: 7fdb ldrb r3, [r3, #31] 800f44e: 2b00 cmp r3, #0 800f450: d00b beq.n 800f46a r->timer--; 800f452: 68fb ldr r3, [r7, #12] 800f454: 7fdb ldrb r3, [r3, #31] 800f456: 3b01 subs r3, #1 800f458: b2da uxtb r2, r3 800f45a: 68fb ldr r3, [r7, #12] 800f45c: 77da strb r2, [r3, #31] LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer dec %"U16_F"\n", (u16_t)r->timer)); prev = r; 800f45e: 68fb ldr r3, [r7, #12] 800f460: 60bb str r3, [r7, #8] r = r->next; 800f462: 68fb ldr r3, [r7, #12] 800f464: 681b ldr r3, [r3, #0] 800f466: 60fb str r3, [r7, #12] 800f468: e008 b.n 800f47c } else { /* reassembly timed out */ struct ip_reassdata *tmp; LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer timed out\n")); tmp = r; 800f46a: 68fb ldr r3, [r7, #12] 800f46c: 607b str r3, [r7, #4] /* get the next pointer before freeing */ r = r->next; 800f46e: 68fb ldr r3, [r7, #12] 800f470: 681b ldr r3, [r3, #0] 800f472: 60fb str r3, [r7, #12] /* free the helper struct and all enqueued pbufs */ ip_reass_free_complete_datagram(tmp, prev); 800f474: 68b9 ldr r1, [r7, #8] 800f476: 6878 ldr r0, [r7, #4] 800f478: f000 f80a bl 800f490 while (r != NULL) { 800f47c: 68fb ldr r3, [r7, #12] 800f47e: 2b00 cmp r3, #0 800f480: d1e3 bne.n 800f44a } } } 800f482: bf00 nop 800f484: bf00 nop 800f486: 3710 adds r7, #16 800f488: 46bd mov sp, r7 800f48a: bd80 pop {r7, pc} 800f48c: 24007cc4 .word 0x24007cc4 0800f490 : * @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) { 800f490: b580 push {r7, lr} 800f492: b088 sub sp, #32 800f494: af00 add r7, sp, #0 800f496: 6078 str r0, [r7, #4] 800f498: 6039 str r1, [r7, #0] u16_t pbufs_freed = 0; 800f49a: 2300 movs r3, #0 800f49c: 83fb strh r3, [r7, #30] u16_t clen; struct pbuf *p; struct ip_reass_helper *iprh; LWIP_ASSERT("prev != ipr", prev != ipr); 800f49e: 683a ldr r2, [r7, #0] 800f4a0: 687b ldr r3, [r7, #4] 800f4a2: 429a cmp r2, r3 800f4a4: d105 bne.n 800f4b2 800f4a6: 4b45 ldr r3, [pc, #276] ; (800f5bc ) 800f4a8: 22ab movs r2, #171 ; 0xab 800f4aa: 4945 ldr r1, [pc, #276] ; (800f5c0 ) 800f4ac: 4845 ldr r0, [pc, #276] ; (800f5c4 ) 800f4ae: f001 fb8b bl 8010bc8 if (prev != NULL) { 800f4b2: 683b ldr r3, [r7, #0] 800f4b4: 2b00 cmp r3, #0 800f4b6: d00a beq.n 800f4ce LWIP_ASSERT("prev->next == ipr", prev->next == ipr); 800f4b8: 683b ldr r3, [r7, #0] 800f4ba: 681b ldr r3, [r3, #0] 800f4bc: 687a ldr r2, [r7, #4] 800f4be: 429a cmp r2, r3 800f4c0: d005 beq.n 800f4ce 800f4c2: 4b3e ldr r3, [pc, #248] ; (800f5bc ) 800f4c4: 22ad movs r2, #173 ; 0xad 800f4c6: 4940 ldr r1, [pc, #256] ; (800f5c8 ) 800f4c8: 483e ldr r0, [pc, #248] ; (800f5c4 ) 800f4ca: f001 fb7d bl 8010bc8 } MIB2_STATS_INC(mib2.ipreasmfails); #if LWIP_ICMP iprh = (struct ip_reass_helper *)ipr->p->payload; 800f4ce: 687b ldr r3, [r7, #4] 800f4d0: 685b ldr r3, [r3, #4] 800f4d2: 685b ldr r3, [r3, #4] 800f4d4: 617b str r3, [r7, #20] if (iprh->start == 0) { 800f4d6: 697b ldr r3, [r7, #20] 800f4d8: 889b ldrh r3, [r3, #4] 800f4da: b29b uxth r3, r3 800f4dc: 2b00 cmp r3, #0 800f4de: d12a bne.n 800f536 /* The first fragment was received, send ICMP time exceeded. */ /* First, de-queue the first pbuf from r->p. */ p = ipr->p; 800f4e0: 687b ldr r3, [r7, #4] 800f4e2: 685b ldr r3, [r3, #4] 800f4e4: 61bb str r3, [r7, #24] ipr->p = iprh->next_pbuf; 800f4e6: 697b ldr r3, [r7, #20] 800f4e8: 681a ldr r2, [r3, #0] 800f4ea: 687b ldr r3, [r7, #4] 800f4ec: 605a str r2, [r3, #4] /* Then, copy the original header into it. */ SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN); 800f4ee: 69bb ldr r3, [r7, #24] 800f4f0: 6858 ldr r0, [r3, #4] 800f4f2: 687b ldr r3, [r7, #4] 800f4f4: 3308 adds r3, #8 800f4f6: 2214 movs r2, #20 800f4f8: 4619 mov r1, r3 800f4fa: f001 fd46 bl 8010f8a icmp_time_exceeded(p, ICMP_TE_FRAG); 800f4fe: 2101 movs r1, #1 800f500: 69b8 ldr r0, [r7, #24] 800f502: f7ff fbfd bl 800ed00 clen = pbuf_clen(p); 800f506: 69b8 ldr r0, [r7, #24] 800f508: f7f7 fdec bl 80070e4 800f50c: 4603 mov r3, r0 800f50e: 827b strh r3, [r7, #18] LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); 800f510: 8bfa ldrh r2, [r7, #30] 800f512: 8a7b ldrh r3, [r7, #18] 800f514: 4413 add r3, r2 800f516: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 800f51a: db05 blt.n 800f528 800f51c: 4b27 ldr r3, [pc, #156] ; (800f5bc ) 800f51e: 22bc movs r2, #188 ; 0xbc 800f520: 492a ldr r1, [pc, #168] ; (800f5cc ) 800f522: 4828 ldr r0, [pc, #160] ; (800f5c4 ) 800f524: f001 fb50 bl 8010bc8 pbufs_freed = (u16_t)(pbufs_freed + clen); 800f528: 8bfa ldrh r2, [r7, #30] 800f52a: 8a7b ldrh r3, [r7, #18] 800f52c: 4413 add r3, r2 800f52e: 83fb strh r3, [r7, #30] pbuf_free(p); 800f530: 69b8 ldr r0, [r7, #24] 800f532: f7f7 fd4f bl 8006fd4 } #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; 800f536: 687b ldr r3, [r7, #4] 800f538: 685b ldr r3, [r3, #4] 800f53a: 61bb str r3, [r7, #24] while (p != NULL) { 800f53c: e01f b.n 800f57e struct pbuf *pcur; iprh = (struct ip_reass_helper *)p->payload; 800f53e: 69bb ldr r3, [r7, #24] 800f540: 685b ldr r3, [r3, #4] 800f542: 617b str r3, [r7, #20] pcur = p; 800f544: 69bb ldr r3, [r7, #24] 800f546: 60fb str r3, [r7, #12] /* get the next pointer before freeing */ p = iprh->next_pbuf; 800f548: 697b ldr r3, [r7, #20] 800f54a: 681b ldr r3, [r3, #0] 800f54c: 61bb str r3, [r7, #24] clen = pbuf_clen(pcur); 800f54e: 68f8 ldr r0, [r7, #12] 800f550: f7f7 fdc8 bl 80070e4 800f554: 4603 mov r3, r0 800f556: 827b strh r3, [r7, #18] LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); 800f558: 8bfa ldrh r2, [r7, #30] 800f55a: 8a7b ldrh r3, [r7, #18] 800f55c: 4413 add r3, r2 800f55e: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 800f562: db05 blt.n 800f570 800f564: 4b15 ldr r3, [pc, #84] ; (800f5bc ) 800f566: 22cc movs r2, #204 ; 0xcc 800f568: 4918 ldr r1, [pc, #96] ; (800f5cc ) 800f56a: 4816 ldr r0, [pc, #88] ; (800f5c4 ) 800f56c: f001 fb2c bl 8010bc8 pbufs_freed = (u16_t)(pbufs_freed + clen); 800f570: 8bfa ldrh r2, [r7, #30] 800f572: 8a7b ldrh r3, [r7, #18] 800f574: 4413 add r3, r2 800f576: 83fb strh r3, [r7, #30] pbuf_free(pcur); 800f578: 68f8 ldr r0, [r7, #12] 800f57a: f7f7 fd2b bl 8006fd4 while (p != NULL) { 800f57e: 69bb ldr r3, [r7, #24] 800f580: 2b00 cmp r3, #0 800f582: d1dc bne.n 800f53e } /* Then, unchain the struct ip_reassdata from the list and free it. */ ip_reass_dequeue_datagram(ipr, prev); 800f584: 6839 ldr r1, [r7, #0] 800f586: 6878 ldr r0, [r7, #4] 800f588: f000 f8c2 bl 800f710 LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed); 800f58c: 4b10 ldr r3, [pc, #64] ; (800f5d0 ) 800f58e: 881b ldrh r3, [r3, #0] 800f590: 8bfa ldrh r2, [r7, #30] 800f592: 429a cmp r2, r3 800f594: d905 bls.n 800f5a2 800f596: 4b09 ldr r3, [pc, #36] ; (800f5bc ) 800f598: 22d2 movs r2, #210 ; 0xd2 800f59a: 490e ldr r1, [pc, #56] ; (800f5d4 ) 800f59c: 4809 ldr r0, [pc, #36] ; (800f5c4 ) 800f59e: f001 fb13 bl 8010bc8 ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - pbufs_freed); 800f5a2: 4b0b ldr r3, [pc, #44] ; (800f5d0 ) 800f5a4: 881a ldrh r2, [r3, #0] 800f5a6: 8bfb ldrh r3, [r7, #30] 800f5a8: 1ad3 subs r3, r2, r3 800f5aa: b29a uxth r2, r3 800f5ac: 4b08 ldr r3, [pc, #32] ; (800f5d0 ) 800f5ae: 801a strh r2, [r3, #0] return pbufs_freed; 800f5b0: 8bfb ldrh r3, [r7, #30] } 800f5b2: 4618 mov r0, r3 800f5b4: 3720 adds r7, #32 800f5b6: 46bd mov sp, r7 800f5b8: bd80 pop {r7, pc} 800f5ba: bf00 nop 800f5bc: 080149bc .word 0x080149bc 800f5c0: 080149f8 .word 0x080149f8 800f5c4: 08014a04 .word 0x08014a04 800f5c8: 08014a2c .word 0x08014a2c 800f5cc: 08014a40 .word 0x08014a40 800f5d0: 24007cc8 .word 0x24007cc8 800f5d4: 08014a60 .word 0x08014a60 0800f5d8 : * (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) { 800f5d8: b580 push {r7, lr} 800f5da: b08a sub sp, #40 ; 0x28 800f5dc: af00 add r7, sp, #0 800f5de: 6078 str r0, [r7, #4] 800f5e0: 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; 800f5e2: 2300 movs r3, #0 800f5e4: 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; 800f5e6: 2300 movs r3, #0 800f5e8: 623b str r3, [r7, #32] prev = NULL; 800f5ea: 2300 movs r3, #0 800f5ec: 61fb str r3, [r7, #28] oldest_prev = NULL; 800f5ee: 2300 movs r3, #0 800f5f0: 61bb str r3, [r7, #24] other_datagrams = 0; 800f5f2: 2300 movs r3, #0 800f5f4: 613b str r3, [r7, #16] r = reassdatagrams; 800f5f6: 4b28 ldr r3, [pc, #160] ; (800f698 ) 800f5f8: 681b ldr r3, [r3, #0] 800f5fa: 627b str r3, [r7, #36] ; 0x24 while (r != NULL) { 800f5fc: e030 b.n 800f660 if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) { 800f5fe: 6a7b ldr r3, [r7, #36] ; 0x24 800f600: 695a ldr r2, [r3, #20] 800f602: 687b ldr r3, [r7, #4] 800f604: 68db ldr r3, [r3, #12] 800f606: 429a cmp r2, r3 800f608: d10c bne.n 800f624 800f60a: 6a7b ldr r3, [r7, #36] ; 0x24 800f60c: 699a ldr r2, [r3, #24] 800f60e: 687b ldr r3, [r7, #4] 800f610: 691b ldr r3, [r3, #16] 800f612: 429a cmp r2, r3 800f614: d106 bne.n 800f624 800f616: 6a7b ldr r3, [r7, #36] ; 0x24 800f618: 899a ldrh r2, [r3, #12] 800f61a: 687b ldr r3, [r7, #4] 800f61c: 889b ldrh r3, [r3, #4] 800f61e: b29b uxth r3, r3 800f620: 429a cmp r2, r3 800f622: d014 beq.n 800f64e /* Not the same datagram as fraghdr */ other_datagrams++; 800f624: 693b ldr r3, [r7, #16] 800f626: 3301 adds r3, #1 800f628: 613b str r3, [r7, #16] if (oldest == NULL) { 800f62a: 6a3b ldr r3, [r7, #32] 800f62c: 2b00 cmp r3, #0 800f62e: d104 bne.n 800f63a oldest = r; 800f630: 6a7b ldr r3, [r7, #36] ; 0x24 800f632: 623b str r3, [r7, #32] oldest_prev = prev; 800f634: 69fb ldr r3, [r7, #28] 800f636: 61bb str r3, [r7, #24] 800f638: e009 b.n 800f64e } else if (r->timer <= oldest->timer) { 800f63a: 6a7b ldr r3, [r7, #36] ; 0x24 800f63c: 7fda ldrb r2, [r3, #31] 800f63e: 6a3b ldr r3, [r7, #32] 800f640: 7fdb ldrb r3, [r3, #31] 800f642: 429a cmp r2, r3 800f644: d803 bhi.n 800f64e /* older than the previous oldest */ oldest = r; 800f646: 6a7b ldr r3, [r7, #36] ; 0x24 800f648: 623b str r3, [r7, #32] oldest_prev = prev; 800f64a: 69fb ldr r3, [r7, #28] 800f64c: 61bb str r3, [r7, #24] } } if (r->next != NULL) { 800f64e: 6a7b ldr r3, [r7, #36] ; 0x24 800f650: 681b ldr r3, [r3, #0] 800f652: 2b00 cmp r3, #0 800f654: d001 beq.n 800f65a prev = r; 800f656: 6a7b ldr r3, [r7, #36] ; 0x24 800f658: 61fb str r3, [r7, #28] } r = r->next; 800f65a: 6a7b ldr r3, [r7, #36] ; 0x24 800f65c: 681b ldr r3, [r3, #0] 800f65e: 627b str r3, [r7, #36] ; 0x24 while (r != NULL) { 800f660: 6a7b ldr r3, [r7, #36] ; 0x24 800f662: 2b00 cmp r3, #0 800f664: d1cb bne.n 800f5fe } if (oldest != NULL) { 800f666: 6a3b ldr r3, [r7, #32] 800f668: 2b00 cmp r3, #0 800f66a: d008 beq.n 800f67e pbufs_freed_current = ip_reass_free_complete_datagram(oldest, oldest_prev); 800f66c: 69b9 ldr r1, [r7, #24] 800f66e: 6a38 ldr r0, [r7, #32] 800f670: f7ff ff0e bl 800f490 800f674: 60f8 str r0, [r7, #12] pbufs_freed += pbufs_freed_current; 800f676: 697a ldr r2, [r7, #20] 800f678: 68fb ldr r3, [r7, #12] 800f67a: 4413 add r3, r2 800f67c: 617b str r3, [r7, #20] } } while ((pbufs_freed < pbufs_needed) && (other_datagrams > 1)); 800f67e: 697a ldr r2, [r7, #20] 800f680: 683b ldr r3, [r7, #0] 800f682: 429a cmp r2, r3 800f684: da02 bge.n 800f68c 800f686: 693b ldr r3, [r7, #16] 800f688: 2b01 cmp r3, #1 800f68a: dcac bgt.n 800f5e6 return pbufs_freed; 800f68c: 697b ldr r3, [r7, #20] } 800f68e: 4618 mov r0, r3 800f690: 3728 adds r7, #40 ; 0x28 800f692: 46bd mov sp, r7 800f694: bd80 pop {r7, pc} 800f696: bf00 nop 800f698: 24007cc4 .word 0x24007cc4 0800f69c : * @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) { 800f69c: b580 push {r7, lr} 800f69e: b084 sub sp, #16 800f6a0: af00 add r7, sp, #0 800f6a2: 6078 str r0, [r7, #4] 800f6a4: 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); 800f6a6: 2004 movs r0, #4 800f6a8: f7f6 fcb8 bl 800601c 800f6ac: 60f8 str r0, [r7, #12] if (ipr == NULL) { 800f6ae: 68fb ldr r3, [r7, #12] 800f6b0: 2b00 cmp r3, #0 800f6b2: d110 bne.n 800f6d6 #if IP_REASS_FREE_OLDEST if (ip_reass_remove_oldest_datagram(fraghdr, clen) >= clen) { 800f6b4: 6839 ldr r1, [r7, #0] 800f6b6: 6878 ldr r0, [r7, #4] 800f6b8: f7ff ff8e bl 800f5d8 800f6bc: 4602 mov r2, r0 800f6be: 683b ldr r3, [r7, #0] 800f6c0: 4293 cmp r3, r2 800f6c2: dc03 bgt.n 800f6cc ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA); 800f6c4: 2004 movs r0, #4 800f6c6: f7f6 fca9 bl 800601c 800f6ca: 60f8 str r0, [r7, #12] } if (ipr == NULL) 800f6cc: 68fb ldr r3, [r7, #12] 800f6ce: 2b00 cmp r3, #0 800f6d0: d101 bne.n 800f6d6 #endif /* IP_REASS_FREE_OLDEST */ { IPFRAG_STATS_INC(ip_frag.memerr); LWIP_DEBUGF(IP_REASS_DEBUG, ("Failed to alloc reassdata struct\n")); return NULL; 800f6d2: 2300 movs r3, #0 800f6d4: e016 b.n 800f704 } } memset(ipr, 0, sizeof(struct ip_reassdata)); 800f6d6: 2220 movs r2, #32 800f6d8: 2100 movs r1, #0 800f6da: 68f8 ldr r0, [r7, #12] 800f6dc: f001 fbd2 bl 8010e84 ipr->timer = IP_REASS_MAXAGE; 800f6e0: 68fb ldr r3, [r7, #12] 800f6e2: 220f movs r2, #15 800f6e4: 77da strb r2, [r3, #31] /* enqueue the new structure to the front of the list */ ipr->next = reassdatagrams; 800f6e6: 4b09 ldr r3, [pc, #36] ; (800f70c ) 800f6e8: 681a ldr r2, [r3, #0] 800f6ea: 68fb ldr r3, [r7, #12] 800f6ec: 601a str r2, [r3, #0] reassdatagrams = ipr; 800f6ee: 4a07 ldr r2, [pc, #28] ; (800f70c ) 800f6f0: 68fb ldr r3, [r7, #12] 800f6f2: 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); 800f6f4: 68fb ldr r3, [r7, #12] 800f6f6: 3308 adds r3, #8 800f6f8: 2214 movs r2, #20 800f6fa: 6879 ldr r1, [r7, #4] 800f6fc: 4618 mov r0, r3 800f6fe: f001 fc44 bl 8010f8a return ipr; 800f702: 68fb ldr r3, [r7, #12] } 800f704: 4618 mov r0, r3 800f706: 3710 adds r7, #16 800f708: 46bd mov sp, r7 800f70a: bd80 pop {r7, pc} 800f70c: 24007cc4 .word 0x24007cc4 0800f710 : * 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) { 800f710: b580 push {r7, lr} 800f712: b082 sub sp, #8 800f714: af00 add r7, sp, #0 800f716: 6078 str r0, [r7, #4] 800f718: 6039 str r1, [r7, #0] /* dequeue the reass struct */ if (reassdatagrams == ipr) { 800f71a: 4b10 ldr r3, [pc, #64] ; (800f75c ) 800f71c: 681b ldr r3, [r3, #0] 800f71e: 687a ldr r2, [r7, #4] 800f720: 429a cmp r2, r3 800f722: d104 bne.n 800f72e /* it was the first in the list */ reassdatagrams = ipr->next; 800f724: 687b ldr r3, [r7, #4] 800f726: 681b ldr r3, [r3, #0] 800f728: 4a0c ldr r2, [pc, #48] ; (800f75c ) 800f72a: 6013 str r3, [r2, #0] 800f72c: e00d b.n 800f74a } else { /* it wasn't the first, so it must have a valid 'prev' */ LWIP_ASSERT("sanity check linked list", prev != NULL); 800f72e: 683b ldr r3, [r7, #0] 800f730: 2b00 cmp r3, #0 800f732: d106 bne.n 800f742 800f734: 4b0a ldr r3, [pc, #40] ; (800f760 ) 800f736: f240 1245 movw r2, #325 ; 0x145 800f73a: 490a ldr r1, [pc, #40] ; (800f764 ) 800f73c: 480a ldr r0, [pc, #40] ; (800f768 ) 800f73e: f001 fa43 bl 8010bc8 prev->next = ipr->next; 800f742: 687b ldr r3, [r7, #4] 800f744: 681a ldr r2, [r3, #0] 800f746: 683b ldr r3, [r7, #0] 800f748: 601a str r2, [r3, #0] } /* now we can free the ip_reassdata struct */ memp_free(MEMP_REASSDATA, ipr); 800f74a: 6879 ldr r1, [r7, #4] 800f74c: 2004 movs r0, #4 800f74e: f7f6 fcd5 bl 80060fc } 800f752: bf00 nop 800f754: 3708 adds r7, #8 800f756: 46bd mov sp, r7 800f758: bd80 pop {r7, pc} 800f75a: bf00 nop 800f75c: 24007cc4 .word 0x24007cc4 800f760: 080149bc .word 0x080149bc 800f764: 08014a84 .word 0x08014a84 800f768: 08014a04 .word 0x08014a04 0800f76c : * @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) { 800f76c: b580 push {r7, lr} 800f76e: b08c sub sp, #48 ; 0x30 800f770: af00 add r7, sp, #0 800f772: 60f8 str r0, [r7, #12] 800f774: 60b9 str r1, [r7, #8] 800f776: 607a str r2, [r7, #4] struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev = NULL; 800f778: 2300 movs r3, #0 800f77a: 62bb str r3, [r7, #40] ; 0x28 struct pbuf *q; u16_t offset, len; u8_t hlen; struct ip_hdr *fraghdr; int valid = 1; 800f77c: 2301 movs r3, #1 800f77e: 623b str r3, [r7, #32] /* Extract length and fragment offset from current fragment */ fraghdr = (struct ip_hdr *)new_p->payload; 800f780: 68bb ldr r3, [r7, #8] 800f782: 685b ldr r3, [r3, #4] 800f784: 61fb str r3, [r7, #28] len = lwip_ntohs(IPH_LEN(fraghdr)); 800f786: 69fb ldr r3, [r7, #28] 800f788: 885b ldrh r3, [r3, #2] 800f78a: b29b uxth r3, r3 800f78c: 4618 mov r0, r3 800f78e: f7f5 fedd bl 800554c 800f792: 4603 mov r3, r0 800f794: 837b strh r3, [r7, #26] hlen = IPH_HL_BYTES(fraghdr); 800f796: 69fb ldr r3, [r7, #28] 800f798: 781b ldrb r3, [r3, #0] 800f79a: f003 030f and.w r3, r3, #15 800f79e: b2db uxtb r3, r3 800f7a0: 009b lsls r3, r3, #2 800f7a2: 767b strb r3, [r7, #25] if (hlen > len) { 800f7a4: 7e7b ldrb r3, [r7, #25] 800f7a6: b29b uxth r3, r3 800f7a8: 8b7a ldrh r2, [r7, #26] 800f7aa: 429a cmp r2, r3 800f7ac: d202 bcs.n 800f7b4 /* invalid datagram */ return IP_REASS_VALIDATE_PBUF_DROPPED; 800f7ae: f04f 33ff mov.w r3, #4294967295 800f7b2: e135 b.n 800fa20 } len = (u16_t)(len - hlen); 800f7b4: 7e7b ldrb r3, [r7, #25] 800f7b6: b29b uxth r3, r3 800f7b8: 8b7a ldrh r2, [r7, #26] 800f7ba: 1ad3 subs r3, r2, r3 800f7bc: 837b strh r3, [r7, #26] offset = IPH_OFFSET_BYTES(fraghdr); 800f7be: 69fb ldr r3, [r7, #28] 800f7c0: 88db ldrh r3, [r3, #6] 800f7c2: b29b uxth r3, r3 800f7c4: 4618 mov r0, r3 800f7c6: f7f5 fec1 bl 800554c 800f7ca: 4603 mov r3, r0 800f7cc: f3c3 030c ubfx r3, r3, #0, #13 800f7d0: b29b uxth r3, r3 800f7d2: 00db lsls r3, r3, #3 800f7d4: 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; 800f7d6: 68bb ldr r3, [r7, #8] 800f7d8: 685b ldr r3, [r3, #4] 800f7da: 62fb str r3, [r7, #44] ; 0x2c iprh->next_pbuf = NULL; 800f7dc: 6afb ldr r3, [r7, #44] ; 0x2c 800f7de: 2200 movs r2, #0 800f7e0: 701a strb r2, [r3, #0] 800f7e2: 2200 movs r2, #0 800f7e4: 705a strb r2, [r3, #1] 800f7e6: 2200 movs r2, #0 800f7e8: 709a strb r2, [r3, #2] 800f7ea: 2200 movs r2, #0 800f7ec: 70da strb r2, [r3, #3] iprh->start = offset; 800f7ee: 6afb ldr r3, [r7, #44] ; 0x2c 800f7f0: 8afa ldrh r2, [r7, #22] 800f7f2: 809a strh r2, [r3, #4] iprh->end = (u16_t)(offset + len); 800f7f4: 8afa ldrh r2, [r7, #22] 800f7f6: 8b7b ldrh r3, [r7, #26] 800f7f8: 4413 add r3, r2 800f7fa: b29a uxth r2, r3 800f7fc: 6afb ldr r3, [r7, #44] ; 0x2c 800f7fe: 80da strh r2, [r3, #6] if (iprh->end < offset) { 800f800: 6afb ldr r3, [r7, #44] ; 0x2c 800f802: 88db ldrh r3, [r3, #6] 800f804: b29b uxth r3, r3 800f806: 8afa ldrh r2, [r7, #22] 800f808: 429a cmp r2, r3 800f80a: d902 bls.n 800f812 /* u16_t overflow, cannot handle this */ return IP_REASS_VALIDATE_PBUF_DROPPED; 800f80c: f04f 33ff mov.w r3, #4294967295 800f810: e106 b.n 800fa20 } /* 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;) { 800f812: 68fb ldr r3, [r7, #12] 800f814: 685b ldr r3, [r3, #4] 800f816: 627b str r3, [r7, #36] ; 0x24 800f818: e068 b.n 800f8ec iprh_tmp = (struct ip_reass_helper *)q->payload; 800f81a: 6a7b ldr r3, [r7, #36] ; 0x24 800f81c: 685b ldr r3, [r3, #4] 800f81e: 613b str r3, [r7, #16] if (iprh->start < iprh_tmp->start) { 800f820: 6afb ldr r3, [r7, #44] ; 0x2c 800f822: 889b ldrh r3, [r3, #4] 800f824: b29a uxth r2, r3 800f826: 693b ldr r3, [r7, #16] 800f828: 889b ldrh r3, [r3, #4] 800f82a: b29b uxth r3, r3 800f82c: 429a cmp r2, r3 800f82e: d235 bcs.n 800f89c /* the new pbuf should be inserted before this */ iprh->next_pbuf = q; 800f830: 6afb ldr r3, [r7, #44] ; 0x2c 800f832: 6a7a ldr r2, [r7, #36] ; 0x24 800f834: 601a str r2, [r3, #0] if (iprh_prev != NULL) { 800f836: 6abb ldr r3, [r7, #40] ; 0x28 800f838: 2b00 cmp r3, #0 800f83a: d020 beq.n 800f87e /* not the fragment with the lowest offset */ #if IP_REASS_CHECK_OVERLAP if ((iprh->start < iprh_prev->end) || (iprh->end > iprh_tmp->start)) { 800f83c: 6afb ldr r3, [r7, #44] ; 0x2c 800f83e: 889b ldrh r3, [r3, #4] 800f840: b29a uxth r2, r3 800f842: 6abb ldr r3, [r7, #40] ; 0x28 800f844: 88db ldrh r3, [r3, #6] 800f846: b29b uxth r3, r3 800f848: 429a cmp r2, r3 800f84a: d307 bcc.n 800f85c 800f84c: 6afb ldr r3, [r7, #44] ; 0x2c 800f84e: 88db ldrh r3, [r3, #6] 800f850: b29a uxth r2, r3 800f852: 693b ldr r3, [r7, #16] 800f854: 889b ldrh r3, [r3, #4] 800f856: b29b uxth r3, r3 800f858: 429a cmp r2, r3 800f85a: d902 bls.n 800f862 /* fragment overlaps with previous or following, throw away */ return IP_REASS_VALIDATE_PBUF_DROPPED; 800f85c: f04f 33ff mov.w r3, #4294967295 800f860: e0de b.n 800fa20 } #endif /* IP_REASS_CHECK_OVERLAP */ iprh_prev->next_pbuf = new_p; 800f862: 6abb ldr r3, [r7, #40] ; 0x28 800f864: 68ba ldr r2, [r7, #8] 800f866: 601a str r2, [r3, #0] if (iprh_prev->end != iprh->start) { 800f868: 6abb ldr r3, [r7, #40] ; 0x28 800f86a: 88db ldrh r3, [r3, #6] 800f86c: b29a uxth r2, r3 800f86e: 6afb ldr r3, [r7, #44] ; 0x2c 800f870: 889b ldrh r3, [r3, #4] 800f872: b29b uxth r3, r3 800f874: 429a cmp r2, r3 800f876: d03d beq.n 800f8f4 /* There is a fragment missing between the current * and the previous fragment */ valid = 0; 800f878: 2300 movs r3, #0 800f87a: 623b str r3, [r7, #32] } #endif /* IP_REASS_CHECK_OVERLAP */ /* fragment with the lowest offset */ ipr->p = new_p; } break; 800f87c: e03a b.n 800f8f4 if (iprh->end > iprh_tmp->start) { 800f87e: 6afb ldr r3, [r7, #44] ; 0x2c 800f880: 88db ldrh r3, [r3, #6] 800f882: b29a uxth r2, r3 800f884: 693b ldr r3, [r7, #16] 800f886: 889b ldrh r3, [r3, #4] 800f888: b29b uxth r3, r3 800f88a: 429a cmp r2, r3 800f88c: d902 bls.n 800f894 return IP_REASS_VALIDATE_PBUF_DROPPED; 800f88e: f04f 33ff mov.w r3, #4294967295 800f892: e0c5 b.n 800fa20 ipr->p = new_p; 800f894: 68fb ldr r3, [r7, #12] 800f896: 68ba ldr r2, [r7, #8] 800f898: 605a str r2, [r3, #4] break; 800f89a: e02b b.n 800f8f4 } else if (iprh->start == iprh_tmp->start) { 800f89c: 6afb ldr r3, [r7, #44] ; 0x2c 800f89e: 889b ldrh r3, [r3, #4] 800f8a0: b29a uxth r2, r3 800f8a2: 693b ldr r3, [r7, #16] 800f8a4: 889b ldrh r3, [r3, #4] 800f8a6: b29b uxth r3, r3 800f8a8: 429a cmp r2, r3 800f8aa: d102 bne.n 800f8b2 /* received the same datagram twice: no need to keep the datagram */ return IP_REASS_VALIDATE_PBUF_DROPPED; 800f8ac: f04f 33ff mov.w r3, #4294967295 800f8b0: e0b6 b.n 800fa20 #if IP_REASS_CHECK_OVERLAP } else if (iprh->start < iprh_tmp->end) { 800f8b2: 6afb ldr r3, [r7, #44] ; 0x2c 800f8b4: 889b ldrh r3, [r3, #4] 800f8b6: b29a uxth r2, r3 800f8b8: 693b ldr r3, [r7, #16] 800f8ba: 88db ldrh r3, [r3, #6] 800f8bc: b29b uxth r3, r3 800f8be: 429a cmp r2, r3 800f8c0: d202 bcs.n 800f8c8 /* overlap: no need to keep the new datagram */ return IP_REASS_VALIDATE_PBUF_DROPPED; 800f8c2: f04f 33ff mov.w r3, #4294967295 800f8c6: e0ab b.n 800fa20 #endif /* IP_REASS_CHECK_OVERLAP */ } else { /* Check if the fragments received so far have no holes. */ if (iprh_prev != NULL) { 800f8c8: 6abb ldr r3, [r7, #40] ; 0x28 800f8ca: 2b00 cmp r3, #0 800f8cc: d009 beq.n 800f8e2 if (iprh_prev->end != iprh_tmp->start) { 800f8ce: 6abb ldr r3, [r7, #40] ; 0x28 800f8d0: 88db ldrh r3, [r3, #6] 800f8d2: b29a uxth r2, r3 800f8d4: 693b ldr r3, [r7, #16] 800f8d6: 889b ldrh r3, [r3, #4] 800f8d8: b29b uxth r3, r3 800f8da: 429a cmp r2, r3 800f8dc: d001 beq.n 800f8e2 /* There is a fragment missing between the current * and the previous fragment */ valid = 0; 800f8de: 2300 movs r3, #0 800f8e0: 623b str r3, [r7, #32] } } } q = iprh_tmp->next_pbuf; 800f8e2: 693b ldr r3, [r7, #16] 800f8e4: 681b ldr r3, [r3, #0] 800f8e6: 627b str r3, [r7, #36] ; 0x24 iprh_prev = iprh_tmp; 800f8e8: 693b ldr r3, [r7, #16] 800f8ea: 62bb str r3, [r7, #40] ; 0x28 for (q = ipr->p; q != NULL;) { 800f8ec: 6a7b ldr r3, [r7, #36] ; 0x24 800f8ee: 2b00 cmp r3, #0 800f8f0: d193 bne.n 800f81a 800f8f2: e000 b.n 800f8f6 break; 800f8f4: bf00 nop } /* If q is NULL, then we made it to the end of the list. Determine what to do now */ if (q == NULL) { 800f8f6: 6a7b ldr r3, [r7, #36] ; 0x24 800f8f8: 2b00 cmp r3, #0 800f8fa: d12d bne.n 800f958 if (iprh_prev != NULL) { 800f8fc: 6abb ldr r3, [r7, #40] ; 0x28 800f8fe: 2b00 cmp r3, #0 800f900: d01c beq.n 800f93c /* 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); 800f902: 6abb ldr r3, [r7, #40] ; 0x28 800f904: 88db ldrh r3, [r3, #6] 800f906: b29a uxth r2, r3 800f908: 6afb ldr r3, [r7, #44] ; 0x2c 800f90a: 889b ldrh r3, [r3, #4] 800f90c: b29b uxth r3, r3 800f90e: 429a cmp r2, r3 800f910: d906 bls.n 800f920 800f912: 4b45 ldr r3, [pc, #276] ; (800fa28 ) 800f914: f44f 72db mov.w r2, #438 ; 0x1b6 800f918: 4944 ldr r1, [pc, #272] ; (800fa2c ) 800f91a: 4845 ldr r0, [pc, #276] ; (800fa30 ) 800f91c: f001 f954 bl 8010bc8 #endif /* IP_REASS_CHECK_OVERLAP */ iprh_prev->next_pbuf = new_p; 800f920: 6abb ldr r3, [r7, #40] ; 0x28 800f922: 68ba ldr r2, [r7, #8] 800f924: 601a str r2, [r3, #0] if (iprh_prev->end != iprh->start) { 800f926: 6abb ldr r3, [r7, #40] ; 0x28 800f928: 88db ldrh r3, [r3, #6] 800f92a: b29a uxth r2, r3 800f92c: 6afb ldr r3, [r7, #44] ; 0x2c 800f92e: 889b ldrh r3, [r3, #4] 800f930: b29b uxth r3, r3 800f932: 429a cmp r2, r3 800f934: d010 beq.n 800f958 valid = 0; 800f936: 2300 movs r3, #0 800f938: 623b str r3, [r7, #32] 800f93a: e00d b.n 800f958 } } else { #if IP_REASS_CHECK_OVERLAP LWIP_ASSERT("no previous fragment, this must be the first fragment!", 800f93c: 68fb ldr r3, [r7, #12] 800f93e: 685b ldr r3, [r3, #4] 800f940: 2b00 cmp r3, #0 800f942: d006 beq.n 800f952 800f944: 4b38 ldr r3, [pc, #224] ; (800fa28 ) 800f946: f44f 72df mov.w r2, #446 ; 0x1be 800f94a: 493a ldr r1, [pc, #232] ; (800fa34 ) 800f94c: 4838 ldr r0, [pc, #224] ; (800fa30 ) 800f94e: f001 f93b bl 8010bc8 ipr->p == NULL); #endif /* IP_REASS_CHECK_OVERLAP */ /* this is the first fragment we ever received for this ip datagram */ ipr->p = new_p; 800f952: 68fb ldr r3, [r7, #12] 800f954: 68ba ldr r2, [r7, #8] 800f956: 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)) { 800f958: 687b ldr r3, [r7, #4] 800f95a: 2b00 cmp r3, #0 800f95c: d105 bne.n 800f96a 800f95e: 68fb ldr r3, [r7, #12] 800f960: 7f9b ldrb r3, [r3, #30] 800f962: f003 0301 and.w r3, r3, #1 800f966: 2b00 cmp r3, #0 800f968: d059 beq.n 800fa1e /* and had no holes so far */ if (valid) { 800f96a: 6a3b ldr r3, [r7, #32] 800f96c: 2b00 cmp r3, #0 800f96e: d04f beq.n 800fa10 /* 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)) { 800f970: 68fb ldr r3, [r7, #12] 800f972: 685b ldr r3, [r3, #4] 800f974: 2b00 cmp r3, #0 800f976: d006 beq.n 800f986 800f978: 68fb ldr r3, [r7, #12] 800f97a: 685b ldr r3, [r3, #4] 800f97c: 685b ldr r3, [r3, #4] 800f97e: 889b ldrh r3, [r3, #4] 800f980: b29b uxth r3, r3 800f982: 2b00 cmp r3, #0 800f984: d002 beq.n 800f98c valid = 0; 800f986: 2300 movs r3, #0 800f988: 623b str r3, [r7, #32] 800f98a: e041 b.n 800fa10 } else { /* and check that there are no holes after this datagram */ iprh_prev = iprh; 800f98c: 6afb ldr r3, [r7, #44] ; 0x2c 800f98e: 62bb str r3, [r7, #40] ; 0x28 q = iprh->next_pbuf; 800f990: 6afb ldr r3, [r7, #44] ; 0x2c 800f992: 681b ldr r3, [r3, #0] 800f994: 627b str r3, [r7, #36] ; 0x24 while (q != NULL) { 800f996: e012 b.n 800f9be iprh = (struct ip_reass_helper *)q->payload; 800f998: 6a7b ldr r3, [r7, #36] ; 0x24 800f99a: 685b ldr r3, [r3, #4] 800f99c: 62fb str r3, [r7, #44] ; 0x2c if (iprh_prev->end != iprh->start) { 800f99e: 6abb ldr r3, [r7, #40] ; 0x28 800f9a0: 88db ldrh r3, [r3, #6] 800f9a2: b29a uxth r2, r3 800f9a4: 6afb ldr r3, [r7, #44] ; 0x2c 800f9a6: 889b ldrh r3, [r3, #4] 800f9a8: b29b uxth r3, r3 800f9aa: 429a cmp r2, r3 800f9ac: d002 beq.n 800f9b4 valid = 0; 800f9ae: 2300 movs r3, #0 800f9b0: 623b str r3, [r7, #32] break; 800f9b2: e007 b.n 800f9c4 } iprh_prev = iprh; 800f9b4: 6afb ldr r3, [r7, #44] ; 0x2c 800f9b6: 62bb str r3, [r7, #40] ; 0x28 q = iprh->next_pbuf; 800f9b8: 6afb ldr r3, [r7, #44] ; 0x2c 800f9ba: 681b ldr r3, [r3, #0] 800f9bc: 627b str r3, [r7, #36] ; 0x24 while (q != NULL) { 800f9be: 6a7b ldr r3, [r7, #36] ; 0x24 800f9c0: 2b00 cmp r3, #0 800f9c2: d1e9 bne.n 800f998 } /* if still valid, all fragments are received * (because to the MF==0 already arrived */ if (valid) { 800f9c4: 6a3b ldr r3, [r7, #32] 800f9c6: 2b00 cmp r3, #0 800f9c8: d022 beq.n 800fa10 LWIP_ASSERT("sanity check", ipr->p != NULL); 800f9ca: 68fb ldr r3, [r7, #12] 800f9cc: 685b ldr r3, [r3, #4] 800f9ce: 2b00 cmp r3, #0 800f9d0: d106 bne.n 800f9e0 800f9d2: 4b15 ldr r3, [pc, #84] ; (800fa28 ) 800f9d4: f240 12df movw r2, #479 ; 0x1df 800f9d8: 4917 ldr r1, [pc, #92] ; (800fa38 ) 800f9da: 4815 ldr r0, [pc, #84] ; (800fa30 ) 800f9dc: f001 f8f4 bl 8010bc8 LWIP_ASSERT("sanity check", 800f9e0: 68fb ldr r3, [r7, #12] 800f9e2: 685b ldr r3, [r3, #4] 800f9e4: 685b ldr r3, [r3, #4] 800f9e6: 6afa ldr r2, [r7, #44] ; 0x2c 800f9e8: 429a cmp r2, r3 800f9ea: d106 bne.n 800f9fa 800f9ec: 4b0e ldr r3, [pc, #56] ; (800fa28 ) 800f9ee: f44f 72f0 mov.w r2, #480 ; 0x1e0 800f9f2: 4911 ldr r1, [pc, #68] ; (800fa38 ) 800f9f4: 480e ldr r0, [pc, #56] ; (800fa30 ) 800f9f6: f001 f8e7 bl 8010bc8 ((struct ip_reass_helper *)ipr->p->payload) != iprh); LWIP_ASSERT("validate_datagram:next_pbuf!=NULL", 800f9fa: 6afb ldr r3, [r7, #44] ; 0x2c 800f9fc: 681b ldr r3, [r3, #0] 800f9fe: 2b00 cmp r3, #0 800fa00: d006 beq.n 800fa10 800fa02: 4b09 ldr r3, [pc, #36] ; (800fa28 ) 800fa04: f44f 72f1 mov.w r2, #482 ; 0x1e2 800fa08: 490c ldr r1, [pc, #48] ; (800fa3c ) 800fa0a: 4809 ldr r0, [pc, #36] ; (800fa30 ) 800fa0c: f001 f8dc bl 8010bc8 } } /* 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; 800fa10: 6a3b ldr r3, [r7, #32] 800fa12: 2b00 cmp r3, #0 800fa14: bf14 ite ne 800fa16: 2301 movne r3, #1 800fa18: 2300 moveq r3, #0 800fa1a: b2db uxtb r3, r3 800fa1c: e000 b.n 800fa20 } /* If we come here, not all fragments were received, yet! */ return IP_REASS_VALIDATE_PBUF_QUEUED; /* not yet valid! */ 800fa1e: 2300 movs r3, #0 } 800fa20: 4618 mov r0, r3 800fa22: 3730 adds r7, #48 ; 0x30 800fa24: 46bd mov sp, r7 800fa26: bd80 pop {r7, pc} 800fa28: 080149bc .word 0x080149bc 800fa2c: 08014aa0 .word 0x08014aa0 800fa30: 08014a04 .word 0x08014a04 800fa34: 08014ac0 .word 0x08014ac0 800fa38: 08014af8 .word 0x08014af8 800fa3c: 08014b08 .word 0x08014b08 0800fa40 : * @param p points to a pbuf chain of the fragment * @return NULL if reassembly is incomplete, ? otherwise */ struct pbuf * ip4_reass(struct pbuf *p) { 800fa40: b580 push {r7, lr} 800fa42: b08e sub sp, #56 ; 0x38 800fa44: af00 add r7, sp, #0 800fa46: 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; 800fa48: 687b ldr r3, [r7, #4] 800fa4a: 685b ldr r3, [r3, #4] 800fa4c: 62bb str r3, [r7, #40] ; 0x28 if (IPH_HL_BYTES(fraghdr) != IP_HLEN) { 800fa4e: 6abb ldr r3, [r7, #40] ; 0x28 800fa50: 781b ldrb r3, [r3, #0] 800fa52: f003 030f and.w r3, r3, #15 800fa56: b2db uxtb r3, r3 800fa58: 009b lsls r3, r3, #2 800fa5a: b2db uxtb r3, r3 800fa5c: 2b14 cmp r3, #20 800fa5e: f040 8171 bne.w 800fd44 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); 800fa62: 6abb ldr r3, [r7, #40] ; 0x28 800fa64: 88db ldrh r3, [r3, #6] 800fa66: b29b uxth r3, r3 800fa68: 4618 mov r0, r3 800fa6a: f7f5 fd6f bl 800554c 800fa6e: 4603 mov r3, r0 800fa70: f3c3 030c ubfx r3, r3, #0, #13 800fa74: b29b uxth r3, r3 800fa76: 00db lsls r3, r3, #3 800fa78: 84fb strh r3, [r7, #38] ; 0x26 len = lwip_ntohs(IPH_LEN(fraghdr)); 800fa7a: 6abb ldr r3, [r7, #40] ; 0x28 800fa7c: 885b ldrh r3, [r3, #2] 800fa7e: b29b uxth r3, r3 800fa80: 4618 mov r0, r3 800fa82: f7f5 fd63 bl 800554c 800fa86: 4603 mov r3, r0 800fa88: 84bb strh r3, [r7, #36] ; 0x24 hlen = IPH_HL_BYTES(fraghdr); 800fa8a: 6abb ldr r3, [r7, #40] ; 0x28 800fa8c: 781b ldrb r3, [r3, #0] 800fa8e: f003 030f and.w r3, r3, #15 800fa92: b2db uxtb r3, r3 800fa94: 009b lsls r3, r3, #2 800fa96: f887 3023 strb.w r3, [r7, #35] ; 0x23 if (hlen > len) { 800fa9a: f897 3023 ldrb.w r3, [r7, #35] ; 0x23 800fa9e: b29b uxth r3, r3 800faa0: 8cba ldrh r2, [r7, #36] ; 0x24 800faa2: 429a cmp r2, r3 800faa4: f0c0 8150 bcc.w 800fd48 /* invalid datagram */ goto nullreturn; } len = (u16_t)(len - hlen); 800faa8: f897 3023 ldrb.w r3, [r7, #35] ; 0x23 800faac: b29b uxth r3, r3 800faae: 8cba ldrh r2, [r7, #36] ; 0x24 800fab0: 1ad3 subs r3, r2, r3 800fab2: 84bb strh r3, [r7, #36] ; 0x24 /* Check if we are allowed to enqueue more datagrams. */ clen = pbuf_clen(p); 800fab4: 6878 ldr r0, [r7, #4] 800fab6: f7f7 fb15 bl 80070e4 800faba: 4603 mov r3, r0 800fabc: 843b strh r3, [r7, #32] if ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) { 800fabe: 4b8c ldr r3, [pc, #560] ; (800fcf0 ) 800fac0: 881b ldrh r3, [r3, #0] 800fac2: 461a mov r2, r3 800fac4: 8c3b ldrh r3, [r7, #32] 800fac6: 4413 add r3, r2 800fac8: 2b0a cmp r3, #10 800faca: dd10 ble.n 800faee #if IP_REASS_FREE_OLDEST if (!ip_reass_remove_oldest_datagram(fraghdr, clen) || 800facc: 8c3b ldrh r3, [r7, #32] 800face: 4619 mov r1, r3 800fad0: 6ab8 ldr r0, [r7, #40] ; 0x28 800fad2: f7ff fd81 bl 800f5d8 800fad6: 4603 mov r3, r0 800fad8: 2b00 cmp r3, #0 800fada: f000 8137 beq.w 800fd4c ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS)) 800fade: 4b84 ldr r3, [pc, #528] ; (800fcf0 ) 800fae0: 881b ldrh r3, [r3, #0] 800fae2: 461a mov r2, r3 800fae4: 8c3b ldrh r3, [r7, #32] 800fae6: 4413 add r3, r2 if (!ip_reass_remove_oldest_datagram(fraghdr, clen) || 800fae8: 2b0a cmp r3, #10 800faea: f300 812f bgt.w 800fd4c } } /* 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) { 800faee: 4b81 ldr r3, [pc, #516] ; (800fcf4 ) 800faf0: 681b ldr r3, [r3, #0] 800faf2: 633b str r3, [r7, #48] ; 0x30 800faf4: e015 b.n 800fb22 /* 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)) { 800faf6: 6b3b ldr r3, [r7, #48] ; 0x30 800faf8: 695a ldr r2, [r3, #20] 800fafa: 6abb ldr r3, [r7, #40] ; 0x28 800fafc: 68db ldr r3, [r3, #12] 800fafe: 429a cmp r2, r3 800fb00: d10c bne.n 800fb1c 800fb02: 6b3b ldr r3, [r7, #48] ; 0x30 800fb04: 699a ldr r2, [r3, #24] 800fb06: 6abb ldr r3, [r7, #40] ; 0x28 800fb08: 691b ldr r3, [r3, #16] 800fb0a: 429a cmp r2, r3 800fb0c: d106 bne.n 800fb1c 800fb0e: 6b3b ldr r3, [r7, #48] ; 0x30 800fb10: 899a ldrh r2, [r3, #12] 800fb12: 6abb ldr r3, [r7, #40] ; 0x28 800fb14: 889b ldrh r3, [r3, #4] 800fb16: b29b uxth r3, r3 800fb18: 429a cmp r2, r3 800fb1a: d006 beq.n 800fb2a for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) { 800fb1c: 6b3b ldr r3, [r7, #48] ; 0x30 800fb1e: 681b ldr r3, [r3, #0] 800fb20: 633b str r3, [r7, #48] ; 0x30 800fb22: 6b3b ldr r3, [r7, #48] ; 0x30 800fb24: 2b00 cmp r3, #0 800fb26: d1e6 bne.n 800faf6 800fb28: e000 b.n 800fb2c 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; 800fb2a: bf00 nop } } if (ipr == NULL) { 800fb2c: 6b3b ldr r3, [r7, #48] ; 0x30 800fb2e: 2b00 cmp r3, #0 800fb30: d109 bne.n 800fb46 /* Enqueue a new datagram into the datagram queue */ ipr = ip_reass_enqueue_new_datagram(fraghdr, clen); 800fb32: 8c3b ldrh r3, [r7, #32] 800fb34: 4619 mov r1, r3 800fb36: 6ab8 ldr r0, [r7, #40] ; 0x28 800fb38: f7ff fdb0 bl 800f69c 800fb3c: 6338 str r0, [r7, #48] ; 0x30 /* Bail if unable to enqueue */ if (ipr == NULL) { 800fb3e: 6b3b ldr r3, [r7, #48] ; 0x30 800fb40: 2b00 cmp r3, #0 800fb42: d11c bne.n 800fb7e goto nullreturn; 800fb44: e105 b.n 800fd52 } } else { if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) && 800fb46: 6abb ldr r3, [r7, #40] ; 0x28 800fb48: 88db ldrh r3, [r3, #6] 800fb4a: b29b uxth r3, r3 800fb4c: 4618 mov r0, r3 800fb4e: f7f5 fcfd bl 800554c 800fb52: 4603 mov r3, r0 800fb54: f3c3 030c ubfx r3, r3, #0, #13 800fb58: 2b00 cmp r3, #0 800fb5a: d110 bne.n 800fb7e ((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) { 800fb5c: 6b3b ldr r3, [r7, #48] ; 0x30 800fb5e: 89db ldrh r3, [r3, #14] 800fb60: 4618 mov r0, r3 800fb62: f7f5 fcf3 bl 800554c 800fb66: 4603 mov r3, r0 800fb68: f3c3 030c ubfx r3, r3, #0, #13 if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) && 800fb6c: 2b00 cmp r3, #0 800fb6e: d006 beq.n 800fb7e /* 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); 800fb70: 6b3b ldr r3, [r7, #48] ; 0x30 800fb72: 3308 adds r3, #8 800fb74: 2214 movs r2, #20 800fb76: 6ab9 ldr r1, [r7, #40] ; 0x28 800fb78: 4618 mov r0, r3 800fb7a: f001 fa06 bl 8010f8a /* 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; 800fb7e: 6abb ldr r3, [r7, #40] ; 0x28 800fb80: 88db ldrh r3, [r3, #6] 800fb82: b29b uxth r3, r3 800fb84: f003 0320 and.w r3, r3, #32 800fb88: 2b00 cmp r3, #0 800fb8a: bf0c ite eq 800fb8c: 2301 moveq r3, #1 800fb8e: 2300 movne r3, #0 800fb90: b2db uxtb r3, r3 800fb92: 61fb str r3, [r7, #28] if (is_last) { 800fb94: 69fb ldr r3, [r7, #28] 800fb96: 2b00 cmp r3, #0 800fb98: d00e beq.n 800fbb8 u16_t datagram_len = (u16_t)(offset + len); 800fb9a: 8cfa ldrh r2, [r7, #38] ; 0x26 800fb9c: 8cbb ldrh r3, [r7, #36] ; 0x24 800fb9e: 4413 add r3, r2 800fba0: 837b strh r3, [r7, #26] if ((datagram_len < offset) || (datagram_len > (0xFFFF - IP_HLEN))) { 800fba2: 8b7a ldrh r2, [r7, #26] 800fba4: 8cfb ldrh r3, [r7, #38] ; 0x26 800fba6: 429a cmp r2, r3 800fba8: f0c0 80a0 bcc.w 800fcec 800fbac: 8b7b ldrh r3, [r7, #26] 800fbae: f64f 72eb movw r2, #65515 ; 0xffeb 800fbb2: 4293 cmp r3, r2 800fbb4: f200 809a bhi.w 800fcec 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); 800fbb8: 69fa ldr r2, [r7, #28] 800fbba: 6879 ldr r1, [r7, #4] 800fbbc: 6b38 ldr r0, [r7, #48] ; 0x30 800fbbe: f7ff fdd5 bl 800f76c 800fbc2: 6178 str r0, [r7, #20] if (valid == IP_REASS_VALIDATE_PBUF_DROPPED) { 800fbc4: 697b ldr r3, [r7, #20] 800fbc6: f1b3 3fff cmp.w r3, #4294967295 800fbca: f000 809b beq.w 800fd04 /* 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); 800fbce: 4b48 ldr r3, [pc, #288] ; (800fcf0 ) 800fbd0: 881a ldrh r2, [r3, #0] 800fbd2: 8c3b ldrh r3, [r7, #32] 800fbd4: 4413 add r3, r2 800fbd6: b29a uxth r2, r3 800fbd8: 4b45 ldr r3, [pc, #276] ; (800fcf0 ) 800fbda: 801a strh r2, [r3, #0] if (is_last) { 800fbdc: 69fb ldr r3, [r7, #28] 800fbde: 2b00 cmp r3, #0 800fbe0: d00d beq.n 800fbfe u16_t datagram_len = (u16_t)(offset + len); 800fbe2: 8cfa ldrh r2, [r7, #38] ; 0x26 800fbe4: 8cbb ldrh r3, [r7, #36] ; 0x24 800fbe6: 4413 add r3, r2 800fbe8: 827b strh r3, [r7, #18] ipr->datagram_len = datagram_len; 800fbea: 6b3b ldr r3, [r7, #48] ; 0x30 800fbec: 8a7a ldrh r2, [r7, #18] 800fbee: 839a strh r2, [r3, #28] ipr->flags |= IP_REASS_FLAG_LASTFRAG; 800fbf0: 6b3b ldr r3, [r7, #48] ; 0x30 800fbf2: 7f9b ldrb r3, [r3, #30] 800fbf4: f043 0301 orr.w r3, r3, #1 800fbf8: b2da uxtb r2, r3 800fbfa: 6b3b ldr r3, [r7, #48] ; 0x30 800fbfc: 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) { 800fbfe: 697b ldr r3, [r7, #20] 800fc00: 2b01 cmp r3, #1 800fc02: d171 bne.n 800fce8 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); 800fc04: 6b3b ldr r3, [r7, #48] ; 0x30 800fc06: 8b9b ldrh r3, [r3, #28] 800fc08: 3314 adds r3, #20 800fc0a: 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; 800fc0c: 6b3b ldr r3, [r7, #48] ; 0x30 800fc0e: 685b ldr r3, [r3, #4] 800fc10: 685b ldr r3, [r3, #4] 800fc12: 681b ldr r3, [r3, #0] 800fc14: 62fb str r3, [r7, #44] ; 0x2c /* copy the original ip header back to the first pbuf */ fraghdr = (struct ip_hdr *)(ipr->p->payload); 800fc16: 6b3b ldr r3, [r7, #48] ; 0x30 800fc18: 685b ldr r3, [r3, #4] 800fc1a: 685b ldr r3, [r3, #4] 800fc1c: 62bb str r3, [r7, #40] ; 0x28 SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN); 800fc1e: 6b3b ldr r3, [r7, #48] ; 0x30 800fc20: 3308 adds r3, #8 800fc22: 2214 movs r2, #20 800fc24: 4619 mov r1, r3 800fc26: 6ab8 ldr r0, [r7, #40] ; 0x28 800fc28: f001 f9af bl 8010f8a IPH_LEN_SET(fraghdr, lwip_htons(datagram_len)); 800fc2c: 8a3b ldrh r3, [r7, #16] 800fc2e: 4618 mov r0, r3 800fc30: f7f5 fc8c bl 800554c 800fc34: 4603 mov r3, r0 800fc36: 461a mov r2, r3 800fc38: 6abb ldr r3, [r7, #40] ; 0x28 800fc3a: 805a strh r2, [r3, #2] IPH_OFFSET_SET(fraghdr, 0); 800fc3c: 6abb ldr r3, [r7, #40] ; 0x28 800fc3e: 2200 movs r2, #0 800fc40: 719a strb r2, [r3, #6] 800fc42: 2200 movs r2, #0 800fc44: 71da strb r2, [r3, #7] IPH_CHKSUM_SET(fraghdr, 0); 800fc46: 6abb ldr r3, [r7, #40] ; 0x28 800fc48: 2200 movs r2, #0 800fc4a: 729a strb r2, [r3, #10] 800fc4c: 2200 movs r2, #0 800fc4e: 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; 800fc50: 6b3b ldr r3, [r7, #48] ; 0x30 800fc52: 685b ldr r3, [r3, #4] 800fc54: 607b str r3, [r7, #4] /* chain together the pbufs contained within the reass_data list. */ while (r != NULL) { 800fc56: e00d b.n 800fc74 iprh = (struct ip_reass_helper *)r->payload; 800fc58: 6afb ldr r3, [r7, #44] ; 0x2c 800fc5a: 685b ldr r3, [r3, #4] 800fc5c: 60fb str r3, [r7, #12] /* hide the ip header for every succeeding fragment */ pbuf_remove_header(r, IP_HLEN); 800fc5e: 2114 movs r1, #20 800fc60: 6af8 ldr r0, [r7, #44] ; 0x2c 800fc62: f7f7 f931 bl 8006ec8 pbuf_cat(p, r); 800fc66: 6af9 ldr r1, [r7, #44] ; 0x2c 800fc68: 6878 ldr r0, [r7, #4] 800fc6a: f7f7 fa75 bl 8007158 r = iprh->next_pbuf; 800fc6e: 68fb ldr r3, [r7, #12] 800fc70: 681b ldr r3, [r3, #0] 800fc72: 62fb str r3, [r7, #44] ; 0x2c while (r != NULL) { 800fc74: 6afb ldr r3, [r7, #44] ; 0x2c 800fc76: 2b00 cmp r3, #0 800fc78: d1ee bne.n 800fc58 } /* find the previous entry in the linked list */ if (ipr == reassdatagrams) { 800fc7a: 4b1e ldr r3, [pc, #120] ; (800fcf4 ) 800fc7c: 681b ldr r3, [r3, #0] 800fc7e: 6b3a ldr r2, [r7, #48] ; 0x30 800fc80: 429a cmp r2, r3 800fc82: d102 bne.n 800fc8a ipr_prev = NULL; 800fc84: 2300 movs r3, #0 800fc86: 637b str r3, [r7, #52] ; 0x34 800fc88: e010 b.n 800fcac } else { for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { 800fc8a: 4b1a ldr r3, [pc, #104] ; (800fcf4 ) 800fc8c: 681b ldr r3, [r3, #0] 800fc8e: 637b str r3, [r7, #52] ; 0x34 800fc90: e007 b.n 800fca2 if (ipr_prev->next == ipr) { 800fc92: 6b7b ldr r3, [r7, #52] ; 0x34 800fc94: 681b ldr r3, [r3, #0] 800fc96: 6b3a ldr r2, [r7, #48] ; 0x30 800fc98: 429a cmp r2, r3 800fc9a: d006 beq.n 800fcaa for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { 800fc9c: 6b7b ldr r3, [r7, #52] ; 0x34 800fc9e: 681b ldr r3, [r3, #0] 800fca0: 637b str r3, [r7, #52] ; 0x34 800fca2: 6b7b ldr r3, [r7, #52] ; 0x34 800fca4: 2b00 cmp r3, #0 800fca6: d1f4 bne.n 800fc92 800fca8: e000 b.n 800fcac break; 800fcaa: bf00 nop } } } /* release the sources allocate for the fragment queue entry */ ip_reass_dequeue_datagram(ipr, ipr_prev); 800fcac: 6b79 ldr r1, [r7, #52] ; 0x34 800fcae: 6b38 ldr r0, [r7, #48] ; 0x30 800fcb0: f7ff fd2e bl 800f710 /* and adjust the number of pbufs currently queued for reassembly. */ clen = pbuf_clen(p); 800fcb4: 6878 ldr r0, [r7, #4] 800fcb6: f7f7 fa15 bl 80070e4 800fcba: 4603 mov r3, r0 800fcbc: 843b strh r3, [r7, #32] LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen); 800fcbe: 4b0c ldr r3, [pc, #48] ; (800fcf0 ) 800fcc0: 881b ldrh r3, [r3, #0] 800fcc2: 8c3a ldrh r2, [r7, #32] 800fcc4: 429a cmp r2, r3 800fcc6: d906 bls.n 800fcd6 800fcc8: 4b0b ldr r3, [pc, #44] ; (800fcf8 ) 800fcca: f240 229b movw r2, #667 ; 0x29b 800fcce: 490b ldr r1, [pc, #44] ; (800fcfc ) 800fcd0: 480b ldr r0, [pc, #44] ; (800fd00 ) 800fcd2: f000 ff79 bl 8010bc8 ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - clen); 800fcd6: 4b06 ldr r3, [pc, #24] ; (800fcf0 ) 800fcd8: 881a ldrh r2, [r3, #0] 800fcda: 8c3b ldrh r3, [r7, #32] 800fcdc: 1ad3 subs r3, r2, r3 800fcde: b29a uxth r2, r3 800fce0: 4b03 ldr r3, [pc, #12] ; (800fcf0 ) 800fce2: 801a strh r2, [r3, #0] MIB2_STATS_INC(mib2.ipreasmoks); /* Return the pbuf chain */ return p; 800fce4: 687b ldr r3, [r7, #4] 800fce6: e038 b.n 800fd5a } /* the datagram is not (yet?) reassembled completely */ LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_pbufcount: %d out\n", ip_reass_pbufcount)); return NULL; 800fce8: 2300 movs r3, #0 800fcea: e036 b.n 800fd5a goto nullreturn_ipr; 800fcec: bf00 nop 800fcee: e00a b.n 800fd06 800fcf0: 24007cc8 .word 0x24007cc8 800fcf4: 24007cc4 .word 0x24007cc4 800fcf8: 080149bc .word 0x080149bc 800fcfc: 08014b2c .word 0x08014b2c 800fd00: 08014a04 .word 0x08014a04 goto nullreturn_ipr; 800fd04: bf00 nop nullreturn_ipr: LWIP_ASSERT("ipr != NULL", ipr != NULL); 800fd06: 6b3b ldr r3, [r7, #48] ; 0x30 800fd08: 2b00 cmp r3, #0 800fd0a: d106 bne.n 800fd1a 800fd0c: 4b15 ldr r3, [pc, #84] ; (800fd64 ) 800fd0e: f44f 722a mov.w r2, #680 ; 0x2a8 800fd12: 4915 ldr r1, [pc, #84] ; (800fd68 ) 800fd14: 4815 ldr r0, [pc, #84] ; (800fd6c ) 800fd16: f000 ff57 bl 8010bc8 if (ipr->p == NULL) { 800fd1a: 6b3b ldr r3, [r7, #48] ; 0x30 800fd1c: 685b ldr r3, [r3, #4] 800fd1e: 2b00 cmp r3, #0 800fd20: d116 bne.n 800fd50 /* dropped pbuf after creating a new datagram entry: remove the entry, too */ LWIP_ASSERT("not firstalthough just enqueued", ipr == reassdatagrams); 800fd22: 4b13 ldr r3, [pc, #76] ; (800fd70 ) 800fd24: 681b ldr r3, [r3, #0] 800fd26: 6b3a ldr r2, [r7, #48] ; 0x30 800fd28: 429a cmp r2, r3 800fd2a: d006 beq.n 800fd3a 800fd2c: 4b0d ldr r3, [pc, #52] ; (800fd64 ) 800fd2e: f240 22ab movw r2, #683 ; 0x2ab 800fd32: 4910 ldr r1, [pc, #64] ; (800fd74 ) 800fd34: 480d ldr r0, [pc, #52] ; (800fd6c ) 800fd36: f000 ff47 bl 8010bc8 ip_reass_dequeue_datagram(ipr, NULL); 800fd3a: 2100 movs r1, #0 800fd3c: 6b38 ldr r0, [r7, #48] ; 0x30 800fd3e: f7ff fce7 bl 800f710 800fd42: e006 b.n 800fd52 goto nullreturn; 800fd44: bf00 nop 800fd46: e004 b.n 800fd52 goto nullreturn; 800fd48: bf00 nop 800fd4a: e002 b.n 800fd52 goto nullreturn; 800fd4c: bf00 nop 800fd4e: e000 b.n 800fd52 } nullreturn: 800fd50: bf00 nop LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: nullreturn\n")); IPFRAG_STATS_INC(ip_frag.drop); pbuf_free(p); 800fd52: 6878 ldr r0, [r7, #4] 800fd54: f7f7 f93e bl 8006fd4 return NULL; 800fd58: 2300 movs r3, #0 } 800fd5a: 4618 mov r0, r3 800fd5c: 3738 adds r7, #56 ; 0x38 800fd5e: 46bd mov sp, r7 800fd60: bd80 pop {r7, pc} 800fd62: bf00 nop 800fd64: 080149bc .word 0x080149bc 800fd68: 08014b48 .word 0x08014b48 800fd6c: 08014a04 .word 0x08014a04 800fd70: 24007cc4 .word 0x24007cc4 800fd74: 08014b54 .word 0x08014b54 0800fd78 : #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) { 800fd78: b580 push {r7, lr} 800fd7a: af00 add r7, sp, #0 return (struct pbuf_custom_ref *)memp_malloc(MEMP_FRAG_PBUF); 800fd7c: 2005 movs r0, #5 800fd7e: f7f6 f94d bl 800601c 800fd82: 4603 mov r3, r0 } 800fd84: 4618 mov r0, r3 800fd86: bd80 pop {r7, pc} 0800fd88 : /** Free a struct pbuf_custom_ref */ static void ip_frag_free_pbuf_custom_ref(struct pbuf_custom_ref *p) { 800fd88: b580 push {r7, lr} 800fd8a: b082 sub sp, #8 800fd8c: af00 add r7, sp, #0 800fd8e: 6078 str r0, [r7, #4] LWIP_ASSERT("p != NULL", p != NULL); 800fd90: 687b ldr r3, [r7, #4] 800fd92: 2b00 cmp r3, #0 800fd94: d106 bne.n 800fda4 800fd96: 4b07 ldr r3, [pc, #28] ; (800fdb4 ) 800fd98: f44f 7231 mov.w r2, #708 ; 0x2c4 800fd9c: 4906 ldr r1, [pc, #24] ; (800fdb8 ) 800fd9e: 4807 ldr r0, [pc, #28] ; (800fdbc ) 800fda0: f000 ff12 bl 8010bc8 memp_free(MEMP_FRAG_PBUF, p); 800fda4: 6879 ldr r1, [r7, #4] 800fda6: 2005 movs r0, #5 800fda8: f7f6 f9a8 bl 80060fc } 800fdac: bf00 nop 800fdae: 3708 adds r7, #8 800fdb0: 46bd mov sp, r7 800fdb2: bd80 pop {r7, pc} 800fdb4: 080149bc .word 0x080149bc 800fdb8: 08014b74 .word 0x08014b74 800fdbc: 08014a04 .word 0x08014a04 0800fdc0 : /** Free-callback function to free a 'struct pbuf_custom_ref', called by * pbuf_free. */ static void ipfrag_free_pbuf_custom(struct pbuf *p) { 800fdc0: b580 push {r7, lr} 800fdc2: b084 sub sp, #16 800fdc4: af00 add r7, sp, #0 800fdc6: 6078 str r0, [r7, #4] struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref *)p; 800fdc8: 687b ldr r3, [r7, #4] 800fdca: 60fb str r3, [r7, #12] LWIP_ASSERT("pcr != NULL", pcr != NULL); 800fdcc: 68fb ldr r3, [r7, #12] 800fdce: 2b00 cmp r3, #0 800fdd0: d106 bne.n 800fde0 800fdd2: 4b11 ldr r3, [pc, #68] ; (800fe18 ) 800fdd4: f240 22ce movw r2, #718 ; 0x2ce 800fdd8: 4910 ldr r1, [pc, #64] ; (800fe1c ) 800fdda: 4811 ldr r0, [pc, #68] ; (800fe20 ) 800fddc: f000 fef4 bl 8010bc8 LWIP_ASSERT("pcr == p", (void *)pcr == (void *)p); 800fde0: 68fa ldr r2, [r7, #12] 800fde2: 687b ldr r3, [r7, #4] 800fde4: 429a cmp r2, r3 800fde6: d006 beq.n 800fdf6 800fde8: 4b0b ldr r3, [pc, #44] ; (800fe18 ) 800fdea: f240 22cf movw r2, #719 ; 0x2cf 800fdee: 490d ldr r1, [pc, #52] ; (800fe24 ) 800fdf0: 480b ldr r0, [pc, #44] ; (800fe20 ) 800fdf2: f000 fee9 bl 8010bc8 if (pcr->original != NULL) { 800fdf6: 68fb ldr r3, [r7, #12] 800fdf8: 695b ldr r3, [r3, #20] 800fdfa: 2b00 cmp r3, #0 800fdfc: d004 beq.n 800fe08 pbuf_free(pcr->original); 800fdfe: 68fb ldr r3, [r7, #12] 800fe00: 695b ldr r3, [r3, #20] 800fe02: 4618 mov r0, r3 800fe04: f7f7 f8e6 bl 8006fd4 } ip_frag_free_pbuf_custom_ref(pcr); 800fe08: 68f8 ldr r0, [r7, #12] 800fe0a: f7ff ffbd bl 800fd88 } 800fe0e: bf00 nop 800fe10: 3710 adds r7, #16 800fe12: 46bd mov sp, r7 800fe14: bd80 pop {r7, pc} 800fe16: bf00 nop 800fe18: 080149bc .word 0x080149bc 800fe1c: 08014b80 .word 0x08014b80 800fe20: 08014a04 .word 0x08014a04 800fe24: 08014b8c .word 0x08014b8c 0800fe28 : * * @return ERR_OK if sent successfully, err_t otherwise */ err_t ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest) { 800fe28: b580 push {r7, lr} 800fe2a: b094 sub sp, #80 ; 0x50 800fe2c: af02 add r7, sp, #8 800fe2e: 60f8 str r0, [r7, #12] 800fe30: 60b9 str r1, [r7, #8] 800fe32: 607a str r2, [r7, #4] struct pbuf *rambuf; #if !LWIP_NETIF_TX_SINGLE_PBUF struct pbuf *newpbuf; u16_t newpbuflen = 0; 800fe34: 2300 movs r3, #0 800fe36: 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); 800fe3a: 68bb ldr r3, [r7, #8] 800fe3c: 8c9b ldrh r3, [r3, #36] ; 0x24 800fe3e: 3b14 subs r3, #20 800fe40: 2b00 cmp r3, #0 800fe42: da00 bge.n 800fe46 800fe44: 3307 adds r3, #7 800fe46: 10db asrs r3, r3, #3 800fe48: 877b strh r3, [r7, #58] ; 0x3a u16_t left, fragsize; u16_t ofo; int last; u16_t poff = IP_HLEN; 800fe4a: 2314 movs r3, #20 800fe4c: 87fb strh r3, [r7, #62] ; 0x3e u16_t tmp; int mf_set; original_iphdr = (struct ip_hdr *)p->payload; 800fe4e: 68fb ldr r3, [r7, #12] 800fe50: 685b ldr r3, [r3, #4] 800fe52: 637b str r3, [r7, #52] ; 0x34 iphdr = original_iphdr; 800fe54: 6b7b ldr r3, [r7, #52] ; 0x34 800fe56: 633b str r3, [r7, #48] ; 0x30 if (IPH_HL_BYTES(iphdr) != IP_HLEN) { 800fe58: 6b3b ldr r3, [r7, #48] ; 0x30 800fe5a: 781b ldrb r3, [r3, #0] 800fe5c: f003 030f and.w r3, r3, #15 800fe60: b2db uxtb r3, r3 800fe62: 009b lsls r3, r3, #2 800fe64: b2db uxtb r3, r3 800fe66: 2b14 cmp r3, #20 800fe68: d002 beq.n 800fe70 /* ip4_frag() does not support IP options */ return ERR_VAL; 800fe6a: f06f 0305 mvn.w r3, #5 800fe6e: e110 b.n 8010092 } LWIP_ERROR("ip4_frag(): pbuf too short", p->len >= IP_HLEN, return ERR_VAL); 800fe70: 68fb ldr r3, [r7, #12] 800fe72: 895b ldrh r3, [r3, #10] 800fe74: 2b13 cmp r3, #19 800fe76: d809 bhi.n 800fe8c 800fe78: 4b88 ldr r3, [pc, #544] ; (801009c ) 800fe7a: f44f 723f mov.w r2, #764 ; 0x2fc 800fe7e: 4988 ldr r1, [pc, #544] ; (80100a0 ) 800fe80: 4888 ldr r0, [pc, #544] ; (80100a4 ) 800fe82: f000 fea1 bl 8010bc8 800fe86: f06f 0305 mvn.w r3, #5 800fe8a: e102 b.n 8010092 /* Save original offset */ tmp = lwip_ntohs(IPH_OFFSET(iphdr)); 800fe8c: 6b3b ldr r3, [r7, #48] ; 0x30 800fe8e: 88db ldrh r3, [r3, #6] 800fe90: b29b uxth r3, r3 800fe92: 4618 mov r0, r3 800fe94: f7f5 fb5a bl 800554c 800fe98: 4603 mov r3, r0 800fe9a: 87bb strh r3, [r7, #60] ; 0x3c ofo = tmp & IP_OFFMASK; 800fe9c: 8fbb ldrh r3, [r7, #60] ; 0x3c 800fe9e: f3c3 030c ubfx r3, r3, #0, #13 800fea2: 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; 800fea6: 8fbb ldrh r3, [r7, #60] ; 0x3c 800fea8: f403 5300 and.w r3, r3, #8192 ; 0x2000 800feac: 62fb str r3, [r7, #44] ; 0x2c left = (u16_t)(p->tot_len - IP_HLEN); 800feae: 68fb ldr r3, [r7, #12] 800feb0: 891b ldrh r3, [r3, #8] 800feb2: 3b14 subs r3, #20 800feb4: f8a7 3042 strh.w r3, [r7, #66] ; 0x42 while (left) { 800feb8: e0e1 b.n 801007e /* Fill this fragment */ fragsize = LWIP_MIN(left, (u16_t)(nfb * 8)); 800feba: 8f7b ldrh r3, [r7, #58] ; 0x3a 800febc: 00db lsls r3, r3, #3 800febe: b29b uxth r3, r3 800fec0: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42 800fec4: 4293 cmp r3, r2 800fec6: bf28 it cs 800fec8: 4613 movcs r3, r2 800feca: 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); 800fecc: f44f 7220 mov.w r2, #640 ; 0x280 800fed0: 2114 movs r1, #20 800fed2: 200e movs r0, #14 800fed4: f7f6 fd9a bl 8006a0c 800fed8: 6278 str r0, [r7, #36] ; 0x24 if (rambuf == NULL) { 800feda: 6a7b ldr r3, [r7, #36] ; 0x24 800fedc: 2b00 cmp r3, #0 800fede: f000 80d5 beq.w 801008c goto memerr; } LWIP_ASSERT("this needs a pbuf in one piece!", 800fee2: 6a7b ldr r3, [r7, #36] ; 0x24 800fee4: 895b ldrh r3, [r3, #10] 800fee6: 2b13 cmp r3, #19 800fee8: d806 bhi.n 800fef8 800feea: 4b6c ldr r3, [pc, #432] ; (801009c ) 800feec: f44f 7249 mov.w r2, #804 ; 0x324 800fef0: 496d ldr r1, [pc, #436] ; (80100a8 ) 800fef2: 486c ldr r0, [pc, #432] ; (80100a4 ) 800fef4: f000 fe68 bl 8010bc8 (rambuf->len >= (IP_HLEN))); SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN); 800fef8: 6a7b ldr r3, [r7, #36] ; 0x24 800fefa: 685b ldr r3, [r3, #4] 800fefc: 2214 movs r2, #20 800fefe: 6b79 ldr r1, [r7, #52] ; 0x34 800ff00: 4618 mov r0, r3 800ff02: f001 f842 bl 8010f8a iphdr = (struct ip_hdr *)rambuf->payload; 800ff06: 6a7b ldr r3, [r7, #36] ; 0x24 800ff08: 685b ldr r3, [r3, #4] 800ff0a: 633b str r3, [r7, #48] ; 0x30 left_to_copy = fragsize; 800ff0c: 8d7b ldrh r3, [r7, #42] ; 0x2a 800ff0e: f8a7 3044 strh.w r3, [r7, #68] ; 0x44 while (left_to_copy) { 800ff12: e064 b.n 800ffde struct pbuf_custom_ref *pcr; u16_t plen = (u16_t)(p->len - poff); 800ff14: 68fb ldr r3, [r7, #12] 800ff16: 895a ldrh r2, [r3, #10] 800ff18: 8ffb ldrh r3, [r7, #62] ; 0x3e 800ff1a: 1ad3 subs r3, r2, r3 800ff1c: 83fb strh r3, [r7, #30] LWIP_ASSERT("p->len >= poff", p->len >= poff); 800ff1e: 68fb ldr r3, [r7, #12] 800ff20: 895b ldrh r3, [r3, #10] 800ff22: 8ffa ldrh r2, [r7, #62] ; 0x3e 800ff24: 429a cmp r2, r3 800ff26: d906 bls.n 800ff36 800ff28: 4b5c ldr r3, [pc, #368] ; (801009c ) 800ff2a: f240 322d movw r2, #813 ; 0x32d 800ff2e: 495f ldr r1, [pc, #380] ; (80100ac ) 800ff30: 485c ldr r0, [pc, #368] ; (80100a4 ) 800ff32: f000 fe49 bl 8010bc8 newpbuflen = LWIP_MIN(left_to_copy, plen); 800ff36: 8bfa ldrh r2, [r7, #30] 800ff38: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44 800ff3c: 4293 cmp r3, r2 800ff3e: bf28 it cs 800ff40: 4613 movcs r3, r2 800ff42: f8a7 3046 strh.w r3, [r7, #70] ; 0x46 /* Is this pbuf already empty? */ if (!newpbuflen) { 800ff46: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46 800ff4a: 2b00 cmp r3, #0 800ff4c: d105 bne.n 800ff5a poff = 0; 800ff4e: 2300 movs r3, #0 800ff50: 87fb strh r3, [r7, #62] ; 0x3e p = p->next; 800ff52: 68fb ldr r3, [r7, #12] 800ff54: 681b ldr r3, [r3, #0] 800ff56: 60fb str r3, [r7, #12] continue; 800ff58: e041 b.n 800ffde } pcr = ip_frag_alloc_pbuf_custom_ref(); 800ff5a: f7ff ff0d bl 800fd78 800ff5e: 61b8 str r0, [r7, #24] if (pcr == NULL) { 800ff60: 69bb ldr r3, [r7, #24] 800ff62: 2b00 cmp r3, #0 800ff64: d103 bne.n 800ff6e pbuf_free(rambuf); 800ff66: 6a78 ldr r0, [r7, #36] ; 0x24 800ff68: f7f7 f834 bl 8006fd4 goto memerr; 800ff6c: e08f b.n 801008e } /* Mirror this pbuf, although we might not need all of it. */ newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc, 800ff6e: 69b8 ldr r0, [r7, #24] (u8_t *)p->payload + poff, newpbuflen); 800ff70: 68fb ldr r3, [r7, #12] 800ff72: 685a ldr r2, [r3, #4] newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc, 800ff74: 8ffb ldrh r3, [r7, #62] ; 0x3e 800ff76: 4413 add r3, r2 800ff78: f8b7 1046 ldrh.w r1, [r7, #70] ; 0x46 800ff7c: f8b7 2046 ldrh.w r2, [r7, #70] ; 0x46 800ff80: 9201 str r2, [sp, #4] 800ff82: 9300 str r3, [sp, #0] 800ff84: 4603 mov r3, r0 800ff86: 2241 movs r2, #65 ; 0x41 800ff88: 2000 movs r0, #0 800ff8a: f7f6 fe69 bl 8006c60 800ff8e: 6178 str r0, [r7, #20] if (newpbuf == NULL) { 800ff90: 697b ldr r3, [r7, #20] 800ff92: 2b00 cmp r3, #0 800ff94: d106 bne.n 800ffa4 ip_frag_free_pbuf_custom_ref(pcr); 800ff96: 69b8 ldr r0, [r7, #24] 800ff98: f7ff fef6 bl 800fd88 pbuf_free(rambuf); 800ff9c: 6a78 ldr r0, [r7, #36] ; 0x24 800ff9e: f7f7 f819 bl 8006fd4 goto memerr; 800ffa2: e074 b.n 801008e } pbuf_ref(p); 800ffa4: 68f8 ldr r0, [r7, #12] 800ffa6: f7f7 f8b5 bl 8007114 pcr->original = p; 800ffaa: 69bb ldr r3, [r7, #24] 800ffac: 68fa ldr r2, [r7, #12] 800ffae: 615a str r2, [r3, #20] pcr->pc.custom_free_function = ipfrag_free_pbuf_custom; 800ffb0: 69bb ldr r3, [r7, #24] 800ffb2: 4a3f ldr r2, [pc, #252] ; (80100b0 ) 800ffb4: 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); 800ffb6: 6979 ldr r1, [r7, #20] 800ffb8: 6a78 ldr r0, [r7, #36] ; 0x24 800ffba: f7f7 f8cd bl 8007158 left_to_copy = (u16_t)(left_to_copy - newpbuflen); 800ffbe: f8b7 2044 ldrh.w r2, [r7, #68] ; 0x44 800ffc2: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46 800ffc6: 1ad3 subs r3, r2, r3 800ffc8: f8a7 3044 strh.w r3, [r7, #68] ; 0x44 if (left_to_copy) { 800ffcc: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44 800ffd0: 2b00 cmp r3, #0 800ffd2: d004 beq.n 800ffde poff = 0; 800ffd4: 2300 movs r3, #0 800ffd6: 87fb strh r3, [r7, #62] ; 0x3e p = p->next; 800ffd8: 68fb ldr r3, [r7, #12] 800ffda: 681b ldr r3, [r3, #0] 800ffdc: 60fb str r3, [r7, #12] while (left_to_copy) { 800ffde: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44 800ffe2: 2b00 cmp r3, #0 800ffe4: d196 bne.n 800ff14 } } poff = (u16_t)(poff + newpbuflen); 800ffe6: 8ffa ldrh r2, [r7, #62] ; 0x3e 800ffe8: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46 800ffec: 4413 add r3, r2 800ffee: 87fb strh r3, [r7, #62] ; 0x3e #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ /* Correct header */ last = (left <= netif->mtu - IP_HLEN); 800fff0: 68bb ldr r3, [r7, #8] 800fff2: 8c9b ldrh r3, [r3, #36] ; 0x24 800fff4: f1a3 0213 sub.w r2, r3, #19 800fff8: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42 800fffc: 429a cmp r2, r3 800fffe: bfcc ite gt 8010000: 2301 movgt r3, #1 8010002: 2300 movle r3, #0 8010004: b2db uxtb r3, r3 8010006: 623b str r3, [r7, #32] /* Set new offset and MF flag */ tmp = (IP_OFFMASK & (ofo)); 8010008: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40 801000c: f3c3 030c ubfx r3, r3, #0, #13 8010010: 87bb strh r3, [r7, #60] ; 0x3c if (!last || mf_set) { 8010012: 6a3b ldr r3, [r7, #32] 8010014: 2b00 cmp r3, #0 8010016: d002 beq.n 801001e 8010018: 6afb ldr r3, [r7, #44] ; 0x2c 801001a: 2b00 cmp r3, #0 801001c: d003 beq.n 8010026 /* the last fragment has MF set if the input frame had it */ tmp = tmp | IP_MF; 801001e: 8fbb ldrh r3, [r7, #60] ; 0x3c 8010020: f443 5300 orr.w r3, r3, #8192 ; 0x2000 8010024: 87bb strh r3, [r7, #60] ; 0x3c } IPH_OFFSET_SET(iphdr, lwip_htons(tmp)); 8010026: 8fbb ldrh r3, [r7, #60] ; 0x3c 8010028: 4618 mov r0, r3 801002a: f7f5 fa8f bl 800554c 801002e: 4603 mov r3, r0 8010030: 461a mov r2, r3 8010032: 6b3b ldr r3, [r7, #48] ; 0x30 8010034: 80da strh r2, [r3, #6] IPH_LEN_SET(iphdr, lwip_htons((u16_t)(fragsize + IP_HLEN))); 8010036: 8d7b ldrh r3, [r7, #42] ; 0x2a 8010038: 3314 adds r3, #20 801003a: b29b uxth r3, r3 801003c: 4618 mov r0, r3 801003e: f7f5 fa85 bl 800554c 8010042: 4603 mov r3, r0 8010044: 461a mov r2, r3 8010046: 6b3b ldr r3, [r7, #48] ; 0x30 8010048: 805a strh r2, [r3, #2] IPH_CHKSUM_SET(iphdr, 0); 801004a: 6b3b ldr r3, [r7, #48] ; 0x30 801004c: 2200 movs r2, #0 801004e: 729a strb r2, [r3, #10] 8010050: 2200 movs r2, #0 8010052: 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); 8010054: 68bb ldr r3, [r7, #8] 8010056: 695b ldr r3, [r3, #20] 8010058: 687a ldr r2, [r7, #4] 801005a: 6a79 ldr r1, [r7, #36] ; 0x24 801005c: 68b8 ldr r0, [r7, #8] 801005e: 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); 8010060: 6a78 ldr r0, [r7, #36] ; 0x24 8010062: f7f6 ffb7 bl 8006fd4 left = (u16_t)(left - fragsize); 8010066: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42 801006a: 8d7b ldrh r3, [r7, #42] ; 0x2a 801006c: 1ad3 subs r3, r2, r3 801006e: f8a7 3042 strh.w r3, [r7, #66] ; 0x42 ofo = (u16_t)(ofo + nfb); 8010072: f8b7 2040 ldrh.w r2, [r7, #64] ; 0x40 8010076: 8f7b ldrh r3, [r7, #58] ; 0x3a 8010078: 4413 add r3, r2 801007a: f8a7 3040 strh.w r3, [r7, #64] ; 0x40 while (left) { 801007e: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42 8010082: 2b00 cmp r3, #0 8010084: f47f af19 bne.w 800feba } MIB2_STATS_INC(mib2.ipfragoks); return ERR_OK; 8010088: 2300 movs r3, #0 801008a: e002 b.n 8010092 goto memerr; 801008c: bf00 nop memerr: MIB2_STATS_INC(mib2.ipfragfails); return ERR_MEM; 801008e: f04f 33ff mov.w r3, #4294967295 } 8010092: 4618 mov r0, r3 8010094: 3748 adds r7, #72 ; 0x48 8010096: 46bd mov sp, r7 8010098: bd80 pop {r7, pc} 801009a: bf00 nop 801009c: 080149bc .word 0x080149bc 80100a0: 08014b98 .word 0x08014b98 80100a4: 08014a04 .word 0x08014a04 80100a8: 08014bb4 .word 0x08014bb4 80100ac: 08014bd4 .word 0x08014bd4 80100b0: 0800fdc1 .word 0x0800fdc1 080100b4 : * @see ETHARP_SUPPORT_VLAN * @see LWIP_HOOK_VLAN_CHECK */ err_t ethernet_input(struct pbuf *p, struct netif *netif) { 80100b4: b580 push {r7, lr} 80100b6: b086 sub sp, #24 80100b8: af00 add r7, sp, #0 80100ba: 6078 str r0, [r7, #4] 80100bc: 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; 80100be: 230e movs r3, #14 80100c0: 82fb strh r3, [r7, #22] #endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */ LWIP_ASSERT_CORE_LOCKED(); if (p->len <= SIZEOF_ETH_HDR) { 80100c2: 687b ldr r3, [r7, #4] 80100c4: 895b ldrh r3, [r3, #10] 80100c6: 2b0e cmp r3, #14 80100c8: d96e bls.n 80101a8 ETHARP_STATS_INC(etharp.drop); MIB2_STATS_NETIF_INC(netif, ifinerrors); goto free_and_return; } if (p->if_idx == NETIF_NO_INDEX) { 80100ca: 687b ldr r3, [r7, #4] 80100cc: 7bdb ldrb r3, [r3, #15] 80100ce: 2b00 cmp r3, #0 80100d0: d106 bne.n 80100e0 p->if_idx = netif_get_index(netif); 80100d2: 683b ldr r3, [r7, #0] 80100d4: f893 3030 ldrb.w r3, [r3, #48] ; 0x30 80100d8: 3301 adds r3, #1 80100da: b2da uxtb r2, r3 80100dc: 687b ldr r3, [r7, #4] 80100de: 73da strb r2, [r3, #15] } /* points to packet payload, which starts with an Ethernet header */ ethhdr = (struct eth_hdr *)p->payload; 80100e0: 687b ldr r3, [r7, #4] 80100e2: 685b ldr r3, [r3, #4] 80100e4: 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; 80100e6: 693b ldr r3, [r7, #16] 80100e8: 7b1a ldrb r2, [r3, #12] 80100ea: 7b5b ldrb r3, [r3, #13] 80100ec: 021b lsls r3, r3, #8 80100ee: 4313 orrs r3, r2 80100f0: 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) { 80100f2: 693b ldr r3, [r7, #16] 80100f4: 781b ldrb r3, [r3, #0] 80100f6: f003 0301 and.w r3, r3, #1 80100fa: 2b00 cmp r3, #0 80100fc: d023 beq.n 8010146 /* this might be a multicast or broadcast packet */ if (ethhdr->dest.addr[0] == LL_IP4_MULTICAST_ADDR_0) { 80100fe: 693b ldr r3, [r7, #16] 8010100: 781b ldrb r3, [r3, #0] 8010102: 2b01 cmp r3, #1 8010104: d10f bne.n 8010126 #if LWIP_IPV4 if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) && 8010106: 693b ldr r3, [r7, #16] 8010108: 785b ldrb r3, [r3, #1] 801010a: 2b00 cmp r3, #0 801010c: d11b bne.n 8010146 (ethhdr->dest.addr[2] == LL_IP4_MULTICAST_ADDR_2)) { 801010e: 693b ldr r3, [r7, #16] 8010110: 789b ldrb r3, [r3, #2] if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) && 8010112: 2b5e cmp r3, #94 ; 0x5e 8010114: d117 bne.n 8010146 /* mark the pbuf as link-layer multicast */ p->flags |= PBUF_FLAG_LLMCAST; 8010116: 687b ldr r3, [r7, #4] 8010118: 7b5b ldrb r3, [r3, #13] 801011a: f043 0310 orr.w r3, r3, #16 801011e: b2da uxtb r2, r3 8010120: 687b ldr r3, [r7, #4] 8010122: 735a strb r2, [r3, #13] 8010124: e00f b.n 8010146 (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)) { 8010126: 693b ldr r3, [r7, #16] 8010128: 2206 movs r2, #6 801012a: 4928 ldr r1, [pc, #160] ; (80101cc ) 801012c: 4618 mov r0, r3 801012e: f000 fe99 bl 8010e64 8010132: 4603 mov r3, r0 8010134: 2b00 cmp r3, #0 8010136: d106 bne.n 8010146 /* mark the pbuf as link-layer broadcast */ p->flags |= PBUF_FLAG_LLBCAST; 8010138: 687b ldr r3, [r7, #4] 801013a: 7b5b ldrb r3, [r3, #13] 801013c: f043 0308 orr.w r3, r3, #8 8010140: b2da uxtb r2, r3 8010142: 687b ldr r3, [r7, #4] 8010144: 735a strb r2, [r3, #13] } } switch (type) { 8010146: 89fb ldrh r3, [r7, #14] 8010148: 2b08 cmp r3, #8 801014a: d003 beq.n 8010154 801014c: f5b3 6fc1 cmp.w r3, #1544 ; 0x608 8010150: d014 beq.n 801017c } #endif ETHARP_STATS_INC(etharp.proterr); ETHARP_STATS_INC(etharp.drop); MIB2_STATS_NETIF_INC(netif, ifinunknownprotos); goto free_and_return; 8010152: e032 b.n 80101ba if (!(netif->flags & NETIF_FLAG_ETHARP)) { 8010154: 683b ldr r3, [r7, #0] 8010156: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 801015a: f003 0308 and.w r3, r3, #8 801015e: 2b00 cmp r3, #0 8010160: d024 beq.n 80101ac if (pbuf_remove_header(p, next_hdr_offset)) { 8010162: 8afb ldrh r3, [r7, #22] 8010164: 4619 mov r1, r3 8010166: 6878 ldr r0, [r7, #4] 8010168: f7f6 feae bl 8006ec8 801016c: 4603 mov r3, r0 801016e: 2b00 cmp r3, #0 8010170: d11e bne.n 80101b0 ip4_input(p, netif); 8010172: 6839 ldr r1, [r7, #0] 8010174: 6878 ldr r0, [r7, #4] 8010176: f7fe ff21 bl 800efbc break; 801017a: e013 b.n 80101a4 if (!(netif->flags & NETIF_FLAG_ETHARP)) { 801017c: 683b ldr r3, [r7, #0] 801017e: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 8010182: f003 0308 and.w r3, r3, #8 8010186: 2b00 cmp r3, #0 8010188: d014 beq.n 80101b4 if (pbuf_remove_header(p, next_hdr_offset)) { 801018a: 8afb ldrh r3, [r7, #22] 801018c: 4619 mov r1, r3 801018e: 6878 ldr r0, [r7, #4] 8010190: f7f6 fe9a bl 8006ec8 8010194: 4603 mov r3, r0 8010196: 2b00 cmp r3, #0 8010198: d10e bne.n 80101b8 etharp_input(p, netif); 801019a: 6839 ldr r1, [r7, #0] 801019c: 6878 ldr r0, [r7, #4] 801019e: f7fe f805 bl 800e1ac break; 80101a2: bf00 nop } /* This means the pbuf is freed or consumed, so the caller doesn't have to free it again */ return ERR_OK; 80101a4: 2300 movs r3, #0 80101a6: e00c b.n 80101c2 goto free_and_return; 80101a8: bf00 nop 80101aa: e006 b.n 80101ba goto free_and_return; 80101ac: bf00 nop 80101ae: e004 b.n 80101ba goto free_and_return; 80101b0: bf00 nop 80101b2: e002 b.n 80101ba goto free_and_return; 80101b4: bf00 nop 80101b6: e000 b.n 80101ba goto free_and_return; 80101b8: bf00 nop free_and_return: pbuf_free(p); 80101ba: 6878 ldr r0, [r7, #4] 80101bc: f7f6 ff0a bl 8006fd4 return ERR_OK; 80101c0: 2300 movs r3, #0 } 80101c2: 4618 mov r0, r3 80101c4: 3718 adds r7, #24 80101c6: 46bd mov sp, r7 80101c8: bd80 pop {r7, pc} 80101ca: bf00 nop 80101cc: 08014d98 .word 0x08014d98 080101d0 : * @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) { 80101d0: b580 push {r7, lr} 80101d2: b086 sub sp, #24 80101d4: af00 add r7, sp, #0 80101d6: 60f8 str r0, [r7, #12] 80101d8: 60b9 str r1, [r7, #8] 80101da: 607a str r2, [r7, #4] 80101dc: 603b str r3, [r7, #0] struct eth_hdr *ethhdr; u16_t eth_type_be = lwip_htons(eth_type); 80101de: 8c3b ldrh r3, [r7, #32] 80101e0: 4618 mov r0, r3 80101e2: f7f5 f9b3 bl 800554c 80101e6: 4603 mov r3, r0 80101e8: 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) { 80101ea: 210e movs r1, #14 80101ec: 68b8 ldr r0, [r7, #8] 80101ee: f7f6 fe5b bl 8006ea8 80101f2: 4603 mov r3, r0 80101f4: 2b00 cmp r3, #0 80101f6: d125 bne.n 8010244 } } LWIP_ASSERT_CORE_LOCKED(); ethhdr = (struct eth_hdr *)p->payload; 80101f8: 68bb ldr r3, [r7, #8] 80101fa: 685b ldr r3, [r3, #4] 80101fc: 613b str r3, [r7, #16] ethhdr->type = eth_type_be; 80101fe: 693b ldr r3, [r7, #16] 8010200: 8afa ldrh r2, [r7, #22] 8010202: 819a strh r2, [r3, #12] SMEMCPY(ðhdr->dest, dst, ETH_HWADDR_LEN); 8010204: 693b ldr r3, [r7, #16] 8010206: 2206 movs r2, #6 8010208: 6839 ldr r1, [r7, #0] 801020a: 4618 mov r0, r3 801020c: f000 febd bl 8010f8a SMEMCPY(ðhdr->src, src, ETH_HWADDR_LEN); 8010210: 693b ldr r3, [r7, #16] 8010212: 3306 adds r3, #6 8010214: 2206 movs r2, #6 8010216: 6879 ldr r1, [r7, #4] 8010218: 4618 mov r0, r3 801021a: f000 feb6 bl 8010f8a LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!", 801021e: 68fb ldr r3, [r7, #12] 8010220: f893 302c ldrb.w r3, [r3, #44] ; 0x2c 8010224: 2b06 cmp r3, #6 8010226: d006 beq.n 8010236 8010228: 4b0a ldr r3, [pc, #40] ; (8010254 ) 801022a: f44f 7299 mov.w r2, #306 ; 0x132 801022e: 490a ldr r1, [pc, #40] ; (8010258 ) 8010230: 480a ldr r0, [pc, #40] ; (801025c ) 8010232: f000 fcc9 bl 8010bc8 (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); 8010236: 68fb ldr r3, [r7, #12] 8010238: 699b ldr r3, [r3, #24] 801023a: 68b9 ldr r1, [r7, #8] 801023c: 68f8 ldr r0, [r7, #12] 801023e: 4798 blx r3 8010240: 4603 mov r3, r0 8010242: e002 b.n 801024a goto pbuf_header_failed; 8010244: 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; 8010246: f06f 0301 mvn.w r3, #1 } 801024a: 4618 mov r0, r3 801024c: 3718 adds r7, #24 801024e: 46bd mov sp, r7 8010250: bd80 pop {r7, pc} 8010252: bf00 nop 8010254: 08014be4 .word 0x08014be4 8010258: 08014c1c .word 0x08014c1c 801025c: 08014c50 .word 0x08014c50 08010260 : 8010260: 4b16 ldr r3, [pc, #88] ; (80102bc ) 8010262: b510 push {r4, lr} 8010264: 681c ldr r4, [r3, #0] 8010266: 6b23 ldr r3, [r4, #48] ; 0x30 8010268: b9b3 cbnz r3, 8010298 801026a: 2018 movs r0, #24 801026c: f000 ff06 bl 801107c 8010270: 4602 mov r2, r0 8010272: 6320 str r0, [r4, #48] ; 0x30 8010274: b920 cbnz r0, 8010280 8010276: 4b12 ldr r3, [pc, #72] ; (80102c0 ) 8010278: 4812 ldr r0, [pc, #72] ; (80102c4 ) 801027a: 2152 movs r1, #82 ; 0x52 801027c: f000 fe94 bl 8010fa8 <__assert_func> 8010280: 4911 ldr r1, [pc, #68] ; (80102c8 ) 8010282: 4b12 ldr r3, [pc, #72] ; (80102cc ) 8010284: e9c0 1300 strd r1, r3, [r0] 8010288: 4b11 ldr r3, [pc, #68] ; (80102d0 ) 801028a: 6083 str r3, [r0, #8] 801028c: 230b movs r3, #11 801028e: 8183 strh r3, [r0, #12] 8010290: 2100 movs r1, #0 8010292: 2001 movs r0, #1 8010294: e9c2 0104 strd r0, r1, [r2, #16] 8010298: 6b21 ldr r1, [r4, #48] ; 0x30 801029a: 480e ldr r0, [pc, #56] ; (80102d4 ) 801029c: 690b ldr r3, [r1, #16] 801029e: 694c ldr r4, [r1, #20] 80102a0: 4a0d ldr r2, [pc, #52] ; (80102d8 ) 80102a2: 4358 muls r0, r3 80102a4: fb02 0004 mla r0, r2, r4, r0 80102a8: fba3 3202 umull r3, r2, r3, r2 80102ac: 3301 adds r3, #1 80102ae: eb40 0002 adc.w r0, r0, r2 80102b2: e9c1 3004 strd r3, r0, [r1, #16] 80102b6: f020 4000 bic.w r0, r0, #2147483648 ; 0x80000000 80102ba: bd10 pop {r4, pc} 80102bc: 240000cc .word 0x240000cc 80102c0: 08014da6 .word 0x08014da6 80102c4: 08014dbd .word 0x08014dbd 80102c8: abcd330e .word 0xabcd330e 80102cc: e66d1234 .word 0xe66d1234 80102d0: 0005deec .word 0x0005deec 80102d4: 5851f42d .word 0x5851f42d 80102d8: 4c957f2d .word 0x4c957f2d 080102dc <_strtoul_l.constprop.0>: 80102dc: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 80102e0: 4f36 ldr r7, [pc, #216] ; (80103bc <_strtoul_l.constprop.0+0xe0>) 80102e2: 4686 mov lr, r0 80102e4: 460d mov r5, r1 80102e6: 4628 mov r0, r5 80102e8: f815 4b01 ldrb.w r4, [r5], #1 80102ec: 5d3e ldrb r6, [r7, r4] 80102ee: f016 0608 ands.w r6, r6, #8 80102f2: d1f8 bne.n 80102e6 <_strtoul_l.constprop.0+0xa> 80102f4: 2c2d cmp r4, #45 ; 0x2d 80102f6: d130 bne.n 801035a <_strtoul_l.constprop.0+0x7e> 80102f8: 782c ldrb r4, [r5, #0] 80102fa: 2601 movs r6, #1 80102fc: 1c85 adds r5, r0, #2 80102fe: 2b00 cmp r3, #0 8010300: d057 beq.n 80103b2 <_strtoul_l.constprop.0+0xd6> 8010302: 2b10 cmp r3, #16 8010304: d109 bne.n 801031a <_strtoul_l.constprop.0+0x3e> 8010306: 2c30 cmp r4, #48 ; 0x30 8010308: d107 bne.n 801031a <_strtoul_l.constprop.0+0x3e> 801030a: 7828 ldrb r0, [r5, #0] 801030c: f000 00df and.w r0, r0, #223 ; 0xdf 8010310: 2858 cmp r0, #88 ; 0x58 8010312: d149 bne.n 80103a8 <_strtoul_l.constprop.0+0xcc> 8010314: 786c ldrb r4, [r5, #1] 8010316: 2310 movs r3, #16 8010318: 3502 adds r5, #2 801031a: f04f 38ff mov.w r8, #4294967295 801031e: 2700 movs r7, #0 8010320: fbb8 f8f3 udiv r8, r8, r3 8010324: fb03 f908 mul.w r9, r3, r8 8010328: ea6f 0909 mvn.w r9, r9 801032c: 4638 mov r0, r7 801032e: f1a4 0c30 sub.w ip, r4, #48 ; 0x30 8010332: f1bc 0f09 cmp.w ip, #9 8010336: d815 bhi.n 8010364 <_strtoul_l.constprop.0+0x88> 8010338: 4664 mov r4, ip 801033a: 42a3 cmp r3, r4 801033c: dd23 ble.n 8010386 <_strtoul_l.constprop.0+0xaa> 801033e: f1b7 3fff cmp.w r7, #4294967295 8010342: d007 beq.n 8010354 <_strtoul_l.constprop.0+0x78> 8010344: 4580 cmp r8, r0 8010346: d31b bcc.n 8010380 <_strtoul_l.constprop.0+0xa4> 8010348: d101 bne.n 801034e <_strtoul_l.constprop.0+0x72> 801034a: 45a1 cmp r9, r4 801034c: db18 blt.n 8010380 <_strtoul_l.constprop.0+0xa4> 801034e: fb00 4003 mla r0, r0, r3, r4 8010352: 2701 movs r7, #1 8010354: f815 4b01 ldrb.w r4, [r5], #1 8010358: e7e9 b.n 801032e <_strtoul_l.constprop.0+0x52> 801035a: 2c2b cmp r4, #43 ; 0x2b 801035c: bf04 itt eq 801035e: 782c ldrbeq r4, [r5, #0] 8010360: 1c85 addeq r5, r0, #2 8010362: e7cc b.n 80102fe <_strtoul_l.constprop.0+0x22> 8010364: f1a4 0c41 sub.w ip, r4, #65 ; 0x41 8010368: f1bc 0f19 cmp.w ip, #25 801036c: d801 bhi.n 8010372 <_strtoul_l.constprop.0+0x96> 801036e: 3c37 subs r4, #55 ; 0x37 8010370: e7e3 b.n 801033a <_strtoul_l.constprop.0+0x5e> 8010372: f1a4 0c61 sub.w ip, r4, #97 ; 0x61 8010376: f1bc 0f19 cmp.w ip, #25 801037a: d804 bhi.n 8010386 <_strtoul_l.constprop.0+0xaa> 801037c: 3c57 subs r4, #87 ; 0x57 801037e: e7dc b.n 801033a <_strtoul_l.constprop.0+0x5e> 8010380: f04f 37ff mov.w r7, #4294967295 8010384: e7e6 b.n 8010354 <_strtoul_l.constprop.0+0x78> 8010386: 1c7b adds r3, r7, #1 8010388: d106 bne.n 8010398 <_strtoul_l.constprop.0+0xbc> 801038a: 2322 movs r3, #34 ; 0x22 801038c: f8ce 3000 str.w r3, [lr] 8010390: 4638 mov r0, r7 8010392: b932 cbnz r2, 80103a2 <_strtoul_l.constprop.0+0xc6> 8010394: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8010398: b106 cbz r6, 801039c <_strtoul_l.constprop.0+0xc0> 801039a: 4240 negs r0, r0 801039c: 2a00 cmp r2, #0 801039e: d0f9 beq.n 8010394 <_strtoul_l.constprop.0+0xb8> 80103a0: b107 cbz r7, 80103a4 <_strtoul_l.constprop.0+0xc8> 80103a2: 1e69 subs r1, r5, #1 80103a4: 6011 str r1, [r2, #0] 80103a6: e7f5 b.n 8010394 <_strtoul_l.constprop.0+0xb8> 80103a8: 2430 movs r4, #48 ; 0x30 80103aa: 2b00 cmp r3, #0 80103ac: d1b5 bne.n 801031a <_strtoul_l.constprop.0+0x3e> 80103ae: 2308 movs r3, #8 80103b0: e7b3 b.n 801031a <_strtoul_l.constprop.0+0x3e> 80103b2: 2c30 cmp r4, #48 ; 0x30 80103b4: d0a9 beq.n 801030a <_strtoul_l.constprop.0+0x2e> 80103b6: 230a movs r3, #10 80103b8: e7af b.n 801031a <_strtoul_l.constprop.0+0x3e> 80103ba: bf00 nop 80103bc: 08014e16 .word 0x08014e16 080103c0 : 80103c0: 4613 mov r3, r2 80103c2: 460a mov r2, r1 80103c4: 4601 mov r1, r0 80103c6: 4802 ldr r0, [pc, #8] ; (80103d0 ) 80103c8: 6800 ldr r0, [r0, #0] 80103ca: f7ff bf87 b.w 80102dc <_strtoul_l.constprop.0> 80103ce: bf00 nop 80103d0: 240000cc .word 0x240000cc 080103d4 <__sfputc_r>: 80103d4: 6893 ldr r3, [r2, #8] 80103d6: 3b01 subs r3, #1 80103d8: 2b00 cmp r3, #0 80103da: b410 push {r4} 80103dc: 6093 str r3, [r2, #8] 80103de: da08 bge.n 80103f2 <__sfputc_r+0x1e> 80103e0: 6994 ldr r4, [r2, #24] 80103e2: 42a3 cmp r3, r4 80103e4: db01 blt.n 80103ea <__sfputc_r+0x16> 80103e6: 290a cmp r1, #10 80103e8: d103 bne.n 80103f2 <__sfputc_r+0x1e> 80103ea: f85d 4b04 ldr.w r4, [sp], #4 80103ee: f000 bca4 b.w 8010d3a <__swbuf_r> 80103f2: 6813 ldr r3, [r2, #0] 80103f4: 1c58 adds r0, r3, #1 80103f6: 6010 str r0, [r2, #0] 80103f8: 7019 strb r1, [r3, #0] 80103fa: 4608 mov r0, r1 80103fc: f85d 4b04 ldr.w r4, [sp], #4 8010400: 4770 bx lr 08010402 <__sfputs_r>: 8010402: b5f8 push {r3, r4, r5, r6, r7, lr} 8010404: 4606 mov r6, r0 8010406: 460f mov r7, r1 8010408: 4614 mov r4, r2 801040a: 18d5 adds r5, r2, r3 801040c: 42ac cmp r4, r5 801040e: d101 bne.n 8010414 <__sfputs_r+0x12> 8010410: 2000 movs r0, #0 8010412: e007 b.n 8010424 <__sfputs_r+0x22> 8010414: f814 1b01 ldrb.w r1, [r4], #1 8010418: 463a mov r2, r7 801041a: 4630 mov r0, r6 801041c: f7ff ffda bl 80103d4 <__sfputc_r> 8010420: 1c43 adds r3, r0, #1 8010422: d1f3 bne.n 801040c <__sfputs_r+0xa> 8010424: bdf8 pop {r3, r4, r5, r6, r7, pc} ... 08010428 <_vfiprintf_r>: 8010428: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 801042c: 460d mov r5, r1 801042e: b09d sub sp, #116 ; 0x74 8010430: 4614 mov r4, r2 8010432: 4698 mov r8, r3 8010434: 4606 mov r6, r0 8010436: b118 cbz r0, 8010440 <_vfiprintf_r+0x18> 8010438: 6a03 ldr r3, [r0, #32] 801043a: b90b cbnz r3, 8010440 <_vfiprintf_r+0x18> 801043c: f000 fb34 bl 8010aa8 <__sinit> 8010440: 6e6b ldr r3, [r5, #100] ; 0x64 8010442: 07d9 lsls r1, r3, #31 8010444: d405 bmi.n 8010452 <_vfiprintf_r+0x2a> 8010446: 89ab ldrh r3, [r5, #12] 8010448: 059a lsls r2, r3, #22 801044a: d402 bmi.n 8010452 <_vfiprintf_r+0x2a> 801044c: 6da8 ldr r0, [r5, #88] ; 0x58 801044e: f000 fd9a bl 8010f86 <__retarget_lock_acquire_recursive> 8010452: 89ab ldrh r3, [r5, #12] 8010454: 071b lsls r3, r3, #28 8010456: d501 bpl.n 801045c <_vfiprintf_r+0x34> 8010458: 692b ldr r3, [r5, #16] 801045a: b99b cbnz r3, 8010484 <_vfiprintf_r+0x5c> 801045c: 4629 mov r1, r5 801045e: 4630 mov r0, r6 8010460: f000 fca8 bl 8010db4 <__swsetup_r> 8010464: b170 cbz r0, 8010484 <_vfiprintf_r+0x5c> 8010466: 6e6b ldr r3, [r5, #100] ; 0x64 8010468: 07dc lsls r4, r3, #31 801046a: d504 bpl.n 8010476 <_vfiprintf_r+0x4e> 801046c: f04f 30ff mov.w r0, #4294967295 8010470: b01d add sp, #116 ; 0x74 8010472: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8010476: 89ab ldrh r3, [r5, #12] 8010478: 0598 lsls r0, r3, #22 801047a: d4f7 bmi.n 801046c <_vfiprintf_r+0x44> 801047c: 6da8 ldr r0, [r5, #88] ; 0x58 801047e: f000 fd83 bl 8010f88 <__retarget_lock_release_recursive> 8010482: e7f3 b.n 801046c <_vfiprintf_r+0x44> 8010484: 2300 movs r3, #0 8010486: 9309 str r3, [sp, #36] ; 0x24 8010488: 2320 movs r3, #32 801048a: f88d 3029 strb.w r3, [sp, #41] ; 0x29 801048e: f8cd 800c str.w r8, [sp, #12] 8010492: 2330 movs r3, #48 ; 0x30 8010494: f8df 81b0 ldr.w r8, [pc, #432] ; 8010648 <_vfiprintf_r+0x220> 8010498: f88d 302a strb.w r3, [sp, #42] ; 0x2a 801049c: f04f 0901 mov.w r9, #1 80104a0: 4623 mov r3, r4 80104a2: 469a mov sl, r3 80104a4: f813 2b01 ldrb.w r2, [r3], #1 80104a8: b10a cbz r2, 80104ae <_vfiprintf_r+0x86> 80104aa: 2a25 cmp r2, #37 ; 0x25 80104ac: d1f9 bne.n 80104a2 <_vfiprintf_r+0x7a> 80104ae: ebba 0b04 subs.w fp, sl, r4 80104b2: d00b beq.n 80104cc <_vfiprintf_r+0xa4> 80104b4: 465b mov r3, fp 80104b6: 4622 mov r2, r4 80104b8: 4629 mov r1, r5 80104ba: 4630 mov r0, r6 80104bc: f7ff ffa1 bl 8010402 <__sfputs_r> 80104c0: 3001 adds r0, #1 80104c2: f000 80a9 beq.w 8010618 <_vfiprintf_r+0x1f0> 80104c6: 9a09 ldr r2, [sp, #36] ; 0x24 80104c8: 445a add r2, fp 80104ca: 9209 str r2, [sp, #36] ; 0x24 80104cc: f89a 3000 ldrb.w r3, [sl] 80104d0: 2b00 cmp r3, #0 80104d2: f000 80a1 beq.w 8010618 <_vfiprintf_r+0x1f0> 80104d6: 2300 movs r3, #0 80104d8: f04f 32ff mov.w r2, #4294967295 80104dc: e9cd 2305 strd r2, r3, [sp, #20] 80104e0: f10a 0a01 add.w sl, sl, #1 80104e4: 9304 str r3, [sp, #16] 80104e6: 9307 str r3, [sp, #28] 80104e8: f88d 3053 strb.w r3, [sp, #83] ; 0x53 80104ec: 931a str r3, [sp, #104] ; 0x68 80104ee: 4654 mov r4, sl 80104f0: 2205 movs r2, #5 80104f2: f814 1b01 ldrb.w r1, [r4], #1 80104f6: 4854 ldr r0, [pc, #336] ; (8010648 <_vfiprintf_r+0x220>) 80104f8: f7ef ff0a bl 8000310 80104fc: 9a04 ldr r2, [sp, #16] 80104fe: b9d8 cbnz r0, 8010538 <_vfiprintf_r+0x110> 8010500: 06d1 lsls r1, r2, #27 8010502: bf44 itt mi 8010504: 2320 movmi r3, #32 8010506: f88d 3053 strbmi.w r3, [sp, #83] ; 0x53 801050a: 0713 lsls r3, r2, #28 801050c: bf44 itt mi 801050e: 232b movmi r3, #43 ; 0x2b 8010510: f88d 3053 strbmi.w r3, [sp, #83] ; 0x53 8010514: f89a 3000 ldrb.w r3, [sl] 8010518: 2b2a cmp r3, #42 ; 0x2a 801051a: d015 beq.n 8010548 <_vfiprintf_r+0x120> 801051c: 9a07 ldr r2, [sp, #28] 801051e: 4654 mov r4, sl 8010520: 2000 movs r0, #0 8010522: f04f 0c0a mov.w ip, #10 8010526: 4621 mov r1, r4 8010528: f811 3b01 ldrb.w r3, [r1], #1 801052c: 3b30 subs r3, #48 ; 0x30 801052e: 2b09 cmp r3, #9 8010530: d94d bls.n 80105ce <_vfiprintf_r+0x1a6> 8010532: b1b0 cbz r0, 8010562 <_vfiprintf_r+0x13a> 8010534: 9207 str r2, [sp, #28] 8010536: e014 b.n 8010562 <_vfiprintf_r+0x13a> 8010538: eba0 0308 sub.w r3, r0, r8 801053c: fa09 f303 lsl.w r3, r9, r3 8010540: 4313 orrs r3, r2 8010542: 9304 str r3, [sp, #16] 8010544: 46a2 mov sl, r4 8010546: e7d2 b.n 80104ee <_vfiprintf_r+0xc6> 8010548: 9b03 ldr r3, [sp, #12] 801054a: 1d19 adds r1, r3, #4 801054c: 681b ldr r3, [r3, #0] 801054e: 9103 str r1, [sp, #12] 8010550: 2b00 cmp r3, #0 8010552: bfbb ittet lt 8010554: 425b neglt r3, r3 8010556: f042 0202 orrlt.w r2, r2, #2 801055a: 9307 strge r3, [sp, #28] 801055c: 9307 strlt r3, [sp, #28] 801055e: bfb8 it lt 8010560: 9204 strlt r2, [sp, #16] 8010562: 7823 ldrb r3, [r4, #0] 8010564: 2b2e cmp r3, #46 ; 0x2e 8010566: d10c bne.n 8010582 <_vfiprintf_r+0x15a> 8010568: 7863 ldrb r3, [r4, #1] 801056a: 2b2a cmp r3, #42 ; 0x2a 801056c: d134 bne.n 80105d8 <_vfiprintf_r+0x1b0> 801056e: 9b03 ldr r3, [sp, #12] 8010570: 1d1a adds r2, r3, #4 8010572: 681b ldr r3, [r3, #0] 8010574: 9203 str r2, [sp, #12] 8010576: 2b00 cmp r3, #0 8010578: bfb8 it lt 801057a: f04f 33ff movlt.w r3, #4294967295 801057e: 3402 adds r4, #2 8010580: 9305 str r3, [sp, #20] 8010582: f8df a0d4 ldr.w sl, [pc, #212] ; 8010658 <_vfiprintf_r+0x230> 8010586: 7821 ldrb r1, [r4, #0] 8010588: 2203 movs r2, #3 801058a: 4650 mov r0, sl 801058c: f7ef fec0 bl 8000310 8010590: b138 cbz r0, 80105a2 <_vfiprintf_r+0x17a> 8010592: 9b04 ldr r3, [sp, #16] 8010594: eba0 000a sub.w r0, r0, sl 8010598: 2240 movs r2, #64 ; 0x40 801059a: 4082 lsls r2, r0 801059c: 4313 orrs r3, r2 801059e: 3401 adds r4, #1 80105a0: 9304 str r3, [sp, #16] 80105a2: f814 1b01 ldrb.w r1, [r4], #1 80105a6: 4829 ldr r0, [pc, #164] ; (801064c <_vfiprintf_r+0x224>) 80105a8: f88d 1028 strb.w r1, [sp, #40] ; 0x28 80105ac: 2206 movs r2, #6 80105ae: f7ef feaf bl 8000310 80105b2: 2800 cmp r0, #0 80105b4: d03f beq.n 8010636 <_vfiprintf_r+0x20e> 80105b6: 4b26 ldr r3, [pc, #152] ; (8010650 <_vfiprintf_r+0x228>) 80105b8: bb1b cbnz r3, 8010602 <_vfiprintf_r+0x1da> 80105ba: 9b03 ldr r3, [sp, #12] 80105bc: 3307 adds r3, #7 80105be: f023 0307 bic.w r3, r3, #7 80105c2: 3308 adds r3, #8 80105c4: 9303 str r3, [sp, #12] 80105c6: 9b09 ldr r3, [sp, #36] ; 0x24 80105c8: 443b add r3, r7 80105ca: 9309 str r3, [sp, #36] ; 0x24 80105cc: e768 b.n 80104a0 <_vfiprintf_r+0x78> 80105ce: fb0c 3202 mla r2, ip, r2, r3 80105d2: 460c mov r4, r1 80105d4: 2001 movs r0, #1 80105d6: e7a6 b.n 8010526 <_vfiprintf_r+0xfe> 80105d8: 2300 movs r3, #0 80105da: 3401 adds r4, #1 80105dc: 9305 str r3, [sp, #20] 80105de: 4619 mov r1, r3 80105e0: f04f 0c0a mov.w ip, #10 80105e4: 4620 mov r0, r4 80105e6: f810 2b01 ldrb.w r2, [r0], #1 80105ea: 3a30 subs r2, #48 ; 0x30 80105ec: 2a09 cmp r2, #9 80105ee: d903 bls.n 80105f8 <_vfiprintf_r+0x1d0> 80105f0: 2b00 cmp r3, #0 80105f2: d0c6 beq.n 8010582 <_vfiprintf_r+0x15a> 80105f4: 9105 str r1, [sp, #20] 80105f6: e7c4 b.n 8010582 <_vfiprintf_r+0x15a> 80105f8: fb0c 2101 mla r1, ip, r1, r2 80105fc: 4604 mov r4, r0 80105fe: 2301 movs r3, #1 8010600: e7f0 b.n 80105e4 <_vfiprintf_r+0x1bc> 8010602: ab03 add r3, sp, #12 8010604: 9300 str r3, [sp, #0] 8010606: 462a mov r2, r5 8010608: 4b12 ldr r3, [pc, #72] ; (8010654 <_vfiprintf_r+0x22c>) 801060a: a904 add r1, sp, #16 801060c: 4630 mov r0, r6 801060e: f3af 8000 nop.w 8010612: 4607 mov r7, r0 8010614: 1c78 adds r0, r7, #1 8010616: d1d6 bne.n 80105c6 <_vfiprintf_r+0x19e> 8010618: 6e6b ldr r3, [r5, #100] ; 0x64 801061a: 07d9 lsls r1, r3, #31 801061c: d405 bmi.n 801062a <_vfiprintf_r+0x202> 801061e: 89ab ldrh r3, [r5, #12] 8010620: 059a lsls r2, r3, #22 8010622: d402 bmi.n 801062a <_vfiprintf_r+0x202> 8010624: 6da8 ldr r0, [r5, #88] ; 0x58 8010626: f000 fcaf bl 8010f88 <__retarget_lock_release_recursive> 801062a: 89ab ldrh r3, [r5, #12] 801062c: 065b lsls r3, r3, #25 801062e: f53f af1d bmi.w 801046c <_vfiprintf_r+0x44> 8010632: 9809 ldr r0, [sp, #36] ; 0x24 8010634: e71c b.n 8010470 <_vfiprintf_r+0x48> 8010636: ab03 add r3, sp, #12 8010638: 9300 str r3, [sp, #0] 801063a: 462a mov r2, r5 801063c: 4b05 ldr r3, [pc, #20] ; (8010654 <_vfiprintf_r+0x22c>) 801063e: a904 add r1, sp, #16 8010640: 4630 mov r0, r6 8010642: f000 f883 bl 801074c <_printf_i> 8010646: e7e4 b.n 8010612 <_vfiprintf_r+0x1ea> 8010648: 08014f16 .word 0x08014f16 801064c: 08014f20 .word 0x08014f20 8010650: 00000000 .word 0x00000000 8010654: 08010403 .word 0x08010403 8010658: 08014f1c .word 0x08014f1c 0801065c : 801065c: 4613 mov r3, r2 801065e: 460a mov r2, r1 8010660: 4601 mov r1, r0 8010662: 4802 ldr r0, [pc, #8] ; (801066c ) 8010664: 6800 ldr r0, [r0, #0] 8010666: f7ff bedf b.w 8010428 <_vfiprintf_r> 801066a: bf00 nop 801066c: 240000cc .word 0x240000cc 08010670 <_printf_common>: 8010670: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8010674: 4616 mov r6, r2 8010676: 4699 mov r9, r3 8010678: 688a ldr r2, [r1, #8] 801067a: 690b ldr r3, [r1, #16] 801067c: f8dd 8020 ldr.w r8, [sp, #32] 8010680: 4293 cmp r3, r2 8010682: bfb8 it lt 8010684: 4613 movlt r3, r2 8010686: 6033 str r3, [r6, #0] 8010688: f891 2043 ldrb.w r2, [r1, #67] ; 0x43 801068c: 4607 mov r7, r0 801068e: 460c mov r4, r1 8010690: b10a cbz r2, 8010696 <_printf_common+0x26> 8010692: 3301 adds r3, #1 8010694: 6033 str r3, [r6, #0] 8010696: 6823 ldr r3, [r4, #0] 8010698: 0699 lsls r1, r3, #26 801069a: bf42 ittt mi 801069c: 6833 ldrmi r3, [r6, #0] 801069e: 3302 addmi r3, #2 80106a0: 6033 strmi r3, [r6, #0] 80106a2: 6825 ldr r5, [r4, #0] 80106a4: f015 0506 ands.w r5, r5, #6 80106a8: d106 bne.n 80106b8 <_printf_common+0x48> 80106aa: f104 0a19 add.w sl, r4, #25 80106ae: 68e3 ldr r3, [r4, #12] 80106b0: 6832 ldr r2, [r6, #0] 80106b2: 1a9b subs r3, r3, r2 80106b4: 42ab cmp r3, r5 80106b6: dc26 bgt.n 8010706 <_printf_common+0x96> 80106b8: f894 2043 ldrb.w r2, [r4, #67] ; 0x43 80106bc: 1e13 subs r3, r2, #0 80106be: 6822 ldr r2, [r4, #0] 80106c0: bf18 it ne 80106c2: 2301 movne r3, #1 80106c4: 0692 lsls r2, r2, #26 80106c6: d42b bmi.n 8010720 <_printf_common+0xb0> 80106c8: f104 0243 add.w r2, r4, #67 ; 0x43 80106cc: 4649 mov r1, r9 80106ce: 4638 mov r0, r7 80106d0: 47c0 blx r8 80106d2: 3001 adds r0, #1 80106d4: d01e beq.n 8010714 <_printf_common+0xa4> 80106d6: 6823 ldr r3, [r4, #0] 80106d8: 6922 ldr r2, [r4, #16] 80106da: f003 0306 and.w r3, r3, #6 80106de: 2b04 cmp r3, #4 80106e0: bf02 ittt eq 80106e2: 68e5 ldreq r5, [r4, #12] 80106e4: 6833 ldreq r3, [r6, #0] 80106e6: 1aed subeq r5, r5, r3 80106e8: 68a3 ldr r3, [r4, #8] 80106ea: bf0c ite eq 80106ec: ea25 75e5 biceq.w r5, r5, r5, asr #31 80106f0: 2500 movne r5, #0 80106f2: 4293 cmp r3, r2 80106f4: bfc4 itt gt 80106f6: 1a9b subgt r3, r3, r2 80106f8: 18ed addgt r5, r5, r3 80106fa: 2600 movs r6, #0 80106fc: 341a adds r4, #26 80106fe: 42b5 cmp r5, r6 8010700: d11a bne.n 8010738 <_printf_common+0xc8> 8010702: 2000 movs r0, #0 8010704: e008 b.n 8010718 <_printf_common+0xa8> 8010706: 2301 movs r3, #1 8010708: 4652 mov r2, sl 801070a: 4649 mov r1, r9 801070c: 4638 mov r0, r7 801070e: 47c0 blx r8 8010710: 3001 adds r0, #1 8010712: d103 bne.n 801071c <_printf_common+0xac> 8010714: f04f 30ff mov.w r0, #4294967295 8010718: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 801071c: 3501 adds r5, #1 801071e: e7c6 b.n 80106ae <_printf_common+0x3e> 8010720: 18e1 adds r1, r4, r3 8010722: 1c5a adds r2, r3, #1 8010724: 2030 movs r0, #48 ; 0x30 8010726: f881 0043 strb.w r0, [r1, #67] ; 0x43 801072a: 4422 add r2, r4 801072c: f894 1045 ldrb.w r1, [r4, #69] ; 0x45 8010730: f882 1043 strb.w r1, [r2, #67] ; 0x43 8010734: 3302 adds r3, #2 8010736: e7c7 b.n 80106c8 <_printf_common+0x58> 8010738: 2301 movs r3, #1 801073a: 4622 mov r2, r4 801073c: 4649 mov r1, r9 801073e: 4638 mov r0, r7 8010740: 47c0 blx r8 8010742: 3001 adds r0, #1 8010744: d0e6 beq.n 8010714 <_printf_common+0xa4> 8010746: 3601 adds r6, #1 8010748: e7d9 b.n 80106fe <_printf_common+0x8e> ... 0801074c <_printf_i>: 801074c: e92d 47ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr} 8010750: 7e0f ldrb r7, [r1, #24] 8010752: 9d0c ldr r5, [sp, #48] ; 0x30 8010754: 2f78 cmp r7, #120 ; 0x78 8010756: 4691 mov r9, r2 8010758: 4680 mov r8, r0 801075a: 460c mov r4, r1 801075c: 469a mov sl, r3 801075e: f101 0243 add.w r2, r1, #67 ; 0x43 8010762: d807 bhi.n 8010774 <_printf_i+0x28> 8010764: 2f62 cmp r7, #98 ; 0x62 8010766: d80a bhi.n 801077e <_printf_i+0x32> 8010768: 2f00 cmp r7, #0 801076a: f000 80d4 beq.w 8010916 <_printf_i+0x1ca> 801076e: 2f58 cmp r7, #88 ; 0x58 8010770: f000 80c0 beq.w 80108f4 <_printf_i+0x1a8> 8010774: f104 0542 add.w r5, r4, #66 ; 0x42 8010778: f884 7042 strb.w r7, [r4, #66] ; 0x42 801077c: e03a b.n 80107f4 <_printf_i+0xa8> 801077e: f1a7 0363 sub.w r3, r7, #99 ; 0x63 8010782: 2b15 cmp r3, #21 8010784: d8f6 bhi.n 8010774 <_printf_i+0x28> 8010786: a101 add r1, pc, #4 ; (adr r1, 801078c <_printf_i+0x40>) 8010788: f851 f023 ldr.w pc, [r1, r3, lsl #2] 801078c: 080107e5 .word 0x080107e5 8010790: 080107f9 .word 0x080107f9 8010794: 08010775 .word 0x08010775 8010798: 08010775 .word 0x08010775 801079c: 08010775 .word 0x08010775 80107a0: 08010775 .word 0x08010775 80107a4: 080107f9 .word 0x080107f9 80107a8: 08010775 .word 0x08010775 80107ac: 08010775 .word 0x08010775 80107b0: 08010775 .word 0x08010775 80107b4: 08010775 .word 0x08010775 80107b8: 080108fd .word 0x080108fd 80107bc: 08010825 .word 0x08010825 80107c0: 080108b7 .word 0x080108b7 80107c4: 08010775 .word 0x08010775 80107c8: 08010775 .word 0x08010775 80107cc: 0801091f .word 0x0801091f 80107d0: 08010775 .word 0x08010775 80107d4: 08010825 .word 0x08010825 80107d8: 08010775 .word 0x08010775 80107dc: 08010775 .word 0x08010775 80107e0: 080108bf .word 0x080108bf 80107e4: 682b ldr r3, [r5, #0] 80107e6: 1d1a adds r2, r3, #4 80107e8: 681b ldr r3, [r3, #0] 80107ea: 602a str r2, [r5, #0] 80107ec: f104 0542 add.w r5, r4, #66 ; 0x42 80107f0: f884 3042 strb.w r3, [r4, #66] ; 0x42 80107f4: 2301 movs r3, #1 80107f6: e09f b.n 8010938 <_printf_i+0x1ec> 80107f8: 6820 ldr r0, [r4, #0] 80107fa: 682b ldr r3, [r5, #0] 80107fc: 0607 lsls r7, r0, #24 80107fe: f103 0104 add.w r1, r3, #4 8010802: 6029 str r1, [r5, #0] 8010804: d501 bpl.n 801080a <_printf_i+0xbe> 8010806: 681e ldr r6, [r3, #0] 8010808: e003 b.n 8010812 <_printf_i+0xc6> 801080a: 0646 lsls r6, r0, #25 801080c: d5fb bpl.n 8010806 <_printf_i+0xba> 801080e: f9b3 6000 ldrsh.w r6, [r3] 8010812: 2e00 cmp r6, #0 8010814: da03 bge.n 801081e <_printf_i+0xd2> 8010816: 232d movs r3, #45 ; 0x2d 8010818: 4276 negs r6, r6 801081a: f884 3043 strb.w r3, [r4, #67] ; 0x43 801081e: 485a ldr r0, [pc, #360] ; (8010988 <_printf_i+0x23c>) 8010820: 230a movs r3, #10 8010822: e012 b.n 801084a <_printf_i+0xfe> 8010824: 682b ldr r3, [r5, #0] 8010826: 6820 ldr r0, [r4, #0] 8010828: 1d19 adds r1, r3, #4 801082a: 6029 str r1, [r5, #0] 801082c: 0605 lsls r5, r0, #24 801082e: d501 bpl.n 8010834 <_printf_i+0xe8> 8010830: 681e ldr r6, [r3, #0] 8010832: e002 b.n 801083a <_printf_i+0xee> 8010834: 0641 lsls r1, r0, #25 8010836: d5fb bpl.n 8010830 <_printf_i+0xe4> 8010838: 881e ldrh r6, [r3, #0] 801083a: 4853 ldr r0, [pc, #332] ; (8010988 <_printf_i+0x23c>) 801083c: 2f6f cmp r7, #111 ; 0x6f 801083e: bf0c ite eq 8010840: 2308 moveq r3, #8 8010842: 230a movne r3, #10 8010844: 2100 movs r1, #0 8010846: f884 1043 strb.w r1, [r4, #67] ; 0x43 801084a: 6865 ldr r5, [r4, #4] 801084c: 60a5 str r5, [r4, #8] 801084e: 2d00 cmp r5, #0 8010850: bfa2 ittt ge 8010852: 6821 ldrge r1, [r4, #0] 8010854: f021 0104 bicge.w r1, r1, #4 8010858: 6021 strge r1, [r4, #0] 801085a: b90e cbnz r6, 8010860 <_printf_i+0x114> 801085c: 2d00 cmp r5, #0 801085e: d04b beq.n 80108f8 <_printf_i+0x1ac> 8010860: 4615 mov r5, r2 8010862: fbb6 f1f3 udiv r1, r6, r3 8010866: fb03 6711 mls r7, r3, r1, r6 801086a: 5dc7 ldrb r7, [r0, r7] 801086c: f805 7d01 strb.w r7, [r5, #-1]! 8010870: 4637 mov r7, r6 8010872: 42bb cmp r3, r7 8010874: 460e mov r6, r1 8010876: d9f4 bls.n 8010862 <_printf_i+0x116> 8010878: 2b08 cmp r3, #8 801087a: d10b bne.n 8010894 <_printf_i+0x148> 801087c: 6823 ldr r3, [r4, #0] 801087e: 07de lsls r6, r3, #31 8010880: d508 bpl.n 8010894 <_printf_i+0x148> 8010882: 6923 ldr r3, [r4, #16] 8010884: 6861 ldr r1, [r4, #4] 8010886: 4299 cmp r1, r3 8010888: bfde ittt le 801088a: 2330 movle r3, #48 ; 0x30 801088c: f805 3c01 strble.w r3, [r5, #-1] 8010890: f105 35ff addle.w r5, r5, #4294967295 8010894: 1b52 subs r2, r2, r5 8010896: 6122 str r2, [r4, #16] 8010898: f8cd a000 str.w sl, [sp] 801089c: 464b mov r3, r9 801089e: aa03 add r2, sp, #12 80108a0: 4621 mov r1, r4 80108a2: 4640 mov r0, r8 80108a4: f7ff fee4 bl 8010670 <_printf_common> 80108a8: 3001 adds r0, #1 80108aa: d14a bne.n 8010942 <_printf_i+0x1f6> 80108ac: f04f 30ff mov.w r0, #4294967295 80108b0: b004 add sp, #16 80108b2: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 80108b6: 6823 ldr r3, [r4, #0] 80108b8: f043 0320 orr.w r3, r3, #32 80108bc: 6023 str r3, [r4, #0] 80108be: 4833 ldr r0, [pc, #204] ; (801098c <_printf_i+0x240>) 80108c0: 2778 movs r7, #120 ; 0x78 80108c2: f884 7045 strb.w r7, [r4, #69] ; 0x45 80108c6: 6823 ldr r3, [r4, #0] 80108c8: 6829 ldr r1, [r5, #0] 80108ca: 061f lsls r7, r3, #24 80108cc: f851 6b04 ldr.w r6, [r1], #4 80108d0: d402 bmi.n 80108d8 <_printf_i+0x18c> 80108d2: 065f lsls r7, r3, #25 80108d4: bf48 it mi 80108d6: b2b6 uxthmi r6, r6 80108d8: 07df lsls r7, r3, #31 80108da: bf48 it mi 80108dc: f043 0320 orrmi.w r3, r3, #32 80108e0: 6029 str r1, [r5, #0] 80108e2: bf48 it mi 80108e4: 6023 strmi r3, [r4, #0] 80108e6: b91e cbnz r6, 80108f0 <_printf_i+0x1a4> 80108e8: 6823 ldr r3, [r4, #0] 80108ea: f023 0320 bic.w r3, r3, #32 80108ee: 6023 str r3, [r4, #0] 80108f0: 2310 movs r3, #16 80108f2: e7a7 b.n 8010844 <_printf_i+0xf8> 80108f4: 4824 ldr r0, [pc, #144] ; (8010988 <_printf_i+0x23c>) 80108f6: e7e4 b.n 80108c2 <_printf_i+0x176> 80108f8: 4615 mov r5, r2 80108fa: e7bd b.n 8010878 <_printf_i+0x12c> 80108fc: 682b ldr r3, [r5, #0] 80108fe: 6826 ldr r6, [r4, #0] 8010900: 6961 ldr r1, [r4, #20] 8010902: 1d18 adds r0, r3, #4 8010904: 6028 str r0, [r5, #0] 8010906: 0635 lsls r5, r6, #24 8010908: 681b ldr r3, [r3, #0] 801090a: d501 bpl.n 8010910 <_printf_i+0x1c4> 801090c: 6019 str r1, [r3, #0] 801090e: e002 b.n 8010916 <_printf_i+0x1ca> 8010910: 0670 lsls r0, r6, #25 8010912: d5fb bpl.n 801090c <_printf_i+0x1c0> 8010914: 8019 strh r1, [r3, #0] 8010916: 2300 movs r3, #0 8010918: 6123 str r3, [r4, #16] 801091a: 4615 mov r5, r2 801091c: e7bc b.n 8010898 <_printf_i+0x14c> 801091e: 682b ldr r3, [r5, #0] 8010920: 1d1a adds r2, r3, #4 8010922: 602a str r2, [r5, #0] 8010924: 681d ldr r5, [r3, #0] 8010926: 6862 ldr r2, [r4, #4] 8010928: 2100 movs r1, #0 801092a: 4628 mov r0, r5 801092c: f7ef fcf0 bl 8000310 8010930: b108 cbz r0, 8010936 <_printf_i+0x1ea> 8010932: 1b40 subs r0, r0, r5 8010934: 6060 str r0, [r4, #4] 8010936: 6863 ldr r3, [r4, #4] 8010938: 6123 str r3, [r4, #16] 801093a: 2300 movs r3, #0 801093c: f884 3043 strb.w r3, [r4, #67] ; 0x43 8010940: e7aa b.n 8010898 <_printf_i+0x14c> 8010942: 6923 ldr r3, [r4, #16] 8010944: 462a mov r2, r5 8010946: 4649 mov r1, r9 8010948: 4640 mov r0, r8 801094a: 47d0 blx sl 801094c: 3001 adds r0, #1 801094e: d0ad beq.n 80108ac <_printf_i+0x160> 8010950: 6823 ldr r3, [r4, #0] 8010952: 079b lsls r3, r3, #30 8010954: d413 bmi.n 801097e <_printf_i+0x232> 8010956: 68e0 ldr r0, [r4, #12] 8010958: 9b03 ldr r3, [sp, #12] 801095a: 4298 cmp r0, r3 801095c: bfb8 it lt 801095e: 4618 movlt r0, r3 8010960: e7a6 b.n 80108b0 <_printf_i+0x164> 8010962: 2301 movs r3, #1 8010964: 4632 mov r2, r6 8010966: 4649 mov r1, r9 8010968: 4640 mov r0, r8 801096a: 47d0 blx sl 801096c: 3001 adds r0, #1 801096e: d09d beq.n 80108ac <_printf_i+0x160> 8010970: 3501 adds r5, #1 8010972: 68e3 ldr r3, [r4, #12] 8010974: 9903 ldr r1, [sp, #12] 8010976: 1a5b subs r3, r3, r1 8010978: 42ab cmp r3, r5 801097a: dcf2 bgt.n 8010962 <_printf_i+0x216> 801097c: e7eb b.n 8010956 <_printf_i+0x20a> 801097e: 2500 movs r5, #0 8010980: f104 0619 add.w r6, r4, #25 8010984: e7f5 b.n 8010972 <_printf_i+0x226> 8010986: bf00 nop 8010988: 08014f27 .word 0x08014f27 801098c: 08014f38 .word 0x08014f38 08010990 : 8010990: 2300 movs r3, #0 8010992: b510 push {r4, lr} 8010994: 4604 mov r4, r0 8010996: e9c0 3300 strd r3, r3, [r0] 801099a: e9c0 3304 strd r3, r3, [r0, #16] 801099e: 6083 str r3, [r0, #8] 80109a0: 8181 strh r1, [r0, #12] 80109a2: 6643 str r3, [r0, #100] ; 0x64 80109a4: 81c2 strh r2, [r0, #14] 80109a6: 6183 str r3, [r0, #24] 80109a8: 4619 mov r1, r3 80109aa: 2208 movs r2, #8 80109ac: 305c adds r0, #92 ; 0x5c 80109ae: f000 fa69 bl 8010e84 80109b2: 4b0d ldr r3, [pc, #52] ; (80109e8 ) 80109b4: 6263 str r3, [r4, #36] ; 0x24 80109b6: 4b0d ldr r3, [pc, #52] ; (80109ec ) 80109b8: 62a3 str r3, [r4, #40] ; 0x28 80109ba: 4b0d ldr r3, [pc, #52] ; (80109f0 ) 80109bc: 62e3 str r3, [r4, #44] ; 0x2c 80109be: 4b0d ldr r3, [pc, #52] ; (80109f4 ) 80109c0: 6323 str r3, [r4, #48] ; 0x30 80109c2: 4b0d ldr r3, [pc, #52] ; (80109f8 ) 80109c4: 6224 str r4, [r4, #32] 80109c6: 429c cmp r4, r3 80109c8: d006 beq.n 80109d8 80109ca: f103 0268 add.w r2, r3, #104 ; 0x68 80109ce: 4294 cmp r4, r2 80109d0: d002 beq.n 80109d8 80109d2: 33d0 adds r3, #208 ; 0xd0 80109d4: 429c cmp r4, r3 80109d6: d105 bne.n 80109e4 80109d8: f104 0058 add.w r0, r4, #88 ; 0x58 80109dc: e8bd 4010 ldmia.w sp!, {r4, lr} 80109e0: f000 bad0 b.w 8010f84 <__retarget_lock_init_recursive> 80109e4: bd10 pop {r4, pc} 80109e6: bf00 nop 80109e8: 08010cb5 .word 0x08010cb5 80109ec: 08010cd7 .word 0x08010cd7 80109f0: 08010d0f .word 0x08010d0f 80109f4: 08010d33 .word 0x08010d33 80109f8: 24007ccc .word 0x24007ccc 080109fc : 80109fc: 4a02 ldr r2, [pc, #8] ; (8010a08 ) 80109fe: 4903 ldr r1, [pc, #12] ; (8010a0c ) 8010a00: 4803 ldr r0, [pc, #12] ; (8010a10 ) 8010a02: f000 b869 b.w 8010ad8 <_fwalk_sglue> 8010a06: bf00 nop 8010a08: 24000074 .word 0x24000074 8010a0c: 080112f1 .word 0x080112f1 8010a10: 24000080 .word 0x24000080 08010a14 : 8010a14: 6841 ldr r1, [r0, #4] 8010a16: 4b0c ldr r3, [pc, #48] ; (8010a48 ) 8010a18: 4299 cmp r1, r3 8010a1a: b510 push {r4, lr} 8010a1c: 4604 mov r4, r0 8010a1e: d001 beq.n 8010a24 8010a20: f000 fc66 bl 80112f0 <_fflush_r> 8010a24: 68a1 ldr r1, [r4, #8] 8010a26: 4b09 ldr r3, [pc, #36] ; (8010a4c ) 8010a28: 4299 cmp r1, r3 8010a2a: d002 beq.n 8010a32 8010a2c: 4620 mov r0, r4 8010a2e: f000 fc5f bl 80112f0 <_fflush_r> 8010a32: 68e1 ldr r1, [r4, #12] 8010a34: 4b06 ldr r3, [pc, #24] ; (8010a50 ) 8010a36: 4299 cmp r1, r3 8010a38: d004 beq.n 8010a44 8010a3a: 4620 mov r0, r4 8010a3c: e8bd 4010 ldmia.w sp!, {r4, lr} 8010a40: f000 bc56 b.w 80112f0 <_fflush_r> 8010a44: bd10 pop {r4, pc} 8010a46: bf00 nop 8010a48: 24007ccc .word 0x24007ccc 8010a4c: 24007d34 .word 0x24007d34 8010a50: 24007d9c .word 0x24007d9c 08010a54 : 8010a54: b510 push {r4, lr} 8010a56: 4b0b ldr r3, [pc, #44] ; (8010a84 ) 8010a58: 4c0b ldr r4, [pc, #44] ; (8010a88 ) 8010a5a: 4a0c ldr r2, [pc, #48] ; (8010a8c ) 8010a5c: 601a str r2, [r3, #0] 8010a5e: 4620 mov r0, r4 8010a60: 2200 movs r2, #0 8010a62: 2104 movs r1, #4 8010a64: f7ff ff94 bl 8010990 8010a68: f104 0068 add.w r0, r4, #104 ; 0x68 8010a6c: 2201 movs r2, #1 8010a6e: 2109 movs r1, #9 8010a70: f7ff ff8e bl 8010990 8010a74: f104 00d0 add.w r0, r4, #208 ; 0xd0 8010a78: 2202 movs r2, #2 8010a7a: e8bd 4010 ldmia.w sp!, {r4, lr} 8010a7e: 2112 movs r1, #18 8010a80: f7ff bf86 b.w 8010990 8010a84: 24007e04 .word 0x24007e04 8010a88: 24007ccc .word 0x24007ccc 8010a8c: 080109fd .word 0x080109fd 08010a90 <__sfp_lock_acquire>: 8010a90: 4801 ldr r0, [pc, #4] ; (8010a98 <__sfp_lock_acquire+0x8>) 8010a92: f000 ba78 b.w 8010f86 <__retarget_lock_acquire_recursive> 8010a96: bf00 nop 8010a98: 24007e0d .word 0x24007e0d 08010a9c <__sfp_lock_release>: 8010a9c: 4801 ldr r0, [pc, #4] ; (8010aa4 <__sfp_lock_release+0x8>) 8010a9e: f000 ba73 b.w 8010f88 <__retarget_lock_release_recursive> 8010aa2: bf00 nop 8010aa4: 24007e0d .word 0x24007e0d 08010aa8 <__sinit>: 8010aa8: b510 push {r4, lr} 8010aaa: 4604 mov r4, r0 8010aac: f7ff fff0 bl 8010a90 <__sfp_lock_acquire> 8010ab0: 6a23 ldr r3, [r4, #32] 8010ab2: b11b cbz r3, 8010abc <__sinit+0x14> 8010ab4: e8bd 4010 ldmia.w sp!, {r4, lr} 8010ab8: f7ff bff0 b.w 8010a9c <__sfp_lock_release> 8010abc: 4b04 ldr r3, [pc, #16] ; (8010ad0 <__sinit+0x28>) 8010abe: 6223 str r3, [r4, #32] 8010ac0: 4b04 ldr r3, [pc, #16] ; (8010ad4 <__sinit+0x2c>) 8010ac2: 681b ldr r3, [r3, #0] 8010ac4: 2b00 cmp r3, #0 8010ac6: d1f5 bne.n 8010ab4 <__sinit+0xc> 8010ac8: f7ff ffc4 bl 8010a54 8010acc: e7f2 b.n 8010ab4 <__sinit+0xc> 8010ace: bf00 nop 8010ad0: 08010a15 .word 0x08010a15 8010ad4: 24007e04 .word 0x24007e04 08010ad8 <_fwalk_sglue>: 8010ad8: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8010adc: 4607 mov r7, r0 8010ade: 4688 mov r8, r1 8010ae0: 4614 mov r4, r2 8010ae2: 2600 movs r6, #0 8010ae4: e9d4 9501 ldrd r9, r5, [r4, #4] 8010ae8: f1b9 0901 subs.w r9, r9, #1 8010aec: d505 bpl.n 8010afa <_fwalk_sglue+0x22> 8010aee: 6824 ldr r4, [r4, #0] 8010af0: 2c00 cmp r4, #0 8010af2: d1f7 bne.n 8010ae4 <_fwalk_sglue+0xc> 8010af4: 4630 mov r0, r6 8010af6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8010afa: 89ab ldrh r3, [r5, #12] 8010afc: 2b01 cmp r3, #1 8010afe: d907 bls.n 8010b10 <_fwalk_sglue+0x38> 8010b00: f9b5 300e ldrsh.w r3, [r5, #14] 8010b04: 3301 adds r3, #1 8010b06: d003 beq.n 8010b10 <_fwalk_sglue+0x38> 8010b08: 4629 mov r1, r5 8010b0a: 4638 mov r0, r7 8010b0c: 47c0 blx r8 8010b0e: 4306 orrs r6, r0 8010b10: 3568 adds r5, #104 ; 0x68 8010b12: e7e9 b.n 8010ae8 <_fwalk_sglue+0x10> 08010b14 <_fwrite_r>: 8010b14: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8010b18: 9c08 ldr r4, [sp, #32] 8010b1a: 468a mov sl, r1 8010b1c: 4690 mov r8, r2 8010b1e: fb02 f903 mul.w r9, r2, r3 8010b22: 4606 mov r6, r0 8010b24: b118 cbz r0, 8010b2e <_fwrite_r+0x1a> 8010b26: 6a03 ldr r3, [r0, #32] 8010b28: b90b cbnz r3, 8010b2e <_fwrite_r+0x1a> 8010b2a: f7ff ffbd bl 8010aa8 <__sinit> 8010b2e: 6e63 ldr r3, [r4, #100] ; 0x64 8010b30: 07dd lsls r5, r3, #31 8010b32: d405 bmi.n 8010b40 <_fwrite_r+0x2c> 8010b34: 89a3 ldrh r3, [r4, #12] 8010b36: 0598 lsls r0, r3, #22 8010b38: d402 bmi.n 8010b40 <_fwrite_r+0x2c> 8010b3a: 6da0 ldr r0, [r4, #88] ; 0x58 8010b3c: f000 fa23 bl 8010f86 <__retarget_lock_acquire_recursive> 8010b40: 89a3 ldrh r3, [r4, #12] 8010b42: 0719 lsls r1, r3, #28 8010b44: d516 bpl.n 8010b74 <_fwrite_r+0x60> 8010b46: 6923 ldr r3, [r4, #16] 8010b48: b1a3 cbz r3, 8010b74 <_fwrite_r+0x60> 8010b4a: 2500 movs r5, #0 8010b4c: 454d cmp r5, r9 8010b4e: d01f beq.n 8010b90 <_fwrite_r+0x7c> 8010b50: 68a7 ldr r7, [r4, #8] 8010b52: f81a 1005 ldrb.w r1, [sl, r5] 8010b56: 3f01 subs r7, #1 8010b58: 2f00 cmp r7, #0 8010b5a: 60a7 str r7, [r4, #8] 8010b5c: da04 bge.n 8010b68 <_fwrite_r+0x54> 8010b5e: 69a3 ldr r3, [r4, #24] 8010b60: 429f cmp r7, r3 8010b62: db0f blt.n 8010b84 <_fwrite_r+0x70> 8010b64: 290a cmp r1, #10 8010b66: d00d beq.n 8010b84 <_fwrite_r+0x70> 8010b68: 6823 ldr r3, [r4, #0] 8010b6a: 1c5a adds r2, r3, #1 8010b6c: 6022 str r2, [r4, #0] 8010b6e: 7019 strb r1, [r3, #0] 8010b70: 3501 adds r5, #1 8010b72: e7eb b.n 8010b4c <_fwrite_r+0x38> 8010b74: 4621 mov r1, r4 8010b76: 4630 mov r0, r6 8010b78: f000 f91c bl 8010db4 <__swsetup_r> 8010b7c: 2800 cmp r0, #0 8010b7e: d0e4 beq.n 8010b4a <_fwrite_r+0x36> 8010b80: 2500 movs r5, #0 8010b82: e005 b.n 8010b90 <_fwrite_r+0x7c> 8010b84: 4622 mov r2, r4 8010b86: 4630 mov r0, r6 8010b88: f000 f8d7 bl 8010d3a <__swbuf_r> 8010b8c: 3001 adds r0, #1 8010b8e: d1ef bne.n 8010b70 <_fwrite_r+0x5c> 8010b90: 6e63 ldr r3, [r4, #100] ; 0x64 8010b92: 07da lsls r2, r3, #31 8010b94: d405 bmi.n 8010ba2 <_fwrite_r+0x8e> 8010b96: 89a3 ldrh r3, [r4, #12] 8010b98: 059b lsls r3, r3, #22 8010b9a: d402 bmi.n 8010ba2 <_fwrite_r+0x8e> 8010b9c: 6da0 ldr r0, [r4, #88] ; 0x58 8010b9e: f000 f9f3 bl 8010f88 <__retarget_lock_release_recursive> 8010ba2: fbb5 f0f8 udiv r0, r5, r8 8010ba6: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} ... 08010bac : 8010bac: b507 push {r0, r1, r2, lr} 8010bae: 9300 str r3, [sp, #0] 8010bb0: 4613 mov r3, r2 8010bb2: 460a mov r2, r1 8010bb4: 4601 mov r1, r0 8010bb6: 4803 ldr r0, [pc, #12] ; (8010bc4 ) 8010bb8: 6800 ldr r0, [r0, #0] 8010bba: f7ff ffab bl 8010b14 <_fwrite_r> 8010bbe: b003 add sp, #12 8010bc0: f85d fb04 ldr.w pc, [sp], #4 8010bc4: 240000cc .word 0x240000cc 08010bc8 : 8010bc8: b40f push {r0, r1, r2, r3} 8010bca: b507 push {r0, r1, r2, lr} 8010bcc: 4906 ldr r1, [pc, #24] ; (8010be8 ) 8010bce: ab04 add r3, sp, #16 8010bd0: 6808 ldr r0, [r1, #0] 8010bd2: f853 2b04 ldr.w r2, [r3], #4 8010bd6: 6881 ldr r1, [r0, #8] 8010bd8: 9301 str r3, [sp, #4] 8010bda: f7ff fc25 bl 8010428 <_vfiprintf_r> 8010bde: b003 add sp, #12 8010be0: f85d eb04 ldr.w lr, [sp], #4 8010be4: b004 add sp, #16 8010be6: 4770 bx lr 8010be8: 240000cc .word 0x240000cc 08010bec : 8010bec: 4b02 ldr r3, [pc, #8] ; (8010bf8 ) 8010bee: 4601 mov r1, r0 8010bf0: 6818 ldr r0, [r3, #0] 8010bf2: 6882 ldr r2, [r0, #8] 8010bf4: f000 bc18 b.w 8011428 <_putc_r> 8010bf8: 240000cc .word 0x240000cc 08010bfc <_puts_r>: 8010bfc: 6a03 ldr r3, [r0, #32] 8010bfe: b570 push {r4, r5, r6, lr} 8010c00: 6884 ldr r4, [r0, #8] 8010c02: 4605 mov r5, r0 8010c04: 460e mov r6, r1 8010c06: b90b cbnz r3, 8010c0c <_puts_r+0x10> 8010c08: f7ff ff4e bl 8010aa8 <__sinit> 8010c0c: 6e63 ldr r3, [r4, #100] ; 0x64 8010c0e: 07db lsls r3, r3, #31 8010c10: d405 bmi.n 8010c1e <_puts_r+0x22> 8010c12: 89a3 ldrh r3, [r4, #12] 8010c14: 0598 lsls r0, r3, #22 8010c16: d402 bmi.n 8010c1e <_puts_r+0x22> 8010c18: 6da0 ldr r0, [r4, #88] ; 0x58 8010c1a: f000 f9b4 bl 8010f86 <__retarget_lock_acquire_recursive> 8010c1e: 89a3 ldrh r3, [r4, #12] 8010c20: 0719 lsls r1, r3, #28 8010c22: d513 bpl.n 8010c4c <_puts_r+0x50> 8010c24: 6923 ldr r3, [r4, #16] 8010c26: b18b cbz r3, 8010c4c <_puts_r+0x50> 8010c28: 3e01 subs r6, #1 8010c2a: 68a3 ldr r3, [r4, #8] 8010c2c: f816 1f01 ldrb.w r1, [r6, #1]! 8010c30: 3b01 subs r3, #1 8010c32: 60a3 str r3, [r4, #8] 8010c34: b9e9 cbnz r1, 8010c72 <_puts_r+0x76> 8010c36: 2b00 cmp r3, #0 8010c38: da2e bge.n 8010c98 <_puts_r+0x9c> 8010c3a: 4622 mov r2, r4 8010c3c: 210a movs r1, #10 8010c3e: 4628 mov r0, r5 8010c40: f000 f87b bl 8010d3a <__swbuf_r> 8010c44: 3001 adds r0, #1 8010c46: d007 beq.n 8010c58 <_puts_r+0x5c> 8010c48: 250a movs r5, #10 8010c4a: e007 b.n 8010c5c <_puts_r+0x60> 8010c4c: 4621 mov r1, r4 8010c4e: 4628 mov r0, r5 8010c50: f000 f8b0 bl 8010db4 <__swsetup_r> 8010c54: 2800 cmp r0, #0 8010c56: d0e7 beq.n 8010c28 <_puts_r+0x2c> 8010c58: f04f 35ff mov.w r5, #4294967295 8010c5c: 6e63 ldr r3, [r4, #100] ; 0x64 8010c5e: 07da lsls r2, r3, #31 8010c60: d405 bmi.n 8010c6e <_puts_r+0x72> 8010c62: 89a3 ldrh r3, [r4, #12] 8010c64: 059b lsls r3, r3, #22 8010c66: d402 bmi.n 8010c6e <_puts_r+0x72> 8010c68: 6da0 ldr r0, [r4, #88] ; 0x58 8010c6a: f000 f98d bl 8010f88 <__retarget_lock_release_recursive> 8010c6e: 4628 mov r0, r5 8010c70: bd70 pop {r4, r5, r6, pc} 8010c72: 2b00 cmp r3, #0 8010c74: da04 bge.n 8010c80 <_puts_r+0x84> 8010c76: 69a2 ldr r2, [r4, #24] 8010c78: 429a cmp r2, r3 8010c7a: dc06 bgt.n 8010c8a <_puts_r+0x8e> 8010c7c: 290a cmp r1, #10 8010c7e: d004 beq.n 8010c8a <_puts_r+0x8e> 8010c80: 6823 ldr r3, [r4, #0] 8010c82: 1c5a adds r2, r3, #1 8010c84: 6022 str r2, [r4, #0] 8010c86: 7019 strb r1, [r3, #0] 8010c88: e7cf b.n 8010c2a <_puts_r+0x2e> 8010c8a: 4622 mov r2, r4 8010c8c: 4628 mov r0, r5 8010c8e: f000 f854 bl 8010d3a <__swbuf_r> 8010c92: 3001 adds r0, #1 8010c94: d1c9 bne.n 8010c2a <_puts_r+0x2e> 8010c96: e7df b.n 8010c58 <_puts_r+0x5c> 8010c98: 6823 ldr r3, [r4, #0] 8010c9a: 250a movs r5, #10 8010c9c: 1c5a adds r2, r3, #1 8010c9e: 6022 str r2, [r4, #0] 8010ca0: 701d strb r5, [r3, #0] 8010ca2: e7db b.n 8010c5c <_puts_r+0x60> 08010ca4 : 8010ca4: 4b02 ldr r3, [pc, #8] ; (8010cb0 ) 8010ca6: 4601 mov r1, r0 8010ca8: 6818 ldr r0, [r3, #0] 8010caa: f7ff bfa7 b.w 8010bfc <_puts_r> 8010cae: bf00 nop 8010cb0: 240000cc .word 0x240000cc 08010cb4 <__sread>: 8010cb4: b510 push {r4, lr} 8010cb6: 460c mov r4, r1 8010cb8: f9b1 100e ldrsh.w r1, [r1, #14] 8010cbc: f000 f91a bl 8010ef4 <_read_r> 8010cc0: 2800 cmp r0, #0 8010cc2: bfab itete ge 8010cc4: 6d63 ldrge r3, [r4, #84] ; 0x54 8010cc6: 89a3 ldrhlt r3, [r4, #12] 8010cc8: 181b addge r3, r3, r0 8010cca: f423 5380 biclt.w r3, r3, #4096 ; 0x1000 8010cce: bfac ite ge 8010cd0: 6563 strge r3, [r4, #84] ; 0x54 8010cd2: 81a3 strhlt r3, [r4, #12] 8010cd4: bd10 pop {r4, pc} 08010cd6 <__swrite>: 8010cd6: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8010cda: 461f mov r7, r3 8010cdc: 898b ldrh r3, [r1, #12] 8010cde: 05db lsls r3, r3, #23 8010ce0: 4605 mov r5, r0 8010ce2: 460c mov r4, r1 8010ce4: 4616 mov r6, r2 8010ce6: d505 bpl.n 8010cf4 <__swrite+0x1e> 8010ce8: f9b1 100e ldrsh.w r1, [r1, #14] 8010cec: 2302 movs r3, #2 8010cee: 2200 movs r2, #0 8010cf0: f000 f8ee bl 8010ed0 <_lseek_r> 8010cf4: 89a3 ldrh r3, [r4, #12] 8010cf6: f9b4 100e ldrsh.w r1, [r4, #14] 8010cfa: f423 5380 bic.w r3, r3, #4096 ; 0x1000 8010cfe: 81a3 strh r3, [r4, #12] 8010d00: 4632 mov r2, r6 8010d02: 463b mov r3, r7 8010d04: 4628 mov r0, r5 8010d06: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} 8010d0a: f000 b905 b.w 8010f18 <_write_r> 08010d0e <__sseek>: 8010d0e: b510 push {r4, lr} 8010d10: 460c mov r4, r1 8010d12: f9b1 100e ldrsh.w r1, [r1, #14] 8010d16: f000 f8db bl 8010ed0 <_lseek_r> 8010d1a: 1c43 adds r3, r0, #1 8010d1c: 89a3 ldrh r3, [r4, #12] 8010d1e: bf15 itete ne 8010d20: 6560 strne r0, [r4, #84] ; 0x54 8010d22: f423 5380 biceq.w r3, r3, #4096 ; 0x1000 8010d26: f443 5380 orrne.w r3, r3, #4096 ; 0x1000 8010d2a: 81a3 strheq r3, [r4, #12] 8010d2c: bf18 it ne 8010d2e: 81a3 strhne r3, [r4, #12] 8010d30: bd10 pop {r4, pc} 08010d32 <__sclose>: 8010d32: f9b1 100e ldrsh.w r1, [r1, #14] 8010d36: f000 b8bb b.w 8010eb0 <_close_r> 08010d3a <__swbuf_r>: 8010d3a: b5f8 push {r3, r4, r5, r6, r7, lr} 8010d3c: 460e mov r6, r1 8010d3e: 4614 mov r4, r2 8010d40: 4605 mov r5, r0 8010d42: b118 cbz r0, 8010d4c <__swbuf_r+0x12> 8010d44: 6a03 ldr r3, [r0, #32] 8010d46: b90b cbnz r3, 8010d4c <__swbuf_r+0x12> 8010d48: f7ff feae bl 8010aa8 <__sinit> 8010d4c: 69a3 ldr r3, [r4, #24] 8010d4e: 60a3 str r3, [r4, #8] 8010d50: 89a3 ldrh r3, [r4, #12] 8010d52: 071a lsls r2, r3, #28 8010d54: d525 bpl.n 8010da2 <__swbuf_r+0x68> 8010d56: 6923 ldr r3, [r4, #16] 8010d58: b31b cbz r3, 8010da2 <__swbuf_r+0x68> 8010d5a: 6823 ldr r3, [r4, #0] 8010d5c: 6922 ldr r2, [r4, #16] 8010d5e: 1a98 subs r0, r3, r2 8010d60: 6963 ldr r3, [r4, #20] 8010d62: b2f6 uxtb r6, r6 8010d64: 4283 cmp r3, r0 8010d66: 4637 mov r7, r6 8010d68: dc04 bgt.n 8010d74 <__swbuf_r+0x3a> 8010d6a: 4621 mov r1, r4 8010d6c: 4628 mov r0, r5 8010d6e: f000 fabf bl 80112f0 <_fflush_r> 8010d72: b9e0 cbnz r0, 8010dae <__swbuf_r+0x74> 8010d74: 68a3 ldr r3, [r4, #8] 8010d76: 3b01 subs r3, #1 8010d78: 60a3 str r3, [r4, #8] 8010d7a: 6823 ldr r3, [r4, #0] 8010d7c: 1c5a adds r2, r3, #1 8010d7e: 6022 str r2, [r4, #0] 8010d80: 701e strb r6, [r3, #0] 8010d82: 6962 ldr r2, [r4, #20] 8010d84: 1c43 adds r3, r0, #1 8010d86: 429a cmp r2, r3 8010d88: d004 beq.n 8010d94 <__swbuf_r+0x5a> 8010d8a: 89a3 ldrh r3, [r4, #12] 8010d8c: 07db lsls r3, r3, #31 8010d8e: d506 bpl.n 8010d9e <__swbuf_r+0x64> 8010d90: 2e0a cmp r6, #10 8010d92: d104 bne.n 8010d9e <__swbuf_r+0x64> 8010d94: 4621 mov r1, r4 8010d96: 4628 mov r0, r5 8010d98: f000 faaa bl 80112f0 <_fflush_r> 8010d9c: b938 cbnz r0, 8010dae <__swbuf_r+0x74> 8010d9e: 4638 mov r0, r7 8010da0: bdf8 pop {r3, r4, r5, r6, r7, pc} 8010da2: 4621 mov r1, r4 8010da4: 4628 mov r0, r5 8010da6: f000 f805 bl 8010db4 <__swsetup_r> 8010daa: 2800 cmp r0, #0 8010dac: d0d5 beq.n 8010d5a <__swbuf_r+0x20> 8010dae: f04f 37ff mov.w r7, #4294967295 8010db2: e7f4 b.n 8010d9e <__swbuf_r+0x64> 08010db4 <__swsetup_r>: 8010db4: b538 push {r3, r4, r5, lr} 8010db6: 4b2a ldr r3, [pc, #168] ; (8010e60 <__swsetup_r+0xac>) 8010db8: 4605 mov r5, r0 8010dba: 6818 ldr r0, [r3, #0] 8010dbc: 460c mov r4, r1 8010dbe: b118 cbz r0, 8010dc8 <__swsetup_r+0x14> 8010dc0: 6a03 ldr r3, [r0, #32] 8010dc2: b90b cbnz r3, 8010dc8 <__swsetup_r+0x14> 8010dc4: f7ff fe70 bl 8010aa8 <__sinit> 8010dc8: 89a3 ldrh r3, [r4, #12] 8010dca: f9b4 200c ldrsh.w r2, [r4, #12] 8010dce: 0718 lsls r0, r3, #28 8010dd0: d422 bmi.n 8010e18 <__swsetup_r+0x64> 8010dd2: 06d9 lsls r1, r3, #27 8010dd4: d407 bmi.n 8010de6 <__swsetup_r+0x32> 8010dd6: 2309 movs r3, #9 8010dd8: 602b str r3, [r5, #0] 8010dda: f042 0340 orr.w r3, r2, #64 ; 0x40 8010dde: 81a3 strh r3, [r4, #12] 8010de0: f04f 30ff mov.w r0, #4294967295 8010de4: e034 b.n 8010e50 <__swsetup_r+0x9c> 8010de6: 0758 lsls r0, r3, #29 8010de8: d512 bpl.n 8010e10 <__swsetup_r+0x5c> 8010dea: 6b61 ldr r1, [r4, #52] ; 0x34 8010dec: b141 cbz r1, 8010e00 <__swsetup_r+0x4c> 8010dee: f104 0344 add.w r3, r4, #68 ; 0x44 8010df2: 4299 cmp r1, r3 8010df4: d002 beq.n 8010dfc <__swsetup_r+0x48> 8010df6: 4628 mov r0, r5 8010df8: f000 f8f4 bl 8010fe4 <_free_r> 8010dfc: 2300 movs r3, #0 8010dfe: 6363 str r3, [r4, #52] ; 0x34 8010e00: 89a3 ldrh r3, [r4, #12] 8010e02: f023 0324 bic.w r3, r3, #36 ; 0x24 8010e06: 81a3 strh r3, [r4, #12] 8010e08: 2300 movs r3, #0 8010e0a: 6063 str r3, [r4, #4] 8010e0c: 6923 ldr r3, [r4, #16] 8010e0e: 6023 str r3, [r4, #0] 8010e10: 89a3 ldrh r3, [r4, #12] 8010e12: f043 0308 orr.w r3, r3, #8 8010e16: 81a3 strh r3, [r4, #12] 8010e18: 6923 ldr r3, [r4, #16] 8010e1a: b94b cbnz r3, 8010e30 <__swsetup_r+0x7c> 8010e1c: 89a3 ldrh r3, [r4, #12] 8010e1e: f403 7320 and.w r3, r3, #640 ; 0x280 8010e22: f5b3 7f00 cmp.w r3, #512 ; 0x200 8010e26: d003 beq.n 8010e30 <__swsetup_r+0x7c> 8010e28: 4621 mov r1, r4 8010e2a: 4628 mov r0, r5 8010e2c: f000 fac0 bl 80113b0 <__smakebuf_r> 8010e30: 89a0 ldrh r0, [r4, #12] 8010e32: f9b4 200c ldrsh.w r2, [r4, #12] 8010e36: f010 0301 ands.w r3, r0, #1 8010e3a: d00a beq.n 8010e52 <__swsetup_r+0x9e> 8010e3c: 2300 movs r3, #0 8010e3e: 60a3 str r3, [r4, #8] 8010e40: 6963 ldr r3, [r4, #20] 8010e42: 425b negs r3, r3 8010e44: 61a3 str r3, [r4, #24] 8010e46: 6923 ldr r3, [r4, #16] 8010e48: b943 cbnz r3, 8010e5c <__swsetup_r+0xa8> 8010e4a: f010 0080 ands.w r0, r0, #128 ; 0x80 8010e4e: d1c4 bne.n 8010dda <__swsetup_r+0x26> 8010e50: bd38 pop {r3, r4, r5, pc} 8010e52: 0781 lsls r1, r0, #30 8010e54: bf58 it pl 8010e56: 6963 ldrpl r3, [r4, #20] 8010e58: 60a3 str r3, [r4, #8] 8010e5a: e7f4 b.n 8010e46 <__swsetup_r+0x92> 8010e5c: 2000 movs r0, #0 8010e5e: e7f7 b.n 8010e50 <__swsetup_r+0x9c> 8010e60: 240000cc .word 0x240000cc 08010e64 : 8010e64: b510 push {r4, lr} 8010e66: 3901 subs r1, #1 8010e68: 4402 add r2, r0 8010e6a: 4290 cmp r0, r2 8010e6c: d101 bne.n 8010e72 8010e6e: 2000 movs r0, #0 8010e70: e005 b.n 8010e7e 8010e72: 7803 ldrb r3, [r0, #0] 8010e74: f811 4f01 ldrb.w r4, [r1, #1]! 8010e78: 42a3 cmp r3, r4 8010e7a: d001 beq.n 8010e80 8010e7c: 1b18 subs r0, r3, r4 8010e7e: bd10 pop {r4, pc} 8010e80: 3001 adds r0, #1 8010e82: e7f2 b.n 8010e6a 08010e84 : 8010e84: 4402 add r2, r0 8010e86: 4603 mov r3, r0 8010e88: 4293 cmp r3, r2 8010e8a: d100 bne.n 8010e8e 8010e8c: 4770 bx lr 8010e8e: f803 1b01 strb.w r1, [r3], #1 8010e92: e7f9 b.n 8010e88 08010e94 : 8010e94: b2c9 uxtb r1, r1 8010e96: 4603 mov r3, r0 8010e98: f810 2b01 ldrb.w r2, [r0], #1 8010e9c: b11a cbz r2, 8010ea6 8010e9e: 428a cmp r2, r1 8010ea0: d1f9 bne.n 8010e96 8010ea2: 4618 mov r0, r3 8010ea4: 4770 bx lr 8010ea6: 2900 cmp r1, #0 8010ea8: bf18 it ne 8010eaa: 2300 movne r3, #0 8010eac: e7f9 b.n 8010ea2 ... 08010eb0 <_close_r>: 8010eb0: b538 push {r3, r4, r5, lr} 8010eb2: 4d06 ldr r5, [pc, #24] ; (8010ecc <_close_r+0x1c>) 8010eb4: 2300 movs r3, #0 8010eb6: 4604 mov r4, r0 8010eb8: 4608 mov r0, r1 8010eba: 602b str r3, [r5, #0] 8010ebc: f7ef fda1 bl 8000a02 <_close> 8010ec0: 1c43 adds r3, r0, #1 8010ec2: d102 bne.n 8010eca <_close_r+0x1a> 8010ec4: 682b ldr r3, [r5, #0] 8010ec6: b103 cbz r3, 8010eca <_close_r+0x1a> 8010ec8: 6023 str r3, [r4, #0] 8010eca: bd38 pop {r3, r4, r5, pc} 8010ecc: 24007e08 .word 0x24007e08 08010ed0 <_lseek_r>: 8010ed0: b538 push {r3, r4, r5, lr} 8010ed2: 4d07 ldr r5, [pc, #28] ; (8010ef0 <_lseek_r+0x20>) 8010ed4: 4604 mov r4, r0 8010ed6: 4608 mov r0, r1 8010ed8: 4611 mov r1, r2 8010eda: 2200 movs r2, #0 8010edc: 602a str r2, [r5, #0] 8010ede: 461a mov r2, r3 8010ee0: f7ef fdb6 bl 8000a50 <_lseek> 8010ee4: 1c43 adds r3, r0, #1 8010ee6: d102 bne.n 8010eee <_lseek_r+0x1e> 8010ee8: 682b ldr r3, [r5, #0] 8010eea: b103 cbz r3, 8010eee <_lseek_r+0x1e> 8010eec: 6023 str r3, [r4, #0] 8010eee: bd38 pop {r3, r4, r5, pc} 8010ef0: 24007e08 .word 0x24007e08 08010ef4 <_read_r>: 8010ef4: b538 push {r3, r4, r5, lr} 8010ef6: 4d07 ldr r5, [pc, #28] ; (8010f14 <_read_r+0x20>) 8010ef8: 4604 mov r4, r0 8010efa: 4608 mov r0, r1 8010efc: 4611 mov r1, r2 8010efe: 2200 movs r2, #0 8010f00: 602a str r2, [r5, #0] 8010f02: 461a mov r2, r3 8010f04: f7ef fd60 bl 80009c8 <_read> 8010f08: 1c43 adds r3, r0, #1 8010f0a: d102 bne.n 8010f12 <_read_r+0x1e> 8010f0c: 682b ldr r3, [r5, #0] 8010f0e: b103 cbz r3, 8010f12 <_read_r+0x1e> 8010f10: 6023 str r3, [r4, #0] 8010f12: bd38 pop {r3, r4, r5, pc} 8010f14: 24007e08 .word 0x24007e08 08010f18 <_write_r>: 8010f18: b538 push {r3, r4, r5, lr} 8010f1a: 4d07 ldr r5, [pc, #28] ; (8010f38 <_write_r+0x20>) 8010f1c: 4604 mov r4, r0 8010f1e: 4608 mov r0, r1 8010f20: 4611 mov r1, r2 8010f22: 2200 movs r2, #0 8010f24: 602a str r2, [r5, #0] 8010f26: 461a mov r2, r3 8010f28: f7ef fa71 bl 800040e <_write> 8010f2c: 1c43 adds r3, r0, #1 8010f2e: d102 bne.n 8010f36 <_write_r+0x1e> 8010f30: 682b ldr r3, [r5, #0] 8010f32: b103 cbz r3, 8010f36 <_write_r+0x1e> 8010f34: 6023 str r3, [r4, #0] 8010f36: bd38 pop {r3, r4, r5, pc} 8010f38: 24007e08 .word 0x24007e08 08010f3c <__libc_init_array>: 8010f3c: b570 push {r4, r5, r6, lr} 8010f3e: 4d0d ldr r5, [pc, #52] ; (8010f74 <__libc_init_array+0x38>) 8010f40: 4c0d ldr r4, [pc, #52] ; (8010f78 <__libc_init_array+0x3c>) 8010f42: 1b64 subs r4, r4, r5 8010f44: 10a4 asrs r4, r4, #2 8010f46: 2600 movs r6, #0 8010f48: 42a6 cmp r6, r4 8010f4a: d109 bne.n 8010f60 <__libc_init_array+0x24> 8010f4c: 4d0b ldr r5, [pc, #44] ; (8010f7c <__libc_init_array+0x40>) 8010f4e: 4c0c ldr r4, [pc, #48] ; (8010f80 <__libc_init_array+0x44>) 8010f50: f000 fb1c bl 801158c <_init> 8010f54: 1b64 subs r4, r4, r5 8010f56: 10a4 asrs r4, r4, #2 8010f58: 2600 movs r6, #0 8010f5a: 42a6 cmp r6, r4 8010f5c: d105 bne.n 8010f6a <__libc_init_array+0x2e> 8010f5e: bd70 pop {r4, r5, r6, pc} 8010f60: f855 3b04 ldr.w r3, [r5], #4 8010f64: 4798 blx r3 8010f66: 3601 adds r6, #1 8010f68: e7ee b.n 8010f48 <__libc_init_array+0xc> 8010f6a: f855 3b04 ldr.w r3, [r5], #4 8010f6e: 4798 blx r3 8010f70: 3601 adds r6, #1 8010f72: e7f2 b.n 8010f5a <__libc_init_array+0x1e> 8010f74: 08014f88 .word 0x08014f88 8010f78: 08014f88 .word 0x08014f88 8010f7c: 08014f88 .word 0x08014f88 8010f80: 08014f8c .word 0x08014f8c 08010f84 <__retarget_lock_init_recursive>: 8010f84: 4770 bx lr 08010f86 <__retarget_lock_acquire_recursive>: 8010f86: 4770 bx lr 08010f88 <__retarget_lock_release_recursive>: 8010f88: 4770 bx lr 08010f8a : 8010f8a: 440a add r2, r1 8010f8c: 4291 cmp r1, r2 8010f8e: f100 33ff add.w r3, r0, #4294967295 8010f92: d100 bne.n 8010f96 8010f94: 4770 bx lr 8010f96: b510 push {r4, lr} 8010f98: f811 4b01 ldrb.w r4, [r1], #1 8010f9c: f803 4f01 strb.w r4, [r3, #1]! 8010fa0: 4291 cmp r1, r2 8010fa2: d1f9 bne.n 8010f98 8010fa4: bd10 pop {r4, pc} ... 08010fa8 <__assert_func>: 8010fa8: b51f push {r0, r1, r2, r3, r4, lr} 8010faa: 4614 mov r4, r2 8010fac: 461a mov r2, r3 8010fae: 4b09 ldr r3, [pc, #36] ; (8010fd4 <__assert_func+0x2c>) 8010fb0: 681b ldr r3, [r3, #0] 8010fb2: 4605 mov r5, r0 8010fb4: 68d8 ldr r0, [r3, #12] 8010fb6: b14c cbz r4, 8010fcc <__assert_func+0x24> 8010fb8: 4b07 ldr r3, [pc, #28] ; (8010fd8 <__assert_func+0x30>) 8010fba: 9100 str r1, [sp, #0] 8010fbc: e9cd 3401 strd r3, r4, [sp, #4] 8010fc0: 4906 ldr r1, [pc, #24] ; (8010fdc <__assert_func+0x34>) 8010fc2: 462b mov r3, r5 8010fc4: f000 f9bc bl 8011340 8010fc8: f000 fa94 bl 80114f4 8010fcc: 4b04 ldr r3, [pc, #16] ; (8010fe0 <__assert_func+0x38>) 8010fce: 461c mov r4, r3 8010fd0: e7f3 b.n 8010fba <__assert_func+0x12> 8010fd2: bf00 nop 8010fd4: 240000cc .word 0x240000cc 8010fd8: 08014f49 .word 0x08014f49 8010fdc: 08014f56 .word 0x08014f56 8010fe0: 08014f84 .word 0x08014f84 08010fe4 <_free_r>: 8010fe4: b537 push {r0, r1, r2, r4, r5, lr} 8010fe6: 2900 cmp r1, #0 8010fe8: d044 beq.n 8011074 <_free_r+0x90> 8010fea: f851 3c04 ldr.w r3, [r1, #-4] 8010fee: 9001 str r0, [sp, #4] 8010ff0: 2b00 cmp r3, #0 8010ff2: f1a1 0404 sub.w r4, r1, #4 8010ff6: bfb8 it lt 8010ff8: 18e4 addlt r4, r4, r3 8010ffa: f000 f8e7 bl 80111cc <__malloc_lock> 8010ffe: 4a1e ldr r2, [pc, #120] ; (8011078 <_free_r+0x94>) 8011000: 9801 ldr r0, [sp, #4] 8011002: 6813 ldr r3, [r2, #0] 8011004: b933 cbnz r3, 8011014 <_free_r+0x30> 8011006: 6063 str r3, [r4, #4] 8011008: 6014 str r4, [r2, #0] 801100a: b003 add sp, #12 801100c: e8bd 4030 ldmia.w sp!, {r4, r5, lr} 8011010: f000 b8e2 b.w 80111d8 <__malloc_unlock> 8011014: 42a3 cmp r3, r4 8011016: d908 bls.n 801102a <_free_r+0x46> 8011018: 6825 ldr r5, [r4, #0] 801101a: 1961 adds r1, r4, r5 801101c: 428b cmp r3, r1 801101e: bf01 itttt eq 8011020: 6819 ldreq r1, [r3, #0] 8011022: 685b ldreq r3, [r3, #4] 8011024: 1949 addeq r1, r1, r5 8011026: 6021 streq r1, [r4, #0] 8011028: e7ed b.n 8011006 <_free_r+0x22> 801102a: 461a mov r2, r3 801102c: 685b ldr r3, [r3, #4] 801102e: b10b cbz r3, 8011034 <_free_r+0x50> 8011030: 42a3 cmp r3, r4 8011032: d9fa bls.n 801102a <_free_r+0x46> 8011034: 6811 ldr r1, [r2, #0] 8011036: 1855 adds r5, r2, r1 8011038: 42a5 cmp r5, r4 801103a: d10b bne.n 8011054 <_free_r+0x70> 801103c: 6824 ldr r4, [r4, #0] 801103e: 4421 add r1, r4 8011040: 1854 adds r4, r2, r1 8011042: 42a3 cmp r3, r4 8011044: 6011 str r1, [r2, #0] 8011046: d1e0 bne.n 801100a <_free_r+0x26> 8011048: 681c ldr r4, [r3, #0] 801104a: 685b ldr r3, [r3, #4] 801104c: 6053 str r3, [r2, #4] 801104e: 440c add r4, r1 8011050: 6014 str r4, [r2, #0] 8011052: e7da b.n 801100a <_free_r+0x26> 8011054: d902 bls.n 801105c <_free_r+0x78> 8011056: 230c movs r3, #12 8011058: 6003 str r3, [r0, #0] 801105a: e7d6 b.n 801100a <_free_r+0x26> 801105c: 6825 ldr r5, [r4, #0] 801105e: 1961 adds r1, r4, r5 8011060: 428b cmp r3, r1 8011062: bf04 itt eq 8011064: 6819 ldreq r1, [r3, #0] 8011066: 685b ldreq r3, [r3, #4] 8011068: 6063 str r3, [r4, #4] 801106a: bf04 itt eq 801106c: 1949 addeq r1, r1, r5 801106e: 6021 streq r1, [r4, #0] 8011070: 6054 str r4, [r2, #4] 8011072: e7ca b.n 801100a <_free_r+0x26> 8011074: b003 add sp, #12 8011076: bd30 pop {r4, r5, pc} 8011078: 24007e10 .word 0x24007e10 0801107c : 801107c: 4b02 ldr r3, [pc, #8] ; (8011088 ) 801107e: 4601 mov r1, r0 8011080: 6818 ldr r0, [r3, #0] 8011082: f000 b823 b.w 80110cc <_malloc_r> 8011086: bf00 nop 8011088: 240000cc .word 0x240000cc 0801108c : 801108c: b570 push {r4, r5, r6, lr} 801108e: 4e0e ldr r6, [pc, #56] ; (80110c8 ) 8011090: 460c mov r4, r1 8011092: 6831 ldr r1, [r6, #0] 8011094: 4605 mov r5, r0 8011096: b911 cbnz r1, 801109e 8011098: f000 fa1c bl 80114d4 <_sbrk_r> 801109c: 6030 str r0, [r6, #0] 801109e: 4621 mov r1, r4 80110a0: 4628 mov r0, r5 80110a2: f000 fa17 bl 80114d4 <_sbrk_r> 80110a6: 1c43 adds r3, r0, #1 80110a8: d00a beq.n 80110c0 80110aa: 1cc4 adds r4, r0, #3 80110ac: f024 0403 bic.w r4, r4, #3 80110b0: 42a0 cmp r0, r4 80110b2: d007 beq.n 80110c4 80110b4: 1a21 subs r1, r4, r0 80110b6: 4628 mov r0, r5 80110b8: f000 fa0c bl 80114d4 <_sbrk_r> 80110bc: 3001 adds r0, #1 80110be: d101 bne.n 80110c4 80110c0: f04f 34ff mov.w r4, #4294967295 80110c4: 4620 mov r0, r4 80110c6: bd70 pop {r4, r5, r6, pc} 80110c8: 24007e14 .word 0x24007e14 080110cc <_malloc_r>: 80110cc: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 80110d0: 1ccd adds r5, r1, #3 80110d2: f025 0503 bic.w r5, r5, #3 80110d6: 3508 adds r5, #8 80110d8: 2d0c cmp r5, #12 80110da: bf38 it cc 80110dc: 250c movcc r5, #12 80110de: 2d00 cmp r5, #0 80110e0: 4607 mov r7, r0 80110e2: db01 blt.n 80110e8 <_malloc_r+0x1c> 80110e4: 42a9 cmp r1, r5 80110e6: d905 bls.n 80110f4 <_malloc_r+0x28> 80110e8: 230c movs r3, #12 80110ea: 603b str r3, [r7, #0] 80110ec: 2600 movs r6, #0 80110ee: 4630 mov r0, r6 80110f0: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 80110f4: f8df 80d0 ldr.w r8, [pc, #208] ; 80111c8 <_malloc_r+0xfc> 80110f8: f000 f868 bl 80111cc <__malloc_lock> 80110fc: f8d8 3000 ldr.w r3, [r8] 8011100: 461c mov r4, r3 8011102: bb5c cbnz r4, 801115c <_malloc_r+0x90> 8011104: 4629 mov r1, r5 8011106: 4638 mov r0, r7 8011108: f7ff ffc0 bl 801108c 801110c: 1c43 adds r3, r0, #1 801110e: 4604 mov r4, r0 8011110: d155 bne.n 80111be <_malloc_r+0xf2> 8011112: f8d8 4000 ldr.w r4, [r8] 8011116: 4626 mov r6, r4 8011118: 2e00 cmp r6, #0 801111a: d145 bne.n 80111a8 <_malloc_r+0xdc> 801111c: 2c00 cmp r4, #0 801111e: d048 beq.n 80111b2 <_malloc_r+0xe6> 8011120: 6823 ldr r3, [r4, #0] 8011122: 4631 mov r1, r6 8011124: 4638 mov r0, r7 8011126: eb04 0903 add.w r9, r4, r3 801112a: f000 f9d3 bl 80114d4 <_sbrk_r> 801112e: 4581 cmp r9, r0 8011130: d13f bne.n 80111b2 <_malloc_r+0xe6> 8011132: 6821 ldr r1, [r4, #0] 8011134: 1a6d subs r5, r5, r1 8011136: 4629 mov r1, r5 8011138: 4638 mov r0, r7 801113a: f7ff ffa7 bl 801108c 801113e: 3001 adds r0, #1 8011140: d037 beq.n 80111b2 <_malloc_r+0xe6> 8011142: 6823 ldr r3, [r4, #0] 8011144: 442b add r3, r5 8011146: 6023 str r3, [r4, #0] 8011148: f8d8 3000 ldr.w r3, [r8] 801114c: 2b00 cmp r3, #0 801114e: d038 beq.n 80111c2 <_malloc_r+0xf6> 8011150: 685a ldr r2, [r3, #4] 8011152: 42a2 cmp r2, r4 8011154: d12b bne.n 80111ae <_malloc_r+0xe2> 8011156: 2200 movs r2, #0 8011158: 605a str r2, [r3, #4] 801115a: e00f b.n 801117c <_malloc_r+0xb0> 801115c: 6822 ldr r2, [r4, #0] 801115e: 1b52 subs r2, r2, r5 8011160: d41f bmi.n 80111a2 <_malloc_r+0xd6> 8011162: 2a0b cmp r2, #11 8011164: d917 bls.n 8011196 <_malloc_r+0xca> 8011166: 1961 adds r1, r4, r5 8011168: 42a3 cmp r3, r4 801116a: 6025 str r5, [r4, #0] 801116c: bf18 it ne 801116e: 6059 strne r1, [r3, #4] 8011170: 6863 ldr r3, [r4, #4] 8011172: bf08 it eq 8011174: f8c8 1000 streq.w r1, [r8] 8011178: 5162 str r2, [r4, r5] 801117a: 604b str r3, [r1, #4] 801117c: 4638 mov r0, r7 801117e: f104 060b add.w r6, r4, #11 8011182: f000 f829 bl 80111d8 <__malloc_unlock> 8011186: f026 0607 bic.w r6, r6, #7 801118a: 1d23 adds r3, r4, #4 801118c: 1af2 subs r2, r6, r3 801118e: d0ae beq.n 80110ee <_malloc_r+0x22> 8011190: 1b9b subs r3, r3, r6 8011192: 50a3 str r3, [r4, r2] 8011194: e7ab b.n 80110ee <_malloc_r+0x22> 8011196: 42a3 cmp r3, r4 8011198: 6862 ldr r2, [r4, #4] 801119a: d1dd bne.n 8011158 <_malloc_r+0x8c> 801119c: f8c8 2000 str.w r2, [r8] 80111a0: e7ec b.n 801117c <_malloc_r+0xb0> 80111a2: 4623 mov r3, r4 80111a4: 6864 ldr r4, [r4, #4] 80111a6: e7ac b.n 8011102 <_malloc_r+0x36> 80111a8: 4634 mov r4, r6 80111aa: 6876 ldr r6, [r6, #4] 80111ac: e7b4 b.n 8011118 <_malloc_r+0x4c> 80111ae: 4613 mov r3, r2 80111b0: e7cc b.n 801114c <_malloc_r+0x80> 80111b2: 230c movs r3, #12 80111b4: 603b str r3, [r7, #0] 80111b6: 4638 mov r0, r7 80111b8: f000 f80e bl 80111d8 <__malloc_unlock> 80111bc: e797 b.n 80110ee <_malloc_r+0x22> 80111be: 6025 str r5, [r4, #0] 80111c0: e7dc b.n 801117c <_malloc_r+0xb0> 80111c2: 605b str r3, [r3, #4] 80111c4: deff udf #255 ; 0xff 80111c6: bf00 nop 80111c8: 24007e10 .word 0x24007e10 080111cc <__malloc_lock>: 80111cc: 4801 ldr r0, [pc, #4] ; (80111d4 <__malloc_lock+0x8>) 80111ce: f7ff beda b.w 8010f86 <__retarget_lock_acquire_recursive> 80111d2: bf00 nop 80111d4: 24007e0c .word 0x24007e0c 080111d8 <__malloc_unlock>: 80111d8: 4801 ldr r0, [pc, #4] ; (80111e0 <__malloc_unlock+0x8>) 80111da: f7ff bed5 b.w 8010f88 <__retarget_lock_release_recursive> 80111de: bf00 nop 80111e0: 24007e0c .word 0x24007e0c 080111e4 <__sflush_r>: 80111e4: 898a ldrh r2, [r1, #12] 80111e6: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80111ea: 4605 mov r5, r0 80111ec: 0710 lsls r0, r2, #28 80111ee: 460c mov r4, r1 80111f0: d458 bmi.n 80112a4 <__sflush_r+0xc0> 80111f2: 684b ldr r3, [r1, #4] 80111f4: 2b00 cmp r3, #0 80111f6: dc05 bgt.n 8011204 <__sflush_r+0x20> 80111f8: 6c0b ldr r3, [r1, #64] ; 0x40 80111fa: 2b00 cmp r3, #0 80111fc: dc02 bgt.n 8011204 <__sflush_r+0x20> 80111fe: 2000 movs r0, #0 8011200: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8011204: 6ae6 ldr r6, [r4, #44] ; 0x2c 8011206: 2e00 cmp r6, #0 8011208: d0f9 beq.n 80111fe <__sflush_r+0x1a> 801120a: 2300 movs r3, #0 801120c: f412 5280 ands.w r2, r2, #4096 ; 0x1000 8011210: 682f ldr r7, [r5, #0] 8011212: 6a21 ldr r1, [r4, #32] 8011214: 602b str r3, [r5, #0] 8011216: d032 beq.n 801127e <__sflush_r+0x9a> 8011218: 6d60 ldr r0, [r4, #84] ; 0x54 801121a: 89a3 ldrh r3, [r4, #12] 801121c: 075a lsls r2, r3, #29 801121e: d505 bpl.n 801122c <__sflush_r+0x48> 8011220: 6863 ldr r3, [r4, #4] 8011222: 1ac0 subs r0, r0, r3 8011224: 6b63 ldr r3, [r4, #52] ; 0x34 8011226: b10b cbz r3, 801122c <__sflush_r+0x48> 8011228: 6c23 ldr r3, [r4, #64] ; 0x40 801122a: 1ac0 subs r0, r0, r3 801122c: 2300 movs r3, #0 801122e: 4602 mov r2, r0 8011230: 6ae6 ldr r6, [r4, #44] ; 0x2c 8011232: 6a21 ldr r1, [r4, #32] 8011234: 4628 mov r0, r5 8011236: 47b0 blx r6 8011238: 1c43 adds r3, r0, #1 801123a: 89a3 ldrh r3, [r4, #12] 801123c: d106 bne.n 801124c <__sflush_r+0x68> 801123e: 6829 ldr r1, [r5, #0] 8011240: 291d cmp r1, #29 8011242: d82b bhi.n 801129c <__sflush_r+0xb8> 8011244: 4a29 ldr r2, [pc, #164] ; (80112ec <__sflush_r+0x108>) 8011246: 410a asrs r2, r1 8011248: 07d6 lsls r6, r2, #31 801124a: d427 bmi.n 801129c <__sflush_r+0xb8> 801124c: 2200 movs r2, #0 801124e: 6062 str r2, [r4, #4] 8011250: 04d9 lsls r1, r3, #19 8011252: 6922 ldr r2, [r4, #16] 8011254: 6022 str r2, [r4, #0] 8011256: d504 bpl.n 8011262 <__sflush_r+0x7e> 8011258: 1c42 adds r2, r0, #1 801125a: d101 bne.n 8011260 <__sflush_r+0x7c> 801125c: 682b ldr r3, [r5, #0] 801125e: b903 cbnz r3, 8011262 <__sflush_r+0x7e> 8011260: 6560 str r0, [r4, #84] ; 0x54 8011262: 6b61 ldr r1, [r4, #52] ; 0x34 8011264: 602f str r7, [r5, #0] 8011266: 2900 cmp r1, #0 8011268: d0c9 beq.n 80111fe <__sflush_r+0x1a> 801126a: f104 0344 add.w r3, r4, #68 ; 0x44 801126e: 4299 cmp r1, r3 8011270: d002 beq.n 8011278 <__sflush_r+0x94> 8011272: 4628 mov r0, r5 8011274: f7ff feb6 bl 8010fe4 <_free_r> 8011278: 2000 movs r0, #0 801127a: 6360 str r0, [r4, #52] ; 0x34 801127c: e7c0 b.n 8011200 <__sflush_r+0x1c> 801127e: 2301 movs r3, #1 8011280: 4628 mov r0, r5 8011282: 47b0 blx r6 8011284: 1c41 adds r1, r0, #1 8011286: d1c8 bne.n 801121a <__sflush_r+0x36> 8011288: 682b ldr r3, [r5, #0] 801128a: 2b00 cmp r3, #0 801128c: d0c5 beq.n 801121a <__sflush_r+0x36> 801128e: 2b1d cmp r3, #29 8011290: d001 beq.n 8011296 <__sflush_r+0xb2> 8011292: 2b16 cmp r3, #22 8011294: d101 bne.n 801129a <__sflush_r+0xb6> 8011296: 602f str r7, [r5, #0] 8011298: e7b1 b.n 80111fe <__sflush_r+0x1a> 801129a: 89a3 ldrh r3, [r4, #12] 801129c: f043 0340 orr.w r3, r3, #64 ; 0x40 80112a0: 81a3 strh r3, [r4, #12] 80112a2: e7ad b.n 8011200 <__sflush_r+0x1c> 80112a4: 690f ldr r7, [r1, #16] 80112a6: 2f00 cmp r7, #0 80112a8: d0a9 beq.n 80111fe <__sflush_r+0x1a> 80112aa: 0793 lsls r3, r2, #30 80112ac: 680e ldr r6, [r1, #0] 80112ae: bf08 it eq 80112b0: 694b ldreq r3, [r1, #20] 80112b2: 600f str r7, [r1, #0] 80112b4: bf18 it ne 80112b6: 2300 movne r3, #0 80112b8: eba6 0807 sub.w r8, r6, r7 80112bc: 608b str r3, [r1, #8] 80112be: f1b8 0f00 cmp.w r8, #0 80112c2: dd9c ble.n 80111fe <__sflush_r+0x1a> 80112c4: 6a21 ldr r1, [r4, #32] 80112c6: 6aa6 ldr r6, [r4, #40] ; 0x28 80112c8: 4643 mov r3, r8 80112ca: 463a mov r2, r7 80112cc: 4628 mov r0, r5 80112ce: 47b0 blx r6 80112d0: 2800 cmp r0, #0 80112d2: dc06 bgt.n 80112e2 <__sflush_r+0xfe> 80112d4: 89a3 ldrh r3, [r4, #12] 80112d6: f043 0340 orr.w r3, r3, #64 ; 0x40 80112da: 81a3 strh r3, [r4, #12] 80112dc: f04f 30ff mov.w r0, #4294967295 80112e0: e78e b.n 8011200 <__sflush_r+0x1c> 80112e2: 4407 add r7, r0 80112e4: eba8 0800 sub.w r8, r8, r0 80112e8: e7e9 b.n 80112be <__sflush_r+0xda> 80112ea: bf00 nop 80112ec: dfbffffe .word 0xdfbffffe 080112f0 <_fflush_r>: 80112f0: b538 push {r3, r4, r5, lr} 80112f2: 690b ldr r3, [r1, #16] 80112f4: 4605 mov r5, r0 80112f6: 460c mov r4, r1 80112f8: b913 cbnz r3, 8011300 <_fflush_r+0x10> 80112fa: 2500 movs r5, #0 80112fc: 4628 mov r0, r5 80112fe: bd38 pop {r3, r4, r5, pc} 8011300: b118 cbz r0, 801130a <_fflush_r+0x1a> 8011302: 6a03 ldr r3, [r0, #32] 8011304: b90b cbnz r3, 801130a <_fflush_r+0x1a> 8011306: f7ff fbcf bl 8010aa8 <__sinit> 801130a: f9b4 300c ldrsh.w r3, [r4, #12] 801130e: 2b00 cmp r3, #0 8011310: d0f3 beq.n 80112fa <_fflush_r+0xa> 8011312: 6e62 ldr r2, [r4, #100] ; 0x64 8011314: 07d0 lsls r0, r2, #31 8011316: d404 bmi.n 8011322 <_fflush_r+0x32> 8011318: 0599 lsls r1, r3, #22 801131a: d402 bmi.n 8011322 <_fflush_r+0x32> 801131c: 6da0 ldr r0, [r4, #88] ; 0x58 801131e: f7ff fe32 bl 8010f86 <__retarget_lock_acquire_recursive> 8011322: 4628 mov r0, r5 8011324: 4621 mov r1, r4 8011326: f7ff ff5d bl 80111e4 <__sflush_r> 801132a: 6e63 ldr r3, [r4, #100] ; 0x64 801132c: 07da lsls r2, r3, #31 801132e: 4605 mov r5, r0 8011330: d4e4 bmi.n 80112fc <_fflush_r+0xc> 8011332: 89a3 ldrh r3, [r4, #12] 8011334: 059b lsls r3, r3, #22 8011336: d4e1 bmi.n 80112fc <_fflush_r+0xc> 8011338: 6da0 ldr r0, [r4, #88] ; 0x58 801133a: f7ff fe25 bl 8010f88 <__retarget_lock_release_recursive> 801133e: e7dd b.n 80112fc <_fflush_r+0xc> 08011340 : 8011340: b40e push {r1, r2, r3} 8011342: b503 push {r0, r1, lr} 8011344: 4601 mov r1, r0 8011346: ab03 add r3, sp, #12 8011348: 4805 ldr r0, [pc, #20] ; (8011360 ) 801134a: f853 2b04 ldr.w r2, [r3], #4 801134e: 6800 ldr r0, [r0, #0] 8011350: 9301 str r3, [sp, #4] 8011352: f7ff f869 bl 8010428 <_vfiprintf_r> 8011356: b002 add sp, #8 8011358: f85d eb04 ldr.w lr, [sp], #4 801135c: b003 add sp, #12 801135e: 4770 bx lr 8011360: 240000cc .word 0x240000cc 08011364 <__swhatbuf_r>: 8011364: b570 push {r4, r5, r6, lr} 8011366: 460c mov r4, r1 8011368: f9b1 100e ldrsh.w r1, [r1, #14] 801136c: 2900 cmp r1, #0 801136e: b096 sub sp, #88 ; 0x58 8011370: 4615 mov r5, r2 8011372: 461e mov r6, r3 8011374: da0d bge.n 8011392 <__swhatbuf_r+0x2e> 8011376: 89a3 ldrh r3, [r4, #12] 8011378: f013 0f80 tst.w r3, #128 ; 0x80 801137c: f04f 0100 mov.w r1, #0 8011380: bf0c ite eq 8011382: f44f 6380 moveq.w r3, #1024 ; 0x400 8011386: 2340 movne r3, #64 ; 0x40 8011388: 2000 movs r0, #0 801138a: 6031 str r1, [r6, #0] 801138c: 602b str r3, [r5, #0] 801138e: b016 add sp, #88 ; 0x58 8011390: bd70 pop {r4, r5, r6, pc} 8011392: 466a mov r2, sp 8011394: f000 f87c bl 8011490 <_fstat_r> 8011398: 2800 cmp r0, #0 801139a: dbec blt.n 8011376 <__swhatbuf_r+0x12> 801139c: 9901 ldr r1, [sp, #4] 801139e: f401 4170 and.w r1, r1, #61440 ; 0xf000 80113a2: f5a1 5300 sub.w r3, r1, #8192 ; 0x2000 80113a6: 4259 negs r1, r3 80113a8: 4159 adcs r1, r3 80113aa: f44f 6380 mov.w r3, #1024 ; 0x400 80113ae: e7eb b.n 8011388 <__swhatbuf_r+0x24> 080113b0 <__smakebuf_r>: 80113b0: 898b ldrh r3, [r1, #12] 80113b2: b573 push {r0, r1, r4, r5, r6, lr} 80113b4: 079d lsls r5, r3, #30 80113b6: 4606 mov r6, r0 80113b8: 460c mov r4, r1 80113ba: d507 bpl.n 80113cc <__smakebuf_r+0x1c> 80113bc: f104 0347 add.w r3, r4, #71 ; 0x47 80113c0: 6023 str r3, [r4, #0] 80113c2: 6123 str r3, [r4, #16] 80113c4: 2301 movs r3, #1 80113c6: 6163 str r3, [r4, #20] 80113c8: b002 add sp, #8 80113ca: bd70 pop {r4, r5, r6, pc} 80113cc: ab01 add r3, sp, #4 80113ce: 466a mov r2, sp 80113d0: f7ff ffc8 bl 8011364 <__swhatbuf_r> 80113d4: 9900 ldr r1, [sp, #0] 80113d6: 4605 mov r5, r0 80113d8: 4630 mov r0, r6 80113da: f7ff fe77 bl 80110cc <_malloc_r> 80113de: b948 cbnz r0, 80113f4 <__smakebuf_r+0x44> 80113e0: f9b4 300c ldrsh.w r3, [r4, #12] 80113e4: 059a lsls r2, r3, #22 80113e6: d4ef bmi.n 80113c8 <__smakebuf_r+0x18> 80113e8: f023 0303 bic.w r3, r3, #3 80113ec: f043 0302 orr.w r3, r3, #2 80113f0: 81a3 strh r3, [r4, #12] 80113f2: e7e3 b.n 80113bc <__smakebuf_r+0xc> 80113f4: 89a3 ldrh r3, [r4, #12] 80113f6: 6020 str r0, [r4, #0] 80113f8: f043 0380 orr.w r3, r3, #128 ; 0x80 80113fc: 81a3 strh r3, [r4, #12] 80113fe: 9b00 ldr r3, [sp, #0] 8011400: 6163 str r3, [r4, #20] 8011402: 9b01 ldr r3, [sp, #4] 8011404: 6120 str r0, [r4, #16] 8011406: b15b cbz r3, 8011420 <__smakebuf_r+0x70> 8011408: f9b4 100e ldrsh.w r1, [r4, #14] 801140c: 4630 mov r0, r6 801140e: f000 f851 bl 80114b4 <_isatty_r> 8011412: b128 cbz r0, 8011420 <__smakebuf_r+0x70> 8011414: 89a3 ldrh r3, [r4, #12] 8011416: f023 0303 bic.w r3, r3, #3 801141a: f043 0301 orr.w r3, r3, #1 801141e: 81a3 strh r3, [r4, #12] 8011420: 89a3 ldrh r3, [r4, #12] 8011422: 431d orrs r5, r3 8011424: 81a5 strh r5, [r4, #12] 8011426: e7cf b.n 80113c8 <__smakebuf_r+0x18> 08011428 <_putc_r>: 8011428: b570 push {r4, r5, r6, lr} 801142a: 460d mov r5, r1 801142c: 4614 mov r4, r2 801142e: 4606 mov r6, r0 8011430: b118 cbz r0, 801143a <_putc_r+0x12> 8011432: 6a03 ldr r3, [r0, #32] 8011434: b90b cbnz r3, 801143a <_putc_r+0x12> 8011436: f7ff fb37 bl 8010aa8 <__sinit> 801143a: 6e63 ldr r3, [r4, #100] ; 0x64 801143c: 07d8 lsls r0, r3, #31 801143e: d405 bmi.n 801144c <_putc_r+0x24> 8011440: 89a3 ldrh r3, [r4, #12] 8011442: 0599 lsls r1, r3, #22 8011444: d402 bmi.n 801144c <_putc_r+0x24> 8011446: 6da0 ldr r0, [r4, #88] ; 0x58 8011448: f7ff fd9d bl 8010f86 <__retarget_lock_acquire_recursive> 801144c: 68a3 ldr r3, [r4, #8] 801144e: 3b01 subs r3, #1 8011450: 2b00 cmp r3, #0 8011452: 60a3 str r3, [r4, #8] 8011454: da05 bge.n 8011462 <_putc_r+0x3a> 8011456: 69a2 ldr r2, [r4, #24] 8011458: 4293 cmp r3, r2 801145a: db12 blt.n 8011482 <_putc_r+0x5a> 801145c: b2eb uxtb r3, r5 801145e: 2b0a cmp r3, #10 8011460: d00f beq.n 8011482 <_putc_r+0x5a> 8011462: 6823 ldr r3, [r4, #0] 8011464: 1c5a adds r2, r3, #1 8011466: 6022 str r2, [r4, #0] 8011468: 701d strb r5, [r3, #0] 801146a: b2ed uxtb r5, r5 801146c: 6e63 ldr r3, [r4, #100] ; 0x64 801146e: 07da lsls r2, r3, #31 8011470: d405 bmi.n 801147e <_putc_r+0x56> 8011472: 89a3 ldrh r3, [r4, #12] 8011474: 059b lsls r3, r3, #22 8011476: d402 bmi.n 801147e <_putc_r+0x56> 8011478: 6da0 ldr r0, [r4, #88] ; 0x58 801147a: f7ff fd85 bl 8010f88 <__retarget_lock_release_recursive> 801147e: 4628 mov r0, r5 8011480: bd70 pop {r4, r5, r6, pc} 8011482: 4629 mov r1, r5 8011484: 4622 mov r2, r4 8011486: 4630 mov r0, r6 8011488: f7ff fc57 bl 8010d3a <__swbuf_r> 801148c: 4605 mov r5, r0 801148e: e7ed b.n 801146c <_putc_r+0x44> 08011490 <_fstat_r>: 8011490: b538 push {r3, r4, r5, lr} 8011492: 4d07 ldr r5, [pc, #28] ; (80114b0 <_fstat_r+0x20>) 8011494: 2300 movs r3, #0 8011496: 4604 mov r4, r0 8011498: 4608 mov r0, r1 801149a: 4611 mov r1, r2 801149c: 602b str r3, [r5, #0] 801149e: f7ef fabc bl 8000a1a <_fstat> 80114a2: 1c43 adds r3, r0, #1 80114a4: d102 bne.n 80114ac <_fstat_r+0x1c> 80114a6: 682b ldr r3, [r5, #0] 80114a8: b103 cbz r3, 80114ac <_fstat_r+0x1c> 80114aa: 6023 str r3, [r4, #0] 80114ac: bd38 pop {r3, r4, r5, pc} 80114ae: bf00 nop 80114b0: 24007e08 .word 0x24007e08 080114b4 <_isatty_r>: 80114b4: b538 push {r3, r4, r5, lr} 80114b6: 4d06 ldr r5, [pc, #24] ; (80114d0 <_isatty_r+0x1c>) 80114b8: 2300 movs r3, #0 80114ba: 4604 mov r4, r0 80114bc: 4608 mov r0, r1 80114be: 602b str r3, [r5, #0] 80114c0: f7ef fabb bl 8000a3a <_isatty> 80114c4: 1c43 adds r3, r0, #1 80114c6: d102 bne.n 80114ce <_isatty_r+0x1a> 80114c8: 682b ldr r3, [r5, #0] 80114ca: b103 cbz r3, 80114ce <_isatty_r+0x1a> 80114cc: 6023 str r3, [r4, #0] 80114ce: bd38 pop {r3, r4, r5, pc} 80114d0: 24007e08 .word 0x24007e08 080114d4 <_sbrk_r>: 80114d4: b538 push {r3, r4, r5, lr} 80114d6: 4d06 ldr r5, [pc, #24] ; (80114f0 <_sbrk_r+0x1c>) 80114d8: 2300 movs r3, #0 80114da: 4604 mov r4, r0 80114dc: 4608 mov r0, r1 80114de: 602b str r3, [r5, #0] 80114e0: f7ef fac4 bl 8000a6c <_sbrk> 80114e4: 1c43 adds r3, r0, #1 80114e6: d102 bne.n 80114ee <_sbrk_r+0x1a> 80114e8: 682b ldr r3, [r5, #0] 80114ea: b103 cbz r3, 80114ee <_sbrk_r+0x1a> 80114ec: 6023 str r3, [r4, #0] 80114ee: bd38 pop {r3, r4, r5, pc} 80114f0: 24007e08 .word 0x24007e08 080114f4 : 80114f4: b508 push {r3, lr} 80114f6: 2006 movs r0, #6 80114f8: f000 f82c bl 8011554 80114fc: 2001 movs r0, #1 80114fe: f7ef fa59 bl 80009b4 <_exit> 08011502 <_raise_r>: 8011502: 291f cmp r1, #31 8011504: b538 push {r3, r4, r5, lr} 8011506: 4604 mov r4, r0 8011508: 460d mov r5, r1 801150a: d904 bls.n 8011516 <_raise_r+0x14> 801150c: 2316 movs r3, #22 801150e: 6003 str r3, [r0, #0] 8011510: f04f 30ff mov.w r0, #4294967295 8011514: bd38 pop {r3, r4, r5, pc} 8011516: 6bc2 ldr r2, [r0, #60] ; 0x3c 8011518: b112 cbz r2, 8011520 <_raise_r+0x1e> 801151a: f852 3021 ldr.w r3, [r2, r1, lsl #2] 801151e: b94b cbnz r3, 8011534 <_raise_r+0x32> 8011520: 4620 mov r0, r4 8011522: f000 f831 bl 8011588 <_getpid_r> 8011526: 462a mov r2, r5 8011528: 4601 mov r1, r0 801152a: 4620 mov r0, r4 801152c: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} 8011530: f000 b818 b.w 8011564 <_kill_r> 8011534: 2b01 cmp r3, #1 8011536: d00a beq.n 801154e <_raise_r+0x4c> 8011538: 1c59 adds r1, r3, #1 801153a: d103 bne.n 8011544 <_raise_r+0x42> 801153c: 2316 movs r3, #22 801153e: 6003 str r3, [r0, #0] 8011540: 2001 movs r0, #1 8011542: e7e7 b.n 8011514 <_raise_r+0x12> 8011544: 2400 movs r4, #0 8011546: f842 4025 str.w r4, [r2, r5, lsl #2] 801154a: 4628 mov r0, r5 801154c: 4798 blx r3 801154e: 2000 movs r0, #0 8011550: e7e0 b.n 8011514 <_raise_r+0x12> ... 08011554 : 8011554: 4b02 ldr r3, [pc, #8] ; (8011560 ) 8011556: 4601 mov r1, r0 8011558: 6818 ldr r0, [r3, #0] 801155a: f7ff bfd2 b.w 8011502 <_raise_r> 801155e: bf00 nop 8011560: 240000cc .word 0x240000cc 08011564 <_kill_r>: 8011564: b538 push {r3, r4, r5, lr} 8011566: 4d07 ldr r5, [pc, #28] ; (8011584 <_kill_r+0x20>) 8011568: 2300 movs r3, #0 801156a: 4604 mov r4, r0 801156c: 4608 mov r0, r1 801156e: 4611 mov r1, r2 8011570: 602b str r3, [r5, #0] 8011572: f7ef fa0d bl 8000990 <_kill> 8011576: 1c43 adds r3, r0, #1 8011578: d102 bne.n 8011580 <_kill_r+0x1c> 801157a: 682b ldr r3, [r5, #0] 801157c: b103 cbz r3, 8011580 <_kill_r+0x1c> 801157e: 6023 str r3, [r4, #0] 8011580: bd38 pop {r3, r4, r5, pc} 8011582: bf00 nop 8011584: 24007e08 .word 0x24007e08 08011588 <_getpid_r>: 8011588: f7ef b9fa b.w 8000980 <_getpid> 0801158c <_init>: 801158c: b5f8 push {r3, r4, r5, r6, r7, lr} 801158e: bf00 nop 8011590: bcf8 pop {r3, r4, r5, r6, r7} 8011592: bc08 pop {r3} 8011594: 469e mov lr, r3 8011596: 4770 bx lr 08011598 <_fini>: 8011598: b5f8 push {r3, r4, r5, r6, r7, lr} 801159a: bf00 nop 801159c: bcf8 pop {r3, r4, r5, r6, r7} 801159e: bc08 pop {r3} 80115a0: 469e mov lr, r3 80115a2: 4770 bx lr