12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120431214312243123431244312543126431274312843129431304313143132431334313443135431364313743138431394314043141431424314343144431454314643147431484314943150431514315243153431544315543156431574315843159431604316143162431634316443165431664316743168431694317043171431724317343174431754317643177431784317943180431814318243183431844318543186431874318843189431904319143192431934319443195431964319743198431994320043201432024320343204432054320643207432084320943210432114321243213432144321543216432174321843219432204322143222432234322443225432264322743228432294323043231432324323343234432354323643237432384323943240432414324243243432444324543246432474324843249432504325143252432534325443255432564325743258432594326043261432624326343264432654326643267432684326943270432714327243273432744327543276432774327843279432804328143282432834328443285432864328743288432894329043291432924329343294432954329643297432984329943300433014330243303433044330543306433074330843309433104331143312433134331443315433164331743318433194332043321433224332343324433254332643327433284332943330433314333243333433344333543336433374333843339433404334143342433434334443345433464334743348433494335043351433524335343354433554335643357433584335943360433614336243363433644336543366433674336843369433704337143372433734337443375433764337743378433794338043381433824338343384433854338643387433884338943390433914339243393433944339543396433974339843399434004340143402434034340443405434064340743408434094341043411434124341343414434154341643417434184341943420434214342243423434244342543426434274342843429434304343143432434334343443435434364343743438434394344043441434424344343444434454344643447434484344943450434514345243453434544345543456434574345843459434604346143462434634346443465434664346743468434694347043471434724347343474434754347643477434784347943480434814348243483434844348543486434874348843489434904349143492434934349443495434964349743498434994350043501435024350343504435054350643507435084350943510435114351243513435144351543516435174351843519435204352143522435234352443525435264352743528435294353043531435324353343534435354353643537435384353943540435414354243543435444354543546435474354843549435504355143552435534355443555435564355743558435594356043561435624356343564435654356643567435684356943570435714357243573435744357543576435774357843579435804358143582435834358443585435864358743588435894359043591435924359343594435954359643597435984359943600436014360243603436044360543606436074360843609436104361143612436134361443615436164361743618436194362043621436224362343624436254362643627436284362943630436314363243633436344363543636436374363843639436404364143642436434364443645436464364743648436494365043651436524365343654436554365643657436584365943660436614366243663436644366543666436674366843669436704367143672436734367443675436764367743678436794368043681436824368343684436854368643687436884368943690436914369243693436944369543696436974369843699437004370143702437034370443705437064370743708437094371043711437124371343714437154371643717437184371943720437214372243723437244372543726437274372843729437304373143732437334373443735437364373743738437394374043741437424374343744437454374643747437484374943750437514375243753437544375543756437574375843759437604376143762437634376443765437664376743768437694377043771437724377343774437754377643777437784377943780437814378243783437844378543786437874378843789437904379143792437934379443795437964379743798437994380043801438024380343804438054380643807438084380943810438114381243813438144381543816438174381843819438204382143822438234382443825438264382743828438294383043831438324383343834438354383643837438384383943840438414384243843438444384543846438474384843849438504385143852438534385443855438564385743858438594386043861438624386343864438654386643867438684386943870438714387243873438744387543876438774387843879438804388143882438834388443885438864388743888438894389043891438924389343894438954389643897438984389943900439014390243903439044390543906439074390843909439104391143912439134391443915439164391743918439194392043921439224392343924439254392643927439284392943930439314393243933439344393543936439374393843939439404394143942439434394443945439464394743948439494395043951439524395343954439554395643957439584395943960439614396243963439644396543966439674396843969439704397143972439734397443975439764397743978439794398043981439824398343984439854398643987439884398943990439914399243993439944399543996439974399843999440004400144002440034400444005440064400744008440094401044011440124401344014440154401644017440184401944020440214402244023440244402544026440274402844029440304403144032440334403444035440364403744038440394404044041440424404344044440454404644047440484404944050440514405244053440544405544056440574405844059440604406144062440634406444065440664406744068440694407044071440724407344074440754407644077440784407944080440814408244083440844408544086440874408844089440904409144092440934409444095440964409744098440994410044101441024410344104441054410644107441084410944110441114411244113441144411544116441174411844119441204412144122441234412444125441264412744128441294413044131441324413344134441354413644137441384413944140441414414244143441444414544146441474414844149441504415144152441534415444155441564415744158441594416044161441624416344164441654416644167441684416944170441714417244173441744417544176441774417844179441804418144182441834418444185441864418744188441894419044191441924419344194441954419644197441984419944200442014420244203442044420544206442074420844209442104421144212442134421444215442164421744218442194422044221442224422344224442254422644227442284422944230442314423244233442344423544236442374423844239442404424144242442434424444245442464424744248442494425044251442524425344254442554425644257442584425944260442614426244263442644426544266442674426844269442704427144272442734427444275442764427744278442794428044281442824428344284442854428644287442884428944290442914429244293442944429544296442974429844299443004430144302443034430444305443064430744308443094431044311443124431344314443154431644317443184431944320443214432244323443244432544326443274432844329443304433144332443334433444335443364433744338443394434044341443424434344344443454434644347443484434944350443514435244353443544435544356443574435844359443604436144362443634436444365443664436744368443694437044371443724437344374443754437644377443784437944380443814438244383443844438544386443874438844389443904439144392443934439444395443964439744398443994440044401444024440344404444054440644407444084440944410444114441244413444144441544416444174441844419444204442144422444234442444425444264442744428444294443044431444324443344434444354443644437444384443944440444414444244443444444444544446444474444844449444504445144452444534445444455444564445744458444594446044461444624446344464444654446644467444684446944470444714447244473444744447544476444774447844479444804448144482444834448444485444864448744488444894449044491444924449344494444954449644497444984449944500445014450244503445044450544506445074450844509445104451144512445134451444515445164451744518445194452044521445224452344524445254452644527445284452944530445314453244533445344453544536445374453844539445404454144542445434454444545445464454744548445494455044551445524455344554445554455644557445584455944560445614456244563445644456544566445674456844569445704457144572445734457444575445764457744578445794458044581445824458344584445854458644587445884458944590445914459244593445944459544596445974459844599446004460144602446034460444605446064460744608446094461044611446124461344614446154461644617446184461944620446214462244623446244462544626446274462844629446304463144632446334463444635446364463744638446394464044641446424464344644446454464644647446484464944650446514465244653446544465544656446574465844659446604466144662446634466444665446664466744668446694467044671446724467344674446754467644677446784467944680446814468244683446844468544686446874468844689446904469144692446934469444695446964469744698446994470044701447024470344704447054470644707447084470944710447114471244713447144471544716447174471844719447204472144722447234472444725447264472744728447294473044731447324473344734447354473644737447384473944740447414474244743447444474544746447474474844749447504475144752447534475444755447564475744758447594476044761447624476344764447654476644767447684476944770447714477244773447744477544776447774477844779447804478144782447834478444785447864478744788447894479044791447924479344794447954479644797447984479944800448014480244803448044480544806448074480844809448104481144812448134481444815448164481744818448194482044821448224482344824448254482644827448284482944830448314483244833448344483544836448374483844839448404484144842448434484444845448464484744848448494485044851448524485344854448554485644857448584485944860448614486244863448644486544866448674486844869448704487144872448734487444875448764487744878448794488044881448824488344884448854488644887448884488944890448914489244893448944489544896448974489844899449004490144902449034490444905449064490744908449094491044911449124491344914449154491644917449184491944920449214492244923449244492544926449274492844929449304493144932449334493444935449364493744938449394494044941449424494344944449454494644947449484494944950449514495244953449544495544956449574495844959449604496144962449634496444965449664496744968449694497044971449724497344974449754497644977449784497944980449814498244983449844498544986449874498844989449904499144992449934499444995449964499744998449994500045001450024500345004450054500645007450084500945010450114501245013450144501545016450174501845019450204502145022450234502445025450264502745028450294503045031450324503345034450354503645037450384503945040450414504245043450444504545046450474504845049450504505145052450534505445055450564505745058450594506045061450624506345064450654506645067450684506945070450714507245073450744507545076450774507845079450804508145082450834508445085450864508745088450894509045091450924509345094450954509645097450984509945100451014510245103451044510545106451074510845109451104511145112451134511445115451164511745118451194512045121451224512345124451254512645127451284512945130451314513245133451344513545136451374513845139451404514145142451434514445145451464514745148451494515045151451524515345154451554515645157451584515945160451614516245163451644516545166451674516845169451704517145172451734517445175451764517745178451794518045181451824518345184451854518645187451884518945190451914519245193451944519545196451974519845199452004520145202452034520445205452064520745208452094521045211452124521345214452154521645217452184521945220452214522245223452244522545226452274522845229452304523145232452334523445235452364523745238452394524045241452424524345244452454524645247452484524945250452514525245253452544525545256452574525845259452604526145262452634526445265452664526745268452694527045271452724527345274452754527645277452784527945280452814528245283452844528545286452874528845289452904529145292452934529445295452964529745298452994530045301453024530345304453054530645307453084530945310453114531245313453144531545316453174531845319453204532145322453234532445325453264532745328453294533045331453324533345334453354533645337453384533945340453414534245343453444534545346453474534845349453504535145352453534535445355453564535745358453594536045361453624536345364453654536645367453684536945370453714537245373453744537545376453774537845379453804538145382453834538445385453864538745388453894539045391453924539345394453954539645397453984539945400454014540245403454044540545406454074540845409454104541145412454134541445415454164541745418454194542045421454224542345424454254542645427454284542945430454314543245433454344543545436454374543845439454404544145442454434544445445454464544745448454494545045451454524545345454454554545645457454584545945460454614546245463454644546545466454674546845469454704547145472454734547445475454764547745478454794548045481454824548345484454854548645487454884548945490454914549245493454944549545496454974549845499455004550145502455034550445505455064550745508455094551045511455124551345514455154551645517455184551945520455214552245523455244552545526455274552845529455304553145532455334553445535455364553745538455394554045541455424554345544455454554645547455484554945550455514555245553455544555545556455574555845559455604556145562455634556445565455664556745568455694557045571455724557345574455754557645577455784557945580455814558245583455844558545586455874558845589455904559145592455934559445595455964559745598455994560045601456024560345604456054560645607456084560945610456114561245613456144561545616456174561845619456204562145622456234562445625456264562745628456294563045631456324563345634456354563645637456384563945640456414564245643456444564545646456474564845649456504565145652456534565445655456564565745658456594566045661456624566345664456654566645667456684566945670456714567245673456744567545676456774567845679456804568145682456834568445685456864568745688456894569045691456924569345694456954569645697456984569945700457014570245703457044570545706457074570845709457104571145712457134571445715457164571745718457194572045721457224572345724457254572645727457284572945730457314573245733457344573545736457374573845739457404574145742457434574445745457464574745748457494575045751457524575345754457554575645757457584575945760457614576245763457644576545766457674576845769457704577145772457734577445775457764577745778457794578045781457824578345784457854578645787457884578945790457914579245793457944579545796457974579845799458004580145802458034580445805458064580745808458094581045811458124581345814458154581645817458184581945820458214582245823458244582545826458274582845829458304583145832458334583445835458364583745838458394584045841458424584345844458454584645847458484584945850458514585245853458544585545856458574585845859458604586145862458634586445865458664586745868458694587045871458724587345874458754587645877458784587945880458814588245883458844588545886458874588845889458904589145892458934589445895458964589745898458994590045901459024590345904459054590645907459084590945910459114591245913459144591545916459174591845919459204592145922459234592445925459264592745928459294593045931459324593345934459354593645937459384593945940459414594245943459444594545946459474594845949459504595145952459534595445955459564595745958459594596045961459624596345964459654596645967459684596945970459714597245973459744597545976459774597845979459804598145982459834598445985459864598745988459894599045991459924599345994459954599645997459984599946000460014600246003460044600546006460074600846009460104601146012460134601446015460164601746018460194602046021460224602346024460254602646027460284602946030460314603246033460344603546036460374603846039460404604146042460434604446045460464604746048460494605046051460524605346054460554605646057460584605946060460614606246063460644606546066460674606846069460704607146072460734607446075460764607746078460794608046081460824608346084460854608646087460884608946090460914609246093460944609546096460974609846099461004610146102461034610446105461064610746108461094611046111461124611346114461154611646117461184611946120461214612246123461244612546126461274612846129461304613146132461334613446135461364613746138461394614046141461424614346144461454614646147461484614946150461514615246153461544615546156461574615846159461604616146162461634616446165461664616746168461694617046171461724617346174461754617646177461784617946180461814618246183461844618546186461874618846189461904619146192461934619446195461964619746198461994620046201462024620346204462054620646207462084620946210462114621246213462144621546216462174621846219462204622146222462234622446225462264622746228462294623046231462324623346234462354623646237462384623946240462414624246243462444624546246462474624846249462504625146252462534625446255462564625746258462594626046261462624626346264462654626646267462684626946270462714627246273462744627546276462774627846279462804628146282462834628446285462864628746288462894629046291462924629346294462954629646297462984629946300463014630246303463044630546306463074630846309463104631146312463134631446315463164631746318463194632046321463224632346324463254632646327463284632946330463314633246333463344633546336463374633846339463404634146342463434634446345463464634746348463494635046351463524635346354463554635646357463584635946360463614636246363463644636546366463674636846369463704637146372463734637446375463764637746378463794638046381463824638346384463854638646387463884638946390463914639246393463944639546396463974639846399464004640146402464034640446405464064640746408464094641046411464124641346414464154641646417464184641946420464214642246423464244642546426464274642846429464304643146432464334643446435464364643746438464394644046441464424644346444464454644646447464484644946450464514645246453464544645546456464574645846459464604646146462464634646446465464664646746468464694647046471464724647346474464754647646477464784647946480464814648246483464844648546486464874648846489464904649146492464934649446495464964649746498464994650046501465024650346504465054650646507465084650946510465114651246513465144651546516465174651846519465204652146522465234652446525465264652746528465294653046531465324653346534465354653646537465384653946540465414654246543465444654546546465474654846549465504655146552465534655446555465564655746558465594656046561465624656346564465654656646567465684656946570465714657246573465744657546576465774657846579465804658146582465834658446585465864658746588465894659046591465924659346594465954659646597465984659946600466014660246603466044660546606466074660846609466104661146612466134661446615466164661746618466194662046621466224662346624466254662646627466284662946630466314663246633466344663546636466374663846639466404664146642466434664446645466464664746648466494665046651466524665346654466554665646657466584665946660466614666246663466644666546666466674666846669466704667146672466734667446675466764667746678466794668046681466824668346684466854668646687466884668946690466914669246693466944669546696466974669846699467004670146702467034670446705467064670746708467094671046711467124671346714467154671646717467184671946720467214672246723467244672546726467274672846729467304673146732467334673446735467364673746738467394674046741467424674346744467454674646747467484674946750467514675246753467544675546756467574675846759467604676146762467634676446765467664676746768467694677046771467724677346774467754677646777467784677946780467814678246783467844678546786467874678846789467904679146792467934679446795467964679746798467994680046801468024680346804468054680646807468084680946810468114681246813468144681546816468174681846819468204682146822468234682446825468264682746828468294683046831468324683346834468354683646837468384683946840468414684246843468444684546846468474684846849468504685146852468534685446855468564685746858468594686046861468624686346864468654686646867468684686946870468714687246873468744687546876468774687846879468804688146882468834688446885468864688746888468894689046891468924689346894468954689646897468984689946900469014690246903469044690546906469074690846909469104691146912469134691446915469164691746918469194692046921469224692346924469254692646927469284692946930469314693246933469344693546936469374693846939469404694146942469434694446945469464694746948469494695046951469524695346954469554695646957469584695946960469614696246963469644696546966469674696846969469704697146972469734697446975469764697746978469794698046981469824698346984469854698646987469884698946990469914699246993469944699546996469974699846999470004700147002470034700447005470064700747008470094701047011470124701347014470154701647017470184701947020470214702247023470244702547026470274702847029470304703147032470334703447035470364703747038470394704047041470424704347044470454704647047470484704947050470514705247053470544705547056470574705847059470604706147062470634706447065470664706747068470694707047071470724707347074470754707647077470784707947080470814708247083470844708547086470874708847089470904709147092470934709447095470964709747098470994710047101471024710347104471054710647107471084710947110471114711247113471144711547116471174711847119471204712147122471234712447125471264712747128471294713047131471324713347134471354713647137471384713947140471414714247143471444714547146471474714847149471504715147152471534715447155471564715747158471594716047161471624716347164471654716647167471684716947170471714717247173471744717547176471774717847179471804718147182471834718447185471864718747188471894719047191471924719347194471954719647197471984719947200472014720247203472044720547206472074720847209472104721147212472134721447215472164721747218472194722047221472224722347224472254722647227472284722947230472314723247233472344723547236472374723847239472404724147242472434724447245472464724747248472494725047251472524725347254472554725647257472584725947260472614726247263472644726547266472674726847269472704727147272472734727447275472764727747278472794728047281472824728347284472854728647287472884728947290472914729247293472944729547296472974729847299473004730147302473034730447305473064730747308473094731047311473124731347314473154731647317473184731947320473214732247323473244732547326473274732847329473304733147332473334733447335473364733747338473394734047341473424734347344473454734647347473484734947350473514735247353473544735547356473574735847359473604736147362473634736447365473664736747368473694737047371473724737347374473754737647377473784737947380473814738247383473844738547386473874738847389473904739147392473934739447395473964739747398473994740047401474024740347404474054740647407474084740947410474114741247413474144741547416474174741847419474204742147422474234742447425474264742747428474294743047431474324743347434474354743647437474384743947440474414744247443474444744547446474474744847449474504745147452474534745447455474564745747458474594746047461474624746347464474654746647467474684746947470474714747247473474744747547476474774747847479474804748147482474834748447485474864748747488474894749047491474924749347494474954749647497474984749947500475014750247503475044750547506475074750847509475104751147512475134751447515475164751747518475194752047521475224752347524475254752647527475284752947530475314753247533475344753547536475374753847539475404754147542475434754447545475464754747548475494755047551475524755347554475554755647557475584755947560475614756247563475644756547566475674756847569475704757147572475734757447575475764757747578475794758047581475824758347584475854758647587475884758947590475914759247593475944759547596475974759847599476004760147602476034760447605476064760747608476094761047611476124761347614476154761647617476184761947620476214762247623476244762547626476274762847629476304763147632476334763447635476364763747638476394764047641476424764347644476454764647647476484764947650476514765247653476544765547656476574765847659476604766147662476634766447665476664766747668476694767047671476724767347674476754767647677476784767947680476814768247683476844768547686476874768847689476904769147692476934769447695476964769747698476994770047701477024770347704477054770647707477084770947710477114771247713477144771547716477174771847719477204772147722477234772447725477264772747728477294773047731477324773347734477354773647737477384773947740477414774247743477444774547746477474774847749477504775147752477534775447755477564775747758477594776047761477624776347764477654776647767477684776947770477714777247773477744777547776477774777847779477804778147782477834778447785477864778747788477894779047791477924779347794477954779647797477984779947800478014780247803478044780547806478074780847809478104781147812478134781447815478164781747818478194782047821478224782347824478254782647827478284782947830478314783247833478344783547836478374783847839478404784147842478434784447845478464784747848478494785047851478524785347854478554785647857478584785947860478614786247863478644786547866478674786847869478704787147872478734787447875478764787747878478794788047881478824788347884478854788647887478884788947890478914789247893478944789547896478974789847899479004790147902479034790447905479064790747908479094791047911479124791347914479154791647917479184791947920479214792247923479244792547926479274792847929479304793147932479334793447935479364793747938479394794047941479424794347944479454794647947479484794947950479514795247953479544795547956479574795847959479604796147962479634796447965479664796747968479694797047971479724797347974479754797647977479784797947980479814798247983479844798547986479874798847989479904799147992479934799447995479964799747998479994800048001480024800348004480054800648007480084800948010480114801248013480144801548016480174801848019480204802148022480234802448025480264802748028480294803048031480324803348034480354803648037480384803948040480414804248043480444804548046480474804848049480504805148052480534805448055480564805748058480594806048061480624806348064480654806648067480684806948070480714807248073480744807548076480774807848079480804808148082480834808448085480864808748088480894809048091480924809348094480954809648097480984809948100481014810248103481044810548106481074810848109481104811148112481134811448115481164811748118481194812048121481224812348124481254812648127481284812948130481314813248133481344813548136481374813848139481404814148142481434814448145481464814748148481494815048151481524815348154481554815648157481584815948160481614816248163481644816548166481674816848169481704817148172481734817448175481764817748178481794818048181481824818348184481854818648187481884818948190481914819248193481944819548196481974819848199482004820148202482034820448205482064820748208482094821048211482124821348214482154821648217482184821948220482214822248223482244822548226482274822848229482304823148232482334823448235482364823748238482394824048241482424824348244482454824648247482484824948250482514825248253482544825548256482574825848259482604826148262482634826448265482664826748268482694827048271482724827348274482754827648277482784827948280482814828248283482844828548286482874828848289482904829148292482934829448295482964829748298482994830048301483024830348304483054830648307483084830948310483114831248313483144831548316483174831848319483204832148322483234832448325483264832748328483294833048331483324833348334483354833648337483384833948340483414834248343483444834548346483474834848349483504835148352483534835448355483564835748358483594836048361483624836348364483654836648367483684836948370483714837248373483744837548376483774837848379483804838148382483834838448385483864838748388483894839048391483924839348394483954839648397483984839948400484014840248403484044840548406484074840848409484104841148412484134841448415484164841748418484194842048421484224842348424484254842648427484284842948430484314843248433484344843548436484374843848439484404844148442484434844448445484464844748448484494845048451484524845348454484554845648457484584845948460484614846248463484644846548466484674846848469484704847148472484734847448475484764847748478484794848048481484824848348484484854848648487484884848948490484914849248493484944849548496484974849848499485004850148502485034850448505485064850748508485094851048511485124851348514485154851648517485184851948520485214852248523485244852548526485274852848529485304853148532485334853448535485364853748538485394854048541485424854348544485454854648547485484854948550485514855248553485544855548556485574855848559485604856148562485634856448565485664856748568485694857048571485724857348574485754857648577485784857948580485814858248583485844858548586485874858848589485904859148592485934859448595485964859748598485994860048601486024860348604486054860648607486084860948610486114861248613486144861548616486174861848619486204862148622486234862448625486264862748628486294863048631486324863348634486354863648637486384863948640486414864248643486444864548646486474864848649486504865148652486534865448655486564865748658486594866048661486624866348664486654866648667486684866948670486714867248673486744867548676486774867848679486804868148682486834868448685486864868748688486894869048691486924869348694486954869648697486984869948700487014870248703487044870548706487074870848709487104871148712487134871448715487164871748718487194872048721487224872348724487254872648727487284872948730487314873248733487344873548736487374873848739487404874148742487434874448745487464874748748487494875048751487524875348754487554875648757487584875948760487614876248763487644876548766487674876848769487704877148772487734877448775487764877748778487794878048781487824878348784487854878648787487884878948790487914879248793487944879548796487974879848799488004880148802488034880448805488064880748808488094881048811 |
- STM32H7-node-red-CM7.elf: file format elf32-littlearm
- Sections:
- Idx Name Size VMA LMA File off Algn
- 0 .isr_vector 00000298 08000000 08000000 00001000 2**0
- CONTENTS, ALLOC, LOAD, READONLY, DATA
- 1 .text 00013fd8 080002a0 080002a0 000012a0 2**4
- CONTENTS, ALLOC, LOAD, READONLY, CODE
- 2 .rodata 00003e44 08014278 08014278 00015278 2**2
- CONTENTS, ALLOC, LOAD, READONLY, DATA
- 3 .ARM.extab 00000000 080180bc 080180bc 0001a08c 2**0
- CONTENTS
- 4 .ARM 00000008 080180bc 080180bc 000190bc 2**2
- CONTENTS, ALLOC, LOAD, READONLY, DATA
- 5 .preinit_array 00000000 080180c4 080180c4 0001a08c 2**0
- CONTENTS, ALLOC, LOAD, DATA
- 6 .init_array 00000004 080180c4 080180c4 000190c4 2**2
- CONTENTS, ALLOC, LOAD, READONLY, DATA
- 7 .fini_array 00000004 080180c8 080180c8 000190c8 2**2
- CONTENTS, ALLOC, LOAD, READONLY, DATA
- 8 .data 0000008c 24000000 080180cc 0001a000 2**2
- CONTENTS, ALLOC, LOAD, DATA
- 9 .bss 00019d10 2400008c 08018158 0001a08c 2**2
- ALLOC
- 10 ._user_heap_stack 00000604 24019d9c 08018158 0001ad9c 2**0
- ALLOC
- 11 .lwip_sec 00024b83 30020000 30020000 0001b000 2**2
- ALLOC
- 12 .ARM.attributes 0000002e 00000000 00000000 0001a08c 2**0
- CONTENTS, READONLY
- 13 .debug_info 00057232 00000000 00000000 0001a0ba 2**0
- CONTENTS, READONLY, DEBUGGING, OCTETS
- 14 .debug_abbrev 0000ab68 00000000 00000000 000712ec 2**0
- CONTENTS, READONLY, DEBUGGING, OCTETS
- 15 .debug_loclists 0001f9dd 00000000 00000000 0007be54 2**0
- CONTENTS, READONLY, DEBUGGING, OCTETS
- 16 .debug_aranges 00002c80 00000000 00000000 0009b838 2**3
- CONTENTS, READONLY, DEBUGGING, OCTETS
- 17 .debug_rnglists 000028cc 00000000 00000000 0009e4b8 2**0
- CONTENTS, READONLY, DEBUGGING, OCTETS
- 18 .debug_macro 0004c109 00000000 00000000 000a0d84 2**0
- CONTENTS, READONLY, DEBUGGING, OCTETS
- 19 .debug_line 00057a8c 00000000 00000000 000ece8d 2**0
- CONTENTS, READONLY, DEBUGGING, OCTETS
- 20 .debug_str 001a9140 00000000 00000000 00144919 2**0
- CONTENTS, READONLY, DEBUGGING, OCTETS
- 21 .comment 00000043 00000000 00000000 002eda59 2**0
- CONTENTS, READONLY
- 22 .debug_frame 00008c70 00000000 00000000 002eda9c 2**2
- CONTENTS, READONLY, DEBUGGING, OCTETS
- 23 .debug_line_str 00000064 00000000 00000000 002f670c 2**0
- CONTENTS, READONLY, DEBUGGING, OCTETS
- Disassembly of section .text:
- 080002a0 <__do_global_dtors_aux>:
- 80002a0: b510 push {r4, lr}
- 80002a2: 4c05 ldr r4, [pc, #20] @ (80002b8 <__do_global_dtors_aux+0x18>)
- 80002a4: 7823 ldrb r3, [r4, #0]
- 80002a6: b933 cbnz r3, 80002b6 <__do_global_dtors_aux+0x16>
- 80002a8: 4b04 ldr r3, [pc, #16] @ (80002bc <__do_global_dtors_aux+0x1c>)
- 80002aa: b113 cbz r3, 80002b2 <__do_global_dtors_aux+0x12>
- 80002ac: 4804 ldr r0, [pc, #16] @ (80002c0 <__do_global_dtors_aux+0x20>)
- 80002ae: f3af 8000 nop.w
- 80002b2: 2301 movs r3, #1
- 80002b4: 7023 strb r3, [r4, #0]
- 80002b6: bd10 pop {r4, pc}
- 80002b8: 2400008c .word 0x2400008c
- 80002bc: 00000000 .word 0x00000000
- 80002c0: 08014260 .word 0x08014260
- 080002c4 <frame_dummy>:
- 80002c4: b508 push {r3, lr}
- 80002c6: 4b03 ldr r3, [pc, #12] @ (80002d4 <frame_dummy+0x10>)
- 80002c8: b11b cbz r3, 80002d2 <frame_dummy+0xe>
- 80002ca: 4903 ldr r1, [pc, #12] @ (80002d8 <frame_dummy+0x14>)
- 80002cc: 4803 ldr r0, [pc, #12] @ (80002dc <frame_dummy+0x18>)
- 80002ce: f3af 8000 nop.w
- 80002d2: bd08 pop {r3, pc}
- 80002d4: 00000000 .word 0x00000000
- 80002d8: 24000090 .word 0x24000090
- 80002dc: 08014260 .word 0x08014260
- 080002e0 <strcmp>:
- 80002e0: f810 2b01 ldrb.w r2, [r0], #1
- 80002e4: f811 3b01 ldrb.w r3, [r1], #1
- 80002e8: 2a01 cmp r2, #1
- 80002ea: bf28 it cs
- 80002ec: 429a cmpcs r2, r3
- 80002ee: d0f7 beq.n 80002e0 <strcmp>
- 80002f0: 1ad0 subs r0, r2, r3
- 80002f2: 4770 bx lr
- 080002f4 <strlen>:
- 80002f4: 4603 mov r3, r0
- 80002f6: f813 2b01 ldrb.w r2, [r3], #1
- 80002fa: 2a00 cmp r2, #0
- 80002fc: d1fb bne.n 80002f6 <strlen+0x2>
- 80002fe: 1a18 subs r0, r3, r0
- 8000300: 3801 subs r0, #1
- 8000302: 4770 bx lr
- ...
- 08000310 <memchr>:
- 8000310: f001 01ff and.w r1, r1, #255 @ 0xff
- 8000314: 2a10 cmp r2, #16
- 8000316: db2b blt.n 8000370 <memchr+0x60>
- 8000318: f010 0f07 tst.w r0, #7
- 800031c: d008 beq.n 8000330 <memchr+0x20>
- 800031e: f810 3b01 ldrb.w r3, [r0], #1
- 8000322: 3a01 subs r2, #1
- 8000324: 428b cmp r3, r1
- 8000326: d02d beq.n 8000384 <memchr+0x74>
- 8000328: f010 0f07 tst.w r0, #7
- 800032c: b342 cbz r2, 8000380 <memchr+0x70>
- 800032e: d1f6 bne.n 800031e <memchr+0xe>
- 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 <memchr+0x78>
- 8000364: d1ee bne.n 8000344 <memchr+0x34>
- 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 <memchr+0x70>
- 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 <memchr+0x74>
- 800037e: d1f8 bne.n 8000372 <memchr+0x62>
- 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 <memchr+0x98>
- 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 <SystemInit>:
- */
- void SystemInit (void)
- {
- /* FPU settings ------------------------------------------------------------*/
- #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
- SCB->CPACR |= ((3UL << (10*2))|(3UL << (11*2))); /* set CP10 and CP11 Full Access */
- 80003b0: 4b2d ldr r3, [pc, #180] @ (8000468 <SystemInit+0xb8>)
- 80003b2: f8d3 2088 ldr.w r2, [r3, #136] @ 0x88
- 80003b6: f442 0270 orr.w r2, r2, #15728640 @ 0xf00000
- 80003ba: f8c3 2088 str.w r2, [r3, #136] @ 0x88
- #endif
- /*SEVONPEND enabled so that an interrupt coming from the CPU(n) interrupt signal is
- detectable by the CPU after a WFI/WFE instruction.*/
- SCB->SCR |= SCB_SCR_SEVONPEND_Msk;
- 80003be: 691a ldr r2, [r3, #16]
- 80003c0: f042 0210 orr.w r2, r2, #16
- 80003c4: 611a str r2, [r3, #16]
- #if defined(CORE_CM7)
- /* 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)))
- 80003c6: 4b29 ldr r3, [pc, #164] @ (800046c <SystemInit+0xbc>)
- 80003c8: 681b ldr r3, [r3, #0]
- 80003ca: f003 030f and.w r3, r3, #15
- 80003ce: 2b06 cmp r3, #6
- 80003d0: d806 bhi.n 80003e0 <SystemInit+0x30>
- {
- /* 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));
- 80003d2: 4a26 ldr r2, [pc, #152] @ (800046c <SystemInit+0xbc>)
- 80003d4: 6813 ldr r3, [r2, #0]
- 80003d6: f023 030f bic.w r3, r3, #15
- 80003da: f043 0307 orr.w r3, r3, #7
- 80003de: 6013 str r3, [r2, #0]
- }
- /* Set HSION bit */
- RCC->CR |= RCC_CR_HSION;
- 80003e0: 4b23 ldr r3, [pc, #140] @ (8000470 <SystemInit+0xc0>)
- 80003e2: 681a ldr r2, [r3, #0]
- 80003e4: f042 0201 orr.w r2, r2, #1
- 80003e8: 601a str r2, [r3, #0]
- /* Reset CFGR register */
- RCC->CFGR = 0x00000000;
- 80003ea: 2200 movs r2, #0
- 80003ec: 611a str r2, [r3, #16]
- /* Reset HSEON, HSECSSON, CSION, HSI48ON, CSIKERON, PLL1ON, PLL2ON and PLL3ON bits */
- RCC->CR &= 0xEAF6ED7FU;
- 80003ee: 6819 ldr r1, [r3, #0]
- 80003f0: 4a20 ldr r2, [pc, #128] @ (8000474 <SystemInit+0xc4>)
- 80003f2: 400a ands r2, r1
- 80003f4: 601a str r2, [r3, #0]
- /* Decreasing the number of wait states because of lower CPU frequency */
- if(FLASH_LATENCY_DEFAULT < (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY)))
- 80003f6: 4b1d ldr r3, [pc, #116] @ (800046c <SystemInit+0xbc>)
- 80003f8: 681b ldr r3, [r3, #0]
- 80003fa: f013 0f08 tst.w r3, #8
- 80003fe: d006 beq.n 800040e <SystemInit+0x5e>
- {
- /* 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));
- 8000400: 4a1a ldr r2, [pc, #104] @ (800046c <SystemInit+0xbc>)
- 8000402: 6813 ldr r3, [r2, #0]
- 8000404: f023 030f bic.w r3, r3, #15
- 8000408: f043 0307 orr.w r3, r3, #7
- 800040c: 6013 str r3, [r2, #0]
- }
- /* Reset D1CFGR register */
- RCC->D1CFGR = 0x00000000;
- 800040e: 4b18 ldr r3, [pc, #96] @ (8000470 <SystemInit+0xc0>)
- 8000410: 2200 movs r2, #0
- 8000412: 619a str r2, [r3, #24]
- /* Reset D2CFGR register */
- RCC->D2CFGR = 0x00000000;
- 8000414: 61da str r2, [r3, #28]
- /* Reset D3CFGR register */
- RCC->D3CFGR = 0x00000000;
- 8000416: 621a str r2, [r3, #32]
- /* Reset PLLCKSELR register */
- RCC->PLLCKSELR = 0x02020200;
- 8000418: 4917 ldr r1, [pc, #92] @ (8000478 <SystemInit+0xc8>)
- 800041a: 6299 str r1, [r3, #40] @ 0x28
- /* Reset PLLCFGR register */
- RCC->PLLCFGR = 0x01FF0000;
- 800041c: 4917 ldr r1, [pc, #92] @ (800047c <SystemInit+0xcc>)
- 800041e: 62d9 str r1, [r3, #44] @ 0x2c
- /* Reset PLL1DIVR register */
- RCC->PLL1DIVR = 0x01010280;
- 8000420: 4917 ldr r1, [pc, #92] @ (8000480 <SystemInit+0xd0>)
- 8000422: 6319 str r1, [r3, #48] @ 0x30
- /* Reset PLL1FRACR register */
- RCC->PLL1FRACR = 0x00000000;
- 8000424: 635a str r2, [r3, #52] @ 0x34
- /* Reset PLL2DIVR register */
- RCC->PLL2DIVR = 0x01010280;
- 8000426: 6399 str r1, [r3, #56] @ 0x38
- /* Reset PLL2FRACR register */
- RCC->PLL2FRACR = 0x00000000;
- 8000428: 63da str r2, [r3, #60] @ 0x3c
- /* Reset PLL3DIVR register */
- RCC->PLL3DIVR = 0x01010280;
- 800042a: 6419 str r1, [r3, #64] @ 0x40
- /* Reset PLL3FRACR register */
- RCC->PLL3FRACR = 0x00000000;
- 800042c: 645a str r2, [r3, #68] @ 0x44
- /* Reset HSEBYP bit */
- RCC->CR &= 0xFFFBFFFFU;
- 800042e: 6819 ldr r1, [r3, #0]
- 8000430: f421 2180 bic.w r1, r1, #262144 @ 0x40000
- 8000434: 6019 str r1, [r3, #0]
- /* Disable all interrupts */
- RCC->CIER = 0x00000000;
- 8000436: 661a str r2, [r3, #96] @ 0x60
- /* Enable CortexM7 HSEM EXTI line (line 78)*/
- EXTI_D2->EMR3 |= 0x4000UL;
- 8000438: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000
- 800043c: f8d2 30e4 ldr.w r3, [r2, #228] @ 0xe4
- 8000440: f443 4380 orr.w r3, r3, #16384 @ 0x4000
- 8000444: f8c2 30e4 str.w r3, [r2, #228] @ 0xe4
- if((DBGMCU->IDCODE & 0xFFFF0000U) < 0x20000000U)
- 8000448: 4b0e ldr r3, [pc, #56] @ (8000484 <SystemInit+0xd4>)
- 800044a: 681a ldr r2, [r3, #0]
- 800044c: 4b0e ldr r3, [pc, #56] @ (8000488 <SystemInit+0xd8>)
- 800044e: 4013 ands r3, r2
- 8000450: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000
- 8000454: d203 bcs.n 800045e <SystemInit+0xae>
- {
- /* if stm32h7 revY*/
- /* Change the switch matrix read issuing capability to 1 for the AXI SRAM target (Target 7) */
- *((__IO uint32_t*)0x51008108) = 0x000000001U;
- 8000456: 4b0d ldr r3, [pc, #52] @ (800048c <SystemInit+0xdc>)
- 8000458: 2201 movs r2, #1
- 800045a: f8c3 2108 str.w r2, [r3, #264] @ 0x108
- /*
- * 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;
- 800045e: 4b0c ldr r3, [pc, #48] @ (8000490 <SystemInit+0xe0>)
- 8000460: f243 02d2 movw r2, #12498 @ 0x30d2
- 8000464: 601a str r2, [r3, #0]
- #endif /* USER_VECT_TAB_ADDRESS */
- #else
- #error Please #define CORE_CM4 or CORE_CM7
- #endif /* CORE_CM4 */
- }
- 8000466: 4770 bx lr
- 8000468: e000ed00 .word 0xe000ed00
- 800046c: 52002000 .word 0x52002000
- 8000470: 58024400 .word 0x58024400
- 8000474: eaf6ed7f .word 0xeaf6ed7f
- 8000478: 02020200 .word 0x02020200
- 800047c: 01ff0000 .word 0x01ff0000
- 8000480: 01010280 .word 0x01010280
- 8000484: 5c001000 .word 0x5c001000
- 8000488: ffff0000 .word 0xffff0000
- 800048c: 51008000 .word 0x51008000
- 8000490: 52004000 .word 0x52004000
- 08000494 <vApplicationStackOverflowHook>:
- void vApplicationStackOverflowHook(xTaskHandle xTask, signed char *pcTaskName)
- {
- /* ETH_CODE: add breakpoint when stack oveflow is detected by FreeRTOS.
- * Useful for debugging issues.
- */
- __BKPT(0);
- 8000494: be00 bkpt 0x0000
- }
- 8000496: 4770 bx lr
- 08000498 <MX_GPIO_Init>:
- * @brief GPIO Initialization Function
- * @param None
- * @retval None
- */
- static void MX_GPIO_Init(void)
- {
- 8000498: b088 sub sp, #32
- /* GPIO Ports Clock Enable */
- __HAL_RCC_GPIOG_CLK_ENABLE();
- 800049a: 4b2b ldr r3, [pc, #172] @ (8000548 <MX_GPIO_Init+0xb0>)
- 800049c: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 80004a0: f042 0240 orr.w r2, r2, #64 @ 0x40
- 80004a4: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
- 80004a8: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 80004ac: f002 0240 and.w r2, r2, #64 @ 0x40
- 80004b0: 9201 str r2, [sp, #4]
- 80004b2: 9a01 ldr r2, [sp, #4]
- __HAL_RCC_GPIOA_CLK_ENABLE();
- 80004b4: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 80004b8: f042 0201 orr.w r2, r2, #1
- 80004bc: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
- 80004c0: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 80004c4: f002 0201 and.w r2, r2, #1
- 80004c8: 9202 str r2, [sp, #8]
- 80004ca: 9a02 ldr r2, [sp, #8]
- __HAL_RCC_GPIOC_CLK_ENABLE();
- 80004cc: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 80004d0: f042 0204 orr.w r2, r2, #4
- 80004d4: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
- 80004d8: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 80004dc: f002 0204 and.w r2, r2, #4
- 80004e0: 9203 str r2, [sp, #12]
- 80004e2: 9a03 ldr r2, [sp, #12]
- __HAL_RCC_GPIOE_CLK_ENABLE();
- 80004e4: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 80004e8: f042 0210 orr.w r2, r2, #16
- 80004ec: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
- 80004f0: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 80004f4: f002 0210 and.w r2, r2, #16
- 80004f8: 9204 str r2, [sp, #16]
- 80004fa: 9a04 ldr r2, [sp, #16]
- __HAL_RCC_GPIOB_CLK_ENABLE();
- 80004fc: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 8000500: f042 0202 orr.w r2, r2, #2
- 8000504: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
- 8000508: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 800050c: f002 0202 and.w r2, r2, #2
- 8000510: 9205 str r2, [sp, #20]
- 8000512: 9a05 ldr r2, [sp, #20]
- __HAL_RCC_GPIOI_CLK_ENABLE();
- 8000514: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 8000518: f442 7280 orr.w r2, r2, #256 @ 0x100
- 800051c: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
- 8000520: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 8000524: f402 7280 and.w r2, r2, #256 @ 0x100
- 8000528: 9206 str r2, [sp, #24]
- 800052a: 9a06 ldr r2, [sp, #24]
- __HAL_RCC_GPIOH_CLK_ENABLE();
- 800052c: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 8000530: f042 0280 orr.w r2, r2, #128 @ 0x80
- 8000534: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
- 8000538: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0
- 800053c: f003 0380 and.w r3, r3, #128 @ 0x80
- 8000540: 9307 str r3, [sp, #28]
- 8000542: 9b07 ldr r3, [sp, #28]
- }
- 8000544: b008 add sp, #32
- 8000546: 4770 bx lr
- 8000548: 58024400 .word 0x58024400
- 0800054c <MPU_Config>:
- }
- /* MPU Configuration */
- void MPU_Config(void)
- {
- 800054c: b530 push {r4, r5, lr}
- 800054e: b085 sub sp, #20
- MPU_Region_InitTypeDef MPU_InitStruct = {0};
- 8000550: 2400 movs r4, #0
- 8000552: 9400 str r4, [sp, #0]
- 8000554: 9401 str r4, [sp, #4]
- 8000556: 9402 str r4, [sp, #8]
- 8000558: 9403 str r4, [sp, #12]
- /* Disables the MPU */
- HAL_MPU_Disable();
- 800055a: f000 fd13 bl 8000f84 <HAL_MPU_Disable>
- /** Initializes and configures the Region and the memory to be protected
- */
- MPU_InitStruct.Enable = MPU_REGION_ENABLE;
- 800055e: 2501 movs r5, #1
- 8000560: f88d 5000 strb.w r5, [sp]
- MPU_InitStruct.Number = MPU_REGION_NUMBER0;
- 8000564: f88d 4001 strb.w r4, [sp, #1]
- MPU_InitStruct.BaseAddress = 0x0;
- 8000568: 9401 str r4, [sp, #4]
- MPU_InitStruct.Size = MPU_REGION_SIZE_4GB;
- 800056a: 231f movs r3, #31
- 800056c: f88d 3008 strb.w r3, [sp, #8]
- MPU_InitStruct.SubRegionDisable = 0x87;
- 8000570: 2387 movs r3, #135 @ 0x87
- 8000572: f88d 3009 strb.w r3, [sp, #9]
- MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
- 8000576: f88d 400a strb.w r4, [sp, #10]
- MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS;
- 800057a: f88d 400b strb.w r4, [sp, #11]
- MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
- 800057e: f88d 500c strb.w r5, [sp, #12]
- MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE;
- 8000582: f88d 500d strb.w r5, [sp, #13]
- MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
- 8000586: f88d 400e strb.w r4, [sp, #14]
- MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
- 800058a: f88d 400f strb.w r4, [sp, #15]
- HAL_MPU_ConfigRegion(&MPU_InitStruct);
- 800058e: 4668 mov r0, sp
- 8000590: f000 fd16 bl 8000fc0 <HAL_MPU_ConfigRegion>
- /** Initializes and configures the Region and the memory to be protected
- */
- MPU_InitStruct.Number = MPU_REGION_NUMBER1;
- 8000594: f88d 5001 strb.w r5, [sp, #1]
- MPU_InitStruct.BaseAddress = 0x30020000;
- 8000598: 4b13 ldr r3, [pc, #76] @ (80005e8 <MPU_Config+0x9c>)
- 800059a: 9301 str r3, [sp, #4]
- MPU_InitStruct.Size = MPU_REGION_SIZE_128KB;
- 800059c: 2310 movs r3, #16
- 800059e: f88d 3008 strb.w r3, [sp, #8]
- MPU_InitStruct.SubRegionDisable = 0x0;
- 80005a2: f88d 4009 strb.w r4, [sp, #9]
- MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1;
- 80005a6: f88d 500a strb.w r5, [sp, #10]
- MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
- 80005aa: 2303 movs r3, #3
- 80005ac: f88d 300b strb.w r3, [sp, #11]
- MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;
- 80005b0: f88d 400d strb.w r4, [sp, #13]
- HAL_MPU_ConfigRegion(&MPU_InitStruct);
- 80005b4: 4668 mov r0, sp
- 80005b6: f000 fd03 bl 8000fc0 <HAL_MPU_ConfigRegion>
- /** Initializes and configures the Region and the memory to be protected
- */
- MPU_InitStruct.Number = MPU_REGION_NUMBER2;
- 80005ba: 2302 movs r3, #2
- 80005bc: f88d 3001 strb.w r3, [sp, #1]
- MPU_InitStruct.BaseAddress = 0x30040000;
- 80005c0: 4b0a ldr r3, [pc, #40] @ (80005ec <MPU_Config+0xa0>)
- 80005c2: 9301 str r3, [sp, #4]
- MPU_InitStruct.Size = MPU_REGION_SIZE_512B;
- 80005c4: 2308 movs r3, #8
- 80005c6: f88d 3008 strb.w r3, [sp, #8]
- MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
- 80005ca: f88d 400a strb.w r4, [sp, #10]
- MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE;
- 80005ce: f88d 500d strb.w r5, [sp, #13]
- MPU_InitStruct.IsBufferable = MPU_ACCESS_BUFFERABLE;
- 80005d2: f88d 500f strb.w r5, [sp, #15]
- HAL_MPU_ConfigRegion(&MPU_InitStruct);
- 80005d6: 4668 mov r0, sp
- 80005d8: f000 fcf2 bl 8000fc0 <HAL_MPU_ConfigRegion>
- /* Enables the MPU */
- HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
- 80005dc: 2004 movs r0, #4
- 80005de: f000 fcdf bl 8000fa0 <HAL_MPU_Enable>
- }
- 80005e2: b005 add sp, #20
- 80005e4: bd30 pop {r4, r5, pc}
- 80005e6: bf00 nop
- 80005e8: 30020000 .word 0x30020000
- 80005ec: 30040000 .word 0x30040000
- 080005f0 <StartDefaultTask>:
- {
- 80005f0: b508 push {r3, lr}
- MX_LWIP_Init();
- 80005f2: f002 fef3 bl 80033dc <MX_LWIP_Init>
- 80005f6: e002 b.n 80005fe <StartDefaultTask+0xe>
- my_counter = 0;
- 80005f8: 4613 mov r3, r2
- 80005fa: 2200 movs r2, #0
- 80005fc: 601a str r2, [r3, #0]
- osDelay(pdMS_TO_TICKS(1000));
- 80005fe: f44f 707a mov.w r0, #1000 @ 0x3e8
- 8000602: f003 fc4b bl 8003e9c <osDelay>
- my_counter++;
- 8000606: 4a03 ldr r2, [pc, #12] @ (8000614 <StartDefaultTask+0x24>)
- 8000608: 6813 ldr r3, [r2, #0]
- 800060a: 3301 adds r3, #1
- 800060c: 6013 str r3, [r2, #0]
- if(my_counter > 10)
- 800060e: 2b0a cmp r3, #10
- 8000610: d9f5 bls.n 80005fe <StartDefaultTask+0xe>
- 8000612: e7f1 b.n 80005f8 <StartDefaultTask+0x8>
- 8000614: 240000a8 .word 0x240000a8
- 08000618 <HAL_TIM_PeriodElapsedCallback>:
- * a global variable "uwTick" used as application time base.
- * @param htim : TIM handle
- * @retval None
- */
- void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
- {
- 8000618: b508 push {r3, lr}
- /* USER CODE BEGIN Callback 0 */
- /* USER CODE END Callback 0 */
- if (htim->Instance == TIM6) {
- 800061a: 6802 ldr r2, [r0, #0]
- 800061c: 4b05 ldr r3, [pc, #20] @ (8000634 <HAL_TIM_PeriodElapsedCallback+0x1c>)
- 800061e: 429a cmp r2, r3
- 8000620: d000 beq.n 8000624 <HAL_TIM_PeriodElapsedCallback+0xc>
- MilliTimer++;
- }
- /* USER CODE BEGIN Callback 1 */
- /* USER CODE END Callback 1 */
- }
- 8000622: bd08 pop {r3, pc}
- HAL_IncTick();
- 8000624: f000 fc26 bl 8000e74 <HAL_IncTick>
- MilliTimer++;
- 8000628: 4a03 ldr r2, [pc, #12] @ (8000638 <HAL_TIM_PeriodElapsedCallback+0x20>)
- 800062a: 6813 ldr r3, [r2, #0]
- 800062c: 3301 adds r3, #1
- 800062e: 6013 str r3, [r2, #0]
- }
- 8000630: e7f7 b.n 8000622 <HAL_TIM_PeriodElapsedCallback+0xa>
- 8000632: bf00 nop
- 8000634: 40001000 .word 0x40001000
- 8000638: 24019c48 .word 0x24019c48
- 0800063c <Error_Handler>:
- \details Disables IRQ interrupts by setting the I-bit in the CPSR.
- Can only be executed in Privileged modes.
- */
- __STATIC_FORCEINLINE void __disable_irq(void)
- {
- __ASM volatile ("cpsid i" : : : "memory");
- 800063c: b672 cpsid i
- void Error_Handler(void)
- {
- /* USER CODE BEGIN Error_Handler_Debug */
- /* User can add his own implementation to report the HAL error return state */
- __disable_irq();
- while (1)
- 800063e: e7fe b.n 800063e <Error_Handler+0x2>
- 08000640 <SystemClock_Config>:
- {
- 8000640: b500 push {lr}
- 8000642: b09d sub sp, #116 @ 0x74
- RCC_OscInitTypeDef RCC_OscInitStruct = {0};
- 8000644: 224c movs r2, #76 @ 0x4c
- 8000646: 2100 movs r1, #0
- 8000648: a809 add r0, sp, #36 @ 0x24
- 800064a: f013 f835 bl 80136b8 <memset>
- RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
- 800064e: 2220 movs r2, #32
- 8000650: 2100 movs r1, #0
- 8000652: a801 add r0, sp, #4
- 8000654: f013 f830 bl 80136b8 <memset>
- HAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY);
- 8000658: 2004 movs r0, #4
- 800065a: f001 febf bl 80023dc <HAL_PWREx_ConfigSupply>
- __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
- 800065e: 2300 movs r3, #0
- 8000660: 9300 str r3, [sp, #0]
- 8000662: 4b26 ldr r3, [pc, #152] @ (80006fc <SystemClock_Config+0xbc>)
- 8000664: 6ada ldr r2, [r3, #44] @ 0x2c
- 8000666: f022 0201 bic.w r2, r2, #1
- 800066a: 62da str r2, [r3, #44] @ 0x2c
- 800066c: 6adb ldr r3, [r3, #44] @ 0x2c
- 800066e: f003 0301 and.w r3, r3, #1
- 8000672: 9300 str r3, [sp, #0]
- 8000674: 4b22 ldr r3, [pc, #136] @ (8000700 <SystemClock_Config+0xc0>)
- 8000676: 699a ldr r2, [r3, #24]
- 8000678: f442 4240 orr.w r2, r2, #49152 @ 0xc000
- 800067c: 619a str r2, [r3, #24]
- 800067e: 699b ldr r3, [r3, #24]
- 8000680: f403 4340 and.w r3, r3, #49152 @ 0xc000
- 8000684: 9300 str r3, [sp, #0]
- 8000686: 9b00 ldr r3, [sp, #0]
- while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
- 8000688: 4b1d ldr r3, [pc, #116] @ (8000700 <SystemClock_Config+0xc0>)
- 800068a: 699b ldr r3, [r3, #24]
- 800068c: f413 5f00 tst.w r3, #8192 @ 0x2000
- 8000690: d0fa beq.n 8000688 <SystemClock_Config+0x48>
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
- 8000692: 2301 movs r3, #1
- 8000694: 9309 str r3, [sp, #36] @ 0x24
- RCC_OscInitStruct.HSEState = RCC_HSE_ON;
- 8000696: f44f 3380 mov.w r3, #65536 @ 0x10000
- 800069a: 930a str r3, [sp, #40] @ 0x28
- RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
- 800069c: 2302 movs r3, #2
- 800069e: 9312 str r3, [sp, #72] @ 0x48
- RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
- 80006a0: 9313 str r3, [sp, #76] @ 0x4c
- RCC_OscInitStruct.PLL.PLLM = 5;
- 80006a2: 2205 movs r2, #5
- 80006a4: 9214 str r2, [sp, #80] @ 0x50
- RCC_OscInitStruct.PLL.PLLN = 160;
- 80006a6: 22a0 movs r2, #160 @ 0xa0
- 80006a8: 9215 str r2, [sp, #84] @ 0x54
- RCC_OscInitStruct.PLL.PLLP = 2;
- 80006aa: 9316 str r3, [sp, #88] @ 0x58
- RCC_OscInitStruct.PLL.PLLQ = 4;
- 80006ac: 2304 movs r3, #4
- 80006ae: 9317 str r3, [sp, #92] @ 0x5c
- RCC_OscInitStruct.PLL.PLLR = 4;
- 80006b0: 9318 str r3, [sp, #96] @ 0x60
- RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_2;
- 80006b2: 2308 movs r3, #8
- 80006b4: 9319 str r3, [sp, #100] @ 0x64
- RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE;
- 80006b6: 2300 movs r3, #0
- 80006b8: 931a str r3, [sp, #104] @ 0x68
- RCC_OscInitStruct.PLL.PLLFRACN = 0;
- 80006ba: 931b str r3, [sp, #108] @ 0x6c
- if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
- 80006bc: a809 add r0, sp, #36 @ 0x24
- 80006be: f001 fed7 bl 8002470 <HAL_RCC_OscConfig>
- 80006c2: b9b0 cbnz r0, 80006f2 <SystemClock_Config+0xb2>
- RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
- 80006c4: 233f movs r3, #63 @ 0x3f
- 80006c6: 9301 str r3, [sp, #4]
- RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
- 80006c8: 2303 movs r3, #3
- 80006ca: 9302 str r3, [sp, #8]
- RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1;
- 80006cc: 2300 movs r3, #0
- 80006ce: 9303 str r3, [sp, #12]
- RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2;
- 80006d0: 2308 movs r3, #8
- 80006d2: 9304 str r3, [sp, #16]
- RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2;
- 80006d4: 2340 movs r3, #64 @ 0x40
- 80006d6: 9305 str r3, [sp, #20]
- RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2;
- 80006d8: 9306 str r3, [sp, #24]
- RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2;
- 80006da: f44f 6280 mov.w r2, #1024 @ 0x400
- 80006de: 9207 str r2, [sp, #28]
- RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2;
- 80006e0: 9308 str r3, [sp, #32]
- if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
- 80006e2: 2102 movs r1, #2
- 80006e4: a801 add r0, sp, #4
- 80006e6: f002 faf7 bl 8002cd8 <HAL_RCC_ClockConfig>
- 80006ea: b920 cbnz r0, 80006f6 <SystemClock_Config+0xb6>
- }
- 80006ec: b01d add sp, #116 @ 0x74
- 80006ee: f85d fb04 ldr.w pc, [sp], #4
- Error_Handler();
- 80006f2: f7ff ffa3 bl 800063c <Error_Handler>
- Error_Handler();
- 80006f6: f7ff ffa1 bl 800063c <Error_Handler>
- 80006fa: bf00 nop
- 80006fc: 58000400 .word 0x58000400
- 8000700: 58024800 .word 0x58024800
- 08000704 <main>:
- {
- 8000704: b500 push {lr}
- 8000706: b083 sub sp, #12
- MPU_Config();
- 8000708: f7ff ff20 bl 800054c <MPU_Config>
- \details Turns on I-Cache
- */
- __STATIC_FORCEINLINE void SCB_EnableICache (void)
- {
- #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
- if (SCB->CCR & SCB_CCR_IC_Msk) return; /* return if ICache is already enabled */
- 800070c: 4b3d ldr r3, [pc, #244] @ (8000804 <main+0x100>)
- 800070e: 695b ldr r3, [r3, #20]
- 8000710: f413 3f00 tst.w r3, #131072 @ 0x20000
- 8000714: d113 bne.n 800073e <main+0x3a>
- \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");
- 8000716: f3bf 8f4f dsb sy
- __ASM volatile ("isb 0xF":::"memory");
- 800071a: f3bf 8f6f isb sy
- __DSB();
- __ISB();
- SCB->ICIALLU = 0UL; /* invalidate I-Cache */
- 800071e: 4b39 ldr r3, [pc, #228] @ (8000804 <main+0x100>)
- 8000720: 2200 movs r2, #0
- 8000722: f8c3 2250 str.w r2, [r3, #592] @ 0x250
- __ASM volatile ("dsb 0xF":::"memory");
- 8000726: f3bf 8f4f dsb sy
- __ASM volatile ("isb 0xF":::"memory");
- 800072a: f3bf 8f6f isb sy
- __DSB();
- __ISB();
- SCB->CCR |= (uint32_t)SCB_CCR_IC_Msk; /* enable I-Cache */
- 800072e: 695a ldr r2, [r3, #20]
- 8000730: f442 3200 orr.w r2, r2, #131072 @ 0x20000
- 8000734: 615a str r2, [r3, #20]
- __ASM volatile ("dsb 0xF":::"memory");
- 8000736: f3bf 8f4f dsb sy
- __ASM volatile ("isb 0xF":::"memory");
- 800073a: f3bf 8f6f isb sy
- #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
- uint32_t ccsidr;
- uint32_t sets;
- uint32_t ways;
- if (SCB->CCR & SCB_CCR_DC_Msk) return; /* return if DCache is already enabled */
- 800073e: 4b31 ldr r3, [pc, #196] @ (8000804 <main+0x100>)
- 8000740: 695b ldr r3, [r3, #20]
- 8000742: f413 3f80 tst.w r3, #65536 @ 0x10000
- 8000746: d127 bne.n 8000798 <main+0x94>
- SCB->CSSELR = 0U; /* select Level 1 data cache */
- 8000748: 4b2e ldr r3, [pc, #184] @ (8000804 <main+0x100>)
- 800074a: 2200 movs r2, #0
- 800074c: f8c3 2084 str.w r2, [r3, #132] @ 0x84
- __ASM volatile ("dsb 0xF":::"memory");
- 8000750: f3bf 8f4f dsb sy
- __DSB();
- ccsidr = SCB->CCSIDR;
- 8000754: f8d3 4080 ldr.w r4, [r3, #128] @ 0x80
- /* invalidate D-Cache */
- sets = (uint32_t)(CCSIDR_SETS(ccsidr));
- 8000758: f3c4 304e ubfx r0, r4, #13, #15
- 800075c: e000 b.n 8000760 <main+0x5c>
- ((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) );
- #if defined ( __CC_ARM )
- __schedule_barrier();
- #endif
- } while (ways-- != 0U);
- } while(sets-- != 0U);
- 800075e: 4618 mov r0, r3
- ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
- 8000760: f3c4 02c9 ubfx r2, r4, #3, #10
- SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) |
- 8000764: f643 73e0 movw r3, #16352 @ 0x3fe0
- 8000768: ea03 1340 and.w r3, r3, r0, lsl #5
- 800076c: ea43 7382 orr.w r3, r3, r2, lsl #30
- 8000770: 4924 ldr r1, [pc, #144] @ (8000804 <main+0x100>)
- 8000772: f8c1 3260 str.w r3, [r1, #608] @ 0x260
- } while (ways-- != 0U);
- 8000776: 4613 mov r3, r2
- 8000778: 3a01 subs r2, #1
- 800077a: 2b00 cmp r3, #0
- 800077c: d1f2 bne.n 8000764 <main+0x60>
- } while(sets-- != 0U);
- 800077e: 1e43 subs r3, r0, #1
- 8000780: 2800 cmp r0, #0
- 8000782: d1ec bne.n 800075e <main+0x5a>
- 8000784: f3bf 8f4f dsb sy
- __DSB();
- SCB->CCR |= (uint32_t)SCB_CCR_DC_Msk; /* enable D-Cache */
- 8000788: 694b ldr r3, [r1, #20]
- 800078a: f443 3380 orr.w r3, r3, #65536 @ 0x10000
- 800078e: 614b str r3, [r1, #20]
- 8000790: f3bf 8f4f dsb sy
- __ASM volatile ("isb 0xF":::"memory");
- 8000794: f3bf 8f6f isb sy
- HAL_Init();
- 8000798: f000 fb3e bl 8000e18 <HAL_Init>
- SystemClock_Config();
- 800079c: f7ff ff50 bl 8000640 <SystemClock_Config>
- ITM->TCR |= ITM_TCR_ITMENA_Msk;
- 80007a0: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000
- 80007a4: f8d3 2e80 ldr.w r2, [r3, #3712] @ 0xe80
- 80007a8: f042 0201 orr.w r2, r2, #1
- 80007ac: f8c3 2e80 str.w r2, [r3, #3712] @ 0xe80
- ITM->TER |= 1UL;
- 80007b0: f8d3 2e00 ldr.w r2, [r3, #3584] @ 0xe00
- 80007b4: f042 0201 orr.w r2, r2, #1
- 80007b8: f8c3 2e00 str.w r2, [r3, #3584] @ 0xe00
- MX_GPIO_Init();
- 80007bc: f7ff fe6c bl 8000498 <MX_GPIO_Init>
- __HAL_RCC_HSEM_CLK_ENABLE();
- 80007c0: 4b11 ldr r3, [pc, #68] @ (8000808 <main+0x104>)
- 80007c2: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 80007c6: f042 7200 orr.w r2, r2, #33554432 @ 0x2000000
- 80007ca: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
- 80007ce: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0
- 80007d2: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
- 80007d6: 9301 str r3, [sp, #4]
- 80007d8: 9b01 ldr r3, [sp, #4]
- HAL_HSEM_FastTake(HSEM_ID_0);
- 80007da: 2000 movs r0, #0
- 80007dc: f001 fde6 bl 80023ac <HAL_HSEM_FastTake>
- HAL_HSEM_Release(HSEM_ID_0,0);
- 80007e0: 2100 movs r1, #0
- 80007e2: 4608 mov r0, r1
- 80007e4: f001 fdf2 bl 80023cc <HAL_HSEM_Release>
- osKernelInitialize();
- 80007e8: f003 fabe bl 8003d68 <osKernelInitialize>
- defaultTaskHandle = osThreadNew(StartDefaultTask, NULL, &defaultTask_attributes);
- 80007ec: 4a07 ldr r2, [pc, #28] @ (800080c <main+0x108>)
- 80007ee: 2100 movs r1, #0
- 80007f0: 4807 ldr r0, [pc, #28] @ (8000810 <main+0x10c>)
- 80007f2: f003 faf1 bl 8003dd8 <osThreadNew>
- 80007f6: 4b07 ldr r3, [pc, #28] @ (8000814 <main+0x110>)
- 80007f8: 6018 str r0, [r3, #0]
- mqtt_cli_init();
- 80007fa: f000 f8e7 bl 80009cc <mqtt_cli_init>
- osKernelStart();
- 80007fe: f003 fac5 bl 8003d8c <osKernelStart>
- while (1)
- 8000802: e7fe b.n 8000802 <main+0xfe>
- 8000804: e000ed00 .word 0xe000ed00
- 8000808: 58024400 .word 0x58024400
- 800080c: 08014344 .word 0x08014344
- 8000810: 080005f1 .word 0x080005f1
- 8000814: 240000ac .word 0x240000ac
- 08000818 <MqttClientPubTask>:
- }
- }
- }
- void MqttClientPubTask(void *argument)
- {
- 8000818: b500 push {lr}
- 800081a: b085 sub sp, #20
- 800081c: e003 b.n 8000826 <MqttClientPubTask+0xe>
- {
- MQTTPublish(&mqttClient, "test", &message); //publish a message
- }
- }
- osDelay(pdMS_TO_TICKS(1000));
- 800081e: f44f 707a mov.w r0, #1000 @ 0x3e8
- 8000822: f003 fb3b bl 8003e9c <osDelay>
- if(mqttClient.isconnected)
- 8000826: 4b09 ldr r3, [pc, #36] @ (800084c <MqttClientPubTask+0x34>)
- 8000828: 6a1b ldr r3, [r3, #32]
- 800082a: 2b00 cmp r3, #0
- 800082c: d0f7 beq.n 800081e <MqttClientPubTask+0x6>
- message.payload = (void*)str;
- 800082e: 4b08 ldr r3, [pc, #32] @ (8000850 <MqttClientPubTask+0x38>)
- 8000830: 9302 str r3, [sp, #8]
- message.payloadlen = strlen(str);
- 8000832: 2317 movs r3, #23
- 8000834: 9303 str r3, [sp, #12]
- if(is_link_up())
- 8000836: f002 fdc9 bl 80033cc <is_link_up>
- 800083a: 2800 cmp r0, #0
- 800083c: d0ef beq.n 800081e <MqttClientPubTask+0x6>
- MQTTPublish(&mqttClient, "test", &message); //publish a message
- 800083e: 466a mov r2, sp
- 8000840: 4904 ldr r1, [pc, #16] @ (8000854 <MqttClientPubTask+0x3c>)
- 8000842: 4802 ldr r0, [pc, #8] @ (800084c <MqttClientPubTask+0x34>)
- 8000844: f011 ff1e bl 8012684 <MQTTPublish>
- 8000848: e7e9 b.n 800081e <MqttClientPubTask+0x6>
- 800084a: bf00 nop
- 800084c: 24000cb0 .word 0x24000cb0
- 8000850: 08014368 .word 0x08014368
- 8000854: 08014380 .word 0x08014380
- 08000858 <MqttMessageArrived>:
- return MQTT_SUCCESS;
- }
- void MqttMessageArrived(MessageData* msg)
- {
- 8000858: b538 push {r3, r4, r5, lr}
- MQTTMessage* message = msg->message;
- 800085a: 6804 ldr r4, [r0, #0]
- memset(msgBuffer, 0, sizeof(msgBuffer));
- 800085c: 4d08 ldr r5, [pc, #32] @ (8000880 <MqttMessageArrived+0x28>)
- 800085e: f44f 6280 mov.w r2, #1024 @ 0x400
- 8000862: 2100 movs r1, #0
- 8000864: 4628 mov r0, r5
- 8000866: f012 ff27 bl 80136b8 <memset>
- memcpy(msgBuffer, message->payload,message->payloadlen);
- 800086a: 68e2 ldr r2, [r4, #12]
- 800086c: 68a1 ldr r1, [r4, #8]
- 800086e: 4628 mov r0, r5
- 8000870: f013 f807 bl 8013882 <memcpy>
- printf("MQTT MSG[%d]:%s\n", (int)message->payloadlen, msgBuffer);
- 8000874: 462a mov r2, r5
- 8000876: 68e1 ldr r1, [r4, #12]
- 8000878: 4802 ldr r0, [pc, #8] @ (8000884 <MqttMessageArrived+0x2c>)
- 800087a: f012 fdc5 bl 8013408 <iprintf>
- }
- 800087e: bd38 pop {r3, r4, r5, pc}
- 8000880: 240000b0 .word 0x240000b0
- 8000884: 08014388 .word 0x08014388
- 08000888 <MqttConnectBroker>:
- {
- 8000888: b510 push {r4, lr}
- 800088a: b09a sub sp, #104 @ 0x68
- NewNetwork(&net);
- 800088c: 4c28 ldr r4, [pc, #160] @ (8000930 <MqttConnectBroker+0xa8>)
- 800088e: 4620 mov r0, r4
- 8000890: f012 f800 bl 8012894 <NewNetwork>
- ret = ConnectNetwork(&net, BROKER_IP, MQTT_PORT);
- 8000894: f240 725b movw r2, #1883 @ 0x75b
- 8000898: 4926 ldr r1, [pc, #152] @ (8000934 <MqttConnectBroker+0xac>)
- 800089a: 4620 mov r0, r4
- 800089c: f012 f80a bl 80128b4 <ConnectNetwork>
- if(ret != MQTT_SUCCESS)
- 80008a0: 2800 cmp r0, #0
- 80008a2: d131 bne.n 8000908 <MqttConnectBroker+0x80>
- MQTTClientInit(&mqttClient, &net, 1000, sndBuffer, sizeof(sndBuffer), rcvBuffer, sizeof(rcvBuffer));
- 80008a4: 4c24 ldr r4, [pc, #144] @ (8000938 <MqttConnectBroker+0xb0>)
- 80008a6: f44f 6380 mov.w r3, #1024 @ 0x400
- 80008aa: 9302 str r3, [sp, #8]
- 80008ac: 4a23 ldr r2, [pc, #140] @ (800093c <MqttConnectBroker+0xb4>)
- 80008ae: 9201 str r2, [sp, #4]
- 80008b0: 9300 str r3, [sp, #0]
- 80008b2: 4b23 ldr r3, [pc, #140] @ (8000940 <MqttConnectBroker+0xb8>)
- 80008b4: f44f 727a mov.w r2, #1000 @ 0x3e8
- 80008b8: 491d ldr r1, [pc, #116] @ (8000930 <MqttConnectBroker+0xa8>)
- 80008ba: 4620 mov r0, r4
- 80008bc: f011 fc26 bl 801210c <MQTTClientInit>
- MQTTPacket_connectData data = MQTTPacket_connectData_initializer;
- 80008c0: 2258 movs r2, #88 @ 0x58
- 80008c2: 4920 ldr r1, [pc, #128] @ (8000944 <MqttConnectBroker+0xbc>)
- 80008c4: a804 add r0, sp, #16
- 80008c6: f012 ffdc bl 8013882 <memcpy>
- data.MQTTVersion = 3;
- 80008ca: 2303 movs r3, #3
- 80008cc: f88d 3018 strb.w r3, [sp, #24]
- data.clientID.cstring = "test_user1";
- 80008d0: 4b1d ldr r3, [pc, #116] @ (8000948 <MqttConnectBroker+0xc0>)
- 80008d2: 9307 str r3, [sp, #28]
- data.username.cstring = "test_user1";
- 80008d4: 9314 str r3, [sp, #80] @ 0x50
- data.password.cstring = "1234";
- 80008d6: 4b1d ldr r3, [pc, #116] @ (800094c <MqttConnectBroker+0xc4>)
- 80008d8: 9317 str r3, [sp, #92] @ 0x5c
- data.keepAliveInterval = 100;
- 80008da: 2364 movs r3, #100 @ 0x64
- 80008dc: f8ad 3028 strh.w r3, [sp, #40] @ 0x28
- ret = MQTTConnect(&mqttClient, &data);
- 80008e0: a904 add r1, sp, #16
- 80008e2: 4620 mov r0, r4
- 80008e4: f011 fe12 bl 801250c <MQTTConnect>
- if(ret != MQTT_SUCCESS)
- 80008e8: 4604 mov r4, r0
- 80008ea: b998 cbnz r0, 8000914 <MqttConnectBroker+0x8c>
- ret = MQTTSubscribe(&mqttClient, "test_second", QOS0, MqttMessageArrived);
- 80008ec: 4b18 ldr r3, [pc, #96] @ (8000950 <MqttConnectBroker+0xc8>)
- 80008ee: 2200 movs r2, #0
- 80008f0: 4918 ldr r1, [pc, #96] @ (8000954 <MqttConnectBroker+0xcc>)
- 80008f2: 4811 ldr r0, [pc, #68] @ (8000938 <MqttConnectBroker+0xb0>)
- 80008f4: f011 febe bl 8012674 <MQTTSubscribe>
- if(ret != MQTT_SUCCESS)
- 80008f8: 4604 mov r4, r0
- 80008fa: b990 cbnz r0, 8000922 <MqttConnectBroker+0x9a>
- printf("MQTT_ConnectBroker O.K.\n");
- 80008fc: 4816 ldr r0, [pc, #88] @ (8000958 <MqttConnectBroker+0xd0>)
- 80008fe: f012 fdeb bl 80134d8 <puts>
- }
- 8000902: 4620 mov r0, r4
- 8000904: b01a add sp, #104 @ 0x68
- 8000906: bd10 pop {r4, pc}
- printf("ConnectNetwork failed.\n");
- 8000908: 4814 ldr r0, [pc, #80] @ (800095c <MqttConnectBroker+0xd4>)
- 800090a: f012 fde5 bl 80134d8 <puts>
- return -1;
- 800090e: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
- 8000912: e7f6 b.n 8000902 <MqttConnectBroker+0x7a>
- net_disconnect(&net);
- 8000914: 4806 ldr r0, [pc, #24] @ (8000930 <MqttConnectBroker+0xa8>)
- 8000916: f011 ff69 bl 80127ec <net_disconnect>
- printf("MQTTConnect failed.\n");
- 800091a: 4811 ldr r0, [pc, #68] @ (8000960 <MqttConnectBroker+0xd8>)
- 800091c: f012 fddc bl 80134d8 <puts>
- return ret;
- 8000920: e7ef b.n 8000902 <MqttConnectBroker+0x7a>
- net_disconnect(&net);
- 8000922: 4803 ldr r0, [pc, #12] @ (8000930 <MqttConnectBroker+0xa8>)
- 8000924: f011 ff62 bl 80127ec <net_disconnect>
- printf("MQTTSubscribe failed.\n");
- 8000928: 480e ldr r0, [pc, #56] @ (8000964 <MqttConnectBroker+0xdc>)
- 800092a: f012 fdd5 bl 80134d8 <puts>
- return ret;
- 800092e: e7e8 b.n 8000902 <MqttConnectBroker+0x7a>
- 8000930: 24000d18 .word 0x24000d18
- 8000934: 0801439c .word 0x0801439c
- 8000938: 24000cb0 .word 0x24000cb0
- 800093c: 240004b0 .word 0x240004b0
- 8000940: 240008b0 .word 0x240008b0
- 8000944: 08014278 .word 0x08014278
- 8000948: 080143c4 .word 0x080143c4
- 800094c: 080143d0 .word 0x080143d0
- 8000950: 08000859 .word 0x08000859
- 8000954: 080143ec .word 0x080143ec
- 8000958: 08014410 .word 0x08014410
- 800095c: 080143ac .word 0x080143ac
- 8000960: 080143d8 .word 0x080143d8
- 8000964: 080143f8 .word 0x080143f8
- 08000968 <MqttClientSubTask>:
- {
- 8000968: b508 push {r3, lr}
- 800096a: e003 b.n 8000974 <MqttClientSubTask+0xc>
- osDelay(pdMS_TO_TICKS(1000));
- 800096c: f44f 707a mov.w r0, #1000 @ 0x3e8
- 8000970: f003 fa94 bl 8003e9c <osDelay>
- if (gnetif.ip_addr.addr == 0 || gnetif.netmask.addr == 0 || gnetif.gw.addr == 0) //system has no valid ip address
- 8000974: 4b12 ldr r3, [pc, #72] @ (80009c0 <MqttClientSubTask+0x58>)
- 8000976: 685b ldr r3, [r3, #4]
- 8000978: 2b00 cmp r3, #0
- 800097a: d0f7 beq.n 800096c <MqttClientSubTask+0x4>
- 800097c: 4b10 ldr r3, [pc, #64] @ (80009c0 <MqttClientSubTask+0x58>)
- 800097e: 689b ldr r3, [r3, #8]
- 8000980: 2b00 cmp r3, #0
- 8000982: d0f3 beq.n 800096c <MqttClientSubTask+0x4>
- 8000984: 4b0e ldr r3, [pc, #56] @ (80009c0 <MqttClientSubTask+0x58>)
- 8000986: 68db ldr r3, [r3, #12]
- 8000988: 2b00 cmp r3, #0
- 800098a: d0ef beq.n 800096c <MqttClientSubTask+0x4>
- printf("DHCP/Static IP O.K.\n");
- 800098c: 480d ldr r0, [pc, #52] @ (80009c4 <MqttClientSubTask+0x5c>)
- 800098e: f012 fda3 bl 80134d8 <puts>
- break;
- 8000992: e008 b.n 80009a6 <MqttClientSubTask+0x3e>
- MQTTDisconnect(&mqttClient);
- 8000994: 480c ldr r0, [pc, #48] @ (80009c8 <MqttClientSubTask+0x60>)
- 8000996: f011 feff bl 8012798 <MQTTDisconnect>
- MqttConnectBroker();
- 800099a: f7ff ff75 bl 8000888 <MqttConnectBroker>
- osDelay(pdMS_TO_TICKS(1000));
- 800099e: f44f 707a mov.w r0, #1000 @ 0x3e8
- 80009a2: f003 fa7b bl 8003e9c <osDelay>
- if(!mqttClient.isconnected)
- 80009a6: 4b08 ldr r3, [pc, #32] @ (80009c8 <MqttClientSubTask+0x60>)
- 80009a8: 6a1b ldr r3, [r3, #32]
- 80009aa: 2b00 cmp r3, #0
- 80009ac: d0f2 beq.n 8000994 <MqttClientSubTask+0x2c>
- MQTTYield(&mqttClient, 500); //handle timer
- 80009ae: f44f 71fa mov.w r1, #500 @ 0x1f4
- 80009b2: 4805 ldr r0, [pc, #20] @ (80009c8 <MqttClientSubTask+0x60>)
- 80009b4: f011 fd12 bl 80123dc <MQTTYield>
- osDelay(pdMS_TO_TICKS(100));
- 80009b8: 2064 movs r0, #100 @ 0x64
- 80009ba: f003 fa6f bl 8003e9c <osDelay>
- 80009be: e7f2 b.n 80009a6 <MqttClientSubTask+0x3e>
- 80009c0: 24000db4 .word 0x24000db4
- 80009c4: 08014428 .word 0x08014428
- 80009c8: 24000cb0 .word 0x24000cb0
- 080009cc <mqtt_cli_init>:
- void mqtt_cli_init(void)
- {
- 80009cc: b508 push {r3, lr}
- mqttClientSubTaskHandle = osThreadNew(MqttClientSubTask, NULL, &mqttClientSubTaskAttr); //subscribe task
- 80009ce: 4a07 ldr r2, [pc, #28] @ (80009ec <mqtt_cli_init+0x20>)
- 80009d0: 2100 movs r1, #0
- 80009d2: 4807 ldr r0, [pc, #28] @ (80009f0 <mqtt_cli_init+0x24>)
- 80009d4: f003 fa00 bl 8003dd8 <osThreadNew>
- 80009d8: 4b06 ldr r3, [pc, #24] @ (80009f4 <mqtt_cli_init+0x28>)
- 80009da: 6018 str r0, [r3, #0]
- mqttClientPubTaskHandle = osThreadNew(MqttClientPubTask, NULL, &mqttClientPubTaskAttr); //publish task
- 80009dc: 4a06 ldr r2, [pc, #24] @ (80009f8 <mqtt_cli_init+0x2c>)
- 80009de: 2100 movs r1, #0
- 80009e0: 4806 ldr r0, [pc, #24] @ (80009fc <mqtt_cli_init+0x30>)
- 80009e2: f003 f9f9 bl 8003dd8 <osThreadNew>
- 80009e6: 4b06 ldr r3, [pc, #24] @ (8000a00 <mqtt_cli_init+0x34>)
- 80009e8: 6018 str r0, [r3, #0]
- }
- 80009ea: bd08 pop {r3, pc}
- 80009ec: 08014488 .word 0x08014488
- 80009f0: 08000969 .word 0x08000969
- 80009f4: 24000d2c .word 0x24000d2c
- 80009f8: 08014464 .word 0x08014464
- 80009fc: 08000819 .word 0x08000819
- 8000a00: 24000d28 .word 0x24000d28
- 08000a04 <HAL_MspInit>:
- /* USER CODE END 0 */
- /**
- * Initializes the Global MSP.
- */
- void HAL_MspInit(void)
- {
- 8000a04: b500 push {lr}
- 8000a06: b083 sub sp, #12
- /* USER CODE BEGIN MspInit 0 */
- /* USER CODE END MspInit 0 */
- __HAL_RCC_SYSCFG_CLK_ENABLE();
- 8000a08: 4b0a ldr r3, [pc, #40] @ (8000a34 <HAL_MspInit+0x30>)
- 8000a0a: f8d3 20f4 ldr.w r2, [r3, #244] @ 0xf4
- 8000a0e: f042 0202 orr.w r2, r2, #2
- 8000a12: f8c3 20f4 str.w r2, [r3, #244] @ 0xf4
- 8000a16: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4
- 8000a1a: f003 0302 and.w r3, r3, #2
- 8000a1e: 9301 str r3, [sp, #4]
- 8000a20: 9b01 ldr r3, [sp, #4]
- /* System interrupt init*/
- /* PendSV_IRQn interrupt configuration */
- HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0);
- 8000a22: 2200 movs r2, #0
- 8000a24: 210f movs r1, #15
- 8000a26: f06f 0001 mvn.w r0, #1
- 8000a2a: f000 fa97 bl 8000f5c <HAL_NVIC_SetPriority>
- /* USER CODE BEGIN MspInit 1 */
- /* USER CODE END MspInit 1 */
- }
- 8000a2e: b003 add sp, #12
- 8000a30: f85d fb04 ldr.w pc, [sp], #4
- 8000a34: 58024400 .word 0x58024400
- 08000a38 <HAL_InitTick>:
- uint32_t uwTimclock, uwAPB1Prescaler;
- uint32_t uwPrescalerValue;
- uint32_t pFLatency;
- /*Configure the TIM6 IRQ priority */
- if (TickPriority < (1UL << __NVIC_PRIO_BITS))
- 8000a38: 280f cmp r0, #15
- 8000a3a: d901 bls.n 8000a40 <HAL_InitTick+0x8>
- HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn);
- uwTickPrio = TickPriority;
- }
- else
- {
- return HAL_ERROR;
- 8000a3c: 2001 movs r0, #1
- return HAL_TIM_Base_Start_IT(&htim6);
- }
- /* Return function status */
- return HAL_ERROR;
- }
- 8000a3e: 4770 bx lr
- {
- 8000a40: b510 push {r4, lr}
- 8000a42: b08a sub sp, #40 @ 0x28
- 8000a44: 4604 mov r4, r0
- HAL_NVIC_SetPriority(TIM6_DAC_IRQn, TickPriority ,0U);
- 8000a46: 2200 movs r2, #0
- 8000a48: 4601 mov r1, r0
- 8000a4a: 2036 movs r0, #54 @ 0x36
- 8000a4c: f000 fa86 bl 8000f5c <HAL_NVIC_SetPriority>
- HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn);
- 8000a50: 2036 movs r0, #54 @ 0x36
- 8000a52: f000 fa93 bl 8000f7c <HAL_NVIC_EnableIRQ>
- uwTickPrio = TickPriority;
- 8000a56: 4b1a ldr r3, [pc, #104] @ (8000ac0 <HAL_InitTick+0x88>)
- 8000a58: 601c str r4, [r3, #0]
- __HAL_RCC_TIM6_CLK_ENABLE();
- 8000a5a: 4b1a ldr r3, [pc, #104] @ (8000ac4 <HAL_InitTick+0x8c>)
- 8000a5c: f8d3 20e8 ldr.w r2, [r3, #232] @ 0xe8
- 8000a60: f042 0210 orr.w r2, r2, #16
- 8000a64: f8c3 20e8 str.w r2, [r3, #232] @ 0xe8
- 8000a68: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8
- 8000a6c: f003 0310 and.w r3, r3, #16
- 8000a70: 9300 str r3, [sp, #0]
- 8000a72: 9b00 ldr r3, [sp, #0]
- HAL_RCC_GetClockConfig(&clkconfig, &pFLatency);
- 8000a74: a901 add r1, sp, #4
- 8000a76: a802 add r0, sp, #8
- 8000a78: f002 faac bl 8002fd4 <HAL_RCC_GetClockConfig>
- uwAPB1Prescaler = clkconfig.APB1CLKDivider;
- 8000a7c: 9b07 ldr r3, [sp, #28]
- if (uwAPB1Prescaler == RCC_HCLK_DIV1)
- 8000a7e: b9bb cbnz r3, 8000ab0 <HAL_InitTick+0x78>
- uwTimclock = HAL_RCC_GetPCLK1Freq();
- 8000a80: f002 fa96 bl 8002fb0 <HAL_RCC_GetPCLK1Freq>
- 8000a84: 4603 mov r3, r0
- uwPrescalerValue = (uint32_t) ((uwTimclock / 1000000U) - 1U);
- 8000a86: 4a10 ldr r2, [pc, #64] @ (8000ac8 <HAL_InitTick+0x90>)
- 8000a88: fba2 2303 umull r2, r3, r2, r3
- 8000a8c: 0c9b lsrs r3, r3, #18
- 8000a8e: 3b01 subs r3, #1
- htim6.Instance = TIM6;
- 8000a90: 480e ldr r0, [pc, #56] @ (8000acc <HAL_InitTick+0x94>)
- 8000a92: 4a0f ldr r2, [pc, #60] @ (8000ad0 <HAL_InitTick+0x98>)
- 8000a94: 6002 str r2, [r0, #0]
- htim6.Init.Period = (1000000U / 1000U) - 1U;
- 8000a96: f240 32e7 movw r2, #999 @ 0x3e7
- 8000a9a: 60c2 str r2, [r0, #12]
- htim6.Init.Prescaler = uwPrescalerValue;
- 8000a9c: 6043 str r3, [r0, #4]
- htim6.Init.ClockDivision = 0;
- 8000a9e: 2300 movs r3, #0
- 8000aa0: 6103 str r3, [r0, #16]
- htim6.Init.CounterMode = TIM_COUNTERMODE_UP;
- 8000aa2: 6083 str r3, [r0, #8]
- if(HAL_TIM_Base_Init(&htim6) == HAL_OK)
- 8000aa4: f002 fc5e bl 8003364 <HAL_TIM_Base_Init>
- 8000aa8: b130 cbz r0, 8000ab8 <HAL_InitTick+0x80>
- return HAL_ERROR;
- 8000aaa: 2001 movs r0, #1
- }
- 8000aac: b00a add sp, #40 @ 0x28
- 8000aae: bd10 pop {r4, pc}
- uwTimclock = 2UL * HAL_RCC_GetPCLK1Freq();
- 8000ab0: f002 fa7e bl 8002fb0 <HAL_RCC_GetPCLK1Freq>
- 8000ab4: 0043 lsls r3, r0, #1
- 8000ab6: e7e6 b.n 8000a86 <HAL_InitTick+0x4e>
- return HAL_TIM_Base_Start_IT(&htim6);
- 8000ab8: 4804 ldr r0, [pc, #16] @ (8000acc <HAL_InitTick+0x94>)
- 8000aba: f002 fab7 bl 800302c <HAL_TIM_Base_Start_IT>
- 8000abe: e7f5 b.n 8000aac <HAL_InitTick+0x74>
- 8000ac0: 2400000c .word 0x2400000c
- 8000ac4: 58024400 .word 0x58024400
- 8000ac8: 431bde83 .word 0x431bde83
- 8000acc: 24000d30 .word 0x24000d30
- 8000ad0: 40001000 .word 0x40001000
- 08000ad4 <NMI_Handler>:
- {
- /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
- /* USER CODE END NonMaskableInt_IRQn 0 */
- /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
- while (1)
- 8000ad4: e7fe b.n 8000ad4 <NMI_Handler>
- 08000ad6 <HardFault_Handler>:
- void HardFault_Handler(void)
- {
- /* USER CODE BEGIN HardFault_IRQn 0 */
- /* USER CODE END HardFault_IRQn 0 */
- while (1)
- 8000ad6: e7fe b.n 8000ad6 <HardFault_Handler>
- 08000ad8 <MemManage_Handler>:
- void MemManage_Handler(void)
- {
- /* USER CODE BEGIN MemoryManagement_IRQn 0 */
- /* USER CODE END MemoryManagement_IRQn 0 */
- while (1)
- 8000ad8: e7fe b.n 8000ad8 <MemManage_Handler>
- 08000ada <BusFault_Handler>:
- void BusFault_Handler(void)
- {
- /* USER CODE BEGIN BusFault_IRQn 0 */
- /* USER CODE END BusFault_IRQn 0 */
- while (1)
- 8000ada: e7fe b.n 8000ada <BusFault_Handler>
- 08000adc <UsageFault_Handler>:
- void UsageFault_Handler(void)
- {
- /* USER CODE BEGIN UsageFault_IRQn 0 */
- /* USER CODE END UsageFault_IRQn 0 */
- while (1)
- 8000adc: e7fe b.n 8000adc <UsageFault_Handler>
- 08000ade <DebugMon_Handler>:
- /* USER CODE END DebugMonitor_IRQn 0 */
- /* USER CODE BEGIN DebugMonitor_IRQn 1 */
- /* USER CODE END DebugMonitor_IRQn 1 */
- }
- 8000ade: 4770 bx lr
- 08000ae0 <TIM6_DAC_IRQHandler>:
- /**
- * @brief This function handles TIM6 global interrupt, DAC1_CH1 and DAC1_CH2 underrun error interrupts.
- */
- void TIM6_DAC_IRQHandler(void)
- {
- 8000ae0: b508 push {r3, lr}
- /* USER CODE BEGIN TIM6_DAC_IRQn 0 */
- /* USER CODE END TIM6_DAC_IRQn 0 */
- HAL_TIM_IRQHandler(&htim6);
- 8000ae2: 4802 ldr r0, [pc, #8] @ (8000aec <TIM6_DAC_IRQHandler+0xc>)
- 8000ae4: f002 faee bl 80030c4 <HAL_TIM_IRQHandler>
- /* USER CODE BEGIN TIM6_DAC_IRQn 1 */
- /* USER CODE END TIM6_DAC_IRQn 1 */
- }
- 8000ae8: bd08 pop {r3, pc}
- 8000aea: bf00 nop
- 8000aec: 24000d30 .word 0x24000d30
- 08000af0 <ETH_IRQHandler>:
- /**
- * @brief This function handles Ethernet global interrupt.
- */
- void ETH_IRQHandler(void)
- {
- 8000af0: b508 push {r3, lr}
- /* USER CODE BEGIN ETH_IRQn 0 */
- /* USER CODE END ETH_IRQn 0 */
- HAL_ETH_IRQHandler(&heth);
- 8000af2: 4802 ldr r0, [pc, #8] @ (8000afc <ETH_IRQHandler+0xc>)
- 8000af4: f001 f823 bl 8001b3e <HAL_ETH_IRQHandler>
- /* USER CODE BEGIN ETH_IRQn 1 */
- /* USER CODE END ETH_IRQn 1 */
- }
- 8000af8: bd08 pop {r3, pc}
- 8000afa: bf00 nop
- 8000afc: 24000e4c .word 0x24000e4c
- 08000b00 <ITM_SendChar>:
- \param [in] ch Character to transmit.
- \returns Character to transmit.
- */
- __STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch)
- {
- if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */
- 8000b00: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000
- 8000b04: f8d3 3e80 ldr.w r3, [r3, #3712] @ 0xe80
- 8000b08: f013 0f01 tst.w r3, #1
- 8000b0c: d011 beq.n 8000b32 <ITM_SendChar+0x32>
- ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */
- 8000b0e: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000
- 8000b12: f8d3 3e00 ldr.w r3, [r3, #3584] @ 0xe00
- if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */
- 8000b16: f013 0f01 tst.w r3, #1
- 8000b1a: d101 bne.n 8000b20 <ITM_SendChar+0x20>
- 8000b1c: 4770 bx lr
- {
- while (ITM->PORT[0U].u32 == 0UL)
- {
- __NOP();
- 8000b1e: bf00 nop
- while (ITM->PORT[0U].u32 == 0UL)
- 8000b20: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000
- 8000b24: 681b ldr r3, [r3, #0]
- 8000b26: 2b00 cmp r3, #0
- 8000b28: d0f9 beq.n 8000b1e <ITM_SendChar+0x1e>
- }
- ITM->PORT[0U].u8 = (uint8_t)ch;
- 8000b2a: b2c3 uxtb r3, r0
- 8000b2c: f04f 4260 mov.w r2, #3758096384 @ 0xe0000000
- 8000b30: 7013 strb r3, [r2, #0]
- }
- return (ch);
- }
- 8000b32: 4770 bx lr
- 08000b34 <_getpid>:
- }
- int _getpid(void)
- {
- return 1;
- }
- 8000b34: 2001 movs r0, #1
- 8000b36: 4770 bx lr
- 08000b38 <_kill>:
- int _kill(int pid, int sig)
- {
- errno = EINVAL;
- 8000b38: 4b02 ldr r3, [pc, #8] @ (8000b44 <_kill+0xc>)
- 8000b3a: 2216 movs r2, #22
- 8000b3c: 601a str r2, [r3, #0]
- return -1;
- }
- 8000b3e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8000b42: 4770 bx lr
- 8000b44: 24019d8c .word 0x24019d8c
- 08000b48 <_exit>:
- void _exit (int status)
- {
- 8000b48: b508 push {r3, lr}
- _kill(status, -1);
- 8000b4a: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
- 8000b4e: f7ff fff3 bl 8000b38 <_kill>
- while (1) {} /* Make sure we hang here */
- 8000b52: e7fe b.n 8000b52 <_exit+0xa>
- 08000b54 <_read>:
- }
- __attribute__((weak)) int _read(int file, char *ptr, int len)
- {
- 8000b54: b570 push {r4, r5, r6, lr}
- 8000b56: 460c mov r4, r1
- 8000b58: 4616 mov r6, r2
- int DataIdx;
- for (DataIdx = 0; DataIdx < len; DataIdx++)
- 8000b5a: 2500 movs r5, #0
- 8000b5c: e006 b.n 8000b6c <_read+0x18>
- {
- *ptr++ = __io_getchar();
- 8000b5e: f3af 8000 nop.w
- 8000b62: 4621 mov r1, r4
- 8000b64: f801 0b01 strb.w r0, [r1], #1
- for (DataIdx = 0; DataIdx < len; DataIdx++)
- 8000b68: 3501 adds r5, #1
- *ptr++ = __io_getchar();
- 8000b6a: 460c mov r4, r1
- for (DataIdx = 0; DataIdx < len; DataIdx++)
- 8000b6c: 42b5 cmp r5, r6
- 8000b6e: dbf6 blt.n 8000b5e <_read+0xa>
- }
- return len;
- }
- 8000b70: 4630 mov r0, r6
- 8000b72: bd70 pop {r4, r5, r6, pc}
- 08000b74 <_write>:
- __attribute__((weak)) int _write(int file, char *ptr, int len)
- {
- 8000b74: b570 push {r4, r5, r6, lr}
- 8000b76: 460c mov r4, r1
- 8000b78: 4616 mov r6, r2
- int DataIdx;
- for (DataIdx = 0; DataIdx < len; DataIdx++)
- 8000b7a: 2500 movs r5, #0
- 8000b7c: e004 b.n 8000b88 <_write+0x14>
- {
- // __io_putchar(*ptr++);
- ITM_SendChar(*ptr++);
- 8000b7e: f814 0b01 ldrb.w r0, [r4], #1
- 8000b82: f7ff ffbd bl 8000b00 <ITM_SendChar>
- for (DataIdx = 0; DataIdx < len; DataIdx++)
- 8000b86: 3501 adds r5, #1
- 8000b88: 42b5 cmp r5, r6
- 8000b8a: dbf8 blt.n 8000b7e <_write+0xa>
- }
- return len;
- }
- 8000b8c: 4630 mov r0, r6
- 8000b8e: bd70 pop {r4, r5, r6, pc}
- 08000b90 <_close>:
- int _close(int file)
- {
- return -1;
- }
- 8000b90: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8000b94: 4770 bx lr
- 08000b96 <_fstat>:
- int _fstat(int file, struct stat *st)
- {
- st->st_mode = S_IFCHR;
- 8000b96: f44f 5300 mov.w r3, #8192 @ 0x2000
- 8000b9a: 604b str r3, [r1, #4]
- return 0;
- }
- 8000b9c: 2000 movs r0, #0
- 8000b9e: 4770 bx lr
- 08000ba0 <_isatty>:
- int _isatty(int file)
- {
- return 1;
- }
- 8000ba0: 2001 movs r0, #1
- 8000ba2: 4770 bx lr
- 08000ba4 <_lseek>:
- int _lseek(int file, int ptr, int dir)
- {
- return 0;
- }
- 8000ba4: 2000 movs r0, #0
- 8000ba6: 4770 bx lr
- 08000ba8 <_sbrk>:
- *
- * @param incr Memory size
- * @return Pointer to allocated memory
- */
- void *_sbrk(ptrdiff_t incr)
- {
- 8000ba8: b410 push {r4}
- 8000baa: 4603 mov r3, r0
- 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;
- 8000bac: 4a0c ldr r2, [pc, #48] @ (8000be0 <_sbrk+0x38>)
- 8000bae: 490d ldr r1, [pc, #52] @ (8000be4 <_sbrk+0x3c>)
- const uint8_t *max_heap = (uint8_t *)stack_limit;
- uint8_t *prev_heap_end;
- /* Initialize heap end at first call */
- if (NULL == __sbrk_heap_end)
- 8000bb0: 480d ldr r0, [pc, #52] @ (8000be8 <_sbrk+0x40>)
- 8000bb2: 6800 ldr r0, [r0, #0]
- 8000bb4: b150 cbz r0, 8000bcc <_sbrk+0x24>
- {
- __sbrk_heap_end = &_end;
- }
- /* Protect heap from growing into the reserved MSP stack */
- if (__sbrk_heap_end + incr > max_heap)
- 8000bb6: 480c ldr r0, [pc, #48] @ (8000be8 <_sbrk+0x40>)
- 8000bb8: 6800 ldr r0, [r0, #0]
- 8000bba: 4403 add r3, r0
- 8000bbc: 1a52 subs r2, r2, r1
- 8000bbe: 4293 cmp r3, r2
- 8000bc0: d808 bhi.n 8000bd4 <_sbrk+0x2c>
- errno = ENOMEM;
- return (void *)-1;
- }
- prev_heap_end = __sbrk_heap_end;
- __sbrk_heap_end += incr;
- 8000bc2: 4a09 ldr r2, [pc, #36] @ (8000be8 <_sbrk+0x40>)
- 8000bc4: 6013 str r3, [r2, #0]
- return (void *)prev_heap_end;
- }
- 8000bc6: f85d 4b04 ldr.w r4, [sp], #4
- 8000bca: 4770 bx lr
- __sbrk_heap_end = &_end;
- 8000bcc: 4806 ldr r0, [pc, #24] @ (8000be8 <_sbrk+0x40>)
- 8000bce: 4c07 ldr r4, [pc, #28] @ (8000bec <_sbrk+0x44>)
- 8000bd0: 6004 str r4, [r0, #0]
- 8000bd2: e7f0 b.n 8000bb6 <_sbrk+0xe>
- errno = ENOMEM;
- 8000bd4: 4b06 ldr r3, [pc, #24] @ (8000bf0 <_sbrk+0x48>)
- 8000bd6: 220c movs r2, #12
- 8000bd8: 601a str r2, [r3, #0]
- return (void *)-1;
- 8000bda: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8000bde: e7f2 b.n 8000bc6 <_sbrk+0x1e>
- 8000be0: 24080000 .word 0x24080000
- 8000be4: 00000400 .word 0x00000400
- 8000be8: 24000d7c .word 0x24000d7c
- 8000bec: 24019da0 .word 0x24019da0
- 8000bf0: 24019d8c .word 0x24019d8c
- 08000bf4 <Reset_Handler>:
- .section .text.Reset_Handler
- .weak Reset_Handler
- .type Reset_Handler, %function
- Reset_Handler:
- ldr sp, =_estack /* set stack pointer */
- 8000bf4: f8df d034 ldr.w sp, [pc, #52] @ 8000c2c <LoopFillZerobss+0xe>
- /* Call the clock system initialization function.*/
- bl SystemInit
- 8000bf8: f7ff fbda bl 80003b0 <SystemInit>
- /* Copy the data segment initializers from flash to SRAM */
- ldr r0, =_sdata
- 8000bfc: 480c ldr r0, [pc, #48] @ (8000c30 <LoopFillZerobss+0x12>)
- ldr r1, =_edata
- 8000bfe: 490d ldr r1, [pc, #52] @ (8000c34 <LoopFillZerobss+0x16>)
- ldr r2, =_sidata
- 8000c00: 4a0d ldr r2, [pc, #52] @ (8000c38 <LoopFillZerobss+0x1a>)
- movs r3, #0
- 8000c02: 2300 movs r3, #0
- b LoopCopyDataInit
- 8000c04: e002 b.n 8000c0c <LoopCopyDataInit>
- 08000c06 <CopyDataInit>:
- CopyDataInit:
- ldr r4, [r2, r3]
- 8000c06: 58d4 ldr r4, [r2, r3]
- str r4, [r0, r3]
- 8000c08: 50c4 str r4, [r0, r3]
- adds r3, r3, #4
- 8000c0a: 3304 adds r3, #4
- 08000c0c <LoopCopyDataInit>:
- LoopCopyDataInit:
- adds r4, r0, r3
- 8000c0c: 18c4 adds r4, r0, r3
- cmp r4, r1
- 8000c0e: 428c cmp r4, r1
- bcc CopyDataInit
- 8000c10: d3f9 bcc.n 8000c06 <CopyDataInit>
- /* Zero fill the bss segment. */
- ldr r2, =_sbss
- 8000c12: 4a0a ldr r2, [pc, #40] @ (8000c3c <LoopFillZerobss+0x1e>)
- ldr r4, =_ebss
- 8000c14: 4c0a ldr r4, [pc, #40] @ (8000c40 <LoopFillZerobss+0x22>)
- movs r3, #0
- 8000c16: 2300 movs r3, #0
- b LoopFillZerobss
- 8000c18: e001 b.n 8000c1e <LoopFillZerobss>
- 08000c1a <FillZerobss>:
- FillZerobss:
- str r3, [r2]
- 8000c1a: 6013 str r3, [r2, #0]
- adds r2, r2, #4
- 8000c1c: 3204 adds r2, #4
- 08000c1e <LoopFillZerobss>:
- LoopFillZerobss:
- cmp r2, r4
- 8000c1e: 42a2 cmp r2, r4
- bcc FillZerobss
- 8000c20: d3fb bcc.n 8000c1a <FillZerobss>
- /* Call static constructors */
- bl __libc_init_array
- 8000c22: f012 fdff bl 8013824 <__libc_init_array>
- /* Call the application's entry point.*/
- bl main
- 8000c26: f7ff fd6d bl 8000704 <main>
- bx lr
- 8000c2a: 4770 bx lr
- ldr sp, =_estack /* set stack pointer */
- 8000c2c: 24080000 .word 0x24080000
- ldr r0, =_sdata
- 8000c30: 24000000 .word 0x24000000
- ldr r1, =_edata
- 8000c34: 2400008c .word 0x2400008c
- ldr r2, =_sidata
- 8000c38: 080180cc .word 0x080180cc
- ldr r2, =_sbss
- 8000c3c: 2400008c .word 0x2400008c
- ldr r4, =_ebss
- 8000c40: 24019d9c .word 0x24019d9c
- 08000c44 <ADC3_IRQHandler>:
- * @retval None
- */
- .section .text.Default_Handler,"ax",%progbits
- Default_Handler:
- Infinite_Loop:
- b Infinite_Loop
- 8000c44: e7fe b.n 8000c44 <ADC3_IRQHandler>
- 08000c46 <LAN8742_RegisterBusIO>:
- * @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)
- {
- if(!pObj || !ioctx->ReadReg || !ioctx->WriteReg || !ioctx->GetTick)
- 8000c46: b188 cbz r0, 8000c6c <LAN8742_RegisterBusIO+0x26>
- 8000c48: 68ca ldr r2, [r1, #12]
- 8000c4a: b192 cbz r2, 8000c72 <LAN8742_RegisterBusIO+0x2c>
- 8000c4c: 688a ldr r2, [r1, #8]
- 8000c4e: b19a cbz r2, 8000c78 <LAN8742_RegisterBusIO+0x32>
- 8000c50: 690a ldr r2, [r1, #16]
- 8000c52: b1a2 cbz r2, 8000c7e <LAN8742_RegisterBusIO+0x38>
- {
- return LAN8742_STATUS_ERROR;
- }
-
- pObj->IO.Init = ioctx->Init;
- 8000c54: 680a ldr r2, [r1, #0]
- 8000c56: 6082 str r2, [r0, #8]
- pObj->IO.DeInit = ioctx->DeInit;
- 8000c58: 684a ldr r2, [r1, #4]
- 8000c5a: 60c2 str r2, [r0, #12]
- pObj->IO.ReadReg = ioctx->ReadReg;
- 8000c5c: 68ca ldr r2, [r1, #12]
- 8000c5e: 6142 str r2, [r0, #20]
- pObj->IO.WriteReg = ioctx->WriteReg;
- 8000c60: 688a ldr r2, [r1, #8]
- 8000c62: 6102 str r2, [r0, #16]
- pObj->IO.GetTick = ioctx->GetTick;
- 8000c64: 690a ldr r2, [r1, #16]
- 8000c66: 6182 str r2, [r0, #24]
-
- return LAN8742_STATUS_OK;
- 8000c68: 2000 movs r0, #0
- 8000c6a: 4770 bx lr
- return LAN8742_STATUS_ERROR;
- 8000c6c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8000c70: 4770 bx lr
- 8000c72: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8000c76: 4770 bx lr
- 8000c78: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8000c7c: 4770 bx lr
- 8000c7e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- }
- 8000c82: 4770 bx lr
- 08000c84 <LAN8742_Init>:
- * 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)
- {
- 8000c84: b570 push {r4, r5, r6, lr}
- 8000c86: b082 sub sp, #8
- 8000c88: 4605 mov r5, r0
- uint32_t tickstart = 0, regvalue = 0, addr = 0;
- 8000c8a: 2300 movs r3, #0
- 8000c8c: 9301 str r3, [sp, #4]
- int32_t status = LAN8742_STATUS_OK;
-
- if(pObj->Is_Initialized == 0)
- 8000c8e: 6844 ldr r4, [r0, #4]
- 8000c90: 2c00 cmp r4, #0
- 8000c92: d14a bne.n 8000d2a <LAN8742_Init+0xa6>
- {
- if(pObj->IO.Init != 0)
- 8000c94: 6883 ldr r3, [r0, #8]
- 8000c96: b103 cbz r3, 8000c9a <LAN8742_Init+0x16>
- {
- /* GPIO and Clocks initialization */
- pObj->IO.Init();
- 8000c98: 4798 blx r3
- }
-
- /* for later check */
- pObj->DevAddr = LAN8742_MAX_DEV_ADDR + 1;
- 8000c9a: 2320 movs r3, #32
- 8000c9c: 602b str r3, [r5, #0]
- int32_t status = LAN8742_STATUS_OK;
- 8000c9e: 2600 movs r6, #0
-
- /* Get the device address from special mode register */
- for(addr = 0; addr <= LAN8742_MAX_DEV_ADDR; addr ++)
- 8000ca0: e002 b.n 8000ca8 <LAN8742_Init+0x24>
- {
- if(pObj->IO.ReadReg(addr, LAN8742_SMR, ®value) < 0)
- {
- status = LAN8742_STATUS_READ_ERROR;
- 8000ca2: f06f 0604 mvn.w r6, #4
- for(addr = 0; addr <= LAN8742_MAX_DEV_ADDR; addr ++)
- 8000ca6: 3401 adds r4, #1
- 8000ca8: 2c1f cmp r4, #31
- 8000caa: d80d bhi.n 8000cc8 <LAN8742_Init+0x44>
- if(pObj->IO.ReadReg(addr, LAN8742_SMR, ®value) < 0)
- 8000cac: 696b ldr r3, [r5, #20]
- 8000cae: aa01 add r2, sp, #4
- 8000cb0: 2112 movs r1, #18
- 8000cb2: 4620 mov r0, r4
- 8000cb4: 4798 blx r3
- 8000cb6: 2800 cmp r0, #0
- 8000cb8: dbf3 blt.n 8000ca2 <LAN8742_Init+0x1e>
- /* Can't read from this device address
- continue with next address */
- continue;
- }
-
- if((regvalue & LAN8742_SMR_PHY_ADDR) == addr)
- 8000cba: 9b01 ldr r3, [sp, #4]
- 8000cbc: f003 031f and.w r3, r3, #31
- 8000cc0: 42a3 cmp r3, r4
- 8000cc2: d1f0 bne.n 8000ca6 <LAN8742_Init+0x22>
- {
- pObj->DevAddr = addr;
- 8000cc4: 602c str r4, [r5, #0]
- status = LAN8742_STATUS_OK;
- 8000cc6: 2600 movs r6, #0
- break;
- }
- }
-
- if(pObj->DevAddr > LAN8742_MAX_DEV_ADDR)
- 8000cc8: 6828 ldr r0, [r5, #0]
- 8000cca: 281f cmp r0, #31
- 8000ccc: d826 bhi.n 8000d1c <LAN8742_Init+0x98>
- {
- status = LAN8742_STATUS_ADDRESS_ERROR;
- }
-
- /* if device address is matched */
- if(status == LAN8742_STATUS_OK)
- 8000cce: 2e00 cmp r6, #0
- 8000cd0: d137 bne.n 8000d42 <LAN8742_Init+0xbe>
- {
- /* set a software reset */
- if(pObj->IO.WriteReg(pObj->DevAddr, LAN8742_BCR, LAN8742_BCR_SOFT_RESET) >= 0)
- 8000cd2: 692b ldr r3, [r5, #16]
- 8000cd4: f44f 4200 mov.w r2, #32768 @ 0x8000
- 8000cd8: 2100 movs r1, #0
- 8000cda: 4798 blx r3
- 8000cdc: 2800 cmp r0, #0
- 8000cde: db33 blt.n 8000d48 <LAN8742_Init+0xc4>
- {
- /* get software reset status */
- if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BCR, ®value) >= 0)
- 8000ce0: 696b ldr r3, [r5, #20]
- 8000ce2: aa01 add r2, sp, #4
- 8000ce4: 2100 movs r1, #0
- 8000ce6: 6828 ldr r0, [r5, #0]
- 8000ce8: 4798 blx r3
- 8000cea: 2800 cmp r0, #0
- 8000cec: db2f blt.n 8000d4e <LAN8742_Init+0xca>
- {
- tickstart = pObj->IO.GetTick();
- 8000cee: 69ab ldr r3, [r5, #24]
- 8000cf0: 4798 blx r3
- 8000cf2: 4604 mov r4, r0
-
- /* wait until software reset is done or timeout occured */
- while(regvalue & LAN8742_BCR_SOFT_RESET)
- 8000cf4: 9b01 ldr r3, [sp, #4]
- 8000cf6: f413 4f00 tst.w r3, #32768 @ 0x8000
- 8000cfa: d011 beq.n 8000d20 <LAN8742_Init+0x9c>
- {
- if((pObj->IO.GetTick() - tickstart) <= LAN8742_SW_RESET_TO)
- 8000cfc: 69ab ldr r3, [r5, #24]
- 8000cfe: 4798 blx r3
- 8000d00: 1b00 subs r0, r0, r4
- 8000d02: f5b0 7ffa cmp.w r0, #500 @ 0x1f4
- 8000d06: d80d bhi.n 8000d24 <LAN8742_Init+0xa0>
- {
- if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BCR, ®value) < 0)
- 8000d08: 696b ldr r3, [r5, #20]
- 8000d0a: aa01 add r2, sp, #4
- 8000d0c: 2100 movs r1, #0
- 8000d0e: 6828 ldr r0, [r5, #0]
- 8000d10: 4798 blx r3
- 8000d12: 2800 cmp r0, #0
- 8000d14: daee bge.n 8000cf4 <LAN8742_Init+0x70>
- {
- status = LAN8742_STATUS_READ_ERROR;
- 8000d16: f06f 0604 mvn.w r6, #4
- 8000d1a: e001 b.n 8000d20 <LAN8742_Init+0x9c>
- status = LAN8742_STATUS_ADDRESS_ERROR;
- 8000d1c: f06f 0602 mvn.w r6, #2
- status = LAN8742_STATUS_WRITE_ERROR;
- }
- }
- }
-
- if(status == LAN8742_STATUS_OK)
- 8000d20: b97e cbnz r6, 8000d42 <LAN8742_Init+0xbe>
- 8000d22: e003 b.n 8000d2c <LAN8742_Init+0xa8>
- status = LAN8742_STATUS_RESET_TIMEOUT;
- 8000d24: f06f 0601 mvn.w r6, #1
- 8000d28: e7fa b.n 8000d20 <LAN8742_Init+0x9c>
- int32_t status = LAN8742_STATUS_OK;
- 8000d2a: 2600 movs r6, #0
- {
- tickstart = pObj->IO.GetTick();
- 8000d2c: 69ab ldr r3, [r5, #24]
- 8000d2e: 4798 blx r3
- 8000d30: 4604 mov r4, r0
-
- /* Wait for 2s to perform initialization */
- while((pObj->IO.GetTick() - tickstart) <= LAN8742_INIT_TO)
- 8000d32: 69ab ldr r3, [r5, #24]
- 8000d34: 4798 blx r3
- 8000d36: 1b03 subs r3, r0, r4
- 8000d38: f5b3 6ffa cmp.w r3, #2000 @ 0x7d0
- 8000d3c: d9f9 bls.n 8000d32 <LAN8742_Init+0xae>
- {
- }
- pObj->Is_Initialized = 1;
- 8000d3e: 2301 movs r3, #1
- 8000d40: 606b str r3, [r5, #4]
- }
-
- return status;
- }
- 8000d42: 4630 mov r0, r6
- 8000d44: b002 add sp, #8
- 8000d46: bd70 pop {r4, r5, r6, pc}
- status = LAN8742_STATUS_WRITE_ERROR;
- 8000d48: f06f 0603 mvn.w r6, #3
- 8000d4c: e7f9 b.n 8000d42 <LAN8742_Init+0xbe>
- status = LAN8742_STATUS_READ_ERROR;
- 8000d4e: f06f 0604 mvn.w r6, #4
- return status;
- 8000d52: e7f6 b.n 8000d42 <LAN8742_Init+0xbe>
- 08000d54 <LAN8742_GetLinkState>:
- * 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)
- {
- 8000d54: b510 push {r4, lr}
- 8000d56: b082 sub sp, #8
- 8000d58: 4604 mov r4, r0
- uint32_t readval = 0;
- 8000d5a: 2300 movs r3, #0
- 8000d5c: 9301 str r3, [sp, #4]
-
- /* Read Status register */
- if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BSR, &readval) < 0)
- 8000d5e: 6943 ldr r3, [r0, #20]
- 8000d60: aa01 add r2, sp, #4
- 8000d62: 2101 movs r1, #1
- 8000d64: 6800 ldr r0, [r0, #0]
- 8000d66: 4798 blx r3
- 8000d68: 2800 cmp r0, #0
- 8000d6a: db39 blt.n 8000de0 <LAN8742_GetLinkState+0x8c>
- {
- return LAN8742_STATUS_READ_ERROR;
- }
-
- /* Read Status register again */
- if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BSR, &readval) < 0)
- 8000d6c: 6963 ldr r3, [r4, #20]
- 8000d6e: aa01 add r2, sp, #4
- 8000d70: 2101 movs r1, #1
- 8000d72: 6820 ldr r0, [r4, #0]
- 8000d74: 4798 blx r3
- 8000d76: 2800 cmp r0, #0
- 8000d78: db35 blt.n 8000de6 <LAN8742_GetLinkState+0x92>
- {
- return LAN8742_STATUS_READ_ERROR;
- }
-
- if((readval & LAN8742_BSR_LINK_STATUS) == 0)
- 8000d7a: 9b01 ldr r3, [sp, #4]
- 8000d7c: f013 0f04 tst.w r3, #4
- 8000d80: d034 beq.n 8000dec <LAN8742_GetLinkState+0x98>
- /* Return Link Down status */
- return LAN8742_STATUS_LINK_DOWN;
- }
-
- /* Check Auto negotiaition */
- if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BCR, &readval) < 0)
- 8000d82: 6963 ldr r3, [r4, #20]
- 8000d84: aa01 add r2, sp, #4
- 8000d86: 2100 movs r1, #0
- 8000d88: 6820 ldr r0, [r4, #0]
- 8000d8a: 4798 blx r3
- 8000d8c: 2800 cmp r0, #0
- 8000d8e: db30 blt.n 8000df2 <LAN8742_GetLinkState+0x9e>
- {
- return LAN8742_STATUS_READ_ERROR;
- }
-
- if((readval & LAN8742_BCR_AUTONEGO_EN) != LAN8742_BCR_AUTONEGO_EN)
- 8000d90: 9b01 ldr r3, [sp, #4]
- 8000d92: f413 5f80 tst.w r3, #4096 @ 0x1000
- 8000d96: d10c bne.n 8000db2 <LAN8742_GetLinkState+0x5e>
- {
- if(((readval & LAN8742_BCR_SPEED_SELECT) == LAN8742_BCR_SPEED_SELECT) && ((readval & LAN8742_BCR_DUPLEX_MODE) == LAN8742_BCR_DUPLEX_MODE))
- 8000d98: f403 5204 and.w r2, r3, #8448 @ 0x2100
- 8000d9c: f5b2 5f04 cmp.w r2, #8448 @ 0x2100
- 8000da0: d02a beq.n 8000df8 <LAN8742_GetLinkState+0xa4>
- {
- return LAN8742_STATUS_100MBITS_FULLDUPLEX;
- }
- else if ((readval & LAN8742_BCR_SPEED_SELECT) == LAN8742_BCR_SPEED_SELECT)
- 8000da2: f413 5f00 tst.w r3, #8192 @ 0x2000
- 8000da6: d129 bne.n 8000dfc <LAN8742_GetLinkState+0xa8>
- {
- return LAN8742_STATUS_100MBITS_HALFDUPLEX;
- }
- else if ((readval & LAN8742_BCR_DUPLEX_MODE) == LAN8742_BCR_DUPLEX_MODE)
- 8000da8: f413 7f80 tst.w r3, #256 @ 0x100
- 8000dac: d028 beq.n 8000e00 <LAN8742_GetLinkState+0xac>
- {
- return LAN8742_STATUS_10MBITS_FULLDUPLEX;
- 8000dae: 2004 movs r0, #4
- 8000db0: e01d b.n 8000dee <LAN8742_GetLinkState+0x9a>
- return LAN8742_STATUS_10MBITS_HALFDUPLEX;
- }
- }
- else /* Auto Nego enabled */
- {
- if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_PHYSCSR, &readval) < 0)
- 8000db2: 6963 ldr r3, [r4, #20]
- 8000db4: aa01 add r2, sp, #4
- 8000db6: 211f movs r1, #31
- 8000db8: 6820 ldr r0, [r4, #0]
- 8000dba: 4798 blx r3
- 8000dbc: 2800 cmp r0, #0
- 8000dbe: db21 blt.n 8000e04 <LAN8742_GetLinkState+0xb0>
- {
- return LAN8742_STATUS_READ_ERROR;
- }
-
- /* Check if auto nego not done */
- if((readval & LAN8742_PHYSCSR_AUTONEGO_DONE) == 0)
- 8000dc0: 9b01 ldr r3, [sp, #4]
- 8000dc2: f413 5f80 tst.w r3, #4096 @ 0x1000
- 8000dc6: d020 beq.n 8000e0a <LAN8742_GetLinkState+0xb6>
- {
- return LAN8742_STATUS_AUTONEGO_NOTDONE;
- }
-
- if((readval & LAN8742_PHYSCSR_HCDSPEEDMASK) == LAN8742_PHYSCSR_100BTX_FD)
- 8000dc8: f003 031c and.w r3, r3, #28
- 8000dcc: 2b18 cmp r3, #24
- 8000dce: d01e beq.n 8000e0e <LAN8742_GetLinkState+0xba>
- {
- return LAN8742_STATUS_100MBITS_FULLDUPLEX;
- }
- else if ((readval & LAN8742_PHYSCSR_HCDSPEEDMASK) == LAN8742_PHYSCSR_100BTX_HD)
- 8000dd0: 2b08 cmp r3, #8
- 8000dd2: d01e beq.n 8000e12 <LAN8742_GetLinkState+0xbe>
- {
- return LAN8742_STATUS_100MBITS_HALFDUPLEX;
- }
- else if ((readval & LAN8742_PHYSCSR_HCDSPEEDMASK) == LAN8742_PHYSCSR_10BT_FD)
- 8000dd4: 2b14 cmp r3, #20
- 8000dd6: d001 beq.n 8000ddc <LAN8742_GetLinkState+0x88>
- {
- return LAN8742_STATUS_10MBITS_FULLDUPLEX;
- }
- else
- {
- return LAN8742_STATUS_10MBITS_HALFDUPLEX;
- 8000dd8: 2005 movs r0, #5
- 8000dda: e008 b.n 8000dee <LAN8742_GetLinkState+0x9a>
- return LAN8742_STATUS_10MBITS_FULLDUPLEX;
- 8000ddc: 2004 movs r0, #4
- 8000dde: e006 b.n 8000dee <LAN8742_GetLinkState+0x9a>
- return LAN8742_STATUS_READ_ERROR;
- 8000de0: f06f 0004 mvn.w r0, #4
- 8000de4: e003 b.n 8000dee <LAN8742_GetLinkState+0x9a>
- return LAN8742_STATUS_READ_ERROR;
- 8000de6: f06f 0004 mvn.w r0, #4
- 8000dea: e000 b.n 8000dee <LAN8742_GetLinkState+0x9a>
- return LAN8742_STATUS_LINK_DOWN;
- 8000dec: 2001 movs r0, #1
- }
- }
- }
- 8000dee: b002 add sp, #8
- 8000df0: bd10 pop {r4, pc}
- return LAN8742_STATUS_READ_ERROR;
- 8000df2: f06f 0004 mvn.w r0, #4
- 8000df6: e7fa b.n 8000dee <LAN8742_GetLinkState+0x9a>
- return LAN8742_STATUS_100MBITS_FULLDUPLEX;
- 8000df8: 2002 movs r0, #2
- 8000dfa: e7f8 b.n 8000dee <LAN8742_GetLinkState+0x9a>
- return LAN8742_STATUS_100MBITS_HALFDUPLEX;
- 8000dfc: 2003 movs r0, #3
- 8000dfe: e7f6 b.n 8000dee <LAN8742_GetLinkState+0x9a>
- return LAN8742_STATUS_10MBITS_HALFDUPLEX;
- 8000e00: 2005 movs r0, #5
- 8000e02: e7f4 b.n 8000dee <LAN8742_GetLinkState+0x9a>
- return LAN8742_STATUS_READ_ERROR;
- 8000e04: f06f 0004 mvn.w r0, #4
- 8000e08: e7f1 b.n 8000dee <LAN8742_GetLinkState+0x9a>
- return LAN8742_STATUS_AUTONEGO_NOTDONE;
- 8000e0a: 2006 movs r0, #6
- 8000e0c: e7ef b.n 8000dee <LAN8742_GetLinkState+0x9a>
- return LAN8742_STATUS_100MBITS_FULLDUPLEX;
- 8000e0e: 2002 movs r0, #2
- 8000e10: e7ed b.n 8000dee <LAN8742_GetLinkState+0x9a>
- return LAN8742_STATUS_100MBITS_HALFDUPLEX;
- 8000e12: 2003 movs r0, #3
- 8000e14: e7eb b.n 8000dee <LAN8742_GetLinkState+0x9a>
- ...
- 08000e18 <HAL_Init>:
- * need to ensure that the SysTick time base is always set to 1 millisecond
- * to have correct HAL operation.
- * @retval HAL status
- */
- HAL_StatusTypeDef HAL_Init(void)
- {
- 8000e18: b510 push {r4, lr}
- __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);
- 8000e1a: 2003 movs r0, #3
- 8000e1c: f000 f88c bl 8000f38 <HAL_NVIC_SetPriorityGrouping>
- /* 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);
- 8000e20: f001 fe60 bl 8002ae4 <HAL_RCC_GetSysClockFreq>
- 8000e24: 490f ldr r1, [pc, #60] @ (8000e64 <HAL_Init+0x4c>)
- 8000e26: 698b ldr r3, [r1, #24]
- 8000e28: f3c3 2303 ubfx r3, r3, #8, #4
- 8000e2c: 4a0e ldr r2, [pc, #56] @ (8000e68 <HAL_Init+0x50>)
- 8000e2e: 5cd3 ldrb r3, [r2, r3]
- 8000e30: f003 031f and.w r3, r3, #31
- 8000e34: 40d8 lsrs r0, r3
- 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));
- 8000e36: 698b ldr r3, [r1, #24]
- 8000e38: f003 030f and.w r3, r3, #15
- 8000e3c: 5cd3 ldrb r3, [r2, r3]
- 8000e3e: f003 031f and.w r3, r3, #31
- 8000e42: fa20 f303 lsr.w r3, r0, r3
- 8000e46: 4a09 ldr r2, [pc, #36] @ (8000e6c <HAL_Init+0x54>)
- 8000e48: 6013 str r3, [r2, #0]
- #endif
- #if defined(DUAL_CORE) && defined(CORE_CM4)
- SystemCoreClock = SystemD2Clock;
- #else
- SystemCoreClock = common_system_clock;
- 8000e4a: 4b09 ldr r3, [pc, #36] @ (8000e70 <HAL_Init+0x58>)
- 8000e4c: 6018 str r0, [r3, #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)
- 8000e4e: 200f movs r0, #15
- 8000e50: f7ff fdf2 bl 8000a38 <HAL_InitTick>
- 8000e54: b110 cbz r0, 8000e5c <HAL_Init+0x44>
- {
- return HAL_ERROR;
- 8000e56: 2401 movs r4, #1
- /* Init the low level hardware */
- HAL_MspInit();
- /* Return function status */
- return HAL_OK;
- }
- 8000e58: 4620 mov r0, r4
- 8000e5a: bd10 pop {r4, pc}
- 8000e5c: 4604 mov r4, r0
- HAL_MspInit();
- 8000e5e: f7ff fdd1 bl 8000a04 <HAL_MspInit>
- return HAL_OK;
- 8000e62: e7f9 b.n 8000e58 <HAL_Init+0x40>
- 8000e64: 58024400 .word 0x58024400
- 8000e68: 08014328 .word 0x08014328
- 8000e6c: 24000000 .word 0x24000000
- 8000e70: 24000004 .word 0x24000004
- 08000e74 <HAL_IncTick>:
- * implementations in user file.
- * @retval None
- */
- __weak void HAL_IncTick(void)
- {
- uwTick += (uint32_t)uwTickFreq;
- 8000e74: 4b03 ldr r3, [pc, #12] @ (8000e84 <HAL_IncTick+0x10>)
- 8000e76: 781b ldrb r3, [r3, #0]
- 8000e78: 4a03 ldr r2, [pc, #12] @ (8000e88 <HAL_IncTick+0x14>)
- 8000e7a: 6811 ldr r1, [r2, #0]
- 8000e7c: 440b add r3, r1
- 8000e7e: 6013 str r3, [r2, #0]
- }
- 8000e80: 4770 bx lr
- 8000e82: bf00 nop
- 8000e84: 24000008 .word 0x24000008
- 8000e88: 24000d80 .word 0x24000d80
- 08000e8c <HAL_GetTick>:
- * implementations in user file.
- * @retval tick value
- */
- __weak uint32_t HAL_GetTick(void)
- {
- return uwTick;
- 8000e8c: 4b01 ldr r3, [pc, #4] @ (8000e94 <HAL_GetTick+0x8>)
- 8000e8e: 6818 ldr r0, [r3, #0]
- }
- 8000e90: 4770 bx lr
- 8000e92: bf00 nop
- 8000e94: 24000d80 .word 0x24000d80
- 08000e98 <HAL_GetREVID>:
- * @brief Returns the device revision identifier.
- * @retval Device revision identifier
- */
- uint32_t HAL_GetREVID(void)
- {
- return((DBGMCU->IDCODE) >> 16);
- 8000e98: 4b01 ldr r3, [pc, #4] @ (8000ea0 <HAL_GetREVID+0x8>)
- 8000e9a: 6818 ldr r0, [r3, #0]
- }
- 8000e9c: 0c00 lsrs r0, r0, #16
- 8000e9e: 4770 bx lr
- 8000ea0: 5c001000 .word 0x5c001000
- 08000ea4 <HAL_SYSCFG_ETHInterfaceSelect>:
- void HAL_SYSCFG_ETHInterfaceSelect(uint32_t SYSCFG_ETHInterface)
- {
- /* Check the parameter */
- assert_param(IS_SYSCFG_ETHERNET_CONFIG(SYSCFG_ETHInterface));
- MODIFY_REG(SYSCFG->PMCR, SYSCFG_PMCR_EPIS_SEL, (uint32_t)(SYSCFG_ETHInterface));
- 8000ea4: 4a03 ldr r2, [pc, #12] @ (8000eb4 <HAL_SYSCFG_ETHInterfaceSelect+0x10>)
- 8000ea6: 6853 ldr r3, [r2, #4]
- 8000ea8: f423 0360 bic.w r3, r3, #14680064 @ 0xe00000
- 8000eac: 4303 orrs r3, r0
- 8000eae: 6053 str r3, [r2, #4]
- }
- 8000eb0: 4770 bx lr
- 8000eb2: bf00 nop
- 8000eb4: 58000400 .word 0x58000400
- 08000eb8 <__NVIC_EnableIRQ>:
- if ((int32_t)(IRQn) >= 0)
- 8000eb8: 2800 cmp r0, #0
- 8000eba: db07 blt.n 8000ecc <__NVIC_EnableIRQ+0x14>
- NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
- 8000ebc: f000 021f and.w r2, r0, #31
- 8000ec0: 0940 lsrs r0, r0, #5
- 8000ec2: 2301 movs r3, #1
- 8000ec4: 4093 lsls r3, r2
- 8000ec6: 4a02 ldr r2, [pc, #8] @ (8000ed0 <__NVIC_EnableIRQ+0x18>)
- 8000ec8: f842 3020 str.w r3, [r2, r0, lsl #2]
- }
- 8000ecc: 4770 bx lr
- 8000ece: bf00 nop
- 8000ed0: e000e100 .word 0xe000e100
- 08000ed4 <__NVIC_SetPriority>:
- if ((int32_t)(IRQn) >= 0)
- 8000ed4: 2800 cmp r0, #0
- 8000ed6: db04 blt.n 8000ee2 <__NVIC_SetPriority+0xe>
- NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
- 8000ed8: 0109 lsls r1, r1, #4
- 8000eda: b2c9 uxtb r1, r1
- 8000edc: 4b04 ldr r3, [pc, #16] @ (8000ef0 <__NVIC_SetPriority+0x1c>)
- 8000ede: 5419 strb r1, [r3, r0]
- 8000ee0: 4770 bx lr
- SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
- 8000ee2: f000 000f and.w r0, r0, #15
- 8000ee6: 0109 lsls r1, r1, #4
- 8000ee8: b2c9 uxtb r1, r1
- 8000eea: 4b02 ldr r3, [pc, #8] @ (8000ef4 <__NVIC_SetPriority+0x20>)
- 8000eec: 5419 strb r1, [r3, r0]
- }
- 8000eee: 4770 bx lr
- 8000ef0: e000e400 .word 0xe000e400
- 8000ef4: e000ed14 .word 0xe000ed14
- 08000ef8 <NVIC_EncodePriority>:
- {
- 8000ef8: b500 push {lr}
- uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
- 8000efa: f000 0007 and.w r0, r0, #7
- PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp);
- 8000efe: f1c0 0c07 rsb ip, r0, #7
- 8000f02: f1bc 0f04 cmp.w ip, #4
- 8000f06: bf28 it cs
- 8000f08: f04f 0c04 movcs.w ip, #4
- SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS));
- 8000f0c: 1d03 adds r3, r0, #4
- 8000f0e: 2b06 cmp r3, #6
- 8000f10: d90f bls.n 8000f32 <NVIC_EncodePriority+0x3a>
- 8000f12: 1ec3 subs r3, r0, #3
- ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
- 8000f14: f04f 3eff mov.w lr, #4294967295 @ 0xffffffff
- 8000f18: fa0e f00c lsl.w r0, lr, ip
- 8000f1c: ea21 0100 bic.w r1, r1, r0
- 8000f20: 4099 lsls r1, r3
- ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL)))
- 8000f22: fa0e fe03 lsl.w lr, lr, r3
- 8000f26: ea22 020e bic.w r2, r2, lr
- }
- 8000f2a: ea41 0002 orr.w r0, r1, r2
- 8000f2e: f85d fb04 ldr.w pc, [sp], #4
- SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS));
- 8000f32: 2300 movs r3, #0
- 8000f34: e7ee b.n 8000f14 <NVIC_EncodePriority+0x1c>
- ...
- 08000f38 <HAL_NVIC_SetPriorityGrouping>:
- reg_value = SCB->AIRCR; /* read old register configuration */
- 8000f38: 4906 ldr r1, [pc, #24] @ (8000f54 <HAL_NVIC_SetPriorityGrouping+0x1c>)
- 8000f3a: 68cb ldr r3, [r1, #12]
- reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
- 8000f3c: f423 63e0 bic.w r3, r3, #1792 @ 0x700
- 8000f40: 041b lsls r3, r3, #16
- 8000f42: 0c1b lsrs r3, r3, #16
- (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */
- 8000f44: 0200 lsls r0, r0, #8
- 8000f46: f400 60e0 and.w r0, r0, #1792 @ 0x700
- ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
- 8000f4a: 4303 orrs r3, r0
- reg_value = (reg_value |
- 8000f4c: 4a02 ldr r2, [pc, #8] @ (8000f58 <HAL_NVIC_SetPriorityGrouping+0x20>)
- 8000f4e: 431a orrs r2, r3
- SCB->AIRCR = reg_value;
- 8000f50: 60ca str r2, [r1, #12]
- /* 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);
- }
- 8000f52: 4770 bx lr
- 8000f54: e000ed00 .word 0xe000ed00
- 8000f58: 05fa0000 .word 0x05fa0000
- 08000f5c <HAL_NVIC_SetPriority>:
- * This parameter can be a value between 0 and 15
- * A lower priority value indicates a higher priority.
- * @retval None
- */
- void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
- {
- 8000f5c: b510 push {r4, lr}
- 8000f5e: 4604 mov r4, r0
- return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
- 8000f60: 4b05 ldr r3, [pc, #20] @ (8000f78 <HAL_NVIC_SetPriority+0x1c>)
- 8000f62: 68d8 ldr r0, [r3, #12]
- assert_param(IS_NVIC_SUB_PRIORITY(SubPriority));
- assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority));
- prioritygroup = NVIC_GetPriorityGrouping();
- NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority));
- 8000f64: f3c0 2002 ubfx r0, r0, #8, #3
- 8000f68: f7ff ffc6 bl 8000ef8 <NVIC_EncodePriority>
- 8000f6c: 4601 mov r1, r0
- 8000f6e: 4620 mov r0, r4
- 8000f70: f7ff ffb0 bl 8000ed4 <__NVIC_SetPriority>
- }
- 8000f74: bd10 pop {r4, pc}
- 8000f76: bf00 nop
- 8000f78: e000ed00 .word 0xe000ed00
- 08000f7c <HAL_NVIC_EnableIRQ>:
- * 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)
- {
- 8000f7c: b508 push {r3, lr}
- /* Check the parameters */
- assert_param(IS_NVIC_DEVICE_IRQ(IRQn));
- /* Enable interrupt */
- NVIC_EnableIRQ(IRQn);
- 8000f7e: f7ff ff9b bl 8000eb8 <__NVIC_EnableIRQ>
- }
- 8000f82: bd08 pop {r3, pc}
- 08000f84 <HAL_MPU_Disable>:
- \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");
- 8000f84: f3bf 8f5f dmb sy
- {
- /* Make sure outstanding transfers are done */
- __DMB();
- /* Disable fault exceptions */
- SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
- 8000f88: 4b04 ldr r3, [pc, #16] @ (8000f9c <HAL_MPU_Disable+0x18>)
- 8000f8a: 6a5a ldr r2, [r3, #36] @ 0x24
- 8000f8c: f422 3280 bic.w r2, r2, #65536 @ 0x10000
- 8000f90: 625a str r2, [r3, #36] @ 0x24
- /* Disable the MPU and clear the control register*/
- MPU->CTRL = 0;
- 8000f92: 2200 movs r2, #0
- 8000f94: f8c3 2094 str.w r2, [r3, #148] @ 0x94
- }
- 8000f98: 4770 bx lr
- 8000f9a: bf00 nop
- 8000f9c: e000ed00 .word 0xe000ed00
- 08000fa0 <HAL_MPU_Enable>:
- * @retval None
- */
- void HAL_MPU_Enable(uint32_t MPU_Control)
- {
- /* Enable the MPU */
- MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk;
- 8000fa0: f040 0001 orr.w r0, r0, #1
- 8000fa4: 4b05 ldr r3, [pc, #20] @ (8000fbc <HAL_MPU_Enable+0x1c>)
- 8000fa6: f8c3 0094 str.w r0, [r3, #148] @ 0x94
- /* Enable fault exceptions */
- SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
- 8000faa: 6a5a ldr r2, [r3, #36] @ 0x24
- 8000fac: f442 3280 orr.w r2, r2, #65536 @ 0x10000
- 8000fb0: 625a str r2, [r3, #36] @ 0x24
- __ASM volatile ("dsb 0xF":::"memory");
- 8000fb2: f3bf 8f4f dsb sy
- __ASM volatile ("isb 0xF":::"memory");
- 8000fb6: f3bf 8f6f isb sy
- /* Ensure MPU setting take effects */
- __DSB();
- __ISB();
- }
- 8000fba: 4770 bx lr
- 8000fbc: e000ed00 .word 0xe000ed00
- 08000fc0 <HAL_MPU_ConfigRegion>:
- /* 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;
- 8000fc0: 7842 ldrb r2, [r0, #1]
- 8000fc2: 4b16 ldr r3, [pc, #88] @ (800101c <HAL_MPU_ConfigRegion+0x5c>)
- 8000fc4: f8c3 2098 str.w r2, [r3, #152] @ 0x98
- if ((MPU_Init->Enable) != 0UL)
- 8000fc8: 7803 ldrb r3, [r0, #0]
- 8000fca: b1fb cbz r3, 800100c <HAL_MPU_ConfigRegion+0x4c>
- 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;
- 8000fcc: 6843 ldr r3, [r0, #4]
- 8000fce: 4a13 ldr r2, [pc, #76] @ (800101c <HAL_MPU_ConfigRegion+0x5c>)
- 8000fd0: f8c2 309c str.w r3, [r2, #156] @ 0x9c
- MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) |
- 8000fd4: 7b01 ldrb r1, [r0, #12]
- ((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) |
- 8000fd6: 7ac3 ldrb r3, [r0, #11]
- 8000fd8: 061b lsls r3, r3, #24
- MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) |
- 8000fda: ea43 7301 orr.w r3, r3, r1, lsl #28
- ((uint32_t)MPU_Init->TypeExtField << MPU_RASR_TEX_Pos) |
- 8000fde: 7a81 ldrb r1, [r0, #10]
- ((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) |
- 8000fe0: ea43 43c1 orr.w r3, r3, r1, lsl #19
- ((uint32_t)MPU_Init->IsShareable << MPU_RASR_S_Pos) |
- 8000fe4: 7b41 ldrb r1, [r0, #13]
- ((uint32_t)MPU_Init->TypeExtField << MPU_RASR_TEX_Pos) |
- 8000fe6: ea43 4381 orr.w r3, r3, r1, lsl #18
- ((uint32_t)MPU_Init->IsCacheable << MPU_RASR_C_Pos) |
- 8000fea: 7b81 ldrb r1, [r0, #14]
- ((uint32_t)MPU_Init->IsShareable << MPU_RASR_S_Pos) |
- 8000fec: ea43 4341 orr.w r3, r3, r1, lsl #17
- ((uint32_t)MPU_Init->IsBufferable << MPU_RASR_B_Pos) |
- 8000ff0: 7bc1 ldrb r1, [r0, #15]
- ((uint32_t)MPU_Init->IsCacheable << MPU_RASR_C_Pos) |
- 8000ff2: ea43 4301 orr.w r3, r3, r1, lsl #16
- ((uint32_t)MPU_Init->SubRegionDisable << MPU_RASR_SRD_Pos) |
- 8000ff6: 7a41 ldrb r1, [r0, #9]
- ((uint32_t)MPU_Init->IsBufferable << MPU_RASR_B_Pos) |
- 8000ff8: ea43 2301 orr.w r3, r3, r1, lsl #8
- ((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) |
- 8000ffc: 7a01 ldrb r1, [r0, #8]
- ((uint32_t)MPU_Init->SubRegionDisable << MPU_RASR_SRD_Pos) |
- 8000ffe: ea43 0341 orr.w r3, r3, r1, lsl #1
- ((uint32_t)MPU_Init->Enable << MPU_RASR_ENABLE_Pos);
- 8001002: 7801 ldrb r1, [r0, #0]
- ((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) |
- 8001004: 430b orrs r3, r1
- MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) |
- 8001006: f8c2 30a0 str.w r3, [r2, #160] @ 0xa0
- 800100a: 4770 bx lr
- }
- else
- {
- MPU->RBAR = 0x00;
- 800100c: 4b03 ldr r3, [pc, #12] @ (800101c <HAL_MPU_ConfigRegion+0x5c>)
- 800100e: 2200 movs r2, #0
- 8001010: f8c3 209c str.w r2, [r3, #156] @ 0x9c
- MPU->RASR = 0x00;
- 8001014: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0
- }
- }
- 8001018: 4770 bx lr
- 800101a: bf00 nop
- 800101c: e000ed00 .word 0xe000ed00
- 08001020 <HAL_GetCurrentCPUID>:
- * @brief Returns the current CPU ID.
- * @retval CPU identifier
- */
- uint32_t HAL_GetCurrentCPUID(void)
- {
- if (((SCB->CPUID & 0x000000F0U) >> 4 )== 0x7U)
- 8001020: 4b04 ldr r3, [pc, #16] @ (8001034 <HAL_GetCurrentCPUID+0x14>)
- 8001022: 681b ldr r3, [r3, #0]
- 8001024: f3c3 1303 ubfx r3, r3, #4, #4
- 8001028: 2b07 cmp r3, #7
- 800102a: d001 beq.n 8001030 <HAL_GetCurrentCPUID+0x10>
- {
- return CM7_CPUID;
- }
- else
- {
- return CM4_CPUID;
- 800102c: 2001 movs r0, #1
- }
- }
- 800102e: 4770 bx lr
- return CM7_CPUID;
- 8001030: 2003 movs r0, #3
- 8001032: 4770 bx lr
- 8001034: e000ed00 .word 0xe000ed00
- 08001038 <ETH_UpdateDescriptor>:
- * @param heth: pointer to a ETH_HandleTypeDef structure that contains
- * the configuration information for ETHERNET module
- * @retval HAL status
- */
- static void ETH_UpdateDescriptor(ETH_HandleTypeDef *heth)
- {
- 8001038: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 800103c: b082 sub sp, #8
- 800103e: 4607 mov r7, r0
- uint32_t descidx;
- uint32_t desccount;
- ETH_DMADescTypeDef *dmarxdesc;
- uint8_t *buff = NULL;
- 8001040: 2300 movs r3, #0
- 8001042: 9301 str r3, [sp, #4]
- uint8_t allocStatus = 1U;
- descidx = heth->RxDescList.RxBuildDescIdx;
- 8001044: f8d0 8068 ldr.w r8, [r0, #104] @ 0x68
- dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
- 8001048: f108 0312 add.w r3, r8, #18
- 800104c: f850 4023 ldr.w r4, [r0, r3, lsl #2]
- desccount = heth->RxDescList.RxBuildDescCnt;
- 8001050: 6ec5 ldr r5, [r0, #108] @ 0x6c
- uint8_t allocStatus = 1U;
- 8001052: 2601 movs r6, #1
- while ((desccount > 0U) && (allocStatus != 0U))
- 8001054: e013 b.n 800107e <ETH_UpdateDescriptor+0x46>
- #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1)
- /*Call registered Allocate callback*/
- heth->rxAllocateCallback(&buff);
- #else
- /* Allocate callback */
- HAL_ETH_RxAllocateCallback(&buff);
- 8001056: a801 add r0, sp, #4
- 8001058: f002 fce4 bl 8003a24 <HAL_ETH_RxAllocateCallback>
- #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */
- if (buff == NULL)
- 800105c: 9b01 ldr r3, [sp, #4]
- 800105e: b113 cbz r3, 8001066 <ETH_UpdateDescriptor+0x2e>
- {
- allocStatus = 0U;
- }
- else
- {
- WRITE_REG(dmarxdesc->BackupAddr0, (uint32_t)buff);
- 8001060: 6123 str r3, [r4, #16]
- WRITE_REG(dmarxdesc->DESC0, (uint32_t)buff);
- 8001062: 6023 str r3, [r4, #0]
- 8001064: e010 b.n 8001088 <ETH_UpdateDescriptor+0x50>
- allocStatus = 0U;
- 8001066: 2600 movs r6, #0
- 8001068: e00e b.n 8001088 <ETH_UpdateDescriptor+0x50>
- {
- WRITE_REG(dmarxdesc->DESC3, ETH_DMARXNDESCRF_OWN | ETH_DMARXNDESCRF_BUF1V | ETH_DMARXNDESCRF_IOC);
- }
- else
- {
- WRITE_REG(dmarxdesc->DESC3, ETH_DMARXNDESCRF_OWN | ETH_DMARXNDESCRF_BUF1V);
- 800106a: f04f 4301 mov.w r3, #2164260864 @ 0x81000000
- 800106e: 60e3 str r3, [r4, #12]
- 8001070: e014 b.n 800109c <ETH_UpdateDescriptor+0x64>
- }
- /* Increment current rx descriptor index */
- INCR_RX_DESC_INDEX(descidx, 1U);
- /* Get current descriptor address */
- dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
- 8001072: f103 0212 add.w r2, r3, #18
- 8001076: f857 4022 ldr.w r4, [r7, r2, lsl #2]
- desccount--;
- 800107a: 3d01 subs r5, #1
- 800107c: 4698 mov r8, r3
- while ((desccount > 0U) && (allocStatus != 0U))
- 800107e: b1a5 cbz r5, 80010aa <ETH_UpdateDescriptor+0x72>
- 8001080: b19e cbz r6, 80010aa <ETH_UpdateDescriptor+0x72>
- if (READ_REG(dmarxdesc->BackupAddr0) == 0U)
- 8001082: 6923 ldr r3, [r4, #16]
- 8001084: 2b00 cmp r3, #0
- 8001086: d0e6 beq.n 8001056 <ETH_UpdateDescriptor+0x1e>
- if (allocStatus != 0U)
- 8001088: 2e00 cmp r6, #0
- 800108a: d0f8 beq.n 800107e <ETH_UpdateDescriptor+0x46>
- __ASM volatile ("dmb 0xF":::"memory");
- 800108c: f3bf 8f5f dmb sy
- if (heth->RxDescList.ItMode != 0U)
- 8001090: 6dbb ldr r3, [r7, #88] @ 0x58
- 8001092: 2b00 cmp r3, #0
- 8001094: d0e9 beq.n 800106a <ETH_UpdateDescriptor+0x32>
- WRITE_REG(dmarxdesc->DESC3, ETH_DMARXNDESCRF_OWN | ETH_DMARXNDESCRF_BUF1V | ETH_DMARXNDESCRF_IOC);
- 8001096: f04f 4341 mov.w r3, #3238002688 @ 0xc1000000
- 800109a: 60e3 str r3, [r4, #12]
- INCR_RX_DESC_INDEX(descidx, 1U);
- 800109c: f108 0301 add.w r3, r8, #1
- 80010a0: 2b03 cmp r3, #3
- 80010a2: d9e6 bls.n 8001072 <ETH_UpdateDescriptor+0x3a>
- 80010a4: f1a8 0303 sub.w r3, r8, #3
- 80010a8: e7e3 b.n 8001072 <ETH_UpdateDescriptor+0x3a>
- }
- }
- if (heth->RxDescList.RxBuildDescCnt != desccount)
- 80010aa: 6efb ldr r3, [r7, #108] @ 0x6c
- 80010ac: 42ab cmp r3, r5
- 80010ae: d008 beq.n 80010c2 <ETH_UpdateDescriptor+0x8a>
- {
- /* Set the Tail pointer address */
- WRITE_REG(heth->Instance->DMACRDTPR, 0);
- 80010b0: 683b ldr r3, [r7, #0]
- 80010b2: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 80010b6: 2200 movs r2, #0
- 80010b8: f8c3 2128 str.w r2, [r3, #296] @ 0x128
- heth->RxDescList.RxBuildDescIdx = descidx;
- 80010bc: f8c7 8068 str.w r8, [r7, #104] @ 0x68
- heth->RxDescList.RxBuildDescCnt = desccount;
- 80010c0: 66fd str r5, [r7, #108] @ 0x6c
- }
- }
- 80010c2: b002 add sp, #8
- 80010c4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- 080010c8 <ETH_SetMACConfig>:
- * @{
- */
- static void ETH_SetMACConfig(ETH_HandleTypeDef *heth, ETH_MACConfigTypeDef *macconf)
- {
- 80010c8: b430 push {r4, r5}
- uint32_t macregval;
- /*------------------------ MACCR Configuration --------------------*/
- macregval = (macconf->InterPacketGapVal |
- 80010ca: 688b ldr r3, [r1, #8]
- macconf->SourceAddrControl |
- 80010cc: 680a ldr r2, [r1, #0]
- macregval = (macconf->InterPacketGapVal |
- 80010ce: 4313 orrs r3, r2
- ((uint32_t)macconf->ChecksumOffload << 27) |
- 80010d0: 790a ldrb r2, [r1, #4]
- macconf->SourceAddrControl |
- 80010d2: ea43 63c2 orr.w r3, r3, r2, lsl #27
- ((uint32_t)macconf->GiantPacketSizeLimitControl << 23) |
- 80010d6: 7b0a ldrb r2, [r1, #12]
- ((uint32_t)macconf->ChecksumOffload << 27) |
- 80010d8: ea43 53c2 orr.w r3, r3, r2, lsl #23
- ((uint32_t)macconf->Support2KPacket << 22) |
- 80010dc: 7b4a ldrb r2, [r1, #13]
- ((uint32_t)macconf->GiantPacketSizeLimitControl << 23) |
- 80010de: ea43 5382 orr.w r3, r3, r2, lsl #22
- ((uint32_t)macconf->CRCStripTypePacket << 21) |
- 80010e2: 7b8a ldrb r2, [r1, #14]
- ((uint32_t)macconf->Support2KPacket << 22) |
- 80010e4: ea43 5342 orr.w r3, r3, r2, lsl #21
- ((uint32_t)macconf->AutomaticPadCRCStrip << 20) |
- 80010e8: 7bca ldrb r2, [r1, #15]
- ((uint32_t)macconf->CRCStripTypePacket << 21) |
- 80010ea: ea43 5302 orr.w r3, r3, r2, lsl #20
- ((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 19) |
- 80010ee: 7c0a ldrb r2, [r1, #16]
- 80010f0: 2a00 cmp r2, #0
- 80010f2: f040 80b0 bne.w 8001256 <ETH_SetMACConfig+0x18e>
- 80010f6: f44f 2200 mov.w r2, #524288 @ 0x80000
- ((uint32_t)macconf->AutomaticPadCRCStrip << 20) |
- 80010fa: 4313 orrs r3, r2
- ((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 17) |
- 80010fc: 7c4a ldrb r2, [r1, #17]
- 80010fe: 2a00 cmp r2, #0
- 8001100: f040 80ab bne.w 800125a <ETH_SetMACConfig+0x192>
- 8001104: f44f 3200 mov.w r2, #131072 @ 0x20000
- ((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 19) |
- 8001108: 4313 orrs r3, r2
- ((uint32_t)macconf->JumboPacket << 16) |
- 800110a: 7c8a ldrb r2, [r1, #18]
- ((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 17) |
- 800110c: ea43 4302 orr.w r3, r3, r2, lsl #16
- macconf->Speed |
- 8001110: 694a ldr r2, [r1, #20]
- ((uint32_t)macconf->JumboPacket << 16) |
- 8001112: 4313 orrs r3, r2
- macconf->DuplexMode |
- 8001114: 698a ldr r2, [r1, #24]
- macconf->Speed |
- 8001116: 4313 orrs r3, r2
- ((uint32_t)macconf->LoopbackMode << 12) |
- 8001118: 7f0a ldrb r2, [r1, #28]
- macconf->DuplexMode |
- 800111a: ea43 3302 orr.w r3, r3, r2, lsl #12
- ((uint32_t)macconf->CarrierSenseBeforeTransmit << 11) |
- 800111e: 7f4a ldrb r2, [r1, #29]
- ((uint32_t)macconf->LoopbackMode << 12) |
- 8001120: ea43 23c2 orr.w r3, r3, r2, lsl #11
- ((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 10) |
- 8001124: 7f8a ldrb r2, [r1, #30]
- 8001126: 2a00 cmp r2, #0
- 8001128: f040 8099 bne.w 800125e <ETH_SetMACConfig+0x196>
- 800112c: f44f 6280 mov.w r2, #1024 @ 0x400
- ((uint32_t)macconf->CarrierSenseBeforeTransmit << 11) |
- 8001130: 4313 orrs r3, r2
- ((uint32_t)macconf->CarrierSenseDuringTransmit << 9) |
- 8001132: 7fca ldrb r2, [r1, #31]
- ((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 10) |
- 8001134: ea43 2342 orr.w r3, r3, r2, lsl #9
- ((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 8) |
- 8001138: f891 2020 ldrb.w r2, [r1, #32]
- 800113c: 2a00 cmp r2, #0
- 800113e: f040 8090 bne.w 8001262 <ETH_SetMACConfig+0x19a>
- 8001142: f44f 7280 mov.w r2, #256 @ 0x100
- ((uint32_t)macconf->CarrierSenseDuringTransmit << 9) |
- 8001146: 4313 orrs r3, r2
- macconf->BackOffLimit |
- 8001148: 6a4a ldr r2, [r1, #36] @ 0x24
- ((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 8) |
- 800114a: 4313 orrs r3, r2
- ((uint32_t)macconf->DeferralCheck << 4) |
- 800114c: f891 2028 ldrb.w r2, [r1, #40] @ 0x28
- macconf->BackOffLimit |
- 8001150: ea43 1302 orr.w r3, r3, r2, lsl #4
- macconf->PreambleLength);
- 8001154: 6aca ldr r2, [r1, #44] @ 0x2c
- macregval = (macconf->InterPacketGapVal |
- 8001156: 4313 orrs r3, r2
- /* Write to MACCR */
- MODIFY_REG(heth->Instance->MACCR, ETH_MACCR_MASK, macregval);
- 8001158: 6804 ldr r4, [r0, #0]
- 800115a: 6822 ldr r2, [r4, #0]
- 800115c: f022 427f bic.w r2, r2, #4278190080 @ 0xff000000
- 8001160: f422 027b bic.w r2, r2, #16449536 @ 0xfb0000
- 8001164: f422 42fe bic.w r2, r2, #32512 @ 0x7f00
- 8001168: f022 027c bic.w r2, r2, #124 @ 0x7c
- 800116c: 4313 orrs r3, r2
- 800116e: 6023 str r3, [r4, #0]
- /*------------------------ MACECR Configuration --------------------*/
- macregval = ((macconf->ExtendedInterPacketGapVal << 25) |
- 8001170: 6bca ldr r2, [r1, #60] @ 0x3c
- ((uint32_t)macconf->ExtendedInterPacketGap << 24) |
- 8001172: f891 3038 ldrb.w r3, [r1, #56] @ 0x38
- 8001176: 061b lsls r3, r3, #24
- macregval = ((macconf->ExtendedInterPacketGapVal << 25) |
- 8001178: ea43 6342 orr.w r3, r3, r2, lsl #25
- ((uint32_t)macconf->UnicastSlowProtocolPacketDetect << 18) |
- 800117c: f891 2030 ldrb.w r2, [r1, #48] @ 0x30
- ((uint32_t)macconf->ExtendedInterPacketGap << 24) |
- 8001180: ea43 4382 orr.w r3, r3, r2, lsl #18
- ((uint32_t)macconf->SlowProtocolDetect << 17) |
- 8001184: f891 2031 ldrb.w r2, [r1, #49] @ 0x31
- ((uint32_t)macconf->UnicastSlowProtocolPacketDetect << 18) |
- 8001188: ea43 4342 orr.w r3, r3, r2, lsl #17
- ((uint32_t)((macconf->CRCCheckingRxPackets == DISABLE) ? 1U : 0U) << 16) |
- 800118c: f891 2032 ldrb.w r2, [r1, #50] @ 0x32
- 8001190: 2a00 cmp r2, #0
- 8001192: d168 bne.n 8001266 <ETH_SetMACConfig+0x19e>
- 8001194: f44f 3280 mov.w r2, #65536 @ 0x10000
- ((uint32_t)macconf->SlowProtocolDetect << 17) |
- 8001198: 4313 orrs r3, r2
- macconf->GiantPacketSizeLimit);
- 800119a: 6b4a ldr r2, [r1, #52] @ 0x34
- macregval = ((macconf->ExtendedInterPacketGapVal << 25) |
- 800119c: 4313 orrs r3, r2
- /* Write to MACECR */
- MODIFY_REG(heth->Instance->MACECR, ETH_MACECR_MASK, macregval);
- 800119e: 6804 ldr r4, [r0, #0]
- 80011a0: 6862 ldr r2, [r4, #4]
- 80011a2: f022 527c bic.w r2, r2, #1056964608 @ 0x3f000000
- 80011a6: f422 22ef bic.w r2, r2, #489472 @ 0x77800
- 80011aa: f422 62ff bic.w r2, r2, #2040 @ 0x7f8
- 80011ae: f022 0207 bic.w r2, r2, #7
- 80011b2: 4313 orrs r3, r2
- 80011b4: 6063 str r3, [r4, #4]
- /*------------------------ MACWTR Configuration --------------------*/
- macregval = (((uint32_t)macconf->ProgrammableWatchdog << 8) |
- 80011b6: f891 2040 ldrb.w r2, [r1, #64] @ 0x40
- macconf->WatchdogTimeout);
- 80011ba: 6c4b ldr r3, [r1, #68] @ 0x44
- macregval = (((uint32_t)macconf->ProgrammableWatchdog << 8) |
- 80011bc: ea43 2202 orr.w r2, r3, r2, lsl #8
- /* Write to MACWTR */
- MODIFY_REG(heth->Instance->MACWTR, ETH_MACWTR_MASK, macregval);
- 80011c0: 6804 ldr r4, [r0, #0]
- 80011c2: 68e5 ldr r5, [r4, #12]
- 80011c4: 4b2b ldr r3, [pc, #172] @ (8001274 <ETH_SetMACConfig+0x1ac>)
- 80011c6: 402b ands r3, r5
- 80011c8: 4313 orrs r3, r2
- 80011ca: 60e3 str r3, [r4, #12]
- /*------------------------ MACTFCR Configuration --------------------*/
- macregval = (((uint32_t)macconf->TransmitFlowControl << 1) |
- 80011cc: f891 2054 ldrb.w r2, [r1, #84] @ 0x54
- macconf->PauseLowThreshold |
- 80011d0: 6d0b ldr r3, [r1, #80] @ 0x50
- macregval = (((uint32_t)macconf->TransmitFlowControl << 1) |
- 80011d2: ea43 0342 orr.w r3, r3, r2, lsl #1
- ((uint32_t)((macconf->ZeroQuantaPause == DISABLE) ? 1U : 0U) << 7) |
- 80011d6: f891 204c ldrb.w r2, [r1, #76] @ 0x4c
- 80011da: 2a00 cmp r2, #0
- 80011dc: d145 bne.n 800126a <ETH_SetMACConfig+0x1a2>
- 80011de: 2280 movs r2, #128 @ 0x80
- macconf->PauseLowThreshold |
- 80011e0: 4313 orrs r3, r2
- (macconf->PauseTime << 16));
- 80011e2: 6c8a ldr r2, [r1, #72] @ 0x48
- macregval = (((uint32_t)macconf->TransmitFlowControl << 1) |
- 80011e4: ea43 4302 orr.w r3, r3, r2, lsl #16
- /* Write to MACTFCR */
- MODIFY_REG(heth->Instance->MACTFCR, ETH_MACTFCR_MASK, macregval);
- 80011e8: 6804 ldr r4, [r0, #0]
- 80011ea: 6f22 ldr r2, [r4, #112] @ 0x70
- 80011ec: f022 02f2 bic.w r2, r2, #242 @ 0xf2
- 80011f0: 0412 lsls r2, r2, #16
- 80011f2: 0c12 lsrs r2, r2, #16
- 80011f4: 4313 orrs r3, r2
- 80011f6: 6723 str r3, [r4, #112] @ 0x70
- /*------------------------ MACRFCR Configuration --------------------*/
- macregval = ((uint32_t)macconf->ReceiveFlowControl |
- 80011f8: f891 2056 ldrb.w r2, [r1, #86] @ 0x56
- ((uint32_t)macconf->UnicastPausePacketDetect << 1));
- 80011fc: f891 3055 ldrb.w r3, [r1, #85] @ 0x55
- macregval = ((uint32_t)macconf->ReceiveFlowControl |
- 8001200: ea42 0243 orr.w r2, r2, r3, lsl #1
- /* Write to MACRFCR */
- MODIFY_REG(heth->Instance->MACRFCR, ETH_MACRFCR_MASK, macregval);
- 8001204: 6804 ldr r4, [r0, #0]
- 8001206: f8d4 3090 ldr.w r3, [r4, #144] @ 0x90
- 800120a: f023 0303 bic.w r3, r3, #3
- 800120e: 4313 orrs r3, r2
- 8001210: f8c4 3090 str.w r3, [r4, #144] @ 0x90
- /*------------------------ MTLTQOMR Configuration --------------------*/
- /* Write to MTLTQOMR */
- MODIFY_REG(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_MASK, macconf->TransmitQueueMode);
- 8001214: 6802 ldr r2, [r0, #0]
- 8001216: f8d2 3d00 ldr.w r3, [r2, #3328] @ 0xd00
- 800121a: f023 0372 bic.w r3, r3, #114 @ 0x72
- 800121e: 6d8c ldr r4, [r1, #88] @ 0x58
- 8001220: 4323 orrs r3, r4
- 8001222: f8c2 3d00 str.w r3, [r2, #3328] @ 0xd00
- /*------------------------ MTLRQOMR Configuration --------------------*/
- macregval = (macconf->ReceiveQueueMode |
- 8001226: 6dcb ldr r3, [r1, #92] @ 0x5c
- ((uint32_t)((macconf->DropTCPIPChecksumErrorPacket == DISABLE) ? 1U : 0U) << 6) |
- 8001228: f891 2060 ldrb.w r2, [r1, #96] @ 0x60
- 800122c: b9fa cbnz r2, 800126e <ETH_SetMACConfig+0x1a6>
- 800122e: 2240 movs r2, #64 @ 0x40
- macregval = (macconf->ReceiveQueueMode |
- 8001230: 4313 orrs r3, r2
- ((uint32_t)macconf->ForwardRxErrorPacket << 4) |
- 8001232: f891 2061 ldrb.w r2, [r1, #97] @ 0x61
- ((uint32_t)((macconf->DropTCPIPChecksumErrorPacket == DISABLE) ? 1U : 0U) << 6) |
- 8001236: ea43 1302 orr.w r3, r3, r2, lsl #4
- ((uint32_t)macconf->ForwardRxUndersizedGoodPacket << 3));
- 800123a: f891 2062 ldrb.w r2, [r1, #98] @ 0x62
- macregval = (macconf->ReceiveQueueMode |
- 800123e: ea43 03c2 orr.w r3, r3, r2, lsl #3
- /* Write to MTLRQOMR */
- MODIFY_REG(heth->Instance->MTLRQOMR, ETH_MTLRQOMR_MASK, macregval);
- 8001242: 6801 ldr r1, [r0, #0]
- 8001244: f8d1 2d30 ldr.w r2, [r1, #3376] @ 0xd30
- 8001248: f022 027b bic.w r2, r2, #123 @ 0x7b
- 800124c: 4313 orrs r3, r2
- 800124e: f8c1 3d30 str.w r3, [r1, #3376] @ 0xd30
- }
- 8001252: bc30 pop {r4, r5}
- 8001254: 4770 bx lr
- ((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 19) |
- 8001256: 2200 movs r2, #0
- 8001258: e74f b.n 80010fa <ETH_SetMACConfig+0x32>
- ((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 17) |
- 800125a: 2200 movs r2, #0
- 800125c: e754 b.n 8001108 <ETH_SetMACConfig+0x40>
- ((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 10) |
- 800125e: 2200 movs r2, #0
- 8001260: e766 b.n 8001130 <ETH_SetMACConfig+0x68>
- ((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 8) |
- 8001262: 2200 movs r2, #0
- 8001264: e76f b.n 8001146 <ETH_SetMACConfig+0x7e>
- ((uint32_t)((macconf->CRCCheckingRxPackets == DISABLE) ? 1U : 0U) << 16) |
- 8001266: 2200 movs r2, #0
- 8001268: e796 b.n 8001198 <ETH_SetMACConfig+0xd0>
- ((uint32_t)((macconf->ZeroQuantaPause == DISABLE) ? 1U : 0U) << 7) |
- 800126a: 2200 movs r2, #0
- 800126c: e7b8 b.n 80011e0 <ETH_SetMACConfig+0x118>
- ((uint32_t)((macconf->DropTCPIPChecksumErrorPacket == DISABLE) ? 1U : 0U) << 6) |
- 800126e: 2200 movs r2, #0
- 8001270: e7de b.n 8001230 <ETH_SetMACConfig+0x168>
- 8001272: bf00 nop
- 8001274: fffffef0 .word 0xfffffef0
- 08001278 <ETH_SetDMAConfig>:
- static void ETH_SetDMAConfig(ETH_HandleTypeDef *heth, ETH_DMAConfigTypeDef *dmaconf)
- {
- 8001278: b410 push {r4}
- uint32_t dmaregval;
- /*------------------------ DMAMR Configuration --------------------*/
- MODIFY_REG(heth->Instance->DMAMR, ETH_DMAMR_MASK, dmaconf->DMAArbitration);
- 800127a: 6802 ldr r2, [r0, #0]
- 800127c: f502 5280 add.w r2, r2, #4096 @ 0x1000
- 8001280: 6814 ldr r4, [r2, #0]
- 8001282: 4b23 ldr r3, [pc, #140] @ (8001310 <ETH_SetDMAConfig+0x98>)
- 8001284: 4023 ands r3, r4
- 8001286: 680c ldr r4, [r1, #0]
- 8001288: 4323 orrs r3, r4
- 800128a: 6013 str r3, [r2, #0]
- /*------------------------ DMASBMR Configuration --------------------*/
- dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) |
- 800128c: 790a ldrb r2, [r1, #4]
- dmaconf->BurstMode |
- 800128e: 688b ldr r3, [r1, #8]
- dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) |
- 8001290: ea43 3302 orr.w r3, r3, r2, lsl #12
- ((uint32_t)dmaconf->RebuildINCRxBurst << 15));
- 8001294: 7b0a ldrb r2, [r1, #12]
- dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) |
- 8001296: ea43 32c2 orr.w r2, r3, r2, lsl #15
- MODIFY_REG(heth->Instance->DMASBMR, ETH_DMASBMR_MASK, dmaregval);
- 800129a: 6803 ldr r3, [r0, #0]
- 800129c: f503 5c80 add.w ip, r3, #4096 @ 0x1000
- 80012a0: f8dc 4004 ldr.w r4, [ip, #4]
- 80012a4: 4b1b ldr r3, [pc, #108] @ (8001314 <ETH_SetDMAConfig+0x9c>)
- 80012a6: 4023 ands r3, r4
- 80012a8: 4313 orrs r3, r2
- 80012aa: f8cc 3004 str.w r3, [ip, #4]
- /*------------------------ DMACCR Configuration --------------------*/
- dmaregval = (((uint32_t)dmaconf->PBLx8Mode << 16) |
- 80012ae: 7b4a ldrb r2, [r1, #13]
- dmaconf->MaximumSegmentSize);
- 80012b0: 6a0b ldr r3, [r1, #32]
- dmaregval = (((uint32_t)dmaconf->PBLx8Mode << 16) |
- 80012b2: ea43 4c02 orr.w ip, r3, r2, lsl #16
- MODIFY_REG(heth->Instance->DMACCR, ETH_DMACCR_MASK, dmaregval);
- 80012b6: 6802 ldr r2, [r0, #0]
- 80012b8: f502 5280 add.w r2, r2, #4096 @ 0x1000
- 80012bc: f8d2 4100 ldr.w r4, [r2, #256] @ 0x100
- 80012c0: 4b15 ldr r3, [pc, #84] @ (8001318 <ETH_SetDMAConfig+0xa0>)
- 80012c2: 4023 ands r3, r4
- 80012c4: ea43 030c orr.w r3, r3, ip
- 80012c8: f8c2 3100 str.w r3, [r2, #256] @ 0x100
- /*------------------------ DMACTCR Configuration --------------------*/
- dmaregval = (dmaconf->TxDMABurstLength |
- 80012cc: 690b ldr r3, [r1, #16]
- ((uint32_t)dmaconf->SecondPacketOperate << 4) |
- 80012ce: 7d0a ldrb r2, [r1, #20]
- dmaregval = (dmaconf->TxDMABurstLength |
- 80012d0: ea43 1302 orr.w r3, r3, r2, lsl #4
- ((uint32_t)dmaconf->TCPSegmentation << 12));
- 80012d4: 7f4a ldrb r2, [r1, #29]
- dmaregval = (dmaconf->TxDMABurstLength |
- 80012d6: ea43 3202 orr.w r2, r3, r2, lsl #12
- MODIFY_REG(heth->Instance->DMACTCR, ETH_DMACTCR_MASK, dmaregval);
- 80012da: 6803 ldr r3, [r0, #0]
- 80012dc: f503 5c80 add.w ip, r3, #4096 @ 0x1000
- 80012e0: f8dc 4104 ldr.w r4, [ip, #260] @ 0x104
- 80012e4: 4b0d ldr r3, [pc, #52] @ (800131c <ETH_SetDMAConfig+0xa4>)
- 80012e6: 4023 ands r3, r4
- 80012e8: 4313 orrs r3, r2
- 80012ea: f8cc 3104 str.w r3, [ip, #260] @ 0x104
- /*------------------------ DMACRCR Configuration --------------------*/
- dmaregval = (((uint32_t)dmaconf->FlushRxPacket << 31) |
- 80012ee: 7f0b ldrb r3, [r1, #28]
- dmaconf->RxDMABurstLength);
- 80012f0: 6989 ldr r1, [r1, #24]
- dmaregval = (((uint32_t)dmaconf->FlushRxPacket << 31) |
- 80012f2: ea41 71c3 orr.w r1, r1, r3, lsl #31
- /* Write to DMACRCR */
- MODIFY_REG(heth->Instance->DMACRCR, ETH_DMACRCR_MASK, dmaregval);
- 80012f6: 6802 ldr r2, [r0, #0]
- 80012f8: f502 5280 add.w r2, r2, #4096 @ 0x1000
- 80012fc: f8d2 0108 ldr.w r0, [r2, #264] @ 0x108
- 8001300: 4b07 ldr r3, [pc, #28] @ (8001320 <ETH_SetDMAConfig+0xa8>)
- 8001302: 4003 ands r3, r0
- 8001304: 430b orrs r3, r1
- 8001306: f8c2 3108 str.w r3, [r2, #264] @ 0x108
- }
- 800130a: f85d 4b04 ldr.w r4, [sp], #4
- 800130e: 4770 bx lr
- 8001310: ffff87fd .word 0xffff87fd
- 8001314: ffff2ffe .word 0xffff2ffe
- 8001318: fffec000 .word 0xfffec000
- 800131c: ffc0efef .word 0xffc0efef
- 8001320: 7fc0ffff .word 0x7fc0ffff
- 08001324 <ETH_MACDMAConfig>:
- * @param heth: pointer to a ETH_HandleTypeDef structure that contains
- * the configuration information for ETHERNET module
- * @retval HAL status
- */
- static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth)
- {
- 8001324: b570 push {r4, r5, r6, lr}
- 8001326: b0a2 sub sp, #136 @ 0x88
- 8001328: 4606 mov r6, r0
- ETH_MACConfigTypeDef macDefaultConf;
- ETH_DMAConfigTypeDef dmaDefaultConf;
- /*--------------- ETHERNET MAC registers default Configuration --------------*/
- macDefaultConf.AutomaticPadCRCStrip = ENABLE;
- 800132a: 2501 movs r5, #1
- 800132c: f88d 5033 strb.w r5, [sp, #51] @ 0x33
- macDefaultConf.BackOffLimit = ETH_BACKOFFLIMIT_10;
- 8001330: 2400 movs r4, #0
- 8001332: 9412 str r4, [sp, #72] @ 0x48
- macDefaultConf.CarrierSenseBeforeTransmit = DISABLE;
- 8001334: f88d 4041 strb.w r4, [sp, #65] @ 0x41
- macDefaultConf.CarrierSenseDuringTransmit = DISABLE;
- 8001338: f88d 4043 strb.w r4, [sp, #67] @ 0x43
- macDefaultConf.ChecksumOffload = ENABLE;
- 800133c: f88d 5028 strb.w r5, [sp, #40] @ 0x28
- macDefaultConf.CRCCheckingRxPackets = ENABLE;
- 8001340: f88d 5056 strb.w r5, [sp, #86] @ 0x56
- macDefaultConf.CRCStripTypePacket = ENABLE;
- 8001344: f88d 5032 strb.w r5, [sp, #50] @ 0x32
- macDefaultConf.DeferralCheck = DISABLE;
- 8001348: f88d 404c strb.w r4, [sp, #76] @ 0x4c
- macDefaultConf.DropTCPIPChecksumErrorPacket = ENABLE;
- 800134c: f88d 5084 strb.w r5, [sp, #132] @ 0x84
- macDefaultConf.DuplexMode = ETH_FULLDUPLEX_MODE;
- 8001350: f44f 5300 mov.w r3, #8192 @ 0x2000
- 8001354: 930f str r3, [sp, #60] @ 0x3c
- macDefaultConf.ExtendedInterPacketGap = DISABLE;
- 8001356: f88d 405c strb.w r4, [sp, #92] @ 0x5c
- macDefaultConf.ExtendedInterPacketGapVal = 0x0;
- 800135a: 9418 str r4, [sp, #96] @ 0x60
- macDefaultConf.ForwardRxErrorPacket = DISABLE;
- 800135c: f88d 4085 strb.w r4, [sp, #133] @ 0x85
- macDefaultConf.ForwardRxUndersizedGoodPacket = DISABLE;
- 8001360: f88d 4086 strb.w r4, [sp, #134] @ 0x86
- macDefaultConf.GiantPacketSizeLimit = 0x618;
- 8001364: f44f 63c3 mov.w r3, #1560 @ 0x618
- 8001368: 9316 str r3, [sp, #88] @ 0x58
- macDefaultConf.GiantPacketSizeLimitControl = DISABLE;
- 800136a: f88d 4030 strb.w r4, [sp, #48] @ 0x30
- macDefaultConf.InterPacketGapVal = ETH_INTERPACKETGAP_96BIT;
- 800136e: 940b str r4, [sp, #44] @ 0x2c
- macDefaultConf.Jabber = ENABLE;
- 8001370: f88d 5035 strb.w r5, [sp, #53] @ 0x35
- macDefaultConf.JumboPacket = DISABLE;
- 8001374: f88d 4036 strb.w r4, [sp, #54] @ 0x36
- macDefaultConf.LoopbackMode = DISABLE;
- 8001378: f88d 4040 strb.w r4, [sp, #64] @ 0x40
- macDefaultConf.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS_4;
- 800137c: 941d str r4, [sp, #116] @ 0x74
- macDefaultConf.PauseTime = 0x0;
- 800137e: 941b str r4, [sp, #108] @ 0x6c
- macDefaultConf.PreambleLength = ETH_PREAMBLELENGTH_7;
- 8001380: 9414 str r4, [sp, #80] @ 0x50
- macDefaultConf.ProgrammableWatchdog = DISABLE;
- 8001382: f88d 4064 strb.w r4, [sp, #100] @ 0x64
- macDefaultConf.ReceiveFlowControl = DISABLE;
- 8001386: f88d 407a strb.w r4, [sp, #122] @ 0x7a
- macDefaultConf.ReceiveOwn = ENABLE;
- 800138a: f88d 5042 strb.w r5, [sp, #66] @ 0x42
- macDefaultConf.ReceiveQueueMode = ETH_RECEIVESTOREFORWARD;
- 800138e: 2320 movs r3, #32
- 8001390: 9320 str r3, [sp, #128] @ 0x80
- macDefaultConf.RetryTransmission = ENABLE;
- 8001392: f88d 5044 strb.w r5, [sp, #68] @ 0x44
- macDefaultConf.SlowProtocolDetect = DISABLE;
- 8001396: f88d 4055 strb.w r4, [sp, #85] @ 0x55
- macDefaultConf.SourceAddrControl = ETH_SOURCEADDRESS_REPLACE_ADDR0;
- 800139a: f04f 5340 mov.w r3, #805306368 @ 0x30000000
- 800139e: 9309 str r3, [sp, #36] @ 0x24
- macDefaultConf.Speed = ETH_SPEED_100M;
- 80013a0: f44f 4380 mov.w r3, #16384 @ 0x4000
- 80013a4: 930e str r3, [sp, #56] @ 0x38
- macDefaultConf.Support2KPacket = DISABLE;
- 80013a6: f88d 4031 strb.w r4, [sp, #49] @ 0x31
- macDefaultConf.TransmitQueueMode = ETH_TRANSMITSTOREFORWARD;
- 80013aa: 2302 movs r3, #2
- 80013ac: 931f str r3, [sp, #124] @ 0x7c
- macDefaultConf.TransmitFlowControl = DISABLE;
- 80013ae: f88d 4078 strb.w r4, [sp, #120] @ 0x78
- macDefaultConf.UnicastPausePacketDetect = DISABLE;
- 80013b2: f88d 4079 strb.w r4, [sp, #121] @ 0x79
- macDefaultConf.UnicastSlowProtocolPacketDetect = DISABLE;
- 80013b6: f88d 4054 strb.w r4, [sp, #84] @ 0x54
- macDefaultConf.Watchdog = ENABLE;
- 80013ba: f88d 5034 strb.w r5, [sp, #52] @ 0x34
- macDefaultConf.WatchdogTimeout = ETH_MACWTR_WTO_2KB;
- 80013be: 941a str r4, [sp, #104] @ 0x68
- macDefaultConf.ZeroQuantaPause = ENABLE;
- 80013c0: f88d 5070 strb.w r5, [sp, #112] @ 0x70
- /* MAC default configuration */
- ETH_SetMACConfig(heth, &macDefaultConf);
- 80013c4: a909 add r1, sp, #36 @ 0x24
- 80013c6: f7ff fe7f bl 80010c8 <ETH_SetMACConfig>
- /*--------------- ETHERNET DMA registers default Configuration --------------*/
- dmaDefaultConf.AddressAlignedBeats = ENABLE;
- 80013ca: f88d 5004 strb.w r5, [sp, #4]
- dmaDefaultConf.BurstMode = ETH_BURSTLENGTH_FIXED;
- 80013ce: 9502 str r5, [sp, #8]
- dmaDefaultConf.DMAArbitration = ETH_DMAARBITRATION_RX1_TX1;
- 80013d0: 9400 str r4, [sp, #0]
- dmaDefaultConf.FlushRxPacket = DISABLE;
- 80013d2: f88d 401c strb.w r4, [sp, #28]
- dmaDefaultConf.PBLx8Mode = DISABLE;
- 80013d6: f88d 400d strb.w r4, [sp, #13]
- dmaDefaultConf.RebuildINCRxBurst = DISABLE;
- 80013da: f88d 400c strb.w r4, [sp, #12]
- dmaDefaultConf.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT;
- 80013de: f44f 1300 mov.w r3, #2097152 @ 0x200000
- 80013e2: 9306 str r3, [sp, #24]
- dmaDefaultConf.SecondPacketOperate = DISABLE;
- 80013e4: f88d 4014 strb.w r4, [sp, #20]
- dmaDefaultConf.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT;
- 80013e8: 9304 str r3, [sp, #16]
- dmaDefaultConf.TCPSegmentation = DISABLE;
- 80013ea: f88d 401d strb.w r4, [sp, #29]
- dmaDefaultConf.MaximumSegmentSize = ETH_SEGMENT_SIZE_DEFAULT;
- 80013ee: f44f 7306 mov.w r3, #536 @ 0x218
- 80013f2: 9308 str r3, [sp, #32]
- /* DMA default configuration */
- ETH_SetDMAConfig(heth, &dmaDefaultConf);
- 80013f4: 4669 mov r1, sp
- 80013f6: 4630 mov r0, r6
- 80013f8: f7ff ff3e bl 8001278 <ETH_SetDMAConfig>
- }
- 80013fc: b022 add sp, #136 @ 0x88
- 80013fe: bd70 pop {r4, r5, r6, pc}
- 08001400 <ETH_DMATxDescListInit>:
- * @param heth: pointer to a ETH_HandleTypeDef structure that contains
- * the configuration information for ETHERNET module
- * @retval None
- */
- static void ETH_DMATxDescListInit(ETH_HandleTypeDef *heth)
- {
- 8001400: b410 push {r4}
- 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++)
- 8001402: 2200 movs r2, #0
- 8001404: e010 b.n 8001428 <ETH_DMATxDescListInit+0x28>
- {
- dmatxdesc = heth->Init.TxDesc + i;
- 8001406: 68c4 ldr r4, [r0, #12]
- 8001408: eb02 0342 add.w r3, r2, r2, lsl #1
- 800140c: ea4f 0cc3 mov.w ip, r3, lsl #3
- 8001410: eb04 03c3 add.w r3, r4, r3, lsl #3
- WRITE_REG(dmatxdesc->DESC0, 0x0);
- 8001414: 2100 movs r1, #0
- 8001416: f844 100c str.w r1, [r4, ip]
- WRITE_REG(dmatxdesc->DESC1, 0x0);
- 800141a: 6059 str r1, [r3, #4]
- WRITE_REG(dmatxdesc->DESC2, 0x0);
- 800141c: 6099 str r1, [r3, #8]
- WRITE_REG(dmatxdesc->DESC3, 0x0);
- 800141e: 60d9 str r1, [r3, #12]
- WRITE_REG(heth->TxDescList.TxDesc[i], (uint32_t)dmatxdesc);
- 8001420: 1d91 adds r1, r2, #6
- 8001422: f840 3021 str.w r3, [r0, r1, lsl #2]
- for (i = 0; i < (uint32_t)ETH_TX_DESC_CNT; i++)
- 8001426: 3201 adds r2, #1
- 8001428: 2a03 cmp r2, #3
- 800142a: d9ec bls.n 8001406 <ETH_DMATxDescListInit+0x6>
- }
- heth->TxDescList.CurTxDesc = 0;
- 800142c: 2300 movs r3, #0
- 800142e: 6283 str r3, [r0, #40] @ 0x28
- /* Set Transmit Descriptor Ring Length */
- WRITE_REG(heth->Instance->DMACTDRLR, (ETH_TX_DESC_CNT - 1U));
- 8001430: 6803 ldr r3, [r0, #0]
- 8001432: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 8001436: 2203 movs r2, #3
- 8001438: f8c3 212c str.w r2, [r3, #300] @ 0x12c
- /* Set Transmit Descriptor List Address */
- WRITE_REG(heth->Instance->DMACTDLAR, (uint32_t) heth->Init.TxDesc);
- 800143c: 68c2 ldr r2, [r0, #12]
- 800143e: 6803 ldr r3, [r0, #0]
- 8001440: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 8001444: f8c3 2114 str.w r2, [r3, #276] @ 0x114
- /* Set Transmit Descriptor Tail pointer */
- WRITE_REG(heth->Instance->DMACTDTPR, (uint32_t) heth->Init.TxDesc);
- 8001448: 68c2 ldr r2, [r0, #12]
- 800144a: 6803 ldr r3, [r0, #0]
- 800144c: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 8001450: f8c3 2120 str.w r2, [r3, #288] @ 0x120
- }
- 8001454: f85d 4b04 ldr.w r4, [sp], #4
- 8001458: 4770 bx lr
- 0800145a <ETH_DMARxDescListInit>:
- * @param heth: pointer to a ETH_HandleTypeDef structure that contains
- * the configuration information for ETHERNET module
- * @retval None
- */
- static void ETH_DMARxDescListInit(ETH_HandleTypeDef *heth)
- {
- 800145a: b410 push {r4}
- ETH_DMADescTypeDef *dmarxdesc;
- uint32_t i;
- for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++)
- 800145c: 2100 movs r1, #0
- 800145e: e013 b.n 8001488 <ETH_DMARxDescListInit+0x2e>
- {
- dmarxdesc = heth->Init.RxDesc + i;
- 8001460: 6904 ldr r4, [r0, #16]
- 8001462: eb01 0341 add.w r3, r1, r1, lsl #1
- 8001466: ea4f 0cc3 mov.w ip, r3, lsl #3
- 800146a: eb04 03c3 add.w r3, r4, r3, lsl #3
- WRITE_REG(dmarxdesc->DESC0, 0x0);
- 800146e: 2200 movs r2, #0
- 8001470: f844 200c str.w r2, [r4, ip]
- WRITE_REG(dmarxdesc->DESC1, 0x0);
- 8001474: 605a str r2, [r3, #4]
- WRITE_REG(dmarxdesc->DESC2, 0x0);
- 8001476: 609a str r2, [r3, #8]
- WRITE_REG(dmarxdesc->DESC3, 0x0);
- 8001478: 60da str r2, [r3, #12]
- WRITE_REG(dmarxdesc->BackupAddr0, 0x0);
- 800147a: 611a str r2, [r3, #16]
- WRITE_REG(dmarxdesc->BackupAddr1, 0x0);
- 800147c: 615a str r2, [r3, #20]
- /* Set Rx descritors addresses */
- WRITE_REG(heth->RxDescList.RxDesc[i], (uint32_t)dmarxdesc);
- 800147e: f101 0212 add.w r2, r1, #18
- 8001482: f840 3022 str.w r3, [r0, r2, lsl #2]
- for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++)
- 8001486: 3101 adds r1, #1
- 8001488: 2903 cmp r1, #3
- 800148a: d9e9 bls.n 8001460 <ETH_DMARxDescListInit+0x6>
- }
- WRITE_REG(heth->RxDescList.RxDescIdx, 0);
- 800148c: 2300 movs r3, #0
- 800148e: 65c3 str r3, [r0, #92] @ 0x5c
- WRITE_REG(heth->RxDescList.RxDescCnt, 0);
- 8001490: 6603 str r3, [r0, #96] @ 0x60
- WRITE_REG(heth->RxDescList.RxBuildDescIdx, 0);
- 8001492: 6683 str r3, [r0, #104] @ 0x68
- WRITE_REG(heth->RxDescList.RxBuildDescCnt, 0);
- 8001494: 66c3 str r3, [r0, #108] @ 0x6c
- WRITE_REG(heth->RxDescList.ItMode, 0);
- 8001496: 6583 str r3, [r0, #88] @ 0x58
- /* Set Receive Descriptor Ring Length */
- WRITE_REG(heth->Instance->DMACRDRLR, ((uint32_t)(ETH_RX_DESC_CNT - 1U)));
- 8001498: 6803 ldr r3, [r0, #0]
- 800149a: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 800149e: 2203 movs r2, #3
- 80014a0: f8c3 2130 str.w r2, [r3, #304] @ 0x130
- /* Set Receive Descriptor List Address */
- WRITE_REG(heth->Instance->DMACRDLAR, (uint32_t) heth->Init.RxDesc);
- 80014a4: 6902 ldr r2, [r0, #16]
- 80014a6: 6803 ldr r3, [r0, #0]
- 80014a8: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 80014ac: 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))));
- 80014b0: 6903 ldr r3, [r0, #16]
- 80014b2: f103 0248 add.w r2, r3, #72 @ 0x48
- 80014b6: 6803 ldr r3, [r0, #0]
- 80014b8: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 80014bc: f8c3 2128 str.w r2, [r3, #296] @ 0x128
- }
- 80014c0: f85d 4b04 ldr.w r4, [sp], #4
- 80014c4: 4770 bx lr
- ...
- 080014c8 <ETH_Prepare_Tx_Descriptors>:
- * @param pTxConfig: Tx packet configuration
- * @param ItMode: Enable or disable Tx EOT interrept
- * @retval Status
- */
- static uint32_t ETH_Prepare_Tx_Descriptors(ETH_HandleTypeDef *heth, ETH_TxPacketConfig *pTxConfig, uint32_t ItMode)
- {
- 80014c8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 80014cc: 4690 mov r8, r2
- ETH_TxDescListTypeDef *dmatxdesclist = &heth->TxDescList;
- uint32_t descidx = dmatxdesclist->CurTxDesc;
- 80014ce: 6a84 ldr r4, [r0, #40] @ 0x28
- uint32_t firstdescidx = dmatxdesclist->CurTxDesc;
- uint32_t idx;
- uint32_t descnbr = 0;
- ETH_DMADescTypeDef *dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
- 80014d0: eb00 0384 add.w r3, r0, r4, lsl #2
- 80014d4: 699b ldr r3, [r3, #24]
- ETH_BufferTypeDef *txbuffer = pTxConfig->TxBuffer;
- 80014d6: f8d1 c008 ldr.w ip, [r1, #8]
- uint32_t bd_count = 0;
- /* Current Tx Descriptor Owned by DMA: cannot be used by the application */
- if ((READ_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCWBF_OWN) == ETH_DMATXNDESCWBF_OWN)
- 80014da: 68da ldr r2, [r3, #12]
- 80014dc: 2a00 cmp r2, #0
- 80014de: f2c0 8198 blt.w 8001812 <ETH_Prepare_Tx_Descriptors+0x34a>
- || (dmatxdesclist->PacketAddress[descidx] != NULL))
- 80014e2: 1d22 adds r2, r4, #4
- 80014e4: eb00 0282 add.w r2, r0, r2, lsl #2
- 80014e8: 69d2 ldr r2, [r2, #28]
- 80014ea: 2a00 cmp r2, #0
- 80014ec: f040 8193 bne.w 8001816 <ETH_Prepare_Tx_Descriptors+0x34e>
- /***************************************************************************/
- /***************** 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)
- 80014f0: 680a ldr r2, [r1, #0]
- 80014f2: f012 0f04 tst.w r2, #4
- 80014f6: d02c beq.n 8001552 <ETH_Prepare_Tx_Descriptors+0x8a>
- {
- /* Set vlan tag value */
- MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXCDESC_VT, pTxConfig->VlanTag);
- 80014f8: 68dd ldr r5, [r3, #12]
- 80014fa: 4a81 ldr r2, [pc, #516] @ (8001700 <ETH_Prepare_Tx_Descriptors+0x238>)
- 80014fc: 402a ands r2, r5
- 80014fe: 6a4d ldr r5, [r1, #36] @ 0x24
- 8001500: 432a orrs r2, r5
- 8001502: 60da str r2, [r3, #12]
- /* Set vlan tag valid bit */
- SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_VLTV);
- 8001504: 68da ldr r2, [r3, #12]
- 8001506: f442 3280 orr.w r2, r2, #65536 @ 0x10000
- 800150a: 60da str r2, [r3, #12]
- /* Set the descriptor as the vlan input source */
- SET_BIT(heth->Instance->MACVIR, ETH_MACVIR_VLTI);
- 800150c: 6805 ldr r5, [r0, #0]
- 800150e: 6e2a ldr r2, [r5, #96] @ 0x60
- 8001510: f442 1280 orr.w r2, r2, #1048576 @ 0x100000
- 8001514: 662a str r2, [r5, #96] @ 0x60
- /* if inner VLAN is enabled */
- if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_INNERVLANTAG) != (uint32_t)RESET)
- 8001516: 680a ldr r2, [r1, #0]
- 8001518: f012 0f08 tst.w r2, #8
- 800151c: d019 beq.n 8001552 <ETH_Prepare_Tx_Descriptors+0x8a>
- {
- /* Set inner vlan tag value */
- MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXCDESC_IVT, (pTxConfig->InnerVlanTag << 16));
- 800151e: 689a ldr r2, [r3, #8]
- 8001520: b292 uxth r2, r2
- 8001522: 6acd ldr r5, [r1, #44] @ 0x2c
- 8001524: ea42 4205 orr.w r2, r2, r5, lsl #16
- 8001528: 609a str r2, [r3, #8]
- /* Set inner vlan tag valid bit */
- SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_IVLTV);
- 800152a: 68da ldr r2, [r3, #12]
- 800152c: f442 3200 orr.w r2, r2, #131072 @ 0x20000
- 8001530: 60da str r2, [r3, #12]
- /* Set Vlan Tag control */
- MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXCDESC_IVTIR, pTxConfig->InnerVlanCtrl);
- 8001532: 68da ldr r2, [r3, #12]
- 8001534: f422 2240 bic.w r2, r2, #786432 @ 0xc0000
- 8001538: 6b0d ldr r5, [r1, #48] @ 0x30
- 800153a: 432a orrs r2, r5
- 800153c: 60da str r2, [r3, #12]
- /* Set the descriptor as the inner vlan input source */
- SET_BIT(heth->Instance->MACIVIR, ETH_MACIVIR_VLTI);
- 800153e: 6805 ldr r5, [r0, #0]
- 8001540: 6e6a ldr r2, [r5, #100] @ 0x64
- 8001542: f442 1280 orr.w r2, r2, #1048576 @ 0x100000
- 8001546: 666a str r2, [r5, #100] @ 0x64
- /* Enable double VLAN processing */
- SET_BIT(heth->Instance->MACVTR, ETH_MACVTR_EDVLP);
- 8001548: 6805 ldr r5, [r0, #0]
- 800154a: 6d2a ldr r2, [r5, #80] @ 0x50
- 800154c: f042 6280 orr.w r2, r2, #67108864 @ 0x4000000
- 8001550: 652a str r2, [r5, #80] @ 0x50
- }
- }
- /* if tcp segmentation is enabled for this packet */
- if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET)
- 8001552: 680a ldr r2, [r1, #0]
- 8001554: f012 0f10 tst.w r2, #16
- 8001558: d009 beq.n 800156e <ETH_Prepare_Tx_Descriptors+0xa6>
- {
- /* Set MSS value */
- MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXCDESC_MSS, pTxConfig->MaxSegmentSize);
- 800155a: 689d ldr r5, [r3, #8]
- 800155c: 4a69 ldr r2, [pc, #420] @ (8001704 <ETH_Prepare_Tx_Descriptors+0x23c>)
- 800155e: 402a ands r2, r5
- 8001560: 698d ldr r5, [r1, #24]
- 8001562: 432a orrs r2, r5
- 8001564: 609a str r2, [r3, #8]
- /* Set MSS valid bit */
- SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_TCMSSV);
- 8001566: 68da ldr r2, [r3, #12]
- 8001568: f042 6280 orr.w r2, r2, #67108864 @ 0x4000000
- 800156c: 60da str r2, [r3, #12]
- }
- if ((READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET)
- || (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET))
- 800156e: 680a ldr r2, [r1, #0]
- if ((READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET)
- 8001570: f012 0214 ands.w r2, r2, #20
- 8001574: d020 beq.n 80015b8 <ETH_Prepare_Tx_Descriptors+0xf0>
- {
- /* Set as context descriptor */
- SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_CTXT);
- 8001576: 68da ldr r2, [r3, #12]
- 8001578: f042 4280 orr.w r2, r2, #1073741824 @ 0x40000000
- 800157c: 60da str r2, [r3, #12]
- 800157e: f3bf 8f5f dmb sy
- /* Ensure rest of descriptor is written to RAM before the OWN bit */
- __DMB();
- /* Set own bit */
- SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_OWN);
- 8001582: 68da ldr r2, [r3, #12]
- 8001584: f042 4200 orr.w r2, r2, #2147483648 @ 0x80000000
- 8001588: 60da str r2, [r3, #12]
- /* Increment current tx descriptor index */
- INCR_TX_DESC_INDEX(descidx, 1U);
- 800158a: 1c66 adds r6, r4, #1
- 800158c: 2e03 cmp r6, #3
- 800158e: d900 bls.n 8001592 <ETH_Prepare_Tx_Descriptors+0xca>
- 8001590: 1ee6 subs r6, r4, #3
- /* Get current descriptor address */
- dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
- 8001592: eb00 0386 add.w r3, r0, r6, lsl #2
- 8001596: 699b ldr r3, [r3, #24]
- descnbr += 1U;
- /* Current Tx Descriptor Owned by DMA: cannot be used by the application */
- if (READ_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCWBF_OWN) == ETH_DMATXNDESCWBF_OWN)
- 8001598: 68da ldr r2, [r3, #12]
- 800159a: 2a00 cmp r2, #0
- 800159c: db01 blt.n 80015a2 <ETH_Prepare_Tx_Descriptors+0xda>
- descnbr += 1U;
- 800159e: 2201 movs r2, #1
- 80015a0: e00b b.n 80015ba <ETH_Prepare_Tx_Descriptors+0xf2>
- {
- dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[firstdescidx];
- 80015a2: eb00 0484 add.w r4, r0, r4, lsl #2
- 80015a6: 69a2 ldr r2, [r4, #24]
- 80015a8: f3bf 8f5f dmb sy
- /* Ensure rest of descriptor is written to RAM before the OWN bit */
- __DMB();
- /* Clear own bit */
- CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_OWN);
- 80015ac: 68d3 ldr r3, [r2, #12]
- 80015ae: f023 4300 bic.w r3, r3, #2147483648 @ 0x80000000
- 80015b2: 60d3 str r3, [r2, #12]
- return HAL_ETH_ERROR_BUSY;
- 80015b4: 2002 movs r0, #2
- 80015b6: e12f b.n 8001818 <ETH_Prepare_Tx_Descriptors+0x350>
- uint32_t descidx = dmatxdesclist->CurTxDesc;
- 80015b8: 4626 mov r6, r4
- /***************************************************************************/
- /***************** Normal descriptors configuration *****************/
- /***************************************************************************/
- descnbr += 1U;
- 80015ba: f102 0e01 add.w lr, r2, #1
- /* Set header or buffer 1 address */
- WRITE_REG(dmatxdesc->DESC0, (uint32_t)txbuffer->buffer);
- 80015be: f8dc 2000 ldr.w r2, [ip]
- 80015c2: 601a str r2, [r3, #0]
- /* Set header or buffer 1 Length */
- MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B1L, txbuffer->len);
- 80015c4: 689a ldr r2, [r3, #8]
- 80015c6: 4d4f ldr r5, [pc, #316] @ (8001704 <ETH_Prepare_Tx_Descriptors+0x23c>)
- 80015c8: 4015 ands r5, r2
- 80015ca: f8dc 2004 ldr.w r2, [ip, #4]
- 80015ce: 4315 orrs r5, r2
- 80015d0: 609d str r5, [r3, #8]
- if (txbuffer->next != NULL)
- 80015d2: f8dc 2008 ldr.w r2, [ip, #8]
- 80015d6: 2a00 cmp r2, #0
- 80015d8: d048 beq.n 800166c <ETH_Prepare_Tx_Descriptors+0x1a4>
- {
- txbuffer = txbuffer->next;
- /* Set buffer 2 address */
- WRITE_REG(dmatxdesc->DESC1, (uint32_t)txbuffer->buffer);
- 80015da: 6815 ldr r5, [r2, #0]
- 80015dc: 605d str r5, [r3, #4]
- /* Set buffer 2 Length */
- MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, (txbuffer->len << 16));
- 80015de: 689d ldr r5, [r3, #8]
- 80015e0: f8df c124 ldr.w ip, [pc, #292] @ 8001708 <ETH_Prepare_Tx_Descriptors+0x240>
- 80015e4: ea05 0c0c and.w ip, r5, ip
- 80015e8: 6855 ldr r5, [r2, #4]
- 80015ea: ea4c 4505 orr.w r5, ip, r5, lsl #16
- 80015ee: 609d str r5, [r3, #8]
- WRITE_REG(dmatxdesc->DESC1, 0x0);
- /* Set buffer 2 Length */
- MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, 0x0U);
- }
- if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET)
- 80015f0: 680d ldr r5, [r1, #0]
- 80015f2: f015 0f10 tst.w r5, #16
- 80015f6: d041 beq.n 800167c <ETH_Prepare_Tx_Descriptors+0x1b4>
- {
- /* Set TCP Header length */
- MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_THL, (pTxConfig->TCPHeaderLen << 19));
- 80015f8: 68dd ldr r5, [r3, #12]
- 80015fa: f425 0cf0 bic.w ip, r5, #7864320 @ 0x780000
- 80015fe: 6a0d ldr r5, [r1, #32]
- 8001600: ea4c 45c5 orr.w r5, ip, r5, lsl #19
- 8001604: 60dd str r5, [r3, #12]
- /* Set TCP payload length */
- MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TPL, pTxConfig->PayloadLen);
- 8001606: 68dd ldr r5, [r3, #12]
- 8001608: f8df c104 ldr.w ip, [pc, #260] @ 8001710 <ETH_Prepare_Tx_Descriptors+0x248>
- 800160c: ea05 0c0c and.w ip, r5, ip
- 8001610: 69cd ldr r5, [r1, #28]
- 8001612: ea4c 0505 orr.w r5, ip, r5
- 8001616: 60dd str r5, [r3, #12]
- /* Set TCP Segmentation Enabled bit */
- SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TSE);
- 8001618: 68dd ldr r5, [r3, #12]
- 800161a: f445 2580 orr.w r5, r5, #262144 @ 0x40000
- 800161e: 60dd str r5, [r3, #12]
- {
- MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CPC, pTxConfig->CRCPadCtrl);
- }
- }
- if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET)
- 8001620: 680d ldr r5, [r1, #0]
- 8001622: f015 0f04 tst.w r5, #4
- 8001626: d006 beq.n 8001636 <ETH_Prepare_Tx_Descriptors+0x16e>
- {
- /* Set Vlan Tag control */
- MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_VTIR, pTxConfig->VlanCtrl);
- 8001628: 689d ldr r5, [r3, #8]
- 800162a: f425 4c40 bic.w ip, r5, #49152 @ 0xc000
- 800162e: 6a8d ldr r5, [r1, #40] @ 0x28
- 8001630: ea4c 0505 orr.w r5, ip, r5
- 8001634: 609d str r5, [r3, #8]
- }
- /* Mark it as First Descriptor */
- SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FD);
- 8001636: 68dd ldr r5, [r3, #12]
- 8001638: f045 5500 orr.w r5, r5, #536870912 @ 0x20000000
- 800163c: 60dd str r5, [r3, #12]
- /* Mark it as NORMAL descriptor */
- CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CTXT);
- 800163e: 68dd ldr r5, [r3, #12]
- 8001640: f025 4580 bic.w r5, r5, #1073741824 @ 0x40000000
- 8001644: 60dd str r5, [r3, #12]
- 8001646: f3bf 8f5f dmb sy
- /* 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);
- 800164a: 68dd ldr r5, [r3, #12]
- 800164c: f045 4500 orr.w r5, r5, #2147483648 @ 0x80000000
- 8001650: 60dd str r5, [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)
- 8001652: 680d ldr r5, [r1, #0]
- 8001654: f015 0f02 tst.w r5, #2
- 8001658: d006 beq.n 8001668 <ETH_Prepare_Tx_Descriptors+0x1a0>
- {
- MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_SAIC, pTxConfig->SrcAddrCtrl);
- 800165a: 68dd ldr r5, [r3, #12]
- 800165c: f025 7c60 bic.w ip, r5, #58720256 @ 0x3800000
- 8001660: 68cd ldr r5, [r1, #12]
- 8001662: ea4c 0505 orr.w r5, ip, r5
- 8001666: 60dd str r5, [r3, #12]
- }
- descnbr += 1U;
- /* Get the next Tx buffer in the list */
- txbuffer = txbuffer->next;
- 8001668: 2500 movs r5, #0
- 800166a: e06f b.n 800174c <ETH_Prepare_Tx_Descriptors+0x284>
- WRITE_REG(dmatxdesc->DESC1, 0x0);
- 800166c: 2200 movs r2, #0
- 800166e: 605a str r2, [r3, #4]
- MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, 0x0U);
- 8001670: 689d ldr r5, [r3, #8]
- 8001672: 4a25 ldr r2, [pc, #148] @ (8001708 <ETH_Prepare_Tx_Descriptors+0x240>)
- 8001674: 402a ands r2, r5
- 8001676: 609a str r2, [r3, #8]
- ETH_BufferTypeDef *txbuffer = pTxConfig->TxBuffer;
- 8001678: 4662 mov r2, ip
- 800167a: e7b9 b.n 80015f0 <ETH_Prepare_Tx_Descriptors+0x128>
- MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FL, pTxConfig->Length);
- 800167c: 68dd ldr r5, [r3, #12]
- 800167e: f8df c08c ldr.w ip, [pc, #140] @ 800170c <ETH_Prepare_Tx_Descriptors+0x244>
- 8001682: ea05 0c0c and.w ip, r5, ip
- 8001686: 684d ldr r5, [r1, #4]
- 8001688: ea4c 0505 orr.w r5, ip, r5
- 800168c: 60dd str r5, [r3, #12]
- if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CSUM) != (uint32_t)RESET)
- 800168e: 680d ldr r5, [r1, #0]
- 8001690: f015 0f01 tst.w r5, #1
- 8001694: d006 beq.n 80016a4 <ETH_Prepare_Tx_Descriptors+0x1dc>
- MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CIC, pTxConfig->ChecksumCtrl);
- 8001696: 68dd ldr r5, [r3, #12]
- 8001698: f425 3c40 bic.w ip, r5, #196608 @ 0x30000
- 800169c: 694d ldr r5, [r1, #20]
- 800169e: ea4c 0505 orr.w r5, ip, r5
- 80016a2: 60dd str r5, [r3, #12]
- if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CRCPAD) != (uint32_t)RESET)
- 80016a4: 680d ldr r5, [r1, #0]
- 80016a6: f015 0f20 tst.w r5, #32
- 80016aa: d0b9 beq.n 8001620 <ETH_Prepare_Tx_Descriptors+0x158>
- MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CPC, pTxConfig->CRCPadCtrl);
- 80016ac: 68dd ldr r5, [r3, #12]
- 80016ae: f025 6c40 bic.w ip, r5, #201326592 @ 0xc000000
- 80016b2: 690d ldr r5, [r1, #16]
- 80016b4: ea4c 0505 orr.w r5, ip, r5
- 80016b8: 60dd str r5, [r3, #12]
- 80016ba: e7b1 b.n 8001620 <ETH_Prepare_Tx_Descriptors+0x158>
- dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
- 80016bc: eb00 0384 add.w r3, r0, r4, lsl #2
- 80016c0: 6999 ldr r1, [r3, #24]
- for (idx = 0; idx < descnbr; idx ++)
- 80016c2: 2200 movs r2, #0
- 80016c4: e004 b.n 80016d0 <ETH_Prepare_Tx_Descriptors+0x208>
- dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
- 80016c6: eb00 0183 add.w r1, r0, r3, lsl #2
- 80016ca: 6989 ldr r1, [r1, #24]
- for (idx = 0; idx < descnbr; idx ++)
- 80016cc: 3201 adds r2, #1
- 80016ce: 461c mov r4, r3
- 80016d0: 4572 cmp r2, lr
- 80016d2: d20a bcs.n 80016ea <ETH_Prepare_Tx_Descriptors+0x222>
- 80016d4: f3bf 8f5f dmb sy
- CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN);
- 80016d8: 68cb ldr r3, [r1, #12]
- 80016da: f023 4300 bic.w r3, r3, #2147483648 @ 0x80000000
- 80016de: 60cb str r3, [r1, #12]
- INCR_TX_DESC_INDEX(descidx, 1U);
- 80016e0: 1c63 adds r3, r4, #1
- 80016e2: 2b03 cmp r3, #3
- 80016e4: d9ef bls.n 80016c6 <ETH_Prepare_Tx_Descriptors+0x1fe>
- 80016e6: 1ee3 subs r3, r4, #3
- 80016e8: e7ed b.n 80016c6 <ETH_Prepare_Tx_Descriptors+0x1fe>
- return HAL_ETH_ERROR_BUSY;
- 80016ea: 2002 movs r0, #2
- 80016ec: e094 b.n 8001818 <ETH_Prepare_Tx_Descriptors+0x350>
- /* Set buffer 2 Length */
- MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, (txbuffer->len << 16));
- }
- else
- {
- WRITE_REG(dmatxdesc->DESC1, 0x0);
- 80016ee: 2200 movs r2, #0
- 80016f0: 605a str r2, [r3, #4]
- /* Set buffer 2 Length */
- MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, 0x0U);
- 80016f2: 689e ldr r6, [r3, #8]
- 80016f4: 4a04 ldr r2, [pc, #16] @ (8001708 <ETH_Prepare_Tx_Descriptors+0x240>)
- 80016f6: 4032 ands r2, r6
- 80016f8: 609a str r2, [r3, #8]
- txbuffer = txbuffer->next;
- 80016fa: 463a mov r2, r7
- 80016fc: e05c b.n 80017b8 <ETH_Prepare_Tx_Descriptors+0x2f0>
- 80016fe: bf00 nop
- 8001700: ffff0000 .word 0xffff0000
- 8001704: ffffc000 .word 0xffffc000
- 8001708: c000ffff .word 0xc000ffff
- 800170c: ffff8000 .word 0xffff8000
- 8001710: fffc0000 .word 0xfffc0000
- SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TSE);
- }
- else
- {
- /* Set the packet length */
- MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FL, pTxConfig->Length);
- 8001714: 68df ldr r7, [r3, #12]
- 8001716: 4e41 ldr r6, [pc, #260] @ (800181c <ETH_Prepare_Tx_Descriptors+0x354>)
- 8001718: 403e ands r6, r7
- 800171a: 684f ldr r7, [r1, #4]
- 800171c: 433e orrs r6, r7
- 800171e: 60de str r6, [r3, #12]
- if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CSUM) != (uint32_t)RESET)
- 8001720: 680e ldr r6, [r1, #0]
- 8001722: f016 0f01 tst.w r6, #1
- 8001726: d005 beq.n 8001734 <ETH_Prepare_Tx_Descriptors+0x26c>
- {
- /* Checksum Insertion Control */
- MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CIC, pTxConfig->ChecksumCtrl);
- 8001728: 68de ldr r6, [r3, #12]
- 800172a: f426 3640 bic.w r6, r6, #196608 @ 0x30000
- 800172e: 694f ldr r7, [r1, #20]
- 8001730: 433e orrs r6, r7
- 8001732: 60de str r6, [r3, #12]
- }
- }
- bd_count += 1U;
- 8001734: 3501 adds r5, #1
- 8001736: f3bf 8f5f dmb sy
- /* Ensure rest of descriptor is written to RAM before the OWN bit */
- __DMB();
- /* Set Own bit */
- SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN);
- 800173a: 68de ldr r6, [r3, #12]
- 800173c: f046 4600 orr.w r6, r6, #2147483648 @ 0x80000000
- 8001740: 60de str r6, [r3, #12]
- /* Mark it as NORMAL descriptor */
- CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CTXT);
- 8001742: 68de ldr r6, [r3, #12]
- 8001744: f026 4680 bic.w r6, r6, #1073741824 @ 0x40000000
- 8001748: 60de str r6, [r3, #12]
- 800174a: 4666 mov r6, ip
- while (txbuffer->next != NULL)
- 800174c: 6897 ldr r7, [r2, #8]
- 800174e: 2f00 cmp r7, #0
- 8001750: d041 beq.n 80017d6 <ETH_Prepare_Tx_Descriptors+0x30e>
- CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_LD);
- 8001752: 68df ldr r7, [r3, #12]
- 8001754: f027 5780 bic.w r7, r7, #268435456 @ 0x10000000
- 8001758: 60df str r7, [r3, #12]
- INCR_TX_DESC_INDEX(descidx, 1U);
- 800175a: f106 0c01 add.w ip, r6, #1
- 800175e: f1bc 0f03 cmp.w ip, #3
- 8001762: d901 bls.n 8001768 <ETH_Prepare_Tx_Descriptors+0x2a0>
- 8001764: f1a6 0c03 sub.w ip, r6, #3
- dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
- 8001768: eb00 038c add.w r3, r0, ip, lsl #2
- 800176c: 699b ldr r3, [r3, #24]
- CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FD);
- 800176e: 68de ldr r6, [r3, #12]
- 8001770: f026 5600 bic.w r6, r6, #536870912 @ 0x20000000
- 8001774: 60de str r6, [r3, #12]
- if ((READ_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN) == ETH_DMATXNDESCRF_OWN)
- 8001776: 68de ldr r6, [r3, #12]
- 8001778: 2e00 cmp r6, #0
- 800177a: db9f blt.n 80016bc <ETH_Prepare_Tx_Descriptors+0x1f4>
- || (dmatxdesclist->PacketAddress[descidx] != NULL))
- 800177c: f10c 0604 add.w r6, ip, #4
- 8001780: eb00 0686 add.w r6, r0, r6, lsl #2
- 8001784: 69f6 ldr r6, [r6, #28]
- 8001786: 2e00 cmp r6, #0
- 8001788: d198 bne.n 80016bc <ETH_Prepare_Tx_Descriptors+0x1f4>
- descnbr += 1U;
- 800178a: f10e 0e01 add.w lr, lr, #1
- txbuffer = txbuffer->next;
- 800178e: 6897 ldr r7, [r2, #8]
- WRITE_REG(dmatxdesc->DESC0, (uint32_t)txbuffer->buffer);
- 8001790: 683a ldr r2, [r7, #0]
- 8001792: 601a str r2, [r3, #0]
- MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B1L, txbuffer->len);
- 8001794: 689a ldr r2, [r3, #8]
- 8001796: 4e22 ldr r6, [pc, #136] @ (8001820 <ETH_Prepare_Tx_Descriptors+0x358>)
- 8001798: 4016 ands r6, r2
- 800179a: 687a ldr r2, [r7, #4]
- 800179c: 4316 orrs r6, r2
- 800179e: 609e str r6, [r3, #8]
- if (txbuffer->next != NULL)
- 80017a0: 68ba ldr r2, [r7, #8]
- 80017a2: 2a00 cmp r2, #0
- 80017a4: d0a3 beq.n 80016ee <ETH_Prepare_Tx_Descriptors+0x226>
- WRITE_REG(dmatxdesc->DESC1, (uint32_t)txbuffer->buffer);
- 80017a6: 6816 ldr r6, [r2, #0]
- 80017a8: 605e str r6, [r3, #4]
- MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, (txbuffer->len << 16));
- 80017aa: 689f ldr r7, [r3, #8]
- 80017ac: 4e1d ldr r6, [pc, #116] @ (8001824 <ETH_Prepare_Tx_Descriptors+0x35c>)
- 80017ae: 403e ands r6, r7
- 80017b0: 6857 ldr r7, [r2, #4]
- 80017b2: ea46 4607 orr.w r6, r6, r7, lsl #16
- 80017b6: 609e str r6, [r3, #8]
- if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET)
- 80017b8: 680e ldr r6, [r1, #0]
- 80017ba: f016 0f10 tst.w r6, #16
- 80017be: d0a9 beq.n 8001714 <ETH_Prepare_Tx_Descriptors+0x24c>
- MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TPL, pTxConfig->PayloadLen);
- 80017c0: 68df ldr r7, [r3, #12]
- 80017c2: 4e19 ldr r6, [pc, #100] @ (8001828 <ETH_Prepare_Tx_Descriptors+0x360>)
- 80017c4: 403e ands r6, r7
- 80017c6: 69cf ldr r7, [r1, #28]
- 80017c8: 433e orrs r6, r7
- 80017ca: 60de str r6, [r3, #12]
- SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TSE);
- 80017cc: 68de ldr r6, [r3, #12]
- 80017ce: f446 2680 orr.w r6, r6, #262144 @ 0x40000
- 80017d2: 60de str r6, [r3, #12]
- 80017d4: e7ae b.n 8001734 <ETH_Prepare_Tx_Descriptors+0x26c>
- }
- if (ItMode != ((uint32_t)RESET))
- 80017d6: f1b8 0f00 cmp.w r8, #0
- 80017da: d015 beq.n 8001808 <ETH_Prepare_Tx_Descriptors+0x340>
- {
- /* Set Interrupt on completion bit */
- SET_BIT(dmatxdesc->DESC2, ETH_DMATXNDESCRF_IOC);
- 80017dc: 689a ldr r2, [r3, #8]
- 80017de: f042 4200 orr.w r2, r2, #2147483648 @ 0x80000000
- 80017e2: 609a str r2, [r3, #8]
- /* Clear Interrupt on completion bit */
- CLEAR_BIT(dmatxdesc->DESC2, ETH_DMATXNDESCRF_IOC);
- }
- /* Mark it as LAST descriptor */
- SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_LD);
- 80017e4: 68da ldr r2, [r3, #12]
- 80017e6: f042 5280 orr.w r2, r2, #268435456 @ 0x10000000
- 80017ea: 60da str r2, [r3, #12]
- /* Save the current packet address to expose it to the application */
- dmatxdesclist->PacketAddress[descidx] = dmatxdesclist->CurrentPacketAddress;
- 80017ec: 6bc2 ldr r2, [r0, #60] @ 0x3c
- 80017ee: 1d33 adds r3, r6, #4
- 80017f0: eb00 0383 add.w r3, r0, r3, lsl #2
- 80017f4: 61da str r2, [r3, #28]
- dmatxdesclist->CurTxDesc = descidx;
- 80017f6: 6286 str r6, [r0, #40] @ 0x28
- __ASM volatile ("cpsid i" : : : "memory");
- 80017f8: b672 cpsid i
- /* disable the interrupt */
- __disable_irq();
- dmatxdesclist->BuffersInUse += bd_count + 1U;
- 80017fa: 6c03 ldr r3, [r0, #64] @ 0x40
- 80017fc: 442b add r3, r5
- 80017fe: 3301 adds r3, #1
- 8001800: 6403 str r3, [r0, #64] @ 0x40
- __ASM volatile ("cpsie i" : : : "memory");
- 8001802: b662 cpsie i
- /* Enable interrupts back */
- __enable_irq();
- /* Return function status */
- return HAL_ETH_ERROR_NONE;
- 8001804: 2000 movs r0, #0
- 8001806: e007 b.n 8001818 <ETH_Prepare_Tx_Descriptors+0x350>
- CLEAR_BIT(dmatxdesc->DESC2, ETH_DMATXNDESCRF_IOC);
- 8001808: 689a ldr r2, [r3, #8]
- 800180a: f022 4200 bic.w r2, r2, #2147483648 @ 0x80000000
- 800180e: 609a str r2, [r3, #8]
- 8001810: e7e8 b.n 80017e4 <ETH_Prepare_Tx_Descriptors+0x31c>
- return HAL_ETH_ERROR_BUSY;
- 8001812: 2002 movs r0, #2
- 8001814: e000 b.n 8001818 <ETH_Prepare_Tx_Descriptors+0x350>
- 8001816: 2002 movs r0, #2
- }
- 8001818: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- 800181c: ffff8000 .word 0xffff8000
- 8001820: ffffc000 .word 0xffffc000
- 8001824: c000ffff .word 0xc000ffff
- 8001828: fffc0000 .word 0xfffc0000
- 0800182c <HAL_ETH_Start_IT>:
- {
- 800182c: b538 push {r3, r4, r5, lr}
- if (heth->gState == HAL_ETH_STATE_READY)
- 800182e: f8d0 3084 ldr.w r3, [r0, #132] @ 0x84
- 8001832: 2b10 cmp r3, #16
- 8001834: d001 beq.n 800183a <HAL_ETH_Start_IT+0xe>
- return HAL_ERROR;
- 8001836: 2001 movs r0, #1
- }
- 8001838: bd38 pop {r3, r4, r5, pc}
- 800183a: 4604 mov r4, r0
- heth->gState = HAL_ETH_STATE_BUSY;
- 800183c: 2523 movs r5, #35 @ 0x23
- 800183e: f8c0 5084 str.w r5, [r0, #132] @ 0x84
- heth->RxDescList.ItMode = 1U;
- 8001842: 2301 movs r3, #1
- 8001844: 6583 str r3, [r0, #88] @ 0x58
- SET_BIT(heth->Instance->MMCRIMR, ETH_MMCRIMR_RXLPITRCIM | ETH_MMCRIMR_RXLPIUSCIM | \
- 8001846: 6802 ldr r2, [r0, #0]
- 8001848: f8d2 170c ldr.w r1, [r2, #1804] @ 0x70c
- 800184c: 4b24 ldr r3, [pc, #144] @ (80018e0 <HAL_ETH_Start_IT+0xb4>)
- 800184e: 430b orrs r3, r1
- 8001850: f8c2 370c str.w r3, [r2, #1804] @ 0x70c
- SET_BIT(heth->Instance->MMCTIMR, ETH_MMCTIMR_TXLPITRCIM | ETH_MMCTIMR_TXLPIUSCIM | \
- 8001854: 6802 ldr r2, [r0, #0]
- 8001856: f8d2 1710 ldr.w r1, [r2, #1808] @ 0x710
- 800185a: 4b22 ldr r3, [pc, #136] @ (80018e4 <HAL_ETH_Start_IT+0xb8>)
- 800185c: 430b orrs r3, r1
- 800185e: f8c2 3710 str.w r3, [r2, #1808] @ 0x710
- heth->RxDescList.RxBuildDescCnt = ETH_RX_DESC_CNT;
- 8001862: 2304 movs r3, #4
- 8001864: 66c3 str r3, [r0, #108] @ 0x6c
- ETH_UpdateDescriptor(heth);
- 8001866: f7ff fbe7 bl 8001038 <ETH_UpdateDescriptor>
- SET_BIT(heth->Instance->MACCR, ETH_MACCR_TE);
- 800186a: 6822 ldr r2, [r4, #0]
- 800186c: 6813 ldr r3, [r2, #0]
- 800186e: f043 0302 orr.w r3, r3, #2
- 8001872: 6013 str r3, [r2, #0]
- SET_BIT(heth->Instance->MACCR, ETH_MACCR_RE);
- 8001874: 6822 ldr r2, [r4, #0]
- 8001876: 6813 ldr r3, [r2, #0]
- 8001878: f043 0301 orr.w r3, r3, #1
- 800187c: 6013 str r3, [r2, #0]
- SET_BIT(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_FTQ);
- 800187e: 6822 ldr r2, [r4, #0]
- 8001880: f8d2 3d00 ldr.w r3, [r2, #3328] @ 0xd00
- 8001884: f043 0301 orr.w r3, r3, #1
- 8001888: f8c2 3d00 str.w r3, [r2, #3328] @ 0xd00
- SET_BIT(heth->Instance->DMACTCR, ETH_DMACTCR_ST);
- 800188c: 6823 ldr r3, [r4, #0]
- 800188e: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 8001892: f8d3 2104 ldr.w r2, [r3, #260] @ 0x104
- 8001896: f042 0201 orr.w r2, r2, #1
- 800189a: f8c3 2104 str.w r2, [r3, #260] @ 0x104
- SET_BIT(heth->Instance->DMACRCR, ETH_DMACRCR_SR);
- 800189e: 6823 ldr r3, [r4, #0]
- 80018a0: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 80018a4: f8d3 2108 ldr.w r2, [r3, #264] @ 0x108
- 80018a8: f042 0201 orr.w r2, r2, #1
- 80018ac: f8c3 2108 str.w r2, [r3, #264] @ 0x108
- heth->Instance->DMACSR |= (ETH_DMACSR_TPS | ETH_DMACSR_RPS);
- 80018b0: 6823 ldr r3, [r4, #0]
- 80018b2: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 80018b6: f8d3 2160 ldr.w r2, [r3, #352] @ 0x160
- 80018ba: f442 7281 orr.w r2, r2, #258 @ 0x102
- 80018be: f8c3 2160 str.w r2, [r3, #352] @ 0x160
- __HAL_ETH_DMA_ENABLE_IT(heth, (ETH_DMACIER_NIE | ETH_DMACIER_RIE | ETH_DMACIER_TIE |
- 80018c2: 6823 ldr r3, [r4, #0]
- 80018c4: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 80018c8: f8d3 1134 ldr.w r1, [r3, #308] @ 0x134
- 80018cc: f24d 02c1 movw r2, #53441 @ 0xd0c1
- 80018d0: 430a orrs r2, r1
- 80018d2: f8c3 2134 str.w r2, [r3, #308] @ 0x134
- heth->gState = HAL_ETH_STATE_STARTED;
- 80018d6: f8c4 5084 str.w r5, [r4, #132] @ 0x84
- return HAL_OK;
- 80018da: 2000 movs r0, #0
- 80018dc: e7ac b.n 8001838 <HAL_ETH_Start_IT+0xc>
- 80018de: bf00 nop
- 80018e0: 0c020060 .word 0x0c020060
- 80018e4: 0c20c000 .word 0x0c20c000
- 080018e8 <HAL_ETH_Stop_IT>:
- if (heth->gState == HAL_ETH_STATE_STARTED)
- 80018e8: f8d0 3084 ldr.w r3, [r0, #132] @ 0x84
- 80018ec: 2b23 cmp r3, #35 @ 0x23
- 80018ee: d001 beq.n 80018f4 <HAL_ETH_Stop_IT+0xc>
- return HAL_ERROR;
- 80018f0: 2001 movs r0, #1
- }
- 80018f2: 4770 bx lr
- heth->gState = HAL_ETH_STATE_BUSY;
- 80018f4: f8c0 3084 str.w r3, [r0, #132] @ 0x84
- __HAL_ETH_DMA_DISABLE_IT(heth, (ETH_DMACIER_NIE | ETH_DMACIER_RIE | ETH_DMACIER_TIE |
- 80018f8: 6803 ldr r3, [r0, #0]
- 80018fa: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 80018fe: f8d3 1134 ldr.w r1, [r3, #308] @ 0x134
- 8001902: 4a1d ldr r2, [pc, #116] @ (8001978 <HAL_ETH_Stop_IT+0x90>)
- 8001904: 400a ands r2, r1
- 8001906: f8c3 2134 str.w r2, [r3, #308] @ 0x134
- CLEAR_BIT(heth->Instance->DMACTCR, ETH_DMACTCR_ST);
- 800190a: 6803 ldr r3, [r0, #0]
- 800190c: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 8001910: f8d3 2104 ldr.w r2, [r3, #260] @ 0x104
- 8001914: f022 0201 bic.w r2, r2, #1
- 8001918: f8c3 2104 str.w r2, [r3, #260] @ 0x104
- CLEAR_BIT(heth->Instance->DMACRCR, ETH_DMACRCR_SR);
- 800191c: 6803 ldr r3, [r0, #0]
- 800191e: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 8001922: f8d3 2108 ldr.w r2, [r3, #264] @ 0x108
- 8001926: f022 0201 bic.w r2, r2, #1
- 800192a: f8c3 2108 str.w r2, [r3, #264] @ 0x108
- CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_RE);
- 800192e: 6802 ldr r2, [r0, #0]
- 8001930: 6813 ldr r3, [r2, #0]
- 8001932: f023 0301 bic.w r3, r3, #1
- 8001936: 6013 str r3, [r2, #0]
- SET_BIT(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_FTQ);
- 8001938: 6802 ldr r2, [r0, #0]
- 800193a: f8d2 3d00 ldr.w r3, [r2, #3328] @ 0xd00
- 800193e: f043 0301 orr.w r3, r3, #1
- 8001942: f8c2 3d00 str.w r3, [r2, #3328] @ 0xd00
- CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_TE);
- 8001946: 6802 ldr r2, [r0, #0]
- 8001948: 6813 ldr r3, [r2, #0]
- 800194a: f023 0302 bic.w r3, r3, #2
- 800194e: 6013 str r3, [r2, #0]
- for (descindex = 0; descindex < (uint32_t)ETH_RX_DESC_CNT; descindex++)
- 8001950: 2300 movs r3, #0
- 8001952: e008 b.n 8001966 <HAL_ETH_Stop_IT+0x7e>
- dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descindex];
- 8001954: f103 0212 add.w r2, r3, #18
- 8001958: f850 1022 ldr.w r1, [r0, r2, lsl #2]
- CLEAR_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCRF_IOC);
- 800195c: 68ca ldr r2, [r1, #12]
- 800195e: f022 4280 bic.w r2, r2, #1073741824 @ 0x40000000
- 8001962: 60ca str r2, [r1, #12]
- for (descindex = 0; descindex < (uint32_t)ETH_RX_DESC_CNT; descindex++)
- 8001964: 3301 adds r3, #1
- 8001966: 2b03 cmp r3, #3
- 8001968: d9f4 bls.n 8001954 <HAL_ETH_Stop_IT+0x6c>
- heth->RxDescList.ItMode = 0U;
- 800196a: 2300 movs r3, #0
- 800196c: 6583 str r3, [r0, #88] @ 0x58
- heth->gState = HAL_ETH_STATE_READY;
- 800196e: 2210 movs r2, #16
- 8001970: f8c0 2084 str.w r2, [r0, #132] @ 0x84
- return HAL_OK;
- 8001974: 4618 mov r0, r3
- 8001976: 4770 bx lr
- 8001978: ffff2f3e .word 0xffff2f3e
- 0800197c <HAL_ETH_Transmit_IT>:
- {
- 800197c: b510 push {r4, lr}
- 800197e: 4604 mov r4, r0
- if (pTxConfig == NULL)
- 8001980: b129 cbz r1, 800198e <HAL_ETH_Transmit_IT+0x12>
- if (heth->gState == HAL_ETH_STATE_STARTED)
- 8001982: f8d4 3084 ldr.w r3, [r4, #132] @ 0x84
- 8001986: 2b23 cmp r3, #35 @ 0x23
- 8001988: d009 beq.n 800199e <HAL_ETH_Transmit_IT+0x22>
- return HAL_ERROR;
- 800198a: 2001 movs r0, #1
- }
- 800198c: bd10 pop {r4, pc}
- heth->ErrorCode |= HAL_ETH_ERROR_PARAM;
- 800198e: f8d0 3088 ldr.w r3, [r0, #136] @ 0x88
- 8001992: f043 0301 orr.w r3, r3, #1
- 8001996: f8c0 3088 str.w r3, [r0, #136] @ 0x88
- return HAL_ERROR;
- 800199a: 2001 movs r0, #1
- 800199c: e7f6 b.n 800198c <HAL_ETH_Transmit_IT+0x10>
- heth->TxDescList.CurrentPacketAddress = (uint32_t *)pTxConfig->pData;
- 800199e: 6b4b ldr r3, [r1, #52] @ 0x34
- 80019a0: 63e3 str r3, [r4, #60] @ 0x3c
- if (ETH_Prepare_Tx_Descriptors(heth, pTxConfig, 1) != HAL_ETH_ERROR_NONE)
- 80019a2: 2201 movs r2, #1
- 80019a4: 4620 mov r0, r4
- 80019a6: f7ff fd8f bl 80014c8 <ETH_Prepare_Tx_Descriptors>
- 80019aa: b138 cbz r0, 80019bc <HAL_ETH_Transmit_IT+0x40>
- heth->ErrorCode |= HAL_ETH_ERROR_BUSY;
- 80019ac: f8d4 3088 ldr.w r3, [r4, #136] @ 0x88
- 80019b0: f043 0302 orr.w r3, r3, #2
- 80019b4: f8c4 3088 str.w r3, [r4, #136] @ 0x88
- return HAL_ERROR;
- 80019b8: 2001 movs r0, #1
- 80019ba: e7e7 b.n 800198c <HAL_ETH_Transmit_IT+0x10>
- __ASM volatile ("dsb 0xF":::"memory");
- 80019bc: f3bf 8f4f dsb sy
- INCR_TX_DESC_INDEX(heth->TxDescList.CurTxDesc, 1U);
- 80019c0: 6aa3 ldr r3, [r4, #40] @ 0x28
- 80019c2: 1c5a adds r2, r3, #1
- 80019c4: 62a2 str r2, [r4, #40] @ 0x28
- 80019c6: 2a03 cmp r2, #3
- 80019c8: d901 bls.n 80019ce <HAL_ETH_Transmit_IT+0x52>
- 80019ca: 3b03 subs r3, #3
- 80019cc: 62a3 str r3, [r4, #40] @ 0x28
- WRITE_REG(heth->Instance->DMACTDTPR, (uint32_t)(heth->TxDescList.TxDesc[heth->TxDescList.CurTxDesc]));
- 80019ce: 6aa2 ldr r2, [r4, #40] @ 0x28
- 80019d0: 6823 ldr r3, [r4, #0]
- 80019d2: 3206 adds r2, #6
- 80019d4: f854 2022 ldr.w r2, [r4, r2, lsl #2]
- 80019d8: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 80019dc: f8c3 2120 str.w r2, [r3, #288] @ 0x120
- return HAL_OK;
- 80019e0: 2000 movs r0, #0
- 80019e2: e7d3 b.n 800198c <HAL_ETH_Transmit_IT+0x10>
- 080019e4 <HAL_ETH_ReadData>:
- {
- 80019e4: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 80019e8: 4604 mov r4, r0
- if (pAppBuff == NULL)
- 80019ea: b189 cbz r1, 8001a10 <HAL_ETH_ReadData+0x2c>
- 80019ec: 468b mov fp, r1
- if (heth->gState != HAL_ETH_STATE_STARTED)
- 80019ee: f8d0 3084 ldr.w r3, [r0, #132] @ 0x84
- 80019f2: 2b23 cmp r3, #35 @ 0x23
- 80019f4: d172 bne.n 8001adc <HAL_ETH_ReadData+0xf8>
- descidx = heth->RxDescList.RxDescIdx;
- 80019f6: f8d0 805c ldr.w r8, [r0, #92] @ 0x5c
- dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
- 80019fa: f108 0312 add.w r3, r8, #18
- 80019fe: f850 5023 ldr.w r5, [r0, r3, lsl #2]
- desccntmax = ETH_RX_DESC_CNT - heth->RxDescList.RxBuildDescCnt;
- 8001a02: 6ec3 ldr r3, [r0, #108] @ 0x6c
- 8001a04: f1c3 0a04 rsb sl, r3, #4
- uint8_t rxdataready = 0U;
- 8001a08: f04f 0900 mov.w r9, #0
- uint32_t desccnt = 0U;
- 8001a0c: 464f mov r7, r9
- while ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_OWN) == (uint32_t)RESET) && (desccnt < desccntmax)
- 8001a0e: e038 b.n 8001a82 <HAL_ETH_ReadData+0x9e>
- heth->ErrorCode |= HAL_ETH_ERROR_PARAM;
- 8001a10: f8d0 3088 ldr.w r3, [r0, #136] @ 0x88
- 8001a14: f043 0301 orr.w r3, r3, #1
- 8001a18: f8c0 3088 str.w r3, [r0, #136] @ 0x88
- return HAL_ERROR;
- 8001a1c: 2001 movs r0, #1
- 8001a1e: e05e b.n 8001ade <HAL_ETH_ReadData+0xfa>
- if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_FD) != (uint32_t)RESET)
- 8001a20: 68eb ldr r3, [r5, #12]
- 8001a22: f013 5f00 tst.w r3, #536870912 @ 0x20000000
- 8001a26: d002 beq.n 8001a2e <HAL_ETH_ReadData+0x4a>
- heth->RxDescList.RxDescCnt = 0;
- 8001a28: 2300 movs r3, #0
- 8001a2a: 6623 str r3, [r4, #96] @ 0x60
- heth->RxDescList.RxDataLength = 0;
- 8001a2c: 6663 str r3, [r4, #100] @ 0x64
- bufflength = heth->Init.RxBuffLen;
- 8001a2e: 6966 ldr r6, [r4, #20]
- if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_LD) != (uint32_t)RESET)
- 8001a30: 68eb ldr r3, [r5, #12]
- 8001a32: f013 5f80 tst.w r3, #268435456 @ 0x10000000
- 8001a36: d008 beq.n 8001a4a <HAL_ETH_ReadData+0x66>
- bufflength = READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_PL) - heth->RxDescList.RxDataLength;
- 8001a38: 68ee ldr r6, [r5, #12]
- 8001a3a: f3c6 060e ubfx r6, r6, #0, #15
- 8001a3e: 6e63 ldr r3, [r4, #100] @ 0x64
- 8001a40: 1af6 subs r6, r6, r3
- heth->RxDescList.pRxLastRxDesc = dmarxdesc->DESC3;
- 8001a42: 68eb ldr r3, [r5, #12]
- 8001a44: 6723 str r3, [r4, #112] @ 0x70
- rxdataready = 1;
- 8001a46: f04f 0901 mov.w r9, #1
- HAL_ETH_RxLinkCallback(&heth->RxDescList.pRxStart, &heth->RxDescList.pRxEnd,
- 8001a4a: b2b3 uxth r3, r6
- 8001a4c: 692a ldr r2, [r5, #16]
- 8001a4e: f104 0180 add.w r1, r4, #128 @ 0x80
- 8001a52: f104 007c add.w r0, r4, #124 @ 0x7c
- 8001a56: f002 f80b bl 8003a70 <HAL_ETH_RxLinkCallback>
- heth->RxDescList.RxDescCnt++;
- 8001a5a: 6e23 ldr r3, [r4, #96] @ 0x60
- 8001a5c: 3301 adds r3, #1
- 8001a5e: 6623 str r3, [r4, #96] @ 0x60
- heth->RxDescList.RxDataLength += bufflength;
- 8001a60: 6e63 ldr r3, [r4, #100] @ 0x64
- 8001a62: 4433 add r3, r6
- 8001a64: 6663 str r3, [r4, #100] @ 0x64
- dmarxdesc->BackupAddr0 = 0;
- 8001a66: 2300 movs r3, #0
- 8001a68: 612b str r3, [r5, #16]
- INCR_RX_DESC_INDEX(descidx, 1U);
- 8001a6a: f108 0301 add.w r3, r8, #1
- 8001a6e: 2b03 cmp r3, #3
- 8001a70: d901 bls.n 8001a76 <HAL_ETH_ReadData+0x92>
- 8001a72: f1a8 0303 sub.w r3, r8, #3
- dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
- 8001a76: f103 0212 add.w r2, r3, #18
- 8001a7a: f854 5022 ldr.w r5, [r4, r2, lsl #2]
- desccnt++;
- 8001a7e: 3701 adds r7, #1
- 8001a80: 4698 mov r8, r3
- while ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_OWN) == (uint32_t)RESET) && (desccnt < desccntmax)
- 8001a82: 68eb ldr r3, [r5, #12]
- && (rxdataready == 0U))
- 8001a84: 2b00 cmp r3, #0
- 8001a86: db14 blt.n 8001ab2 <HAL_ETH_ReadData+0xce>
- 8001a88: f089 0301 eor.w r3, r9, #1
- 8001a8c: 4557 cmp r7, sl
- 8001a8e: d210 bcs.n 8001ab2 <HAL_ETH_ReadData+0xce>
- 8001a90: b17b cbz r3, 8001ab2 <HAL_ETH_ReadData+0xce>
- if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_CTXT) != (uint32_t)RESET)
- 8001a92: 68eb ldr r3, [r5, #12]
- 8001a94: f013 4f80 tst.w r3, #1073741824 @ 0x40000000
- 8001a98: d003 beq.n 8001aa2 <HAL_ETH_ReadData+0xbe>
- heth->RxDescList.TimeStamp.TimeStampHigh = dmarxdesc->DESC1;
- 8001a9a: 686b ldr r3, [r5, #4]
- 8001a9c: 67a3 str r3, [r4, #120] @ 0x78
- heth->RxDescList.TimeStamp.TimeStampLow = dmarxdesc->DESC0;
- 8001a9e: 682b ldr r3, [r5, #0]
- 8001aa0: 6763 str r3, [r4, #116] @ 0x74
- if ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_FD) != (uint32_t)RESET) || (heth->RxDescList.pRxStart != NULL))
- 8001aa2: 68eb ldr r3, [r5, #12]
- 8001aa4: f013 5f00 tst.w r3, #536870912 @ 0x20000000
- 8001aa8: d1ba bne.n 8001a20 <HAL_ETH_ReadData+0x3c>
- 8001aaa: 6fe3 ldr r3, [r4, #124] @ 0x7c
- 8001aac: 2b00 cmp r3, #0
- 8001aae: d1b7 bne.n 8001a20 <HAL_ETH_ReadData+0x3c>
- 8001ab0: e7db b.n 8001a6a <HAL_ETH_ReadData+0x86>
- heth->RxDescList.RxBuildDescCnt += desccnt;
- 8001ab2: 6ee3 ldr r3, [r4, #108] @ 0x6c
- 8001ab4: 443b add r3, r7
- 8001ab6: 66e3 str r3, [r4, #108] @ 0x6c
- if ((heth->RxDescList.RxBuildDescCnt) != 0U)
- 8001ab8: b933 cbnz r3, 8001ac8 <HAL_ETH_ReadData+0xe4>
- heth->RxDescList.RxDescIdx = descidx;
- 8001aba: f8c4 805c str.w r8, [r4, #92] @ 0x5c
- if (rxdataready == 1U)
- 8001abe: f1b9 0f00 cmp.w r9, #0
- 8001ac2: d105 bne.n 8001ad0 <HAL_ETH_ReadData+0xec>
- return HAL_ERROR;
- 8001ac4: 2001 movs r0, #1
- 8001ac6: e00a b.n 8001ade <HAL_ETH_ReadData+0xfa>
- ETH_UpdateDescriptor(heth);
- 8001ac8: 4620 mov r0, r4
- 8001aca: f7ff fab5 bl 8001038 <ETH_UpdateDescriptor>
- 8001ace: e7f4 b.n 8001aba <HAL_ETH_ReadData+0xd6>
- *pAppBuff = heth->RxDescList.pRxStart;
- 8001ad0: 6fe3 ldr r3, [r4, #124] @ 0x7c
- 8001ad2: f8cb 3000 str.w r3, [fp]
- heth->RxDescList.pRxStart = NULL;
- 8001ad6: 2000 movs r0, #0
- 8001ad8: 67e0 str r0, [r4, #124] @ 0x7c
- return HAL_OK;
- 8001ada: e000 b.n 8001ade <HAL_ETH_ReadData+0xfa>
- return HAL_ERROR;
- 8001adc: 2001 movs r0, #1
- }
- 8001ade: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
- 08001ae2 <HAL_ETH_ReleaseTxPacket>:
- {
- 8001ae2: b5f8 push {r3, r4, r5, r6, r7, lr}
- 8001ae4: 4606 mov r6, r0
- uint32_t numOfBuf = dmatxdesclist->BuffersInUse;
- 8001ae6: 6c05 ldr r5, [r0, #64] @ 0x40
- uint32_t idx = dmatxdesclist->releaseIndex;
- 8001ae8: 6c44 ldr r4, [r0, #68] @ 0x44
- uint8_t pktTxStatus = 1U;
- 8001aea: 2701 movs r7, #1
- while ((numOfBuf != 0U) && (pktTxStatus != 0U))
- 8001aec: e002 b.n 8001af4 <HAL_ETH_ReleaseTxPacket+0x12>
- idx = (idx + 1U) & (ETH_TX_DESC_CNT - 1U);
- 8001aee: 3401 adds r4, #1
- 8001af0: f004 0403 and.w r4, r4, #3
- while ((numOfBuf != 0U) && (pktTxStatus != 0U))
- 8001af4: b1f5 cbz r5, 8001b34 <HAL_ETH_ReleaseTxPacket+0x52>
- 8001af6: b1ef cbz r7, 8001b34 <HAL_ETH_ReleaseTxPacket+0x52>
- numOfBuf--;
- 8001af8: 3d01 subs r5, #1
- if (dmatxdesclist->PacketAddress[idx] == NULL)
- 8001afa: 1d23 adds r3, r4, #4
- 8001afc: eb06 0383 add.w r3, r6, r3, lsl #2
- 8001b00: 69d8 ldr r0, [r3, #28]
- 8001b02: 2800 cmp r0, #0
- 8001b04: d0f3 beq.n 8001aee <HAL_ETH_ReleaseTxPacket+0xc>
- if ((heth->Init.TxDesc[idx].DESC3 & ETH_DMATXNDESCRF_OWN) == 0U)
- 8001b06: 68f3 ldr r3, [r6, #12]
- 8001b08: eb04 0244 add.w r2, r4, r4, lsl #1
- 8001b0c: eb03 03c2 add.w r3, r3, r2, lsl #3
- 8001b10: 68db ldr r3, [r3, #12]
- 8001b12: 2b00 cmp r3, #0
- 8001b14: da01 bge.n 8001b1a <HAL_ETH_ReleaseTxPacket+0x38>
- pktTxStatus = 0U;
- 8001b16: 2700 movs r7, #0
- 8001b18: e7ec b.n 8001af4 <HAL_ETH_ReleaseTxPacket+0x12>
- HAL_ETH_TxFreeCallback(dmatxdesclist->PacketAddress[idx]);
- 8001b1a: f001 ffd9 bl 8003ad0 <HAL_ETH_TxFreeCallback>
- dmatxdesclist->PacketAddress[idx] = NULL;
- 8001b1e: 1d23 adds r3, r4, #4
- 8001b20: eb06 0383 add.w r3, r6, r3, lsl #2
- 8001b24: 2200 movs r2, #0
- 8001b26: 61da str r2, [r3, #28]
- idx = (idx + 1U) & (ETH_TX_DESC_CNT - 1U);
- 8001b28: 3401 adds r4, #1
- 8001b2a: f004 0403 and.w r4, r4, #3
- dmatxdesclist->BuffersInUse = numOfBuf;
- 8001b2e: 6435 str r5, [r6, #64] @ 0x40
- dmatxdesclist->releaseIndex = idx;
- 8001b30: 6474 str r4, [r6, #68] @ 0x44
- 8001b32: e7df b.n 8001af4 <HAL_ETH_ReleaseTxPacket+0x12>
- }
- 8001b34: 2000 movs r0, #0
- 8001b36: bdf8 pop {r3, r4, r5, r6, r7, pc}
- 08001b38 <HAL_ETH_PMTCallback>:
- }
- 8001b38: 4770 bx lr
- 08001b3a <HAL_ETH_EEECallback>:
- }
- 8001b3a: 4770 bx lr
- 08001b3c <HAL_ETH_WakeUpCallback>:
- }
- 8001b3c: 4770 bx lr
- 08001b3e <HAL_ETH_IRQHandler>:
- {
- 8001b3e: b510 push {r4, lr}
- 8001b40: 4604 mov r4, r0
- if (__HAL_ETH_DMA_GET_IT(heth, ETH_DMACSR_RI))
- 8001b42: 6803 ldr r3, [r0, #0]
- 8001b44: f503 5280 add.w r2, r3, #4096 @ 0x1000
- 8001b48: f8d2 2160 ldr.w r2, [r2, #352] @ 0x160
- 8001b4c: f012 0f40 tst.w r2, #64 @ 0x40
- 8001b50: d006 beq.n 8001b60 <HAL_ETH_IRQHandler+0x22>
- if (__HAL_ETH_DMA_GET_IT_SOURCE(heth, ETH_DMACIER_RIE))
- 8001b52: f503 5280 add.w r2, r3, #4096 @ 0x1000
- 8001b56: f8d2 2134 ldr.w r2, [r2, #308] @ 0x134
- 8001b5a: f012 0f40 tst.w r2, #64 @ 0x40
- 8001b5e: d160 bne.n 8001c22 <HAL_ETH_IRQHandler+0xe4>
- if (__HAL_ETH_DMA_GET_IT(heth, ETH_DMACSR_TI))
- 8001b60: 6823 ldr r3, [r4, #0]
- 8001b62: f503 5280 add.w r2, r3, #4096 @ 0x1000
- 8001b66: f8d2 2160 ldr.w r2, [r2, #352] @ 0x160
- 8001b6a: f012 0f01 tst.w r2, #1
- 8001b6e: d006 beq.n 8001b7e <HAL_ETH_IRQHandler+0x40>
- if (__HAL_ETH_DMA_GET_IT_SOURCE(heth, ETH_DMACIER_TIE))
- 8001b70: f503 5280 add.w r2, r3, #4096 @ 0x1000
- 8001b74: f8d2 2134 ldr.w r2, [r2, #308] @ 0x134
- 8001b78: f012 0f01 tst.w r2, #1
- 8001b7c: d15a bne.n 8001c34 <HAL_ETH_IRQHandler+0xf6>
- if (__HAL_ETH_DMA_GET_IT(heth, ETH_DMACSR_AIS))
- 8001b7e: 6823 ldr r3, [r4, #0]
- 8001b80: f503 5280 add.w r2, r3, #4096 @ 0x1000
- 8001b84: f8d2 2160 ldr.w r2, [r2, #352] @ 0x160
- 8001b88: f412 4f80 tst.w r2, #16384 @ 0x4000
- 8001b8c: d02b beq.n 8001be6 <HAL_ETH_IRQHandler+0xa8>
- if (__HAL_ETH_DMA_GET_IT_SOURCE(heth, ETH_DMACIER_AIE))
- 8001b8e: f503 5280 add.w r2, r3, #4096 @ 0x1000
- 8001b92: f8d2 2134 ldr.w r2, [r2, #308] @ 0x134
- 8001b96: f412 4f80 tst.w r2, #16384 @ 0x4000
- 8001b9a: d024 beq.n 8001be6 <HAL_ETH_IRQHandler+0xa8>
- heth->ErrorCode |= HAL_ETH_ERROR_DMA;
- 8001b9c: f8d4 2088 ldr.w r2, [r4, #136] @ 0x88
- 8001ba0: f042 0208 orr.w r2, r2, #8
- 8001ba4: f8c4 2088 str.w r2, [r4, #136] @ 0x88
- if (__HAL_ETH_DMA_GET_IT(heth, ETH_DMACSR_FBE))
- 8001ba8: f503 5280 add.w r2, r3, #4096 @ 0x1000
- 8001bac: f8d2 2160 ldr.w r2, [r2, #352] @ 0x160
- 8001bb0: f412 5f80 tst.w r2, #4096 @ 0x1000
- 8001bb4: d048 beq.n 8001c48 <HAL_ETH_IRQHandler+0x10a>
- heth->DMAErrorCode = READ_BIT(heth->Instance->DMACSR, (ETH_DMACSR_FBE | ETH_DMACSR_TPS | ETH_DMACSR_RPS));
- 8001bb6: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 8001bba: f8d3 2160 ldr.w r2, [r3, #352] @ 0x160
- 8001bbe: f422 626f bic.w r2, r2, #3824 @ 0xef0
- 8001bc2: f022 020d bic.w r2, r2, #13
- 8001bc6: 04d2 lsls r2, r2, #19
- 8001bc8: 0cd2 lsrs r2, r2, #19
- 8001bca: f8c4 208c str.w r2, [r4, #140] @ 0x8c
- __HAL_ETH_DMA_DISABLE_IT(heth, ETH_DMACIER_NIE | ETH_DMACIER_AIE);
- 8001bce: f8d3 2134 ldr.w r2, [r3, #308] @ 0x134
- 8001bd2: f422 4240 bic.w r2, r2, #49152 @ 0xc000
- 8001bd6: f8c3 2134 str.w r2, [r3, #308] @ 0x134
- heth->gState = HAL_ETH_STATE_ERROR;
- 8001bda: 23e0 movs r3, #224 @ 0xe0
- 8001bdc: f8c4 3084 str.w r3, [r4, #132] @ 0x84
- HAL_ETH_ErrorCallback(heth);
- 8001be0: 4620 mov r0, r4
- 8001be2: f001 fd37 bl 8003654 <HAL_ETH_ErrorCallback>
- macirqenable = heth->Instance->MACIER;
- 8001be6: 6823 ldr r3, [r4, #0]
- 8001be8: f8d3 20b4 ldr.w r2, [r3, #180] @ 0xb4
- if (((macirqenable & ETH_MACIER_RXSTSIE) == ETH_MACIER_RXSTSIE) || \
- 8001bec: f412 4fc0 tst.w r2, #24576 @ 0x6000
- 8001bf0: d137 bne.n 8001c62 <HAL_ETH_IRQHandler+0x124>
- if (__HAL_ETH_MAC_GET_IT(heth, ETH_MAC_PMT_IT))
- 8001bf2: 6823 ldr r3, [r4, #0]
- 8001bf4: f8d3 20b0 ldr.w r2, [r3, #176] @ 0xb0
- 8001bf8: f012 0f10 tst.w r2, #16
- 8001bfc: d145 bne.n 8001c8a <HAL_ETH_IRQHandler+0x14c>
- if (__HAL_ETH_MAC_GET_IT(heth, ETH_MAC_LPI_IT))
- 8001bfe: 6823 ldr r3, [r4, #0]
- 8001c00: f8d3 20b0 ldr.w r2, [r3, #176] @ 0xb0
- 8001c04: f012 0f20 tst.w r2, #32
- 8001c08: d14c bne.n 8001ca4 <HAL_ETH_IRQHandler+0x166>
- if (HAL_GetCurrentCPUID() == CM7_CPUID)
- 8001c0a: f7ff fa09 bl 8001020 <HAL_GetCurrentCPUID>
- 8001c0e: 2803 cmp r0, #3
- 8001c10: d055 beq.n 8001cbe <HAL_ETH_IRQHandler+0x180>
- if (__HAL_ETH_WAKEUP_EXTID2_GET_FLAG(ETH_WAKEUP_EXTI_LINE) != (uint32_t)RESET)
- 8001c12: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000
- 8001c16: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8
- 8001c1a: f413 0f80 tst.w r3, #4194304 @ 0x400000
- 8001c1e: d15f bne.n 8001ce0 <HAL_ETH_IRQHandler+0x1a2>
- }
- 8001c20: bd10 pop {r4, pc}
- __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMACSR_RI | ETH_DMACSR_NIS);
- 8001c22: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 8001c26: f248 0240 movw r2, #32832 @ 0x8040
- 8001c2a: f8c3 2160 str.w r2, [r3, #352] @ 0x160
- HAL_ETH_RxCpltCallback(heth);
- 8001c2e: f001 fd01 bl 8003634 <HAL_ETH_RxCpltCallback>
- 8001c32: e795 b.n 8001b60 <HAL_ETH_IRQHandler+0x22>
- __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMACSR_TI | ETH_DMACSR_NIS);
- 8001c34: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 8001c38: f248 0201 movw r2, #32769 @ 0x8001
- 8001c3c: f8c3 2160 str.w r2, [r3, #352] @ 0x160
- HAL_ETH_TxCpltCallback(heth);
- 8001c40: 4620 mov r0, r4
- 8001c42: f001 fcff bl 8003644 <HAL_ETH_TxCpltCallback>
- 8001c46: e79a b.n 8001b7e <HAL_ETH_IRQHandler+0x40>
- heth->DMAErrorCode = READ_BIT(heth->Instance->DMACSR, (ETH_DMACSR_CDE | ETH_DMACSR_ETI | ETH_DMACSR_RWT |
- 8001c48: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 8001c4c: f8d3 2160 ldr.w r2, [r3, #352] @ 0x160
- 8001c50: f402 42cd and.w r2, r2, #26240 @ 0x6680
- 8001c54: f8c4 208c str.w r2, [r4, #140] @ 0x8c
- __HAL_ETH_DMA_CLEAR_IT(heth, (ETH_DMACSR_CDE | ETH_DMACSR_ETI | ETH_DMACSR_RWT |
- 8001c58: f44f 42cd mov.w r2, #26240 @ 0x6680
- 8001c5c: f8c3 2160 str.w r2, [r3, #352] @ 0x160
- 8001c60: e7be b.n 8001be0 <HAL_ETH_IRQHandler+0xa2>
- heth->ErrorCode |= HAL_ETH_ERROR_MAC;
- 8001c62: f8d4 2088 ldr.w r2, [r4, #136] @ 0x88
- 8001c66: f042 0210 orr.w r2, r2, #16
- 8001c6a: f8c4 2088 str.w r2, [r4, #136] @ 0x88
- heth->MACErrorCode = READ_REG(heth->Instance->MACRXTXSR);
- 8001c6e: f8d3 30b8 ldr.w r3, [r3, #184] @ 0xb8
- 8001c72: f8c4 3090 str.w r3, [r4, #144] @ 0x90
- heth->gState = HAL_ETH_STATE_ERROR;
- 8001c76: 23e0 movs r3, #224 @ 0xe0
- 8001c78: f8c4 3084 str.w r3, [r4, #132] @ 0x84
- HAL_ETH_ErrorCallback(heth);
- 8001c7c: 4620 mov r0, r4
- 8001c7e: f001 fce9 bl 8003654 <HAL_ETH_ErrorCallback>
- heth->MACErrorCode = (uint32_t)(0x0U);
- 8001c82: 2300 movs r3, #0
- 8001c84: f8c4 3090 str.w r3, [r4, #144] @ 0x90
- 8001c88: e7b3 b.n 8001bf2 <HAL_ETH_IRQHandler+0xb4>
- heth->MACWakeUpEvent = READ_BIT(heth->Instance->MACPCSR, (ETH_MACPCSR_RWKPRCVD | ETH_MACPCSR_MGKPRCVD));
- 8001c8a: f8d3 30c0 ldr.w r3, [r3, #192] @ 0xc0
- 8001c8e: f003 0360 and.w r3, r3, #96 @ 0x60
- 8001c92: f8c4 3094 str.w r3, [r4, #148] @ 0x94
- HAL_ETH_PMTCallback(heth);
- 8001c96: 4620 mov r0, r4
- 8001c98: f7ff ff4e bl 8001b38 <HAL_ETH_PMTCallback>
- heth->MACWakeUpEvent = (uint32_t)(0x0U);
- 8001c9c: 2300 movs r3, #0
- 8001c9e: f8c4 3094 str.w r3, [r4, #148] @ 0x94
- 8001ca2: e7ac b.n 8001bfe <HAL_ETH_IRQHandler+0xc0>
- heth->MACLPIEvent = READ_BIT(heth->Instance->MACPCSR, 0x0000000FU);
- 8001ca4: f8d3 30c0 ldr.w r3, [r3, #192] @ 0xc0
- 8001ca8: f003 030f and.w r3, r3, #15
- 8001cac: f8c4 3098 str.w r3, [r4, #152] @ 0x98
- HAL_ETH_EEECallback(heth);
- 8001cb0: 4620 mov r0, r4
- 8001cb2: f7ff ff42 bl 8001b3a <HAL_ETH_EEECallback>
- heth->MACLPIEvent = (uint32_t)(0x0U);
- 8001cb6: 2300 movs r3, #0
- 8001cb8: f8c4 3098 str.w r3, [r4, #152] @ 0x98
- 8001cbc: e7a5 b.n 8001c0a <HAL_ETH_IRQHandler+0xcc>
- if (__HAL_ETH_WAKEUP_EXTI_GET_FLAG(ETH_WAKEUP_EXTI_LINE) != (uint32_t)RESET)
- 8001cbe: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000
- 8001cc2: f8d3 30a8 ldr.w r3, [r3, #168] @ 0xa8
- 8001cc6: f413 0f80 tst.w r3, #4194304 @ 0x400000
- 8001cca: d0a9 beq.n 8001c20 <HAL_ETH_IRQHandler+0xe2>
- __HAL_ETH_WAKEUP_EXTI_CLEAR_FLAG(ETH_WAKEUP_EXTI_LINE);
- 8001ccc: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000
- 8001cd0: f44f 0280 mov.w r2, #4194304 @ 0x400000
- 8001cd4: f8c3 20a8 str.w r2, [r3, #168] @ 0xa8
- HAL_ETH_WakeUpCallback(heth);
- 8001cd8: 4620 mov r0, r4
- 8001cda: f7ff ff2f bl 8001b3c <HAL_ETH_WakeUpCallback>
- 8001cde: e79f b.n 8001c20 <HAL_ETH_IRQHandler+0xe2>
- __HAL_ETH_WAKEUP_EXTID2_CLEAR_FLAG(ETH_WAKEUP_EXTI_LINE);
- 8001ce0: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000
- 8001ce4: f44f 0280 mov.w r2, #4194304 @ 0x400000
- 8001ce8: f8c3 20e8 str.w r2, [r3, #232] @ 0xe8
- HAL_ETH_WakeUpCallback(heth);
- 8001cec: 4620 mov r0, r4
- 8001cee: f7ff ff25 bl 8001b3c <HAL_ETH_WakeUpCallback>
- }
- 8001cf2: e795 b.n 8001c20 <HAL_ETH_IRQHandler+0xe2>
- 08001cf4 <HAL_ETH_ReadPHYRegister>:
- {
- 8001cf4: b570 push {r4, r5, r6, lr}
- 8001cf6: 4604 mov r4, r0
- 8001cf8: 461d mov r5, r3
- if (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) != (uint32_t)RESET)
- 8001cfa: 6800 ldr r0, [r0, #0]
- 8001cfc: f8d0 3200 ldr.w r3, [r0, #512] @ 0x200
- 8001d00: f013 0f01 tst.w r3, #1
- 8001d04: d001 beq.n 8001d0a <HAL_ETH_ReadPHYRegister+0x16>
- return HAL_ERROR;
- 8001d06: 2001 movs r0, #1
- }
- 8001d08: bd70 pop {r4, r5, r6, pc}
- WRITE_REG(tmpreg, heth->Instance->MACMDIOAR);
- 8001d0a: f8d0 3200 ldr.w r3, [r0, #512] @ 0x200
- MODIFY_REG(tmpreg, ETH_MACMDIOAR_PA, (PHYAddr << 21));
- 8001d0e: f023 7378 bic.w r3, r3, #65011712 @ 0x3e00000
- 8001d12: ea43 5141 orr.w r1, r3, r1, lsl #21
- MODIFY_REG(tmpreg, ETH_MACMDIOAR_RDA, (PHYReg << 16));
- 8001d16: f421 13f8 bic.w r3, r1, #2031616 @ 0x1f0000
- 8001d1a: ea43 4202 orr.w r2, r3, r2, lsl #16
- SET_BIT(tmpreg, ETH_MACMDIOAR_MB);
- 8001d1e: f042 020d orr.w r2, r2, #13
- WRITE_REG(heth->Instance->MACMDIOAR, tmpreg);
- 8001d22: f8c0 2200 str.w r2, [r0, #512] @ 0x200
- tickstart = HAL_GetTick();
- 8001d26: f7ff f8b1 bl 8000e8c <HAL_GetTick>
- 8001d2a: 4606 mov r6, r0
- while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U)
- 8001d2c: 6822 ldr r2, [r4, #0]
- 8001d2e: f8d2 1200 ldr.w r1, [r2, #512] @ 0x200
- 8001d32: f011 0f01 tst.w r1, #1
- 8001d36: d007 beq.n 8001d48 <HAL_ETH_ReadPHYRegister+0x54>
- if (((HAL_GetTick() - tickstart) > ETH_MDIO_BUS_TIMEOUT))
- 8001d38: f7ff f8a8 bl 8000e8c <HAL_GetTick>
- 8001d3c: 1b82 subs r2, r0, r6
- 8001d3e: f5b2 7f7a cmp.w r2, #1000 @ 0x3e8
- 8001d42: d9f3 bls.n 8001d2c <HAL_ETH_ReadPHYRegister+0x38>
- return HAL_ERROR;
- 8001d44: 2001 movs r0, #1
- 8001d46: e7df b.n 8001d08 <HAL_ETH_ReadPHYRegister+0x14>
- WRITE_REG(*pRegValue, (uint16_t)heth->Instance->MACMDIODR);
- 8001d48: f8d2 3204 ldr.w r3, [r2, #516] @ 0x204
- 8001d4c: b29b uxth r3, r3
- 8001d4e: 602b str r3, [r5, #0]
- return HAL_OK;
- 8001d50: 2000 movs r0, #0
- 8001d52: e7d9 b.n 8001d08 <HAL_ETH_ReadPHYRegister+0x14>
- 08001d54 <HAL_ETH_WritePHYRegister>:
- {
- 8001d54: b538 push {r3, r4, r5, lr}
- 8001d56: 4604 mov r4, r0
- if (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) != (uint32_t)RESET)
- 8001d58: 6800 ldr r0, [r0, #0]
- 8001d5a: f8d0 5200 ldr.w r5, [r0, #512] @ 0x200
- 8001d5e: f015 0f01 tst.w r5, #1
- 8001d62: d001 beq.n 8001d68 <HAL_ETH_WritePHYRegister+0x14>
- return HAL_ERROR;
- 8001d64: 2001 movs r0, #1
- }
- 8001d66: bd38 pop {r3, r4, r5, pc}
- WRITE_REG(tmpreg, heth->Instance->MACMDIOAR);
- 8001d68: f8d0 0200 ldr.w r0, [r0, #512] @ 0x200
- MODIFY_REG(tmpreg, ETH_MACMDIOAR_PA, (PHYAddr << 21));
- 8001d6c: f020 7078 bic.w r0, r0, #65011712 @ 0x3e00000
- 8001d70: ea40 5141 orr.w r1, r0, r1, lsl #21
- MODIFY_REG(tmpreg, ETH_MACMDIOAR_RDA, (PHYReg << 16));
- 8001d74: f421 11f8 bic.w r1, r1, #2031616 @ 0x1f0000
- 8001d78: ea41 4202 orr.w r2, r1, r2, lsl #16
- MODIFY_REG(tmpreg, ETH_MACMDIOAR_MOC, ETH_MACMDIOAR_MOC_WR);
- 8001d7c: f022 020c bic.w r2, r2, #12
- SET_BIT(tmpreg, ETH_MACMDIOAR_MB);
- 8001d80: f042 0205 orr.w r2, r2, #5
- WRITE_REG(ETH->MACMDIODR, (uint16_t)RegValue);
- 8001d84: b29b uxth r3, r3
- 8001d86: 490c ldr r1, [pc, #48] @ (8001db8 <HAL_ETH_WritePHYRegister+0x64>)
- 8001d88: f8c1 3204 str.w r3, [r1, #516] @ 0x204
- WRITE_REG(ETH->MACMDIOAR, tmpreg);
- 8001d8c: f8c1 2200 str.w r2, [r1, #512] @ 0x200
- tickstart = HAL_GetTick();
- 8001d90: f7ff f87c bl 8000e8c <HAL_GetTick>
- 8001d94: 4605 mov r5, r0
- while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U)
- 8001d96: 6823 ldr r3, [r4, #0]
- 8001d98: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200
- 8001d9c: f013 0f01 tst.w r3, #1
- 8001da0: d007 beq.n 8001db2 <HAL_ETH_WritePHYRegister+0x5e>
- if (((HAL_GetTick() - tickstart) > ETH_MDIO_BUS_TIMEOUT))
- 8001da2: f7ff f873 bl 8000e8c <HAL_GetTick>
- 8001da6: 1b43 subs r3, r0, r5
- 8001da8: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8
- 8001dac: d9f3 bls.n 8001d96 <HAL_ETH_WritePHYRegister+0x42>
- return HAL_ERROR;
- 8001dae: 2001 movs r0, #1
- 8001db0: e7d9 b.n 8001d66 <HAL_ETH_WritePHYRegister+0x12>
- return HAL_OK;
- 8001db2: 2000 movs r0, #0
- 8001db4: e7d7 b.n 8001d66 <HAL_ETH_WritePHYRegister+0x12>
- 8001db6: bf00 nop
- 8001db8: 40028000 .word 0x40028000
- 08001dbc <HAL_ETH_GetMACConfig>:
- if (macconf == NULL)
- 8001dbc: 2900 cmp r1, #0
- 8001dbe: f000 80ee beq.w 8001f9e <HAL_ETH_GetMACConfig+0x1e2>
- macconf->PreambleLength = READ_BIT(heth->Instance->MACCR, ETH_MACCR_PRELEN);
- 8001dc2: 6802 ldr r2, [r0, #0]
- 8001dc4: 6812 ldr r2, [r2, #0]
- 8001dc6: f002 020c and.w r2, r2, #12
- 8001dca: 62ca str r2, [r1, #44] @ 0x2c
- macconf->DeferralCheck = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DC) >> 4) > 0U) ? ENABLE : DISABLE;
- 8001dcc: 6802 ldr r2, [r0, #0]
- 8001dce: 6812 ldr r2, [r2, #0]
- 8001dd0: f3c2 1200 ubfx r2, r2, #4, #1
- 8001dd4: f881 2028 strb.w r2, [r1, #40] @ 0x28
- macconf->BackOffLimit = READ_BIT(heth->Instance->MACCR, ETH_MACCR_BL);
- 8001dd8: 6802 ldr r2, [r0, #0]
- 8001dda: 6812 ldr r2, [r2, #0]
- 8001ddc: f002 0260 and.w r2, r2, #96 @ 0x60
- 8001de0: 624a str r2, [r1, #36] @ 0x24
- macconf->RetryTransmission = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DR) >> 8) == 0U) ? ENABLE : DISABLE;
- 8001de2: 6802 ldr r2, [r0, #0]
- 8001de4: 6812 ldr r2, [r2, #0]
- 8001de6: f412 7f80 tst.w r2, #256 @ 0x100
- 8001dea: bf0c ite eq
- 8001dec: 2201 moveq r2, #1
- 8001dee: 2200 movne r2, #0
- 8001df0: f881 2020 strb.w r2, [r1, #32]
- macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DCRS) >> 9) > 0U)
- 8001df4: 6802 ldr r2, [r0, #0]
- 8001df6: 6812 ldr r2, [r2, #0]
- ? ENABLE : DISABLE;
- 8001df8: f3c2 2240 ubfx r2, r2, #9, #1
- macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DCRS) >> 9) > 0U)
- 8001dfc: 77ca strb r2, [r1, #31]
- macconf->ReceiveOwn = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DO) >> 10) == 0U) ? ENABLE : DISABLE;
- 8001dfe: 6802 ldr r2, [r0, #0]
- 8001e00: 6812 ldr r2, [r2, #0]
- 8001e02: f412 6f80 tst.w r2, #1024 @ 0x400
- 8001e06: bf0c ite eq
- 8001e08: 2201 moveq r2, #1
- 8001e0a: 2200 movne r2, #0
- 8001e0c: 778a strb r2, [r1, #30]
- macconf->CarrierSenseBeforeTransmit = ((READ_BIT(heth->Instance->MACCR,
- 8001e0e: 6802 ldr r2, [r0, #0]
- 8001e10: 6812 ldr r2, [r2, #0]
- ETH_MACCR_ECRSFD) >> 11) > 0U) ? ENABLE : DISABLE;
- 8001e12: f3c2 22c0 ubfx r2, r2, #11, #1
- macconf->CarrierSenseBeforeTransmit = ((READ_BIT(heth->Instance->MACCR,
- 8001e16: 774a strb r2, [r1, #29]
- macconf->LoopbackMode = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_LM) >> 12) > 0U) ? ENABLE : DISABLE;
- 8001e18: 6802 ldr r2, [r0, #0]
- 8001e1a: 6812 ldr r2, [r2, #0]
- 8001e1c: f3c2 3200 ubfx r2, r2, #12, #1
- 8001e20: 770a strb r2, [r1, #28]
- macconf->DuplexMode = READ_BIT(heth->Instance->MACCR, ETH_MACCR_DM);
- 8001e22: 6802 ldr r2, [r0, #0]
- 8001e24: 6812 ldr r2, [r2, #0]
- 8001e26: f402 5200 and.w r2, r2, #8192 @ 0x2000
- 8001e2a: 618a str r2, [r1, #24]
- macconf->Speed = READ_BIT(heth->Instance->MACCR, ETH_MACCR_FES);
- 8001e2c: 6802 ldr r2, [r0, #0]
- 8001e2e: 6812 ldr r2, [r2, #0]
- 8001e30: f402 4280 and.w r2, r2, #16384 @ 0x4000
- 8001e34: 614a str r2, [r1, #20]
- macconf->JumboPacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_JE) >> 16) > 0U) ? ENABLE : DISABLE;
- 8001e36: 6802 ldr r2, [r0, #0]
- 8001e38: 6812 ldr r2, [r2, #0]
- 8001e3a: f3c2 4200 ubfx r2, r2, #16, #1
- 8001e3e: 748a strb r2, [r1, #18]
- macconf->Jabber = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_JD) >> 17) == 0U) ? ENABLE : DISABLE;
- 8001e40: 6802 ldr r2, [r0, #0]
- 8001e42: 6812 ldr r2, [r2, #0]
- 8001e44: f412 3f00 tst.w r2, #131072 @ 0x20000
- 8001e48: bf0c ite eq
- 8001e4a: 2201 moveq r2, #1
- 8001e4c: 2200 movne r2, #0
- 8001e4e: 744a strb r2, [r1, #17]
- macconf->Watchdog = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_WD) >> 19) == 0U) ? ENABLE : DISABLE;
- 8001e50: 6802 ldr r2, [r0, #0]
- 8001e52: 6812 ldr r2, [r2, #0]
- 8001e54: f412 2f00 tst.w r2, #524288 @ 0x80000
- 8001e58: bf0c ite eq
- 8001e5a: 2201 moveq r2, #1
- 8001e5c: 2200 movne r2, #0
- 8001e5e: 740a strb r2, [r1, #16]
- macconf->AutomaticPadCRCStrip = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_ACS) >> 20) > 0U) ? ENABLE : DISABLE;
- 8001e60: 6802 ldr r2, [r0, #0]
- 8001e62: 6812 ldr r2, [r2, #0]
- 8001e64: f3c2 5200 ubfx r2, r2, #20, #1
- 8001e68: 73ca strb r2, [r1, #15]
- macconf->CRCStripTypePacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_CST) >> 21) > 0U) ? ENABLE : DISABLE;
- 8001e6a: 6802 ldr r2, [r0, #0]
- 8001e6c: 6812 ldr r2, [r2, #0]
- 8001e6e: f3c2 5240 ubfx r2, r2, #21, #1
- 8001e72: 738a strb r2, [r1, #14]
- macconf->Support2KPacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_S2KP) >> 22) > 0U) ? ENABLE : DISABLE;
- 8001e74: 6802 ldr r2, [r0, #0]
- 8001e76: 6812 ldr r2, [r2, #0]
- 8001e78: f3c2 5280 ubfx r2, r2, #22, #1
- 8001e7c: 734a strb r2, [r1, #13]
- macconf->GiantPacketSizeLimitControl = ((READ_BIT(heth->Instance->MACCR,
- 8001e7e: 6802 ldr r2, [r0, #0]
- 8001e80: 6812 ldr r2, [r2, #0]
- ETH_MACCR_GPSLCE) >> 23) > 0U) ? ENABLE : DISABLE;
- 8001e82: f3c2 52c0 ubfx r2, r2, #23, #1
- macconf->GiantPacketSizeLimitControl = ((READ_BIT(heth->Instance->MACCR,
- 8001e86: 730a strb r2, [r1, #12]
- macconf->InterPacketGapVal = READ_BIT(heth->Instance->MACCR, ETH_MACCR_IPG);
- 8001e88: 6802 ldr r2, [r0, #0]
- 8001e8a: 6812 ldr r2, [r2, #0]
- 8001e8c: f002 62e0 and.w r2, r2, #117440512 @ 0x7000000
- 8001e90: 608a str r2, [r1, #8]
- macconf->ChecksumOffload = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_IPC) >> 27) > 0U) ? ENABLE : DISABLE;
- 8001e92: 6802 ldr r2, [r0, #0]
- 8001e94: 6812 ldr r2, [r2, #0]
- 8001e96: f3c2 62c0 ubfx r2, r2, #27, #1
- 8001e9a: 710a strb r2, [r1, #4]
- macconf->SourceAddrControl = READ_BIT(heth->Instance->MACCR, ETH_MACCR_SARC);
- 8001e9c: 6802 ldr r2, [r0, #0]
- 8001e9e: 6812 ldr r2, [r2, #0]
- 8001ea0: f002 42e0 and.w r2, r2, #1879048192 @ 0x70000000
- 8001ea4: 600a str r2, [r1, #0]
- macconf->GiantPacketSizeLimit = READ_BIT(heth->Instance->MACECR, ETH_MACECR_GPSL);
- 8001ea6: 6802 ldr r2, [r0, #0]
- 8001ea8: 6852 ldr r2, [r2, #4]
- 8001eaa: f3c2 020d ubfx r2, r2, #0, #14
- 8001eae: 634a str r2, [r1, #52] @ 0x34
- macconf->CRCCheckingRxPackets = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_DCRCC) >> 16) == 0U) ? ENABLE : DISABLE;
- 8001eb0: 6802 ldr r2, [r0, #0]
- 8001eb2: 6852 ldr r2, [r2, #4]
- 8001eb4: f412 3f80 tst.w r2, #65536 @ 0x10000
- 8001eb8: bf0c ite eq
- 8001eba: 2201 moveq r2, #1
- 8001ebc: 2200 movne r2, #0
- 8001ebe: f881 2032 strb.w r2, [r1, #50] @ 0x32
- macconf->SlowProtocolDetect = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_SPEN) >> 17) > 0U) ? ENABLE : DISABLE;
- 8001ec2: 6802 ldr r2, [r0, #0]
- 8001ec4: 6852 ldr r2, [r2, #4]
- 8001ec6: f3c2 4240 ubfx r2, r2, #17, #1
- 8001eca: f881 2031 strb.w r2, [r1, #49] @ 0x31
- macconf->UnicastSlowProtocolPacketDetect = ((READ_BIT(heth->Instance->MACECR,
- 8001ece: 6802 ldr r2, [r0, #0]
- 8001ed0: 6852 ldr r2, [r2, #4]
- ETH_MACECR_USP) >> 18) > 0U) ? ENABLE : DISABLE;
- 8001ed2: f3c2 4280 ubfx r2, r2, #18, #1
- macconf->UnicastSlowProtocolPacketDetect = ((READ_BIT(heth->Instance->MACECR,
- 8001ed6: f881 2030 strb.w r2, [r1, #48] @ 0x30
- macconf->ExtendedInterPacketGap = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPGEN) >> 24) > 0U)
- 8001eda: 6802 ldr r2, [r0, #0]
- 8001edc: 6852 ldr r2, [r2, #4]
- ? ENABLE : DISABLE;
- 8001ede: f3c2 6200 ubfx r2, r2, #24, #1
- macconf->ExtendedInterPacketGap = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPGEN) >> 24) > 0U)
- 8001ee2: f881 2038 strb.w r2, [r1, #56] @ 0x38
- macconf->ExtendedInterPacketGapVal = READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPG) >> 25;
- 8001ee6: 6802 ldr r2, [r0, #0]
- 8001ee8: 6852 ldr r2, [r2, #4]
- 8001eea: f3c2 6244 ubfx r2, r2, #25, #5
- 8001eee: 63ca str r2, [r1, #60] @ 0x3c
- macconf->ProgrammableWatchdog = ((READ_BIT(heth->Instance->MACWTR, ETH_MACWTR_PWE) >> 8) > 0U) ? ENABLE : DISABLE;
- 8001ef0: 6802 ldr r2, [r0, #0]
- 8001ef2: 68d2 ldr r2, [r2, #12]
- 8001ef4: f3c2 2200 ubfx r2, r2, #8, #1
- 8001ef8: f881 2040 strb.w r2, [r1, #64] @ 0x40
- macconf->WatchdogTimeout = READ_BIT(heth->Instance->MACWTR, ETH_MACWTR_WTO);
- 8001efc: 6802 ldr r2, [r0, #0]
- 8001efe: 68d2 ldr r2, [r2, #12]
- 8001f00: f002 020f and.w r2, r2, #15
- 8001f04: 644a str r2, [r1, #68] @ 0x44
- macconf->TransmitFlowControl = ((READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_TFE) >> 1) > 0U) ? ENABLE : DISABLE;
- 8001f06: 6802 ldr r2, [r0, #0]
- 8001f08: 6f12 ldr r2, [r2, #112] @ 0x70
- 8001f0a: f3c2 0240 ubfx r2, r2, #1, #1
- 8001f0e: f881 2054 strb.w r2, [r1, #84] @ 0x54
- macconf->ZeroQuantaPause = ((READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_DZPQ) >> 7) == 0U) ? ENABLE : DISABLE;
- 8001f12: 6802 ldr r2, [r0, #0]
- 8001f14: 6f12 ldr r2, [r2, #112] @ 0x70
- 8001f16: f012 0f80 tst.w r2, #128 @ 0x80
- 8001f1a: bf0c ite eq
- 8001f1c: 2201 moveq r2, #1
- 8001f1e: 2200 movne r2, #0
- 8001f20: f881 204c strb.w r2, [r1, #76] @ 0x4c
- macconf->PauseLowThreshold = READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_PLT);
- 8001f24: 6802 ldr r2, [r0, #0]
- 8001f26: 6f12 ldr r2, [r2, #112] @ 0x70
- 8001f28: f002 0270 and.w r2, r2, #112 @ 0x70
- 8001f2c: 650a str r2, [r1, #80] @ 0x50
- macconf->PauseTime = (READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_PT) >> 16);
- 8001f2e: 6802 ldr r2, [r0, #0]
- 8001f30: 6f12 ldr r2, [r2, #112] @ 0x70
- 8001f32: 0c12 lsrs r2, r2, #16
- 8001f34: 648a str r2, [r1, #72] @ 0x48
- macconf->ReceiveFlowControl = (READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_RFE) > 0U) ? ENABLE : DISABLE;
- 8001f36: 6802 ldr r2, [r0, #0]
- 8001f38: f8d2 2090 ldr.w r2, [r2, #144] @ 0x90
- 8001f3c: f002 0201 and.w r2, r2, #1
- 8001f40: f881 2056 strb.w r2, [r1, #86] @ 0x56
- macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_UP) >> 1) > 0U)
- 8001f44: 6802 ldr r2, [r0, #0]
- 8001f46: f8d2 2090 ldr.w r2, [r2, #144] @ 0x90
- ? ENABLE : DISABLE;
- 8001f4a: f3c2 0240 ubfx r2, r2, #1, #1
- macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_UP) >> 1) > 0U)
- 8001f4e: f881 2055 strb.w r2, [r1, #85] @ 0x55
- macconf->TransmitQueueMode = READ_BIT(heth->Instance->MTLTQOMR, (ETH_MTLTQOMR_TTC | ETH_MTLTQOMR_TSF));
- 8001f52: 6802 ldr r2, [r0, #0]
- 8001f54: f8d2 2d00 ldr.w r2, [r2, #3328] @ 0xd00
- 8001f58: f002 0272 and.w r2, r2, #114 @ 0x72
- 8001f5c: 658a str r2, [r1, #88] @ 0x58
- macconf->ReceiveQueueMode = READ_BIT(heth->Instance->MTLRQOMR, (ETH_MTLRQOMR_RTC | ETH_MTLRQOMR_RSF));
- 8001f5e: 6802 ldr r2, [r0, #0]
- 8001f60: f8d2 2d30 ldr.w r2, [r2, #3376] @ 0xd30
- 8001f64: f002 0223 and.w r2, r2, #35 @ 0x23
- 8001f68: 65ca str r2, [r1, #92] @ 0x5c
- macconf->ForwardRxUndersizedGoodPacket = ((READ_BIT(heth->Instance->MTLRQOMR,
- 8001f6a: 6802 ldr r2, [r0, #0]
- 8001f6c: f8d2 2d30 ldr.w r2, [r2, #3376] @ 0xd30
- ETH_MTLRQOMR_FUP) >> 3) > 0U) ? ENABLE : DISABLE;
- 8001f70: f3c2 02c0 ubfx r2, r2, #3, #1
- macconf->ForwardRxUndersizedGoodPacket = ((READ_BIT(heth->Instance->MTLRQOMR,
- 8001f74: f881 2062 strb.w r2, [r1, #98] @ 0x62
- macconf->ForwardRxErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR, ETH_MTLRQOMR_FEP) >> 4) > 0U) ? ENABLE : DISABLE;
- 8001f78: 6802 ldr r2, [r0, #0]
- 8001f7a: f8d2 2d30 ldr.w r2, [r2, #3376] @ 0xd30
- 8001f7e: f3c2 1200 ubfx r2, r2, #4, #1
- 8001f82: f881 2061 strb.w r2, [r1, #97] @ 0x61
- macconf->DropTCPIPChecksumErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR,
- 8001f86: 6802 ldr r2, [r0, #0]
- 8001f88: f8d2 2d30 ldr.w r2, [r2, #3376] @ 0xd30
- ETH_MTLRQOMR_DISTCPEF) >> 6) == 0U) ? ENABLE : DISABLE;
- 8001f8c: f012 0f40 tst.w r2, #64 @ 0x40
- 8001f90: bf0c ite eq
- 8001f92: 2201 moveq r2, #1
- 8001f94: 2200 movne r2, #0
- macconf->DropTCPIPChecksumErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR,
- 8001f96: f881 2060 strb.w r2, [r1, #96] @ 0x60
- return HAL_OK;
- 8001f9a: 2000 movs r0, #0
- 8001f9c: 4770 bx lr
- return HAL_ERROR;
- 8001f9e: 2001 movs r0, #1
- }
- 8001fa0: 4770 bx lr
- 08001fa2 <HAL_ETH_SetMACConfig>:
- if (macconf == NULL)
- 8001fa2: b151 cbz r1, 8001fba <HAL_ETH_SetMACConfig+0x18>
- {
- 8001fa4: b508 push {r3, lr}
- if (heth->gState == HAL_ETH_STATE_READY)
- 8001fa6: f8d0 3084 ldr.w r3, [r0, #132] @ 0x84
- 8001faa: 2b10 cmp r3, #16
- 8001fac: d001 beq.n 8001fb2 <HAL_ETH_SetMACConfig+0x10>
- return HAL_ERROR;
- 8001fae: 2001 movs r0, #1
- }
- 8001fb0: bd08 pop {r3, pc}
- ETH_SetMACConfig(heth, macconf);
- 8001fb2: f7ff f889 bl 80010c8 <ETH_SetMACConfig>
- return HAL_OK;
- 8001fb6: 2000 movs r0, #0
- 8001fb8: e7fa b.n 8001fb0 <HAL_ETH_SetMACConfig+0xe>
- return HAL_ERROR;
- 8001fba: 2001 movs r0, #1
- }
- 8001fbc: 4770 bx lr
- ...
- 08001fc0 <HAL_ETH_SetMDIOClockRange>:
- {
- 8001fc0: b538 push {r3, r4, r5, lr}
- 8001fc2: 4605 mov r5, r0
- tmpreg = (heth->Instance)->MACMDIOAR;
- 8001fc4: 6803 ldr r3, [r0, #0]
- 8001fc6: f8d3 4200 ldr.w r4, [r3, #512] @ 0x200
- tmpreg &= ~ETH_MACMDIOAR_CR;
- 8001fca: f424 6470 bic.w r4, r4, #3840 @ 0xf00
- hclk = HAL_RCC_GetHCLKFreq();
- 8001fce: f000 ffcd bl 8002f6c <HAL_RCC_GetHCLKFreq>
- if ((hclk >= 20000000U) && (hclk < 35000000U))
- 8001fd2: 4b11 ldr r3, [pc, #68] @ (8002018 <HAL_ETH_SetMDIOClockRange+0x58>)
- 8001fd4: 4403 add r3, r0
- 8001fd6: 4a11 ldr r2, [pc, #68] @ (800201c <HAL_ETH_SetMDIOClockRange+0x5c>)
- 8001fd8: 4293 cmp r3, r2
- 8001fda: d205 bcs.n 8001fe8 <HAL_ETH_SetMDIOClockRange+0x28>
- tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV16;
- 8001fdc: f444 7400 orr.w r4, r4, #512 @ 0x200
- (heth->Instance)->MACMDIOAR = (uint32_t)tmpreg;
- 8001fe0: 682b ldr r3, [r5, #0]
- 8001fe2: f8c3 4200 str.w r4, [r3, #512] @ 0x200
- }
- 8001fe6: bd38 pop {r3, r4, r5, pc}
- else if ((hclk >= 35000000U) && (hclk < 60000000U))
- 8001fe8: 4b0d ldr r3, [pc, #52] @ (8002020 <HAL_ETH_SetMDIOClockRange+0x60>)
- 8001fea: 4403 add r3, r0
- 8001fec: 4a0d ldr r2, [pc, #52] @ (8002024 <HAL_ETH_SetMDIOClockRange+0x64>)
- 8001fee: 4293 cmp r3, r2
- 8001ff0: d802 bhi.n 8001ff8 <HAL_ETH_SetMDIOClockRange+0x38>
- tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV26;
- 8001ff2: f444 7440 orr.w r4, r4, #768 @ 0x300
- 8001ff6: e7f3 b.n 8001fe0 <HAL_ETH_SetMDIOClockRange+0x20>
- else if ((hclk >= 60000000U) && (hclk < 100000000U))
- 8001ff8: 4b0b ldr r3, [pc, #44] @ (8002028 <HAL_ETH_SetMDIOClockRange+0x68>)
- 8001ffa: 4403 add r3, r0
- 8001ffc: 4a0b ldr r2, [pc, #44] @ (800202c <HAL_ETH_SetMDIOClockRange+0x6c>)
- 8001ffe: 4293 cmp r3, r2
- 8002000: d3ee bcc.n 8001fe0 <HAL_ETH_SetMDIOClockRange+0x20>
- else if ((hclk >= 100000000U) && (hclk < 150000000U))
- 8002002: 4b0b ldr r3, [pc, #44] @ (8002030 <HAL_ETH_SetMDIOClockRange+0x70>)
- 8002004: 4403 add r3, r0
- 8002006: 4a0b ldr r2, [pc, #44] @ (8002034 <HAL_ETH_SetMDIOClockRange+0x74>)
- 8002008: 4293 cmp r3, r2
- 800200a: d802 bhi.n 8002012 <HAL_ETH_SetMDIOClockRange+0x52>
- tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV62;
- 800200c: f444 7480 orr.w r4, r4, #256 @ 0x100
- 8002010: e7e6 b.n 8001fe0 <HAL_ETH_SetMDIOClockRange+0x20>
- tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV102;
- 8002012: f444 6480 orr.w r4, r4, #1024 @ 0x400
- 8002016: e7e3 b.n 8001fe0 <HAL_ETH_SetMDIOClockRange+0x20>
- 8002018: feced300 .word 0xfeced300
- 800201c: 00e4e1c0 .word 0x00e4e1c0
- 8002020: fde9f140 .word 0xfde9f140
- 8002024: 017d783f .word 0x017d783f
- 8002028: fc6c7900 .word 0xfc6c7900
- 800202c: 02625a00 .word 0x02625a00
- 8002030: fa0a1f00 .word 0xfa0a1f00
- 8002034: 02faf07f .word 0x02faf07f
- 08002038 <HAL_ETH_Init>:
- if (heth == NULL)
- 8002038: 2800 cmp r0, #0
- 800203a: f000 8099 beq.w 8002170 <HAL_ETH_Init+0x138>
- {
- 800203e: b530 push {r4, r5, lr}
- 8002040: b083 sub sp, #12
- 8002042: 4604 mov r4, r0
- if (heth->gState == HAL_ETH_STATE_RESET)
- 8002044: f8d0 3084 ldr.w r3, [r0, #132] @ 0x84
- 8002048: b39b cbz r3, 80020b2 <HAL_ETH_Init+0x7a>
- __HAL_RCC_SYSCFG_CLK_ENABLE();
- 800204a: 4b4a ldr r3, [pc, #296] @ (8002174 <HAL_ETH_Init+0x13c>)
- 800204c: f8d3 20f4 ldr.w r2, [r3, #244] @ 0xf4
- 8002050: f042 0202 orr.w r2, r2, #2
- 8002054: f8c3 20f4 str.w r2, [r3, #244] @ 0xf4
- 8002058: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4
- 800205c: f003 0302 and.w r3, r3, #2
- 8002060: 9301 str r3, [sp, #4]
- 8002062: 9b01 ldr r3, [sp, #4]
- if (heth->Init.MediaInterface == HAL_ETH_MII_MODE)
- 8002064: 7a23 ldrb r3, [r4, #8]
- 8002066: bb53 cbnz r3, 80020be <HAL_ETH_Init+0x86>
- HAL_SYSCFG_ETHInterfaceSelect(SYSCFG_ETH_MII);
- 8002068: 2000 movs r0, #0
- 800206a: f7fe ff1b bl 8000ea4 <HAL_SYSCFG_ETHInterfaceSelect>
- (void)SYSCFG->PMCR;
- 800206e: 4b42 ldr r3, [pc, #264] @ (8002178 <HAL_ETH_Init+0x140>)
- 8002070: 685b ldr r3, [r3, #4]
- SET_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR);
- 8002072: 6823 ldr r3, [r4, #0]
- 8002074: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 8002078: 681a ldr r2, [r3, #0]
- 800207a: f042 0201 orr.w r2, r2, #1
- 800207e: 601a str r2, [r3, #0]
- tickstart = HAL_GetTick();
- 8002080: f7fe ff04 bl 8000e8c <HAL_GetTick>
- 8002084: 4605 mov r5, r0
- while (READ_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR) > 0U)
- 8002086: 6823 ldr r3, [r4, #0]
- 8002088: f503 5380 add.w r3, r3, #4096 @ 0x1000
- 800208c: 681b ldr r3, [r3, #0]
- 800208e: f013 0f01 tst.w r3, #1
- 8002092: d019 beq.n 80020c8 <HAL_ETH_Init+0x90>
- if (((HAL_GetTick() - tickstart) > ETH_SWRESET_TIMEOUT))
- 8002094: f7fe fefa bl 8000e8c <HAL_GetTick>
- 8002098: 1b40 subs r0, r0, r5
- 800209a: f5b0 7ffa cmp.w r0, #500 @ 0x1f4
- 800209e: d9f2 bls.n 8002086 <HAL_ETH_Init+0x4e>
- heth->ErrorCode = HAL_ETH_ERROR_TIMEOUT;
- 80020a0: 2304 movs r3, #4
- 80020a2: f8c4 3088 str.w r3, [r4, #136] @ 0x88
- heth->gState = HAL_ETH_STATE_ERROR;
- 80020a6: 23e0 movs r3, #224 @ 0xe0
- 80020a8: f8c4 3084 str.w r3, [r4, #132] @ 0x84
- return HAL_ERROR;
- 80020ac: 2001 movs r0, #1
- }
- 80020ae: b003 add sp, #12
- 80020b0: bd30 pop {r4, r5, pc}
- heth->gState = HAL_ETH_STATE_BUSY;
- 80020b2: 2323 movs r3, #35 @ 0x23
- 80020b4: f8c0 3084 str.w r3, [r0, #132] @ 0x84
- HAL_ETH_MspInit(heth);
- 80020b8: f001 fade bl 8003678 <HAL_ETH_MspInit>
- 80020bc: e7c5 b.n 800204a <HAL_ETH_Init+0x12>
- HAL_SYSCFG_ETHInterfaceSelect(SYSCFG_ETH_RMII);
- 80020be: f44f 0000 mov.w r0, #8388608 @ 0x800000
- 80020c2: f7fe feef bl 8000ea4 <HAL_SYSCFG_ETHInterfaceSelect>
- 80020c6: e7d2 b.n 800206e <HAL_ETH_Init+0x36>
- HAL_ETH_SetMDIOClockRange(heth);
- 80020c8: 4620 mov r0, r4
- 80020ca: f7ff ff79 bl 8001fc0 <HAL_ETH_SetMDIOClockRange>
- WRITE_REG(heth->Instance->MAC1USTCR, (((uint32_t)HAL_RCC_GetHCLKFreq() / ETH_MAC_US_TICK) - 1U));
- 80020ce: f000 ff4d bl 8002f6c <HAL_RCC_GetHCLKFreq>
- 80020d2: 4b2a ldr r3, [pc, #168] @ (800217c <HAL_ETH_Init+0x144>)
- 80020d4: fba3 2300 umull r2, r3, r3, r0
- 80020d8: 0c9b lsrs r3, r3, #18
- 80020da: 6822 ldr r2, [r4, #0]
- 80020dc: 3b01 subs r3, #1
- 80020de: f8c2 30dc str.w r3, [r2, #220] @ 0xdc
- ETH_MACDMAConfig(heth);
- 80020e2: 4620 mov r0, r4
- 80020e4: f7ff f91e bl 8001324 <ETH_MACDMAConfig>
- MODIFY_REG(heth->Instance->DMACCR, ETH_DMACCR_DSL, ETH_DMACCR_DSL_64BIT);
- 80020e8: 6822 ldr r2, [r4, #0]
- 80020ea: f502 5280 add.w r2, r2, #4096 @ 0x1000
- 80020ee: f8d2 3100 ldr.w r3, [r2, #256] @ 0x100
- 80020f2: f423 13e0 bic.w r3, r3, #1835008 @ 0x1c0000
- 80020f6: f443 2300 orr.w r3, r3, #524288 @ 0x80000
- 80020fa: f8c2 3100 str.w r3, [r2, #256] @ 0x100
- if ((heth->Init.RxBuffLen % 0x4U) != 0x0U)
- 80020fe: 6962 ldr r2, [r4, #20]
- 8002100: f012 0f03 tst.w r2, #3
- 8002104: d006 beq.n 8002114 <HAL_ETH_Init+0xdc>
- heth->ErrorCode = HAL_ETH_ERROR_PARAM;
- 8002106: 2001 movs r0, #1
- 8002108: f8c4 0088 str.w r0, [r4, #136] @ 0x88
- heth->gState = HAL_ETH_STATE_ERROR;
- 800210c: 23e0 movs r3, #224 @ 0xe0
- 800210e: f8c4 3084 str.w r3, [r4, #132] @ 0x84
- return HAL_ERROR;
- 8002112: e7cc b.n 80020ae <HAL_ETH_Init+0x76>
- MODIFY_REG(heth->Instance->DMACRCR, ETH_DMACRCR_RBSZ, ((heth->Init.RxBuffLen) << 1));
- 8002114: 6821 ldr r1, [r4, #0]
- 8002116: f501 5180 add.w r1, r1, #4096 @ 0x1000
- 800211a: f8d1 0108 ldr.w r0, [r1, #264] @ 0x108
- 800211e: 4b18 ldr r3, [pc, #96] @ (8002180 <HAL_ETH_Init+0x148>)
- 8002120: 4003 ands r3, r0
- 8002122: ea43 0342 orr.w r3, r3, r2, lsl #1
- 8002126: f8c1 3108 str.w r3, [r1, #264] @ 0x108
- ETH_DMATxDescListInit(heth);
- 800212a: 4620 mov r0, r4
- 800212c: f7ff f968 bl 8001400 <ETH_DMATxDescListInit>
- ETH_DMARxDescListInit(heth);
- 8002130: 4620 mov r0, r4
- 8002132: f7ff f992 bl 800145a <ETH_DMARxDescListInit>
- heth->Instance->MACA0HR = (((uint32_t)(heth->Init.MACAddr[5]) << 8) | (uint32_t)heth->Init.MACAddr[4]);
- 8002136: 6863 ldr r3, [r4, #4]
- 8002138: 7959 ldrb r1, [r3, #5]
- 800213a: 791b ldrb r3, [r3, #4]
- 800213c: 6822 ldr r2, [r4, #0]
- 800213e: ea43 2301 orr.w r3, r3, r1, lsl #8
- 8002142: f8c2 3300 str.w r3, [r2, #768] @ 0x300
- heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) |
- 8002146: 6862 ldr r2, [r4, #4]
- 8002148: 78d1 ldrb r1, [r2, #3]
- 800214a: 7893 ldrb r3, [r2, #2]
- 800214c: 041b lsls r3, r3, #16
- 800214e: ea43 6301 orr.w r3, r3, r1, lsl #24
- ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]);
- 8002152: 7851 ldrb r1, [r2, #1]
- heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) |
- 8002154: ea43 2301 orr.w r3, r3, r1, lsl #8
- ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]);
- 8002158: 7811 ldrb r1, [r2, #0]
- heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) |
- 800215a: 6822 ldr r2, [r4, #0]
- ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]);
- 800215c: 430b orrs r3, r1
- heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) |
- 800215e: f8c2 3304 str.w r3, [r2, #772] @ 0x304
- heth->ErrorCode = HAL_ETH_ERROR_NONE;
- 8002162: 2000 movs r0, #0
- 8002164: f8c4 0088 str.w r0, [r4, #136] @ 0x88
- heth->gState = HAL_ETH_STATE_READY;
- 8002168: 2310 movs r3, #16
- 800216a: f8c4 3084 str.w r3, [r4, #132] @ 0x84
- return HAL_OK;
- 800216e: e79e b.n 80020ae <HAL_ETH_Init+0x76>
- return HAL_ERROR;
- 8002170: 2001 movs r0, #1
- }
- 8002172: 4770 bx lr
- 8002174: 58024400 .word 0x58024400
- 8002178: 58000400 .word 0x58000400
- 800217c: 431bde83 .word 0x431bde83
- 8002180: ffff8001 .word 0xffff8001
- 08002184 <HAL_ETH_GetDMAError>:
- return heth->DMAErrorCode;
- 8002184: f8d0 008c ldr.w r0, [r0, #140] @ 0x8c
- }
- 8002188: 4770 bx lr
- ...
- 0800218c <HAL_GPIO_Init>:
- * @param GPIO_Init: pointer to a GPIO_InitTypeDef structure that contains
- * the configuration information for the specified GPIO peripheral.
- * @retval None
- */
- void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
- {
- 800218c: b5f0 push {r4, r5, r6, r7, lr}
- 800218e: b083 sub sp, #12
- uint32_t position = 0x00U;
- 8002190: 2300 movs r3, #0
- 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)
- 8002192: e06b b.n 800226c <HAL_GPIO_Init+0xe0>
- {
- /* Check the Speed parameter */
- assert_param(IS_GPIO_SPEED(GPIO_Init->Speed));
- /* Configure the IO Speed */
- temp = GPIOx->OSPEEDR;
- 8002194: 6885 ldr r5, [r0, #8]
- temp &= ~(GPIO_OSPEEDR_OSPEED0 << (position * 2U));
- 8002196: 005e lsls r6, r3, #1
- 8002198: 2403 movs r4, #3
- 800219a: 40b4 lsls r4, r6
- 800219c: ea25 0504 bic.w r5, r5, r4
- temp |= (GPIO_Init->Speed << (position * 2U));
- 80021a0: 68cc ldr r4, [r1, #12]
- 80021a2: 40b4 lsls r4, r6
- 80021a4: 432c orrs r4, r5
- GPIOx->OSPEEDR = temp;
- 80021a6: 6084 str r4, [r0, #8]
- /* Configure the IO Output Type */
- temp = GPIOx->OTYPER;
- 80021a8: 6845 ldr r5, [r0, #4]
- temp &= ~(GPIO_OTYPER_OT0 << position) ;
- 80021aa: ea25 050c bic.w r5, r5, ip
- temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position);
- 80021ae: 684c ldr r4, [r1, #4]
- 80021b0: f3c4 1400 ubfx r4, r4, #4, #1
- 80021b4: 409c lsls r4, r3
- 80021b6: 432c orrs r4, r5
- GPIOx->OTYPER = temp;
- 80021b8: 6044 str r4, [r0, #4]
- 80021ba: e069 b.n 8002290 <HAL_GPIO_Init+0x104>
- /* 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];
- 80021bc: 08dd lsrs r5, r3, #3
- 80021be: 3508 adds r5, #8
- 80021c0: f850 4025 ldr.w r4, [r0, r5, lsl #2]
- temp &= ~(0xFU << ((position & 0x07U) * 4U));
- 80021c4: f003 0c07 and.w ip, r3, #7
- 80021c8: ea4f 0c8c mov.w ip, ip, lsl #2
- 80021cc: f04f 0e0f mov.w lr, #15
- 80021d0: fa0e fe0c lsl.w lr, lr, ip
- 80021d4: ea24 0e0e bic.w lr, r4, lr
- temp |= ((GPIO_Init->Alternate) << ((position & 0x07U) * 4U));
- 80021d8: 690c ldr r4, [r1, #16]
- 80021da: fa04 f40c lsl.w r4, r4, ip
- 80021de: ea44 040e orr.w r4, r4, lr
- GPIOx->AFR[position >> 3U] = temp;
- 80021e2: f840 4025 str.w r4, [r0, r5, lsl #2]
- 80021e6: e06b b.n 80022c0 <HAL_GPIO_Init+0x134>
- /* Enable SYSCFG Clock */
- __HAL_RCC_SYSCFG_CLK_ENABLE();
- temp = SYSCFG->EXTICR[position >> 2U];
- temp &= ~(0x0FUL << (4U * (position & 0x03U)));
- temp |= (GPIO_GET_INDEX(GPIOx) << (4U * (position & 0x03U)));
- 80021e8: 2409 movs r4, #9
- 80021ea: e000 b.n 80021ee <HAL_GPIO_Init+0x62>
- 80021ec: 2400 movs r4, #0
- 80021ee: fa04 f40e lsl.w r4, r4, lr
- 80021f2: 432c orrs r4, r5
- SYSCFG->EXTICR[position >> 2U] = temp;
- 80021f4: f10c 0c02 add.w ip, ip, #2
- 80021f8: 4d69 ldr r5, [pc, #420] @ (80023a0 <HAL_GPIO_Init+0x214>)
- 80021fa: f845 402c str.w r4, [r5, ip, lsl #2]
- /* Clear Rising Falling edge configuration */
- temp = EXTI->RTSR1;
- 80021fe: f04f 44b0 mov.w r4, #1476395008 @ 0x58000000
- 8002202: 6825 ldr r5, [r4, #0]
- temp &= ~(iocurrent);
- 8002204: 43d4 mvns r4, r2
- 8002206: ea25 0602 bic.w r6, r5, r2
- if ((GPIO_Init->Mode & TRIGGER_RISING) != 0x00U)
- 800220a: 684f ldr r7, [r1, #4]
- 800220c: f417 1f80 tst.w r7, #1048576 @ 0x100000
- 8002210: d001 beq.n 8002216 <HAL_GPIO_Init+0x8a>
- {
- temp |= iocurrent;
- 8002212: ea42 0605 orr.w r6, r2, r5
- }
- EXTI->RTSR1 = temp;
- 8002216: f04f 45b0 mov.w r5, #1476395008 @ 0x58000000
- 800221a: 602e str r6, [r5, #0]
- temp = EXTI->FTSR1;
- 800221c: 686d ldr r5, [r5, #4]
- temp &= ~(iocurrent);
- 800221e: ea04 0605 and.w r6, r4, r5
- if ((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00U)
- 8002222: 684f ldr r7, [r1, #4]
- 8002224: f417 1f00 tst.w r7, #2097152 @ 0x200000
- 8002228: d001 beq.n 800222e <HAL_GPIO_Init+0xa2>
- {
- temp |= iocurrent;
- 800222a: ea42 0605 orr.w r6, r2, r5
- }
- EXTI->FTSR1 = temp;
- 800222e: f04f 45b0 mov.w r5, #1476395008 @ 0x58000000
- 8002232: 606e str r6, [r5, #4]
- temp = EXTI_CurrentCPU->EMR1;
- 8002234: f8d5 5084 ldr.w r5, [r5, #132] @ 0x84
- temp &= ~(iocurrent);
- 8002238: ea04 0605 and.w r6, r4, r5
- if ((GPIO_Init->Mode & EXTI_EVT) != 0x00U)
- 800223c: 684f ldr r7, [r1, #4]
- 800223e: f417 3f00 tst.w r7, #131072 @ 0x20000
- 8002242: d001 beq.n 8002248 <HAL_GPIO_Init+0xbc>
- {
- temp |= iocurrent;
- 8002244: ea42 0605 orr.w r6, r2, r5
- }
- EXTI_CurrentCPU->EMR1 = temp;
- 8002248: f04f 45b0 mov.w r5, #1476395008 @ 0x58000000
- 800224c: f8c5 6084 str.w r6, [r5, #132] @ 0x84
- /* Clear EXTI line configuration */
- temp = EXTI_CurrentCPU->IMR1;
- 8002250: f8d5 5080 ldr.w r5, [r5, #128] @ 0x80
- temp &= ~(iocurrent);
- 8002254: 402c ands r4, r5
- if ((GPIO_Init->Mode & EXTI_IT) != 0x00U)
- 8002256: 684e ldr r6, [r1, #4]
- 8002258: f416 3f80 tst.w r6, #65536 @ 0x10000
- 800225c: d001 beq.n 8002262 <HAL_GPIO_Init+0xd6>
- {
- temp |= iocurrent;
- 800225e: ea42 0405 orr.w r4, r2, r5
- }
- EXTI_CurrentCPU->IMR1 = temp;
- 8002262: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000
- 8002266: f8c2 4080 str.w r4, [r2, #128] @ 0x80
- }
- }
- position++;
- 800226a: 3301 adds r3, #1
- while (((GPIO_Init->Pin) >> position) != 0x00U)
- 800226c: 680a ldr r2, [r1, #0]
- 800226e: fa32 f403 lsrs.w r4, r2, r3
- 8002272: f000 8092 beq.w 800239a <HAL_GPIO_Init+0x20e>
- iocurrent = (GPIO_Init->Pin) & (1UL << position);
- 8002276: f04f 0c01 mov.w ip, #1
- 800227a: fa0c fc03 lsl.w ip, ip, r3
- if (iocurrent != 0x00U)
- 800227e: ea1c 0202 ands.w r2, ip, r2
- 8002282: d0f2 beq.n 800226a <HAL_GPIO_Init+0xde>
- if (((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF))
- 8002284: 684c ldr r4, [r1, #4]
- 8002286: f004 0403 and.w r4, r4, #3
- 800228a: 3c01 subs r4, #1
- 800228c: 2c01 cmp r4, #1
- 800228e: d981 bls.n 8002194 <HAL_GPIO_Init+0x8>
- if ((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG)
- 8002290: 684c ldr r4, [r1, #4]
- 8002292: f004 0403 and.w r4, r4, #3
- 8002296: 2c03 cmp r4, #3
- 8002298: d00c beq.n 80022b4 <HAL_GPIO_Init+0x128>
- temp = GPIOx->PUPDR;
- 800229a: 68c4 ldr r4, [r0, #12]
- temp &= ~(GPIO_PUPDR_PUPD0 << (position * 2U));
- 800229c: 005d lsls r5, r3, #1
- 800229e: f04f 0c03 mov.w ip, #3
- 80022a2: fa0c fc05 lsl.w ip, ip, r5
- 80022a6: ea24 0c0c bic.w ip, r4, ip
- temp |= ((GPIO_Init->Pull) << (position * 2U));
- 80022aa: 688c ldr r4, [r1, #8]
- 80022ac: 40ac lsls r4, r5
- 80022ae: ea44 040c orr.w r4, r4, ip
- GPIOx->PUPDR = temp;
- 80022b2: 60c4 str r4, [r0, #12]
- if ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
- 80022b4: 684c ldr r4, [r1, #4]
- 80022b6: f004 0403 and.w r4, r4, #3
- 80022ba: 2c02 cmp r4, #2
- 80022bc: f43f af7e beq.w 80021bc <HAL_GPIO_Init+0x30>
- temp = GPIOx->MODER;
- 80022c0: 6804 ldr r4, [r0, #0]
- temp &= ~(GPIO_MODER_MODE0 << (position * 2U));
- 80022c2: ea4f 0e43 mov.w lr, r3, lsl #1
- 80022c6: f04f 0c03 mov.w ip, #3
- 80022ca: fa0c fc0e lsl.w ip, ip, lr
- 80022ce: ea24 0c0c bic.w ip, r4, ip
- temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2U));
- 80022d2: 684c ldr r4, [r1, #4]
- 80022d4: f004 0403 and.w r4, r4, #3
- 80022d8: fa04 f40e lsl.w r4, r4, lr
- 80022dc: ea44 040c orr.w r4, r4, ip
- GPIOx->MODER = temp;
- 80022e0: 6004 str r4, [r0, #0]
- if ((GPIO_Init->Mode & EXTI_MODE) != 0x00U)
- 80022e2: 684c ldr r4, [r1, #4]
- 80022e4: f414 3f40 tst.w r4, #196608 @ 0x30000
- 80022e8: d0bf beq.n 800226a <HAL_GPIO_Init+0xde>
- __HAL_RCC_SYSCFG_CLK_ENABLE();
- 80022ea: 4c2e ldr r4, [pc, #184] @ (80023a4 <HAL_GPIO_Init+0x218>)
- 80022ec: f8d4 50f4 ldr.w r5, [r4, #244] @ 0xf4
- 80022f0: f045 0502 orr.w r5, r5, #2
- 80022f4: f8c4 50f4 str.w r5, [r4, #244] @ 0xf4
- 80022f8: f8d4 40f4 ldr.w r4, [r4, #244] @ 0xf4
- 80022fc: f004 0402 and.w r4, r4, #2
- 8002300: 9401 str r4, [sp, #4]
- 8002302: 9c01 ldr r4, [sp, #4]
- temp = SYSCFG->EXTICR[position >> 2U];
- 8002304: ea4f 0c93 mov.w ip, r3, lsr #2
- 8002308: f10c 0502 add.w r5, ip, #2
- 800230c: 4c24 ldr r4, [pc, #144] @ (80023a0 <HAL_GPIO_Init+0x214>)
- 800230e: f854 5025 ldr.w r5, [r4, r5, lsl #2]
- temp &= ~(0x0FUL << (4U * (position & 0x03U)));
- 8002312: f003 0e03 and.w lr, r3, #3
- 8002316: ea4f 0e8e mov.w lr, lr, lsl #2
- 800231a: 240f movs r4, #15
- 800231c: fa04 f40e lsl.w r4, r4, lr
- 8002320: ea25 0504 bic.w r5, r5, r4
- temp |= (GPIO_GET_INDEX(GPIOx) << (4U * (position & 0x03U)));
- 8002324: 4c20 ldr r4, [pc, #128] @ (80023a8 <HAL_GPIO_Init+0x21c>)
- 8002326: 42a0 cmp r0, r4
- 8002328: f43f af60 beq.w 80021ec <HAL_GPIO_Init+0x60>
- 800232c: f504 6480 add.w r4, r4, #1024 @ 0x400
- 8002330: 42a0 cmp r0, r4
- 8002332: d022 beq.n 800237a <HAL_GPIO_Init+0x1ee>
- 8002334: f504 6480 add.w r4, r4, #1024 @ 0x400
- 8002338: 42a0 cmp r0, r4
- 800233a: d020 beq.n 800237e <HAL_GPIO_Init+0x1f2>
- 800233c: f504 6480 add.w r4, r4, #1024 @ 0x400
- 8002340: 42a0 cmp r0, r4
- 8002342: d01e beq.n 8002382 <HAL_GPIO_Init+0x1f6>
- 8002344: f504 6480 add.w r4, r4, #1024 @ 0x400
- 8002348: 42a0 cmp r0, r4
- 800234a: d01c beq.n 8002386 <HAL_GPIO_Init+0x1fa>
- 800234c: f504 6480 add.w r4, r4, #1024 @ 0x400
- 8002350: 42a0 cmp r0, r4
- 8002352: d01a beq.n 800238a <HAL_GPIO_Init+0x1fe>
- 8002354: f504 6480 add.w r4, r4, #1024 @ 0x400
- 8002358: 42a0 cmp r0, r4
- 800235a: d018 beq.n 800238e <HAL_GPIO_Init+0x202>
- 800235c: f504 6480 add.w r4, r4, #1024 @ 0x400
- 8002360: 42a0 cmp r0, r4
- 8002362: d016 beq.n 8002392 <HAL_GPIO_Init+0x206>
- 8002364: f504 6480 add.w r4, r4, #1024 @ 0x400
- 8002368: 42a0 cmp r0, r4
- 800236a: d014 beq.n 8002396 <HAL_GPIO_Init+0x20a>
- 800236c: f504 6480 add.w r4, r4, #1024 @ 0x400
- 8002370: 42a0 cmp r0, r4
- 8002372: f43f af39 beq.w 80021e8 <HAL_GPIO_Init+0x5c>
- 8002376: 240a movs r4, #10
- 8002378: e739 b.n 80021ee <HAL_GPIO_Init+0x62>
- 800237a: 2401 movs r4, #1
- 800237c: e737 b.n 80021ee <HAL_GPIO_Init+0x62>
- 800237e: 2402 movs r4, #2
- 8002380: e735 b.n 80021ee <HAL_GPIO_Init+0x62>
- 8002382: 2403 movs r4, #3
- 8002384: e733 b.n 80021ee <HAL_GPIO_Init+0x62>
- 8002386: 2404 movs r4, #4
- 8002388: e731 b.n 80021ee <HAL_GPIO_Init+0x62>
- 800238a: 2405 movs r4, #5
- 800238c: e72f b.n 80021ee <HAL_GPIO_Init+0x62>
- 800238e: 2406 movs r4, #6
- 8002390: e72d b.n 80021ee <HAL_GPIO_Init+0x62>
- 8002392: 2407 movs r4, #7
- 8002394: e72b b.n 80021ee <HAL_GPIO_Init+0x62>
- 8002396: 2408 movs r4, #8
- 8002398: e729 b.n 80021ee <HAL_GPIO_Init+0x62>
- }
- }
- 800239a: b003 add sp, #12
- 800239c: bdf0 pop {r4, r5, r6, r7, pc}
- 800239e: bf00 nop
- 80023a0: 58000400 .word 0x58000400
- 80023a4: 58024400 .word 0x58024400
- 80023a8: 58020000 .word 0x58020000
- 080023ac <HAL_HSEM_FastTake>:
- /*take success when MasterID match and take bit set*/
- return HAL_OK;
- }
- #else
- /* Read the RLR register to take the semaphore */
- if (HSEM->RLR[SemID] == (HSEM_CR_COREID_CURRENT | HSEM_RLR_LOCK))
- 80023ac: 3020 adds r0, #32
- 80023ae: 4b05 ldr r3, [pc, #20] @ (80023c4 <HAL_HSEM_FastTake+0x18>)
- 80023b0: f853 2020 ldr.w r2, [r3, r0, lsl #2]
- 80023b4: 4b04 ldr r3, [pc, #16] @ (80023c8 <HAL_HSEM_FastTake+0x1c>)
- 80023b6: 429a cmp r2, r3
- 80023b8: d001 beq.n 80023be <HAL_HSEM_FastTake+0x12>
- return HAL_OK;
- }
- #endif
- /* Semaphore take fails */
- return HAL_ERROR;
- 80023ba: 2001 movs r0, #1
- 80023bc: 4770 bx lr
- return HAL_OK;
- 80023be: 2000 movs r0, #0
- }
- 80023c0: 4770 bx lr
- 80023c2: bf00 nop
- 80023c4: 58026400 .word 0x58026400
- 80023c8: 80000300 .word 0x80000300
- 080023cc <HAL_HSEM_Release>:
- /* Clear the semaphore by writing to the R register : the MasterID , the processID and take bit = 0 */
- #if USE_MULTI_CORE_SHARED_CODE != 0U
- HSEM->R[SemID] = (ProcessID | ((HAL_GetCurrentCPUID() << POSITION_VAL(HSEM_R_MASTERID)) & HSEM_R_MASTERID));
- #else
- HSEM->R[SemID] = (ProcessID | HSEM_CR_COREID_CURRENT);
- 80023cc: f441 7140 orr.w r1, r1, #768 @ 0x300
- 80023d0: 4b01 ldr r3, [pc, #4] @ (80023d8 <HAL_HSEM_Release+0xc>)
- 80023d2: f843 1020 str.w r1, [r3, r0, lsl #2]
- #endif
- }
- 80023d6: 4770 bx lr
- 80023d8: 58026400 .word 0x58026400
- 080023dc <HAL_PWREx_ConfigSupply>:
- * 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)
- {
- 80023dc: b538 push {r3, r4, r5, lr}
- 80023de: 4604 mov r4, r0
- /* Check if supply source was configured */
- #if defined (PWR_FLAG_SCUEN)
- if (__HAL_PWR_GET_FLAG (PWR_FLAG_SCUEN) == 0U)
- #else
- if ((PWR->CR3 & (PWR_CR3_SMPSEN | PWR_CR3_LDOEN | PWR_CR3_BYPASS)) != (PWR_CR3_SMPSEN | PWR_CR3_LDOEN))
- 80023e0: 4b22 ldr r3, [pc, #136] @ (800246c <HAL_PWREx_ConfigSupply+0x90>)
- 80023e2: 68db ldr r3, [r3, #12]
- 80023e4: f003 0307 and.w r3, r3, #7
- 80023e8: 2b06 cmp r3, #6
- 80023ea: d007 beq.n 80023fc <HAL_PWREx_ConfigSupply+0x20>
- #endif /* defined (PWR_FLAG_SCUEN) */
- {
- /* Check supply configuration */
- if ((PWR->CR3 & PWR_SUPPLY_CONFIG_MASK) != SupplySource)
- 80023ec: 4b1f ldr r3, [pc, #124] @ (800246c <HAL_PWREx_ConfigSupply+0x90>)
- 80023ee: 68db ldr r3, [r3, #12]
- 80023f0: f003 033f and.w r3, r3, #63 @ 0x3f
- 80023f4: 4283 cmp r3, r0
- 80023f6: d036 beq.n 8002466 <HAL_PWREx_ConfigSupply+0x8a>
- {
- /* Supply configuration update locked, can't apply a new supply config */
- return HAL_ERROR;
- 80023f8: 2001 movs r0, #1
- }
- }
- #endif /* defined (SMPS) */
- return HAL_OK;
- }
- 80023fa: bd38 pop {r3, r4, r5, pc}
- MODIFY_REG (PWR->CR3, PWR_SUPPLY_CONFIG_MASK, SupplySource);
- 80023fc: 4a1b ldr r2, [pc, #108] @ (800246c <HAL_PWREx_ConfigSupply+0x90>)
- 80023fe: 68d3 ldr r3, [r2, #12]
- 8002400: f023 033f bic.w r3, r3, #63 @ 0x3f
- 8002404: 4303 orrs r3, r0
- 8002406: 60d3 str r3, [r2, #12]
- tickstart = HAL_GetTick ();
- 8002408: f7fe fd40 bl 8000e8c <HAL_GetTick>
- 800240c: 4605 mov r5, r0
- while (__HAL_PWR_GET_FLAG (PWR_FLAG_ACTVOSRDY) == 0U)
- 800240e: 4b17 ldr r3, [pc, #92] @ (800246c <HAL_PWREx_ConfigSupply+0x90>)
- 8002410: 685b ldr r3, [r3, #4]
- 8002412: f413 5f00 tst.w r3, #8192 @ 0x2000
- 8002416: d107 bne.n 8002428 <HAL_PWREx_ConfigSupply+0x4c>
- if ((HAL_GetTick () - tickstart) > PWR_FLAG_SETTING_DELAY)
- 8002418: f7fe fd38 bl 8000e8c <HAL_GetTick>
- 800241c: 1b43 subs r3, r0, r5
- 800241e: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8
- 8002422: d9f4 bls.n 800240e <HAL_PWREx_ConfigSupply+0x32>
- return HAL_ERROR;
- 8002424: 2001 movs r0, #1
- 8002426: e7e8 b.n 80023fa <HAL_PWREx_ConfigSupply+0x1e>
- if ((SupplySource == PWR_SMPS_1V8_SUPPLIES_EXT_AND_LDO) ||
- 8002428: 2c2e cmp r4, #46 @ 0x2e
- 800242a: bf18 it ne
- 800242c: 2c1e cmpne r4, #30
- 800242e: d008 beq.n 8002442 <HAL_PWREx_ConfigSupply+0x66>
- (SupplySource == PWR_SMPS_2V5_SUPPLIES_EXT))
- 8002430: 2c2d cmp r4, #45 @ 0x2d
- 8002432: bf14 ite ne
- 8002434: 2300 movne r3, #0
- 8002436: 2301 moveq r3, #1
- (SupplySource == PWR_SMPS_1V8_SUPPLIES_EXT) ||
- 8002438: 2c1d cmp r4, #29
- 800243a: d002 beq.n 8002442 <HAL_PWREx_ConfigSupply+0x66>
- 800243c: b90b cbnz r3, 8002442 <HAL_PWREx_ConfigSupply+0x66>
- return HAL_OK;
- 800243e: 2000 movs r0, #0
- 8002440: e7db b.n 80023fa <HAL_PWREx_ConfigSupply+0x1e>
- tickstart = HAL_GetTick ();
- 8002442: f7fe fd23 bl 8000e8c <HAL_GetTick>
- 8002446: 4604 mov r4, r0
- while (__HAL_PWR_GET_FLAG (PWR_FLAG_SMPSEXTRDY) == 0U)
- 8002448: 4b08 ldr r3, [pc, #32] @ (800246c <HAL_PWREx_ConfigSupply+0x90>)
- 800244a: 68db ldr r3, [r3, #12]
- 800244c: f413 3f80 tst.w r3, #65536 @ 0x10000
- 8002450: d107 bne.n 8002462 <HAL_PWREx_ConfigSupply+0x86>
- if ((HAL_GetTick () - tickstart) > PWR_FLAG_SETTING_DELAY)
- 8002452: f7fe fd1b bl 8000e8c <HAL_GetTick>
- 8002456: 1b00 subs r0, r0, r4
- 8002458: f5b0 7f7a cmp.w r0, #1000 @ 0x3e8
- 800245c: d9f4 bls.n 8002448 <HAL_PWREx_ConfigSupply+0x6c>
- return HAL_ERROR;
- 800245e: 2001 movs r0, #1
- 8002460: e7cb b.n 80023fa <HAL_PWREx_ConfigSupply+0x1e>
- return HAL_OK;
- 8002462: 2000 movs r0, #0
- 8002464: e7c9 b.n 80023fa <HAL_PWREx_ConfigSupply+0x1e>
- return HAL_OK;
- 8002466: 2000 movs r0, #0
- 8002468: e7c7 b.n 80023fa <HAL_PWREx_ConfigSupply+0x1e>
- 800246a: bf00 nop
- 800246c: 58024800 .word 0x58024800
- 08002470 <HAL_RCC_OscConfig>:
- {
- uint32_t tickstart;
- uint32_t temp1_pllckcfg, temp2_pllckcfg;
- /* Check Null pointer */
- if(RCC_OscInitStruct == NULL)
- 8002470: 2800 cmp r0, #0
- 8002472: f000 8318 beq.w 8002aa6 <HAL_RCC_OscConfig+0x636>
- {
- 8002476: b538 push {r3, r4, r5, lr}
- 8002478: 4604 mov r4, r0
- }
- /* Check the parameters */
- assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType));
- /*------------------------------- HSE Configuration ------------------------*/
- if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE)
- 800247a: 6803 ldr r3, [r0, #0]
- 800247c: f013 0f01 tst.w r3, #1
- 8002480: d025 beq.n 80024ce <HAL_RCC_OscConfig+0x5e>
- {
- /* Check the parameters */
- assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState));
- const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE();
- 8002482: 4a94 ldr r2, [pc, #592] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 8002484: 6913 ldr r3, [r2, #16]
- 8002486: f003 0338 and.w r3, r3, #56 @ 0x38
- const uint32_t temp_pllckselr = RCC->PLLCKSELR;
- 800248a: 6a92 ldr r2, [r2, #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)))
- 800248c: 2b10 cmp r3, #16
- 800248e: d015 beq.n 80024bc <HAL_RCC_OscConfig+0x4c>
- 8002490: 2b18 cmp r3, #24
- 8002492: d00f beq.n 80024b4 <HAL_RCC_OscConfig+0x44>
- }
- }
- else
- {
- /* Set the new HSE configuration ---------------------------------------*/
- __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
- 8002494: 6863 ldr r3, [r4, #4]
- 8002496: f5b3 3f80 cmp.w r3, #65536 @ 0x10000
- 800249a: d03f beq.n 800251c <HAL_RCC_OscConfig+0xac>
- 800249c: 2b00 cmp r3, #0
- 800249e: d153 bne.n 8002548 <HAL_RCC_OscConfig+0xd8>
- 80024a0: 4b8c ldr r3, [pc, #560] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 80024a2: 681a ldr r2, [r3, #0]
- 80024a4: f422 3280 bic.w r2, r2, #65536 @ 0x10000
- 80024a8: 601a str r2, [r3, #0]
- 80024aa: 681a ldr r2, [r3, #0]
- 80024ac: f422 2280 bic.w r2, r2, #262144 @ 0x40000
- 80024b0: 601a str r2, [r3, #0]
- 80024b2: e038 b.n 8002526 <HAL_RCC_OscConfig+0xb6>
- if((temp_sysclksrc == RCC_CFGR_SWS_HSE) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_HSE)))
- 80024b4: f002 0203 and.w r2, r2, #3
- 80024b8: 2a02 cmp r2, #2
- 80024ba: d1eb bne.n 8002494 <HAL_RCC_OscConfig+0x24>
- if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
- 80024bc: 4b85 ldr r3, [pc, #532] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 80024be: 681b ldr r3, [r3, #0]
- 80024c0: f413 3f00 tst.w r3, #131072 @ 0x20000
- 80024c4: d003 beq.n 80024ce <HAL_RCC_OscConfig+0x5e>
- 80024c6: 6863 ldr r3, [r4, #4]
- 80024c8: 2b00 cmp r3, #0
- 80024ca: f000 82ee beq.w 8002aaa <HAL_RCC_OscConfig+0x63a>
- }
- }
- }
- }
- /*----------------------------- HSI Configuration --------------------------*/
- if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI)
- 80024ce: 6823 ldr r3, [r4, #0]
- 80024d0: f013 0f02 tst.w r3, #2
- 80024d4: f000 80a1 beq.w 800261a <HAL_RCC_OscConfig+0x1aa>
- /* 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();
- 80024d8: 4a7e ldr r2, [pc, #504] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 80024da: 6913 ldr r3, [r2, #16]
- const uint32_t temp_pllckselr = RCC->PLLCKSELR;
- 80024dc: 6a92 ldr r2, [r2, #40] @ 0x28
- if((temp_sysclksrc == RCC_CFGR_SWS_HSI) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_HSI)))
- 80024de: f013 0338 ands.w r3, r3, #56 @ 0x38
- 80024e2: d05a beq.n 800259a <HAL_RCC_OscConfig+0x12a>
- 80024e4: 2b18 cmp r3, #24
- 80024e6: d055 beq.n 8002594 <HAL_RCC_OscConfig+0x124>
- }
- else
- {
- /* Check the HSI State */
- if((RCC_OscInitStruct->HSIState)!= RCC_HSI_OFF)
- 80024e8: 68e3 ldr r3, [r4, #12]
- 80024ea: 2b00 cmp r3, #0
- 80024ec: f000 80de beq.w 80026ac <HAL_RCC_OscConfig+0x23c>
- {
- /* Enable the Internal High Speed oscillator (HSI, HSIDIV2,HSIDIV4, or HSIDIV8) */
- __HAL_RCC_HSI_CONFIG(RCC_OscInitStruct->HSIState);
- 80024f0: 4978 ldr r1, [pc, #480] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 80024f2: 680a ldr r2, [r1, #0]
- 80024f4: f022 0219 bic.w r2, r2, #25
- 80024f8: 4313 orrs r3, r2
- 80024fa: 600b str r3, [r1, #0]
- /* Get Start Tick*/
- tickstart = HAL_GetTick();
- 80024fc: f7fe fcc6 bl 8000e8c <HAL_GetTick>
- 8002500: 4605 mov r5, r0
- /* Wait till HSI is ready */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U)
- 8002502: 4b74 ldr r3, [pc, #464] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 8002504: 681b ldr r3, [r3, #0]
- 8002506: f013 0f04 tst.w r3, #4
- 800250a: f040 80ad bne.w 8002668 <HAL_RCC_OscConfig+0x1f8>
- {
- if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
- 800250e: f7fe fcbd bl 8000e8c <HAL_GetTick>
- 8002512: 1b40 subs r0, r0, r5
- 8002514: 2802 cmp r0, #2
- 8002516: d9f4 bls.n 8002502 <HAL_RCC_OscConfig+0x92>
- {
- return HAL_TIMEOUT;
- 8002518: 2003 movs r0, #3
- 800251a: e2cd b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
- 800251c: 4a6d ldr r2, [pc, #436] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 800251e: 6813 ldr r3, [r2, #0]
- 8002520: f443 3380 orr.w r3, r3, #65536 @ 0x10000
- 8002524: 6013 str r3, [r2, #0]
- if(RCC_OscInitStruct->HSEState != RCC_HSE_OFF)
- 8002526: 6863 ldr r3, [r4, #4]
- 8002528: b32b cbz r3, 8002576 <HAL_RCC_OscConfig+0x106>
- tickstart = HAL_GetTick();
- 800252a: f7fe fcaf bl 8000e8c <HAL_GetTick>
- 800252e: 4605 mov r5, r0
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U)
- 8002530: 4b68 ldr r3, [pc, #416] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 8002532: 681b ldr r3, [r3, #0]
- 8002534: f413 3f00 tst.w r3, #131072 @ 0x20000
- 8002538: d1c9 bne.n 80024ce <HAL_RCC_OscConfig+0x5e>
- if((uint32_t) (HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
- 800253a: f7fe fca7 bl 8000e8c <HAL_GetTick>
- 800253e: 1b40 subs r0, r0, r5
- 8002540: 2864 cmp r0, #100 @ 0x64
- 8002542: d9f5 bls.n 8002530 <HAL_RCC_OscConfig+0xc0>
- return HAL_TIMEOUT;
- 8002544: 2003 movs r0, #3
- 8002546: e2b7 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
- 8002548: f5b3 2fa0 cmp.w r3, #327680 @ 0x50000
- 800254c: d009 beq.n 8002562 <HAL_RCC_OscConfig+0xf2>
- 800254e: 4b61 ldr r3, [pc, #388] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 8002550: 681a ldr r2, [r3, #0]
- 8002552: f422 3280 bic.w r2, r2, #65536 @ 0x10000
- 8002556: 601a str r2, [r3, #0]
- 8002558: 681a ldr r2, [r3, #0]
- 800255a: f422 2280 bic.w r2, r2, #262144 @ 0x40000
- 800255e: 601a str r2, [r3, #0]
- 8002560: e7e1 b.n 8002526 <HAL_RCC_OscConfig+0xb6>
- 8002562: 4b5c ldr r3, [pc, #368] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 8002564: 681a ldr r2, [r3, #0]
- 8002566: f442 2280 orr.w r2, r2, #262144 @ 0x40000
- 800256a: 601a str r2, [r3, #0]
- 800256c: 681a ldr r2, [r3, #0]
- 800256e: f442 3280 orr.w r2, r2, #65536 @ 0x10000
- 8002572: 601a str r2, [r3, #0]
- 8002574: e7d7 b.n 8002526 <HAL_RCC_OscConfig+0xb6>
- tickstart = HAL_GetTick();
- 8002576: f7fe fc89 bl 8000e8c <HAL_GetTick>
- 800257a: 4605 mov r5, r0
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U)
- 800257c: 4b55 ldr r3, [pc, #340] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 800257e: 681b ldr r3, [r3, #0]
- 8002580: f413 3f00 tst.w r3, #131072 @ 0x20000
- 8002584: d0a3 beq.n 80024ce <HAL_RCC_OscConfig+0x5e>
- if((uint32_t) (HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
- 8002586: f7fe fc81 bl 8000e8c <HAL_GetTick>
- 800258a: 1b40 subs r0, r0, r5
- 800258c: 2864 cmp r0, #100 @ 0x64
- 800258e: d9f5 bls.n 800257c <HAL_RCC_OscConfig+0x10c>
- return HAL_TIMEOUT;
- 8002590: 2003 movs r0, #3
- 8002592: e291 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- if((temp_sysclksrc == RCC_CFGR_SWS_HSI) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_HSI)))
- 8002594: f012 0f03 tst.w r2, #3
- 8002598: d1a6 bne.n 80024e8 <HAL_RCC_OscConfig+0x78>
- if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF))
- 800259a: 4b4e ldr r3, [pc, #312] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 800259c: 681b ldr r3, [r3, #0]
- 800259e: f013 0f04 tst.w r3, #4
- 80025a2: d003 beq.n 80025ac <HAL_RCC_OscConfig+0x13c>
- 80025a4: 68e3 ldr r3, [r4, #12]
- 80025a6: 2b00 cmp r3, #0
- 80025a8: f000 8281 beq.w 8002aae <HAL_RCC_OscConfig+0x63e>
- __HAL_RCC_HSI_CONFIG(RCC_OscInitStruct->HSIState);
- 80025ac: 4a49 ldr r2, [pc, #292] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 80025ae: 6813 ldr r3, [r2, #0]
- 80025b0: f023 0319 bic.w r3, r3, #25
- 80025b4: 68e1 ldr r1, [r4, #12]
- 80025b6: 430b orrs r3, r1
- 80025b8: 6013 str r3, [r2, #0]
- tickstart = HAL_GetTick();
- 80025ba: f7fe fc67 bl 8000e8c <HAL_GetTick>
- 80025be: 4605 mov r5, r0
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U)
- 80025c0: 4b44 ldr r3, [pc, #272] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 80025c2: 681b ldr r3, [r3, #0]
- 80025c4: f013 0f04 tst.w r3, #4
- 80025c8: d106 bne.n 80025d8 <HAL_RCC_OscConfig+0x168>
- if((uint32_t) (HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
- 80025ca: f7fe fc5f bl 8000e8c <HAL_GetTick>
- 80025ce: 1b40 subs r0, r0, r5
- 80025d0: 2802 cmp r0, #2
- 80025d2: d9f5 bls.n 80025c0 <HAL_RCC_OscConfig+0x150>
- return HAL_TIMEOUT;
- 80025d4: 2003 movs r0, #3
- 80025d6: e26f b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
- 80025d8: f7fe fc5e bl 8000e98 <HAL_GetREVID>
- 80025dc: f241 0303 movw r3, #4099 @ 0x1003
- 80025e0: 4298 cmp r0, r3
- 80025e2: d812 bhi.n 800260a <HAL_RCC_OscConfig+0x19a>
- 80025e4: 6922 ldr r2, [r4, #16]
- 80025e6: 2a40 cmp r2, #64 @ 0x40
- 80025e8: d007 beq.n 80025fa <HAL_RCC_OscConfig+0x18a>
- 80025ea: 493a ldr r1, [pc, #232] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 80025ec: 684b ldr r3, [r1, #4]
- 80025ee: f423 337c bic.w r3, r3, #258048 @ 0x3f000
- 80025f2: ea43 3302 orr.w r3, r3, r2, lsl #12
- 80025f6: 604b str r3, [r1, #4]
- 80025f8: e00f b.n 800261a <HAL_RCC_OscConfig+0x1aa>
- 80025fa: 4a36 ldr r2, [pc, #216] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 80025fc: 6853 ldr r3, [r2, #4]
- 80025fe: f423 337c bic.w r3, r3, #258048 @ 0x3f000
- 8002602: f443 3300 orr.w r3, r3, #131072 @ 0x20000
- 8002606: 6053 str r3, [r2, #4]
- 8002608: e007 b.n 800261a <HAL_RCC_OscConfig+0x1aa>
- 800260a: 4a32 ldr r2, [pc, #200] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 800260c: 6853 ldr r3, [r2, #4]
- 800260e: f023 43fe bic.w r3, r3, #2130706432 @ 0x7f000000
- 8002612: 6921 ldr r1, [r4, #16]
- 8002614: ea43 6301 orr.w r3, r3, r1, lsl #24
- 8002618: 6053 str r3, [r2, #4]
- }
- }
- }
- }
- /*----------------------------- CSI Configuration --------------------------*/
- if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_CSI) == RCC_OSCILLATORTYPE_CSI)
- 800261a: 6823 ldr r3, [r4, #0]
- 800261c: f013 0f10 tst.w r3, #16
- 8002620: f000 8088 beq.w 8002734 <HAL_RCC_OscConfig+0x2c4>
- /* 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();
- 8002624: 4a2b ldr r2, [pc, #172] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 8002626: 6913 ldr r3, [r2, #16]
- 8002628: f003 0338 and.w r3, r3, #56 @ 0x38
- const uint32_t temp_pllckselr = RCC->PLLCKSELR;
- 800262c: 6a92 ldr r2, [r2, #40] @ 0x28
- if((temp_sysclksrc == RCC_CFGR_SWS_CSI) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_CSI)))
- 800262e: 2b08 cmp r3, #8
- 8002630: d056 beq.n 80026e0 <HAL_RCC_OscConfig+0x270>
- 8002632: 2b18 cmp r3, #24
- 8002634: d050 beq.n 80026d8 <HAL_RCC_OscConfig+0x268>
- }
- }
- else
- {
- /* Check the CSI State */
- if((RCC_OscInitStruct->CSIState)!= RCC_CSI_OFF)
- 8002636: 69e3 ldr r3, [r4, #28]
- 8002638: 2b00 cmp r3, #0
- 800263a: f000 80b8 beq.w 80027ae <HAL_RCC_OscConfig+0x33e>
- {
- /* Enable the Internal High Speed oscillator (CSI). */
- __HAL_RCC_CSI_ENABLE();
- 800263e: 4a25 ldr r2, [pc, #148] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 8002640: 6813 ldr r3, [r2, #0]
- 8002642: f043 0380 orr.w r3, r3, #128 @ 0x80
- 8002646: 6013 str r3, [r2, #0]
- /* Get Start Tick*/
- tickstart = HAL_GetTick();
- 8002648: f7fe fc20 bl 8000e8c <HAL_GetTick>
- 800264c: 4605 mov r5, r0
- /* Wait till CSI is ready */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U)
- 800264e: 4b21 ldr r3, [pc, #132] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 8002650: 681b ldr r3, [r3, #0]
- 8002652: f413 7f80 tst.w r3, #256 @ 0x100
- 8002656: f040 8088 bne.w 800276a <HAL_RCC_OscConfig+0x2fa>
- {
- if((HAL_GetTick() - tickstart ) > CSI_TIMEOUT_VALUE)
- 800265a: f7fe fc17 bl 8000e8c <HAL_GetTick>
- 800265e: 1b40 subs r0, r0, r5
- 8002660: 2802 cmp r0, #2
- 8002662: d9f4 bls.n 800264e <HAL_RCC_OscConfig+0x1de>
- {
- return HAL_TIMEOUT;
- 8002664: 2003 movs r0, #3
- 8002666: e227 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
- 8002668: f7fe fc16 bl 8000e98 <HAL_GetREVID>
- 800266c: f241 0303 movw r3, #4099 @ 0x1003
- 8002670: 4298 cmp r0, r3
- 8002672: d812 bhi.n 800269a <HAL_RCC_OscConfig+0x22a>
- 8002674: 6922 ldr r2, [r4, #16]
- 8002676: 2a40 cmp r2, #64 @ 0x40
- 8002678: d007 beq.n 800268a <HAL_RCC_OscConfig+0x21a>
- 800267a: 4916 ldr r1, [pc, #88] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 800267c: 684b ldr r3, [r1, #4]
- 800267e: f423 337c bic.w r3, r3, #258048 @ 0x3f000
- 8002682: ea43 3302 orr.w r3, r3, r2, lsl #12
- 8002686: 604b str r3, [r1, #4]
- 8002688: e7c7 b.n 800261a <HAL_RCC_OscConfig+0x1aa>
- 800268a: 4a12 ldr r2, [pc, #72] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 800268c: 6853 ldr r3, [r2, #4]
- 800268e: f423 337c bic.w r3, r3, #258048 @ 0x3f000
- 8002692: f443 3300 orr.w r3, r3, #131072 @ 0x20000
- 8002696: 6053 str r3, [r2, #4]
- 8002698: e7bf b.n 800261a <HAL_RCC_OscConfig+0x1aa>
- 800269a: 4a0e ldr r2, [pc, #56] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 800269c: 6853 ldr r3, [r2, #4]
- 800269e: f023 43fe bic.w r3, r3, #2130706432 @ 0x7f000000
- 80026a2: 6921 ldr r1, [r4, #16]
- 80026a4: ea43 6301 orr.w r3, r3, r1, lsl #24
- 80026a8: 6053 str r3, [r2, #4]
- 80026aa: e7b6 b.n 800261a <HAL_RCC_OscConfig+0x1aa>
- __HAL_RCC_HSI_DISABLE();
- 80026ac: 4a09 ldr r2, [pc, #36] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 80026ae: 6813 ldr r3, [r2, #0]
- 80026b0: f023 0301 bic.w r3, r3, #1
- 80026b4: 6013 str r3, [r2, #0]
- tickstart = HAL_GetTick();
- 80026b6: f7fe fbe9 bl 8000e8c <HAL_GetTick>
- 80026ba: 4605 mov r5, r0
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U)
- 80026bc: 4b05 ldr r3, [pc, #20] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
- 80026be: 681b ldr r3, [r3, #0]
- 80026c0: f013 0f04 tst.w r3, #4
- 80026c4: d0a9 beq.n 800261a <HAL_RCC_OscConfig+0x1aa>
- if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
- 80026c6: f7fe fbe1 bl 8000e8c <HAL_GetTick>
- 80026ca: 1b40 subs r0, r0, r5
- 80026cc: 2802 cmp r0, #2
- 80026ce: d9f5 bls.n 80026bc <HAL_RCC_OscConfig+0x24c>
- return HAL_TIMEOUT;
- 80026d0: 2003 movs r0, #3
- 80026d2: e1f1 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- 80026d4: 58024400 .word 0x58024400
- if((temp_sysclksrc == RCC_CFGR_SWS_CSI) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_CSI)))
- 80026d8: f002 0203 and.w r2, r2, #3
- 80026dc: 2a01 cmp r2, #1
- 80026de: d1aa bne.n 8002636 <HAL_RCC_OscConfig+0x1c6>
- if((__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) && (RCC_OscInitStruct->CSIState != RCC_CSI_ON))
- 80026e0: 4ba1 ldr r3, [pc, #644] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 80026e2: 681b ldr r3, [r3, #0]
- 80026e4: f413 7f80 tst.w r3, #256 @ 0x100
- 80026e8: d003 beq.n 80026f2 <HAL_RCC_OscConfig+0x282>
- 80026ea: 69e3 ldr r3, [r4, #28]
- 80026ec: 2b80 cmp r3, #128 @ 0x80
- 80026ee: f040 81e0 bne.w 8002ab2 <HAL_RCC_OscConfig+0x642>
- __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue);
- 80026f2: f7fe fbd1 bl 8000e98 <HAL_GetREVID>
- 80026f6: f241 0303 movw r3, #4099 @ 0x1003
- 80026fa: 4298 cmp r0, r3
- 80026fc: d812 bhi.n 8002724 <HAL_RCC_OscConfig+0x2b4>
- 80026fe: 6a22 ldr r2, [r4, #32]
- 8002700: 2a20 cmp r2, #32
- 8002702: d007 beq.n 8002714 <HAL_RCC_OscConfig+0x2a4>
- 8002704: 4998 ldr r1, [pc, #608] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 8002706: 684b ldr r3, [r1, #4]
- 8002708: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000
- 800270c: ea43 6382 orr.w r3, r3, r2, lsl #26
- 8002710: 604b str r3, [r1, #4]
- 8002712: e00f b.n 8002734 <HAL_RCC_OscConfig+0x2c4>
- 8002714: 4a94 ldr r2, [pc, #592] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 8002716: 6853 ldr r3, [r2, #4]
- 8002718: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000
- 800271c: f043 4380 orr.w r3, r3, #1073741824 @ 0x40000000
- 8002720: 6053 str r3, [r2, #4]
- 8002722: e007 b.n 8002734 <HAL_RCC_OscConfig+0x2c4>
- 8002724: 4a90 ldr r2, [pc, #576] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 8002726: 68d3 ldr r3, [r2, #12]
- 8002728: f023 537c bic.w r3, r3, #1056964608 @ 0x3f000000
- 800272c: 6a21 ldr r1, [r4, #32]
- 800272e: ea43 6301 orr.w r3, r3, r1, lsl #24
- 8002732: 60d3 str r3, [r2, #12]
- }
- }
- }
- }
- /*------------------------------ LSI Configuration -------------------------*/
- if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI)
- 8002734: 6823 ldr r3, [r4, #0]
- 8002736: f013 0f08 tst.w r3, #8
- 800273a: d060 beq.n 80027fe <HAL_RCC_OscConfig+0x38e>
- {
- /* Check the parameters */
- assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState));
- /* Check the LSI State */
- if((RCC_OscInitStruct->LSIState)!= RCC_LSI_OFF)
- 800273c: 6963 ldr r3, [r4, #20]
- 800273e: 2b00 cmp r3, #0
- 8002740: d049 beq.n 80027d6 <HAL_RCC_OscConfig+0x366>
- {
- /* Enable the Internal Low Speed oscillator (LSI). */
- __HAL_RCC_LSI_ENABLE();
- 8002742: 4a89 ldr r2, [pc, #548] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 8002744: 6f53 ldr r3, [r2, #116] @ 0x74
- 8002746: f043 0301 orr.w r3, r3, #1
- 800274a: 6753 str r3, [r2, #116] @ 0x74
- /* Get Start Tick*/
- tickstart = HAL_GetTick();
- 800274c: f7fe fb9e bl 8000e8c <HAL_GetTick>
- 8002750: 4605 mov r5, r0
- /* Wait till LSI is ready */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == 0U)
- 8002752: 4b85 ldr r3, [pc, #532] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 8002754: 6f5b ldr r3, [r3, #116] @ 0x74
- 8002756: f013 0f02 tst.w r3, #2
- 800275a: d150 bne.n 80027fe <HAL_RCC_OscConfig+0x38e>
- {
- if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
- 800275c: f7fe fb96 bl 8000e8c <HAL_GetTick>
- 8002760: 1b40 subs r0, r0, r5
- 8002762: 2802 cmp r0, #2
- 8002764: d9f5 bls.n 8002752 <HAL_RCC_OscConfig+0x2e2>
- {
- return HAL_TIMEOUT;
- 8002766: 2003 movs r0, #3
- 8002768: e1a6 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue);
- 800276a: f7fe fb95 bl 8000e98 <HAL_GetREVID>
- 800276e: f241 0303 movw r3, #4099 @ 0x1003
- 8002772: 4298 cmp r0, r3
- 8002774: d812 bhi.n 800279c <HAL_RCC_OscConfig+0x32c>
- 8002776: 6a22 ldr r2, [r4, #32]
- 8002778: 2a20 cmp r2, #32
- 800277a: d007 beq.n 800278c <HAL_RCC_OscConfig+0x31c>
- 800277c: 497a ldr r1, [pc, #488] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 800277e: 684b ldr r3, [r1, #4]
- 8002780: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000
- 8002784: ea43 6382 orr.w r3, r3, r2, lsl #26
- 8002788: 604b str r3, [r1, #4]
- 800278a: e7d3 b.n 8002734 <HAL_RCC_OscConfig+0x2c4>
- 800278c: 4a76 ldr r2, [pc, #472] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 800278e: 6853 ldr r3, [r2, #4]
- 8002790: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000
- 8002794: f043 4380 orr.w r3, r3, #1073741824 @ 0x40000000
- 8002798: 6053 str r3, [r2, #4]
- 800279a: e7cb b.n 8002734 <HAL_RCC_OscConfig+0x2c4>
- 800279c: 4a72 ldr r2, [pc, #456] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 800279e: 68d3 ldr r3, [r2, #12]
- 80027a0: f023 537c bic.w r3, r3, #1056964608 @ 0x3f000000
- 80027a4: 6a21 ldr r1, [r4, #32]
- 80027a6: ea43 6301 orr.w r3, r3, r1, lsl #24
- 80027aa: 60d3 str r3, [r2, #12]
- 80027ac: e7c2 b.n 8002734 <HAL_RCC_OscConfig+0x2c4>
- __HAL_RCC_CSI_DISABLE();
- 80027ae: 4a6e ldr r2, [pc, #440] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 80027b0: 6813 ldr r3, [r2, #0]
- 80027b2: f023 0380 bic.w r3, r3, #128 @ 0x80
- 80027b6: 6013 str r3, [r2, #0]
- tickstart = HAL_GetTick();
- 80027b8: f7fe fb68 bl 8000e8c <HAL_GetTick>
- 80027bc: 4605 mov r5, r0
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U)
- 80027be: 4b6a ldr r3, [pc, #424] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 80027c0: 681b ldr r3, [r3, #0]
- 80027c2: f413 7f80 tst.w r3, #256 @ 0x100
- 80027c6: d0b5 beq.n 8002734 <HAL_RCC_OscConfig+0x2c4>
- if((HAL_GetTick() - tickstart ) > CSI_TIMEOUT_VALUE)
- 80027c8: f7fe fb60 bl 8000e8c <HAL_GetTick>
- 80027cc: 1b40 subs r0, r0, r5
- 80027ce: 2802 cmp r0, #2
- 80027d0: d9f5 bls.n 80027be <HAL_RCC_OscConfig+0x34e>
- return HAL_TIMEOUT;
- 80027d2: 2003 movs r0, #3
- 80027d4: e170 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- }
- }
- else
- {
- /* Disable the Internal Low Speed oscillator (LSI). */
- __HAL_RCC_LSI_DISABLE();
- 80027d6: 4a64 ldr r2, [pc, #400] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 80027d8: 6f53 ldr r3, [r2, #116] @ 0x74
- 80027da: f023 0301 bic.w r3, r3, #1
- 80027de: 6753 str r3, [r2, #116] @ 0x74
- /* Get Start Tick*/
- tickstart = HAL_GetTick();
- 80027e0: f7fe fb54 bl 8000e8c <HAL_GetTick>
- 80027e4: 4605 mov r5, r0
- /* Wait till LSI is ready */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != 0U)
- 80027e6: 4b60 ldr r3, [pc, #384] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 80027e8: 6f5b ldr r3, [r3, #116] @ 0x74
- 80027ea: f013 0f02 tst.w r3, #2
- 80027ee: d006 beq.n 80027fe <HAL_RCC_OscConfig+0x38e>
- {
- if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
- 80027f0: f7fe fb4c bl 8000e8c <HAL_GetTick>
- 80027f4: 1b40 subs r0, r0, r5
- 80027f6: 2802 cmp r0, #2
- 80027f8: d9f5 bls.n 80027e6 <HAL_RCC_OscConfig+0x376>
- {
- return HAL_TIMEOUT;
- 80027fa: 2003 movs r0, #3
- 80027fc: e15c b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- }
- }
- }
- /*------------------------------ HSI48 Configuration -------------------------*/
- if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI48) == RCC_OSCILLATORTYPE_HSI48)
- 80027fe: 6823 ldr r3, [r4, #0]
- 8002800: f013 0f20 tst.w r3, #32
- 8002804: d029 beq.n 800285a <HAL_RCC_OscConfig+0x3ea>
- {
- /* Check the parameters */
- assert_param(IS_RCC_HSI48(RCC_OscInitStruct->HSI48State));
- /* Check the HSI48 State */
- if((RCC_OscInitStruct->HSI48State)!= RCC_HSI48_OFF)
- 8002806: 69a3 ldr r3, [r4, #24]
- 8002808: b19b cbz r3, 8002832 <HAL_RCC_OscConfig+0x3c2>
- {
- /* Enable the Internal Low Speed oscillator (HSI48). */
- __HAL_RCC_HSI48_ENABLE();
- 800280a: 4a57 ldr r2, [pc, #348] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 800280c: 6813 ldr r3, [r2, #0]
- 800280e: f443 5380 orr.w r3, r3, #4096 @ 0x1000
- 8002812: 6013 str r3, [r2, #0]
- /* Get time-out */
- tickstart = HAL_GetTick();
- 8002814: f7fe fb3a bl 8000e8c <HAL_GetTick>
- 8002818: 4605 mov r5, r0
- /* Wait till HSI48 is ready */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) == 0U)
- 800281a: 4b53 ldr r3, [pc, #332] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 800281c: 681b ldr r3, [r3, #0]
- 800281e: f413 5f00 tst.w r3, #8192 @ 0x2000
- 8002822: d11a bne.n 800285a <HAL_RCC_OscConfig+0x3ea>
- {
- if((HAL_GetTick() - tickstart ) > HSI48_TIMEOUT_VALUE)
- 8002824: f7fe fb32 bl 8000e8c <HAL_GetTick>
- 8002828: 1b40 subs r0, r0, r5
- 800282a: 2802 cmp r0, #2
- 800282c: d9f5 bls.n 800281a <HAL_RCC_OscConfig+0x3aa>
- {
- return HAL_TIMEOUT;
- 800282e: 2003 movs r0, #3
- 8002830: e142 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- }
- }
- else
- {
- /* Disable the Internal Low Speed oscillator (HSI48). */
- __HAL_RCC_HSI48_DISABLE();
- 8002832: 4a4d ldr r2, [pc, #308] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 8002834: 6813 ldr r3, [r2, #0]
- 8002836: f423 5380 bic.w r3, r3, #4096 @ 0x1000
- 800283a: 6013 str r3, [r2, #0]
- /* Get time-out */
- tickstart = HAL_GetTick();
- 800283c: f7fe fb26 bl 8000e8c <HAL_GetTick>
- 8002840: 4605 mov r5, r0
- /* Wait till HSI48 is ready */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) != 0U)
- 8002842: 4b49 ldr r3, [pc, #292] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 8002844: 681b ldr r3, [r3, #0]
- 8002846: f413 5f00 tst.w r3, #8192 @ 0x2000
- 800284a: d006 beq.n 800285a <HAL_RCC_OscConfig+0x3ea>
- {
- if((HAL_GetTick() - tickstart ) > HSI48_TIMEOUT_VALUE)
- 800284c: f7fe fb1e bl 8000e8c <HAL_GetTick>
- 8002850: 1b40 subs r0, r0, r5
- 8002852: 2802 cmp r0, #2
- 8002854: d9f5 bls.n 8002842 <HAL_RCC_OscConfig+0x3d2>
- {
- return HAL_TIMEOUT;
- 8002856: 2003 movs r0, #3
- 8002858: e12e b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- }
- }
- }
- }
- /*------------------------------ LSE Configuration -------------------------*/
- if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE)
- 800285a: 6823 ldr r3, [r4, #0]
- 800285c: f013 0f04 tst.w r3, #4
- 8002860: d121 bne.n 80028a6 <HAL_RCC_OscConfig+0x436>
- }
- }
- /*-------------------------------- PLL Configuration -----------------------*/
- /* Check the parameters */
- assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState));
- if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE)
- 8002862: 6a63 ldr r3, [r4, #36] @ 0x24
- 8002864: 2b00 cmp r3, #0
- 8002866: f000 8126 beq.w 8002ab6 <HAL_RCC_OscConfig+0x646>
- {
- /* Check if the PLL is used as system clock or not */
- if(__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_CFGR_SWS_PLL1)
- 800286a: 4a3f ldr r2, [pc, #252] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 800286c: 6912 ldr r2, [r2, #16]
- 800286e: f002 0238 and.w r2, r2, #56 @ 0x38
- 8002872: 2a18 cmp r2, #24
- 8002874: f000 80ee beq.w 8002a54 <HAL_RCC_OscConfig+0x5e4>
- {
- if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON)
- 8002878: 2b02 cmp r3, #2
- 800287a: d079 beq.n 8002970 <HAL_RCC_OscConfig+0x500>
- }
- }
- else
- {
- /* Disable the main PLL. */
- __HAL_RCC_PLL_DISABLE();
- 800287c: 4a3a ldr r2, [pc, #232] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 800287e: 6813 ldr r3, [r2, #0]
- 8002880: f023 7380 bic.w r3, r3, #16777216 @ 0x1000000
- 8002884: 6013 str r3, [r2, #0]
- /* Get Start Tick*/
- tickstart = HAL_GetTick();
- 8002886: f7fe fb01 bl 8000e8c <HAL_GetTick>
- 800288a: 4604 mov r4, r0
- /* Wait till PLL is disabled */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U)
- 800288c: 4b36 ldr r3, [pc, #216] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 800288e: 681b ldr r3, [r3, #0]
- 8002890: f013 7f00 tst.w r3, #33554432 @ 0x2000000
- 8002894: f000 80dc beq.w 8002a50 <HAL_RCC_OscConfig+0x5e0>
- {
- if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
- 8002898: f7fe faf8 bl 8000e8c <HAL_GetTick>
- 800289c: 1b00 subs r0, r0, r4
- 800289e: 2802 cmp r0, #2
- 80028a0: d9f4 bls.n 800288c <HAL_RCC_OscConfig+0x41c>
- {
- return HAL_TIMEOUT;
- 80028a2: 2003 movs r0, #3
- 80028a4: e108 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- PWR->CR1 |= PWR_CR1_DBP;
- 80028a6: 4a31 ldr r2, [pc, #196] @ (800296c <HAL_RCC_OscConfig+0x4fc>)
- 80028a8: 6813 ldr r3, [r2, #0]
- 80028aa: f443 7380 orr.w r3, r3, #256 @ 0x100
- 80028ae: 6013 str r3, [r2, #0]
- tickstart = HAL_GetTick();
- 80028b0: f7fe faec bl 8000e8c <HAL_GetTick>
- 80028b4: 4605 mov r5, r0
- while((PWR->CR1 & PWR_CR1_DBP) == 0U)
- 80028b6: 4b2d ldr r3, [pc, #180] @ (800296c <HAL_RCC_OscConfig+0x4fc>)
- 80028b8: 681b ldr r3, [r3, #0]
- 80028ba: f413 7f80 tst.w r3, #256 @ 0x100
- 80028be: d106 bne.n 80028ce <HAL_RCC_OscConfig+0x45e>
- if((HAL_GetTick() - tickstart ) > RCC_DBP_TIMEOUT_VALUE)
- 80028c0: f7fe fae4 bl 8000e8c <HAL_GetTick>
- 80028c4: 1b40 subs r0, r0, r5
- 80028c6: 2864 cmp r0, #100 @ 0x64
- 80028c8: d9f5 bls.n 80028b6 <HAL_RCC_OscConfig+0x446>
- return HAL_TIMEOUT;
- 80028ca: 2003 movs r0, #3
- 80028cc: e0f4 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
- 80028ce: 68a3 ldr r3, [r4, #8]
- 80028d0: 2b01 cmp r3, #1
- 80028d2: d00a beq.n 80028ea <HAL_RCC_OscConfig+0x47a>
- 80028d4: bb0b cbnz r3, 800291a <HAL_RCC_OscConfig+0x4aa>
- 80028d6: 4b24 ldr r3, [pc, #144] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 80028d8: 6f1a ldr r2, [r3, #112] @ 0x70
- 80028da: f022 0201 bic.w r2, r2, #1
- 80028de: 671a str r2, [r3, #112] @ 0x70
- 80028e0: 6f1a ldr r2, [r3, #112] @ 0x70
- 80028e2: f022 0204 bic.w r2, r2, #4
- 80028e6: 671a str r2, [r3, #112] @ 0x70
- 80028e8: e004 b.n 80028f4 <HAL_RCC_OscConfig+0x484>
- 80028ea: 4a1f ldr r2, [pc, #124] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 80028ec: 6f13 ldr r3, [r2, #112] @ 0x70
- 80028ee: f043 0301 orr.w r3, r3, #1
- 80028f2: 6713 str r3, [r2, #112] @ 0x70
- if((RCC_OscInitStruct->LSEState) != RCC_LSE_OFF)
- 80028f4: 68a3 ldr r3, [r4, #8]
- 80028f6: b333 cbz r3, 8002946 <HAL_RCC_OscConfig+0x4d6>
- tickstart = HAL_GetTick();
- 80028f8: f7fe fac8 bl 8000e8c <HAL_GetTick>
- 80028fc: 4605 mov r5, r0
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U)
- 80028fe: 4b1a ldr r3, [pc, #104] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 8002900: 6f1b ldr r3, [r3, #112] @ 0x70
- 8002902: f013 0f02 tst.w r3, #2
- 8002906: d1ac bne.n 8002862 <HAL_RCC_OscConfig+0x3f2>
- if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
- 8002908: f7fe fac0 bl 8000e8c <HAL_GetTick>
- 800290c: 1b40 subs r0, r0, r5
- 800290e: f241 3388 movw r3, #5000 @ 0x1388
- 8002912: 4298 cmp r0, r3
- 8002914: d9f3 bls.n 80028fe <HAL_RCC_OscConfig+0x48e>
- return HAL_TIMEOUT;
- 8002916: 2003 movs r0, #3
- 8002918: e0ce b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
- 800291a: 2b05 cmp r3, #5
- 800291c: d009 beq.n 8002932 <HAL_RCC_OscConfig+0x4c2>
- 800291e: 4b12 ldr r3, [pc, #72] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 8002920: 6f1a ldr r2, [r3, #112] @ 0x70
- 8002922: f022 0201 bic.w r2, r2, #1
- 8002926: 671a str r2, [r3, #112] @ 0x70
- 8002928: 6f1a ldr r2, [r3, #112] @ 0x70
- 800292a: f022 0204 bic.w r2, r2, #4
- 800292e: 671a str r2, [r3, #112] @ 0x70
- 8002930: e7e0 b.n 80028f4 <HAL_RCC_OscConfig+0x484>
- 8002932: 4b0d ldr r3, [pc, #52] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 8002934: 6f1a ldr r2, [r3, #112] @ 0x70
- 8002936: f042 0204 orr.w r2, r2, #4
- 800293a: 671a str r2, [r3, #112] @ 0x70
- 800293c: 6f1a ldr r2, [r3, #112] @ 0x70
- 800293e: f042 0201 orr.w r2, r2, #1
- 8002942: 671a str r2, [r3, #112] @ 0x70
- 8002944: e7d6 b.n 80028f4 <HAL_RCC_OscConfig+0x484>
- tickstart = HAL_GetTick();
- 8002946: f7fe faa1 bl 8000e8c <HAL_GetTick>
- 800294a: 4605 mov r5, r0
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != 0U)
- 800294c: 4b06 ldr r3, [pc, #24] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
- 800294e: 6f1b ldr r3, [r3, #112] @ 0x70
- 8002950: f013 0f02 tst.w r3, #2
- 8002954: d085 beq.n 8002862 <HAL_RCC_OscConfig+0x3f2>
- if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
- 8002956: f7fe fa99 bl 8000e8c <HAL_GetTick>
- 800295a: 1b40 subs r0, r0, r5
- 800295c: f241 3388 movw r3, #5000 @ 0x1388
- 8002960: 4298 cmp r0, r3
- 8002962: d9f3 bls.n 800294c <HAL_RCC_OscConfig+0x4dc>
- return HAL_TIMEOUT;
- 8002964: 2003 movs r0, #3
- 8002966: e0a7 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- 8002968: 58024400 .word 0x58024400
- 800296c: 58024800 .word 0x58024800
- __HAL_RCC_PLL_DISABLE();
- 8002970: 4a59 ldr r2, [pc, #356] @ (8002ad8 <HAL_RCC_OscConfig+0x668>)
- 8002972: 6813 ldr r3, [r2, #0]
- 8002974: f023 7380 bic.w r3, r3, #16777216 @ 0x1000000
- 8002978: 6013 str r3, [r2, #0]
- tickstart = HAL_GetTick();
- 800297a: f7fe fa87 bl 8000e8c <HAL_GetTick>
- 800297e: 4605 mov r5, r0
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U)
- 8002980: 4b55 ldr r3, [pc, #340] @ (8002ad8 <HAL_RCC_OscConfig+0x668>)
- 8002982: 681b ldr r3, [r3, #0]
- 8002984: f013 7f00 tst.w r3, #33554432 @ 0x2000000
- 8002988: d006 beq.n 8002998 <HAL_RCC_OscConfig+0x528>
- if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
- 800298a: f7fe fa7f bl 8000e8c <HAL_GetTick>
- 800298e: 1b40 subs r0, r0, r5
- 8002990: 2802 cmp r0, #2
- 8002992: d9f5 bls.n 8002980 <HAL_RCC_OscConfig+0x510>
- return HAL_TIMEOUT;
- 8002994: 2003 movs r0, #3
- 8002996: e08f b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- __HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource,
- 8002998: 4b4f ldr r3, [pc, #316] @ (8002ad8 <HAL_RCC_OscConfig+0x668>)
- 800299a: 6a99 ldr r1, [r3, #40] @ 0x28
- 800299c: 4a4f ldr r2, [pc, #316] @ (8002adc <HAL_RCC_OscConfig+0x66c>)
- 800299e: 400a ands r2, r1
- 80029a0: 6aa1 ldr r1, [r4, #40] @ 0x28
- 80029a2: 6ae0 ldr r0, [r4, #44] @ 0x2c
- 80029a4: ea41 1100 orr.w r1, r1, r0, lsl #4
- 80029a8: 430a orrs r2, r1
- 80029aa: 629a str r2, [r3, #40] @ 0x28
- 80029ac: 6b22 ldr r2, [r4, #48] @ 0x30
- 80029ae: 3a01 subs r2, #1
- 80029b0: f3c2 0208 ubfx r2, r2, #0, #9
- 80029b4: 6b61 ldr r1, [r4, #52] @ 0x34
- 80029b6: 3901 subs r1, #1
- 80029b8: 0249 lsls r1, r1, #9
- 80029ba: b289 uxth r1, r1
- 80029bc: 430a orrs r2, r1
- 80029be: 6ba1 ldr r1, [r4, #56] @ 0x38
- 80029c0: 3901 subs r1, #1
- 80029c2: 0409 lsls r1, r1, #16
- 80029c4: f401 01fe and.w r1, r1, #8323072 @ 0x7f0000
- 80029c8: 430a orrs r2, r1
- 80029ca: 6be1 ldr r1, [r4, #60] @ 0x3c
- 80029cc: 3901 subs r1, #1
- 80029ce: 0609 lsls r1, r1, #24
- 80029d0: f001 41fe and.w r1, r1, #2130706432 @ 0x7f000000
- 80029d4: 430a orrs r2, r1
- 80029d6: 631a str r2, [r3, #48] @ 0x30
- __HAL_RCC_PLLFRACN_DISABLE();
- 80029d8: 6ada ldr r2, [r3, #44] @ 0x2c
- 80029da: f022 0201 bic.w r2, r2, #1
- 80029de: 62da str r2, [r3, #44] @ 0x2c
- __HAL_RCC_PLLFRACN_CONFIG(RCC_OscInitStruct->PLL.PLLFRACN);
- 80029e0: 6b59 ldr r1, [r3, #52] @ 0x34
- 80029e2: 4a3f ldr r2, [pc, #252] @ (8002ae0 <HAL_RCC_OscConfig+0x670>)
- 80029e4: 400a ands r2, r1
- 80029e6: 6ca1 ldr r1, [r4, #72] @ 0x48
- 80029e8: ea42 02c1 orr.w r2, r2, r1, lsl #3
- 80029ec: 635a str r2, [r3, #52] @ 0x34
- __HAL_RCC_PLL_VCIRANGE(RCC_OscInitStruct->PLL.PLLRGE) ;
- 80029ee: 6ada ldr r2, [r3, #44] @ 0x2c
- 80029f0: f022 020c bic.w r2, r2, #12
- 80029f4: 6c21 ldr r1, [r4, #64] @ 0x40
- 80029f6: 430a orrs r2, r1
- 80029f8: 62da str r2, [r3, #44] @ 0x2c
- __HAL_RCC_PLL_VCORANGE(RCC_OscInitStruct->PLL.PLLVCOSEL) ;
- 80029fa: 6ada ldr r2, [r3, #44] @ 0x2c
- 80029fc: f022 0202 bic.w r2, r2, #2
- 8002a00: 6c61 ldr r1, [r4, #68] @ 0x44
- 8002a02: 430a orrs r2, r1
- 8002a04: 62da str r2, [r3, #44] @ 0x2c
- __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVP);
- 8002a06: 6ada ldr r2, [r3, #44] @ 0x2c
- 8002a08: f442 3280 orr.w r2, r2, #65536 @ 0x10000
- 8002a0c: 62da str r2, [r3, #44] @ 0x2c
- __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ);
- 8002a0e: 6ada ldr r2, [r3, #44] @ 0x2c
- 8002a10: f442 3200 orr.w r2, r2, #131072 @ 0x20000
- 8002a14: 62da str r2, [r3, #44] @ 0x2c
- __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVR);
- 8002a16: 6ada ldr r2, [r3, #44] @ 0x2c
- 8002a18: f442 2280 orr.w r2, r2, #262144 @ 0x40000
- 8002a1c: 62da str r2, [r3, #44] @ 0x2c
- __HAL_RCC_PLLFRACN_ENABLE();
- 8002a1e: 6ada ldr r2, [r3, #44] @ 0x2c
- 8002a20: f042 0201 orr.w r2, r2, #1
- 8002a24: 62da str r2, [r3, #44] @ 0x2c
- __HAL_RCC_PLL_ENABLE();
- 8002a26: 681a ldr r2, [r3, #0]
- 8002a28: f042 7280 orr.w r2, r2, #16777216 @ 0x1000000
- 8002a2c: 601a str r2, [r3, #0]
- tickstart = HAL_GetTick();
- 8002a2e: f7fe fa2d bl 8000e8c <HAL_GetTick>
- 8002a32: 4604 mov r4, r0
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U)
- 8002a34: 4b28 ldr r3, [pc, #160] @ (8002ad8 <HAL_RCC_OscConfig+0x668>)
- 8002a36: 681b ldr r3, [r3, #0]
- 8002a38: f013 7f00 tst.w r3, #33554432 @ 0x2000000
- 8002a3c: d106 bne.n 8002a4c <HAL_RCC_OscConfig+0x5dc>
- if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
- 8002a3e: f7fe fa25 bl 8000e8c <HAL_GetTick>
- 8002a42: 1b00 subs r0, r0, r4
- 8002a44: 2802 cmp r0, #2
- 8002a46: d9f5 bls.n 8002a34 <HAL_RCC_OscConfig+0x5c4>
- return HAL_TIMEOUT;
- 8002a48: 2003 movs r0, #3
- 8002a4a: e035 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- {
- return HAL_ERROR;
- }
- }
- }
- return HAL_OK;
- 8002a4c: 2000 movs r0, #0
- 8002a4e: e033 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- 8002a50: 2000 movs r0, #0
- 8002a52: e031 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- temp1_pllckcfg = RCC->PLLCKSELR;
- 8002a54: 4a20 ldr r2, [pc, #128] @ (8002ad8 <HAL_RCC_OscConfig+0x668>)
- 8002a56: 6a91 ldr r1, [r2, #40] @ 0x28
- temp2_pllckcfg = RCC->PLL1DIVR;
- 8002a58: 6b10 ldr r0, [r2, #48] @ 0x30
- if(((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
- 8002a5a: 2b01 cmp r3, #1
- 8002a5c: d02d beq.n 8002aba <HAL_RCC_OscConfig+0x64a>
- (READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
- 8002a5e: f001 0303 and.w r3, r1, #3
- 8002a62: 6aa2 ldr r2, [r4, #40] @ 0x28
- if(((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
- 8002a64: 4293 cmp r3, r2
- 8002a66: d12a bne.n 8002abe <HAL_RCC_OscConfig+0x64e>
- ((READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_DIVM1) >> RCC_PLLCKSELR_DIVM1_Pos) != RCC_OscInitStruct->PLL.PLLM) ||
- 8002a68: f3c1 1105 ubfx r1, r1, #4, #6
- 8002a6c: 6ae3 ldr r3, [r4, #44] @ 0x2c
- (READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
- 8002a6e: 4299 cmp r1, r3
- 8002a70: d127 bne.n 8002ac2 <HAL_RCC_OscConfig+0x652>
- (READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_N1) != (RCC_OscInitStruct->PLL.PLLN - 1U)) ||
- 8002a72: f3c0 0208 ubfx r2, r0, #0, #9
- 8002a76: 6b23 ldr r3, [r4, #48] @ 0x30
- 8002a78: 3b01 subs r3, #1
- ((READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_DIVM1) >> RCC_PLLCKSELR_DIVM1_Pos) != RCC_OscInitStruct->PLL.PLLM) ||
- 8002a7a: 429a cmp r2, r3
- 8002a7c: d123 bne.n 8002ac6 <HAL_RCC_OscConfig+0x656>
- ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_P1) >> RCC_PLL1DIVR_P1_Pos) != (RCC_OscInitStruct->PLL.PLLP - 1U)) ||
- 8002a7e: f3c0 2246 ubfx r2, r0, #9, #7
- 8002a82: 6b63 ldr r3, [r4, #52] @ 0x34
- 8002a84: 3b01 subs r3, #1
- (READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_N1) != (RCC_OscInitStruct->PLL.PLLN - 1U)) ||
- 8002a86: 429a cmp r2, r3
- 8002a88: d11f bne.n 8002aca <HAL_RCC_OscConfig+0x65a>
- ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_Q1) >> RCC_PLL1DIVR_Q1_Pos) != (RCC_OscInitStruct->PLL.PLLQ - 1U)) ||
- 8002a8a: f3c0 4206 ubfx r2, r0, #16, #7
- 8002a8e: 6ba3 ldr r3, [r4, #56] @ 0x38
- 8002a90: 3b01 subs r3, #1
- ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_P1) >> RCC_PLL1DIVR_P1_Pos) != (RCC_OscInitStruct->PLL.PLLP - 1U)) ||
- 8002a92: 429a cmp r2, r3
- 8002a94: d11b bne.n 8002ace <HAL_RCC_OscConfig+0x65e>
- ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_R1) >> RCC_PLL1DIVR_R1_Pos) != (RCC_OscInitStruct->PLL.PLLR - 1U)))
- 8002a96: f3c0 6006 ubfx r0, r0, #24, #7
- 8002a9a: 6be3 ldr r3, [r4, #60] @ 0x3c
- 8002a9c: 3b01 subs r3, #1
- ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_Q1) >> RCC_PLL1DIVR_Q1_Pos) != (RCC_OscInitStruct->PLL.PLLQ - 1U)) ||
- 8002a9e: 4298 cmp r0, r3
- 8002aa0: d117 bne.n 8002ad2 <HAL_RCC_OscConfig+0x662>
- return HAL_OK;
- 8002aa2: 2000 movs r0, #0
- 8002aa4: e008 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- return HAL_ERROR;
- 8002aa6: 2001 movs r0, #1
- }
- 8002aa8: 4770 bx lr
- return HAL_ERROR;
- 8002aaa: 2001 movs r0, #1
- 8002aac: e004 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- return HAL_ERROR;
- 8002aae: 2001 movs r0, #1
- 8002ab0: e002 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- return HAL_ERROR;
- 8002ab2: 2001 movs r0, #1
- 8002ab4: e000 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- return HAL_OK;
- 8002ab6: 2000 movs r0, #0
- }
- 8002ab8: bd38 pop {r3, r4, r5, pc}
- return HAL_ERROR;
- 8002aba: 2001 movs r0, #1
- 8002abc: e7fc b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- 8002abe: 2001 movs r0, #1
- 8002ac0: e7fa b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- 8002ac2: 2001 movs r0, #1
- 8002ac4: e7f8 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- 8002ac6: 2001 movs r0, #1
- 8002ac8: e7f6 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- 8002aca: 2001 movs r0, #1
- 8002acc: e7f4 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- 8002ace: 2001 movs r0, #1
- 8002ad0: e7f2 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- 8002ad2: 2001 movs r0, #1
- 8002ad4: e7f0 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
- 8002ad6: bf00 nop
- 8002ad8: 58024400 .word 0x58024400
- 8002adc: fffffc0c .word 0xfffffc0c
- 8002ae0: ffff0007 .word 0xffff0007
- 08002ae4 <HAL_RCC_GetSysClockFreq>:
- float_t fracn1, pllvco;
- uint32_t sysclockfreq;
- /* Get SYSCLK source -------------------------------------------------------*/
- switch (RCC->CFGR & RCC_CFGR_SWS)
- 8002ae4: 4b74 ldr r3, [pc, #464] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
- 8002ae6: 691b ldr r3, [r3, #16]
- 8002ae8: f003 0338 and.w r3, r3, #56 @ 0x38
- 8002aec: 2b10 cmp r3, #16
- 8002aee: f000 80de beq.w 8002cae <HAL_RCC_GetSysClockFreq+0x1ca>
- 8002af2: 2b18 cmp r3, #24
- 8002af4: d00f beq.n 8002b16 <HAL_RCC_GetSysClockFreq+0x32>
- 8002af6: b10b cbz r3, 8002afc <HAL_RCC_GetSysClockFreq+0x18>
- 8002af8: 4870 ldr r0, [pc, #448] @ (8002cbc <HAL_RCC_GetSysClockFreq+0x1d8>)
- 8002afa: 4770 bx lr
- {
- case RCC_CFGR_SWS_HSI: /* HSI used as system clock source */
- if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U)
- 8002afc: 4b6e ldr r3, [pc, #440] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
- 8002afe: 681b ldr r3, [r3, #0]
- 8002b00: f013 0f20 tst.w r3, #32
- 8002b04: f000 80d5 beq.w 8002cb2 <HAL_RCC_GetSysClockFreq+0x1ce>
- {
- sysclockfreq = (uint32_t) (HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER()>> 3));
- 8002b08: 4b6b ldr r3, [pc, #428] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
- 8002b0a: 681b ldr r3, [r3, #0]
- 8002b0c: f3c3 03c1 ubfx r3, r3, #3, #2
- 8002b10: 486b ldr r0, [pc, #428] @ (8002cc0 <HAL_RCC_GetSysClockFreq+0x1dc>)
- 8002b12: 40d8 lsrs r0, r3
- 8002b14: 4770 bx lr
- {
- 8002b16: b410 push {r4}
- 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);
- 8002b18: 4b67 ldr r3, [pc, #412] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
- 8002b1a: 6a9a ldr r2, [r3, #40] @ 0x28
- 8002b1c: f002 0203 and.w r2, r2, #3
- pllm = ((RCC->PLLCKSELR & RCC_PLLCKSELR_DIVM1)>> 4) ;
- 8002b20: 6a9c ldr r4, [r3, #40] @ 0x28
- 8002b22: f3c4 1005 ubfx r0, r4, #4, #6
- pllfracen = ((RCC-> PLLCFGR & RCC_PLLCFGR_PLL1FRACEN)>>RCC_PLLCFGR_PLL1FRACEN_Pos);
- 8002b26: 6ad9 ldr r1, [r3, #44] @ 0x2c
- 8002b28: f001 0101 and.w r1, r1, #1
- fracn1 = (float_t)(uint32_t)(pllfracen* ((RCC->PLL1FRACR & RCC_PLL1FRACR_FRACN1)>> 3));
- 8002b2c: 6b5b ldr r3, [r3, #52] @ 0x34
- 8002b2e: f3c3 03cc ubfx r3, r3, #3, #13
- 8002b32: fb01 f303 mul.w r3, r1, r3
- 8002b36: ee07 3a90 vmov s15, r3
- 8002b3a: eef8 7a67 vcvt.f32.u32 s15, s15
- if (pllm != 0U)
- 8002b3e: f414 7f7c tst.w r4, #1008 @ 0x3f0
- 8002b42: f000 8094 beq.w 8002c6e <HAL_RCC_GetSysClockFreq+0x18a>
- {
- switch (pllsource)
- 8002b46: 2a01 cmp r2, #1
- 8002b48: d066 beq.n 8002c18 <HAL_RCC_GetSysClockFreq+0x134>
- 8002b4a: 2a02 cmp r2, #2
- 8002b4c: f000 8092 beq.w 8002c74 <HAL_RCC_GetSysClockFreq+0x190>
- 8002b50: b1e2 cbz r2, 8002b8c <HAL_RCC_GetSysClockFreq+0xa8>
- 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 );
- break;
- 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 );
- 8002b52: ee07 0a10 vmov s14, r0
- 8002b56: eef8 6a47 vcvt.f32.u32 s13, s14
- 8002b5a: ed9f 6a5a vldr s12, [pc, #360] @ 8002cc4 <HAL_RCC_GetSysClockFreq+0x1e0>
- 8002b5e: ee86 7a26 vdiv.f32 s14, s12, s13
- 8002b62: 4b55 ldr r3, [pc, #340] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
- 8002b64: 6b1b ldr r3, [r3, #48] @ 0x30
- 8002b66: f3c3 0308 ubfx r3, r3, #0, #9
- 8002b6a: ee06 3a90 vmov s13, r3
- 8002b6e: eef8 6a66 vcvt.f32.u32 s13, s13
- 8002b72: ed9f 6a55 vldr s12, [pc, #340] @ 8002cc8 <HAL_RCC_GetSysClockFreq+0x1e4>
- 8002b76: ee67 7a86 vmul.f32 s15, s15, s12
- 8002b7a: ee76 7aa7 vadd.f32 s15, s13, s15
- 8002b7e: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0
- 8002b82: ee77 7aa6 vadd.f32 s15, s15, s13
- 8002b86: ee27 7a27 vmul.f32 s14, s14, s15
- break;
- 8002b8a: e061 b.n 8002c50 <HAL_RCC_GetSysClockFreq+0x16c>
- if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U)
- 8002b8c: 4b4a ldr r3, [pc, #296] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
- 8002b8e: 681b ldr r3, [r3, #0]
- 8002b90: f013 0f20 tst.w r3, #32
- 8002b94: d023 beq.n 8002bde <HAL_RCC_GetSysClockFreq+0xfa>
- hsivalue= (HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER()>> 3));
- 8002b96: 4948 ldr r1, [pc, #288] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
- 8002b98: 680a ldr r2, [r1, #0]
- 8002b9a: f3c2 02c1 ubfx r2, r2, #3, #2
- 8002b9e: 4b48 ldr r3, [pc, #288] @ (8002cc0 <HAL_RCC_GetSysClockFreq+0x1dc>)
- 8002ba0: 40d3 lsrs r3, r2
- pllvco = ( (float_t)hsivalue / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
- 8002ba2: ee07 3a10 vmov s14, r3
- 8002ba6: eef8 6a47 vcvt.f32.u32 s13, s14
- 8002baa: ee07 0a10 vmov s14, r0
- 8002bae: eeb8 6a47 vcvt.f32.u32 s12, s14
- 8002bb2: ee86 7a86 vdiv.f32 s14, s13, s12
- 8002bb6: 6b0b ldr r3, [r1, #48] @ 0x30
- 8002bb8: f3c3 0308 ubfx r3, r3, #0, #9
- 8002bbc: ee06 3a90 vmov s13, r3
- 8002bc0: eef8 6a66 vcvt.f32.u32 s13, s13
- 8002bc4: ed9f 6a40 vldr s12, [pc, #256] @ 8002cc8 <HAL_RCC_GetSysClockFreq+0x1e4>
- 8002bc8: ee67 7a86 vmul.f32 s15, s15, s12
- 8002bcc: ee76 7aa7 vadd.f32 s15, s13, s15
- 8002bd0: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0
- 8002bd4: ee77 7aa6 vadd.f32 s15, s15, s13
- 8002bd8: ee27 7a27 vmul.f32 s14, s14, s15
- 8002bdc: e038 b.n 8002c50 <HAL_RCC_GetSysClockFreq+0x16c>
- pllvco = ((float_t)HSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
- 8002bde: ee07 0a10 vmov s14, r0
- 8002be2: eef8 6a47 vcvt.f32.u32 s13, s14
- 8002be6: ed9f 6a39 vldr s12, [pc, #228] @ 8002ccc <HAL_RCC_GetSysClockFreq+0x1e8>
- 8002bea: ee86 7a26 vdiv.f32 s14, s12, s13
- 8002bee: 4b32 ldr r3, [pc, #200] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
- 8002bf0: 6b1b ldr r3, [r3, #48] @ 0x30
- 8002bf2: f3c3 0308 ubfx r3, r3, #0, #9
- 8002bf6: ee06 3a90 vmov s13, r3
- 8002bfa: eef8 6a66 vcvt.f32.u32 s13, s13
- 8002bfe: ed9f 6a32 vldr s12, [pc, #200] @ 8002cc8 <HAL_RCC_GetSysClockFreq+0x1e4>
- 8002c02: ee67 7a86 vmul.f32 s15, s15, s12
- 8002c06: ee76 7aa7 vadd.f32 s15, s13, s15
- 8002c0a: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0
- 8002c0e: ee77 7aa6 vadd.f32 s15, s15, s13
- 8002c12: ee27 7a27 vmul.f32 s14, s14, s15
- 8002c16: e01b b.n 8002c50 <HAL_RCC_GetSysClockFreq+0x16c>
- pllvco = ((float_t)CSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
- 8002c18: ee07 0a10 vmov s14, r0
- 8002c1c: eef8 6a47 vcvt.f32.u32 s13, s14
- 8002c20: ed9f 6a28 vldr s12, [pc, #160] @ 8002cc4 <HAL_RCC_GetSysClockFreq+0x1e0>
- 8002c24: ee86 7a26 vdiv.f32 s14, s12, s13
- 8002c28: 4b23 ldr r3, [pc, #140] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
- 8002c2a: 6b1b ldr r3, [r3, #48] @ 0x30
- 8002c2c: f3c3 0308 ubfx r3, r3, #0, #9
- 8002c30: ee06 3a90 vmov s13, r3
- 8002c34: eef8 6a66 vcvt.f32.u32 s13, s13
- 8002c38: ed9f 6a23 vldr s12, [pc, #140] @ 8002cc8 <HAL_RCC_GetSysClockFreq+0x1e4>
- 8002c3c: ee67 7a86 vmul.f32 s15, s15, s12
- 8002c40: ee76 7aa7 vadd.f32 s15, s13, s15
- 8002c44: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0
- 8002c48: ee77 7aa6 vadd.f32 s15, s15, s13
- 8002c4c: ee27 7a27 vmul.f32 s14, s14, s15
- }
- pllp = (((RCC->PLL1DIVR & RCC_PLL1DIVR_P1) >>9) + 1U ) ;
- 8002c50: 4b19 ldr r3, [pc, #100] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
- 8002c52: 6b1b ldr r3, [r3, #48] @ 0x30
- 8002c54: f3c3 2346 ubfx r3, r3, #9, #7
- 8002c58: 3301 adds r3, #1
- sysclockfreq = (uint32_t)(float_t)(pllvco/(float_t)pllp);
- 8002c5a: ee07 3a90 vmov s15, r3
- 8002c5e: eef8 7a67 vcvt.f32.u32 s15, s15
- 8002c62: eec7 6a27 vdiv.f32 s13, s14, s15
- 8002c66: eefc 7ae6 vcvt.u32.f32 s15, s13
- 8002c6a: ee17 0a90 vmov r0, s15
- sysclockfreq = CSI_VALUE;
- break;
- }
- return sysclockfreq;
- }
- 8002c6e: f85d 4b04 ldr.w r4, [sp], #4
- 8002c72: 4770 bx lr
- pllvco = ((float_t)HSE_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
- 8002c74: ee07 0a10 vmov s14, r0
- 8002c78: eef8 6a47 vcvt.f32.u32 s13, s14
- 8002c7c: ed9f 6a14 vldr s12, [pc, #80] @ 8002cd0 <HAL_RCC_GetSysClockFreq+0x1ec>
- 8002c80: ee86 7a26 vdiv.f32 s14, s12, s13
- 8002c84: 4b0c ldr r3, [pc, #48] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
- 8002c86: 6b1b ldr r3, [r3, #48] @ 0x30
- 8002c88: f3c3 0308 ubfx r3, r3, #0, #9
- 8002c8c: ee06 3a90 vmov s13, r3
- 8002c90: eef8 6a66 vcvt.f32.u32 s13, s13
- 8002c94: ed9f 6a0c vldr s12, [pc, #48] @ 8002cc8 <HAL_RCC_GetSysClockFreq+0x1e4>
- 8002c98: ee67 7a86 vmul.f32 s15, s15, s12
- 8002c9c: ee76 7aa7 vadd.f32 s15, s13, s15
- 8002ca0: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0
- 8002ca4: ee77 7aa6 vadd.f32 s15, s15, s13
- 8002ca8: ee27 7a27 vmul.f32 s14, s14, s15
- break;
- 8002cac: e7d0 b.n 8002c50 <HAL_RCC_GetSysClockFreq+0x16c>
- sysclockfreq = HSE_VALUE;
- 8002cae: 4809 ldr r0, [pc, #36] @ (8002cd4 <HAL_RCC_GetSysClockFreq+0x1f0>)
- 8002cb0: 4770 bx lr
- sysclockfreq = (uint32_t) HSI_VALUE;
- 8002cb2: 4803 ldr r0, [pc, #12] @ (8002cc0 <HAL_RCC_GetSysClockFreq+0x1dc>)
- }
- 8002cb4: 4770 bx lr
- 8002cb6: bf00 nop
- 8002cb8: 58024400 .word 0x58024400
- 8002cbc: 003d0900 .word 0x003d0900
- 8002cc0: 03d09000 .word 0x03d09000
- 8002cc4: 4a742400 .word 0x4a742400
- 8002cc8: 39000000 .word 0x39000000
- 8002ccc: 4c742400 .word 0x4c742400
- 8002cd0: 4bbebc20 .word 0x4bbebc20
- 8002cd4: 017d7840 .word 0x017d7840
- 08002cd8 <HAL_RCC_ClockConfig>:
- if(RCC_ClkInitStruct == NULL)
- 8002cd8: 2800 cmp r0, #0
- 8002cda: f000 8132 beq.w 8002f42 <HAL_RCC_ClockConfig+0x26a>
- {
- 8002cde: b570 push {r4, r5, r6, lr}
- 8002ce0: 460d mov r5, r1
- 8002ce2: 4604 mov r4, r0
- if(FLatency > __HAL_FLASH_GET_LATENCY())
- 8002ce4: 4b9b ldr r3, [pc, #620] @ (8002f54 <HAL_RCC_ClockConfig+0x27c>)
- 8002ce6: 681b ldr r3, [r3, #0]
- 8002ce8: f003 030f and.w r3, r3, #15
- 8002cec: 428b cmp r3, r1
- 8002cee: d20b bcs.n 8002d08 <HAL_RCC_ClockConfig+0x30>
- __HAL_FLASH_SET_LATENCY(FLatency);
- 8002cf0: 4a98 ldr r2, [pc, #608] @ (8002f54 <HAL_RCC_ClockConfig+0x27c>)
- 8002cf2: 6813 ldr r3, [r2, #0]
- 8002cf4: f023 030f bic.w r3, r3, #15
- 8002cf8: 430b orrs r3, r1
- 8002cfa: 6013 str r3, [r2, #0]
- if(__HAL_FLASH_GET_LATENCY() != FLatency)
- 8002cfc: 6813 ldr r3, [r2, #0]
- 8002cfe: f003 030f and.w r3, r3, #15
- 8002d02: 428b cmp r3, r1
- 8002d04: f040 811f bne.w 8002f46 <HAL_RCC_ClockConfig+0x26e>
- if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D1PCLK1) == RCC_CLOCKTYPE_D1PCLK1)
- 8002d08: 6823 ldr r3, [r4, #0]
- 8002d0a: f013 0f04 tst.w r3, #4
- 8002d0e: d00c beq.n 8002d2a <HAL_RCC_ClockConfig+0x52>
- if((RCC_ClkInitStruct->APB3CLKDivider) > (RCC->D1CFGR & RCC_D1CFGR_D1PPRE))
- 8002d10: 6922 ldr r2, [r4, #16]
- 8002d12: 4b91 ldr r3, [pc, #580] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002d14: 699b ldr r3, [r3, #24]
- 8002d16: f003 0370 and.w r3, r3, #112 @ 0x70
- 8002d1a: 429a cmp r2, r3
- 8002d1c: d905 bls.n 8002d2a <HAL_RCC_ClockConfig+0x52>
- MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1PPRE, RCC_ClkInitStruct->APB3CLKDivider);
- 8002d1e: 498e ldr r1, [pc, #568] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002d20: 698b ldr r3, [r1, #24]
- 8002d22: f023 0370 bic.w r3, r3, #112 @ 0x70
- 8002d26: 431a orrs r2, r3
- 8002d28: 618a str r2, [r1, #24]
- if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
- 8002d2a: 6823 ldr r3, [r4, #0]
- 8002d2c: f013 0f08 tst.w r3, #8
- 8002d30: d00c beq.n 8002d4c <HAL_RCC_ClockConfig+0x74>
- if((RCC_ClkInitStruct->APB1CLKDivider) > (RCC->D2CFGR & RCC_D2CFGR_D2PPRE1))
- 8002d32: 6962 ldr r2, [r4, #20]
- 8002d34: 4b88 ldr r3, [pc, #544] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002d36: 69db ldr r3, [r3, #28]
- 8002d38: f003 0370 and.w r3, r3, #112 @ 0x70
- 8002d3c: 429a cmp r2, r3
- 8002d3e: d905 bls.n 8002d4c <HAL_RCC_ClockConfig+0x74>
- MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE1, (RCC_ClkInitStruct->APB1CLKDivider));
- 8002d40: 4985 ldr r1, [pc, #532] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002d42: 69cb ldr r3, [r1, #28]
- 8002d44: f023 0370 bic.w r3, r3, #112 @ 0x70
- 8002d48: 431a orrs r2, r3
- 8002d4a: 61ca str r2, [r1, #28]
- if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
- 8002d4c: 6823 ldr r3, [r4, #0]
- 8002d4e: f013 0f10 tst.w r3, #16
- 8002d52: d00c beq.n 8002d6e <HAL_RCC_ClockConfig+0x96>
- if((RCC_ClkInitStruct->APB2CLKDivider) > (RCC->D2CFGR & RCC_D2CFGR_D2PPRE2))
- 8002d54: 69a2 ldr r2, [r4, #24]
- 8002d56: 4b80 ldr r3, [pc, #512] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002d58: 69db ldr r3, [r3, #28]
- 8002d5a: f403 63e0 and.w r3, r3, #1792 @ 0x700
- 8002d5e: 429a cmp r2, r3
- 8002d60: d905 bls.n 8002d6e <HAL_RCC_ClockConfig+0x96>
- MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE2, (RCC_ClkInitStruct->APB2CLKDivider));
- 8002d62: 497d ldr r1, [pc, #500] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002d64: 69cb ldr r3, [r1, #28]
- 8002d66: f423 63e0 bic.w r3, r3, #1792 @ 0x700
- 8002d6a: 431a orrs r2, r3
- 8002d6c: 61ca str r2, [r1, #28]
- if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D3PCLK1) == RCC_CLOCKTYPE_D3PCLK1)
- 8002d6e: 6823 ldr r3, [r4, #0]
- 8002d70: f013 0f20 tst.w r3, #32
- 8002d74: d00c beq.n 8002d90 <HAL_RCC_ClockConfig+0xb8>
- if((RCC_ClkInitStruct->APB4CLKDivider) > (RCC->D3CFGR & RCC_D3CFGR_D3PPRE))
- 8002d76: 69e2 ldr r2, [r4, #28]
- 8002d78: 4b77 ldr r3, [pc, #476] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002d7a: 6a1b ldr r3, [r3, #32]
- 8002d7c: f003 0370 and.w r3, r3, #112 @ 0x70
- 8002d80: 429a cmp r2, r3
- 8002d82: d905 bls.n 8002d90 <HAL_RCC_ClockConfig+0xb8>
- MODIFY_REG(RCC->D3CFGR, RCC_D3CFGR_D3PPRE, (RCC_ClkInitStruct->APB4CLKDivider) );
- 8002d84: 4974 ldr r1, [pc, #464] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002d86: 6a0b ldr r3, [r1, #32]
- 8002d88: f023 0370 bic.w r3, r3, #112 @ 0x70
- 8002d8c: 431a orrs r2, r3
- 8002d8e: 620a str r2, [r1, #32]
- if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
- 8002d90: 6823 ldr r3, [r4, #0]
- 8002d92: f013 0f02 tst.w r3, #2
- 8002d96: d00c beq.n 8002db2 <HAL_RCC_ClockConfig+0xda>
- if((RCC_ClkInitStruct->AHBCLKDivider) > (RCC->D1CFGR & RCC_D1CFGR_HPRE))
- 8002d98: 68e2 ldr r2, [r4, #12]
- 8002d9a: 4b6f ldr r3, [pc, #444] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002d9c: 699b ldr r3, [r3, #24]
- 8002d9e: f003 030f and.w r3, r3, #15
- 8002da2: 429a cmp r2, r3
- 8002da4: d905 bls.n 8002db2 <HAL_RCC_ClockConfig+0xda>
- MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider);
- 8002da6: 496c ldr r1, [pc, #432] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002da8: 698b ldr r3, [r1, #24]
- 8002daa: f023 030f bic.w r3, r3, #15
- 8002dae: 431a orrs r2, r3
- 8002db0: 618a str r2, [r1, #24]
- if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK)
- 8002db2: 6823 ldr r3, [r4, #0]
- 8002db4: f013 0f01 tst.w r3, #1
- 8002db8: d041 beq.n 8002e3e <HAL_RCC_ClockConfig+0x166>
- MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1CPRE, RCC_ClkInitStruct->SYSCLKDivider);
- 8002dba: 4a67 ldr r2, [pc, #412] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002dbc: 6993 ldr r3, [r2, #24]
- 8002dbe: f423 6370 bic.w r3, r3, #3840 @ 0xf00
- 8002dc2: 68a1 ldr r1, [r4, #8]
- 8002dc4: 430b orrs r3, r1
- 8002dc6: 6193 str r3, [r2, #24]
- if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE)
- 8002dc8: 6863 ldr r3, [r4, #4]
- 8002dca: 2b02 cmp r3, #2
- 8002dcc: d00a beq.n 8002de4 <HAL_RCC_ClockConfig+0x10c>
- else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK)
- 8002dce: 2b03 cmp r3, #3
- 8002dd0: d027 beq.n 8002e22 <HAL_RCC_ClockConfig+0x14a>
- else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_CSI)
- 8002dd2: 2b01 cmp r3, #1
- 8002dd4: d02c beq.n 8002e30 <HAL_RCC_ClockConfig+0x158>
- if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U)
- 8002dd6: 4a60 ldr r2, [pc, #384] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002dd8: 6812 ldr r2, [r2, #0]
- 8002dda: f012 0f04 tst.w r2, #4
- 8002dde: d106 bne.n 8002dee <HAL_RCC_ClockConfig+0x116>
- return HAL_ERROR;
- 8002de0: 2001 movs r0, #1
- 8002de2: e0ad b.n 8002f40 <HAL_RCC_ClockConfig+0x268>
- if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U)
- 8002de4: 6812 ldr r2, [r2, #0]
- 8002de6: f412 3f00 tst.w r2, #131072 @ 0x20000
- 8002dea: f000 80ae beq.w 8002f4a <HAL_RCC_ClockConfig+0x272>
- MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, RCC_ClkInitStruct->SYSCLKSource);
- 8002dee: 495a ldr r1, [pc, #360] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002df0: 690a ldr r2, [r1, #16]
- 8002df2: f022 0207 bic.w r2, r2, #7
- 8002df6: 4313 orrs r3, r2
- 8002df8: 610b str r3, [r1, #16]
- tickstart = HAL_GetTick();
- 8002dfa: f7fe f847 bl 8000e8c <HAL_GetTick>
- 8002dfe: 4606 mov r6, r0
- while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
- 8002e00: 4b55 ldr r3, [pc, #340] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002e02: 691b ldr r3, [r3, #16]
- 8002e04: f003 0338 and.w r3, r3, #56 @ 0x38
- 8002e08: 6862 ldr r2, [r4, #4]
- 8002e0a: ebb3 0fc2 cmp.w r3, r2, lsl #3
- 8002e0e: d016 beq.n 8002e3e <HAL_RCC_ClockConfig+0x166>
- if((HAL_GetTick() - tickstart ) > CLOCKSWITCH_TIMEOUT_VALUE)
- 8002e10: f7fe f83c bl 8000e8c <HAL_GetTick>
- 8002e14: 1b80 subs r0, r0, r6
- 8002e16: f241 3388 movw r3, #5000 @ 0x1388
- 8002e1a: 4298 cmp r0, r3
- 8002e1c: d9f0 bls.n 8002e00 <HAL_RCC_ClockConfig+0x128>
- return HAL_TIMEOUT;
- 8002e1e: 2003 movs r0, #3
- 8002e20: e08e b.n 8002f40 <HAL_RCC_ClockConfig+0x268>
- if(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U)
- 8002e22: 4a4d ldr r2, [pc, #308] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002e24: 6812 ldr r2, [r2, #0]
- 8002e26: f012 7f00 tst.w r2, #33554432 @ 0x2000000
- 8002e2a: d1e0 bne.n 8002dee <HAL_RCC_ClockConfig+0x116>
- return HAL_ERROR;
- 8002e2c: 2001 movs r0, #1
- 8002e2e: e087 b.n 8002f40 <HAL_RCC_ClockConfig+0x268>
- if(__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U)
- 8002e30: 4a49 ldr r2, [pc, #292] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002e32: 6812 ldr r2, [r2, #0]
- 8002e34: f412 7f80 tst.w r2, #256 @ 0x100
- 8002e38: d1d9 bne.n 8002dee <HAL_RCC_ClockConfig+0x116>
- return HAL_ERROR;
- 8002e3a: 2001 movs r0, #1
- 8002e3c: e080 b.n 8002f40 <HAL_RCC_ClockConfig+0x268>
- if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
- 8002e3e: 6823 ldr r3, [r4, #0]
- 8002e40: f013 0f02 tst.w r3, #2
- 8002e44: d00c beq.n 8002e60 <HAL_RCC_ClockConfig+0x188>
- if((RCC_ClkInitStruct->AHBCLKDivider) < (RCC->D1CFGR & RCC_D1CFGR_HPRE))
- 8002e46: 68e2 ldr r2, [r4, #12]
- 8002e48: 4b43 ldr r3, [pc, #268] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002e4a: 699b ldr r3, [r3, #24]
- 8002e4c: f003 030f and.w r3, r3, #15
- 8002e50: 429a cmp r2, r3
- 8002e52: d205 bcs.n 8002e60 <HAL_RCC_ClockConfig+0x188>
- MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider);
- 8002e54: 4940 ldr r1, [pc, #256] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002e56: 698b ldr r3, [r1, #24]
- 8002e58: f023 030f bic.w r3, r3, #15
- 8002e5c: 431a orrs r2, r3
- 8002e5e: 618a str r2, [r1, #24]
- if(FLatency < __HAL_FLASH_GET_LATENCY())
- 8002e60: 4b3c ldr r3, [pc, #240] @ (8002f54 <HAL_RCC_ClockConfig+0x27c>)
- 8002e62: 681b ldr r3, [r3, #0]
- 8002e64: f003 030f and.w r3, r3, #15
- 8002e68: 42ab cmp r3, r5
- 8002e6a: d90a bls.n 8002e82 <HAL_RCC_ClockConfig+0x1aa>
- __HAL_FLASH_SET_LATENCY(FLatency);
- 8002e6c: 4a39 ldr r2, [pc, #228] @ (8002f54 <HAL_RCC_ClockConfig+0x27c>)
- 8002e6e: 6813 ldr r3, [r2, #0]
- 8002e70: f023 030f bic.w r3, r3, #15
- 8002e74: 432b orrs r3, r5
- 8002e76: 6013 str r3, [r2, #0]
- if(__HAL_FLASH_GET_LATENCY() != FLatency)
- 8002e78: 6813 ldr r3, [r2, #0]
- 8002e7a: f003 030f and.w r3, r3, #15
- 8002e7e: 42ab cmp r3, r5
- 8002e80: d165 bne.n 8002f4e <HAL_RCC_ClockConfig+0x276>
- if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D1PCLK1) == RCC_CLOCKTYPE_D1PCLK1)
- 8002e82: 6823 ldr r3, [r4, #0]
- 8002e84: f013 0f04 tst.w r3, #4
- 8002e88: d00c beq.n 8002ea4 <HAL_RCC_ClockConfig+0x1cc>
- if((RCC_ClkInitStruct->APB3CLKDivider) < (RCC->D1CFGR & RCC_D1CFGR_D1PPRE))
- 8002e8a: 6922 ldr r2, [r4, #16]
- 8002e8c: 4b32 ldr r3, [pc, #200] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002e8e: 699b ldr r3, [r3, #24]
- 8002e90: f003 0370 and.w r3, r3, #112 @ 0x70
- 8002e94: 429a cmp r2, r3
- 8002e96: d205 bcs.n 8002ea4 <HAL_RCC_ClockConfig+0x1cc>
- MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1PPRE, RCC_ClkInitStruct->APB3CLKDivider);
- 8002e98: 492f ldr r1, [pc, #188] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002e9a: 698b ldr r3, [r1, #24]
- 8002e9c: f023 0370 bic.w r3, r3, #112 @ 0x70
- 8002ea0: 431a orrs r2, r3
- 8002ea2: 618a str r2, [r1, #24]
- if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
- 8002ea4: 6823 ldr r3, [r4, #0]
- 8002ea6: f013 0f08 tst.w r3, #8
- 8002eaa: d00c beq.n 8002ec6 <HAL_RCC_ClockConfig+0x1ee>
- if((RCC_ClkInitStruct->APB1CLKDivider) < (RCC->D2CFGR & RCC_D2CFGR_D2PPRE1))
- 8002eac: 6962 ldr r2, [r4, #20]
- 8002eae: 4b2a ldr r3, [pc, #168] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002eb0: 69db ldr r3, [r3, #28]
- 8002eb2: f003 0370 and.w r3, r3, #112 @ 0x70
- 8002eb6: 429a cmp r2, r3
- 8002eb8: d205 bcs.n 8002ec6 <HAL_RCC_ClockConfig+0x1ee>
- MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE1, (RCC_ClkInitStruct->APB1CLKDivider));
- 8002eba: 4927 ldr r1, [pc, #156] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002ebc: 69cb ldr r3, [r1, #28]
- 8002ebe: f023 0370 bic.w r3, r3, #112 @ 0x70
- 8002ec2: 431a orrs r2, r3
- 8002ec4: 61ca str r2, [r1, #28]
- if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
- 8002ec6: 6823 ldr r3, [r4, #0]
- 8002ec8: f013 0f10 tst.w r3, #16
- 8002ecc: d00c beq.n 8002ee8 <HAL_RCC_ClockConfig+0x210>
- if((RCC_ClkInitStruct->APB2CLKDivider) < (RCC->D2CFGR & RCC_D2CFGR_D2PPRE2))
- 8002ece: 69a2 ldr r2, [r4, #24]
- 8002ed0: 4b21 ldr r3, [pc, #132] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002ed2: 69db ldr r3, [r3, #28]
- 8002ed4: f403 63e0 and.w r3, r3, #1792 @ 0x700
- 8002ed8: 429a cmp r2, r3
- 8002eda: d205 bcs.n 8002ee8 <HAL_RCC_ClockConfig+0x210>
- MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE2, (RCC_ClkInitStruct->APB2CLKDivider));
- 8002edc: 491e ldr r1, [pc, #120] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002ede: 69cb ldr r3, [r1, #28]
- 8002ee0: f423 63e0 bic.w r3, r3, #1792 @ 0x700
- 8002ee4: 431a orrs r2, r3
- 8002ee6: 61ca str r2, [r1, #28]
- if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D3PCLK1) == RCC_CLOCKTYPE_D3PCLK1)
- 8002ee8: 6823 ldr r3, [r4, #0]
- 8002eea: f013 0f20 tst.w r3, #32
- 8002eee: d00c beq.n 8002f0a <HAL_RCC_ClockConfig+0x232>
- if((RCC_ClkInitStruct->APB4CLKDivider) < (RCC->D3CFGR & RCC_D3CFGR_D3PPRE))
- 8002ef0: 69e2 ldr r2, [r4, #28]
- 8002ef2: 4b19 ldr r3, [pc, #100] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002ef4: 6a1b ldr r3, [r3, #32]
- 8002ef6: f003 0370 and.w r3, r3, #112 @ 0x70
- 8002efa: 429a cmp r2, r3
- 8002efc: d205 bcs.n 8002f0a <HAL_RCC_ClockConfig+0x232>
- MODIFY_REG(RCC->D3CFGR, RCC_D3CFGR_D3PPRE, (RCC_ClkInitStruct->APB4CLKDivider) );
- 8002efe: 4916 ldr r1, [pc, #88] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002f00: 6a0b ldr r3, [r1, #32]
- 8002f02: f023 0370 bic.w r3, r3, #112 @ 0x70
- 8002f06: 431a orrs r2, r3
- 8002f08: 620a str r2, [r1, #32]
- common_system_clock = HAL_RCC_GetSysClockFreq() >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_D1CPRE)>> RCC_D1CFGR_D1CPRE_Pos]) & 0x1FU);
- 8002f0a: f7ff fdeb bl 8002ae4 <HAL_RCC_GetSysClockFreq>
- 8002f0e: 4912 ldr r1, [pc, #72] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
- 8002f10: 698b ldr r3, [r1, #24]
- 8002f12: f3c3 2303 ubfx r3, r3, #8, #4
- 8002f16: 4a11 ldr r2, [pc, #68] @ (8002f5c <HAL_RCC_ClockConfig+0x284>)
- 8002f18: 5cd3 ldrb r3, [r2, r3]
- 8002f1a: f003 031f and.w r3, r3, #31
- 8002f1e: 40d8 lsrs r0, r3
- SystemD2Clock = (common_system_clock >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_HPRE)>> RCC_D1CFGR_HPRE_Pos]) & 0x1FU));
- 8002f20: 698b ldr r3, [r1, #24]
- 8002f22: f003 030f and.w r3, r3, #15
- 8002f26: 5cd3 ldrb r3, [r2, r3]
- 8002f28: f003 031f and.w r3, r3, #31
- 8002f2c: fa20 f303 lsr.w r3, r0, r3
- 8002f30: 4a0b ldr r2, [pc, #44] @ (8002f60 <HAL_RCC_ClockConfig+0x288>)
- 8002f32: 6013 str r3, [r2, #0]
- SystemCoreClock = common_system_clock;
- 8002f34: 4b0b ldr r3, [pc, #44] @ (8002f64 <HAL_RCC_ClockConfig+0x28c>)
- 8002f36: 6018 str r0, [r3, #0]
- halstatus = HAL_InitTick (uwTickPrio);
- 8002f38: 4b0b ldr r3, [pc, #44] @ (8002f68 <HAL_RCC_ClockConfig+0x290>)
- 8002f3a: 6818 ldr r0, [r3, #0]
- 8002f3c: f7fd fd7c bl 8000a38 <HAL_InitTick>
- }
- 8002f40: bd70 pop {r4, r5, r6, pc}
- return HAL_ERROR;
- 8002f42: 2001 movs r0, #1
- }
- 8002f44: 4770 bx lr
- return HAL_ERROR;
- 8002f46: 2001 movs r0, #1
- 8002f48: e7fa b.n 8002f40 <HAL_RCC_ClockConfig+0x268>
- return HAL_ERROR;
- 8002f4a: 2001 movs r0, #1
- 8002f4c: e7f8 b.n 8002f40 <HAL_RCC_ClockConfig+0x268>
- return HAL_ERROR;
- 8002f4e: 2001 movs r0, #1
- 8002f50: e7f6 b.n 8002f40 <HAL_RCC_ClockConfig+0x268>
- 8002f52: bf00 nop
- 8002f54: 52002000 .word 0x52002000
- 8002f58: 58024400 .word 0x58024400
- 8002f5c: 08014328 .word 0x08014328
- 8002f60: 24000000 .word 0x24000000
- 8002f64: 24000004 .word 0x24000004
- 8002f68: 2400000c .word 0x2400000c
- 08002f6c <HAL_RCC_GetHCLKFreq>:
- * @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)
- {
- 8002f6c: b508 push {r3, lr}
- 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);
- 8002f6e: f7ff fdb9 bl 8002ae4 <HAL_RCC_GetSysClockFreq>
- 8002f72: 4a0b ldr r2, [pc, #44] @ (8002fa0 <HAL_RCC_GetHCLKFreq+0x34>)
- 8002f74: 6993 ldr r3, [r2, #24]
- 8002f76: f3c3 2303 ubfx r3, r3, #8, #4
- 8002f7a: 490a ldr r1, [pc, #40] @ (8002fa4 <HAL_RCC_GetHCLKFreq+0x38>)
- 8002f7c: 5ccb ldrb r3, [r1, r3]
- 8002f7e: f003 031f and.w r3, r3, #31
- 8002f82: fa20 f303 lsr.w r3, r0, r3
- #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));
- 8002f86: 6992 ldr r2, [r2, #24]
- 8002f88: f002 020f and.w r2, r2, #15
- 8002f8c: 5c88 ldrb r0, [r1, r2]
- 8002f8e: f000 001f and.w r0, r0, #31
- 8002f92: fa23 f000 lsr.w r0, r3, r0
- 8002f96: 4a04 ldr r2, [pc, #16] @ (8002fa8 <HAL_RCC_GetHCLKFreq+0x3c>)
- 8002f98: 6010 str r0, [r2, #0]
- #endif
- #if defined(DUAL_CORE) && defined(CORE_CM4)
- SystemCoreClock = SystemD2Clock;
- #else
- SystemCoreClock = common_system_clock;
- 8002f9a: 4a04 ldr r2, [pc, #16] @ (8002fac <HAL_RCC_GetHCLKFreq+0x40>)
- 8002f9c: 6013 str r3, [r2, #0]
- #endif /* DUAL_CORE && CORE_CM4 */
- return SystemD2Clock;
- }
- 8002f9e: bd08 pop {r3, pc}
- 8002fa0: 58024400 .word 0x58024400
- 8002fa4: 08014328 .word 0x08014328
- 8002fa8: 24000000 .word 0x24000000
- 8002fac: 24000004 .word 0x24000004
- 08002fb0 <HAL_RCC_GetPCLK1Freq>:
- * @note Each time PCLK1 changes, this function must be called to update the
- * right PCLK1 value. Otherwise, any configuration based on this function will be incorrect.
- * @retval PCLK1 frequency
- */
- uint32_t HAL_RCC_GetPCLK1Freq(void)
- {
- 8002fb0: b508 push {r3, lr}
- #if defined (RCC_D2CFGR_D2PPRE1)
- /* Get HCLK source and Compute PCLK1 frequency ---------------------------*/
- return (HAL_RCC_GetHCLKFreq() >> ((D1CorePrescTable[(RCC->D2CFGR & RCC_D2CFGR_D2PPRE1)>> RCC_D2CFGR_D2PPRE1_Pos]) & 0x1FU));
- 8002fb2: f7ff ffdb bl 8002f6c <HAL_RCC_GetHCLKFreq>
- 8002fb6: 4b05 ldr r3, [pc, #20] @ (8002fcc <HAL_RCC_GetPCLK1Freq+0x1c>)
- 8002fb8: 69db ldr r3, [r3, #28]
- 8002fba: f3c3 1302 ubfx r3, r3, #4, #3
- 8002fbe: 4a04 ldr r2, [pc, #16] @ (8002fd0 <HAL_RCC_GetPCLK1Freq+0x20>)
- 8002fc0: 5cd3 ldrb r3, [r2, r3]
- 8002fc2: f003 031f and.w r3, r3, #31
- #else
- /* Get HCLK source and Compute PCLK1 frequency ---------------------------*/
- return (HAL_RCC_GetHCLKFreq() >> ((D1CorePrescTable[(RCC->CDCFGR2 & RCC_CDCFGR2_CDPPRE1)>> RCC_CDCFGR2_CDPPRE1_Pos]) & 0x1FU));
- #endif
- }
- 8002fc6: 40d8 lsrs r0, r3
- 8002fc8: bd08 pop {r3, pc}
- 8002fca: bf00 nop
- 8002fcc: 58024400 .word 0x58024400
- 8002fd0: 08014328 .word 0x08014328
- 08002fd4 <HAL_RCC_GetClockConfig>:
- * @retval None
- */
- void HAL_RCC_GetClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t *pFLatency)
- {
- /* Set all possible values for the Clock type parameter --------------------*/
- RCC_ClkInitStruct->ClockType = RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_D1PCLK1 | RCC_CLOCKTYPE_PCLK1 |
- 8002fd4: 233f movs r3, #63 @ 0x3f
- 8002fd6: 6003 str r3, [r0, #0]
- RCC_CLOCKTYPE_PCLK2 | RCC_CLOCKTYPE_D3PCLK1 ;
- /* Get the SYSCLK configuration --------------------------------------------*/
- RCC_ClkInitStruct->SYSCLKSource = (uint32_t)(RCC->CFGR & RCC_CFGR_SW);
- 8002fd8: 4b11 ldr r3, [pc, #68] @ (8003020 <HAL_RCC_GetClockConfig+0x4c>)
- 8002fda: 691a ldr r2, [r3, #16]
- 8002fdc: f002 0207 and.w r2, r2, #7
- 8002fe0: 6042 str r2, [r0, #4]
- #if defined(RCC_D1CFGR_D1CPRE)
- /* Get the SYSCLK configuration ----------------------------------------------*/
- RCC_ClkInitStruct->SYSCLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_D1CPRE);
- 8002fe2: 699a ldr r2, [r3, #24]
- 8002fe4: f402 6270 and.w r2, r2, #3840 @ 0xf00
- 8002fe8: 6082 str r2, [r0, #8]
- /* Get the D1HCLK configuration ----------------------------------------------*/
- RCC_ClkInitStruct->AHBCLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_HPRE);
- 8002fea: 699a ldr r2, [r3, #24]
- 8002fec: f002 020f and.w r2, r2, #15
- 8002ff0: 60c2 str r2, [r0, #12]
- /* Get the APB3 configuration ----------------------------------------------*/
- RCC_ClkInitStruct->APB3CLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_D1PPRE);
- 8002ff2: 699a ldr r2, [r3, #24]
- 8002ff4: f002 0270 and.w r2, r2, #112 @ 0x70
- 8002ff8: 6102 str r2, [r0, #16]
- /* Get the APB1 configuration ----------------------------------------------*/
- RCC_ClkInitStruct->APB1CLKDivider = (uint32_t)(RCC->D2CFGR & RCC_D2CFGR_D2PPRE1);
- 8002ffa: 69da ldr r2, [r3, #28]
- 8002ffc: f002 0270 and.w r2, r2, #112 @ 0x70
- 8003000: 6142 str r2, [r0, #20]
- /* Get the APB2 configuration ----------------------------------------------*/
- RCC_ClkInitStruct->APB2CLKDivider = (uint32_t)(RCC->D2CFGR & RCC_D2CFGR_D2PPRE2);
- 8003002: 69da ldr r2, [r3, #28]
- 8003004: f402 62e0 and.w r2, r2, #1792 @ 0x700
- 8003008: 6182 str r2, [r0, #24]
- /* Get the APB4 configuration ----------------------------------------------*/
- RCC_ClkInitStruct->APB4CLKDivider = (uint32_t)(RCC->D3CFGR & RCC_D3CFGR_D3PPRE);
- 800300a: 6a1b ldr r3, [r3, #32]
- 800300c: f003 0370 and.w r3, r3, #112 @ 0x70
- 8003010: 61c3 str r3, [r0, #28]
- /* Get the APB4 configuration ----------------------------------------------*/
- RCC_ClkInitStruct->APB4CLKDivider = (uint32_t)(RCC->SRDCFGR & RCC_SRDCFGR_SRDPPRE);
- #endif
- /* Get the Flash Wait State (Latency) configuration ------------------------*/
- *pFLatency = (uint32_t)(FLASH->ACR & FLASH_ACR_LATENCY);
- 8003012: 4b04 ldr r3, [pc, #16] @ (8003024 <HAL_RCC_GetClockConfig+0x50>)
- 8003014: 681b ldr r3, [r3, #0]
- 8003016: f003 030f and.w r3, r3, #15
- 800301a: 600b str r3, [r1, #0]
- }
- 800301c: 4770 bx lr
- 800301e: bf00 nop
- 8003020: 58024400 .word 0x58024400
- 8003024: 52002000 .word 0x52002000
- 08003028 <HAL_TIM_Base_MspInit>:
- UNUSED(htim);
- /* NOTE : This function should not be modified, when the callback is needed,
- the HAL_TIM_Base_MspInit could be implemented in the user file
- */
- }
- 8003028: 4770 bx lr
- ...
- 0800302c <HAL_TIM_Base_Start_IT>:
- /* Check the parameters */
- assert_param(IS_TIM_INSTANCE(htim->Instance));
- /* Check the TIM state */
- if (htim->State != HAL_TIM_STATE_READY)
- 800302c: f890 303d ldrb.w r3, [r0, #61] @ 0x3d
- 8003030: b2db uxtb r3, r3
- 8003032: 2b01 cmp r3, #1
- 8003034: d13a bne.n 80030ac <HAL_TIM_Base_Start_IT+0x80>
- {
- return HAL_ERROR;
- }
- /* Set the TIM state */
- htim->State = HAL_TIM_STATE_BUSY;
- 8003036: 2302 movs r3, #2
- 8003038: f880 303d strb.w r3, [r0, #61] @ 0x3d
- /* Enable the TIM Update interrupt */
- __HAL_TIM_ENABLE_IT(htim, TIM_IT_UPDATE);
- 800303c: 6802 ldr r2, [r0, #0]
- 800303e: 68d3 ldr r3, [r2, #12]
- 8003040: f043 0301 orr.w r3, r3, #1
- 8003044: 60d3 str r3, [r2, #12]
- /* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
- if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
- 8003046: 6803 ldr r3, [r0, #0]
- 8003048: 4a1a ldr r2, [pc, #104] @ (80030b4 <HAL_TIM_Base_Start_IT+0x88>)
- 800304a: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000
- 800304e: bf18 it ne
- 8003050: 4293 cmpne r3, r2
- 8003052: d01d beq.n 8003090 <HAL_TIM_Base_Start_IT+0x64>
- 8003054: f5a2 427c sub.w r2, r2, #64512 @ 0xfc00
- 8003058: 4293 cmp r3, r2
- 800305a: d019 beq.n 8003090 <HAL_TIM_Base_Start_IT+0x64>
- 800305c: f502 6280 add.w r2, r2, #1024 @ 0x400
- 8003060: 4293 cmp r3, r2
- 8003062: d015 beq.n 8003090 <HAL_TIM_Base_Start_IT+0x64>
- 8003064: f502 6280 add.w r2, r2, #1024 @ 0x400
- 8003068: 4293 cmp r3, r2
- 800306a: d011 beq.n 8003090 <HAL_TIM_Base_Start_IT+0x64>
- 800306c: f502 4278 add.w r2, r2, #63488 @ 0xf800
- 8003070: 4293 cmp r3, r2
- 8003072: d00d beq.n 8003090 <HAL_TIM_Base_Start_IT+0x64>
- 8003074: f5a2 426c sub.w r2, r2, #60416 @ 0xec00
- 8003078: 4293 cmp r3, r2
- 800307a: d009 beq.n 8003090 <HAL_TIM_Base_Start_IT+0x64>
- 800307c: f502 3294 add.w r2, r2, #75776 @ 0x12800
- 8003080: 4293 cmp r3, r2
- 8003082: d005 beq.n 8003090 <HAL_TIM_Base_Start_IT+0x64>
- __HAL_TIM_ENABLE(htim);
- }
- }
- else
- {
- __HAL_TIM_ENABLE(htim);
- 8003084: 681a ldr r2, [r3, #0]
- 8003086: f042 0201 orr.w r2, r2, #1
- 800308a: 601a str r2, [r3, #0]
- }
- /* Return function status */
- return HAL_OK;
- 800308c: 2000 movs r0, #0
- 800308e: 4770 bx lr
- tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
- 8003090: 6899 ldr r1, [r3, #8]
- 8003092: 4a09 ldr r2, [pc, #36] @ (80030b8 <HAL_TIM_Base_Start_IT+0x8c>)
- 8003094: 400a ands r2, r1
- if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
- 8003096: 2a06 cmp r2, #6
- 8003098: bf18 it ne
- 800309a: f5b2 3f80 cmpne.w r2, #65536 @ 0x10000
- 800309e: d007 beq.n 80030b0 <HAL_TIM_Base_Start_IT+0x84>
- __HAL_TIM_ENABLE(htim);
- 80030a0: 681a ldr r2, [r3, #0]
- 80030a2: f042 0201 orr.w r2, r2, #1
- 80030a6: 601a str r2, [r3, #0]
- return HAL_OK;
- 80030a8: 2000 movs r0, #0
- 80030aa: 4770 bx lr
- return HAL_ERROR;
- 80030ac: 2001 movs r0, #1
- 80030ae: 4770 bx lr
- return HAL_OK;
- 80030b0: 2000 movs r0, #0
- }
- 80030b2: 4770 bx lr
- 80030b4: 40010000 .word 0x40010000
- 80030b8: 00010007 .word 0x00010007
- 080030bc <HAL_TIM_OC_DelayElapsedCallback>:
- UNUSED(htim);
- /* NOTE : This function should not be modified, when the callback is needed,
- the HAL_TIM_OC_DelayElapsedCallback could be implemented in the user file
- */
- }
- 80030bc: 4770 bx lr
- 080030be <HAL_TIM_IC_CaptureCallback>:
- UNUSED(htim);
- /* NOTE : This function should not be modified, when the callback is needed,
- the HAL_TIM_IC_CaptureCallback could be implemented in the user file
- */
- }
- 80030be: 4770 bx lr
- 080030c0 <HAL_TIM_PWM_PulseFinishedCallback>:
- UNUSED(htim);
- /* NOTE : This function should not be modified, when the callback is needed,
- the HAL_TIM_PWM_PulseFinishedCallback could be implemented in the user file
- */
- }
- 80030c0: 4770 bx lr
- 080030c2 <HAL_TIM_TriggerCallback>:
- UNUSED(htim);
- /* NOTE : This function should not be modified, when the callback is needed,
- the HAL_TIM_TriggerCallback could be implemented in the user file
- */
- }
- 80030c2: 4770 bx lr
- 080030c4 <HAL_TIM_IRQHandler>:
- {
- 80030c4: b510 push {r4, lr}
- 80030c6: 4604 mov r4, r0
- if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC1) != RESET)
- 80030c8: 6803 ldr r3, [r0, #0]
- 80030ca: 691a ldr r2, [r3, #16]
- 80030cc: f012 0f02 tst.w r2, #2
- 80030d0: d011 beq.n 80030f6 <HAL_TIM_IRQHandler+0x32>
- if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC1) != RESET)
- 80030d2: 68da ldr r2, [r3, #12]
- 80030d4: f012 0f02 tst.w r2, #2
- 80030d8: d00d beq.n 80030f6 <HAL_TIM_IRQHandler+0x32>
- __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC1);
- 80030da: f06f 0202 mvn.w r2, #2
- 80030de: 611a str r2, [r3, #16]
- htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1;
- 80030e0: 2301 movs r3, #1
- 80030e2: 7703 strb r3, [r0, #28]
- if ((htim->Instance->CCMR1 & TIM_CCMR1_CC1S) != 0x00U)
- 80030e4: 6803 ldr r3, [r0, #0]
- 80030e6: 699b ldr r3, [r3, #24]
- 80030e8: f013 0f03 tst.w r3, #3
- 80030ec: d079 beq.n 80031e2 <HAL_TIM_IRQHandler+0x11e>
- HAL_TIM_IC_CaptureCallback(htim);
- 80030ee: f7ff ffe6 bl 80030be <HAL_TIM_IC_CaptureCallback>
- htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
- 80030f2: 2300 movs r3, #0
- 80030f4: 7723 strb r3, [r4, #28]
- if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC2) != RESET)
- 80030f6: 6823 ldr r3, [r4, #0]
- 80030f8: 691a ldr r2, [r3, #16]
- 80030fa: f012 0f04 tst.w r2, #4
- 80030fe: d012 beq.n 8003126 <HAL_TIM_IRQHandler+0x62>
- if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC2) != RESET)
- 8003100: 68da ldr r2, [r3, #12]
- 8003102: f012 0f04 tst.w r2, #4
- 8003106: d00e beq.n 8003126 <HAL_TIM_IRQHandler+0x62>
- __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC2);
- 8003108: f06f 0204 mvn.w r2, #4
- 800310c: 611a str r2, [r3, #16]
- htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2;
- 800310e: 2302 movs r3, #2
- 8003110: 7723 strb r3, [r4, #28]
- if ((htim->Instance->CCMR1 & TIM_CCMR1_CC2S) != 0x00U)
- 8003112: 6823 ldr r3, [r4, #0]
- 8003114: 699b ldr r3, [r3, #24]
- 8003116: f413 7f40 tst.w r3, #768 @ 0x300
- 800311a: d068 beq.n 80031ee <HAL_TIM_IRQHandler+0x12a>
- HAL_TIM_IC_CaptureCallback(htim);
- 800311c: 4620 mov r0, r4
- 800311e: f7ff ffce bl 80030be <HAL_TIM_IC_CaptureCallback>
- htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
- 8003122: 2300 movs r3, #0
- 8003124: 7723 strb r3, [r4, #28]
- if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC3) != RESET)
- 8003126: 6823 ldr r3, [r4, #0]
- 8003128: 691a ldr r2, [r3, #16]
- 800312a: f012 0f08 tst.w r2, #8
- 800312e: d012 beq.n 8003156 <HAL_TIM_IRQHandler+0x92>
- if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC3) != RESET)
- 8003130: 68da ldr r2, [r3, #12]
- 8003132: f012 0f08 tst.w r2, #8
- 8003136: d00e beq.n 8003156 <HAL_TIM_IRQHandler+0x92>
- __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC3);
- 8003138: f06f 0208 mvn.w r2, #8
- 800313c: 611a str r2, [r3, #16]
- htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3;
- 800313e: 2304 movs r3, #4
- 8003140: 7723 strb r3, [r4, #28]
- if ((htim->Instance->CCMR2 & TIM_CCMR2_CC3S) != 0x00U)
- 8003142: 6823 ldr r3, [r4, #0]
- 8003144: 69db ldr r3, [r3, #28]
- 8003146: f013 0f03 tst.w r3, #3
- 800314a: d057 beq.n 80031fc <HAL_TIM_IRQHandler+0x138>
- HAL_TIM_IC_CaptureCallback(htim);
- 800314c: 4620 mov r0, r4
- 800314e: f7ff ffb6 bl 80030be <HAL_TIM_IC_CaptureCallback>
- htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
- 8003152: 2300 movs r3, #0
- 8003154: 7723 strb r3, [r4, #28]
- if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC4) != RESET)
- 8003156: 6823 ldr r3, [r4, #0]
- 8003158: 691a ldr r2, [r3, #16]
- 800315a: f012 0f10 tst.w r2, #16
- 800315e: d012 beq.n 8003186 <HAL_TIM_IRQHandler+0xc2>
- if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC4) != RESET)
- 8003160: 68da ldr r2, [r3, #12]
- 8003162: f012 0f10 tst.w r2, #16
- 8003166: d00e beq.n 8003186 <HAL_TIM_IRQHandler+0xc2>
- __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC4);
- 8003168: f06f 0210 mvn.w r2, #16
- 800316c: 611a str r2, [r3, #16]
- htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4;
- 800316e: 2308 movs r3, #8
- 8003170: 7723 strb r3, [r4, #28]
- if ((htim->Instance->CCMR2 & TIM_CCMR2_CC4S) != 0x00U)
- 8003172: 6823 ldr r3, [r4, #0]
- 8003174: 69db ldr r3, [r3, #28]
- 8003176: f413 7f40 tst.w r3, #768 @ 0x300
- 800317a: d046 beq.n 800320a <HAL_TIM_IRQHandler+0x146>
- HAL_TIM_IC_CaptureCallback(htim);
- 800317c: 4620 mov r0, r4
- 800317e: f7ff ff9e bl 80030be <HAL_TIM_IC_CaptureCallback>
- htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
- 8003182: 2300 movs r3, #0
- 8003184: 7723 strb r3, [r4, #28]
- if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_UPDATE) != RESET)
- 8003186: 6823 ldr r3, [r4, #0]
- 8003188: 691a ldr r2, [r3, #16]
- 800318a: f012 0f01 tst.w r2, #1
- 800318e: d003 beq.n 8003198 <HAL_TIM_IRQHandler+0xd4>
- if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_UPDATE) != RESET)
- 8003190: 68da ldr r2, [r3, #12]
- 8003192: f012 0f01 tst.w r2, #1
- 8003196: d13f bne.n 8003218 <HAL_TIM_IRQHandler+0x154>
- if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK) != RESET)
- 8003198: 6823 ldr r3, [r4, #0]
- 800319a: 691a ldr r2, [r3, #16]
- 800319c: f012 0f80 tst.w r2, #128 @ 0x80
- 80031a0: d003 beq.n 80031aa <HAL_TIM_IRQHandler+0xe6>
- if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET)
- 80031a2: 68da ldr r2, [r3, #12]
- 80031a4: f012 0f80 tst.w r2, #128 @ 0x80
- 80031a8: d13d bne.n 8003226 <HAL_TIM_IRQHandler+0x162>
- if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK2) != RESET)
- 80031aa: 6823 ldr r3, [r4, #0]
- 80031ac: 691a ldr r2, [r3, #16]
- 80031ae: f412 7f80 tst.w r2, #256 @ 0x100
- 80031b2: d003 beq.n 80031bc <HAL_TIM_IRQHandler+0xf8>
- if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET)
- 80031b4: 68da ldr r2, [r3, #12]
- 80031b6: f012 0f80 tst.w r2, #128 @ 0x80
- 80031ba: d13b bne.n 8003234 <HAL_TIM_IRQHandler+0x170>
- if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_TRIGGER) != RESET)
- 80031bc: 6823 ldr r3, [r4, #0]
- 80031be: 691a ldr r2, [r3, #16]
- 80031c0: f012 0f40 tst.w r2, #64 @ 0x40
- 80031c4: d003 beq.n 80031ce <HAL_TIM_IRQHandler+0x10a>
- if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_TRIGGER) != RESET)
- 80031c6: 68da ldr r2, [r3, #12]
- 80031c8: f012 0f40 tst.w r2, #64 @ 0x40
- 80031cc: d139 bne.n 8003242 <HAL_TIM_IRQHandler+0x17e>
- if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_COM) != RESET)
- 80031ce: 6823 ldr r3, [r4, #0]
- 80031d0: 691a ldr r2, [r3, #16]
- 80031d2: f012 0f20 tst.w r2, #32
- 80031d6: d003 beq.n 80031e0 <HAL_TIM_IRQHandler+0x11c>
- if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_COM) != RESET)
- 80031d8: 68da ldr r2, [r3, #12]
- 80031da: f012 0f20 tst.w r2, #32
- 80031de: d137 bne.n 8003250 <HAL_TIM_IRQHandler+0x18c>
- }
- 80031e0: bd10 pop {r4, pc}
- HAL_TIM_OC_DelayElapsedCallback(htim);
- 80031e2: f7ff ff6b bl 80030bc <HAL_TIM_OC_DelayElapsedCallback>
- HAL_TIM_PWM_PulseFinishedCallback(htim);
- 80031e6: 4620 mov r0, r4
- 80031e8: f7ff ff6a bl 80030c0 <HAL_TIM_PWM_PulseFinishedCallback>
- 80031ec: e781 b.n 80030f2 <HAL_TIM_IRQHandler+0x2e>
- HAL_TIM_OC_DelayElapsedCallback(htim);
- 80031ee: 4620 mov r0, r4
- 80031f0: f7ff ff64 bl 80030bc <HAL_TIM_OC_DelayElapsedCallback>
- HAL_TIM_PWM_PulseFinishedCallback(htim);
- 80031f4: 4620 mov r0, r4
- 80031f6: f7ff ff63 bl 80030c0 <HAL_TIM_PWM_PulseFinishedCallback>
- 80031fa: e792 b.n 8003122 <HAL_TIM_IRQHandler+0x5e>
- HAL_TIM_OC_DelayElapsedCallback(htim);
- 80031fc: 4620 mov r0, r4
- 80031fe: f7ff ff5d bl 80030bc <HAL_TIM_OC_DelayElapsedCallback>
- HAL_TIM_PWM_PulseFinishedCallback(htim);
- 8003202: 4620 mov r0, r4
- 8003204: f7ff ff5c bl 80030c0 <HAL_TIM_PWM_PulseFinishedCallback>
- 8003208: e7a3 b.n 8003152 <HAL_TIM_IRQHandler+0x8e>
- HAL_TIM_OC_DelayElapsedCallback(htim);
- 800320a: 4620 mov r0, r4
- 800320c: f7ff ff56 bl 80030bc <HAL_TIM_OC_DelayElapsedCallback>
- HAL_TIM_PWM_PulseFinishedCallback(htim);
- 8003210: 4620 mov r0, r4
- 8003212: f7ff ff55 bl 80030c0 <HAL_TIM_PWM_PulseFinishedCallback>
- 8003216: e7b4 b.n 8003182 <HAL_TIM_IRQHandler+0xbe>
- __HAL_TIM_CLEAR_IT(htim, TIM_IT_UPDATE);
- 8003218: f06f 0201 mvn.w r2, #1
- 800321c: 611a str r2, [r3, #16]
- HAL_TIM_PeriodElapsedCallback(htim);
- 800321e: 4620 mov r0, r4
- 8003220: f7fd f9fa bl 8000618 <HAL_TIM_PeriodElapsedCallback>
- 8003224: e7b8 b.n 8003198 <HAL_TIM_IRQHandler+0xd4>
- __HAL_TIM_CLEAR_IT(htim, TIM_IT_BREAK);
- 8003226: f06f 0280 mvn.w r2, #128 @ 0x80
- 800322a: 611a str r2, [r3, #16]
- HAL_TIMEx_BreakCallback(htim);
- 800322c: 4620 mov r0, r4
- 800322e: f000 f8ca bl 80033c6 <HAL_TIMEx_BreakCallback>
- 8003232: e7ba b.n 80031aa <HAL_TIM_IRQHandler+0xe6>
- __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_BREAK2);
- 8003234: f46f 7280 mvn.w r2, #256 @ 0x100
- 8003238: 611a str r2, [r3, #16]
- HAL_TIMEx_Break2Callback(htim);
- 800323a: 4620 mov r0, r4
- 800323c: f000 f8c4 bl 80033c8 <HAL_TIMEx_Break2Callback>
- 8003240: e7bc b.n 80031bc <HAL_TIM_IRQHandler+0xf8>
- __HAL_TIM_CLEAR_IT(htim, TIM_IT_TRIGGER);
- 8003242: f06f 0240 mvn.w r2, #64 @ 0x40
- 8003246: 611a str r2, [r3, #16]
- HAL_TIM_TriggerCallback(htim);
- 8003248: 4620 mov r0, r4
- 800324a: f7ff ff3a bl 80030c2 <HAL_TIM_TriggerCallback>
- 800324e: e7be b.n 80031ce <HAL_TIM_IRQHandler+0x10a>
- __HAL_TIM_CLEAR_IT(htim, TIM_FLAG_COM);
- 8003250: f06f 0220 mvn.w r2, #32
- 8003254: 611a str r2, [r3, #16]
- HAL_TIMEx_CommutCallback(htim);
- 8003256: 4620 mov r0, r4
- 8003258: f000 f8b4 bl 80033c4 <HAL_TIMEx_CommutCallback>
- }
- 800325c: e7c0 b.n 80031e0 <HAL_TIM_IRQHandler+0x11c>
- ...
- 08003260 <TIM_Base_SetConfig>:
- * @param TIMx TIM peripheral
- * @param Structure TIM Base configuration structure
- * @retval None
- */
- void TIM_Base_SetConfig(TIM_TypeDef *TIMx, TIM_Base_InitTypeDef *Structure)
- {
- 8003260: b530 push {r4, r5, lr}
- uint32_t tmpcr1;
- tmpcr1 = TIMx->CR1;
- 8003262: 6803 ldr r3, [r0, #0]
- /* Set TIM Time Base Unit parameters ---------------------------------------*/
- if (IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx))
- 8003264: 4a39 ldr r2, [pc, #228] @ (800334c <TIM_Base_SetConfig+0xec>)
- 8003266: 4290 cmp r0, r2
- 8003268: bf14 ite ne
- 800326a: f04f 0e00 movne.w lr, #0
- 800326e: f04f 0e01 moveq.w lr, #1
- 8003272: f1b0 4f80 cmp.w r0, #1073741824 @ 0x40000000
- 8003276: bf14 ite ne
- 8003278: 4672 movne r2, lr
- 800327a: f04e 0201 orreq.w r2, lr, #1
- 800327e: b9aa cbnz r2, 80032ac <TIM_Base_SetConfig+0x4c>
- 8003280: 4c33 ldr r4, [pc, #204] @ (8003350 <TIM_Base_SetConfig+0xf0>)
- 8003282: 42a0 cmp r0, r4
- 8003284: bf14 ite ne
- 8003286: 2400 movne r4, #0
- 8003288: 2401 moveq r4, #1
- 800328a: 4d32 ldr r5, [pc, #200] @ (8003354 <TIM_Base_SetConfig+0xf4>)
- 800328c: 42a8 cmp r0, r5
- 800328e: d00d beq.n 80032ac <TIM_Base_SetConfig+0x4c>
- 8003290: b964 cbnz r4, 80032ac <TIM_Base_SetConfig+0x4c>
- 8003292: f104 4480 add.w r4, r4, #1073741824 @ 0x40000000
- 8003296: f504 3482 add.w r4, r4, #66560 @ 0x10400
- 800329a: 42a0 cmp r0, r4
- 800329c: bf14 ite ne
- 800329e: 2400 movne r4, #0
- 80032a0: 2401 moveq r4, #1
- 80032a2: f505 6500 add.w r5, r5, #2048 @ 0x800
- 80032a6: 42a8 cmp r0, r5
- 80032a8: d000 beq.n 80032ac <TIM_Base_SetConfig+0x4c>
- 80032aa: b11c cbz r4, 80032b4 <TIM_Base_SetConfig+0x54>
- {
- /* Select the Counter Mode */
- tmpcr1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS);
- 80032ac: f023 0370 bic.w r3, r3, #112 @ 0x70
- tmpcr1 |= Structure->CounterMode;
- 80032b0: 684c ldr r4, [r1, #4]
- 80032b2: 4323 orrs r3, r4
- }
- if (IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx))
- 80032b4: bb12 cbnz r2, 80032fc <TIM_Base_SetConfig+0x9c>
- 80032b6: 4a26 ldr r2, [pc, #152] @ (8003350 <TIM_Base_SetConfig+0xf0>)
- 80032b8: 4290 cmp r0, r2
- 80032ba: bf14 ite ne
- 80032bc: 2200 movne r2, #0
- 80032be: 2201 moveq r2, #1
- 80032c0: 4c24 ldr r4, [pc, #144] @ (8003354 <TIM_Base_SetConfig+0xf4>)
- 80032c2: 42a0 cmp r0, r4
- 80032c4: d01a beq.n 80032fc <TIM_Base_SetConfig+0x9c>
- 80032c6: b9ca cbnz r2, 80032fc <TIM_Base_SetConfig+0x9c>
- 80032c8: f102 4280 add.w r2, r2, #1073741824 @ 0x40000000
- 80032cc: f502 3282 add.w r2, r2, #66560 @ 0x10400
- 80032d0: 4290 cmp r0, r2
- 80032d2: bf14 ite ne
- 80032d4: 2200 movne r2, #0
- 80032d6: 2201 moveq r2, #1
- 80032d8: f504 6400 add.w r4, r4, #2048 @ 0x800
- 80032dc: 42a0 cmp r0, r4
- 80032de: d00d beq.n 80032fc <TIM_Base_SetConfig+0x9c>
- 80032e0: b962 cbnz r2, 80032fc <TIM_Base_SetConfig+0x9c>
- 80032e2: 4a1d ldr r2, [pc, #116] @ (8003358 <TIM_Base_SetConfig+0xf8>)
- 80032e4: 4290 cmp r0, r2
- 80032e6: bf14 ite ne
- 80032e8: 2200 movne r2, #0
- 80032ea: 2201 moveq r2, #1
- 80032ec: f504 349a add.w r4, r4, #78848 @ 0x13400
- 80032f0: 42a0 cmp r0, r4
- 80032f2: d003 beq.n 80032fc <TIM_Base_SetConfig+0x9c>
- 80032f4: b912 cbnz r2, 80032fc <TIM_Base_SetConfig+0x9c>
- 80032f6: 4a19 ldr r2, [pc, #100] @ (800335c <TIM_Base_SetConfig+0xfc>)
- 80032f8: 4290 cmp r0, r2
- 80032fa: d104 bne.n 8003306 <TIM_Base_SetConfig+0xa6>
- {
- /* Set the clock division */
- tmpcr1 &= ~TIM_CR1_CKD;
- 80032fc: f423 7c40 bic.w ip, r3, #768 @ 0x300
- tmpcr1 |= (uint32_t)Structure->ClockDivision;
- 8003300: 68cb ldr r3, [r1, #12]
- 8003302: ea43 030c orr.w r3, r3, ip
- }
- /* Set the auto-reload preload */
- MODIFY_REG(tmpcr1, TIM_CR1_ARPE, Structure->AutoReloadPreload);
- 8003306: f023 0380 bic.w r3, r3, #128 @ 0x80
- 800330a: 694a ldr r2, [r1, #20]
- 800330c: 4313 orrs r3, r2
- TIMx->CR1 = tmpcr1;
- 800330e: 6003 str r3, [r0, #0]
- /* Set the Autoreload value */
- TIMx->ARR = (uint32_t)Structure->Period ;
- 8003310: 688a ldr r2, [r1, #8]
- 8003312: 62c2 str r2, [r0, #44] @ 0x2c
- /* Set the Prescaler value */
- TIMx->PSC = Structure->Prescaler;
- 8003314: 680a ldr r2, [r1, #0]
- 8003316: 6282 str r2, [r0, #40] @ 0x28
- if (IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx))
- 8003318: 4a11 ldr r2, [pc, #68] @ (8003360 <TIM_Base_SetConfig+0x100>)
- 800331a: 4290 cmp r0, r2
- 800331c: bf14 ite ne
- 800331e: 4673 movne r3, lr
- 8003320: f04e 0301 orreq.w r3, lr, #1
- 8003324: b963 cbnz r3, 8003340 <TIM_Base_SetConfig+0xe0>
- 8003326: 4b0c ldr r3, [pc, #48] @ (8003358 <TIM_Base_SetConfig+0xf8>)
- 8003328: 4298 cmp r0, r3
- 800332a: bf14 ite ne
- 800332c: 2300 movne r3, #0
- 800332e: 2301 moveq r3, #1
- 8003330: f502 5270 add.w r2, r2, #15360 @ 0x3c00
- 8003334: 4290 cmp r0, r2
- 8003336: d003 beq.n 8003340 <TIM_Base_SetConfig+0xe0>
- 8003338: b913 cbnz r3, 8003340 <TIM_Base_SetConfig+0xe0>
- 800333a: 4b08 ldr r3, [pc, #32] @ (800335c <TIM_Base_SetConfig+0xfc>)
- 800333c: 4298 cmp r0, r3
- 800333e: d101 bne.n 8003344 <TIM_Base_SetConfig+0xe4>
- {
- /* Set the Repetition Counter value */
- TIMx->RCR = Structure->RepetitionCounter;
- 8003340: 690b ldr r3, [r1, #16]
- 8003342: 6303 str r3, [r0, #48] @ 0x30
- }
- /* Generate an update event to reload the Prescaler
- and the repetition counter (only for advanced timer) value immediately */
- TIMx->EGR = TIM_EGR_UG;
- 8003344: 2301 movs r3, #1
- 8003346: 6143 str r3, [r0, #20]
- }
- 8003348: bd30 pop {r4, r5, pc}
- 800334a: bf00 nop
- 800334c: 40010000 .word 0x40010000
- 8003350: 40000800 .word 0x40000800
- 8003354: 40000400 .word 0x40000400
- 8003358: 40014400 .word 0x40014400
- 800335c: 40014800 .word 0x40014800
- 8003360: 40010400 .word 0x40010400
- 08003364 <HAL_TIM_Base_Init>:
- if (htim == NULL)
- 8003364: b360 cbz r0, 80033c0 <HAL_TIM_Base_Init+0x5c>
- {
- 8003366: b510 push {r4, lr}
- 8003368: 4604 mov r4, r0
- if (htim->State == HAL_TIM_STATE_RESET)
- 800336a: f890 303d ldrb.w r3, [r0, #61] @ 0x3d
- 800336e: b313 cbz r3, 80033b6 <HAL_TIM_Base_Init+0x52>
- htim->State = HAL_TIM_STATE_BUSY;
- 8003370: 2302 movs r3, #2
- 8003372: f884 303d strb.w r3, [r4, #61] @ 0x3d
- TIM_Base_SetConfig(htim->Instance, &htim->Init);
- 8003376: 4621 mov r1, r4
- 8003378: f851 0b04 ldr.w r0, [r1], #4
- 800337c: f7ff ff70 bl 8003260 <TIM_Base_SetConfig>
- htim->DMABurstState = HAL_DMA_BURST_STATE_READY;
- 8003380: 2301 movs r3, #1
- 8003382: f884 3048 strb.w r3, [r4, #72] @ 0x48
- TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
- 8003386: f884 303e strb.w r3, [r4, #62] @ 0x3e
- 800338a: f884 303f strb.w r3, [r4, #63] @ 0x3f
- 800338e: f884 3040 strb.w r3, [r4, #64] @ 0x40
- 8003392: f884 3041 strb.w r3, [r4, #65] @ 0x41
- 8003396: f884 3042 strb.w r3, [r4, #66] @ 0x42
- 800339a: f884 3043 strb.w r3, [r4, #67] @ 0x43
- TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
- 800339e: f884 3044 strb.w r3, [r4, #68] @ 0x44
- 80033a2: f884 3045 strb.w r3, [r4, #69] @ 0x45
- 80033a6: f884 3046 strb.w r3, [r4, #70] @ 0x46
- 80033aa: f884 3047 strb.w r3, [r4, #71] @ 0x47
- htim->State = HAL_TIM_STATE_READY;
- 80033ae: f884 303d strb.w r3, [r4, #61] @ 0x3d
- return HAL_OK;
- 80033b2: 2000 movs r0, #0
- }
- 80033b4: bd10 pop {r4, pc}
- htim->Lock = HAL_UNLOCKED;
- 80033b6: f880 303c strb.w r3, [r0, #60] @ 0x3c
- HAL_TIM_Base_MspInit(htim);
- 80033ba: f7ff fe35 bl 8003028 <HAL_TIM_Base_MspInit>
- 80033be: e7d7 b.n 8003370 <HAL_TIM_Base_Init+0xc>
- return HAL_ERROR;
- 80033c0: 2001 movs r0, #1
- }
- 80033c2: 4770 bx lr
- 080033c4 <HAL_TIMEx_CommutCallback>:
- UNUSED(htim);
- /* NOTE : This function should not be modified, when the callback is needed,
- the HAL_TIMEx_CommutCallback could be implemented in the user file
- */
- }
- 80033c4: 4770 bx lr
- 080033c6 <HAL_TIMEx_BreakCallback>:
- UNUSED(htim);
- /* NOTE : This function should not be modified, when the callback is needed,
- the HAL_TIMEx_BreakCallback could be implemented in the user file
- */
- }
- 80033c6: 4770 bx lr
- 080033c8 <HAL_TIMEx_Break2Callback>:
- UNUSED(htim);
- /* NOTE : This function Should not be modified, when the callback is needed,
- the HAL_TIMEx_Break2Callback could be implemented in the user file
- */
- }
- 80033c8: 4770 bx lr
- 080033ca <ethernet_link_status_updated>:
- else /* netif is down */
- {
- /* USER CODE BEGIN 6 */
- /* USER CODE END 6 */
- }
- }
- 80033ca: 4770 bx lr
- 080033cc <is_link_up>:
- return netif_is_up(&gnetif);
- 80033cc: 4b02 ldr r3, [pc, #8] @ (80033d8 <is_link_up+0xc>)
- 80033ce: f893 0031 ldrb.w r0, [r3, #49] @ 0x31
- }
- 80033d2: f000 0001 and.w r0, r0, #1
- 80033d6: 4770 bx lr
- 80033d8: 24000db4 .word 0x24000db4
- 080033dc <MX_LWIP_Init>:
- {
- 80033dc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 80033e0: b084 sub sp, #16
- ip_addr_set_zero_ip4(&ipaddr);
- 80033e2: 4e24 ldr r6, [pc, #144] @ (8003474 <MX_LWIP_Init+0x98>)
- 80033e4: 2400 movs r4, #0
- 80033e6: 6034 str r4, [r6, #0]
- ip_addr_set_zero_ip4(&netmask);
- 80033e8: 4f23 ldr r7, [pc, #140] @ (8003478 <MX_LWIP_Init+0x9c>)
- 80033ea: 603c str r4, [r7, #0]
- ip_addr_set_zero_ip4(&gw);
- 80033ec: f8df 80a8 ldr.w r8, [pc, #168] @ 8003498 <MX_LWIP_Init+0xbc>
- 80033f0: f8c8 4000 str.w r4, [r8]
- tcpip_init(tcpip_init_done, arg);
- 80033f4: 4621 mov r1, r4
- 80033f6: 4620 mov r0, r4
- 80033f8: f00e f860 bl 80114bc <tcpip_init>
- LOCK_TCPIP_CORE();
- 80033fc: f000 fb6c bl 8003ad8 <sys_lock_tcpip_core>
- netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input);
- 8003400: 4d1e ldr r5, [pc, #120] @ (800347c <MX_LWIP_Init+0xa0>)
- 8003402: 4b1f ldr r3, [pc, #124] @ (8003480 <MX_LWIP_Init+0xa4>)
- 8003404: 9302 str r3, [sp, #8]
- 8003406: 4b1f ldr r3, [pc, #124] @ (8003484 <MX_LWIP_Init+0xa8>)
- 8003408: 9301 str r3, [sp, #4]
- 800340a: 9400 str r4, [sp, #0]
- 800340c: 4643 mov r3, r8
- 800340e: 463a mov r2, r7
- 8003410: 4631 mov r1, r6
- 8003412: 4628 mov r0, r5
- 8003414: f008 fa52 bl 800b8bc <netif_add>
- netif_set_default(&gnetif);
- 8003418: 4628 mov r0, r5
- 800341a: f008 faed bl 800b9f8 <netif_set_default>
- if (netif_is_link_up(&gnetif))
- 800341e: f895 3031 ldrb.w r3, [r5, #49] @ 0x31
- 8003422: f013 0f04 tst.w r3, #4
- 8003426: d021 beq.n 800346c <MX_LWIP_Init+0x90>
- netif_set_up(&gnetif);
- 8003428: 4628 mov r0, r5
- 800342a: f008 faef bl 800ba0c <netif_set_up>
- netif_set_link_callback(&gnetif, ethernet_link_status_updated);
- 800342e: 4d13 ldr r5, [pc, #76] @ (800347c <MX_LWIP_Init+0xa0>)
- 8003430: 4915 ldr r1, [pc, #84] @ (8003488 <MX_LWIP_Init+0xac>)
- 8003432: 4628 mov r0, r5
- 8003434: f008 fb7c bl 800bb30 <netif_set_link_callback>
- memset(&attributes, 0x0, sizeof(osThreadAttr_t));
- 8003438: 4c14 ldr r4, [pc, #80] @ (800348c <MX_LWIP_Init+0xb0>)
- 800343a: 2224 movs r2, #36 @ 0x24
- 800343c: 2100 movs r1, #0
- 800343e: 4620 mov r0, r4
- 8003440: f010 f93a bl 80136b8 <memset>
- attributes.name = "EthLink";
- 8003444: 4b12 ldr r3, [pc, #72] @ (8003490 <MX_LWIP_Init+0xb4>)
- 8003446: 6023 str r3, [r4, #0]
- attributes.stack_size = INTERFACE_THREAD_STACK_SIZE * 2;
- 8003448: f44f 6300 mov.w r3, #2048 @ 0x800
- 800344c: 6163 str r3, [r4, #20]
- attributes.priority = osPriorityBelowNormal;
- 800344e: 2310 movs r3, #16
- 8003450: 61a3 str r3, [r4, #24]
- osThreadNew(ethernet_link_thread, &gnetif, &attributes);
- 8003452: 4622 mov r2, r4
- 8003454: 4629 mov r1, r5
- 8003456: 480f ldr r0, [pc, #60] @ (8003494 <MX_LWIP_Init+0xb8>)
- 8003458: f000 fcbe bl 8003dd8 <osThreadNew>
- dhcp_start(&gnetif);
- 800345c: 4628 mov r0, r5
- 800345e: f005 fe87 bl 8009170 <dhcp_start>
- UNLOCK_TCPIP_CORE();
- 8003462: f000 fb47 bl 8003af4 <sys_unlock_tcpip_core>
- }
- 8003466: b004 add sp, #16
- 8003468: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- netif_set_down(&gnetif);
- 800346c: 4803 ldr r0, [pc, #12] @ (800347c <MX_LWIP_Init+0xa0>)
- 800346e: f008 faef bl 800ba50 <netif_set_down>
- 8003472: e7dc b.n 800342e <MX_LWIP_Init+0x52>
- 8003474: 24000db0 .word 0x24000db0
- 8003478: 24000dac .word 0x24000dac
- 800347c: 24000db4 .word 0x24000db4
- 8003480: 08011421 .word 0x08011421
- 8003484: 080039dd .word 0x080039dd
- 8003488: 080033cb .word 0x080033cb
- 800348c: 24000d84 .word 0x24000d84
- 8003490: 080144ac .word 0x080144ac
- 8003494: 08003c5d .word 0x08003c5d
- 8003498: 24000da8 .word 0x24000da8
- 0800349c <ETH_PHY_IO_DeInit>:
- * @retval 0 if OK, -1 if ERROR
- */
- int32_t ETH_PHY_IO_DeInit (void)
- {
- return 0;
- }
- 800349c: 2000 movs r0, #0
- 800349e: 4770 bx lr
- 080034a0 <low_level_input>:
- {
- 80034a0: b500 push {lr}
- 80034a2: b083 sub sp, #12
- struct pbuf *p = NULL;
- 80034a4: 2300 movs r3, #0
- 80034a6: 9301 str r3, [sp, #4]
- if(RxAllocStatus == RX_ALLOC_OK)
- 80034a8: 4b05 ldr r3, [pc, #20] @ (80034c0 <low_level_input+0x20>)
- 80034aa: 781b ldrb r3, [r3, #0]
- 80034ac: b11b cbz r3, 80034b6 <low_level_input+0x16>
- }
- 80034ae: 9801 ldr r0, [sp, #4]
- 80034b0: b003 add sp, #12
- 80034b2: f85d fb04 ldr.w pc, [sp], #4
- HAL_ETH_ReadData(&heth, (void **)&p);
- 80034b6: a901 add r1, sp, #4
- 80034b8: 4802 ldr r0, [pc, #8] @ (80034c4 <low_level_input+0x24>)
- 80034ba: f7fe fa93 bl 80019e4 <HAL_ETH_ReadData>
- 80034be: e7f6 b.n 80034ae <low_level_input+0xe>
- 80034c0: 24000f04 .word 0x24000f04
- 80034c4: 24000e4c .word 0x24000e4c
- 080034c8 <ethernetif_input>:
- {
- 80034c8: b538 push {r3, r4, r5, lr}
- 80034ca: 4605 mov r5, r0
- if (osSemaphoreAcquire(RxPktSemaphore, TIME_WAITING_FOR_INPUT) == osOK)
- 80034cc: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
- 80034d0: 4b0b ldr r3, [pc, #44] @ (8003500 <ethernetif_input+0x38>)
- 80034d2: 6818 ldr r0, [r3, #0]
- 80034d4: f000 fdf0 bl 80040b8 <osSemaphoreAcquire>
- 80034d8: 2800 cmp r0, #0
- 80034da: d1f7 bne.n 80034cc <ethernetif_input+0x4>
- 80034dc: e001 b.n 80034e2 <ethernetif_input+0x1a>
- } while(p!=NULL);
- 80034de: 2c00 cmp r4, #0
- 80034e0: d0f4 beq.n 80034cc <ethernetif_input+0x4>
- p = low_level_input( netif );
- 80034e2: 4628 mov r0, r5
- 80034e4: f7ff ffdc bl 80034a0 <low_level_input>
- if (p != NULL)
- 80034e8: 4604 mov r4, r0
- 80034ea: 2800 cmp r0, #0
- 80034ec: d0f7 beq.n 80034de <ethernetif_input+0x16>
- if (netif->input( p, netif) != ERR_OK )
- 80034ee: 692b ldr r3, [r5, #16]
- 80034f0: 4629 mov r1, r5
- 80034f2: 4798 blx r3
- 80034f4: 2800 cmp r0, #0
- 80034f6: d0f2 beq.n 80034de <ethernetif_input+0x16>
- pbuf_free(p);
- 80034f8: 4620 mov r0, r4
- 80034fa: f008 fc51 bl 800bda0 <pbuf_free>
- 80034fe: e7ee b.n 80034de <ethernetif_input+0x16>
- 8003500: 24000f00 .word 0x24000f00
- 08003504 <low_level_output>:
- {
- 8003504: b530 push {r4, r5, lr}
- 8003506: b08d sub sp, #52 @ 0x34
- 8003508: 460c mov r4, r1
- memset(Txbuffer, 0 , ETH_TX_DESC_CNT*sizeof(ETH_BufferTypeDef));
- 800350a: 2230 movs r2, #48 @ 0x30
- 800350c: 2100 movs r1, #0
- 800350e: 4668 mov r0, sp
- 8003510: f010 f8d2 bl 80136b8 <memset>
- for(q = p; q != NULL; q = q->next)
- 8003514: 4622 mov r2, r4
- uint32_t i = 0U;
- 8003516: 2300 movs r3, #0
- for(q = p; q != NULL; q = q->next)
- 8003518: e003 b.n 8003522 <low_level_output+0x1e>
- if(q->next == NULL)
- 800351a: 6811 ldr r1, [r2, #0]
- 800351c: b1f1 cbz r1, 800355c <low_level_output+0x58>
- i++;
- 800351e: 3301 adds r3, #1
- for(q = p; q != NULL; q = q->next)
- 8003520: 6812 ldr r2, [r2, #0]
- 8003522: b322 cbz r2, 800356e <low_level_output+0x6a>
- if(i >= ETH_TX_DESC_CNT)
- 8003524: 2b03 cmp r3, #3
- 8003526: d83b bhi.n 80035a0 <low_level_output+0x9c>
- Txbuffer[i].buffer = q->payload;
- 8003528: 6851 ldr r1, [r2, #4]
- 800352a: eb03 0c43 add.w ip, r3, r3, lsl #1
- 800352e: a80c add r0, sp, #48 @ 0x30
- 8003530: eb00 0c8c add.w ip, r0, ip, lsl #2
- 8003534: f84c 1c30 str.w r1, [ip, #-48]
- Txbuffer[i].len = q->len;
- 8003538: 8951 ldrh r1, [r2, #10]
- 800353a: f84c 1c2c str.w r1, [ip, #-44]
- if(i>0)
- 800353e: 2b00 cmp r3, #0
- 8003540: d0eb beq.n 800351a <low_level_output+0x16>
- Txbuffer[i-1].next = &Txbuffer[i];
- 8003542: f103 3cff add.w ip, r3, #4294967295 @ 0xffffffff
- 8003546: eb03 0143 add.w r1, r3, r3, lsl #1
- 800354a: eb0d 0181 add.w r1, sp, r1, lsl #2
- 800354e: eb0c 0c4c add.w ip, ip, ip, lsl #1
- 8003552: eb00 0c8c add.w ip, r0, ip, lsl #2
- 8003556: f84c 1c28 str.w r1, [ip, #-40]
- 800355a: e7de b.n 800351a <low_level_output+0x16>
- Txbuffer[i].next = NULL;
- 800355c: eb03 0143 add.w r1, r3, r3, lsl #1
- 8003560: a80c add r0, sp, #48 @ 0x30
- 8003562: eb00 0181 add.w r1, r0, r1, lsl #2
- 8003566: 2000 movs r0, #0
- 8003568: f841 0c28 str.w r0, [r1, #-40]
- 800356c: e7d7 b.n 800351e <low_level_output+0x1a>
- TxConfig.Length = p->tot_len;
- 800356e: 8923 ldrh r3, [r4, #8]
- 8003570: 4d0d ldr r5, [pc, #52] @ (80035a8 <low_level_output+0xa4>)
- 8003572: 606b str r3, [r5, #4]
- TxConfig.TxBuffer = Txbuffer;
- 8003574: f8c5 d008 str.w sp, [r5, #8]
- TxConfig.pData = p;
- 8003578: 636c str r4, [r5, #52] @ 0x34
- pbuf_ref(p);
- 800357a: 4620 mov r0, r4
- 800357c: f008 fd9e bl 800c0bc <pbuf_ref>
- HAL_ETH_Transmit_IT(&heth, &TxConfig);
- 8003580: 4c0a ldr r4, [pc, #40] @ (80035ac <low_level_output+0xa8>)
- 8003582: 4629 mov r1, r5
- 8003584: 4620 mov r0, r4
- 8003586: f7fe f9f9 bl 800197c <HAL_ETH_Transmit_IT>
- osSemaphoreAcquire(TxPktSemaphore, pdMS_TO_TICKS(1000));
- 800358a: f44f 717a mov.w r1, #1000 @ 0x3e8
- 800358e: 4b08 ldr r3, [pc, #32] @ (80035b0 <low_level_output+0xac>)
- 8003590: 6818 ldr r0, [r3, #0]
- 8003592: f000 fd91 bl 80040b8 <osSemaphoreAcquire>
- HAL_ETH_ReleaseTxPacket(&heth);
- 8003596: 4620 mov r0, r4
- 8003598: f7fe faa3 bl 8001ae2 <HAL_ETH_ReleaseTxPacket>
- return errval;
- 800359c: 2000 movs r0, #0
- 800359e: e001 b.n 80035a4 <low_level_output+0xa0>
- return ERR_IF;
- 80035a0: f06f 000b mvn.w r0, #11
- }
- 80035a4: b00d add sp, #52 @ 0x34
- 80035a6: bd30 pop {r4, r5, pc}
- 80035a8: 24000e14 .word 0x24000e14
- 80035ac: 24000e4c .word 0x24000e4c
- 80035b0: 24000efc .word 0x24000efc
- 080035b4 <pbuf_free_custom>:
- {
- 80035b4: b508 push {r3, lr}
- 80035b6: 4601 mov r1, r0
- LWIP_MEMPOOL_FREE(RX_POOL, custom_pbuf);
- 80035b8: 4807 ldr r0, [pc, #28] @ (80035d8 <pbuf_free_custom+0x24>)
- 80035ba: f008 f83d bl 800b638 <memp_free_pool>
- if (RxAllocStatus == RX_ALLOC_ERROR)
- 80035be: 4b07 ldr r3, [pc, #28] @ (80035dc <pbuf_free_custom+0x28>)
- 80035c0: 781b ldrb r3, [r3, #0]
- 80035c2: 2b01 cmp r3, #1
- 80035c4: d000 beq.n 80035c8 <pbuf_free_custom+0x14>
- }
- 80035c6: bd08 pop {r3, pc}
- RxAllocStatus = RX_ALLOC_OK;
- 80035c8: 4b04 ldr r3, [pc, #16] @ (80035dc <pbuf_free_custom+0x28>)
- 80035ca: 2200 movs r2, #0
- 80035cc: 701a strb r2, [r3, #0]
- osSemaphoreRelease(RxPktSemaphore);
- 80035ce: 4b04 ldr r3, [pc, #16] @ (80035e0 <pbuf_free_custom+0x2c>)
- 80035d0: 6818 ldr r0, [r3, #0]
- 80035d2: f000 fda5 bl 8004120 <osSemaphoreRelease>
- }
- 80035d6: e7f6 b.n 80035c6 <pbuf_free_custom+0x12>
- 80035d8: 0801463c .word 0x0801463c
- 80035dc: 24000f04 .word 0x24000f04
- 80035e0: 24000f00 .word 0x24000f00
- 080035e4 <ETH_PHY_IO_GetTick>:
- /**
- * @brief Get the time in millisecons used for internal PHY driver process.
- * @retval Time value
- */
- int32_t ETH_PHY_IO_GetTick(void)
- {
- 80035e4: b508 push {r3, lr}
- return HAL_GetTick();
- 80035e6: f7fd fc51 bl 8000e8c <HAL_GetTick>
- }
- 80035ea: bd08 pop {r3, pc}
- 080035ec <ETH_PHY_IO_Init>:
- {
- 80035ec: b508 push {r3, lr}
- HAL_ETH_SetMDIOClockRange(&heth);
- 80035ee: 4802 ldr r0, [pc, #8] @ (80035f8 <ETH_PHY_IO_Init+0xc>)
- 80035f0: f7fe fce6 bl 8001fc0 <HAL_ETH_SetMDIOClockRange>
- }
- 80035f4: 2000 movs r0, #0
- 80035f6: bd08 pop {r3, pc}
- 80035f8: 24000e4c .word 0x24000e4c
- 080035fc <ETH_PHY_IO_ReadReg>:
- {
- 80035fc: b508 push {r3, lr}
- 80035fe: 4613 mov r3, r2
- if(HAL_ETH_ReadPHYRegister(&heth, DevAddr, RegAddr, pRegVal) != HAL_OK)
- 8003600: 460a mov r2, r1
- 8003602: 4601 mov r1, r0
- 8003604: 4803 ldr r0, [pc, #12] @ (8003614 <ETH_PHY_IO_ReadReg+0x18>)
- 8003606: f7fe fb75 bl 8001cf4 <HAL_ETH_ReadPHYRegister>
- 800360a: b900 cbnz r0, 800360e <ETH_PHY_IO_ReadReg+0x12>
- }
- 800360c: bd08 pop {r3, pc}
- return -1;
- 800360e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8003612: e7fb b.n 800360c <ETH_PHY_IO_ReadReg+0x10>
- 8003614: 24000e4c .word 0x24000e4c
- 08003618 <ETH_PHY_IO_WriteReg>:
- {
- 8003618: b508 push {r3, lr}
- 800361a: 4613 mov r3, r2
- if(HAL_ETH_WritePHYRegister(&heth, DevAddr, RegAddr, RegVal) != HAL_OK)
- 800361c: 460a mov r2, r1
- 800361e: 4601 mov r1, r0
- 8003620: 4803 ldr r0, [pc, #12] @ (8003630 <ETH_PHY_IO_WriteReg+0x18>)
- 8003622: f7fe fb97 bl 8001d54 <HAL_ETH_WritePHYRegister>
- 8003626: b900 cbnz r0, 800362a <ETH_PHY_IO_WriteReg+0x12>
- }
- 8003628: bd08 pop {r3, pc}
- return -1;
- 800362a: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800362e: e7fb b.n 8003628 <ETH_PHY_IO_WriteReg+0x10>
- 8003630: 24000e4c .word 0x24000e4c
- 08003634 <HAL_ETH_RxCpltCallback>:
- {
- 8003634: b508 push {r3, lr}
- osSemaphoreRelease(RxPktSemaphore);
- 8003636: 4b02 ldr r3, [pc, #8] @ (8003640 <HAL_ETH_RxCpltCallback+0xc>)
- 8003638: 6818 ldr r0, [r3, #0]
- 800363a: f000 fd71 bl 8004120 <osSemaphoreRelease>
- }
- 800363e: bd08 pop {r3, pc}
- 8003640: 24000f00 .word 0x24000f00
- 08003644 <HAL_ETH_TxCpltCallback>:
- {
- 8003644: b508 push {r3, lr}
- osSemaphoreRelease(TxPktSemaphore);
- 8003646: 4b02 ldr r3, [pc, #8] @ (8003650 <HAL_ETH_TxCpltCallback+0xc>)
- 8003648: 6818 ldr r0, [r3, #0]
- 800364a: f000 fd69 bl 8004120 <osSemaphoreRelease>
- }
- 800364e: bd08 pop {r3, pc}
- 8003650: 24000efc .word 0x24000efc
- 08003654 <HAL_ETH_ErrorCallback>:
- {
- 8003654: b508 push {r3, lr}
- if((HAL_ETH_GetDMAError(handlerEth) & ETH_DMACSR_RBU) == ETH_DMACSR_RBU)
- 8003656: f7fe fd95 bl 8002184 <HAL_ETH_GetDMAError>
- 800365a: f010 0f80 tst.w r0, #128 @ 0x80
- 800365e: d100 bne.n 8003662 <HAL_ETH_ErrorCallback+0xe>
- }
- 8003660: bd08 pop {r3, pc}
- osSemaphoreRelease(RxPktSemaphore);
- 8003662: 4b02 ldr r3, [pc, #8] @ (800366c <HAL_ETH_ErrorCallback+0x18>)
- 8003664: 6818 ldr r0, [r3, #0]
- 8003666: f000 fd5b bl 8004120 <osSemaphoreRelease>
- }
- 800366a: e7f9 b.n 8003660 <HAL_ETH_ErrorCallback+0xc>
- 800366c: 24000f00 .word 0x24000f00
- 08003670 <sys_now>:
- {
- 8003670: b508 push {r3, lr}
- return HAL_GetTick();
- 8003672: f7fd fc0b bl 8000e8c <HAL_GetTick>
- }
- 8003676: bd08 pop {r3, pc}
- 08003678 <HAL_ETH_MspInit>:
- {
- 8003678: b5f0 push {r4, r5, r6, r7, lr}
- 800367a: b08f sub sp, #60 @ 0x3c
- GPIO_InitTypeDef GPIO_InitStruct = {0};
- 800367c: 2300 movs r3, #0
- 800367e: 9309 str r3, [sp, #36] @ 0x24
- 8003680: 930a str r3, [sp, #40] @ 0x28
- 8003682: 930b str r3, [sp, #44] @ 0x2c
- 8003684: 930c str r3, [sp, #48] @ 0x30
- 8003686: 930d str r3, [sp, #52] @ 0x34
- if(ethHandle->Instance==ETH)
- 8003688: 6802 ldr r2, [r0, #0]
- 800368a: 4b5d ldr r3, [pc, #372] @ (8003800 <HAL_ETH_MspInit+0x188>)
- 800368c: 429a cmp r2, r3
- 800368e: d001 beq.n 8003694 <HAL_ETH_MspInit+0x1c>
- }
- 8003690: b00f add sp, #60 @ 0x3c
- 8003692: bdf0 pop {r4, r5, r6, r7, pc}
- __HAL_RCC_ETH1MAC_CLK_ENABLE();
- 8003694: 4b5b ldr r3, [pc, #364] @ (8003804 <HAL_ETH_MspInit+0x18c>)
- 8003696: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8
- 800369a: f442 4200 orr.w r2, r2, #32768 @ 0x8000
- 800369e: f8c3 20d8 str.w r2, [r3, #216] @ 0xd8
- 80036a2: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8
- 80036a6: f402 4200 and.w r2, r2, #32768 @ 0x8000
- 80036aa: 9200 str r2, [sp, #0]
- 80036ac: 9a00 ldr r2, [sp, #0]
- __HAL_RCC_ETH1TX_CLK_ENABLE();
- 80036ae: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8
- 80036b2: f442 3280 orr.w r2, r2, #65536 @ 0x10000
- 80036b6: f8c3 20d8 str.w r2, [r3, #216] @ 0xd8
- 80036ba: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8
- 80036be: f402 3280 and.w r2, r2, #65536 @ 0x10000
- 80036c2: 9201 str r2, [sp, #4]
- 80036c4: 9a01 ldr r2, [sp, #4]
- __HAL_RCC_ETH1RX_CLK_ENABLE();
- 80036c6: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8
- 80036ca: f442 3200 orr.w r2, r2, #131072 @ 0x20000
- 80036ce: f8c3 20d8 str.w r2, [r3, #216] @ 0xd8
- 80036d2: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8
- 80036d6: f402 3200 and.w r2, r2, #131072 @ 0x20000
- 80036da: 9202 str r2, [sp, #8]
- 80036dc: 9a02 ldr r2, [sp, #8]
- __HAL_RCC_GPIOG_CLK_ENABLE();
- 80036de: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 80036e2: f042 0240 orr.w r2, r2, #64 @ 0x40
- 80036e6: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
- 80036ea: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 80036ee: f002 0240 and.w r2, r2, #64 @ 0x40
- 80036f2: 9203 str r2, [sp, #12]
- 80036f4: 9a03 ldr r2, [sp, #12]
- __HAL_RCC_GPIOE_CLK_ENABLE();
- 80036f6: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 80036fa: f042 0210 orr.w r2, r2, #16
- 80036fe: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
- 8003702: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 8003706: f002 0210 and.w r2, r2, #16
- 800370a: 9204 str r2, [sp, #16]
- 800370c: 9a04 ldr r2, [sp, #16]
- __HAL_RCC_GPIOI_CLK_ENABLE();
- 800370e: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 8003712: f442 7280 orr.w r2, r2, #256 @ 0x100
- 8003716: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
- 800371a: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 800371e: f402 7280 and.w r2, r2, #256 @ 0x100
- 8003722: 9205 str r2, [sp, #20]
- 8003724: 9a05 ldr r2, [sp, #20]
- __HAL_RCC_GPIOC_CLK_ENABLE();
- 8003726: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 800372a: f042 0204 orr.w r2, r2, #4
- 800372e: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
- 8003732: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 8003736: f002 0204 and.w r2, r2, #4
- 800373a: 9206 str r2, [sp, #24]
- 800373c: 9a06 ldr r2, [sp, #24]
- __HAL_RCC_GPIOA_CLK_ENABLE();
- 800373e: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 8003742: f042 0201 orr.w r2, r2, #1
- 8003746: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
- 800374a: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 800374e: f002 0201 and.w r2, r2, #1
- 8003752: 9207 str r2, [sp, #28]
- 8003754: 9a07 ldr r2, [sp, #28]
- __HAL_RCC_GPIOB_CLK_ENABLE();
- 8003756: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
- 800375a: f042 0202 orr.w r2, r2, #2
- 800375e: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
- 8003762: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0
- 8003766: f003 0302 and.w r3, r3, #2
- 800376a: 9308 str r3, [sp, #32]
- 800376c: 9b08 ldr r3, [sp, #32]
- GPIO_InitStruct.Pin = MII_TX_EN_Pin|MII_TXD1_Pin|MII_TXD0_Pin;
- 800376e: f44f 5360 mov.w r3, #14336 @ 0x3800
- 8003772: 9309 str r3, [sp, #36] @ 0x24
- GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
- 8003774: 2702 movs r7, #2
- 8003776: 970a str r7, [sp, #40] @ 0x28
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
- 8003778: 2403 movs r4, #3
- 800377a: 940c str r4, [sp, #48] @ 0x30
- GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
- 800377c: 260b movs r6, #11
- 800377e: 960d str r6, [sp, #52] @ 0x34
- HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
- 8003780: a909 add r1, sp, #36 @ 0x24
- 8003782: 4821 ldr r0, [pc, #132] @ (8003808 <HAL_ETH_MspInit+0x190>)
- 8003784: f7fe fd02 bl 800218c <HAL_GPIO_Init>
- GPIO_InitStruct.Pin = MII_TXD3_Pin;
- 8003788: 2304 movs r3, #4
- 800378a: 9309 str r3, [sp, #36] @ 0x24
- GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
- 800378c: 970a str r7, [sp, #40] @ 0x28
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- 800378e: 2500 movs r5, #0
- 8003790: 950b str r5, [sp, #44] @ 0x2c
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
- 8003792: 940c str r4, [sp, #48] @ 0x30
- GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
- 8003794: 960d str r6, [sp, #52] @ 0x34
- HAL_GPIO_Init(MII_TXD3_GPIO_Port, &GPIO_InitStruct);
- 8003796: a909 add r1, sp, #36 @ 0x24
- 8003798: 481c ldr r0, [pc, #112] @ (800380c <HAL_ETH_MspInit+0x194>)
- 800379a: f7fe fcf7 bl 800218c <HAL_GPIO_Init>
- GPIO_InitStruct.Pin = MII_RX_ER_Pin;
- 800379e: f44f 6380 mov.w r3, #1024 @ 0x400
- 80037a2: 9309 str r3, [sp, #36] @ 0x24
- GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
- 80037a4: 970a str r7, [sp, #40] @ 0x28
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- 80037a6: 950b str r5, [sp, #44] @ 0x2c
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
- 80037a8: 940c str r4, [sp, #48] @ 0x30
- GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
- 80037aa: 960d str r6, [sp, #52] @ 0x34
- HAL_GPIO_Init(MII_RX_ER_GPIO_Port, &GPIO_InitStruct);
- 80037ac: a909 add r1, sp, #36 @ 0x24
- 80037ae: 4818 ldr r0, [pc, #96] @ (8003810 <HAL_ETH_MspInit+0x198>)
- 80037b0: f7fe fcec bl 800218c <HAL_GPIO_Init>
- GPIO_InitStruct.Pin = MII_MDC_Pin|MII_TXD2_Pin|MII_TX_CLK_Pin|MII_RXD0_Pin
- 80037b4: 233e movs r3, #62 @ 0x3e
- 80037b6: 9309 str r3, [sp, #36] @ 0x24
- GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
- 80037b8: 970a str r7, [sp, #40] @ 0x28
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- 80037ba: 950b str r5, [sp, #44] @ 0x2c
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
- 80037bc: 940c str r4, [sp, #48] @ 0x30
- GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
- 80037be: 960d str r6, [sp, #52] @ 0x34
- HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
- 80037c0: a909 add r1, sp, #36 @ 0x24
- 80037c2: 4814 ldr r0, [pc, #80] @ (8003814 <HAL_ETH_MspInit+0x19c>)
- 80037c4: f7fe fce2 bl 800218c <HAL_GPIO_Init>
- GPIO_InitStruct.Pin = MII_MDIO_Pin|GPIO_PIN_1|MII_CRS_Pin|GPIO_PIN_7
- 80037c8: 238f movs r3, #143 @ 0x8f
- 80037ca: 9309 str r3, [sp, #36] @ 0x24
- GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
- 80037cc: 970a str r7, [sp, #40] @ 0x28
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- 80037ce: 950b str r5, [sp, #44] @ 0x2c
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
- 80037d0: 940c str r4, [sp, #48] @ 0x30
- GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
- 80037d2: 960d str r6, [sp, #52] @ 0x34
- HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
- 80037d4: a909 add r1, sp, #36 @ 0x24
- 80037d6: 4810 ldr r0, [pc, #64] @ (8003818 <HAL_ETH_MspInit+0x1a0>)
- 80037d8: f7fe fcd8 bl 800218c <HAL_GPIO_Init>
- GPIO_InitStruct.Pin = MII_RXD3_Pin|MII_RXD2_Pin;
- 80037dc: 9409 str r4, [sp, #36] @ 0x24
- GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
- 80037de: 970a str r7, [sp, #40] @ 0x28
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- 80037e0: 950b str r5, [sp, #44] @ 0x2c
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
- 80037e2: 940c str r4, [sp, #48] @ 0x30
- GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
- 80037e4: 960d str r6, [sp, #52] @ 0x34
- HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
- 80037e6: a909 add r1, sp, #36 @ 0x24
- 80037e8: 480c ldr r0, [pc, #48] @ (800381c <HAL_ETH_MspInit+0x1a4>)
- 80037ea: f7fe fccf bl 800218c <HAL_GPIO_Init>
- HAL_NVIC_SetPriority(ETH_IRQn, 5, 0);
- 80037ee: 462a mov r2, r5
- 80037f0: 2105 movs r1, #5
- 80037f2: 203d movs r0, #61 @ 0x3d
- 80037f4: f7fd fbb2 bl 8000f5c <HAL_NVIC_SetPriority>
- HAL_NVIC_EnableIRQ(ETH_IRQn);
- 80037f8: 203d movs r0, #61 @ 0x3d
- 80037fa: f7fd fbbf bl 8000f7c <HAL_NVIC_EnableIRQ>
- }
- 80037fe: e747 b.n 8003690 <HAL_ETH_MspInit+0x18>
- 8003800: 40028000 .word 0x40028000
- 8003804: 58024400 .word 0x58024400
- 8003808: 58021800 .word 0x58021800
- 800380c: 58021000 .word 0x58021000
- 8003810: 58022000 .word 0x58022000
- 8003814: 58020800 .word 0x58020800
- 8003818: 58020000 .word 0x58020000
- 800381c: 58020400 .word 0x58020400
- 08003820 <ethernetif_notify_conn_changed>:
- __weak void ethernetif_notify_conn_changed(struct netif *netif)
- {
- /* NOTE : This is function could be implemented in user file
- when the callback is needed,
- */
- }
- 8003820: 4770 bx lr
- ...
- 08003824 <low_level_init>:
- {
- 8003824: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8003828: b0a4 sub sp, #144 @ 0x90
- 800382a: 4604 mov r4, r0
- ETH_MACConfigTypeDef MACConf = {0};
- 800382c: 2264 movs r2, #100 @ 0x64
- 800382e: 2100 movs r1, #0
- 8003830: a802 add r0, sp, #8
- 8003832: f00f ff41 bl 80136b8 <memset>
- heth.Instance = ETH;
- 8003836: 4d5d ldr r5, [pc, #372] @ (80039ac <low_level_init+0x188>)
- 8003838: 4b5d ldr r3, [pc, #372] @ (80039b0 <low_level_init+0x18c>)
- 800383a: 602b str r3, [r5, #0]
- MACAddr[0] = 0x7C;
- 800383c: 237c movs r3, #124 @ 0x7c
- 800383e: f88d 3000 strb.w r3, [sp]
- MACAddr[1] = 0xF6;
- 8003842: 23f6 movs r3, #246 @ 0xf6
- 8003844: f88d 3001 strb.w r3, [sp, #1]
- MACAddr[2] = 0x66;
- 8003848: 2366 movs r3, #102 @ 0x66
- 800384a: f88d 3002 strb.w r3, [sp, #2]
- MACAddr[3] = 0xE4;
- 800384e: 23e4 movs r3, #228 @ 0xe4
- 8003850: f88d 3003 strb.w r3, [sp, #3]
- MACAddr[4] = 0xB5;
- 8003854: 23b5 movs r3, #181 @ 0xb5
- 8003856: f88d 3004 strb.w r3, [sp, #4]
- MACAddr[5] = 0x41;
- 800385a: 2341 movs r3, #65 @ 0x41
- 800385c: f88d 3005 strb.w r3, [sp, #5]
- heth.Init.MACAddr = &MACAddr[0];
- 8003860: f8c5 d004 str.w sp, [r5, #4]
- heth.Init.MediaInterface = HAL_ETH_MII_MODE;
- 8003864: 2600 movs r6, #0
- 8003866: 722e strb r6, [r5, #8]
- heth.Init.TxDesc = DMATxDscrTab;
- 8003868: 4b52 ldr r3, [pc, #328] @ (80039b4 <low_level_init+0x190>)
- 800386a: 60eb str r3, [r5, #12]
- heth.Init.RxDesc = DMARxDscrTab;
- 800386c: 4b52 ldr r3, [pc, #328] @ (80039b8 <low_level_init+0x194>)
- 800386e: 612b str r3, [r5, #16]
- heth.Init.RxBuffLen = 1536;
- 8003870: f44f 63c0 mov.w r3, #1536 @ 0x600
- 8003874: 616b str r3, [r5, #20]
- hal_eth_init_status = HAL_ETH_Init(&heth);
- 8003876: 4628 mov r0, r5
- 8003878: f7fe fbde bl 8002038 <HAL_ETH_Init>
- 800387c: 4607 mov r7, r0
- memset(&TxConfig, 0 , sizeof(ETH_TxPacketConfig));
- 800387e: f8df 8158 ldr.w r8, [pc, #344] @ 80039d8 <low_level_init+0x1b4>
- 8003882: 2238 movs r2, #56 @ 0x38
- 8003884: 4631 mov r1, r6
- 8003886: 4640 mov r0, r8
- 8003888: f00f ff16 bl 80136b8 <memset>
- TxConfig.Attributes = ETH_TX_PACKETS_FEATURES_CSUM | ETH_TX_PACKETS_FEATURES_CRCPAD;
- 800388c: 2321 movs r3, #33 @ 0x21
- 800388e: f8c8 3000 str.w r3, [r8]
- TxConfig.ChecksumCtrl = ETH_CHECKSUM_IPHDR_PAYLOAD_INSERT_PHDR_CALC;
- 8003892: f44f 3340 mov.w r3, #196608 @ 0x30000
- 8003896: f8c8 3014 str.w r3, [r8, #20]
- LWIP_MEMPOOL_INIT(RX_POOL);
- 800389a: 4848 ldr r0, [pc, #288] @ (80039bc <low_level_init+0x198>)
- 800389c: f007 fe78 bl 800b590 <memp_init_pool>
- netif->hwaddr_len = ETH_HWADDR_LEN;
- 80038a0: 2306 movs r3, #6
- 80038a2: f884 3030 strb.w r3, [r4, #48] @ 0x30
- netif->hwaddr[0] = heth.Init.MACAddr[0];
- 80038a6: 686b ldr r3, [r5, #4]
- 80038a8: 781a ldrb r2, [r3, #0]
- 80038aa: f884 202a strb.w r2, [r4, #42] @ 0x2a
- netif->hwaddr[1] = heth.Init.MACAddr[1];
- 80038ae: 785a ldrb r2, [r3, #1]
- 80038b0: f884 202b strb.w r2, [r4, #43] @ 0x2b
- netif->hwaddr[2] = heth.Init.MACAddr[2];
- 80038b4: 789a ldrb r2, [r3, #2]
- 80038b6: f884 202c strb.w r2, [r4, #44] @ 0x2c
- netif->hwaddr[3] = heth.Init.MACAddr[3];
- 80038ba: 78da ldrb r2, [r3, #3]
- 80038bc: f884 202d strb.w r2, [r4, #45] @ 0x2d
- netif->hwaddr[4] = heth.Init.MACAddr[4];
- 80038c0: 791a ldrb r2, [r3, #4]
- 80038c2: f884 202e strb.w r2, [r4, #46] @ 0x2e
- netif->hwaddr[5] = heth.Init.MACAddr[5];
- 80038c6: 795b ldrb r3, [r3, #5]
- 80038c8: f884 302f strb.w r3, [r4, #47] @ 0x2f
- netif->mtu = ETH_MAX_PAYLOAD;
- 80038cc: f240 53dc movw r3, #1500 @ 0x5dc
- 80038d0: 8523 strh r3, [r4, #40] @ 0x28
- netif->flags |= NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP;
- 80038d2: f894 3031 ldrb.w r3, [r4, #49] @ 0x31
- 80038d6: f043 030a orr.w r3, r3, #10
- 80038da: f884 3031 strb.w r3, [r4, #49] @ 0x31
- RxPktSemaphore = osSemaphoreNew(1, 1, NULL);
- 80038de: 4632 mov r2, r6
- 80038e0: 2101 movs r1, #1
- 80038e2: 4608 mov r0, r1
- 80038e4: f000 fb8c bl 8004000 <osSemaphoreNew>
- 80038e8: 4b35 ldr r3, [pc, #212] @ (80039c0 <low_level_init+0x19c>)
- 80038ea: 6018 str r0, [r3, #0]
- TxPktSemaphore = osSemaphoreNew(1, 1, NULL);
- 80038ec: 4632 mov r2, r6
- 80038ee: 2101 movs r1, #1
- 80038f0: 4608 mov r0, r1
- 80038f2: f000 fb85 bl 8004000 <osSemaphoreNew>
- 80038f6: 4b33 ldr r3, [pc, #204] @ (80039c4 <low_level_init+0x1a0>)
- 80038f8: 6018 str r0, [r3, #0]
- memset(&attributes, 0x0, sizeof(osThreadAttr_t));
- 80038fa: 2224 movs r2, #36 @ 0x24
- 80038fc: 4631 mov r1, r6
- 80038fe: a81b add r0, sp, #108 @ 0x6c
- 8003900: f00f feda bl 80136b8 <memset>
- attributes.name = "EthIf";
- 8003904: 4b30 ldr r3, [pc, #192] @ (80039c8 <low_level_init+0x1a4>)
- 8003906: 931b str r3, [sp, #108] @ 0x6c
- attributes.stack_size = INTERFACE_THREAD_STACK_SIZE;
- 8003908: f44f 6380 mov.w r3, #1024 @ 0x400
- 800390c: 9320 str r3, [sp, #128] @ 0x80
- attributes.priority = osPriorityRealtime;
- 800390e: 2330 movs r3, #48 @ 0x30
- 8003910: 9321 str r3, [sp, #132] @ 0x84
- osThreadNew(ethernetif_input, netif, &attributes);
- 8003912: aa1b add r2, sp, #108 @ 0x6c
- 8003914: 4621 mov r1, r4
- 8003916: 482d ldr r0, [pc, #180] @ (80039cc <low_level_init+0x1a8>)
- 8003918: f000 fa5e bl 8003dd8 <osThreadNew>
- LAN8742_RegisterBusIO(&LAN8742, &LAN8742_IOCtx);
- 800391c: 4d2c ldr r5, [pc, #176] @ (80039d0 <low_level_init+0x1ac>)
- 800391e: 492d ldr r1, [pc, #180] @ (80039d4 <low_level_init+0x1b0>)
- 8003920: 4628 mov r0, r5
- 8003922: f7fd f990 bl 8000c46 <LAN8742_RegisterBusIO>
- LAN8742_Init(&LAN8742);
- 8003926: 4628 mov r0, r5
- 8003928: f7fd f9ac bl 8000c84 <LAN8742_Init>
- if (hal_eth_init_status == HAL_OK)
- 800392c: bbc7 cbnz r7, 80039a0 <low_level_init+0x17c>
- PHYLinkState = LAN8742_GetLinkState(&LAN8742);
- 800392e: 4628 mov r0, r5
- 8003930: f7fd fa10 bl 8000d54 <LAN8742_GetLinkState>
- if(PHYLinkState <= LAN8742_STATUS_LINK_DOWN)
- 8003934: 2801 cmp r0, #1
- 8003936: dd21 ble.n 800397c <low_level_init+0x158>
- switch (PHYLinkState)
- 8003938: 2804 cmp r0, #4
- 800393a: d02a beq.n 8003992 <low_level_init+0x16e>
- 800393c: 2805 cmp r0, #5
- 800393e: d02c beq.n 800399a <low_level_init+0x176>
- 8003940: 2803 cmp r0, #3
- 8003942: d022 beq.n 800398a <low_level_init+0x166>
- 8003944: f44f 4680 mov.w r6, #16384 @ 0x4000
- 8003948: f44f 5700 mov.w r7, #8192 @ 0x2000
- HAL_ETH_GetMACConfig(&heth, &MACConf);
- 800394c: 4d17 ldr r5, [pc, #92] @ (80039ac <low_level_init+0x188>)
- 800394e: a902 add r1, sp, #8
- 8003950: 4628 mov r0, r5
- 8003952: f7fe fa33 bl 8001dbc <HAL_ETH_GetMACConfig>
- MACConf.DuplexMode = duplex;
- 8003956: 9708 str r7, [sp, #32]
- MACConf.Speed = speed;
- 8003958: 9607 str r6, [sp, #28]
- HAL_ETH_SetMACConfig(&heth, &MACConf);
- 800395a: a902 add r1, sp, #8
- 800395c: 4628 mov r0, r5
- 800395e: f7fe fb20 bl 8001fa2 <HAL_ETH_SetMACConfig>
- HAL_ETH_Start_IT(&heth);
- 8003962: 4628 mov r0, r5
- 8003964: f7fd ff62 bl 800182c <HAL_ETH_Start_IT>
- netif_set_up(netif);
- 8003968: 4620 mov r0, r4
- 800396a: f008 f84f bl 800ba0c <netif_set_up>
- netif_set_link_up(netif);
- 800396e: 4620 mov r0, r4
- 8003970: f008 f892 bl 800ba98 <netif_set_link_up>
- ethernetif_notify_conn_changed(netif);
- 8003974: 4620 mov r0, r4
- 8003976: f7ff ff53 bl 8003820 <ethernetif_notify_conn_changed>
- 800397a: e013 b.n 80039a4 <low_level_init+0x180>
- netif_set_link_down(netif);
- 800397c: 4620 mov r0, r4
- 800397e: f008 f8b5 bl 800baec <netif_set_link_down>
- netif_set_down(netif);
- 8003982: 4620 mov r0, r4
- 8003984: f008 f864 bl 800ba50 <netif_set_down>
- 8003988: e00c b.n 80039a4 <low_level_init+0x180>
- speed = ETH_SPEED_100M;
- 800398a: f44f 4680 mov.w r6, #16384 @ 0x4000
- duplex = ETH_HALFDUPLEX_MODE;
- 800398e: 2700 movs r7, #0
- 8003990: e7dc b.n 800394c <low_level_init+0x128>
- speed = ETH_SPEED_10M;
- 8003992: 2600 movs r6, #0
- duplex = ETH_FULLDUPLEX_MODE;
- 8003994: f44f 5700 mov.w r7, #8192 @ 0x2000
- 8003998: e7d8 b.n 800394c <low_level_init+0x128>
- speed = ETH_SPEED_10M;
- 800399a: 2600 movs r6, #0
- duplex = ETH_HALFDUPLEX_MODE;
- 800399c: 4637 mov r7, r6
- 800399e: e7d5 b.n 800394c <low_level_init+0x128>
- Error_Handler();
- 80039a0: f7fc fe4c bl 800063c <Error_Handler>
- }
- 80039a4: b024 add sp, #144 @ 0x90
- 80039a6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- 80039aa: bf00 nop
- 80039ac: 24000e4c .word 0x24000e4c
- 80039b0: 40028000 .word 0x40028000
- 80039b4: 30040100 .word 0x30040100
- 80039b8: 30040000 .word 0x30040000
- 80039bc: 0801463c .word 0x0801463c
- 80039c0: 24000f00 .word 0x24000f00
- 80039c4: 24000efc .word 0x24000efc
- 80039c8: 080144b4 .word 0x080144b4
- 80039cc: 080034c9 .word 0x080034c9
- 80039d0: 24000df4 .word 0x24000df4
- 80039d4: 24000010 .word 0x24000010
- 80039d8: 24000e14 .word 0x24000e14
- 080039dc <ethernetif_init>:
- {
- 80039dc: b510 push {r4, lr}
- LWIP_ASSERT("netif != NULL", (netif != NULL));
- 80039de: 4604 mov r4, r0
- 80039e0: b170 cbz r0, 8003a00 <ethernetif_init+0x24>
- netif->name[0] = IFNAME0;
- 80039e2: 2373 movs r3, #115 @ 0x73
- 80039e4: f884 3032 strb.w r3, [r4, #50] @ 0x32
- netif->name[1] = IFNAME1;
- 80039e8: 2374 movs r3, #116 @ 0x74
- 80039ea: f884 3033 strb.w r3, [r4, #51] @ 0x33
- netif->output = etharp_output;
- 80039ee: 4b08 ldr r3, [pc, #32] @ (8003a10 <ethernetif_init+0x34>)
- 80039f0: 6163 str r3, [r4, #20]
- netif->linkoutput = low_level_output;
- 80039f2: 4b08 ldr r3, [pc, #32] @ (8003a14 <ethernetif_init+0x38>)
- 80039f4: 61a3 str r3, [r4, #24]
- low_level_init(netif);
- 80039f6: 4620 mov r0, r4
- 80039f8: f7ff ff14 bl 8003824 <low_level_init>
- }
- 80039fc: 2000 movs r0, #0
- 80039fe: bd10 pop {r4, pc}
- LWIP_ASSERT("netif != NULL", (netif != NULL));
- 8003a00: 4b05 ldr r3, [pc, #20] @ (8003a18 <ethernetif_init+0x3c>)
- 8003a02: f240 222b movw r2, #555 @ 0x22b
- 8003a06: 4905 ldr r1, [pc, #20] @ (8003a1c <ethernetif_init+0x40>)
- 8003a08: 4805 ldr r0, [pc, #20] @ (8003a20 <ethernetif_init+0x44>)
- 8003a0a: f00f fcfd bl 8013408 <iprintf>
- 8003a0e: e7e8 b.n 80039e2 <ethernetif_init+0x6>
- 8003a10: 08009b29 .word 0x08009b29
- 8003a14: 08003505 .word 0x08003505
- 8003a18: 080144bc .word 0x080144bc
- 8003a1c: 080144d8 .word 0x080144d8
- 8003a20: 080144e8 .word 0x080144e8
- 08003a24 <HAL_ETH_RxAllocateCallback>:
- void HAL_ETH_RxAllocateCallback(uint8_t **buff)
- {
- 8003a24: b510 push {r4, lr}
- 8003a26: b082 sub sp, #8
- 8003a28: 4604 mov r4, r0
- /* USER CODE BEGIN HAL ETH RxAllocateCallback */
- struct pbuf_custom *p = LWIP_MEMPOOL_ALLOC(RX_POOL);
- 8003a2a: 480e ldr r0, [pc, #56] @ (8003a64 <HAL_ETH_RxAllocateCallback+0x40>)
- 8003a2c: f007 fdd4 bl 800b5d8 <memp_malloc_pool>
- if (p)
- 8003a30: b188 cbz r0, 8003a56 <HAL_ETH_RxAllocateCallback+0x32>
- 8003a32: 4603 mov r3, r0
- {
- /* Get the buff from the struct pbuf address. */
- *buff = (uint8_t *)p + offsetof(RxBuff_t, buff);
- 8003a34: f100 0220 add.w r2, r0, #32
- 8003a38: 6022 str r2, [r4, #0]
- p->custom_free_function = pbuf_free_custom;
- 8003a3a: 4a0b ldr r2, [pc, #44] @ (8003a68 <HAL_ETH_RxAllocateCallback+0x44>)
- 8003a3c: 6102 str r2, [r0, #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);
- 8003a3e: f44f 62c0 mov.w r2, #1536 @ 0x600
- 8003a42: 9201 str r2, [sp, #4]
- 8003a44: 6822 ldr r2, [r4, #0]
- 8003a46: 9200 str r2, [sp, #0]
- 8003a48: 2241 movs r2, #65 @ 0x41
- 8003a4a: 2100 movs r1, #0
- 8003a4c: 4608 mov r0, r1
- 8003a4e: f008 f93d bl 800bccc <pbuf_alloced_custom>
- {
- RxAllocStatus = RX_ALLOC_ERROR;
- *buff = NULL;
- }
- /* USER CODE END HAL ETH RxAllocateCallback */
- }
- 8003a52: b002 add sp, #8
- 8003a54: bd10 pop {r4, pc}
- RxAllocStatus = RX_ALLOC_ERROR;
- 8003a56: 4b05 ldr r3, [pc, #20] @ (8003a6c <HAL_ETH_RxAllocateCallback+0x48>)
- 8003a58: 2201 movs r2, #1
- 8003a5a: 701a strb r2, [r3, #0]
- *buff = NULL;
- 8003a5c: 2300 movs r3, #0
- 8003a5e: 6023 str r3, [r4, #0]
- }
- 8003a60: e7f7 b.n 8003a52 <HAL_ETH_RxAllocateCallback+0x2e>
- 8003a62: bf00 nop
- 8003a64: 0801463c .word 0x0801463c
- 8003a68: 080035b5 .word 0x080035b5
- 8003a6c: 24000f04 .word 0x24000f04
- 08003a70 <HAL_ETH_RxLinkCallback>:
- void HAL_ETH_RxLinkCallback(void **pStart, void **pEnd, uint8_t *buff, uint16_t Length)
- {
- 8003a70: b430 push {r4, r5}
- struct pbuf **ppStart = (struct pbuf **)pStart;
- struct pbuf **ppEnd = (struct pbuf **)pEnd;
- struct pbuf *p = NULL;
- /* Get the struct pbuf from the buff address. */
- p = (struct pbuf *)(buff - offsetof(RxBuff_t, buff));
- 8003a72: f1a2 0420 sub.w r4, r2, #32
- p->next = NULL;
- 8003a76: 2500 movs r5, #0
- 8003a78: f842 5c20 str.w r5, [r2, #-32]
- p->tot_len = 0;
- 8003a7c: f822 5c18 strh.w r5, [r2, #-24]
- p->len = Length;
- 8003a80: f822 3c16 strh.w r3, [r2, #-22]
- /* Chain the buffer. */
- if (!*ppStart)
- 8003a84: 6805 ldr r5, [r0, #0]
- 8003a86: b125 cbz r5, 8003a92 <HAL_ETH_RxLinkCallback+0x22>
- *ppStart = p;
- }
- else
- {
- /* Chain the buffer to the end of the packet. */
- (*ppEnd)->next = p;
- 8003a88: 680d ldr r5, [r1, #0]
- 8003a8a: 602c str r4, [r5, #0]
- }
- *ppEnd = p;
- 8003a8c: 600c str r4, [r1, #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)
- 8003a8e: 6801 ldr r1, [r0, #0]
- 8003a90: e005 b.n 8003a9e <HAL_ETH_RxLinkCallback+0x2e>
- *ppStart = p;
- 8003a92: 6004 str r4, [r0, #0]
- 8003a94: e7fa b.n 8003a8c <HAL_ETH_RxLinkCallback+0x1c>
- {
- p->tot_len += Length;
- 8003a96: 8908 ldrh r0, [r1, #8]
- 8003a98: 4418 add r0, r3
- 8003a9a: 8108 strh r0, [r1, #8]
- for (p = *ppStart; p != NULL; p = p->next)
- 8003a9c: 6809 ldr r1, [r1, #0]
- 8003a9e: 2900 cmp r1, #0
- 8003aa0: d1f9 bne.n 8003a96 <HAL_ETH_RxLinkCallback+0x26>
- if ( dsize > 0 ) {
- 8003aa2: b183 cbz r3, 8003ac6 <HAL_ETH_RxLinkCallback+0x56>
- int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U));
- 8003aa4: 4611 mov r1, r2
- 8003aa6: f002 021f and.w r2, r2, #31
- 8003aaa: 4413 add r3, r2
- 8003aac: f3bf 8f4f dsb sy
- SCB->DCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
- 8003ab0: 4a06 ldr r2, [pc, #24] @ (8003acc <HAL_ETH_RxLinkCallback+0x5c>)
- 8003ab2: f8c2 125c str.w r1, [r2, #604] @ 0x25c
- op_addr += __SCB_DCACHE_LINE_SIZE;
- 8003ab6: 3120 adds r1, #32
- op_size -= __SCB_DCACHE_LINE_SIZE;
- 8003ab8: 3b20 subs r3, #32
- } while ( op_size > 0 );
- 8003aba: 2b00 cmp r3, #0
- 8003abc: dcf8 bgt.n 8003ab0 <HAL_ETH_RxLinkCallback+0x40>
- 8003abe: f3bf 8f4f dsb sy
- __ASM volatile ("isb 0xF":::"memory");
- 8003ac2: f3bf 8f6f isb sy
- /* Invalidate data cache because Rx DMA's writing to physical memory makes it stale. */
- SCB_InvalidateDCache_by_Addr((uint32_t *)buff, Length);
- /* USER CODE END HAL ETH RxLinkCallback */
- }
- 8003ac6: bc30 pop {r4, r5}
- 8003ac8: 4770 bx lr
- 8003aca: bf00 nop
- 8003acc: e000ed00 .word 0xe000ed00
- 08003ad0 <HAL_ETH_TxFreeCallback>:
- void HAL_ETH_TxFreeCallback(uint32_t * buff)
- {
- 8003ad0: b508 push {r3, lr}
- /* USER CODE BEGIN HAL ETH TxFreeCallback */
- pbuf_free((struct pbuf *)buff);
- 8003ad2: f008 f965 bl 800bda0 <pbuf_free>
- /* USER CODE END HAL ETH TxFreeCallback */
- }
- 8003ad6: bd08 pop {r3, pc}
- 08003ad8 <sys_lock_tcpip_core>:
- /* ETH_CODE: add functions needed for proper multithreading support and check */
- static osThreadId_t lwip_core_lock_holder_thread_id;
- static osThreadId_t lwip_tcpip_thread_id;
- void sys_lock_tcpip_core(void){
- 8003ad8: b508 push {r3, lr}
- sys_mutex_lock(&lock_tcpip_core);
- 8003ada: 4804 ldr r0, [pc, #16] @ (8003aec <sys_lock_tcpip_core+0x14>)
- 8003adc: f009 faa6 bl 800d02c <sys_mutex_lock>
- lwip_core_lock_holder_thread_id = osThreadGetId();
- 8003ae0: f000 f9d8 bl 8003e94 <osThreadGetId>
- 8003ae4: 4b02 ldr r3, [pc, #8] @ (8003af0 <sys_lock_tcpip_core+0x18>)
- 8003ae6: 6018 str r0, [r3, #0]
- }
- 8003ae8: bd08 pop {r3, pc}
- 8003aea: bf00 nop
- 8003aec: 24019c24 .word 0x24019c24
- 8003af0: 24000df0 .word 0x24000df0
- 08003af4 <sys_unlock_tcpip_core>:
- void sys_unlock_tcpip_core(void){
- 8003af4: b508 push {r3, lr}
- lwip_core_lock_holder_thread_id = 0;
- 8003af6: 4b03 ldr r3, [pc, #12] @ (8003b04 <sys_unlock_tcpip_core+0x10>)
- 8003af8: 2200 movs r2, #0
- 8003afa: 601a str r2, [r3, #0]
- sys_mutex_unlock(&lock_tcpip_core);
- 8003afc: 4802 ldr r0, [pc, #8] @ (8003b08 <sys_unlock_tcpip_core+0x14>)
- 8003afe: f009 fa9c bl 800d03a <sys_mutex_unlock>
- }
- 8003b02: bd08 pop {r3, pc}
- 8003b04: 24000df0 .word 0x24000df0
- 8003b08: 24019c24 .word 0x24019c24
- 08003b0c <sys_check_core_locking>:
- void sys_check_core_locking(void){
- 8003b0c: b510 push {r4, lr}
- /* Embedded systems should check we are NOT in an interrupt context here */
- LWIP_ASSERT("Function called from interrupt context", (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) == 0);
- 8003b0e: 4b12 ldr r3, [pc, #72] @ (8003b58 <sys_check_core_locking+0x4c>)
- 8003b10: 685b ldr r3, [r3, #4]
- 8003b12: f3c3 0308 ubfx r3, r3, #0, #9
- 8003b16: b9b3 cbnz r3, 8003b46 <sys_check_core_locking+0x3a>
- if (lwip_tcpip_thread_id != 0) {
- 8003b18: 4b10 ldr r3, [pc, #64] @ (8003b5c <sys_check_core_locking+0x50>)
- 8003b1a: 681b ldr r3, [r3, #0]
- 8003b1c: b193 cbz r3, 8003b44 <sys_check_core_locking+0x38>
- osThreadId_t current_thread_id = osThreadGetId();
- 8003b1e: f000 f9b9 bl 8003e94 <osThreadGetId>
- 8003b22: 4604 mov r4, r0
- #if LWIP_TCPIP_CORE_LOCKING
- LWIP_ASSERT("Function called without core lock", current_thread_id == lwip_core_lock_holder_thread_id);
- 8003b24: 4b0e ldr r3, [pc, #56] @ (8003b60 <sys_check_core_locking+0x54>)
- 8003b26: 681b ldr r3, [r3, #0]
- 8003b28: 4283 cmp r3, r0
- 8003b2a: d006 beq.n 8003b3a <sys_check_core_locking+0x2e>
- 8003b2c: 4b0d ldr r3, [pc, #52] @ (8003b64 <sys_check_core_locking+0x58>)
- 8003b2e: f240 4224 movw r2, #1060 @ 0x424
- 8003b32: 490d ldr r1, [pc, #52] @ (8003b68 <sys_check_core_locking+0x5c>)
- 8003b34: 480d ldr r0, [pc, #52] @ (8003b6c <sys_check_core_locking+0x60>)
- 8003b36: f00f fc67 bl 8013408 <iprintf>
- /* ETH_CODE: to easily check that example has correct handling of core lock
- * This will trigger breakpoint (__BKPT)
- */
- #warning Below check should be removed in production code
- if(current_thread_id != lwip_core_lock_holder_thread_id) __BKPT(0);
- 8003b3a: 4b09 ldr r3, [pc, #36] @ (8003b60 <sys_check_core_locking+0x54>)
- 8003b3c: 681b ldr r3, [r3, #0]
- 8003b3e: 42a3 cmp r3, r4
- 8003b40: d000 beq.n 8003b44 <sys_check_core_locking+0x38>
- 8003b42: be00 bkpt 0x0000
- #else /* LWIP_TCPIP_CORE_LOCKING */
- LWIP_ASSERT("Function called from wrong thread", current_thread_id == lwip_tcpip_thread_id);
- #endif /* LWIP_TCPIP_CORE_LOCKING */
- LWIP_UNUSED_ARG(current_thread_id); /* for LWIP_NOASSERT */
- }
- }
- 8003b44: bd10 pop {r4, pc}
- LWIP_ASSERT("Function called from interrupt context", (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) == 0);
- 8003b46: 4b07 ldr r3, [pc, #28] @ (8003b64 <sys_check_core_locking+0x58>)
- 8003b48: f240 421e movw r2, #1054 @ 0x41e
- 8003b4c: 4908 ldr r1, [pc, #32] @ (8003b70 <sys_check_core_locking+0x64>)
- 8003b4e: 4807 ldr r0, [pc, #28] @ (8003b6c <sys_check_core_locking+0x60>)
- 8003b50: f00f fc5a bl 8013408 <iprintf>
- 8003b54: e7e0 b.n 8003b18 <sys_check_core_locking+0xc>
- 8003b56: bf00 nop
- 8003b58: e000ed00 .word 0xe000ed00
- 8003b5c: 24000dec .word 0x24000dec
- 8003b60: 24000df0 .word 0x24000df0
- 8003b64: 080144bc .word 0x080144bc
- 8003b68: 08014538 .word 0x08014538
- 8003b6c: 080144e8 .word 0x080144e8
- 8003b70: 08014510 .word 0x08014510
- 08003b74 <sys_mark_tcpip_thread>:
- void sys_mark_tcpip_thread(void){
- 8003b74: b508 push {r3, lr}
- lwip_tcpip_thread_id = osThreadGetId();
- 8003b76: f000 f98d bl 8003e94 <osThreadGetId>
- 8003b7a: 4b01 ldr r3, [pc, #4] @ (8003b80 <sys_mark_tcpip_thread+0xc>)
- 8003b7c: 6018 str r0, [r3, #0]
- }
- 8003b7e: bd08 pop {r3, pc}
- 8003b80: 24000dec .word 0x24000dec
- 08003b84 <dhcp_sm>:
- void dhcp_sm(struct netif *netif, enum dhcp_states *state)
- {
- 8003b84: b530 push {r4, r5, lr}
- 8003b86: b089 sub sp, #36 @ 0x24
- 8003b88: 4605 mov r5, r0
- 8003b8a: 460c mov r4, r1
- ip_addr_t gw;
- #ifdef DHCP_USER_LOGS
- uint8_t iptxt[20];
- #endif
- switch(*state)
- 8003b8c: 780b ldrb r3, [r1, #0]
- 8003b8e: 2b02 cmp r3, #2
- 8003b90: d00b beq.n 8003baa <dhcp_sm+0x26>
- 8003b92: 2b03 cmp r3, #3
- 8003b94: d04c beq.n 8003c30 <dhcp_sm+0xac>
- 8003b96: 2b01 cmp r3, #1
- 8003b98: d001 beq.n 8003b9e <dhcp_sm+0x1a>
- }
- break;
- default:
- break;
- }
- }
- 8003b9a: b009 add sp, #36 @ 0x24
- 8003b9c: bd30 pop {r4, r5, pc}
- *state = DHCP_WAIT_ADDRESS;
- 8003b9e: 2302 movs r3, #2
- 8003ba0: 700b strb r3, [r1, #0]
- printf(" State: Looking for DHCP server ...\n");
- 8003ba2: 4827 ldr r0, [pc, #156] @ (8003c40 <dhcp_sm+0xbc>)
- 8003ba4: f00f fc98 bl 80134d8 <puts>
- break;
- 8003ba8: e7f7 b.n 8003b9a <dhcp_sm+0x16>
- if (dhcp_supplied_address(netif))
- 8003baa: f005 fa67 bl 800907c <dhcp_supplied_address>
- 8003bae: bb88 cbnz r0, 8003c14 <dhcp_sm+0x90>
- dhcp = (struct dhcp *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP);
- 8003bb0: 6a6b ldr r3, [r5, #36] @ 0x24
- if (dhcp->tries > MAX_DHCP_TRIES)
- 8003bb2: 799b ldrb r3, [r3, #6]
- 8003bb4: 2b04 cmp r3, #4
- 8003bb6: d9f0 bls.n 8003b9a <dhcp_sm+0x16>
- *state = DHCP_TIMEOUT;
- 8003bb8: 2304 movs r3, #4
- 8003bba: 7023 strb r3, [r4, #0]
- LOCK_TCPIP_CORE();
- 8003bbc: f7ff ff8c bl 8003ad8 <sys_lock_tcpip_core>
- dhcp_stop(netif);
- 8003bc0: 4628 mov r0, r5
- 8003bc2: f005 fbb5 bl 8009330 <dhcp_stop>
- UNLOCK_TCPIP_CORE();
- 8003bc6: f7ff ff95 bl 8003af4 <sys_unlock_tcpip_core>
- ipaddr_aton(STATIC_IP, &ipaddr);
- 8003bca: a907 add r1, sp, #28
- 8003bcc: 481d ldr r0, [pc, #116] @ (8003c44 <dhcp_sm+0xc0>)
- 8003bce: f006 fc61 bl 800a494 <ip4addr_aton>
- ipaddr_aton(STATIC_MASK, &netmask);
- 8003bd2: a906 add r1, sp, #24
- 8003bd4: 481c ldr r0, [pc, #112] @ (8003c48 <dhcp_sm+0xc4>)
- 8003bd6: f006 fc5d bl 800a494 <ip4addr_aton>
- ipaddr_aton(STATIC_GW, &gw);
- 8003bda: a905 add r1, sp, #20
- 8003bdc: 481b ldr r0, [pc, #108] @ (8003c4c <dhcp_sm+0xc8>)
- 8003bde: f006 fc59 bl 800a494 <ip4addr_aton>
- LOCK_TCPIP_CORE();
- 8003be2: f7ff ff79 bl 8003ad8 <sys_lock_tcpip_core>
- netif_set_addr(netif, ip_2_ip4(&ipaddr), ip_2_ip4(&netmask), ip_2_ip4(&gw));
- 8003be6: ab05 add r3, sp, #20
- 8003be8: aa06 add r2, sp, #24
- 8003bea: a907 add r1, sp, #28
- 8003bec: 4628 mov r0, r5
- 8003bee: f007 fe2d bl 800b84c <netif_set_addr>
- UNLOCK_TCPIP_CORE();
- 8003bf2: f7ff ff7f bl 8003af4 <sys_unlock_tcpip_core>
- sprintf((char *)iptxt, "%s", ip4addr_ntoa((const ip4_addr_t *)&netif->ip_addr));
- 8003bf6: 1d28 adds r0, r5, #4
- 8003bf8: f006 fd5c bl 800a6b4 <ip4addr_ntoa>
- 8003bfc: 4601 mov r1, r0
- 8003bfe: 4668 mov r0, sp
- 8003c00: f00f fe37 bl 8013872 <strcpy>
- printf("DHCP Timeout !! \n");
- 8003c04: 4812 ldr r0, [pc, #72] @ (8003c50 <dhcp_sm+0xcc>)
- 8003c06: f00f fc67 bl 80134d8 <puts>
- printf("Static IP address: %s\n", iptxt);
- 8003c0a: 4669 mov r1, sp
- 8003c0c: 4811 ldr r0, [pc, #68] @ (8003c54 <dhcp_sm+0xd0>)
- 8003c0e: f00f fbfb bl 8013408 <iprintf>
- 8003c12: e7c2 b.n 8003b9a <dhcp_sm+0x16>
- *state = DHCP_ADDRESS_ASSIGNED;
- 8003c14: 2303 movs r3, #3
- 8003c16: 7023 strb r3, [r4, #0]
- sprintf((char *)iptxt, "%s", ip4addr_ntoa((const ip4_addr_t *)&netif->ip_addr));
- 8003c18: 1d28 adds r0, r5, #4
- 8003c1a: f006 fd4b bl 800a6b4 <ip4addr_ntoa>
- 8003c1e: 4601 mov r1, r0
- 8003c20: 4668 mov r0, sp
- 8003c22: f00f fe26 bl 8013872 <strcpy>
- printf("IP address assigned by a DHCP server: %s\n", iptxt);
- 8003c26: 4669 mov r1, sp
- 8003c28: 480b ldr r0, [pc, #44] @ (8003c58 <dhcp_sm+0xd4>)
- 8003c2a: f00f fbed bl 8013408 <iprintf>
- 8003c2e: e7b4 b.n 8003b9a <dhcp_sm+0x16>
- dhcp = (struct dhcp *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP);
- 8003c30: 6a43 ldr r3, [r0, #36] @ 0x24
- if(dhcp->state == 3)
- 8003c32: 795b ldrb r3, [r3, #5]
- 8003c34: 2b03 cmp r3, #3
- 8003c36: d1b0 bne.n 8003b9a <dhcp_sm+0x16>
- *state = DHCP_START;
- 8003c38: 2301 movs r3, #1
- 8003c3a: 700b strb r3, [r1, #0]
- }
- 8003c3c: e7ad b.n 8003b9a <dhcp_sm+0x16>
- 8003c3e: bf00 nop
- 8003c40: 0801455c .word 0x0801455c
- 8003c44: 080145b0 .word 0x080145b0
- 8003c48: 080145c0 .word 0x080145c0
- 8003c4c: 080145d0 .word 0x080145d0
- 8003c50: 080145dc .word 0x080145dc
- 8003c54: 080145f0 .word 0x080145f0
- 8003c58: 08014584 .word 0x08014584
- 08003c5c <ethernet_link_thread>:
- {
- 8003c5c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8003c60: b09a sub sp, #104 @ 0x68
- 8003c62: 4604 mov r4, r0
- ETH_MACConfigTypeDef MACConf = {0};
- 8003c64: 2264 movs r2, #100 @ 0x64
- 8003c66: 2100 movs r1, #0
- 8003c68: a801 add r0, sp, #4
- 8003c6a: f00f fd25 bl 80136b8 <memset>
- enum dhcp_states DHCP_state = DHCP_START;
- 8003c6e: 2301 movs r3, #1
- 8003c70: f88d 3003 strb.w r3, [sp, #3]
- uint32_t linkchanged = 0U, speed = 0U, duplex = 0U;
- 8003c74: 2600 movs r6, #0
- 8003c76: 4637 mov r7, r6
- 8003c78: 4635 mov r5, r6
- 8003c7a: e028 b.n 8003cce <ethernet_link_thread+0x72>
- else if(!netif_is_link_up(netif) && (PHYLinkState > LAN8742_STATUS_LINK_DOWN))
- 8003c7c: f013 0f04 tst.w r3, #4
- 8003c80: d11c bne.n 8003cbc <ethernet_link_thread+0x60>
- 8003c82: 2801 cmp r0, #1
- 8003c84: dd1a ble.n 8003cbc <ethernet_link_thread+0x60>
- switch (PHYLinkState)
- 8003c86: 3802 subs r0, #2
- 8003c88: 2803 cmp r0, #3
- 8003c8a: d816 bhi.n 8003cba <ethernet_link_thread+0x5e>
- 8003c8c: e8df f000 tbb [pc, r0]
- 8003c90: 0c070210 .word 0x0c070210
- duplex = ETH_HALFDUPLEX_MODE;
- 8003c94: 2600 movs r6, #0
- speed = ETH_SPEED_100M;
- 8003c96: f44f 4780 mov.w r7, #16384 @ 0x4000
- linkchanged = 1;
- 8003c9a: 2501 movs r5, #1
- break;
- 8003c9c: e00d b.n 8003cba <ethernet_link_thread+0x5e>
- duplex = ETH_FULLDUPLEX_MODE;
- 8003c9e: f44f 5600 mov.w r6, #8192 @ 0x2000
- speed = ETH_SPEED_10M;
- 8003ca2: 2700 movs r7, #0
- linkchanged = 1;
- 8003ca4: 2501 movs r5, #1
- break;
- 8003ca6: e008 b.n 8003cba <ethernet_link_thread+0x5e>
- duplex = ETH_HALFDUPLEX_MODE;
- 8003ca8: 2600 movs r6, #0
- speed = ETH_SPEED_10M;
- 8003caa: 4637 mov r7, r6
- linkchanged = 1;
- 8003cac: 2501 movs r5, #1
- break;
- 8003cae: e004 b.n 8003cba <ethernet_link_thread+0x5e>
- duplex = ETH_FULLDUPLEX_MODE;
- 8003cb0: f44f 5600 mov.w r6, #8192 @ 0x2000
- speed = ETH_SPEED_100M;
- 8003cb4: f44f 4780 mov.w r7, #16384 @ 0x4000
- linkchanged = 1;
- 8003cb8: 2501 movs r5, #1
- if(linkchanged)
- 8003cba: bb1d cbnz r5, 8003d04 <ethernet_link_thread+0xa8>
- dhcp_sm(netif, &DHCP_state);
- 8003cbc: f10d 0103 add.w r1, sp, #3
- 8003cc0: 4620 mov r0, r4
- 8003cc2: f7ff ff5f bl 8003b84 <dhcp_sm>
- osDelay(pdMS_TO_TICKS(500));
- 8003cc6: f44f 70fa mov.w r0, #500 @ 0x1f4
- 8003cca: f000 f8e7 bl 8003e9c <osDelay>
- PHYLinkState = LAN8742_GetLinkState(&LAN8742);
- 8003cce: 481c ldr r0, [pc, #112] @ (8003d40 <ethernet_link_thread+0xe4>)
- 8003cd0: f7fd f840 bl 8000d54 <LAN8742_GetLinkState>
- if(netif_is_link_up(netif) && (PHYLinkState <= LAN8742_STATUS_LINK_DOWN))
- 8003cd4: f894 3031 ldrb.w r3, [r4, #49] @ 0x31
- 8003cd8: f013 0f04 tst.w r3, #4
- 8003cdc: d0ce beq.n 8003c7c <ethernet_link_thread+0x20>
- 8003cde: 2801 cmp r0, #1
- 8003ce0: dccc bgt.n 8003c7c <ethernet_link_thread+0x20>
- HAL_ETH_Stop_IT(&heth);
- 8003ce2: 4818 ldr r0, [pc, #96] @ (8003d44 <ethernet_link_thread+0xe8>)
- 8003ce4: f7fd fe00 bl 80018e8 <HAL_ETH_Stop_IT>
- LOCK_TCPIP_CORE();
- 8003ce8: f7ff fef6 bl 8003ad8 <sys_lock_tcpip_core>
- netif_set_down(netif);
- 8003cec: 4620 mov r0, r4
- 8003cee: f007 feaf bl 800ba50 <netif_set_down>
- netif_set_link_down(netif);
- 8003cf2: 4620 mov r0, r4
- 8003cf4: f007 fefa bl 800baec <netif_set_link_down>
- UNLOCK_TCPIP_CORE();
- 8003cf8: f7ff fefc bl 8003af4 <sys_unlock_tcpip_core>
- printf("Link down...\r\n");
- 8003cfc: 4812 ldr r0, [pc, #72] @ (8003d48 <ethernet_link_thread+0xec>)
- 8003cfe: f00f fbeb bl 80134d8 <puts>
- 8003d02: e7db b.n 8003cbc <ethernet_link_thread+0x60>
- HAL_ETH_GetMACConfig(&heth, &MACConf);
- 8003d04: f8df 803c ldr.w r8, [pc, #60] @ 8003d44 <ethernet_link_thread+0xe8>
- 8003d08: a901 add r1, sp, #4
- 8003d0a: 4640 mov r0, r8
- 8003d0c: f7fe f856 bl 8001dbc <HAL_ETH_GetMACConfig>
- MACConf.DuplexMode = duplex;
- 8003d10: 9607 str r6, [sp, #28]
- MACConf.Speed = speed;
- 8003d12: 9706 str r7, [sp, #24]
- HAL_ETH_SetMACConfig(&heth, &MACConf);
- 8003d14: a901 add r1, sp, #4
- 8003d16: 4640 mov r0, r8
- 8003d18: f7fe f943 bl 8001fa2 <HAL_ETH_SetMACConfig>
- HAL_ETH_Start(&heth);
- 8003d1c: 4640 mov r0, r8
- 8003d1e: f7fd fd85 bl 800182c <HAL_ETH_Start_IT>
- LOCK_TCPIP_CORE();
- 8003d22: f7ff fed9 bl 8003ad8 <sys_lock_tcpip_core>
- netif_set_up(netif);
- 8003d26: 4620 mov r0, r4
- 8003d28: f007 fe70 bl 800ba0c <netif_set_up>
- netif_set_link_up(netif);
- 8003d2c: 4620 mov r0, r4
- 8003d2e: f007 feb3 bl 800ba98 <netif_set_link_up>
- UNLOCK_TCPIP_CORE();
- 8003d32: f7ff fedf bl 8003af4 <sys_unlock_tcpip_core>
- printf("Link up...\r\n");
- 8003d36: 4805 ldr r0, [pc, #20] @ (8003d4c <ethernet_link_thread+0xf0>)
- 8003d38: f00f fbce bl 80134d8 <puts>
- 8003d3c: e7be b.n 8003cbc <ethernet_link_thread+0x60>
- 8003d3e: bf00 nop
- 8003d40: 24000df4 .word 0x24000df4
- 8003d44: 24000e4c .word 0x24000e4c
- 8003d48: 08014608 .word 0x08014608
- 8003d4c: 08014618 .word 0x08014618
- 08003d50 <SysTick_Handler>:
- /*
- SysTick handler implementation that also clears overflow flag.
- */
- #if (USE_CUSTOM_SYSTICK_HANDLER_IMPLEMENTATION == 0)
- void SysTick_Handler (void) {
- 8003d50: b508 push {r3, lr}
- /* Clear overflow flag */
- SysTick->CTRL;
- 8003d52: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 8003d56: 691b ldr r3, [r3, #16]
- if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) {
- 8003d58: f002 f92a bl 8005fb0 <xTaskGetSchedulerState>
- 8003d5c: 2801 cmp r0, #1
- 8003d5e: d100 bne.n 8003d62 <SysTick_Handler+0x12>
- /* Call tick handler */
- xPortSysTickHandler();
- }
- }
- 8003d60: bd08 pop {r3, pc}
- xPortSysTickHandler();
- 8003d62: f000 fd67 bl 8004834 <xPortSysTickHandler>
- }
- 8003d66: e7fb b.n 8003d60 <SysTick_Handler+0x10>
- 08003d68 <osKernelInitialize>:
- __ASM volatile ("MRS %0, ipsr" : "=r" (result) );
- 8003d68: f3ef 8305 mrs r3, IPSR
- /*---------------------------------------------------------------------------*/
- osStatus_t osKernelInitialize (void) {
- osStatus_t stat;
- if (IS_IRQ()) {
- 8003d6c: b92b cbnz r3, 8003d7a <osKernelInitialize+0x12>
- stat = osErrorISR;
- }
- else {
- if (KernelState == osKernelInactive) {
- 8003d6e: 4b06 ldr r3, [pc, #24] @ (8003d88 <osKernelInitialize+0x20>)
- 8003d70: 6818 ldr r0, [r3, #0]
- 8003d72: b928 cbnz r0, 8003d80 <osKernelInitialize+0x18>
- EvrFreeRTOSSetup(0U);
- #endif
- #if defined(USE_FreeRTOS_HEAP_5) && (HEAP_5_REGION_SETUP == 1)
- vPortDefineHeapRegions (configHEAP_5_REGIONS);
- #endif
- KernelState = osKernelReady;
- 8003d74: 2201 movs r2, #1
- 8003d76: 601a str r2, [r3, #0]
- stat = osOK;
- 8003d78: 4770 bx lr
- stat = osErrorISR;
- 8003d7a: f06f 0005 mvn.w r0, #5
- 8003d7e: 4770 bx lr
- } else {
- stat = osError;
- 8003d80: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- }
- }
- return (stat);
- }
- 8003d84: 4770 bx lr
- 8003d86: bf00 nop
- 8003d88: 2400285c .word 0x2400285c
- 08003d8c <osKernelStart>:
- 8003d8c: f3ef 8305 mrs r3, IPSR
- }
- osStatus_t osKernelStart (void) {
- osStatus_t stat;
- if (IS_IRQ()) {
- 8003d90: b973 cbnz r3, 8003db0 <osKernelStart+0x24>
- stat = osErrorISR;
- }
- else {
- if (KernelState == osKernelReady) {
- 8003d92: 4b0a ldr r3, [pc, #40] @ (8003dbc <osKernelStart+0x30>)
- 8003d94: 681b ldr r3, [r3, #0]
- 8003d96: 2b01 cmp r3, #1
- 8003d98: d10d bne.n 8003db6 <osKernelStart+0x2a>
- osStatus_t osKernelStart (void) {
- 8003d9a: b510 push {r4, lr}
- SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
- 8003d9c: 2400 movs r4, #0
- 8003d9e: 4b08 ldr r3, [pc, #32] @ (8003dc0 <osKernelStart+0x34>)
- 8003da0: 77dc strb r4, [r3, #31]
- /* Ensure SVC priority is at the reset value */
- SVC_Setup();
- /* Change state to enable IRQ masking check */
- KernelState = osKernelRunning;
- 8003da2: 4b06 ldr r3, [pc, #24] @ (8003dbc <osKernelStart+0x30>)
- 8003da4: 2202 movs r2, #2
- 8003da6: 601a str r2, [r3, #0]
- /* Start the kernel scheduler */
- vTaskStartScheduler();
- 8003da8: f001 fe34 bl 8005a14 <vTaskStartScheduler>
- stat = osOK;
- 8003dac: 4620 mov r0, r4
- stat = osError;
- }
- }
- return (stat);
- }
- 8003dae: bd10 pop {r4, pc}
- stat = osErrorISR;
- 8003db0: f06f 0005 mvn.w r0, #5
- 8003db4: 4770 bx lr
- stat = osError;
- 8003db6: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- }
- 8003dba: 4770 bx lr
- 8003dbc: 2400285c .word 0x2400285c
- 8003dc0: e000ed00 .word 0xe000ed00
- 08003dc4 <osKernelGetTickCount>:
- }
- return (lock);
- }
- uint32_t osKernelGetTickCount (void) {
- 8003dc4: b508 push {r3, lr}
- 8003dc6: f3ef 8305 mrs r3, IPSR
- TickType_t ticks;
- if (IS_IRQ()) {
- 8003dca: b113 cbz r3, 8003dd2 <osKernelGetTickCount+0xe>
- ticks = xTaskGetTickCountFromISR();
- 8003dcc: f001 fe86 bl 8005adc <xTaskGetTickCountFromISR>
- } else {
- ticks = xTaskGetTickCount();
- }
- return (ticks);
- }
- 8003dd0: bd08 pop {r3, pc}
- ticks = xTaskGetTickCount();
- 8003dd2: f001 fe7d bl 8005ad0 <xTaskGetTickCount>
- return (ticks);
- 8003dd6: e7fb b.n 8003dd0 <osKernelGetTickCount+0xc>
- 08003dd8 <osThreadNew>:
- return (configCPU_CLOCK_HZ);
- }
- /*---------------------------------------------------------------------------*/
- osThreadId_t osThreadNew (osThreadFunc_t func, void *argument, const osThreadAttr_t *attr) {
- 8003dd8: b5f0 push {r4, r5, r6, r7, lr}
- 8003dda: b087 sub sp, #28
- uint32_t stack;
- TaskHandle_t hTask;
- UBaseType_t prio;
- int32_t mem;
- hTask = NULL;
- 8003ddc: 2400 movs r4, #0
- 8003dde: 9405 str r4, [sp, #20]
- 8003de0: f3ef 8405 mrs r4, IPSR
- if (!IS_IRQ() && (func != NULL)) {
- 8003de4: bb74 cbnz r4, 8003e44 <osThreadNew+0x6c>
- 8003de6: b368 cbz r0, 8003e44 <osThreadNew+0x6c>
- prio = (UBaseType_t)osPriorityNormal;
- name = NULL;
- mem = -1;
- if (attr != NULL) {
- 8003de8: b322 cbz r2, 8003e34 <osThreadNew+0x5c>
- if (attr->name != NULL) {
- 8003dea: 6815 ldr r5, [r2, #0]
- name = attr->name;
- }
- if (attr->priority != osPriorityNone) {
- 8003dec: 6993 ldr r3, [r2, #24]
- 8003dee: b903 cbnz r3, 8003df2 <osThreadNew+0x1a>
- prio = (UBaseType_t)osPriorityNormal;
- 8003df0: 2318 movs r3, #24
- prio = (UBaseType_t)attr->priority;
- }
- if ((prio < osPriorityIdle) || (prio > osPriorityISR) || ((attr->attr_bits & osThreadJoinable) == osThreadJoinable)) {
- 8003df2: 1e5c subs r4, r3, #1
- 8003df4: 2c37 cmp r4, #55 @ 0x37
- 8003df6: d849 bhi.n 8003e8c <osThreadNew+0xb4>
- 8003df8: 6854 ldr r4, [r2, #4]
- 8003dfa: f014 0f01 tst.w r4, #1
- 8003dfe: d147 bne.n 8003e90 <osThreadNew+0xb8>
- return (NULL);
- }
- if (attr->stack_size > 0U) {
- 8003e00: 6956 ldr r6, [r2, #20]
- 8003e02: b16e cbz r6, 8003e20 <osThreadNew+0x48>
- /* In FreeRTOS stack is not in bytes, but in sizeof(StackType_t) which is 4 on ARM ports. */
- /* Stack size should be therefore 4 byte aligned in order to avoid division caused side effects */
- stack = attr->stack_size / sizeof(StackType_t);
- 8003e04: ea4f 0c96 mov.w ip, r6, lsr #2
- }
- if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticTask_t)) &&
- 8003e08: 6894 ldr r4, [r2, #8]
- 8003e0a: b12c cbz r4, 8003e18 <osThreadNew+0x40>
- 8003e0c: 68d7 ldr r7, [r2, #12]
- 8003e0e: 2fa7 cmp r7, #167 @ 0xa7
- 8003e10: d902 bls.n 8003e18 <osThreadNew+0x40>
- 8003e12: 6917 ldr r7, [r2, #16]
- 8003e14: b107 cbz r7, 8003e18 <osThreadNew+0x40>
- (attr->stack_mem != NULL) && (attr->stack_size > 0U)) {
- 8003e16: b9c6 cbnz r6, 8003e4a <osThreadNew+0x72>
- mem = 1;
- }
- else {
- if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && (attr->stack_mem == NULL)) {
- 8003e18: b12c cbz r4, 8003e26 <osThreadNew+0x4e>
- mem = -1;
- 8003e1a: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
- 8003e1e: e00e b.n 8003e3e <osThreadNew+0x66>
- stack = configMINIMAL_STACK_SIZE;
- 8003e20: f44f 7c00 mov.w ip, #512 @ 0x200
- 8003e24: e7f0 b.n 8003e08 <osThreadNew+0x30>
- if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && (attr->stack_mem == NULL)) {
- 8003e26: 68d4 ldr r4, [r2, #12]
- 8003e28: b98c cbnz r4, 8003e4e <osThreadNew+0x76>
- 8003e2a: 6914 ldr r4, [r2, #16]
- 8003e2c: b194 cbz r4, 8003e54 <osThreadNew+0x7c>
- mem = -1;
- 8003e2e: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
- 8003e32: e004 b.n 8003e3e <osThreadNew+0x66>
- name = NULL;
- 8003e34: 4615 mov r5, r2
- mem = 0;
- }
- }
- }
- else {
- mem = 0;
- 8003e36: 2400 movs r4, #0
- prio = (UBaseType_t)osPriorityNormal;
- 8003e38: 2318 movs r3, #24
- stack = configMINIMAL_STACK_SIZE;
- 8003e3a: f44f 7c00 mov.w ip, #512 @ 0x200
- }
- if (mem == 1) {
- 8003e3e: 2c01 cmp r4, #1
- 8003e40: d00a beq.n 8003e58 <osThreadNew+0x80>
- hTask = xTaskCreateStatic ((TaskFunction_t)func, name, stack, argument, prio, (StackType_t *)attr->stack_mem,
- (StaticTask_t *)attr->cb_mem);
- #endif
- }
- else {
- if (mem == 0) {
- 8003e42: b1ac cbz r4, 8003e70 <osThreadNew+0x98>
- #endif
- }
- }
- }
- return ((osThreadId_t)hTask);
- 8003e44: 9805 ldr r0, [sp, #20]
- }
- 8003e46: b007 add sp, #28
- 8003e48: bdf0 pop {r4, r5, r6, r7, pc}
- mem = 1;
- 8003e4a: 2401 movs r4, #1
- 8003e4c: e7f7 b.n 8003e3e <osThreadNew+0x66>
- mem = -1;
- 8003e4e: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
- 8003e52: e7f4 b.n 8003e3e <osThreadNew+0x66>
- mem = 0;
- 8003e54: 2400 movs r4, #0
- 8003e56: e7f2 b.n 8003e3e <osThreadNew+0x66>
- hTask = xTaskCreateStatic ((TaskFunction_t)func, name, stack, argument, prio, (StackType_t *)attr->stack_mem,
- 8003e58: 6914 ldr r4, [r2, #16]
- (StaticTask_t *)attr->cb_mem);
- 8003e5a: 6892 ldr r2, [r2, #8]
- hTask = xTaskCreateStatic ((TaskFunction_t)func, name, stack, argument, prio, (StackType_t *)attr->stack_mem,
- 8003e5c: 9202 str r2, [sp, #8]
- 8003e5e: 9401 str r4, [sp, #4]
- 8003e60: 9300 str r3, [sp, #0]
- 8003e62: 460b mov r3, r1
- 8003e64: 4662 mov r2, ip
- 8003e66: 4629 mov r1, r5
- 8003e68: f001 fd66 bl 8005938 <xTaskCreateStatic>
- 8003e6c: 9005 str r0, [sp, #20]
- 8003e6e: e7e9 b.n 8003e44 <osThreadNew+0x6c>
- if (xTaskCreate ((TaskFunction_t)func, name, (uint16_t)stack, argument, prio, &hTask) != pdPASS) {
- 8003e70: aa05 add r2, sp, #20
- 8003e72: 9201 str r2, [sp, #4]
- 8003e74: 9300 str r3, [sp, #0]
- 8003e76: 460b mov r3, r1
- 8003e78: fa1f f28c uxth.w r2, ip
- 8003e7c: 4629 mov r1, r5
- 8003e7e: f001 fd96 bl 80059ae <xTaskCreate>
- 8003e82: 2801 cmp r0, #1
- 8003e84: d0de beq.n 8003e44 <osThreadNew+0x6c>
- hTask = NULL;
- 8003e86: 2300 movs r3, #0
- 8003e88: 9305 str r3, [sp, #20]
- 8003e8a: e7db b.n 8003e44 <osThreadNew+0x6c>
- return (NULL);
- 8003e8c: 2000 movs r0, #0
- 8003e8e: e7da b.n 8003e46 <osThreadNew+0x6e>
- 8003e90: 2000 movs r0, #0
- 8003e92: e7d8 b.n 8003e46 <osThreadNew+0x6e>
- 08003e94 <osThreadGetId>:
- }
- return (name);
- }
- osThreadId_t osThreadGetId (void) {
- 8003e94: b508 push {r3, lr}
- osThreadId_t id;
- id = (osThreadId_t)xTaskGetCurrentTaskHandle();
- 8003e96: f002 f885 bl 8005fa4 <xTaskGetCurrentTaskHandle>
- return (id);
- }
- 8003e9a: bd08 pop {r3, pc}
- 08003e9c <osDelay>:
- /* Return flags before clearing */
- return (rflags);
- }
- #endif /* (configUSE_OS2_THREAD_FLAGS == 1) */
- osStatus_t osDelay (uint32_t ticks) {
- 8003e9c: b508 push {r3, lr}
- 8003e9e: f3ef 8305 mrs r3, IPSR
- osStatus_t stat;
- if (IS_IRQ()) {
- 8003ea2: b933 cbnz r3, 8003eb2 <osDelay+0x16>
- stat = osErrorISR;
- }
- else {
- stat = osOK;
- if (ticks != 0U) {
- 8003ea4: b908 cbnz r0, 8003eaa <osDelay+0xe>
- stat = osOK;
- 8003ea6: 2000 movs r0, #0
- vTaskDelay(ticks);
- }
- }
- return (stat);
- }
- 8003ea8: bd08 pop {r3, pc}
- vTaskDelay(ticks);
- 8003eaa: f001 ff27 bl 8005cfc <vTaskDelay>
- stat = osOK;
- 8003eae: 2000 movs r0, #0
- 8003eb0: e7fa b.n 8003ea8 <osDelay+0xc>
- stat = osErrorISR;
- 8003eb2: f06f 0005 mvn.w r0, #5
- 8003eb6: e7f7 b.n 8003ea8 <osDelay+0xc>
- 08003eb8 <osMutexNew>:
- }
- /*---------------------------------------------------------------------------*/
- #if (configUSE_OS2_MUTEX == 1)
- osMutexId_t osMutexNew (const osMutexAttr_t *attr) {
- 8003eb8: b570 push {r4, r5, r6, lr}
- 8003eba: f3ef 8305 mrs r3, IPSR
- const char *name;
- #endif
- hMutex = NULL;
- if (!IS_IRQ()) {
- 8003ebe: 2b00 cmp r3, #0
- 8003ec0: d143 bne.n 8003f4a <osMutexNew+0x92>
- 8003ec2: 4604 mov r4, r0
- if (attr != NULL) {
- 8003ec4: b100 cbz r0, 8003ec8 <osMutexNew+0x10>
- type = attr->attr_bits;
- 8003ec6: 6843 ldr r3, [r0, #4]
- } else {
- type = 0U;
- }
- if ((type & osMutexRecursive) == osMutexRecursive) {
- 8003ec8: f013 0601 ands.w r6, r3, #1
- 8003ecc: d000 beq.n 8003ed0 <osMutexNew+0x18>
- rmtx = 1U;
- 8003ece: 2601 movs r6, #1
- } else {
- rmtx = 0U;
- }
- if ((type & osMutexRobust) != osMutexRobust) {
- 8003ed0: f013 0f08 tst.w r3, #8
- 8003ed4: d13c bne.n 8003f50 <osMutexNew+0x98>
- mem = -1;
- if (attr != NULL) {
- 8003ed6: b36c cbz r4, 8003f34 <osMutexNew+0x7c>
- if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticSemaphore_t))) {
- 8003ed8: 68a1 ldr r1, [r4, #8]
- 8003eda: b111 cbz r1, 8003ee2 <osMutexNew+0x2a>
- 8003edc: 68e3 ldr r3, [r4, #12]
- 8003ede: 2b4f cmp r3, #79 @ 0x4f
- 8003ee0: d81d bhi.n 8003f1e <osMutexNew+0x66>
- mem = 1;
- }
- else {
- if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) {
- 8003ee2: b1b9 cbz r1, 8003f14 <osMutexNew+0x5c>
- mem = -1;
- 8003ee4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff
- hMutex = xSemaphoreCreateMutexStatic (attr->cb_mem);
- }
- #endif
- }
- else {
- if (mem == 0) {
- 8003ee8: bb6b cbnz r3, 8003f46 <osMutexNew+0x8e>
- #if (configSUPPORT_DYNAMIC_ALLOCATION == 1)
- if (rmtx != 0U) {
- 8003eea: b33e cbz r6, 8003f3c <osMutexNew+0x84>
- #if (configUSE_RECURSIVE_MUTEXES == 1)
- hMutex = xSemaphoreCreateRecursiveMutex ();
- 8003eec: 2004 movs r0, #4
- 8003eee: f001 f808 bl 8004f02 <xQueueCreateMutex>
- 8003ef2: 4605 mov r5, r0
- #endif
- }
- }
- #if (configQUEUE_REGISTRY_SIZE > 0)
- if (hMutex != NULL) {
- 8003ef4: b12d cbz r5, 8003f02 <osMutexNew+0x4a>
- if (attr != NULL) {
- 8003ef6: b104 cbz r4, 8003efa <osMutexNew+0x42>
- name = attr->name;
- 8003ef8: 6824 ldr r4, [r4, #0]
- } else {
- name = NULL;
- }
- vQueueAddToRegistry (hMutex, name);
- 8003efa: 4621 mov r1, r4
- 8003efc: 4628 mov r0, r5
- 8003efe: f001 fb13 bl 8005528 <vQueueAddToRegistry>
- }
- #endif
- if ((hMutex != NULL) && (rmtx != 0U)) {
- 8003f02: 2d00 cmp r5, #0
- 8003f04: bf0c ite eq
- 8003f06: 2600 moveq r6, #0
- 8003f08: f006 0601 andne.w r6, r6, #1
- 8003f0c: b1f6 cbz r6, 8003f4c <osMutexNew+0x94>
- hMutex = (SemaphoreHandle_t)((uint32_t)hMutex | 1U);
- 8003f0e: f045 0501 orr.w r5, r5, #1
- 8003f12: e01b b.n 8003f4c <osMutexNew+0x94>
- if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) {
- 8003f14: 68e3 ldr r3, [r4, #12]
- 8003f16: b17b cbz r3, 8003f38 <osMutexNew+0x80>
- mem = -1;
- 8003f18: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff
- 8003f1c: e7e4 b.n 8003ee8 <osMutexNew+0x30>
- if (rmtx != 0U) {
- 8003f1e: b126 cbz r6, 8003f2a <osMutexNew+0x72>
- hMutex = xSemaphoreCreateRecursiveMutexStatic (attr->cb_mem);
- 8003f20: 2004 movs r0, #4
- 8003f22: f000 fff9 bl 8004f18 <xQueueCreateMutexStatic>
- 8003f26: 4605 mov r5, r0
- 8003f28: e7e4 b.n 8003ef4 <osMutexNew+0x3c>
- hMutex = xSemaphoreCreateMutexStatic (attr->cb_mem);
- 8003f2a: 2001 movs r0, #1
- 8003f2c: f000 fff4 bl 8004f18 <xQueueCreateMutexStatic>
- 8003f30: 4605 mov r5, r0
- 8003f32: e7df b.n 8003ef4 <osMutexNew+0x3c>
- mem = 0;
- 8003f34: 2300 movs r3, #0
- 8003f36: e7d7 b.n 8003ee8 <osMutexNew+0x30>
- mem = 0;
- 8003f38: 2300 movs r3, #0
- 8003f3a: e7d5 b.n 8003ee8 <osMutexNew+0x30>
- hMutex = xSemaphoreCreateMutex ();
- 8003f3c: 2001 movs r0, #1
- 8003f3e: f000 ffe0 bl 8004f02 <xQueueCreateMutex>
- 8003f42: 4605 mov r5, r0
- 8003f44: e7d6 b.n 8003ef4 <osMutexNew+0x3c>
- hMutex = NULL;
- 8003f46: 2500 movs r5, #0
- 8003f48: e7db b.n 8003f02 <osMutexNew+0x4a>
- 8003f4a: 2500 movs r5, #0
- }
- }
- }
- return ((osMutexId_t)hMutex);
- }
- 8003f4c: 4628 mov r0, r5
- 8003f4e: bd70 pop {r4, r5, r6, pc}
- hMutex = NULL;
- 8003f50: 2500 movs r5, #0
- return ((osMutexId_t)hMutex);
- 8003f52: e7fb b.n 8003f4c <osMutexNew+0x94>
- 08003f54 <osMutexAcquire>:
- 8003f54: f3ef 8205 mrs r2, IPSR
- rmtx = (uint32_t)mutex_id & 1U;
- stat = osOK;
- if (IS_IRQ()) {
- 8003f58: b9da cbnz r2, 8003f92 <osMutexAcquire+0x3e>
- osStatus_t osMutexAcquire (osMutexId_t mutex_id, uint32_t timeout) {
- 8003f5a: b510 push {r4, lr}
- 8003f5c: 4603 mov r3, r0
- 8003f5e: 460c mov r4, r1
- 8003f60: f020 0001 bic.w r0, r0, #1
- 8003f64: f003 0101 and.w r1, r3, #1
- stat = osErrorISR;
- }
- else if (hMutex == NULL) {
- 8003f68: 2b01 cmp r3, #1
- 8003f6a: d915 bls.n 8003f98 <osMutexAcquire+0x44>
- stat = osErrorParameter;
- }
- else {
- if (rmtx != 0U) {
- 8003f6c: b141 cbz r1, 8003f80 <osMutexAcquire+0x2c>
- #if (configUSE_RECURSIVE_MUTEXES == 1)
- if (xSemaphoreTakeRecursive (hMutex, timeout) != pdPASS) {
- 8003f6e: 4621 mov r1, r4
- 8003f70: f001 fa43 bl 80053fa <xQueueTakeMutexRecursive>
- 8003f74: 2801 cmp r0, #1
- 8003f76: d012 beq.n 8003f9e <osMutexAcquire+0x4a>
- if (timeout != 0U) {
- 8003f78: b19c cbz r4, 8003fa2 <osMutexAcquire+0x4e>
- stat = osErrorTimeout;
- 8003f7a: f06f 0001 mvn.w r0, #1
- 8003f7e: e00f b.n 8003fa0 <osMutexAcquire+0x4c>
- }
- }
- #endif
- }
- else {
- if (xSemaphoreTake (hMutex, timeout) != pdPASS) {
- 8003f80: 4621 mov r1, r4
- 8003f82: f001 f967 bl 8005254 <xQueueSemaphoreTake>
- 8003f86: 2801 cmp r0, #1
- 8003f88: d00e beq.n 8003fa8 <osMutexAcquire+0x54>
- if (timeout != 0U) {
- 8003f8a: b17c cbz r4, 8003fac <osMutexAcquire+0x58>
- stat = osErrorTimeout;
- 8003f8c: f06f 0001 mvn.w r0, #1
- 8003f90: e006 b.n 8003fa0 <osMutexAcquire+0x4c>
- stat = osErrorISR;
- 8003f92: f06f 0005 mvn.w r0, #5
- }
- }
- }
- return (stat);
- }
- 8003f96: 4770 bx lr
- stat = osErrorParameter;
- 8003f98: f06f 0003 mvn.w r0, #3
- 8003f9c: e000 b.n 8003fa0 <osMutexAcquire+0x4c>
- stat = osOK;
- 8003f9e: 2000 movs r0, #0
- }
- 8003fa0: bd10 pop {r4, pc}
- stat = osErrorResource;
- 8003fa2: f06f 0002 mvn.w r0, #2
- 8003fa6: e7fb b.n 8003fa0 <osMutexAcquire+0x4c>
- stat = osOK;
- 8003fa8: 2000 movs r0, #0
- 8003faa: e7f9 b.n 8003fa0 <osMutexAcquire+0x4c>
- stat = osErrorResource;
- 8003fac: f06f 0002 mvn.w r0, #2
- return (stat);
- 8003fb0: e7f6 b.n 8003fa0 <osMutexAcquire+0x4c>
- 08003fb2 <osMutexRelease>:
- 8003fb2: f3ef 8205 mrs r2, IPSR
- rmtx = (uint32_t)mutex_id & 1U;
- stat = osOK;
- if (IS_IRQ()) {
- 8003fb6: b9ba cbnz r2, 8003fe8 <osMutexRelease+0x36>
- osStatus_t osMutexRelease (osMutexId_t mutex_id) {
- 8003fb8: b508 push {r3, lr}
- 8003fba: 4603 mov r3, r0
- 8003fbc: f020 0001 bic.w r0, r0, #1
- 8003fc0: f003 0101 and.w r1, r3, #1
- stat = osErrorISR;
- }
- else if (hMutex == NULL) {
- 8003fc4: 2b01 cmp r3, #1
- 8003fc6: d912 bls.n 8003fee <osMutexRelease+0x3c>
- stat = osErrorParameter;
- }
- else {
- if (rmtx != 0U) {
- 8003fc8: b129 cbz r1, 8003fd6 <osMutexRelease+0x24>
- #if (configUSE_RECURSIVE_MUTEXES == 1)
- if (xSemaphoreGiveRecursive (hMutex) != pdPASS) {
- 8003fca: f000 ffb4 bl 8004f36 <xQueueGiveMutexRecursive>
- 8003fce: 2801 cmp r0, #1
- 8003fd0: d110 bne.n 8003ff4 <osMutexRelease+0x42>
- stat = osOK;
- 8003fd2: 2000 movs r0, #0
- }
- }
- }
- return (stat);
- }
- 8003fd4: bd08 pop {r3, pc}
- if (xSemaphoreGive (hMutex) != pdPASS) {
- 8003fd6: 2300 movs r3, #0
- 8003fd8: 461a mov r2, r3
- 8003fda: 4619 mov r1, r3
- 8003fdc: f000 fec1 bl 8004d62 <xQueueGenericSend>
- 8003fe0: 2801 cmp r0, #1
- 8003fe2: d10a bne.n 8003ffa <osMutexRelease+0x48>
- stat = osOK;
- 8003fe4: 2000 movs r0, #0
- 8003fe6: e7f5 b.n 8003fd4 <osMutexRelease+0x22>
- stat = osErrorISR;
- 8003fe8: f06f 0005 mvn.w r0, #5
- }
- 8003fec: 4770 bx lr
- stat = osErrorParameter;
- 8003fee: f06f 0003 mvn.w r0, #3
- 8003ff2: e7ef b.n 8003fd4 <osMutexRelease+0x22>
- stat = osErrorResource;
- 8003ff4: f06f 0002 mvn.w r0, #2
- 8003ff8: e7ec b.n 8003fd4 <osMutexRelease+0x22>
- stat = osErrorResource;
- 8003ffa: f06f 0002 mvn.w r0, #2
- return (stat);
- 8003ffe: e7e9 b.n 8003fd4 <osMutexRelease+0x22>
- 08004000 <osSemaphoreNew>:
- }
- #endif /* (configUSE_OS2_MUTEX == 1) */
- /*---------------------------------------------------------------------------*/
- osSemaphoreId_t osSemaphoreNew (uint32_t max_count, uint32_t initial_count, const osSemaphoreAttr_t *attr) {
- 8004000: b570 push {r4, r5, r6, lr}
- 8004002: b082 sub sp, #8
- 8004004: f3ef 8305 mrs r3, IPSR
- const char *name;
- #endif
- hSemaphore = NULL;
- if (!IS_IRQ() && (max_count > 0U) && (initial_count <= max_count)) {
- 8004008: 2b00 cmp r3, #0
- 800400a: d14d bne.n 80040a8 <osSemaphoreNew+0xa8>
- 800400c: 460e mov r6, r1
- 800400e: 4614 mov r4, r2
- 8004010: 4288 cmp r0, r1
- 8004012: bf34 ite cc
- 8004014: 2300 movcc r3, #0
- 8004016: 2301 movcs r3, #1
- 8004018: 2800 cmp r0, #0
- 800401a: d049 beq.n 80040b0 <osSemaphoreNew+0xb0>
- 800401c: 2b00 cmp r3, #0
- 800401e: d047 beq.n 80040b0 <osSemaphoreNew+0xb0>
- mem = -1;
- if (attr != NULL) {
- 8004020: b14a cbz r2, 8004036 <osSemaphoreNew+0x36>
- if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticSemaphore_t))) {
- 8004022: 6895 ldr r5, [r2, #8]
- 8004024: b115 cbz r5, 800402c <osSemaphoreNew+0x2c>
- 8004026: 68d3 ldr r3, [r2, #12]
- 8004028: 2b4f cmp r3, #79 @ 0x4f
- 800402a: d814 bhi.n 8004056 <osSemaphoreNew+0x56>
- mem = 1;
- }
- else {
- if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) {
- 800402c: 2d00 cmp r5, #0
- 800402e: d141 bne.n 80040b4 <osSemaphoreNew+0xb4>
- 8004030: 68e3 ldr r3, [r4, #12]
- 8004032: b10b cbz r3, 8004038 <osSemaphoreNew+0x38>
- 8004034: e039 b.n 80040aa <osSemaphoreNew+0xaa>
- mem = 0;
- }
- }
- }
- else {
- mem = 0;
- 8004036: 2300 movs r3, #0
- }
- if (mem != -1) {
- if (max_count == 1U) {
- 8004038: 2801 cmp r0, #1
- 800403a: d00e beq.n 800405a <osSemaphoreNew+0x5a>
- hSemaphore = NULL;
- }
- }
- }
- else {
- if (mem == 1) {
- 800403c: bb73 cbnz r3, 800409c <osSemaphoreNew+0x9c>
- hSemaphore = xSemaphoreCreateCountingStatic (max_count, initial_count, (StaticSemaphore_t *)attr->cb_mem);
- #endif
- }
- else {
- #if (configSUPPORT_DYNAMIC_ALLOCATION == 1)
- hSemaphore = xSemaphoreCreateCounting (max_count, initial_count);
- 800403e: 4631 mov r1, r6
- 8004040: f000 fe71 bl 8004d26 <xQueueCreateCountingSemaphore>
- 8004044: 4605 mov r5, r0
- #endif
- }
- }
-
- #if (configQUEUE_REGISTRY_SIZE > 0)
- if (hSemaphore != NULL) {
- 8004046: b385 cbz r5, 80040aa <osSemaphoreNew+0xaa>
- if (attr != NULL) {
- 8004048: b104 cbz r4, 800404c <osSemaphoreNew+0x4c>
- name = attr->name;
- 800404a: 6824 ldr r4, [r4, #0]
- } else {
- name = NULL;
- }
- vQueueAddToRegistry (hSemaphore, name);
- 800404c: 4621 mov r1, r4
- 800404e: 4628 mov r0, r5
- 8004050: f001 fa6a bl 8005528 <vQueueAddToRegistry>
- 8004054: e029 b.n 80040aa <osSemaphoreNew+0xaa>
- mem = 1;
- 8004056: 2301 movs r3, #1
- 8004058: e7ee b.n 8004038 <osSemaphoreNew+0x38>
- if (mem == 1) {
- 800405a: b9b3 cbnz r3, 800408a <osSemaphoreNew+0x8a>
- hSemaphore = xSemaphoreCreateBinary();
- 800405c: 2203 movs r2, #3
- 800405e: 2100 movs r1, #0
- 8004060: 2001 movs r0, #1
- 8004062: f000 fe19 bl 8004c98 <xQueueGenericCreate>
- 8004066: 4605 mov r5, r0
- if ((hSemaphore != NULL) && (initial_count != 0U)) {
- 8004068: 2d00 cmp r5, #0
- 800406a: bf18 it ne
- 800406c: 2e00 cmpne r6, #0
- 800406e: d0ea beq.n 8004046 <osSemaphoreNew+0x46>
- if (xSemaphoreGive (hSemaphore) != pdPASS) {
- 8004070: 2300 movs r3, #0
- 8004072: 461a mov r2, r3
- 8004074: 4619 mov r1, r3
- 8004076: 4628 mov r0, r5
- 8004078: f000 fe73 bl 8004d62 <xQueueGenericSend>
- 800407c: 2801 cmp r0, #1
- 800407e: d0e2 beq.n 8004046 <osSemaphoreNew+0x46>
- vSemaphoreDelete (hSemaphore);
- 8004080: 4628 mov r0, r5
- 8004082: f001 fa7b bl 800557c <vQueueDelete>
- hSemaphore = NULL;
- 8004086: 2500 movs r5, #0
- 8004088: e00f b.n 80040aa <osSemaphoreNew+0xaa>
- hSemaphore = xSemaphoreCreateBinaryStatic ((StaticSemaphore_t *)attr->cb_mem);
- 800408a: 68a3 ldr r3, [r4, #8]
- 800408c: 2203 movs r2, #3
- 800408e: 9200 str r2, [sp, #0]
- 8004090: 2200 movs r2, #0
- 8004092: 4611 mov r1, r2
- 8004094: f000 fdad bl 8004bf2 <xQueueGenericCreateStatic>
- 8004098: 4605 mov r5, r0
- 800409a: e7e5 b.n 8004068 <osSemaphoreNew+0x68>
- hSemaphore = xSemaphoreCreateCountingStatic (max_count, initial_count, (StaticSemaphore_t *)attr->cb_mem);
- 800409c: 68a2 ldr r2, [r4, #8]
- 800409e: 4631 mov r1, r6
- 80040a0: f000 fe1e bl 8004ce0 <xQueueCreateCountingSemaphoreStatic>
- 80040a4: 4605 mov r5, r0
- 80040a6: e7ce b.n 8004046 <osSemaphoreNew+0x46>
- hSemaphore = NULL;
- 80040a8: 2500 movs r5, #0
- #endif
- }
- }
- return ((osSemaphoreId_t)hSemaphore);
- }
- 80040aa: 4628 mov r0, r5
- 80040ac: b002 add sp, #8
- 80040ae: bd70 pop {r4, r5, r6, pc}
- hSemaphore = NULL;
- 80040b0: 2500 movs r5, #0
- 80040b2: e7fa b.n 80040aa <osSemaphoreNew+0xaa>
- 80040b4: 2500 movs r5, #0
- return ((osSemaphoreId_t)hSemaphore);
- 80040b6: e7f8 b.n 80040aa <osSemaphoreNew+0xaa>
- 080040b8 <osSemaphoreAcquire>:
- osStatus_t stat;
- BaseType_t yield;
- stat = osOK;
- if (hSemaphore == NULL) {
- 80040b8: b320 cbz r0, 8004104 <osSemaphoreAcquire+0x4c>
- osStatus_t osSemaphoreAcquire (osSemaphoreId_t semaphore_id, uint32_t timeout) {
- 80040ba: b510 push {r4, lr}
- 80040bc: b082 sub sp, #8
- 80040be: 460c mov r4, r1
- 80040c0: f3ef 8305 mrs r3, IPSR
- stat = osErrorParameter;
- }
- else if (IS_IRQ()) {
- 80040c4: b1b3 cbz r3, 80040f4 <osSemaphoreAcquire+0x3c>
- if (timeout != 0U) {
- 80040c6: bb01 cbnz r1, 800410a <osSemaphoreAcquire+0x52>
- stat = osErrorParameter;
- }
- else {
- yield = pdFALSE;
- 80040c8: 2100 movs r1, #0
- 80040ca: 9101 str r1, [sp, #4]
- if (xSemaphoreTakeFromISR (hSemaphore, &yield) != pdPASS) {
- 80040cc: aa01 add r2, sp, #4
- 80040ce: f001 f9b4 bl 800543a <xQueueReceiveFromISR>
- 80040d2: 2801 cmp r0, #1
- 80040d4: d11c bne.n 8004110 <osSemaphoreAcquire+0x58>
- stat = osErrorResource;
- } else {
- portYIELD_FROM_ISR (yield);
- 80040d6: 9801 ldr r0, [sp, #4]
- 80040d8: b150 cbz r0, 80040f0 <osSemaphoreAcquire+0x38>
- 80040da: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 80040de: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 80040e2: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- 80040e6: f3bf 8f4f dsb sy
- 80040ea: f3bf 8f6f isb sy
- stat = osOK;
- 80040ee: 2000 movs r0, #0
- }
- }
- }
- return (stat);
- }
- 80040f0: b002 add sp, #8
- 80040f2: bd10 pop {r4, pc}
- if (xSemaphoreTake (hSemaphore, (TickType_t)timeout) != pdPASS) {
- 80040f4: f001 f8ae bl 8005254 <xQueueSemaphoreTake>
- 80040f8: 2801 cmp r0, #1
- 80040fa: d00c beq.n 8004116 <osSemaphoreAcquire+0x5e>
- if (timeout != 0U) {
- 80040fc: b16c cbz r4, 800411a <osSemaphoreAcquire+0x62>
- stat = osErrorTimeout;
- 80040fe: f06f 0001 mvn.w r0, #1
- 8004102: e7f5 b.n 80040f0 <osSemaphoreAcquire+0x38>
- stat = osErrorParameter;
- 8004104: f06f 0003 mvn.w r0, #3
- }
- 8004108: 4770 bx lr
- stat = osErrorParameter;
- 800410a: f06f 0003 mvn.w r0, #3
- 800410e: e7ef b.n 80040f0 <osSemaphoreAcquire+0x38>
- stat = osErrorResource;
- 8004110: f06f 0002 mvn.w r0, #2
- 8004114: e7ec b.n 80040f0 <osSemaphoreAcquire+0x38>
- stat = osOK;
- 8004116: 2000 movs r0, #0
- 8004118: e7ea b.n 80040f0 <osSemaphoreAcquire+0x38>
- stat = osErrorResource;
- 800411a: f06f 0002 mvn.w r0, #2
- return (stat);
- 800411e: e7e7 b.n 80040f0 <osSemaphoreAcquire+0x38>
- 08004120 <osSemaphoreRelease>:
- osStatus_t stat;
- BaseType_t yield;
- stat = osOK;
- if (hSemaphore == NULL) {
- 8004120: b320 cbz r0, 800416c <osSemaphoreRelease+0x4c>
- osStatus_t osSemaphoreRelease (osSemaphoreId_t semaphore_id) {
- 8004122: b500 push {lr}
- 8004124: b083 sub sp, #12
- 8004126: f3ef 8305 mrs r3, IPSR
- stat = osErrorParameter;
- }
- else if (IS_IRQ()) {
- 800412a: b1a3 cbz r3, 8004156 <osSemaphoreRelease+0x36>
- yield = pdFALSE;
- 800412c: 2300 movs r3, #0
- 800412e: 9301 str r3, [sp, #4]
- if (xSemaphoreGiveFromISR (hSemaphore, &yield) != pdTRUE) {
- 8004130: a901 add r1, sp, #4
- 8004132: f000 ff87 bl 8005044 <xQueueGiveFromISR>
- 8004136: 2801 cmp r0, #1
- 8004138: d11b bne.n 8004172 <osSemaphoreRelease+0x52>
- stat = osErrorResource;
- } else {
- portYIELD_FROM_ISR (yield);
- 800413a: 9801 ldr r0, [sp, #4]
- 800413c: b198 cbz r0, 8004166 <osSemaphoreRelease+0x46>
- 800413e: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 8004142: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 8004146: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- 800414a: f3bf 8f4f dsb sy
- 800414e: f3bf 8f6f isb sy
- stat = osOK;
- 8004152: 2000 movs r0, #0
- 8004154: e007 b.n 8004166 <osSemaphoreRelease+0x46>
- }
- }
- else {
- if (xSemaphoreGive (hSemaphore) != pdPASS) {
- 8004156: 2300 movs r3, #0
- 8004158: 461a mov r2, r3
- 800415a: 4619 mov r1, r3
- 800415c: f000 fe01 bl 8004d62 <xQueueGenericSend>
- 8004160: 2801 cmp r0, #1
- 8004162: d109 bne.n 8004178 <osSemaphoreRelease+0x58>
- stat = osOK;
- 8004164: 2000 movs r0, #0
- stat = osErrorResource;
- }
- }
- return (stat);
- }
- 8004166: b003 add sp, #12
- 8004168: f85d fb04 ldr.w pc, [sp], #4
- stat = osErrorParameter;
- 800416c: f06f 0003 mvn.w r0, #3
- }
- 8004170: 4770 bx lr
- stat = osErrorResource;
- 8004172: f06f 0002 mvn.w r0, #2
- 8004176: e7f6 b.n 8004166 <osSemaphoreRelease+0x46>
- stat = osErrorResource;
- 8004178: f06f 0002 mvn.w r0, #2
- return (stat);
- 800417c: e7f3 b.n 8004166 <osSemaphoreRelease+0x46>
- 0800417e <osSemaphoreDelete>:
- 800417e: f3ef 8305 mrs r3, IPSR
- osStatus_t osSemaphoreDelete (osSemaphoreId_t semaphore_id) {
- SemaphoreHandle_t hSemaphore = (SemaphoreHandle_t)semaphore_id;
- osStatus_t stat;
- #ifndef USE_FreeRTOS_HEAP_1
- if (IS_IRQ()) {
- 8004182: b94b cbnz r3, 8004198 <osSemaphoreDelete+0x1a>
- osStatus_t osSemaphoreDelete (osSemaphoreId_t semaphore_id) {
- 8004184: b510 push {r4, lr}
- 8004186: 4604 mov r4, r0
- stat = osErrorISR;
- }
- else if (hSemaphore == NULL) {
- 8004188: b148 cbz r0, 800419e <osSemaphoreDelete+0x20>
- stat = osErrorParameter;
- }
- else {
- #if (configQUEUE_REGISTRY_SIZE > 0)
- vQueueUnregisterQueue (hSemaphore);
- 800418a: f001 f9e1 bl 8005550 <vQueueUnregisterQueue>
- #endif
- stat = osOK;
- vSemaphoreDelete (hSemaphore);
- 800418e: 4620 mov r0, r4
- 8004190: f001 f9f4 bl 800557c <vQueueDelete>
- stat = osOK;
- 8004194: 2000 movs r0, #0
- #else
- stat = osError;
- #endif
- return (stat);
- }
- 8004196: bd10 pop {r4, pc}
- stat = osErrorISR;
- 8004198: f06f 0005 mvn.w r0, #5
- }
- 800419c: 4770 bx lr
- stat = osErrorParameter;
- 800419e: f06f 0003 mvn.w r0, #3
- return (stat);
- 80041a2: e7f8 b.n 8004196 <osSemaphoreDelete+0x18>
- 080041a4 <osMessageQueueNew>:
- /*---------------------------------------------------------------------------*/
- osMessageQueueId_t osMessageQueueNew (uint32_t msg_count, uint32_t msg_size, const osMessageQueueAttr_t *attr) {
- 80041a4: b570 push {r4, r5, r6, lr}
- 80041a6: b082 sub sp, #8
- 80041a8: f3ef 8305 mrs r3, IPSR
- const char *name;
- #endif
- hQueue = NULL;
- if (!IS_IRQ() && (msg_count > 0U) && (msg_size > 0U)) {
- 80041ac: 2b00 cmp r3, #0
- 80041ae: d13d bne.n 800422c <osMessageQueueNew+0x88>
- 80041b0: 4614 mov r4, r2
- 80041b2: 1e0b subs r3, r1, #0
- 80041b4: bf18 it ne
- 80041b6: 2301 movne r3, #1
- 80041b8: 2800 cmp r0, #0
- 80041ba: d03b beq.n 8004234 <osMessageQueueNew+0x90>
- 80041bc: 2b00 cmp r3, #0
- 80041be: d039 beq.n 8004234 <osMessageQueueNew+0x90>
- mem = -1;
- if (attr != NULL) {
- 80041c0: b36a cbz r2, 800421e <osMessageQueueNew+0x7a>
- if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticQueue_t)) &&
- 80041c2: 6893 ldr r3, [r2, #8]
- 80041c4: b14b cbz r3, 80041da <osMessageQueueNew+0x36>
- 80041c6: 68d2 ldr r2, [r2, #12]
- 80041c8: 2a4f cmp r2, #79 @ 0x4f
- 80041ca: d906 bls.n 80041da <osMessageQueueNew+0x36>
- (attr->mq_mem != NULL) && (attr->mq_size >= (msg_count * msg_size))) {
- 80041cc: 6922 ldr r2, [r4, #16]
- if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticQueue_t)) &&
- 80041ce: b122 cbz r2, 80041da <osMessageQueueNew+0x36>
- (attr->mq_mem != NULL) && (attr->mq_size >= (msg_count * msg_size))) {
- 80041d0: fb01 f500 mul.w r5, r1, r0
- 80041d4: 6966 ldr r6, [r4, #20]
- 80041d6: 42ae cmp r6, r5
- 80041d8: d21b bcs.n 8004212 <osMessageQueueNew+0x6e>
- mem = 1;
- }
- else {
- if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) &&
- 80041da: b173 cbz r3, 80041fa <osMessageQueueNew+0x56>
- mem = -1;
- 80041dc: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff
- #if (configSUPPORT_STATIC_ALLOCATION == 1)
- hQueue = xQueueCreateStatic (msg_count, msg_size, attr->mq_mem, attr->cb_mem);
- #endif
- }
- else {
- if (mem == 0) {
- 80041e0: bb53 cbnz r3, 8004238 <osMessageQueueNew+0x94>
- #if (configSUPPORT_DYNAMIC_ALLOCATION == 1)
- hQueue = xQueueCreate (msg_count, msg_size);
- 80041e2: 2200 movs r2, #0
- 80041e4: f000 fd58 bl 8004c98 <xQueueGenericCreate>
- 80041e8: 4605 mov r5, r0
- #endif
- }
- }
- #if (configQUEUE_REGISTRY_SIZE > 0)
- if (hQueue != NULL) {
- 80041ea: b305 cbz r5, 800422e <osMessageQueueNew+0x8a>
- if (attr != NULL) {
- 80041ec: b104 cbz r4, 80041f0 <osMessageQueueNew+0x4c>
- name = attr->name;
- 80041ee: 6824 ldr r4, [r4, #0]
- } else {
- name = NULL;
- }
- vQueueAddToRegistry (hQueue, name);
- 80041f0: 4621 mov r1, r4
- 80041f2: 4628 mov r0, r5
- 80041f4: f001 f998 bl 8005528 <vQueueAddToRegistry>
- 80041f8: e019 b.n 800422e <osMessageQueueNew+0x8a>
- if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) &&
- 80041fa: 68e3 ldr r3, [r4, #12]
- 80041fc: b98b cbnz r3, 8004222 <osMessageQueueNew+0x7e>
- (attr->mq_mem == NULL) && (attr->mq_size == 0U)) {
- 80041fe: 6923 ldr r3, [r4, #16]
- if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) &&
- 8004200: b113 cbz r3, 8004208 <osMessageQueueNew+0x64>
- mem = -1;
- 8004202: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff
- 8004206: e7eb b.n 80041e0 <osMessageQueueNew+0x3c>
- (attr->mq_mem == NULL) && (attr->mq_size == 0U)) {
- 8004208: 6963 ldr r3, [r4, #20]
- 800420a: b16b cbz r3, 8004228 <osMessageQueueNew+0x84>
- mem = -1;
- 800420c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff
- 8004210: e7e6 b.n 80041e0 <osMessageQueueNew+0x3c>
- hQueue = xQueueCreateStatic (msg_count, msg_size, attr->mq_mem, attr->cb_mem);
- 8004212: 2500 movs r5, #0
- 8004214: 9500 str r5, [sp, #0]
- 8004216: f000 fcec bl 8004bf2 <xQueueGenericCreateStatic>
- 800421a: 4605 mov r5, r0
- 800421c: e7e5 b.n 80041ea <osMessageQueueNew+0x46>
- mem = 0;
- 800421e: 2300 movs r3, #0
- 8004220: e7de b.n 80041e0 <osMessageQueueNew+0x3c>
- mem = -1;
- 8004222: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff
- 8004226: e7db b.n 80041e0 <osMessageQueueNew+0x3c>
- mem = 0;
- 8004228: 2300 movs r3, #0
- 800422a: e7d9 b.n 80041e0 <osMessageQueueNew+0x3c>
- hQueue = NULL;
- 800422c: 2500 movs r5, #0
- #endif
- }
- return ((osMessageQueueId_t)hQueue);
- }
- 800422e: 4628 mov r0, r5
- 8004230: b002 add sp, #8
- 8004232: bd70 pop {r4, r5, r6, pc}
- hQueue = NULL;
- 8004234: 2500 movs r5, #0
- 8004236: e7fa b.n 800422e <osMessageQueueNew+0x8a>
- 8004238: 2500 movs r5, #0
- return ((osMessageQueueId_t)hQueue);
- 800423a: e7f8 b.n 800422e <osMessageQueueNew+0x8a>
- 0800423c <osMessageQueuePut>:
- osStatus_t osMessageQueuePut (osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t timeout) {
- 800423c: b510 push {r4, lr}
- 800423e: b082 sub sp, #8
- 8004240: 461c mov r4, r3
- 8004242: f3ef 8305 mrs r3, IPSR
- (void)msg_prio; /* Message priority is ignored */
- stat = osOK;
- if (IS_IRQ()) {
- 8004246: b1d3 cbz r3, 800427e <osMessageQueuePut+0x42>
- if ((hQueue == NULL) || (msg_ptr == NULL) || (timeout != 0U)) {
- 8004248: 2900 cmp r1, #0
- 800424a: bf18 it ne
- 800424c: 2800 cmpne r0, #0
- 800424e: d024 beq.n 800429a <osMessageQueuePut+0x5e>
- 8004250: bb34 cbnz r4, 80042a0 <osMessageQueuePut+0x64>
- stat = osErrorParameter;
- }
- else {
- yield = pdFALSE;
- 8004252: 2300 movs r3, #0
- 8004254: 9301 str r3, [sp, #4]
- if (xQueueSendToBackFromISR (hQueue, msg_ptr, &yield) != pdTRUE) {
- 8004256: aa01 add r2, sp, #4
- 8004258: f000 fe8d bl 8004f76 <xQueueGenericSendFromISR>
- 800425c: 2801 cmp r0, #1
- 800425e: d122 bne.n 80042a6 <osMessageQueuePut+0x6a>
- stat = osErrorResource;
- } else {
- portYIELD_FROM_ISR (yield);
- 8004260: 9801 ldr r0, [sp, #4]
- 8004262: b150 cbz r0, 800427a <osMessageQueuePut+0x3e>
- 8004264: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 8004268: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 800426c: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- 8004270: f3bf 8f4f dsb sy
- 8004274: f3bf 8f6f isb sy
- stat = osOK;
- 8004278: 2000 movs r0, #0
- }
- }
- }
- return (stat);
- }
- 800427a: b002 add sp, #8
- 800427c: bd10 pop {r4, pc}
- if ((hQueue == NULL) || (msg_ptr == NULL)) {
- 800427e: 2900 cmp r1, #0
- 8004280: bf18 it ne
- 8004282: 2800 cmpne r0, #0
- 8004284: d012 beq.n 80042ac <osMessageQueuePut+0x70>
- if (xQueueSendToBack (hQueue, msg_ptr, (TickType_t)timeout) != pdPASS) {
- 8004286: 2300 movs r3, #0
- 8004288: 4622 mov r2, r4
- 800428a: f000 fd6a bl 8004d62 <xQueueGenericSend>
- 800428e: 2801 cmp r0, #1
- 8004290: d00f beq.n 80042b2 <osMessageQueuePut+0x76>
- if (timeout != 0U) {
- 8004292: b184 cbz r4, 80042b6 <osMessageQueuePut+0x7a>
- stat = osErrorTimeout;
- 8004294: f06f 0001 mvn.w r0, #1
- 8004298: e7ef b.n 800427a <osMessageQueuePut+0x3e>
- stat = osErrorParameter;
- 800429a: f06f 0003 mvn.w r0, #3
- 800429e: e7ec b.n 800427a <osMessageQueuePut+0x3e>
- 80042a0: f06f 0003 mvn.w r0, #3
- 80042a4: e7e9 b.n 800427a <osMessageQueuePut+0x3e>
- stat = osErrorResource;
- 80042a6: f06f 0002 mvn.w r0, #2
- 80042aa: e7e6 b.n 800427a <osMessageQueuePut+0x3e>
- stat = osErrorParameter;
- 80042ac: f06f 0003 mvn.w r0, #3
- 80042b0: e7e3 b.n 800427a <osMessageQueuePut+0x3e>
- stat = osOK;
- 80042b2: 2000 movs r0, #0
- 80042b4: e7e1 b.n 800427a <osMessageQueuePut+0x3e>
- stat = osErrorResource;
- 80042b6: f06f 0002 mvn.w r0, #2
- return (stat);
- 80042ba: e7de b.n 800427a <osMessageQueuePut+0x3e>
- 080042bc <osMessageQueueGet>:
- osStatus_t osMessageQueueGet (osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t timeout) {
- 80042bc: b510 push {r4, lr}
- 80042be: b082 sub sp, #8
- 80042c0: 461c mov r4, r3
- 80042c2: f3ef 8305 mrs r3, IPSR
- (void)msg_prio; /* Message priority is ignored */
- stat = osOK;
- if (IS_IRQ()) {
- 80042c6: b1d3 cbz r3, 80042fe <osMessageQueueGet+0x42>
- if ((hQueue == NULL) || (msg_ptr == NULL) || (timeout != 0U)) {
- 80042c8: 2900 cmp r1, #0
- 80042ca: bf18 it ne
- 80042cc: 2800 cmpne r0, #0
- 80042ce: d023 beq.n 8004318 <osMessageQueueGet+0x5c>
- 80042d0: bb2c cbnz r4, 800431e <osMessageQueueGet+0x62>
- stat = osErrorParameter;
- }
- else {
- yield = pdFALSE;
- 80042d2: 2300 movs r3, #0
- 80042d4: 9301 str r3, [sp, #4]
- if (xQueueReceiveFromISR (hQueue, msg_ptr, &yield) != pdPASS) {
- 80042d6: aa01 add r2, sp, #4
- 80042d8: f001 f8af bl 800543a <xQueueReceiveFromISR>
- 80042dc: 2801 cmp r0, #1
- 80042de: d121 bne.n 8004324 <osMessageQueueGet+0x68>
- stat = osErrorResource;
- } else {
- portYIELD_FROM_ISR (yield);
- 80042e0: 9801 ldr r0, [sp, #4]
- 80042e2: b150 cbz r0, 80042fa <osMessageQueueGet+0x3e>
- 80042e4: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 80042e8: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 80042ec: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- 80042f0: f3bf 8f4f dsb sy
- 80042f4: f3bf 8f6f isb sy
- stat = osOK;
- 80042f8: 2000 movs r0, #0
- }
- }
- }
- return (stat);
- }
- 80042fa: b002 add sp, #8
- 80042fc: bd10 pop {r4, pc}
- if ((hQueue == NULL) || (msg_ptr == NULL)) {
- 80042fe: 2900 cmp r1, #0
- 8004300: bf18 it ne
- 8004302: 2800 cmpne r0, #0
- 8004304: d011 beq.n 800432a <osMessageQueueGet+0x6e>
- if (xQueueReceive (hQueue, msg_ptr, (TickType_t)timeout) != pdPASS) {
- 8004306: 4622 mov r2, r4
- 8004308: f000 fef5 bl 80050f6 <xQueueReceive>
- 800430c: 2801 cmp r0, #1
- 800430e: d00f beq.n 8004330 <osMessageQueueGet+0x74>
- if (timeout != 0U) {
- 8004310: b184 cbz r4, 8004334 <osMessageQueueGet+0x78>
- stat = osErrorTimeout;
- 8004312: f06f 0001 mvn.w r0, #1
- 8004316: e7f0 b.n 80042fa <osMessageQueueGet+0x3e>
- stat = osErrorParameter;
- 8004318: f06f 0003 mvn.w r0, #3
- 800431c: e7ed b.n 80042fa <osMessageQueueGet+0x3e>
- 800431e: f06f 0003 mvn.w r0, #3
- 8004322: e7ea b.n 80042fa <osMessageQueueGet+0x3e>
- stat = osErrorResource;
- 8004324: f06f 0002 mvn.w r0, #2
- 8004328: e7e7 b.n 80042fa <osMessageQueueGet+0x3e>
- stat = osErrorParameter;
- 800432a: f06f 0003 mvn.w r0, #3
- 800432e: e7e4 b.n 80042fa <osMessageQueueGet+0x3e>
- stat = osOK;
- 8004330: 2000 movs r0, #0
- 8004332: e7e2 b.n 80042fa <osMessageQueueGet+0x3e>
- stat = osErrorResource;
- 8004334: f06f 0002 mvn.w r0, #2
- return (stat);
- 8004338: e7df b.n 80042fa <osMessageQueueGet+0x3e>
- 0800433a <osMessageQueueGetCount>:
- uint32_t osMessageQueueGetCount (osMessageQueueId_t mq_id) {
- QueueHandle_t hQueue = (QueueHandle_t)mq_id;
- UBaseType_t count;
- if (hQueue == NULL) {
- 800433a: b148 cbz r0, 8004350 <osMessageQueueGetCount+0x16>
- uint32_t osMessageQueueGetCount (osMessageQueueId_t mq_id) {
- 800433c: b508 push {r3, lr}
- 800433e: f3ef 8205 mrs r2, IPSR
- count = 0U;
- }
- else if (IS_IRQ()) {
- 8004342: b112 cbz r2, 800434a <osMessageQueueGetCount+0x10>
- count = uxQueueMessagesWaitingFromISR (hQueue);
- 8004344: f001 f8e3 bl 800550e <uxQueueMessagesWaitingFromISR>
- else {
- count = uxQueueMessagesWaiting (hQueue);
- }
- return ((uint32_t)count);
- }
- 8004348: bd08 pop {r3, pc}
- count = uxQueueMessagesWaiting (hQueue);
- 800434a: f001 f8cd bl 80054e8 <uxQueueMessagesWaiting>
- 800434e: e7fb b.n 8004348 <osMessageQueueGetCount+0xe>
- count = 0U;
- 8004350: 2000 movs r0, #0
- }
- 8004352: 4770 bx lr
- 08004354 <osMessageQueueDelete>:
- 8004354: f3ef 8305 mrs r3, IPSR
- osStatus_t osMessageQueueDelete (osMessageQueueId_t mq_id) {
- QueueHandle_t hQueue = (QueueHandle_t)mq_id;
- osStatus_t stat;
- #ifndef USE_FreeRTOS_HEAP_1
- if (IS_IRQ()) {
- 8004358: b94b cbnz r3, 800436e <osMessageQueueDelete+0x1a>
- osStatus_t osMessageQueueDelete (osMessageQueueId_t mq_id) {
- 800435a: b510 push {r4, lr}
- 800435c: 4604 mov r4, r0
- stat = osErrorISR;
- }
- else if (hQueue == NULL) {
- 800435e: b148 cbz r0, 8004374 <osMessageQueueDelete+0x20>
- stat = osErrorParameter;
- }
- else {
- #if (configQUEUE_REGISTRY_SIZE > 0)
- vQueueUnregisterQueue (hQueue);
- 8004360: f001 f8f6 bl 8005550 <vQueueUnregisterQueue>
- #endif
- stat = osOK;
- vQueueDelete (hQueue);
- 8004364: 4620 mov r0, r4
- 8004366: f001 f909 bl 800557c <vQueueDelete>
- stat = osOK;
- 800436a: 2000 movs r0, #0
- #else
- stat = osError;
- #endif
- return (stat);
- }
- 800436c: bd10 pop {r4, pc}
- stat = osErrorISR;
- 800436e: f06f 0005 mvn.w r0, #5
- }
- 8004372: 4770 bx lr
- stat = osErrorParameter;
- 8004374: f06f 0003 mvn.w r0, #3
- return (stat);
- 8004378: e7f8 b.n 800436c <osMessageQueueDelete+0x18>
- ...
- 0800437c <vApplicationGetIdleTaskMemory>:
- __WEAK void vApplicationGetIdleTaskMemory (StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize) {
- /* Idle task control block and stack */
- static StaticTask_t Idle_TCB;
- static StackType_t Idle_Stack[configMINIMAL_STACK_SIZE];
- *ppxIdleTaskTCBBuffer = &Idle_TCB;
- 800437c: 4b03 ldr r3, [pc, #12] @ (800438c <vApplicationGetIdleTaskMemory+0x10>)
- 800437e: 6003 str r3, [r0, #0]
- *ppxIdleTaskStackBuffer = &Idle_Stack[0];
- 8004380: 4b03 ldr r3, [pc, #12] @ (8004390 <vApplicationGetIdleTaskMemory+0x14>)
- 8004382: 600b str r3, [r1, #0]
- *pulIdleTaskStackSize = (uint32_t)configMINIMAL_STACK_SIZE;
- 8004384: f44f 7300 mov.w r3, #512 @ 0x200
- 8004388: 6013 str r3, [r2, #0]
- }
- 800438a: 4770 bx lr
- 800438c: 240027b4 .word 0x240027b4
- 8004390: 24001fb4 .word 0x24001fb4
- 08004394 <vApplicationGetTimerTaskMemory>:
- __WEAK void vApplicationGetTimerTaskMemory (StaticTask_t **ppxTimerTaskTCBBuffer, StackType_t **ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize) {
- /* Timer task control block and stack */
- static StaticTask_t Timer_TCB;
- static StackType_t Timer_Stack[configTIMER_TASK_STACK_DEPTH];
- *ppxTimerTaskTCBBuffer = &Timer_TCB;
- 8004394: 4b03 ldr r3, [pc, #12] @ (80043a4 <vApplicationGetTimerTaskMemory+0x10>)
- 8004396: 6003 str r3, [r0, #0]
- *ppxTimerTaskStackBuffer = &Timer_Stack[0];
- 8004398: 4b03 ldr r3, [pc, #12] @ (80043a8 <vApplicationGetTimerTaskMemory+0x14>)
- 800439a: 600b str r3, [r1, #0]
- *pulTimerTaskStackSize = (uint32_t)configTIMER_TASK_STACK_DEPTH;
- 800439c: f44f 6380 mov.w r3, #1024 @ 0x400
- 80043a0: 6013 str r3, [r2, #0]
- }
- 80043a2: 4770 bx lr
- 80043a4: 24001f0c .word 0x24001f0c
- 80043a8: 24000f0c .word 0x24000f0c
- 080043ac <prvHeapInit>:
- uint8_t *pucAlignedHeap;
- size_t uxAddress;
- size_t xTotalHeapSize = configTOTAL_HEAP_SIZE;
- /* Ensure the heap starts on a correctly aligned boundary. */
- uxAddress = ( size_t ) ucHeap;
- 80043ac: 4a12 ldr r2, [pc, #72] @ (80043f8 <prvHeapInit+0x4c>)
- if( ( uxAddress & portBYTE_ALIGNMENT_MASK ) != 0 )
- 80043ae: f012 0f07 tst.w r2, #7
- 80043b2: d01e beq.n 80043f2 <prvHeapInit+0x46>
- {
- uxAddress += ( portBYTE_ALIGNMENT - 1 );
- 80043b4: 1dd1 adds r1, r2, #7
- uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
- 80043b6: f021 0107 bic.w r1, r1, #7
- xTotalHeapSize -= uxAddress - ( size_t ) ucHeap;
- 80043ba: f5c1 3380 rsb r3, r1, #65536 @ 0x10000
- 80043be: 4413 add r3, r2
- uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
- 80043c0: 460a mov r2, r1
- pucAlignedHeap = ( uint8_t * ) uxAddress;
- /* xStart is used to hold a pointer to the first item in the list of free
- blocks. The void cast is used to prevent compiler warnings. */
- xStart.pxNextFreeBlock = ( void * ) pucAlignedHeap;
- 80043c2: 480e ldr r0, [pc, #56] @ (80043fc <prvHeapInit+0x50>)
- 80043c4: 6002 str r2, [r0, #0]
- xStart.xBlockSize = ( size_t ) 0;
- 80043c6: 2100 movs r1, #0
- 80043c8: 6041 str r1, [r0, #4]
- /* pxEnd is used to mark the end of the list of free blocks and is inserted
- at the end of the heap space. */
- uxAddress = ( ( size_t ) pucAlignedHeap ) + xTotalHeapSize;
- 80043ca: 4413 add r3, r2
- uxAddress -= xHeapStructSize;
- 80043cc: 3b08 subs r3, #8
- uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
- 80043ce: f023 0307 bic.w r3, r3, #7
- pxEnd = ( void * ) uxAddress;
- 80043d2: 480b ldr r0, [pc, #44] @ (8004400 <prvHeapInit+0x54>)
- 80043d4: 6003 str r3, [r0, #0]
- pxEnd->xBlockSize = 0;
- 80043d6: 6059 str r1, [r3, #4]
- pxEnd->pxNextFreeBlock = NULL;
- 80043d8: 6019 str r1, [r3, #0]
- /* To start with there is a single free block that is sized to take up the
- entire heap space, minus the space taken by pxEnd. */
- pxFirstFreeBlock = ( void * ) pucAlignedHeap;
- pxFirstFreeBlock->xBlockSize = uxAddress - ( size_t ) pxFirstFreeBlock;
- 80043da: 1a99 subs r1, r3, r2
- 80043dc: 6051 str r1, [r2, #4]
- pxFirstFreeBlock->pxNextFreeBlock = pxEnd;
- 80043de: 6013 str r3, [r2, #0]
- /* Only one block exists - and it covers the entire usable heap space. */
- xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize;
- 80043e0: 4b08 ldr r3, [pc, #32] @ (8004404 <prvHeapInit+0x58>)
- 80043e2: 6019 str r1, [r3, #0]
- xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize;
- 80043e4: 4b08 ldr r3, [pc, #32] @ (8004408 <prvHeapInit+0x5c>)
- 80043e6: 6019 str r1, [r3, #0]
- /* Work out the position of the top bit in a size_t variable. */
- xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 );
- 80043e8: 4b08 ldr r3, [pc, #32] @ (800440c <prvHeapInit+0x60>)
- 80043ea: f04f 4200 mov.w r2, #2147483648 @ 0x80000000
- 80043ee: 601a str r2, [r3, #0]
- }
- 80043f0: 4770 bx lr
- size_t xTotalHeapSize = configTOTAL_HEAP_SIZE;
- 80043f2: f44f 3380 mov.w r3, #65536 @ 0x10000
- 80043f6: e7e4 b.n 80043c2 <prvHeapInit+0x16>
- 80043f8: 24002880 .word 0x24002880
- 80043fc: 24002878 .word 0x24002878
- 8004400: 24002874 .word 0x24002874
- 8004404: 2400286c .word 0x2400286c
- 8004408: 24002870 .word 0x24002870
- 800440c: 24002860 .word 0x24002860
- 08004410 <prvInsertBlockIntoFreeList>:
- BlockLink_t *pxIterator;
- uint8_t *puc;
- /* Iterate through the list until a block is found that has a higher address
- than the block being inserted. */
- for( pxIterator = &xStart; pxIterator->pxNextFreeBlock < pxBlockToInsert; pxIterator = pxIterator->pxNextFreeBlock )
- 8004410: 4b16 ldr r3, [pc, #88] @ (800446c <prvInsertBlockIntoFreeList+0x5c>)
- 8004412: 461a mov r2, r3
- 8004414: 681b ldr r3, [r3, #0]
- 8004416: 4283 cmp r3, r0
- 8004418: d3fb bcc.n 8004412 <prvInsertBlockIntoFreeList+0x2>
- }
- /* Do the block being inserted, and the block it is being inserted after
- make a contiguous block of memory? */
- puc = ( uint8_t * ) pxIterator;
- if( ( puc + pxIterator->xBlockSize ) == ( uint8_t * ) pxBlockToInsert )
- 800441a: 6851 ldr r1, [r2, #4]
- 800441c: eb02 0c01 add.w ip, r2, r1
- 8004420: 4584 cmp ip, r0
- 8004422: d009 beq.n 8004438 <prvInsertBlockIntoFreeList+0x28>
- }
- /* Do the block being inserted, and the block it is being inserted before
- make a contiguous block of memory? */
- puc = ( uint8_t * ) pxBlockToInsert;
- if( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock )
- 8004424: 6841 ldr r1, [r0, #4]
- 8004426: eb00 0c01 add.w ip, r0, r1
- 800442a: 4563 cmp r3, ip
- 800442c: d009 beq.n 8004442 <prvInsertBlockIntoFreeList+0x32>
- pxBlockToInsert->pxNextFreeBlock = pxEnd;
- }
- }
- else
- {
- pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock;
- 800442e: 6003 str r3, [r0, #0]
- /* If the block being inserted plugged a gab, so was merged with the block
- before and the block after, then it's pxNextFreeBlock pointer will have
- already been set, and should not be set here as that would make it point
- to itself. */
- if( pxIterator != pxBlockToInsert )
- 8004430: 4290 cmp r0, r2
- 8004432: d019 beq.n 8004468 <prvInsertBlockIntoFreeList+0x58>
- {
- pxIterator->pxNextFreeBlock = pxBlockToInsert;
- 8004434: 6010 str r0, [r2, #0]
- }
- else
- {
- mtCOVERAGE_TEST_MARKER();
- 8004436: 4770 bx lr
- pxIterator->xBlockSize += pxBlockToInsert->xBlockSize;
- 8004438: 6840 ldr r0, [r0, #4]
- 800443a: 4401 add r1, r0
- 800443c: 6051 str r1, [r2, #4]
- pxBlockToInsert = pxIterator;
- 800443e: 4610 mov r0, r2
- 8004440: e7f0 b.n 8004424 <prvInsertBlockIntoFreeList+0x14>
- {
- 8004442: b410 push {r4}
- if( pxIterator->pxNextFreeBlock != pxEnd )
- 8004444: 4c0a ldr r4, [pc, #40] @ (8004470 <prvInsertBlockIntoFreeList+0x60>)
- 8004446: 6824 ldr r4, [r4, #0]
- 8004448: 42a3 cmp r3, r4
- 800444a: d00b beq.n 8004464 <prvInsertBlockIntoFreeList+0x54>
- pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize;
- 800444c: 685b ldr r3, [r3, #4]
- 800444e: 4419 add r1, r3
- 8004450: 6041 str r1, [r0, #4]
- pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock;
- 8004452: 6813 ldr r3, [r2, #0]
- 8004454: 681b ldr r3, [r3, #0]
- 8004456: 6003 str r3, [r0, #0]
- if( pxIterator != pxBlockToInsert )
- 8004458: 4290 cmp r0, r2
- 800445a: d000 beq.n 800445e <prvInsertBlockIntoFreeList+0x4e>
- pxIterator->pxNextFreeBlock = pxBlockToInsert;
- 800445c: 6010 str r0, [r2, #0]
- }
- }
- 800445e: f85d 4b04 ldr.w r4, [sp], #4
- 8004462: 4770 bx lr
- pxBlockToInsert->pxNextFreeBlock = pxEnd;
- 8004464: 6004 str r4, [r0, #0]
- 8004466: e7f7 b.n 8004458 <prvInsertBlockIntoFreeList+0x48>
- 8004468: 4770 bx lr
- 800446a: bf00 nop
- 800446c: 24002878 .word 0x24002878
- 8004470: 24002874 .word 0x24002874
- 08004474 <pvPortMalloc>:
- {
- 8004474: b538 push {r3, r4, r5, lr}
- 8004476: 4604 mov r4, r0
- vTaskSuspendAll();
- 8004478: f001 fb22 bl 8005ac0 <vTaskSuspendAll>
- if( pxEnd == NULL )
- 800447c: 4b38 ldr r3, [pc, #224] @ (8004560 <pvPortMalloc+0xec>)
- 800447e: 681b ldr r3, [r3, #0]
- 8004480: b1b3 cbz r3, 80044b0 <pvPortMalloc+0x3c>
- if( ( xWantedSize & xBlockAllocatedBit ) == 0 )
- 8004482: 4b38 ldr r3, [pc, #224] @ (8004564 <pvPortMalloc+0xf0>)
- 8004484: 681b ldr r3, [r3, #0]
- 8004486: 421c tst r4, r3
- 8004488: d150 bne.n 800452c <pvPortMalloc+0xb8>
- if( xWantedSize > 0 )
- 800448a: 2c00 cmp r4, #0
- 800448c: d050 beq.n 8004530 <pvPortMalloc+0xbc>
- xWantedSize += xHeapStructSize;
- 800448e: f104 0208 add.w r2, r4, #8
- if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 )
- 8004492: f014 0f07 tst.w r4, #7
- 8004496: d002 beq.n 800449e <pvPortMalloc+0x2a>
- xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );
- 8004498: f022 0207 bic.w r2, r2, #7
- 800449c: 3208 adds r2, #8
- if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) )
- 800449e: 2a00 cmp r2, #0
- 80044a0: d055 beq.n 800454e <pvPortMalloc+0xda>
- 80044a2: 4b31 ldr r3, [pc, #196] @ (8004568 <pvPortMalloc+0xf4>)
- 80044a4: 681b ldr r3, [r3, #0]
- 80044a6: 4293 cmp r3, r2
- 80044a8: d353 bcc.n 8004552 <pvPortMalloc+0xde>
- pxBlock = xStart.pxNextFreeBlock;
- 80044aa: 4930 ldr r1, [pc, #192] @ (800456c <pvPortMalloc+0xf8>)
- 80044ac: 680c ldr r4, [r1, #0]
- while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) )
- 80044ae: e004 b.n 80044ba <pvPortMalloc+0x46>
- prvHeapInit();
- 80044b0: f7ff ff7c bl 80043ac <prvHeapInit>
- 80044b4: e7e5 b.n 8004482 <pvPortMalloc+0xe>
- pxPreviousBlock = pxBlock;
- 80044b6: 4621 mov r1, r4
- pxBlock = pxBlock->pxNextFreeBlock;
- 80044b8: 461c mov r4, r3
- while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) )
- 80044ba: 6863 ldr r3, [r4, #4]
- 80044bc: 4293 cmp r3, r2
- 80044be: d202 bcs.n 80044c6 <pvPortMalloc+0x52>
- 80044c0: 6823 ldr r3, [r4, #0]
- 80044c2: 2b00 cmp r3, #0
- 80044c4: d1f7 bne.n 80044b6 <pvPortMalloc+0x42>
- if( pxBlock != pxEnd )
- 80044c6: 4b26 ldr r3, [pc, #152] @ (8004560 <pvPortMalloc+0xec>)
- 80044c8: 681b ldr r3, [r3, #0]
- 80044ca: 42a3 cmp r3, r4
- 80044cc: d043 beq.n 8004556 <pvPortMalloc+0xe2>
- pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize );
- 80044ce: 680d ldr r5, [r1, #0]
- 80044d0: 3508 adds r5, #8
- pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock;
- 80044d2: 6823 ldr r3, [r4, #0]
- 80044d4: 600b str r3, [r1, #0]
- if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE )
- 80044d6: 6863 ldr r3, [r4, #4]
- 80044d8: 1a9b subs r3, r3, r2
- 80044da: 2b10 cmp r3, #16
- 80044dc: d910 bls.n 8004500 <pvPortMalloc+0x8c>
- pxNewBlockLink = ( void * ) ( ( ( uint8_t * ) pxBlock ) + xWantedSize );
- 80044de: 18a0 adds r0, r4, r2
- configASSERT( ( ( ( size_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 );
- 80044e0: f010 0f07 tst.w r0, #7
- 80044e4: d008 beq.n 80044f8 <pvPortMalloc+0x84>
- portFORCE_INLINE static void vPortRaiseBASEPRI( void )
- {
- uint32_t ulNewBASEPRI;
- __asm volatile
- 80044e6: f04f 0350 mov.w r3, #80 @ 0x50
- 80044ea: f383 8811 msr BASEPRI, r3
- 80044ee: f3bf 8f6f isb sy
- 80044f2: f3bf 8f4f dsb sy
- 80044f6: e7fe b.n 80044f6 <pvPortMalloc+0x82>
- pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize;
- 80044f8: 6043 str r3, [r0, #4]
- pxBlock->xBlockSize = xWantedSize;
- 80044fa: 6062 str r2, [r4, #4]
- prvInsertBlockIntoFreeList( pxNewBlockLink );
- 80044fc: f7ff ff88 bl 8004410 <prvInsertBlockIntoFreeList>
- xFreeBytesRemaining -= pxBlock->xBlockSize;
- 8004500: 6862 ldr r2, [r4, #4]
- 8004502: 4919 ldr r1, [pc, #100] @ (8004568 <pvPortMalloc+0xf4>)
- 8004504: 680b ldr r3, [r1, #0]
- 8004506: 1a9b subs r3, r3, r2
- 8004508: 600b str r3, [r1, #0]
- if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining )
- 800450a: 4919 ldr r1, [pc, #100] @ (8004570 <pvPortMalloc+0xfc>)
- 800450c: 6809 ldr r1, [r1, #0]
- 800450e: 428b cmp r3, r1
- 8004510: d201 bcs.n 8004516 <pvPortMalloc+0xa2>
- xMinimumEverFreeBytesRemaining = xFreeBytesRemaining;
- 8004512: 4917 ldr r1, [pc, #92] @ (8004570 <pvPortMalloc+0xfc>)
- 8004514: 600b str r3, [r1, #0]
- pxBlock->xBlockSize |= xBlockAllocatedBit;
- 8004516: 4b13 ldr r3, [pc, #76] @ (8004564 <pvPortMalloc+0xf0>)
- 8004518: 681b ldr r3, [r3, #0]
- 800451a: 4313 orrs r3, r2
- 800451c: 6063 str r3, [r4, #4]
- pxBlock->pxNextFreeBlock = NULL;
- 800451e: 2300 movs r3, #0
- 8004520: 6023 str r3, [r4, #0]
- xNumberOfSuccessfulAllocations++;
- 8004522: 4a14 ldr r2, [pc, #80] @ (8004574 <pvPortMalloc+0x100>)
- 8004524: 6813 ldr r3, [r2, #0]
- 8004526: 3301 adds r3, #1
- 8004528: 6013 str r3, [r2, #0]
- 800452a: e002 b.n 8004532 <pvPortMalloc+0xbe>
- void *pvReturn = NULL;
- 800452c: 2500 movs r5, #0
- 800452e: e000 b.n 8004532 <pvPortMalloc+0xbe>
- 8004530: 2500 movs r5, #0
- ( void ) xTaskResumeAll();
- 8004532: f001 fb67 bl 8005c04 <xTaskResumeAll>
- configASSERT( ( ( ( size_t ) pvReturn ) & ( size_t ) portBYTE_ALIGNMENT_MASK ) == 0 );
- 8004536: f015 0f07 tst.w r5, #7
- 800453a: d00e beq.n 800455a <pvPortMalloc+0xe6>
- 800453c: f04f 0350 mov.w r3, #80 @ 0x50
- 8004540: f383 8811 msr BASEPRI, r3
- 8004544: f3bf 8f6f isb sy
- 8004548: f3bf 8f4f dsb sy
- 800454c: e7fe b.n 800454c <pvPortMalloc+0xd8>
- void *pvReturn = NULL;
- 800454e: 2500 movs r5, #0
- 8004550: e7ef b.n 8004532 <pvPortMalloc+0xbe>
- 8004552: 2500 movs r5, #0
- 8004554: e7ed b.n 8004532 <pvPortMalloc+0xbe>
- 8004556: 2500 movs r5, #0
- 8004558: e7eb b.n 8004532 <pvPortMalloc+0xbe>
- }
- 800455a: 4628 mov r0, r5
- 800455c: bd38 pop {r3, r4, r5, pc}
- 800455e: bf00 nop
- 8004560: 24002874 .word 0x24002874
- 8004564: 24002860 .word 0x24002860
- 8004568: 24002870 .word 0x24002870
- 800456c: 24002878 .word 0x24002878
- 8004570: 2400286c .word 0x2400286c
- 8004574: 24002868 .word 0x24002868
- 08004578 <vPortFree>:
- if( pv != NULL )
- 8004578: 2800 cmp r0, #0
- 800457a: d034 beq.n 80045e6 <vPortFree+0x6e>
- {
- 800457c: b538 push {r3, r4, r5, lr}
- 800457e: 4604 mov r4, r0
- puc -= xHeapStructSize;
- 8004580: f1a0 0508 sub.w r5, r0, #8
- configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 );
- 8004584: f850 3c04 ldr.w r3, [r0, #-4]
- 8004588: 4a17 ldr r2, [pc, #92] @ (80045e8 <vPortFree+0x70>)
- 800458a: 6812 ldr r2, [r2, #0]
- 800458c: 4213 tst r3, r2
- 800458e: d108 bne.n 80045a2 <vPortFree+0x2a>
- 8004590: f04f 0350 mov.w r3, #80 @ 0x50
- 8004594: f383 8811 msr BASEPRI, r3
- 8004598: f3bf 8f6f isb sy
- 800459c: f3bf 8f4f dsb sy
- 80045a0: e7fe b.n 80045a0 <vPortFree+0x28>
- configASSERT( pxLink->pxNextFreeBlock == NULL );
- 80045a2: f850 1c08 ldr.w r1, [r0, #-8]
- 80045a6: b141 cbz r1, 80045ba <vPortFree+0x42>
- 80045a8: f04f 0350 mov.w r3, #80 @ 0x50
- 80045ac: f383 8811 msr BASEPRI, r3
- 80045b0: f3bf 8f6f isb sy
- 80045b4: f3bf 8f4f dsb sy
- 80045b8: e7fe b.n 80045b8 <vPortFree+0x40>
- pxLink->xBlockSize &= ~xBlockAllocatedBit;
- 80045ba: ea23 0302 bic.w r3, r3, r2
- 80045be: f840 3c04 str.w r3, [r0, #-4]
- vTaskSuspendAll();
- 80045c2: f001 fa7d bl 8005ac0 <vTaskSuspendAll>
- xFreeBytesRemaining += pxLink->xBlockSize;
- 80045c6: f854 1c04 ldr.w r1, [r4, #-4]
- 80045ca: 4a08 ldr r2, [pc, #32] @ (80045ec <vPortFree+0x74>)
- 80045cc: 6813 ldr r3, [r2, #0]
- 80045ce: 440b add r3, r1
- 80045d0: 6013 str r3, [r2, #0]
- prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) );
- 80045d2: 4628 mov r0, r5
- 80045d4: f7ff ff1c bl 8004410 <prvInsertBlockIntoFreeList>
- xNumberOfSuccessfulFrees++;
- 80045d8: 4a05 ldr r2, [pc, #20] @ (80045f0 <vPortFree+0x78>)
- 80045da: 6813 ldr r3, [r2, #0]
- 80045dc: 3301 adds r3, #1
- 80045de: 6013 str r3, [r2, #0]
- ( void ) xTaskResumeAll();
- 80045e0: f001 fb10 bl 8005c04 <xTaskResumeAll>
- }
- 80045e4: bd38 pop {r3, r4, r5, pc}
- 80045e6: 4770 bx lr
- 80045e8: 24002860 .word 0x24002860
- 80045ec: 24002870 .word 0x24002870
- 80045f0: 24002864 .word 0x24002864
- 080045f4 <vListInitialise>:
- void vListInitialise( List_t * const pxList )
- {
- /* The list structure contains a list item which is used to mark the
- end of the list. To initialise the list the list end is inserted
- as the only list entry. */
- pxList->pxIndex = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */
- 80045f4: f100 0308 add.w r3, r0, #8
- 80045f8: 6043 str r3, [r0, #4]
- /* The list end value is the highest possible value in the list to
- ensure it remains at the end of the list. */
- pxList->xListEnd.xItemValue = portMAX_DELAY;
- 80045fa: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff
- 80045fe: 6082 str r2, [r0, #8]
- /* The list end next and previous pointers point to itself so we know
- when the list is empty. */
- pxList->xListEnd.pxNext = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */
- 8004600: 60c3 str r3, [r0, #12]
- pxList->xListEnd.pxPrevious = ( ListItem_t * ) &( pxList->xListEnd );/*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */
- 8004602: 6103 str r3, [r0, #16]
- pxList->uxNumberOfItems = ( UBaseType_t ) 0U;
- 8004604: 2300 movs r3, #0
- 8004606: 6003 str r3, [r0, #0]
- /* Write known values into the list if
- configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
- listSET_LIST_INTEGRITY_CHECK_1_VALUE( pxList );
- listSET_LIST_INTEGRITY_CHECK_2_VALUE( pxList );
- }
- 8004608: 4770 bx lr
- 0800460a <vListInitialiseItem>:
- /*-----------------------------------------------------------*/
- void vListInitialiseItem( ListItem_t * const pxItem )
- {
- /* Make sure the list item is not recorded as being on a list. */
- pxItem->pxContainer = NULL;
- 800460a: 2300 movs r3, #0
- 800460c: 6103 str r3, [r0, #16]
- /* Write known values into the list item if
- configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
- listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem );
- listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem );
- }
- 800460e: 4770 bx lr
- 08004610 <vListInsertEnd>:
- /*-----------------------------------------------------------*/
- void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem )
- {
- ListItem_t * const pxIndex = pxList->pxIndex;
- 8004610: 6843 ldr r3, [r0, #4]
- listTEST_LIST_ITEM_INTEGRITY( pxNewListItem );
- /* Insert a new list item into pxList, but rather than sort the list,
- makes the new list item the last item to be removed by a call to
- listGET_OWNER_OF_NEXT_ENTRY(). */
- pxNewListItem->pxNext = pxIndex;
- 8004612: 604b str r3, [r1, #4]
- pxNewListItem->pxPrevious = pxIndex->pxPrevious;
- 8004614: 689a ldr r2, [r3, #8]
- 8004616: 608a str r2, [r1, #8]
- /* Only used during decision coverage testing. */
- mtCOVERAGE_TEST_DELAY();
- pxIndex->pxPrevious->pxNext = pxNewListItem;
- 8004618: 6051 str r1, [r2, #4]
- pxIndex->pxPrevious = pxNewListItem;
- 800461a: 6099 str r1, [r3, #8]
- /* Remember which list the item is in. */
- pxNewListItem->pxContainer = pxList;
- 800461c: 6108 str r0, [r1, #16]
- ( pxList->uxNumberOfItems )++;
- 800461e: 6803 ldr r3, [r0, #0]
- 8004620: 3301 adds r3, #1
- 8004622: 6003 str r3, [r0, #0]
- }
- 8004624: 4770 bx lr
- 08004626 <vListInsert>:
- /*-----------------------------------------------------------*/
- void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem )
- {
- 8004626: b430 push {r4, r5}
- ListItem_t *pxIterator;
- const TickType_t xValueOfInsertion = pxNewListItem->xItemValue;
- 8004628: 680d ldr r5, [r1, #0]
- new list item should be placed after it. This ensures that TCBs which are
- stored in ready lists (all of which have the same xItemValue value) get a
- share of the CPU. However, if the xItemValue is the same as the back marker
- the iteration loop below will not end. Therefore the value is checked
- first, and the algorithm slightly modified if necessary. */
- if( xValueOfInsertion == portMAX_DELAY )
- 800462a: f1b5 3fff cmp.w r5, #4294967295 @ 0xffffffff
- 800462e: d011 beq.n 8004654 <vListInsert+0x2e>
- 4) Using a queue or semaphore before it has been initialised or
- before the scheduler has been started (are interrupts firing
- before vTaskStartScheduler() has been called?).
- **********************************************************************/
- for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext ) /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. *//*lint !e440 The iterator moves to a different value, not xValueOfInsertion. */
- 8004630: f100 0308 add.w r3, r0, #8
- 8004634: 461c mov r4, r3
- 8004636: 685b ldr r3, [r3, #4]
- 8004638: 681a ldr r2, [r3, #0]
- 800463a: 42aa cmp r2, r5
- 800463c: d9fa bls.n 8004634 <vListInsert+0xe>
- /* There is nothing to do here, just iterating to the wanted
- insertion position. */
- }
- }
- pxNewListItem->pxNext = pxIterator->pxNext;
- 800463e: 6863 ldr r3, [r4, #4]
- 8004640: 604b str r3, [r1, #4]
- pxNewListItem->pxNext->pxPrevious = pxNewListItem;
- 8004642: 6099 str r1, [r3, #8]
- pxNewListItem->pxPrevious = pxIterator;
- 8004644: 608c str r4, [r1, #8]
- pxIterator->pxNext = pxNewListItem;
- 8004646: 6061 str r1, [r4, #4]
- /* Remember which list the item is in. This allows fast removal of the
- item later. */
- pxNewListItem->pxContainer = pxList;
- 8004648: 6108 str r0, [r1, #16]
- ( pxList->uxNumberOfItems )++;
- 800464a: 6803 ldr r3, [r0, #0]
- 800464c: 3301 adds r3, #1
- 800464e: 6003 str r3, [r0, #0]
- }
- 8004650: bc30 pop {r4, r5}
- 8004652: 4770 bx lr
- pxIterator = pxList->xListEnd.pxPrevious;
- 8004654: 6904 ldr r4, [r0, #16]
- 8004656: e7f2 b.n 800463e <vListInsert+0x18>
- 08004658 <uxListRemove>:
- UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
- {
- /* The list item knows which list it is in. Obtain the list from the list
- item. */
- List_t * const pxList = pxItemToRemove->pxContainer;
- 8004658: 6903 ldr r3, [r0, #16]
- pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious;
- 800465a: 6841 ldr r1, [r0, #4]
- 800465c: 6882 ldr r2, [r0, #8]
- 800465e: 608a str r2, [r1, #8]
- pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext;
- 8004660: 6841 ldr r1, [r0, #4]
- 8004662: 6051 str r1, [r2, #4]
- /* Only used during decision coverage testing. */
- mtCOVERAGE_TEST_DELAY();
- /* Make sure the index is left pointing to a valid item. */
- if( pxList->pxIndex == pxItemToRemove )
- 8004664: 685a ldr r2, [r3, #4]
- 8004666: 4282 cmp r2, r0
- 8004668: d006 beq.n 8004678 <uxListRemove+0x20>
- else
- {
- mtCOVERAGE_TEST_MARKER();
- }
- pxItemToRemove->pxContainer = NULL;
- 800466a: 2200 movs r2, #0
- 800466c: 6102 str r2, [r0, #16]
- ( pxList->uxNumberOfItems )--;
- 800466e: 681a ldr r2, [r3, #0]
- 8004670: 3a01 subs r2, #1
- 8004672: 601a str r2, [r3, #0]
- return pxList->uxNumberOfItems;
- 8004674: 6818 ldr r0, [r3, #0]
- }
- 8004676: 4770 bx lr
- pxList->pxIndex = pxItemToRemove->pxPrevious;
- 8004678: 6882 ldr r2, [r0, #8]
- 800467a: 605a str r2, [r3, #4]
- 800467c: e7f5 b.n 800466a <uxListRemove+0x12>
- ...
- 08004680 <prvTaskExitError>:
- return pxTopOfStack;
- }
- /*-----------------------------------------------------------*/
- static void prvTaskExitError( void )
- {
- 8004680: b082 sub sp, #8
- volatile uint32_t ulDummy = 0;
- 8004682: 2300 movs r3, #0
- 8004684: 9301 str r3, [sp, #4]
- its caller as there is nothing to return to. If a task wants to exit it
- should instead call vTaskDelete( NULL ).
- Artificially force an assert() to be triggered if configASSERT() is
- defined, then stop here so application writers can catch the error. */
- configASSERT( uxCriticalNesting == ~0UL );
- 8004686: 4b0d ldr r3, [pc, #52] @ (80046bc <prvTaskExitError+0x3c>)
- 8004688: 681b ldr r3, [r3, #0]
- 800468a: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
- 800468e: d008 beq.n 80046a2 <prvTaskExitError+0x22>
- 8004690: f04f 0350 mov.w r3, #80 @ 0x50
- 8004694: f383 8811 msr BASEPRI, r3
- 8004698: f3bf 8f6f isb sy
- 800469c: f3bf 8f4f dsb sy
- 80046a0: e7fe b.n 80046a0 <prvTaskExitError+0x20>
- 80046a2: f04f 0350 mov.w r3, #80 @ 0x50
- 80046a6: f383 8811 msr BASEPRI, r3
- 80046aa: f3bf 8f6f isb sy
- 80046ae: f3bf 8f4f dsb sy
- portDISABLE_INTERRUPTS();
- while( ulDummy == 0 )
- 80046b2: 9b01 ldr r3, [sp, #4]
- 80046b4: 2b00 cmp r3, #0
- 80046b6: d0fc beq.n 80046b2 <prvTaskExitError+0x32>
- about code appearing after this function is called - making ulDummy
- volatile makes the compiler think the function could return and
- therefore not output an 'unreachable code' warning for code that appears
- after it. */
- }
- }
- 80046b8: b002 add sp, #8
- 80046ba: 4770 bx lr
- 80046bc: 24000024 .word 0x24000024
- 080046c0 <prvPortStartFirstTask>:
- {
- /* Start the first task. This also clears the bit that indicates the FPU is
- in use in case the FPU was used before the scheduler was started - which
- would otherwise result in the unnecessary leaving of space in the SVC stack
- for lazy saving of FPU registers. */
- __asm volatile(
- 80046c0: 4808 ldr r0, [pc, #32] @ (80046e4 <prvPortStartFirstTask+0x24>)
- 80046c2: 6800 ldr r0, [r0, #0]
- 80046c4: 6800 ldr r0, [r0, #0]
- 80046c6: f380 8808 msr MSP, r0
- 80046ca: f04f 0000 mov.w r0, #0
- 80046ce: f380 8814 msr CONTROL, r0
- 80046d2: b662 cpsie i
- 80046d4: b661 cpsie f
- 80046d6: f3bf 8f4f dsb sy
- 80046da: f3bf 8f6f isb sy
- 80046de: df00 svc 0
- 80046e0: bf00 nop
- " dsb \n"
- " isb \n"
- " svc 0 \n" /* System call to start first task. */
- " nop \n"
- );
- }
- 80046e2: 0000 .short 0x0000
- 80046e4: e000ed08 .word 0xe000ed08
- 080046e8 <vPortEnableVFP>:
- /*-----------------------------------------------------------*/
- /* This is a naked function. */
- static void vPortEnableVFP( void )
- {
- __asm volatile
- 80046e8: f8df 000c ldr.w r0, [pc, #12] @ 80046f8 <vPortEnableVFP+0x10>
- 80046ec: 6801 ldr r1, [r0, #0]
- 80046ee: f441 0170 orr.w r1, r1, #15728640 @ 0xf00000
- 80046f2: 6001 str r1, [r0, #0]
- 80046f4: 4770 bx lr
- " \n"
- " orr r1, r1, #( 0xf << 20 ) \n" /* Enable CP10 and CP11 coprocessors, then save back. */
- " str r1, [r0] \n"
- " bx r14 "
- );
- }
- 80046f6: 0000 .short 0x0000
- 80046f8: e000ed88 .word 0xe000ed88
- 080046fc <pxPortInitialiseStack>:
- *pxTopOfStack = portINITIAL_XPSR; /* xPSR */
- 80046fc: f04f 7380 mov.w r3, #16777216 @ 0x1000000
- 8004700: f840 3c04 str.w r3, [r0, #-4]
- *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */
- 8004704: f021 0101 bic.w r1, r1, #1
- 8004708: f840 1c08 str.w r1, [r0, #-8]
- *pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */
- 800470c: 4b05 ldr r3, [pc, #20] @ (8004724 <pxPortInitialiseStack+0x28>)
- 800470e: f840 3c0c str.w r3, [r0, #-12]
- *pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */
- 8004712: f840 2c20 str.w r2, [r0, #-32]
- *pxTopOfStack = portINITIAL_EXC_RETURN;
- 8004716: f06f 0302 mvn.w r3, #2
- 800471a: f840 3c24 str.w r3, [r0, #-36]
- }
- 800471e: 3844 subs r0, #68 @ 0x44
- 8004720: 4770 bx lr
- 8004722: bf00 nop
- 8004724: 08004681 .word 0x08004681
- ...
- 08004730 <SVC_Handler>:
- __asm volatile (
- 8004730: 4b07 ldr r3, [pc, #28] @ (8004750 <pxCurrentTCBConst2>)
- 8004732: 6819 ldr r1, [r3, #0]
- 8004734: 6808 ldr r0, [r1, #0]
- 8004736: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 800473a: f380 8809 msr PSP, r0
- 800473e: f3bf 8f6f isb sy
- 8004742: f04f 0000 mov.w r0, #0
- 8004746: f380 8811 msr BASEPRI, r0
- 800474a: 4770 bx lr
- 800474c: f3af 8000 nop.w
- 08004750 <pxCurrentTCBConst2>:
- 8004750: 24012dc4 .word 0x24012dc4
- 08004754 <vPortEnterCritical>:
- 8004754: f04f 0350 mov.w r3, #80 @ 0x50
- 8004758: f383 8811 msr BASEPRI, r3
- 800475c: f3bf 8f6f isb sy
- 8004760: f3bf 8f4f dsb sy
- uxCriticalNesting++;
- 8004764: 4a0b ldr r2, [pc, #44] @ (8004794 <vPortEnterCritical+0x40>)
- 8004766: 6813 ldr r3, [r2, #0]
- 8004768: 3301 adds r3, #1
- 800476a: 6013 str r3, [r2, #0]
- if( uxCriticalNesting == 1 )
- 800476c: 2b01 cmp r3, #1
- 800476e: d000 beq.n 8004772 <vPortEnterCritical+0x1e>
- }
- 8004770: 4770 bx lr
- configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 );
- 8004772: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 8004776: f8d3 3d04 ldr.w r3, [r3, #3332] @ 0xd04
- 800477a: f013 0fff tst.w r3, #255 @ 0xff
- 800477e: d0f7 beq.n 8004770 <vPortEnterCritical+0x1c>
- 8004780: f04f 0350 mov.w r3, #80 @ 0x50
- 8004784: f383 8811 msr BASEPRI, r3
- 8004788: f3bf 8f6f isb sy
- 800478c: f3bf 8f4f dsb sy
- 8004790: e7fe b.n 8004790 <vPortEnterCritical+0x3c>
- 8004792: bf00 nop
- 8004794: 24000024 .word 0x24000024
- 08004798 <vPortExitCritical>:
- configASSERT( uxCriticalNesting );
- 8004798: 4b09 ldr r3, [pc, #36] @ (80047c0 <vPortExitCritical+0x28>)
- 800479a: 681b ldr r3, [r3, #0]
- 800479c: b943 cbnz r3, 80047b0 <vPortExitCritical+0x18>
- 800479e: f04f 0350 mov.w r3, #80 @ 0x50
- 80047a2: f383 8811 msr BASEPRI, r3
- 80047a6: f3bf 8f6f isb sy
- 80047aa: f3bf 8f4f dsb sy
- 80047ae: e7fe b.n 80047ae <vPortExitCritical+0x16>
- uxCriticalNesting--;
- 80047b0: 3b01 subs r3, #1
- 80047b2: 4a03 ldr r2, [pc, #12] @ (80047c0 <vPortExitCritical+0x28>)
- 80047b4: 6013 str r3, [r2, #0]
- if( uxCriticalNesting == 0 )
- 80047b6: b90b cbnz r3, 80047bc <vPortExitCritical+0x24>
- }
- /*-----------------------------------------------------------*/
- portFORCE_INLINE static void vPortSetBASEPRI( uint32_t ulNewMaskValue )
- {
- __asm volatile
- 80047b8: f383 8811 msr BASEPRI, r3
- }
- 80047bc: 4770 bx lr
- 80047be: bf00 nop
- 80047c0: 24000024 .word 0x24000024
- ...
- 080047d0 <PendSV_Handler>:
- __asm volatile
- 80047d0: f3ef 8009 mrs r0, PSP
- 80047d4: f3bf 8f6f isb sy
- 80047d8: 4b15 ldr r3, [pc, #84] @ (8004830 <pxCurrentTCBConst>)
- 80047da: 681a ldr r2, [r3, #0]
- 80047dc: f01e 0f10 tst.w lr, #16
- 80047e0: bf08 it eq
- 80047e2: ed20 8a10 vstmdbeq r0!, {s16-s31}
- 80047e6: e920 4ff0 stmdb r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 80047ea: 6010 str r0, [r2, #0]
- 80047ec: e92d 0009 stmdb sp!, {r0, r3}
- 80047f0: f04f 0050 mov.w r0, #80 @ 0x50
- 80047f4: f380 8811 msr BASEPRI, r0
- 80047f8: f3bf 8f4f dsb sy
- 80047fc: f3bf 8f6f isb sy
- 8004800: f001 faa2 bl 8005d48 <vTaskSwitchContext>
- 8004804: f04f 0000 mov.w r0, #0
- 8004808: f380 8811 msr BASEPRI, r0
- 800480c: bc09 pop {r0, r3}
- 800480e: 6819 ldr r1, [r3, #0]
- 8004810: 6808 ldr r0, [r1, #0]
- 8004812: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 8004816: f01e 0f10 tst.w lr, #16
- 800481a: bf08 it eq
- 800481c: ecb0 8a10 vldmiaeq r0!, {s16-s31}
- 8004820: f380 8809 msr PSP, r0
- 8004824: f3bf 8f6f isb sy
- 8004828: 4770 bx lr
- 800482a: bf00 nop
- 800482c: f3af 8000 nop.w
- 08004830 <pxCurrentTCBConst>:
- 8004830: 24012dc4 .word 0x24012dc4
- 08004834 <xPortSysTickHandler>:
- {
- 8004834: b508 push {r3, lr}
- __asm volatile
- 8004836: f04f 0350 mov.w r3, #80 @ 0x50
- 800483a: f383 8811 msr BASEPRI, r3
- 800483e: f3bf 8f6f isb sy
- 8004842: f3bf 8f4f dsb sy
- if( xTaskIncrementTick() != pdFALSE )
- 8004846: f001 f951 bl 8005aec <xTaskIncrementTick>
- 800484a: b128 cbz r0, 8004858 <xPortSysTickHandler+0x24>
- portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
- 800484c: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 8004850: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 8004854: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- __asm volatile
- 8004858: 2300 movs r3, #0
- 800485a: f383 8811 msr BASEPRI, r3
- }
- 800485e: bd08 pop {r3, pc}
- 08004860 <vPortSetupTimerInterrupt>:
- portNVIC_SYSTICK_CTRL_REG = 0UL;
- 8004860: f04f 22e0 mov.w r2, #3758153728 @ 0xe000e000
- 8004864: 2300 movs r3, #0
- 8004866: 6113 str r3, [r2, #16]
- portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;
- 8004868: 6193 str r3, [r2, #24]
- portNVIC_SYSTICK_LOAD_REG = ( configSYSTICK_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL;
- 800486a: 4b05 ldr r3, [pc, #20] @ (8004880 <vPortSetupTimerInterrupt+0x20>)
- 800486c: 681b ldr r3, [r3, #0]
- 800486e: 4905 ldr r1, [pc, #20] @ (8004884 <vPortSetupTimerInterrupt+0x24>)
- 8004870: fba1 1303 umull r1, r3, r1, r3
- 8004874: 099b lsrs r3, r3, #6
- 8004876: 3b01 subs r3, #1
- 8004878: 6153 str r3, [r2, #20]
- portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT );
- 800487a: 2307 movs r3, #7
- 800487c: 6113 str r3, [r2, #16]
- }
- 800487e: 4770 bx lr
- 8004880: 24000004 .word 0x24000004
- 8004884: 10624dd3 .word 0x10624dd3
- 08004888 <xPortStartScheduler>:
- configASSERT( portCPUID != portCORTEX_M7_r0p1_ID );
- 8004888: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 800488c: f8d3 2d00 ldr.w r2, [r3, #3328] @ 0xd00
- 8004890: 4b3d ldr r3, [pc, #244] @ (8004988 <xPortStartScheduler+0x100>)
- 8004892: 429a cmp r2, r3
- 8004894: d01c beq.n 80048d0 <xPortStartScheduler+0x48>
- configASSERT( portCPUID != portCORTEX_M7_r0p0_ID );
- 8004896: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 800489a: f8d3 2d00 ldr.w r2, [r3, #3328] @ 0xd00
- 800489e: 4b3b ldr r3, [pc, #236] @ (800498c <xPortStartScheduler+0x104>)
- 80048a0: 429a cmp r2, r3
- 80048a2: d01e beq.n 80048e2 <xPortStartScheduler+0x5a>
- {
- 80048a4: b530 push {r4, r5, lr}
- 80048a6: b083 sub sp, #12
- ulOriginalPriority = *pucFirstUserPriorityRegister;
- 80048a8: 4b39 ldr r3, [pc, #228] @ (8004990 <xPortStartScheduler+0x108>)
- 80048aa: 781a ldrb r2, [r3, #0]
- 80048ac: b2d2 uxtb r2, r2
- 80048ae: 9201 str r2, [sp, #4]
- *pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE;
- 80048b0: 22ff movs r2, #255 @ 0xff
- 80048b2: 701a strb r2, [r3, #0]
- ucMaxPriorityValue = *pucFirstUserPriorityRegister;
- 80048b4: 781b ldrb r3, [r3, #0]
- 80048b6: b2db uxtb r3, r3
- 80048b8: f88d 3003 strb.w r3, [sp, #3]
- ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue;
- 80048bc: f89d 3003 ldrb.w r3, [sp, #3]
- 80048c0: f003 0350 and.w r3, r3, #80 @ 0x50
- 80048c4: 4a33 ldr r2, [pc, #204] @ (8004994 <xPortStartScheduler+0x10c>)
- 80048c6: 7013 strb r3, [r2, #0]
- ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS;
- 80048c8: 4b33 ldr r3, [pc, #204] @ (8004998 <xPortStartScheduler+0x110>)
- 80048ca: 2207 movs r2, #7
- 80048cc: 601a str r2, [r3, #0]
- while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE )
- 80048ce: e01b b.n 8004908 <xPortStartScheduler+0x80>
- __asm volatile
- 80048d0: f04f 0350 mov.w r3, #80 @ 0x50
- 80048d4: f383 8811 msr BASEPRI, r3
- 80048d8: f3bf 8f6f isb sy
- 80048dc: f3bf 8f4f dsb sy
- configASSERT( portCPUID != portCORTEX_M7_r0p1_ID );
- 80048e0: e7fe b.n 80048e0 <xPortStartScheduler+0x58>
- 80048e2: f04f 0350 mov.w r3, #80 @ 0x50
- 80048e6: f383 8811 msr BASEPRI, r3
- 80048ea: f3bf 8f6f isb sy
- 80048ee: f3bf 8f4f dsb sy
- configASSERT( portCPUID != portCORTEX_M7_r0p0_ID );
- 80048f2: e7fe b.n 80048f2 <xPortStartScheduler+0x6a>
- ulMaxPRIGROUPValue--;
- 80048f4: 4a28 ldr r2, [pc, #160] @ (8004998 <xPortStartScheduler+0x110>)
- 80048f6: 6813 ldr r3, [r2, #0]
- 80048f8: 3b01 subs r3, #1
- 80048fa: 6013 str r3, [r2, #0]
- ucMaxPriorityValue <<= ( uint8_t ) 0x01;
- 80048fc: f89d 3003 ldrb.w r3, [sp, #3]
- 8004900: 005b lsls r3, r3, #1
- 8004902: b2db uxtb r3, r3
- 8004904: f88d 3003 strb.w r3, [sp, #3]
- while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE )
- 8004908: f89d 3003 ldrb.w r3, [sp, #3]
- 800490c: f013 0f80 tst.w r3, #128 @ 0x80
- 8004910: d1f0 bne.n 80048f4 <xPortStartScheduler+0x6c>
- configASSERT( ( portMAX_PRIGROUP_BITS - ulMaxPRIGROUPValue ) == configPRIO_BITS );
- 8004912: 4b21 ldr r3, [pc, #132] @ (8004998 <xPortStartScheduler+0x110>)
- 8004914: 681b ldr r3, [r3, #0]
- 8004916: 2b03 cmp r3, #3
- 8004918: d008 beq.n 800492c <xPortStartScheduler+0xa4>
- 800491a: f04f 0350 mov.w r3, #80 @ 0x50
- 800491e: f383 8811 msr BASEPRI, r3
- 8004922: f3bf 8f6f isb sy
- 8004926: f3bf 8f4f dsb sy
- 800492a: e7fe b.n 800492a <xPortStartScheduler+0xa2>
- ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT;
- 800492c: 021b lsls r3, r3, #8
- 800492e: 4a1a ldr r2, [pc, #104] @ (8004998 <xPortStartScheduler+0x110>)
- 8004930: 6013 str r3, [r2, #0]
- ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK;
- 8004932: f403 63e0 and.w r3, r3, #1792 @ 0x700
- 8004936: 6013 str r3, [r2, #0]
- *pucFirstUserPriorityRegister = ulOriginalPriority;
- 8004938: 9b01 ldr r3, [sp, #4]
- 800493a: b2db uxtb r3, r3
- 800493c: 4a14 ldr r2, [pc, #80] @ (8004990 <xPortStartScheduler+0x108>)
- 800493e: 7013 strb r3, [r2, #0]
- portNVIC_SYSPRI2_REG |= portNVIC_PENDSV_PRI;
- 8004940: f04f 24e0 mov.w r4, #3758153728 @ 0xe000e000
- 8004944: f8d4 3d20 ldr.w r3, [r4, #3360] @ 0xd20
- 8004948: f443 0370 orr.w r3, r3, #15728640 @ 0xf00000
- 800494c: f8c4 3d20 str.w r3, [r4, #3360] @ 0xd20
- portNVIC_SYSPRI2_REG |= portNVIC_SYSTICK_PRI;
- 8004950: f8d4 3d20 ldr.w r3, [r4, #3360] @ 0xd20
- 8004954: f043 4370 orr.w r3, r3, #4026531840 @ 0xf0000000
- 8004958: f8c4 3d20 str.w r3, [r4, #3360] @ 0xd20
- vPortSetupTimerInterrupt();
- 800495c: f7ff ff80 bl 8004860 <vPortSetupTimerInterrupt>
- uxCriticalNesting = 0;
- 8004960: 2500 movs r5, #0
- 8004962: 4b0e ldr r3, [pc, #56] @ (800499c <xPortStartScheduler+0x114>)
- 8004964: 601d str r5, [r3, #0]
- vPortEnableVFP();
- 8004966: f7ff febf bl 80046e8 <vPortEnableVFP>
- *( portFPCCR ) |= portASPEN_AND_LSPEN_BITS;
- 800496a: f8d4 3f34 ldr.w r3, [r4, #3892] @ 0xf34
- 800496e: f043 4340 orr.w r3, r3, #3221225472 @ 0xc0000000
- 8004972: f8c4 3f34 str.w r3, [r4, #3892] @ 0xf34
- prvPortStartFirstTask();
- 8004976: f7ff fea3 bl 80046c0 <prvPortStartFirstTask>
- vTaskSwitchContext();
- 800497a: f001 f9e5 bl 8005d48 <vTaskSwitchContext>
- prvTaskExitError();
- 800497e: f7ff fe7f bl 8004680 <prvTaskExitError>
- }
- 8004982: 4628 mov r0, r5
- 8004984: b003 add sp, #12
- 8004986: bd30 pop {r4, r5, pc}
- 8004988: 410fc271 .word 0x410fc271
- 800498c: 410fc270 .word 0x410fc270
- 8004990: e000e400 .word 0xe000e400
- 8004994: 24012884 .word 0x24012884
- 8004998: 24012880 .word 0x24012880
- 800499c: 24000024 .word 0x24000024
- 080049a0 <vPortValidateInterruptPriority>:
- {
- uint32_t ulCurrentInterrupt;
- uint8_t ucCurrentPriority;
- /* Obtain the number of the currently executing interrupt. */
- __asm volatile( "mrs %0, ipsr" : "=r"( ulCurrentInterrupt ) :: "memory" );
- 80049a0: f3ef 8305 mrs r3, IPSR
- /* Is the interrupt number a user defined interrupt? */
- if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER )
- 80049a4: 2b0f cmp r3, #15
- 80049a6: d90f bls.n 80049c8 <vPortValidateInterruptPriority+0x28>
- {
- /* Look up the interrupt's priority. */
- ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ];
- 80049a8: 4a11 ldr r2, [pc, #68] @ (80049f0 <vPortValidateInterruptPriority+0x50>)
- 80049aa: 5c9b ldrb r3, [r3, r2]
- 80049ac: b2db uxtb r3, r3
- interrupt entry is as fast and simple as possible.
- The following links provide detailed information:
- http://www.freertos.org/RTOS-Cortex-M3-M4.html
- http://www.freertos.org/FAQHelp.html */
- configASSERT( ucCurrentPriority >= ucMaxSysCallPriority );
- 80049ae: 4a11 ldr r2, [pc, #68] @ (80049f4 <vPortValidateInterruptPriority+0x54>)
- 80049b0: 7812 ldrb r2, [r2, #0]
- 80049b2: 429a cmp r2, r3
- 80049b4: d908 bls.n 80049c8 <vPortValidateInterruptPriority+0x28>
- 80049b6: f04f 0350 mov.w r3, #80 @ 0x50
- 80049ba: f383 8811 msr BASEPRI, r3
- 80049be: f3bf 8f6f isb sy
- 80049c2: f3bf 8f4f dsb sy
- 80049c6: e7fe b.n 80049c6 <vPortValidateInterruptPriority+0x26>
- configuration then the correct setting can be achieved on all Cortex-M
- devices by calling NVIC_SetPriorityGrouping( 0 ); before starting the
- scheduler. Note however that some vendor specific peripheral libraries
- assume a non-zero priority group setting, in which cases using a value
- of zero will result in unpredictable behaviour. */
- configASSERT( ( portAIRCR_REG & portPRIORITY_GROUP_MASK ) <= ulMaxPRIGROUPValue );
- 80049c8: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 80049cc: f8d3 3d0c ldr.w r3, [r3, #3340] @ 0xd0c
- 80049d0: f403 63e0 and.w r3, r3, #1792 @ 0x700
- 80049d4: 4a08 ldr r2, [pc, #32] @ (80049f8 <vPortValidateInterruptPriority+0x58>)
- 80049d6: 6812 ldr r2, [r2, #0]
- 80049d8: 4293 cmp r3, r2
- 80049da: d908 bls.n 80049ee <vPortValidateInterruptPriority+0x4e>
- 80049dc: f04f 0350 mov.w r3, #80 @ 0x50
- 80049e0: f383 8811 msr BASEPRI, r3
- 80049e4: f3bf 8f6f isb sy
- 80049e8: f3bf 8f4f dsb sy
- 80049ec: e7fe b.n 80049ec <vPortValidateInterruptPriority+0x4c>
- }
- 80049ee: 4770 bx lr
- 80049f0: e000e3f0 .word 0xe000e3f0
- 80049f4: 24012884 .word 0x24012884
- 80049f8: 24012880 .word 0x24012880
- 080049fc <prvGetDisinheritPriorityAfterTimeout>:
- /*-----------------------------------------------------------*/
- #if( configUSE_MUTEXES == 1 )
- static UBaseType_t prvGetDisinheritPriorityAfterTimeout( const Queue_t * const pxQueue )
- {
- 80049fc: 4603 mov r3, r0
- priority, but the waiting task times out, then the holder should
- disinherit the priority - but only down to the highest priority of any
- other tasks that are waiting for the same mutex. For this purpose,
- return the priority of the highest priority task that is waiting for the
- mutex. */
- if( listCURRENT_LIST_LENGTH( &( pxQueue->xTasksWaitingToReceive ) ) > 0U )
- 80049fe: 6a40 ldr r0, [r0, #36] @ 0x24
- 8004a00: b118 cbz r0, 8004a0a <prvGetDisinheritPriorityAfterTimeout+0xe>
- {
- uxHighestPriorityOfWaitingTasks = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) listGET_ITEM_VALUE_OF_HEAD_ENTRY( &( pxQueue->xTasksWaitingToReceive ) );
- 8004a02: 6b1b ldr r3, [r3, #48] @ 0x30
- 8004a04: 6818 ldr r0, [r3, #0]
- 8004a06: f1c0 0038 rsb r0, r0, #56 @ 0x38
- {
- uxHighestPriorityOfWaitingTasks = tskIDLE_PRIORITY;
- }
- return uxHighestPriorityOfWaitingTasks;
- }
- 8004a0a: 4770 bx lr
- 08004a0c <prvIsQueueFull>:
- return xReturn;
- } /*lint !e818 xQueue could not be pointer to const because it is a typedef. */
- /*-----------------------------------------------------------*/
- static BaseType_t prvIsQueueFull( const Queue_t *pxQueue )
- {
- 8004a0c: b510 push {r4, lr}
- 8004a0e: 4604 mov r4, r0
- BaseType_t xReturn;
- taskENTER_CRITICAL();
- 8004a10: f7ff fea0 bl 8004754 <vPortEnterCritical>
- {
- if( pxQueue->uxMessagesWaiting == pxQueue->uxLength )
- 8004a14: 6ba2 ldr r2, [r4, #56] @ 0x38
- 8004a16: 6be3 ldr r3, [r4, #60] @ 0x3c
- 8004a18: 429a cmp r2, r3
- 8004a1a: d004 beq.n 8004a26 <prvIsQueueFull+0x1a>
- {
- xReturn = pdTRUE;
- }
- else
- {
- xReturn = pdFALSE;
- 8004a1c: 2400 movs r4, #0
- }
- }
- taskEXIT_CRITICAL();
- 8004a1e: f7ff febb bl 8004798 <vPortExitCritical>
- return xReturn;
- }
- 8004a22: 4620 mov r0, r4
- 8004a24: bd10 pop {r4, pc}
- xReturn = pdTRUE;
- 8004a26: 2401 movs r4, #1
- 8004a28: e7f9 b.n 8004a1e <prvIsQueueFull+0x12>
- 08004a2a <prvIsQueueEmpty>:
- {
- 8004a2a: b510 push {r4, lr}
- 8004a2c: 4604 mov r4, r0
- taskENTER_CRITICAL();
- 8004a2e: f7ff fe91 bl 8004754 <vPortEnterCritical>
- if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 )
- 8004a32: 6ba3 ldr r3, [r4, #56] @ 0x38
- 8004a34: b923 cbnz r3, 8004a40 <prvIsQueueEmpty+0x16>
- xReturn = pdTRUE;
- 8004a36: 2401 movs r4, #1
- taskEXIT_CRITICAL();
- 8004a38: f7ff feae bl 8004798 <vPortExitCritical>
- }
- 8004a3c: 4620 mov r0, r4
- 8004a3e: bd10 pop {r4, pc}
- xReturn = pdFALSE;
- 8004a40: 2400 movs r4, #0
- 8004a42: e7f9 b.n 8004a38 <prvIsQueueEmpty+0xe>
- 08004a44 <prvCopyDataToQueue>:
- {
- 8004a44: b570 push {r4, r5, r6, lr}
- 8004a46: 4604 mov r4, r0
- 8004a48: 4615 mov r5, r2
- uxMessagesWaiting = pxQueue->uxMessagesWaiting;
- 8004a4a: 6b86 ldr r6, [r0, #56] @ 0x38
- if( pxQueue->uxItemSize == ( UBaseType_t ) 0 )
- 8004a4c: 6c02 ldr r2, [r0, #64] @ 0x40
- 8004a4e: b95a cbnz r2, 8004a68 <prvCopyDataToQueue+0x24>
- if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )
- 8004a50: 6803 ldr r3, [r0, #0]
- 8004a52: b11b cbz r3, 8004a5c <prvCopyDataToQueue+0x18>
- BaseType_t xReturn = pdFALSE;
- 8004a54: 2000 movs r0, #0
- pxQueue->uxMessagesWaiting = uxMessagesWaiting + ( UBaseType_t ) 1;
- 8004a56: 3601 adds r6, #1
- 8004a58: 63a6 str r6, [r4, #56] @ 0x38
- }
- 8004a5a: bd70 pop {r4, r5, r6, pc}
- xReturn = xTaskPriorityDisinherit( pxQueue->u.xSemaphore.xMutexHolder );
- 8004a5c: 6880 ldr r0, [r0, #8]
- 8004a5e: f001 fb03 bl 8006068 <xTaskPriorityDisinherit>
- pxQueue->u.xSemaphore.xMutexHolder = NULL;
- 8004a62: 2300 movs r3, #0
- 8004a64: 60a3 str r3, [r4, #8]
- 8004a66: e7f6 b.n 8004a56 <prvCopyDataToQueue+0x12>
- else if( xPosition == queueSEND_TO_BACK )
- 8004a68: b96d cbnz r5, 8004a86 <prvCopyDataToQueue+0x42>
- ( void ) memcpy( ( void * ) pxQueue->pcWriteTo, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 !e9087 MISRA exception as the casts are only redundant for some ports, plus previous logic ensures a null pointer can only be passed to memcpy() if the copy size is 0. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. */
- 8004a6a: 6840 ldr r0, [r0, #4]
- 8004a6c: f00e ff09 bl 8013882 <memcpy>
- pxQueue->pcWriteTo += pxQueue->uxItemSize; /*lint !e9016 Pointer arithmetic on char types ok, especially in this use case where it is the clearest way of conveying intent. */
- 8004a70: 6863 ldr r3, [r4, #4]
- 8004a72: 6c22 ldr r2, [r4, #64] @ 0x40
- 8004a74: 4413 add r3, r2
- 8004a76: 6063 str r3, [r4, #4]
- if( pxQueue->pcWriteTo >= pxQueue->u.xQueue.pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */
- 8004a78: 68a2 ldr r2, [r4, #8]
- 8004a7a: 4293 cmp r3, r2
- 8004a7c: d319 bcc.n 8004ab2 <prvCopyDataToQueue+0x6e>
- pxQueue->pcWriteTo = pxQueue->pcHead;
- 8004a7e: 6823 ldr r3, [r4, #0]
- 8004a80: 6063 str r3, [r4, #4]
- BaseType_t xReturn = pdFALSE;
- 8004a82: 4628 mov r0, r5
- 8004a84: e7e7 b.n 8004a56 <prvCopyDataToQueue+0x12>
- ( void ) memcpy( ( void * ) pxQueue->u.xQueue.pcReadFrom, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e9087 !e418 MISRA exception as the casts are only redundant for some ports. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. Assert checks null pointer only used when length is 0. */
- 8004a86: 68c0 ldr r0, [r0, #12]
- 8004a88: f00e fefb bl 8013882 <memcpy>
- pxQueue->u.xQueue.pcReadFrom -= pxQueue->uxItemSize;
- 8004a8c: 68e3 ldr r3, [r4, #12]
- 8004a8e: 6c22 ldr r2, [r4, #64] @ 0x40
- 8004a90: 4251 negs r1, r2
- 8004a92: 1a9b subs r3, r3, r2
- 8004a94: 60e3 str r3, [r4, #12]
- if( pxQueue->u.xQueue.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */
- 8004a96: 6822 ldr r2, [r4, #0]
- 8004a98: 4293 cmp r3, r2
- 8004a9a: d202 bcs.n 8004aa2 <prvCopyDataToQueue+0x5e>
- pxQueue->u.xQueue.pcReadFrom = ( pxQueue->u.xQueue.pcTail - pxQueue->uxItemSize );
- 8004a9c: 68a3 ldr r3, [r4, #8]
- 8004a9e: 440b add r3, r1
- 8004aa0: 60e3 str r3, [r4, #12]
- if( xPosition == queueOVERWRITE )
- 8004aa2: 2d02 cmp r5, #2
- 8004aa4: d001 beq.n 8004aaa <prvCopyDataToQueue+0x66>
- BaseType_t xReturn = pdFALSE;
- 8004aa6: 2000 movs r0, #0
- 8004aa8: e7d5 b.n 8004a56 <prvCopyDataToQueue+0x12>
- if( uxMessagesWaiting > ( UBaseType_t ) 0 )
- 8004aaa: b126 cbz r6, 8004ab6 <prvCopyDataToQueue+0x72>
- --uxMessagesWaiting;
- 8004aac: 3e01 subs r6, #1
- BaseType_t xReturn = pdFALSE;
- 8004aae: 2000 movs r0, #0
- 8004ab0: e7d1 b.n 8004a56 <prvCopyDataToQueue+0x12>
- 8004ab2: 4628 mov r0, r5
- 8004ab4: e7cf b.n 8004a56 <prvCopyDataToQueue+0x12>
- 8004ab6: 2000 movs r0, #0
- 8004ab8: e7cd b.n 8004a56 <prvCopyDataToQueue+0x12>
- 08004aba <prvCopyDataFromQueue>:
- {
- 8004aba: 4603 mov r3, r0
- if( pxQueue->uxItemSize != ( UBaseType_t ) 0 )
- 8004abc: 6c02 ldr r2, [r0, #64] @ 0x40
- 8004abe: b16a cbz r2, 8004adc <prvCopyDataFromQueue+0x22>
- {
- 8004ac0: b510 push {r4, lr}
- 8004ac2: 4608 mov r0, r1
- pxQueue->u.xQueue.pcReadFrom += pxQueue->uxItemSize; /*lint !e9016 Pointer arithmetic on char types ok, especially in this use case where it is the clearest way of conveying intent. */
- 8004ac4: 68d9 ldr r1, [r3, #12]
- 8004ac6: 4411 add r1, r2
- 8004ac8: 60d9 str r1, [r3, #12]
- if( pxQueue->u.xQueue.pcReadFrom >= pxQueue->u.xQueue.pcTail ) /*lint !e946 MISRA exception justified as use of the relational operator is the cleanest solutions. */
- 8004aca: 689c ldr r4, [r3, #8]
- 8004acc: 42a1 cmp r1, r4
- 8004ace: d301 bcc.n 8004ad4 <prvCopyDataFromQueue+0x1a>
- pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead;
- 8004ad0: 6819 ldr r1, [r3, #0]
- 8004ad2: 60d9 str r1, [r3, #12]
- ( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.xQueue.pcReadFrom, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 !e9087 MISRA exception as the casts are only redundant for some ports. Also previous logic ensures a null pointer can only be passed to memcpy() when the count is 0. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. */
- 8004ad4: 68d9 ldr r1, [r3, #12]
- 8004ad6: f00e fed4 bl 8013882 <memcpy>
- }
- 8004ada: bd10 pop {r4, pc}
- 8004adc: 4770 bx lr
- 08004ade <prvUnlockQueue>:
- {
- 8004ade: b538 push {r3, r4, r5, lr}
- 8004ae0: 4605 mov r5, r0
- taskENTER_CRITICAL();
- 8004ae2: f7ff fe37 bl 8004754 <vPortEnterCritical>
- int8_t cTxLock = pxQueue->cTxLock;
- 8004ae6: f895 4045 ldrb.w r4, [r5, #69] @ 0x45
- 8004aea: b264 sxtb r4, r4
- while( cTxLock > queueLOCKED_UNMODIFIED )
- 8004aec: e001 b.n 8004af2 <prvUnlockQueue+0x14>
- --cTxLock;
- 8004aee: 3c01 subs r4, #1
- 8004af0: b264 sxtb r4, r4
- while( cTxLock > queueLOCKED_UNMODIFIED )
- 8004af2: 2c00 cmp r4, #0
- 8004af4: dd0a ble.n 8004b0c <prvUnlockQueue+0x2e>
- if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
- 8004af6: 6a6b ldr r3, [r5, #36] @ 0x24
- 8004af8: b143 cbz r3, 8004b0c <prvUnlockQueue+0x2e>
- if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
- 8004afa: f105 0024 add.w r0, r5, #36 @ 0x24
- 8004afe: f001 f9b7 bl 8005e70 <xTaskRemoveFromEventList>
- 8004b02: 2800 cmp r0, #0
- 8004b04: d0f3 beq.n 8004aee <prvUnlockQueue+0x10>
- vTaskMissedYield();
- 8004b06: f001 fa47 bl 8005f98 <vTaskMissedYield>
- 8004b0a: e7f0 b.n 8004aee <prvUnlockQueue+0x10>
- pxQueue->cTxLock = queueUNLOCKED;
- 8004b0c: 23ff movs r3, #255 @ 0xff
- 8004b0e: f885 3045 strb.w r3, [r5, #69] @ 0x45
- taskEXIT_CRITICAL();
- 8004b12: f7ff fe41 bl 8004798 <vPortExitCritical>
- taskENTER_CRITICAL();
- 8004b16: f7ff fe1d bl 8004754 <vPortEnterCritical>
- int8_t cRxLock = pxQueue->cRxLock;
- 8004b1a: f895 4044 ldrb.w r4, [r5, #68] @ 0x44
- 8004b1e: b264 sxtb r4, r4
- while( cRxLock > queueLOCKED_UNMODIFIED )
- 8004b20: e001 b.n 8004b26 <prvUnlockQueue+0x48>
- --cRxLock;
- 8004b22: 3c01 subs r4, #1
- 8004b24: b264 sxtb r4, r4
- while( cRxLock > queueLOCKED_UNMODIFIED )
- 8004b26: 2c00 cmp r4, #0
- 8004b28: dd0a ble.n 8004b40 <prvUnlockQueue+0x62>
- if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
- 8004b2a: 692b ldr r3, [r5, #16]
- 8004b2c: b143 cbz r3, 8004b40 <prvUnlockQueue+0x62>
- if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
- 8004b2e: f105 0010 add.w r0, r5, #16
- 8004b32: f001 f99d bl 8005e70 <xTaskRemoveFromEventList>
- 8004b36: 2800 cmp r0, #0
- 8004b38: d0f3 beq.n 8004b22 <prvUnlockQueue+0x44>
- vTaskMissedYield();
- 8004b3a: f001 fa2d bl 8005f98 <vTaskMissedYield>
- 8004b3e: e7f0 b.n 8004b22 <prvUnlockQueue+0x44>
- pxQueue->cRxLock = queueUNLOCKED;
- 8004b40: 23ff movs r3, #255 @ 0xff
- 8004b42: f885 3044 strb.w r3, [r5, #68] @ 0x44
- taskEXIT_CRITICAL();
- 8004b46: f7ff fe27 bl 8004798 <vPortExitCritical>
- }
- 8004b4a: bd38 pop {r3, r4, r5, pc}
- 08004b4c <xQueueGenericReset>:
- {
- 8004b4c: b538 push {r3, r4, r5, lr}
- configASSERT( pxQueue );
- 8004b4e: b1e0 cbz r0, 8004b8a <xQueueGenericReset+0x3e>
- 8004b50: 460d mov r5, r1
- 8004b52: 4604 mov r4, r0
- taskENTER_CRITICAL();
- 8004b54: f7ff fdfe bl 8004754 <vPortEnterCritical>
- pxQueue->u.xQueue.pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */
- 8004b58: 6823 ldr r3, [r4, #0]
- 8004b5a: 6be2 ldr r2, [r4, #60] @ 0x3c
- 8004b5c: 6c21 ldr r1, [r4, #64] @ 0x40
- 8004b5e: fb01 3002 mla r0, r1, r2, r3
- 8004b62: 60a0 str r0, [r4, #8]
- pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U;
- 8004b64: 2000 movs r0, #0
- 8004b66: 63a0 str r0, [r4, #56] @ 0x38
- pxQueue->pcWriteTo = pxQueue->pcHead;
- 8004b68: 6063 str r3, [r4, #4]
- pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - 1U ) * pxQueue->uxItemSize ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */
- 8004b6a: 3a01 subs r2, #1
- 8004b6c: fb02 3301 mla r3, r2, r1, r3
- 8004b70: 60e3 str r3, [r4, #12]
- pxQueue->cRxLock = queueUNLOCKED;
- 8004b72: 23ff movs r3, #255 @ 0xff
- 8004b74: f884 3044 strb.w r3, [r4, #68] @ 0x44
- pxQueue->cTxLock = queueUNLOCKED;
- 8004b78: f884 3045 strb.w r3, [r4, #69] @ 0x45
- if( xNewQueue == pdFALSE )
- 8004b7c: b9fd cbnz r5, 8004bbe <xQueueGenericReset+0x72>
- if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
- 8004b7e: 6923 ldr r3, [r4, #16]
- 8004b80: b963 cbnz r3, 8004b9c <xQueueGenericReset+0x50>
- taskEXIT_CRITICAL();
- 8004b82: f7ff fe09 bl 8004798 <vPortExitCritical>
- }
- 8004b86: 2001 movs r0, #1
- 8004b88: bd38 pop {r3, r4, r5, pc}
- 8004b8a: f04f 0350 mov.w r3, #80 @ 0x50
- 8004b8e: f383 8811 msr BASEPRI, r3
- 8004b92: f3bf 8f6f isb sy
- 8004b96: f3bf 8f4f dsb sy
- configASSERT( pxQueue );
- 8004b9a: e7fe b.n 8004b9a <xQueueGenericReset+0x4e>
- if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
- 8004b9c: f104 0010 add.w r0, r4, #16
- 8004ba0: f001 f966 bl 8005e70 <xTaskRemoveFromEventList>
- 8004ba4: 2800 cmp r0, #0
- 8004ba6: d0ec beq.n 8004b82 <xQueueGenericReset+0x36>
- queueYIELD_IF_USING_PREEMPTION();
- 8004ba8: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 8004bac: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 8004bb0: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- 8004bb4: f3bf 8f4f dsb sy
- 8004bb8: f3bf 8f6f isb sy
- 8004bbc: e7e1 b.n 8004b82 <xQueueGenericReset+0x36>
- vListInitialise( &( pxQueue->xTasksWaitingToSend ) );
- 8004bbe: f104 0010 add.w r0, r4, #16
- 8004bc2: f7ff fd17 bl 80045f4 <vListInitialise>
- vListInitialise( &( pxQueue->xTasksWaitingToReceive ) );
- 8004bc6: f104 0024 add.w r0, r4, #36 @ 0x24
- 8004bca: f7ff fd13 bl 80045f4 <vListInitialise>
- 8004bce: e7d8 b.n 8004b82 <xQueueGenericReset+0x36>
- 08004bd0 <prvInitialiseNewQueue>:
- {
- 8004bd0: b538 push {r3, r4, r5, lr}
- 8004bd2: 461d mov r5, r3
- 8004bd4: 9c04 ldr r4, [sp, #16]
- if( uxItemSize == ( UBaseType_t ) 0 )
- 8004bd6: 460b mov r3, r1
- 8004bd8: b949 cbnz r1, 8004bee <prvInitialiseNewQueue+0x1e>
- pxNewQueue->pcHead = ( int8_t * ) pxNewQueue;
- 8004bda: 6024 str r4, [r4, #0]
- pxNewQueue->uxLength = uxQueueLength;
- 8004bdc: 63e0 str r0, [r4, #60] @ 0x3c
- pxNewQueue->uxItemSize = uxItemSize;
- 8004bde: 6423 str r3, [r4, #64] @ 0x40
- ( void ) xQueueGenericReset( pxNewQueue, pdTRUE );
- 8004be0: 2101 movs r1, #1
- 8004be2: 4620 mov r0, r4
- 8004be4: f7ff ffb2 bl 8004b4c <xQueueGenericReset>
- pxNewQueue->ucQueueType = ucQueueType;
- 8004be8: f884 504c strb.w r5, [r4, #76] @ 0x4c
- }
- 8004bec: bd38 pop {r3, r4, r5, pc}
- pxNewQueue->pcHead = ( int8_t * ) pucQueueStorage;
- 8004bee: 6022 str r2, [r4, #0]
- 8004bf0: e7f4 b.n 8004bdc <prvInitialiseNewQueue+0xc>
- 08004bf2 <xQueueGenericCreateStatic>:
- configASSERT( uxQueueLength > ( UBaseType_t ) 0 );
- 8004bf2: b940 cbnz r0, 8004c06 <xQueueGenericCreateStatic+0x14>
- 8004bf4: f04f 0350 mov.w r3, #80 @ 0x50
- 8004bf8: f383 8811 msr BASEPRI, r3
- 8004bfc: f3bf 8f6f isb sy
- 8004c00: f3bf 8f4f dsb sy
- 8004c04: e7fe b.n 8004c04 <xQueueGenericCreateStatic+0x12>
- {
- 8004c06: b510 push {r4, lr}
- 8004c08: b084 sub sp, #16
- 8004c0a: 461c mov r4, r3
- configASSERT( pxStaticQueue != NULL );
- 8004c0c: b183 cbz r3, 8004c30 <xQueueGenericCreateStatic+0x3e>
- configASSERT( !( ( pucQueueStorage != NULL ) && ( uxItemSize == 0 ) ) );
- 8004c0e: 1e0b subs r3, r1, #0
- 8004c10: bf18 it ne
- 8004c12: 2301 movne r3, #1
- 8004c14: 2a00 cmp r2, #0
- 8004c16: bf08 it eq
- 8004c18: f043 0301 orreq.w r3, r3, #1
- 8004c1c: b98b cbnz r3, 8004c42 <xQueueGenericCreateStatic+0x50>
- 8004c1e: f04f 0350 mov.w r3, #80 @ 0x50
- 8004c22: f383 8811 msr BASEPRI, r3
- 8004c26: f3bf 8f6f isb sy
- 8004c2a: f3bf 8f4f dsb sy
- 8004c2e: e7fe b.n 8004c2e <xQueueGenericCreateStatic+0x3c>
- 8004c30: f04f 0350 mov.w r3, #80 @ 0x50
- 8004c34: f383 8811 msr BASEPRI, r3
- 8004c38: f3bf 8f6f isb sy
- 8004c3c: f3bf 8f4f dsb sy
- configASSERT( pxStaticQueue != NULL );
- 8004c40: e7fe b.n 8004c40 <xQueueGenericCreateStatic+0x4e>
- configASSERT( !( ( pucQueueStorage == NULL ) && ( uxItemSize != 0 ) ) );
- 8004c42: fab1 f381 clz r3, r1
- 8004c46: 095b lsrs r3, r3, #5
- 8004c48: 2a00 cmp r2, #0
- 8004c4a: bf18 it ne
- 8004c4c: f043 0301 orrne.w r3, r3, #1
- 8004c50: b943 cbnz r3, 8004c64 <xQueueGenericCreateStatic+0x72>
- 8004c52: f04f 0350 mov.w r3, #80 @ 0x50
- 8004c56: f383 8811 msr BASEPRI, r3
- 8004c5a: f3bf 8f6f isb sy
- 8004c5e: f3bf 8f4f dsb sy
- 8004c62: e7fe b.n 8004c62 <xQueueGenericCreateStatic+0x70>
- volatile size_t xSize = sizeof( StaticQueue_t );
- 8004c64: 2350 movs r3, #80 @ 0x50
- 8004c66: 9303 str r3, [sp, #12]
- configASSERT( xSize == sizeof( Queue_t ) );
- 8004c68: 9b03 ldr r3, [sp, #12]
- 8004c6a: 2b50 cmp r3, #80 @ 0x50
- 8004c6c: d008 beq.n 8004c80 <xQueueGenericCreateStatic+0x8e>
- 8004c6e: f04f 0350 mov.w r3, #80 @ 0x50
- 8004c72: f383 8811 msr BASEPRI, r3
- 8004c76: f3bf 8f6f isb sy
- 8004c7a: f3bf 8f4f dsb sy
- 8004c7e: e7fe b.n 8004c7e <xQueueGenericCreateStatic+0x8c>
- ( void ) xSize; /* Keeps lint quiet when configASSERT() is not defined. */
- 8004c80: 9b03 ldr r3, [sp, #12]
- pxNewQueue->ucStaticallyAllocated = pdTRUE;
- 8004c82: 2301 movs r3, #1
- 8004c84: f884 3046 strb.w r3, [r4, #70] @ 0x46
- prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue );
- 8004c88: 9400 str r4, [sp, #0]
- 8004c8a: f89d 3018 ldrb.w r3, [sp, #24]
- 8004c8e: f7ff ff9f bl 8004bd0 <prvInitialiseNewQueue>
- }
- 8004c92: 4620 mov r0, r4
- 8004c94: b004 add sp, #16
- 8004c96: bd10 pop {r4, pc}
- 08004c98 <xQueueGenericCreate>:
- configASSERT( uxQueueLength > ( UBaseType_t ) 0 );
- 8004c98: b940 cbnz r0, 8004cac <xQueueGenericCreate+0x14>
- 8004c9a: f04f 0350 mov.w r3, #80 @ 0x50
- 8004c9e: f383 8811 msr BASEPRI, r3
- 8004ca2: f3bf 8f6f isb sy
- 8004ca6: f3bf 8f4f dsb sy
- 8004caa: e7fe b.n 8004caa <xQueueGenericCreate+0x12>
- {
- 8004cac: b5f0 push {r4, r5, r6, r7, lr}
- 8004cae: b083 sub sp, #12
- 8004cb0: 460d mov r5, r1
- 8004cb2: 4614 mov r4, r2
- 8004cb4: 4606 mov r6, r0
- xQueueSizeInBytes = ( size_t ) ( uxQueueLength * uxItemSize ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
- 8004cb6: fb01 f000 mul.w r0, r1, r0
- pxNewQueue = ( Queue_t * ) pvPortMalloc( sizeof( Queue_t ) + xQueueSizeInBytes ); /*lint !e9087 !e9079 see comment above. */
- 8004cba: 3050 adds r0, #80 @ 0x50
- 8004cbc: f7ff fbda bl 8004474 <pvPortMalloc>
- if( pxNewQueue != NULL )
- 8004cc0: 4607 mov r7, r0
- 8004cc2: b150 cbz r0, 8004cda <xQueueGenericCreate+0x42>
- pxNewQueue->ucStaticallyAllocated = pdFALSE;
- 8004cc4: 2300 movs r3, #0
- 8004cc6: f880 3046 strb.w r3, [r0, #70] @ 0x46
- prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue );
- 8004cca: 9000 str r0, [sp, #0]
- 8004ccc: 4623 mov r3, r4
- 8004cce: f100 0250 add.w r2, r0, #80 @ 0x50
- 8004cd2: 4629 mov r1, r5
- 8004cd4: 4630 mov r0, r6
- 8004cd6: f7ff ff7b bl 8004bd0 <prvInitialiseNewQueue>
- }
- 8004cda: 4638 mov r0, r7
- 8004cdc: b003 add sp, #12
- 8004cde: bdf0 pop {r4, r5, r6, r7, pc}
- 08004ce0 <xQueueCreateCountingSemaphoreStatic>:
- configASSERT( uxMaxCount != 0 );
- 8004ce0: b940 cbnz r0, 8004cf4 <xQueueCreateCountingSemaphoreStatic+0x14>
- 8004ce2: f04f 0350 mov.w r3, #80 @ 0x50
- 8004ce6: f383 8811 msr BASEPRI, r3
- 8004cea: f3bf 8f6f isb sy
- 8004cee: f3bf 8f4f dsb sy
- 8004cf2: e7fe b.n 8004cf2 <xQueueCreateCountingSemaphoreStatic+0x12>
- {
- 8004cf4: b510 push {r4, lr}
- 8004cf6: b082 sub sp, #8
- 8004cf8: 460c mov r4, r1
- configASSERT( uxInitialCount <= uxMaxCount );
- 8004cfa: 4288 cmp r0, r1
- 8004cfc: d208 bcs.n 8004d10 <xQueueCreateCountingSemaphoreStatic+0x30>
- 8004cfe: f04f 0350 mov.w r3, #80 @ 0x50
- 8004d02: f383 8811 msr BASEPRI, r3
- 8004d06: f3bf 8f6f isb sy
- 8004d0a: f3bf 8f4f dsb sy
- 8004d0e: e7fe b.n 8004d0e <xQueueCreateCountingSemaphoreStatic+0x2e>
- xHandle = xQueueGenericCreateStatic( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, NULL, pxStaticQueue, queueQUEUE_TYPE_COUNTING_SEMAPHORE );
- 8004d10: 2302 movs r3, #2
- 8004d12: 9300 str r3, [sp, #0]
- 8004d14: 4613 mov r3, r2
- 8004d16: 2200 movs r2, #0
- 8004d18: 4611 mov r1, r2
- 8004d1a: f7ff ff6a bl 8004bf2 <xQueueGenericCreateStatic>
- if( xHandle != NULL )
- 8004d1e: b100 cbz r0, 8004d22 <xQueueCreateCountingSemaphoreStatic+0x42>
- ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount;
- 8004d20: 6384 str r4, [r0, #56] @ 0x38
- }
- 8004d22: b002 add sp, #8
- 8004d24: bd10 pop {r4, pc}
- 08004d26 <xQueueCreateCountingSemaphore>:
- configASSERT( uxMaxCount != 0 );
- 8004d26: b940 cbnz r0, 8004d3a <xQueueCreateCountingSemaphore+0x14>
- 8004d28: f04f 0350 mov.w r3, #80 @ 0x50
- 8004d2c: f383 8811 msr BASEPRI, r3
- 8004d30: f3bf 8f6f isb sy
- 8004d34: f3bf 8f4f dsb sy
- 8004d38: e7fe b.n 8004d38 <xQueueCreateCountingSemaphore+0x12>
- {
- 8004d3a: b510 push {r4, lr}
- 8004d3c: 460c mov r4, r1
- configASSERT( uxInitialCount <= uxMaxCount );
- 8004d3e: 4288 cmp r0, r1
- 8004d40: d208 bcs.n 8004d54 <xQueueCreateCountingSemaphore+0x2e>
- 8004d42: f04f 0350 mov.w r3, #80 @ 0x50
- 8004d46: f383 8811 msr BASEPRI, r3
- 8004d4a: f3bf 8f6f isb sy
- 8004d4e: f3bf 8f4f dsb sy
- 8004d52: e7fe b.n 8004d52 <xQueueCreateCountingSemaphore+0x2c>
- xHandle = xQueueGenericCreate( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_COUNTING_SEMAPHORE );
- 8004d54: 2202 movs r2, #2
- 8004d56: 2100 movs r1, #0
- 8004d58: f7ff ff9e bl 8004c98 <xQueueGenericCreate>
- if( xHandle != NULL )
- 8004d5c: b100 cbz r0, 8004d60 <xQueueCreateCountingSemaphore+0x3a>
- ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount;
- 8004d5e: 6384 str r4, [r0, #56] @ 0x38
- }
- 8004d60: bd10 pop {r4, pc}
- 08004d62 <xQueueGenericSend>:
- {
- 8004d62: b5f0 push {r4, r5, r6, r7, lr}
- 8004d64: b085 sub sp, #20
- 8004d66: 9201 str r2, [sp, #4]
- configASSERT( pxQueue );
- 8004d68: b188 cbz r0, 8004d8e <xQueueGenericSend+0x2c>
- 8004d6a: 460f mov r7, r1
- 8004d6c: 461d mov r5, r3
- 8004d6e: 4604 mov r4, r0
- configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
- 8004d70: b1b1 cbz r1, 8004da0 <xQueueGenericSend+0x3e>
- configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );
- 8004d72: 2d02 cmp r5, #2
- 8004d74: d120 bne.n 8004db8 <xQueueGenericSend+0x56>
- 8004d76: 6be3 ldr r3, [r4, #60] @ 0x3c
- 8004d78: 2b01 cmp r3, #1
- 8004d7a: d01d beq.n 8004db8 <xQueueGenericSend+0x56>
- 8004d7c: f04f 0350 mov.w r3, #80 @ 0x50
- 8004d80: f383 8811 msr BASEPRI, r3
- 8004d84: f3bf 8f6f isb sy
- 8004d88: f3bf 8f4f dsb sy
- 8004d8c: e7fe b.n 8004d8c <xQueueGenericSend+0x2a>
- 8004d8e: f04f 0350 mov.w r3, #80 @ 0x50
- 8004d92: f383 8811 msr BASEPRI, r3
- 8004d96: f3bf 8f6f isb sy
- 8004d9a: f3bf 8f4f dsb sy
- configASSERT( pxQueue );
- 8004d9e: e7fe b.n 8004d9e <xQueueGenericSend+0x3c>
- configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
- 8004da0: 6c03 ldr r3, [r0, #64] @ 0x40
- 8004da2: 2b00 cmp r3, #0
- 8004da4: d0e5 beq.n 8004d72 <xQueueGenericSend+0x10>
- 8004da6: f04f 0350 mov.w r3, #80 @ 0x50
- 8004daa: f383 8811 msr BASEPRI, r3
- 8004dae: f3bf 8f6f isb sy
- 8004db2: f3bf 8f4f dsb sy
- 8004db6: e7fe b.n 8004db6 <xQueueGenericSend+0x54>
- configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
- 8004db8: f001 f8fa bl 8005fb0 <xTaskGetSchedulerState>
- 8004dbc: 4606 mov r6, r0
- 8004dbe: b958 cbnz r0, 8004dd8 <xQueueGenericSend+0x76>
- 8004dc0: 9b01 ldr r3, [sp, #4]
- 8004dc2: 2b00 cmp r3, #0
- 8004dc4: d048 beq.n 8004e58 <xQueueGenericSend+0xf6>
- 8004dc6: f04f 0350 mov.w r3, #80 @ 0x50
- 8004dca: f383 8811 msr BASEPRI, r3
- 8004dce: f3bf 8f6f isb sy
- 8004dd2: f3bf 8f4f dsb sy
- 8004dd6: e7fe b.n 8004dd6 <xQueueGenericSend+0x74>
- 8004dd8: 2600 movs r6, #0
- 8004dda: e03d b.n 8004e58 <xQueueGenericSend+0xf6>
- xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition );
- 8004ddc: 462a mov r2, r5
- 8004dde: 4639 mov r1, r7
- 8004de0: 4620 mov r0, r4
- 8004de2: f7ff fe2f bl 8004a44 <prvCopyDataToQueue>
- if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
- 8004de6: 6a63 ldr r3, [r4, #36] @ 0x24
- 8004de8: b97b cbnz r3, 8004e0a <xQueueGenericSend+0xa8>
- else if( xYieldRequired != pdFALSE )
- 8004dea: b148 cbz r0, 8004e00 <xQueueGenericSend+0x9e>
- queueYIELD_IF_USING_PREEMPTION();
- 8004dec: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 8004df0: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 8004df4: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- 8004df8: f3bf 8f4f dsb sy
- 8004dfc: f3bf 8f6f isb sy
- taskEXIT_CRITICAL();
- 8004e00: f7ff fcca bl 8004798 <vPortExitCritical>
- return pdPASS;
- 8004e04: 2001 movs r0, #1
- }
- 8004e06: b005 add sp, #20
- 8004e08: bdf0 pop {r4, r5, r6, r7, pc}
- if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
- 8004e0a: f104 0024 add.w r0, r4, #36 @ 0x24
- 8004e0e: f001 f82f bl 8005e70 <xTaskRemoveFromEventList>
- 8004e12: 2800 cmp r0, #0
- 8004e14: d0f4 beq.n 8004e00 <xQueueGenericSend+0x9e>
- queueYIELD_IF_USING_PREEMPTION();
- 8004e16: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 8004e1a: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 8004e1e: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- 8004e22: f3bf 8f4f dsb sy
- 8004e26: f3bf 8f6f isb sy
- 8004e2a: e7e9 b.n 8004e00 <xQueueGenericSend+0x9e>
- taskEXIT_CRITICAL();
- 8004e2c: f7ff fcb4 bl 8004798 <vPortExitCritical>
- return errQUEUE_FULL;
- 8004e30: 2000 movs r0, #0
- 8004e32: e7e8 b.n 8004e06 <xQueueGenericSend+0xa4>
- vTaskInternalSetTimeOutState( &xTimeOut );
- 8004e34: a802 add r0, sp, #8
- 8004e36: f001 f861 bl 8005efc <vTaskInternalSetTimeOutState>
- xEntryTimeSet = pdTRUE;
- 8004e3a: 2601 movs r6, #1
- 8004e3c: e019 b.n 8004e72 <xQueueGenericSend+0x110>
- prvLockQueue( pxQueue );
- 8004e3e: 2300 movs r3, #0
- 8004e40: f884 3044 strb.w r3, [r4, #68] @ 0x44
- 8004e44: e021 b.n 8004e8a <xQueueGenericSend+0x128>
- 8004e46: 2300 movs r3, #0
- 8004e48: f884 3045 strb.w r3, [r4, #69] @ 0x45
- 8004e4c: e023 b.n 8004e96 <xQueueGenericSend+0x134>
- prvUnlockQueue( pxQueue );
- 8004e4e: 4620 mov r0, r4
- 8004e50: f7ff fe45 bl 8004ade <prvUnlockQueue>
- ( void ) xTaskResumeAll();
- 8004e54: f000 fed6 bl 8005c04 <xTaskResumeAll>
- taskENTER_CRITICAL();
- 8004e58: f7ff fc7c bl 8004754 <vPortEnterCritical>
- if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )
- 8004e5c: 6ba2 ldr r2, [r4, #56] @ 0x38
- 8004e5e: 6be3 ldr r3, [r4, #60] @ 0x3c
- 8004e60: 429a cmp r2, r3
- 8004e62: d3bb bcc.n 8004ddc <xQueueGenericSend+0x7a>
- 8004e64: 2d02 cmp r5, #2
- 8004e66: d0b9 beq.n 8004ddc <xQueueGenericSend+0x7a>
- if( xTicksToWait == ( TickType_t ) 0 )
- 8004e68: 9b01 ldr r3, [sp, #4]
- 8004e6a: 2b00 cmp r3, #0
- 8004e6c: d0de beq.n 8004e2c <xQueueGenericSend+0xca>
- else if( xEntryTimeSet == pdFALSE )
- 8004e6e: 2e00 cmp r6, #0
- 8004e70: d0e0 beq.n 8004e34 <xQueueGenericSend+0xd2>
- taskEXIT_CRITICAL();
- 8004e72: f7ff fc91 bl 8004798 <vPortExitCritical>
- vTaskSuspendAll();
- 8004e76: f000 fe23 bl 8005ac0 <vTaskSuspendAll>
- prvLockQueue( pxQueue );
- 8004e7a: f7ff fc6b bl 8004754 <vPortEnterCritical>
- 8004e7e: f894 2044 ldrb.w r2, [r4, #68] @ 0x44
- 8004e82: b252 sxtb r2, r2
- 8004e84: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff
- 8004e88: d0d9 beq.n 8004e3e <xQueueGenericSend+0xdc>
- 8004e8a: f894 2045 ldrb.w r2, [r4, #69] @ 0x45
- 8004e8e: b252 sxtb r2, r2
- 8004e90: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff
- 8004e94: d0d7 beq.n 8004e46 <xQueueGenericSend+0xe4>
- 8004e96: f7ff fc7f bl 8004798 <vPortExitCritical>
- if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )
- 8004e9a: a901 add r1, sp, #4
- 8004e9c: a802 add r0, sp, #8
- 8004e9e: f001 f839 bl 8005f14 <xTaskCheckForTimeOut>
- 8004ea2: b9d8 cbnz r0, 8004edc <xQueueGenericSend+0x17a>
- if( prvIsQueueFull( pxQueue ) != pdFALSE )
- 8004ea4: 4620 mov r0, r4
- 8004ea6: f7ff fdb1 bl 8004a0c <prvIsQueueFull>
- 8004eaa: 2800 cmp r0, #0
- 8004eac: d0cf beq.n 8004e4e <xQueueGenericSend+0xec>
- vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait );
- 8004eae: 9901 ldr r1, [sp, #4]
- 8004eb0: f104 0010 add.w r0, r4, #16
- 8004eb4: f000 ffa8 bl 8005e08 <vTaskPlaceOnEventList>
- prvUnlockQueue( pxQueue );
- 8004eb8: 4620 mov r0, r4
- 8004eba: f7ff fe10 bl 8004ade <prvUnlockQueue>
- if( xTaskResumeAll() == pdFALSE )
- 8004ebe: f000 fea1 bl 8005c04 <xTaskResumeAll>
- 8004ec2: 2800 cmp r0, #0
- 8004ec4: d1c8 bne.n 8004e58 <xQueueGenericSend+0xf6>
- portYIELD_WITHIN_API();
- 8004ec6: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 8004eca: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 8004ece: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- 8004ed2: f3bf 8f4f dsb sy
- 8004ed6: f3bf 8f6f isb sy
- 8004eda: e7bd b.n 8004e58 <xQueueGenericSend+0xf6>
- prvUnlockQueue( pxQueue );
- 8004edc: 4620 mov r0, r4
- 8004ede: f7ff fdfe bl 8004ade <prvUnlockQueue>
- ( void ) xTaskResumeAll();
- 8004ee2: f000 fe8f bl 8005c04 <xTaskResumeAll>
- return errQUEUE_FULL;
- 8004ee6: 2000 movs r0, #0
- 8004ee8: e78d b.n 8004e06 <xQueueGenericSend+0xa4>
- 08004eea <prvInitialiseMutex>:
- if( pxNewQueue != NULL )
- 8004eea: b148 cbz r0, 8004f00 <prvInitialiseMutex+0x16>
- {
- 8004eec: b508 push {r3, lr}
- pxNewQueue->u.xSemaphore.xMutexHolder = NULL;
- 8004eee: 2100 movs r1, #0
- 8004ef0: 6081 str r1, [r0, #8]
- pxNewQueue->uxQueueType = queueQUEUE_IS_MUTEX;
- 8004ef2: 6001 str r1, [r0, #0]
- pxNewQueue->u.xSemaphore.uxRecursiveCallCount = 0;
- 8004ef4: 60c1 str r1, [r0, #12]
- ( void ) xQueueGenericSend( pxNewQueue, NULL, ( TickType_t ) 0U, queueSEND_TO_BACK );
- 8004ef6: 460b mov r3, r1
- 8004ef8: 460a mov r2, r1
- 8004efa: f7ff ff32 bl 8004d62 <xQueueGenericSend>
- }
- 8004efe: bd08 pop {r3, pc}
- 8004f00: 4770 bx lr
- 08004f02 <xQueueCreateMutex>:
- {
- 8004f02: b510 push {r4, lr}
- 8004f04: 4602 mov r2, r0
- xNewQueue = xQueueGenericCreate( uxMutexLength, uxMutexSize, ucQueueType );
- 8004f06: 2100 movs r1, #0
- 8004f08: 2001 movs r0, #1
- 8004f0a: f7ff fec5 bl 8004c98 <xQueueGenericCreate>
- 8004f0e: 4604 mov r4, r0
- prvInitialiseMutex( ( Queue_t * ) xNewQueue );
- 8004f10: f7ff ffeb bl 8004eea <prvInitialiseMutex>
- }
- 8004f14: 4620 mov r0, r4
- 8004f16: bd10 pop {r4, pc}
- 08004f18 <xQueueCreateMutexStatic>:
- {
- 8004f18: b510 push {r4, lr}
- 8004f1a: b082 sub sp, #8
- 8004f1c: 460b mov r3, r1
- xNewQueue = xQueueGenericCreateStatic( uxMutexLength, uxMutexSize, NULL, pxStaticQueue, ucQueueType );
- 8004f1e: 9000 str r0, [sp, #0]
- 8004f20: 2200 movs r2, #0
- 8004f22: 4611 mov r1, r2
- 8004f24: 2001 movs r0, #1
- 8004f26: f7ff fe64 bl 8004bf2 <xQueueGenericCreateStatic>
- 8004f2a: 4604 mov r4, r0
- prvInitialiseMutex( ( Queue_t * ) xNewQueue );
- 8004f2c: f7ff ffdd bl 8004eea <prvInitialiseMutex>
- }
- 8004f30: 4620 mov r0, r4
- 8004f32: b002 add sp, #8
- 8004f34: bd10 pop {r4, pc}
- 08004f36 <xQueueGiveMutexRecursive>:
- {
- 8004f36: b538 push {r3, r4, r5, lr}
- configASSERT( pxMutex );
- 8004f38: b138 cbz r0, 8004f4a <xQueueGiveMutexRecursive+0x14>
- 8004f3a: 4604 mov r4, r0
- if( pxMutex->u.xSemaphore.xMutexHolder == xTaskGetCurrentTaskHandle() )
- 8004f3c: 6885 ldr r5, [r0, #8]
- 8004f3e: f001 f831 bl 8005fa4 <xTaskGetCurrentTaskHandle>
- 8004f42: 4285 cmp r5, r0
- 8004f44: d00a beq.n 8004f5c <xQueueGiveMutexRecursive+0x26>
- xReturn = pdFAIL;
- 8004f46: 2000 movs r0, #0
- }
- 8004f48: bd38 pop {r3, r4, r5, pc}
- 8004f4a: f04f 0350 mov.w r3, #80 @ 0x50
- 8004f4e: f383 8811 msr BASEPRI, r3
- 8004f52: f3bf 8f6f isb sy
- 8004f56: f3bf 8f4f dsb sy
- configASSERT( pxMutex );
- 8004f5a: e7fe b.n 8004f5a <xQueueGiveMutexRecursive+0x24>
- ( pxMutex->u.xSemaphore.uxRecursiveCallCount )--;
- 8004f5c: 68e3 ldr r3, [r4, #12]
- 8004f5e: 3b01 subs r3, #1
- 8004f60: 60e3 str r3, [r4, #12]
- if( pxMutex->u.xSemaphore.uxRecursiveCallCount == ( UBaseType_t ) 0 )
- 8004f62: b10b cbz r3, 8004f68 <xQueueGiveMutexRecursive+0x32>
- xReturn = pdPASS;
- 8004f64: 2001 movs r0, #1
- return xReturn;
- 8004f66: e7ef b.n 8004f48 <xQueueGiveMutexRecursive+0x12>
- ( void ) xQueueGenericSend( pxMutex, NULL, queueMUTEX_GIVE_BLOCK_TIME, queueSEND_TO_BACK );
- 8004f68: 461a mov r2, r3
- 8004f6a: 4619 mov r1, r3
- 8004f6c: 4620 mov r0, r4
- 8004f6e: f7ff fef8 bl 8004d62 <xQueueGenericSend>
- xReturn = pdPASS;
- 8004f72: 2001 movs r0, #1
- 8004f74: e7e8 b.n 8004f48 <xQueueGiveMutexRecursive+0x12>
- 08004f76 <xQueueGenericSendFromISR>:
- {
- 8004f76: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
- configASSERT( pxQueue );
- 8004f7a: b190 cbz r0, 8004fa2 <xQueueGenericSendFromISR+0x2c>
- 8004f7c: 460f mov r7, r1
- 8004f7e: 4616 mov r6, r2
- 8004f80: 461c mov r4, r3
- 8004f82: 4605 mov r5, r0
- configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
- 8004f84: b1b1 cbz r1, 8004fb4 <xQueueGenericSendFromISR+0x3e>
- configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );
- 8004f86: 2c02 cmp r4, #2
- 8004f88: d120 bne.n 8004fcc <xQueueGenericSendFromISR+0x56>
- 8004f8a: 6beb ldr r3, [r5, #60] @ 0x3c
- 8004f8c: 2b01 cmp r3, #1
- 8004f8e: d01d beq.n 8004fcc <xQueueGenericSendFromISR+0x56>
- 8004f90: f04f 0350 mov.w r3, #80 @ 0x50
- 8004f94: f383 8811 msr BASEPRI, r3
- 8004f98: f3bf 8f6f isb sy
- 8004f9c: f3bf 8f4f dsb sy
- 8004fa0: e7fe b.n 8004fa0 <xQueueGenericSendFromISR+0x2a>
- 8004fa2: f04f 0350 mov.w r3, #80 @ 0x50
- 8004fa6: f383 8811 msr BASEPRI, r3
- 8004faa: f3bf 8f6f isb sy
- 8004fae: f3bf 8f4f dsb sy
- configASSERT( pxQueue );
- 8004fb2: e7fe b.n 8004fb2 <xQueueGenericSendFromISR+0x3c>
- configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
- 8004fb4: 6c03 ldr r3, [r0, #64] @ 0x40
- 8004fb6: 2b00 cmp r3, #0
- 8004fb8: d0e5 beq.n 8004f86 <xQueueGenericSendFromISR+0x10>
- 8004fba: f04f 0350 mov.w r3, #80 @ 0x50
- 8004fbe: f383 8811 msr BASEPRI, r3
- 8004fc2: f3bf 8f6f isb sy
- 8004fc6: f3bf 8f4f dsb sy
- 8004fca: e7fe b.n 8004fca <xQueueGenericSendFromISR+0x54>
- portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
- 8004fcc: f7ff fce8 bl 80049a0 <vPortValidateInterruptPriority>
- __asm volatile
- 8004fd0: f3ef 8811 mrs r8, BASEPRI
- 8004fd4: f04f 0350 mov.w r3, #80 @ 0x50
- 8004fd8: f383 8811 msr BASEPRI, r3
- 8004fdc: f3bf 8f6f isb sy
- 8004fe0: f3bf 8f4f dsb sy
- if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )
- 8004fe4: 6baa ldr r2, [r5, #56] @ 0x38
- 8004fe6: 6beb ldr r3, [r5, #60] @ 0x3c
- 8004fe8: 429a cmp r2, r3
- 8004fea: d306 bcc.n 8004ffa <xQueueGenericSendFromISR+0x84>
- 8004fec: 2c02 cmp r4, #2
- 8004fee: d004 beq.n 8004ffa <xQueueGenericSendFromISR+0x84>
- xReturn = errQUEUE_FULL;
- 8004ff0: 2000 movs r0, #0
- __asm volatile
- 8004ff2: f388 8811 msr BASEPRI, r8
- }
- 8004ff6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
- const int8_t cTxLock = pxQueue->cTxLock;
- 8004ffa: f895 9045 ldrb.w r9, [r5, #69] @ 0x45
- 8004ffe: fa4f f989 sxtb.w r9, r9
- const UBaseType_t uxPreviousMessagesWaiting = pxQueue->uxMessagesWaiting;
- 8005002: 6bab ldr r3, [r5, #56] @ 0x38
- ( void ) prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition );
- 8005004: 4622 mov r2, r4
- 8005006: 4639 mov r1, r7
- 8005008: 4628 mov r0, r5
- 800500a: f7ff fd1b bl 8004a44 <prvCopyDataToQueue>
- if( cTxLock == queueUNLOCKED )
- 800500e: f1b9 3fff cmp.w r9, #4294967295 @ 0xffffffff
- 8005012: d006 beq.n 8005022 <xQueueGenericSendFromISR+0xac>
- pxQueue->cTxLock = ( int8_t ) ( cTxLock + 1 );
- 8005014: f109 0301 add.w r3, r9, #1
- 8005018: b25b sxtb r3, r3
- 800501a: f885 3045 strb.w r3, [r5, #69] @ 0x45
- xReturn = pdPASS;
- 800501e: 2001 movs r0, #1
- 8005020: e7e7 b.n 8004ff2 <xQueueGenericSendFromISR+0x7c>
- if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
- 8005022: 6a6b ldr r3, [r5, #36] @ 0x24
- 8005024: b90b cbnz r3, 800502a <xQueueGenericSendFromISR+0xb4>
- xReturn = pdPASS;
- 8005026: 2001 movs r0, #1
- 8005028: e7e3 b.n 8004ff2 <xQueueGenericSendFromISR+0x7c>
- if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
- 800502a: f105 0024 add.w r0, r5, #36 @ 0x24
- 800502e: f000 ff1f bl 8005e70 <xTaskRemoveFromEventList>
- 8005032: b118 cbz r0, 800503c <xQueueGenericSendFromISR+0xc6>
- if( pxHigherPriorityTaskWoken != NULL )
- 8005034: b126 cbz r6, 8005040 <xQueueGenericSendFromISR+0xca>
- *pxHigherPriorityTaskWoken = pdTRUE;
- 8005036: 2001 movs r0, #1
- 8005038: 6030 str r0, [r6, #0]
- 800503a: e7da b.n 8004ff2 <xQueueGenericSendFromISR+0x7c>
- xReturn = pdPASS;
- 800503c: 2001 movs r0, #1
- 800503e: e7d8 b.n 8004ff2 <xQueueGenericSendFromISR+0x7c>
- 8005040: 2001 movs r0, #1
- 8005042: e7d6 b.n 8004ff2 <xQueueGenericSendFromISR+0x7c>
- 08005044 <xQueueGiveFromISR>:
- configASSERT( pxQueue );
- 8005044: b168 cbz r0, 8005062 <xQueueGiveFromISR+0x1e>
- {
- 8005046: b570 push {r4, r5, r6, lr}
- 8005048: 460c mov r4, r1
- 800504a: 4605 mov r5, r0
- configASSERT( pxQueue->uxItemSize == 0 );
- 800504c: 6c03 ldr r3, [r0, #64] @ 0x40
- 800504e: b18b cbz r3, 8005074 <xQueueGiveFromISR+0x30>
- __asm volatile
- 8005050: f04f 0350 mov.w r3, #80 @ 0x50
- 8005054: f383 8811 msr BASEPRI, r3
- 8005058: f3bf 8f6f isb sy
- 800505c: f3bf 8f4f dsb sy
- 8005060: e7fe b.n 8005060 <xQueueGiveFromISR+0x1c>
- 8005062: f04f 0350 mov.w r3, #80 @ 0x50
- 8005066: f383 8811 msr BASEPRI, r3
- 800506a: f3bf 8f6f isb sy
- 800506e: f3bf 8f4f dsb sy
- configASSERT( pxQueue );
- 8005072: e7fe b.n 8005072 <xQueueGiveFromISR+0x2e>
- configASSERT( !( ( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) && ( pxQueue->u.xSemaphore.xMutexHolder != NULL ) ) );
- 8005074: 6803 ldr r3, [r0, #0]
- 8005076: b1eb cbz r3, 80050b4 <xQueueGiveFromISR+0x70>
- portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
- 8005078: f7ff fc92 bl 80049a0 <vPortValidateInterruptPriority>
- __asm volatile
- 800507c: f3ef 8611 mrs r6, BASEPRI
- 8005080: f04f 0350 mov.w r3, #80 @ 0x50
- 8005084: f383 8811 msr BASEPRI, r3
- 8005088: f3bf 8f6f isb sy
- 800508c: f3bf 8f4f dsb sy
- const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
- 8005090: 6baa ldr r2, [r5, #56] @ 0x38
- if( uxMessagesWaiting < pxQueue->uxLength )
- 8005092: 6beb ldr r3, [r5, #60] @ 0x3c
- 8005094: 4293 cmp r3, r2
- 8005096: d926 bls.n 80050e6 <xQueueGiveFromISR+0xa2>
- const int8_t cTxLock = pxQueue->cTxLock;
- 8005098: f895 3045 ldrb.w r3, [r5, #69] @ 0x45
- 800509c: b25b sxtb r3, r3
- pxQueue->uxMessagesWaiting = uxMessagesWaiting + ( UBaseType_t ) 1;
- 800509e: 3201 adds r2, #1
- 80050a0: 63aa str r2, [r5, #56] @ 0x38
- if( cTxLock == queueUNLOCKED )
- 80050a2: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
- 80050a6: d011 beq.n 80050cc <xQueueGiveFromISR+0x88>
- pxQueue->cTxLock = ( int8_t ) ( cTxLock + 1 );
- 80050a8: 3301 adds r3, #1
- 80050aa: b25b sxtb r3, r3
- 80050ac: f885 3045 strb.w r3, [r5, #69] @ 0x45
- xReturn = pdPASS;
- 80050b0: 2001 movs r0, #1
- 80050b2: e019 b.n 80050e8 <xQueueGiveFromISR+0xa4>
- configASSERT( !( ( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) && ( pxQueue->u.xSemaphore.xMutexHolder != NULL ) ) );
- 80050b4: 6883 ldr r3, [r0, #8]
- 80050b6: 2b00 cmp r3, #0
- 80050b8: d0de beq.n 8005078 <xQueueGiveFromISR+0x34>
- __asm volatile
- 80050ba: f04f 0350 mov.w r3, #80 @ 0x50
- 80050be: f383 8811 msr BASEPRI, r3
- 80050c2: f3bf 8f6f isb sy
- 80050c6: f3bf 8f4f dsb sy
- 80050ca: e7fe b.n 80050ca <xQueueGiveFromISR+0x86>
- if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
- 80050cc: 6a6b ldr r3, [r5, #36] @ 0x24
- 80050ce: b90b cbnz r3, 80050d4 <xQueueGiveFromISR+0x90>
- xReturn = pdPASS;
- 80050d0: 2001 movs r0, #1
- 80050d2: e009 b.n 80050e8 <xQueueGiveFromISR+0xa4>
- if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
- 80050d4: f105 0024 add.w r0, r5, #36 @ 0x24
- 80050d8: f000 feca bl 8005e70 <xTaskRemoveFromEventList>
- 80050dc: b138 cbz r0, 80050ee <xQueueGiveFromISR+0xaa>
- if( pxHigherPriorityTaskWoken != NULL )
- 80050de: b144 cbz r4, 80050f2 <xQueueGiveFromISR+0xae>
- *pxHigherPriorityTaskWoken = pdTRUE;
- 80050e0: 2001 movs r0, #1
- 80050e2: 6020 str r0, [r4, #0]
- 80050e4: e000 b.n 80050e8 <xQueueGiveFromISR+0xa4>
- xReturn = errQUEUE_FULL;
- 80050e6: 2000 movs r0, #0
- __asm volatile
- 80050e8: f386 8811 msr BASEPRI, r6
- }
- 80050ec: bd70 pop {r4, r5, r6, pc}
- xReturn = pdPASS;
- 80050ee: 2001 movs r0, #1
- 80050f0: e7fa b.n 80050e8 <xQueueGiveFromISR+0xa4>
- 80050f2: 2001 movs r0, #1
- 80050f4: e7f8 b.n 80050e8 <xQueueGiveFromISR+0xa4>
- 080050f6 <xQueueReceive>:
- {
- 80050f6: b5f0 push {r4, r5, r6, r7, lr}
- 80050f8: b085 sub sp, #20
- 80050fa: 9201 str r2, [sp, #4]
- configASSERT( ( pxQueue ) );
- 80050fc: b190 cbz r0, 8005124 <xQueueReceive+0x2e>
- 80050fe: 460f mov r7, r1
- 8005100: 4604 mov r4, r0
- configASSERT( !( ( ( pvBuffer ) == NULL ) && ( ( pxQueue )->uxItemSize != ( UBaseType_t ) 0U ) ) );
- 8005102: b1c1 cbz r1, 8005136 <xQueueReceive+0x40>
- configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
- 8005104: f000 ff54 bl 8005fb0 <xTaskGetSchedulerState>
- 8005108: 4606 mov r6, r0
- 800510a: bb00 cbnz r0, 800514e <xQueueReceive+0x58>
- 800510c: 9b01 ldr r3, [sp, #4]
- 800510e: 2b00 cmp r3, #0
- 8005110: d05e beq.n 80051d0 <xQueueReceive+0xda>
- __asm volatile
- 8005112: f04f 0350 mov.w r3, #80 @ 0x50
- 8005116: f383 8811 msr BASEPRI, r3
- 800511a: f3bf 8f6f isb sy
- 800511e: f3bf 8f4f dsb sy
- 8005122: e7fe b.n 8005122 <xQueueReceive+0x2c>
- 8005124: f04f 0350 mov.w r3, #80 @ 0x50
- 8005128: f383 8811 msr BASEPRI, r3
- 800512c: f3bf 8f6f isb sy
- 8005130: f3bf 8f4f dsb sy
- configASSERT( ( pxQueue ) );
- 8005134: e7fe b.n 8005134 <xQueueReceive+0x3e>
- configASSERT( !( ( ( pvBuffer ) == NULL ) && ( ( pxQueue )->uxItemSize != ( UBaseType_t ) 0U ) ) );
- 8005136: 6c03 ldr r3, [r0, #64] @ 0x40
- 8005138: 2b00 cmp r3, #0
- 800513a: d0e3 beq.n 8005104 <xQueueReceive+0xe>
- 800513c: f04f 0350 mov.w r3, #80 @ 0x50
- 8005140: f383 8811 msr BASEPRI, r3
- 8005144: f3bf 8f6f isb sy
- 8005148: f3bf 8f4f dsb sy
- 800514c: e7fe b.n 800514c <xQueueReceive+0x56>
- 800514e: 2600 movs r6, #0
- 8005150: e03e b.n 80051d0 <xQueueReceive+0xda>
- prvCopyDataFromQueue( pxQueue, pvBuffer );
- 8005152: 4639 mov r1, r7
- 8005154: 4620 mov r0, r4
- 8005156: f7ff fcb0 bl 8004aba <prvCopyDataFromQueue>
- pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1;
- 800515a: 3d01 subs r5, #1
- 800515c: 63a5 str r5, [r4, #56] @ 0x38
- if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
- 800515e: 6923 ldr r3, [r4, #16]
- 8005160: b923 cbnz r3, 800516c <xQueueReceive+0x76>
- taskEXIT_CRITICAL();
- 8005162: f7ff fb19 bl 8004798 <vPortExitCritical>
- return pdPASS;
- 8005166: 2001 movs r0, #1
- }
- 8005168: b005 add sp, #20
- 800516a: bdf0 pop {r4, r5, r6, r7, pc}
- if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
- 800516c: f104 0010 add.w r0, r4, #16
- 8005170: f000 fe7e bl 8005e70 <xTaskRemoveFromEventList>
- 8005174: 2800 cmp r0, #0
- 8005176: d0f4 beq.n 8005162 <xQueueReceive+0x6c>
- queueYIELD_IF_USING_PREEMPTION();
- 8005178: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 800517c: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 8005180: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- 8005184: f3bf 8f4f dsb sy
- 8005188: f3bf 8f6f isb sy
- 800518c: e7e9 b.n 8005162 <xQueueReceive+0x6c>
- taskEXIT_CRITICAL();
- 800518e: f7ff fb03 bl 8004798 <vPortExitCritical>
- return errQUEUE_EMPTY;
- 8005192: 2000 movs r0, #0
- 8005194: e7e8 b.n 8005168 <xQueueReceive+0x72>
- vTaskInternalSetTimeOutState( &xTimeOut );
- 8005196: a802 add r0, sp, #8
- 8005198: f000 feb0 bl 8005efc <vTaskInternalSetTimeOutState>
- xEntryTimeSet = pdTRUE;
- 800519c: 2601 movs r6, #1
- 800519e: e021 b.n 80051e4 <xQueueReceive+0xee>
- prvLockQueue( pxQueue );
- 80051a0: 2300 movs r3, #0
- 80051a2: f884 3044 strb.w r3, [r4, #68] @ 0x44
- 80051a6: e029 b.n 80051fc <xQueueReceive+0x106>
- 80051a8: 2300 movs r3, #0
- 80051aa: f884 3045 strb.w r3, [r4, #69] @ 0x45
- 80051ae: e02b b.n 8005208 <xQueueReceive+0x112>
- prvUnlockQueue( pxQueue );
- 80051b0: 4620 mov r0, r4
- 80051b2: f7ff fc94 bl 8004ade <prvUnlockQueue>
- ( void ) xTaskResumeAll();
- 80051b6: f000 fd25 bl 8005c04 <xTaskResumeAll>
- 80051ba: e009 b.n 80051d0 <xQueueReceive+0xda>
- prvUnlockQueue( pxQueue );
- 80051bc: 4620 mov r0, r4
- 80051be: f7ff fc8e bl 8004ade <prvUnlockQueue>
- ( void ) xTaskResumeAll();
- 80051c2: f000 fd1f bl 8005c04 <xTaskResumeAll>
- if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
- 80051c6: 4620 mov r0, r4
- 80051c8: f7ff fc2f bl 8004a2a <prvIsQueueEmpty>
- 80051cc: 2800 cmp r0, #0
- 80051ce: d13f bne.n 8005250 <xQueueReceive+0x15a>
- taskENTER_CRITICAL();
- 80051d0: f7ff fac0 bl 8004754 <vPortEnterCritical>
- const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
- 80051d4: 6ba5 ldr r5, [r4, #56] @ 0x38
- if( uxMessagesWaiting > ( UBaseType_t ) 0 )
- 80051d6: 2d00 cmp r5, #0
- 80051d8: d1bb bne.n 8005152 <xQueueReceive+0x5c>
- if( xTicksToWait == ( TickType_t ) 0 )
- 80051da: 9b01 ldr r3, [sp, #4]
- 80051dc: 2b00 cmp r3, #0
- 80051de: d0d6 beq.n 800518e <xQueueReceive+0x98>
- else if( xEntryTimeSet == pdFALSE )
- 80051e0: 2e00 cmp r6, #0
- 80051e2: d0d8 beq.n 8005196 <xQueueReceive+0xa0>
- taskEXIT_CRITICAL();
- 80051e4: f7ff fad8 bl 8004798 <vPortExitCritical>
- vTaskSuspendAll();
- 80051e8: f000 fc6a bl 8005ac0 <vTaskSuspendAll>
- prvLockQueue( pxQueue );
- 80051ec: f7ff fab2 bl 8004754 <vPortEnterCritical>
- 80051f0: f894 3044 ldrb.w r3, [r4, #68] @ 0x44
- 80051f4: b25b sxtb r3, r3
- 80051f6: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
- 80051fa: d0d1 beq.n 80051a0 <xQueueReceive+0xaa>
- 80051fc: f894 3045 ldrb.w r3, [r4, #69] @ 0x45
- 8005200: b25b sxtb r3, r3
- 8005202: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
- 8005206: d0cf beq.n 80051a8 <xQueueReceive+0xb2>
- 8005208: f7ff fac6 bl 8004798 <vPortExitCritical>
- if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )
- 800520c: a901 add r1, sp, #4
- 800520e: a802 add r0, sp, #8
- 8005210: f000 fe80 bl 8005f14 <xTaskCheckForTimeOut>
- 8005214: 2800 cmp r0, #0
- 8005216: d1d1 bne.n 80051bc <xQueueReceive+0xc6>
- if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
- 8005218: 4620 mov r0, r4
- 800521a: f7ff fc06 bl 8004a2a <prvIsQueueEmpty>
- 800521e: 2800 cmp r0, #0
- 8005220: d0c6 beq.n 80051b0 <xQueueReceive+0xba>
- vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
- 8005222: 9901 ldr r1, [sp, #4]
- 8005224: f104 0024 add.w r0, r4, #36 @ 0x24
- 8005228: f000 fdee bl 8005e08 <vTaskPlaceOnEventList>
- prvUnlockQueue( pxQueue );
- 800522c: 4620 mov r0, r4
- 800522e: f7ff fc56 bl 8004ade <prvUnlockQueue>
- if( xTaskResumeAll() == pdFALSE )
- 8005232: f000 fce7 bl 8005c04 <xTaskResumeAll>
- 8005236: 2800 cmp r0, #0
- 8005238: d1ca bne.n 80051d0 <xQueueReceive+0xda>
- portYIELD_WITHIN_API();
- 800523a: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 800523e: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 8005242: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- 8005246: f3bf 8f4f dsb sy
- 800524a: f3bf 8f6f isb sy
- 800524e: e7bf b.n 80051d0 <xQueueReceive+0xda>
- return errQUEUE_EMPTY;
- 8005250: 2000 movs r0, #0
- 8005252: e789 b.n 8005168 <xQueueReceive+0x72>
- 08005254 <xQueueSemaphoreTake>:
- {
- 8005254: b570 push {r4, r5, r6, lr}
- 8005256: b084 sub sp, #16
- 8005258: 9101 str r1, [sp, #4]
- configASSERT( ( pxQueue ) );
- 800525a: b158 cbz r0, 8005274 <xQueueSemaphoreTake+0x20>
- 800525c: 4604 mov r4, r0
- configASSERT( pxQueue->uxItemSize == 0 );
- 800525e: 6c03 ldr r3, [r0, #64] @ 0x40
- 8005260: b18b cbz r3, 8005286 <xQueueSemaphoreTake+0x32>
- 8005262: f04f 0350 mov.w r3, #80 @ 0x50
- 8005266: f383 8811 msr BASEPRI, r3
- 800526a: f3bf 8f6f isb sy
- 800526e: f3bf 8f4f dsb sy
- 8005272: e7fe b.n 8005272 <xQueueSemaphoreTake+0x1e>
- 8005274: f04f 0350 mov.w r3, #80 @ 0x50
- 8005278: f383 8811 msr BASEPRI, r3
- 800527c: f3bf 8f6f isb sy
- 8005280: f3bf 8f4f dsb sy
- configASSERT( ( pxQueue ) );
- 8005284: e7fe b.n 8005284 <xQueueSemaphoreTake+0x30>
- configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
- 8005286: f000 fe93 bl 8005fb0 <xTaskGetSchedulerState>
- 800528a: 4605 mov r5, r0
- 800528c: b950 cbnz r0, 80052a4 <xQueueSemaphoreTake+0x50>
- 800528e: 9b01 ldr r3, [sp, #4]
- 8005290: b15b cbz r3, 80052aa <xQueueSemaphoreTake+0x56>
- 8005292: f04f 0350 mov.w r3, #80 @ 0x50
- 8005296: f383 8811 msr BASEPRI, r3
- 800529a: f3bf 8f6f isb sy
- 800529e: f3bf 8f4f dsb sy
- 80052a2: e7fe b.n 80052a2 <xQueueSemaphoreTake+0x4e>
- 80052a4: 2600 movs r6, #0
- 80052a6: 4635 mov r5, r6
- 80052a8: e055 b.n 8005356 <xQueueSemaphoreTake+0x102>
- 80052aa: 4606 mov r6, r0
- 80052ac: e053 b.n 8005356 <xQueueSemaphoreTake+0x102>
- pxQueue->uxMessagesWaiting = uxSemaphoreCount - ( UBaseType_t ) 1;
- 80052ae: 3b01 subs r3, #1
- 80052b0: 63a3 str r3, [r4, #56] @ 0x38
- if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )
- 80052b2: 6823 ldr r3, [r4, #0]
- 80052b4: b13b cbz r3, 80052c6 <xQueueSemaphoreTake+0x72>
- if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
- 80052b6: 6923 ldr r3, [r4, #16]
- 80052b8: b94b cbnz r3, 80052ce <xQueueSemaphoreTake+0x7a>
- taskEXIT_CRITICAL();
- 80052ba: f7ff fa6d bl 8004798 <vPortExitCritical>
- return pdPASS;
- 80052be: 2601 movs r6, #1
- }
- 80052c0: 4630 mov r0, r6
- 80052c2: b004 add sp, #16
- 80052c4: bd70 pop {r4, r5, r6, pc}
- pxQueue->u.xSemaphore.xMutexHolder = pvTaskIncrementMutexHeldCount();
- 80052c6: f000 ff67 bl 8006198 <pvTaskIncrementMutexHeldCount>
- 80052ca: 60a0 str r0, [r4, #8]
- 80052cc: e7f3 b.n 80052b6 <xQueueSemaphoreTake+0x62>
- if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
- 80052ce: f104 0010 add.w r0, r4, #16
- 80052d2: f000 fdcd bl 8005e70 <xTaskRemoveFromEventList>
- 80052d6: 2800 cmp r0, #0
- 80052d8: d0ef beq.n 80052ba <xQueueSemaphoreTake+0x66>
- queueYIELD_IF_USING_PREEMPTION();
- 80052da: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 80052de: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 80052e2: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- 80052e6: f3bf 8f4f dsb sy
- 80052ea: f3bf 8f6f isb sy
- 80052ee: e7e4 b.n 80052ba <xQueueSemaphoreTake+0x66>
- configASSERT( xInheritanceOccurred == pdFALSE );
- 80052f0: b146 cbz r6, 8005304 <xQueueSemaphoreTake+0xb0>
- 80052f2: f04f 0350 mov.w r3, #80 @ 0x50
- 80052f6: f383 8811 msr BASEPRI, r3
- 80052fa: f3bf 8f6f isb sy
- 80052fe: f3bf 8f4f dsb sy
- 8005302: e7fe b.n 8005302 <xQueueSemaphoreTake+0xae>
- taskEXIT_CRITICAL();
- 8005304: f7ff fa48 bl 8004798 <vPortExitCritical>
- return errQUEUE_EMPTY;
- 8005308: e7da b.n 80052c0 <xQueueSemaphoreTake+0x6c>
- vTaskInternalSetTimeOutState( &xTimeOut );
- 800530a: a802 add r0, sp, #8
- 800530c: f000 fdf6 bl 8005efc <vTaskInternalSetTimeOutState>
- xEntryTimeSet = pdTRUE;
- 8005310: 2501 movs r5, #1
- 8005312: e02a b.n 800536a <xQueueSemaphoreTake+0x116>
- prvLockQueue( pxQueue );
- 8005314: 2300 movs r3, #0
- 8005316: f884 3044 strb.w r3, [r4, #68] @ 0x44
- 800531a: e032 b.n 8005382 <xQueueSemaphoreTake+0x12e>
- 800531c: 2300 movs r3, #0
- 800531e: f884 3045 strb.w r3, [r4, #69] @ 0x45
- 8005322: e034 b.n 800538e <xQueueSemaphoreTake+0x13a>
- taskENTER_CRITICAL();
- 8005324: f7ff fa16 bl 8004754 <vPortEnterCritical>
- xInheritanceOccurred = xTaskPriorityInherit( pxQueue->u.xSemaphore.xMutexHolder );
- 8005328: 68a0 ldr r0, [r4, #8]
- 800532a: f000 fe51 bl 8005fd0 <xTaskPriorityInherit>
- 800532e: 4606 mov r6, r0
- taskEXIT_CRITICAL();
- 8005330: f7ff fa32 bl 8004798 <vPortExitCritical>
- 8005334: e03b b.n 80053ae <xQueueSemaphoreTake+0x15a>
- prvUnlockQueue( pxQueue );
- 8005336: 4620 mov r0, r4
- 8005338: f7ff fbd1 bl 8004ade <prvUnlockQueue>
- ( void ) xTaskResumeAll();
- 800533c: f000 fc62 bl 8005c04 <xTaskResumeAll>
- 8005340: e009 b.n 8005356 <xQueueSemaphoreTake+0x102>
- prvUnlockQueue( pxQueue );
- 8005342: 4620 mov r0, r4
- 8005344: f7ff fbcb bl 8004ade <prvUnlockQueue>
- ( void ) xTaskResumeAll();
- 8005348: f000 fc5c bl 8005c04 <xTaskResumeAll>
- if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
- 800534c: 4620 mov r0, r4
- 800534e: f7ff fb6c bl 8004a2a <prvIsQueueEmpty>
- 8005352: 2800 cmp r0, #0
- 8005354: d142 bne.n 80053dc <xQueueSemaphoreTake+0x188>
- taskENTER_CRITICAL();
- 8005356: f7ff f9fd bl 8004754 <vPortEnterCritical>
- const UBaseType_t uxSemaphoreCount = pxQueue->uxMessagesWaiting;
- 800535a: 6ba3 ldr r3, [r4, #56] @ 0x38
- if( uxSemaphoreCount > ( UBaseType_t ) 0 )
- 800535c: 2b00 cmp r3, #0
- 800535e: d1a6 bne.n 80052ae <xQueueSemaphoreTake+0x5a>
- if( xTicksToWait == ( TickType_t ) 0 )
- 8005360: 9b01 ldr r3, [sp, #4]
- 8005362: 2b00 cmp r3, #0
- 8005364: d0c4 beq.n 80052f0 <xQueueSemaphoreTake+0x9c>
- else if( xEntryTimeSet == pdFALSE )
- 8005366: 2d00 cmp r5, #0
- 8005368: d0cf beq.n 800530a <xQueueSemaphoreTake+0xb6>
- taskEXIT_CRITICAL();
- 800536a: f7ff fa15 bl 8004798 <vPortExitCritical>
- vTaskSuspendAll();
- 800536e: f000 fba7 bl 8005ac0 <vTaskSuspendAll>
- prvLockQueue( pxQueue );
- 8005372: f7ff f9ef bl 8004754 <vPortEnterCritical>
- 8005376: f894 3044 ldrb.w r3, [r4, #68] @ 0x44
- 800537a: b25b sxtb r3, r3
- 800537c: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
- 8005380: d0c8 beq.n 8005314 <xQueueSemaphoreTake+0xc0>
- 8005382: f894 3045 ldrb.w r3, [r4, #69] @ 0x45
- 8005386: b25b sxtb r3, r3
- 8005388: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
- 800538c: d0c6 beq.n 800531c <xQueueSemaphoreTake+0xc8>
- 800538e: f7ff fa03 bl 8004798 <vPortExitCritical>
- if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )
- 8005392: a901 add r1, sp, #4
- 8005394: a802 add r0, sp, #8
- 8005396: f000 fdbd bl 8005f14 <xTaskCheckForTimeOut>
- 800539a: 2800 cmp r0, #0
- 800539c: d1d1 bne.n 8005342 <xQueueSemaphoreTake+0xee>
- if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
- 800539e: 4620 mov r0, r4
- 80053a0: f7ff fb43 bl 8004a2a <prvIsQueueEmpty>
- 80053a4: 2800 cmp r0, #0
- 80053a6: d0c6 beq.n 8005336 <xQueueSemaphoreTake+0xe2>
- if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )
- 80053a8: 6823 ldr r3, [r4, #0]
- 80053aa: 2b00 cmp r3, #0
- 80053ac: d0ba beq.n 8005324 <xQueueSemaphoreTake+0xd0>
- vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
- 80053ae: 9901 ldr r1, [sp, #4]
- 80053b0: f104 0024 add.w r0, r4, #36 @ 0x24
- 80053b4: f000 fd28 bl 8005e08 <vTaskPlaceOnEventList>
- prvUnlockQueue( pxQueue );
- 80053b8: 4620 mov r0, r4
- 80053ba: f7ff fb90 bl 8004ade <prvUnlockQueue>
- if( xTaskResumeAll() == pdFALSE )
- 80053be: f000 fc21 bl 8005c04 <xTaskResumeAll>
- 80053c2: 2800 cmp r0, #0
- 80053c4: d1c7 bne.n 8005356 <xQueueSemaphoreTake+0x102>
- portYIELD_WITHIN_API();
- 80053c6: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 80053ca: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 80053ce: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- 80053d2: f3bf 8f4f dsb sy
- 80053d6: f3bf 8f6f isb sy
- 80053da: e7bc b.n 8005356 <xQueueSemaphoreTake+0x102>
- if( xInheritanceOccurred != pdFALSE )
- 80053dc: b90e cbnz r6, 80053e2 <xQueueSemaphoreTake+0x18e>
- return errQUEUE_EMPTY;
- 80053de: 2600 movs r6, #0
- 80053e0: e76e b.n 80052c0 <xQueueSemaphoreTake+0x6c>
- taskENTER_CRITICAL();
- 80053e2: f7ff f9b7 bl 8004754 <vPortEnterCritical>
- uxHighestWaitingPriority = prvGetDisinheritPriorityAfterTimeout( pxQueue );
- 80053e6: 4620 mov r0, r4
- 80053e8: f7ff fb08 bl 80049fc <prvGetDisinheritPriorityAfterTimeout>
- 80053ec: 4601 mov r1, r0
- vTaskPriorityDisinheritAfterTimeout( pxQueue->u.xSemaphore.xMutexHolder, uxHighestWaitingPriority );
- 80053ee: 68a0 ldr r0, [r4, #8]
- 80053f0: f000 fe82 bl 80060f8 <vTaskPriorityDisinheritAfterTimeout>
- taskEXIT_CRITICAL();
- 80053f4: f7ff f9d0 bl 8004798 <vPortExitCritical>
- 80053f8: e7f1 b.n 80053de <xQueueSemaphoreTake+0x18a>
- 080053fa <xQueueTakeMutexRecursive>:
- configASSERT( pxMutex );
- 80053fa: b180 cbz r0, 800541e <xQueueTakeMutexRecursive+0x24>
- {
- 80053fc: b570 push {r4, r5, r6, lr}
- 80053fe: 460c mov r4, r1
- 8005400: 4605 mov r5, r0
- if( pxMutex->u.xSemaphore.xMutexHolder == xTaskGetCurrentTaskHandle() )
- 8005402: 6886 ldr r6, [r0, #8]
- 8005404: f000 fdce bl 8005fa4 <xTaskGetCurrentTaskHandle>
- 8005408: 4286 cmp r6, r0
- 800540a: d011 beq.n 8005430 <xQueueTakeMutexRecursive+0x36>
- xReturn = xQueueSemaphoreTake( pxMutex, xTicksToWait );
- 800540c: 4621 mov r1, r4
- 800540e: 4628 mov r0, r5
- 8005410: f7ff ff20 bl 8005254 <xQueueSemaphoreTake>
- if( xReturn != pdFAIL )
- 8005414: b180 cbz r0, 8005438 <xQueueTakeMutexRecursive+0x3e>
- ( pxMutex->u.xSemaphore.uxRecursiveCallCount )++;
- 8005416: 68eb ldr r3, [r5, #12]
- 8005418: 3301 adds r3, #1
- 800541a: 60eb str r3, [r5, #12]
- return xReturn;
- 800541c: e00c b.n 8005438 <xQueueTakeMutexRecursive+0x3e>
- 800541e: f04f 0350 mov.w r3, #80 @ 0x50
- 8005422: f383 8811 msr BASEPRI, r3
- 8005426: f3bf 8f6f isb sy
- 800542a: f3bf 8f4f dsb sy
- configASSERT( pxMutex );
- 800542e: e7fe b.n 800542e <xQueueTakeMutexRecursive+0x34>
- ( pxMutex->u.xSemaphore.uxRecursiveCallCount )++;
- 8005430: 68eb ldr r3, [r5, #12]
- 8005432: 3301 adds r3, #1
- 8005434: 60eb str r3, [r5, #12]
- xReturn = pdPASS;
- 8005436: 2001 movs r0, #1
- }
- 8005438: bd70 pop {r4, r5, r6, pc}
- 0800543a <xQueueReceiveFromISR>:
- {
- 800543a: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
- configASSERT( pxQueue );
- 800543e: b1b0 cbz r0, 800546e <xQueueReceiveFromISR+0x34>
- 8005440: 460d mov r5, r1
- 8005442: 4690 mov r8, r2
- 8005444: 4604 mov r4, r0
- configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
- 8005446: b1d9 cbz r1, 8005480 <xQueueReceiveFromISR+0x46>
- portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
- 8005448: f7ff faaa bl 80049a0 <vPortValidateInterruptPriority>
- __asm volatile
- 800544c: f3ef 8711 mrs r7, BASEPRI
- 8005450: f04f 0350 mov.w r3, #80 @ 0x50
- 8005454: f383 8811 msr BASEPRI, r3
- 8005458: f3bf 8f6f isb sy
- 800545c: f3bf 8f4f dsb sy
- const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
- 8005460: 6ba6 ldr r6, [r4, #56] @ 0x38
- if( uxMessagesWaiting > ( UBaseType_t ) 0 )
- 8005462: b9ce cbnz r6, 8005498 <xQueueReceiveFromISR+0x5e>
- xReturn = pdFAIL;
- 8005464: 2000 movs r0, #0
- __asm volatile
- 8005466: f387 8811 msr BASEPRI, r7
- }
- 800546a: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
- __asm volatile
- 800546e: f04f 0350 mov.w r3, #80 @ 0x50
- 8005472: f383 8811 msr BASEPRI, r3
- 8005476: f3bf 8f6f isb sy
- 800547a: f3bf 8f4f dsb sy
- configASSERT( pxQueue );
- 800547e: e7fe b.n 800547e <xQueueReceiveFromISR+0x44>
- configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
- 8005480: 6c03 ldr r3, [r0, #64] @ 0x40
- 8005482: 2b00 cmp r3, #0
- 8005484: d0e0 beq.n 8005448 <xQueueReceiveFromISR+0xe>
- 8005486: f04f 0350 mov.w r3, #80 @ 0x50
- 800548a: f383 8811 msr BASEPRI, r3
- 800548e: f3bf 8f6f isb sy
- 8005492: f3bf 8f4f dsb sy
- 8005496: e7fe b.n 8005496 <xQueueReceiveFromISR+0x5c>
- const int8_t cRxLock = pxQueue->cRxLock;
- 8005498: f894 9044 ldrb.w r9, [r4, #68] @ 0x44
- 800549c: fa4f f989 sxtb.w r9, r9
- prvCopyDataFromQueue( pxQueue, pvBuffer );
- 80054a0: 4629 mov r1, r5
- 80054a2: 4620 mov r0, r4
- 80054a4: f7ff fb09 bl 8004aba <prvCopyDataFromQueue>
- pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1;
- 80054a8: 1e73 subs r3, r6, #1
- 80054aa: 63a3 str r3, [r4, #56] @ 0x38
- if( cRxLock == queueUNLOCKED )
- 80054ac: f1b9 3fff cmp.w r9, #4294967295 @ 0xffffffff
- 80054b0: d006 beq.n 80054c0 <xQueueReceiveFromISR+0x86>
- pxQueue->cRxLock = ( int8_t ) ( cRxLock + 1 );
- 80054b2: f109 0301 add.w r3, r9, #1
- 80054b6: b25b sxtb r3, r3
- 80054b8: f884 3044 strb.w r3, [r4, #68] @ 0x44
- xReturn = pdPASS;
- 80054bc: 2001 movs r0, #1
- 80054be: e7d2 b.n 8005466 <xQueueReceiveFromISR+0x2c>
- if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
- 80054c0: 6923 ldr r3, [r4, #16]
- 80054c2: b90b cbnz r3, 80054c8 <xQueueReceiveFromISR+0x8e>
- xReturn = pdPASS;
- 80054c4: 2001 movs r0, #1
- 80054c6: e7ce b.n 8005466 <xQueueReceiveFromISR+0x2c>
- if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
- 80054c8: f104 0010 add.w r0, r4, #16
- 80054cc: f000 fcd0 bl 8005e70 <xTaskRemoveFromEventList>
- 80054d0: b130 cbz r0, 80054e0 <xQueueReceiveFromISR+0xa6>
- if( pxHigherPriorityTaskWoken != NULL )
- 80054d2: f1b8 0f00 cmp.w r8, #0
- 80054d6: d005 beq.n 80054e4 <xQueueReceiveFromISR+0xaa>
- *pxHigherPriorityTaskWoken = pdTRUE;
- 80054d8: 2001 movs r0, #1
- 80054da: f8c8 0000 str.w r0, [r8]
- 80054de: e7c2 b.n 8005466 <xQueueReceiveFromISR+0x2c>
- xReturn = pdPASS;
- 80054e0: 2001 movs r0, #1
- 80054e2: e7c0 b.n 8005466 <xQueueReceiveFromISR+0x2c>
- 80054e4: 2001 movs r0, #1
- 80054e6: e7be b.n 8005466 <xQueueReceiveFromISR+0x2c>
- 080054e8 <uxQueueMessagesWaiting>:
- configASSERT( xQueue );
- 80054e8: b140 cbz r0, 80054fc <uxQueueMessagesWaiting+0x14>
- {
- 80054ea: b510 push {r4, lr}
- 80054ec: 4604 mov r4, r0
- taskENTER_CRITICAL();
- 80054ee: f7ff f931 bl 8004754 <vPortEnterCritical>
- uxReturn = ( ( Queue_t * ) xQueue )->uxMessagesWaiting;
- 80054f2: 6ba4 ldr r4, [r4, #56] @ 0x38
- taskEXIT_CRITICAL();
- 80054f4: f7ff f950 bl 8004798 <vPortExitCritical>
- } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */
- 80054f8: 4620 mov r0, r4
- 80054fa: bd10 pop {r4, pc}
- 80054fc: f04f 0350 mov.w r3, #80 @ 0x50
- 8005500: f383 8811 msr BASEPRI, r3
- 8005504: f3bf 8f6f isb sy
- 8005508: f3bf 8f4f dsb sy
- configASSERT( xQueue );
- 800550c: e7fe b.n 800550c <uxQueueMessagesWaiting+0x24>
- 0800550e <uxQueueMessagesWaitingFromISR>:
- configASSERT( pxQueue );
- 800550e: b108 cbz r0, 8005514 <uxQueueMessagesWaitingFromISR+0x6>
- uxReturn = pxQueue->uxMessagesWaiting;
- 8005510: 6b80 ldr r0, [r0, #56] @ 0x38
- } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */
- 8005512: 4770 bx lr
- 8005514: f04f 0350 mov.w r3, #80 @ 0x50
- 8005518: f383 8811 msr BASEPRI, r3
- 800551c: f3bf 8f6f isb sy
- 8005520: f3bf 8f4f dsb sy
- configASSERT( pxQueue );
- 8005524: e7fe b.n 8005524 <uxQueueMessagesWaitingFromISR+0x16>
- ...
- 08005528 <vQueueAddToRegistry>:
- {
- UBaseType_t ux;
- /* See if there is an empty space in the registry. A NULL name denotes
- a free slot. */
- for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
- 8005528: 2300 movs r3, #0
- 800552a: 2b07 cmp r3, #7
- 800552c: d80c bhi.n 8005548 <vQueueAddToRegistry+0x20>
- {
- if( xQueueRegistry[ ux ].pcQueueName == NULL )
- 800552e: 4a07 ldr r2, [pc, #28] @ (800554c <vQueueAddToRegistry+0x24>)
- 8005530: f852 2033 ldr.w r2, [r2, r3, lsl #3]
- 8005534: b10a cbz r2, 800553a <vQueueAddToRegistry+0x12>
- for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
- 8005536: 3301 adds r3, #1
- 8005538: e7f7 b.n 800552a <vQueueAddToRegistry+0x2>
- {
- /* Store the information on this queue. */
- xQueueRegistry[ ux ].pcQueueName = pcQueueName;
- 800553a: 4a04 ldr r2, [pc, #16] @ (800554c <vQueueAddToRegistry+0x24>)
- 800553c: f842 1033 str.w r1, [r2, r3, lsl #3]
- xQueueRegistry[ ux ].xHandle = xQueue;
- 8005540: eb02 02c3 add.w r2, r2, r3, lsl #3
- 8005544: 6050 str r0, [r2, #4]
- traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName );
- break;
- 8005546: 4770 bx lr
- else
- {
- mtCOVERAGE_TEST_MARKER();
- }
- }
- }
- 8005548: 4770 bx lr
- 800554a: bf00 nop
- 800554c: 24012888 .word 0x24012888
- 08005550 <vQueueUnregisterQueue>:
- {
- UBaseType_t ux;
- /* See if the handle of the queue being unregistered in actually in the
- registry. */
- for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
- 8005550: 2300 movs r3, #0
- 8005552: 2b07 cmp r3, #7
- 8005554: d80f bhi.n 8005576 <vQueueUnregisterQueue+0x26>
- {
- if( xQueueRegistry[ ux ].xHandle == xQueue )
- 8005556: 4a08 ldr r2, [pc, #32] @ (8005578 <vQueueUnregisterQueue+0x28>)
- 8005558: eb02 02c3 add.w r2, r2, r3, lsl #3
- 800555c: 6852 ldr r2, [r2, #4]
- 800555e: 4282 cmp r2, r0
- 8005560: d001 beq.n 8005566 <vQueueUnregisterQueue+0x16>
- for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
- 8005562: 3301 adds r3, #1
- 8005564: e7f5 b.n 8005552 <vQueueUnregisterQueue+0x2>
- {
- /* Set the name to NULL to show that this slot if free again. */
- xQueueRegistry[ ux ].pcQueueName = NULL;
- 8005566: 4a04 ldr r2, [pc, #16] @ (8005578 <vQueueUnregisterQueue+0x28>)
- 8005568: 2100 movs r1, #0
- 800556a: f842 1033 str.w r1, [r2, r3, lsl #3]
- /* Set the handle to NULL to ensure the same queue handle cannot
- appear in the registry twice if it is added, removed, then
- added again. */
- xQueueRegistry[ ux ].xHandle = ( QueueHandle_t ) 0;
- 800556e: eb02 02c3 add.w r2, r2, r3, lsl #3
- 8005572: 6051 str r1, [r2, #4]
- break;
- 8005574: 4770 bx lr
- {
- mtCOVERAGE_TEST_MARKER();
- }
- }
- } /*lint !e818 xQueue could not be pointer to const because it is a typedef. */
- 8005576: 4770 bx lr
- 8005578: 24012888 .word 0x24012888
- 0800557c <vQueueDelete>:
- configASSERT( pxQueue );
- 800557c: b138 cbz r0, 800558e <vQueueDelete+0x12>
- {
- 800557e: b510 push {r4, lr}
- 8005580: 4604 mov r4, r0
- vQueueUnregisterQueue( pxQueue );
- 8005582: f7ff ffe5 bl 8005550 <vQueueUnregisterQueue>
- if( pxQueue->ucStaticallyAllocated == ( uint8_t ) pdFALSE )
- 8005586: f894 3046 ldrb.w r3, [r4, #70] @ 0x46
- 800558a: b14b cbz r3, 80055a0 <vQueueDelete+0x24>
- }
- 800558c: bd10 pop {r4, pc}
- 800558e: f04f 0350 mov.w r3, #80 @ 0x50
- 8005592: f383 8811 msr BASEPRI, r3
- 8005596: f3bf 8f6f isb sy
- 800559a: f3bf 8f4f dsb sy
- configASSERT( pxQueue );
- 800559e: e7fe b.n 800559e <vQueueDelete+0x22>
- vPortFree( pxQueue );
- 80055a0: 4620 mov r0, r4
- 80055a2: f7fe ffe9 bl 8004578 <vPortFree>
- }
- 80055a6: e7f1 b.n 800558c <vQueueDelete+0x10>
- 080055a8 <vQueueWaitForMessageRestricted>:
- /*-----------------------------------------------------------*/
- #if ( configUSE_TIMERS == 1 )
- void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely )
- {
- 80055a8: b570 push {r4, r5, r6, lr}
- 80055aa: 4604 mov r4, r0
- 80055ac: 460d mov r5, r1
- 80055ae: 4616 mov r6, r2
- will not actually cause the task to block, just place it on a blocked
- list. It will not block until the scheduler is unlocked - at which
- time a yield will be performed. If an item is added to the queue while
- the queue is locked, and the calling task blocks on the queue, then the
- calling task will be immediately unblocked when the queue is unlocked. */
- prvLockQueue( pxQueue );
- 80055b0: f7ff f8d0 bl 8004754 <vPortEnterCritical>
- 80055b4: f894 3044 ldrb.w r3, [r4, #68] @ 0x44
- 80055b8: b25b sxtb r3, r3
- 80055ba: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
- 80055be: d00d beq.n 80055dc <vQueueWaitForMessageRestricted+0x34>
- 80055c0: f894 3045 ldrb.w r3, [r4, #69] @ 0x45
- 80055c4: b25b sxtb r3, r3
- 80055c6: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
- 80055ca: d00b beq.n 80055e4 <vQueueWaitForMessageRestricted+0x3c>
- 80055cc: f7ff f8e4 bl 8004798 <vPortExitCritical>
- if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0U )
- 80055d0: 6ba3 ldr r3, [r4, #56] @ 0x38
- 80055d2: b15b cbz r3, 80055ec <vQueueWaitForMessageRestricted+0x44>
- }
- else
- {
- mtCOVERAGE_TEST_MARKER();
- }
- prvUnlockQueue( pxQueue );
- 80055d4: 4620 mov r0, r4
- 80055d6: f7ff fa82 bl 8004ade <prvUnlockQueue>
- }
- 80055da: bd70 pop {r4, r5, r6, pc}
- prvLockQueue( pxQueue );
- 80055dc: 2300 movs r3, #0
- 80055de: f884 3044 strb.w r3, [r4, #68] @ 0x44
- 80055e2: e7ed b.n 80055c0 <vQueueWaitForMessageRestricted+0x18>
- 80055e4: 2300 movs r3, #0
- 80055e6: f884 3045 strb.w r3, [r4, #69] @ 0x45
- 80055ea: e7ef b.n 80055cc <vQueueWaitForMessageRestricted+0x24>
- vTaskPlaceOnEventListRestricted( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait, xWaitIndefinitely );
- 80055ec: 4632 mov r2, r6
- 80055ee: 4629 mov r1, r5
- 80055f0: f104 0024 add.w r0, r4, #36 @ 0x24
- 80055f4: f000 fc20 bl 8005e38 <vTaskPlaceOnEventListRestricted>
- 80055f8: e7ec b.n 80055d4 <vQueueWaitForMessageRestricted+0x2c>
- ...
- 080055fc <prvResetNextTaskUnblockTime>:
- static void prvResetNextTaskUnblockTime( void )
- {
- TCB_t *pxTCB;
- if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE )
- 80055fc: 4b08 ldr r3, [pc, #32] @ (8005620 <prvResetNextTaskUnblockTime+0x24>)
- 80055fe: 681b ldr r3, [r3, #0]
- 8005600: 681b ldr r3, [r3, #0]
- 8005602: b923 cbnz r3, 800560e <prvResetNextTaskUnblockTime+0x12>
- {
- /* The new current delayed list is empty. Set xNextTaskUnblockTime to
- the maximum possible value so it is extremely unlikely that the
- if( xTickCount >= xNextTaskUnblockTime ) test will pass until
- there is an item in the delayed list. */
- xNextTaskUnblockTime = portMAX_DELAY;
- 8005604: 4b07 ldr r3, [pc, #28] @ (8005624 <prvResetNextTaskUnblockTime+0x28>)
- 8005606: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff
- 800560a: 601a str r2, [r3, #0]
- 800560c: 4770 bx lr
- {
- /* The new current delayed list is not empty, get the value of
- the item at the head of the delayed list. This is the time at
- which the task at the head of the delayed list should be removed
- from the Blocked state. */
- ( pxTCB ) = listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
- 800560e: 4b04 ldr r3, [pc, #16] @ (8005620 <prvResetNextTaskUnblockTime+0x24>)
- 8005610: 681b ldr r3, [r3, #0]
- 8005612: 68db ldr r3, [r3, #12]
- 8005614: 68db ldr r3, [r3, #12]
- xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xStateListItem ) );
- 8005616: 685a ldr r2, [r3, #4]
- 8005618: 4b02 ldr r3, [pc, #8] @ (8005624 <prvResetNextTaskUnblockTime+0x28>)
- 800561a: 601a str r2, [r3, #0]
- }
- }
- 800561c: 4770 bx lr
- 800561e: bf00 nop
- 8005620: 24012938 .word 0x24012938
- 8005624: 240128d0 .word 0x240128d0
- 08005628 <prvInitialiseNewTask>:
- {
- 8005628: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
- 800562c: 4680 mov r8, r0
- 800562e: 460d mov r5, r1
- 8005630: 4617 mov r7, r2
- 8005632: 4699 mov r9, r3
- 8005634: 9e08 ldr r6, [sp, #32]
- 8005636: f8dd a024 ldr.w sl, [sp, #36] @ 0x24
- 800563a: 9c0a ldr r4, [sp, #40] @ 0x28
- ( void ) memset( pxNewTCB->pxStack, ( int ) tskSTACK_FILL_BYTE, ( size_t ) ulStackDepth * sizeof( StackType_t ) );
- 800563c: 0092 lsls r2, r2, #2
- 800563e: 21a5 movs r1, #165 @ 0xa5
- 8005640: 6b20 ldr r0, [r4, #48] @ 0x30
- 8005642: f00e f839 bl 80136b8 <memset>
- pxTopOfStack = &( pxNewTCB->pxStack[ ulStackDepth - ( uint32_t ) 1 ] );
- 8005646: 6b23 ldr r3, [r4, #48] @ 0x30
- 8005648: f06f 4240 mvn.w r2, #3221225472 @ 0xc0000000
- 800564c: 443a add r2, r7
- 800564e: eb03 0782 add.w r7, r3, r2, lsl #2
- pxTopOfStack = ( StackType_t * ) ( ( ( portPOINTER_SIZE_TYPE ) pxTopOfStack ) & ( ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) ) ); /*lint !e923 !e9033 !e9078 MISRA exception. Avoiding casts between pointers and integers is not practical. Size differences accounted for using portPOINTER_SIZE_TYPE type. Checked by assert(). */
- 8005652: f027 0707 bic.w r7, r7, #7
- if( pcName != NULL )
- 8005656: 2d00 cmp r5, #0
- 8005658: d042 beq.n 80056e0 <prvInitialiseNewTask+0xb8>
- for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ )
- 800565a: f04f 0c00 mov.w ip, #0
- 800565e: f1bc 0f0f cmp.w ip, #15
- 8005662: d809 bhi.n 8005678 <prvInitialiseNewTask+0x50>
- pxNewTCB->pcTaskName[ x ] = pcName[ x ];
- 8005664: f815 300c ldrb.w r3, [r5, ip]
- 8005668: eb04 020c add.w r2, r4, ip
- 800566c: f882 3034 strb.w r3, [r2, #52] @ 0x34
- if( pcName[ x ] == ( char ) 0x00 )
- 8005670: b113 cbz r3, 8005678 <prvInitialiseNewTask+0x50>
- for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ )
- 8005672: f10c 0c01 add.w ip, ip, #1
- 8005676: e7f2 b.n 800565e <prvInitialiseNewTask+0x36>
- pxNewTCB->pcTaskName[ configMAX_TASK_NAME_LEN - 1 ] = '\0';
- 8005678: 2300 movs r3, #0
- 800567a: f884 3043 strb.w r3, [r4, #67] @ 0x43
- if( uxPriority >= ( UBaseType_t ) configMAX_PRIORITIES )
- 800567e: 2e37 cmp r6, #55 @ 0x37
- 8005680: d900 bls.n 8005684 <prvInitialiseNewTask+0x5c>
- uxPriority = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) 1U;
- 8005682: 2637 movs r6, #55 @ 0x37
- pxNewTCB->uxPriority = uxPriority;
- 8005684: 62e6 str r6, [r4, #44] @ 0x2c
- pxNewTCB->uxBasePriority = uxPriority;
- 8005686: 64e6 str r6, [r4, #76] @ 0x4c
- pxNewTCB->uxMutexesHeld = 0;
- 8005688: 2500 movs r5, #0
- 800568a: 6525 str r5, [r4, #80] @ 0x50
- vListInitialiseItem( &( pxNewTCB->xStateListItem ) );
- 800568c: 1d20 adds r0, r4, #4
- 800568e: f7fe ffbc bl 800460a <vListInitialiseItem>
- vListInitialiseItem( &( pxNewTCB->xEventListItem ) );
- 8005692: f104 0018 add.w r0, r4, #24
- 8005696: f7fe ffb8 bl 800460a <vListInitialiseItem>
- listSET_LIST_ITEM_OWNER( &( pxNewTCB->xStateListItem ), pxNewTCB );
- 800569a: 6124 str r4, [r4, #16]
- listSET_LIST_ITEM_VALUE( &( pxNewTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
- 800569c: f1c6 0638 rsb r6, r6, #56 @ 0x38
- 80056a0: 61a6 str r6, [r4, #24]
- listSET_LIST_ITEM_OWNER( &( pxNewTCB->xEventListItem ), pxNewTCB );
- 80056a2: 6264 str r4, [r4, #36] @ 0x24
- pxNewTCB->ulNotifiedValue = 0;
- 80056a4: f8c4 50a0 str.w r5, [r4, #160] @ 0xa0
- pxNewTCB->ucNotifyState = taskNOT_WAITING_NOTIFICATION;
- 80056a8: f884 50a4 strb.w r5, [r4, #164] @ 0xa4
- _REENT_INIT_PTR( ( &( pxNewTCB->xNewLib_reent ) ) );
- 80056ac: 224c movs r2, #76 @ 0x4c
- 80056ae: 4629 mov r1, r5
- 80056b0: f104 0054 add.w r0, r4, #84 @ 0x54
- 80056b4: f00e f800 bl 80136b8 <memset>
- 80056b8: 4b0b ldr r3, [pc, #44] @ (80056e8 <prvInitialiseNewTask+0xc0>)
- 80056ba: 65a3 str r3, [r4, #88] @ 0x58
- 80056bc: f103 0268 add.w r2, r3, #104 @ 0x68
- 80056c0: 65e2 str r2, [r4, #92] @ 0x5c
- 80056c2: 33d0 adds r3, #208 @ 0xd0
- 80056c4: 6623 str r3, [r4, #96] @ 0x60
- pxNewTCB->pxTopOfStack = pxPortInitialiseStack( pxTopOfStack, pxTaskCode, pvParameters );
- 80056c6: 464a mov r2, r9
- 80056c8: 4641 mov r1, r8
- 80056ca: 4638 mov r0, r7
- 80056cc: f7ff f816 bl 80046fc <pxPortInitialiseStack>
- 80056d0: 6020 str r0, [r4, #0]
- if( pxCreatedTask != NULL )
- 80056d2: f1ba 0f00 cmp.w sl, #0
- 80056d6: d001 beq.n 80056dc <prvInitialiseNewTask+0xb4>
- *pxCreatedTask = ( TaskHandle_t ) pxNewTCB;
- 80056d8: f8ca 4000 str.w r4, [sl]
- }
- 80056dc: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
- pxNewTCB->pcTaskName[ 0 ] = 0x00;
- 80056e0: 2300 movs r3, #0
- 80056e2: f884 3034 strb.w r3, [r4, #52] @ 0x34
- 80056e6: e7ca b.n 800567e <prvInitialiseNewTask+0x56>
- 80056e8: 24019c50 .word 0x24019c50
- 080056ec <prvInitialiseTaskLists>:
- {
- 80056ec: b538 push {r3, r4, r5, lr}
- for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ )
- 80056ee: 2400 movs r4, #0
- 80056f0: e007 b.n 8005702 <prvInitialiseTaskLists+0x16>
- vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) );
- 80056f2: eb04 0284 add.w r2, r4, r4, lsl #2
- 80056f6: 0093 lsls r3, r2, #2
- 80056f8: 480e ldr r0, [pc, #56] @ (8005734 <prvInitialiseTaskLists+0x48>)
- 80056fa: 4418 add r0, r3
- 80056fc: f7fe ff7a bl 80045f4 <vListInitialise>
- for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ )
- 8005700: 3401 adds r4, #1
- 8005702: 2c37 cmp r4, #55 @ 0x37
- 8005704: d9f5 bls.n 80056f2 <prvInitialiseTaskLists+0x6>
- vListInitialise( &xDelayedTaskList1 );
- 8005706: 4d0c ldr r5, [pc, #48] @ (8005738 <prvInitialiseTaskLists+0x4c>)
- 8005708: 4628 mov r0, r5
- 800570a: f7fe ff73 bl 80045f4 <vListInitialise>
- vListInitialise( &xDelayedTaskList2 );
- 800570e: 4c0b ldr r4, [pc, #44] @ (800573c <prvInitialiseTaskLists+0x50>)
- 8005710: 4620 mov r0, r4
- 8005712: f7fe ff6f bl 80045f4 <vListInitialise>
- vListInitialise( &xPendingReadyList );
- 8005716: 480a ldr r0, [pc, #40] @ (8005740 <prvInitialiseTaskLists+0x54>)
- 8005718: f7fe ff6c bl 80045f4 <vListInitialise>
- vListInitialise( &xTasksWaitingTermination );
- 800571c: 4809 ldr r0, [pc, #36] @ (8005744 <prvInitialiseTaskLists+0x58>)
- 800571e: f7fe ff69 bl 80045f4 <vListInitialise>
- vListInitialise( &xSuspendedTaskList );
- 8005722: 4809 ldr r0, [pc, #36] @ (8005748 <prvInitialiseTaskLists+0x5c>)
- 8005724: f7fe ff66 bl 80045f4 <vListInitialise>
- pxDelayedTaskList = &xDelayedTaskList1;
- 8005728: 4b08 ldr r3, [pc, #32] @ (800574c <prvInitialiseTaskLists+0x60>)
- 800572a: 601d str r5, [r3, #0]
- pxOverflowDelayedTaskList = &xDelayedTaskList2;
- 800572c: 4b08 ldr r3, [pc, #32] @ (8005750 <prvInitialiseTaskLists+0x64>)
- 800572e: 601c str r4, [r3, #0]
- }
- 8005730: bd38 pop {r3, r4, r5, pc}
- 8005732: bf00 nop
- 8005734: 24012964 .word 0x24012964
- 8005738: 24012950 .word 0x24012950
- 800573c: 2401293c .word 0x2401293c
- 8005740: 24012920 .word 0x24012920
- 8005744: 2401290c .word 0x2401290c
- 8005748: 240128f4 .word 0x240128f4
- 800574c: 24012938 .word 0x24012938
- 8005750: 24012934 .word 0x24012934
- 08005754 <prvAddNewTaskToReadyList>:
- {
- 8005754: b510 push {r4, lr}
- 8005756: 4604 mov r4, r0
- taskENTER_CRITICAL();
- 8005758: f7fe fffc bl 8004754 <vPortEnterCritical>
- uxCurrentNumberOfTasks++;
- 800575c: 4a22 ldr r2, [pc, #136] @ (80057e8 <prvAddNewTaskToReadyList+0x94>)
- 800575e: 6813 ldr r3, [r2, #0]
- 8005760: 3301 adds r3, #1
- 8005762: 6013 str r3, [r2, #0]
- if( pxCurrentTCB == NULL )
- 8005764: 4b21 ldr r3, [pc, #132] @ (80057ec <prvAddNewTaskToReadyList+0x98>)
- 8005766: 681b ldr r3, [r3, #0]
- 8005768: b15b cbz r3, 8005782 <prvAddNewTaskToReadyList+0x2e>
- if( xSchedulerRunning == pdFALSE )
- 800576a: 4b21 ldr r3, [pc, #132] @ (80057f0 <prvAddNewTaskToReadyList+0x9c>)
- 800576c: 681b ldr r3, [r3, #0]
- 800576e: b96b cbnz r3, 800578c <prvAddNewTaskToReadyList+0x38>
- if( pxCurrentTCB->uxPriority <= pxNewTCB->uxPriority )
- 8005770: 4b1e ldr r3, [pc, #120] @ (80057ec <prvAddNewTaskToReadyList+0x98>)
- 8005772: 681b ldr r3, [r3, #0]
- 8005774: 6ada ldr r2, [r3, #44] @ 0x2c
- 8005776: 6ae3 ldr r3, [r4, #44] @ 0x2c
- 8005778: 429a cmp r2, r3
- 800577a: d807 bhi.n 800578c <prvAddNewTaskToReadyList+0x38>
- pxCurrentTCB = pxNewTCB;
- 800577c: 4b1b ldr r3, [pc, #108] @ (80057ec <prvAddNewTaskToReadyList+0x98>)
- 800577e: 601c str r4, [r3, #0]
- 8005780: e004 b.n 800578c <prvAddNewTaskToReadyList+0x38>
- pxCurrentTCB = pxNewTCB;
- 8005782: 4b1a ldr r3, [pc, #104] @ (80057ec <prvAddNewTaskToReadyList+0x98>)
- 8005784: 601c str r4, [r3, #0]
- if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 )
- 8005786: 6813 ldr r3, [r2, #0]
- 8005788: 2b01 cmp r3, #1
- 800578a: d029 beq.n 80057e0 <prvAddNewTaskToReadyList+0x8c>
- uxTaskNumber++;
- 800578c: 4a19 ldr r2, [pc, #100] @ (80057f4 <prvAddNewTaskToReadyList+0xa0>)
- 800578e: 6813 ldr r3, [r2, #0]
- 8005790: 3301 adds r3, #1
- 8005792: 6013 str r3, [r2, #0]
- pxNewTCB->uxTCBNumber = uxTaskNumber;
- 8005794: 6463 str r3, [r4, #68] @ 0x44
- prvAddTaskToReadyList( pxNewTCB );
- 8005796: 6ae0 ldr r0, [r4, #44] @ 0x2c
- 8005798: 4b17 ldr r3, [pc, #92] @ (80057f8 <prvAddNewTaskToReadyList+0xa4>)
- 800579a: 681b ldr r3, [r3, #0]
- 800579c: 4298 cmp r0, r3
- 800579e: d901 bls.n 80057a4 <prvAddNewTaskToReadyList+0x50>
- 80057a0: 4b15 ldr r3, [pc, #84] @ (80057f8 <prvAddNewTaskToReadyList+0xa4>)
- 80057a2: 6018 str r0, [r3, #0]
- 80057a4: eb00 0080 add.w r0, r0, r0, lsl #2
- 80057a8: 1d21 adds r1, r4, #4
- 80057aa: 4b14 ldr r3, [pc, #80] @ (80057fc <prvAddNewTaskToReadyList+0xa8>)
- 80057ac: eb03 0080 add.w r0, r3, r0, lsl #2
- 80057b0: f7fe ff2e bl 8004610 <vListInsertEnd>
- taskEXIT_CRITICAL();
- 80057b4: f7fe fff0 bl 8004798 <vPortExitCritical>
- if( xSchedulerRunning != pdFALSE )
- 80057b8: 4b0d ldr r3, [pc, #52] @ (80057f0 <prvAddNewTaskToReadyList+0x9c>)
- 80057ba: 681b ldr r3, [r3, #0]
- 80057bc: b17b cbz r3, 80057de <prvAddNewTaskToReadyList+0x8a>
- if( pxCurrentTCB->uxPriority < pxNewTCB->uxPriority )
- 80057be: 4b0b ldr r3, [pc, #44] @ (80057ec <prvAddNewTaskToReadyList+0x98>)
- 80057c0: 681b ldr r3, [r3, #0]
- 80057c2: 6ada ldr r2, [r3, #44] @ 0x2c
- 80057c4: 6ae3 ldr r3, [r4, #44] @ 0x2c
- 80057c6: 429a cmp r2, r3
- 80057c8: d209 bcs.n 80057de <prvAddNewTaskToReadyList+0x8a>
- taskYIELD_IF_USING_PREEMPTION();
- 80057ca: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 80057ce: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 80057d2: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- 80057d6: f3bf 8f4f dsb sy
- 80057da: f3bf 8f6f isb sy
- }
- 80057de: bd10 pop {r4, pc}
- prvInitialiseTaskLists();
- 80057e0: f7ff ff84 bl 80056ec <prvInitialiseTaskLists>
- 80057e4: e7d2 b.n 800578c <prvAddNewTaskToReadyList+0x38>
- 80057e6: bf00 nop
- 80057e8: 240128f0 .word 0x240128f0
- 80057ec: 24012dc4 .word 0x24012dc4
- 80057f0: 240128e4 .word 0x240128e4
- 80057f4: 240128d4 .word 0x240128d4
- 80057f8: 240128e8 .word 0x240128e8
- 80057fc: 24012964 .word 0x24012964
- 08005800 <prvDeleteTCB>:
- {
- 8005800: b510 push {r4, lr}
- 8005802: 4604 mov r4, r0
- _reclaim_reent( &( pxTCB->xNewLib_reent ) );
- 8005804: 3054 adds r0, #84 @ 0x54
- 8005806: f00d ff81 bl 801370c <_reclaim_reent>
- if( pxTCB->ucStaticallyAllocated == tskDYNAMICALLY_ALLOCATED_STACK_AND_TCB )
- 800580a: f894 30a5 ldrb.w r3, [r4, #165] @ 0xa5
- 800580e: b163 cbz r3, 800582a <prvDeleteTCB+0x2a>
- else if( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_ONLY )
- 8005810: 2b01 cmp r3, #1
- 8005812: d011 beq.n 8005838 <prvDeleteTCB+0x38>
- configASSERT( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB );
- 8005814: 2b02 cmp r3, #2
- 8005816: d00e beq.n 8005836 <prvDeleteTCB+0x36>
- 8005818: f04f 0350 mov.w r3, #80 @ 0x50
- 800581c: f383 8811 msr BASEPRI, r3
- 8005820: f3bf 8f6f isb sy
- 8005824: f3bf 8f4f dsb sy
- 8005828: e7fe b.n 8005828 <prvDeleteTCB+0x28>
- vPortFree( pxTCB->pxStack );
- 800582a: 6b20 ldr r0, [r4, #48] @ 0x30
- 800582c: f7fe fea4 bl 8004578 <vPortFree>
- vPortFree( pxTCB );
- 8005830: 4620 mov r0, r4
- 8005832: f7fe fea1 bl 8004578 <vPortFree>
- }
- 8005836: bd10 pop {r4, pc}
- vPortFree( pxTCB );
- 8005838: 4620 mov r0, r4
- 800583a: f7fe fe9d bl 8004578 <vPortFree>
- 800583e: e7fa b.n 8005836 <prvDeleteTCB+0x36>
- 08005840 <prvCheckTasksWaitingTermination>:
- while( uxDeletedTasksWaitingCleanUp > ( UBaseType_t ) 0U )
- 8005840: 4b0f ldr r3, [pc, #60] @ (8005880 <prvCheckTasksWaitingTermination+0x40>)
- 8005842: 681b ldr r3, [r3, #0]
- 8005844: b1d3 cbz r3, 800587c <prvCheckTasksWaitingTermination+0x3c>
- {
- 8005846: b510 push {r4, lr}
- taskENTER_CRITICAL();
- 8005848: f7fe ff84 bl 8004754 <vPortEnterCritical>
- pxTCB = listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
- 800584c: 4b0d ldr r3, [pc, #52] @ (8005884 <prvCheckTasksWaitingTermination+0x44>)
- 800584e: 68db ldr r3, [r3, #12]
- 8005850: 68dc ldr r4, [r3, #12]
- ( void ) uxListRemove( &( pxTCB->xStateListItem ) );
- 8005852: 1d20 adds r0, r4, #4
- 8005854: f7fe ff00 bl 8004658 <uxListRemove>
- --uxCurrentNumberOfTasks;
- 8005858: 4a0b ldr r2, [pc, #44] @ (8005888 <prvCheckTasksWaitingTermination+0x48>)
- 800585a: 6813 ldr r3, [r2, #0]
- 800585c: 3b01 subs r3, #1
- 800585e: 6013 str r3, [r2, #0]
- --uxDeletedTasksWaitingCleanUp;
- 8005860: 4a07 ldr r2, [pc, #28] @ (8005880 <prvCheckTasksWaitingTermination+0x40>)
- 8005862: 6813 ldr r3, [r2, #0]
- 8005864: 3b01 subs r3, #1
- 8005866: 6013 str r3, [r2, #0]
- taskEXIT_CRITICAL();
- 8005868: f7fe ff96 bl 8004798 <vPortExitCritical>
- prvDeleteTCB( pxTCB );
- 800586c: 4620 mov r0, r4
- 800586e: f7ff ffc7 bl 8005800 <prvDeleteTCB>
- while( uxDeletedTasksWaitingCleanUp > ( UBaseType_t ) 0U )
- 8005872: 4b03 ldr r3, [pc, #12] @ (8005880 <prvCheckTasksWaitingTermination+0x40>)
- 8005874: 681b ldr r3, [r3, #0]
- 8005876: 2b00 cmp r3, #0
- 8005878: d1e6 bne.n 8005848 <prvCheckTasksWaitingTermination+0x8>
- }
- 800587a: bd10 pop {r4, pc}
- 800587c: 4770 bx lr
- 800587e: bf00 nop
- 8005880: 24012908 .word 0x24012908
- 8005884: 2401290c .word 0x2401290c
- 8005888: 240128f0 .word 0x240128f0
- 0800588c <prvIdleTask>:
- {
- 800588c: b508 push {r3, lr}
- prvCheckTasksWaitingTermination();
- 800588e: f7ff ffd7 bl 8005840 <prvCheckTasksWaitingTermination>
- if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ tskIDLE_PRIORITY ] ) ) > ( UBaseType_t ) 1 )
- 8005892: 4b07 ldr r3, [pc, #28] @ (80058b0 <prvIdleTask+0x24>)
- 8005894: 681b ldr r3, [r3, #0]
- 8005896: 2b01 cmp r3, #1
- 8005898: d9f9 bls.n 800588e <prvIdleTask+0x2>
- taskYIELD();
- 800589a: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 800589e: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 80058a2: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- 80058a6: f3bf 8f4f dsb sy
- 80058aa: f3bf 8f6f isb sy
- 80058ae: e7ee b.n 800588e <prvIdleTask+0x2>
- 80058b0: 24012964 .word 0x24012964
- 080058b4 <prvAddCurrentTaskToDelayedList>:
- #endif
- /*-----------------------------------------------------------*/
- static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, const BaseType_t xCanBlockIndefinitely )
- {
- 80058b4: b570 push {r4, r5, r6, lr}
- 80058b6: 4604 mov r4, r0
- 80058b8: 460d mov r5, r1
- TickType_t xTimeToWake;
- const TickType_t xConstTickCount = xTickCount;
- 80058ba: 4b19 ldr r3, [pc, #100] @ (8005920 <prvAddCurrentTaskToDelayedList+0x6c>)
- 80058bc: 681e ldr r6, [r3, #0]
- }
- #endif
- /* Remove the task from the ready list before adding it to the blocked list
- as the same list item is used for both lists. */
- if( uxListRemove( &( pxCurrentTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
- 80058be: 4b19 ldr r3, [pc, #100] @ (8005924 <prvAddCurrentTaskToDelayedList+0x70>)
- 80058c0: 6818 ldr r0, [r3, #0]
- 80058c2: 3004 adds r0, #4
- 80058c4: f7fe fec8 bl 8004658 <uxListRemove>
- mtCOVERAGE_TEST_MARKER();
- }
- #if ( INCLUDE_vTaskSuspend == 1 )
- {
- if( ( xTicksToWait == portMAX_DELAY ) && ( xCanBlockIndefinitely != pdFALSE ) )
- 80058c8: f1b4 3fff cmp.w r4, #4294967295 @ 0xffffffff
- 80058cc: bf14 ite ne
- 80058ce: 2300 movne r3, #0
- 80058d0: 2301 moveq r3, #1
- 80058d2: 2d00 cmp r5, #0
- 80058d4: bf08 it eq
- 80058d6: 2300 moveq r3, #0
- 80058d8: b96b cbnz r3, 80058f6 <prvAddCurrentTaskToDelayedList+0x42>
- else
- {
- /* Calculate the time at which the task should be woken if the event
- does not occur. This may overflow but this doesn't matter, the
- kernel will manage it correctly. */
- xTimeToWake = xConstTickCount + xTicksToWait;
- 80058da: 4434 add r4, r6
- /* The list item will be inserted in wake time order. */
- listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xStateListItem ), xTimeToWake );
- 80058dc: 4b11 ldr r3, [pc, #68] @ (8005924 <prvAddCurrentTaskToDelayedList+0x70>)
- 80058de: 681b ldr r3, [r3, #0]
- 80058e0: 605c str r4, [r3, #4]
- if( xTimeToWake < xConstTickCount )
- 80058e2: 42a6 cmp r6, r4
- 80058e4: d90e bls.n 8005904 <prvAddCurrentTaskToDelayedList+0x50>
- {
- /* Wake time has overflowed. Place this item in the overflow
- list. */
- vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) );
- 80058e6: 4b10 ldr r3, [pc, #64] @ (8005928 <prvAddCurrentTaskToDelayedList+0x74>)
- 80058e8: 6818 ldr r0, [r3, #0]
- 80058ea: 4b0e ldr r3, [pc, #56] @ (8005924 <prvAddCurrentTaskToDelayedList+0x70>)
- 80058ec: 6819 ldr r1, [r3, #0]
- 80058ee: 3104 adds r1, #4
- 80058f0: f7fe fe99 bl 8004626 <vListInsert>
- /* Avoid compiler warning when INCLUDE_vTaskSuspend is not 1. */
- ( void ) xCanBlockIndefinitely;
- }
- #endif /* INCLUDE_vTaskSuspend */
- }
- 80058f4: bd70 pop {r4, r5, r6, pc}
- vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xStateListItem ) );
- 80058f6: 4b0b ldr r3, [pc, #44] @ (8005924 <prvAddCurrentTaskToDelayedList+0x70>)
- 80058f8: 6819 ldr r1, [r3, #0]
- 80058fa: 3104 adds r1, #4
- 80058fc: 480b ldr r0, [pc, #44] @ (800592c <prvAddCurrentTaskToDelayedList+0x78>)
- 80058fe: f7fe fe87 bl 8004610 <vListInsertEnd>
- 8005902: e7f7 b.n 80058f4 <prvAddCurrentTaskToDelayedList+0x40>
- vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) );
- 8005904: 4b0a ldr r3, [pc, #40] @ (8005930 <prvAddCurrentTaskToDelayedList+0x7c>)
- 8005906: 6818 ldr r0, [r3, #0]
- 8005908: 4b06 ldr r3, [pc, #24] @ (8005924 <prvAddCurrentTaskToDelayedList+0x70>)
- 800590a: 6819 ldr r1, [r3, #0]
- 800590c: 3104 adds r1, #4
- 800590e: f7fe fe8a bl 8004626 <vListInsert>
- if( xTimeToWake < xNextTaskUnblockTime )
- 8005912: 4b08 ldr r3, [pc, #32] @ (8005934 <prvAddCurrentTaskToDelayedList+0x80>)
- 8005914: 681b ldr r3, [r3, #0]
- 8005916: 42a3 cmp r3, r4
- 8005918: d9ec bls.n 80058f4 <prvAddCurrentTaskToDelayedList+0x40>
- xNextTaskUnblockTime = xTimeToWake;
- 800591a: 4b06 ldr r3, [pc, #24] @ (8005934 <prvAddCurrentTaskToDelayedList+0x80>)
- 800591c: 601c str r4, [r3, #0]
- }
- 800591e: e7e9 b.n 80058f4 <prvAddCurrentTaskToDelayedList+0x40>
- 8005920: 240128ec .word 0x240128ec
- 8005924: 24012dc4 .word 0x24012dc4
- 8005928: 24012934 .word 0x24012934
- 800592c: 240128f4 .word 0x240128f4
- 8005930: 24012938 .word 0x24012938
- 8005934: 240128d0 .word 0x240128d0
- 08005938 <xTaskCreateStatic>:
- {
- 8005938: b530 push {r4, r5, lr}
- 800593a: b087 sub sp, #28
- 800593c: 9c0b ldr r4, [sp, #44] @ 0x2c
- configASSERT( puxStackBuffer != NULL );
- 800593e: b17c cbz r4, 8005960 <xTaskCreateStatic+0x28>
- configASSERT( pxTaskBuffer != NULL );
- 8005940: 9d0c ldr r5, [sp, #48] @ 0x30
- 8005942: b1b5 cbz r5, 8005972 <xTaskCreateStatic+0x3a>
- volatile size_t xSize = sizeof( StaticTask_t );
- 8005944: 25a8 movs r5, #168 @ 0xa8
- 8005946: 9504 str r5, [sp, #16]
- configASSERT( xSize == sizeof( TCB_t ) );
- 8005948: 9d04 ldr r5, [sp, #16]
- 800594a: 2da8 cmp r5, #168 @ 0xa8
- 800594c: d01a beq.n 8005984 <xTaskCreateStatic+0x4c>
- 800594e: f04f 0350 mov.w r3, #80 @ 0x50
- 8005952: f383 8811 msr BASEPRI, r3
- 8005956: f3bf 8f6f isb sy
- 800595a: f3bf 8f4f dsb sy
- 800595e: e7fe b.n 800595e <xTaskCreateStatic+0x26>
- 8005960: f04f 0350 mov.w r3, #80 @ 0x50
- 8005964: f383 8811 msr BASEPRI, r3
- 8005968: f3bf 8f6f isb sy
- 800596c: f3bf 8f4f dsb sy
- configASSERT( puxStackBuffer != NULL );
- 8005970: e7fe b.n 8005970 <xTaskCreateStatic+0x38>
- 8005972: f04f 0350 mov.w r3, #80 @ 0x50
- 8005976: f383 8811 msr BASEPRI, r3
- 800597a: f3bf 8f6f isb sy
- 800597e: f3bf 8f4f dsb sy
- configASSERT( pxTaskBuffer != NULL );
- 8005982: e7fe b.n 8005982 <xTaskCreateStatic+0x4a>
- ( void ) xSize; /* Prevent lint warning when configASSERT() is not used. */
- 8005984: 9d04 ldr r5, [sp, #16]
- pxNewTCB->pxStack = ( StackType_t * ) puxStackBuffer;
- 8005986: 9d0c ldr r5, [sp, #48] @ 0x30
- 8005988: 632c str r4, [r5, #48] @ 0x30
- pxNewTCB->ucStaticallyAllocated = tskSTATICALLY_ALLOCATED_STACK_AND_TCB;
- 800598a: 2402 movs r4, #2
- 800598c: f885 40a5 strb.w r4, [r5, #165] @ 0xa5
- prvInitialiseNewTask( pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, &xReturn, pxNewTCB, NULL );
- 8005990: 2400 movs r4, #0
- 8005992: 9403 str r4, [sp, #12]
- 8005994: 9502 str r5, [sp, #8]
- 8005996: ac05 add r4, sp, #20
- 8005998: 9401 str r4, [sp, #4]
- 800599a: 9c0a ldr r4, [sp, #40] @ 0x28
- 800599c: 9400 str r4, [sp, #0]
- 800599e: f7ff fe43 bl 8005628 <prvInitialiseNewTask>
- prvAddNewTaskToReadyList( pxNewTCB );
- 80059a2: 980c ldr r0, [sp, #48] @ 0x30
- 80059a4: f7ff fed6 bl 8005754 <prvAddNewTaskToReadyList>
- }
- 80059a8: 9805 ldr r0, [sp, #20]
- 80059aa: b007 add sp, #28
- 80059ac: bd30 pop {r4, r5, pc}
- 080059ae <xTaskCreate>:
- {
- 80059ae: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr}
- 80059b2: b085 sub sp, #20
- 80059b4: 4607 mov r7, r0
- 80059b6: 4688 mov r8, r1
- 80059b8: 4614 mov r4, r2
- 80059ba: 461e mov r6, r3
- pxStack = pvPortMalloc( ( ( ( size_t ) usStackDepth ) * sizeof( StackType_t ) ) ); /*lint !e9079 All values returned by pvPortMalloc() have at least the alignment required by the MCU's stack and this allocation is the stack. */
- 80059bc: 0090 lsls r0, r2, #2
- 80059be: f7fe fd59 bl 8004474 <pvPortMalloc>
- if( pxStack != NULL )
- 80059c2: b308 cbz r0, 8005a08 <xTaskCreate+0x5a>
- 80059c4: 4681 mov r9, r0
- pxNewTCB = ( TCB_t * ) pvPortMalloc( sizeof( TCB_t ) ); /*lint !e9087 !e9079 All values returned by pvPortMalloc() have at least the alignment required by the MCU's stack, and the first member of TCB_t is always a pointer to the task's stack. */
- 80059c6: 20a8 movs r0, #168 @ 0xa8
- 80059c8: f7fe fd54 bl 8004474 <pvPortMalloc>
- if( pxNewTCB != NULL )
- 80059cc: 4605 mov r5, r0
- 80059ce: b1a8 cbz r0, 80059fc <xTaskCreate+0x4e>
- pxNewTCB->pxStack = pxStack;
- 80059d0: f8c0 9030 str.w r9, [r0, #48] @ 0x30
- pxNewTCB->ucStaticallyAllocated = tskDYNAMICALLY_ALLOCATED_STACK_AND_TCB;
- 80059d4: 2300 movs r3, #0
- 80059d6: f880 30a5 strb.w r3, [r0, #165] @ 0xa5
- prvInitialiseNewTask( pxTaskCode, pcName, ( uint32_t ) usStackDepth, pvParameters, uxPriority, pxCreatedTask, pxNewTCB, NULL );
- 80059da: 9303 str r3, [sp, #12]
- 80059dc: 9002 str r0, [sp, #8]
- 80059de: 9b0d ldr r3, [sp, #52] @ 0x34
- 80059e0: 9301 str r3, [sp, #4]
- 80059e2: 9b0c ldr r3, [sp, #48] @ 0x30
- 80059e4: 9300 str r3, [sp, #0]
- 80059e6: 4633 mov r3, r6
- 80059e8: 4622 mov r2, r4
- 80059ea: 4641 mov r1, r8
- 80059ec: 4638 mov r0, r7
- 80059ee: f7ff fe1b bl 8005628 <prvInitialiseNewTask>
- prvAddNewTaskToReadyList( pxNewTCB );
- 80059f2: 4628 mov r0, r5
- 80059f4: f7ff feae bl 8005754 <prvAddNewTaskToReadyList>
- xReturn = pdPASS;
- 80059f8: 2001 movs r0, #1
- 80059fa: e007 b.n 8005a0c <xTaskCreate+0x5e>
- vPortFree( pxStack );
- 80059fc: 4648 mov r0, r9
- 80059fe: f7fe fdbb bl 8004578 <vPortFree>
- xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY;
- 8005a02: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8005a06: e001 b.n 8005a0c <xTaskCreate+0x5e>
- 8005a08: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- }
- 8005a0c: b005 add sp, #20
- 8005a0e: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
- ...
- 08005a14 <vTaskStartScheduler>:
- {
- 8005a14: b510 push {r4, lr}
- 8005a16: b088 sub sp, #32
- StaticTask_t *pxIdleTaskTCBBuffer = NULL;
- 8005a18: 2400 movs r4, #0
- 8005a1a: 9405 str r4, [sp, #20]
- StackType_t *pxIdleTaskStackBuffer = NULL;
- 8005a1c: 9406 str r4, [sp, #24]
- vApplicationGetIdleTaskMemory( &pxIdleTaskTCBBuffer, &pxIdleTaskStackBuffer, &ulIdleTaskStackSize );
- 8005a1e: aa07 add r2, sp, #28
- 8005a20: a906 add r1, sp, #24
- 8005a22: a805 add r0, sp, #20
- 8005a24: f7fe fcaa bl 800437c <vApplicationGetIdleTaskMemory>
- xIdleTaskHandle = xTaskCreateStatic( prvIdleTask,
- 8005a28: 9b05 ldr r3, [sp, #20]
- 8005a2a: 9302 str r3, [sp, #8]
- 8005a2c: 9b06 ldr r3, [sp, #24]
- 8005a2e: 9301 str r3, [sp, #4]
- 8005a30: 9400 str r4, [sp, #0]
- 8005a32: 4623 mov r3, r4
- 8005a34: 9a07 ldr r2, [sp, #28]
- 8005a36: 491a ldr r1, [pc, #104] @ (8005aa0 <vTaskStartScheduler+0x8c>)
- 8005a38: 481a ldr r0, [pc, #104] @ (8005aa4 <vTaskStartScheduler+0x90>)
- 8005a3a: f7ff ff7d bl 8005938 <xTaskCreateStatic>
- 8005a3e: 4b1a ldr r3, [pc, #104] @ (8005aa8 <vTaskStartScheduler+0x94>)
- 8005a40: 6018 str r0, [r3, #0]
- if( xIdleTaskHandle != NULL )
- 8005a42: b1e8 cbz r0, 8005a80 <vTaskStartScheduler+0x6c>
- xReturn = xTimerCreateTimerTask();
- 8005a44: f000 fc26 bl 8006294 <xTimerCreateTimerTask>
- if( xReturn == pdPASS )
- 8005a48: 2801 cmp r0, #1
- 8005a4a: d11a bne.n 8005a82 <vTaskStartScheduler+0x6e>
- 8005a4c: f04f 0350 mov.w r3, #80 @ 0x50
- 8005a50: f383 8811 msr BASEPRI, r3
- 8005a54: f3bf 8f6f isb sy
- 8005a58: f3bf 8f4f dsb sy
- _impure_ptr = &( pxCurrentTCB->xNewLib_reent );
- 8005a5c: 4b13 ldr r3, [pc, #76] @ (8005aac <vTaskStartScheduler+0x98>)
- 8005a5e: 681b ldr r3, [r3, #0]
- 8005a60: 3354 adds r3, #84 @ 0x54
- 8005a62: 4a13 ldr r2, [pc, #76] @ (8005ab0 <vTaskStartScheduler+0x9c>)
- 8005a64: 6013 str r3, [r2, #0]
- xNextTaskUnblockTime = portMAX_DELAY;
- 8005a66: 4b13 ldr r3, [pc, #76] @ (8005ab4 <vTaskStartScheduler+0xa0>)
- 8005a68: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff
- 8005a6c: 601a str r2, [r3, #0]
- xSchedulerRunning = pdTRUE;
- 8005a6e: 4b12 ldr r3, [pc, #72] @ (8005ab8 <vTaskStartScheduler+0xa4>)
- 8005a70: 2201 movs r2, #1
- 8005a72: 601a str r2, [r3, #0]
- xTickCount = ( TickType_t ) configINITIAL_TICK_COUNT;
- 8005a74: 4b11 ldr r3, [pc, #68] @ (8005abc <vTaskStartScheduler+0xa8>)
- 8005a76: 2200 movs r2, #0
- 8005a78: 601a str r2, [r3, #0]
- if( xPortStartScheduler() != pdFALSE )
- 8005a7a: f7fe ff05 bl 8004888 <xPortStartScheduler>
- 8005a7e: e003 b.n 8005a88 <vTaskStartScheduler+0x74>
- xReturn = pdFAIL;
- 8005a80: 2000 movs r0, #0
- configASSERT( xReturn != errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY );
- 8005a82: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff
- 8005a86: d001 beq.n 8005a8c <vTaskStartScheduler+0x78>
- }
- 8005a88: b008 add sp, #32
- 8005a8a: bd10 pop {r4, pc}
- 8005a8c: f04f 0350 mov.w r3, #80 @ 0x50
- 8005a90: f383 8811 msr BASEPRI, r3
- 8005a94: f3bf 8f6f isb sy
- 8005a98: f3bf 8f4f dsb sy
- configASSERT( xReturn != errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY );
- 8005a9c: e7fe b.n 8005a9c <vTaskStartScheduler+0x88>
- 8005a9e: bf00 nop
- 8005aa0: 0801464c .word 0x0801464c
- 8005aa4: 0800588d .word 0x0800588d
- 8005aa8: 240128cc .word 0x240128cc
- 8005aac: 24012dc4 .word 0x24012dc4
- 8005ab0: 2400003c .word 0x2400003c
- 8005ab4: 240128d0 .word 0x240128d0
- 8005ab8: 240128e4 .word 0x240128e4
- 8005abc: 240128ec .word 0x240128ec
- 08005ac0 <vTaskSuspendAll>:
- ++uxSchedulerSuspended;
- 8005ac0: 4a02 ldr r2, [pc, #8] @ (8005acc <vTaskSuspendAll+0xc>)
- 8005ac2: 6813 ldr r3, [r2, #0]
- 8005ac4: 3301 adds r3, #1
- 8005ac6: 6013 str r3, [r2, #0]
- }
- 8005ac8: 4770 bx lr
- 8005aca: bf00 nop
- 8005acc: 240128c8 .word 0x240128c8
- 08005ad0 <xTaskGetTickCount>:
- xTicks = xTickCount;
- 8005ad0: 4b01 ldr r3, [pc, #4] @ (8005ad8 <xTaskGetTickCount+0x8>)
- 8005ad2: 6818 ldr r0, [r3, #0]
- }
- 8005ad4: 4770 bx lr
- 8005ad6: bf00 nop
- 8005ad8: 240128ec .word 0x240128ec
- 08005adc <xTaskGetTickCountFromISR>:
- {
- 8005adc: b508 push {r3, lr}
- portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
- 8005ade: f7fe ff5f bl 80049a0 <vPortValidateInterruptPriority>
- xReturn = xTickCount;
- 8005ae2: 4b01 ldr r3, [pc, #4] @ (8005ae8 <xTaskGetTickCountFromISR+0xc>)
- 8005ae4: 6818 ldr r0, [r3, #0]
- }
- 8005ae6: bd08 pop {r3, pc}
- 8005ae8: 240128ec .word 0x240128ec
- 08005aec <xTaskIncrementTick>:
- {
- 8005aec: b5f8 push {r3, r4, r5, r6, r7, lr}
- if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
- 8005aee: 4b3a ldr r3, [pc, #232] @ (8005bd8 <xTaskIncrementTick+0xec>)
- 8005af0: 681b ldr r3, [r3, #0]
- 8005af2: 2b00 cmp r3, #0
- 8005af4: d169 bne.n 8005bca <xTaskIncrementTick+0xde>
- const TickType_t xConstTickCount = xTickCount + ( TickType_t ) 1;
- 8005af6: 4b39 ldr r3, [pc, #228] @ (8005bdc <xTaskIncrementTick+0xf0>)
- 8005af8: 681d ldr r5, [r3, #0]
- 8005afa: 3501 adds r5, #1
- xTickCount = xConstTickCount;
- 8005afc: 601d str r5, [r3, #0]
- if( xConstTickCount == ( TickType_t ) 0U ) /*lint !e774 'if' does not always evaluate to false as it is looking for an overflow. */
- 8005afe: b9c5 cbnz r5, 8005b32 <xTaskIncrementTick+0x46>
- taskSWITCH_DELAYED_LISTS();
- 8005b00: 4b37 ldr r3, [pc, #220] @ (8005be0 <xTaskIncrementTick+0xf4>)
- 8005b02: 681b ldr r3, [r3, #0]
- 8005b04: 681b ldr r3, [r3, #0]
- 8005b06: b143 cbz r3, 8005b1a <xTaskIncrementTick+0x2e>
- 8005b08: f04f 0350 mov.w r3, #80 @ 0x50
- 8005b0c: f383 8811 msr BASEPRI, r3
- 8005b10: f3bf 8f6f isb sy
- 8005b14: f3bf 8f4f dsb sy
- 8005b18: e7fe b.n 8005b18 <xTaskIncrementTick+0x2c>
- 8005b1a: 4a31 ldr r2, [pc, #196] @ (8005be0 <xTaskIncrementTick+0xf4>)
- 8005b1c: 6811 ldr r1, [r2, #0]
- 8005b1e: 4b31 ldr r3, [pc, #196] @ (8005be4 <xTaskIncrementTick+0xf8>)
- 8005b20: 6818 ldr r0, [r3, #0]
- 8005b22: 6010 str r0, [r2, #0]
- 8005b24: 6019 str r1, [r3, #0]
- 8005b26: 4a30 ldr r2, [pc, #192] @ (8005be8 <xTaskIncrementTick+0xfc>)
- 8005b28: 6813 ldr r3, [r2, #0]
- 8005b2a: 3301 adds r3, #1
- 8005b2c: 6013 str r3, [r2, #0]
- 8005b2e: f7ff fd65 bl 80055fc <prvResetNextTaskUnblockTime>
- if( xConstTickCount >= xNextTaskUnblockTime )
- 8005b32: 4b2e ldr r3, [pc, #184] @ (8005bec <xTaskIncrementTick+0x100>)
- 8005b34: 681b ldr r3, [r3, #0]
- 8005b36: 42ab cmp r3, r5
- 8005b38: d93d bls.n 8005bb6 <xTaskIncrementTick+0xca>
- BaseType_t xSwitchRequired = pdFALSE;
- 8005b3a: 2700 movs r7, #0
- if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ pxCurrentTCB->uxPriority ] ) ) > ( UBaseType_t ) 1 )
- 8005b3c: 4b2c ldr r3, [pc, #176] @ (8005bf0 <xTaskIncrementTick+0x104>)
- 8005b3e: 681b ldr r3, [r3, #0]
- 8005b40: 6adb ldr r3, [r3, #44] @ 0x2c
- 8005b42: eb03 0383 add.w r3, r3, r3, lsl #2
- 8005b46: 009a lsls r2, r3, #2
- 8005b48: 4b2a ldr r3, [pc, #168] @ (8005bf4 <xTaskIncrementTick+0x108>)
- 8005b4a: 589b ldr r3, [r3, r2]
- 8005b4c: 2b01 cmp r3, #1
- 8005b4e: d900 bls.n 8005b52 <xTaskIncrementTick+0x66>
- xSwitchRequired = pdTRUE;
- 8005b50: 2701 movs r7, #1
- if( xYieldPending != pdFALSE )
- 8005b52: 4b29 ldr r3, [pc, #164] @ (8005bf8 <xTaskIncrementTick+0x10c>)
- 8005b54: 681b ldr r3, [r3, #0]
- 8005b56: 2b00 cmp r3, #0
- 8005b58: d03c beq.n 8005bd4 <xTaskIncrementTick+0xe8>
- xSwitchRequired = pdTRUE;
- 8005b5a: 2701 movs r7, #1
- return xSwitchRequired;
- 8005b5c: e03a b.n 8005bd4 <xTaskIncrementTick+0xe8>
- xSwitchRequired = pdTRUE;
- 8005b5e: 2701 movs r7, #1
- if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE )
- 8005b60: 4b1f ldr r3, [pc, #124] @ (8005be0 <xTaskIncrementTick+0xf4>)
- 8005b62: 681b ldr r3, [r3, #0]
- 8005b64: 681b ldr r3, [r3, #0]
- 8005b66: b343 cbz r3, 8005bba <xTaskIncrementTick+0xce>
- pxTCB = listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
- 8005b68: 4b1d ldr r3, [pc, #116] @ (8005be0 <xTaskIncrementTick+0xf4>)
- 8005b6a: 681b ldr r3, [r3, #0]
- 8005b6c: 68db ldr r3, [r3, #12]
- 8005b6e: 68dc ldr r4, [r3, #12]
- xItemValue = listGET_LIST_ITEM_VALUE( &( pxTCB->xStateListItem ) );
- 8005b70: 6863 ldr r3, [r4, #4]
- if( xConstTickCount < xItemValue )
- 8005b72: 429d cmp r5, r3
- 8005b74: d326 bcc.n 8005bc4 <xTaskIncrementTick+0xd8>
- ( void ) uxListRemove( &( pxTCB->xStateListItem ) );
- 8005b76: 1d26 adds r6, r4, #4
- 8005b78: 4630 mov r0, r6
- 8005b7a: f7fe fd6d bl 8004658 <uxListRemove>
- if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL )
- 8005b7e: 6aa3 ldr r3, [r4, #40] @ 0x28
- 8005b80: b11b cbz r3, 8005b8a <xTaskIncrementTick+0x9e>
- ( void ) uxListRemove( &( pxTCB->xEventListItem ) );
- 8005b82: f104 0018 add.w r0, r4, #24
- 8005b86: f7fe fd67 bl 8004658 <uxListRemove>
- prvAddTaskToReadyList( pxTCB );
- 8005b8a: 6ae3 ldr r3, [r4, #44] @ 0x2c
- 8005b8c: 4a1b ldr r2, [pc, #108] @ (8005bfc <xTaskIncrementTick+0x110>)
- 8005b8e: 6812 ldr r2, [r2, #0]
- 8005b90: 4293 cmp r3, r2
- 8005b92: d901 bls.n 8005b98 <xTaskIncrementTick+0xac>
- 8005b94: 4a19 ldr r2, [pc, #100] @ (8005bfc <xTaskIncrementTick+0x110>)
- 8005b96: 6013 str r3, [r2, #0]
- 8005b98: eb03 0383 add.w r3, r3, r3, lsl #2
- 8005b9c: 009a lsls r2, r3, #2
- 8005b9e: 4631 mov r1, r6
- 8005ba0: 4814 ldr r0, [pc, #80] @ (8005bf4 <xTaskIncrementTick+0x108>)
- 8005ba2: 4410 add r0, r2
- 8005ba4: f7fe fd34 bl 8004610 <vListInsertEnd>
- if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority )
- 8005ba8: 6ae2 ldr r2, [r4, #44] @ 0x2c
- 8005baa: 4b11 ldr r3, [pc, #68] @ (8005bf0 <xTaskIncrementTick+0x104>)
- 8005bac: 681b ldr r3, [r3, #0]
- 8005bae: 6adb ldr r3, [r3, #44] @ 0x2c
- 8005bb0: 429a cmp r2, r3
- 8005bb2: d2d4 bcs.n 8005b5e <xTaskIncrementTick+0x72>
- 8005bb4: e7d4 b.n 8005b60 <xTaskIncrementTick+0x74>
- BaseType_t xSwitchRequired = pdFALSE;
- 8005bb6: 2700 movs r7, #0
- 8005bb8: e7d2 b.n 8005b60 <xTaskIncrementTick+0x74>
- xNextTaskUnblockTime = portMAX_DELAY; /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
- 8005bba: 4b0c ldr r3, [pc, #48] @ (8005bec <xTaskIncrementTick+0x100>)
- 8005bbc: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff
- 8005bc0: 601a str r2, [r3, #0]
- break;
- 8005bc2: e7bb b.n 8005b3c <xTaskIncrementTick+0x50>
- xNextTaskUnblockTime = xItemValue;
- 8005bc4: 4a09 ldr r2, [pc, #36] @ (8005bec <xTaskIncrementTick+0x100>)
- 8005bc6: 6013 str r3, [r2, #0]
- break; /*lint !e9011 Code structure here is deedmed easier to understand with multiple breaks. */
- 8005bc8: e7b8 b.n 8005b3c <xTaskIncrementTick+0x50>
- ++xPendedTicks;
- 8005bca: 4a0d ldr r2, [pc, #52] @ (8005c00 <xTaskIncrementTick+0x114>)
- 8005bcc: 6813 ldr r3, [r2, #0]
- 8005bce: 3301 adds r3, #1
- 8005bd0: 6013 str r3, [r2, #0]
- BaseType_t xSwitchRequired = pdFALSE;
- 8005bd2: 2700 movs r7, #0
- }
- 8005bd4: 4638 mov r0, r7
- 8005bd6: bdf8 pop {r3, r4, r5, r6, r7, pc}
- 8005bd8: 240128c8 .word 0x240128c8
- 8005bdc: 240128ec .word 0x240128ec
- 8005be0: 24012938 .word 0x24012938
- 8005be4: 24012934 .word 0x24012934
- 8005be8: 240128d8 .word 0x240128d8
- 8005bec: 240128d0 .word 0x240128d0
- 8005bf0: 24012dc4 .word 0x24012dc4
- 8005bf4: 24012964 .word 0x24012964
- 8005bf8: 240128dc .word 0x240128dc
- 8005bfc: 240128e8 .word 0x240128e8
- 8005c00: 240128e0 .word 0x240128e0
- 08005c04 <xTaskResumeAll>:
- {
- 8005c04: b538 push {r3, r4, r5, lr}
- configASSERT( uxSchedulerSuspended );
- 8005c06: 4b35 ldr r3, [pc, #212] @ (8005cdc <xTaskResumeAll+0xd8>)
- 8005c08: 681b ldr r3, [r3, #0]
- 8005c0a: b943 cbnz r3, 8005c1e <xTaskResumeAll+0x1a>
- 8005c0c: f04f 0350 mov.w r3, #80 @ 0x50
- 8005c10: f383 8811 msr BASEPRI, r3
- 8005c14: f3bf 8f6f isb sy
- 8005c18: f3bf 8f4f dsb sy
- 8005c1c: e7fe b.n 8005c1c <xTaskResumeAll+0x18>
- taskENTER_CRITICAL();
- 8005c1e: f7fe fd99 bl 8004754 <vPortEnterCritical>
- --uxSchedulerSuspended;
- 8005c22: 4b2e ldr r3, [pc, #184] @ (8005cdc <xTaskResumeAll+0xd8>)
- 8005c24: 681a ldr r2, [r3, #0]
- 8005c26: 3a01 subs r2, #1
- 8005c28: 601a str r2, [r3, #0]
- if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
- 8005c2a: 681b ldr r3, [r3, #0]
- 8005c2c: 2b00 cmp r3, #0
- 8005c2e: d14f bne.n 8005cd0 <xTaskResumeAll+0xcc>
- if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U )
- 8005c30: 4b2b ldr r3, [pc, #172] @ (8005ce0 <xTaskResumeAll+0xdc>)
- 8005c32: 681b ldr r3, [r3, #0]
- 8005c34: b90b cbnz r3, 8005c3a <xTaskResumeAll+0x36>
- BaseType_t xAlreadyYielded = pdFALSE;
- 8005c36: 2400 movs r4, #0
- 8005c38: e04b b.n 8005cd2 <xTaskResumeAll+0xce>
- TCB_t *pxTCB = NULL;
- 8005c3a: 2400 movs r4, #0
- while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE )
- 8005c3c: 4b29 ldr r3, [pc, #164] @ (8005ce4 <xTaskResumeAll+0xe0>)
- 8005c3e: 681b ldr r3, [r3, #0]
- 8005c40: b31b cbz r3, 8005c8a <xTaskResumeAll+0x86>
- pxTCB = listGET_OWNER_OF_HEAD_ENTRY( ( &xPendingReadyList ) ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
- 8005c42: 4b28 ldr r3, [pc, #160] @ (8005ce4 <xTaskResumeAll+0xe0>)
- 8005c44: 68db ldr r3, [r3, #12]
- 8005c46: 68dc ldr r4, [r3, #12]
- ( void ) uxListRemove( &( pxTCB->xEventListItem ) );
- 8005c48: f104 0018 add.w r0, r4, #24
- 8005c4c: f7fe fd04 bl 8004658 <uxListRemove>
- ( void ) uxListRemove( &( pxTCB->xStateListItem ) );
- 8005c50: 1d25 adds r5, r4, #4
- 8005c52: 4628 mov r0, r5
- 8005c54: f7fe fd00 bl 8004658 <uxListRemove>
- prvAddTaskToReadyList( pxTCB );
- 8005c58: 6ae0 ldr r0, [r4, #44] @ 0x2c
- 8005c5a: 4b23 ldr r3, [pc, #140] @ (8005ce8 <xTaskResumeAll+0xe4>)
- 8005c5c: 681b ldr r3, [r3, #0]
- 8005c5e: 4298 cmp r0, r3
- 8005c60: d901 bls.n 8005c66 <xTaskResumeAll+0x62>
- 8005c62: 4b21 ldr r3, [pc, #132] @ (8005ce8 <xTaskResumeAll+0xe4>)
- 8005c64: 6018 str r0, [r3, #0]
- 8005c66: eb00 0080 add.w r0, r0, r0, lsl #2
- 8005c6a: 4629 mov r1, r5
- 8005c6c: 4b1f ldr r3, [pc, #124] @ (8005cec <xTaskResumeAll+0xe8>)
- 8005c6e: eb03 0080 add.w r0, r3, r0, lsl #2
- 8005c72: f7fe fccd bl 8004610 <vListInsertEnd>
- if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority )
- 8005c76: 6ae2 ldr r2, [r4, #44] @ 0x2c
- 8005c78: 4b1d ldr r3, [pc, #116] @ (8005cf0 <xTaskResumeAll+0xec>)
- 8005c7a: 681b ldr r3, [r3, #0]
- 8005c7c: 6adb ldr r3, [r3, #44] @ 0x2c
- 8005c7e: 429a cmp r2, r3
- 8005c80: d3dc bcc.n 8005c3c <xTaskResumeAll+0x38>
- xYieldPending = pdTRUE;
- 8005c82: 4b1c ldr r3, [pc, #112] @ (8005cf4 <xTaskResumeAll+0xf0>)
- 8005c84: 2201 movs r2, #1
- 8005c86: 601a str r2, [r3, #0]
- 8005c88: e7d8 b.n 8005c3c <xTaskResumeAll+0x38>
- if( pxTCB != NULL )
- 8005c8a: b10c cbz r4, 8005c90 <xTaskResumeAll+0x8c>
- prvResetNextTaskUnblockTime();
- 8005c8c: f7ff fcb6 bl 80055fc <prvResetNextTaskUnblockTime>
- TickType_t xPendedCounts = xPendedTicks; /* Non-volatile copy. */
- 8005c90: 4b19 ldr r3, [pc, #100] @ (8005cf8 <xTaskResumeAll+0xf4>)
- 8005c92: 681c ldr r4, [r3, #0]
- if( xPendedCounts > ( TickType_t ) 0U )
- 8005c94: b984 cbnz r4, 8005cb8 <xTaskResumeAll+0xb4>
- if( xYieldPending != pdFALSE )
- 8005c96: 4b17 ldr r3, [pc, #92] @ (8005cf4 <xTaskResumeAll+0xf0>)
- 8005c98: 681c ldr r4, [r3, #0]
- 8005c9a: b1d4 cbz r4, 8005cd2 <xTaskResumeAll+0xce>
- taskYIELD_IF_USING_PREEMPTION();
- 8005c9c: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 8005ca0: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 8005ca4: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- 8005ca8: f3bf 8f4f dsb sy
- 8005cac: f3bf 8f6f isb sy
- xAlreadyYielded = pdTRUE;
- 8005cb0: 2401 movs r4, #1
- 8005cb2: e00e b.n 8005cd2 <xTaskResumeAll+0xce>
- } while( xPendedCounts > ( TickType_t ) 0U );
- 8005cb4: 3c01 subs r4, #1
- 8005cb6: d007 beq.n 8005cc8 <xTaskResumeAll+0xc4>
- if( xTaskIncrementTick() != pdFALSE )
- 8005cb8: f7ff ff18 bl 8005aec <xTaskIncrementTick>
- 8005cbc: 2800 cmp r0, #0
- 8005cbe: d0f9 beq.n 8005cb4 <xTaskResumeAll+0xb0>
- xYieldPending = pdTRUE;
- 8005cc0: 4b0c ldr r3, [pc, #48] @ (8005cf4 <xTaskResumeAll+0xf0>)
- 8005cc2: 2201 movs r2, #1
- 8005cc4: 601a str r2, [r3, #0]
- 8005cc6: e7f5 b.n 8005cb4 <xTaskResumeAll+0xb0>
- xPendedTicks = 0;
- 8005cc8: 4b0b ldr r3, [pc, #44] @ (8005cf8 <xTaskResumeAll+0xf4>)
- 8005cca: 2200 movs r2, #0
- 8005ccc: 601a str r2, [r3, #0]
- 8005cce: e7e2 b.n 8005c96 <xTaskResumeAll+0x92>
- BaseType_t xAlreadyYielded = pdFALSE;
- 8005cd0: 2400 movs r4, #0
- taskEXIT_CRITICAL();
- 8005cd2: f7fe fd61 bl 8004798 <vPortExitCritical>
- }
- 8005cd6: 4620 mov r0, r4
- 8005cd8: bd38 pop {r3, r4, r5, pc}
- 8005cda: bf00 nop
- 8005cdc: 240128c8 .word 0x240128c8
- 8005ce0: 240128f0 .word 0x240128f0
- 8005ce4: 24012920 .word 0x24012920
- 8005ce8: 240128e8 .word 0x240128e8
- 8005cec: 24012964 .word 0x24012964
- 8005cf0: 24012dc4 .word 0x24012dc4
- 8005cf4: 240128dc .word 0x240128dc
- 8005cf8: 240128e0 .word 0x240128e0
- 08005cfc <vTaskDelay>:
- {
- 8005cfc: b510 push {r4, lr}
- if( xTicksToDelay > ( TickType_t ) 0U )
- 8005cfe: b1a8 cbz r0, 8005d2c <vTaskDelay+0x30>
- 8005d00: 4604 mov r4, r0
- configASSERT( uxSchedulerSuspended == 0 );
- 8005d02: 4b10 ldr r3, [pc, #64] @ (8005d44 <vTaskDelay+0x48>)
- 8005d04: 681b ldr r3, [r3, #0]
- 8005d06: b143 cbz r3, 8005d1a <vTaskDelay+0x1e>
- 8005d08: f04f 0350 mov.w r3, #80 @ 0x50
- 8005d0c: f383 8811 msr BASEPRI, r3
- 8005d10: f3bf 8f6f isb sy
- 8005d14: f3bf 8f4f dsb sy
- 8005d18: e7fe b.n 8005d18 <vTaskDelay+0x1c>
- vTaskSuspendAll();
- 8005d1a: f7ff fed1 bl 8005ac0 <vTaskSuspendAll>
- prvAddCurrentTaskToDelayedList( xTicksToDelay, pdFALSE );
- 8005d1e: 2100 movs r1, #0
- 8005d20: 4620 mov r0, r4
- 8005d22: f7ff fdc7 bl 80058b4 <prvAddCurrentTaskToDelayedList>
- xAlreadyYielded = xTaskResumeAll();
- 8005d26: f7ff ff6d bl 8005c04 <xTaskResumeAll>
- if( xAlreadyYielded == pdFALSE )
- 8005d2a: b948 cbnz r0, 8005d40 <vTaskDelay+0x44>
- portYIELD_WITHIN_API();
- 8005d2c: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 8005d30: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 8005d34: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- 8005d38: f3bf 8f4f dsb sy
- 8005d3c: f3bf 8f6f isb sy
- }
- 8005d40: bd10 pop {r4, pc}
- 8005d42: bf00 nop
- 8005d44: 240128c8 .word 0x240128c8
- 08005d48 <vTaskSwitchContext>:
- {
- 8005d48: b508 push {r3, lr}
- if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE )
- 8005d4a: 4b29 ldr r3, [pc, #164] @ (8005df0 <vTaskSwitchContext+0xa8>)
- 8005d4c: 681b ldr r3, [r3, #0]
- 8005d4e: b11b cbz r3, 8005d58 <vTaskSwitchContext+0x10>
- xYieldPending = pdTRUE;
- 8005d50: 4b28 ldr r3, [pc, #160] @ (8005df4 <vTaskSwitchContext+0xac>)
- 8005d52: 2201 movs r2, #1
- 8005d54: 601a str r2, [r3, #0]
- }
- 8005d56: bd08 pop {r3, pc}
- xYieldPending = pdFALSE;
- 8005d58: 4b26 ldr r3, [pc, #152] @ (8005df4 <vTaskSwitchContext+0xac>)
- 8005d5a: 2200 movs r2, #0
- 8005d5c: 601a str r2, [r3, #0]
- taskCHECK_FOR_STACK_OVERFLOW();
- 8005d5e: 4b26 ldr r3, [pc, #152] @ (8005df8 <vTaskSwitchContext+0xb0>)
- 8005d60: 681a ldr r2, [r3, #0]
- 8005d62: 6812 ldr r2, [r2, #0]
- 8005d64: 681b ldr r3, [r3, #0]
- 8005d66: 6b1b ldr r3, [r3, #48] @ 0x30
- 8005d68: 429a cmp r2, r3
- 8005d6a: d90a bls.n 8005d82 <vTaskSwitchContext+0x3a>
- taskSELECT_HIGHEST_PRIORITY_TASK(); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
- 8005d6c: 4b23 ldr r3, [pc, #140] @ (8005dfc <vTaskSwitchContext+0xb4>)
- 8005d6e: 681b ldr r3, [r3, #0]
- 8005d70: eb03 0183 add.w r1, r3, r3, lsl #2
- 8005d74: 008a lsls r2, r1, #2
- 8005d76: 4922 ldr r1, [pc, #136] @ (8005e00 <vTaskSwitchContext+0xb8>)
- 8005d78: 588a ldr r2, [r1, r2]
- 8005d7a: b992 cbnz r2, 8005da2 <vTaskSwitchContext+0x5a>
- 8005d7c: b143 cbz r3, 8005d90 <vTaskSwitchContext+0x48>
- 8005d7e: 3b01 subs r3, #1
- 8005d80: e7f6 b.n 8005d70 <vTaskSwitchContext+0x28>
- taskCHECK_FOR_STACK_OVERFLOW();
- 8005d82: 4b1d ldr r3, [pc, #116] @ (8005df8 <vTaskSwitchContext+0xb0>)
- 8005d84: 6818 ldr r0, [r3, #0]
- 8005d86: 6819 ldr r1, [r3, #0]
- 8005d88: 3134 adds r1, #52 @ 0x34
- 8005d8a: f7fa fb83 bl 8000494 <vApplicationStackOverflowHook>
- 8005d8e: e7ed b.n 8005d6c <vTaskSwitchContext+0x24>
- 8005d90: f04f 0350 mov.w r3, #80 @ 0x50
- 8005d94: f383 8811 msr BASEPRI, r3
- 8005d98: f3bf 8f6f isb sy
- 8005d9c: f3bf 8f4f dsb sy
- taskSELECT_HIGHEST_PRIORITY_TASK(); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
- 8005da0: e7fe b.n 8005da0 <vTaskSwitchContext+0x58>
- 8005da2: 4608 mov r0, r1
- 8005da4: eb03 0183 add.w r1, r3, r3, lsl #2
- 8005da8: 008a lsls r2, r1, #2
- 8005daa: 4402 add r2, r0
- 8005dac: 6851 ldr r1, [r2, #4]
- 8005dae: 6849 ldr r1, [r1, #4]
- 8005db0: 6051 str r1, [r2, #4]
- 8005db2: eb03 0c83 add.w ip, r3, r3, lsl #2
- 8005db6: ea4f 028c mov.w r2, ip, lsl #2
- 8005dba: 3208 adds r2, #8
- 8005dbc: 4402 add r2, r0
- 8005dbe: 4291 cmp r1, r2
- 8005dc0: d00f beq.n 8005de2 <vTaskSwitchContext+0x9a>
- 8005dc2: eb03 0283 add.w r2, r3, r3, lsl #2
- 8005dc6: 0091 lsls r1, r2, #2
- 8005dc8: 4a0d ldr r2, [pc, #52] @ (8005e00 <vTaskSwitchContext+0xb8>)
- 8005dca: 440a add r2, r1
- 8005dcc: 6852 ldr r2, [r2, #4]
- 8005dce: 68d1 ldr r1, [r2, #12]
- 8005dd0: 4a09 ldr r2, [pc, #36] @ (8005df8 <vTaskSwitchContext+0xb0>)
- 8005dd2: 6011 str r1, [r2, #0]
- 8005dd4: 4909 ldr r1, [pc, #36] @ (8005dfc <vTaskSwitchContext+0xb4>)
- 8005dd6: 600b str r3, [r1, #0]
- _impure_ptr = &( pxCurrentTCB->xNewLib_reent );
- 8005dd8: 6813 ldr r3, [r2, #0]
- 8005dda: 3354 adds r3, #84 @ 0x54
- 8005ddc: 4a09 ldr r2, [pc, #36] @ (8005e04 <vTaskSwitchContext+0xbc>)
- 8005dde: 6013 str r3, [r2, #0]
- }
- 8005de0: e7b9 b.n 8005d56 <vTaskSwitchContext+0xe>
- taskSELECT_HIGHEST_PRIORITY_TASK(); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
- 8005de2: 6848 ldr r0, [r1, #4]
- 8005de4: 4662 mov r2, ip
- 8005de6: 0091 lsls r1, r2, #2
- 8005de8: 4a05 ldr r2, [pc, #20] @ (8005e00 <vTaskSwitchContext+0xb8>)
- 8005dea: 440a add r2, r1
- 8005dec: 6050 str r0, [r2, #4]
- 8005dee: e7e8 b.n 8005dc2 <vTaskSwitchContext+0x7a>
- 8005df0: 240128c8 .word 0x240128c8
- 8005df4: 240128dc .word 0x240128dc
- 8005df8: 24012dc4 .word 0x24012dc4
- 8005dfc: 240128e8 .word 0x240128e8
- 8005e00: 24012964 .word 0x24012964
- 8005e04: 2400003c .word 0x2400003c
- 08005e08 <vTaskPlaceOnEventList>:
- configASSERT( pxEventList );
- 8005e08: b158 cbz r0, 8005e22 <vTaskPlaceOnEventList+0x1a>
- {
- 8005e0a: b510 push {r4, lr}
- 8005e0c: 460c mov r4, r1
- vListInsert( pxEventList, &( pxCurrentTCB->xEventListItem ) );
- 8005e0e: 4a09 ldr r2, [pc, #36] @ (8005e34 <vTaskPlaceOnEventList+0x2c>)
- 8005e10: 6811 ldr r1, [r2, #0]
- 8005e12: 3118 adds r1, #24
- 8005e14: f7fe fc07 bl 8004626 <vListInsert>
- prvAddCurrentTaskToDelayedList( xTicksToWait, pdTRUE );
- 8005e18: 2101 movs r1, #1
- 8005e1a: 4620 mov r0, r4
- 8005e1c: f7ff fd4a bl 80058b4 <prvAddCurrentTaskToDelayedList>
- }
- 8005e20: bd10 pop {r4, pc}
- 8005e22: f04f 0350 mov.w r3, #80 @ 0x50
- 8005e26: f383 8811 msr BASEPRI, r3
- 8005e2a: f3bf 8f6f isb sy
- 8005e2e: f3bf 8f4f dsb sy
- configASSERT( pxEventList );
- 8005e32: e7fe b.n 8005e32 <vTaskPlaceOnEventList+0x2a>
- 8005e34: 24012dc4 .word 0x24012dc4
- 08005e38 <vTaskPlaceOnEventListRestricted>:
- {
- 8005e38: b538 push {r3, r4, r5, lr}
- configASSERT( pxEventList );
- 8005e3a: b170 cbz r0, 8005e5a <vTaskPlaceOnEventListRestricted+0x22>
- 8005e3c: 460d mov r5, r1
- 8005e3e: 4614 mov r4, r2
- vListInsertEnd( pxEventList, &( pxCurrentTCB->xEventListItem ) );
- 8005e40: 4a0a ldr r2, [pc, #40] @ (8005e6c <vTaskPlaceOnEventListRestricted+0x34>)
- 8005e42: 6811 ldr r1, [r2, #0]
- 8005e44: 3118 adds r1, #24
- 8005e46: f7fe fbe3 bl 8004610 <vListInsertEnd>
- if( xWaitIndefinitely != pdFALSE )
- 8005e4a: b10c cbz r4, 8005e50 <vTaskPlaceOnEventListRestricted+0x18>
- xTicksToWait = portMAX_DELAY;
- 8005e4c: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
- prvAddCurrentTaskToDelayedList( xTicksToWait, xWaitIndefinitely );
- 8005e50: 4621 mov r1, r4
- 8005e52: 4628 mov r0, r5
- 8005e54: f7ff fd2e bl 80058b4 <prvAddCurrentTaskToDelayedList>
- }
- 8005e58: bd38 pop {r3, r4, r5, pc}
- 8005e5a: f04f 0350 mov.w r3, #80 @ 0x50
- 8005e5e: f383 8811 msr BASEPRI, r3
- 8005e62: f3bf 8f6f isb sy
- 8005e66: f3bf 8f4f dsb sy
- configASSERT( pxEventList );
- 8005e6a: e7fe b.n 8005e6a <vTaskPlaceOnEventListRestricted+0x32>
- 8005e6c: 24012dc4 .word 0x24012dc4
- 08005e70 <xTaskRemoveFromEventList>:
- {
- 8005e70: b538 push {r3, r4, r5, lr}
- pxUnblockedTCB = listGET_OWNER_OF_HEAD_ENTRY( pxEventList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
- 8005e72: 68c3 ldr r3, [r0, #12]
- 8005e74: 68dc ldr r4, [r3, #12]
- configASSERT( pxUnblockedTCB );
- 8005e76: b324 cbz r4, 8005ec2 <xTaskRemoveFromEventList+0x52>
- ( void ) uxListRemove( &( pxUnblockedTCB->xEventListItem ) );
- 8005e78: f104 0518 add.w r5, r4, #24
- 8005e7c: 4628 mov r0, r5
- 8005e7e: f7fe fbeb bl 8004658 <uxListRemove>
- if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
- 8005e82: 4b18 ldr r3, [pc, #96] @ (8005ee4 <xTaskRemoveFromEventList+0x74>)
- 8005e84: 681b ldr r3, [r3, #0]
- 8005e86: bb2b cbnz r3, 8005ed4 <xTaskRemoveFromEventList+0x64>
- ( void ) uxListRemove( &( pxUnblockedTCB->xStateListItem ) );
- 8005e88: 1d25 adds r5, r4, #4
- 8005e8a: 4628 mov r0, r5
- 8005e8c: f7fe fbe4 bl 8004658 <uxListRemove>
- prvAddTaskToReadyList( pxUnblockedTCB );
- 8005e90: 6ae0 ldr r0, [r4, #44] @ 0x2c
- 8005e92: 4b15 ldr r3, [pc, #84] @ (8005ee8 <xTaskRemoveFromEventList+0x78>)
- 8005e94: 681b ldr r3, [r3, #0]
- 8005e96: 4298 cmp r0, r3
- 8005e98: d901 bls.n 8005e9e <xTaskRemoveFromEventList+0x2e>
- 8005e9a: 4b13 ldr r3, [pc, #76] @ (8005ee8 <xTaskRemoveFromEventList+0x78>)
- 8005e9c: 6018 str r0, [r3, #0]
- 8005e9e: eb00 0080 add.w r0, r0, r0, lsl #2
- 8005ea2: 4629 mov r1, r5
- 8005ea4: 4b11 ldr r3, [pc, #68] @ (8005eec <xTaskRemoveFromEventList+0x7c>)
- 8005ea6: eb03 0080 add.w r0, r3, r0, lsl #2
- 8005eaa: f7fe fbb1 bl 8004610 <vListInsertEnd>
- if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority )
- 8005eae: 6ae2 ldr r2, [r4, #44] @ 0x2c
- 8005eb0: 4b0f ldr r3, [pc, #60] @ (8005ef0 <xTaskRemoveFromEventList+0x80>)
- 8005eb2: 681b ldr r3, [r3, #0]
- 8005eb4: 6adb ldr r3, [r3, #44] @ 0x2c
- 8005eb6: 429a cmp r2, r3
- 8005eb8: d911 bls.n 8005ede <xTaskRemoveFromEventList+0x6e>
- xYieldPending = pdTRUE;
- 8005eba: 2001 movs r0, #1
- 8005ebc: 4b0d ldr r3, [pc, #52] @ (8005ef4 <xTaskRemoveFromEventList+0x84>)
- 8005ebe: 6018 str r0, [r3, #0]
- }
- 8005ec0: bd38 pop {r3, r4, r5, pc}
- 8005ec2: f04f 0350 mov.w r3, #80 @ 0x50
- 8005ec6: f383 8811 msr BASEPRI, r3
- 8005eca: f3bf 8f6f isb sy
- 8005ece: f3bf 8f4f dsb sy
- configASSERT( pxUnblockedTCB );
- 8005ed2: e7fe b.n 8005ed2 <xTaskRemoveFromEventList+0x62>
- vListInsertEnd( &( xPendingReadyList ), &( pxUnblockedTCB->xEventListItem ) );
- 8005ed4: 4629 mov r1, r5
- 8005ed6: 4808 ldr r0, [pc, #32] @ (8005ef8 <xTaskRemoveFromEventList+0x88>)
- 8005ed8: f7fe fb9a bl 8004610 <vListInsertEnd>
- 8005edc: e7e7 b.n 8005eae <xTaskRemoveFromEventList+0x3e>
- xReturn = pdFALSE;
- 8005ede: 2000 movs r0, #0
- return xReturn;
- 8005ee0: e7ee b.n 8005ec0 <xTaskRemoveFromEventList+0x50>
- 8005ee2: bf00 nop
- 8005ee4: 240128c8 .word 0x240128c8
- 8005ee8: 240128e8 .word 0x240128e8
- 8005eec: 24012964 .word 0x24012964
- 8005ef0: 24012dc4 .word 0x24012dc4
- 8005ef4: 240128dc .word 0x240128dc
- 8005ef8: 24012920 .word 0x24012920
- 08005efc <vTaskInternalSetTimeOutState>:
- pxTimeOut->xOverflowCount = xNumOfOverflows;
- 8005efc: 4b03 ldr r3, [pc, #12] @ (8005f0c <vTaskInternalSetTimeOutState+0x10>)
- 8005efe: 681b ldr r3, [r3, #0]
- 8005f00: 6003 str r3, [r0, #0]
- pxTimeOut->xTimeOnEntering = xTickCount;
- 8005f02: 4b03 ldr r3, [pc, #12] @ (8005f10 <vTaskInternalSetTimeOutState+0x14>)
- 8005f04: 681b ldr r3, [r3, #0]
- 8005f06: 6043 str r3, [r0, #4]
- }
- 8005f08: 4770 bx lr
- 8005f0a: bf00 nop
- 8005f0c: 240128d8 .word 0x240128d8
- 8005f10: 240128ec .word 0x240128ec
- 08005f14 <xTaskCheckForTimeOut>:
- {
- 8005f14: b5f8 push {r3, r4, r5, r6, r7, lr}
- configASSERT( pxTimeOut );
- 8005f16: b1c8 cbz r0, 8005f4c <xTaskCheckForTimeOut+0x38>
- 8005f18: 460c mov r4, r1
- 8005f1a: 4605 mov r5, r0
- configASSERT( pxTicksToWait );
- 8005f1c: b1f9 cbz r1, 8005f5e <xTaskCheckForTimeOut+0x4a>
- taskENTER_CRITICAL();
- 8005f1e: f7fe fc19 bl 8004754 <vPortEnterCritical>
- const TickType_t xConstTickCount = xTickCount;
- 8005f22: 4b1b ldr r3, [pc, #108] @ (8005f90 <xTaskCheckForTimeOut+0x7c>)
- 8005f24: 6819 ldr r1, [r3, #0]
- const TickType_t xElapsedTime = xConstTickCount - pxTimeOut->xTimeOnEntering;
- 8005f26: 686b ldr r3, [r5, #4]
- 8005f28: 1ac8 subs r0, r1, r3
- if( *pxTicksToWait == portMAX_DELAY )
- 8005f2a: 6822 ldr r2, [r4, #0]
- 8005f2c: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff
- 8005f30: d026 beq.n 8005f80 <xTaskCheckForTimeOut+0x6c>
- if( ( xNumOfOverflows != pxTimeOut->xOverflowCount ) && ( xConstTickCount >= pxTimeOut->xTimeOnEntering ) ) /*lint !e525 Indentation preferred as is to make code within pre-processor directives clearer. */
- 8005f32: 4e18 ldr r6, [pc, #96] @ (8005f94 <xTaskCheckForTimeOut+0x80>)
- 8005f34: 6836 ldr r6, [r6, #0]
- 8005f36: 682f ldr r7, [r5, #0]
- 8005f38: 42b7 cmp r7, r6
- 8005f3a: d001 beq.n 8005f40 <xTaskCheckForTimeOut+0x2c>
- 8005f3c: 428b cmp r3, r1
- 8005f3e: d924 bls.n 8005f8a <xTaskCheckForTimeOut+0x76>
- else if( xElapsedTime < *pxTicksToWait ) /*lint !e961 Explicit casting is only redundant with some compilers, whereas others require it to prevent integer conversion errors. */
- 8005f40: 4282 cmp r2, r0
- 8005f42: d815 bhi.n 8005f70 <xTaskCheckForTimeOut+0x5c>
- *pxTicksToWait = 0;
- 8005f44: 2300 movs r3, #0
- 8005f46: 6023 str r3, [r4, #0]
- xReturn = pdTRUE;
- 8005f48: 2401 movs r4, #1
- 8005f4a: e01a b.n 8005f82 <xTaskCheckForTimeOut+0x6e>
- 8005f4c: f04f 0350 mov.w r3, #80 @ 0x50
- 8005f50: f383 8811 msr BASEPRI, r3
- 8005f54: f3bf 8f6f isb sy
- 8005f58: f3bf 8f4f dsb sy
- configASSERT( pxTimeOut );
- 8005f5c: e7fe b.n 8005f5c <xTaskCheckForTimeOut+0x48>
- 8005f5e: f04f 0350 mov.w r3, #80 @ 0x50
- 8005f62: f383 8811 msr BASEPRI, r3
- 8005f66: f3bf 8f6f isb sy
- 8005f6a: f3bf 8f4f dsb sy
- configASSERT( pxTicksToWait );
- 8005f6e: e7fe b.n 8005f6e <xTaskCheckForTimeOut+0x5a>
- *pxTicksToWait -= xElapsedTime;
- 8005f70: 1a5b subs r3, r3, r1
- 8005f72: 4413 add r3, r2
- 8005f74: 6023 str r3, [r4, #0]
- vTaskInternalSetTimeOutState( pxTimeOut );
- 8005f76: 4628 mov r0, r5
- 8005f78: f7ff ffc0 bl 8005efc <vTaskInternalSetTimeOutState>
- xReturn = pdFALSE;
- 8005f7c: 2400 movs r4, #0
- 8005f7e: e000 b.n 8005f82 <xTaskCheckForTimeOut+0x6e>
- xReturn = pdFALSE;
- 8005f80: 2400 movs r4, #0
- taskEXIT_CRITICAL();
- 8005f82: f7fe fc09 bl 8004798 <vPortExitCritical>
- }
- 8005f86: 4620 mov r0, r4
- 8005f88: bdf8 pop {r3, r4, r5, r6, r7, pc}
- xReturn = pdTRUE;
- 8005f8a: 2401 movs r4, #1
- 8005f8c: e7f9 b.n 8005f82 <xTaskCheckForTimeOut+0x6e>
- 8005f8e: bf00 nop
- 8005f90: 240128ec .word 0x240128ec
- 8005f94: 240128d8 .word 0x240128d8
- 08005f98 <vTaskMissedYield>:
- xYieldPending = pdTRUE;
- 8005f98: 4b01 ldr r3, [pc, #4] @ (8005fa0 <vTaskMissedYield+0x8>)
- 8005f9a: 2201 movs r2, #1
- 8005f9c: 601a str r2, [r3, #0]
- }
- 8005f9e: 4770 bx lr
- 8005fa0: 240128dc .word 0x240128dc
- 08005fa4 <xTaskGetCurrentTaskHandle>:
- xReturn = pxCurrentTCB;
- 8005fa4: 4b01 ldr r3, [pc, #4] @ (8005fac <xTaskGetCurrentTaskHandle+0x8>)
- 8005fa6: 6818 ldr r0, [r3, #0]
- }
- 8005fa8: 4770 bx lr
- 8005faa: bf00 nop
- 8005fac: 24012dc4 .word 0x24012dc4
- 08005fb0 <xTaskGetSchedulerState>:
- if( xSchedulerRunning == pdFALSE )
- 8005fb0: 4b05 ldr r3, [pc, #20] @ (8005fc8 <xTaskGetSchedulerState+0x18>)
- 8005fb2: 681b ldr r3, [r3, #0]
- 8005fb4: b133 cbz r3, 8005fc4 <xTaskGetSchedulerState+0x14>
- if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
- 8005fb6: 4b05 ldr r3, [pc, #20] @ (8005fcc <xTaskGetSchedulerState+0x1c>)
- 8005fb8: 681b ldr r3, [r3, #0]
- 8005fba: b10b cbz r3, 8005fc0 <xTaskGetSchedulerState+0x10>
- xReturn = taskSCHEDULER_SUSPENDED;
- 8005fbc: 2000 movs r0, #0
- }
- 8005fbe: 4770 bx lr
- xReturn = taskSCHEDULER_RUNNING;
- 8005fc0: 2002 movs r0, #2
- 8005fc2: 4770 bx lr
- xReturn = taskSCHEDULER_NOT_STARTED;
- 8005fc4: 2001 movs r0, #1
- 8005fc6: 4770 bx lr
- 8005fc8: 240128e4 .word 0x240128e4
- 8005fcc: 240128c8 .word 0x240128c8
- 08005fd0 <xTaskPriorityInherit>:
- if( pxMutexHolder != NULL )
- 8005fd0: 2800 cmp r0, #0
- 8005fd2: d03e beq.n 8006052 <xTaskPriorityInherit+0x82>
- {
- 8005fd4: b538 push {r3, r4, r5, lr}
- 8005fd6: 4604 mov r4, r0
- if( pxMutexHolderTCB->uxPriority < pxCurrentTCB->uxPriority )
- 8005fd8: 6ac3 ldr r3, [r0, #44] @ 0x2c
- 8005fda: 4a20 ldr r2, [pc, #128] @ (800605c <xTaskPriorityInherit+0x8c>)
- 8005fdc: 6812 ldr r2, [r2, #0]
- 8005fde: 6ad2 ldr r2, [r2, #44] @ 0x2c
- 8005fe0: 4293 cmp r3, r2
- 8005fe2: d22e bcs.n 8006042 <xTaskPriorityInherit+0x72>
- if( ( listGET_LIST_ITEM_VALUE( &( pxMutexHolderTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) == 0UL )
- 8005fe4: 6982 ldr r2, [r0, #24]
- 8005fe6: 2a00 cmp r2, #0
- 8005fe8: db05 blt.n 8005ff6 <xTaskPriorityInherit+0x26>
- listSET_LIST_ITEM_VALUE( &( pxMutexHolderTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxCurrentTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
- 8005fea: 4a1c ldr r2, [pc, #112] @ (800605c <xTaskPriorityInherit+0x8c>)
- 8005fec: 6812 ldr r2, [r2, #0]
- 8005fee: 6ad2 ldr r2, [r2, #44] @ 0x2c
- 8005ff0: f1c2 0238 rsb r2, r2, #56 @ 0x38
- 8005ff4: 6182 str r2, [r0, #24]
- if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ pxMutexHolderTCB->uxPriority ] ), &( pxMutexHolderTCB->xStateListItem ) ) != pdFALSE )
- 8005ff6: 6961 ldr r1, [r4, #20]
- 8005ff8: eb03 0383 add.w r3, r3, r3, lsl #2
- 8005ffc: 4a18 ldr r2, [pc, #96] @ (8006060 <xTaskPriorityInherit+0x90>)
- 8005ffe: eb02 0383 add.w r3, r2, r3, lsl #2
- 8006002: 4299 cmp r1, r3
- 8006004: d005 beq.n 8006012 <xTaskPriorityInherit+0x42>
- pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority;
- 8006006: 4b15 ldr r3, [pc, #84] @ (800605c <xTaskPriorityInherit+0x8c>)
- 8006008: 681b ldr r3, [r3, #0]
- 800600a: 6adb ldr r3, [r3, #44] @ 0x2c
- 800600c: 62e3 str r3, [r4, #44] @ 0x2c
- xReturn = pdTRUE;
- 800600e: 2001 movs r0, #1
- }
- 8006010: bd38 pop {r3, r4, r5, pc}
- if( uxListRemove( &( pxMutexHolderTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
- 8006012: 1d25 adds r5, r4, #4
- 8006014: 4628 mov r0, r5
- 8006016: f7fe fb1f bl 8004658 <uxListRemove>
- pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority;
- 800601a: 4b10 ldr r3, [pc, #64] @ (800605c <xTaskPriorityInherit+0x8c>)
- 800601c: 681b ldr r3, [r3, #0]
- 800601e: 6ad8 ldr r0, [r3, #44] @ 0x2c
- 8006020: 62e0 str r0, [r4, #44] @ 0x2c
- prvAddTaskToReadyList( pxMutexHolderTCB );
- 8006022: 4b10 ldr r3, [pc, #64] @ (8006064 <xTaskPriorityInherit+0x94>)
- 8006024: 681b ldr r3, [r3, #0]
- 8006026: 4298 cmp r0, r3
- 8006028: d901 bls.n 800602e <xTaskPriorityInherit+0x5e>
- 800602a: 4b0e ldr r3, [pc, #56] @ (8006064 <xTaskPriorityInherit+0x94>)
- 800602c: 6018 str r0, [r3, #0]
- 800602e: eb00 0080 add.w r0, r0, r0, lsl #2
- 8006032: 4629 mov r1, r5
- 8006034: 4b0a ldr r3, [pc, #40] @ (8006060 <xTaskPriorityInherit+0x90>)
- 8006036: eb03 0080 add.w r0, r3, r0, lsl #2
- 800603a: f7fe fae9 bl 8004610 <vListInsertEnd>
- xReturn = pdTRUE;
- 800603e: 2001 movs r0, #1
- 8006040: e7e6 b.n 8006010 <xTaskPriorityInherit+0x40>
- if( pxMutexHolderTCB->uxBasePriority < pxCurrentTCB->uxPriority )
- 8006042: 6cc2 ldr r2, [r0, #76] @ 0x4c
- 8006044: 4b05 ldr r3, [pc, #20] @ (800605c <xTaskPriorityInherit+0x8c>)
- 8006046: 681b ldr r3, [r3, #0]
- 8006048: 6adb ldr r3, [r3, #44] @ 0x2c
- 800604a: 429a cmp r2, r3
- 800604c: d303 bcc.n 8006056 <xTaskPriorityInherit+0x86>
- BaseType_t xReturn = pdFALSE;
- 800604e: 2000 movs r0, #0
- 8006050: e7de b.n 8006010 <xTaskPriorityInherit+0x40>
- 8006052: 2000 movs r0, #0
- }
- 8006054: 4770 bx lr
- xReturn = pdTRUE;
- 8006056: 2001 movs r0, #1
- return xReturn;
- 8006058: e7da b.n 8006010 <xTaskPriorityInherit+0x40>
- 800605a: bf00 nop
- 800605c: 24012dc4 .word 0x24012dc4
- 8006060: 24012964 .word 0x24012964
- 8006064: 240128e8 .word 0x240128e8
- 08006068 <xTaskPriorityDisinherit>:
- if( pxMutexHolder != NULL )
- 8006068: 2800 cmp r0, #0
- 800606a: d03b beq.n 80060e4 <xTaskPriorityDisinherit+0x7c>
- {
- 800606c: b538 push {r3, r4, r5, lr}
- 800606e: 4604 mov r4, r0
- configASSERT( pxTCB == pxCurrentTCB );
- 8006070: 4b1e ldr r3, [pc, #120] @ (80060ec <xTaskPriorityDisinherit+0x84>)
- 8006072: 681b ldr r3, [r3, #0]
- 8006074: 4283 cmp r3, r0
- 8006076: d008 beq.n 800608a <xTaskPriorityDisinherit+0x22>
- 8006078: f04f 0350 mov.w r3, #80 @ 0x50
- 800607c: f383 8811 msr BASEPRI, r3
- 8006080: f3bf 8f6f isb sy
- 8006084: f3bf 8f4f dsb sy
- 8006088: e7fe b.n 8006088 <xTaskPriorityDisinherit+0x20>
- configASSERT( pxTCB->uxMutexesHeld );
- 800608a: 6d03 ldr r3, [r0, #80] @ 0x50
- 800608c: b943 cbnz r3, 80060a0 <xTaskPriorityDisinherit+0x38>
- 800608e: f04f 0350 mov.w r3, #80 @ 0x50
- 8006092: f383 8811 msr BASEPRI, r3
- 8006096: f3bf 8f6f isb sy
- 800609a: f3bf 8f4f dsb sy
- 800609e: e7fe b.n 800609e <xTaskPriorityDisinherit+0x36>
- ( pxTCB->uxMutexesHeld )--;
- 80060a0: 3b01 subs r3, #1
- 80060a2: 6503 str r3, [r0, #80] @ 0x50
- if( pxTCB->uxPriority != pxTCB->uxBasePriority )
- 80060a4: 6ac1 ldr r1, [r0, #44] @ 0x2c
- 80060a6: 6cc2 ldr r2, [r0, #76] @ 0x4c
- 80060a8: 4291 cmp r1, r2
- 80060aa: d01d beq.n 80060e8 <xTaskPriorityDisinherit+0x80>
- if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 )
- 80060ac: b10b cbz r3, 80060b2 <xTaskPriorityDisinherit+0x4a>
- BaseType_t xReturn = pdFALSE;
- 80060ae: 2000 movs r0, #0
- }
- 80060b0: bd38 pop {r3, r4, r5, pc}
- if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
- 80060b2: 1d05 adds r5, r0, #4
- 80060b4: 4628 mov r0, r5
- 80060b6: f7fe facf bl 8004658 <uxListRemove>
- pxTCB->uxPriority = pxTCB->uxBasePriority;
- 80060ba: 6ce0 ldr r0, [r4, #76] @ 0x4c
- 80060bc: 62e0 str r0, [r4, #44] @ 0x2c
- listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
- 80060be: f1c0 0338 rsb r3, r0, #56 @ 0x38
- 80060c2: 61a3 str r3, [r4, #24]
- prvAddTaskToReadyList( pxTCB );
- 80060c4: 4b0a ldr r3, [pc, #40] @ (80060f0 <xTaskPriorityDisinherit+0x88>)
- 80060c6: 681b ldr r3, [r3, #0]
- 80060c8: 4298 cmp r0, r3
- 80060ca: d901 bls.n 80060d0 <xTaskPriorityDisinherit+0x68>
- 80060cc: 4b08 ldr r3, [pc, #32] @ (80060f0 <xTaskPriorityDisinherit+0x88>)
- 80060ce: 6018 str r0, [r3, #0]
- 80060d0: eb00 0080 add.w r0, r0, r0, lsl #2
- 80060d4: 4629 mov r1, r5
- 80060d6: 4b07 ldr r3, [pc, #28] @ (80060f4 <xTaskPriorityDisinherit+0x8c>)
- 80060d8: eb03 0080 add.w r0, r3, r0, lsl #2
- 80060dc: f7fe fa98 bl 8004610 <vListInsertEnd>
- xReturn = pdTRUE;
- 80060e0: 2001 movs r0, #1
- 80060e2: e7e5 b.n 80060b0 <xTaskPriorityDisinherit+0x48>
- BaseType_t xReturn = pdFALSE;
- 80060e4: 2000 movs r0, #0
- }
- 80060e6: 4770 bx lr
- BaseType_t xReturn = pdFALSE;
- 80060e8: 2000 movs r0, #0
- 80060ea: e7e1 b.n 80060b0 <xTaskPriorityDisinherit+0x48>
- 80060ec: 24012dc4 .word 0x24012dc4
- 80060f0: 240128e8 .word 0x240128e8
- 80060f4: 24012964 .word 0x24012964
- 080060f8 <vTaskPriorityDisinheritAfterTimeout>:
- if( pxMutexHolder != NULL )
- 80060f8: 2800 cmp r0, #0
- 80060fa: d046 beq.n 800618a <vTaskPriorityDisinheritAfterTimeout+0x92>
- {
- 80060fc: b538 push {r3, r4, r5, lr}
- 80060fe: 4604 mov r4, r0
- configASSERT( pxTCB->uxMutexesHeld );
- 8006100: 6d03 ldr r3, [r0, #80] @ 0x50
- 8006102: b943 cbnz r3, 8006116 <vTaskPriorityDisinheritAfterTimeout+0x1e>
- 8006104: f04f 0350 mov.w r3, #80 @ 0x50
- 8006108: f383 8811 msr BASEPRI, r3
- 800610c: f3bf 8f6f isb sy
- 8006110: f3bf 8f4f dsb sy
- 8006114: e7fe b.n 8006114 <vTaskPriorityDisinheritAfterTimeout+0x1c>
- if( pxTCB->uxBasePriority < uxHighestPriorityWaitingTask )
- 8006116: 6cc2 ldr r2, [r0, #76] @ 0x4c
- 8006118: 428a cmp r2, r1
- 800611a: d200 bcs.n 800611e <vTaskPriorityDisinheritAfterTimeout+0x26>
- uxPriorityToUse = uxHighestPriorityWaitingTask;
- 800611c: 460a mov r2, r1
- if( pxTCB->uxPriority != uxPriorityToUse )
- 800611e: 6ae1 ldr r1, [r4, #44] @ 0x2c
- 8006120: 4291 cmp r1, r2
- 8006122: d001 beq.n 8006128 <vTaskPriorityDisinheritAfterTimeout+0x30>
- if( pxTCB->uxMutexesHeld == uxOnlyOneMutexHeld )
- 8006124: 2b01 cmp r3, #1
- 8006126: d000 beq.n 800612a <vTaskPriorityDisinheritAfterTimeout+0x32>
- }
- 8006128: bd38 pop {r3, r4, r5, pc}
- configASSERT( pxTCB != pxCurrentTCB );
- 800612a: 4b18 ldr r3, [pc, #96] @ (800618c <vTaskPriorityDisinheritAfterTimeout+0x94>)
- 800612c: 681b ldr r3, [r3, #0]
- 800612e: 42a3 cmp r3, r4
- 8006130: d022 beq.n 8006178 <vTaskPriorityDisinheritAfterTimeout+0x80>
- pxTCB->uxPriority = uxPriorityToUse;
- 8006132: 62e2 str r2, [r4, #44] @ 0x2c
- if( ( listGET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) == 0UL )
- 8006134: 69a3 ldr r3, [r4, #24]
- 8006136: 2b00 cmp r3, #0
- 8006138: db02 blt.n 8006140 <vTaskPriorityDisinheritAfterTimeout+0x48>
- listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) uxPriorityToUse ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
- 800613a: f1c2 0238 rsb r2, r2, #56 @ 0x38
- 800613e: 61a2 str r2, [r4, #24]
- if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ uxPriorityUsedOnEntry ] ), &( pxTCB->xStateListItem ) ) != pdFALSE )
- 8006140: 6962 ldr r2, [r4, #20]
- 8006142: eb01 0181 add.w r1, r1, r1, lsl #2
- 8006146: 4b12 ldr r3, [pc, #72] @ (8006190 <vTaskPriorityDisinheritAfterTimeout+0x98>)
- 8006148: eb03 0381 add.w r3, r3, r1, lsl #2
- 800614c: 429a cmp r2, r3
- 800614e: d1eb bne.n 8006128 <vTaskPriorityDisinheritAfterTimeout+0x30>
- if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
- 8006150: 1d25 adds r5, r4, #4
- 8006152: 4628 mov r0, r5
- 8006154: f7fe fa80 bl 8004658 <uxListRemove>
- prvAddTaskToReadyList( pxTCB );
- 8006158: 6ae0 ldr r0, [r4, #44] @ 0x2c
- 800615a: 4b0e ldr r3, [pc, #56] @ (8006194 <vTaskPriorityDisinheritAfterTimeout+0x9c>)
- 800615c: 681b ldr r3, [r3, #0]
- 800615e: 4298 cmp r0, r3
- 8006160: d901 bls.n 8006166 <vTaskPriorityDisinheritAfterTimeout+0x6e>
- 8006162: 4b0c ldr r3, [pc, #48] @ (8006194 <vTaskPriorityDisinheritAfterTimeout+0x9c>)
- 8006164: 6018 str r0, [r3, #0]
- 8006166: eb00 0080 add.w r0, r0, r0, lsl #2
- 800616a: 4629 mov r1, r5
- 800616c: 4b08 ldr r3, [pc, #32] @ (8006190 <vTaskPriorityDisinheritAfterTimeout+0x98>)
- 800616e: eb03 0080 add.w r0, r3, r0, lsl #2
- 8006172: f7fe fa4d bl 8004610 <vListInsertEnd>
- }
- 8006176: e7d7 b.n 8006128 <vTaskPriorityDisinheritAfterTimeout+0x30>
- 8006178: f04f 0350 mov.w r3, #80 @ 0x50
- 800617c: f383 8811 msr BASEPRI, r3
- 8006180: f3bf 8f6f isb sy
- 8006184: f3bf 8f4f dsb sy
- configASSERT( pxTCB != pxCurrentTCB );
- 8006188: e7fe b.n 8006188 <vTaskPriorityDisinheritAfterTimeout+0x90>
- 800618a: 4770 bx lr
- 800618c: 24012dc4 .word 0x24012dc4
- 8006190: 24012964 .word 0x24012964
- 8006194: 240128e8 .word 0x240128e8
- 08006198 <pvTaskIncrementMutexHeldCount>:
- if( pxCurrentTCB != NULL )
- 8006198: 4b05 ldr r3, [pc, #20] @ (80061b0 <pvTaskIncrementMutexHeldCount+0x18>)
- 800619a: 681b ldr r3, [r3, #0]
- 800619c: b123 cbz r3, 80061a8 <pvTaskIncrementMutexHeldCount+0x10>
- ( pxCurrentTCB->uxMutexesHeld )++;
- 800619e: 4b04 ldr r3, [pc, #16] @ (80061b0 <pvTaskIncrementMutexHeldCount+0x18>)
- 80061a0: 681a ldr r2, [r3, #0]
- 80061a2: 6d13 ldr r3, [r2, #80] @ 0x50
- 80061a4: 3301 adds r3, #1
- 80061a6: 6513 str r3, [r2, #80] @ 0x50
- return pxCurrentTCB;
- 80061a8: 4b01 ldr r3, [pc, #4] @ (80061b0 <pvTaskIncrementMutexHeldCount+0x18>)
- 80061aa: 6818 ldr r0, [r3, #0]
- }
- 80061ac: 4770 bx lr
- 80061ae: bf00 nop
- 80061b0: 24012dc4 .word 0x24012dc4
- 080061b4 <prvGetNextExpireTime>:
- the timer with the nearest expiry time will expire. If there are no
- active timers then just set the next expire time to 0. That will cause
- this task to unblock when the tick count overflows, at which point the
- timer lists will be switched and the next expiry time can be
- re-assessed. */
- *pxListWasEmpty = listLIST_IS_EMPTY( pxCurrentTimerList );
- 80061b4: 4b06 ldr r3, [pc, #24] @ (80061d0 <prvGetNextExpireTime+0x1c>)
- 80061b6: 681a ldr r2, [r3, #0]
- 80061b8: 6813 ldr r3, [r2, #0]
- 80061ba: b92b cbnz r3, 80061c8 <prvGetNextExpireTime+0x14>
- 80061bc: 2301 movs r3, #1
- 80061be: 6003 str r3, [r0, #0]
- if( *pxListWasEmpty == pdFALSE )
- 80061c0: b923 cbnz r3, 80061cc <prvGetNextExpireTime+0x18>
- {
- xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList );
- 80061c2: 68d3 ldr r3, [r2, #12]
- 80061c4: 6818 ldr r0, [r3, #0]
- 80061c6: 4770 bx lr
- *pxListWasEmpty = listLIST_IS_EMPTY( pxCurrentTimerList );
- 80061c8: 2300 movs r3, #0
- 80061ca: e7f8 b.n 80061be <prvGetNextExpireTime+0xa>
- }
- else
- {
- /* Ensure the task unblocks when the tick count rolls over. */
- xNextExpireTime = ( TickType_t ) 0U;
- 80061cc: 2000 movs r0, #0
- }
- return xNextExpireTime;
- }
- 80061ce: 4770 bx lr
- 80061d0: 24012ec8 .word 0x24012ec8
- 080061d4 <prvInsertTimerInActiveList>:
- return xTimeNow;
- }
- /*-----------------------------------------------------------*/
- static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime )
- {
- 80061d4: b508 push {r3, lr}
- BaseType_t xProcessTimerNow = pdFALSE;
- listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xNextExpiryTime );
- 80061d6: 6041 str r1, [r0, #4]
- listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer );
- 80061d8: 6100 str r0, [r0, #16]
- if( xNextExpiryTime <= xTimeNow )
- 80061da: 4291 cmp r1, r2
- 80061dc: d80c bhi.n 80061f8 <prvInsertTimerInActiveList+0x24>
- {
- /* Has the expiry time elapsed between the command to start/reset a
- timer was issued, and the time the command was processed? */
- if( ( ( TickType_t ) ( xTimeNow - xCommandTime ) ) >= pxTimer->xTimerPeriodInTicks ) /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
- 80061de: 1ad2 subs r2, r2, r3
- 80061e0: 6983 ldr r3, [r0, #24]
- 80061e2: 429a cmp r2, r3
- 80061e4: d301 bcc.n 80061ea <prvInsertTimerInActiveList+0x16>
- {
- /* The time between a command being issued and the command being
- processed actually exceeds the timers period. */
- xProcessTimerNow = pdTRUE;
- 80061e6: 2001 movs r0, #1
- vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) );
- }
- }
- return xProcessTimerNow;
- }
- 80061e8: bd08 pop {r3, pc}
- vListInsert( pxOverflowTimerList, &( pxTimer->xTimerListItem ) );
- 80061ea: 1d01 adds r1, r0, #4
- 80061ec: 4b0b ldr r3, [pc, #44] @ (800621c <prvInsertTimerInActiveList+0x48>)
- 80061ee: 6818 ldr r0, [r3, #0]
- 80061f0: f7fe fa19 bl 8004626 <vListInsert>
- BaseType_t xProcessTimerNow = pdFALSE;
- 80061f4: 2000 movs r0, #0
- 80061f6: e7f7 b.n 80061e8 <prvInsertTimerInActiveList+0x14>
- if( ( xTimeNow < xCommandTime ) && ( xNextExpiryTime >= xCommandTime ) )
- 80061f8: 429a cmp r2, r3
- 80061fa: bf2c ite cs
- 80061fc: 2200 movcs r2, #0
- 80061fe: 2201 movcc r2, #1
- 8006200: 4299 cmp r1, r3
- 8006202: bf38 it cc
- 8006204: 2200 movcc r2, #0
- 8006206: b10a cbz r2, 800620c <prvInsertTimerInActiveList+0x38>
- xProcessTimerNow = pdTRUE;
- 8006208: 2001 movs r0, #1
- return xProcessTimerNow;
- 800620a: e7ed b.n 80061e8 <prvInsertTimerInActiveList+0x14>
- vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) );
- 800620c: 1d01 adds r1, r0, #4
- 800620e: 4b04 ldr r3, [pc, #16] @ (8006220 <prvInsertTimerInActiveList+0x4c>)
- 8006210: 6818 ldr r0, [r3, #0]
- 8006212: f7fe fa08 bl 8004626 <vListInsert>
- BaseType_t xProcessTimerNow = pdFALSE;
- 8006216: 2000 movs r0, #0
- 8006218: e7e6 b.n 80061e8 <prvInsertTimerInActiveList+0x14>
- 800621a: bf00 nop
- 800621c: 24012ec4 .word 0x24012ec4
- 8006220: 24012ec8 .word 0x24012ec8
- 08006224 <prvCheckForValidListAndQueue>:
- pxOverflowTimerList = pxTemp;
- }
- /*-----------------------------------------------------------*/
- static void prvCheckForValidListAndQueue( void )
- {
- 8006224: b530 push {r4, r5, lr}
- 8006226: b083 sub sp, #12
- /* Check that the list from which active timers are referenced, and the
- queue used to communicate with the timer service, have been
- initialised. */
- taskENTER_CRITICAL();
- 8006228: f7fe fa94 bl 8004754 <vPortEnterCritical>
- {
- if( xTimerQueue == NULL )
- 800622c: 4b11 ldr r3, [pc, #68] @ (8006274 <prvCheckForValidListAndQueue+0x50>)
- 800622e: 681b ldr r3, [r3, #0]
- 8006230: b11b cbz r3, 800623a <prvCheckForValidListAndQueue+0x16>
- else
- {
- mtCOVERAGE_TEST_MARKER();
- }
- }
- taskEXIT_CRITICAL();
- 8006232: f7fe fab1 bl 8004798 <vPortExitCritical>
- }
- 8006236: b003 add sp, #12
- 8006238: bd30 pop {r4, r5, pc}
- vListInitialise( &xActiveTimerList1 );
- 800623a: 4d0f ldr r5, [pc, #60] @ (8006278 <prvCheckForValidListAndQueue+0x54>)
- 800623c: 4628 mov r0, r5
- 800623e: f7fe f9d9 bl 80045f4 <vListInitialise>
- vListInitialise( &xActiveTimerList2 );
- 8006242: 4c0e ldr r4, [pc, #56] @ (800627c <prvCheckForValidListAndQueue+0x58>)
- 8006244: 4620 mov r0, r4
- 8006246: f7fe f9d5 bl 80045f4 <vListInitialise>
- pxCurrentTimerList = &xActiveTimerList1;
- 800624a: 4b0d ldr r3, [pc, #52] @ (8006280 <prvCheckForValidListAndQueue+0x5c>)
- 800624c: 601d str r5, [r3, #0]
- pxOverflowTimerList = &xActiveTimerList2;
- 800624e: 4b0d ldr r3, [pc, #52] @ (8006284 <prvCheckForValidListAndQueue+0x60>)
- 8006250: 601c str r4, [r3, #0]
- xTimerQueue = xQueueCreateStatic( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, ( UBaseType_t ) sizeof( DaemonTaskMessage_t ), &( ucStaticTimerQueueStorage[ 0 ] ), &xStaticTimerQueue );
- 8006252: 2300 movs r3, #0
- 8006254: 9300 str r3, [sp, #0]
- 8006256: 4b0c ldr r3, [pc, #48] @ (8006288 <prvCheckForValidListAndQueue+0x64>)
- 8006258: 4a0c ldr r2, [pc, #48] @ (800628c <prvCheckForValidListAndQueue+0x68>)
- 800625a: 2110 movs r1, #16
- 800625c: 200a movs r0, #10
- 800625e: f7fe fcc8 bl 8004bf2 <xQueueGenericCreateStatic>
- 8006262: 4b04 ldr r3, [pc, #16] @ (8006274 <prvCheckForValidListAndQueue+0x50>)
- 8006264: 6018 str r0, [r3, #0]
- if( xTimerQueue != NULL )
- 8006266: 2800 cmp r0, #0
- 8006268: d0e3 beq.n 8006232 <prvCheckForValidListAndQueue+0xe>
- vQueueAddToRegistry( xTimerQueue, "TmrQ" );
- 800626a: 4909 ldr r1, [pc, #36] @ (8006290 <prvCheckForValidListAndQueue+0x6c>)
- 800626c: f7ff f95c bl 8005528 <vQueueAddToRegistry>
- 8006270: e7df b.n 8006232 <prvCheckForValidListAndQueue+0xe>
- 8006272: bf00 nop
- 8006274: 24012ec0 .word 0x24012ec0
- 8006278: 24012ee0 .word 0x24012ee0
- 800627c: 24012ecc .word 0x24012ecc
- 8006280: 24012ec8 .word 0x24012ec8
- 8006284: 24012ec4 .word 0x24012ec4
- 8006288: 24012dc8 .word 0x24012dc8
- 800628c: 24012e18 .word 0x24012e18
- 8006290: 08014654 .word 0x08014654
- 08006294 <xTimerCreateTimerTask>:
- {
- 8006294: b510 push {r4, lr}
- 8006296: b088 sub sp, #32
- prvCheckForValidListAndQueue();
- 8006298: f7ff ffc4 bl 8006224 <prvCheckForValidListAndQueue>
- if( xTimerQueue != NULL )
- 800629c: 4b12 ldr r3, [pc, #72] @ (80062e8 <xTimerCreateTimerTask+0x54>)
- 800629e: 681b ldr r3, [r3, #0]
- 80062a0: b1cb cbz r3, 80062d6 <xTimerCreateTimerTask+0x42>
- StaticTask_t *pxTimerTaskTCBBuffer = NULL;
- 80062a2: 2400 movs r4, #0
- 80062a4: 9405 str r4, [sp, #20]
- StackType_t *pxTimerTaskStackBuffer = NULL;
- 80062a6: 9406 str r4, [sp, #24]
- vApplicationGetTimerTaskMemory( &pxTimerTaskTCBBuffer, &pxTimerTaskStackBuffer, &ulTimerTaskStackSize );
- 80062a8: aa07 add r2, sp, #28
- 80062aa: a906 add r1, sp, #24
- 80062ac: a805 add r0, sp, #20
- 80062ae: f7fe f871 bl 8004394 <vApplicationGetTimerTaskMemory>
- xTimerTaskHandle = xTaskCreateStatic( prvTimerTask,
- 80062b2: 9b05 ldr r3, [sp, #20]
- 80062b4: 9302 str r3, [sp, #8]
- 80062b6: 9b06 ldr r3, [sp, #24]
- 80062b8: 9301 str r3, [sp, #4]
- 80062ba: 2302 movs r3, #2
- 80062bc: 9300 str r3, [sp, #0]
- 80062be: 4623 mov r3, r4
- 80062c0: 9a07 ldr r2, [sp, #28]
- 80062c2: 490a ldr r1, [pc, #40] @ (80062ec <xTimerCreateTimerTask+0x58>)
- 80062c4: 480a ldr r0, [pc, #40] @ (80062f0 <xTimerCreateTimerTask+0x5c>)
- 80062c6: f7ff fb37 bl 8005938 <xTaskCreateStatic>
- 80062ca: 4b0a ldr r3, [pc, #40] @ (80062f4 <xTimerCreateTimerTask+0x60>)
- 80062cc: 6018 str r0, [r3, #0]
- if( xTimerTaskHandle != NULL )
- 80062ce: b110 cbz r0, 80062d6 <xTimerCreateTimerTask+0x42>
- }
- 80062d0: 2001 movs r0, #1
- 80062d2: b008 add sp, #32
- 80062d4: bd10 pop {r4, pc}
- 80062d6: f04f 0350 mov.w r3, #80 @ 0x50
- 80062da: f383 8811 msr BASEPRI, r3
- 80062de: f3bf 8f6f isb sy
- 80062e2: f3bf 8f4f dsb sy
- configASSERT( xReturn );
- 80062e6: e7fe b.n 80062e6 <xTimerCreateTimerTask+0x52>
- 80062e8: 24012ec0 .word 0x24012ec0
- 80062ec: 0801465c .word 0x0801465c
- 80062f0: 080065fd .word 0x080065fd
- 80062f4: 24012ebc .word 0x24012ebc
- 080062f8 <xTimerGenericCommand>:
- configASSERT( xTimer );
- 80062f8: b1b8 cbz r0, 800632a <xTimerGenericCommand+0x32>
- 80062fa: 469c mov ip, r3
- 80062fc: 4603 mov r3, r0
- if( xTimerQueue != NULL )
- 80062fe: 4818 ldr r0, [pc, #96] @ (8006360 <xTimerGenericCommand+0x68>)
- 8006300: 6800 ldr r0, [r0, #0]
- 8006302: b358 cbz r0, 800635c <xTimerGenericCommand+0x64>
- {
- 8006304: b500 push {lr}
- 8006306: b085 sub sp, #20
- xMessage.xMessageID = xCommandID;
- 8006308: 9100 str r1, [sp, #0]
- xMessage.u.xTimerParameters.xMessageValue = xOptionalValue;
- 800630a: 9201 str r2, [sp, #4]
- xMessage.u.xTimerParameters.pxTimer = xTimer;
- 800630c: 9302 str r3, [sp, #8]
- if( xCommandID < tmrFIRST_FROM_ISR_COMMAND )
- 800630e: 2905 cmp r1, #5
- 8006310: dc1c bgt.n 800634c <xTimerGenericCommand+0x54>
- if( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
- 8006312: f7ff fe4d bl 8005fb0 <xTaskGetSchedulerState>
- 8006316: 2802 cmp r0, #2
- 8006318: d010 beq.n 800633c <xTimerGenericCommand+0x44>
- xReturn = xQueueSendToBack( xTimerQueue, &xMessage, tmrNO_DELAY );
- 800631a: 2300 movs r3, #0
- 800631c: 461a mov r2, r3
- 800631e: 4669 mov r1, sp
- 8006320: 480f ldr r0, [pc, #60] @ (8006360 <xTimerGenericCommand+0x68>)
- 8006322: 6800 ldr r0, [r0, #0]
- 8006324: f7fe fd1d bl 8004d62 <xQueueGenericSend>
- 8006328: e015 b.n 8006356 <xTimerGenericCommand+0x5e>
- 800632a: f04f 0350 mov.w r3, #80 @ 0x50
- 800632e: f383 8811 msr BASEPRI, r3
- 8006332: f3bf 8f6f isb sy
- 8006336: f3bf 8f4f dsb sy
- configASSERT( xTimer );
- 800633a: e7fe b.n 800633a <xTimerGenericCommand+0x42>
- xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait );
- 800633c: 2300 movs r3, #0
- 800633e: 9a06 ldr r2, [sp, #24]
- 8006340: 4669 mov r1, sp
- 8006342: 4807 ldr r0, [pc, #28] @ (8006360 <xTimerGenericCommand+0x68>)
- 8006344: 6800 ldr r0, [r0, #0]
- 8006346: f7fe fd0c bl 8004d62 <xQueueGenericSend>
- 800634a: e004 b.n 8006356 <xTimerGenericCommand+0x5e>
- xReturn = xQueueSendToBackFromISR( xTimerQueue, &xMessage, pxHigherPriorityTaskWoken );
- 800634c: 2300 movs r3, #0
- 800634e: 4662 mov r2, ip
- 8006350: 4669 mov r1, sp
- 8006352: f7fe fe10 bl 8004f76 <xQueueGenericSendFromISR>
- }
- 8006356: b005 add sp, #20
- 8006358: f85d fb04 ldr.w pc, [sp], #4
- BaseType_t xReturn = pdFAIL;
- 800635c: 2000 movs r0, #0
- }
- 800635e: 4770 bx lr
- 8006360: 24012ec0 .word 0x24012ec0
- 08006364 <prvSwitchTimerLists>:
- {
- 8006364: b570 push {r4, r5, r6, lr}
- 8006366: b082 sub sp, #8
- while( listLIST_IS_EMPTY( pxCurrentTimerList ) == pdFALSE )
- 8006368: 4b1b ldr r3, [pc, #108] @ (80063d8 <prvSwitchTimerLists+0x74>)
- 800636a: 681b ldr r3, [r3, #0]
- 800636c: 681a ldr r2, [r3, #0]
- 800636e: b362 cbz r2, 80063ca <prvSwitchTimerLists+0x66>
- xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList );
- 8006370: 68db ldr r3, [r3, #12]
- 8006372: 681e ldr r6, [r3, #0]
- pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); /*lint !e9087 !e9079 void * is used as this macro is used with tasks and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
- 8006374: 68dc ldr r4, [r3, #12]
- ( void ) uxListRemove( &( pxTimer->xTimerListItem ) );
- 8006376: 1d25 adds r5, r4, #4
- 8006378: 4628 mov r0, r5
- 800637a: f7fe f96d bl 8004658 <uxListRemove>
- pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer );
- 800637e: 6a23 ldr r3, [r4, #32]
- 8006380: 4620 mov r0, r4
- 8006382: 4798 blx r3
- if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 )
- 8006384: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
- 8006388: f013 0f04 tst.w r3, #4
- 800638c: d0ec beq.n 8006368 <prvSwitchTimerLists+0x4>
- xReloadTime = ( xNextExpireTime + pxTimer->xTimerPeriodInTicks );
- 800638e: 69a3 ldr r3, [r4, #24]
- 8006390: 4433 add r3, r6
- if( xReloadTime > xNextExpireTime )
- 8006392: 429e cmp r6, r3
- 8006394: d207 bcs.n 80063a6 <prvSwitchTimerLists+0x42>
- listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xReloadTime );
- 8006396: 6063 str r3, [r4, #4]
- listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer );
- 8006398: 6124 str r4, [r4, #16]
- vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) );
- 800639a: 4629 mov r1, r5
- 800639c: 4b0e ldr r3, [pc, #56] @ (80063d8 <prvSwitchTimerLists+0x74>)
- 800639e: 6818 ldr r0, [r3, #0]
- 80063a0: f7fe f941 bl 8004626 <vListInsert>
- 80063a4: e7e0 b.n 8006368 <prvSwitchTimerLists+0x4>
- xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY );
- 80063a6: 2100 movs r1, #0
- 80063a8: 9100 str r1, [sp, #0]
- 80063aa: 460b mov r3, r1
- 80063ac: 4632 mov r2, r6
- 80063ae: 4620 mov r0, r4
- 80063b0: f7ff ffa2 bl 80062f8 <xTimerGenericCommand>
- configASSERT( xResult );
- 80063b4: 2800 cmp r0, #0
- 80063b6: d1d7 bne.n 8006368 <prvSwitchTimerLists+0x4>
- 80063b8: f04f 0350 mov.w r3, #80 @ 0x50
- 80063bc: f383 8811 msr BASEPRI, r3
- 80063c0: f3bf 8f6f isb sy
- 80063c4: f3bf 8f4f dsb sy
- 80063c8: e7fe b.n 80063c8 <prvSwitchTimerLists+0x64>
- pxCurrentTimerList = pxOverflowTimerList;
- 80063ca: 4a04 ldr r2, [pc, #16] @ (80063dc <prvSwitchTimerLists+0x78>)
- 80063cc: 6810 ldr r0, [r2, #0]
- 80063ce: 4902 ldr r1, [pc, #8] @ (80063d8 <prvSwitchTimerLists+0x74>)
- 80063d0: 6008 str r0, [r1, #0]
- pxOverflowTimerList = pxTemp;
- 80063d2: 6013 str r3, [r2, #0]
- }
- 80063d4: b002 add sp, #8
- 80063d6: bd70 pop {r4, r5, r6, pc}
- 80063d8: 24012ec8 .word 0x24012ec8
- 80063dc: 24012ec4 .word 0x24012ec4
- 080063e0 <prvSampleTimeNow>:
- {
- 80063e0: b538 push {r3, r4, r5, lr}
- 80063e2: 4605 mov r5, r0
- xTimeNow = xTaskGetTickCount();
- 80063e4: f7ff fb74 bl 8005ad0 <xTaskGetTickCount>
- 80063e8: 4604 mov r4, r0
- if( xTimeNow < xLastTime )
- 80063ea: 4b07 ldr r3, [pc, #28] @ (8006408 <prvSampleTimeNow+0x28>)
- 80063ec: 681b ldr r3, [r3, #0]
- 80063ee: 4283 cmp r3, r0
- 80063f0: d805 bhi.n 80063fe <prvSampleTimeNow+0x1e>
- *pxTimerListsWereSwitched = pdFALSE;
- 80063f2: 2300 movs r3, #0
- 80063f4: 602b str r3, [r5, #0]
- xLastTime = xTimeNow;
- 80063f6: 4b04 ldr r3, [pc, #16] @ (8006408 <prvSampleTimeNow+0x28>)
- 80063f8: 601c str r4, [r3, #0]
- }
- 80063fa: 4620 mov r0, r4
- 80063fc: bd38 pop {r3, r4, r5, pc}
- prvSwitchTimerLists();
- 80063fe: f7ff ffb1 bl 8006364 <prvSwitchTimerLists>
- *pxTimerListsWereSwitched = pdTRUE;
- 8006402: 2301 movs r3, #1
- 8006404: 602b str r3, [r5, #0]
- 8006406: e7f6 b.n 80063f6 <prvSampleTimeNow+0x16>
- 8006408: 24012eb8 .word 0x24012eb8
- 0800640c <prvProcessExpiredTimer>:
- {
- 800640c: b570 push {r4, r5, r6, lr}
- 800640e: b082 sub sp, #8
- 8006410: 4606 mov r6, r0
- 8006412: 460d mov r5, r1
- Timer_t * const pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); /*lint !e9087 !e9079 void * is used as this macro is used with tasks and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
- 8006414: 4917 ldr r1, [pc, #92] @ (8006474 <prvProcessExpiredTimer+0x68>)
- 8006416: 6809 ldr r1, [r1, #0]
- 8006418: 68c9 ldr r1, [r1, #12]
- 800641a: 68cc ldr r4, [r1, #12]
- ( void ) uxListRemove( &( pxTimer->xTimerListItem ) );
- 800641c: 1d20 adds r0, r4, #4
- 800641e: f7fe f91b bl 8004658 <uxListRemove>
- if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 )
- 8006422: f894 c028 ldrb.w ip, [r4, #40] @ 0x28
- 8006426: f01c 0f04 tst.w ip, #4
- 800642a: d108 bne.n 800643e <prvProcessExpiredTimer+0x32>
- pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
- 800642c: f02c 0c01 bic.w ip, ip, #1
- 8006430: f884 c028 strb.w ip, [r4, #40] @ 0x28
- pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer );
- 8006434: 6a23 ldr r3, [r4, #32]
- 8006436: 4620 mov r0, r4
- 8006438: 4798 blx r3
- }
- 800643a: b002 add sp, #8
- 800643c: bd70 pop {r4, r5, r6, pc}
- if( prvInsertTimerInActiveList( pxTimer, ( xNextExpireTime + pxTimer->xTimerPeriodInTicks ), xTimeNow, xNextExpireTime ) != pdFALSE )
- 800643e: 69a1 ldr r1, [r4, #24]
- 8006440: 4633 mov r3, r6
- 8006442: 462a mov r2, r5
- 8006444: 4431 add r1, r6
- 8006446: 4620 mov r0, r4
- 8006448: f7ff fec4 bl 80061d4 <prvInsertTimerInActiveList>
- 800644c: 2800 cmp r0, #0
- 800644e: d0f1 beq.n 8006434 <prvProcessExpiredTimer+0x28>
- xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY );
- 8006450: 2100 movs r1, #0
- 8006452: 9100 str r1, [sp, #0]
- 8006454: 460b mov r3, r1
- 8006456: 4632 mov r2, r6
- 8006458: 4620 mov r0, r4
- 800645a: f7ff ff4d bl 80062f8 <xTimerGenericCommand>
- configASSERT( xResult );
- 800645e: 2800 cmp r0, #0
- 8006460: d1e8 bne.n 8006434 <prvProcessExpiredTimer+0x28>
- 8006462: f04f 0350 mov.w r3, #80 @ 0x50
- 8006466: f383 8811 msr BASEPRI, r3
- 800646a: f3bf 8f6f isb sy
- 800646e: f3bf 8f4f dsb sy
- 8006472: e7fe b.n 8006472 <prvProcessExpiredTimer+0x66>
- 8006474: 24012ec8 .word 0x24012ec8
- 08006478 <prvProcessTimerOrBlockTask>:
- {
- 8006478: b570 push {r4, r5, r6, lr}
- 800647a: b082 sub sp, #8
- 800647c: 4606 mov r6, r0
- 800647e: 460c mov r4, r1
- vTaskSuspendAll();
- 8006480: f7ff fb1e bl 8005ac0 <vTaskSuspendAll>
- xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched );
- 8006484: a801 add r0, sp, #4
- 8006486: f7ff ffab bl 80063e0 <prvSampleTimeNow>
- if( xTimerListsWereSwitched == pdFALSE )
- 800648a: 9b01 ldr r3, [sp, #4]
- 800648c: bb3b cbnz r3, 80064de <prvProcessTimerOrBlockTask+0x66>
- 800648e: 4605 mov r5, r0
- if( ( xListWasEmpty == pdFALSE ) && ( xNextExpireTime <= xTimeNow ) )
- 8006490: 42b0 cmp r0, r6
- 8006492: bf28 it cs
- 8006494: 2c00 cmpcs r4, #0
- 8006496: d019 beq.n 80064cc <prvProcessTimerOrBlockTask+0x54>
- if( xListWasEmpty != pdFALSE )
- 8006498: b124 cbz r4, 80064a4 <prvProcessTimerOrBlockTask+0x2c>
- xListWasEmpty = listLIST_IS_EMPTY( pxOverflowTimerList );
- 800649a: 4a13 ldr r2, [pc, #76] @ (80064e8 <prvProcessTimerOrBlockTask+0x70>)
- 800649c: 6812 ldr r2, [r2, #0]
- 800649e: 6812 ldr r2, [r2, #0]
- 80064a0: b9da cbnz r2, 80064da <prvProcessTimerOrBlockTask+0x62>
- 80064a2: 2401 movs r4, #1
- vQueueWaitForMessageRestricted( xTimerQueue, ( xNextExpireTime - xTimeNow ), xListWasEmpty );
- 80064a4: 4622 mov r2, r4
- 80064a6: 1b71 subs r1, r6, r5
- 80064a8: 4b10 ldr r3, [pc, #64] @ (80064ec <prvProcessTimerOrBlockTask+0x74>)
- 80064aa: 6818 ldr r0, [r3, #0]
- 80064ac: f7ff f87c bl 80055a8 <vQueueWaitForMessageRestricted>
- if( xTaskResumeAll() == pdFALSE )
- 80064b0: f7ff fba8 bl 8005c04 <xTaskResumeAll>
- 80064b4: b9a8 cbnz r0, 80064e2 <prvProcessTimerOrBlockTask+0x6a>
- portYIELD_WITHIN_API();
- 80064b6: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
- 80064ba: f04f 5280 mov.w r2, #268435456 @ 0x10000000
- 80064be: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
- 80064c2: f3bf 8f4f dsb sy
- 80064c6: f3bf 8f6f isb sy
- 80064ca: e00a b.n 80064e2 <prvProcessTimerOrBlockTask+0x6a>
- ( void ) xTaskResumeAll();
- 80064cc: f7ff fb9a bl 8005c04 <xTaskResumeAll>
- prvProcessExpiredTimer( xNextExpireTime, xTimeNow );
- 80064d0: 4629 mov r1, r5
- 80064d2: 4630 mov r0, r6
- 80064d4: f7ff ff9a bl 800640c <prvProcessExpiredTimer>
- 80064d8: e003 b.n 80064e2 <prvProcessTimerOrBlockTask+0x6a>
- xListWasEmpty = listLIST_IS_EMPTY( pxOverflowTimerList );
- 80064da: 461c mov r4, r3
- 80064dc: e7e2 b.n 80064a4 <prvProcessTimerOrBlockTask+0x2c>
- ( void ) xTaskResumeAll();
- 80064de: f7ff fb91 bl 8005c04 <xTaskResumeAll>
- }
- 80064e2: b002 add sp, #8
- 80064e4: bd70 pop {r4, r5, r6, pc}
- 80064e6: bf00 nop
- 80064e8: 24012ec4 .word 0x24012ec4
- 80064ec: 24012ec0 .word 0x24012ec0
- 080064f0 <prvProcessReceivedCommands>:
- {
- 80064f0: b510 push {r4, lr}
- 80064f2: b088 sub sp, #32
- while( xQueueReceive( xTimerQueue, &xMessage, tmrNO_DELAY ) != pdFAIL ) /*lint !e603 xMessage does not have to be initialised as it is passed out, not in, and it is not used unless xQueueReceive() returns pdTRUE. */
- 80064f4: e002 b.n 80064fc <prvProcessReceivedCommands+0xc>
- if( xMessage.xMessageID >= ( BaseType_t ) 0 )
- 80064f6: 9b04 ldr r3, [sp, #16]
- 80064f8: 2b00 cmp r3, #0
- 80064fa: da0f bge.n 800651c <prvProcessReceivedCommands+0x2c>
- while( xQueueReceive( xTimerQueue, &xMessage, tmrNO_DELAY ) != pdFAIL ) /*lint !e603 xMessage does not have to be initialised as it is passed out, not in, and it is not used unless xQueueReceive() returns pdTRUE. */
- 80064fc: 2200 movs r2, #0
- 80064fe: a904 add r1, sp, #16
- 8006500: 4b3d ldr r3, [pc, #244] @ (80065f8 <prvProcessReceivedCommands+0x108>)
- 8006502: 6818 ldr r0, [r3, #0]
- 8006504: f7fe fdf7 bl 80050f6 <xQueueReceive>
- 8006508: 2800 cmp r0, #0
- 800650a: d073 beq.n 80065f4 <prvProcessReceivedCommands+0x104>
- if( xMessage.xMessageID < ( BaseType_t ) 0 )
- 800650c: 9b04 ldr r3, [sp, #16]
- 800650e: 2b00 cmp r3, #0
- 8006510: daf1 bge.n 80064f6 <prvProcessReceivedCommands+0x6>
- pxCallback->pxCallbackFunction( pxCallback->pvParameter1, pxCallback->ulParameter2 );
- 8006512: 9907 ldr r1, [sp, #28]
- 8006514: 9806 ldr r0, [sp, #24]
- 8006516: 9b05 ldr r3, [sp, #20]
- 8006518: 4798 blx r3
- 800651a: e7ec b.n 80064f6 <prvProcessReceivedCommands+0x6>
- pxTimer = xMessage.u.xTimerParameters.pxTimer;
- 800651c: 9c06 ldr r4, [sp, #24]
- if( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) == pdFALSE ) /*lint !e961. The cast is only redundant when NULL is passed into the macro. */
- 800651e: 6963 ldr r3, [r4, #20]
- 8006520: b113 cbz r3, 8006528 <prvProcessReceivedCommands+0x38>
- ( void ) uxListRemove( &( pxTimer->xTimerListItem ) );
- 8006522: 1d20 adds r0, r4, #4
- 8006524: f7fe f898 bl 8004658 <uxListRemove>
- xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched );
- 8006528: a803 add r0, sp, #12
- 800652a: f7ff ff59 bl 80063e0 <prvSampleTimeNow>
- switch( xMessage.xMessageID )
- 800652e: 9b04 ldr r3, [sp, #16]
- 8006530: 2b09 cmp r3, #9
- 8006532: d8e3 bhi.n 80064fc <prvProcessReceivedCommands+0xc>
- 8006534: e8df f003 tbb [pc, r3]
- 8006538: 30050505 .word 0x30050505
- 800653c: 05055037 .word 0x05055037
- 8006540: 3730 .short 0x3730
- pxTimer->ucStatus |= tmrSTATUS_IS_ACTIVE;
- 8006542: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
- 8006546: f043 0301 orr.w r3, r3, #1
- 800654a: f884 3028 strb.w r3, [r4, #40] @ 0x28
- if( prvInsertTimerInActiveList( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow, xMessage.u.xTimerParameters.xMessageValue ) != pdFALSE )
- 800654e: 9b05 ldr r3, [sp, #20]
- 8006550: 69a1 ldr r1, [r4, #24]
- 8006552: 4602 mov r2, r0
- 8006554: 4419 add r1, r3
- 8006556: 4620 mov r0, r4
- 8006558: f7ff fe3c bl 80061d4 <prvInsertTimerInActiveList>
- 800655c: 2800 cmp r0, #0
- 800655e: d0cd beq.n 80064fc <prvProcessReceivedCommands+0xc>
- pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer );
- 8006560: 6a23 ldr r3, [r4, #32]
- 8006562: 4620 mov r0, r4
- 8006564: 4798 blx r3
- if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 )
- 8006566: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
- 800656a: f013 0f04 tst.w r3, #4
- 800656e: d0c5 beq.n 80064fc <prvProcessReceivedCommands+0xc>
- xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY );
- 8006570: 69a2 ldr r2, [r4, #24]
- 8006572: 2100 movs r1, #0
- 8006574: 9100 str r1, [sp, #0]
- 8006576: 460b mov r3, r1
- 8006578: 9805 ldr r0, [sp, #20]
- 800657a: 4402 add r2, r0
- 800657c: 4620 mov r0, r4
- 800657e: f7ff febb bl 80062f8 <xTimerGenericCommand>
- configASSERT( xResult );
- 8006582: 2800 cmp r0, #0
- 8006584: d1ba bne.n 80064fc <prvProcessReceivedCommands+0xc>
- 8006586: f04f 0350 mov.w r3, #80 @ 0x50
- 800658a: f383 8811 msr BASEPRI, r3
- 800658e: f3bf 8f6f isb sy
- 8006592: f3bf 8f4f dsb sy
- 8006596: e7fe b.n 8006596 <prvProcessReceivedCommands+0xa6>
- pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
- 8006598: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
- 800659c: f023 0301 bic.w r3, r3, #1
- 80065a0: f884 3028 strb.w r3, [r4, #40] @ 0x28
- break;
- 80065a4: e7aa b.n 80064fc <prvProcessReceivedCommands+0xc>
- pxTimer->ucStatus |= tmrSTATUS_IS_ACTIVE;
- 80065a6: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
- 80065aa: f043 0301 orr.w r3, r3, #1
- 80065ae: f884 3028 strb.w r3, [r4, #40] @ 0x28
- pxTimer->xTimerPeriodInTicks = xMessage.u.xTimerParameters.xMessageValue;
- 80065b2: 9905 ldr r1, [sp, #20]
- 80065b4: 61a1 str r1, [r4, #24]
- configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) );
- 80065b6: b131 cbz r1, 80065c6 <prvProcessReceivedCommands+0xd6>
- ( void ) prvInsertTimerInActiveList( pxTimer, ( xTimeNow + pxTimer->xTimerPeriodInTicks ), xTimeNow, xTimeNow );
- 80065b8: 4603 mov r3, r0
- 80065ba: 4602 mov r2, r0
- 80065bc: 4401 add r1, r0
- 80065be: 4620 mov r0, r4
- 80065c0: f7ff fe08 bl 80061d4 <prvInsertTimerInActiveList>
- break;
- 80065c4: e79a b.n 80064fc <prvProcessReceivedCommands+0xc>
- 80065c6: f04f 0350 mov.w r3, #80 @ 0x50
- 80065ca: f383 8811 msr BASEPRI, r3
- 80065ce: f3bf 8f6f isb sy
- 80065d2: f3bf 8f4f dsb sy
- configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) );
- 80065d6: e7fe b.n 80065d6 <prvProcessReceivedCommands+0xe6>
- if( ( pxTimer->ucStatus & tmrSTATUS_IS_STATICALLY_ALLOCATED ) == ( uint8_t ) 0 )
- 80065d8: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
- 80065dc: f013 0f02 tst.w r3, #2
- 80065e0: d004 beq.n 80065ec <prvProcessReceivedCommands+0xfc>
- pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
- 80065e2: f023 0301 bic.w r3, r3, #1
- 80065e6: f884 3028 strb.w r3, [r4, #40] @ 0x28
- 80065ea: e787 b.n 80064fc <prvProcessReceivedCommands+0xc>
- vPortFree( pxTimer );
- 80065ec: 4620 mov r0, r4
- 80065ee: f7fd ffc3 bl 8004578 <vPortFree>
- 80065f2: e783 b.n 80064fc <prvProcessReceivedCommands+0xc>
- }
- 80065f4: b008 add sp, #32
- 80065f6: bd10 pop {r4, pc}
- 80065f8: 24012ec0 .word 0x24012ec0
- 080065fc <prvTimerTask>:
- {
- 80065fc: b500 push {lr}
- 80065fe: b083 sub sp, #12
- xNextExpireTime = prvGetNextExpireTime( &xListWasEmpty );
- 8006600: a801 add r0, sp, #4
- 8006602: f7ff fdd7 bl 80061b4 <prvGetNextExpireTime>
- prvProcessTimerOrBlockTask( xNextExpireTime, xListWasEmpty );
- 8006606: 9901 ldr r1, [sp, #4]
- 8006608: f7ff ff36 bl 8006478 <prvProcessTimerOrBlockTask>
- prvProcessReceivedCommands();
- 800660c: f7ff ff70 bl 80064f0 <prvProcessReceivedCommands>
- for( ;; )
- 8006610: e7f6 b.n 8006600 <prvTimerTask+0x4>
- 08006612 <netconn_apimsg>:
- * @param apimsg a struct containing the function to call and its parameters
- * @return ERR_OK if the function was called, another err_t if not
- */
- static err_t
- netconn_apimsg(tcpip_callback_fn fn, struct api_msg *apimsg)
- {
- 8006612: b510 push {r4, lr}
- 8006614: 460c mov r4, r1
- err_t err;
- #ifdef LWIP_DEBUG
- /* catch functions that don't set err */
- apimsg->err = ERR_VAL;
- 8006616: 23fa movs r3, #250 @ 0xfa
- 8006618: 710b strb r3, [r1, #4]
- #if LWIP_NETCONN_SEM_PER_THREAD
- apimsg->op_completed_sem = LWIP_NETCONN_THREAD_SEM_GET();
- #endif /* LWIP_NETCONN_SEM_PER_THREAD */
- err = tcpip_send_msg_wait_sem(fn, apimsg, LWIP_API_MSG_SEM(apimsg));
- 800661a: 680a ldr r2, [r1, #0]
- 800661c: 320c adds r2, #12
- 800661e: f00a ff41 bl 80114a4 <tcpip_send_msg_wait_sem>
- if (err == ERR_OK) {
- 8006622: b100 cbz r0, 8006626 <netconn_apimsg+0x14>
- return apimsg->err;
- }
- return err;
- }
- 8006624: bd10 pop {r4, pc}
- return apimsg->err;
- 8006626: f994 0004 ldrsb.w r0, [r4, #4]
- 800662a: e7fb b.n 8006624 <netconn_apimsg+0x12>
- 0800662c <netconn_tcp_recvd_msg>:
- }
- #if LWIP_TCP
- static err_t
- netconn_tcp_recvd_msg(struct netconn *conn, size_t len, struct api_msg *msg)
- {
- 800662c: b510 push {r4, lr}
- LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) &&
- 800662e: b160 cbz r0, 800664a <netconn_tcp_recvd_msg+0x1e>
- 8006630: 460c mov r4, r1
- 8006632: 4611 mov r1, r2
- 8006634: 7803 ldrb r3, [r0, #0]
- 8006636: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 800663a: 2b10 cmp r3, #16
- 800663c: d105 bne.n 800664a <netconn_tcp_recvd_msg+0x1e>
- NETCONNTYPE_GROUP(netconn_type(conn)) == NETCONN_TCP, return ERR_ARG;);
- msg->conn = conn;
- 800663e: 6010 str r0, [r2, #0]
- msg->msg.r.len = len;
- 8006640: 6094 str r4, [r2, #8]
- return netconn_apimsg(lwip_netconn_do_recv, msg);
- 8006642: 4807 ldr r0, [pc, #28] @ (8006660 <netconn_tcp_recvd_msg+0x34>)
- 8006644: f7ff ffe5 bl 8006612 <netconn_apimsg>
- }
- 8006648: bd10 pop {r4, pc}
- LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) &&
- 800664a: 4b06 ldr r3, [pc, #24] @ (8006664 <netconn_tcp_recvd_msg+0x38>)
- 800664c: f240 22a7 movw r2, #679 @ 0x2a7
- 8006650: 4905 ldr r1, [pc, #20] @ (8006668 <netconn_tcp_recvd_msg+0x3c>)
- 8006652: 4806 ldr r0, [pc, #24] @ (800666c <netconn_tcp_recvd_msg+0x40>)
- 8006654: f00c fed8 bl 8013408 <iprintf>
- 8006658: f06f 000f mvn.w r0, #15
- 800665c: e7f4 b.n 8006648 <netconn_tcp_recvd_msg+0x1c>
- 800665e: bf00 nop
- 8006660: 08007c13 .word 0x08007c13
- 8006664: 08014664 .word 0x08014664
- 8006668: 080146c8 .word 0x080146c8
- 800666c: 080144e8 .word 0x080144e8
- 08006670 <netconn_close_shutdown>:
- * @param how fully close or only shutdown one side?
- * @return ERR_OK if the netconn was closed, any other err_t on error
- */
- static err_t
- netconn_close_shutdown(struct netconn *conn, u8_t how)
- {
- 8006670: b500 push {lr}
- 8006672: b089 sub sp, #36 @ 0x24
- API_MSG_VAR_DECLARE(msg);
- err_t err;
- LWIP_UNUSED_ARG(how);
- LWIP_ERROR("netconn_close: invalid conn", (conn != NULL), return ERR_ARG;);
- 8006674: b160 cbz r0, 8006690 <netconn_close_shutdown+0x20>
- API_MSG_VAR_ALLOC(msg);
- API_MSG_VAR_REF(msg).conn = conn;
- 8006676: 9000 str r0, [sp, #0]
- #if LWIP_TCP
- /* shutting down both ends is the same as closing */
- API_MSG_VAR_REF(msg).msg.sd.shut = how;
- 8006678: f88d 1008 strb.w r1, [sp, #8]
- #if LWIP_SO_SNDTIMEO || LWIP_SO_LINGER
- /* get the time we started, which is later compared to
- sys_now() + conn->send_timeout */
- API_MSG_VAR_REF(msg).msg.sd.time_started = sys_now();
- #else /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */
- API_MSG_VAR_REF(msg).msg.sd.polls_left =
- 800667c: 2329 movs r3, #41 @ 0x29
- 800667e: f88d 3009 strb.w r3, [sp, #9]
- ((LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT + TCP_SLOW_INTERVAL - 1) / TCP_SLOW_INTERVAL) + 1;
- #endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */
- #endif /* LWIP_TCP */
- err = netconn_apimsg(lwip_netconn_do_close, &API_MSG_VAR_REF(msg));
- 8006682: 4669 mov r1, sp
- 8006684: 4807 ldr r0, [pc, #28] @ (80066a4 <netconn_close_shutdown+0x34>)
- 8006686: f7ff ffc4 bl 8006612 <netconn_apimsg>
- API_MSG_VAR_FREE(msg);
- return err;
- }
- 800668a: b009 add sp, #36 @ 0x24
- 800668c: f85d fb04 ldr.w pc, [sp], #4
- LWIP_ERROR("netconn_close: invalid conn", (conn != NULL), return ERR_ARG;);
- 8006690: 4b05 ldr r3, [pc, #20] @ (80066a8 <netconn_close_shutdown+0x38>)
- 8006692: f240 4247 movw r2, #1095 @ 0x447
- 8006696: 4905 ldr r1, [pc, #20] @ (80066ac <netconn_close_shutdown+0x3c>)
- 8006698: 4805 ldr r0, [pc, #20] @ (80066b0 <netconn_close_shutdown+0x40>)
- 800669a: f00c feb5 bl 8013408 <iprintf>
- 800669e: f06f 000f mvn.w r0, #15
- 80066a2: e7f2 b.n 800668a <netconn_close_shutdown+0x1a>
- 80066a4: 08007db9 .word 0x08007db9
- 80066a8: 08014664 .word 0x08014664
- 80066ac: 080146ec .word 0x080146ec
- 80066b0: 080144e8 .word 0x080144e8
- 080066b4 <netconn_new_with_proto_and_callback>:
- {
- 80066b4: b570 push {r4, r5, r6, lr}
- 80066b6: b088 sub sp, #32
- 80066b8: 460c mov r4, r1
- conn = netconn_alloc(t, callback);
- 80066ba: 4611 mov r1, r2
- 80066bc: f001 f878 bl 80077b0 <netconn_alloc>
- if (conn != NULL) {
- 80066c0: 4605 mov r5, r0
- 80066c2: b138 cbz r0, 80066d4 <netconn_new_with_proto_and_callback+0x20>
- API_MSG_VAR_REF(msg).msg.n.proto = proto;
- 80066c4: f88d 4008 strb.w r4, [sp, #8]
- API_MSG_VAR_REF(msg).conn = conn;
- 80066c8: 9000 str r0, [sp, #0]
- err = netconn_apimsg(lwip_netconn_do_newconn, &API_MSG_VAR_REF(msg));
- 80066ca: 4669 mov r1, sp
- 80066cc: 4820 ldr r0, [pc, #128] @ (8006750 <netconn_new_with_proto_and_callback+0x9c>)
- 80066ce: f7ff ffa0 bl 8006612 <netconn_apimsg>
- if (err != ERR_OK) {
- 80066d2: b910 cbnz r0, 80066da <netconn_new_with_proto_and_callback+0x26>
- }
- 80066d4: 4628 mov r0, r5
- 80066d6: b008 add sp, #32
- 80066d8: bd70 pop {r4, r5, r6, pc}
- LWIP_ASSERT("freeing conn without freeing pcb", conn->pcb.tcp == NULL);
- 80066da: 686b ldr r3, [r5, #4]
- 80066dc: b12b cbz r3, 80066ea <netconn_new_with_proto_and_callback+0x36>
- 80066de: 4b1d ldr r3, [pc, #116] @ (8006754 <netconn_new_with_proto_and_callback+0xa0>)
- 80066e0: 22a3 movs r2, #163 @ 0xa3
- 80066e2: 491d ldr r1, [pc, #116] @ (8006758 <netconn_new_with_proto_and_callback+0xa4>)
- 80066e4: 481d ldr r0, [pc, #116] @ (800675c <netconn_new_with_proto_and_callback+0xa8>)
- 80066e6: f00c fe8f bl 8013408 <iprintf>
- LWIP_ASSERT("conn has no recvmbox", sys_mbox_valid(&conn->recvmbox));
- 80066ea: f105 0410 add.w r4, r5, #16
- 80066ee: 4620 mov r0, r4
- 80066f0: f006 fc37 bl 800cf62 <sys_mbox_valid>
- 80066f4: b1b0 cbz r0, 8006724 <netconn_new_with_proto_and_callback+0x70>
- LWIP_ASSERT("conn->acceptmbox shouldn't exist", !sys_mbox_valid(&conn->acceptmbox));
- 80066f6: f105 0014 add.w r0, r5, #20
- 80066fa: f006 fc32 bl 800cf62 <sys_mbox_valid>
- 80066fe: b9c0 cbnz r0, 8006732 <netconn_new_with_proto_and_callback+0x7e>
- LWIP_ASSERT("conn has no op_completed", sys_sem_valid(&conn->op_completed));
- 8006700: f105 060c add.w r6, r5, #12
- 8006704: 4630 mov r0, r6
- 8006706: f006 fc72 bl 800cfee <sys_sem_valid>
- 800670a: b1c8 cbz r0, 8006740 <netconn_new_with_proto_and_callback+0x8c>
- sys_sem_free(&conn->op_completed);
- 800670c: 4630 mov r0, r6
- 800670e: f006 fc69 bl 800cfe4 <sys_sem_free>
- sys_mbox_free(&conn->recvmbox);
- 8006712: 4620 mov r0, r4
- 8006714: f006 fbe0 bl 800ced8 <sys_mbox_free>
- memp_free(MEMP_NETCONN, conn);
- 8006718: 4629 mov r1, r5
- 800671a: 2007 movs r0, #7
- 800671c: f004 ffa8 bl 800b670 <memp_free>
- return NULL;
- 8006720: 2500 movs r5, #0
- 8006722: e7d7 b.n 80066d4 <netconn_new_with_proto_and_callback+0x20>
- LWIP_ASSERT("conn has no recvmbox", sys_mbox_valid(&conn->recvmbox));
- 8006724: 4b0b ldr r3, [pc, #44] @ (8006754 <netconn_new_with_proto_and_callback+0xa0>)
- 8006726: 22a4 movs r2, #164 @ 0xa4
- 8006728: 490d ldr r1, [pc, #52] @ (8006760 <netconn_new_with_proto_and_callback+0xac>)
- 800672a: 480c ldr r0, [pc, #48] @ (800675c <netconn_new_with_proto_and_callback+0xa8>)
- 800672c: f00c fe6c bl 8013408 <iprintf>
- 8006730: e7e1 b.n 80066f6 <netconn_new_with_proto_and_callback+0x42>
- LWIP_ASSERT("conn->acceptmbox shouldn't exist", !sys_mbox_valid(&conn->acceptmbox));
- 8006732: 4b08 ldr r3, [pc, #32] @ (8006754 <netconn_new_with_proto_and_callback+0xa0>)
- 8006734: 22a6 movs r2, #166 @ 0xa6
- 8006736: 490b ldr r1, [pc, #44] @ (8006764 <netconn_new_with_proto_and_callback+0xb0>)
- 8006738: 4808 ldr r0, [pc, #32] @ (800675c <netconn_new_with_proto_and_callback+0xa8>)
- 800673a: f00c fe65 bl 8013408 <iprintf>
- 800673e: e7df b.n 8006700 <netconn_new_with_proto_and_callback+0x4c>
- LWIP_ASSERT("conn has no op_completed", sys_sem_valid(&conn->op_completed));
- 8006740: 4b04 ldr r3, [pc, #16] @ (8006754 <netconn_new_with_proto_and_callback+0xa0>)
- 8006742: 22a9 movs r2, #169 @ 0xa9
- 8006744: 4908 ldr r1, [pc, #32] @ (8006768 <netconn_new_with_proto_and_callback+0xb4>)
- 8006746: 4805 ldr r0, [pc, #20] @ (800675c <netconn_new_with_proto_and_callback+0xa8>)
- 8006748: f00c fe5e bl 8013408 <iprintf>
- 800674c: e7de b.n 800670c <netconn_new_with_proto_and_callback+0x58>
- 800674e: bf00 nop
- 8006750: 0800779d .word 0x0800779d
- 8006754: 08014664 .word 0x08014664
- 8006758: 08014708 .word 0x08014708
- 800675c: 080144e8 .word 0x080144e8
- 8006760: 0801472c .word 0x0801472c
- 8006764: 08014744 .word 0x08014744
- 8006768: 08014768 .word 0x08014768
- 0800676c <netconn_prepare_delete>:
- if (conn == NULL) {
- 800676c: b160 cbz r0, 8006788 <netconn_prepare_delete+0x1c>
- {
- 800676e: b500 push {lr}
- 8006770: b089 sub sp, #36 @ 0x24
- API_MSG_VAR_REF(msg).conn = conn;
- 8006772: 9000 str r0, [sp, #0]
- API_MSG_VAR_REF(msg).msg.sd.polls_left =
- 8006774: 2329 movs r3, #41 @ 0x29
- 8006776: f88d 3009 strb.w r3, [sp, #9]
- err = netconn_apimsg(lwip_netconn_do_delconn, &API_MSG_VAR_REF(msg));
- 800677a: 4669 mov r1, sp
- 800677c: 4803 ldr r0, [pc, #12] @ (800678c <netconn_prepare_delete+0x20>)
- 800677e: f7ff ff48 bl 8006612 <netconn_apimsg>
- }
- 8006782: b009 add sp, #36 @ 0x24
- 8006784: f85d fb04 ldr.w pc, [sp], #4
- return ERR_OK;
- 8006788: 2000 movs r0, #0
- }
- 800678a: 4770 bx lr
- 800678c: 0800796d .word 0x0800796d
- 08006790 <netconn_delete>:
- {
- 8006790: b538 push {r3, r4, r5, lr}
- if (conn == NULL) {
- 8006792: b150 cbz r0, 80067aa <netconn_delete+0x1a>
- 8006794: 4605 mov r5, r0
- err = netconn_prepare_delete(conn);
- 8006796: f7ff ffe9 bl 800676c <netconn_prepare_delete>
- if (err == ERR_OK) {
- 800679a: 4604 mov r4, r0
- 800679c: b108 cbz r0, 80067a2 <netconn_delete+0x12>
- }
- 800679e: 4620 mov r0, r4
- 80067a0: bd38 pop {r3, r4, r5, pc}
- netconn_free(conn);
- 80067a2: 4628 mov r0, r5
- 80067a4: f001 f850 bl 8007848 <netconn_free>
- 80067a8: e7f9 b.n 800679e <netconn_delete+0xe>
- return ERR_OK;
- 80067aa: 2400 movs r4, #0
- 80067ac: e7f7 b.n 800679e <netconn_delete+0xe>
- ...
- 080067b0 <netconn_getaddr>:
- {
- 80067b0: b510 push {r4, lr}
- 80067b2: b088 sub sp, #32
- LWIP_ERROR("netconn_getaddr: invalid conn", (conn != NULL), return ERR_ARG;);
- 80067b4: b160 cbz r0, 80067d0 <netconn_getaddr+0x20>
- LWIP_ERROR("netconn_getaddr: invalid addr", (addr != NULL), return ERR_ARG;);
- 80067b6: b1a9 cbz r1, 80067e4 <netconn_getaddr+0x34>
- LWIP_ERROR("netconn_getaddr: invalid port", (port != NULL), return ERR_ARG;);
- 80067b8: b1f2 cbz r2, 80067f8 <netconn_getaddr+0x48>
- API_MSG_VAR_REF(msg).conn = conn;
- 80067ba: 9000 str r0, [sp, #0]
- API_MSG_VAR_REF(msg).msg.ad.local = local;
- 80067bc: f88d 3010 strb.w r3, [sp, #16]
- msg.msg.ad.ipaddr = addr;
- 80067c0: 9102 str r1, [sp, #8]
- msg.msg.ad.port = port;
- 80067c2: 9203 str r2, [sp, #12]
- err = netconn_apimsg(lwip_netconn_do_getaddr, &msg);
- 80067c4: 4669 mov r1, sp
- 80067c6: 4811 ldr r0, [pc, #68] @ (800680c <netconn_getaddr+0x5c>)
- 80067c8: f7ff ff23 bl 8006612 <netconn_apimsg>
- }
- 80067cc: b008 add sp, #32
- 80067ce: bd10 pop {r4, pc}
- LWIP_ERROR("netconn_getaddr: invalid conn", (conn != NULL), return ERR_ARG;);
- 80067d0: 4b0f ldr r3, [pc, #60] @ (8006810 <netconn_getaddr+0x60>)
- 80067d2: f44f 7289 mov.w r2, #274 @ 0x112
- 80067d6: 490f ldr r1, [pc, #60] @ (8006814 <netconn_getaddr+0x64>)
- 80067d8: 480f ldr r0, [pc, #60] @ (8006818 <netconn_getaddr+0x68>)
- 80067da: f00c fe15 bl 8013408 <iprintf>
- 80067de: f06f 000f mvn.w r0, #15
- 80067e2: e7f3 b.n 80067cc <netconn_getaddr+0x1c>
- LWIP_ERROR("netconn_getaddr: invalid addr", (addr != NULL), return ERR_ARG;);
- 80067e4: 4b0a ldr r3, [pc, #40] @ (8006810 <netconn_getaddr+0x60>)
- 80067e6: f240 1213 movw r2, #275 @ 0x113
- 80067ea: 490c ldr r1, [pc, #48] @ (800681c <netconn_getaddr+0x6c>)
- 80067ec: 480a ldr r0, [pc, #40] @ (8006818 <netconn_getaddr+0x68>)
- 80067ee: f00c fe0b bl 8013408 <iprintf>
- 80067f2: f06f 000f mvn.w r0, #15
- 80067f6: e7e9 b.n 80067cc <netconn_getaddr+0x1c>
- LWIP_ERROR("netconn_getaddr: invalid port", (port != NULL), return ERR_ARG;);
- 80067f8: 4b05 ldr r3, [pc, #20] @ (8006810 <netconn_getaddr+0x60>)
- 80067fa: f44f 728a mov.w r2, #276 @ 0x114
- 80067fe: 4908 ldr r1, [pc, #32] @ (8006820 <netconn_getaddr+0x70>)
- 8006800: 4805 ldr r0, [pc, #20] @ (8006818 <netconn_getaddr+0x68>)
- 8006802: f00c fe01 bl 8013408 <iprintf>
- 8006806: f06f 000f mvn.w r0, #15
- 800680a: e7df b.n 80067cc <netconn_getaddr+0x1c>
- 800680c: 08007d1d .word 0x08007d1d
- 8006810: 08014664 .word 0x08014664
- 8006814: 08014784 .word 0x08014784
- 8006818: 080144e8 .word 0x080144e8
- 800681c: 080147a4 .word 0x080147a4
- 8006820: 080147c4 .word 0x080147c4
- 08006824 <netconn_connect>:
- {
- 8006824: b500 push {lr}
- 8006826: b089 sub sp, #36 @ 0x24
- LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;);
- 8006828: b160 cbz r0, 8006844 <netconn_connect+0x20>
- 800682a: 4603 mov r3, r0
- if (addr == NULL) {
- 800682c: b1a1 cbz r1, 8006858 <netconn_connect+0x34>
- API_MSG_VAR_REF(msg).conn = conn;
- 800682e: 9300 str r3, [sp, #0]
- API_MSG_VAR_REF(msg).msg.bc.ipaddr = API_MSG_VAR_REF(addr);
- 8006830: 9102 str r1, [sp, #8]
- API_MSG_VAR_REF(msg).msg.bc.port = port;
- 8006832: f8ad 200c strh.w r2, [sp, #12]
- err = netconn_apimsg(lwip_netconn_do_connect, &API_MSG_VAR_REF(msg));
- 8006836: 4669 mov r1, sp
- 8006838: 4808 ldr r0, [pc, #32] @ (800685c <netconn_connect+0x38>)
- 800683a: f7ff feea bl 8006612 <netconn_apimsg>
- }
- 800683e: b009 add sp, #36 @ 0x24
- 8006840: f85d fb04 ldr.w pc, [sp], #4
- LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;);
- 8006844: 4b06 ldr r3, [pc, #24] @ (8006860 <netconn_connect+0x3c>)
- 8006846: f44f 72bf mov.w r2, #382 @ 0x17e
- 800684a: 4906 ldr r1, [pc, #24] @ (8006864 <netconn_connect+0x40>)
- 800684c: 4806 ldr r0, [pc, #24] @ (8006868 <netconn_connect+0x44>)
- 800684e: f00c fddb bl 8013408 <iprintf>
- 8006852: f06f 000f mvn.w r0, #15
- 8006856: e7f2 b.n 800683e <netconn_connect+0x1a>
- addr = IP4_ADDR_ANY;
- 8006858: 4904 ldr r1, [pc, #16] @ (800686c <netconn_connect+0x48>)
- 800685a: e7e8 b.n 800682e <netconn_connect+0xa>
- 800685c: 08007aa9 .word 0x08007aa9
- 8006860: 08014664 .word 0x08014664
- 8006864: 080147e4 .word 0x080147e4
- 8006868: 080144e8 .word 0x080144e8
- 800686c: 080156d8 .word 0x080156d8
- 08006870 <netconn_disconnect>:
- {
- 8006870: b500 push {lr}
- 8006872: b089 sub sp, #36 @ 0x24
- LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;);
- 8006874: b138 cbz r0, 8006886 <netconn_disconnect+0x16>
- API_MSG_VAR_REF(msg).conn = conn;
- 8006876: 9000 str r0, [sp, #0]
- err = netconn_apimsg(lwip_netconn_do_disconnect, &API_MSG_VAR_REF(msg));
- 8006878: 4669 mov r1, sp
- 800687a: 4808 ldr r0, [pc, #32] @ (800689c <netconn_disconnect+0x2c>)
- 800687c: f7ff fec9 bl 8006612 <netconn_apimsg>
- }
- 8006880: b009 add sp, #36 @ 0x24
- 8006882: f85d fb04 ldr.w pc, [sp], #4
- LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;);
- 8006886: 4b06 ldr r3, [pc, #24] @ (80068a0 <netconn_disconnect+0x30>)
- 8006888: f44f 72cf mov.w r2, #414 @ 0x19e
- 800688c: 4905 ldr r1, [pc, #20] @ (80068a4 <netconn_disconnect+0x34>)
- 800688e: 4806 ldr r0, [pc, #24] @ (80068a8 <netconn_disconnect+0x38>)
- 8006890: f00c fdba bl 8013408 <iprintf>
- 8006894: f06f 000f mvn.w r0, #15
- 8006898: e7f2 b.n 8006880 <netconn_disconnect+0x10>
- 800689a: bf00 nop
- 800689c: 08007ba5 .word 0x08007ba5
- 80068a0: 08014664 .word 0x08014664
- 80068a4: 08014804 .word 0x08014804
- 80068a8: 080144e8 .word 0x080144e8
- 080068ac <netconn_tcp_recvd>:
- {
- 80068ac: b500 push {lr}
- 80068ae: b089 sub sp, #36 @ 0x24
- LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) &&
- 80068b0: b150 cbz r0, 80068c8 <netconn_tcp_recvd+0x1c>
- 80068b2: 7803 ldrb r3, [r0, #0]
- 80068b4: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 80068b8: 2b10 cmp r3, #16
- 80068ba: d105 bne.n 80068c8 <netconn_tcp_recvd+0x1c>
- err = netconn_tcp_recvd_msg(conn, len, &API_VAR_REF(msg));
- 80068bc: 466a mov r2, sp
- 80068be: f7ff feb5 bl 800662c <netconn_tcp_recvd_msg>
- }
- 80068c2: b009 add sp, #36 @ 0x24
- 80068c4: f85d fb04 ldr.w pc, [sp], #4
- LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) &&
- 80068c8: 4b04 ldr r3, [pc, #16] @ (80068dc <netconn_tcp_recvd+0x30>)
- 80068ca: f240 22b5 movw r2, #693 @ 0x2b5
- 80068ce: 4904 ldr r1, [pc, #16] @ (80068e0 <netconn_tcp_recvd+0x34>)
- 80068d0: 4804 ldr r0, [pc, #16] @ (80068e4 <netconn_tcp_recvd+0x38>)
- 80068d2: f00c fd99 bl 8013408 <iprintf>
- 80068d6: f06f 000f mvn.w r0, #15
- 80068da: e7f2 b.n 80068c2 <netconn_tcp_recvd+0x16>
- 80068dc: 08014664 .word 0x08014664
- 80068e0: 080146c8 .word 0x080146c8
- 80068e4: 080144e8 .word 0x080144e8
- 080068e8 <netconn_send>:
- {
- 80068e8: b500 push {lr}
- 80068ea: b089 sub sp, #36 @ 0x24
- LWIP_ERROR("netconn_send: invalid conn", (conn != NULL), return ERR_ARG;);
- 80068ec: b140 cbz r0, 8006900 <netconn_send+0x18>
- API_MSG_VAR_REF(msg).conn = conn;
- 80068ee: 9000 str r0, [sp, #0]
- API_MSG_VAR_REF(msg).msg.b = buf;
- 80068f0: 9102 str r1, [sp, #8]
- err = netconn_apimsg(lwip_netconn_do_send, &API_MSG_VAR_REF(msg));
- 80068f2: 4669 mov r1, sp
- 80068f4: 4807 ldr r0, [pc, #28] @ (8006914 <netconn_send+0x2c>)
- 80068f6: f7ff fe8c bl 8006612 <netconn_apimsg>
- }
- 80068fa: b009 add sp, #36 @ 0x24
- 80068fc: f85d fb04 ldr.w pc, [sp], #4
- LWIP_ERROR("netconn_send: invalid conn", (conn != NULL), return ERR_ARG;);
- 8006900: 4b05 ldr r3, [pc, #20] @ (8006918 <netconn_send+0x30>)
- 8006902: f240 32b2 movw r2, #946 @ 0x3b2
- 8006906: 4905 ldr r1, [pc, #20] @ (800691c <netconn_send+0x34>)
- 8006908: 4805 ldr r0, [pc, #20] @ (8006920 <netconn_send+0x38>)
- 800690a: f00c fd7d bl 8013408 <iprintf>
- 800690e: f06f 000f mvn.w r0, #15
- 8006912: e7f2 b.n 80068fa <netconn_send+0x12>
- 8006914: 08007bc7 .word 0x08007bc7
- 8006918: 08014664 .word 0x08014664
- 800691c: 08014828 .word 0x08014828
- 8006920: 080144e8 .word 0x080144e8
- 08006924 <netconn_write_vectors_partly>:
- {
- 8006924: b5f0 push {r4, r5, r6, r7, lr}
- 8006926: b089 sub sp, #36 @ 0x24
- 8006928: 9e0e ldr r6, [sp, #56] @ 0x38
- LWIP_ERROR("netconn_write: invalid conn", (conn != NULL), return ERR_ARG;);
- 800692a: b178 cbz r0, 800694c <netconn_write_vectors_partly+0x28>
- 800692c: 4684 mov ip, r0
- LWIP_ERROR("netconn_write: invalid conn->type", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP), return ERR_VAL;);
- 800692e: 7800 ldrb r0, [r0, #0]
- 8006930: f000 00f0 and.w r0, r0, #240 @ 0xf0
- 8006934: 2810 cmp r0, #16
- 8006936: d113 bne.n 8006960 <netconn_write_vectors_partly+0x3c>
- dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK);
- 8006938: f89c 0028 ldrb.w r0, [ip, #40] @ 0x28
- 800693c: f010 0f02 tst.w r0, #2
- 8006940: d118 bne.n 8006974 <netconn_write_vectors_partly+0x50>
- 8006942: f013 0f04 tst.w r3, #4
- 8006946: d028 beq.n 800699a <netconn_write_vectors_partly+0x76>
- 8006948: 2001 movs r0, #1
- 800694a: e014 b.n 8006976 <netconn_write_vectors_partly+0x52>
- LWIP_ERROR("netconn_write: invalid conn", (conn != NULL), return ERR_ARG;);
- 800694c: 4b2d ldr r3, [pc, #180] @ (8006a04 <netconn_write_vectors_partly+0xe0>)
- 800694e: f240 32ee movw r2, #1006 @ 0x3ee
- 8006952: 492d ldr r1, [pc, #180] @ (8006a08 <netconn_write_vectors_partly+0xe4>)
- 8006954: 482d ldr r0, [pc, #180] @ (8006a0c <netconn_write_vectors_partly+0xe8>)
- 8006956: f00c fd57 bl 8013408 <iprintf>
- 800695a: f06f 050f mvn.w r5, #15
- 800695e: e049 b.n 80069f4 <netconn_write_vectors_partly+0xd0>
- LWIP_ERROR("netconn_write: invalid conn->type", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP), return ERR_VAL;);
- 8006960: 4b28 ldr r3, [pc, #160] @ (8006a04 <netconn_write_vectors_partly+0xe0>)
- 8006962: f240 32ef movw r2, #1007 @ 0x3ef
- 8006966: 492a ldr r1, [pc, #168] @ (8006a10 <netconn_write_vectors_partly+0xec>)
- 8006968: 4828 ldr r0, [pc, #160] @ (8006a0c <netconn_write_vectors_partly+0xe8>)
- 800696a: f00c fd4d bl 8013408 <iprintf>
- 800696e: f06f 0505 mvn.w r5, #5
- 8006972: e03f b.n 80069f4 <netconn_write_vectors_partly+0xd0>
- dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK);
- 8006974: 2001 movs r0, #1
- if (dontblock && !bytes_written) {
- 8006976: f000 07ff and.w r7, r0, #255 @ 0xff
- 800697a: 2e00 cmp r6, #0
- 800697c: bf14 ite ne
- 800697e: 2000 movne r0, #0
- 8006980: f000 0001 andeq.w r0, r0, #1
- 8006984: bb88 cbnz r0, 80069ea <netconn_write_vectors_partly+0xc6>
- size = 0;
- 8006986: 4604 mov r4, r0
- for (i = 0; i < vectorcnt; i++) {
- 8006988: 4282 cmp r2, r0
- 800698a: dd08 ble.n 800699e <netconn_write_vectors_partly+0x7a>
- size += vectors[i].len;
- 800698c: eb01 05c0 add.w r5, r1, r0, lsl #3
- 8006990: 686d ldr r5, [r5, #4]
- if (size < vectors[i].len) {
- 8006992: 1964 adds r4, r4, r5
- 8006994: d22c bcs.n 80069f0 <netconn_write_vectors_partly+0xcc>
- for (i = 0; i < vectorcnt; i++) {
- 8006996: 3001 adds r0, #1
- 8006998: e7f6 b.n 8006988 <netconn_write_vectors_partly+0x64>
- dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK);
- 800699a: 2000 movs r0, #0
- 800699c: e7eb b.n 8006976 <netconn_write_vectors_partly+0x52>
- if (size == 0) {
- 800699e: b364 cbz r4, 80069fa <netconn_write_vectors_partly+0xd6>
- } else if (size > SSIZE_MAX) {
- 80069a0: 2c00 cmp r4, #0
- 80069a2: da02 bge.n 80069aa <netconn_write_vectors_partly+0x86>
- if (!bytes_written) {
- 80069a4: b35e cbz r6, 80069fe <netconn_write_vectors_partly+0xda>
- size = (size_t)limited;
- 80069a6: f06f 4400 mvn.w r4, #2147483648 @ 0x80000000
- API_MSG_VAR_REF(msg).conn = conn;
- 80069aa: f8cd c000 str.w ip, [sp]
- API_MSG_VAR_REF(msg).msg.w.vector = vectors;
- 80069ae: 9102 str r1, [sp, #8]
- API_MSG_VAR_REF(msg).msg.w.vector_cnt = vectorcnt;
- 80069b0: f8ad 200c strh.w r2, [sp, #12]
- API_MSG_VAR_REF(msg).msg.w.vector_off = 0;
- 80069b4: 2200 movs r2, #0
- 80069b6: 9204 str r2, [sp, #16]
- API_MSG_VAR_REF(msg).msg.w.apiflags = apiflags;
- 80069b8: f88d 301c strb.w r3, [sp, #28]
- API_MSG_VAR_REF(msg).msg.w.len = size;
- 80069bc: 9405 str r4, [sp, #20]
- API_MSG_VAR_REF(msg).msg.w.offset = 0;
- 80069be: 9206 str r2, [sp, #24]
- err = netconn_apimsg(lwip_netconn_do_write, &API_MSG_VAR_REF(msg));
- 80069c0: 4669 mov r1, sp
- 80069c2: 4814 ldr r0, [pc, #80] @ (8006a14 <netconn_write_vectors_partly+0xf0>)
- 80069c4: f7ff fe25 bl 8006612 <netconn_apimsg>
- if (err == ERR_OK) {
- 80069c8: 4605 mov r5, r0
- 80069ca: b998 cbnz r0, 80069f4 <netconn_write_vectors_partly+0xd0>
- if (bytes_written != NULL) {
- 80069cc: b10e cbz r6, 80069d2 <netconn_write_vectors_partly+0xae>
- *bytes_written = API_MSG_VAR_REF(msg).msg.w.offset;
- 80069ce: 9b06 ldr r3, [sp, #24]
- 80069d0: 6033 str r3, [r6, #0]
- if (!dontblock) {
- 80069d2: b97f cbnz r7, 80069f4 <netconn_write_vectors_partly+0xd0>
- LWIP_ASSERT("do_write failed to write all bytes", API_MSG_VAR_REF(msg).msg.w.offset == size);
- 80069d4: 9b06 ldr r3, [sp, #24]
- 80069d6: 42a3 cmp r3, r4
- 80069d8: d00c beq.n 80069f4 <netconn_write_vectors_partly+0xd0>
- 80069da: 4b0a ldr r3, [pc, #40] @ (8006a04 <netconn_write_vectors_partly+0xe0>)
- 80069dc: f44f 6286 mov.w r2, #1072 @ 0x430
- 80069e0: 490d ldr r1, [pc, #52] @ (8006a18 <netconn_write_vectors_partly+0xf4>)
- 80069e2: 480a ldr r0, [pc, #40] @ (8006a0c <netconn_write_vectors_partly+0xe8>)
- 80069e4: f00c fd10 bl 8013408 <iprintf>
- 80069e8: e004 b.n 80069f4 <netconn_write_vectors_partly+0xd0>
- return ERR_VAL;
- 80069ea: f06f 0505 mvn.w r5, #5
- 80069ee: e001 b.n 80069f4 <netconn_write_vectors_partly+0xd0>
- return ERR_VAL;
- 80069f0: f06f 0505 mvn.w r5, #5
- }
- 80069f4: 4628 mov r0, r5
- 80069f6: b009 add sp, #36 @ 0x24
- 80069f8: bdf0 pop {r4, r5, r6, r7, pc}
- return ERR_OK;
- 80069fa: 2500 movs r5, #0
- 80069fc: e7fa b.n 80069f4 <netconn_write_vectors_partly+0xd0>
- return ERR_VAL;
- 80069fe: f06f 0505 mvn.w r5, #5
- 8006a02: e7f7 b.n 80069f4 <netconn_write_vectors_partly+0xd0>
- 8006a04: 08014664 .word 0x08014664
- 8006a08: 08014844 .word 0x08014844
- 8006a0c: 080144e8 .word 0x080144e8
- 8006a10: 08014860 .word 0x08014860
- 8006a14: 08007c51 .word 0x08007c51
- 8006a18: 08014884 .word 0x08014884
- 08006a1c <netconn_write_partly>:
- {
- 8006a1c: b500 push {lr}
- 8006a1e: b085 sub sp, #20
- vector.ptr = dataptr;
- 8006a20: 9102 str r1, [sp, #8]
- vector.len = size;
- 8006a22: 9203 str r2, [sp, #12]
- return netconn_write_vectors_partly(conn, &vector, 1, apiflags, bytes_written);
- 8006a24: 9a06 ldr r2, [sp, #24]
- 8006a26: 9200 str r2, [sp, #0]
- 8006a28: 2201 movs r2, #1
- 8006a2a: a902 add r1, sp, #8
- 8006a2c: f7ff ff7a bl 8006924 <netconn_write_vectors_partly>
- }
- 8006a30: b005 add sp, #20
- 8006a32: f85d fb04 ldr.w pc, [sp], #4
- 08006a36 <netconn_err>:
- * @param conn the netconn to get the error from
- * @return and pending error or ERR_OK if no error was pending
- */
- err_t
- netconn_err(struct netconn *conn)
- {
- 8006a36: b538 push {r3, r4, r5, lr}
- err_t err;
- SYS_ARCH_DECL_PROTECT(lev);
- if (conn == NULL) {
- 8006a38: b150 cbz r0, 8006a50 <netconn_err+0x1a>
- 8006a3a: 4604 mov r4, r0
- return ERR_OK;
- }
- SYS_ARCH_PROTECT(lev);
- 8006a3c: f006 fb18 bl 800d070 <sys_arch_protect>
- err = conn->pending_err;
- 8006a40: f994 5008 ldrsb.w r5, [r4, #8]
- conn->pending_err = ERR_OK;
- 8006a44: 2300 movs r3, #0
- 8006a46: 7223 strb r3, [r4, #8]
- SYS_ARCH_UNPROTECT(lev);
- 8006a48: f006 fb1e bl 800d088 <sys_arch_unprotect>
- return err;
- }
- 8006a4c: 4628 mov r0, r5
- 8006a4e: bd38 pop {r3, r4, r5, pc}
- return ERR_OK;
- 8006a50: 2500 movs r5, #0
- 8006a52: e7fb b.n 8006a4c <netconn_err+0x16>
- 08006a54 <netconn_recv_data>:
- {
- 8006a54: b5f0 push {r4, r5, r6, r7, lr}
- 8006a56: b083 sub sp, #12
- void *buf = NULL;
- 8006a58: 2300 movs r3, #0
- 8006a5a: 9301 str r3, [sp, #4]
- LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;);
- 8006a5c: 2900 cmp r1, #0
- 8006a5e: d040 beq.n 8006ae2 <netconn_recv_data+0x8e>
- 8006a60: 4604 mov r4, r0
- 8006a62: 4616 mov r6, r2
- 8006a64: 460f mov r7, r1
- *new_buf = NULL;
- 8006a66: 2300 movs r3, #0
- 8006a68: 600b str r3, [r1, #0]
- LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;);
- 8006a6a: 2800 cmp r0, #0
- 8006a6c: d043 beq.n 8006af6 <netconn_recv_data+0xa2>
- if (!NETCONN_RECVMBOX_WAITABLE(conn)) {
- 8006a6e: f100 0510 add.w r5, r0, #16
- 8006a72: 4628 mov r0, r5
- 8006a74: f006 fa75 bl 800cf62 <sys_mbox_valid>
- 8006a78: 2800 cmp r0, #0
- 8006a7a: d046 beq.n 8006b0a <netconn_recv_data+0xb6>
- if (netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK) ||
- 8006a7c: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
- 8006a80: f013 0f02 tst.w r3, #2
- 8006a84: d109 bne.n 8006a9a <netconn_recv_data+0x46>
- 8006a86: f016 0f04 tst.w r6, #4
- 8006a8a: d106 bne.n 8006a9a <netconn_recv_data+0x46>
- 8006a8c: f013 0f01 tst.w r3, #1
- 8006a90: d103 bne.n 8006a9a <netconn_recv_data+0x46>
- (conn->flags & NETCONN_FLAG_MBOXCLOSED) || (conn->pending_err != ERR_OK)) {
- 8006a92: f994 3008 ldrsb.w r3, [r4, #8]
- 8006a96: 2b00 cmp r3, #0
- 8006a98: d04c beq.n 8006b34 <netconn_recv_data+0xe0>
- if (sys_arch_mbox_tryfetch(&conn->recvmbox, &buf) == SYS_ARCH_TIMEOUT) {
- 8006a9a: a901 add r1, sp, #4
- 8006a9c: 4628 mov r0, r5
- 8006a9e: f006 fa55 bl 800cf4c <sys_arch_mbox_tryfetch>
- 8006aa2: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff
- 8006aa6: d038 beq.n 8006b1a <netconn_recv_data+0xc6>
- if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP)
- 8006aa8: 7823 ldrb r3, [r4, #0]
- 8006aaa: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 8006aae: 2b10 cmp r3, #16
- 8006ab0: d04b beq.n 8006b4a <netconn_recv_data+0xf6>
- LWIP_ASSERT("buf != NULL", buf != NULL);
- 8006ab2: 9b01 ldr r3, [sp, #4]
- 8006ab4: 2b00 cmp r3, #0
- 8006ab6: d058 beq.n 8006b6a <netconn_recv_data+0x116>
- len = netbuf_len((struct netbuf *)buf);
- 8006ab8: 9b01 ldr r3, [sp, #4]
- 8006aba: 681b ldr r3, [r3, #0]
- 8006abc: 891d ldrh r5, [r3, #8]
- SYS_ARCH_DEC(conn->recv_avail, len);
- 8006abe: f006 fad7 bl 800d070 <sys_arch_protect>
- 8006ac2: 6a63 ldr r3, [r4, #36] @ 0x24
- 8006ac4: 1b5b subs r3, r3, r5
- 8006ac6: 6263 str r3, [r4, #36] @ 0x24
- 8006ac8: f006 fade bl 800d088 <sys_arch_unprotect>
- API_EVENT(conn, NETCONN_EVT_RCVMINUS, len);
- 8006acc: 6b23 ldr r3, [r4, #48] @ 0x30
- 8006ace: b11b cbz r3, 8006ad8 <netconn_recv_data+0x84>
- 8006ad0: 462a mov r2, r5
- 8006ad2: 2101 movs r1, #1
- 8006ad4: 4620 mov r0, r4
- 8006ad6: 4798 blx r3
- *new_buf = buf;
- 8006ad8: 9b01 ldr r3, [sp, #4]
- 8006ada: 603b str r3, [r7, #0]
- return ERR_OK;
- 8006adc: 2000 movs r0, #0
- }
- 8006ade: b003 add sp, #12
- 8006ae0: bdf0 pop {r4, r5, r6, r7, pc}
- LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;);
- 8006ae2: 4b27 ldr r3, [pc, #156] @ (8006b80 <netconn_recv_data+0x12c>)
- 8006ae4: f44f 7212 mov.w r2, #584 @ 0x248
- 8006ae8: 4926 ldr r1, [pc, #152] @ (8006b84 <netconn_recv_data+0x130>)
- 8006aea: 4827 ldr r0, [pc, #156] @ (8006b88 <netconn_recv_data+0x134>)
- 8006aec: f00c fc8c bl 8013408 <iprintf>
- 8006af0: f06f 000f mvn.w r0, #15
- 8006af4: e7f3 b.n 8006ade <netconn_recv_data+0x8a>
- LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;);
- 8006af6: 4b22 ldr r3, [pc, #136] @ (8006b80 <netconn_recv_data+0x12c>)
- 8006af8: f240 224a movw r2, #586 @ 0x24a
- 8006afc: 4923 ldr r1, [pc, #140] @ (8006b8c <netconn_recv_data+0x138>)
- 8006afe: 4822 ldr r0, [pc, #136] @ (8006b88 <netconn_recv_data+0x134>)
- 8006b00: f00c fc82 bl 8013408 <iprintf>
- 8006b04: f06f 000f mvn.w r0, #15
- 8006b08: e7e9 b.n 8006ade <netconn_recv_data+0x8a>
- err_t err = netconn_err(conn);
- 8006b0a: 4620 mov r0, r4
- 8006b0c: f7ff ff93 bl 8006a36 <netconn_err>
- if (err != ERR_OK) {
- 8006b10: 2800 cmp r0, #0
- 8006b12: d1e4 bne.n 8006ade <netconn_recv_data+0x8a>
- return ERR_CONN;
- 8006b14: f06f 000a mvn.w r0, #10
- 8006b18: e7e1 b.n 8006ade <netconn_recv_data+0x8a>
- err = netconn_err(conn);
- 8006b1a: 4620 mov r0, r4
- 8006b1c: f7ff ff8b bl 8006a36 <netconn_err>
- if (err != ERR_OK) {
- 8006b20: 2800 cmp r0, #0
- 8006b22: d1dc bne.n 8006ade <netconn_recv_data+0x8a>
- if (conn->flags & NETCONN_FLAG_MBOXCLOSED) {
- 8006b24: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
- 8006b28: f013 0f01 tst.w r3, #1
- 8006b2c: d025 beq.n 8006b7a <netconn_recv_data+0x126>
- return ERR_CONN;
- 8006b2e: f06f 000a mvn.w r0, #10
- 8006b32: e7d4 b.n 8006ade <netconn_recv_data+0x8a>
- if (sys_arch_mbox_fetch(&conn->recvmbox, &buf, conn->recv_timeout) == SYS_ARCH_TIMEOUT) {
- 8006b34: 69e2 ldr r2, [r4, #28]
- 8006b36: a901 add r1, sp, #4
- 8006b38: 4628 mov r0, r5
- 8006b3a: f006 f9e6 bl 800cf0a <sys_arch_mbox_fetch>
- 8006b3e: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff
- 8006b42: d1b1 bne.n 8006aa8 <netconn_recv_data+0x54>
- return ERR_TIMEOUT;
- 8006b44: f06f 0002 mvn.w r0, #2
- 8006b48: e7c9 b.n 8006ade <netconn_recv_data+0x8a>
- if (lwip_netconn_is_err_msg(buf, &err)) {
- 8006b4a: f10d 0103 add.w r1, sp, #3
- 8006b4e: 9801 ldr r0, [sp, #4]
- 8006b50: f000 fdf6 bl 8007740 <lwip_netconn_is_err_msg>
- 8006b54: b130 cbz r0, 8006b64 <netconn_recv_data+0x110>
- if (err == ERR_CLSD) {
- 8006b56: f99d 0003 ldrsb.w r0, [sp, #3]
- 8006b5a: f110 0f0f cmn.w r0, #15
- 8006b5e: d1be bne.n 8006ade <netconn_recv_data+0x8a>
- return ERR_OK;
- 8006b60: 2000 movs r0, #0
- 8006b62: e7bc b.n 8006ade <netconn_recv_data+0x8a>
- len = ((struct pbuf *)buf)->tot_len;
- 8006b64: 9b01 ldr r3, [sp, #4]
- 8006b66: 891d ldrh r5, [r3, #8]
- 8006b68: e7a9 b.n 8006abe <netconn_recv_data+0x6a>
- LWIP_ASSERT("buf != NULL", buf != NULL);
- 8006b6a: 4b05 ldr r3, [pc, #20] @ (8006b80 <netconn_recv_data+0x12c>)
- 8006b6c: f240 2291 movw r2, #657 @ 0x291
- 8006b70: 4907 ldr r1, [pc, #28] @ (8006b90 <netconn_recv_data+0x13c>)
- 8006b72: 4805 ldr r0, [pc, #20] @ (8006b88 <netconn_recv_data+0x134>)
- 8006b74: f00c fc48 bl 8013408 <iprintf>
- 8006b78: e79e b.n 8006ab8 <netconn_recv_data+0x64>
- return ERR_WOULDBLOCK;
- 8006b7a: f06f 0006 mvn.w r0, #6
- 8006b7e: e7ae b.n 8006ade <netconn_recv_data+0x8a>
- 8006b80: 08014664 .word 0x08014664
- 8006b84: 080148a8 .word 0x080148a8
- 8006b88: 080144e8 .word 0x080144e8
- 8006b8c: 080148c8 .word 0x080148c8
- 8006b90: 080148e4 .word 0x080148e4
- 08006b94 <netconn_recv_udp_raw_netbuf_flags>:
- {
- 8006b94: b508 push {r3, lr}
- LWIP_ERROR("netconn_recv_udp_raw_netbuf: invalid conn", (conn != NULL) &&
- 8006b96: b138 cbz r0, 8006ba8 <netconn_recv_udp_raw_netbuf_flags+0x14>
- 8006b98: 7803 ldrb r3, [r0, #0]
- 8006b9a: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 8006b9e: 2b10 cmp r3, #16
- 8006ba0: d002 beq.n 8006ba8 <netconn_recv_udp_raw_netbuf_flags+0x14>
- return netconn_recv_data(conn, (void **)new_buf, apiflags);
- 8006ba2: f7ff ff57 bl 8006a54 <netconn_recv_data>
- }
- 8006ba6: bd08 pop {r3, pc}
- LWIP_ERROR("netconn_recv_udp_raw_netbuf: invalid conn", (conn != NULL) &&
- 8006ba8: 4b04 ldr r3, [pc, #16] @ (8006bbc <netconn_recv_udp_raw_netbuf_flags+0x28>)
- 8006baa: f44f 7253 mov.w r2, #844 @ 0x34c
- 8006bae: 4904 ldr r1, [pc, #16] @ (8006bc0 <netconn_recv_udp_raw_netbuf_flags+0x2c>)
- 8006bb0: 4804 ldr r0, [pc, #16] @ (8006bc4 <netconn_recv_udp_raw_netbuf_flags+0x30>)
- 8006bb2: f00c fc29 bl 8013408 <iprintf>
- 8006bb6: f06f 000f mvn.w r0, #15
- 8006bba: e7f4 b.n 8006ba6 <netconn_recv_udp_raw_netbuf_flags+0x12>
- 8006bbc: 08014664 .word 0x08014664
- 8006bc0: 080148f0 .word 0x080148f0
- 8006bc4: 080144e8 .word 0x080144e8
- 08006bc8 <netconn_recv_data_tcp>:
- {
- 8006bc8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8006bcc: b088 sub sp, #32
- 8006bce: 4604 mov r4, r0
- 8006bd0: 460f mov r7, r1
- 8006bd2: 4615 mov r5, r2
- if (!NETCONN_RECVMBOX_WAITABLE(conn)) {
- 8006bd4: 3010 adds r0, #16
- 8006bd6: f006 f9c4 bl 800cf62 <sys_mbox_valid>
- 8006bda: 2800 cmp r0, #0
- 8006bdc: d043 beq.n 8006c66 <netconn_recv_data_tcp+0x9e>
- if (netconn_is_flag_set(conn, NETCONN_FIN_RX_PENDING)) {
- 8006bde: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
- 8006be2: f994 2028 ldrsb.w r2, [r4, #40] @ 0x28
- 8006be6: 2a00 cmp r2, #0
- 8006be8: db1f blt.n 8006c2a <netconn_recv_data_tcp+0x62>
- if (!(apiflags & NETCONN_NOAUTORCVD)) {
- 8006bea: f005 0808 and.w r8, r5, #8
- err = netconn_recv_data(conn, (void **)new_buf, apiflags);
- 8006bee: 462a mov r2, r5
- 8006bf0: 4639 mov r1, r7
- 8006bf2: 4620 mov r0, r4
- 8006bf4: f7ff ff2e bl 8006a54 <netconn_recv_data>
- if (err != ERR_OK) {
- 8006bf8: 4606 mov r6, r0
- 8006bfa: bb38 cbnz r0, 8006c4c <netconn_recv_data_tcp+0x84>
- buf = *new_buf;
- 8006bfc: 683f ldr r7, [r7, #0]
- if (!(apiflags & NETCONN_NOAUTORCVD)) {
- 8006bfe: f1b8 0f00 cmp.w r8, #0
- 8006c02: d105 bne.n 8006c10 <netconn_recv_data_tcp+0x48>
- u16_t len = buf ? buf->tot_len : 1;
- 8006c04: b337 cbz r7, 8006c54 <netconn_recv_data_tcp+0x8c>
- 8006c06: 8939 ldrh r1, [r7, #8]
- netconn_tcp_recvd_msg(conn, len, &API_VAR_REF(msg));
- 8006c08: 466a mov r2, sp
- 8006c0a: 4620 mov r0, r4
- 8006c0c: f7ff fd0e bl 800662c <netconn_tcp_recvd_msg>
- if (buf == NULL) {
- 8006c10: b9e7 cbnz r7, 8006c4c <netconn_recv_data_tcp+0x84>
- if (apiflags & NETCONN_NOFIN) {
- 8006c12: f015 0f10 tst.w r5, #16
- 8006c16: d00c beq.n 8006c32 <netconn_recv_data_tcp+0x6a>
- netconn_set_flags(conn, NETCONN_FIN_RX_PENDING);
- 8006c18: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
- 8006c1c: f043 0380 orr.w r3, r3, #128 @ 0x80
- 8006c20: f884 3028 strb.w r3, [r4, #40] @ 0x28
- return ERR_WOULDBLOCK;
- 8006c24: f06f 0606 mvn.w r6, #6
- 8006c28: e010 b.n 8006c4c <netconn_recv_data_tcp+0x84>
- netconn_clear_flags(conn, NETCONN_FIN_RX_PENDING);
- 8006c2a: f003 037f and.w r3, r3, #127 @ 0x7f
- 8006c2e: f884 3028 strb.w r3, [r4, #40] @ 0x28
- API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0);
- 8006c32: 6b23 ldr r3, [r4, #48] @ 0x30
- 8006c34: b11b cbz r3, 8006c3e <netconn_recv_data_tcp+0x76>
- 8006c36: 2200 movs r2, #0
- 8006c38: 2101 movs r1, #1
- 8006c3a: 4620 mov r0, r4
- 8006c3c: 4798 blx r3
- if (conn->pcb.ip == NULL) {
- 8006c3e: 6863 ldr r3, [r4, #4]
- 8006c40: b953 cbnz r3, 8006c58 <netconn_recv_data_tcp+0x90>
- err = netconn_err(conn);
- 8006c42: 4620 mov r0, r4
- 8006c44: f7ff fef7 bl 8006a36 <netconn_err>
- if (err != ERR_OK) {
- 8006c48: 4606 mov r6, r0
- 8006c4a: b178 cbz r0, 8006c6c <netconn_recv_data_tcp+0xa4>
- }
- 8006c4c: 4630 mov r0, r6
- 8006c4e: b008 add sp, #32
- 8006c50: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- u16_t len = buf ? buf->tot_len : 1;
- 8006c54: 2101 movs r1, #1
- 8006c56: e7d7 b.n 8006c08 <netconn_recv_data_tcp+0x40>
- netconn_close_shutdown(conn, NETCONN_SHUT_RD);
- 8006c58: 2101 movs r1, #1
- 8006c5a: 4620 mov r0, r4
- 8006c5c: f7ff fd08 bl 8006670 <netconn_close_shutdown>
- return ERR_CLSD;
- 8006c60: f06f 060e mvn.w r6, #14
- 8006c64: e7f2 b.n 8006c4c <netconn_recv_data_tcp+0x84>
- return ERR_CONN;
- 8006c66: f06f 060a mvn.w r6, #10
- 8006c6a: e7ef b.n 8006c4c <netconn_recv_data_tcp+0x84>
- return ERR_RST;
- 8006c6c: f06f 060d mvn.w r6, #13
- 8006c70: e7ec b.n 8006c4c <netconn_recv_data_tcp+0x84>
- ...
- 08006c74 <netconn_recv_tcp_pbuf_flags>:
- {
- 8006c74: b508 push {r3, lr}
- LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) &&
- 8006c76: b138 cbz r0, 8006c88 <netconn_recv_tcp_pbuf_flags+0x14>
- 8006c78: 7803 ldrb r3, [r0, #0]
- 8006c7a: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 8006c7e: 2b10 cmp r3, #16
- 8006c80: d102 bne.n 8006c88 <netconn_recv_tcp_pbuf_flags+0x14>
- return netconn_recv_data_tcp(conn, new_buf, apiflags);
- 8006c82: f7ff ffa1 bl 8006bc8 <netconn_recv_data_tcp>
- }
- 8006c86: bd08 pop {r3, pc}
- LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) &&
- 8006c88: 4b04 ldr r3, [pc, #16] @ (8006c9c <netconn_recv_tcp_pbuf_flags+0x28>)
- 8006c8a: f240 3225 movw r2, #805 @ 0x325
- 8006c8e: 4904 ldr r1, [pc, #16] @ (8006ca0 <netconn_recv_tcp_pbuf_flags+0x2c>)
- 8006c90: 4804 ldr r0, [pc, #16] @ (8006ca4 <netconn_recv_tcp_pbuf_flags+0x30>)
- 8006c92: f00c fbb9 bl 8013408 <iprintf>
- 8006c96: f06f 000f mvn.w r0, #15
- 8006c9a: e7f4 b.n 8006c86 <netconn_recv_tcp_pbuf_flags+0x12>
- 8006c9c: 08014664 .word 0x08014664
- 8006ca0: 080146c8 .word 0x080146c8
- 8006ca4: 080144e8 .word 0x080144e8
- 08006ca8 <lwip_netconn_err_to_msg>:
- /** Translate an error to a unique void* passed via an mbox */
- static void *
- lwip_netconn_err_to_msg(err_t err)
- {
- switch (err) {
- 8006ca8: f110 0f0e cmn.w r0, #14
- 8006cac: d011 beq.n 8006cd2 <lwip_netconn_err_to_msg+0x2a>
- 8006cae: f110 0f0d cmn.w r0, #13
- 8006cb2: d010 beq.n 8006cd6 <lwip_netconn_err_to_msg+0x2e>
- 8006cb4: f110 0f0f cmn.w r0, #15
- 8006cb8: d00f beq.n 8006cda <lwip_netconn_err_to_msg+0x32>
- case ERR_RST:
- return LWIP_CONST_CAST(void *, &netconn_reset);
- case ERR_CLSD:
- return LWIP_CONST_CAST(void *, &netconn_closed);
- default:
- LWIP_ASSERT("unhandled error", err == ERR_OK);
- 8006cba: b908 cbnz r0, 8006cc0 <lwip_netconn_err_to_msg+0x18>
- return NULL;
- 8006cbc: 2000 movs r0, #0
- }
- }
- 8006cbe: 4770 bx lr
- {
- 8006cc0: b508 push {r3, lr}
- LWIP_ASSERT("unhandled error", err == ERR_OK);
- 8006cc2: 4b07 ldr r3, [pc, #28] @ (8006ce0 <lwip_netconn_err_to_msg+0x38>)
- 8006cc4: 227d movs r2, #125 @ 0x7d
- 8006cc6: 4907 ldr r1, [pc, #28] @ (8006ce4 <lwip_netconn_err_to_msg+0x3c>)
- 8006cc8: 4807 ldr r0, [pc, #28] @ (8006ce8 <lwip_netconn_err_to_msg+0x40>)
- 8006cca: f00c fb9d bl 8013408 <iprintf>
- return NULL;
- 8006cce: 2000 movs r0, #0
- }
- 8006cd0: bd08 pop {r3, pc}
- return LWIP_CONST_CAST(void *, &netconn_reset);
- 8006cd2: 4806 ldr r0, [pc, #24] @ (8006cec <lwip_netconn_err_to_msg+0x44>)
- 8006cd4: 4770 bx lr
- switch (err) {
- 8006cd6: 4806 ldr r0, [pc, #24] @ (8006cf0 <lwip_netconn_err_to_msg+0x48>)
- 8006cd8: 4770 bx lr
- return LWIP_CONST_CAST(void *, &netconn_closed);
- 8006cda: 4806 ldr r0, [pc, #24] @ (8006cf4 <lwip_netconn_err_to_msg+0x4c>)
- 8006cdc: 4770 bx lr
- 8006cde: bf00 nop
- 8006ce0: 0801491c .word 0x0801491c
- 8006ce4: 08014980 .word 0x08014980
- 8006ce8: 080144e8 .word 0x080144e8
- 8006cec: 08014e32 .word 0x08014e32
- 8006cf0: 08014e33 .word 0x08014e33
- 8006cf4: 08014e31 .word 0x08014e31
- 08006cf8 <recv_udp>:
- * @see udp.h (struct udp_pcb.recv) for parameters
- */
- static void
- recv_udp(void *arg, struct udp_pcb *pcb, struct pbuf *p,
- const ip_addr_t *addr, u16_t port)
- {
- 8006cf8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8006cfc: 4604 mov r4, r0
- 8006cfe: 4615 mov r5, r2
- 8006d00: 4698 mov r8, r3
- #if LWIP_SO_RCVBUF
- int recv_avail;
- #endif /* LWIP_SO_RCVBUF */
- LWIP_UNUSED_ARG(pcb); /* only used for asserts... */
- LWIP_ASSERT("recv_udp must have a pcb argument", pcb != NULL);
- 8006d02: 460e mov r6, r1
- 8006d04: b1f1 cbz r1, 8006d44 <recv_udp+0x4c>
- LWIP_ASSERT("recv_udp must have an argument", arg != NULL);
- 8006d06: b324 cbz r4, 8006d52 <recv_udp+0x5a>
- if (conn == NULL) {
- pbuf_free(p);
- return;
- }
- LWIP_ASSERT("recv_udp: recv for wrong pcb!", conn->pcb.udp == pcb);
- 8006d08: 6863 ldr r3, [r4, #4]
- 8006d0a: 42b3 cmp r3, r6
- 8006d0c: d005 beq.n 8006d1a <recv_udp+0x22>
- 8006d0e: 4b2d ldr r3, [pc, #180] @ (8006dc4 <recv_udp+0xcc>)
- 8006d10: 22ee movs r2, #238 @ 0xee
- 8006d12: 492d ldr r1, [pc, #180] @ (8006dc8 <recv_udp+0xd0>)
- 8006d14: 482d ldr r0, [pc, #180] @ (8006dcc <recv_udp+0xd4>)
- 8006d16: f00c fb77 bl 8013408 <iprintf>
- #if LWIP_SO_RCVBUF
- SYS_ARCH_GET(conn->recv_avail, recv_avail);
- 8006d1a: f006 f9a9 bl 800d070 <sys_arch_protect>
- 8006d1e: 6a67 ldr r7, [r4, #36] @ 0x24
- 8006d20: f006 f9b2 bl 800d088 <sys_arch_unprotect>
- if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox) ||
- 8006d24: f104 0610 add.w r6, r4, #16
- 8006d28: 4630 mov r0, r6
- 8006d2a: f006 f91a bl 800cf62 <sys_mbox_valid>
- 8006d2e: b120 cbz r0, 8006d3a <recv_udp+0x42>
- ((recv_avail + (int)(p->tot_len)) > conn->recv_bufsize)) {
- 8006d30: 892a ldrh r2, [r5, #8]
- 8006d32: 443a add r2, r7
- 8006d34: 6a23 ldr r3, [r4, #32]
- if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox) ||
- 8006d36: 429a cmp r2, r3
- 8006d38: dd15 ble.n 8006d66 <recv_udp+0x6e>
- #else /* LWIP_SO_RCVBUF */
- if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox)) {
- #endif /* LWIP_SO_RCVBUF */
- pbuf_free(p);
- 8006d3a: 4628 mov r0, r5
- 8006d3c: f005 f830 bl 800bda0 <pbuf_free>
- SYS_ARCH_INC(conn->recv_avail, len);
- #endif /* LWIP_SO_RCVBUF */
- /* Register event with callback */
- API_EVENT(conn, NETCONN_EVT_RCVPLUS, len);
- }
- }
- 8006d40: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- LWIP_ASSERT("recv_udp must have a pcb argument", pcb != NULL);
- 8006d44: 4b1f ldr r3, [pc, #124] @ (8006dc4 <recv_udp+0xcc>)
- 8006d46: 22e5 movs r2, #229 @ 0xe5
- 8006d48: 4921 ldr r1, [pc, #132] @ (8006dd0 <recv_udp+0xd8>)
- 8006d4a: 4820 ldr r0, [pc, #128] @ (8006dcc <recv_udp+0xd4>)
- 8006d4c: f00c fb5c bl 8013408 <iprintf>
- 8006d50: e7d9 b.n 8006d06 <recv_udp+0xe>
- LWIP_ASSERT("recv_udp must have an argument", arg != NULL);
- 8006d52: 4b1c ldr r3, [pc, #112] @ (8006dc4 <recv_udp+0xcc>)
- 8006d54: 22e6 movs r2, #230 @ 0xe6
- 8006d56: 491f ldr r1, [pc, #124] @ (8006dd4 <recv_udp+0xdc>)
- 8006d58: 481c ldr r0, [pc, #112] @ (8006dcc <recv_udp+0xd4>)
- 8006d5a: f00c fb55 bl 8013408 <iprintf>
- pbuf_free(p);
- 8006d5e: 4628 mov r0, r5
- 8006d60: f005 f81e bl 800bda0 <pbuf_free>
- return;
- 8006d64: e7ec b.n 8006d40 <recv_udp+0x48>
- buf = (struct netbuf *)memp_malloc(MEMP_NETBUF);
- 8006d66: 2006 movs r0, #6
- 8006d68: f004 fc4c bl 800b604 <memp_malloc>
- if (buf == NULL) {
- 8006d6c: 4607 mov r7, r0
- 8006d6e: b1f8 cbz r0, 8006db0 <recv_udp+0xb8>
- buf->p = p;
- 8006d70: 6005 str r5, [r0, #0]
- buf->ptr = p;
- 8006d72: 6045 str r5, [r0, #4]
- ip_addr_set(&buf->addr, addr);
- 8006d74: f1b8 0f00 cmp.w r8, #0
- 8006d78: d01e beq.n 8006db8 <recv_udp+0xc0>
- 8006d7a: f8d8 3000 ldr.w r3, [r8]
- 8006d7e: 60bb str r3, [r7, #8]
- buf->port = port;
- 8006d80: f8bd 3018 ldrh.w r3, [sp, #24]
- 8006d84: 81bb strh r3, [r7, #12]
- len = p->tot_len;
- 8006d86: 892d ldrh r5, [r5, #8]
- if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) {
- 8006d88: 4639 mov r1, r7
- 8006d8a: 4630 mov r0, r6
- 8006d8c: f006 f8ad bl 800ceea <sys_mbox_trypost>
- 8006d90: b9a0 cbnz r0, 8006dbc <recv_udp+0xc4>
- SYS_ARCH_INC(conn->recv_avail, len);
- 8006d92: f006 f96d bl 800d070 <sys_arch_protect>
- 8006d96: 6a63 ldr r3, [r4, #36] @ 0x24
- 8006d98: 442b add r3, r5
- 8006d9a: 6263 str r3, [r4, #36] @ 0x24
- 8006d9c: f006 f974 bl 800d088 <sys_arch_unprotect>
- API_EVENT(conn, NETCONN_EVT_RCVPLUS, len);
- 8006da0: 6b23 ldr r3, [r4, #48] @ 0x30
- 8006da2: 2b00 cmp r3, #0
- 8006da4: d0cc beq.n 8006d40 <recv_udp+0x48>
- 8006da6: 462a mov r2, r5
- 8006da8: 2100 movs r1, #0
- 8006daa: 4620 mov r0, r4
- 8006dac: 4798 blx r3
- 8006dae: e7c7 b.n 8006d40 <recv_udp+0x48>
- pbuf_free(p);
- 8006db0: 4628 mov r0, r5
- 8006db2: f004 fff5 bl 800bda0 <pbuf_free>
- return;
- 8006db6: e7c3 b.n 8006d40 <recv_udp+0x48>
- ip_addr_set(&buf->addr, addr);
- 8006db8: 2300 movs r3, #0
- 8006dba: e7e0 b.n 8006d7e <recv_udp+0x86>
- netbuf_delete(buf);
- 8006dbc: 4638 mov r0, r7
- 8006dbe: f004 fc71 bl 800b6a4 <netbuf_delete>
- return;
- 8006dc2: e7bd b.n 8006d40 <recv_udp+0x48>
- 8006dc4: 0801491c .word 0x0801491c
- 8006dc8: 080149d4 .word 0x080149d4
- 8006dcc: 080144e8 .word 0x080144e8
- 8006dd0: 08014990 .word 0x08014990
- 8006dd4: 080149b4 .word 0x080149b4
- 08006dd8 <setup_tcp>:
- *
- * @param conn the TCP netconn to setup
- */
- static void
- setup_tcp(struct netconn *conn)
- {
- 8006dd8: b510 push {r4, lr}
- 8006dda: 4601 mov r1, r0
- struct tcp_pcb *pcb;
- pcb = conn->pcb.tcp;
- 8006ddc: 6844 ldr r4, [r0, #4]
- tcp_arg(pcb, conn);
- 8006dde: 4620 mov r0, r4
- 8006de0: f006 fb22 bl 800d428 <tcp_arg>
- tcp_recv(pcb, recv_tcp);
- 8006de4: 4908 ldr r1, [pc, #32] @ (8006e08 <setup_tcp+0x30>)
- 8006de6: 4620 mov r0, r4
- 8006de8: f006 fb26 bl 800d438 <tcp_recv>
- tcp_sent(pcb, sent_tcp);
- 8006dec: 4907 ldr r1, [pc, #28] @ (8006e0c <setup_tcp+0x34>)
- 8006dee: 4620 mov r0, r4
- 8006df0: f006 fb3c bl 800d46c <tcp_sent>
- tcp_poll(pcb, poll_tcp, NETCONN_TCP_POLL_INTERVAL);
- 8006df4: 2202 movs r2, #2
- 8006df6: 4906 ldr r1, [pc, #24] @ (8006e10 <setup_tcp+0x38>)
- 8006df8: 4620 mov r0, r4
- 8006dfa: f006 fb77 bl 800d4ec <tcp_poll>
- tcp_err(pcb, err_tcp);
- 8006dfe: 4905 ldr r1, [pc, #20] @ (8006e14 <setup_tcp+0x3c>)
- 8006e00: 4620 mov r0, r4
- 8006e02: f006 fb4d bl 800d4a0 <tcp_err>
- }
- 8006e06: bd10 pop {r4, pc}
- 8006e08: 08007661 .word 0x08007661
- 8006e0c: 080075ed .word 0x080075ed
- 8006e10: 08007565 .word 0x08007565
- 8006e14: 08006ea1 .word 0x08006ea1
- 08006e18 <pcb_new>:
- *
- * @param msg the api_msg describing the connection type
- */
- static void
- pcb_new(struct api_msg *msg)
- {
- 8006e18: b538 push {r3, r4, r5, lr}
- 8006e1a: 4604 mov r4, r0
- enum lwip_ip_addr_type iptype = IPADDR_TYPE_V4;
- LWIP_ASSERT("pcb_new: pcb already allocated", msg->conn->pcb.tcp == NULL);
- 8006e1c: 6803 ldr r3, [r0, #0]
- 8006e1e: 685b ldr r3, [r3, #4]
- 8006e20: b133 cbz r3, 8006e30 <pcb_new+0x18>
- 8006e22: 4b1b ldr r3, [pc, #108] @ (8006e90 <pcb_new+0x78>)
- 8006e24: f240 2265 movw r2, #613 @ 0x265
- 8006e28: 491a ldr r1, [pc, #104] @ (8006e94 <pcb_new+0x7c>)
- 8006e2a: 481b ldr r0, [pc, #108] @ (8006e98 <pcb_new+0x80>)
- 8006e2c: f00c faec bl 8013408 <iprintf>
- iptype = IPADDR_TYPE_ANY;
- }
- #endif
- /* Allocate a PCB for this connection */
- switch (NETCONNTYPE_GROUP(msg->conn->type)) {
- 8006e30: 6825 ldr r5, [r4, #0]
- 8006e32: 782b ldrb r3, [r5, #0]
- 8006e34: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 8006e38: 2b10 cmp r3, #16
- 8006e3a: d017 beq.n 8006e6c <pcb_new+0x54>
- 8006e3c: 2b20 cmp r3, #32
- 8006e3e: d120 bne.n 8006e82 <pcb_new+0x6a>
- }
- break;
- #endif /* LWIP_RAW */
- #if LWIP_UDP
- case NETCONN_UDP:
- msg->conn->pcb.udp = udp_new_ip_type(iptype);
- 8006e40: 2000 movs r0, #0
- 8006e42: f00b f861 bl 8011f08 <udp_new_ip_type>
- 8006e46: 6068 str r0, [r5, #4]
- if (msg->conn->pcb.udp != NULL) {
- 8006e48: 6823 ldr r3, [r4, #0]
- 8006e4a: 685a ldr r2, [r3, #4]
- 8006e4c: b13a cbz r2, 8006e5e <pcb_new+0x46>
- #if LWIP_UDPLITE
- if (NETCONNTYPE_ISUDPLITE(msg->conn->type)) {
- udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_UDPLITE);
- }
- #endif /* LWIP_UDPLITE */
- if (NETCONNTYPE_ISUDPNOCHKSUM(msg->conn->type)) {
- 8006e4e: 781b ldrb r3, [r3, #0]
- 8006e50: 2b22 cmp r3, #34 @ 0x22
- 8006e52: d008 beq.n 8006e66 <pcb_new+0x4e>
- udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_NOCHKSUM);
- }
- udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn);
- 8006e54: 6822 ldr r2, [r4, #0]
- 8006e56: 4911 ldr r1, [pc, #68] @ (8006e9c <pcb_new+0x84>)
- 8006e58: 6850 ldr r0, [r2, #4]
- 8006e5a: f00a ffff bl 8011e5c <udp_recv>
- default:
- /* Unsupported netconn type, e.g. protocol disabled */
- msg->err = ERR_VAL;
- return;
- }
- if (msg->conn->pcb.ip == NULL) {
- 8006e5e: 6823 ldr r3, [r4, #0]
- 8006e60: 685b ldr r3, [r3, #4]
- 8006e62: b18b cbz r3, 8006e88 <pcb_new+0x70>
- msg->err = ERR_MEM;
- }
- }
- 8006e64: bd38 pop {r3, r4, r5, pc}
- udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_NOCHKSUM);
- 8006e66: 2301 movs r3, #1
- 8006e68: 7413 strb r3, [r2, #16]
- 8006e6a: e7f3 b.n 8006e54 <pcb_new+0x3c>
- msg->conn->pcb.tcp = tcp_new_ip_type(iptype);
- 8006e6c: 2000 movs r0, #0
- 8006e6e: f006 fe9d bl 800dbac <tcp_new_ip_type>
- 8006e72: 6068 str r0, [r5, #4]
- if (msg->conn->pcb.tcp != NULL) {
- 8006e74: 6820 ldr r0, [r4, #0]
- 8006e76: 6843 ldr r3, [r0, #4]
- 8006e78: 2b00 cmp r3, #0
- 8006e7a: d0f0 beq.n 8006e5e <pcb_new+0x46>
- setup_tcp(msg->conn);
- 8006e7c: f7ff ffac bl 8006dd8 <setup_tcp>
- 8006e80: e7ed b.n 8006e5e <pcb_new+0x46>
- msg->err = ERR_VAL;
- 8006e82: 23fa movs r3, #250 @ 0xfa
- 8006e84: 7123 strb r3, [r4, #4]
- return;
- 8006e86: e7ed b.n 8006e64 <pcb_new+0x4c>
- msg->err = ERR_MEM;
- 8006e88: 23ff movs r3, #255 @ 0xff
- 8006e8a: 7123 strb r3, [r4, #4]
- 8006e8c: e7ea b.n 8006e64 <pcb_new+0x4c>
- 8006e8e: bf00 nop
- 8006e90: 0801491c .word 0x0801491c
- 8006e94: 080149f4 .word 0x080149f4
- 8006e98: 080144e8 .word 0x080144e8
- 8006e9c: 08006cf9 .word 0x08006cf9
- 08006ea0 <err_tcp>:
- {
- 8006ea0: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8006ea4: 460d mov r5, r1
- LWIP_ASSERT("conn != NULL", (conn != NULL));
- 8006ea6: 4604 mov r4, r0
- 8006ea8: 2800 cmp r0, #0
- 8006eaa: d040 beq.n 8006f2e <err_tcp+0x8e>
- SYS_ARCH_PROTECT(lev);
- 8006eac: f006 f8e0 bl 800d070 <sys_arch_protect>
- conn->pcb.tcp = NULL;
- 8006eb0: 2200 movs r2, #0
- 8006eb2: 6062 str r2, [r4, #4]
- conn->pending_err = err;
- 8006eb4: 7225 strb r5, [r4, #8]
- conn->flags |= NETCONN_FLAG_MBOXCLOSED;
- 8006eb6: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
- 8006eba: f043 0301 orr.w r3, r3, #1
- 8006ebe: f884 3028 strb.w r3, [r4, #40] @ 0x28
- old_state = conn->state;
- 8006ec2: 7866 ldrb r6, [r4, #1]
- conn->state = NETCONN_NONE;
- 8006ec4: 7062 strb r2, [r4, #1]
- SYS_ARCH_UNPROTECT(lev);
- 8006ec6: f006 f8df bl 800d088 <sys_arch_unprotect>
- API_EVENT(conn, NETCONN_EVT_ERROR, 0);
- 8006eca: 6b23 ldr r3, [r4, #48] @ 0x30
- 8006ecc: b11b cbz r3, 8006ed6 <err_tcp+0x36>
- 8006ece: 2200 movs r2, #0
- 8006ed0: 2104 movs r1, #4
- 8006ed2: 4620 mov r0, r4
- 8006ed4: 4798 blx r3
- API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0);
- 8006ed6: 6b23 ldr r3, [r4, #48] @ 0x30
- 8006ed8: b11b cbz r3, 8006ee2 <err_tcp+0x42>
- 8006eda: 2200 movs r2, #0
- 8006edc: 4611 mov r1, r2
- 8006ede: 4620 mov r0, r4
- 8006ee0: 4798 blx r3
- API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0);
- 8006ee2: 6b23 ldr r3, [r4, #48] @ 0x30
- 8006ee4: b11b cbz r3, 8006eee <err_tcp+0x4e>
- 8006ee6: 2200 movs r2, #0
- 8006ee8: 2102 movs r1, #2
- 8006eea: 4620 mov r0, r4
- 8006eec: 4798 blx r3
- mbox_msg = lwip_netconn_err_to_msg(err);
- 8006eee: 4628 mov r0, r5
- 8006ef0: f7ff feda bl 8006ca8 <lwip_netconn_err_to_msg>
- 8006ef4: 4607 mov r7, r0
- if (NETCONN_MBOX_VALID(conn, &conn->recvmbox)) {
- 8006ef6: f104 0810 add.w r8, r4, #16
- 8006efa: 4640 mov r0, r8
- 8006efc: f006 f831 bl 800cf62 <sys_mbox_valid>
- 8006f00: b9e8 cbnz r0, 8006f3e <err_tcp+0x9e>
- if (NETCONN_MBOX_VALID(conn, &conn->acceptmbox)) {
- 8006f02: f104 0814 add.w r8, r4, #20
- 8006f06: 4640 mov r0, r8
- 8006f08: f006 f82b bl 800cf62 <sys_mbox_valid>
- 8006f0c: b9e0 cbnz r0, 8006f48 <err_tcp+0xa8>
- if ((old_state == NETCONN_WRITE) || (old_state == NETCONN_CLOSE) ||
- 8006f0e: 2e04 cmp r6, #4
- 8006f10: bf18 it ne
- 8006f12: 2e01 cmpne r6, #1
- 8006f14: d01d beq.n 8006f52 <err_tcp+0xb2>
- 8006f16: 2e03 cmp r6, #3
- 8006f18: d01b beq.n 8006f52 <err_tcp+0xb2>
- LWIP_ASSERT("conn->current_msg == NULL", conn->current_msg == NULL);
- 8006f1a: 6ae3 ldr r3, [r4, #44] @ 0x2c
- 8006f1c: b3a3 cbz r3, 8006f88 <err_tcp+0xe8>
- 8006f1e: 4b25 ldr r3, [pc, #148] @ (8006fb4 <err_tcp+0x114>)
- 8006f20: f240 12f7 movw r2, #503 @ 0x1f7
- 8006f24: 4924 ldr r1, [pc, #144] @ (8006fb8 <err_tcp+0x118>)
- 8006f26: 4825 ldr r0, [pc, #148] @ (8006fbc <err_tcp+0x11c>)
- 8006f28: f00c fa6e bl 8013408 <iprintf>
- }
- 8006f2c: e02c b.n 8006f88 <err_tcp+0xe8>
- LWIP_ASSERT("conn != NULL", (conn != NULL));
- 8006f2e: 4b21 ldr r3, [pc, #132] @ (8006fb4 <err_tcp+0x114>)
- 8006f30: f44f 72dc mov.w r2, #440 @ 0x1b8
- 8006f34: 4922 ldr r1, [pc, #136] @ (8006fc0 <err_tcp+0x120>)
- 8006f36: 4821 ldr r0, [pc, #132] @ (8006fbc <err_tcp+0x11c>)
- 8006f38: f00c fa66 bl 8013408 <iprintf>
- 8006f3c: e7b6 b.n 8006eac <err_tcp+0xc>
- sys_mbox_trypost(&conn->recvmbox, mbox_msg);
- 8006f3e: 4639 mov r1, r7
- 8006f40: 4640 mov r0, r8
- 8006f42: f005 ffd2 bl 800ceea <sys_mbox_trypost>
- 8006f46: e7dc b.n 8006f02 <err_tcp+0x62>
- sys_mbox_trypost(&conn->acceptmbox, mbox_msg);
- 8006f48: 4639 mov r1, r7
- 8006f4a: 4640 mov r0, r8
- 8006f4c: f005 ffcd bl 800ceea <sys_mbox_trypost>
- 8006f50: e7dd b.n 8006f0e <err_tcp+0x6e>
- int was_nonblocking_connect = IN_NONBLOCKING_CONNECT(conn);
- 8006f52: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
- SET_NONBLOCKING_CONNECT(conn, 0);
- 8006f56: f003 02fb and.w r2, r3, #251 @ 0xfb
- 8006f5a: f884 2028 strb.w r2, [r4, #40] @ 0x28
- if (!was_nonblocking_connect) {
- 8006f5e: f013 0f04 tst.w r3, #4
- 8006f62: d111 bne.n 8006f88 <err_tcp+0xe8>
- LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL);
- 8006f64: 6ae3 ldr r3, [r4, #44] @ 0x2c
- 8006f66: b18b cbz r3, 8006f8c <err_tcp+0xec>
- if (old_state == NETCONN_CLOSE) {
- 8006f68: 2e04 cmp r6, #4
- 8006f6a: d017 beq.n 8006f9c <err_tcp+0xfc>
- conn->current_msg->err = err;
- 8006f6c: 6ae3 ldr r3, [r4, #44] @ 0x2c
- 8006f6e: 711d strb r5, [r3, #4]
- op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg);
- 8006f70: 6ae3 ldr r3, [r4, #44] @ 0x2c
- 8006f72: 681d ldr r5, [r3, #0]
- 8006f74: 350c adds r5, #12
- LWIP_ASSERT("inavlid op_completed_sem", sys_sem_valid(op_completed_sem));
- 8006f76: 4628 mov r0, r5
- 8006f78: f006 f839 bl 800cfee <sys_sem_valid>
- 8006f7c: b190 cbz r0, 8006fa4 <err_tcp+0x104>
- conn->current_msg = NULL;
- 8006f7e: 2300 movs r3, #0
- 8006f80: 62e3 str r3, [r4, #44] @ 0x2c
- sys_sem_signal(op_completed_sem);
- 8006f82: 4628 mov r0, r5
- 8006f84: f006 f829 bl 800cfda <sys_sem_signal>
- }
- 8006f88: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL);
- 8006f8c: 4b09 ldr r3, [pc, #36] @ (8006fb4 <err_tcp+0x114>)
- 8006f8e: f44f 72f3 mov.w r2, #486 @ 0x1e6
- 8006f92: 490c ldr r1, [pc, #48] @ (8006fc4 <err_tcp+0x124>)
- 8006f94: 4809 ldr r0, [pc, #36] @ (8006fbc <err_tcp+0x11c>)
- 8006f96: f00c fa37 bl 8013408 <iprintf>
- 8006f9a: e7e5 b.n 8006f68 <err_tcp+0xc8>
- conn->current_msg->err = ERR_OK;
- 8006f9c: 6ae3 ldr r3, [r4, #44] @ 0x2c
- 8006f9e: 2200 movs r2, #0
- 8006fa0: 711a strb r2, [r3, #4]
- 8006fa2: e7e5 b.n 8006f70 <err_tcp+0xd0>
- LWIP_ASSERT("inavlid op_completed_sem", sys_sem_valid(op_completed_sem));
- 8006fa4: 4b03 ldr r3, [pc, #12] @ (8006fb4 <err_tcp+0x114>)
- 8006fa6: f240 12ef movw r2, #495 @ 0x1ef
- 8006faa: 4907 ldr r1, [pc, #28] @ (8006fc8 <err_tcp+0x128>)
- 8006fac: 4803 ldr r0, [pc, #12] @ (8006fbc <err_tcp+0x11c>)
- 8006fae: f00c fa2b bl 8013408 <iprintf>
- 8006fb2: e7e4 b.n 8006f7e <err_tcp+0xde>
- 8006fb4: 0801491c .word 0x0801491c
- 8006fb8: 08014a5c .word 0x08014a5c
- 8006fbc: 080144e8 .word 0x080144e8
- 8006fc0: 08014a14 .word 0x08014a14
- 8006fc4: 08014a24 .word 0x08014a24
- 8006fc8: 08014a40 .word 0x08014a40
- 08006fcc <lwip_netconn_do_connected>:
- LWIP_UNUSED_ARG(pcb);
- conn = (struct netconn *)arg;
- if (conn == NULL) {
- 8006fcc: 2800 cmp r0, #0
- 8006fce: d060 beq.n 8007092 <lwip_netconn_do_connected+0xc6>
- {
- 8006fd0: b570 push {r4, r5, r6, lr}
- 8006fd2: 4616 mov r6, r2
- 8006fd4: 4604 mov r4, r0
- return ERR_VAL;
- }
- LWIP_ASSERT("conn->state == NETCONN_CONNECT", conn->state == NETCONN_CONNECT);
- 8006fd6: 7843 ldrb r3, [r0, #1]
- 8006fd8: 2b03 cmp r3, #3
- 8006fda: d132 bne.n 8007042 <lwip_netconn_do_connected+0x76>
- LWIP_ASSERT("(conn->current_msg != NULL) || conn->in_non_blocking_connect",
- 8006fdc: 6ae3 ldr r3, [r4, #44] @ 0x2c
- 8006fde: 2b00 cmp r3, #0
- 8006fe0: d037 beq.n 8007052 <lwip_netconn_do_connected+0x86>
- (conn->current_msg != NULL) || IN_NONBLOCKING_CONNECT(conn));
- if (conn->current_msg != NULL) {
- 8006fe2: 6ae5 ldr r5, [r4, #44] @ 0x2c
- 8006fe4: b11d cbz r5, 8006fee <lwip_netconn_do_connected+0x22>
- conn->current_msg->err = err;
- 8006fe6: 712e strb r6, [r5, #4]
- op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg);
- 8006fe8: 6ae3 ldr r3, [r4, #44] @ 0x2c
- 8006fea: 681d ldr r5, [r3, #0]
- 8006fec: 350c adds r5, #12
- }
- if ((NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) && (err == ERR_OK)) {
- 8006fee: 7823 ldrb r3, [r4, #0]
- 8006ff0: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 8006ff4: 2b10 cmp r3, #16
- 8006ff6: d039 beq.n 800706c <lwip_netconn_do_connected+0xa0>
- setup_tcp(conn);
- }
- was_blocking = !IN_NONBLOCKING_CONNECT(conn);
- 8006ff8: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
- 8006ffc: f003 0604 and.w r6, r3, #4
- 8007000: 2e00 cmp r6, #0
- 8007002: bf0c ite eq
- 8007004: 2201 moveq r2, #1
- 8007006: 2200 movne r2, #0
- SET_NONBLOCKING_CONNECT(conn, 0);
- 8007008: f003 03fb and.w r3, r3, #251 @ 0xfb
- 800700c: f884 3028 strb.w r3, [r4, #40] @ 0x28
- LWIP_ASSERT("blocking connect state error",
- 8007010: bf14 ite ne
- 8007012: 2301 movne r3, #1
- 8007014: 2300 moveq r3, #0
- 8007016: 2d00 cmp r5, #0
- 8007018: bf08 it eq
- 800701a: f043 0301 orreq.w r3, r3, #1
- 800701e: b123 cbz r3, 800702a <lwip_netconn_do_connected+0x5e>
- 8007020: 2d00 cmp r5, #0
- 8007022: bf18 it ne
- 8007024: f042 0201 orrne.w r2, r2, #1
- 8007028: bb32 cbnz r2, 8007078 <lwip_netconn_do_connected+0xac>
- (was_blocking && op_completed_sem != NULL) ||
- (!was_blocking && op_completed_sem == NULL));
- conn->current_msg = NULL;
- 800702a: 2300 movs r3, #0
- 800702c: 62e3 str r3, [r4, #44] @ 0x2c
- conn->state = NETCONN_NONE;
- 800702e: 7063 strb r3, [r4, #1]
- API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0);
- 8007030: 6b23 ldr r3, [r4, #48] @ 0x30
- 8007032: b11b cbz r3, 800703c <lwip_netconn_do_connected+0x70>
- 8007034: 2200 movs r2, #0
- 8007036: 2102 movs r1, #2
- 8007038: 4620 mov r0, r4
- 800703a: 4798 blx r3
- if (was_blocking) {
- 800703c: b326 cbz r6, 8007088 <lwip_netconn_do_connected+0xbc>
- sys_sem_signal(op_completed_sem);
- }
- return ERR_OK;
- 800703e: 2000 movs r0, #0
- }
- 8007040: bd70 pop {r4, r5, r6, pc}
- LWIP_ASSERT("conn->state == NETCONN_CONNECT", conn->state == NETCONN_CONNECT);
- 8007042: 4b15 ldr r3, [pc, #84] @ (8007098 <lwip_netconn_do_connected+0xcc>)
- 8007044: f240 5223 movw r2, #1315 @ 0x523
- 8007048: 4914 ldr r1, [pc, #80] @ (800709c <lwip_netconn_do_connected+0xd0>)
- 800704a: 4815 ldr r0, [pc, #84] @ (80070a0 <lwip_netconn_do_connected+0xd4>)
- 800704c: f00c f9dc bl 8013408 <iprintf>
- 8007050: e7c4 b.n 8006fdc <lwip_netconn_do_connected+0x10>
- LWIP_ASSERT("(conn->current_msg != NULL) || conn->in_non_blocking_connect",
- 8007052: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
- 8007056: f013 0f04 tst.w r3, #4
- 800705a: d1c2 bne.n 8006fe2 <lwip_netconn_do_connected+0x16>
- 800705c: 4b0e ldr r3, [pc, #56] @ (8007098 <lwip_netconn_do_connected+0xcc>)
- 800705e: f240 5224 movw r2, #1316 @ 0x524
- 8007062: 4910 ldr r1, [pc, #64] @ (80070a4 <lwip_netconn_do_connected+0xd8>)
- 8007064: 480e ldr r0, [pc, #56] @ (80070a0 <lwip_netconn_do_connected+0xd4>)
- 8007066: f00c f9cf bl 8013408 <iprintf>
- 800706a: e7ba b.n 8006fe2 <lwip_netconn_do_connected+0x16>
- if ((NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) && (err == ERR_OK)) {
- 800706c: 2e00 cmp r6, #0
- 800706e: d1c3 bne.n 8006ff8 <lwip_netconn_do_connected+0x2c>
- setup_tcp(conn);
- 8007070: 4620 mov r0, r4
- 8007072: f7ff feb1 bl 8006dd8 <setup_tcp>
- 8007076: e7bf b.n 8006ff8 <lwip_netconn_do_connected+0x2c>
- LWIP_ASSERT("blocking connect state error",
- 8007078: 4b07 ldr r3, [pc, #28] @ (8007098 <lwip_netconn_do_connected+0xcc>)
- 800707a: f44f 62a6 mov.w r2, #1328 @ 0x530
- 800707e: 490a ldr r1, [pc, #40] @ (80070a8 <lwip_netconn_do_connected+0xdc>)
- 8007080: 4807 ldr r0, [pc, #28] @ (80070a0 <lwip_netconn_do_connected+0xd4>)
- 8007082: f00c f9c1 bl 8013408 <iprintf>
- 8007086: e7d0 b.n 800702a <lwip_netconn_do_connected+0x5e>
- sys_sem_signal(op_completed_sem);
- 8007088: 4628 mov r0, r5
- 800708a: f005 ffa6 bl 800cfda <sys_sem_signal>
- return ERR_OK;
- 800708e: 2000 movs r0, #0
- 8007090: e7d6 b.n 8007040 <lwip_netconn_do_connected+0x74>
- return ERR_VAL;
- 8007092: f06f 0005 mvn.w r0, #5
- }
- 8007096: 4770 bx lr
- 8007098: 0801491c .word 0x0801491c
- 800709c: 08014a78 .word 0x08014a78
- 80070a0: 080144e8 .word 0x080144e8
- 80070a4: 08014a98 .word 0x08014a98
- 80070a8: 08014ad8 .word 0x08014ad8
- 080070ac <lwip_netconn_do_writemore>:
- * @return ERR_OK
- * ERR_MEM if LWIP_TCPIP_CORE_LOCKING=1 and sending hasn't yet finished
- */
- static err_t
- lwip_netconn_do_writemore(struct netconn *conn WRITE_DELAYED_PARAM)
- {
- 80070ac: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 80070b0: 468b mov fp, r1
- size_t diff;
- u8_t dontblock;
- u8_t apiflags;
- u8_t write_more;
- LWIP_ASSERT("conn != NULL", conn != NULL);
- 80070b2: 4605 mov r5, r0
- 80070b4: b1e8 cbz r0, 80070f2 <lwip_netconn_do_writemore+0x46>
- LWIP_ASSERT("conn->state == NETCONN_WRITE", (conn->state == NETCONN_WRITE));
- 80070b6: 786b ldrb r3, [r5, #1]
- 80070b8: 2b01 cmp r3, #1
- 80070ba: d122 bne.n 8007102 <lwip_netconn_do_writemore+0x56>
- LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL);
- 80070bc: 6aeb ldr r3, [r5, #44] @ 0x2c
- 80070be: b343 cbz r3, 8007112 <lwip_netconn_do_writemore+0x66>
- LWIP_ASSERT("conn->pcb.tcp != NULL", conn->pcb.tcp != NULL);
- 80070c0: 686b ldr r3, [r5, #4]
- 80070c2: b373 cbz r3, 8007122 <lwip_netconn_do_writemore+0x76>
- LWIP_ASSERT("conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len",
- 80070c4: 6aeb ldr r3, [r5, #44] @ 0x2c
- 80070c6: 699a ldr r2, [r3, #24]
- 80070c8: 695b ldr r3, [r3, #20]
- 80070ca: 429a cmp r2, r3
- 80070cc: d231 bcs.n 8007132 <lwip_netconn_do_writemore+0x86>
- conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len);
- LWIP_ASSERT("conn->current_msg->msg.w.vector_cnt > 0", conn->current_msg->msg.w.vector_cnt > 0);
- 80070ce: 6aeb ldr r3, [r5, #44] @ 0x2c
- 80070d0: 899b ldrh r3, [r3, #12]
- 80070d2: 2b00 cmp r3, #0
- 80070d4: d035 beq.n 8007142 <lwip_netconn_do_writemore+0x96>
- apiflags = conn->current_msg->msg.w.apiflags;
- 80070d6: 6aeb ldr r3, [r5, #44] @ 0x2c
- 80070d8: f893 801c ldrb.w r8, [r3, #28]
- dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK);
- 80070dc: f895 3028 ldrb.w r3, [r5, #40] @ 0x28
- 80070e0: f013 0f02 tst.w r3, #2
- 80070e4: d135 bne.n 8007152 <lwip_netconn_do_writemore+0xa6>
- 80070e6: f018 0f04 tst.w r8, #4
- 80070ea: d037 beq.n 800715c <lwip_netconn_do_writemore+0xb0>
- 80070ec: f04f 0a01 mov.w sl, #1
- 80070f0: e031 b.n 8007156 <lwip_netconn_do_writemore+0xaa>
- LWIP_ASSERT("conn != NULL", conn != NULL);
- 80070f2: 4b8d ldr r3, [pc, #564] @ (8007328 <lwip_netconn_do_writemore+0x27c>)
- 80070f4: f240 6273 movw r2, #1651 @ 0x673
- 80070f8: 498c ldr r1, [pc, #560] @ (800732c <lwip_netconn_do_writemore+0x280>)
- 80070fa: 488d ldr r0, [pc, #564] @ (8007330 <lwip_netconn_do_writemore+0x284>)
- 80070fc: f00c f984 bl 8013408 <iprintf>
- 8007100: e7d9 b.n 80070b6 <lwip_netconn_do_writemore+0xa>
- LWIP_ASSERT("conn->state == NETCONN_WRITE", (conn->state == NETCONN_WRITE));
- 8007102: 4b89 ldr r3, [pc, #548] @ (8007328 <lwip_netconn_do_writemore+0x27c>)
- 8007104: f240 6274 movw r2, #1652 @ 0x674
- 8007108: 498a ldr r1, [pc, #552] @ (8007334 <lwip_netconn_do_writemore+0x288>)
- 800710a: 4889 ldr r0, [pc, #548] @ (8007330 <lwip_netconn_do_writemore+0x284>)
- 800710c: f00c f97c bl 8013408 <iprintf>
- 8007110: e7d4 b.n 80070bc <lwip_netconn_do_writemore+0x10>
- LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL);
- 8007112: 4b85 ldr r3, [pc, #532] @ (8007328 <lwip_netconn_do_writemore+0x27c>)
- 8007114: f240 6275 movw r2, #1653 @ 0x675
- 8007118: 4987 ldr r1, [pc, #540] @ (8007338 <lwip_netconn_do_writemore+0x28c>)
- 800711a: 4885 ldr r0, [pc, #532] @ (8007330 <lwip_netconn_do_writemore+0x284>)
- 800711c: f00c f974 bl 8013408 <iprintf>
- 8007120: e7ce b.n 80070c0 <lwip_netconn_do_writemore+0x14>
- LWIP_ASSERT("conn->pcb.tcp != NULL", conn->pcb.tcp != NULL);
- 8007122: 4b81 ldr r3, [pc, #516] @ (8007328 <lwip_netconn_do_writemore+0x27c>)
- 8007124: f240 6276 movw r2, #1654 @ 0x676
- 8007128: 4984 ldr r1, [pc, #528] @ (800733c <lwip_netconn_do_writemore+0x290>)
- 800712a: 4881 ldr r0, [pc, #516] @ (8007330 <lwip_netconn_do_writemore+0x284>)
- 800712c: f00c f96c bl 8013408 <iprintf>
- 8007130: e7c8 b.n 80070c4 <lwip_netconn_do_writemore+0x18>
- LWIP_ASSERT("conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len",
- 8007132: 4b7d ldr r3, [pc, #500] @ (8007328 <lwip_netconn_do_writemore+0x27c>)
- 8007134: f240 6277 movw r2, #1655 @ 0x677
- 8007138: 4981 ldr r1, [pc, #516] @ (8007340 <lwip_netconn_do_writemore+0x294>)
- 800713a: 487d ldr r0, [pc, #500] @ (8007330 <lwip_netconn_do_writemore+0x284>)
- 800713c: f00c f964 bl 8013408 <iprintf>
- 8007140: e7c5 b.n 80070ce <lwip_netconn_do_writemore+0x22>
- LWIP_ASSERT("conn->current_msg->msg.w.vector_cnt > 0", conn->current_msg->msg.w.vector_cnt > 0);
- 8007142: 4b79 ldr r3, [pc, #484] @ (8007328 <lwip_netconn_do_writemore+0x27c>)
- 8007144: f240 6279 movw r2, #1657 @ 0x679
- 8007148: 497e ldr r1, [pc, #504] @ (8007344 <lwip_netconn_do_writemore+0x298>)
- 800714a: 4879 ldr r0, [pc, #484] @ (8007330 <lwip_netconn_do_writemore+0x284>)
- 800714c: f00c f95c bl 8013408 <iprintf>
- 8007150: e7c1 b.n 80070d6 <lwip_netconn_do_writemore+0x2a>
- dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK);
- 8007152: f04f 0a01 mov.w sl, #1
- 8007156: fa5f fa8a uxtb.w sl, sl
- 800715a: e061 b.n 8007220 <lwip_netconn_do_writemore+0x174>
- 800715c: f04f 0a00 mov.w sl, #0
- 8007160: e7f9 b.n 8007156 <lwip_netconn_do_writemore+0xaa>
- diff = conn->current_msg->msg.w.vector->len - conn->current_msg->msg.w.vector_off;
- if (diff > 0xffffUL) { /* max_u16_t */
- len = 0xffff;
- apiflags |= TCP_WRITE_FLAG_MORE;
- } else {
- len = (u16_t)diff;
- 8007162: b2b4 uxth r4, r6
- 8007164: e06a b.n 800723c <lwip_netconn_do_writemore+0x190>
- /* don't try to write more than sendbuf */
- len = available;
- if (dontblock) {
- if (!len) {
- /* set error according to partial write or not */
- err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK;
- 8007166: 6993 ldr r3, [r2, #24]
- 8007168: b9c3 cbnz r3, 800719c <lwip_netconn_do_writemore+0xf0>
- 800716a: f06f 0406 mvn.w r4, #6
- }
- } while (write_more && err == ERR_OK);
- /* if OK or memory error, check available space */
- if ((err == ERR_OK) || (err == ERR_MEM)) {
- err_mem:
- if (dontblock && (conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len)) {
- 800716e: f1ba 0f00 cmp.w sl, #0
- 8007172: f000 8094 beq.w 800729e <lwip_netconn_do_writemore+0x1f2>
- 8007176: 6aeb ldr r3, [r5, #44] @ 0x2c
- 8007178: 699a ldr r2, [r3, #24]
- 800717a: 695b ldr r3, [r3, #20]
- 800717c: 429a cmp r2, r3
- 800717e: f080 808e bcs.w 800729e <lwip_netconn_do_writemore+0x1f2>
- /* non-blocking write did not write everything: mark the pcb non-writable
- and let poll_tcp check writable space to mark the pcb writable again */
- API_EVENT(conn, NETCONN_EVT_SENDMINUS, 0);
- 8007182: 6b2b ldr r3, [r5, #48] @ 0x30
- 8007184: b11b cbz r3, 800718e <lwip_netconn_do_writemore+0xe2>
- 8007186: 2200 movs r2, #0
- 8007188: 2103 movs r1, #3
- 800718a: 4628 mov r0, r5
- 800718c: 4798 blx r3
- conn->flags |= NETCONN_FLAG_CHECK_WRITESPACE;
- 800718e: f895 3028 ldrb.w r3, [r5, #40] @ 0x28
- 8007192: f043 0310 orr.w r3, r3, #16
- 8007196: f885 3028 strb.w r3, [r5, #40] @ 0x28
- 800719a: e091 b.n 80072c0 <lwip_netconn_do_writemore+0x214>
- err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK;
- 800719c: 2400 movs r4, #0
- goto err_mem;
- 800719e: e7e6 b.n 800716e <lwip_netconn_do_writemore+0xc2>
- apiflags |= TCP_WRITE_FLAG_MORE;
- 80071a0: f048 0802 orr.w r8, r8, #2
- len = available;
- 80071a4: 4604 mov r4, r0
- LWIP_ASSERT("lwip_netconn_do_writemore: invalid length!",
- 80071a6: 46a1 mov r9, r4
- 80071a8: 4423 add r3, r4
- 80071aa: 4299 cmp r1, r3
- 80071ac: d30e bcc.n 80071cc <lwip_netconn_do_writemore+0x120>
- if ((len == 0xffff && diff > 0xffffUL) ||
- 80071ae: f64f 73ff movw r3, #65535 @ 0xffff
- 80071b2: 429c cmp r4, r3
- 80071b4: bf14 ite ne
- 80071b6: 2200 movne r2, #0
- 80071b8: 2201 moveq r2, #1
- 80071ba: 429e cmp r6, r3
- 80071bc: bf98 it ls
- 80071be: 2200 movls r2, #0
- 80071c0: b982 cbnz r2, 80071e4 <lwip_netconn_do_writemore+0x138>
- (len == (u16_t)diff && conn->current_msg->msg.w.vector_cnt > 1)) {
- 80071c2: b2b6 uxth r6, r6
- if ((len == 0xffff && diff > 0xffffUL) ||
- 80071c4: 42a6 cmp r6, r4
- 80071c6: d009 beq.n 80071dc <lwip_netconn_do_writemore+0x130>
- write_more = 0;
- 80071c8: 2600 movs r6, #0
- 80071ca: e00e b.n 80071ea <lwip_netconn_do_writemore+0x13e>
- LWIP_ASSERT("lwip_netconn_do_writemore: invalid length!",
- 80071cc: 4b56 ldr r3, [pc, #344] @ (8007328 <lwip_netconn_do_writemore+0x27c>)
- 80071ce: f240 62a3 movw r2, #1699 @ 0x6a3
- 80071d2: 495d ldr r1, [pc, #372] @ (8007348 <lwip_netconn_do_writemore+0x29c>)
- 80071d4: 4856 ldr r0, [pc, #344] @ (8007330 <lwip_netconn_do_writemore+0x284>)
- 80071d6: f00c f917 bl 8013408 <iprintf>
- 80071da: e7e8 b.n 80071ae <lwip_netconn_do_writemore+0x102>
- (len == (u16_t)diff && conn->current_msg->msg.w.vector_cnt > 1)) {
- 80071dc: 6aeb ldr r3, [r5, #44] @ 0x2c
- 80071de: 899b ldrh r3, [r3, #12]
- 80071e0: 2b01 cmp r3, #1
- 80071e2: d937 bls.n 8007254 <lwip_netconn_do_writemore+0x1a8>
- apiflags |= TCP_WRITE_FLAG_MORE;
- 80071e4: f048 0802 orr.w r8, r8, #2
- write_more = 1;
- 80071e8: 2601 movs r6, #1
- err = tcp_write(conn->pcb.tcp, dataptr, len, apiflags);
- 80071ea: 4643 mov r3, r8
- 80071ec: 4622 mov r2, r4
- 80071ee: 4639 mov r1, r7
- 80071f0: 6868 ldr r0, [r5, #4]
- 80071f2: f009 f84f bl 8010294 <tcp_write>
- if (err == ERR_OK) {
- 80071f6: 4604 mov r4, r0
- 80071f8: b968 cbnz r0, 8007216 <lwip_netconn_do_writemore+0x16a>
- conn->current_msg->msg.w.offset += len;
- 80071fa: 6aea ldr r2, [r5, #44] @ 0x2c
- 80071fc: 6993 ldr r3, [r2, #24]
- 80071fe: 444b add r3, r9
- 8007200: 6193 str r3, [r2, #24]
- conn->current_msg->msg.w.vector_off += len;
- 8007202: 6aea ldr r2, [r5, #44] @ 0x2c
- 8007204: 6913 ldr r3, [r2, #16]
- 8007206: 444b add r3, r9
- 8007208: 6113 str r3, [r2, #16]
- if (conn->current_msg->msg.w.vector_off == conn->current_msg->msg.w.vector->len) {
- 800720a: 6aeb ldr r3, [r5, #44] @ 0x2c
- 800720c: 6919 ldr r1, [r3, #16]
- 800720e: 689a ldr r2, [r3, #8]
- 8007210: 6852 ldr r2, [r2, #4]
- 8007212: 4291 cmp r1, r2
- 8007214: d020 beq.n 8007258 <lwip_netconn_do_writemore+0x1ac>
- } while (write_more && err == ERR_OK);
- 8007216: fab4 f384 clz r3, r4
- 800721a: 095b lsrs r3, r3, #5
- 800721c: b356 cbz r6, 8007274 <lwip_netconn_do_writemore+0x1c8>
- 800721e: b34b cbz r3, 8007274 <lwip_netconn_do_writemore+0x1c8>
- dataptr = (const u8_t *)conn->current_msg->msg.w.vector->ptr + conn->current_msg->msg.w.vector_off;
- 8007220: 6aea ldr r2, [r5, #44] @ 0x2c
- 8007222: 6891 ldr r1, [r2, #8]
- 8007224: 680f ldr r7, [r1, #0]
- 8007226: 6913 ldr r3, [r2, #16]
- 8007228: 441f add r7, r3
- diff = conn->current_msg->msg.w.vector->len - conn->current_msg->msg.w.vector_off;
- 800722a: 6849 ldr r1, [r1, #4]
- 800722c: 1ace subs r6, r1, r3
- if (diff > 0xffffUL) { /* max_u16_t */
- 800722e: f5b6 3f80 cmp.w r6, #65536 @ 0x10000
- 8007232: d396 bcc.n 8007162 <lwip_netconn_do_writemore+0xb6>
- apiflags |= TCP_WRITE_FLAG_MORE;
- 8007234: f048 0802 orr.w r8, r8, #2
- len = 0xffff;
- 8007238: f64f 74ff movw r4, #65535 @ 0xffff
- available = tcp_sndbuf(conn->pcb.tcp);
- 800723c: 6868 ldr r0, [r5, #4]
- 800723e: f8b0 0064 ldrh.w r0, [r0, #100] @ 0x64
- if (available < len) {
- 8007242: 4284 cmp r4, r0
- 8007244: d9af bls.n 80071a6 <lwip_netconn_do_writemore+0xfa>
- if (dontblock) {
- 8007246: f1ba 0f00 cmp.w sl, #0
- 800724a: d0a9 beq.n 80071a0 <lwip_netconn_do_writemore+0xf4>
- if (!len) {
- 800724c: 2800 cmp r0, #0
- 800724e: d08a beq.n 8007166 <lwip_netconn_do_writemore+0xba>
- len = available;
- 8007250: 4604 mov r4, r0
- 8007252: e7a8 b.n 80071a6 <lwip_netconn_do_writemore+0xfa>
- write_more = 0;
- 8007254: 2600 movs r6, #0
- 8007256: e7c8 b.n 80071ea <lwip_netconn_do_writemore+0x13e>
- conn->current_msg->msg.w.vector_cnt--;
- 8007258: 899a ldrh r2, [r3, #12]
- 800725a: 3a01 subs r2, #1
- 800725c: 819a strh r2, [r3, #12]
- if (conn->current_msg->msg.w.vector_cnt > 0) {
- 800725e: 6aeb ldr r3, [r5, #44] @ 0x2c
- 8007260: 899a ldrh r2, [r3, #12]
- 8007262: 2a00 cmp r2, #0
- 8007264: d0d7 beq.n 8007216 <lwip_netconn_do_writemore+0x16a>
- conn->current_msg->msg.w.vector++;
- 8007266: 689a ldr r2, [r3, #8]
- 8007268: 3208 adds r2, #8
- 800726a: 609a str r2, [r3, #8]
- conn->current_msg->msg.w.vector_off = 0;
- 800726c: 6aeb ldr r3, [r5, #44] @ 0x2c
- 800726e: 2200 movs r2, #0
- 8007270: 611a str r2, [r3, #16]
- 8007272: e7d0 b.n 8007216 <lwip_netconn_do_writemore+0x16a>
- if ((err == ERR_OK) || (err == ERR_MEM)) {
- 8007274: 1c63 adds r3, r4, #1
- 8007276: b2db uxtb r3, r3
- 8007278: 2b01 cmp r3, #1
- 800727a: f67f af78 bls.w 800716e <lwip_netconn_do_writemore+0xc2>
- don't try writing any more but return the error
- to the application thread. */
- err = out_err;
- write_finished = 1;
- }
- } else if (err == ERR_MEM) {
- 800727e: f1b4 3fff cmp.w r4, #4294967295 @ 0xffffffff
- 8007282: d038 beq.n 80072f6 <lwip_netconn_do_writemore+0x24a>
- }
- }
- if (write_finished) {
- /* everything was written: set back connection state
- and back to application task */
- sys_sem_t *op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg);
- 8007284: 6aeb ldr r3, [r5, #44] @ 0x2c
- 8007286: 6818 ldr r0, [r3, #0]
- 8007288: 300c adds r0, #12
- conn->current_msg->err = err;
- 800728a: 711c strb r4, [r3, #4]
- conn->current_msg = NULL;
- 800728c: 2300 movs r3, #0
- 800728e: 62eb str r3, [r5, #44] @ 0x2c
- conn->state = NETCONN_NONE;
- 8007290: 706b strb r3, [r5, #1]
- #if LWIP_TCPIP_CORE_LOCKING
- if (delayed)
- 8007292: f1bb 0f00 cmp.w fp, #0
- 8007296: d142 bne.n 800731e <lwip_netconn_do_writemore+0x272>
- #if LWIP_TCPIP_CORE_LOCKING
- else {
- return ERR_MEM;
- }
- #endif
- return ERR_OK;
- 8007298: 2000 movs r0, #0
- }
- 800729a: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
- } else if ((tcp_sndbuf(conn->pcb.tcp) <= TCP_SNDLOWAT) ||
- 800729e: 686b ldr r3, [r5, #4]
- 80072a0: f8b3 1064 ldrh.w r1, [r3, #100] @ 0x64
- 80072a4: f640 3269 movw r2, #2921 @ 0xb69
- 80072a8: 4291 cmp r1, r2
- 80072aa: d903 bls.n 80072b4 <lwip_netconn_do_writemore+0x208>
- (tcp_sndqueuelen(conn->pcb.tcp) >= TCP_SNDQUEUELOWAT)) {
- 80072ac: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66
- } else if ((tcp_sndbuf(conn->pcb.tcp) <= TCP_SNDLOWAT) ||
- 80072b0: 2b07 cmp r3, #7
- 80072b2: d905 bls.n 80072c0 <lwip_netconn_do_writemore+0x214>
- API_EVENT(conn, NETCONN_EVT_SENDMINUS, 0);
- 80072b4: 6b2b ldr r3, [r5, #48] @ 0x30
- 80072b6: b11b cbz r3, 80072c0 <lwip_netconn_do_writemore+0x214>
- 80072b8: 2200 movs r2, #0
- 80072ba: 2103 movs r1, #3
- 80072bc: 4628 mov r0, r5
- 80072be: 4798 blx r3
- if (err == ERR_OK) {
- 80072c0: 2c00 cmp r4, #0
- 80072c2: d1dc bne.n 800727e <lwip_netconn_do_writemore+0x1d2>
- if ((conn->current_msg->msg.w.offset == conn->current_msg->msg.w.len) || dontblock) {
- 80072c4: 6aeb ldr r3, [r5, #44] @ 0x2c
- 80072c6: 699a ldr r2, [r3, #24]
- 80072c8: 695b ldr r3, [r3, #20]
- 80072ca: 429a cmp r2, r3
- 80072cc: d005 beq.n 80072da <lwip_netconn_do_writemore+0x22e>
- 80072ce: f1ba 0f00 cmp.w sl, #0
- 80072d2: d004 beq.n 80072de <lwip_netconn_do_writemore+0x232>
- write_finished = 1;
- 80072d4: f04f 0a01 mov.w sl, #1
- 80072d8: e001 b.n 80072de <lwip_netconn_do_writemore+0x232>
- 80072da: f04f 0a01 mov.w sl, #1
- out_err = tcp_output(conn->pcb.tcp);
- 80072de: 6868 ldr r0, [r5, #4]
- 80072e0: f009 fdc0 bl 8010e64 <tcp_output>
- if (out_err == ERR_RTE) {
- 80072e4: f110 0f04 cmn.w r0, #4
- 80072e8: d015 beq.n 8007316 <lwip_netconn_do_writemore+0x26a>
- if (write_finished) {
- 80072ea: f1ba 0f00 cmp.w sl, #0
- 80072ee: d1c9 bne.n 8007284 <lwip_netconn_do_writemore+0x1d8>
- return ERR_MEM;
- 80072f0: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 80072f4: e7d1 b.n 800729a <lwip_netconn_do_writemore+0x1ee>
- err_t out_err = tcp_output(conn->pcb.tcp);
- 80072f6: 6868 ldr r0, [r5, #4]
- 80072f8: f009 fdb4 bl 8010e64 <tcp_output>
- 80072fc: 4604 mov r4, r0
- if (out_err == ERR_RTE) {
- 80072fe: f110 0f04 cmn.w r0, #4
- 8007302: d0bf beq.n 8007284 <lwip_netconn_do_writemore+0x1d8>
- } else if (dontblock) {
- 8007304: f1ba 0f00 cmp.w sl, #0
- 8007308: d0f2 beq.n 80072f0 <lwip_netconn_do_writemore+0x244>
- err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK;
- 800730a: 6aeb ldr r3, [r5, #44] @ 0x2c
- 800730c: 699b ldr r3, [r3, #24]
- 800730e: b923 cbnz r3, 800731a <lwip_netconn_do_writemore+0x26e>
- 8007310: f06f 0406 mvn.w r4, #6
- 8007314: e7b6 b.n 8007284 <lwip_netconn_do_writemore+0x1d8>
- err = out_err;
- 8007316: 4604 mov r4, r0
- 8007318: e7b4 b.n 8007284 <lwip_netconn_do_writemore+0x1d8>
- err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK;
- 800731a: 2400 movs r4, #0
- 800731c: e7b2 b.n 8007284 <lwip_netconn_do_writemore+0x1d8>
- sys_sem_signal(op_completed_sem);
- 800731e: f005 fe5c bl 800cfda <sys_sem_signal>
- return ERR_OK;
- 8007322: 2000 movs r0, #0
- 8007324: e7b9 b.n 800729a <lwip_netconn_do_writemore+0x1ee>
- 8007326: bf00 nop
- 8007328: 0801491c .word 0x0801491c
- 800732c: 08014a14 .word 0x08014a14
- 8007330: 080144e8 .word 0x080144e8
- 8007334: 08014af8 .word 0x08014af8
- 8007338: 08014a24 .word 0x08014a24
- 800733c: 08014b18 .word 0x08014b18
- 8007340: 08014b30 .word 0x08014b30
- 8007344: 08014b70 .word 0x08014b70
- 8007348: 08014b98 .word 0x08014b98
- 0800734c <lwip_netconn_do_close_internal>:
- {
- 800734c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
- 8007350: 4688 mov r8, r1
- LWIP_ASSERT("invalid conn", (conn != NULL));
- 8007352: 4604 mov r4, r0
- 8007354: 2800 cmp r0, #0
- 8007356: d05b beq.n 8007410 <lwip_netconn_do_close_internal+0xc4>
- LWIP_ASSERT("this is for tcp netconns only", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP));
- 8007358: 7823 ldrb r3, [r4, #0]
- 800735a: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 800735e: 2b10 cmp r3, #16
- 8007360: d15e bne.n 8007420 <lwip_netconn_do_close_internal+0xd4>
- LWIP_ASSERT("conn must be in state NETCONN_CLOSE", (conn->state == NETCONN_CLOSE));
- 8007362: 7863 ldrb r3, [r4, #1]
- 8007364: 2b04 cmp r3, #4
- 8007366: d163 bne.n 8007430 <lwip_netconn_do_close_internal+0xe4>
- LWIP_ASSERT("pcb already closed", (conn->pcb.tcp != NULL));
- 8007368: 6863 ldr r3, [r4, #4]
- 800736a: 2b00 cmp r3, #0
- 800736c: d068 beq.n 8007440 <lwip_netconn_do_close_internal+0xf4>
- LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL);
- 800736e: 6ae3 ldr r3, [r4, #44] @ 0x2c
- 8007370: 2b00 cmp r3, #0
- 8007372: d06d beq.n 8007450 <lwip_netconn_do_close_internal+0x104>
- tpcb = conn->pcb.tcp;
- 8007374: 6866 ldr r6, [r4, #4]
- shut = conn->current_msg->msg.sd.shut;
- 8007376: 6ae3 ldr r3, [r4, #44] @ 0x2c
- 8007378: 7a1b ldrb r3, [r3, #8]
- shut_rx = shut & NETCONN_SHUT_RD;
- 800737a: f003 0901 and.w r9, r3, #1
- shut_tx = shut & NETCONN_SHUT_WR;
- 800737e: f003 0702 and.w r7, r3, #2
- if (shut == NETCONN_SHUT_RDWR) {
- 8007382: 2b03 cmp r3, #3
- 8007384: d00f beq.n 80073a6 <lwip_netconn_do_close_internal+0x5a>
- } else if (shut_rx &&
- 8007386: f1b9 0f00 cmp.w r9, #0
- 800738a: d006 beq.n 800739a <lwip_netconn_do_close_internal+0x4e>
- ((tpcb->state == FIN_WAIT_1) ||
- 800738c: 7d32 ldrb r2, [r6, #20]
- (tpcb->state == FIN_WAIT_2) ||
- 800738e: 1f53 subs r3, r2, #5
- 8007390: b2db uxtb r3, r3
- } else if (shut_rx &&
- 8007392: 2a08 cmp r2, #8
- 8007394: bf18 it ne
- 8007396: 2b01 cmpne r3, #1
- 8007398: d905 bls.n 80073a6 <lwip_netconn_do_close_internal+0x5a>
- } else if (shut_tx && ((tpcb->flags & TF_RXCLOSED) != 0)) {
- 800739a: 2f00 cmp r7, #0
- 800739c: d060 beq.n 8007460 <lwip_netconn_do_close_internal+0x114>
- 800739e: 8b73 ldrh r3, [r6, #26]
- 80073a0: f013 0f10 tst.w r3, #16
- 80073a4: d05e beq.n 8007464 <lwip_netconn_do_close_internal+0x118>
- tcp_arg(tpcb, NULL);
- 80073a6: 2100 movs r1, #0
- 80073a8: 4630 mov r0, r6
- 80073aa: f006 f83d bl 800d428 <tcp_arg>
- 80073ae: f04f 0a01 mov.w sl, #1
- if (tpcb->state == LISTEN) {
- 80073b2: 7d33 ldrb r3, [r6, #20]
- 80073b4: 2b01 cmp r3, #1
- 80073b6: d058 beq.n 800746a <lwip_netconn_do_close_internal+0x11e>
- if (shut_rx) {
- 80073b8: f1b9 0f00 cmp.w r9, #0
- 80073bc: d15a bne.n 8007474 <lwip_netconn_do_close_internal+0x128>
- if (shut_tx) {
- 80073be: 2f00 cmp r7, #0
- 80073c0: d161 bne.n 8007486 <lwip_netconn_do_close_internal+0x13a>
- if (shut_close) {
- 80073c2: f1ba 0f00 cmp.w sl, #0
- 80073c6: d163 bne.n 8007490 <lwip_netconn_do_close_internal+0x144>
- err = tcp_shutdown(tpcb, shut_rx, shut_tx);
- 80073c8: 463a mov r2, r7
- 80073ca: 4649 mov r1, r9
- 80073cc: 4630 mov r0, r6
- 80073ce: f006 fd67 bl 800dea0 <tcp_shutdown>
- 80073d2: 4605 mov r5, r0
- if (err == ERR_OK) {
- 80073d4: 2d00 cmp r5, #0
- 80073d6: d06f beq.n 80074b8 <lwip_netconn_do_close_internal+0x16c>
- if (err == ERR_MEM) {
- 80073d8: f1b5 3fff cmp.w r5, #4294967295 @ 0xffffffff
- 80073dc: d16c bne.n 80074b8 <lwip_netconn_do_close_internal+0x16c>
- if (conn->current_msg->msg.sd.polls_left == 0) {
- 80073de: 6ae3 ldr r3, [r4, #44] @ 0x2c
- 80073e0: 7a5b ldrb r3, [r3, #9]
- 80073e2: 2b00 cmp r3, #0
- 80073e4: d065 beq.n 80074b2 <lwip_netconn_do_close_internal+0x166>
- LWIP_ASSERT("Closing a listen pcb may not fail!", (tpcb->state != LISTEN));
- 80073e6: 7d33 ldrb r3, [r6, #20]
- 80073e8: 2b01 cmp r3, #1
- 80073ea: f000 8097 beq.w 800751c <lwip_netconn_do_close_internal+0x1d0>
- if (shut_tx) {
- 80073ee: 2f00 cmp r7, #0
- 80073f0: f040 809c bne.w 800752c <lwip_netconn_do_close_internal+0x1e0>
- tcp_poll(tpcb, poll_tcp, 1);
- 80073f4: 2201 movs r2, #1
- 80073f6: 4950 ldr r1, [pc, #320] @ (8007538 <lwip_netconn_do_close_internal+0x1ec>)
- 80073f8: 4630 mov r0, r6
- 80073fa: f006 f877 bl 800d4ec <tcp_poll>
- tcp_err(tpcb, err_tcp);
- 80073fe: 494f ldr r1, [pc, #316] @ (800753c <lwip_netconn_do_close_internal+0x1f0>)
- 8007400: 4630 mov r0, r6
- 8007402: f006 f84d bl 800d4a0 <tcp_err>
- tcp_arg(tpcb, conn);
- 8007406: 4621 mov r1, r4
- 8007408: 4630 mov r0, r6
- 800740a: f006 f80d bl 800d428 <tcp_arg>
- return err;
- 800740e: e079 b.n 8007504 <lwip_netconn_do_close_internal+0x1b8>
- LWIP_ASSERT("invalid conn", (conn != NULL));
- 8007410: 4b4b ldr r3, [pc, #300] @ (8007540 <lwip_netconn_do_close_internal+0x1f4>)
- 8007412: f240 32a2 movw r2, #930 @ 0x3a2
- 8007416: 494b ldr r1, [pc, #300] @ (8007544 <lwip_netconn_do_close_internal+0x1f8>)
- 8007418: 484b ldr r0, [pc, #300] @ (8007548 <lwip_netconn_do_close_internal+0x1fc>)
- 800741a: f00b fff5 bl 8013408 <iprintf>
- 800741e: e79b b.n 8007358 <lwip_netconn_do_close_internal+0xc>
- LWIP_ASSERT("this is for tcp netconns only", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP));
- 8007420: 4b47 ldr r3, [pc, #284] @ (8007540 <lwip_netconn_do_close_internal+0x1f4>)
- 8007422: f240 32a3 movw r2, #931 @ 0x3a3
- 8007426: 4949 ldr r1, [pc, #292] @ (800754c <lwip_netconn_do_close_internal+0x200>)
- 8007428: 4847 ldr r0, [pc, #284] @ (8007548 <lwip_netconn_do_close_internal+0x1fc>)
- 800742a: f00b ffed bl 8013408 <iprintf>
- 800742e: e798 b.n 8007362 <lwip_netconn_do_close_internal+0x16>
- LWIP_ASSERT("conn must be in state NETCONN_CLOSE", (conn->state == NETCONN_CLOSE));
- 8007430: 4b43 ldr r3, [pc, #268] @ (8007540 <lwip_netconn_do_close_internal+0x1f4>)
- 8007432: f44f 7269 mov.w r2, #932 @ 0x3a4
- 8007436: 4946 ldr r1, [pc, #280] @ (8007550 <lwip_netconn_do_close_internal+0x204>)
- 8007438: 4843 ldr r0, [pc, #268] @ (8007548 <lwip_netconn_do_close_internal+0x1fc>)
- 800743a: f00b ffe5 bl 8013408 <iprintf>
- 800743e: e793 b.n 8007368 <lwip_netconn_do_close_internal+0x1c>
- LWIP_ASSERT("pcb already closed", (conn->pcb.tcp != NULL));
- 8007440: 4b3f ldr r3, [pc, #252] @ (8007540 <lwip_netconn_do_close_internal+0x1f4>)
- 8007442: f240 32a5 movw r2, #933 @ 0x3a5
- 8007446: 4943 ldr r1, [pc, #268] @ (8007554 <lwip_netconn_do_close_internal+0x208>)
- 8007448: 483f ldr r0, [pc, #252] @ (8007548 <lwip_netconn_do_close_internal+0x1fc>)
- 800744a: f00b ffdd bl 8013408 <iprintf>
- 800744e: e78e b.n 800736e <lwip_netconn_do_close_internal+0x22>
- LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL);
- 8007450: 4b3b ldr r3, [pc, #236] @ (8007540 <lwip_netconn_do_close_internal+0x1f4>)
- 8007452: f240 32a6 movw r2, #934 @ 0x3a6
- 8007456: 4940 ldr r1, [pc, #256] @ (8007558 <lwip_netconn_do_close_internal+0x20c>)
- 8007458: 483b ldr r0, [pc, #236] @ (8007548 <lwip_netconn_do_close_internal+0x1fc>)
- 800745a: f00b ffd5 bl 8013408 <iprintf>
- 800745e: e789 b.n 8007374 <lwip_netconn_do_close_internal+0x28>
- shut_close = 0;
- 8007460: 46ba mov sl, r7
- 8007462: e7a6 b.n 80073b2 <lwip_netconn_do_close_internal+0x66>
- 8007464: f04f 0a00 mov.w sl, #0
- 8007468: e7a3 b.n 80073b2 <lwip_netconn_do_close_internal+0x66>
- tcp_accept(tpcb, NULL);
- 800746a: 2100 movs r1, #0
- 800746c: 4630 mov r0, r6
- 800746e: f006 f831 bl 800d4d4 <tcp_accept>
- 8007472: e016 b.n 80074a2 <lwip_netconn_do_close_internal+0x156>
- tcp_recv(tpcb, NULL);
- 8007474: 2100 movs r1, #0
- 8007476: 4630 mov r0, r6
- 8007478: f005 ffde bl 800d438 <tcp_recv>
- tcp_accept(tpcb, NULL);
- 800747c: 2100 movs r1, #0
- 800747e: 4630 mov r0, r6
- 8007480: f006 f828 bl 800d4d4 <tcp_accept>
- 8007484: e79b b.n 80073be <lwip_netconn_do_close_internal+0x72>
- tcp_sent(tpcb, NULL);
- 8007486: 2100 movs r1, #0
- 8007488: 4630 mov r0, r6
- 800748a: f005 ffef bl 800d46c <tcp_sent>
- 800748e: e798 b.n 80073c2 <lwip_netconn_do_close_internal+0x76>
- tcp_poll(tpcb, NULL, 0);
- 8007490: 2200 movs r2, #0
- 8007492: 4611 mov r1, r2
- 8007494: 4630 mov r0, r6
- 8007496: f006 f829 bl 800d4ec <tcp_poll>
- tcp_err(tpcb, NULL);
- 800749a: 2100 movs r1, #0
- 800749c: 4630 mov r0, r6
- 800749e: f005 ffff bl 800d4a0 <tcp_err>
- if (shut_close) {
- 80074a2: f1ba 0f00 cmp.w sl, #0
- 80074a6: d08f beq.n 80073c8 <lwip_netconn_do_close_internal+0x7c>
- err = tcp_close(tpcb);
- 80074a8: 4630 mov r0, r6
- 80074aa: f006 fc2b bl 800dd04 <tcp_close>
- 80074ae: 4605 mov r5, r0
- 80074b0: e790 b.n 80073d4 <lwip_netconn_do_close_internal+0x88>
- if (shut_close) {
- 80074b2: f1ba 0f00 cmp.w sl, #0
- 80074b6: d128 bne.n 800750a <lwip_netconn_do_close_internal+0x1be>
- sys_sem_t *op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg);
- 80074b8: 6ae3 ldr r3, [r4, #44] @ 0x2c
- 80074ba: 681e ldr r6, [r3, #0]
- 80074bc: 360c adds r6, #12
- conn->current_msg->err = err;
- 80074be: 711d strb r5, [r3, #4]
- conn->current_msg = NULL;
- 80074c0: 2300 movs r3, #0
- 80074c2: 62e3 str r3, [r4, #44] @ 0x2c
- conn->state = NETCONN_NONE;
- 80074c4: 7063 strb r3, [r4, #1]
- if (err == ERR_OK) {
- 80074c6: b9cd cbnz r5, 80074fc <lwip_netconn_do_close_internal+0x1b0>
- if (shut_close) {
- 80074c8: f1ba 0f00 cmp.w sl, #0
- 80074cc: d006 beq.n 80074dc <lwip_netconn_do_close_internal+0x190>
- conn->pcb.tcp = NULL;
- 80074ce: 6063 str r3, [r4, #4]
- API_EVENT(conn, NETCONN_EVT_ERROR, 0);
- 80074d0: 6b23 ldr r3, [r4, #48] @ 0x30
- 80074d2: b11b cbz r3, 80074dc <lwip_netconn_do_close_internal+0x190>
- 80074d4: 2200 movs r2, #0
- 80074d6: 2104 movs r1, #4
- 80074d8: 4620 mov r0, r4
- 80074da: 4798 blx r3
- if (shut_rx) {
- 80074dc: f1b9 0f00 cmp.w r9, #0
- 80074e0: d005 beq.n 80074ee <lwip_netconn_do_close_internal+0x1a2>
- API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0);
- 80074e2: 6b23 ldr r3, [r4, #48] @ 0x30
- 80074e4: b11b cbz r3, 80074ee <lwip_netconn_do_close_internal+0x1a2>
- 80074e6: 2200 movs r2, #0
- 80074e8: 4611 mov r1, r2
- 80074ea: 4620 mov r0, r4
- 80074ec: 4798 blx r3
- if (shut_tx) {
- 80074ee: b12f cbz r7, 80074fc <lwip_netconn_do_close_internal+0x1b0>
- API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0);
- 80074f0: 6b23 ldr r3, [r4, #48] @ 0x30
- 80074f2: b11b cbz r3, 80074fc <lwip_netconn_do_close_internal+0x1b0>
- 80074f4: 2200 movs r2, #0
- 80074f6: 2102 movs r1, #2
- 80074f8: 4620 mov r0, r4
- 80074fa: 4798 blx r3
- if (delayed)
- 80074fc: f1b8 0f00 cmp.w r8, #0
- 8007500: d108 bne.n 8007514 <lwip_netconn_do_close_internal+0x1c8>
- return ERR_OK;
- 8007502: 2500 movs r5, #0
- }
- 8007504: 4628 mov r0, r5
- 8007506: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
- tcp_abort(tpcb);
- 800750a: 4630 mov r0, r6
- 800750c: f006 fa24 bl 800d958 <tcp_abort>
- err = ERR_OK;
- 8007510: 2500 movs r5, #0
- 8007512: e7d1 b.n 80074b8 <lwip_netconn_do_close_internal+0x16c>
- sys_sem_signal(op_completed_sem);
- 8007514: 4630 mov r0, r6
- 8007516: f005 fd60 bl 800cfda <sys_sem_signal>
- 800751a: e7f2 b.n 8007502 <lwip_netconn_do_close_internal+0x1b6>
- LWIP_ASSERT("Closing a listen pcb may not fail!", (tpcb->state != LISTEN));
- 800751c: 4b08 ldr r3, [pc, #32] @ (8007540 <lwip_netconn_do_close_internal+0x1f4>)
- 800751e: f240 4241 movw r2, #1089 @ 0x441
- 8007522: 490e ldr r1, [pc, #56] @ (800755c <lwip_netconn_do_close_internal+0x210>)
- 8007524: 4808 ldr r0, [pc, #32] @ (8007548 <lwip_netconn_do_close_internal+0x1fc>)
- 8007526: f00b ff6f bl 8013408 <iprintf>
- 800752a: e760 b.n 80073ee <lwip_netconn_do_close_internal+0xa2>
- tcp_sent(tpcb, sent_tcp);
- 800752c: 490c ldr r1, [pc, #48] @ (8007560 <lwip_netconn_do_close_internal+0x214>)
- 800752e: 4630 mov r0, r6
- 8007530: f005 ff9c bl 800d46c <tcp_sent>
- 8007534: e75e b.n 80073f4 <lwip_netconn_do_close_internal+0xa8>
- 8007536: bf00 nop
- 8007538: 08007565 .word 0x08007565
- 800753c: 08006ea1 .word 0x08006ea1
- 8007540: 0801491c .word 0x0801491c
- 8007544: 08014818 .word 0x08014818
- 8007548: 080144e8 .word 0x080144e8
- 800754c: 08014bc4 .word 0x08014bc4
- 8007550: 08014be4 .word 0x08014be4
- 8007554: 08014c08 .word 0x08014c08
- 8007558: 08014a24 .word 0x08014a24
- 800755c: 08014c1c .word 0x08014c1c
- 8007560: 080075ed .word 0x080075ed
- 08007564 <poll_tcp>:
- {
- 8007564: b510 push {r4, lr}
- LWIP_ASSERT("conn != NULL", (conn != NULL));
- 8007566: 4604 mov r4, r0
- 8007568: b308 cbz r0, 80075ae <poll_tcp+0x4a>
- if (conn->state == NETCONN_WRITE) {
- 800756a: 7863 ldrb r3, [r4, #1]
- 800756c: 2b01 cmp r3, #1
- 800756e: d026 beq.n 80075be <poll_tcp+0x5a>
- } else if (conn->state == NETCONN_CLOSE) {
- 8007570: 2b04 cmp r3, #4
- 8007572: d029 beq.n 80075c8 <poll_tcp+0x64>
- if (conn->flags & NETCONN_FLAG_CHECK_WRITESPACE) {
- 8007574: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
- 8007578: f013 0f10 tst.w r3, #16
- 800757c: d015 beq.n 80075aa <poll_tcp+0x46>
- if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) &&
- 800757e: 6862 ldr r2, [r4, #4]
- 8007580: b19a cbz r2, 80075aa <poll_tcp+0x46>
- 8007582: f8b2 0064 ldrh.w r0, [r2, #100] @ 0x64
- 8007586: f640 3169 movw r1, #2921 @ 0xb69
- 800758a: 4288 cmp r0, r1
- 800758c: d90d bls.n 80075aa <poll_tcp+0x46>
- (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) {
- 800758e: f8b2 2066 ldrh.w r2, [r2, #102] @ 0x66
- if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) &&
- 8007592: 2a07 cmp r2, #7
- 8007594: d809 bhi.n 80075aa <poll_tcp+0x46>
- netconn_clear_flags(conn, NETCONN_FLAG_CHECK_WRITESPACE);
- 8007596: f003 03ef and.w r3, r3, #239 @ 0xef
- 800759a: f884 3028 strb.w r3, [r4, #40] @ 0x28
- API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0);
- 800759e: 6b23 ldr r3, [r4, #48] @ 0x30
- 80075a0: b11b cbz r3, 80075aa <poll_tcp+0x46>
- 80075a2: 2200 movs r2, #0
- 80075a4: 2102 movs r1, #2
- 80075a6: 4620 mov r0, r4
- 80075a8: 4798 blx r3
- }
- 80075aa: 2000 movs r0, #0
- 80075ac: bd10 pop {r4, pc}
- LWIP_ASSERT("conn != NULL", (conn != NULL));
- 80075ae: 4b0c ldr r3, [pc, #48] @ (80075e0 <poll_tcp+0x7c>)
- 80075b0: f44f 72b5 mov.w r2, #362 @ 0x16a
- 80075b4: 490b ldr r1, [pc, #44] @ (80075e4 <poll_tcp+0x80>)
- 80075b6: 480c ldr r0, [pc, #48] @ (80075e8 <poll_tcp+0x84>)
- 80075b8: f00b ff26 bl 8013408 <iprintf>
- 80075bc: e7d5 b.n 800756a <poll_tcp+0x6>
- lwip_netconn_do_writemore(conn WRITE_DELAYED);
- 80075be: 2101 movs r1, #1
- 80075c0: 4620 mov r0, r4
- 80075c2: f7ff fd73 bl 80070ac <lwip_netconn_do_writemore>
- 80075c6: e7d5 b.n 8007574 <poll_tcp+0x10>
- if (conn->current_msg && conn->current_msg->msg.sd.polls_left) {
- 80075c8: 6ae3 ldr r3, [r4, #44] @ 0x2c
- 80075ca: b11b cbz r3, 80075d4 <poll_tcp+0x70>
- 80075cc: 7a5a ldrb r2, [r3, #9]
- 80075ce: b10a cbz r2, 80075d4 <poll_tcp+0x70>
- conn->current_msg->msg.sd.polls_left--;
- 80075d0: 3a01 subs r2, #1
- 80075d2: 725a strb r2, [r3, #9]
- lwip_netconn_do_close_internal(conn WRITE_DELAYED);
- 80075d4: 2101 movs r1, #1
- 80075d6: 4620 mov r0, r4
- 80075d8: f7ff feb8 bl 800734c <lwip_netconn_do_close_internal>
- 80075dc: e7ca b.n 8007574 <poll_tcp+0x10>
- 80075de: bf00 nop
- 80075e0: 0801491c .word 0x0801491c
- 80075e4: 08014a14 .word 0x08014a14
- 80075e8: 080144e8 .word 0x080144e8
- 080075ec <sent_tcp>:
- {
- 80075ec: b538 push {r3, r4, r5, lr}
- LWIP_ASSERT("conn != NULL", (conn != NULL));
- 80075ee: b1f8 cbz r0, 8007630 <sent_tcp+0x44>
- 80075f0: 4615 mov r5, r2
- 80075f2: 4604 mov r4, r0
- if (conn->state == NETCONN_WRITE) {
- 80075f4: 7843 ldrb r3, [r0, #1]
- 80075f6: 2b01 cmp r3, #1
- 80075f8: d023 beq.n 8007642 <sent_tcp+0x56>
- } else if (conn->state == NETCONN_CLOSE) {
- 80075fa: 2b04 cmp r3, #4
- 80075fc: d025 beq.n 800764a <sent_tcp+0x5e>
- if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) &&
- 80075fe: 6863 ldr r3, [r4, #4]
- 8007600: b1eb cbz r3, 800763e <sent_tcp+0x52>
- 8007602: f8b3 1064 ldrh.w r1, [r3, #100] @ 0x64
- 8007606: f640 3269 movw r2, #2921 @ 0xb69
- 800760a: 4291 cmp r1, r2
- 800760c: d917 bls.n 800763e <sent_tcp+0x52>
- (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) {
- 800760e: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66
- if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) &&
- 8007612: 2b07 cmp r3, #7
- 8007614: d813 bhi.n 800763e <sent_tcp+0x52>
- netconn_clear_flags(conn, NETCONN_FLAG_CHECK_WRITESPACE);
- 8007616: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
- 800761a: f003 03ef and.w r3, r3, #239 @ 0xef
- 800761e: f884 3028 strb.w r3, [r4, #40] @ 0x28
- API_EVENT(conn, NETCONN_EVT_SENDPLUS, len);
- 8007622: 6b23 ldr r3, [r4, #48] @ 0x30
- 8007624: b15b cbz r3, 800763e <sent_tcp+0x52>
- 8007626: 462a mov r2, r5
- 8007628: 2102 movs r1, #2
- 800762a: 4620 mov r0, r4
- 800762c: 4798 blx r3
- 800762e: e006 b.n 800763e <sent_tcp+0x52>
- LWIP_ASSERT("conn != NULL", (conn != NULL));
- 8007630: 4b08 ldr r3, [pc, #32] @ (8007654 <sent_tcp+0x68>)
- 8007632: f240 1293 movw r2, #403 @ 0x193
- 8007636: 4908 ldr r1, [pc, #32] @ (8007658 <sent_tcp+0x6c>)
- 8007638: 4808 ldr r0, [pc, #32] @ (800765c <sent_tcp+0x70>)
- 800763a: f00b fee5 bl 8013408 <iprintf>
- }
- 800763e: 2000 movs r0, #0
- 8007640: bd38 pop {r3, r4, r5, pc}
- lwip_netconn_do_writemore(conn WRITE_DELAYED);
- 8007642: 2101 movs r1, #1
- 8007644: f7ff fd32 bl 80070ac <lwip_netconn_do_writemore>
- 8007648: e7d9 b.n 80075fe <sent_tcp+0x12>
- lwip_netconn_do_close_internal(conn WRITE_DELAYED);
- 800764a: 2101 movs r1, #1
- 800764c: f7ff fe7e bl 800734c <lwip_netconn_do_close_internal>
- 8007650: e7d5 b.n 80075fe <sent_tcp+0x12>
- 8007652: bf00 nop
- 8007654: 0801491c .word 0x0801491c
- 8007658: 08014a14 .word 0x08014a14
- 800765c: 080144e8 .word 0x080144e8
- 08007660 <recv_tcp>:
- {
- 8007660: b5f8 push {r3, r4, r5, r6, r7, lr}
- 8007662: 4604 mov r4, r0
- 8007664: 4615 mov r5, r2
- 8007666: 461e mov r6, r3
- LWIP_ASSERT("recv_tcp must have a pcb argument", pcb != NULL);
- 8007668: 460f mov r7, r1
- 800766a: 2900 cmp r1, #0
- 800766c: d02f beq.n 80076ce <recv_tcp+0x6e>
- LWIP_ASSERT("recv_tcp must have an argument", arg != NULL);
- 800766e: 2c00 cmp r4, #0
- 8007670: d035 beq.n 80076de <recv_tcp+0x7e>
- LWIP_ASSERT("err != ERR_OK unhandled", err == ERR_OK);
- 8007672: 2e00 cmp r6, #0
- 8007674: d13b bne.n 80076ee <recv_tcp+0x8e>
- if (conn == NULL) {
- 8007676: 2c00 cmp r4, #0
- 8007678: d04e beq.n 8007718 <recv_tcp+0xb8>
- LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb);
- 800767a: 6863 ldr r3, [r4, #4]
- 800767c: 42bb cmp r3, r7
- 800767e: d006 beq.n 800768e <recv_tcp+0x2e>
- 8007680: 4b28 ldr r3, [pc, #160] @ (8007724 <recv_tcp+0xc4>)
- 8007682: f240 1235 movw r2, #309 @ 0x135
- 8007686: 4928 ldr r1, [pc, #160] @ (8007728 <recv_tcp+0xc8>)
- 8007688: 4828 ldr r0, [pc, #160] @ (800772c <recv_tcp+0xcc>)
- 800768a: f00b febd bl 8013408 <iprintf>
- if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox)) {
- 800768e: f104 0610 add.w r6, r4, #16
- 8007692: 4630 mov r0, r6
- 8007694: f005 fc65 bl 800cf62 <sys_mbox_valid>
- 8007698: 2800 cmp r0, #0
- 800769a: d030 beq.n 80076fe <recv_tcp+0x9e>
- if (p != NULL) {
- 800769c: 2d00 cmp r5, #0
- 800769e: d038 beq.n 8007712 <recv_tcp+0xb2>
- len = p->tot_len;
- 80076a0: 892f ldrh r7, [r5, #8]
- if (sys_mbox_trypost(&conn->recvmbox, msg) != ERR_OK) {
- 80076a2: 4629 mov r1, r5
- 80076a4: 4630 mov r0, r6
- 80076a6: f005 fc20 bl 800ceea <sys_mbox_trypost>
- 80076aa: 4605 mov r5, r0
- 80076ac: 2800 cmp r0, #0
- 80076ae: d136 bne.n 800771e <recv_tcp+0xbe>
- SYS_ARCH_INC(conn->recv_avail, len);
- 80076b0: f005 fcde bl 800d070 <sys_arch_protect>
- 80076b4: 6a63 ldr r3, [r4, #36] @ 0x24
- 80076b6: 443b add r3, r7
- 80076b8: 6263 str r3, [r4, #36] @ 0x24
- 80076ba: f005 fce5 bl 800d088 <sys_arch_unprotect>
- API_EVENT(conn, NETCONN_EVT_RCVPLUS, len);
- 80076be: 6b23 ldr r3, [r4, #48] @ 0x30
- 80076c0: b11b cbz r3, 80076ca <recv_tcp+0x6a>
- 80076c2: 463a mov r2, r7
- 80076c4: 2100 movs r1, #0
- 80076c6: 4620 mov r0, r4
- 80076c8: 4798 blx r3
- }
- 80076ca: 4628 mov r0, r5
- 80076cc: bdf8 pop {r3, r4, r5, r6, r7, pc}
- LWIP_ASSERT("recv_tcp must have a pcb argument", pcb != NULL);
- 80076ce: 4b15 ldr r3, [pc, #84] @ (8007724 <recv_tcp+0xc4>)
- 80076d0: f44f 7296 mov.w r2, #300 @ 0x12c
- 80076d4: 4916 ldr r1, [pc, #88] @ (8007730 <recv_tcp+0xd0>)
- 80076d6: 4815 ldr r0, [pc, #84] @ (800772c <recv_tcp+0xcc>)
- 80076d8: f00b fe96 bl 8013408 <iprintf>
- 80076dc: e7c7 b.n 800766e <recv_tcp+0xe>
- LWIP_ASSERT("recv_tcp must have an argument", arg != NULL);
- 80076de: 4b11 ldr r3, [pc, #68] @ (8007724 <recv_tcp+0xc4>)
- 80076e0: f240 122d movw r2, #301 @ 0x12d
- 80076e4: 4913 ldr r1, [pc, #76] @ (8007734 <recv_tcp+0xd4>)
- 80076e6: 4811 ldr r0, [pc, #68] @ (800772c <recv_tcp+0xcc>)
- 80076e8: f00b fe8e bl 8013408 <iprintf>
- 80076ec: e7c1 b.n 8007672 <recv_tcp+0x12>
- LWIP_ASSERT("err != ERR_OK unhandled", err == ERR_OK);
- 80076ee: 4b0d ldr r3, [pc, #52] @ (8007724 <recv_tcp+0xc4>)
- 80076f0: f44f 7297 mov.w r2, #302 @ 0x12e
- 80076f4: 4910 ldr r1, [pc, #64] @ (8007738 <recv_tcp+0xd8>)
- 80076f6: 480d ldr r0, [pc, #52] @ (800772c <recv_tcp+0xcc>)
- 80076f8: f00b fe86 bl 8013408 <iprintf>
- 80076fc: e7bb b.n 8007676 <recv_tcp+0x16>
- if (p != NULL) {
- 80076fe: b135 cbz r5, 800770e <recv_tcp+0xae>
- tcp_recved(pcb, p->tot_len);
- 8007700: 8929 ldrh r1, [r5, #8]
- 8007702: 4638 mov r0, r7
- 8007704: f005 fe12 bl 800d32c <tcp_recved>
- pbuf_free(p);
- 8007708: 4628 mov r0, r5
- 800770a: f004 fb49 bl 800bda0 <pbuf_free>
- return ERR_OK;
- 800770e: 2500 movs r5, #0
- 8007710: e7db b.n 80076ca <recv_tcp+0x6a>
- msg = LWIP_CONST_CAST(void *, &netconn_closed);
- 8007712: 4d0a ldr r5, [pc, #40] @ (800773c <recv_tcp+0xdc>)
- len = 0;
- 8007714: 2700 movs r7, #0
- 8007716: e7c4 b.n 80076a2 <recv_tcp+0x42>
- return ERR_VAL;
- 8007718: f06f 0505 mvn.w r5, #5
- 800771c: e7d5 b.n 80076ca <recv_tcp+0x6a>
- return ERR_MEM;
- 800771e: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
- 8007722: e7d2 b.n 80076ca <recv_tcp+0x6a>
- 8007724: 0801491c .word 0x0801491c
- 8007728: 08014c9c .word 0x08014c9c
- 800772c: 080144e8 .word 0x080144e8
- 8007730: 08014c40 .word 0x08014c40
- 8007734: 08014c64 .word 0x08014c64
- 8007738: 08014c84 .word 0x08014c84
- 800773c: 08014e31 .word 0x08014e31
- 08007740 <lwip_netconn_is_err_msg>:
- {
- 8007740: b538 push {r3, r4, r5, lr}
- 8007742: 4604 mov r4, r0
- LWIP_ASSERT("err != NULL", err != NULL);
- 8007744: 460d mov r5, r1
- 8007746: b151 cbz r1, 800775e <lwip_netconn_is_err_msg+0x1e>
- if (msg == &netconn_aborted) {
- 8007748: 4b0e ldr r3, [pc, #56] @ (8007784 <lwip_netconn_is_err_msg+0x44>)
- 800774a: 429c cmp r4, r3
- 800774c: d00e beq.n 800776c <lwip_netconn_is_err_msg+0x2c>
- } else if (msg == &netconn_reset) {
- 800774e: 4b0e ldr r3, [pc, #56] @ (8007788 <lwip_netconn_is_err_msg+0x48>)
- 8007750: 429c cmp r4, r3
- 8007752: d00f beq.n 8007774 <lwip_netconn_is_err_msg+0x34>
- } else if (msg == &netconn_closed) {
- 8007754: 4b0d ldr r3, [pc, #52] @ (800778c <lwip_netconn_is_err_msg+0x4c>)
- 8007756: 429c cmp r4, r3
- 8007758: d010 beq.n 800777c <lwip_netconn_is_err_msg+0x3c>
- return 0;
- 800775a: 2000 movs r0, #0
- }
- 800775c: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("err != NULL", err != NULL);
- 800775e: 4b0c ldr r3, [pc, #48] @ (8007790 <lwip_netconn_is_err_msg+0x50>)
- 8007760: 2285 movs r2, #133 @ 0x85
- 8007762: 490c ldr r1, [pc, #48] @ (8007794 <lwip_netconn_is_err_msg+0x54>)
- 8007764: 480c ldr r0, [pc, #48] @ (8007798 <lwip_netconn_is_err_msg+0x58>)
- 8007766: f00b fe4f bl 8013408 <iprintf>
- 800776a: e7ed b.n 8007748 <lwip_netconn_is_err_msg+0x8>
- *err = ERR_ABRT;
- 800776c: 23f3 movs r3, #243 @ 0xf3
- 800776e: 702b strb r3, [r5, #0]
- return 1;
- 8007770: 2001 movs r0, #1
- 8007772: e7f3 b.n 800775c <lwip_netconn_is_err_msg+0x1c>
- *err = ERR_RST;
- 8007774: 23f2 movs r3, #242 @ 0xf2
- 8007776: 702b strb r3, [r5, #0]
- return 1;
- 8007778: 2001 movs r0, #1
- 800777a: e7ef b.n 800775c <lwip_netconn_is_err_msg+0x1c>
- *err = ERR_CLSD;
- 800777c: 23f1 movs r3, #241 @ 0xf1
- 800777e: 702b strb r3, [r5, #0]
- return 1;
- 8007780: 2001 movs r0, #1
- 8007782: e7eb b.n 800775c <lwip_netconn_is_err_msg+0x1c>
- 8007784: 08014e33 .word 0x08014e33
- 8007788: 08014e32 .word 0x08014e32
- 800778c: 08014e31 .word 0x08014e31
- 8007790: 0801491c .word 0x0801491c
- 8007794: 08014cbc .word 0x08014cbc
- 8007798: 080144e8 .word 0x080144e8
- 0800779c <lwip_netconn_do_newconn>:
- {
- 800779c: b508 push {r3, lr}
- msg->err = ERR_OK;
- 800779e: 2300 movs r3, #0
- 80077a0: 7103 strb r3, [r0, #4]
- if (msg->conn->pcb.tcp == NULL) {
- 80077a2: 6803 ldr r3, [r0, #0]
- 80077a4: 685b ldr r3, [r3, #4]
- 80077a6: b103 cbz r3, 80077aa <lwip_netconn_do_newconn+0xe>
- }
- 80077a8: bd08 pop {r3, pc}
- pcb_new(msg);
- 80077aa: f7ff fb35 bl 8006e18 <pcb_new>
- }
- 80077ae: e7fb b.n 80077a8 <lwip_netconn_do_newconn+0xc>
- 080077b0 <netconn_alloc>:
- {
- 80077b0: b570 push {r4, r5, r6, lr}
- 80077b2: 4605 mov r5, r0
- 80077b4: 460e mov r6, r1
- conn = (struct netconn *)memp_malloc(MEMP_NETCONN);
- 80077b6: 2007 movs r0, #7
- 80077b8: f003 ff24 bl 800b604 <memp_malloc>
- if (conn == NULL) {
- 80077bc: 4604 mov r4, r0
- 80077be: b3a0 cbz r0, 800782a <netconn_alloc+0x7a>
- conn->pending_err = ERR_OK;
- 80077c0: 2300 movs r3, #0
- 80077c2: 7203 strb r3, [r0, #8]
- conn->type = t;
- 80077c4: 7005 strb r5, [r0, #0]
- conn->pcb.tcp = NULL;
- 80077c6: 6043 str r3, [r0, #4]
- switch (NETCONNTYPE_GROUP(t)) {
- 80077c8: f005 05f0 and.w r5, r5, #240 @ 0xf0
- 80077cc: 2d10 cmp r5, #16
- 80077ce: d001 beq.n 80077d4 <netconn_alloc+0x24>
- 80077d0: 2d20 cmp r5, #32
- 80077d2: d11e bne.n 8007812 <netconn_alloc+0x62>
- if (sys_mbox_new(&conn->recvmbox, size) != ERR_OK) {
- 80077d4: f104 0510 add.w r5, r4, #16
- 80077d8: 2106 movs r1, #6
- 80077da: 4628 mov r0, r5
- 80077dc: f005 fb6e bl 800cebc <sys_mbox_new>
- 80077e0: b9f0 cbnz r0, 8007820 <netconn_alloc+0x70>
- if (sys_sem_new(&conn->op_completed, 0) != ERR_OK) {
- 80077e2: 2100 movs r1, #0
- 80077e4: f104 000c add.w r0, r4, #12
- 80077e8: f005 fbc4 bl 800cf74 <sys_sem_new>
- 80077ec: b9f8 cbnz r0, 800782e <netconn_alloc+0x7e>
- sys_mbox_set_invalid(&conn->acceptmbox);
- 80077ee: f104 0014 add.w r0, r4, #20
- 80077f2: f005 fbbc bl 800cf6e <sys_mbox_set_invalid>
- conn->state = NETCONN_NONE;
- 80077f6: 2300 movs r3, #0
- 80077f8: 7063 strb r3, [r4, #1]
- conn->socket = -1;
- 80077fa: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff
- 80077fe: 61a2 str r2, [r4, #24]
- conn->callback = callback;
- 8007800: 6326 str r6, [r4, #48] @ 0x30
- conn->current_msg = NULL;
- 8007802: 62e3 str r3, [r4, #44] @ 0x2c
- conn->recv_timeout = 0;
- 8007804: 61e3 str r3, [r4, #28]
- conn->recv_bufsize = RECV_BUFSIZE_DEFAULT;
- 8007806: 4a0c ldr r2, [pc, #48] @ (8007838 <netconn_alloc+0x88>)
- 8007808: 6222 str r2, [r4, #32]
- conn->recv_avail = 0;
- 800780a: 6263 str r3, [r4, #36] @ 0x24
- conn->flags = init_flags;
- 800780c: f884 3028 strb.w r3, [r4, #40] @ 0x28
- return conn;
- 8007810: e00b b.n 800782a <netconn_alloc+0x7a>
- LWIP_ASSERT("netconn_alloc: undefined netconn_type", 0);
- 8007812: 4b0a ldr r3, [pc, #40] @ (800783c <netconn_alloc+0x8c>)
- 8007814: f240 22e5 movw r2, #741 @ 0x2e5
- 8007818: 4909 ldr r1, [pc, #36] @ (8007840 <netconn_alloc+0x90>)
- 800781a: 480a ldr r0, [pc, #40] @ (8007844 <netconn_alloc+0x94>)
- 800781c: f00b fdf4 bl 8013408 <iprintf>
- memp_free(MEMP_NETCONN, conn);
- 8007820: 4621 mov r1, r4
- 8007822: 2007 movs r0, #7
- 8007824: f003 ff24 bl 800b670 <memp_free>
- return NULL;
- 8007828: 2400 movs r4, #0
- }
- 800782a: 4620 mov r0, r4
- 800782c: bd70 pop {r4, r5, r6, pc}
- sys_mbox_free(&conn->recvmbox);
- 800782e: 4628 mov r0, r5
- 8007830: f005 fb52 bl 800ced8 <sys_mbox_free>
- goto free_and_return;
- 8007834: e7f4 b.n 8007820 <netconn_alloc+0x70>
- 8007836: bf00 nop
- 8007838: 77359400 .word 0x77359400
- 800783c: 0801491c .word 0x0801491c
- 8007840: 08014cc8 .word 0x08014cc8
- 8007844: 080144e8 .word 0x080144e8
- 08007848 <netconn_free>:
- {
- 8007848: b538 push {r3, r4, r5, lr}
- 800784a: 4604 mov r4, r0
- LWIP_ASSERT("PCB must be deallocated outside this function", conn->pcb.tcp == NULL);
- 800784c: 6843 ldr r3, [r0, #4]
- 800784e: b133 cbz r3, 800785e <netconn_free+0x16>
- 8007850: 4b16 ldr r3, [pc, #88] @ (80078ac <netconn_free+0x64>)
- 8007852: f44f 7247 mov.w r2, #796 @ 0x31c
- 8007856: 4916 ldr r1, [pc, #88] @ (80078b0 <netconn_free+0x68>)
- 8007858: 4816 ldr r0, [pc, #88] @ (80078b4 <netconn_free+0x6c>)
- 800785a: f00b fdd5 bl 8013408 <iprintf>
- LWIP_ASSERT("recvmbox must be deallocated before calling this function",
- 800785e: f104 0010 add.w r0, r4, #16
- 8007862: f005 fb7e bl 800cf62 <sys_mbox_valid>
- 8007866: b988 cbnz r0, 800788c <netconn_free+0x44>
- LWIP_ASSERT("acceptmbox must be deallocated before calling this function",
- 8007868: f104 0014 add.w r0, r4, #20
- 800786c: f005 fb79 bl 800cf62 <sys_mbox_valid>
- 8007870: b9a0 cbnz r0, 800789c <netconn_free+0x54>
- sys_sem_free(&conn->op_completed);
- 8007872: f104 050c add.w r5, r4, #12
- 8007876: 4628 mov r0, r5
- 8007878: f005 fbb4 bl 800cfe4 <sys_sem_free>
- sys_sem_set_invalid(&conn->op_completed);
- 800787c: 4628 mov r0, r5
- 800787e: f005 fbbc bl 800cffa <sys_sem_set_invalid>
- memp_free(MEMP_NETCONN, conn);
- 8007882: 4621 mov r1, r4
- 8007884: 2007 movs r0, #7
- 8007886: f003 fef3 bl 800b670 <memp_free>
- }
- 800788a: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("recvmbox must be deallocated before calling this function",
- 800788c: 4b07 ldr r3, [pc, #28] @ (80078ac <netconn_free+0x64>)
- 800788e: f240 3223 movw r2, #803 @ 0x323
- 8007892: 4909 ldr r1, [pc, #36] @ (80078b8 <netconn_free+0x70>)
- 8007894: 4807 ldr r0, [pc, #28] @ (80078b4 <netconn_free+0x6c>)
- 8007896: f00b fdb7 bl 8013408 <iprintf>
- 800789a: e7e5 b.n 8007868 <netconn_free+0x20>
- LWIP_ASSERT("acceptmbox must be deallocated before calling this function",
- 800789c: 4b03 ldr r3, [pc, #12] @ (80078ac <netconn_free+0x64>)
- 800789e: f240 3226 movw r2, #806 @ 0x326
- 80078a2: 4906 ldr r1, [pc, #24] @ (80078bc <netconn_free+0x74>)
- 80078a4: 4803 ldr r0, [pc, #12] @ (80078b4 <netconn_free+0x6c>)
- 80078a6: f00b fdaf bl 8013408 <iprintf>
- 80078aa: e7e2 b.n 8007872 <netconn_free+0x2a>
- 80078ac: 0801491c .word 0x0801491c
- 80078b0: 08014cf0 .word 0x08014cf0
- 80078b4: 080144e8 .word 0x080144e8
- 80078b8: 08014d20 .word 0x08014d20
- 80078bc: 08014d5c .word 0x08014d5c
- 080078c0 <netconn_drain>:
- {
- 80078c0: b530 push {r4, r5, lr}
- 80078c2: b083 sub sp, #12
- 80078c4: 4604 mov r4, r0
- if (sys_mbox_valid(&conn->recvmbox)) {
- 80078c6: f100 0510 add.w r5, r0, #16
- 80078ca: 4628 mov r0, r5
- 80078cc: f005 fb49 bl 800cf62 <sys_mbox_valid>
- 80078d0: b958 cbnz r0, 80078ea <netconn_drain+0x2a>
- if (sys_mbox_valid(&conn->acceptmbox)) {
- 80078d2: 3414 adds r4, #20
- 80078d4: 4620 mov r0, r4
- 80078d6: f005 fb44 bl 800cf62 <sys_mbox_valid>
- 80078da: bb20 cbnz r0, 8007926 <netconn_drain+0x66>
- 80078dc: e043 b.n 8007966 <netconn_drain+0xa6>
- if (!lwip_netconn_is_err_msg(mem, &err)) {
- 80078de: f10d 0103 add.w r1, sp, #3
- 80078e2: 9801 ldr r0, [sp, #4]
- 80078e4: f7ff ff2c bl 8007740 <lwip_netconn_is_err_msg>
- 80078e8: b178 cbz r0, 800790a <netconn_drain+0x4a>
- while (sys_mbox_tryfetch(&conn->recvmbox, &mem) != SYS_MBOX_EMPTY) {
- 80078ea: a901 add r1, sp, #4
- 80078ec: 4628 mov r0, r5
- 80078ee: f005 fb2d bl 800cf4c <sys_arch_mbox_tryfetch>
- 80078f2: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff
- 80078f6: d00c beq.n 8007912 <netconn_drain+0x52>
- if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) {
- 80078f8: 7823 ldrb r3, [r4, #0]
- 80078fa: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 80078fe: 2b10 cmp r3, #16
- 8007900: d0ed beq.n 80078de <netconn_drain+0x1e>
- netbuf_delete((struct netbuf *)mem);
- 8007902: 9801 ldr r0, [sp, #4]
- 8007904: f003 fece bl 800b6a4 <netbuf_delete>
- 8007908: e7ef b.n 80078ea <netconn_drain+0x2a>
- pbuf_free((struct pbuf *)mem);
- 800790a: 9801 ldr r0, [sp, #4]
- 800790c: f004 fa48 bl 800bda0 <pbuf_free>
- 8007910: e7eb b.n 80078ea <netconn_drain+0x2a>
- sys_mbox_free(&conn->recvmbox);
- 8007912: 4628 mov r0, r5
- 8007914: f005 fae0 bl 800ced8 <sys_mbox_free>
- sys_mbox_set_invalid(&conn->recvmbox);
- 8007918: 4628 mov r0, r5
- 800791a: f005 fb28 bl 800cf6e <sys_mbox_set_invalid>
- 800791e: e7d8 b.n 80078d2 <netconn_drain+0x12>
- netconn_free(newconn);
- 8007920: 4628 mov r0, r5
- 8007922: f7ff ff91 bl 8007848 <netconn_free>
- while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) {
- 8007926: a901 add r1, sp, #4
- 8007928: 4620 mov r0, r4
- 800792a: f005 fb0f bl 800cf4c <sys_arch_mbox_tryfetch>
- 800792e: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff
- 8007932: d012 beq.n 800795a <netconn_drain+0x9a>
- if (!lwip_netconn_is_err_msg(mem, &err)) {
- 8007934: f10d 0103 add.w r1, sp, #3
- 8007938: 9801 ldr r0, [sp, #4]
- 800793a: f7ff ff01 bl 8007740 <lwip_netconn_is_err_msg>
- 800793e: 2800 cmp r0, #0
- 8007940: d1f1 bne.n 8007926 <netconn_drain+0x66>
- struct netconn *newconn = (struct netconn *)mem;
- 8007942: 9d01 ldr r5, [sp, #4]
- netconn_drain(newconn);
- 8007944: 4628 mov r0, r5
- 8007946: f7ff ffbb bl 80078c0 <netconn_drain>
- if (newconn->pcb.tcp != NULL) {
- 800794a: 6868 ldr r0, [r5, #4]
- 800794c: 2800 cmp r0, #0
- 800794e: d0e7 beq.n 8007920 <netconn_drain+0x60>
- tcp_abort(newconn->pcb.tcp);
- 8007950: f006 f802 bl 800d958 <tcp_abort>
- newconn->pcb.tcp = NULL;
- 8007954: 2300 movs r3, #0
- 8007956: 606b str r3, [r5, #4]
- 8007958: e7e2 b.n 8007920 <netconn_drain+0x60>
- sys_mbox_free(&conn->acceptmbox);
- 800795a: 4620 mov r0, r4
- 800795c: f005 fabc bl 800ced8 <sys_mbox_free>
- sys_mbox_set_invalid(&conn->acceptmbox);
- 8007960: 4620 mov r0, r4
- 8007962: f005 fb04 bl 800cf6e <sys_mbox_set_invalid>
- }
- 8007966: b003 add sp, #12
- 8007968: bd30 pop {r4, r5, pc}
- ...
- 0800796c <lwip_netconn_do_delconn>:
- {
- 800796c: b538 push {r3, r4, r5, lr}
- 800796e: 4604 mov r4, r0
- enum netconn_state state = msg->conn->state;
- 8007970: 6803 ldr r3, [r0, #0]
- 8007972: 785d ldrb r5, [r3, #1]
- LWIP_ASSERT("netconn state error", /* this only happens for TCP netconns */
- 8007974: b125 cbz r5, 8007980 <lwip_netconn_do_delconn+0x14>
- 8007976: 781b ldrb r3, [r3, #0]
- 8007978: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 800797c: 2b10 cmp r3, #16
- 800797e: d10c bne.n 800799a <lwip_netconn_do_delconn+0x2e>
- if (((state != NETCONN_NONE) &&
- 8007980: 2d00 cmp r5, #0
- 8007982: bf18 it ne
- 8007984: 2d02 cmpne r5, #2
- 8007986: d016 beq.n 80079b6 <lwip_netconn_do_delconn+0x4a>
- (state != NETCONN_LISTEN) &&
- 8007988: 2d03 cmp r5, #3
- 800798a: d00e beq.n 80079aa <lwip_netconn_do_delconn+0x3e>
- msg->err = ERR_INPROGRESS;
- 800798c: 23fb movs r3, #251 @ 0xfb
- 800798e: 7123 strb r3, [r4, #4]
- if (sys_sem_valid(LWIP_API_MSG_SEM(msg))) {
- 8007990: 6820 ldr r0, [r4, #0]
- 8007992: 300c adds r0, #12
- 8007994: f005 fb2b bl 800cfee <sys_sem_valid>
- }
- 8007998: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("netconn state error", /* this only happens for TCP netconns */
- 800799a: 4b3d ldr r3, [pc, #244] @ (8007a90 <lwip_netconn_do_delconn+0x124>)
- 800799c: f240 425e movw r2, #1118 @ 0x45e
- 80079a0: 493c ldr r1, [pc, #240] @ (8007a94 <lwip_netconn_do_delconn+0x128>)
- 80079a2: 483d ldr r0, [pc, #244] @ (8007a98 <lwip_netconn_do_delconn+0x12c>)
- 80079a4: f00b fd30 bl 8013408 <iprintf>
- 80079a8: e7ea b.n 8007980 <lwip_netconn_do_delconn+0x14>
- ((state == NETCONN_CONNECT) && !IN_NONBLOCKING_CONNECT(msg->conn))) {
- 80079aa: 6823 ldr r3, [r4, #0]
- 80079ac: f893 3028 ldrb.w r3, [r3, #40] @ 0x28
- 80079b0: f013 0f04 tst.w r3, #4
- 80079b4: d0ea beq.n 800798c <lwip_netconn_do_delconn+0x20>
- LWIP_ASSERT("blocking connect in progress",
- 80079b6: 2d03 cmp r5, #3
- 80079b8: d025 beq.n 8007a06 <lwip_netconn_do_delconn+0x9a>
- msg->err = ERR_OK;
- 80079ba: 2300 movs r3, #0
- 80079bc: 7123 strb r3, [r4, #4]
- netconn_drain(msg->conn);
- 80079be: 6820 ldr r0, [r4, #0]
- 80079c0: f7ff ff7e bl 80078c0 <netconn_drain>
- if (msg->conn->pcb.tcp != NULL) {
- 80079c4: 6822 ldr r2, [r4, #0]
- 80079c6: 6851 ldr r1, [r2, #4]
- 80079c8: b179 cbz r1, 80079ea <lwip_netconn_do_delconn+0x7e>
- switch (NETCONNTYPE_GROUP(msg->conn->type)) {
- 80079ca: 7813 ldrb r3, [r2, #0]
- 80079cc: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 80079d0: 2b10 cmp r3, #16
- 80079d2: d026 beq.n 8007a22 <lwip_netconn_do_delconn+0xb6>
- 80079d4: 2b20 cmp r3, #32
- 80079d6: d105 bne.n 80079e4 <lwip_netconn_do_delconn+0x78>
- msg->conn->pcb.udp->recv_arg = NULL;
- 80079d8: 2300 movs r3, #0
- 80079da: 61cb str r3, [r1, #28]
- udp_remove(msg->conn->pcb.udp);
- 80079dc: 6823 ldr r3, [r4, #0]
- 80079de: 6858 ldr r0, [r3, #4]
- 80079e0: f00a fa54 bl 8011e8c <udp_remove>
- msg->conn->pcb.tcp = NULL;
- 80079e4: 6823 ldr r3, [r4, #0]
- 80079e6: 2200 movs r2, #0
- 80079e8: 605a str r2, [r3, #4]
- API_EVENT(msg->conn, NETCONN_EVT_RCVPLUS, 0);
- 80079ea: 6820 ldr r0, [r4, #0]
- 80079ec: 6b03 ldr r3, [r0, #48] @ 0x30
- 80079ee: b113 cbz r3, 80079f6 <lwip_netconn_do_delconn+0x8a>
- 80079f0: 2200 movs r2, #0
- 80079f2: 4611 mov r1, r2
- 80079f4: 4798 blx r3
- API_EVENT(msg->conn, NETCONN_EVT_SENDPLUS, 0);
- 80079f6: 6820 ldr r0, [r4, #0]
- 80079f8: 6b03 ldr r3, [r0, #48] @ 0x30
- 80079fa: 2b00 cmp r3, #0
- 80079fc: d0c8 beq.n 8007990 <lwip_netconn_do_delconn+0x24>
- 80079fe: 2200 movs r2, #0
- 8007a00: 2102 movs r1, #2
- 8007a02: 4798 blx r3
- 8007a04: e7c4 b.n 8007990 <lwip_netconn_do_delconn+0x24>
- LWIP_ASSERT("blocking connect in progress",
- 8007a06: 6823 ldr r3, [r4, #0]
- 8007a08: f893 3028 ldrb.w r3, [r3, #40] @ 0x28
- 8007a0c: f013 0f04 tst.w r3, #4
- 8007a10: d1d3 bne.n 80079ba <lwip_netconn_do_delconn+0x4e>
- 8007a12: 4b1f ldr r3, [pc, #124] @ (8007a90 <lwip_netconn_do_delconn+0x124>)
- 8007a14: f240 427a movw r2, #1146 @ 0x47a
- 8007a18: 4920 ldr r1, [pc, #128] @ (8007a9c <lwip_netconn_do_delconn+0x130>)
- 8007a1a: 481f ldr r0, [pc, #124] @ (8007a98 <lwip_netconn_do_delconn+0x12c>)
- 8007a1c: f00b fcf4 bl 8013408 <iprintf>
- 8007a20: e7cb b.n 80079ba <lwip_netconn_do_delconn+0x4e>
- LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL);
- 8007a22: 6ad3 ldr r3, [r2, #44] @ 0x2c
- 8007a24: b133 cbz r3, 8007a34 <lwip_netconn_do_delconn+0xc8>
- 8007a26: 4b1a ldr r3, [pc, #104] @ (8007a90 <lwip_netconn_do_delconn+0x124>)
- 8007a28: f240 4294 movw r2, #1172 @ 0x494
- 8007a2c: 491c ldr r1, [pc, #112] @ (8007aa0 <lwip_netconn_do_delconn+0x134>)
- 8007a2e: 481a ldr r0, [pc, #104] @ (8007a98 <lwip_netconn_do_delconn+0x12c>)
- 8007a30: f00b fcea bl 8013408 <iprintf>
- msg->conn->state = NETCONN_CLOSE;
- 8007a34: 6823 ldr r3, [r4, #0]
- 8007a36: 2204 movs r2, #4
- 8007a38: 705a strb r2, [r3, #1]
- msg->msg.sd.shut = NETCONN_SHUT_RDWR;
- 8007a3a: 2303 movs r3, #3
- 8007a3c: 7223 strb r3, [r4, #8]
- msg->conn->current_msg = msg;
- 8007a3e: 6823 ldr r3, [r4, #0]
- 8007a40: 62dc str r4, [r3, #44] @ 0x2c
- if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) {
- 8007a42: 2100 movs r1, #0
- 8007a44: 6820 ldr r0, [r4, #0]
- 8007a46: f7ff fc81 bl 800734c <lwip_netconn_do_close_internal>
- 8007a4a: 2800 cmp r0, #0
- 8007a4c: d0a4 beq.n 8007998 <lwip_netconn_do_delconn+0x2c>
- LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE);
- 8007a4e: 6823 ldr r3, [r4, #0]
- 8007a50: 785b ldrb r3, [r3, #1]
- 8007a52: 2b04 cmp r3, #4
- 8007a54: d114 bne.n 8007a80 <lwip_netconn_do_delconn+0x114>
- UNLOCK_TCPIP_CORE();
- 8007a56: f7fc f84d bl 8003af4 <sys_unlock_tcpip_core>
- sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0);
- 8007a5a: 6820 ldr r0, [r4, #0]
- 8007a5c: 2100 movs r1, #0
- 8007a5e: 300c adds r0, #12
- 8007a60: f005 fa9d bl 800cf9e <sys_arch_sem_wait>
- LOCK_TCPIP_CORE();
- 8007a64: f7fc f838 bl 8003ad8 <sys_lock_tcpip_core>
- LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE);
- 8007a68: 6823 ldr r3, [r4, #0]
- 8007a6a: 785b ldrb r3, [r3, #1]
- 8007a6c: 2b00 cmp r3, #0
- 8007a6e: d093 beq.n 8007998 <lwip_netconn_do_delconn+0x2c>
- 8007a70: 4b07 ldr r3, [pc, #28] @ (8007a90 <lwip_netconn_do_delconn+0x124>)
- 8007a72: f240 429e movw r2, #1182 @ 0x49e
- 8007a76: 490b ldr r1, [pc, #44] @ (8007aa4 <lwip_netconn_do_delconn+0x138>)
- 8007a78: 4807 ldr r0, [pc, #28] @ (8007a98 <lwip_netconn_do_delconn+0x12c>)
- 8007a7a: f00b fcc5 bl 8013408 <iprintf>
- return;
- 8007a7e: e78b b.n 8007998 <lwip_netconn_do_delconn+0x2c>
- LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE);
- 8007a80: 4b03 ldr r3, [pc, #12] @ (8007a90 <lwip_netconn_do_delconn+0x124>)
- 8007a82: f240 429a movw r2, #1178 @ 0x49a
- 8007a86: 4907 ldr r1, [pc, #28] @ (8007aa4 <lwip_netconn_do_delconn+0x138>)
- 8007a88: 4803 ldr r0, [pc, #12] @ (8007a98 <lwip_netconn_do_delconn+0x12c>)
- 8007a8a: f00b fcbd bl 8013408 <iprintf>
- 8007a8e: e7e2 b.n 8007a56 <lwip_netconn_do_delconn+0xea>
- 8007a90: 0801491c .word 0x0801491c
- 8007a94: 08014d98 .word 0x08014d98
- 8007a98: 080144e8 .word 0x080144e8
- 8007a9c: 08014dac .word 0x08014dac
- 8007aa0: 08014dcc .word 0x08014dcc
- 8007aa4: 08014de8 .word 0x08014de8
- 08007aa8 <lwip_netconn_do_connect>:
- {
- 8007aa8: b510 push {r4, lr}
- 8007aaa: 4604 mov r4, r0
- if (msg->conn->pcb.tcp == NULL) {
- 8007aac: 6802 ldr r2, [r0, #0]
- 8007aae: 6850 ldr r0, [r2, #4]
- 8007ab0: 2800 cmp r0, #0
- 8007ab2: d066 beq.n 8007b82 <lwip_netconn_do_connect+0xda>
- switch (NETCONNTYPE_GROUP(msg->conn->type)) {
- 8007ab4: 7813 ldrb r3, [r2, #0]
- 8007ab6: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 8007aba: 2b10 cmp r3, #16
- 8007abc: d006 beq.n 8007acc <lwip_netconn_do_connect+0x24>
- 8007abe: 2b20 cmp r3, #32
- 8007ac0: d155 bne.n 8007b6e <lwip_netconn_do_connect+0xc6>
- err = udp_connect(msg->conn->pcb.udp, API_EXPR_REF(msg->msg.bc.ipaddr), msg->msg.bc.port);
- 8007ac2: 89a2 ldrh r2, [r4, #12]
- 8007ac4: 68a1 ldr r1, [r4, #8]
- 8007ac6: f00a f967 bl 8011d98 <udp_connect>
- break;
- 8007aca: e05c b.n 8007b86 <lwip_netconn_do_connect+0xde>
- if (msg->conn->state == NETCONN_CONNECT) {
- 8007acc: 7853 ldrb r3, [r2, #1]
- 8007ace: 2b03 cmp r3, #3
- 8007ad0: d05b beq.n 8007b8a <lwip_netconn_do_connect+0xe2>
- } else if (msg->conn->state != NETCONN_NONE) {
- 8007ad2: b113 cbz r3, 8007ada <lwip_netconn_do_connect+0x32>
- err = ERR_ISCONN;
- 8007ad4: f06f 0009 mvn.w r0, #9
- 8007ad8: e055 b.n 8007b86 <lwip_netconn_do_connect+0xde>
- setup_tcp(msg->conn);
- 8007ada: 4610 mov r0, r2
- 8007adc: f7ff f97c bl 8006dd8 <setup_tcp>
- err = tcp_connect(msg->conn->pcb.tcp, API_EXPR_REF(msg->msg.bc.ipaddr),
- 8007ae0: 6820 ldr r0, [r4, #0]
- 8007ae2: 4b2b ldr r3, [pc, #172] @ (8007b90 <lwip_netconn_do_connect+0xe8>)
- 8007ae4: 89a2 ldrh r2, [r4, #12]
- 8007ae6: 68a1 ldr r1, [r4, #8]
- 8007ae8: 6840 ldr r0, [r0, #4]
- 8007aea: f005 fd61 bl 800d5b0 <tcp_connect>
- if (err == ERR_OK) {
- 8007aee: 2800 cmp r0, #0
- 8007af0: d149 bne.n 8007b86 <lwip_netconn_do_connect+0xde>
- u8_t non_blocking = netconn_is_nonblocking(msg->conn);
- 8007af2: 6822 ldr r2, [r4, #0]
- 8007af4: f892 3028 ldrb.w r3, [r2, #40] @ 0x28
- msg->conn->state = NETCONN_CONNECT;
- 8007af8: 2103 movs r1, #3
- 8007afa: 7051 strb r1, [r2, #1]
- SET_NONBLOCKING_CONNECT(msg->conn, non_blocking);
- 8007afc: f013 0302 ands.w r3, r3, #2
- 8007b00: d00a beq.n 8007b18 <lwip_netconn_do_connect+0x70>
- 8007b02: 6821 ldr r1, [r4, #0]
- 8007b04: f891 2028 ldrb.w r2, [r1, #40] @ 0x28
- 8007b08: f042 0204 orr.w r2, r2, #4
- 8007b0c: f881 2028 strb.w r2, [r1, #40] @ 0x28
- if (non_blocking) {
- 8007b10: b153 cbz r3, 8007b28 <lwip_netconn_do_connect+0x80>
- err = ERR_INPROGRESS;
- 8007b12: f06f 0004 mvn.w r0, #4
- 8007b16: e036 b.n 8007b86 <lwip_netconn_do_connect+0xde>
- SET_NONBLOCKING_CONNECT(msg->conn, non_blocking);
- 8007b18: 6821 ldr r1, [r4, #0]
- 8007b1a: f891 2028 ldrb.w r2, [r1, #40] @ 0x28
- 8007b1e: f002 02fb and.w r2, r2, #251 @ 0xfb
- 8007b22: f881 2028 strb.w r2, [r1, #40] @ 0x28
- 8007b26: e7f3 b.n 8007b10 <lwip_netconn_do_connect+0x68>
- msg->conn->current_msg = msg;
- 8007b28: 6823 ldr r3, [r4, #0]
- 8007b2a: 62dc str r4, [r3, #44] @ 0x2c
- LWIP_ASSERT("state!", msg->conn->state == NETCONN_CONNECT);
- 8007b2c: 6823 ldr r3, [r4, #0]
- 8007b2e: 785b ldrb r3, [r3, #1]
- 8007b30: 2b03 cmp r3, #3
- 8007b32: d114 bne.n 8007b5e <lwip_netconn_do_connect+0xb6>
- UNLOCK_TCPIP_CORE();
- 8007b34: f7fb ffde bl 8003af4 <sys_unlock_tcpip_core>
- sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0);
- 8007b38: 6820 ldr r0, [r4, #0]
- 8007b3a: 2100 movs r1, #0
- 8007b3c: 300c adds r0, #12
- 8007b3e: f005 fa2e bl 800cf9e <sys_arch_sem_wait>
- LOCK_TCPIP_CORE();
- 8007b42: f7fb ffc9 bl 8003ad8 <sys_lock_tcpip_core>
- LWIP_ASSERT("state!", msg->conn->state != NETCONN_CONNECT);
- 8007b46: 6823 ldr r3, [r4, #0]
- 8007b48: 785b ldrb r3, [r3, #1]
- 8007b4a: 2b03 cmp r3, #3
- 8007b4c: d11c bne.n 8007b88 <lwip_netconn_do_connect+0xe0>
- 8007b4e: 4b11 ldr r3, [pc, #68] @ (8007b94 <lwip_netconn_do_connect+0xec>)
- 8007b50: f240 5274 movw r2, #1396 @ 0x574
- 8007b54: 4910 ldr r1, [pc, #64] @ (8007b98 <lwip_netconn_do_connect+0xf0>)
- 8007b56: 4811 ldr r0, [pc, #68] @ (8007b9c <lwip_netconn_do_connect+0xf4>)
- 8007b58: f00b fc56 bl 8013408 <iprintf>
- return;
- 8007b5c: e014 b.n 8007b88 <lwip_netconn_do_connect+0xe0>
- LWIP_ASSERT("state!", msg->conn->state == NETCONN_CONNECT);
- 8007b5e: 4b0d ldr r3, [pc, #52] @ (8007b94 <lwip_netconn_do_connect+0xec>)
- 8007b60: f44f 62ae mov.w r2, #1392 @ 0x570
- 8007b64: 490c ldr r1, [pc, #48] @ (8007b98 <lwip_netconn_do_connect+0xf0>)
- 8007b66: 480d ldr r0, [pc, #52] @ (8007b9c <lwip_netconn_do_connect+0xf4>)
- 8007b68: f00b fc4e bl 8013408 <iprintf>
- 8007b6c: e7e2 b.n 8007b34 <lwip_netconn_do_connect+0x8c>
- LWIP_ERROR("Invalid netconn type", 0, do {
- 8007b6e: 4b09 ldr r3, [pc, #36] @ (8007b94 <lwip_netconn_do_connect+0xec>)
- 8007b70: f240 527d movw r2, #1405 @ 0x57d
- 8007b74: 490a ldr r1, [pc, #40] @ (8007ba0 <lwip_netconn_do_connect+0xf8>)
- 8007b76: 4809 ldr r0, [pc, #36] @ (8007b9c <lwip_netconn_do_connect+0xf4>)
- 8007b78: f00b fc46 bl 8013408 <iprintf>
- 8007b7c: f06f 0005 mvn.w r0, #5
- break;
- 8007b80: e001 b.n 8007b86 <lwip_netconn_do_connect+0xde>
- err = ERR_CLSD;
- 8007b82: f06f 000e mvn.w r0, #14
- msg->err = err;
- 8007b86: 7120 strb r0, [r4, #4]
- }
- 8007b88: bd10 pop {r4, pc}
- err = ERR_ALREADY;
- 8007b8a: f06f 0008 mvn.w r0, #8
- 8007b8e: e7fa b.n 8007b86 <lwip_netconn_do_connect+0xde>
- 8007b90: 08006fcd .word 0x08006fcd
- 8007b94: 0801491c .word 0x0801491c
- 8007b98: 08014de8 .word 0x08014de8
- 8007b9c: 080144e8 .word 0x080144e8
- 8007ba0: 08014df0 .word 0x08014df0
- 08007ba4 <lwip_netconn_do_disconnect>:
- {
- 8007ba4: b510 push {r4, lr}
- 8007ba6: 4604 mov r4, r0
- if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) {
- 8007ba8: 6802 ldr r2, [r0, #0]
- 8007baa: 7813 ldrb r3, [r2, #0]
- 8007bac: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 8007bb0: 2b20 cmp r3, #32
- 8007bb2: d002 beq.n 8007bba <lwip_netconn_do_disconnect+0x16>
- msg->err = ERR_VAL;
- 8007bb4: 23fa movs r3, #250 @ 0xfa
- 8007bb6: 7103 strb r3, [r0, #4]
- }
- 8007bb8: bd10 pop {r4, pc}
- udp_disconnect(msg->conn->pcb.udp);
- 8007bba: 6850 ldr r0, [r2, #4]
- 8007bbc: f00a f932 bl 8011e24 <udp_disconnect>
- msg->err = ERR_OK;
- 8007bc0: 2300 movs r3, #0
- 8007bc2: 7123 strb r3, [r4, #4]
- 8007bc4: e7f8 b.n 8007bb8 <lwip_netconn_do_disconnect+0x14>
- 08007bc6 <lwip_netconn_do_send>:
- {
- 8007bc6: b510 push {r4, lr}
- 8007bc8: 4604 mov r4, r0
- err_t err = netconn_err(msg->conn);
- 8007bca: 6800 ldr r0, [r0, #0]
- 8007bcc: f7fe ff33 bl 8006a36 <netconn_err>
- if (err == ERR_OK) {
- 8007bd0: 4603 mov r3, r0
- 8007bd2: b948 cbnz r0, 8007be8 <lwip_netconn_do_send+0x22>
- if (msg->conn->pcb.tcp != NULL) {
- 8007bd4: 6823 ldr r3, [r4, #0]
- 8007bd6: 6858 ldr r0, [r3, #4]
- 8007bd8: b1c0 cbz r0, 8007c0c <lwip_netconn_do_send+0x46>
- switch (NETCONNTYPE_GROUP(msg->conn->type)) {
- 8007bda: 781b ldrb r3, [r3, #0]
- 8007bdc: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 8007be0: 2b20 cmp r3, #32
- 8007be2: d003 beq.n 8007bec <lwip_netconn_do_send+0x26>
- err = ERR_CONN;
- 8007be4: f06f 030a mvn.w r3, #10
- msg->err = err;
- 8007be8: 7123 strb r3, [r4, #4]
- }
- 8007bea: bd10 pop {r4, pc}
- if (ip_addr_isany_val(msg->msg.b->addr) || IP_IS_ANY_TYPE_VAL(msg->msg.b->addr)) {
- 8007bec: 68a1 ldr r1, [r4, #8]
- 8007bee: 688b ldr r3, [r1, #8]
- 8007bf0: b923 cbnz r3, 8007bfc <lwip_netconn_do_send+0x36>
- err = udp_send(msg->conn->pcb.udp, msg->msg.b->p);
- 8007bf2: 6809 ldr r1, [r1, #0]
- 8007bf4: f00a f8ac bl 8011d50 <udp_send>
- 8007bf8: 4603 mov r3, r0
- 8007bfa: e7f5 b.n 8007be8 <lwip_netconn_do_send+0x22>
- err = udp_sendto(msg->conn->pcb.udp, msg->msg.b->p, &msg->msg.b->addr, msg->msg.b->port);
- 8007bfc: 898b ldrh r3, [r1, #12]
- 8007bfe: f101 0208 add.w r2, r1, #8
- 8007c02: 6809 ldr r1, [r1, #0]
- 8007c04: f00a f85e bl 8011cc4 <udp_sendto>
- 8007c08: 4603 mov r3, r0
- 8007c0a: e7ed b.n 8007be8 <lwip_netconn_do_send+0x22>
- err = ERR_CONN;
- 8007c0c: f06f 030a mvn.w r3, #10
- 8007c10: e7ea b.n 8007be8 <lwip_netconn_do_send+0x22>
- 08007c12 <lwip_netconn_do_recv>:
- msg->err = ERR_OK;
- 8007c12: 2300 movs r3, #0
- 8007c14: 7103 strb r3, [r0, #4]
- if (msg->conn->pcb.tcp != NULL) {
- 8007c16: 6803 ldr r3, [r0, #0]
- 8007c18: 685a ldr r2, [r3, #4]
- 8007c1a: b1ba cbz r2, 8007c4c <lwip_netconn_do_recv+0x3a>
- {
- 8007c1c: b570 push {r4, r5, r6, lr}
- 8007c1e: 4606 mov r6, r0
- if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) {
- 8007c20: 781b ldrb r3, [r3, #0]
- 8007c22: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 8007c26: 2b10 cmp r3, #16
- 8007c28: d000 beq.n 8007c2c <lwip_netconn_do_recv+0x1a>
- }
- 8007c2a: bd70 pop {r4, r5, r6, pc}
- size_t remaining = msg->msg.r.len;
- 8007c2c: 6884 ldr r4, [r0, #8]
- 8007c2e: e008 b.n 8007c42 <lwip_netconn_do_recv+0x30>
- u16_t recved = (u16_t)((remaining > 0xffff) ? 0xffff : remaining);
- 8007c30: f64f 75ff movw r5, #65535 @ 0xffff
- tcp_recved(msg->conn->pcb.tcp, recved);
- 8007c34: 6833 ldr r3, [r6, #0]
- 8007c36: 4629 mov r1, r5
- 8007c38: 6858 ldr r0, [r3, #4]
- 8007c3a: f005 fb77 bl 800d32c <tcp_recved>
- } while (remaining != 0);
- 8007c3e: 1b64 subs r4, r4, r5
- 8007c40: d0f3 beq.n 8007c2a <lwip_netconn_do_recv+0x18>
- u16_t recved = (u16_t)((remaining > 0xffff) ? 0xffff : remaining);
- 8007c42: f5b4 3f80 cmp.w r4, #65536 @ 0x10000
- 8007c46: d2f3 bcs.n 8007c30 <lwip_netconn_do_recv+0x1e>
- 8007c48: b2a5 uxth r5, r4
- 8007c4a: e7f3 b.n 8007c34 <lwip_netconn_do_recv+0x22>
- 8007c4c: 4770 bx lr
- ...
- 08007c50 <lwip_netconn_do_write>:
- *
- * @param m the api_msg pointing to the connection
- */
- void
- lwip_netconn_do_write(void *m)
- {
- 8007c50: b510 push {r4, lr}
- 8007c52: 4604 mov r4, r0
- struct api_msg *msg = (struct api_msg *)m;
- err_t err = netconn_err(msg->conn);
- 8007c54: 6800 ldr r0, [r0, #0]
- 8007c56: f7fe feee bl 8006a36 <netconn_err>
- if (err == ERR_OK) {
- 8007c5a: 4603 mov r3, r0
- 8007c5c: b938 cbnz r0, 8007c6e <lwip_netconn_do_write+0x1e>
- if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) {
- 8007c5e: 6822 ldr r2, [r4, #0]
- 8007c60: 7813 ldrb r3, [r2, #0]
- 8007c62: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 8007c66: 2b10 cmp r3, #16
- 8007c68: d003 beq.n 8007c72 <lwip_netconn_do_write+0x22>
- #else /* LWIP_TCP */
- err = ERR_VAL;
- #endif /* LWIP_TCP */
- #if (LWIP_UDP || LWIP_RAW)
- } else {
- err = ERR_VAL;
- 8007c6a: f06f 0305 mvn.w r3, #5
- #endif /* (LWIP_UDP || LWIP_RAW) */
- }
- }
- msg->err = err;
- 8007c6e: 7123 strb r3, [r4, #4]
- TCPIP_APIMSG_ACK(msg);
- }
- 8007c70: bd10 pop {r4, pc}
- if (msg->conn->state != NETCONN_NONE) {
- 8007c72: 7853 ldrb r3, [r2, #1]
- 8007c74: 2b00 cmp r3, #0
- 8007c76: d141 bne.n 8007cfc <lwip_netconn_do_write+0xac>
- } else if (msg->conn->pcb.tcp != NULL) {
- 8007c78: 6853 ldr r3, [r2, #4]
- 8007c7a: 2b00 cmp r3, #0
- 8007c7c: d041 beq.n 8007d02 <lwip_netconn_do_write+0xb2>
- msg->conn->state = NETCONN_WRITE;
- 8007c7e: 2301 movs r3, #1
- 8007c80: 7053 strb r3, [r2, #1]
- LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL);
- 8007c82: 6823 ldr r3, [r4, #0]
- 8007c84: 6adb ldr r3, [r3, #44] @ 0x2c
- 8007c86: b133 cbz r3, 8007c96 <lwip_netconn_do_write+0x46>
- 8007c88: 4b1f ldr r3, [pc, #124] @ (8007d08 <lwip_netconn_do_write+0xb8>)
- 8007c8a: f240 7223 movw r2, #1827 @ 0x723
- 8007c8e: 491f ldr r1, [pc, #124] @ (8007d0c <lwip_netconn_do_write+0xbc>)
- 8007c90: 481f ldr r0, [pc, #124] @ (8007d10 <lwip_netconn_do_write+0xc0>)
- 8007c92: f00b fbb9 bl 8013408 <iprintf>
- LWIP_ASSERT("msg->msg.w.len != 0", msg->msg.w.len != 0);
- 8007c96: 6963 ldr r3, [r4, #20]
- 8007c98: b303 cbz r3, 8007cdc <lwip_netconn_do_write+0x8c>
- msg->conn->current_msg = msg;
- 8007c9a: 6823 ldr r3, [r4, #0]
- 8007c9c: 62dc str r4, [r3, #44] @ 0x2c
- if (lwip_netconn_do_writemore(msg->conn, 0) != ERR_OK) {
- 8007c9e: 2100 movs r1, #0
- 8007ca0: 6820 ldr r0, [r4, #0]
- 8007ca2: f7ff fa03 bl 80070ac <lwip_netconn_do_writemore>
- 8007ca6: 2800 cmp r0, #0
- 8007ca8: d0e2 beq.n 8007c70 <lwip_netconn_do_write+0x20>
- LWIP_ASSERT("state!", msg->conn->state == NETCONN_WRITE);
- 8007caa: 6823 ldr r3, [r4, #0]
- 8007cac: 785b ldrb r3, [r3, #1]
- 8007cae: 2b01 cmp r3, #1
- 8007cb0: d11c bne.n 8007cec <lwip_netconn_do_write+0x9c>
- UNLOCK_TCPIP_CORE();
- 8007cb2: f7fb ff1f bl 8003af4 <sys_unlock_tcpip_core>
- sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0);
- 8007cb6: 6820 ldr r0, [r4, #0]
- 8007cb8: 2100 movs r1, #0
- 8007cba: 300c adds r0, #12
- 8007cbc: f005 f96f bl 800cf9e <sys_arch_sem_wait>
- LOCK_TCPIP_CORE();
- 8007cc0: f7fb ff0a bl 8003ad8 <sys_lock_tcpip_core>
- LWIP_ASSERT("state!", msg->conn->state != NETCONN_WRITE);
- 8007cc4: 6823 ldr r3, [r4, #0]
- 8007cc6: 785b ldrb r3, [r3, #1]
- 8007cc8: 2b01 cmp r3, #1
- 8007cca: d1d1 bne.n 8007c70 <lwip_netconn_do_write+0x20>
- 8007ccc: 4b0e ldr r3, [pc, #56] @ (8007d08 <lwip_netconn_do_write+0xb8>)
- 8007cce: f240 722c movw r2, #1836 @ 0x72c
- 8007cd2: 4910 ldr r1, [pc, #64] @ (8007d14 <lwip_netconn_do_write+0xc4>)
- 8007cd4: 480e ldr r0, [pc, #56] @ (8007d10 <lwip_netconn_do_write+0xc0>)
- 8007cd6: f00b fb97 bl 8013408 <iprintf>
- return;
- 8007cda: e7c9 b.n 8007c70 <lwip_netconn_do_write+0x20>
- LWIP_ASSERT("msg->msg.w.len != 0", msg->msg.w.len != 0);
- 8007cdc: 4b0a ldr r3, [pc, #40] @ (8007d08 <lwip_netconn_do_write+0xb8>)
- 8007cde: f240 7224 movw r2, #1828 @ 0x724
- 8007ce2: 490d ldr r1, [pc, #52] @ (8007d18 <lwip_netconn_do_write+0xc8>)
- 8007ce4: 480a ldr r0, [pc, #40] @ (8007d10 <lwip_netconn_do_write+0xc0>)
- 8007ce6: f00b fb8f bl 8013408 <iprintf>
- 8007cea: e7d6 b.n 8007c9a <lwip_netconn_do_write+0x4a>
- LWIP_ASSERT("state!", msg->conn->state == NETCONN_WRITE);
- 8007cec: 4b06 ldr r3, [pc, #24] @ (8007d08 <lwip_netconn_do_write+0xb8>)
- 8007cee: f44f 62e5 mov.w r2, #1832 @ 0x728
- 8007cf2: 4908 ldr r1, [pc, #32] @ (8007d14 <lwip_netconn_do_write+0xc4>)
- 8007cf4: 4806 ldr r0, [pc, #24] @ (8007d10 <lwip_netconn_do_write+0xc0>)
- 8007cf6: f00b fb87 bl 8013408 <iprintf>
- 8007cfa: e7da b.n 8007cb2 <lwip_netconn_do_write+0x62>
- err = ERR_INPROGRESS;
- 8007cfc: f06f 0304 mvn.w r3, #4
- 8007d00: e7b5 b.n 8007c6e <lwip_netconn_do_write+0x1e>
- err = ERR_CONN;
- 8007d02: f06f 030a mvn.w r3, #10
- 8007d06: e7b2 b.n 8007c6e <lwip_netconn_do_write+0x1e>
- 8007d08: 0801491c .word 0x0801491c
- 8007d0c: 08014dcc .word 0x08014dcc
- 8007d10: 080144e8 .word 0x080144e8
- 8007d14: 08014de8 .word 0x08014de8
- 8007d18: 08014e08 .word 0x08014e08
- 08007d1c <lwip_netconn_do_getaddr>:
- *
- * @param m the api_msg pointing to the connection
- */
- void
- lwip_netconn_do_getaddr(void *m)
- {
- 8007d1c: b508 push {r3, lr}
- struct api_msg *msg = (struct api_msg *)m;
- if (msg->conn->pcb.ip != NULL) {
- 8007d1e: 6803 ldr r3, [r0, #0]
- 8007d20: 685b ldr r3, [r3, #4]
- 8007d22: 2b00 cmp r3, #0
- 8007d24: d03f beq.n 8007da6 <lwip_netconn_do_getaddr+0x8a>
- if (msg->msg.ad.local) {
- 8007d26: 7c02 ldrb r2, [r0, #16]
- 8007d28: b19a cbz r2, 8007d52 <lwip_netconn_do_getaddr+0x36>
- ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr),
- 8007d2a: 6882 ldr r2, [r0, #8]
- 8007d2c: 681b ldr r3, [r3, #0]
- 8007d2e: 6013 str r3, [r2, #0]
- } else {
- ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr),
- msg->conn->pcb.ip->remote_ip);
- }
- msg->err = ERR_OK;
- 8007d30: 2300 movs r3, #0
- 8007d32: 7103 strb r3, [r0, #4]
- switch (NETCONNTYPE_GROUP(msg->conn->type)) {
- 8007d34: 6802 ldr r2, [r0, #0]
- 8007d36: 7813 ldrb r3, [r2, #0]
- 8007d38: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 8007d3c: 2b10 cmp r3, #16
- 8007d3e: d018 beq.n 8007d72 <lwip_netconn_do_getaddr+0x56>
- 8007d40: 2b20 cmp r3, #32
- 8007d42: d128 bne.n 8007d96 <lwip_netconn_do_getaddr+0x7a>
- }
- break;
- #endif /* LWIP_RAW */
- #if LWIP_UDP
- case NETCONN_UDP:
- if (msg->msg.ad.local) {
- 8007d44: 7c03 ldrb r3, [r0, #16]
- 8007d46: b143 cbz r3, 8007d5a <lwip_netconn_do_getaddr+0x3e>
- API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->local_port;
- 8007d48: 6852 ldr r2, [r2, #4]
- 8007d4a: 68c3 ldr r3, [r0, #12]
- 8007d4c: 8a52 ldrh r2, [r2, #18]
- 8007d4e: 801a strh r2, [r3, #0]
- 8007d50: e02b b.n 8007daa <lwip_netconn_do_getaddr+0x8e>
- ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr),
- 8007d52: 6882 ldr r2, [r0, #8]
- 8007d54: 685b ldr r3, [r3, #4]
- 8007d56: 6013 str r3, [r2, #0]
- 8007d58: e7ea b.n 8007d30 <lwip_netconn_do_getaddr+0x14>
- } else {
- if ((msg->conn->pcb.udp->flags & UDP_FLAGS_CONNECTED) == 0) {
- 8007d5a: 6853 ldr r3, [r2, #4]
- 8007d5c: 7c1a ldrb r2, [r3, #16]
- 8007d5e: f012 0f04 tst.w r2, #4
- 8007d62: d102 bne.n 8007d6a <lwip_netconn_do_getaddr+0x4e>
- msg->err = ERR_CONN;
- 8007d64: 23f5 movs r3, #245 @ 0xf5
- 8007d66: 7103 strb r3, [r0, #4]
- 8007d68: e01f b.n 8007daa <lwip_netconn_do_getaddr+0x8e>
- } else {
- API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->remote_port;
- 8007d6a: 68c2 ldr r2, [r0, #12]
- 8007d6c: 8a9b ldrh r3, [r3, #20]
- 8007d6e: 8013 strh r3, [r2, #0]
- 8007d70: e01b b.n 8007daa <lwip_netconn_do_getaddr+0x8e>
- }
- break;
- #endif /* LWIP_UDP */
- #if LWIP_TCP
- case NETCONN_TCP:
- if ((msg->msg.ad.local == 0) &&
- 8007d72: 7c03 ldrb r3, [r0, #16]
- 8007d74: b91b cbnz r3, 8007d7e <lwip_netconn_do_getaddr+0x62>
- ((msg->conn->pcb.tcp->state == CLOSED) || (msg->conn->pcb.tcp->state == LISTEN))) {
- 8007d76: 6851 ldr r1, [r2, #4]
- 8007d78: 7d09 ldrb r1, [r1, #20]
- if ((msg->msg.ad.local == 0) &&
- 8007d7a: 2901 cmp r1, #1
- 8007d7c: d905 bls.n 8007d8a <lwip_netconn_do_getaddr+0x6e>
- /* pcb is not connected and remote name is requested */
- msg->err = ERR_CONN;
- } else {
- API_EXPR_DEREF(msg->msg.ad.port) = (msg->msg.ad.local ? msg->conn->pcb.tcp->local_port : msg->conn->pcb.tcp->remote_port);
- 8007d7e: b13b cbz r3, 8007d90 <lwip_netconn_do_getaddr+0x74>
- 8007d80: 6853 ldr r3, [r2, #4]
- 8007d82: 8ada ldrh r2, [r3, #22]
- 8007d84: 68c3 ldr r3, [r0, #12]
- 8007d86: 801a strh r2, [r3, #0]
- 8007d88: e00f b.n 8007daa <lwip_netconn_do_getaddr+0x8e>
- msg->err = ERR_CONN;
- 8007d8a: 23f5 movs r3, #245 @ 0xf5
- 8007d8c: 7103 strb r3, [r0, #4]
- 8007d8e: e00c b.n 8007daa <lwip_netconn_do_getaddr+0x8e>
- API_EXPR_DEREF(msg->msg.ad.port) = (msg->msg.ad.local ? msg->conn->pcb.tcp->local_port : msg->conn->pcb.tcp->remote_port);
- 8007d90: 6853 ldr r3, [r2, #4]
- 8007d92: 8b1a ldrh r2, [r3, #24]
- 8007d94: e7f6 b.n 8007d84 <lwip_netconn_do_getaddr+0x68>
- }
- break;
- #endif /* LWIP_TCP */
- default:
- LWIP_ASSERT("invalid netconn_type", 0);
- 8007d96: 4b05 ldr r3, [pc, #20] @ (8007dac <lwip_netconn_do_getaddr+0x90>)
- 8007d98: f240 727d movw r2, #1917 @ 0x77d
- 8007d9c: 4904 ldr r1, [pc, #16] @ (8007db0 <lwip_netconn_do_getaddr+0x94>)
- 8007d9e: 4805 ldr r0, [pc, #20] @ (8007db4 <lwip_netconn_do_getaddr+0x98>)
- 8007da0: f00b fb32 bl 8013408 <iprintf>
- break;
- 8007da4: e001 b.n 8007daa <lwip_netconn_do_getaddr+0x8e>
- }
- } else {
- msg->err = ERR_CONN;
- 8007da6: 23f5 movs r3, #245 @ 0xf5
- 8007da8: 7103 strb r3, [r0, #4]
- }
- TCPIP_APIMSG_ACK(msg);
- }
- 8007daa: bd08 pop {r3, pc}
- 8007dac: 0801491c .word 0x0801491c
- 8007db0: 08014e1c .word 0x08014e1c
- 8007db4: 080144e8 .word 0x080144e8
- 08007db8 <lwip_netconn_do_close>:
- *
- * @param m the api_msg pointing to the connection
- */
- void
- lwip_netconn_do_close(void *m)
- {
- 8007db8: b510 push {r4, lr}
- 8007dba: 4604 mov r4, r0
- struct api_msg *msg = (struct api_msg *)m;
- #if LWIP_TCP
- enum netconn_state state = msg->conn->state;
- 8007dbc: 6800 ldr r0, [r0, #0]
- 8007dbe: 7842 ldrb r2, [r0, #1]
- /* First check if this is a TCP netconn and if it is in a correct state
- (LISTEN doesn't support half shutdown) */
- if ((msg->conn->pcb.tcp != NULL) &&
- 8007dc0: 6843 ldr r3, [r0, #4]
- 8007dc2: b123 cbz r3, 8007dce <lwip_netconn_do_close+0x16>
- (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) &&
- 8007dc4: 7803 ldrb r3, [r0, #0]
- if ((msg->conn->pcb.tcp != NULL) &&
- 8007dc6: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 8007dca: 2b10 cmp r3, #16
- 8007dcc: d002 beq.n 8007dd4 <lwip_netconn_do_close+0x1c>
- return;
- }
- } else
- #endif /* LWIP_TCP */
- {
- msg->err = ERR_CONN;
- 8007dce: 23f5 movs r3, #245 @ 0xf5
- 8007dd0: 7123 strb r3, [r4, #4]
- }
- TCPIP_APIMSG_ACK(msg);
- }
- 8007dd2: bd10 pop {r4, pc}
- ((msg->msg.sd.shut == NETCONN_SHUT_RDWR) || (state != NETCONN_LISTEN))) {
- 8007dd4: 7a23 ldrb r3, [r4, #8]
- (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) &&
- 8007dd6: 2b03 cmp r3, #3
- 8007dd8: d001 beq.n 8007dde <lwip_netconn_do_close+0x26>
- ((msg->msg.sd.shut == NETCONN_SHUT_RDWR) || (state != NETCONN_LISTEN))) {
- 8007dda: 2a02 cmp r2, #2
- 8007ddc: d0f7 beq.n 8007dce <lwip_netconn_do_close+0x16>
- if (state == NETCONN_CONNECT) {
- 8007dde: 2a03 cmp r2, #3
- 8007de0: d004 beq.n 8007dec <lwip_netconn_do_close+0x34>
- } else if (state == NETCONN_WRITE) {
- 8007de2: 2a01 cmp r2, #1
- 8007de4: d105 bne.n 8007df2 <lwip_netconn_do_close+0x3a>
- msg->err = ERR_INPROGRESS;
- 8007de6: 23fb movs r3, #251 @ 0xfb
- 8007de8: 7123 strb r3, [r4, #4]
- 8007dea: e7f2 b.n 8007dd2 <lwip_netconn_do_close+0x1a>
- msg->err = ERR_CONN;
- 8007dec: 23f5 movs r3, #245 @ 0xf5
- 8007dee: 7123 strb r3, [r4, #4]
- 8007df0: e7ef b.n 8007dd2 <lwip_netconn_do_close+0x1a>
- if (msg->msg.sd.shut & NETCONN_SHUT_RD) {
- 8007df2: f013 0f01 tst.w r3, #1
- 8007df6: d12d bne.n 8007e54 <lwip_netconn_do_close+0x9c>
- LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL);
- 8007df8: 6823 ldr r3, [r4, #0]
- 8007dfa: 6adb ldr r3, [r3, #44] @ 0x2c
- 8007dfc: b133 cbz r3, 8007e0c <lwip_netconn_do_close+0x54>
- 8007dfe: 4b1b ldr r3, [pc, #108] @ (8007e6c <lwip_netconn_do_close+0xb4>)
- 8007e00: f240 72bd movw r2, #1981 @ 0x7bd
- 8007e04: 491a ldr r1, [pc, #104] @ (8007e70 <lwip_netconn_do_close+0xb8>)
- 8007e06: 481b ldr r0, [pc, #108] @ (8007e74 <lwip_netconn_do_close+0xbc>)
- 8007e08: f00b fafe bl 8013408 <iprintf>
- msg->conn->state = NETCONN_CLOSE;
- 8007e0c: 6823 ldr r3, [r4, #0]
- 8007e0e: 2204 movs r2, #4
- 8007e10: 705a strb r2, [r3, #1]
- msg->conn->current_msg = msg;
- 8007e12: 6823 ldr r3, [r4, #0]
- 8007e14: 62dc str r4, [r3, #44] @ 0x2c
- if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) {
- 8007e16: 2100 movs r1, #0
- 8007e18: 6820 ldr r0, [r4, #0]
- 8007e1a: f7ff fa97 bl 800734c <lwip_netconn_do_close_internal>
- 8007e1e: 2800 cmp r0, #0
- 8007e20: d0d7 beq.n 8007dd2 <lwip_netconn_do_close+0x1a>
- LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE);
- 8007e22: 6823 ldr r3, [r4, #0]
- 8007e24: 785b ldrb r3, [r3, #1]
- 8007e26: 2b04 cmp r3, #4
- 8007e28: d117 bne.n 8007e5a <lwip_netconn_do_close+0xa2>
- UNLOCK_TCPIP_CORE();
- 8007e2a: f7fb fe63 bl 8003af4 <sys_unlock_tcpip_core>
- sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0);
- 8007e2e: 6820 ldr r0, [r4, #0]
- 8007e30: 2100 movs r1, #0
- 8007e32: 300c adds r0, #12
- 8007e34: f005 f8b3 bl 800cf9e <sys_arch_sem_wait>
- LOCK_TCPIP_CORE();
- 8007e38: f7fb fe4e bl 8003ad8 <sys_lock_tcpip_core>
- LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE);
- 8007e3c: 6823 ldr r3, [r4, #0]
- 8007e3e: 785b ldrb r3, [r3, #1]
- 8007e40: 2b00 cmp r3, #0
- 8007e42: d0c6 beq.n 8007dd2 <lwip_netconn_do_close+0x1a>
- 8007e44: 4b09 ldr r3, [pc, #36] @ (8007e6c <lwip_netconn_do_close+0xb4>)
- 8007e46: f240 72c6 movw r2, #1990 @ 0x7c6
- 8007e4a: 490b ldr r1, [pc, #44] @ (8007e78 <lwip_netconn_do_close+0xc0>)
- 8007e4c: 4809 ldr r0, [pc, #36] @ (8007e74 <lwip_netconn_do_close+0xbc>)
- 8007e4e: f00b fadb bl 8013408 <iprintf>
- return;
- 8007e52: e7be b.n 8007dd2 <lwip_netconn_do_close+0x1a>
- netconn_drain(msg->conn);
- 8007e54: f7ff fd34 bl 80078c0 <netconn_drain>
- 8007e58: e7ce b.n 8007df8 <lwip_netconn_do_close+0x40>
- LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE);
- 8007e5a: 4b04 ldr r3, [pc, #16] @ (8007e6c <lwip_netconn_do_close+0xb4>)
- 8007e5c: f240 72c2 movw r2, #1986 @ 0x7c2
- 8007e60: 4905 ldr r1, [pc, #20] @ (8007e78 <lwip_netconn_do_close+0xc0>)
- 8007e62: 4804 ldr r0, [pc, #16] @ (8007e74 <lwip_netconn_do_close+0xbc>)
- 8007e64: f00b fad0 bl 8013408 <iprintf>
- 8007e68: e7df b.n 8007e2a <lwip_netconn_do_close+0x72>
- 8007e6a: bf00 nop
- 8007e6c: 0801491c .word 0x0801491c
- 8007e70: 08014dcc .word 0x08014dcc
- 8007e74: 080144e8 .word 0x080144e8
- 8007e78: 08014de8 .word 0x08014de8
- 08007e7c <lwip_htons>:
- * @return n in network byte order
- */
- u16_t
- lwip_htons(u16_t n)
- {
- return PP_HTONS(n);
- 8007e7c: 0a03 lsrs r3, r0, #8
- 8007e7e: ea43 2000 orr.w r0, r3, r0, lsl #8
- }
- 8007e82: b280 uxth r0, r0
- 8007e84: 4770 bx lr
- 08007e86 <lwip_htonl>:
- * @return n in network byte order
- */
- u32_t
- lwip_htonl(u32_t n)
- {
- return PP_HTONL(n);
- 8007e86: 0203 lsls r3, r0, #8
- 8007e88: f403 037f and.w r3, r3, #16711680 @ 0xff0000
- 8007e8c: ea43 6300 orr.w r3, r3, r0, lsl #24
- 8007e90: 0a02 lsrs r2, r0, #8
- 8007e92: f402 427f and.w r2, r2, #65280 @ 0xff00
- 8007e96: 4313 orrs r3, r2
- }
- 8007e98: ea43 6010 orr.w r0, r3, r0, lsr #24
- 8007e9c: 4770 bx lr
- 08007e9e <dhcp_set_state>:
- * If the state changed, reset the number of tries.
- */
- static void
- dhcp_set_state(struct dhcp *dhcp, u8_t new_state)
- {
- if (new_state != dhcp->state) {
- 8007e9e: 7943 ldrb r3, [r0, #5]
- 8007ea0: 428b cmp r3, r1
- 8007ea2: d003 beq.n 8007eac <dhcp_set_state+0xe>
- dhcp->state = new_state;
- 8007ea4: 7141 strb r1, [r0, #5]
- dhcp->tries = 0;
- 8007ea6: 2300 movs r3, #0
- 8007ea8: 7183 strb r3, [r0, #6]
- dhcp->request_timeout = 0;
- 8007eaa: 8103 strh r3, [r0, #8]
- }
- }
- 8007eac: 4770 bx lr
- ...
- 08007eb0 <dhcp_option_short>:
- return options_out_len;
- }
- static u16_t
- dhcp_option_short(u16_t options_out_len, u8_t *options, u16_t value)
- {
- 8007eb0: b570 push {r4, r5, r6, lr}
- 8007eb2: 4604 mov r4, r0
- 8007eb4: 460d mov r5, r1
- 8007eb6: 4616 mov r6, r2
- LWIP_ASSERT("dhcp_option_short: options_out_len + 2 <= DHCP_OPTIONS_LEN", options_out_len + 2U <= DHCP_OPTIONS_LEN);
- 8007eb8: 1c83 adds r3, r0, #2
- 8007eba: 2b44 cmp r3, #68 @ 0x44
- 8007ebc: d807 bhi.n 8007ece <dhcp_option_short+0x1e>
- options[options_out_len++] = (u8_t)((value & 0xff00U) >> 8);
- 8007ebe: 1c63 adds r3, r4, #1
- 8007ec0: b29b uxth r3, r3
- 8007ec2: 0a32 lsrs r2, r6, #8
- 8007ec4: 552a strb r2, [r5, r4]
- options[options_out_len++] = (u8_t) (value & 0x00ffU);
- 8007ec6: 1ca0 adds r0, r4, #2
- 8007ec8: 54ee strb r6, [r5, r3]
- return options_out_len;
- }
- 8007eca: b280 uxth r0, r0
- 8007ecc: bd70 pop {r4, r5, r6, pc}
- LWIP_ASSERT("dhcp_option_short: options_out_len + 2 <= DHCP_OPTIONS_LEN", options_out_len + 2U <= DHCP_OPTIONS_LEN);
- 8007ece: 4b04 ldr r3, [pc, #16] @ (8007ee0 <dhcp_option_short+0x30>)
- 8007ed0: f240 52ae movw r2, #1454 @ 0x5ae
- 8007ed4: 4903 ldr r1, [pc, #12] @ (8007ee4 <dhcp_option_short+0x34>)
- 8007ed6: 4804 ldr r0, [pc, #16] @ (8007ee8 <dhcp_option_short+0x38>)
- 8007ed8: f00b fa96 bl 8013408 <iprintf>
- 8007edc: e7ef b.n 8007ebe <dhcp_option_short+0xe>
- 8007ede: bf00 nop
- 8007ee0: 08014e34 .word 0x08014e34
- 8007ee4: 08014e98 .word 0x08014e98
- 8007ee8: 080144e8 .word 0x080144e8
- 08007eec <dhcp_option>:
- {
- 8007eec: b5f8 push {r3, r4, r5, r6, r7, lr}
- 8007eee: 4604 mov r4, r0
- 8007ef0: 460d mov r5, r1
- 8007ef2: 4617 mov r7, r2
- 8007ef4: 461e mov r6, r3
- LWIP_ASSERT("dhcp_option: options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN);
- 8007ef6: 4403 add r3, r0
- 8007ef8: 3302 adds r3, #2
- 8007efa: 2b44 cmp r3, #68 @ 0x44
- 8007efc: d806 bhi.n 8007f0c <dhcp_option+0x20>
- options[options_out_len++] = option_type;
- 8007efe: 1c63 adds r3, r4, #1
- 8007f00: b29b uxth r3, r3
- 8007f02: 552f strb r7, [r5, r4]
- options[options_out_len++] = option_len;
- 8007f04: 1ca0 adds r0, r4, #2
- 8007f06: 54ee strb r6, [r5, r3]
- }
- 8007f08: b280 uxth r0, r0
- 8007f0a: bdf8 pop {r3, r4, r5, r6, r7, pc}
- LWIP_ASSERT("dhcp_option: options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN);
- 8007f0c: 4b03 ldr r3, [pc, #12] @ (8007f1c <dhcp_option+0x30>)
- 8007f0e: f240 529a movw r2, #1434 @ 0x59a
- 8007f12: 4903 ldr r1, [pc, #12] @ (8007f20 <dhcp_option+0x34>)
- 8007f14: 4803 ldr r0, [pc, #12] @ (8007f24 <dhcp_option+0x38>)
- 8007f16: f00b fa77 bl 8013408 <iprintf>
- 8007f1a: e7f0 b.n 8007efe <dhcp_option+0x12>
- 8007f1c: 08014e34 .word 0x08014e34
- 8007f20: 08014ed4 .word 0x08014ed4
- 8007f24: 080144e8 .word 0x080144e8
- 08007f28 <dhcp_option_byte>:
- {
- 8007f28: b570 push {r4, r5, r6, lr}
- 8007f2a: 4604 mov r4, r0
- 8007f2c: 460d mov r5, r1
- 8007f2e: 4616 mov r6, r2
- LWIP_ASSERT("dhcp_option_byte: options_out_len < DHCP_OPTIONS_LEN", options_out_len < DHCP_OPTIONS_LEN);
- 8007f30: 2843 cmp r0, #67 @ 0x43
- 8007f32: d803 bhi.n 8007f3c <dhcp_option_byte+0x14>
- options[options_out_len++] = value;
- 8007f34: 1c60 adds r0, r4, #1
- 8007f36: 552e strb r6, [r5, r4]
- }
- 8007f38: b280 uxth r0, r0
- 8007f3a: bd70 pop {r4, r5, r6, pc}
- LWIP_ASSERT("dhcp_option_byte: options_out_len < DHCP_OPTIONS_LEN", options_out_len < DHCP_OPTIONS_LEN);
- 8007f3c: 4b03 ldr r3, [pc, #12] @ (8007f4c <dhcp_option_byte+0x24>)
- 8007f3e: f240 52a6 movw r2, #1446 @ 0x5a6
- 8007f42: 4903 ldr r1, [pc, #12] @ (8007f50 <dhcp_option_byte+0x28>)
- 8007f44: 4803 ldr r0, [pc, #12] @ (8007f54 <dhcp_option_byte+0x2c>)
- 8007f46: f00b fa5f bl 8013408 <iprintf>
- 8007f4a: e7f3 b.n 8007f34 <dhcp_option_byte+0xc>
- 8007f4c: 08014e34 .word 0x08014e34
- 8007f50: 08014f18 .word 0x08014f18
- 8007f54: 080144e8 .word 0x080144e8
- 08007f58 <dhcp_option_long>:
- static u16_t
- dhcp_option_long(u16_t options_out_len, u8_t *options, u32_t value)
- {
- 8007f58: b570 push {r4, r5, r6, lr}
- 8007f5a: 4604 mov r4, r0
- 8007f5c: 460d mov r5, r1
- 8007f5e: 4616 mov r6, r2
- LWIP_ASSERT("dhcp_option_long: options_out_len + 4 <= DHCP_OPTIONS_LEN", options_out_len + 4U <= DHCP_OPTIONS_LEN);
- 8007f60: 1d03 adds r3, r0, #4
- 8007f62: 2b44 cmp r3, #68 @ 0x44
- 8007f64: d811 bhi.n 8007f8a <dhcp_option_long+0x32>
- options[options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24);
- 8007f66: 1c63 adds r3, r4, #1
- 8007f68: b29b uxth r3, r3
- 8007f6a: 0e32 lsrs r2, r6, #24
- 8007f6c: 552a strb r2, [r5, r4]
- options[options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16);
- 8007f6e: 1ca2 adds r2, r4, #2
- 8007f70: b292 uxth r2, r2
- 8007f72: f3c6 4107 ubfx r1, r6, #16, #8
- 8007f76: 54e9 strb r1, [r5, r3]
- options[options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8);
- 8007f78: 1ce3 adds r3, r4, #3
- 8007f7a: b29b uxth r3, r3
- 8007f7c: f3c6 2107 ubfx r1, r6, #8, #8
- 8007f80: 54a9 strb r1, [r5, r2]
- options[options_out_len++] = (u8_t)((value & 0x000000ffUL));
- 8007f82: 1d20 adds r0, r4, #4
- 8007f84: 54ee strb r6, [r5, r3]
- return options_out_len;
- }
- 8007f86: b280 uxth r0, r0
- 8007f88: bd70 pop {r4, r5, r6, pc}
- LWIP_ASSERT("dhcp_option_long: options_out_len + 4 <= DHCP_OPTIONS_LEN", options_out_len + 4U <= DHCP_OPTIONS_LEN);
- 8007f8a: 4b04 ldr r3, [pc, #16] @ (8007f9c <dhcp_option_long+0x44>)
- 8007f8c: f240 52b7 movw r2, #1463 @ 0x5b7
- 8007f90: 4903 ldr r1, [pc, #12] @ (8007fa0 <dhcp_option_long+0x48>)
- 8007f92: 4804 ldr r0, [pc, #16] @ (8007fa4 <dhcp_option_long+0x4c>)
- 8007f94: f00b fa38 bl 8013408 <iprintf>
- 8007f98: e7e5 b.n 8007f66 <dhcp_option_long+0xe>
- 8007f9a: bf00 nop
- 8007f9c: 08014e34 .word 0x08014e34
- 8007fa0: 08014f50 .word 0x08014f50
- 8007fa4: 080144e8 .word 0x080144e8
- 08007fa8 <dhcp_create_msg>:
- * @param dhcp dhcp control struct
- * @param message_type message type of the request
- */
- static struct pbuf *
- dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type, u16_t *options_out_len)
- {
- 8007fa8: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
- if (!xid_initialised) {
- xid = DHCP_GLOBAL_XID;
- xid_initialised = !xid_initialised;
- }
- #endif
- LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return NULL;);
- 8007fac: 4680 mov r8, r0
- 8007fae: 2800 cmp r0, #0
- 8007fb0: d041 beq.n 8008036 <dhcp_create_msg+0x8e>
- 8007fb2: 4689 mov r9, r1
- 8007fb4: 4615 mov r5, r2
- 8007fb6: 461e mov r6, r3
- LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return NULL;);
- 8007fb8: 2900 cmp r1, #0
- 8007fba: d045 beq.n 8008048 <dhcp_create_msg+0xa0>
- p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM);
- 8007fbc: f44f 7220 mov.w r2, #640 @ 0x280
- 8007fc0: f44f 719a mov.w r1, #308 @ 0x134
- 8007fc4: 2036 movs r0, #54 @ 0x36
- 8007fc6: f003 ff53 bl 800be70 <pbuf_alloc>
- if (p_out == NULL) {
- 8007fca: 4607 mov r7, r0
- 8007fcc: 2800 cmp r0, #0
- 8007fce: d079 beq.n 80080c4 <dhcp_create_msg+0x11c>
- LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS,
- ("dhcp_create_msg(): could not allocate pbuf\n"));
- return NULL;
- }
- LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg",
- 8007fd0: 8943 ldrh r3, [r0, #10]
- 8007fd2: f5b3 7f9a cmp.w r3, #308 @ 0x134
- 8007fd6: d340 bcc.n 800805a <dhcp_create_msg+0xb2>
- (p_out->len >= sizeof(struct dhcp_msg)));
- /* DHCP_REQUEST should reuse 'xid' from DHCPOFFER */
- if ((message_type != DHCP_REQUEST) || (dhcp->state == DHCP_STATE_REBOOTING)) {
- 8007fd8: 2d03 cmp r5, #3
- 8007fda: d046 beq.n 800806a <dhcp_create_msg+0xc2>
- /* reuse transaction identifier in retransmissions */
- if (dhcp->tries == 0) {
- 8007fdc: f899 3006 ldrb.w r3, [r9, #6]
- 8007fe0: 2b00 cmp r3, #0
- 8007fe2: d047 beq.n 8008074 <dhcp_create_msg+0xcc>
- xid = LWIP_RAND();
- #else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */
- xid++;
- #endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */
- }
- dhcp->xid = xid;
- 8007fe4: 4b39 ldr r3, [pc, #228] @ (80080cc <dhcp_create_msg+0x124>)
- 8007fe6: 681b ldr r3, [r3, #0]
- 8007fe8: f8c9 3000 str.w r3, [r9]
- }
- LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE,
- ("transaction id xid(%"X32_F")\n", xid));
- msg_out = (struct dhcp_msg *)p_out->payload;
- 8007fec: 687c ldr r4, [r7, #4]
- memset(msg_out, 0, sizeof(struct dhcp_msg));
- 8007fee: f44f 729a mov.w r2, #308 @ 0x134
- 8007ff2: 2100 movs r1, #0
- 8007ff4: 4620 mov r0, r4
- 8007ff6: f00b fb5f bl 80136b8 <memset>
- msg_out->op = DHCP_BOOTREQUEST;
- 8007ffa: 2301 movs r3, #1
- 8007ffc: 7023 strb r3, [r4, #0]
- /* @todo: make link layer independent */
- msg_out->htype = LWIP_IANA_HWTYPE_ETHERNET;
- 8007ffe: 7063 strb r3, [r4, #1]
- msg_out->hlen = netif->hwaddr_len;
- 8008000: f898 3030 ldrb.w r3, [r8, #48] @ 0x30
- 8008004: 70a3 strb r3, [r4, #2]
- msg_out->xid = lwip_htonl(dhcp->xid);
- 8008006: f8d9 0000 ldr.w r0, [r9]
- 800800a: f7ff ff3c bl 8007e86 <lwip_htonl>
- 800800e: 6060 str r0, [r4, #4]
- /* we don't need the broadcast flag since we can receive unicast traffic
- before being fully configured! */
- /* set ciaddr to netif->ip_addr based on message_type and state */
- if ((message_type == DHCP_INFORM) || (message_type == DHCP_DECLINE) || (message_type == DHCP_RELEASE) ||
- 8008010: 2d04 cmp r5, #4
- 8008012: bf18 it ne
- 8008014: 2d08 cmpne r5, #8
- 8008016: d009 beq.n 800802c <dhcp_create_msg+0x84>
- 8008018: 2d07 cmp r5, #7
- 800801a: d007 beq.n 800802c <dhcp_create_msg+0x84>
- 800801c: 2d03 cmp r5, #3
- 800801e: d108 bne.n 8008032 <dhcp_create_msg+0x8a>
- ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */
- ((dhcp->state == DHCP_STATE_RENEWING) || dhcp->state == DHCP_STATE_REBINDING))) {
- 8008020: f899 3005 ldrb.w r3, [r9, #5]
- 8008024: 3b04 subs r3, #4
- 8008026: b2db uxtb r3, r3
- ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */
- 8008028: 2b01 cmp r3, #1
- 800802a: d802 bhi.n 8008032 <dhcp_create_msg+0x8a>
- ip4_addr_copy(msg_out->ciaddr, *netif_ip4_addr(netif));
- 800802c: f8d8 3004 ldr.w r3, [r8, #4]
- 8008030: 60e3 str r3, [r4, #12]
- {
- 8008032: 2000 movs r0, #0
- 8008034: e02b b.n 800808e <dhcp_create_msg+0xe6>
- LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return NULL;);
- 8008036: 4b26 ldr r3, [pc, #152] @ (80080d0 <dhcp_create_msg+0x128>)
- 8008038: f240 7269 movw r2, #1897 @ 0x769
- 800803c: 4925 ldr r1, [pc, #148] @ (80080d4 <dhcp_create_msg+0x12c>)
- 800803e: 4826 ldr r0, [pc, #152] @ (80080d8 <dhcp_create_msg+0x130>)
- 8008040: f00b f9e2 bl 8013408 <iprintf>
- 8008044: 4647 mov r7, r8
- 8008046: e03d b.n 80080c4 <dhcp_create_msg+0x11c>
- LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return NULL;);
- 8008048: 4b21 ldr r3, [pc, #132] @ (80080d0 <dhcp_create_msg+0x128>)
- 800804a: f240 726a movw r2, #1898 @ 0x76a
- 800804e: 4923 ldr r1, [pc, #140] @ (80080dc <dhcp_create_msg+0x134>)
- 8008050: 4821 ldr r0, [pc, #132] @ (80080d8 <dhcp_create_msg+0x130>)
- 8008052: f00b f9d9 bl 8013408 <iprintf>
- 8008056: 464f mov r7, r9
- 8008058: e034 b.n 80080c4 <dhcp_create_msg+0x11c>
- LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg",
- 800805a: 4b1d ldr r3, [pc, #116] @ (80080d0 <dhcp_create_msg+0x128>)
- 800805c: f240 7271 movw r2, #1905 @ 0x771
- 8008060: 491f ldr r1, [pc, #124] @ (80080e0 <dhcp_create_msg+0x138>)
- 8008062: 481d ldr r0, [pc, #116] @ (80080d8 <dhcp_create_msg+0x130>)
- 8008064: f00b f9d0 bl 8013408 <iprintf>
- 8008068: e7b6 b.n 8007fd8 <dhcp_create_msg+0x30>
- if ((message_type != DHCP_REQUEST) || (dhcp->state == DHCP_STATE_REBOOTING)) {
- 800806a: f899 3005 ldrb.w r3, [r9, #5]
- 800806e: 2b03 cmp r3, #3
- 8008070: d1bc bne.n 8007fec <dhcp_create_msg+0x44>
- 8008072: e7b3 b.n 8007fdc <dhcp_create_msg+0x34>
- xid = LWIP_RAND();
- 8008074: f00b f81c bl 80130b0 <rand>
- 8008078: 4b14 ldr r3, [pc, #80] @ (80080cc <dhcp_create_msg+0x124>)
- 800807a: 6018 str r0, [r3, #0]
- 800807c: e7b2 b.n 8007fe4 <dhcp_create_msg+0x3c>
- }
- for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
- /* copy netif hardware address (padded with zeroes through memset already) */
- msg_out->chaddr[i] = netif->hwaddr[i];
- 800807e: eb08 0300 add.w r3, r8, r0
- 8008082: f893 302a ldrb.w r3, [r3, #42] @ 0x2a
- 8008086: 1821 adds r1, r4, r0
- 8008088: 770b strb r3, [r1, #28]
- for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
- 800808a: 3001 adds r0, #1
- 800808c: b280 uxth r0, r0
- 800808e: 2805 cmp r0, #5
- 8008090: d9f5 bls.n 800807e <dhcp_create_msg+0xd6>
- }
- msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE);
- 8008092: 2363 movs r3, #99 @ 0x63
- 8008094: f884 30ec strb.w r3, [r4, #236] @ 0xec
- 8008098: f06f 027d mvn.w r2, #125 @ 0x7d
- 800809c: f884 20ed strb.w r2, [r4, #237] @ 0xed
- 80080a0: 2253 movs r2, #83 @ 0x53
- 80080a2: f884 20ee strb.w r2, [r4, #238] @ 0xee
- 80080a6: f884 30ef strb.w r3, [r4, #239] @ 0xef
- /* Add option MESSAGE_TYPE */
- options_out_len_loc = dhcp_option(0, msg_out->options, DHCP_OPTION_MESSAGE_TYPE, DHCP_OPTION_MESSAGE_TYPE_LEN);
- 80080aa: 34f0 adds r4, #240 @ 0xf0
- 80080ac: 2301 movs r3, #1
- 80080ae: 2235 movs r2, #53 @ 0x35
- 80080b0: 4621 mov r1, r4
- 80080b2: 2000 movs r0, #0
- 80080b4: f7ff ff1a bl 8007eec <dhcp_option>
- options_out_len_loc = dhcp_option_byte(options_out_len_loc, msg_out->options, message_type);
- 80080b8: 462a mov r2, r5
- 80080ba: 4621 mov r1, r4
- 80080bc: f7ff ff34 bl 8007f28 <dhcp_option_byte>
- if (options_out_len) {
- 80080c0: b106 cbz r6, 80080c4 <dhcp_create_msg+0x11c>
- *options_out_len = options_out_len_loc;
- 80080c2: 8030 strh r0, [r6, #0]
- }
- return p_out;
- }
- 80080c4: 4638 mov r0, r7
- 80080c6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
- 80080ca: bf00 nop
- 80080cc: 24012ef4 .word 0x24012ef4
- 80080d0: 08014e34 .word 0x08014e34
- 80080d4: 08014f8c .word 0x08014f8c
- 80080d8: 080144e8 .word 0x080144e8
- 80080dc: 08014fac .word 0x08014fac
- 80080e0: 08014fcc .word 0x08014fcc
- 080080e4 <dhcp_handle_ack>:
- {
- 80080e4: b510 push {r4, lr}
- struct dhcp *dhcp = netif_dhcp_data(netif);
- 80080e6: 6a44 ldr r4, [r0, #36] @ 0x24
- ip4_addr_set_zero(&dhcp->offered_sn_mask);
- 80080e8: 2300 movs r3, #0
- 80080ea: 6223 str r3, [r4, #32]
- ip4_addr_set_zero(&dhcp->offered_gw_addr);
- 80080ec: 6263 str r3, [r4, #36] @ 0x24
- if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_LEASE_TIME)) {
- 80080ee: 4b1a ldr r3, [pc, #104] @ (8008158 <dhcp_handle_ack+0x74>)
- 80080f0: 78db ldrb r3, [r3, #3]
- 80080f2: b113 cbz r3, 80080fa <dhcp_handle_ack+0x16>
- dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME);
- 80080f4: 4b19 ldr r3, [pc, #100] @ (800815c <dhcp_handle_ack+0x78>)
- 80080f6: 68db ldr r3, [r3, #12]
- 80080f8: 62a3 str r3, [r4, #40] @ 0x28
- if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) {
- 80080fa: 4b17 ldr r3, [pc, #92] @ (8008158 <dhcp_handle_ack+0x74>)
- 80080fc: 791b ldrb r3, [r3, #4]
- 80080fe: b19b cbz r3, 8008128 <dhcp_handle_ack+0x44>
- dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1);
- 8008100: 4b16 ldr r3, [pc, #88] @ (800815c <dhcp_handle_ack+0x78>)
- 8008102: 691b ldr r3, [r3, #16]
- 8008104: 62e3 str r3, [r4, #44] @ 0x2c
- if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) {
- 8008106: 4b14 ldr r3, [pc, #80] @ (8008158 <dhcp_handle_ack+0x74>)
- 8008108: 795b ldrb r3, [r3, #5]
- 800810a: b18b cbz r3, 8008130 <dhcp_handle_ack+0x4c>
- dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2);
- 800810c: 4b13 ldr r3, [pc, #76] @ (800815c <dhcp_handle_ack+0x78>)
- 800810e: 695b ldr r3, [r3, #20]
- 8008110: 6323 str r3, [r4, #48] @ 0x30
- ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr);
- 8008112: 690b ldr r3, [r1, #16]
- 8008114: 61e3 str r3, [r4, #28]
- if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)) {
- 8008116: 4b10 ldr r3, [pc, #64] @ (8008158 <dhcp_handle_ack+0x74>)
- 8008118: 799b ldrb r3, [r3, #6]
- 800811a: b97b cbnz r3, 800813c <dhcp_handle_ack+0x58>
- dhcp->subnet_mask_given = 0;
- 800811c: 2300 movs r3, #0
- 800811e: 71e3 strb r3, [r4, #7]
- if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) {
- 8008120: 4b0d ldr r3, [pc, #52] @ (8008158 <dhcp_handle_ack+0x74>)
- 8008122: 79db ldrb r3, [r3, #7]
- 8008124: b993 cbnz r3, 800814c <dhcp_handle_ack+0x68>
- }
- 8008126: bd10 pop {r4, pc}
- dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2;
- 8008128: 6aa3 ldr r3, [r4, #40] @ 0x28
- 800812a: 085b lsrs r3, r3, #1
- 800812c: 62e3 str r3, [r4, #44] @ 0x2c
- 800812e: e7ea b.n 8008106 <dhcp_handle_ack+0x22>
- dhcp->offered_t2_rebind = (dhcp->offered_t0_lease * 7U) / 8U;
- 8008130: 6aa3 ldr r3, [r4, #40] @ 0x28
- 8008132: ebc3 03c3 rsb r3, r3, r3, lsl #3
- 8008136: 08db lsrs r3, r3, #3
- 8008138: 6323 str r3, [r4, #48] @ 0x30
- 800813a: e7ea b.n 8008112 <dhcp_handle_ack+0x2e>
- ip4_addr_set_u32(&dhcp->offered_sn_mask, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)));
- 800813c: 4b07 ldr r3, [pc, #28] @ (800815c <dhcp_handle_ack+0x78>)
- 800813e: 6998 ldr r0, [r3, #24]
- 8008140: f7ff fea1 bl 8007e86 <lwip_htonl>
- 8008144: 6220 str r0, [r4, #32]
- dhcp->subnet_mask_given = 1;
- 8008146: 2301 movs r3, #1
- 8008148: 71e3 strb r3, [r4, #7]
- 800814a: e7e9 b.n 8008120 <dhcp_handle_ack+0x3c>
- ip4_addr_set_u32(&dhcp->offered_gw_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER)));
- 800814c: 4b03 ldr r3, [pc, #12] @ (800815c <dhcp_handle_ack+0x78>)
- 800814e: 69d8 ldr r0, [r3, #28]
- 8008150: f7ff fe99 bl 8007e86 <lwip_htonl>
- 8008154: 6260 str r0, [r4, #36] @ 0x24
- }
- 8008156: e7e6 b.n 8008126 <dhcp_handle_ack+0x42>
- 8008158: 24012f00 .word 0x24012f00
- 800815c: 24012f08 .word 0x24012f08
- 08008160 <dhcp_option_trailer>:
- * Adds the END option to the DHCP message, and if
- * necessary, up to three padding bytes.
- */
- static void
- dhcp_option_trailer(u16_t options_out_len, u8_t *options, struct pbuf *p_out)
- {
- 8008160: b508 push {r3, lr}
- 8008162: 4684 mov ip, r0
- 8008164: 4610 mov r0, r2
- options[options_out_len++] = DHCP_OPTION_END;
- 8008166: f10c 0301 add.w r3, ip, #1
- 800816a: b29b uxth r3, r3
- 800816c: 22ff movs r2, #255 @ 0xff
- 800816e: f801 200c strb.w r2, [r1, ip]
- /* packet is too small, or not 4 byte aligned? */
- while (((options_out_len < DHCP_MIN_OPTIONS_LEN) || (options_out_len & 3)) &&
- 8008172: e007 b.n 8008184 <dhcp_option_trailer+0x24>
- (options_out_len < DHCP_OPTIONS_LEN)) {
- /* add a fill/padding byte */
- options[options_out_len++] = 0;
- 8008174: f103 0c01 add.w ip, r3, #1
- 8008178: f04f 0e00 mov.w lr, #0
- 800817c: f801 e003 strb.w lr, [r1, r3]
- 8008180: fa1f f38c uxth.w r3, ip
- while (((options_out_len < DHCP_MIN_OPTIONS_LEN) || (options_out_len & 3)) &&
- 8008184: 2b43 cmp r3, #67 @ 0x43
- 8008186: d9f5 bls.n 8008174 <dhcp_option_trailer+0x14>
- }
- /* shrink the pbuf to the actual content length */
- pbuf_realloc(p_out, (u16_t)(sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + options_out_len));
- 8008188: f103 01f0 add.w r1, r3, #240 @ 0xf0
- 800818c: b289 uxth r1, r1
- 800818e: f003 ff1d bl 800bfcc <pbuf_realloc>
- }
- 8008192: bd08 pop {r3, pc}
- 08008194 <dhcp_rebind>:
- {
- 8008194: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8008198: b084 sub sp, #16
- 800819a: 4607 mov r7, r0
- struct dhcp *dhcp = netif_dhcp_data(netif);
- 800819c: 6a45 ldr r5, [r0, #36] @ 0x24
- dhcp_set_state(dhcp, DHCP_STATE_REBINDING);
- 800819e: 2104 movs r1, #4
- 80081a0: 4628 mov r0, r5
- 80081a2: f7ff fe7c bl 8007e9e <dhcp_set_state>
- p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
- 80081a6: f10d 030e add.w r3, sp, #14
- 80081aa: 2203 movs r2, #3
- 80081ac: 4629 mov r1, r5
- 80081ae: 4638 mov r0, r7
- 80081b0: f7ff fefa bl 8007fa8 <dhcp_create_msg>
- if (p_out != NULL) {
- 80081b4: 2800 cmp r0, #0
- 80081b6: d048 beq.n 800824a <dhcp_rebind+0xb6>
- 80081b8: 4680 mov r8, r0
- struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
- 80081ba: 6846 ldr r6, [r0, #4]
- options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
- 80081bc: 36f0 adds r6, #240 @ 0xf0
- 80081be: 2302 movs r3, #2
- 80081c0: 2239 movs r2, #57 @ 0x39
- 80081c2: 4631 mov r1, r6
- 80081c4: f8bd 000e ldrh.w r0, [sp, #14]
- 80081c8: f7ff fe90 bl 8007eec <dhcp_option>
- 80081cc: f8ad 000e strh.w r0, [sp, #14]
- options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
- 80081d0: 8d3a ldrh r2, [r7, #40] @ 0x28
- 80081d2: 4631 mov r1, r6
- 80081d4: f7ff fe6c bl 8007eb0 <dhcp_option_short>
- 80081d8: f8ad 000e strh.w r0, [sp, #14]
- options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
- 80081dc: 2303 movs r3, #3
- 80081de: 2237 movs r2, #55 @ 0x37
- 80081e0: 4631 mov r1, r6
- 80081e2: f7ff fe83 bl 8007eec <dhcp_option>
- 80081e6: f8ad 000e strh.w r0, [sp, #14]
- for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
- 80081ea: 2400 movs r4, #0
- 80081ec: e00a b.n 8008204 <dhcp_rebind+0x70>
- options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
- 80081ee: 4b20 ldr r3, [pc, #128] @ (8008270 <dhcp_rebind+0xdc>)
- 80081f0: 5d1a ldrb r2, [r3, r4]
- 80081f2: 4631 mov r1, r6
- 80081f4: f8bd 000e ldrh.w r0, [sp, #14]
- 80081f8: f7ff fe96 bl 8007f28 <dhcp_option_byte>
- 80081fc: f8ad 000e strh.w r0, [sp, #14]
- for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
- 8008200: 3401 adds r4, #1
- 8008202: b2e4 uxtb r4, r4
- 8008204: 2c02 cmp r4, #2
- 8008206: d9f2 bls.n 80081ee <dhcp_rebind+0x5a>
- dhcp_option_trailer(options_out_len, msg_out->options, p_out);
- 8008208: 4642 mov r2, r8
- 800820a: 4631 mov r1, r6
- 800820c: f8bd 000e ldrh.w r0, [sp, #14]
- 8008210: f7ff ffa6 bl 8008160 <dhcp_option_trailer>
- result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif);
- 8008214: 9700 str r7, [sp, #0]
- 8008216: 2343 movs r3, #67 @ 0x43
- 8008218: 4a16 ldr r2, [pc, #88] @ (8008274 <dhcp_rebind+0xe0>)
- 800821a: 4641 mov r1, r8
- 800821c: 4816 ldr r0, [pc, #88] @ (8008278 <dhcp_rebind+0xe4>)
- 800821e: 6800 ldr r0, [r0, #0]
- 8008220: f009 fcfc bl 8011c1c <udp_sendto_if>
- 8008224: 4604 mov r4, r0
- pbuf_free(p_out);
- 8008226: 4640 mov r0, r8
- 8008228: f003 fdba bl 800bda0 <pbuf_free>
- if (dhcp->tries < 255) {
- 800822c: 79ab ldrb r3, [r5, #6]
- 800822e: 2bff cmp r3, #255 @ 0xff
- 8008230: d001 beq.n 8008236 <dhcp_rebind+0xa2>
- dhcp->tries++;
- 8008232: 3301 adds r3, #1
- 8008234: 71ab strb r3, [r5, #6]
- msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
- 8008236: 79ab ldrb r3, [r5, #6]
- 8008238: 2b09 cmp r3, #9
- 800823a: d809 bhi.n 8008250 <dhcp_rebind+0xbc>
- 800823c: ebc3 1243 rsb r2, r3, r3, lsl #5
- 8008240: eb03 0382 add.w r3, r3, r2, lsl #2
- 8008244: 00db lsls r3, r3, #3
- 8008246: b29b uxth r3, r3
- 8008248: e004 b.n 8008254 <dhcp_rebind+0xc0>
- result = ERR_MEM;
- 800824a: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
- 800824e: e7ed b.n 800822c <dhcp_rebind+0x98>
- msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
- 8008250: f242 7310 movw r3, #10000 @ 0x2710
- dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
- 8008254: f203 13f3 addw r3, r3, #499 @ 0x1f3
- 8008258: 4a08 ldr r2, [pc, #32] @ (800827c <dhcp_rebind+0xe8>)
- 800825a: fb82 1203 smull r1, r2, r2, r3
- 800825e: 17db asrs r3, r3, #31
- 8008260: ebc3 1362 rsb r3, r3, r2, asr #5
- 8008264: 812b strh r3, [r5, #8]
- }
- 8008266: 4620 mov r0, r4
- 8008268: b004 add sp, #16
- 800826a: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- 800826e: bf00 nop
- 8008270: 080151c8 .word 0x080151c8
- 8008274: 080156d4 .word 0x080156d4
- 8008278: 24012efc .word 0x24012efc
- 800827c: 10624dd3 .word 0x10624dd3
- 08008280 <dhcp_t2_timeout>:
- {
- 8008280: b510 push {r4, lr}
- struct dhcp *dhcp = netif_dhcp_data(netif);
- 8008282: 6a44 ldr r4, [r0, #36] @ 0x24
- if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
- 8008284: 7963 ldrb r3, [r4, #5]
- 8008286: 2b0a cmp r3, #10
- 8008288: bf18 it ne
- 800828a: 2b01 cmpne r3, #1
- 800828c: d003 beq.n 8008296 <dhcp_t2_timeout+0x16>
- 800828e: 2b05 cmp r3, #5
- 8008290: d001 beq.n 8008296 <dhcp_t2_timeout+0x16>
- (dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) {
- 8008292: 2b04 cmp r3, #4
- 8008294: d10c bne.n 80082b0 <dhcp_t2_timeout+0x30>
- dhcp_rebind(netif);
- 8008296: f7ff ff7d bl 8008194 <dhcp_rebind>
- if (((dhcp->t0_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) {
- 800829a: 8aa3 ldrh r3, [r4, #20]
- 800829c: 8a62 ldrh r2, [r4, #18]
- 800829e: 1a9b subs r3, r3, r2
- 80082a0: 2b01 cmp r3, #1
- 80082a2: dd05 ble.n 80082b0 <dhcp_t2_timeout+0x30>
- dhcp->t2_rebind_time = (u16_t)((dhcp->t0_timeout - dhcp->lease_used) / 2);
- 80082a4: 461a mov r2, r3
- 80082a6: 2b00 cmp r3, #0
- 80082a8: db03 blt.n 80082b2 <dhcp_t2_timeout+0x32>
- 80082aa: f3c2 024f ubfx r2, r2, #1, #16
- 80082ae: 8222 strh r2, [r4, #16]
- }
- 80082b0: bd10 pop {r4, pc}
- dhcp->t2_rebind_time = (u16_t)((dhcp->t0_timeout - dhcp->lease_used) / 2);
- 80082b2: 1c5a adds r2, r3, #1
- 80082b4: e7f9 b.n 80082aa <dhcp_t2_timeout+0x2a>
- ...
- 080082b8 <dhcp_reboot>:
- {
- 80082b8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 80082bc: b084 sub sp, #16
- 80082be: 4607 mov r7, r0
- struct dhcp *dhcp = netif_dhcp_data(netif);
- 80082c0: 6a45 ldr r5, [r0, #36] @ 0x24
- dhcp_set_state(dhcp, DHCP_STATE_REBOOTING);
- 80082c2: 2103 movs r1, #3
- 80082c4: 4628 mov r0, r5
- 80082c6: f7ff fdea bl 8007e9e <dhcp_set_state>
- p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
- 80082ca: f10d 030e add.w r3, sp, #14
- 80082ce: 2203 movs r2, #3
- 80082d0: 4629 mov r1, r5
- 80082d2: 4638 mov r0, r7
- 80082d4: f7ff fe68 bl 8007fa8 <dhcp_create_msg>
- if (p_out != NULL) {
- 80082d8: 2800 cmp r0, #0
- 80082da: d05b beq.n 8008394 <dhcp_reboot+0xdc>
- 80082dc: 4680 mov r8, r0
- struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
- 80082de: 6846 ldr r6, [r0, #4]
- options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
- 80082e0: 36f0 adds r6, #240 @ 0xf0
- 80082e2: 2302 movs r3, #2
- 80082e4: 2239 movs r2, #57 @ 0x39
- 80082e6: 4631 mov r1, r6
- 80082e8: f8bd 000e ldrh.w r0, [sp, #14]
- 80082ec: f7ff fdfe bl 8007eec <dhcp_option>
- 80082f0: f8ad 000e strh.w r0, [sp, #14]
- options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN_MIN_REQUIRED);
- 80082f4: f44f 7210 mov.w r2, #576 @ 0x240
- 80082f8: 4631 mov r1, r6
- 80082fa: f7ff fdd9 bl 8007eb0 <dhcp_option_short>
- 80082fe: f8ad 000e strh.w r0, [sp, #14]
- options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
- 8008302: 2304 movs r3, #4
- 8008304: 2232 movs r2, #50 @ 0x32
- 8008306: 4631 mov r1, r6
- 8008308: f7ff fdf0 bl 8007eec <dhcp_option>
- 800830c: 4604 mov r4, r0
- 800830e: f8ad 000e strh.w r0, [sp, #14]
- options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr)));
- 8008312: 69e8 ldr r0, [r5, #28]
- 8008314: f7ff fdb7 bl 8007e86 <lwip_htonl>
- 8008318: 4602 mov r2, r0
- 800831a: 4631 mov r1, r6
- 800831c: 4620 mov r0, r4
- 800831e: f7ff fe1b bl 8007f58 <dhcp_option_long>
- 8008322: f8ad 000e strh.w r0, [sp, #14]
- options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
- 8008326: 2303 movs r3, #3
- 8008328: 2237 movs r2, #55 @ 0x37
- 800832a: 4631 mov r1, r6
- 800832c: f7ff fdde bl 8007eec <dhcp_option>
- 8008330: f8ad 000e strh.w r0, [sp, #14]
- for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
- 8008334: 2400 movs r4, #0
- 8008336: e00a b.n 800834e <dhcp_reboot+0x96>
- options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
- 8008338: 4b1f ldr r3, [pc, #124] @ (80083b8 <dhcp_reboot+0x100>)
- 800833a: 5d1a ldrb r2, [r3, r4]
- 800833c: 4631 mov r1, r6
- 800833e: f8bd 000e ldrh.w r0, [sp, #14]
- 8008342: f7ff fdf1 bl 8007f28 <dhcp_option_byte>
- 8008346: f8ad 000e strh.w r0, [sp, #14]
- for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
- 800834a: 3401 adds r4, #1
- 800834c: b2e4 uxtb r4, r4
- 800834e: 2c02 cmp r4, #2
- 8008350: d9f2 bls.n 8008338 <dhcp_reboot+0x80>
- dhcp_option_trailer(options_out_len, msg_out->options, p_out);
- 8008352: 4642 mov r2, r8
- 8008354: 4631 mov r1, r6
- 8008356: f8bd 000e ldrh.w r0, [sp, #14]
- 800835a: f7ff ff01 bl 8008160 <dhcp_option_trailer>
- result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif);
- 800835e: 9700 str r7, [sp, #0]
- 8008360: 2343 movs r3, #67 @ 0x43
- 8008362: 4a16 ldr r2, [pc, #88] @ (80083bc <dhcp_reboot+0x104>)
- 8008364: 4641 mov r1, r8
- 8008366: 4816 ldr r0, [pc, #88] @ (80083c0 <dhcp_reboot+0x108>)
- 8008368: 6800 ldr r0, [r0, #0]
- 800836a: f009 fc57 bl 8011c1c <udp_sendto_if>
- 800836e: 4604 mov r4, r0
- pbuf_free(p_out);
- 8008370: 4640 mov r0, r8
- 8008372: f003 fd15 bl 800bda0 <pbuf_free>
- if (dhcp->tries < 255) {
- 8008376: 79ab ldrb r3, [r5, #6]
- 8008378: 2bff cmp r3, #255 @ 0xff
- 800837a: d001 beq.n 8008380 <dhcp_reboot+0xc8>
- dhcp->tries++;
- 800837c: 3301 adds r3, #1
- 800837e: 71ab strb r3, [r5, #6]
- msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
- 8008380: 79ab ldrb r3, [r5, #6]
- 8008382: 2b09 cmp r3, #9
- 8008384: d809 bhi.n 800839a <dhcp_reboot+0xe2>
- 8008386: ebc3 1243 rsb r2, r3, r3, lsl #5
- 800838a: eb03 0382 add.w r3, r3, r2, lsl #2
- 800838e: 00db lsls r3, r3, #3
- 8008390: b29b uxth r3, r3
- 8008392: e004 b.n 800839e <dhcp_reboot+0xe6>
- result = ERR_MEM;
- 8008394: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
- 8008398: e7ed b.n 8008376 <dhcp_reboot+0xbe>
- msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
- 800839a: f242 7310 movw r3, #10000 @ 0x2710
- dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
- 800839e: f203 13f3 addw r3, r3, #499 @ 0x1f3
- 80083a2: 4a08 ldr r2, [pc, #32] @ (80083c4 <dhcp_reboot+0x10c>)
- 80083a4: fb82 1203 smull r1, r2, r2, r3
- 80083a8: 17db asrs r3, r3, #31
- 80083aa: ebc3 1362 rsb r3, r3, r2, asr #5
- 80083ae: 812b strh r3, [r5, #8]
- }
- 80083b0: 4620 mov r0, r4
- 80083b2: b004 add sp, #16
- 80083b4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- 80083b8: 080151c8 .word 0x080151c8
- 80083bc: 080156d4 .word 0x080156d4
- 80083c0: 24012efc .word 0x24012efc
- 80083c4: 10624dd3 .word 0x10624dd3
- 080083c8 <dhcp_select>:
- {
- 80083c8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 80083cc: b084 sub sp, #16
- LWIP_ERROR("dhcp_select: netif != NULL", (netif != NULL), return ERR_ARG;);
- 80083ce: 2800 cmp r0, #0
- 80083d0: d050 beq.n 8008474 <dhcp_select+0xac>
- 80083d2: 4607 mov r7, r0
- dhcp = netif_dhcp_data(netif);
- 80083d4: 6a44 ldr r4, [r0, #36] @ 0x24
- LWIP_ERROR("dhcp_select: dhcp != NULL", (dhcp != NULL), return ERR_VAL;);
- 80083d6: 2c00 cmp r4, #0
- 80083d8: d056 beq.n 8008488 <dhcp_select+0xc0>
- dhcp_set_state(dhcp, DHCP_STATE_REQUESTING);
- 80083da: 2101 movs r1, #1
- 80083dc: 4620 mov r0, r4
- 80083de: f7ff fd5e bl 8007e9e <dhcp_set_state>
- p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
- 80083e2: f10d 030e add.w r3, sp, #14
- 80083e6: 2203 movs r2, #3
- 80083e8: 4621 mov r1, r4
- 80083ea: 4638 mov r0, r7
- 80083ec: f7ff fddc bl 8007fa8 <dhcp_create_msg>
- if (p_out != NULL) {
- 80083f0: 4680 mov r8, r0
- 80083f2: 2800 cmp r0, #0
- 80083f4: f000 8090 beq.w 8008518 <dhcp_select+0x150>
- struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
- 80083f8: 6846 ldr r6, [r0, #4]
- options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
- 80083fa: 36f0 adds r6, #240 @ 0xf0
- 80083fc: 2302 movs r3, #2
- 80083fe: 2239 movs r2, #57 @ 0x39
- 8008400: 4631 mov r1, r6
- 8008402: f8bd 000e ldrh.w r0, [sp, #14]
- 8008406: f7ff fd71 bl 8007eec <dhcp_option>
- 800840a: f8ad 000e strh.w r0, [sp, #14]
- options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
- 800840e: 8d3a ldrh r2, [r7, #40] @ 0x28
- 8008410: 4631 mov r1, r6
- 8008412: f7ff fd4d bl 8007eb0 <dhcp_option_short>
- 8008416: f8ad 000e strh.w r0, [sp, #14]
- options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
- 800841a: 2304 movs r3, #4
- 800841c: 2232 movs r2, #50 @ 0x32
- 800841e: 4631 mov r1, r6
- 8008420: f7ff fd64 bl 8007eec <dhcp_option>
- 8008424: 4605 mov r5, r0
- 8008426: f8ad 000e strh.w r0, [sp, #14]
- options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr)));
- 800842a: 69e0 ldr r0, [r4, #28]
- 800842c: f7ff fd2b bl 8007e86 <lwip_htonl>
- 8008430: 4602 mov r2, r0
- 8008432: 4631 mov r1, r6
- 8008434: 4628 mov r0, r5
- 8008436: f7ff fd8f bl 8007f58 <dhcp_option_long>
- 800843a: f8ad 000e strh.w r0, [sp, #14]
- options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4);
- 800843e: 2304 movs r3, #4
- 8008440: 2236 movs r2, #54 @ 0x36
- 8008442: 4631 mov r1, r6
- 8008444: f7ff fd52 bl 8007eec <dhcp_option>
- 8008448: 4605 mov r5, r0
- 800844a: f8ad 000e strh.w r0, [sp, #14]
- options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr))));
- 800844e: 69a0 ldr r0, [r4, #24]
- 8008450: f7ff fd19 bl 8007e86 <lwip_htonl>
- 8008454: 4602 mov r2, r0
- 8008456: 4631 mov r1, r6
- 8008458: 4628 mov r0, r5
- 800845a: f7ff fd7d bl 8007f58 <dhcp_option_long>
- 800845e: f8ad 000e strh.w r0, [sp, #14]
- options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
- 8008462: 2303 movs r3, #3
- 8008464: 2237 movs r2, #55 @ 0x37
- 8008466: 4631 mov r1, r6
- 8008468: f7ff fd40 bl 8007eec <dhcp_option>
- 800846c: f8ad 000e strh.w r0, [sp, #14]
- for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
- 8008470: 2500 movs r5, #0
- 8008472: e01e b.n 80084b2 <dhcp_select+0xea>
- LWIP_ERROR("dhcp_select: netif != NULL", (netif != NULL), return ERR_ARG;);
- 8008474: 4b2b ldr r3, [pc, #172] @ (8008524 <dhcp_select+0x15c>)
- 8008476: f240 1277 movw r2, #375 @ 0x177
- 800847a: 492b ldr r1, [pc, #172] @ (8008528 <dhcp_select+0x160>)
- 800847c: 482b ldr r0, [pc, #172] @ (800852c <dhcp_select+0x164>)
- 800847e: f00a ffc3 bl 8013408 <iprintf>
- 8008482: f06f 050f mvn.w r5, #15
- 8008486: e043 b.n 8008510 <dhcp_select+0x148>
- LWIP_ERROR("dhcp_select: dhcp != NULL", (dhcp != NULL), return ERR_VAL;);
- 8008488: 4b26 ldr r3, [pc, #152] @ (8008524 <dhcp_select+0x15c>)
- 800848a: f240 1279 movw r2, #377 @ 0x179
- 800848e: 4928 ldr r1, [pc, #160] @ (8008530 <dhcp_select+0x168>)
- 8008490: 4826 ldr r0, [pc, #152] @ (800852c <dhcp_select+0x164>)
- 8008492: f00a ffb9 bl 8013408 <iprintf>
- 8008496: f06f 0505 mvn.w r5, #5
- 800849a: e039 b.n 8008510 <dhcp_select+0x148>
- options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
- 800849c: 4b25 ldr r3, [pc, #148] @ (8008534 <dhcp_select+0x16c>)
- 800849e: 5d5a ldrb r2, [r3, r5]
- 80084a0: 4631 mov r1, r6
- 80084a2: f8bd 000e ldrh.w r0, [sp, #14]
- 80084a6: f7ff fd3f bl 8007f28 <dhcp_option_byte>
- 80084aa: f8ad 000e strh.w r0, [sp, #14]
- for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
- 80084ae: 3501 adds r5, #1
- 80084b0: b2ed uxtb r5, r5
- 80084b2: 2d02 cmp r5, #2
- 80084b4: d9f2 bls.n 800849c <dhcp_select+0xd4>
- dhcp_option_trailer(options_out_len, msg_out->options, p_out);
- 80084b6: 4642 mov r2, r8
- 80084b8: 4631 mov r1, r6
- 80084ba: f8bd 000e ldrh.w r0, [sp, #14]
- 80084be: f7ff fe4f bl 8008160 <dhcp_option_trailer>
- result = udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY);
- 80084c2: 4b1d ldr r3, [pc, #116] @ (8008538 <dhcp_select+0x170>)
- 80084c4: 9301 str r3, [sp, #4]
- 80084c6: 9700 str r7, [sp, #0]
- 80084c8: 2343 movs r3, #67 @ 0x43
- 80084ca: 4a1c ldr r2, [pc, #112] @ (800853c <dhcp_select+0x174>)
- 80084cc: 4641 mov r1, r8
- 80084ce: 481c ldr r0, [pc, #112] @ (8008540 <dhcp_select+0x178>)
- 80084d0: 6800 ldr r0, [r0, #0]
- 80084d2: f009 fae9 bl 8011aa8 <udp_sendto_if_src>
- 80084d6: 4605 mov r5, r0
- pbuf_free(p_out);
- 80084d8: 4640 mov r0, r8
- 80084da: f003 fc61 bl 800bda0 <pbuf_free>
- if (dhcp->tries < 255) {
- 80084de: 79a3 ldrb r3, [r4, #6]
- 80084e0: 2bff cmp r3, #255 @ 0xff
- 80084e2: d001 beq.n 80084e8 <dhcp_select+0x120>
- dhcp->tries++;
- 80084e4: 3301 adds r3, #1
- 80084e6: 71a3 strb r3, [r4, #6]
- msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000);
- 80084e8: 79a2 ldrb r2, [r4, #6]
- 80084ea: 2a05 cmp r2, #5
- 80084ec: d817 bhi.n 800851e <dhcp_select+0x156>
- 80084ee: 2301 movs r3, #1
- 80084f0: 4093 lsls r3, r2
- 80084f2: ebc3 1243 rsb r2, r3, r3, lsl #5
- 80084f6: eb03 0382 add.w r3, r3, r2, lsl #2
- 80084fa: 00db lsls r3, r3, #3
- 80084fc: b29b uxth r3, r3
- dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
- 80084fe: f203 13f3 addw r3, r3, #499 @ 0x1f3
- 8008502: 4a10 ldr r2, [pc, #64] @ (8008544 <dhcp_select+0x17c>)
- 8008504: fb82 1203 smull r1, r2, r2, r3
- 8008508: 17db asrs r3, r3, #31
- 800850a: ebc3 1362 rsb r3, r3, r2, asr #5
- 800850e: 8123 strh r3, [r4, #8]
- }
- 8008510: 4628 mov r0, r5
- 8008512: b004 add sp, #16
- 8008514: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- result = ERR_MEM;
- 8008518: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
- 800851c: e7df b.n 80084de <dhcp_select+0x116>
- msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000);
- 800851e: f64e 2360 movw r3, #60000 @ 0xea60
- 8008522: e7ec b.n 80084fe <dhcp_select+0x136>
- 8008524: 08014e34 .word 0x08014e34
- 8008528: 0801500c .word 0x0801500c
- 800852c: 080144e8 .word 0x080144e8
- 8008530: 08015028 .word 0x08015028
- 8008534: 080151c8 .word 0x080151c8
- 8008538: 080156d8 .word 0x080156d8
- 800853c: 080156d4 .word 0x080156d4
- 8008540: 24012efc .word 0x24012efc
- 8008544: 10624dd3 .word 0x10624dd3
- 08008548 <dhcp_handle_offer>:
- {
- 8008548: b570 push {r4, r5, r6, lr}
- struct dhcp *dhcp = netif_dhcp_data(netif);
- 800854a: 6a46 ldr r6, [r0, #36] @ 0x24
- if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) {
- 800854c: 4b09 ldr r3, [pc, #36] @ (8008574 <dhcp_handle_offer+0x2c>)
- 800854e: 789b ldrb r3, [r3, #2]
- 8008550: b903 cbnz r3, 8008554 <dhcp_handle_offer+0xc>
- }
- 8008552: bd70 pop {r4, r5, r6, pc}
- 8008554: 4604 mov r4, r0
- 8008556: 460d mov r5, r1
- dhcp->request_timeout = 0; /* stop timer */
- 8008558: 2300 movs r3, #0
- 800855a: 8133 strh r3, [r6, #8]
- ip_addr_set_ip4_u32(&dhcp->server_ip_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID)));
- 800855c: 4b06 ldr r3, [pc, #24] @ (8008578 <dhcp_handle_offer+0x30>)
- 800855e: 6898 ldr r0, [r3, #8]
- 8008560: f7ff fc91 bl 8007e86 <lwip_htonl>
- 8008564: 61b0 str r0, [r6, #24]
- ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr);
- 8008566: 692b ldr r3, [r5, #16]
- 8008568: 61f3 str r3, [r6, #28]
- dhcp_select(netif);
- 800856a: 4620 mov r0, r4
- 800856c: f7ff ff2c bl 80083c8 <dhcp_select>
- }
- 8008570: e7ef b.n 8008552 <dhcp_handle_offer+0xa>
- 8008572: bf00 nop
- 8008574: 24012f00 .word 0x24012f00
- 8008578: 24012f08 .word 0x24012f08
- 0800857c <dhcp_discover>:
- {
- 800857c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8008580: b084 sub sp, #16
- 8008582: 4606 mov r6, r0
- struct dhcp *dhcp = netif_dhcp_data(netif);
- 8008584: 6a44 ldr r4, [r0, #36] @ 0x24
- ip4_addr_set_any(&dhcp->offered_ip_addr);
- 8008586: 2300 movs r3, #0
- 8008588: 61e3 str r3, [r4, #28]
- dhcp_set_state(dhcp, DHCP_STATE_SELECTING);
- 800858a: 2106 movs r1, #6
- 800858c: 4620 mov r0, r4
- 800858e: f7ff fc86 bl 8007e9e <dhcp_set_state>
- p_out = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER, &options_out_len);
- 8008592: f10d 030e add.w r3, sp, #14
- 8008596: 2201 movs r2, #1
- 8008598: 4621 mov r1, r4
- 800859a: 4630 mov r0, r6
- 800859c: f7ff fd04 bl 8007fa8 <dhcp_create_msg>
- if (p_out != NULL) {
- 80085a0: 2800 cmp r0, #0
- 80085a2: d03a beq.n 800861a <dhcp_discover+0x9e>
- 80085a4: 4680 mov r8, r0
- struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
- 80085a6: 6847 ldr r7, [r0, #4]
- options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
- 80085a8: 37f0 adds r7, #240 @ 0xf0
- 80085aa: 2302 movs r3, #2
- 80085ac: 2239 movs r2, #57 @ 0x39
- 80085ae: 4639 mov r1, r7
- 80085b0: f8bd 000e ldrh.w r0, [sp, #14]
- 80085b4: f7ff fc9a bl 8007eec <dhcp_option>
- 80085b8: f8ad 000e strh.w r0, [sp, #14]
- options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
- 80085bc: 8d32 ldrh r2, [r6, #40] @ 0x28
- 80085be: 4639 mov r1, r7
- 80085c0: f7ff fc76 bl 8007eb0 <dhcp_option_short>
- 80085c4: f8ad 000e strh.w r0, [sp, #14]
- options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
- 80085c8: 2303 movs r3, #3
- 80085ca: 2237 movs r2, #55 @ 0x37
- 80085cc: 4639 mov r1, r7
- 80085ce: f7ff fc8d bl 8007eec <dhcp_option>
- 80085d2: f8ad 000e strh.w r0, [sp, #14]
- for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
- 80085d6: 2500 movs r5, #0
- 80085d8: e00a b.n 80085f0 <dhcp_discover+0x74>
- options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
- 80085da: 4b20 ldr r3, [pc, #128] @ (800865c <dhcp_discover+0xe0>)
- 80085dc: 5d5a ldrb r2, [r3, r5]
- 80085de: 4639 mov r1, r7
- 80085e0: f8bd 000e ldrh.w r0, [sp, #14]
- 80085e4: f7ff fca0 bl 8007f28 <dhcp_option_byte>
- 80085e8: f8ad 000e strh.w r0, [sp, #14]
- for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
- 80085ec: 3501 adds r5, #1
- 80085ee: b2ed uxtb r5, r5
- 80085f0: 2d02 cmp r5, #2
- 80085f2: d9f2 bls.n 80085da <dhcp_discover+0x5e>
- dhcp_option_trailer(options_out_len, msg_out->options, p_out);
- 80085f4: 4642 mov r2, r8
- 80085f6: 4639 mov r1, r7
- 80085f8: f8bd 000e ldrh.w r0, [sp, #14]
- 80085fc: f7ff fdb0 bl 8008160 <dhcp_option_trailer>
- udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY);
- 8008600: 4b17 ldr r3, [pc, #92] @ (8008660 <dhcp_discover+0xe4>)
- 8008602: 9301 str r3, [sp, #4]
- 8008604: 9600 str r6, [sp, #0]
- 8008606: 2343 movs r3, #67 @ 0x43
- 8008608: 4a16 ldr r2, [pc, #88] @ (8008664 <dhcp_discover+0xe8>)
- 800860a: 4641 mov r1, r8
- 800860c: 4816 ldr r0, [pc, #88] @ (8008668 <dhcp_discover+0xec>)
- 800860e: 6800 ldr r0, [r0, #0]
- 8008610: f009 fa4a bl 8011aa8 <udp_sendto_if_src>
- pbuf_free(p_out);
- 8008614: 4640 mov r0, r8
- 8008616: f003 fbc3 bl 800bda0 <pbuf_free>
- if (dhcp->tries < 255) {
- 800861a: 79a3 ldrb r3, [r4, #6]
- 800861c: 2bff cmp r3, #255 @ 0xff
- 800861e: d001 beq.n 8008624 <dhcp_discover+0xa8>
- dhcp->tries++;
- 8008620: 3301 adds r3, #1
- 8008622: 71a3 strb r3, [r4, #6]
- msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000);
- 8008624: 79a2 ldrb r2, [r4, #6]
- 8008626: 2a05 cmp r2, #5
- 8008628: d814 bhi.n 8008654 <dhcp_discover+0xd8>
- 800862a: 2301 movs r3, #1
- 800862c: 4093 lsls r3, r2
- 800862e: ebc3 1243 rsb r2, r3, r3, lsl #5
- 8008632: eb03 0382 add.w r3, r3, r2, lsl #2
- 8008636: 00db lsls r3, r3, #3
- 8008638: b29b uxth r3, r3
- dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
- 800863a: f203 13f3 addw r3, r3, #499 @ 0x1f3
- 800863e: 4a0b ldr r2, [pc, #44] @ (800866c <dhcp_discover+0xf0>)
- 8008640: fb82 1203 smull r1, r2, r2, r3
- 8008644: 17db asrs r3, r3, #31
- 8008646: ebc3 1362 rsb r3, r3, r2, asr #5
- 800864a: 8123 strh r3, [r4, #8]
- }
- 800864c: 2000 movs r0, #0
- 800864e: b004 add sp, #16
- 8008650: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000);
- 8008654: f64e 2360 movw r3, #60000 @ 0xea60
- 8008658: e7ef b.n 800863a <dhcp_discover+0xbe>
- 800865a: bf00 nop
- 800865c: 080151c8 .word 0x080151c8
- 8008660: 080156d8 .word 0x080156d8
- 8008664: 080156d4 .word 0x080156d4
- 8008668: 24012efc .word 0x24012efc
- 800866c: 10624dd3 .word 0x10624dd3
- 08008670 <dhcp_decline>:
- {
- 8008670: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8008674: b084 sub sp, #16
- 8008676: 4605 mov r5, r0
- struct dhcp *dhcp = netif_dhcp_data(netif);
- 8008678: 6a44 ldr r4, [r0, #36] @ 0x24
- dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF);
- 800867a: 210c movs r1, #12
- 800867c: 4620 mov r0, r4
- 800867e: f7ff fc0e bl 8007e9e <dhcp_set_state>
- p_out = dhcp_create_msg(netif, dhcp, DHCP_DECLINE, &options_out_len);
- 8008682: f10d 030e add.w r3, sp, #14
- 8008686: 2204 movs r2, #4
- 8008688: 4621 mov r1, r4
- 800868a: 4628 mov r0, r5
- 800868c: f7ff fc8c bl 8007fa8 <dhcp_create_msg>
- if (p_out != NULL) {
- 8008690: b398 cbz r0, 80086fa <dhcp_decline+0x8a>
- 8008692: 4607 mov r7, r0
- struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
- 8008694: 6846 ldr r6, [r0, #4]
- options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
- 8008696: 36f0 adds r6, #240 @ 0xf0
- 8008698: 2304 movs r3, #4
- 800869a: 2232 movs r2, #50 @ 0x32
- 800869c: 4631 mov r1, r6
- 800869e: f8bd 000e ldrh.w r0, [sp, #14]
- 80086a2: f7ff fc23 bl 8007eec <dhcp_option>
- 80086a6: 4680 mov r8, r0
- 80086a8: f8ad 000e strh.w r0, [sp, #14]
- options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr)));
- 80086ac: 69e0 ldr r0, [r4, #28]
- 80086ae: f7ff fbea bl 8007e86 <lwip_htonl>
- 80086b2: 4602 mov r2, r0
- 80086b4: 4631 mov r1, r6
- 80086b6: 4640 mov r0, r8
- 80086b8: f7ff fc4e bl 8007f58 <dhcp_option_long>
- 80086bc: f8ad 000e strh.w r0, [sp, #14]
- dhcp_option_trailer(options_out_len, msg_out->options, p_out);
- 80086c0: 463a mov r2, r7
- 80086c2: 4631 mov r1, r6
- 80086c4: f7ff fd4c bl 8008160 <dhcp_option_trailer>
- result = udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY);
- 80086c8: 4b0d ldr r3, [pc, #52] @ (8008700 <dhcp_decline+0x90>)
- 80086ca: 9301 str r3, [sp, #4]
- 80086cc: 9500 str r5, [sp, #0]
- 80086ce: 2343 movs r3, #67 @ 0x43
- 80086d0: 4a0c ldr r2, [pc, #48] @ (8008704 <dhcp_decline+0x94>)
- 80086d2: 4639 mov r1, r7
- 80086d4: 480c ldr r0, [pc, #48] @ (8008708 <dhcp_decline+0x98>)
- 80086d6: 6800 ldr r0, [r0, #0]
- 80086d8: f009 f9e6 bl 8011aa8 <udp_sendto_if_src>
- 80086dc: 4605 mov r5, r0
- pbuf_free(p_out);
- 80086de: 4638 mov r0, r7
- 80086e0: f003 fb5e bl 800bda0 <pbuf_free>
- if (dhcp->tries < 255) {
- 80086e4: 79a3 ldrb r3, [r4, #6]
- 80086e6: 2bff cmp r3, #255 @ 0xff
- 80086e8: d001 beq.n 80086ee <dhcp_decline+0x7e>
- dhcp->tries++;
- 80086ea: 3301 adds r3, #1
- 80086ec: 71a3 strb r3, [r4, #6]
- dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
- 80086ee: 2314 movs r3, #20
- 80086f0: 8123 strh r3, [r4, #8]
- }
- 80086f2: 4628 mov r0, r5
- 80086f4: b004 add sp, #16
- 80086f6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- result = ERR_MEM;
- 80086fa: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
- 80086fe: e7f1 b.n 80086e4 <dhcp_decline+0x74>
- 8008700: 080156d8 .word 0x080156d8
- 8008704: 080156d4 .word 0x080156d4
- 8008708: 24012efc .word 0x24012efc
- 0800870c <dhcp_check>:
- {
- 800870c: b538 push {r3, r4, r5, lr}
- 800870e: 4605 mov r5, r0
- struct dhcp *dhcp = netif_dhcp_data(netif);
- 8008710: 6a44 ldr r4, [r0, #36] @ 0x24
- dhcp_set_state(dhcp, DHCP_STATE_CHECKING);
- 8008712: 2108 movs r1, #8
- 8008714: 4620 mov r0, r4
- 8008716: f7ff fbc2 bl 8007e9e <dhcp_set_state>
- result = etharp_query(netif, &dhcp->offered_ip_addr, NULL);
- 800871a: 2200 movs r2, #0
- 800871c: f104 011c add.w r1, r4, #28
- 8008720: 4628 mov r0, r5
- 8008722: f001 f935 bl 8009990 <etharp_query>
- if (dhcp->tries < 255) {
- 8008726: 79a3 ldrb r3, [r4, #6]
- 8008728: 2bff cmp r3, #255 @ 0xff
- 800872a: d001 beq.n 8008730 <dhcp_check+0x24>
- dhcp->tries++;
- 800872c: 3301 adds r3, #1
- 800872e: 71a3 strb r3, [r4, #6]
- dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
- 8008730: 2301 movs r3, #1
- 8008732: 8123 strh r3, [r4, #8]
- }
- 8008734: bd38 pop {r3, r4, r5, pc}
- ...
- 08008738 <dhcp_bind>:
- {
- 8008738: b530 push {r4, r5, lr}
- 800873a: b083 sub sp, #12
- LWIP_ERROR("dhcp_bind: netif != NULL", (netif != NULL), return;);
- 800873c: 2800 cmp r0, #0
- 800873e: d065 beq.n 800880c <dhcp_bind+0xd4>
- 8008740: 4605 mov r5, r0
- dhcp = netif_dhcp_data(netif);
- 8008742: 6a44 ldr r4, [r0, #36] @ 0x24
- LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;);
- 8008744: 2c00 cmp r4, #0
- 8008746: d069 beq.n 800881c <dhcp_bind+0xe4>
- dhcp->lease_used = 0;
- 8008748: 2300 movs r3, #0
- 800874a: 8263 strh r3, [r4, #18]
- if (dhcp->offered_t0_lease != 0xffffffffUL) {
- 800874c: 6aa2 ldr r2, [r4, #40] @ 0x28
- 800874e: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff
- 8008752: d00f beq.n 8008774 <dhcp_bind+0x3c>
- timeout = (dhcp->offered_t0_lease + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS;
- 8008754: 321e adds r2, #30
- 8008756: f1a3 3377 sub.w r3, r3, #2004318071 @ 0x77777777
- 800875a: fba3 1302 umull r1, r3, r3, r2
- 800875e: 095b lsrs r3, r3, #5
- if (timeout > 0xffff) {
- 8008760: f5b2 1f70 cmp.w r2, #3932160 @ 0x3c0000
- 8008764: d301 bcc.n 800876a <dhcp_bind+0x32>
- timeout = 0xffff;
- 8008766: f64f 73ff movw r3, #65535 @ 0xffff
- dhcp->t0_timeout = (u16_t)timeout;
- 800876a: b29b uxth r3, r3
- 800876c: 82a3 strh r3, [r4, #20]
- if (dhcp->t0_timeout == 0) {
- 800876e: b90b cbnz r3, 8008774 <dhcp_bind+0x3c>
- dhcp->t0_timeout = 1;
- 8008770: 2301 movs r3, #1
- 8008772: 82a3 strh r3, [r4, #20]
- if (dhcp->offered_t1_renew != 0xffffffffUL) {
- 8008774: 6ae2 ldr r2, [r4, #44] @ 0x2c
- 8008776: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff
- 800877a: d010 beq.n 800879e <dhcp_bind+0x66>
- timeout = (dhcp->offered_t1_renew + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS;
- 800877c: 321e adds r2, #30
- 800877e: 4b34 ldr r3, [pc, #208] @ (8008850 <dhcp_bind+0x118>)
- 8008780: fba3 1302 umull r1, r3, r3, r2
- 8008784: 095b lsrs r3, r3, #5
- if (timeout > 0xffff) {
- 8008786: f5b2 1f70 cmp.w r2, #3932160 @ 0x3c0000
- 800878a: d301 bcc.n 8008790 <dhcp_bind+0x58>
- timeout = 0xffff;
- 800878c: f64f 73ff movw r3, #65535 @ 0xffff
- dhcp->t1_timeout = (u16_t)timeout;
- 8008790: b29b uxth r3, r3
- 8008792: 8163 strh r3, [r4, #10]
- if (dhcp->t1_timeout == 0) {
- 8008794: b90b cbnz r3, 800879a <dhcp_bind+0x62>
- dhcp->t1_timeout = 1;
- 8008796: 2301 movs r3, #1
- 8008798: 8163 strh r3, [r4, #10]
- dhcp->t1_renew_time = dhcp->t1_timeout;
- 800879a: 8963 ldrh r3, [r4, #10]
- 800879c: 81e3 strh r3, [r4, #14]
- if (dhcp->offered_t2_rebind != 0xffffffffUL) {
- 800879e: 6b22 ldr r2, [r4, #48] @ 0x30
- 80087a0: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff
- 80087a4: d010 beq.n 80087c8 <dhcp_bind+0x90>
- timeout = (dhcp->offered_t2_rebind + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS;
- 80087a6: 321e adds r2, #30
- 80087a8: 4b29 ldr r3, [pc, #164] @ (8008850 <dhcp_bind+0x118>)
- 80087aa: fba3 1302 umull r1, r3, r3, r2
- 80087ae: 095b lsrs r3, r3, #5
- if (timeout > 0xffff) {
- 80087b0: f5b2 1f70 cmp.w r2, #3932160 @ 0x3c0000
- 80087b4: d301 bcc.n 80087ba <dhcp_bind+0x82>
- timeout = 0xffff;
- 80087b6: f64f 73ff movw r3, #65535 @ 0xffff
- dhcp->t2_timeout = (u16_t)timeout;
- 80087ba: b29b uxth r3, r3
- 80087bc: 81a3 strh r3, [r4, #12]
- if (dhcp->t2_timeout == 0) {
- 80087be: b90b cbnz r3, 80087c4 <dhcp_bind+0x8c>
- dhcp->t2_timeout = 1;
- 80087c0: 2301 movs r3, #1
- 80087c2: 81a3 strh r3, [r4, #12]
- dhcp->t2_rebind_time = dhcp->t2_timeout;
- 80087c4: 89a3 ldrh r3, [r4, #12]
- 80087c6: 8223 strh r3, [r4, #16]
- if ((dhcp->t1_timeout >= dhcp->t2_timeout) && (dhcp->t2_timeout > 0)) {
- 80087c8: 8962 ldrh r2, [r4, #10]
- 80087ca: 89a3 ldrh r3, [r4, #12]
- 80087cc: 429a cmp r2, r3
- 80087ce: d302 bcc.n 80087d6 <dhcp_bind+0x9e>
- 80087d0: b10b cbz r3, 80087d6 <dhcp_bind+0x9e>
- dhcp->t1_timeout = 0;
- 80087d2: 2300 movs r3, #0
- 80087d4: 8163 strh r3, [r4, #10]
- if (dhcp->subnet_mask_given) {
- 80087d6: 79e3 ldrb r3, [r4, #7]
- 80087d8: b343 cbz r3, 800882c <dhcp_bind+0xf4>
- ip4_addr_copy(sn_mask, dhcp->offered_sn_mask);
- 80087da: 6a23 ldr r3, [r4, #32]
- 80087dc: 9301 str r3, [sp, #4]
- ip4_addr_copy(gw_addr, dhcp->offered_gw_addr);
- 80087de: 6a63 ldr r3, [r4, #36] @ 0x24
- 80087e0: 9300 str r3, [sp, #0]
- if (ip4_addr_isany_val(gw_addr)) {
- 80087e2: b933 cbnz r3, 80087f2 <dhcp_bind+0xba>
- ip4_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask);
- 80087e4: 69e3 ldr r3, [r4, #28]
- 80087e6: 9a01 ldr r2, [sp, #4]
- 80087e8: 4013 ands r3, r2
- 80087ea: 9300 str r3, [sp, #0]
- ip4_addr_set_u32(&gw_addr, ip4_addr_get_u32(&gw_addr) | PP_HTONL(0x00000001UL));
- 80087ec: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000
- 80087f0: 9300 str r3, [sp, #0]
- dhcp_set_state(dhcp, DHCP_STATE_BOUND);
- 80087f2: 210a movs r1, #10
- 80087f4: 4620 mov r0, r4
- 80087f6: f7ff fb52 bl 8007e9e <dhcp_set_state>
- netif_set_addr(netif, &dhcp->offered_ip_addr, &sn_mask, &gw_addr);
- 80087fa: 466b mov r3, sp
- 80087fc: aa01 add r2, sp, #4
- 80087fe: f104 011c add.w r1, r4, #28
- 8008802: 4628 mov r0, r5
- 8008804: f003 f822 bl 800b84c <netif_set_addr>
- }
- 8008808: b003 add sp, #12
- 800880a: bd30 pop {r4, r5, pc}
- LWIP_ERROR("dhcp_bind: netif != NULL", (netif != NULL), return;);
- 800880c: 4b11 ldr r3, [pc, #68] @ (8008854 <dhcp_bind+0x11c>)
- 800880e: f240 4215 movw r2, #1045 @ 0x415
- 8008812: 4911 ldr r1, [pc, #68] @ (8008858 <dhcp_bind+0x120>)
- 8008814: 4811 ldr r0, [pc, #68] @ (800885c <dhcp_bind+0x124>)
- 8008816: f00a fdf7 bl 8013408 <iprintf>
- 800881a: e7f5 b.n 8008808 <dhcp_bind+0xd0>
- LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;);
- 800881c: 4b0d ldr r3, [pc, #52] @ (8008854 <dhcp_bind+0x11c>)
- 800881e: f240 4217 movw r2, #1047 @ 0x417
- 8008822: 490f ldr r1, [pc, #60] @ (8008860 <dhcp_bind+0x128>)
- 8008824: 480d ldr r0, [pc, #52] @ (800885c <dhcp_bind+0x124>)
- 8008826: f00a fdef bl 8013408 <iprintf>
- 800882a: e7ed b.n 8008808 <dhcp_bind+0xd0>
- u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr);
- 800882c: 7f22 ldrb r2, [r4, #28]
- if (first_octet <= 127) {
- 800882e: f994 301c ldrsb.w r3, [r4, #28]
- 8008832: 2b00 cmp r3, #0
- 8008834: db02 blt.n 800883c <dhcp_bind+0x104>
- ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL));
- 8008836: 23ff movs r3, #255 @ 0xff
- 8008838: 9301 str r3, [sp, #4]
- 800883a: e7d0 b.n 80087de <dhcp_bind+0xa6>
- } else if (first_octet >= 192) {
- 800883c: 2abf cmp r2, #191 @ 0xbf
- 800883e: d903 bls.n 8008848 <dhcp_bind+0x110>
- ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL));
- 8008840: f06f 437f mvn.w r3, #4278190080 @ 0xff000000
- 8008844: 9301 str r3, [sp, #4]
- 8008846: e7ca b.n 80087de <dhcp_bind+0xa6>
- ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL));
- 8008848: f64f 73ff movw r3, #65535 @ 0xffff
- 800884c: 9301 str r3, [sp, #4]
- 800884e: e7c6 b.n 80087de <dhcp_bind+0xa6>
- 8008850: 88888889 .word 0x88888889
- 8008854: 08014e34 .word 0x08014e34
- 8008858: 08015044 .word 0x08015044
- 800885c: 080144e8 .word 0x080144e8
- 8008860: 08015060 .word 0x08015060
- 08008864 <dhcp_handle_nak>:
- {
- 8008864: b510 push {r4, lr}
- 8008866: 4604 mov r4, r0
- dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF);
- 8008868: 210c movs r1, #12
- 800886a: 6a40 ldr r0, [r0, #36] @ 0x24
- 800886c: f7ff fb17 bl 8007e9e <dhcp_set_state>
- netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4);
- 8008870: 4904 ldr r1, [pc, #16] @ (8008884 <dhcp_handle_nak+0x20>)
- 8008872: 460b mov r3, r1
- 8008874: 460a mov r2, r1
- 8008876: 4620 mov r0, r4
- 8008878: f002 ffe8 bl 800b84c <netif_set_addr>
- dhcp_discover(netif);
- 800887c: 4620 mov r0, r4
- 800887e: f7ff fe7d bl 800857c <dhcp_discover>
- }
- 8008882: bd10 pop {r4, pc}
- 8008884: 080156d8 .word 0x080156d8
- 08008888 <dhcp_dec_pcb_refcount>:
- {
- 8008888: b510 push {r4, lr}
- LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0));
- 800888a: 4b0c ldr r3, [pc, #48] @ (80088bc <dhcp_dec_pcb_refcount+0x34>)
- 800888c: 781b ldrb r3, [r3, #0]
- 800888e: b133 cbz r3, 800889e <dhcp_dec_pcb_refcount+0x16>
- dhcp_pcb_refcount--;
- 8008890: 4a0a ldr r2, [pc, #40] @ (80088bc <dhcp_dec_pcb_refcount+0x34>)
- 8008892: 7813 ldrb r3, [r2, #0]
- 8008894: 3b01 subs r3, #1
- 8008896: b2db uxtb r3, r3
- 8008898: 7013 strb r3, [r2, #0]
- if (dhcp_pcb_refcount == 0) {
- 800889a: b13b cbz r3, 80088ac <dhcp_dec_pcb_refcount+0x24>
- }
- 800889c: bd10 pop {r4, pc}
- LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0));
- 800889e: 4b08 ldr r3, [pc, #32] @ (80088c0 <dhcp_dec_pcb_refcount+0x38>)
- 80088a0: 22ff movs r2, #255 @ 0xff
- 80088a2: 4908 ldr r1, [pc, #32] @ (80088c4 <dhcp_dec_pcb_refcount+0x3c>)
- 80088a4: 4808 ldr r0, [pc, #32] @ (80088c8 <dhcp_dec_pcb_refcount+0x40>)
- 80088a6: f00a fdaf bl 8013408 <iprintf>
- 80088aa: e7f1 b.n 8008890 <dhcp_dec_pcb_refcount+0x8>
- udp_remove(dhcp_pcb);
- 80088ac: 4c07 ldr r4, [pc, #28] @ (80088cc <dhcp_dec_pcb_refcount+0x44>)
- 80088ae: 6820 ldr r0, [r4, #0]
- 80088b0: f009 faec bl 8011e8c <udp_remove>
- dhcp_pcb = NULL;
- 80088b4: 2300 movs r3, #0
- 80088b6: 6023 str r3, [r4, #0]
- }
- 80088b8: e7f0 b.n 800889c <dhcp_dec_pcb_refcount+0x14>
- 80088ba: bf00 nop
- 80088bc: 24012ef8 .word 0x24012ef8
- 80088c0: 08014e34 .word 0x08014e34
- 80088c4: 08015078 .word 0x08015078
- 80088c8: 080144e8 .word 0x080144e8
- 80088cc: 24012efc .word 0x24012efc
- 080088d0 <dhcp_inc_pcb_refcount>:
- {
- 80088d0: b538 push {r3, r4, r5, lr}
- if (dhcp_pcb_refcount == 0) {
- 80088d2: 4b17 ldr r3, [pc, #92] @ (8008930 <dhcp_inc_pcb_refcount+0x60>)
- 80088d4: 781b ldrb r3, [r3, #0]
- 80088d6: bb0b cbnz r3, 800891c <dhcp_inc_pcb_refcount+0x4c>
- LWIP_ASSERT("dhcp_inc_pcb_refcount(): memory leak", dhcp_pcb == NULL);
- 80088d8: 4b16 ldr r3, [pc, #88] @ (8008934 <dhcp_inc_pcb_refcount+0x64>)
- 80088da: 681b ldr r3, [r3, #0]
- 80088dc: b12b cbz r3, 80088ea <dhcp_inc_pcb_refcount+0x1a>
- 80088de: 4b16 ldr r3, [pc, #88] @ (8008938 <dhcp_inc_pcb_refcount+0x68>)
- 80088e0: 22e5 movs r2, #229 @ 0xe5
- 80088e2: 4916 ldr r1, [pc, #88] @ (800893c <dhcp_inc_pcb_refcount+0x6c>)
- 80088e4: 4816 ldr r0, [pc, #88] @ (8008940 <dhcp_inc_pcb_refcount+0x70>)
- 80088e6: f00a fd8f bl 8013408 <iprintf>
- dhcp_pcb = udp_new();
- 80088ea: f009 fafd bl 8011ee8 <udp_new>
- 80088ee: 4b11 ldr r3, [pc, #68] @ (8008934 <dhcp_inc_pcb_refcount+0x64>)
- 80088f0: 6018 str r0, [r3, #0]
- if (dhcp_pcb == NULL) {
- 80088f2: b1c8 cbz r0, 8008928 <dhcp_inc_pcb_refcount+0x58>
- ip_set_option(dhcp_pcb, SOF_BROADCAST);
- 80088f4: 7a43 ldrb r3, [r0, #9]
- 80088f6: f043 0320 orr.w r3, r3, #32
- 80088fa: 7243 strb r3, [r0, #9]
- udp_bind(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_CLIENT);
- 80088fc: 4d11 ldr r5, [pc, #68] @ (8008944 <dhcp_inc_pcb_refcount+0x74>)
- 80088fe: 2244 movs r2, #68 @ 0x44
- 8008900: 4629 mov r1, r5
- 8008902: f009 f877 bl 80119f4 <udp_bind>
- udp_connect(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_SERVER);
- 8008906: 4c0b ldr r4, [pc, #44] @ (8008934 <dhcp_inc_pcb_refcount+0x64>)
- 8008908: 2243 movs r2, #67 @ 0x43
- 800890a: 4629 mov r1, r5
- 800890c: 6820 ldr r0, [r4, #0]
- 800890e: f009 fa43 bl 8011d98 <udp_connect>
- udp_recv(dhcp_pcb, dhcp_recv, NULL);
- 8008912: 2200 movs r2, #0
- 8008914: 490c ldr r1, [pc, #48] @ (8008948 <dhcp_inc_pcb_refcount+0x78>)
- 8008916: 6820 ldr r0, [r4, #0]
- 8008918: f009 faa0 bl 8011e5c <udp_recv>
- dhcp_pcb_refcount++;
- 800891c: 4a04 ldr r2, [pc, #16] @ (8008930 <dhcp_inc_pcb_refcount+0x60>)
- 800891e: 7813 ldrb r3, [r2, #0]
- 8008920: 3301 adds r3, #1
- 8008922: 7013 strb r3, [r2, #0]
- return ERR_OK;
- 8008924: 2000 movs r0, #0
- }
- 8008926: bd38 pop {r3, r4, r5, pc}
- return ERR_MEM;
- 8008928: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800892c: e7fb b.n 8008926 <dhcp_inc_pcb_refcount+0x56>
- 800892e: bf00 nop
- 8008930: 24012ef8 .word 0x24012ef8
- 8008934: 24012efc .word 0x24012efc
- 8008938: 08014e34 .word 0x08014e34
- 800893c: 0801509c .word 0x0801509c
- 8008940: 080144e8 .word 0x080144e8
- 8008944: 080156d8 .word 0x080156d8
- 8008948: 08008ddd .word 0x08008ddd
- 0800894c <dhcp_parse_reply>:
- dhcp_clear_all_options(dhcp);
- 800894c: 4bbf ldr r3, [pc, #764] @ (8008c4c <dhcp_parse_reply+0x300>)
- 800894e: 2200 movs r2, #0
- 8008950: 601a str r2, [r3, #0]
- 8008952: 605a str r2, [r3, #4]
- if (p->len < DHCP_SNAME_OFS) {
- 8008954: 8943 ldrh r3, [r0, #10]
- 8008956: 2b2b cmp r3, #43 @ 0x2b
- 8008958: f240 821e bls.w 8008d98 <dhcp_parse_reply+0x44c>
- {
- 800895c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 8008960: b087 sub sp, #28
- options_idx_max = p->tot_len;
- 8008962: 8904 ldrh r4, [r0, #8]
- int parse_sname_as_options = 0;
- 8008964: 4690 mov r8, r2
- options_idx = DHCP_OPTIONS_OFS;
- 8008966: 27f0 movs r7, #240 @ 0xf0
- 8008968: 9002 str r0, [sp, #8]
- q = p;
- 800896a: 9d02 ldr r5, [sp, #8]
- while ((q != NULL) && (options_idx >= q->len)) {
- 800896c: e004 b.n 8008978 <dhcp_parse_reply+0x2c>
- options_idx = (u16_t)(options_idx - q->len);
- 800896e: 1aff subs r7, r7, r3
- 8008970: b2bf uxth r7, r7
- options_idx_max = (u16_t)(options_idx_max - q->len);
- 8008972: 1ae4 subs r4, r4, r3
- 8008974: b2a4 uxth r4, r4
- q = q->next;
- 8008976: 682d ldr r5, [r5, #0]
- while ((q != NULL) && (options_idx >= q->len)) {
- 8008978: 2d00 cmp r5, #0
- 800897a: f000 8210 beq.w 8008d9e <dhcp_parse_reply+0x452>
- 800897e: 896b ldrh r3, [r5, #10]
- 8008980: 42bb cmp r3, r7
- 8008982: d9f4 bls.n 800896e <dhcp_parse_reply+0x22>
- options = (u8_t *)q->payload;
- 8008984: 686b ldr r3, [r5, #4]
- 8008986: 9301 str r3, [sp, #4]
- offset = options_idx;
- 8008988: 463e mov r6, r7
- 800898a: 46c3 mov fp, r8
- while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) {
- 800898c: e0b1 b.n 8008af2 <dhcp_parse_reply+0x1a6>
- len = (q->next != NULL ? ((u8_t *)q->next->payload)[0] : 0);
- 800898e: 682a ldr r2, [r5, #0]
- 8008990: b112 cbz r2, 8008998 <dhcp_parse_reply+0x4c>
- 8008992: 6852 ldr r2, [r2, #4]
- 8008994: 7812 ldrb r2, [r2, #0]
- 8008996: e0c9 b.n 8008b2c <dhcp_parse_reply+0x1e0>
- 8008998: 2200 movs r2, #0
- 800899a: e0c7 b.n 8008b2c <dhcp_parse_reply+0x1e0>
- switch (op) {
- 800899c: 4688 mov r8, r1
- 800899e: 460a mov r2, r1
- 80089a0: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff
- 80089a4: e090 b.n 8008ac8 <dhcp_parse_reply+0x17c>
- LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
- 80089a6: 2a04 cmp r2, #4
- 80089a8: d103 bne.n 80089b2 <dhcp_parse_reply+0x66>
- decode_len = len;
- 80089aa: 4690 mov r8, r2
- decode_idx = DHCP_OPTION_IDX_SUBNET_MASK;
- 80089ac: f04f 0906 mov.w r9, #6
- 80089b0: e08a b.n 8008ac8 <dhcp_parse_reply+0x17c>
- LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
- 80089b2: 4ba7 ldr r3, [pc, #668] @ (8008c50 <dhcp_parse_reply+0x304>)
- 80089b4: f240 622e movw r2, #1582 @ 0x62e
- 80089b8: 49a6 ldr r1, [pc, #664] @ (8008c54 <dhcp_parse_reply+0x308>)
- 80089ba: 48a7 ldr r0, [pc, #668] @ (8008c58 <dhcp_parse_reply+0x30c>)
- 80089bc: f00a fd24 bl 8013408 <iprintf>
- 80089c0: f06f 0005 mvn.w r0, #5
- 80089c4: e1ed b.n 8008da2 <dhcp_parse_reply+0x456>
- LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;);
- 80089c6: 2a03 cmp r2, #3
- 80089c8: d904 bls.n 80089d4 <dhcp_parse_reply+0x88>
- decode_idx = DHCP_OPTION_IDX_ROUTER;
- 80089ca: f04f 0907 mov.w r9, #7
- decode_len = 4; /* only copy the first given router */
- 80089ce: f04f 0804 mov.w r8, #4
- 80089d2: e079 b.n 8008ac8 <dhcp_parse_reply+0x17c>
- LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;);
- 80089d4: 4b9e ldr r3, [pc, #632] @ (8008c50 <dhcp_parse_reply+0x304>)
- 80089d6: f240 6233 movw r2, #1587 @ 0x633
- 80089da: 49a0 ldr r1, [pc, #640] @ (8008c5c <dhcp_parse_reply+0x310>)
- 80089dc: 489e ldr r0, [pc, #632] @ (8008c58 <dhcp_parse_reply+0x30c>)
- 80089de: f00a fd13 bl 8013408 <iprintf>
- 80089e2: f06f 0005 mvn.w r0, #5
- 80089e6: e1dc b.n 8008da2 <dhcp_parse_reply+0x456>
- LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
- 80089e8: 2a04 cmp r2, #4
- 80089ea: d103 bne.n 80089f4 <dhcp_parse_reply+0xa8>
- decode_len = len;
- 80089ec: 4690 mov r8, r2
- decode_idx = DHCP_OPTION_IDX_LEASE_TIME;
- 80089ee: f04f 0903 mov.w r9, #3
- 80089f2: e069 b.n 8008ac8 <dhcp_parse_reply+0x17c>
- LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
- 80089f4: 4b96 ldr r3, [pc, #600] @ (8008c50 <dhcp_parse_reply+0x304>)
- 80089f6: f240 6241 movw r2, #1601 @ 0x641
- 80089fa: 4996 ldr r1, [pc, #600] @ (8008c54 <dhcp_parse_reply+0x308>)
- 80089fc: 4896 ldr r0, [pc, #600] @ (8008c58 <dhcp_parse_reply+0x30c>)
- 80089fe: f00a fd03 bl 8013408 <iprintf>
- 8008a02: f06f 0005 mvn.w r0, #5
- 8008a06: e1cc b.n 8008da2 <dhcp_parse_reply+0x456>
- LWIP_ERROR("len == 1", len == 1, return ERR_VAL;);
- 8008a08: 2a01 cmp r2, #1
- 8008a0a: d105 bne.n 8008a18 <dhcp_parse_reply+0xcc>
- LWIP_ERROR("overload in file/sname", options_idx == DHCP_OPTIONS_OFS, return ERR_VAL;);
- 8008a0c: 2ff0 cmp r7, #240 @ 0xf0
- 8008a0e: d10d bne.n 8008a2c <dhcp_parse_reply+0xe0>
- decode_len = len;
- 8008a10: 4690 mov r8, r2
- decode_idx = DHCP_OPTION_IDX_OVERLOAD;
- 8008a12: f04f 0900 mov.w r9, #0
- 8008a16: e057 b.n 8008ac8 <dhcp_parse_reply+0x17c>
- LWIP_ERROR("len == 1", len == 1, return ERR_VAL;);
- 8008a18: 4b8d ldr r3, [pc, #564] @ (8008c50 <dhcp_parse_reply+0x304>)
- 8008a1a: f240 624f movw r2, #1615 @ 0x64f
- 8008a1e: 4990 ldr r1, [pc, #576] @ (8008c60 <dhcp_parse_reply+0x314>)
- 8008a20: 488d ldr r0, [pc, #564] @ (8008c58 <dhcp_parse_reply+0x30c>)
- 8008a22: f00a fcf1 bl 8013408 <iprintf>
- 8008a26: f06f 0005 mvn.w r0, #5
- 8008a2a: e1ba b.n 8008da2 <dhcp_parse_reply+0x456>
- LWIP_ERROR("overload in file/sname", options_idx == DHCP_OPTIONS_OFS, return ERR_VAL;);
- 8008a2c: 4b88 ldr r3, [pc, #544] @ (8008c50 <dhcp_parse_reply+0x304>)
- 8008a2e: f240 6251 movw r2, #1617 @ 0x651
- 8008a32: 498c ldr r1, [pc, #560] @ (8008c64 <dhcp_parse_reply+0x318>)
- 8008a34: 4888 ldr r0, [pc, #544] @ (8008c58 <dhcp_parse_reply+0x30c>)
- 8008a36: f00a fce7 bl 8013408 <iprintf>
- 8008a3a: f06f 0005 mvn.w r0, #5
- 8008a3e: e1b0 b.n 8008da2 <dhcp_parse_reply+0x456>
- LWIP_ERROR("len == 1", len == 1, return ERR_VAL;);
- 8008a40: 2a01 cmp r2, #1
- 8008a42: d103 bne.n 8008a4c <dhcp_parse_reply+0x100>
- decode_len = len;
- 8008a44: 4690 mov r8, r2
- decode_idx = DHCP_OPTION_IDX_MSG_TYPE;
- 8008a46: f04f 0901 mov.w r9, #1
- 8008a4a: e03d b.n 8008ac8 <dhcp_parse_reply+0x17c>
- LWIP_ERROR("len == 1", len == 1, return ERR_VAL;);
- 8008a4c: 4b80 ldr r3, [pc, #512] @ (8008c50 <dhcp_parse_reply+0x304>)
- 8008a4e: f240 6255 movw r2, #1621 @ 0x655
- 8008a52: 4983 ldr r1, [pc, #524] @ (8008c60 <dhcp_parse_reply+0x314>)
- 8008a54: 4880 ldr r0, [pc, #512] @ (8008c58 <dhcp_parse_reply+0x30c>)
- 8008a56: f00a fcd7 bl 8013408 <iprintf>
- 8008a5a: f06f 0005 mvn.w r0, #5
- 8008a5e: e1a0 b.n 8008da2 <dhcp_parse_reply+0x456>
- LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
- 8008a60: 2a04 cmp r2, #4
- 8008a62: d103 bne.n 8008a6c <dhcp_parse_reply+0x120>
- decode_len = len;
- 8008a64: 4690 mov r8, r2
- decode_idx = DHCP_OPTION_IDX_SERVER_ID;
- 8008a66: f04f 0902 mov.w r9, #2
- 8008a6a: e02d b.n 8008ac8 <dhcp_parse_reply+0x17c>
- LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
- 8008a6c: 4b78 ldr r3, [pc, #480] @ (8008c50 <dhcp_parse_reply+0x304>)
- 8008a6e: f240 6259 movw r2, #1625 @ 0x659
- 8008a72: 4978 ldr r1, [pc, #480] @ (8008c54 <dhcp_parse_reply+0x308>)
- 8008a74: 4878 ldr r0, [pc, #480] @ (8008c58 <dhcp_parse_reply+0x30c>)
- 8008a76: f00a fcc7 bl 8013408 <iprintf>
- 8008a7a: f06f 0005 mvn.w r0, #5
- 8008a7e: e190 b.n 8008da2 <dhcp_parse_reply+0x456>
- LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
- 8008a80: 2a04 cmp r2, #4
- 8008a82: d103 bne.n 8008a8c <dhcp_parse_reply+0x140>
- decode_len = len;
- 8008a84: 4690 mov r8, r2
- decode_idx = DHCP_OPTION_IDX_T1;
- 8008a86: f04f 0904 mov.w r9, #4
- 8008a8a: e01d b.n 8008ac8 <dhcp_parse_reply+0x17c>
- LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
- 8008a8c: 4b70 ldr r3, [pc, #448] @ (8008c50 <dhcp_parse_reply+0x304>)
- 8008a8e: f240 625d movw r2, #1629 @ 0x65d
- 8008a92: 4970 ldr r1, [pc, #448] @ (8008c54 <dhcp_parse_reply+0x308>)
- 8008a94: 4870 ldr r0, [pc, #448] @ (8008c58 <dhcp_parse_reply+0x30c>)
- 8008a96: f00a fcb7 bl 8013408 <iprintf>
- 8008a9a: f06f 0005 mvn.w r0, #5
- 8008a9e: e180 b.n 8008da2 <dhcp_parse_reply+0x456>
- LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
- 8008aa0: 2a04 cmp r2, #4
- 8008aa2: d103 bne.n 8008aac <dhcp_parse_reply+0x160>
- decode_len = len;
- 8008aa4: 4690 mov r8, r2
- decode_idx = DHCP_OPTION_IDX_T2;
- 8008aa6: f04f 0905 mov.w r9, #5
- 8008aaa: e00d b.n 8008ac8 <dhcp_parse_reply+0x17c>
- LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
- 8008aac: 4b68 ldr r3, [pc, #416] @ (8008c50 <dhcp_parse_reply+0x304>)
- 8008aae: f240 6261 movw r2, #1633 @ 0x661
- 8008ab2: 4968 ldr r1, [pc, #416] @ (8008c54 <dhcp_parse_reply+0x308>)
- 8008ab4: 4868 ldr r0, [pc, #416] @ (8008c58 <dhcp_parse_reply+0x30c>)
- 8008ab6: f00a fca7 bl 8013408 <iprintf>
- 8008aba: f06f 0005 mvn.w r0, #5
- 8008abe: e170 b.n 8008da2 <dhcp_parse_reply+0x456>
- int decode_idx = -1;
- 8008ac0: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff
- decode_len = 0;
- 8008ac4: f04f 0800 mov.w r8, #0
- if (op == DHCP_OPTION_PAD) {
- 8008ac8: 2900 cmp r1, #0
- 8008aca: f040 80ad bne.w 8008c28 <dhcp_parse_reply+0x2dc>
- offset++;
- 8008ace: 3601 adds r6, #1
- 8008ad0: b2b6 uxth r6, r6
- if (offset >= q->len) {
- 8008ad2: 896b ldrh r3, [r5, #10]
- 8008ad4: 429e cmp r6, r3
- 8008ad6: d30c bcc.n 8008af2 <dhcp_parse_reply+0x1a6>
- offset = (u16_t)(offset - q->len);
- 8008ad8: 1af6 subs r6, r6, r3
- 8008ada: b2b6 uxth r6, r6
- offset_max = (u16_t)(offset_max - q->len);
- 8008adc: 1ae3 subs r3, r4, r3
- 8008ade: b29c uxth r4, r3
- if (offset < offset_max) {
- 8008ae0: 42a6 cmp r6, r4
- 8008ae2: f080 8167 bcs.w 8008db4 <dhcp_parse_reply+0x468>
- q = q->next;
- 8008ae6: 682d ldr r5, [r5, #0]
- LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;);
- 8008ae8: 2d00 cmp r5, #0
- 8008aea: f000 812a beq.w 8008d42 <dhcp_parse_reply+0x3f6>
- options = (u8_t *)q->payload;
- 8008aee: 686b ldr r3, [r5, #4]
- 8008af0: 9301 str r3, [sp, #4]
- while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) {
- 8008af2: 2d00 cmp r5, #0
- 8008af4: bf18 it ne
- 8008af6: 42a6 cmpne r6, r4
- 8008af8: f080 812d bcs.w 8008d56 <dhcp_parse_reply+0x40a>
- 8008afc: 46b4 mov ip, r6
- 8008afe: 9b01 ldr r3, [sp, #4]
- 8008b00: 5d99 ldrb r1, [r3, r6]
- 8008b02: 29ff cmp r1, #255 @ 0xff
- 8008b04: f000 8127 beq.w 8008d56 <dhcp_parse_reply+0x40a>
- u16_t val_offset = (u16_t)(offset + 2);
- 8008b08: 1cb3 adds r3, r6, #2
- 8008b0a: fa1f fa83 uxth.w sl, r3
- if (val_offset < offset) {
- 8008b0e: 4556 cmp r6, sl
- 8008b10: f200 814a bhi.w 8008da8 <dhcp_parse_reply+0x45c>
- if ((offset + 1) < q->len) {
- 8008b14: 4630 mov r0, r6
- 8008b16: 1c72 adds r2, r6, #1
- 8008b18: f8b5 e00a ldrh.w lr, [r5, #10]
- 8008b1c: 4572 cmp r2, lr
- 8008b1e: f6bf af36 bge.w 800898e <dhcp_parse_reply+0x42>
- len = options[offset + 1];
- 8008b22: f10c 0c01 add.w ip, ip, #1
- 8008b26: 9b01 ldr r3, [sp, #4]
- 8008b28: f813 200c ldrb.w r2, [r3, ip]
- switch (op) {
- 8008b2c: 293b cmp r1, #59 @ 0x3b
- 8008b2e: d8c7 bhi.n 8008ac0 <dhcp_parse_reply+0x174>
- 8008b30: f20f 0c04 addw ip, pc, #4
- 8008b34: f85c f021 ldr.w pc, [ip, r1, lsl #2]
- 8008b38: 0800899d .word 0x0800899d
- 8008b3c: 080089a7 .word 0x080089a7
- 8008b40: 08008ac1 .word 0x08008ac1
- 8008b44: 080089c7 .word 0x080089c7
- 8008b48: 08008ac1 .word 0x08008ac1
- 8008b4c: 08008ac1 .word 0x08008ac1
- 8008b50: 08008ac1 .word 0x08008ac1
- 8008b54: 08008ac1 .word 0x08008ac1
- 8008b58: 08008ac1 .word 0x08008ac1
- 8008b5c: 08008ac1 .word 0x08008ac1
- 8008b60: 08008ac1 .word 0x08008ac1
- 8008b64: 08008ac1 .word 0x08008ac1
- 8008b68: 08008ac1 .word 0x08008ac1
- 8008b6c: 08008ac1 .word 0x08008ac1
- 8008b70: 08008ac1 .word 0x08008ac1
- 8008b74: 08008ac1 .word 0x08008ac1
- 8008b78: 08008ac1 .word 0x08008ac1
- 8008b7c: 08008ac1 .word 0x08008ac1
- 8008b80: 08008ac1 .word 0x08008ac1
- 8008b84: 08008ac1 .word 0x08008ac1
- 8008b88: 08008ac1 .word 0x08008ac1
- 8008b8c: 08008ac1 .word 0x08008ac1
- 8008b90: 08008ac1 .word 0x08008ac1
- 8008b94: 08008ac1 .word 0x08008ac1
- 8008b98: 08008ac1 .word 0x08008ac1
- 8008b9c: 08008ac1 .word 0x08008ac1
- 8008ba0: 08008ac1 .word 0x08008ac1
- 8008ba4: 08008ac1 .word 0x08008ac1
- 8008ba8: 08008ac1 .word 0x08008ac1
- 8008bac: 08008ac1 .word 0x08008ac1
- 8008bb0: 08008ac1 .word 0x08008ac1
- 8008bb4: 08008ac1 .word 0x08008ac1
- 8008bb8: 08008ac1 .word 0x08008ac1
- 8008bbc: 08008ac1 .word 0x08008ac1
- 8008bc0: 08008ac1 .word 0x08008ac1
- 8008bc4: 08008ac1 .word 0x08008ac1
- 8008bc8: 08008ac1 .word 0x08008ac1
- 8008bcc: 08008ac1 .word 0x08008ac1
- 8008bd0: 08008ac1 .word 0x08008ac1
- 8008bd4: 08008ac1 .word 0x08008ac1
- 8008bd8: 08008ac1 .word 0x08008ac1
- 8008bdc: 08008ac1 .word 0x08008ac1
- 8008be0: 08008ac1 .word 0x08008ac1
- 8008be4: 08008ac1 .word 0x08008ac1
- 8008be8: 08008ac1 .word 0x08008ac1
- 8008bec: 08008ac1 .word 0x08008ac1
- 8008bf0: 08008ac1 .word 0x08008ac1
- 8008bf4: 08008ac1 .word 0x08008ac1
- 8008bf8: 08008ac1 .word 0x08008ac1
- 8008bfc: 08008ac1 .word 0x08008ac1
- 8008c00: 08008ac1 .word 0x08008ac1
- 8008c04: 080089e9 .word 0x080089e9
- 8008c08: 08008a09 .word 0x08008a09
- 8008c0c: 08008a41 .word 0x08008a41
- 8008c10: 08008a61 .word 0x08008a61
- 8008c14: 08008ac1 .word 0x08008ac1
- 8008c18: 08008ac1 .word 0x08008ac1
- 8008c1c: 08008ac1 .word 0x08008ac1
- 8008c20: 08008a81 .word 0x08008a81
- 8008c24: 08008aa1 .word 0x08008aa1
- if (offset + len + 2 > 0xFFFF) {
- 8008c28: 4410 add r0, r2
- 8008c2a: f64f 71fd movw r1, #65533 @ 0xfffd
- 8008c2e: 4288 cmp r0, r1
- 8008c30: f300 80bd bgt.w 8008dae <dhcp_parse_reply+0x462>
- offset = (u16_t)(offset + len + 2);
- 8008c34: 4432 add r2, r6
- 8008c36: b292 uxth r2, r2
- 8008c38: 3202 adds r2, #2
- 8008c3a: b296 uxth r6, r2
- if (decode_len > 0) {
- 8008c3c: f1b8 0f00 cmp.w r8, #0
- 8008c40: f43f af47 beq.w 8008ad2 <dhcp_parse_reply+0x186>
- u32_t value = 0;
- 8008c44: 2200 movs r2, #0
- 8008c46: 9205 str r2, [sp, #20]
- 8008c48: 9603 str r6, [sp, #12]
- 8008c4a: e03b b.n 8008cc4 <dhcp_parse_reply+0x378>
- 8008c4c: 24012f00 .word 0x24012f00
- 8008c50: 08014e34 .word 0x08014e34
- 8008c54: 080150c4 .word 0x080150c4
- 8008c58: 080144e8 .word 0x080144e8
- 8008c5c: 080150d0 .word 0x080150d0
- 8008c60: 080150e4 .word 0x080150e4
- 8008c64: 080150f0 .word 0x080150f0
- if (!dhcp_option_given(dhcp, decode_idx)) {
- 8008c68: 4b54 ldr r3, [pc, #336] @ (8008dbc <dhcp_parse_reply+0x470>)
- 8008c6a: f813 3009 ldrb.w r3, [r3, r9]
- 8008c6e: 2b00 cmp r3, #0
- 8008c70: d165 bne.n 8008d3e <dhcp_parse_reply+0x3f2>
- copy_len = LWIP_MIN(decode_len, 4);
- 8008c72: 4646 mov r6, r8
- 8008c74: 2e04 cmp r6, #4
- 8008c76: bf28 it cs
- 8008c78: 2604 movcs r6, #4
- 8008c7a: b2f6 uxtb r6, r6
- if (pbuf_copy_partial(q, &value, copy_len, val_offset) != copy_len) {
- 8008c7c: 4653 mov r3, sl
- 8008c7e: 4632 mov r2, r6
- 8008c80: a905 add r1, sp, #20
- 8008c82: 4628 mov r0, r5
- 8008c84: f003 fb0e bl 800c2a4 <pbuf_copy_partial>
- 8008c88: 42b0 cmp r0, r6
- 8008c8a: d152 bne.n 8008d32 <dhcp_parse_reply+0x3e6>
- if (decode_len > 4) {
- 8008c8c: f1b8 0f04 cmp.w r8, #4
- 8008c90: d92d bls.n 8008cee <dhcp_parse_reply+0x3a2>
- LWIP_ERROR("decode_len %% 4 == 0", decode_len % 4 == 0, return ERR_VAL;);
- 8008c92: f018 0f03 tst.w r8, #3
- 8008c96: d120 bne.n 8008cda <dhcp_parse_reply+0x38e>
- dhcp_got_option(dhcp, decode_idx);
- 8008c98: 4b48 ldr r3, [pc, #288] @ (8008dbc <dhcp_parse_reply+0x470>)
- 8008c9a: 2201 movs r2, #1
- 8008c9c: f803 2009 strb.w r2, [r3, r9]
- dhcp_set_option_value(dhcp, decode_idx, lwip_htonl(value));
- 8008ca0: 9805 ldr r0, [sp, #20]
- 8008ca2: f7ff f8f0 bl 8007e86 <lwip_htonl>
- 8008ca6: 4b46 ldr r3, [pc, #280] @ (8008dc0 <dhcp_parse_reply+0x474>)
- 8008ca8: f843 0029 str.w r0, [r3, r9, lsl #2]
- decode_len = (u8_t)(decode_len - 4);
- 8008cac: f1a8 0804 sub.w r8, r8, #4
- 8008cb0: fa5f f888 uxtb.w r8, r8
- next_val_offset = (u16_t)(val_offset + 4);
- 8008cb4: f10a 0304 add.w r3, sl, #4
- 8008cb8: b29b uxth r3, r3
- if (next_val_offset < val_offset) {
- 8008cba: 459a cmp sl, r3
- 8008cbc: d83c bhi.n 8008d38 <dhcp_parse_reply+0x3ec>
- decode_idx++;
- 8008cbe: f109 0901 add.w r9, r9, #1
- val_offset = next_val_offset;
- 8008cc2: 469a mov sl, r3
- LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX);
- 8008cc4: f1b9 0f07 cmp.w r9, #7
- 8008cc8: d9ce bls.n 8008c68 <dhcp_parse_reply+0x31c>
- 8008cca: 4b3e ldr r3, [pc, #248] @ (8008dc4 <dhcp_parse_reply+0x478>)
- 8008ccc: f44f 62cf mov.w r2, #1656 @ 0x678
- 8008cd0: 493d ldr r1, [pc, #244] @ (8008dc8 <dhcp_parse_reply+0x47c>)
- 8008cd2: 483e ldr r0, [pc, #248] @ (8008dcc <dhcp_parse_reply+0x480>)
- 8008cd4: f00a fb98 bl 8013408 <iprintf>
- 8008cd8: e7c6 b.n 8008c68 <dhcp_parse_reply+0x31c>
- LWIP_ERROR("decode_len %% 4 == 0", decode_len % 4 == 0, return ERR_VAL;);
- 8008cda: 4b3a ldr r3, [pc, #232] @ (8008dc4 <dhcp_parse_reply+0x478>)
- 8008cdc: f240 6281 movw r2, #1665 @ 0x681
- 8008ce0: 493b ldr r1, [pc, #236] @ (8008dd0 <dhcp_parse_reply+0x484>)
- 8008ce2: 483a ldr r0, [pc, #232] @ (8008dcc <dhcp_parse_reply+0x480>)
- 8008ce4: f00a fb90 bl 8013408 <iprintf>
- 8008ce8: f06f 0005 mvn.w r0, #5
- 8008cec: e059 b.n 8008da2 <dhcp_parse_reply+0x456>
- } else if (decode_len == 4) {
- 8008cee: 9e03 ldr r6, [sp, #12]
- 8008cf0: f1b8 0f04 cmp.w r8, #4
- 8008cf4: d00e beq.n 8008d14 <dhcp_parse_reply+0x3c8>
- LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;);
- 8008cf6: f1b8 0f01 cmp.w r8, #1
- 8008cfa: d110 bne.n 8008d1e <dhcp_parse_reply+0x3d2>
- value = ((u8_t *)&value)[0];
- 8008cfc: f89d 3014 ldrb.w r3, [sp, #20]
- 8008d00: 9305 str r3, [sp, #20]
- dhcp_got_option(dhcp, decode_idx);
- 8008d02: 4b2e ldr r3, [pc, #184] @ (8008dbc <dhcp_parse_reply+0x470>)
- 8008d04: 2201 movs r2, #1
- 8008d06: f803 2009 strb.w r2, [r3, r9]
- dhcp_set_option_value(dhcp, decode_idx, value);
- 8008d0a: 4b2d ldr r3, [pc, #180] @ (8008dc0 <dhcp_parse_reply+0x474>)
- 8008d0c: 9a05 ldr r2, [sp, #20]
- 8008d0e: f843 2029 str.w r2, [r3, r9, lsl #2]
- 8008d12: e6de b.n 8008ad2 <dhcp_parse_reply+0x186>
- value = lwip_ntohl(value);
- 8008d14: 9805 ldr r0, [sp, #20]
- 8008d16: f7ff f8b6 bl 8007e86 <lwip_htonl>
- 8008d1a: 9005 str r0, [sp, #20]
- 8008d1c: e7f1 b.n 8008d02 <dhcp_parse_reply+0x3b6>
- LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;);
- 8008d1e: 4b29 ldr r3, [pc, #164] @ (8008dc4 <dhcp_parse_reply+0x478>)
- 8008d20: f44f 62d2 mov.w r2, #1680 @ 0x690
- 8008d24: 492b ldr r1, [pc, #172] @ (8008dd4 <dhcp_parse_reply+0x488>)
- 8008d26: 4829 ldr r0, [pc, #164] @ (8008dcc <dhcp_parse_reply+0x480>)
- 8008d28: f00a fb6e bl 8013408 <iprintf>
- 8008d2c: f06f 0005 mvn.w r0, #5
- 8008d30: e037 b.n 8008da2 <dhcp_parse_reply+0x456>
- return ERR_BUF;
- 8008d32: f06f 0001 mvn.w r0, #1
- 8008d36: e034 b.n 8008da2 <dhcp_parse_reply+0x456>
- return ERR_BUF;
- 8008d38: f06f 0001 mvn.w r0, #1
- 8008d3c: e031 b.n 8008da2 <dhcp_parse_reply+0x456>
- 8008d3e: 9e03 ldr r6, [sp, #12]
- 8008d40: e6c7 b.n 8008ad2 <dhcp_parse_reply+0x186>
- LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;);
- 8008d42: 4b20 ldr r3, [pc, #128] @ (8008dc4 <dhcp_parse_reply+0x478>)
- 8008d44: f240 629d movw r2, #1693 @ 0x69d
- 8008d48: 4923 ldr r1, [pc, #140] @ (8008dd8 <dhcp_parse_reply+0x48c>)
- 8008d4a: 4820 ldr r0, [pc, #128] @ (8008dcc <dhcp_parse_reply+0x480>)
- 8008d4c: f00a fb5c bl 8013408 <iprintf>
- 8008d50: f06f 0005 mvn.w r0, #5
- 8008d54: e025 b.n 8008da2 <dhcp_parse_reply+0x456>
- if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) {
- 8008d56: 46d8 mov r8, fp
- 8008d58: 4b18 ldr r3, [pc, #96] @ (8008dbc <dhcp_parse_reply+0x470>)
- 8008d5a: 781b ldrb r3, [r3, #0]
- 8008d5c: b153 cbz r3, 8008d74 <dhcp_parse_reply+0x428>
- u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD);
- 8008d5e: 4b18 ldr r3, [pc, #96] @ (8008dc0 <dhcp_parse_reply+0x474>)
- 8008d60: 681b ldr r3, [r3, #0]
- dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD);
- 8008d62: 4a16 ldr r2, [pc, #88] @ (8008dbc <dhcp_parse_reply+0x470>)
- 8008d64: 2100 movs r1, #0
- 8008d66: 7011 strb r1, [r2, #0]
- if (overload == DHCP_OVERLOAD_FILE) {
- 8008d68: 2b01 cmp r3, #1
- 8008d6a: d012 beq.n 8008d92 <dhcp_parse_reply+0x446>
- } else if (overload == DHCP_OVERLOAD_SNAME) {
- 8008d6c: 2b02 cmp r3, #2
- 8008d6e: d009 beq.n 8008d84 <dhcp_parse_reply+0x438>
- } else if (overload == DHCP_OVERLOAD_SNAME_FILE) {
- 8008d70: 2b03 cmp r3, #3
- 8008d72: d00c beq.n 8008d8e <dhcp_parse_reply+0x442>
- } else if (parse_sname_as_options) {
- 8008d74: f1b8 0f00 cmp.w r8, #0
- 8008d78: d007 beq.n 8008d8a <dhcp_parse_reply+0x43e>
- parse_sname_as_options = 0;
- 8008d7a: f04f 0800 mov.w r8, #0
- options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN;
- 8008d7e: 246c movs r4, #108 @ 0x6c
- options_idx = DHCP_SNAME_OFS;
- 8008d80: 272c movs r7, #44 @ 0x2c
- 8008d82: e5f2 b.n 800896a <dhcp_parse_reply+0x1e>
- parse_sname_as_options = 1;
- 8008d84: f04f 0801 mov.w r8, #1
- 8008d88: e7f4 b.n 8008d74 <dhcp_parse_reply+0x428>
- return ERR_OK;
- 8008d8a: 2000 movs r0, #0
- 8008d8c: e009 b.n 8008da2 <dhcp_parse_reply+0x456>
- parse_sname_as_options = 1;
- 8008d8e: f04f 0801 mov.w r8, #1
- options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN;
- 8008d92: 24ec movs r4, #236 @ 0xec
- options_idx = DHCP_FILE_OFS;
- 8008d94: 276c movs r7, #108 @ 0x6c
- goto again;
- 8008d96: e5e8 b.n 800896a <dhcp_parse_reply+0x1e>
- return ERR_BUF;
- 8008d98: f06f 0001 mvn.w r0, #1
- }
- 8008d9c: 4770 bx lr
- return ERR_BUF;
- 8008d9e: f06f 0001 mvn.w r0, #1
- }
- 8008da2: b007 add sp, #28
- 8008da4: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
- return ERR_BUF;
- 8008da8: f06f 0001 mvn.w r0, #1
- 8008dac: e7f9 b.n 8008da2 <dhcp_parse_reply+0x456>
- return ERR_BUF;
- 8008dae: f06f 0001 mvn.w r0, #1
- 8008db2: e7f6 b.n 8008da2 <dhcp_parse_reply+0x456>
- return ERR_BUF;
- 8008db4: f06f 0001 mvn.w r0, #1
- 8008db8: e7f3 b.n 8008da2 <dhcp_parse_reply+0x456>
- 8008dba: bf00 nop
- 8008dbc: 24012f00 .word 0x24012f00
- 8008dc0: 24012f08 .word 0x24012f08
- 8008dc4: 08014e34 .word 0x08014e34
- 8008dc8: 08015108 .word 0x08015108
- 8008dcc: 080144e8 .word 0x080144e8
- 8008dd0: 0801511c .word 0x0801511c
- 8008dd4: 08015134 .word 0x08015134
- 8008dd8: 08015148 .word 0x08015148
- 08008ddc <dhcp_recv>:
- {
- 8008ddc: b570 push {r4, r5, r6, lr}
- 8008dde: 4614 mov r4, r2
- struct netif *netif = ip_current_input_netif();
- 8008de0: 4b36 ldr r3, [pc, #216] @ (8008ebc <dhcp_recv+0xe0>)
- 8008de2: 685d ldr r5, [r3, #4]
- struct dhcp *dhcp = netif_dhcp_data(netif);
- 8008de4: 6a6e ldr r6, [r5, #36] @ 0x24
- struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload;
- 8008de6: 6852 ldr r2, [r2, #4]
- if ((dhcp == NULL) || (dhcp->pcb_allocated == 0)) {
- 8008de8: b1f6 cbz r6, 8008e28 <dhcp_recv+0x4c>
- 8008dea: 7933 ldrb r3, [r6, #4]
- 8008dec: b1e3 cbz r3, 8008e28 <dhcp_recv+0x4c>
- if (p->len < DHCP_MIN_REPLY_LEN) {
- 8008dee: 8963 ldrh r3, [r4, #10]
- 8008df0: 2b2b cmp r3, #43 @ 0x2b
- 8008df2: d919 bls.n 8008e28 <dhcp_recv+0x4c>
- if (reply_msg->op != DHCP_BOOTREPLY) {
- 8008df4: 7813 ldrb r3, [r2, #0]
- 8008df6: 2b02 cmp r3, #2
- 8008df8: d116 bne.n 8008e28 <dhcp_recv+0x4c>
- for (i = 0; i < netif->hwaddr_len && i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
- 8008dfa: 2300 movs r3, #0
- 8008dfc: f895 1030 ldrb.w r1, [r5, #48] @ 0x30
- 8008e00: 4299 cmp r1, r3
- 8008e02: d90b bls.n 8008e1c <dhcp_recv+0x40>
- 8008e04: 2b05 cmp r3, #5
- 8008e06: d809 bhi.n 8008e1c <dhcp_recv+0x40>
- if (netif->hwaddr[i] != reply_msg->chaddr[i]) {
- 8008e08: 18e9 adds r1, r5, r3
- 8008e0a: f891 002a ldrb.w r0, [r1, #42] @ 0x2a
- 8008e0e: 18d1 adds r1, r2, r3
- 8008e10: 7f09 ldrb r1, [r1, #28]
- 8008e12: 4288 cmp r0, r1
- 8008e14: d108 bne.n 8008e28 <dhcp_recv+0x4c>
- for (i = 0; i < netif->hwaddr_len && i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
- 8008e16: 3301 adds r3, #1
- 8008e18: b2db uxtb r3, r3
- 8008e1a: e7ef b.n 8008dfc <dhcp_recv+0x20>
- if (lwip_ntohl(reply_msg->xid) != dhcp->xid) {
- 8008e1c: 6850 ldr r0, [r2, #4]
- 8008e1e: f7ff f832 bl 8007e86 <lwip_htonl>
- 8008e22: 6833 ldr r3, [r6, #0]
- 8008e24: 4298 cmp r0, r3
- 8008e26: d003 beq.n 8008e30 <dhcp_recv+0x54>
- pbuf_free(p);
- 8008e28: 4620 mov r0, r4
- 8008e2a: f002 ffb9 bl 800bda0 <pbuf_free>
- }
- 8008e2e: bd70 pop {r4, r5, r6, pc}
- if (dhcp_parse_reply(p, dhcp) != ERR_OK) {
- 8008e30: 4631 mov r1, r6
- 8008e32: 4620 mov r0, r4
- 8008e34: f7ff fd8a bl 800894c <dhcp_parse_reply>
- 8008e38: 2800 cmp r0, #0
- 8008e3a: d1f5 bne.n 8008e28 <dhcp_recv+0x4c>
- if (!dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE)) {
- 8008e3c: 4b20 ldr r3, [pc, #128] @ (8008ec0 <dhcp_recv+0xe4>)
- 8008e3e: 785b ldrb r3, [r3, #1]
- 8008e40: 2b00 cmp r3, #0
- 8008e42: d0f1 beq.n 8008e28 <dhcp_recv+0x4c>
- msg_in = (struct dhcp_msg *)p->payload;
- 8008e44: 6861 ldr r1, [r4, #4]
- msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE);
- 8008e46: 4b1f ldr r3, [pc, #124] @ (8008ec4 <dhcp_recv+0xe8>)
- 8008e48: 791b ldrb r3, [r3, #4]
- if (msg_type == DHCP_ACK) {
- 8008e4a: 2b05 cmp r3, #5
- 8008e4c: d00a beq.n 8008e64 <dhcp_recv+0x88>
- else if ((msg_type == DHCP_NAK) &&
- 8008e4e: 2b06 cmp r3, #6
- 8008e50: d026 beq.n 8008ea0 <dhcp_recv+0xc4>
- else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_STATE_SELECTING)) {
- 8008e52: 2b02 cmp r3, #2
- 8008e54: d1e8 bne.n 8008e28 <dhcp_recv+0x4c>
- 8008e56: 7973 ldrb r3, [r6, #5]
- 8008e58: 2b06 cmp r3, #6
- 8008e5a: d1e5 bne.n 8008e28 <dhcp_recv+0x4c>
- dhcp_handle_offer(netif, msg_in);
- 8008e5c: 4628 mov r0, r5
- 8008e5e: f7ff fb73 bl 8008548 <dhcp_handle_offer>
- 8008e62: e7e1 b.n 8008e28 <dhcp_recv+0x4c>
- if (dhcp->state == DHCP_STATE_REQUESTING) {
- 8008e64: 7973 ldrb r3, [r6, #5]
- 8008e66: 2b01 cmp r3, #1
- 8008e68: d00a beq.n 8008e80 <dhcp_recv+0xa4>
- else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) ||
- 8008e6a: 3b03 subs r3, #3
- 8008e6c: b2db uxtb r3, r3
- 8008e6e: 2b02 cmp r3, #2
- 8008e70: d8da bhi.n 8008e28 <dhcp_recv+0x4c>
- dhcp_handle_ack(netif, msg_in);
- 8008e72: 4628 mov r0, r5
- 8008e74: f7ff f936 bl 80080e4 <dhcp_handle_ack>
- dhcp_bind(netif);
- 8008e78: 4628 mov r0, r5
- 8008e7a: f7ff fc5d bl 8008738 <dhcp_bind>
- 8008e7e: e7d3 b.n 8008e28 <dhcp_recv+0x4c>
- dhcp_handle_ack(netif, msg_in);
- 8008e80: 4628 mov r0, r5
- 8008e82: f7ff f92f bl 80080e4 <dhcp_handle_ack>
- if ((netif->flags & NETIF_FLAG_ETHARP) != 0) {
- 8008e86: f895 3031 ldrb.w r3, [r5, #49] @ 0x31
- 8008e8a: f013 0f08 tst.w r3, #8
- 8008e8e: d003 beq.n 8008e98 <dhcp_recv+0xbc>
- dhcp_check(netif);
- 8008e90: 4628 mov r0, r5
- 8008e92: f7ff fc3b bl 800870c <dhcp_check>
- 8008e96: e7c7 b.n 8008e28 <dhcp_recv+0x4c>
- dhcp_bind(netif);
- 8008e98: 4628 mov r0, r5
- 8008e9a: f7ff fc4d bl 8008738 <dhcp_bind>
- 8008e9e: e7c3 b.n 8008e28 <dhcp_recv+0x4c>
- ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
- 8008ea0: 7972 ldrb r2, [r6, #5]
- else if ((msg_type == DHCP_NAK) &&
- 8008ea2: 2a01 cmp r2, #1
- 8008ea4: bf18 it ne
- 8008ea6: 2a03 cmpne r2, #3
- 8008ea8: d003 beq.n 8008eb2 <dhcp_recv+0xd6>
- ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
- 8008eaa: 2a04 cmp r2, #4
- 8008eac: d001 beq.n 8008eb2 <dhcp_recv+0xd6>
- (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) {
- 8008eae: 2a05 cmp r2, #5
- 8008eb0: d1cf bne.n 8008e52 <dhcp_recv+0x76>
- dhcp_handle_nak(netif);
- 8008eb2: 4628 mov r0, r5
- 8008eb4: f7ff fcd6 bl 8008864 <dhcp_handle_nak>
- 8008eb8: e7b6 b.n 8008e28 <dhcp_recv+0x4c>
- 8008eba: bf00 nop
- 8008ebc: 2401301c .word 0x2401301c
- 8008ec0: 24012f00 .word 0x24012f00
- 8008ec4: 24012f08 .word 0x24012f08
- 08008ec8 <dhcp_network_changed>:
- {
- 8008ec8: b538 push {r3, r4, r5, lr}
- struct dhcp *dhcp = netif_dhcp_data(netif);
- 8008eca: 6a45 ldr r5, [r0, #36] @ 0x24
- if (!dhcp) {
- 8008ecc: b135 cbz r5, 8008edc <dhcp_network_changed+0x14>
- 8008ece: 4604 mov r4, r0
- switch (dhcp->state) {
- 8008ed0: 796b ldrb r3, [r5, #5]
- 8008ed2: 2b05 cmp r3, #5
- 8008ed4: d803 bhi.n 8008ede <dhcp_network_changed+0x16>
- 8008ed6: 2b03 cmp r3, #3
- 8008ed8: d203 bcs.n 8008ee2 <dhcp_network_changed+0x1a>
- 8008eda: b943 cbnz r3, 8008eee <dhcp_network_changed+0x26>
- }
- 8008edc: bd38 pop {r3, r4, r5, pc}
- switch (dhcp->state) {
- 8008ede: 2b0a cmp r3, #10
- 8008ee0: d105 bne.n 8008eee <dhcp_network_changed+0x26>
- dhcp->tries = 0;
- 8008ee2: 2300 movs r3, #0
- 8008ee4: 71ab strb r3, [r5, #6]
- dhcp_reboot(netif);
- 8008ee6: 4620 mov r0, r4
- 8008ee8: f7ff f9e6 bl 80082b8 <dhcp_reboot>
- break;
- 8008eec: e7f6 b.n 8008edc <dhcp_network_changed+0x14>
- LWIP_ASSERT("invalid dhcp->state", dhcp->state <= DHCP_STATE_BACKING_OFF);
- 8008eee: 2b0c cmp r3, #12
- 8008ef0: d805 bhi.n 8008efe <dhcp_network_changed+0x36>
- dhcp->tries = 0;
- 8008ef2: 2300 movs r3, #0
- 8008ef4: 71ab strb r3, [r5, #6]
- dhcp_discover(netif);
- 8008ef6: 4620 mov r0, r4
- 8008ef8: f7ff fb40 bl 800857c <dhcp_discover>
- break;
- 8008efc: e7ee b.n 8008edc <dhcp_network_changed+0x14>
- LWIP_ASSERT("invalid dhcp->state", dhcp->state <= DHCP_STATE_BACKING_OFF);
- 8008efe: 4b04 ldr r3, [pc, #16] @ (8008f10 <dhcp_network_changed+0x48>)
- 8008f00: f240 326d movw r2, #877 @ 0x36d
- 8008f04: 4903 ldr r1, [pc, #12] @ (8008f14 <dhcp_network_changed+0x4c>)
- 8008f06: 4804 ldr r0, [pc, #16] @ (8008f18 <dhcp_network_changed+0x50>)
- 8008f08: f00a fa7e bl 8013408 <iprintf>
- 8008f0c: e7f1 b.n 8008ef2 <dhcp_network_changed+0x2a>
- 8008f0e: bf00 nop
- 8008f10: 08014e34 .word 0x08014e34
- 8008f14: 08015190 .word 0x08015190
- 8008f18: 080144e8 .word 0x080144e8
- 08008f1c <dhcp_arp_reply>:
- {
- 8008f1c: b508 push {r3, lr}
- LWIP_ERROR("netif != NULL", (netif != NULL), return;);
- 8008f1e: b130 cbz r0, 8008f2e <dhcp_arp_reply+0x12>
- 8008f20: 4602 mov r2, r0
- dhcp = netif_dhcp_data(netif);
- 8008f22: 6a43 ldr r3, [r0, #36] @ 0x24
- if ((dhcp != NULL) && (dhcp->state == DHCP_STATE_CHECKING)) {
- 8008f24: b113 cbz r3, 8008f2c <dhcp_arp_reply+0x10>
- 8008f26: 7958 ldrb r0, [r3, #5]
- 8008f28: 2808 cmp r0, #8
- 8008f2a: d008 beq.n 8008f3e <dhcp_arp_reply+0x22>
- }
- 8008f2c: bd08 pop {r3, pc}
- LWIP_ERROR("netif != NULL", (netif != NULL), return;);
- 8008f2e: 4b08 ldr r3, [pc, #32] @ (8008f50 <dhcp_arp_reply+0x34>)
- 8008f30: f240 328b movw r2, #907 @ 0x38b
- 8008f34: 4907 ldr r1, [pc, #28] @ (8008f54 <dhcp_arp_reply+0x38>)
- 8008f36: 4808 ldr r0, [pc, #32] @ (8008f58 <dhcp_arp_reply+0x3c>)
- 8008f38: f00a fa66 bl 8013408 <iprintf>
- 8008f3c: e7f6 b.n 8008f2c <dhcp_arp_reply+0x10>
- if (ip4_addr_cmp(addr, &dhcp->offered_ip_addr)) {
- 8008f3e: 6809 ldr r1, [r1, #0]
- 8008f40: 69db ldr r3, [r3, #28]
- 8008f42: 4299 cmp r1, r3
- 8008f44: d1f2 bne.n 8008f2c <dhcp_arp_reply+0x10>
- dhcp_decline(netif);
- 8008f46: 4610 mov r0, r2
- 8008f48: f7ff fb92 bl 8008670 <dhcp_decline>
- 8008f4c: e7ee b.n 8008f2c <dhcp_arp_reply+0x10>
- 8008f4e: bf00 nop
- 8008f50: 08014e34 .word 0x08014e34
- 8008f54: 080144d8 .word 0x080144d8
- 8008f58: 080144e8 .word 0x080144e8
- 08008f5c <dhcp_renew>:
- {
- 8008f5c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8008f60: b084 sub sp, #16
- 8008f62: 4607 mov r7, r0
- struct dhcp *dhcp = netif_dhcp_data(netif);
- 8008f64: 6a45 ldr r5, [r0, #36] @ 0x24
- LWIP_ASSERT_CORE_LOCKED();
- 8008f66: f7fa fdd1 bl 8003b0c <sys_check_core_locking>
- dhcp_set_state(dhcp, DHCP_STATE_RENEWING);
- 8008f6a: 2105 movs r1, #5
- 8008f6c: 4628 mov r0, r5
- 8008f6e: f7fe ff96 bl 8007e9e <dhcp_set_state>
- p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
- 8008f72: f10d 030e add.w r3, sp, #14
- 8008f76: 2203 movs r2, #3
- 8008f78: 4629 mov r1, r5
- 8008f7a: 4638 mov r0, r7
- 8008f7c: f7ff f814 bl 8007fa8 <dhcp_create_msg>
- if (p_out != NULL) {
- 8008f80: 2800 cmp r0, #0
- 8008f82: d049 beq.n 8009018 <dhcp_renew+0xbc>
- 8008f84: 4680 mov r8, r0
- struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
- 8008f86: 6846 ldr r6, [r0, #4]
- options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
- 8008f88: 36f0 adds r6, #240 @ 0xf0
- 8008f8a: 2302 movs r3, #2
- 8008f8c: 2239 movs r2, #57 @ 0x39
- 8008f8e: 4631 mov r1, r6
- 8008f90: f8bd 000e ldrh.w r0, [sp, #14]
- 8008f94: f7fe ffaa bl 8007eec <dhcp_option>
- 8008f98: f8ad 000e strh.w r0, [sp, #14]
- options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
- 8008f9c: 8d3a ldrh r2, [r7, #40] @ 0x28
- 8008f9e: 4631 mov r1, r6
- 8008fa0: f7fe ff86 bl 8007eb0 <dhcp_option_short>
- 8008fa4: f8ad 000e strh.w r0, [sp, #14]
- options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
- 8008fa8: 2303 movs r3, #3
- 8008faa: 2237 movs r2, #55 @ 0x37
- 8008fac: 4631 mov r1, r6
- 8008fae: f7fe ff9d bl 8007eec <dhcp_option>
- 8008fb2: f8ad 000e strh.w r0, [sp, #14]
- for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
- 8008fb6: 2400 movs r4, #0
- 8008fb8: e00a b.n 8008fd0 <dhcp_renew+0x74>
- options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
- 8008fba: 4b20 ldr r3, [pc, #128] @ (800903c <dhcp_renew+0xe0>)
- 8008fbc: 5d1a ldrb r2, [r3, r4]
- 8008fbe: 4631 mov r1, r6
- 8008fc0: f8bd 000e ldrh.w r0, [sp, #14]
- 8008fc4: f7fe ffb0 bl 8007f28 <dhcp_option_byte>
- 8008fc8: f8ad 000e strh.w r0, [sp, #14]
- for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
- 8008fcc: 3401 adds r4, #1
- 8008fce: b2e4 uxtb r4, r4
- 8008fd0: 2c02 cmp r4, #2
- 8008fd2: d9f2 bls.n 8008fba <dhcp_renew+0x5e>
- dhcp_option_trailer(options_out_len, msg_out->options, p_out);
- 8008fd4: 4642 mov r2, r8
- 8008fd6: 4631 mov r1, r6
- 8008fd8: f8bd 000e ldrh.w r0, [sp, #14]
- 8008fdc: f7ff f8c0 bl 8008160 <dhcp_option_trailer>
- result = udp_sendto_if(dhcp_pcb, p_out, &dhcp->server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif);
- 8008fe0: 9700 str r7, [sp, #0]
- 8008fe2: 2343 movs r3, #67 @ 0x43
- 8008fe4: f105 0218 add.w r2, r5, #24
- 8008fe8: 4641 mov r1, r8
- 8008fea: 4815 ldr r0, [pc, #84] @ (8009040 <dhcp_renew+0xe4>)
- 8008fec: 6800 ldr r0, [r0, #0]
- 8008fee: f008 fe15 bl 8011c1c <udp_sendto_if>
- 8008ff2: 4604 mov r4, r0
- pbuf_free(p_out);
- 8008ff4: 4640 mov r0, r8
- 8008ff6: f002 fed3 bl 800bda0 <pbuf_free>
- if (dhcp->tries < 255) {
- 8008ffa: 79ab ldrb r3, [r5, #6]
- 8008ffc: 2bff cmp r3, #255 @ 0xff
- 8008ffe: d001 beq.n 8009004 <dhcp_renew+0xa8>
- dhcp->tries++;
- 8009000: 3301 adds r3, #1
- 8009002: 71ab strb r3, [r5, #6]
- msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000);
- 8009004: 79ab ldrb r3, [r5, #6]
- 8009006: 2b09 cmp r3, #9
- 8009008: d809 bhi.n 800901e <dhcp_renew+0xc2>
- 800900a: ebc3 1243 rsb r2, r3, r3, lsl #5
- 800900e: eb03 0382 add.w r3, r3, r2, lsl #2
- 8009012: 011b lsls r3, r3, #4
- 8009014: b29b uxth r3, r3
- 8009016: e004 b.n 8009022 <dhcp_renew+0xc6>
- result = ERR_MEM;
- 8009018: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
- 800901c: e7ed b.n 8008ffa <dhcp_renew+0x9e>
- msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000);
- 800901e: f644 6320 movw r3, #20000 @ 0x4e20
- dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
- 8009022: f203 13f3 addw r3, r3, #499 @ 0x1f3
- 8009026: 4a07 ldr r2, [pc, #28] @ (8009044 <dhcp_renew+0xe8>)
- 8009028: fb82 1203 smull r1, r2, r2, r3
- 800902c: 17db asrs r3, r3, #31
- 800902e: ebc3 1362 rsb r3, r3, r2, asr #5
- 8009032: 812b strh r3, [r5, #8]
- }
- 8009034: 4620 mov r0, r4
- 8009036: b004 add sp, #16
- 8009038: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- 800903c: 080151c8 .word 0x080151c8
- 8009040: 24012efc .word 0x24012efc
- 8009044: 10624dd3 .word 0x10624dd3
- 08009048 <dhcp_t1_timeout>:
- {
- 8009048: b510 push {r4, lr}
- struct dhcp *dhcp = netif_dhcp_data(netif);
- 800904a: 6a44 ldr r4, [r0, #36] @ 0x24
- if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
- 800904c: 7963 ldrb r3, [r4, #5]
- 800904e: 2b0a cmp r3, #10
- 8009050: bf18 it ne
- 8009052: 2b01 cmpne r3, #1
- 8009054: d002 beq.n 800905c <dhcp_t1_timeout+0x14>
- 8009056: 2b05 cmp r3, #5
- 8009058: d000 beq.n 800905c <dhcp_t1_timeout+0x14>
- }
- 800905a: bd10 pop {r4, pc}
- dhcp_renew(netif);
- 800905c: f7ff ff7e bl 8008f5c <dhcp_renew>
- if (((dhcp->t2_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) {
- 8009060: 89a3 ldrh r3, [r4, #12]
- 8009062: 8a62 ldrh r2, [r4, #18]
- 8009064: 1a9b subs r3, r3, r2
- 8009066: 2b01 cmp r3, #1
- 8009068: ddf7 ble.n 800905a <dhcp_t1_timeout+0x12>
- dhcp->t1_renew_time = (u16_t)((dhcp->t2_timeout - dhcp->lease_used) / 2);
- 800906a: 461a mov r2, r3
- 800906c: 2b00 cmp r3, #0
- 800906e: db03 blt.n 8009078 <dhcp_t1_timeout+0x30>
- 8009070: f3c2 024f ubfx r2, r2, #1, #16
- 8009074: 81e2 strh r2, [r4, #14]
- }
- 8009076: e7f0 b.n 800905a <dhcp_t1_timeout+0x12>
- dhcp->t1_renew_time = (u16_t)((dhcp->t2_timeout - dhcp->lease_used) / 2);
- 8009078: 1c5a adds r2, r3, #1
- 800907a: e7f9 b.n 8009070 <dhcp_t1_timeout+0x28>
- 0800907c <dhcp_supplied_address>:
- * 0 otherwise
- */
- u8_t
- dhcp_supplied_address(const struct netif *netif)
- {
- if ((netif != NULL) && (netif_dhcp_data(netif) != NULL)) {
- 800907c: b178 cbz r0, 800909e <dhcp_supplied_address+0x22>
- 800907e: 6a43 ldr r3, [r0, #36] @ 0x24
- 8009080: b17b cbz r3, 80090a2 <dhcp_supplied_address+0x26>
- struct dhcp *dhcp = netif_dhcp_data(netif);
- return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) ||
- 8009082: 795b ldrb r3, [r3, #5]
- 8009084: 2b05 cmp r3, #5
- 8009086: bf18 it ne
- 8009088: 2b0a cmpne r3, #10
- 800908a: d005 beq.n 8009098 <dhcp_supplied_address+0x1c>
- 800908c: 2b04 cmp r3, #4
- 800908e: d001 beq.n 8009094 <dhcp_supplied_address+0x18>
- 8009090: 2000 movs r0, #0
- 8009092: e002 b.n 800909a <dhcp_supplied_address+0x1e>
- 8009094: 2001 movs r0, #1
- 8009096: e000 b.n 800909a <dhcp_supplied_address+0x1e>
- 8009098: 2001 movs r0, #1
- 800909a: b2c0 uxtb r0, r0
- 800909c: 4770 bx lr
- (dhcp->state == DHCP_STATE_REBINDING);
- }
- return 0;
- 800909e: 2000 movs r0, #0
- 80090a0: 4770 bx lr
- 80090a2: 2000 movs r0, #0
- }
- 80090a4: 4770 bx lr
- ...
- 080090a8 <dhcp_release_and_stop>:
- {
- 80090a8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 80090ac: b084 sub sp, #16
- 80090ae: 4605 mov r5, r0
- struct dhcp *dhcp = netif_dhcp_data(netif);
- 80090b0: 6a44 ldr r4, [r0, #36] @ 0x24
- LWIP_ASSERT_CORE_LOCKED();
- 80090b2: f7fa fd2b bl 8003b0c <sys_check_core_locking>
- if (dhcp == NULL) {
- 80090b6: b1fc cbz r4, 80090f8 <dhcp_release_and_stop+0x50>
- if (dhcp->state == DHCP_STATE_OFF) {
- 80090b8: 7963 ldrb r3, [r4, #5]
- 80090ba: b1eb cbz r3, 80090f8 <dhcp_release_and_stop+0x50>
- ip_addr_copy(server_ip_addr, dhcp->server_ip_addr);
- 80090bc: 69a3 ldr r3, [r4, #24]
- 80090be: 9303 str r3, [sp, #12]
- ip_addr_set_zero_ip4(&dhcp->server_ip_addr);
- 80090c0: 2300 movs r3, #0
- 80090c2: 61a3 str r3, [r4, #24]
- ip4_addr_set_zero(&dhcp->offered_ip_addr);
- 80090c4: 61e3 str r3, [r4, #28]
- ip4_addr_set_zero(&dhcp->offered_sn_mask);
- 80090c6: 6223 str r3, [r4, #32]
- ip4_addr_set_zero(&dhcp->offered_gw_addr);
- 80090c8: 6263 str r3, [r4, #36] @ 0x24
- dhcp->offered_t0_lease = dhcp->offered_t1_renew = dhcp->offered_t2_rebind = 0;
- 80090ca: 6323 str r3, [r4, #48] @ 0x30
- 80090cc: 62e3 str r3, [r4, #44] @ 0x2c
- 80090ce: 62a3 str r3, [r4, #40] @ 0x28
- dhcp->t1_renew_time = dhcp->t2_rebind_time = dhcp->lease_used = dhcp->t0_timeout = 0;
- 80090d0: 82a3 strh r3, [r4, #20]
- 80090d2: 8263 strh r3, [r4, #18]
- 80090d4: 8223 strh r3, [r4, #16]
- 80090d6: 81e3 strh r3, [r4, #14]
- if (dhcp_supplied_address(netif)) {
- 80090d8: 4628 mov r0, r5
- 80090da: f7ff ffcf bl 800907c <dhcp_supplied_address>
- 80090de: b970 cbnz r0, 80090fe <dhcp_release_and_stop+0x56>
- netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4);
- 80090e0: 4921 ldr r1, [pc, #132] @ (8009168 <dhcp_release_and_stop+0xc0>)
- 80090e2: 460b mov r3, r1
- 80090e4: 460a mov r2, r1
- 80090e6: 4628 mov r0, r5
- 80090e8: f002 fbb0 bl 800b84c <netif_set_addr>
- dhcp_set_state(dhcp, DHCP_STATE_OFF);
- 80090ec: 2100 movs r1, #0
- 80090ee: 4620 mov r0, r4
- 80090f0: f7fe fed5 bl 8007e9e <dhcp_set_state>
- if (dhcp->pcb_allocated != 0) {
- 80090f4: 7923 ldrb r3, [r4, #4]
- 80090f6: bb93 cbnz r3, 800915e <dhcp_release_and_stop+0xb6>
- }
- 80090f8: b004 add sp, #16
- 80090fa: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- p_out = dhcp_create_msg(netif, dhcp, DHCP_RELEASE, &options_out_len);
- 80090fe: f10d 030a add.w r3, sp, #10
- 8009102: 2207 movs r2, #7
- 8009104: 4621 mov r1, r4
- 8009106: 4628 mov r0, r5
- 8009108: f7fe ff4e bl 8007fa8 <dhcp_create_msg>
- if (p_out != NULL) {
- 800910c: 4607 mov r7, r0
- 800910e: 2800 cmp r0, #0
- 8009110: d0e6 beq.n 80090e0 <dhcp_release_and_stop+0x38>
- struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
- 8009112: 6846 ldr r6, [r0, #4]
- options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4);
- 8009114: 36f0 adds r6, #240 @ 0xf0
- 8009116: 2304 movs r3, #4
- 8009118: 2236 movs r2, #54 @ 0x36
- 800911a: 4631 mov r1, r6
- 800911c: f8bd 000a ldrh.w r0, [sp, #10]
- 8009120: f7fe fee4 bl 8007eec <dhcp_option>
- 8009124: 4680 mov r8, r0
- 8009126: f8ad 000a strh.w r0, [sp, #10]
- options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&server_ip_addr))));
- 800912a: 9803 ldr r0, [sp, #12]
- 800912c: f7fe feab bl 8007e86 <lwip_htonl>
- 8009130: 4602 mov r2, r0
- 8009132: 4631 mov r1, r6
- 8009134: 4640 mov r0, r8
- 8009136: f7fe ff0f bl 8007f58 <dhcp_option_long>
- 800913a: f8ad 000a strh.w r0, [sp, #10]
- dhcp_option_trailer(options_out_len, msg_out->options, p_out);
- 800913e: 463a mov r2, r7
- 8009140: 4631 mov r1, r6
- 8009142: f7ff f80d bl 8008160 <dhcp_option_trailer>
- udp_sendto_if(dhcp_pcb, p_out, &server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif);
- 8009146: 9500 str r5, [sp, #0]
- 8009148: 2343 movs r3, #67 @ 0x43
- 800914a: aa03 add r2, sp, #12
- 800914c: 4639 mov r1, r7
- 800914e: 4807 ldr r0, [pc, #28] @ (800916c <dhcp_release_and_stop+0xc4>)
- 8009150: 6800 ldr r0, [r0, #0]
- 8009152: f008 fd63 bl 8011c1c <udp_sendto_if>
- pbuf_free(p_out);
- 8009156: 4638 mov r0, r7
- 8009158: f002 fe22 bl 800bda0 <pbuf_free>
- LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_release: could not allocate DHCP request\n"));
- 800915c: e7c0 b.n 80090e0 <dhcp_release_and_stop+0x38>
- dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */
- 800915e: f7ff fb93 bl 8008888 <dhcp_dec_pcb_refcount>
- dhcp->pcb_allocated = 0;
- 8009162: 2300 movs r3, #0
- 8009164: 7123 strb r3, [r4, #4]
- 8009166: e7c7 b.n 80090f8 <dhcp_release_and_stop+0x50>
- 8009168: 080156d8 .word 0x080156d8
- 800916c: 24012efc .word 0x24012efc
- 08009170 <dhcp_start>:
- {
- 8009170: b570 push {r4, r5, r6, lr}
- 8009172: 4604 mov r4, r0
- LWIP_ASSERT_CORE_LOCKED();
- 8009174: f7fa fcca bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;);
- 8009178: b324 cbz r4, 80091c4 <dhcp_start+0x54>
- LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;);
- 800917a: f894 3031 ldrb.w r3, [r4, #49] @ 0x31
- 800917e: f013 0f01 tst.w r3, #1
- 8009182: d029 beq.n 80091d8 <dhcp_start+0x68>
- dhcp = netif_dhcp_data(netif);
- 8009184: 6a65 ldr r5, [r4, #36] @ 0x24
- if (netif->mtu < DHCP_MAX_MSG_LEN_MIN_REQUIRED) {
- 8009186: 8d23 ldrh r3, [r4, #40] @ 0x28
- 8009188: f5b3 7f10 cmp.w r3, #576 @ 0x240
- 800918c: d343 bcc.n 8009216 <dhcp_start+0xa6>
- if (dhcp == NULL) {
- 800918e: b36d cbz r5, 80091ec <dhcp_start+0x7c>
- if (dhcp->pcb_allocated != 0) {
- 8009190: 792b ldrb r3, [r5, #4]
- 8009192: bb93 cbnz r3, 80091fa <dhcp_start+0x8a>
- memset(dhcp, 0, sizeof(struct dhcp));
- 8009194: 2234 movs r2, #52 @ 0x34
- 8009196: 2100 movs r1, #0
- 8009198: 4628 mov r0, r5
- 800919a: f00a fa8d bl 80136b8 <memset>
- if (dhcp_inc_pcb_refcount() != ERR_OK) { /* ensure DHCP PCB is allocated */
- 800919e: f7ff fb97 bl 80088d0 <dhcp_inc_pcb_refcount>
- 80091a2: 4606 mov r6, r0
- 80091a4: 2800 cmp r0, #0
- 80091a6: d13c bne.n 8009222 <dhcp_start+0xb2>
- dhcp->pcb_allocated = 1;
- 80091a8: 2301 movs r3, #1
- 80091aa: 712b strb r3, [r5, #4]
- if (!netif_is_link_up(netif)) {
- 80091ac: f894 3031 ldrb.w r3, [r4, #49] @ 0x31
- 80091b0: f013 0f04 tst.w r3, #4
- 80091b4: d024 beq.n 8009200 <dhcp_start+0x90>
- result = dhcp_discover(netif);
- 80091b6: 4620 mov r0, r4
- 80091b8: f7ff f9e0 bl 800857c <dhcp_discover>
- if (result != ERR_OK) {
- 80091bc: 4606 mov r6, r0
- 80091be: bb20 cbnz r0, 800920a <dhcp_start+0x9a>
- }
- 80091c0: 4630 mov r0, r6
- 80091c2: bd70 pop {r4, r5, r6, pc}
- LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;);
- 80091c4: 4b18 ldr r3, [pc, #96] @ (8009228 <dhcp_start+0xb8>)
- 80091c6: f240 22e7 movw r2, #743 @ 0x2e7
- 80091ca: 4918 ldr r1, [pc, #96] @ (800922c <dhcp_start+0xbc>)
- 80091cc: 4818 ldr r0, [pc, #96] @ (8009230 <dhcp_start+0xc0>)
- 80091ce: f00a f91b bl 8013408 <iprintf>
- 80091d2: f06f 060f mvn.w r6, #15
- 80091d6: e7f3 b.n 80091c0 <dhcp_start+0x50>
- LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;);
- 80091d8: 4b13 ldr r3, [pc, #76] @ (8009228 <dhcp_start+0xb8>)
- 80091da: f44f 723a mov.w r2, #744 @ 0x2e8
- 80091de: 4915 ldr r1, [pc, #84] @ (8009234 <dhcp_start+0xc4>)
- 80091e0: 4813 ldr r0, [pc, #76] @ (8009230 <dhcp_start+0xc0>)
- 80091e2: f00a f911 bl 8013408 <iprintf>
- 80091e6: f06f 060f mvn.w r6, #15
- 80091ea: e7e9 b.n 80091c0 <dhcp_start+0x50>
- dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp));
- 80091ec: 2034 movs r0, #52 @ 0x34
- 80091ee: f002 f8d1 bl 800b394 <mem_malloc>
- if (dhcp == NULL) {
- 80091f2: 4605 mov r5, r0
- 80091f4: b190 cbz r0, 800921c <dhcp_start+0xac>
- netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp);
- 80091f6: 6260 str r0, [r4, #36] @ 0x24
- LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): allocated dhcp"));
- 80091f8: e7cc b.n 8009194 <dhcp_start+0x24>
- dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */
- 80091fa: f7ff fb45 bl 8008888 <dhcp_dec_pcb_refcount>
- 80091fe: e7c9 b.n 8009194 <dhcp_start+0x24>
- dhcp_set_state(dhcp, DHCP_STATE_INIT);
- 8009200: 2102 movs r1, #2
- 8009202: 4628 mov r0, r5
- 8009204: f7fe fe4b bl 8007e9e <dhcp_set_state>
- return ERR_OK;
- 8009208: e7da b.n 80091c0 <dhcp_start+0x50>
- dhcp_release_and_stop(netif);
- 800920a: 4620 mov r0, r4
- 800920c: f7ff ff4c bl 80090a8 <dhcp_release_and_stop>
- return ERR_MEM;
- 8009210: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
- 8009214: e7d4 b.n 80091c0 <dhcp_start+0x50>
- return ERR_MEM;
- 8009216: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
- 800921a: e7d1 b.n 80091c0 <dhcp_start+0x50>
- return ERR_MEM;
- 800921c: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
- 8009220: e7ce b.n 80091c0 <dhcp_start+0x50>
- return ERR_MEM;
- 8009222: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
- 8009226: e7cb b.n 80091c0 <dhcp_start+0x50>
- 8009228: 08014e34 .word 0x08014e34
- 800922c: 080144d8 .word 0x080144d8
- 8009230: 080144e8 .word 0x080144e8
- 8009234: 080151a4 .word 0x080151a4
- 08009238 <dhcp_coarse_tmr>:
- {
- 8009238: b510 push {r4, lr}
- NETIF_FOREACH(netif) {
- 800923a: 4b17 ldr r3, [pc, #92] @ (8009298 <dhcp_coarse_tmr+0x60>)
- 800923c: 681c ldr r4, [r3, #0]
- 800923e: e006 b.n 800924e <dhcp_coarse_tmr+0x16>
- dhcp_release_and_stop(netif);
- 8009240: 4620 mov r0, r4
- 8009242: f7ff ff31 bl 80090a8 <dhcp_release_and_stop>
- dhcp_start(netif);
- 8009246: 4620 mov r0, r4
- 8009248: f7ff ff92 bl 8009170 <dhcp_start>
- NETIF_FOREACH(netif) {
- 800924c: 6824 ldr r4, [r4, #0]
- 800924e: b314 cbz r4, 8009296 <dhcp_coarse_tmr+0x5e>
- struct dhcp *dhcp = netif_dhcp_data(netif);
- 8009250: 6a63 ldr r3, [r4, #36] @ 0x24
- if ((dhcp != NULL) && (dhcp->state != DHCP_STATE_OFF)) {
- 8009252: 2b00 cmp r3, #0
- 8009254: d0fa beq.n 800924c <dhcp_coarse_tmr+0x14>
- 8009256: 795a ldrb r2, [r3, #5]
- 8009258: 2a00 cmp r2, #0
- 800925a: d0f7 beq.n 800924c <dhcp_coarse_tmr+0x14>
- if (dhcp->t0_timeout && (++dhcp->lease_used == dhcp->t0_timeout)) {
- 800925c: 8a99 ldrh r1, [r3, #20]
- 800925e: b129 cbz r1, 800926c <dhcp_coarse_tmr+0x34>
- 8009260: 8a5a ldrh r2, [r3, #18]
- 8009262: 3201 adds r2, #1
- 8009264: b292 uxth r2, r2
- 8009266: 825a strh r2, [r3, #18]
- 8009268: 4291 cmp r1, r2
- 800926a: d0e9 beq.n 8009240 <dhcp_coarse_tmr+0x8>
- } else if (dhcp->t2_rebind_time && (dhcp->t2_rebind_time-- == 1)) {
- 800926c: 8a1a ldrh r2, [r3, #16]
- 800926e: b11a cbz r2, 8009278 <dhcp_coarse_tmr+0x40>
- 8009270: 1e51 subs r1, r2, #1
- 8009272: 8219 strh r1, [r3, #16]
- 8009274: 2a01 cmp r2, #1
- 8009276: d00a beq.n 800928e <dhcp_coarse_tmr+0x56>
- } else if (dhcp->t1_renew_time && (dhcp->t1_renew_time-- == 1)) {
- 8009278: 89da ldrh r2, [r3, #14]
- 800927a: 2a00 cmp r2, #0
- 800927c: d0e6 beq.n 800924c <dhcp_coarse_tmr+0x14>
- 800927e: 1e51 subs r1, r2, #1
- 8009280: 81d9 strh r1, [r3, #14]
- 8009282: 2a01 cmp r2, #1
- 8009284: d1e2 bne.n 800924c <dhcp_coarse_tmr+0x14>
- dhcp_t1_timeout(netif);
- 8009286: 4620 mov r0, r4
- 8009288: f7ff fede bl 8009048 <dhcp_t1_timeout>
- 800928c: e7de b.n 800924c <dhcp_coarse_tmr+0x14>
- dhcp_t2_timeout(netif);
- 800928e: 4620 mov r0, r4
- 8009290: f7fe fff6 bl 8008280 <dhcp_t2_timeout>
- 8009294: e7da b.n 800924c <dhcp_coarse_tmr+0x14>
- }
- 8009296: bd10 pop {r4, pc}
- 8009298: 24019b80 .word 0x24019b80
- 0800929c <dhcp_timeout>:
- {
- 800929c: b510 push {r4, lr}
- 800929e: 4604 mov r4, r0
- struct dhcp *dhcp = netif_dhcp_data(netif);
- 80092a0: 6a42 ldr r2, [r0, #36] @ 0x24
- if ((dhcp->state == DHCP_STATE_BACKING_OFF) || (dhcp->state == DHCP_STATE_SELECTING)) {
- 80092a2: 7953 ldrb r3, [r2, #5]
- 80092a4: 2b06 cmp r3, #6
- 80092a6: bf18 it ne
- 80092a8: 2b0c cmpne r3, #12
- 80092aa: d00b beq.n 80092c4 <dhcp_timeout+0x28>
- } else if (dhcp->state == DHCP_STATE_REQUESTING) {
- 80092ac: 2b01 cmp r3, #1
- 80092ae: d00c beq.n 80092ca <dhcp_timeout+0x2e>
- } else if (dhcp->state == DHCP_STATE_CHECKING) {
- 80092b0: 2b08 cmp r3, #8
- 80092b2: d016 beq.n 80092e2 <dhcp_timeout+0x46>
- } else if (dhcp->state == DHCP_STATE_REBOOTING) {
- 80092b4: 2b03 cmp r3, #3
- 80092b6: d107 bne.n 80092c8 <dhcp_timeout+0x2c>
- if (dhcp->tries < REBOOT_TRIES) {
- 80092b8: 7993 ldrb r3, [r2, #6]
- 80092ba: 2b01 cmp r3, #1
- 80092bc: d91a bls.n 80092f4 <dhcp_timeout+0x58>
- dhcp_discover(netif);
- 80092be: f7ff f95d bl 800857c <dhcp_discover>
- }
- 80092c2: e001 b.n 80092c8 <dhcp_timeout+0x2c>
- dhcp_discover(netif);
- 80092c4: f7ff f95a bl 800857c <dhcp_discover>
- }
- 80092c8: bd10 pop {r4, pc}
- if (dhcp->tries <= 5) {
- 80092ca: 7993 ldrb r3, [r2, #6]
- 80092cc: 2b05 cmp r3, #5
- 80092ce: d802 bhi.n 80092d6 <dhcp_timeout+0x3a>
- dhcp_select(netif);
- 80092d0: f7ff f87a bl 80083c8 <dhcp_select>
- 80092d4: e7f8 b.n 80092c8 <dhcp_timeout+0x2c>
- dhcp_release_and_stop(netif);
- 80092d6: f7ff fee7 bl 80090a8 <dhcp_release_and_stop>
- dhcp_start(netif);
- 80092da: 4620 mov r0, r4
- 80092dc: f7ff ff48 bl 8009170 <dhcp_start>
- 80092e0: e7f2 b.n 80092c8 <dhcp_timeout+0x2c>
- if (dhcp->tries <= 1) {
- 80092e2: 7993 ldrb r3, [r2, #6]
- 80092e4: 2b01 cmp r3, #1
- 80092e6: d902 bls.n 80092ee <dhcp_timeout+0x52>
- dhcp_bind(netif);
- 80092e8: f7ff fa26 bl 8008738 <dhcp_bind>
- 80092ec: e7ec b.n 80092c8 <dhcp_timeout+0x2c>
- dhcp_check(netif);
- 80092ee: f7ff fa0d bl 800870c <dhcp_check>
- 80092f2: e7e9 b.n 80092c8 <dhcp_timeout+0x2c>
- dhcp_reboot(netif);
- 80092f4: f7fe ffe0 bl 80082b8 <dhcp_reboot>
- 80092f8: e7e6 b.n 80092c8 <dhcp_timeout+0x2c>
- ...
- 080092fc <dhcp_fine_tmr>:
- {
- 80092fc: b510 push {r4, lr}
- NETIF_FOREACH(netif) {
- 80092fe: 4b0b ldr r3, [pc, #44] @ (800932c <dhcp_fine_tmr+0x30>)
- 8009300: 681c ldr r4, [r3, #0]
- 8009302: e002 b.n 800930a <dhcp_fine_tmr+0xe>
- } else if (dhcp->request_timeout == 1) {
- 8009304: 2a01 cmp r2, #1
- 8009306: d00a beq.n 800931e <dhcp_fine_tmr+0x22>
- NETIF_FOREACH(netif) {
- 8009308: 6824 ldr r4, [r4, #0]
- 800930a: b174 cbz r4, 800932a <dhcp_fine_tmr+0x2e>
- struct dhcp *dhcp = netif_dhcp_data(netif);
- 800930c: 6a63 ldr r3, [r4, #36] @ 0x24
- if (dhcp != NULL) {
- 800930e: 2b00 cmp r3, #0
- 8009310: d0fa beq.n 8009308 <dhcp_fine_tmr+0xc>
- if (dhcp->request_timeout > 1) {
- 8009312: 891a ldrh r2, [r3, #8]
- 8009314: 2a01 cmp r2, #1
- 8009316: d9f5 bls.n 8009304 <dhcp_fine_tmr+0x8>
- dhcp->request_timeout--;
- 8009318: 3a01 subs r2, #1
- 800931a: 811a strh r2, [r3, #8]
- 800931c: e7f4 b.n 8009308 <dhcp_fine_tmr+0xc>
- dhcp->request_timeout--;
- 800931e: 3a01 subs r2, #1
- 8009320: 811a strh r2, [r3, #8]
- dhcp_timeout(netif);
- 8009322: 4620 mov r0, r4
- 8009324: f7ff ffba bl 800929c <dhcp_timeout>
- 8009328: e7ee b.n 8009308 <dhcp_fine_tmr+0xc>
- }
- 800932a: bd10 pop {r4, pc}
- 800932c: 24019b80 .word 0x24019b80
- 08009330 <dhcp_stop>:
- {
- 8009330: b508 push {r3, lr}
- dhcp_release_and_stop(netif);
- 8009332: f7ff feb9 bl 80090a8 <dhcp_release_and_stop>
- }
- 8009336: bd08 pop {r3, pc}
- 08009338 <err_to_errno>:
- };
- int
- err_to_errno(err_t err)
- {
- if ((err > 0) || (-err >= (err_t)LWIP_ARRAYSIZE(err_to_errno_table))) {
- 8009338: f100 0310 add.w r3, r0, #16
- 800933c: b2db uxtb r3, r3
- 800933e: 2b10 cmp r3, #16
- 8009340: d804 bhi.n 800934c <err_to_errno+0x14>
- return EIO;
- }
- return err_to_errno_table[-err];
- 8009342: 4240 negs r0, r0
- 8009344: 4b02 ldr r3, [pc, #8] @ (8009350 <err_to_errno+0x18>)
- 8009346: f853 0020 ldr.w r0, [r3, r0, lsl #2]
- 800934a: 4770 bx lr
- return EIO;
- 800934c: 2005 movs r0, #5
- }
- 800934e: 4770 bx lr
- 8009350: 080151cc .word 0x080151cc
- 08009354 <etharp_free_entry>:
- #endif /* ARP_QUEUEING */
- /** Clean up ARP table entries */
- static void
- etharp_free_entry(int i)
- {
- 8009354: b510 push {r4, lr}
- 8009356: 4604 mov r4, r0
- /* 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) {
- 8009358: eb00 0240 add.w r2, r0, r0, lsl #1
- 800935c: 4b0d ldr r3, [pc, #52] @ (8009394 <etharp_free_entry+0x40>)
- 800935e: f853 0032 ldr.w r0, [r3, r2, lsl #3]
- 8009362: b138 cbz r0, 8009374 <etharp_free_entry+0x20>
- /* 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);
- 8009364: f002 fd1c bl 800bda0 <pbuf_free>
- arp_table[i].q = NULL;
- 8009368: eb04 0344 add.w r3, r4, r4, lsl #1
- 800936c: 00db lsls r3, r3, #3
- 800936e: 4a09 ldr r2, [pc, #36] @ (8009394 <etharp_free_entry+0x40>)
- 8009370: 2100 movs r1, #0
- 8009372: 50d1 str r1, [r2, r3]
- }
- /* recycle entry for re-use */
- arp_table[i].state = ETHARP_STATE_EMPTY;
- 8009374: 4a07 ldr r2, [pc, #28] @ (8009394 <etharp_free_entry+0x40>)
- 8009376: eb04 0344 add.w r3, r4, r4, lsl #1
- 800937a: eb02 03c3 add.w r3, r2, r3, lsl #3
- 800937e: 2100 movs r1, #0
- 8009380: 7519 strb r1, [r3, #20]
- #ifdef LWIP_DEBUG
- /* for debugging, clean out the complete entry */
- arp_table[i].ctime = 0;
- 8009382: 8259 strh r1, [r3, #18]
- arp_table[i].netif = NULL;
- 8009384: 6099 str r1, [r3, #8]
- ip4_addr_set_zero(&arp_table[i].ipaddr);
- 8009386: 6059 str r1, [r3, #4]
- arp_table[i].ethaddr = ethzero;
- 8009388: 4a03 ldr r2, [pc, #12] @ (8009398 <etharp_free_entry+0x44>)
- 800938a: 6810 ldr r0, [r2, #0]
- 800938c: 60d8 str r0, [r3, #12]
- 800938e: 8892 ldrh r2, [r2, #4]
- 8009390: 821a strh r2, [r3, #16]
- #endif /* LWIP_DEBUG */
- }
- 8009392: bd10 pop {r4, pc}
- 8009394: 24012f2c .word 0x24012f2c
- 8009398: 080154b4 .word 0x080154b4
- 0800939c <etharp_find_entry>:
- * @return The ARP entry index that matched or is created, ERR_MEM if no
- * entry is found or could be recycled.
- */
- static s16_t
- etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif *netif)
- {
- 800939c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 80093a0: b085 sub sp, #20
- 80093a2: 4606 mov r6, r0
- 80093a4: 4617 mov r7, r2
- s16_t empty = ARP_TABLE_SIZE;
- s16_t i = 0;
- /* oldest entry with packets on queue */
- s16_t old_queue = ARP_TABLE_SIZE;
- /* its age */
- u16_t age_queue = 0, age_pending = 0, age_stable = 0;
- 80093a6: f04f 0900 mov.w r9, #0
- 80093aa: f8cd 900c str.w r9, [sp, #12]
- 80093ae: 46cb mov fp, r9
- s16_t old_queue = ARP_TABLE_SIZE;
- 80093b0: f04f 0a0a mov.w sl, #10
- * 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) {
- 80093b4: 464b mov r3, r9
- s16_t empty = ARP_TABLE_SIZE;
- 80093b6: 4655 mov r5, sl
- s16_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE;
- 80093b8: 46d0 mov r8, sl
- 80093ba: f8cd a008 str.w sl, [sp, #8]
- 80093be: 9101 str r1, [sp, #4]
- for (i = 0; i < ARP_TABLE_SIZE; ++i) {
- 80093c0: e029 b.n 8009416 <etharp_find_entry+0x7a>
- LWIP_ASSERT("state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE",
- 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)
- #if ETHARP_TABLE_MATCH_NETIF
- && ((netif == NULL) || (netif == arp_table[i].netif))
- 80093c2: 2f00 cmp r7, #0
- 80093c4: f000 80ad beq.w 8009522 <etharp_find_entry+0x186>
- 80093c8: 4a5a ldr r2, [pc, #360] @ (8009534 <etharp_find_entry+0x198>)
- 80093ca: eb02 02ce add.w r2, r2, lr, lsl #3
- 80093ce: 6892 ldr r2, [r2, #8]
- 80093d0: 42ba cmp r2, r7
- 80093d2: d13a bne.n 800944a <etharp_find_entry+0xae>
- #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;
- 80093d4: 461d mov r5, r3
- 80093d6: e07e b.n 80094d6 <etharp_find_entry+0x13a>
- }
- /* pending entry? */
- if (state == ETHARP_STATE_PENDING) {
- /* pending with queued packets? */
- if (arp_table[i].q != NULL) {
- 80093d8: eb04 0244 add.w r2, r4, r4, lsl #1
- 80093dc: 4855 ldr r0, [pc, #340] @ (8009534 <etharp_find_entry+0x198>)
- 80093de: f850 2032 ldr.w r2, [r0, r2, lsl #3]
- 80093e2: b14a cbz r2, 80093f8 <etharp_find_entry+0x5c>
- if (arp_table[i].ctime >= age_queue) {
- 80093e4: eb04 0444 add.w r4, r4, r4, lsl #1
- 80093e8: eb00 02c4 add.w r2, r0, r4, lsl #3
- 80093ec: 8a52 ldrh r2, [r2, #18]
- 80093ee: 455a cmp r2, fp
- 80093f0: d30f bcc.n 8009412 <etharp_find_entry+0x76>
- old_queue = i;
- age_queue = arp_table[i].ctime;
- 80093f2: 4693 mov fp, r2
- old_queue = i;
- 80093f4: 469a mov sl, r3
- 80093f6: e00c b.n 8009412 <etharp_find_entry+0x76>
- }
- } else
- /* pending without queued packets? */
- {
- if (arp_table[i].ctime >= age_pending) {
- 80093f8: eb04 0444 add.w r4, r4, r4, lsl #1
- 80093fc: 4a4d ldr r2, [pc, #308] @ (8009534 <etharp_find_entry+0x198>)
- 80093fe: eb02 02c4 add.w r2, r2, r4, lsl #3
- 8009402: 8a52 ldrh r2, [r2, #18]
- 8009404: 9903 ldr r1, [sp, #12]
- 8009406: 428a cmp r2, r1
- 8009408: d303 bcc.n 8009412 <etharp_find_entry+0x76>
- old_pending = i;
- age_pending = arp_table[i].ctime;
- 800940a: 9203 str r2, [sp, #12]
- old_pending = i;
- 800940c: 9302 str r3, [sp, #8]
- 800940e: e000 b.n 8009412 <etharp_find_entry+0x76>
- empty = i;
- 8009410: 461d mov r5, r3
- for (i = 0; i < ARP_TABLE_SIZE; ++i) {
- 8009412: 3301 adds r3, #1
- 8009414: b21b sxth r3, r3
- 8009416: 2b09 cmp r3, #9
- 8009418: dc26 bgt.n 8009468 <etharp_find_entry+0xcc>
- u8_t state = arp_table[i].state;
- 800941a: 461c mov r4, r3
- 800941c: eb03 0043 add.w r0, r3, r3, lsl #1
- 8009420: 4a44 ldr r2, [pc, #272] @ (8009534 <etharp_find_entry+0x198>)
- 8009422: eb02 02c0 add.w r2, r2, r0, lsl #3
- 8009426: 7d10 ldrb r0, [r2, #20]
- if ((empty == ARP_TABLE_SIZE) && (state == ETHARP_STATE_EMPTY)) {
- 8009428: 2d0a cmp r5, #10
- 800942a: bf08 it eq
- 800942c: 2800 cmpeq r0, #0
- 800942e: d0ef beq.n 8009410 <etharp_find_entry+0x74>
- } else if (state != ETHARP_STATE_EMPTY) {
- 8009430: 2800 cmp r0, #0
- 8009432: d0ee beq.n 8009412 <etharp_find_entry+0x76>
- if (ipaddr && ip4_addr_cmp(ipaddr, &arp_table[i].ipaddr)
- 8009434: b14e cbz r6, 800944a <etharp_find_entry+0xae>
- 8009436: eb03 0e43 add.w lr, r3, r3, lsl #1
- 800943a: 4a3e ldr r2, [pc, #248] @ (8009534 <etharp_find_entry+0x198>)
- 800943c: eb02 0cce add.w ip, r2, lr, lsl #3
- 8009440: f8dc 2004 ldr.w r2, [ip, #4]
- 8009444: 6831 ldr r1, [r6, #0]
- 8009446: 4291 cmp r1, r2
- 8009448: d0bb beq.n 80093c2 <etharp_find_entry+0x26>
- if (state == ETHARP_STATE_PENDING) {
- 800944a: 2801 cmp r0, #1
- 800944c: d0c4 beq.n 80093d8 <etharp_find_entry+0x3c>
- }
- }
- /* stable entry? */
- } else if (state >= ETHARP_STATE_STABLE) {
- 800944e: 2801 cmp r0, #1
- 8009450: d9df bls.n 8009412 <etharp_find_entry+0x76>
- /* 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) {
- 8009452: eb04 0444 add.w r4, r4, r4, lsl #1
- 8009456: 4a37 ldr r2, [pc, #220] @ (8009534 <etharp_find_entry+0x198>)
- 8009458: eb02 02c4 add.w r2, r2, r4, lsl #3
- 800945c: 8a52 ldrh r2, [r2, #18]
- 800945e: 454a cmp r2, r9
- 8009460: d3d7 bcc.n 8009412 <etharp_find_entry+0x76>
- old_stable = i;
- age_stable = arp_table[i].ctime;
- 8009462: 4691 mov r9, r2
- old_stable = i;
- 8009464: 4698 mov r8, r3
- 8009466: e7d4 b.n 8009412 <etharp_find_entry+0x76>
- }
- }
- /* { we have no match } => try to create a new entry */
- /* don't create new entry, only search? */
- if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) ||
- 8009468: 9901 ldr r1, [sp, #4]
- 800946a: f011 0f02 tst.w r1, #2
- 800946e: d15a bne.n 8009526 <etharp_find_entry+0x18a>
- 8009470: 2d0a cmp r5, #10
- 8009472: d034 beq.n 80094de <etharp_find_entry+0x142>
- *
- * { ETHARP_FLAG_TRY_HARD is set at this point }
- */
- /* 1) empty entry available? */
- if (empty < ARP_TABLE_SIZE) {
- 8009474: 2d09 cmp r5, #9
- 8009476: dd16 ble.n 80094a6 <etharp_find_entry+0x10a>
- i = empty;
- 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) {
- 8009478: f1b8 0f09 cmp.w r8, #9
- 800947c: dc35 bgt.n 80094ea <etharp_find_entry+0x14e>
- /* recycle oldest stable*/
- i = old_stable;
- 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);
- 800947e: eb08 0348 add.w r3, r8, r8, lsl #1
- 8009482: 4a2c ldr r2, [pc, #176] @ (8009534 <etharp_find_entry+0x198>)
- 8009484: f852 3033 ldr.w r3, [r2, r3, lsl #3]
- 8009488: 2b00 cmp r3, #0
- 800948a: d036 beq.n 80094fa <etharp_find_entry+0x15e>
- 800948c: 4b2a ldr r3, [pc, #168] @ (8009538 <etharp_find_entry+0x19c>)
- 800948e: f240 126d movw r2, #365 @ 0x16d
- 8009492: 492a ldr r1, [pc, #168] @ (800953c <etharp_find_entry+0x1a0>)
- 8009494: 482a ldr r0, [pc, #168] @ (8009540 <etharp_find_entry+0x1a4>)
- 8009496: f009 ffb7 bl 8013408 <iprintf>
- 800949a: 4645 mov r5, r8
- return (s16_t)ERR_MEM;
- }
- /* { empty or recyclable entry found } */
- LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE);
- etharp_free_entry(i);
- 800949c: 4628 mov r0, r5
- 800949e: f7ff ff59 bl 8009354 <etharp_free_entry>
- }
- LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE);
- 80094a2: 2d09 cmp r5, #9
- 80094a4: dc2d bgt.n 8009502 <etharp_find_entry+0x166>
- LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY",
- 80094a6: 462c mov r4, r5
- 80094a8: eb05 0245 add.w r2, r5, r5, lsl #1
- 80094ac: 4b21 ldr r3, [pc, #132] @ (8009534 <etharp_find_entry+0x198>)
- 80094ae: eb03 03c2 add.w r3, r3, r2, lsl #3
- 80094b2: 7d1b ldrb r3, [r3, #20]
- 80094b4: bb6b cbnz r3, 8009512 <etharp_find_entry+0x176>
- arp_table[i].state == ETHARP_STATE_EMPTY);
- /* IP address given? */
- if (ipaddr != NULL) {
- 80094b6: b136 cbz r6, 80094c6 <etharp_find_entry+0x12a>
- /* set IP address */
- ip4_addr_copy(arp_table[i].ipaddr, *ipaddr);
- 80094b8: 6831 ldr r1, [r6, #0]
- 80094ba: eb04 0244 add.w r2, r4, r4, lsl #1
- 80094be: 4b1d ldr r3, [pc, #116] @ (8009534 <etharp_find_entry+0x198>)
- 80094c0: eb03 03c2 add.w r3, r3, r2, lsl #3
- 80094c4: 6059 str r1, [r3, #4]
- }
- arp_table[i].ctime = 0;
- 80094c6: 4b1b ldr r3, [pc, #108] @ (8009534 <etharp_find_entry+0x198>)
- 80094c8: eb04 0244 add.w r2, r4, r4, lsl #1
- 80094cc: eb03 02c2 add.w r2, r3, r2, lsl #3
- 80094d0: 2100 movs r1, #0
- 80094d2: 8251 strh r1, [r2, #18]
- #if ETHARP_TABLE_MATCH_NETIF
- arp_table[i].netif = netif;
- 80094d4: 6097 str r7, [r2, #8]
- #endif /* ETHARP_TABLE_MATCH_NETIF */
- return (s16_t)i;
- }
- 80094d6: 4628 mov r0, r5
- 80094d8: b005 add sp, #20
- 80094da: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
- ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) {
- 80094de: f011 0f01 tst.w r1, #1
- 80094e2: d1c7 bne.n 8009474 <etharp_find_entry+0xd8>
- return (s16_t)ERR_MEM;
- 80094e4: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
- 80094e8: e7f5 b.n 80094d6 <etharp_find_entry+0x13a>
- } else if (old_pending < ARP_TABLE_SIZE) {
- 80094ea: 9b02 ldr r3, [sp, #8]
- 80094ec: 2b09 cmp r3, #9
- 80094ee: dd06 ble.n 80094fe <etharp_find_entry+0x162>
- } else if (old_queue < ARP_TABLE_SIZE) {
- 80094f0: f1ba 0f09 cmp.w sl, #9
- 80094f4: dc1a bgt.n 800952c <etharp_find_entry+0x190>
- i = old_queue;
- 80094f6: 4655 mov r5, sl
- 80094f8: e7d0 b.n 800949c <etharp_find_entry+0x100>
- 80094fa: 4645 mov r5, r8
- 80094fc: e7ce b.n 800949c <etharp_find_entry+0x100>
- i = old_pending;
- 80094fe: 9d02 ldr r5, [sp, #8]
- 8009500: e7cc b.n 800949c <etharp_find_entry+0x100>
- LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE);
- 8009502: 4b0d ldr r3, [pc, #52] @ (8009538 <etharp_find_entry+0x19c>)
- 8009504: f240 1283 movw r2, #387 @ 0x183
- 8009508: 490e ldr r1, [pc, #56] @ (8009544 <etharp_find_entry+0x1a8>)
- 800950a: 480d ldr r0, [pc, #52] @ (8009540 <etharp_find_entry+0x1a4>)
- 800950c: f009 ff7c bl 8013408 <iprintf>
- 8009510: e7c9 b.n 80094a6 <etharp_find_entry+0x10a>
- LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY",
- 8009512: 4b09 ldr r3, [pc, #36] @ (8009538 <etharp_find_entry+0x19c>)
- 8009514: f44f 72c2 mov.w r2, #388 @ 0x184
- 8009518: 490b ldr r1, [pc, #44] @ (8009548 <etharp_find_entry+0x1ac>)
- 800951a: 4809 ldr r0, [pc, #36] @ (8009540 <etharp_find_entry+0x1a4>)
- 800951c: f009 ff74 bl 8013408 <iprintf>
- 8009520: e7c9 b.n 80094b6 <etharp_find_entry+0x11a>
- return i;
- 8009522: 461d mov r5, r3
- 8009524: e7d7 b.n 80094d6 <etharp_find_entry+0x13a>
- return (s16_t)ERR_MEM;
- 8009526: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
- 800952a: e7d4 b.n 80094d6 <etharp_find_entry+0x13a>
- return (s16_t)ERR_MEM;
- 800952c: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
- 8009530: e7d1 b.n 80094d6 <etharp_find_entry+0x13a>
- 8009532: bf00 nop
- 8009534: 24012f2c .word 0x24012f2c
- 8009538: 08015210 .word 0x08015210
- 800953c: 08015278 .word 0x08015278
- 8009540: 080144e8 .word 0x080144e8
- 8009544: 08015290 .word 0x08015290
- 8009548: 080152a4 .word 0x080152a4
- 0800954c <etharp_update_arp_entry>:
- *
- * @see pbuf_free()
- */
- static err_t
- etharp_update_arp_entry(struct netif *netif, const ip4_addr_t *ipaddr, struct eth_addr *ethaddr, u8_t flags)
- {
- 800954c: b5f0 push {r4, r5, r6, r7, lr}
- 800954e: b083 sub sp, #12
- 8009550: 4605 mov r5, r0
- 8009552: 460c mov r4, r1
- 8009554: 4616 mov r6, r2
- 8009556: 461f mov r7, r3
- s16_t i;
- LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN);
- 8009558: f890 2030 ldrb.w r2, [r0, #48] @ 0x30
- 800955c: 2a06 cmp r2, #6
- 800955e: d13d bne.n 80095dc <etharp_update_arp_entry+0x90>
- 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) ||
- 8009560: 2c00 cmp r4, #0
- 8009562: d043 beq.n 80095ec <etharp_update_arp_entry+0xa0>
- 8009564: 6820 ldr r0, [r4, #0]
- 8009566: 2800 cmp r0, #0
- 8009568: d040 beq.n 80095ec <etharp_update_arp_entry+0xa0>
- ip4_addr_isbroadcast(ipaddr, netif) ||
- 800956a: 4629 mov r1, r5
- 800956c: f000 ff71 bl 800a452 <ip4_addr_isbroadcast_u32>
- if (ip4_addr_isany(ipaddr) ||
- 8009570: 2800 cmp r0, #0
- 8009572: d13b bne.n 80095ec <etharp_update_arp_entry+0xa0>
- ip4_addr_ismulticast(ipaddr)) {
- 8009574: 6822 ldr r2, [r4, #0]
- 8009576: f002 02f0 and.w r2, r2, #240 @ 0xf0
- ip4_addr_isbroadcast(ipaddr, netif) ||
- 800957a: 2ae0 cmp r2, #224 @ 0xe0
- 800957c: d036 beq.n 80095ec <etharp_update_arp_entry+0xa0>
- 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;
- }
- /* find or create ARP entry */
- i = etharp_find_entry(ipaddr, flags, netif);
- 800957e: 462a mov r2, r5
- 8009580: 4639 mov r1, r7
- 8009582: 4620 mov r0, r4
- 8009584: f7ff ff0a bl 800939c <etharp_find_entry>
- /* bail out if no entry could be found */
- if (i < 0) {
- 8009588: f1b0 0c00 subs.w ip, r0, #0
- 800958c: db31 blt.n 80095f2 <etharp_update_arp_entry+0xa6>
- return ERR_VAL;
- } else
- #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
- {
- /* mark it stable */
- arp_table[i].state = ETHARP_STATE_STABLE;
- 800958e: 4b1c ldr r3, [pc, #112] @ (8009600 <etharp_update_arp_entry+0xb4>)
- 8009590: eb0c 004c add.w r0, ip, ip, lsl #1
- 8009594: eb03 02c0 add.w r2, r3, r0, lsl #3
- 8009598: 2102 movs r1, #2
- 800959a: 7511 strb r1, [r2, #20]
- }
- /* record network interface */
- arp_table[i].netif = netif;
- 800959c: 6095 str r5, [r2, #8]
- /* 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);
- 800959e: 00c1 lsls r1, r0, #3
- 80095a0: 3108 adds r1, #8
- 80095a2: 4419 add r1, r3
- 80095a4: 6834 ldr r4, [r6, #0]
- 80095a6: 604c str r4, [r1, #4]
- 80095a8: 88b4 ldrh r4, [r6, #4]
- 80095aa: 810c strh r4, [r1, #8]
- /* reset time stamp */
- arp_table[i].ctime = 0;
- 80095ac: 2100 movs r1, #0
- 80095ae: 8251 strh r1, [r2, #18]
- /* 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) {
- 80095b0: f853 7030 ldr.w r7, [r3, r0, lsl #3]
- 80095b4: b30f cbz r7, 80095fa <etharp_update_arp_entry+0xae>
- struct pbuf *p = arp_table[i].q;
- arp_table[i].q = NULL;
- 80095b6: 00c3 lsls r3, r0, #3
- 80095b8: 460c mov r4, r1
- 80095ba: 4a11 ldr r2, [pc, #68] @ (8009600 <etharp_update_arp_entry+0xb4>)
- 80095bc: 50d1 str r1, [r2, r3]
- #endif /* ARP_QUEUEING */
- /* send the queued IP packet */
- ethernet_output(netif, p, (struct eth_addr *)(netif->hwaddr), ethaddr, ETHTYPE_IP);
- 80095be: f44f 6300 mov.w r3, #2048 @ 0x800
- 80095c2: 9300 str r3, [sp, #0]
- 80095c4: 4633 mov r3, r6
- 80095c6: f105 022a add.w r2, r5, #42 @ 0x2a
- 80095ca: 4639 mov r1, r7
- 80095cc: 4628 mov r0, r5
- 80095ce: f000 fbb9 bl 8009d44 <ethernet_output>
- /* free the queued IP packet */
- pbuf_free(p);
- 80095d2: 4638 mov r0, r7
- 80095d4: f002 fbe4 bl 800bda0 <pbuf_free>
- }
- return ERR_OK;
- 80095d8: 4620 mov r0, r4
- 80095da: e00c b.n 80095f6 <etharp_update_arp_entry+0xaa>
- LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN);
- 80095dc: 4b09 ldr r3, [pc, #36] @ (8009604 <etharp_update_arp_entry+0xb8>)
- 80095de: f240 12a9 movw r2, #425 @ 0x1a9
- 80095e2: 4909 ldr r1, [pc, #36] @ (8009608 <etharp_update_arp_entry+0xbc>)
- 80095e4: 4809 ldr r0, [pc, #36] @ (800960c <etharp_update_arp_entry+0xc0>)
- 80095e6: f009 ff0f bl 8013408 <iprintf>
- 80095ea: e7b9 b.n 8009560 <etharp_update_arp_entry+0x14>
- return ERR_ARG;
- 80095ec: f06f 000f mvn.w r0, #15
- 80095f0: e001 b.n 80095f6 <etharp_update_arp_entry+0xaa>
- return (err_t)i;
- 80095f2: fa4f f08c sxtb.w r0, ip
- }
- 80095f6: b003 add sp, #12
- 80095f8: bdf0 pop {r4, r5, r6, r7, pc}
- return ERR_OK;
- 80095fa: 2000 movs r0, #0
- 80095fc: e7fb b.n 80095f6 <etharp_update_arp_entry+0xaa>
- 80095fe: bf00 nop
- 8009600: 24012f2c .word 0x24012f2c
- 8009604: 08015210 .word 0x08015210
- 8009608: 080152d0 .word 0x080152d0
- 800960c: 080144e8 .word 0x080144e8
- 08009610 <etharp_raw>:
- etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr,
- const struct eth_addr *ethdst_addr,
- const struct eth_addr *hwsrc_addr, const ip4_addr_t *ipsrc_addr,
- const struct eth_addr *hwdst_addr, const ip4_addr_t *ipdst_addr,
- const u16_t opcode)
- {
- 8009610: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
- 8009614: b082 sub sp, #8
- 8009616: 460f mov r7, r1
- 8009618: 4690 mov r8, r2
- 800961a: 461d mov r5, r3
- 800961c: f8dd a02c ldr.w sl, [sp, #44] @ 0x2c
- struct pbuf *p;
- err_t result = ERR_OK;
- struct etharp_hdr *hdr;
- LWIP_ASSERT("netif != NULL", netif != NULL);
- 8009620: 4681 mov r9, r0
- 8009622: 2800 cmp r0, #0
- 8009624: d042 beq.n 80096ac <etharp_raw+0x9c>
- /* allocate a pbuf for the outgoing ARP request packet */
- p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_HDR, PBUF_RAM);
- 8009626: f44f 7220 mov.w r2, #640 @ 0x280
- 800962a: 211c movs r1, #28
- 800962c: 200e movs r0, #14
- 800962e: f002 fc1f bl 800be70 <pbuf_alloc>
- /* could allocate a pbuf for an ARP request? */
- if (p == NULL) {
- 8009632: 4606 mov r6, r0
- 8009634: 2800 cmp r0, #0
- 8009636: d051 beq.n 80096dc <etharp_raw+0xcc>
- 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;
- }
- LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr",
- 8009638: 8943 ldrh r3, [r0, #10]
- 800963a: 2b1b cmp r3, #27
- 800963c: d93e bls.n 80096bc <etharp_raw+0xac>
- (p->len >= SIZEOF_ETHARP_HDR));
- hdr = (struct etharp_hdr *)p->payload;
- 800963e: 6874 ldr r4, [r6, #4]
- LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n"));
- hdr->opcode = lwip_htons(opcode);
- 8009640: f8bd 0034 ldrh.w r0, [sp, #52] @ 0x34
- 8009644: f7fe fc1a bl 8007e7c <lwip_htons>
- 8009648: 80e0 strh r0, [r4, #6]
- LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!",
- 800964a: f899 3030 ldrb.w r3, [r9, #48] @ 0x30
- 800964e: 2b06 cmp r3, #6
- 8009650: d13c bne.n 80096cc <etharp_raw+0xbc>
- (netif->hwaddr_len == ETH_HWADDR_LEN));
- /* Write the ARP MAC-Addresses */
- SMEMCPY(&hdr->shwaddr, hwsrc_addr, ETH_HWADDR_LEN);
- 8009652: 682b ldr r3, [r5, #0]
- 8009654: 60a3 str r3, [r4, #8]
- 8009656: 88ab ldrh r3, [r5, #4]
- 8009658: 81a3 strh r3, [r4, #12]
- SMEMCPY(&hdr->dhwaddr, hwdst_addr, ETH_HWADDR_LEN);
- 800965a: f8da 3000 ldr.w r3, [sl]
- 800965e: f8c4 3012 str.w r3, [r4, #18]
- 8009662: f8ba 3004 ldrh.w r3, [sl, #4]
- 8009666: 82e3 strh r3, [r4, #22]
- /* 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);
- 8009668: 9b0a ldr r3, [sp, #40] @ 0x28
- 800966a: 681b ldr r3, [r3, #0]
- 800966c: f8c4 300e str.w r3, [r4, #14]
- IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->dipaddr, ipdst_addr);
- 8009670: 9b0c ldr r3, [sp, #48] @ 0x30
- 8009672: 681b ldr r3, [r3, #0]
- 8009674: 61a3 str r3, [r4, #24]
- hdr->hwtype = PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET);
- 8009676: 2500 movs r5, #0
- 8009678: 7025 strb r5, [r4, #0]
- 800967a: 2301 movs r3, #1
- 800967c: 7063 strb r3, [r4, #1]
- hdr->proto = PP_HTONS(ETHTYPE_IP);
- 800967e: 2308 movs r3, #8
- 8009680: 70a3 strb r3, [r4, #2]
- 8009682: 70e5 strb r5, [r4, #3]
- /* set hwlen and protolen */
- hdr->hwlen = ETH_HWADDR_LEN;
- 8009684: 2306 movs r3, #6
- 8009686: 7123 strb r3, [r4, #4]
- hdr->protolen = sizeof(ip4_addr_t);
- 8009688: 2304 movs r3, #4
- 800968a: 7163 strb r3, [r4, #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);
- 800968c: f640 0306 movw r3, #2054 @ 0x806
- 8009690: 9300 str r3, [sp, #0]
- 8009692: 4643 mov r3, r8
- 8009694: 463a mov r2, r7
- 8009696: 4631 mov r1, r6
- 8009698: 4648 mov r0, r9
- 800969a: f000 fb53 bl 8009d44 <ethernet_output>
- }
- ETHARP_STATS_INC(etharp.xmit);
- /* free ARP query packet */
- pbuf_free(p);
- 800969e: 4630 mov r0, r6
- 80096a0: f002 fb7e bl 800bda0 <pbuf_free>
- p = NULL;
- /* could not allocate pbuf for ARP request */
- return result;
- 80096a4: 4628 mov r0, r5
- }
- 80096a6: b002 add sp, #8
- 80096a8: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
- LWIP_ASSERT("netif != NULL", netif != NULL);
- 80096ac: 4b0d ldr r3, [pc, #52] @ (80096e4 <etharp_raw+0xd4>)
- 80096ae: f240 4257 movw r2, #1111 @ 0x457
- 80096b2: 490d ldr r1, [pc, #52] @ (80096e8 <etharp_raw+0xd8>)
- 80096b4: 480d ldr r0, [pc, #52] @ (80096ec <etharp_raw+0xdc>)
- 80096b6: f009 fea7 bl 8013408 <iprintf>
- 80096ba: e7b4 b.n 8009626 <etharp_raw+0x16>
- LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr",
- 80096bc: 4b09 ldr r3, [pc, #36] @ (80096e4 <etharp_raw+0xd4>)
- 80096be: f240 4262 movw r2, #1122 @ 0x462
- 80096c2: 490b ldr r1, [pc, #44] @ (80096f0 <etharp_raw+0xe0>)
- 80096c4: 4809 ldr r0, [pc, #36] @ (80096ec <etharp_raw+0xdc>)
- 80096c6: f009 fe9f bl 8013408 <iprintf>
- 80096ca: e7b8 b.n 800963e <etharp_raw+0x2e>
- LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!",
- 80096cc: 4b05 ldr r3, [pc, #20] @ (80096e4 <etharp_raw+0xd4>)
- 80096ce: f240 4269 movw r2, #1129 @ 0x469
- 80096d2: 4908 ldr r1, [pc, #32] @ (80096f4 <etharp_raw+0xe4>)
- 80096d4: 4805 ldr r0, [pc, #20] @ (80096ec <etharp_raw+0xdc>)
- 80096d6: f009 fe97 bl 8013408 <iprintf>
- 80096da: e7ba b.n 8009652 <etharp_raw+0x42>
- return ERR_MEM;
- 80096dc: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 80096e0: e7e1 b.n 80096a6 <etharp_raw+0x96>
- 80096e2: bf00 nop
- 80096e4: 08015210 .word 0x08015210
- 80096e8: 080144d8 .word 0x080144d8
- 80096ec: 080144e8 .word 0x080144e8
- 80096f0: 080152f4 .word 0x080152f4
- 80096f4: 08015328 .word 0x08015328
- 080096f8 <etharp_request_dst>:
- * ERR_MEM if the ARP packet couldn't be allocated
- * any other err_t on failure
- */
- static err_t
- etharp_request_dst(struct netif *netif, const ip4_addr_t *ipaddr, const struct eth_addr *hw_dst_addr)
- {
- 80096f8: b530 push {r4, r5, lr}
- 80096fa: b085 sub sp, #20
- return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr,
- 80096fc: f100 032a add.w r3, r0, #42 @ 0x2a
- (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), ðzero,
- 8009700: 1d04 adds r4, r0, #4
- return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr,
- 8009702: 2501 movs r5, #1
- 8009704: 9503 str r5, [sp, #12]
- 8009706: 9102 str r1, [sp, #8]
- 8009708: 4903 ldr r1, [pc, #12] @ (8009718 <etharp_request_dst+0x20>)
- 800970a: 9101 str r1, [sp, #4]
- 800970c: 9400 str r4, [sp, #0]
- 800970e: 4619 mov r1, r3
- 8009710: f7ff ff7e bl 8009610 <etharp_raw>
- ipaddr, ARP_REQUEST);
- }
- 8009714: b005 add sp, #20
- 8009716: bd30 pop {r4, r5, pc}
- 8009718: 080154b4 .word 0x080154b4
- 0800971c <etharp_cleanup_netif>:
- {
- 800971c: b538 push {r3, r4, r5, lr}
- 800971e: 4605 mov r5, r0
- for (i = 0; i < ARP_TABLE_SIZE; ++i) {
- 8009720: 2400 movs r4, #0
- 8009722: e000 b.n 8009726 <etharp_cleanup_netif+0xa>
- 8009724: 3401 adds r4, #1
- 8009726: 2c09 cmp r4, #9
- 8009728: dc11 bgt.n 800974e <etharp_cleanup_netif+0x32>
- u8_t state = arp_table[i].state;
- 800972a: eb04 0244 add.w r2, r4, r4, lsl #1
- 800972e: 4b08 ldr r3, [pc, #32] @ (8009750 <etharp_cleanup_netif+0x34>)
- 8009730: eb03 03c2 add.w r3, r3, r2, lsl #3
- 8009734: 7d1b ldrb r3, [r3, #20]
- if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) {
- 8009736: 2b00 cmp r3, #0
- 8009738: d0f4 beq.n 8009724 <etharp_cleanup_netif+0x8>
- 800973a: 4b05 ldr r3, [pc, #20] @ (8009750 <etharp_cleanup_netif+0x34>)
- 800973c: eb03 03c2 add.w r3, r3, r2, lsl #3
- 8009740: 689b ldr r3, [r3, #8]
- 8009742: 42ab cmp r3, r5
- 8009744: d1ee bne.n 8009724 <etharp_cleanup_netif+0x8>
- etharp_free_entry(i);
- 8009746: 4620 mov r0, r4
- 8009748: f7ff fe04 bl 8009354 <etharp_free_entry>
- 800974c: e7ea b.n 8009724 <etharp_cleanup_netif+0x8>
- }
- 800974e: bd38 pop {r3, r4, r5, pc}
- 8009750: 24012f2c .word 0x24012f2c
- 08009754 <etharp_input>:
- {
- 8009754: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8009758: b086 sub sp, #24
- 800975a: 4604 mov r4, r0
- 800975c: 460d mov r5, r1
- LWIP_ASSERT_CORE_LOCKED();
- 800975e: f7fa f9d5 bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("netif != NULL", (netif != NULL), return;);
- 8009762: b19d cbz r5, 800978c <etharp_input+0x38>
- hdr = (struct etharp_hdr *)p->payload;
- 8009764: 6866 ldr r6, [r4, #4]
- if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) ||
- 8009766: 8833 ldrh r3, [r6, #0]
- 8009768: f5b3 7f80 cmp.w r3, #256 @ 0x100
- 800976c: d108 bne.n 8009780 <etharp_input+0x2c>
- (hdr->hwlen != ETH_HWADDR_LEN) ||
- 800976e: 7933 ldrb r3, [r6, #4]
- if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) ||
- 8009770: 2b06 cmp r3, #6
- 8009772: d105 bne.n 8009780 <etharp_input+0x2c>
- (hdr->protolen != sizeof(ip4_addr_t)) ||
- 8009774: 7973 ldrb r3, [r6, #5]
- (hdr->hwlen != ETH_HWADDR_LEN) ||
- 8009776: 2b04 cmp r3, #4
- 8009778: d102 bne.n 8009780 <etharp_input+0x2c>
- (hdr->proto != PP_HTONS(ETHTYPE_IP))) {
- 800977a: 8873 ldrh r3, [r6, #2]
- (hdr->protolen != sizeof(ip4_addr_t)) ||
- 800977c: 2b08 cmp r3, #8
- 800977e: d00d beq.n 800979c <etharp_input+0x48>
- pbuf_free(p);
- 8009780: 4620 mov r0, r4
- 8009782: f002 fb0d bl 800bda0 <pbuf_free>
- }
- 8009786: b006 add sp, #24
- 8009788: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- LWIP_ERROR("netif != NULL", (netif != NULL), return;);
- 800978c: 4b21 ldr r3, [pc, #132] @ (8009814 <etharp_input+0xc0>)
- 800978e: f240 228a movw r2, #650 @ 0x28a
- 8009792: 4921 ldr r1, [pc, #132] @ (8009818 <etharp_input+0xc4>)
- 8009794: 4821 ldr r0, [pc, #132] @ (800981c <etharp_input+0xc8>)
- 8009796: f009 fe37 bl 8013408 <iprintf>
- 800979a: e7f4 b.n 8009786 <etharp_input+0x32>
- IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&sipaddr, &hdr->sipaddr);
- 800979c: f8d6 300e ldr.w r3, [r6, #14]
- 80097a0: 9305 str r3, [sp, #20]
- IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&dipaddr, &hdr->dipaddr);
- 80097a2: 69b2 ldr r2, [r6, #24]
- if (ip4_addr_isany_val(*netif_ip4_addr(netif))) {
- 80097a4: 686f ldr r7, [r5, #4]
- 80097a6: b997 cbnz r7, 80097ce <etharp_input+0x7a>
- etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr),
- 80097a8: f106 0808 add.w r8, r6, #8
- 80097ac: 2302 movs r3, #2
- 80097ae: 4642 mov r2, r8
- 80097b0: a905 add r1, sp, #20
- 80097b2: 4628 mov r0, r5
- 80097b4: f7ff feca bl 800954c <etharp_update_arp_entry>
- switch (hdr->opcode) {
- 80097b8: 88f3 ldrh r3, [r6, #6]
- 80097ba: f5b3 7f80 cmp.w r3, #256 @ 0x100
- 80097be: d011 beq.n 80097e4 <etharp_input+0x90>
- 80097c0: f5b3 7f00 cmp.w r3, #512 @ 0x200
- 80097c4: d020 beq.n 8009808 <etharp_input+0xb4>
- pbuf_free(p);
- 80097c6: 4620 mov r0, r4
- 80097c8: f002 faea bl 800bda0 <pbuf_free>
- 80097cc: e7db b.n 8009786 <etharp_input+0x32>
- for_us = (u8_t)ip4_addr_cmp(&dipaddr, netif_ip4_addr(netif));
- 80097ce: 4297 cmp r7, r2
- 80097d0: bf14 ite ne
- 80097d2: 2700 movne r7, #0
- 80097d4: 2701 moveq r7, #1
- etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr),
- 80097d6: f106 0808 add.w r8, r6, #8
- 80097da: b10f cbz r7, 80097e0 <etharp_input+0x8c>
- 80097dc: 2301 movs r3, #1
- 80097de: e7e6 b.n 80097ae <etharp_input+0x5a>
- 80097e0: 2302 movs r3, #2
- 80097e2: e7e4 b.n 80097ae <etharp_input+0x5a>
- if (for_us) {
- 80097e4: 2f00 cmp r7, #0
- 80097e6: d0ee beq.n 80097c6 <etharp_input+0x72>
- (struct eth_addr *)netif->hwaddr, &hdr->shwaddr,
- 80097e8: f105 012a add.w r1, r5, #42 @ 0x2a
- (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif),
- 80097ec: 1d2b adds r3, r5, #4
- etharp_raw(netif,
- 80097ee: 2202 movs r2, #2
- 80097f0: 9203 str r2, [sp, #12]
- 80097f2: aa05 add r2, sp, #20
- 80097f4: 9202 str r2, [sp, #8]
- 80097f6: f8cd 8004 str.w r8, [sp, #4]
- 80097fa: 9300 str r3, [sp, #0]
- 80097fc: 460b mov r3, r1
- 80097fe: 4642 mov r2, r8
- 8009800: 4628 mov r0, r5
- 8009802: f7ff ff05 bl 8009610 <etharp_raw>
- 8009806: e7de b.n 80097c6 <etharp_input+0x72>
- dhcp_arp_reply(netif, &sipaddr);
- 8009808: a905 add r1, sp, #20
- 800980a: 4628 mov r0, r5
- 800980c: f7ff fb86 bl 8008f1c <dhcp_arp_reply>
- break;
- 8009810: e7d9 b.n 80097c6 <etharp_input+0x72>
- 8009812: bf00 nop
- 8009814: 08015210 .word 0x08015210
- 8009818: 080144d8 .word 0x080144d8
- 800981c: 080144e8 .word 0x080144e8
- 08009820 <etharp_request>:
- * ERR_MEM if the ARP packet couldn't be allocated
- * any other err_t on failure
- */
- err_t
- etharp_request(struct netif *netif, const ip4_addr_t *ipaddr)
- {
- 8009820: b508 push {r3, lr}
- LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n"));
- return etharp_request_dst(netif, ipaddr, ðbroadcast);
- 8009822: 4a02 ldr r2, [pc, #8] @ (800982c <etharp_request+0xc>)
- 8009824: f7ff ff68 bl 80096f8 <etharp_request_dst>
- }
- 8009828: bd08 pop {r3, pc}
- 800982a: bf00 nop
- 800982c: 080154bc .word 0x080154bc
- 08009830 <etharp_tmr>:
- {
- 8009830: b510 push {r4, lr}
- for (i = 0; i < ARP_TABLE_SIZE; ++i) {
- 8009832: 2400 movs r4, #0
- 8009834: e005 b.n 8009842 <etharp_tmr+0x12>
- ((arp_table[i].state == ETHARP_STATE_PENDING) &&
- 8009836: 2b04 cmp r3, #4
- 8009838: d91b bls.n 8009872 <etharp_tmr+0x42>
- etharp_free_entry(i);
- 800983a: 4620 mov r0, r4
- 800983c: f7ff fd8a bl 8009354 <etharp_free_entry>
- for (i = 0; i < ARP_TABLE_SIZE; ++i) {
- 8009840: 3401 adds r4, #1
- 8009842: 2c09 cmp r4, #9
- 8009844: dc35 bgt.n 80098b2 <etharp_tmr+0x82>
- u8_t state = arp_table[i].state;
- 8009846: eb04 0344 add.w r3, r4, r4, lsl #1
- 800984a: 00da lsls r2, r3, #3
- 800984c: 4b19 ldr r3, [pc, #100] @ (80098b4 <etharp_tmr+0x84>)
- 800984e: 4413 add r3, r2
- 8009850: 7d1a ldrb r2, [r3, #20]
- if (state != ETHARP_STATE_EMPTY
- 8009852: 2a00 cmp r2, #0
- 8009854: d0f4 beq.n 8009840 <etharp_tmr+0x10>
- arp_table[i].ctime++;
- 8009856: eb04 0144 add.w r1, r4, r4, lsl #1
- 800985a: 00cb lsls r3, r1, #3
- 800985c: 4915 ldr r1, [pc, #84] @ (80098b4 <etharp_tmr+0x84>)
- 800985e: 4419 add r1, r3
- 8009860: 8a4b ldrh r3, [r1, #18]
- 8009862: 3301 adds r3, #1
- 8009864: b29b uxth r3, r3
- 8009866: 824b strh r3, [r1, #18]
- if ((arp_table[i].ctime >= ARP_MAXAGE) ||
- 8009868: f5b3 7f96 cmp.w r3, #300 @ 0x12c
- 800986c: d2e5 bcs.n 800983a <etharp_tmr+0xa>
- 800986e: 2a01 cmp r2, #1
- 8009870: d0e1 beq.n 8009836 <etharp_tmr+0x6>
- } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_1) {
- 8009872: 2a03 cmp r2, #3
- 8009874: d00d beq.n 8009892 <etharp_tmr+0x62>
- } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_2) {
- 8009876: 2a04 cmp r2, #4
- 8009878: d013 beq.n 80098a2 <etharp_tmr+0x72>
- } else if (arp_table[i].state == ETHARP_STATE_PENDING) {
- 800987a: 2a01 cmp r2, #1
- 800987c: d1e0 bne.n 8009840 <etharp_tmr+0x10>
- etharp_request(arp_table[i].netif, &arp_table[i].ipaddr);
- 800987e: eb04 0244 add.w r2, r4, r4, lsl #1
- 8009882: 00d3 lsls r3, r2, #3
- 8009884: 4a0b ldr r2, [pc, #44] @ (80098b4 <etharp_tmr+0x84>)
- 8009886: 4413 add r3, r2
- 8009888: 1d19 adds r1, r3, #4
- 800988a: 6898 ldr r0, [r3, #8]
- 800988c: f7ff ffc8 bl 8009820 <etharp_request>
- 8009890: e7d6 b.n 8009840 <etharp_tmr+0x10>
- arp_table[i].state = ETHARP_STATE_STABLE_REREQUESTING_2;
- 8009892: eb04 0344 add.w r3, r4, r4, lsl #1
- 8009896: 00da lsls r2, r3, #3
- 8009898: 4b06 ldr r3, [pc, #24] @ (80098b4 <etharp_tmr+0x84>)
- 800989a: 4413 add r3, r2
- 800989c: 2204 movs r2, #4
- 800989e: 751a strb r2, [r3, #20]
- 80098a0: e7ce b.n 8009840 <etharp_tmr+0x10>
- arp_table[i].state = ETHARP_STATE_STABLE;
- 80098a2: eb04 0344 add.w r3, r4, r4, lsl #1
- 80098a6: 00da lsls r2, r3, #3
- 80098a8: 4b02 ldr r3, [pc, #8] @ (80098b4 <etharp_tmr+0x84>)
- 80098aa: 4413 add r3, r2
- 80098ac: 2202 movs r2, #2
- 80098ae: 751a strb r2, [r3, #20]
- 80098b0: e7c6 b.n 8009840 <etharp_tmr+0x10>
- }
- 80098b2: bd10 pop {r4, pc}
- 80098b4: 24012f2c .word 0x24012f2c
- 080098b8 <etharp_output_to_arp_index>:
- {
- 80098b8: b570 push {r4, r5, r6, lr}
- 80098ba: b082 sub sp, #8
- 80098bc: 4605 mov r5, r0
- 80098be: 460e mov r6, r1
- 80098c0: 4614 mov r4, r2
- LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE",
- 80098c2: eb02 0242 add.w r2, r2, r2, lsl #1
- 80098c6: 4b2e ldr r3, [pc, #184] @ (8009980 <etharp_output_to_arp_index+0xc8>)
- 80098c8: eb03 03c2 add.w r3, r3, r2, lsl #3
- 80098cc: 7d1b ldrb r3, [r3, #20]
- 80098ce: 2b01 cmp r3, #1
- 80098d0: d919 bls.n 8009906 <etharp_output_to_arp_index+0x4e>
- if (arp_table[arp_idx].state == ETHARP_STATE_STABLE) {
- 80098d2: eb04 0244 add.w r2, r4, r4, lsl #1
- 80098d6: 4b2a ldr r3, [pc, #168] @ (8009980 <etharp_output_to_arp_index+0xc8>)
- 80098d8: eb03 03c2 add.w r3, r3, r2, lsl #3
- 80098dc: 7d1b ldrb r3, [r3, #20]
- 80098de: 2b02 cmp r3, #2
- 80098e0: d019 beq.n 8009916 <etharp_output_to_arp_index+0x5e>
- return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP);
- 80098e2: eb04 0344 add.w r3, r4, r4, lsl #1
- 80098e6: 00db lsls r3, r3, #3
- 80098e8: 3308 adds r3, #8
- 80098ea: 4a25 ldr r2, [pc, #148] @ (8009980 <etharp_output_to_arp_index+0xc8>)
- 80098ec: 4413 add r3, r2
- 80098ee: f44f 6200 mov.w r2, #2048 @ 0x800
- 80098f2: 9200 str r2, [sp, #0]
- 80098f4: 3304 adds r3, #4
- 80098f6: f105 022a add.w r2, r5, #42 @ 0x2a
- 80098fa: 4631 mov r1, r6
- 80098fc: 4628 mov r0, r5
- 80098fe: f000 fa21 bl 8009d44 <ethernet_output>
- }
- 8009902: b002 add sp, #8
- 8009904: bd70 pop {r4, r5, r6, pc}
- LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE",
- 8009906: 4b1f ldr r3, [pc, #124] @ (8009984 <etharp_output_to_arp_index+0xcc>)
- 8009908: f240 22ee movw r2, #750 @ 0x2ee
- 800990c: 491e ldr r1, [pc, #120] @ (8009988 <etharp_output_to_arp_index+0xd0>)
- 800990e: 481f ldr r0, [pc, #124] @ (800998c <etharp_output_to_arp_index+0xd4>)
- 8009910: f009 fd7a bl 8013408 <iprintf>
- 8009914: e7dd b.n 80098d2 <etharp_output_to_arp_index+0x1a>
- if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_BROADCAST) {
- 8009916: 4b1a ldr r3, [pc, #104] @ (8009980 <etharp_output_to_arp_index+0xc8>)
- 8009918: eb03 03c2 add.w r3, r3, r2, lsl #3
- 800991c: 8a5b ldrh r3, [r3, #18]
- 800991e: f5b3 7f8e cmp.w r3, #284 @ 0x11c
- 8009922: d81b bhi.n 800995c <etharp_output_to_arp_index+0xa4>
- } else if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_UNICAST) {
- 8009924: f5b3 7f87 cmp.w r3, #270 @ 0x10e
- 8009928: d3db bcc.n 80098e2 <etharp_output_to_arp_index+0x2a>
- if (etharp_request_dst(netif, &arp_table[arp_idx].ipaddr, &arp_table[arp_idx].ethaddr) == ERR_OK) {
- 800992a: eb04 0144 add.w r1, r4, r4, lsl #1
- 800992e: 4b14 ldr r3, [pc, #80] @ (8009980 <etharp_output_to_arp_index+0xc8>)
- 8009930: eb03 01c1 add.w r1, r3, r1, lsl #3
- 8009934: eb04 0244 add.w r2, r4, r4, lsl #1
- 8009938: 00d2 lsls r2, r2, #3
- 800993a: 3208 adds r2, #8
- 800993c: 441a add r2, r3
- 800993e: 3204 adds r2, #4
- 8009940: 3104 adds r1, #4
- 8009942: 4628 mov r0, r5
- 8009944: f7ff fed8 bl 80096f8 <etharp_request_dst>
- 8009948: 2800 cmp r0, #0
- 800994a: d1ca bne.n 80098e2 <etharp_output_to_arp_index+0x2a>
- arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1;
- 800994c: eb04 0244 add.w r2, r4, r4, lsl #1
- 8009950: 4b0b ldr r3, [pc, #44] @ (8009980 <etharp_output_to_arp_index+0xc8>)
- 8009952: eb03 03c2 add.w r3, r3, r2, lsl #3
- 8009956: 2203 movs r2, #3
- 8009958: 751a strb r2, [r3, #20]
- 800995a: e7c2 b.n 80098e2 <etharp_output_to_arp_index+0x2a>
- if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) {
- 800995c: 4908 ldr r1, [pc, #32] @ (8009980 <etharp_output_to_arp_index+0xc8>)
- 800995e: eb01 01c2 add.w r1, r1, r2, lsl #3
- 8009962: 3104 adds r1, #4
- 8009964: 4628 mov r0, r5
- 8009966: f7ff ff5b bl 8009820 <etharp_request>
- 800996a: 2800 cmp r0, #0
- 800996c: d1b9 bne.n 80098e2 <etharp_output_to_arp_index+0x2a>
- arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1;
- 800996e: eb04 0244 add.w r2, r4, r4, lsl #1
- 8009972: 4b03 ldr r3, [pc, #12] @ (8009980 <etharp_output_to_arp_index+0xc8>)
- 8009974: eb03 03c2 add.w r3, r3, r2, lsl #3
- 8009978: 2203 movs r2, #3
- 800997a: 751a strb r2, [r3, #20]
- 800997c: e7b1 b.n 80098e2 <etharp_output_to_arp_index+0x2a>
- 800997e: bf00 nop
- 8009980: 24012f2c .word 0x24012f2c
- 8009984: 08015210 .word 0x08015210
- 8009988: 0801538c .word 0x0801538c
- 800998c: 080144e8 .word 0x080144e8
- 08009990 <etharp_query>:
- {
- 8009990: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr}
- 8009994: b083 sub sp, #12
- 8009996: 4605 mov r5, r0
- 8009998: 4688 mov r8, r1
- 800999a: 4616 mov r6, r2
- struct eth_addr *srcaddr = (struct eth_addr *)netif->hwaddr;
- 800999c: f100 072a add.w r7, r0, #42 @ 0x2a
- if (ip4_addr_isbroadcast(ipaddr, netif) ||
- 80099a0: 4601 mov r1, r0
- 80099a2: f8d8 0000 ldr.w r0, [r8]
- 80099a6: f000 fd54 bl 800a452 <ip4_addr_isbroadcast_u32>
- 80099aa: 2800 cmp r0, #0
- 80099ac: f040 80a1 bne.w 8009af2 <etharp_query+0x162>
- ip4_addr_ismulticast(ipaddr) ||
- 80099b0: f8d8 3000 ldr.w r3, [r8]
- 80099b4: f003 02f0 and.w r2, r3, #240 @ 0xf0
- if (ip4_addr_isbroadcast(ipaddr, netif) ||
- 80099b8: 2ae0 cmp r2, #224 @ 0xe0
- 80099ba: f000 809d beq.w 8009af8 <etharp_query+0x168>
- ip4_addr_isany(ipaddr)) {
- 80099be: 2b00 cmp r3, #0
- 80099c0: f000 809d beq.w 8009afe <etharp_query+0x16e>
- i_err = etharp_find_entry(ipaddr, ETHARP_FLAG_TRY_HARD, netif);
- 80099c4: 462a mov r2, r5
- 80099c6: 2101 movs r1, #1
- 80099c8: 4640 mov r0, r8
- 80099ca: f7ff fce7 bl 800939c <etharp_find_entry>
- if (i_err < 0) {
- 80099ce: 1e04 subs r4, r0, #0
- 80099d0: db13 blt.n 80099fa <etharp_query+0x6a>
- LWIP_ASSERT("type overflow", (size_t)i_err < NETIF_ADDR_IDX_MAX);
- 80099d2: b2a3 uxth r3, r4
- 80099d4: 2b7e cmp r3, #126 @ 0x7e
- 80099d6: d812 bhi.n 80099fe <etharp_query+0x6e>
- i = (netif_addr_idx_t)i_err;
- 80099d8: b2e4 uxtb r4, r4
- if (arp_table[i].state == ETHARP_STATE_EMPTY) {
- 80099da: eb04 0244 add.w r2, r4, r4, lsl #1
- 80099de: 4b4b ldr r3, [pc, #300] @ (8009b0c <etharp_query+0x17c>)
- 80099e0: eb03 03c2 add.w r3, r3, r2, lsl #3
- 80099e4: 7d1b ldrb r3, [r3, #20]
- 80099e6: b993 cbnz r3, 8009a0e <etharp_query+0x7e>
- arp_table[i].state = ETHARP_STATE_PENDING;
- 80099e8: 4b48 ldr r3, [pc, #288] @ (8009b0c <etharp_query+0x17c>)
- 80099ea: eb03 03c2 add.w r3, r3, r2, lsl #3
- 80099ee: f04f 0901 mov.w r9, #1
- 80099f2: f883 9014 strb.w r9, [r3, #20]
- arp_table[i].netif = netif;
- 80099f6: 609d str r5, [r3, #8]
- 80099f8: e00b b.n 8009a12 <etharp_query+0x82>
- return (err_t)i_err;
- 80099fa: b260 sxtb r0, r4
- 80099fc: e042 b.n 8009a84 <etharp_query+0xf4>
- LWIP_ASSERT("type overflow", (size_t)i_err < NETIF_ADDR_IDX_MAX);
- 80099fe: 4b44 ldr r3, [pc, #272] @ (8009b10 <etharp_query+0x180>)
- 8009a00: f240 32c1 movw r2, #961 @ 0x3c1
- 8009a04: 4943 ldr r1, [pc, #268] @ (8009b14 <etharp_query+0x184>)
- 8009a06: 4844 ldr r0, [pc, #272] @ (8009b18 <etharp_query+0x188>)
- 8009a08: f009 fcfe bl 8013408 <iprintf>
- 8009a0c: e7e4 b.n 80099d8 <etharp_query+0x48>
- int is_new_entry = 0;
- 8009a0e: f04f 0900 mov.w r9, #0
- LWIP_ASSERT("arp_table[i].state == PENDING or STABLE",
- 8009a12: eb04 0244 add.w r2, r4, r4, lsl #1
- 8009a16: 4b3d ldr r3, [pc, #244] @ (8009b0c <etharp_query+0x17c>)
- 8009a18: eb03 03c2 add.w r3, r3, r2, lsl #3
- 8009a1c: 7d1b ldrb r3, [r3, #20]
- 8009a1e: b19b cbz r3, 8009a48 <etharp_query+0xb8>
- if (is_new_entry || (q == NULL)) {
- 8009a20: 2e00 cmp r6, #0
- 8009a22: bf14 ite ne
- 8009a24: 464b movne r3, r9
- 8009a26: f049 0301 orreq.w r3, r9, #1
- 8009a2a: b9ab cbnz r3, 8009a58 <etharp_query+0xc8>
- err_t result = ERR_MEM;
- 8009a2c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- if (arp_table[i].state >= ETHARP_STATE_STABLE) {
- 8009a30: eb04 0244 add.w r2, r4, r4, lsl #1
- 8009a34: 4b35 ldr r3, [pc, #212] @ (8009b0c <etharp_query+0x17c>)
- 8009a36: eb03 03c2 add.w r3, r3, r2, lsl #3
- 8009a3a: 7d1b ldrb r3, [r3, #20]
- 8009a3c: 2b01 cmp r3, #1
- 8009a3e: d812 bhi.n 8009a66 <etharp_query+0xd6>
- } else if (arp_table[i].state == ETHARP_STATE_PENDING) {
- 8009a40: 2b01 cmp r3, #1
- 8009a42: d11f bne.n 8009a84 <etharp_query+0xf4>
- p = q;
- 8009a44: 4635 mov r5, r6
- 8009a46: e025 b.n 8009a94 <etharp_query+0x104>
- LWIP_ASSERT("arp_table[i].state == PENDING or STABLE",
- 8009a48: 4b31 ldr r3, [pc, #196] @ (8009b10 <etharp_query+0x180>)
- 8009a4a: f240 32cd movw r2, #973 @ 0x3cd
- 8009a4e: 4933 ldr r1, [pc, #204] @ (8009b1c <etharp_query+0x18c>)
- 8009a50: 4831 ldr r0, [pc, #196] @ (8009b18 <etharp_query+0x188>)
- 8009a52: f009 fcd9 bl 8013408 <iprintf>
- 8009a56: e7e3 b.n 8009a20 <etharp_query+0x90>
- result = etharp_request(netif, ipaddr);
- 8009a58: 4641 mov r1, r8
- 8009a5a: 4628 mov r0, r5
- 8009a5c: f7ff fee0 bl 8009820 <etharp_request>
- if (q == NULL) {
- 8009a60: 2e00 cmp r6, #0
- 8009a62: d1e5 bne.n 8009a30 <etharp_query+0xa0>
- 8009a64: e00e b.n 8009a84 <etharp_query+0xf4>
- ETHARP_SET_ADDRHINT(netif, i);
- 8009a66: 4b2e ldr r3, [pc, #184] @ (8009b20 <etharp_query+0x190>)
- 8009a68: 701c strb r4, [r3, #0]
- result = ethernet_output(netif, q, srcaddr, &(arp_table[i].ethaddr), ETHTYPE_IP);
- 8009a6a: 00d3 lsls r3, r2, #3
- 8009a6c: 3308 adds r3, #8
- 8009a6e: 4a27 ldr r2, [pc, #156] @ (8009b0c <etharp_query+0x17c>)
- 8009a70: 4413 add r3, r2
- 8009a72: f44f 6200 mov.w r2, #2048 @ 0x800
- 8009a76: 9200 str r2, [sp, #0]
- 8009a78: 3304 adds r3, #4
- 8009a7a: 463a mov r2, r7
- 8009a7c: 4631 mov r1, r6
- 8009a7e: 4628 mov r0, r5
- 8009a80: f000 f960 bl 8009d44 <ethernet_output>
- }
- 8009a84: b003 add sp, #12
- 8009a86: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
- if (PBUF_NEEDS_COPY(p)) {
- 8009a8a: 7b2b ldrb r3, [r5, #12]
- 8009a8c: f013 0f40 tst.w r3, #64 @ 0x40
- 8009a90: d129 bne.n 8009ae6 <etharp_query+0x156>
- p = p->next;
- 8009a92: 682d ldr r5, [r5, #0]
- while (p) {
- 8009a94: b175 cbz r5, 8009ab4 <etharp_query+0x124>
- LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0));
- 8009a96: 896a ldrh r2, [r5, #10]
- 8009a98: 892b ldrh r3, [r5, #8]
- 8009a9a: 429a cmp r2, r3
- 8009a9c: d1f5 bne.n 8009a8a <etharp_query+0xfa>
- 8009a9e: 682b ldr r3, [r5, #0]
- 8009aa0: 2b00 cmp r3, #0
- 8009aa2: d0f2 beq.n 8009a8a <etharp_query+0xfa>
- 8009aa4: 4b1a ldr r3, [pc, #104] @ (8009b10 <etharp_query+0x180>)
- 8009aa6: f240 32f1 movw r2, #1009 @ 0x3f1
- 8009aaa: 491e ldr r1, [pc, #120] @ (8009b24 <etharp_query+0x194>)
- 8009aac: 481a ldr r0, [pc, #104] @ (8009b18 <etharp_query+0x188>)
- 8009aae: f009 fcab bl 8013408 <iprintf>
- 8009ab2: e7ea b.n 8009a8a <etharp_query+0xfa>
- int copy_needed = 0;
- 8009ab4: 2300 movs r3, #0
- if (copy_needed) {
- 8009ab6: b1c3 cbz r3, 8009aea <etharp_query+0x15a>
- p = pbuf_clone(PBUF_LINK, PBUF_RAM, q);
- 8009ab8: 4632 mov r2, r6
- 8009aba: f44f 7120 mov.w r1, #640 @ 0x280
- 8009abe: 200e movs r0, #14
- 8009ac0: f002 fc3e bl 800c340 <pbuf_clone>
- 8009ac4: 4606 mov r6, r0
- if (p != NULL) {
- 8009ac6: b1ee cbz r6, 8009b04 <etharp_query+0x174>
- if (arp_table[i].q != NULL) {
- 8009ac8: eb04 0344 add.w r3, r4, r4, lsl #1
- 8009acc: 4a0f ldr r2, [pc, #60] @ (8009b0c <etharp_query+0x17c>)
- 8009ace: f852 0033 ldr.w r0, [r2, r3, lsl #3]
- 8009ad2: b108 cbz r0, 8009ad8 <etharp_query+0x148>
- pbuf_free(arp_table[i].q);
- 8009ad4: f002 f964 bl 800bda0 <pbuf_free>
- arp_table[i].q = p;
- 8009ad8: eb04 0444 add.w r4, r4, r4, lsl #1
- 8009adc: 4b0b ldr r3, [pc, #44] @ (8009b0c <etharp_query+0x17c>)
- 8009ade: f843 6034 str.w r6, [r3, r4, lsl #3]
- result = ERR_OK;
- 8009ae2: 2000 movs r0, #0
- 8009ae4: e7ce b.n 8009a84 <etharp_query+0xf4>
- copy_needed = 1;
- 8009ae6: 2301 movs r3, #1
- 8009ae8: e7e5 b.n 8009ab6 <etharp_query+0x126>
- pbuf_ref(p);
- 8009aea: 4630 mov r0, r6
- 8009aec: f002 fae6 bl 800c0bc <pbuf_ref>
- 8009af0: e7e9 b.n 8009ac6 <etharp_query+0x136>
- return ERR_ARG;
- 8009af2: f06f 000f mvn.w r0, #15
- 8009af6: e7c5 b.n 8009a84 <etharp_query+0xf4>
- 8009af8: f06f 000f mvn.w r0, #15
- 8009afc: e7c2 b.n 8009a84 <etharp_query+0xf4>
- 8009afe: f06f 000f mvn.w r0, #15
- 8009b02: e7bf b.n 8009a84 <etharp_query+0xf4>
- result = ERR_MEM;
- 8009b04: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8009b08: e7bc b.n 8009a84 <etharp_query+0xf4>
- 8009b0a: bf00 nop
- 8009b0c: 24012f2c .word 0x24012f2c
- 8009b10: 08015210 .word 0x08015210
- 8009b14: 080153bc .word 0x080153bc
- 8009b18: 080144e8 .word 0x080144e8
- 8009b1c: 080153cc .word 0x080153cc
- 8009b20: 24012f28 .word 0x24012f28
- 8009b24: 080153f4 .word 0x080153f4
- 08009b28 <etharp_output>:
- {
- 8009b28: b5f0 push {r4, r5, r6, r7, lr}
- 8009b2a: b085 sub sp, #20
- 8009b2c: 4605 mov r5, r0
- 8009b2e: 460f mov r7, r1
- 8009b30: 4616 mov r6, r2
- LWIP_ASSERT_CORE_LOCKED();
- 8009b32: f7f9 ffeb bl 8003b0c <sys_check_core_locking>
- LWIP_ASSERT("netif != NULL", netif != NULL);
- 8009b36: 2d00 cmp r5, #0
- 8009b38: d03d beq.n 8009bb6 <etharp_output+0x8e>
- LWIP_ASSERT("q != NULL", q != NULL);
- 8009b3a: 2f00 cmp r7, #0
- 8009b3c: d043 beq.n 8009bc6 <etharp_output+0x9e>
- LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL);
- 8009b3e: 2e00 cmp r6, #0
- 8009b40: d049 beq.n 8009bd6 <etharp_output+0xae>
- if (ip4_addr_isbroadcast(ipaddr, netif)) {
- 8009b42: 4629 mov r1, r5
- 8009b44: 6830 ldr r0, [r6, #0]
- 8009b46: f000 fc84 bl 800a452 <ip4_addr_isbroadcast_u32>
- 8009b4a: 4603 mov r3, r0
- 8009b4c: 2800 cmp r0, #0
- 8009b4e: f040 8084 bne.w 8009c5a <etharp_output+0x132>
- } else if (ip4_addr_ismulticast(ipaddr)) {
- 8009b52: 6832 ldr r2, [r6, #0]
- 8009b54: f002 01f0 and.w r1, r2, #240 @ 0xf0
- 8009b58: 29e0 cmp r1, #224 @ 0xe0
- 8009b5a: d044 beq.n 8009be6 <etharp_output+0xbe>
- if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) &&
- 8009b5c: 6869 ldr r1, [r5, #4]
- 8009b5e: 68a8 ldr r0, [r5, #8]
- 8009b60: 4051 eors r1, r2
- 8009b62: 4201 tst r1, r0
- 8009b64: d009 beq.n 8009b7a <etharp_output+0x52>
- !ip4_addr_islinklocal(ipaddr)) {
- 8009b66: b292 uxth r2, r2
- if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) &&
- 8009b68: f64f 61a9 movw r1, #65193 @ 0xfea9
- 8009b6c: 428a cmp r2, r1
- 8009b6e: d004 beq.n 8009b7a <etharp_output+0x52>
- if (!ip4_addr_isany_val(*netif_ip4_gw(netif))) {
- 8009b70: 68ea ldr r2, [r5, #12]
- 8009b72: 2a00 cmp r2, #0
- 8009b74: d07d beq.n 8009c72 <etharp_output+0x14a>
- dst_addr = netif_ip4_gw(netif);
- 8009b76: f105 060c add.w r6, r5, #12
- if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) &&
- 8009b7a: 4a3f ldr r2, [pc, #252] @ (8009c78 <etharp_output+0x150>)
- 8009b7c: 7812 ldrb r2, [r2, #0]
- 8009b7e: eb02 0042 add.w r0, r2, r2, lsl #1
- 8009b82: 493e ldr r1, [pc, #248] @ (8009c7c <etharp_output+0x154>)
- 8009b84: eb01 01c0 add.w r1, r1, r0, lsl #3
- 8009b88: 7d09 ldrb r1, [r1, #20]
- 8009b8a: 2901 cmp r1, #1
- 8009b8c: d943 bls.n 8009c16 <etharp_output+0xee>
- (arp_table[etharp_cached_entry].netif == netif) &&
- 8009b8e: 493b ldr r1, [pc, #236] @ (8009c7c <etharp_output+0x154>)
- 8009b90: eb01 01c0 add.w r1, r1, r0, lsl #3
- 8009b94: 6889 ldr r1, [r1, #8]
- if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) &&
- 8009b96: 42a9 cmp r1, r5
- 8009b98: d13d bne.n 8009c16 <etharp_output+0xee>
- (ip4_addr_cmp(dst_addr, &arp_table[etharp_cached_entry].ipaddr))) {
- 8009b9a: 6830 ldr r0, [r6, #0]
- 8009b9c: eb02 0442 add.w r4, r2, r2, lsl #1
- 8009ba0: 4936 ldr r1, [pc, #216] @ (8009c7c <etharp_output+0x154>)
- 8009ba2: eb01 01c4 add.w r1, r1, r4, lsl #3
- 8009ba6: 6849 ldr r1, [r1, #4]
- (arp_table[etharp_cached_entry].netif == netif) &&
- 8009ba8: 4288 cmp r0, r1
- 8009baa: d134 bne.n 8009c16 <etharp_output+0xee>
- return etharp_output_to_arp_index(netif, q, etharp_cached_entry);
- 8009bac: 4639 mov r1, r7
- 8009bae: 4628 mov r0, r5
- 8009bb0: f7ff fe82 bl 80098b8 <etharp_output_to_arp_index>
- 8009bb4: e05b b.n 8009c6e <etharp_output+0x146>
- LWIP_ASSERT("netif != NULL", netif != NULL);
- 8009bb6: 4b32 ldr r3, [pc, #200] @ (8009c80 <etharp_output+0x158>)
- 8009bb8: f240 321e movw r2, #798 @ 0x31e
- 8009bbc: 4931 ldr r1, [pc, #196] @ (8009c84 <etharp_output+0x15c>)
- 8009bbe: 4832 ldr r0, [pc, #200] @ (8009c88 <etharp_output+0x160>)
- 8009bc0: f009 fc22 bl 8013408 <iprintf>
- 8009bc4: e7b9 b.n 8009b3a <etharp_output+0x12>
- LWIP_ASSERT("q != NULL", q != NULL);
- 8009bc6: 4b2e ldr r3, [pc, #184] @ (8009c80 <etharp_output+0x158>)
- 8009bc8: f240 321f movw r2, #799 @ 0x31f
- 8009bcc: 492f ldr r1, [pc, #188] @ (8009c8c <etharp_output+0x164>)
- 8009bce: 482e ldr r0, [pc, #184] @ (8009c88 <etharp_output+0x160>)
- 8009bd0: f009 fc1a bl 8013408 <iprintf>
- 8009bd4: e7b3 b.n 8009b3e <etharp_output+0x16>
- LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL);
- 8009bd6: 4b2a ldr r3, [pc, #168] @ (8009c80 <etharp_output+0x158>)
- 8009bd8: f44f 7248 mov.w r2, #800 @ 0x320
- 8009bdc: 492c ldr r1, [pc, #176] @ (8009c90 <etharp_output+0x168>)
- 8009bde: 482a ldr r0, [pc, #168] @ (8009c88 <etharp_output+0x160>)
- 8009be0: f009 fc12 bl 8013408 <iprintf>
- 8009be4: e7ad b.n 8009b42 <etharp_output+0x1a>
- mcastaddr.addr[0] = LL_IP4_MULTICAST_ADDR_0;
- 8009be6: 2301 movs r3, #1
- 8009be8: f88d 3008 strb.w r3, [sp, #8]
- mcastaddr.addr[1] = LL_IP4_MULTICAST_ADDR_1;
- 8009bec: 2300 movs r3, #0
- 8009bee: f88d 3009 strb.w r3, [sp, #9]
- mcastaddr.addr[2] = LL_IP4_MULTICAST_ADDR_2;
- 8009bf2: 235e movs r3, #94 @ 0x5e
- 8009bf4: f88d 300a strb.w r3, [sp, #10]
- mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f;
- 8009bf8: 7873 ldrb r3, [r6, #1]
- 8009bfa: f003 037f and.w r3, r3, #127 @ 0x7f
- 8009bfe: f88d 300b strb.w r3, [sp, #11]
- mcastaddr.addr[4] = ip4_addr3(ipaddr);
- 8009c02: 78b3 ldrb r3, [r6, #2]
- 8009c04: f88d 300c strb.w r3, [sp, #12]
- mcastaddr.addr[5] = ip4_addr4(ipaddr);
- 8009c08: 78f3 ldrb r3, [r6, #3]
- 8009c0a: f88d 300d strb.w r3, [sp, #13]
- dest = &mcastaddr;
- 8009c0e: ab02 add r3, sp, #8
- 8009c10: e024 b.n 8009c5c <etharp_output+0x134>
- for (i = 0; i < ARP_TABLE_SIZE; i++) {
- 8009c12: 3301 adds r3, #1
- 8009c14: b2db uxtb r3, r3
- 8009c16: 2b09 cmp r3, #9
- 8009c18: d819 bhi.n 8009c4e <etharp_output+0x126>
- if ((arp_table[i].state >= ETHARP_STATE_STABLE) &&
- 8009c1a: eb03 0c43 add.w ip, r3, r3, lsl #1
- 8009c1e: 4c17 ldr r4, [pc, #92] @ (8009c7c <etharp_output+0x154>)
- 8009c20: eb04 0ccc add.w ip, r4, ip, lsl #3
- 8009c24: f89c 2014 ldrb.w r2, [ip, #20]
- 8009c28: 2a01 cmp r2, #1
- 8009c2a: d9f2 bls.n 8009c12 <etharp_output+0xea>
- (arp_table[i].netif == netif) &&
- 8009c2c: f8dc 2008 ldr.w r2, [ip, #8]
- if ((arp_table[i].state >= ETHARP_STATE_STABLE) &&
- 8009c30: 42aa cmp r2, r5
- 8009c32: d1ee bne.n 8009c12 <etharp_output+0xea>
- (ip4_addr_cmp(dst_addr, &arp_table[i].ipaddr))) {
- 8009c34: 6831 ldr r1, [r6, #0]
- 8009c36: f8dc 2004 ldr.w r2, [ip, #4]
- (arp_table[i].netif == netif) &&
- 8009c3a: 4291 cmp r1, r2
- 8009c3c: d1e9 bne.n 8009c12 <etharp_output+0xea>
- ETHARP_SET_ADDRHINT(netif, i);
- 8009c3e: 4a0e ldr r2, [pc, #56] @ (8009c78 <etharp_output+0x150>)
- 8009c40: 7013 strb r3, [r2, #0]
- return etharp_output_to_arp_index(netif, q, i);
- 8009c42: 461a mov r2, r3
- 8009c44: 4639 mov r1, r7
- 8009c46: 4628 mov r0, r5
- 8009c48: f7ff fe36 bl 80098b8 <etharp_output_to_arp_index>
- 8009c4c: e00f b.n 8009c6e <etharp_output+0x146>
- return etharp_query(netif, dst_addr, q);
- 8009c4e: 463a mov r2, r7
- 8009c50: 4631 mov r1, r6
- 8009c52: 4628 mov r0, r5
- 8009c54: f7ff fe9c bl 8009990 <etharp_query>
- 8009c58: e009 b.n 8009c6e <etharp_output+0x146>
- dest = (const struct eth_addr *)ðbroadcast;
- 8009c5a: 4b0e ldr r3, [pc, #56] @ (8009c94 <etharp_output+0x16c>)
- return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), dest, ETHTYPE_IP);
- 8009c5c: f44f 6200 mov.w r2, #2048 @ 0x800
- 8009c60: 9200 str r2, [sp, #0]
- 8009c62: f105 022a add.w r2, r5, #42 @ 0x2a
- 8009c66: 4639 mov r1, r7
- 8009c68: 4628 mov r0, r5
- 8009c6a: f000 f86b bl 8009d44 <ethernet_output>
- }
- 8009c6e: b005 add sp, #20
- 8009c70: bdf0 pop {r4, r5, r6, r7, pc}
- return ERR_RTE;
- 8009c72: f06f 0003 mvn.w r0, #3
- 8009c76: e7fa b.n 8009c6e <etharp_output+0x146>
- 8009c78: 24012f28 .word 0x24012f28
- 8009c7c: 24012f2c .word 0x24012f2c
- 8009c80: 08015210 .word 0x08015210
- 8009c84: 080144d8 .word 0x080144d8
- 8009c88: 080144e8 .word 0x080144e8
- 8009c8c: 08015410 .word 0x08015410
- 8009c90: 0801536c .word 0x0801536c
- 8009c94: 080154bc .word 0x080154bc
- 08009c98 <ethernet_input>:
- * @see ETHARP_SUPPORT_VLAN
- * @see LWIP_HOOK_VLAN_CHECK
- */
- err_t
- ethernet_input(struct pbuf *p, struct netif *netif)
- {
- 8009c98: b570 push {r4, r5, r6, lr}
- 8009c9a: 4604 mov r4, r0
- 8009c9c: 460d mov r5, r1
- u16_t type;
- #if LWIP_ARP || ETHARP_SUPPORT_VLAN || LWIP_IPV6
- u16_t next_hdr_offset = SIZEOF_ETH_HDR;
- #endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */
- LWIP_ASSERT_CORE_LOCKED();
- 8009c9e: f7f9 ff35 bl 8003b0c <sys_check_core_locking>
- if (p->len <= SIZEOF_ETH_HDR) {
- 8009ca2: 8963 ldrh r3, [r4, #10]
- 8009ca4: 2b0e cmp r3, #14
- 8009ca6: d91b bls.n 8009ce0 <ethernet_input+0x48>
- ETHARP_STATS_INC(etharp.drop);
- MIB2_STATS_NETIF_INC(netif, ifinerrors);
- goto free_and_return;
- }
- if (p->if_idx == NETIF_NO_INDEX) {
- 8009ca8: 7be3 ldrb r3, [r4, #15]
- 8009caa: b91b cbnz r3, 8009cb4 <ethernet_input+0x1c>
- p->if_idx = netif_get_index(netif);
- 8009cac: f895 3034 ldrb.w r3, [r5, #52] @ 0x34
- 8009cb0: 3301 adds r3, #1
- 8009cb2: 73e3 strb r3, [r4, #15]
- }
- /* points to packet payload, which starts with an Ethernet header */
- ethhdr = (struct eth_hdr *)p->payload;
- 8009cb4: 6860 ldr r0, [r4, #4]
- (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;
- 8009cb6: 8986 ldrh r6, [r0, #12]
- #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) {
- 8009cb8: 7803 ldrb r3, [r0, #0]
- 8009cba: f013 0f01 tst.w r3, #1
- 8009cbe: d00a beq.n 8009cd6 <ethernet_input+0x3e>
- /* this might be a multicast or broadcast packet */
- if (ethhdr->dest.addr[0] == LL_IP4_MULTICAST_ADDR_0) {
- 8009cc0: 2b01 cmp r3, #1
- 8009cc2: d012 beq.n 8009cea <ethernet_input+0x52>
- (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)) {
- 8009cc4: 2206 movs r2, #6
- 8009cc6: 491e ldr r1, [pc, #120] @ (8009d40 <ethernet_input+0xa8>)
- 8009cc8: f009 fce6 bl 8013698 <memcmp>
- 8009ccc: b918 cbnz r0, 8009cd6 <ethernet_input+0x3e>
- /* mark the pbuf as link-layer broadcast */
- p->flags |= PBUF_FLAG_LLBCAST;
- 8009cce: 7b63 ldrb r3, [r4, #13]
- 8009cd0: f043 0308 orr.w r3, r3, #8
- 8009cd4: 7363 strb r3, [r4, #13]
- }
- }
- switch (type) {
- 8009cd6: 2e08 cmp r6, #8
- 8009cd8: d012 beq.n 8009d00 <ethernet_input+0x68>
- 8009cda: f5b6 6fc1 cmp.w r6, #1544 @ 0x608
- 8009cde: d01f beq.n 8009d20 <ethernet_input+0x88>
- /* This means the pbuf is freed or consumed,
- so the caller doesn't have to free it again */
- return ERR_OK;
- free_and_return:
- pbuf_free(p);
- 8009ce0: 4620 mov r0, r4
- 8009ce2: f002 f85d bl 800bda0 <pbuf_free>
- return ERR_OK;
- }
- 8009ce6: 2000 movs r0, #0
- 8009ce8: bd70 pop {r4, r5, r6, pc}
- if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) &&
- 8009cea: 7843 ldrb r3, [r0, #1]
- 8009cec: 2b00 cmp r3, #0
- 8009cee: d1f2 bne.n 8009cd6 <ethernet_input+0x3e>
- (ethhdr->dest.addr[2] == LL_IP4_MULTICAST_ADDR_2)) {
- 8009cf0: 7883 ldrb r3, [r0, #2]
- if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) &&
- 8009cf2: 2b5e cmp r3, #94 @ 0x5e
- 8009cf4: d1ef bne.n 8009cd6 <ethernet_input+0x3e>
- p->flags |= PBUF_FLAG_LLMCAST;
- 8009cf6: 7b63 ldrb r3, [r4, #13]
- 8009cf8: f043 0310 orr.w r3, r3, #16
- 8009cfc: 7363 strb r3, [r4, #13]
- 8009cfe: e7ea b.n 8009cd6 <ethernet_input+0x3e>
- if (!(netif->flags & NETIF_FLAG_ETHARP)) {
- 8009d00: f895 3031 ldrb.w r3, [r5, #49] @ 0x31
- 8009d04: f013 0f08 tst.w r3, #8
- 8009d08: d0ea beq.n 8009ce0 <ethernet_input+0x48>
- if (pbuf_remove_header(p, next_hdr_offset)) {
- 8009d0a: 210e movs r1, #14
- 8009d0c: 4620 mov r0, r4
- 8009d0e: f002 f801 bl 800bd14 <pbuf_remove_header>
- 8009d12: 2800 cmp r0, #0
- 8009d14: d1e4 bne.n 8009ce0 <ethernet_input+0x48>
- ip4_input(p, netif);
- 8009d16: 4629 mov r1, r5
- 8009d18: 4620 mov r0, r4
- 8009d1a: f000 fa25 bl 800a168 <ip4_input>
- break;
- 8009d1e: e7e2 b.n 8009ce6 <ethernet_input+0x4e>
- if (!(netif->flags & NETIF_FLAG_ETHARP)) {
- 8009d20: f895 3031 ldrb.w r3, [r5, #49] @ 0x31
- 8009d24: f013 0f08 tst.w r3, #8
- 8009d28: d0da beq.n 8009ce0 <ethernet_input+0x48>
- if (pbuf_remove_header(p, next_hdr_offset)) {
- 8009d2a: 210e movs r1, #14
- 8009d2c: 4620 mov r0, r4
- 8009d2e: f001 fff1 bl 800bd14 <pbuf_remove_header>
- 8009d32: 2800 cmp r0, #0
- 8009d34: d1d4 bne.n 8009ce0 <ethernet_input+0x48>
- etharp_input(p, netif);
- 8009d36: 4629 mov r1, r5
- 8009d38: 4620 mov r0, r4
- 8009d3a: f7ff fd0b bl 8009754 <etharp_input>
- break;
- 8009d3e: e7d2 b.n 8009ce6 <ethernet_input+0x4e>
- 8009d40: 080154bc .word 0x080154bc
- 08009d44 <ethernet_output>:
- * @return ERR_OK if the packet was sent, any other err_t on failure
- */
- err_t
- ethernet_output(struct netif * netif, struct pbuf * p,
- const struct eth_addr * src, const struct eth_addr * dst,
- u16_t eth_type) {
- 8009d44: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8009d48: 4605 mov r5, r0
- 8009d4a: 460c mov r4, r1
- 8009d4c: 4616 mov r6, r2
- 8009d4e: 461f mov r7, r3
- struct eth_hdr *ethhdr;
- u16_t eth_type_be = lwip_htons(eth_type);
- 8009d50: f8bd 0018 ldrh.w r0, [sp, #24]
- 8009d54: f7fe f892 bl 8007e7c <lwip_htons>
- 8009d58: 4680 mov r8, r0
- 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) {
- 8009d5a: 210e movs r1, #14
- 8009d5c: 4620 mov r0, r4
- 8009d5e: f001 ffd4 bl 800bd0a <pbuf_add_header>
- 8009d62: b9f8 cbnz r0, 8009da4 <ethernet_output+0x60>
- goto pbuf_header_failed;
- }
- }
- LWIP_ASSERT_CORE_LOCKED();
- 8009d64: f7f9 fed2 bl 8003b0c <sys_check_core_locking>
- ethhdr = (struct eth_hdr *)p->payload;
- 8009d68: 6861 ldr r1, [r4, #4]
- ethhdr->type = eth_type_be;
- 8009d6a: f8a1 800c strh.w r8, [r1, #12]
- SMEMCPY(ðhdr->dest, dst, ETH_HWADDR_LEN);
- 8009d6e: 683b ldr r3, [r7, #0]
- 8009d70: 600b str r3, [r1, #0]
- 8009d72: 88bb ldrh r3, [r7, #4]
- 8009d74: 808b strh r3, [r1, #4]
- SMEMCPY(ðhdr->src, src, ETH_HWADDR_LEN);
- 8009d76: 6833 ldr r3, [r6, #0]
- 8009d78: f8c1 3006 str.w r3, [r1, #6]
- 8009d7c: 88b3 ldrh r3, [r6, #4]
- 8009d7e: 814b strh r3, [r1, #10]
- LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!",
- 8009d80: f895 3030 ldrb.w r3, [r5, #48] @ 0x30
- 8009d84: 2b06 cmp r3, #6
- 8009d86: d105 bne.n 8009d94 <ethernet_output+0x50>
- (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);
- 8009d88: 69ab ldr r3, [r5, #24]
- 8009d8a: 4621 mov r1, r4
- 8009d8c: 4628 mov r0, r5
- 8009d8e: 4798 blx r3
- 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;
- }
- 8009d90: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!",
- 8009d94: 4b05 ldr r3, [pc, #20] @ (8009dac <ethernet_output+0x68>)
- 8009d96: f44f 7299 mov.w r2, #306 @ 0x132
- 8009d9a: 4905 ldr r1, [pc, #20] @ (8009db0 <ethernet_output+0x6c>)
- 8009d9c: 4805 ldr r0, [pc, #20] @ (8009db4 <ethernet_output+0x70>)
- 8009d9e: f009 fb33 bl 8013408 <iprintf>
- 8009da2: e7f1 b.n 8009d88 <ethernet_output+0x44>
- return ERR_BUF;
- 8009da4: f06f 0001 mvn.w r0, #1
- 8009da8: e7f2 b.n 8009d90 <ethernet_output+0x4c>
- 8009daa: bf00 nop
- 8009dac: 0801541c .word 0x0801541c
- 8009db0: 08015480 .word 0x08015480
- 8009db4: 080144e8 .word 0x080144e8
- 08009db8 <icmp_send_response>:
- * @param type Type of the ICMP header
- * @param code Code of the ICMP header
- */
- static void
- icmp_send_response(struct pbuf *p, u8_t type, u8_t code)
- {
- 8009db8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8009dbc: b086 sub sp, #24
- 8009dbe: 4606 mov r6, r0
- 8009dc0: 4688 mov r8, r1
- 8009dc2: 4617 mov r7, r2
- /* 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,
- 8009dc4: f44f 7220 mov.w r2, #640 @ 0x280
- 8009dc8: 2124 movs r1, #36 @ 0x24
- 8009dca: 2022 movs r0, #34 @ 0x22
- 8009dcc: f002 f850 bl 800be70 <pbuf_alloc>
- PBUF_RAM);
- if (q == NULL) {
- 8009dd0: 2800 cmp r0, #0
- 8009dd2: d03b beq.n 8009e4c <icmp_send_response+0x94>
- 8009dd4: 4605 mov r5, r0
- LWIP_DEBUGF(ICMP_DEBUG, ("icmp_time_exceeded: failed to allocate pbuf for ICMP packet.\n"));
- MIB2_STATS_INC(mib2.icmpouterrors);
- return;
- }
- LWIP_ASSERT("check that first pbuf can hold icmp message",
- 8009dd6: 8943 ldrh r3, [r0, #10]
- 8009dd8: 2b23 cmp r3, #35 @ 0x23
- 8009dda: d93a bls.n 8009e52 <icmp_send_response+0x9a>
- (q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE)));
- iphdr = (struct ip_hdr *)p->payload;
- 8009ddc: f8d6 c004 ldr.w ip, [r6, #4]
- ip4_addr_debug_print_val(ICMP_DEBUG, iphdr->src);
- LWIP_DEBUGF(ICMP_DEBUG, (" to "));
- ip4_addr_debug_print_val(ICMP_DEBUG, iphdr->dest);
- LWIP_DEBUGF(ICMP_DEBUG, ("\n"));
- icmphdr = (struct icmp_echo_hdr *)q->payload;
- 8009de0: 686c ldr r4, [r5, #4]
- icmphdr->type = type;
- 8009de2: f884 8000 strb.w r8, [r4]
- icmphdr->code = code;
- 8009de6: 7067 strb r7, [r4, #1]
- icmphdr->id = 0;
- 8009de8: 2300 movs r3, #0
- 8009dea: 7123 strb r3, [r4, #4]
- 8009dec: 7163 strb r3, [r4, #5]
- icmphdr->seqno = 0;
- 8009dee: 71a3 strb r3, [r4, #6]
- 8009df0: 71e3 strb r3, [r4, #7]
- /* copy fields from original packet */
- SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload,
- 8009df2: 686b ldr r3, [r5, #4]
- 8009df4: 6872 ldr r2, [r6, #4]
- 8009df6: 6816 ldr r6, [r2, #0]
- 8009df8: 6850 ldr r0, [r2, #4]
- 8009dfa: 6891 ldr r1, [r2, #8]
- 8009dfc: 68d7 ldr r7, [r2, #12]
- 8009dfe: 609e str r6, [r3, #8]
- 8009e00: 60d8 str r0, [r3, #12]
- 8009e02: 6119 str r1, [r3, #16]
- 8009e04: 615f str r7, [r3, #20]
- 8009e06: 6916 ldr r6, [r2, #16]
- 8009e08: 6950 ldr r0, [r2, #20]
- 8009e0a: 6991 ldr r1, [r2, #24]
- 8009e0c: 619e str r6, [r3, #24]
- 8009e0e: 61d8 str r0, [r3, #28]
- 8009e10: 6219 str r1, [r3, #32]
- IP_HLEN + ICMP_DEST_UNREACH_DATASIZE);
- ip4_addr_copy(iphdr_src, iphdr->src);
- 8009e12: f8dc 300c ldr.w r3, [ip, #12]
- 8009e16: 9305 str r3, [sp, #20]
- 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);
- 8009e18: a805 add r0, sp, #20
- 8009e1a: f000 f971 bl 800a100 <ip4_route>
- #endif
- if (netif != NULL) {
- 8009e1e: 4607 mov r7, r0
- 8009e20: b188 cbz r0, 8009e46 <icmp_send_response+0x8e>
- /* calculate checksum */
- icmphdr->chksum = 0;
- 8009e22: 2600 movs r6, #0
- 8009e24: 70a6 strb r6, [r4, #2]
- 8009e26: 70e6 strb r6, [r4, #3]
- #if CHECKSUM_GEN_ICMP
- IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP) {
- icmphdr->chksum = inet_chksum(icmphdr, q->len);
- 8009e28: 8969 ldrh r1, [r5, #10]
- 8009e2a: 4620 mov r0, r4
- 8009e2c: f000 f914 bl 800a058 <inet_chksum>
- 8009e30: 8060 strh r0, [r4, #2]
- }
- #endif
- ICMP_STATS_INC(icmp.xmit);
- ip4_output_if(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP, netif);
- 8009e32: 9702 str r7, [sp, #8]
- 8009e34: 2301 movs r3, #1
- 8009e36: 9301 str r3, [sp, #4]
- 8009e38: 9600 str r6, [sp, #0]
- 8009e3a: 23ff movs r3, #255 @ 0xff
- 8009e3c: aa05 add r2, sp, #20
- 8009e3e: 4631 mov r1, r6
- 8009e40: 4628 mov r0, r5
- 8009e42: f000 faf1 bl 800a428 <ip4_output_if>
- }
- pbuf_free(q);
- 8009e46: 4628 mov r0, r5
- 8009e48: f001 ffaa bl 800bda0 <pbuf_free>
- }
- 8009e4c: b006 add sp, #24
- 8009e4e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- LWIP_ASSERT("check that first pbuf can hold icmp message",
- 8009e52: 4b04 ldr r3, [pc, #16] @ (8009e64 <icmp_send_response+0xac>)
- 8009e54: f44f 72b4 mov.w r2, #360 @ 0x168
- 8009e58: 4903 ldr r1, [pc, #12] @ (8009e68 <icmp_send_response+0xb0>)
- 8009e5a: 4804 ldr r0, [pc, #16] @ (8009e6c <icmp_send_response+0xb4>)
- 8009e5c: f009 fad4 bl 8013408 <iprintf>
- 8009e60: e7bc b.n 8009ddc <icmp_send_response+0x24>
- 8009e62: bf00 nop
- 8009e64: 080154c4 .word 0x080154c4
- 8009e68: 08015528 .word 0x08015528
- 8009e6c: 080144e8 .word 0x080144e8
- 08009e70 <icmp_input>:
- {
- 8009e70: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8009e74: b084 sub sp, #16
- 8009e76: 4605 mov r5, r0
- iphdr_in = ip4_current_header();
- 8009e78: 4b52 ldr r3, [pc, #328] @ (8009fc4 <icmp_input+0x154>)
- 8009e7a: 689e ldr r6, [r3, #8]
- hlen = IPH_HL_BYTES(iphdr_in);
- 8009e7c: 7834 ldrb r4, [r6, #0]
- 8009e7e: f004 040f and.w r4, r4, #15
- 8009e82: 00a4 lsls r4, r4, #2
- if (hlen < IP_HLEN) {
- 8009e84: 2c13 cmp r4, #19
- 8009e86: d916 bls.n 8009eb6 <icmp_input+0x46>
- 8009e88: 460f mov r7, r1
- if (p->len < sizeof(u16_t) * 2) {
- 8009e8a: 8943 ldrh r3, [r0, #10]
- 8009e8c: 2b03 cmp r3, #3
- 8009e8e: d912 bls.n 8009eb6 <icmp_input+0x46>
- type = *((u8_t *)p->payload);
- 8009e90: 6843 ldr r3, [r0, #4]
- 8009e92: 781b ldrb r3, [r3, #0]
- switch (type) {
- 8009e94: 2b08 cmp r3, #8
- 8009e96: f040 8086 bne.w 8009fa6 <icmp_input+0x136>
- if (ip4_addr_ismulticast(ip4_current_dest_addr())) {
- 8009e9a: 4b4a ldr r3, [pc, #296] @ (8009fc4 <icmp_input+0x154>)
- 8009e9c: 6958 ldr r0, [r3, #20]
- 8009e9e: f000 03f0 and.w r3, r0, #240 @ 0xf0
- 8009ea2: 2be0 cmp r3, #224 @ 0xe0
- 8009ea4: d01e beq.n 8009ee4 <icmp_input+0x74>
- if (ip4_addr_isbroadcast(ip4_current_dest_addr(), ip_current_netif())) {
- 8009ea6: 4b47 ldr r3, [pc, #284] @ (8009fc4 <icmp_input+0x154>)
- 8009ea8: 6819 ldr r1, [r3, #0]
- 8009eaa: f000 fad2 bl 800a452 <ip4_addr_isbroadcast_u32>
- 8009eae: b9c8 cbnz r0, 8009ee4 <icmp_input+0x74>
- if (p->tot_len < sizeof(struct icmp_echo_hdr)) {
- 8009eb0: 892b ldrh r3, [r5, #8]
- 8009eb2: 2b07 cmp r3, #7
- 8009eb4: d805 bhi.n 8009ec2 <icmp_input+0x52>
- pbuf_free(p);
- 8009eb6: 4628 mov r0, r5
- 8009eb8: f001 ff72 bl 800bda0 <pbuf_free>
- }
- 8009ebc: b004 add sp, #16
- 8009ebe: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- if (inet_chksum_pbuf(p) != 0) {
- 8009ec2: 4628 mov r0, r5
- 8009ec4: f000 f8ce bl 800a064 <inet_chksum_pbuf>
- 8009ec8: b980 cbnz r0, 8009eec <icmp_input+0x7c>
- if (pbuf_add_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) {
- 8009eca: f104 080e add.w r8, r4, #14
- 8009ece: 4641 mov r1, r8
- 8009ed0: 4628 mov r0, r5
- 8009ed2: f001 ff1a bl 800bd0a <pbuf_add_header>
- 8009ed6: 2800 cmp r0, #0
- 8009ed8: d03e beq.n 8009f58 <icmp_input+0xe8>
- u16_t alloc_len = (u16_t)(p->tot_len + hlen);
- 8009eda: 892b ldrh r3, [r5, #8]
- 8009edc: 1919 adds r1, r3, r4
- 8009ede: b289 uxth r1, r1
- if (alloc_len < p->tot_len) {
- 8009ee0: 428b cmp r3, r1
- 8009ee2: d907 bls.n 8009ef4 <icmp_input+0x84>
- pbuf_free(p);
- 8009ee4: 4628 mov r0, r5
- 8009ee6: f001 ff5b bl 800bda0 <pbuf_free>
- return;
- 8009eea: e7e7 b.n 8009ebc <icmp_input+0x4c>
- pbuf_free(p);
- 8009eec: 4628 mov r0, r5
- 8009eee: f001 ff57 bl 800bda0 <pbuf_free>
- return;
- 8009ef2: e7e3 b.n 8009ebc <icmp_input+0x4c>
- r = pbuf_alloc(PBUF_LINK, alloc_len, PBUF_RAM);
- 8009ef4: f44f 7220 mov.w r2, #640 @ 0x280
- 8009ef8: 200e movs r0, #14
- 8009efa: f001 ffb9 bl 800be70 <pbuf_alloc>
- if (r == NULL) {
- 8009efe: 4680 mov r8, r0
- 8009f00: 2800 cmp r0, #0
- 8009f02: d0ef beq.n 8009ee4 <icmp_input+0x74>
- if (r->len < hlen + sizeof(struct icmp_echo_hdr)) {
- 8009f04: 8942 ldrh r2, [r0, #10]
- 8009f06: f104 0308 add.w r3, r4, #8
- 8009f0a: 429a cmp r2, r3
- 8009f0c: d313 bcc.n 8009f36 <icmp_input+0xc6>
- MEMCPY(r->payload, iphdr_in, hlen);
- 8009f0e: 4622 mov r2, r4
- 8009f10: 4631 mov r1, r6
- 8009f12: 6840 ldr r0, [r0, #4]
- 8009f14: f009 fcb5 bl 8013882 <memcpy>
- if (pbuf_remove_header(r, hlen)) {
- 8009f18: 4621 mov r1, r4
- 8009f1a: 4640 mov r0, r8
- 8009f1c: f001 fefa bl 800bd14 <pbuf_remove_header>
- 8009f20: b960 cbnz r0, 8009f3c <icmp_input+0xcc>
- if (pbuf_copy(r, p) != ERR_OK) {
- 8009f22: 4629 mov r1, r5
- 8009f24: 4640 mov r0, r8
- 8009f26: f002 f929 bl 800c17c <pbuf_copy>
- 8009f2a: b988 cbnz r0, 8009f50 <icmp_input+0xe0>
- pbuf_free(p);
- 8009f2c: 4628 mov r0, r5
- 8009f2e: f001 ff37 bl 800bda0 <pbuf_free>
- p = r;
- 8009f32: 4645 mov r5, r8
- 8009f34: e015 b.n 8009f62 <icmp_input+0xf2>
- pbuf_free(r);
- 8009f36: f001 ff33 bl 800bda0 <pbuf_free>
- goto icmperr;
- 8009f3a: e7d3 b.n 8009ee4 <icmp_input+0x74>
- LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0);
- 8009f3c: 4b22 ldr r3, [pc, #136] @ (8009fc8 <icmp_input+0x158>)
- 8009f3e: 22b6 movs r2, #182 @ 0xb6
- 8009f40: 4922 ldr r1, [pc, #136] @ (8009fcc <icmp_input+0x15c>)
- 8009f42: 4823 ldr r0, [pc, #140] @ (8009fd0 <icmp_input+0x160>)
- 8009f44: f009 fa60 bl 8013408 <iprintf>
- pbuf_free(r);
- 8009f48: 4640 mov r0, r8
- 8009f4a: f001 ff29 bl 800bda0 <pbuf_free>
- goto icmperr;
- 8009f4e: e7c9 b.n 8009ee4 <icmp_input+0x74>
- pbuf_free(r);
- 8009f50: 4640 mov r0, r8
- 8009f52: f001 ff25 bl 800bda0 <pbuf_free>
- goto icmperr;
- 8009f56: e7c5 b.n 8009ee4 <icmp_input+0x74>
- if (pbuf_remove_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) {
- 8009f58: 4641 mov r1, r8
- 8009f5a: 4628 mov r0, r5
- 8009f5c: f001 feda bl 800bd14 <pbuf_remove_header>
- 8009f60: bb28 cbnz r0, 8009fae <icmp_input+0x13e>
- iecho = (struct icmp_echo_hdr *)p->payload;
- 8009f62: 686e ldr r6, [r5, #4]
- if (pbuf_add_header(p, hlen)) {
- 8009f64: 4621 mov r1, r4
- 8009f66: 4628 mov r0, r5
- 8009f68: f001 fecf bl 800bd0a <pbuf_add_header>
- 8009f6c: b9d8 cbnz r0, 8009fa6 <icmp_input+0x136>
- struct ip_hdr *iphdr = (struct ip_hdr *)p->payload;
- 8009f6e: 6869 ldr r1, [r5, #4]
- ip4_addr_copy(iphdr->src, *src);
- 8009f70: 4b14 ldr r3, [pc, #80] @ (8009fc4 <icmp_input+0x154>)
- 8009f72: 695a ldr r2, [r3, #20]
- 8009f74: 60ca str r2, [r1, #12]
- ip4_addr_copy(iphdr->dest, *ip4_current_src_addr());
- 8009f76: 691b ldr r3, [r3, #16]
- 8009f78: 610b str r3, [r1, #16]
- ICMPH_TYPE_SET(iecho, ICMP_ER);
- 8009f7a: 2300 movs r3, #0
- 8009f7c: 7033 strb r3, [r6, #0]
- if (iecho->chksum > PP_HTONS(0xffffU - (ICMP_ECHO << 8))) {
- 8009f7e: 8873 ldrh r3, [r6, #2]
- 8009f80: f64f 72f7 movw r2, #65527 @ 0xfff7
- 8009f84: 4293 cmp r3, r2
- 8009f86: d919 bls.n 8009fbc <icmp_input+0x14c>
- iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS((u16_t)(ICMP_ECHO << 8)) + 1);
- 8009f88: 3309 adds r3, #9
- 8009f8a: 8073 strh r3, [r6, #2]
- IPH_TTL_SET(iphdr, ICMP_TTL);
- 8009f8c: 23ff movs r3, #255 @ 0xff
- 8009f8e: 720b strb r3, [r1, #8]
- IPH_CHKSUM_SET(iphdr, 0);
- 8009f90: 2200 movs r2, #0
- 8009f92: 728a strb r2, [r1, #10]
- 8009f94: 72ca strb r2, [r1, #11]
- ret = ip4_output_if(p, src, LWIP_IP_HDRINCL,
- 8009f96: 9702 str r7, [sp, #8]
- 8009f98: 2101 movs r1, #1
- 8009f9a: 9101 str r1, [sp, #4]
- 8009f9c: 9200 str r2, [sp, #0]
- 8009f9e: 490d ldr r1, [pc, #52] @ (8009fd4 <icmp_input+0x164>)
- 8009fa0: 4628 mov r0, r5
- 8009fa2: f000 fa41 bl 800a428 <ip4_output_if>
- pbuf_free(p);
- 8009fa6: 4628 mov r0, r5
- 8009fa8: f001 fefa bl 800bda0 <pbuf_free>
- return;
- 8009fac: e786 b.n 8009ebc <icmp_input+0x4c>
- LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0);
- 8009fae: 4b06 ldr r3, [pc, #24] @ (8009fc8 <icmp_input+0x158>)
- 8009fb0: 22c7 movs r2, #199 @ 0xc7
- 8009fb2: 4909 ldr r1, [pc, #36] @ (8009fd8 <icmp_input+0x168>)
- 8009fb4: 4806 ldr r0, [pc, #24] @ (8009fd0 <icmp_input+0x160>)
- 8009fb6: f009 fa27 bl 8013408 <iprintf>
- goto icmperr;
- 8009fba: e793 b.n 8009ee4 <icmp_input+0x74>
- iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS(ICMP_ECHO << 8));
- 8009fbc: 3308 adds r3, #8
- 8009fbe: 8073 strh r3, [r6, #2]
- 8009fc0: e7e4 b.n 8009f8c <icmp_input+0x11c>
- 8009fc2: bf00 nop
- 8009fc4: 2401301c .word 0x2401301c
- 8009fc8: 080154c4 .word 0x080154c4
- 8009fcc: 08015554 .word 0x08015554
- 8009fd0: 080144e8 .word 0x080144e8
- 8009fd4: 24013030 .word 0x24013030
- 8009fd8: 0801558c .word 0x0801558c
- 08009fdc <icmp_dest_unreach>:
- {
- 8009fdc: b508 push {r3, lr}
- 8009fde: 460a mov r2, r1
- icmp_send_response(p, ICMP_DUR, t);
- 8009fe0: 2103 movs r1, #3
- 8009fe2: f7ff fee9 bl 8009db8 <icmp_send_response>
- }
- 8009fe6: bd08 pop {r3, pc}
- 08009fe8 <icmp_time_exceeded>:
- {
- 8009fe8: b508 push {r3, lr}
- 8009fea: 460a mov r2, r1
- icmp_send_response(p, ICMP_TE, t);
- 8009fec: 210b movs r1, #11
- 8009fee: f7ff fee3 bl 8009db8 <icmp_send_response>
- }
- 8009ff2: bd08 pop {r3, pc}
- 08009ff4 <lwip_standard_chksum>:
- * @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)
- {
- 8009ff4: b410 push {r4}
- const u8_t *pb = (const u8_t *)dataptr;
- const u16_t *ps;
- u16_t t = 0;
- 8009ff6: f04f 0c00 mov.w ip, #0
- u32_t sum = 0;
- int odd = ((mem_ptr_t)pb & 1);
- 8009ffa: f000 0401 and.w r4, r0, #1
- /* Get aligned to u16_t */
- if (odd && len > 0) {
- 8009ffe: 460b mov r3, r1
- 800a000: 4561 cmp r1, ip
- 800a002: bfd4 ite le
- 800a004: 2200 movle r2, #0
- 800a006: f000 0201 andgt.w r2, r0, #1
- 800a00a: b122 cbz r2, 800a016 <lwip_standard_chksum+0x22>
- ((u8_t *)&t)[1] = *pb++;
- 800a00c: f810 2b01 ldrb.w r2, [r0], #1
- 800a010: f362 2c1f bfi ip, r2, #8, #24
- len--;
- 800a014: 1e4b subs r3, r1, #1
- u32_t sum = 0;
- 800a016: 2200 movs r2, #0
- }
- /* Add the bulk of the data */
- ps = (const u16_t *)(const void *)pb;
- while (len > 1) {
- 800a018: e003 b.n 800a022 <lwip_standard_chksum+0x2e>
- sum += *ps++;
- 800a01a: f830 1b02 ldrh.w r1, [r0], #2
- 800a01e: 440a add r2, r1
- len -= 2;
- 800a020: 3b02 subs r3, #2
- while (len > 1) {
- 800a022: 2b01 cmp r3, #1
- 800a024: dcf9 bgt.n 800a01a <lwip_standard_chksum+0x26>
- }
- /* Consume left-over byte, if any */
- if (len > 0) {
- 800a026: 2b00 cmp r3, #0
- 800a028: dd04 ble.n 800a034 <lwip_standard_chksum+0x40>
- ((u8_t *)&t)[0] = *(const u8_t *)ps;
- 800a02a: 7803 ldrb r3, [r0, #0]
- 800a02c: f363 0c07 bfi ip, r3, #0, #8
- 800a030: fa1f fc8c uxth.w ip, ip
- }
- /* Add end bytes */
- sum += t;
- 800a034: 4494 add ip, r2
- /* Fold 32-bit sum to 16 bits
- calling this twice is probably faster than if statements... */
- sum = FOLD_U32T(sum);
- 800a036: fa1f f38c uxth.w r3, ip
- 800a03a: eb03 431c add.w r3, r3, ip, lsr #16
- sum = FOLD_U32T(sum);
- 800a03e: b298 uxth r0, r3
- 800a040: eb00 4013 add.w r0, r0, r3, lsr #16
- /* Swap if alignment was odd */
- if (odd) {
- 800a044: b124 cbz r4, 800a050 <lwip_standard_chksum+0x5c>
- sum = SWAP_BYTES_IN_WORD(sum);
- 800a046: 0203 lsls r3, r0, #8
- 800a048: b29b uxth r3, r3
- 800a04a: f3c0 2007 ubfx r0, r0, #8, #8
- 800a04e: 4318 orrs r0, r3
- }
- return (u16_t)sum;
- }
- 800a050: b280 uxth r0, r0
- 800a052: f85d 4b04 ldr.w r4, [sp], #4
- 800a056: 4770 bx lr
- 0800a058 <inet_chksum>:
- * @return checksum (as u16_t) to be saved directly in the protocol header
- */
- u16_t
- inet_chksum(const void *dataptr, u16_t len)
- {
- 800a058: b508 push {r3, lr}
- return (u16_t)~(unsigned int)LWIP_CHKSUM(dataptr, len);
- 800a05a: f7ff ffcb bl 8009ff4 <lwip_standard_chksum>
- 800a05e: 43c0 mvns r0, r0
- }
- 800a060: b280 uxth r0, r0
- 800a062: bd08 pop {r3, pc}
- 0800a064 <inet_chksum_pbuf>:
- * @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)
- {
- 800a064: b5f8 push {r3, r4, r5, r6, r7, lr}
- 800a066: 4605 mov r5, r0
- u32_t acc;
- struct pbuf *q;
- int swapped = 0;
- 800a068: 2700 movs r7, #0
- acc = 0;
- 800a06a: 463c mov r4, r7
- for (q = p; q != NULL; q = q->next) {
- 800a06c: e000 b.n 800a070 <inet_chksum_pbuf+0xc>
- 800a06e: 682d ldr r5, [r5, #0]
- 800a070: b19d cbz r5, 800a09a <inet_chksum_pbuf+0x36>
- acc += LWIP_CHKSUM(q->payload, q->len);
- 800a072: 896e ldrh r6, [r5, #10]
- 800a074: 4631 mov r1, r6
- 800a076: 6868 ldr r0, [r5, #4]
- 800a078: f7ff ffbc bl 8009ff4 <lwip_standard_chksum>
- 800a07c: 1903 adds r3, r0, r4
- acc = FOLD_U32T(acc);
- 800a07e: b29c uxth r4, r3
- 800a080: eb04 4413 add.w r4, r4, r3, lsr #16
- if (q->len % 2 != 0) {
- 800a084: f016 0f01 tst.w r6, #1
- 800a088: d0f1 beq.n 800a06e <inet_chksum_pbuf+0xa>
- swapped = !swapped;
- 800a08a: f087 0701 eor.w r7, r7, #1
- acc = SWAP_BYTES_IN_WORD(acc);
- 800a08e: 0223 lsls r3, r4, #8
- 800a090: b29b uxth r3, r3
- 800a092: f3c4 2407 ubfx r4, r4, #8, #8
- 800a096: 431c orrs r4, r3
- 800a098: e7e9 b.n 800a06e <inet_chksum_pbuf+0xa>
- }
- }
- if (swapped) {
- 800a09a: b127 cbz r7, 800a0a6 <inet_chksum_pbuf+0x42>
- acc = SWAP_BYTES_IN_WORD(acc);
- 800a09c: 0223 lsls r3, r4, #8
- 800a09e: b29b uxth r3, r3
- 800a0a0: f3c4 2407 ubfx r4, r4, #8, #8
- 800a0a4: 431c orrs r4, r3
- }
- return (u16_t)~(acc & 0xffffUL);
- 800a0a6: 43e0 mvns r0, r4
- }
- 800a0a8: b280 uxth r0, r0
- 800a0aa: bdf8 pop {r3, r4, r5, r6, r7, pc}
- 0800a0ac <lwip_init>:
- * Initialize all modules.
- * Use this in NO_SYS mode. Use tcpip_init() otherwise.
- */
- void
- lwip_init(void)
- {
- 800a0ac: b508 push {r3, lr}
- #endif
- /* Modules initialization */
- stats_init();
- #if !NO_SYS
- sys_init();
- 800a0ae: f002 ffa7 bl 800d000 <sys_init>
- #endif /* !NO_SYS */
- mem_init();
- 800a0b2: f000 fffb bl 800b0ac <mem_init>
- memp_init();
- 800a0b6: f001 fa7f bl 800b5b8 <memp_init>
- pbuf_init();
- netif_init();
- 800a0ba: f001 fbc5 bl 800b848 <netif_init>
- #endif /* LWIP_IPV4 */
- #if LWIP_RAW
- raw_init();
- #endif /* LWIP_RAW */
- #if LWIP_UDP
- udp_init();
- 800a0be: f007 fbc5 bl 801184c <udp_init>
- #endif /* LWIP_UDP */
- #if LWIP_TCP
- tcp_init();
- 800a0c2: f003 f8d3 bl 800d26c <tcp_init>
- #if PPP_SUPPORT
- ppp_init();
- #endif
- #if LWIP_TIMERS
- sys_timeouts_init();
- 800a0c6: f007 faef bl 80116a8 <sys_timeouts_init>
- #endif /* LWIP_TIMERS */
- }
- 800a0ca: bd08 pop {r3, pc}
- 0800a0cc <ip4_input_accept>:
- #endif /* IP_FORWARD */
- /** Return true if the current input packet should be accepted on this netif */
- static int
- ip4_input_accept(struct netif *netif)
- {
- 800a0cc: b508 push {r3, lr}
- 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)))) {
- 800a0ce: f890 3031 ldrb.w r3, [r0, #49] @ 0x31
- 800a0d2: f013 0f01 tst.w r3, #1
- 800a0d6: d00d beq.n 800a0f4 <ip4_input_accept+0x28>
- 800a0d8: 4601 mov r1, r0
- 800a0da: 6843 ldr r3, [r0, #4]
- 800a0dc: b163 cbz r3, 800a0f8 <ip4_input_accept+0x2c>
- /* unicast to this interface address? */
- if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) ||
- 800a0de: 4a07 ldr r2, [pc, #28] @ (800a0fc <ip4_input_accept+0x30>)
- 800a0e0: 6950 ldr r0, [r2, #20]
- 800a0e2: 4283 cmp r3, r0
- 800a0e4: d004 beq.n 800a0f0 <ip4_input_accept+0x24>
- /* or broadcast on this interface network address? */
- ip4_addr_isbroadcast(ip4_current_dest_addr(), netif)
- 800a0e6: f000 f9b4 bl 800a452 <ip4_addr_isbroadcast_u32>
- if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) ||
- 800a0ea: b908 cbnz r0, 800a0f0 <ip4_input_accept+0x24>
- /* accept on this netif */
- return 1;
- }
- #endif /* LWIP_AUTOIP */
- }
- return 0;
- 800a0ec: 2000 movs r0, #0
- 800a0ee: e002 b.n 800a0f6 <ip4_input_accept+0x2a>
- return 1;
- 800a0f0: 2001 movs r0, #1
- 800a0f2: e000 b.n 800a0f6 <ip4_input_accept+0x2a>
- return 0;
- 800a0f4: 2000 movs r0, #0
- }
- 800a0f6: bd08 pop {r3, pc}
- return 0;
- 800a0f8: 2000 movs r0, #0
- 800a0fa: e7fc b.n 800a0f6 <ip4_input_accept+0x2a>
- 800a0fc: 2401301c .word 0x2401301c
- 0800a100 <ip4_route>:
- {
- 800a100: b538 push {r3, r4, r5, lr}
- 800a102: 4604 mov r4, r0
- LWIP_ASSERT_CORE_LOCKED();
- 800a104: f7f9 fd02 bl 8003b0c <sys_check_core_locking>
- NETIF_FOREACH(netif) {
- 800a108: 4b15 ldr r3, [pc, #84] @ (800a160 <ip4_route+0x60>)
- 800a10a: 6818 ldr r0, [r3, #0]
- 800a10c: e000 b.n 800a110 <ip4_route+0x10>
- 800a10e: 6800 ldr r0, [r0, #0]
- 800a110: b1b0 cbz r0, 800a140 <ip4_route+0x40>
- if (netif_is_up(netif) && netif_is_link_up(netif) && !ip4_addr_isany_val(*netif_ip4_addr(netif))) {
- 800a112: f890 3031 ldrb.w r3, [r0, #49] @ 0x31
- 800a116: f013 0f01 tst.w r3, #1
- 800a11a: d0f8 beq.n 800a10e <ip4_route+0xe>
- 800a11c: f013 0f04 tst.w r3, #4
- 800a120: d0f5 beq.n 800a10e <ip4_route+0xe>
- 800a122: 6842 ldr r2, [r0, #4]
- 800a124: 2a00 cmp r2, #0
- 800a126: d0f2 beq.n 800a10e <ip4_route+0xe>
- if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) {
- 800a128: 6821 ldr r1, [r4, #0]
- 800a12a: 404a eors r2, r1
- 800a12c: 6885 ldr r5, [r0, #8]
- 800a12e: 422a tst r2, r5
- 800a130: d015 beq.n 800a15e <ip4_route+0x5e>
- if (((netif->flags & NETIF_FLAG_BROADCAST) == 0) && ip4_addr_cmp(dest, netif_ip4_gw(netif))) {
- 800a132: f013 0f02 tst.w r3, #2
- 800a136: d1ea bne.n 800a10e <ip4_route+0xe>
- 800a138: 68c3 ldr r3, [r0, #12]
- 800a13a: 4299 cmp r1, r3
- 800a13c: d1e7 bne.n 800a10e <ip4_route+0xe>
- 800a13e: e00e b.n 800a15e <ip4_route+0x5e>
- if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) ||
- 800a140: 4b08 ldr r3, [pc, #32] @ (800a164 <ip4_route+0x64>)
- 800a142: 681b ldr r3, [r3, #0]
- 800a144: b15b cbz r3, 800a15e <ip4_route+0x5e>
- 800a146: f893 2031 ldrb.w r2, [r3, #49] @ 0x31
- 800a14a: f002 0205 and.w r2, r2, #5
- 800a14e: 2a05 cmp r2, #5
- 800a150: d105 bne.n 800a15e <ip4_route+0x5e>
- ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) {
- 800a152: 685a ldr r2, [r3, #4]
- if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) ||
- 800a154: b11a cbz r2, 800a15e <ip4_route+0x5e>
- ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) {
- 800a156: 7822 ldrb r2, [r4, #0]
- 800a158: 2a7f cmp r2, #127 @ 0x7f
- 800a15a: d000 beq.n 800a15e <ip4_route+0x5e>
- return netif_default;
- 800a15c: 4618 mov r0, r3
- }
- 800a15e: bd38 pop {r3, r4, r5, pc}
- 800a160: 24019b80 .word 0x24019b80
- 800a164: 24019b7c .word 0x24019b7c
- 0800a168 <ip4_input>:
- * @return ERR_OK if the packet was processed (could return ERR_* if it wasn't
- * processed, but currently always returns ERR_OK)
- */
- err_t
- ip4_input(struct pbuf *p, struct netif *inp)
- {
- 800a168: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 800a16c: 4604 mov r4, r0
- 800a16e: 460e mov r6, r1
- #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING || LWIP_IGMP */
- #if LWIP_RAW
- raw_input_state_t raw_status;
- #endif /* LWIP_RAW */
- LWIP_ASSERT_CORE_LOCKED();
- 800a170: f7f9 fccc bl 8003b0c <sys_check_core_locking>
- IP_STATS_INC(ip.recv);
- MIB2_STATS_INC(mib2.ipinreceives);
- /* identify the IP header */
- iphdr = (struct ip_hdr *)p->payload;
- 800a174: 6867 ldr r7, [r4, #4]
- if (IPH_V(iphdr) != 4) {
- 800a176: 783b ldrb r3, [r7, #0]
- 800a178: 091a lsrs r2, r3, #4
- 800a17a: 2a04 cmp r2, #4
- 800a17c: d005 beq.n 800a18a <ip4_input+0x22>
- 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);
- 800a17e: 4620 mov r0, r4
- 800a180: f001 fe0e bl 800bda0 <pbuf_free>
- ip_data.current_ip_header_tot_len = 0;
- ip4_addr_set_any(ip4_current_src_addr());
- ip4_addr_set_any(ip4_current_dest_addr());
- return ERR_OK;
- }
- 800a184: 2000 movs r0, #0
- 800a186: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- iphdr_hlen = IPH_HL_BYTES(iphdr);
- 800a18a: f003 030f and.w r3, r3, #15
- 800a18e: 009d lsls r5, r3, #2
- iphdr_len = lwip_ntohs(IPH_LEN(iphdr));
- 800a190: 8878 ldrh r0, [r7, #2]
- 800a192: f7fd fe73 bl 8007e7c <lwip_htons>
- 800a196: 4680 mov r8, r0
- if (iphdr_len < p->tot_len) {
- 800a198: 8923 ldrh r3, [r4, #8]
- 800a19a: 4283 cmp r3, r0
- 800a19c: d81b bhi.n 800a1d6 <ip4_input+0x6e>
- if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len) || (iphdr_hlen < IP_HLEN)) {
- 800a19e: 8963 ldrh r3, [r4, #10]
- 800a1a0: 42ab cmp r3, r5
- 800a1a2: d31d bcc.n 800a1e0 <ip4_input+0x78>
- 800a1a4: 8923 ldrh r3, [r4, #8]
- 800a1a6: 4543 cmp r3, r8
- 800a1a8: d31a bcc.n 800a1e0 <ip4_input+0x78>
- 800a1aa: 2d13 cmp r5, #19
- 800a1ac: d918 bls.n 800a1e0 <ip4_input+0x78>
- ip_addr_copy_from_ip4(ip_data.current_iphdr_dest, iphdr->dest);
- 800a1ae: 693b ldr r3, [r7, #16]
- 800a1b0: 4a5a ldr r2, [pc, #360] @ (800a31c <ip4_input+0x1b4>)
- 800a1b2: 6153 str r3, [r2, #20]
- ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src);
- 800a1b4: 68f9 ldr r1, [r7, #12]
- 800a1b6: 6111 str r1, [r2, #16]
- if (ip4_addr_ismulticast(ip4_current_dest_addr())) {
- 800a1b8: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 800a1bc: 2be0 cmp r3, #224 @ 0xe0
- 800a1be: d113 bne.n 800a1e8 <ip4_input+0x80>
- if ((netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) {
- 800a1c0: f896 3031 ldrb.w r3, [r6, #49] @ 0x31
- 800a1c4: f013 0f01 tst.w r3, #1
- 800a1c8: d02c beq.n 800a224 <ip4_input+0xbc>
- 800a1ca: 6873 ldr r3, [r6, #4]
- 800a1cc: 2b00 cmp r3, #0
- 800a1ce: d170 bne.n 800a2b2 <ip4_input+0x14a>
- netif = NULL;
- 800a1d0: f04f 0800 mov.w r8, #0
- 800a1d4: e028 b.n 800a228 <ip4_input+0xc0>
- pbuf_realloc(p, iphdr_len);
- 800a1d6: 4601 mov r1, r0
- 800a1d8: 4620 mov r0, r4
- 800a1da: f001 fef7 bl 800bfcc <pbuf_realloc>
- 800a1de: e7de b.n 800a19e <ip4_input+0x36>
- pbuf_free(p);
- 800a1e0: 4620 mov r0, r4
- 800a1e2: f001 fddd bl 800bda0 <pbuf_free>
- return ERR_OK;
- 800a1e6: e7cd b.n 800a184 <ip4_input+0x1c>
- if (ip4_input_accept(inp)) {
- 800a1e8: 4630 mov r0, r6
- 800a1ea: f7ff ff6f bl 800a0cc <ip4_input_accept>
- 800a1ee: b9a0 cbnz r0, 800a21a <ip4_input+0xb2>
- if (!ip4_addr_isloopback(ip4_current_dest_addr()))
- 800a1f0: 4b4a ldr r3, [pc, #296] @ (800a31c <ip4_input+0x1b4>)
- 800a1f2: 7d1b ldrb r3, [r3, #20]
- 800a1f4: 2b7f cmp r3, #127 @ 0x7f
- 800a1f6: d052 beq.n 800a29e <ip4_input+0x136>
- NETIF_FOREACH(netif) {
- 800a1f8: 4b49 ldr r3, [pc, #292] @ (800a320 <ip4_input+0x1b8>)
- 800a1fa: f8d3 8000 ldr.w r8, [r3]
- 800a1fe: e001 b.n 800a204 <ip4_input+0x9c>
- 800a200: f8d8 8000 ldr.w r8, [r8]
- 800a204: f1b8 0f00 cmp.w r8, #0
- 800a208: d008 beq.n 800a21c <ip4_input+0xb4>
- if (netif == inp) {
- 800a20a: 4546 cmp r6, r8
- 800a20c: d0f8 beq.n 800a200 <ip4_input+0x98>
- if (ip4_input_accept(netif)) {
- 800a20e: 4640 mov r0, r8
- 800a210: f7ff ff5c bl 800a0cc <ip4_input_accept>
- 800a214: 2800 cmp r0, #0
- 800a216: d0f3 beq.n 800a200 <ip4_input+0x98>
- 800a218: e000 b.n 800a21c <ip4_input+0xb4>
- netif = inp;
- 800a21a: 46b0 mov r8, r6
- if (netif == NULL) {
- 800a21c: f1b8 0f00 cmp.w r8, #0
- 800a220: d105 bne.n 800a22e <ip4_input+0xc6>
- 800a222: e001 b.n 800a228 <ip4_input+0xc0>
- netif = NULL;
- 800a224: f04f 0800 mov.w r8, #0
- if (IPH_PROTO(iphdr) == IP_PROTO_UDP) {
- 800a228: 7a7b ldrb r3, [r7, #9]
- 800a22a: 2b11 cmp r3, #17
- 800a22c: d03a beq.n 800a2a4 <ip4_input+0x13c>
- && !ip4_addr_isany_val(*ip4_current_src_addr())
- 800a22e: 4b3b ldr r3, [pc, #236] @ (800a31c <ip4_input+0x1b4>)
- 800a230: 6918 ldr r0, [r3, #16]
- 800a232: 2800 cmp r0, #0
- 800a234: d13f bne.n 800a2b6 <ip4_input+0x14e>
- if (netif == NULL) {
- 800a236: f1b8 0f00 cmp.w r8, #0
- 800a23a: d04a beq.n 800a2d2 <ip4_input+0x16a>
- if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) {
- 800a23c: 88fb ldrh r3, [r7, #6]
- 800a23e: f023 03c0 bic.w r3, r3, #192 @ 0xc0
- 800a242: b29b uxth r3, r3
- 800a244: b133 cbz r3, 800a254 <ip4_input+0xec>
- p = ip4_reass(p);
- 800a246: 4620 mov r0, r4
- 800a248: f000 fc6a bl 800ab20 <ip4_reass>
- if (p == NULL) {
- 800a24c: 4604 mov r4, r0
- 800a24e: 2800 cmp r0, #0
- 800a250: d098 beq.n 800a184 <ip4_input+0x1c>
- iphdr = (const struct ip_hdr *)p->payload;
- 800a252: 6847 ldr r7, [r0, #4]
- ip_data.current_netif = netif;
- 800a254: 4a31 ldr r2, [pc, #196] @ (800a31c <ip4_input+0x1b4>)
- 800a256: f8c2 8000 str.w r8, [r2]
- ip_data.current_input_netif = inp;
- 800a25a: 6056 str r6, [r2, #4]
- ip_data.current_ip4_header = iphdr;
- 800a25c: 6097 str r7, [r2, #8]
- ip_data.current_ip_header_tot_len = IPH_HL_BYTES(iphdr);
- 800a25e: 783b ldrb r3, [r7, #0]
- 800a260: f003 030f and.w r3, r3, #15
- 800a264: 009b lsls r3, r3, #2
- 800a266: 8193 strh r3, [r2, #12]
- pbuf_remove_header(p, iphdr_hlen); /* Move to payload, no check necessary. */
- 800a268: 4629 mov r1, r5
- 800a26a: 4620 mov r0, r4
- 800a26c: f001 fd52 bl 800bd14 <pbuf_remove_header>
- switch (IPH_PROTO(iphdr)) {
- 800a270: 7a7b ldrb r3, [r7, #9]
- 800a272: 2b06 cmp r3, #6
- 800a274: d03e beq.n 800a2f4 <ip4_input+0x18c>
- 800a276: 2b11 cmp r3, #17
- 800a278: d02f beq.n 800a2da <ip4_input+0x172>
- 800a27a: 2b01 cmp r3, #1
- 800a27c: d03f beq.n 800a2fe <ip4_input+0x196>
- if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) &&
- 800a27e: 4641 mov r1, r8
- 800a280: 4b26 ldr r3, [pc, #152] @ (800a31c <ip4_input+0x1b4>)
- 800a282: 6958 ldr r0, [r3, #20]
- 800a284: f000 f8e5 bl 800a452 <ip4_addr_isbroadcast_u32>
- 800a288: b928 cbnz r0, 800a296 <ip4_input+0x12e>
- !ip4_addr_ismulticast(ip4_current_dest_addr())) {
- 800a28a: 4b24 ldr r3, [pc, #144] @ (800a31c <ip4_input+0x1b4>)
- 800a28c: 695b ldr r3, [r3, #20]
- 800a28e: f003 03f0 and.w r3, r3, #240 @ 0xf0
- if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) &&
- 800a292: 2be0 cmp r3, #224 @ 0xe0
- 800a294: d138 bne.n 800a308 <ip4_input+0x1a0>
- pbuf_free(p);
- 800a296: 4620 mov r0, r4
- 800a298: f001 fd82 bl 800bda0 <pbuf_free>
- break;
- 800a29c: e021 b.n 800a2e2 <ip4_input+0x17a>
- netif = NULL;
- 800a29e: f04f 0800 mov.w r8, #0
- 800a2a2: e7c1 b.n 800a228 <ip4_input+0xc0>
- const struct udp_hdr *udphdr = (const struct udp_hdr *)((const u8_t *)iphdr + iphdr_hlen);
- 800a2a4: 197b adds r3, r7, r5
- if (IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(udphdr->dest)) {
- 800a2a6: 885b ldrh r3, [r3, #2]
- 800a2a8: f5b3 4f88 cmp.w r3, #17408 @ 0x4400
- 800a2ac: d1bf bne.n 800a22e <ip4_input+0xc6>
- netif = inp;
- 800a2ae: 46b0 mov r8, r6
- 800a2b0: e7c1 b.n 800a236 <ip4_input+0xce>
- netif = inp;
- 800a2b2: 46b0 mov r8, r6
- 800a2b4: e7bb b.n 800a22e <ip4_input+0xc6>
- if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) ||
- 800a2b6: 4631 mov r1, r6
- 800a2b8: f000 f8cb bl 800a452 <ip4_addr_isbroadcast_u32>
- 800a2bc: b928 cbnz r0, 800a2ca <ip4_input+0x162>
- (ip4_addr_ismulticast(ip4_current_src_addr()))) {
- 800a2be: 4b17 ldr r3, [pc, #92] @ (800a31c <ip4_input+0x1b4>)
- 800a2c0: 691b ldr r3, [r3, #16]
- 800a2c2: f003 03f0 and.w r3, r3, #240 @ 0xf0
- if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) ||
- 800a2c6: 2be0 cmp r3, #224 @ 0xe0
- 800a2c8: d1b5 bne.n 800a236 <ip4_input+0xce>
- pbuf_free(p);
- 800a2ca: 4620 mov r0, r4
- 800a2cc: f001 fd68 bl 800bda0 <pbuf_free>
- return ERR_OK;
- 800a2d0: e758 b.n 800a184 <ip4_input+0x1c>
- pbuf_free(p);
- 800a2d2: 4620 mov r0, r4
- 800a2d4: f001 fd64 bl 800bda0 <pbuf_free>
- return ERR_OK;
- 800a2d8: e754 b.n 800a184 <ip4_input+0x1c>
- udp_input(p, inp);
- 800a2da: 4631 mov r1, r6
- 800a2dc: 4620 mov r0, r4
- 800a2de: f007 fac1 bl 8011864 <udp_input>
- ip_data.current_netif = NULL;
- 800a2e2: 4b0e ldr r3, [pc, #56] @ (800a31c <ip4_input+0x1b4>)
- 800a2e4: 2200 movs r2, #0
- 800a2e6: 601a str r2, [r3, #0]
- ip_data.current_input_netif = NULL;
- 800a2e8: 605a str r2, [r3, #4]
- ip_data.current_ip4_header = NULL;
- 800a2ea: 609a str r2, [r3, #8]
- ip_data.current_ip_header_tot_len = 0;
- 800a2ec: 819a strh r2, [r3, #12]
- ip4_addr_set_any(ip4_current_src_addr());
- 800a2ee: 611a str r2, [r3, #16]
- ip4_addr_set_any(ip4_current_dest_addr());
- 800a2f0: 615a str r2, [r3, #20]
- return ERR_OK;
- 800a2f2: e747 b.n 800a184 <ip4_input+0x1c>
- tcp_input(p, inp);
- 800a2f4: 4631 mov r1, r6
- 800a2f6: 4620 mov r0, r4
- 800a2f8: f005 fa36 bl 800f768 <tcp_input>
- break;
- 800a2fc: e7f1 b.n 800a2e2 <ip4_input+0x17a>
- icmp_input(p, inp);
- 800a2fe: 4631 mov r1, r6
- 800a300: 4620 mov r0, r4
- 800a302: f7ff fdb5 bl 8009e70 <icmp_input>
- break;
- 800a306: e7ec b.n 800a2e2 <ip4_input+0x17a>
- pbuf_header_force(p, (s16_t)iphdr_hlen); /* Move to ip header, no check necessary. */
- 800a308: 4629 mov r1, r5
- 800a30a: 4620 mov r0, r4
- 800a30c: f001 fd42 bl 800bd94 <pbuf_header_force>
- icmp_dest_unreach(p, ICMP_DUR_PROTO);
- 800a310: 2102 movs r1, #2
- 800a312: 4620 mov r0, r4
- 800a314: f7ff fe62 bl 8009fdc <icmp_dest_unreach>
- 800a318: e7bd b.n 800a296 <ip4_input+0x12e>
- 800a31a: bf00 nop
- 800a31c: 2401301c .word 0x2401301c
- 800a320: 24019b80 .word 0x24019b80
- 0800a324 <ip4_output_if_src>:
- */
- err_t
- ip4_output_if_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest,
- u8_t ttl, u8_t tos,
- u8_t proto, struct netif *netif)
- {
- 800a324: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr}
- 800a328: b083 sub sp, #12
- 800a32a: 4604 mov r4, r0
- 800a32c: 460f mov r7, r1
- 800a32e: 4616 mov r6, r2
- 800a330: 4699 mov r9, r3
- 800a332: f8dd 8030 ldr.w r8, [sp, #48] @ 0x30
- ip4_addr_t dest_addr;
- #if CHECKSUM_GEN_IP_INLINE
- u32_t chk_sum = 0;
- #endif /* CHECKSUM_GEN_IP_INLINE */
- LWIP_ASSERT_CORE_LOCKED();
- 800a336: f7f9 fbe9 bl 8003b0c <sys_check_core_locking>
- LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p);
- 800a33a: 7ba2 ldrb r2, [r4, #14]
- 800a33c: 2a01 cmp r2, #1
- 800a33e: d13f bne.n 800a3c0 <ip4_output_if_src+0x9c>
- MIB2_STATS_INC(mib2.ipoutrequests);
- /* Should the IP header be generated or is it already included in p? */
- if (dest != LWIP_IP_HDRINCL) {
- 800a340: 2e00 cmp r6, #0
- 800a342: d051 beq.n 800a3e8 <ip4_output_if_src+0xc4>
- }
- #endif /* CHECKSUM_GEN_IP_INLINE */
- }
- #endif /* IP_OPTIONS_SEND */
- /* generate IP header */
- if (pbuf_add_header(p, IP_HLEN)) {
- 800a344: 2114 movs r1, #20
- 800a346: 4620 mov r0, r4
- 800a348: f001 fcdf bl 800bd0a <pbuf_add_header>
- 800a34c: 2800 cmp r0, #0
- 800a34e: d159 bne.n 800a404 <ip4_output_if_src+0xe0>
- IP_STATS_INC(ip.err);
- MIB2_STATS_INC(mib2.ipoutdiscards);
- return ERR_BUF;
- }
- iphdr = (struct ip_hdr *)p->payload;
- 800a350: 6865 ldr r5, [r4, #4]
- LWIP_ASSERT("check that first pbuf can hold struct ip_hdr",
- 800a352: 8963 ldrh r3, [r4, #10]
- 800a354: 2b13 cmp r3, #19
- 800a356: d93b bls.n 800a3d0 <ip4_output_if_src+0xac>
- (p->len >= sizeof(struct ip_hdr)));
- IPH_TTL_SET(iphdr, ttl);
- 800a358: f885 9008 strb.w r9, [r5, #8]
- IPH_PROTO_SET(iphdr, proto);
- 800a35c: f89d 302c ldrb.w r3, [sp, #44] @ 0x2c
- 800a360: 726b strb r3, [r5, #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);
- 800a362: 6833 ldr r3, [r6, #0]
- 800a364: 612b str r3, [r5, #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);
- 800a366: 2345 movs r3, #69 @ 0x45
- 800a368: 702b strb r3, [r5, #0]
- IPH_TOS_SET(iphdr, tos);
- 800a36a: f89d 3028 ldrb.w r3, [sp, #40] @ 0x28
- 800a36e: 706b strb r3, [r5, #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));
- 800a370: 8920 ldrh r0, [r4, #8]
- 800a372: f7fd fd83 bl 8007e7c <lwip_htons>
- 800a376: 8068 strh r0, [r5, #2]
- #if CHECKSUM_GEN_IP_INLINE
- chk_sum += iphdr->_len;
- #endif /* CHECKSUM_GEN_IP_INLINE */
- IPH_OFFSET_SET(iphdr, 0);
- 800a378: 2300 movs r3, #0
- 800a37a: 71ab strb r3, [r5, #6]
- 800a37c: 71eb strb r3, [r5, #7]
- IPH_ID_SET(iphdr, lwip_htons(ip_id));
- 800a37e: f8df 90a4 ldr.w r9, [pc, #164] @ 800a424 <ip4_output_if_src+0x100>
- 800a382: f8b9 0000 ldrh.w r0, [r9]
- 800a386: f7fd fd79 bl 8007e7c <lwip_htons>
- 800a38a: 80a8 strh r0, [r5, #4]
- #if CHECKSUM_GEN_IP_INLINE
- chk_sum += iphdr->_id;
- #endif /* CHECKSUM_GEN_IP_INLINE */
- ++ip_id;
- 800a38c: f8b9 3000 ldrh.w r3, [r9]
- 800a390: 3301 adds r3, #1
- 800a392: f8a9 3000 strh.w r3, [r9]
- if (src == NULL) {
- 800a396: b31f cbz r7, 800a3e0 <ip4_output_if_src+0xbc>
- ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4);
- } else {
- /* src cannot be NULL here */
- ip4_addr_copy(iphdr->src, *src);
- 800a398: 683b ldr r3, [r7, #0]
- 800a39a: 60eb str r3, [r5, #12]
- else {
- IPH_CHKSUM_SET(iphdr, 0);
- }
- #endif /* LWIP_CHECKSUM_CTRL_PER_NETIF*/
- #else /* CHECKSUM_GEN_IP_INLINE */
- IPH_CHKSUM_SET(iphdr, 0);
- 800a39c: 2300 movs r3, #0
- 800a39e: 72ab strb r3, [r5, #10]
- 800a3a0: 72eb strb r3, [r5, #11]
- }
- #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)) {
- 800a3a2: f8b8 3028 ldrh.w r3, [r8, #40] @ 0x28
- 800a3a6: b113 cbz r3, 800a3ae <ip4_output_if_src+0x8a>
- 800a3a8: 8922 ldrh r2, [r4, #8]
- 800a3aa: 4293 cmp r3, r2
- 800a3ac: d324 bcc.n 800a3f8 <ip4_output_if_src+0xd4>
- return ip4_frag(p, netif, dest);
- }
- #endif /* IP_FRAG */
- LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: call netif->output()\n"));
- return netif->output(netif, p, dest);
- 800a3ae: f8d8 3014 ldr.w r3, [r8, #20]
- 800a3b2: 4632 mov r2, r6
- 800a3b4: 4621 mov r1, r4
- 800a3b6: 4640 mov r0, r8
- 800a3b8: 4798 blx r3
- }
- 800a3ba: b003 add sp, #12
- 800a3bc: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
- LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p);
- 800a3c0: 4b13 ldr r3, [pc, #76] @ (800a410 <ip4_output_if_src+0xec>)
- 800a3c2: f44f 7255 mov.w r2, #852 @ 0x354
- 800a3c6: 4913 ldr r1, [pc, #76] @ (800a414 <ip4_output_if_src+0xf0>)
- 800a3c8: 4813 ldr r0, [pc, #76] @ (800a418 <ip4_output_if_src+0xf4>)
- 800a3ca: f009 f81d bl 8013408 <iprintf>
- 800a3ce: e7b7 b.n 800a340 <ip4_output_if_src+0x1c>
- LWIP_ASSERT("check that first pbuf can hold struct ip_hdr",
- 800a3d0: 4b0f ldr r3, [pc, #60] @ (800a410 <ip4_output_if_src+0xec>)
- 800a3d2: f44f 7262 mov.w r2, #904 @ 0x388
- 800a3d6: 4911 ldr r1, [pc, #68] @ (800a41c <ip4_output_if_src+0xf8>)
- 800a3d8: 480f ldr r0, [pc, #60] @ (800a418 <ip4_output_if_src+0xf4>)
- 800a3da: f009 f815 bl 8013408 <iprintf>
- 800a3de: e7bb b.n 800a358 <ip4_output_if_src+0x34>
- ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4);
- 800a3e0: 4b0f ldr r3, [pc, #60] @ (800a420 <ip4_output_if_src+0xfc>)
- 800a3e2: 681b ldr r3, [r3, #0]
- 800a3e4: 60eb str r3, [r5, #12]
- 800a3e6: e7d9 b.n 800a39c <ip4_output_if_src+0x78>
- if (p->len < IP_HLEN) {
- 800a3e8: 8963 ldrh r3, [r4, #10]
- 800a3ea: 2b13 cmp r3, #19
- 800a3ec: d90d bls.n 800a40a <ip4_output_if_src+0xe6>
- iphdr = (struct ip_hdr *)p->payload;
- 800a3ee: 6863 ldr r3, [r4, #4]
- ip4_addr_copy(dest_addr, iphdr->dest);
- 800a3f0: 691b ldr r3, [r3, #16]
- 800a3f2: 9301 str r3, [sp, #4]
- dest = &dest_addr;
- 800a3f4: ae01 add r6, sp, #4
- 800a3f6: e7d4 b.n 800a3a2 <ip4_output_if_src+0x7e>
- return ip4_frag(p, netif, dest);
- 800a3f8: 4632 mov r2, r6
- 800a3fa: 4641 mov r1, r8
- 800a3fc: 4620 mov r0, r4
- 800a3fe: f000 fc97 bl 800ad30 <ip4_frag>
- 800a402: e7da b.n 800a3ba <ip4_output_if_src+0x96>
- return ERR_BUF;
- 800a404: f06f 0001 mvn.w r0, #1
- 800a408: e7d7 b.n 800a3ba <ip4_output_if_src+0x96>
- return ERR_BUF;
- 800a40a: f06f 0001 mvn.w r0, #1
- 800a40e: e7d4 b.n 800a3ba <ip4_output_if_src+0x96>
- 800a410: 080155c0 .word 0x080155c0
- 800a414: 08015624 .word 0x08015624
- 800a418: 080144e8 .word 0x080144e8
- 800a41c: 08015630 .word 0x08015630
- 800a420: 080156d8 .word 0x080156d8
- 800a424: 24013034 .word 0x24013034
- 0800a428 <ip4_output_if>:
- {
- 800a428: b510 push {r4, lr}
- 800a42a: b084 sub sp, #16
- 800a42c: 9c08 ldr r4, [sp, #32]
- if (dest != LWIP_IP_HDRINCL) {
- 800a42e: 4694 mov ip, r2
- 800a430: b11a cbz r2, 800a43a <ip4_output_if+0x12>
- if (ip4_addr_isany(src)) {
- 800a432: b109 cbz r1, 800a438 <ip4_output_if+0x10>
- 800a434: 680a ldr r2, [r1, #0]
- 800a436: b902 cbnz r2, 800a43a <ip4_output_if+0x12>
- src_used = netif_ip4_addr(netif);
- 800a438: 1d21 adds r1, r4, #4
- return ip4_output_if_src(p, src_used, dest, ttl, tos, proto, netif);
- 800a43a: 9402 str r4, [sp, #8]
- 800a43c: f89d 201c ldrb.w r2, [sp, #28]
- 800a440: 9201 str r2, [sp, #4]
- 800a442: f89d 2018 ldrb.w r2, [sp, #24]
- 800a446: 9200 str r2, [sp, #0]
- 800a448: 4662 mov r2, ip
- 800a44a: f7ff ff6b bl 800a324 <ip4_output_if_src>
- }
- 800a44e: b004 add sp, #16
- 800a450: bd10 pop {r4, pc}
- 0800a452 <ip4_addr_isbroadcast_u32>:
- * @param netif the network interface against which the address is checked
- * @return returns non-zero if the address is a broadcast address
- */
- u8_t
- ip4_addr_isbroadcast_u32(u32_t addr, const struct netif *netif)
- {
- 800a452: 4603 mov r3, r0
- ip4_addr_t ipaddr;
- ip4_addr_set_u32(&ipaddr, addr);
- /* all ones (broadcast) or all zeroes (old skool broadcast) */
- if ((~addr == IPADDR_ANY) ||
- 800a454: 1e42 subs r2, r0, #1
- 800a456: f112 0f03 cmn.w r2, #3
- 800a45a: d812 bhi.n 800a482 <ip4_addr_isbroadcast_u32+0x30>
- (addr == IPADDR_ANY)) {
- return 1;
- /* no broadcast support on this network interface? */
- } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) {
- 800a45c: f891 0031 ldrb.w r0, [r1, #49] @ 0x31
- 800a460: f010 0002 ands.w r0, r0, #2
- 800a464: d014 beq.n 800a490 <ip4_addr_isbroadcast_u32+0x3e>
- /* the given address cannot be a broadcast address
- * nor can we check against any broadcast addresses */
- return 0;
- /* address matches network interface address exactly? => no broadcast */
- } else if (addr == ip4_addr_get_u32(netif_ip4_addr(netif))) {
- 800a466: 684a ldr r2, [r1, #4]
- 800a468: 429a cmp r2, r3
- 800a46a: d00c beq.n 800a486 <ip4_addr_isbroadcast_u32+0x34>
- return 0;
- /* on the same (sub) network... */
- } else if (ip4_addr_netcmp(&ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif))
- 800a46c: 6889 ldr r1, [r1, #8]
- 800a46e: 405a eors r2, r3
- 800a470: 420a tst r2, r1
- 800a472: d10a bne.n 800a48a <ip4_addr_isbroadcast_u32+0x38>
- /* ...and host identifier bits are all ones? =>... */
- && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) ==
- 800a474: 43ca mvns r2, r1
- 800a476: ea23 0301 bic.w r3, r3, r1
- 800a47a: 429a cmp r2, r3
- 800a47c: d007 beq.n 800a48e <ip4_addr_isbroadcast_u32+0x3c>
- (IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) {
- /* => network broadcast address */
- return 1;
- } else {
- return 0;
- 800a47e: 2000 movs r0, #0
- 800a480: 4770 bx lr
- return 1;
- 800a482: 2001 movs r0, #1
- 800a484: 4770 bx lr
- return 0;
- 800a486: 2000 movs r0, #0
- 800a488: 4770 bx lr
- return 0;
- 800a48a: 2000 movs r0, #0
- 800a48c: 4770 bx lr
- return 1;
- 800a48e: 2001 movs r0, #1
- }
- }
- 800a490: 4770 bx lr
- ...
- 0800a494 <ip4addr_aton>:
- * @param addr pointer to which to save the ip address in network order
- * @return 1 if cp could be converted to addr, 0 on failure
- */
- int
- ip4addr_aton(const char *cp, ip4_addr_t *addr)
- {
- 800a494: b530 push {r4, r5, lr}
- 800a496: b085 sub sp, #20
- 800a498: 460d mov r5, r1
- u8_t base;
- char c;
- u32_t parts[4];
- u32_t *pp = parts;
- c = *cp;
- 800a49a: 7803 ldrb r3, [r0, #0]
- u32_t *pp = parts;
- 800a49c: 46ec mov ip, sp
- 800a49e: e035 b.n 800a50c <ip4addr_aton+0x78>
- return 0;
- }
- val = 0;
- base = 10;
- if (c == '0') {
- c = *++cp;
- 800a4a0: 1c42 adds r2, r0, #1
- 800a4a2: 7843 ldrb r3, [r0, #1]
- if (c == 'x' || c == 'X') {
- 800a4a4: 2b58 cmp r3, #88 @ 0x58
- 800a4a6: bf18 it ne
- 800a4a8: 2b78 cmpne r3, #120 @ 0x78
- 800a4aa: d103 bne.n 800a4b4 <ip4addr_aton+0x20>
- base = 16;
- c = *++cp;
- 800a4ac: 7883 ldrb r3, [r0, #2]
- 800a4ae: 3002 adds r0, #2
- base = 16;
- 800a4b0: 2110 movs r1, #16
- 800a4b2: e033 b.n 800a51c <ip4addr_aton+0x88>
- c = *++cp;
- 800a4b4: 4610 mov r0, r2
- } else {
- base = 8;
- 800a4b6: 2108 movs r1, #8
- 800a4b8: e030 b.n 800a51c <ip4addr_aton+0x88>
- }
- }
- for (;;) {
- if (lwip_isdigit(c)) {
- val = (val * base) + (u32_t)(c - '0');
- 800a4ba: fb04 3301 mla r3, r4, r1, r3
- 800a4be: f1a3 0430 sub.w r4, r3, #48 @ 0x30
- c = *++cp;
- 800a4c2: f810 3f01 ldrb.w r3, [r0, #1]!
- if (lwip_isdigit(c)) {
- 800a4c6: 4a47 ldr r2, [pc, #284] @ (800a5e4 <ip4addr_aton+0x150>)
- 800a4c8: 5cd2 ldrb r2, [r2, r3]
- 800a4ca: f012 0f04 tst.w r2, #4
- 800a4ce: d1f4 bne.n 800a4ba <ip4addr_aton+0x26>
- } else if (base == 16 && lwip_isxdigit(c)) {
- 800a4d0: 2910 cmp r1, #16
- 800a4d2: d110 bne.n 800a4f6 <ip4addr_aton+0x62>
- 800a4d4: f012 0f44 tst.w r2, #68 @ 0x44
- 800a4d8: d00d beq.n 800a4f6 <ip4addr_aton+0x62>
- val = (val << 4) | (u32_t)(c + 10 - (lwip_islower(c) ? 'a' : 'A'));
- 800a4da: 0124 lsls r4, r4, #4
- 800a4dc: 330a adds r3, #10
- 800a4de: f002 0203 and.w r2, r2, #3
- 800a4e2: 2a02 cmp r2, #2
- 800a4e4: d005 beq.n 800a4f2 <ip4addr_aton+0x5e>
- 800a4e6: 2241 movs r2, #65 @ 0x41
- 800a4e8: 1a9b subs r3, r3, r2
- 800a4ea: 431c orrs r4, r3
- c = *++cp;
- 800a4ec: f810 3f01 ldrb.w r3, [r0, #1]!
- 800a4f0: e7e9 b.n 800a4c6 <ip4addr_aton+0x32>
- val = (val << 4) | (u32_t)(c + 10 - (lwip_islower(c) ? 'a' : 'A'));
- 800a4f2: 2261 movs r2, #97 @ 0x61
- 800a4f4: e7f8 b.n 800a4e8 <ip4addr_aton+0x54>
- } else {
- break;
- }
- }
- if (c == '.') {
- 800a4f6: 2b2e cmp r3, #46 @ 0x2e
- 800a4f8: d112 bne.n 800a520 <ip4addr_aton+0x8c>
- * Internet format:
- * a.b.c.d
- * a.b.c (with c treated as 16 bits)
- * a.b (with b treated as 24 bits)
- */
- if (pp >= parts + 3) {
- 800a4fa: ab03 add r3, sp, #12
- 800a4fc: 459c cmp ip, r3
- 800a4fe: d258 bcs.n 800a5b2 <ip4addr_aton+0x11e>
- return 0;
- }
- *pp++ = val;
- 800a500: 4662 mov r2, ip
- 800a502: f842 4b04 str.w r4, [r2], #4
- c = *++cp;
- 800a506: 7843 ldrb r3, [r0, #1]
- *pp++ = val;
- 800a508: 4694 mov ip, r2
- c = *++cp;
- 800a50a: 3001 adds r0, #1
- if (!lwip_isdigit(c)) {
- 800a50c: 4a35 ldr r2, [pc, #212] @ (800a5e4 <ip4addr_aton+0x150>)
- 800a50e: 5cd2 ldrb r2, [r2, r3]
- 800a510: f012 0f04 tst.w r2, #4
- 800a514: d04b beq.n 800a5ae <ip4addr_aton+0x11a>
- if (c == '0') {
- 800a516: 2b30 cmp r3, #48 @ 0x30
- 800a518: d0c2 beq.n 800a4a0 <ip4addr_aton+0xc>
- base = 10;
- 800a51a: 210a movs r1, #10
- base = 8;
- 800a51c: 2400 movs r4, #0
- 800a51e: e7d2 b.n 800a4c6 <ip4addr_aton+0x32>
- }
- }
- /*
- * Check for trailing characters.
- */
- if (c != '\0' && !lwip_isspace(c)) {
- 800a520: b113 cbz r3, 800a528 <ip4addr_aton+0x94>
- 800a522: f012 0f08 tst.w r2, #8
- 800a526: d047 beq.n 800a5b8 <ip4addr_aton+0x124>
- }
- /*
- * Concoct the address according to
- * the number of parts specified.
- */
- switch (pp - parts + 1) {
- 800a528: 466b mov r3, sp
- 800a52a: ebac 0003 sub.w r0, ip, r3
- 800a52e: 1080 asrs r0, r0, #2
- 800a530: 3001 adds r0, #1
- 800a532: 2804 cmp r0, #4
- 800a534: d834 bhi.n 800a5a0 <ip4addr_aton+0x10c>
- 800a536: e8df f000 tbb [pc, r0]
- 800a53a: 0b3d .short 0x0b3d
- 800a53c: 1303 .short 0x1303
- 800a53e: 21 .byte 0x21
- 800a53f: 00 .byte 0x00
- case 1: /* a -- 32 bits */
- break;
- case 2: /* a.b -- 8.24 bits */
- if (val > 0xffffffUL) {
- 800a540: f1b4 7f80 cmp.w r4, #16777216 @ 0x1000000
- 800a544: d23a bcs.n 800a5bc <ip4addr_aton+0x128>
- return 0;
- }
- if (parts[0] > 0xff) {
- 800a546: 9b00 ldr r3, [sp, #0]
- 800a548: 2bff cmp r3, #255 @ 0xff
- 800a54a: d839 bhi.n 800a5c0 <ip4addr_aton+0x12c>
- return 0;
- }
- val |= parts[0] << 24;
- 800a54c: ea44 6403 orr.w r4, r4, r3, lsl #24
- break;
- default:
- LWIP_ASSERT("unhandled", 0);
- break;
- }
- if (addr) {
- 800a550: 2d00 cmp r5, #0
- 800a552: d045 beq.n 800a5e0 <ip4addr_aton+0x14c>
- ip4_addr_set_u32(addr, lwip_htonl(val));
- 800a554: 4620 mov r0, r4
- 800a556: f7fd fc96 bl 8007e86 <lwip_htonl>
- 800a55a: 6028 str r0, [r5, #0]
- }
- return 1;
- 800a55c: 2001 movs r0, #1
- 800a55e: e029 b.n 800a5b4 <ip4addr_aton+0x120>
- if (val > 0xffff) {
- 800a560: f5b4 3f80 cmp.w r4, #65536 @ 0x10000
- 800a564: d22e bcs.n 800a5c4 <ip4addr_aton+0x130>
- if ((parts[0] > 0xff) || (parts[1] > 0xff)) {
- 800a566: 9a00 ldr r2, [sp, #0]
- 800a568: 2aff cmp r2, #255 @ 0xff
- 800a56a: d82d bhi.n 800a5c8 <ip4addr_aton+0x134>
- 800a56c: 9b01 ldr r3, [sp, #4]
- 800a56e: 2bff cmp r3, #255 @ 0xff
- 800a570: d82c bhi.n 800a5cc <ip4addr_aton+0x138>
- val |= (parts[0] << 24) | (parts[1] << 16);
- 800a572: 041b lsls r3, r3, #16
- 800a574: ea43 6302 orr.w r3, r3, r2, lsl #24
- 800a578: 431c orrs r4, r3
- break;
- 800a57a: e7e9 b.n 800a550 <ip4addr_aton+0xbc>
- if (val > 0xff) {
- 800a57c: 2cff cmp r4, #255 @ 0xff
- 800a57e: d827 bhi.n 800a5d0 <ip4addr_aton+0x13c>
- if ((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff)) {
- 800a580: 9900 ldr r1, [sp, #0]
- 800a582: 29ff cmp r1, #255 @ 0xff
- 800a584: d826 bhi.n 800a5d4 <ip4addr_aton+0x140>
- 800a586: 9b01 ldr r3, [sp, #4]
- 800a588: 2bff cmp r3, #255 @ 0xff
- 800a58a: d825 bhi.n 800a5d8 <ip4addr_aton+0x144>
- 800a58c: 9a02 ldr r2, [sp, #8]
- 800a58e: 2aff cmp r2, #255 @ 0xff
- 800a590: d824 bhi.n 800a5dc <ip4addr_aton+0x148>
- val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
- 800a592: 041b lsls r3, r3, #16
- 800a594: ea43 6301 orr.w r3, r3, r1, lsl #24
- 800a598: ea43 2302 orr.w r3, r3, r2, lsl #8
- 800a59c: 431c orrs r4, r3
- break;
- 800a59e: e7d7 b.n 800a550 <ip4addr_aton+0xbc>
- LWIP_ASSERT("unhandled", 0);
- 800a5a0: 4b11 ldr r3, [pc, #68] @ (800a5e8 <ip4addr_aton+0x154>)
- 800a5a2: 22f9 movs r2, #249 @ 0xf9
- 800a5a4: 4911 ldr r1, [pc, #68] @ (800a5ec <ip4addr_aton+0x158>)
- 800a5a6: 4812 ldr r0, [pc, #72] @ (800a5f0 <ip4addr_aton+0x15c>)
- 800a5a8: f008 ff2e bl 8013408 <iprintf>
- break;
- 800a5ac: e7d0 b.n 800a550 <ip4addr_aton+0xbc>
- return 0;
- 800a5ae: 2000 movs r0, #0
- 800a5b0: e000 b.n 800a5b4 <ip4addr_aton+0x120>
- return 0;
- 800a5b2: 2000 movs r0, #0
- }
- 800a5b4: b005 add sp, #20
- 800a5b6: bd30 pop {r4, r5, pc}
- return 0;
- 800a5b8: 2000 movs r0, #0
- 800a5ba: e7fb b.n 800a5b4 <ip4addr_aton+0x120>
- return 0;
- 800a5bc: 2000 movs r0, #0
- 800a5be: e7f9 b.n 800a5b4 <ip4addr_aton+0x120>
- return 0;
- 800a5c0: 2000 movs r0, #0
- 800a5c2: e7f7 b.n 800a5b4 <ip4addr_aton+0x120>
- return 0;
- 800a5c4: 2000 movs r0, #0
- 800a5c6: e7f5 b.n 800a5b4 <ip4addr_aton+0x120>
- return 0;
- 800a5c8: 2000 movs r0, #0
- 800a5ca: e7f3 b.n 800a5b4 <ip4addr_aton+0x120>
- 800a5cc: 2000 movs r0, #0
- 800a5ce: e7f1 b.n 800a5b4 <ip4addr_aton+0x120>
- return 0;
- 800a5d0: 2000 movs r0, #0
- 800a5d2: e7ef b.n 800a5b4 <ip4addr_aton+0x120>
- return 0;
- 800a5d4: 2000 movs r0, #0
- 800a5d6: e7ed b.n 800a5b4 <ip4addr_aton+0x120>
- 800a5d8: 2000 movs r0, #0
- 800a5da: e7eb b.n 800a5b4 <ip4addr_aton+0x120>
- 800a5dc: 2000 movs r0, #0
- 800a5de: e7e9 b.n 800a5b4 <ip4addr_aton+0x120>
- return 1;
- 800a5e0: 2001 movs r0, #1
- 800a5e2: e7e7 b.n 800a5b4 <ip4addr_aton+0x120>
- 800a5e4: 08017f4b .word 0x08017f4b
- 800a5e8: 08015660 .word 0x08015660
- 800a5ec: 080156c8 .word 0x080156c8
- 800a5f0: 080144e8 .word 0x080144e8
- 0800a5f4 <ipaddr_addr>:
- {
- 800a5f4: b500 push {lr}
- 800a5f6: b083 sub sp, #12
- if (ip4addr_aton(cp, &val)) {
- 800a5f8: a901 add r1, sp, #4
- 800a5fa: f7ff ff4b bl 800a494 <ip4addr_aton>
- 800a5fe: b920 cbnz r0, 800a60a <ipaddr_addr+0x16>
- return (IPADDR_NONE);
- 800a600: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- }
- 800a604: b003 add sp, #12
- 800a606: f85d fb04 ldr.w pc, [sp], #4
- return ip4_addr_get_u32(&val);
- 800a60a: 9801 ldr r0, [sp, #4]
- 800a60c: e7fa b.n 800a604 <ipaddr_addr+0x10>
- ...
- 0800a610 <ip4addr_ntoa_r>:
- * @return either pointer to buf which now holds the ASCII
- * representation of addr or NULL if buf was too small
- */
- char *
- ip4addr_ntoa_r(const ip4_addr_t *addr, char *buf, int buflen)
- {
- 800a610: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 800a614: b082 sub sp, #8
- 800a616: 4688 mov r8, r1
- u8_t rem;
- u8_t n;
- u8_t i;
- int len = 0;
- s_addr = ip4_addr_get_u32(addr);
- 800a618: 6803 ldr r3, [r0, #0]
- 800a61a: 9301 str r3, [sp, #4]
- rp = buf;
- 800a61c: 460c mov r4, r1
- int len = 0;
- 800a61e: 2600 movs r6, #0
- ap = (u8_t *)&s_addr;
- for (n = 0; n < 4; n++) {
- 800a620: 4630 mov r0, r6
- ap = (u8_t *)&s_addr;
- 800a622: af01 add r7, sp, #4
- for (n = 0; n < 4; n++) {
- 800a624: 2803 cmp r0, #3
- 800a626: d83b bhi.n 800a6a0 <ip4addr_ntoa_r+0x90>
- i = 0;
- 800a628: 2300 movs r3, #0
- do {
- rem = *ap % (u8_t)10;
- 800a62a: 783d ldrb r5, [r7, #0]
- 800a62c: 4920 ldr r1, [pc, #128] @ (800a6b0 <ip4addr_ntoa_r+0xa0>)
- 800a62e: fba1 ce05 umull ip, lr, r1, r5
- 800a632: ea4f 0ede mov.w lr, lr, lsr #3
- 800a636: eb0e 0c8e add.w ip, lr, lr, lsl #2
- 800a63a: eba5 0c4c sub.w ip, r5, ip, lsl #1
- 800a63e: fa5f fc8c uxtb.w ip, ip
- *ap /= (u8_t)10;
- 800a642: f887 e000 strb.w lr, [r7]
- inv[i++] = (char)('0' + rem);
- 800a646: 469e mov lr, r3
- 800a648: 3301 adds r3, #1
- 800a64a: b2db uxtb r3, r3
- 800a64c: f10c 0c30 add.w ip, ip, #48 @ 0x30
- 800a650: f10e 0108 add.w r1, lr, #8
- 800a654: eb0d 0e01 add.w lr, sp, r1
- 800a658: f80e cc08 strb.w ip, [lr, #-8]
- } while (*ap);
- 800a65c: 2d09 cmp r5, #9
- 800a65e: d8e4 bhi.n 800a62a <ip4addr_ntoa_r+0x1a>
- 800a660: e009 b.n 800a676 <ip4addr_ntoa_r+0x66>
- while (i--) {
- if (len++ >= buflen) {
- return NULL;
- }
- *rp++ = inv[i];
- 800a662: f105 0108 add.w r1, r5, #8
- 800a666: eb0d 0601 add.w r6, sp, r1
- 800a66a: f816 6c08 ldrb.w r6, [r6, #-8]
- 800a66e: f804 6b01 strb.w r6, [r4], #1
- if (len++ >= buflen) {
- 800a672: 461e mov r6, r3
- while (i--) {
- 800a674: 462b mov r3, r5
- 800a676: 1e5d subs r5, r3, #1
- 800a678: b2ed uxtb r5, r5
- 800a67a: b133 cbz r3, 800a68a <ip4addr_ntoa_r+0x7a>
- if (len++ >= buflen) {
- 800a67c: 1c73 adds r3, r6, #1
- 800a67e: 4296 cmp r6, r2
- 800a680: dbef blt.n 800a662 <ip4addr_ntoa_r+0x52>
- return NULL;
- 800a682: 2000 movs r0, #0
- *rp++ = '.';
- ap++;
- }
- *--rp = 0;
- return buf;
- }
- 800a684: b002 add sp, #8
- 800a686: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- if (len++ >= buflen) {
- 800a68a: 1c73 adds r3, r6, #1
- 800a68c: 4296 cmp r6, r2
- 800a68e: da0c bge.n 800a6aa <ip4addr_ntoa_r+0x9a>
- *rp++ = '.';
- 800a690: 252e movs r5, #46 @ 0x2e
- 800a692: f804 5b01 strb.w r5, [r4], #1
- ap++;
- 800a696: 3701 adds r7, #1
- for (n = 0; n < 4; n++) {
- 800a698: 3001 adds r0, #1
- 800a69a: b2c0 uxtb r0, r0
- if (len++ >= buflen) {
- 800a69c: 461e mov r6, r3
- 800a69e: e7c1 b.n 800a624 <ip4addr_ntoa_r+0x14>
- *--rp = 0;
- 800a6a0: 2300 movs r3, #0
- 800a6a2: f804 3c01 strb.w r3, [r4, #-1]
- return buf;
- 800a6a6: 4640 mov r0, r8
- 800a6a8: e7ec b.n 800a684 <ip4addr_ntoa_r+0x74>
- return NULL;
- 800a6aa: 2000 movs r0, #0
- 800a6ac: e7ea b.n 800a684 <ip4addr_ntoa_r+0x74>
- 800a6ae: bf00 nop
- 800a6b0: cccccccd .word 0xcccccccd
- 0800a6b4 <ip4addr_ntoa>:
- {
- 800a6b4: b508 push {r3, lr}
- return ip4addr_ntoa_r(addr, str, IP4ADDR_STRLEN_MAX);
- 800a6b6: 2210 movs r2, #16
- 800a6b8: 4901 ldr r1, [pc, #4] @ (800a6c0 <ip4addr_ntoa+0xc>)
- 800a6ba: f7ff ffa9 bl 800a610 <ip4addr_ntoa_r>
- }
- 800a6be: bd08 pop {r3, pc}
- 800a6c0: 24013038 .word 0x24013038
- 0800a6c4 <ip_reass_dequeue_datagram>:
- * Dequeues a datagram from the datagram queue. Doesn't deallocate the pbufs.
- * @param ipr points to the queue entry to dequeue
- */
- static void
- ip_reass_dequeue_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev)
- {
- 800a6c4: b538 push {r3, r4, r5, lr}
- 800a6c6: 4604 mov r4, r0
- /* dequeue the reass struct */
- if (reassdatagrams == ipr) {
- 800a6c8: 4b0c ldr r3, [pc, #48] @ (800a6fc <ip_reass_dequeue_datagram+0x38>)
- 800a6ca: 681b ldr r3, [r3, #0]
- 800a6cc: 4283 cmp r3, r0
- 800a6ce: d008 beq.n 800a6e2 <ip_reass_dequeue_datagram+0x1e>
- 800a6d0: 460d mov r5, r1
- /* it was the first in the list */
- reassdatagrams = ipr->next;
- } else {
- /* it wasn't the first, so it must have a valid 'prev' */
- LWIP_ASSERT("sanity check linked list", prev != NULL);
- 800a6d2: b151 cbz r1, 800a6ea <ip_reass_dequeue_datagram+0x26>
- prev->next = ipr->next;
- 800a6d4: 6823 ldr r3, [r4, #0]
- 800a6d6: 602b str r3, [r5, #0]
- }
- /* now we can free the ip_reassdata struct */
- memp_free(MEMP_REASSDATA, ipr);
- 800a6d8: 4621 mov r1, r4
- 800a6da: 2004 movs r0, #4
- 800a6dc: f000 ffc8 bl 800b670 <memp_free>
- }
- 800a6e0: bd38 pop {r3, r4, r5, pc}
- reassdatagrams = ipr->next;
- 800a6e2: 6802 ldr r2, [r0, #0]
- 800a6e4: 4b05 ldr r3, [pc, #20] @ (800a6fc <ip_reass_dequeue_datagram+0x38>)
- 800a6e6: 601a str r2, [r3, #0]
- 800a6e8: e7f6 b.n 800a6d8 <ip_reass_dequeue_datagram+0x14>
- LWIP_ASSERT("sanity check linked list", prev != NULL);
- 800a6ea: 4b05 ldr r3, [pc, #20] @ (800a700 <ip_reass_dequeue_datagram+0x3c>)
- 800a6ec: f240 1245 movw r2, #325 @ 0x145
- 800a6f0: 4904 ldr r1, [pc, #16] @ (800a704 <ip_reass_dequeue_datagram+0x40>)
- 800a6f2: 4805 ldr r0, [pc, #20] @ (800a708 <ip_reass_dequeue_datagram+0x44>)
- 800a6f4: f008 fe88 bl 8013408 <iprintf>
- 800a6f8: e7ec b.n 800a6d4 <ip_reass_dequeue_datagram+0x10>
- 800a6fa: bf00 nop
- 800a6fc: 2401304c .word 0x2401304c
- 800a700: 080156dc .word 0x080156dc
- 800a704: 08015744 .word 0x08015744
- 800a708: 080144e8 .word 0x080144e8
- 0800a70c <ip_reass_free_complete_datagram>:
- {
- 800a70c: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
- 800a710: 4680 mov r8, r0
- 800a712: 4689 mov r9, r1
- LWIP_ASSERT("prev != ipr", prev != ipr);
- 800a714: 4281 cmp r1, r0
- 800a716: d015 beq.n 800a744 <ip_reass_free_complete_datagram+0x38>
- if (prev != NULL) {
- 800a718: f1b9 0f00 cmp.w r9, #0
- 800a71c: d009 beq.n 800a732 <ip_reass_free_complete_datagram+0x26>
- LWIP_ASSERT("prev->next == ipr", prev->next == ipr);
- 800a71e: f8d9 3000 ldr.w r3, [r9]
- 800a722: 4543 cmp r3, r8
- 800a724: d005 beq.n 800a732 <ip_reass_free_complete_datagram+0x26>
- 800a726: 4b31 ldr r3, [pc, #196] @ (800a7ec <ip_reass_free_complete_datagram+0xe0>)
- 800a728: 22ad movs r2, #173 @ 0xad
- 800a72a: 4931 ldr r1, [pc, #196] @ (800a7f0 <ip_reass_free_complete_datagram+0xe4>)
- 800a72c: 4831 ldr r0, [pc, #196] @ (800a7f4 <ip_reass_free_complete_datagram+0xe8>)
- 800a72e: f008 fe6b bl 8013408 <iprintf>
- iprh = (struct ip_reass_helper *)ipr->p->payload;
- 800a732: f8d8 4004 ldr.w r4, [r8, #4]
- 800a736: 6863 ldr r3, [r4, #4]
- if (iprh->start == 0) {
- 800a738: 889a ldrh r2, [r3, #4]
- 800a73a: b152 cbz r2, 800a752 <ip_reass_free_complete_datagram+0x46>
- u16_t pbufs_freed = 0;
- 800a73c: 2600 movs r6, #0
- p = ipr->p;
- 800a73e: f8d8 5004 ldr.w r5, [r8, #4]
- while (p != NULL) {
- 800a742: e02b b.n 800a79c <ip_reass_free_complete_datagram+0x90>
- LWIP_ASSERT("prev != ipr", prev != ipr);
- 800a744: 4b29 ldr r3, [pc, #164] @ (800a7ec <ip_reass_free_complete_datagram+0xe0>)
- 800a746: 22ab movs r2, #171 @ 0xab
- 800a748: 492b ldr r1, [pc, #172] @ (800a7f8 <ip_reass_free_complete_datagram+0xec>)
- 800a74a: 482a ldr r0, [pc, #168] @ (800a7f4 <ip_reass_free_complete_datagram+0xe8>)
- 800a74c: f008 fe5c bl 8013408 <iprintf>
- 800a750: e7e2 b.n 800a718 <ip_reass_free_complete_datagram+0xc>
- ipr->p = iprh->next_pbuf;
- 800a752: 681b ldr r3, [r3, #0]
- 800a754: f8c8 3004 str.w r3, [r8, #4]
- SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN);
- 800a758: 6863 ldr r3, [r4, #4]
- 800a75a: f8d8 2008 ldr.w r2, [r8, #8]
- 800a75e: f8d8 500c ldr.w r5, [r8, #12]
- 800a762: f8d8 0010 ldr.w r0, [r8, #16]
- 800a766: f8d8 1014 ldr.w r1, [r8, #20]
- 800a76a: 601a str r2, [r3, #0]
- 800a76c: 605d str r5, [r3, #4]
- 800a76e: 6098 str r0, [r3, #8]
- 800a770: 60d9 str r1, [r3, #12]
- 800a772: f8d8 2018 ldr.w r2, [r8, #24]
- 800a776: 611a str r2, [r3, #16]
- icmp_time_exceeded(p, ICMP_TE_FRAG);
- 800a778: 2101 movs r1, #1
- 800a77a: 4620 mov r0, r4
- 800a77c: f7ff fc34 bl 8009fe8 <icmp_time_exceeded>
- clen = pbuf_clen(p);
- 800a780: 4620 mov r0, r4
- 800a782: f001 fc92 bl 800c0aa <pbuf_clen>
- 800a786: 4606 mov r6, r0
- pbuf_free(p);
- 800a788: 4620 mov r0, r4
- 800a78a: f001 fb09 bl 800bda0 <pbuf_free>
- 800a78e: e7d6 b.n 800a73e <ip_reass_free_complete_datagram+0x32>
- pbufs_freed = (u16_t)(pbufs_freed + clen);
- 800a790: 4434 add r4, r6
- 800a792: b2a6 uxth r6, r4
- pbuf_free(pcur);
- 800a794: 4628 mov r0, r5
- 800a796: f001 fb03 bl 800bda0 <pbuf_free>
- p = iprh->next_pbuf;
- 800a79a: 463d mov r5, r7
- while (p != NULL) {
- 800a79c: b185 cbz r5, 800a7c0 <ip_reass_free_complete_datagram+0xb4>
- iprh = (struct ip_reass_helper *)p->payload;
- 800a79e: 686b ldr r3, [r5, #4]
- p = iprh->next_pbuf;
- 800a7a0: 681f ldr r7, [r3, #0]
- clen = pbuf_clen(pcur);
- 800a7a2: 4628 mov r0, r5
- 800a7a4: f001 fc81 bl 800c0aa <pbuf_clen>
- 800a7a8: 4604 mov r4, r0
- LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
- 800a7aa: 1833 adds r3, r6, r0
- 800a7ac: f5b3 3f80 cmp.w r3, #65536 @ 0x10000
- 800a7b0: dbee blt.n 800a790 <ip_reass_free_complete_datagram+0x84>
- 800a7b2: 4b0e ldr r3, [pc, #56] @ (800a7ec <ip_reass_free_complete_datagram+0xe0>)
- 800a7b4: 22cc movs r2, #204 @ 0xcc
- 800a7b6: 4911 ldr r1, [pc, #68] @ (800a7fc <ip_reass_free_complete_datagram+0xf0>)
- 800a7b8: 480e ldr r0, [pc, #56] @ (800a7f4 <ip_reass_free_complete_datagram+0xe8>)
- 800a7ba: f008 fe25 bl 8013408 <iprintf>
- 800a7be: e7e7 b.n 800a790 <ip_reass_free_complete_datagram+0x84>
- ip_reass_dequeue_datagram(ipr, prev);
- 800a7c0: 4649 mov r1, r9
- 800a7c2: 4640 mov r0, r8
- 800a7c4: f7ff ff7e bl 800a6c4 <ip_reass_dequeue_datagram>
- LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed);
- 800a7c8: 4b0d ldr r3, [pc, #52] @ (800a800 <ip_reass_free_complete_datagram+0xf4>)
- 800a7ca: 881b ldrh r3, [r3, #0]
- 800a7cc: 42b3 cmp r3, r6
- 800a7ce: d306 bcc.n 800a7de <ip_reass_free_complete_datagram+0xd2>
- ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - pbufs_freed);
- 800a7d0: 4a0b ldr r2, [pc, #44] @ (800a800 <ip_reass_free_complete_datagram+0xf4>)
- 800a7d2: 8813 ldrh r3, [r2, #0]
- 800a7d4: 1b9b subs r3, r3, r6
- 800a7d6: 8013 strh r3, [r2, #0]
- }
- 800a7d8: 4630 mov r0, r6
- 800a7da: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
- LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed);
- 800a7de: 4b03 ldr r3, [pc, #12] @ (800a7ec <ip_reass_free_complete_datagram+0xe0>)
- 800a7e0: 22d2 movs r2, #210 @ 0xd2
- 800a7e2: 4908 ldr r1, [pc, #32] @ (800a804 <ip_reass_free_complete_datagram+0xf8>)
- 800a7e4: 4803 ldr r0, [pc, #12] @ (800a7f4 <ip_reass_free_complete_datagram+0xe8>)
- 800a7e6: f008 fe0f bl 8013408 <iprintf>
- 800a7ea: e7f1 b.n 800a7d0 <ip_reass_free_complete_datagram+0xc4>
- 800a7ec: 080156dc .word 0x080156dc
- 800a7f0: 0801576c .word 0x0801576c
- 800a7f4: 080144e8 .word 0x080144e8
- 800a7f8: 08015760 .word 0x08015760
- 800a7fc: 08015780 .word 0x08015780
- 800a800: 24013048 .word 0x24013048
- 800a804: 080157a0 .word 0x080157a0
- 0800a808 <ip_reass_remove_oldest_datagram>:
- {
- 800a808: b5f8 push {r3, r4, r5, r6, r7, lr}
- 800a80a: 4605 mov r5, r0
- 800a80c: 460f mov r7, r1
- int pbufs_freed = 0, pbufs_freed_current;
- 800a80e: 2600 movs r6, #0
- 800a810: e02e b.n 800a870 <ip_reass_remove_oldest_datagram+0x68>
- if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) {
- 800a812: 699a ldr r2, [r3, #24]
- 800a814: f8d5 e010 ldr.w lr, [r5, #16]
- 800a818: 4572 cmp r2, lr
- 800a81a: d111 bne.n 800a840 <ip_reass_remove_oldest_datagram+0x38>
- 800a81c: f8b3 e00c ldrh.w lr, [r3, #12]
- 800a820: 88aa ldrh r2, [r5, #4]
- 800a822: 4596 cmp lr, r2
- 800a824: d10c bne.n 800a840 <ip_reass_remove_oldest_datagram+0x38>
- 800a826: e001 b.n 800a82c <ip_reass_remove_oldest_datagram+0x24>
- oldest_prev = prev;
- 800a828: 4661 mov r1, ip
- oldest = r;
- 800a82a: 4618 mov r0, r3
- if (r->next != NULL) {
- 800a82c: 681a ldr r2, [r3, #0]
- 800a82e: b192 cbz r2, 800a856 <ip_reass_remove_oldest_datagram+0x4e>
- 800a830: 469c mov ip, r3
- 800a832: 4613 mov r3, r2
- while (r != NULL) {
- 800a834: b18b cbz r3, 800a85a <ip_reass_remove_oldest_datagram+0x52>
- if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) {
- 800a836: 695a ldr r2, [r3, #20]
- 800a838: f8d5 e00c ldr.w lr, [r5, #12]
- 800a83c: 4572 cmp r2, lr
- 800a83e: d0e8 beq.n 800a812 <ip_reass_remove_oldest_datagram+0xa>
- other_datagrams++;
- 800a840: 3401 adds r4, #1
- if (oldest == NULL) {
- 800a842: 2800 cmp r0, #0
- 800a844: d0f0 beq.n 800a828 <ip_reass_remove_oldest_datagram+0x20>
- } else if (r->timer <= oldest->timer) {
- 800a846: f893 e01f ldrb.w lr, [r3, #31]
- 800a84a: 7fc2 ldrb r2, [r0, #31]
- 800a84c: 4596 cmp lr, r2
- 800a84e: d8ed bhi.n 800a82c <ip_reass_remove_oldest_datagram+0x24>
- oldest_prev = prev;
- 800a850: 4661 mov r1, ip
- oldest = r;
- 800a852: 4618 mov r0, r3
- 800a854: e7ea b.n 800a82c <ip_reass_remove_oldest_datagram+0x24>
- if (r->next != NULL) {
- 800a856: 4663 mov r3, ip
- 800a858: e7ea b.n 800a830 <ip_reass_remove_oldest_datagram+0x28>
- if (oldest != NULL) {
- 800a85a: b110 cbz r0, 800a862 <ip_reass_remove_oldest_datagram+0x5a>
- pbufs_freed_current = ip_reass_free_complete_datagram(oldest, oldest_prev);
- 800a85c: f7ff ff56 bl 800a70c <ip_reass_free_complete_datagram>
- pbufs_freed += pbufs_freed_current;
- 800a860: 4406 add r6, r0
- } while ((pbufs_freed < pbufs_needed) && (other_datagrams > 1));
- 800a862: 2c01 cmp r4, #1
- 800a864: bfd4 ite le
- 800a866: 2400 movle r4, #0
- 800a868: 2401 movgt r4, #1
- 800a86a: 42be cmp r6, r7
- 800a86c: da07 bge.n 800a87e <ip_reass_remove_oldest_datagram+0x76>
- 800a86e: b134 cbz r4, 800a87e <ip_reass_remove_oldest_datagram+0x76>
- r = reassdatagrams;
- 800a870: 4b04 ldr r3, [pc, #16] @ (800a884 <ip_reass_remove_oldest_datagram+0x7c>)
- 800a872: 681b ldr r3, [r3, #0]
- other_datagrams = 0;
- 800a874: 2400 movs r4, #0
- oldest_prev = NULL;
- 800a876: 4621 mov r1, r4
- prev = NULL;
- 800a878: 46a4 mov ip, r4
- oldest = NULL;
- 800a87a: 4620 mov r0, r4
- while (r != NULL) {
- 800a87c: e7da b.n 800a834 <ip_reass_remove_oldest_datagram+0x2c>
- }
- 800a87e: 4630 mov r0, r6
- 800a880: bdf8 pop {r3, r4, r5, r6, r7, pc}
- 800a882: bf00 nop
- 800a884: 2401304c .word 0x2401304c
- 0800a888 <ip_frag_free_pbuf_custom_ref>:
- }
- /** Free a struct pbuf_custom_ref */
- static void
- ip_frag_free_pbuf_custom_ref(struct pbuf_custom_ref *p)
- {
- 800a888: b510 push {r4, lr}
- LWIP_ASSERT("p != NULL", p != NULL);
- 800a88a: 4604 mov r4, r0
- 800a88c: b120 cbz r0, 800a898 <ip_frag_free_pbuf_custom_ref+0x10>
- memp_free(MEMP_FRAG_PBUF, p);
- 800a88e: 4621 mov r1, r4
- 800a890: 2005 movs r0, #5
- 800a892: f000 feed bl 800b670 <memp_free>
- }
- 800a896: bd10 pop {r4, pc}
- LWIP_ASSERT("p != NULL", p != NULL);
- 800a898: 4b03 ldr r3, [pc, #12] @ (800a8a8 <ip_frag_free_pbuf_custom_ref+0x20>)
- 800a89a: f44f 7231 mov.w r2, #708 @ 0x2c4
- 800a89e: 4903 ldr r1, [pc, #12] @ (800a8ac <ip_frag_free_pbuf_custom_ref+0x24>)
- 800a8a0: 4803 ldr r0, [pc, #12] @ (800a8b0 <ip_frag_free_pbuf_custom_ref+0x28>)
- 800a8a2: f008 fdb1 bl 8013408 <iprintf>
- 800a8a6: e7f2 b.n 800a88e <ip_frag_free_pbuf_custom_ref+0x6>
- 800a8a8: 080156dc .word 0x080156dc
- 800a8ac: 08014fc0 .word 0x08014fc0
- 800a8b0: 080144e8 .word 0x080144e8
- 0800a8b4 <ipfrag_free_pbuf_custom>:
- /** Free-callback function to free a 'struct pbuf_custom_ref', called by
- * pbuf_free. */
- static void
- ipfrag_free_pbuf_custom(struct pbuf *p)
- {
- 800a8b4: b510 push {r4, lr}
- struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref *)p;
- LWIP_ASSERT("pcr != NULL", pcr != NULL);
- 800a8b6: 4604 mov r4, r0
- 800a8b8: b138 cbz r0, 800a8ca <ipfrag_free_pbuf_custom+0x16>
- LWIP_ASSERT("pcr == p", (void *)pcr == (void *)p);
- if (pcr->original != NULL) {
- 800a8ba: 6960 ldr r0, [r4, #20]
- 800a8bc: b108 cbz r0, 800a8c2 <ipfrag_free_pbuf_custom+0xe>
- pbuf_free(pcr->original);
- 800a8be: f001 fa6f bl 800bda0 <pbuf_free>
- }
- ip_frag_free_pbuf_custom_ref(pcr);
- 800a8c2: 4620 mov r0, r4
- 800a8c4: f7ff ffe0 bl 800a888 <ip_frag_free_pbuf_custom_ref>
- }
- 800a8c8: bd10 pop {r4, pc}
- LWIP_ASSERT("pcr != NULL", pcr != NULL);
- 800a8ca: 4b04 ldr r3, [pc, #16] @ (800a8dc <ipfrag_free_pbuf_custom+0x28>)
- 800a8cc: f240 22ce movw r2, #718 @ 0x2ce
- 800a8d0: 4903 ldr r1, [pc, #12] @ (800a8e0 <ipfrag_free_pbuf_custom+0x2c>)
- 800a8d2: 4804 ldr r0, [pc, #16] @ (800a8e4 <ipfrag_free_pbuf_custom+0x30>)
- 800a8d4: f008 fd98 bl 8013408 <iprintf>
- 800a8d8: e7ef b.n 800a8ba <ipfrag_free_pbuf_custom+0x6>
- 800a8da: bf00 nop
- 800a8dc: 080156dc .word 0x080156dc
- 800a8e0: 080157c4 .word 0x080157c4
- 800a8e4: 080144e8 .word 0x080144e8
- 0800a8e8 <ip_reass_chain_frag_into_datagram_and_validate>:
- {
- 800a8e8: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
- 800a8ec: 4680 mov r8, r0
- 800a8ee: 460d mov r5, r1
- 800a8f0: 4691 mov r9, r2
- fraghdr = (struct ip_hdr *)new_p->payload;
- 800a8f2: 684c ldr r4, [r1, #4]
- len = lwip_ntohs(IPH_LEN(fraghdr));
- 800a8f4: 8860 ldrh r0, [r4, #2]
- 800a8f6: f7fd fac1 bl 8007e7c <lwip_htons>
- hlen = IPH_HL_BYTES(fraghdr);
- 800a8fa: 7823 ldrb r3, [r4, #0]
- 800a8fc: f003 030f and.w r3, r3, #15
- if (hlen > len) {
- 800a900: ebb0 0f83 cmp.w r0, r3, lsl #2
- 800a904: d203 bcs.n 800a90e <ip_reass_chain_frag_into_datagram_and_validate+0x26>
- return IP_REASS_VALIDATE_PBUF_DROPPED;
- 800a906: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- }
- 800a90a: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
- 800a90e: 009a lsls r2, r3, #2
- len = (u16_t)(len - hlen);
- 800a910: 1a80 subs r0, r0, r2
- 800a912: b287 uxth r7, r0
- offset = IPH_OFFSET_BYTES(fraghdr);
- 800a914: 88e0 ldrh r0, [r4, #6]
- 800a916: f7fd fab1 bl 8007e7c <lwip_htons>
- 800a91a: f3c0 0c0c ubfx ip, r0, #0, #13
- 800a91e: ea4f 0ccc mov.w ip, ip, lsl #3
- iprh = (struct ip_reass_helper *)new_p->payload;
- 800a922: 686e ldr r6, [r5, #4]
- iprh->next_pbuf = NULL;
- 800a924: 2300 movs r3, #0
- 800a926: 7033 strb r3, [r6, #0]
- 800a928: 7073 strb r3, [r6, #1]
- 800a92a: 70b3 strb r3, [r6, #2]
- 800a92c: 70f3 strb r3, [r6, #3]
- iprh->start = offset;
- 800a92e: f8a6 c004 strh.w ip, [r6, #4]
- iprh->end = (u16_t)(offset + len);
- 800a932: eb07 000c add.w r0, r7, ip
- 800a936: fa1f fe80 uxth.w lr, r0
- 800a93a: 80f0 strh r0, [r6, #6]
- if (iprh->end < offset) {
- 800a93c: 45e6 cmp lr, ip
- 800a93e: f0c0 8085 bcc.w 800aa4c <ip_reass_chain_frag_into_datagram_and_validate+0x164>
- for (q = ipr->p; q != NULL;) {
- 800a942: f8d8 1004 ldr.w r1, [r8, #4]
- int valid = 1;
- 800a946: 2701 movs r7, #1
- struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev = NULL;
- 800a948: 461c mov r4, r3
- for (q = ipr->p; q != NULL;) {
- 800a94a: e01f b.n 800a98c <ip_reass_chain_frag_into_datagram_and_validate+0xa4>
- iprh->next_pbuf = q;
- 800a94c: 6031 str r1, [r6, #0]
- if (iprh_prev != NULL) {
- 800a94e: b1ac cbz r4, 800a97c <ip_reass_chain_frag_into_datagram_and_validate+0x94>
- if ((iprh->start < iprh_prev->end) || (iprh->end > iprh_tmp->start)) {
- 800a950: 88e2 ldrh r2, [r4, #6]
- 800a952: 4562 cmp r2, ip
- 800a954: d87d bhi.n 800aa52 <ip_reass_chain_frag_into_datagram_and_validate+0x16a>
- 800a956: 889b ldrh r3, [r3, #4]
- 800a958: 459e cmp lr, r3
- 800a95a: d87d bhi.n 800aa58 <ip_reass_chain_frag_into_datagram_and_validate+0x170>
- iprh_prev->next_pbuf = new_p;
- 800a95c: 6025 str r5, [r4, #0]
- if (iprh_prev->end != iprh->start) {
- 800a95e: 88b3 ldrh r3, [r6, #4]
- 800a960: 429a cmp r2, r3
- 800a962: d000 beq.n 800a966 <ip_reass_chain_frag_into_datagram_and_validate+0x7e>
- valid = 0;
- 800a964: 2700 movs r7, #0
- if (q == NULL) {
- 800a966: b319 cbz r1, 800a9b0 <ip_reass_chain_frag_into_datagram_and_validate+0xc8>
- if (is_last || ((ipr->flags & IP_REASS_FLAG_LASTFRAG) != 0)) {
- 800a968: f1b9 0f00 cmp.w r9, #0
- 800a96c: d141 bne.n 800a9f2 <ip_reass_chain_frag_into_datagram_and_validate+0x10a>
- 800a96e: f898 301e ldrb.w r3, [r8, #30]
- 800a972: f013 0f01 tst.w r3, #1
- 800a976: d13c bne.n 800a9f2 <ip_reass_chain_frag_into_datagram_and_validate+0x10a>
- return IP_REASS_VALIDATE_PBUF_QUEUED; /* not yet valid! */
- 800a978: 4648 mov r0, r9
- 800a97a: e7c6 b.n 800a90a <ip_reass_chain_frag_into_datagram_and_validate+0x22>
- if (iprh->end > iprh_tmp->start) {
- 800a97c: 889b ldrh r3, [r3, #4]
- 800a97e: 459e cmp lr, r3
- 800a980: d86d bhi.n 800aa5e <ip_reass_chain_frag_into_datagram_and_validate+0x176>
- ipr->p = new_p;
- 800a982: f8c8 5004 str.w r5, [r8, #4]
- 800a986: e7ee b.n 800a966 <ip_reass_chain_frag_into_datagram_and_validate+0x7e>
- q = iprh_tmp->next_pbuf;
- 800a988: 6819 ldr r1, [r3, #0]
- iprh_prev = iprh_tmp;
- 800a98a: 461c mov r4, r3
- for (q = ipr->p; q != NULL;) {
- 800a98c: 2900 cmp r1, #0
- 800a98e: d0ea beq.n 800a966 <ip_reass_chain_frag_into_datagram_and_validate+0x7e>
- iprh_tmp = (struct ip_reass_helper *)q->payload;
- 800a990: 684b ldr r3, [r1, #4]
- if (iprh->start < iprh_tmp->start) {
- 800a992: 889a ldrh r2, [r3, #4]
- 800a994: 4562 cmp r2, ip
- 800a996: d8d9 bhi.n 800a94c <ip_reass_chain_frag_into_datagram_and_validate+0x64>
- } else if (iprh->start == iprh_tmp->start) {
- 800a998: 4562 cmp r2, ip
- 800a99a: d063 beq.n 800aa64 <ip_reass_chain_frag_into_datagram_and_validate+0x17c>
- } else if (iprh->start < iprh_tmp->end) {
- 800a99c: 88d9 ldrh r1, [r3, #6]
- 800a99e: 4561 cmp r1, ip
- 800a9a0: d863 bhi.n 800aa6a <ip_reass_chain_frag_into_datagram_and_validate+0x182>
- if (iprh_prev != NULL) {
- 800a9a2: 2c00 cmp r4, #0
- 800a9a4: d0f0 beq.n 800a988 <ip_reass_chain_frag_into_datagram_and_validate+0xa0>
- if (iprh_prev->end != iprh_tmp->start) {
- 800a9a6: 88e1 ldrh r1, [r4, #6]
- 800a9a8: 428a cmp r2, r1
- 800a9aa: d0ed beq.n 800a988 <ip_reass_chain_frag_into_datagram_and_validate+0xa0>
- valid = 0;
- 800a9ac: 2700 movs r7, #0
- 800a9ae: e7eb b.n 800a988 <ip_reass_chain_frag_into_datagram_and_validate+0xa0>
- if (iprh_prev != NULL) {
- 800a9b0: b194 cbz r4, 800a9d8 <ip_reass_chain_frag_into_datagram_and_validate+0xf0>
- LWIP_ASSERT("check fragments don't overlap", iprh_prev->end <= iprh->start);
- 800a9b2: 88e2 ldrh r2, [r4, #6]
- 800a9b4: 88b3 ldrh r3, [r6, #4]
- 800a9b6: 429a cmp r2, r3
- 800a9b8: d806 bhi.n 800a9c8 <ip_reass_chain_frag_into_datagram_and_validate+0xe0>
- iprh_prev->next_pbuf = new_p;
- 800a9ba: 6025 str r5, [r4, #0]
- if (iprh_prev->end != iprh->start) {
- 800a9bc: 88e2 ldrh r2, [r4, #6]
- 800a9be: 88b3 ldrh r3, [r6, #4]
- 800a9c0: 429a cmp r2, r3
- 800a9c2: d0d1 beq.n 800a968 <ip_reass_chain_frag_into_datagram_and_validate+0x80>
- valid = 0;
- 800a9c4: 2700 movs r7, #0
- 800a9c6: e7cf b.n 800a968 <ip_reass_chain_frag_into_datagram_and_validate+0x80>
- LWIP_ASSERT("check fragments don't overlap", iprh_prev->end <= iprh->start);
- 800a9c8: 4b29 ldr r3, [pc, #164] @ (800aa70 <ip_reass_chain_frag_into_datagram_and_validate+0x188>)
- 800a9ca: f44f 72db mov.w r2, #438 @ 0x1b6
- 800a9ce: 4929 ldr r1, [pc, #164] @ (800aa74 <ip_reass_chain_frag_into_datagram_and_validate+0x18c>)
- 800a9d0: 4829 ldr r0, [pc, #164] @ (800aa78 <ip_reass_chain_frag_into_datagram_and_validate+0x190>)
- 800a9d2: f008 fd19 bl 8013408 <iprintf>
- 800a9d6: e7f0 b.n 800a9ba <ip_reass_chain_frag_into_datagram_and_validate+0xd2>
- LWIP_ASSERT("no previous fragment, this must be the first fragment!",
- 800a9d8: f8d8 3004 ldr.w r3, [r8, #4]
- 800a9dc: b133 cbz r3, 800a9ec <ip_reass_chain_frag_into_datagram_and_validate+0x104>
- 800a9de: 4b24 ldr r3, [pc, #144] @ (800aa70 <ip_reass_chain_frag_into_datagram_and_validate+0x188>)
- 800a9e0: f44f 72df mov.w r2, #446 @ 0x1be
- 800a9e4: 4925 ldr r1, [pc, #148] @ (800aa7c <ip_reass_chain_frag_into_datagram_and_validate+0x194>)
- 800a9e6: 4824 ldr r0, [pc, #144] @ (800aa78 <ip_reass_chain_frag_into_datagram_and_validate+0x190>)
- 800a9e8: f008 fd0e bl 8013408 <iprintf>
- ipr->p = new_p;
- 800a9ec: f8c8 5004 str.w r5, [r8, #4]
- 800a9f0: e7ba b.n 800a968 <ip_reass_chain_frag_into_datagram_and_validate+0x80>
- if (valid) {
- 800a9f2: b34f cbz r7, 800aa48 <ip_reass_chain_frag_into_datagram_and_validate+0x160>
- if ((ipr->p == NULL) || (((struct ip_reass_helper *)ipr->p->payload)->start != 0)) {
- 800a9f4: f8d8 3004 ldr.w r3, [r8, #4]
- 800a9f8: b31b cbz r3, 800aa42 <ip_reass_chain_frag_into_datagram_and_validate+0x15a>
- 800a9fa: 6858 ldr r0, [r3, #4]
- 800a9fc: 8883 ldrh r3, [r0, #4]
- 800a9fe: bb13 cbnz r3, 800aa46 <ip_reass_chain_frag_into_datagram_and_validate+0x15e>
- q = iprh->next_pbuf;
- 800aa00: 6832 ldr r2, [r6, #0]
- while (q != NULL) {
- 800aa02: b14a cbz r2, 800aa18 <ip_reass_chain_frag_into_datagram_and_validate+0x130>
- iprh = (struct ip_reass_helper *)q->payload;
- 800aa04: 6853 ldr r3, [r2, #4]
- if (iprh_prev->end != iprh->start) {
- 800aa06: 88f1 ldrh r1, [r6, #6]
- 800aa08: 889a ldrh r2, [r3, #4]
- 800aa0a: 4291 cmp r1, r2
- 800aa0c: d102 bne.n 800aa14 <ip_reass_chain_frag_into_datagram_and_validate+0x12c>
- q = iprh->next_pbuf;
- 800aa0e: 681a ldr r2, [r3, #0]
- iprh = (struct ip_reass_helper *)q->payload;
- 800aa10: 461e mov r6, r3
- 800aa12: e7f6 b.n 800aa02 <ip_reass_chain_frag_into_datagram_and_validate+0x11a>
- 800aa14: 461e mov r6, r3
- valid = 0;
- 800aa16: 2700 movs r7, #0
- if (valid) {
- 800aa18: b1b7 cbz r7, 800aa48 <ip_reass_chain_frag_into_datagram_and_validate+0x160>
- LWIP_ASSERT("sanity check",
- 800aa1a: 42b0 cmp r0, r6
- 800aa1c: d009 beq.n 800aa32 <ip_reass_chain_frag_into_datagram_and_validate+0x14a>
- LWIP_ASSERT("validate_datagram:next_pbuf!=NULL",
- 800aa1e: 6833 ldr r3, [r6, #0]
- 800aa20: b193 cbz r3, 800aa48 <ip_reass_chain_frag_into_datagram_and_validate+0x160>
- 800aa22: 4b13 ldr r3, [pc, #76] @ (800aa70 <ip_reass_chain_frag_into_datagram_and_validate+0x188>)
- 800aa24: f44f 72f1 mov.w r2, #482 @ 0x1e2
- 800aa28: 4915 ldr r1, [pc, #84] @ (800aa80 <ip_reass_chain_frag_into_datagram_and_validate+0x198>)
- 800aa2a: 4813 ldr r0, [pc, #76] @ (800aa78 <ip_reass_chain_frag_into_datagram_and_validate+0x190>)
- 800aa2c: f008 fcec bl 8013408 <iprintf>
- 800aa30: e00a b.n 800aa48 <ip_reass_chain_frag_into_datagram_and_validate+0x160>
- LWIP_ASSERT("sanity check",
- 800aa32: 4b0f ldr r3, [pc, #60] @ (800aa70 <ip_reass_chain_frag_into_datagram_and_validate+0x188>)
- 800aa34: f44f 72f0 mov.w r2, #480 @ 0x1e0
- 800aa38: 4912 ldr r1, [pc, #72] @ (800aa84 <ip_reass_chain_frag_into_datagram_and_validate+0x19c>)
- 800aa3a: 480f ldr r0, [pc, #60] @ (800aa78 <ip_reass_chain_frag_into_datagram_and_validate+0x190>)
- 800aa3c: f008 fce4 bl 8013408 <iprintf>
- 800aa40: e7ed b.n 800aa1e <ip_reass_chain_frag_into_datagram_and_validate+0x136>
- valid = 0;
- 800aa42: 2700 movs r7, #0
- 800aa44: e000 b.n 800aa48 <ip_reass_chain_frag_into_datagram_and_validate+0x160>
- 800aa46: 2700 movs r7, #0
- return valid ? IP_REASS_VALIDATE_TELEGRAM_FINISHED : IP_REASS_VALIDATE_PBUF_QUEUED;
- 800aa48: 4638 mov r0, r7
- 800aa4a: e75e b.n 800a90a <ip_reass_chain_frag_into_datagram_and_validate+0x22>
- return IP_REASS_VALIDATE_PBUF_DROPPED;
- 800aa4c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800aa50: e75b b.n 800a90a <ip_reass_chain_frag_into_datagram_and_validate+0x22>
- return IP_REASS_VALIDATE_PBUF_DROPPED;
- 800aa52: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800aa56: e758 b.n 800a90a <ip_reass_chain_frag_into_datagram_and_validate+0x22>
- 800aa58: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800aa5c: e755 b.n 800a90a <ip_reass_chain_frag_into_datagram_and_validate+0x22>
- return IP_REASS_VALIDATE_PBUF_DROPPED;
- 800aa5e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800aa62: e752 b.n 800a90a <ip_reass_chain_frag_into_datagram_and_validate+0x22>
- return IP_REASS_VALIDATE_PBUF_DROPPED;
- 800aa64: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800aa68: e74f b.n 800a90a <ip_reass_chain_frag_into_datagram_and_validate+0x22>
- return IP_REASS_VALIDATE_PBUF_DROPPED;
- 800aa6a: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800aa6e: e74c b.n 800a90a <ip_reass_chain_frag_into_datagram_and_validate+0x22>
- 800aa70: 080156dc .word 0x080156dc
- 800aa74: 080157d0 .word 0x080157d0
- 800aa78: 080144e8 .word 0x080144e8
- 800aa7c: 080157f0 .word 0x080157f0
- 800aa80: 08015838 .word 0x08015838
- 800aa84: 08015828 .word 0x08015828
- 0800aa88 <ip_frag_alloc_pbuf_custom_ref>:
- {
- 800aa88: b508 push {r3, lr}
- return (struct pbuf_custom_ref *)memp_malloc(MEMP_FRAG_PBUF);
- 800aa8a: 2005 movs r0, #5
- 800aa8c: f000 fdba bl 800b604 <memp_malloc>
- }
- 800aa90: bd08 pop {r3, pc}
- ...
- 0800aa94 <ip_reass_enqueue_new_datagram>:
- {
- 800aa94: b570 push {r4, r5, r6, lr}
- 800aa96: 4605 mov r5, r0
- 800aa98: 460e mov r6, r1
- ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA);
- 800aa9a: 2004 movs r0, #4
- 800aa9c: f000 fdb2 bl 800b604 <memp_malloc>
- if (ipr == NULL) {
- 800aaa0: 4604 mov r4, r0
- 800aaa2: b1b0 cbz r0, 800aad2 <ip_reass_enqueue_new_datagram+0x3e>
- memset(ipr, 0, sizeof(struct ip_reassdata));
- 800aaa4: 2220 movs r2, #32
- 800aaa6: 2100 movs r1, #0
- 800aaa8: 4620 mov r0, r4
- 800aaaa: f008 fe05 bl 80136b8 <memset>
- ipr->timer = IP_REASS_MAXAGE;
- 800aaae: 230f movs r3, #15
- 800aab0: 77e3 strb r3, [r4, #31]
- ipr->next = reassdatagrams;
- 800aab2: 4b0f ldr r3, [pc, #60] @ (800aaf0 <ip_reass_enqueue_new_datagram+0x5c>)
- 800aab4: 681a ldr r2, [r3, #0]
- 800aab6: 6022 str r2, [r4, #0]
- reassdatagrams = ipr;
- 800aab8: 601c str r4, [r3, #0]
- SMEMCPY(&(ipr->iphdr), fraghdr, IP_HLEN);
- 800aaba: 682b ldr r3, [r5, #0]
- 800aabc: 6868 ldr r0, [r5, #4]
- 800aabe: 68a9 ldr r1, [r5, #8]
- 800aac0: 68ea ldr r2, [r5, #12]
- 800aac2: 60a3 str r3, [r4, #8]
- 800aac4: 60e0 str r0, [r4, #12]
- 800aac6: 6121 str r1, [r4, #16]
- 800aac8: 6162 str r2, [r4, #20]
- 800aaca: 692b ldr r3, [r5, #16]
- 800aacc: 61a3 str r3, [r4, #24]
- }
- 800aace: 4620 mov r0, r4
- 800aad0: bd70 pop {r4, r5, r6, pc}
- if (ip_reass_remove_oldest_datagram(fraghdr, clen) >= clen) {
- 800aad2: 4631 mov r1, r6
- 800aad4: 4628 mov r0, r5
- 800aad6: f7ff fe97 bl 800a808 <ip_reass_remove_oldest_datagram>
- 800aada: 42b0 cmp r0, r6
- 800aadc: da02 bge.n 800aae4 <ip_reass_enqueue_new_datagram+0x50>
- if (ipr == NULL)
- 800aade: 2c00 cmp r4, #0
- 800aae0: d1e0 bne.n 800aaa4 <ip_reass_enqueue_new_datagram+0x10>
- 800aae2: e7f4 b.n 800aace <ip_reass_enqueue_new_datagram+0x3a>
- ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA);
- 800aae4: 2004 movs r0, #4
- 800aae6: f000 fd8d bl 800b604 <memp_malloc>
- 800aaea: 4604 mov r4, r0
- 800aaec: e7f7 b.n 800aade <ip_reass_enqueue_new_datagram+0x4a>
- 800aaee: bf00 nop
- 800aaf0: 2401304c .word 0x2401304c
- 0800aaf4 <ip_reass_tmr>:
- {
- 800aaf4: b538 push {r3, r4, r5, lr}
- r = reassdatagrams;
- 800aaf6: 4b09 ldr r3, [pc, #36] @ (800ab1c <ip_reass_tmr+0x28>)
- 800aaf8: 6818 ldr r0, [r3, #0]
- struct ip_reassdata *r, *prev = NULL;
- 800aafa: 2400 movs r4, #0
- while (r != NULL) {
- 800aafc: e003 b.n 800ab06 <ip_reass_tmr+0x12>
- r->timer--;
- 800aafe: 3b01 subs r3, #1
- 800ab00: 77c3 strb r3, [r0, #31]
- prev = r;
- 800ab02: 4604 mov r4, r0
- r = r->next;
- 800ab04: 6800 ldr r0, [r0, #0]
- while (r != NULL) {
- 800ab06: b140 cbz r0, 800ab1a <ip_reass_tmr+0x26>
- if (r->timer > 0) {
- 800ab08: 7fc3 ldrb r3, [r0, #31]
- 800ab0a: 2b00 cmp r3, #0
- 800ab0c: d1f7 bne.n 800aafe <ip_reass_tmr+0xa>
- r = r->next;
- 800ab0e: 6805 ldr r5, [r0, #0]
- ip_reass_free_complete_datagram(tmp, prev);
- 800ab10: 4621 mov r1, r4
- 800ab12: f7ff fdfb bl 800a70c <ip_reass_free_complete_datagram>
- r = r->next;
- 800ab16: 4628 mov r0, r5
- 800ab18: e7f5 b.n 800ab06 <ip_reass_tmr+0x12>
- }
- 800ab1a: bd38 pop {r3, r4, r5, pc}
- 800ab1c: 2401304c .word 0x2401304c
- 0800ab20 <ip4_reass>:
- {
- 800ab20: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
- 800ab24: 4606 mov r6, r0
- fraghdr = (struct ip_hdr *)p->payload;
- 800ab26: 6845 ldr r5, [r0, #4]
- if (IPH_HL_BYTES(fraghdr) != IP_HLEN) {
- 800ab28: 782b ldrb r3, [r5, #0]
- 800ab2a: f003 030f and.w r3, r3, #15
- 800ab2e: 2b05 cmp r3, #5
- 800ab30: f040 80d1 bne.w 800acd6 <ip4_reass+0x1b6>
- offset = IPH_OFFSET_BYTES(fraghdr);
- 800ab34: 88e8 ldrh r0, [r5, #6]
- 800ab36: f7fd f9a1 bl 8007e7c <lwip_htons>
- 800ab3a: f3c0 080c ubfx r8, r0, #0, #13
- 800ab3e: ea4f 08c8 mov.w r8, r8, lsl #3
- len = lwip_ntohs(IPH_LEN(fraghdr));
- 800ab42: 8868 ldrh r0, [r5, #2]
- 800ab44: f7fd f99a bl 8007e7c <lwip_htons>
- hlen = IPH_HL_BYTES(fraghdr);
- 800ab48: 782b ldrb r3, [r5, #0]
- 800ab4a: f003 030f and.w r3, r3, #15
- 800ab4e: 009a lsls r2, r3, #2
- if (hlen > len) {
- 800ab50: ebb0 0f83 cmp.w r0, r3, lsl #2
- 800ab54: f0c0 80bf bcc.w 800acd6 <ip4_reass+0x1b6>
- len = (u16_t)(len - hlen);
- 800ab58: 1a80 subs r0, r0, r2
- 800ab5a: b287 uxth r7, r0
- clen = pbuf_clen(p);
- 800ab5c: 4630 mov r0, r6
- 800ab5e: f001 faa4 bl 800c0aa <pbuf_clen>
- 800ab62: 4681 mov r9, r0
- if ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) {
- 800ab64: 4b6b ldr r3, [pc, #428] @ (800ad14 <ip4_reass+0x1f4>)
- 800ab66: 881b ldrh r3, [r3, #0]
- 800ab68: 4403 add r3, r0
- 800ab6a: 2b0a cmp r3, #10
- 800ab6c: dc02 bgt.n 800ab74 <ip4_reass+0x54>
- for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) {
- 800ab6e: 4b6a ldr r3, [pc, #424] @ (800ad18 <ip4_reass+0x1f8>)
- 800ab70: 681c ldr r4, [r3, #0]
- 800ab72: e00d b.n 800ab90 <ip4_reass+0x70>
- if (!ip_reass_remove_oldest_datagram(fraghdr, clen) ||
- 800ab74: 4601 mov r1, r0
- 800ab76: 4628 mov r0, r5
- 800ab78: f7ff fe46 bl 800a808 <ip_reass_remove_oldest_datagram>
- 800ab7c: 2800 cmp r0, #0
- 800ab7e: f000 80aa beq.w 800acd6 <ip4_reass+0x1b6>
- ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS))
- 800ab82: 4b64 ldr r3, [pc, #400] @ (800ad14 <ip4_reass+0x1f4>)
- 800ab84: 881b ldrh r3, [r3, #0]
- 800ab86: 444b add r3, r9
- if (!ip_reass_remove_oldest_datagram(fraghdr, clen) ||
- 800ab88: 2b0a cmp r3, #10
- 800ab8a: ddf0 ble.n 800ab6e <ip4_reass+0x4e>
- 800ab8c: e0a3 b.n 800acd6 <ip4_reass+0x1b6>
- for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) {
- 800ab8e: 6824 ldr r4, [r4, #0]
- 800ab90: b15c cbz r4, 800abaa <ip4_reass+0x8a>
- if (IP_ADDRESSES_AND_ID_MATCH(&ipr->iphdr, fraghdr)) {
- 800ab92: 6962 ldr r2, [r4, #20]
- 800ab94: 68eb ldr r3, [r5, #12]
- 800ab96: 429a cmp r2, r3
- 800ab98: d1f9 bne.n 800ab8e <ip4_reass+0x6e>
- 800ab9a: 69a2 ldr r2, [r4, #24]
- 800ab9c: 692b ldr r3, [r5, #16]
- 800ab9e: 429a cmp r2, r3
- 800aba0: d1f5 bne.n 800ab8e <ip4_reass+0x6e>
- 800aba2: 89a2 ldrh r2, [r4, #12]
- 800aba4: 88ab ldrh r3, [r5, #4]
- 800aba6: 429a cmp r2, r3
- 800aba8: d1f1 bne.n 800ab8e <ip4_reass+0x6e>
- if (ipr == NULL) {
- 800abaa: b374 cbz r4, 800ac0a <ip4_reass+0xea>
- if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) &&
- 800abac: 88e8 ldrh r0, [r5, #6]
- 800abae: f7fd f965 bl 8007e7c <lwip_htons>
- 800abb2: f3c0 000c ubfx r0, r0, #0, #13
- 800abb6: b380 cbz r0, 800ac1a <ip4_reass+0xfa>
- is_last = (IPH_OFFSET(fraghdr) & PP_NTOHS(IP_MF)) == 0;
- 800abb8: 88ed ldrh r5, [r5, #6]
- 800abba: f005 0520 and.w r5, r5, #32
- 800abbe: 2d00 cmp r5, #0
- 800abc0: bf0c ite eq
- 800abc2: 2201 moveq r2, #1
- 800abc4: 2200 movne r2, #0
- if (is_last) {
- 800abc6: d108 bne.n 800abda <ip4_reass+0xba>
- u16_t datagram_len = (u16_t)(offset + len);
- 800abc8: eb08 0307 add.w r3, r8, r7
- 800abcc: b29b uxth r3, r3
- if ((datagram_len < offset) || (datagram_len > (0xFFFF - IP_HLEN))) {
- 800abce: f64f 71eb movw r1, #65515 @ 0xffeb
- 800abd2: 428b cmp r3, r1
- 800abd4: bf98 it ls
- 800abd6: 4598 cmpls r8, r3
- 800abd8: d87a bhi.n 800acd0 <ip4_reass+0x1b0>
- valid = ip_reass_chain_frag_into_datagram_and_validate(ipr, p, is_last);
- 800abda: 4631 mov r1, r6
- 800abdc: 4620 mov r0, r4
- 800abde: f7ff fe83 bl 800a8e8 <ip_reass_chain_frag_into_datagram_and_validate>
- if (valid == IP_REASS_VALIDATE_PBUF_DROPPED) {
- 800abe2: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff
- 800abe6: d073 beq.n 800acd0 <ip4_reass+0x1b0>
- ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount + clen);
- 800abe8: 4b4a ldr r3, [pc, #296] @ (800ad14 <ip4_reass+0x1f4>)
- 800abea: 881a ldrh r2, [r3, #0]
- 800abec: 4491 add r9, r2
- 800abee: f8a3 9000 strh.w r9, [r3]
- if (is_last) {
- 800abf2: b935 cbnz r5, 800ac02 <ip4_reass+0xe2>
- u16_t datagram_len = (u16_t)(offset + len);
- 800abf4: 44b8 add r8, r7
- ipr->datagram_len = datagram_len;
- 800abf6: f8a4 801c strh.w r8, [r4, #28]
- ipr->flags |= IP_REASS_FLAG_LASTFRAG;
- 800abfa: 7fa3 ldrb r3, [r4, #30]
- 800abfc: f043 0301 orr.w r3, r3, #1
- 800ac00: 77a3 strb r3, [r4, #30]
- if (valid == IP_REASS_VALIDATE_TELEGRAM_FINISHED) {
- 800ac02: 2801 cmp r0, #1
- 800ac04: d01b beq.n 800ac3e <ip4_reass+0x11e>
- return NULL;
- 800ac06: 2600 movs r6, #0
- 800ac08: e069 b.n 800acde <ip4_reass+0x1be>
- ipr = ip_reass_enqueue_new_datagram(fraghdr, clen);
- 800ac0a: 4649 mov r1, r9
- 800ac0c: 4628 mov r0, r5
- 800ac0e: f7ff ff41 bl 800aa94 <ip_reass_enqueue_new_datagram>
- if (ipr == NULL) {
- 800ac12: 4604 mov r4, r0
- 800ac14: 2800 cmp r0, #0
- 800ac16: d1cf bne.n 800abb8 <ip4_reass+0x98>
- 800ac18: e05d b.n 800acd6 <ip4_reass+0x1b6>
- ((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) {
- 800ac1a: 89e0 ldrh r0, [r4, #14]
- 800ac1c: f7fd f92e bl 8007e7c <lwip_htons>
- if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) &&
- 800ac20: f3c0 000c ubfx r0, r0, #0, #13
- 800ac24: 2800 cmp r0, #0
- 800ac26: d0c7 beq.n 800abb8 <ip4_reass+0x98>
- SMEMCPY(&ipr->iphdr, fraghdr, IP_HLEN);
- 800ac28: 682b ldr r3, [r5, #0]
- 800ac2a: 6868 ldr r0, [r5, #4]
- 800ac2c: 68a9 ldr r1, [r5, #8]
- 800ac2e: 68ea ldr r2, [r5, #12]
- 800ac30: 60a3 str r3, [r4, #8]
- 800ac32: 60e0 str r0, [r4, #12]
- 800ac34: 6121 str r1, [r4, #16]
- 800ac36: 6162 str r2, [r4, #20]
- 800ac38: 692b ldr r3, [r5, #16]
- 800ac3a: 61a3 str r3, [r4, #24]
- 800ac3c: e7bc b.n 800abb8 <ip4_reass+0x98>
- u16_t datagram_len = (u16_t)(ipr->datagram_len + IP_HLEN);
- 800ac3e: 8ba0 ldrh r0, [r4, #28]
- 800ac40: 3014 adds r0, #20
- r = ((struct ip_reass_helper *)ipr->p->payload)->next_pbuf;
- 800ac42: 6863 ldr r3, [r4, #4]
- 800ac44: 685e ldr r6, [r3, #4]
- 800ac46: 6835 ldr r5, [r6, #0]
- SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN);
- 800ac48: 68a3 ldr r3, [r4, #8]
- 800ac4a: 68e7 ldr r7, [r4, #12]
- 800ac4c: 6921 ldr r1, [r4, #16]
- 800ac4e: 6962 ldr r2, [r4, #20]
- 800ac50: 6033 str r3, [r6, #0]
- 800ac52: 6077 str r7, [r6, #4]
- 800ac54: 60b1 str r1, [r6, #8]
- 800ac56: 60f2 str r2, [r6, #12]
- 800ac58: 69a3 ldr r3, [r4, #24]
- 800ac5a: 6133 str r3, [r6, #16]
- IPH_LEN_SET(fraghdr, lwip_htons(datagram_len));
- 800ac5c: b280 uxth r0, r0
- 800ac5e: f7fd f90d bl 8007e7c <lwip_htons>
- 800ac62: 8070 strh r0, [r6, #2]
- IPH_OFFSET_SET(fraghdr, 0);
- 800ac64: 2300 movs r3, #0
- 800ac66: 71b3 strb r3, [r6, #6]
- 800ac68: 71f3 strb r3, [r6, #7]
- IPH_CHKSUM_SET(fraghdr, 0);
- 800ac6a: 72b3 strb r3, [r6, #10]
- 800ac6c: 72f3 strb r3, [r6, #11]
- p = ipr->p;
- 800ac6e: 6866 ldr r6, [r4, #4]
- while (r != NULL) {
- 800ac70: e009 b.n 800ac86 <ip4_reass+0x166>
- iprh = (struct ip_reass_helper *)r->payload;
- 800ac72: 686f ldr r7, [r5, #4]
- pbuf_remove_header(r, IP_HLEN);
- 800ac74: 2114 movs r1, #20
- 800ac76: 4628 mov r0, r5
- 800ac78: f001 f84c bl 800bd14 <pbuf_remove_header>
- pbuf_cat(p, r);
- 800ac7c: 4629 mov r1, r5
- 800ac7e: 4630 mov r0, r6
- 800ac80: f001 fa38 bl 800c0f4 <pbuf_cat>
- r = iprh->next_pbuf;
- 800ac84: 683d ldr r5, [r7, #0]
- while (r != NULL) {
- 800ac86: 2d00 cmp r5, #0
- 800ac88: d1f3 bne.n 800ac72 <ip4_reass+0x152>
- if (ipr == reassdatagrams) {
- 800ac8a: 4b23 ldr r3, [pc, #140] @ (800ad18 <ip4_reass+0x1f8>)
- 800ac8c: 6819 ldr r1, [r3, #0]
- 800ac8e: 428c cmp r4, r1
- 800ac90: d005 beq.n 800ac9e <ip4_reass+0x17e>
- for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) {
- 800ac92: b129 cbz r1, 800aca0 <ip4_reass+0x180>
- if (ipr_prev->next == ipr) {
- 800ac94: 680b ldr r3, [r1, #0]
- 800ac96: 429c cmp r4, r3
- 800ac98: d002 beq.n 800aca0 <ip4_reass+0x180>
- for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) {
- 800ac9a: 4619 mov r1, r3
- 800ac9c: e7f9 b.n 800ac92 <ip4_reass+0x172>
- ipr_prev = NULL;
- 800ac9e: 4629 mov r1, r5
- ip_reass_dequeue_datagram(ipr, ipr_prev);
- 800aca0: 4620 mov r0, r4
- 800aca2: f7ff fd0f bl 800a6c4 <ip_reass_dequeue_datagram>
- clen = pbuf_clen(p);
- 800aca6: 4630 mov r0, r6
- 800aca8: f001 f9ff bl 800c0aa <pbuf_clen>
- 800acac: 4604 mov r4, r0
- LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen);
- 800acae: 4b19 ldr r3, [pc, #100] @ (800ad14 <ip4_reass+0x1f4>)
- 800acb0: 881b ldrh r3, [r3, #0]
- 800acb2: 4283 cmp r3, r0
- 800acb4: d304 bcc.n 800acc0 <ip4_reass+0x1a0>
- ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - clen);
- 800acb6: 4a17 ldr r2, [pc, #92] @ (800ad14 <ip4_reass+0x1f4>)
- 800acb8: 8813 ldrh r3, [r2, #0]
- 800acba: 1b1b subs r3, r3, r4
- 800acbc: 8013 strh r3, [r2, #0]
- return p;
- 800acbe: e00e b.n 800acde <ip4_reass+0x1be>
- LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen);
- 800acc0: 4b16 ldr r3, [pc, #88] @ (800ad1c <ip4_reass+0x1fc>)
- 800acc2: f240 229b movw r2, #667 @ 0x29b
- 800acc6: 4916 ldr r1, [pc, #88] @ (800ad20 <ip4_reass+0x200>)
- 800acc8: 4816 ldr r0, [pc, #88] @ (800ad24 <ip4_reass+0x204>)
- 800acca: f008 fb9d bl 8013408 <iprintf>
- 800acce: e7f2 b.n 800acb6 <ip4_reass+0x196>
- LWIP_ASSERT("ipr != NULL", ipr != NULL);
- 800acd0: b144 cbz r4, 800ace4 <ip4_reass+0x1c4>
- if (ipr->p == NULL) {
- 800acd2: 6863 ldr r3, [r4, #4]
- 800acd4: b173 cbz r3, 800acf4 <ip4_reass+0x1d4>
- pbuf_free(p);
- 800acd6: 4630 mov r0, r6
- 800acd8: f001 f862 bl 800bda0 <pbuf_free>
- return NULL;
- 800acdc: 2600 movs r6, #0
- }
- 800acde: 4630 mov r0, r6
- 800ace0: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
- LWIP_ASSERT("ipr != NULL", ipr != NULL);
- 800ace4: 4b0d ldr r3, [pc, #52] @ (800ad1c <ip4_reass+0x1fc>)
- 800ace6: f44f 722a mov.w r2, #680 @ 0x2a8
- 800acea: 490f ldr r1, [pc, #60] @ (800ad28 <ip4_reass+0x208>)
- 800acec: 480d ldr r0, [pc, #52] @ (800ad24 <ip4_reass+0x204>)
- 800acee: f008 fb8b bl 8013408 <iprintf>
- 800acf2: e7ee b.n 800acd2 <ip4_reass+0x1b2>
- LWIP_ASSERT("not firstalthough just enqueued", ipr == reassdatagrams);
- 800acf4: 4b08 ldr r3, [pc, #32] @ (800ad18 <ip4_reass+0x1f8>)
- 800acf6: 681b ldr r3, [r3, #0]
- 800acf8: 429c cmp r4, r3
- 800acfa: d006 beq.n 800ad0a <ip4_reass+0x1ea>
- 800acfc: 4b07 ldr r3, [pc, #28] @ (800ad1c <ip4_reass+0x1fc>)
- 800acfe: f240 22ab movw r2, #683 @ 0x2ab
- 800ad02: 490a ldr r1, [pc, #40] @ (800ad2c <ip4_reass+0x20c>)
- 800ad04: 4807 ldr r0, [pc, #28] @ (800ad24 <ip4_reass+0x204>)
- 800ad06: f008 fb7f bl 8013408 <iprintf>
- ip_reass_dequeue_datagram(ipr, NULL);
- 800ad0a: 2100 movs r1, #0
- 800ad0c: 4620 mov r0, r4
- 800ad0e: f7ff fcd9 bl 800a6c4 <ip_reass_dequeue_datagram>
- 800ad12: e7e0 b.n 800acd6 <ip4_reass+0x1b6>
- 800ad14: 24013048 .word 0x24013048
- 800ad18: 2401304c .word 0x2401304c
- 800ad1c: 080156dc .word 0x080156dc
- 800ad20: 0801585c .word 0x0801585c
- 800ad24: 080144e8 .word 0x080144e8
- 800ad28: 08015878 .word 0x08015878
- 800ad2c: 08015884 .word 0x08015884
- 0800ad30 <ip4_frag>:
- *
- * @return ERR_OK if sent successfully, err_t otherwise
- */
- err_t
- ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest)
- {
- 800ad30: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 800ad34: b08b sub sp, #44 @ 0x2c
- 800ad36: 4606 mov r6, r0
- 800ad38: 9107 str r1, [sp, #28]
- 800ad3a: 9208 str r2, [sp, #32]
- u16_t newpbuflen = 0;
- 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);
- 800ad3c: 8d0b ldrh r3, [r1, #40] @ 0x28
- 800ad3e: 3b14 subs r3, #20
- 800ad40: d44e bmi.n 800ade0 <ip4_frag+0xb0>
- 800ad42: f3c3 03cf ubfx r3, r3, #3, #16
- 800ad46: 9305 str r3, [sp, #20]
- int last;
- u16_t poff = IP_HLEN;
- u16_t tmp;
- int mf_set;
- original_iphdr = (struct ip_hdr *)p->payload;
- 800ad48: f8d6 b004 ldr.w fp, [r6, #4]
- iphdr = original_iphdr;
- if (IPH_HL_BYTES(iphdr) != IP_HLEN) {
- 800ad4c: f89b 3000 ldrb.w r3, [fp]
- 800ad50: f003 030f and.w r3, r3, #15
- 800ad54: 2b05 cmp r3, #5
- 800ad56: f040 80da bne.w 800af0e <ip4_frag+0x1de>
- /* ip4_frag() does not support IP options */
- return ERR_VAL;
- }
- LWIP_ERROR("ip4_frag(): pbuf too short", p->len >= IP_HLEN, return ERR_VAL);
- 800ad5a: 8973 ldrh r3, [r6, #10]
- 800ad5c: 2b13 cmp r3, #19
- 800ad5e: d941 bls.n 800ade4 <ip4_frag+0xb4>
- /* Save original offset */
- tmp = lwip_ntohs(IPH_OFFSET(iphdr));
- 800ad60: f8bb 0006 ldrh.w r0, [fp, #6]
- 800ad64: f7fd f88a bl 8007e7c <lwip_htons>
- ofo = tmp & IP_OFFMASK;
- 800ad68: f3c0 030c ubfx r3, r0, #0, #13
- 800ad6c: 9306 str r3, [sp, #24]
- /* already fragmented? if so, the last fragment we create must have MF, too */
- mf_set = tmp & IP_MF;
- 800ad6e: f400 5300 and.w r3, r0, #8192 @ 0x2000
- 800ad72: 9309 str r3, [sp, #36] @ 0x24
- left = (u16_t)(p->tot_len - IP_HLEN);
- 800ad74: 8933 ldrh r3, [r6, #8]
- 800ad76: 3b14 subs r3, #20
- 800ad78: fa1f f883 uxth.w r8, r3
- u16_t poff = IP_HLEN;
- 800ad7c: 2714 movs r7, #20
- u16_t newpbuflen = 0;
- 800ad7e: 2400 movs r4, #0
- 800ad80: f8cd 800c str.w r8, [sp, #12]
- while (left) {
- 800ad84: 9b03 ldr r3, [sp, #12]
- 800ad86: 2b00 cmp r3, #0
- 800ad88: f000 80bf beq.w 800af0a <ip4_frag+0x1da>
- /* Fill this fragment */
- fragsize = LWIP_MIN(left, (u16_t)(nfb * 8));
- 800ad8c: 9b05 ldr r3, [sp, #20]
- 800ad8e: 00db lsls r3, r3, #3
- 800ad90: b29b uxth r3, r3
- 800ad92: 9a03 ldr r2, [sp, #12]
- 800ad94: 4293 cmp r3, r2
- 800ad96: bf28 it cs
- 800ad98: 4613 movcs r3, r2
- 800ad9a: 9304 str r3, [sp, #16]
- /* 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);
- 800ad9c: f44f 7220 mov.w r2, #640 @ 0x280
- 800ada0: 2114 movs r1, #20
- 800ada2: 200e movs r0, #14
- 800ada4: f001 f864 bl 800be70 <pbuf_alloc>
- if (rambuf == NULL) {
- 800ada8: 4681 mov r9, r0
- 800adaa: 2800 cmp r0, #0
- 800adac: f000 80b2 beq.w 800af14 <ip4_frag+0x1e4>
- goto memerr;
- }
- LWIP_ASSERT("this needs a pbuf in one piece!",
- 800adb0: 8943 ldrh r3, [r0, #10]
- 800adb2: 2b13 cmp r3, #19
- 800adb4: d920 bls.n 800adf8 <ip4_frag+0xc8>
- (rambuf->len >= (IP_HLEN)));
- SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN);
- 800adb6: f8d9 3004 ldr.w r3, [r9, #4]
- 800adba: f8db 2000 ldr.w r2, [fp]
- 800adbe: f8db 5004 ldr.w r5, [fp, #4]
- 800adc2: f8db 0008 ldr.w r0, [fp, #8]
- 800adc6: f8db 100c ldr.w r1, [fp, #12]
- 800adca: 601a str r2, [r3, #0]
- 800adcc: 605d str r5, [r3, #4]
- 800adce: 6098 str r0, [r3, #8]
- 800add0: 60d9 str r1, [r3, #12]
- 800add2: f8db 2010 ldr.w r2, [fp, #16]
- 800add6: 611a str r2, [r3, #16]
- iphdr = (struct ip_hdr *)rambuf->payload;
- 800add8: f8d9 a004 ldr.w sl, [r9, #4]
- left_to_copy = fragsize;
- 800addc: 9d04 ldr r5, [sp, #16]
- while (left_to_copy) {
- 800adde: e03c b.n 800ae5a <ip4_frag+0x12a>
- const u16_t nfb = (u16_t)((netif->mtu - IP_HLEN) / 8);
- 800ade0: 3307 adds r3, #7
- 800ade2: e7ae b.n 800ad42 <ip4_frag+0x12>
- LWIP_ERROR("ip4_frag(): pbuf too short", p->len >= IP_HLEN, return ERR_VAL);
- 800ade4: 4b4d ldr r3, [pc, #308] @ (800af1c <ip4_frag+0x1ec>)
- 800ade6: f44f 723f mov.w r2, #764 @ 0x2fc
- 800adea: 494d ldr r1, [pc, #308] @ (800af20 <ip4_frag+0x1f0>)
- 800adec: 484d ldr r0, [pc, #308] @ (800af24 <ip4_frag+0x1f4>)
- 800adee: f008 fb0b bl 8013408 <iprintf>
- 800adf2: f06f 0005 mvn.w r0, #5
- 800adf6: e043 b.n 800ae80 <ip4_frag+0x150>
- LWIP_ASSERT("this needs a pbuf in one piece!",
- 800adf8: 4b48 ldr r3, [pc, #288] @ (800af1c <ip4_frag+0x1ec>)
- 800adfa: f44f 7249 mov.w r2, #804 @ 0x324
- 800adfe: 494a ldr r1, [pc, #296] @ (800af28 <ip4_frag+0x1f8>)
- 800ae00: 4848 ldr r0, [pc, #288] @ (800af24 <ip4_frag+0x1f4>)
- 800ae02: f008 fb01 bl 8013408 <iprintf>
- 800ae06: e7d6 b.n 800adb6 <ip4_frag+0x86>
- struct pbuf_custom_ref *pcr;
- u16_t plen = (u16_t)(p->len - poff);
- LWIP_ASSERT("p->len >= poff", p->len >= poff);
- 800ae08: 4b44 ldr r3, [pc, #272] @ (800af1c <ip4_frag+0x1ec>)
- 800ae0a: f240 322d movw r2, #813 @ 0x32d
- 800ae0e: 4947 ldr r1, [pc, #284] @ (800af2c <ip4_frag+0x1fc>)
- 800ae10: 4844 ldr r0, [pc, #272] @ (800af24 <ip4_frag+0x1f4>)
- 800ae12: f008 faf9 bl 8013408 <iprintf>
- 800ae16: e026 b.n 800ae66 <ip4_frag+0x136>
- if (!newpbuflen) {
- poff = 0;
- p = p->next;
- continue;
- }
- pcr = ip_frag_alloc_pbuf_custom_ref();
- 800ae18: f7ff fe36 bl 800aa88 <ip_frag_alloc_pbuf_custom_ref>
- if (pcr == NULL) {
- 800ae1c: 4680 mov r8, r0
- 800ae1e: b350 cbz r0, 800ae76 <ip4_frag+0x146>
- pbuf_free(rambuf);
- goto memerr;
- }
- /* Mirror this pbuf, although we might not need all of it. */
- newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc,
- (u8_t *)p->payload + poff, newpbuflen);
- 800ae20: 6873 ldr r3, [r6, #4]
- newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc,
- 800ae22: 9401 str r4, [sp, #4]
- 800ae24: 443b add r3, r7
- 800ae26: 9300 str r3, [sp, #0]
- 800ae28: 4603 mov r3, r0
- 800ae2a: 2241 movs r2, #65 @ 0x41
- 800ae2c: 4621 mov r1, r4
- 800ae2e: 2000 movs r0, #0
- 800ae30: f000 ff4c bl 800bccc <pbuf_alloced_custom>
- if (newpbuf == NULL) {
- 800ae34: 9002 str r0, [sp, #8]
- 800ae36: b330 cbz r0, 800ae86 <ip4_frag+0x156>
- ip_frag_free_pbuf_custom_ref(pcr);
- pbuf_free(rambuf);
- goto memerr;
- }
- pbuf_ref(p);
- 800ae38: 4630 mov r0, r6
- 800ae3a: f001 f93f bl 800c0bc <pbuf_ref>
- pcr->original = p;
- 800ae3e: f8c8 6014 str.w r6, [r8, #20]
- pcr->pc.custom_free_function = ipfrag_free_pbuf_custom;
- 800ae42: 4b3b ldr r3, [pc, #236] @ (800af30 <ip4_frag+0x200>)
- 800ae44: f8c8 3010 str.w r3, [r8, #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);
- 800ae48: 9902 ldr r1, [sp, #8]
- 800ae4a: 4648 mov r0, r9
- 800ae4c: f001 f952 bl 800c0f4 <pbuf_cat>
- left_to_copy = (u16_t)(left_to_copy - newpbuflen);
- 800ae50: 1b2d subs r5, r5, r4
- 800ae52: b2ad uxth r5, r5
- if (left_to_copy) {
- 800ae54: b10d cbz r5, 800ae5a <ip4_frag+0x12a>
- poff = 0;
- p = p->next;
- 800ae56: 6836 ldr r6, [r6, #0]
- poff = 0;
- 800ae58: 2700 movs r7, #0
- while (left_to_copy) {
- 800ae5a: b1ed cbz r5, 800ae98 <ip4_frag+0x168>
- u16_t plen = (u16_t)(p->len - poff);
- 800ae5c: 8973 ldrh r3, [r6, #10]
- 800ae5e: 1bdc subs r4, r3, r7
- 800ae60: b2a4 uxth r4, r4
- LWIP_ASSERT("p->len >= poff", p->len >= poff);
- 800ae62: 42bb cmp r3, r7
- 800ae64: d3d0 bcc.n 800ae08 <ip4_frag+0xd8>
- newpbuflen = LWIP_MIN(left_to_copy, plen);
- 800ae66: 42ac cmp r4, r5
- 800ae68: bf28 it cs
- 800ae6a: 462c movcs r4, r5
- if (!newpbuflen) {
- 800ae6c: 2c00 cmp r4, #0
- 800ae6e: d1d3 bne.n 800ae18 <ip4_frag+0xe8>
- p = p->next;
- 800ae70: 6836 ldr r6, [r6, #0]
- poff = 0;
- 800ae72: 4627 mov r7, r4
- continue;
- 800ae74: e7f1 b.n 800ae5a <ip4_frag+0x12a>
- pbuf_free(rambuf);
- 800ae76: 4648 mov r0, r9
- 800ae78: f000 ff92 bl 800bda0 <pbuf_free>
- }
- MIB2_STATS_INC(mib2.ipfragoks);
- return ERR_OK;
- memerr:
- MIB2_STATS_INC(mib2.ipfragfails);
- return ERR_MEM;
- 800ae7c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- }
- 800ae80: b00b add sp, #44 @ 0x2c
- 800ae82: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
- ip_frag_free_pbuf_custom_ref(pcr);
- 800ae86: 4640 mov r0, r8
- 800ae88: f7ff fcfe bl 800a888 <ip_frag_free_pbuf_custom_ref>
- pbuf_free(rambuf);
- 800ae8c: 4648 mov r0, r9
- 800ae8e: f000 ff87 bl 800bda0 <pbuf_free>
- return ERR_MEM;
- 800ae92: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- goto memerr;
- 800ae96: e7f3 b.n 800ae80 <ip4_frag+0x150>
- poff = (u16_t)(poff + newpbuflen);
- 800ae98: 4427 add r7, r4
- 800ae9a: b2bf uxth r7, r7
- last = (left <= netif->mtu - IP_HLEN);
- 800ae9c: 9b07 ldr r3, [sp, #28]
- 800ae9e: 8d1a ldrh r2, [r3, #40] @ 0x28
- 800aea0: 3a13 subs r2, #19
- tmp = (IP_OFFMASK & (ofo));
- 800aea2: 9b06 ldr r3, [sp, #24]
- 800aea4: f3c3 000c ubfx r0, r3, #0, #13
- if (!last || mf_set) {
- 800aea8: 9b09 ldr r3, [sp, #36] @ 0x24
- 800aeaa: 3b00 subs r3, #0
- 800aeac: bf18 it ne
- 800aeae: 2301 movne r3, #1
- 800aeb0: 9903 ldr r1, [sp, #12]
- 800aeb2: 428a cmp r2, r1
- 800aeb4: bfd8 it le
- 800aeb6: f043 0301 orrle.w r3, r3, #1
- 800aeba: b10b cbz r3, 800aec0 <ip4_frag+0x190>
- tmp = tmp | IP_MF;
- 800aebc: f440 5000 orr.w r0, r0, #8192 @ 0x2000
- IPH_OFFSET_SET(iphdr, lwip_htons(tmp));
- 800aec0: f7fc ffdc bl 8007e7c <lwip_htons>
- 800aec4: f8aa 0006 strh.w r0, [sl, #6]
- IPH_LEN_SET(iphdr, lwip_htons((u16_t)(fragsize + IP_HLEN)));
- 800aec8: 9d04 ldr r5, [sp, #16]
- 800aeca: f105 0014 add.w r0, r5, #20
- 800aece: b280 uxth r0, r0
- 800aed0: f7fc ffd4 bl 8007e7c <lwip_htons>
- 800aed4: f8aa 0002 strh.w r0, [sl, #2]
- IPH_CHKSUM_SET(iphdr, 0);
- 800aed8: 2300 movs r3, #0
- 800aeda: f88a 300a strb.w r3, [sl, #10]
- 800aede: f88a 300b strb.w r3, [sl, #11]
- netif->output(netif, rambuf, dest);
- 800aee2: 9807 ldr r0, [sp, #28]
- 800aee4: 6943 ldr r3, [r0, #20]
- 800aee6: 9a08 ldr r2, [sp, #32]
- 800aee8: 4649 mov r1, r9
- 800aeea: 4798 blx r3
- pbuf_free(rambuf);
- 800aeec: 4648 mov r0, r9
- 800aeee: f000 ff57 bl 800bda0 <pbuf_free>
- left = (u16_t)(left - fragsize);
- 800aef2: 9b03 ldr r3, [sp, #12]
- 800aef4: eba3 0a05 sub.w sl, r3, r5
- 800aef8: fa1f f38a uxth.w r3, sl
- 800aefc: 9303 str r3, [sp, #12]
- ofo = (u16_t)(ofo + nfb);
- 800aefe: 9b06 ldr r3, [sp, #24]
- 800af00: 9a05 ldr r2, [sp, #20]
- 800af02: 4413 add r3, r2
- 800af04: b29b uxth r3, r3
- 800af06: 9306 str r3, [sp, #24]
- 800af08: e73c b.n 800ad84 <ip4_frag+0x54>
- return ERR_OK;
- 800af0a: 2000 movs r0, #0
- 800af0c: e7b8 b.n 800ae80 <ip4_frag+0x150>
- return ERR_VAL;
- 800af0e: f06f 0005 mvn.w r0, #5
- 800af12: e7b5 b.n 800ae80 <ip4_frag+0x150>
- return ERR_MEM;
- 800af14: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800af18: e7b2 b.n 800ae80 <ip4_frag+0x150>
- 800af1a: bf00 nop
- 800af1c: 080156dc .word 0x080156dc
- 800af20: 080158a4 .word 0x080158a4
- 800af24: 080144e8 .word 0x080144e8
- 800af28: 080158c0 .word 0x080158c0
- 800af2c: 080158e0 .word 0x080158e0
- 800af30: 0800a8b5 .word 0x0800a8b5
- 0800af34 <ptr_to_mem>:
- #endif /* MEM_OVERFLOW_CHECK */
- static struct mem *
- ptr_to_mem(mem_size_t ptr)
- {
- return (struct mem *)(void *)&ram[ptr];
- 800af34: 4b01 ldr r3, [pc, #4] @ (800af3c <ptr_to_mem+0x8>)
- 800af36: 681b ldr r3, [r3, #0]
- }
- 800af38: 4418 add r0, r3
- 800af3a: 4770 bx lr
- 800af3c: 2401305c .word 0x2401305c
- 0800af40 <mem_to_ptr>:
- static mem_size_t
- mem_to_ptr(void *mem)
- {
- return (mem_size_t)((u8_t *)mem - ram);
- 800af40: 4b01 ldr r3, [pc, #4] @ (800af48 <mem_to_ptr+0x8>)
- 800af42: 681b ldr r3, [r3, #0]
- }
- 800af44: 1ac0 subs r0, r0, r3
- 800af46: 4770 bx lr
- 800af48: 2401305c .word 0x2401305c
- 0800af4c <mem_link_valid>:
- /* Check if a struct mem is correctly linked.
- * If not, double-free is a possible reason.
- */
- static int
- mem_link_valid(struct mem *mem)
- {
- 800af4c: b5f8 push {r3, r4, r5, r6, r7, lr}
- 800af4e: 4604 mov r4, r0
- struct mem *nmem, *pmem;
- mem_size_t rmem_idx;
- rmem_idx = mem_to_ptr(mem);
- 800af50: f7ff fff6 bl 800af40 <mem_to_ptr>
- 800af54: 4605 mov r5, r0
- nmem = ptr_to_mem(mem->next);
- 800af56: 6826 ldr r6, [r4, #0]
- 800af58: 4630 mov r0, r6
- 800af5a: f7ff ffeb bl 800af34 <ptr_to_mem>
- 800af5e: 4607 mov r7, r0
- pmem = ptr_to_mem(mem->prev);
- 800af60: 6864 ldr r4, [r4, #4]
- 800af62: 4620 mov r0, r4
- 800af64: f7ff ffe6 bl 800af34 <ptr_to_mem>
- if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) ||
- 800af68: 4b0e ldr r3, [pc, #56] @ (800afa4 <mem_link_valid+0x58>)
- 800af6a: 429e cmp r6, r3
- 800af6c: d80f bhi.n 800af8e <mem_link_valid+0x42>
- 800af6e: 429c cmp r4, r3
- 800af70: d80f bhi.n 800af92 <mem_link_valid+0x46>
- 800af72: 42ac cmp r4, r5
- 800af74: d002 beq.n 800af7c <mem_link_valid+0x30>
- ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
- 800af76: 6803 ldr r3, [r0, #0]
- 800af78: 42ab cmp r3, r5
- 800af7a: d10c bne.n 800af96 <mem_link_valid+0x4a>
- ((nmem != ram_end) && (nmem->prev != rmem_idx))) {
- 800af7c: 4b0a ldr r3, [pc, #40] @ (800afa8 <mem_link_valid+0x5c>)
- 800af7e: 681b ldr r3, [r3, #0]
- ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
- 800af80: 42bb cmp r3, r7
- 800af82: d00a beq.n 800af9a <mem_link_valid+0x4e>
- ((nmem != ram_end) && (nmem->prev != rmem_idx))) {
- 800af84: 687b ldr r3, [r7, #4]
- 800af86: 42ab cmp r3, r5
- 800af88: d109 bne.n 800af9e <mem_link_valid+0x52>
- return 0;
- }
- return 1;
- 800af8a: 2001 movs r0, #1
- 800af8c: e000 b.n 800af90 <mem_link_valid+0x44>
- return 0;
- 800af8e: 2000 movs r0, #0
- }
- 800af90: bdf8 pop {r3, r4, r5, r6, r7, pc}
- return 0;
- 800af92: 2000 movs r0, #0
- 800af94: e7fc b.n 800af90 <mem_link_valid+0x44>
- 800af96: 2000 movs r0, #0
- 800af98: e7fa b.n 800af90 <mem_link_valid+0x44>
- return 1;
- 800af9a: 2001 movs r0, #1
- 800af9c: e7f8 b.n 800af90 <mem_link_valid+0x44>
- return 0;
- 800af9e: 2000 movs r0, #0
- 800afa0: e7f6 b.n 800af90 <mem_link_valid+0x44>
- 800afa2: bf00 nop
- 800afa4: 0001ffe8 .word 0x0001ffe8
- 800afa8: 24013058 .word 0x24013058
- 0800afac <plug_holes>:
- {
- 800afac: b538 push {r3, r4, r5, lr}
- 800afae: 4604 mov r4, r0
- LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram);
- 800afb0: 4b34 ldr r3, [pc, #208] @ (800b084 <plug_holes+0xd8>)
- 800afb2: 681b ldr r3, [r3, #0]
- 800afb4: 4283 cmp r3, r0
- 800afb6: d83e bhi.n 800b036 <plug_holes+0x8a>
- LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end);
- 800afb8: 4b33 ldr r3, [pc, #204] @ (800b088 <plug_holes+0xdc>)
- 800afba: 681b ldr r3, [r3, #0]
- 800afbc: 42a3 cmp r3, r4
- 800afbe: d942 bls.n 800b046 <plug_holes+0x9a>
- LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0);
- 800afc0: 7a23 ldrb r3, [r4, #8]
- 800afc2: 2b00 cmp r3, #0
- 800afc4: d147 bne.n 800b056 <plug_holes+0xaa>
- LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED);
- 800afc6: 6822 ldr r2, [r4, #0]
- 800afc8: 4b30 ldr r3, [pc, #192] @ (800b08c <plug_holes+0xe0>)
- 800afca: 429a cmp r2, r3
- 800afcc: d84b bhi.n 800b066 <plug_holes+0xba>
- nmem = ptr_to_mem(mem->next);
- 800afce: 6820 ldr r0, [r4, #0]
- 800afd0: f7ff ffb0 bl 800af34 <ptr_to_mem>
- if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) {
- 800afd4: 4284 cmp r4, r0
- 800afd6: d015 beq.n 800b004 <plug_holes+0x58>
- 800afd8: 7a03 ldrb r3, [r0, #8]
- 800afda: b99b cbnz r3, 800b004 <plug_holes+0x58>
- 800afdc: 4b2a ldr r3, [pc, #168] @ (800b088 <plug_holes+0xdc>)
- 800afde: 681b ldr r3, [r3, #0]
- 800afe0: 4283 cmp r3, r0
- 800afe2: d00f beq.n 800b004 <plug_holes+0x58>
- if (lfree == nmem) {
- 800afe4: 4b2a ldr r3, [pc, #168] @ (800b090 <plug_holes+0xe4>)
- 800afe6: 681b ldr r3, [r3, #0]
- 800afe8: 4283 cmp r3, r0
- 800afea: d044 beq.n 800b076 <plug_holes+0xca>
- mem->next = nmem->next;
- 800afec: 6800 ldr r0, [r0, #0]
- 800afee: 6020 str r0, [r4, #0]
- if (nmem->next != MEM_SIZE_ALIGNED) {
- 800aff0: 4b26 ldr r3, [pc, #152] @ (800b08c <plug_holes+0xe0>)
- 800aff2: 4298 cmp r0, r3
- 800aff4: d006 beq.n 800b004 <plug_holes+0x58>
- ptr_to_mem(nmem->next)->prev = mem_to_ptr(mem);
- 800aff6: f7ff ff9d bl 800af34 <ptr_to_mem>
- 800affa: 4605 mov r5, r0
- 800affc: 4620 mov r0, r4
- 800affe: f7ff ff9f bl 800af40 <mem_to_ptr>
- 800b002: 6068 str r0, [r5, #4]
- pmem = ptr_to_mem(mem->prev);
- 800b004: 6860 ldr r0, [r4, #4]
- 800b006: f7ff ff95 bl 800af34 <ptr_to_mem>
- 800b00a: 4605 mov r5, r0
- if (pmem != mem && pmem->used == 0) {
- 800b00c: 4284 cmp r4, r0
- 800b00e: d011 beq.n 800b034 <plug_holes+0x88>
- 800b010: 7a03 ldrb r3, [r0, #8]
- 800b012: b97b cbnz r3, 800b034 <plug_holes+0x88>
- if (lfree == mem) {
- 800b014: 4b1e ldr r3, [pc, #120] @ (800b090 <plug_holes+0xe4>)
- 800b016: 681b ldr r3, [r3, #0]
- 800b018: 42a3 cmp r3, r4
- 800b01a: d02f beq.n 800b07c <plug_holes+0xd0>
- pmem->next = mem->next;
- 800b01c: 6820 ldr r0, [r4, #0]
- 800b01e: 6028 str r0, [r5, #0]
- if (mem->next != MEM_SIZE_ALIGNED) {
- 800b020: 4b1a ldr r3, [pc, #104] @ (800b08c <plug_holes+0xe0>)
- 800b022: 4298 cmp r0, r3
- 800b024: d006 beq.n 800b034 <plug_holes+0x88>
- ptr_to_mem(mem->next)->prev = mem_to_ptr(pmem);
- 800b026: f7ff ff85 bl 800af34 <ptr_to_mem>
- 800b02a: 4604 mov r4, r0
- 800b02c: 4628 mov r0, r5
- 800b02e: f7ff ff87 bl 800af40 <mem_to_ptr>
- 800b032: 6060 str r0, [r4, #4]
- }
- 800b034: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram);
- 800b036: 4b17 ldr r3, [pc, #92] @ (800b094 <plug_holes+0xe8>)
- 800b038: f240 12df movw r2, #479 @ 0x1df
- 800b03c: 4916 ldr r1, [pc, #88] @ (800b098 <plug_holes+0xec>)
- 800b03e: 4817 ldr r0, [pc, #92] @ (800b09c <plug_holes+0xf0>)
- 800b040: f008 f9e2 bl 8013408 <iprintf>
- 800b044: e7b8 b.n 800afb8 <plug_holes+0xc>
- LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end);
- 800b046: 4b13 ldr r3, [pc, #76] @ (800b094 <plug_holes+0xe8>)
- 800b048: f44f 72f0 mov.w r2, #480 @ 0x1e0
- 800b04c: 4914 ldr r1, [pc, #80] @ (800b0a0 <plug_holes+0xf4>)
- 800b04e: 4813 ldr r0, [pc, #76] @ (800b09c <plug_holes+0xf0>)
- 800b050: f008 f9da bl 8013408 <iprintf>
- 800b054: e7b4 b.n 800afc0 <plug_holes+0x14>
- LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0);
- 800b056: 4b0f ldr r3, [pc, #60] @ (800b094 <plug_holes+0xe8>)
- 800b058: f240 12e1 movw r2, #481 @ 0x1e1
- 800b05c: 4911 ldr r1, [pc, #68] @ (800b0a4 <plug_holes+0xf8>)
- 800b05e: 480f ldr r0, [pc, #60] @ (800b09c <plug_holes+0xf0>)
- 800b060: f008 f9d2 bl 8013408 <iprintf>
- 800b064: e7af b.n 800afc6 <plug_holes+0x1a>
- LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED);
- 800b066: 4b0b ldr r3, [pc, #44] @ (800b094 <plug_holes+0xe8>)
- 800b068: f44f 72f2 mov.w r2, #484 @ 0x1e4
- 800b06c: 490e ldr r1, [pc, #56] @ (800b0a8 <plug_holes+0xfc>)
- 800b06e: 480b ldr r0, [pc, #44] @ (800b09c <plug_holes+0xf0>)
- 800b070: f008 f9ca bl 8013408 <iprintf>
- 800b074: e7ab b.n 800afce <plug_holes+0x22>
- lfree = mem;
- 800b076: 4b06 ldr r3, [pc, #24] @ (800b090 <plug_holes+0xe4>)
- 800b078: 601c str r4, [r3, #0]
- 800b07a: e7b7 b.n 800afec <plug_holes+0x40>
- lfree = pmem;
- 800b07c: 4b04 ldr r3, [pc, #16] @ (800b090 <plug_holes+0xe4>)
- 800b07e: 6018 str r0, [r3, #0]
- 800b080: e7cc b.n 800b01c <plug_holes+0x70>
- 800b082: bf00 nop
- 800b084: 2401305c .word 0x2401305c
- 800b088: 24013058 .word 0x24013058
- 800b08c: 0001ffe8 .word 0x0001ffe8
- 800b090: 24013050 .word 0x24013050
- 800b094: 080158f0 .word 0x080158f0
- 800b098: 08015950 .word 0x08015950
- 800b09c: 080144e8 .word 0x080144e8
- 800b0a0: 08015968 .word 0x08015968
- 800b0a4: 08015984 .word 0x08015984
- 800b0a8: 080159a0 .word 0x080159a0
- 0800b0ac <mem_init>:
- {
- 800b0ac: b538 push {r3, r4, r5, lr}
- ram = (u8_t *)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER);
- 800b0ae: 4d10 ldr r5, [pc, #64] @ (800b0f0 <mem_init+0x44>)
- 800b0b0: 4b10 ldr r3, [pc, #64] @ (800b0f4 <mem_init+0x48>)
- 800b0b2: 602b str r3, [r5, #0]
- mem->next = MEM_SIZE_ALIGNED;
- 800b0b4: 4c10 ldr r4, [pc, #64] @ (800b0f8 <mem_init+0x4c>)
- 800b0b6: 601c str r4, [r3, #0]
- mem->prev = 0;
- 800b0b8: 2200 movs r2, #0
- 800b0ba: 605a str r2, [r3, #4]
- mem->used = 0;
- 800b0bc: 721a strb r2, [r3, #8]
- ram_end = ptr_to_mem(MEM_SIZE_ALIGNED);
- 800b0be: 4620 mov r0, r4
- 800b0c0: f7ff ff38 bl 800af34 <ptr_to_mem>
- 800b0c4: 4b0d ldr r3, [pc, #52] @ (800b0fc <mem_init+0x50>)
- 800b0c6: 6018 str r0, [r3, #0]
- ram_end->used = 1;
- 800b0c8: 2301 movs r3, #1
- 800b0ca: 7203 strb r3, [r0, #8]
- ram_end->next = MEM_SIZE_ALIGNED;
- 800b0cc: 6004 str r4, [r0, #0]
- ram_end->prev = MEM_SIZE_ALIGNED;
- 800b0ce: 6044 str r4, [r0, #4]
- lfree = (struct mem *)(void *)ram;
- 800b0d0: 682a ldr r2, [r5, #0]
- 800b0d2: 4b0b ldr r3, [pc, #44] @ (800b100 <mem_init+0x54>)
- 800b0d4: 601a str r2, [r3, #0]
- if (sys_mutex_new(&mem_mutex) != ERR_OK) {
- 800b0d6: 480b ldr r0, [pc, #44] @ (800b104 <mem_init+0x58>)
- 800b0d8: f001 ff9c bl 800d014 <sys_mutex_new>
- 800b0dc: b900 cbnz r0, 800b0e0 <mem_init+0x34>
- }
- 800b0de: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("failed to create mem_mutex", 0);
- 800b0e0: 4b09 ldr r3, [pc, #36] @ (800b108 <mem_init+0x5c>)
- 800b0e2: f240 221f movw r2, #543 @ 0x21f
- 800b0e6: 4909 ldr r1, [pc, #36] @ (800b10c <mem_init+0x60>)
- 800b0e8: 4809 ldr r0, [pc, #36] @ (800b110 <mem_init+0x64>)
- 800b0ea: f008 f98d bl 8013408 <iprintf>
- }
- 800b0ee: e7f6 b.n 800b0de <mem_init+0x32>
- 800b0f0: 2401305c .word 0x2401305c
- 800b0f4: 30020000 .word 0x30020000
- 800b0f8: 0001ffe8 .word 0x0001ffe8
- 800b0fc: 24013058 .word 0x24013058
- 800b100: 24013050 .word 0x24013050
- 800b104: 24013054 .word 0x24013054
- 800b108: 080158f0 .word 0x080158f0
- 800b10c: 080159cc .word 0x080159cc
- 800b110: 080144e8 .word 0x080144e8
- 0800b114 <mem_free>:
- mem_free(void *rmem)
- {
- struct mem *mem;
- LWIP_MEM_FREE_DECL_PROTECT();
- if (rmem == NULL) {
- 800b114: 2800 cmp r0, #0
- 800b116: d060 beq.n 800b1da <mem_free+0xc6>
- {
- 800b118: b538 push {r3, r4, r5, lr}
- 800b11a: 4604 mov r4, r0
- LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("mem_free(p == NULL) was called.\n"));
- return;
- }
- if ((((mem_ptr_t)rmem) & (MEM_ALIGNMENT - 1)) != 0) {
- 800b11c: f010 0f03 tst.w r0, #3
- 800b120: d117 bne.n 800b152 <mem_free+0x3e>
- return;
- }
- /* 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));
- 800b122: f1a0 050c sub.w r5, r0, #12
- if ((u8_t *)mem < ram || (u8_t *)rmem + MIN_SIZE_ALIGNED > (u8_t *)ram_end) {
- 800b126: 4b2d ldr r3, [pc, #180] @ (800b1dc <mem_free+0xc8>)
- 800b128: 681b ldr r3, [r3, #0]
- 800b12a: 42ab cmp r3, r5
- 800b12c: d805 bhi.n 800b13a <mem_free+0x26>
- 800b12e: f100 030c add.w r3, r0, #12
- 800b132: 4a2b ldr r2, [pc, #172] @ (800b1e0 <mem_free+0xcc>)
- 800b134: 6812 ldr r2, [r2, #0]
- 800b136: 4293 cmp r3, r2
- 800b138: d917 bls.n 800b16a <mem_free+0x56>
- LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory");
- 800b13a: 4b2a ldr r3, [pc, #168] @ (800b1e4 <mem_free+0xd0>)
- 800b13c: f240 227f movw r2, #639 @ 0x27f
- 800b140: 4929 ldr r1, [pc, #164] @ (800b1e8 <mem_free+0xd4>)
- 800b142: 482a ldr r0, [pc, #168] @ (800b1ec <mem_free+0xd8>)
- 800b144: f008 f960 bl 8013408 <iprintf>
- LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory\n"));
- /* protect mem stats from concurrent access */
- MEM_STATS_INC_LOCKED(illegal);
- 800b148: f001 ff92 bl 800d070 <sys_arch_protect>
- 800b14c: f001 ff9c bl 800d088 <sys_arch_unprotect>
- 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();
- }
- 800b150: bd38 pop {r3, r4, r5, pc}
- LWIP_MEM_ILLEGAL_FREE("mem_free: sanity check alignment");
- 800b152: 4b24 ldr r3, [pc, #144] @ (800b1e4 <mem_free+0xd0>)
- 800b154: f240 2273 movw r2, #627 @ 0x273
- 800b158: 4925 ldr r1, [pc, #148] @ (800b1f0 <mem_free+0xdc>)
- 800b15a: 4824 ldr r0, [pc, #144] @ (800b1ec <mem_free+0xd8>)
- 800b15c: f008 f954 bl 8013408 <iprintf>
- MEM_STATS_INC_LOCKED(illegal);
- 800b160: f001 ff86 bl 800d070 <sys_arch_protect>
- 800b164: f001 ff90 bl 800d088 <sys_arch_unprotect>
- return;
- 800b168: e7f2 b.n 800b150 <mem_free+0x3c>
- LWIP_MEM_FREE_PROTECT();
- 800b16a: 4822 ldr r0, [pc, #136] @ (800b1f4 <mem_free+0xe0>)
- 800b16c: f001 ff5e bl 800d02c <sys_mutex_lock>
- if (!mem->used) {
- 800b170: f814 3c04 ldrb.w r3, [r4, #-4]
- 800b174: b19b cbz r3, 800b19e <mem_free+0x8a>
- if (!mem_link_valid(mem)) {
- 800b176: 4628 mov r0, r5
- 800b178: f7ff fee8 bl 800af4c <mem_link_valid>
- 800b17c: b1f0 cbz r0, 800b1bc <mem_free+0xa8>
- mem->used = 0;
- 800b17e: 2300 movs r3, #0
- 800b180: f804 3c04 strb.w r3, [r4, #-4]
- if (mem < lfree) {
- 800b184: 4b1c ldr r3, [pc, #112] @ (800b1f8 <mem_free+0xe4>)
- 800b186: 681b ldr r3, [r3, #0]
- 800b188: 42ab cmp r3, r5
- 800b18a: d901 bls.n 800b190 <mem_free+0x7c>
- lfree = mem;
- 800b18c: 4b1a ldr r3, [pc, #104] @ (800b1f8 <mem_free+0xe4>)
- 800b18e: 601d str r5, [r3, #0]
- plug_holes(mem);
- 800b190: 4628 mov r0, r5
- 800b192: f7ff ff0b bl 800afac <plug_holes>
- LWIP_MEM_FREE_UNPROTECT();
- 800b196: 4817 ldr r0, [pc, #92] @ (800b1f4 <mem_free+0xe0>)
- 800b198: f001 ff4f bl 800d03a <sys_mutex_unlock>
- 800b19c: e7d8 b.n 800b150 <mem_free+0x3c>
- LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: double free");
- 800b19e: 4b11 ldr r3, [pc, #68] @ (800b1e4 <mem_free+0xd0>)
- 800b1a0: f44f 7223 mov.w r2, #652 @ 0x28c
- 800b1a4: 4915 ldr r1, [pc, #84] @ (800b1fc <mem_free+0xe8>)
- 800b1a6: 4811 ldr r0, [pc, #68] @ (800b1ec <mem_free+0xd8>)
- 800b1a8: f008 f92e bl 8013408 <iprintf>
- LWIP_MEM_FREE_UNPROTECT();
- 800b1ac: 4811 ldr r0, [pc, #68] @ (800b1f4 <mem_free+0xe0>)
- 800b1ae: f001 ff44 bl 800d03a <sys_mutex_unlock>
- MEM_STATS_INC_LOCKED(illegal);
- 800b1b2: f001 ff5d bl 800d070 <sys_arch_protect>
- 800b1b6: f001 ff67 bl 800d088 <sys_arch_unprotect>
- return;
- 800b1ba: e7c9 b.n 800b150 <mem_free+0x3c>
- LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: non-linked: double free");
- 800b1bc: 4b09 ldr r3, [pc, #36] @ (800b1e4 <mem_free+0xd0>)
- 800b1be: f240 2295 movw r2, #661 @ 0x295
- 800b1c2: 490f ldr r1, [pc, #60] @ (800b200 <mem_free+0xec>)
- 800b1c4: 4809 ldr r0, [pc, #36] @ (800b1ec <mem_free+0xd8>)
- 800b1c6: f008 f91f bl 8013408 <iprintf>
- LWIP_MEM_FREE_UNPROTECT();
- 800b1ca: 480a ldr r0, [pc, #40] @ (800b1f4 <mem_free+0xe0>)
- 800b1cc: f001 ff35 bl 800d03a <sys_mutex_unlock>
- MEM_STATS_INC_LOCKED(illegal);
- 800b1d0: f001 ff4e bl 800d070 <sys_arch_protect>
- 800b1d4: f001 ff58 bl 800d088 <sys_arch_unprotect>
- return;
- 800b1d8: e7ba b.n 800b150 <mem_free+0x3c>
- 800b1da: 4770 bx lr
- 800b1dc: 2401305c .word 0x2401305c
- 800b1e0: 24013058 .word 0x24013058
- 800b1e4: 080158f0 .word 0x080158f0
- 800b1e8: 08015a0c .word 0x08015a0c
- 800b1ec: 080144e8 .word 0x080144e8
- 800b1f0: 080159e8 .word 0x080159e8
- 800b1f4: 24013054 .word 0x24013054
- 800b1f8: 24013050 .word 0x24013050
- 800b1fc: 08015a28 .word 0x08015a28
- 800b200: 08015a50 .word 0x08015a50
- 0800b204 <mem_trim>:
- * or NULL if newsize is > old size, in which case rmem is NOT touched
- * or freed!
- */
- void *
- mem_trim(void *rmem, mem_size_t new_size)
- {
- 800b204: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
- 800b208: 4604 mov r4, r0
- /* 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);
- 800b20a: 1ccd adds r5, r1, #3
- 800b20c: f025 0503 bic.w r5, r5, #3
- if (newsize < MIN_SIZE_ALIGNED) {
- 800b210: 2d0b cmp r5, #11
- 800b212: d800 bhi.n 800b216 <mem_trim+0x12>
- /* every data block must be at least MIN_SIZE_ALIGNED long */
- newsize = MIN_SIZE_ALIGNED;
- 800b214: 250c movs r5, #12
- }
- #if MEM_OVERFLOW_CHECK
- newsize += MEM_SANITY_REGION_BEFORE_ALIGNED + MEM_SANITY_REGION_AFTER_ALIGNED;
- #endif
- if ((newsize > MEM_SIZE_ALIGNED) || (newsize < new_size)) {
- 800b216: 428d cmp r5, r1
- 800b218: bf2c ite cs
- 800b21a: 2100 movcs r1, #0
- 800b21c: 2101 movcc r1, #1
- 800b21e: 4b53 ldr r3, [pc, #332] @ (800b36c <mem_trim+0x168>)
- 800b220: 429d cmp r5, r3
- 800b222: bf88 it hi
- 800b224: f041 0101 orrhi.w r1, r1, #1
- 800b228: 2900 cmp r1, #0
- 800b22a: f040 8098 bne.w 800b35e <mem_trim+0x15a>
- return NULL;
- }
- LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram &&
- 800b22e: 4b50 ldr r3, [pc, #320] @ (800b370 <mem_trim+0x16c>)
- 800b230: 681b ldr r3, [r3, #0]
- 800b232: 42a3 cmp r3, r4
- 800b234: d803 bhi.n 800b23e <mem_trim+0x3a>
- 800b236: 4b4f ldr r3, [pc, #316] @ (800b374 <mem_trim+0x170>)
- 800b238: 681b ldr r3, [r3, #0]
- 800b23a: 42a3 cmp r3, r4
- 800b23c: d806 bhi.n 800b24c <mem_trim+0x48>
- 800b23e: 4b4e ldr r3, [pc, #312] @ (800b378 <mem_trim+0x174>)
- 800b240: f240 22d1 movw r2, #721 @ 0x2d1
- 800b244: 494d ldr r1, [pc, #308] @ (800b37c <mem_trim+0x178>)
- 800b246: 484e ldr r0, [pc, #312] @ (800b380 <mem_trim+0x17c>)
- 800b248: f008 f8de bl 8013408 <iprintf>
- (u8_t *)rmem < (u8_t *)ram_end);
- if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) {
- 800b24c: 4b48 ldr r3, [pc, #288] @ (800b370 <mem_trim+0x16c>)
- 800b24e: 681b ldr r3, [r3, #0]
- 800b250: 42a3 cmp r3, r4
- 800b252: d83d bhi.n 800b2d0 <mem_trim+0xcc>
- 800b254: 4b47 ldr r3, [pc, #284] @ (800b374 <mem_trim+0x170>)
- 800b256: 681b ldr r3, [r3, #0]
- 800b258: 42a3 cmp r3, r4
- 800b25a: d939 bls.n 800b2d0 <mem_trim+0xcc>
- mem = (struct mem *)(void *)((u8_t *)rmem - (SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET));
- #if MEM_OVERFLOW_CHECK
- mem_overflow_check_element(mem);
- #endif
- /* ... and its offset pointer */
- ptr = mem_to_ptr(mem);
- 800b25c: f1a4 000c sub.w r0, r4, #12
- 800b260: f7ff fe6e bl 800af40 <mem_to_ptr>
- 800b264: 4607 mov r7, r0
- size = (mem_size_t)((mem_size_t)(mem->next - ptr) - (SIZEOF_STRUCT_MEM + MEM_SANITY_OVERHEAD));
- 800b266: f854 6c0c ldr.w r6, [r4, #-12]
- 800b26a: 1a36 subs r6, r6, r0
- 800b26c: 3e0c subs r6, #12
- LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size);
- 800b26e: 42b5 cmp r5, r6
- 800b270: d835 bhi.n 800b2de <mem_trim+0xda>
- if (newsize > size) {
- 800b272: 42b5 cmp r5, r6
- 800b274: d875 bhi.n 800b362 <mem_trim+0x15e>
- /* not supported */
- return NULL;
- }
- if (newsize == size) {
- 800b276: d076 beq.n 800b366 <mem_trim+0x162>
- /* No change in size, simply return */
- return rmem;
- }
- /* protect the heap from concurrent access */
- LWIP_MEM_FREE_PROTECT();
- 800b278: 4842 ldr r0, [pc, #264] @ (800b384 <mem_trim+0x180>)
- 800b27a: f001 fed7 bl 800d02c <sys_mutex_lock>
- mem2 = ptr_to_mem(mem->next);
- 800b27e: f854 9c0c ldr.w r9, [r4, #-12]
- 800b282: 4648 mov r0, r9
- 800b284: f7ff fe56 bl 800af34 <ptr_to_mem>
- 800b288: 4680 mov r8, r0
- if (mem2->used == 0) {
- 800b28a: 7a03 ldrb r3, [r0, #8]
- 800b28c: 2b00 cmp r3, #0
- 800b28e: d13c bne.n 800b30a <mem_trim+0x106>
- /* 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);
- 800b290: 4b36 ldr r3, [pc, #216] @ (800b36c <mem_trim+0x168>)
- 800b292: 4599 cmp r9, r3
- 800b294: d02b beq.n 800b2ee <mem_trim+0xea>
- /* remember the old next pointer */
- next = mem2->next;
- 800b296: f8d8 6000 ldr.w r6, [r8]
- /* create new struct mem which is moved directly after the shrinked mem */
- ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + newsize);
- 800b29a: 443d add r5, r7
- 800b29c: 350c adds r5, #12
- if (lfree == mem2) {
- 800b29e: 4b3a ldr r3, [pc, #232] @ (800b388 <mem_trim+0x184>)
- 800b2a0: 681b ldr r3, [r3, #0]
- 800b2a2: 4543 cmp r3, r8
- 800b2a4: d02b beq.n 800b2fe <mem_trim+0xfa>
- lfree = ptr_to_mem(ptr2);
- }
- mem2 = ptr_to_mem(ptr2);
- 800b2a6: 4628 mov r0, r5
- 800b2a8: f7ff fe44 bl 800af34 <ptr_to_mem>
- mem2->used = 0;
- 800b2ac: 2300 movs r3, #0
- 800b2ae: 7203 strb r3, [r0, #8]
- /* restore the next pointer */
- mem2->next = next;
- 800b2b0: 6006 str r6, [r0, #0]
- /* link it back to mem */
- mem2->prev = ptr;
- 800b2b2: 6047 str r7, [r0, #4]
- /* link mem to it */
- mem->next = ptr2;
- 800b2b4: f844 5c0c str.w r5, [r4, #-12]
- /* 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) {
- 800b2b8: 6800 ldr r0, [r0, #0]
- 800b2ba: 4b2c ldr r3, [pc, #176] @ (800b36c <mem_trim+0x168>)
- 800b2bc: 4298 cmp r0, r3
- 800b2be: d002 beq.n 800b2c6 <mem_trim+0xc2>
- ptr_to_mem(mem2->next)->prev = ptr2;
- 800b2c0: f7ff fe38 bl 800af34 <ptr_to_mem>
- 800b2c4: 6045 str r5, [r0, #4]
- #endif
- 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();
- 800b2c6: 482f ldr r0, [pc, #188] @ (800b384 <mem_trim+0x180>)
- 800b2c8: f001 feb7 bl 800d03a <sys_mutex_unlock>
- return rmem;
- 800b2cc: 4620 mov r0, r4
- 800b2ce: e004 b.n 800b2da <mem_trim+0xd6>
- MEM_STATS_INC_LOCKED(illegal);
- 800b2d0: f001 fece bl 800d070 <sys_arch_protect>
- 800b2d4: f001 fed8 bl 800d088 <sys_arch_unprotect>
- return rmem;
- 800b2d8: 4620 mov r0, r4
- }
- 800b2da: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
- LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size);
- 800b2de: 4b26 ldr r3, [pc, #152] @ (800b378 <mem_trim+0x174>)
- 800b2e0: f44f 7239 mov.w r2, #740 @ 0x2e4
- 800b2e4: 4929 ldr r1, [pc, #164] @ (800b38c <mem_trim+0x188>)
- 800b2e6: 4826 ldr r0, [pc, #152] @ (800b380 <mem_trim+0x17c>)
- 800b2e8: f008 f88e bl 8013408 <iprintf>
- 800b2ec: e7c1 b.n 800b272 <mem_trim+0x6e>
- LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED);
- 800b2ee: 4b22 ldr r3, [pc, #136] @ (800b378 <mem_trim+0x174>)
- 800b2f0: f240 22f5 movw r2, #757 @ 0x2f5
- 800b2f4: 4926 ldr r1, [pc, #152] @ (800b390 <mem_trim+0x18c>)
- 800b2f6: 4822 ldr r0, [pc, #136] @ (800b380 <mem_trim+0x17c>)
- 800b2f8: f008 f886 bl 8013408 <iprintf>
- 800b2fc: e7cb b.n 800b296 <mem_trim+0x92>
- lfree = ptr_to_mem(ptr2);
- 800b2fe: 4628 mov r0, r5
- 800b300: f7ff fe18 bl 800af34 <ptr_to_mem>
- 800b304: 4b20 ldr r3, [pc, #128] @ (800b388 <mem_trim+0x184>)
- 800b306: 6018 str r0, [r3, #0]
- 800b308: e7cd b.n 800b2a6 <mem_trim+0xa2>
- } else if (newsize + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED <= size) {
- 800b30a: f105 0318 add.w r3, r5, #24
- 800b30e: 42b3 cmp r3, r6
- 800b310: d8d9 bhi.n 800b2c6 <mem_trim+0xc2>
- ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + newsize);
- 800b312: 443d add r5, r7
- 800b314: 350c adds r5, #12
- LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED);
- 800b316: 4b15 ldr r3, [pc, #84] @ (800b36c <mem_trim+0x168>)
- 800b318: 4599 cmp r9, r3
- 800b31a: d018 beq.n 800b34e <mem_trim+0x14a>
- mem2 = ptr_to_mem(ptr2);
- 800b31c: 4628 mov r0, r5
- 800b31e: f7ff fe09 bl 800af34 <ptr_to_mem>
- if (mem2 < lfree) {
- 800b322: 4b19 ldr r3, [pc, #100] @ (800b388 <mem_trim+0x184>)
- 800b324: 681b ldr r3, [r3, #0]
- 800b326: 4283 cmp r3, r0
- 800b328: d901 bls.n 800b32e <mem_trim+0x12a>
- lfree = mem2;
- 800b32a: 4b17 ldr r3, [pc, #92] @ (800b388 <mem_trim+0x184>)
- 800b32c: 6018 str r0, [r3, #0]
- mem2->used = 0;
- 800b32e: 2300 movs r3, #0
- 800b330: 7203 strb r3, [r0, #8]
- mem2->next = mem->next;
- 800b332: f854 3c0c ldr.w r3, [r4, #-12]
- 800b336: 6003 str r3, [r0, #0]
- mem2->prev = ptr;
- 800b338: 6047 str r7, [r0, #4]
- mem->next = ptr2;
- 800b33a: f844 5c0c str.w r5, [r4, #-12]
- if (mem2->next != MEM_SIZE_ALIGNED) {
- 800b33e: 6800 ldr r0, [r0, #0]
- 800b340: 4b0a ldr r3, [pc, #40] @ (800b36c <mem_trim+0x168>)
- 800b342: 4298 cmp r0, r3
- 800b344: d0bf beq.n 800b2c6 <mem_trim+0xc2>
- ptr_to_mem(mem2->next)->prev = ptr2;
- 800b346: f7ff fdf5 bl 800af34 <ptr_to_mem>
- 800b34a: 6045 str r5, [r0, #4]
- 800b34c: e7bb b.n 800b2c6 <mem_trim+0xc2>
- LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED);
- 800b34e: 4b0a ldr r3, [pc, #40] @ (800b378 <mem_trim+0x174>)
- 800b350: f240 3216 movw r2, #790 @ 0x316
- 800b354: 490e ldr r1, [pc, #56] @ (800b390 <mem_trim+0x18c>)
- 800b356: 480a ldr r0, [pc, #40] @ (800b380 <mem_trim+0x17c>)
- 800b358: f008 f856 bl 8013408 <iprintf>
- 800b35c: e7de b.n 800b31c <mem_trim+0x118>
- return NULL;
- 800b35e: 2000 movs r0, #0
- 800b360: e7bb b.n 800b2da <mem_trim+0xd6>
- return NULL;
- 800b362: 2000 movs r0, #0
- 800b364: e7b9 b.n 800b2da <mem_trim+0xd6>
- return rmem;
- 800b366: 4620 mov r0, r4
- 800b368: e7b7 b.n 800b2da <mem_trim+0xd6>
- 800b36a: bf00 nop
- 800b36c: 0001ffe8 .word 0x0001ffe8
- 800b370: 2401305c .word 0x2401305c
- 800b374: 24013058 .word 0x24013058
- 800b378: 080158f0 .word 0x080158f0
- 800b37c: 08015a84 .word 0x08015a84
- 800b380: 080144e8 .word 0x080144e8
- 800b384: 24013054 .word 0x24013054
- 800b388: 24013050 .word 0x24013050
- 800b38c: 08015a9c .word 0x08015a9c
- 800b390: 08015abc .word 0x08015abc
- 0800b394 <mem_malloc>:
- #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) {
- 800b394: 2800 cmp r0, #0
- 800b396: f000 809e beq.w 800b4d6 <mem_malloc+0x142>
- {
- 800b39a: b5f8 push {r3, r4, r5, r6, r7, lr}
- 800b39c: 4603 mov r3, r0
- return NULL;
- }
- /* 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);
- 800b39e: 1cc6 adds r6, r0, #3
- 800b3a0: f026 0603 bic.w r6, r6, #3
- if (size < MIN_SIZE_ALIGNED) {
- 800b3a4: 2e0b cmp r6, #11
- 800b3a6: d800 bhi.n 800b3aa <mem_malloc+0x16>
- /* every data block must be at least MIN_SIZE_ALIGNED long */
- size = MIN_SIZE_ALIGNED;
- 800b3a8: 260c movs r6, #12
- }
- #if MEM_OVERFLOW_CHECK
- size += MEM_SANITY_REGION_BEFORE_ALIGNED + MEM_SANITY_REGION_AFTER_ALIGNED;
- #endif
- if ((size > MEM_SIZE_ALIGNED) || (size < size_in)) {
- 800b3aa: 429e cmp r6, r3
- 800b3ac: bf2c ite cs
- 800b3ae: 2300 movcs r3, #0
- 800b3b0: 2301 movcc r3, #1
- 800b3b2: 4a4b ldr r2, [pc, #300] @ (800b4e0 <mem_malloc+0x14c>)
- 800b3b4: 4296 cmp r6, r2
- 800b3b6: bf88 it hi
- 800b3b8: f043 0301 orrhi.w r3, r3, #1
- 800b3bc: 2b00 cmp r3, #0
- 800b3be: f040 808c bne.w 800b4da <mem_malloc+0x146>
- return NULL;
- }
- /* protect the heap from concurrent access */
- sys_mutex_lock(&mem_mutex);
- 800b3c2: 4848 ldr r0, [pc, #288] @ (800b4e4 <mem_malloc+0x150>)
- 800b3c4: f001 fe32 bl 800d02c <sys_mutex_lock>
- #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;
- 800b3c8: 4b47 ldr r3, [pc, #284] @ (800b4e8 <mem_malloc+0x154>)
- 800b3ca: 6818 ldr r0, [r3, #0]
- 800b3cc: f7ff fdb8 bl 800af40 <mem_to_ptr>
- 800b3d0: 4605 mov r5, r0
- 800b3d2: e04f b.n 800b474 <mem_malloc+0xe0>
- * @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);
- LWIP_ASSERT("invalid next ptr",ptr2 != MEM_SIZE_ALIGNED);
- 800b3d4: 4b45 ldr r3, [pc, #276] @ (800b4ec <mem_malloc+0x158>)
- 800b3d6: f240 3287 movw r2, #903 @ 0x387
- 800b3da: 4945 ldr r1, [pc, #276] @ (800b4f0 <mem_malloc+0x15c>)
- 800b3dc: 4845 ldr r0, [pc, #276] @ (800b4f4 <mem_malloc+0x160>)
- 800b3de: f008 f813 bl 8013408 <iprintf>
- 800b3e2: e060 b.n 800b4a6 <mem_malloc+0x112>
- * 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;
- 800b3e4: 2301 movs r3, #1
- 800b3e6: 7203 strb r3, [r0, #8]
- 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) {
- 800b3e8: 4b3f ldr r3, [pc, #252] @ (800b4e8 <mem_malloc+0x154>)
- 800b3ea: 6818 ldr r0, [r3, #0]
- 800b3ec: 42a0 cmp r0, r4
- 800b3ee: d012 beq.n 800b416 <mem_malloc+0x82>
- }
- lfree = cur;
- LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used)));
- }
- LWIP_MEM_ALLOC_UNPROTECT();
- sys_mutex_unlock(&mem_mutex);
- 800b3f0: 483c ldr r0, [pc, #240] @ (800b4e4 <mem_malloc+0x150>)
- 800b3f2: f001 fe22 bl 800d03a <sys_mutex_unlock>
- LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.",
- 800b3f6: 4426 add r6, r4
- 800b3f8: 360c adds r6, #12
- 800b3fa: 4b3f ldr r3, [pc, #252] @ (800b4f8 <mem_malloc+0x164>)
- 800b3fc: 681b ldr r3, [r3, #0]
- 800b3fe: 429e cmp r6, r3
- 800b400: d81f bhi.n 800b442 <mem_malloc+0xae>
- (mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end);
- LWIP_ASSERT("mem_malloc: allocated memory properly aligned.",
- 800b402: f014 0503 ands.w r5, r4, #3
- 800b406: d124 bne.n 800b452 <mem_malloc+0xbe>
- ((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0);
- LWIP_ASSERT("mem_malloc: sanity check alignment",
- 800b408: bb5d cbnz r5, 800b462 <mem_malloc+0xce>
- #if MEM_OVERFLOW_CHECK
- mem_overflow_init_element(mem, size_in);
- #endif
- MEM_SANITY();
- return (u8_t *)mem + SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET;
- 800b40a: f104 000c add.w r0, r4, #12
- 800b40e: e061 b.n 800b4d4 <mem_malloc+0x140>
- cur = ptr_to_mem(cur->next);
- 800b410: 6800 ldr r0, [r0, #0]
- 800b412: f7ff fd8f bl 800af34 <ptr_to_mem>
- while (cur->used && cur != ram_end) {
- 800b416: 7a03 ldrb r3, [r0, #8]
- 800b418: b11b cbz r3, 800b422 <mem_malloc+0x8e>
- 800b41a: 4a37 ldr r2, [pc, #220] @ (800b4f8 <mem_malloc+0x164>)
- 800b41c: 6812 ldr r2, [r2, #0]
- 800b41e: 4282 cmp r2, r0
- 800b420: d1f6 bne.n 800b410 <mem_malloc+0x7c>
- lfree = cur;
- 800b422: 4a31 ldr r2, [pc, #196] @ (800b4e8 <mem_malloc+0x154>)
- 800b424: 6010 str r0, [r2, #0]
- LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used)));
- 800b426: 4a34 ldr r2, [pc, #208] @ (800b4f8 <mem_malloc+0x164>)
- 800b428: 6812 ldr r2, [r2, #0]
- 800b42a: 4282 cmp r2, r0
- 800b42c: d0e0 beq.n 800b3f0 <mem_malloc+0x5c>
- 800b42e: 2b00 cmp r3, #0
- 800b430: d0de beq.n 800b3f0 <mem_malloc+0x5c>
- 800b432: 4b2e ldr r3, [pc, #184] @ (800b4ec <mem_malloc+0x158>)
- 800b434: f240 32b5 movw r2, #949 @ 0x3b5
- 800b438: 4930 ldr r1, [pc, #192] @ (800b4fc <mem_malloc+0x168>)
- 800b43a: 482e ldr r0, [pc, #184] @ (800b4f4 <mem_malloc+0x160>)
- 800b43c: f007 ffe4 bl 8013408 <iprintf>
- 800b440: e7d6 b.n 800b3f0 <mem_malloc+0x5c>
- LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.",
- 800b442: 4b2a ldr r3, [pc, #168] @ (800b4ec <mem_malloc+0x158>)
- 800b444: f240 32b9 movw r2, #953 @ 0x3b9
- 800b448: 492d ldr r1, [pc, #180] @ (800b500 <mem_malloc+0x16c>)
- 800b44a: 482a ldr r0, [pc, #168] @ (800b4f4 <mem_malloc+0x160>)
- 800b44c: f007 ffdc bl 8013408 <iprintf>
- 800b450: e7d7 b.n 800b402 <mem_malloc+0x6e>
- LWIP_ASSERT("mem_malloc: allocated memory properly aligned.",
- 800b452: 4b26 ldr r3, [pc, #152] @ (800b4ec <mem_malloc+0x158>)
- 800b454: f240 32bb movw r2, #955 @ 0x3bb
- 800b458: 492a ldr r1, [pc, #168] @ (800b504 <mem_malloc+0x170>)
- 800b45a: 4826 ldr r0, [pc, #152] @ (800b4f4 <mem_malloc+0x160>)
- 800b45c: f007 ffd4 bl 8013408 <iprintf>
- 800b460: e7d2 b.n 800b408 <mem_malloc+0x74>
- LWIP_ASSERT("mem_malloc: sanity check alignment",
- 800b462: 4b22 ldr r3, [pc, #136] @ (800b4ec <mem_malloc+0x158>)
- 800b464: f240 32bd movw r2, #957 @ 0x3bd
- 800b468: 4927 ldr r1, [pc, #156] @ (800b508 <mem_malloc+0x174>)
- 800b46a: 4822 ldr r0, [pc, #136] @ (800b4f4 <mem_malloc+0x160>)
- 800b46c: f007 ffcc bl 8013408 <iprintf>
- 800b470: e7cb b.n 800b40a <mem_malloc+0x76>
- ptr = ptr_to_mem(ptr)->next) {
- 800b472: 6825 ldr r5, [r4, #0]
- for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size;
- 800b474: 4b1a ldr r3, [pc, #104] @ (800b4e0 <mem_malloc+0x14c>)
- 800b476: 1b9b subs r3, r3, r6
- 800b478: 42ab cmp r3, r5
- 800b47a: d927 bls.n 800b4cc <mem_malloc+0x138>
- mem = ptr_to_mem(ptr);
- 800b47c: 4628 mov r0, r5
- 800b47e: f7ff fd59 bl 800af34 <ptr_to_mem>
- 800b482: 4604 mov r4, r0
- if ((!mem->used) &&
- 800b484: 7a03 ldrb r3, [r0, #8]
- 800b486: 2b00 cmp r3, #0
- 800b488: d1f3 bne.n 800b472 <mem_malloc+0xde>
- (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) {
- 800b48a: 6803 ldr r3, [r0, #0]
- 800b48c: 1b5b subs r3, r3, r5
- 800b48e: 3b0c subs r3, #12
- if ((!mem->used) &&
- 800b490: 42b3 cmp r3, r6
- 800b492: d3ee bcc.n 800b472 <mem_malloc+0xde>
- if (mem->next - (ptr + SIZEOF_STRUCT_MEM) >= (size + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED)) {
- 800b494: f106 0218 add.w r2, r6, #24
- 800b498: 4293 cmp r3, r2
- 800b49a: d3a3 bcc.n 800b3e4 <mem_malloc+0x50>
- ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + size);
- 800b49c: 19af adds r7, r5, r6
- 800b49e: 370c adds r7, #12
- LWIP_ASSERT("invalid next ptr",ptr2 != MEM_SIZE_ALIGNED);
- 800b4a0: 4b0f ldr r3, [pc, #60] @ (800b4e0 <mem_malloc+0x14c>)
- 800b4a2: 429f cmp r7, r3
- 800b4a4: d096 beq.n 800b3d4 <mem_malloc+0x40>
- mem2 = ptr_to_mem(ptr2);
- 800b4a6: 4638 mov r0, r7
- 800b4a8: f7ff fd44 bl 800af34 <ptr_to_mem>
- mem2->used = 0;
- 800b4ac: 2300 movs r3, #0
- 800b4ae: 7203 strb r3, [r0, #8]
- mem2->next = mem->next;
- 800b4b0: 6823 ldr r3, [r4, #0]
- 800b4b2: 6003 str r3, [r0, #0]
- mem2->prev = ptr;
- 800b4b4: 6045 str r5, [r0, #4]
- mem->next = ptr2;
- 800b4b6: 6027 str r7, [r4, #0]
- mem->used = 1;
- 800b4b8: 2301 movs r3, #1
- 800b4ba: 7223 strb r3, [r4, #8]
- if (mem2->next != MEM_SIZE_ALIGNED) {
- 800b4bc: 6800 ldr r0, [r0, #0]
- 800b4be: 4b08 ldr r3, [pc, #32] @ (800b4e0 <mem_malloc+0x14c>)
- 800b4c0: 4298 cmp r0, r3
- 800b4c2: d091 beq.n 800b3e8 <mem_malloc+0x54>
- ptr_to_mem(mem2->next)->prev = ptr2;
- 800b4c4: f7ff fd36 bl 800af34 <ptr_to_mem>
- 800b4c8: 6047 str r7, [r0, #4]
- 800b4ca: e78d b.n 800b3e8 <mem_malloc+0x54>
- /* if we got interrupted by a mem_free, try again */
- } 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);
- 800b4cc: 4805 ldr r0, [pc, #20] @ (800b4e4 <mem_malloc+0x150>)
- 800b4ce: f001 fdb4 bl 800d03a <sys_mutex_unlock>
- LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size));
- return NULL;
- 800b4d2: 2000 movs r0, #0
- }
- 800b4d4: bdf8 pop {r3, r4, r5, r6, r7, pc}
- return NULL;
- 800b4d6: 2000 movs r0, #0
- }
- 800b4d8: 4770 bx lr
- return NULL;
- 800b4da: 2000 movs r0, #0
- 800b4dc: e7fa b.n 800b4d4 <mem_malloc+0x140>
- 800b4de: bf00 nop
- 800b4e0: 0001ffe8 .word 0x0001ffe8
- 800b4e4: 24013054 .word 0x24013054
- 800b4e8: 24013050 .word 0x24013050
- 800b4ec: 080158f0 .word 0x080158f0
- 800b4f0: 08015abc .word 0x08015abc
- 800b4f4: 080144e8 .word 0x080144e8
- 800b4f8: 24013058 .word 0x24013058
- 800b4fc: 08015ad0 .word 0x08015ad0
- 800b500: 08015aec .word 0x08015aec
- 800b504: 08015b1c .word 0x08015b1c
- 800b508: 08015b4c .word 0x08015b4c
- 0800b50c <do_memp_malloc_pool>:
- #if !MEMP_OVERFLOW_CHECK
- do_memp_malloc_pool(const struct memp_desc *desc)
- #else
- do_memp_malloc_pool_fn(const struct memp_desc *desc, const char *file, const int line)
- #endif
- {
- 800b50c: b538 push {r3, r4, r5, lr}
- 800b50e: 4604 mov r4, r0
- #if MEMP_MEM_MALLOC
- 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);
- 800b510: f001 fdae bl 800d070 <sys_arch_protect>
- 800b514: 4605 mov r5, r0
- memp = *desc->tab;
- 800b516: 68e3 ldr r3, [r4, #12]
- 800b518: 681c ldr r4, [r3, #0]
- #endif /* MEMP_MEM_MALLOC */
- if (memp != NULL) {
- 800b51a: b18c cbz r4, 800b540 <do_memp_malloc_pool+0x34>
- #if !MEMP_MEM_MALLOC
- #if MEMP_OVERFLOW_CHECK == 1
- memp_overflow_check_element(memp, desc);
- #endif /* MEMP_OVERFLOW_CHECK */
- *desc->tab = memp->next;
- 800b51c: 6822 ldr r2, [r4, #0]
- 800b51e: 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",
- 800b520: f014 0f03 tst.w r4, #3
- 800b524: d104 bne.n 800b530 <do_memp_malloc_pool+0x24>
- desc->stats->used++;
- if (desc->stats->used > desc->stats->max) {
- desc->stats->max = desc->stats->used;
- }
- #endif
- SYS_ARCH_UNPROTECT(old_level);
- 800b526: 4628 mov r0, r5
- 800b528: f001 fdae bl 800d088 <sys_arch_unprotect>
- SYS_ARCH_UNPROTECT(old_level);
- LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", desc->desc));
- }
- return NULL;
- }
- 800b52c: 4620 mov r0, r4
- 800b52e: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("memp_malloc: memp properly aligned",
- 800b530: 4b05 ldr r3, [pc, #20] @ (800b548 <do_memp_malloc_pool+0x3c>)
- 800b532: f44f 728c mov.w r2, #280 @ 0x118
- 800b536: 4905 ldr r1, [pc, #20] @ (800b54c <do_memp_malloc_pool+0x40>)
- 800b538: 4805 ldr r0, [pc, #20] @ (800b550 <do_memp_malloc_pool+0x44>)
- 800b53a: f007 ff65 bl 8013408 <iprintf>
- 800b53e: e7f2 b.n 800b526 <do_memp_malloc_pool+0x1a>
- SYS_ARCH_UNPROTECT(old_level);
- 800b540: f001 fda2 bl 800d088 <sys_arch_unprotect>
- return NULL;
- 800b544: e7f2 b.n 800b52c <do_memp_malloc_pool+0x20>
- 800b546: bf00 nop
- 800b548: 08015b70 .word 0x08015b70
- 800b54c: 08015bd0 .word 0x08015bd0
- 800b550: 080144e8 .word 0x080144e8
- 0800b554 <do_memp_free_pool>:
- return memp;
- }
- static void
- do_memp_free_pool(const struct memp_desc *desc, void *mem)
- {
- 800b554: b538 push {r3, r4, r5, lr}
- 800b556: 4605 mov r5, r0
- 800b558: 460c mov r4, r1
- struct memp *memp;
- SYS_ARCH_DECL_PROTECT(old_level);
- LWIP_ASSERT("memp_free: mem properly aligned",
- 800b55a: f011 0f03 tst.w r1, #3
- 800b55e: d109 bne.n 800b574 <do_memp_free_pool+0x20>
- ((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);
- SYS_ARCH_PROTECT(old_level);
- 800b560: f001 fd86 bl 800d070 <sys_arch_protect>
- #if MEMP_MEM_MALLOC
- LWIP_UNUSED_ARG(desc);
- SYS_ARCH_UNPROTECT(old_level);
- mem_free(memp);
- #else /* MEMP_MEM_MALLOC */
- memp->next = *desc->tab;
- 800b564: 68eb ldr r3, [r5, #12]
- 800b566: 681b ldr r3, [r3, #0]
- 800b568: 6023 str r3, [r4, #0]
- *desc->tab = memp;
- 800b56a: 68eb ldr r3, [r5, #12]
- 800b56c: 601c str r4, [r3, #0]
- #if MEMP_SANITY_CHECK
- LWIP_ASSERT("memp sanity", memp_sanity(desc));
- #endif /* MEMP_SANITY_CHECK */
- SYS_ARCH_UNPROTECT(old_level);
- 800b56e: f001 fd8b bl 800d088 <sys_arch_unprotect>
- #endif /* !MEMP_MEM_MALLOC */
- }
- 800b572: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("memp_free: mem properly aligned",
- 800b574: 4b03 ldr r3, [pc, #12] @ (800b584 <do_memp_free_pool+0x30>)
- 800b576: f44f 72b6 mov.w r2, #364 @ 0x16c
- 800b57a: 4903 ldr r1, [pc, #12] @ (800b588 <do_memp_free_pool+0x34>)
- 800b57c: 4803 ldr r0, [pc, #12] @ (800b58c <do_memp_free_pool+0x38>)
- 800b57e: f007 ff43 bl 8013408 <iprintf>
- 800b582: e7ed b.n 800b560 <do_memp_free_pool+0xc>
- 800b584: 08015b70 .word 0x08015b70
- 800b588: 08015bf4 .word 0x08015bf4
- 800b58c: 080144e8 .word 0x080144e8
- 0800b590 <memp_init_pool>:
- *desc->tab = NULL;
- 800b590: 68c3 ldr r3, [r0, #12]
- 800b592: 2200 movs r2, #0
- 800b594: 601a str r2, [r3, #0]
- memp = (struct memp *)LWIP_MEM_ALIGN(desc->base);
- 800b596: 6883 ldr r3, [r0, #8]
- 800b598: 3303 adds r3, #3
- 800b59a: f023 0303 bic.w r3, r3, #3
- for (i = 0; i < desc->num; ++i) {
- 800b59e: e007 b.n 800b5b0 <memp_init_pool+0x20>
- memp->next = *desc->tab;
- 800b5a0: 68c1 ldr r1, [r0, #12]
- 800b5a2: 6809 ldr r1, [r1, #0]
- 800b5a4: 6019 str r1, [r3, #0]
- *desc->tab = memp;
- 800b5a6: 68c1 ldr r1, [r0, #12]
- 800b5a8: 600b str r3, [r1, #0]
- memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + desc->size
- 800b5aa: 8881 ldrh r1, [r0, #4]
- 800b5ac: 440b add r3, r1
- for (i = 0; i < desc->num; ++i) {
- 800b5ae: 3201 adds r2, #1
- 800b5b0: 88c1 ldrh r1, [r0, #6]
- 800b5b2: 4291 cmp r1, r2
- 800b5b4: dcf4 bgt.n 800b5a0 <memp_init_pool+0x10>
- }
- 800b5b6: 4770 bx lr
- 0800b5b8 <memp_init>:
- {
- 800b5b8: b510 push {r4, lr}
- for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) {
- 800b5ba: 2400 movs r4, #0
- 800b5bc: e006 b.n 800b5cc <memp_init+0x14>
- memp_init_pool(memp_pools[i]);
- 800b5be: 4b05 ldr r3, [pc, #20] @ (800b5d4 <memp_init+0x1c>)
- 800b5c0: f853 0024 ldr.w r0, [r3, r4, lsl #2]
- 800b5c4: f7ff ffe4 bl 800b590 <memp_init_pool>
- for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) {
- 800b5c8: 3401 adds r4, #1
- 800b5ca: b2a4 uxth r4, r4
- 800b5cc: 2c0c cmp r4, #12
- 800b5ce: d9f6 bls.n 800b5be <memp_init+0x6>
- }
- 800b5d0: bd10 pop {r4, pc}
- 800b5d2: bf00 nop
- 800b5d4: 08015c64 .word 0x08015c64
- 0800b5d8 <memp_malloc_pool>:
- {
- 800b5d8: b510 push {r4, lr}
- LWIP_ASSERT("invalid pool desc", desc != NULL);
- 800b5da: 4604 mov r4, r0
- 800b5dc: b110 cbz r0, 800b5e4 <memp_malloc_pool+0xc>
- return do_memp_malloc_pool(desc);
- 800b5de: f7ff ff95 bl 800b50c <do_memp_malloc_pool>
- }
- 800b5e2: bd10 pop {r4, pc}
- LWIP_ASSERT("invalid pool desc", desc != NULL);
- 800b5e4: 4b04 ldr r3, [pc, #16] @ (800b5f8 <memp_malloc_pool+0x20>)
- 800b5e6: f44f 729e mov.w r2, #316 @ 0x13c
- 800b5ea: 4904 ldr r1, [pc, #16] @ (800b5fc <memp_malloc_pool+0x24>)
- 800b5ec: 4804 ldr r0, [pc, #16] @ (800b600 <memp_malloc_pool+0x28>)
- 800b5ee: f007 ff0b bl 8013408 <iprintf>
- return NULL;
- 800b5f2: 4620 mov r0, r4
- 800b5f4: e7f5 b.n 800b5e2 <memp_malloc_pool+0xa>
- 800b5f6: bf00 nop
- 800b5f8: 08015b70 .word 0x08015b70
- 800b5fc: 08015c14 .word 0x08015c14
- 800b600: 080144e8 .word 0x080144e8
- 0800b604 <memp_malloc>:
- {
- 800b604: b508 push {r3, lr}
- LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;);
- 800b606: 280c cmp r0, #12
- 800b608: d805 bhi.n 800b616 <memp_malloc+0x12>
- memp = do_memp_malloc_pool(memp_pools[type]);
- 800b60a: 4b07 ldr r3, [pc, #28] @ (800b628 <memp_malloc+0x24>)
- 800b60c: f853 0020 ldr.w r0, [r3, r0, lsl #2]
- 800b610: f7ff ff7c bl 800b50c <do_memp_malloc_pool>
- }
- 800b614: bd08 pop {r3, pc}
- LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;);
- 800b616: 4b05 ldr r3, [pc, #20] @ (800b62c <memp_malloc+0x28>)
- 800b618: f240 1257 movw r2, #343 @ 0x157
- 800b61c: 4904 ldr r1, [pc, #16] @ (800b630 <memp_malloc+0x2c>)
- 800b61e: 4805 ldr r0, [pc, #20] @ (800b634 <memp_malloc+0x30>)
- 800b620: f007 fef2 bl 8013408 <iprintf>
- 800b624: 2000 movs r0, #0
- 800b626: e7f5 b.n 800b614 <memp_malloc+0x10>
- 800b628: 08015c64 .word 0x08015c64
- 800b62c: 08015b70 .word 0x08015b70
- 800b630: 08015c28 .word 0x08015c28
- 800b634: 080144e8 .word 0x080144e8
- 0800b638 <memp_free_pool>:
- * @param desc the pool where to put mem
- * @param mem the memp element to free
- */
- void
- memp_free_pool(const struct memp_desc *desc, void *mem)
- {
- 800b638: b538 push {r3, r4, r5, lr}
- 800b63a: 460c mov r4, r1
- LWIP_ASSERT("invalid pool desc", desc != NULL);
- 800b63c: 4605 mov r5, r0
- 800b63e: b120 cbz r0, 800b64a <memp_free_pool+0x12>
- if ((desc == NULL) || (mem == NULL)) {
- 800b640: 2c00 cmp r4, #0
- 800b642: bf18 it ne
- 800b644: 2d00 cmpne r5, #0
- 800b646: d108 bne.n 800b65a <memp_free_pool+0x22>
- return;
- }
- do_memp_free_pool(desc, mem);
- }
- 800b648: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("invalid pool desc", desc != NULL);
- 800b64a: 4b06 ldr r3, [pc, #24] @ (800b664 <memp_free_pool+0x2c>)
- 800b64c: f240 1295 movw r2, #405 @ 0x195
- 800b650: 4905 ldr r1, [pc, #20] @ (800b668 <memp_free_pool+0x30>)
- 800b652: 4806 ldr r0, [pc, #24] @ (800b66c <memp_free_pool+0x34>)
- 800b654: f007 fed8 bl 8013408 <iprintf>
- 800b658: e7f2 b.n 800b640 <memp_free_pool+0x8>
- do_memp_free_pool(desc, mem);
- 800b65a: 4621 mov r1, r4
- 800b65c: 4628 mov r0, r5
- 800b65e: f7ff ff79 bl 800b554 <do_memp_free_pool>
- 800b662: e7f1 b.n 800b648 <memp_free_pool+0x10>
- 800b664: 08015b70 .word 0x08015b70
- 800b668: 08015c14 .word 0x08015c14
- 800b66c: 080144e8 .word 0x080144e8
- 0800b670 <memp_free>:
- * @param type the pool where to put mem
- * @param mem the memp element to free
- */
- void
- memp_free(memp_t type, void *mem)
- {
- 800b670: b508 push {r3, lr}
- #ifdef LWIP_HOOK_MEMP_AVAILABLE
- struct memp *old_first;
- #endif
- LWIP_ERROR("memp_free: type < MEMP_MAX", (type < MEMP_MAX), return;);
- 800b672: 280c cmp r0, #12
- 800b674: d806 bhi.n 800b684 <memp_free+0x14>
- if (mem == NULL) {
- 800b676: b121 cbz r1, 800b682 <memp_free+0x12>
- #ifdef LWIP_HOOK_MEMP_AVAILABLE
- old_first = *memp_pools[type]->tab;
- #endif
- do_memp_free_pool(memp_pools[type], mem);
- 800b678: 4b06 ldr r3, [pc, #24] @ (800b694 <memp_free+0x24>)
- 800b67a: f853 0020 ldr.w r0, [r3, r0, lsl #2]
- 800b67e: f7ff ff69 bl 800b554 <do_memp_free_pool>
- #ifdef LWIP_HOOK_MEMP_AVAILABLE
- if (old_first == NULL) {
- LWIP_HOOK_MEMP_AVAILABLE(type);
- }
- #endif
- }
- 800b682: bd08 pop {r3, pc}
- LWIP_ERROR("memp_free: type < MEMP_MAX", (type < MEMP_MAX), return;);
- 800b684: 4b04 ldr r3, [pc, #16] @ (800b698 <memp_free+0x28>)
- 800b686: f44f 72d5 mov.w r2, #426 @ 0x1aa
- 800b68a: 4904 ldr r1, [pc, #16] @ (800b69c <memp_free+0x2c>)
- 800b68c: 4804 ldr r0, [pc, #16] @ (800b6a0 <memp_free+0x30>)
- 800b68e: f007 febb bl 8013408 <iprintf>
- 800b692: e7f6 b.n 800b682 <memp_free+0x12>
- 800b694: 08015c64 .word 0x08015c64
- 800b698: 08015b70 .word 0x08015b70
- 800b69c: 08015c48 .word 0x08015c48
- 800b6a0: 080144e8 .word 0x080144e8
- 0800b6a4 <netbuf_delete>:
- * @param buf pointer to a netbuf allocated by netbuf_new()
- */
- void
- netbuf_delete(struct netbuf *buf)
- {
- if (buf != NULL) {
- 800b6a4: b168 cbz r0, 800b6c2 <netbuf_delete+0x1e>
- {
- 800b6a6: b510 push {r4, lr}
- 800b6a8: 4604 mov r4, r0
- if (buf->p != NULL) {
- 800b6aa: 6800 ldr r0, [r0, #0]
- 800b6ac: b120 cbz r0, 800b6b8 <netbuf_delete+0x14>
- pbuf_free(buf->p);
- 800b6ae: f000 fb77 bl 800bda0 <pbuf_free>
- buf->p = buf->ptr = NULL;
- 800b6b2: 2300 movs r3, #0
- 800b6b4: 6063 str r3, [r4, #4]
- 800b6b6: 6023 str r3, [r4, #0]
- }
- memp_free(MEMP_NETBUF, buf);
- 800b6b8: 4621 mov r1, r4
- 800b6ba: 2006 movs r0, #6
- 800b6bc: f7ff ffd8 bl 800b670 <memp_free>
- }
- }
- 800b6c0: bd10 pop {r4, pc}
- 800b6c2: 4770 bx lr
- 0800b6c4 <netbuf_free>:
- *
- * @param buf pointer to the netbuf which contains the packet buffer to free
- */
- void
- netbuf_free(struct netbuf *buf)
- {
- 800b6c4: b510 push {r4, lr}
- LWIP_ERROR("netbuf_free: invalid buf", (buf != NULL), return;);
- 800b6c6: b140 cbz r0, 800b6da <netbuf_free+0x16>
- 800b6c8: 4604 mov r4, r0
- if (buf->p != NULL) {
- 800b6ca: 6800 ldr r0, [r0, #0]
- 800b6cc: b108 cbz r0, 800b6d2 <netbuf_free+0xe>
- pbuf_free(buf->p);
- 800b6ce: f000 fb67 bl 800bda0 <pbuf_free>
- }
- buf->p = buf->ptr = NULL;
- 800b6d2: 2300 movs r3, #0
- 800b6d4: 6063 str r3, [r4, #4]
- 800b6d6: 6023 str r3, [r4, #0]
- #if LWIP_CHECKSUM_ON_COPY
- buf->flags = 0;
- buf->toport_chksum = 0;
- #endif /* LWIP_CHECKSUM_ON_COPY */
- }
- 800b6d8: bd10 pop {r4, pc}
- LWIP_ERROR("netbuf_free: invalid buf", (buf != NULL), return;);
- 800b6da: 4b03 ldr r3, [pc, #12] @ (800b6e8 <netbuf_free+0x24>)
- 800b6dc: 2281 movs r2, #129 @ 0x81
- 800b6de: 4903 ldr r1, [pc, #12] @ (800b6ec <netbuf_free+0x28>)
- 800b6e0: 4803 ldr r0, [pc, #12] @ (800b6f0 <netbuf_free+0x2c>)
- 800b6e2: f007 fe91 bl 8013408 <iprintf>
- 800b6e6: e7f7 b.n 800b6d8 <netbuf_free+0x14>
- 800b6e8: 08015e00 .word 0x08015e00
- 800b6ec: 08015ea0 .word 0x08015ea0
- 800b6f0: 080144e8 .word 0x080144e8
- 0800b6f4 <netbuf_ref>:
- * @return ERR_OK if data is referenced
- * ERR_MEM if data couldn't be referenced due to lack of memory
- */
- err_t
- netbuf_ref(struct netbuf *buf, const void *dataptr, u16_t size)
- {
- 800b6f4: b570 push {r4, r5, r6, lr}
- LWIP_ERROR("netbuf_ref: invalid buf", (buf != NULL), return ERR_ARG;);
- 800b6f6: b1b0 cbz r0, 800b726 <netbuf_ref+0x32>
- 800b6f8: 460e mov r6, r1
- 800b6fa: 4615 mov r5, r2
- 800b6fc: 4604 mov r4, r0
- if (buf->p != NULL) {
- 800b6fe: 6800 ldr r0, [r0, #0]
- 800b700: b108 cbz r0, 800b706 <netbuf_ref+0x12>
- pbuf_free(buf->p);
- 800b702: f000 fb4d bl 800bda0 <pbuf_free>
- }
- buf->p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF);
- 800b706: 2241 movs r2, #65 @ 0x41
- 800b708: 2100 movs r1, #0
- 800b70a: 2036 movs r0, #54 @ 0x36
- 800b70c: f000 fbb0 bl 800be70 <pbuf_alloc>
- 800b710: 6020 str r0, [r4, #0]
- if (buf->p == NULL) {
- 800b712: b188 cbz r0, 800b738 <netbuf_ref+0x44>
- buf->ptr = NULL;
- return ERR_MEM;
- }
- ((struct pbuf_rom *)buf->p)->payload = dataptr;
- 800b714: 6046 str r6, [r0, #4]
- buf->p->len = buf->p->tot_len = size;
- 800b716: 6823 ldr r3, [r4, #0]
- 800b718: 811d strh r5, [r3, #8]
- 800b71a: 6823 ldr r3, [r4, #0]
- 800b71c: 815d strh r5, [r3, #10]
- buf->ptr = buf->p;
- 800b71e: 6823 ldr r3, [r4, #0]
- 800b720: 6063 str r3, [r4, #4]
- return ERR_OK;
- 800b722: 2000 movs r0, #0
- }
- 800b724: bd70 pop {r4, r5, r6, pc}
- LWIP_ERROR("netbuf_ref: invalid buf", (buf != NULL), return ERR_ARG;);
- 800b726: 4b07 ldr r3, [pc, #28] @ (800b744 <netbuf_ref+0x50>)
- 800b728: 2299 movs r2, #153 @ 0x99
- 800b72a: 4907 ldr r1, [pc, #28] @ (800b748 <netbuf_ref+0x54>)
- 800b72c: 4807 ldr r0, [pc, #28] @ (800b74c <netbuf_ref+0x58>)
- 800b72e: f007 fe6b bl 8013408 <iprintf>
- 800b732: f06f 000f mvn.w r0, #15
- 800b736: e7f5 b.n 800b724 <netbuf_ref+0x30>
- buf->ptr = NULL;
- 800b738: 2300 movs r3, #0
- 800b73a: 6063 str r3, [r4, #4]
- return ERR_MEM;
- 800b73c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800b740: e7f0 b.n 800b724 <netbuf_ref+0x30>
- 800b742: bf00 nop
- 800b744: 08015e00 .word 0x08015e00
- 800b748: 08015ebc .word 0x08015ebc
- 800b74c: 080144e8 .word 0x080144e8
- 0800b750 <netif_do_set_netmask>:
- static int
- netif_do_set_netmask(struct netif *netif, const ip4_addr_t *netmask, ip_addr_t *old_nm)
- {
- /* address is actually being changed? */
- if (ip4_addr_cmp(netmask, netif_ip4_netmask(netif)) == 0) {
- 800b750: 680b ldr r3, [r1, #0]
- 800b752: 6882 ldr r2, [r0, #8]
- 800b754: 4293 cmp r3, r2
- 800b756: d002 beq.n 800b75e <netif_do_set_netmask+0xe>
- #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);
- 800b758: 6083 str r3, [r0, #8]
- netif->name[0], netif->name[1],
- ip4_addr1_16(netif_ip4_netmask(netif)),
- ip4_addr2_16(netif_ip4_netmask(netif)),
- ip4_addr3_16(netif_ip4_netmask(netif)),
- ip4_addr4_16(netif_ip4_netmask(netif))));
- return 1; /* netmask changed */
- 800b75a: 2001 movs r0, #1
- 800b75c: 4770 bx lr
- }
- return 0; /* netmask unchanged */
- 800b75e: 2000 movs r0, #0
- }
- 800b760: 4770 bx lr
- 0800b762 <netif_do_set_gw>:
- static int
- netif_do_set_gw(struct netif *netif, const ip4_addr_t *gw, ip_addr_t *old_gw)
- {
- /* address is actually being changed? */
- if (ip4_addr_cmp(gw, netif_ip4_gw(netif)) == 0) {
- 800b762: 680b ldr r3, [r1, #0]
- 800b764: 68c2 ldr r2, [r0, #12]
- 800b766: 4293 cmp r3, r2
- 800b768: d002 beq.n 800b770 <netif_do_set_gw+0xe>
- 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);
- 800b76a: 60c3 str r3, [r0, #12]
- netif->name[0], netif->name[1],
- ip4_addr1_16(netif_ip4_gw(netif)),
- ip4_addr2_16(netif_ip4_gw(netif)),
- ip4_addr3_16(netif_ip4_gw(netif)),
- ip4_addr4_16(netif_ip4_gw(netif))));
- return 1; /* gateway changed */
- 800b76c: 2001 movs r0, #1
- 800b76e: 4770 bx lr
- }
- return 0; /* gateway unchanged */
- 800b770: 2000 movs r0, #0
- }
- 800b772: 4770 bx lr
- 0800b774 <netif_null_output_ip4>:
- LWIP_UNUSED_ARG(netif);
- LWIP_UNUSED_ARG(p);
- LWIP_UNUSED_ARG(ipaddr);
- return ERR_IF;
- }
- 800b774: f06f 000b mvn.w r0, #11
- 800b778: 4770 bx lr
- 0800b77a <netif_do_ip_addr_changed>:
- {
- 800b77a: b538 push {r3, r4, r5, lr}
- 800b77c: 4604 mov r4, r0
- 800b77e: 460d mov r5, r1
- tcp_netif_ip_addr_changed(old_addr, new_addr);
- 800b780: f002 f956 bl 800da30 <tcp_netif_ip_addr_changed>
- udp_netif_ip_addr_changed(old_addr, new_addr);
- 800b784: 4629 mov r1, r5
- 800b786: 4620 mov r0, r4
- 800b788: f006 fbc4 bl 8011f14 <udp_netif_ip_addr_changed>
- }
- 800b78c: bd38 pop {r3, r4, r5, pc}
- ...
- 0800b790 <netif_issue_reports>:
- {
- 800b790: b538 push {r3, r4, r5, lr}
- 800b792: 460c mov r4, r1
- LWIP_ASSERT("netif_issue_reports: invalid netif", netif != NULL);
- 800b794: 4605 mov r5, r0
- 800b796: b170 cbz r0, 800b7b6 <netif_issue_reports+0x26>
- if (!(netif->flags & NETIF_FLAG_LINK_UP) ||
- 800b798: f895 3031 ldrb.w r3, [r5, #49] @ 0x31
- 800b79c: f003 0205 and.w r2, r3, #5
- 800b7a0: 2a05 cmp r2, #5
- 800b7a2: d107 bne.n 800b7b4 <netif_issue_reports+0x24>
- if ((report_type & NETIF_REPORT_TYPE_IPV4) &&
- 800b7a4: f014 0f01 tst.w r4, #1
- 800b7a8: d004 beq.n 800b7b4 <netif_issue_reports+0x24>
- !ip4_addr_isany_val(*netif_ip4_addr(netif))) {
- 800b7aa: 686a ldr r2, [r5, #4]
- if ((report_type & NETIF_REPORT_TYPE_IPV4) &&
- 800b7ac: b112 cbz r2, 800b7b4 <netif_issue_reports+0x24>
- if (netif->flags & (NETIF_FLAG_ETHARP)) {
- 800b7ae: f013 0f08 tst.w r3, #8
- 800b7b2: d108 bne.n 800b7c6 <netif_issue_reports+0x36>
- }
- 800b7b4: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("netif_issue_reports: invalid netif", netif != NULL);
- 800b7b6: 4b06 ldr r3, [pc, #24] @ (800b7d0 <netif_issue_reports+0x40>)
- 800b7b8: f240 326d movw r2, #877 @ 0x36d
- 800b7bc: 4905 ldr r1, [pc, #20] @ (800b7d4 <netif_issue_reports+0x44>)
- 800b7be: 4806 ldr r0, [pc, #24] @ (800b7d8 <netif_issue_reports+0x48>)
- 800b7c0: f007 fe22 bl 8013408 <iprintf>
- 800b7c4: e7e8 b.n 800b798 <netif_issue_reports+0x8>
- etharp_gratuitous(netif);
- 800b7c6: 1d29 adds r1, r5, #4
- 800b7c8: 4628 mov r0, r5
- 800b7ca: f7fe f829 bl 8009820 <etharp_request>
- 800b7ce: e7f1 b.n 800b7b4 <netif_issue_reports+0x24>
- 800b7d0: 08015ed4 .word 0x08015ed4
- 800b7d4: 08015f34 .word 0x08015f34
- 800b7d8: 080144e8 .word 0x080144e8
- 0800b7dc <netif_do_set_ipaddr>:
- {
- 800b7dc: b570 push {r4, r5, r6, lr}
- 800b7de: b082 sub sp, #8
- 800b7e0: 4604 mov r4, r0
- 800b7e2: 4615 mov r5, r2
- LWIP_ASSERT("invalid pointer", ipaddr != NULL);
- 800b7e4: 460e mov r6, r1
- 800b7e6: b139 cbz r1, 800b7f8 <netif_do_set_ipaddr+0x1c>
- LWIP_ASSERT("invalid pointer", old_addr != NULL);
- 800b7e8: b175 cbz r5, 800b808 <netif_do_set_ipaddr+0x2c>
- if (ip4_addr_cmp(ipaddr, netif_ip4_addr(netif)) == 0) {
- 800b7ea: 6832 ldr r2, [r6, #0]
- 800b7ec: 6863 ldr r3, [r4, #4]
- 800b7ee: 429a cmp r2, r3
- 800b7f0: d112 bne.n 800b818 <netif_do_set_ipaddr+0x3c>
- return 0; /* address unchanged */
- 800b7f2: 2000 movs r0, #0
- }
- 800b7f4: b002 add sp, #8
- 800b7f6: bd70 pop {r4, r5, r6, pc}
- LWIP_ASSERT("invalid pointer", ipaddr != NULL);
- 800b7f8: 4b10 ldr r3, [pc, #64] @ (800b83c <netif_do_set_ipaddr+0x60>)
- 800b7fa: f240 12cb movw r2, #459 @ 0x1cb
- 800b7fe: 4910 ldr r1, [pc, #64] @ (800b840 <netif_do_set_ipaddr+0x64>)
- 800b800: 4810 ldr r0, [pc, #64] @ (800b844 <netif_do_set_ipaddr+0x68>)
- 800b802: f007 fe01 bl 8013408 <iprintf>
- 800b806: e7ef b.n 800b7e8 <netif_do_set_ipaddr+0xc>
- LWIP_ASSERT("invalid pointer", old_addr != NULL);
- 800b808: 4b0c ldr r3, [pc, #48] @ (800b83c <netif_do_set_ipaddr+0x60>)
- 800b80a: f44f 72e6 mov.w r2, #460 @ 0x1cc
- 800b80e: 490c ldr r1, [pc, #48] @ (800b840 <netif_do_set_ipaddr+0x64>)
- 800b810: 480c ldr r0, [pc, #48] @ (800b844 <netif_do_set_ipaddr+0x68>)
- 800b812: f007 fdf9 bl 8013408 <iprintf>
- 800b816: e7e8 b.n 800b7ea <netif_do_set_ipaddr+0xe>
- *ip_2_ip4(&new_addr) = *ipaddr;
- 800b818: 9201 str r2, [sp, #4]
- ip_addr_copy(*old_addr, *netif_ip_addr4(netif));
- 800b81a: 602b str r3, [r5, #0]
- netif_do_ip_addr_changed(old_addr, &new_addr);
- 800b81c: a901 add r1, sp, #4
- 800b81e: 4628 mov r0, r5
- 800b820: f7ff ffab bl 800b77a <netif_do_ip_addr_changed>
- ip4_addr_set(ip_2_ip4(&netif->ip_addr), ipaddr);
- 800b824: b13e cbz r6, 800b836 <netif_do_set_ipaddr+0x5a>
- 800b826: 6833 ldr r3, [r6, #0]
- 800b828: 6063 str r3, [r4, #4]
- netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4);
- 800b82a: 2101 movs r1, #1
- 800b82c: 4620 mov r0, r4
- 800b82e: f7ff ffaf bl 800b790 <netif_issue_reports>
- return 1; /* address changed */
- 800b832: 2001 movs r0, #1
- 800b834: e7de b.n 800b7f4 <netif_do_set_ipaddr+0x18>
- ip4_addr_set(ip_2_ip4(&netif->ip_addr), ipaddr);
- 800b836: 2300 movs r3, #0
- 800b838: e7f6 b.n 800b828 <netif_do_set_ipaddr+0x4c>
- 800b83a: bf00 nop
- 800b83c: 08015ed4 .word 0x08015ed4
- 800b840: 08015f58 .word 0x08015f58
- 800b844: 080144e8 .word 0x080144e8
- 0800b848 <netif_init>:
- }
- 800b848: 4770 bx lr
- ...
- 0800b84c <netif_set_addr>:
- {
- 800b84c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 800b850: b082 sub sp, #8
- 800b852: 4605 mov r5, r0
- 800b854: 460c mov r4, r1
- 800b856: 4617 mov r7, r2
- 800b858: 461e mov r6, r3
- LWIP_ASSERT_CORE_LOCKED();
- 800b85a: f7f8 f957 bl 8003b0c <sys_check_core_locking>
- if (ipaddr == NULL) {
- 800b85e: b1dc cbz r4, 800b898 <netif_set_addr+0x4c>
- if (netmask == NULL) {
- 800b860: b1e7 cbz r7, 800b89c <netif_set_addr+0x50>
- if (gw == NULL) {
- 800b862: b1ee cbz r6, 800b8a0 <netif_set_addr+0x54>
- remove = ip4_addr_isany(ipaddr);
- 800b864: b10c cbz r4, 800b86a <netif_set_addr+0x1e>
- 800b866: 6823 ldr r3, [r4, #0]
- 800b868: b9e3 cbnz r3, 800b8a4 <netif_set_addr+0x58>
- if (netif_do_set_ipaddr(netif, ipaddr, &old_addr)) {
- 800b86a: aa01 add r2, sp, #4
- 800b86c: 4621 mov r1, r4
- 800b86e: 4628 mov r0, r5
- 800b870: f7ff ffb4 bl 800b7dc <netif_do_set_ipaddr>
- 800b874: f04f 0801 mov.w r8, #1
- if (netif_do_set_netmask(netif, netmask, old_nm)) {
- 800b878: 2200 movs r2, #0
- 800b87a: 4639 mov r1, r7
- 800b87c: 4628 mov r0, r5
- 800b87e: f7ff ff67 bl 800b750 <netif_do_set_netmask>
- if (netif_do_set_gw(netif, gw, old_gw)) {
- 800b882: 2200 movs r2, #0
- 800b884: 4631 mov r1, r6
- 800b886: 4628 mov r0, r5
- 800b888: f7ff ff6b bl 800b762 <netif_do_set_gw>
- if (!remove) {
- 800b88c: f1b8 0f00 cmp.w r8, #0
- 800b890: d00b beq.n 800b8aa <netif_set_addr+0x5e>
- }
- 800b892: b002 add sp, #8
- 800b894: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- ipaddr = IP4_ADDR_ANY4;
- 800b898: 4c07 ldr r4, [pc, #28] @ (800b8b8 <netif_set_addr+0x6c>)
- 800b89a: e7e1 b.n 800b860 <netif_set_addr+0x14>
- netmask = IP4_ADDR_ANY4;
- 800b89c: 4f06 ldr r7, [pc, #24] @ (800b8b8 <netif_set_addr+0x6c>)
- 800b89e: e7e0 b.n 800b862 <netif_set_addr+0x16>
- gw = IP4_ADDR_ANY4;
- 800b8a0: 4e05 ldr r6, [pc, #20] @ (800b8b8 <netif_set_addr+0x6c>)
- 800b8a2: e7df b.n 800b864 <netif_set_addr+0x18>
- remove = ip4_addr_isany(ipaddr);
- 800b8a4: f04f 0800 mov.w r8, #0
- 800b8a8: e7e6 b.n 800b878 <netif_set_addr+0x2c>
- if (netif_do_set_ipaddr(netif, ipaddr, &old_addr)) {
- 800b8aa: aa01 add r2, sp, #4
- 800b8ac: 4621 mov r1, r4
- 800b8ae: 4628 mov r0, r5
- 800b8b0: f7ff ff94 bl 800b7dc <netif_do_set_ipaddr>
- }
- 800b8b4: e7ed b.n 800b892 <netif_set_addr+0x46>
- 800b8b6: bf00 nop
- 800b8b8: 080156d8 .word 0x080156d8
- 0800b8bc <netif_add>:
- {
- 800b8bc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 800b8c0: 4606 mov r6, r0
- 800b8c2: 460c mov r4, r1
- 800b8c4: 4615 mov r5, r2
- 800b8c6: 461f mov r7, r3
- 800b8c8: f8dd 801c ldr.w r8, [sp, #28]
- LWIP_ASSERT_CORE_LOCKED();
- 800b8cc: f7f8 f91e bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("netif_add: invalid netif", netif != NULL, return NULL);
- 800b8d0: b33e cbz r6, 800b922 <netif_add+0x66>
- LWIP_ERROR("netif_add: No init function given", init != NULL, return NULL);
- 800b8d2: f1b8 0f00 cmp.w r8, #0
- 800b8d6: d02d beq.n 800b934 <netif_add+0x78>
- if (ipaddr == NULL) {
- 800b8d8: 2c00 cmp r4, #0
- 800b8da: d034 beq.n 800b946 <netif_add+0x8a>
- if (netmask == NULL) {
- 800b8dc: 2d00 cmp r5, #0
- 800b8de: d034 beq.n 800b94a <netif_add+0x8e>
- if (gw == NULL) {
- 800b8e0: 2f00 cmp r7, #0
- 800b8e2: d034 beq.n 800b94e <netif_add+0x92>
- ip_addr_set_zero_ip4(&netif->ip_addr);
- 800b8e4: 2000 movs r0, #0
- 800b8e6: 6070 str r0, [r6, #4]
- ip_addr_set_zero_ip4(&netif->netmask);
- 800b8e8: 60b0 str r0, [r6, #8]
- ip_addr_set_zero_ip4(&netif->gw);
- 800b8ea: 60f0 str r0, [r6, #12]
- netif->output = netif_null_output_ip4;
- 800b8ec: 4b38 ldr r3, [pc, #224] @ (800b9d0 <netif_add+0x114>)
- 800b8ee: 6173 str r3, [r6, #20]
- netif->mtu = 0;
- 800b8f0: 8530 strh r0, [r6, #40] @ 0x28
- netif->flags = 0;
- 800b8f2: f886 0031 strb.w r0, [r6, #49] @ 0x31
- memset(netif->client_data, 0, sizeof(netif->client_data));
- 800b8f6: 6270 str r0, [r6, #36] @ 0x24
- netif->link_callback = NULL;
- 800b8f8: 61f0 str r0, [r6, #28]
- netif->state = state;
- 800b8fa: 9b06 ldr r3, [sp, #24]
- 800b8fc: 6233 str r3, [r6, #32]
- netif->num = netif_num;
- 800b8fe: 4b35 ldr r3, [pc, #212] @ (800b9d4 <netif_add+0x118>)
- 800b900: 781b ldrb r3, [r3, #0]
- 800b902: f886 3034 strb.w r3, [r6, #52] @ 0x34
- netif->input = input;
- 800b906: 9b08 ldr r3, [sp, #32]
- 800b908: 6133 str r3, [r6, #16]
- netif_set_addr(netif, ipaddr, netmask, gw);
- 800b90a: 463b mov r3, r7
- 800b90c: 462a mov r2, r5
- 800b90e: 4621 mov r1, r4
- 800b910: 4630 mov r0, r6
- 800b912: f7ff ff9b bl 800b84c <netif_set_addr>
- if (init(netif) != ERR_OK) {
- 800b916: 4630 mov r0, r6
- 800b918: 47c0 blx r8
- 800b91a: 2800 cmp r0, #0
- 800b91c: d03e beq.n 800b99c <netif_add+0xe0>
- return NULL;
- 800b91e: 2000 movs r0, #0
- 800b920: e050 b.n 800b9c4 <netif_add+0x108>
- LWIP_ERROR("netif_add: invalid netif", netif != NULL, return NULL);
- 800b922: 4b2d ldr r3, [pc, #180] @ (800b9d8 <netif_add+0x11c>)
- 800b924: f240 1227 movw r2, #295 @ 0x127
- 800b928: 492c ldr r1, [pc, #176] @ (800b9dc <netif_add+0x120>)
- 800b92a: 482d ldr r0, [pc, #180] @ (800b9e0 <netif_add+0x124>)
- 800b92c: f007 fd6c bl 8013408 <iprintf>
- 800b930: 4630 mov r0, r6
- 800b932: e047 b.n 800b9c4 <netif_add+0x108>
- LWIP_ERROR("netif_add: No init function given", init != NULL, return NULL);
- 800b934: 4b28 ldr r3, [pc, #160] @ (800b9d8 <netif_add+0x11c>)
- 800b936: f44f 7294 mov.w r2, #296 @ 0x128
- 800b93a: 492a ldr r1, [pc, #168] @ (800b9e4 <netif_add+0x128>)
- 800b93c: 4828 ldr r0, [pc, #160] @ (800b9e0 <netif_add+0x124>)
- 800b93e: f007 fd63 bl 8013408 <iprintf>
- 800b942: 2000 movs r0, #0
- 800b944: e03e b.n 800b9c4 <netif_add+0x108>
- ipaddr = ip_2_ip4(IP4_ADDR_ANY);
- 800b946: 4c28 ldr r4, [pc, #160] @ (800b9e8 <netif_add+0x12c>)
- 800b948: e7c8 b.n 800b8dc <netif_add+0x20>
- netmask = ip_2_ip4(IP4_ADDR_ANY);
- 800b94a: 4d27 ldr r5, [pc, #156] @ (800b9e8 <netif_add+0x12c>)
- 800b94c: e7c8 b.n 800b8e0 <netif_add+0x24>
- gw = ip_2_ip4(IP4_ADDR_ANY);
- 800b94e: 4f26 ldr r7, [pc, #152] @ (800b9e8 <netif_add+0x12c>)
- 800b950: e7c8 b.n 800b8e4 <netif_add+0x28>
- netif->num = 0;
- 800b952: 2300 movs r3, #0
- 800b954: f886 3034 strb.w r3, [r6, #52] @ 0x34
- 800b958: e024 b.n 800b9a4 <netif_add+0xe8>
- LWIP_ASSERT("netif already added", netif2 != netif);
- 800b95a: 4b1f ldr r3, [pc, #124] @ (800b9d8 <netif_add+0x11c>)
- 800b95c: f240 128b movw r2, #395 @ 0x18b
- 800b960: 4922 ldr r1, [pc, #136] @ (800b9ec <netif_add+0x130>)
- 800b962: 481f ldr r0, [pc, #124] @ (800b9e0 <netif_add+0x124>)
- 800b964: f007 fd50 bl 8013408 <iprintf>
- 800b968: e009 b.n 800b97e <netif_add+0xc2>
- if (netif2->num == netif->num) {
- 800b96a: f894 2034 ldrb.w r2, [r4, #52] @ 0x34
- 800b96e: f896 3034 ldrb.w r3, [r6, #52] @ 0x34
- 800b972: 429a cmp r2, r3
- 800b974: d00e beq.n 800b994 <netif_add+0xd8>
- for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) {
- 800b976: 6824 ldr r4, [r4, #0]
- 800b978: b17c cbz r4, 800b99a <netif_add+0xde>
- LWIP_ASSERT("netif already added", netif2 != netif);
- 800b97a: 42a6 cmp r6, r4
- 800b97c: d0ed beq.n 800b95a <netif_add+0x9e>
- num_netifs++;
- 800b97e: 3501 adds r5, #1
- LWIP_ASSERT("too many netifs, max. supported number is 255", num_netifs <= 255);
- 800b980: 2dff cmp r5, #255 @ 0xff
- 800b982: ddf2 ble.n 800b96a <netif_add+0xae>
- 800b984: 4b14 ldr r3, [pc, #80] @ (800b9d8 <netif_add+0x11c>)
- 800b986: f240 128d movw r2, #397 @ 0x18d
- 800b98a: 4919 ldr r1, [pc, #100] @ (800b9f0 <netif_add+0x134>)
- 800b98c: 4814 ldr r0, [pc, #80] @ (800b9e0 <netif_add+0x124>)
- 800b98e: f007 fd3b bl 8013408 <iprintf>
- 800b992: e7ea b.n 800b96a <netif_add+0xae>
- netif->num++;
- 800b994: 3301 adds r3, #1
- 800b996: f886 3034 strb.w r3, [r6, #52] @ 0x34
- } while (netif2 != NULL);
- 800b99a: b13c cbz r4, 800b9ac <netif_add+0xf0>
- if (netif->num == 255) {
- 800b99c: f896 3034 ldrb.w r3, [r6, #52] @ 0x34
- 800b9a0: 2bff cmp r3, #255 @ 0xff
- 800b9a2: d0d6 beq.n 800b952 <netif_add+0x96>
- for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) {
- 800b9a4: 4b13 ldr r3, [pc, #76] @ (800b9f4 <netif_add+0x138>)
- 800b9a6: 681c ldr r4, [r3, #0]
- num_netifs = 0;
- 800b9a8: 2500 movs r5, #0
- for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) {
- 800b9aa: e7e5 b.n 800b978 <netif_add+0xbc>
- if (netif->num == 254) {
- 800b9ac: f896 3034 ldrb.w r3, [r6, #52] @ 0x34
- 800b9b0: 2bfe cmp r3, #254 @ 0xfe
- 800b9b2: d009 beq.n 800b9c8 <netif_add+0x10c>
- netif_num = (u8_t)(netif->num + 1);
- 800b9b4: 3301 adds r3, #1
- 800b9b6: 4a07 ldr r2, [pc, #28] @ (800b9d4 <netif_add+0x118>)
- 800b9b8: 7013 strb r3, [r2, #0]
- netif->next = netif_list;
- 800b9ba: 4b0e ldr r3, [pc, #56] @ (800b9f4 <netif_add+0x138>)
- 800b9bc: 681a ldr r2, [r3, #0]
- 800b9be: 6032 str r2, [r6, #0]
- netif_list = netif;
- 800b9c0: 601e str r6, [r3, #0]
- return netif;
- 800b9c2: 4630 mov r0, r6
- }
- 800b9c4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- netif_num = 0;
- 800b9c8: 4b02 ldr r3, [pc, #8] @ (800b9d4 <netif_add+0x118>)
- 800b9ca: 2200 movs r2, #0
- 800b9cc: 701a strb r2, [r3, #0]
- 800b9ce: e7f4 b.n 800b9ba <netif_add+0xfe>
- 800b9d0: 0800b775 .word 0x0800b775
- 800b9d4: 24019b7b .word 0x24019b7b
- 800b9d8: 08015ed4 .word 0x08015ed4
- 800b9dc: 08015f68 .word 0x08015f68
- 800b9e0: 080144e8 .word 0x080144e8
- 800b9e4: 08015f84 .word 0x08015f84
- 800b9e8: 080156d8 .word 0x080156d8
- 800b9ec: 08015fa8 .word 0x08015fa8
- 800b9f0: 08015fbc .word 0x08015fbc
- 800b9f4: 24019b80 .word 0x24019b80
- 0800b9f8 <netif_set_default>:
- {
- 800b9f8: b510 push {r4, lr}
- 800b9fa: 4604 mov r4, r0
- LWIP_ASSERT_CORE_LOCKED();
- 800b9fc: f7f8 f886 bl 8003b0c <sys_check_core_locking>
- netif_default = netif;
- 800ba00: 4b01 ldr r3, [pc, #4] @ (800ba08 <netif_set_default+0x10>)
- 800ba02: 601c str r4, [r3, #0]
- }
- 800ba04: bd10 pop {r4, pc}
- 800ba06: bf00 nop
- 800ba08: 24019b7c .word 0x24019b7c
- 0800ba0c <netif_set_up>:
- {
- 800ba0c: b510 push {r4, lr}
- 800ba0e: 4604 mov r4, r0
- LWIP_ASSERT_CORE_LOCKED();
- 800ba10: f7f8 f87c bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("netif_set_up: invalid netif", netif != NULL, return);
- 800ba14: b12c cbz r4, 800ba22 <netif_set_up+0x16>
- if (!(netif->flags & NETIF_FLAG_UP)) {
- 800ba16: f894 3031 ldrb.w r3, [r4, #49] @ 0x31
- 800ba1a: f013 0f01 tst.w r3, #1
- 800ba1e: d008 beq.n 800ba32 <netif_set_up+0x26>
- }
- 800ba20: bd10 pop {r4, pc}
- LWIP_ERROR("netif_set_up: invalid netif", netif != NULL, return);
- 800ba22: 4b08 ldr r3, [pc, #32] @ (800ba44 <netif_set_up+0x38>)
- 800ba24: f44f 7254 mov.w r2, #848 @ 0x350
- 800ba28: 4907 ldr r1, [pc, #28] @ (800ba48 <netif_set_up+0x3c>)
- 800ba2a: 4808 ldr r0, [pc, #32] @ (800ba4c <netif_set_up+0x40>)
- 800ba2c: f007 fcec bl 8013408 <iprintf>
- 800ba30: e7f6 b.n 800ba20 <netif_set_up+0x14>
- netif_set_flags(netif, NETIF_FLAG_UP);
- 800ba32: f043 0301 orr.w r3, r3, #1
- 800ba36: f884 3031 strb.w r3, [r4, #49] @ 0x31
- netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4 | NETIF_REPORT_TYPE_IPV6);
- 800ba3a: 2103 movs r1, #3
- 800ba3c: 4620 mov r0, r4
- 800ba3e: f7ff fea7 bl 800b790 <netif_issue_reports>
- 800ba42: e7ed b.n 800ba20 <netif_set_up+0x14>
- 800ba44: 08015ed4 .word 0x08015ed4
- 800ba48: 08015fec .word 0x08015fec
- 800ba4c: 080144e8 .word 0x080144e8
- 0800ba50 <netif_set_down>:
- {
- 800ba50: b510 push {r4, lr}
- 800ba52: 4604 mov r4, r0
- LWIP_ASSERT_CORE_LOCKED();
- 800ba54: f7f8 f85a bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("netif_set_down: invalid netif", netif != NULL, return);
- 800ba58: b164 cbz r4, 800ba74 <netif_set_down+0x24>
- if (netif->flags & NETIF_FLAG_UP) {
- 800ba5a: f894 3031 ldrb.w r3, [r4, #49] @ 0x31
- 800ba5e: f013 0f01 tst.w r3, #1
- 800ba62: d006 beq.n 800ba72 <netif_set_down+0x22>
- netif_clear_flags(netif, NETIF_FLAG_UP);
- 800ba64: f003 02fe and.w r2, r3, #254 @ 0xfe
- 800ba68: f884 2031 strb.w r2, [r4, #49] @ 0x31
- if (netif->flags & NETIF_FLAG_ETHARP) {
- 800ba6c: f013 0f08 tst.w r3, #8
- 800ba70: d108 bne.n 800ba84 <netif_set_down+0x34>
- }
- 800ba72: bd10 pop {r4, pc}
- LWIP_ERROR("netif_set_down: invalid netif", netif != NULL, return);
- 800ba74: 4b05 ldr r3, [pc, #20] @ (800ba8c <netif_set_down+0x3c>)
- 800ba76: f240 329b movw r2, #923 @ 0x39b
- 800ba7a: 4905 ldr r1, [pc, #20] @ (800ba90 <netif_set_down+0x40>)
- 800ba7c: 4805 ldr r0, [pc, #20] @ (800ba94 <netif_set_down+0x44>)
- 800ba7e: f007 fcc3 bl 8013408 <iprintf>
- 800ba82: e7f6 b.n 800ba72 <netif_set_down+0x22>
- etharp_cleanup_netif(netif);
- 800ba84: 4620 mov r0, r4
- 800ba86: f7fd fe49 bl 800971c <etharp_cleanup_netif>
- NETIF_STATUS_CALLBACK(netif);
- 800ba8a: e7f2 b.n 800ba72 <netif_set_down+0x22>
- 800ba8c: 08015ed4 .word 0x08015ed4
- 800ba90: 08016008 .word 0x08016008
- 800ba94: 080144e8 .word 0x080144e8
- 0800ba98 <netif_set_link_up>:
- {
- 800ba98: b510 push {r4, lr}
- 800ba9a: 4604 mov r4, r0
- LWIP_ASSERT_CORE_LOCKED();
- 800ba9c: f7f8 f836 bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("netif_set_link_up: invalid netif", netif != NULL, return);
- 800baa0: b12c cbz r4, 800baae <netif_set_link_up+0x16>
- if (!(netif->flags & NETIF_FLAG_LINK_UP)) {
- 800baa2: f894 3031 ldrb.w r3, [r4, #49] @ 0x31
- 800baa6: f013 0f04 tst.w r3, #4
- 800baaa: d008 beq.n 800babe <netif_set_link_up+0x26>
- }
- 800baac: bd10 pop {r4, pc}
- LWIP_ERROR("netif_set_link_up: invalid netif", netif != NULL, return);
- 800baae: 4b0c ldr r3, [pc, #48] @ (800bae0 <netif_set_link_up+0x48>)
- 800bab0: f44f 7278 mov.w r2, #992 @ 0x3e0
- 800bab4: 490b ldr r1, [pc, #44] @ (800bae4 <netif_set_link_up+0x4c>)
- 800bab6: 480c ldr r0, [pc, #48] @ (800bae8 <netif_set_link_up+0x50>)
- 800bab8: f007 fca6 bl 8013408 <iprintf>
- 800babc: e7f6 b.n 800baac <netif_set_link_up+0x14>
- netif_set_flags(netif, NETIF_FLAG_LINK_UP);
- 800babe: f043 0304 orr.w r3, r3, #4
- 800bac2: f884 3031 strb.w r3, [r4, #49] @ 0x31
- dhcp_network_changed(netif);
- 800bac6: 4620 mov r0, r4
- 800bac8: f7fd f9fe bl 8008ec8 <dhcp_network_changed>
- netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4 | NETIF_REPORT_TYPE_IPV6);
- 800bacc: 2103 movs r1, #3
- 800bace: 4620 mov r0, r4
- 800bad0: f7ff fe5e bl 800b790 <netif_issue_reports>
- NETIF_LINK_CALLBACK(netif);
- 800bad4: 69e3 ldr r3, [r4, #28]
- 800bad6: 2b00 cmp r3, #0
- 800bad8: d0e8 beq.n 800baac <netif_set_link_up+0x14>
- 800bada: 4620 mov r0, r4
- 800badc: 4798 blx r3
- 800bade: e7e5 b.n 800baac <netif_set_link_up+0x14>
- 800bae0: 08015ed4 .word 0x08015ed4
- 800bae4: 08016028 .word 0x08016028
- 800bae8: 080144e8 .word 0x080144e8
- 0800baec <netif_set_link_down>:
- {
- 800baec: b510 push {r4, lr}
- 800baee: 4604 mov r4, r0
- LWIP_ASSERT_CORE_LOCKED();
- 800baf0: f7f8 f80c bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("netif_set_link_down: invalid netif", netif != NULL, return);
- 800baf4: b16c cbz r4, 800bb12 <netif_set_link_down+0x26>
- if (netif->flags & NETIF_FLAG_LINK_UP) {
- 800baf6: f894 3031 ldrb.w r3, [r4, #49] @ 0x31
- 800bafa: f013 0f04 tst.w r3, #4
- 800bafe: d007 beq.n 800bb10 <netif_set_link_down+0x24>
- netif_clear_flags(netif, NETIF_FLAG_LINK_UP);
- 800bb00: f003 03fb and.w r3, r3, #251 @ 0xfb
- 800bb04: f884 3031 strb.w r3, [r4, #49] @ 0x31
- NETIF_LINK_CALLBACK(netif);
- 800bb08: 69e3 ldr r3, [r4, #28]
- 800bb0a: b10b cbz r3, 800bb10 <netif_set_link_down+0x24>
- 800bb0c: 4620 mov r0, r4
- 800bb0e: 4798 blx r3
- }
- 800bb10: bd10 pop {r4, pc}
- LWIP_ERROR("netif_set_link_down: invalid netif", netif != NULL, return);
- 800bb12: 4b04 ldr r3, [pc, #16] @ (800bb24 <netif_set_link_down+0x38>)
- 800bb14: f240 4206 movw r2, #1030 @ 0x406
- 800bb18: 4903 ldr r1, [pc, #12] @ (800bb28 <netif_set_link_down+0x3c>)
- 800bb1a: 4804 ldr r0, [pc, #16] @ (800bb2c <netif_set_link_down+0x40>)
- 800bb1c: f007 fc74 bl 8013408 <iprintf>
- 800bb20: e7f6 b.n 800bb10 <netif_set_link_down+0x24>
- 800bb22: bf00 nop
- 800bb24: 08015ed4 .word 0x08015ed4
- 800bb28: 0801604c .word 0x0801604c
- 800bb2c: 080144e8 .word 0x080144e8
- 0800bb30 <netif_set_link_callback>:
- {
- 800bb30: b538 push {r3, r4, r5, lr}
- 800bb32: 4604 mov r4, r0
- 800bb34: 460d mov r5, r1
- LWIP_ASSERT_CORE_LOCKED();
- 800bb36: f7f7 ffe9 bl 8003b0c <sys_check_core_locking>
- if (netif) {
- 800bb3a: b104 cbz r4, 800bb3e <netif_set_link_callback+0xe>
- netif->link_callback = link_callback;
- 800bb3c: 61e5 str r5, [r4, #28]
- }
- 800bb3e: bd38 pop {r3, r4, r5, pc}
- 0800bb40 <netif_get_by_index>:
- *
- * @param idx index of netif to find
- */
- struct netif *
- netif_get_by_index(u8_t idx)
- {
- 800bb40: b510 push {r4, lr}
- 800bb42: 4604 mov r4, r0
- struct netif *netif;
- LWIP_ASSERT_CORE_LOCKED();
- 800bb44: f7f7 ffe2 bl 8003b0c <sys_check_core_locking>
- if (idx != NETIF_NO_INDEX) {
- 800bb48: b154 cbz r4, 800bb60 <netif_get_by_index+0x20>
- NETIF_FOREACH(netif) {
- 800bb4a: 4b06 ldr r3, [pc, #24] @ (800bb64 <netif_get_by_index+0x24>)
- 800bb4c: 6818 ldr r0, [r3, #0]
- 800bb4e: b140 cbz r0, 800bb62 <netif_get_by_index+0x22>
- if (idx == netif_get_index(netif)) {
- 800bb50: f890 3034 ldrb.w r3, [r0, #52] @ 0x34
- 800bb54: 3301 adds r3, #1
- 800bb56: b2db uxtb r3, r3
- 800bb58: 42a3 cmp r3, r4
- 800bb5a: d002 beq.n 800bb62 <netif_get_by_index+0x22>
- NETIF_FOREACH(netif) {
- 800bb5c: 6800 ldr r0, [r0, #0]
- 800bb5e: e7f6 b.n 800bb4e <netif_get_by_index+0xe>
- return netif; /* found! */
- }
- }
- }
- return NULL;
- 800bb60: 2000 movs r0, #0
- }
- 800bb62: bd10 pop {r4, pc}
- 800bb64: 24019b80 .word 0x24019b80
- 0800bb68 <pbuf_init_alloced_pbuf>:
- #endif /* !LWIP_TCP || !TCP_QUEUE_OOSEQ || !PBUF_POOL_FREE_OOSEQ */
- /* Initialize members of struct pbuf after allocation */
- static void
- pbuf_init_alloced_pbuf(struct pbuf *p, void *payload, u16_t tot_len, u16_t len, pbuf_type type, u8_t flags)
- {
- 800bb68: b410 push {r4}
- p->next = NULL;
- 800bb6a: 2400 movs r4, #0
- 800bb6c: 6004 str r4, [r0, #0]
- p->payload = payload;
- 800bb6e: 6041 str r1, [r0, #4]
- p->tot_len = tot_len;
- 800bb70: 8102 strh r2, [r0, #8]
- p->len = len;
- 800bb72: 8143 strh r3, [r0, #10]
- p->type_internal = (u8_t)type;
- 800bb74: f89d 3004 ldrb.w r3, [sp, #4]
- 800bb78: 7303 strb r3, [r0, #12]
- p->flags = flags;
- 800bb7a: f89d 3008 ldrb.w r3, [sp, #8]
- 800bb7e: 7343 strb r3, [r0, #13]
- p->ref = 1;
- 800bb80: 2301 movs r3, #1
- 800bb82: 7383 strb r3, [r0, #14]
- p->if_idx = NETIF_NO_INDEX;
- 800bb84: 73c4 strb r4, [r0, #15]
- }
- 800bb86: f85d 4b04 ldr.w r4, [sp], #4
- 800bb8a: 4770 bx lr
- 0800bb8c <pbuf_add_header_impl>:
- * @return non-zero on failure, zero on success.
- *
- */
- static u8_t
- pbuf_add_header_impl(struct pbuf *p, size_t header_size_increment, u8_t force)
- {
- 800bb8c: b570 push {r4, r5, r6, lr}
- 800bb8e: 460c mov r4, r1
- 800bb90: 4616 mov r6, r2
- u16_t type_internal;
- void *payload;
- u16_t increment_magnitude;
- LWIP_ASSERT("p != NULL", p != NULL);
- 800bb92: 4605 mov r5, r0
- 800bb94: b1c8 cbz r0, 800bbca <pbuf_add_header_impl+0x3e>
- if ((p == NULL) || (header_size_increment > 0xFFFF)) {
- 800bb96: 2d00 cmp r5, #0
- 800bb98: bf18 it ne
- 800bb9a: f5b4 3f80 cmpne.w r4, #65536 @ 0x10000
- 800bb9e: d224 bcs.n 800bbea <pbuf_add_header_impl+0x5e>
- return 1;
- }
- if (header_size_increment == 0) {
- 800bba0: b32c cbz r4, 800bbee <pbuf_add_header_impl+0x62>
- return 0;
- }
- increment_magnitude = (u16_t)header_size_increment;
- 800bba2: b2a2 uxth r2, r4
- /* Do not allow tot_len to wrap as a result. */
- if ((u16_t)(increment_magnitude + p->tot_len) < increment_magnitude) {
- 800bba4: 892b ldrh r3, [r5, #8]
- 800bba6: 4413 add r3, r2
- 800bba8: b29b uxth r3, r3
- 800bbaa: 4293 cmp r3, r2
- 800bbac: d321 bcc.n 800bbf2 <pbuf_add_header_impl+0x66>
- }
- type_internal = p->type_internal;
- /* pbuf types containing payloads? */
- if (type_internal & PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS) {
- 800bbae: f995 100c ldrsb.w r1, [r5, #12]
- 800bbb2: 2900 cmp r1, #0
- 800bbb4: db11 blt.n 800bbda <pbuf_add_header_impl+0x4e>
- return 1;
- }
- /* pbuf types referring to external payloads? */
- } else {
- /* hide a header in the payload? */
- if (force) {
- 800bbb6: b1f6 cbz r6, 800bbf6 <pbuf_add_header_impl+0x6a>
- payload = (u8_t *)p->payload - header_size_increment;
- 800bbb8: 6869 ldr r1, [r5, #4]
- 800bbba: 1b0c subs r4, r1, r4
- }
- 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;
- 800bbbc: 606c str r4, [r5, #4]
- p->len = (u16_t)(p->len + increment_magnitude);
- 800bbbe: 8969 ldrh r1, [r5, #10]
- 800bbc0: 440a add r2, r1
- 800bbc2: 816a strh r2, [r5, #10]
- p->tot_len = (u16_t)(p->tot_len + increment_magnitude);
- 800bbc4: 812b strh r3, [r5, #8]
- return 0;
- 800bbc6: 2000 movs r0, #0
- 800bbc8: e010 b.n 800bbec <pbuf_add_header_impl+0x60>
- LWIP_ASSERT("p != NULL", p != NULL);
- 800bbca: 4b0c ldr r3, [pc, #48] @ (800bbfc <pbuf_add_header_impl+0x70>)
- 800bbcc: f240 12df movw r2, #479 @ 0x1df
- 800bbd0: 490b ldr r1, [pc, #44] @ (800bc00 <pbuf_add_header_impl+0x74>)
- 800bbd2: 480c ldr r0, [pc, #48] @ (800bc04 <pbuf_add_header_impl+0x78>)
- 800bbd4: f007 fc18 bl 8013408 <iprintf>
- 800bbd8: e7dd b.n 800bb96 <pbuf_add_header_impl+0xa>
- payload = (u8_t *)p->payload - header_size_increment;
- 800bbda: 6869 ldr r1, [r5, #4]
- 800bbdc: 1b0c subs r4, r1, r4
- if ((u8_t *)payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) {
- 800bbde: f105 0110 add.w r1, r5, #16
- 800bbe2: 42a1 cmp r1, r4
- 800bbe4: d9ea bls.n 800bbbc <pbuf_add_header_impl+0x30>
- return 1;
- 800bbe6: 2001 movs r0, #1
- 800bbe8: e000 b.n 800bbec <pbuf_add_header_impl+0x60>
- return 1;
- 800bbea: 2001 movs r0, #1
- }
- 800bbec: bd70 pop {r4, r5, r6, pc}
- return 0;
- 800bbee: 2000 movs r0, #0
- 800bbf0: e7fc b.n 800bbec <pbuf_add_header_impl+0x60>
- return 1;
- 800bbf2: 2001 movs r0, #1
- 800bbf4: e7fa b.n 800bbec <pbuf_add_header_impl+0x60>
- return 1;
- 800bbf6: 2001 movs r0, #1
- 800bbf8: e7f8 b.n 800bbec <pbuf_add_header_impl+0x60>
- 800bbfa: bf00 nop
- 800bbfc: 08016070 .word 0x08016070
- 800bc00: 08014fc0 .word 0x08014fc0
- 800bc04: 080144e8 .word 0x080144e8
- 0800bc08 <pbuf_pool_is_empty>:
- {
- 800bc08: b510 push {r4, lr}
- SYS_ARCH_PROTECT(old_level);
- 800bc0a: f001 fa31 bl 800d070 <sys_arch_protect>
- queued = pbuf_free_ooseq_pending;
- 800bc0e: 4b0b ldr r3, [pc, #44] @ (800bc3c <pbuf_pool_is_empty+0x34>)
- 800bc10: 781c ldrb r4, [r3, #0]
- 800bc12: b2e4 uxtb r4, r4
- pbuf_free_ooseq_pending = 1;
- 800bc14: 2201 movs r2, #1
- 800bc16: 701a strb r2, [r3, #0]
- SYS_ARCH_UNPROTECT(old_level);
- 800bc18: f001 fa36 bl 800d088 <sys_arch_unprotect>
- if (!queued) {
- 800bc1c: b104 cbz r4, 800bc20 <pbuf_pool_is_empty+0x18>
- }
- 800bc1e: bd10 pop {r4, pc}
- PBUF_POOL_FREE_OOSEQ_QUEUE_CALL();
- 800bc20: 2100 movs r1, #0
- 800bc22: 4807 ldr r0, [pc, #28] @ (800bc40 <pbuf_pool_is_empty+0x38>)
- 800bc24: f005 fc0e bl 8011444 <tcpip_try_callback>
- 800bc28: 2800 cmp r0, #0
- 800bc2a: d0f8 beq.n 800bc1e <pbuf_pool_is_empty+0x16>
- 800bc2c: f001 fa20 bl 800d070 <sys_arch_protect>
- 800bc30: 4b02 ldr r3, [pc, #8] @ (800bc3c <pbuf_pool_is_empty+0x34>)
- 800bc32: 2200 movs r2, #0
- 800bc34: 701a strb r2, [r3, #0]
- 800bc36: f001 fa27 bl 800d088 <sys_arch_unprotect>
- }
- 800bc3a: e7f0 b.n 800bc1e <pbuf_pool_is_empty+0x16>
- 800bc3c: 24019b84 .word 0x24019b84
- 800bc40: 0800bc75 .word 0x0800bc75
- 0800bc44 <pbuf_free_ooseq>:
- {
- 800bc44: b508 push {r3, lr}
- SYS_ARCH_SET(pbuf_free_ooseq_pending, 0);
- 800bc46: f001 fa13 bl 800d070 <sys_arch_protect>
- 800bc4a: 4b08 ldr r3, [pc, #32] @ (800bc6c <pbuf_free_ooseq+0x28>)
- 800bc4c: 2200 movs r2, #0
- 800bc4e: 701a strb r2, [r3, #0]
- 800bc50: f001 fa1a bl 800d088 <sys_arch_unprotect>
- for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) {
- 800bc54: 4b06 ldr r3, [pc, #24] @ (800bc70 <pbuf_free_ooseq+0x2c>)
- 800bc56: 6818 ldr r0, [r3, #0]
- 800bc58: e000 b.n 800bc5c <pbuf_free_ooseq+0x18>
- 800bc5a: 68c0 ldr r0, [r0, #12]
- 800bc5c: b120 cbz r0, 800bc68 <pbuf_free_ooseq+0x24>
- if (pcb->ooseq != NULL) {
- 800bc5e: 6f43 ldr r3, [r0, #116] @ 0x74
- 800bc60: 2b00 cmp r3, #0
- 800bc62: d0fa beq.n 800bc5a <pbuf_free_ooseq+0x16>
- tcp_free_ooseq(pcb);
- 800bc64: f001 fd4c bl 800d700 <tcp_free_ooseq>
- }
- 800bc68: bd08 pop {r3, pc}
- 800bc6a: bf00 nop
- 800bc6c: 24019b84 .word 0x24019b84
- 800bc70: 24019bd8 .word 0x24019bd8
- 0800bc74 <pbuf_free_ooseq_callback>:
- {
- 800bc74: b508 push {r3, lr}
- pbuf_free_ooseq();
- 800bc76: f7ff ffe5 bl 800bc44 <pbuf_free_ooseq>
- }
- 800bc7a: bd08 pop {r3, pc}
- 0800bc7c <pbuf_alloc_reference>:
- {
- 800bc7c: b5f0 push {r4, r5, r6, r7, lr}
- 800bc7e: b083 sub sp, #12
- 800bc80: 4606 mov r6, r0
- 800bc82: 460d mov r5, r1
- 800bc84: 4614 mov r4, r2
- LWIP_ASSERT("invalid pbuf_type", (type == PBUF_REF) || (type == PBUF_ROM));
- 800bc86: 2a41 cmp r2, #65 @ 0x41
- 800bc88: bf18 it ne
- 800bc8a: 2a01 cmpne r2, #1
- 800bc8c: d10f bne.n 800bcae <pbuf_alloc_reference+0x32>
- p = (struct pbuf *)memp_malloc(MEMP_PBUF);
- 800bc8e: 200b movs r0, #11
- 800bc90: f7ff fcb8 bl 800b604 <memp_malloc>
- if (p == NULL) {
- 800bc94: 4607 mov r7, r0
- 800bc96: b138 cbz r0, 800bca8 <pbuf_alloc_reference+0x2c>
- pbuf_init_alloced_pbuf(p, payload, length, length, type, 0);
- 800bc98: 2300 movs r3, #0
- 800bc9a: 9301 str r3, [sp, #4]
- 800bc9c: 9400 str r4, [sp, #0]
- 800bc9e: 462b mov r3, r5
- 800bca0: 462a mov r2, r5
- 800bca2: 4631 mov r1, r6
- 800bca4: f7ff ff60 bl 800bb68 <pbuf_init_alloced_pbuf>
- }
- 800bca8: 4638 mov r0, r7
- 800bcaa: b003 add sp, #12
- 800bcac: bdf0 pop {r4, r5, r6, r7, pc}
- LWIP_ASSERT("invalid pbuf_type", (type == PBUF_REF) || (type == PBUF_ROM));
- 800bcae: 4b04 ldr r3, [pc, #16] @ (800bcc0 <pbuf_alloc_reference+0x44>)
- 800bcb0: f44f 72a5 mov.w r2, #330 @ 0x14a
- 800bcb4: 4903 ldr r1, [pc, #12] @ (800bcc4 <pbuf_alloc_reference+0x48>)
- 800bcb6: 4804 ldr r0, [pc, #16] @ (800bcc8 <pbuf_alloc_reference+0x4c>)
- 800bcb8: f007 fba6 bl 8013408 <iprintf>
- 800bcbc: e7e7 b.n 800bc8e <pbuf_alloc_reference+0x12>
- 800bcbe: bf00 nop
- 800bcc0: 08016070 .word 0x08016070
- 800bcc4: 080160d0 .word 0x080160d0
- 800bcc8: 080144e8 .word 0x080144e8
- 0800bccc <pbuf_alloced_custom>:
- {
- 800bccc: b510 push {r4, lr}
- 800bcce: b082 sub sp, #8
- 800bcd0: 4684 mov ip, r0
- 800bcd2: 468e mov lr, r1
- 800bcd4: 4618 mov r0, r3
- 800bcd6: 9904 ldr r1, [sp, #16]
- if (LWIP_MEM_ALIGN_SIZE(offset) + length > payload_mem_len) {
- 800bcd8: f10c 0c03 add.w ip, ip, #3
- 800bcdc: f02c 0c03 bic.w ip, ip, #3
- 800bce0: eb0e 040c add.w r4, lr, ip
- 800bce4: f8bd 3014 ldrh.w r3, [sp, #20]
- 800bce8: 429c cmp r4, r3
- 800bcea: d80c bhi.n 800bd06 <pbuf_alloced_custom+0x3a>
- if (payload_mem != NULL) {
- 800bcec: b101 cbz r1, 800bcf0 <pbuf_alloced_custom+0x24>
- payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset);
- 800bcee: 4461 add r1, ip
- pbuf_init_alloced_pbuf(&p->pbuf, payload, length, length, type, PBUF_FLAG_IS_CUSTOM);
- 800bcf0: 4604 mov r4, r0
- 800bcf2: 2302 movs r3, #2
- 800bcf4: 9301 str r3, [sp, #4]
- 800bcf6: 9200 str r2, [sp, #0]
- 800bcf8: 4673 mov r3, lr
- 800bcfa: 4672 mov r2, lr
- 800bcfc: f7ff ff34 bl 800bb68 <pbuf_init_alloced_pbuf>
- }
- 800bd00: 4620 mov r0, r4
- 800bd02: b002 add sp, #8
- 800bd04: bd10 pop {r4, pc}
- return NULL;
- 800bd06: 2400 movs r4, #0
- 800bd08: e7fa b.n 800bd00 <pbuf_alloced_custom+0x34>
- 0800bd0a <pbuf_add_header>:
- * @return non-zero on failure, zero on success.
- *
- */
- u8_t
- pbuf_add_header(struct pbuf *p, size_t header_size_increment)
- {
- 800bd0a: b508 push {r3, lr}
- return pbuf_add_header_impl(p, header_size_increment, 0);
- 800bd0c: 2200 movs r2, #0
- 800bd0e: f7ff ff3d bl 800bb8c <pbuf_add_header_impl>
- }
- 800bd12: bd08 pop {r3, pc}
- 0800bd14 <pbuf_remove_header>:
- * @return non-zero on failure, zero on success.
- *
- */
- u8_t
- pbuf_remove_header(struct pbuf *p, size_t header_size_decrement)
- {
- 800bd14: b538 push {r3, r4, r5, lr}
- 800bd16: 460c mov r4, r1
- void *payload;
- u16_t increment_magnitude;
- LWIP_ASSERT("p != NULL", p != NULL);
- 800bd18: 4605 mov r5, r0
- 800bd1a: b198 cbz r0, 800bd44 <pbuf_remove_header+0x30>
- if ((p == NULL) || (header_size_decrement > 0xFFFF)) {
- 800bd1c: 2d00 cmp r5, #0
- 800bd1e: bf18 it ne
- 800bd20: f5b4 3f80 cmpne.w r4, #65536 @ 0x10000
- 800bd24: d21f bcs.n 800bd66 <pbuf_remove_header+0x52>
- return 1;
- }
- if (header_size_decrement == 0) {
- 800bd26: b304 cbz r4, 800bd6a <pbuf_remove_header+0x56>
- return 0;
- }
- increment_magnitude = (u16_t)header_size_decrement;
- 800bd28: b2a2 uxth r2, r4
- /* 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;);
- 800bd2a: 896b ldrh r3, [r5, #10]
- 800bd2c: 4293 cmp r3, r2
- 800bd2e: d311 bcc.n 800bd54 <pbuf_remove_header+0x40>
- /* remember current payload pointer */
- payload = p->payload;
- 800bd30: 6869 ldr r1, [r5, #4]
- 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;
- 800bd32: 4421 add r1, r4
- 800bd34: 6069 str r1, [r5, #4]
- /* modify pbuf length fields */
- p->len = (u16_t)(p->len - increment_magnitude);
- 800bd36: 1a9b subs r3, r3, r2
- 800bd38: 816b strh r3, [r5, #10]
- p->tot_len = (u16_t)(p->tot_len - increment_magnitude);
- 800bd3a: 892b ldrh r3, [r5, #8]
- 800bd3c: 1a9b subs r3, r3, r2
- 800bd3e: 812b strh r3, [r5, #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;
- 800bd40: 2000 movs r0, #0
- }
- 800bd42: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("p != NULL", p != NULL);
- 800bd44: 4b0a ldr r3, [pc, #40] @ (800bd70 <pbuf_remove_header+0x5c>)
- 800bd46: f240 224b movw r2, #587 @ 0x24b
- 800bd4a: 490a ldr r1, [pc, #40] @ (800bd74 <pbuf_remove_header+0x60>)
- 800bd4c: 480a ldr r0, [pc, #40] @ (800bd78 <pbuf_remove_header+0x64>)
- 800bd4e: f007 fb5b bl 8013408 <iprintf>
- 800bd52: e7e3 b.n 800bd1c <pbuf_remove_header+0x8>
- LWIP_ERROR("increment_magnitude <= p->len", (increment_magnitude <= p->len), return 1;);
- 800bd54: 4b06 ldr r3, [pc, #24] @ (800bd70 <pbuf_remove_header+0x5c>)
- 800bd56: f240 2255 movw r2, #597 @ 0x255
- 800bd5a: 4908 ldr r1, [pc, #32] @ (800bd7c <pbuf_remove_header+0x68>)
- 800bd5c: 4806 ldr r0, [pc, #24] @ (800bd78 <pbuf_remove_header+0x64>)
- 800bd5e: f007 fb53 bl 8013408 <iprintf>
- 800bd62: 2001 movs r0, #1
- 800bd64: e7ed b.n 800bd42 <pbuf_remove_header+0x2e>
- return 1;
- 800bd66: 2001 movs r0, #1
- 800bd68: e7eb b.n 800bd42 <pbuf_remove_header+0x2e>
- return 0;
- 800bd6a: 2000 movs r0, #0
- 800bd6c: e7e9 b.n 800bd42 <pbuf_remove_header+0x2e>
- 800bd6e: bf00 nop
- 800bd70: 08016070 .word 0x08016070
- 800bd74: 08014fc0 .word 0x08014fc0
- 800bd78: 080144e8 .word 0x080144e8
- 800bd7c: 080160e4 .word 0x080160e4
- 0800bd80 <pbuf_header_impl>:
- static u8_t
- pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force)
- {
- 800bd80: b508 push {r3, lr}
- if (header_size_increment < 0) {
- 800bd82: 2900 cmp r1, #0
- 800bd84: db02 blt.n 800bd8c <pbuf_header_impl+0xc>
- return pbuf_remove_header(p, (size_t) - header_size_increment);
- } else {
- return pbuf_add_header_impl(p, (size_t)header_size_increment, force);
- 800bd86: f7ff ff01 bl 800bb8c <pbuf_add_header_impl>
- }
- }
- 800bd8a: bd08 pop {r3, pc}
- return pbuf_remove_header(p, (size_t) - header_size_increment);
- 800bd8c: 4249 negs r1, r1
- 800bd8e: f7ff ffc1 bl 800bd14 <pbuf_remove_header>
- 800bd92: e7fa b.n 800bd8a <pbuf_header_impl+0xa>
- 0800bd94 <pbuf_header_force>:
- * Same as pbuf_header but does not check if 'header_size > 0' is allowed.
- * This is used internally only, to allow PBUF_REF for RX.
- */
- u8_t
- pbuf_header_force(struct pbuf *p, s16_t header_size_increment)
- {
- 800bd94: b508 push {r3, lr}
- return pbuf_header_impl(p, header_size_increment, 1);
- 800bd96: 2201 movs r2, #1
- 800bd98: f7ff fff2 bl 800bd80 <pbuf_header_impl>
- }
- 800bd9c: bd08 pop {r3, pc}
- ...
- 0800bda0 <pbuf_free>:
- * 1->1->1 becomes .......
- *
- */
- u8_t
- pbuf_free(struct pbuf *p)
- {
- 800bda0: b5f8 push {r3, r4, r5, r6, r7, lr}
- u8_t alloc_src;
- struct pbuf *q;
- u8_t count;
- if (p == NULL) {
- 800bda2: b110 cbz r0, 800bdaa <pbuf_free+0xa>
- 800bda4: 4604 mov r4, r0
- }
- LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free(%p)\n", (void *)p));
- PERF_START;
- count = 0;
- 800bda6: 2600 movs r6, #0
- 800bda8: e017 b.n 800bdda <pbuf_free+0x3a>
- LWIP_ASSERT("p != NULL", p != NULL);
- 800bdaa: 4b2b ldr r3, [pc, #172] @ (800be58 <pbuf_free+0xb8>)
- 800bdac: f44f 7237 mov.w r2, #732 @ 0x2dc
- 800bdb0: 492a ldr r1, [pc, #168] @ (800be5c <pbuf_free+0xbc>)
- 800bdb2: 482b ldr r0, [pc, #172] @ (800be60 <pbuf_free+0xc0>)
- 800bdb4: f007 fb28 bl 8013408 <iprintf>
- return 0;
- 800bdb8: 2600 movs r6, #0
- }
- }
- PERF_STOP("pbuf_free");
- /* return number of de-allocated pbufs */
- return count;
- }
- 800bdba: 4630 mov r0, r6
- 800bdbc: bdf8 pop {r3, r4, r5, r6, r7, pc}
- LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0);
- 800bdbe: 4b26 ldr r3, [pc, #152] @ (800be58 <pbuf_free+0xb8>)
- 800bdc0: f240 22f1 movw r2, #753 @ 0x2f1
- 800bdc4: 4927 ldr r1, [pc, #156] @ (800be64 <pbuf_free+0xc4>)
- 800bdc6: 4826 ldr r0, [pc, #152] @ (800be60 <pbuf_free+0xc0>)
- 800bdc8: f007 fb1e bl 8013408 <iprintf>
- 800bdcc: e00d b.n 800bdea <pbuf_free+0x4a>
- pc->custom_free_function(p);
- 800bdce: 6923 ldr r3, [r4, #16]
- 800bdd0: 4620 mov r0, r4
- 800bdd2: 4798 blx r3
- count++;
- 800bdd4: 3601 adds r6, #1
- 800bdd6: b2f6 uxtb r6, r6
- p = q;
- 800bdd8: 462c mov r4, r5
- while (p != NULL) {
- 800bdda: 2c00 cmp r4, #0
- 800bddc: d0ed beq.n 800bdba <pbuf_free+0x1a>
- SYS_ARCH_PROTECT(old_level);
- 800bdde: f001 f947 bl 800d070 <sys_arch_protect>
- 800bde2: 4607 mov r7, r0
- LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0);
- 800bde4: 7ba3 ldrb r3, [r4, #14]
- 800bde6: 2b00 cmp r3, #0
- 800bde8: d0e9 beq.n 800bdbe <pbuf_free+0x1e>
- ref = --(p->ref);
- 800bdea: 7ba5 ldrb r5, [r4, #14]
- 800bdec: 3d01 subs r5, #1
- 800bdee: b2ed uxtb r5, r5
- 800bdf0: 73a5 strb r5, [r4, #14]
- SYS_ARCH_UNPROTECT(old_level);
- 800bdf2: 4638 mov r0, r7
- 800bdf4: f001 f948 bl 800d088 <sys_arch_unprotect>
- if (ref == 0) {
- 800bdf8: 2d00 cmp r5, #0
- 800bdfa: d1de bne.n 800bdba <pbuf_free+0x1a>
- q = p->next;
- 800bdfc: 6825 ldr r5, [r4, #0]
- alloc_src = pbuf_get_allocsrc(p);
- 800bdfe: 7b23 ldrb r3, [r4, #12]
- 800be00: f003 030f and.w r3, r3, #15
- if ((p->flags & PBUF_FLAG_IS_CUSTOM) != 0) {
- 800be04: 7b62 ldrb r2, [r4, #13]
- 800be06: f012 0f02 tst.w r2, #2
- 800be0a: d00a beq.n 800be22 <pbuf_free+0x82>
- LWIP_ASSERT("pc->custom_free_function != NULL", pc->custom_free_function != NULL);
- 800be0c: 6923 ldr r3, [r4, #16]
- 800be0e: 2b00 cmp r3, #0
- 800be10: d1dd bne.n 800bdce <pbuf_free+0x2e>
- 800be12: 4b11 ldr r3, [pc, #68] @ (800be58 <pbuf_free+0xb8>)
- 800be14: f240 22ff movw r2, #767 @ 0x2ff
- 800be18: 4913 ldr r1, [pc, #76] @ (800be68 <pbuf_free+0xc8>)
- 800be1a: 4811 ldr r0, [pc, #68] @ (800be60 <pbuf_free+0xc0>)
- 800be1c: f007 faf4 bl 8013408 <iprintf>
- 800be20: e7d5 b.n 800bdce <pbuf_free+0x2e>
- if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF_POOL) {
- 800be22: 2b02 cmp r3, #2
- 800be24: d006 beq.n 800be34 <pbuf_free+0x94>
- } else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF) {
- 800be26: 2b01 cmp r3, #1
- 800be28: d009 beq.n 800be3e <pbuf_free+0x9e>
- } else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) {
- 800be2a: b96b cbnz r3, 800be48 <pbuf_free+0xa8>
- mem_free(p);
- 800be2c: 4620 mov r0, r4
- 800be2e: f7ff f971 bl 800b114 <mem_free>
- 800be32: e7cf b.n 800bdd4 <pbuf_free+0x34>
- memp_free(MEMP_PBUF_POOL, p);
- 800be34: 4621 mov r1, r4
- 800be36: 200c movs r0, #12
- 800be38: f7ff fc1a bl 800b670 <memp_free>
- 800be3c: e7ca b.n 800bdd4 <pbuf_free+0x34>
- memp_free(MEMP_PBUF, p);
- 800be3e: 4621 mov r1, r4
- 800be40: 200b movs r0, #11
- 800be42: f7ff fc15 bl 800b670 <memp_free>
- 800be46: e7c5 b.n 800bdd4 <pbuf_free+0x34>
- LWIP_ASSERT("invalid pbuf type", 0);
- 800be48: 4b03 ldr r3, [pc, #12] @ (800be58 <pbuf_free+0xb8>)
- 800be4a: f240 320f movw r2, #783 @ 0x30f
- 800be4e: 4907 ldr r1, [pc, #28] @ (800be6c <pbuf_free+0xcc>)
- 800be50: 4803 ldr r0, [pc, #12] @ (800be60 <pbuf_free+0xc0>)
- 800be52: f007 fad9 bl 8013408 <iprintf>
- 800be56: e7bd b.n 800bdd4 <pbuf_free+0x34>
- 800be58: 08016070 .word 0x08016070
- 800be5c: 08014fc0 .word 0x08014fc0
- 800be60: 080144e8 .word 0x080144e8
- 800be64: 08016104 .word 0x08016104
- 800be68: 0801611c .word 0x0801611c
- 800be6c: 08016140 .word 0x08016140
- 0800be70 <pbuf_alloc>:
- {
- 800be70: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
- 800be74: b082 sub sp, #8
- 800be76: 460e mov r6, r1
- 800be78: 4690 mov r8, r2
- switch (type) {
- 800be7a: f5b2 7fc1 cmp.w r2, #386 @ 0x182
- 800be7e: d044 beq.n 800bf0a <pbuf_alloc+0x9a>
- 800be80: 4604 mov r4, r0
- 800be82: d80e bhi.n 800bea2 <pbuf_alloc+0x32>
- 800be84: 2a01 cmp r2, #1
- 800be86: d002 beq.n 800be8e <pbuf_alloc+0x1e>
- 800be88: 2a41 cmp r2, #65 @ 0x41
- 800be8a: f040 8084 bne.w 800bf96 <pbuf_alloc+0x126>
- p = pbuf_alloc_reference(NULL, length, type);
- 800be8e: 4642 mov r2, r8
- 800be90: 4631 mov r1, r6
- 800be92: 2000 movs r0, #0
- 800be94: f7ff fef2 bl 800bc7c <pbuf_alloc_reference>
- 800be98: 4681 mov r9, r0
- }
- 800be9a: 4648 mov r0, r9
- 800be9c: b002 add sp, #8
- 800be9e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
- switch (type) {
- 800bea2: f5b2 7f20 cmp.w r2, #640 @ 0x280
- 800bea6: d176 bne.n 800bf96 <pbuf_alloc+0x126>
- u16_t payload_len = (u16_t)(LWIP_MEM_ALIGN_SIZE(offset) + LWIP_MEM_ALIGN_SIZE(length));
- 800bea8: 1cc1 adds r1, r0, #3
- 800beaa: f401 71fe and.w r1, r1, #508 @ 0x1fc
- 800beae: 1cf2 adds r2, r6, #3
- 800beb0: b293 uxth r3, r2
- 800beb2: f023 0303 bic.w r3, r3, #3
- 800beb6: 440b add r3, r1
- 800beb8: b29b uxth r3, r3
- mem_size_t alloc_len = (mem_size_t)(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF) + payload_len);
- 800beba: f103 0010 add.w r0, r3, #16
- if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) ||
- 800bebe: f022 0203 bic.w r2, r2, #3
- 800bec2: 4293 cmp r3, r2
- 800bec4: d371 bcc.n 800bfaa <pbuf_alloc+0x13a>
- 800bec6: 4282 cmp r2, r0
- 800bec8: d872 bhi.n 800bfb0 <pbuf_alloc+0x140>
- p = (struct pbuf *)mem_malloc(alloc_len);
- 800beca: f7ff fa63 bl 800b394 <mem_malloc>
- if (p == NULL) {
- 800bece: 4681 mov r9, r0
- 800bed0: 2800 cmp r0, #0
- 800bed2: d0e2 beq.n 800be9a <pbuf_alloc+0x2a>
- pbuf_init_alloced_pbuf(p, LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)),
- 800bed4: f104 0110 add.w r1, r4, #16
- 800bed8: 4401 add r1, r0
- 800beda: 3103 adds r1, #3
- 800bedc: 2300 movs r3, #0
- 800bede: 9301 str r3, [sp, #4]
- 800bee0: f8cd 8000 str.w r8, [sp]
- 800bee4: 4633 mov r3, r6
- 800bee6: 4632 mov r2, r6
- 800bee8: f021 0103 bic.w r1, r1, #3
- 800beec: f7ff fe3c bl 800bb68 <pbuf_init_alloced_pbuf>
- LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned",
- 800bef0: f8d9 3004 ldr.w r3, [r9, #4]
- 800bef4: f013 0f03 tst.w r3, #3
- 800bef8: d0cf beq.n 800be9a <pbuf_alloc+0x2a>
- 800befa: 4b2f ldr r3, [pc, #188] @ (800bfb8 <pbuf_alloc+0x148>)
- 800befc: f44f 7291 mov.w r2, #290 @ 0x122
- 800bf00: 492e ldr r1, [pc, #184] @ (800bfbc <pbuf_alloc+0x14c>)
- 800bf02: 482f ldr r0, [pc, #188] @ (800bfc0 <pbuf_alloc+0x150>)
- 800bf04: f007 fa80 bl 8013408 <iprintf>
- 800bf08: e7c7 b.n 800be9a <pbuf_alloc+0x2a>
- 800bf0a: 4605 mov r5, r0
- switch (type) {
- 800bf0c: 2700 movs r7, #0
- 800bf0e: 46b9 mov r9, r7
- 800bf10: e013 b.n 800bf3a <pbuf_alloc+0xca>
- PBUF_POOL_IS_EMPTY();
- 800bf12: f7ff fe79 bl 800bc08 <pbuf_pool_is_empty>
- if (p) {
- 800bf16: f1b9 0f00 cmp.w r9, #0
- 800bf1a: d002 beq.n 800bf22 <pbuf_alloc+0xb2>
- pbuf_free(p);
- 800bf1c: 4648 mov r0, r9
- 800bf1e: f7ff ff3f bl 800bda0 <pbuf_free>
- return NULL;
- 800bf22: 46b9 mov r9, r7
- 800bf24: e7b9 b.n 800be9a <pbuf_alloc+0x2a>
- if (p == NULL) {
- 800bf26: f1b9 0f00 cmp.w r9, #0
- 800bf2a: d032 beq.n 800bf92 <pbuf_alloc+0x122>
- last->next = q;
- 800bf2c: f8ca 7000 str.w r7, [sl]
- rem_len = (u16_t)(rem_len - qlen);
- 800bf30: 1b34 subs r4, r6, r4
- 800bf32: b2a6 uxth r6, r4
- offset = 0;
- 800bf34: 2500 movs r5, #0
- } while (rem_len > 0);
- 800bf36: 2e00 cmp r6, #0
- 800bf38: d0af beq.n 800be9a <pbuf_alloc+0x2a>
- q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL);
- 800bf3a: 46ba mov sl, r7
- 800bf3c: 200c movs r0, #12
- 800bf3e: f7ff fb61 bl 800b604 <memp_malloc>
- if (q == NULL) {
- 800bf42: 4607 mov r7, r0
- 800bf44: 2800 cmp r0, #0
- 800bf46: d0e4 beq.n 800bf12 <pbuf_alloc+0xa2>
- qlen = LWIP_MIN(rem_len, (u16_t)(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)));
- 800bf48: 1ceb adds r3, r5, #3
- 800bf4a: f023 0303 bic.w r3, r3, #3
- 800bf4e: b29b uxth r3, r3
- 800bf50: f240 54ec movw r4, #1516 @ 0x5ec
- 800bf54: 1ae4 subs r4, r4, r3
- 800bf56: b2a4 uxth r4, r4
- 800bf58: 42b4 cmp r4, r6
- 800bf5a: bf28 it cs
- 800bf5c: 4634 movcs r4, r6
- pbuf_init_alloced_pbuf(q, LWIP_MEM_ALIGN((void *)((u8_t *)q + SIZEOF_STRUCT_PBUF + offset)),
- 800bf5e: f105 0110 add.w r1, r5, #16
- 800bf62: 4401 add r1, r0
- 800bf64: 3103 adds r1, #3
- 800bf66: 2300 movs r3, #0
- 800bf68: 9301 str r3, [sp, #4]
- 800bf6a: f8cd 8000 str.w r8, [sp]
- 800bf6e: 4623 mov r3, r4
- 800bf70: 4632 mov r2, r6
- 800bf72: f021 0103 bic.w r1, r1, #3
- 800bf76: f7ff fdf7 bl 800bb68 <pbuf_init_alloced_pbuf>
- LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned",
- 800bf7a: 687b ldr r3, [r7, #4]
- 800bf7c: f013 0f03 tst.w r3, #3
- 800bf80: d0d1 beq.n 800bf26 <pbuf_alloc+0xb6>
- 800bf82: 4b0d ldr r3, [pc, #52] @ (800bfb8 <pbuf_alloc+0x148>)
- 800bf84: f44f 7280 mov.w r2, #256 @ 0x100
- 800bf88: 490e ldr r1, [pc, #56] @ (800bfc4 <pbuf_alloc+0x154>)
- 800bf8a: 480d ldr r0, [pc, #52] @ (800bfc0 <pbuf_alloc+0x150>)
- 800bf8c: f007 fa3c bl 8013408 <iprintf>
- LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT",
- 800bf90: e7c9 b.n 800bf26 <pbuf_alloc+0xb6>
- p = q;
- 800bf92: 46b9 mov r9, r7
- 800bf94: e7cc b.n 800bf30 <pbuf_alloc+0xc0>
- LWIP_ASSERT("pbuf_alloc: erroneous type", 0);
- 800bf96: 4b08 ldr r3, [pc, #32] @ (800bfb8 <pbuf_alloc+0x148>)
- 800bf98: f240 1227 movw r2, #295 @ 0x127
- 800bf9c: 490a ldr r1, [pc, #40] @ (800bfc8 <pbuf_alloc+0x158>)
- 800bf9e: 4808 ldr r0, [pc, #32] @ (800bfc0 <pbuf_alloc+0x150>)
- 800bfa0: f007 fa32 bl 8013408 <iprintf>
- return NULL;
- 800bfa4: f04f 0900 mov.w r9, #0
- 800bfa8: e777 b.n 800be9a <pbuf_alloc+0x2a>
- return NULL;
- 800bfaa: f04f 0900 mov.w r9, #0
- 800bfae: e774 b.n 800be9a <pbuf_alloc+0x2a>
- 800bfb0: f04f 0900 mov.w r9, #0
- 800bfb4: e771 b.n 800be9a <pbuf_alloc+0x2a>
- 800bfb6: bf00 nop
- 800bfb8: 08016070 .word 0x08016070
- 800bfbc: 080161b8 .word 0x080161b8
- 800bfc0: 080144e8 .word 0x080144e8
- 800bfc4: 08016154 .word 0x08016154
- 800bfc8: 080161e4 .word 0x080161e4
- 0800bfcc <pbuf_realloc>:
- {
- 800bfcc: b5f8 push {r3, r4, r5, r6, r7, lr}
- 800bfce: 460e mov r6, r1
- LWIP_ASSERT("pbuf_realloc: p != NULL", p != NULL);
- 800bfd0: 4604 mov r4, r0
- 800bfd2: b1b8 cbz r0, 800c004 <pbuf_realloc+0x38>
- if (new_len >= p->tot_len) {
- 800bfd4: 8927 ldrh r7, [r4, #8]
- 800bfd6: 42b7 cmp r7, r6
- 800bfd8: d92e bls.n 800c038 <pbuf_realloc+0x6c>
- rem_len = new_len;
- 800bfda: 4635 mov r5, r6
- while (rem_len > q->len) {
- 800bfdc: 8963 ldrh r3, [r4, #10]
- 800bfde: 42ab cmp r3, r5
- 800bfe0: d218 bcs.n 800c014 <pbuf_realloc+0x48>
- rem_len = (u16_t)(rem_len - q->len);
- 800bfe2: 1aeb subs r3, r5, r3
- 800bfe4: b29d uxth r5, r3
- q->tot_len = (u16_t)(q->tot_len - shrink);
- 800bfe6: 8923 ldrh r3, [r4, #8]
- 800bfe8: 1bf2 subs r2, r6, r7
- 800bfea: 4413 add r3, r2
- 800bfec: 8123 strh r3, [r4, #8]
- q = q->next;
- 800bfee: 6824 ldr r4, [r4, #0]
- LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL);
- 800bff0: 2c00 cmp r4, #0
- 800bff2: d1f3 bne.n 800bfdc <pbuf_realloc+0x10>
- 800bff4: 4b19 ldr r3, [pc, #100] @ (800c05c <pbuf_realloc+0x90>)
- 800bff6: f240 12af movw r2, #431 @ 0x1af
- 800bffa: 4919 ldr r1, [pc, #100] @ (800c060 <pbuf_realloc+0x94>)
- 800bffc: 4819 ldr r0, [pc, #100] @ (800c064 <pbuf_realloc+0x98>)
- 800bffe: f007 fa03 bl 8013408 <iprintf>
- 800c002: e7eb b.n 800bfdc <pbuf_realloc+0x10>
- LWIP_ASSERT("pbuf_realloc: p != NULL", p != NULL);
- 800c004: 4b15 ldr r3, [pc, #84] @ (800c05c <pbuf_realloc+0x90>)
- 800c006: f44f 72cc mov.w r2, #408 @ 0x198
- 800c00a: 4917 ldr r1, [pc, #92] @ (800c068 <pbuf_realloc+0x9c>)
- 800c00c: 4815 ldr r0, [pc, #84] @ (800c064 <pbuf_realloc+0x98>)
- 800c00e: f007 f9fb bl 8013408 <iprintf>
- 800c012: e7df b.n 800bfd4 <pbuf_realloc+0x8>
- if (pbuf_match_allocsrc(q, PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) && (rem_len != q->len)
- 800c014: 7b22 ldrb r2, [r4, #12]
- 800c016: f012 0f0f tst.w r2, #15
- 800c01a: d105 bne.n 800c028 <pbuf_realloc+0x5c>
- 800c01c: 42ab cmp r3, r5
- 800c01e: d003 beq.n 800c028 <pbuf_realloc+0x5c>
- && ((q->flags & PBUF_FLAG_IS_CUSTOM) == 0)
- 800c020: 7b63 ldrb r3, [r4, #13]
- 800c022: f013 0f02 tst.w r3, #2
- 800c026: d008 beq.n 800c03a <pbuf_realloc+0x6e>
- q->len = rem_len;
- 800c028: 8165 strh r5, [r4, #10]
- q->tot_len = q->len;
- 800c02a: 8125 strh r5, [r4, #8]
- if (q->next != NULL) {
- 800c02c: 6820 ldr r0, [r4, #0]
- 800c02e: b108 cbz r0, 800c034 <pbuf_realloc+0x68>
- pbuf_free(q->next);
- 800c030: f7ff feb6 bl 800bda0 <pbuf_free>
- q->next = NULL;
- 800c034: 2300 movs r3, #0
- 800c036: 6023 str r3, [r4, #0]
- }
- 800c038: bdf8 pop {r3, r4, r5, r6, r7, pc}
- q = (struct pbuf *)mem_trim(q, (mem_size_t)(((u8_t *)q->payload - (u8_t *)q) + rem_len));
- 800c03a: 6863 ldr r3, [r4, #4]
- 800c03c: 1b1b subs r3, r3, r4
- 800c03e: 18e9 adds r1, r5, r3
- 800c040: 4620 mov r0, r4
- 800c042: f7ff f8df bl 800b204 <mem_trim>
- LWIP_ASSERT("mem_trim returned q == NULL", q != NULL);
- 800c046: 4604 mov r4, r0
- 800c048: 2800 cmp r0, #0
- 800c04a: d1ed bne.n 800c028 <pbuf_realloc+0x5c>
- 800c04c: 4b03 ldr r3, [pc, #12] @ (800c05c <pbuf_realloc+0x90>)
- 800c04e: f240 12bd movw r2, #445 @ 0x1bd
- 800c052: 4906 ldr r1, [pc, #24] @ (800c06c <pbuf_realloc+0xa0>)
- 800c054: 4803 ldr r0, [pc, #12] @ (800c064 <pbuf_realloc+0x98>)
- 800c056: f007 f9d7 bl 8013408 <iprintf>
- 800c05a: e7e5 b.n 800c028 <pbuf_realloc+0x5c>
- 800c05c: 08016070 .word 0x08016070
- 800c060: 08016218 .word 0x08016218
- 800c064: 080144e8 .word 0x080144e8
- 800c068: 08016200 .word 0x08016200
- 800c06c: 08016230 .word 0x08016230
- 0800c070 <pbuf_free_header>:
- {
- 800c070: b570 push {r4, r5, r6, lr}
- 800c072: 4605 mov r5, r0
- 800c074: 460c mov r4, r1
- while (free_left && p) {
- 800c076: e004 b.n 800c082 <pbuf_free_header+0x12>
- pbuf_remove_header(p, free_left);
- 800c078: 4621 mov r1, r4
- 800c07a: 4628 mov r0, r5
- 800c07c: f7ff fe4a bl 800bd14 <pbuf_remove_header>
- free_left = 0;
- 800c080: 2400 movs r4, #0
- while (free_left && p) {
- 800c082: 1e23 subs r3, r4, #0
- 800c084: bf18 it ne
- 800c086: 2301 movne r3, #1
- 800c088: b16d cbz r5, 800c0a6 <pbuf_free_header+0x36>
- 800c08a: b163 cbz r3, 800c0a6 <pbuf_free_header+0x36>
- if (free_left >= p->len) {
- 800c08c: 896b ldrh r3, [r5, #10]
- 800c08e: 42a3 cmp r3, r4
- 800c090: d8f2 bhi.n 800c078 <pbuf_free_header+0x8>
- free_left = (u16_t)(free_left - p->len);
- 800c092: 1ae4 subs r4, r4, r3
- 800c094: b2a4 uxth r4, r4
- p = p->next;
- 800c096: 682e ldr r6, [r5, #0]
- f->next = 0;
- 800c098: 2300 movs r3, #0
- 800c09a: 602b str r3, [r5, #0]
- pbuf_free(f);
- 800c09c: 4628 mov r0, r5
- 800c09e: f7ff fe7f bl 800bda0 <pbuf_free>
- p = p->next;
- 800c0a2: 4635 mov r5, r6
- 800c0a4: e7ed b.n 800c082 <pbuf_free_header+0x12>
- }
- 800c0a6: 4628 mov r0, r5
- 800c0a8: bd70 pop {r4, r5, r6, pc}
- 0800c0aa <pbuf_clen>:
- * @param p first pbuf of chain
- * @return the number of pbufs in a chain
- */
- u16_t
- pbuf_clen(const struct pbuf *p)
- {
- 800c0aa: 4603 mov r3, r0
- u16_t len;
- len = 0;
- 800c0ac: 2000 movs r0, #0
- while (p != NULL) {
- 800c0ae: e002 b.n 800c0b6 <pbuf_clen+0xc>
- ++len;
- 800c0b0: 3001 adds r0, #1
- 800c0b2: b280 uxth r0, r0
- p = p->next;
- 800c0b4: 681b ldr r3, [r3, #0]
- while (p != NULL) {
- 800c0b6: 2b00 cmp r3, #0
- 800c0b8: d1fa bne.n 800c0b0 <pbuf_clen+0x6>
- }
- return len;
- }
- 800c0ba: 4770 bx lr
- 0800c0bc <pbuf_ref>:
- */
- void
- pbuf_ref(struct pbuf *p)
- {
- /* pbuf given? */
- if (p != NULL) {
- 800c0bc: b198 cbz r0, 800c0e6 <pbuf_ref+0x2a>
- {
- 800c0be: b510 push {r4, lr}
- 800c0c0: 4604 mov r4, r0
- SYS_ARCH_SET(p->ref, (LWIP_PBUF_REF_T)(p->ref + 1));
- 800c0c2: f000 ffd5 bl 800d070 <sys_arch_protect>
- 800c0c6: 7ba3 ldrb r3, [r4, #14]
- 800c0c8: 3301 adds r3, #1
- 800c0ca: 73a3 strb r3, [r4, #14]
- 800c0cc: f000 ffdc bl 800d088 <sys_arch_unprotect>
- LWIP_ASSERT("pbuf ref overflow", p->ref > 0);
- 800c0d0: 7ba3 ldrb r3, [r4, #14]
- 800c0d2: b103 cbz r3, 800c0d6 <pbuf_ref+0x1a>
- }
- }
- 800c0d4: bd10 pop {r4, pc}
- LWIP_ASSERT("pbuf ref overflow", p->ref > 0);
- 800c0d6: 4b04 ldr r3, [pc, #16] @ (800c0e8 <pbuf_ref+0x2c>)
- 800c0d8: f240 3242 movw r2, #834 @ 0x342
- 800c0dc: 4903 ldr r1, [pc, #12] @ (800c0ec <pbuf_ref+0x30>)
- 800c0de: 4804 ldr r0, [pc, #16] @ (800c0f0 <pbuf_ref+0x34>)
- 800c0e0: f007 f992 bl 8013408 <iprintf>
- }
- 800c0e4: e7f6 b.n 800c0d4 <pbuf_ref+0x18>
- 800c0e6: 4770 bx lr
- 800c0e8: 08016070 .word 0x08016070
- 800c0ec: 0801624c .word 0x0801624c
- 800c0f0: 080144e8 .word 0x080144e8
- 0800c0f4 <pbuf_cat>:
- *
- * @see pbuf_chain()
- */
- void
- pbuf_cat(struct pbuf *h, struct pbuf *t)
- {
- 800c0f4: b538 push {r3, r4, r5, lr}
- struct pbuf *p;
- LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)",
- 800c0f6: 4604 mov r4, r0
- 800c0f8: 460d mov r5, r1
- 800c0fa: 2900 cmp r1, #0
- 800c0fc: bf18 it ne
- 800c0fe: 2800 cmpne r0, #0
- 800c100: d10c bne.n 800c11c <pbuf_cat+0x28>
- 800c102: 4b15 ldr r3, [pc, #84] @ (800c158 <pbuf_cat+0x64>)
- 800c104: f240 3259 movw r2, #857 @ 0x359
- 800c108: 4914 ldr r1, [pc, #80] @ (800c15c <pbuf_cat+0x68>)
- 800c10a: 4815 ldr r0, [pc, #84] @ (800c160 <pbuf_cat+0x6c>)
- 800c10c: f007 f97c bl 8013408 <iprintf>
- 800c110: e019 b.n 800c146 <pbuf_cat+0x52>
- ((h != NULL) && (t != NULL)), return;);
- /* proceed to last pbuf of chain */
- for (p = h; p->next != NULL; p = p->next) {
- /* add total length of second chain to all totals of first chain */
- p->tot_len = (u16_t)(p->tot_len + t->tot_len);
- 800c112: 8923 ldrh r3, [r4, #8]
- 800c114: 8929 ldrh r1, [r5, #8]
- 800c116: 440b add r3, r1
- 800c118: 8123 strh r3, [r4, #8]
- for (p = h; p->next != NULL; p = p->next) {
- 800c11a: 4614 mov r4, r2
- 800c11c: 6822 ldr r2, [r4, #0]
- 800c11e: 2a00 cmp r2, #0
- 800c120: d1f7 bne.n 800c112 <pbuf_cat+0x1e>
- }
- /* { 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);
- 800c122: 8922 ldrh r2, [r4, #8]
- 800c124: 8963 ldrh r3, [r4, #10]
- 800c126: 429a cmp r2, r3
- 800c128: d10e bne.n 800c148 <pbuf_cat+0x54>
- LWIP_ASSERT("p->next == NULL", p->next == NULL);
- 800c12a: 6823 ldr r3, [r4, #0]
- 800c12c: b133 cbz r3, 800c13c <pbuf_cat+0x48>
- 800c12e: 4b0a ldr r3, [pc, #40] @ (800c158 <pbuf_cat+0x64>)
- 800c130: f240 3263 movw r2, #867 @ 0x363
- 800c134: 490b ldr r1, [pc, #44] @ (800c164 <pbuf_cat+0x70>)
- 800c136: 480a ldr r0, [pc, #40] @ (800c160 <pbuf_cat+0x6c>)
- 800c138: f007 f966 bl 8013408 <iprintf>
- /* add total length of second chain to last pbuf total of first chain */
- p->tot_len = (u16_t)(p->tot_len + t->tot_len);
- 800c13c: 8923 ldrh r3, [r4, #8]
- 800c13e: 892a ldrh r2, [r5, #8]
- 800c140: 4413 add r3, r2
- 800c142: 8123 strh r3, [r4, #8]
- /* chain last pbuf of head (p) with first of tail (t) */
- p->next = t;
- 800c144: 6025 str r5, [r4, #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.
- */
- }
- 800c146: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("p->tot_len == p->len (of last pbuf in chain)", p->tot_len == p->len);
- 800c148: 4b03 ldr r3, [pc, #12] @ (800c158 <pbuf_cat+0x64>)
- 800c14a: f240 3262 movw r2, #866 @ 0x362
- 800c14e: 4906 ldr r1, [pc, #24] @ (800c168 <pbuf_cat+0x74>)
- 800c150: 4803 ldr r0, [pc, #12] @ (800c160 <pbuf_cat+0x6c>)
- 800c152: f007 f959 bl 8013408 <iprintf>
- 800c156: e7e8 b.n 800c12a <pbuf_cat+0x36>
- 800c158: 08016070 .word 0x08016070
- 800c15c: 08016260 .word 0x08016260
- 800c160: 080144e8 .word 0x080144e8
- 800c164: 080162c8 .word 0x080162c8
- 800c168: 08016298 .word 0x08016298
- 0800c16c <pbuf_chain>:
- * The ->ref field of the first pbuf of the tail chain is adjusted.
- *
- */
- void
- pbuf_chain(struct pbuf *h, struct pbuf *t)
- {
- 800c16c: b510 push {r4, lr}
- 800c16e: 460c mov r4, r1
- pbuf_cat(h, t);
- 800c170: f7ff ffc0 bl 800c0f4 <pbuf_cat>
- /* t is now referenced by h */
- pbuf_ref(t);
- 800c174: 4620 mov r0, r4
- 800c176: f7ff ffa1 bl 800c0bc <pbuf_ref>
- LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t));
- }
- 800c17a: bd10 pop {r4, pc}
- 0800c17c <pbuf_copy>:
- * ERR_ARG if one of the pbufs is NULL or p_to is not big
- * enough to hold p_from
- */
- err_t
- pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from)
- {
- 800c17c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 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) &&
- 800c180: 2900 cmp r1, #0
- 800c182: bf18 it ne
- 800c184: 2800 cmpne r0, #0
- 800c186: d008 beq.n 800c19a <pbuf_copy+0x1e>
- 800c188: 4605 mov r5, r0
- 800c18a: 460c mov r4, r1
- 800c18c: 8902 ldrh r2, [r0, #8]
- 800c18e: 890b ldrh r3, [r1, #8]
- 800c190: 429a cmp r2, r3
- 800c192: d302 bcc.n 800c19a <pbuf_copy+0x1e>
- size_t offset_to = 0, offset_from = 0, len;
- 800c194: 2700 movs r7, #0
- 800c196: 46b8 mov r8, r7
- 800c198: e03c b.n 800c214 <pbuf_copy+0x98>
- LWIP_ERROR("pbuf_copy: target not big enough to hold source", ((p_to != NULL) &&
- 800c19a: 4b3b ldr r3, [pc, #236] @ (800c288 <pbuf_copy+0x10c>)
- 800c19c: f240 32c9 movw r2, #969 @ 0x3c9
- 800c1a0: 493a ldr r1, [pc, #232] @ (800c28c <pbuf_copy+0x110>)
- 800c1a2: 483b ldr r0, [pc, #236] @ (800c290 <pbuf_copy+0x114>)
- 800c1a4: f007 f930 bl 8013408 <iprintf>
- 800c1a8: f06f 000f mvn.w r0, #15
- 800c1ac: e06a b.n 800c284 <pbuf_copy+0x108>
- len = p_to->len - offset_to;
- }
- MEMCPY((u8_t *)p_to->payload + offset_to, (u8_t *)p_from->payload + offset_from, len);
- offset_to += len;
- offset_from += len;
- LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len);
- 800c1ae: 4b36 ldr r3, [pc, #216] @ (800c288 <pbuf_copy+0x10c>)
- 800c1b0: f240 32d9 movw r2, #985 @ 0x3d9
- 800c1b4: 4937 ldr r1, [pc, #220] @ (800c294 <pbuf_copy+0x118>)
- 800c1b6: 4836 ldr r0, [pc, #216] @ (800c290 <pbuf_copy+0x114>)
- 800c1b8: f007 f926 bl 8013408 <iprintf>
- 800c1bc: e03e b.n 800c23c <pbuf_copy+0xc0>
- LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len);
- 800c1be: 4b32 ldr r3, [pc, #200] @ (800c288 <pbuf_copy+0x10c>)
- 800c1c0: f240 32da movw r2, #986 @ 0x3da
- 800c1c4: 4934 ldr r1, [pc, #208] @ (800c298 <pbuf_copy+0x11c>)
- 800c1c6: 4832 ldr r0, [pc, #200] @ (800c290 <pbuf_copy+0x114>)
- 800c1c8: f007 f91e bl 8013408 <iprintf>
- 800c1cc: e039 b.n 800c242 <pbuf_copy+0xc6>
- p_from = p_from->next;
- }
- if (offset_to == p_to->len) {
- /* on to next p_to (if any) */
- offset_to = 0;
- p_to = p_to->next;
- 800c1ce: 682d ldr r5, [r5, #0]
- LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL), return ERR_ARG;);
- 800c1d0: fab5 f385 clz r3, r5
- 800c1d4: 095b lsrs r3, r3, #5
- 800c1d6: 2c00 cmp r4, #0
- 800c1d8: bf08 it eq
- 800c1da: 2300 moveq r3, #0
- 800c1dc: b913 cbnz r3, 800c1e4 <pbuf_copy+0x68>
- offset_to = 0;
- 800c1de: f04f 0800 mov.w r8, #0
- 800c1e2: e036 b.n 800c252 <pbuf_copy+0xd6>
- LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL), return ERR_ARG;);
- 800c1e4: 4b28 ldr r3, [pc, #160] @ (800c288 <pbuf_copy+0x10c>)
- 800c1e6: f44f 7279 mov.w r2, #996 @ 0x3e4
- 800c1ea: 492c ldr r1, [pc, #176] @ (800c29c <pbuf_copy+0x120>)
- 800c1ec: 4828 ldr r0, [pc, #160] @ (800c290 <pbuf_copy+0x114>)
- 800c1ee: f007 f90b bl 8013408 <iprintf>
- 800c1f2: f06f 000f mvn.w r0, #15
- 800c1f6: e045 b.n 800c284 <pbuf_copy+0x108>
- }
- if ((p_from != NULL) && (p_from->len == p_from->tot_len)) {
- /* don't copy more than one packet! */
- LWIP_ERROR("pbuf_copy() does not allow packet queues!",
- 800c1f8: 6823 ldr r3, [r4, #0]
- 800c1fa: b37b cbz r3, 800c25c <pbuf_copy+0xe0>
- 800c1fc: 4b22 ldr r3, [pc, #136] @ (800c288 <pbuf_copy+0x10c>)
- 800c1fe: f240 32e9 movw r2, #1001 @ 0x3e9
- 800c202: 4927 ldr r1, [pc, #156] @ (800c2a0 <pbuf_copy+0x124>)
- 800c204: 4822 ldr r0, [pc, #136] @ (800c290 <pbuf_copy+0x114>)
- 800c206: f007 f8ff bl 8013408 <iprintf>
- 800c20a: f06f 0005 mvn.w r0, #5
- 800c20e: e039 b.n 800c284 <pbuf_copy+0x108>
- if ((p_to != NULL) && (p_to->len == p_to->tot_len)) {
- /* don't copy more than one packet! */
- LWIP_ERROR("pbuf_copy() does not allow packet queues!",
- (p_to->next == NULL), return ERR_VAL;);
- }
- } while (p_from);
- 800c210: 2c00 cmp r4, #0
- 800c212: d036 beq.n 800c282 <pbuf_copy+0x106>
- if ((p_to->len - offset_to) >= (p_from->len - offset_from)) {
- 800c214: 896e ldrh r6, [r5, #10]
- 800c216: eba6 0608 sub.w r6, r6, r8
- 800c21a: 8963 ldrh r3, [r4, #10]
- 800c21c: 1bdb subs r3, r3, r7
- 800c21e: 429e cmp r6, r3
- 800c220: d300 bcc.n 800c224 <pbuf_copy+0xa8>
- len = p_from->len - offset_from;
- 800c222: 461e mov r6, r3
- MEMCPY((u8_t *)p_to->payload + offset_to, (u8_t *)p_from->payload + offset_from, len);
- 800c224: 6868 ldr r0, [r5, #4]
- 800c226: 6861 ldr r1, [r4, #4]
- 800c228: 4632 mov r2, r6
- 800c22a: 4439 add r1, r7
- 800c22c: 4440 add r0, r8
- 800c22e: f007 fb28 bl 8013882 <memcpy>
- offset_to += len;
- 800c232: 44b0 add r8, r6
- offset_from += len;
- 800c234: 4437 add r7, r6
- LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len);
- 800c236: 896b ldrh r3, [r5, #10]
- 800c238: 4543 cmp r3, r8
- 800c23a: d3b8 bcc.n 800c1ae <pbuf_copy+0x32>
- LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len);
- 800c23c: 8963 ldrh r3, [r4, #10]
- 800c23e: 42bb cmp r3, r7
- 800c240: d3bd bcc.n 800c1be <pbuf_copy+0x42>
- if (offset_from >= p_from->len) {
- 800c242: 8963 ldrh r3, [r4, #10]
- 800c244: 42bb cmp r3, r7
- 800c246: d801 bhi.n 800c24c <pbuf_copy+0xd0>
- p_from = p_from->next;
- 800c248: 6824 ldr r4, [r4, #0]
- offset_from = 0;
- 800c24a: 2700 movs r7, #0
- if (offset_to == p_to->len) {
- 800c24c: 896b ldrh r3, [r5, #10]
- 800c24e: 4543 cmp r3, r8
- 800c250: d0bd beq.n 800c1ce <pbuf_copy+0x52>
- if ((p_from != NULL) && (p_from->len == p_from->tot_len)) {
- 800c252: b11c cbz r4, 800c25c <pbuf_copy+0xe0>
- 800c254: 8962 ldrh r2, [r4, #10]
- 800c256: 8923 ldrh r3, [r4, #8]
- 800c258: 429a cmp r2, r3
- 800c25a: d0cd beq.n 800c1f8 <pbuf_copy+0x7c>
- if ((p_to != NULL) && (p_to->len == p_to->tot_len)) {
- 800c25c: 2d00 cmp r5, #0
- 800c25e: d0d7 beq.n 800c210 <pbuf_copy+0x94>
- 800c260: 896a ldrh r2, [r5, #10]
- 800c262: 892b ldrh r3, [r5, #8]
- 800c264: 429a cmp r2, r3
- 800c266: d1d3 bne.n 800c210 <pbuf_copy+0x94>
- LWIP_ERROR("pbuf_copy() does not allow packet queues!",
- 800c268: 682b ldr r3, [r5, #0]
- 800c26a: 2b00 cmp r3, #0
- 800c26c: d0d0 beq.n 800c210 <pbuf_copy+0x94>
- 800c26e: 4b06 ldr r3, [pc, #24] @ (800c288 <pbuf_copy+0x10c>)
- 800c270: f240 32ee movw r2, #1006 @ 0x3ee
- 800c274: 490a ldr r1, [pc, #40] @ (800c2a0 <pbuf_copy+0x124>)
- 800c276: 4806 ldr r0, [pc, #24] @ (800c290 <pbuf_copy+0x114>)
- 800c278: f007 f8c6 bl 8013408 <iprintf>
- 800c27c: f06f 0005 mvn.w r0, #5
- 800c280: e000 b.n 800c284 <pbuf_copy+0x108>
- LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n"));
- return ERR_OK;
- 800c282: 2000 movs r0, #0
- }
- 800c284: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- 800c288: 08016070 .word 0x08016070
- 800c28c: 080162d8 .word 0x080162d8
- 800c290: 080144e8 .word 0x080144e8
- 800c294: 08016308 .word 0x08016308
- 800c298: 08016320 .word 0x08016320
- 800c29c: 0801633c .word 0x0801633c
- 800c2a0: 0801634c .word 0x0801634c
- 0800c2a4 <pbuf_copy_partial>:
- * @param offset offset into the packet buffer from where to begin copying len bytes
- * @return the number of bytes copied, or 0 on failure
- */
- u16_t
- pbuf_copy_partial(const struct pbuf *buf, void *dataptr, u16_t len, u16_t offset)
- {
- 800c2a4: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
- const struct pbuf *p;
- u16_t left = 0;
- u16_t buf_copy_len;
- u16_t copied_total = 0;
- LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;);
- 800c2a8: b130 cbz r0, 800c2b8 <pbuf_copy_partial+0x14>
- 800c2aa: 4688 mov r8, r1
- 800c2ac: 4691 mov r9, r2
- 800c2ae: 4605 mov r5, r0
- LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;);
- 800c2b0: b169 cbz r1, 800c2ce <pbuf_copy_partial+0x2a>
- u16_t copied_total = 0;
- 800c2b2: 2700 movs r7, #0
- u16_t left = 0;
- 800c2b4: 463e mov r6, r7
- 800c2b6: e02a b.n 800c30e <pbuf_copy_partial+0x6a>
- LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;);
- 800c2b8: 4b1d ldr r3, [pc, #116] @ (800c330 <pbuf_copy_partial+0x8c>)
- 800c2ba: f240 420a movw r2, #1034 @ 0x40a
- 800c2be: 491d ldr r1, [pc, #116] @ (800c334 <pbuf_copy_partial+0x90>)
- 800c2c0: 481d ldr r0, [pc, #116] @ (800c338 <pbuf_copy_partial+0x94>)
- 800c2c2: f007 f8a1 bl 8013408 <iprintf>
- 800c2c6: 2700 movs r7, #0
- len = (u16_t)(len - buf_copy_len);
- offset = 0;
- }
- }
- return copied_total;
- }
- 800c2c8: 4638 mov r0, r7
- 800c2ca: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
- LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;);
- 800c2ce: 4b18 ldr r3, [pc, #96] @ (800c330 <pbuf_copy_partial+0x8c>)
- 800c2d0: f240 420b movw r2, #1035 @ 0x40b
- 800c2d4: 4919 ldr r1, [pc, #100] @ (800c33c <pbuf_copy_partial+0x98>)
- 800c2d6: 4818 ldr r0, [pc, #96] @ (800c338 <pbuf_copy_partial+0x94>)
- 800c2d8: f007 f896 bl 8013408 <iprintf>
- 800c2dc: 2700 movs r7, #0
- 800c2de: e7f3 b.n 800c2c8 <pbuf_copy_partial+0x24>
- buf_copy_len = (u16_t)(p->len - offset);
- 800c2e0: 896c ldrh r4, [r5, #10]
- 800c2e2: 1ae4 subs r4, r4, r3
- 800c2e4: b2a4 uxth r4, r4
- if (buf_copy_len > len) {
- 800c2e6: 45a1 cmp r9, r4
- 800c2e8: d200 bcs.n 800c2ec <pbuf_copy_partial+0x48>
- buf_copy_len = len;
- 800c2ea: 464c mov r4, r9
- MEMCPY(&((char *)dataptr)[left], &((char *)p->payload)[offset], buf_copy_len);
- 800c2ec: 6869 ldr r1, [r5, #4]
- 800c2ee: 4622 mov r2, r4
- 800c2f0: 4419 add r1, r3
- 800c2f2: eb08 0006 add.w r0, r8, r6
- 800c2f6: f007 fac4 bl 8013882 <memcpy>
- copied_total = (u16_t)(copied_total + buf_copy_len);
- 800c2fa: 4427 add r7, r4
- 800c2fc: b2bf uxth r7, r7
- left = (u16_t)(left + buf_copy_len);
- 800c2fe: 4426 add r6, r4
- 800c300: b2b6 uxth r6, r6
- len = (u16_t)(len - buf_copy_len);
- 800c302: eba9 0404 sub.w r4, r9, r4
- 800c306: fa1f f984 uxth.w r9, r4
- offset = 0;
- 800c30a: 2300 movs r3, #0
- for (p = buf; len != 0 && p != NULL; p = p->next) {
- 800c30c: 682d ldr r5, [r5, #0]
- 800c30e: 1e2a subs r2, r5, #0
- 800c310: bf18 it ne
- 800c312: 2201 movne r2, #1
- 800c314: f1b9 0f00 cmp.w r9, #0
- 800c318: d0d6 beq.n 800c2c8 <pbuf_copy_partial+0x24>
- 800c31a: 2a00 cmp r2, #0
- 800c31c: d0d4 beq.n 800c2c8 <pbuf_copy_partial+0x24>
- if ((offset != 0) && (offset >= p->len)) {
- 800c31e: 2b00 cmp r3, #0
- 800c320: d0de beq.n 800c2e0 <pbuf_copy_partial+0x3c>
- 800c322: 896a ldrh r2, [r5, #10]
- 800c324: 429a cmp r2, r3
- 800c326: d8db bhi.n 800c2e0 <pbuf_copy_partial+0x3c>
- offset = (u16_t)(offset - p->len);
- 800c328: 1a9b subs r3, r3, r2
- 800c32a: b29b uxth r3, r3
- 800c32c: e7ee b.n 800c30c <pbuf_copy_partial+0x68>
- 800c32e: bf00 nop
- 800c330: 08016070 .word 0x08016070
- 800c334: 08016378 .word 0x08016378
- 800c338: 080144e8 .word 0x080144e8
- 800c33c: 08016398 .word 0x08016398
- 0800c340 <pbuf_clone>:
- *
- * @return a new pbuf or NULL if allocation fails
- */
- struct pbuf *
- pbuf_clone(pbuf_layer layer, pbuf_type type, struct pbuf *p)
- {
- 800c340: b538 push {r3, r4, r5, lr}
- 800c342: 4614 mov r4, r2
- struct pbuf *q;
- err_t err;
- q = pbuf_alloc(layer, p->tot_len, type);
- 800c344: 460a mov r2, r1
- 800c346: 8921 ldrh r1, [r4, #8]
- 800c348: f7ff fd92 bl 800be70 <pbuf_alloc>
- if (q == NULL) {
- 800c34c: 4605 mov r5, r0
- 800c34e: b118 cbz r0, 800c358 <pbuf_clone+0x18>
- return NULL;
- }
- err = pbuf_copy(q, p);
- 800c350: 4621 mov r1, r4
- 800c352: f7ff ff13 bl 800c17c <pbuf_copy>
- LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */
- LWIP_ASSERT("pbuf_copy failed", err == ERR_OK);
- 800c356: b908 cbnz r0, 800c35c <pbuf_clone+0x1c>
- return q;
- }
- 800c358: 4628 mov r0, r5
- 800c35a: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("pbuf_copy failed", err == ERR_OK);
- 800c35c: 4b03 ldr r3, [pc, #12] @ (800c36c <pbuf_clone+0x2c>)
- 800c35e: f240 5224 movw r2, #1316 @ 0x524
- 800c362: 4903 ldr r1, [pc, #12] @ (800c370 <pbuf_clone+0x30>)
- 800c364: 4803 ldr r0, [pc, #12] @ (800c374 <pbuf_clone+0x34>)
- 800c366: f007 f84f bl 8013408 <iprintf>
- 800c36a: e7f5 b.n 800c358 <pbuf_clone+0x18>
- 800c36c: 08016070 .word 0x08016070
- 800c370: 080163bc .word 0x080163bc
- 800c374: 080144e8 .word 0x080144e8
- 0800c378 <tryget_socket_unconn_nouse>:
- /* Translate a socket 'int' into a pointer (only fails if the index is invalid) */
- static struct lwip_sock *
- tryget_socket_unconn_nouse(int fd)
- {
- int s = fd - LWIP_SOCKET_OFFSET;
- if ((s < 0) || (s >= NUM_SOCKETS)) {
- 800c378: 2803 cmp r0, #3
- 800c37a: d803 bhi.n 800c384 <tryget_socket_unconn_nouse+0xc>
- LWIP_DEBUGF(SOCKETS_DEBUG, ("tryget_socket_unconn(%d): invalid\n", fd));
- return NULL;
- }
- return &sockets[s];
- 800c37c: 4b02 ldr r3, [pc, #8] @ (800c388 <tryget_socket_unconn_nouse+0x10>)
- 800c37e: eb03 1000 add.w r0, r3, r0, lsl #4
- 800c382: 4770 bx lr
- return NULL;
- 800c384: 2000 movs r0, #0
- }
- 800c386: 4770 bx lr
- 800c388: 24019b8c .word 0x24019b8c
- 0800c38c <tryget_socket_unconn>:
- }
- /* Translate a socket 'int' into a pointer (only fails if the index is invalid) */
- static struct lwip_sock *
- tryget_socket_unconn(int fd)
- {
- 800c38c: b508 push {r3, lr}
- struct lwip_sock *ret = tryget_socket_unconn_nouse(fd);
- 800c38e: f7ff fff3 bl 800c378 <tryget_socket_unconn_nouse>
- if (!sock_inc_used(ret)) {
- return NULL;
- }
- }
- return ret;
- }
- 800c392: bd08 pop {r3, pc}
- 0800c394 <tryget_socket>:
- * @param fd externally used socket index
- * @return struct lwip_sock for the socket or NULL if not found
- */
- static struct lwip_sock *
- tryget_socket(int fd)
- {
- 800c394: b508 push {r3, lr}
- struct lwip_sock *sock = tryget_socket_unconn(fd);
- 800c396: f7ff fff9 bl 800c38c <tryget_socket_unconn>
- if (sock != NULL) {
- 800c39a: 4603 mov r3, r0
- 800c39c: b108 cbz r0, 800c3a2 <tryget_socket+0xe>
- if (sock->conn) {
- 800c39e: 6802 ldr r2, [r0, #0]
- 800c3a0: b10a cbz r2, 800c3a6 <tryget_socket+0x12>
- return sock;
- }
- done_socket(sock);
- }
- return NULL;
- }
- 800c3a2: 4618 mov r0, r3
- 800c3a4: bd08 pop {r3, pc}
- return NULL;
- 800c3a6: 4613 mov r3, r2
- 800c3a8: e7fb b.n 800c3a2 <tryget_socket+0xe>
- ...
- 0800c3ac <get_socket>:
- * @param fd externally used socket index
- * @return struct lwip_sock for the socket or NULL if not found
- */
- static struct lwip_sock *
- get_socket(int fd)
- {
- 800c3ac: b508 push {r3, lr}
- struct lwip_sock *sock = tryget_socket(fd);
- 800c3ae: f7ff fff1 bl 800c394 <tryget_socket>
- if (!sock) {
- 800c3b2: b100 cbz r0, 800c3b6 <get_socket+0xa>
- }
- set_errno(EBADF);
- return NULL;
- }
- return sock;
- }
- 800c3b4: bd08 pop {r3, pc}
- set_errno(EBADF);
- 800c3b6: 4b02 ldr r3, [pc, #8] @ (800c3c0 <get_socket+0x14>)
- 800c3b8: 2209 movs r2, #9
- 800c3ba: 601a str r2, [r3, #0]
- return NULL;
- 800c3bc: e7fa b.n 800c3b4 <get_socket+0x8>
- 800c3be: bf00 nop
- 800c3c0: 24019d8c .word 0x24019d8c
- 0800c3c4 <free_socket_locked>:
- }
- #else /* LWIP_NETCONN_FULLDUPLEX */
- LWIP_UNUSED_ARG(is_tcp);
- #endif /* LWIP_NETCONN_FULLDUPLEX */
- *lastdata = sock->lastdata;
- 800c3c4: 6841 ldr r1, [r0, #4]
- 800c3c6: 6019 str r1, [r3, #0]
- sock->lastdata.pbuf = NULL;
- 800c3c8: 2300 movs r3, #0
- 800c3ca: 6043 str r3, [r0, #4]
- *conn = sock->conn;
- 800c3cc: 6801 ldr r1, [r0, #0]
- 800c3ce: 6011 str r1, [r2, #0]
- sock->conn = NULL;
- 800c3d0: 6003 str r3, [r0, #0]
- return 1;
- }
- 800c3d2: 2001 movs r0, #1
- 800c3d4: 4770 bx lr
- 0800c3d6 <lwip_poll_should_wake>:
- * Check whether event_callback should wake up a thread waiting in
- * lwip_poll.
- */
- static int
- lwip_poll_should_wake(const struct lwip_select_cb *scb, int fd, int has_recvevent, int has_sendevent, int has_errevent)
- {
- 800c3d6: b530 push {r4, r5, lr}
- 800c3d8: 9d03 ldr r5, [sp, #12]
- nfds_t fdi;
- for (fdi = 0; fdi < scb->poll_nfds; fdi++) {
- 800c3da: f04f 0c00 mov.w ip, #0
- 800c3de: e002 b.n 800c3e6 <lwip_poll_should_wake+0x10>
- return 1;
- }
- if (has_sendevent && (pollfd->events & POLLOUT) != 0) {
- return 1;
- }
- if (has_errevent) {
- 800c3e0: b9f5 cbnz r5, 800c420 <lwip_poll_should_wake+0x4a>
- for (fdi = 0; fdi < scb->poll_nfds; fdi++) {
- 800c3e2: f10c 0c01 add.w ip, ip, #1
- 800c3e6: 6984 ldr r4, [r0, #24]
- 800c3e8: 4564 cmp r4, ip
- 800c3ea: d915 bls.n 800c418 <lwip_poll_should_wake+0x42>
- const struct pollfd *pollfd = &scb->poll_fds[fdi];
- 800c3ec: 6944 ldr r4, [r0, #20]
- 800c3ee: eb04 0ecc add.w lr, r4, ip, lsl #3
- if (pollfd->fd == fd) {
- 800c3f2: f854 403c ldr.w r4, [r4, ip, lsl #3]
- 800c3f6: 428c cmp r4, r1
- 800c3f8: d1f3 bne.n 800c3e2 <lwip_poll_should_wake+0xc>
- if (has_recvevent && (pollfd->events & POLLIN) != 0) {
- 800c3fa: b122 cbz r2, 800c406 <lwip_poll_should_wake+0x30>
- 800c3fc: f9be 4004 ldrsh.w r4, [lr, #4]
- 800c400: f014 0f01 tst.w r4, #1
- 800c404: d10a bne.n 800c41c <lwip_poll_should_wake+0x46>
- if (has_sendevent && (pollfd->events & POLLOUT) != 0) {
- 800c406: 2b00 cmp r3, #0
- 800c408: d0ea beq.n 800c3e0 <lwip_poll_should_wake+0xa>
- 800c40a: f9be 4004 ldrsh.w r4, [lr, #4]
- 800c40e: f014 0f02 tst.w r4, #2
- 800c412: d0e5 beq.n 800c3e0 <lwip_poll_should_wake+0xa>
- return 1;
- 800c414: 2001 movs r0, #1
- 800c416: e000 b.n 800c41a <lwip_poll_should_wake+0x44>
- /* POLLERR is output only. */
- return 1;
- }
- }
- }
- return 0;
- 800c418: 2000 movs r0, #0
- }
- 800c41a: bd30 pop {r4, r5, pc}
- return 1;
- 800c41c: 2001 movs r0, #1
- 800c41e: e7fc b.n 800c41a <lwip_poll_should_wake+0x44>
- return 1;
- 800c420: 2001 movs r0, #1
- 800c422: e7fa b.n 800c41a <lwip_poll_should_wake+0x44>
- 0800c424 <alloc_socket>:
- {
- 800c424: b5f8 push {r3, r4, r5, r6, r7, lr}
- 800c426: 4606 mov r6, r0
- 800c428: 460d mov r5, r1
- for (i = 0; i < NUM_SOCKETS; ++i) {
- 800c42a: 2400 movs r4, #0
- 800c42c: 2c03 cmp r4, #3
- 800c42e: dc31 bgt.n 800c494 <alloc_socket+0x70>
- SYS_ARCH_PROTECT(lev);
- 800c430: f000 fe1e bl 800d070 <sys_arch_protect>
- if (!sockets[i].conn) {
- 800c434: 0123 lsls r3, r4, #4
- 800c436: 4a19 ldr r2, [pc, #100] @ (800c49c <alloc_socket+0x78>)
- 800c438: 58d3 ldr r3, [r2, r3]
- 800c43a: b11b cbz r3, 800c444 <alloc_socket+0x20>
- SYS_ARCH_UNPROTECT(lev);
- 800c43c: f000 fe24 bl 800d088 <sys_arch_unprotect>
- for (i = 0; i < NUM_SOCKETS; ++i) {
- 800c440: 3401 adds r4, #1
- 800c442: e7f3 b.n 800c42c <alloc_socket+0x8>
- sockets[i].conn = newconn;
- 800c444: 0123 lsls r3, r4, #4
- 800c446: eb02 1704 add.w r7, r2, r4, lsl #4
- 800c44a: 50d6 str r6, [r2, r3]
- SYS_ARCH_UNPROTECT(lev);
- 800c44c: f000 fe1c bl 800d088 <sys_arch_unprotect>
- sockets[i].lastdata.pbuf = NULL;
- 800c450: 2300 movs r3, #0
- 800c452: 607b str r3, [r7, #4]
- LWIP_ASSERT("sockets[i].select_waiting == 0", sockets[i].select_waiting == 0);
- 800c454: 7bbb ldrb r3, [r7, #14]
- 800c456: b98b cbnz r3, 800c47c <alloc_socket+0x58>
- sockets[i].rcvevent = 0;
- 800c458: 4b10 ldr r3, [pc, #64] @ (800c49c <alloc_socket+0x78>)
- 800c45a: eb03 1304 add.w r3, r3, r4, lsl #4
- 800c45e: 2200 movs r2, #0
- 800c460: 811a strh r2, [r3, #8]
- sockets[i].sendevent = (NETCONNTYPE_GROUP(newconn->type) == NETCONN_TCP ? (accepted != 0) : 1);
- 800c462: 7833 ldrb r3, [r6, #0]
- 800c464: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 800c468: 2b10 cmp r3, #16
- 800c46a: d00f beq.n 800c48c <alloc_socket+0x68>
- 800c46c: 2501 movs r5, #1
- 800c46e: 4b0b ldr r3, [pc, #44] @ (800c49c <alloc_socket+0x78>)
- 800c470: eb03 1304 add.w r3, r3, r4, lsl #4
- 800c474: 815d strh r5, [r3, #10]
- sockets[i].errevent = 0;
- 800c476: 2200 movs r2, #0
- 800c478: 819a strh r2, [r3, #12]
- return i + LWIP_SOCKET_OFFSET;
- 800c47a: e00d b.n 800c498 <alloc_socket+0x74>
- LWIP_ASSERT("sockets[i].select_waiting == 0", sockets[i].select_waiting == 0);
- 800c47c: 4b08 ldr r3, [pc, #32] @ (800c4a0 <alloc_socket+0x7c>)
- 800c47e: f240 220e movw r2, #526 @ 0x20e
- 800c482: 4908 ldr r1, [pc, #32] @ (800c4a4 <alloc_socket+0x80>)
- 800c484: 4808 ldr r0, [pc, #32] @ (800c4a8 <alloc_socket+0x84>)
- 800c486: f006 ffbf bl 8013408 <iprintf>
- 800c48a: e7e5 b.n 800c458 <alloc_socket+0x34>
- sockets[i].sendevent = (NETCONNTYPE_GROUP(newconn->type) == NETCONN_TCP ? (accepted != 0) : 1);
- 800c48c: 2d00 cmp r5, #0
- 800c48e: d0ee beq.n 800c46e <alloc_socket+0x4a>
- 800c490: 2501 movs r5, #1
- 800c492: e7ec b.n 800c46e <alloc_socket+0x4a>
- return -1;
- 800c494: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
- }
- 800c498: 4620 mov r0, r4
- 800c49a: bdf8 pop {r3, r4, r5, r6, r7, pc}
- 800c49c: 24019b8c .word 0x24019b8c
- 800c4a0: 080163d0 .word 0x080163d0
- 800c4a4: 0801644c .word 0x0801644c
- 800c4a8: 080144e8 .word 0x080144e8
- 0800c4ac <lwip_sock_make_addr>:
- {
- 800c4ac: b5f0 push {r4, r5, r6, r7, lr}
- 800c4ae: b085 sub sp, #20
- 800c4b0: 4616 mov r6, r2
- 800c4b2: 461c mov r4, r3
- 800c4b4: 9d0a ldr r5, [sp, #40] @ 0x28
- LWIP_ASSERT("fromaddr != NULL", fromaddr != NULL);
- 800c4b6: 460f mov r7, r1
- 800c4b8: b1d1 cbz r1, 800c4f0 <lwip_sock_make_addr+0x44>
- LWIP_ASSERT("from != NULL", from != NULL);
- 800c4ba: b30c cbz r4, 800c500 <lwip_sock_make_addr+0x54>
- LWIP_ASSERT("fromlen != NULL", fromlen != NULL);
- 800c4bc: b345 cbz r5, 800c510 <lwip_sock_make_addr+0x64>
- IPADDR_PORT_TO_SOCKADDR(&saddr, fromaddr, port);
- 800c4be: 2310 movs r3, #16
- 800c4c0: f88d 3000 strb.w r3, [sp]
- 800c4c4: 2302 movs r3, #2
- 800c4c6: f88d 3001 strb.w r3, [sp, #1]
- 800c4ca: 4630 mov r0, r6
- 800c4cc: f7fb fcd6 bl 8007e7c <lwip_htons>
- 800c4d0: f8ad 0002 strh.w r0, [sp, #2]
- 800c4d4: 683b ldr r3, [r7, #0]
- 800c4d6: 9301 str r3, [sp, #4]
- 800c4d8: 2300 movs r3, #0
- 800c4da: 9302 str r3, [sp, #8]
- 800c4dc: 9303 str r3, [sp, #12]
- if (*fromlen < saddr.sa.sa_len) {
- 800c4de: 682a ldr r2, [r5, #0]
- 800c4e0: f89d 3000 ldrb.w r3, [sp]
- 800c4e4: 429a cmp r2, r3
- 800c4e6: d31b bcc.n 800c520 <lwip_sock_make_addr+0x74>
- } else if (*fromlen > saddr.sa.sa_len) {
- 800c4e8: d923 bls.n 800c532 <lwip_sock_make_addr+0x86>
- *fromlen = saddr.sa.sa_len;
- 800c4ea: 602b str r3, [r5, #0]
- int truncated = 0;
- 800c4ec: 2600 movs r6, #0
- 800c4ee: e018 b.n 800c522 <lwip_sock_make_addr+0x76>
- LWIP_ASSERT("fromaddr != NULL", fromaddr != NULL);
- 800c4f0: 4b11 ldr r3, [pc, #68] @ (800c538 <lwip_sock_make_addr+0x8c>)
- 800c4f2: f240 4207 movw r2, #1031 @ 0x407
- 800c4f6: 4911 ldr r1, [pc, #68] @ (800c53c <lwip_sock_make_addr+0x90>)
- 800c4f8: 4811 ldr r0, [pc, #68] @ (800c540 <lwip_sock_make_addr+0x94>)
- 800c4fa: f006 ff85 bl 8013408 <iprintf>
- 800c4fe: e7dc b.n 800c4ba <lwip_sock_make_addr+0xe>
- LWIP_ASSERT("from != NULL", from != NULL);
- 800c500: 4b0d ldr r3, [pc, #52] @ (800c538 <lwip_sock_make_addr+0x8c>)
- 800c502: f44f 6281 mov.w r2, #1032 @ 0x408
- 800c506: 490f ldr r1, [pc, #60] @ (800c544 <lwip_sock_make_addr+0x98>)
- 800c508: 480d ldr r0, [pc, #52] @ (800c540 <lwip_sock_make_addr+0x94>)
- 800c50a: f006 ff7d bl 8013408 <iprintf>
- 800c50e: e7d5 b.n 800c4bc <lwip_sock_make_addr+0x10>
- LWIP_ASSERT("fromlen != NULL", fromlen != NULL);
- 800c510: 4b09 ldr r3, [pc, #36] @ (800c538 <lwip_sock_make_addr+0x8c>)
- 800c512: f240 4209 movw r2, #1033 @ 0x409
- 800c516: 490c ldr r1, [pc, #48] @ (800c548 <lwip_sock_make_addr+0x9c>)
- 800c518: 4809 ldr r0, [pc, #36] @ (800c540 <lwip_sock_make_addr+0x94>)
- 800c51a: f006 ff75 bl 8013408 <iprintf>
- 800c51e: e7ce b.n 800c4be <lwip_sock_make_addr+0x12>
- truncated = 1;
- 800c520: 2601 movs r6, #1
- MEMCPY(from, &saddr, *fromlen);
- 800c522: 682a ldr r2, [r5, #0]
- 800c524: 4669 mov r1, sp
- 800c526: 4620 mov r0, r4
- 800c528: f007 f9ab bl 8013882 <memcpy>
- }
- 800c52c: 4630 mov r0, r6
- 800c52e: b005 add sp, #20
- 800c530: bdf0 pop {r4, r5, r6, r7, pc}
- int truncated = 0;
- 800c532: 2600 movs r6, #0
- 800c534: e7f5 b.n 800c522 <lwip_sock_make_addr+0x76>
- 800c536: bf00 nop
- 800c538: 080163d0 .word 0x080163d0
- 800c53c: 0801646c .word 0x0801646c
- 800c540: 080144e8 .word 0x080144e8
- 800c544: 08016480 .word 0x08016480
- 800c548: 08016490 .word 0x08016490
- 0800c54c <lwip_recv_tcp_from>:
- if (sock == NULL) {
- 800c54c: b1d8 cbz r0, 800c586 <lwip_recv_tcp_from+0x3a>
- {
- 800c54e: b570 push {r4, r5, r6, lr}
- 800c550: b084 sub sp, #16
- 800c552: 460c mov r4, r1
- 800c554: 4615 mov r5, r2
- 800c556: 4606 mov r6, r0
- if (from && fromlen)
- 800c558: 2900 cmp r1, #0
- 800c55a: bf18 it ne
- 800c55c: 2a00 cmpne r2, #0
- 800c55e: d102 bne.n 800c566 <lwip_recv_tcp_from+0x1a>
- return 0;
- 800c560: 2000 movs r0, #0
- }
- 800c562: b004 add sp, #16
- 800c564: bd70 pop {r4, r5, r6, pc}
- netconn_getaddr(sock->conn, &tmpaddr, &port, 0);
- 800c566: 2300 movs r3, #0
- 800c568: f10d 020a add.w r2, sp, #10
- 800c56c: a903 add r1, sp, #12
- 800c56e: 6800 ldr r0, [r0, #0]
- 800c570: f7fa f91e bl 80067b0 <netconn_getaddr>
- return lwip_sock_make_addr(sock->conn, &tmpaddr, port, from, fromlen);
- 800c574: 9500 str r5, [sp, #0]
- 800c576: 4623 mov r3, r4
- 800c578: f8bd 200a ldrh.w r2, [sp, #10]
- 800c57c: a903 add r1, sp, #12
- 800c57e: 6830 ldr r0, [r6, #0]
- 800c580: f7ff ff94 bl 800c4ac <lwip_sock_make_addr>
- 800c584: e7ed b.n 800c562 <lwip_recv_tcp_from+0x16>
- return 0;
- 800c586: 2000 movs r0, #0
- }
- 800c588: 4770 bx lr
- 0800c58a <free_socket_free_elements>:
- {
- 800c58a: b510 push {r4, lr}
- 800c58c: 4603 mov r3, r0
- 800c58e: 460c mov r4, r1
- if (lastdata->pbuf != NULL) {
- 800c590: 6810 ldr r0, [r2, #0]
- 800c592: b110 cbz r0, 800c59a <free_socket_free_elements+0x10>
- if (is_tcp) {
- 800c594: b133 cbz r3, 800c5a4 <free_socket_free_elements+0x1a>
- pbuf_free(lastdata->pbuf);
- 800c596: f7ff fc03 bl 800bda0 <pbuf_free>
- if (conn != NULL) {
- 800c59a: b114 cbz r4, 800c5a2 <free_socket_free_elements+0x18>
- netconn_delete(conn);
- 800c59c: 4620 mov r0, r4
- 800c59e: f7fa f8f7 bl 8006790 <netconn_delete>
- }
- 800c5a2: bd10 pop {r4, pc}
- netbuf_delete(lastdata->netbuf);
- 800c5a4: f7ff f87e bl 800b6a4 <netbuf_delete>
- 800c5a8: e7f7 b.n 800c59a <free_socket_free_elements+0x10>
- 0800c5aa <free_socket>:
- {
- 800c5aa: b570 push {r4, r5, r6, lr}
- 800c5ac: b082 sub sp, #8
- 800c5ae: 4605 mov r5, r0
- 800c5b0: 460c mov r4, r1
- SYS_ARCH_PROTECT(lev);
- 800c5b2: f000 fd5d bl 800d070 <sys_arch_protect>
- 800c5b6: 4606 mov r6, r0
- freed = free_socket_locked(sock, is_tcp, &conn, &lastdata);
- 800c5b8: 466b mov r3, sp
- 800c5ba: aa01 add r2, sp, #4
- 800c5bc: 4621 mov r1, r4
- 800c5be: 4628 mov r0, r5
- 800c5c0: f7ff ff00 bl 800c3c4 <free_socket_locked>
- 800c5c4: 4605 mov r5, r0
- SYS_ARCH_UNPROTECT(lev);
- 800c5c6: 4630 mov r0, r6
- 800c5c8: f000 fd5e bl 800d088 <sys_arch_unprotect>
- if (freed) {
- 800c5cc: b90d cbnz r5, 800c5d2 <free_socket+0x28>
- }
- 800c5ce: b002 add sp, #8
- 800c5d0: bd70 pop {r4, r5, r6, pc}
- free_socket_free_elements(is_tcp, conn, &lastdata);
- 800c5d2: 466a mov r2, sp
- 800c5d4: 9901 ldr r1, [sp, #4]
- 800c5d6: 4620 mov r0, r4
- 800c5d8: f7ff ffd7 bl 800c58a <free_socket_free_elements>
- }
- 800c5dc: e7f7 b.n 800c5ce <free_socket+0x24>
- ...
- 0800c5e0 <lwip_recv_tcp>:
- {
- 800c5e0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 800c5e4: b085 sub sp, #20
- 800c5e6: 4681 mov r9, r0
- 800c5e8: 9101 str r1, [sp, #4]
- 800c5ea: 4698 mov r8, r3
- ssize_t recv_left = (len <= SSIZE_MAX) ? (ssize_t)len : SSIZE_MAX;
- 800c5ec: 4615 mov r5, r2
- 800c5ee: 2a00 cmp r2, #0
- 800c5f0: db10 blt.n 800c614 <lwip_recv_tcp+0x34>
- LWIP_ASSERT("no socket given", sock != NULL);
- 800c5f2: f1b9 0f00 cmp.w r9, #0
- 800c5f6: d010 beq.n 800c61a <lwip_recv_tcp+0x3a>
- LWIP_ASSERT("this should be checked internally", NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP);
- 800c5f8: f8d9 3000 ldr.w r3, [r9]
- 800c5fc: 781b ldrb r3, [r3, #0]
- 800c5fe: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 800c602: 2b10 cmp r3, #16
- 800c604: d111 bne.n 800c62a <lwip_recv_tcp+0x4a>
- if (flags & MSG_DONTWAIT) {
- 800c606: f018 0f08 tst.w r8, #8
- 800c60a: d116 bne.n 800c63a <lwip_recv_tcp+0x5a>
- u8_t apiflags = NETCONN_NOAUTORCVD;
- 800c60c: f04f 0a08 mov.w sl, #8
- apiflags |= NETCONN_DONTBLOCK;
- 800c610: 2600 movs r6, #0
- 800c612: e055 b.n 800c6c0 <lwip_recv_tcp+0xe0>
- ssize_t recv_left = (len <= SSIZE_MAX) ? (ssize_t)len : SSIZE_MAX;
- 800c614: f06f 4500 mvn.w r5, #2147483648 @ 0x80000000
- 800c618: e7eb b.n 800c5f2 <lwip_recv_tcp+0x12>
- LWIP_ASSERT("no socket given", sock != NULL);
- 800c61a: 4b47 ldr r3, [pc, #284] @ (800c738 <lwip_recv_tcp+0x158>)
- 800c61c: f240 329e movw r2, #926 @ 0x39e
- 800c620: 4946 ldr r1, [pc, #280] @ (800c73c <lwip_recv_tcp+0x15c>)
- 800c622: 4847 ldr r0, [pc, #284] @ (800c740 <lwip_recv_tcp+0x160>)
- 800c624: f006 fef0 bl 8013408 <iprintf>
- 800c628: e7e6 b.n 800c5f8 <lwip_recv_tcp+0x18>
- LWIP_ASSERT("this should be checked internally", NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP);
- 800c62a: 4b43 ldr r3, [pc, #268] @ (800c738 <lwip_recv_tcp+0x158>)
- 800c62c: f240 329f movw r2, #927 @ 0x39f
- 800c630: 4944 ldr r1, [pc, #272] @ (800c744 <lwip_recv_tcp+0x164>)
- 800c632: 4843 ldr r0, [pc, #268] @ (800c740 <lwip_recv_tcp+0x160>)
- 800c634: f006 fee8 bl 8013408 <iprintf>
- 800c638: e7e5 b.n 800c606 <lwip_recv_tcp+0x26>
- apiflags |= NETCONN_DONTBLOCK;
- 800c63a: f04f 0a0c mov.w sl, #12
- 800c63e: e7e7 b.n 800c610 <lwip_recv_tcp+0x30>
- err = netconn_recv_tcp_pbuf_flags(sock->conn, &p, apiflags);
- 800c640: 4652 mov r2, sl
- 800c642: a903 add r1, sp, #12
- 800c644: f8d9 0000 ldr.w r0, [r9]
- 800c648: f7fa fb14 bl 8006c74 <netconn_recv_tcp_pbuf_flags>
- if (err != ERR_OK) {
- 800c64c: 4604 mov r4, r0
- 800c64e: b928 cbnz r0, 800c65c <lwip_recv_tcp+0x7c>
- LWIP_ASSERT("p != NULL", p != NULL);
- 800c650: 9b03 ldr r3, [sp, #12]
- 800c652: b193 cbz r3, 800c67a <lwip_recv_tcp+0x9a>
- sock->lastdata.pbuf = p;
- 800c654: 9b03 ldr r3, [sp, #12]
- 800c656: f8c9 3004 str.w r3, [r9, #4]
- 800c65a: e036 b.n 800c6ca <lwip_recv_tcp+0xea>
- if (recvd > 0) {
- 800c65c: 2e00 cmp r6, #0
- 800c65e: dd01 ble.n 800c664 <lwip_recv_tcp+0x84>
- goto lwip_recv_tcp_done;
- 800c660: 46b3 mov fp, r6
- 800c662: e05b b.n 800c71c <lwip_recv_tcp+0x13c>
- sock_set_errno(sock, err_to_errno(err));
- 800c664: f7fc fe68 bl 8009338 <err_to_errno>
- 800c668: b108 cbz r0, 800c66e <lwip_recv_tcp+0x8e>
- 800c66a: 4a37 ldr r2, [pc, #220] @ (800c748 <lwip_recv_tcp+0x168>)
- 800c66c: 6010 str r0, [r2, #0]
- if (err == ERR_CLSD) {
- 800c66e: f114 0f0f cmn.w r4, #15
- 800c672: d04d beq.n 800c710 <lwip_recv_tcp+0x130>
- return -1;
- 800c674: f04f 3bff mov.w fp, #4294967295 @ 0xffffffff
- 800c678: e053 b.n 800c722 <lwip_recv_tcp+0x142>
- LWIP_ASSERT("p != NULL", p != NULL);
- 800c67a: 4b2f ldr r3, [pc, #188] @ (800c738 <lwip_recv_tcp+0x158>)
- 800c67c: f240 32c5 movw r2, #965 @ 0x3c5
- 800c680: 4932 ldr r1, [pc, #200] @ (800c74c <lwip_recv_tcp+0x16c>)
- 800c682: 482f ldr r0, [pc, #188] @ (800c740 <lwip_recv_tcp+0x160>)
- 800c684: f006 fec0 bl 8013408 <iprintf>
- 800c688: e7e4 b.n 800c654 <lwip_recv_tcp+0x74>
- LWIP_ASSERT("invalid copylen, len would underflow", recv_left >= copylen);
- 800c68a: 4b2b ldr r3, [pc, #172] @ (800c738 <lwip_recv_tcp+0x158>)
- 800c68c: f240 32dd movw r2, #989 @ 0x3dd
- 800c690: 492f ldr r1, [pc, #188] @ (800c750 <lwip_recv_tcp+0x170>)
- 800c692: 482b ldr r0, [pc, #172] @ (800c740 <lwip_recv_tcp+0x160>)
- 800c694: f006 feb8 bl 8013408 <iprintf>
- 800c698: e027 b.n 800c6ea <lwip_recv_tcp+0x10a>
- LWIP_ASSERT("invalid copylen", p->tot_len >= copylen);
- 800c69a: 4b27 ldr r3, [pc, #156] @ (800c738 <lwip_recv_tcp+0x158>)
- 800c69c: f240 32e3 movw r2, #995 @ 0x3e3
- 800c6a0: 492c ldr r1, [pc, #176] @ (800c754 <lwip_recv_tcp+0x174>)
- 800c6a2: 4827 ldr r0, [pc, #156] @ (800c740 <lwip_recv_tcp+0x160>)
- 800c6a4: f006 feb0 bl 8013408 <iprintf>
- 800c6a8: e027 b.n 800c6fa <lwip_recv_tcp+0x11a>
- sock->lastdata.pbuf = NULL;
- 800c6aa: 2300 movs r3, #0
- 800c6ac: f8c9 3004 str.w r3, [r9, #4]
- pbuf_free(p);
- 800c6b0: f7ff fb76 bl 800bda0 <pbuf_free>
- apiflags |= NETCONN_DONTBLOCK | NETCONN_NOFIN;
- 800c6b4: f04a 0a14 orr.w sl, sl, #20
- } while ((recv_left > 0) && !(flags & MSG_PEEK));
- 800c6b8: 2d00 cmp r5, #0
- 800c6ba: dd2c ble.n 800c716 <lwip_recv_tcp+0x136>
- 800c6bc: bb5e cbnz r6, 800c716 <lwip_recv_tcp+0x136>
- recvd += copylen;
- 800c6be: 465e mov r6, fp
- if (sock->lastdata.pbuf) {
- 800c6c0: f8d9 3004 ldr.w r3, [r9, #4]
- 800c6c4: 2b00 cmp r3, #0
- 800c6c6: d0bb beq.n 800c640 <lwip_recv_tcp+0x60>
- p = sock->lastdata.pbuf;
- 800c6c8: 9303 str r3, [sp, #12]
- if (recv_left > p->tot_len) {
- 800c6ca: 9803 ldr r0, [sp, #12]
- 800c6cc: 8904 ldrh r4, [r0, #8]
- 800c6ce: 42a5 cmp r5, r4
- 800c6d0: dc00 bgt.n 800c6d4 <lwip_recv_tcp+0xf4>
- copylen = (u16_t)recv_left;
- 800c6d2: b2ac uxth r4, r5
- if (recvd + copylen < recvd) {
- 800c6d4: 4627 mov r7, r4
- 800c6d6: eb04 0b06 add.w fp, r4, r6
- pbuf_copy_partial(p, (u8_t *)mem + recvd, copylen, 0);
- 800c6da: 2300 movs r3, #0
- 800c6dc: 4622 mov r2, r4
- 800c6de: 9901 ldr r1, [sp, #4]
- 800c6e0: 4431 add r1, r6
- 800c6e2: f7ff fddf bl 800c2a4 <pbuf_copy_partial>
- LWIP_ASSERT("invalid copylen, len would underflow", recv_left >= copylen);
- 800c6e6: 42a5 cmp r5, r4
- 800c6e8: dbcf blt.n 800c68a <lwip_recv_tcp+0xaa>
- recv_left -= copylen;
- 800c6ea: 1bed subs r5, r5, r7
- if ((flags & MSG_PEEK) == 0) {
- 800c6ec: f018 0601 ands.w r6, r8, #1
- 800c6f0: d1e0 bne.n 800c6b4 <lwip_recv_tcp+0xd4>
- LWIP_ASSERT("invalid copylen", p->tot_len >= copylen);
- 800c6f2: 9b03 ldr r3, [sp, #12]
- 800c6f4: 891b ldrh r3, [r3, #8]
- 800c6f6: 429c cmp r4, r3
- 800c6f8: d8cf bhi.n 800c69a <lwip_recv_tcp+0xba>
- if (p->tot_len - copylen > 0) {
- 800c6fa: 9803 ldr r0, [sp, #12]
- 800c6fc: 8903 ldrh r3, [r0, #8]
- 800c6fe: 1bdb subs r3, r3, r7
- 800c700: 2b00 cmp r3, #0
- 800c702: ddd2 ble.n 800c6aa <lwip_recv_tcp+0xca>
- sock->lastdata.pbuf = pbuf_free_header(p, copylen);
- 800c704: 4621 mov r1, r4
- 800c706: f7ff fcb3 bl 800c070 <pbuf_free_header>
- 800c70a: f8c9 0004 str.w r0, [r9, #4]
- LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: lastdata now pbuf=%p\n", (void *)sock->lastdata.pbuf));
- 800c70e: e7d1 b.n 800c6b4 <lwip_recv_tcp+0xd4>
- return 0;
- 800c710: f04f 0b00 mov.w fp, #0
- 800c714: e005 b.n 800c722 <lwip_recv_tcp+0x142>
- if ((recvd > 0) && !(flags & MSG_PEEK)) {
- 800c716: f1bb 0f00 cmp.w fp, #0
- 800c71a: dd02 ble.n 800c722 <lwip_recv_tcp+0x142>
- 800c71c: f018 0f01 tst.w r8, #1
- 800c720: d003 beq.n 800c72a <lwip_recv_tcp+0x14a>
- }
- 800c722: 4658 mov r0, fp
- 800c724: b005 add sp, #20
- 800c726: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
- netconn_tcp_recvd(sock->conn, (size_t)recvd);
- 800c72a: 4659 mov r1, fp
- 800c72c: f8d9 0000 ldr.w r0, [r9]
- 800c730: f7fa f8bc bl 80068ac <netconn_tcp_recvd>
- 800c734: e7f5 b.n 800c722 <lwip_recv_tcp+0x142>
- 800c736: bf00 nop
- 800c738: 080163d0 .word 0x080163d0
- 800c73c: 080164a0 .word 0x080164a0
- 800c740: 080144e8 .word 0x080144e8
- 800c744: 080164b0 .word 0x080164b0
- 800c748: 24019d8c .word 0x24019d8c
- 800c74c: 08014fc0 .word 0x08014fc0
- 800c750: 080164d4 .word 0x080164d4
- 800c754: 080164fc .word 0x080164fc
- 0800c758 <lwip_recvfrom_udp_raw>:
- {
- 800c758: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 800c75c: b085 sub sp, #20
- 800c75e: 4681 mov r9, r0
- 800c760: 4688 mov r8, r1
- 800c762: 4616 mov r6, r2
- 800c764: 469a mov sl, r3
- LWIP_ERROR("lwip_recvfrom_udp_raw: invalid arguments", (msg->msg_iov != NULL) || (msg->msg_iovlen <= 0), return ERR_ARG;);
- 800c766: 6893 ldr r3, [r2, #8]
- 800c768: b16b cbz r3, 800c786 <lwip_recvfrom_udp_raw+0x2e>
- if (flags & MSG_DONTWAIT) {
- 800c76a: f018 0f08 tst.w r8, #8
- 800c76e: d017 beq.n 800c7a0 <lwip_recvfrom_udp_raw+0x48>
- apiflags = NETCONN_DONTBLOCK;
- 800c770: 2204 movs r2, #4
- buf = sock->lastdata.netbuf;
- 800c772: f8d9 3004 ldr.w r3, [r9, #4]
- 800c776: 9303 str r3, [sp, #12]
- if (buf == NULL) {
- 800c778: b1a3 cbz r3, 800c7a4 <lwip_recvfrom_udp_raw+0x4c>
- buflen = buf->p->tot_len;
- 800c77a: 9b03 ldr r3, [sp, #12]
- 800c77c: 681b ldr r3, [r3, #0]
- 800c77e: 891f ldrh r7, [r3, #8]
- for (i = 0; (i < msg->msg_iovlen) && (copied < buflen); i++) {
- 800c780: 2500 movs r5, #0
- copied = 0;
- 800c782: 46ab mov fp, r5
- for (i = 0; (i < msg->msg_iovlen) && (copied < buflen); i++) {
- 800c784: e02e b.n 800c7e4 <lwip_recvfrom_udp_raw+0x8c>
- LWIP_ERROR("lwip_recvfrom_udp_raw: invalid arguments", (msg->msg_iov != NULL) || (msg->msg_iovlen <= 0), return ERR_ARG;);
- 800c786: 68d3 ldr r3, [r2, #12]
- 800c788: 2b00 cmp r3, #0
- 800c78a: ddee ble.n 800c76a <lwip_recvfrom_udp_raw+0x12>
- 800c78c: 4b32 ldr r3, [pc, #200] @ (800c858 <lwip_recvfrom_udp_raw+0x100>)
- 800c78e: f240 4249 movw r2, #1097 @ 0x449
- 800c792: 4932 ldr r1, [pc, #200] @ (800c85c <lwip_recvfrom_udp_raw+0x104>)
- 800c794: 4832 ldr r0, [pc, #200] @ (800c860 <lwip_recvfrom_udp_raw+0x108>)
- 800c796: f006 fe37 bl 8013408 <iprintf>
- 800c79a: f06f 000f mvn.w r0, #15
- 800c79e: e045 b.n 800c82c <lwip_recvfrom_udp_raw+0xd4>
- apiflags = 0;
- 800c7a0: 2200 movs r2, #0
- 800c7a2: e7e6 b.n 800c772 <lwip_recvfrom_udp_raw+0x1a>
- err = netconn_recv_udp_raw_netbuf_flags(sock->conn, &buf, apiflags);
- 800c7a4: a903 add r1, sp, #12
- 800c7a6: f8d9 0000 ldr.w r0, [r9]
- 800c7aa: f7fa f9f3 bl 8006b94 <netconn_recv_udp_raw_netbuf_flags>
- if (err != ERR_OK) {
- 800c7ae: 2800 cmp r0, #0
- 800c7b0: d13c bne.n 800c82c <lwip_recvfrom_udp_raw+0xd4>
- LWIP_ASSERT("buf != NULL", buf != NULL);
- 800c7b2: 9b03 ldr r3, [sp, #12]
- 800c7b4: b11b cbz r3, 800c7be <lwip_recvfrom_udp_raw+0x66>
- sock->lastdata.netbuf = buf;
- 800c7b6: 9b03 ldr r3, [sp, #12]
- 800c7b8: f8c9 3004 str.w r3, [r9, #4]
- 800c7bc: e7dd b.n 800c77a <lwip_recvfrom_udp_raw+0x22>
- LWIP_ASSERT("buf != NULL", buf != NULL);
- 800c7be: 4b26 ldr r3, [pc, #152] @ (800c858 <lwip_recvfrom_udp_raw+0x100>)
- 800c7c0: f240 425e movw r2, #1118 @ 0x45e
- 800c7c4: 4927 ldr r1, [pc, #156] @ (800c864 <lwip_recvfrom_udp_raw+0x10c>)
- 800c7c6: 4826 ldr r0, [pc, #152] @ (800c860 <lwip_recvfrom_udp_raw+0x108>)
- 800c7c8: f006 fe1e bl 8013408 <iprintf>
- 800c7cc: e7f3 b.n 800c7b6 <lwip_recvfrom_udp_raw+0x5e>
- pbuf_copy_partial(buf->p, (u8_t *)msg->msg_iov[i].iov_base, copylen, copied);
- 800c7ce: 465b mov r3, fp
- 800c7d0: 4622 mov r2, r4
- 800c7d2: 5809 ldr r1, [r1, r0]
- 800c7d4: 9803 ldr r0, [sp, #12]
- 800c7d6: 6800 ldr r0, [r0, #0]
- 800c7d8: f7ff fd64 bl 800c2a4 <pbuf_copy_partial>
- copied = (u16_t)(copied + copylen);
- 800c7dc: 445c add r4, fp
- 800c7de: fa1f fb84 uxth.w fp, r4
- for (i = 0; (i < msg->msg_iovlen) && (copied < buflen); i++) {
- 800c7e2: 3501 adds r5, #1
- 800c7e4: 68f3 ldr r3, [r6, #12]
- 800c7e6: 42ab cmp r3, r5
- 800c7e8: dd0d ble.n 800c806 <lwip_recvfrom_udp_raw+0xae>
- 800c7ea: 45bb cmp fp, r7
- 800c7ec: d20b bcs.n 800c806 <lwip_recvfrom_udp_raw+0xae>
- u16_t len_left = (u16_t)(buflen - copied);
- 800c7ee: eba7 040b sub.w r4, r7, fp
- 800c7f2: b2a4 uxth r4, r4
- if (msg->msg_iov[i].iov_len > len_left) {
- 800c7f4: 68b1 ldr r1, [r6, #8]
- 800c7f6: 00e8 lsls r0, r5, #3
- 800c7f8: eb01 03c5 add.w r3, r1, r5, lsl #3
- 800c7fc: 685b ldr r3, [r3, #4]
- 800c7fe: 42a3 cmp r3, r4
- 800c800: d8e5 bhi.n 800c7ce <lwip_recvfrom_udp_raw+0x76>
- copylen = (u16_t)msg->msg_iov[i].iov_len;
- 800c802: b29c uxth r4, r3
- 800c804: e7e3 b.n 800c7ce <lwip_recvfrom_udp_raw+0x76>
- if (msg->msg_name && msg->msg_namelen)
- 800c806: 6833 ldr r3, [r6, #0]
- 800c808: b10b cbz r3, 800c80e <lwip_recvfrom_udp_raw+0xb6>
- 800c80a: 6872 ldr r2, [r6, #4]
- 800c80c: b98a cbnz r2, 800c832 <lwip_recvfrom_udp_raw+0xda>
- msg->msg_flags = 0;
- 800c80e: 2300 movs r3, #0
- 800c810: 61b3 str r3, [r6, #24]
- if (msg->msg_control) {
- 800c812: 6933 ldr r3, [r6, #16]
- 800c814: b10b cbz r3, 800c81a <lwip_recvfrom_udp_raw+0xc2>
- msg->msg_controllen = 0;
- 800c816: 2300 movs r3, #0
- 800c818: 6173 str r3, [r6, #20]
- if ((flags & MSG_PEEK) == 0) {
- 800c81a: f018 0f01 tst.w r8, #1
- 800c81e: d012 beq.n 800c846 <lwip_recvfrom_udp_raw+0xee>
- if (datagram_len) {
- 800c820: f1ba 0f00 cmp.w sl, #0
- 800c824: d016 beq.n 800c854 <lwip_recvfrom_udp_raw+0xfc>
- *datagram_len = buflen;
- 800c826: f8aa 7000 strh.w r7, [sl]
- return ERR_OK;
- 800c82a: 2000 movs r0, #0
- }
- 800c82c: b005 add sp, #20
- 800c82e: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
- lwip_sock_make_addr(sock->conn, netbuf_fromaddr(buf), netbuf_fromport(buf),
- 800c832: 9903 ldr r1, [sp, #12]
- 800c834: 898a ldrh r2, [r1, #12]
- 800c836: 1d30 adds r0, r6, #4
- 800c838: 9000 str r0, [sp, #0]
- 800c83a: 3108 adds r1, #8
- 800c83c: f8d9 0000 ldr.w r0, [r9]
- 800c840: f7ff fe34 bl 800c4ac <lwip_sock_make_addr>
- 800c844: e7e3 b.n 800c80e <lwip_recvfrom_udp_raw+0xb6>
- sock->lastdata.netbuf = NULL;
- 800c846: 2300 movs r3, #0
- 800c848: f8c9 3004 str.w r3, [r9, #4]
- netbuf_delete(buf);
- 800c84c: 9803 ldr r0, [sp, #12]
- 800c84e: f7fe ff29 bl 800b6a4 <netbuf_delete>
- 800c852: e7e5 b.n 800c820 <lwip_recvfrom_udp_raw+0xc8>
- return ERR_OK;
- 800c854: 2000 movs r0, #0
- 800c856: e7e9 b.n 800c82c <lwip_recvfrom_udp_raw+0xd4>
- 800c858: 080163d0 .word 0x080163d0
- 800c85c: 0801650c .word 0x0801650c
- 800c860: 080144e8 .word 0x080144e8
- 800c864: 080148e4 .word 0x080148e4
- 0800c868 <select_check_waiters>:
- * of the loop, thus creating a possibility where a thread could modify the
- * select_cb_list during our UNPROTECT/PROTECT. We use a generational counter to
- * detect this change and restart the list walk. The list is expected to be small
- */
- static void select_check_waiters(int s, int has_recvevent, int has_sendevent, int has_errevent)
- {
- 800c868: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 800c86c: b082 sub sp, #8
- 800c86e: 4605 mov r5, r0
- 800c870: 460e mov r6, r1
- 800c872: 4690 mov r8, r2
- 800c874: 461f mov r7, r3
- #if !LWIP_TCPIP_CORE_LOCKING
- int last_select_cb_ctr;
- SYS_ARCH_DECL_PROTECT(lev);
- #endif /* !LWIP_TCPIP_CORE_LOCKING */
- LWIP_ASSERT_CORE_LOCKED();
- 800c876: f7f7 f949 bl 8003b0c <sys_check_core_locking>
- SYS_ARCH_PROTECT(lev);
- again:
- /* remember the state of select_cb_list to detect changes */
- last_select_cb_ctr = select_cb_ctr;
- #endif /* !LWIP_TCPIP_CORE_LOCKING */
- for (scb = select_cb_list; scb != NULL; scb = scb->next) {
- 800c87a: 4b2e ldr r3, [pc, #184] @ (800c934 <select_check_waiters+0xcc>)
- 800c87c: 681c ldr r4, [r3, #0]
- 800c87e: e03e b.n 800c8fe <select_check_waiters+0x96>
- else
- #endif /* LWIP_SOCKET_SELECT && LWIP_SOCKET_POLL */
- #if LWIP_SOCKET_SELECT
- {
- /* Test this select call for our socket */
- if (has_recvevent) {
- 800c880: b196 cbz r6, 800c8a8 <select_check_waiters+0x40>
- if (scb->readset && FD_ISSET(s, scb->readset)) {
- 800c882: 68a2 ldr r2, [r4, #8]
- 800c884: b18a cbz r2, 800c8aa <select_check_waiters+0x42>
- 800c886: 462b mov r3, r5
- 800c888: 2d00 cmp r5, #0
- 800c88a: db0a blt.n 800c8a2 <select_check_waiters+0x3a>
- 800c88c: 115b asrs r3, r3, #5
- 800c88e: f852 3023 ldr.w r3, [r2, r3, lsl #2]
- 800c892: f005 021f and.w r2, r5, #31
- 800c896: 40d3 lsrs r3, r2
- 800c898: f013 0f01 tst.w r3, #1
- 800c89c: d005 beq.n 800c8aa <select_check_waiters+0x42>
- do_signal = 1;
- 800c89e: 2001 movs r0, #1
- 800c8a0: e003 b.n 800c8aa <select_check_waiters+0x42>
- if (scb->readset && FD_ISSET(s, scb->readset)) {
- 800c8a2: f105 031f add.w r3, r5, #31
- 800c8a6: e7f1 b.n 800c88c <select_check_waiters+0x24>
- int do_signal = 0;
- 800c8a8: 4630 mov r0, r6
- }
- }
- if (has_sendevent) {
- 800c8aa: f1b8 0f00 cmp.w r8, #0
- 800c8ae: d00f beq.n 800c8d0 <select_check_waiters+0x68>
- if (!do_signal && scb->writeset && FD_ISSET(s, scb->writeset)) {
- 800c8b0: b970 cbnz r0, 800c8d0 <select_check_waiters+0x68>
- 800c8b2: 68e2 ldr r2, [r4, #12]
- 800c8b4: b162 cbz r2, 800c8d0 <select_check_waiters+0x68>
- 800c8b6: 462b mov r3, r5
- 800c8b8: 2d00 cmp r5, #0
- 800c8ba: db31 blt.n 800c920 <select_check_waiters+0xb8>
- 800c8bc: 115b asrs r3, r3, #5
- 800c8be: f852 3023 ldr.w r3, [r2, r3, lsl #2]
- 800c8c2: f005 021f and.w r2, r5, #31
- 800c8c6: 40d3 lsrs r3, r2
- 800c8c8: f013 0f01 tst.w r3, #1
- 800c8cc: d000 beq.n 800c8d0 <select_check_waiters+0x68>
- do_signal = 1;
- 800c8ce: 2001 movs r0, #1
- }
- }
- if (has_errevent) {
- 800c8d0: b31f cbz r7, 800c91a <select_check_waiters+0xb2>
- if (!do_signal && scb->exceptset && FD_ISSET(s, scb->exceptset)) {
- 800c8d2: b968 cbnz r0, 800c8f0 <select_check_waiters+0x88>
- 800c8d4: 6922 ldr r2, [r4, #16]
- 800c8d6: b302 cbz r2, 800c91a <select_check_waiters+0xb2>
- 800c8d8: 462b mov r3, r5
- 800c8da: 2d00 cmp r5, #0
- 800c8dc: db23 blt.n 800c926 <select_check_waiters+0xbe>
- 800c8de: 115b asrs r3, r3, #5
- 800c8e0: f852 3023 ldr.w r3, [r2, r3, lsl #2]
- 800c8e4: f005 021f and.w r2, r5, #31
- 800c8e8: 40d3 lsrs r3, r2
- 800c8ea: f013 0f01 tst.w r3, #1
- 800c8ee: d014 beq.n 800c91a <select_check_waiters+0xb2>
- }
- }
- }
- #endif /* LWIP_SOCKET_SELECT */
- if (do_signal) {
- scb->sem_signalled = 1;
- 800c8f0: 2301 movs r3, #1
- 800c8f2: 61e3 str r3, [r4, #28]
- /* For !LWIP_TCPIP_CORE_LOCKING, we don't call SYS_ARCH_UNPROTECT() before signaling
- the semaphore, as this might lead to the select thread taking itself off the list,
- invalidating the semaphore. */
- sys_sem_signal(SELECT_SEM_PTR(scb->sem));
- 800c8f4: f104 0020 add.w r0, r4, #32
- 800c8f8: f000 fb6f bl 800cfda <sys_sem_signal>
- for (scb = select_cb_list; scb != NULL; scb = scb->next) {
- 800c8fc: 6824 ldr r4, [r4, #0]
- 800c8fe: b1ac cbz r4, 800c92c <select_check_waiters+0xc4>
- if (scb->sem_signalled == 0) {
- 800c900: 69e0 ldr r0, [r4, #28]
- 800c902: 2800 cmp r0, #0
- 800c904: d1fa bne.n 800c8fc <select_check_waiters+0x94>
- if (scb->poll_fds != NULL) {
- 800c906: 6963 ldr r3, [r4, #20]
- 800c908: 2b00 cmp r3, #0
- 800c90a: d0b9 beq.n 800c880 <select_check_waiters+0x18>
- do_signal = lwip_poll_should_wake(scb, s, has_recvevent, has_sendevent, has_errevent);
- 800c90c: 9700 str r7, [sp, #0]
- 800c90e: 4643 mov r3, r8
- 800c910: 4632 mov r2, r6
- 800c912: 4629 mov r1, r5
- 800c914: 4620 mov r0, r4
- 800c916: f7ff fd5e bl 800c3d6 <lwip_poll_should_wake>
- if (do_signal) {
- 800c91a: 2800 cmp r0, #0
- 800c91c: d0ee beq.n 800c8fc <select_check_waiters+0x94>
- 800c91e: e7e7 b.n 800c8f0 <select_check_waiters+0x88>
- if (!do_signal && scb->writeset && FD_ISSET(s, scb->writeset)) {
- 800c920: f105 031f add.w r3, r5, #31
- 800c924: e7ca b.n 800c8bc <select_check_waiters+0x54>
- if (!do_signal && scb->exceptset && FD_ISSET(s, scb->exceptset)) {
- 800c926: f105 031f add.w r3, r5, #31
- 800c92a: e7d8 b.n 800c8de <select_check_waiters+0x76>
- /* remember the state of select_cb_list to detect changes */
- last_select_cb_ctr = select_cb_ctr;
- }
- SYS_ARCH_UNPROTECT(lev);
- #endif
- }
- 800c92c: b002 add sp, #8
- 800c92e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- 800c932: bf00 nop
- 800c934: 24019b88 .word 0x24019b88
- 0800c938 <event_callback>:
- if (conn) {
- 800c938: 2800 cmp r0, #0
- 800c93a: d06d beq.n 800ca18 <event_callback+0xe0>
- {
- 800c93c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 800c940: 460c mov r4, r1
- 800c942: 4605 mov r5, r0
- s = conn->socket;
- 800c944: 6986 ldr r6, [r0, #24]
- if (s < 0) {
- 800c946: 2e00 cmp r6, #0
- 800c948: db0e blt.n 800c968 <event_callback+0x30>
- sock = get_socket(s);
- 800c94a: 4630 mov r0, r6
- 800c94c: f7ff fd2e bl 800c3ac <get_socket>
- if (!sock) {
- 800c950: 4605 mov r5, r0
- 800c952: b368 cbz r0, 800c9b0 <event_callback+0x78>
- SYS_ARCH_PROTECT(lev);
- 800c954: f000 fb8c bl 800d070 <sys_arch_protect>
- 800c958: 4607 mov r7, r0
- switch (evt) {
- 800c95a: 2c04 cmp r4, #4
- 800c95c: d838 bhi.n 800c9d0 <event_callback+0x98>
- 800c95e: e8df f004 tbb [pc, r4]
- 800c962: 1c11 .short 0x1c11
- 800c964: 3129 .short 0x3129
- 800c966: 34 .byte 0x34
- 800c967: 00 .byte 0x00
- SYS_ARCH_PROTECT(lev);
- 800c968: f000 fb82 bl 800d070 <sys_arch_protect>
- if (conn->socket < 0) {
- 800c96c: 69ae ldr r6, [r5, #24]
- 800c96e: 2e00 cmp r6, #0
- 800c970: db02 blt.n 800c978 <event_callback+0x40>
- SYS_ARCH_UNPROTECT(lev);
- 800c972: f000 fb89 bl 800d088 <sys_arch_unprotect>
- 800c976: e7e8 b.n 800c94a <event_callback+0x12>
- if (evt == NETCONN_EVT_RCVPLUS) {
- 800c978: b90c cbnz r4, 800c97e <event_callback+0x46>
- conn->socket--;
- 800c97a: 3e01 subs r6, #1
- 800c97c: 61ae str r6, [r5, #24]
- SYS_ARCH_UNPROTECT(lev);
- 800c97e: f000 fb83 bl 800d088 <sys_arch_unprotect>
- return;
- 800c982: e015 b.n 800c9b0 <event_callback+0x78>
- sock->rcvevent++;
- 800c984: f9b5 3008 ldrsh.w r3, [r5, #8]
- 800c988: 3301 adds r3, #1
- 800c98a: b21b sxth r3, r3
- 800c98c: 812b strh r3, [r5, #8]
- if (sock->rcvevent > 1) {
- 800c98e: 2b01 cmp r3, #1
- 800c990: dd01 ble.n 800c996 <event_callback+0x5e>
- check_waiters = 0;
- 800c992: 2300 movs r3, #0
- 800c994: e006 b.n 800c9a4 <event_callback+0x6c>
- check_waiters = 1;
- 800c996: 2301 movs r3, #1
- 800c998: e004 b.n 800c9a4 <event_callback+0x6c>
- sock->rcvevent--;
- 800c99a: f9b5 3008 ldrsh.w r3, [r5, #8]
- 800c99e: 3b01 subs r3, #1
- 800c9a0: 812b strh r3, [r5, #8]
- check_waiters = 0;
- 800c9a2: 2300 movs r3, #0
- if (sock->select_waiting && check_waiters) {
- 800c9a4: 7baa ldrb r2, [r5, #14]
- 800c9a6: b102 cbz r2, 800c9aa <event_callback+0x72>
- 800c9a8: b9db cbnz r3, 800c9e2 <event_callback+0xaa>
- SYS_ARCH_UNPROTECT(lev);
- 800c9aa: 4638 mov r0, r7
- 800c9ac: f000 fb6c bl 800d088 <sys_arch_unprotect>
- }
- 800c9b0: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- if (sock->sendevent) {
- 800c9b4: 896b ldrh r3, [r5, #10]
- 800c9b6: b91b cbnz r3, 800c9c0 <event_callback+0x88>
- check_waiters = 1;
- 800c9b8: 2301 movs r3, #1
- sock->sendevent = 1;
- 800c9ba: 2201 movs r2, #1
- 800c9bc: 816a strh r2, [r5, #10]
- break;
- 800c9be: e7f1 b.n 800c9a4 <event_callback+0x6c>
- check_waiters = 0;
- 800c9c0: 2300 movs r3, #0
- 800c9c2: e7fa b.n 800c9ba <event_callback+0x82>
- sock->sendevent = 0;
- 800c9c4: 2300 movs r3, #0
- 800c9c6: 816b strh r3, [r5, #10]
- break;
- 800c9c8: e7ec b.n 800c9a4 <event_callback+0x6c>
- sock->errevent = 1;
- 800c9ca: 2301 movs r3, #1
- 800c9cc: 81ab strh r3, [r5, #12]
- break;
- 800c9ce: e7e9 b.n 800c9a4 <event_callback+0x6c>
- LWIP_ASSERT("unknown event", 0);
- 800c9d0: 4b12 ldr r3, [pc, #72] @ (800ca1c <event_callback+0xe4>)
- 800c9d2: f44f 621f mov.w r2, #2544 @ 0x9f0
- 800c9d6: 4912 ldr r1, [pc, #72] @ (800ca20 <event_callback+0xe8>)
- 800c9d8: 4812 ldr r0, [pc, #72] @ (800ca24 <event_callback+0xec>)
- 800c9da: f006 fd15 bl 8013408 <iprintf>
- check_waiters = 1;
- 800c9de: 2301 movs r3, #1
- break;
- 800c9e0: e7e0 b.n 800c9a4 <event_callback+0x6c>
- has_recvevent = sock->rcvevent > 0;
- 800c9e2: f9b5 4008 ldrsh.w r4, [r5, #8]
- 800c9e6: 2c00 cmp r4, #0
- 800c9e8: bfd4 ite le
- 800c9ea: 2400 movle r4, #0
- 800c9ec: 2401 movgt r4, #1
- has_sendevent = sock->sendevent != 0;
- 800c9ee: f8b5 800a ldrh.w r8, [r5, #10]
- 800c9f2: f1b8 0800 subs.w r8, r8, #0
- 800c9f6: bf18 it ne
- 800c9f8: f04f 0801 movne.w r8, #1
- has_errevent = sock->errevent != 0;
- 800c9fc: 89ad ldrh r5, [r5, #12]
- 800c9fe: 3d00 subs r5, #0
- 800ca00: bf18 it ne
- 800ca02: 2501 movne r5, #1
- SYS_ARCH_UNPROTECT(lev);
- 800ca04: 4638 mov r0, r7
- 800ca06: f000 fb3f bl 800d088 <sys_arch_unprotect>
- select_check_waiters(s, has_recvevent, has_sendevent, has_errevent);
- 800ca0a: 462b mov r3, r5
- 800ca0c: 4642 mov r2, r8
- 800ca0e: 4621 mov r1, r4
- 800ca10: 4630 mov r0, r6
- 800ca12: f7ff ff29 bl 800c868 <select_check_waiters>
- if (sock->select_waiting && check_waiters) {
- 800ca16: e7cb b.n 800c9b0 <event_callback+0x78>
- 800ca18: 4770 bx lr
- 800ca1a: bf00 nop
- 800ca1c: 080163d0 .word 0x080163d0
- 800ca20: 08016538 .word 0x08016538
- 800ca24: 080144e8 .word 0x080144e8
- 0800ca28 <lwip_close>:
- {
- 800ca28: b538 push {r3, r4, r5, lr}
- sock = get_socket(s);
- 800ca2a: f7ff fcbf bl 800c3ac <get_socket>
- if (!sock) {
- 800ca2e: b340 cbz r0, 800ca82 <lwip_close+0x5a>
- 800ca30: 4605 mov r5, r0
- if (sock->conn != NULL) {
- 800ca32: 6803 ldr r3, [r0, #0]
- 800ca34: b183 cbz r3, 800ca58 <lwip_close+0x30>
- is_tcp = NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP;
- 800ca36: 781c ldrb r4, [r3, #0]
- 800ca38: f004 04f0 and.w r4, r4, #240 @ 0xf0
- 800ca3c: 2c10 cmp r4, #16
- 800ca3e: bf14 ite ne
- 800ca40: 2400 movne r4, #0
- 800ca42: 2401 moveq r4, #1
- err = netconn_prepare_delete(sock->conn);
- 800ca44: 6828 ldr r0, [r5, #0]
- 800ca46: f7f9 fe91 bl 800676c <netconn_prepare_delete>
- if (err != ERR_OK) {
- 800ca4a: b990 cbnz r0, 800ca72 <lwip_close+0x4a>
- free_socket(sock, is_tcp);
- 800ca4c: 4621 mov r1, r4
- 800ca4e: 4628 mov r0, r5
- 800ca50: f7ff fdab bl 800c5aa <free_socket>
- return 0;
- 800ca54: 2000 movs r0, #0
- }
- 800ca56: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("sock->lastdata == NULL", sock->lastdata.pbuf == NULL);
- 800ca58: 6843 ldr r3, [r0, #4]
- 800ca5a: b143 cbz r3, 800ca6e <lwip_close+0x46>
- 800ca5c: 4b0a ldr r3, [pc, #40] @ (800ca88 <lwip_close+0x60>)
- 800ca5e: f44f 7245 mov.w r2, #788 @ 0x314
- 800ca62: 490a ldr r1, [pc, #40] @ (800ca8c <lwip_close+0x64>)
- 800ca64: 480a ldr r0, [pc, #40] @ (800ca90 <lwip_close+0x68>)
- 800ca66: f006 fccf bl 8013408 <iprintf>
- int is_tcp = 0;
- 800ca6a: 2400 movs r4, #0
- 800ca6c: e7ea b.n 800ca44 <lwip_close+0x1c>
- 800ca6e: 2400 movs r4, #0
- 800ca70: e7e8 b.n 800ca44 <lwip_close+0x1c>
- sock_set_errno(sock, err_to_errno(err));
- 800ca72: f7fc fc61 bl 8009338 <err_to_errno>
- 800ca76: b108 cbz r0, 800ca7c <lwip_close+0x54>
- 800ca78: 4a06 ldr r2, [pc, #24] @ (800ca94 <lwip_close+0x6c>)
- 800ca7a: 6010 str r0, [r2, #0]
- return -1;
- 800ca7c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800ca80: e7e9 b.n 800ca56 <lwip_close+0x2e>
- return -1;
- 800ca82: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800ca86: e7e6 b.n 800ca56 <lwip_close+0x2e>
- 800ca88: 080163d0 .word 0x080163d0
- 800ca8c: 08016548 .word 0x08016548
- 800ca90: 080144e8 .word 0x080144e8
- 800ca94: 24019d8c .word 0x24019d8c
- 0800ca98 <lwip_connect>:
- {
- 800ca98: b570 push {r4, r5, r6, lr}
- 800ca9a: b082 sub sp, #8
- 800ca9c: 460c mov r4, r1
- 800ca9e: 4615 mov r5, r2
- sock = get_socket(s);
- 800caa0: f7ff fc84 bl 800c3ac <get_socket>
- if (!sock) {
- 800caa4: 2800 cmp r0, #0
- 800caa6: d034 beq.n 800cb12 <lwip_connect+0x7a>
- 800caa8: 4606 mov r6, r0
- if (name->sa_family == AF_UNSPEC) {
- 800caaa: 7863 ldrb r3, [r4, #1]
- 800caac: b1a3 cbz r3, 800cad8 <lwip_connect+0x40>
- LWIP_ERROR("lwip_connect: invalid address", IS_SOCK_ADDR_LEN_VALID(namelen) &&
- 800caae: 2d10 cmp r5, #16
- 800cab0: d116 bne.n 800cae0 <lwip_connect+0x48>
- 800cab2: 2b02 cmp r3, #2
- 800cab4: d114 bne.n 800cae0 <lwip_connect+0x48>
- 800cab6: f014 0f03 tst.w r4, #3
- 800caba: d111 bne.n 800cae0 <lwip_connect+0x48>
- SOCKADDR_TO_IPADDR_PORT(name, &remote_addr, remote_port);
- 800cabc: 6863 ldr r3, [r4, #4]
- 800cabe: 9301 str r3, [sp, #4]
- 800cac0: 8860 ldrh r0, [r4, #2]
- 800cac2: f7fb f9db bl 8007e7c <lwip_htons>
- 800cac6: 4602 mov r2, r0
- err = netconn_connect(sock->conn, &remote_addr, remote_port);
- 800cac8: a901 add r1, sp, #4
- 800caca: 6830 ldr r0, [r6, #0]
- 800cacc: f7f9 feaa bl 8006824 <netconn_connect>
- if (err != ERR_OK) {
- 800cad0: b9b8 cbnz r0, 800cb02 <lwip_connect+0x6a>
- return 0;
- 800cad2: 2000 movs r0, #0
- }
- 800cad4: b002 add sp, #8
- 800cad6: bd70 pop {r4, r5, r6, pc}
- err = netconn_disconnect(sock->conn);
- 800cad8: 6800 ldr r0, [r0, #0]
- 800cada: f7f9 fec9 bl 8006870 <netconn_disconnect>
- 800cade: e7f7 b.n 800cad0 <lwip_connect+0x38>
- LWIP_ERROR("lwip_connect: invalid address", IS_SOCK_ADDR_LEN_VALID(namelen) &&
- 800cae0: 4b0d ldr r3, [pc, #52] @ (800cb18 <lwip_connect+0x80>)
- 800cae2: f240 3247 movw r2, #839 @ 0x347
- 800cae6: 490d ldr r1, [pc, #52] @ (800cb1c <lwip_connect+0x84>)
- 800cae8: 480d ldr r0, [pc, #52] @ (800cb20 <lwip_connect+0x88>)
- 800caea: f006 fc8d bl 8013408 <iprintf>
- 800caee: f06f 000f mvn.w r0, #15
- 800caf2: f7fc fc21 bl 8009338 <err_to_errno>
- 800caf6: b108 cbz r0, 800cafc <lwip_connect+0x64>
- 800caf8: 4a0a ldr r2, [pc, #40] @ (800cb24 <lwip_connect+0x8c>)
- 800cafa: 6010 str r0, [r2, #0]
- 800cafc: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800cb00: e7e8 b.n 800cad4 <lwip_connect+0x3c>
- sock_set_errno(sock, err_to_errno(err));
- 800cb02: f7fc fc19 bl 8009338 <err_to_errno>
- 800cb06: b108 cbz r0, 800cb0c <lwip_connect+0x74>
- 800cb08: 4a06 ldr r2, [pc, #24] @ (800cb24 <lwip_connect+0x8c>)
- 800cb0a: 6010 str r0, [r2, #0]
- return -1;
- 800cb0c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800cb10: e7e0 b.n 800cad4 <lwip_connect+0x3c>
- return -1;
- 800cb12: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800cb16: e7dd b.n 800cad4 <lwip_connect+0x3c>
- 800cb18: 080163d0 .word 0x080163d0
- 800cb1c: 08016560 .word 0x08016560
- 800cb20: 080144e8 .word 0x080144e8
- 800cb24: 24019d8c .word 0x24019d8c
- 0800cb28 <lwip_recvfrom>:
- {
- 800cb28: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr}
- 800cb2c: b08d sub sp, #52 @ 0x34
- 800cb2e: 4607 mov r7, r0
- 800cb30: 4689 mov r9, r1
- 800cb32: 4614 mov r4, r2
- 800cb34: 461e mov r6, r3
- 800cb36: 9d15 ldr r5, [sp, #84] @ 0x54
- sock = get_socket(s);
- 800cb38: f7ff fc38 bl 800c3ac <get_socket>
- if (!sock) {
- 800cb3c: 2800 cmp r0, #0
- 800cb3e: d04e beq.n 800cbde <lwip_recvfrom+0xb6>
- 800cb40: 4680 mov r8, r0
- if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) {
- 800cb42: 6803 ldr r3, [r0, #0]
- 800cb44: 781b ldrb r3, [r3, #0]
- 800cb46: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 800cb4a: 2b10 cmp r3, #16
- 800cb4c: d025 beq.n 800cb9a <lwip_recvfrom+0x72>
- u16_t datagram_len = 0;
- 800cb4e: 2200 movs r2, #0
- 800cb50: f8ad 200a strh.w r2, [sp, #10]
- vec.iov_base = mem;
- 800cb54: f8cd 900c str.w r9, [sp, #12]
- vec.iov_len = len;
- 800cb58: 9404 str r4, [sp, #16]
- msg.msg_control = NULL;
- 800cb5a: 9209 str r2, [sp, #36] @ 0x24
- msg.msg_controllen = 0;
- 800cb5c: 920a str r2, [sp, #40] @ 0x28
- msg.msg_flags = 0;
- 800cb5e: 920b str r2, [sp, #44] @ 0x2c
- msg.msg_iov = &vec;
- 800cb60: ab03 add r3, sp, #12
- 800cb62: 9307 str r3, [sp, #28]
- msg.msg_iovlen = 1;
- 800cb64: 2301 movs r3, #1
- 800cb66: 9308 str r3, [sp, #32]
- msg.msg_name = from;
- 800cb68: 9b14 ldr r3, [sp, #80] @ 0x50
- 800cb6a: 9305 str r3, [sp, #20]
- msg.msg_namelen = (fromlen ? *fromlen : 0);
- 800cb6c: b325 cbz r5, 800cbb8 <lwip_recvfrom+0x90>
- 800cb6e: 682b ldr r3, [r5, #0]
- 800cb70: 9306 str r3, [sp, #24]
- err = lwip_recvfrom_udp_raw(sock, flags, &msg, &datagram_len, s);
- 800cb72: 9700 str r7, [sp, #0]
- 800cb74: f10d 030a add.w r3, sp, #10
- 800cb78: aa05 add r2, sp, #20
- 800cb7a: 4631 mov r1, r6
- 800cb7c: 4640 mov r0, r8
- 800cb7e: f7ff fdeb bl 800c758 <lwip_recvfrom_udp_raw>
- if (err != ERR_OK) {
- 800cb82: b9d8 cbnz r0, 800cbbc <lwip_recvfrom+0x94>
- ret = (ssize_t)LWIP_MIN(LWIP_MIN(len, datagram_len), SSIZE_MAX);
- 800cb84: f8bd 000a ldrh.w r0, [sp, #10]
- 800cb88: 42a0 cmp r0, r4
- 800cb8a: bf28 it cs
- 800cb8c: 4620 movcs r0, r4
- 800cb8e: f06f 4300 mvn.w r3, #2147483648 @ 0x80000000
- 800cb92: 4298 cmp r0, r3
- 800cb94: d21a bcs.n 800cbcc <lwip_recvfrom+0xa4>
- 800cb96: 4604 mov r4, r0
- 800cb98: e01a b.n 800cbd0 <lwip_recvfrom+0xa8>
- ret = lwip_recv_tcp(sock, mem, len, flags);
- 800cb9a: 4633 mov r3, r6
- 800cb9c: 4622 mov r2, r4
- 800cb9e: 4649 mov r1, r9
- 800cba0: f7ff fd1e bl 800c5e0 <lwip_recv_tcp>
- 800cba4: 4604 mov r4, r0
- lwip_recv_tcp_from(sock, from, fromlen, "lwip_recvfrom", s, ret);
- 800cba6: 9001 str r0, [sp, #4]
- 800cba8: 9700 str r7, [sp, #0]
- 800cbaa: 4b0e ldr r3, [pc, #56] @ (800cbe4 <lwip_recvfrom+0xbc>)
- 800cbac: 462a mov r2, r5
- 800cbae: 9914 ldr r1, [sp, #80] @ 0x50
- 800cbb0: 4640 mov r0, r8
- 800cbb2: f7ff fccb bl 800c54c <lwip_recv_tcp_from>
- return ret;
- 800cbb6: e00e b.n 800cbd6 <lwip_recvfrom+0xae>
- msg.msg_namelen = (fromlen ? *fromlen : 0);
- 800cbb8: 2300 movs r3, #0
- 800cbba: e7d9 b.n 800cb70 <lwip_recvfrom+0x48>
- sock_set_errno(sock, err_to_errno(err));
- 800cbbc: f7fc fbbc bl 8009338 <err_to_errno>
- 800cbc0: b108 cbz r0, 800cbc6 <lwip_recvfrom+0x9e>
- 800cbc2: 4a09 ldr r2, [pc, #36] @ (800cbe8 <lwip_recvfrom+0xc0>)
- 800cbc4: 6010 str r0, [r2, #0]
- return -1;
- 800cbc6: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
- 800cbca: e004 b.n 800cbd6 <lwip_recvfrom+0xae>
- ret = (ssize_t)LWIP_MIN(LWIP_MIN(len, datagram_len), SSIZE_MAX);
- 800cbcc: f06f 4400 mvn.w r4, #2147483648 @ 0x80000000
- if (fromlen) {
- 800cbd0: b10d cbz r5, 800cbd6 <lwip_recvfrom+0xae>
- *fromlen = msg.msg_namelen;
- 800cbd2: 9b06 ldr r3, [sp, #24]
- 800cbd4: 602b str r3, [r5, #0]
- }
- 800cbd6: 4620 mov r0, r4
- 800cbd8: b00d add sp, #52 @ 0x34
- 800cbda: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
- return -1;
- 800cbde: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
- 800cbe2: e7f8 b.n 800cbd6 <lwip_recvfrom+0xae>
- 800cbe4: 08016580 .word 0x08016580
- 800cbe8: 24019d8c .word 0x24019d8c
- 0800cbec <lwip_recv>:
- {
- 800cbec: b510 push {r4, lr}
- 800cbee: b082 sub sp, #8
- return lwip_recvfrom(s, mem, len, flags, NULL, NULL);
- 800cbf0: 2400 movs r4, #0
- 800cbf2: 9401 str r4, [sp, #4]
- 800cbf4: 9400 str r4, [sp, #0]
- 800cbf6: f7ff ff97 bl 800cb28 <lwip_recvfrom>
- }
- 800cbfa: b002 add sp, #8
- 800cbfc: bd10 pop {r4, pc}
- ...
- 0800cc00 <lwip_sendto>:
- {
- 800cc00: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
- 800cc04: b084 sub sp, #16
- 800cc06: 4607 mov r7, r0
- 800cc08: 460e mov r6, r1
- 800cc0a: 4614 mov r4, r2
- 800cc0c: 4698 mov r8, r3
- 800cc0e: 9d0c ldr r5, [sp, #48] @ 0x30
- 800cc10: f8dd 9034 ldr.w r9, [sp, #52] @ 0x34
- sock = get_socket(s);
- 800cc14: f7ff fbca bl 800c3ac <get_socket>
- if (!sock) {
- 800cc18: 2800 cmp r0, #0
- 800cc1a: d068 beq.n 800ccee <lwip_sendto+0xee>
- 800cc1c: 4682 mov sl, r0
- if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) {
- 800cc1e: 6803 ldr r3, [r0, #0]
- 800cc20: 781a ldrb r2, [r3, #0]
- 800cc22: f002 02f0 and.w r2, r2, #240 @ 0xf0
- 800cc26: 2a10 cmp r2, #16
- 800cc28: d039 beq.n 800cc9e <lwip_sendto+0x9e>
- if (size > LWIP_MIN(0xFFFF, SSIZE_MAX)) {
- 800cc2a: f5b4 3f80 cmp.w r4, #65536 @ 0x10000
- 800cc2e: d23d bcs.n 800ccac <lwip_sendto+0xac>
- short_size = (u16_t)size;
- 800cc30: b2a7 uxth r7, r4
- LWIP_ERROR("lwip_sendto: invalid address", (((to == NULL) && (tolen == 0)) ||
- 800cc32: f1b9 0f00 cmp.w r9, #0
- 800cc36: bf08 it eq
- 800cc38: 2d00 cmpeq r5, #0
- 800cc3a: d00f beq.n 800cc5c <lwip_sendto+0x5c>
- 800cc3c: fab5 f385 clz r3, r5
- 800cc40: 095b lsrs r3, r3, #5
- 800cc42: f1b9 0f10 cmp.w r9, #16
- 800cc46: bf18 it ne
- 800cc48: f043 0301 orrne.w r3, r3, #1
- 800cc4c: 2b00 cmp r3, #0
- 800cc4e: d133 bne.n 800ccb8 <lwip_sendto+0xb8>
- 800cc50: 786b ldrb r3, [r5, #1]
- 800cc52: 2b02 cmp r3, #2
- 800cc54: d130 bne.n 800ccb8 <lwip_sendto+0xb8>
- 800cc56: f015 0f03 tst.w r5, #3
- 800cc5a: d12d bne.n 800ccb8 <lwip_sendto+0xb8>
- buf.p = buf.ptr = NULL;
- 800cc5c: 2300 movs r3, #0
- 800cc5e: 9301 str r3, [sp, #4]
- 800cc60: 9300 str r3, [sp, #0]
- if (to) {
- 800cc62: 2d00 cmp r5, #0
- 800cc64: d039 beq.n 800ccda <lwip_sendto+0xda>
- SOCKADDR_TO_IPADDR_PORT(to, &buf.addr, remote_port);
- 800cc66: 686b ldr r3, [r5, #4]
- 800cc68: 9302 str r3, [sp, #8]
- 800cc6a: 8868 ldrh r0, [r5, #2]
- 800cc6c: f7fb f906 bl 8007e7c <lwip_htons>
- netbuf_fromport(&buf) = remote_port;
- 800cc70: f8ad 000c strh.w r0, [sp, #12]
- err = netbuf_ref(&buf, data, short_size);
- 800cc74: 463a mov r2, r7
- 800cc76: 4631 mov r1, r6
- 800cc78: 4668 mov r0, sp
- 800cc7a: f7fe fd3b bl 800b6f4 <netbuf_ref>
- if (err == ERR_OK) {
- 800cc7e: 4605 mov r5, r0
- 800cc80: b370 cbz r0, 800cce0 <lwip_sendto+0xe0>
- netbuf_free(&buf);
- 800cc82: 4668 mov r0, sp
- 800cc84: f7fe fd1e bl 800b6c4 <netbuf_free>
- sock_set_errno(sock, err_to_errno(err));
- 800cc88: 4628 mov r0, r5
- 800cc8a: f7fc fb55 bl 8009338 <err_to_errno>
- 800cc8e: b108 cbz r0, 800cc94 <lwip_sendto+0x94>
- 800cc90: 4a1a ldr r2, [pc, #104] @ (800ccfc <lwip_sendto+0xfc>)
- 800cc92: 6010 str r0, [r2, #0]
- return (err == ERR_OK ? short_size : -1);
- 800cc94: bb75 cbnz r5, 800ccf4 <lwip_sendto+0xf4>
- 800cc96: b2a0 uxth r0, r4
- }
- 800cc98: b004 add sp, #16
- 800cc9a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
- return lwip_send(s, data, size, flags);
- 800cc9e: 4643 mov r3, r8
- 800cca0: 4622 mov r2, r4
- 800cca2: 4631 mov r1, r6
- 800cca4: 4638 mov r0, r7
- 800cca6: f000 f831 bl 800cd0c <lwip_send>
- 800ccaa: e7f5 b.n 800cc98 <lwip_sendto+0x98>
- sock_set_errno(sock, EMSGSIZE);
- 800ccac: 4b13 ldr r3, [pc, #76] @ (800ccfc <lwip_sendto+0xfc>)
- 800ccae: 225a movs r2, #90 @ 0x5a
- 800ccb0: 601a str r2, [r3, #0]
- return -1;
- 800ccb2: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800ccb6: e7ef b.n 800cc98 <lwip_sendto+0x98>
- LWIP_ERROR("lwip_sendto: invalid address", (((to == NULL) && (tolen == 0)) ||
- 800ccb8: 4b11 ldr r3, [pc, #68] @ (800cd00 <lwip_sendto+0x100>)
- 800ccba: f240 6252 movw r2, #1618 @ 0x652
- 800ccbe: 4911 ldr r1, [pc, #68] @ (800cd04 <lwip_sendto+0x104>)
- 800ccc0: 4811 ldr r0, [pc, #68] @ (800cd08 <lwip_sendto+0x108>)
- 800ccc2: f006 fba1 bl 8013408 <iprintf>
- 800ccc6: f06f 000f mvn.w r0, #15
- 800ccca: f7fc fb35 bl 8009338 <err_to_errno>
- 800ccce: b108 cbz r0, 800ccd4 <lwip_sendto+0xd4>
- 800ccd0: 4a0a ldr r2, [pc, #40] @ (800ccfc <lwip_sendto+0xfc>)
- 800ccd2: 6010 str r0, [r2, #0]
- 800ccd4: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800ccd8: e7de b.n 800cc98 <lwip_sendto+0x98>
- ip_addr_set_any(NETCONNTYPE_ISIPV6(netconn_type(sock->conn)), &buf.addr);
- 800ccda: 2000 movs r0, #0
- 800ccdc: 9002 str r0, [sp, #8]
- 800ccde: e7c7 b.n 800cc70 <lwip_sendto+0x70>
- err = netconn_send(sock->conn, &buf);
- 800cce0: 4669 mov r1, sp
- 800cce2: f8da 0000 ldr.w r0, [sl]
- 800cce6: f7f9 fdff bl 80068e8 <netconn_send>
- 800ccea: 4605 mov r5, r0
- 800ccec: e7c9 b.n 800cc82 <lwip_sendto+0x82>
- return -1;
- 800ccee: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800ccf2: e7d1 b.n 800cc98 <lwip_sendto+0x98>
- return (err == ERR_OK ? short_size : -1);
- 800ccf4: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800ccf8: e7ce b.n 800cc98 <lwip_sendto+0x98>
- 800ccfa: bf00 nop
- 800ccfc: 24019d8c .word 0x24019d8c
- 800cd00: 080163d0 .word 0x080163d0
- 800cd04: 08016590 .word 0x08016590
- 800cd08: 080144e8 .word 0x080144e8
- 0800cd0c <lwip_send>:
- {
- 800cd0c: b5f0 push {r4, r5, r6, r7, lr}
- 800cd0e: b085 sub sp, #20
- 800cd10: 4607 mov r7, r0
- 800cd12: 460d mov r5, r1
- 800cd14: 4616 mov r6, r2
- 800cd16: 461c mov r4, r3
- sock = get_socket(s);
- 800cd18: f7ff fb48 bl 800c3ac <get_socket>
- if (!sock) {
- 800cd1c: b368 cbz r0, 800cd7a <lwip_send+0x6e>
- 800cd1e: 4602 mov r2, r0
- if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) {
- 800cd20: 6803 ldr r3, [r0, #0]
- 800cd22: 781b ldrb r3, [r3, #0]
- 800cd24: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 800cd28: 2b10 cmp r3, #16
- 800cd2a: d11a bne.n 800cd62 <lwip_send+0x56>
- write_flags = (u8_t)(NETCONN_COPY |
- 800cd2c: f014 0f10 tst.w r4, #16
- 800cd30: d021 beq.n 800cd76 <lwip_send+0x6a>
- 800cd32: 2303 movs r3, #3
- ((flags & MSG_MORE) ? NETCONN_MORE : 0) |
- 800cd34: 1064 asrs r4, r4, #1
- 800cd36: f004 0404 and.w r4, r4, #4
- written = 0;
- 800cd3a: 2100 movs r1, #0
- 800cd3c: 9103 str r1, [sp, #12]
- err = netconn_write_partly(sock->conn, data, size, write_flags, &written);
- 800cd3e: 6810 ldr r0, [r2, #0]
- 800cd40: aa03 add r2, sp, #12
- 800cd42: 9200 str r2, [sp, #0]
- 800cd44: 4323 orrs r3, r4
- 800cd46: 4632 mov r2, r6
- 800cd48: 4629 mov r1, r5
- 800cd4a: f7f9 fe67 bl 8006a1c <netconn_write_partly>
- 800cd4e: 4604 mov r4, r0
- sock_set_errno(sock, err_to_errno(err));
- 800cd50: f7fc faf2 bl 8009338 <err_to_errno>
- 800cd54: b108 cbz r0, 800cd5a <lwip_send+0x4e>
- 800cd56: 4a0c ldr r2, [pc, #48] @ (800cd88 <lwip_send+0x7c>)
- 800cd58: 6010 str r0, [r2, #0]
- return (err == ERR_OK ? (ssize_t)written : -1);
- 800cd5a: b98c cbnz r4, 800cd80 <lwip_send+0x74>
- 800cd5c: 9803 ldr r0, [sp, #12]
- }
- 800cd5e: b005 add sp, #20
- 800cd60: bdf0 pop {r4, r5, r6, r7, pc}
- return lwip_sendto(s, data, size, flags, NULL, 0);
- 800cd62: 2300 movs r3, #0
- 800cd64: 9301 str r3, [sp, #4]
- 800cd66: 9300 str r3, [sp, #0]
- 800cd68: 4623 mov r3, r4
- 800cd6a: 4632 mov r2, r6
- 800cd6c: 4629 mov r1, r5
- 800cd6e: 4638 mov r0, r7
- 800cd70: f7ff ff46 bl 800cc00 <lwip_sendto>
- 800cd74: e7f3 b.n 800cd5e <lwip_send+0x52>
- write_flags = (u8_t)(NETCONN_COPY |
- 800cd76: 2301 movs r3, #1
- 800cd78: e7dc b.n 800cd34 <lwip_send+0x28>
- return -1;
- 800cd7a: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800cd7e: e7ee b.n 800cd5e <lwip_send+0x52>
- return (err == ERR_OK ? (ssize_t)written : -1);
- 800cd80: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800cd84: e7eb b.n 800cd5e <lwip_send+0x52>
- 800cd86: bf00 nop
- 800cd88: 24019d8c .word 0x24019d8c
- 0800cd8c <lwip_socket>:
- {
- 800cd8c: b538 push {r3, r4, r5, lr}
- 800cd8e: 4613 mov r3, r2
- switch (type) {
- 800cd90: 2902 cmp r1, #2
- 800cd92: d01b beq.n 800cdcc <lwip_socket+0x40>
- 800cd94: 2903 cmp r1, #3
- 800cd96: d007 beq.n 800cda8 <lwip_socket+0x1c>
- 800cd98: 2901 cmp r1, #1
- 800cd9a: d022 beq.n 800cde2 <lwip_socket+0x56>
- set_errno(EINVAL);
- 800cd9c: 4b1b ldr r3, [pc, #108] @ (800ce0c <lwip_socket+0x80>)
- 800cd9e: 2216 movs r2, #22
- 800cda0: 601a str r2, [r3, #0]
- return -1;
- 800cda2: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
- 800cda6: e00f b.n 800cdc8 <lwip_socket+0x3c>
- conn = netconn_new_with_proto_and_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_RAW),
- 800cda8: 4a19 ldr r2, [pc, #100] @ (800ce10 <lwip_socket+0x84>)
- 800cdaa: b2d9 uxtb r1, r3
- 800cdac: 2040 movs r0, #64 @ 0x40
- 800cdae: f7f9 fc81 bl 80066b4 <netconn_new_with_proto_and_callback>
- 800cdb2: 4605 mov r5, r0
- if (!conn) {
- 800cdb4: b1e5 cbz r5, 800cdf0 <lwip_socket+0x64>
- i = alloc_socket(conn, 0);
- 800cdb6: 2100 movs r1, #0
- 800cdb8: 4628 mov r0, r5
- 800cdba: f7ff fb33 bl 800c424 <alloc_socket>
- 800cdbe: 4604 mov r4, r0
- if (i == -1) {
- 800cdc0: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff
- 800cdc4: d01a beq.n 800cdfc <lwip_socket+0x70>
- conn->socket = i;
- 800cdc6: 61a8 str r0, [r5, #24]
- }
- 800cdc8: 4620 mov r0, r4
- 800cdca: bd38 pop {r3, r4, r5, pc}
- conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain,
- 800cdcc: 2a88 cmp r2, #136 @ 0x88
- 800cdce: d006 beq.n 800cdde <lwip_socket+0x52>
- 800cdd0: 2020 movs r0, #32
- 800cdd2: 4a0f ldr r2, [pc, #60] @ (800ce10 <lwip_socket+0x84>)
- 800cdd4: 2100 movs r1, #0
- 800cdd6: f7f9 fc6d bl 80066b4 <netconn_new_with_proto_and_callback>
- 800cdda: 4605 mov r5, r0
- break;
- 800cddc: e7ea b.n 800cdb4 <lwip_socket+0x28>
- conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain,
- 800cdde: 2021 movs r0, #33 @ 0x21
- 800cde0: e7f7 b.n 800cdd2 <lwip_socket+0x46>
- conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_TCP), DEFAULT_SOCKET_EVENTCB);
- 800cde2: 4a0b ldr r2, [pc, #44] @ (800ce10 <lwip_socket+0x84>)
- 800cde4: 2100 movs r1, #0
- 800cde6: 2010 movs r0, #16
- 800cde8: f7f9 fc64 bl 80066b4 <netconn_new_with_proto_and_callback>
- 800cdec: 4605 mov r5, r0
- break;
- 800cdee: e7e1 b.n 800cdb4 <lwip_socket+0x28>
- set_errno(ENOBUFS);
- 800cdf0: 4b06 ldr r3, [pc, #24] @ (800ce0c <lwip_socket+0x80>)
- 800cdf2: 2269 movs r2, #105 @ 0x69
- 800cdf4: 601a str r2, [r3, #0]
- return -1;
- 800cdf6: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
- 800cdfa: e7e5 b.n 800cdc8 <lwip_socket+0x3c>
- netconn_delete(conn);
- 800cdfc: 4628 mov r0, r5
- 800cdfe: f7f9 fcc7 bl 8006790 <netconn_delete>
- set_errno(ENFILE);
- 800ce02: 4b02 ldr r3, [pc, #8] @ (800ce0c <lwip_socket+0x80>)
- 800ce04: 2217 movs r2, #23
- 800ce06: 601a str r2, [r3, #0]
- return -1;
- 800ce08: e7de b.n 800cdc8 <lwip_socket+0x3c>
- 800ce0a: bf00 nop
- 800ce0c: 24019d8c .word 0x24019d8c
- 800ce10: 0800c939 .word 0x0800c939
- 0800ce14 <lwip_ioctl>:
- return err;
- }
- int
- lwip_ioctl(int s, long cmd, void *argp)
- {
- 800ce14: b570 push {r4, r5, r6, lr}
- 800ce16: 460c mov r4, r1
- 800ce18: 4615 mov r5, r2
- struct lwip_sock *sock = get_socket(s);
- 800ce1a: f7ff fac7 bl 800c3ac <get_socket>
- u8_t val;
- #if LWIP_SO_RCVBUF
- int recv_avail;
- #endif /* LWIP_SO_RCVBUF */
- if (!sock) {
- 800ce1e: 2800 cmp r0, #0
- 800ce20: d045 beq.n 800ceae <lwip_ioctl+0x9a>
- 800ce22: 4606 mov r6, r0
- return -1;
- }
- switch (cmd) {
- 800ce24: 4b23 ldr r3, [pc, #140] @ (800ceb4 <lwip_ioctl+0xa0>)
- 800ce26: 429c cmp r4, r3
- 800ce28: d026 beq.n 800ce78 <lwip_ioctl+0x64>
- 800ce2a: f103 4340 add.w r3, r3, #3221225472 @ 0xc0000000
- 800ce2e: 3301 adds r3, #1
- 800ce30: 429c cmp r4, r3
- 800ce32: d136 bne.n 800cea2 <lwip_ioctl+0x8e>
- #if LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE
- case FIONREAD:
- if (!argp) {
- 800ce34: b1ad cbz r5, 800ce62 <lwip_ioctl+0x4e>
- }
- #endif /* LWIP_FIONREAD_LINUXMODE */
- #if LWIP_SO_RCVBUF
- /* we come here if either LWIP_FIONREAD_LINUXMODE==0 or this is a TCP socket */
- SYS_ARCH_GET(sock->conn->recv_avail, recv_avail);
- 800ce36: f000 f91b bl 800d070 <sys_arch_protect>
- 800ce3a: 6833 ldr r3, [r6, #0]
- 800ce3c: 6a5c ldr r4, [r3, #36] @ 0x24
- 800ce3e: f000 f923 bl 800d088 <sys_arch_unprotect>
- if (recv_avail < 0) {
- 800ce42: 2c00 cmp r4, #0
- 800ce44: db13 blt.n 800ce6e <lwip_ioctl+0x5a>
- recv_avail = 0;
- }
- /* Check if there is data left from the last recv operation. /maq 041215 */
- if (sock->lastdata.netbuf) {
- 800ce46: 6872 ldr r2, [r6, #4]
- 800ce48: b142 cbz r2, 800ce5c <lwip_ioctl+0x48>
- if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) {
- 800ce4a: 6833 ldr r3, [r6, #0]
- 800ce4c: 781b ldrb r3, [r3, #0]
- 800ce4e: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 800ce52: 2b10 cmp r3, #16
- 800ce54: d00d beq.n 800ce72 <lwip_ioctl+0x5e>
- recv_avail += sock->lastdata.pbuf->tot_len;
- } else {
- recv_avail += sock->lastdata.netbuf->p->tot_len;
- 800ce56: 6813 ldr r3, [r2, #0]
- 800ce58: 891b ldrh r3, [r3, #8]
- 800ce5a: 441c add r4, r3
- }
- }
- *((int *)argp) = recv_avail;
- 800ce5c: 602c str r4, [r5, #0]
- LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, FIONREAD, %p) = %"U16_F"\n", s, argp, *((u16_t *)argp)));
- sock_set_errno(sock, 0);
- done_socket(sock);
- return 0;
- 800ce5e: 2000 movs r0, #0
- 800ce60: e024 b.n 800ceac <lwip_ioctl+0x98>
- sock_set_errno(sock, EINVAL);
- 800ce62: 4b15 ldr r3, [pc, #84] @ (800ceb8 <lwip_ioctl+0xa4>)
- 800ce64: 2216 movs r2, #22
- 800ce66: 601a str r2, [r3, #0]
- return -1;
- 800ce68: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800ce6c: e01e b.n 800ceac <lwip_ioctl+0x98>
- recv_avail = 0;
- 800ce6e: 2400 movs r4, #0
- 800ce70: e7e9 b.n 800ce46 <lwip_ioctl+0x32>
- recv_avail += sock->lastdata.pbuf->tot_len;
- 800ce72: 8913 ldrh r3, [r2, #8]
- 800ce74: 441c add r4, r3
- 800ce76: e7f1 b.n 800ce5c <lwip_ioctl+0x48>
- #endif /* LWIP_SO_RCVBUF */
- #endif /* LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE */
- case (long)FIONBIO:
- val = 0;
- if (argp && *(int *)argp) {
- 800ce78: b155 cbz r5, 800ce90 <lwip_ioctl+0x7c>
- 800ce7a: 682b ldr r3, [r5, #0]
- 800ce7c: b143 cbz r3, 800ce90 <lwip_ioctl+0x7c>
- val = 1;
- }
- netconn_set_nonblocking(sock->conn, val);
- 800ce7e: 6802 ldr r2, [r0, #0]
- 800ce80: f892 3028 ldrb.w r3, [r2, #40] @ 0x28
- 800ce84: f043 0302 orr.w r3, r3, #2
- 800ce88: f882 3028 strb.w r3, [r2, #40] @ 0x28
- LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, FIONBIO, %d)\n", s, val));
- sock_set_errno(sock, 0);
- done_socket(sock);
- return 0;
- 800ce8c: 2000 movs r0, #0
- 800ce8e: e00d b.n 800ceac <lwip_ioctl+0x98>
- netconn_set_nonblocking(sock->conn, val);
- 800ce90: 6832 ldr r2, [r6, #0]
- 800ce92: f892 3028 ldrb.w r3, [r2, #40] @ 0x28
- 800ce96: f003 03fd and.w r3, r3, #253 @ 0xfd
- 800ce9a: f882 3028 strb.w r3, [r2, #40] @ 0x28
- return 0;
- 800ce9e: 2000 movs r0, #0
- 800cea0: e004 b.n 800ceac <lwip_ioctl+0x98>
- default:
- break;
- } /* switch (cmd) */
- LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, UNIMPL: 0x%lx, %p)\n", s, cmd, argp));
- sock_set_errno(sock, ENOSYS); /* not yet implemented */
- 800cea2: 4b05 ldr r3, [pc, #20] @ (800ceb8 <lwip_ioctl+0xa4>)
- 800cea4: 2226 movs r2, #38 @ 0x26
- 800cea6: 601a str r2, [r3, #0]
- done_socket(sock);
- return -1;
- 800cea8: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- }
- 800ceac: bd70 pop {r4, r5, r6, pc}
- return -1;
- 800ceae: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800ceb2: e7fb b.n 800ceac <lwip_ioctl+0x98>
- 800ceb4: 8004667e .word 0x8004667e
- 800ceb8: 24019d8c .word 0x24019d8c
- 0800cebc <sys_mbox_new>:
- #endif
- /*-----------------------------------------------------------------------------------*/
- // Creates an empty mailbox.
- err_t sys_mbox_new(sys_mbox_t *mbox, int size)
- {
- 800cebc: b510 push {r4, lr}
- 800cebe: 4604 mov r4, r0
- 800cec0: 4608 mov r0, r1
- #if (osCMSIS < 0x20000U)
- osMessageQDef(QUEUE, size, void *);
- *mbox = osMessageCreate(osMessageQ(QUEUE), NULL);
- #else
- *mbox = osMessageQueueNew(size, sizeof(void *), NULL);
- 800cec2: 2200 movs r2, #0
- 800cec4: 2104 movs r1, #4
- 800cec6: f7f7 f96d bl 80041a4 <osMessageQueueNew>
- 800ceca: 6020 str r0, [r4, #0]
- if(lwip_stats.sys.mbox.max < lwip_stats.sys.mbox.used)
- {
- lwip_stats.sys.mbox.max = lwip_stats.sys.mbox.used;
- }
- #endif /* SYS_STATS */
- if(*mbox == NULL)
- 800cecc: b108 cbz r0, 800ced2 <sys_mbox_new+0x16>
- return ERR_MEM;
- return ERR_OK;
- 800cece: 2000 movs r0, #0
- }
- 800ced0: bd10 pop {r4, pc}
- return ERR_MEM;
- 800ced2: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800ced6: e7fb b.n 800ced0 <sys_mbox_new+0x14>
- 0800ced8 <sys_mbox_free>:
- Deallocates a mailbox. If there are messages still present in the
- mailbox when the mailbox is deallocated, it is an indication of a
- programming error in lwIP and the developer should be notified.
- */
- void sys_mbox_free(sys_mbox_t *mbox)
- {
- 800ced8: b510 push {r4, lr}
- 800ceda: 4604 mov r4, r0
- #if (osCMSIS < 0x20000U)
- if(osMessageWaiting(*mbox))
- #else
- if(osMessageQueueGetCount(*mbox))
- 800cedc: 6800 ldr r0, [r0, #0]
- 800cede: f7f7 fa2c bl 800433a <osMessageQueueGetCount>
- }
- #if (osCMSIS < 0x20000U)
- osMessageDelete(*mbox);
- #else
- osMessageQueueDelete(*mbox);
- 800cee2: 6820 ldr r0, [r4, #0]
- 800cee4: f7f7 fa36 bl 8004354 <osMessageQueueDelete>
- #endif
- #if SYS_STATS
- --lwip_stats.sys.mbox.used;
- #endif /* SYS_STATS */
- }
- 800cee8: bd10 pop {r4, pc}
- 0800ceea <sys_mbox_trypost>:
- /*-----------------------------------------------------------------------------------*/
- // Try to post the "msg" to the mailbox.
- err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg)
- {
- 800ceea: b500 push {lr}
- 800ceec: b083 sub sp, #12
- 800ceee: 9101 str r1, [sp, #4]
- err_t result;
- #if (osCMSIS < 0x20000U)
- if(osMessagePut(*mbox, (uint32_t)msg, 0) == osOK)
- #else
- if(osMessageQueuePut(*mbox, &msg, 0, 0) == osOK)
- 800cef0: 2300 movs r3, #0
- 800cef2: 461a mov r2, r3
- 800cef4: a901 add r1, sp, #4
- 800cef6: 6800 ldr r0, [r0, #0]
- 800cef8: f7f7 f9a0 bl 800423c <osMessageQueuePut>
- 800cefc: b910 cbnz r0, 800cf04 <sys_mbox_trypost+0x1a>
- lwip_stats.sys.mbox.err++;
- #endif /* SYS_STATS */
- }
- return result;
- }
- 800cefe: b003 add sp, #12
- 800cf00: f85d fb04 ldr.w pc, [sp], #4
- result = ERR_MEM;
- 800cf04: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800cf08: e7f9 b.n 800cefe <sys_mbox_trypost+0x14>
- 0800cf0a <sys_arch_mbox_fetch>:
- Note that a function with a similar name, sys_mbox_fetch(), is
- implemented by lwIP.
- */
- u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
- {
- 800cf0a: b5f8 push {r3, r4, r5, r6, r7, lr}
- 800cf0c: 4606 mov r6, r0
- 800cf0e: 460f mov r7, r1
- 800cf10: 4615 mov r5, r2
- #if (osCMSIS < 0x20000U)
- osEvent event;
- uint32_t starttime = osKernelSysTick();
- #else
- osStatus_t status;
- uint32_t starttime = osKernelGetTickCount();
- 800cf12: f7f6 ff57 bl 8003dc4 <osKernelGetTickCount>
- 800cf16: 4604 mov r4, r0
- #endif
- if(timeout != 0)
- 800cf18: b16d cbz r5, 800cf36 <sys_arch_mbox_fetch+0x2c>
- {
- *msg = (void *)event.value.v;
- return (osKernelSysTick() - starttime);
- }
- #else
- status = osMessageQueueGet(*mbox, msg, 0, timeout);
- 800cf1a: 462b mov r3, r5
- 800cf1c: 2200 movs r2, #0
- 800cf1e: 4639 mov r1, r7
- 800cf20: 6830 ldr r0, [r6, #0]
- 800cf22: f7f7 f9cb bl 80042bc <osMessageQueueGet>
- if (status == osOK)
- 800cf26: b110 cbz r0, 800cf2e <sys_arch_mbox_fetch+0x24>
- return (osKernelGetTickCount() - starttime);
- }
- #endif
- else
- {
- return SYS_ARCH_TIMEOUT;
- 800cf28: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- #else
- osMessageQueueGet(*mbox, msg, 0, osWaitForever );
- return (osKernelGetTickCount() - starttime);
- #endif
- }
- }
- 800cf2c: bdf8 pop {r3, r4, r5, r6, r7, pc}
- return (osKernelGetTickCount() - starttime);
- 800cf2e: f7f6 ff49 bl 8003dc4 <osKernelGetTickCount>
- 800cf32: 1b00 subs r0, r0, r4
- 800cf34: e7fa b.n 800cf2c <sys_arch_mbox_fetch+0x22>
- osMessageQueueGet(*mbox, msg, 0, osWaitForever );
- 800cf36: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff
- 800cf3a: 2200 movs r2, #0
- 800cf3c: 4639 mov r1, r7
- 800cf3e: 6830 ldr r0, [r6, #0]
- 800cf40: f7f7 f9bc bl 80042bc <osMessageQueueGet>
- return (osKernelGetTickCount() - starttime);
- 800cf44: f7f6 ff3e bl 8003dc4 <osKernelGetTickCount>
- 800cf48: 1b00 subs r0, r0, r4
- 800cf4a: e7ef b.n 800cf2c <sys_arch_mbox_fetch+0x22>
- 0800cf4c <sys_arch_mbox_tryfetch>:
- /*
- Similar to sys_arch_mbox_fetch, but if message is not ready immediately, we'll
- return with SYS_MBOX_EMPTY. On success, 0 is returned.
- */
- u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg)
- {
- 800cf4c: b508 push {r3, lr}
- if(event.status == osEventMessage)
- {
- *msg = (void *)event.value.v;
- #else
- if (osMessageQueueGet(*mbox, msg, 0, 0) == osOK)
- 800cf4e: 2300 movs r3, #0
- 800cf50: 461a mov r2, r3
- 800cf52: 6800 ldr r0, [r0, #0]
- 800cf54: f7f7 f9b2 bl 80042bc <osMessageQueueGet>
- 800cf58: b900 cbnz r0, 800cf5c <sys_arch_mbox_tryfetch+0x10>
- }
- else
- {
- return SYS_MBOX_EMPTY;
- }
- }
- 800cf5a: bd08 pop {r3, pc}
- return SYS_MBOX_EMPTY;
- 800cf5c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800cf60: e7fb b.n 800cf5a <sys_arch_mbox_tryfetch+0xe>
- 0800cf62 <sys_mbox_valid>:
- /*----------------------------------------------------------------------------------*/
- int sys_mbox_valid(sys_mbox_t *mbox)
- {
- if (*mbox == SYS_MBOX_NULL)
- 800cf62: 6803 ldr r3, [r0, #0]
- 800cf64: b10b cbz r3, 800cf6a <sys_mbox_valid+0x8>
- return 0;
- else
- return 1;
- 800cf66: 2001 movs r0, #1
- }
- 800cf68: 4770 bx lr
- return 0;
- 800cf6a: 2000 movs r0, #0
- 800cf6c: 4770 bx lr
- 0800cf6e <sys_mbox_set_invalid>:
- /*-----------------------------------------------------------------------------------*/
- void sys_mbox_set_invalid(sys_mbox_t *mbox)
- {
- *mbox = SYS_MBOX_NULL;
- 800cf6e: 2300 movs r3, #0
- 800cf70: 6003 str r3, [r0, #0]
- }
- 800cf72: 4770 bx lr
- 0800cf74 <sys_sem_new>:
- /*-----------------------------------------------------------------------------------*/
- // Creates a new semaphore. The "count" argument specifies
- // the initial state of the semaphore.
- err_t sys_sem_new(sys_sem_t *sem, u8_t count)
- {
- 800cf74: b538 push {r3, r4, r5, lr}
- 800cf76: 4604 mov r4, r0
- 800cf78: 460d mov r5, r1
- #if (osCMSIS < 0x20000U)
- osSemaphoreDef(SEM);
- *sem = osSemaphoreCreate (osSemaphore(SEM), 1);
- #else
- *sem = osSemaphoreNew(UINT16_MAX, count, NULL);
- 800cf7a: 2200 movs r2, #0
- 800cf7c: f64f 70ff movw r0, #65535 @ 0xffff
- 800cf80: f7f7 f83e bl 8004000 <osSemaphoreNew>
- 800cf84: 6020 str r0, [r4, #0]
- #endif
- if(*sem == NULL)
- 800cf86: b138 cbz r0, 800cf98 <sys_sem_new+0x24>
- ++lwip_stats.sys.sem.err;
- #endif /* SYS_STATS */
- return ERR_MEM;
- }
- if(count == 0) // Means it can't be taken
- 800cf88: b10d cbz r5, 800cf8e <sys_sem_new+0x1a>
- if (lwip_stats.sys.sem.max < lwip_stats.sys.sem.used) {
- lwip_stats.sys.sem.max = lwip_stats.sys.sem.used;
- }
- #endif /* SYS_STATS */
- return ERR_OK;
- 800cf8a: 2000 movs r0, #0
- }
- 800cf8c: bd38 pop {r3, r4, r5, pc}
- osSemaphoreAcquire(*sem, 0);
- 800cf8e: 2100 movs r1, #0
- 800cf90: f7f7 f892 bl 80040b8 <osSemaphoreAcquire>
- return ERR_OK;
- 800cf94: 2000 movs r0, #0
- 800cf96: e7f9 b.n 800cf8c <sys_sem_new+0x18>
- return ERR_MEM;
- 800cf98: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800cf9c: e7f6 b.n 800cf8c <sys_sem_new+0x18>
- 0800cf9e <sys_arch_sem_wait>:
- Notice that lwIP implements a function with a similar name,
- sys_sem_wait(), that uses the sys_arch_sem_wait() function.
- */
- u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout)
- {
- 800cf9e: b570 push {r4, r5, r6, lr}
- 800cfa0: 4604 mov r4, r0
- 800cfa2: 460e mov r6, r1
- #if (osCMSIS < 0x20000U)
- uint32_t starttime = osKernelSysTick();
- #else
- uint32_t starttime = osKernelGetTickCount();
- 800cfa4: f7f6 ff0e bl 8003dc4 <osKernelGetTickCount>
- 800cfa8: 4605 mov r5, r0
- #endif
- if(timeout != 0)
- 800cfaa: b956 cbnz r6, 800cfc2 <sys_arch_sem_wait+0x24>
- {
- #if (osCMSIS < 0x20000U)
- while(osSemaphoreWait (*sem, osWaitForever) != osOK);
- return (osKernelSysTick() - starttime);
- #else
- while(osSemaphoreAcquire(*sem, osWaitForever) != osOK);
- 800cfac: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
- 800cfb0: 6820 ldr r0, [r4, #0]
- 800cfb2: f7f7 f881 bl 80040b8 <osSemaphoreAcquire>
- 800cfb6: 2800 cmp r0, #0
- 800cfb8: d1f8 bne.n 800cfac <sys_arch_sem_wait+0xe>
- return (osKernelGetTickCount() - starttime);
- 800cfba: f7f6 ff03 bl 8003dc4 <osKernelGetTickCount>
- 800cfbe: 1b40 subs r0, r0, r5
- #endif
- }
- }
- 800cfc0: bd70 pop {r4, r5, r6, pc}
- if(osSemaphoreAcquire(*sem, timeout) == osOK)
- 800cfc2: 4631 mov r1, r6
- 800cfc4: 6820 ldr r0, [r4, #0]
- 800cfc6: f7f7 f877 bl 80040b8 <osSemaphoreAcquire>
- 800cfca: b110 cbz r0, 800cfd2 <sys_arch_sem_wait+0x34>
- return SYS_ARCH_TIMEOUT;
- 800cfcc: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800cfd0: e7f6 b.n 800cfc0 <sys_arch_sem_wait+0x22>
- return (osKernelGetTickCount() - starttime);
- 800cfd2: f7f6 fef7 bl 8003dc4 <osKernelGetTickCount>
- 800cfd6: 1b40 subs r0, r0, r5
- 800cfd8: e7f2 b.n 800cfc0 <sys_arch_sem_wait+0x22>
- 0800cfda <sys_sem_signal>:
- /*-----------------------------------------------------------------------------------*/
- // Signals a semaphore
- void sys_sem_signal(sys_sem_t *sem)
- {
- 800cfda: b508 push {r3, lr}
- osSemaphoreRelease(*sem);
- 800cfdc: 6800 ldr r0, [r0, #0]
- 800cfde: f7f7 f89f bl 8004120 <osSemaphoreRelease>
- }
- 800cfe2: bd08 pop {r3, pc}
- 0800cfe4 <sys_sem_free>:
- /*-----------------------------------------------------------------------------------*/
- // Deallocates a semaphore
- void sys_sem_free(sys_sem_t *sem)
- {
- 800cfe4: b508 push {r3, lr}
- #if SYS_STATS
- --lwip_stats.sys.sem.used;
- #endif /* SYS_STATS */
- osSemaphoreDelete(*sem);
- 800cfe6: 6800 ldr r0, [r0, #0]
- 800cfe8: f7f7 f8c9 bl 800417e <osSemaphoreDelete>
- }
- 800cfec: bd08 pop {r3, pc}
- 0800cfee <sys_sem_valid>:
- /*-----------------------------------------------------------------------------------*/
- int sys_sem_valid(sys_sem_t *sem)
- {
- if (*sem == SYS_SEM_NULL)
- 800cfee: 6803 ldr r3, [r0, #0]
- 800cff0: b10b cbz r3, 800cff6 <sys_sem_valid+0x8>
- return 0;
- else
- return 1;
- 800cff2: 2001 movs r0, #1
- }
- 800cff4: 4770 bx lr
- return 0;
- 800cff6: 2000 movs r0, #0
- 800cff8: 4770 bx lr
- 0800cffa <sys_sem_set_invalid>:
- /*-----------------------------------------------------------------------------------*/
- void sys_sem_set_invalid(sys_sem_t *sem)
- {
- *sem = SYS_SEM_NULL;
- 800cffa: 2300 movs r3, #0
- 800cffc: 6003 str r3, [r0, #0]
- }
- 800cffe: 4770 bx lr
- 0800d000 <sys_init>:
- #else
- osMutexId_t lwip_sys_mutex;
- #endif
- // Initialize sys arch
- void sys_init(void)
- {
- 800d000: b508 push {r3, lr}
- #if (osCMSIS < 0x20000U)
- lwip_sys_mutex = osMutexCreate(osMutex(lwip_sys_mutex));
- #else
- lwip_sys_mutex = osMutexNew(NULL);
- 800d002: 2000 movs r0, #0
- 800d004: f7f6 ff58 bl 8003eb8 <osMutexNew>
- 800d008: 4b01 ldr r3, [pc, #4] @ (800d010 <sys_init+0x10>)
- 800d00a: 6018 str r0, [r3, #0]
- #endif
- }
- 800d00c: bd08 pop {r3, pc}
- 800d00e: bf00 nop
- 800d010: 24019bcc .word 0x24019bcc
- 0800d014 <sys_mutex_new>:
- /* Mutexes*/
- /*-----------------------------------------------------------------------------------*/
- /*-----------------------------------------------------------------------------------*/
- #if LWIP_COMPAT_MUTEX == 0
- /* Create a new mutex*/
- err_t sys_mutex_new(sys_mutex_t *mutex) {
- 800d014: b510 push {r4, lr}
- 800d016: 4604 mov r4, r0
- #if (osCMSIS < 0x20000U)
- osMutexDef(MUTEX);
- *mutex = osMutexCreate(osMutex(MUTEX));
- #else
- *mutex = osMutexNew(NULL);
- 800d018: 2000 movs r0, #0
- 800d01a: f7f6 ff4d bl 8003eb8 <osMutexNew>
- 800d01e: 6020 str r0, [r4, #0]
- #endif
- if(*mutex == NULL)
- 800d020: b108 cbz r0, 800d026 <sys_mutex_new+0x12>
- ++lwip_stats.sys.mutex.used;
- if (lwip_stats.sys.mutex.max < lwip_stats.sys.mutex.used) {
- lwip_stats.sys.mutex.max = lwip_stats.sys.mutex.used;
- }
- #endif /* SYS_STATS */
- return ERR_OK;
- 800d022: 2000 movs r0, #0
- }
- 800d024: bd10 pop {r4, pc}
- return ERR_MEM;
- 800d026: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800d02a: e7fb b.n 800d024 <sys_mutex_new+0x10>
- 0800d02c <sys_mutex_lock>:
- osMutexDelete(*mutex);
- }
- /*-----------------------------------------------------------------------------------*/
- /* Lock a mutex*/
- void sys_mutex_lock(sys_mutex_t *mutex)
- {
- 800d02c: b508 push {r3, lr}
- #if (osCMSIS < 0x20000U)
- osMutexWait(*mutex, osWaitForever);
- #else
- osMutexAcquire(*mutex, osWaitForever);
- 800d02e: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
- 800d032: 6800 ldr r0, [r0, #0]
- 800d034: f7f6 ff8e bl 8003f54 <osMutexAcquire>
- #endif
- }
- 800d038: bd08 pop {r3, pc}
- 0800d03a <sys_mutex_unlock>:
- /*-----------------------------------------------------------------------------------*/
- /* Unlock a mutex*/
- void sys_mutex_unlock(sys_mutex_t *mutex)
- {
- 800d03a: b508 push {r3, lr}
- osMutexRelease(*mutex);
- 800d03c: 6800 ldr r0, [r0, #0]
- 800d03e: f7f6 ffb8 bl 8003fb2 <osMutexRelease>
- }
- 800d042: bd08 pop {r3, pc}
- 0800d044 <sys_thread_new>:
- function "thread()". The "arg" argument will be passed as an argument to the
- thread() function. The id of the new thread is returned. Both the id and
- the priority are system dependent.
- */
- sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread , void *arg, int stacksize, int prio)
- {
- 800d044: b5f0 push {r4, r5, r6, r7, lr}
- 800d046: b08b sub sp, #44 @ 0x2c
- 800d048: 4607 mov r7, r0
- 800d04a: 460c mov r4, r1
- 800d04c: 4615 mov r5, r2
- 800d04e: 461e mov r6, r3
- #if (osCMSIS < 0x20000U)
- const osThreadDef_t os_thread_def = { (char *)name, (os_pthread)thread, (osPriority)prio, 0, stacksize};
- return osThreadCreate(&os_thread_def, arg);
- #else
- const osThreadAttr_t attributes = {
- 800d050: 2224 movs r2, #36 @ 0x24
- 800d052: 2100 movs r1, #0
- 800d054: a801 add r0, sp, #4
- 800d056: f006 fb2f bl 80136b8 <memset>
- 800d05a: 9701 str r7, [sp, #4]
- 800d05c: 9606 str r6, [sp, #24]
- 800d05e: 9b10 ldr r3, [sp, #64] @ 0x40
- 800d060: 9307 str r3, [sp, #28]
- .name = name,
- .stack_size = stacksize,
- .priority = (osPriority_t)prio,
- };
- return osThreadNew(thread, arg, &attributes);
- 800d062: aa01 add r2, sp, #4
- 800d064: 4629 mov r1, r5
- 800d066: 4620 mov r0, r4
- 800d068: f7f6 feb6 bl 8003dd8 <osThreadNew>
- #endif
- }
- 800d06c: b00b add sp, #44 @ 0x2c
- 800d06e: bdf0 pop {r4, r5, r6, r7, pc}
- 0800d070 <sys_arch_protect>:
- Note: This function is based on FreeRTOS API, because no equivalent CMSIS-RTOS
- API is available
- */
- sys_prot_t sys_arch_protect(void)
- {
- 800d070: b508 push {r3, lr}
- #if (osCMSIS < 0x20000U)
- osMutexWait(lwip_sys_mutex, osWaitForever);
- #else
- osMutexAcquire(lwip_sys_mutex, osWaitForever);
- 800d072: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
- 800d076: 4b03 ldr r3, [pc, #12] @ (800d084 <sys_arch_protect+0x14>)
- 800d078: 6818 ldr r0, [r3, #0]
- 800d07a: f7f6 ff6b bl 8003f54 <osMutexAcquire>
- #endif
- return (sys_prot_t)1;
- }
- 800d07e: 2001 movs r0, #1
- 800d080: bd08 pop {r3, pc}
- 800d082: bf00 nop
- 800d084: 24019bcc .word 0x24019bcc
- 0800d088 <sys_arch_unprotect>:
- Note: This function is based on FreeRTOS API, because no equivalent CMSIS-RTOS
- API is available
- */
- void sys_arch_unprotect(sys_prot_t pval)
- {
- 800d088: b508 push {r3, lr}
- ( void ) pval;
- osMutexRelease(lwip_sys_mutex);
- 800d08a: 4b02 ldr r3, [pc, #8] @ (800d094 <sys_arch_unprotect+0xc>)
- 800d08c: 6818 ldr r0, [r3, #0]
- 800d08e: f7f6 ff90 bl 8003fb2 <osMutexRelease>
- }
- 800d092: bd08 pop {r3, pc}
- 800d094: 24019bcc .word 0x24019bcc
- 0800d098 <tcp_new_port>:
- */
- static u16_t
- tcp_new_port(void)
- {
- u8_t i;
- u16_t n = 0;
- 800d098: f04f 0c00 mov.w ip, #0
- 800d09c: e00b b.n 800d0b6 <tcp_new_port+0x1e>
- struct tcp_pcb *pcb;
- again:
- tcp_port++;
- if (tcp_port == TCP_LOCAL_PORT_RANGE_END) {
- tcp_port = TCP_LOCAL_PORT_RANGE_START;
- 800d09e: 4b16 ldr r3, [pc, #88] @ (800d0f8 <tcp_new_port+0x60>)
- 800d0a0: f44f 4240 mov.w r2, #49152 @ 0xc000
- 800d0a4: 801a strh r2, [r3, #0]
- 800d0a6: e00f b.n 800d0c8 <tcp_new_port+0x30>
- }
- /* Check all PCB lists. */
- for (i = 0; i < NUM_TCP_PCB_LISTS; i++) {
- for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) {
- if (pcb->local_port == tcp_port) {
- n++;
- 800d0a8: f10c 0c01 add.w ip, ip, #1
- 800d0ac: fa1f fc8c uxth.w ip, ip
- if (n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) {
- 800d0b0: f5bc 4f80 cmp.w ip, #16384 @ 0x4000
- 800d0b4: d21d bcs.n 800d0f2 <tcp_new_port+0x5a>
- tcp_port++;
- 800d0b6: 4a10 ldr r2, [pc, #64] @ (800d0f8 <tcp_new_port+0x60>)
- 800d0b8: 8813 ldrh r3, [r2, #0]
- 800d0ba: 3301 adds r3, #1
- 800d0bc: b29b uxth r3, r3
- 800d0be: 8013 strh r3, [r2, #0]
- if (tcp_port == TCP_LOCAL_PORT_RANGE_END) {
- 800d0c0: f64f 72ff movw r2, #65535 @ 0xffff
- 800d0c4: 4293 cmp r3, r2
- 800d0c6: d0ea beq.n 800d09e <tcp_new_port+0x6>
- for (i = 0; i < NUM_TCP_PCB_LISTS; i++) {
- 800d0c8: 2000 movs r0, #0
- 800d0ca: 2803 cmp r0, #3
- 800d0cc: d80e bhi.n 800d0ec <tcp_new_port+0x54>
- for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) {
- 800d0ce: 4b0b ldr r3, [pc, #44] @ (800d0fc <tcp_new_port+0x64>)
- 800d0d0: f853 3020 ldr.w r3, [r3, r0, lsl #2]
- 800d0d4: 681b ldr r3, [r3, #0]
- 800d0d6: b133 cbz r3, 800d0e6 <tcp_new_port+0x4e>
- if (pcb->local_port == tcp_port) {
- 800d0d8: 8ad9 ldrh r1, [r3, #22]
- 800d0da: 4a07 ldr r2, [pc, #28] @ (800d0f8 <tcp_new_port+0x60>)
- 800d0dc: 8812 ldrh r2, [r2, #0]
- 800d0de: 4291 cmp r1, r2
- 800d0e0: d0e2 beq.n 800d0a8 <tcp_new_port+0x10>
- for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) {
- 800d0e2: 68db ldr r3, [r3, #12]
- 800d0e4: e7f7 b.n 800d0d6 <tcp_new_port+0x3e>
- for (i = 0; i < NUM_TCP_PCB_LISTS; i++) {
- 800d0e6: 3001 adds r0, #1
- 800d0e8: b2c0 uxtb r0, r0
- 800d0ea: e7ee b.n 800d0ca <tcp_new_port+0x32>
- }
- goto again;
- }
- }
- }
- return tcp_port;
- 800d0ec: 4b02 ldr r3, [pc, #8] @ (800d0f8 <tcp_new_port+0x60>)
- 800d0ee: 8818 ldrh r0, [r3, #0]
- 800d0f0: 4770 bx lr
- return 0;
- 800d0f2: 2000 movs r0, #0
- }
- 800d0f4: 4770 bx lr
- 800d0f6: bf00 nop
- 800d0f8: 2400002c .word 0x2400002c
- 800d0fc: 08016c3c .word 0x08016c3c
- 0800d100 <tcp_remove_listener>:
- {
- 800d100: b538 push {r3, r4, r5, lr}
- 800d102: 4604 mov r4, r0
- LWIP_ASSERT("tcp_remove_listener: invalid listener", lpcb != NULL);
- 800d104: 460d mov r5, r1
- 800d106: b939 cbnz r1, 800d118 <tcp_remove_listener+0x18>
- 800d108: 4b07 ldr r3, [pc, #28] @ (800d128 <tcp_remove_listener+0x28>)
- 800d10a: 22ff movs r2, #255 @ 0xff
- 800d10c: 4907 ldr r1, [pc, #28] @ (800d12c <tcp_remove_listener+0x2c>)
- 800d10e: 4808 ldr r0, [pc, #32] @ (800d130 <tcp_remove_listener+0x30>)
- 800d110: f006 f97a bl 8013408 <iprintf>
- 800d114: e000 b.n 800d118 <tcp_remove_listener+0x18>
- for (pcb = list; pcb != NULL; pcb = pcb->next) {
- 800d116: 68e4 ldr r4, [r4, #12]
- 800d118: b12c cbz r4, 800d126 <tcp_remove_listener+0x26>
- if (pcb->listener == lpcb) {
- 800d11a: 6fe3 ldr r3, [r4, #124] @ 0x7c
- 800d11c: 42ab cmp r3, r5
- 800d11e: d1fa bne.n 800d116 <tcp_remove_listener+0x16>
- pcb->listener = NULL;
- 800d120: 2300 movs r3, #0
- 800d122: 67e3 str r3, [r4, #124] @ 0x7c
- 800d124: e7f7 b.n 800d116 <tcp_remove_listener+0x16>
- }
- 800d126: bd38 pop {r3, r4, r5, pc}
- 800d128: 080165b0 .word 0x080165b0
- 800d12c: 08016610 .word 0x08016610
- 800d130: 080144e8 .word 0x080144e8
- 0800d134 <tcp_listen_closed>:
- {
- 800d134: b538 push {r3, r4, r5, lr}
- LWIP_ASSERT("pcb != NULL", pcb != NULL);
- 800d136: 4605 mov r5, r0
- 800d138: b120 cbz r0, 800d144 <tcp_listen_closed+0x10>
- LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN);
- 800d13a: 7d2b ldrb r3, [r5, #20]
- 800d13c: 2b01 cmp r3, #1
- 800d13e: d109 bne.n 800d154 <tcp_listen_closed+0x20>
- {
- 800d140: 2401 movs r4, #1
- 800d142: e017 b.n 800d174 <tcp_listen_closed+0x40>
- LWIP_ASSERT("pcb != NULL", pcb != NULL);
- 800d144: 4b0d ldr r3, [pc, #52] @ (800d17c <tcp_listen_closed+0x48>)
- 800d146: f240 1211 movw r2, #273 @ 0x111
- 800d14a: 490d ldr r1, [pc, #52] @ (800d180 <tcp_listen_closed+0x4c>)
- 800d14c: 480d ldr r0, [pc, #52] @ (800d184 <tcp_listen_closed+0x50>)
- 800d14e: f006 f95b bl 8013408 <iprintf>
- 800d152: e7f2 b.n 800d13a <tcp_listen_closed+0x6>
- LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN);
- 800d154: 4b09 ldr r3, [pc, #36] @ (800d17c <tcp_listen_closed+0x48>)
- 800d156: f44f 7289 mov.w r2, #274 @ 0x112
- 800d15a: 490b ldr r1, [pc, #44] @ (800d188 <tcp_listen_closed+0x54>)
- 800d15c: 4809 ldr r0, [pc, #36] @ (800d184 <tcp_listen_closed+0x50>)
- 800d15e: f006 f953 bl 8013408 <iprintf>
- 800d162: e7ed b.n 800d140 <tcp_listen_closed+0xc>
- tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen *)pcb);
- 800d164: 4b09 ldr r3, [pc, #36] @ (800d18c <tcp_listen_closed+0x58>)
- 800d166: f853 3024 ldr.w r3, [r3, r4, lsl #2]
- 800d16a: 4629 mov r1, r5
- 800d16c: 6818 ldr r0, [r3, #0]
- 800d16e: f7ff ffc7 bl 800d100 <tcp_remove_listener>
- for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) {
- 800d172: 3401 adds r4, #1
- 800d174: 2c03 cmp r4, #3
- 800d176: d9f5 bls.n 800d164 <tcp_listen_closed+0x30>
- }
- 800d178: bd38 pop {r3, r4, r5, pc}
- 800d17a: bf00 nop
- 800d17c: 080165b0 .word 0x080165b0
- 800d180: 08016638 .word 0x08016638
- 800d184: 080144e8 .word 0x080144e8
- 800d188: 08016644 .word 0x08016644
- 800d18c: 08016c3c .word 0x08016c3c
- 0800d190 <tcp_free_listen>:
- {
- 800d190: b510 push {r4, lr}
- 800d192: 4604 mov r4, r0
- LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN);
- 800d194: 7d03 ldrb r3, [r0, #20]
- 800d196: 2b01 cmp r3, #1
- 800d198: d004 beq.n 800d1a4 <tcp_free_listen+0x14>
- memp_free(MEMP_TCP_PCB_LISTEN, pcb);
- 800d19a: 4621 mov r1, r4
- 800d19c: 2002 movs r0, #2
- 800d19e: f7fe fa67 bl 800b670 <memp_free>
- }
- 800d1a2: bd10 pop {r4, pc}
- LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN);
- 800d1a4: 4b03 ldr r3, [pc, #12] @ (800d1b4 <tcp_free_listen+0x24>)
- 800d1a6: 22df movs r2, #223 @ 0xdf
- 800d1a8: 4903 ldr r1, [pc, #12] @ (800d1b8 <tcp_free_listen+0x28>)
- 800d1aa: 4804 ldr r0, [pc, #16] @ (800d1bc <tcp_free_listen+0x2c>)
- 800d1ac: f006 f92c bl 8013408 <iprintf>
- 800d1b0: e7f3 b.n 800d19a <tcp_free_listen+0xa>
- 800d1b2: bf00 nop
- 800d1b4: 080165b0 .word 0x080165b0
- 800d1b8: 0801665c .word 0x0801665c
- 800d1bc: 080144e8 .word 0x080144e8
- 0800d1c0 <tcp_close_shutdown_fin>:
- {
- 800d1c0: b538 push {r3, r4, r5, lr}
- LWIP_ASSERT("pcb != NULL", pcb != NULL);
- 800d1c2: 4604 mov r4, r0
- 800d1c4: b148 cbz r0, 800d1da <tcp_close_shutdown_fin+0x1a>
- switch (pcb->state) {
- 800d1c6: 7d23 ldrb r3, [r4, #20]
- 800d1c8: 2b04 cmp r3, #4
- 800d1ca: d019 beq.n 800d200 <tcp_close_shutdown_fin+0x40>
- 800d1cc: 2b07 cmp r3, #7
- 800d1ce: d01f beq.n 800d210 <tcp_close_shutdown_fin+0x50>
- 800d1d0: 2b03 cmp r3, #3
- 800d1d2: d00a beq.n 800d1ea <tcp_close_shutdown_fin+0x2a>
- 800d1d4: 2500 movs r5, #0
- }
- 800d1d6: 4628 mov r0, r5
- 800d1d8: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("pcb != NULL", pcb != NULL);
- 800d1da: 4b16 ldr r3, [pc, #88] @ (800d234 <tcp_close_shutdown_fin+0x74>)
- 800d1dc: f44f 72ce mov.w r2, #412 @ 0x19c
- 800d1e0: 4915 ldr r1, [pc, #84] @ (800d238 <tcp_close_shutdown_fin+0x78>)
- 800d1e2: 4816 ldr r0, [pc, #88] @ (800d23c <tcp_close_shutdown_fin+0x7c>)
- 800d1e4: f006 f910 bl 8013408 <iprintf>
- 800d1e8: e7ed b.n 800d1c6 <tcp_close_shutdown_fin+0x6>
- err = tcp_send_fin(pcb);
- 800d1ea: 4620 mov r0, r4
- 800d1ec: f003 fcb4 bl 8010b58 <tcp_send_fin>
- if (err == ERR_OK) {
- 800d1f0: 4605 mov r5, r0
- 800d1f2: b9a8 cbnz r0, 800d220 <tcp_close_shutdown_fin+0x60>
- pcb->state = FIN_WAIT_1;
- 800d1f4: 2305 movs r3, #5
- 800d1f6: 7523 strb r3, [r4, #20]
- tcp_output(pcb);
- 800d1f8: 4620 mov r0, r4
- 800d1fa: f003 fe33 bl 8010e64 <tcp_output>
- 800d1fe: e7ea b.n 800d1d6 <tcp_close_shutdown_fin+0x16>
- err = tcp_send_fin(pcb);
- 800d200: 4620 mov r0, r4
- 800d202: f003 fca9 bl 8010b58 <tcp_send_fin>
- if (err == ERR_OK) {
- 800d206: 4605 mov r5, r0
- 800d208: b950 cbnz r0, 800d220 <tcp_close_shutdown_fin+0x60>
- pcb->state = FIN_WAIT_1;
- 800d20a: 2305 movs r3, #5
- 800d20c: 7523 strb r3, [r4, #20]
- if (err == ERR_OK) {
- 800d20e: e7f3 b.n 800d1f8 <tcp_close_shutdown_fin+0x38>
- err = tcp_send_fin(pcb);
- 800d210: 4620 mov r0, r4
- 800d212: f003 fca1 bl 8010b58 <tcp_send_fin>
- if (err == ERR_OK) {
- 800d216: 4605 mov r5, r0
- 800d218: b910 cbnz r0, 800d220 <tcp_close_shutdown_fin+0x60>
- pcb->state = LAST_ACK;
- 800d21a: 2309 movs r3, #9
- 800d21c: 7523 strb r3, [r4, #20]
- if (err == ERR_OK) {
- 800d21e: e7eb b.n 800d1f8 <tcp_close_shutdown_fin+0x38>
- } else if (err == ERR_MEM) {
- 800d220: f1b5 3fff cmp.w r5, #4294967295 @ 0xffffffff
- 800d224: d1d7 bne.n 800d1d6 <tcp_close_shutdown_fin+0x16>
- tcp_set_flags(pcb, TF_CLOSEPEND);
- 800d226: 8b63 ldrh r3, [r4, #26]
- 800d228: f043 0308 orr.w r3, r3, #8
- 800d22c: 8363 strh r3, [r4, #26]
- return ERR_OK;
- 800d22e: 2500 movs r5, #0
- 800d230: e7d1 b.n 800d1d6 <tcp_close_shutdown_fin+0x16>
- 800d232: bf00 nop
- 800d234: 080165b0 .word 0x080165b0
- 800d238: 08016638 .word 0x08016638
- 800d23c: 080144e8 .word 0x080144e8
- 0800d240 <tcp_handle_closepend>:
- * OK for us to now free it.
- */
- static void
- tcp_handle_closepend(void)
- {
- struct tcp_pcb *pcb = tcp_active_pcbs;
- 800d240: 4b09 ldr r3, [pc, #36] @ (800d268 <tcp_handle_closepend+0x28>)
- 800d242: 6818 ldr r0, [r3, #0]
- while (pcb != NULL) {
- 800d244: b178 cbz r0, 800d266 <tcp_handle_closepend+0x26>
- {
- 800d246: b510 push {r4, lr}
- 800d248: e001 b.n 800d24e <tcp_handle_closepend+0xe>
- 800d24a: 4620 mov r0, r4
- while (pcb != NULL) {
- 800d24c: b154 cbz r4, 800d264 <tcp_handle_closepend+0x24>
- struct tcp_pcb *next = pcb->next;
- 800d24e: 68c4 ldr r4, [r0, #12]
- /* send pending FIN */
- if (pcb->flags & TF_CLOSEPEND) {
- 800d250: 8b43 ldrh r3, [r0, #26]
- 800d252: f013 0f08 tst.w r3, #8
- 800d256: d0f8 beq.n 800d24a <tcp_handle_closepend+0xa>
- LWIP_DEBUGF(TCP_DEBUG, ("tcp_handle_closepend: pending FIN\n"));
- tcp_clear_flags(pcb, TF_CLOSEPEND);
- 800d258: f023 0308 bic.w r3, r3, #8
- 800d25c: 8343 strh r3, [r0, #26]
- tcp_close_shutdown_fin(pcb);
- 800d25e: f7ff ffaf bl 800d1c0 <tcp_close_shutdown_fin>
- 800d262: e7f2 b.n 800d24a <tcp_handle_closepend+0xa>
- }
- pcb = next;
- }
- }
- 800d264: bd10 pop {r4, pc}
- 800d266: 4770 bx lr
- 800d268: 24019bd8 .word 0x24019bd8
- 0800d26c <tcp_init>:
- {
- 800d26c: b508 push {r3, lr}
- tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());
- 800d26e: f005 ff1f bl 80130b0 <rand>
- 800d272: 4b02 ldr r3, [pc, #8] @ (800d27c <tcp_init+0x10>)
- 800d274: 4303 orrs r3, r0
- 800d276: 4a02 ldr r2, [pc, #8] @ (800d280 <tcp_init+0x14>)
- 800d278: 8013 strh r3, [r2, #0]
- }
- 800d27a: bd08 pop {r3, pc}
- 800d27c: ffffc000 .word 0xffffc000
- 800d280: 2400002c .word 0x2400002c
- 0800d284 <tcp_free>:
- {
- 800d284: b510 push {r4, lr}
- 800d286: 4604 mov r4, r0
- LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN);
- 800d288: 7d03 ldrb r3, [r0, #20]
- 800d28a: 2b01 cmp r3, #1
- 800d28c: d004 beq.n 800d298 <tcp_free+0x14>
- memp_free(MEMP_TCP_PCB, pcb);
- 800d28e: 4621 mov r1, r4
- 800d290: 2001 movs r0, #1
- 800d292: f7fe f9ed bl 800b670 <memp_free>
- }
- 800d296: bd10 pop {r4, pc}
- LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN);
- 800d298: 4b03 ldr r3, [pc, #12] @ (800d2a8 <tcp_free+0x24>)
- 800d29a: 22d4 movs r2, #212 @ 0xd4
- 800d29c: 4903 ldr r1, [pc, #12] @ (800d2ac <tcp_free+0x28>)
- 800d29e: 4804 ldr r0, [pc, #16] @ (800d2b0 <tcp_free+0x2c>)
- 800d2a0: f006 f8b2 bl 8013408 <iprintf>
- 800d2a4: e7f3 b.n 800d28e <tcp_free+0xa>
- 800d2a6: bf00 nop
- 800d2a8: 080165b0 .word 0x080165b0
- 800d2ac: 08016678 .word 0x08016678
- 800d2b0: 080144e8 .word 0x080144e8
- 0800d2b4 <tcp_update_rcv_ann_wnd>:
- {
- 800d2b4: b538 push {r3, r4, r5, lr}
- LWIP_ASSERT("tcp_update_rcv_ann_wnd: invalid pcb", pcb != NULL);
- 800d2b6: 4604 mov r4, r0
- 800d2b8: b198 cbz r0, 800d2e2 <tcp_update_rcv_ann_wnd+0x2e>
- new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd;
- 800d2ba: 6a65 ldr r5, [r4, #36] @ 0x24
- 800d2bc: 8d21 ldrh r1, [r4, #40] @ 0x28
- 800d2be: 1868 adds r0, r5, r1
- if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) {
- 800d2c0: 6ae2 ldr r2, [r4, #44] @ 0x2c
- 800d2c2: f8b4 e032 ldrh.w lr, [r4, #50] @ 0x32
- 800d2c6: f640 3c68 movw ip, #2920 @ 0xb68
- 800d2ca: 45e6 cmp lr, ip
- 800d2cc: bf94 ite ls
- 800d2ce: eb02 030e addls.w r3, r2, lr
- 800d2d2: eb02 030c addhi.w r3, r2, ip
- 800d2d6: 1ac3 subs r3, r0, r3
- 800d2d8: 2b00 cmp r3, #0
- 800d2da: db0a blt.n 800d2f2 <tcp_update_rcv_ann_wnd+0x3e>
- pcb->rcv_ann_wnd = pcb->rcv_wnd;
- 800d2dc: 8561 strh r1, [r4, #42] @ 0x2a
- return new_right_edge - pcb->rcv_ann_right_edge;
- 800d2de: 1a80 subs r0, r0, r2
- }
- 800d2e0: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("tcp_update_rcv_ann_wnd: invalid pcb", pcb != NULL);
- 800d2e2: 4b0e ldr r3, [pc, #56] @ (800d31c <tcp_update_rcv_ann_wnd+0x68>)
- 800d2e4: f240 32a6 movw r2, #934 @ 0x3a6
- 800d2e8: 490d ldr r1, [pc, #52] @ (800d320 <tcp_update_rcv_ann_wnd+0x6c>)
- 800d2ea: 480e ldr r0, [pc, #56] @ (800d324 <tcp_update_rcv_ann_wnd+0x70>)
- 800d2ec: f006 f88c bl 8013408 <iprintf>
- 800d2f0: e7e3 b.n 800d2ba <tcp_update_rcv_ann_wnd+0x6>
- if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) {
- 800d2f2: 1aab subs r3, r5, r2
- 800d2f4: 2b00 cmp r3, #0
- 800d2f6: dd03 ble.n 800d300 <tcp_update_rcv_ann_wnd+0x4c>
- pcb->rcv_ann_wnd = 0;
- 800d2f8: 2300 movs r3, #0
- 800d2fa: 8563 strh r3, [r4, #42] @ 0x2a
- return 0;
- 800d2fc: 2000 movs r0, #0
- 800d2fe: e7ef b.n 800d2e0 <tcp_update_rcv_ann_wnd+0x2c>
- u32_t new_rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt;
- 800d300: 1b55 subs r5, r2, r5
- LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff);
- 800d302: f5b5 3f80 cmp.w r5, #65536 @ 0x10000
- 800d306: d201 bcs.n 800d30c <tcp_update_rcv_ann_wnd+0x58>
- pcb->rcv_ann_wnd = (tcpwnd_size_t)new_rcv_ann_wnd;
- 800d308: 8565 strh r5, [r4, #42] @ 0x2a
- 800d30a: e7f7 b.n 800d2fc <tcp_update_rcv_ann_wnd+0x48>
- LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff);
- 800d30c: 4b03 ldr r3, [pc, #12] @ (800d31c <tcp_update_rcv_ann_wnd+0x68>)
- 800d30e: f240 32b6 movw r2, #950 @ 0x3b6
- 800d312: 4905 ldr r1, [pc, #20] @ (800d328 <tcp_update_rcv_ann_wnd+0x74>)
- 800d314: 4803 ldr r0, [pc, #12] @ (800d324 <tcp_update_rcv_ann_wnd+0x70>)
- 800d316: f006 f877 bl 8013408 <iprintf>
- 800d31a: e7f5 b.n 800d308 <tcp_update_rcv_ann_wnd+0x54>
- 800d31c: 080165b0 .word 0x080165b0
- 800d320: 0801668c .word 0x0801668c
- 800d324: 080144e8 .word 0x080144e8
- 800d328: 080166b0 .word 0x080166b0
- 0800d32c <tcp_recved>:
- {
- 800d32c: b538 push {r3, r4, r5, lr}
- 800d32e: 4604 mov r4, r0
- 800d330: 460d mov r5, r1
- LWIP_ASSERT_CORE_LOCKED();
- 800d332: f7f6 fbeb bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("tcp_recved: invalid pcb", pcb != NULL, return);
- 800d336: b1b4 cbz r4, 800d366 <tcp_recved+0x3a>
- LWIP_ASSERT("don't call tcp_recved for listen-pcbs",
- 800d338: 7d23 ldrb r3, [r4, #20]
- 800d33a: 2b01 cmp r3, #1
- 800d33c: d01b beq.n 800d376 <tcp_recved+0x4a>
- rcv_wnd = (tcpwnd_size_t)(pcb->rcv_wnd + len);
- 800d33e: 8d23 ldrh r3, [r4, #40] @ 0x28
- 800d340: 1959 adds r1, r3, r5
- 800d342: b289 uxth r1, r1
- if ((rcv_wnd > TCP_WND_MAX(pcb)) || (rcv_wnd < pcb->rcv_wnd)) {
- 800d344: f241 62d0 movw r2, #5840 @ 0x16d0
- 800d348: 4291 cmp r1, r2
- 800d34a: d801 bhi.n 800d350 <tcp_recved+0x24>
- 800d34c: 428b cmp r3, r1
- 800d34e: d91a bls.n 800d386 <tcp_recved+0x5a>
- pcb->rcv_wnd = TCP_WND_MAX(pcb);
- 800d350: f241 63d0 movw r3, #5840 @ 0x16d0
- 800d354: 8523 strh r3, [r4, #40] @ 0x28
- wnd_inflation = tcp_update_rcv_ann_wnd(pcb);
- 800d356: 4620 mov r0, r4
- 800d358: f7ff ffac bl 800d2b4 <tcp_update_rcv_ann_wnd>
- if (wnd_inflation >= TCP_WND_UPDATE_THRESHOLD) {
- 800d35c: f240 53b3 movw r3, #1459 @ 0x5b3
- 800d360: 4298 cmp r0, r3
- 800d362: d812 bhi.n 800d38a <tcp_recved+0x5e>
- }
- 800d364: bd38 pop {r3, r4, r5, pc}
- LWIP_ERROR("tcp_recved: invalid pcb", pcb != NULL, return);
- 800d366: 4b0d ldr r3, [pc, #52] @ (800d39c <tcp_recved+0x70>)
- 800d368: f240 32cf movw r2, #975 @ 0x3cf
- 800d36c: 490c ldr r1, [pc, #48] @ (800d3a0 <tcp_recved+0x74>)
- 800d36e: 480d ldr r0, [pc, #52] @ (800d3a4 <tcp_recved+0x78>)
- 800d370: f006 f84a bl 8013408 <iprintf>
- 800d374: e7f6 b.n 800d364 <tcp_recved+0x38>
- LWIP_ASSERT("don't call tcp_recved for listen-pcbs",
- 800d376: 4b09 ldr r3, [pc, #36] @ (800d39c <tcp_recved+0x70>)
- 800d378: f240 32d2 movw r2, #978 @ 0x3d2
- 800d37c: 490a ldr r1, [pc, #40] @ (800d3a8 <tcp_recved+0x7c>)
- 800d37e: 4809 ldr r0, [pc, #36] @ (800d3a4 <tcp_recved+0x78>)
- 800d380: f006 f842 bl 8013408 <iprintf>
- 800d384: e7db b.n 800d33e <tcp_recved+0x12>
- pcb->rcv_wnd = rcv_wnd;
- 800d386: 8521 strh r1, [r4, #40] @ 0x28
- 800d388: e7e5 b.n 800d356 <tcp_recved+0x2a>
- tcp_ack_now(pcb);
- 800d38a: 8b63 ldrh r3, [r4, #26]
- 800d38c: f043 0302 orr.w r3, r3, #2
- 800d390: 8363 strh r3, [r4, #26]
- tcp_output(pcb);
- 800d392: 4620 mov r0, r4
- 800d394: f003 fd66 bl 8010e64 <tcp_output>
- LWIP_DEBUGF(TCP_DEBUG, ("tcp_recved: received %"U16_F" bytes, wnd %"TCPWNDSIZE_F" (%"TCPWNDSIZE_F").\n",
- 800d398: e7e4 b.n 800d364 <tcp_recved+0x38>
- 800d39a: bf00 nop
- 800d39c: 080165b0 .word 0x080165b0
- 800d3a0: 080166cc .word 0x080166cc
- 800d3a4: 080144e8 .word 0x080144e8
- 800d3a8: 080166e4 .word 0x080166e4
- 0800d3ac <tcp_seg_free>:
- if (seg != NULL) {
- 800d3ac: b150 cbz r0, 800d3c4 <tcp_seg_free+0x18>
- {
- 800d3ae: b510 push {r4, lr}
- 800d3b0: 4604 mov r4, r0
- if (seg->p != NULL) {
- 800d3b2: 6840 ldr r0, [r0, #4]
- 800d3b4: b108 cbz r0, 800d3ba <tcp_seg_free+0xe>
- pbuf_free(seg->p);
- 800d3b6: f7fe fcf3 bl 800bda0 <pbuf_free>
- memp_free(MEMP_TCP_SEG, seg);
- 800d3ba: 4621 mov r1, r4
- 800d3bc: 2003 movs r0, #3
- 800d3be: f7fe f957 bl 800b670 <memp_free>
- }
- 800d3c2: bd10 pop {r4, pc}
- 800d3c4: 4770 bx lr
- 0800d3c6 <tcp_segs_free>:
- while (seg != NULL) {
- 800d3c6: b138 cbz r0, 800d3d8 <tcp_segs_free+0x12>
- {
- 800d3c8: b510 push {r4, lr}
- struct tcp_seg *next = seg->next;
- 800d3ca: 6804 ldr r4, [r0, #0]
- tcp_seg_free(seg);
- 800d3cc: f7ff ffee bl 800d3ac <tcp_seg_free>
- seg = next;
- 800d3d0: 4620 mov r0, r4
- while (seg != NULL) {
- 800d3d2: 2c00 cmp r4, #0
- 800d3d4: d1f9 bne.n 800d3ca <tcp_segs_free+0x4>
- }
- 800d3d6: bd10 pop {r4, pc}
- 800d3d8: 4770 bx lr
- ...
- 0800d3dc <tcp_seg_copy>:
- {
- 800d3dc: b538 push {r3, r4, r5, lr}
- LWIP_ASSERT("tcp_seg_copy: invalid seg", seg != NULL);
- 800d3de: 4605 mov r5, r0
- 800d3e0: b198 cbz r0, 800d40a <tcp_seg_copy+0x2e>
- cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG);
- 800d3e2: 2003 movs r0, #3
- 800d3e4: f7fe f90e bl 800b604 <memp_malloc>
- if (cseg == NULL) {
- 800d3e8: 4604 mov r4, r0
- 800d3ea: b160 cbz r0, 800d406 <tcp_seg_copy+0x2a>
- SMEMCPY((u8_t *)cseg, (const u8_t *)seg, sizeof(struct tcp_seg));
- 800d3ec: 682b ldr r3, [r5, #0]
- 800d3ee: 6868 ldr r0, [r5, #4]
- 800d3f0: 68a9 ldr r1, [r5, #8]
- 800d3f2: 68ea ldr r2, [r5, #12]
- 800d3f4: 6023 str r3, [r4, #0]
- 800d3f6: 6060 str r0, [r4, #4]
- 800d3f8: 60a1 str r1, [r4, #8]
- 800d3fa: 60e2 str r2, [r4, #12]
- 800d3fc: 692b ldr r3, [r5, #16]
- 800d3fe: 6123 str r3, [r4, #16]
- pbuf_ref(cseg->p);
- 800d400: 6860 ldr r0, [r4, #4]
- 800d402: f7fe fe5b bl 800c0bc <pbuf_ref>
- }
- 800d406: 4620 mov r0, r4
- 800d408: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("tcp_seg_copy: invalid seg", seg != NULL);
- 800d40a: 4b04 ldr r3, [pc, #16] @ (800d41c <tcp_seg_copy+0x40>)
- 800d40c: f240 6282 movw r2, #1666 @ 0x682
- 800d410: 4903 ldr r1, [pc, #12] @ (800d420 <tcp_seg_copy+0x44>)
- 800d412: 4804 ldr r0, [pc, #16] @ (800d424 <tcp_seg_copy+0x48>)
- 800d414: f005 fff8 bl 8013408 <iprintf>
- 800d418: e7e3 b.n 800d3e2 <tcp_seg_copy+0x6>
- 800d41a: bf00 nop
- 800d41c: 080165b0 .word 0x080165b0
- 800d420: 0801670c .word 0x0801670c
- 800d424: 080144e8 .word 0x080144e8
- 0800d428 <tcp_arg>:
- * @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)
- {
- 800d428: b538 push {r3, r4, r5, lr}
- 800d42a: 4604 mov r4, r0
- 800d42c: 460d mov r5, r1
- LWIP_ASSERT_CORE_LOCKED();
- 800d42e: f7f6 fb6d bl 8003b0c <sys_check_core_locking>
- /* This function is allowed to be called for both listen pcbs and
- connection pcbs. */
- if (pcb != NULL) {
- 800d432: b104 cbz r4, 800d436 <tcp_arg+0xe>
- pcb->callback_arg = arg;
- 800d434: 6125 str r5, [r4, #16]
- }
- }
- 800d436: bd38 pop {r3, r4, r5, pc}
- 0800d438 <tcp_recv>:
- * @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)
- {
- 800d438: b538 push {r3, r4, r5, lr}
- 800d43a: 4604 mov r4, r0
- 800d43c: 460d mov r5, r1
- LWIP_ASSERT_CORE_LOCKED();
- 800d43e: f7f6 fb65 bl 8003b0c <sys_check_core_locking>
- if (pcb != NULL) {
- 800d442: b124 cbz r4, 800d44e <tcp_recv+0x16>
- LWIP_ASSERT("invalid socket state for recv callback", pcb->state != LISTEN);
- 800d444: 7d23 ldrb r3, [r4, #20]
- 800d446: 2b01 cmp r3, #1
- 800d448: d002 beq.n 800d450 <tcp_recv+0x18>
- pcb->recv = recv;
- 800d44a: f8c4 5084 str.w r5, [r4, #132] @ 0x84
- }
- }
- 800d44e: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("invalid socket state for recv callback", pcb->state != LISTEN);
- 800d450: 4b03 ldr r3, [pc, #12] @ (800d460 <tcp_recv+0x28>)
- 800d452: f240 72df movw r2, #2015 @ 0x7df
- 800d456: 4903 ldr r1, [pc, #12] @ (800d464 <tcp_recv+0x2c>)
- 800d458: 4803 ldr r0, [pc, #12] @ (800d468 <tcp_recv+0x30>)
- 800d45a: f005 ffd5 bl 8013408 <iprintf>
- 800d45e: e7f4 b.n 800d44a <tcp_recv+0x12>
- 800d460: 080165b0 .word 0x080165b0
- 800d464: 08016728 .word 0x08016728
- 800d468: 080144e8 .word 0x080144e8
- 0800d46c <tcp_sent>:
- * @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)
- {
- 800d46c: b538 push {r3, r4, r5, lr}
- 800d46e: 4604 mov r4, r0
- 800d470: 460d mov r5, r1
- LWIP_ASSERT_CORE_LOCKED();
- 800d472: f7f6 fb4b bl 8003b0c <sys_check_core_locking>
- if (pcb != NULL) {
- 800d476: b124 cbz r4, 800d482 <tcp_sent+0x16>
- LWIP_ASSERT("invalid socket state for sent callback", pcb->state != LISTEN);
- 800d478: 7d23 ldrb r3, [r4, #20]
- 800d47a: 2b01 cmp r3, #1
- 800d47c: d002 beq.n 800d484 <tcp_sent+0x18>
- pcb->sent = sent;
- 800d47e: f8c4 5080 str.w r5, [r4, #128] @ 0x80
- }
- }
- 800d482: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("invalid socket state for sent callback", pcb->state != LISTEN);
- 800d484: 4b03 ldr r3, [pc, #12] @ (800d494 <tcp_sent+0x28>)
- 800d486: f240 72f3 movw r2, #2035 @ 0x7f3
- 800d48a: 4903 ldr r1, [pc, #12] @ (800d498 <tcp_sent+0x2c>)
- 800d48c: 4803 ldr r0, [pc, #12] @ (800d49c <tcp_sent+0x30>)
- 800d48e: f005 ffbb bl 8013408 <iprintf>
- 800d492: e7f4 b.n 800d47e <tcp_sent+0x12>
- 800d494: 080165b0 .word 0x080165b0
- 800d498: 08016750 .word 0x08016750
- 800d49c: 080144e8 .word 0x080144e8
- 0800d4a0 <tcp_err>:
- * @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)
- {
- 800d4a0: b538 push {r3, r4, r5, lr}
- 800d4a2: 4604 mov r4, r0
- 800d4a4: 460d mov r5, r1
- LWIP_ASSERT_CORE_LOCKED();
- 800d4a6: f7f6 fb31 bl 8003b0c <sys_check_core_locking>
- if (pcb != NULL) {
- 800d4aa: b124 cbz r4, 800d4b6 <tcp_err+0x16>
- LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN);
- 800d4ac: 7d23 ldrb r3, [r4, #20]
- 800d4ae: 2b01 cmp r3, #1
- 800d4b0: d002 beq.n 800d4b8 <tcp_err+0x18>
- pcb->errf = err;
- 800d4b2: f8c4 5090 str.w r5, [r4, #144] @ 0x90
- }
- }
- 800d4b6: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN);
- 800d4b8: 4b03 ldr r3, [pc, #12] @ (800d4c8 <tcp_err+0x28>)
- 800d4ba: f640 020d movw r2, #2061 @ 0x80d
- 800d4be: 4903 ldr r1, [pc, #12] @ (800d4cc <tcp_err+0x2c>)
- 800d4c0: 4803 ldr r0, [pc, #12] @ (800d4d0 <tcp_err+0x30>)
- 800d4c2: f005 ffa1 bl 8013408 <iprintf>
- 800d4c6: e7f4 b.n 800d4b2 <tcp_err+0x12>
- 800d4c8: 080165b0 .word 0x080165b0
- 800d4cc: 08016778 .word 0x08016778
- 800d4d0: 080144e8 .word 0x080144e8
- 0800d4d4 <tcp_accept>:
- * @param accept callback function to call for this pcb when LISTENing
- * connection has been connected to another host
- */
- void
- tcp_accept(struct tcp_pcb *pcb, tcp_accept_fn accept)
- {
- 800d4d4: b538 push {r3, r4, r5, lr}
- 800d4d6: 4604 mov r4, r0
- 800d4d8: 460d mov r5, r1
- LWIP_ASSERT_CORE_LOCKED();
- 800d4da: f7f6 fb17 bl 8003b0c <sys_check_core_locking>
- if ((pcb != NULL) && (pcb->state == LISTEN)) {
- 800d4de: b114 cbz r4, 800d4e6 <tcp_accept+0x12>
- 800d4e0: 7d23 ldrb r3, [r4, #20]
- 800d4e2: 2b01 cmp r3, #1
- 800d4e4: d000 beq.n 800d4e8 <tcp_accept+0x14>
- struct tcp_pcb_listen *lpcb = (struct tcp_pcb_listen *)pcb;
- lpcb->accept = accept;
- }
- }
- 800d4e6: bd38 pop {r3, r4, r5, pc}
- lpcb->accept = accept;
- 800d4e8: 61a5 str r5, [r4, #24]
- }
- 800d4ea: e7fc b.n 800d4e6 <tcp_accept+0x12>
- 0800d4ec <tcp_poll>:
- * the application may use the polling functionality to call tcp_write()
- * again when the connection has been idle for a while.
- */
- void
- tcp_poll(struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval)
- {
- 800d4ec: b570 push {r4, r5, r6, lr}
- 800d4ee: 4604 mov r4, r0
- 800d4f0: 460e mov r6, r1
- 800d4f2: 4615 mov r5, r2
- LWIP_ASSERT_CORE_LOCKED();
- 800d4f4: f7f6 fb0a bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("tcp_poll: invalid pcb", pcb != NULL, return);
- 800d4f8: b134 cbz r4, 800d508 <tcp_poll+0x1c>
- LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN);
- 800d4fa: 7d23 ldrb r3, [r4, #20]
- 800d4fc: 2b01 cmp r3, #1
- 800d4fe: d00b beq.n 800d518 <tcp_poll+0x2c>
- #if LWIP_CALLBACK_API
- pcb->poll = poll;
- 800d500: f8c4 608c str.w r6, [r4, #140] @ 0x8c
- #else /* LWIP_CALLBACK_API */
- LWIP_UNUSED_ARG(poll);
- #endif /* LWIP_CALLBACK_API */
- pcb->pollinterval = interval;
- 800d504: 7765 strb r5, [r4, #29]
- }
- 800d506: bd70 pop {r4, r5, r6, pc}
- LWIP_ERROR("tcp_poll: invalid pcb", pcb != NULL, return);
- 800d508: 4b07 ldr r3, [pc, #28] @ (800d528 <tcp_poll+0x3c>)
- 800d50a: f640 023d movw r2, #2109 @ 0x83d
- 800d50e: 4907 ldr r1, [pc, #28] @ (800d52c <tcp_poll+0x40>)
- 800d510: 4807 ldr r0, [pc, #28] @ (800d530 <tcp_poll+0x44>)
- 800d512: f005 ff79 bl 8013408 <iprintf>
- 800d516: e7f6 b.n 800d506 <tcp_poll+0x1a>
- LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN);
- 800d518: 4b03 ldr r3, [pc, #12] @ (800d528 <tcp_poll+0x3c>)
- 800d51a: f640 023e movw r2, #2110 @ 0x83e
- 800d51e: 4905 ldr r1, [pc, #20] @ (800d534 <tcp_poll+0x48>)
- 800d520: 4803 ldr r0, [pc, #12] @ (800d530 <tcp_poll+0x44>)
- 800d522: f005 ff71 bl 8013408 <iprintf>
- 800d526: e7eb b.n 800d500 <tcp_poll+0x14>
- 800d528: 080165b0 .word 0x080165b0
- 800d52c: 080167a0 .word 0x080167a0
- 800d530: 080144e8 .word 0x080144e8
- 800d534: 080167b8 .word 0x080167b8
- 0800d538 <tcp_next_iss>:
- *
- * @return u32_t pseudo random sequence number
- */
- u32_t
- tcp_next_iss(struct tcp_pcb *pcb)
- {
- 800d538: b508 push {r3, lr}
- 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);
- 800d53a: b130 cbz r0, 800d54a <tcp_next_iss+0x12>
- LWIP_UNUSED_ARG(pcb);
- iss += tcp_ticks; /* XXX */
- 800d53c: 4b07 ldr r3, [pc, #28] @ (800d55c <tcp_next_iss+0x24>)
- 800d53e: 6818 ldr r0, [r3, #0]
- 800d540: 4a07 ldr r2, [pc, #28] @ (800d560 <tcp_next_iss+0x28>)
- 800d542: 6812 ldr r2, [r2, #0]
- 800d544: 4410 add r0, r2
- 800d546: 6018 str r0, [r3, #0]
- return iss;
- #endif /* LWIP_HOOK_TCP_ISN */
- }
- 800d548: bd08 pop {r3, pc}
- LWIP_ASSERT("tcp_next_iss: invalid pcb", pcb != NULL);
- 800d54a: 4b06 ldr r3, [pc, #24] @ (800d564 <tcp_next_iss+0x2c>)
- 800d54c: f640 02af movw r2, #2223 @ 0x8af
- 800d550: 4905 ldr r1, [pc, #20] @ (800d568 <tcp_next_iss+0x30>)
- 800d552: 4806 ldr r0, [pc, #24] @ (800d56c <tcp_next_iss+0x34>)
- 800d554: f005 ff58 bl 8013408 <iprintf>
- 800d558: e7f0 b.n 800d53c <tcp_next_iss+0x4>
- 800d55a: bf00 nop
- 800d55c: 24000028 .word 0x24000028
- 800d560: 24019be4 .word 0x24019be4
- 800d564: 080165b0 .word 0x080165b0
- 800d568: 080167d8 .word 0x080167d8
- 800d56c: 080144e8 .word 0x080144e8
- 0800d570 <tcp_eff_send_mss_netif>:
- * by calculating the minimum of TCP_MSS and the mtu (if set) of the target
- * netif (if not NULL).
- */
- u16_t
- tcp_eff_send_mss_netif(u16_t sendmss, struct netif *outif, const ip_addr_t *dest)
- {
- 800d570: b538 push {r3, r4, r5, lr}
- 800d572: 4605 mov r5, r0
- 800d574: 460c mov r4, r1
- 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);
- 800d576: b15a cbz r2, 800d590 <tcp_eff_send_mss_netif+0x20>
- else
- #endif /* LWIP_IPV4 */
- #endif /* LWIP_IPV6 */
- #if LWIP_IPV4
- {
- if (outif == NULL) {
- 800d578: b144 cbz r4, 800d58c <tcp_eff_send_mss_netif+0x1c>
- return sendmss;
- }
- mtu = outif->mtu;
- 800d57a: 8d23 ldrh r3, [r4, #40] @ 0x28
- }
- #endif /* LWIP_IPV4 */
- if (mtu != 0) {
- 800d57c: b133 cbz r3, 800d58c <tcp_eff_send_mss_netif+0x1c>
- #if LWIP_IPV4
- {
- offset = IP_HLEN + TCP_HLEN;
- }
- #endif /* LWIP_IPV4 */
- mss_s = (mtu > offset) ? (u16_t)(mtu - offset) : 0;
- 800d57e: 2b28 cmp r3, #40 @ 0x28
- 800d580: d90e bls.n 800d5a0 <tcp_eff_send_mss_netif+0x30>
- 800d582: 3b28 subs r3, #40 @ 0x28
- 800d584: b29b uxth r3, r3
- /* 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);
- 800d586: 429d cmp r5, r3
- 800d588: bf28 it cs
- 800d58a: 461d movcs r5, r3
- }
- return sendmss;
- }
- 800d58c: 4628 mov r0, r5
- 800d58e: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("tcp_eff_send_mss_netif: invalid dst_ip", dest != NULL);
- 800d590: 4b04 ldr r3, [pc, #16] @ (800d5a4 <tcp_eff_send_mss_netif+0x34>)
- 800d592: f640 02c5 movw r2, #2245 @ 0x8c5
- 800d596: 4904 ldr r1, [pc, #16] @ (800d5a8 <tcp_eff_send_mss_netif+0x38>)
- 800d598: 4804 ldr r0, [pc, #16] @ (800d5ac <tcp_eff_send_mss_netif+0x3c>)
- 800d59a: f005 ff35 bl 8013408 <iprintf>
- 800d59e: e7eb b.n 800d578 <tcp_eff_send_mss_netif+0x8>
- mss_s = (mtu > offset) ? (u16_t)(mtu - offset) : 0;
- 800d5a0: 2300 movs r3, #0
- 800d5a2: e7f0 b.n 800d586 <tcp_eff_send_mss_netif+0x16>
- 800d5a4: 080165b0 .word 0x080165b0
- 800d5a8: 080167f4 .word 0x080167f4
- 800d5ac: 080144e8 .word 0x080144e8
- 0800d5b0 <tcp_connect>:
- {
- 800d5b0: b5f8 push {r3, r4, r5, r6, r7, lr}
- 800d5b2: 4604 mov r4, r0
- 800d5b4: 460d mov r5, r1
- 800d5b6: 4616 mov r6, r2
- 800d5b8: 461f mov r7, r3
- LWIP_ASSERT_CORE_LOCKED();
- 800d5ba: f7f6 faa7 bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("tcp_connect: invalid pcb", pcb != NULL, return ERR_ARG);
- 800d5be: 2c00 cmp r4, #0
- 800d5c0: d04e beq.n 800d660 <tcp_connect+0xb0>
- LWIP_ERROR("tcp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
- 800d5c2: 2d00 cmp r5, #0
- 800d5c4: d056 beq.n 800d674 <tcp_connect+0xc4>
- LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN);
- 800d5c6: 7d23 ldrb r3, [r4, #20]
- 800d5c8: 2b00 cmp r3, #0
- 800d5ca: d15d bne.n 800d688 <tcp_connect+0xd8>
- ip_addr_set(&pcb->remote_ip, ipaddr);
- 800d5cc: 682b ldr r3, [r5, #0]
- 800d5ce: 6063 str r3, [r4, #4]
- pcb->remote_port = port;
- 800d5d0: 8326 strh r6, [r4, #24]
- if (pcb->netif_idx != NETIF_NO_INDEX) {
- 800d5d2: 7a20 ldrb r0, [r4, #8]
- 800d5d4: 2800 cmp r0, #0
- 800d5d6: d061 beq.n 800d69c <tcp_connect+0xec>
- netif = netif_get_by_index(pcb->netif_idx);
- 800d5d8: f7fe fab2 bl 800bb40 <netif_get_by_index>
- 800d5dc: 4605 mov r5, r0
- if (netif == NULL) {
- 800d5de: 2d00 cmp r5, #0
- 800d5e0: d077 beq.n 800d6d2 <tcp_connect+0x122>
- if (ip_addr_isany(&pcb->local_ip)) {
- 800d5e2: b10c cbz r4, 800d5e8 <tcp_connect+0x38>
- 800d5e4: 6823 ldr r3, [r4, #0]
- 800d5e6: b90b cbnz r3, 800d5ec <tcp_connect+0x3c>
- ip_addr_copy(pcb->local_ip, *local_ip);
- 800d5e8: 686b ldr r3, [r5, #4]
- 800d5ea: 6023 str r3, [r4, #0]
- old_local_port = pcb->local_port;
- 800d5ec: 8ae6 ldrh r6, [r4, #22]
- if (pcb->local_port == 0) {
- 800d5ee: b926 cbnz r6, 800d5fa <tcp_connect+0x4a>
- pcb->local_port = tcp_new_port();
- 800d5f0: f7ff fd52 bl 800d098 <tcp_new_port>
- 800d5f4: 82e0 strh r0, [r4, #22]
- if (pcb->local_port == 0) {
- 800d5f6: 2800 cmp r0, #0
- 800d5f8: d06e beq.n 800d6d8 <tcp_connect+0x128>
- iss = tcp_next_iss(pcb);
- 800d5fa: 4620 mov r0, r4
- 800d5fc: f7ff ff9c bl 800d538 <tcp_next_iss>
- pcb->rcv_nxt = 0;
- 800d600: 2100 movs r1, #0
- 800d602: 6261 str r1, [r4, #36] @ 0x24
- pcb->snd_nxt = iss;
- 800d604: 6520 str r0, [r4, #80] @ 0x50
- pcb->lastack = iss - 1;
- 800d606: 3801 subs r0, #1
- 800d608: 6460 str r0, [r4, #68] @ 0x44
- pcb->snd_wl2 = iss - 1;
- 800d60a: 65a0 str r0, [r4, #88] @ 0x58
- pcb->snd_lbb = iss - 1;
- 800d60c: 65e0 str r0, [r4, #92] @ 0x5c
- pcb->rcv_wnd = pcb->rcv_ann_wnd = TCPWND_MIN16(TCP_WND);
- 800d60e: f241 63d0 movw r3, #5840 @ 0x16d0
- 800d612: 8563 strh r3, [r4, #42] @ 0x2a
- 800d614: 8523 strh r3, [r4, #40] @ 0x28
- pcb->rcv_ann_right_edge = pcb->rcv_nxt;
- 800d616: 62e1 str r1, [r4, #44] @ 0x2c
- pcb->snd_wnd = TCP_WND;
- 800d618: f8a4 3060 strh.w r3, [r4, #96] @ 0x60
- pcb->mss = INITIAL_MSS;
- 800d61c: f44f 7006 mov.w r0, #536 @ 0x218
- 800d620: 8660 strh r0, [r4, #50] @ 0x32
- pcb->mss = tcp_eff_send_mss_netif(pcb->mss, netif, &pcb->remote_ip);
- 800d622: 1d22 adds r2, r4, #4
- 800d624: 4629 mov r1, r5
- 800d626: f7ff ffa3 bl 800d570 <tcp_eff_send_mss_netif>
- 800d62a: 8660 strh r0, [r4, #50] @ 0x32
- pcb->cwnd = 1;
- 800d62c: 2301 movs r3, #1
- 800d62e: f8a4 3048 strh.w r3, [r4, #72] @ 0x48
- pcb->connected = connected;
- 800d632: f8c4 7088 str.w r7, [r4, #136] @ 0x88
- ret = tcp_enqueue_flags(pcb, TCP_SYN);
- 800d636: 2102 movs r1, #2
- 800d638: 4620 mov r0, r4
- 800d63a: f003 f9dd bl 80109f8 <tcp_enqueue_flags>
- if (ret == ERR_OK) {
- 800d63e: 4605 mov r5, r0
- 800d640: 2800 cmp r0, #0
- 800d642: d144 bne.n 800d6ce <tcp_connect+0x11e>
- pcb->state = SYN_SENT;
- 800d644: 2302 movs r3, #2
- 800d646: 7523 strb r3, [r4, #20]
- if (old_local_port != 0) {
- 800d648: 2e00 cmp r6, #0
- 800d64a: d034 beq.n 800d6b6 <tcp_connect+0x106>
- TCP_RMV(&tcp_bound_pcbs, pcb);
- 800d64c: 4b24 ldr r3, [pc, #144] @ (800d6e0 <tcp_connect+0x130>)
- 800d64e: 681b ldr r3, [r3, #0]
- 800d650: 42a3 cmp r3, r4
- 800d652: d028 beq.n 800d6a6 <tcp_connect+0xf6>
- 800d654: b36b cbz r3, 800d6b2 <tcp_connect+0x102>
- 800d656: 68da ldr r2, [r3, #12]
- 800d658: 42a2 cmp r2, r4
- 800d65a: d028 beq.n 800d6ae <tcp_connect+0xfe>
- 800d65c: 4613 mov r3, r2
- 800d65e: e7f9 b.n 800d654 <tcp_connect+0xa4>
- LWIP_ERROR("tcp_connect: invalid pcb", pcb != NULL, return ERR_ARG);
- 800d660: 4b20 ldr r3, [pc, #128] @ (800d6e4 <tcp_connect+0x134>)
- 800d662: f240 4235 movw r2, #1077 @ 0x435
- 800d666: 4920 ldr r1, [pc, #128] @ (800d6e8 <tcp_connect+0x138>)
- 800d668: 4820 ldr r0, [pc, #128] @ (800d6ec <tcp_connect+0x13c>)
- 800d66a: f005 fecd bl 8013408 <iprintf>
- 800d66e: f06f 050f mvn.w r5, #15
- 800d672: e02c b.n 800d6ce <tcp_connect+0x11e>
- LWIP_ERROR("tcp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
- 800d674: 4b1b ldr r3, [pc, #108] @ (800d6e4 <tcp_connect+0x134>)
- 800d676: f240 4236 movw r2, #1078 @ 0x436
- 800d67a: 491d ldr r1, [pc, #116] @ (800d6f0 <tcp_connect+0x140>)
- 800d67c: 481b ldr r0, [pc, #108] @ (800d6ec <tcp_connect+0x13c>)
- 800d67e: f005 fec3 bl 8013408 <iprintf>
- 800d682: f06f 050f mvn.w r5, #15
- 800d686: e022 b.n 800d6ce <tcp_connect+0x11e>
- LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN);
- 800d688: 4b16 ldr r3, [pc, #88] @ (800d6e4 <tcp_connect+0x134>)
- 800d68a: f44f 6287 mov.w r2, #1080 @ 0x438
- 800d68e: 4919 ldr r1, [pc, #100] @ (800d6f4 <tcp_connect+0x144>)
- 800d690: 4816 ldr r0, [pc, #88] @ (800d6ec <tcp_connect+0x13c>)
- 800d692: f005 feb9 bl 8013408 <iprintf>
- 800d696: f06f 0509 mvn.w r5, #9
- 800d69a: e018 b.n 800d6ce <tcp_connect+0x11e>
- netif = ip_route(&pcb->local_ip, &pcb->remote_ip);
- 800d69c: 1d20 adds r0, r4, #4
- 800d69e: f7fc fd2f bl 800a100 <ip4_route>
- 800d6a2: 4605 mov r5, r0
- 800d6a4: e79b b.n 800d5de <tcp_connect+0x2e>
- TCP_RMV(&tcp_bound_pcbs, pcb);
- 800d6a6: 68da ldr r2, [r3, #12]
- 800d6a8: 4b0d ldr r3, [pc, #52] @ (800d6e0 <tcp_connect+0x130>)
- 800d6aa: 601a str r2, [r3, #0]
- 800d6ac: e001 b.n 800d6b2 <tcp_connect+0x102>
- 800d6ae: 68e2 ldr r2, [r4, #12]
- 800d6b0: 60da str r2, [r3, #12]
- 800d6b2: 2300 movs r3, #0
- 800d6b4: 60e3 str r3, [r4, #12]
- TCP_REG_ACTIVE(pcb);
- 800d6b6: 4b10 ldr r3, [pc, #64] @ (800d6f8 <tcp_connect+0x148>)
- 800d6b8: 681a ldr r2, [r3, #0]
- 800d6ba: 60e2 str r2, [r4, #12]
- 800d6bc: 601c str r4, [r3, #0]
- 800d6be: f003 ffb7 bl 8011630 <tcp_timer_needed>
- 800d6c2: 4b0e ldr r3, [pc, #56] @ (800d6fc <tcp_connect+0x14c>)
- 800d6c4: 2201 movs r2, #1
- 800d6c6: 701a strb r2, [r3, #0]
- tcp_output(pcb);
- 800d6c8: 4620 mov r0, r4
- 800d6ca: f003 fbcb bl 8010e64 <tcp_output>
- }
- 800d6ce: 4628 mov r0, r5
- 800d6d0: bdf8 pop {r3, r4, r5, r6, r7, pc}
- return ERR_RTE;
- 800d6d2: f06f 0503 mvn.w r5, #3
- 800d6d6: e7fa b.n 800d6ce <tcp_connect+0x11e>
- return ERR_BUF;
- 800d6d8: f06f 0501 mvn.w r5, #1
- 800d6dc: e7f7 b.n 800d6ce <tcp_connect+0x11e>
- 800d6de: bf00 nop
- 800d6e0: 24019be0 .word 0x24019be0
- 800d6e4: 080165b0 .word 0x080165b0
- 800d6e8: 0801681c .word 0x0801681c
- 800d6ec: 080144e8 .word 0x080144e8
- 800d6f0: 08016838 .word 0x08016838
- 800d6f4: 08016854 .word 0x08016854
- 800d6f8: 24019bd8 .word 0x24019bd8
- 800d6fc: 24019bd2 .word 0x24019bd2
- 0800d700 <tcp_free_ooseq>:
- #if TCP_QUEUE_OOSEQ
- /* Free all ooseq pbufs (and possibly reset SACK state) */
- void
- tcp_free_ooseq(struct tcp_pcb *pcb)
- {
- 800d700: b510 push {r4, lr}
- 800d702: 4604 mov r4, r0
- if (pcb->ooseq) {
- 800d704: 6f40 ldr r0, [r0, #116] @ 0x74
- 800d706: b118 cbz r0, 800d710 <tcp_free_ooseq+0x10>
- tcp_segs_free(pcb->ooseq);
- 800d708: f7ff fe5d bl 800d3c6 <tcp_segs_free>
- pcb->ooseq = NULL;
- 800d70c: 2300 movs r3, #0
- 800d70e: 6763 str r3, [r4, #116] @ 0x74
- #if LWIP_TCP_SACK_OUT
- memset(pcb->rcv_sacks, 0, sizeof(pcb->rcv_sacks));
- #endif /* LWIP_TCP_SACK_OUT */
- }
- }
- 800d710: bd10 pop {r4, pc}
- ...
- 0800d714 <tcp_pcb_purge>:
- {
- 800d714: b510 push {r4, lr}
- LWIP_ERROR("tcp_pcb_purge: invalid pcb", pcb != NULL, return);
- 800d716: b308 cbz r0, 800d75c <tcp_pcb_purge+0x48>
- 800d718: 4604 mov r4, r0
- if (pcb->state != CLOSED &&
- 800d71a: 7d03 ldrb r3, [r0, #20]
- 800d71c: 2b00 cmp r3, #0
- 800d71e: bf18 it ne
- 800d720: 2b0a cmpne r3, #10
- 800d722: d01a beq.n 800d75a <tcp_pcb_purge+0x46>
- pcb->state != TIME_WAIT &&
- 800d724: 2b01 cmp r3, #1
- 800d726: d018 beq.n 800d75a <tcp_pcb_purge+0x46>
- if (pcb->refused_data != NULL) {
- 800d728: 6f80 ldr r0, [r0, #120] @ 0x78
- 800d72a: b118 cbz r0, 800d734 <tcp_pcb_purge+0x20>
- pbuf_free(pcb->refused_data);
- 800d72c: f7fe fb38 bl 800bda0 <pbuf_free>
- pcb->refused_data = NULL;
- 800d730: 2300 movs r3, #0
- 800d732: 67a3 str r3, [r4, #120] @ 0x78
- if (pcb->ooseq != NULL) {
- 800d734: 6f63 ldr r3, [r4, #116] @ 0x74
- 800d736: b113 cbz r3, 800d73e <tcp_pcb_purge+0x2a>
- tcp_free_ooseq(pcb);
- 800d738: 4620 mov r0, r4
- 800d73a: f7ff ffe1 bl 800d700 <tcp_free_ooseq>
- pcb->rtime = -1;
- 800d73e: f64f 73ff movw r3, #65535 @ 0xffff
- 800d742: 8623 strh r3, [r4, #48] @ 0x30
- tcp_segs_free(pcb->unsent);
- 800d744: 6ee0 ldr r0, [r4, #108] @ 0x6c
- 800d746: f7ff fe3e bl 800d3c6 <tcp_segs_free>
- tcp_segs_free(pcb->unacked);
- 800d74a: 6f20 ldr r0, [r4, #112] @ 0x70
- 800d74c: f7ff fe3b bl 800d3c6 <tcp_segs_free>
- pcb->unacked = pcb->unsent = NULL;
- 800d750: 2300 movs r3, #0
- 800d752: 66e3 str r3, [r4, #108] @ 0x6c
- 800d754: 6723 str r3, [r4, #112] @ 0x70
- pcb->unsent_oversize = 0;
- 800d756: f8a4 3068 strh.w r3, [r4, #104] @ 0x68
- }
- 800d75a: bd10 pop {r4, pc}
- LWIP_ERROR("tcp_pcb_purge: invalid pcb", pcb != NULL, return);
- 800d75c: 4b03 ldr r3, [pc, #12] @ (800d76c <tcp_pcb_purge+0x58>)
- 800d75e: f640 0251 movw r2, #2129 @ 0x851
- 800d762: 4903 ldr r1, [pc, #12] @ (800d770 <tcp_pcb_purge+0x5c>)
- 800d764: 4803 ldr r0, [pc, #12] @ (800d774 <tcp_pcb_purge+0x60>)
- 800d766: f005 fe4f bl 8013408 <iprintf>
- 800d76a: e7f6 b.n 800d75a <tcp_pcb_purge+0x46>
- 800d76c: 080165b0 .word 0x080165b0
- 800d770: 08016884 .word 0x08016884
- 800d774: 080144e8 .word 0x080144e8
- 0800d778 <tcp_pcb_remove>:
- {
- 800d778: b538 push {r3, r4, r5, lr}
- 800d77a: 4605 mov r5, r0
- LWIP_ASSERT("tcp_pcb_remove: invalid pcb", pcb != NULL);
- 800d77c: 460c mov r4, r1
- 800d77e: b149 cbz r1, 800d794 <tcp_pcb_remove+0x1c>
- LWIP_ASSERT("tcp_pcb_remove: invalid pcblist", pcblist != NULL);
- 800d780: b185 cbz r5, 800d7a4 <tcp_pcb_remove+0x2c>
- TCP_RMV(pcblist, pcb);
- 800d782: 682b ldr r3, [r5, #0]
- 800d784: 42a3 cmp r3, r4
- 800d786: d015 beq.n 800d7b4 <tcp_pcb_remove+0x3c>
- 800d788: b1cb cbz r3, 800d7be <tcp_pcb_remove+0x46>
- 800d78a: 68da ldr r2, [r3, #12]
- 800d78c: 42a2 cmp r2, r4
- 800d78e: d014 beq.n 800d7ba <tcp_pcb_remove+0x42>
- 800d790: 4613 mov r3, r2
- 800d792: e7f9 b.n 800d788 <tcp_pcb_remove+0x10>
- LWIP_ASSERT("tcp_pcb_remove: invalid pcb", pcb != NULL);
- 800d794: 4b25 ldr r3, [pc, #148] @ (800d82c <tcp_pcb_remove+0xb4>)
- 800d796: f640 0283 movw r2, #2179 @ 0x883
- 800d79a: 4925 ldr r1, [pc, #148] @ (800d830 <tcp_pcb_remove+0xb8>)
- 800d79c: 4825 ldr r0, [pc, #148] @ (800d834 <tcp_pcb_remove+0xbc>)
- 800d79e: f005 fe33 bl 8013408 <iprintf>
- 800d7a2: e7ed b.n 800d780 <tcp_pcb_remove+0x8>
- LWIP_ASSERT("tcp_pcb_remove: invalid pcblist", pcblist != NULL);
- 800d7a4: 4b21 ldr r3, [pc, #132] @ (800d82c <tcp_pcb_remove+0xb4>)
- 800d7a6: f640 0284 movw r2, #2180 @ 0x884
- 800d7aa: 4923 ldr r1, [pc, #140] @ (800d838 <tcp_pcb_remove+0xc0>)
- 800d7ac: 4821 ldr r0, [pc, #132] @ (800d834 <tcp_pcb_remove+0xbc>)
- 800d7ae: f005 fe2b bl 8013408 <iprintf>
- 800d7b2: e7e6 b.n 800d782 <tcp_pcb_remove+0xa>
- TCP_RMV(pcblist, pcb);
- 800d7b4: 68db ldr r3, [r3, #12]
- 800d7b6: 602b str r3, [r5, #0]
- 800d7b8: e001 b.n 800d7be <tcp_pcb_remove+0x46>
- 800d7ba: 68e2 ldr r2, [r4, #12]
- 800d7bc: 60da str r2, [r3, #12]
- 800d7be: 2300 movs r3, #0
- 800d7c0: 60e3 str r3, [r4, #12]
- tcp_pcb_purge(pcb);
- 800d7c2: 4620 mov r0, r4
- 800d7c4: f7ff ffa6 bl 800d714 <tcp_pcb_purge>
- if ((pcb->state != TIME_WAIT) &&
- 800d7c8: 7d23 ldrb r3, [r4, #20]
- 800d7ca: 2b0a cmp r3, #10
- 800d7cc: bf18 it ne
- 800d7ce: 2b01 cmpne r3, #1
- 800d7d0: d003 beq.n 800d7da <tcp_pcb_remove+0x62>
- (pcb->flags & TF_ACK_DELAY)) {
- 800d7d2: 8b63 ldrh r3, [r4, #26]
- (pcb->state != LISTEN) &&
- 800d7d4: f013 0f01 tst.w r3, #1
- 800d7d8: d121 bne.n 800d81e <tcp_pcb_remove+0xa6>
- if (pcb->state != LISTEN) {
- 800d7da: 7d23 ldrb r3, [r4, #20]
- 800d7dc: 2b01 cmp r3, #1
- 800d7de: d01a beq.n 800d816 <tcp_pcb_remove+0x9e>
- LWIP_ASSERT("unsent segments leaking", pcb->unsent == NULL);
- 800d7e0: 6ee3 ldr r3, [r4, #108] @ 0x6c
- 800d7e2: b133 cbz r3, 800d7f2 <tcp_pcb_remove+0x7a>
- 800d7e4: 4b11 ldr r3, [pc, #68] @ (800d82c <tcp_pcb_remove+0xb4>)
- 800d7e6: f640 0293 movw r2, #2195 @ 0x893
- 800d7ea: 4914 ldr r1, [pc, #80] @ (800d83c <tcp_pcb_remove+0xc4>)
- 800d7ec: 4811 ldr r0, [pc, #68] @ (800d834 <tcp_pcb_remove+0xbc>)
- 800d7ee: f005 fe0b bl 8013408 <iprintf>
- LWIP_ASSERT("unacked segments leaking", pcb->unacked == NULL);
- 800d7f2: 6f23 ldr r3, [r4, #112] @ 0x70
- 800d7f4: b133 cbz r3, 800d804 <tcp_pcb_remove+0x8c>
- 800d7f6: 4b0d ldr r3, [pc, #52] @ (800d82c <tcp_pcb_remove+0xb4>)
- 800d7f8: f640 0294 movw r2, #2196 @ 0x894
- 800d7fc: 4910 ldr r1, [pc, #64] @ (800d840 <tcp_pcb_remove+0xc8>)
- 800d7fe: 480d ldr r0, [pc, #52] @ (800d834 <tcp_pcb_remove+0xbc>)
- 800d800: f005 fe02 bl 8013408 <iprintf>
- LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL);
- 800d804: 6f63 ldr r3, [r4, #116] @ 0x74
- 800d806: b133 cbz r3, 800d816 <tcp_pcb_remove+0x9e>
- 800d808: 4b08 ldr r3, [pc, #32] @ (800d82c <tcp_pcb_remove+0xb4>)
- 800d80a: f640 0296 movw r2, #2198 @ 0x896
- 800d80e: 490d ldr r1, [pc, #52] @ (800d844 <tcp_pcb_remove+0xcc>)
- 800d810: 4808 ldr r0, [pc, #32] @ (800d834 <tcp_pcb_remove+0xbc>)
- 800d812: f005 fdf9 bl 8013408 <iprintf>
- pcb->state = CLOSED;
- 800d816: 2300 movs r3, #0
- 800d818: 7523 strb r3, [r4, #20]
- pcb->local_port = 0;
- 800d81a: 82e3 strh r3, [r4, #22]
- }
- 800d81c: bd38 pop {r3, r4, r5, pc}
- tcp_ack_now(pcb);
- 800d81e: f043 0302 orr.w r3, r3, #2
- 800d822: 8363 strh r3, [r4, #26]
- tcp_output(pcb);
- 800d824: 4620 mov r0, r4
- 800d826: f003 fb1d bl 8010e64 <tcp_output>
- 800d82a: e7d6 b.n 800d7da <tcp_pcb_remove+0x62>
- 800d82c: 080165b0 .word 0x080165b0
- 800d830: 080168a0 .word 0x080168a0
- 800d834: 080144e8 .word 0x080144e8
- 800d838: 080168bc .word 0x080168bc
- 800d83c: 080168dc .word 0x080168dc
- 800d840: 080168f4 .word 0x080168f4
- 800d844: 08016910 .word 0x08016910
- 0800d848 <tcp_abandon>:
- {
- 800d848: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
- 800d84c: b084 sub sp, #16
- 800d84e: 4604 mov r4, r0
- 800d850: 460d mov r5, r1
- LWIP_ASSERT_CORE_LOCKED();
- 800d852: f7f6 f95b bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("tcp_abandon: invalid pcb", pcb != NULL, return);
- 800d856: b1ec cbz r4, 800d894 <tcp_abandon+0x4c>
- LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs",
- 800d858: 7d23 ldrb r3, [r4, #20]
- 800d85a: 2b01 cmp r3, #1
- 800d85c: d022 beq.n 800d8a4 <tcp_abandon+0x5c>
- if (pcb->state == TIME_WAIT) {
- 800d85e: 7d23 ldrb r3, [r4, #20]
- 800d860: 2b0a cmp r3, #10
- 800d862: d027 beq.n 800d8b4 <tcp_abandon+0x6c>
- seqno = pcb->snd_nxt;
- 800d864: f8d4 8050 ldr.w r8, [r4, #80] @ 0x50
- ackno = pcb->rcv_nxt;
- 800d868: f8d4 9024 ldr.w r9, [r4, #36] @ 0x24
- errf = pcb->errf;
- 800d86c: f8d4 6090 ldr.w r6, [r4, #144] @ 0x90
- errf_arg = pcb->callback_arg;
- 800d870: 6927 ldr r7, [r4, #16]
- if (pcb->state == CLOSED) {
- 800d872: 2b00 cmp r3, #0
- 800d874: d147 bne.n 800d906 <tcp_abandon+0xbe>
- if (pcb->local_port != 0) {
- 800d876: f8b4 a016 ldrh.w sl, [r4, #22]
- 800d87a: f1ba 0f00 cmp.w sl, #0
- 800d87e: d04c beq.n 800d91a <tcp_abandon+0xd2>
- TCP_RMV(&tcp_bound_pcbs, pcb);
- 800d880: 4b2d ldr r3, [pc, #180] @ (800d938 <tcp_abandon+0xf0>)
- 800d882: 681b ldr r3, [r3, #0]
- 800d884: 42a3 cmp r3, r4
- 800d886: d01d beq.n 800d8c4 <tcp_abandon+0x7c>
- 800d888: b313 cbz r3, 800d8d0 <tcp_abandon+0x88>
- 800d88a: 68da ldr r2, [r3, #12]
- 800d88c: 42a2 cmp r2, r4
- 800d88e: d01d beq.n 800d8cc <tcp_abandon+0x84>
- 800d890: 4613 mov r3, r2
- 800d892: e7f9 b.n 800d888 <tcp_abandon+0x40>
- LWIP_ERROR("tcp_abandon: invalid pcb", pcb != NULL, return);
- 800d894: 4b29 ldr r3, [pc, #164] @ (800d93c <tcp_abandon+0xf4>)
- 800d896: f240 223d movw r2, #573 @ 0x23d
- 800d89a: 4929 ldr r1, [pc, #164] @ (800d940 <tcp_abandon+0xf8>)
- 800d89c: 4829 ldr r0, [pc, #164] @ (800d944 <tcp_abandon+0xfc>)
- 800d89e: f005 fdb3 bl 8013408 <iprintf>
- 800d8a2: e02d b.n 800d900 <tcp_abandon+0xb8>
- LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs",
- 800d8a4: 4b25 ldr r3, [pc, #148] @ (800d93c <tcp_abandon+0xf4>)
- 800d8a6: f44f 7210 mov.w r2, #576 @ 0x240
- 800d8aa: 4927 ldr r1, [pc, #156] @ (800d948 <tcp_abandon+0x100>)
- 800d8ac: 4825 ldr r0, [pc, #148] @ (800d944 <tcp_abandon+0xfc>)
- 800d8ae: f005 fdab bl 8013408 <iprintf>
- 800d8b2: e7d4 b.n 800d85e <tcp_abandon+0x16>
- tcp_pcb_remove(&tcp_tw_pcbs, pcb);
- 800d8b4: 4621 mov r1, r4
- 800d8b6: 4825 ldr r0, [pc, #148] @ (800d94c <tcp_abandon+0x104>)
- 800d8b8: f7ff ff5e bl 800d778 <tcp_pcb_remove>
- tcp_free(pcb);
- 800d8bc: 4620 mov r0, r4
- 800d8be: f7ff fce1 bl 800d284 <tcp_free>
- 800d8c2: e01d b.n 800d900 <tcp_abandon+0xb8>
- TCP_RMV(&tcp_bound_pcbs, pcb);
- 800d8c4: 68da ldr r2, [r3, #12]
- 800d8c6: 4b1c ldr r3, [pc, #112] @ (800d938 <tcp_abandon+0xf0>)
- 800d8c8: 601a str r2, [r3, #0]
- 800d8ca: e001 b.n 800d8d0 <tcp_abandon+0x88>
- 800d8cc: 68e2 ldr r2, [r4, #12]
- 800d8ce: 60da str r2, [r3, #12]
- 800d8d0: 2500 movs r5, #0
- 800d8d2: 60e5 str r5, [r4, #12]
- u16_t local_port = 0;
- 800d8d4: 46aa mov sl, r5
- if (pcb->unacked != NULL) {
- 800d8d6: 6f20 ldr r0, [r4, #112] @ 0x70
- 800d8d8: b108 cbz r0, 800d8de <tcp_abandon+0x96>
- tcp_segs_free(pcb->unacked);
- 800d8da: f7ff fd74 bl 800d3c6 <tcp_segs_free>
- if (pcb->unsent != NULL) {
- 800d8de: 6ee0 ldr r0, [r4, #108] @ 0x6c
- 800d8e0: b108 cbz r0, 800d8e6 <tcp_abandon+0x9e>
- tcp_segs_free(pcb->unsent);
- 800d8e2: f7ff fd70 bl 800d3c6 <tcp_segs_free>
- if (pcb->ooseq != NULL) {
- 800d8e6: 6f60 ldr r0, [r4, #116] @ 0x74
- 800d8e8: b108 cbz r0, 800d8ee <tcp_abandon+0xa6>
- tcp_segs_free(pcb->ooseq);
- 800d8ea: f7ff fd6c bl 800d3c6 <tcp_segs_free>
- if (send_rst) {
- 800d8ee: b9b5 cbnz r5, 800d91e <tcp_abandon+0xd6>
- tcp_free(pcb);
- 800d8f0: 4620 mov r0, r4
- 800d8f2: f7ff fcc7 bl 800d284 <tcp_free>
- TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT);
- 800d8f6: b11e cbz r6, 800d900 <tcp_abandon+0xb8>
- 800d8f8: f06f 010c mvn.w r1, #12
- 800d8fc: 4638 mov r0, r7
- 800d8fe: 47b0 blx r6
- }
- 800d900: b004 add sp, #16
- 800d902: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
- local_port = pcb->local_port;
- 800d906: f8b4 a016 ldrh.w sl, [r4, #22]
- TCP_PCB_REMOVE_ACTIVE(pcb);
- 800d90a: 4621 mov r1, r4
- 800d90c: 4810 ldr r0, [pc, #64] @ (800d950 <tcp_abandon+0x108>)
- 800d90e: f7ff ff33 bl 800d778 <tcp_pcb_remove>
- 800d912: 4b10 ldr r3, [pc, #64] @ (800d954 <tcp_abandon+0x10c>)
- 800d914: 2201 movs r2, #1
- 800d916: 701a strb r2, [r3, #0]
- 800d918: e7dd b.n 800d8d6 <tcp_abandon+0x8e>
- int send_rst = 0;
- 800d91a: 2500 movs r5, #0
- 800d91c: e7db b.n 800d8d6 <tcp_abandon+0x8e>
- tcp_rst(pcb, seqno, ackno, &pcb->local_ip, &pcb->remote_ip, local_port, pcb->remote_port);
- 800d91e: 1d23 adds r3, r4, #4
- 800d920: 8b22 ldrh r2, [r4, #24]
- 800d922: 9202 str r2, [sp, #8]
- 800d924: f8cd a004 str.w sl, [sp, #4]
- 800d928: 9300 str r3, [sp, #0]
- 800d92a: 4623 mov r3, r4
- 800d92c: 464a mov r2, r9
- 800d92e: 4641 mov r1, r8
- 800d930: 4620 mov r0, r4
- 800d932: f003 fa15 bl 8010d60 <tcp_rst>
- 800d936: e7db b.n 800d8f0 <tcp_abandon+0xa8>
- 800d938: 24019be0 .word 0x24019be0
- 800d93c: 080165b0 .word 0x080165b0
- 800d940: 08016928 .word 0x08016928
- 800d944: 080144e8 .word 0x080144e8
- 800d948: 08016944 .word 0x08016944
- 800d94c: 24019bd4 .word 0x24019bd4
- 800d950: 24019bd8 .word 0x24019bd8
- 800d954: 24019bd2 .word 0x24019bd2
- 0800d958 <tcp_abort>:
- {
- 800d958: b508 push {r3, lr}
- tcp_abandon(pcb, 1);
- 800d95a: 2101 movs r1, #1
- 800d95c: f7ff ff74 bl 800d848 <tcp_abandon>
- }
- 800d960: bd08 pop {r3, pc}
- ...
- 0800d964 <tcp_kill_timewait>:
- {
- 800d964: b508 push {r3, lr}
- for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
- 800d966: 4b0a ldr r3, [pc, #40] @ (800d990 <tcp_kill_timewait+0x2c>)
- 800d968: 681b ldr r3, [r3, #0]
- inactivity = 0;
- 800d96a: f04f 0c00 mov.w ip, #0
- inactive = NULL;
- 800d96e: 4660 mov r0, ip
- for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
- 800d970: e000 b.n 800d974 <tcp_kill_timewait+0x10>
- 800d972: 68db ldr r3, [r3, #12]
- 800d974: b143 cbz r3, 800d988 <tcp_kill_timewait+0x24>
- if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) {
- 800d976: 6a19 ldr r1, [r3, #32]
- 800d978: 4a06 ldr r2, [pc, #24] @ (800d994 <tcp_kill_timewait+0x30>)
- 800d97a: 6812 ldr r2, [r2, #0]
- 800d97c: 1a52 subs r2, r2, r1
- 800d97e: 4562 cmp r2, ip
- 800d980: d3f7 bcc.n 800d972 <tcp_kill_timewait+0xe>
- inactivity = tcp_ticks - pcb->tmr;
- 800d982: 4694 mov ip, r2
- inactive = pcb;
- 800d984: 4618 mov r0, r3
- 800d986: e7f4 b.n 800d972 <tcp_kill_timewait+0xe>
- if (inactive != NULL) {
- 800d988: b108 cbz r0, 800d98e <tcp_kill_timewait+0x2a>
- tcp_abort(inactive);
- 800d98a: f7ff ffe5 bl 800d958 <tcp_abort>
- }
- 800d98e: bd08 pop {r3, pc}
- 800d990: 24019bd4 .word 0x24019bd4
- 800d994: 24019be4 .word 0x24019be4
- 0800d998 <tcp_kill_prio>:
- mprio = LWIP_MIN(TCP_PRIO_MAX, prio);
- 800d998: f010 0f80 tst.w r0, #128 @ 0x80
- 800d99c: d101 bne.n 800d9a2 <tcp_kill_prio+0xa>
- if (mprio == 0) {
- 800d99e: b908 cbnz r0, 800d9a4 <tcp_kill_prio+0xc>
- 800d9a0: 4770 bx lr
- mprio = LWIP_MIN(TCP_PRIO_MAX, prio);
- 800d9a2: 207f movs r0, #127 @ 0x7f
- {
- 800d9a4: b538 push {r3, r4, r5, lr}
- mprio--;
- 800d9a6: 3801 subs r0, #1
- 800d9a8: b2c2 uxtb r2, r0
- for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
- 800d9aa: 4b0f ldr r3, [pc, #60] @ (800d9e8 <tcp_kill_prio+0x50>)
- 800d9ac: 681b ldr r3, [r3, #0]
- inactivity = 0;
- 800d9ae: f04f 0c00 mov.w ip, #0
- inactive = NULL;
- 800d9b2: 4660 mov r0, ip
- for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
- 800d9b4: e007 b.n 800d9c6 <tcp_kill_prio+0x2e>
- inactivity = tcp_ticks - pcb->tmr;
- 800d9b6: 4a0d ldr r2, [pc, #52] @ (800d9ec <tcp_kill_prio+0x54>)
- 800d9b8: 6812 ldr r2, [r2, #0]
- 800d9ba: 6a18 ldr r0, [r3, #32]
- 800d9bc: eba2 0c00 sub.w ip, r2, r0
- mprio = pcb->prio;
- 800d9c0: 460a mov r2, r1
- inactive = pcb;
- 800d9c2: 4618 mov r0, r3
- for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
- 800d9c4: 68db ldr r3, [r3, #12]
- 800d9c6: b15b cbz r3, 800d9e0 <tcp_kill_prio+0x48>
- if ((pcb->prio < mprio) ||
- 800d9c8: 7d59 ldrb r1, [r3, #21]
- 800d9ca: 4291 cmp r1, r2
- 800d9cc: d3f3 bcc.n 800d9b6 <tcp_kill_prio+0x1e>
- 800d9ce: d1f9 bne.n 800d9c4 <tcp_kill_prio+0x2c>
- ((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) {
- 800d9d0: 4c06 ldr r4, [pc, #24] @ (800d9ec <tcp_kill_prio+0x54>)
- 800d9d2: 6824 ldr r4, [r4, #0]
- 800d9d4: 6a1d ldr r5, [r3, #32]
- 800d9d6: eba4 0e05 sub.w lr, r4, r5
- 800d9da: 45e6 cmp lr, ip
- 800d9dc: d3f2 bcc.n 800d9c4 <tcp_kill_prio+0x2c>
- 800d9de: e7ea b.n 800d9b6 <tcp_kill_prio+0x1e>
- if (inactive != NULL) {
- 800d9e0: b108 cbz r0, 800d9e6 <tcp_kill_prio+0x4e>
- tcp_abort(inactive);
- 800d9e2: f7ff ffb9 bl 800d958 <tcp_abort>
- }
- 800d9e6: bd38 pop {r3, r4, r5, pc}
- 800d9e8: 24019bd8 .word 0x24019bd8
- 800d9ec: 24019be4 .word 0x24019be4
- 0800d9f0 <tcp_netif_ip_addr_changed_pcblist>:
- {
- 800d9f0: b570 push {r4, r5, r6, lr}
- 800d9f2: 460c mov r4, r1
- LWIP_ASSERT("tcp_netif_ip_addr_changed_pcblist: invalid old_addr", old_addr != NULL);
- 800d9f4: 4605 mov r5, r0
- 800d9f6: b960 cbnz r0, 800da12 <tcp_netif_ip_addr_changed_pcblist+0x22>
- 800d9f8: 4b0a ldr r3, [pc, #40] @ (800da24 <tcp_netif_ip_addr_changed_pcblist+0x34>)
- 800d9fa: f44f 6210 mov.w r2, #2304 @ 0x900
- 800d9fe: 490a ldr r1, [pc, #40] @ (800da28 <tcp_netif_ip_addr_changed_pcblist+0x38>)
- 800da00: 480a ldr r0, [pc, #40] @ (800da2c <tcp_netif_ip_addr_changed_pcblist+0x3c>)
- 800da02: f005 fd01 bl 8013408 <iprintf>
- 800da06: e004 b.n 800da12 <tcp_netif_ip_addr_changed_pcblist+0x22>
- struct tcp_pcb *next = pcb->next;
- 800da08: 68e6 ldr r6, [r4, #12]
- tcp_abort(pcb);
- 800da0a: 4620 mov r0, r4
- 800da0c: f7ff ffa4 bl 800d958 <tcp_abort>
- pcb = next;
- 800da10: 4634 mov r4, r6
- while (pcb != NULL) {
- 800da12: b12c cbz r4, 800da20 <tcp_netif_ip_addr_changed_pcblist+0x30>
- if (ip_addr_cmp(&pcb->local_ip, old_addr)
- 800da14: 6822 ldr r2, [r4, #0]
- 800da16: 682b ldr r3, [r5, #0]
- 800da18: 429a cmp r2, r3
- 800da1a: d0f5 beq.n 800da08 <tcp_netif_ip_addr_changed_pcblist+0x18>
- pcb = pcb->next;
- 800da1c: 68e4 ldr r4, [r4, #12]
- 800da1e: e7f8 b.n 800da12 <tcp_netif_ip_addr_changed_pcblist+0x22>
- }
- 800da20: bd70 pop {r4, r5, r6, pc}
- 800da22: bf00 nop
- 800da24: 080165b0 .word 0x080165b0
- 800da28: 08016978 .word 0x08016978
- 800da2c: 080144e8 .word 0x080144e8
- 0800da30 <tcp_netif_ip_addr_changed>:
- if (!ip_addr_isany(old_addr)) {
- 800da30: b300 cbz r0, 800da74 <tcp_netif_ip_addr_changed+0x44>
- {
- 800da32: b538 push {r3, r4, r5, lr}
- 800da34: 460d mov r5, r1
- 800da36: 4604 mov r4, r0
- if (!ip_addr_isany(old_addr)) {
- 800da38: 6803 ldr r3, [r0, #0]
- 800da3a: b903 cbnz r3, 800da3e <tcp_netif_ip_addr_changed+0xe>
- }
- 800da3c: bd38 pop {r3, r4, r5, pc}
- tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs);
- 800da3e: 4b0e ldr r3, [pc, #56] @ (800da78 <tcp_netif_ip_addr_changed+0x48>)
- 800da40: 6819 ldr r1, [r3, #0]
- 800da42: f7ff ffd5 bl 800d9f0 <tcp_netif_ip_addr_changed_pcblist>
- tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_bound_pcbs);
- 800da46: 4b0d ldr r3, [pc, #52] @ (800da7c <tcp_netif_ip_addr_changed+0x4c>)
- 800da48: 6819 ldr r1, [r3, #0]
- 800da4a: 4620 mov r0, r4
- 800da4c: f7ff ffd0 bl 800d9f0 <tcp_netif_ip_addr_changed_pcblist>
- if (!ip_addr_isany(new_addr)) {
- 800da50: 2d00 cmp r5, #0
- 800da52: d0f3 beq.n 800da3c <tcp_netif_ip_addr_changed+0xc>
- 800da54: 682b ldr r3, [r5, #0]
- 800da56: 2b00 cmp r3, #0
- 800da58: d0f0 beq.n 800da3c <tcp_netif_ip_addr_changed+0xc>
- for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
- 800da5a: 4b09 ldr r3, [pc, #36] @ (800da80 <tcp_netif_ip_addr_changed+0x50>)
- 800da5c: 681b ldr r3, [r3, #0]
- 800da5e: e000 b.n 800da62 <tcp_netif_ip_addr_changed+0x32>
- 800da60: 68db ldr r3, [r3, #12]
- 800da62: 2b00 cmp r3, #0
- 800da64: d0ea beq.n 800da3c <tcp_netif_ip_addr_changed+0xc>
- if (ip_addr_cmp(&lpcb->local_ip, old_addr)) {
- 800da66: 6819 ldr r1, [r3, #0]
- 800da68: 6822 ldr r2, [r4, #0]
- 800da6a: 4291 cmp r1, r2
- 800da6c: d1f8 bne.n 800da60 <tcp_netif_ip_addr_changed+0x30>
- ip_addr_copy(lpcb->local_ip, *new_addr);
- 800da6e: 682a ldr r2, [r5, #0]
- 800da70: 601a str r2, [r3, #0]
- 800da72: e7f5 b.n 800da60 <tcp_netif_ip_addr_changed+0x30>
- 800da74: 4770 bx lr
- 800da76: bf00 nop
- 800da78: 24019bd8 .word 0x24019bd8
- 800da7c: 24019be0 .word 0x24019be0
- 800da80: 24019bdc .word 0x24019bdc
- 0800da84 <tcp_kill_state>:
- {
- 800da84: b538 push {r3, r4, r5, lr}
- 800da86: 4604 mov r4, r0
- LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK));
- 800da88: f1a0 0308 sub.w r3, r0, #8
- 800da8c: b2db uxtb r3, r3
- 800da8e: 2b01 cmp r3, #1
- 800da90: d804 bhi.n 800da9c <tcp_kill_state+0x18>
- for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
- 800da92: 4b10 ldr r3, [pc, #64] @ (800dad4 <tcp_kill_state+0x50>)
- 800da94: 681b ldr r3, [r3, #0]
- inactivity = 0;
- 800da96: 2100 movs r1, #0
- inactive = NULL;
- 800da98: 4608 mov r0, r1
- for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
- 800da9a: e008 b.n 800daae <tcp_kill_state+0x2a>
- LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK));
- 800da9c: 4b0e ldr r3, [pc, #56] @ (800dad8 <tcp_kill_state+0x54>)
- 800da9e: f240 62dd movw r2, #1757 @ 0x6dd
- 800daa2: 490e ldr r1, [pc, #56] @ (800dadc <tcp_kill_state+0x58>)
- 800daa4: 480e ldr r0, [pc, #56] @ (800dae0 <tcp_kill_state+0x5c>)
- 800daa6: f005 fcaf bl 8013408 <iprintf>
- 800daaa: e7f2 b.n 800da92 <tcp_kill_state+0xe>
- for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
- 800daac: 68db ldr r3, [r3, #12]
- 800daae: b15b cbz r3, 800dac8 <tcp_kill_state+0x44>
- if (pcb->state == state) {
- 800dab0: 7d1a ldrb r2, [r3, #20]
- 800dab2: 42a2 cmp r2, r4
- 800dab4: d1fa bne.n 800daac <tcp_kill_state+0x28>
- if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) {
- 800dab6: 4a0b ldr r2, [pc, #44] @ (800dae4 <tcp_kill_state+0x60>)
- 800dab8: 6812 ldr r2, [r2, #0]
- 800daba: 6a1d ldr r5, [r3, #32]
- 800dabc: 1b52 subs r2, r2, r5
- 800dabe: 428a cmp r2, r1
- 800dac0: d3f4 bcc.n 800daac <tcp_kill_state+0x28>
- inactivity = tcp_ticks - pcb->tmr;
- 800dac2: 4611 mov r1, r2
- inactive = pcb;
- 800dac4: 4618 mov r0, r3
- 800dac6: e7f1 b.n 800daac <tcp_kill_state+0x28>
- if (inactive != NULL) {
- 800dac8: b110 cbz r0, 800dad0 <tcp_kill_state+0x4c>
- tcp_abandon(inactive, 0);
- 800daca: 2100 movs r1, #0
- 800dacc: f7ff febc bl 800d848 <tcp_abandon>
- }
- 800dad0: bd38 pop {r3, r4, r5, pc}
- 800dad2: bf00 nop
- 800dad4: 24019bd8 .word 0x24019bd8
- 800dad8: 080165b0 .word 0x080165b0
- 800dadc: 080169ac .word 0x080169ac
- 800dae0: 080144e8 .word 0x080144e8
- 800dae4: 24019be4 .word 0x24019be4
- 0800dae8 <tcp_alloc>:
- {
- 800dae8: b538 push {r3, r4, r5, lr}
- 800daea: 4605 mov r5, r0
- LWIP_ASSERT_CORE_LOCKED();
- 800daec: f7f6 f80e bl 8003b0c <sys_check_core_locking>
- pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
- 800daf0: 2001 movs r0, #1
- 800daf2: f7fd fd87 bl 800b604 <memp_malloc>
- if (pcb == NULL) {
- 800daf6: 4604 mov r4, r0
- 800daf8: b350 cbz r0, 800db50 <tcp_alloc+0x68>
- memset(pcb, 0, sizeof(struct tcp_pcb));
- 800dafa: 229c movs r2, #156 @ 0x9c
- 800dafc: 2100 movs r1, #0
- 800dafe: 4620 mov r0, r4
- 800db00: f005 fdda bl 80136b8 <memset>
- pcb->prio = prio;
- 800db04: 7565 strb r5, [r4, #21]
- pcb->snd_buf = TCP_SND_BUF;
- 800db06: f241 63d0 movw r3, #5840 @ 0x16d0
- 800db0a: f8a4 3064 strh.w r3, [r4, #100] @ 0x64
- pcb->rcv_wnd = pcb->rcv_ann_wnd = TCPWND_MIN16(TCP_WND);
- 800db0e: 8563 strh r3, [r4, #42] @ 0x2a
- 800db10: 8523 strh r3, [r4, #40] @ 0x28
- pcb->ttl = TCP_TTL;
- 800db12: 22ff movs r2, #255 @ 0xff
- 800db14: 72e2 strb r2, [r4, #11]
- pcb->mss = INITIAL_MSS;
- 800db16: f44f 7206 mov.w r2, #536 @ 0x218
- 800db1a: 8662 strh r2, [r4, #50] @ 0x32
- pcb->rto = 3000 / TCP_SLOW_INTERVAL;
- 800db1c: 2206 movs r2, #6
- 800db1e: f8a4 2040 strh.w r2, [r4, #64] @ 0x40
- pcb->sv = 3000 / TCP_SLOW_INTERVAL;
- 800db22: 87e2 strh r2, [r4, #62] @ 0x3e
- pcb->rtime = -1;
- 800db24: f64f 72ff movw r2, #65535 @ 0xffff
- 800db28: 8622 strh r2, [r4, #48] @ 0x30
- pcb->cwnd = 1;
- 800db2a: 2201 movs r2, #1
- 800db2c: f8a4 2048 strh.w r2, [r4, #72] @ 0x48
- pcb->tmr = tcp_ticks;
- 800db30: 4a1a ldr r2, [pc, #104] @ (800db9c <tcp_alloc+0xb4>)
- 800db32: 6812 ldr r2, [r2, #0]
- 800db34: 6222 str r2, [r4, #32]
- pcb->last_timer = tcp_timer_ctr;
- 800db36: 4a1a ldr r2, [pc, #104] @ (800dba0 <tcp_alloc+0xb8>)
- 800db38: 7812 ldrb r2, [r2, #0]
- 800db3a: 77a2 strb r2, [r4, #30]
- pcb->ssthresh = TCP_SND_BUF;
- 800db3c: f8a4 304a strh.w r3, [r4, #74] @ 0x4a
- pcb->recv = tcp_recv_null;
- 800db40: 4b18 ldr r3, [pc, #96] @ (800dba4 <tcp_alloc+0xbc>)
- 800db42: f8c4 3084 str.w r3, [r4, #132] @ 0x84
- pcb->keep_idle = TCP_KEEPIDLE_DEFAULT;
- 800db46: 4b18 ldr r3, [pc, #96] @ (800dba8 <tcp_alloc+0xc0>)
- 800db48: f8c4 3094 str.w r3, [r4, #148] @ 0x94
- }
- 800db4c: 4620 mov r0, r4
- 800db4e: bd38 pop {r3, r4, r5, pc}
- tcp_handle_closepend();
- 800db50: f7ff fb76 bl 800d240 <tcp_handle_closepend>
- tcp_kill_timewait();
- 800db54: f7ff ff06 bl 800d964 <tcp_kill_timewait>
- pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
- 800db58: 2001 movs r0, #1
- 800db5a: f7fd fd53 bl 800b604 <memp_malloc>
- if (pcb == NULL) {
- 800db5e: 4604 mov r4, r0
- 800db60: 2800 cmp r0, #0
- 800db62: d1ca bne.n 800dafa <tcp_alloc+0x12>
- tcp_kill_state(LAST_ACK);
- 800db64: 2009 movs r0, #9
- 800db66: f7ff ff8d bl 800da84 <tcp_kill_state>
- pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
- 800db6a: 2001 movs r0, #1
- 800db6c: f7fd fd4a bl 800b604 <memp_malloc>
- if (pcb == NULL) {
- 800db70: 4604 mov r4, r0
- 800db72: 2800 cmp r0, #0
- 800db74: d1c1 bne.n 800dafa <tcp_alloc+0x12>
- tcp_kill_state(CLOSING);
- 800db76: 2008 movs r0, #8
- 800db78: f7ff ff84 bl 800da84 <tcp_kill_state>
- pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
- 800db7c: 2001 movs r0, #1
- 800db7e: f7fd fd41 bl 800b604 <memp_malloc>
- if (pcb == NULL) {
- 800db82: 4604 mov r4, r0
- 800db84: 2800 cmp r0, #0
- 800db86: d1b8 bne.n 800dafa <tcp_alloc+0x12>
- tcp_kill_prio(prio);
- 800db88: 4628 mov r0, r5
- 800db8a: f7ff ff05 bl 800d998 <tcp_kill_prio>
- pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
- 800db8e: 2001 movs r0, #1
- 800db90: f7fd fd38 bl 800b604 <memp_malloc>
- if (pcb != NULL) {
- 800db94: 4604 mov r4, r0
- 800db96: 2800 cmp r0, #0
- 800db98: d1af bne.n 800dafa <tcp_alloc+0x12>
- 800db9a: e7d7 b.n 800db4c <tcp_alloc+0x64>
- 800db9c: 24019be4 .word 0x24019be4
- 800dba0: 24019bd0 .word 0x24019bd0
- 800dba4: 0800dd49 .word 0x0800dd49
- 800dba8: 006ddd00 .word 0x006ddd00
- 0800dbac <tcp_new_ip_type>:
- {
- 800dbac: b508 push {r3, lr}
- pcb = tcp_alloc(TCP_PRIO_NORMAL);
- 800dbae: 2040 movs r0, #64 @ 0x40
- 800dbb0: f7ff ff9a bl 800dae8 <tcp_alloc>
- }
- 800dbb4: bd08 pop {r3, pc}
- ...
- 0800dbb8 <tcp_close_shutdown>:
- {
- 800dbb8: b530 push {r4, r5, lr}
- 800dbba: b085 sub sp, #20
- 800dbbc: 460d mov r5, r1
- LWIP_ASSERT("tcp_close_shutdown: invalid pcb", pcb != NULL);
- 800dbbe: 4604 mov r4, r0
- 800dbc0: b328 cbz r0, 800dc0e <tcp_close_shutdown+0x56>
- if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) {
- 800dbc2: 2d00 cmp r5, #0
- 800dbc4: d030 beq.n 800dc28 <tcp_close_shutdown+0x70>
- 800dbc6: 7d23 ldrb r3, [r4, #20]
- 800dbc8: 2b07 cmp r3, #7
- 800dbca: bf18 it ne
- 800dbcc: 2b04 cmpne r3, #4
- 800dbce: d12b bne.n 800dc28 <tcp_close_shutdown+0x70>
- if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) {
- 800dbd0: 6fa3 ldr r3, [r4, #120] @ 0x78
- 800dbd2: b323 cbz r3, 800dc1e <tcp_close_shutdown+0x66>
- LWIP_ASSERT("pcb->flags & TF_RXCLOSED", pcb->flags & TF_RXCLOSED);
- 800dbd4: 8b63 ldrh r3, [r4, #26]
- 800dbd6: f013 0f10 tst.w r3, #16
- 800dbda: d02f beq.n 800dc3c <tcp_close_shutdown+0x84>
- tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip,
- 800dbdc: 1d23 adds r3, r4, #4
- 800dbde: 8b22 ldrh r2, [r4, #24]
- 800dbe0: 9202 str r2, [sp, #8]
- 800dbe2: 8ae2 ldrh r2, [r4, #22]
- 800dbe4: 9201 str r2, [sp, #4]
- 800dbe6: 9300 str r3, [sp, #0]
- 800dbe8: 4623 mov r3, r4
- 800dbea: 6a62 ldr r2, [r4, #36] @ 0x24
- 800dbec: 6d21 ldr r1, [r4, #80] @ 0x50
- 800dbee: 4620 mov r0, r4
- 800dbf0: f003 f8b6 bl 8010d60 <tcp_rst>
- tcp_pcb_purge(pcb);
- 800dbf4: 4620 mov r0, r4
- 800dbf6: f7ff fd8d bl 800d714 <tcp_pcb_purge>
- TCP_RMV_ACTIVE(pcb);
- 800dbfa: 4b39 ldr r3, [pc, #228] @ (800dce0 <tcp_close_shutdown+0x128>)
- 800dbfc: 681b ldr r3, [r3, #0]
- 800dbfe: 42a3 cmp r3, r4
- 800dc00: d024 beq.n 800dc4c <tcp_close_shutdown+0x94>
- 800dc02: b34b cbz r3, 800dc58 <tcp_close_shutdown+0xa0>
- 800dc04: 68da ldr r2, [r3, #12]
- 800dc06: 42a2 cmp r2, r4
- 800dc08: d024 beq.n 800dc54 <tcp_close_shutdown+0x9c>
- 800dc0a: 4613 mov r3, r2
- 800dc0c: e7f9 b.n 800dc02 <tcp_close_shutdown+0x4a>
- LWIP_ASSERT("tcp_close_shutdown: invalid pcb", pcb != NULL);
- 800dc0e: 4b35 ldr r3, [pc, #212] @ (800dce4 <tcp_close_shutdown+0x12c>)
- 800dc10: f44f 72af mov.w r2, #350 @ 0x15e
- 800dc14: 4934 ldr r1, [pc, #208] @ (800dce8 <tcp_close_shutdown+0x130>)
- 800dc16: 4835 ldr r0, [pc, #212] @ (800dcec <tcp_close_shutdown+0x134>)
- 800dc18: f005 fbf6 bl 8013408 <iprintf>
- 800dc1c: e7d1 b.n 800dbc2 <tcp_close_shutdown+0xa>
- if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) {
- 800dc1e: 8d22 ldrh r2, [r4, #40] @ 0x28
- 800dc20: f241 63d0 movw r3, #5840 @ 0x16d0
- 800dc24: 429a cmp r2, r3
- 800dc26: d1d5 bne.n 800dbd4 <tcp_close_shutdown+0x1c>
- switch (pcb->state) {
- 800dc28: 7d23 ldrb r3, [r4, #20]
- 800dc2a: 2b01 cmp r3, #1
- 800dc2c: d03f beq.n 800dcae <tcp_close_shutdown+0xf6>
- 800dc2e: 2b02 cmp r3, #2
- 800dc30: d049 beq.n 800dcc6 <tcp_close_shutdown+0x10e>
- 800dc32: b313 cbz r3, 800dc7a <tcp_close_shutdown+0xc2>
- return tcp_close_shutdown_fin(pcb);
- 800dc34: 4620 mov r0, r4
- 800dc36: f7ff fac3 bl 800d1c0 <tcp_close_shutdown_fin>
- 800dc3a: e036 b.n 800dcaa <tcp_close_shutdown+0xf2>
- LWIP_ASSERT("pcb->flags & TF_RXCLOSED", pcb->flags & TF_RXCLOSED);
- 800dc3c: 4b29 ldr r3, [pc, #164] @ (800dce4 <tcp_close_shutdown+0x12c>)
- 800dc3e: f44f 72b2 mov.w r2, #356 @ 0x164
- 800dc42: 492b ldr r1, [pc, #172] @ (800dcf0 <tcp_close_shutdown+0x138>)
- 800dc44: 4829 ldr r0, [pc, #164] @ (800dcec <tcp_close_shutdown+0x134>)
- 800dc46: f005 fbdf bl 8013408 <iprintf>
- 800dc4a: e7c7 b.n 800dbdc <tcp_close_shutdown+0x24>
- TCP_RMV_ACTIVE(pcb);
- 800dc4c: 68da ldr r2, [r3, #12]
- 800dc4e: 4b24 ldr r3, [pc, #144] @ (800dce0 <tcp_close_shutdown+0x128>)
- 800dc50: 601a str r2, [r3, #0]
- 800dc52: e001 b.n 800dc58 <tcp_close_shutdown+0xa0>
- 800dc54: 68e2 ldr r2, [r4, #12]
- 800dc56: 60da str r2, [r3, #12]
- 800dc58: 2300 movs r3, #0
- 800dc5a: 60e3 str r3, [r4, #12]
- 800dc5c: 4b25 ldr r3, [pc, #148] @ (800dcf4 <tcp_close_shutdown+0x13c>)
- 800dc5e: 2201 movs r2, #1
- 800dc60: 701a strb r2, [r3, #0]
- if (tcp_input_pcb == pcb) {
- 800dc62: 4b25 ldr r3, [pc, #148] @ (800dcf8 <tcp_close_shutdown+0x140>)
- 800dc64: 681b ldr r3, [r3, #0]
- 800dc66: 42a3 cmp r3, r4
- 800dc68: d004 beq.n 800dc74 <tcp_close_shutdown+0xbc>
- tcp_free(pcb);
- 800dc6a: 4620 mov r0, r4
- 800dc6c: f7ff fb0a bl 800d284 <tcp_free>
- return ERR_OK;
- 800dc70: 2000 movs r0, #0
- 800dc72: e01a b.n 800dcaa <tcp_close_shutdown+0xf2>
- tcp_trigger_input_pcb_close();
- 800dc74: f002 f83e bl 800fcf4 <tcp_trigger_input_pcb_close>
- 800dc78: e7fa b.n 800dc70 <tcp_close_shutdown+0xb8>
- if (pcb->local_port != 0) {
- 800dc7a: 8ae3 ldrh r3, [r4, #22]
- 800dc7c: b18b cbz r3, 800dca2 <tcp_close_shutdown+0xea>
- TCP_RMV(&tcp_bound_pcbs, pcb);
- 800dc7e: 4b1f ldr r3, [pc, #124] @ (800dcfc <tcp_close_shutdown+0x144>)
- 800dc80: 681b ldr r3, [r3, #0]
- 800dc82: 42a3 cmp r3, r4
- 800dc84: d005 beq.n 800dc92 <tcp_close_shutdown+0xda>
- 800dc86: b153 cbz r3, 800dc9e <tcp_close_shutdown+0xe6>
- 800dc88: 68da ldr r2, [r3, #12]
- 800dc8a: 42a2 cmp r2, r4
- 800dc8c: d005 beq.n 800dc9a <tcp_close_shutdown+0xe2>
- 800dc8e: 4613 mov r3, r2
- 800dc90: e7f9 b.n 800dc86 <tcp_close_shutdown+0xce>
- 800dc92: 68da ldr r2, [r3, #12]
- 800dc94: 4b19 ldr r3, [pc, #100] @ (800dcfc <tcp_close_shutdown+0x144>)
- 800dc96: 601a str r2, [r3, #0]
- 800dc98: e001 b.n 800dc9e <tcp_close_shutdown+0xe6>
- 800dc9a: 68e2 ldr r2, [r4, #12]
- 800dc9c: 60da str r2, [r3, #12]
- 800dc9e: 2300 movs r3, #0
- 800dca0: 60e3 str r3, [r4, #12]
- tcp_free(pcb);
- 800dca2: 4620 mov r0, r4
- 800dca4: f7ff faee bl 800d284 <tcp_free>
- return ERR_OK;
- 800dca8: 2000 movs r0, #0
- }
- 800dcaa: b005 add sp, #20
- 800dcac: bd30 pop {r4, r5, pc}
- tcp_listen_closed(pcb);
- 800dcae: 4620 mov r0, r4
- 800dcb0: f7ff fa40 bl 800d134 <tcp_listen_closed>
- tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb);
- 800dcb4: 4621 mov r1, r4
- 800dcb6: 4812 ldr r0, [pc, #72] @ (800dd00 <tcp_close_shutdown+0x148>)
- 800dcb8: f7ff fd5e bl 800d778 <tcp_pcb_remove>
- tcp_free_listen(pcb);
- 800dcbc: 4620 mov r0, r4
- 800dcbe: f7ff fa67 bl 800d190 <tcp_free_listen>
- return ERR_OK;
- 800dcc2: 2000 movs r0, #0
- break;
- 800dcc4: e7f1 b.n 800dcaa <tcp_close_shutdown+0xf2>
- TCP_PCB_REMOVE_ACTIVE(pcb);
- 800dcc6: 4621 mov r1, r4
- 800dcc8: 4805 ldr r0, [pc, #20] @ (800dce0 <tcp_close_shutdown+0x128>)
- 800dcca: f7ff fd55 bl 800d778 <tcp_pcb_remove>
- 800dcce: 4b09 ldr r3, [pc, #36] @ (800dcf4 <tcp_close_shutdown+0x13c>)
- 800dcd0: 2201 movs r2, #1
- 800dcd2: 701a strb r2, [r3, #0]
- tcp_free(pcb);
- 800dcd4: 4620 mov r0, r4
- 800dcd6: f7ff fad5 bl 800d284 <tcp_free>
- return ERR_OK;
- 800dcda: 2000 movs r0, #0
- break;
- 800dcdc: e7e5 b.n 800dcaa <tcp_close_shutdown+0xf2>
- 800dcde: bf00 nop
- 800dce0: 24019bd8 .word 0x24019bd8
- 800dce4: 080165b0 .word 0x080165b0
- 800dce8: 080169bc .word 0x080169bc
- 800dcec: 080144e8 .word 0x080144e8
- 800dcf0: 080169dc .word 0x080169dc
- 800dcf4: 24019bd2 .word 0x24019bd2
- 800dcf8: 24019be8 .word 0x24019be8
- 800dcfc: 24019be0 .word 0x24019be0
- 800dd00: 24019bdc .word 0x24019bdc
- 0800dd04 <tcp_close>:
- {
- 800dd04: b510 push {r4, lr}
- 800dd06: 4604 mov r4, r0
- LWIP_ASSERT_CORE_LOCKED();
- 800dd08: f7f5 ff00 bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("tcp_close: invalid pcb", pcb != NULL, return ERR_ARG);
- 800dd0c: b15c cbz r4, 800dd26 <tcp_close+0x22>
- if (pcb->state != LISTEN) {
- 800dd0e: 7d23 ldrb r3, [r4, #20]
- 800dd10: 2b01 cmp r3, #1
- 800dd12: d003 beq.n 800dd1c <tcp_close+0x18>
- tcp_set_flags(pcb, TF_RXCLOSED);
- 800dd14: 8b63 ldrh r3, [r4, #26]
- 800dd16: f043 0310 orr.w r3, r3, #16
- 800dd1a: 8363 strh r3, [r4, #26]
- return tcp_close_shutdown(pcb, 1);
- 800dd1c: 2101 movs r1, #1
- 800dd1e: 4620 mov r0, r4
- 800dd20: f7ff ff4a bl 800dbb8 <tcp_close_shutdown>
- }
- 800dd24: bd10 pop {r4, pc}
- LWIP_ERROR("tcp_close: invalid pcb", pcb != NULL, return ERR_ARG);
- 800dd26: 4b05 ldr r3, [pc, #20] @ (800dd3c <tcp_close+0x38>)
- 800dd28: f44f 72f4 mov.w r2, #488 @ 0x1e8
- 800dd2c: 4904 ldr r1, [pc, #16] @ (800dd40 <tcp_close+0x3c>)
- 800dd2e: 4805 ldr r0, [pc, #20] @ (800dd44 <tcp_close+0x40>)
- 800dd30: f005 fb6a bl 8013408 <iprintf>
- 800dd34: f06f 000f mvn.w r0, #15
- 800dd38: e7f4 b.n 800dd24 <tcp_close+0x20>
- 800dd3a: bf00 nop
- 800dd3c: 080165b0 .word 0x080165b0
- 800dd40: 080169f8 .word 0x080169f8
- 800dd44: 080144e8 .word 0x080144e8
- 0800dd48 <tcp_recv_null>:
- {
- 800dd48: b510 push {r4, lr}
- LWIP_ERROR("tcp_recv_null: invalid pcb", pcb != NULL, return ERR_ARG);
- 800dd4a: b151 cbz r1, 800dd62 <tcp_recv_null+0x1a>
- 800dd4c: 4614 mov r4, r2
- 800dd4e: 4608 mov r0, r1
- if (p != NULL) {
- 800dd50: b18a cbz r2, 800dd76 <tcp_recv_null+0x2e>
- tcp_recved(pcb, p->tot_len);
- 800dd52: 8911 ldrh r1, [r2, #8]
- 800dd54: f7ff faea bl 800d32c <tcp_recved>
- pbuf_free(p);
- 800dd58: 4620 mov r0, r4
- 800dd5a: f7fe f821 bl 800bda0 <pbuf_free>
- return ERR_OK;
- 800dd5e: 2000 movs r0, #0
- }
- 800dd60: bd10 pop {r4, pc}
- LWIP_ERROR("tcp_recv_null: invalid pcb", pcb != NULL, return ERR_ARG);
- 800dd62: 4b08 ldr r3, [pc, #32] @ (800dd84 <tcp_recv_null+0x3c>)
- 800dd64: f44f 62d3 mov.w r2, #1688 @ 0x698
- 800dd68: 4907 ldr r1, [pc, #28] @ (800dd88 <tcp_recv_null+0x40>)
- 800dd6a: 4808 ldr r0, [pc, #32] @ (800dd8c <tcp_recv_null+0x44>)
- 800dd6c: f005 fb4c bl 8013408 <iprintf>
- 800dd70: f06f 000f mvn.w r0, #15
- 800dd74: e7f4 b.n 800dd60 <tcp_recv_null+0x18>
- } else if (err == ERR_OK) {
- 800dd76: b10b cbz r3, 800dd7c <tcp_recv_null+0x34>
- return ERR_OK;
- 800dd78: 2000 movs r0, #0
- 800dd7a: e7f1 b.n 800dd60 <tcp_recv_null+0x18>
- return tcp_close(pcb);
- 800dd7c: f7ff ffc2 bl 800dd04 <tcp_close>
- 800dd80: e7ee b.n 800dd60 <tcp_recv_null+0x18>
- 800dd82: bf00 nop
- 800dd84: 080165b0 .word 0x080165b0
- 800dd88: 08016a10 .word 0x08016a10
- 800dd8c: 080144e8 .word 0x080144e8
- 0800dd90 <tcp_process_refused_data>:
- {
- 800dd90: b5f8 push {r3, r4, r5, r6, r7, lr}
- LWIP_ERROR("tcp_process_refused_data: invalid pcb", pcb != NULL, return ERR_ARG);
- 800dd92: b320 cbz r0, 800ddde <tcp_process_refused_data+0x4e>
- 800dd94: 4604 mov r4, r0
- u8_t refused_flags = pcb->refused_data->flags;
- 800dd96: 6f86 ldr r6, [r0, #120] @ 0x78
- 800dd98: 7b77 ldrb r7, [r6, #13]
- pcb->refused_data = NULL;
- 800dd9a: 2300 movs r3, #0
- 800dd9c: 6783 str r3, [r0, #120] @ 0x78
- TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err);
- 800dd9e: f8d0 5084 ldr.w r5, [r0, #132] @ 0x84
- 800dda2: b335 cbz r5, 800ddf2 <tcp_process_refused_data+0x62>
- 800dda4: 4632 mov r2, r6
- 800dda6: 4601 mov r1, r0
- 800dda8: 6900 ldr r0, [r0, #16]
- 800ddaa: 47a8 blx r5
- 800ddac: 4605 mov r5, r0
- if (err == ERR_OK) {
- 800ddae: bb45 cbnz r5, 800de02 <tcp_process_refused_data+0x72>
- if ((refused_flags & PBUF_FLAG_TCP_FIN)
- 800ddb0: f017 0f20 tst.w r7, #32
- 800ddb4: d02b beq.n 800de0e <tcp_process_refused_data+0x7e>
- if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) {
- 800ddb6: 8d23 ldrh r3, [r4, #40] @ 0x28
- 800ddb8: f241 62d0 movw r2, #5840 @ 0x16d0
- 800ddbc: 4293 cmp r3, r2
- 800ddbe: d001 beq.n 800ddc4 <tcp_process_refused_data+0x34>
- pcb->rcv_wnd++;
- 800ddc0: 3301 adds r3, #1
- 800ddc2: 8523 strh r3, [r4, #40] @ 0x28
- TCP_EVENT_CLOSED(pcb, err);
- 800ddc4: f8d4 6084 ldr.w r6, [r4, #132] @ 0x84
- 800ddc8: b30e cbz r6, 800de0e <tcp_process_refused_data+0x7e>
- 800ddca: 2300 movs r3, #0
- 800ddcc: 461a mov r2, r3
- 800ddce: 4621 mov r1, r4
- 800ddd0: 6920 ldr r0, [r4, #16]
- 800ddd2: 47b0 blx r6
- if (err == ERR_ABRT) {
- 800ddd4: f110 0f0d cmn.w r0, #13
- 800ddd8: d119 bne.n 800de0e <tcp_process_refused_data+0x7e>
- return ERR_ABRT;
- 800ddda: 4605 mov r5, r0
- 800dddc: e017 b.n 800de0e <tcp_process_refused_data+0x7e>
- LWIP_ERROR("tcp_process_refused_data: invalid pcb", pcb != NULL, return ERR_ARG);
- 800ddde: 4b0d ldr r3, [pc, #52] @ (800de14 <tcp_process_refused_data+0x84>)
- 800dde0: f240 6209 movw r2, #1545 @ 0x609
- 800dde4: 490c ldr r1, [pc, #48] @ (800de18 <tcp_process_refused_data+0x88>)
- 800dde6: 480d ldr r0, [pc, #52] @ (800de1c <tcp_process_refused_data+0x8c>)
- 800dde8: f005 fb0e bl 8013408 <iprintf>
- 800ddec: f06f 050f mvn.w r5, #15
- 800ddf0: e00d b.n 800de0e <tcp_process_refused_data+0x7e>
- TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err);
- 800ddf2: 2300 movs r3, #0
- 800ddf4: 4632 mov r2, r6
- 800ddf6: 4601 mov r1, r0
- 800ddf8: 4618 mov r0, r3
- 800ddfa: f7ff ffa5 bl 800dd48 <tcp_recv_null>
- 800ddfe: 4605 mov r5, r0
- 800de00: e7d5 b.n 800ddae <tcp_process_refused_data+0x1e>
- } else if (err == ERR_ABRT) {
- 800de02: f115 0f0d cmn.w r5, #13
- 800de06: d002 beq.n 800de0e <tcp_process_refused_data+0x7e>
- pcb->refused_data = refused_data;
- 800de08: 67a6 str r6, [r4, #120] @ 0x78
- return ERR_INPROGRESS;
- 800de0a: f06f 0504 mvn.w r5, #4
- }
- 800de0e: 4628 mov r0, r5
- 800de10: bdf8 pop {r3, r4, r5, r6, r7, pc}
- 800de12: bf00 nop
- 800de14: 080165b0 .word 0x080165b0
- 800de18: 08016a2c .word 0x08016a2c
- 800de1c: 080144e8 .word 0x080144e8
- 0800de20 <tcp_fasttmr>:
- {
- 800de20: b570 push {r4, r5, r6, lr}
- ++tcp_timer_ctr;
- 800de22: 4a1c ldr r2, [pc, #112] @ (800de94 <tcp_fasttmr+0x74>)
- 800de24: 7813 ldrb r3, [r2, #0]
- 800de26: 3301 adds r3, #1
- 800de28: 7013 strb r3, [r2, #0]
- pcb = tcp_active_pcbs;
- 800de2a: 4b1b ldr r3, [pc, #108] @ (800de98 <tcp_fasttmr+0x78>)
- 800de2c: 681c ldr r4, [r3, #0]
- while (pcb != NULL) {
- 800de2e: e013 b.n 800de58 <tcp_fasttmr+0x38>
- tcp_ack_now(pcb);
- 800de30: f043 0302 orr.w r3, r3, #2
- 800de34: 8363 strh r3, [r4, #26]
- tcp_output(pcb);
- 800de36: 4620 mov r0, r4
- 800de38: f003 f814 bl 8010e64 <tcp_output>
- tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
- 800de3c: 8b63 ldrh r3, [r4, #26]
- 800de3e: f023 0303 bic.w r3, r3, #3
- 800de42: 8363 strh r3, [r4, #26]
- 800de44: e013 b.n 800de6e <tcp_fasttmr+0x4e>
- tcp_clear_flags(pcb, TF_CLOSEPEND);
- 800de46: f023 0308 bic.w r3, r3, #8
- 800de4a: 8363 strh r3, [r4, #26]
- tcp_close_shutdown_fin(pcb);
- 800de4c: 4620 mov r0, r4
- 800de4e: f7ff f9b7 bl 800d1c0 <tcp_close_shutdown_fin>
- 800de52: e010 b.n 800de76 <tcp_fasttmr+0x56>
- pcb = pcb->next;
- 800de54: 68e5 ldr r5, [r4, #12]
- {
- 800de56: 462c mov r4, r5
- while (pcb != NULL) {
- 800de58: b1dc cbz r4, 800de92 <tcp_fasttmr+0x72>
- if (pcb->last_timer != tcp_timer_ctr) {
- 800de5a: 7fa2 ldrb r2, [r4, #30]
- 800de5c: 4b0d ldr r3, [pc, #52] @ (800de94 <tcp_fasttmr+0x74>)
- 800de5e: 781b ldrb r3, [r3, #0]
- 800de60: 429a cmp r2, r3
- 800de62: d0f7 beq.n 800de54 <tcp_fasttmr+0x34>
- pcb->last_timer = tcp_timer_ctr;
- 800de64: 77a3 strb r3, [r4, #30]
- if (pcb->flags & TF_ACK_DELAY) {
- 800de66: 8b63 ldrh r3, [r4, #26]
- 800de68: f013 0f01 tst.w r3, #1
- 800de6c: d1e0 bne.n 800de30 <tcp_fasttmr+0x10>
- if (pcb->flags & TF_CLOSEPEND) {
- 800de6e: 8b63 ldrh r3, [r4, #26]
- 800de70: f013 0f08 tst.w r3, #8
- 800de74: d1e7 bne.n 800de46 <tcp_fasttmr+0x26>
- next = pcb->next;
- 800de76: 68e5 ldr r5, [r4, #12]
- if (pcb->refused_data != NULL) {
- 800de78: 6fa3 ldr r3, [r4, #120] @ 0x78
- 800de7a: 2b00 cmp r3, #0
- 800de7c: d0eb beq.n 800de56 <tcp_fasttmr+0x36>
- tcp_active_pcbs_changed = 0;
- 800de7e: 4e07 ldr r6, [pc, #28] @ (800de9c <tcp_fasttmr+0x7c>)
- 800de80: 2300 movs r3, #0
- 800de82: 7033 strb r3, [r6, #0]
- tcp_process_refused_data(pcb);
- 800de84: 4620 mov r0, r4
- 800de86: f7ff ff83 bl 800dd90 <tcp_process_refused_data>
- if (tcp_active_pcbs_changed) {
- 800de8a: 7833 ldrb r3, [r6, #0]
- 800de8c: 2b00 cmp r3, #0
- 800de8e: d0e2 beq.n 800de56 <tcp_fasttmr+0x36>
- 800de90: e7cb b.n 800de2a <tcp_fasttmr+0xa>
- }
- 800de92: bd70 pop {r4, r5, r6, pc}
- 800de94: 24019bd0 .word 0x24019bd0
- 800de98: 24019bd8 .word 0x24019bd8
- 800de9c: 24019bd2 .word 0x24019bd2
- 0800dea0 <tcp_shutdown>:
- {
- 800dea0: b570 push {r4, r5, r6, lr}
- 800dea2: 4604 mov r4, r0
- 800dea4: 460d mov r5, r1
- 800dea6: 4616 mov r6, r2
- LWIP_ASSERT_CORE_LOCKED();
- 800dea8: f7f5 fe30 bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("tcp_shutdown: invalid pcb", pcb != NULL, return ERR_ARG);
- 800deac: b1bc cbz r4, 800dede <tcp_shutdown+0x3e>
- if (pcb->state == LISTEN) {
- 800deae: 7d23 ldrb r3, [r4, #20]
- 800deb0: 2b01 cmp r3, #1
- 800deb2: d02a beq.n 800df0a <tcp_shutdown+0x6a>
- if (shut_rx) {
- 800deb4: b155 cbz r5, 800decc <tcp_shutdown+0x2c>
- tcp_set_flags(pcb, TF_RXCLOSED);
- 800deb6: 8b63 ldrh r3, [r4, #26]
- 800deb8: f043 0310 orr.w r3, r3, #16
- 800debc: 8363 strh r3, [r4, #26]
- if (shut_tx) {
- 800debe: b9c6 cbnz r6, 800def2 <tcp_shutdown+0x52>
- if (pcb->refused_data != NULL) {
- 800dec0: 6fa0 ldr r0, [r4, #120] @ 0x78
- 800dec2: b118 cbz r0, 800decc <tcp_shutdown+0x2c>
- pbuf_free(pcb->refused_data);
- 800dec4: f7fd ff6c bl 800bda0 <pbuf_free>
- pcb->refused_data = NULL;
- 800dec8: 2300 movs r3, #0
- 800deca: 67a3 str r3, [r4, #120] @ 0x78
- if (shut_tx) {
- 800decc: b306 cbz r6, 800df10 <tcp_shutdown+0x70>
- switch (pcb->state) {
- 800dece: 7d23 ldrb r3, [r4, #20]
- 800ded0: 2b04 cmp r3, #4
- 800ded2: d813 bhi.n 800defc <tcp_shutdown+0x5c>
- 800ded4: 2b03 cmp r3, #3
- 800ded6: d213 bcs.n 800df00 <tcp_shutdown+0x60>
- 800ded8: f06f 000a mvn.w r0, #10
- 800dedc: e019 b.n 800df12 <tcp_shutdown+0x72>
- LWIP_ERROR("tcp_shutdown: invalid pcb", pcb != NULL, return ERR_ARG);
- 800dede: 4b0f ldr r3, [pc, #60] @ (800df1c <tcp_shutdown+0x7c>)
- 800dee0: f240 2207 movw r2, #519 @ 0x207
- 800dee4: 490e ldr r1, [pc, #56] @ (800df20 <tcp_shutdown+0x80>)
- 800dee6: 480f ldr r0, [pc, #60] @ (800df24 <tcp_shutdown+0x84>)
- 800dee8: f005 fa8e bl 8013408 <iprintf>
- 800deec: f06f 000f mvn.w r0, #15
- 800def0: e00f b.n 800df12 <tcp_shutdown+0x72>
- return tcp_close_shutdown(pcb, 1);
- 800def2: 2101 movs r1, #1
- 800def4: 4620 mov r0, r4
- 800def6: f7ff fe5f bl 800dbb8 <tcp_close_shutdown>
- 800defa: e00a b.n 800df12 <tcp_shutdown+0x72>
- switch (pcb->state) {
- 800defc: 2b07 cmp r3, #7
- 800defe: d109 bne.n 800df14 <tcp_shutdown+0x74>
- return tcp_close_shutdown(pcb, (u8_t)shut_rx);
- 800df00: b2e9 uxtb r1, r5
- 800df02: 4620 mov r0, r4
- 800df04: f7ff fe58 bl 800dbb8 <tcp_close_shutdown>
- 800df08: e003 b.n 800df12 <tcp_shutdown+0x72>
- return ERR_CONN;
- 800df0a: f06f 000a mvn.w r0, #10
- 800df0e: e000 b.n 800df12 <tcp_shutdown+0x72>
- return ERR_OK;
- 800df10: 2000 movs r0, #0
- }
- 800df12: bd70 pop {r4, r5, r6, pc}
- switch (pcb->state) {
- 800df14: f06f 000a mvn.w r0, #10
- 800df18: e7fb b.n 800df12 <tcp_shutdown+0x72>
- 800df1a: bf00 nop
- 800df1c: 080165b0 .word 0x080165b0
- 800df20: 08016a54 .word 0x08016a54
- 800df24: 080144e8 .word 0x080144e8
- 0800df28 <tcp_slowtmr>:
- {
- 800df28: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 800df2c: b084 sub sp, #16
- ++tcp_ticks;
- 800df2e: 4a99 ldr r2, [pc, #612] @ (800e194 <tcp_slowtmr+0x26c>)
- 800df30: 6813 ldr r3, [r2, #0]
- 800df32: 3301 adds r3, #1
- 800df34: 6013 str r3, [r2, #0]
- ++tcp_timer_ctr;
- 800df36: 4a98 ldr r2, [pc, #608] @ (800e198 <tcp_slowtmr+0x270>)
- 800df38: 7813 ldrb r3, [r2, #0]
- 800df3a: 3301 adds r3, #1
- 800df3c: 7013 strb r3, [r2, #0]
- pcb = tcp_active_pcbs;
- 800df3e: 4b97 ldr r3, [pc, #604] @ (800e19c <tcp_slowtmr+0x274>)
- 800df40: 681c ldr r4, [r3, #0]
- prev = NULL;
- 800df42: 2500 movs r5, #0
- 800df44: e193 b.n 800e26e <tcp_slowtmr+0x346>
- LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED);
- 800df46: 4b96 ldr r3, [pc, #600] @ (800e1a0 <tcp_slowtmr+0x278>)
- 800df48: f240 42be movw r2, #1214 @ 0x4be
- 800df4c: 4995 ldr r1, [pc, #596] @ (800e1a4 <tcp_slowtmr+0x27c>)
- 800df4e: 4896 ldr r0, [pc, #600] @ (800e1a8 <tcp_slowtmr+0x280>)
- 800df50: f005 fa5a bl 8013408 <iprintf>
- 800df54: e191 b.n 800e27a <tcp_slowtmr+0x352>
- LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN);
- 800df56: 4b92 ldr r3, [pc, #584] @ (800e1a0 <tcp_slowtmr+0x278>)
- 800df58: f240 42bf movw r2, #1215 @ 0x4bf
- 800df5c: 4993 ldr r1, [pc, #588] @ (800e1ac <tcp_slowtmr+0x284>)
- 800df5e: 4892 ldr r0, [pc, #584] @ (800e1a8 <tcp_slowtmr+0x280>)
- 800df60: f005 fa52 bl 8013408 <iprintf>
- 800df64: e18d b.n 800e282 <tcp_slowtmr+0x35a>
- LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT);
- 800df66: 4b8e ldr r3, [pc, #568] @ (800e1a0 <tcp_slowtmr+0x278>)
- 800df68: f44f 6298 mov.w r2, #1216 @ 0x4c0
- 800df6c: 4990 ldr r1, [pc, #576] @ (800e1b0 <tcp_slowtmr+0x288>)
- 800df6e: 488e ldr r0, [pc, #568] @ (800e1a8 <tcp_slowtmr+0x280>)
- 800df70: f005 fa4a bl 8013408 <iprintf>
- 800df74: e189 b.n 800e28a <tcp_slowtmr+0x362>
- prev = pcb;
- 800df76: 4625 mov r5, r4
- pcb = pcb->next;
- 800df78: 68e4 ldr r4, [r4, #12]
- continue;
- 800df7a: e178 b.n 800e26e <tcp_slowtmr+0x346>
- if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) {
- 800df7c: f894 3042 ldrb.w r3, [r4, #66] @ 0x42
- 800df80: 2b05 cmp r3, #5
- 800df82: f240 818d bls.w 800e2a0 <tcp_slowtmr+0x378>
- ++pcb_remove;
- 800df86: 2601 movs r6, #1
- 800df88: e06e b.n 800e068 <tcp_slowtmr+0x140>
- LWIP_ASSERT("tcp_slowtimr: persist ticking with empty send buffer", pcb->unsent != NULL);
- 800df8a: 4b85 ldr r3, [pc, #532] @ (800e1a0 <tcp_slowtmr+0x278>)
- 800df8c: f240 42d5 movw r2, #1237 @ 0x4d5
- 800df90: 4988 ldr r1, [pc, #544] @ (800e1b4 <tcp_slowtmr+0x28c>)
- 800df92: 4885 ldr r0, [pc, #532] @ (800e1a8 <tcp_slowtmr+0x280>)
- 800df94: f005 fa38 bl 8013408 <iprintf>
- 800df98: e199 b.n 800e2ce <tcp_slowtmr+0x3a6>
- if (tcp_split_unsent_seg(pcb, (u16_t)pcb->snd_wnd) == ERR_OK) {
- 800df9a: 4620 mov r0, r4
- 800df9c: f002 fc4e bl 801083c <tcp_split_unsent_seg>
- 800dfa0: b158 cbz r0, 800dfba <tcp_slowtmr+0x92>
- pcb->persist_cnt = 0;
- 800dfa2: 2300 movs r3, #0
- 800dfa4: f884 3098 strb.w r3, [r4, #152] @ 0x98
- if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) {
- 800dfa8: f894 3099 ldrb.w r3, [r4, #153] @ 0x99
- 800dfac: 2b06 cmp r3, #6
- 800dfae: d87c bhi.n 800e0aa <tcp_slowtmr+0x182>
- pcb->persist_backoff++;
- 800dfb0: 3301 adds r3, #1
- 800dfb2: f884 3099 strb.w r3, [r4, #153] @ 0x99
- pcb_remove = 0;
- 800dfb6: 2600 movs r6, #0
- 800dfb8: e056 b.n 800e068 <tcp_slowtmr+0x140>
- if (tcp_output(pcb) == ERR_OK) {
- 800dfba: 4620 mov r0, r4
- 800dfbc: f002 ff52 bl 8010e64 <tcp_output>
- 800dfc0: 2800 cmp r0, #0
- 800dfc2: d1ee bne.n 800dfa2 <tcp_slowtmr+0x7a>
- pcb_remove = 0;
- 800dfc4: 2600 movs r6, #0
- 800dfc6: e04f b.n 800e068 <tcp_slowtmr+0x140>
- if ((pcb->rtime >= 0) && (pcb->rtime < 0x7FFF)) {
- 800dfc8: f9b4 3030 ldrsh.w r3, [r4, #48] @ 0x30
- 800dfcc: b29b uxth r3, r3
- 800dfce: f647 72fe movw r2, #32766 @ 0x7ffe
- 800dfd2: 4293 cmp r3, r2
- 800dfd4: d801 bhi.n 800dfda <tcp_slowtmr+0xb2>
- ++pcb->rtime;
- 800dfd6: 3301 adds r3, #1
- 800dfd8: 8623 strh r3, [r4, #48] @ 0x30
- if (pcb->rtime >= pcb->rto) {
- 800dfda: f9b4 2030 ldrsh.w r2, [r4, #48] @ 0x30
- 800dfde: f9b4 3040 ldrsh.w r3, [r4, #64] @ 0x40
- 800dfe2: 429a cmp r2, r3
- 800dfe4: db40 blt.n 800e068 <tcp_slowtmr+0x140>
- if ((tcp_rexmit_rto_prepare(pcb) == ERR_OK) || ((pcb->unacked == NULL) && (pcb->unsent != NULL))) {
- 800dfe6: 4620 mov r0, r4
- 800dfe8: f002 fde8 bl 8010bbc <tcp_rexmit_rto_prepare>
- 800dfec: b120 cbz r0, 800dff8 <tcp_slowtmr+0xd0>
- 800dfee: 6f23 ldr r3, [r4, #112] @ 0x70
- 800dff0: 2b00 cmp r3, #0
- 800dff2: d139 bne.n 800e068 <tcp_slowtmr+0x140>
- 800dff4: 6ee3 ldr r3, [r4, #108] @ 0x6c
- 800dff6: b3bb cbz r3, 800e068 <tcp_slowtmr+0x140>
- if (pcb->state != SYN_SENT) {
- 800dff8: 7d23 ldrb r3, [r4, #20]
- 800dffa: 2b02 cmp r3, #2
- 800dffc: d014 beq.n 800e028 <tcp_slowtmr+0x100>
- u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff) - 1);
- 800dffe: f894 2042 ldrb.w r2, [r4, #66] @ 0x42
- 800e002: 2a0c cmp r2, #12
- 800e004: bf28 it cs
- 800e006: 220c movcs r2, #12
- int calc_rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx];
- 800e008: f9b4 103c ldrsh.w r1, [r4, #60] @ 0x3c
- 800e00c: f9b4 303e ldrsh.w r3, [r4, #62] @ 0x3e
- 800e010: eb03 03e1 add.w r3, r3, r1, asr #3
- 800e014: 4968 ldr r1, [pc, #416] @ (800e1b8 <tcp_slowtmr+0x290>)
- 800e016: 5c8a ldrb r2, [r1, r2]
- 800e018: 4093 lsls r3, r2
- pcb->rto = (s16_t)LWIP_MIN(calc_rto, 0x7FFF);
- 800e01a: f647 72fe movw r2, #32766 @ 0x7ffe
- 800e01e: 4293 cmp r3, r2
- 800e020: dc1e bgt.n 800e060 <tcp_slowtmr+0x138>
- 800e022: b21b sxth r3, r3
- 800e024: f8a4 3040 strh.w r3, [r4, #64] @ 0x40
- pcb->rtime = 0;
- 800e028: 2300 movs r3, #0
- 800e02a: 8623 strh r3, [r4, #48] @ 0x30
- eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd);
- 800e02c: f8b4 3060 ldrh.w r3, [r4, #96] @ 0x60
- 800e030: f8b4 2048 ldrh.w r2, [r4, #72] @ 0x48
- 800e034: 4293 cmp r3, r2
- 800e036: bf28 it cs
- 800e038: 4613 movcs r3, r2
- pcb->ssthresh = eff_wnd >> 1;
- 800e03a: 085b lsrs r3, r3, #1
- 800e03c: f8a4 304a strh.w r3, [r4, #74] @ 0x4a
- if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) {
- 800e040: 8e61 ldrh r1, [r4, #50] @ 0x32
- 800e042: 004a lsls r2, r1, #1
- 800e044: b292 uxth r2, r2
- 800e046: 4293 cmp r3, r2
- 800e048: d201 bcs.n 800e04e <tcp_slowtmr+0x126>
- pcb->ssthresh = (tcpwnd_size_t)(pcb->mss << 1);
- 800e04a: f8a4 204a strh.w r2, [r4, #74] @ 0x4a
- pcb->cwnd = pcb->mss;
- 800e04e: f8a4 1048 strh.w r1, [r4, #72] @ 0x48
- pcb->bytes_acked = 0;
- 800e052: 2300 movs r3, #0
- 800e054: f8a4 306a strh.w r3, [r4, #106] @ 0x6a
- tcp_rexmit_rto_commit(pcb);
- 800e058: 4620 mov r0, r4
- 800e05a: f003 f859 bl 8011110 <tcp_rexmit_rto_commit>
- 800e05e: e003 b.n 800e068 <tcp_slowtmr+0x140>
- pcb->rto = (s16_t)LWIP_MIN(calc_rto, 0x7FFF);
- 800e060: f647 73ff movw r3, #32767 @ 0x7fff
- 800e064: e7de b.n 800e024 <tcp_slowtmr+0xfc>
- ++pcb_remove;
- 800e066: 2601 movs r6, #1
- if (pcb->state == FIN_WAIT_2) {
- 800e068: 7d23 ldrb r3, [r4, #20]
- 800e06a: 2b06 cmp r3, #6
- 800e06c: d01f beq.n 800e0ae <tcp_slowtmr+0x186>
- if (ip_get_option(pcb, SOF_KEEPALIVE) &&
- 800e06e: 7a62 ldrb r2, [r4, #9]
- 800e070: f012 0708 ands.w r7, r2, #8
- 800e074: d042 beq.n 800e0fc <tcp_slowtmr+0x1d4>
- 800e076: 2b07 cmp r3, #7
- 800e078: bf18 it ne
- 800e07a: 2b04 cmpne r3, #4
- 800e07c: d13d bne.n 800e0fa <tcp_slowtmr+0x1d2>
- if ((u32_t)(tcp_ticks - pcb->tmr) >
- 800e07e: 4b45 ldr r3, [pc, #276] @ (800e194 <tcp_slowtmr+0x26c>)
- 800e080: 681a ldr r2, [r3, #0]
- 800e082: 6a23 ldr r3, [r4, #32]
- 800e084: 1ad2 subs r2, r2, r3
- (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) {
- 800e086: f8d4 1094 ldr.w r1, [r4, #148] @ 0x94
- 800e08a: 4b4c ldr r3, [pc, #304] @ (800e1bc <tcp_slowtmr+0x294>)
- 800e08c: 440b add r3, r1
- 800e08e: 484c ldr r0, [pc, #304] @ (800e1c0 <tcp_slowtmr+0x298>)
- 800e090: fba0 0303 umull r0, r3, r0, r3
- if ((u32_t)(tcp_ticks - pcb->tmr) >
- 800e094: ebb2 1f53 cmp.w r2, r3, lsr #5
- 800e098: d916 bls.n 800e0c8 <tcp_slowtmr+0x1a0>
- ++pcb_remove;
- 800e09a: 3601 adds r6, #1
- 800e09c: b2f6 uxtb r6, r6
- ++pcb_reset;
- 800e09e: 2701 movs r7, #1
- 800e0a0: e02c b.n 800e0fc <tcp_slowtmr+0x1d4>
- ++pcb_remove; /* max probes reached */
- 800e0a2: 2601 movs r6, #1
- 800e0a4: e7e0 b.n 800e068 <tcp_slowtmr+0x140>
- pcb_remove = 0;
- 800e0a6: 2600 movs r6, #0
- 800e0a8: e7de b.n 800e068 <tcp_slowtmr+0x140>
- 800e0aa: 2600 movs r6, #0
- 800e0ac: e7dc b.n 800e068 <tcp_slowtmr+0x140>
- if (pcb->flags & TF_RXCLOSED) {
- 800e0ae: 8b62 ldrh r2, [r4, #26]
- 800e0b0: f012 0f10 tst.w r2, #16
- 800e0b4: d0db beq.n 800e06e <tcp_slowtmr+0x146>
- if ((u32_t)(tcp_ticks - pcb->tmr) >
- 800e0b6: 6a21 ldr r1, [r4, #32]
- 800e0b8: 4a36 ldr r2, [pc, #216] @ (800e194 <tcp_slowtmr+0x26c>)
- 800e0ba: 6812 ldr r2, [r2, #0]
- 800e0bc: 1a52 subs r2, r2, r1
- 800e0be: 2a28 cmp r2, #40 @ 0x28
- 800e0c0: d9d5 bls.n 800e06e <tcp_slowtmr+0x146>
- ++pcb_remove;
- 800e0c2: 3601 adds r6, #1
- 800e0c4: b2f6 uxtb r6, r6
- LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in FIN-WAIT-2\n"));
- 800e0c6: e7d2 b.n 800e06e <tcp_slowtmr+0x146>
- (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb))
- 800e0c8: f894 309b ldrb.w r3, [r4, #155] @ 0x9b
- 800e0cc: 483d ldr r0, [pc, #244] @ (800e1c4 <tcp_slowtmr+0x29c>)
- 800e0ce: fb00 1103 mla r1, r0, r3, r1
- / TCP_SLOW_INTERVAL) {
- 800e0d2: 4b3b ldr r3, [pc, #236] @ (800e1c0 <tcp_slowtmr+0x298>)
- 800e0d4: fba3 3101 umull r3, r1, r3, r1
- } else if ((u32_t)(tcp_ticks - pcb->tmr) >
- 800e0d8: ebb2 1f51 cmp.w r2, r1, lsr #5
- 800e0dc: d801 bhi.n 800e0e2 <tcp_slowtmr+0x1ba>
- pcb_reset = 0;
- 800e0de: 2700 movs r7, #0
- 800e0e0: e00c b.n 800e0fc <tcp_slowtmr+0x1d4>
- err = tcp_keepalive(pcb);
- 800e0e2: 4620 mov r0, r4
- 800e0e4: f003 f84a bl 801117c <tcp_keepalive>
- if (err == ERR_OK) {
- 800e0e8: 2800 cmp r0, #0
- 800e0ea: d13b bne.n 800e164 <tcp_slowtmr+0x23c>
- pcb->keep_cnt_sent++;
- 800e0ec: f894 309b ldrb.w r3, [r4, #155] @ 0x9b
- 800e0f0: 3301 adds r3, #1
- 800e0f2: f884 309b strb.w r3, [r4, #155] @ 0x9b
- pcb_reset = 0;
- 800e0f6: 2700 movs r7, #0
- 800e0f8: e000 b.n 800e0fc <tcp_slowtmr+0x1d4>
- 800e0fa: 2700 movs r7, #0
- if (pcb->ooseq != NULL &&
- 800e0fc: 6f63 ldr r3, [r4, #116] @ 0x74
- 800e0fe: b153 cbz r3, 800e116 <tcp_slowtmr+0x1ee>
- (tcp_ticks - pcb->tmr >= (u32_t)pcb->rto * TCP_OOSEQ_TIMEOUT)) {
- 800e100: 6a23 ldr r3, [r4, #32]
- 800e102: 4a24 ldr r2, [pc, #144] @ (800e194 <tcp_slowtmr+0x26c>)
- 800e104: 6812 ldr r2, [r2, #0]
- 800e106: 1ad2 subs r2, r2, r3
- 800e108: f9b4 3040 ldrsh.w r3, [r4, #64] @ 0x40
- 800e10c: eb03 0343 add.w r3, r3, r3, lsl #1
- if (pcb->ooseq != NULL &&
- 800e110: ebb2 0f43 cmp.w r2, r3, lsl #1
- 800e114: d228 bcs.n 800e168 <tcp_slowtmr+0x240>
- if (pcb->state == SYN_RCVD) {
- 800e116: 7d23 ldrb r3, [r4, #20]
- 800e118: 2b03 cmp r3, #3
- 800e11a: d029 beq.n 800e170 <tcp_slowtmr+0x248>
- if (pcb->state == LAST_ACK) {
- 800e11c: 2b09 cmp r3, #9
- 800e11e: d030 beq.n 800e182 <tcp_slowtmr+0x25a>
- if (pcb_remove) {
- 800e120: 2e00 cmp r6, #0
- 800e122: d153 bne.n 800e1cc <tcp_slowtmr+0x2a4>
- pcb = pcb->next;
- 800e124: 68e6 ldr r6, [r4, #12]
- ++prev->polltmr;
- 800e126: 7f23 ldrb r3, [r4, #28]
- 800e128: 3301 adds r3, #1
- 800e12a: b2db uxtb r3, r3
- 800e12c: 7723 strb r3, [r4, #28]
- if (prev->polltmr >= prev->pollinterval) {
- 800e12e: 7f62 ldrb r2, [r4, #29]
- 800e130: 4293 cmp r3, r2
- 800e132: f0c0 809a bcc.w 800e26a <tcp_slowtmr+0x342>
- prev->polltmr = 0;
- 800e136: 2300 movs r3, #0
- 800e138: 7723 strb r3, [r4, #28]
- tcp_active_pcbs_changed = 0;
- 800e13a: 4a23 ldr r2, [pc, #140] @ (800e1c8 <tcp_slowtmr+0x2a0>)
- 800e13c: 7013 strb r3, [r2, #0]
- TCP_EVENT_POLL(prev, err);
- 800e13e: f8d4 308c ldr.w r3, [r4, #140] @ 0x8c
- 800e142: 2b00 cmp r3, #0
- 800e144: f000 8089 beq.w 800e25a <tcp_slowtmr+0x332>
- 800e148: 4621 mov r1, r4
- 800e14a: 6920 ldr r0, [r4, #16]
- 800e14c: 4798 blx r3
- if (tcp_active_pcbs_changed) {
- 800e14e: 4b1e ldr r3, [pc, #120] @ (800e1c8 <tcp_slowtmr+0x2a0>)
- 800e150: 781b ldrb r3, [r3, #0]
- 800e152: 2b00 cmp r3, #0
- 800e154: f47f aef3 bne.w 800df3e <tcp_slowtmr+0x16>
- if (err == ERR_OK) {
- 800e158: 2800 cmp r0, #0
- 800e15a: f000 8080 beq.w 800e25e <tcp_slowtmr+0x336>
- prev = pcb;
- 800e15e: 4625 mov r5, r4
- pcb = pcb->next;
- 800e160: 4634 mov r4, r6
- 800e162: e084 b.n 800e26e <tcp_slowtmr+0x346>
- pcb_reset = 0;
- 800e164: 2700 movs r7, #0
- 800e166: e7c9 b.n 800e0fc <tcp_slowtmr+0x1d4>
- tcp_free_ooseq(pcb);
- 800e168: 4620 mov r0, r4
- 800e16a: f7ff fac9 bl 800d700 <tcp_free_ooseq>
- 800e16e: e7d2 b.n 800e116 <tcp_slowtmr+0x1ee>
- if ((u32_t)(tcp_ticks - pcb->tmr) >
- 800e170: 6a21 ldr r1, [r4, #32]
- 800e172: 4a08 ldr r2, [pc, #32] @ (800e194 <tcp_slowtmr+0x26c>)
- 800e174: 6812 ldr r2, [r2, #0]
- 800e176: 1a52 subs r2, r2, r1
- 800e178: 2a28 cmp r2, #40 @ 0x28
- 800e17a: d9cf bls.n 800e11c <tcp_slowtmr+0x1f4>
- ++pcb_remove;
- 800e17c: 3601 adds r6, #1
- 800e17e: b2f6 uxtb r6, r6
- LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in SYN-RCVD\n"));
- 800e180: e7cc b.n 800e11c <tcp_slowtmr+0x1f4>
- if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) {
- 800e182: 6a22 ldr r2, [r4, #32]
- 800e184: 4b03 ldr r3, [pc, #12] @ (800e194 <tcp_slowtmr+0x26c>)
- 800e186: 681b ldr r3, [r3, #0]
- 800e188: 1a9b subs r3, r3, r2
- 800e18a: 2bf0 cmp r3, #240 @ 0xf0
- 800e18c: d9c8 bls.n 800e120 <tcp_slowtmr+0x1f8>
- ++pcb_remove;
- 800e18e: 3601 adds r6, #1
- 800e190: b2f6 uxtb r6, r6
- LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in LAST-ACK\n"));
- 800e192: e7c5 b.n 800e120 <tcp_slowtmr+0x1f8>
- 800e194: 24019be4 .word 0x24019be4
- 800e198: 24019bd0 .word 0x24019bd0
- 800e19c: 24019bd8 .word 0x24019bd8
- 800e1a0: 080165b0 .word 0x080165b0
- 800e1a4: 08016a70 .word 0x08016a70
- 800e1a8: 080144e8 .word 0x080144e8
- 800e1ac: 08016a9c .word 0x08016a9c
- 800e1b0: 08016ac8 .word 0x08016ac8
- 800e1b4: 08016b2c .word 0x08016b2c
- 800e1b8: 08016c54 .word 0x08016c54
- 800e1bc: 000a4cb8 .word 0x000a4cb8
- 800e1c0: 10624dd3 .word 0x10624dd3
- 800e1c4: 000124f8 .word 0x000124f8
- 800e1c8: 24019bd2 .word 0x24019bd2
- tcp_err_fn err_fn = pcb->errf;
- 800e1cc: f8d4 8090 ldr.w r8, [r4, #144] @ 0x90
- tcp_pcb_purge(pcb);
- 800e1d0: 4620 mov r0, r4
- 800e1d2: f7ff fa9f bl 800d714 <tcp_pcb_purge>
- if (prev != NULL) {
- 800e1d6: b325 cbz r5, 800e222 <tcp_slowtmr+0x2fa>
- LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs);
- 800e1d8: 4b6f ldr r3, [pc, #444] @ (800e398 <tcp_slowtmr+0x470>)
- 800e1da: 681b ldr r3, [r3, #0]
- 800e1dc: 429c cmp r4, r3
- 800e1de: d018 beq.n 800e212 <tcp_slowtmr+0x2ea>
- prev->next = pcb->next;
- 800e1e0: 68e3 ldr r3, [r4, #12]
- 800e1e2: 60eb str r3, [r5, #12]
- if (pcb_reset) {
- 800e1e4: bb67 cbnz r7, 800e240 <tcp_slowtmr+0x318>
- err_arg = pcb->callback_arg;
- 800e1e6: 6926 ldr r6, [r4, #16]
- pcb = pcb->next;
- 800e1e8: 68e7 ldr r7, [r4, #12]
- tcp_free(pcb2);
- 800e1ea: 4620 mov r0, r4
- 800e1ec: f7ff f84a bl 800d284 <tcp_free>
- tcp_active_pcbs_changed = 0;
- 800e1f0: 4b6a ldr r3, [pc, #424] @ (800e39c <tcp_slowtmr+0x474>)
- 800e1f2: 2200 movs r2, #0
- 800e1f4: 701a strb r2, [r3, #0]
- TCP_EVENT_ERR(last_state, err_fn, err_arg, ERR_ABRT);
- 800e1f6: f1b8 0f00 cmp.w r8, #0
- 800e1fa: d003 beq.n 800e204 <tcp_slowtmr+0x2dc>
- 800e1fc: f06f 010c mvn.w r1, #12
- 800e200: 4630 mov r0, r6
- 800e202: 47c0 blx r8
- if (tcp_active_pcbs_changed) {
- 800e204: 4b65 ldr r3, [pc, #404] @ (800e39c <tcp_slowtmr+0x474>)
- 800e206: 781b ldrb r3, [r3, #0]
- 800e208: 2b00 cmp r3, #0
- 800e20a: f47f ae98 bne.w 800df3e <tcp_slowtmr+0x16>
- pcb = pcb->next;
- 800e20e: 463c mov r4, r7
- 800e210: e02d b.n 800e26e <tcp_slowtmr+0x346>
- LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs);
- 800e212: 4b63 ldr r3, [pc, #396] @ (800e3a0 <tcp_slowtmr+0x478>)
- 800e214: f240 526d movw r2, #1389 @ 0x56d
- 800e218: 4962 ldr r1, [pc, #392] @ (800e3a4 <tcp_slowtmr+0x47c>)
- 800e21a: 4863 ldr r0, [pc, #396] @ (800e3a8 <tcp_slowtmr+0x480>)
- 800e21c: f005 f8f4 bl 8013408 <iprintf>
- 800e220: e7de b.n 800e1e0 <tcp_slowtmr+0x2b8>
- LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb);
- 800e222: 4b5d ldr r3, [pc, #372] @ (800e398 <tcp_slowtmr+0x470>)
- 800e224: 681b ldr r3, [r3, #0]
- 800e226: 429c cmp r4, r3
- 800e228: d006 beq.n 800e238 <tcp_slowtmr+0x310>
- 800e22a: 4b5d ldr r3, [pc, #372] @ (800e3a0 <tcp_slowtmr+0x478>)
- 800e22c: f240 5271 movw r2, #1393 @ 0x571
- 800e230: 495e ldr r1, [pc, #376] @ (800e3ac <tcp_slowtmr+0x484>)
- 800e232: 485d ldr r0, [pc, #372] @ (800e3a8 <tcp_slowtmr+0x480>)
- 800e234: f005 f8e8 bl 8013408 <iprintf>
- tcp_active_pcbs = pcb->next;
- 800e238: 68e2 ldr r2, [r4, #12]
- 800e23a: 4b57 ldr r3, [pc, #348] @ (800e398 <tcp_slowtmr+0x470>)
- 800e23c: 601a str r2, [r3, #0]
- 800e23e: e7d1 b.n 800e1e4 <tcp_slowtmr+0x2bc>
- tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip,
- 800e240: 1d23 adds r3, r4, #4
- 800e242: 6a62 ldr r2, [r4, #36] @ 0x24
- 800e244: 6d21 ldr r1, [r4, #80] @ 0x50
- 800e246: 8b20 ldrh r0, [r4, #24]
- 800e248: 9002 str r0, [sp, #8]
- 800e24a: 8ae0 ldrh r0, [r4, #22]
- 800e24c: 9001 str r0, [sp, #4]
- 800e24e: 9300 str r3, [sp, #0]
- 800e250: 4623 mov r3, r4
- 800e252: 4620 mov r0, r4
- 800e254: f002 fd84 bl 8010d60 <tcp_rst>
- 800e258: e7c5 b.n 800e1e6 <tcp_slowtmr+0x2be>
- TCP_EVENT_POLL(prev, err);
- 800e25a: 2000 movs r0, #0
- 800e25c: e777 b.n 800e14e <tcp_slowtmr+0x226>
- tcp_output(prev);
- 800e25e: 4620 mov r0, r4
- 800e260: f002 fe00 bl 8010e64 <tcp_output>
- prev = pcb;
- 800e264: 4625 mov r5, r4
- pcb = pcb->next;
- 800e266: 4634 mov r4, r6
- 800e268: e001 b.n 800e26e <tcp_slowtmr+0x346>
- prev = pcb;
- 800e26a: 4625 mov r5, r4
- pcb = pcb->next;
- 800e26c: 4634 mov r4, r6
- while (pcb != NULL) {
- 800e26e: 2c00 cmp r4, #0
- 800e270: d050 beq.n 800e314 <tcp_slowtmr+0x3ec>
- LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED);
- 800e272: 7d23 ldrb r3, [r4, #20]
- 800e274: 2b00 cmp r3, #0
- 800e276: f43f ae66 beq.w 800df46 <tcp_slowtmr+0x1e>
- LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN);
- 800e27a: 7d23 ldrb r3, [r4, #20]
- 800e27c: 2b01 cmp r3, #1
- 800e27e: f43f ae6a beq.w 800df56 <tcp_slowtmr+0x2e>
- LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT);
- 800e282: 7d23 ldrb r3, [r4, #20]
- 800e284: 2b0a cmp r3, #10
- 800e286: f43f ae6e beq.w 800df66 <tcp_slowtmr+0x3e>
- if (pcb->last_timer == tcp_timer_ctr) {
- 800e28a: 7fa2 ldrb r2, [r4, #30]
- 800e28c: 4b48 ldr r3, [pc, #288] @ (800e3b0 <tcp_slowtmr+0x488>)
- 800e28e: 781b ldrb r3, [r3, #0]
- 800e290: 429a cmp r2, r3
- 800e292: f43f ae70 beq.w 800df76 <tcp_slowtmr+0x4e>
- pcb->last_timer = tcp_timer_ctr;
- 800e296: 77a3 strb r3, [r4, #30]
- if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) {
- 800e298: 7d23 ldrb r3, [r4, #20]
- 800e29a: 2b02 cmp r3, #2
- 800e29c: f43f ae6e beq.w 800df7c <tcp_slowtmr+0x54>
- } else if (pcb->nrtx >= TCP_MAXRTX) {
- 800e2a0: f894 3042 ldrb.w r3, [r4, #66] @ 0x42
- 800e2a4: 2b0b cmp r3, #11
- 800e2a6: f63f aede bhi.w 800e066 <tcp_slowtmr+0x13e>
- if (pcb->persist_backoff > 0) {
- 800e2aa: f894 6099 ldrb.w r6, [r4, #153] @ 0x99
- 800e2ae: 2e00 cmp r6, #0
- 800e2b0: f43f ae8a beq.w 800dfc8 <tcp_slowtmr+0xa0>
- LWIP_ASSERT("tcp_slowtimr: persist ticking with in-flight data", pcb->unacked == NULL);
- 800e2b4: 6f23 ldr r3, [r4, #112] @ 0x70
- 800e2b6: b133 cbz r3, 800e2c6 <tcp_slowtmr+0x39e>
- 800e2b8: 4b39 ldr r3, [pc, #228] @ (800e3a0 <tcp_slowtmr+0x478>)
- 800e2ba: f240 42d4 movw r2, #1236 @ 0x4d4
- 800e2be: 493d ldr r1, [pc, #244] @ (800e3b4 <tcp_slowtmr+0x48c>)
- 800e2c0: 4839 ldr r0, [pc, #228] @ (800e3a8 <tcp_slowtmr+0x480>)
- 800e2c2: f005 f8a1 bl 8013408 <iprintf>
- LWIP_ASSERT("tcp_slowtimr: persist ticking with empty send buffer", pcb->unsent != NULL);
- 800e2c6: 6ee3 ldr r3, [r4, #108] @ 0x6c
- 800e2c8: 2b00 cmp r3, #0
- 800e2ca: f43f ae5e beq.w 800df8a <tcp_slowtmr+0x62>
- if (pcb->persist_probe >= TCP_MAXRTX) {
- 800e2ce: f894 309a ldrb.w r3, [r4, #154] @ 0x9a
- 800e2d2: 2b0b cmp r3, #11
- 800e2d4: f63f aee5 bhi.w 800e0a2 <tcp_slowtmr+0x17a>
- u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff - 1];
- 800e2d8: f894 3099 ldrb.w r3, [r4, #153] @ 0x99
- 800e2dc: 3b01 subs r3, #1
- 800e2de: 4a36 ldr r2, [pc, #216] @ (800e3b8 <tcp_slowtmr+0x490>)
- 800e2e0: 5cd2 ldrb r2, [r2, r3]
- if (pcb->persist_cnt < backoff_cnt) {
- 800e2e2: f894 3098 ldrb.w r3, [r4, #152] @ 0x98
- 800e2e6: 4293 cmp r3, r2
- 800e2e8: d202 bcs.n 800e2f0 <tcp_slowtmr+0x3c8>
- pcb->persist_cnt++;
- 800e2ea: 3301 adds r3, #1
- 800e2ec: f884 3098 strb.w r3, [r4, #152] @ 0x98
- if (pcb->persist_cnt >= backoff_cnt) {
- 800e2f0: f894 3098 ldrb.w r3, [r4, #152] @ 0x98
- 800e2f4: 4293 cmp r3, r2
- 800e2f6: f4ff aed6 bcc.w 800e0a6 <tcp_slowtmr+0x17e>
- if (pcb->snd_wnd == 0) {
- 800e2fa: f8b4 1060 ldrh.w r1, [r4, #96] @ 0x60
- 800e2fe: 2900 cmp r1, #0
- 800e300: f47f ae4b bne.w 800df9a <tcp_slowtmr+0x72>
- if (tcp_zero_window_probe(pcb) != ERR_OK) {
- 800e304: 4620 mov r0, r4
- 800e306: f002 ff67 bl 80111d8 <tcp_zero_window_probe>
- 800e30a: 2800 cmp r0, #0
- 800e30c: f43f ae49 beq.w 800dfa2 <tcp_slowtmr+0x7a>
- pcb_remove = 0;
- 800e310: 2600 movs r6, #0
- 800e312: e6a9 b.n 800e068 <tcp_slowtmr+0x140>
- pcb = tcp_tw_pcbs;
- 800e314: 4b29 ldr r3, [pc, #164] @ (800e3bc <tcp_slowtmr+0x494>)
- 800e316: 681d ldr r5, [r3, #0]
- while (pcb != NULL) {
- 800e318: e007 b.n 800e32a <tcp_slowtmr+0x402>
- if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) {
- 800e31a: 6a2a ldr r2, [r5, #32]
- 800e31c: 4b28 ldr r3, [pc, #160] @ (800e3c0 <tcp_slowtmr+0x498>)
- 800e31e: 681b ldr r3, [r3, #0]
- 800e320: 1a9b subs r3, r3, r2
- 800e322: 2bf0 cmp r3, #240 @ 0xf0
- 800e324: d80e bhi.n 800e344 <tcp_slowtmr+0x41c>
- prev = pcb;
- 800e326: 462c mov r4, r5
- pcb = pcb->next;
- 800e328: 68ed ldr r5, [r5, #12]
- while (pcb != NULL) {
- 800e32a: 2d00 cmp r5, #0
- 800e32c: d031 beq.n 800e392 <tcp_slowtmr+0x46a>
- LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
- 800e32e: 7d2b ldrb r3, [r5, #20]
- 800e330: 2b0a cmp r3, #10
- 800e332: d0f2 beq.n 800e31a <tcp_slowtmr+0x3f2>
- 800e334: 4b1a ldr r3, [pc, #104] @ (800e3a0 <tcp_slowtmr+0x478>)
- 800e336: f240 52a1 movw r2, #1441 @ 0x5a1
- 800e33a: 4922 ldr r1, [pc, #136] @ (800e3c4 <tcp_slowtmr+0x49c>)
- 800e33c: 481a ldr r0, [pc, #104] @ (800e3a8 <tcp_slowtmr+0x480>)
- 800e33e: f005 f863 bl 8013408 <iprintf>
- 800e342: e7ea b.n 800e31a <tcp_slowtmr+0x3f2>
- tcp_pcb_purge(pcb);
- 800e344: 4628 mov r0, r5
- 800e346: f7ff f9e5 bl 800d714 <tcp_pcb_purge>
- if (prev != NULL) {
- 800e34a: b19c cbz r4, 800e374 <tcp_slowtmr+0x44c>
- LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs);
- 800e34c: 4b1b ldr r3, [pc, #108] @ (800e3bc <tcp_slowtmr+0x494>)
- 800e34e: 681b ldr r3, [r3, #0]
- 800e350: 429d cmp r5, r3
- 800e352: d007 beq.n 800e364 <tcp_slowtmr+0x43c>
- prev->next = pcb->next;
- 800e354: 68eb ldr r3, [r5, #12]
- 800e356: 60e3 str r3, [r4, #12]
- pcb = pcb->next;
- 800e358: 68ee ldr r6, [r5, #12]
- tcp_free(pcb2);
- 800e35a: 4628 mov r0, r5
- 800e35c: f7fe ff92 bl 800d284 <tcp_free>
- pcb = pcb->next;
- 800e360: 4635 mov r5, r6
- 800e362: e7e2 b.n 800e32a <tcp_slowtmr+0x402>
- LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs);
- 800e364: 4b0e ldr r3, [pc, #56] @ (800e3a0 <tcp_slowtmr+0x478>)
- 800e366: f240 52af movw r2, #1455 @ 0x5af
- 800e36a: 4917 ldr r1, [pc, #92] @ (800e3c8 <tcp_slowtmr+0x4a0>)
- 800e36c: 480e ldr r0, [pc, #56] @ (800e3a8 <tcp_slowtmr+0x480>)
- 800e36e: f005 f84b bl 8013408 <iprintf>
- 800e372: e7ef b.n 800e354 <tcp_slowtmr+0x42c>
- LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb);
- 800e374: 4b11 ldr r3, [pc, #68] @ (800e3bc <tcp_slowtmr+0x494>)
- 800e376: 681b ldr r3, [r3, #0]
- 800e378: 429d cmp r5, r3
- 800e37a: d006 beq.n 800e38a <tcp_slowtmr+0x462>
- 800e37c: 4b08 ldr r3, [pc, #32] @ (800e3a0 <tcp_slowtmr+0x478>)
- 800e37e: f240 52b3 movw r2, #1459 @ 0x5b3
- 800e382: 4912 ldr r1, [pc, #72] @ (800e3cc <tcp_slowtmr+0x4a4>)
- 800e384: 4808 ldr r0, [pc, #32] @ (800e3a8 <tcp_slowtmr+0x480>)
- 800e386: f005 f83f bl 8013408 <iprintf>
- tcp_tw_pcbs = pcb->next;
- 800e38a: 68ea ldr r2, [r5, #12]
- 800e38c: 4b0b ldr r3, [pc, #44] @ (800e3bc <tcp_slowtmr+0x494>)
- 800e38e: 601a str r2, [r3, #0]
- 800e390: e7e2 b.n 800e358 <tcp_slowtmr+0x430>
- }
- 800e392: b004 add sp, #16
- 800e394: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- 800e398: 24019bd8 .word 0x24019bd8
- 800e39c: 24019bd2 .word 0x24019bd2
- 800e3a0: 080165b0 .word 0x080165b0
- 800e3a4: 08016b64 .word 0x08016b64
- 800e3a8: 080144e8 .word 0x080144e8
- 800e3ac: 08016b90 .word 0x08016b90
- 800e3b0: 24019bd0 .word 0x24019bd0
- 800e3b4: 08016af8 .word 0x08016af8
- 800e3b8: 08016c4c .word 0x08016c4c
- 800e3bc: 24019bd4 .word 0x24019bd4
- 800e3c0: 24019be4 .word 0x24019be4
- 800e3c4: 08016bbc .word 0x08016bbc
- 800e3c8: 08016bec .word 0x08016bec
- 800e3cc: 08016c14 .word 0x08016c14
- 0800e3d0 <tcp_tmr>:
- {
- 800e3d0: b508 push {r3, lr}
- tcp_fasttmr();
- 800e3d2: f7ff fd25 bl 800de20 <tcp_fasttmr>
- if (++tcp_timer & 1) {
- 800e3d6: 4a06 ldr r2, [pc, #24] @ (800e3f0 <tcp_tmr+0x20>)
- 800e3d8: 7813 ldrb r3, [r2, #0]
- 800e3da: 3301 adds r3, #1
- 800e3dc: b2db uxtb r3, r3
- 800e3de: 7013 strb r3, [r2, #0]
- 800e3e0: f013 0f01 tst.w r3, #1
- 800e3e4: d100 bne.n 800e3e8 <tcp_tmr+0x18>
- }
- 800e3e6: bd08 pop {r3, pc}
- tcp_slowtmr();
- 800e3e8: f7ff fd9e bl 800df28 <tcp_slowtmr>
- }
- 800e3ec: e7fb b.n 800e3e6 <tcp_tmr+0x16>
- 800e3ee: bf00 nop
- 800e3f0: 24019bd1 .word 0x24019bd1
- 0800e3f4 <tcp_get_next_optbyte>:
- }
- static u8_t
- tcp_get_next_optbyte(void)
- {
- u16_t optidx = tcp_optidx++;
- 800e3f4: 4a0a ldr r2, [pc, #40] @ (800e420 <tcp_get_next_optbyte+0x2c>)
- 800e3f6: 8813 ldrh r3, [r2, #0]
- 800e3f8: 1c59 adds r1, r3, #1
- 800e3fa: 8011 strh r1, [r2, #0]
- if ((tcphdr_opt2 == NULL) || (optidx < tcphdr_opt1len)) {
- 800e3fc: 4a09 ldr r2, [pc, #36] @ (800e424 <tcp_get_next_optbyte+0x30>)
- 800e3fe: 6811 ldr r1, [r2, #0]
- 800e400: b119 cbz r1, 800e40a <tcp_get_next_optbyte+0x16>
- 800e402: 4a09 ldr r2, [pc, #36] @ (800e428 <tcp_get_next_optbyte+0x34>)
- 800e404: 8812 ldrh r2, [r2, #0]
- 800e406: 4293 cmp r3, r2
- 800e408: d204 bcs.n 800e414 <tcp_get_next_optbyte+0x20>
- u8_t *opts = (u8_t *)tcphdr + TCP_HLEN;
- 800e40a: 4a08 ldr r2, [pc, #32] @ (800e42c <tcp_get_next_optbyte+0x38>)
- 800e40c: 6812 ldr r2, [r2, #0]
- return opts[optidx];
- 800e40e: 4413 add r3, r2
- 800e410: 7d18 ldrb r0, [r3, #20]
- 800e412: 4770 bx lr
- } else {
- u8_t idx = (u8_t)(optidx - tcphdr_opt1len);
- 800e414: b2db uxtb r3, r3
- 800e416: b2d2 uxtb r2, r2
- 800e418: 1a9b subs r3, r3, r2
- 800e41a: b2db uxtb r3, r3
- return tcphdr_opt2[idx];
- 800e41c: 5cc8 ldrb r0, [r1, r3]
- }
- }
- 800e41e: 4770 bx lr
- 800e420: 24019c00 .word 0x24019c00
- 800e424: 24019c04 .word 0x24019c04
- 800e428: 24019c08 .word 0x24019c08
- 800e42c: 24019c0c .word 0x24019c0c
- 0800e430 <tcp_parseopt>:
- *
- * @param pcb the tcp_pcb for which a segment arrived
- */
- static void
- tcp_parseopt(struct tcp_pcb *pcb)
- {
- 800e430: b538 push {r3, r4, r5, lr}
- u16_t mss;
- #if LWIP_TCP_TIMESTAMPS
- u32_t tsval;
- #endif
- LWIP_ASSERT("tcp_parseopt: invalid pcb", pcb != NULL);
- 800e432: 4604 mov r4, r0
- 800e434: b1e8 cbz r0, 800e472 <tcp_parseopt+0x42>
- /* Parse the TCP MSS option, if present. */
- if (tcphdr_optlen != 0) {
- 800e436: 4b22 ldr r3, [pc, #136] @ (800e4c0 <tcp_parseopt+0x90>)
- 800e438: 881b ldrh r3, [r3, #0]
- 800e43a: 2b00 cmp r3, #0
- 800e43c: d03e beq.n 800e4bc <tcp_parseopt+0x8c>
- for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) {
- 800e43e: 4b21 ldr r3, [pc, #132] @ (800e4c4 <tcp_parseopt+0x94>)
- 800e440: 2200 movs r2, #0
- 800e442: 801a strh r2, [r3, #0]
- 800e444: 4b1f ldr r3, [pc, #124] @ (800e4c4 <tcp_parseopt+0x94>)
- 800e446: 881a ldrh r2, [r3, #0]
- 800e448: 4b1d ldr r3, [pc, #116] @ (800e4c0 <tcp_parseopt+0x90>)
- 800e44a: 881b ldrh r3, [r3, #0]
- 800e44c: 429a cmp r2, r3
- 800e44e: d235 bcs.n 800e4bc <tcp_parseopt+0x8c>
- u8_t opt = tcp_get_next_optbyte();
- 800e450: f7ff ffd0 bl 800e3f4 <tcp_get_next_optbyte>
- switch (opt) {
- 800e454: 2801 cmp r0, #1
- 800e456: d0f5 beq.n 800e444 <tcp_parseopt+0x14>
- 800e458: 2802 cmp r0, #2
- 800e45a: d012 beq.n 800e482 <tcp_parseopt+0x52>
- 800e45c: b370 cbz r0, 800e4bc <tcp_parseopt+0x8c>
- }
- break;
- #endif /* LWIP_TCP_SACK_OUT */
- default:
- LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n"));
- data = tcp_get_next_optbyte();
- 800e45e: f7ff ffc9 bl 800e3f4 <tcp_get_next_optbyte>
- if (data < 2) {
- 800e462: 2801 cmp r0, #1
- 800e464: d92a bls.n 800e4bc <tcp_parseopt+0x8c>
- 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;
- 800e466: 4b17 ldr r3, [pc, #92] @ (800e4c4 <tcp_parseopt+0x94>)
- 800e468: 881a ldrh r2, [r3, #0]
- 800e46a: 4410 add r0, r2
- 800e46c: 3802 subs r0, #2
- 800e46e: 8018 strh r0, [r3, #0]
- 800e470: e7e8 b.n 800e444 <tcp_parseopt+0x14>
- LWIP_ASSERT("tcp_parseopt: invalid pcb", pcb != NULL);
- 800e472: 4b15 ldr r3, [pc, #84] @ (800e4c8 <tcp_parseopt+0x98>)
- 800e474: f240 727d movw r2, #1917 @ 0x77d
- 800e478: 4914 ldr r1, [pc, #80] @ (800e4cc <tcp_parseopt+0x9c>)
- 800e47a: 4815 ldr r0, [pc, #84] @ (800e4d0 <tcp_parseopt+0xa0>)
- 800e47c: f004 ffc4 bl 8013408 <iprintf>
- 800e480: e7d9 b.n 800e436 <tcp_parseopt+0x6>
- if (tcp_get_next_optbyte() != LWIP_TCP_OPT_LEN_MSS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_MSS) > tcphdr_optlen) {
- 800e482: f7ff ffb7 bl 800e3f4 <tcp_get_next_optbyte>
- 800e486: 2804 cmp r0, #4
- 800e488: d118 bne.n 800e4bc <tcp_parseopt+0x8c>
- 800e48a: 4b0e ldr r3, [pc, #56] @ (800e4c4 <tcp_parseopt+0x94>)
- 800e48c: 881b ldrh r3, [r3, #0]
- 800e48e: 3301 adds r3, #1
- 800e490: 4a0b ldr r2, [pc, #44] @ (800e4c0 <tcp_parseopt+0x90>)
- 800e492: 8812 ldrh r2, [r2, #0]
- 800e494: 4293 cmp r3, r2
- 800e496: da11 bge.n 800e4bc <tcp_parseopt+0x8c>
- mss = (u16_t)(tcp_get_next_optbyte() << 8);
- 800e498: f7ff ffac bl 800e3f4 <tcp_get_next_optbyte>
- 800e49c: 0205 lsls r5, r0, #8
- 800e49e: b2ad uxth r5, r5
- mss |= tcp_get_next_optbyte();
- 800e4a0: f7ff ffa8 bl 800e3f4 <tcp_get_next_optbyte>
- 800e4a4: 4328 orrs r0, r5
- 800e4a6: b280 uxth r0, r0
- pcb->mss = ((mss > TCP_MSS) || (mss == 0)) ? TCP_MSS : mss;
- 800e4a8: 1e43 subs r3, r0, #1
- 800e4aa: b29b uxth r3, r3
- 800e4ac: f240 52b3 movw r2, #1459 @ 0x5b3
- 800e4b0: 4293 cmp r3, r2
- 800e4b2: d901 bls.n 800e4b8 <tcp_parseopt+0x88>
- 800e4b4: f240 50b4 movw r0, #1460 @ 0x5b4
- 800e4b8: 8660 strh r0, [r4, #50] @ 0x32
- break;
- 800e4ba: e7c3 b.n 800e444 <tcp_parseopt+0x14>
- }
- }
- }
- }
- 800e4bc: bd38 pop {r3, r4, r5, pc}
- 800e4be: bf00 nop
- 800e4c0: 24019c0a .word 0x24019c0a
- 800e4c4: 24019c00 .word 0x24019c00
- 800e4c8: 08016c64 .word 0x08016c64
- 800e4cc: 08016cc8 .word 0x08016cc8
- 800e4d0: 080144e8 .word 0x080144e8
- 0800e4d4 <tcp_input_delayed_close>:
- {
- 800e4d4: b510 push {r4, lr}
- LWIP_ASSERT("tcp_input_delayed_close: invalid pcb", pcb != NULL);
- 800e4d6: 4604 mov r4, r0
- 800e4d8: b130 cbz r0, 800e4e8 <tcp_input_delayed_close+0x14>
- if (recv_flags & TF_CLOSED) {
- 800e4da: 4b11 ldr r3, [pc, #68] @ (800e520 <tcp_input_delayed_close+0x4c>)
- 800e4dc: 781b ldrb r3, [r3, #0]
- 800e4de: f013 0f10 tst.w r3, #16
- 800e4e2: d109 bne.n 800e4f8 <tcp_input_delayed_close+0x24>
- return 0;
- 800e4e4: 2000 movs r0, #0
- }
- 800e4e6: bd10 pop {r4, pc}
- LWIP_ASSERT("tcp_input_delayed_close: invalid pcb", pcb != NULL);
- 800e4e8: 4b0e ldr r3, [pc, #56] @ (800e524 <tcp_input_delayed_close+0x50>)
- 800e4ea: f240 225a movw r2, #602 @ 0x25a
- 800e4ee: 490e ldr r1, [pc, #56] @ (800e528 <tcp_input_delayed_close+0x54>)
- 800e4f0: 480e ldr r0, [pc, #56] @ (800e52c <tcp_input_delayed_close+0x58>)
- 800e4f2: f004 ff89 bl 8013408 <iprintf>
- 800e4f6: e7f0 b.n 800e4da <tcp_input_delayed_close+0x6>
- if (!(pcb->flags & TF_RXCLOSED)) {
- 800e4f8: 8b63 ldrh r3, [r4, #26]
- 800e4fa: f013 0f10 tst.w r3, #16
- 800e4fe: d106 bne.n 800e50e <tcp_input_delayed_close+0x3a>
- TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_CLSD);
- 800e500: f8d4 3090 ldr.w r3, [r4, #144] @ 0x90
- 800e504: b11b cbz r3, 800e50e <tcp_input_delayed_close+0x3a>
- 800e506: f06f 010e mvn.w r1, #14
- 800e50a: 6920 ldr r0, [r4, #16]
- 800e50c: 4798 blx r3
- tcp_pcb_remove(&tcp_active_pcbs, pcb);
- 800e50e: 4621 mov r1, r4
- 800e510: 4807 ldr r0, [pc, #28] @ (800e530 <tcp_input_delayed_close+0x5c>)
- 800e512: f7ff f931 bl 800d778 <tcp_pcb_remove>
- tcp_free(pcb);
- 800e516: 4620 mov r0, r4
- 800e518: f7fe feb4 bl 800d284 <tcp_free>
- return 1;
- 800e51c: 2001 movs r0, #1
- 800e51e: e7e2 b.n 800e4e6 <tcp_input_delayed_close+0x12>
- 800e520: 24019bf0 .word 0x24019bf0
- 800e524: 08016c64 .word 0x08016c64
- 800e528: 08016ce4 .word 0x08016ce4
- 800e52c: 080144e8 .word 0x080144e8
- 800e530: 24019bd8 .word 0x24019bd8
- 0800e534 <tcp_timewait_input>:
- if (flags & TCP_RST) {
- 800e534: 4b23 ldr r3, [pc, #140] @ (800e5c4 <tcp_timewait_input+0x90>)
- 800e536: 781b ldrb r3, [r3, #0]
- 800e538: f013 0f04 tst.w r3, #4
- 800e53c: d141 bne.n 800e5c2 <tcp_timewait_input+0x8e>
- {
- 800e53e: b530 push {r4, r5, lr}
- 800e540: b085 sub sp, #20
- 800e542: 4604 mov r4, r0
- LWIP_ASSERT("tcp_timewait_input: invalid pcb", pcb != NULL);
- 800e544: b1a0 cbz r0, 800e570 <tcp_timewait_input+0x3c>
- if (flags & TCP_SYN) {
- 800e546: 4b1f ldr r3, [pc, #124] @ (800e5c4 <tcp_timewait_input+0x90>)
- 800e548: 781b ldrb r3, [r3, #0]
- 800e54a: f013 0f02 tst.w r3, #2
- 800e54e: d029 beq.n 800e5a4 <tcp_timewait_input+0x70>
- if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd)) {
- 800e550: 4b1d ldr r3, [pc, #116] @ (800e5c8 <tcp_timewait_input+0x94>)
- 800e552: 681a ldr r2, [r3, #0]
- 800e554: 6a63 ldr r3, [r4, #36] @ 0x24
- 800e556: 1ad1 subs r1, r2, r3
- 800e558: 2900 cmp r1, #0
- 800e55a: db04 blt.n 800e566 <tcp_timewait_input+0x32>
- 800e55c: 8d21 ldrh r1, [r4, #40] @ 0x28
- 800e55e: 440b add r3, r1
- 800e560: 1ad3 subs r3, r2, r3
- 800e562: 2b00 cmp r3, #0
- 800e564: dd0c ble.n 800e580 <tcp_timewait_input+0x4c>
- if ((tcplen > 0)) {
- 800e566: 4b19 ldr r3, [pc, #100] @ (800e5cc <tcp_timewait_input+0x98>)
- 800e568: 881b ldrh r3, [r3, #0]
- 800e56a: bb13 cbnz r3, 800e5b2 <tcp_timewait_input+0x7e>
- }
- 800e56c: b005 add sp, #20
- 800e56e: bd30 pop {r4, r5, pc}
- LWIP_ASSERT("tcp_timewait_input: invalid pcb", pcb != NULL);
- 800e570: 4b17 ldr r3, [pc, #92] @ (800e5d0 <tcp_timewait_input+0x9c>)
- 800e572: f240 22ee movw r2, #750 @ 0x2ee
- 800e576: 4917 ldr r1, [pc, #92] @ (800e5d4 <tcp_timewait_input+0xa0>)
- 800e578: 4817 ldr r0, [pc, #92] @ (800e5d8 <tcp_timewait_input+0xa4>)
- 800e57a: f004 ff45 bl 8013408 <iprintf>
- 800e57e: e7e2 b.n 800e546 <tcp_timewait_input+0x12>
- ip_current_src_addr(), tcphdr->dest, tcphdr->src);
- 800e580: 4b16 ldr r3, [pc, #88] @ (800e5dc <tcp_timewait_input+0xa8>)
- 800e582: 6819 ldr r1, [r3, #0]
- tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
- 800e584: 4b16 ldr r3, [pc, #88] @ (800e5e0 <tcp_timewait_input+0xac>)
- 800e586: 4811 ldr r0, [pc, #68] @ (800e5cc <tcp_timewait_input+0x98>)
- 800e588: 8800 ldrh r0, [r0, #0]
- 800e58a: 880d ldrh r5, [r1, #0]
- 800e58c: 9502 str r5, [sp, #8]
- 800e58e: 8849 ldrh r1, [r1, #2]
- 800e590: 9101 str r1, [sp, #4]
- 800e592: 1f19 subs r1, r3, #4
- 800e594: 9100 str r1, [sp, #0]
- 800e596: 4402 add r2, r0
- 800e598: 4912 ldr r1, [pc, #72] @ (800e5e4 <tcp_timewait_input+0xb0>)
- 800e59a: 6809 ldr r1, [r1, #0]
- 800e59c: 4620 mov r0, r4
- 800e59e: f002 fbdf bl 8010d60 <tcp_rst>
- return;
- 800e5a2: e7e3 b.n 800e56c <tcp_timewait_input+0x38>
- } else if (flags & TCP_FIN) {
- 800e5a4: f013 0f01 tst.w r3, #1
- 800e5a8: d0dd beq.n 800e566 <tcp_timewait_input+0x32>
- pcb->tmr = tcp_ticks;
- 800e5aa: 4b0f ldr r3, [pc, #60] @ (800e5e8 <tcp_timewait_input+0xb4>)
- 800e5ac: 681b ldr r3, [r3, #0]
- 800e5ae: 6223 str r3, [r4, #32]
- 800e5b0: e7d9 b.n 800e566 <tcp_timewait_input+0x32>
- tcp_ack_now(pcb);
- 800e5b2: 8b63 ldrh r3, [r4, #26]
- 800e5b4: f043 0302 orr.w r3, r3, #2
- 800e5b8: 8363 strh r3, [r4, #26]
- tcp_output(pcb);
- 800e5ba: 4620 mov r0, r4
- 800e5bc: f002 fc52 bl 8010e64 <tcp_output>
- 800e5c0: e7d4 b.n 800e56c <tcp_timewait_input+0x38>
- 800e5c2: 4770 bx lr
- 800e5c4: 24019bf1 .word 0x24019bf1
- 800e5c8: 24019bfc .word 0x24019bfc
- 800e5cc: 24019bf2 .word 0x24019bf2
- 800e5d0: 08016c64 .word 0x08016c64
- 800e5d4: 08016d0c .word 0x08016d0c
- 800e5d8: 080144e8 .word 0x080144e8
- 800e5dc: 24019c0c .word 0x24019c0c
- 800e5e0: 24013030 .word 0x24013030
- 800e5e4: 24019bf8 .word 0x24019bf8
- 800e5e8: 24019be4 .word 0x24019be4
- 0800e5ec <tcp_listen_input>:
- if (flags & TCP_RST) {
- 800e5ec: 4b47 ldr r3, [pc, #284] @ (800e70c <tcp_listen_input+0x120>)
- 800e5ee: 781b ldrb r3, [r3, #0]
- 800e5f0: f013 0f04 tst.w r3, #4
- 800e5f4: f040 8088 bne.w 800e708 <tcp_listen_input+0x11c>
- {
- 800e5f8: b5f0 push {r4, r5, r6, r7, lr}
- 800e5fa: b085 sub sp, #20
- 800e5fc: 4604 mov r4, r0
- LWIP_ASSERT("tcp_listen_input: invalid pcb", pcb != NULL);
- 800e5fe: b148 cbz r0, 800e614 <tcp_listen_input+0x28>
- if (flags & TCP_ACK) {
- 800e600: 4b42 ldr r3, [pc, #264] @ (800e70c <tcp_listen_input+0x120>)
- 800e602: 781b ldrb r3, [r3, #0]
- 800e604: f013 0f10 tst.w r3, #16
- 800e608: d10c bne.n 800e624 <tcp_listen_input+0x38>
- } else if (flags & TCP_SYN) {
- 800e60a: f013 0f02 tst.w r3, #2
- 800e60e: d11d bne.n 800e64c <tcp_listen_input+0x60>
- }
- 800e610: b005 add sp, #20
- 800e612: bdf0 pop {r4, r5, r6, r7, pc}
- LWIP_ASSERT("tcp_listen_input: invalid pcb", pcb != NULL);
- 800e614: 4b3e ldr r3, [pc, #248] @ (800e710 <tcp_listen_input+0x124>)
- 800e616: f240 2281 movw r2, #641 @ 0x281
- 800e61a: 493e ldr r1, [pc, #248] @ (800e714 <tcp_listen_input+0x128>)
- 800e61c: 483e ldr r0, [pc, #248] @ (800e718 <tcp_listen_input+0x12c>)
- 800e61e: f004 fef3 bl 8013408 <iprintf>
- 800e622: e7ed b.n 800e600 <tcp_listen_input+0x14>
- ip_current_src_addr(), tcphdr->dest, tcphdr->src);
- 800e624: 4b3d ldr r3, [pc, #244] @ (800e71c <tcp_listen_input+0x130>)
- 800e626: 6819 ldr r1, [r3, #0]
- tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
- 800e628: 4b3d ldr r3, [pc, #244] @ (800e720 <tcp_listen_input+0x134>)
- 800e62a: 4a3e ldr r2, [pc, #248] @ (800e724 <tcp_listen_input+0x138>)
- 800e62c: 8810 ldrh r0, [r2, #0]
- 800e62e: 4a3e ldr r2, [pc, #248] @ (800e728 <tcp_listen_input+0x13c>)
- 800e630: 6812 ldr r2, [r2, #0]
- 800e632: 880d ldrh r5, [r1, #0]
- 800e634: 9502 str r5, [sp, #8]
- 800e636: 8849 ldrh r1, [r1, #2]
- 800e638: 9101 str r1, [sp, #4]
- 800e63a: 1f19 subs r1, r3, #4
- 800e63c: 9100 str r1, [sp, #0]
- 800e63e: 4402 add r2, r0
- 800e640: 493a ldr r1, [pc, #232] @ (800e72c <tcp_listen_input+0x140>)
- 800e642: 6809 ldr r1, [r1, #0]
- 800e644: 4620 mov r0, r4
- 800e646: f002 fb8b bl 8010d60 <tcp_rst>
- 800e64a: e7e1 b.n 800e610 <tcp_listen_input+0x24>
- npcb = tcp_alloc(pcb->prio);
- 800e64c: 7d60 ldrb r0, [r4, #21]
- 800e64e: f7ff fa4b bl 800dae8 <tcp_alloc>
- if (npcb == NULL) {
- 800e652: 4605 mov r5, r0
- 800e654: 2800 cmp r0, #0
- 800e656: d049 beq.n 800e6ec <tcp_listen_input+0x100>
- ip_addr_copy(npcb->local_ip, *ip_current_dest_addr());
- 800e658: 4b35 ldr r3, [pc, #212] @ (800e730 <tcp_listen_input+0x144>)
- 800e65a: 695a ldr r2, [r3, #20]
- 800e65c: 6002 str r2, [r0, #0]
- ip_addr_copy(npcb->remote_ip, *ip_current_src_addr());
- 800e65e: 691b ldr r3, [r3, #16]
- 800e660: 6043 str r3, [r0, #4]
- npcb->local_port = pcb->local_port;
- 800e662: 8ae3 ldrh r3, [r4, #22]
- 800e664: 82c3 strh r3, [r0, #22]
- npcb->remote_port = tcphdr->src;
- 800e666: 4e2d ldr r6, [pc, #180] @ (800e71c <tcp_listen_input+0x130>)
- 800e668: 6833 ldr r3, [r6, #0]
- 800e66a: 881b ldrh r3, [r3, #0]
- 800e66c: 8303 strh r3, [r0, #24]
- npcb->state = SYN_RCVD;
- 800e66e: 2303 movs r3, #3
- 800e670: 7503 strb r3, [r0, #20]
- npcb->rcv_nxt = seqno + 1;
- 800e672: 4f2d ldr r7, [pc, #180] @ (800e728 <tcp_listen_input+0x13c>)
- 800e674: 683b ldr r3, [r7, #0]
- 800e676: 3301 adds r3, #1
- 800e678: 6243 str r3, [r0, #36] @ 0x24
- npcb->rcv_ann_right_edge = npcb->rcv_nxt;
- 800e67a: 62c3 str r3, [r0, #44] @ 0x2c
- iss = tcp_next_iss(npcb);
- 800e67c: f7fe ff5c bl 800d538 <tcp_next_iss>
- npcb->snd_wl2 = iss;
- 800e680: 65a8 str r0, [r5, #88] @ 0x58
- npcb->snd_nxt = iss;
- 800e682: 6528 str r0, [r5, #80] @ 0x50
- npcb->lastack = iss;
- 800e684: 6468 str r0, [r5, #68] @ 0x44
- npcb->snd_lbb = iss;
- 800e686: 65e8 str r0, [r5, #92] @ 0x5c
- npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */
- 800e688: 683b ldr r3, [r7, #0]
- 800e68a: 3b01 subs r3, #1
- 800e68c: 656b str r3, [r5, #84] @ 0x54
- npcb->callback_arg = pcb->callback_arg;
- 800e68e: 6923 ldr r3, [r4, #16]
- 800e690: 612b str r3, [r5, #16]
- npcb->listener = pcb;
- 800e692: 67ec str r4, [r5, #124] @ 0x7c
- npcb->so_options = pcb->so_options & SOF_INHERITED;
- 800e694: 7a63 ldrb r3, [r4, #9]
- 800e696: f003 030c and.w r3, r3, #12
- 800e69a: 726b strb r3, [r5, #9]
- npcb->netif_idx = pcb->netif_idx;
- 800e69c: 7a23 ldrb r3, [r4, #8]
- 800e69e: 722b strb r3, [r5, #8]
- TCP_REG_ACTIVE(npcb);
- 800e6a0: 4b24 ldr r3, [pc, #144] @ (800e734 <tcp_listen_input+0x148>)
- 800e6a2: 681a ldr r2, [r3, #0]
- 800e6a4: 60ea str r2, [r5, #12]
- 800e6a6: 601d str r5, [r3, #0]
- 800e6a8: f002 ffc2 bl 8011630 <tcp_timer_needed>
- 800e6ac: 4b22 ldr r3, [pc, #136] @ (800e738 <tcp_listen_input+0x14c>)
- 800e6ae: 2201 movs r2, #1
- 800e6b0: 701a strb r2, [r3, #0]
- tcp_parseopt(npcb);
- 800e6b2: 4628 mov r0, r5
- 800e6b4: f7ff febc bl 800e430 <tcp_parseopt>
- npcb->snd_wnd = tcphdr->wnd;
- 800e6b8: 6833 ldr r3, [r6, #0]
- 800e6ba: 89db ldrh r3, [r3, #14]
- 800e6bc: f8a5 3060 strh.w r3, [r5, #96] @ 0x60
- npcb->snd_wnd_max = npcb->snd_wnd;
- 800e6c0: f8a5 3062 strh.w r3, [r5, #98] @ 0x62
- npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, &npcb->remote_ip);
- 800e6c4: 8e6e ldrh r6, [r5, #50] @ 0x32
- 800e6c6: 1d2c adds r4, r5, #4
- 800e6c8: 4620 mov r0, r4
- 800e6ca: f7fb fd19 bl 800a100 <ip4_route>
- 800e6ce: 4601 mov r1, r0
- 800e6d0: 4622 mov r2, r4
- 800e6d2: 4630 mov r0, r6
- 800e6d4: f7fe ff4c bl 800d570 <tcp_eff_send_mss_netif>
- 800e6d8: 8668 strh r0, [r5, #50] @ 0x32
- rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK);
- 800e6da: 2112 movs r1, #18
- 800e6dc: 4628 mov r0, r5
- 800e6de: f002 f98b bl 80109f8 <tcp_enqueue_flags>
- if (rc != ERR_OK) {
- 800e6e2: b960 cbnz r0, 800e6fe <tcp_listen_input+0x112>
- tcp_output(npcb);
- 800e6e4: 4628 mov r0, r5
- 800e6e6: f002 fbbd bl 8010e64 <tcp_output>
- 800e6ea: e791 b.n 800e610 <tcp_listen_input+0x24>
- TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err);
- 800e6ec: 69a3 ldr r3, [r4, #24]
- 800e6ee: 2b00 cmp r3, #0
- 800e6f0: d08e beq.n 800e610 <tcp_listen_input+0x24>
- 800e6f2: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff
- 800e6f6: 2100 movs r1, #0
- 800e6f8: 6920 ldr r0, [r4, #16]
- 800e6fa: 4798 blx r3
- return;
- 800e6fc: e788 b.n 800e610 <tcp_listen_input+0x24>
- tcp_abandon(npcb, 0);
- 800e6fe: 2100 movs r1, #0
- 800e700: 4628 mov r0, r5
- 800e702: f7ff f8a1 bl 800d848 <tcp_abandon>
- return;
- 800e706: e783 b.n 800e610 <tcp_listen_input+0x24>
- 800e708: 4770 bx lr
- 800e70a: bf00 nop
- 800e70c: 24019bf1 .word 0x24019bf1
- 800e710: 08016c64 .word 0x08016c64
- 800e714: 08016d2c .word 0x08016d2c
- 800e718: 080144e8 .word 0x080144e8
- 800e71c: 24019c0c .word 0x24019c0c
- 800e720: 24013030 .word 0x24013030
- 800e724: 24019bf2 .word 0x24019bf2
- 800e728: 24019bfc .word 0x24019bfc
- 800e72c: 24019bf8 .word 0x24019bf8
- 800e730: 2401301c .word 0x2401301c
- 800e734: 24019bd8 .word 0x24019bd8
- 800e738: 24019bd2 .word 0x24019bd2
- 0800e73c <tcp_free_acked_segments>:
- {
- 800e73c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 800e740: 4606 mov r6, r0
- 800e742: 460c mov r4, r1
- 800e744: 461f mov r7, r3
- while (seg_list != NULL &&
- 800e746: e008 b.n 800e75a <tcp_free_acked_segments+0x1e>
- LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= clen));
- 800e748: 4b26 ldr r3, [pc, #152] @ (800e7e4 <tcp_free_acked_segments+0xa8>)
- 800e74a: f240 4257 movw r2, #1111 @ 0x457
- 800e74e: 4926 ldr r1, [pc, #152] @ (800e7e8 <tcp_free_acked_segments+0xac>)
- 800e750: 4826 ldr r0, [pc, #152] @ (800e7ec <tcp_free_acked_segments+0xb0>)
- 800e752: f004 fe59 bl 8013408 <iprintf>
- 800e756: e022 b.n 800e79e <tcp_free_acked_segments+0x62>
- {
- 800e758: 4644 mov r4, r8
- while (seg_list != NULL &&
- 800e75a: 2c00 cmp r4, #0
- 800e75c: d03f beq.n 800e7de <tcp_free_acked_segments+0xa2>
- TCP_SEQ_LEQ(lwip_ntohl(seg_list->tcphdr->seqno) +
- 800e75e: 6923 ldr r3, [r4, #16]
- 800e760: 6858 ldr r0, [r3, #4]
- 800e762: f7f9 fb90 bl 8007e86 <lwip_htonl>
- 800e766: 4605 mov r5, r0
- 800e768: f8b4 8008 ldrh.w r8, [r4, #8]
- 800e76c: 6923 ldr r3, [r4, #16]
- 800e76e: 8998 ldrh r0, [r3, #12]
- 800e770: f7f9 fb84 bl 8007e7c <lwip_htons>
- 800e774: f010 0f03 tst.w r0, #3
- 800e778: d02f beq.n 800e7da <tcp_free_acked_segments+0x9e>
- 800e77a: 2301 movs r3, #1
- 800e77c: 4443 add r3, r8
- 800e77e: 441d add r5, r3
- 800e780: 4b1b ldr r3, [pc, #108] @ (800e7f0 <tcp_free_acked_segments+0xb4>)
- 800e782: 681b ldr r3, [r3, #0]
- 800e784: 1aed subs r5, r5, r3
- while (seg_list != NULL &&
- 800e786: 2d00 cmp r5, #0
- 800e788: dc29 bgt.n 800e7de <tcp_free_acked_segments+0xa2>
- seg_list = seg_list->next;
- 800e78a: f8d4 8000 ldr.w r8, [r4]
- clen = pbuf_clen(next->p);
- 800e78e: 6860 ldr r0, [r4, #4]
- 800e790: f7fd fc8b bl 800c0aa <pbuf_clen>
- 800e794: 4605 mov r5, r0
- LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= clen));
- 800e796: f8b6 3066 ldrh.w r3, [r6, #102] @ 0x66
- 800e79a: 4298 cmp r0, r3
- 800e79c: d8d4 bhi.n 800e748 <tcp_free_acked_segments+0xc>
- pcb->snd_queuelen = (u16_t)(pcb->snd_queuelen - clen);
- 800e79e: f8b6 3066 ldrh.w r3, [r6, #102] @ 0x66
- 800e7a2: 1b5b subs r3, r3, r5
- 800e7a4: f8a6 3066 strh.w r3, [r6, #102] @ 0x66
- recv_acked = (tcpwnd_size_t)(recv_acked + next->len);
- 800e7a8: 8923 ldrh r3, [r4, #8]
- 800e7aa: 4a12 ldr r2, [pc, #72] @ (800e7f4 <tcp_free_acked_segments+0xb8>)
- 800e7ac: 8811 ldrh r1, [r2, #0]
- 800e7ae: 440b add r3, r1
- 800e7b0: 8013 strh r3, [r2, #0]
- tcp_seg_free(next);
- 800e7b2: 4620 mov r0, r4
- 800e7b4: f7fe fdfa bl 800d3ac <tcp_seg_free>
- if (pcb->snd_queuelen != 0) {
- 800e7b8: f8b6 3066 ldrh.w r3, [r6, #102] @ 0x66
- 800e7bc: 2b00 cmp r3, #0
- 800e7be: d0cb beq.n 800e758 <tcp_free_acked_segments+0x1c>
- LWIP_ASSERT("tcp_receive: valid queue length",
- 800e7c0: f1b8 0f00 cmp.w r8, #0
- 800e7c4: bf08 it eq
- 800e7c6: 2f00 cmpeq r7, #0
- 800e7c8: d1c6 bne.n 800e758 <tcp_free_acked_segments+0x1c>
- 800e7ca: 4b06 ldr r3, [pc, #24] @ (800e7e4 <tcp_free_acked_segments+0xa8>)
- 800e7cc: f240 4261 movw r2, #1121 @ 0x461
- 800e7d0: 4909 ldr r1, [pc, #36] @ (800e7f8 <tcp_free_acked_segments+0xbc>)
- 800e7d2: 4806 ldr r0, [pc, #24] @ (800e7ec <tcp_free_acked_segments+0xb0>)
- 800e7d4: f004 fe18 bl 8013408 <iprintf>
- 800e7d8: e7be b.n 800e758 <tcp_free_acked_segments+0x1c>
- TCP_SEQ_LEQ(lwip_ntohl(seg_list->tcphdr->seqno) +
- 800e7da: 2300 movs r3, #0
- 800e7dc: e7ce b.n 800e77c <tcp_free_acked_segments+0x40>
- }
- 800e7de: 4620 mov r0, r4
- 800e7e0: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- 800e7e4: 08016c64 .word 0x08016c64
- 800e7e8: 08016d4c .word 0x08016d4c
- 800e7ec: 080144e8 .word 0x080144e8
- 800e7f0: 24019bf8 .word 0x24019bf8
- 800e7f4: 24019bf4 .word 0x24019bf4
- 800e7f8: 08016d74 .word 0x08016d74
- 0800e7fc <tcp_oos_insert_segment>:
- {
- 800e7fc: b570 push {r4, r5, r6, lr}
- 800e7fe: 460c mov r4, r1
- LWIP_ASSERT("tcp_oos_insert_segment: invalid cseg", cseg != NULL);
- 800e800: 4605 mov r5, r0
- 800e802: b160 cbz r0, 800e81e <tcp_oos_insert_segment+0x22>
- if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) {
- 800e804: 692b ldr r3, [r5, #16]
- 800e806: 8998 ldrh r0, [r3, #12]
- 800e808: f7f9 fb38 bl 8007e7c <lwip_htons>
- 800e80c: f010 0f01 tst.w r0, #1
- 800e810: d012 beq.n 800e838 <tcp_oos_insert_segment+0x3c>
- tcp_segs_free(next);
- 800e812: 4620 mov r0, r4
- 800e814: f7fe fdd7 bl 800d3c6 <tcp_segs_free>
- next = NULL;
- 800e818: 2400 movs r4, #0
- cseg->next = next;
- 800e81a: 602c str r4, [r5, #0]
- }
- 800e81c: bd70 pop {r4, r5, r6, pc}
- LWIP_ASSERT("tcp_oos_insert_segment: invalid cseg", cseg != NULL);
- 800e81e: 4b1d ldr r3, [pc, #116] @ (800e894 <tcp_oos_insert_segment+0x98>)
- 800e820: f240 421f movw r2, #1055 @ 0x41f
- 800e824: 491c ldr r1, [pc, #112] @ (800e898 <tcp_oos_insert_segment+0x9c>)
- 800e826: 481d ldr r0, [pc, #116] @ (800e89c <tcp_oos_insert_segment+0xa0>)
- 800e828: f004 fdee bl 8013408 <iprintf>
- 800e82c: e7ea b.n 800e804 <tcp_oos_insert_segment+0x8>
- next = next->next;
- 800e82e: 6826 ldr r6, [r4, #0]
- tcp_seg_free(old_seg);
- 800e830: 4620 mov r0, r4
- 800e832: f7fe fdbb bl 800d3ac <tcp_seg_free>
- next = next->next;
- 800e836: 4634 mov r4, r6
- while (next &&
- 800e838: b1cc cbz r4, 800e86e <tcp_oos_insert_segment+0x72>
- TCP_SEQ_GEQ((seqno + cseg->len),
- 800e83a: 892b ldrh r3, [r5, #8]
- 800e83c: 4a18 ldr r2, [pc, #96] @ (800e8a0 <tcp_oos_insert_segment+0xa4>)
- 800e83e: 6812 ldr r2, [r2, #0]
- 800e840: 4413 add r3, r2
- 800e842: 6921 ldr r1, [r4, #16]
- 800e844: 684a ldr r2, [r1, #4]
- 800e846: 8920 ldrh r0, [r4, #8]
- 800e848: 4402 add r2, r0
- 800e84a: 1a9b subs r3, r3, r2
- while (next &&
- 800e84c: 2b00 cmp r3, #0
- 800e84e: db0e blt.n 800e86e <tcp_oos_insert_segment+0x72>
- if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) {
- 800e850: 8988 ldrh r0, [r1, #12]
- 800e852: f7f9 fb13 bl 8007e7c <lwip_htons>
- 800e856: f010 0f01 tst.w r0, #1
- 800e85a: d0e8 beq.n 800e82e <tcp_oos_insert_segment+0x32>
- TCPH_SET_FLAG(cseg->tcphdr, TCP_FIN);
- 800e85c: 692b ldr r3, [r5, #16]
- 800e85e: 899e ldrh r6, [r3, #12]
- 800e860: 2001 movs r0, #1
- 800e862: f7f9 fb0b bl 8007e7c <lwip_htons>
- 800e866: 692b ldr r3, [r5, #16]
- 800e868: 4306 orrs r6, r0
- 800e86a: 819e strh r6, [r3, #12]
- 800e86c: e7df b.n 800e82e <tcp_oos_insert_segment+0x32>
- if (next &&
- 800e86e: 2c00 cmp r4, #0
- 800e870: d0d3 beq.n 800e81a <tcp_oos_insert_segment+0x1e>
- TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) {
- 800e872: 892b ldrh r3, [r5, #8]
- 800e874: 4a0a ldr r2, [pc, #40] @ (800e8a0 <tcp_oos_insert_segment+0xa4>)
- 800e876: 6811 ldr r1, [r2, #0]
- 800e878: 440b add r3, r1
- 800e87a: 6922 ldr r2, [r4, #16]
- 800e87c: 6852 ldr r2, [r2, #4]
- 800e87e: 1a9b subs r3, r3, r2
- if (next &&
- 800e880: 2b00 cmp r3, #0
- 800e882: ddca ble.n 800e81a <tcp_oos_insert_segment+0x1e>
- cseg->len = (u16_t)(next->tcphdr->seqno - seqno);
- 800e884: 1a52 subs r2, r2, r1
- 800e886: b291 uxth r1, r2
- 800e888: 8129 strh r1, [r5, #8]
- pbuf_realloc(cseg->p, cseg->len);
- 800e88a: 6868 ldr r0, [r5, #4]
- 800e88c: f7fd fb9e bl 800bfcc <pbuf_realloc>
- 800e890: e7c3 b.n 800e81a <tcp_oos_insert_segment+0x1e>
- 800e892: bf00 nop
- 800e894: 08016c64 .word 0x08016c64
- 800e898: 08016d94 .word 0x08016d94
- 800e89c: 080144e8 .word 0x080144e8
- 800e8a0: 24019bfc .word 0x24019bfc
- 0800e8a4 <tcp_receive>:
- {
- 800e8a4: b5f8 push {r3, r4, r5, r6, r7, lr}
- LWIP_ASSERT("tcp_receive: invalid pcb", pcb != NULL);
- 800e8a6: 4604 mov r4, r0
- 800e8a8: 2800 cmp r0, #0
- 800e8aa: d06f beq.n 800e98c <tcp_receive+0xe8>
- LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED);
- 800e8ac: 7d23 ldrb r3, [r4, #20]
- 800e8ae: 2b03 cmp r3, #3
- 800e8b0: d974 bls.n 800e99c <tcp_receive+0xf8>
- if (flags & TCP_ACK) {
- 800e8b2: 4ba8 ldr r3, [pc, #672] @ (800eb54 <tcp_receive+0x2b0>)
- 800e8b4: 781b ldrb r3, [r3, #0]
- 800e8b6: f013 0f10 tst.w r3, #16
- 800e8ba: d03c beq.n 800e936 <tcp_receive+0x92>
- right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2;
- 800e8bc: f8b4 0060 ldrh.w r0, [r4, #96] @ 0x60
- 800e8c0: 6da2 ldr r2, [r4, #88] @ 0x58
- 800e8c2: 1886 adds r6, r0, r2
- if (TCP_SEQ_LT(pcb->snd_wl1, seqno) ||
- 800e8c4: 6d61 ldr r1, [r4, #84] @ 0x54
- 800e8c6: 4ba4 ldr r3, [pc, #656] @ (800eb58 <tcp_receive+0x2b4>)
- 800e8c8: 681b ldr r3, [r3, #0]
- 800e8ca: 1acd subs r5, r1, r3
- 800e8cc: 2d00 cmp r5, #0
- 800e8ce: db0a blt.n 800e8e6 <tcp_receive+0x42>
- 800e8d0: 4299 cmp r1, r3
- 800e8d2: d06b beq.n 800e9ac <tcp_receive+0x108>
- (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) {
- 800e8d4: 49a1 ldr r1, [pc, #644] @ (800eb5c <tcp_receive+0x2b8>)
- 800e8d6: 6809 ldr r1, [r1, #0]
- (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
- 800e8d8: 428a cmp r2, r1
- 800e8da: d114 bne.n 800e906 <tcp_receive+0x62>
- (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) {
- 800e8dc: 4aa0 ldr r2, [pc, #640] @ (800eb60 <tcp_receive+0x2bc>)
- 800e8de: 6812 ldr r2, [r2, #0]
- 800e8e0: 89d2 ldrh r2, [r2, #14]
- 800e8e2: 4290 cmp r0, r2
- 800e8e4: d20f bcs.n 800e906 <tcp_receive+0x62>
- pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd);
- 800e8e6: 4a9e ldr r2, [pc, #632] @ (800eb60 <tcp_receive+0x2bc>)
- 800e8e8: 6812 ldr r2, [r2, #0]
- 800e8ea: 89d2 ldrh r2, [r2, #14]
- 800e8ec: b290 uxth r0, r2
- 800e8ee: f8a4 2060 strh.w r2, [r4, #96] @ 0x60
- if (pcb->snd_wnd_max < pcb->snd_wnd) {
- 800e8f2: f8b4 1062 ldrh.w r1, [r4, #98] @ 0x62
- 800e8f6: 4288 cmp r0, r1
- 800e8f8: d901 bls.n 800e8fe <tcp_receive+0x5a>
- pcb->snd_wnd_max = pcb->snd_wnd;
- 800e8fa: f8a4 2062 strh.w r2, [r4, #98] @ 0x62
- pcb->snd_wl1 = seqno;
- 800e8fe: 6563 str r3, [r4, #84] @ 0x54
- pcb->snd_wl2 = ackno;
- 800e900: 4b96 ldr r3, [pc, #600] @ (800eb5c <tcp_receive+0x2b8>)
- 800e902: 681b ldr r3, [r3, #0]
- 800e904: 65a3 str r3, [r4, #88] @ 0x58
- if (TCP_SEQ_LEQ(ackno, pcb->lastack)) {
- 800e906: 4b95 ldr r3, [pc, #596] @ (800eb5c <tcp_receive+0x2b8>)
- 800e908: 681b ldr r3, [r3, #0]
- 800e90a: 6c61 ldr r1, [r4, #68] @ 0x44
- 800e90c: 1a5a subs r2, r3, r1
- 800e90e: 2a00 cmp r2, #0
- 800e910: dd52 ble.n 800e9b8 <tcp_receive+0x114>
- } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
- 800e912: 2a01 cmp r2, #1
- 800e914: d403 bmi.n 800e91e <tcp_receive+0x7a>
- 800e916: 6d22 ldr r2, [r4, #80] @ 0x50
- 800e918: 1a9a subs r2, r3, r2
- 800e91a: 2a00 cmp r2, #0
- 800e91c: dd7e ble.n 800ea1c <tcp_receive+0x178>
- tcp_send_empty_ack(pcb);
- 800e91e: 4620 mov r0, r4
- 800e920: f002 fa66 bl 8010df0 <tcp_send_empty_ack>
- if (pcb->rttest && TCP_SEQ_LT(pcb->rtseq, ackno)) {
- 800e924: 6b63 ldr r3, [r4, #52] @ 0x34
- 800e926: b133 cbz r3, 800e936 <tcp_receive+0x92>
- 800e928: 6ba2 ldr r2, [r4, #56] @ 0x38
- 800e92a: 498c ldr r1, [pc, #560] @ (800eb5c <tcp_receive+0x2b8>)
- 800e92c: 6809 ldr r1, [r1, #0]
- 800e92e: 1a52 subs r2, r2, r1
- 800e930: 2a00 cmp r2, #0
- 800e932: f2c0 8136 blt.w 800eba2 <tcp_receive+0x2fe>
- if ((tcplen > 0) && (pcb->state < CLOSE_WAIT)) {
- 800e936: 4b8b ldr r3, [pc, #556] @ (800eb64 <tcp_receive+0x2c0>)
- 800e938: 881b ldrh r3, [r3, #0]
- 800e93a: 2b00 cmp r3, #0
- 800e93c: f000 8435 beq.w 800f1aa <tcp_receive+0x906>
- 800e940: 7d22 ldrb r2, [r4, #20]
- 800e942: 2a06 cmp r2, #6
- 800e944: f200 8431 bhi.w 800f1aa <tcp_receive+0x906>
- if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) {
- 800e948: 6a61 ldr r1, [r4, #36] @ 0x24
- 800e94a: 4a83 ldr r2, [pc, #524] @ (800eb58 <tcp_receive+0x2b4>)
- 800e94c: 6812 ldr r2, [r2, #0]
- 800e94e: 1a8e subs r6, r1, r2
- 800e950: 2e01 cmp r6, #1
- 800e952: d405 bmi.n 800e960 <tcp_receive+0xbc>
- 800e954: 4413 add r3, r2
- 800e956: 1acb subs r3, r1, r3
- 800e958: 3301 adds r3, #1
- 800e95a: 2b00 cmp r3, #0
- 800e95c: f340 8147 ble.w 800ebee <tcp_receive+0x34a>
- if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) {
- 800e960: 1a52 subs r2, r2, r1
- 800e962: 2a00 cmp r2, #0
- 800e964: f2c0 8185 blt.w 800ec72 <tcp_receive+0x3ce>
- if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
- 800e968: 4b7b ldr r3, [pc, #492] @ (800eb58 <tcp_receive+0x2b4>)
- 800e96a: 681b ldr r3, [r3, #0]
- 800e96c: 6a61 ldr r1, [r4, #36] @ 0x24
- 800e96e: 1a5a subs r2, r3, r1
- 800e970: 2a00 cmp r2, #0
- 800e972: db06 blt.n 800e982 <tcp_receive+0xde>
- 800e974: 8d22 ldrh r2, [r4, #40] @ 0x28
- 800e976: 440a add r2, r1
- 800e978: 1a9a subs r2, r3, r2
- 800e97a: 3201 adds r2, #1
- 800e97c: 2a00 cmp r2, #0
- 800e97e: f340 817d ble.w 800ec7c <tcp_receive+0x3d8>
- tcp_send_empty_ack(pcb);
- 800e982: 4620 mov r0, r4
- 800e984: f002 fa34 bl 8010df0 <tcp_send_empty_ack>
- 800e988: f000 bc1f b.w 800f1ca <tcp_receive+0x926>
- LWIP_ASSERT("tcp_receive: invalid pcb", pcb != NULL);
- 800e98c: 4b76 ldr r3, [pc, #472] @ (800eb68 <tcp_receive+0x2c4>)
- 800e98e: f240 427b movw r2, #1147 @ 0x47b
- 800e992: 4976 ldr r1, [pc, #472] @ (800eb6c <tcp_receive+0x2c8>)
- 800e994: 4876 ldr r0, [pc, #472] @ (800eb70 <tcp_receive+0x2cc>)
- 800e996: f004 fd37 bl 8013408 <iprintf>
- 800e99a: e787 b.n 800e8ac <tcp_receive+0x8>
- LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED);
- 800e99c: 4b72 ldr r3, [pc, #456] @ (800eb68 <tcp_receive+0x2c4>)
- 800e99e: f240 427c movw r2, #1148 @ 0x47c
- 800e9a2: 4974 ldr r1, [pc, #464] @ (800eb74 <tcp_receive+0x2d0>)
- 800e9a4: 4872 ldr r0, [pc, #456] @ (800eb70 <tcp_receive+0x2cc>)
- 800e9a6: f004 fd2f bl 8013408 <iprintf>
- 800e9aa: e782 b.n 800e8b2 <tcp_receive+0xe>
- (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
- 800e9ac: 496b ldr r1, [pc, #428] @ (800eb5c <tcp_receive+0x2b8>)
- 800e9ae: 6809 ldr r1, [r1, #0]
- 800e9b0: 1a51 subs r1, r2, r1
- 800e9b2: 2900 cmp r1, #0
- 800e9b4: da8e bge.n 800e8d4 <tcp_receive+0x30>
- 800e9b6: e796 b.n 800e8e6 <tcp_receive+0x42>
- if (tcplen == 0) {
- 800e9b8: 4a6a ldr r2, [pc, #424] @ (800eb64 <tcp_receive+0x2c0>)
- 800e9ba: 8812 ldrh r2, [r2, #0]
- 800e9bc: b92a cbnz r2, 800e9ca <tcp_receive+0x126>
- if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge) {
- 800e9be: 6da2 ldr r2, [r4, #88] @ 0x58
- 800e9c0: f8b4 0060 ldrh.w r0, [r4, #96] @ 0x60
- 800e9c4: 4402 add r2, r0
- 800e9c6: 42b2 cmp r2, r6
- 800e9c8: d003 beq.n 800e9d2 <tcp_receive+0x12e>
- pcb->dupacks = 0;
- 800e9ca: 2300 movs r3, #0
- 800e9cc: f884 3043 strb.w r3, [r4, #67] @ 0x43
- 800e9d0: e7a8 b.n 800e924 <tcp_receive+0x80>
- if (pcb->rtime >= 0) {
- 800e9d2: f9b4 2030 ldrsh.w r2, [r4, #48] @ 0x30
- 800e9d6: 2a00 cmp r2, #0
- 800e9d8: dbf7 blt.n 800e9ca <tcp_receive+0x126>
- if (pcb->lastack == ackno) {
- 800e9da: 428b cmp r3, r1
- 800e9dc: d1f5 bne.n 800e9ca <tcp_receive+0x126>
- if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) {
- 800e9de: f894 3043 ldrb.w r3, [r4, #67] @ 0x43
- 800e9e2: 2bff cmp r3, #255 @ 0xff
- 800e9e4: d002 beq.n 800e9ec <tcp_receive+0x148>
- ++pcb->dupacks;
- 800e9e6: 3301 adds r3, #1
- 800e9e8: f884 3043 strb.w r3, [r4, #67] @ 0x43
- if (pcb->dupacks > 3) {
- 800e9ec: f894 3043 ldrb.w r3, [r4, #67] @ 0x43
- 800e9f0: 2b03 cmp r3, #3
- 800e9f2: d908 bls.n 800ea06 <tcp_receive+0x162>
- TCP_WND_INC(pcb->cwnd, pcb->mss);
- 800e9f4: f8b4 1048 ldrh.w r1, [r4, #72] @ 0x48
- 800e9f8: 8e62 ldrh r2, [r4, #50] @ 0x32
- 800e9fa: 440a add r2, r1
- 800e9fc: b292 uxth r2, r2
- 800e9fe: 4291 cmp r1, r2
- 800ea00: d807 bhi.n 800ea12 <tcp_receive+0x16e>
- 800ea02: f8a4 2048 strh.w r2, [r4, #72] @ 0x48
- if (pcb->dupacks >= 3) {
- 800ea06: 2b02 cmp r3, #2
- 800ea08: d98c bls.n 800e924 <tcp_receive+0x80>
- tcp_rexmit_fast(pcb);
- 800ea0a: 4620 mov r0, r4
- 800ea0c: f002 f96a bl 8010ce4 <tcp_rexmit_fast>
- if (!found_dupack) {
- 800ea10: e788 b.n 800e924 <tcp_receive+0x80>
- TCP_WND_INC(pcb->cwnd, pcb->mss);
- 800ea12: f64f 72ff movw r2, #65535 @ 0xffff
- 800ea16: f8a4 2048 strh.w r2, [r4, #72] @ 0x48
- 800ea1a: e7f4 b.n 800ea06 <tcp_receive+0x162>
- if (pcb->flags & TF_INFR) {
- 800ea1c: 8b62 ldrh r2, [r4, #26]
- 800ea1e: f012 0f04 tst.w r2, #4
- 800ea22: d009 beq.n 800ea38 <tcp_receive+0x194>
- tcp_clear_flags(pcb, TF_INFR);
- 800ea24: f022 0204 bic.w r2, r2, #4
- 800ea28: 8362 strh r2, [r4, #26]
- pcb->cwnd = pcb->ssthresh;
- 800ea2a: f8b4 204a ldrh.w r2, [r4, #74] @ 0x4a
- 800ea2e: f8a4 2048 strh.w r2, [r4, #72] @ 0x48
- pcb->bytes_acked = 0;
- 800ea32: 2200 movs r2, #0
- 800ea34: f8a4 206a strh.w r2, [r4, #106] @ 0x6a
- pcb->nrtx = 0;
- 800ea38: 2000 movs r0, #0
- 800ea3a: f884 0042 strb.w r0, [r4, #66] @ 0x42
- pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv);
- 800ea3e: f9b4 503c ldrsh.w r5, [r4, #60] @ 0x3c
- 800ea42: 8fe2 ldrh r2, [r4, #62] @ 0x3e
- 800ea44: eb02 02e5 add.w r2, r2, r5, asr #3
- 800ea48: f8a4 2040 strh.w r2, [r4, #64] @ 0x40
- acked = (tcpwnd_size_t)(ackno - pcb->lastack);
- 800ea4c: b29a uxth r2, r3
- 800ea4e: b289 uxth r1, r1
- 800ea50: 1a52 subs r2, r2, r1
- 800ea52: b292 uxth r2, r2
- pcb->dupacks = 0;
- 800ea54: f884 0043 strb.w r0, [r4, #67] @ 0x43
- pcb->lastack = ackno;
- 800ea58: 6463 str r3, [r4, #68] @ 0x44
- if (pcb->state >= ESTABLISHED) {
- 800ea5a: 7d23 ldrb r3, [r4, #20]
- 800ea5c: 2b03 cmp r3, #3
- 800ea5e: d917 bls.n 800ea90 <tcp_receive+0x1ec>
- if (pcb->cwnd < pcb->ssthresh) {
- 800ea60: f8b4 3048 ldrh.w r3, [r4, #72] @ 0x48
- 800ea64: f8b4 104a ldrh.w r1, [r4, #74] @ 0x4a
- 800ea68: 428b cmp r3, r1
- 800ea6a: d24b bcs.n 800eb04 <tcp_receive+0x260>
- u8_t num_seg = (pcb->flags & TF_RTO) ? 1 : 2;
- 800ea6c: 8b61 ldrh r1, [r4, #26]
- 800ea6e: f411 6f00 tst.w r1, #2048 @ 0x800
- 800ea72: d040 beq.n 800eaf6 <tcp_receive+0x252>
- 800ea74: 2101 movs r1, #1
- increase = LWIP_MIN(acked, (tcpwnd_size_t)(num_seg * pcb->mss));
- 800ea76: 8e60 ldrh r0, [r4, #50] @ 0x32
- 800ea78: fb11 f100 smulbb r1, r1, r0
- 800ea7c: b289 uxth r1, r1
- TCP_WND_INC(pcb->cwnd, increase);
- 800ea7e: 4291 cmp r1, r2
- 800ea80: bf94 ite ls
- 800ea82: 1858 addls r0, r3, r1
- 800ea84: 1898 addhi r0, r3, r2
- 800ea86: b282 uxth r2, r0
- 800ea88: 4293 cmp r3, r2
- 800ea8a: d836 bhi.n 800eafa <tcp_receive+0x256>
- 800ea8c: f8a4 2048 strh.w r2, [r4, #72] @ 0x48
- pcb->unacked = tcp_free_acked_segments(pcb, pcb->unacked, "unacked", pcb->unsent);
- 800ea90: 6ee3 ldr r3, [r4, #108] @ 0x6c
- 800ea92: 4a39 ldr r2, [pc, #228] @ (800eb78 <tcp_receive+0x2d4>)
- 800ea94: 6f21 ldr r1, [r4, #112] @ 0x70
- 800ea96: 4620 mov r0, r4
- 800ea98: f7ff fe50 bl 800e73c <tcp_free_acked_segments>
- 800ea9c: 4603 mov r3, r0
- 800ea9e: 6720 str r0, [r4, #112] @ 0x70
- pcb->unsent = tcp_free_acked_segments(pcb, pcb->unsent, "unsent", pcb->unacked);
- 800eaa0: 4a36 ldr r2, [pc, #216] @ (800eb7c <tcp_receive+0x2d8>)
- 800eaa2: 6ee1 ldr r1, [r4, #108] @ 0x6c
- 800eaa4: 4620 mov r0, r4
- 800eaa6: f7ff fe49 bl 800e73c <tcp_free_acked_segments>
- 800eaaa: 66e0 str r0, [r4, #108] @ 0x6c
- if (pcb->unacked == NULL) {
- 800eaac: 6f22 ldr r2, [r4, #112] @ 0x70
- 800eaae: 2a00 cmp r2, #0
- 800eab0: d049 beq.n 800eb46 <tcp_receive+0x2a2>
- pcb->rtime = 0;
- 800eab2: 2300 movs r3, #0
- 800eab4: 8623 strh r3, [r4, #48] @ 0x30
- pcb->polltmr = 0;
- 800eab6: 2300 movs r3, #0
- 800eab8: 7723 strb r3, [r4, #28]
- if (pcb->unsent == NULL) {
- 800eaba: 2800 cmp r0, #0
- 800eabc: d047 beq.n 800eb4e <tcp_receive+0x2aa>
- pcb->snd_buf = (tcpwnd_size_t)(pcb->snd_buf + recv_acked);
- 800eabe: f8b4 3064 ldrh.w r3, [r4, #100] @ 0x64
- 800eac2: 492f ldr r1, [pc, #188] @ (800eb80 <tcp_receive+0x2dc>)
- 800eac4: 8809 ldrh r1, [r1, #0]
- 800eac6: 440b add r3, r1
- 800eac8: f8a4 3064 strh.w r3, [r4, #100] @ 0x64
- if (pcb->flags & TF_RTO) {
- 800eacc: 8b63 ldrh r3, [r4, #26]
- 800eace: f413 6f00 tst.w r3, #2048 @ 0x800
- 800ead2: f43f af27 beq.w 800e924 <tcp_receive+0x80>
- if (pcb->unacked == NULL) {
- 800ead6: 2a00 cmp r2, #0
- 800ead8: d054 beq.n 800eb84 <tcp_receive+0x2e0>
- } else if (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unacked->tcphdr->seqno))) {
- 800eada: 6ce5 ldr r5, [r4, #76] @ 0x4c
- 800eadc: 6913 ldr r3, [r2, #16]
- 800eade: 6858 ldr r0, [r3, #4]
- 800eae0: f7f9 f9d1 bl 8007e86 <lwip_htonl>
- 800eae4: 1a2d subs r5, r5, r0
- 800eae6: 2d00 cmp r5, #0
- 800eae8: f73f af1c bgt.w 800e924 <tcp_receive+0x80>
- tcp_clear_flags(pcb, TF_RTO);
- 800eaec: 8b63 ldrh r3, [r4, #26]
- 800eaee: f423 6300 bic.w r3, r3, #2048 @ 0x800
- 800eaf2: 8363 strh r3, [r4, #26]
- 800eaf4: e716 b.n 800e924 <tcp_receive+0x80>
- u8_t num_seg = (pcb->flags & TF_RTO) ? 1 : 2;
- 800eaf6: 2102 movs r1, #2
- 800eaf8: e7bd b.n 800ea76 <tcp_receive+0x1d2>
- TCP_WND_INC(pcb->cwnd, increase);
- 800eafa: f64f 73ff movw r3, #65535 @ 0xffff
- 800eafe: f8a4 3048 strh.w r3, [r4, #72] @ 0x48
- 800eb02: e7c5 b.n 800ea90 <tcp_receive+0x1ec>
- TCP_WND_INC(pcb->bytes_acked, acked);
- 800eb04: f8b4 106a ldrh.w r1, [r4, #106] @ 0x6a
- 800eb08: 440a add r2, r1
- 800eb0a: b292 uxth r2, r2
- 800eb0c: 4291 cmp r1, r2
- 800eb0e: d810 bhi.n 800eb32 <tcp_receive+0x28e>
- 800eb10: f8a4 206a strh.w r2, [r4, #106] @ 0x6a
- if (pcb->bytes_acked >= pcb->cwnd) {
- 800eb14: f8b4 206a ldrh.w r2, [r4, #106] @ 0x6a
- 800eb18: 4293 cmp r3, r2
- 800eb1a: d8b9 bhi.n 800ea90 <tcp_receive+0x1ec>
- pcb->bytes_acked = (tcpwnd_size_t)(pcb->bytes_acked - pcb->cwnd);
- 800eb1c: 1ad2 subs r2, r2, r3
- 800eb1e: f8a4 206a strh.w r2, [r4, #106] @ 0x6a
- TCP_WND_INC(pcb->cwnd, pcb->mss);
- 800eb22: 8e62 ldrh r2, [r4, #50] @ 0x32
- 800eb24: 441a add r2, r3
- 800eb26: b292 uxth r2, r2
- 800eb28: 4293 cmp r3, r2
- 800eb2a: d807 bhi.n 800eb3c <tcp_receive+0x298>
- 800eb2c: f8a4 2048 strh.w r2, [r4, #72] @ 0x48
- 800eb30: e7ae b.n 800ea90 <tcp_receive+0x1ec>
- TCP_WND_INC(pcb->bytes_acked, acked);
- 800eb32: f64f 72ff movw r2, #65535 @ 0xffff
- 800eb36: f8a4 206a strh.w r2, [r4, #106] @ 0x6a
- 800eb3a: e7eb b.n 800eb14 <tcp_receive+0x270>
- TCP_WND_INC(pcb->cwnd, pcb->mss);
- 800eb3c: f64f 73ff movw r3, #65535 @ 0xffff
- 800eb40: f8a4 3048 strh.w r3, [r4, #72] @ 0x48
- 800eb44: e7a4 b.n 800ea90 <tcp_receive+0x1ec>
- pcb->rtime = -1;
- 800eb46: f64f 73ff movw r3, #65535 @ 0xffff
- 800eb4a: 8623 strh r3, [r4, #48] @ 0x30
- 800eb4c: e7b3 b.n 800eab6 <tcp_receive+0x212>
- pcb->unsent_oversize = 0;
- 800eb4e: f8a4 3068 strh.w r3, [r4, #104] @ 0x68
- 800eb52: e7b4 b.n 800eabe <tcp_receive+0x21a>
- 800eb54: 24019bf1 .word 0x24019bf1
- 800eb58: 24019bfc .word 0x24019bfc
- 800eb5c: 24019bf8 .word 0x24019bf8
- 800eb60: 24019c0c .word 0x24019c0c
- 800eb64: 24019bf2 .word 0x24019bf2
- 800eb68: 08016c64 .word 0x08016c64
- 800eb6c: 08016dbc .word 0x08016dbc
- 800eb70: 080144e8 .word 0x080144e8
- 800eb74: 08016dd8 .word 0x08016dd8
- 800eb78: 08016df4 .word 0x08016df4
- 800eb7c: 08016dfc .word 0x08016dfc
- 800eb80: 24019bf4 .word 0x24019bf4
- if ((pcb->unsent == NULL) ||
- 800eb84: b140 cbz r0, 800eb98 <tcp_receive+0x2f4>
- (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unsent->tcphdr->seqno)))) {
- 800eb86: 6ce5 ldr r5, [r4, #76] @ 0x4c
- 800eb88: 6903 ldr r3, [r0, #16]
- 800eb8a: 6858 ldr r0, [r3, #4]
- 800eb8c: f7f9 f97b bl 8007e86 <lwip_htonl>
- 800eb90: 1a2d subs r5, r5, r0
- if ((pcb->unsent == NULL) ||
- 800eb92: 2d00 cmp r5, #0
- 800eb94: f73f aec6 bgt.w 800e924 <tcp_receive+0x80>
- tcp_clear_flags(pcb, TF_RTO);
- 800eb98: 8b63 ldrh r3, [r4, #26]
- 800eb9a: f423 6300 bic.w r3, r3, #2048 @ 0x800
- 800eb9e: 8363 strh r3, [r4, #26]
- 800eba0: e6c0 b.n 800e924 <tcp_receive+0x80>
- m = (s16_t)(tcp_ticks - pcb->rttest);
- 800eba2: 4a88 ldr r2, [pc, #544] @ (800edc4 <tcp_receive+0x520>)
- 800eba4: 8816 ldrh r6, [r2, #0]
- 800eba6: b29b uxth r3, r3
- 800eba8: 1af2 subs r2, r6, r3
- 800ebaa: b292 uxth r2, r2
- m = (s16_t)(m - (pcb->sa >> 3));
- 800ebac: f9b4 003c ldrsh.w r0, [r4, #60] @ 0x3c
- 800ebb0: f3c0 05cf ubfx r5, r0, #3, #16
- 800ebb4: 1b52 subs r2, r2, r5
- 800ebb6: b211 sxth r1, r2
- pcb->sa = (s16_t)(pcb->sa + m);
- 800ebb8: b280 uxth r0, r0
- 800ebba: fa10 f282 uxtah r2, r0, r2
- 800ebbe: b212 sxth r2, r2
- 800ebc0: 87a2 strh r2, [r4, #60] @ 0x3c
- if (m < 0) {
- 800ebc2: 2900 cmp r1, #0
- 800ebc4: db0f blt.n 800ebe6 <tcp_receive+0x342>
- m = (s16_t)(m - (pcb->sv >> 2));
- 800ebc6: f9b4 303e ldrsh.w r3, [r4, #62] @ 0x3e
- 800ebca: eba1 01a3 sub.w r1, r1, r3, asr #2
- pcb->sv = (s16_t)(pcb->sv + m);
- 800ebce: b29b uxth r3, r3
- 800ebd0: fa13 f181 uxtah r1, r3, r1
- 800ebd4: 87e1 strh r1, [r4, #62] @ 0x3e
- pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv);
- 800ebd6: 10d2 asrs r2, r2, #3
- 800ebd8: fa12 f181 uxtah r1, r2, r1
- 800ebdc: f8a4 1040 strh.w r1, [r4, #64] @ 0x40
- pcb->rttest = 0;
- 800ebe0: 2300 movs r3, #0
- 800ebe2: 6363 str r3, [r4, #52] @ 0x34
- 800ebe4: e6a7 b.n 800e936 <tcp_receive+0x92>
- m = (s16_t) - m;
- 800ebe6: 1b9b subs r3, r3, r6
- 800ebe8: 441d add r5, r3
- 800ebea: b229 sxth r1, r5
- 800ebec: e7eb b.n 800ebc6 <tcp_receive+0x322>
- struct pbuf *p = inseg.p;
- 800ebee: 4b76 ldr r3, [pc, #472] @ (800edc8 <tcp_receive+0x524>)
- 800ebf0: 685d ldr r5, [r3, #4]
- LWIP_ASSERT("inseg.p != NULL", inseg.p);
- 800ebf2: b1dd cbz r5, 800ec2c <tcp_receive+0x388>
- LWIP_ASSERT("insane offset!", (off32 < 0xffff));
- 800ebf4: f64f 73fe movw r3, #65534 @ 0xfffe
- 800ebf8: 429e cmp r6, r3
- 800ebfa: d81f bhi.n 800ec3c <tcp_receive+0x398>
- off = (u16_t)off32;
- 800ebfc: b2b6 uxth r6, r6
- LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off));
- 800ebfe: 4b72 ldr r3, [pc, #456] @ (800edc8 <tcp_receive+0x524>)
- 800ec00: 685b ldr r3, [r3, #4]
- 800ec02: 891b ldrh r3, [r3, #8]
- 800ec04: 42b3 cmp r3, r6
- 800ec06: d321 bcc.n 800ec4c <tcp_receive+0x3a8>
- inseg.len -= off;
- 800ec08: 4b6f ldr r3, [pc, #444] @ (800edc8 <tcp_receive+0x524>)
- 800ec0a: 891a ldrh r2, [r3, #8]
- 800ec0c: 1b92 subs r2, r2, r6
- 800ec0e: 811a strh r2, [r3, #8]
- new_tot_len = (u16_t)(inseg.p->tot_len - off);
- 800ec10: 685b ldr r3, [r3, #4]
- 800ec12: 891a ldrh r2, [r3, #8]
- 800ec14: 1b92 subs r2, r2, r6
- 800ec16: b292 uxth r2, r2
- while (p->len < off) {
- 800ec18: 896b ldrh r3, [r5, #10]
- 800ec1a: 42b3 cmp r3, r6
- 800ec1c: d21e bcs.n 800ec5c <tcp_receive+0x3b8>
- off -= p->len;
- 800ec1e: 1af3 subs r3, r6, r3
- 800ec20: b29e uxth r6, r3
- p->tot_len = new_tot_len;
- 800ec22: 812a strh r2, [r5, #8]
- p->len = 0;
- 800ec24: 2300 movs r3, #0
- 800ec26: 816b strh r3, [r5, #10]
- p = p->next;
- 800ec28: 682d ldr r5, [r5, #0]
- 800ec2a: e7f5 b.n 800ec18 <tcp_receive+0x374>
- LWIP_ASSERT("inseg.p != NULL", inseg.p);
- 800ec2c: 4b67 ldr r3, [pc, #412] @ (800edcc <tcp_receive+0x528>)
- 800ec2e: f240 5294 movw r2, #1428 @ 0x594
- 800ec32: 4967 ldr r1, [pc, #412] @ (800edd0 <tcp_receive+0x52c>)
- 800ec34: 4867 ldr r0, [pc, #412] @ (800edd4 <tcp_receive+0x530>)
- 800ec36: f004 fbe7 bl 8013408 <iprintf>
- 800ec3a: e7db b.n 800ebf4 <tcp_receive+0x350>
- LWIP_ASSERT("insane offset!", (off32 < 0xffff));
- 800ec3c: 4b63 ldr r3, [pc, #396] @ (800edcc <tcp_receive+0x528>)
- 800ec3e: f240 5295 movw r2, #1429 @ 0x595
- 800ec42: 4965 ldr r1, [pc, #404] @ (800edd8 <tcp_receive+0x534>)
- 800ec44: 4863 ldr r0, [pc, #396] @ (800edd4 <tcp_receive+0x530>)
- 800ec46: f004 fbdf bl 8013408 <iprintf>
- 800ec4a: e7d7 b.n 800ebfc <tcp_receive+0x358>
- LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off));
- 800ec4c: 4b5f ldr r3, [pc, #380] @ (800edcc <tcp_receive+0x528>)
- 800ec4e: f240 5297 movw r2, #1431 @ 0x597
- 800ec52: 4962 ldr r1, [pc, #392] @ (800eddc <tcp_receive+0x538>)
- 800ec54: 485f ldr r0, [pc, #380] @ (800edd4 <tcp_receive+0x530>)
- 800ec56: f004 fbd7 bl 8013408 <iprintf>
- 800ec5a: e7d5 b.n 800ec08 <tcp_receive+0x364>
- pbuf_remove_header(p, off);
- 800ec5c: 4631 mov r1, r6
- 800ec5e: 4628 mov r0, r5
- 800ec60: f7fd f858 bl 800bd14 <pbuf_remove_header>
- inseg.tcphdr->seqno = seqno = pcb->rcv_nxt;
- 800ec64: 6a63 ldr r3, [r4, #36] @ 0x24
- 800ec66: 4a5e ldr r2, [pc, #376] @ (800ede0 <tcp_receive+0x53c>)
- 800ec68: 6013 str r3, [r2, #0]
- 800ec6a: 4a57 ldr r2, [pc, #348] @ (800edc8 <tcp_receive+0x524>)
- 800ec6c: 6912 ldr r2, [r2, #16]
- 800ec6e: 6053 str r3, [r2, #4]
- if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) {
- 800ec70: e67a b.n 800e968 <tcp_receive+0xc4>
- tcp_ack_now(pcb);
- 800ec72: 8b63 ldrh r3, [r4, #26]
- 800ec74: f043 0302 orr.w r3, r3, #2
- 800ec78: 8363 strh r3, [r4, #26]
- 800ec7a: e675 b.n 800e968 <tcp_receive+0xc4>
- if (pcb->rcv_nxt == seqno) {
- 800ec7c: 428b cmp r3, r1
- 800ec7e: d005 beq.n 800ec8c <tcp_receive+0x3e8>
- if (pcb->ooseq == NULL) {
- 800ec80: 6f65 ldr r5, [r4, #116] @ 0x74
- 800ec82: 2d00 cmp r5, #0
- 800ec84: f000 81aa beq.w 800efdc <tcp_receive+0x738>
- struct tcp_seg *next, *prev = NULL;
- 800ec88: 2600 movs r6, #0
- 800ec8a: e1cc b.n 800f026 <tcp_receive+0x782>
- tcplen = TCP_TCPLEN(&inseg);
- 800ec8c: 4b4e ldr r3, [pc, #312] @ (800edc8 <tcp_receive+0x524>)
- 800ec8e: 891d ldrh r5, [r3, #8]
- 800ec90: 691b ldr r3, [r3, #16]
- 800ec92: 8998 ldrh r0, [r3, #12]
- 800ec94: f7f9 f8f2 bl 8007e7c <lwip_htons>
- 800ec98: f010 0f03 tst.w r0, #3
- 800ec9c: d014 beq.n 800ecc8 <tcp_receive+0x424>
- 800ec9e: 2301 movs r3, #1
- 800eca0: 442b add r3, r5
- 800eca2: b29b uxth r3, r3
- 800eca4: 4a4f ldr r2, [pc, #316] @ (800ede4 <tcp_receive+0x540>)
- 800eca6: 8013 strh r3, [r2, #0]
- if (tcplen > pcb->rcv_wnd) {
- 800eca8: 8d22 ldrh r2, [r4, #40] @ 0x28
- 800ecaa: 4293 cmp r3, r2
- 800ecac: d80e bhi.n 800eccc <tcp_receive+0x428>
- if (pcb->ooseq != NULL) {
- 800ecae: 6f63 ldr r3, [r4, #116] @ 0x74
- 800ecb0: 2b00 cmp r3, #0
- 800ecb2: d05d beq.n 800ed70 <tcp_receive+0x4cc>
- if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
- 800ecb4: 4b44 ldr r3, [pc, #272] @ (800edc8 <tcp_receive+0x524>)
- 800ecb6: 691b ldr r3, [r3, #16]
- 800ecb8: 8998 ldrh r0, [r3, #12]
- 800ecba: f7f9 f8df bl 8007e7c <lwip_htons>
- 800ecbe: f010 0f01 tst.w r0, #1
- 800ecc2: d152 bne.n 800ed6a <tcp_receive+0x4c6>
- struct tcp_seg *next = pcb->ooseq;
- 800ecc4: 6f65 ldr r5, [r4, #116] @ 0x74
- while (next &&
- 800ecc6: e09e b.n 800ee06 <tcp_receive+0x562>
- tcplen = TCP_TCPLEN(&inseg);
- 800ecc8: 2300 movs r3, #0
- 800ecca: e7e9 b.n 800eca0 <tcp_receive+0x3fc>
- if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
- 800eccc: 4b3e ldr r3, [pc, #248] @ (800edc8 <tcp_receive+0x524>)
- 800ecce: 691b ldr r3, [r3, #16]
- 800ecd0: 8998 ldrh r0, [r3, #12]
- 800ecd2: f7f9 f8d3 bl 8007e7c <lwip_htons>
- 800ecd6: f010 0f01 tst.w r0, #1
- 800ecda: d12f bne.n 800ed3c <tcp_receive+0x498>
- inseg.len = (u16_t)pcb->rcv_wnd;
- 800ecdc: 8d22 ldrh r2, [r4, #40] @ 0x28
- 800ecde: 4b3a ldr r3, [pc, #232] @ (800edc8 <tcp_receive+0x524>)
- 800ece0: 811a strh r2, [r3, #8]
- if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) {
- 800ece2: 691b ldr r3, [r3, #16]
- 800ece4: 8998 ldrh r0, [r3, #12]
- 800ece6: f7f9 f8c9 bl 8007e7c <lwip_htons>
- 800ecea: f010 0f02 tst.w r0, #2
- 800ecee: d003 beq.n 800ecf8 <tcp_receive+0x454>
- inseg.len -= 1;
- 800ecf0: 4a35 ldr r2, [pc, #212] @ (800edc8 <tcp_receive+0x524>)
- 800ecf2: 8913 ldrh r3, [r2, #8]
- 800ecf4: 3b01 subs r3, #1
- 800ecf6: 8113 strh r3, [r2, #8]
- pbuf_realloc(inseg.p, inseg.len);
- 800ecf8: 4d33 ldr r5, [pc, #204] @ (800edc8 <tcp_receive+0x524>)
- 800ecfa: 8929 ldrh r1, [r5, #8]
- 800ecfc: 6868 ldr r0, [r5, #4]
- 800ecfe: f7fd f965 bl 800bfcc <pbuf_realloc>
- tcplen = TCP_TCPLEN(&inseg);
- 800ed02: 892e ldrh r6, [r5, #8]
- 800ed04: 692b ldr r3, [r5, #16]
- 800ed06: 8998 ldrh r0, [r3, #12]
- 800ed08: f7f9 f8b8 bl 8007e7c <lwip_htons>
- 800ed0c: f010 0f03 tst.w r0, #3
- 800ed10: d025 beq.n 800ed5e <tcp_receive+0x4ba>
- 800ed12: 2301 movs r3, #1
- 800ed14: 4433 add r3, r6
- 800ed16: b29b uxth r3, r3
- 800ed18: 4a32 ldr r2, [pc, #200] @ (800ede4 <tcp_receive+0x540>)
- 800ed1a: 8013 strh r3, [r2, #0]
- LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n",
- 800ed1c: 4a30 ldr r2, [pc, #192] @ (800ede0 <tcp_receive+0x53c>)
- 800ed1e: 6812 ldr r2, [r2, #0]
- 800ed20: 4413 add r3, r2
- 800ed22: 6a62 ldr r2, [r4, #36] @ 0x24
- 800ed24: 8d21 ldrh r1, [r4, #40] @ 0x28
- 800ed26: 440a add r2, r1
- 800ed28: 4293 cmp r3, r2
- 800ed2a: d0c0 beq.n 800ecae <tcp_receive+0x40a>
- 800ed2c: 4b27 ldr r3, [pc, #156] @ (800edcc <tcp_receive+0x528>)
- 800ed2e: f240 52cb movw r2, #1483 @ 0x5cb
- 800ed32: 492d ldr r1, [pc, #180] @ (800ede8 <tcp_receive+0x544>)
- 800ed34: 4827 ldr r0, [pc, #156] @ (800edd4 <tcp_receive+0x530>)
- 800ed36: f004 fb67 bl 8013408 <iprintf>
- 800ed3a: e7b8 b.n 800ecae <tcp_receive+0x40a>
- TCPH_FLAGS_SET(inseg.tcphdr, TCPH_FLAGS(inseg.tcphdr) & ~(unsigned int)TCP_FIN);
- 800ed3c: 4e22 ldr r6, [pc, #136] @ (800edc8 <tcp_receive+0x524>)
- 800ed3e: 6933 ldr r3, [r6, #16]
- 800ed40: 899d ldrh r5, [r3, #12]
- 800ed42: 4628 mov r0, r5
- 800ed44: f7f9 f89a bl 8007e7c <lwip_htons>
- 800ed48: f000 003e and.w r0, r0, #62 @ 0x3e
- 800ed4c: f7f9 f896 bl 8007e7c <lwip_htons>
- 800ed50: 6932 ldr r2, [r6, #16]
- 800ed52: f425 557c bic.w r5, r5, #16128 @ 0x3f00
- 800ed56: ea40 0305 orr.w r3, r0, r5
- 800ed5a: 8193 strh r3, [r2, #12]
- 800ed5c: e7be b.n 800ecdc <tcp_receive+0x438>
- tcplen = TCP_TCPLEN(&inseg);
- 800ed5e: 2300 movs r3, #0
- 800ed60: e7d8 b.n 800ed14 <tcp_receive+0x470>
- pcb->ooseq = pcb->ooseq->next;
- 800ed62: 6803 ldr r3, [r0, #0]
- 800ed64: 6763 str r3, [r4, #116] @ 0x74
- tcp_seg_free(old_ooseq);
- 800ed66: f7fe fb21 bl 800d3ac <tcp_seg_free>
- while (pcb->ooseq != NULL) {
- 800ed6a: 6f60 ldr r0, [r4, #116] @ 0x74
- 800ed6c: 2800 cmp r0, #0
- 800ed6e: d1f8 bne.n 800ed62 <tcp_receive+0x4be>
- pcb->rcv_nxt = seqno + tcplen;
- 800ed70: 4b1c ldr r3, [pc, #112] @ (800ede4 <tcp_receive+0x540>)
- 800ed72: 881a ldrh r2, [r3, #0]
- 800ed74: 4b1a ldr r3, [pc, #104] @ (800ede0 <tcp_receive+0x53c>)
- 800ed76: 681b ldr r3, [r3, #0]
- 800ed78: 4413 add r3, r2
- 800ed7a: 6263 str r3, [r4, #36] @ 0x24
- LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen);
- 800ed7c: 8d23 ldrh r3, [r4, #40] @ 0x28
- 800ed7e: 429a cmp r2, r3
- 800ed80: f200 80ad bhi.w 800eede <tcp_receive+0x63a>
- pcb->rcv_wnd -= tcplen;
- 800ed84: 8d23 ldrh r3, [r4, #40] @ 0x28
- 800ed86: 4a17 ldr r2, [pc, #92] @ (800ede4 <tcp_receive+0x540>)
- 800ed88: 8812 ldrh r2, [r2, #0]
- 800ed8a: 1a9b subs r3, r3, r2
- 800ed8c: 8523 strh r3, [r4, #40] @ 0x28
- tcp_update_rcv_ann_wnd(pcb);
- 800ed8e: 4620 mov r0, r4
- 800ed90: f7fe fa90 bl 800d2b4 <tcp_update_rcv_ann_wnd>
- if (inseg.p->tot_len > 0) {
- 800ed94: 4b0c ldr r3, [pc, #48] @ (800edc8 <tcp_receive+0x524>)
- 800ed96: 685b ldr r3, [r3, #4]
- 800ed98: 891a ldrh r2, [r3, #8]
- 800ed9a: b122 cbz r2, 800eda6 <tcp_receive+0x502>
- recv_data = inseg.p;
- 800ed9c: 4a13 ldr r2, [pc, #76] @ (800edec <tcp_receive+0x548>)
- 800ed9e: 6013 str r3, [r2, #0]
- inseg.p = NULL;
- 800eda0: 4b09 ldr r3, [pc, #36] @ (800edc8 <tcp_receive+0x524>)
- 800eda2: 2200 movs r2, #0
- 800eda4: 605a str r2, [r3, #4]
- if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
- 800eda6: 4b08 ldr r3, [pc, #32] @ (800edc8 <tcp_receive+0x524>)
- 800eda8: 691b ldr r3, [r3, #16]
- 800edaa: 8998 ldrh r0, [r3, #12]
- 800edac: f7f9 f866 bl 8007e7c <lwip_htons>
- 800edb0: f010 0f01 tst.w r0, #1
- 800edb4: f000 80c1 beq.w 800ef3a <tcp_receive+0x696>
- recv_flags |= TF_GOT_FIN;
- 800edb8: 4a0d ldr r2, [pc, #52] @ (800edf0 <tcp_receive+0x54c>)
- 800edba: 7813 ldrb r3, [r2, #0]
- 800edbc: f043 0320 orr.w r3, r3, #32
- 800edc0: 7013 strb r3, [r2, #0]
- 800edc2: e0ba b.n 800ef3a <tcp_receive+0x696>
- 800edc4: 24019be4 .word 0x24019be4
- 800edc8: 24019c10 .word 0x24019c10
- 800edcc: 08016c64 .word 0x08016c64
- 800edd0: 08016e04 .word 0x08016e04
- 800edd4: 080144e8 .word 0x080144e8
- 800edd8: 08016e14 .word 0x08016e14
- 800eddc: 08016e24 .word 0x08016e24
- 800ede0: 24019bfc .word 0x24019bfc
- 800ede4: 24019bf2 .word 0x24019bf2
- 800ede8: 08016e34 .word 0x08016e34
- 800edec: 24019bec .word 0x24019bec
- 800edf0: 24019bf0 .word 0x24019bf0
- tcplen = TCP_TCPLEN(&inseg);
- 800edf4: 2300 movs r3, #0
- 800edf6: 443b add r3, r7
- 800edf8: 4a9e ldr r2, [pc, #632] @ (800f074 <tcp_receive+0x7d0>)
- 800edfa: 8013 strh r3, [r2, #0]
- next = next->next;
- 800edfc: 682e ldr r6, [r5, #0]
- tcp_seg_free(tmp);
- 800edfe: 4628 mov r0, r5
- 800ee00: f7fe fad4 bl 800d3ac <tcp_seg_free>
- next = next->next;
- 800ee04: 4635 mov r5, r6
- while (next &&
- 800ee06: b365 cbz r5, 800ee62 <tcp_receive+0x5be>
- TCP_SEQ_GEQ(seqno + tcplen,
- 800ee08: 4b9a ldr r3, [pc, #616] @ (800f074 <tcp_receive+0x7d0>)
- 800ee0a: 881b ldrh r3, [r3, #0]
- 800ee0c: 4a9a ldr r2, [pc, #616] @ (800f078 <tcp_receive+0x7d4>)
- 800ee0e: 6812 ldr r2, [r2, #0]
- 800ee10: 4413 add r3, r2
- 800ee12: 6929 ldr r1, [r5, #16]
- 800ee14: 684a ldr r2, [r1, #4]
- 800ee16: 8928 ldrh r0, [r5, #8]
- 800ee18: 4402 add r2, r0
- 800ee1a: 1a9b subs r3, r3, r2
- while (next &&
- 800ee1c: 2b00 cmp r3, #0
- 800ee1e: db20 blt.n 800ee62 <tcp_receive+0x5be>
- if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 &&
- 800ee20: 8988 ldrh r0, [r1, #12]
- 800ee22: f7f9 f82b bl 8007e7c <lwip_htons>
- 800ee26: f010 0f01 tst.w r0, #1
- 800ee2a: d0e7 beq.n 800edfc <tcp_receive+0x558>
- (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) == 0) {
- 800ee2c: 4b93 ldr r3, [pc, #588] @ (800f07c <tcp_receive+0x7d8>)
- 800ee2e: 691b ldr r3, [r3, #16]
- 800ee30: 8998 ldrh r0, [r3, #12]
- 800ee32: f7f9 f823 bl 8007e7c <lwip_htons>
- if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 &&
- 800ee36: f010 0f02 tst.w r0, #2
- 800ee3a: d1df bne.n 800edfc <tcp_receive+0x558>
- TCPH_SET_FLAG(inseg.tcphdr, TCP_FIN);
- 800ee3c: 4e8f ldr r6, [pc, #572] @ (800f07c <tcp_receive+0x7d8>)
- 800ee3e: 6933 ldr r3, [r6, #16]
- 800ee40: 899f ldrh r7, [r3, #12]
- 800ee42: 2001 movs r0, #1
- 800ee44: f7f9 f81a bl 8007e7c <lwip_htons>
- 800ee48: 6933 ldr r3, [r6, #16]
- 800ee4a: 4307 orrs r7, r0
- 800ee4c: 819f strh r7, [r3, #12]
- tcplen = TCP_TCPLEN(&inseg);
- 800ee4e: 8937 ldrh r7, [r6, #8]
- 800ee50: 6933 ldr r3, [r6, #16]
- 800ee52: 8998 ldrh r0, [r3, #12]
- 800ee54: f7f9 f812 bl 8007e7c <lwip_htons>
- 800ee58: f010 0f03 tst.w r0, #3
- 800ee5c: d0ca beq.n 800edf4 <tcp_receive+0x550>
- 800ee5e: 2301 movs r3, #1
- 800ee60: e7c9 b.n 800edf6 <tcp_receive+0x552>
- if (next &&
- 800ee62: b14d cbz r5, 800ee78 <tcp_receive+0x5d4>
- TCP_SEQ_GT(seqno + tcplen,
- 800ee64: 4b84 ldr r3, [pc, #528] @ (800f078 <tcp_receive+0x7d4>)
- 800ee66: 6819 ldr r1, [r3, #0]
- 800ee68: 4b82 ldr r3, [pc, #520] @ (800f074 <tcp_receive+0x7d0>)
- 800ee6a: 881b ldrh r3, [r3, #0]
- 800ee6c: 440b add r3, r1
- 800ee6e: 692a ldr r2, [r5, #16]
- 800ee70: 6852 ldr r2, [r2, #4]
- 800ee72: 1a9b subs r3, r3, r2
- if (next &&
- 800ee74: 2b00 cmp r3, #0
- 800ee76: dc01 bgt.n 800ee7c <tcp_receive+0x5d8>
- pcb->ooseq = next;
- 800ee78: 6765 str r5, [r4, #116] @ 0x74
- 800ee7a: e779 b.n 800ed70 <tcp_receive+0x4cc>
- inseg.len = (u16_t)(next->tcphdr->seqno - seqno);
- 800ee7c: 1a52 subs r2, r2, r1
- 800ee7e: 4b7f ldr r3, [pc, #508] @ (800f07c <tcp_receive+0x7d8>)
- 800ee80: 811a strh r2, [r3, #8]
- if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) {
- 800ee82: 691b ldr r3, [r3, #16]
- 800ee84: 8998 ldrh r0, [r3, #12]
- 800ee86: f7f8 fff9 bl 8007e7c <lwip_htons>
- 800ee8a: f010 0f02 tst.w r0, #2
- 800ee8e: d003 beq.n 800ee98 <tcp_receive+0x5f4>
- inseg.len -= 1;
- 800ee90: 4a7a ldr r2, [pc, #488] @ (800f07c <tcp_receive+0x7d8>)
- 800ee92: 8913 ldrh r3, [r2, #8]
- 800ee94: 3b01 subs r3, #1
- 800ee96: 8113 strh r3, [r2, #8]
- pbuf_realloc(inseg.p, inseg.len);
- 800ee98: 4e78 ldr r6, [pc, #480] @ (800f07c <tcp_receive+0x7d8>)
- 800ee9a: 8931 ldrh r1, [r6, #8]
- 800ee9c: 6870 ldr r0, [r6, #4]
- 800ee9e: f7fd f895 bl 800bfcc <pbuf_realloc>
- tcplen = TCP_TCPLEN(&inseg);
- 800eea2: 8937 ldrh r7, [r6, #8]
- 800eea4: 6933 ldr r3, [r6, #16]
- 800eea6: 8998 ldrh r0, [r3, #12]
- 800eea8: f7f8 ffe8 bl 8007e7c <lwip_htons>
- 800eeac: f010 0f03 tst.w r0, #3
- 800eeb0: d013 beq.n 800eeda <tcp_receive+0x636>
- 800eeb2: 2301 movs r3, #1
- 800eeb4: 443b add r3, r7
- 800eeb6: b29b uxth r3, r3
- 800eeb8: 4a6e ldr r2, [pc, #440] @ (800f074 <tcp_receive+0x7d0>)
- 800eeba: 8013 strh r3, [r2, #0]
- LWIP_ASSERT("tcp_receive: segment not trimmed correctly to ooseq queue\n",
- 800eebc: 4a6e ldr r2, [pc, #440] @ (800f078 <tcp_receive+0x7d4>)
- 800eebe: 6812 ldr r2, [r2, #0]
- 800eec0: 4413 add r3, r2
- 800eec2: 692a ldr r2, [r5, #16]
- 800eec4: 6852 ldr r2, [r2, #4]
- 800eec6: 4293 cmp r3, r2
- 800eec8: d0d6 beq.n 800ee78 <tcp_receive+0x5d4>
- 800eeca: 4b6d ldr r3, [pc, #436] @ (800f080 <tcp_receive+0x7dc>)
- 800eecc: f240 52fc movw r2, #1532 @ 0x5fc
- 800eed0: 496c ldr r1, [pc, #432] @ (800f084 <tcp_receive+0x7e0>)
- 800eed2: 486d ldr r0, [pc, #436] @ (800f088 <tcp_receive+0x7e4>)
- 800eed4: f004 fa98 bl 8013408 <iprintf>
- 800eed8: e7ce b.n 800ee78 <tcp_receive+0x5d4>
- tcplen = TCP_TCPLEN(&inseg);
- 800eeda: 2300 movs r3, #0
- 800eedc: e7ea b.n 800eeb4 <tcp_receive+0x610>
- LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen);
- 800eede: 4b68 ldr r3, [pc, #416] @ (800f080 <tcp_receive+0x7dc>)
- 800eee0: f240 6207 movw r2, #1543 @ 0x607
- 800eee4: 4969 ldr r1, [pc, #420] @ (800f08c <tcp_receive+0x7e8>)
- 800eee6: 4868 ldr r0, [pc, #416] @ (800f088 <tcp_receive+0x7e4>)
- 800eee8: f004 fa8e bl 8013408 <iprintf>
- 800eeec: e74a b.n 800ed84 <tcp_receive+0x4e0>
- pcb->rcv_nxt += TCP_TCPLEN(cseg);
- 800eeee: 2200 movs r2, #0
- 800eef0: e035 b.n 800ef5e <tcp_receive+0x6ba>
- LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n",
- 800eef2: 2300 movs r3, #0
- 800eef4: e041 b.n 800ef7a <tcp_receive+0x6d6>
- 800eef6: 4b62 ldr r3, [pc, #392] @ (800f080 <tcp_receive+0x7dc>)
- 800eef8: f240 622b movw r2, #1579 @ 0x62b
- 800eefc: 4964 ldr r1, [pc, #400] @ (800f090 <tcp_receive+0x7ec>)
- 800eefe: 4862 ldr r0, [pc, #392] @ (800f088 <tcp_receive+0x7e4>)
- 800ef00: f004 fa82 bl 8013408 <iprintf>
- 800ef04: e03c b.n 800ef80 <tcp_receive+0x6dc>
- pcb->rcv_wnd -= TCP_TCPLEN(cseg);
- 800ef06: 2200 movs r2, #0
- 800ef08: e043 b.n 800ef92 <tcp_receive+0x6ee>
- recv_data = cseg->p;
- 800ef0a: 4b62 ldr r3, [pc, #392] @ (800f094 <tcp_receive+0x7f0>)
- 800ef0c: 6019 str r1, [r3, #0]
- cseg->p = NULL;
- 800ef0e: 2300 movs r3, #0
- 800ef10: 606b str r3, [r5, #4]
- if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) {
- 800ef12: 692b ldr r3, [r5, #16]
- 800ef14: 8998 ldrh r0, [r3, #12]
- 800ef16: f7f8 ffb1 bl 8007e7c <lwip_htons>
- 800ef1a: f010 0f01 tst.w r0, #1
- 800ef1e: d007 beq.n 800ef30 <tcp_receive+0x68c>
- recv_flags |= TF_GOT_FIN;
- 800ef20: 4a5d ldr r2, [pc, #372] @ (800f098 <tcp_receive+0x7f4>)
- 800ef22: 7813 ldrb r3, [r2, #0]
- 800ef24: f043 0320 orr.w r3, r3, #32
- 800ef28: 7013 strb r3, [r2, #0]
- if (pcb->state == ESTABLISHED) { /* force passive close or we can move to active close */
- 800ef2a: 7d23 ldrb r3, [r4, #20]
- 800ef2c: 2b04 cmp r3, #4
- 800ef2e: d042 beq.n 800efb6 <tcp_receive+0x712>
- pcb->ooseq = cseg->next;
- 800ef30: 682b ldr r3, [r5, #0]
- 800ef32: 6763 str r3, [r4, #116] @ 0x74
- tcp_seg_free(cseg);
- 800ef34: 4628 mov r0, r5
- 800ef36: f7fe fa39 bl 800d3ac <tcp_seg_free>
- while (pcb->ooseq != NULL &&
- 800ef3a: 6f65 ldr r5, [r4, #116] @ 0x74
- 800ef3c: 2d00 cmp r5, #0
- 800ef3e: d03d beq.n 800efbc <tcp_receive+0x718>
- pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) {
- 800ef40: 692a ldr r2, [r5, #16]
- 800ef42: 6853 ldr r3, [r2, #4]
- 800ef44: 6a61 ldr r1, [r4, #36] @ 0x24
- while (pcb->ooseq != NULL &&
- 800ef46: 428b cmp r3, r1
- 800ef48: d138 bne.n 800efbc <tcp_receive+0x718>
- seqno = pcb->ooseq->tcphdr->seqno;
- 800ef4a: 494b ldr r1, [pc, #300] @ (800f078 <tcp_receive+0x7d4>)
- 800ef4c: 600b str r3, [r1, #0]
- pcb->rcv_nxt += TCP_TCPLEN(cseg);
- 800ef4e: 892e ldrh r6, [r5, #8]
- 800ef50: 8990 ldrh r0, [r2, #12]
- 800ef52: f7f8 ff93 bl 8007e7c <lwip_htons>
- 800ef56: f010 0f03 tst.w r0, #3
- 800ef5a: d0c8 beq.n 800eeee <tcp_receive+0x64a>
- 800ef5c: 2201 movs r2, #1
- 800ef5e: 4432 add r2, r6
- 800ef60: 6a63 ldr r3, [r4, #36] @ 0x24
- 800ef62: 4413 add r3, r2
- 800ef64: 6263 str r3, [r4, #36] @ 0x24
- LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n",
- 800ef66: 8d26 ldrh r6, [r4, #40] @ 0x28
- 800ef68: 892f ldrh r7, [r5, #8]
- 800ef6a: 692b ldr r3, [r5, #16]
- 800ef6c: 8998 ldrh r0, [r3, #12]
- 800ef6e: f7f8 ff85 bl 8007e7c <lwip_htons>
- 800ef72: f010 0f03 tst.w r0, #3
- 800ef76: d0bc beq.n 800eef2 <tcp_receive+0x64e>
- 800ef78: 2301 movs r3, #1
- 800ef7a: 443b add r3, r7
- 800ef7c: 429e cmp r6, r3
- 800ef7e: d3ba bcc.n 800eef6 <tcp_receive+0x652>
- pcb->rcv_wnd -= TCP_TCPLEN(cseg);
- 800ef80: 892e ldrh r6, [r5, #8]
- 800ef82: 692b ldr r3, [r5, #16]
- 800ef84: 8998 ldrh r0, [r3, #12]
- 800ef86: f7f8 ff79 bl 8007e7c <lwip_htons>
- 800ef8a: f010 0f03 tst.w r0, #3
- 800ef8e: d0ba beq.n 800ef06 <tcp_receive+0x662>
- 800ef90: 2201 movs r2, #1
- 800ef92: 4432 add r2, r6
- 800ef94: 8d23 ldrh r3, [r4, #40] @ 0x28
- 800ef96: 1a9b subs r3, r3, r2
- 800ef98: 8523 strh r3, [r4, #40] @ 0x28
- tcp_update_rcv_ann_wnd(pcb);
- 800ef9a: 4620 mov r0, r4
- 800ef9c: f7fe f98a bl 800d2b4 <tcp_update_rcv_ann_wnd>
- if (cseg->p->tot_len > 0) {
- 800efa0: 6869 ldr r1, [r5, #4]
- 800efa2: 890b ldrh r3, [r1, #8]
- 800efa4: 2b00 cmp r3, #0
- 800efa6: d0b4 beq.n 800ef12 <tcp_receive+0x66e>
- if (recv_data) {
- 800efa8: 4b3a ldr r3, [pc, #232] @ (800f094 <tcp_receive+0x7f0>)
- 800efaa: 6818 ldr r0, [r3, #0]
- 800efac: 2800 cmp r0, #0
- 800efae: d0ac beq.n 800ef0a <tcp_receive+0x666>
- pbuf_cat(recv_data, cseg->p);
- 800efb0: f7fd f8a0 bl 800c0f4 <pbuf_cat>
- 800efb4: e7ab b.n 800ef0e <tcp_receive+0x66a>
- pcb->state = CLOSE_WAIT;
- 800efb6: 2307 movs r3, #7
- 800efb8: 7523 strb r3, [r4, #20]
- 800efba: e7b9 b.n 800ef30 <tcp_receive+0x68c>
- tcp_ack(pcb);
- 800efbc: 8b63 ldrh r3, [r4, #26]
- 800efbe: f013 0f01 tst.w r3, #1
- 800efc2: d007 beq.n 800efd4 <tcp_receive+0x730>
- 800efc4: f023 0301 bic.w r3, r3, #1
- 800efc8: b29b uxth r3, r3
- 800efca: 8363 strh r3, [r4, #26]
- 800efcc: f043 0302 orr.w r3, r3, #2
- 800efd0: 8363 strh r3, [r4, #26]
- 800efd2: e0fa b.n 800f1ca <tcp_receive+0x926>
- 800efd4: f043 0301 orr.w r3, r3, #1
- 800efd8: 8363 strh r3, [r4, #26]
- 800efda: e0f6 b.n 800f1ca <tcp_receive+0x926>
- pcb->ooseq = tcp_seg_copy(&inseg);
- 800efdc: 4827 ldr r0, [pc, #156] @ (800f07c <tcp_receive+0x7d8>)
- 800efde: f7fe f9fd bl 800d3dc <tcp_seg_copy>
- 800efe2: 6760 str r0, [r4, #116] @ 0x74
- 800efe4: e004 b.n 800eff0 <tcp_receive+0x74c>
- if (inseg.len > next->len) {
- 800efe6: 4b25 ldr r3, [pc, #148] @ (800f07c <tcp_receive+0x7d8>)
- 800efe8: 891a ldrh r2, [r3, #8]
- 800efea: 892b ldrh r3, [r5, #8]
- 800efec: 429a cmp r2, r3
- 800efee: d803 bhi.n 800eff8 <tcp_receive+0x754>
- tcp_send_empty_ack(pcb);
- 800eff0: 4620 mov r0, r4
- 800eff2: f001 fefd bl 8010df0 <tcp_send_empty_ack>
- 800eff6: e0e8 b.n 800f1ca <tcp_receive+0x926>
- struct tcp_seg *cseg = tcp_seg_copy(&inseg);
- 800eff8: 4820 ldr r0, [pc, #128] @ (800f07c <tcp_receive+0x7d8>)
- 800effa: f7fe f9ef bl 800d3dc <tcp_seg_copy>
- if (cseg != NULL) {
- 800effe: 4603 mov r3, r0
- 800f000: 2800 cmp r0, #0
- 800f002: d0f5 beq.n 800eff0 <tcp_receive+0x74c>
- if (prev != NULL) {
- 800f004: b12e cbz r6, 800f012 <tcp_receive+0x76e>
- prev->next = cseg;
- 800f006: 6030 str r0, [r6, #0]
- tcp_oos_insert_segment(cseg, next);
- 800f008: 4629 mov r1, r5
- 800f00a: 4618 mov r0, r3
- 800f00c: f7ff fbf6 bl 800e7fc <tcp_oos_insert_segment>
- 800f010: e7ee b.n 800eff0 <tcp_receive+0x74c>
- pcb->ooseq = cseg;
- 800f012: 6760 str r0, [r4, #116] @ 0x74
- 800f014: e7f8 b.n 800f008 <tcp_receive+0x764>
- if (TCP_SEQ_LT(seqno, next->tcphdr->seqno)) {
- 800f016: 1a99 subs r1, r3, r2
- 800f018: 2900 cmp r1, #0
- 800f01a: db3f blt.n 800f09c <tcp_receive+0x7f8>
- if (next->next == NULL &&
- 800f01c: 6829 ldr r1, [r5, #0]
- 800f01e: 462e mov r6, r5
- 800f020: 2900 cmp r1, #0
- 800f022: d04c beq.n 800f0be <tcp_receive+0x81a>
- 800f024: 460d mov r5, r1
- for (next = pcb->ooseq; next != NULL; next = next->next) {
- 800f026: 2d00 cmp r5, #0
- 800f028: d0e2 beq.n 800eff0 <tcp_receive+0x74c>
- if (seqno == next->tcphdr->seqno) {
- 800f02a: 6928 ldr r0, [r5, #16]
- 800f02c: 6842 ldr r2, [r0, #4]
- 800f02e: 4293 cmp r3, r2
- 800f030: d0d9 beq.n 800efe6 <tcp_receive+0x742>
- if (prev == NULL) {
- 800f032: 2e00 cmp r6, #0
- 800f034: d0ef beq.n 800f016 <tcp_receive+0x772>
- if (TCP_SEQ_BETWEEN(seqno, prev->tcphdr->seqno + 1, next->tcphdr->seqno - 1)) {
- 800f036: 6931 ldr r1, [r6, #16]
- 800f038: 6849 ldr r1, [r1, #4]
- 800f03a: 1a59 subs r1, r3, r1
- 800f03c: 2901 cmp r1, #1
- 800f03e: d4ed bmi.n 800f01c <tcp_receive+0x778>
- 800f040: 1a99 subs r1, r3, r2
- 800f042: 3101 adds r1, #1
- 800f044: 2900 cmp r1, #0
- 800f046: dce9 bgt.n 800f01c <tcp_receive+0x778>
- struct tcp_seg *cseg = tcp_seg_copy(&inseg);
- 800f048: 480c ldr r0, [pc, #48] @ (800f07c <tcp_receive+0x7d8>)
- 800f04a: f7fe f9c7 bl 800d3dc <tcp_seg_copy>
- if (cseg != NULL) {
- 800f04e: 4607 mov r7, r0
- 800f050: 2800 cmp r0, #0
- 800f052: d0cd beq.n 800eff0 <tcp_receive+0x74c>
- if (TCP_SEQ_GT(prev->tcphdr->seqno + prev->len, seqno)) {
- 800f054: 6933 ldr r3, [r6, #16]
- 800f056: 6859 ldr r1, [r3, #4]
- 800f058: 8933 ldrh r3, [r6, #8]
- 800f05a: 440b add r3, r1
- 800f05c: 4a06 ldr r2, [pc, #24] @ (800f078 <tcp_receive+0x7d4>)
- 800f05e: 6812 ldr r2, [r2, #0]
- 800f060: 1a9b subs r3, r3, r2
- 800f062: 2b00 cmp r3, #0
- 800f064: dc24 bgt.n 800f0b0 <tcp_receive+0x80c>
- prev->next = cseg;
- 800f066: 6037 str r7, [r6, #0]
- tcp_oos_insert_segment(cseg, next);
- 800f068: 4629 mov r1, r5
- 800f06a: 4638 mov r0, r7
- 800f06c: f7ff fbc6 bl 800e7fc <tcp_oos_insert_segment>
- 800f070: e7be b.n 800eff0 <tcp_receive+0x74c>
- 800f072: bf00 nop
- 800f074: 24019bf2 .word 0x24019bf2
- 800f078: 24019bfc .word 0x24019bfc
- 800f07c: 24019c10 .word 0x24019c10
- 800f080: 08016c64 .word 0x08016c64
- 800f084: 08016e6c .word 0x08016e6c
- 800f088: 080144e8 .word 0x080144e8
- 800f08c: 08016ea8 .word 0x08016ea8
- 800f090: 08016ec8 .word 0x08016ec8
- 800f094: 24019bec .word 0x24019bec
- 800f098: 24019bf0 .word 0x24019bf0
- struct tcp_seg *cseg = tcp_seg_copy(&inseg);
- 800f09c: 484b ldr r0, [pc, #300] @ (800f1cc <tcp_receive+0x928>)
- 800f09e: f7fe f99d bl 800d3dc <tcp_seg_copy>
- if (cseg != NULL) {
- 800f0a2: 2800 cmp r0, #0
- 800f0a4: d0a4 beq.n 800eff0 <tcp_receive+0x74c>
- pcb->ooseq = cseg;
- 800f0a6: 6760 str r0, [r4, #116] @ 0x74
- tcp_oos_insert_segment(cseg, next);
- 800f0a8: 4629 mov r1, r5
- 800f0aa: f7ff fba7 bl 800e7fc <tcp_oos_insert_segment>
- 800f0ae: e79f b.n 800eff0 <tcp_receive+0x74c>
- prev->len = (u16_t)(seqno - prev->tcphdr->seqno);
- 800f0b0: 1a52 subs r2, r2, r1
- 800f0b2: b291 uxth r1, r2
- 800f0b4: 8131 strh r1, [r6, #8]
- pbuf_realloc(prev->p, prev->len);
- 800f0b6: 6870 ldr r0, [r6, #4]
- 800f0b8: f7fc ff88 bl 800bfcc <pbuf_realloc>
- 800f0bc: e7d3 b.n 800f066 <tcp_receive+0x7c2>
- TCP_SEQ_GT(seqno, next->tcphdr->seqno)) {
- 800f0be: 1a9a subs r2, r3, r2
- if (next->next == NULL &&
- 800f0c0: 2a00 cmp r2, #0
- 800f0c2: dc01 bgt.n 800f0c8 <tcp_receive+0x824>
- 800f0c4: 460d mov r5, r1
- 800f0c6: e7ae b.n 800f026 <tcp_receive+0x782>
- if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) {
- 800f0c8: 8980 ldrh r0, [r0, #12]
- 800f0ca: f7f8 fed7 bl 8007e7c <lwip_htons>
- 800f0ce: f010 0f01 tst.w r0, #1
- 800f0d2: d18d bne.n 800eff0 <tcp_receive+0x74c>
- next->next = tcp_seg_copy(&inseg);
- 800f0d4: 483d ldr r0, [pc, #244] @ (800f1cc <tcp_receive+0x928>)
- 800f0d6: f7fe f981 bl 800d3dc <tcp_seg_copy>
- 800f0da: 6028 str r0, [r5, #0]
- if (next->next != NULL) {
- 800f0dc: 2800 cmp r0, #0
- 800f0de: d087 beq.n 800eff0 <tcp_receive+0x74c>
- if (TCP_SEQ_GT(next->tcphdr->seqno + next->len, seqno)) {
- 800f0e0: 692b ldr r3, [r5, #16]
- 800f0e2: 6859 ldr r1, [r3, #4]
- 800f0e4: 892a ldrh r2, [r5, #8]
- 800f0e6: 440a add r2, r1
- 800f0e8: 4b39 ldr r3, [pc, #228] @ (800f1d0 <tcp_receive+0x92c>)
- 800f0ea: 681b ldr r3, [r3, #0]
- 800f0ec: 1ad2 subs r2, r2, r3
- 800f0ee: 2a00 cmp r2, #0
- 800f0f0: dc40 bgt.n 800f174 <tcp_receive+0x8d0>
- if (TCP_SEQ_GT((u32_t)tcplen + seqno, pcb->rcv_nxt + (u32_t)pcb->rcv_wnd)) {
- 800f0f2: 4b38 ldr r3, [pc, #224] @ (800f1d4 <tcp_receive+0x930>)
- 800f0f4: 881b ldrh r3, [r3, #0]
- 800f0f6: 4a36 ldr r2, [pc, #216] @ (800f1d0 <tcp_receive+0x92c>)
- 800f0f8: 6812 ldr r2, [r2, #0]
- 800f0fa: 4413 add r3, r2
- 800f0fc: 6a62 ldr r2, [r4, #36] @ 0x24
- 800f0fe: 8d21 ldrh r1, [r4, #40] @ 0x28
- 800f100: 440a add r2, r1
- 800f102: 1a9b subs r3, r3, r2
- 800f104: 2b00 cmp r3, #0
- 800f106: f77f af73 ble.w 800eff0 <tcp_receive+0x74c>
- if (TCPH_FLAGS(next->next->tcphdr) & TCP_FIN) {
- 800f10a: 682b ldr r3, [r5, #0]
- 800f10c: 691b ldr r3, [r3, #16]
- 800f10e: 8998 ldrh r0, [r3, #12]
- 800f110: f7f8 feb4 bl 8007e7c <lwip_htons>
- 800f114: f010 0f01 tst.w r0, #1
- 800f118: d133 bne.n 800f182 <tcp_receive+0x8de>
- next->next->len = (u16_t)(pcb->rcv_nxt + pcb->rcv_wnd - seqno);
- 800f11a: 6a62 ldr r2, [r4, #36] @ 0x24
- 800f11c: 8d23 ldrh r3, [r4, #40] @ 0x28
- 800f11e: 4413 add r3, r2
- 800f120: b29b uxth r3, r3
- 800f122: 682a ldr r2, [r5, #0]
- 800f124: 492a ldr r1, [pc, #168] @ (800f1d0 <tcp_receive+0x92c>)
- 800f126: 6809 ldr r1, [r1, #0]
- 800f128: 1a5b subs r3, r3, r1
- 800f12a: 8113 strh r3, [r2, #8]
- pbuf_realloc(next->next->p, next->next->len);
- 800f12c: 682b ldr r3, [r5, #0]
- 800f12e: 8919 ldrh r1, [r3, #8]
- 800f130: 6858 ldr r0, [r3, #4]
- 800f132: f7fc ff4b bl 800bfcc <pbuf_realloc>
- tcplen = TCP_TCPLEN(next->next);
- 800f136: 682b ldr r3, [r5, #0]
- 800f138: 891d ldrh r5, [r3, #8]
- 800f13a: 691b ldr r3, [r3, #16]
- 800f13c: 8998 ldrh r0, [r3, #12]
- 800f13e: f7f8 fe9d bl 8007e7c <lwip_htons>
- 800f142: f010 0f03 tst.w r0, #3
- 800f146: d02e beq.n 800f1a6 <tcp_receive+0x902>
- 800f148: 2301 movs r3, #1
- 800f14a: 442b add r3, r5
- 800f14c: b29b uxth r3, r3
- 800f14e: 4a21 ldr r2, [pc, #132] @ (800f1d4 <tcp_receive+0x930>)
- 800f150: 8013 strh r3, [r2, #0]
- LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n",
- 800f152: 4a1f ldr r2, [pc, #124] @ (800f1d0 <tcp_receive+0x92c>)
- 800f154: 6812 ldr r2, [r2, #0]
- 800f156: 4413 add r3, r2
- 800f158: 6a62 ldr r2, [r4, #36] @ 0x24
- 800f15a: 8d21 ldrh r1, [r4, #40] @ 0x28
- 800f15c: 440a add r2, r1
- 800f15e: 4293 cmp r3, r2
- 800f160: f43f af46 beq.w 800eff0 <tcp_receive+0x74c>
- 800f164: 4b1c ldr r3, [pc, #112] @ (800f1d8 <tcp_receive+0x934>)
- 800f166: f44f 62df mov.w r2, #1784 @ 0x6f8
- 800f16a: 491c ldr r1, [pc, #112] @ (800f1dc <tcp_receive+0x938>)
- 800f16c: 481c ldr r0, [pc, #112] @ (800f1e0 <tcp_receive+0x93c>)
- 800f16e: f004 f94b bl 8013408 <iprintf>
- 800f172: e73d b.n 800eff0 <tcp_receive+0x74c>
- next->len = (u16_t)(seqno - next->tcphdr->seqno);
- 800f174: 1a5b subs r3, r3, r1
- 800f176: b299 uxth r1, r3
- 800f178: 8129 strh r1, [r5, #8]
- pbuf_realloc(next->p, next->len);
- 800f17a: 6868 ldr r0, [r5, #4]
- 800f17c: f7fc ff26 bl 800bfcc <pbuf_realloc>
- 800f180: e7b7 b.n 800f0f2 <tcp_receive+0x84e>
- TCPH_FLAGS_SET(next->next->tcphdr, TCPH_FLAGS(next->next->tcphdr) & ~TCP_FIN);
- 800f182: 682b ldr r3, [r5, #0]
- 800f184: 691b ldr r3, [r3, #16]
- 800f186: 899e ldrh r6, [r3, #12]
- 800f188: 4630 mov r0, r6
- 800f18a: f7f8 fe77 bl 8007e7c <lwip_htons>
- 800f18e: f000 003e and.w r0, r0, #62 @ 0x3e
- 800f192: f7f8 fe73 bl 8007e7c <lwip_htons>
- 800f196: 682b ldr r3, [r5, #0]
- 800f198: 691a ldr r2, [r3, #16]
- 800f19a: f426 567c bic.w r6, r6, #16128 @ 0x3f00
- 800f19e: ea40 0306 orr.w r3, r0, r6
- 800f1a2: 8193 strh r3, [r2, #12]
- 800f1a4: e7b9 b.n 800f11a <tcp_receive+0x876>
- tcplen = TCP_TCPLEN(next->next);
- 800f1a6: 2300 movs r3, #0
- 800f1a8: e7cf b.n 800f14a <tcp_receive+0x8a6>
- if (!TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd - 1)) {
- 800f1aa: 4b09 ldr r3, [pc, #36] @ (800f1d0 <tcp_receive+0x92c>)
- 800f1ac: 681b ldr r3, [r3, #0]
- 800f1ae: 6a62 ldr r2, [r4, #36] @ 0x24
- 800f1b0: 1a99 subs r1, r3, r2
- 800f1b2: 2900 cmp r1, #0
- 800f1b4: db05 blt.n 800f1c2 <tcp_receive+0x91e>
- 800f1b6: 8d21 ldrh r1, [r4, #40] @ 0x28
- 800f1b8: 440a add r2, r1
- 800f1ba: 1a9b subs r3, r3, r2
- 800f1bc: 3301 adds r3, #1
- 800f1be: 2b00 cmp r3, #0
- 800f1c0: dd03 ble.n 800f1ca <tcp_receive+0x926>
- tcp_ack_now(pcb);
- 800f1c2: 8b63 ldrh r3, [r4, #26]
- 800f1c4: f043 0302 orr.w r3, r3, #2
- 800f1c8: 8363 strh r3, [r4, #26]
- }
- 800f1ca: bdf8 pop {r3, r4, r5, r6, r7, pc}
- 800f1cc: 24019c10 .word 0x24019c10
- 800f1d0: 24019bfc .word 0x24019bfc
- 800f1d4: 24019bf2 .word 0x24019bf2
- 800f1d8: 08016c64 .word 0x08016c64
- 800f1dc: 08016e34 .word 0x08016e34
- 800f1e0: 080144e8 .word 0x080144e8
- 0800f1e4 <tcp_process>:
- {
- 800f1e4: b570 push {r4, r5, r6, lr}
- 800f1e6: b084 sub sp, #16
- LWIP_ASSERT("tcp_process: invalid pcb", pcb != NULL);
- 800f1e8: 4604 mov r4, r0
- 800f1ea: b1c8 cbz r0, 800f220 <tcp_process+0x3c>
- if (flags & TCP_RST) {
- 800f1ec: 4b99 ldr r3, [pc, #612] @ (800f454 <tcp_process+0x270>)
- 800f1ee: 781b ldrb r3, [r3, #0]
- 800f1f0: f013 0f04 tst.w r3, #4
- 800f1f4: d03a beq.n 800f26c <tcp_process+0x88>
- if (pcb->state == SYN_SENT) {
- 800f1f6: 7d21 ldrb r1, [r4, #20]
- 800f1f8: 2902 cmp r1, #2
- 800f1fa: d019 beq.n 800f230 <tcp_process+0x4c>
- if (seqno == pcb->rcv_nxt) {
- 800f1fc: 6a62 ldr r2, [r4, #36] @ 0x24
- 800f1fe: 4b96 ldr r3, [pc, #600] @ (800f458 <tcp_process+0x274>)
- 800f200: 681b ldr r3, [r3, #0]
- 800f202: 429a cmp r2, r3
- 800f204: d01d beq.n 800f242 <tcp_process+0x5e>
- } else if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
- 800f206: 1a99 subs r1, r3, r2
- 800f208: 2900 cmp r1, #0
- 800f20a: db16 blt.n 800f23a <tcp_process+0x56>
- 800f20c: 8d21 ldrh r1, [r4, #40] @ 0x28
- 800f20e: 440a add r2, r1
- 800f210: 1a9b subs r3, r3, r2
- 800f212: 2b00 cmp r3, #0
- 800f214: dc11 bgt.n 800f23a <tcp_process+0x56>
- tcp_ack_now(pcb);
- 800f216: 8b63 ldrh r3, [r4, #26]
- 800f218: f043 0302 orr.w r3, r3, #2
- 800f21c: 8363 strh r3, [r4, #26]
- if (acceptable) {
- 800f21e: e00c b.n 800f23a <tcp_process+0x56>
- LWIP_ASSERT("tcp_process: invalid pcb", pcb != NULL);
- 800f220: 4b8e ldr r3, [pc, #568] @ (800f45c <tcp_process+0x278>)
- 800f222: f44f 7247 mov.w r2, #796 @ 0x31c
- 800f226: 498e ldr r1, [pc, #568] @ (800f460 <tcp_process+0x27c>)
- 800f228: 488e ldr r0, [pc, #568] @ (800f464 <tcp_process+0x280>)
- 800f22a: f004 f8ed bl 8013408 <iprintf>
- 800f22e: e7dd b.n 800f1ec <tcp_process+0x8>
- if (ackno == pcb->snd_nxt) {
- 800f230: 6d22 ldr r2, [r4, #80] @ 0x50
- 800f232: 4b8d ldr r3, [pc, #564] @ (800f468 <tcp_process+0x284>)
- 800f234: 681b ldr r3, [r3, #0]
- 800f236: 429a cmp r2, r3
- 800f238: d003 beq.n 800f242 <tcp_process+0x5e>
- return ERR_OK;
- 800f23a: 2500 movs r5, #0
- }
- 800f23c: 4628 mov r0, r5
- 800f23e: b004 add sp, #16
- 800f240: bd70 pop {r4, r5, r6, pc}
- LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED);
- 800f242: b159 cbz r1, 800f25c <tcp_process+0x78>
- recv_flags |= TF_RESET;
- 800f244: 4a89 ldr r2, [pc, #548] @ (800f46c <tcp_process+0x288>)
- 800f246: 7813 ldrb r3, [r2, #0]
- 800f248: f043 0308 orr.w r3, r3, #8
- 800f24c: 7013 strb r3, [r2, #0]
- tcp_clear_flags(pcb, TF_ACK_DELAY);
- 800f24e: 8b63 ldrh r3, [r4, #26]
- 800f250: f023 0301 bic.w r3, r3, #1
- 800f254: 8363 strh r3, [r4, #26]
- return ERR_RST;
- 800f256: f06f 050d mvn.w r5, #13
- 800f25a: e7ef b.n 800f23c <tcp_process+0x58>
- LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED);
- 800f25c: 4b7f ldr r3, [pc, #508] @ (800f45c <tcp_process+0x278>)
- 800f25e: f44f 724e mov.w r2, #824 @ 0x338
- 800f262: 4983 ldr r1, [pc, #524] @ (800f470 <tcp_process+0x28c>)
- 800f264: 487f ldr r0, [pc, #508] @ (800f464 <tcp_process+0x280>)
- 800f266: f004 f8cf bl 8013408 <iprintf>
- 800f26a: e7eb b.n 800f244 <tcp_process+0x60>
- if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) {
- 800f26c: f013 0f02 tst.w r3, #2
- 800f270: d004 beq.n 800f27c <tcp_process+0x98>
- 800f272: 7d23 ldrb r3, [r4, #20]
- 800f274: 3b02 subs r3, #2
- 800f276: b2db uxtb r3, r3
- 800f278: 2b01 cmp r3, #1
- 800f27a: d81d bhi.n 800f2b8 <tcp_process+0xd4>
- if ((pcb->flags & TF_RXCLOSED) == 0) {
- 800f27c: 8b63 ldrh r3, [r4, #26]
- 800f27e: f013 0f10 tst.w r3, #16
- 800f282: d102 bne.n 800f28a <tcp_process+0xa6>
- pcb->tmr = tcp_ticks;
- 800f284: 4b7b ldr r3, [pc, #492] @ (800f474 <tcp_process+0x290>)
- 800f286: 681b ldr r3, [r3, #0]
- 800f288: 6223 str r3, [r4, #32]
- pcb->keep_cnt_sent = 0;
- 800f28a: 2300 movs r3, #0
- 800f28c: f884 309b strb.w r3, [r4, #155] @ 0x9b
- pcb->persist_probe = 0;
- 800f290: f884 309a strb.w r3, [r4, #154] @ 0x9a
- tcp_parseopt(pcb);
- 800f294: 4620 mov r0, r4
- 800f296: f7ff f8cb bl 800e430 <tcp_parseopt>
- switch (pcb->state) {
- 800f29a: 7d23 ldrb r3, [r4, #20]
- 800f29c: 3b02 subs r3, #2
- 800f29e: 2b07 cmp r3, #7
- 800f2a0: f200 8240 bhi.w 800f724 <tcp_process+0x540>
- 800f2a4: e8df f013 tbh [pc, r3, lsl #1]
- 800f2a8: 00b2000e .word 0x00b2000e
- 800f2ac: 016a0159 .word 0x016a0159
- 800f2b0: 015901c1 .word 0x015901c1
- 800f2b4: 022401f0 .word 0x022401f0
- tcp_ack_now(pcb);
- 800f2b8: 8b63 ldrh r3, [r4, #26]
- 800f2ba: f043 0302 orr.w r3, r3, #2
- 800f2be: 8363 strh r3, [r4, #26]
- return ERR_OK;
- 800f2c0: 2500 movs r5, #0
- 800f2c2: e7bb b.n 800f23c <tcp_process+0x58>
- if ((flags & TCP_ACK) && (flags & TCP_SYN)
- 800f2c4: 4b63 ldr r3, [pc, #396] @ (800f454 <tcp_process+0x270>)
- 800f2c6: 781b ldrb r3, [r3, #0]
- 800f2c8: f003 0212 and.w r2, r3, #18
- 800f2cc: 2a12 cmp r2, #18
- 800f2ce: d004 beq.n 800f2da <tcp_process+0xf6>
- else if (flags & TCP_ACK) {
- 800f2d0: f013 0f10 tst.w r3, #16
- 800f2d4: d17b bne.n 800f3ce <tcp_process+0x1ea>
- return ERR_OK;
- 800f2d6: 2500 movs r5, #0
- 800f2d8: e7b0 b.n 800f23c <tcp_process+0x58>
- && (ackno == pcb->lastack + 1)) {
- 800f2da: 6c62 ldr r2, [r4, #68] @ 0x44
- 800f2dc: 3201 adds r2, #1
- 800f2de: 4962 ldr r1, [pc, #392] @ (800f468 <tcp_process+0x284>)
- 800f2e0: 6809 ldr r1, [r1, #0]
- 800f2e2: 428a cmp r2, r1
- 800f2e4: d1f4 bne.n 800f2d0 <tcp_process+0xec>
- pcb->rcv_nxt = seqno + 1;
- 800f2e6: 4b5c ldr r3, [pc, #368] @ (800f458 <tcp_process+0x274>)
- 800f2e8: 681b ldr r3, [r3, #0]
- 800f2ea: 1c5a adds r2, r3, #1
- 800f2ec: 6262 str r2, [r4, #36] @ 0x24
- pcb->rcv_ann_right_edge = pcb->rcv_nxt;
- 800f2ee: 62e2 str r2, [r4, #44] @ 0x2c
- pcb->lastack = ackno;
- 800f2f0: 6461 str r1, [r4, #68] @ 0x44
- pcb->snd_wnd = tcphdr->wnd;
- 800f2f2: 4a61 ldr r2, [pc, #388] @ (800f478 <tcp_process+0x294>)
- 800f2f4: 6812 ldr r2, [r2, #0]
- 800f2f6: 89d2 ldrh r2, [r2, #14]
- 800f2f8: f8a4 2060 strh.w r2, [r4, #96] @ 0x60
- pcb->snd_wnd_max = pcb->snd_wnd;
- 800f2fc: f8a4 2062 strh.w r2, [r4, #98] @ 0x62
- pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */
- 800f300: 3b01 subs r3, #1
- 800f302: 6563 str r3, [r4, #84] @ 0x54
- pcb->state = ESTABLISHED;
- 800f304: 2304 movs r3, #4
- 800f306: 7523 strb r3, [r4, #20]
- pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip);
- 800f308: 8e66 ldrh r6, [r4, #50] @ 0x32
- 800f30a: 18e5 adds r5, r4, r3
- 800f30c: 4628 mov r0, r5
- 800f30e: f7fa fef7 bl 800a100 <ip4_route>
- 800f312: 4601 mov r1, r0
- 800f314: 462a mov r2, r5
- 800f316: 4630 mov r0, r6
- 800f318: f7fe f92a bl 800d570 <tcp_eff_send_mss_netif>
- 800f31c: 8660 strh r0, [r4, #50] @ 0x32
- pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
- 800f31e: 0042 lsls r2, r0, #1
- 800f320: f241 131c movw r3, #4380 @ 0x111c
- 800f324: 4293 cmp r3, r2
- 800f326: bf38 it cc
- 800f328: 4613 movcc r3, r2
- 800f32a: ebb3 0f80 cmp.w r3, r0, lsl #2
- 800f32e: d92b bls.n 800f388 <tcp_process+0x1a4>
- 800f330: 0083 lsls r3, r0, #2
- 800f332: b29b uxth r3, r3
- 800f334: f8a4 3048 strh.w r3, [r4, #72] @ 0x48
- LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0));
- 800f338: f8b4 3066 ldrh.w r3, [r4, #102] @ 0x66
- 800f33c: b373 cbz r3, 800f39c <tcp_process+0x1b8>
- --pcb->snd_queuelen;
- 800f33e: f8b4 3066 ldrh.w r3, [r4, #102] @ 0x66
- 800f342: 3b01 subs r3, #1
- 800f344: f8a4 3066 strh.w r3, [r4, #102] @ 0x66
- rseg = pcb->unacked;
- 800f348: 6f25 ldr r5, [r4, #112] @ 0x70
- if (rseg == NULL) {
- 800f34a: b37d cbz r5, 800f3ac <tcp_process+0x1c8>
- pcb->unacked = rseg->next;
- 800f34c: 682b ldr r3, [r5, #0]
- 800f34e: 6723 str r3, [r4, #112] @ 0x70
- tcp_seg_free(rseg);
- 800f350: 4628 mov r0, r5
- 800f352: f7fe f82b bl 800d3ac <tcp_seg_free>
- if (pcb->unacked == NULL) {
- 800f356: 6f23 ldr r3, [r4, #112] @ 0x70
- 800f358: 2b00 cmp r3, #0
- 800f35a: d034 beq.n 800f3c6 <tcp_process+0x1e2>
- pcb->rtime = 0;
- 800f35c: 2300 movs r3, #0
- 800f35e: 8623 strh r3, [r4, #48] @ 0x30
- pcb->nrtx = 0;
- 800f360: f884 3042 strb.w r3, [r4, #66] @ 0x42
- TCP_EVENT_CONNECTED(pcb, ERR_OK, err);
- 800f364: f8d4 3088 ldr.w r3, [r4, #136] @ 0x88
- 800f368: b143 cbz r3, 800f37c <tcp_process+0x198>
- 800f36a: 2200 movs r2, #0
- 800f36c: 4621 mov r1, r4
- 800f36e: 6920 ldr r0, [r4, #16]
- 800f370: 4798 blx r3
- 800f372: 4605 mov r5, r0
- if (err == ERR_ABRT) {
- 800f374: f110 0f0d cmn.w r0, #13
- 800f378: f43f af60 beq.w 800f23c <tcp_process+0x58>
- tcp_ack_now(pcb);
- 800f37c: 8b63 ldrh r3, [r4, #26]
- 800f37e: f043 0302 orr.w r3, r3, #2
- 800f382: 8363 strh r3, [r4, #26]
- return ERR_OK;
- 800f384: 2500 movs r5, #0
- tcp_ack_now(pcb);
- 800f386: e759 b.n 800f23c <tcp_process+0x58>
- pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
- 800f388: f241 131c movw r3, #4380 @ 0x111c
- 800f38c: 429a cmp r2, r3
- 800f38e: d902 bls.n 800f396 <tcp_process+0x1b2>
- 800f390: 0043 lsls r3, r0, #1
- 800f392: b29b uxth r3, r3
- 800f394: e7ce b.n 800f334 <tcp_process+0x150>
- 800f396: f241 131c movw r3, #4380 @ 0x111c
- 800f39a: e7cb b.n 800f334 <tcp_process+0x150>
- LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0));
- 800f39c: 4b2f ldr r3, [pc, #188] @ (800f45c <tcp_process+0x278>)
- 800f39e: f44f 725b mov.w r2, #876 @ 0x36c
- 800f3a2: 4936 ldr r1, [pc, #216] @ (800f47c <tcp_process+0x298>)
- 800f3a4: 482f ldr r0, [pc, #188] @ (800f464 <tcp_process+0x280>)
- 800f3a6: f004 f82f bl 8013408 <iprintf>
- 800f3aa: e7c8 b.n 800f33e <tcp_process+0x15a>
- rseg = pcb->unsent;
- 800f3ac: 6ee5 ldr r5, [r4, #108] @ 0x6c
- LWIP_ASSERT("no segment to free", rseg != NULL);
- 800f3ae: b115 cbz r5, 800f3b6 <tcp_process+0x1d2>
- pcb->unsent = rseg->next;
- 800f3b0: 682b ldr r3, [r5, #0]
- 800f3b2: 66e3 str r3, [r4, #108] @ 0x6c
- 800f3b4: e7cc b.n 800f350 <tcp_process+0x16c>
- LWIP_ASSERT("no segment to free", rseg != NULL);
- 800f3b6: 4b29 ldr r3, [pc, #164] @ (800f45c <tcp_process+0x278>)
- 800f3b8: f44f 725d mov.w r2, #884 @ 0x374
- 800f3bc: 4930 ldr r1, [pc, #192] @ (800f480 <tcp_process+0x29c>)
- 800f3be: 4829 ldr r0, [pc, #164] @ (800f464 <tcp_process+0x280>)
- 800f3c0: f004 f822 bl 8013408 <iprintf>
- 800f3c4: e7f4 b.n 800f3b0 <tcp_process+0x1cc>
- pcb->rtime = -1;
- 800f3c6: f64f 73ff movw r3, #65535 @ 0xffff
- 800f3ca: 8623 strh r3, [r4, #48] @ 0x30
- 800f3cc: e7ca b.n 800f364 <tcp_process+0x180>
- ip_current_src_addr(), tcphdr->dest, tcphdr->src);
- 800f3ce: 4b2a ldr r3, [pc, #168] @ (800f478 <tcp_process+0x294>)
- 800f3d0: 6819 ldr r1, [r3, #0]
- tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
- 800f3d2: 4b2c ldr r3, [pc, #176] @ (800f484 <tcp_process+0x2a0>)
- 800f3d4: 4a2c ldr r2, [pc, #176] @ (800f488 <tcp_process+0x2a4>)
- 800f3d6: 8810 ldrh r0, [r2, #0]
- 800f3d8: 4a1f ldr r2, [pc, #124] @ (800f458 <tcp_process+0x274>)
- 800f3da: 6812 ldr r2, [r2, #0]
- 800f3dc: 880d ldrh r5, [r1, #0]
- 800f3de: 9502 str r5, [sp, #8]
- 800f3e0: 8849 ldrh r1, [r1, #2]
- 800f3e2: 9101 str r1, [sp, #4]
- 800f3e4: 1f19 subs r1, r3, #4
- 800f3e6: 9100 str r1, [sp, #0]
- 800f3e8: 4402 add r2, r0
- 800f3ea: 491f ldr r1, [pc, #124] @ (800f468 <tcp_process+0x284>)
- 800f3ec: 6809 ldr r1, [r1, #0]
- 800f3ee: 4620 mov r0, r4
- 800f3f0: f001 fcb6 bl 8010d60 <tcp_rst>
- if (pcb->nrtx < TCP_SYNMAXRTX) {
- 800f3f4: f894 3042 ldrb.w r3, [r4, #66] @ 0x42
- 800f3f8: 2b05 cmp r3, #5
- 800f3fa: d901 bls.n 800f400 <tcp_process+0x21c>
- return ERR_OK;
- 800f3fc: 2500 movs r5, #0
- 800f3fe: e71d b.n 800f23c <tcp_process+0x58>
- pcb->rtime = 0;
- 800f400: 2500 movs r5, #0
- 800f402: 8625 strh r5, [r4, #48] @ 0x30
- tcp_rexmit_rto(pcb);
- 800f404: 4620 mov r0, r4
- 800f406: f001 fe9f bl 8011148 <tcp_rexmit_rto>
- 800f40a: e717 b.n 800f23c <tcp_process+0x58>
- if (flags & TCP_ACK) {
- 800f40c: 4b11 ldr r3, [pc, #68] @ (800f454 <tcp_process+0x270>)
- 800f40e: 781b ldrb r3, [r3, #0]
- 800f410: f013 0f10 tst.w r3, #16
- 800f414: f000 8090 beq.w 800f538 <tcp_process+0x354>
- if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
- 800f418: 4b13 ldr r3, [pc, #76] @ (800f468 <tcp_process+0x284>)
- 800f41a: 6819 ldr r1, [r3, #0]
- 800f41c: 6c63 ldr r3, [r4, #68] @ 0x44
- 800f41e: 1acb subs r3, r1, r3
- 800f420: 2b01 cmp r3, #1
- 800f422: d403 bmi.n 800f42c <tcp_process+0x248>
- 800f424: 6d23 ldr r3, [r4, #80] @ 0x50
- 800f426: 1acb subs r3, r1, r3
- 800f428: 2b00 cmp r3, #0
- 800f42a: dd2f ble.n 800f48c <tcp_process+0x2a8>
- ip_current_src_addr(), tcphdr->dest, tcphdr->src);
- 800f42c: 4b12 ldr r3, [pc, #72] @ (800f478 <tcp_process+0x294>)
- 800f42e: 6818 ldr r0, [r3, #0]
- tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
- 800f430: 4b14 ldr r3, [pc, #80] @ (800f484 <tcp_process+0x2a0>)
- 800f432: 4a15 ldr r2, [pc, #84] @ (800f488 <tcp_process+0x2a4>)
- 800f434: 8815 ldrh r5, [r2, #0]
- 800f436: 4a08 ldr r2, [pc, #32] @ (800f458 <tcp_process+0x274>)
- 800f438: 6812 ldr r2, [r2, #0]
- 800f43a: 8806 ldrh r6, [r0, #0]
- 800f43c: 9602 str r6, [sp, #8]
- 800f43e: 8840 ldrh r0, [r0, #2]
- 800f440: 9001 str r0, [sp, #4]
- 800f442: 1f18 subs r0, r3, #4
- 800f444: 9000 str r0, [sp, #0]
- 800f446: 442a add r2, r5
- 800f448: 4620 mov r0, r4
- 800f44a: f001 fc89 bl 8010d60 <tcp_rst>
- return ERR_OK;
- 800f44e: 2500 movs r5, #0
- 800f450: e6f4 b.n 800f23c <tcp_process+0x58>
- 800f452: bf00 nop
- 800f454: 24019bf1 .word 0x24019bf1
- 800f458: 24019bfc .word 0x24019bfc
- 800f45c: 08016c64 .word 0x08016c64
- 800f460: 08016ef0 .word 0x08016ef0
- 800f464: 080144e8 .word 0x080144e8
- 800f468: 24019bf8 .word 0x24019bf8
- 800f46c: 24019bf0 .word 0x24019bf0
- 800f470: 08016f0c .word 0x08016f0c
- 800f474: 24019be4 .word 0x24019be4
- 800f478: 24019c0c .word 0x24019c0c
- 800f47c: 08016f2c .word 0x08016f2c
- 800f480: 08016f44 .word 0x08016f44
- 800f484: 24013030 .word 0x24013030
- 800f488: 24019bf2 .word 0x24019bf2
- pcb->state = ESTABLISHED;
- 800f48c: 2304 movs r3, #4
- 800f48e: 7523 strb r3, [r4, #20]
- if (pcb->listener == NULL) {
- 800f490: 6fe3 ldr r3, [r4, #124] @ 0x7c
- 800f492: 2b00 cmp r3, #0
- 800f494: d037 beq.n 800f506 <tcp_process+0x322>
- LWIP_ASSERT("pcb->listener->accept != NULL", pcb->listener->accept != NULL);
- 800f496: 699b ldr r3, [r3, #24]
- 800f498: b36b cbz r3, 800f4f6 <tcp_process+0x312>
- TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err);
- 800f49a: 6fe3 ldr r3, [r4, #124] @ 0x7c
- 800f49c: 699b ldr r3, [r3, #24]
- 800f49e: 2b00 cmp r3, #0
- 800f4a0: d039 beq.n 800f516 <tcp_process+0x332>
- 800f4a2: 2200 movs r2, #0
- 800f4a4: 4621 mov r1, r4
- 800f4a6: 6920 ldr r0, [r4, #16]
- 800f4a8: 4798 blx r3
- if (err != ERR_OK) {
- 800f4aa: 4605 mov r5, r0
- 800f4ac: bb68 cbnz r0, 800f50a <tcp_process+0x326>
- tcp_receive(pcb);
- 800f4ae: 4620 mov r0, r4
- 800f4b0: f7ff f9f8 bl 800e8a4 <tcp_receive>
- if (recv_acked != 0) {
- 800f4b4: 4b9c ldr r3, [pc, #624] @ (800f728 <tcp_process+0x544>)
- 800f4b6: 881b ldrh r3, [r3, #0]
- 800f4b8: b113 cbz r3, 800f4c0 <tcp_process+0x2dc>
- recv_acked--;
- 800f4ba: 3b01 subs r3, #1
- 800f4bc: 4a9a ldr r2, [pc, #616] @ (800f728 <tcp_process+0x544>)
- 800f4be: 8013 strh r3, [r2, #0]
- pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
- 800f4c0: 8e63 ldrh r3, [r4, #50] @ 0x32
- 800f4c2: 0059 lsls r1, r3, #1
- 800f4c4: f241 121c movw r2, #4380 @ 0x111c
- 800f4c8: 428a cmp r2, r1
- 800f4ca: bf38 it cc
- 800f4cc: 460a movcc r2, r1
- 800f4ce: ebb2 0f83 cmp.w r2, r3, lsl #2
- 800f4d2: d927 bls.n 800f524 <tcp_process+0x340>
- 800f4d4: 009b lsls r3, r3, #2
- 800f4d6: b29b uxth r3, r3
- 800f4d8: f8a4 3048 strh.w r3, [r4, #72] @ 0x48
- if (recv_flags & TF_GOT_FIN) {
- 800f4dc: 4b93 ldr r3, [pc, #588] @ (800f72c <tcp_process+0x548>)
- 800f4de: 781b ldrb r3, [r3, #0]
- 800f4e0: f013 0f20 tst.w r3, #32
- 800f4e4: f43f aeaa beq.w 800f23c <tcp_process+0x58>
- tcp_ack_now(pcb);
- 800f4e8: 8b63 ldrh r3, [r4, #26]
- 800f4ea: f043 0302 orr.w r3, r3, #2
- 800f4ee: 8363 strh r3, [r4, #26]
- pcb->state = CLOSE_WAIT;
- 800f4f0: 2307 movs r3, #7
- 800f4f2: 7523 strb r3, [r4, #20]
- 800f4f4: e6a2 b.n 800f23c <tcp_process+0x58>
- LWIP_ASSERT("pcb->listener->accept != NULL", pcb->listener->accept != NULL);
- 800f4f6: 4b8e ldr r3, [pc, #568] @ (800f730 <tcp_process+0x54c>)
- 800f4f8: f44f 726a mov.w r2, #936 @ 0x3a8
- 800f4fc: 498d ldr r1, [pc, #564] @ (800f734 <tcp_process+0x550>)
- 800f4fe: 488e ldr r0, [pc, #568] @ (800f738 <tcp_process+0x554>)
- 800f500: f003 ff82 bl 8013408 <iprintf>
- 800f504: e7c9 b.n 800f49a <tcp_process+0x2b6>
- err = ERR_VAL;
- 800f506: f06f 0505 mvn.w r5, #5
- if (err != ERR_ABRT) {
- 800f50a: f115 0f0d cmn.w r5, #13
- 800f50e: d105 bne.n 800f51c <tcp_process+0x338>
- return ERR_ABRT;
- 800f510: f06f 050c mvn.w r5, #12
- 800f514: e692 b.n 800f23c <tcp_process+0x58>
- TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err);
- 800f516: f06f 050f mvn.w r5, #15
- 800f51a: e7f6 b.n 800f50a <tcp_process+0x326>
- tcp_abort(pcb);
- 800f51c: 4620 mov r0, r4
- 800f51e: f7fe fa1b bl 800d958 <tcp_abort>
- 800f522: e7f5 b.n 800f510 <tcp_process+0x32c>
- pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
- 800f524: f241 121c movw r2, #4380 @ 0x111c
- 800f528: 4291 cmp r1, r2
- 800f52a: d902 bls.n 800f532 <tcp_process+0x34e>
- 800f52c: 005b lsls r3, r3, #1
- 800f52e: b29b uxth r3, r3
- 800f530: e7d2 b.n 800f4d8 <tcp_process+0x2f4>
- 800f532: f241 131c movw r3, #4380 @ 0x111c
- 800f536: e7cf b.n 800f4d8 <tcp_process+0x2f4>
- } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) {
- 800f538: f013 0f02 tst.w r3, #2
- 800f53c: f000 810a beq.w 800f754 <tcp_process+0x570>
- 800f540: 6a63 ldr r3, [r4, #36] @ 0x24
- 800f542: 3b01 subs r3, #1
- 800f544: 4a7d ldr r2, [pc, #500] @ (800f73c <tcp_process+0x558>)
- 800f546: 6812 ldr r2, [r2, #0]
- 800f548: 4293 cmp r3, r2
- 800f54a: d001 beq.n 800f550 <tcp_process+0x36c>
- return ERR_OK;
- 800f54c: 2500 movs r5, #0
- 800f54e: e675 b.n 800f23c <tcp_process+0x58>
- tcp_rexmit(pcb);
- 800f550: 4620 mov r0, r4
- 800f552: f001 fb83 bl 8010c5c <tcp_rexmit>
- return ERR_OK;
- 800f556: 2500 movs r5, #0
- 800f558: e670 b.n 800f23c <tcp_process+0x58>
- tcp_receive(pcb);
- 800f55a: 4620 mov r0, r4
- 800f55c: f7ff f9a2 bl 800e8a4 <tcp_receive>
- if (recv_flags & TF_GOT_FIN) { /* passive close */
- 800f560: 4b72 ldr r3, [pc, #456] @ (800f72c <tcp_process+0x548>)
- 800f562: 781b ldrb r3, [r3, #0]
- 800f564: f013 0f20 tst.w r3, #32
- 800f568: f000 80f6 beq.w 800f758 <tcp_process+0x574>
- tcp_ack_now(pcb);
- 800f56c: 8b63 ldrh r3, [r4, #26]
- 800f56e: f043 0302 orr.w r3, r3, #2
- 800f572: 8363 strh r3, [r4, #26]
- pcb->state = CLOSE_WAIT;
- 800f574: 2307 movs r3, #7
- 800f576: 7523 strb r3, [r4, #20]
- return ERR_OK;
- 800f578: 2500 movs r5, #0
- 800f57a: e65f b.n 800f23c <tcp_process+0x58>
- tcp_receive(pcb);
- 800f57c: 4620 mov r0, r4
- 800f57e: f7ff f991 bl 800e8a4 <tcp_receive>
- if (recv_flags & TF_GOT_FIN) {
- 800f582: 4b6a ldr r3, [pc, #424] @ (800f72c <tcp_process+0x548>)
- 800f584: 781b ldrb r3, [r3, #0]
- 800f586: f013 0f20 tst.w r3, #32
- 800f58a: d039 beq.n 800f600 <tcp_process+0x41c>
- if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
- 800f58c: 4b6c ldr r3, [pc, #432] @ (800f740 <tcp_process+0x55c>)
- 800f58e: 781b ldrb r3, [r3, #0]
- 800f590: f013 0f10 tst.w r3, #16
- 800f594: d004 beq.n 800f5a0 <tcp_process+0x3bc>
- 800f596: 6d22 ldr r2, [r4, #80] @ 0x50
- 800f598: 4b6a ldr r3, [pc, #424] @ (800f744 <tcp_process+0x560>)
- 800f59a: 681b ldr r3, [r3, #0]
- 800f59c: 429a cmp r2, r3
- 800f59e: d007 beq.n 800f5b0 <tcp_process+0x3cc>
- tcp_ack_now(pcb);
- 800f5a0: 8b63 ldrh r3, [r4, #26]
- 800f5a2: f043 0302 orr.w r3, r3, #2
- 800f5a6: 8363 strh r3, [r4, #26]
- pcb->state = CLOSING;
- 800f5a8: 2308 movs r3, #8
- 800f5aa: 7523 strb r3, [r4, #20]
- return ERR_OK;
- 800f5ac: 2500 movs r5, #0
- 800f5ae: e645 b.n 800f23c <tcp_process+0x58>
- pcb->unsent == NULL) {
- 800f5b0: 6ee3 ldr r3, [r4, #108] @ 0x6c
- if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
- 800f5b2: 2b00 cmp r3, #0
- 800f5b4: d1f4 bne.n 800f5a0 <tcp_process+0x3bc>
- tcp_ack_now(pcb);
- 800f5b6: 8b63 ldrh r3, [r4, #26]
- 800f5b8: f043 0302 orr.w r3, r3, #2
- 800f5bc: 8363 strh r3, [r4, #26]
- tcp_pcb_purge(pcb);
- 800f5be: 4620 mov r0, r4
- 800f5c0: f7fe f8a8 bl 800d714 <tcp_pcb_purge>
- TCP_RMV_ACTIVE(pcb);
- 800f5c4: 4b60 ldr r3, [pc, #384] @ (800f748 <tcp_process+0x564>)
- 800f5c6: 681b ldr r3, [r3, #0]
- 800f5c8: 429c cmp r4, r3
- 800f5ca: d005 beq.n 800f5d8 <tcp_process+0x3f4>
- 800f5cc: b153 cbz r3, 800f5e4 <tcp_process+0x400>
- 800f5ce: 68da ldr r2, [r3, #12]
- 800f5d0: 4294 cmp r4, r2
- 800f5d2: d005 beq.n 800f5e0 <tcp_process+0x3fc>
- 800f5d4: 4613 mov r3, r2
- 800f5d6: e7f9 b.n 800f5cc <tcp_process+0x3e8>
- 800f5d8: 68da ldr r2, [r3, #12]
- 800f5da: 4b5b ldr r3, [pc, #364] @ (800f748 <tcp_process+0x564>)
- 800f5dc: 601a str r2, [r3, #0]
- 800f5de: e001 b.n 800f5e4 <tcp_process+0x400>
- 800f5e0: 68e2 ldr r2, [r4, #12]
- 800f5e2: 60da str r2, [r3, #12]
- 800f5e4: 2500 movs r5, #0
- 800f5e6: 60e5 str r5, [r4, #12]
- 800f5e8: 4b58 ldr r3, [pc, #352] @ (800f74c <tcp_process+0x568>)
- 800f5ea: 2201 movs r2, #1
- 800f5ec: 701a strb r2, [r3, #0]
- pcb->state = TIME_WAIT;
- 800f5ee: 230a movs r3, #10
- 800f5f0: 7523 strb r3, [r4, #20]
- TCP_REG(&tcp_tw_pcbs, pcb);
- 800f5f2: 4b57 ldr r3, [pc, #348] @ (800f750 <tcp_process+0x56c>)
- 800f5f4: 681a ldr r2, [r3, #0]
- 800f5f6: 60e2 str r2, [r4, #12]
- 800f5f8: 601c str r4, [r3, #0]
- 800f5fa: f002 f819 bl 8011630 <tcp_timer_needed>
- 800f5fe: e61d b.n 800f23c <tcp_process+0x58>
- } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
- 800f600: 4b4f ldr r3, [pc, #316] @ (800f740 <tcp_process+0x55c>)
- 800f602: 781b ldrb r3, [r3, #0]
- 800f604: f013 0f10 tst.w r3, #16
- 800f608: f000 80a8 beq.w 800f75c <tcp_process+0x578>
- 800f60c: 6d22 ldr r2, [r4, #80] @ 0x50
- 800f60e: 4b4d ldr r3, [pc, #308] @ (800f744 <tcp_process+0x560>)
- 800f610: 681b ldr r3, [r3, #0]
- 800f612: 429a cmp r2, r3
- 800f614: d001 beq.n 800f61a <tcp_process+0x436>
- return ERR_OK;
- 800f616: 2500 movs r5, #0
- 800f618: e610 b.n 800f23c <tcp_process+0x58>
- pcb->unsent == NULL) {
- 800f61a: 6ee3 ldr r3, [r4, #108] @ 0x6c
- } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
- 800f61c: b10b cbz r3, 800f622 <tcp_process+0x43e>
- return ERR_OK;
- 800f61e: 2500 movs r5, #0
- 800f620: e60c b.n 800f23c <tcp_process+0x58>
- pcb->state = FIN_WAIT_2;
- 800f622: 2306 movs r3, #6
- 800f624: 7523 strb r3, [r4, #20]
- return ERR_OK;
- 800f626: 2500 movs r5, #0
- 800f628: e608 b.n 800f23c <tcp_process+0x58>
- tcp_receive(pcb);
- 800f62a: 4620 mov r0, r4
- 800f62c: f7ff f93a bl 800e8a4 <tcp_receive>
- if (recv_flags & TF_GOT_FIN) {
- 800f630: 4b3e ldr r3, [pc, #248] @ (800f72c <tcp_process+0x548>)
- 800f632: 781b ldrb r3, [r3, #0]
- 800f634: f013 0f20 tst.w r3, #32
- 800f638: d101 bne.n 800f63e <tcp_process+0x45a>
- return ERR_OK;
- 800f63a: 2500 movs r5, #0
- 800f63c: e5fe b.n 800f23c <tcp_process+0x58>
- tcp_ack_now(pcb);
- 800f63e: 8b63 ldrh r3, [r4, #26]
- 800f640: f043 0302 orr.w r3, r3, #2
- 800f644: 8363 strh r3, [r4, #26]
- tcp_pcb_purge(pcb);
- 800f646: 4620 mov r0, r4
- 800f648: f7fe f864 bl 800d714 <tcp_pcb_purge>
- TCP_RMV_ACTIVE(pcb);
- 800f64c: 4b3e ldr r3, [pc, #248] @ (800f748 <tcp_process+0x564>)
- 800f64e: 681b ldr r3, [r3, #0]
- 800f650: 429c cmp r4, r3
- 800f652: d005 beq.n 800f660 <tcp_process+0x47c>
- 800f654: b153 cbz r3, 800f66c <tcp_process+0x488>
- 800f656: 68da ldr r2, [r3, #12]
- 800f658: 4294 cmp r4, r2
- 800f65a: d005 beq.n 800f668 <tcp_process+0x484>
- 800f65c: 4613 mov r3, r2
- 800f65e: e7f9 b.n 800f654 <tcp_process+0x470>
- 800f660: 68da ldr r2, [r3, #12]
- 800f662: 4b39 ldr r3, [pc, #228] @ (800f748 <tcp_process+0x564>)
- 800f664: 601a str r2, [r3, #0]
- 800f666: e001 b.n 800f66c <tcp_process+0x488>
- 800f668: 68e2 ldr r2, [r4, #12]
- 800f66a: 60da str r2, [r3, #12]
- 800f66c: 2500 movs r5, #0
- 800f66e: 60e5 str r5, [r4, #12]
- 800f670: 4b36 ldr r3, [pc, #216] @ (800f74c <tcp_process+0x568>)
- 800f672: 2201 movs r2, #1
- 800f674: 701a strb r2, [r3, #0]
- pcb->state = TIME_WAIT;
- 800f676: 230a movs r3, #10
- 800f678: 7523 strb r3, [r4, #20]
- TCP_REG(&tcp_tw_pcbs, pcb);
- 800f67a: 4b35 ldr r3, [pc, #212] @ (800f750 <tcp_process+0x56c>)
- 800f67c: 681a ldr r2, [r3, #0]
- 800f67e: 60e2 str r2, [r4, #12]
- 800f680: 601c str r4, [r3, #0]
- 800f682: f001 ffd5 bl 8011630 <tcp_timer_needed>
- 800f686: e5d9 b.n 800f23c <tcp_process+0x58>
- tcp_receive(pcb);
- 800f688: 4620 mov r0, r4
- 800f68a: f7ff f90b bl 800e8a4 <tcp_receive>
- if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
- 800f68e: 4b2c ldr r3, [pc, #176] @ (800f740 <tcp_process+0x55c>)
- 800f690: 781b ldrb r3, [r3, #0]
- 800f692: f013 0f10 tst.w r3, #16
- 800f696: d063 beq.n 800f760 <tcp_process+0x57c>
- 800f698: 6d22 ldr r2, [r4, #80] @ 0x50
- 800f69a: 4b2a ldr r3, [pc, #168] @ (800f744 <tcp_process+0x560>)
- 800f69c: 681b ldr r3, [r3, #0]
- 800f69e: 429a cmp r2, r3
- 800f6a0: d001 beq.n 800f6a6 <tcp_process+0x4c2>
- return ERR_OK;
- 800f6a2: 2500 movs r5, #0
- 800f6a4: e5ca b.n 800f23c <tcp_process+0x58>
- if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
- 800f6a6: 6ee3 ldr r3, [r4, #108] @ 0x6c
- 800f6a8: b10b cbz r3, 800f6ae <tcp_process+0x4ca>
- return ERR_OK;
- 800f6aa: 2500 movs r5, #0
- 800f6ac: e5c6 b.n 800f23c <tcp_process+0x58>
- tcp_pcb_purge(pcb);
- 800f6ae: 4620 mov r0, r4
- 800f6b0: f7fe f830 bl 800d714 <tcp_pcb_purge>
- TCP_RMV_ACTIVE(pcb);
- 800f6b4: 4b24 ldr r3, [pc, #144] @ (800f748 <tcp_process+0x564>)
- 800f6b6: 681b ldr r3, [r3, #0]
- 800f6b8: 429c cmp r4, r3
- 800f6ba: d005 beq.n 800f6c8 <tcp_process+0x4e4>
- 800f6bc: b153 cbz r3, 800f6d4 <tcp_process+0x4f0>
- 800f6be: 68da ldr r2, [r3, #12]
- 800f6c0: 4294 cmp r4, r2
- 800f6c2: d005 beq.n 800f6d0 <tcp_process+0x4ec>
- 800f6c4: 4613 mov r3, r2
- 800f6c6: e7f9 b.n 800f6bc <tcp_process+0x4d8>
- 800f6c8: 68da ldr r2, [r3, #12]
- 800f6ca: 4b1f ldr r3, [pc, #124] @ (800f748 <tcp_process+0x564>)
- 800f6cc: 601a str r2, [r3, #0]
- 800f6ce: e001 b.n 800f6d4 <tcp_process+0x4f0>
- 800f6d0: 68e2 ldr r2, [r4, #12]
- 800f6d2: 60da str r2, [r3, #12]
- 800f6d4: 2500 movs r5, #0
- 800f6d6: 60e5 str r5, [r4, #12]
- 800f6d8: 4b1c ldr r3, [pc, #112] @ (800f74c <tcp_process+0x568>)
- 800f6da: 2201 movs r2, #1
- 800f6dc: 701a strb r2, [r3, #0]
- pcb->state = TIME_WAIT;
- 800f6de: 230a movs r3, #10
- 800f6e0: 7523 strb r3, [r4, #20]
- TCP_REG(&tcp_tw_pcbs, pcb);
- 800f6e2: 4b1b ldr r3, [pc, #108] @ (800f750 <tcp_process+0x56c>)
- 800f6e4: 681a ldr r2, [r3, #0]
- 800f6e6: 60e2 str r2, [r4, #12]
- 800f6e8: 601c str r4, [r3, #0]
- 800f6ea: f001 ffa1 bl 8011630 <tcp_timer_needed>
- 800f6ee: e5a5 b.n 800f23c <tcp_process+0x58>
- tcp_receive(pcb);
- 800f6f0: 4620 mov r0, r4
- 800f6f2: f7ff f8d7 bl 800e8a4 <tcp_receive>
- if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
- 800f6f6: 4b12 ldr r3, [pc, #72] @ (800f740 <tcp_process+0x55c>)
- 800f6f8: 781b ldrb r3, [r3, #0]
- 800f6fa: f013 0f10 tst.w r3, #16
- 800f6fe: d031 beq.n 800f764 <tcp_process+0x580>
- 800f700: 6d22 ldr r2, [r4, #80] @ 0x50
- 800f702: 4b10 ldr r3, [pc, #64] @ (800f744 <tcp_process+0x560>)
- 800f704: 681b ldr r3, [r3, #0]
- 800f706: 429a cmp r2, r3
- 800f708: d001 beq.n 800f70e <tcp_process+0x52a>
- return ERR_OK;
- 800f70a: 2500 movs r5, #0
- 800f70c: e596 b.n 800f23c <tcp_process+0x58>
- if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
- 800f70e: 6ee3 ldr r3, [r4, #108] @ 0x6c
- 800f710: b10b cbz r3, 800f716 <tcp_process+0x532>
- return ERR_OK;
- 800f712: 2500 movs r5, #0
- 800f714: e592 b.n 800f23c <tcp_process+0x58>
- recv_flags |= TF_CLOSED;
- 800f716: 4a05 ldr r2, [pc, #20] @ (800f72c <tcp_process+0x548>)
- 800f718: 7813 ldrb r3, [r2, #0]
- 800f71a: f043 0310 orr.w r3, r3, #16
- 800f71e: 7013 strb r3, [r2, #0]
- return ERR_OK;
- 800f720: 2500 movs r5, #0
- 800f722: e58b b.n 800f23c <tcp_process+0x58>
- switch (pcb->state) {
- 800f724: 2500 movs r5, #0
- 800f726: e589 b.n 800f23c <tcp_process+0x58>
- 800f728: 24019bf4 .word 0x24019bf4
- 800f72c: 24019bf0 .word 0x24019bf0
- 800f730: 08016c64 .word 0x08016c64
- 800f734: 08016f58 .word 0x08016f58
- 800f738: 080144e8 .word 0x080144e8
- 800f73c: 24019bfc .word 0x24019bfc
- 800f740: 24019bf1 .word 0x24019bf1
- 800f744: 24019bf8 .word 0x24019bf8
- 800f748: 24019bd8 .word 0x24019bd8
- 800f74c: 24019bd2 .word 0x24019bd2
- 800f750: 24019bd4 .word 0x24019bd4
- return ERR_OK;
- 800f754: 2500 movs r5, #0
- 800f756: e571 b.n 800f23c <tcp_process+0x58>
- 800f758: 2500 movs r5, #0
- 800f75a: e56f b.n 800f23c <tcp_process+0x58>
- 800f75c: 2500 movs r5, #0
- 800f75e: e56d b.n 800f23c <tcp_process+0x58>
- 800f760: 2500 movs r5, #0
- 800f762: e56b b.n 800f23c <tcp_process+0x58>
- 800f764: 2500 movs r5, #0
- 800f766: e569 b.n 800f23c <tcp_process+0x58>
- 0800f768 <tcp_input>:
- {
- 800f768: b5f0 push {r4, r5, r6, r7, lr}
- 800f76a: b085 sub sp, #20
- 800f76c: 4605 mov r5, r0
- LWIP_ASSERT_CORE_LOCKED();
- 800f76e: f7f4 f9cd bl 8003b0c <sys_check_core_locking>
- LWIP_ASSERT("tcp_input: invalid pbuf", p != NULL);
- 800f772: b155 cbz r5, 800f78a <tcp_input+0x22>
- tcphdr = (struct tcp_hdr *)p->payload;
- 800f774: 686a ldr r2, [r5, #4]
- 800f776: 4b8b ldr r3, [pc, #556] @ (800f9a4 <tcp_input+0x23c>)
- 800f778: 601a str r2, [r3, #0]
- if (p->len < TCP_HLEN) {
- 800f77a: 896b ldrh r3, [r5, #10]
- 800f77c: 2b13 cmp r3, #19
- 800f77e: d80b bhi.n 800f798 <tcp_input+0x30>
- pbuf_free(p);
- 800f780: 4628 mov r0, r5
- 800f782: f7fc fb0d bl 800bda0 <pbuf_free>
- }
- 800f786: b005 add sp, #20
- 800f788: bdf0 pop {r4, r5, r6, r7, pc}
- LWIP_ASSERT("tcp_input: invalid pbuf", p != NULL);
- 800f78a: 4b87 ldr r3, [pc, #540] @ (800f9a8 <tcp_input+0x240>)
- 800f78c: 2283 movs r2, #131 @ 0x83
- 800f78e: 4987 ldr r1, [pc, #540] @ (800f9ac <tcp_input+0x244>)
- 800f790: 4887 ldr r0, [pc, #540] @ (800f9b0 <tcp_input+0x248>)
- 800f792: f003 fe39 bl 8013408 <iprintf>
- 800f796: e7ed b.n 800f774 <tcp_input+0xc>
- if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) ||
- 800f798: 4b86 ldr r3, [pc, #536] @ (800f9b4 <tcp_input+0x24c>)
- 800f79a: 6819 ldr r1, [r3, #0]
- 800f79c: 6958 ldr r0, [r3, #20]
- 800f79e: f7fa fe58 bl 800a452 <ip4_addr_isbroadcast_u32>
- 800f7a2: 2800 cmp r0, #0
- 800f7a4: d1ec bne.n 800f780 <tcp_input+0x18>
- ip_addr_ismulticast(ip_current_dest_addr())) {
- 800f7a6: 4b83 ldr r3, [pc, #524] @ (800f9b4 <tcp_input+0x24c>)
- 800f7a8: 695b ldr r3, [r3, #20]
- 800f7aa: f003 03f0 and.w r3, r3, #240 @ 0xf0
- if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) ||
- 800f7ae: 2be0 cmp r3, #224 @ 0xe0
- 800f7b0: d0e6 beq.n 800f780 <tcp_input+0x18>
- hdrlen_bytes = TCPH_HDRLEN_BYTES(tcphdr);
- 800f7b2: 4b7c ldr r3, [pc, #496] @ (800f9a4 <tcp_input+0x23c>)
- 800f7b4: 681b ldr r3, [r3, #0]
- 800f7b6: 8998 ldrh r0, [r3, #12]
- 800f7b8: f7f8 fb60 bl 8007e7c <lwip_htons>
- 800f7bc: f3c0 3107 ubfx r1, r0, #12, #8
- 800f7c0: 0089 lsls r1, r1, #2
- 800f7c2: b2c9 uxtb r1, r1
- if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) {
- 800f7c4: 2913 cmp r1, #19
- 800f7c6: d9db bls.n 800f780 <tcp_input+0x18>
- 800f7c8: 892b ldrh r3, [r5, #8]
- 800f7ca: 4299 cmp r1, r3
- 800f7cc: d8d8 bhi.n 800f780 <tcp_input+0x18>
- tcphdr_optlen = (u16_t)(hdrlen_bytes - TCP_HLEN);
- 800f7ce: f1a1 0314 sub.w r3, r1, #20
- 800f7d2: b29b uxth r3, r3
- 800f7d4: 4a78 ldr r2, [pc, #480] @ (800f9b8 <tcp_input+0x250>)
- 800f7d6: 8013 strh r3, [r2, #0]
- tcphdr_opt2 = NULL;
- 800f7d8: 4a78 ldr r2, [pc, #480] @ (800f9bc <tcp_input+0x254>)
- 800f7da: 2000 movs r0, #0
- 800f7dc: 6010 str r0, [r2, #0]
- if (p->len >= hdrlen_bytes) {
- 800f7de: 896a ldrh r2, [r5, #10]
- 800f7e0: 4291 cmp r1, r2
- 800f7e2: d92e bls.n 800f842 <tcp_input+0xda>
- LWIP_ASSERT("p->next != NULL", p->next != NULL);
- 800f7e4: 682b ldr r3, [r5, #0]
- 800f7e6: 2b00 cmp r3, #0
- 800f7e8: d067 beq.n 800f8ba <tcp_input+0x152>
- pbuf_remove_header(p, TCP_HLEN);
- 800f7ea: 2114 movs r1, #20
- 800f7ec: 4628 mov r0, r5
- 800f7ee: f7fc fa91 bl 800bd14 <pbuf_remove_header>
- tcphdr_opt1len = p->len;
- 800f7f2: 896c ldrh r4, [r5, #10]
- 800f7f4: 4b72 ldr r3, [pc, #456] @ (800f9c0 <tcp_input+0x258>)
- 800f7f6: 801c strh r4, [r3, #0]
- opt2len = (u16_t)(tcphdr_optlen - tcphdr_opt1len);
- 800f7f8: 4b6f ldr r3, [pc, #444] @ (800f9b8 <tcp_input+0x250>)
- 800f7fa: 881f ldrh r7, [r3, #0]
- 800f7fc: 1b3e subs r6, r7, r4
- 800f7fe: b2b6 uxth r6, r6
- pbuf_remove_header(p, tcphdr_opt1len);
- 800f800: 4621 mov r1, r4
- 800f802: 4628 mov r0, r5
- 800f804: f7fc fa86 bl 800bd14 <pbuf_remove_header>
- if (opt2len > p->next->len) {
- 800f808: 6828 ldr r0, [r5, #0]
- 800f80a: 8943 ldrh r3, [r0, #10]
- 800f80c: 42b3 cmp r3, r6
- 800f80e: d3b7 bcc.n 800f780 <tcp_input+0x18>
- tcphdr_opt2 = (u8_t *)p->next->payload;
- 800f810: 6842 ldr r2, [r0, #4]
- 800f812: 4b6a ldr r3, [pc, #424] @ (800f9bc <tcp_input+0x254>)
- 800f814: 601a str r2, [r3, #0]
- pbuf_remove_header(p->next, opt2len);
- 800f816: 4631 mov r1, r6
- 800f818: f7fc fa7c bl 800bd14 <pbuf_remove_header>
- p->tot_len = (u16_t)(p->tot_len - opt2len);
- 800f81c: 892b ldrh r3, [r5, #8]
- 800f81e: 1be4 subs r4, r4, r7
- 800f820: 4423 add r3, r4
- 800f822: 812b strh r3, [r5, #8]
- LWIP_ASSERT("p->len == 0", p->len == 0);
- 800f824: 896b ldrh r3, [r5, #10]
- 800f826: 2b00 cmp r3, #0
- 800f828: d14e bne.n 800f8c8 <tcp_input+0x160>
- LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len);
- 800f82a: 892a ldrh r2, [r5, #8]
- 800f82c: 682b ldr r3, [r5, #0]
- 800f82e: 891b ldrh r3, [r3, #8]
- 800f830: 429a cmp r2, r3
- 800f832: d00b beq.n 800f84c <tcp_input+0xe4>
- 800f834: 4b5c ldr r3, [pc, #368] @ (800f9a8 <tcp_input+0x240>)
- 800f836: 22e0 movs r2, #224 @ 0xe0
- 800f838: 4962 ldr r1, [pc, #392] @ (800f9c4 <tcp_input+0x25c>)
- 800f83a: 485d ldr r0, [pc, #372] @ (800f9b0 <tcp_input+0x248>)
- 800f83c: f003 fde4 bl 8013408 <iprintf>
- 800f840: e004 b.n 800f84c <tcp_input+0xe4>
- tcphdr_opt1len = tcphdr_optlen;
- 800f842: 4a5f ldr r2, [pc, #380] @ (800f9c0 <tcp_input+0x258>)
- 800f844: 8013 strh r3, [r2, #0]
- pbuf_remove_header(p, hdrlen_bytes); /* cannot fail */
- 800f846: 4628 mov r0, r5
- 800f848: f7fc fa64 bl 800bd14 <pbuf_remove_header>
- tcphdr->src = lwip_ntohs(tcphdr->src);
- 800f84c: 4c55 ldr r4, [pc, #340] @ (800f9a4 <tcp_input+0x23c>)
- 800f84e: 6826 ldr r6, [r4, #0]
- 800f850: 8830 ldrh r0, [r6, #0]
- 800f852: f7f8 fb13 bl 8007e7c <lwip_htons>
- 800f856: 8030 strh r0, [r6, #0]
- tcphdr->dest = lwip_ntohs(tcphdr->dest);
- 800f858: 6826 ldr r6, [r4, #0]
- 800f85a: 8870 ldrh r0, [r6, #2]
- 800f85c: f7f8 fb0e bl 8007e7c <lwip_htons>
- 800f860: 8070 strh r0, [r6, #2]
- seqno = tcphdr->seqno = lwip_ntohl(tcphdr->seqno);
- 800f862: 6826 ldr r6, [r4, #0]
- 800f864: 6870 ldr r0, [r6, #4]
- 800f866: f7f8 fb0e bl 8007e86 <lwip_htonl>
- 800f86a: 6070 str r0, [r6, #4]
- 800f86c: 4b56 ldr r3, [pc, #344] @ (800f9c8 <tcp_input+0x260>)
- 800f86e: 6018 str r0, [r3, #0]
- ackno = tcphdr->ackno = lwip_ntohl(tcphdr->ackno);
- 800f870: 6826 ldr r6, [r4, #0]
- 800f872: 68b0 ldr r0, [r6, #8]
- 800f874: f7f8 fb07 bl 8007e86 <lwip_htonl>
- 800f878: 60b0 str r0, [r6, #8]
- 800f87a: 4b54 ldr r3, [pc, #336] @ (800f9cc <tcp_input+0x264>)
- 800f87c: 6018 str r0, [r3, #0]
- tcphdr->wnd = lwip_ntohs(tcphdr->wnd);
- 800f87e: 6826 ldr r6, [r4, #0]
- 800f880: 89f0 ldrh r0, [r6, #14]
- 800f882: f7f8 fafb bl 8007e7c <lwip_htons>
- 800f886: 81f0 strh r0, [r6, #14]
- flags = TCPH_FLAGS(tcphdr);
- 800f888: 6823 ldr r3, [r4, #0]
- 800f88a: 8998 ldrh r0, [r3, #12]
- 800f88c: f7f8 faf6 bl 8007e7c <lwip_htons>
- 800f890: f000 023f and.w r2, r0, #63 @ 0x3f
- 800f894: 4b4e ldr r3, [pc, #312] @ (800f9d0 <tcp_input+0x268>)
- 800f896: 701a strb r2, [r3, #0]
- tcplen = p->tot_len;
- 800f898: 892b ldrh r3, [r5, #8]
- 800f89a: 4a4e ldr r2, [pc, #312] @ (800f9d4 <tcp_input+0x26c>)
- 800f89c: 8013 strh r3, [r2, #0]
- if (flags & (TCP_FIN | TCP_SYN)) {
- 800f89e: f010 0f03 tst.w r0, #3
- 800f8a2: d006 beq.n 800f8b2 <tcp_input+0x14a>
- tcplen++;
- 800f8a4: 1c5a adds r2, r3, #1
- 800f8a6: b292 uxth r2, r2
- 800f8a8: 494a ldr r1, [pc, #296] @ (800f9d4 <tcp_input+0x26c>)
- 800f8aa: 800a strh r2, [r1, #0]
- if (tcplen < p->tot_len) {
- 800f8ac: 4293 cmp r3, r2
- 800f8ae: f63f af67 bhi.w 800f780 <tcp_input+0x18>
- for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
- 800f8b2: 4b49 ldr r3, [pc, #292] @ (800f9d8 <tcp_input+0x270>)
- 800f8b4: 681c ldr r4, [r3, #0]
- prev = NULL;
- 800f8b6: 2600 movs r6, #0
- for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
- 800f8b8: e02a b.n 800f910 <tcp_input+0x1a8>
- LWIP_ASSERT("p->next != NULL", p->next != NULL);
- 800f8ba: 4b3b ldr r3, [pc, #236] @ (800f9a8 <tcp_input+0x240>)
- 800f8bc: 22c2 movs r2, #194 @ 0xc2
- 800f8be: 4947 ldr r1, [pc, #284] @ (800f9dc <tcp_input+0x274>)
- 800f8c0: 483b ldr r0, [pc, #236] @ (800f9b0 <tcp_input+0x248>)
- 800f8c2: f003 fda1 bl 8013408 <iprintf>
- 800f8c6: e790 b.n 800f7ea <tcp_input+0x82>
- LWIP_ASSERT("p->len == 0", p->len == 0);
- 800f8c8: 4b37 ldr r3, [pc, #220] @ (800f9a8 <tcp_input+0x240>)
- 800f8ca: 22df movs r2, #223 @ 0xdf
- 800f8cc: 4944 ldr r1, [pc, #272] @ (800f9e0 <tcp_input+0x278>)
- 800f8ce: 4838 ldr r0, [pc, #224] @ (800f9b0 <tcp_input+0x248>)
- 800f8d0: f003 fd9a bl 8013408 <iprintf>
- 800f8d4: e7a9 b.n 800f82a <tcp_input+0xc2>
- LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED);
- 800f8d6: 4b34 ldr r3, [pc, #208] @ (800f9a8 <tcp_input+0x240>)
- 800f8d8: 22fb movs r2, #251 @ 0xfb
- 800f8da: 4942 ldr r1, [pc, #264] @ (800f9e4 <tcp_input+0x27c>)
- 800f8dc: 4834 ldr r0, [pc, #208] @ (800f9b0 <tcp_input+0x248>)
- 800f8de: f003 fd93 bl 8013408 <iprintf>
- 800f8e2: e01a b.n 800f91a <tcp_input+0x1b2>
- LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT);
- 800f8e4: 4b30 ldr r3, [pc, #192] @ (800f9a8 <tcp_input+0x240>)
- 800f8e6: 22fc movs r2, #252 @ 0xfc
- 800f8e8: 493f ldr r1, [pc, #252] @ (800f9e8 <tcp_input+0x280>)
- 800f8ea: 4831 ldr r0, [pc, #196] @ (800f9b0 <tcp_input+0x248>)
- 800f8ec: f003 fd8c bl 8013408 <iprintf>
- 800f8f0: e016 b.n 800f920 <tcp_input+0x1b8>
- LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN);
- 800f8f2: 4b2d ldr r3, [pc, #180] @ (800f9a8 <tcp_input+0x240>)
- 800f8f4: 22fd movs r2, #253 @ 0xfd
- 800f8f6: 493d ldr r1, [pc, #244] @ (800f9ec <tcp_input+0x284>)
- 800f8f8: 482d ldr r0, [pc, #180] @ (800f9b0 <tcp_input+0x248>)
- 800f8fa: f003 fd85 bl 8013408 <iprintf>
- 800f8fe: e012 b.n 800f926 <tcp_input+0x1be>
- if (pcb->remote_port == tcphdr->src &&
- 800f900: 8b21 ldrh r1, [r4, #24]
- 800f902: 4b28 ldr r3, [pc, #160] @ (800f9a4 <tcp_input+0x23c>)
- 800f904: 681b ldr r3, [r3, #0]
- 800f906: 881a ldrh r2, [r3, #0]
- 800f908: 4291 cmp r1, r2
- 800f90a: d018 beq.n 800f93e <tcp_input+0x1d6>
- for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
- 800f90c: 4626 mov r6, r4
- 800f90e: 68e4 ldr r4, [r4, #12]
- 800f910: 2c00 cmp r4, #0
- 800f912: d076 beq.n 800fa02 <tcp_input+0x29a>
- LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED);
- 800f914: 7d23 ldrb r3, [r4, #20]
- 800f916: 2b00 cmp r3, #0
- 800f918: d0dd beq.n 800f8d6 <tcp_input+0x16e>
- LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT);
- 800f91a: 7d23 ldrb r3, [r4, #20]
- 800f91c: 2b0a cmp r3, #10
- 800f91e: d0e1 beq.n 800f8e4 <tcp_input+0x17c>
- LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN);
- 800f920: 7d23 ldrb r3, [r4, #20]
- 800f922: 2b01 cmp r3, #1
- 800f924: d0e5 beq.n 800f8f2 <tcp_input+0x18a>
- if ((pcb->netif_idx != NETIF_NO_INDEX) &&
- 800f926: 7a22 ldrb r2, [r4, #8]
- 800f928: 2a00 cmp r2, #0
- 800f92a: d0e9 beq.n 800f900 <tcp_input+0x198>
- (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
- 800f92c: 4b21 ldr r3, [pc, #132] @ (800f9b4 <tcp_input+0x24c>)
- 800f92e: 685b ldr r3, [r3, #4]
- 800f930: f893 3034 ldrb.w r3, [r3, #52] @ 0x34
- 800f934: 3301 adds r3, #1
- 800f936: b2db uxtb r3, r3
- if ((pcb->netif_idx != NETIF_NO_INDEX) &&
- 800f938: 429a cmp r2, r3
- 800f93a: d0e1 beq.n 800f900 <tcp_input+0x198>
- 800f93c: e7e6 b.n 800f90c <tcp_input+0x1a4>
- pcb->local_port == tcphdr->dest &&
- 800f93e: 8ae2 ldrh r2, [r4, #22]
- 800f940: 885b ldrh r3, [r3, #2]
- if (pcb->remote_port == tcphdr->src &&
- 800f942: 429a cmp r2, r3
- 800f944: d1e2 bne.n 800f90c <tcp_input+0x1a4>
- ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
- 800f946: 6862 ldr r2, [r4, #4]
- 800f948: 4b1a ldr r3, [pc, #104] @ (800f9b4 <tcp_input+0x24c>)
- 800f94a: 691b ldr r3, [r3, #16]
- pcb->local_port == tcphdr->dest &&
- 800f94c: 429a cmp r2, r3
- 800f94e: d1dd bne.n 800f90c <tcp_input+0x1a4>
- ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
- 800f950: 6822 ldr r2, [r4, #0]
- 800f952: 4b18 ldr r3, [pc, #96] @ (800f9b4 <tcp_input+0x24c>)
- 800f954: 695b ldr r3, [r3, #20]
- ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
- 800f956: 429a cmp r2, r3
- 800f958: d1d8 bne.n 800f90c <tcp_input+0x1a4>
- LWIP_ASSERT("tcp_input: pcb->next != pcb (before cache)", pcb->next != pcb);
- 800f95a: 68e3 ldr r3, [r4, #12]
- 800f95c: 429c cmp r4, r3
- 800f95e: d018 beq.n 800f992 <tcp_input+0x22a>
- if (prev != NULL) {
- 800f960: b12e cbz r6, 800f96e <tcp_input+0x206>
- prev->next = pcb->next;
- 800f962: 68e3 ldr r3, [r4, #12]
- 800f964: 60f3 str r3, [r6, #12]
- pcb->next = tcp_active_pcbs;
- 800f966: 4b1c ldr r3, [pc, #112] @ (800f9d8 <tcp_input+0x270>)
- 800f968: 681a ldr r2, [r3, #0]
- 800f96a: 60e2 str r2, [r4, #12]
- tcp_active_pcbs = pcb;
- 800f96c: 601c str r4, [r3, #0]
- LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb);
- 800f96e: 68e3 ldr r3, [r4, #12]
- 800f970: 429c cmp r4, r3
- 800f972: d03f beq.n 800f9f4 <tcp_input+0x28c>
- if (pcb != NULL) {
- 800f974: 2c00 cmp r4, #0
- 800f976: d146 bne.n 800fa06 <tcp_input+0x29e>
- if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) {
- 800f978: 4b0a ldr r3, [pc, #40] @ (800f9a4 <tcp_input+0x23c>)
- 800f97a: 681b ldr r3, [r3, #0]
- 800f97c: 8998 ldrh r0, [r3, #12]
- 800f97e: f7f8 fa7d bl 8007e7c <lwip_htons>
- 800f982: f010 0f04 tst.w r0, #4
- 800f986: f000 8197 beq.w 800fcb8 <tcp_input+0x550>
- pbuf_free(p);
- 800f98a: 4628 mov r0, r5
- 800f98c: f7fc fa08 bl 800bda0 <pbuf_free>
- 800f990: e6f9 b.n 800f786 <tcp_input+0x1e>
- LWIP_ASSERT("tcp_input: pcb->next != pcb (before cache)", pcb->next != pcb);
- 800f992: 4b05 ldr r3, [pc, #20] @ (800f9a8 <tcp_input+0x240>)
- 800f994: f240 120d movw r2, #269 @ 0x10d
- 800f998: 4915 ldr r1, [pc, #84] @ (800f9f0 <tcp_input+0x288>)
- 800f99a: 4805 ldr r0, [pc, #20] @ (800f9b0 <tcp_input+0x248>)
- 800f99c: f003 fd34 bl 8013408 <iprintf>
- 800f9a0: e7de b.n 800f960 <tcp_input+0x1f8>
- 800f9a2: bf00 nop
- 800f9a4: 24019c0c .word 0x24019c0c
- 800f9a8: 08016c64 .word 0x08016c64
- 800f9ac: 08016f78 .word 0x08016f78
- 800f9b0: 080144e8 .word 0x080144e8
- 800f9b4: 2401301c .word 0x2401301c
- 800f9b8: 24019c0a .word 0x24019c0a
- 800f9bc: 24019c04 .word 0x24019c04
- 800f9c0: 24019c08 .word 0x24019c08
- 800f9c4: 08016fac .word 0x08016fac
- 800f9c8: 24019bfc .word 0x24019bfc
- 800f9cc: 24019bf8 .word 0x24019bf8
- 800f9d0: 24019bf1 .word 0x24019bf1
- 800f9d4: 24019bf2 .word 0x24019bf2
- 800f9d8: 24019bd8 .word 0x24019bd8
- 800f9dc: 08016f90 .word 0x08016f90
- 800f9e0: 08016fa0 .word 0x08016fa0
- 800f9e4: 08016fcc .word 0x08016fcc
- 800f9e8: 08016ff4 .word 0x08016ff4
- 800f9ec: 08017020 .word 0x08017020
- 800f9f0: 08017048 .word 0x08017048
- LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb);
- 800f9f4: 4b95 ldr r3, [pc, #596] @ (800fc4c <tcp_input+0x4e4>)
- 800f9f6: f240 1215 movw r2, #277 @ 0x115
- 800f9fa: 4995 ldr r1, [pc, #596] @ (800fc50 <tcp_input+0x4e8>)
- 800f9fc: 4895 ldr r0, [pc, #596] @ (800fc54 <tcp_input+0x4ec>)
- 800f9fe: f003 fd03 bl 8013408 <iprintf>
- if (pcb == NULL) {
- 800fa02: 2c00 cmp r4, #0
- 800fa04: d053 beq.n 800faae <tcp_input+0x346>
- inseg.next = NULL;
- 800fa06: 4a94 ldr r2, [pc, #592] @ (800fc58 <tcp_input+0x4f0>)
- 800fa08: 2300 movs r3, #0
- 800fa0a: 6013 str r3, [r2, #0]
- inseg.len = p->tot_len;
- 800fa0c: 8929 ldrh r1, [r5, #8]
- 800fa0e: 8111 strh r1, [r2, #8]
- inseg.p = p;
- 800fa10: 6055 str r5, [r2, #4]
- inseg.tcphdr = tcphdr;
- 800fa12: 4992 ldr r1, [pc, #584] @ (800fc5c <tcp_input+0x4f4>)
- 800fa14: 6809 ldr r1, [r1, #0]
- 800fa16: 6111 str r1, [r2, #16]
- recv_data = NULL;
- 800fa18: 4a91 ldr r2, [pc, #580] @ (800fc60 <tcp_input+0x4f8>)
- 800fa1a: 6013 str r3, [r2, #0]
- recv_flags = 0;
- 800fa1c: 4a91 ldr r2, [pc, #580] @ (800fc64 <tcp_input+0x4fc>)
- 800fa1e: 7013 strb r3, [r2, #0]
- recv_acked = 0;
- 800fa20: 4a91 ldr r2, [pc, #580] @ (800fc68 <tcp_input+0x500>)
- 800fa22: 8013 strh r3, [r2, #0]
- if (flags & TCP_PSH) {
- 800fa24: 4b91 ldr r3, [pc, #580] @ (800fc6c <tcp_input+0x504>)
- 800fa26: 781b ldrb r3, [r3, #0]
- 800fa28: f013 0f08 tst.w r3, #8
- 800fa2c: d003 beq.n 800fa36 <tcp_input+0x2ce>
- p->flags |= PBUF_FLAG_PUSH;
- 800fa2e: 7b6b ldrb r3, [r5, #13]
- 800fa30: f043 0301 orr.w r3, r3, #1
- 800fa34: 736b strb r3, [r5, #13]
- if (pcb->refused_data != NULL) {
- 800fa36: 6fa3 ldr r3, [r4, #120] @ 0x78
- 800fa38: b16b cbz r3, 800fa56 <tcp_input+0x2ee>
- if ((tcp_process_refused_data(pcb) == ERR_ABRT) ||
- 800fa3a: 4620 mov r0, r4
- 800fa3c: f7fe f9a8 bl 800dd90 <tcp_process_refused_data>
- 800fa40: f110 0f0d cmn.w r0, #13
- 800fa44: f000 809a beq.w 800fb7c <tcp_input+0x414>
- ((pcb->refused_data != NULL) && (tcplen > 0))) {
- 800fa48: 6fa3 ldr r3, [r4, #120] @ 0x78
- if ((tcp_process_refused_data(pcb) == ERR_ABRT) ||
- 800fa4a: b123 cbz r3, 800fa56 <tcp_input+0x2ee>
- ((pcb->refused_data != NULL) && (tcplen > 0))) {
- 800fa4c: 4b88 ldr r3, [pc, #544] @ (800fc70 <tcp_input+0x508>)
- 800fa4e: 881b ldrh r3, [r3, #0]
- 800fa50: 2b00 cmp r3, #0
- 800fa52: f040 8093 bne.w 800fb7c <tcp_input+0x414>
- tcp_input_pcb = pcb;
- 800fa56: 4b87 ldr r3, [pc, #540] @ (800fc74 <tcp_input+0x50c>)
- 800fa58: 601c str r4, [r3, #0]
- err = tcp_process(pcb);
- 800fa5a: 4620 mov r0, r4
- 800fa5c: f7ff fbc2 bl 800f1e4 <tcp_process>
- if (err != ERR_ABRT) {
- 800fa60: f110 0f0d cmn.w r0, #13
- 800fa64: d013 beq.n 800fa8e <tcp_input+0x326>
- if (recv_flags & TF_RESET) {
- 800fa66: 4b7f ldr r3, [pc, #508] @ (800fc64 <tcp_input+0x4fc>)
- 800fa68: 781b ldrb r3, [r3, #0]
- 800fa6a: f013 0f08 tst.w r3, #8
- 800fa6e: f000 808c beq.w 800fb8a <tcp_input+0x422>
- TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_RST);
- 800fa72: f8d4 3090 ldr.w r3, [r4, #144] @ 0x90
- 800fa76: b11b cbz r3, 800fa80 <tcp_input+0x318>
- 800fa78: f06f 010d mvn.w r1, #13
- 800fa7c: 6920 ldr r0, [r4, #16]
- 800fa7e: 4798 blx r3
- tcp_pcb_remove(&tcp_active_pcbs, pcb);
- 800fa80: 4621 mov r1, r4
- 800fa82: 487d ldr r0, [pc, #500] @ (800fc78 <tcp_input+0x510>)
- 800fa84: f7fd fe78 bl 800d778 <tcp_pcb_remove>
- tcp_free(pcb);
- 800fa88: 4620 mov r0, r4
- 800fa8a: f7fd fbfb bl 800d284 <tcp_free>
- tcp_input_pcb = NULL;
- 800fa8e: 2300 movs r3, #0
- 800fa90: 4a78 ldr r2, [pc, #480] @ (800fc74 <tcp_input+0x50c>)
- 800fa92: 6013 str r3, [r2, #0]
- recv_data = NULL;
- 800fa94: 4a72 ldr r2, [pc, #456] @ (800fc60 <tcp_input+0x4f8>)
- 800fa96: 6013 str r3, [r2, #0]
- if (inseg.p != NULL) {
- 800fa98: 4b6f ldr r3, [pc, #444] @ (800fc58 <tcp_input+0x4f0>)
- 800fa9a: 6858 ldr r0, [r3, #4]
- 800fa9c: 2800 cmp r0, #0
- 800fa9e: f43f ae72 beq.w 800f786 <tcp_input+0x1e>
- pbuf_free(inseg.p);
- 800faa2: f7fc f97d bl 800bda0 <pbuf_free>
- inseg.p = NULL;
- 800faa6: 4b6c ldr r3, [pc, #432] @ (800fc58 <tcp_input+0x4f0>)
- 800faa8: 2200 movs r2, #0
- 800faaa: 605a str r2, [r3, #4]
- 800faac: e66b b.n 800f786 <tcp_input+0x1e>
- for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
- 800faae: 4b73 ldr r3, [pc, #460] @ (800fc7c <tcp_input+0x514>)
- 800fab0: 681c ldr r4, [r3, #0]
- 800fab2: e00e b.n 800fad2 <tcp_input+0x36a>
- LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
- 800fab4: 4b65 ldr r3, [pc, #404] @ (800fc4c <tcp_input+0x4e4>)
- 800fab6: f240 121f movw r2, #287 @ 0x11f
- 800faba: 4971 ldr r1, [pc, #452] @ (800fc80 <tcp_input+0x518>)
- 800fabc: 4865 ldr r0, [pc, #404] @ (800fc54 <tcp_input+0x4ec>)
- 800fabe: f003 fca3 bl 8013408 <iprintf>
- 800fac2: e00a b.n 800fada <tcp_input+0x372>
- if (pcb->remote_port == tcphdr->src &&
- 800fac4: 8b21 ldrh r1, [r4, #24]
- 800fac6: 4b65 ldr r3, [pc, #404] @ (800fc5c <tcp_input+0x4f4>)
- 800fac8: 681b ldr r3, [r3, #0]
- 800faca: 881a ldrh r2, [r3, #0]
- 800facc: 4291 cmp r1, r2
- 800face: d010 beq.n 800faf2 <tcp_input+0x38a>
- for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
- 800fad0: 68e4 ldr r4, [r4, #12]
- 800fad2: b31c cbz r4, 800fb1c <tcp_input+0x3b4>
- LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
- 800fad4: 7d23 ldrb r3, [r4, #20]
- 800fad6: 2b0a cmp r3, #10
- 800fad8: d1ec bne.n 800fab4 <tcp_input+0x34c>
- if ((pcb->netif_idx != NETIF_NO_INDEX) &&
- 800fada: 7a22 ldrb r2, [r4, #8]
- 800fadc: 2a00 cmp r2, #0
- 800fade: d0f1 beq.n 800fac4 <tcp_input+0x35c>
- (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
- 800fae0: 4b68 ldr r3, [pc, #416] @ (800fc84 <tcp_input+0x51c>)
- 800fae2: 685b ldr r3, [r3, #4]
- 800fae4: f893 3034 ldrb.w r3, [r3, #52] @ 0x34
- 800fae8: 3301 adds r3, #1
- 800faea: b2db uxtb r3, r3
- if ((pcb->netif_idx != NETIF_NO_INDEX) &&
- 800faec: 429a cmp r2, r3
- 800faee: d0e9 beq.n 800fac4 <tcp_input+0x35c>
- 800faf0: e7ee b.n 800fad0 <tcp_input+0x368>
- pcb->local_port == tcphdr->dest &&
- 800faf2: 8ae2 ldrh r2, [r4, #22]
- 800faf4: 885b ldrh r3, [r3, #2]
- if (pcb->remote_port == tcphdr->src &&
- 800faf6: 429a cmp r2, r3
- 800faf8: d1ea bne.n 800fad0 <tcp_input+0x368>
- ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
- 800fafa: 6862 ldr r2, [r4, #4]
- 800fafc: 4b61 ldr r3, [pc, #388] @ (800fc84 <tcp_input+0x51c>)
- 800fafe: 691b ldr r3, [r3, #16]
- pcb->local_port == tcphdr->dest &&
- 800fb00: 429a cmp r2, r3
- 800fb02: d1e5 bne.n 800fad0 <tcp_input+0x368>
- ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
- 800fb04: 6822 ldr r2, [r4, #0]
- 800fb06: 4b5f ldr r3, [pc, #380] @ (800fc84 <tcp_input+0x51c>)
- 800fb08: 695b ldr r3, [r3, #20]
- ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
- 800fb0a: 429a cmp r2, r3
- 800fb0c: d1e0 bne.n 800fad0 <tcp_input+0x368>
- tcp_timewait_input(pcb);
- 800fb0e: 4620 mov r0, r4
- 800fb10: f7fe fd10 bl 800e534 <tcp_timewait_input>
- pbuf_free(p);
- 800fb14: 4628 mov r0, r5
- 800fb16: f7fc f943 bl 800bda0 <pbuf_free>
- return;
- 800fb1a: e634 b.n 800f786 <tcp_input+0x1e>
- for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
- 800fb1c: 4b5a ldr r3, [pc, #360] @ (800fc88 <tcp_input+0x520>)
- 800fb1e: 681e ldr r6, [r3, #0]
- 800fb20: 4630 mov r0, r6
- prev = NULL;
- 800fb22: 4621 mov r1, r4
- for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
- 800fb24: e007 b.n 800fb36 <tcp_input+0x3ce>
- if (lpcb->local_port == tcphdr->dest) {
- 800fb26: 8ac2 ldrh r2, [r0, #22]
- 800fb28: 4b4c ldr r3, [pc, #304] @ (800fc5c <tcp_input+0x4f4>)
- 800fb2a: 681b ldr r3, [r3, #0]
- 800fb2c: 885b ldrh r3, [r3, #2]
- 800fb2e: 429a cmp r2, r3
- 800fb30: d00e beq.n 800fb50 <tcp_input+0x3e8>
- for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
- 800fb32: 4601 mov r1, r0
- 800fb34: 68c0 ldr r0, [r0, #12]
- 800fb36: b190 cbz r0, 800fb5e <tcp_input+0x3f6>
- if ((lpcb->netif_idx != NETIF_NO_INDEX) &&
- 800fb38: 7a02 ldrb r2, [r0, #8]
- 800fb3a: 2a00 cmp r2, #0
- 800fb3c: d0f3 beq.n 800fb26 <tcp_input+0x3be>
- (lpcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
- 800fb3e: 4b51 ldr r3, [pc, #324] @ (800fc84 <tcp_input+0x51c>)
- 800fb40: 685b ldr r3, [r3, #4]
- 800fb42: f893 3034 ldrb.w r3, [r3, #52] @ 0x34
- 800fb46: 3301 adds r3, #1
- 800fb48: b2db uxtb r3, r3
- if ((lpcb->netif_idx != NETIF_NO_INDEX) &&
- 800fb4a: 429a cmp r2, r3
- 800fb4c: d0eb beq.n 800fb26 <tcp_input+0x3be>
- 800fb4e: e7f0 b.n 800fb32 <tcp_input+0x3ca>
- if (ip_addr_cmp(&lpcb->local_ip, ip_current_dest_addr())) {
- 800fb50: 6803 ldr r3, [r0, #0]
- 800fb52: 4a4c ldr r2, [pc, #304] @ (800fc84 <tcp_input+0x51c>)
- 800fb54: 6952 ldr r2, [r2, #20]
- 800fb56: 4293 cmp r3, r2
- 800fb58: d001 beq.n 800fb5e <tcp_input+0x3f6>
- } else if (ip_addr_isany(&lpcb->local_ip)) {
- 800fb5a: 2b00 cmp r3, #0
- 800fb5c: d1e9 bne.n 800fb32 <tcp_input+0x3ca>
- if (lpcb != NULL) {
- 800fb5e: 2800 cmp r0, #0
- 800fb60: f43f af08 beq.w 800f974 <tcp_input+0x20c>
- if (prev != NULL) {
- 800fb64: b121 cbz r1, 800fb70 <tcp_input+0x408>
- ((struct tcp_pcb_listen *)prev)->next = lpcb->next;
- 800fb66: 68c3 ldr r3, [r0, #12]
- 800fb68: 60cb str r3, [r1, #12]
- lpcb->next = tcp_listen_pcbs.listen_pcbs;
- 800fb6a: 60c6 str r6, [r0, #12]
- tcp_listen_pcbs.listen_pcbs = lpcb;
- 800fb6c: 4b46 ldr r3, [pc, #280] @ (800fc88 <tcp_input+0x520>)
- 800fb6e: 6018 str r0, [r3, #0]
- tcp_listen_input(lpcb);
- 800fb70: f7fe fd3c bl 800e5ec <tcp_listen_input>
- pbuf_free(p);
- 800fb74: 4628 mov r0, r5
- 800fb76: f7fc f913 bl 800bda0 <pbuf_free>
- return;
- 800fb7a: e604 b.n 800f786 <tcp_input+0x1e>
- if (pcb->rcv_ann_wnd == 0) {
- 800fb7c: 8d63 ldrh r3, [r4, #42] @ 0x2a
- 800fb7e: 2b00 cmp r3, #0
- 800fb80: d185 bne.n 800fa8e <tcp_input+0x326>
- tcp_send_empty_ack(pcb);
- 800fb82: 4620 mov r0, r4
- 800fb84: f001 f934 bl 8010df0 <tcp_send_empty_ack>
- goto aborted;
- 800fb88: e781 b.n 800fa8e <tcp_input+0x326>
- if (recv_acked > 0) {
- 800fb8a: 4b37 ldr r3, [pc, #220] @ (800fc68 <tcp_input+0x500>)
- 800fb8c: 881a ldrh r2, [r3, #0]
- 800fb8e: b162 cbz r2, 800fbaa <tcp_input+0x442>
- TCP_EVENT_SENT(pcb, (u16_t)acked16, err);
- 800fb90: f8d4 3080 ldr.w r3, [r4, #128] @ 0x80
- 800fb94: b133 cbz r3, 800fba4 <tcp_input+0x43c>
- 800fb96: 4621 mov r1, r4
- 800fb98: 6920 ldr r0, [r4, #16]
- 800fb9a: 4798 blx r3
- if (err == ERR_ABRT) {
- 800fb9c: f110 0f0d cmn.w r0, #13
- 800fba0: f43f af75 beq.w 800fa8e <tcp_input+0x326>
- recv_acked = 0;
- 800fba4: 4b30 ldr r3, [pc, #192] @ (800fc68 <tcp_input+0x500>)
- 800fba6: 2200 movs r2, #0
- 800fba8: 801a strh r2, [r3, #0]
- if (tcp_input_delayed_close(pcb)) {
- 800fbaa: 4620 mov r0, r4
- 800fbac: f7fe fc92 bl 800e4d4 <tcp_input_delayed_close>
- 800fbb0: 2800 cmp r0, #0
- 800fbb2: f47f af6c bne.w 800fa8e <tcp_input+0x326>
- if (recv_data != NULL) {
- 800fbb6: 4b2a ldr r3, [pc, #168] @ (800fc60 <tcp_input+0x4f8>)
- 800fbb8: 681b ldr r3, [r3, #0]
- 800fbba: b1f3 cbz r3, 800fbfa <tcp_input+0x492>
- LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL);
- 800fbbc: 6fa3 ldr r3, [r4, #120] @ 0x78
- 800fbbe: b133 cbz r3, 800fbce <tcp_input+0x466>
- 800fbc0: 4b22 ldr r3, [pc, #136] @ (800fc4c <tcp_input+0x4e4>)
- 800fbc2: f44f 72f3 mov.w r2, #486 @ 0x1e6
- 800fbc6: 4931 ldr r1, [pc, #196] @ (800fc8c <tcp_input+0x524>)
- 800fbc8: 4822 ldr r0, [pc, #136] @ (800fc54 <tcp_input+0x4ec>)
- 800fbca: f003 fc1d bl 8013408 <iprintf>
- if (pcb->flags & TF_RXCLOSED) {
- 800fbce: 8b63 ldrh r3, [r4, #26]
- 800fbd0: f013 0f10 tst.w r3, #16
- 800fbd4: d12a bne.n 800fc2c <tcp_input+0x4c4>
- TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err);
- 800fbd6: f8d4 5084 ldr.w r5, [r4, #132] @ 0x84
- 800fbda: 2d00 cmp r5, #0
- 800fbdc: d02e beq.n 800fc3c <tcp_input+0x4d4>
- 800fbde: 2300 movs r3, #0
- 800fbe0: 4a1f ldr r2, [pc, #124] @ (800fc60 <tcp_input+0x4f8>)
- 800fbe2: 6812 ldr r2, [r2, #0]
- 800fbe4: 4621 mov r1, r4
- 800fbe6: 6920 ldr r0, [r4, #16]
- 800fbe8: 47a8 blx r5
- if (err == ERR_ABRT) {
- 800fbea: f110 0f0d cmn.w r0, #13
- 800fbee: f43f af4e beq.w 800fa8e <tcp_input+0x326>
- if (err != ERR_OK) {
- 800fbf2: b110 cbz r0, 800fbfa <tcp_input+0x492>
- pcb->refused_data = recv_data;
- 800fbf4: 4b1a ldr r3, [pc, #104] @ (800fc60 <tcp_input+0x4f8>)
- 800fbf6: 681b ldr r3, [r3, #0]
- 800fbf8: 67a3 str r3, [r4, #120] @ 0x78
- if (recv_flags & TF_GOT_FIN) {
- 800fbfa: 4b1a ldr r3, [pc, #104] @ (800fc64 <tcp_input+0x4fc>)
- 800fbfc: 781b ldrb r3, [r3, #0]
- 800fbfe: f013 0f20 tst.w r3, #32
- 800fc02: d006 beq.n 800fc12 <tcp_input+0x4aa>
- if (pcb->refused_data != NULL) {
- 800fc04: 6fa3 ldr r3, [r4, #120] @ 0x78
- 800fc06: 2b00 cmp r3, #0
- 800fc08: d042 beq.n 800fc90 <tcp_input+0x528>
- pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN;
- 800fc0a: 7b5a ldrb r2, [r3, #13]
- 800fc0c: f042 0220 orr.w r2, r2, #32
- 800fc10: 735a strb r2, [r3, #13]
- tcp_input_pcb = NULL;
- 800fc12: 4b18 ldr r3, [pc, #96] @ (800fc74 <tcp_input+0x50c>)
- 800fc14: 2200 movs r2, #0
- 800fc16: 601a str r2, [r3, #0]
- if (tcp_input_delayed_close(pcb)) {
- 800fc18: 4620 mov r0, r4
- 800fc1a: f7fe fc5b bl 800e4d4 <tcp_input_delayed_close>
- 800fc1e: 2800 cmp r0, #0
- 800fc20: f47f af35 bne.w 800fa8e <tcp_input+0x326>
- tcp_output(pcb);
- 800fc24: 4620 mov r0, r4
- 800fc26: f001 f91d bl 8010e64 <tcp_output>
- 800fc2a: e730 b.n 800fa8e <tcp_input+0x326>
- pbuf_free(recv_data);
- 800fc2c: 4b0c ldr r3, [pc, #48] @ (800fc60 <tcp_input+0x4f8>)
- 800fc2e: 6818 ldr r0, [r3, #0]
- 800fc30: f7fc f8b6 bl 800bda0 <pbuf_free>
- tcp_abort(pcb);
- 800fc34: 4620 mov r0, r4
- 800fc36: f7fd fe8f bl 800d958 <tcp_abort>
- goto aborted;
- 800fc3a: e728 b.n 800fa8e <tcp_input+0x326>
- TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err);
- 800fc3c: 2300 movs r3, #0
- 800fc3e: 4a08 ldr r2, [pc, #32] @ (800fc60 <tcp_input+0x4f8>)
- 800fc40: 6812 ldr r2, [r2, #0]
- 800fc42: 4621 mov r1, r4
- 800fc44: 4618 mov r0, r3
- 800fc46: f7fe f87f bl 800dd48 <tcp_recv_null>
- 800fc4a: e7ce b.n 800fbea <tcp_input+0x482>
- 800fc4c: 08016c64 .word 0x08016c64
- 800fc50: 08017074 .word 0x08017074
- 800fc54: 080144e8 .word 0x080144e8
- 800fc58: 24019c10 .word 0x24019c10
- 800fc5c: 24019c0c .word 0x24019c0c
- 800fc60: 24019bec .word 0x24019bec
- 800fc64: 24019bf0 .word 0x24019bf0
- 800fc68: 24019bf4 .word 0x24019bf4
- 800fc6c: 24019bf1 .word 0x24019bf1
- 800fc70: 24019bf2 .word 0x24019bf2
- 800fc74: 24019be8 .word 0x24019be8
- 800fc78: 24019bd8 .word 0x24019bd8
- 800fc7c: 24019bd4 .word 0x24019bd4
- 800fc80: 080170a0 .word 0x080170a0
- 800fc84: 2401301c .word 0x2401301c
- 800fc88: 24019bdc .word 0x24019bdc
- 800fc8c: 080170d0 .word 0x080170d0
- if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) {
- 800fc90: 8d23 ldrh r3, [r4, #40] @ 0x28
- 800fc92: f241 62d0 movw r2, #5840 @ 0x16d0
- 800fc96: 4293 cmp r3, r2
- 800fc98: d001 beq.n 800fc9e <tcp_input+0x536>
- pcb->rcv_wnd++;
- 800fc9a: 3301 adds r3, #1
- 800fc9c: 8523 strh r3, [r4, #40] @ 0x28
- TCP_EVENT_CLOSED(pcb, err);
- 800fc9e: f8d4 5084 ldr.w r5, [r4, #132] @ 0x84
- 800fca2: 2d00 cmp r5, #0
- 800fca4: d0b5 beq.n 800fc12 <tcp_input+0x4aa>
- 800fca6: 2300 movs r3, #0
- 800fca8: 461a mov r2, r3
- 800fcaa: 4621 mov r1, r4
- 800fcac: 6920 ldr r0, [r4, #16]
- 800fcae: 47a8 blx r5
- if (err == ERR_ABRT) {
- 800fcb0: f110 0f0d cmn.w r0, #13
- 800fcb4: d1ad bne.n 800fc12 <tcp_input+0x4aa>
- 800fcb6: e6ea b.n 800fa8e <tcp_input+0x326>
- ip_current_src_addr(), tcphdr->dest, tcphdr->src);
- 800fcb8: 4b09 ldr r3, [pc, #36] @ (800fce0 <tcp_input+0x578>)
- 800fcba: 6819 ldr r1, [r3, #0]
- tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(),
- 800fcbc: 4b09 ldr r3, [pc, #36] @ (800fce4 <tcp_input+0x57c>)
- 800fcbe: 4a0a ldr r2, [pc, #40] @ (800fce8 <tcp_input+0x580>)
- 800fcc0: 8810 ldrh r0, [r2, #0]
- 800fcc2: 4a0a ldr r2, [pc, #40] @ (800fcec <tcp_input+0x584>)
- 800fcc4: 6812 ldr r2, [r2, #0]
- 800fcc6: 880c ldrh r4, [r1, #0]
- 800fcc8: 9402 str r4, [sp, #8]
- 800fcca: 8849 ldrh r1, [r1, #2]
- 800fccc: 9101 str r1, [sp, #4]
- 800fcce: 1f19 subs r1, r3, #4
- 800fcd0: 9100 str r1, [sp, #0]
- 800fcd2: 4402 add r2, r0
- 800fcd4: 4906 ldr r1, [pc, #24] @ (800fcf0 <tcp_input+0x588>)
- 800fcd6: 6809 ldr r1, [r1, #0]
- 800fcd8: 2000 movs r0, #0
- 800fcda: f001 f841 bl 8010d60 <tcp_rst>
- 800fcde: e654 b.n 800f98a <tcp_input+0x222>
- 800fce0: 24019c0c .word 0x24019c0c
- 800fce4: 24013030 .word 0x24013030
- 800fce8: 24019bf2 .word 0x24019bf2
- 800fcec: 24019bfc .word 0x24019bfc
- 800fcf0: 24019bf8 .word 0x24019bf8
- 0800fcf4 <tcp_trigger_input_pcb_close>:
- void
- tcp_trigger_input_pcb_close(void)
- {
- recv_flags |= TF_CLOSED;
- 800fcf4: 4a02 ldr r2, [pc, #8] @ (800fd00 <tcp_trigger_input_pcb_close+0xc>)
- 800fcf6: 7813 ldrb r3, [r2, #0]
- 800fcf8: f043 0310 orr.w r3, r3, #16
- 800fcfc: 7013 strb r3, [r2, #0]
- }
- 800fcfe: 4770 bx lr
- 800fd00: 24019bf0 .word 0x24019bf0
- 0800fd04 <tcp_write_checks>:
- * @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)
- {
- 800fd04: b538 push {r3, r4, r5, lr}
- 800fd06: 460c mov r4, r1
- LWIP_ASSERT("tcp_write_checks: invalid pcb", pcb != NULL);
- 800fd08: 4605 mov r5, r0
- 800fd0a: b1b8 cbz r0, 800fd3c <tcp_write_checks+0x38>
- /* connection is in invalid state for data transmission? */
- if ((pcb->state != ESTABLISHED) &&
- 800fd0c: 7d2b ldrb r3, [r5, #20]
- 800fd0e: 2b04 cmp r3, #4
- 800fd10: bf18 it ne
- 800fd12: 2b07 cmpne r3, #7
- 800fd14: d003 beq.n 800fd1e <tcp_write_checks+0x1a>
- (pcb->state != CLOSE_WAIT) &&
- 800fd16: 2b02 cmp r3, #2
- 800fd18: d001 beq.n 800fd1e <tcp_write_checks+0x1a>
- (pcb->state != SYN_SENT) &&
- 800fd1a: 2b03 cmp r3, #3
- 800fd1c: d141 bne.n 800fda2 <tcp_write_checks+0x9e>
- (pcb->state != SYN_RCVD)) {
- LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_STATE | LWIP_DBG_LEVEL_SEVERE, ("tcp_write() called in invalid state\n"));
- return ERR_CONN;
- } else if (len == 0) {
- 800fd1e: 2c00 cmp r4, #0
- 800fd20: d042 beq.n 800fda8 <tcp_write_checks+0xa4>
- return ERR_OK;
- }
- /* fail on too much data */
- if (len > pcb->snd_buf) {
- 800fd22: f8b5 3064 ldrh.w r3, [r5, #100] @ 0x64
- 800fd26: 42a3 cmp r3, r4
- 800fd28: d310 bcc.n 800fd4c <tcp_write_checks+0x48>
- 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))) {
- 800fd2a: f8b5 3066 ldrh.w r3, [r5, #102] @ 0x66
- 800fd2e: 2b0f cmp r3, #15
- 800fd30: d813 bhi.n 800fd5a <tcp_write_checks+0x56>
- pcb->snd_queuelen, (u16_t)TCP_SND_QUEUELEN));
- TCP_STATS_INC(tcp.memerr);
- tcp_set_flags(pcb, TF_NAGLEMEMERR);
- return ERR_MEM;
- }
- if (pcb->snd_queuelen != 0) {
- 800fd32: b333 cbz r3, 800fd82 <tcp_write_checks+0x7e>
- LWIP_ASSERT("tcp_write: pbufs on queue => at least one queue non-empty",
- 800fd34: 6f2b ldr r3, [r5, #112] @ 0x70
- 800fd36: b1bb cbz r3, 800fd68 <tcp_write_checks+0x64>
- pcb->unacked != NULL || pcb->unsent != NULL);
- } else {
- LWIP_ASSERT("tcp_write: no pbufs on queue => both queues empty",
- pcb->unacked == NULL && pcb->unsent == NULL);
- }
- return ERR_OK;
- 800fd38: 2000 movs r0, #0
- 800fd3a: e036 b.n 800fdaa <tcp_write_checks+0xa6>
- LWIP_ASSERT("tcp_write_checks: invalid pcb", pcb != NULL);
- 800fd3c: 4b1b ldr r3, [pc, #108] @ (800fdac <tcp_write_checks+0xa8>)
- 800fd3e: f240 1233 movw r2, #307 @ 0x133
- 800fd42: 491b ldr r1, [pc, #108] @ (800fdb0 <tcp_write_checks+0xac>)
- 800fd44: 481b ldr r0, [pc, #108] @ (800fdb4 <tcp_write_checks+0xb0>)
- 800fd46: f003 fb5f bl 8013408 <iprintf>
- 800fd4a: e7df b.n 800fd0c <tcp_write_checks+0x8>
- tcp_set_flags(pcb, TF_NAGLEMEMERR);
- 800fd4c: 8b6b ldrh r3, [r5, #26]
- 800fd4e: f043 0380 orr.w r3, r3, #128 @ 0x80
- 800fd52: 836b strh r3, [r5, #26]
- return ERR_MEM;
- 800fd54: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800fd58: e027 b.n 800fdaa <tcp_write_checks+0xa6>
- tcp_set_flags(pcb, TF_NAGLEMEMERR);
- 800fd5a: 8b6b ldrh r3, [r5, #26]
- 800fd5c: f043 0380 orr.w r3, r3, #128 @ 0x80
- 800fd60: 836b strh r3, [r5, #26]
- return ERR_MEM;
- 800fd62: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 800fd66: e020 b.n 800fdaa <tcp_write_checks+0xa6>
- LWIP_ASSERT("tcp_write: pbufs on queue => at least one queue non-empty",
- 800fd68: 6eeb ldr r3, [r5, #108] @ 0x6c
- 800fd6a: b10b cbz r3, 800fd70 <tcp_write_checks+0x6c>
- return ERR_OK;
- 800fd6c: 2000 movs r0, #0
- 800fd6e: e01c b.n 800fdaa <tcp_write_checks+0xa6>
- LWIP_ASSERT("tcp_write: pbufs on queue => at least one queue non-empty",
- 800fd70: 4b0e ldr r3, [pc, #56] @ (800fdac <tcp_write_checks+0xa8>)
- 800fd72: f240 1255 movw r2, #341 @ 0x155
- 800fd76: 4910 ldr r1, [pc, #64] @ (800fdb8 <tcp_write_checks+0xb4>)
- 800fd78: 480e ldr r0, [pc, #56] @ (800fdb4 <tcp_write_checks+0xb0>)
- 800fd7a: f003 fb45 bl 8013408 <iprintf>
- return ERR_OK;
- 800fd7e: 2000 movs r0, #0
- 800fd80: e013 b.n 800fdaa <tcp_write_checks+0xa6>
- LWIP_ASSERT("tcp_write: no pbufs on queue => both queues empty",
- 800fd82: 6f2b ldr r3, [r5, #112] @ 0x70
- 800fd84: b143 cbz r3, 800fd98 <tcp_write_checks+0x94>
- 800fd86: 4b09 ldr r3, [pc, #36] @ (800fdac <tcp_write_checks+0xa8>)
- 800fd88: f44f 72ac mov.w r2, #344 @ 0x158
- 800fd8c: 490b ldr r1, [pc, #44] @ (800fdbc <tcp_write_checks+0xb8>)
- 800fd8e: 4809 ldr r0, [pc, #36] @ (800fdb4 <tcp_write_checks+0xb0>)
- 800fd90: f003 fb3a bl 8013408 <iprintf>
- return ERR_OK;
- 800fd94: 2000 movs r0, #0
- 800fd96: e008 b.n 800fdaa <tcp_write_checks+0xa6>
- LWIP_ASSERT("tcp_write: no pbufs on queue => both queues empty",
- 800fd98: 6eeb ldr r3, [r5, #108] @ 0x6c
- 800fd9a: 2b00 cmp r3, #0
- 800fd9c: d1f3 bne.n 800fd86 <tcp_write_checks+0x82>
- return ERR_OK;
- 800fd9e: 2000 movs r0, #0
- 800fda0: e003 b.n 800fdaa <tcp_write_checks+0xa6>
- return ERR_CONN;
- 800fda2: f06f 000a mvn.w r0, #10
- 800fda6: e000 b.n 800fdaa <tcp_write_checks+0xa6>
- return ERR_OK;
- 800fda8: 2000 movs r0, #0
- }
- 800fdaa: bd38 pop {r3, r4, r5, pc}
- 800fdac: 080170ec .word 0x080170ec
- 800fdb0: 08017150 .word 0x08017150
- 800fdb4: 080144e8 .word 0x080144e8
- 800fdb8: 08017170 .word 0x08017170
- 800fdbc: 080171ac .word 0x080171ac
- 0800fdc0 <tcp_output_segment_busy>:
- * @arg seg the tcp segment to check
- * @return 1 if ref != 1, 0 if ref == 1
- */
- static int
- tcp_output_segment_busy(const struct tcp_seg *seg)
- {
- 800fdc0: b510 push {r4, lr}
- LWIP_ASSERT("tcp_output_segment_busy: invalid seg", seg != NULL);
- 800fdc2: 4604 mov r4, r0
- 800fdc4: b128 cbz r0, 800fdd2 <tcp_output_segment_busy+0x12>
- /* 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) {
- 800fdc6: 6863 ldr r3, [r4, #4]
- 800fdc8: 7b9b ldrb r3, [r3, #14]
- 800fdca: 2b01 cmp r3, #1
- 800fdcc: d109 bne.n 800fde2 <tcp_output_segment_busy+0x22>
- /* other reference found */
- return 1;
- }
- /* no other references found */
- return 0;
- 800fdce: 2000 movs r0, #0
- }
- 800fdd0: bd10 pop {r4, pc}
- LWIP_ASSERT("tcp_output_segment_busy: invalid seg", seg != NULL);
- 800fdd2: 4b05 ldr r3, [pc, #20] @ (800fde8 <tcp_output_segment_busy+0x28>)
- 800fdd4: f240 529a movw r2, #1434 @ 0x59a
- 800fdd8: 4904 ldr r1, [pc, #16] @ (800fdec <tcp_output_segment_busy+0x2c>)
- 800fdda: 4805 ldr r0, [pc, #20] @ (800fdf0 <tcp_output_segment_busy+0x30>)
- 800fddc: f003 fb14 bl 8013408 <iprintf>
- 800fde0: e7f1 b.n 800fdc6 <tcp_output_segment_busy+0x6>
- return 1;
- 800fde2: 2001 movs r0, #1
- 800fde4: e7f4 b.n 800fdd0 <tcp_output_segment_busy+0x10>
- 800fde6: bf00 nop
- 800fde8: 080170ec .word 0x080170ec
- 800fdec: 080171e0 .word 0x080171e0
- 800fdf0: 080144e8 .word 0x080144e8
- 0800fdf4 <tcp_output_fill_options>:
- }
- /* Fill in options for control segments */
- static void
- tcp_output_fill_options(const struct tcp_pcb *pcb, struct pbuf *p, u8_t optflags, u8_t num_sacks)
- {
- 800fdf4: b538 push {r3, r4, r5, lr}
- 800fdf6: 4614 mov r4, r2
- struct tcp_hdr *tcphdr;
- u32_t *opts;
- u16_t sacks_len = 0;
- LWIP_ASSERT("tcp_output_fill_options: invalid pbuf", p != NULL);
- 800fdf8: 460d mov r5, r1
- 800fdfa: b189 cbz r1, 800fe20 <tcp_output_fill_options+0x2c>
- tcphdr = (struct tcp_hdr *)p->payload;
- 800fdfc: 686b ldr r3, [r5, #4]
- opts = (u32_t *)(void *)(tcphdr + 1);
- 800fdfe: f103 0214 add.w r2, r3, #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));
- 800fe02: 00a4 lsls r4, r4, #2
- 800fe04: f004 0404 and.w r4, r4, #4
- 800fe08: 3414 adds r4, #20
- 800fe0a: 4423 add r3, r4
- 800fe0c: 4293 cmp r3, r2
- 800fe0e: d006 beq.n 800fe1e <tcp_output_fill_options+0x2a>
- 800fe10: 4b07 ldr r3, [pc, #28] @ (800fe30 <tcp_output_fill_options+0x3c>)
- 800fe12: f240 7275 movw r2, #1909 @ 0x775
- 800fe16: 4907 ldr r1, [pc, #28] @ (800fe34 <tcp_output_fill_options+0x40>)
- 800fe18: 4807 ldr r0, [pc, #28] @ (800fe38 <tcp_output_fill_options+0x44>)
- 800fe1a: f003 faf5 bl 8013408 <iprintf>
- LWIP_UNUSED_ARG(optflags); /* for LWIP_NOASSERT */
- LWIP_UNUSED_ARG(opts); /* for LWIP_NOASSERT */
- }
- 800fe1e: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("tcp_output_fill_options: invalid pbuf", p != NULL);
- 800fe20: 4b03 ldr r3, [pc, #12] @ (800fe30 <tcp_output_fill_options+0x3c>)
- 800fe22: f240 7256 movw r2, #1878 @ 0x756
- 800fe26: 4905 ldr r1, [pc, #20] @ (800fe3c <tcp_output_fill_options+0x48>)
- 800fe28: 4803 ldr r0, [pc, #12] @ (800fe38 <tcp_output_fill_options+0x44>)
- 800fe2a: f003 faed bl 8013408 <iprintf>
- 800fe2e: e7e5 b.n 800fdfc <tcp_output_fill_options+0x8>
- 800fe30: 080170ec .word 0x080170ec
- 800fe34: 08017230 .word 0x08017230
- 800fe38: 080144e8 .word 0x080144e8
- 800fe3c: 08017208 .word 0x08017208
- 0800fe40 <tcp_pbuf_prealloc>:
- {
- 800fe40: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
- 800fe44: 4606 mov r6, r0
- 800fe46: 460c mov r4, r1
- 800fe48: 4615 mov r5, r2
- 800fe4a: 9f08 ldr r7, [sp, #32]
- 800fe4c: f89d 9028 ldrb.w r9, [sp, #40] @ 0x28
- LWIP_ASSERT("tcp_pbuf_prealloc: invalid oversize", oversize != NULL);
- 800fe50: 4698 mov r8, r3
- 800fe52: b1cb cbz r3, 800fe88 <tcp_pbuf_prealloc+0x48>
- LWIP_ASSERT("tcp_pbuf_prealloc: invalid pcb", pcb != NULL);
- 800fe54: b1ff cbz r7, 800fe96 <tcp_pbuf_prealloc+0x56>
- if (length < max_length) {
- 800fe56: 42ac cmp r4, r5
- 800fe58: d229 bcs.n 800feae <tcp_pbuf_prealloc+0x6e>
- if ((apiflags & TCP_WRITE_FLAG_MORE) ||
- 800fe5a: f89d 3024 ldrb.w r3, [sp, #36] @ 0x24
- 800fe5e: f013 0f02 tst.w r3, #2
- 800fe62: d108 bne.n 800fe76 <tcp_pbuf_prealloc+0x36>
- (!(pcb->flags & TF_NODELAY) &&
- 800fe64: 8b7b ldrh r3, [r7, #26]
- if ((apiflags & TCP_WRITE_FLAG_MORE) ||
- 800fe66: f013 0f40 tst.w r3, #64 @ 0x40
- 800fe6a: d13a bne.n 800fee2 <tcp_pbuf_prealloc+0xa2>
- (!(pcb->flags & TF_NODELAY) &&
- 800fe6c: f1b9 0f00 cmp.w r9, #0
- 800fe70: d001 beq.n 800fe76 <tcp_pbuf_prealloc+0x36>
- pcb->unsent != NULL ||
- 800fe72: 6efb ldr r3, [r7, #108] @ 0x6c
- (!first_seg ||
- 800fe74: b1b3 cbz r3, 800fea4 <tcp_pbuf_prealloc+0x64>
- alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(TCP_OVERSIZE_CALC_LENGTH(length)));
- 800fe76: f204 53b7 addw r3, r4, #1463 @ 0x5b7
- 800fe7a: f023 0303 bic.w r3, r3, #3
- 800fe7e: 429d cmp r5, r3
- 800fe80: bf28 it cs
- 800fe82: 461d movcs r5, r3
- 800fe84: b2a9 uxth r1, r5
- 800fe86: e013 b.n 800feb0 <tcp_pbuf_prealloc+0x70>
- LWIP_ASSERT("tcp_pbuf_prealloc: invalid oversize", oversize != NULL);
- 800fe88: 4b17 ldr r3, [pc, #92] @ (800fee8 <tcp_pbuf_prealloc+0xa8>)
- 800fe8a: 22e8 movs r2, #232 @ 0xe8
- 800fe8c: 4917 ldr r1, [pc, #92] @ (800feec <tcp_pbuf_prealloc+0xac>)
- 800fe8e: 4818 ldr r0, [pc, #96] @ (800fef0 <tcp_pbuf_prealloc+0xb0>)
- 800fe90: f003 faba bl 8013408 <iprintf>
- 800fe94: e7de b.n 800fe54 <tcp_pbuf_prealloc+0x14>
- LWIP_ASSERT("tcp_pbuf_prealloc: invalid pcb", pcb != NULL);
- 800fe96: 4b14 ldr r3, [pc, #80] @ (800fee8 <tcp_pbuf_prealloc+0xa8>)
- 800fe98: 22e9 movs r2, #233 @ 0xe9
- 800fe9a: 4916 ldr r1, [pc, #88] @ (800fef4 <tcp_pbuf_prealloc+0xb4>)
- 800fe9c: 4814 ldr r0, [pc, #80] @ (800fef0 <tcp_pbuf_prealloc+0xb0>)
- 800fe9e: f003 fab3 bl 8013408 <iprintf>
- 800fea2: e7d8 b.n 800fe56 <tcp_pbuf_prealloc+0x16>
- pcb->unacked != NULL))) {
- 800fea4: 6f3b ldr r3, [r7, #112] @ 0x70
- pcb->unsent != NULL ||
- 800fea6: 2b00 cmp r3, #0
- 800fea8: d1e5 bne.n 800fe76 <tcp_pbuf_prealloc+0x36>
- u16_t alloc = length;
- 800feaa: 4621 mov r1, r4
- 800feac: e000 b.n 800feb0 <tcp_pbuf_prealloc+0x70>
- 800feae: 4621 mov r1, r4
- p = pbuf_alloc(layer, alloc, PBUF_RAM);
- 800feb0: f44f 7220 mov.w r2, #640 @ 0x280
- 800feb4: 4630 mov r0, r6
- 800feb6: f7fb ffdb bl 800be70 <pbuf_alloc>
- if (p == NULL) {
- 800feba: 4605 mov r5, r0
- 800febc: b170 cbz r0, 800fedc <tcp_pbuf_prealloc+0x9c>
- LWIP_ASSERT("need unchained pbuf", p->next == NULL);
- 800febe: 6803 ldr r3, [r0, #0]
- 800fec0: b133 cbz r3, 800fed0 <tcp_pbuf_prealloc+0x90>
- 800fec2: 4b09 ldr r3, [pc, #36] @ (800fee8 <tcp_pbuf_prealloc+0xa8>)
- 800fec4: f240 120b movw r2, #267 @ 0x10b
- 800fec8: 490b ldr r1, [pc, #44] @ (800fef8 <tcp_pbuf_prealloc+0xb8>)
- 800feca: 4809 ldr r0, [pc, #36] @ (800fef0 <tcp_pbuf_prealloc+0xb0>)
- 800fecc: f003 fa9c bl 8013408 <iprintf>
- *oversize = p->len - length;
- 800fed0: 896b ldrh r3, [r5, #10]
- 800fed2: 1b1b subs r3, r3, r4
- 800fed4: f8a8 3000 strh.w r3, [r8]
- p->len = p->tot_len = length;
- 800fed8: 812c strh r4, [r5, #8]
- 800feda: 816c strh r4, [r5, #10]
- }
- 800fedc: 4628 mov r0, r5
- 800fede: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
- u16_t alloc = length;
- 800fee2: 4621 mov r1, r4
- 800fee4: e7e4 b.n 800feb0 <tcp_pbuf_prealloc+0x70>
- 800fee6: bf00 nop
- 800fee8: 080170ec .word 0x080170ec
- 800feec: 08017244 .word 0x08017244
- 800fef0: 080144e8 .word 0x080144e8
- 800fef4: 08017268 .word 0x08017268
- 800fef8: 08017288 .word 0x08017288
- 0800fefc <tcp_create_segment>:
- {
- 800fefc: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
- 800ff00: 460e mov r6, r1
- 800ff02: 4617 mov r7, r2
- 800ff04: 4698 mov r8, r3
- 800ff06: f89d a020 ldrb.w sl, [sp, #32]
- LWIP_ASSERT("tcp_create_segment: invalid pcb", pcb != NULL);
- 800ff0a: 4681 mov r9, r0
- 800ff0c: 2800 cmp r0, #0
- 800ff0e: d040 beq.n 800ff92 <tcp_create_segment+0x96>
- LWIP_ASSERT("tcp_create_segment: invalid pbuf", p != NULL);
- 800ff10: 2e00 cmp r6, #0
- 800ff12: d045 beq.n 800ffa0 <tcp_create_segment+0xa4>
- optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb);
- 800ff14: ea4f 058a mov.w r5, sl, lsl #2
- 800ff18: f005 0504 and.w r5, r5, #4
- if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) {
- 800ff1c: 2003 movs r0, #3
- 800ff1e: f7fb fb71 bl 800b604 <memp_malloc>
- 800ff22: 4604 mov r4, r0
- 800ff24: 2800 cmp r0, #0
- 800ff26: d042 beq.n 800ffae <tcp_create_segment+0xb2>
- seg->flags = optflags;
- 800ff28: f880 a00c strb.w sl, [r0, #12]
- seg->next = NULL;
- 800ff2c: 2300 movs r3, #0
- 800ff2e: 6003 str r3, [r0, #0]
- seg->p = p;
- 800ff30: 6046 str r6, [r0, #4]
- LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen);
- 800ff32: 8933 ldrh r3, [r6, #8]
- 800ff34: 42ab cmp r3, r5
- 800ff36: d33e bcc.n 800ffb6 <tcp_create_segment+0xba>
- seg->len = p->tot_len - optlen;
- 800ff38: 8931 ldrh r1, [r6, #8]
- 800ff3a: 1b49 subs r1, r1, r5
- 800ff3c: 8121 strh r1, [r4, #8]
- seg->oversize_left = 0;
- 800ff3e: 2300 movs r3, #0
- 800ff40: 8163 strh r3, [r4, #10]
- if (pbuf_add_header(p, TCP_HLEN)) {
- 800ff42: 2114 movs r1, #20
- 800ff44: 4630 mov r0, r6
- 800ff46: f7fb fee0 bl 800bd0a <pbuf_add_header>
- 800ff4a: 2800 cmp r0, #0
- 800ff4c: d13a bne.n 800ffc4 <tcp_create_segment+0xc8>
- seg->tcphdr = (struct tcp_hdr *)seg->p->payload;
- 800ff4e: 6863 ldr r3, [r4, #4]
- 800ff50: 685e ldr r6, [r3, #4]
- 800ff52: 6126 str r6, [r4, #16]
- seg->tcphdr->src = lwip_htons(pcb->local_port);
- 800ff54: f8b9 0016 ldrh.w r0, [r9, #22]
- 800ff58: f7f7 ff90 bl 8007e7c <lwip_htons>
- 800ff5c: 8030 strh r0, [r6, #0]
- seg->tcphdr->dest = lwip_htons(pcb->remote_port);
- 800ff5e: 6926 ldr r6, [r4, #16]
- 800ff60: f8b9 0018 ldrh.w r0, [r9, #24]
- 800ff64: f7f7 ff8a bl 8007e7c <lwip_htons>
- 800ff68: 8070 strh r0, [r6, #2]
- seg->tcphdr->seqno = lwip_htonl(seqno);
- 800ff6a: 6926 ldr r6, [r4, #16]
- 800ff6c: 4640 mov r0, r8
- 800ff6e: f7f7 ff8a bl 8007e86 <lwip_htonl>
- 800ff72: 6070 str r0, [r6, #4]
- TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), hdrflags);
- 800ff74: 08a8 lsrs r0, r5, #2
- 800ff76: 3005 adds r0, #5
- 800ff78: 6925 ldr r5, [r4, #16]
- 800ff7a: ea47 3000 orr.w r0, r7, r0, lsl #12
- 800ff7e: f7f7 ff7d bl 8007e7c <lwip_htons>
- 800ff82: 81a8 strh r0, [r5, #12]
- seg->tcphdr->urgp = 0;
- 800ff84: 6923 ldr r3, [r4, #16]
- 800ff86: 2200 movs r2, #0
- 800ff88: 749a strb r2, [r3, #18]
- 800ff8a: 74da strb r2, [r3, #19]
- }
- 800ff8c: 4620 mov r0, r4
- 800ff8e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
- LWIP_ASSERT("tcp_create_segment: invalid pcb", pcb != NULL);
- 800ff92: 4b0f ldr r3, [pc, #60] @ (800ffd0 <tcp_create_segment+0xd4>)
- 800ff94: 22a3 movs r2, #163 @ 0xa3
- 800ff96: 490f ldr r1, [pc, #60] @ (800ffd4 <tcp_create_segment+0xd8>)
- 800ff98: 480f ldr r0, [pc, #60] @ (800ffd8 <tcp_create_segment+0xdc>)
- 800ff9a: f003 fa35 bl 8013408 <iprintf>
- 800ff9e: e7b7 b.n 800ff10 <tcp_create_segment+0x14>
- LWIP_ASSERT("tcp_create_segment: invalid pbuf", p != NULL);
- 800ffa0: 4b0b ldr r3, [pc, #44] @ (800ffd0 <tcp_create_segment+0xd4>)
- 800ffa2: 22a4 movs r2, #164 @ 0xa4
- 800ffa4: 490d ldr r1, [pc, #52] @ (800ffdc <tcp_create_segment+0xe0>)
- 800ffa6: 480c ldr r0, [pc, #48] @ (800ffd8 <tcp_create_segment+0xdc>)
- 800ffa8: f003 fa2e bl 8013408 <iprintf>
- 800ffac: e7b2 b.n 800ff14 <tcp_create_segment+0x18>
- pbuf_free(p);
- 800ffae: 4630 mov r0, r6
- 800ffb0: f7fb fef6 bl 800bda0 <pbuf_free>
- return NULL;
- 800ffb4: e7ea b.n 800ff8c <tcp_create_segment+0x90>
- LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen);
- 800ffb6: 4b06 ldr r3, [pc, #24] @ (800ffd0 <tcp_create_segment+0xd4>)
- 800ffb8: 22b0 movs r2, #176 @ 0xb0
- 800ffba: 4909 ldr r1, [pc, #36] @ (800ffe0 <tcp_create_segment+0xe4>)
- 800ffbc: 4806 ldr r0, [pc, #24] @ (800ffd8 <tcp_create_segment+0xdc>)
- 800ffbe: f003 fa23 bl 8013408 <iprintf>
- 800ffc2: e7b9 b.n 800ff38 <tcp_create_segment+0x3c>
- tcp_seg_free(seg);
- 800ffc4: 4620 mov r0, r4
- 800ffc6: f7fd f9f1 bl 800d3ac <tcp_seg_free>
- return NULL;
- 800ffca: 2400 movs r4, #0
- 800ffcc: e7de b.n 800ff8c <tcp_create_segment+0x90>
- 800ffce: bf00 nop
- 800ffd0: 080170ec .word 0x080170ec
- 800ffd4: 0801729c .word 0x0801729c
- 800ffd8: 080144e8 .word 0x080144e8
- 800ffdc: 080172bc .word 0x080172bc
- 800ffe0: 080172e0 .word 0x080172e0
- 0800ffe4 <tcp_output_alloc_header_common>:
- {
- 800ffe4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 800ffe8: 4606 mov r6, r0
- 800ffea: 460c mov r4, r1
- 800ffec: 4698 mov r8, r3
- p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM);
- 800ffee: 4411 add r1, r2
- 800fff0: b289 uxth r1, r1
- 800fff2: 3114 adds r1, #20
- 800fff4: f44f 7220 mov.w r2, #640 @ 0x280
- 800fff8: b289 uxth r1, r1
- 800fffa: 2022 movs r0, #34 @ 0x22
- 800fffc: f7fb ff38 bl 800be70 <pbuf_alloc>
- if (p != NULL) {
- 8010000: 4607 mov r7, r0
- 8010002: b348 cbz r0, 8010058 <tcp_output_alloc_header_common+0x74>
- LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr",
- 8010004: f104 0313 add.w r3, r4, #19
- 8010008: 8942 ldrh r2, [r0, #10]
- 801000a: 4293 cmp r3, r2
- 801000c: da27 bge.n 801005e <tcp_output_alloc_header_common+0x7a>
- tcphdr = (struct tcp_hdr *)p->payload;
- 801000e: 687d ldr r5, [r7, #4]
- tcphdr->src = lwip_htons(src_port);
- 8010010: f8bd 0018 ldrh.w r0, [sp, #24]
- 8010014: f7f7 ff32 bl 8007e7c <lwip_htons>
- 8010018: 8028 strh r0, [r5, #0]
- tcphdr->dest = lwip_htons(dst_port);
- 801001a: f8bd 001c ldrh.w r0, [sp, #28]
- 801001e: f7f7 ff2d bl 8007e7c <lwip_htons>
- 8010022: 8068 strh r0, [r5, #2]
- tcphdr->seqno = seqno_be;
- 8010024: f8c5 8004 str.w r8, [r5, #4]
- tcphdr->ackno = lwip_htonl(ackno);
- 8010028: 4630 mov r0, r6
- 801002a: f7f7 ff2c bl 8007e86 <lwip_htonl>
- 801002e: 60a8 str r0, [r5, #8]
- TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), flags);
- 8010030: 08a4 lsrs r4, r4, #2
- 8010032: 3405 adds r4, #5
- 8010034: 0324 lsls r4, r4, #12
- 8010036: b2a4 uxth r4, r4
- 8010038: f89d 0020 ldrb.w r0, [sp, #32]
- 801003c: 4320 orrs r0, r4
- 801003e: f7f7 ff1d bl 8007e7c <lwip_htons>
- 8010042: 81a8 strh r0, [r5, #12]
- tcphdr->wnd = lwip_htons(wnd);
- 8010044: f8bd 0024 ldrh.w r0, [sp, #36] @ 0x24
- 8010048: f7f7 ff18 bl 8007e7c <lwip_htons>
- 801004c: 81e8 strh r0, [r5, #14]
- tcphdr->chksum = 0;
- 801004e: 2300 movs r3, #0
- 8010050: 742b strb r3, [r5, #16]
- 8010052: 746b strb r3, [r5, #17]
- tcphdr->urgp = 0;
- 8010054: 74ab strb r3, [r5, #18]
- 8010056: 74eb strb r3, [r5, #19]
- }
- 8010058: 4638 mov r0, r7
- 801005a: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr",
- 801005e: 4b04 ldr r3, [pc, #16] @ (8010070 <tcp_output_alloc_header_common+0x8c>)
- 8010060: f240 7223 movw r2, #1827 @ 0x723
- 8010064: 4903 ldr r1, [pc, #12] @ (8010074 <tcp_output_alloc_header_common+0x90>)
- 8010066: 4804 ldr r0, [pc, #16] @ (8010078 <tcp_output_alloc_header_common+0x94>)
- 8010068: f003 f9ce bl 8013408 <iprintf>
- 801006c: e7cf b.n 801000e <tcp_output_alloc_header_common+0x2a>
- 801006e: bf00 nop
- 8010070: 080170ec .word 0x080170ec
- 8010074: 080172f8 .word 0x080172f8
- 8010078: 080144e8 .word 0x080144e8
- 0801007c <tcp_output_alloc_header>:
- {
- 801007c: b5f0 push {r4, r5, r6, r7, lr}
- 801007e: b085 sub sp, #20
- 8010080: 460d mov r5, r1
- 8010082: 4616 mov r6, r2
- 8010084: 461f mov r7, r3
- LWIP_ASSERT("tcp_output_alloc_header: invalid pcb", pcb != NULL);
- 8010086: 4604 mov r4, r0
- 8010088: b1a0 cbz r0, 80100b4 <tcp_output_alloc_header+0x38>
- p = tcp_output_alloc_header_common(pcb->rcv_nxt, optlen, datalen,
- 801008a: 8d63 ldrh r3, [r4, #42] @ 0x2a
- 801008c: 9303 str r3, [sp, #12]
- 801008e: 2310 movs r3, #16
- 8010090: 9302 str r3, [sp, #8]
- 8010092: 8b23 ldrh r3, [r4, #24]
- 8010094: 9301 str r3, [sp, #4]
- 8010096: 8ae3 ldrh r3, [r4, #22]
- 8010098: 9300 str r3, [sp, #0]
- 801009a: 463b mov r3, r7
- 801009c: 4632 mov r2, r6
- 801009e: 4629 mov r1, r5
- 80100a0: 6a60 ldr r0, [r4, #36] @ 0x24
- 80100a2: f7ff ff9f bl 800ffe4 <tcp_output_alloc_header_common>
- if (p != NULL) {
- 80100a6: b118 cbz r0, 80100b0 <tcp_output_alloc_header+0x34>
- pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd;
- 80100a8: 6a63 ldr r3, [r4, #36] @ 0x24
- 80100aa: 8d62 ldrh r2, [r4, #42] @ 0x2a
- 80100ac: 4413 add r3, r2
- 80100ae: 62e3 str r3, [r4, #44] @ 0x2c
- }
- 80100b0: b005 add sp, #20
- 80100b2: bdf0 pop {r4, r5, r6, r7, pc}
- LWIP_ASSERT("tcp_output_alloc_header: invalid pcb", pcb != NULL);
- 80100b4: 4b03 ldr r3, [pc, #12] @ (80100c4 <tcp_output_alloc_header+0x48>)
- 80100b6: f240 7242 movw r2, #1858 @ 0x742
- 80100ba: 4903 ldr r1, [pc, #12] @ (80100c8 <tcp_output_alloc_header+0x4c>)
- 80100bc: 4803 ldr r0, [pc, #12] @ (80100cc <tcp_output_alloc_header+0x50>)
- 80100be: f003 f9a3 bl 8013408 <iprintf>
- 80100c2: e7e2 b.n 801008a <tcp_output_alloc_header+0xe>
- 80100c4: 080170ec .word 0x080170ec
- 80100c8: 08017328 .word 0x08017328
- 80100cc: 080144e8 .word 0x080144e8
- 080100d0 <tcp_route>:
- {
- 80100d0: b508 push {r3, lr}
- if ((pcb != NULL) && (pcb->netif_idx != NETIF_NO_INDEX)) {
- 80100d2: b108 cbz r0, 80100d8 <tcp_route+0x8>
- 80100d4: 7a00 ldrb r0, [r0, #8]
- 80100d6: b918 cbnz r0, 80100e0 <tcp_route+0x10>
- return ip_route(src, dst);
- 80100d8: 4610 mov r0, r2
- 80100da: f7fa f811 bl 800a100 <ip4_route>
- }
- 80100de: bd08 pop {r3, pc}
- return netif_get_by_index(pcb->netif_idx);
- 80100e0: f7fb fd2e bl 800bb40 <netif_get_by_index>
- 80100e4: e7fb b.n 80100de <tcp_route+0xe>
- ...
- 080100e8 <tcp_output_segment>:
- {
- 80100e8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 80100ec: b084 sub sp, #16
- 80100ee: 460c mov r4, r1
- 80100f0: 4616 mov r6, r2
- LWIP_ASSERT("tcp_output_segment: invalid seg", seg != NULL);
- 80100f2: 4605 mov r5, r0
- 80100f4: b148 cbz r0, 801010a <tcp_output_segment+0x22>
- LWIP_ASSERT("tcp_output_segment: invalid pcb", pcb != NULL);
- 80100f6: b184 cbz r4, 801011a <tcp_output_segment+0x32>
- LWIP_ASSERT("tcp_output_segment: invalid netif", netif != NULL);
- 80100f8: b1be cbz r6, 801012a <tcp_output_segment+0x42>
- if (tcp_output_segment_busy(seg)) {
- 80100fa: 4628 mov r0, r5
- 80100fc: f7ff fe60 bl 800fdc0 <tcp_output_segment_busy>
- 8010100: b1d8 cbz r0, 801013a <tcp_output_segment+0x52>
- return ERR_OK;
- 8010102: 2000 movs r0, #0
- }
- 8010104: b004 add sp, #16
- 8010106: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- LWIP_ASSERT("tcp_output_segment: invalid seg", seg != NULL);
- 801010a: 4b40 ldr r3, [pc, #256] @ (801020c <tcp_output_segment+0x124>)
- 801010c: f44f 62b7 mov.w r2, #1464 @ 0x5b8
- 8010110: 493f ldr r1, [pc, #252] @ (8010210 <tcp_output_segment+0x128>)
- 8010112: 4840 ldr r0, [pc, #256] @ (8010214 <tcp_output_segment+0x12c>)
- 8010114: f003 f978 bl 8013408 <iprintf>
- 8010118: e7ed b.n 80100f6 <tcp_output_segment+0xe>
- LWIP_ASSERT("tcp_output_segment: invalid pcb", pcb != NULL);
- 801011a: 4b3c ldr r3, [pc, #240] @ (801020c <tcp_output_segment+0x124>)
- 801011c: f240 52b9 movw r2, #1465 @ 0x5b9
- 8010120: 493d ldr r1, [pc, #244] @ (8010218 <tcp_output_segment+0x130>)
- 8010122: 483c ldr r0, [pc, #240] @ (8010214 <tcp_output_segment+0x12c>)
- 8010124: f003 f970 bl 8013408 <iprintf>
- 8010128: e7e6 b.n 80100f8 <tcp_output_segment+0x10>
- LWIP_ASSERT("tcp_output_segment: invalid netif", netif != NULL);
- 801012a: 4b38 ldr r3, [pc, #224] @ (801020c <tcp_output_segment+0x124>)
- 801012c: f240 52ba movw r2, #1466 @ 0x5ba
- 8010130: 493a ldr r1, [pc, #232] @ (801021c <tcp_output_segment+0x134>)
- 8010132: 4838 ldr r0, [pc, #224] @ (8010214 <tcp_output_segment+0x12c>)
- 8010134: f003 f968 bl 8013408 <iprintf>
- 8010138: e7df b.n 80100fa <tcp_output_segment+0x12>
- seg->tcphdr->ackno = lwip_htonl(pcb->rcv_nxt);
- 801013a: 692f ldr r7, [r5, #16]
- 801013c: 6a60 ldr r0, [r4, #36] @ 0x24
- 801013e: f7f7 fea2 bl 8007e86 <lwip_htonl>
- 8010142: 60b8 str r0, [r7, #8]
- seg->tcphdr->wnd = lwip_htons(TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd)));
- 8010144: 692f ldr r7, [r5, #16]
- 8010146: 8d60 ldrh r0, [r4, #42] @ 0x2a
- 8010148: f7f7 fe98 bl 8007e7c <lwip_htons>
- 801014c: 81f8 strh r0, [r7, #14]
- pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd;
- 801014e: 6a63 ldr r3, [r4, #36] @ 0x24
- 8010150: 8d62 ldrh r2, [r4, #42] @ 0x2a
- 8010152: 4413 add r3, r2
- 8010154: 62e3 str r3, [r4, #44] @ 0x2c
- opts = (u32_t *)(void *)(seg->tcphdr + 1);
- 8010156: f8d5 8010 ldr.w r8, [r5, #16]
- 801015a: f108 0714 add.w r7, r8, #20
- if (seg->flags & TF_SEG_OPTS_MSS) {
- 801015e: 7b2b ldrb r3, [r5, #12]
- 8010160: f013 0f01 tst.w r3, #1
- 8010164: d134 bne.n 80101d0 <tcp_output_segment+0xe8>
- if (pcb->rtime < 0) {
- 8010166: f9b4 3030 ldrsh.w r3, [r4, #48] @ 0x30
- 801016a: 2b00 cmp r3, #0
- 801016c: db3f blt.n 80101ee <tcp_output_segment+0x106>
- if (pcb->rttest == 0) {
- 801016e: 6b63 ldr r3, [r4, #52] @ 0x34
- 8010170: 2b00 cmp r3, #0
- 8010172: d03f beq.n 80101f4 <tcp_output_segment+0x10c>
- len = (u16_t)((u8_t *)seg->tcphdr - (u8_t *)seg->p->payload);
- 8010174: 692b ldr r3, [r5, #16]
- 8010176: 686a ldr r2, [r5, #4]
- 8010178: 6851 ldr r1, [r2, #4]
- 801017a: 1a5b subs r3, r3, r1
- 801017c: b29b uxth r3, r3
- seg->p->len -= len;
- 801017e: 8951 ldrh r1, [r2, #10]
- 8010180: 1ac9 subs r1, r1, r3
- 8010182: 8151 strh r1, [r2, #10]
- seg->p->tot_len -= len;
- 8010184: 6869 ldr r1, [r5, #4]
- 8010186: 890a ldrh r2, [r1, #8]
- 8010188: 1ad3 subs r3, r2, r3
- 801018a: 810b strh r3, [r1, #8]
- seg->p->payload = seg->tcphdr;
- 801018c: 686a ldr r2, [r5, #4]
- 801018e: 692b ldr r3, [r5, #16]
- 8010190: 6053 str r3, [r2, #4]
- seg->tcphdr->chksum = 0;
- 8010192: 2200 movs r2, #0
- 8010194: 741a strb r2, [r3, #16]
- 8010196: 745a strb r2, [r3, #17]
- LWIP_ASSERT("options not filled", (u8_t *)opts == ((u8_t *)(seg->tcphdr + 1)) + LWIP_TCP_OPT_LENGTH_SEGMENT(seg->flags, pcb));
- 8010198: 692b ldr r3, [r5, #16]
- 801019a: 7b2a ldrb r2, [r5, #12]
- 801019c: f012 0f01 tst.w r2, #1
- 80101a0: d031 beq.n 8010206 <tcp_output_segment+0x11e>
- 80101a2: 2218 movs r2, #24
- 80101a4: 4413 add r3, r2
- 80101a6: 429f cmp r7, r3
- 80101a8: d006 beq.n 80101b8 <tcp_output_segment+0xd0>
- 80101aa: 4b18 ldr r3, [pc, #96] @ (801020c <tcp_output_segment+0x124>)
- 80101ac: f240 621c movw r2, #1564 @ 0x61c
- 80101b0: 491b ldr r1, [pc, #108] @ (8010220 <tcp_output_segment+0x138>)
- 80101b2: 4818 ldr r0, [pc, #96] @ (8010214 <tcp_output_segment+0x12c>)
- 80101b4: f003 f928 bl 8013408 <iprintf>
- err = ip_output_if(seg->p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl,
- 80101b8: 9602 str r6, [sp, #8]
- 80101ba: 2306 movs r3, #6
- 80101bc: 9301 str r3, [sp, #4]
- 80101be: 7aa3 ldrb r3, [r4, #10]
- 80101c0: 9300 str r3, [sp, #0]
- 80101c2: 7ae3 ldrb r3, [r4, #11]
- 80101c4: 1d22 adds r2, r4, #4
- 80101c6: 4621 mov r1, r4
- 80101c8: 6868 ldr r0, [r5, #4]
- 80101ca: f7fa f92d bl 800a428 <ip4_output_if>
- return err;
- 80101ce: e799 b.n 8010104 <tcp_output_segment+0x1c>
- mss = tcp_eff_send_mss_netif(TCP_MSS, netif, &pcb->remote_ip);
- 80101d0: 1d22 adds r2, r4, #4
- 80101d2: 4631 mov r1, r6
- 80101d4: f240 50b4 movw r0, #1460 @ 0x5b4
- 80101d8: f7fd f9ca bl 800d570 <tcp_eff_send_mss_netif>
- *opts = TCP_BUILD_MSS_OPTION(mss);
- 80101dc: f040 7001 orr.w r0, r0, #33816576 @ 0x2040000
- 80101e0: f7f7 fe51 bl 8007e86 <lwip_htonl>
- 80101e4: f8c8 0014 str.w r0, [r8, #20]
- opts += 1;
- 80101e8: f108 0718 add.w r7, r8, #24
- 80101ec: e7bb b.n 8010166 <tcp_output_segment+0x7e>
- pcb->rtime = 0;
- 80101ee: 2300 movs r3, #0
- 80101f0: 8623 strh r3, [r4, #48] @ 0x30
- 80101f2: e7bc b.n 801016e <tcp_output_segment+0x86>
- pcb->rttest = tcp_ticks;
- 80101f4: 4b0b ldr r3, [pc, #44] @ (8010224 <tcp_output_segment+0x13c>)
- 80101f6: 681b ldr r3, [r3, #0]
- 80101f8: 6363 str r3, [r4, #52] @ 0x34
- pcb->rtseq = lwip_ntohl(seg->tcphdr->seqno);
- 80101fa: 692b ldr r3, [r5, #16]
- 80101fc: 6858 ldr r0, [r3, #4]
- 80101fe: f7f7 fe42 bl 8007e86 <lwip_htonl>
- 8010202: 63a0 str r0, [r4, #56] @ 0x38
- LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_output_segment: rtseq %"U32_F"\n", pcb->rtseq));
- 8010204: e7b6 b.n 8010174 <tcp_output_segment+0x8c>
- LWIP_ASSERT("options not filled", (u8_t *)opts == ((u8_t *)(seg->tcphdr + 1)) + LWIP_TCP_OPT_LENGTH_SEGMENT(seg->flags, pcb));
- 8010206: 2214 movs r2, #20
- 8010208: e7cc b.n 80101a4 <tcp_output_segment+0xbc>
- 801020a: bf00 nop
- 801020c: 080170ec .word 0x080170ec
- 8010210: 08017350 .word 0x08017350
- 8010214: 080144e8 .word 0x080144e8
- 8010218: 08017370 .word 0x08017370
- 801021c: 08017390 .word 0x08017390
- 8010220: 08017230 .word 0x08017230
- 8010224: 24019be4 .word 0x24019be4
- 08010228 <tcp_output_control_segment>:
- * header checksum and calling ip_output_if while handling netif hints and stats.
- */
- static err_t
- tcp_output_control_segment(const struct tcp_pcb *pcb, struct pbuf *p,
- const ip_addr_t *src, const ip_addr_t *dst)
- {
- 8010228: b5f0 push {r4, r5, r6, r7, lr}
- 801022a: b085 sub sp, #20
- 801022c: 4604 mov r4, r0
- 801022e: 4615 mov r5, r2
- 8010230: 461e mov r6, r3
- err_t err;
- struct netif *netif;
- LWIP_ASSERT("tcp_output_control_segment: invalid pbuf", p != NULL);
- 8010232: 460f mov r7, r1
- 8010234: b1c9 cbz r1, 801026a <tcp_output_control_segment+0x42>
- netif = tcp_route(pcb, src, dst);
- 8010236: 4632 mov r2, r6
- 8010238: 4629 mov r1, r5
- 801023a: 4620 mov r0, r4
- 801023c: f7ff ff48 bl 80100d0 <tcp_route>
- if (netif == NULL) {
- 8010240: 4602 mov r2, r0
- 8010242: b1e8 cbz r0, 8010280 <tcp_output_control_segment+0x58>
- 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) {
- 8010244: b1cc cbz r4, 801027a <tcp_output_control_segment+0x52>
- NETIF_SET_HINTS(netif, LWIP_CONST_CAST(struct netif_hint*, &(pcb->netif_hints)));
- ttl = pcb->ttl;
- 8010246: 7ae3 ldrb r3, [r4, #11]
- tos = pcb->tos;
- 8010248: 7aa1 ldrb r1, [r4, #10]
- /* Send output with hardcoded TTL/HL since we have no access to the pcb */
- ttl = TCP_TTL;
- tos = 0;
- }
- TCP_STATS_INC(tcp.xmit);
- err = ip_output_if(p, src, dst, ttl, tos, IP_PROTO_TCP, netif);
- 801024a: 9202 str r2, [sp, #8]
- 801024c: 2206 movs r2, #6
- 801024e: 9201 str r2, [sp, #4]
- 8010250: 9100 str r1, [sp, #0]
- 8010252: 4632 mov r2, r6
- 8010254: 4629 mov r1, r5
- 8010256: 4638 mov r0, r7
- 8010258: f7fa f8e6 bl 800a428 <ip4_output_if>
- 801025c: 4604 mov r4, r0
- NETIF_RESET_HINTS(netif);
- }
- pbuf_free(p);
- 801025e: 4638 mov r0, r7
- 8010260: f7fb fd9e bl 800bda0 <pbuf_free>
- return err;
- }
- 8010264: 4620 mov r0, r4
- 8010266: b005 add sp, #20
- 8010268: bdf0 pop {r4, r5, r6, r7, pc}
- LWIP_ASSERT("tcp_output_control_segment: invalid pbuf", p != NULL);
- 801026a: 4b07 ldr r3, [pc, #28] @ (8010288 <tcp_output_control_segment+0x60>)
- 801026c: f240 7287 movw r2, #1927 @ 0x787
- 8010270: 4906 ldr r1, [pc, #24] @ (801028c <tcp_output_control_segment+0x64>)
- 8010272: 4807 ldr r0, [pc, #28] @ (8010290 <tcp_output_control_segment+0x68>)
- 8010274: f003 f8c8 bl 8013408 <iprintf>
- 8010278: e7dd b.n 8010236 <tcp_output_control_segment+0xe>
- tos = 0;
- 801027a: 2100 movs r1, #0
- ttl = TCP_TTL;
- 801027c: 23ff movs r3, #255 @ 0xff
- 801027e: e7e4 b.n 801024a <tcp_output_control_segment+0x22>
- err = ERR_RTE;
- 8010280: f06f 0403 mvn.w r4, #3
- 8010284: e7eb b.n 801025e <tcp_output_control_segment+0x36>
- 8010286: bf00 nop
- 8010288: 080170ec .word 0x080170ec
- 801028c: 080173b4 .word 0x080173b4
- 8010290: 080144e8 .word 0x080144e8
- 08010294 <tcp_write>:
- {
- 8010294: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 8010298: b091 sub sp, #68 @ 0x44
- 801029a: 9107 str r1, [sp, #28]
- 801029c: 9305 str r3, [sp, #20]
- u16_t oversize = 0;
- 801029e: 2300 movs r3, #0
- 80102a0: f8ad 303e strh.w r3, [sp, #62] @ 0x3e
- LWIP_ERROR("tcp_write: invalid pcb", pcb != NULL, return ERR_ARG);
- 80102a4: 2800 cmp r0, #0
- 80102a6: f000 809c beq.w 80103e2 <tcp_write+0x14e>
- 80102aa: 4692 mov sl, r2
- 80102ac: 4680 mov r8, r0
- mss_local = LWIP_MIN(pcb->mss, TCPWND_MIN16(pcb->snd_wnd_max / 2));
- 80102ae: f8b0 3062 ldrh.w r3, [r0, #98] @ 0x62
- 80102b2: 085b lsrs r3, r3, #1
- 80102b4: f8b0 b032 ldrh.w fp, [r0, #50] @ 0x32
- 80102b8: 455b cmp r3, fp
- 80102ba: bf28 it cs
- 80102bc: 465b movcs r3, fp
- mss_local = mss_local ? mss_local : pcb->mss;
- 80102be: b103 cbz r3, 80102c2 <tcp_write+0x2e>
- 80102c0: 469b mov fp, r3
- LWIP_ASSERT_CORE_LOCKED();
- 80102c2: f7f3 fc23 bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)",
- 80102c6: 9b07 ldr r3, [sp, #28]
- 80102c8: 2b00 cmp r3, #0
- 80102ca: f000 8094 beq.w 80103f6 <tcp_write+0x162>
- err = tcp_write_checks(pcb, len);
- 80102ce: 4651 mov r1, sl
- 80102d0: 4640 mov r0, r8
- 80102d2: f7ff fd17 bl 800fd04 <tcp_write_checks>
- if (err != ERR_OK) {
- 80102d6: 4681 mov r9, r0
- 80102d8: 2800 cmp r0, #0
- 80102da: f040 81a1 bne.w 8010620 <tcp_write+0x38c>
- queuelen = pcb->snd_queuelen;
- 80102de: f8b8 6066 ldrh.w r6, [r8, #102] @ 0x66
- if (pcb->unsent != NULL) {
- 80102e2: f8d8 306c ldr.w r3, [r8, #108] @ 0x6c
- 80102e6: 930a str r3, [sp, #40] @ 0x28
- 80102e8: 2b00 cmp r3, #0
- 80102ea: f000 80e5 beq.w 80104b8 <tcp_write+0x224>
- for (last_unsent = pcb->unsent; last_unsent->next != NULL;
- 80102ee: 9308 str r3, [sp, #32]
- 80102f0: 681b ldr r3, [r3, #0]
- 80102f2: 2b00 cmp r3, #0
- 80102f4: d1fb bne.n 80102ee <tcp_write+0x5a>
- unsent_optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(last_unsent->flags, pcb);
- 80102f6: 930a str r3, [sp, #40] @ 0x28
- 80102f8: 9b08 ldr r3, [sp, #32]
- 80102fa: 7b1c ldrb r4, [r3, #12]
- 80102fc: 00a4 lsls r4, r4, #2
- 80102fe: f004 0404 and.w r4, r4, #4
- LWIP_ASSERT("mss_local is too small", mss_local >= last_unsent->len + unsent_optlen);
- 8010302: 891b ldrh r3, [r3, #8]
- 8010304: 4423 add r3, r4
- 8010306: 459b cmp fp, r3
- 8010308: db7f blt.n 801040a <tcp_write+0x176>
- space = mss_local - (last_unsent->len + unsent_optlen);
- 801030a: 9908 ldr r1, [sp, #32]
- 801030c: 890b ldrh r3, [r1, #8]
- 801030e: 441c add r4, r3
- 8010310: b2a4 uxth r4, r4
- 8010312: ebab 0404 sub.w r4, fp, r4
- 8010316: b2a4 uxth r4, r4
- LWIP_ASSERT("unsent_oversize mismatch (pcb vs. last_unsent)",
- 8010318: f8b8 2068 ldrh.w r2, [r8, #104] @ 0x68
- 801031c: 894b ldrh r3, [r1, #10]
- 801031e: 429a cmp r2, r3
- 8010320: d17b bne.n 801041a <tcp_write+0x186>
- oversize = pcb->unsent_oversize;
- 8010322: f8b8 3068 ldrh.w r3, [r8, #104] @ 0x68
- 8010326: 9309 str r3, [sp, #36] @ 0x24
- 8010328: f8ad 303e strh.w r3, [sp, #62] @ 0x3e
- if (oversize > 0) {
- 801032c: 2b00 cmp r3, #0
- 801032e: f000 8084 beq.w 801043a <tcp_write+0x1a6>
- LWIP_ASSERT("inconsistent oversize vs. space", oversize <= space);
- 8010332: 42a3 cmp r3, r4
- 8010334: d879 bhi.n 801042a <tcp_write+0x196>
- oversize_used = LWIP_MIN(space, LWIP_MIN(oversize, len));
- 8010336: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e
- 801033a: 461a mov r2, r3
- 801033c: 4553 cmp r3, sl
- 801033e: bf28 it cs
- 8010340: 4652 movcs r2, sl
- 8010342: 42a2 cmp r2, r4
- 8010344: bf28 it cs
- 8010346: 4622 movcs r2, r4
- 8010348: 9209 str r2, [sp, #36] @ 0x24
- oversize -= oversize_used;
- 801034a: 1a9b subs r3, r3, r2
- 801034c: f8ad 303e strh.w r3, [sp, #62] @ 0x3e
- space -= oversize_used;
- 8010350: 1aa4 subs r4, r4, r2
- 8010352: b2a4 uxth r4, r4
- seg = last_unsent;
- 8010354: 9f08 ldr r7, [sp, #32]
- LWIP_ASSERT("inconsistent oversize vs. len", (oversize == 0) || (pos == len));
- 8010356: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e
- 801035a: 9a09 ldr r2, [sp, #36] @ 0x24
- 801035c: 2b00 cmp r3, #0
- 801035e: bf18 it ne
- 8010360: 4552 cmpne r2, sl
- 8010362: d16c bne.n 801043e <tcp_write+0x1aa>
- if ((pos < len) && (space > 0) && (last_unsent->len > 0)) {
- 8010364: 9b09 ldr r3, [sp, #36] @ 0x24
- 8010366: 2c00 cmp r4, #0
- 8010368: bf18 it ne
- 801036a: 4553 cmpne r3, sl
- 801036c: f080 8166 bcs.w 801063c <tcp_write+0x3a8>
- 8010370: 9a08 ldr r2, [sp, #32]
- 8010372: 8912 ldrh r2, [r2, #8]
- 8010374: 920b str r2, [sp, #44] @ 0x2c
- 8010376: 2a00 cmp r2, #0
- 8010378: f000 8169 beq.w 801064e <tcp_write+0x3ba>
- u16_t seglen = LWIP_MIN(space, len - pos);
- 801037c: ebaa 0303 sub.w r3, sl, r3
- 8010380: 42a3 cmp r3, r4
- 8010382: bfa8 it ge
- 8010384: 4623 movge r3, r4
- 8010386: b29f uxth r7, r3
- if (apiflags & TCP_WRITE_FLAG_COPY) {
- 8010388: 9b05 ldr r3, [sp, #20]
- 801038a: f013 0f01 tst.w r3, #1
- 801038e: d15e bne.n 801044e <tcp_write+0x1ba>
- for (p = last_unsent->p; p->next != NULL; p = p->next);
- 8010390: 9b08 ldr r3, [sp, #32]
- 8010392: 685a ldr r2, [r3, #4]
- 8010394: 4613 mov r3, r2
- 8010396: 6812 ldr r2, [r2, #0]
- 8010398: 2a00 cmp r2, #0
- 801039a: d1fb bne.n 8010394 <tcp_write+0x100>
- if (((p->type_internal & (PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS | PBUF_TYPE_FLAG_DATA_VOLATILE)) == 0) &&
- 801039c: 920a str r2, [sp, #40] @ 0x28
- 801039e: 7b1a ldrb r2, [r3, #12]
- 80103a0: 2a3f cmp r2, #63 @ 0x3f
- 80103a2: d805 bhi.n 80103b0 <tcp_write+0x11c>
- (const u8_t *)p->payload + p->len == (const u8_t *)arg) {
- 80103a4: 685a ldr r2, [r3, #4]
- 80103a6: 895b ldrh r3, [r3, #10]
- 80103a8: 4413 add r3, r2
- if (((p->type_internal & (PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS | PBUF_TYPE_FLAG_DATA_VOLATILE)) == 0) &&
- 80103aa: 9a07 ldr r2, [sp, #28]
- 80103ac: 4293 cmp r3, r2
- 80103ae: d072 beq.n 8010496 <tcp_write+0x202>
- if ((concat_p = pbuf_alloc(PBUF_RAW, seglen, PBUF_ROM)) == NULL) {
- 80103b0: 2201 movs r2, #1
- 80103b2: 4639 mov r1, r7
- 80103b4: 2000 movs r0, #0
- 80103b6: f7fb fd5b bl 800be70 <pbuf_alloc>
- 80103ba: 900a str r0, [sp, #40] @ 0x28
- 80103bc: 2800 cmp r0, #0
- 80103be: f000 821e beq.w 80107fe <tcp_write+0x56a>
- ((struct pbuf_rom *)concat_p)->payload = (const u8_t *)arg + pos;
- 80103c2: 9b07 ldr r3, [sp, #28]
- 80103c4: 9909 ldr r1, [sp, #36] @ 0x24
- 80103c6: 440b add r3, r1
- 80103c8: 6043 str r3, [r0, #4]
- queuelen += pbuf_clen(concat_p);
- 80103ca: f7fb fe6e bl 800c0aa <pbuf_clen>
- 80103ce: 1833 adds r3, r6, r0
- 80103d0: b29e uxth r6, r3
- u16_t extendlen = 0;
- 80103d2: 2300 movs r3, #0
- 80103d4: 930d str r3, [sp, #52] @ 0x34
- u16_t oversize_add = 0;
- 80103d6: 930b str r3, [sp, #44] @ 0x2c
- pos += seglen;
- 80103d8: 9b09 ldr r3, [sp, #36] @ 0x24
- 80103da: 19dc adds r4, r3, r7
- 80103dc: b2a4 uxth r4, r4
- seg = last_unsent;
- 80103de: 9f08 ldr r7, [sp, #32]
- 80103e0: e130 b.n 8010644 <tcp_write+0x3b0>
- LWIP_ERROR("tcp_write: invalid pcb", pcb != NULL, return ERR_ARG);
- 80103e2: 4ba6 ldr r3, [pc, #664] @ (801067c <tcp_write+0x3e8>)
- 80103e4: f44f 72cf mov.w r2, #414 @ 0x19e
- 80103e8: 49a5 ldr r1, [pc, #660] @ (8010680 <tcp_write+0x3ec>)
- 80103ea: 48a6 ldr r0, [pc, #664] @ (8010684 <tcp_write+0x3f0>)
- 80103ec: f003 f80c bl 8013408 <iprintf>
- 80103f0: f06f 090f mvn.w r9, #15
- 80103f4: e114 b.n 8010620 <tcp_write+0x38c>
- LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)",
- 80103f6: 4ba1 ldr r3, [pc, #644] @ (801067c <tcp_write+0x3e8>)
- 80103f8: f240 12ad movw r2, #429 @ 0x1ad
- 80103fc: 49a2 ldr r1, [pc, #648] @ (8010688 <tcp_write+0x3f4>)
- 80103fe: 48a1 ldr r0, [pc, #644] @ (8010684 <tcp_write+0x3f0>)
- 8010400: f003 f802 bl 8013408 <iprintf>
- 8010404: f06f 090f mvn.w r9, #15
- 8010408: e10a b.n 8010620 <tcp_write+0x38c>
- LWIP_ASSERT("mss_local is too small", mss_local >= last_unsent->len + unsent_optlen);
- 801040a: 4b9c ldr r3, [pc, #624] @ (801067c <tcp_write+0x3e8>)
- 801040c: f44f 72f3 mov.w r2, #486 @ 0x1e6
- 8010410: 499e ldr r1, [pc, #632] @ (801068c <tcp_write+0x3f8>)
- 8010412: 489c ldr r0, [pc, #624] @ (8010684 <tcp_write+0x3f0>)
- 8010414: f002 fff8 bl 8013408 <iprintf>
- 8010418: e777 b.n 801030a <tcp_write+0x76>
- LWIP_ASSERT("unsent_oversize mismatch (pcb vs. last_unsent)",
- 801041a: 4b98 ldr r3, [pc, #608] @ (801067c <tcp_write+0x3e8>)
- 801041c: f240 12f3 movw r2, #499 @ 0x1f3
- 8010420: 499b ldr r1, [pc, #620] @ (8010690 <tcp_write+0x3fc>)
- 8010422: 4898 ldr r0, [pc, #608] @ (8010684 <tcp_write+0x3f0>)
- 8010424: f002 fff0 bl 8013408 <iprintf>
- 8010428: e77b b.n 8010322 <tcp_write+0x8e>
- LWIP_ASSERT("inconsistent oversize vs. space", oversize <= space);
- 801042a: 4b94 ldr r3, [pc, #592] @ (801067c <tcp_write+0x3e8>)
- 801042c: f44f 72fc mov.w r2, #504 @ 0x1f8
- 8010430: 4998 ldr r1, [pc, #608] @ (8010694 <tcp_write+0x400>)
- 8010432: 4894 ldr r0, [pc, #592] @ (8010684 <tcp_write+0x3f0>)
- 8010434: f002 ffe8 bl 8013408 <iprintf>
- 8010438: e77d b.n 8010336 <tcp_write+0xa2>
- struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL;
- 801043a: 9f0a ldr r7, [sp, #40] @ 0x28
- 801043c: e78b b.n 8010356 <tcp_write+0xc2>
- LWIP_ASSERT("inconsistent oversize vs. len", (oversize == 0) || (pos == len));
- 801043e: 4b8f ldr r3, [pc, #572] @ (801067c <tcp_write+0x3e8>)
- 8010440: f44f 7200 mov.w r2, #512 @ 0x200
- 8010444: 4994 ldr r1, [pc, #592] @ (8010698 <tcp_write+0x404>)
- 8010446: 488f ldr r0, [pc, #572] @ (8010684 <tcp_write+0x3f0>)
- 8010448: f002 ffde bl 8013408 <iprintf>
- 801044c: e78a b.n 8010364 <tcp_write+0xd0>
- if ((concat_p = tcp_pbuf_prealloc(PBUF_RAW, seglen, space, &oversize, pcb, apiflags, 1)) == NULL) {
- 801044e: 2301 movs r3, #1
- 8010450: 9302 str r3, [sp, #8]
- 8010452: 9b05 ldr r3, [sp, #20]
- 8010454: 9301 str r3, [sp, #4]
- 8010456: f8cd 8000 str.w r8, [sp]
- 801045a: f10d 033e add.w r3, sp, #62 @ 0x3e
- 801045e: 4622 mov r2, r4
- 8010460: 4639 mov r1, r7
- 8010462: 2000 movs r0, #0
- 8010464: f7ff fcec bl 800fe40 <tcp_pbuf_prealloc>
- 8010468: 4604 mov r4, r0
- 801046a: 900a str r0, [sp, #40] @ 0x28
- 801046c: 2800 cmp r0, #0
- 801046e: f000 81c4 beq.w 80107fa <tcp_write+0x566>
- oversize_add = oversize;
- 8010472: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e
- 8010476: 930b str r3, [sp, #44] @ 0x2c
- TCP_DATA_COPY2(concat_p->payload, (const u8_t *)arg + pos, seglen, &concat_chksum, &concat_chksum_swapped);
- 8010478: 463a mov r2, r7
- 801047a: 9b07 ldr r3, [sp, #28]
- 801047c: 9909 ldr r1, [sp, #36] @ 0x24
- 801047e: 1859 adds r1, r3, r1
- 8010480: 6840 ldr r0, [r0, #4]
- 8010482: f003 f9fe bl 8013882 <memcpy>
- queuelen += pbuf_clen(concat_p);
- 8010486: 4620 mov r0, r4
- 8010488: f7fb fe0f bl 800c0aa <pbuf_clen>
- 801048c: 1833 adds r3, r6, r0
- 801048e: b29e uxth r6, r3
- u16_t extendlen = 0;
- 8010490: 2300 movs r3, #0
- 8010492: 930d str r3, [sp, #52] @ 0x34
- 8010494: e7a0 b.n 80103d8 <tcp_write+0x144>
- LWIP_ASSERT("tcp_write: ROM pbufs cannot be oversized", pos == 0);
- 8010496: 9b09 ldr r3, [sp, #36] @ 0x24
- 8010498: b91b cbnz r3, 80104a2 <tcp_write+0x20e>
- extendlen = seglen;
- 801049a: 970d str r7, [sp, #52] @ 0x34
- u16_t oversize_add = 0;
- 801049c: 9b09 ldr r3, [sp, #36] @ 0x24
- 801049e: 930b str r3, [sp, #44] @ 0x2c
- 80104a0: e79a b.n 80103d8 <tcp_write+0x144>
- LWIP_ASSERT("tcp_write: ROM pbufs cannot be oversized", pos == 0);
- 80104a2: 4b76 ldr r3, [pc, #472] @ (801067c <tcp_write+0x3e8>)
- 80104a4: f240 2231 movw r2, #561 @ 0x231
- 80104a8: 497c ldr r1, [pc, #496] @ (801069c <tcp_write+0x408>)
- 80104aa: 4876 ldr r0, [pc, #472] @ (8010684 <tcp_write+0x3f0>)
- 80104ac: f002 ffac bl 8013408 <iprintf>
- extendlen = seglen;
- 80104b0: 970d str r7, [sp, #52] @ 0x34
- u16_t oversize_add = 0;
- 80104b2: 2300 movs r3, #0
- 80104b4: 930b str r3, [sp, #44] @ 0x2c
- 80104b6: e78f b.n 80103d8 <tcp_write+0x144>
- LWIP_ASSERT("unsent_oversize mismatch (pcb->unsent is NULL)",
- 80104b8: f8b8 4068 ldrh.w r4, [r8, #104] @ 0x68
- 80104bc: b934 cbnz r4, 80104cc <tcp_write+0x238>
- u16_t extendlen = 0;
- 80104be: 940d str r4, [sp, #52] @ 0x34
- u16_t oversize_add = 0;
- 80104c0: 940b str r4, [sp, #44] @ 0x2c
- u16_t oversize_used = 0;
- 80104c2: 9409 str r4, [sp, #36] @ 0x24
- struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL;
- 80104c4: 9b0a ldr r3, [sp, #40] @ 0x28
- 80104c6: 461f mov r7, r3
- 80104c8: 9308 str r3, [sp, #32]
- 80104ca: e0bb b.n 8010644 <tcp_write+0x3b0>
- LWIP_ASSERT("unsent_oversize mismatch (pcb->unsent is NULL)",
- 80104cc: 4b6b ldr r3, [pc, #428] @ (801067c <tcp_write+0x3e8>)
- 80104ce: f240 224a movw r2, #586 @ 0x24a
- 80104d2: 4973 ldr r1, [pc, #460] @ (80106a0 <tcp_write+0x40c>)
- 80104d4: 486b ldr r0, [pc, #428] @ (8010684 <tcp_write+0x3f0>)
- 80104d6: f002 ff97 bl 8013408 <iprintf>
- struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL;
- 80104da: 9b0a ldr r3, [sp, #40] @ 0x28
- 80104dc: 461f mov r7, r3
- 80104de: 9308 str r3, [sp, #32]
- u16_t extendlen = 0;
- 80104e0: 2400 movs r4, #0
- 80104e2: 940d str r4, [sp, #52] @ 0x34
- u16_t oversize_add = 0;
- 80104e4: 940b str r4, [sp, #44] @ 0x2c
- u16_t oversize_used = 0;
- 80104e6: 9409 str r4, [sp, #36] @ 0x24
- 80104e8: e0ac b.n 8010644 <tcp_write+0x3b0>
- if ((p = tcp_pbuf_prealloc(PBUF_TRANSPORT, seglen + optlen, mss_local, &oversize, pcb, apiflags, queue == NULL)) == NULL) {
- 80104ea: fab5 f385 clz r3, r5
- 80104ee: 095b lsrs r3, r3, #5
- 80104f0: 9302 str r3, [sp, #8]
- 80104f2: 9b05 ldr r3, [sp, #20]
- 80104f4: 9301 str r3, [sp, #4]
- 80104f6: f8cd 8000 str.w r8, [sp]
- 80104fa: f10d 033e add.w r3, sp, #62 @ 0x3e
- 80104fe: 465a mov r2, fp
- 8010500: 4649 mov r1, r9
- 8010502: 2036 movs r0, #54 @ 0x36
- 8010504: f7ff fc9c bl 800fe40 <tcp_pbuf_prealloc>
- 8010508: 4607 mov r7, r0
- 801050a: 2800 cmp r0, #0
- 801050c: d068 beq.n 80105e0 <tcp_write+0x34c>
- LWIP_ASSERT("tcp_write: check that first pbuf can hold the complete seglen",
- 801050e: 8943 ldrh r3, [r0, #10]
- 8010510: 454b cmp r3, r9
- 8010512: d306 bcc.n 8010522 <tcp_write+0x28e>
- TCP_DATA_COPY2((char *)p->payload + optlen, (const u8_t *)arg + pos, seglen, &chksum, &chksum_swapped);
- 8010514: 464a mov r2, r9
- 8010516: 9b07 ldr r3, [sp, #28]
- 8010518: 1919 adds r1, r3, r4
- 801051a: 6878 ldr r0, [r7, #4]
- 801051c: f003 f9b1 bl 8013882 <memcpy>
- 8010520: e01e b.n 8010560 <tcp_write+0x2cc>
- LWIP_ASSERT("tcp_write: check that first pbuf can hold the complete seglen",
- 8010522: 4b56 ldr r3, [pc, #344] @ (801067c <tcp_write+0x3e8>)
- 8010524: f240 2266 movw r2, #614 @ 0x266
- 8010528: 495e ldr r1, [pc, #376] @ (80106a4 <tcp_write+0x410>)
- 801052a: 4856 ldr r0, [pc, #344] @ (8010684 <tcp_write+0x3f0>)
- 801052c: f002 ff6c bl 8013408 <iprintf>
- 8010530: e7f0 b.n 8010514 <tcp_write+0x280>
- if ((p2 = pbuf_alloc(PBUF_TRANSPORT, seglen, PBUF_ROM)) == NULL) {
- 8010532: 2201 movs r2, #1
- 8010534: 4649 mov r1, r9
- 8010536: 2036 movs r0, #54 @ 0x36
- 8010538: f7fb fc9a bl 800be70 <pbuf_alloc>
- 801053c: 9006 str r0, [sp, #24]
- 801053e: 2800 cmp r0, #0
- 8010540: d04e beq.n 80105e0 <tcp_write+0x34c>
- ((struct pbuf_rom *)p2)->payload = (const u8_t *)arg + pos;
- 8010542: 9b07 ldr r3, [sp, #28]
- 8010544: 4423 add r3, r4
- 8010546: 6043 str r3, [r0, #4]
- if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) {
- 8010548: f44f 7220 mov.w r2, #640 @ 0x280
- 801054c: 2100 movs r1, #0
- 801054e: 2036 movs r0, #54 @ 0x36
- 8010550: f7fb fc8e bl 800be70 <pbuf_alloc>
- 8010554: 4607 mov r7, r0
- 8010556: 2800 cmp r0, #0
- 8010558: d03b beq.n 80105d2 <tcp_write+0x33e>
- pbuf_cat(p/*header*/, p2/*data*/);
- 801055a: 9906 ldr r1, [sp, #24]
- 801055c: f7fb fdca bl 800c0f4 <pbuf_cat>
- queuelen += pbuf_clen(p);
- 8010560: 4638 mov r0, r7
- 8010562: f7fb fda2 bl 800c0aa <pbuf_clen>
- 8010566: 4430 add r0, r6
- 8010568: b286 uxth r6, r0
- if (queuelen > LWIP_MIN(TCP_SND_QUEUELEN, TCP_SNDQUEUELEN_OVERFLOW)) {
- 801056a: 2e10 cmp r6, #16
- 801056c: d835 bhi.n 80105da <tcp_write+0x346>
- if ((seg = tcp_create_segment(pcb, p, 0, pcb->snd_lbb + pos, optflags)) == NULL) {
- 801056e: f8d8 305c ldr.w r3, [r8, #92] @ 0x5c
- 8010572: 2200 movs r2, #0
- 8010574: 9200 str r2, [sp, #0]
- 8010576: 4423 add r3, r4
- 8010578: 4639 mov r1, r7
- 801057a: 4640 mov r0, r8
- 801057c: f7ff fcbe bl 800fefc <tcp_create_segment>
- 8010580: 4607 mov r7, r0
- 8010582: b368 cbz r0, 80105e0 <tcp_write+0x34c>
- seg->oversize_left = oversize;
- 8010584: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e
- 8010588: 8143 strh r3, [r0, #10]
- if (queue == NULL) {
- 801058a: 2d00 cmp r5, #0
- 801058c: d054 beq.n 8010638 <tcp_write+0x3a4>
- LWIP_ASSERT("prev_seg != NULL", prev_seg != NULL);
- 801058e: 9b04 ldr r3, [sp, #16]
- 8010590: 2b00 cmp r3, #0
- 8010592: d049 beq.n 8010628 <tcp_write+0x394>
- prev_seg->next = seg;
- 8010594: 9b04 ldr r3, [sp, #16]
- 8010596: 601f str r7, [r3, #0]
- pos += seglen;
- 8010598: 44a1 add r9, r4
- 801059a: fa1f f489 uxth.w r4, r9
- prev_seg = seg;
- 801059e: 9704 str r7, [sp, #16]
- while (pos < len) {
- 80105a0: 4554 cmp r4, sl
- 80105a2: d258 bcs.n 8010656 <tcp_write+0x3c2>
- u16_t left = len - pos;
- 80105a4: ebaa 0904 sub.w r9, sl, r4
- 80105a8: fa1f f989 uxth.w r9, r9
- u16_t seglen = LWIP_MIN(left, max_len);
- 80105ac: 45d9 cmp r9, fp
- 80105ae: bf28 it cs
- 80105b0: 46d9 movcs r9, fp
- if (apiflags & TCP_WRITE_FLAG_COPY) {
- 80105b2: 9b05 ldr r3, [sp, #20]
- 80105b4: f013 0f01 tst.w r3, #1
- 80105b8: d197 bne.n 80104ea <tcp_write+0x256>
- LWIP_ASSERT("oversize == 0", oversize == 0);
- 80105ba: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e
- 80105be: 2b00 cmp r3, #0
- 80105c0: d0b7 beq.n 8010532 <tcp_write+0x29e>
- 80105c2: 4b2e ldr r3, [pc, #184] @ (801067c <tcp_write+0x3e8>)
- 80105c4: f240 2271 movw r2, #625 @ 0x271
- 80105c8: 4937 ldr r1, [pc, #220] @ (80106a8 <tcp_write+0x414>)
- 80105ca: 482e ldr r0, [pc, #184] @ (8010684 <tcp_write+0x3f0>)
- 80105cc: f002 ff1c bl 8013408 <iprintf>
- 80105d0: e7af b.n 8010532 <tcp_write+0x29e>
- pbuf_free(p2);
- 80105d2: 9806 ldr r0, [sp, #24]
- 80105d4: f7fb fbe4 bl 800bda0 <pbuf_free>
- goto memerr;
- 80105d8: e002 b.n 80105e0 <tcp_write+0x34c>
- pbuf_free(p);
- 80105da: 4638 mov r0, r7
- 80105dc: f7fb fbe0 bl 800bda0 <pbuf_free>
- tcp_set_flags(pcb, TF_NAGLEMEMERR);
- 80105e0: f8b8 301a ldrh.w r3, [r8, #26]
- 80105e4: f043 0380 orr.w r3, r3, #128 @ 0x80
- 80105e8: f8a8 301a strh.w r3, [r8, #26]
- if (concat_p != NULL) {
- 80105ec: 9b0a ldr r3, [sp, #40] @ 0x28
- 80105ee: b113 cbz r3, 80105f6 <tcp_write+0x362>
- pbuf_free(concat_p);
- 80105f0: 4618 mov r0, r3
- 80105f2: f7fb fbd5 bl 800bda0 <pbuf_free>
- if (queue != NULL) {
- 80105f6: b115 cbz r5, 80105fe <tcp_write+0x36a>
- tcp_segs_free(queue);
- 80105f8: 4628 mov r0, r5
- 80105fa: f7fc fee4 bl 800d3c6 <tcp_segs_free>
- if (pcb->snd_queuelen != 0) {
- 80105fe: f8b8 3066 ldrh.w r3, [r8, #102] @ 0x66
- 8010602: 2b00 cmp r3, #0
- 8010604: f000 8107 beq.w 8010816 <tcp_write+0x582>
- LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL ||
- 8010608: f8d8 3070 ldr.w r3, [r8, #112] @ 0x70
- 801060c: 2b00 cmp r3, #0
- 801060e: f040 8105 bne.w 801081c <tcp_write+0x588>
- 8010612: f8d8 306c ldr.w r3, [r8, #108] @ 0x6c
- 8010616: 2b00 cmp r3, #0
- 8010618: f000 80f3 beq.w 8010802 <tcp_write+0x56e>
- return ERR_MEM;
- 801061c: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff
- }
- 8010620: 4648 mov r0, r9
- 8010622: b011 add sp, #68 @ 0x44
- 8010624: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
- LWIP_ASSERT("prev_seg != NULL", prev_seg != NULL);
- 8010628: 4b14 ldr r3, [pc, #80] @ (801067c <tcp_write+0x3e8>)
- 801062a: f240 22ab movw r2, #683 @ 0x2ab
- 801062e: 491f ldr r1, [pc, #124] @ (80106ac <tcp_write+0x418>)
- 8010630: 4814 ldr r0, [pc, #80] @ (8010684 <tcp_write+0x3f0>)
- 8010632: f002 fee9 bl 8013408 <iprintf>
- 8010636: e7ad b.n 8010594 <tcp_write+0x300>
- queue = seg;
- 8010638: 4605 mov r5, r0
- 801063a: e7ad b.n 8010598 <tcp_write+0x304>
- 801063c: 9c09 ldr r4, [sp, #36] @ 0x24
- u16_t extendlen = 0;
- 801063e: 2300 movs r3, #0
- 8010640: 930d str r3, [sp, #52] @ 0x34
- u16_t oversize_add = 0;
- 8010642: 930b str r3, [sp, #44] @ 0x2c
- 8010644: 2500 movs r5, #0
- 8010646: 9504 str r5, [sp, #16]
- 8010648: f8cd 9030 str.w r9, [sp, #48] @ 0x30
- 801064c: e7a8 b.n 80105a0 <tcp_write+0x30c>
- u16_t extendlen = 0;
- 801064e: 9b0b ldr r3, [sp, #44] @ 0x2c
- 8010650: 930d str r3, [sp, #52] @ 0x34
- 8010652: 9c09 ldr r4, [sp, #36] @ 0x24
- 8010654: e7f6 b.n 8010644 <tcp_write+0x3b0>
- if ((last_unsent != NULL) && (oversize_add != 0)) {
- 8010656: f8dd 9030 ldr.w r9, [sp, #48] @ 0x30
- 801065a: 9a08 ldr r2, [sp, #32]
- 801065c: 990b ldr r1, [sp, #44] @ 0x2c
- 801065e: 2a00 cmp r2, #0
- 8010660: bf18 it ne
- 8010662: 2900 cmpne r1, #0
- 8010664: d002 beq.n 801066c <tcp_write+0x3d8>
- last_unsent->oversize_left += oversize_add;
- 8010666: 8953 ldrh r3, [r2, #10]
- 8010668: 440b add r3, r1
- 801066a: 8153 strh r3, [r2, #10]
- if (oversize_used > 0) {
- 801066c: 9b09 ldr r3, [sp, #36] @ 0x24
- 801066e: 2b00 cmp r3, #0
- 8010670: d03e beq.n 80106f0 <tcp_write+0x45c>
- for (p = last_unsent->p; p; p = p->next) {
- 8010672: 9a08 ldr r2, [sp, #32]
- 8010674: 6854 ldr r4, [r2, #4]
- 8010676: 469b mov fp, r3
- 8010678: e01b b.n 80106b2 <tcp_write+0x41e>
- 801067a: bf00 nop
- 801067c: 080170ec .word 0x080170ec
- 8010680: 080173e0 .word 0x080173e0
- 8010684: 080144e8 .word 0x080144e8
- 8010688: 080173f8 .word 0x080173f8
- 801068c: 0801742c .word 0x0801742c
- 8010690: 08017444 .word 0x08017444
- 8010694: 08017474 .word 0x08017474
- 8010698: 08017494 .word 0x08017494
- 801069c: 080174b4 .word 0x080174b4
- 80106a0: 080174e0 .word 0x080174e0
- 80106a4: 08017510 .word 0x08017510
- 80106a8: 08017550 .word 0x08017550
- 80106ac: 08017560 .word 0x08017560
- 80106b0: 6824 ldr r4, [r4, #0]
- 80106b2: b184 cbz r4, 80106d6 <tcp_write+0x442>
- p->tot_len += oversize_used;
- 80106b4: 8923 ldrh r3, [r4, #8]
- 80106b6: 445b add r3, fp
- 80106b8: 8123 strh r3, [r4, #8]
- if (p->next == NULL) {
- 80106ba: 6823 ldr r3, [r4, #0]
- 80106bc: 2b00 cmp r3, #0
- 80106be: d1f7 bne.n 80106b0 <tcp_write+0x41c>
- TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent);
- 80106c0: 6860 ldr r0, [r4, #4]
- 80106c2: 8963 ldrh r3, [r4, #10]
- 80106c4: 465a mov r2, fp
- 80106c6: 9907 ldr r1, [sp, #28]
- 80106c8: 4418 add r0, r3
- 80106ca: f003 f8da bl 8013882 <memcpy>
- p->len += oversize_used;
- 80106ce: 8963 ldrh r3, [r4, #10]
- 80106d0: 445b add r3, fp
- 80106d2: 8163 strh r3, [r4, #10]
- 80106d4: e7ec b.n 80106b0 <tcp_write+0x41c>
- last_unsent->len += oversize_used;
- 80106d6: 9a08 ldr r2, [sp, #32]
- 80106d8: 8913 ldrh r3, [r2, #8]
- 80106da: 9909 ldr r1, [sp, #36] @ 0x24
- 80106dc: 440b add r3, r1
- 80106de: 8113 strh r3, [r2, #8]
- LWIP_ASSERT("last_unsent->oversize_left >= oversize_used",
- 80106e0: 8953 ldrh r3, [r2, #10]
- 80106e2: 428b cmp r3, r1
- 80106e4: d342 bcc.n 801076c <tcp_write+0x4d8>
- last_unsent->oversize_left -= oversize_used;
- 80106e6: 9a08 ldr r2, [sp, #32]
- 80106e8: 8953 ldrh r3, [r2, #10]
- 80106ea: 9909 ldr r1, [sp, #36] @ 0x24
- 80106ec: 1a5b subs r3, r3, r1
- 80106ee: 8153 strh r3, [r2, #10]
- pcb->unsent_oversize = oversize;
- 80106f0: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e
- 80106f4: f8a8 3068 strh.w r3, [r8, #104] @ 0x68
- if (concat_p != NULL) {
- 80106f8: 9b0a ldr r3, [sp, #40] @ 0x28
- 80106fa: 2b00 cmp r3, #0
- 80106fc: d046 beq.n 801078c <tcp_write+0x4f8>
- LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty",
- 80106fe: 9b08 ldr r3, [sp, #32]
- 8010700: 2b00 cmp r3, #0
- 8010702: d03b beq.n 801077c <tcp_write+0x4e8>
- pbuf_cat(last_unsent->p, concat_p);
- 8010704: f8dd b028 ldr.w fp, [sp, #40] @ 0x28
- 8010708: 4659 mov r1, fp
- 801070a: 9c08 ldr r4, [sp, #32]
- 801070c: 6860 ldr r0, [r4, #4]
- 801070e: f7fb fcf1 bl 800c0f4 <pbuf_cat>
- last_unsent->len += concat_p->tot_len;
- 8010712: 8923 ldrh r3, [r4, #8]
- 8010714: f8bb 2008 ldrh.w r2, [fp, #8]
- 8010718: 4413 add r3, r2
- 801071a: 8123 strh r3, [r4, #8]
- last_unsent->next = queue;
- 801071c: 9b08 ldr r3, [sp, #32]
- 801071e: 601d str r5, [r3, #0]
- pcb->snd_lbb += len;
- 8010720: f8d8 305c ldr.w r3, [r8, #92] @ 0x5c
- 8010724: 4453 add r3, sl
- 8010726: f8c8 305c str.w r3, [r8, #92] @ 0x5c
- pcb->snd_buf -= len;
- 801072a: f8b8 3064 ldrh.w r3, [r8, #100] @ 0x64
- 801072e: eba3 030a sub.w r3, r3, sl
- 8010732: f8a8 3064 strh.w r3, [r8, #100] @ 0x64
- pcb->snd_queuelen = queuelen;
- 8010736: f8a8 6066 strh.w r6, [r8, #102] @ 0x66
- if (pcb->snd_queuelen != 0) {
- 801073a: b11e cbz r6, 8010744 <tcp_write+0x4b0>
- LWIP_ASSERT("tcp_write: valid queue length",
- 801073c: f8d8 3070 ldr.w r3, [r8, #112] @ 0x70
- 8010740: 2b00 cmp r3, #0
- 8010742: d04e beq.n 80107e2 <tcp_write+0x54e>
- if (seg != NULL && seg->tcphdr != NULL && ((apiflags & TCP_WRITE_FLAG_MORE) == 0)) {
- 8010744: 2f00 cmp r7, #0
- 8010746: f43f af6b beq.w 8010620 <tcp_write+0x38c>
- 801074a: 693b ldr r3, [r7, #16]
- 801074c: 2b00 cmp r3, #0
- 801074e: f43f af67 beq.w 8010620 <tcp_write+0x38c>
- 8010752: 9a05 ldr r2, [sp, #20]
- 8010754: f012 0f02 tst.w r2, #2
- 8010758: f47f af62 bne.w 8010620 <tcp_write+0x38c>
- TCPH_SET_FLAG(seg->tcphdr, TCP_PSH);
- 801075c: 899c ldrh r4, [r3, #12]
- 801075e: 2008 movs r0, #8
- 8010760: f7f7 fb8c bl 8007e7c <lwip_htons>
- 8010764: 693b ldr r3, [r7, #16]
- 8010766: 4304 orrs r4, r0
- 8010768: 819c strh r4, [r3, #12]
- 801076a: e759 b.n 8010620 <tcp_write+0x38c>
- LWIP_ASSERT("last_unsent->oversize_left >= oversize_used",
- 801076c: 4b2d ldr r3, [pc, #180] @ (8010824 <tcp_write+0x590>)
- 801076e: f240 22d3 movw r2, #723 @ 0x2d3
- 8010772: 492d ldr r1, [pc, #180] @ (8010828 <tcp_write+0x594>)
- 8010774: 482d ldr r0, [pc, #180] @ (801082c <tcp_write+0x598>)
- 8010776: f002 fe47 bl 8013408 <iprintf>
- 801077a: e7b4 b.n 80106e6 <tcp_write+0x452>
- LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty",
- 801077c: 4b29 ldr r3, [pc, #164] @ (8010824 <tcp_write+0x590>)
- 801077e: f44f 7238 mov.w r2, #736 @ 0x2e0
- 8010782: 492b ldr r1, [pc, #172] @ (8010830 <tcp_write+0x59c>)
- 8010784: 4829 ldr r0, [pc, #164] @ (801082c <tcp_write+0x598>)
- 8010786: f002 fe3f bl 8013408 <iprintf>
- 801078a: e7bb b.n 8010704 <tcp_write+0x470>
- } else if (extendlen > 0) {
- 801078c: 9b0d ldr r3, [sp, #52] @ 0x34
- 801078e: b313 cbz r3, 80107d6 <tcp_write+0x542>
- LWIP_ASSERT("tcp_write: extension of reference requires reference",
- 8010790: 9b08 ldr r3, [sp, #32]
- 8010792: b12b cbz r3, 80107a0 <tcp_write+0x50c>
- 8010794: 685b ldr r3, [r3, #4]
- 8010796: b11b cbz r3, 80107a0 <tcp_write+0x50c>
- for (p = last_unsent->p; p->next != NULL; p = p->next) {
- 8010798: 9b08 ldr r3, [sp, #32]
- 801079a: 685b ldr r3, [r3, #4]
- 801079c: 980d ldr r0, [sp, #52] @ 0x34
- 801079e: e00b b.n 80107b8 <tcp_write+0x524>
- LWIP_ASSERT("tcp_write: extension of reference requires reference",
- 80107a0: 4b20 ldr r3, [pc, #128] @ (8010824 <tcp_write+0x590>)
- 80107a2: f240 22e6 movw r2, #742 @ 0x2e6
- 80107a6: 4923 ldr r1, [pc, #140] @ (8010834 <tcp_write+0x5a0>)
- 80107a8: 4820 ldr r0, [pc, #128] @ (801082c <tcp_write+0x598>)
- 80107aa: f002 fe2d bl 8013408 <iprintf>
- 80107ae: e7f3 b.n 8010798 <tcp_write+0x504>
- p->tot_len += extendlen;
- 80107b0: 891a ldrh r2, [r3, #8]
- 80107b2: 4402 add r2, r0
- 80107b4: 811a strh r2, [r3, #8]
- for (p = last_unsent->p; p->next != NULL; p = p->next) {
- 80107b6: 460b mov r3, r1
- 80107b8: 6819 ldr r1, [r3, #0]
- 80107ba: 2900 cmp r1, #0
- 80107bc: d1f8 bne.n 80107b0 <tcp_write+0x51c>
- p->tot_len += extendlen;
- 80107be: 891a ldrh r2, [r3, #8]
- 80107c0: 990d ldr r1, [sp, #52] @ 0x34
- 80107c2: 440a add r2, r1
- 80107c4: 811a strh r2, [r3, #8]
- p->len += extendlen;
- 80107c6: 895a ldrh r2, [r3, #10]
- 80107c8: 440a add r2, r1
- 80107ca: 815a strh r2, [r3, #10]
- last_unsent->len += extendlen;
- 80107cc: 9a08 ldr r2, [sp, #32]
- 80107ce: 8913 ldrh r3, [r2, #8]
- 80107d0: 440b add r3, r1
- 80107d2: 8113 strh r3, [r2, #8]
- if (last_unsent == NULL) {
- 80107d4: e7a2 b.n 801071c <tcp_write+0x488>
- 80107d6: 9b08 ldr r3, [sp, #32]
- 80107d8: 2b00 cmp r3, #0
- 80107da: d19f bne.n 801071c <tcp_write+0x488>
- pcb->unsent = queue;
- 80107dc: f8c8 506c str.w r5, [r8, #108] @ 0x6c
- 80107e0: e79e b.n 8010720 <tcp_write+0x48c>
- LWIP_ASSERT("tcp_write: valid queue length",
- 80107e2: f8d8 306c ldr.w r3, [r8, #108] @ 0x6c
- 80107e6: 2b00 cmp r3, #0
- 80107e8: d1ac bne.n 8010744 <tcp_write+0x4b0>
- 80107ea: 4b0e ldr r3, [pc, #56] @ (8010824 <tcp_write+0x590>)
- 80107ec: f240 3212 movw r2, #786 @ 0x312
- 80107f0: 4911 ldr r1, [pc, #68] @ (8010838 <tcp_write+0x5a4>)
- 80107f2: 480e ldr r0, [pc, #56] @ (801082c <tcp_write+0x598>)
- 80107f4: f002 fe08 bl 8013408 <iprintf>
- 80107f8: e7a4 b.n 8010744 <tcp_write+0x4b0>
- struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL;
- 80107fa: 9d0a ldr r5, [sp, #40] @ 0x28
- 80107fc: e6f0 b.n 80105e0 <tcp_write+0x34c>
- 80107fe: 9d0a ldr r5, [sp, #40] @ 0x28
- 8010800: e6ee b.n 80105e0 <tcp_write+0x34c>
- LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL ||
- 8010802: 4b08 ldr r3, [pc, #32] @ (8010824 <tcp_write+0x590>)
- 8010804: f240 3227 movw r2, #807 @ 0x327
- 8010808: 490b ldr r1, [pc, #44] @ (8010838 <tcp_write+0x5a4>)
- 801080a: 4808 ldr r0, [pc, #32] @ (801082c <tcp_write+0x598>)
- 801080c: f002 fdfc bl 8013408 <iprintf>
- return ERR_MEM;
- 8010810: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff
- 8010814: e704 b.n 8010620 <tcp_write+0x38c>
- 8010816: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff
- 801081a: e701 b.n 8010620 <tcp_write+0x38c>
- 801081c: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff
- 8010820: e6fe b.n 8010620 <tcp_write+0x38c>
- 8010822: bf00 nop
- 8010824: 080170ec .word 0x080170ec
- 8010828: 08017574 .word 0x08017574
- 801082c: 080144e8 .word 0x080144e8
- 8010830: 080175a0 .word 0x080175a0
- 8010834: 080175d8 .word 0x080175d8
- 8010838: 08017610 .word 0x08017610
- 0801083c <tcp_split_unsent_seg>:
- {
- 801083c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 8010840: b083 sub sp, #12
- 8010842: 460c mov r4, r1
- LWIP_ASSERT("tcp_split_unsent_seg: invalid pcb", pcb != NULL);
- 8010844: 4607 mov r7, r0
- 8010846: 2800 cmp r0, #0
- 8010848: d03d beq.n 80108c6 <tcp_split_unsent_seg+0x8a>
- useg = pcb->unsent;
- 801084a: 6efd ldr r5, [r7, #108] @ 0x6c
- if (useg == NULL) {
- 801084c: 2d00 cmp r5, #0
- 801084e: f000 80bd beq.w 80109cc <tcp_split_unsent_seg+0x190>
- if (split == 0) {
- 8010852: 2c00 cmp r4, #0
- 8010854: d03f beq.n 80108d6 <tcp_split_unsent_seg+0x9a>
- if (useg->len <= split) {
- 8010856: 892b ldrh r3, [r5, #8]
- 8010858: 42a3 cmp r3, r4
- 801085a: f240 80ba bls.w 80109d2 <tcp_split_unsent_seg+0x196>
- LWIP_ASSERT("split <= mss", split <= pcb->mss);
- 801085e: 8e7b ldrh r3, [r7, #50] @ 0x32
- 8010860: 42a3 cmp r3, r4
- 8010862: d342 bcc.n 80108ea <tcp_split_unsent_seg+0xae>
- LWIP_ASSERT("useg->len > 0", useg->len > 0);
- 8010864: 892b ldrh r3, [r5, #8]
- 8010866: 2b00 cmp r3, #0
- 8010868: d047 beq.n 80108fa <tcp_split_unsent_seg+0xbe>
- optflags = useg->flags;
- 801086a: f895 900c ldrb.w r9, [r5, #12]
- optlen = LWIP_TCP_OPT_LENGTH(optflags);
- 801086e: ea4f 0b89 mov.w fp, r9, lsl #2
- 8010872: f00b 0b04 and.w fp, fp, #4
- remainder = useg->len - split;
- 8010876: f8b5 a008 ldrh.w sl, [r5, #8]
- 801087a: ebaa 0604 sub.w r6, sl, r4
- 801087e: b2b6 uxth r6, r6
- p = pbuf_alloc(PBUF_TRANSPORT, remainder + optlen, PBUF_RAM);
- 8010880: eb0b 0106 add.w r1, fp, r6
- 8010884: f44f 7220 mov.w r2, #640 @ 0x280
- 8010888: b289 uxth r1, r1
- 801088a: 2036 movs r0, #54 @ 0x36
- 801088c: f7fb faf0 bl 800be70 <pbuf_alloc>
- if (p == NULL) {
- 8010890: 4680 mov r8, r0
- 8010892: b170 cbz r0, 80108b2 <tcp_split_unsent_seg+0x76>
- offset = useg->p->tot_len - useg->len + split;
- 8010894: 6868 ldr r0, [r5, #4]
- 8010896: 8903 ldrh r3, [r0, #8]
- 8010898: 892a ldrh r2, [r5, #8]
- 801089a: 1a9b subs r3, r3, r2
- 801089c: fa14 f383 uxtah r3, r4, r3
- if (pbuf_copy_partial(useg->p, (u8_t *)p->payload + optlen, remainder, offset ) != remainder) {
- 80108a0: f8d8 1004 ldr.w r1, [r8, #4]
- 80108a4: b29b uxth r3, r3
- 80108a6: 4632 mov r2, r6
- 80108a8: 4459 add r1, fp
- 80108aa: f7fb fcfb bl 800c2a4 <pbuf_copy_partial>
- 80108ae: 42b0 cmp r0, r6
- 80108b0: d02b beq.n 801090a <tcp_split_unsent_seg+0xce>
- if (p != NULL) {
- 80108b2: f1b8 0f00 cmp.w r8, #0
- 80108b6: f000 8090 beq.w 80109da <tcp_split_unsent_seg+0x19e>
- pbuf_free(p);
- 80108ba: 4640 mov r0, r8
- 80108bc: f7fb fa70 bl 800bda0 <pbuf_free>
- return ERR_MEM;
- 80108c0: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 80108c4: e086 b.n 80109d4 <tcp_split_unsent_seg+0x198>
- LWIP_ASSERT("tcp_split_unsent_seg: invalid pcb", pcb != NULL);
- 80108c6: 4b46 ldr r3, [pc, #280] @ (80109e0 <tcp_split_unsent_seg+0x1a4>)
- 80108c8: f240 324b movw r2, #843 @ 0x34b
- 80108cc: 4945 ldr r1, [pc, #276] @ (80109e4 <tcp_split_unsent_seg+0x1a8>)
- 80108ce: 4846 ldr r0, [pc, #280] @ (80109e8 <tcp_split_unsent_seg+0x1ac>)
- 80108d0: f002 fd9a bl 8013408 <iprintf>
- 80108d4: e7b9 b.n 801084a <tcp_split_unsent_seg+0xe>
- LWIP_ASSERT("Can't split segment into length 0", 0);
- 80108d6: 4b42 ldr r3, [pc, #264] @ (80109e0 <tcp_split_unsent_seg+0x1a4>)
- 80108d8: f240 3253 movw r2, #851 @ 0x353
- 80108dc: 4943 ldr r1, [pc, #268] @ (80109ec <tcp_split_unsent_seg+0x1b0>)
- 80108de: 4842 ldr r0, [pc, #264] @ (80109e8 <tcp_split_unsent_seg+0x1ac>)
- 80108e0: f002 fd92 bl 8013408 <iprintf>
- return ERR_VAL;
- 80108e4: f06f 0005 mvn.w r0, #5
- 80108e8: e074 b.n 80109d4 <tcp_split_unsent_seg+0x198>
- LWIP_ASSERT("split <= mss", split <= pcb->mss);
- 80108ea: 4b3d ldr r3, [pc, #244] @ (80109e0 <tcp_split_unsent_seg+0x1a4>)
- 80108ec: f240 325b movw r2, #859 @ 0x35b
- 80108f0: 493f ldr r1, [pc, #252] @ (80109f0 <tcp_split_unsent_seg+0x1b4>)
- 80108f2: 483d ldr r0, [pc, #244] @ (80109e8 <tcp_split_unsent_seg+0x1ac>)
- 80108f4: f002 fd88 bl 8013408 <iprintf>
- 80108f8: e7b4 b.n 8010864 <tcp_split_unsent_seg+0x28>
- LWIP_ASSERT("useg->len > 0", useg->len > 0);
- 80108fa: 4b39 ldr r3, [pc, #228] @ (80109e0 <tcp_split_unsent_seg+0x1a4>)
- 80108fc: f44f 7257 mov.w r2, #860 @ 0x35c
- 8010900: 493c ldr r1, [pc, #240] @ (80109f4 <tcp_split_unsent_seg+0x1b8>)
- 8010902: 4839 ldr r0, [pc, #228] @ (80109e8 <tcp_split_unsent_seg+0x1ac>)
- 8010904: f002 fd80 bl 8013408 <iprintf>
- 8010908: e7af b.n 801086a <tcp_split_unsent_seg+0x2e>
- split_flags = TCPH_FLAGS(useg->tcphdr);
- 801090a: 692b ldr r3, [r5, #16]
- 801090c: 8998 ldrh r0, [r3, #12]
- 801090e: f7f7 fab5 bl 8007e7c <lwip_htons>
- 8010912: b2c3 uxtb r3, r0
- 8010914: f000 063f and.w r6, r0, #63 @ 0x3f
- if (split_flags & TCP_PSH) {
- 8010918: f010 0b08 ands.w fp, r0, #8
- 801091c: d003 beq.n 8010926 <tcp_split_unsent_seg+0xea>
- split_flags &= ~TCP_PSH;
- 801091e: f003 0637 and.w r6, r3, #55 @ 0x37
- remainder_flags |= TCP_PSH;
- 8010922: f04f 0b08 mov.w fp, #8
- if (split_flags & TCP_FIN) {
- 8010926: f016 0f01 tst.w r6, #1
- 801092a: d003 beq.n 8010934 <tcp_split_unsent_seg+0xf8>
- split_flags &= ~TCP_FIN;
- 801092c: f006 06fe and.w r6, r6, #254 @ 0xfe
- remainder_flags |= TCP_FIN;
- 8010930: f04b 0b01 orr.w fp, fp, #1
- seg = tcp_create_segment(pcb, p, remainder_flags, lwip_ntohl(useg->tcphdr->seqno) + split, optflags);
- 8010934: 692b ldr r3, [r5, #16]
- 8010936: 6858 ldr r0, [r3, #4]
- 8010938: f7f7 faa5 bl 8007e86 <lwip_htonl>
- 801093c: f8cd 9000 str.w r9, [sp]
- 8010940: 1823 adds r3, r4, r0
- 8010942: 465a mov r2, fp
- 8010944: 4641 mov r1, r8
- 8010946: 4638 mov r0, r7
- 8010948: f7ff fad8 bl 800fefc <tcp_create_segment>
- if (seg == NULL) {
- 801094c: 4681 mov r9, r0
- 801094e: 2800 cmp r0, #0
- 8010950: d0af beq.n 80108b2 <tcp_split_unsent_seg+0x76>
- pcb->snd_queuelen -= pbuf_clen(useg->p);
- 8010952: 6868 ldr r0, [r5, #4]
- 8010954: f7fb fba9 bl 800c0aa <pbuf_clen>
- 8010958: f8b7 3066 ldrh.w r3, [r7, #102] @ 0x66
- 801095c: 1a1b subs r3, r3, r0
- 801095e: f8a7 3066 strh.w r3, [r7, #102] @ 0x66
- pbuf_realloc(useg->p, useg->p->tot_len - remainder);
- 8010962: 6868 ldr r0, [r5, #4]
- 8010964: 8901 ldrh r1, [r0, #8]
- 8010966: eba4 040a sub.w r4, r4, sl
- 801096a: b2a4 uxth r4, r4
- 801096c: 4421 add r1, r4
- 801096e: b289 uxth r1, r1
- 8010970: f7fb fb2c bl 800bfcc <pbuf_realloc>
- useg->len -= remainder;
- 8010974: 892b ldrh r3, [r5, #8]
- 8010976: 4423 add r3, r4
- 8010978: 812b strh r3, [r5, #8]
- TCPH_SET_FLAG(useg->tcphdr, split_flags);
- 801097a: 692b ldr r3, [r5, #16]
- 801097c: 899c ldrh r4, [r3, #12]
- 801097e: 4630 mov r0, r6
- 8010980: f7f7 fa7c bl 8007e7c <lwip_htons>
- 8010984: 692b ldr r3, [r5, #16]
- 8010986: 4304 orrs r4, r0
- 8010988: 819c strh r4, [r3, #12]
- useg->oversize_left = 0;
- 801098a: 2300 movs r3, #0
- 801098c: 816b strh r3, [r5, #10]
- pcb->snd_queuelen += pbuf_clen(useg->p);
- 801098e: 6868 ldr r0, [r5, #4]
- 8010990: f7fb fb8b bl 800c0aa <pbuf_clen>
- 8010994: f8b7 3066 ldrh.w r3, [r7, #102] @ 0x66
- 8010998: 4403 add r3, r0
- 801099a: f8a7 3066 strh.w r3, [r7, #102] @ 0x66
- pcb->snd_queuelen += pbuf_clen(seg->p);
- 801099e: f8d9 0004 ldr.w r0, [r9, #4]
- 80109a2: f7fb fb82 bl 800c0aa <pbuf_clen>
- 80109a6: f8b7 3066 ldrh.w r3, [r7, #102] @ 0x66
- 80109aa: 4403 add r3, r0
- 80109ac: f8a7 3066 strh.w r3, [r7, #102] @ 0x66
- seg->next = useg->next;
- 80109b0: 682b ldr r3, [r5, #0]
- 80109b2: f8c9 3000 str.w r3, [r9]
- useg->next = seg;
- 80109b6: f8c5 9000 str.w r9, [r5]
- if (seg->next == NULL) {
- 80109ba: f8d9 3000 ldr.w r3, [r9]
- 80109be: b10b cbz r3, 80109c4 <tcp_split_unsent_seg+0x188>
- return ERR_OK;
- 80109c0: 2000 movs r0, #0
- 80109c2: e007 b.n 80109d4 <tcp_split_unsent_seg+0x198>
- pcb->unsent_oversize = 0;
- 80109c4: 2000 movs r0, #0
- 80109c6: f8a7 0068 strh.w r0, [r7, #104] @ 0x68
- 80109ca: e003 b.n 80109d4 <tcp_split_unsent_seg+0x198>
- return ERR_MEM;
- 80109cc: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 80109d0: e000 b.n 80109d4 <tcp_split_unsent_seg+0x198>
- return ERR_OK;
- 80109d2: 2000 movs r0, #0
- }
- 80109d4: b003 add sp, #12
- 80109d6: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
- return ERR_MEM;
- 80109da: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 80109de: e7f9 b.n 80109d4 <tcp_split_unsent_seg+0x198>
- 80109e0: 080170ec .word 0x080170ec
- 80109e4: 08017630 .word 0x08017630
- 80109e8: 080144e8 .word 0x080144e8
- 80109ec: 08017654 .word 0x08017654
- 80109f0: 08017678 .word 0x08017678
- 80109f4: 08017688 .word 0x08017688
- 080109f8 <tcp_enqueue_flags>:
- {
- 80109f8: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr}
- 80109fc: b083 sub sp, #12
- 80109fe: 4604 mov r4, r0
- 8010a00: 460d mov r5, r1
- LWIP_ASSERT("tcp_enqueue_flags: need either TCP_SYN or TCP_FIN in flags (programmer violates API)",
- 8010a02: f011 0703 ands.w r7, r1, #3
- 8010a06: d04e beq.n 8010aa6 <tcp_enqueue_flags+0xae>
- LWIP_ASSERT("tcp_enqueue_flags: invalid pcb", pcb != NULL);
- 8010a08: 2c00 cmp r4, #0
- 8010a0a: d054 beq.n 8010ab6 <tcp_enqueue_flags+0xbe>
- if (flags & TCP_SYN) {
- 8010a0c: f015 0802 ands.w r8, r5, #2
- 8010a10: d001 beq.n 8010a16 <tcp_enqueue_flags+0x1e>
- optflags = TF_SEG_OPTS_MSS;
- 8010a12: f04f 0801 mov.w r8, #1
- optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb);
- 8010a16: ea4f 0688 mov.w r6, r8, lsl #2
- 8010a1a: f006 0604 and.w r6, r6, #4
- if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) {
- 8010a1e: f44f 7220 mov.w r2, #640 @ 0x280
- 8010a22: 4631 mov r1, r6
- 8010a24: 2036 movs r0, #54 @ 0x36
- 8010a26: f7fb fa23 bl 800be70 <pbuf_alloc>
- 8010a2a: 4681 mov r9, r0
- 8010a2c: 2800 cmp r0, #0
- 8010a2e: d04a beq.n 8010ac6 <tcp_enqueue_flags+0xce>
- LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen",
- 8010a30: 8943 ldrh r3, [r0, #10]
- 8010a32: 429e cmp r6, r3
- 8010a34: d84e bhi.n 8010ad4 <tcp_enqueue_flags+0xdc>
- if ((seg = tcp_create_segment(pcb, p, flags, pcb->snd_lbb, optflags)) == NULL) {
- 8010a36: f8cd 8000 str.w r8, [sp]
- 8010a3a: 6de3 ldr r3, [r4, #92] @ 0x5c
- 8010a3c: 462a mov r2, r5
- 8010a3e: 4649 mov r1, r9
- 8010a40: 4620 mov r0, r4
- 8010a42: f7ff fa5b bl 800fefc <tcp_create_segment>
- 8010a46: 4606 mov r6, r0
- 8010a48: 2800 cmp r0, #0
- 8010a4a: d04b beq.n 8010ae4 <tcp_enqueue_flags+0xec>
- LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0);
- 8010a4c: 6903 ldr r3, [r0, #16]
- 8010a4e: f013 0f03 tst.w r3, #3
- 8010a52: d14e bne.n 8010af2 <tcp_enqueue_flags+0xfa>
- LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0);
- 8010a54: 8933 ldrh r3, [r6, #8]
- 8010a56: 2b00 cmp r3, #0
- 8010a58: d153 bne.n 8010b02 <tcp_enqueue_flags+0x10a>
- if (pcb->unsent == NULL) {
- 8010a5a: 6ee3 ldr r3, [r4, #108] @ 0x6c
- 8010a5c: 2b00 cmp r3, #0
- 8010a5e: d058 beq.n 8010b12 <tcp_enqueue_flags+0x11a>
- for (useg = pcb->unsent; useg->next != NULL; useg = useg->next);
- 8010a60: 461a mov r2, r3
- 8010a62: 681b ldr r3, [r3, #0]
- 8010a64: 2b00 cmp r3, #0
- 8010a66: d1fb bne.n 8010a60 <tcp_enqueue_flags+0x68>
- useg->next = seg;
- 8010a68: 6016 str r6, [r2, #0]
- pcb->unsent_oversize = 0;
- 8010a6a: 2300 movs r3, #0
- 8010a6c: f8a4 3068 strh.w r3, [r4, #104] @ 0x68
- if ((flags & TCP_SYN) || (flags & TCP_FIN)) {
- 8010a70: b117 cbz r7, 8010a78 <tcp_enqueue_flags+0x80>
- pcb->snd_lbb++;
- 8010a72: 6de3 ldr r3, [r4, #92] @ 0x5c
- 8010a74: 3301 adds r3, #1
- 8010a76: 65e3 str r3, [r4, #92] @ 0x5c
- if (flags & TCP_FIN) {
- 8010a78: f015 0f01 tst.w r5, #1
- 8010a7c: d003 beq.n 8010a86 <tcp_enqueue_flags+0x8e>
- tcp_set_flags(pcb, TF_FIN);
- 8010a7e: 8b63 ldrh r3, [r4, #26]
- 8010a80: f043 0320 orr.w r3, r3, #32
- 8010a84: 8363 strh r3, [r4, #26]
- pcb->snd_queuelen += pbuf_clen(seg->p);
- 8010a86: 6870 ldr r0, [r6, #4]
- 8010a88: f7fb fb0f bl 800c0aa <pbuf_clen>
- 8010a8c: f8b4 3066 ldrh.w r3, [r4, #102] @ 0x66
- 8010a90: 4418 add r0, r3
- 8010a92: b280 uxth r0, r0
- 8010a94: f8a4 0066 strh.w r0, [r4, #102] @ 0x66
- if (pcb->snd_queuelen != 0) {
- 8010a98: 2800 cmp r0, #0
- 8010a9a: d049 beq.n 8010b30 <tcp_enqueue_flags+0x138>
- LWIP_ASSERT("tcp_enqueue_flags: invalid queue length",
- 8010a9c: 6f23 ldr r3, [r4, #112] @ 0x70
- 8010a9e: 2b00 cmp r3, #0
- 8010aa0: d039 beq.n 8010b16 <tcp_enqueue_flags+0x11e>
- return ERR_OK;
- 8010aa2: 2000 movs r0, #0
- 8010aa4: e045 b.n 8010b32 <tcp_enqueue_flags+0x13a>
- LWIP_ASSERT("tcp_enqueue_flags: need either TCP_SYN or TCP_FIN in flags (programmer violates API)",
- 8010aa6: 4b24 ldr r3, [pc, #144] @ (8010b38 <tcp_enqueue_flags+0x140>)
- 8010aa8: f240 4211 movw r2, #1041 @ 0x411
- 8010aac: 4923 ldr r1, [pc, #140] @ (8010b3c <tcp_enqueue_flags+0x144>)
- 8010aae: 4824 ldr r0, [pc, #144] @ (8010b40 <tcp_enqueue_flags+0x148>)
- 8010ab0: f002 fcaa bl 8013408 <iprintf>
- 8010ab4: e7a8 b.n 8010a08 <tcp_enqueue_flags+0x10>
- LWIP_ASSERT("tcp_enqueue_flags: invalid pcb", pcb != NULL);
- 8010ab6: 4b20 ldr r3, [pc, #128] @ (8010b38 <tcp_enqueue_flags+0x140>)
- 8010ab8: f240 4213 movw r2, #1043 @ 0x413
- 8010abc: 4921 ldr r1, [pc, #132] @ (8010b44 <tcp_enqueue_flags+0x14c>)
- 8010abe: 4820 ldr r0, [pc, #128] @ (8010b40 <tcp_enqueue_flags+0x148>)
- 8010ac0: f002 fca2 bl 8013408 <iprintf>
- 8010ac4: e7a2 b.n 8010a0c <tcp_enqueue_flags+0x14>
- tcp_set_flags(pcb, TF_NAGLEMEMERR);
- 8010ac6: 8b63 ldrh r3, [r4, #26]
- 8010ac8: f043 0380 orr.w r3, r3, #128 @ 0x80
- 8010acc: 8363 strh r3, [r4, #26]
- return ERR_MEM;
- 8010ace: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8010ad2: e02e b.n 8010b32 <tcp_enqueue_flags+0x13a>
- LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen",
- 8010ad4: 4b18 ldr r3, [pc, #96] @ (8010b38 <tcp_enqueue_flags+0x140>)
- 8010ad6: f240 4239 movw r2, #1081 @ 0x439
- 8010ada: 491b ldr r1, [pc, #108] @ (8010b48 <tcp_enqueue_flags+0x150>)
- 8010adc: 4818 ldr r0, [pc, #96] @ (8010b40 <tcp_enqueue_flags+0x148>)
- 8010ade: f002 fc93 bl 8013408 <iprintf>
- 8010ae2: e7a8 b.n 8010a36 <tcp_enqueue_flags+0x3e>
- tcp_set_flags(pcb, TF_NAGLEMEMERR);
- 8010ae4: 8b63 ldrh r3, [r4, #26]
- 8010ae6: f043 0380 orr.w r3, r3, #128 @ 0x80
- 8010aea: 8363 strh r3, [r4, #26]
- return ERR_MEM;
- 8010aec: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8010af0: e01f b.n 8010b32 <tcp_enqueue_flags+0x13a>
- LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0);
- 8010af2: 4b11 ldr r3, [pc, #68] @ (8010b38 <tcp_enqueue_flags+0x140>)
- 8010af4: f240 4242 movw r2, #1090 @ 0x442
- 8010af8: 4914 ldr r1, [pc, #80] @ (8010b4c <tcp_enqueue_flags+0x154>)
- 8010afa: 4811 ldr r0, [pc, #68] @ (8010b40 <tcp_enqueue_flags+0x148>)
- 8010afc: f002 fc84 bl 8013408 <iprintf>
- 8010b00: e7a8 b.n 8010a54 <tcp_enqueue_flags+0x5c>
- LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0);
- 8010b02: 4b0d ldr r3, [pc, #52] @ (8010b38 <tcp_enqueue_flags+0x140>)
- 8010b04: f240 4243 movw r2, #1091 @ 0x443
- 8010b08: 4911 ldr r1, [pc, #68] @ (8010b50 <tcp_enqueue_flags+0x158>)
- 8010b0a: 480d ldr r0, [pc, #52] @ (8010b40 <tcp_enqueue_flags+0x148>)
- 8010b0c: f002 fc7c bl 8013408 <iprintf>
- 8010b10: e7a3 b.n 8010a5a <tcp_enqueue_flags+0x62>
- pcb->unsent = seg;
- 8010b12: 66e6 str r6, [r4, #108] @ 0x6c
- 8010b14: e7a9 b.n 8010a6a <tcp_enqueue_flags+0x72>
- LWIP_ASSERT("tcp_enqueue_flags: invalid queue length",
- 8010b16: 6ee3 ldr r3, [r4, #108] @ 0x6c
- 8010b18: b10b cbz r3, 8010b1e <tcp_enqueue_flags+0x126>
- return ERR_OK;
- 8010b1a: 2000 movs r0, #0
- 8010b1c: e009 b.n 8010b32 <tcp_enqueue_flags+0x13a>
- LWIP_ASSERT("tcp_enqueue_flags: invalid queue length",
- 8010b1e: 4b06 ldr r3, [pc, #24] @ (8010b38 <tcp_enqueue_flags+0x140>)
- 8010b20: f240 4265 movw r2, #1125 @ 0x465
- 8010b24: 490b ldr r1, [pc, #44] @ (8010b54 <tcp_enqueue_flags+0x15c>)
- 8010b26: 4806 ldr r0, [pc, #24] @ (8010b40 <tcp_enqueue_flags+0x148>)
- 8010b28: f002 fc6e bl 8013408 <iprintf>
- return ERR_OK;
- 8010b2c: 2000 movs r0, #0
- 8010b2e: e000 b.n 8010b32 <tcp_enqueue_flags+0x13a>
- 8010b30: 2000 movs r0, #0
- }
- 8010b32: b003 add sp, #12
- 8010b34: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
- 8010b38: 080170ec .word 0x080170ec
- 8010b3c: 08017698 .word 0x08017698
- 8010b40: 080144e8 .word 0x080144e8
- 8010b44: 080176f0 .word 0x080176f0
- 8010b48: 08017710 .word 0x08017710
- 8010b4c: 0801774c .word 0x0801774c
- 8010b50: 08017764 .word 0x08017764
- 8010b54: 08017790 .word 0x08017790
- 08010b58 <tcp_send_fin>:
- {
- 8010b58: b570 push {r4, r5, r6, lr}
- LWIP_ASSERT("tcp_send_fin: invalid pcb", pcb != NULL);
- 8010b5a: 4605 mov r5, r0
- 8010b5c: b188 cbz r0, 8010b82 <tcp_send_fin+0x2a>
- if (pcb->unsent != NULL) {
- 8010b5e: 6eeb ldr r3, [r5, #108] @ 0x6c
- 8010b60: b153 cbz r3, 8010b78 <tcp_send_fin+0x20>
- for (last_unsent = pcb->unsent; last_unsent->next != NULL;
- 8010b62: 461c mov r4, r3
- 8010b64: 681b ldr r3, [r3, #0]
- 8010b66: 2b00 cmp r3, #0
- 8010b68: d1fb bne.n 8010b62 <tcp_send_fin+0xa>
- if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) {
- 8010b6a: 6923 ldr r3, [r4, #16]
- 8010b6c: 8998 ldrh r0, [r3, #12]
- 8010b6e: f7f7 f985 bl 8007e7c <lwip_htons>
- 8010b72: f010 0f07 tst.w r0, #7
- 8010b76: d00c beq.n 8010b92 <tcp_send_fin+0x3a>
- return tcp_enqueue_flags(pcb, TCP_FIN);
- 8010b78: 2101 movs r1, #1
- 8010b7a: 4628 mov r0, r5
- 8010b7c: f7ff ff3c bl 80109f8 <tcp_enqueue_flags>
- }
- 8010b80: bd70 pop {r4, r5, r6, pc}
- LWIP_ASSERT("tcp_send_fin: invalid pcb", pcb != NULL);
- 8010b82: 4b0b ldr r3, [pc, #44] @ (8010bb0 <tcp_send_fin+0x58>)
- 8010b84: f240 32eb movw r2, #1003 @ 0x3eb
- 8010b88: 490a ldr r1, [pc, #40] @ (8010bb4 <tcp_send_fin+0x5c>)
- 8010b8a: 480b ldr r0, [pc, #44] @ (8010bb8 <tcp_send_fin+0x60>)
- 8010b8c: f002 fc3c bl 8013408 <iprintf>
- 8010b90: e7e5 b.n 8010b5e <tcp_send_fin+0x6>
- TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN);
- 8010b92: 6923 ldr r3, [r4, #16]
- 8010b94: 899e ldrh r6, [r3, #12]
- 8010b96: 2001 movs r0, #1
- 8010b98: f7f7 f970 bl 8007e7c <lwip_htons>
- 8010b9c: 6923 ldr r3, [r4, #16]
- 8010b9e: 4306 orrs r6, r0
- 8010ba0: 819e strh r6, [r3, #12]
- tcp_set_flags(pcb, TF_FIN);
- 8010ba2: 8b6b ldrh r3, [r5, #26]
- 8010ba4: f043 0320 orr.w r3, r3, #32
- 8010ba8: 836b strh r3, [r5, #26]
- return ERR_OK;
- 8010baa: 2000 movs r0, #0
- 8010bac: e7e8 b.n 8010b80 <tcp_send_fin+0x28>
- 8010bae: bf00 nop
- 8010bb0: 080170ec .word 0x080170ec
- 8010bb4: 080177b8 .word 0x080177b8
- 8010bb8: 080144e8 .word 0x080144e8
- 08010bbc <tcp_rexmit_rto_prepare>:
- {
- 8010bbc: b5f8 push {r3, r4, r5, r6, r7, lr}
- LWIP_ASSERT("tcp_rexmit_rto_prepare: invalid pcb", pcb != NULL);
- 8010bbe: 4605 mov r5, r0
- 8010bc0: b158 cbz r0, 8010bda <tcp_rexmit_rto_prepare+0x1e>
- if (pcb->unacked == NULL) {
- 8010bc2: 6f2c ldr r4, [r5, #112] @ 0x70
- 8010bc4: 2c00 cmp r4, #0
- 8010bc6: d039 beq.n 8010c3c <tcp_rexmit_rto_prepare+0x80>
- for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) {
- 8010bc8: 6823 ldr r3, [r4, #0]
- 8010bca: b173 cbz r3, 8010bea <tcp_rexmit_rto_prepare+0x2e>
- if (tcp_output_segment_busy(seg)) {
- 8010bcc: 4620 mov r0, r4
- 8010bce: f7ff f8f7 bl 800fdc0 <tcp_output_segment_busy>
- 8010bd2: 2800 cmp r0, #0
- 8010bd4: d135 bne.n 8010c42 <tcp_rexmit_rto_prepare+0x86>
- for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) {
- 8010bd6: 6824 ldr r4, [r4, #0]
- 8010bd8: e7f6 b.n 8010bc8 <tcp_rexmit_rto_prepare+0xc>
- LWIP_ASSERT("tcp_rexmit_rto_prepare: invalid pcb", pcb != NULL);
- 8010bda: 4b1d ldr r3, [pc, #116] @ (8010c50 <tcp_rexmit_rto_prepare+0x94>)
- 8010bdc: f240 6263 movw r2, #1635 @ 0x663
- 8010be0: 491c ldr r1, [pc, #112] @ (8010c54 <tcp_rexmit_rto_prepare+0x98>)
- 8010be2: 481d ldr r0, [pc, #116] @ (8010c58 <tcp_rexmit_rto_prepare+0x9c>)
- 8010be4: f002 fc10 bl 8013408 <iprintf>
- 8010be8: e7eb b.n 8010bc2 <tcp_rexmit_rto_prepare+0x6>
- if (tcp_output_segment_busy(seg)) {
- 8010bea: 4620 mov r0, r4
- 8010bec: f7ff f8e8 bl 800fdc0 <tcp_output_segment_busy>
- 8010bf0: bb50 cbnz r0, 8010c48 <tcp_rexmit_rto_prepare+0x8c>
- seg->next = pcb->unsent;
- 8010bf2: 6eeb ldr r3, [r5, #108] @ 0x6c
- 8010bf4: 6023 str r3, [r4, #0]
- if (pcb->unsent == NULL) {
- 8010bf6: b1db cbz r3, 8010c30 <tcp_rexmit_rto_prepare+0x74>
- pcb->unsent = pcb->unacked;
- 8010bf8: 6f2b ldr r3, [r5, #112] @ 0x70
- 8010bfa: 66eb str r3, [r5, #108] @ 0x6c
- pcb->unacked = NULL;
- 8010bfc: 2300 movs r3, #0
- 8010bfe: 672b str r3, [r5, #112] @ 0x70
- tcp_set_flags(pcb, TF_RTO);
- 8010c00: 8b6b ldrh r3, [r5, #26]
- 8010c02: f443 6300 orr.w r3, r3, #2048 @ 0x800
- 8010c06: 836b strh r3, [r5, #26]
- pcb->rto_end = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
- 8010c08: 6923 ldr r3, [r4, #16]
- 8010c0a: 6858 ldr r0, [r3, #4]
- 8010c0c: f7f7 f93b bl 8007e86 <lwip_htonl>
- 8010c10: 4606 mov r6, r0
- 8010c12: 8927 ldrh r7, [r4, #8]
- 8010c14: 6923 ldr r3, [r4, #16]
- 8010c16: 8998 ldrh r0, [r3, #12]
- 8010c18: f7f7 f930 bl 8007e7c <lwip_htons>
- 8010c1c: f010 0f03 tst.w r0, #3
- 8010c20: d00a beq.n 8010c38 <tcp_rexmit_rto_prepare+0x7c>
- 8010c22: 2301 movs r3, #1
- 8010c24: 441f add r7, r3
- 8010c26: 443e add r6, r7
- 8010c28: 64ee str r6, [r5, #76] @ 0x4c
- pcb->rttest = 0;
- 8010c2a: 2000 movs r0, #0
- 8010c2c: 6368 str r0, [r5, #52] @ 0x34
- }
- 8010c2e: bdf8 pop {r3, r4, r5, r6, r7, pc}
- pcb->unsent_oversize = seg->oversize_left;
- 8010c30: 8963 ldrh r3, [r4, #10]
- 8010c32: f8a5 3068 strh.w r3, [r5, #104] @ 0x68
- 8010c36: e7df b.n 8010bf8 <tcp_rexmit_rto_prepare+0x3c>
- pcb->rto_end = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
- 8010c38: 2300 movs r3, #0
- 8010c3a: e7f3 b.n 8010c24 <tcp_rexmit_rto_prepare+0x68>
- return ERR_VAL;
- 8010c3c: f06f 0005 mvn.w r0, #5
- 8010c40: e7f5 b.n 8010c2e <tcp_rexmit_rto_prepare+0x72>
- return ERR_VAL;
- 8010c42: f06f 0005 mvn.w r0, #5
- 8010c46: e7f2 b.n 8010c2e <tcp_rexmit_rto_prepare+0x72>
- return ERR_VAL;
- 8010c48: f06f 0005 mvn.w r0, #5
- 8010c4c: e7ef b.n 8010c2e <tcp_rexmit_rto_prepare+0x72>
- 8010c4e: bf00 nop
- 8010c50: 080170ec .word 0x080170ec
- 8010c54: 080177d4 .word 0x080177d4
- 8010c58: 080144e8 .word 0x080144e8
- 08010c5c <tcp_rexmit>:
- {
- 8010c5c: b5f8 push {r3, r4, r5, r6, r7, lr}
- LWIP_ASSERT("tcp_rexmit: invalid pcb", pcb != NULL);
- 8010c5e: 4607 mov r7, r0
- 8010c60: b150 cbz r0, 8010c78 <tcp_rexmit+0x1c>
- if (pcb->unacked == NULL) {
- 8010c62: 6f3e ldr r6, [r7, #112] @ 0x70
- 8010c64: b38e cbz r6, 8010cca <tcp_rexmit+0x6e>
- if (tcp_output_segment_busy(seg)) {
- 8010c66: 4630 mov r0, r6
- 8010c68: f7ff f8aa bl 800fdc0 <tcp_output_segment_busy>
- 8010c6c: bb80 cbnz r0, 8010cd0 <tcp_rexmit+0x74>
- pcb->unacked = seg->next;
- 8010c6e: 6833 ldr r3, [r6, #0]
- 8010c70: 673b str r3, [r7, #112] @ 0x70
- cur_seg = &(pcb->unsent);
- 8010c72: f107 056c add.w r5, r7, #108 @ 0x6c
- while (*cur_seg &&
- 8010c76: e008 b.n 8010c8a <tcp_rexmit+0x2e>
- LWIP_ASSERT("tcp_rexmit: invalid pcb", pcb != NULL);
- 8010c78: 4b17 ldr r3, [pc, #92] @ (8010cd8 <tcp_rexmit+0x7c>)
- 8010c7a: f240 62c1 movw r2, #1729 @ 0x6c1
- 8010c7e: 4917 ldr r1, [pc, #92] @ (8010cdc <tcp_rexmit+0x80>)
- 8010c80: 4817 ldr r0, [pc, #92] @ (8010ce0 <tcp_rexmit+0x84>)
- 8010c82: f002 fbc1 bl 8013408 <iprintf>
- 8010c86: e7ec b.n 8010c62 <tcp_rexmit+0x6>
- cur_seg = &((*cur_seg)->next );
- 8010c88: 682d ldr r5, [r5, #0]
- while (*cur_seg &&
- 8010c8a: 682b ldr r3, [r5, #0]
- 8010c8c: b15b cbz r3, 8010ca6 <tcp_rexmit+0x4a>
- TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
- 8010c8e: 691b ldr r3, [r3, #16]
- 8010c90: 6858 ldr r0, [r3, #4]
- 8010c92: f7f7 f8f8 bl 8007e86 <lwip_htonl>
- 8010c96: 4604 mov r4, r0
- 8010c98: 6933 ldr r3, [r6, #16]
- 8010c9a: 6858 ldr r0, [r3, #4]
- 8010c9c: f7f7 f8f3 bl 8007e86 <lwip_htonl>
- 8010ca0: 1a24 subs r4, r4, r0
- while (*cur_seg &&
- 8010ca2: 2c00 cmp r4, #0
- 8010ca4: dbf0 blt.n 8010c88 <tcp_rexmit+0x2c>
- seg->next = *cur_seg;
- 8010ca6: 682b ldr r3, [r5, #0]
- 8010ca8: 6033 str r3, [r6, #0]
- *cur_seg = seg;
- 8010caa: 602e str r6, [r5, #0]
- if (seg->next == NULL) {
- 8010cac: 6833 ldr r3, [r6, #0]
- 8010cae: b14b cbz r3, 8010cc4 <tcp_rexmit+0x68>
- if (pcb->nrtx < 0xFF) {
- 8010cb0: f897 3042 ldrb.w r3, [r7, #66] @ 0x42
- 8010cb4: 2bff cmp r3, #255 @ 0xff
- 8010cb6: d002 beq.n 8010cbe <tcp_rexmit+0x62>
- ++pcb->nrtx;
- 8010cb8: 3301 adds r3, #1
- 8010cba: f887 3042 strb.w r3, [r7, #66] @ 0x42
- pcb->rttest = 0;
- 8010cbe: 2000 movs r0, #0
- 8010cc0: 6378 str r0, [r7, #52] @ 0x34
- }
- 8010cc2: bdf8 pop {r3, r4, r5, r6, r7, pc}
- pcb->unsent_oversize = 0;
- 8010cc4: f8a7 3068 strh.w r3, [r7, #104] @ 0x68
- 8010cc8: e7f2 b.n 8010cb0 <tcp_rexmit+0x54>
- return ERR_VAL;
- 8010cca: f06f 0005 mvn.w r0, #5
- 8010cce: e7f8 b.n 8010cc2 <tcp_rexmit+0x66>
- return ERR_VAL;
- 8010cd0: f06f 0005 mvn.w r0, #5
- 8010cd4: e7f5 b.n 8010cc2 <tcp_rexmit+0x66>
- 8010cd6: bf00 nop
- 8010cd8: 080170ec .word 0x080170ec
- 8010cdc: 080177f8 .word 0x080177f8
- 8010ce0: 080144e8 .word 0x080144e8
- 08010ce4 <tcp_rexmit_fast>:
- {
- 8010ce4: b510 push {r4, lr}
- LWIP_ASSERT("tcp_rexmit_fast: invalid pcb", pcb != NULL);
- 8010ce6: 4604 mov r4, r0
- 8010ce8: b130 cbz r0, 8010cf8 <tcp_rexmit_fast+0x14>
- if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) {
- 8010cea: 6f23 ldr r3, [r4, #112] @ 0x70
- 8010cec: b11b cbz r3, 8010cf6 <tcp_rexmit_fast+0x12>
- 8010cee: 8b63 ldrh r3, [r4, #26]
- 8010cf0: f013 0f04 tst.w r3, #4
- 8010cf4: d008 beq.n 8010d08 <tcp_rexmit_fast+0x24>
- }
- 8010cf6: bd10 pop {r4, pc}
- LWIP_ASSERT("tcp_rexmit_fast: invalid pcb", pcb != NULL);
- 8010cf8: 4b16 ldr r3, [pc, #88] @ (8010d54 <tcp_rexmit_fast+0x70>)
- 8010cfa: f240 62f9 movw r2, #1785 @ 0x6f9
- 8010cfe: 4916 ldr r1, [pc, #88] @ (8010d58 <tcp_rexmit_fast+0x74>)
- 8010d00: 4816 ldr r0, [pc, #88] @ (8010d5c <tcp_rexmit_fast+0x78>)
- 8010d02: f002 fb81 bl 8013408 <iprintf>
- 8010d06: e7f0 b.n 8010cea <tcp_rexmit_fast+0x6>
- if (tcp_rexmit(pcb) == ERR_OK) {
- 8010d08: 4620 mov r0, r4
- 8010d0a: f7ff ffa7 bl 8010c5c <tcp_rexmit>
- 8010d0e: 2800 cmp r0, #0
- 8010d10: d1f1 bne.n 8010cf6 <tcp_rexmit_fast+0x12>
- pcb->ssthresh = LWIP_MIN(pcb->cwnd, pcb->snd_wnd) / 2;
- 8010d12: f8b4 3060 ldrh.w r3, [r4, #96] @ 0x60
- 8010d16: f8b4 2048 ldrh.w r2, [r4, #72] @ 0x48
- 8010d1a: 4293 cmp r3, r2
- 8010d1c: bf28 it cs
- 8010d1e: 4613 movcs r3, r2
- 8010d20: 105b asrs r3, r3, #1
- 8010d22: f8a4 304a strh.w r3, [r4, #74] @ 0x4a
- if (pcb->ssthresh < (2U * pcb->mss)) {
- 8010d26: b29b uxth r3, r3
- 8010d28: 8e62 ldrh r2, [r4, #50] @ 0x32
- 8010d2a: ebb3 0f42 cmp.w r3, r2, lsl #1
- 8010d2e: d202 bcs.n 8010d36 <tcp_rexmit_fast+0x52>
- pcb->ssthresh = 2 * pcb->mss;
- 8010d30: 0053 lsls r3, r2, #1
- 8010d32: f8a4 304a strh.w r3, [r4, #74] @ 0x4a
- pcb->cwnd = pcb->ssthresh + 3 * pcb->mss;
- 8010d36: f8b4 304a ldrh.w r3, [r4, #74] @ 0x4a
- 8010d3a: eb02 0242 add.w r2, r2, r2, lsl #1
- 8010d3e: 4413 add r3, r2
- 8010d40: f8a4 3048 strh.w r3, [r4, #72] @ 0x48
- tcp_set_flags(pcb, TF_INFR);
- 8010d44: 8b63 ldrh r3, [r4, #26]
- 8010d46: f043 0304 orr.w r3, r3, #4
- 8010d4a: 8363 strh r3, [r4, #26]
- pcb->rtime = 0;
- 8010d4c: 2300 movs r3, #0
- 8010d4e: 8623 strh r3, [r4, #48] @ 0x30
- }
- 8010d50: e7d1 b.n 8010cf6 <tcp_rexmit_fast+0x12>
- 8010d52: bf00 nop
- 8010d54: 080170ec .word 0x080170ec
- 8010d58: 08017810 .word 0x08017810
- 8010d5c: 080144e8 .word 0x080144e8
- 08010d60 <tcp_rst>:
- */
- void
- tcp_rst(const struct tcp_pcb *pcb, u32_t seqno, u32_t ackno,
- const ip_addr_t *local_ip, const ip_addr_t *remote_ip,
- u16_t local_port, u16_t remote_port)
- {
- 8010d60: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8010d64: b084 sub sp, #16
- 8010d66: 4604 mov r4, r0
- 8010d68: 460e mov r6, r1
- 8010d6a: 4615 mov r5, r2
- 8010d6c: 9f0a ldr r7, [sp, #40] @ 0x28
- struct pbuf *p;
- u16_t wnd;
- u8_t optlen;
- LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL);
- 8010d6e: 4698 mov r8, r3
- 8010d70: b32b cbz r3, 8010dbe <tcp_rst+0x5e>
- LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL);
- 8010d72: b367 cbz r7, 8010dce <tcp_rst+0x6e>
- wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF));
- #else
- wnd = PP_HTONS(TCP_WND);
- #endif
- p = tcp_output_alloc_header_common(ackno, optlen, 0, lwip_htonl(seqno), local_port,
- 8010d74: 4630 mov r0, r6
- 8010d76: f7f7 f886 bl 8007e86 <lwip_htonl>
- 8010d7a: 4603 mov r3, r0
- 8010d7c: f24d 0216 movw r2, #53270 @ 0xd016
- 8010d80: 9203 str r2, [sp, #12]
- 8010d82: 2214 movs r2, #20
- 8010d84: 9202 str r2, [sp, #8]
- 8010d86: f8bd 2030 ldrh.w r2, [sp, #48] @ 0x30
- 8010d8a: 9201 str r2, [sp, #4]
- 8010d8c: f8bd 202c ldrh.w r2, [sp, #44] @ 0x2c
- 8010d90: 9200 str r2, [sp, #0]
- 8010d92: 2200 movs r2, #0
- 8010d94: 4611 mov r1, r2
- 8010d96: 4628 mov r0, r5
- 8010d98: f7ff f924 bl 800ffe4 <tcp_output_alloc_header_common>
- remote_port, TCP_RST | TCP_ACK, wnd);
- if (p == NULL) {
- 8010d9c: 4605 mov r5, r0
- 8010d9e: b158 cbz r0, 8010db8 <tcp_rst+0x58>
- LWIP_DEBUGF(TCP_DEBUG, ("tcp_rst: could not allocate memory for pbuf\n"));
- return;
- }
- tcp_output_fill_options(pcb, p, 0, optlen);
- 8010da0: 2300 movs r3, #0
- 8010da2: 461a mov r2, r3
- 8010da4: 4601 mov r1, r0
- 8010da6: 4620 mov r0, r4
- 8010da8: f7ff f824 bl 800fdf4 <tcp_output_fill_options>
- MIB2_STATS_INC(mib2.tcpoutrsts);
- tcp_output_control_segment(pcb, p, local_ip, remote_ip);
- 8010dac: 463b mov r3, r7
- 8010dae: 4642 mov r2, r8
- 8010db0: 4629 mov r1, r5
- 8010db2: 4620 mov r0, r4
- 8010db4: f7ff fa38 bl 8010228 <tcp_output_control_segment>
- LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno));
- }
- 8010db8: b004 add sp, #16
- 8010dba: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL);
- 8010dbe: 4b08 ldr r3, [pc, #32] @ (8010de0 <tcp_rst+0x80>)
- 8010dc0: f240 72c4 movw r2, #1988 @ 0x7c4
- 8010dc4: 4907 ldr r1, [pc, #28] @ (8010de4 <tcp_rst+0x84>)
- 8010dc6: 4808 ldr r0, [pc, #32] @ (8010de8 <tcp_rst+0x88>)
- 8010dc8: f002 fb1e bl 8013408 <iprintf>
- 8010dcc: e7d1 b.n 8010d72 <tcp_rst+0x12>
- LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL);
- 8010dce: 4b04 ldr r3, [pc, #16] @ (8010de0 <tcp_rst+0x80>)
- 8010dd0: f240 72c5 movw r2, #1989 @ 0x7c5
- 8010dd4: 4905 ldr r1, [pc, #20] @ (8010dec <tcp_rst+0x8c>)
- 8010dd6: 4804 ldr r0, [pc, #16] @ (8010de8 <tcp_rst+0x88>)
- 8010dd8: f002 fb16 bl 8013408 <iprintf>
- 8010ddc: e7ca b.n 8010d74 <tcp_rst+0x14>
- 8010dde: bf00 nop
- 8010de0: 080170ec .word 0x080170ec
- 8010de4: 08017830 .word 0x08017830
- 8010de8: 080144e8 .word 0x080144e8
- 8010dec: 0801784c .word 0x0801784c
- 08010df0 <tcp_send_empty_ack>:
- *
- * @param pcb Protocol control block for the TCP connection to send the ACK
- */
- err_t
- tcp_send_empty_ack(struct tcp_pcb *pcb)
- {
- 8010df0: b538 push {r3, r4, r5, lr}
- err_t err;
- struct pbuf *p;
- u8_t optlen, optflags = 0;
- u8_t num_sacks = 0;
- LWIP_ASSERT("tcp_send_empty_ack: invalid pcb", pcb != NULL);
- 8010df2: 4604 mov r4, r0
- 8010df4: b1e0 cbz r0, 8010e30 <tcp_send_empty_ack+0x40>
- 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));
- 8010df6: 6d20 ldr r0, [r4, #80] @ 0x50
- 8010df8: f7f7 f845 bl 8007e86 <lwip_htonl>
- 8010dfc: 4603 mov r3, r0
- 8010dfe: 2200 movs r2, #0
- 8010e00: 4611 mov r1, r2
- 8010e02: 4620 mov r0, r4
- 8010e04: f7ff f93a bl 801007c <tcp_output_alloc_header>
- if (p == NULL) {
- 8010e08: 4605 mov r5, r0
- 8010e0a: b1c8 cbz r0, 8010e40 <tcp_send_empty_ack+0x50>
- /* let tcp_fasttmr retry sending this ACK */
- tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
- LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n"));
- return ERR_BUF;
- }
- tcp_output_fill_options(pcb, p, optflags, num_sacks);
- 8010e0c: 2300 movs r3, #0
- 8010e0e: 461a mov r2, r3
- 8010e10: 4601 mov r1, r0
- 8010e12: 4620 mov r0, r4
- 8010e14: f7fe ffee bl 800fdf4 <tcp_output_fill_options>
- pcb->ts_lastacksent = pcb->rcv_nxt;
- #endif
- LWIP_DEBUGF(TCP_OUTPUT_DEBUG,
- ("tcp_output: sending ACK for %"U32_F"\n", pcb->rcv_nxt));
- err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
- 8010e18: 1d23 adds r3, r4, #4
- 8010e1a: 4622 mov r2, r4
- 8010e1c: 4629 mov r1, r5
- 8010e1e: 4620 mov r0, r4
- 8010e20: f7ff fa02 bl 8010228 <tcp_output_control_segment>
- if (err != ERR_OK) {
- 8010e24: b198 cbz r0, 8010e4e <tcp_send_empty_ack+0x5e>
- /* let tcp_fasttmr retry sending this ACK */
- tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
- 8010e26: 8b63 ldrh r3, [r4, #26]
- 8010e28: f043 0303 orr.w r3, r3, #3
- 8010e2c: 8363 strh r3, [r4, #26]
- /* remove ACK flags from the PCB, as we sent an empty ACK now */
- tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
- }
- return err;
- }
- 8010e2e: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("tcp_send_empty_ack: invalid pcb", pcb != NULL);
- 8010e30: 4b09 ldr r3, [pc, #36] @ (8010e58 <tcp_send_empty_ack+0x68>)
- 8010e32: f240 72ea movw r2, #2026 @ 0x7ea
- 8010e36: 4909 ldr r1, [pc, #36] @ (8010e5c <tcp_send_empty_ack+0x6c>)
- 8010e38: 4809 ldr r0, [pc, #36] @ (8010e60 <tcp_send_empty_ack+0x70>)
- 8010e3a: f002 fae5 bl 8013408 <iprintf>
- 8010e3e: e7da b.n 8010df6 <tcp_send_empty_ack+0x6>
- tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
- 8010e40: 8b63 ldrh r3, [r4, #26]
- 8010e42: f043 0303 orr.w r3, r3, #3
- 8010e46: 8363 strh r3, [r4, #26]
- return ERR_BUF;
- 8010e48: f06f 0001 mvn.w r0, #1
- 8010e4c: e7ef b.n 8010e2e <tcp_send_empty_ack+0x3e>
- tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
- 8010e4e: 8b63 ldrh r3, [r4, #26]
- 8010e50: f023 0303 bic.w r3, r3, #3
- 8010e54: 8363 strh r3, [r4, #26]
- 8010e56: e7ea b.n 8010e2e <tcp_send_empty_ack+0x3e>
- 8010e58: 080170ec .word 0x080170ec
- 8010e5c: 08017868 .word 0x08017868
- 8010e60: 080144e8 .word 0x080144e8
- 08010e64 <tcp_output>:
- {
- 8010e64: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
- 8010e68: 4605 mov r5, r0
- LWIP_ASSERT_CORE_LOCKED();
- 8010e6a: f7f2 fe4f bl 8003b0c <sys_check_core_locking>
- LWIP_ASSERT("tcp_output: invalid pcb", pcb != NULL);
- 8010e6e: 2d00 cmp r5, #0
- 8010e70: d037 beq.n 8010ee2 <tcp_output+0x7e>
- LWIP_ASSERT("don't call tcp_output for listen-pcbs",
- 8010e72: 7d2b ldrb r3, [r5, #20]
- 8010e74: 2b01 cmp r3, #1
- 8010e76: d03c beq.n 8010ef2 <tcp_output+0x8e>
- if (tcp_input_pcb == pcb) {
- 8010e78: 4b9f ldr r3, [pc, #636] @ (80110f8 <tcp_output+0x294>)
- 8010e7a: 681b ldr r3, [r3, #0]
- 8010e7c: 42ab cmp r3, r5
- 8010e7e: f000 8135 beq.w 80110ec <tcp_output+0x288>
- wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd);
- 8010e82: f8b5 6048 ldrh.w r6, [r5, #72] @ 0x48
- 8010e86: f8b5 3060 ldrh.w r3, [r5, #96] @ 0x60
- 8010e8a: 429e cmp r6, r3
- 8010e8c: bf28 it cs
- 8010e8e: 461e movcs r6, r3
- seg = pcb->unsent;
- 8010e90: 6eec ldr r4, [r5, #108] @ 0x6c
- if (seg == NULL) {
- 8010e92: 2c00 cmp r4, #0
- 8010e94: d035 beq.n 8010f02 <tcp_output+0x9e>
- netif = tcp_route(pcb, &pcb->local_ip, &pcb->remote_ip);
- 8010e96: 1d2a adds r2, r5, #4
- 8010e98: 4629 mov r1, r5
- 8010e9a: 4628 mov r0, r5
- 8010e9c: f7ff f918 bl 80100d0 <tcp_route>
- if (netif == NULL) {
- 8010ea0: 4680 mov r8, r0
- 8010ea2: 2800 cmp r0, #0
- 8010ea4: f000 8124 beq.w 80110f0 <tcp_output+0x28c>
- if (ip_addr_isany(&pcb->local_ip)) {
- 8010ea8: b10d cbz r5, 8010eae <tcp_output+0x4a>
- 8010eaa: 682b ldr r3, [r5, #0]
- 8010eac: b913 cbnz r3, 8010eb4 <tcp_output+0x50>
- ip_addr_copy(pcb->local_ip, *local_ip);
- 8010eae: f8d8 3004 ldr.w r3, [r8, #4]
- 8010eb2: 602b str r3, [r5, #0]
- if (lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd) {
- 8010eb4: 6923 ldr r3, [r4, #16]
- 8010eb6: 6858 ldr r0, [r3, #4]
- 8010eb8: f7f6 ffe5 bl 8007e86 <lwip_htonl>
- 8010ebc: 6c6b ldr r3, [r5, #68] @ 0x44
- 8010ebe: 1ac0 subs r0, r0, r3
- 8010ec0: 8923 ldrh r3, [r4, #8]
- 8010ec2: 4418 add r0, r3
- 8010ec4: 42b0 cmp r0, r6
- 8010ec6: d93c bls.n 8010f42 <tcp_output+0xde>
- if (wnd == pcb->snd_wnd && pcb->unacked == NULL && pcb->persist_backoff == 0) {
- 8010ec8: f8b5 3060 ldrh.w r3, [r5, #96] @ 0x60
- 8010ecc: 429e cmp r6, r3
- 8010ece: d029 beq.n 8010f24 <tcp_output+0xc0>
- if (pcb->flags & TF_ACK_NOW) {
- 8010ed0: 8b6b ldrh r3, [r5, #26]
- 8010ed2: f013 0f02 tst.w r3, #2
- 8010ed6: d018 beq.n 8010f0a <tcp_output+0xa6>
- return tcp_send_empty_ack(pcb);
- 8010ed8: 4628 mov r0, r5
- 8010eda: f7ff ff89 bl 8010df0 <tcp_send_empty_ack>
- 8010ede: 4603 mov r3, r0
- 8010ee0: e018 b.n 8010f14 <tcp_output+0xb0>
- LWIP_ASSERT("tcp_output: invalid pcb", pcb != NULL);
- 8010ee2: 4b86 ldr r3, [pc, #536] @ (80110fc <tcp_output+0x298>)
- 8010ee4: f240 42e1 movw r2, #1249 @ 0x4e1
- 8010ee8: 4985 ldr r1, [pc, #532] @ (8011100 <tcp_output+0x29c>)
- 8010eea: 4886 ldr r0, [pc, #536] @ (8011104 <tcp_output+0x2a0>)
- 8010eec: f002 fa8c bl 8013408 <iprintf>
- 8010ef0: e7bf b.n 8010e72 <tcp_output+0xe>
- LWIP_ASSERT("don't call tcp_output for listen-pcbs",
- 8010ef2: 4b82 ldr r3, [pc, #520] @ (80110fc <tcp_output+0x298>)
- 8010ef4: f240 42e3 movw r2, #1251 @ 0x4e3
- 8010ef8: 4983 ldr r1, [pc, #524] @ (8011108 <tcp_output+0x2a4>)
- 8010efa: 4882 ldr r0, [pc, #520] @ (8011104 <tcp_output+0x2a0>)
- 8010efc: f002 fa84 bl 8013408 <iprintf>
- 8010f00: e7ba b.n 8010e78 <tcp_output+0x14>
- if (pcb->flags & TF_ACK_NOW) {
- 8010f02: 8b6b ldrh r3, [r5, #26]
- 8010f04: f013 0f02 tst.w r3, #2
- 8010f08: d107 bne.n 8010f1a <tcp_output+0xb6>
- tcp_clear_flags(pcb, TF_NAGLEMEMERR);
- 8010f0a: 8b6b ldrh r3, [r5, #26]
- 8010f0c: f023 0380 bic.w r3, r3, #128 @ 0x80
- 8010f10: 836b strh r3, [r5, #26]
- return ERR_OK;
- 8010f12: 2300 movs r3, #0
- }
- 8010f14: 4618 mov r0, r3
- 8010f16: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
- return tcp_send_empty_ack(pcb);
- 8010f1a: 4628 mov r0, r5
- 8010f1c: f7ff ff68 bl 8010df0 <tcp_send_empty_ack>
- 8010f20: 4603 mov r3, r0
- 8010f22: e7f7 b.n 8010f14 <tcp_output+0xb0>
- if (wnd == pcb->snd_wnd && pcb->unacked == NULL && pcb->persist_backoff == 0) {
- 8010f24: 6f2b ldr r3, [r5, #112] @ 0x70
- 8010f26: 2b00 cmp r3, #0
- 8010f28: d1d2 bne.n 8010ed0 <tcp_output+0x6c>
- 8010f2a: f895 3099 ldrb.w r3, [r5, #153] @ 0x99
- 8010f2e: 2b00 cmp r3, #0
- 8010f30: d1ce bne.n 8010ed0 <tcp_output+0x6c>
- pcb->persist_cnt = 0;
- 8010f32: f885 3098 strb.w r3, [r5, #152] @ 0x98
- pcb->persist_backoff = 1;
- 8010f36: 2201 movs r2, #1
- 8010f38: f885 2099 strb.w r2, [r5, #153] @ 0x99
- pcb->persist_probe = 0;
- 8010f3c: f885 309a strb.w r3, [r5, #154] @ 0x9a
- 8010f40: e7c6 b.n 8010ed0 <tcp_output+0x6c>
- pcb->persist_backoff = 0;
- 8010f42: 2300 movs r3, #0
- 8010f44: f885 3099 strb.w r3, [r5, #153] @ 0x99
- useg = pcb->unacked;
- 8010f48: 6f2b ldr r3, [r5, #112] @ 0x70
- if (useg != NULL) {
- 8010f4a: 2b00 cmp r3, #0
- 8010f4c: f000 80cc beq.w 80110e8 <tcp_output+0x284>
- for (; useg->next != NULL; useg = useg->next);
- 8010f50: 461f mov r7, r3
- 8010f52: 681b ldr r3, [r3, #0]
- 8010f54: 2b00 cmp r3, #0
- 8010f56: d1fb bne.n 8010f50 <tcp_output+0xec>
- 8010f58: e056 b.n 8011008 <tcp_output+0x1a4>
- LWIP_ASSERT("RST not expected here!",
- 8010f5a: 4b68 ldr r3, [pc, #416] @ (80110fc <tcp_output+0x298>)
- 8010f5c: f240 5236 movw r2, #1334 @ 0x536
- 8010f60: 496a ldr r1, [pc, #424] @ (801110c <tcp_output+0x2a8>)
- 8010f62: 4868 ldr r0, [pc, #416] @ (8011104 <tcp_output+0x2a0>)
- 8010f64: f002 fa50 bl 8013408 <iprintf>
- 8010f68: e061 b.n 801102e <tcp_output+0x1ca>
- if ((tcp_do_output_nagle(pcb) == 0) &&
- 8010f6a: 8911 ldrh r1, [r2, #8]
- 8010f6c: 8e6a ldrh r2, [r5, #50] @ 0x32
- 8010f6e: 4291 cmp r1, r2
- 8010f70: d269 bcs.n 8011046 <tcp_output+0x1e2>
- 8010f72: f8b5 2064 ldrh.w r2, [r5, #100] @ 0x64
- 8010f76: 2a00 cmp r2, #0
- 8010f78: d065 beq.n 8011046 <tcp_output+0x1e2>
- 8010f7a: f8b5 2066 ldrh.w r2, [r5, #102] @ 0x66
- 8010f7e: 2a0f cmp r2, #15
- 8010f80: d861 bhi.n 8011046 <tcp_output+0x1e2>
- 8010f82: f013 0fa0 tst.w r3, #160 @ 0xa0
- 8010f86: d15e bne.n 8011046 <tcp_output+0x1e2>
- if (pcb->unsent == NULL) {
- 8010f88: 6eeb ldr r3, [r5, #108] @ 0x6c
- 8010f8a: 2b00 cmp r3, #0
- 8010f8c: d1bd bne.n 8010f0a <tcp_output+0xa6>
- pcb->unsent_oversize = 0;
- 8010f8e: f8a5 3068 strh.w r3, [r5, #104] @ 0x68
- 8010f92: e7ba b.n 8010f0a <tcp_output+0xa6>
- TCPH_SET_FLAG(seg->tcphdr, TCP_ACK);
- 8010f94: 6923 ldr r3, [r4, #16]
- 8010f96: f8b3 900c ldrh.w r9, [r3, #12]
- 8010f9a: 2010 movs r0, #16
- 8010f9c: f7f6 ff6e bl 8007e7c <lwip_htons>
- 8010fa0: 6923 ldr r3, [r4, #16]
- 8010fa2: ea49 0900 orr.w r9, r9, r0
- 8010fa6: f8a3 900c strh.w r9, [r3, #12]
- 8010faa: e04f b.n 801104c <tcp_output+0x1e8>
- tcp_set_flags(pcb, TF_NAGLEMEMERR);
- 8010fac: 8b6a ldrh r2, [r5, #26]
- 8010fae: f042 0280 orr.w r2, r2, #128 @ 0x80
- 8010fb2: 836a strh r2, [r5, #26]
- return err;
- 8010fb4: e7ae b.n 8010f14 <tcp_output+0xb0>
- snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
- 8010fb6: 2300 movs r3, #0
- 8010fb8: e06a b.n 8011090 <tcp_output+0x22c>
- pcb->snd_nxt = snd_nxt;
- 8010fba: 6528 str r0, [r5, #80] @ 0x50
- 8010fbc: e06f b.n 801109e <tcp_output+0x23a>
- if (TCP_TCPLEN(seg) > 0) {
- 8010fbe: 2300 movs r3, #0
- 8010fc0: e077 b.n 80110b2 <tcp_output+0x24e>
- pcb->unacked = seg;
- 8010fc2: 672c str r4, [r5, #112] @ 0x70
- useg = seg;
- 8010fc4: 4627 mov r7, r4
- 8010fc6: e01e b.n 8011006 <tcp_output+0x1a2>
- struct tcp_seg **cur_seg = &(pcb->unacked);
- 8010fc8: f105 0a70 add.w sl, r5, #112 @ 0x70
- while (*cur_seg &&
- 8010fcc: e001 b.n 8010fd2 <tcp_output+0x16e>
- cur_seg = &((*cur_seg)->next );
- 8010fce: f8da a000 ldr.w sl, [sl]
- while (*cur_seg &&
- 8010fd2: f8da 3000 ldr.w r3, [sl]
- 8010fd6: b16b cbz r3, 8010ff4 <tcp_output+0x190>
- TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
- 8010fd8: 691b ldr r3, [r3, #16]
- 8010fda: 6858 ldr r0, [r3, #4]
- 8010fdc: f7f6 ff53 bl 8007e86 <lwip_htonl>
- 8010fe0: 4681 mov r9, r0
- 8010fe2: 6923 ldr r3, [r4, #16]
- 8010fe4: 6858 ldr r0, [r3, #4]
- 8010fe6: f7f6 ff4e bl 8007e86 <lwip_htonl>
- 8010fea: eba9 0900 sub.w r9, r9, r0
- while (*cur_seg &&
- 8010fee: f1b9 0f00 cmp.w r9, #0
- 8010ff2: dbec blt.n 8010fce <tcp_output+0x16a>
- seg->next = (*cur_seg);
- 8010ff4: f8da 3000 ldr.w r3, [sl]
- 8010ff8: 6023 str r3, [r4, #0]
- (*cur_seg) = seg;
- 8010ffa: f8ca 4000 str.w r4, [sl]
- 8010ffe: e002 b.n 8011006 <tcp_output+0x1a2>
- tcp_seg_free(seg);
- 8011000: 4620 mov r0, r4
- 8011002: f7fc f9d3 bl 800d3ac <tcp_seg_free>
- seg = pcb->unsent;
- 8011006: 6eec ldr r4, [r5, #108] @ 0x6c
- while (seg != NULL &&
- 8011008: 2c00 cmp r4, #0
- 801100a: d0bd beq.n 8010f88 <tcp_output+0x124>
- lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) {
- 801100c: 6923 ldr r3, [r4, #16]
- 801100e: 6858 ldr r0, [r3, #4]
- 8011010: f7f6 ff39 bl 8007e86 <lwip_htonl>
- 8011014: 6c6b ldr r3, [r5, #68] @ 0x44
- 8011016: 1ac0 subs r0, r0, r3
- 8011018: 8923 ldrh r3, [r4, #8]
- 801101a: 4418 add r0, r3
- while (seg != NULL &&
- 801101c: 42b0 cmp r0, r6
- 801101e: d8b3 bhi.n 8010f88 <tcp_output+0x124>
- LWIP_ASSERT("RST not expected here!",
- 8011020: 6923 ldr r3, [r4, #16]
- 8011022: 8998 ldrh r0, [r3, #12]
- 8011024: f7f6 ff2a bl 8007e7c <lwip_htons>
- 8011028: f010 0f04 tst.w r0, #4
- 801102c: d195 bne.n 8010f5a <tcp_output+0xf6>
- if ((tcp_do_output_nagle(pcb) == 0) &&
- 801102e: 6f2b ldr r3, [r5, #112] @ 0x70
- 8011030: b14b cbz r3, 8011046 <tcp_output+0x1e2>
- 8011032: 8b6b ldrh r3, [r5, #26]
- 8011034: f013 0f44 tst.w r3, #68 @ 0x44
- 8011038: d105 bne.n 8011046 <tcp_output+0x1e2>
- 801103a: 6eea ldr r2, [r5, #108] @ 0x6c
- 801103c: 2a00 cmp r2, #0
- 801103e: d098 beq.n 8010f72 <tcp_output+0x10e>
- 8011040: 6811 ldr r1, [r2, #0]
- 8011042: 2900 cmp r1, #0
- 8011044: d091 beq.n 8010f6a <tcp_output+0x106>
- if (pcb->state != SYN_SENT) {
- 8011046: 7d2b ldrb r3, [r5, #20]
- 8011048: 2b02 cmp r3, #2
- 801104a: d1a3 bne.n 8010f94 <tcp_output+0x130>
- err = tcp_output_segment(seg, pcb, netif);
- 801104c: 4642 mov r2, r8
- 801104e: 4629 mov r1, r5
- 8011050: 4620 mov r0, r4
- 8011052: f7ff f849 bl 80100e8 <tcp_output_segment>
- if (err != ERR_OK) {
- 8011056: 4603 mov r3, r0
- 8011058: 2800 cmp r0, #0
- 801105a: d1a7 bne.n 8010fac <tcp_output+0x148>
- seg->oversize_left = 0;
- 801105c: 2300 movs r3, #0
- 801105e: 8163 strh r3, [r4, #10]
- pcb->unsent = seg->next;
- 8011060: 6823 ldr r3, [r4, #0]
- 8011062: 66eb str r3, [r5, #108] @ 0x6c
- if (pcb->state != SYN_SENT) {
- 8011064: 7d2b ldrb r3, [r5, #20]
- 8011066: 2b02 cmp r3, #2
- 8011068: d003 beq.n 8011072 <tcp_output+0x20e>
- tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
- 801106a: 8b6b ldrh r3, [r5, #26]
- 801106c: f023 0303 bic.w r3, r3, #3
- 8011070: 836b strh r3, [r5, #26]
- snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
- 8011072: 6923 ldr r3, [r4, #16]
- 8011074: 6858 ldr r0, [r3, #4]
- 8011076: f7f6 ff06 bl 8007e86 <lwip_htonl>
- 801107a: 4681 mov r9, r0
- 801107c: f8b4 a008 ldrh.w sl, [r4, #8]
- 8011080: 6923 ldr r3, [r4, #16]
- 8011082: 8998 ldrh r0, [r3, #12]
- 8011084: f7f6 fefa bl 8007e7c <lwip_htons>
- 8011088: f010 0f03 tst.w r0, #3
- 801108c: d093 beq.n 8010fb6 <tcp_output+0x152>
- 801108e: 2301 movs r3, #1
- 8011090: 4453 add r3, sl
- 8011092: eb09 0003 add.w r0, r9, r3
- if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) {
- 8011096: 6d2b ldr r3, [r5, #80] @ 0x50
- 8011098: 1a1b subs r3, r3, r0
- 801109a: 2b00 cmp r3, #0
- 801109c: db8d blt.n 8010fba <tcp_output+0x156>
- if (TCP_TCPLEN(seg) > 0) {
- 801109e: f8b4 9008 ldrh.w r9, [r4, #8]
- 80110a2: 6923 ldr r3, [r4, #16]
- 80110a4: 8998 ldrh r0, [r3, #12]
- 80110a6: f7f6 fee9 bl 8007e7c <lwip_htons>
- 80110aa: f010 0f03 tst.w r0, #3
- 80110ae: d086 beq.n 8010fbe <tcp_output+0x15a>
- 80110b0: 2301 movs r3, #1
- 80110b2: eb13 0f09 cmn.w r3, r9
- 80110b6: d0a3 beq.n 8011000 <tcp_output+0x19c>
- seg->next = NULL;
- 80110b8: 2300 movs r3, #0
- 80110ba: 6023 str r3, [r4, #0]
- if (pcb->unacked == NULL) {
- 80110bc: 6f2b ldr r3, [r5, #112] @ 0x70
- 80110be: 2b00 cmp r3, #0
- 80110c0: f43f af7f beq.w 8010fc2 <tcp_output+0x15e>
- if (TCP_SEQ_LT(lwip_ntohl(seg->tcphdr->seqno), lwip_ntohl(useg->tcphdr->seqno))) {
- 80110c4: 6923 ldr r3, [r4, #16]
- 80110c6: 6858 ldr r0, [r3, #4]
- 80110c8: f7f6 fedd bl 8007e86 <lwip_htonl>
- 80110cc: 4681 mov r9, r0
- 80110ce: 693b ldr r3, [r7, #16]
- 80110d0: 6858 ldr r0, [r3, #4]
- 80110d2: f7f6 fed8 bl 8007e86 <lwip_htonl>
- 80110d6: eba9 0900 sub.w r9, r9, r0
- 80110da: f1b9 0f00 cmp.w r9, #0
- 80110de: f6ff af73 blt.w 8010fc8 <tcp_output+0x164>
- useg->next = seg;
- 80110e2: 603c str r4, [r7, #0]
- useg = useg->next;
- 80110e4: 4627 mov r7, r4
- 80110e6: e78e b.n 8011006 <tcp_output+0x1a2>
- useg = pcb->unacked;
- 80110e8: 461f mov r7, r3
- 80110ea: e78d b.n 8011008 <tcp_output+0x1a4>
- return ERR_OK;
- 80110ec: 2300 movs r3, #0
- 80110ee: e711 b.n 8010f14 <tcp_output+0xb0>
- return ERR_RTE;
- 80110f0: f06f 0303 mvn.w r3, #3
- 80110f4: e70e b.n 8010f14 <tcp_output+0xb0>
- 80110f6: bf00 nop
- 80110f8: 24019be8 .word 0x24019be8
- 80110fc: 080170ec .word 0x080170ec
- 8011100: 08017888 .word 0x08017888
- 8011104: 080144e8 .word 0x080144e8
- 8011108: 080178a0 .word 0x080178a0
- 801110c: 080178c8 .word 0x080178c8
- 08011110 <tcp_rexmit_rto_commit>:
- {
- 8011110: b510 push {r4, lr}
- LWIP_ASSERT("tcp_rexmit_rto_commit: invalid pcb", pcb != NULL);
- 8011112: 4604 mov r4, r0
- 8011114: b150 cbz r0, 801112c <tcp_rexmit_rto_commit+0x1c>
- if (pcb->nrtx < 0xFF) {
- 8011116: f894 3042 ldrb.w r3, [r4, #66] @ 0x42
- 801111a: 2bff cmp r3, #255 @ 0xff
- 801111c: d002 beq.n 8011124 <tcp_rexmit_rto_commit+0x14>
- ++pcb->nrtx;
- 801111e: 3301 adds r3, #1
- 8011120: f884 3042 strb.w r3, [r4, #66] @ 0x42
- tcp_output(pcb);
- 8011124: 4620 mov r0, r4
- 8011126: f7ff fe9d bl 8010e64 <tcp_output>
- }
- 801112a: bd10 pop {r4, pc}
- LWIP_ASSERT("tcp_rexmit_rto_commit: invalid pcb", pcb != NULL);
- 801112c: 4b03 ldr r3, [pc, #12] @ (801113c <tcp_rexmit_rto_commit+0x2c>)
- 801112e: f44f 62d3 mov.w r2, #1688 @ 0x698
- 8011132: 4903 ldr r1, [pc, #12] @ (8011140 <tcp_rexmit_rto_commit+0x30>)
- 8011134: 4803 ldr r0, [pc, #12] @ (8011144 <tcp_rexmit_rto_commit+0x34>)
- 8011136: f002 f967 bl 8013408 <iprintf>
- 801113a: e7ec b.n 8011116 <tcp_rexmit_rto_commit+0x6>
- 801113c: 080170ec .word 0x080170ec
- 8011140: 080178e0 .word 0x080178e0
- 8011144: 080144e8 .word 0x080144e8
- 08011148 <tcp_rexmit_rto>:
- {
- 8011148: b510 push {r4, lr}
- LWIP_ASSERT("tcp_rexmit_rto: invalid pcb", pcb != NULL);
- 801114a: 4604 mov r4, r0
- 801114c: b120 cbz r0, 8011158 <tcp_rexmit_rto+0x10>
- if (tcp_rexmit_rto_prepare(pcb) == ERR_OK) {
- 801114e: 4620 mov r0, r4
- 8011150: f7ff fd34 bl 8010bbc <tcp_rexmit_rto_prepare>
- 8011154: b140 cbz r0, 8011168 <tcp_rexmit_rto+0x20>
- }
- 8011156: bd10 pop {r4, pc}
- LWIP_ASSERT("tcp_rexmit_rto: invalid pcb", pcb != NULL);
- 8011158: 4b05 ldr r3, [pc, #20] @ (8011170 <tcp_rexmit_rto+0x28>)
- 801115a: f240 62ad movw r2, #1709 @ 0x6ad
- 801115e: 4905 ldr r1, [pc, #20] @ (8011174 <tcp_rexmit_rto+0x2c>)
- 8011160: 4805 ldr r0, [pc, #20] @ (8011178 <tcp_rexmit_rto+0x30>)
- 8011162: f002 f951 bl 8013408 <iprintf>
- 8011166: e7f2 b.n 801114e <tcp_rexmit_rto+0x6>
- tcp_rexmit_rto_commit(pcb);
- 8011168: 4620 mov r0, r4
- 801116a: f7ff ffd1 bl 8011110 <tcp_rexmit_rto_commit>
- }
- 801116e: e7f2 b.n 8011156 <tcp_rexmit_rto+0xe>
- 8011170: 080170ec .word 0x080170ec
- 8011174: 08017904 .word 0x08017904
- 8011178: 080144e8 .word 0x080144e8
- 0801117c <tcp_keepalive>:
- *
- * @param pcb the tcp_pcb for which to send a keepalive packet
- */
- err_t
- tcp_keepalive(struct tcp_pcb *pcb)
- {
- 801117c: b538 push {r3, r4, r5, lr}
- err_t err;
- struct pbuf *p;
- u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);
- LWIP_ASSERT("tcp_keepalive: invalid pcb", pcb != NULL);
- 801117e: 4604 mov r4, r0
- 8011180: b1c0 cbz r0, 80111b4 <tcp_keepalive+0x38>
- 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));
- 8011182: 6d20 ldr r0, [r4, #80] @ 0x50
- 8011184: 3801 subs r0, #1
- 8011186: f7f6 fe7e bl 8007e86 <lwip_htonl>
- 801118a: 4603 mov r3, r0
- 801118c: 2200 movs r2, #0
- 801118e: 4611 mov r1, r2
- 8011190: 4620 mov r0, r4
- 8011192: f7fe ff73 bl 801007c <tcp_output_alloc_header>
- if (p == NULL) {
- 8011196: 4605 mov r5, r0
- 8011198: b1a0 cbz r0, 80111c4 <tcp_keepalive+0x48>
- LWIP_DEBUGF(TCP_DEBUG,
- ("tcp_keepalive: could not allocate memory for pbuf\n"));
- return ERR_MEM;
- }
- tcp_output_fill_options(pcb, p, 0, optlen);
- 801119a: 2300 movs r3, #0
- 801119c: 461a mov r2, r3
- 801119e: 4601 mov r1, r0
- 80111a0: 4620 mov r0, r4
- 80111a2: f7fe fe27 bl 800fdf4 <tcp_output_fill_options>
- err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
- 80111a6: 1d23 adds r3, r4, #4
- 80111a8: 4622 mov r2, r4
- 80111aa: 4629 mov r1, r5
- 80111ac: 4620 mov r0, r4
- 80111ae: f7ff f83b bl 8010228 <tcp_output_control_segment>
- 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;
- }
- 80111b2: bd38 pop {r3, r4, r5, pc}
- LWIP_ASSERT("tcp_keepalive: invalid pcb", pcb != NULL);
- 80111b4: 4b05 ldr r3, [pc, #20] @ (80111cc <tcp_keepalive+0x50>)
- 80111b6: f640 0224 movw r2, #2084 @ 0x824
- 80111ba: 4905 ldr r1, [pc, #20] @ (80111d0 <tcp_keepalive+0x54>)
- 80111bc: 4805 ldr r0, [pc, #20] @ (80111d4 <tcp_keepalive+0x58>)
- 80111be: f002 f923 bl 8013408 <iprintf>
- 80111c2: e7de b.n 8011182 <tcp_keepalive+0x6>
- return ERR_MEM;
- 80111c4: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 80111c8: e7f3 b.n 80111b2 <tcp_keepalive+0x36>
- 80111ca: bf00 nop
- 80111cc: 080170ec .word 0x080170ec
- 80111d0: 08017920 .word 0x08017920
- 80111d4: 080144e8 .word 0x080144e8
- 080111d8 <tcp_zero_window_probe>:
- *
- * @param pcb the tcp_pcb for which to send a zero-window probe packet
- */
- err_t
- tcp_zero_window_probe(struct tcp_pcb *pcb)
- {
- 80111d8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- u16_t len;
- u8_t is_fin;
- u32_t snd_nxt;
- u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);
- LWIP_ASSERT("tcp_zero_window_probe: invalid pcb", pcb != NULL);
- 80111dc: 4604 mov r4, r0
- 80111de: b1a8 cbz r0, 801120c <tcp_zero_window_probe+0x34>
- ("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;
- 80111e0: 6ee5 ldr r5, [r4, #108] @ 0x6c
- if (seg == NULL) {
- 80111e2: 2d00 cmp r5, #0
- 80111e4: d05b beq.n 801129e <tcp_zero_window_probe+0xc6>
- /* 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) {
- 80111e6: f894 309a ldrb.w r3, [r4, #154] @ 0x9a
- 80111ea: 2bff cmp r3, #255 @ 0xff
- 80111ec: d002 beq.n 80111f4 <tcp_zero_window_probe+0x1c>
- ++pcb->persist_probe;
- 80111ee: 3301 adds r3, #1
- 80111f0: f884 309a strb.w r3, [r4, #154] @ 0x9a
- }
- is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0);
- 80111f4: 692b ldr r3, [r5, #16]
- 80111f6: 8998 ldrh r0, [r3, #12]
- 80111f8: f7f6 fe40 bl 8007e7c <lwip_htons>
- 80111fc: f010 0f01 tst.w r0, #1
- 8011200: d00c beq.n 801121c <tcp_zero_window_probe+0x44>
- 8011202: 892b ldrh r3, [r5, #8]
- 8011204: 2b00 cmp r3, #0
- 8011206: d03b beq.n 8011280 <tcp_zero_window_probe+0xa8>
- 8011208: 2200 movs r2, #0
- 801120a: e008 b.n 801121e <tcp_zero_window_probe+0x46>
- LWIP_ASSERT("tcp_zero_window_probe: invalid pcb", pcb != NULL);
- 801120c: 4b26 ldr r3, [pc, #152] @ (80112a8 <tcp_zero_window_probe+0xd0>)
- 801120e: f640 024f movw r2, #2127 @ 0x84f
- 8011212: 4926 ldr r1, [pc, #152] @ (80112ac <tcp_zero_window_probe+0xd4>)
- 8011214: 4826 ldr r0, [pc, #152] @ (80112b0 <tcp_zero_window_probe+0xd8>)
- 8011216: f002 f8f7 bl 8013408 <iprintf>
- 801121a: e7e1 b.n 80111e0 <tcp_zero_window_probe+0x8>
- is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0);
- 801121c: 2200 movs r2, #0
- /* we want to send one seqno: either FIN or data (no options) */
- len = is_fin ? 0 : 1;
- 801121e: f002 08ff and.w r8, r2, #255 @ 0xff
- p = tcp_output_alloc_header(pcb, optlen, len, seg->tcphdr->seqno);
- 8011222: 692b ldr r3, [r5, #16]
- 8011224: 685b ldr r3, [r3, #4]
- 8011226: f082 0201 eor.w r2, r2, #1
- 801122a: 2100 movs r1, #0
- 801122c: 4620 mov r0, r4
- 801122e: f7fe ff25 bl 801007c <tcp_output_alloc_header>
- if (p == NULL) {
- 8011232: 4606 mov r6, r0
- 8011234: b3a8 cbz r0, 80112a2 <tcp_zero_window_probe+0xca>
- LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n"));
- return ERR_MEM;
- }
- tcphdr = (struct tcp_hdr *)p->payload;
- 8011236: 6847 ldr r7, [r0, #4]
- if (is_fin) {
- 8011238: f1b8 0f00 cmp.w r8, #0
- 801123c: d022 beq.n 8011284 <tcp_zero_window_probe+0xac>
- /* FIN segment, no data */
- TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN);
- 801123e: f8b7 800c ldrh.w r8, [r7, #12]
- 8011242: 2011 movs r0, #17
- 8011244: f7f6 fe1a bl 8007e7c <lwip_htons>
- 8011248: f428 587c bic.w r8, r8, #16128 @ 0x3f00
- 801124c: ea40 0008 orr.w r0, r0, r8
- 8011250: 81b8 strh r0, [r7, #12]
- Ensure we copy the first TCP data byte: */
- pbuf_copy_partial(seg->p, d, 1, seg->p->tot_len - seg->len);
- }
- /* The byte may be acknowledged without the window being opened. */
- snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + 1;
- 8011252: 692b ldr r3, [r5, #16]
- 8011254: 6858 ldr r0, [r3, #4]
- 8011256: f7f6 fe16 bl 8007e86 <lwip_htonl>
- 801125a: 3001 adds r0, #1
- if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) {
- 801125c: 6d23 ldr r3, [r4, #80] @ 0x50
- 801125e: 1a1b subs r3, r3, r0
- 8011260: 2b00 cmp r3, #0
- 8011262: db1a blt.n 801129a <tcp_zero_window_probe+0xc2>
- pcb->snd_nxt = snd_nxt;
- }
- tcp_output_fill_options(pcb, p, 0, optlen);
- 8011264: 2300 movs r3, #0
- 8011266: 461a mov r2, r3
- 8011268: 4631 mov r1, r6
- 801126a: 4620 mov r0, r4
- 801126c: f7fe fdc2 bl 800fdf4 <tcp_output_fill_options>
- err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
- 8011270: 1d23 adds r3, r4, #4
- 8011272: 4622 mov r2, r4
- 8011274: 4631 mov r1, r6
- 8011276: 4620 mov r0, r4
- 8011278: f7fe ffd6 bl 8010228 <tcp_output_control_segment>
- 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;
- }
- 801127c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0);
- 8011280: 2201 movs r2, #1
- 8011282: e7cc b.n 801121e <tcp_zero_window_probe+0x46>
- pbuf_copy_partial(seg->p, d, 1, seg->p->tot_len - seg->len);
- 8011284: 6868 ldr r0, [r5, #4]
- 8011286: 8903 ldrh r3, [r0, #8]
- 8011288: 892a ldrh r2, [r5, #8]
- 801128a: 1a9b subs r3, r3, r2
- 801128c: b29b uxth r3, r3
- 801128e: 2201 movs r2, #1
- 8011290: f107 0114 add.w r1, r7, #20
- 8011294: f7fb f806 bl 800c2a4 <pbuf_copy_partial>
- 8011298: e7db b.n 8011252 <tcp_zero_window_probe+0x7a>
- pcb->snd_nxt = snd_nxt;
- 801129a: 6520 str r0, [r4, #80] @ 0x50
- 801129c: e7e2 b.n 8011264 <tcp_zero_window_probe+0x8c>
- return ERR_OK;
- 801129e: 2000 movs r0, #0
- 80112a0: e7ec b.n 801127c <tcp_zero_window_probe+0xa4>
- return ERR_MEM;
- 80112a2: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 80112a6: e7e9 b.n 801127c <tcp_zero_window_probe+0xa4>
- 80112a8: 080170ec .word 0x080170ec
- 80112ac: 0801793c .word 0x0801793c
- 80112b0: 080144e8 .word 0x080144e8
- 080112b4 <tcpip_timeouts_mbox_fetch>:
- * @param mbox the mbox to fetch the message from
- * @param msg the place to store the message
- */
- static void
- tcpip_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg)
- {
- 80112b4: b570 push {r4, r5, r6, lr}
- 80112b6: 4605 mov r5, r0
- 80112b8: 460e mov r6, r1
- 80112ba: e00b b.n 80112d4 <tcpip_timeouts_mbox_fetch+0x20>
- again:
- LWIP_ASSERT_CORE_LOCKED();
- sleeptime = sys_timeouts_sleeptime();
- if (sleeptime == SYS_TIMEOUTS_SLEEPTIME_INFINITE) {
- UNLOCK_TCPIP_CORE();
- 80112bc: f7f2 fc1a bl 8003af4 <sys_unlock_tcpip_core>
- sys_arch_mbox_fetch(mbox, msg, 0);
- 80112c0: 2200 movs r2, #0
- 80112c2: 4631 mov r1, r6
- 80112c4: 4628 mov r0, r5
- 80112c6: f7fb fe20 bl 800cf0a <sys_arch_mbox_fetch>
- LOCK_TCPIP_CORE();
- 80112ca: f7f2 fc05 bl 8003ad8 <sys_lock_tcpip_core>
- before a message could be fetched. */
- sys_check_timeouts();
- /* We try again to fetch a message from the mbox. */
- goto again;
- }
- }
- 80112ce: bd70 pop {r4, r5, r6, pc}
- sys_check_timeouts();
- 80112d0: f000 f9fe bl 80116d0 <sys_check_timeouts>
- LWIP_ASSERT_CORE_LOCKED();
- 80112d4: f7f2 fc1a bl 8003b0c <sys_check_core_locking>
- sleeptime = sys_timeouts_sleeptime();
- 80112d8: f000 fa1c bl 8011714 <sys_timeouts_sleeptime>
- 80112dc: 4604 mov r4, r0
- if (sleeptime == SYS_TIMEOUTS_SLEEPTIME_INFINITE) {
- 80112de: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff
- 80112e2: d0eb beq.n 80112bc <tcpip_timeouts_mbox_fetch+0x8>
- } else if (sleeptime == 0) {
- 80112e4: 2800 cmp r0, #0
- 80112e6: d0f3 beq.n 80112d0 <tcpip_timeouts_mbox_fetch+0x1c>
- UNLOCK_TCPIP_CORE();
- 80112e8: f7f2 fc04 bl 8003af4 <sys_unlock_tcpip_core>
- res = sys_arch_mbox_fetch(mbox, msg, sleeptime);
- 80112ec: 4622 mov r2, r4
- 80112ee: 4631 mov r1, r6
- 80112f0: 4628 mov r0, r5
- 80112f2: f7fb fe0a bl 800cf0a <sys_arch_mbox_fetch>
- 80112f6: 4604 mov r4, r0
- LOCK_TCPIP_CORE();
- 80112f8: f7f2 fbee bl 8003ad8 <sys_lock_tcpip_core>
- if (res == SYS_ARCH_TIMEOUT) {
- 80112fc: f1b4 3fff cmp.w r4, #4294967295 @ 0xffffffff
- 8011300: d1e5 bne.n 80112ce <tcpip_timeouts_mbox_fetch+0x1a>
- sys_check_timeouts();
- 8011302: f000 f9e5 bl 80116d0 <sys_check_timeouts>
- goto again;
- 8011306: e7e5 b.n 80112d4 <tcpip_timeouts_mbox_fetch+0x20>
- 08011308 <tcpip_thread_handle_msg>:
- /* Handle a single tcpip_msg
- * This is in its own function for access by tests only.
- */
- static void
- tcpip_thread_handle_msg(struct tcpip_msg *msg)
- {
- 8011308: b510 push {r4, lr}
- 801130a: 4604 mov r4, r0
- switch (msg->type) {
- 801130c: 7803 ldrb r3, [r0, #0]
- 801130e: 2b01 cmp r3, #1
- 8011310: d017 beq.n 8011342 <tcpip_thread_handle_msg+0x3a>
- 8011312: 2b02 cmp r3, #2
- 8011314: d01d beq.n 8011352 <tcpip_thread_handle_msg+0x4a>
- 8011316: b133 cbz r3, 8011326 <tcpip_thread_handle_msg+0x1e>
- msg->msg.cb.function(msg->msg.cb.ctx);
- break;
- default:
- LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: %d\n", msg->type));
- LWIP_ASSERT("tcpip_thread: invalid message", 0);
- 8011318: 4b10 ldr r3, [pc, #64] @ (801135c <tcpip_thread_handle_msg+0x54>)
- 801131a: 22cf movs r2, #207 @ 0xcf
- 801131c: 4910 ldr r1, [pc, #64] @ (8011360 <tcpip_thread_handle_msg+0x58>)
- 801131e: 4811 ldr r0, [pc, #68] @ (8011364 <tcpip_thread_handle_msg+0x5c>)
- 8011320: f002 f872 bl 8013408 <iprintf>
- break;
- }
- }
- 8011324: e008 b.n 8011338 <tcpip_thread_handle_msg+0x30>
- if (msg->msg.inp.input_fn(msg->msg.inp.p, msg->msg.inp.netif) != ERR_OK) {
- 8011326: 68c3 ldr r3, [r0, #12]
- 8011328: 6881 ldr r1, [r0, #8]
- 801132a: 6840 ldr r0, [r0, #4]
- 801132c: 4798 blx r3
- 801132e: b920 cbnz r0, 801133a <tcpip_thread_handle_msg+0x32>
- memp_free(MEMP_TCPIP_MSG_INPKT, msg);
- 8011330: 4621 mov r1, r4
- 8011332: 2009 movs r0, #9
- 8011334: f7fa f99c bl 800b670 <memp_free>
- }
- 8011338: bd10 pop {r4, pc}
- pbuf_free(msg->msg.inp.p);
- 801133a: 6860 ldr r0, [r4, #4]
- 801133c: f7fa fd30 bl 800bda0 <pbuf_free>
- 8011340: e7f6 b.n 8011330 <tcpip_thread_handle_msg+0x28>
- msg->msg.cb.function(msg->msg.cb.ctx);
- 8011342: 6843 ldr r3, [r0, #4]
- 8011344: 6880 ldr r0, [r0, #8]
- 8011346: 4798 blx r3
- memp_free(MEMP_TCPIP_MSG_API, msg);
- 8011348: 4621 mov r1, r4
- 801134a: 2008 movs r0, #8
- 801134c: f7fa f990 bl 800b670 <memp_free>
- break;
- 8011350: e7f2 b.n 8011338 <tcpip_thread_handle_msg+0x30>
- msg->msg.cb.function(msg->msg.cb.ctx);
- 8011352: 6843 ldr r3, [r0, #4]
- 8011354: 6880 ldr r0, [r0, #8]
- 8011356: 4798 blx r3
- break;
- 8011358: e7ee b.n 8011338 <tcpip_thread_handle_msg+0x30>
- 801135a: bf00 nop
- 801135c: 08017960 .word 0x08017960
- 8011360: 080179c0 .word 0x080179c0
- 8011364: 080144e8 .word 0x080144e8
- 08011368 <tcpip_thread>:
- {
- 8011368: b500 push {lr}
- 801136a: b083 sub sp, #12
- LWIP_MARK_TCPIP_THREAD();
- 801136c: f7f2 fc02 bl 8003b74 <sys_mark_tcpip_thread>
- LOCK_TCPIP_CORE();
- 8011370: f7f2 fbb2 bl 8003ad8 <sys_lock_tcpip_core>
- if (tcpip_init_done != NULL) {
- 8011374: 4b0b ldr r3, [pc, #44] @ (80113a4 <tcpip_thread+0x3c>)
- 8011376: 681b ldr r3, [r3, #0]
- 8011378: b12b cbz r3, 8011386 <tcpip_thread+0x1e>
- tcpip_init_done(tcpip_init_done_arg);
- 801137a: 4a0b ldr r2, [pc, #44] @ (80113a8 <tcpip_thread+0x40>)
- 801137c: 6810 ldr r0, [r2, #0]
- 801137e: 4798 blx r3
- 8011380: e001 b.n 8011386 <tcpip_thread+0x1e>
- tcpip_thread_handle_msg(msg);
- 8011382: f7ff ffc1 bl 8011308 <tcpip_thread_handle_msg>
- TCPIP_MBOX_FETCH(&tcpip_mbox, (void **)&msg);
- 8011386: a901 add r1, sp, #4
- 8011388: 4808 ldr r0, [pc, #32] @ (80113ac <tcpip_thread+0x44>)
- 801138a: f7ff ff93 bl 80112b4 <tcpip_timeouts_mbox_fetch>
- if (msg == NULL) {
- 801138e: 9801 ldr r0, [sp, #4]
- 8011390: 2800 cmp r0, #0
- 8011392: d1f6 bne.n 8011382 <tcpip_thread+0x1a>
- LWIP_ASSERT("tcpip_thread: invalid message", 0);
- 8011394: 4b06 ldr r3, [pc, #24] @ (80113b0 <tcpip_thread+0x48>)
- 8011396: 2291 movs r2, #145 @ 0x91
- 8011398: 4906 ldr r1, [pc, #24] @ (80113b4 <tcpip_thread+0x4c>)
- 801139a: 4807 ldr r0, [pc, #28] @ (80113b8 <tcpip_thread+0x50>)
- 801139c: f002 f834 bl 8013408 <iprintf>
- continue;
- 80113a0: e7f1 b.n 8011386 <tcpip_thread+0x1e>
- 80113a2: bf00 nop
- 80113a4: 24019c30 .word 0x24019c30
- 80113a8: 24019c2c .word 0x24019c2c
- 80113ac: 24019c28 .word 0x24019c28
- 80113b0: 08017960 .word 0x08017960
- 80113b4: 080179c0 .word 0x080179c0
- 80113b8: 080144e8 .word 0x080144e8
- 080113bc <tcpip_inpkt>:
- * @param inp the network interface on which the packet was received
- * @param input_fn input function to call
- */
- err_t
- tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn)
- {
- 80113bc: b5f8 push {r3, r4, r5, r6, r7, lr}
- 80113be: 4607 mov r7, r0
- 80113c0: 460e mov r6, r1
- 80113c2: 4615 mov r5, r2
- UNLOCK_TCPIP_CORE();
- return ret;
- #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */
- struct tcpip_msg *msg;
- LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox));
- 80113c4: 4812 ldr r0, [pc, #72] @ (8011410 <tcpip_inpkt+0x54>)
- 80113c6: f7fb fdcc bl 800cf62 <sys_mbox_valid>
- 80113ca: b178 cbz r0, 80113ec <tcpip_inpkt+0x30>
- msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT);
- 80113cc: 2009 movs r0, #9
- 80113ce: f7fa f919 bl 800b604 <memp_malloc>
- if (msg == NULL) {
- 80113d2: 4604 mov r4, r0
- 80113d4: b1c0 cbz r0, 8011408 <tcpip_inpkt+0x4c>
- return ERR_MEM;
- }
- msg->type = TCPIP_MSG_INPKT;
- 80113d6: 2300 movs r3, #0
- 80113d8: 7003 strb r3, [r0, #0]
- msg->msg.inp.p = p;
- 80113da: 6047 str r7, [r0, #4]
- msg->msg.inp.netif = inp;
- 80113dc: 6086 str r6, [r0, #8]
- msg->msg.inp.input_fn = input_fn;
- 80113de: 60c5 str r5, [r0, #12]
- if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) {
- 80113e0: 4601 mov r1, r0
- 80113e2: 480b ldr r0, [pc, #44] @ (8011410 <tcpip_inpkt+0x54>)
- 80113e4: f7fb fd81 bl 800ceea <sys_mbox_trypost>
- 80113e8: b938 cbnz r0, 80113fa <tcpip_inpkt+0x3e>
- memp_free(MEMP_TCPIP_MSG_INPKT, msg);
- return ERR_MEM;
- }
- return ERR_OK;
- #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */
- }
- 80113ea: bdf8 pop {r3, r4, r5, r6, r7, pc}
- LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox));
- 80113ec: 4b09 ldr r3, [pc, #36] @ (8011414 <tcpip_inpkt+0x58>)
- 80113ee: 22fc movs r2, #252 @ 0xfc
- 80113f0: 4909 ldr r1, [pc, #36] @ (8011418 <tcpip_inpkt+0x5c>)
- 80113f2: 480a ldr r0, [pc, #40] @ (801141c <tcpip_inpkt+0x60>)
- 80113f4: f002 f808 bl 8013408 <iprintf>
- 80113f8: e7e8 b.n 80113cc <tcpip_inpkt+0x10>
- memp_free(MEMP_TCPIP_MSG_INPKT, msg);
- 80113fa: 4621 mov r1, r4
- 80113fc: 2009 movs r0, #9
- 80113fe: f7fa f937 bl 800b670 <memp_free>
- return ERR_MEM;
- 8011402: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8011406: e7f0 b.n 80113ea <tcpip_inpkt+0x2e>
- return ERR_MEM;
- 8011408: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 801140c: e7ed b.n 80113ea <tcpip_inpkt+0x2e>
- 801140e: bf00 nop
- 8011410: 24019c28 .word 0x24019c28
- 8011414: 08017960 .word 0x08017960
- 8011418: 080179e0 .word 0x080179e0
- 801141c: 080144e8 .word 0x080144e8
- 08011420 <tcpip_input>:
- * NETIF_FLAG_ETHERNET flags)
- * @param inp the network interface on which the packet was received
- */
- err_t
- tcpip_input(struct pbuf *p, struct netif *inp)
- {
- 8011420: b508 push {r3, lr}
- #if LWIP_ETHERNET
- if (inp->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) {
- 8011422: f891 3031 ldrb.w r3, [r1, #49] @ 0x31
- 8011426: f013 0f18 tst.w r3, #24
- 801142a: d003 beq.n 8011434 <tcpip_input+0x14>
- return tcpip_inpkt(p, inp, ethernet_input);
- 801142c: 4a03 ldr r2, [pc, #12] @ (801143c <tcpip_input+0x1c>)
- 801142e: f7ff ffc5 bl 80113bc <tcpip_inpkt>
- } else
- #endif /* LWIP_ETHERNET */
- return tcpip_inpkt(p, inp, ip_input);
- }
- 8011432: bd08 pop {r3, pc}
- return tcpip_inpkt(p, inp, ip_input);
- 8011434: 4a02 ldr r2, [pc, #8] @ (8011440 <tcpip_input+0x20>)
- 8011436: f7ff ffc1 bl 80113bc <tcpip_inpkt>
- 801143a: e7fa b.n 8011432 <tcpip_input+0x12>
- 801143c: 08009c99 .word 0x08009c99
- 8011440: 0800a169 .word 0x0800a169
- 08011444 <tcpip_try_callback>:
- *
- * @see tcpip_callback
- */
- err_t
- tcpip_try_callback(tcpip_callback_fn function, void *ctx)
- {
- 8011444: b570 push {r4, r5, r6, lr}
- 8011446: 4606 mov r6, r0
- 8011448: 460d mov r5, r1
- struct tcpip_msg *msg;
- LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox));
- 801144a: 4812 ldr r0, [pc, #72] @ (8011494 <tcpip_try_callback+0x50>)
- 801144c: f7fb fd89 bl 800cf62 <sys_mbox_valid>
- 8011450: b170 cbz r0, 8011470 <tcpip_try_callback+0x2c>
- msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API);
- 8011452: 2008 movs r0, #8
- 8011454: f7fa f8d6 bl 800b604 <memp_malloc>
- if (msg == NULL) {
- 8011458: 4604 mov r4, r0
- 801145a: b1c0 cbz r0, 801148e <tcpip_try_callback+0x4a>
- return ERR_MEM;
- }
- msg->type = TCPIP_MSG_CALLBACK;
- 801145c: 2301 movs r3, #1
- 801145e: 7003 strb r3, [r0, #0]
- msg->msg.cb.function = function;
- 8011460: 6046 str r6, [r0, #4]
- msg->msg.cb.ctx = ctx;
- 8011462: 6085 str r5, [r0, #8]
- if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) {
- 8011464: 4601 mov r1, r0
- 8011466: 480b ldr r0, [pc, #44] @ (8011494 <tcpip_try_callback+0x50>)
- 8011468: f7fb fd3f bl 800ceea <sys_mbox_trypost>
- 801146c: b940 cbnz r0, 8011480 <tcpip_try_callback+0x3c>
- memp_free(MEMP_TCPIP_MSG_API, msg);
- return ERR_MEM;
- }
- return ERR_OK;
- }
- 801146e: bd70 pop {r4, r5, r6, pc}
- LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox));
- 8011470: 4b09 ldr r3, [pc, #36] @ (8011498 <tcpip_try_callback+0x54>)
- 8011472: f240 125d movw r2, #349 @ 0x15d
- 8011476: 4909 ldr r1, [pc, #36] @ (801149c <tcpip_try_callback+0x58>)
- 8011478: 4809 ldr r0, [pc, #36] @ (80114a0 <tcpip_try_callback+0x5c>)
- 801147a: f001 ffc5 bl 8013408 <iprintf>
- 801147e: e7e8 b.n 8011452 <tcpip_try_callback+0xe>
- memp_free(MEMP_TCPIP_MSG_API, msg);
- 8011480: 4621 mov r1, r4
- 8011482: 2008 movs r0, #8
- 8011484: f7fa f8f4 bl 800b670 <memp_free>
- return ERR_MEM;
- 8011488: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 801148c: e7ef b.n 801146e <tcpip_try_callback+0x2a>
- return ERR_MEM;
- 801148e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8011492: e7ec b.n 801146e <tcpip_try_callback+0x2a>
- 8011494: 24019c28 .word 0x24019c28
- 8011498: 08017960 .word 0x08017960
- 801149c: 080179e0 .word 0x080179e0
- 80114a0: 080144e8 .word 0x080144e8
- 080114a4 <tcpip_send_msg_wait_sem>:
- * @param sem semaphore to wait on
- * @return ERR_OK if the function was called, another err_t if not
- */
- err_t
- tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t *sem)
- {
- 80114a4: b538 push {r3, r4, r5, lr}
- 80114a6: 4604 mov r4, r0
- 80114a8: 460d mov r5, r1
- #if LWIP_TCPIP_CORE_LOCKING
- LWIP_UNUSED_ARG(sem);
- LOCK_TCPIP_CORE();
- 80114aa: f7f2 fb15 bl 8003ad8 <sys_lock_tcpip_core>
- fn(apimsg);
- 80114ae: 4628 mov r0, r5
- 80114b0: 47a0 blx r4
- UNLOCK_TCPIP_CORE();
- 80114b2: f7f2 fb1f bl 8003af4 <sys_unlock_tcpip_core>
- sys_mbox_post(&tcpip_mbox, &TCPIP_MSG_VAR_REF(msg));
- sys_arch_sem_wait(sem, 0);
- TCPIP_MSG_VAR_FREE(msg);
- return ERR_OK;
- #endif /* LWIP_TCPIP_CORE_LOCKING */
- }
- 80114b6: 2000 movs r0, #0
- 80114b8: bd38 pop {r3, r4, r5, pc}
- ...
- 080114bc <tcpip_init>:
- * @param initfunc a function to call when tcpip_thread is running and finished initializing
- * @param arg argument to pass to initfunc
- */
- void
- tcpip_init(tcpip_init_done_fn initfunc, void *arg)
- {
- 80114bc: b530 push {r4, r5, lr}
- 80114be: b083 sub sp, #12
- 80114c0: 4605 mov r5, r0
- 80114c2: 460c mov r4, r1
- lwip_init();
- 80114c4: f7f8 fdf2 bl 800a0ac <lwip_init>
- tcpip_init_done = initfunc;
- 80114c8: 4b13 ldr r3, [pc, #76] @ (8011518 <tcpip_init+0x5c>)
- 80114ca: 601d str r5, [r3, #0]
- tcpip_init_done_arg = arg;
- 80114cc: 4b13 ldr r3, [pc, #76] @ (801151c <tcpip_init+0x60>)
- 80114ce: 601c str r4, [r3, #0]
- if (sys_mbox_new(&tcpip_mbox, TCPIP_MBOX_SIZE) != ERR_OK) {
- 80114d0: 2106 movs r1, #6
- 80114d2: 4813 ldr r0, [pc, #76] @ (8011520 <tcpip_init+0x64>)
- 80114d4: f7fb fcf2 bl 800cebc <sys_mbox_new>
- 80114d8: b970 cbnz r0, 80114f8 <tcpip_init+0x3c>
- LWIP_ASSERT("failed to create tcpip_thread mbox", 0);
- }
- #if LWIP_TCPIP_CORE_LOCKING
- if (sys_mutex_new(&lock_tcpip_core) != ERR_OK) {
- 80114da: 4812 ldr r0, [pc, #72] @ (8011524 <tcpip_init+0x68>)
- 80114dc: f7fb fd9a bl 800d014 <sys_mutex_new>
- 80114e0: b990 cbnz r0, 8011508 <tcpip_init+0x4c>
- LWIP_ASSERT("failed to create lock_tcpip_core", 0);
- }
- #endif /* LWIP_TCPIP_CORE_LOCKING */
- sys_thread_new(TCPIP_THREAD_NAME, tcpip_thread, NULL, TCPIP_THREAD_STACKSIZE, TCPIP_THREAD_PRIO);
- 80114e2: 2330 movs r3, #48 @ 0x30
- 80114e4: 9300 str r3, [sp, #0]
- 80114e6: f44f 5380 mov.w r3, #4096 @ 0x1000
- 80114ea: 2200 movs r2, #0
- 80114ec: 490e ldr r1, [pc, #56] @ (8011528 <tcpip_init+0x6c>)
- 80114ee: 480f ldr r0, [pc, #60] @ (801152c <tcpip_init+0x70>)
- 80114f0: f7fb fda8 bl 800d044 <sys_thread_new>
- }
- 80114f4: b003 add sp, #12
- 80114f6: bd30 pop {r4, r5, pc}
- LWIP_ASSERT("failed to create tcpip_thread mbox", 0);
- 80114f8: 4b0d ldr r3, [pc, #52] @ (8011530 <tcpip_init+0x74>)
- 80114fa: f240 2261 movw r2, #609 @ 0x261
- 80114fe: 490d ldr r1, [pc, #52] @ (8011534 <tcpip_init+0x78>)
- 8011500: 480d ldr r0, [pc, #52] @ (8011538 <tcpip_init+0x7c>)
- 8011502: f001 ff81 bl 8013408 <iprintf>
- 8011506: e7e8 b.n 80114da <tcpip_init+0x1e>
- LWIP_ASSERT("failed to create lock_tcpip_core", 0);
- 8011508: 4b09 ldr r3, [pc, #36] @ (8011530 <tcpip_init+0x74>)
- 801150a: f240 2265 movw r2, #613 @ 0x265
- 801150e: 490b ldr r1, [pc, #44] @ (801153c <tcpip_init+0x80>)
- 8011510: 4809 ldr r0, [pc, #36] @ (8011538 <tcpip_init+0x7c>)
- 8011512: f001 ff79 bl 8013408 <iprintf>
- 8011516: e7e4 b.n 80114e2 <tcpip_init+0x26>
- 8011518: 24019c30 .word 0x24019c30
- 801151c: 24019c2c .word 0x24019c2c
- 8011520: 24019c28 .word 0x24019c28
- 8011524: 24019c24 .word 0x24019c24
- 8011528: 08011369 .word 0x08011369
- 801152c: 08017a38 .word 0x08017a38
- 8011530: 08017960 .word 0x08017960
- 8011534: 080179f0 .word 0x080179f0
- 8011538: 080144e8 .word 0x080144e8
- 801153c: 08017a14 .word 0x08017a14
- 08011540 <sys_timeout_abs>:
- #if LWIP_DEBUG_TIMERNAMES
- sys_timeout_abs(u32_t abs_time, sys_timeout_handler handler, void *arg, const char *handler_name)
- #else /* LWIP_DEBUG_TIMERNAMES */
- sys_timeout_abs(u32_t abs_time, sys_timeout_handler handler, void *arg)
- #endif
- {
- 8011540: b5f8 push {r3, r4, r5, r6, r7, lr}
- 8011542: 4604 mov r4, r0
- 8011544: 460f mov r7, r1
- 8011546: 4616 mov r6, r2
- struct sys_timeo *timeout, *t;
- timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT);
- 8011548: 200a movs r0, #10
- 801154a: f7fa f85b bl 800b604 <memp_malloc>
- if (timeout == NULL) {
- 801154e: b180 cbz r0, 8011572 <sys_timeout_abs+0x32>
- 8011550: 4605 mov r5, r0
- LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL);
- return;
- }
- timeout->next = NULL;
- 8011552: 2300 movs r3, #0
- 8011554: 6003 str r3, [r0, #0]
- timeout->h = handler;
- 8011556: 6087 str r7, [r0, #8]
- timeout->arg = arg;
- 8011558: 60c6 str r6, [r0, #12]
- timeout->time = abs_time;
- 801155a: 6044 str r4, [r0, #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) {
- 801155c: 4b10 ldr r3, [pc, #64] @ (80115a0 <sys_timeout_abs+0x60>)
- 801155e: 681a ldr r2, [r3, #0]
- 8011560: b172 cbz r2, 8011580 <sys_timeout_abs+0x40>
- next_timeout = timeout;
- return;
- }
- if (TIME_LESS_THAN(timeout->time, next_timeout->time)) {
- 8011562: 6853 ldr r3, [r2, #4]
- 8011564: 1ae3 subs r3, r4, r3
- 8011566: 2b00 cmp r3, #0
- 8011568: da0f bge.n 801158a <sys_timeout_abs+0x4a>
- timeout->next = next_timeout;
- 801156a: 6002 str r2, [r0, #0]
- next_timeout = timeout;
- 801156c: 4b0c ldr r3, [pc, #48] @ (80115a0 <sys_timeout_abs+0x60>)
- 801156e: 6018 str r0, [r3, #0]
- t->next = timeout;
- break;
- }
- }
- }
- }
- 8011570: bdf8 pop {r3, r4, r5, r6, r7, pc}
- LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL);
- 8011572: 4b0c ldr r3, [pc, #48] @ (80115a4 <sys_timeout_abs+0x64>)
- 8011574: 22be movs r2, #190 @ 0xbe
- 8011576: 490c ldr r1, [pc, #48] @ (80115a8 <sys_timeout_abs+0x68>)
- 8011578: 480c ldr r0, [pc, #48] @ (80115ac <sys_timeout_abs+0x6c>)
- 801157a: f001 ff45 bl 8013408 <iprintf>
- return;
- 801157e: e7f7 b.n 8011570 <sys_timeout_abs+0x30>
- next_timeout = timeout;
- 8011580: 6018 str r0, [r3, #0]
- return;
- 8011582: e7f5 b.n 8011570 <sys_timeout_abs+0x30>
- timeout->next = t->next;
- 8011584: 602b str r3, [r5, #0]
- t->next = timeout;
- 8011586: 6015 str r5, [r2, #0]
- break;
- 8011588: e7f2 b.n 8011570 <sys_timeout_abs+0x30>
- for (t = next_timeout; t != NULL; t = t->next) {
- 801158a: 2a00 cmp r2, #0
- 801158c: d0f0 beq.n 8011570 <sys_timeout_abs+0x30>
- if ((t->next == NULL) || TIME_LESS_THAN(timeout->time, t->next->time)) {
- 801158e: 6813 ldr r3, [r2, #0]
- 8011590: 2b00 cmp r3, #0
- 8011592: d0f7 beq.n 8011584 <sys_timeout_abs+0x44>
- 8011594: 6859 ldr r1, [r3, #4]
- 8011596: 1a61 subs r1, r4, r1
- 8011598: 2900 cmp r1, #0
- 801159a: dbf3 blt.n 8011584 <sys_timeout_abs+0x44>
- for (t = next_timeout; t != NULL; t = t->next) {
- 801159c: 461a mov r2, r3
- 801159e: e7f4 b.n 801158a <sys_timeout_abs+0x4a>
- 80115a0: 24019c3c .word 0x24019c3c
- 80115a4: 08017a48 .word 0x08017a48
- 80115a8: 08017aac .word 0x08017aac
- 80115ac: 080144e8 .word 0x080144e8
- 080115b0 <lwip_cyclic_timer>:
- #if !LWIP_TESTMODE
- static
- #endif
- void
- lwip_cyclic_timer(void *arg)
- {
- 80115b0: b538 push {r3, r4, r5, lr}
- 80115b2: 4604 mov r4, r0
- const struct lwip_cyclic_timer *cyclic = (const struct lwip_cyclic_timer *)arg;
- #if LWIP_DEBUG_TIMERNAMES
- LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: %s()\n", cyclic->handler_name));
- #endif
- cyclic->handler();
- 80115b4: 6843 ldr r3, [r0, #4]
- 80115b6: 4798 blx r3
- now = sys_now();
- 80115b8: f7f2 f85a bl 8003670 <sys_now>
- 80115bc: 4684 mov ip, r0
- next_timeout_time = (u32_t)(current_timeout_due_time + cyclic->interval_ms); /* overflow handled by TIME_LESS_THAN macro */
- 80115be: 6825 ldr r5, [r4, #0]
- 80115c0: 4b09 ldr r3, [pc, #36] @ (80115e8 <lwip_cyclic_timer+0x38>)
- 80115c2: 6818 ldr r0, [r3, #0]
- 80115c4: 4428 add r0, r5
- if (TIME_LESS_THAN(next_timeout_time, now)) {
- 80115c6: eba0 030c sub.w r3, r0, ip
- 80115ca: 2b00 cmp r3, #0
- 80115cc: da06 bge.n 80115dc <lwip_cyclic_timer+0x2c>
- /* 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);
- 80115ce: 4622 mov r2, r4
- 80115d0: 4906 ldr r1, [pc, #24] @ (80115ec <lwip_cyclic_timer+0x3c>)
- 80115d2: eb05 000c add.w r0, r5, ip
- 80115d6: f7ff ffb3 bl 8011540 <sys_timeout_abs>
- sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg, cyclic->handler_name);
- #else
- sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg);
- #endif
- }
- }
- 80115da: bd38 pop {r3, r4, r5, pc}
- sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg);
- 80115dc: 4622 mov r2, r4
- 80115de: 4903 ldr r1, [pc, #12] @ (80115ec <lwip_cyclic_timer+0x3c>)
- 80115e0: f7ff ffae bl 8011540 <sys_timeout_abs>
- }
- 80115e4: e7f9 b.n 80115da <lwip_cyclic_timer+0x2a>
- 80115e6: bf00 nop
- 80115e8: 24019c38 .word 0x24019c38
- 80115ec: 080115b1 .word 0x080115b1
- 080115f0 <sys_timeout>:
- sys_timeout_debug(u32_t msecs, sys_timeout_handler handler, void *arg, const char *handler_name)
- #else /* LWIP_DEBUG_TIMERNAMES */
- void
- sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg)
- #endif /* LWIP_DEBUG_TIMERNAMES */
- {
- 80115f0: b570 push {r4, r5, r6, lr}
- 80115f2: 4604 mov r4, r0
- 80115f4: 460d mov r5, r1
- 80115f6: 4616 mov r6, r2
- u32_t next_timeout_time;
- LWIP_ASSERT_CORE_LOCKED();
- 80115f8: f7f2 fa88 bl 8003b0c <sys_check_core_locking>
- LWIP_ASSERT("Timeout time too long, max is LWIP_UINT32_MAX/4 msecs", msecs <= (LWIP_UINT32_MAX / 4));
- 80115fc: f1b4 4f80 cmp.w r4, #1073741824 @ 0x40000000
- 8011600: d207 bcs.n 8011612 <sys_timeout+0x22>
- next_timeout_time = (u32_t)(sys_now() + msecs); /* overflow handled by TIME_LESS_THAN macro */
- 8011602: f7f2 f835 bl 8003670 <sys_now>
- #if LWIP_DEBUG_TIMERNAMES
- sys_timeout_abs(next_timeout_time, handler, arg, handler_name);
- #else
- sys_timeout_abs(next_timeout_time, handler, arg);
- 8011606: 4632 mov r2, r6
- 8011608: 4629 mov r1, r5
- 801160a: 4420 add r0, r4
- 801160c: f7ff ff98 bl 8011540 <sys_timeout_abs>
- #endif
- }
- 8011610: bd70 pop {r4, r5, r6, pc}
- LWIP_ASSERT("Timeout time too long, max is LWIP_UINT32_MAX/4 msecs", msecs <= (LWIP_UINT32_MAX / 4));
- 8011612: 4b04 ldr r3, [pc, #16] @ (8011624 <sys_timeout+0x34>)
- 8011614: f240 1229 movw r2, #297 @ 0x129
- 8011618: 4903 ldr r1, [pc, #12] @ (8011628 <sys_timeout+0x38>)
- 801161a: 4804 ldr r0, [pc, #16] @ (801162c <sys_timeout+0x3c>)
- 801161c: f001 fef4 bl 8013408 <iprintf>
- 8011620: e7ef b.n 8011602 <sys_timeout+0x12>
- 8011622: bf00 nop
- 8011624: 08017a48 .word 0x08017a48
- 8011628: 08017aec .word 0x08017aec
- 801162c: 080144e8 .word 0x080144e8
- 08011630 <tcp_timer_needed>:
- {
- 8011630: b508 push {r3, lr}
- LWIP_ASSERT_CORE_LOCKED();
- 8011632: f7f2 fa6b bl 8003b0c <sys_check_core_locking>
- if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) {
- 8011636: 4b0a ldr r3, [pc, #40] @ (8011660 <tcp_timer_needed+0x30>)
- 8011638: 681b ldr r3, [r3, #0]
- 801163a: b953 cbnz r3, 8011652 <tcp_timer_needed+0x22>
- 801163c: 4b09 ldr r3, [pc, #36] @ (8011664 <tcp_timer_needed+0x34>)
- 801163e: 681b ldr r3, [r3, #0]
- 8011640: b143 cbz r3, 8011654 <tcp_timer_needed+0x24>
- tcpip_tcp_timer_active = 1;
- 8011642: 4b07 ldr r3, [pc, #28] @ (8011660 <tcp_timer_needed+0x30>)
- 8011644: 2201 movs r2, #1
- 8011646: 601a str r2, [r3, #0]
- sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);
- 8011648: 2200 movs r2, #0
- 801164a: 4907 ldr r1, [pc, #28] @ (8011668 <tcp_timer_needed+0x38>)
- 801164c: 20fa movs r0, #250 @ 0xfa
- 801164e: f7ff ffcf bl 80115f0 <sys_timeout>
- }
- 8011652: bd08 pop {r3, pc}
- if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) {
- 8011654: 4b05 ldr r3, [pc, #20] @ (801166c <tcp_timer_needed+0x3c>)
- 8011656: 681b ldr r3, [r3, #0]
- 8011658: 2b00 cmp r3, #0
- 801165a: d1f2 bne.n 8011642 <tcp_timer_needed+0x12>
- 801165c: e7f9 b.n 8011652 <tcp_timer_needed+0x22>
- 801165e: bf00 nop
- 8011660: 24019c34 .word 0x24019c34
- 8011664: 24019bd8 .word 0x24019bd8
- 8011668: 08011671 .word 0x08011671
- 801166c: 24019bd4 .word 0x24019bd4
- 08011670 <tcpip_tcp_timer>:
- {
- 8011670: b508 push {r3, lr}
- tcp_tmr();
- 8011672: f7fc fead bl 800e3d0 <tcp_tmr>
- if (tcp_active_pcbs || tcp_tw_pcbs) {
- 8011676: 4b08 ldr r3, [pc, #32] @ (8011698 <tcpip_tcp_timer+0x28>)
- 8011678: 681b ldr r3, [r3, #0]
- 801167a: b12b cbz r3, 8011688 <tcpip_tcp_timer+0x18>
- sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);
- 801167c: 2200 movs r2, #0
- 801167e: 4907 ldr r1, [pc, #28] @ (801169c <tcpip_tcp_timer+0x2c>)
- 8011680: 20fa movs r0, #250 @ 0xfa
- 8011682: f7ff ffb5 bl 80115f0 <sys_timeout>
- }
- 8011686: bd08 pop {r3, pc}
- if (tcp_active_pcbs || tcp_tw_pcbs) {
- 8011688: 4b05 ldr r3, [pc, #20] @ (80116a0 <tcpip_tcp_timer+0x30>)
- 801168a: 681b ldr r3, [r3, #0]
- 801168c: 2b00 cmp r3, #0
- 801168e: d1f5 bne.n 801167c <tcpip_tcp_timer+0xc>
- tcpip_tcp_timer_active = 0;
- 8011690: 4b04 ldr r3, [pc, #16] @ (80116a4 <tcpip_tcp_timer+0x34>)
- 8011692: 2200 movs r2, #0
- 8011694: 601a str r2, [r3, #0]
- }
- 8011696: e7f6 b.n 8011686 <tcpip_tcp_timer+0x16>
- 8011698: 24019bd8 .word 0x24019bd8
- 801169c: 08011671 .word 0x08011671
- 80116a0: 24019bd4 .word 0x24019bd4
- 80116a4: 24019c34 .word 0x24019c34
- 080116a8 <sys_timeouts_init>:
- {
- 80116a8: b510 push {r4, lr}
- for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) {
- 80116aa: 2401 movs r4, #1
- 80116ac: e008 b.n 80116c0 <sys_timeouts_init+0x18>
- sys_timeout(lwip_cyclic_timers[i].interval_ms, lwip_cyclic_timer, LWIP_CONST_CAST(void *, &lwip_cyclic_timers[i]));
- 80116ae: 4b06 ldr r3, [pc, #24] @ (80116c8 <sys_timeouts_init+0x20>)
- 80116b0: eb03 02c4 add.w r2, r3, r4, lsl #3
- 80116b4: 4905 ldr r1, [pc, #20] @ (80116cc <sys_timeouts_init+0x24>)
- 80116b6: f853 0034 ldr.w r0, [r3, r4, lsl #3]
- 80116ba: f7ff ff99 bl 80115f0 <sys_timeout>
- for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) {
- 80116be: 3401 adds r4, #1
- 80116c0: 2c04 cmp r4, #4
- 80116c2: d9f4 bls.n 80116ae <sys_timeouts_init+0x6>
- }
- 80116c4: bd10 pop {r4, pc}
- 80116c6: bf00 nop
- 80116c8: 08017b38 .word 0x08017b38
- 80116cc: 080115b1 .word 0x080115b1
- 080116d0 <sys_check_timeouts>:
- *
- * Must be called periodically from your main loop.
- */
- void
- sys_check_timeouts(void)
- {
- 80116d0: b570 push {r4, r5, r6, lr}
- u32_t now;
- LWIP_ASSERT_CORE_LOCKED();
- 80116d2: f7f2 fa1b bl 8003b0c <sys_check_core_locking>
- /* Process only timers expired at the start of the function. */
- now = sys_now();
- 80116d6: f7f1 ffcb bl 8003670 <sys_now>
- 80116da: 4605 mov r5, r0
- sys_timeout_handler handler;
- void *arg;
- PBUF_CHECK_FREE_OOSEQ();
- tmptimeout = next_timeout;
- 80116dc: 4b0b ldr r3, [pc, #44] @ (801170c <sys_check_timeouts+0x3c>)
- 80116de: 6819 ldr r1, [r3, #0]
- if (tmptimeout == NULL) {
- 80116e0: b191 cbz r1, 8011708 <sys_check_timeouts+0x38>
- return;
- }
- if (TIME_LESS_THAN(now, tmptimeout->time)) {
- 80116e2: 684b ldr r3, [r1, #4]
- 80116e4: 1aea subs r2, r5, r3
- 80116e6: 2a00 cmp r2, #0
- 80116e8: db0e blt.n 8011708 <sys_check_timeouts+0x38>
- return;
- }
- /* Timeout has expired */
- next_timeout = tmptimeout->next;
- 80116ea: 6808 ldr r0, [r1, #0]
- 80116ec: 4a07 ldr r2, [pc, #28] @ (801170c <sys_check_timeouts+0x3c>)
- 80116ee: 6010 str r0, [r2, #0]
- handler = tmptimeout->h;
- 80116f0: 688c ldr r4, [r1, #8]
- arg = tmptimeout->arg;
- 80116f2: 68ce ldr r6, [r1, #12]
- current_timeout_due_time = tmptimeout->time;
- 80116f4: 4a06 ldr r2, [pc, #24] @ (8011710 <sys_check_timeouts+0x40>)
- 80116f6: 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);
- 80116f8: 200a movs r0, #10
- 80116fa: f7f9 ffb9 bl 800b670 <memp_free>
- if (handler != NULL) {
- 80116fe: 2c00 cmp r4, #0
- 8011700: d0ec beq.n 80116dc <sys_check_timeouts+0xc>
- handler(arg);
- 8011702: 4630 mov r0, r6
- 8011704: 47a0 blx r4
- 8011706: e7e9 b.n 80116dc <sys_check_timeouts+0xc>
- }
- LWIP_TCPIP_THREAD_ALIVE();
- /* Repeat until all expired timers have been called */
- } while (1);
- }
- 8011708: bd70 pop {r4, r5, r6, pc}
- 801170a: bf00 nop
- 801170c: 24019c3c .word 0x24019c3c
- 8011710: 24019c38 .word 0x24019c38
- 08011714 <sys_timeouts_sleeptime>:
- /** Return the time left before the next timeout is due. If no timeouts are
- * enqueued, returns 0xffffffff
- */
- u32_t
- sys_timeouts_sleeptime(void)
- {
- 8011714: b510 push {r4, lr}
- u32_t now;
- LWIP_ASSERT_CORE_LOCKED();
- 8011716: f7f2 f9f9 bl 8003b0c <sys_check_core_locking>
- if (next_timeout == NULL) {
- 801171a: 4b0d ldr r3, [pc, #52] @ (8011750 <sys_timeouts_sleeptime+0x3c>)
- 801171c: 681b ldr r3, [r3, #0]
- 801171e: b183 cbz r3, 8011742 <sys_timeouts_sleeptime+0x2e>
- return SYS_TIMEOUTS_SLEEPTIME_INFINITE;
- }
- now = sys_now();
- 8011720: f7f1 ffa6 bl 8003670 <sys_now>
- if (TIME_LESS_THAN(next_timeout->time, now)) {
- 8011724: 4b0a ldr r3, [pc, #40] @ (8011750 <sys_timeouts_sleeptime+0x3c>)
- 8011726: 681b ldr r3, [r3, #0]
- 8011728: 685c ldr r4, [r3, #4]
- 801172a: 1a24 subs r4, r4, r0
- 801172c: d40c bmi.n 8011748 <sys_timeouts_sleeptime+0x34>
- return 0;
- } else {
- u32_t ret = (u32_t)(next_timeout->time - now);
- LWIP_ASSERT("invalid sleeptime", ret <= LWIP_MAX_TIMEOUT);
- 801172e: 2c00 cmp r4, #0
- 8011730: da0b bge.n 801174a <sys_timeouts_sleeptime+0x36>
- 8011732: 4b08 ldr r3, [pc, #32] @ (8011754 <sys_timeouts_sleeptime+0x40>)
- 8011734: f44f 72dc mov.w r2, #440 @ 0x1b8
- 8011738: 4907 ldr r1, [pc, #28] @ (8011758 <sys_timeouts_sleeptime+0x44>)
- 801173a: 4808 ldr r0, [pc, #32] @ (801175c <sys_timeouts_sleeptime+0x48>)
- 801173c: f001 fe64 bl 8013408 <iprintf>
- return ret;
- 8011740: e003 b.n 801174a <sys_timeouts_sleeptime+0x36>
- return SYS_TIMEOUTS_SLEEPTIME_INFINITE;
- 8011742: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
- 8011746: e000 b.n 801174a <sys_timeouts_sleeptime+0x36>
- return 0;
- 8011748: 2400 movs r4, #0
- }
- }
- 801174a: 4620 mov r0, r4
- 801174c: bd10 pop {r4, pc}
- 801174e: bf00 nop
- 8011750: 24019c3c .word 0x24019c3c
- 8011754: 08017a48 .word 0x08017a48
- 8011758: 08017b24 .word 0x08017b24
- 801175c: 080144e8 .word 0x080144e8
- 08011760 <udp_new_port>:
- * @return a new (free) local UDP port number
- */
- static u16_t
- udp_new_port(void)
- {
- u16_t n = 0;
- 8011760: 2000 movs r0, #0
- struct udp_pcb *pcb;
- again:
- if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) {
- 8011762: 4a10 ldr r2, [pc, #64] @ (80117a4 <udp_new_port+0x44>)
- 8011764: 8813 ldrh r3, [r2, #0]
- 8011766: 1c59 adds r1, r3, #1
- 8011768: 8011 strh r1, [r2, #0]
- 801176a: f64f 72ff movw r2, #65535 @ 0xffff
- 801176e: 4293 cmp r3, r2
- 8011770: d009 beq.n 8011786 <udp_new_port+0x26>
- udp_port = UDP_LOCAL_PORT_RANGE_START;
- }
- /* Check all PCBs. */
- for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
- 8011772: 4b0d ldr r3, [pc, #52] @ (80117a8 <udp_new_port+0x48>)
- 8011774: 681b ldr r3, [r3, #0]
- 8011776: b193 cbz r3, 801179e <udp_new_port+0x3e>
- if (pcb->local_port == udp_port) {
- 8011778: 8a59 ldrh r1, [r3, #18]
- 801177a: 4a0a ldr r2, [pc, #40] @ (80117a4 <udp_new_port+0x44>)
- 801177c: 8812 ldrh r2, [r2, #0]
- 801177e: 4291 cmp r1, r2
- 8011780: d006 beq.n 8011790 <udp_new_port+0x30>
- for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
- 8011782: 68db ldr r3, [r3, #12]
- 8011784: e7f7 b.n 8011776 <udp_new_port+0x16>
- udp_port = UDP_LOCAL_PORT_RANGE_START;
- 8011786: 4b07 ldr r3, [pc, #28] @ (80117a4 <udp_new_port+0x44>)
- 8011788: f44f 4240 mov.w r2, #49152 @ 0xc000
- 801178c: 801a strh r2, [r3, #0]
- 801178e: e7f0 b.n 8011772 <udp_new_port+0x12>
- if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) {
- 8011790: 3001 adds r0, #1
- 8011792: b280 uxth r0, r0
- 8011794: f5b0 4f80 cmp.w r0, #16384 @ 0x4000
- 8011798: d3e3 bcc.n 8011762 <udp_new_port+0x2>
- return 0;
- 801179a: 2000 movs r0, #0
- }
- goto again;
- }
- }
- return udp_port;
- }
- 801179c: 4770 bx lr
- return udp_port;
- 801179e: 4b01 ldr r3, [pc, #4] @ (80117a4 <udp_new_port+0x44>)
- 80117a0: 8818 ldrh r0, [r3, #0]
- 80117a2: 4770 bx lr
- 80117a4: 2400002e .word 0x2400002e
- 80117a8: 24019c40 .word 0x24019c40
- 080117ac <udp_input_local_match>:
- * @param broadcast 1 if his is an IPv4 broadcast (global or subnet-only), 0 otherwise (only used for IPv4)
- * @return 1 on match, 0 otherwise
- */
- static u8_t
- udp_input_local_match(struct udp_pcb *pcb, struct netif *inp, u8_t broadcast)
- {
- 80117ac: b5f8 push {r3, r4, r5, r6, r7, lr}
- 80117ae: 460e mov r6, r1
- 80117b0: 4615 mov r5, r2
- 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);
- 80117b2: 4607 mov r7, r0
- 80117b4: b1c8 cbz r0, 80117ea <udp_input_local_match+0x3e>
- LWIP_ASSERT("udp_input_local_match: invalid netif", inp != NULL);
- 80117b6: b1fe cbz r6, 80117f8 <udp_input_local_match+0x4c>
- /* check if PCB is bound to specific netif */
- if ((pcb->netif_idx != NETIF_NO_INDEX) &&
- 80117b8: 7a3c ldrb r4, [r7, #8]
- 80117ba: b13c cbz r4, 80117cc <udp_input_local_match+0x20>
- (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
- 80117bc: 4b1e ldr r3, [pc, #120] @ (8011838 <udp_input_local_match+0x8c>)
- 80117be: 685b ldr r3, [r3, #4]
- 80117c0: f893 3034 ldrb.w r3, [r3, #52] @ 0x34
- 80117c4: 3301 adds r3, #1
- 80117c6: b2db uxtb r3, r3
- if ((pcb->netif_idx != NETIF_NO_INDEX) &&
- 80117c8: 429c cmp r4, r3
- 80117ca: d125 bne.n 8011818 <udp_input_local_match+0x6c>
- /* 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) {
- 80117cc: b1dd cbz r5, 8011806 <udp_input_local_match+0x5a>
- #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)) ||
- 80117ce: b32f cbz r7, 801181c <udp_input_local_match+0x70>
- 80117d0: 683b ldr r3, [r7, #0]
- 80117d2: b32b cbz r3, 8011820 <udp_input_local_match+0x74>
- ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) ||
- 80117d4: 4a18 ldr r2, [pc, #96] @ (8011838 <udp_input_local_match+0x8c>)
- 80117d6: 6952 ldr r2, [r2, #20]
- if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
- 80117d8: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff
- 80117dc: d022 beq.n 8011824 <udp_input_local_match+0x78>
- ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) {
- 80117de: 68b1 ldr r1, [r6, #8]
- 80117e0: 4053 eors r3, r2
- ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) ||
- 80117e2: 420b tst r3, r1
- 80117e4: d020 beq.n 8011828 <udp_input_local_match+0x7c>
- if (ip_addr_isany(&pcb->local_ip) || ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
- return 1;
- }
- }
- return 0;
- 80117e6: 2000 movs r0, #0
- 80117e8: e017 b.n 801181a <udp_input_local_match+0x6e>
- LWIP_ASSERT("udp_input_local_match: invalid pcb", pcb != NULL);
- 80117ea: 4b14 ldr r3, [pc, #80] @ (801183c <udp_input_local_match+0x90>)
- 80117ec: 2287 movs r2, #135 @ 0x87
- 80117ee: 4914 ldr r1, [pc, #80] @ (8011840 <udp_input_local_match+0x94>)
- 80117f0: 4814 ldr r0, [pc, #80] @ (8011844 <udp_input_local_match+0x98>)
- 80117f2: f001 fe09 bl 8013408 <iprintf>
- 80117f6: e7de b.n 80117b6 <udp_input_local_match+0xa>
- LWIP_ASSERT("udp_input_local_match: invalid netif", inp != NULL);
- 80117f8: 4b10 ldr r3, [pc, #64] @ (801183c <udp_input_local_match+0x90>)
- 80117fa: 2288 movs r2, #136 @ 0x88
- 80117fc: 4912 ldr r1, [pc, #72] @ (8011848 <udp_input_local_match+0x9c>)
- 80117fe: 4811 ldr r0, [pc, #68] @ (8011844 <udp_input_local_match+0x98>)
- 8011800: f001 fe02 bl 8013408 <iprintf>
- 8011804: e7d8 b.n 80117b8 <udp_input_local_match+0xc>
- if (ip_addr_isany(&pcb->local_ip) || ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
- 8011806: b18f cbz r7, 801182c <udp_input_local_match+0x80>
- 8011808: 683b ldr r3, [r7, #0]
- 801180a: b18b cbz r3, 8011830 <udp_input_local_match+0x84>
- 801180c: 4a0a ldr r2, [pc, #40] @ (8011838 <udp_input_local_match+0x8c>)
- 801180e: 6952 ldr r2, [r2, #20]
- 8011810: 4293 cmp r3, r2
- 8011812: d00f beq.n 8011834 <udp_input_local_match+0x88>
- return 0;
- 8011814: 4628 mov r0, r5
- 8011816: e000 b.n 801181a <udp_input_local_match+0x6e>
- return 0;
- 8011818: 2000 movs r0, #0
- }
- 801181a: bdf8 pop {r3, r4, r5, r6, r7, pc}
- return 1;
- 801181c: 2001 movs r0, #1
- 801181e: e7fc b.n 801181a <udp_input_local_match+0x6e>
- 8011820: 2001 movs r0, #1
- 8011822: e7fa b.n 801181a <udp_input_local_match+0x6e>
- 8011824: 2001 movs r0, #1
- 8011826: e7f8 b.n 801181a <udp_input_local_match+0x6e>
- 8011828: 2001 movs r0, #1
- 801182a: e7f6 b.n 801181a <udp_input_local_match+0x6e>
- return 1;
- 801182c: 2001 movs r0, #1
- 801182e: e7f4 b.n 801181a <udp_input_local_match+0x6e>
- 8011830: 2001 movs r0, #1
- 8011832: e7f2 b.n 801181a <udp_input_local_match+0x6e>
- 8011834: 2001 movs r0, #1
- 8011836: e7f0 b.n 801181a <udp_input_local_match+0x6e>
- 8011838: 2401301c .word 0x2401301c
- 801183c: 08017b60 .word 0x08017b60
- 8011840: 08017bc0 .word 0x08017bc0
- 8011844: 080144e8 .word 0x080144e8
- 8011848: 08017be4 .word 0x08017be4
- 0801184c <udp_init>:
- {
- 801184c: b508 push {r3, lr}
- udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());
- 801184e: f001 fc2f bl 80130b0 <rand>
- 8011852: 4b02 ldr r3, [pc, #8] @ (801185c <udp_init+0x10>)
- 8011854: 4303 orrs r3, r0
- 8011856: 4a02 ldr r2, [pc, #8] @ (8011860 <udp_init+0x14>)
- 8011858: 8013 strh r3, [r2, #0]
- }
- 801185a: bd08 pop {r3, pc}
- 801185c: ffffc000 .word 0xffffc000
- 8011860: 2400002e .word 0x2400002e
- 08011864 <udp_input>:
- * @param inp network interface on which the datagram was received.
- *
- */
- void
- udp_input(struct pbuf *p, struct netif *inp)
- {
- 8011864: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 8011868: b083 sub sp, #12
- 801186a: 4680 mov r8, r0
- 801186c: 460f mov r7, r1
- u8_t broadcast;
- u8_t for_us = 0;
- LWIP_UNUSED_ARG(inp);
- LWIP_ASSERT_CORE_LOCKED();
- 801186e: f7f2 f94d bl 8003b0c <sys_check_core_locking>
- LWIP_ASSERT("udp_input: invalid pbuf", p != NULL);
- 8011872: f1b8 0f00 cmp.w r8, #0
- 8011876: d01a beq.n 80118ae <udp_input+0x4a>
- LWIP_ASSERT("udp_input: invalid netif", inp != NULL);
- 8011878: b307 cbz r7, 80118bc <udp_input+0x58>
- PERF_START;
- UDP_STATS_INC(udp.recv);
- /* Check minimum length (UDP header) */
- if (p->len < UDP_HLEN) {
- 801187a: f8b8 300a ldrh.w r3, [r8, #10]
- 801187e: 2b07 cmp r3, #7
- 8011880: d923 bls.n 80118ca <udp_input+0x66>
- MIB2_STATS_INC(mib2.udpinerrors);
- pbuf_free(p);
- goto end;
- }
- udphdr = (struct udp_hdr *)p->payload;
- 8011882: f8d8 4004 ldr.w r4, [r8, #4]
- /* is broadcast packet ? */
- broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif());
- 8011886: 4b53 ldr r3, [pc, #332] @ (80119d4 <udp_input+0x170>)
- 8011888: 6819 ldr r1, [r3, #0]
- 801188a: 6958 ldr r0, [r3, #20]
- 801188c: f7f8 fde1 bl 800a452 <ip4_addr_isbroadcast_u32>
- 8011890: 4681 mov r9, r0
- 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);
- 8011892: 8820 ldrh r0, [r4, #0]
- 8011894: f7f6 faf2 bl 8007e7c <lwip_htons>
- 8011898: 4682 mov sl, r0
- dest = lwip_ntohs(udphdr->dest);
- 801189a: 8860 ldrh r0, [r4, #2]
- 801189c: f7f6 faee bl 8007e7c <lwip_htons>
- 80118a0: 4605 mov r5, r0
- uncon_pcb = NULL;
- /* 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) {
- 80118a2: 4b4d ldr r3, [pc, #308] @ (80119d8 <udp_input+0x174>)
- 80118a4: 681c ldr r4, [r3, #0]
- uncon_pcb = NULL;
- 80118a6: f04f 0b00 mov.w fp, #0
- prev = NULL;
- 80118aa: 465e mov r6, fp
- for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
- 80118ac: e019 b.n 80118e2 <udp_input+0x7e>
- LWIP_ASSERT("udp_input: invalid pbuf", p != NULL);
- 80118ae: 4b4b ldr r3, [pc, #300] @ (80119dc <udp_input+0x178>)
- 80118b0: 22cf movs r2, #207 @ 0xcf
- 80118b2: 494b ldr r1, [pc, #300] @ (80119e0 <udp_input+0x17c>)
- 80118b4: 484b ldr r0, [pc, #300] @ (80119e4 <udp_input+0x180>)
- 80118b6: f001 fda7 bl 8013408 <iprintf>
- 80118ba: e7dd b.n 8011878 <udp_input+0x14>
- LWIP_ASSERT("udp_input: invalid netif", inp != NULL);
- 80118bc: 4b47 ldr r3, [pc, #284] @ (80119dc <udp_input+0x178>)
- 80118be: 22d0 movs r2, #208 @ 0xd0
- 80118c0: 4949 ldr r1, [pc, #292] @ (80119e8 <udp_input+0x184>)
- 80118c2: 4848 ldr r0, [pc, #288] @ (80119e4 <udp_input+0x180>)
- 80118c4: f001 fda0 bl 8013408 <iprintf>
- 80118c8: e7d7 b.n 801187a <udp_input+0x16>
- pbuf_free(p);
- 80118ca: 4640 mov r0, r8
- 80118cc: f7fa fa68 bl 800bda0 <pbuf_free>
- UDP_STATS_INC(udp.drop);
- MIB2_STATS_INC(mib2.udpinerrors);
- pbuf_free(p);
- PERF_STOP("udp_input");
- #endif /* CHECKSUM_CHECK_UDP */
- }
- 80118d0: b003 add sp, #12
- 80118d2: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
- uncon_pcb = pcb;
- 80118d6: 46a3 mov fp, r4
- if ((pcb->remote_port == src) &&
- 80118d8: 8aa3 ldrh r3, [r4, #20]
- 80118da: 459a cmp sl, r3
- 80118dc: d026 beq.n 801192c <udp_input+0xc8>
- prev = pcb;
- 80118de: 4626 mov r6, r4
- for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
- 80118e0: 68e4 ldr r4, [r4, #12]
- 80118e2: 2c00 cmp r4, #0
- 80118e4: d030 beq.n 8011948 <udp_input+0xe4>
- if ((pcb->local_port == dest) &&
- 80118e6: 8a63 ldrh r3, [r4, #18]
- 80118e8: 429d cmp r5, r3
- 80118ea: d1f8 bne.n 80118de <udp_input+0x7a>
- (udp_input_local_match(pcb, inp, broadcast) != 0)) {
- 80118ec: 464a mov r2, r9
- 80118ee: 4639 mov r1, r7
- 80118f0: 4620 mov r0, r4
- 80118f2: f7ff ff5b bl 80117ac <udp_input_local_match>
- if ((pcb->local_port == dest) &&
- 80118f6: 2800 cmp r0, #0
- 80118f8: d0f1 beq.n 80118de <udp_input+0x7a>
- if ((pcb->flags & UDP_FLAGS_CONNECTED) == 0) {
- 80118fa: 7c23 ldrb r3, [r4, #16]
- 80118fc: f013 0f04 tst.w r3, #4
- 8011900: d1ea bne.n 80118d8 <udp_input+0x74>
- if (uncon_pcb == NULL) {
- 8011902: f1bb 0f00 cmp.w fp, #0
- 8011906: d0e6 beq.n 80118d6 <udp_input+0x72>
- } else if (broadcast && ip4_current_dest_addr()->addr == IPADDR_BROADCAST) {
- 8011908: f1b9 0f00 cmp.w r9, #0
- 801190c: d0e4 beq.n 80118d8 <udp_input+0x74>
- 801190e: 4b31 ldr r3, [pc, #196] @ (80119d4 <udp_input+0x170>)
- 8011910: 695b ldr r3, [r3, #20]
- 8011912: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
- 8011916: d1df bne.n 80118d8 <udp_input+0x74>
- if (!IP_IS_V4_VAL(uncon_pcb->local_ip) || !ip4_addr_cmp(ip_2_ip4(&uncon_pcb->local_ip), netif_ip4_addr(inp))) {
- 8011918: f8db 2000 ldr.w r2, [fp]
- 801191c: 687b ldr r3, [r7, #4]
- 801191e: 429a cmp r2, r3
- 8011920: d0da beq.n 80118d8 <udp_input+0x74>
- if (IP_IS_V4_VAL(pcb->local_ip) && ip4_addr_cmp(ip_2_ip4(&pcb->local_ip), netif_ip4_addr(inp))) {
- 8011922: 6822 ldr r2, [r4, #0]
- 8011924: 4293 cmp r3, r2
- 8011926: d1d7 bne.n 80118d8 <udp_input+0x74>
- uncon_pcb = pcb;
- 8011928: 46a3 mov fp, r4
- 801192a: e7d5 b.n 80118d8 <udp_input+0x74>
- (ip_addr_isany_val(pcb->remote_ip) ||
- 801192c: 6863 ldr r3, [r4, #4]
- if ((pcb->remote_port == src) &&
- 801192e: b11b cbz r3, 8011938 <udp_input+0xd4>
- ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) {
- 8011930: 4a28 ldr r2, [pc, #160] @ (80119d4 <udp_input+0x170>)
- 8011932: 6912 ldr r2, [r2, #16]
- (ip_addr_isany_val(pcb->remote_ip) ||
- 8011934: 4293 cmp r3, r2
- 8011936: d1d2 bne.n 80118de <udp_input+0x7a>
- if (prev != NULL) {
- 8011938: b136 cbz r6, 8011948 <udp_input+0xe4>
- prev->next = pcb->next;
- 801193a: 68e3 ldr r3, [r4, #12]
- 801193c: 60f3 str r3, [r6, #12]
- pcb->next = udp_pcbs;
- 801193e: 4b26 ldr r3, [pc, #152] @ (80119d8 <udp_input+0x174>)
- 8011940: 681a ldr r2, [r3, #0]
- 8011942: 60e2 str r2, [r4, #12]
- udp_pcbs = pcb;
- 8011944: 601c str r4, [r3, #0]
- if (pcb == NULL) {
- 8011946: e011 b.n 801196c <udp_input+0x108>
- 8011948: b17c cbz r4, 801196a <udp_input+0x106>
- if (pbuf_remove_header(p, UDP_HLEN)) {
- 801194a: 2108 movs r1, #8
- 801194c: 4640 mov r0, r8
- 801194e: f7fa f9e1 bl 800bd14 <pbuf_remove_header>
- 8011952: b9b0 cbnz r0, 8011982 <udp_input+0x11e>
- if (pcb != NULL) {
- 8011954: b324 cbz r4, 80119a0 <udp_input+0x13c>
- if (pcb->recv != NULL) {
- 8011956: 69a5 ldr r5, [r4, #24]
- 8011958: b1f5 cbz r5, 8011998 <udp_input+0x134>
- pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src);
- 801195a: 69e0 ldr r0, [r4, #28]
- 801195c: f8cd a000 str.w sl, [sp]
- 8011960: 4b22 ldr r3, [pc, #136] @ (80119ec <udp_input+0x188>)
- 8011962: 4642 mov r2, r8
- 8011964: 4621 mov r1, r4
- 8011966: 47a8 blx r5
- 8011968: e7b2 b.n 80118d0 <udp_input+0x6c>
- 801196a: 465c mov r4, fp
- if (pcb != NULL) {
- 801196c: 2c00 cmp r4, #0
- 801196e: d1ec bne.n 801194a <udp_input+0xe6>
- for_us = ip4_addr_cmp(netif_ip4_addr(inp), ip4_current_dest_addr());
- 8011970: 687a ldr r2, [r7, #4]
- 8011972: 4b18 ldr r3, [pc, #96] @ (80119d4 <udp_input+0x170>)
- 8011974: 695b ldr r3, [r3, #20]
- if (for_us) {
- 8011976: 429a cmp r2, r3
- 8011978: d0e7 beq.n 801194a <udp_input+0xe6>
- pbuf_free(p);
- 801197a: 4640 mov r0, r8
- 801197c: f7fa fa10 bl 800bda0 <pbuf_free>
- return;
- 8011980: e7a6 b.n 80118d0 <udp_input+0x6c>
- LWIP_ASSERT("pbuf_remove_header failed\n", 0);
- 8011982: 4b16 ldr r3, [pc, #88] @ (80119dc <udp_input+0x178>)
- 8011984: f44f 72b8 mov.w r2, #368 @ 0x170
- 8011988: 4919 ldr r1, [pc, #100] @ (80119f0 <udp_input+0x18c>)
- 801198a: 4816 ldr r0, [pc, #88] @ (80119e4 <udp_input+0x180>)
- 801198c: f001 fd3c bl 8013408 <iprintf>
- pbuf_free(p);
- 8011990: 4640 mov r0, r8
- 8011992: f7fa fa05 bl 800bda0 <pbuf_free>
- goto end;
- 8011996: e79b b.n 80118d0 <udp_input+0x6c>
- pbuf_free(p);
- 8011998: 4640 mov r0, r8
- 801199a: f7fa fa01 bl 800bda0 <pbuf_free>
- goto end;
- 801199e: e797 b.n 80118d0 <udp_input+0x6c>
- if (!broadcast && !ip_addr_ismulticast(ip_current_dest_addr())) {
- 80119a0: f1b9 0f00 cmp.w r9, #0
- 80119a4: d105 bne.n 80119b2 <udp_input+0x14e>
- 80119a6: 4b0b ldr r3, [pc, #44] @ (80119d4 <udp_input+0x170>)
- 80119a8: 695b ldr r3, [r3, #20]
- 80119aa: f003 03f0 and.w r3, r3, #240 @ 0xf0
- 80119ae: 2be0 cmp r3, #224 @ 0xe0
- 80119b0: d103 bne.n 80119ba <udp_input+0x156>
- pbuf_free(p);
- 80119b2: 4640 mov r0, r8
- 80119b4: f7fa f9f4 bl 800bda0 <pbuf_free>
- 80119b8: e78a b.n 80118d0 <udp_input+0x6c>
- pbuf_header_force(p, (s16_t)(ip_current_header_tot_len() + UDP_HLEN));
- 80119ba: 4b06 ldr r3, [pc, #24] @ (80119d4 <udp_input+0x170>)
- 80119bc: 8999 ldrh r1, [r3, #12]
- 80119be: 3108 adds r1, #8
- 80119c0: b209 sxth r1, r1
- 80119c2: 4640 mov r0, r8
- 80119c4: f7fa f9e6 bl 800bd94 <pbuf_header_force>
- icmp_port_unreach(ip_current_is_v6(), p);
- 80119c8: 2103 movs r1, #3
- 80119ca: 4640 mov r0, r8
- 80119cc: f7f8 fb06 bl 8009fdc <icmp_dest_unreach>
- 80119d0: e7ef b.n 80119b2 <udp_input+0x14e>
- 80119d2: bf00 nop
- 80119d4: 2401301c .word 0x2401301c
- 80119d8: 24019c40 .word 0x24019c40
- 80119dc: 08017b60 .word 0x08017b60
- 80119e0: 08017c0c .word 0x08017c0c
- 80119e4: 080144e8 .word 0x080144e8
- 80119e8: 08017c24 .word 0x08017c24
- 80119ec: 2401302c .word 0x2401302c
- 80119f0: 08017c40 .word 0x08017c40
- 080119f4 <udp_bind>:
- *
- * @see udp_disconnect()
- */
- err_t
- udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
- {
- 80119f4: b5f8 push {r3, r4, r5, r6, r7, lr}
- 80119f6: 4605 mov r5, r0
- 80119f8: 460f mov r7, r1
- 80119fa: 4616 mov r6, r2
- u8_t rebind;
- #if LWIP_IPV6 && LWIP_IPV6_SCOPES
- ip_addr_t zoned_ipaddr;
- #endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */
- LWIP_ASSERT_CORE_LOCKED();
- 80119fc: f7f2 f886 bl 8003b0c <sys_check_core_locking>
- #if LWIP_IPV4
- /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */
- if (ipaddr == NULL) {
- 8011a00: b127 cbz r7, 8011a0c <udp_bind+0x18>
- }
- #else /* LWIP_IPV4 */
- LWIP_ERROR("udp_bind: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
- #endif /* LWIP_IPV4 */
- LWIP_ERROR("udp_bind: invalid pcb", pcb != NULL, return ERR_ARG);
- 8011a02: b12d cbz r5, 8011a10 <udp_bind+0x1c>
- ip_addr_debug_print(UDP_DEBUG | LWIP_DBG_TRACE, ipaddr);
- LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, (", port = %"U16_F")\n", port));
- rebind = 0;
- /* Check for double bind and rebind of the same pcb */
- for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
- 8011a04: 4b23 ldr r3, [pc, #140] @ (8011a94 <udp_bind+0xa0>)
- 8011a06: 681b ldr r3, [r3, #0]
- 8011a08: 461c mov r4, r3
- 8011a0a: e00c b.n 8011a26 <udp_bind+0x32>
- ipaddr = IP4_ADDR_ANY;
- 8011a0c: 4f22 ldr r7, [pc, #136] @ (8011a98 <udp_bind+0xa4>)
- 8011a0e: e7f8 b.n 8011a02 <udp_bind+0xe>
- LWIP_ERROR("udp_bind: invalid pcb", pcb != NULL, return ERR_ARG);
- 8011a10: 4b22 ldr r3, [pc, #136] @ (8011a9c <udp_bind+0xa8>)
- 8011a12: f240 32b7 movw r2, #951 @ 0x3b7
- 8011a16: 4922 ldr r1, [pc, #136] @ (8011aa0 <udp_bind+0xac>)
- 8011a18: 4822 ldr r0, [pc, #136] @ (8011aa4 <udp_bind+0xb0>)
- 8011a1a: f001 fcf5 bl 8013408 <iprintf>
- 8011a1e: f06f 000f mvn.w r0, #15
- 8011a22: e013 b.n 8011a4c <udp_bind+0x58>
- for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
- 8011a24: 68e4 ldr r4, [r4, #12]
- 8011a26: b114 cbz r4, 8011a2e <udp_bind+0x3a>
- /* is this UDP PCB already on active list? */
- if (pcb == ipcb) {
- 8011a28: 42ac cmp r4, r5
- 8011a2a: d1fb bne.n 8011a24 <udp_bind+0x30>
- rebind = 1;
- 8011a2c: 2401 movs r4, #1
- ipaddr = &zoned_ipaddr;
- }
- #endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */
- /* no port specified? */
- if (port == 0) {
- 8011a2e: b97e cbnz r6, 8011a50 <udp_bind+0x5c>
- port = udp_new_port();
- 8011a30: f7ff fe96 bl 8011760 <udp_new_port>
- if (port == 0) {
- 8011a34: 4606 mov r6, r0
- 8011a36: b1f8 cbz r0, 8011a78 <udp_bind+0x84>
- }
- }
- }
- }
- ip_addr_set_ipaddr(&pcb->local_ip, ipaddr);
- 8011a38: b1e7 cbz r7, 8011a74 <udp_bind+0x80>
- 8011a3a: 683b ldr r3, [r7, #0]
- 8011a3c: 602b str r3, [r5, #0]
- pcb->local_port = port;
- 8011a3e: 826e strh r6, [r5, #18]
- mib2_udp_bind(pcb);
- /* pcb not active yet? */
- if (rebind == 0) {
- 8011a40: bb34 cbnz r4, 8011a90 <udp_bind+0x9c>
- /* place the PCB on the active list if not already there */
- pcb->next = udp_pcbs;
- 8011a42: 4b14 ldr r3, [pc, #80] @ (8011a94 <udp_bind+0xa0>)
- 8011a44: 681a ldr r2, [r3, #0]
- 8011a46: 60ea str r2, [r5, #12]
- udp_pcbs = pcb;
- 8011a48: 601d str r5, [r3, #0]
- }
- LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("udp_bind: bound to "));
- ip_addr_debug_print_val(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, pcb->local_ip);
- LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, (", port %"U16_F")\n", pcb->local_port));
- return ERR_OK;
- 8011a4a: 2000 movs r0, #0
- }
- 8011a4c: bdf8 pop {r3, r4, r5, r6, r7, pc}
- for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
- 8011a4e: 68db ldr r3, [r3, #12]
- 8011a50: 2b00 cmp r3, #0
- 8011a52: d0f1 beq.n 8011a38 <udp_bind+0x44>
- if (pcb != ipcb) {
- 8011a54: 42ab cmp r3, r5
- 8011a56: d0fa beq.n 8011a4e <udp_bind+0x5a>
- if ((ipcb->local_port == port) &&
- 8011a58: 8a58 ldrh r0, [r3, #18]
- 8011a5a: 4286 cmp r6, r0
- 8011a5c: d1f7 bne.n 8011a4e <udp_bind+0x5a>
- (ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
- 8011a5e: 6818 ldr r0, [r3, #0]
- 8011a60: 683a ldr r2, [r7, #0]
- if ((ipcb->local_port == port) &&
- 8011a62: 4290 cmp r0, r2
- 8011a64: d00b beq.n 8011a7e <udp_bind+0x8a>
- (ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
- 8011a66: b16a cbz r2, 8011a84 <udp_bind+0x90>
- 8011a68: b17b cbz r3, 8011a8a <udp_bind+0x96>
- ip_addr_isany(&ipcb->local_ip))) {
- 8011a6a: 2800 cmp r0, #0
- 8011a6c: d1ef bne.n 8011a4e <udp_bind+0x5a>
- return ERR_USE;
- 8011a6e: f06f 0007 mvn.w r0, #7
- 8011a72: e7eb b.n 8011a4c <udp_bind+0x58>
- ip_addr_set_ipaddr(&pcb->local_ip, ipaddr);
- 8011a74: 2300 movs r3, #0
- 8011a76: e7e1 b.n 8011a3c <udp_bind+0x48>
- return ERR_USE;
- 8011a78: f06f 0007 mvn.w r0, #7
- 8011a7c: e7e6 b.n 8011a4c <udp_bind+0x58>
- return ERR_USE;
- 8011a7e: f06f 0007 mvn.w r0, #7
- 8011a82: e7e3 b.n 8011a4c <udp_bind+0x58>
- 8011a84: f06f 0007 mvn.w r0, #7
- 8011a88: e7e0 b.n 8011a4c <udp_bind+0x58>
- 8011a8a: f06f 0007 mvn.w r0, #7
- 8011a8e: e7dd b.n 8011a4c <udp_bind+0x58>
- return ERR_OK;
- 8011a90: 2000 movs r0, #0
- 8011a92: e7db b.n 8011a4c <udp_bind+0x58>
- 8011a94: 24019c40 .word 0x24019c40
- 8011a98: 080156d8 .word 0x080156d8
- 8011a9c: 08017b60 .word 0x08017b60
- 8011aa0: 08017c5c .word 0x08017c5c
- 8011aa4: 080144e8 .word 0x080144e8
- 08011aa8 <udp_sendto_if_src>:
- {
- 8011aa8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 8011aac: b085 sub sp, #20
- 8011aae: 4604 mov r4, r0
- 8011ab0: 460d mov r5, r1
- 8011ab2: 4690 mov r8, r2
- 8011ab4: 4699 mov r9, r3
- 8011ab6: f8dd b038 ldr.w fp, [sp, #56] @ 0x38
- 8011aba: f8dd a03c ldr.w sl, [sp, #60] @ 0x3c
- LWIP_ASSERT_CORE_LOCKED();
- 8011abe: f7f2 f825 bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("udp_sendto_if_src: invalid pcb", pcb != NULL, return ERR_ARG);
- 8011ac2: 2c00 cmp r4, #0
- 8011ac4: d043 beq.n 8011b4e <udp_sendto_if_src+0xa6>
- LWIP_ERROR("udp_sendto_if_src: invalid pbuf", p != NULL, return ERR_ARG);
- 8011ac6: 2d00 cmp r5, #0
- 8011ac8: d04b beq.n 8011b62 <udp_sendto_if_src+0xba>
- LWIP_ERROR("udp_sendto_if_src: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
- 8011aca: f1b8 0f00 cmp.w r8, #0
- 8011ace: d052 beq.n 8011b76 <udp_sendto_if_src+0xce>
- LWIP_ERROR("udp_sendto_if_src: invalid src_ip", src_ip != NULL, return ERR_ARG);
- 8011ad0: f1ba 0f00 cmp.w sl, #0
- 8011ad4: d059 beq.n 8011b8a <udp_sendto_if_src+0xe2>
- LWIP_ERROR("udp_sendto_if_src: invalid netif", netif != NULL, return ERR_ARG);
- 8011ad6: f1bb 0f00 cmp.w fp, #0
- 8011ada: d060 beq.n 8011b9e <udp_sendto_if_src+0xf6>
- if (pcb->local_port == 0) {
- 8011adc: 8a62 ldrh r2, [r4, #18]
- 8011ade: 2a00 cmp r2, #0
- 8011ae0: d067 beq.n 8011bb2 <udp_sendto_if_src+0x10a>
- if ((u16_t)(p->tot_len + UDP_HLEN) < p->tot_len) {
- 8011ae2: 892a ldrh r2, [r5, #8]
- 8011ae4: f64f 73f7 movw r3, #65527 @ 0xfff7
- 8011ae8: 429a cmp r2, r3
- 8011aea: f200 8081 bhi.w 8011bf0 <udp_sendto_if_src+0x148>
- if (pbuf_add_header(p, UDP_HLEN)) {
- 8011aee: 2108 movs r1, #8
- 8011af0: 4628 mov r0, r5
- 8011af2: f7fa f90a bl 800bd0a <pbuf_add_header>
- 8011af6: 2800 cmp r0, #0
- 8011af8: d163 bne.n 8011bc2 <udp_sendto_if_src+0x11a>
- q = p;
- 8011afa: 462e mov r6, r5
- LWIP_ASSERT("check that first pbuf can hold struct udp_hdr",
- 8011afc: 8973 ldrh r3, [r6, #10]
- 8011afe: 2b07 cmp r3, #7
- 8011b00: d96e bls.n 8011be0 <udp_sendto_if_src+0x138>
- udphdr = (struct udp_hdr *)q->payload;
- 8011b02: 6877 ldr r7, [r6, #4]
- udphdr->src = lwip_htons(pcb->local_port);
- 8011b04: 8a60 ldrh r0, [r4, #18]
- 8011b06: f7f6 f9b9 bl 8007e7c <lwip_htons>
- 8011b0a: 8038 strh r0, [r7, #0]
- udphdr->dest = lwip_htons(dst_port);
- 8011b0c: 4648 mov r0, r9
- 8011b0e: f7f6 f9b5 bl 8007e7c <lwip_htons>
- 8011b12: 8078 strh r0, [r7, #2]
- udphdr->chksum = 0x0000;
- 8011b14: 2300 movs r3, #0
- 8011b16: 71bb strb r3, [r7, #6]
- 8011b18: 71fb strb r3, [r7, #7]
- udphdr->len = lwip_htons(q->tot_len);
- 8011b1a: 8930 ldrh r0, [r6, #8]
- 8011b1c: f7f6 f9ae bl 8007e7c <lwip_htons>
- 8011b20: 80b8 strh r0, [r7, #4]
- err = ip_output_if_src(q, src_ip, dst_ip, ttl, pcb->tos, ip_proto, netif);
- 8011b22: f8cd b008 str.w fp, [sp, #8]
- 8011b26: 2311 movs r3, #17
- 8011b28: 9301 str r3, [sp, #4]
- 8011b2a: 7aa3 ldrb r3, [r4, #10]
- 8011b2c: 9300 str r3, [sp, #0]
- 8011b2e: 7ae3 ldrb r3, [r4, #11]
- 8011b30: 4642 mov r2, r8
- 8011b32: 4651 mov r1, sl
- 8011b34: 4630 mov r0, r6
- 8011b36: f7f8 fbf5 bl 800a324 <ip4_output_if_src>
- 8011b3a: 4607 mov r7, r0
- if (q != p) {
- 8011b3c: 42ae cmp r6, r5
- 8011b3e: d002 beq.n 8011b46 <udp_sendto_if_src+0x9e>
- pbuf_free(q);
- 8011b40: 4630 mov r0, r6
- 8011b42: f7fa f92d bl 800bda0 <pbuf_free>
- }
- 8011b46: 4638 mov r0, r7
- 8011b48: b005 add sp, #20
- 8011b4a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
- LWIP_ERROR("udp_sendto_if_src: invalid pcb", pcb != NULL, return ERR_ARG);
- 8011b4e: 4b2b ldr r3, [pc, #172] @ (8011bfc <udp_sendto_if_src+0x154>)
- 8011b50: f240 22d1 movw r2, #721 @ 0x2d1
- 8011b54: 492a ldr r1, [pc, #168] @ (8011c00 <udp_sendto_if_src+0x158>)
- 8011b56: 482b ldr r0, [pc, #172] @ (8011c04 <udp_sendto_if_src+0x15c>)
- 8011b58: f001 fc56 bl 8013408 <iprintf>
- 8011b5c: f06f 070f mvn.w r7, #15
- 8011b60: e7f1 b.n 8011b46 <udp_sendto_if_src+0x9e>
- LWIP_ERROR("udp_sendto_if_src: invalid pbuf", p != NULL, return ERR_ARG);
- 8011b62: 4b26 ldr r3, [pc, #152] @ (8011bfc <udp_sendto_if_src+0x154>)
- 8011b64: f240 22d2 movw r2, #722 @ 0x2d2
- 8011b68: 4927 ldr r1, [pc, #156] @ (8011c08 <udp_sendto_if_src+0x160>)
- 8011b6a: 4826 ldr r0, [pc, #152] @ (8011c04 <udp_sendto_if_src+0x15c>)
- 8011b6c: f001 fc4c bl 8013408 <iprintf>
- 8011b70: f06f 070f mvn.w r7, #15
- 8011b74: e7e7 b.n 8011b46 <udp_sendto_if_src+0x9e>
- LWIP_ERROR("udp_sendto_if_src: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
- 8011b76: 4b21 ldr r3, [pc, #132] @ (8011bfc <udp_sendto_if_src+0x154>)
- 8011b78: f240 22d3 movw r2, #723 @ 0x2d3
- 8011b7c: 4923 ldr r1, [pc, #140] @ (8011c0c <udp_sendto_if_src+0x164>)
- 8011b7e: 4821 ldr r0, [pc, #132] @ (8011c04 <udp_sendto_if_src+0x15c>)
- 8011b80: f001 fc42 bl 8013408 <iprintf>
- 8011b84: f06f 070f mvn.w r7, #15
- 8011b88: e7dd b.n 8011b46 <udp_sendto_if_src+0x9e>
- LWIP_ERROR("udp_sendto_if_src: invalid src_ip", src_ip != NULL, return ERR_ARG);
- 8011b8a: 4b1c ldr r3, [pc, #112] @ (8011bfc <udp_sendto_if_src+0x154>)
- 8011b8c: f44f 7235 mov.w r2, #724 @ 0x2d4
- 8011b90: 491f ldr r1, [pc, #124] @ (8011c10 <udp_sendto_if_src+0x168>)
- 8011b92: 481c ldr r0, [pc, #112] @ (8011c04 <udp_sendto_if_src+0x15c>)
- 8011b94: f001 fc38 bl 8013408 <iprintf>
- 8011b98: f06f 070f mvn.w r7, #15
- 8011b9c: e7d3 b.n 8011b46 <udp_sendto_if_src+0x9e>
- LWIP_ERROR("udp_sendto_if_src: invalid netif", netif != NULL, return ERR_ARG);
- 8011b9e: 4b17 ldr r3, [pc, #92] @ (8011bfc <udp_sendto_if_src+0x154>)
- 8011ba0: f240 22d5 movw r2, #725 @ 0x2d5
- 8011ba4: 491b ldr r1, [pc, #108] @ (8011c14 <udp_sendto_if_src+0x16c>)
- 8011ba6: 4817 ldr r0, [pc, #92] @ (8011c04 <udp_sendto_if_src+0x15c>)
- 8011ba8: f001 fc2e bl 8013408 <iprintf>
- 8011bac: f06f 070f mvn.w r7, #15
- 8011bb0: e7c9 b.n 8011b46 <udp_sendto_if_src+0x9e>
- err = udp_bind(pcb, &pcb->local_ip, pcb->local_port);
- 8011bb2: 4621 mov r1, r4
- 8011bb4: 4620 mov r0, r4
- 8011bb6: f7ff ff1d bl 80119f4 <udp_bind>
- if (err != ERR_OK) {
- 8011bba: 4607 mov r7, r0
- 8011bbc: 2800 cmp r0, #0
- 8011bbe: d090 beq.n 8011ae2 <udp_sendto_if_src+0x3a>
- 8011bc0: e7c1 b.n 8011b46 <udp_sendto_if_src+0x9e>
- q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM);
- 8011bc2: f44f 7220 mov.w r2, #640 @ 0x280
- 8011bc6: 2108 movs r1, #8
- 8011bc8: 2022 movs r0, #34 @ 0x22
- 8011bca: f7fa f951 bl 800be70 <pbuf_alloc>
- if (q == NULL) {
- 8011bce: 4606 mov r6, r0
- 8011bd0: b188 cbz r0, 8011bf6 <udp_sendto_if_src+0x14e>
- if (p->tot_len != 0) {
- 8011bd2: 892b ldrh r3, [r5, #8]
- 8011bd4: 2b00 cmp r3, #0
- 8011bd6: d091 beq.n 8011afc <udp_sendto_if_src+0x54>
- pbuf_chain(q, p);
- 8011bd8: 4629 mov r1, r5
- 8011bda: f7fa fac7 bl 800c16c <pbuf_chain>
- 8011bde: e78d b.n 8011afc <udp_sendto_if_src+0x54>
- LWIP_ASSERT("check that first pbuf can hold struct udp_hdr",
- 8011be0: 4b06 ldr r3, [pc, #24] @ (8011bfc <udp_sendto_if_src+0x154>)
- 8011be2: f240 320d movw r2, #781 @ 0x30d
- 8011be6: 490c ldr r1, [pc, #48] @ (8011c18 <udp_sendto_if_src+0x170>)
- 8011be8: 4806 ldr r0, [pc, #24] @ (8011c04 <udp_sendto_if_src+0x15c>)
- 8011bea: f001 fc0d bl 8013408 <iprintf>
- 8011bee: e788 b.n 8011b02 <udp_sendto_if_src+0x5a>
- return ERR_MEM;
- 8011bf0: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff
- 8011bf4: e7a7 b.n 8011b46 <udp_sendto_if_src+0x9e>
- return ERR_MEM;
- 8011bf6: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff
- 8011bfa: e7a4 b.n 8011b46 <udp_sendto_if_src+0x9e>
- 8011bfc: 08017b60 .word 0x08017b60
- 8011c00: 08017c74 .word 0x08017c74
- 8011c04: 080144e8 .word 0x080144e8
- 8011c08: 08017c94 .word 0x08017c94
- 8011c0c: 08017cb4 .word 0x08017cb4
- 8011c10: 08017cd8 .word 0x08017cd8
- 8011c14: 08017cfc .word 0x08017cfc
- 8011c18: 08017d20 .word 0x08017d20
- 08011c1c <udp_sendto_if>:
- {
- 8011c1c: b5f0 push {r4, r5, r6, r7, lr}
- 8011c1e: b083 sub sp, #12
- 8011c20: 9d08 ldr r5, [sp, #32]
- LWIP_ERROR("udp_sendto_if: invalid pcb", pcb != NULL, return ERR_ARG);
- 8011c22: b190 cbz r0, 8011c4a <udp_sendto_if+0x2e>
- 8011c24: 4604 mov r4, r0
- LWIP_ERROR("udp_sendto_if: invalid pbuf", p != NULL, return ERR_ARG);
- 8011c26: b1d1 cbz r1, 8011c5e <udp_sendto_if+0x42>
- LWIP_ERROR("udp_sendto_if: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
- 8011c28: b31a cbz r2, 8011c72 <udp_sendto_if+0x56>
- LWIP_ERROR("udp_sendto_if: invalid netif", netif != NULL, return ERR_ARG);
- 8011c2a: b365 cbz r5, 8011c86 <udp_sendto_if+0x6a>
- if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
- 8011c2c: 2800 cmp r0, #0
- 8011c2e: d034 beq.n 8011c9a <udp_sendto_if+0x7e>
- 8011c30: 6806 ldr r6, [r0, #0]
- 8011c32: b396 cbz r6, 8011c9a <udp_sendto_if+0x7e>
- ip4_addr_ismulticast(ip_2_ip4(&pcb->local_ip))) {
- 8011c34: f006 0cf0 and.w ip, r6, #240 @ 0xf0
- if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
- 8011c38: f1bc 0fe0 cmp.w ip, #224 @ 0xe0
- 8011c3c: d02d beq.n 8011c9a <udp_sendto_if+0x7e>
- if (!ip4_addr_cmp(ip_2_ip4(&(pcb->local_ip)), netif_ip4_addr(netif))) {
- 8011c3e: 686f ldr r7, [r5, #4]
- 8011c40: 42be cmp r6, r7
- 8011c42: d02b beq.n 8011c9c <udp_sendto_if+0x80>
- return ERR_RTE;
- 8011c44: f06f 0003 mvn.w r0, #3
- 8011c48: e02d b.n 8011ca6 <udp_sendto_if+0x8a>
- LWIP_ERROR("udp_sendto_if: invalid pcb", pcb != NULL, return ERR_ARG);
- 8011c4a: 4b18 ldr r3, [pc, #96] @ (8011cac <udp_sendto_if+0x90>)
- 8011c4c: f44f 7220 mov.w r2, #640 @ 0x280
- 8011c50: 4917 ldr r1, [pc, #92] @ (8011cb0 <udp_sendto_if+0x94>)
- 8011c52: 4818 ldr r0, [pc, #96] @ (8011cb4 <udp_sendto_if+0x98>)
- 8011c54: f001 fbd8 bl 8013408 <iprintf>
- 8011c58: f06f 000f mvn.w r0, #15
- 8011c5c: e023 b.n 8011ca6 <udp_sendto_if+0x8a>
- LWIP_ERROR("udp_sendto_if: invalid pbuf", p != NULL, return ERR_ARG);
- 8011c5e: 4b13 ldr r3, [pc, #76] @ (8011cac <udp_sendto_if+0x90>)
- 8011c60: f240 2281 movw r2, #641 @ 0x281
- 8011c64: 4914 ldr r1, [pc, #80] @ (8011cb8 <udp_sendto_if+0x9c>)
- 8011c66: 4813 ldr r0, [pc, #76] @ (8011cb4 <udp_sendto_if+0x98>)
- 8011c68: f001 fbce bl 8013408 <iprintf>
- 8011c6c: f06f 000f mvn.w r0, #15
- 8011c70: e019 b.n 8011ca6 <udp_sendto_if+0x8a>
- LWIP_ERROR("udp_sendto_if: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
- 8011c72: 4b0e ldr r3, [pc, #56] @ (8011cac <udp_sendto_if+0x90>)
- 8011c74: f240 2282 movw r2, #642 @ 0x282
- 8011c78: 4910 ldr r1, [pc, #64] @ (8011cbc <udp_sendto_if+0xa0>)
- 8011c7a: 480e ldr r0, [pc, #56] @ (8011cb4 <udp_sendto_if+0x98>)
- 8011c7c: f001 fbc4 bl 8013408 <iprintf>
- 8011c80: f06f 000f mvn.w r0, #15
- 8011c84: e00f b.n 8011ca6 <udp_sendto_if+0x8a>
- LWIP_ERROR("udp_sendto_if: invalid netif", netif != NULL, return ERR_ARG);
- 8011c86: 4b09 ldr r3, [pc, #36] @ (8011cac <udp_sendto_if+0x90>)
- 8011c88: f240 2283 movw r2, #643 @ 0x283
- 8011c8c: 490c ldr r1, [pc, #48] @ (8011cc0 <udp_sendto_if+0xa4>)
- 8011c8e: 4809 ldr r0, [pc, #36] @ (8011cb4 <udp_sendto_if+0x98>)
- 8011c90: f001 fbba bl 8013408 <iprintf>
- 8011c94: f06f 000f mvn.w r0, #15
- 8011c98: e005 b.n 8011ca6 <udp_sendto_if+0x8a>
- src_ip = netif_ip_addr4(netif);
- 8011c9a: 1d28 adds r0, r5, #4
- return udp_sendto_if_src(pcb, p, dst_ip, dst_port, netif, src_ip);
- 8011c9c: 9001 str r0, [sp, #4]
- 8011c9e: 9500 str r5, [sp, #0]
- 8011ca0: 4620 mov r0, r4
- 8011ca2: f7ff ff01 bl 8011aa8 <udp_sendto_if_src>
- }
- 8011ca6: b003 add sp, #12
- 8011ca8: bdf0 pop {r4, r5, r6, r7, pc}
- 8011caa: bf00 nop
- 8011cac: 08017b60 .word 0x08017b60
- 8011cb0: 08017d50 .word 0x08017d50
- 8011cb4: 080144e8 .word 0x080144e8
- 8011cb8: 08017d6c .word 0x08017d6c
- 8011cbc: 08017d88 .word 0x08017d88
- 8011cc0: 08017da8 .word 0x08017da8
- 08011cc4 <udp_sendto>:
- {
- 8011cc4: b5f0 push {r4, r5, r6, r7, lr}
- 8011cc6: b083 sub sp, #12
- LWIP_ERROR("udp_sendto: invalid pcb", pcb != NULL, return ERR_ARG);
- 8011cc8: b198 cbz r0, 8011cf2 <udp_sendto+0x2e>
- 8011cca: 460d mov r5, r1
- 8011ccc: 4614 mov r4, r2
- 8011cce: 461e mov r6, r3
- 8011cd0: 4607 mov r7, r0
- LWIP_ERROR("udp_sendto: invalid pbuf", p != NULL, return ERR_ARG);
- 8011cd2: b1c1 cbz r1, 8011d06 <udp_sendto+0x42>
- LWIP_ERROR("udp_sendto: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
- 8011cd4: b30a cbz r2, 8011d1a <udp_sendto+0x56>
- if (pcb->netif_idx != NETIF_NO_INDEX) {
- 8011cd6: 7a00 ldrb r0, [r0, #8]
- 8011cd8: b348 cbz r0, 8011d2e <udp_sendto+0x6a>
- netif = netif_get_by_index(pcb->netif_idx);
- 8011cda: f7f9 ff31 bl 800bb40 <netif_get_by_index>
- if (netif == NULL) {
- 8011cde: b350 cbz r0, 8011d36 <udp_sendto+0x72>
- return udp_sendto_if(pcb, p, dst_ip, dst_port, netif);
- 8011ce0: 9000 str r0, [sp, #0]
- 8011ce2: 4633 mov r3, r6
- 8011ce4: 4622 mov r2, r4
- 8011ce6: 4629 mov r1, r5
- 8011ce8: 4638 mov r0, r7
- 8011cea: f7ff ff97 bl 8011c1c <udp_sendto_if>
- }
- 8011cee: b003 add sp, #12
- 8011cf0: bdf0 pop {r4, r5, r6, r7, pc}
- LWIP_ERROR("udp_sendto: invalid pcb", pcb != NULL, return ERR_ARG);
- 8011cf2: 4b12 ldr r3, [pc, #72] @ (8011d3c <udp_sendto+0x78>)
- 8011cf4: f44f 7206 mov.w r2, #536 @ 0x218
- 8011cf8: 4911 ldr r1, [pc, #68] @ (8011d40 <udp_sendto+0x7c>)
- 8011cfa: 4812 ldr r0, [pc, #72] @ (8011d44 <udp_sendto+0x80>)
- 8011cfc: f001 fb84 bl 8013408 <iprintf>
- 8011d00: f06f 000f mvn.w r0, #15
- 8011d04: e7f3 b.n 8011cee <udp_sendto+0x2a>
- LWIP_ERROR("udp_sendto: invalid pbuf", p != NULL, return ERR_ARG);
- 8011d06: 4b0d ldr r3, [pc, #52] @ (8011d3c <udp_sendto+0x78>)
- 8011d08: f240 2219 movw r2, #537 @ 0x219
- 8011d0c: 490e ldr r1, [pc, #56] @ (8011d48 <udp_sendto+0x84>)
- 8011d0e: 480d ldr r0, [pc, #52] @ (8011d44 <udp_sendto+0x80>)
- 8011d10: f001 fb7a bl 8013408 <iprintf>
- 8011d14: f06f 000f mvn.w r0, #15
- 8011d18: e7e9 b.n 8011cee <udp_sendto+0x2a>
- LWIP_ERROR("udp_sendto: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
- 8011d1a: 4b08 ldr r3, [pc, #32] @ (8011d3c <udp_sendto+0x78>)
- 8011d1c: f240 221a movw r2, #538 @ 0x21a
- 8011d20: 490a ldr r1, [pc, #40] @ (8011d4c <udp_sendto+0x88>)
- 8011d22: 4808 ldr r0, [pc, #32] @ (8011d44 <udp_sendto+0x80>)
- 8011d24: f001 fb70 bl 8013408 <iprintf>
- 8011d28: f06f 000f mvn.w r0, #15
- 8011d2c: e7df b.n 8011cee <udp_sendto+0x2a>
- netif = ip_route(&pcb->local_ip, dst_ip);
- 8011d2e: 4610 mov r0, r2
- 8011d30: f7f8 f9e6 bl 800a100 <ip4_route>
- 8011d34: e7d3 b.n 8011cde <udp_sendto+0x1a>
- return ERR_RTE;
- 8011d36: f06f 0003 mvn.w r0, #3
- 8011d3a: e7d8 b.n 8011cee <udp_sendto+0x2a>
- 8011d3c: 08017b60 .word 0x08017b60
- 8011d40: 08017dc8 .word 0x08017dc8
- 8011d44: 080144e8 .word 0x080144e8
- 8011d48: 08017de0 .word 0x08017de0
- 8011d4c: 08017dfc .word 0x08017dfc
- 08011d50 <udp_send>:
- {
- 8011d50: b508 push {r3, lr}
- LWIP_ERROR("udp_send: invalid pcb", pcb != NULL, return ERR_ARG);
- 8011d52: b128 cbz r0, 8011d60 <udp_send+0x10>
- LWIP_ERROR("udp_send: invalid pbuf", p != NULL, return ERR_ARG);
- 8011d54: b171 cbz r1, 8011d74 <udp_send+0x24>
- return udp_sendto(pcb, p, &pcb->remote_ip, pcb->remote_port);
- 8011d56: 8a83 ldrh r3, [r0, #20]
- 8011d58: 1d02 adds r2, r0, #4
- 8011d5a: f7ff ffb3 bl 8011cc4 <udp_sendto>
- }
- 8011d5e: bd08 pop {r3, pc}
- LWIP_ERROR("udp_send: invalid pcb", pcb != NULL, return ERR_ARG);
- 8011d60: 4b09 ldr r3, [pc, #36] @ (8011d88 <udp_send+0x38>)
- 8011d62: f240 12d5 movw r2, #469 @ 0x1d5
- 8011d66: 4909 ldr r1, [pc, #36] @ (8011d8c <udp_send+0x3c>)
- 8011d68: 4809 ldr r0, [pc, #36] @ (8011d90 <udp_send+0x40>)
- 8011d6a: f001 fb4d bl 8013408 <iprintf>
- 8011d6e: f06f 000f mvn.w r0, #15
- 8011d72: e7f4 b.n 8011d5e <udp_send+0xe>
- LWIP_ERROR("udp_send: invalid pbuf", p != NULL, return ERR_ARG);
- 8011d74: 4b04 ldr r3, [pc, #16] @ (8011d88 <udp_send+0x38>)
- 8011d76: f44f 72eb mov.w r2, #470 @ 0x1d6
- 8011d7a: 4906 ldr r1, [pc, #24] @ (8011d94 <udp_send+0x44>)
- 8011d7c: 4804 ldr r0, [pc, #16] @ (8011d90 <udp_send+0x40>)
- 8011d7e: f001 fb43 bl 8013408 <iprintf>
- 8011d82: f06f 000f mvn.w r0, #15
- 8011d86: e7ea b.n 8011d5e <udp_send+0xe>
- 8011d88: 08017b60 .word 0x08017b60
- 8011d8c: 08017e18 .word 0x08017e18
- 8011d90: 080144e8 .word 0x080144e8
- 8011d94: 08017e30 .word 0x08017e30
- 08011d98 <udp_connect>:
- *
- * @see udp_disconnect()
- */
- err_t
- udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
- {
- 8011d98: b570 push {r4, r5, r6, lr}
- 8011d9a: 4604 mov r4, r0
- 8011d9c: 460d mov r5, r1
- 8011d9e: 4616 mov r6, r2
- struct udp_pcb *ipcb;
- LWIP_ASSERT_CORE_LOCKED();
- 8011da0: f7f1 feb4 bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("udp_connect: invalid pcb", pcb != NULL, return ERR_ARG);
- 8011da4: b18c cbz r4, 8011dca <udp_connect+0x32>
- LWIP_ERROR("udp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
- 8011da6: b1d5 cbz r5, 8011dde <udp_connect+0x46>
- if (pcb->local_port == 0) {
- 8011da8: 8a62 ldrh r2, [r4, #18]
- 8011daa: b312 cbz r2, 8011df2 <udp_connect+0x5a>
- if (err != ERR_OK) {
- return err;
- }
- }
- ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr);
- 8011dac: 682b ldr r3, [r5, #0]
- 8011dae: 6063 str r3, [r4, #4]
- ip6_addr_lacks_zone(ip_2_ip6(&pcb->remote_ip), IP6_UNKNOWN)) {
- ip6_addr_select_zone(ip_2_ip6(&pcb->remote_ip), ip_2_ip6(&pcb->local_ip));
- }
- #endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */
- pcb->remote_port = port;
- 8011db0: 82a6 strh r6, [r4, #20]
- pcb->flags |= UDP_FLAGS_CONNECTED;
- 8011db2: 7c23 ldrb r3, [r4, #16]
- 8011db4: f043 0304 orr.w r3, r3, #4
- 8011db8: 7423 strb r3, [r4, #16]
- ip_addr_debug_print_val(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE,
- pcb->remote_ip);
- LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, (", port %"U16_F")\n", pcb->remote_port));
- /* Insert UDP PCB into the list of active UDP PCBs. */
- for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
- 8011dba: 4b15 ldr r3, [pc, #84] @ (8011e10 <udp_connect+0x78>)
- 8011dbc: 681a ldr r2, [r3, #0]
- 8011dbe: 4613 mov r3, r2
- 8011dc0: b1f3 cbz r3, 8011e00 <udp_connect+0x68>
- if (pcb == ipcb) {
- 8011dc2: 429c cmp r4, r3
- 8011dc4: d021 beq.n 8011e0a <udp_connect+0x72>
- for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
- 8011dc6: 68db ldr r3, [r3, #12]
- 8011dc8: e7fa b.n 8011dc0 <udp_connect+0x28>
- LWIP_ERROR("udp_connect: invalid pcb", pcb != NULL, return ERR_ARG);
- 8011dca: 4b12 ldr r3, [pc, #72] @ (8011e14 <udp_connect+0x7c>)
- 8011dcc: f240 4235 movw r2, #1077 @ 0x435
- 8011dd0: 4911 ldr r1, [pc, #68] @ (8011e18 <udp_connect+0x80>)
- 8011dd2: 4812 ldr r0, [pc, #72] @ (8011e1c <udp_connect+0x84>)
- 8011dd4: f001 fb18 bl 8013408 <iprintf>
- 8011dd8: f06f 000f mvn.w r0, #15
- 8011ddc: e014 b.n 8011e08 <udp_connect+0x70>
- LWIP_ERROR("udp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
- 8011dde: 4b0d ldr r3, [pc, #52] @ (8011e14 <udp_connect+0x7c>)
- 8011de0: f240 4236 movw r2, #1078 @ 0x436
- 8011de4: 490e ldr r1, [pc, #56] @ (8011e20 <udp_connect+0x88>)
- 8011de6: 480d ldr r0, [pc, #52] @ (8011e1c <udp_connect+0x84>)
- 8011de8: f001 fb0e bl 8013408 <iprintf>
- 8011dec: f06f 000f mvn.w r0, #15
- 8011df0: e00a b.n 8011e08 <udp_connect+0x70>
- err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port);
- 8011df2: 4621 mov r1, r4
- 8011df4: 4620 mov r0, r4
- 8011df6: f7ff fdfd bl 80119f4 <udp_bind>
- if (err != ERR_OK) {
- 8011dfa: 2800 cmp r0, #0
- 8011dfc: d0d6 beq.n 8011dac <udp_connect+0x14>
- 8011dfe: e003 b.n 8011e08 <udp_connect+0x70>
- /* already on the list, just return */
- return ERR_OK;
- }
- }
- /* PCB not yet on the list, add PCB now */
- pcb->next = udp_pcbs;
- 8011e00: 60e2 str r2, [r4, #12]
- udp_pcbs = pcb;
- 8011e02: 4b03 ldr r3, [pc, #12] @ (8011e10 <udp_connect+0x78>)
- 8011e04: 601c str r4, [r3, #0]
- return ERR_OK;
- 8011e06: 2000 movs r0, #0
- }
- 8011e08: bd70 pop {r4, r5, r6, pc}
- return ERR_OK;
- 8011e0a: 2000 movs r0, #0
- 8011e0c: e7fc b.n 8011e08 <udp_connect+0x70>
- 8011e0e: bf00 nop
- 8011e10: 24019c40 .word 0x24019c40
- 8011e14: 08017b60 .word 0x08017b60
- 8011e18: 08017e48 .word 0x08017e48
- 8011e1c: 080144e8 .word 0x080144e8
- 8011e20: 08017e64 .word 0x08017e64
- 08011e24 <udp_disconnect>:
- *
- * @param pcb the udp pcb to disconnect.
- */
- void
- udp_disconnect(struct udp_pcb *pcb)
- {
- 8011e24: b510 push {r4, lr}
- 8011e26: 4604 mov r4, r0
- LWIP_ASSERT_CORE_LOCKED();
- 8011e28: f7f1 fe70 bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("udp_disconnect: invalid pcb", pcb != NULL, return);
- 8011e2c: b144 cbz r4, 8011e40 <udp_disconnect+0x1c>
- #if LWIP_IPV4 && LWIP_IPV6
- if (IP_IS_ANY_TYPE_VAL(pcb->local_ip)) {
- ip_addr_copy(pcb->remote_ip, *IP_ANY_TYPE);
- } else {
- #endif
- ip_addr_set_any(IP_IS_V6_VAL(pcb->remote_ip), &pcb->remote_ip);
- 8011e2e: 2300 movs r3, #0
- 8011e30: 6063 str r3, [r4, #4]
- #if LWIP_IPV4 && LWIP_IPV6
- }
- #endif
- pcb->remote_port = 0;
- 8011e32: 82a3 strh r3, [r4, #20]
- pcb->netif_idx = NETIF_NO_INDEX;
- 8011e34: 7223 strb r3, [r4, #8]
- /* mark PCB as unconnected */
- udp_clear_flags(pcb, UDP_FLAGS_CONNECTED);
- 8011e36: 7c23 ldrb r3, [r4, #16]
- 8011e38: f003 03fb and.w r3, r3, #251 @ 0xfb
- 8011e3c: 7423 strb r3, [r4, #16]
- }
- 8011e3e: bd10 pop {r4, pc}
- LWIP_ERROR("udp_disconnect: invalid pcb", pcb != NULL, return);
- 8011e40: 4b03 ldr r3, [pc, #12] @ (8011e50 <udp_disconnect+0x2c>)
- 8011e42: f240 426a movw r2, #1130 @ 0x46a
- 8011e46: 4903 ldr r1, [pc, #12] @ (8011e54 <udp_disconnect+0x30>)
- 8011e48: 4803 ldr r0, [pc, #12] @ (8011e58 <udp_disconnect+0x34>)
- 8011e4a: f001 fadd bl 8013408 <iprintf>
- 8011e4e: e7f6 b.n 8011e3e <udp_disconnect+0x1a>
- 8011e50: 08017b60 .word 0x08017b60
- 8011e54: 08017e80 .word 0x08017e80
- 8011e58: 080144e8 .word 0x080144e8
- 08011e5c <udp_recv>:
- * @param recv function pointer of the callback function
- * @param recv_arg additional argument to pass to the callback function
- */
- void
- udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg)
- {
- 8011e5c: b570 push {r4, r5, r6, lr}
- 8011e5e: 4604 mov r4, r0
- 8011e60: 460e mov r6, r1
- 8011e62: 4615 mov r5, r2
- LWIP_ASSERT_CORE_LOCKED();
- 8011e64: f7f1 fe52 bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("udp_recv: invalid pcb", pcb != NULL, return);
- 8011e68: b114 cbz r4, 8011e70 <udp_recv+0x14>
- /* remember recv() callback and user data */
- pcb->recv = recv;
- 8011e6a: 61a6 str r6, [r4, #24]
- pcb->recv_arg = recv_arg;
- 8011e6c: 61e5 str r5, [r4, #28]
- }
- 8011e6e: bd70 pop {r4, r5, r6, pc}
- LWIP_ERROR("udp_recv: invalid pcb", pcb != NULL, return);
- 8011e70: 4b03 ldr r3, [pc, #12] @ (8011e80 <udp_recv+0x24>)
- 8011e72: f240 428a movw r2, #1162 @ 0x48a
- 8011e76: 4903 ldr r1, [pc, #12] @ (8011e84 <udp_recv+0x28>)
- 8011e78: 4803 ldr r0, [pc, #12] @ (8011e88 <udp_recv+0x2c>)
- 8011e7a: f001 fac5 bl 8013408 <iprintf>
- 8011e7e: e7f6 b.n 8011e6e <udp_recv+0x12>
- 8011e80: 08017b60 .word 0x08017b60
- 8011e84: 08017e9c .word 0x08017e9c
- 8011e88: 080144e8 .word 0x080144e8
- 08011e8c <udp_remove>:
- *
- * @see udp_new()
- */
- void
- udp_remove(struct udp_pcb *pcb)
- {
- 8011e8c: b510 push {r4, lr}
- 8011e8e: 4604 mov r4, r0
- struct udp_pcb *pcb2;
- LWIP_ASSERT_CORE_LOCKED();
- 8011e90: f7f1 fe3c bl 8003b0c <sys_check_core_locking>
- LWIP_ERROR("udp_remove: invalid pcb", pcb != NULL, return);
- 8011e94: b154 cbz r4, 8011eac <udp_remove+0x20>
- mib2_udp_unbind(pcb);
- /* pcb to be removed is first in list? */
- if (udp_pcbs == pcb) {
- 8011e96: 4b10 ldr r3, [pc, #64] @ (8011ed8 <udp_remove+0x4c>)
- 8011e98: 681a ldr r2, [r3, #0]
- 8011e9a: 42a2 cmp r2, r4
- 8011e9c: d112 bne.n 8011ec4 <udp_remove+0x38>
- /* make list start at 2nd pcb */
- udp_pcbs = udp_pcbs->next;
- 8011e9e: 68d2 ldr r2, [r2, #12]
- 8011ea0: 601a str r2, [r3, #0]
- pcb2->next = pcb->next;
- break;
- }
- }
- }
- memp_free(MEMP_UDP_PCB, pcb);
- 8011ea2: 4621 mov r1, r4
- 8011ea4: 2000 movs r0, #0
- 8011ea6: f7f9 fbe3 bl 800b670 <memp_free>
- }
- 8011eaa: bd10 pop {r4, pc}
- LWIP_ERROR("udp_remove: invalid pcb", pcb != NULL, return);
- 8011eac: 4b0b ldr r3, [pc, #44] @ (8011edc <udp_remove+0x50>)
- 8011eae: f240 42a1 movw r2, #1185 @ 0x4a1
- 8011eb2: 490b ldr r1, [pc, #44] @ (8011ee0 <udp_remove+0x54>)
- 8011eb4: 480b ldr r0, [pc, #44] @ (8011ee4 <udp_remove+0x58>)
- 8011eb6: f001 faa7 bl 8013408 <iprintf>
- 8011eba: e7f6 b.n 8011eaa <udp_remove+0x1e>
- pcb2->next = pcb->next;
- 8011ebc: 68e3 ldr r3, [r4, #12]
- 8011ebe: 60d3 str r3, [r2, #12]
- break;
- 8011ec0: e7ef b.n 8011ea2 <udp_remove+0x16>
- 8011ec2: 461a mov r2, r3
- for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) {
- 8011ec4: 2a00 cmp r2, #0
- 8011ec6: d0ec beq.n 8011ea2 <udp_remove+0x16>
- if (pcb2->next != NULL && pcb2->next == pcb) {
- 8011ec8: 68d3 ldr r3, [r2, #12]
- 8011eca: 2b00 cmp r3, #0
- 8011ecc: d0f9 beq.n 8011ec2 <udp_remove+0x36>
- 8011ece: 42a3 cmp r3, r4
- 8011ed0: d0f4 beq.n 8011ebc <udp_remove+0x30>
- 8011ed2: 461a mov r2, r3
- 8011ed4: e7f6 b.n 8011ec4 <udp_remove+0x38>
- 8011ed6: bf00 nop
- 8011ed8: 24019c40 .word 0x24019c40
- 8011edc: 08017b60 .word 0x08017b60
- 8011ee0: 08017eb4 .word 0x08017eb4
- 8011ee4: 080144e8 .word 0x080144e8
- 08011ee8 <udp_new>:
- *
- * @see udp_remove()
- */
- struct udp_pcb *
- udp_new(void)
- {
- 8011ee8: b510 push {r4, lr}
- struct udp_pcb *pcb;
- LWIP_ASSERT_CORE_LOCKED();
- 8011eea: f7f1 fe0f bl 8003b0c <sys_check_core_locking>
- pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB);
- 8011eee: 2000 movs r0, #0
- 8011ef0: f7f9 fb88 bl 800b604 <memp_malloc>
- /* could allocate UDP PCB? */
- if (pcb != NULL) {
- 8011ef4: 4604 mov r4, r0
- 8011ef6: b128 cbz r0, 8011f04 <udp_new+0x1c>
- /* UDP Lite: by initializing to all zeroes, chksum_len is set to 0
- * which means checksum is generated over the whole datagram per default
- * (recommended as default by RFC 3828). */
- /* initialize PCB to all zeroes */
- memset(pcb, 0, sizeof(struct udp_pcb));
- 8011ef8: 2220 movs r2, #32
- 8011efa: 2100 movs r1, #0
- 8011efc: f001 fbdc bl 80136b8 <memset>
- pcb->ttl = UDP_TTL;
- 8011f00: 23ff movs r3, #255 @ 0xff
- 8011f02: 72e3 strb r3, [r4, #11]
- #if LWIP_MULTICAST_TX_OPTIONS
- udp_set_multicast_ttl(pcb, UDP_TTL);
- #endif /* LWIP_MULTICAST_TX_OPTIONS */
- }
- return pcb;
- }
- 8011f04: 4620 mov r0, r4
- 8011f06: bd10 pop {r4, pc}
- 08011f08 <udp_new_ip_type>:
- *
- * @see udp_remove()
- */
- struct udp_pcb *
- udp_new_ip_type(u8_t type)
- {
- 8011f08: b508 push {r3, lr}
- struct udp_pcb *pcb;
- LWIP_ASSERT_CORE_LOCKED();
- 8011f0a: f7f1 fdff bl 8003b0c <sys_check_core_locking>
- pcb = udp_new();
- 8011f0e: f7ff ffeb bl 8011ee8 <udp_new>
- }
- #else
- LWIP_UNUSED_ARG(type);
- #endif /* LWIP_IPV4 && LWIP_IPV6 */
- return pcb;
- }
- 8011f12: bd08 pop {r3, pc}
- 08011f14 <udp_netif_ip_addr_changed>:
- */
- void udp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr)
- {
- struct udp_pcb *upcb;
- if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) {
- 8011f14: b1b8 cbz r0, 8011f46 <udp_netif_ip_addr_changed+0x32>
- 8011f16: 4602 mov r2, r0
- 8011f18: 6803 ldr r3, [r0, #0]
- 8011f1a: b1a3 cbz r3, 8011f46 <udp_netif_ip_addr_changed+0x32>
- 8011f1c: b199 cbz r1, 8011f46 <udp_netif_ip_addr_changed+0x32>
- 8011f1e: 680b ldr r3, [r1, #0]
- 8011f20: b18b cbz r3, 8011f46 <udp_netif_ip_addr_changed+0x32>
- for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) {
- 8011f22: 4b09 ldr r3, [pc, #36] @ (8011f48 <udp_netif_ip_addr_changed+0x34>)
- 8011f24: 681b ldr r3, [r3, #0]
- 8011f26: b16b cbz r3, 8011f44 <udp_netif_ip_addr_changed+0x30>
- {
- 8011f28: b410 push {r4}
- 8011f2a: e001 b.n 8011f30 <udp_netif_ip_addr_changed+0x1c>
- for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) {
- 8011f2c: 68db ldr r3, [r3, #12]
- 8011f2e: b133 cbz r3, 8011f3e <udp_netif_ip_addr_changed+0x2a>
- /* PCB bound to current local interface address? */
- if (ip_addr_cmp(&upcb->local_ip, old_addr)) {
- 8011f30: 6810 ldr r0, [r2, #0]
- 8011f32: 681c ldr r4, [r3, #0]
- 8011f34: 4284 cmp r4, r0
- 8011f36: d1f9 bne.n 8011f2c <udp_netif_ip_addr_changed+0x18>
- /* 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);
- 8011f38: 6808 ldr r0, [r1, #0]
- 8011f3a: 6018 str r0, [r3, #0]
- 8011f3c: e7f6 b.n 8011f2c <udp_netif_ip_addr_changed+0x18>
- }
- }
- }
- }
- 8011f3e: f85d 4b04 ldr.w r4, [sp], #4
- 8011f42: 4770 bx lr
- 8011f44: 4770 bx lr
- 8011f46: 4770 bx lr
- 8011f48: 24019c40 .word 0x24019c40
- 08011f4c <NewMessageData>:
- #include "cmsis_os.h"
- osMutexId_t mqttMutex;
- static void NewMessageData(MessageData* md, MQTTString* aTopicName, MQTTMessage* aMessage) {
- md->topicName = aTopicName;
- 8011f4c: 6041 str r1, [r0, #4]
- md->message = aMessage;
- 8011f4e: 6002 str r2, [r0, #0]
- }
- 8011f50: 4770 bx lr
- 08011f52 <getNextPacketId>:
- static int getNextPacketId(MQTTClient *c) {
- 8011f52: 4602 mov r2, r0
- return c->next_packetid = (c->next_packetid == MAX_PACKET_ID) ? 1 : c->next_packetid + 1;
- 8011f54: 6800 ldr r0, [r0, #0]
- 8011f56: f64f 71ff movw r1, #65535 @ 0xffff
- 8011f5a: 4288 cmp r0, r1
- 8011f5c: d002 beq.n 8011f64 <getNextPacketId+0x12>
- 8011f5e: 3001 adds r0, #1
- 8011f60: 6010 str r0, [r2, #0]
- }
- 8011f62: 4770 bx lr
- return c->next_packetid = (c->next_packetid == MAX_PACKET_ID) ? 1 : c->next_packetid + 1;
- 8011f64: 2001 movs r0, #1
- 8011f66: e7fb b.n 8011f60 <getNextPacketId+0xe>
- 08011f68 <decodePacket>:
- }
- }
- static int decodePacket(MQTTClient* c, int* value, int timeout)
- {
- 8011f68: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr}
- 8011f6c: b083 sub sp, #12
- 8011f6e: 4681 mov r9, r0
- 8011f70: 460e mov r6, r1
- 8011f72: 4690 mov r8, r2
- unsigned char i;
- int multiplier = 1;
- int len = 0;
- const int MAX_NO_OF_REMAINING_LENGTH_BYTES = 4;
- *value = 0;
- 8011f74: 2400 movs r4, #0
- 8011f76: 600c str r4, [r1, #0]
- int multiplier = 1;
- 8011f78: 2701 movs r7, #1
- do
- {
- int rc = MQTTPACKET_READ_ERROR;
- if (++len > MAX_NO_OF_REMAINING_LENGTH_BYTES)
- 8011f7a: 3401 adds r4, #1
- 8011f7c: 2c04 cmp r4, #4
- 8011f7e: dc15 bgt.n 8011fac <decodePacket+0x44>
- {
- rc = MQTTPACKET_READ_ERROR; /* bad data */
- goto exit;
- }
- rc = c->ipstack->mqttread(c->ipstack, &i, 1, timeout);
- 8011f80: f8d9 0054 ldr.w r0, [r9, #84] @ 0x54
- 8011f84: 6845 ldr r5, [r0, #4]
- 8011f86: 4643 mov r3, r8
- 8011f88: 2201 movs r2, #1
- 8011f8a: f10d 0107 add.w r1, sp, #7
- 8011f8e: 47a8 blx r5
- if (rc != 1)
- 8011f90: 2801 cmp r0, #1
- 8011f92: d10b bne.n 8011fac <decodePacket+0x44>
- goto exit;
- *value += (i & 127) * multiplier;
- 8011f94: f89d 3007 ldrb.w r3, [sp, #7]
- 8011f98: f003 027f and.w r2, r3, #127 @ 0x7f
- 8011f9c: 6831 ldr r1, [r6, #0]
- 8011f9e: fb07 1202 mla r2, r7, r2, r1
- 8011fa2: 6032 str r2, [r6, #0]
- multiplier *= 128;
- 8011fa4: 01ff lsls r7, r7, #7
- } while ((i & 128) != 0);
- 8011fa6: f013 0f80 tst.w r3, #128 @ 0x80
- 8011faa: d1e6 bne.n 8011f7a <decodePacket+0x12>
- exit:
- return len;
- }
- 8011fac: 4620 mov r0, r4
- 8011fae: b003 add sp, #12
- 8011fb0: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
- 08011fb4 <isTopicMatched>:
- // # can only be at end
- // + and # can only be next to separator
- static char isTopicMatched(char* topicFilter, MQTTString* topicName)
- {
- char* curf = topicFilter;
- char* curn = topicName->lenstring.data;
- 8011fb4: 688b ldr r3, [r1, #8]
- char* curn_end = curn + topicName->lenstring.len;
- 8011fb6: 6849 ldr r1, [r1, #4]
- 8011fb8: 4419 add r1, r3
- while (*curf && curn < curn_end)
- 8011fba: e008 b.n 8011fce <isTopicMatched+0x1a>
- {
- if (*curn == '/' && *curf != '/')
- 8011fbc: 2a2f cmp r2, #47 @ 0x2f
- 8011fbe: d00f beq.n 8011fe0 <isTopicMatched+0x2c>
- 8011fc0: e014 b.n 8011fec <isTopicMatched+0x38>
- break;
- if (*curf != '+' && *curf != '#' && *curf != *curn)
- break;
- if (*curf == '+')
- 8011fc2: 2a2b cmp r2, #43 @ 0x2b
- 8011fc4: d016 beq.n 8011ff4 <isTopicMatched+0x40>
- { // skip until we meet the next separator, or end of string
- char* nextpos = curn + 1;
- while (nextpos < curn_end && *nextpos != '/')
- nextpos = ++curn + 1;
- }
- else if (*curf == '#')
- 8011fc6: 2a23 cmp r2, #35 @ 0x23
- 8011fc8: d01e beq.n 8012008 <isTopicMatched+0x54>
- curn = curn_end - 1; // skip until end of string
- curf++;
- 8011fca: 3001 adds r0, #1
- curn++;
- 8011fcc: 3301 adds r3, #1
- while (*curf && curn < curn_end)
- 8011fce: 7802 ldrb r2, [r0, #0]
- 8011fd0: b162 cbz r2, 8011fec <isTopicMatched+0x38>
- 8011fd2: 428b cmp r3, r1
- 8011fd4: d20a bcs.n 8011fec <isTopicMatched+0x38>
- if (*curn == '/' && *curf != '/')
- 8011fd6: f893 c000 ldrb.w ip, [r3]
- 8011fda: f1bc 0f2f cmp.w ip, #47 @ 0x2f
- 8011fde: d0ed beq.n 8011fbc <isTopicMatched+0x8>
- if (*curf != '+' && *curf != '#' && *curf != *curn)
- 8011fe0: 2a2b cmp r2, #43 @ 0x2b
- 8011fe2: bf18 it ne
- 8011fe4: 2a23 cmpne r2, #35 @ 0x23
- 8011fe6: d0ec beq.n 8011fc2 <isTopicMatched+0xe>
- 8011fe8: 4594 cmp ip, r2
- 8011fea: d0ea beq.n 8011fc2 <isTopicMatched+0xe>
- };
- return (curn == curn_end) && (*curf == '\0');
- 8011fec: 428b cmp r3, r1
- 8011fee: d00d beq.n 801200c <isTopicMatched+0x58>
- 8011ff0: 2000 movs r0, #0
- 8011ff2: 4770 bx lr
- char* nextpos = curn + 1;
- 8011ff4: 1c5a adds r2, r3, #1
- while (nextpos < curn_end && *nextpos != '/')
- 8011ff6: e001 b.n 8011ffc <isTopicMatched+0x48>
- nextpos = ++curn + 1;
- 8011ff8: 1c9a adds r2, r3, #2
- 8011ffa: 3301 adds r3, #1
- while (nextpos < curn_end && *nextpos != '/')
- 8011ffc: 428a cmp r2, r1
- 8011ffe: d2e4 bcs.n 8011fca <isTopicMatched+0x16>
- 8012000: 7812 ldrb r2, [r2, #0]
- 8012002: 2a2f cmp r2, #47 @ 0x2f
- 8012004: d1f8 bne.n 8011ff8 <isTopicMatched+0x44>
- 8012006: e7e0 b.n 8011fca <isTopicMatched+0x16>
- curn = curn_end - 1; // skip until end of string
- 8012008: 1e4b subs r3, r1, #1
- 801200a: e7de b.n 8011fca <isTopicMatched+0x16>
- return (curn == curn_end) && (*curf == '\0');
- 801200c: b10a cbz r2, 8012012 <isTopicMatched+0x5e>
- 801200e: 2000 movs r0, #0
- 8012010: 4770 bx lr
- 8012012: 2001 movs r0, #1
- }
- 8012014: 4770 bx lr
- 08012016 <sendPacket>:
- {
- 8012016: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
- 801201a: 4606 mov r6, r0
- 801201c: 460f mov r7, r1
- 801201e: 4690 mov r8, r2
- sent = 0;
- 8012020: 2400 movs r4, #0
- while (sent < length && !TimerIsExpired(timer))
- 8012022: e000 b.n 8012026 <sendPacket+0x10>
- sent += rc;
- 8012024: 4404 add r4, r0
- while (sent < length && !TimerIsExpired(timer))
- 8012026: 42bc cmp r4, r7
- 8012028: da13 bge.n 8012052 <sendPacket+0x3c>
- 801202a: 4640 mov r0, r8
- 801202c: f000 fc0a bl 8012844 <TimerIsExpired>
- 8012030: b978 cbnz r0, 8012052 <sendPacket+0x3c>
- rc = c->ipstack->mqttwrite(c->ipstack, &c->buf[sent], length, TimerLeftMS(timer));
- 8012032: f8d6 9054 ldr.w r9, [r6, #84] @ 0x54
- 8012036: f8d9 a008 ldr.w sl, [r9, #8]
- 801203a: 6935 ldr r5, [r6, #16]
- 801203c: 4425 add r5, r4
- 801203e: 4640 mov r0, r8
- 8012040: f000 fc1a bl 8012878 <TimerLeftMS>
- 8012044: 4603 mov r3, r0
- 8012046: 463a mov r2, r7
- 8012048: 4629 mov r1, r5
- 801204a: 4648 mov r0, r9
- 801204c: 47d0 blx sl
- if (rc < 0) // there was an error writing the data
- 801204e: 2800 cmp r0, #0
- 8012050: dae8 bge.n 8012024 <sendPacket+0xe>
- if (sent == length)
- 8012052: 42bc cmp r4, r7
- 8012054: d107 bne.n 8012066 <sendPacket+0x50>
- TimerCountdown(&c->last_sent, c->keepAliveInterval); // record the fact that we have MQTT_SUCCESSfully sent the packet
- 8012056: 69b1 ldr r1, [r6, #24]
- 8012058: f106 0058 add.w r0, r6, #88 @ 0x58
- 801205c: f000 fc02 bl 8012864 <TimerCountdown>
- rc = MQTT_SUCCESS;
- 8012060: 2000 movs r0, #0
- }
- 8012062: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
- rc = FAILURE;
- 8012066: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- return rc;
- 801206a: e7fa b.n 8012062 <sendPacket+0x4c>
- 0801206c <readPacket>:
- {
- 801206c: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr}
- 8012070: b083 sub sp, #12
- 8012072: 4604 mov r4, r0
- 8012074: 460e mov r6, r1
- MQTTHeader header = {0};
- 8012076: 2300 movs r3, #0
- int rem_len = 0;
- 8012078: 9301 str r3, [sp, #4]
- int rc = c->ipstack->mqttread(c->ipstack, c->readbuf, 1, TimerLeftMS(timer));
- 801207a: 6d45 ldr r5, [r0, #84] @ 0x54
- 801207c: 686f ldr r7, [r5, #4]
- 801207e: f8d0 8014 ldr.w r8, [r0, #20]
- 8012082: 4608 mov r0, r1
- 8012084: f000 fbf8 bl 8012878 <TimerLeftMS>
- 8012088: 4603 mov r3, r0
- 801208a: 2201 movs r2, #1
- 801208c: 4641 mov r1, r8
- 801208e: 4628 mov r0, r5
- 8012090: 47b8 blx r7
- 8012092: 4605 mov r5, r0
- if (rc != 1)
- 8012094: 2801 cmp r0, #1
- 8012096: d003 beq.n 80120a0 <readPacket+0x34>
- }
- 8012098: 4628 mov r0, r5
- 801209a: b003 add sp, #12
- 801209c: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
- decodePacket(c, &rem_len, TimerLeftMS(timer));
- 80120a0: 4630 mov r0, r6
- 80120a2: f000 fbe9 bl 8012878 <TimerLeftMS>
- 80120a6: 4602 mov r2, r0
- 80120a8: a901 add r1, sp, #4
- 80120aa: 4620 mov r0, r4
- 80120ac: f7ff ff5c bl 8011f68 <decodePacket>
- len += MQTTPacket_encode(c->readbuf + 1, rem_len); /* put the original remaining length back into the buffer */
- 80120b0: 6960 ldr r0, [r4, #20]
- 80120b2: 9901 ldr r1, [sp, #4]
- 80120b4: 3001 adds r0, #1
- 80120b6: f000 fdd7 bl 8012c68 <MQTTPacket_encode>
- 80120ba: 3001 adds r0, #1
- if (rem_len > (c->readbuf_size - len))
- 80120bc: 68e3 ldr r3, [r4, #12]
- 80120be: 1a1b subs r3, r3, r0
- 80120c0: 9d01 ldr r5, [sp, #4]
- 80120c2: 42ab cmp r3, r5
- 80120c4: d31f bcc.n 8012106 <readPacket+0x9a>
- if (rem_len > 0 && (rc = c->ipstack->mqttread(c->ipstack, c->readbuf + len, rem_len, TimerLeftMS(timer)) != rem_len)) {
- 80120c6: 2d00 cmp r5, #0
- 80120c8: dc0a bgt.n 80120e0 <readPacket+0x74>
- header.byte = c->readbuf[0];
- 80120ca: 6963 ldr r3, [r4, #20]
- 80120cc: 781d ldrb r5, [r3, #0]
- rc = header.bits.type;
- 80120ce: 092d lsrs r5, r5, #4
- if (c->keepAliveInterval > 0)
- 80120d0: 69a1 ldr r1, [r4, #24]
- 80120d2: 2900 cmp r1, #0
- 80120d4: d0e0 beq.n 8012098 <readPacket+0x2c>
- TimerCountdown(&c->last_received, c->keepAliveInterval); // record the fact that we have MQTT_SUCCESSfully received a packet
- 80120d6: f104 0060 add.w r0, r4, #96 @ 0x60
- 80120da: f000 fbc3 bl 8012864 <TimerCountdown>
- 80120de: e7db b.n 8012098 <readPacket+0x2c>
- if (rem_len > 0 && (rc = c->ipstack->mqttread(c->ipstack, c->readbuf + len, rem_len, TimerLeftMS(timer)) != rem_len)) {
- 80120e0: f8d4 8054 ldr.w r8, [r4, #84] @ 0x54
- 80120e4: f8d8 9004 ldr.w r9, [r8, #4]
- 80120e8: 6967 ldr r7, [r4, #20]
- 80120ea: 4407 add r7, r0
- 80120ec: 4630 mov r0, r6
- 80120ee: f000 fbc3 bl 8012878 <TimerLeftMS>
- 80120f2: 4603 mov r3, r0
- 80120f4: 462a mov r2, r5
- 80120f6: 4639 mov r1, r7
- 80120f8: 4640 mov r0, r8
- 80120fa: 47c8 blx r9
- 80120fc: 9b01 ldr r3, [sp, #4]
- 80120fe: 4298 cmp r0, r3
- 8012100: d0e3 beq.n 80120ca <readPacket+0x5e>
- rc = 0;
- 8012102: 2500 movs r5, #0
- return rc;
- 8012104: e7c8 b.n 8012098 <readPacket+0x2c>
- rc = BUFFER_OVERFLOW;
- 8012106: f06f 0501 mvn.w r5, #1
- 801210a: e7c5 b.n 8012098 <readPacket+0x2c>
- 0801210c <MQTTClientInit>:
- {
- 801210c: b538 push {r3, r4, r5, lr}
- 801210e: 4604 mov r4, r0
- c->ipstack = network;
- 8012110: 6541 str r1, [r0, #84] @ 0x54
- for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
- 8012112: 2100 movs r1, #0
- 8012114: e004 b.n 8012120 <MQTTClientInit+0x14>
- c->messageHandlers[i].topicFilter = 0;
- 8012116: 1d48 adds r0, r1, #5
- 8012118: 2500 movs r5, #0
- 801211a: f844 5030 str.w r5, [r4, r0, lsl #3]
- for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
- 801211e: 3101 adds r1, #1
- 8012120: 2904 cmp r1, #4
- 8012122: ddf8 ble.n 8012116 <MQTTClientInit+0xa>
- c->command_timeout_ms = command_timeout_ms;
- 8012124: 6062 str r2, [r4, #4]
- c->buf = sendbuf;
- 8012126: 6123 str r3, [r4, #16]
- c->buf_size = sendbuf_size;
- 8012128: 9b04 ldr r3, [sp, #16]
- 801212a: 60a3 str r3, [r4, #8]
- c->readbuf = readbuf;
- 801212c: 9b05 ldr r3, [sp, #20]
- 801212e: 6163 str r3, [r4, #20]
- c->readbuf_size = readbuf_size;
- 8012130: 9b06 ldr r3, [sp, #24]
- 8012132: 60e3 str r3, [r4, #12]
- c->isconnected = 0;
- 8012134: 2300 movs r3, #0
- 8012136: 6223 str r3, [r4, #32]
- c->cleansession = 0;
- 8012138: 6263 str r3, [r4, #36] @ 0x24
- c->ping_outstanding = 0;
- 801213a: 7723 strb r3, [r4, #28]
- c->defaultMessageHandler = NULL;
- 801213c: 6523 str r3, [r4, #80] @ 0x50
- c->next_packetid = 1;
- 801213e: 4620 mov r0, r4
- 8012140: 2301 movs r3, #1
- 8012142: f840 3b58 str.w r3, [r0], #88
- TimerInit(&c->last_sent);
- 8012146: f000 fba1 bl 801288c <TimerInit>
- TimerInit(&c->last_received);
- 801214a: f104 0060 add.w r0, r4, #96 @ 0x60
- 801214e: f000 fb9d bl 801288c <TimerInit>
- if(mqttMutex == NULL)
- 8012152: 4b05 ldr r3, [pc, #20] @ (8012168 <MQTTClientInit+0x5c>)
- 8012154: 681b ldr r3, [r3, #0]
- 8012156: b103 cbz r3, 801215a <MQTTClientInit+0x4e>
- }
- 8012158: bd38 pop {r3, r4, r5, pc}
- mqttMutex = osMutexNew(NULL);
- 801215a: 2000 movs r0, #0
- 801215c: f7f1 feac bl 8003eb8 <osMutexNew>
- 8012160: 4b01 ldr r3, [pc, #4] @ (8012168 <MQTTClientInit+0x5c>)
- 8012162: 6018 str r0, [r3, #0]
- }
- 8012164: e7f8 b.n 8012158 <MQTTClientInit+0x4c>
- 8012166: bf00 nop
- 8012168: 24019c44 .word 0x24019c44
- 0801216c <deliverMessage>:
- int deliverMessage(MQTTClient* c, MQTTString* topicName, MQTTMessage* message)
- {
- 801216c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8012170: b082 sub sp, #8
- 8012172: 4605 mov r5, r0
- 8012174: 460e mov r6, r1
- 8012176: 4690 mov r8, r2
- int i;
- int rc = FAILURE;
- 8012178: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff
- // we have to find the right message handler - indexed by topic
- for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
- 801217c: 2400 movs r4, #0
- 801217e: e007 b.n 8012190 <deliverMessage+0x24>
- {
- if (c->messageHandlers[i].topicFilter != 0 && (MQTTPacket_equals(topicName, (char*)c->messageHandlers[i].topicFilter) ||
- isTopicMatched((char*)c->messageHandlers[i].topicFilter, topicName)))
- 8012180: 1d63 adds r3, r4, #5
- 8012182: 4631 mov r1, r6
- 8012184: f855 0033 ldr.w r0, [r5, r3, lsl #3]
- 8012188: f7ff ff14 bl 8011fb4 <isTopicMatched>
- if (c->messageHandlers[i].topicFilter != 0 && (MQTTPacket_equals(topicName, (char*)c->messageHandlers[i].topicFilter) ||
- 801218c: b960 cbnz r0, 80121a8 <deliverMessage+0x3c>
- for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
- 801218e: 3401 adds r4, #1
- 8012190: 2c04 cmp r4, #4
- 8012192: dc1c bgt.n 80121ce <deliverMessage+0x62>
- if (c->messageHandlers[i].topicFilter != 0 && (MQTTPacket_equals(topicName, (char*)c->messageHandlers[i].topicFilter) ||
- 8012194: 1d63 adds r3, r4, #5
- 8012196: f855 1033 ldr.w r1, [r5, r3, lsl #3]
- 801219a: 2900 cmp r1, #0
- 801219c: d0f7 beq.n 801218e <deliverMessage+0x22>
- 801219e: 4630 mov r0, r6
- 80121a0: f000 fe4c bl 8012e3c <MQTTPacket_equals>
- 80121a4: 2800 cmp r0, #0
- 80121a6: d0eb beq.n 8012180 <deliverMessage+0x14>
- {
- if (c->messageHandlers[i].fp != NULL)
- 80121a8: 1d63 adds r3, r4, #5
- 80121aa: eb05 03c3 add.w r3, r5, r3, lsl #3
- 80121ae: 685b ldr r3, [r3, #4]
- 80121b0: 2b00 cmp r3, #0
- 80121b2: d0ec beq.n 801218e <deliverMessage+0x22>
- {
- MessageData md;
- NewMessageData(&md, topicName, message);
- 80121b4: 4642 mov r2, r8
- 80121b6: 4631 mov r1, r6
- 80121b8: 4668 mov r0, sp
- 80121ba: f7ff fec7 bl 8011f4c <NewMessageData>
- c->messageHandlers[i].fp(&md);
- 80121be: 1d63 adds r3, r4, #5
- 80121c0: eb05 03c3 add.w r3, r5, r3, lsl #3
- 80121c4: 685b ldr r3, [r3, #4]
- 80121c6: 4668 mov r0, sp
- 80121c8: 4798 blx r3
- rc = MQTT_SUCCESS;
- 80121ca: 2700 movs r7, #0
- 80121cc: e7df b.n 801218e <deliverMessage+0x22>
- }
- }
- }
- if (rc == FAILURE && c->defaultMessageHandler != NULL)
- 80121ce: b91f cbnz r7, 80121d8 <deliverMessage+0x6c>
- c->defaultMessageHandler(&md);
- rc = MQTT_SUCCESS;
- }
- return rc;
- }
- 80121d0: 4638 mov r0, r7
- 80121d2: b002 add sp, #8
- 80121d4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- if (rc == FAILURE && c->defaultMessageHandler != NULL)
- 80121d8: 6d2b ldr r3, [r5, #80] @ 0x50
- 80121da: 2b00 cmp r3, #0
- 80121dc: d0f8 beq.n 80121d0 <deliverMessage+0x64>
- NewMessageData(&md, topicName, message);
- 80121de: 4642 mov r2, r8
- 80121e0: 4631 mov r1, r6
- 80121e2: 4668 mov r0, sp
- 80121e4: f7ff feb2 bl 8011f4c <NewMessageData>
- c->defaultMessageHandler(&md);
- 80121e8: 6d2b ldr r3, [r5, #80] @ 0x50
- 80121ea: 4668 mov r0, sp
- 80121ec: 4798 blx r3
- rc = MQTT_SUCCESS;
- 80121ee: 2700 movs r7, #0
- return rc;
- 80121f0: e7ee b.n 80121d0 <deliverMessage+0x64>
- 080121f2 <keepalive>:
- int keepalive(MQTTClient* c)
- {
- int rc = MQTT_SUCCESS;
- if (c->keepAliveInterval == 0)
- 80121f2: 6983 ldr r3, [r0, #24]
- 80121f4: b90b cbnz r3, 80121fa <keepalive+0x8>
- int rc = MQTT_SUCCESS;
- 80121f6: 2000 movs r0, #0
- }
- }
- exit:
- return rc;
- }
- 80121f8: 4770 bx lr
- {
- 80121fa: b510 push {r4, lr}
- 80121fc: b082 sub sp, #8
- 80121fe: 4604 mov r4, r0
- if (TimerIsExpired(&c->last_sent) || TimerIsExpired(&c->last_received))
- 8012200: 3058 adds r0, #88 @ 0x58
- 8012202: f000 fb1f bl 8012844 <TimerIsExpired>
- 8012206: b190 cbz r0, 801222e <keepalive+0x3c>
- if (c->ping_outstanding)
- 8012208: 7f23 ldrb r3, [r4, #28]
- 801220a: bb0b cbnz r3, 8012250 <keepalive+0x5e>
- TimerInit(&timer);
- 801220c: 4668 mov r0, sp
- 801220e: f000 fb3d bl 801288c <TimerInit>
- TimerCountdownMS(&timer, 1000);
- 8012212: f44f 717a mov.w r1, #1000 @ 0x3e8
- 8012216: 4668 mov r0, sp
- 8012218: f000 fb1c bl 8012854 <TimerCountdownMS>
- int len = MQTTSerialize_pingreq(c->buf, c->buf_size);
- 801221c: 68a1 ldr r1, [r4, #8]
- 801221e: 6920 ldr r0, [r4, #16]
- 8012220: f000 fc9a bl 8012b58 <MQTTSerialize_pingreq>
- if (len > 0 && (rc = sendPacket(c, len, &timer)) == MQTT_SUCCESS) // send the ping packet
- 8012224: 1e01 subs r1, r0, #0
- 8012226: dc0a bgt.n 801223e <keepalive+0x4c>
- int rc = MQTT_SUCCESS;
- 8012228: 2000 movs r0, #0
- }
- 801222a: b002 add sp, #8
- 801222c: bd10 pop {r4, pc}
- if (TimerIsExpired(&c->last_sent) || TimerIsExpired(&c->last_received))
- 801222e: f104 0060 add.w r0, r4, #96 @ 0x60
- 8012232: f000 fb07 bl 8012844 <TimerIsExpired>
- 8012236: 2800 cmp r0, #0
- 8012238: d1e6 bne.n 8012208 <keepalive+0x16>
- int rc = MQTT_SUCCESS;
- 801223a: 2000 movs r0, #0
- 801223c: e7f5 b.n 801222a <keepalive+0x38>
- if (len > 0 && (rc = sendPacket(c, len, &timer)) == MQTT_SUCCESS) // send the ping packet
- 801223e: 466a mov r2, sp
- 8012240: 4620 mov r0, r4
- 8012242: f7ff fee8 bl 8012016 <sendPacket>
- 8012246: 2800 cmp r0, #0
- 8012248: d1ef bne.n 801222a <keepalive+0x38>
- c->ping_outstanding = 1;
- 801224a: 2301 movs r3, #1
- 801224c: 7723 strb r3, [r4, #28]
- 801224e: e7ec b.n 801222a <keepalive+0x38>
- rc = FAILURE; /* PINGRESP not received in keepalive interval */
- 8012250: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- return rc;
- 8012254: e7e9 b.n 801222a <keepalive+0x38>
- 08012256 <MQTTCleanSession>:
- void MQTTCleanSession(MQTTClient* c)
- {
- int i = 0;
- for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
- 8012256: 2300 movs r3, #0
- 8012258: e004 b.n 8012264 <MQTTCleanSession+0xe>
- c->messageHandlers[i].topicFilter = NULL;
- 801225a: 1d5a adds r2, r3, #5
- 801225c: 2100 movs r1, #0
- 801225e: f840 1032 str.w r1, [r0, r2, lsl #3]
- for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
- 8012262: 3301 adds r3, #1
- 8012264: 2b04 cmp r3, #4
- 8012266: ddf8 ble.n 801225a <MQTTCleanSession+0x4>
- }
- 8012268: 4770 bx lr
- 0801226a <MQTTCloseSession>:
- void MQTTCloseSession(MQTTClient* c)
- {
- 801226a: b508 push {r3, lr}
- c->ping_outstanding = 0;
- 801226c: 2300 movs r3, #0
- 801226e: 7703 strb r3, [r0, #28]
- c->isconnected = 0;
- 8012270: 6203 str r3, [r0, #32]
- if (c->cleansession)
- 8012272: 6a43 ldr r3, [r0, #36] @ 0x24
- 8012274: b903 cbnz r3, 8012278 <MQTTCloseSession+0xe>
- MQTTCleanSession(c);
- }
- 8012276: bd08 pop {r3, pc}
- MQTTCleanSession(c);
- 8012278: f7ff ffed bl 8012256 <MQTTCleanSession>
- }
- 801227c: e7fb b.n 8012276 <MQTTCloseSession+0xc>
- 0801227e <cycle>:
- int cycle(MQTTClient* c, Timer* timer)
- {
- 801227e: b570 push {r4, r5, r6, lr}
- 8012280: b08e sub sp, #56 @ 0x38
- 8012282: 4606 mov r6, r0
- 8012284: 460d mov r5, r1
- int len = 0,
- rc = MQTT_SUCCESS;
- int packet_type = readPacket(c, timer); /* read the socket, see what work is due */
- 8012286: f7ff fef1 bl 801206c <readPacket>
- 801228a: 4604 mov r4, r0
- switch (packet_type)
- 801228c: 280d cmp r0, #13
- 801228e: dc41 bgt.n 8012314 <cycle+0x96>
- 8012290: 2804 cmp r0, #4
- 8012292: db0e blt.n 80122b2 <cycle+0x34>
- 8012294: 2301 movs r3, #1
- 8012296: 4083 lsls r3, r0
- 8012298: f413 6f29 tst.w r3, #2704 @ 0xa90
- 801229c: f040 8095 bne.w 80123ca <cycle+0x14c>
- 80122a0: f013 0f60 tst.w r3, #96 @ 0x60
- 80122a4: d16c bne.n 8012380 <cycle+0x102>
- 80122a6: f413 5f00 tst.w r3, #8192 @ 0x2000
- 80122aa: d033 beq.n 8012314 <cycle+0x96>
- }
- case PUBCOMP:
- break;
- case PINGRESP:
- c->ping_outstanding = 0;
- 80122ac: 2500 movs r5, #0
- 80122ae: 7735 strb r5, [r6, #28]
- break;
- 80122b0: e03b b.n 801232a <cycle+0xac>
- switch (packet_type)
- 80122b2: 2803 cmp r0, #3
- 80122b4: d12d bne.n 8012312 <cycle+0x94>
- msg.payloadlen = 0; /* this is a size_t, but deserialize publish sets this as int */
- 80122b6: 2300 movs r3, #0
- 80122b8: 930d str r3, [sp, #52] @ 0x34
- (unsigned char**)&msg.payload, (int*)&msg.payloadlen, c->readbuf, c->readbuf_size) != 1)
- 80122ba: 68f3 ldr r3, [r6, #12]
- if (MQTTDeserialize_publish(&msg.dup, &intQoS, &msg.retained, &msg.id, &topicName,
- 80122bc: 9304 str r3, [sp, #16]
- 80122be: 6973 ldr r3, [r6, #20]
- 80122c0: 9303 str r3, [sp, #12]
- 80122c2: ab0d add r3, sp, #52 @ 0x34
- 80122c4: 9302 str r3, [sp, #8]
- 80122c6: ab0c add r3, sp, #48 @ 0x30
- 80122c8: 9301 str r3, [sp, #4]
- 80122ca: ab07 add r3, sp, #28
- 80122cc: 9300 str r3, [sp, #0]
- 80122ce: ab0b add r3, sp, #44 @ 0x2c
- 80122d0: f10d 0229 add.w r2, sp, #41 @ 0x29
- 80122d4: a906 add r1, sp, #24
- 80122d6: f10d 002a add.w r0, sp, #42 @ 0x2a
- 80122da: f000 fc42 bl 8012b62 <MQTTDeserialize_publish>
- 80122de: 2801 cmp r0, #1
- 80122e0: d11b bne.n 801231a <cycle+0x9c>
- msg.qos = (enum QoS)intQoS;
- 80122e2: f89d 3018 ldrb.w r3, [sp, #24]
- 80122e6: f88d 3028 strb.w r3, [sp, #40] @ 0x28
- deliverMessage(c, &topicName, &msg);
- 80122ea: aa0a add r2, sp, #40 @ 0x28
- 80122ec: a907 add r1, sp, #28
- 80122ee: 4630 mov r0, r6
- 80122f0: f7ff ff3c bl 801216c <deliverMessage>
- if (msg.qos != QOS0)
- 80122f4: f89d 3028 ldrb.w r3, [sp, #40] @ 0x28
- 80122f8: 2b00 cmp r3, #0
- 80122fa: d03f beq.n 801237c <cycle+0xfe>
- if (msg.qos == QOS1)
- 80122fc: 2b01 cmp r3, #1
- 80122fe: d01d beq.n 801233c <cycle+0xbe>
- else if (msg.qos == QOS2)
- 8012300: 2b02 cmp r3, #2
- 8012302: d02d beq.n 8012360 <cycle+0xe2>
- rc = FAILURE;
- 8012304: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
- if (rc == FAILURE)
- 8012308: f1b5 3fff cmp.w r5, #4294967295 @ 0xffffffff
- 801230c: d10d bne.n 801232a <cycle+0xac>
- goto exit;
- 801230e: 462c mov r4, r5
- 8012310: e000 b.n 8012314 <cycle+0x96>
- switch (packet_type)
- 8012312: dd05 ble.n 8012320 <cycle+0xa2>
- }
- exit:
- if (rc == MQTT_SUCCESS)
- rc = packet_type;
- else if (c->isconnected)
- 8012314: 6a33 ldr r3, [r6, #32]
- 8012316: 2b00 cmp r3, #0
- 8012318: d15c bne.n 80123d4 <cycle+0x156>
- MQTTCloseSession(c);
- return rc;
- }
- 801231a: 4620 mov r0, r4
- 801231c: b00e add sp, #56 @ 0x38
- 801231e: bd70 pop {r4, r5, r6, pc}
- switch (packet_type)
- 8012320: 2800 cmp r0, #0
- 8012322: d050 beq.n 80123c6 <cycle+0x148>
- 8012324: 2802 cmp r0, #2
- 8012326: d1f5 bne.n 8012314 <cycle+0x96>
- 8012328: 2500 movs r5, #0
- if (keepalive(c) != MQTT_SUCCESS) {
- 801232a: 4630 mov r0, r6
- 801232c: f7ff ff61 bl 80121f2 <keepalive>
- 8012330: 2800 cmp r0, #0
- 8012332: d14c bne.n 80123ce <cycle+0x150>
- if (rc == MQTT_SUCCESS)
- 8012334: 2d00 cmp r5, #0
- 8012336: d0f0 beq.n 801231a <cycle+0x9c>
- 8012338: 462c mov r4, r5
- 801233a: e7eb b.n 8012314 <cycle+0x96>
- len = MQTTSerialize_ack(c->buf, c->buf_size, PUBACK, 0, msg.id);
- 801233c: f8bd 302c ldrh.w r3, [sp, #44] @ 0x2c
- 8012340: 9300 str r3, [sp, #0]
- 8012342: 2300 movs r3, #0
- 8012344: 2204 movs r2, #4
- 8012346: 68b1 ldr r1, [r6, #8]
- 8012348: 6930 ldr r0, [r6, #16]
- 801234a: f000 fdef bl 8012f2c <MQTTSerialize_ack>
- 801234e: 4601 mov r1, r0
- if (len <= 0)
- 8012350: 2900 cmp r1, #0
- 8012352: dd10 ble.n 8012376 <cycle+0xf8>
- rc = sendPacket(c, len, timer);
- 8012354: 462a mov r2, r5
- 8012356: 4630 mov r0, r6
- 8012358: f7ff fe5d bl 8012016 <sendPacket>
- 801235c: 4605 mov r5, r0
- 801235e: e7d3 b.n 8012308 <cycle+0x8a>
- len = MQTTSerialize_ack(c->buf, c->buf_size, PUBREC, 0, msg.id);
- 8012360: f8bd 302c ldrh.w r3, [sp, #44] @ 0x2c
- 8012364: 9300 str r3, [sp, #0]
- 8012366: 2300 movs r3, #0
- 8012368: 2205 movs r2, #5
- 801236a: 68b1 ldr r1, [r6, #8]
- 801236c: 6930 ldr r0, [r6, #16]
- 801236e: f000 fddd bl 8012f2c <MQTTSerialize_ack>
- 8012372: 4601 mov r1, r0
- 8012374: e7ec b.n 8012350 <cycle+0xd2>
- rc = FAILURE;
- 8012376: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
- 801237a: e7c8 b.n 801230e <cycle+0x90>
- rc = MQTT_SUCCESS;
- 801237c: 2500 movs r5, #0
- break;
- 801237e: e7d4 b.n 801232a <cycle+0xac>
- if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1)
- 8012380: 68f3 ldr r3, [r6, #12]
- 8012382: 9300 str r3, [sp, #0]
- 8012384: 6973 ldr r3, [r6, #20]
- 8012386: aa0a add r2, sp, #40 @ 0x28
- 8012388: a906 add r1, sp, #24
- 801238a: a807 add r0, sp, #28
- 801238c: f000 fc32 bl 8012bf4 <MQTTDeserialize_ack>
- 8012390: 2801 cmp r0, #1
- 8012392: d113 bne.n 80123bc <cycle+0x13e>
- else if ((len = MQTTSerialize_ack(c->buf, c->buf_size,
- 8012394: 6930 ldr r0, [r6, #16]
- 8012396: 68b1 ldr r1, [r6, #8]
- 8012398: 2c05 cmp r4, #5
- 801239a: d012 beq.n 80123c2 <cycle+0x144>
- 801239c: 2207 movs r2, #7
- 801239e: f8bd 3028 ldrh.w r3, [sp, #40] @ 0x28
- 80123a2: 9300 str r3, [sp, #0]
- 80123a4: 2300 movs r3, #0
- 80123a6: f000 fdc1 bl 8012f2c <MQTTSerialize_ack>
- 80123aa: 1e01 subs r1, r0, #0
- 80123ac: dd06 ble.n 80123bc <cycle+0x13e>
- else if ((rc = sendPacket(c, len, timer)) != MQTT_SUCCESS) // send the PUBREL packet
- 80123ae: 462a mov r2, r5
- 80123b0: 4630 mov r0, r6
- 80123b2: f7ff fe30 bl 8012016 <sendPacket>
- 80123b6: 4605 mov r5, r0
- 80123b8: 2800 cmp r0, #0
- 80123ba: d0b6 beq.n 801232a <cycle+0xac>
- goto exit; // there was a problem
- 80123bc: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
- 80123c0: e7a8 b.n 8012314 <cycle+0x96>
- else if ((len = MQTTSerialize_ack(c->buf, c->buf_size,
- 80123c2: 2206 movs r2, #6
- 80123c4: e7eb b.n 801239e <cycle+0x120>
- switch (packet_type)
- 80123c6: 4605 mov r5, r0
- 80123c8: e7af b.n 801232a <cycle+0xac>
- 80123ca: 2500 movs r5, #0
- 80123cc: e7ad b.n 801232a <cycle+0xac>
- rc = FAILURE;
- 80123ce: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
- 80123d2: e79f b.n 8012314 <cycle+0x96>
- MQTTCloseSession(c);
- 80123d4: 4630 mov r0, r6
- 80123d6: f7ff ff48 bl 801226a <MQTTCloseSession>
- return rc;
- 80123da: e79e b.n 801231a <cycle+0x9c>
- 080123dc <MQTTYield>:
- int MQTTYield(MQTTClient* c, int timeout_ms)
- {
- 80123dc: b530 push {r4, r5, lr}
- 80123de: b083 sub sp, #12
- 80123e0: 4604 mov r4, r0
- 80123e2: 460d mov r5, r1
- int rc = MQTT_SUCCESS;
- Timer timer;
- TimerInit(&timer);
- 80123e4: 4668 mov r0, sp
- 80123e6: f000 fa51 bl 801288c <TimerInit>
- TimerCountdownMS(&timer, timeout_ms);
- 80123ea: 4629 mov r1, r5
- 80123ec: 4668 mov r0, sp
- 80123ee: f000 fa31 bl 8012854 <TimerCountdownMS>
- do
- {
- if (cycle(c, &timer) < 0)
- 80123f2: 4669 mov r1, sp
- 80123f4: 4620 mov r0, r4
- 80123f6: f7ff ff42 bl 801227e <cycle>
- 80123fa: 2800 cmp r0, #0
- 80123fc: db06 blt.n 801240c <MQTTYield+0x30>
- {
- rc = FAILURE;
- break;
- }
- } while (!TimerIsExpired(&timer));
- 80123fe: 4668 mov r0, sp
- 8012400: f000 fa20 bl 8012844 <TimerIsExpired>
- 8012404: 2800 cmp r0, #0
- 8012406: d0f4 beq.n 80123f2 <MQTTYield+0x16>
- int rc = MQTT_SUCCESS;
- 8012408: 2000 movs r0, #0
- 801240a: e001 b.n 8012410 <MQTTYield+0x34>
- rc = FAILURE;
- 801240c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- return rc;
- }
- 8012410: b003 add sp, #12
- 8012412: bd30 pop {r4, r5, pc}
- 08012414 <waitfor>:
- }
- #endif
- int waitfor(MQTTClient* c, int packet_type, Timer* timer)
- {
- 8012414: b5f8 push {r3, r4, r5, r6, r7, lr}
- 8012416: 4607 mov r7, r0
- 8012418: 460e mov r6, r1
- 801241a: 4615 mov r5, r2
- int rc = FAILURE;
- 801241c: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
- do
- {
- if (TimerIsExpired(timer))
- 8012420: 4628 mov r0, r5
- 8012422: f000 fa0f bl 8012844 <TimerIsExpired>
- 8012426: b950 cbnz r0, 801243e <waitfor+0x2a>
- break; // we timed out
- rc = cycle(c, timer);
- 8012428: 4629 mov r1, r5
- 801242a: 4638 mov r0, r7
- 801242c: f7ff ff27 bl 801227e <cycle>
- 8012430: 4604 mov r4, r0
- }
- while (rc != packet_type && rc >= 0);
- 8012432: 43c3 mvns r3, r0
- 8012434: 0fdb lsrs r3, r3, #31
- 8012436: 42b0 cmp r0, r6
- 8012438: d001 beq.n 801243e <waitfor+0x2a>
- 801243a: 2b00 cmp r3, #0
- 801243c: d1f0 bne.n 8012420 <waitfor+0xc>
- return rc;
- }
- 801243e: 4620 mov r0, r4
- 8012440: bdf8 pop {r3, r4, r5, r6, r7, pc}
- ...
- 08012444 <MQTTConnectWithResults>:
- int MQTTConnectWithResults(MQTTClient* c, MQTTPacket_connectData* options, MQTTConnackData* data)
- {
- 8012444: b570 push {r4, r5, r6, lr}
- 8012446: b098 sub sp, #96 @ 0x60
- 8012448: 4604 mov r4, r0
- 801244a: 460d mov r5, r1
- 801244c: 4616 mov r6, r2
- Timer connect_timer;
- int rc = FAILURE;
- MQTTPacket_connectData default_options = MQTTPacket_connectData_initializer;
- 801244e: 2258 movs r2, #88 @ 0x58
- 8012450: 492c ldr r1, [pc, #176] @ (8012504 <MQTTConnectWithResults+0xc0>)
- 8012452: 4668 mov r0, sp
- 8012454: f001 fa15 bl 8013882 <memcpy>
- int len = 0;
- #if defined(MQTT_TASK)
- MutexLock(&c->mutex);
- #endif
- osMutexAcquire(mqttMutex, osWaitForever);
- 8012458: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
- 801245c: 4b2a ldr r3, [pc, #168] @ (8012508 <MQTTConnectWithResults+0xc4>)
- 801245e: 6818 ldr r0, [r3, #0]
- 8012460: f7f1 fd78 bl 8003f54 <osMutexAcquire>
- if (c->isconnected) /* don't send connect packet again if we are already connected */
- 8012464: 6a23 ldr r3, [r4, #32]
- 8012466: 2b00 cmp r3, #0
- 8012468: d140 bne.n 80124ec <MQTTConnectWithResults+0xa8>
- goto exit;
- TimerInit(&connect_timer);
- 801246a: a816 add r0, sp, #88 @ 0x58
- 801246c: f000 fa0e bl 801288c <TimerInit>
- TimerCountdownMS(&connect_timer, c->command_timeout_ms);
- 8012470: 6861 ldr r1, [r4, #4]
- 8012472: a816 add r0, sp, #88 @ 0x58
- 8012474: f000 f9ee bl 8012854 <TimerCountdownMS>
- if (options == 0)
- 8012478: b1dd cbz r5, 80124b2 <MQTTConnectWithResults+0x6e>
- options = &default_options; /* set default options if none were supplied */
- c->keepAliveInterval = options->keepAliveInterval;
- 801247a: 8b29 ldrh r1, [r5, #24]
- 801247c: 61a1 str r1, [r4, #24]
- c->cleansession = options->cleansession;
- 801247e: 7eab ldrb r3, [r5, #26]
- 8012480: 6263 str r3, [r4, #36] @ 0x24
- TimerCountdown(&c->last_received, c->keepAliveInterval);
- 8012482: f104 0060 add.w r0, r4, #96 @ 0x60
- 8012486: f000 f9ed bl 8012864 <TimerCountdown>
- if ((len = MQTTSerialize_connect(c->buf, c->buf_size, options)) <= 0)
- 801248a: 462a mov r2, r5
- 801248c: 68a1 ldr r1, [r4, #8]
- 801248e: 6920 ldr r0, [r4, #16]
- 8012490: f000 fa8c bl 80129ac <MQTTSerialize_connect>
- 8012494: 1e01 subs r1, r0, #0
- 8012496: dd2c ble.n 80124f2 <MQTTConnectWithResults+0xae>
- goto exit;
- if ((rc = sendPacket(c, len, &connect_timer)) != MQTT_SUCCESS) // send the connect packet
- 8012498: aa16 add r2, sp, #88 @ 0x58
- 801249a: 4620 mov r0, r4
- 801249c: f7ff fdbb bl 8012016 <sendPacket>
- 80124a0: 4605 mov r5, r0
- 80124a2: b140 cbz r0, 80124b6 <MQTTConnectWithResults+0x72>
- }
- #if defined(MQTT_TASK)
- MutexUnlock(&c->mutex);
- #endif
- osMutexRelease(mqttMutex);
- 80124a4: 4b18 ldr r3, [pc, #96] @ (8012508 <MQTTConnectWithResults+0xc4>)
- 80124a6: 6818 ldr r0, [r3, #0]
- 80124a8: f7f1 fd83 bl 8003fb2 <osMutexRelease>
- return rc;
- }
- 80124ac: 4628 mov r0, r5
- 80124ae: b018 add sp, #96 @ 0x60
- 80124b0: bd70 pop {r4, r5, r6, pc}
- options = &default_options; /* set default options if none were supplied */
- 80124b2: 466d mov r5, sp
- 80124b4: e7e1 b.n 801247a <MQTTConnectWithResults+0x36>
- if (waitfor(c, CONNACK, &connect_timer) == CONNACK)
- 80124b6: aa16 add r2, sp, #88 @ 0x58
- 80124b8: 2102 movs r1, #2
- 80124ba: 4620 mov r0, r4
- 80124bc: f7ff ffaa bl 8012414 <waitfor>
- 80124c0: 2802 cmp r0, #2
- 80124c2: d119 bne.n 80124f8 <MQTTConnectWithResults+0xb4>
- data->rc = 0;
- 80124c4: 2300 movs r3, #0
- 80124c6: 7033 strb r3, [r6, #0]
- data->sessionPresent = 0;
- 80124c8: 4630 mov r0, r6
- 80124ca: f800 3f01 strb.w r3, [r0, #1]!
- if (MQTTDeserialize_connack(&data->sessionPresent, &data->rc, c->readbuf, c->readbuf_size) == 1)
- 80124ce: 68e3 ldr r3, [r4, #12]
- 80124d0: 6962 ldr r2, [r4, #20]
- 80124d2: 4631 mov r1, r6
- 80124d4: f000 fafc bl 8012ad0 <MQTTDeserialize_connack>
- 80124d8: 2801 cmp r0, #1
- 80124da: d110 bne.n 80124fe <MQTTConnectWithResults+0xba>
- rc = data->rc;
- 80124dc: 7835 ldrb r5, [r6, #0]
- if (rc == MQTT_SUCCESS)
- 80124de: 2d00 cmp r5, #0
- 80124e0: d1e0 bne.n 80124a4 <MQTTConnectWithResults+0x60>
- c->isconnected = 1;
- 80124e2: 2301 movs r3, #1
- 80124e4: 6223 str r3, [r4, #32]
- c->ping_outstanding = 0;
- 80124e6: 2300 movs r3, #0
- 80124e8: 7723 strb r3, [r4, #28]
- 80124ea: e7db b.n 80124a4 <MQTTConnectWithResults+0x60>
- int rc = FAILURE;
- 80124ec: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
- 80124f0: e7d8 b.n 80124a4 <MQTTConnectWithResults+0x60>
- 80124f2: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
- 80124f6: e7d5 b.n 80124a4 <MQTTConnectWithResults+0x60>
- rc = FAILURE;
- 80124f8: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
- 80124fc: e7d2 b.n 80124a4 <MQTTConnectWithResults+0x60>
- rc = FAILURE;
- 80124fe: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
- 8012502: e7cf b.n 80124a4 <MQTTConnectWithResults+0x60>
- 8012504: 080142d0 .word 0x080142d0
- 8012508: 24019c44 .word 0x24019c44
- 0801250c <MQTTConnect>:
- int MQTTConnect(MQTTClient* c, MQTTPacket_connectData* options)
- {
- 801250c: b500 push {lr}
- 801250e: b083 sub sp, #12
- MQTTConnackData data;
- return MQTTConnectWithResults(c, options, &data);
- 8012510: aa01 add r2, sp, #4
- 8012512: f7ff ff97 bl 8012444 <MQTTConnectWithResults>
- }
- 8012516: b003 add sp, #12
- 8012518: f85d fb04 ldr.w pc, [sp], #4
- 0801251c <MQTTSetMessageHandler>:
- int MQTTSetMessageHandler(MQTTClient* c, const char* topicFilter, messageHandler messageHandler)
- {
- 801251c: b5f8 push {r3, r4, r5, r6, r7, lr}
- 801251e: 4605 mov r5, r0
- 8012520: 460f mov r7, r1
- 8012522: 4616 mov r6, r2
- int rc = FAILURE;
- int i = -1;
- /* first check for an existing matching slot */
- for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
- 8012524: 2400 movs r4, #0
- 8012526: e000 b.n 801252a <MQTTSetMessageHandler+0xe>
- 8012528: 3401 adds r4, #1
- 801252a: 2c04 cmp r4, #4
- 801252c: dc13 bgt.n 8012556 <MQTTSetMessageHandler+0x3a>
- {
- if (c->messageHandlers[i].topicFilter != NULL && strcmp(c->messageHandlers[i].topicFilter, topicFilter) == 0)
- 801252e: 1d63 adds r3, r4, #5
- 8012530: f855 0033 ldr.w r0, [r5, r3, lsl #3]
- 8012534: 2800 cmp r0, #0
- 8012536: d0f7 beq.n 8012528 <MQTTSetMessageHandler+0xc>
- 8012538: 4639 mov r1, r7
- 801253a: f7ed fed1 bl 80002e0 <strcmp>
- 801253e: 4603 mov r3, r0
- 8012540: 2800 cmp r0, #0
- 8012542: d1f1 bne.n 8012528 <MQTTSetMessageHandler+0xc>
- {
- if (messageHandler == NULL) /* remove existing */
- 8012544: b956 cbnz r6, 801255c <MQTTSetMessageHandler+0x40>
- {
- c->messageHandlers[i].topicFilter = NULL;
- 8012546: 1d62 adds r2, r4, #5
- 8012548: 2100 movs r1, #0
- 801254a: f845 1032 str.w r1, [r5, r2, lsl #3]
- c->messageHandlers[i].fp = NULL;
- 801254e: eb05 02c2 add.w r2, r5, r2, lsl #3
- 8012552: 6051 str r1, [r2, #4]
- }
- rc = MQTT_SUCCESS; /* return i when adding new subscription */
- break;
- 8012554: e001 b.n 801255a <MQTTSetMessageHandler+0x3e>
- int rc = FAILURE;
- 8012556: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff
- }
- }
- /* if no existing, look for empty slot (unless we are removing) */
- if (messageHandler != NULL) {
- 801255a: b156 cbz r6, 8012572 <MQTTSetMessageHandler+0x56>
- if (rc == FAILURE)
- 801255c: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
- 8012560: d009 beq.n 8012576 <MQTTSetMessageHandler+0x5a>
- rc = MQTT_SUCCESS;
- break;
- }
- }
- }
- if (i < MAX_MESSAGE_HANDLERS)
- 8012562: 2c04 cmp r4, #4
- 8012564: dc05 bgt.n 8012572 <MQTTSetMessageHandler+0x56>
- {
- c->messageHandlers[i].topicFilter = topicFilter;
- 8012566: 3405 adds r4, #5
- 8012568: f845 7034 str.w r7, [r5, r4, lsl #3]
- c->messageHandlers[i].fp = messageHandler;
- 801256c: eb05 05c4 add.w r5, r5, r4, lsl #3
- 8012570: 606e str r6, [r5, #4]
- }
- }
- return rc;
- }
- 8012572: 4618 mov r0, r3
- 8012574: bdf8 pop {r3, r4, r5, r6, r7, pc}
- for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
- 8012576: 2400 movs r4, #0
- 8012578: 2c04 cmp r4, #4
- 801257a: dcf2 bgt.n 8012562 <MQTTSetMessageHandler+0x46>
- if (c->messageHandlers[i].topicFilter == NULL)
- 801257c: 1d62 adds r2, r4, #5
- 801257e: f855 2032 ldr.w r2, [r5, r2, lsl #3]
- 8012582: b10a cbz r2, 8012588 <MQTTSetMessageHandler+0x6c>
- for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
- 8012584: 3401 adds r4, #1
- 8012586: e7f7 b.n 8012578 <MQTTSetMessageHandler+0x5c>
- rc = MQTT_SUCCESS;
- 8012588: 2300 movs r3, #0
- 801258a: e7ea b.n 8012562 <MQTTSetMessageHandler+0x46>
- 0801258c <MQTTSubscribeWithResults>:
- int MQTTSubscribeWithResults(MQTTClient* c, const char* topicFilter, enum QoS qos,
- messageHandler messageHandler, MQTTSubackData* data)
- {
- 801258c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8012590: b08e sub sp, #56 @ 0x38
- 8012592: 4604 mov r4, r0
- 8012594: 460d mov r5, r1
- 8012596: 461e mov r6, r3
- 8012598: f88d 2017 strb.w r2, [sp, #23]
- int rc = FAILURE;
- Timer timer;
- int len = 0;
- MQTTString topic = MQTTString_initializer;
- 801259c: 2200 movs r2, #0
- 801259e: 9209 str r2, [sp, #36] @ 0x24
- 80125a0: 920a str r2, [sp, #40] @ 0x28
- 80125a2: 920b str r2, [sp, #44] @ 0x2c
- topic.cstring = (char *)topicFilter;
- 80125a4: 9109 str r1, [sp, #36] @ 0x24
- #if defined(MQTT_TASK)
- MutexLock(&c->mutex);
- #endif
- osMutexAcquire(mqttMutex, osWaitForever);
- 80125a6: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
- 80125aa: 4b31 ldr r3, [pc, #196] @ (8012670 <MQTTSubscribeWithResults+0xe4>)
- 80125ac: 6818 ldr r0, [r3, #0]
- 80125ae: f7f1 fcd1 bl 8003f54 <osMutexAcquire>
- if (!c->isconnected)
- 80125b2: 6a23 ldr r3, [r4, #32]
- 80125b4: b963 cbnz r3, 80125d0 <MQTTSubscribeWithResults+0x44>
- int rc = FAILURE;
- 80125b6: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff
- else
- rc = FAILURE;
- exit:
- if (rc == FAILURE)
- MQTTCloseSession(c);
- 80125ba: 4620 mov r0, r4
- 80125bc: f7ff fe55 bl 801226a <MQTTCloseSession>
- #if defined(MQTT_TASK)
- MutexUnlock(&c->mutex);
- #endif
- osMutexRelease(mqttMutex);
- 80125c0: 4b2b ldr r3, [pc, #172] @ (8012670 <MQTTSubscribeWithResults+0xe4>)
- 80125c2: 6818 ldr r0, [r3, #0]
- 80125c4: f7f1 fcf5 bl 8003fb2 <osMutexRelease>
- return rc;
- }
- 80125c8: 4638 mov r0, r7
- 80125ca: b00e add sp, #56 @ 0x38
- 80125cc: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- TimerInit(&timer);
- 80125d0: a80c add r0, sp, #48 @ 0x30
- 80125d2: f000 f95b bl 801288c <TimerInit>
- TimerCountdownMS(&timer, c->command_timeout_ms);
- 80125d6: 6861 ldr r1, [r4, #4]
- 80125d8: a80c add r0, sp, #48 @ 0x30
- 80125da: f000 f93b bl 8012854 <TimerCountdownMS>
- len = MQTTSerialize_subscribe(c->buf, c->buf_size, 0, getNextPacketId(c), 1, &topic, (int*)&qos);
- 80125de: 6927 ldr r7, [r4, #16]
- 80125e0: f8d4 8008 ldr.w r8, [r4, #8]
- 80125e4: 4620 mov r0, r4
- 80125e6: f7ff fcb4 bl 8011f52 <getNextPacketId>
- 80125ea: f10d 0317 add.w r3, sp, #23
- 80125ee: 9302 str r3, [sp, #8]
- 80125f0: ab09 add r3, sp, #36 @ 0x24
- 80125f2: 9301 str r3, [sp, #4]
- 80125f4: 2301 movs r3, #1
- 80125f6: 9300 str r3, [sp, #0]
- 80125f8: b283 uxth r3, r0
- 80125fa: 2200 movs r2, #0
- 80125fc: 4641 mov r1, r8
- 80125fe: 4638 mov r0, r7
- 8012600: f000 fcd1 bl 8012fa6 <MQTTSerialize_subscribe>
- if (len <= 0)
- 8012604: 1e01 subs r1, r0, #0
- 8012606: dd2f ble.n 8012668 <MQTTSubscribeWithResults+0xdc>
- if ((rc = sendPacket(c, len, &timer)) != MQTT_SUCCESS) // send the subscribe packet
- 8012608: aa0c add r2, sp, #48 @ 0x30
- 801260a: 4620 mov r0, r4
- 801260c: f7ff fd03 bl 8012016 <sendPacket>
- 8012610: 4607 mov r7, r0
- 8012612: b118 cbz r0, 801261c <MQTTSubscribeWithResults+0x90>
- if (rc == FAILURE)
- 8012614: f1b7 3fff cmp.w r7, #4294967295 @ 0xffffffff
- 8012618: d1d2 bne.n 80125c0 <MQTTSubscribeWithResults+0x34>
- 801261a: e7ce b.n 80125ba <MQTTSubscribeWithResults+0x2e>
- if (waitfor(c, SUBACK, &timer) == SUBACK) // wait for suback
- 801261c: aa0c add r2, sp, #48 @ 0x30
- 801261e: 2109 movs r1, #9
- 8012620: 4620 mov r0, r4
- 8012622: f7ff fef7 bl 8012414 <waitfor>
- 8012626: 2809 cmp r0, #9
- 8012628: d002 beq.n 8012630 <MQTTSubscribeWithResults+0xa4>
- rc = FAILURE;
- 801262a: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff
- 801262e: e7c4 b.n 80125ba <MQTTSubscribeWithResults+0x2e>
- int count = 0;
- 8012630: 2300 movs r3, #0
- 8012632: 9308 str r3, [sp, #32]
- data->grantedQoS = QOS0;
- 8012634: 9a14 ldr r2, [sp, #80] @ 0x50
- 8012636: 7013 strb r3, [r2, #0]
- if (MQTTDeserialize_suback(&mypacketid, 1, &count, (int*)&data->grantedQoS, c->readbuf, c->readbuf_size) == 1)
- 8012638: 68e3 ldr r3, [r4, #12]
- 801263a: 9301 str r3, [sp, #4]
- 801263c: 6963 ldr r3, [r4, #20]
- 801263e: 9300 str r3, [sp, #0]
- 8012640: 4613 mov r3, r2
- 8012642: aa08 add r2, sp, #32
- 8012644: 2101 movs r1, #1
- 8012646: f10d 001e add.w r0, sp, #30
- 801264a: f000 fcf6 bl 801303a <MQTTDeserialize_suback>
- 801264e: 2801 cmp r0, #1
- 8012650: d1e0 bne.n 8012614 <MQTTSubscribeWithResults+0x88>
- if (data->grantedQoS != 0x80)
- 8012652: 9b14 ldr r3, [sp, #80] @ 0x50
- 8012654: 781b ldrb r3, [r3, #0]
- 8012656: 2b80 cmp r3, #128 @ 0x80
- 8012658: d0dc beq.n 8012614 <MQTTSubscribeWithResults+0x88>
- rc = MQTTSetMessageHandler(c, topicFilter, messageHandler);
- 801265a: 4632 mov r2, r6
- 801265c: 4629 mov r1, r5
- 801265e: 4620 mov r0, r4
- 8012660: f7ff ff5c bl 801251c <MQTTSetMessageHandler>
- 8012664: 4607 mov r7, r0
- 8012666: e7d5 b.n 8012614 <MQTTSubscribeWithResults+0x88>
- int rc = FAILURE;
- 8012668: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff
- 801266c: e7a5 b.n 80125ba <MQTTSubscribeWithResults+0x2e>
- 801266e: bf00 nop
- 8012670: 24019c44 .word 0x24019c44
- 08012674 <MQTTSubscribe>:
- int MQTTSubscribe(MQTTClient* c, const char* topicFilter, enum QoS qos,
- messageHandler messageHandler)
- {
- 8012674: b510 push {r4, lr}
- 8012676: b084 sub sp, #16
- MQTTSubackData data;
- return MQTTSubscribeWithResults(c, topicFilter, qos, messageHandler, &data);
- 8012678: ac03 add r4, sp, #12
- 801267a: 9400 str r4, [sp, #0]
- 801267c: f7ff ff86 bl 801258c <MQTTSubscribeWithResults>
- }
- 8012680: b004 add sp, #16
- 8012682: bd10 pop {r4, pc}
- 08012684 <MQTTPublish>:
- return rc;
- }
- int MQTTPublish(MQTTClient* c, const char* topicName, MQTTMessage* message)
- {
- 8012684: b570 push {r4, r5, r6, lr}
- 8012686: b08e sub sp, #56 @ 0x38
- 8012688: 4604 mov r4, r0
- 801268a: 4615 mov r5, r2
- int rc = FAILURE;
- Timer timer;
- MQTTString topic = MQTTString_initializer;
- 801268c: 2300 movs r3, #0
- 801268e: 9309 str r3, [sp, #36] @ 0x24
- 8012690: 930a str r3, [sp, #40] @ 0x28
- 8012692: 930b str r3, [sp, #44] @ 0x2c
- topic.cstring = (char *)topicName;
- 8012694: 9109 str r1, [sp, #36] @ 0x24
- int len = 0;
- #if defined(MQTT_TASK)
- MutexLock(&c->mutex);
- #endif
- osMutexAcquire(mqttMutex, osWaitForever);
- 8012696: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
- 801269a: 4b3e ldr r3, [pc, #248] @ (8012794 <MQTTPublish+0x110>)
- 801269c: 6818 ldr r0, [r3, #0]
- 801269e: f7f1 fc59 bl 8003f54 <osMutexAcquire>
- if (!c->isconnected)
- 80126a2: 6a23 ldr r3, [r4, #32]
- 80126a4: b95b cbnz r3, 80126be <MQTTPublish+0x3a>
- int rc = FAILURE;
- 80126a6: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
- rc = FAILURE;
- }
- exit:
- if (rc == FAILURE)
- MQTTCloseSession(c);
- 80126aa: 4620 mov r0, r4
- 80126ac: f7ff fddd bl 801226a <MQTTCloseSession>
- #if defined(MQTT_TASK)
- MutexUnlock(&c->mutex);
- #endif
- osMutexRelease(mqttMutex);
- 80126b0: 4b38 ldr r3, [pc, #224] @ (8012794 <MQTTPublish+0x110>)
- 80126b2: 6818 ldr r0, [r3, #0]
- 80126b4: f7f1 fc7d bl 8003fb2 <osMutexRelease>
- return rc;
- }
- 80126b8: 4630 mov r0, r6
- 80126ba: b00e add sp, #56 @ 0x38
- 80126bc: bd70 pop {r4, r5, r6, pc}
- TimerInit(&timer);
- 80126be: a80c add r0, sp, #48 @ 0x30
- 80126c0: f000 f8e4 bl 801288c <TimerInit>
- TimerCountdownMS(&timer, c->command_timeout_ms);
- 80126c4: 6861 ldr r1, [r4, #4]
- 80126c6: a80c add r0, sp, #48 @ 0x30
- 80126c8: f000 f8c4 bl 8012854 <TimerCountdownMS>
- if (message->qos == QOS1 || message->qos == QOS2)
- 80126cc: 782b ldrb r3, [r5, #0]
- 80126ce: 3b01 subs r3, #1
- 80126d0: b2db uxtb r3, r3
- 80126d2: 2b01 cmp r3, #1
- 80126d4: d923 bls.n 801271e <MQTTPublish+0x9a>
- topic, (unsigned char*)message->payload, message->payloadlen);
- 80126d6: 68ab ldr r3, [r5, #8]
- 80126d8: 68ea ldr r2, [r5, #12]
- len = MQTTSerialize_publish(c->buf, c->buf_size, 0, message->qos, message->retained, message->id,
- 80126da: 9206 str r2, [sp, #24]
- 80126dc: 9305 str r3, [sp, #20]
- 80126de: ab02 add r3, sp, #8
- 80126e0: aa09 add r2, sp, #36 @ 0x24
- 80126e2: ca07 ldmia r2, {r0, r1, r2}
- 80126e4: e883 0007 stmia.w r3, {r0, r1, r2}
- 80126e8: 88ab ldrh r3, [r5, #4]
- 80126ea: 9301 str r3, [sp, #4]
- 80126ec: 786b ldrb r3, [r5, #1]
- 80126ee: 9300 str r3, [sp, #0]
- 80126f0: 782b ldrb r3, [r5, #0]
- 80126f2: 2200 movs r2, #0
- 80126f4: 68a1 ldr r1, [r4, #8]
- 80126f6: 6920 ldr r0, [r4, #16]
- 80126f8: f000 fbcf bl 8012e9a <MQTTSerialize_publish>
- if (len <= 0)
- 80126fc: 1e01 subs r1, r0, #0
- 80126fe: dd45 ble.n 801278c <MQTTPublish+0x108>
- if ((rc = sendPacket(c, len, &timer)) != MQTT_SUCCESS) // send the subscribe packet
- 8012700: aa0c add r2, sp, #48 @ 0x30
- 8012702: 4620 mov r0, r4
- 8012704: f7ff fc87 bl 8012016 <sendPacket>
- 8012708: 4606 mov r6, r0
- 801270a: b920 cbnz r0, 8012716 <MQTTPublish+0x92>
- if (message->qos == QOS1)
- 801270c: 782b ldrb r3, [r5, #0]
- 801270e: 2b01 cmp r3, #1
- 8012710: d00a beq.n 8012728 <MQTTPublish+0xa4>
- else if (message->qos == QOS2)
- 8012712: 2b02 cmp r3, #2
- 8012714: d021 beq.n 801275a <MQTTPublish+0xd6>
- if (rc == FAILURE)
- 8012716: f1b6 3fff cmp.w r6, #4294967295 @ 0xffffffff
- 801271a: d1c9 bne.n 80126b0 <MQTTPublish+0x2c>
- 801271c: e7c5 b.n 80126aa <MQTTPublish+0x26>
- message->id = getNextPacketId(c);
- 801271e: 4620 mov r0, r4
- 8012720: f7ff fc17 bl 8011f52 <getNextPacketId>
- 8012724: 80a8 strh r0, [r5, #4]
- 8012726: e7d6 b.n 80126d6 <MQTTPublish+0x52>
- if (waitfor(c, PUBACK, &timer) == PUBACK)
- 8012728: aa0c add r2, sp, #48 @ 0x30
- 801272a: 2104 movs r1, #4
- 801272c: 4620 mov r0, r4
- 801272e: f7ff fe71 bl 8012414 <waitfor>
- 8012732: 2804 cmp r0, #4
- 8012734: d002 beq.n 801273c <MQTTPublish+0xb8>
- rc = FAILURE;
- 8012736: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
- 801273a: e7b6 b.n 80126aa <MQTTPublish+0x26>
- if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1)
- 801273c: 68e3 ldr r3, [r4, #12]
- 801273e: 9300 str r3, [sp, #0]
- 8012740: 6963 ldr r3, [r4, #20]
- 8012742: f10d 0222 add.w r2, sp, #34 @ 0x22
- 8012746: a908 add r1, sp, #32
- 8012748: f10d 0021 add.w r0, sp, #33 @ 0x21
- 801274c: f000 fa52 bl 8012bf4 <MQTTDeserialize_ack>
- 8012750: 2801 cmp r0, #1
- 8012752: d0e0 beq.n 8012716 <MQTTPublish+0x92>
- rc = FAILURE;
- 8012754: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
- 8012758: e7a7 b.n 80126aa <MQTTPublish+0x26>
- if (waitfor(c, PUBCOMP, &timer) == PUBCOMP)
- 801275a: aa0c add r2, sp, #48 @ 0x30
- 801275c: 2107 movs r1, #7
- 801275e: 4620 mov r0, r4
- 8012760: f7ff fe58 bl 8012414 <waitfor>
- 8012764: 2807 cmp r0, #7
- 8012766: d002 beq.n 801276e <MQTTPublish+0xea>
- rc = FAILURE;
- 8012768: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
- 801276c: e79d b.n 80126aa <MQTTPublish+0x26>
- if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1)
- 801276e: 68e3 ldr r3, [r4, #12]
- 8012770: 9300 str r3, [sp, #0]
- 8012772: 6963 ldr r3, [r4, #20]
- 8012774: f10d 0222 add.w r2, sp, #34 @ 0x22
- 8012778: a908 add r1, sp, #32
- 801277a: f10d 0021 add.w r0, sp, #33 @ 0x21
- 801277e: f000 fa39 bl 8012bf4 <MQTTDeserialize_ack>
- 8012782: 2801 cmp r0, #1
- 8012784: d0c7 beq.n 8012716 <MQTTPublish+0x92>
- rc = FAILURE;
- 8012786: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
- 801278a: e78e b.n 80126aa <MQTTPublish+0x26>
- int rc = FAILURE;
- 801278c: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
- 8012790: e78b b.n 80126aa <MQTTPublish+0x26>
- 8012792: bf00 nop
- 8012794: 24019c44 .word 0x24019c44
- 08012798 <MQTTDisconnect>:
- int MQTTDisconnect(MQTTClient* c)
- {
- 8012798: b530 push {r4, r5, lr}
- 801279a: b083 sub sp, #12
- 801279c: 4604 mov r4, r0
- int len = 0;
- #if defined(MQTT_TASK)
- MutexLock(&c->mutex);
- #endif
- osMutexAcquire(mqttMutex, osWaitForever);
- 801279e: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
- 80127a2: 4b11 ldr r3, [pc, #68] @ (80127e8 <MQTTDisconnect+0x50>)
- 80127a4: 6818 ldr r0, [r3, #0]
- 80127a6: f7f1 fbd5 bl 8003f54 <osMutexAcquire>
- TimerInit(&timer);
- 80127aa: 4668 mov r0, sp
- 80127ac: f000 f86e bl 801288c <TimerInit>
- TimerCountdownMS(&timer, c->command_timeout_ms);
- 80127b0: 6861 ldr r1, [r4, #4]
- 80127b2: 4668 mov r0, sp
- 80127b4: f000 f84e bl 8012854 <TimerCountdownMS>
- len = MQTTSerialize_disconnect(c->buf, c->buf_size);
- 80127b8: 68a1 ldr r1, [r4, #8]
- 80127ba: 6920 ldr r0, [r4, #16]
- 80127bc: f000 f9c7 bl 8012b4e <MQTTSerialize_disconnect>
- if (len > 0)
- 80127c0: 1e01 subs r1, r0, #0
- 80127c2: dd0e ble.n 80127e2 <MQTTDisconnect+0x4a>
- rc = sendPacket(c, len, &timer); // send the disconnect packet
- 80127c4: 466a mov r2, sp
- 80127c6: 4620 mov r0, r4
- 80127c8: f7ff fc25 bl 8012016 <sendPacket>
- 80127cc: 4605 mov r5, r0
- MQTTCloseSession(c);
- 80127ce: 4620 mov r0, r4
- 80127d0: f7ff fd4b bl 801226a <MQTTCloseSession>
- #if defined(MQTT_TASK)
- MutexUnlock(&c->mutex);
- #endif
- osMutexRelease(mqttMutex);
- 80127d4: 4b04 ldr r3, [pc, #16] @ (80127e8 <MQTTDisconnect+0x50>)
- 80127d6: 6818 ldr r0, [r3, #0]
- 80127d8: f7f1 fbeb bl 8003fb2 <osMutexRelease>
- return rc;
- }
- 80127dc: 4628 mov r0, r5
- 80127de: b003 add sp, #12
- 80127e0: bd30 pop {r4, r5, pc}
- int rc = FAILURE;
- 80127e2: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
- 80127e6: e7f2 b.n 80127ce <MQTTDisconnect+0x36>
- 80127e8: 24019c44 .word 0x24019c44
- 080127ec <net_disconnect>:
- int net_write(Network *n, unsigned char *buffer, int len, int timeout_ms) {
- return send(n->socket, buffer, len, 0);
- }
- void net_disconnect(Network *n) {
- 80127ec: b510 push {r4, lr}
- 80127ee: 4604 mov r4, r0
- close(n->socket);
- 80127f0: 6800 ldr r0, [r0, #0]
- 80127f2: f7fa f919 bl 800ca28 <lwip_close>
- n->socket = 0;
- 80127f6: 2300 movs r3, #0
- 80127f8: 6023 str r3, [r4, #0]
- }
- 80127fa: bd10 pop {r4, pc}
- 080127fc <net_read>:
- int net_read(Network *n, unsigned char *buffer, int len, int timeout_ms) {
- 80127fc: b570 push {r4, r5, r6, lr}
- 80127fe: b082 sub sp, #8
- 8012800: 4604 mov r4, r0
- 8012802: 460d mov r5, r1
- 8012804: 4616 mov r6, r2
- if(ioctl(n->socket, FIONREAD, &available) < 0) return -1; //check receive buffer
- 8012806: aa01 add r2, sp, #4
- 8012808: 490a ldr r1, [pc, #40] @ (8012834 <net_read+0x38>)
- 801280a: 6800 ldr r0, [r0, #0]
- 801280c: f7fa fb02 bl 800ce14 <lwip_ioctl>
- 8012810: 2800 cmp r0, #0
- 8012812: db0c blt.n 801282e <net_read+0x32>
- if(available > 0)
- 8012814: 9b01 ldr r3, [sp, #4]
- 8012816: 2b00 cmp r3, #0
- 8012818: dc02 bgt.n 8012820 <net_read+0x24>
- return 0;
- 801281a: 2000 movs r0, #0
- }
- 801281c: b002 add sp, #8
- 801281e: bd70 pop {r4, r5, r6, pc}
- return recv(n->socket, buffer, len, 0);
- 8012820: 2300 movs r3, #0
- 8012822: 4632 mov r2, r6
- 8012824: 4629 mov r1, r5
- 8012826: 6820 ldr r0, [r4, #0]
- 8012828: f7fa f9e0 bl 800cbec <lwip_recv>
- 801282c: e7f6 b.n 801281c <net_read+0x20>
- if(ioctl(n->socket, FIONREAD, &available) < 0) return -1; //check receive buffer
- 801282e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8012832: e7f3 b.n 801281c <net_read+0x20>
- 8012834: 4004667f .word 0x4004667f
- 08012838 <net_write>:
- int net_write(Network *n, unsigned char *buffer, int len, int timeout_ms) {
- 8012838: b508 push {r3, lr}
- return send(n->socket, buffer, len, 0);
- 801283a: 2300 movs r3, #0
- 801283c: 6800 ldr r0, [r0, #0]
- 801283e: f7fa fa65 bl 800cd0c <lwip_send>
- }
- 8012842: bd08 pop {r3, pc}
- 08012844 <TimerIsExpired>:
- long left = timer->end_time - MilliTimer;
- 8012844: 6840 ldr r0, [r0, #4]
- 8012846: 4b02 ldr r3, [pc, #8] @ (8012850 <TimerIsExpired+0xc>)
- 8012848: 681b ldr r3, [r3, #0]
- 801284a: 1ac0 subs r0, r0, r3
- }
- 801284c: 0fc0 lsrs r0, r0, #31
- 801284e: 4770 bx lr
- 8012850: 24019c48 .word 0x24019c48
- 08012854 <TimerCountdownMS>:
- timer->end_time = MilliTimer + timeout;
- 8012854: 4b02 ldr r3, [pc, #8] @ (8012860 <TimerCountdownMS+0xc>)
- 8012856: 681b ldr r3, [r3, #0]
- 8012858: 4419 add r1, r3
- 801285a: 6041 str r1, [r0, #4]
- }
- 801285c: 4770 bx lr
- 801285e: bf00 nop
- 8012860: 24019c48 .word 0x24019c48
- 08012864 <TimerCountdown>:
- timer->end_time = MilliTimer + (timeout * 1000);
- 8012864: 4b03 ldr r3, [pc, #12] @ (8012874 <TimerCountdown+0x10>)
- 8012866: 681b ldr r3, [r3, #0]
- 8012868: f44f 727a mov.w r2, #1000 @ 0x3e8
- 801286c: fb02 3301 mla r3, r2, r1, r3
- 8012870: 6043 str r3, [r0, #4]
- }
- 8012872: 4770 bx lr
- 8012874: 24019c48 .word 0x24019c48
- 08012878 <TimerLeftMS>:
- long left = timer->end_time - MilliTimer;
- 8012878: 6840 ldr r0, [r0, #4]
- 801287a: 4b03 ldr r3, [pc, #12] @ (8012888 <TimerLeftMS+0x10>)
- 801287c: 681b ldr r3, [r3, #0]
- 801287e: 1ac0 subs r0, r0, r3
- }
- 8012880: ea20 70e0 bic.w r0, r0, r0, asr #31
- 8012884: 4770 bx lr
- 8012886: bf00 nop
- 8012888: 24019c48 .word 0x24019c48
- 0801288c <TimerInit>:
- timer->end_time = 0;
- 801288c: 2300 movs r3, #0
- 801288e: 6043 str r3, [r0, #4]
- }
- 8012890: 4770 bx lr
- ...
- 08012894 <NewNetwork>:
- n->socket = 0; //clear
- 8012894: 2300 movs r3, #0
- 8012896: 6003 str r3, [r0, #0]
- n->mqttread = net_read; //receive function
- 8012898: 4b03 ldr r3, [pc, #12] @ (80128a8 <NewNetwork+0x14>)
- 801289a: 6043 str r3, [r0, #4]
- n->mqttwrite = net_write; //send function
- 801289c: 4b03 ldr r3, [pc, #12] @ (80128ac <NewNetwork+0x18>)
- 801289e: 6083 str r3, [r0, #8]
- n->disconnect = net_disconnect; //disconnection function
- 80128a0: 4b03 ldr r3, [pc, #12] @ (80128b0 <NewNetwork+0x1c>)
- 80128a2: 60c3 str r3, [r0, #12]
- }
- 80128a4: 4770 bx lr
- 80128a6: bf00 nop
- 80128a8: 080127fd .word 0x080127fd
- 80128ac: 08012839 .word 0x08012839
- 80128b0: 080127ed .word 0x080127ed
- 080128b4 <ConnectNetwork>:
- int ConnectNetwork(Network *n, char *ip, int port) {
- 80128b4: b570 push {r4, r5, r6, lr}
- 80128b6: b084 sub sp, #16
- 80128b8: 4604 mov r4, r0
- 80128ba: 460e mov r6, r1
- 80128bc: 4615 mov r5, r2
- if(n->socket)
- 80128be: 6800 ldr r0, [r0, #0]
- 80128c0: bb10 cbnz r0, 8012908 <ConnectNetwork+0x54>
- n->socket = socket(PF_INET, SOCK_STREAM, 0); //create socket
- 80128c2: 2200 movs r2, #0
- 80128c4: 2101 movs r1, #1
- 80128c6: 2002 movs r0, #2
- 80128c8: f7fa fa60 bl 800cd8c <lwip_socket>
- 80128cc: 6020 str r0, [r4, #0]
- if(n->socket < 0)
- 80128ce: 2800 cmp r0, #0
- 80128d0: db1d blt.n 801290e <ConnectNetwork+0x5a>
- memset(&server_addr, 0, sizeof(struct sockaddr_in)); //broker address info
- 80128d2: 2300 movs r3, #0
- 80128d4: 9300 str r3, [sp, #0]
- 80128d6: 9301 str r3, [sp, #4]
- 80128d8: 9302 str r3, [sp, #8]
- 80128da: 9303 str r3, [sp, #12]
- server_addr.sin_family = AF_INET;
- 80128dc: 2302 movs r3, #2
- 80128de: f88d 3001 strb.w r3, [sp, #1]
- server_addr.sin_addr.s_addr = inet_addr(ip);
- 80128e2: 4630 mov r0, r6
- 80128e4: f7f7 fe86 bl 800a5f4 <ipaddr_addr>
- 80128e8: 9001 str r0, [sp, #4]
- server_addr.sin_port = htons(port);
- 80128ea: b2a8 uxth r0, r5
- 80128ec: f7f5 fac6 bl 8007e7c <lwip_htons>
- 80128f0: f8ad 0002 strh.w r0, [sp, #2]
- if(connect(n->socket, (struct sockaddr*)&server_addr, sizeof(struct sockaddr_in)) < 0) //connect to the broker
- 80128f4: 2210 movs r2, #16
- 80128f6: 4669 mov r1, sp
- 80128f8: 6820 ldr r0, [r4, #0]
- 80128fa: f7fa f8cd bl 800ca98 <lwip_connect>
- 80128fe: 2800 cmp r0, #0
- 8012900: db0a blt.n 8012918 <ConnectNetwork+0x64>
- return 0;
- 8012902: 2000 movs r0, #0
- }
- 8012904: b004 add sp, #16
- 8012906: bd70 pop {r4, r5, r6, pc}
- close(n->socket);
- 8012908: f7fa f88e bl 800ca28 <lwip_close>
- 801290c: e7d9 b.n 80128c2 <ConnectNetwork+0xe>
- n->socket = 0;
- 801290e: 2300 movs r3, #0
- 8012910: 6023 str r3, [r4, #0]
- return -1;
- 8012912: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8012916: e7f5 b.n 8012904 <ConnectNetwork+0x50>
- close(n->socket);
- 8012918: 6820 ldr r0, [r4, #0]
- 801291a: f7fa f885 bl 800ca28 <lwip_close>
- return -1;
- 801291e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8012922: e7ef b.n 8012904 <ConnectNetwork+0x50>
- 08012924 <MQTTSerialize_connectLength>:
- * Determines the length of the MQTT connect packet that would be produced using the supplied connect options.
- * @param options the options to be used to build the connect packet
- * @return the length of buffer needed to contain the serialized version of the packet
- */
- int MQTTSerialize_connectLength(MQTTPacket_connectData* options)
- {
- 8012924: b570 push {r4, r5, r6, lr}
- 8012926: 4604 mov r4, r0
- int len = 0;
- FUNC_ENTRY;
- if (options->MQTTVersion == 3)
- 8012928: 7a03 ldrb r3, [r0, #8]
- 801292a: 2b03 cmp r3, #3
- 801292c: d021 beq.n 8012972 <MQTTSerialize_connectLength+0x4e>
- len = 12; /* variable depending on MQTT or MQIsdp */
- else if (options->MQTTVersion == 4)
- 801292e: 2b04 cmp r3, #4
- 8012930: d021 beq.n 8012976 <MQTTSerialize_connectLength+0x52>
- int len = 0;
- 8012932: 2500 movs r5, #0
- len = 10;
- len += MQTTstrlen(options->clientID)+2;
- 8012934: f104 030c add.w r3, r4, #12
- 8012938: e893 0007 ldmia.w r3, {r0, r1, r2}
- 801293c: f000 fa71 bl 8012e22 <MQTTstrlen>
- 8012940: 3002 adds r0, #2
- 8012942: 4405 add r5, r0
- if (options->willFlag)
- 8012944: 7ee3 ldrb r3, [r4, #27]
- 8012946: b9c3 cbnz r3, 801297a <MQTTSerialize_connectLength+0x56>
- len += MQTTstrlen(options->will.topicName)+2 + MQTTstrlen(options->will.message)+2;
- if (options->username.cstring || options->username.lenstring.data)
- 8012948: 6c23 ldr r3, [r4, #64] @ 0x40
- 801294a: b33b cbz r3, 801299c <MQTTSerialize_connectLength+0x78>
- len += MQTTstrlen(options->username)+2;
- 801294c: f104 0340 add.w r3, r4, #64 @ 0x40
- 8012950: e893 0007 ldmia.w r3, {r0, r1, r2}
- 8012954: f000 fa65 bl 8012e22 <MQTTstrlen>
- 8012958: 3002 adds r0, #2
- 801295a: 4405 add r5, r0
- if (options->password.cstring || options->password.lenstring.data)
- 801295c: 6ce3 ldr r3, [r4, #76] @ 0x4c
- 801295e: b30b cbz r3, 80129a4 <MQTTSerialize_connectLength+0x80>
- len += MQTTstrlen(options->password)+2;
- 8012960: 344c adds r4, #76 @ 0x4c
- 8012962: e894 0007 ldmia.w r4, {r0, r1, r2}
- 8012966: f000 fa5c bl 8012e22 <MQTTstrlen>
- 801296a: 3002 adds r0, #2
- 801296c: 4405 add r5, r0
- FUNC_EXIT_RC(len);
- return len;
- }
- 801296e: 4628 mov r0, r5
- 8012970: bd70 pop {r4, r5, r6, pc}
- len = 12; /* variable depending on MQTT or MQIsdp */
- 8012972: 250c movs r5, #12
- 8012974: e7de b.n 8012934 <MQTTSerialize_connectLength+0x10>
- len = 10;
- 8012976: 250a movs r5, #10
- 8012978: e7dc b.n 8012934 <MQTTSerialize_connectLength+0x10>
- len += MQTTstrlen(options->will.topicName)+2 + MQTTstrlen(options->will.message)+2;
- 801297a: f104 0324 add.w r3, r4, #36 @ 0x24
- 801297e: e893 0007 ldmia.w r3, {r0, r1, r2}
- 8012982: f000 fa4e bl 8012e22 <MQTTstrlen>
- 8012986: 1c86 adds r6, r0, #2
- 8012988: f104 0330 add.w r3, r4, #48 @ 0x30
- 801298c: e893 0007 ldmia.w r3, {r0, r1, r2}
- 8012990: f000 fa47 bl 8012e22 <MQTTstrlen>
- 8012994: 4406 add r6, r0
- 8012996: 3602 adds r6, #2
- 8012998: 4435 add r5, r6
- 801299a: e7d5 b.n 8012948 <MQTTSerialize_connectLength+0x24>
- if (options->username.cstring || options->username.lenstring.data)
- 801299c: 6ca3 ldr r3, [r4, #72] @ 0x48
- 801299e: 2b00 cmp r3, #0
- 80129a0: d1d4 bne.n 801294c <MQTTSerialize_connectLength+0x28>
- 80129a2: e7db b.n 801295c <MQTTSerialize_connectLength+0x38>
- if (options->password.cstring || options->password.lenstring.data)
- 80129a4: 6d63 ldr r3, [r4, #84] @ 0x54
- 80129a6: 2b00 cmp r3, #0
- 80129a8: d1da bne.n 8012960 <MQTTSerialize_connectLength+0x3c>
- 80129aa: e7e0 b.n 801296e <MQTTSerialize_connectLength+0x4a>
- 080129ac <MQTTSerialize_connect>:
- * @param len the length in bytes of the supplied buffer
- * @param options the options to be used to build the connect packet
- * @return serialized length, or error if 0
- */
- int MQTTSerialize_connect(unsigned char* buf, int buflen, MQTTPacket_connectData* options)
- {
- 80129ac: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 80129b0: b082 sub sp, #8
- 80129b2: 4606 mov r6, r0
- 80129b4: 460f mov r7, r1
- 80129b6: 4614 mov r4, r2
- unsigned char *ptr = buf;
- 80129b8: 9001 str r0, [sp, #4]
- MQTTConnectFlags flags = {0};
- int len = 0;
- int rc = -1;
- FUNC_ENTRY;
- if (MQTTPacket_len(len = MQTTSerialize_connectLength(options)) > buflen)
- 80129ba: 4610 mov r0, r2
- 80129bc: f7ff ffb2 bl 8012924 <MQTTSerialize_connectLength>
- 80129c0: 4680 mov r8, r0
- 80129c2: f000 f993 bl 8012cec <MQTTPacket_len>
- 80129c6: 42b8 cmp r0, r7
- 80129c8: dc7b bgt.n 8012ac2 <MQTTSerialize_connect+0x116>
- 80129ca: 2500 movs r5, #0
- goto exit;
- }
- header.byte = 0;
- header.bits.type = CONNECT;
- writeChar(&ptr, header.byte); /* write header */
- 80129cc: 2110 movs r1, #16
- 80129ce: a801 add r0, sp, #4
- 80129d0: f000 f9ba bl 8012d48 <writeChar>
- ptr += MQTTPacket_encode(ptr, len); /* write remaining length */
- 80129d4: 4641 mov r1, r8
- 80129d6: 9801 ldr r0, [sp, #4]
- 80129d8: f000 f946 bl 8012c68 <MQTTPacket_encode>
- 80129dc: 9b01 ldr r3, [sp, #4]
- 80129de: 4403 add r3, r0
- 80129e0: 9301 str r3, [sp, #4]
- if (options->MQTTVersion == 4)
- 80129e2: 7a23 ldrb r3, [r4, #8]
- 80129e4: 2b04 cmp r3, #4
- 80129e6: d03f beq.n 8012a68 <MQTTSerialize_connect+0xbc>
- writeCString(&ptr, "MQTT");
- writeChar(&ptr, (char) 4);
- }
- else
- {
- writeCString(&ptr, "MQIsdp");
- 80129e8: 4937 ldr r1, [pc, #220] @ (8012ac8 <MQTTSerialize_connect+0x11c>)
- 80129ea: a801 add r0, sp, #4
- 80129ec: f000 f9c9 bl 8012d82 <writeCString>
- writeChar(&ptr, (char) 3);
- 80129f0: 2103 movs r1, #3
- 80129f2: a801 add r0, sp, #4
- 80129f4: f000 f9a8 bl 8012d48 <writeChar>
- }
- flags.all = 0;
- flags.bits.cleansession = options->cleansession;
- 80129f8: 7ea3 ldrb r3, [r4, #26]
- 80129fa: f363 0541 bfi r5, r3, #1, #1
- flags.bits.will = (options->willFlag) ? 1 : 0;
- 80129fe: 7ee3 ldrb r3, [r4, #27]
- 8012a00: 3b00 subs r3, #0
- 8012a02: bf18 it ne
- 8012a04: 2301 movne r3, #1
- 8012a06: f363 0582 bfi r5, r3, #2, #1
- if (flags.bits.will)
- 8012a0a: f015 0f04 tst.w r5, #4
- 8012a0e: d007 beq.n 8012a20 <MQTTSerialize_connect+0x74>
- {
- flags.bits.willQoS = options->will.qos;
- 8012a10: f894 303d ldrb.w r3, [r4, #61] @ 0x3d
- 8012a14: f363 05c4 bfi r5, r3, #3, #2
- flags.bits.willRetain = options->will.retained;
- 8012a18: f894 303c ldrb.w r3, [r4, #60] @ 0x3c
- 8012a1c: f363 1545 bfi r5, r3, #5, #1
- }
- if (options->username.cstring || options->username.lenstring.data)
- 8012a20: 6c23 ldr r3, [r4, #64] @ 0x40
- 8012a22: b35b cbz r3, 8012a7c <MQTTSerialize_connect+0xd0>
- flags.bits.username = 1;
- 8012a24: f045 0580 orr.w r5, r5, #128 @ 0x80
- if (options->password.cstring || options->password.lenstring.data)
- 8012a28: 6ce3 ldr r3, [r4, #76] @ 0x4c
- 8012a2a: b35b cbz r3, 8012a84 <MQTTSerialize_connect+0xd8>
- flags.bits.password = 1;
- 8012a2c: f045 0540 orr.w r5, r5, #64 @ 0x40
- writeChar(&ptr, flags.all);
- 8012a30: b2ed uxtb r5, r5
- 8012a32: 4629 mov r1, r5
- 8012a34: a801 add r0, sp, #4
- 8012a36: f000 f987 bl 8012d48 <writeChar>
- writeInt(&ptr, options->keepAliveInterval);
- 8012a3a: 8b21 ldrh r1, [r4, #24]
- 8012a3c: a801 add r0, sp, #4
- 8012a3e: f000 f989 bl 8012d54 <writeInt>
- writeMQTTString(&ptr, options->clientID);
- 8012a42: f104 030c add.w r3, r4, #12
- 8012a46: cb0e ldmia r3, {r1, r2, r3}
- 8012a48: a801 add r0, sp, #4
- 8012a4a: f000 f9ae bl 8012daa <writeMQTTString>
- if (options->willFlag)
- 8012a4e: 7ee3 ldrb r3, [r4, #27]
- 8012a50: b9e3 cbnz r3, 8012a8c <MQTTSerialize_connect+0xe0>
- {
- writeMQTTString(&ptr, options->will.topicName);
- writeMQTTString(&ptr, options->will.message);
- }
- if (flags.bits.username)
- 8012a52: f015 0f80 tst.w r5, #128 @ 0x80
- 8012a56: d126 bne.n 8012aa6 <MQTTSerialize_connect+0xfa>
- writeMQTTString(&ptr, options->username);
- if (flags.bits.password)
- 8012a58: f015 0f40 tst.w r5, #64 @ 0x40
- 8012a5c: d12a bne.n 8012ab4 <MQTTSerialize_connect+0x108>
- writeMQTTString(&ptr, options->password);
- rc = ptr - buf;
- 8012a5e: 9801 ldr r0, [sp, #4]
- 8012a60: 1b80 subs r0, r0, r6
- exit: FUNC_EXIT_RC(rc);
- return rc;
- }
- 8012a62: b002 add sp, #8
- 8012a64: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- writeCString(&ptr, "MQTT");
- 8012a68: 4918 ldr r1, [pc, #96] @ (8012acc <MQTTSerialize_connect+0x120>)
- 8012a6a: a801 add r0, sp, #4
- 8012a6c: f000 f989 bl 8012d82 <writeCString>
- writeChar(&ptr, (char) 4);
- 8012a70: 2104 movs r1, #4
- 8012a72: eb0d 0001 add.w r0, sp, r1
- 8012a76: f000 f967 bl 8012d48 <writeChar>
- 8012a7a: e7bd b.n 80129f8 <MQTTSerialize_connect+0x4c>
- if (options->username.cstring || options->username.lenstring.data)
- 8012a7c: 6ca3 ldr r3, [r4, #72] @ 0x48
- 8012a7e: 2b00 cmp r3, #0
- 8012a80: d1d0 bne.n 8012a24 <MQTTSerialize_connect+0x78>
- 8012a82: e7d1 b.n 8012a28 <MQTTSerialize_connect+0x7c>
- if (options->password.cstring || options->password.lenstring.data)
- 8012a84: 6d63 ldr r3, [r4, #84] @ 0x54
- 8012a86: 2b00 cmp r3, #0
- 8012a88: d1d0 bne.n 8012a2c <MQTTSerialize_connect+0x80>
- 8012a8a: e7d1 b.n 8012a30 <MQTTSerialize_connect+0x84>
- writeMQTTString(&ptr, options->will.topicName);
- 8012a8c: f104 0324 add.w r3, r4, #36 @ 0x24
- 8012a90: cb0e ldmia r3, {r1, r2, r3}
- 8012a92: a801 add r0, sp, #4
- 8012a94: f000 f989 bl 8012daa <writeMQTTString>
- writeMQTTString(&ptr, options->will.message);
- 8012a98: f104 0330 add.w r3, r4, #48 @ 0x30
- 8012a9c: cb0e ldmia r3, {r1, r2, r3}
- 8012a9e: a801 add r0, sp, #4
- 8012aa0: f000 f983 bl 8012daa <writeMQTTString>
- 8012aa4: e7d5 b.n 8012a52 <MQTTSerialize_connect+0xa6>
- writeMQTTString(&ptr, options->username);
- 8012aa6: f104 0340 add.w r3, r4, #64 @ 0x40
- 8012aaa: cb0e ldmia r3, {r1, r2, r3}
- 8012aac: a801 add r0, sp, #4
- 8012aae: f000 f97c bl 8012daa <writeMQTTString>
- 8012ab2: e7d1 b.n 8012a58 <MQTTSerialize_connect+0xac>
- writeMQTTString(&ptr, options->password);
- 8012ab4: 344c adds r4, #76 @ 0x4c
- 8012ab6: e894 000e ldmia.w r4, {r1, r2, r3}
- 8012aba: a801 add r0, sp, #4
- 8012abc: f000 f975 bl 8012daa <writeMQTTString>
- 8012ac0: e7cd b.n 8012a5e <MQTTSerialize_connect+0xb2>
- rc = MQTTPACKET_BUFFER_TOO_SHORT;
- 8012ac2: f06f 0001 mvn.w r0, #1
- return rc;
- 8012ac6: e7cc b.n 8012a62 <MQTTSerialize_connect+0xb6>
- 8012ac8: 08017ed4 .word 0x08017ed4
- 8012acc: 08017ecc .word 0x08017ecc
- 08012ad0 <MQTTDeserialize_connack>:
- * @param buf the raw buffer data, of the correct length determined by the remaining length field
- * @param len the length in bytes of the data in the supplied buffer
- * @return error code. 1 is success, 0 is failure
- */
- int MQTTDeserialize_connack(unsigned char* sessionPresent, unsigned char* connack_rc, unsigned char* buf, int buflen)
- {
- 8012ad0: b530 push {r4, r5, lr}
- 8012ad2: b083 sub sp, #12
- 8012ad4: 4605 mov r5, r0
- 8012ad6: 460c mov r4, r1
- MQTTHeader header = {0};
- unsigned char* curdata = buf;
- 8012ad8: 9201 str r2, [sp, #4]
- int rc = 0;
- int mylen;
- MQTTConnackFlags flags = {0};
- FUNC_ENTRY;
- header.byte = readChar(&curdata);
- 8012ada: a801 add r0, sp, #4
- 8012adc: f000 f92e bl 8012d3c <readChar>
- if (header.bits.type != CONNACK)
- 8012ae0: f000 03f0 and.w r3, r0, #240 @ 0xf0
- 8012ae4: 2b20 cmp r3, #32
- 8012ae6: d002 beq.n 8012aee <MQTTDeserialize_connack+0x1e>
- int rc = 0;
- 8012ae8: 2000 movs r0, #0
- rc = 1;
- exit:
- FUNC_EXIT_RC(rc);
- return rc;
- }
- 8012aea: b003 add sp, #12
- 8012aec: bd30 pop {r4, r5, pc}
- curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */
- 8012aee: 4669 mov r1, sp
- 8012af0: 9801 ldr r0, [sp, #4]
- 8012af2: f000 f90f bl 8012d14 <MQTTPacket_decodeBuf>
- 8012af6: 9b01 ldr r3, [sp, #4]
- 8012af8: 4403 add r3, r0
- 8012afa: 9301 str r3, [sp, #4]
- enddata = curdata + mylen;
- 8012afc: 9b00 ldr r3, [sp, #0]
- if (enddata - curdata < 2)
- 8012afe: 2b01 cmp r3, #1
- 8012b00: ddf3 ble.n 8012aea <MQTTDeserialize_connack+0x1a>
- flags.all = readChar(&curdata);
- 8012b02: a801 add r0, sp, #4
- 8012b04: f000 f91a bl 8012d3c <readChar>
- *sessionPresent = flags.bits.sessionpresent;
- 8012b08: f000 0001 and.w r0, r0, #1
- 8012b0c: 7028 strb r0, [r5, #0]
- *connack_rc = readChar(&curdata);
- 8012b0e: a801 add r0, sp, #4
- 8012b10: f000 f914 bl 8012d3c <readChar>
- 8012b14: 7020 strb r0, [r4, #0]
- rc = 1;
- 8012b16: 2001 movs r0, #1
- 8012b18: e7e7 b.n 8012aea <MQTTDeserialize_connack+0x1a>
- 08012b1a <MQTTSerialize_zero>:
- * @param buflen the length in bytes of the supplied buffer, to avoid overruns
- * @param packettype the message type
- * @return serialized length, or error if 0
- */
- int MQTTSerialize_zero(unsigned char* buf, int buflen, unsigned char packettype)
- {
- 8012b1a: b510 push {r4, lr}
- 8012b1c: b082 sub sp, #8
- MQTTHeader header = {0};
- int rc = -1;
- unsigned char *ptr = buf;
- 8012b1e: 9001 str r0, [sp, #4]
- FUNC_ENTRY;
- if (buflen < 2)
- 8012b20: 2901 cmp r1, #1
- 8012b22: dd11 ble.n 8012b48 <MQTTSerialize_zero+0x2e>
- 8012b24: 4604 mov r4, r0
- 8012b26: 2300 movs r3, #0
- {
- rc = MQTTPACKET_BUFFER_TOO_SHORT;
- goto exit;
- }
- header.byte = 0;
- header.bits.type = packettype;
- 8012b28: f362 1307 bfi r3, r2, #4, #4
- writeChar(&ptr, header.byte); /* write header */
- 8012b2c: 4619 mov r1, r3
- 8012b2e: a801 add r0, sp, #4
- 8012b30: f000 f90a bl 8012d48 <writeChar>
- ptr += MQTTPacket_encode(ptr, 0); /* write remaining length */
- 8012b34: 2100 movs r1, #0
- 8012b36: 9801 ldr r0, [sp, #4]
- 8012b38: f000 f896 bl 8012c68 <MQTTPacket_encode>
- 8012b3c: 9b01 ldr r3, [sp, #4]
- 8012b3e: 4418 add r0, r3
- 8012b40: 9001 str r0, [sp, #4]
- rc = ptr - buf;
- 8012b42: 1b00 subs r0, r0, r4
- exit:
- FUNC_EXIT_RC(rc);
- return rc;
- }
- 8012b44: b002 add sp, #8
- 8012b46: bd10 pop {r4, pc}
- rc = MQTTPACKET_BUFFER_TOO_SHORT;
- 8012b48: f06f 0001 mvn.w r0, #1
- return rc;
- 8012b4c: e7fa b.n 8012b44 <MQTTSerialize_zero+0x2a>
- 08012b4e <MQTTSerialize_disconnect>:
- * @param buf the buffer into which the packet will be serialized
- * @param buflen the length in bytes of the supplied buffer, to avoid overruns
- * @return serialized length, or error if 0
- */
- int MQTTSerialize_disconnect(unsigned char* buf, int buflen)
- {
- 8012b4e: b508 push {r3, lr}
- return MQTTSerialize_zero(buf, buflen, DISCONNECT);
- 8012b50: 220e movs r2, #14
- 8012b52: f7ff ffe2 bl 8012b1a <MQTTSerialize_zero>
- }
- 8012b56: bd08 pop {r3, pc}
- 08012b58 <MQTTSerialize_pingreq>:
- * @param buf the buffer into which the packet will be serialized
- * @param buflen the length in bytes of the supplied buffer, to avoid overruns
- * @return serialized length, or error if 0
- */
- int MQTTSerialize_pingreq(unsigned char* buf, int buflen)
- {
- 8012b58: b508 push {r3, lr}
- return MQTTSerialize_zero(buf, buflen, PINGREQ);
- 8012b5a: 220c movs r2, #12
- 8012b5c: f7ff ffdd bl 8012b1a <MQTTSerialize_zero>
- }
- 8012b60: bd08 pop {r3, pc}
- 08012b62 <MQTTDeserialize_publish>:
- * @param buflen the length in bytes of the data in the supplied buffer
- * @return error code. 1 is success
- */
- int MQTTDeserialize_publish(unsigned char* dup, int* qos, unsigned char* retained, unsigned short* packetid, MQTTString* topicName,
- unsigned char** payload, int* payloadlen, unsigned char* buf, int buflen)
- {
- 8012b62: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8012b66: b082 sub sp, #8
- 8012b68: 4680 mov r8, r0
- 8012b6a: 460d mov r5, r1
- 8012b6c: 4616 mov r6, r2
- 8012b6e: 461f mov r7, r3
- MQTTHeader header = {0};
- 8012b70: 2400 movs r4, #0
- unsigned char* curdata = buf;
- 8012b72: 9b0b ldr r3, [sp, #44] @ 0x2c
- 8012b74: 9301 str r3, [sp, #4]
- unsigned char* enddata = NULL;
- int rc = 0;
- int mylen = 0;
- 8012b76: 9400 str r4, [sp, #0]
- FUNC_ENTRY;
- header.byte = readChar(&curdata);
- 8012b78: a801 add r0, sp, #4
- 8012b7a: f000 f8df bl 8012d3c <readChar>
- 8012b7e: f360 0407 bfi r4, r0, #0, #8
- if (header.bits.type != PUBLISH)
- 8012b82: f000 0cf0 and.w ip, r0, #240 @ 0xf0
- 8012b86: f1bc 0f30 cmp.w ip, #48 @ 0x30
- 8012b8a: d004 beq.n 8012b96 <MQTTDeserialize_publish+0x34>
- int rc = 0;
- 8012b8c: 2400 movs r4, #0
- *payload = curdata;
- rc = 1;
- exit:
- FUNC_EXIT_RC(rc);
- return rc;
- }
- 8012b8e: 4620 mov r0, r4
- 8012b90: b002 add sp, #8
- 8012b92: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- *dup = header.bits.dup;
- 8012b96: f3c4 03c0 ubfx r3, r4, #3, #1
- 8012b9a: f888 3000 strb.w r3, [r8]
- *qos = header.bits.qos;
- 8012b9e: f3c4 0341 ubfx r3, r4, #1, #2
- 8012ba2: 602b str r3, [r5, #0]
- *retained = header.bits.retain;
- 8012ba4: f3c4 0400 ubfx r4, r4, #0, #1
- 8012ba8: 7034 strb r4, [r6, #0]
- curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */
- 8012baa: 4669 mov r1, sp
- 8012bac: 9801 ldr r0, [sp, #4]
- 8012bae: f000 f8b1 bl 8012d14 <MQTTPacket_decodeBuf>
- 8012bb2: 4604 mov r4, r0
- 8012bb4: 9e01 ldr r6, [sp, #4]
- 8012bb6: 4406 add r6, r0
- 8012bb8: 9601 str r6, [sp, #4]
- enddata = curdata + mylen;
- 8012bba: 9b00 ldr r3, [sp, #0]
- 8012bbc: 441e add r6, r3
- if (!readMQTTLenString(topicName, &curdata, enddata) ||
- 8012bbe: 4632 mov r2, r6
- 8012bc0: a901 add r1, sp, #4
- 8012bc2: 9808 ldr r0, [sp, #32]
- 8012bc4: f000 f913 bl 8012dee <readMQTTLenString>
- 8012bc8: 2800 cmp r0, #0
- 8012bca: d0e0 beq.n 8012b8e <MQTTDeserialize_publish+0x2c>
- enddata - curdata < 0) /* do we have enough data to read the protocol version byte? */
- 8012bcc: 9b01 ldr r3, [sp, #4]
- 8012bce: 1af3 subs r3, r6, r3
- if (!readMQTTLenString(topicName, &curdata, enddata) ||
- 8012bd0: 2b00 cmp r3, #0
- 8012bd2: dbdc blt.n 8012b8e <MQTTDeserialize_publish+0x2c>
- if (*qos > 0)
- 8012bd4: 682b ldr r3, [r5, #0]
- 8012bd6: 2b00 cmp r3, #0
- 8012bd8: dc07 bgt.n 8012bea <MQTTDeserialize_publish+0x88>
- *payloadlen = enddata - curdata;
- 8012bda: 9b01 ldr r3, [sp, #4]
- 8012bdc: 1af6 subs r6, r6, r3
- 8012bde: 9a0a ldr r2, [sp, #40] @ 0x28
- 8012be0: 6016 str r6, [r2, #0]
- *payload = curdata;
- 8012be2: 9a09 ldr r2, [sp, #36] @ 0x24
- 8012be4: 6013 str r3, [r2, #0]
- rc = 1;
- 8012be6: 2401 movs r4, #1
- 8012be8: e7d1 b.n 8012b8e <MQTTDeserialize_publish+0x2c>
- *packetid = readInt(&curdata);
- 8012bea: a801 add r0, sp, #4
- 8012bec: f000 f89e bl 8012d2c <readInt>
- 8012bf0: 8038 strh r0, [r7, #0]
- 8012bf2: e7f2 b.n 8012bda <MQTTDeserialize_publish+0x78>
- 08012bf4 <MQTTDeserialize_ack>:
- * @param buf the raw buffer data, of the correct length determined by the remaining length field
- * @param buflen the length in bytes of the data in the supplied buffer
- * @return error code. 1 is success, 0 is failure
- */
- int MQTTDeserialize_ack(unsigned char* packettype, unsigned char* dup, unsigned short* packetid, unsigned char* buf, int buflen)
- {
- 8012bf4: b5f0 push {r4, r5, r6, r7, lr}
- 8012bf6: b083 sub sp, #12
- 8012bf8: 4605 mov r5, r0
- 8012bfa: 460f mov r7, r1
- 8012bfc: 4616 mov r6, r2
- MQTTHeader header = {0};
- 8012bfe: 2400 movs r4, #0
- unsigned char* curdata = buf;
- 8012c00: 9301 str r3, [sp, #4]
- unsigned char* enddata = NULL;
- int rc = 0;
- int mylen;
- FUNC_ENTRY;
- header.byte = readChar(&curdata);
- 8012c02: a801 add r0, sp, #4
- 8012c04: f000 f89a bl 8012d3c <readChar>
- 8012c08: f360 0407 bfi r4, r0, #0, #8
- *dup = header.bits.dup;
- 8012c0c: f3c4 03c0 ubfx r3, r4, #3, #1
- 8012c10: 703b strb r3, [r7, #0]
- *packettype = header.bits.type;
- 8012c12: f3c4 1403 ubfx r4, r4, #4, #4
- 8012c16: 702c strb r4, [r5, #0]
- curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */
- 8012c18: 4669 mov r1, sp
- 8012c1a: 9801 ldr r0, [sp, #4]
- 8012c1c: f000 f87a bl 8012d14 <MQTTPacket_decodeBuf>
- 8012c20: 9b01 ldr r3, [sp, #4]
- 8012c22: 4403 add r3, r0
- 8012c24: 9301 str r3, [sp, #4]
- enddata = curdata + mylen;
- 8012c26: 9b00 ldr r3, [sp, #0]
- if (enddata - curdata < 2)
- 8012c28: 2b01 cmp r3, #1
- 8012c2a: dd04 ble.n 8012c36 <MQTTDeserialize_ack+0x42>
- goto exit;
- *packetid = readInt(&curdata);
- 8012c2c: a801 add r0, sp, #4
- 8012c2e: f000 f87d bl 8012d2c <readInt>
- 8012c32: 8030 strh r0, [r6, #0]
- rc = 1;
- 8012c34: 2001 movs r0, #1
- exit:
- FUNC_EXIT_RC(rc);
- return rc;
- }
- 8012c36: b003 add sp, #12
- 8012c38: bdf0 pop {r4, r5, r6, r7, pc}
- ...
- 08012c3c <bufchar>:
- static unsigned char* bufptr;
- int bufchar(unsigned char* c, int count)
- {
- 8012c3c: 4684 mov ip, r0
- 8012c3e: 4608 mov r0, r1
- int i;
- for (i = 0; i < count; ++i)
- 8012c40: 2300 movs r3, #0
- 8012c42: 428b cmp r3, r1
- 8012c44: da0c bge.n 8012c60 <bufchar+0x24>
- {
- 8012c46: b430 push {r4, r5}
- *c = *bufptr++;
- 8012c48: 4c06 ldr r4, [pc, #24] @ (8012c64 <bufchar+0x28>)
- 8012c4a: 6822 ldr r2, [r4, #0]
- 8012c4c: 1c55 adds r5, r2, #1
- 8012c4e: 6025 str r5, [r4, #0]
- 8012c50: 7812 ldrb r2, [r2, #0]
- 8012c52: f88c 2000 strb.w r2, [ip]
- for (i = 0; i < count; ++i)
- 8012c56: 3301 adds r3, #1
- 8012c58: 4283 cmp r3, r0
- 8012c5a: dbf5 blt.n 8012c48 <bufchar+0xc>
- return count;
- }
- 8012c5c: bc30 pop {r4, r5}
- 8012c5e: 4770 bx lr
- 8012c60: 4770 bx lr
- 8012c62: bf00 nop
- 8012c64: 24019c4c .word 0x24019c4c
- 08012c68 <MQTTPacket_encode>:
- {
- 8012c68: b510 push {r4, lr}
- 8012c6a: 4604 mov r4, r0
- int rc = 0;
- 8012c6c: f04f 0c00 mov.w ip, #0
- 8012c70: e00b b.n 8012c8a <MQTTPacket_encode+0x22>
- length /= 128;
- 8012c72: f101 0e7f add.w lr, r1, #127 @ 0x7f
- 8012c76: e014 b.n 8012ca2 <MQTTPacket_encode+0x3a>
- d |= 0x80;
- 8012c78: f043 0380 orr.w r3, r3, #128 @ 0x80
- buf[rc++] = d;
- 8012c7c: f10c 0001 add.w r0, ip, #1
- 8012c80: f804 300c strb.w r3, [r4, ip]
- } while (length > 0);
- 8012c84: 2a7f cmp r2, #127 @ 0x7f
- 8012c86: dd11 ble.n 8012cac <MQTTPacket_encode+0x44>
- buf[rc++] = d;
- 8012c88: 4684 mov ip, r0
- char d = length % 128;
- 8012c8a: 424a negs r2, r1
- 8012c8c: f001 037f and.w r3, r1, #127 @ 0x7f
- 8012c90: f002 027f and.w r2, r2, #127 @ 0x7f
- 8012c94: bf58 it pl
- 8012c96: 4253 negpl r3, r2
- 8012c98: b2db uxtb r3, r3
- length /= 128;
- 8012c9a: 460a mov r2, r1
- 8012c9c: 468e mov lr, r1
- 8012c9e: 2900 cmp r1, #0
- 8012ca0: dbe7 blt.n 8012c72 <MQTTPacket_encode+0xa>
- 8012ca2: ea4f 11ee mov.w r1, lr, asr #7
- if (length > 0)
- 8012ca6: 2a7f cmp r2, #127 @ 0x7f
- 8012ca8: dde8 ble.n 8012c7c <MQTTPacket_encode+0x14>
- 8012caa: e7e5 b.n 8012c78 <MQTTPacket_encode+0x10>
- }
- 8012cac: bd10 pop {r4, pc}
- 08012cae <MQTTPacket_decode>:
- {
- 8012cae: b5f0 push {r4, r5, r6, r7, lr}
- 8012cb0: b083 sub sp, #12
- 8012cb2: 4607 mov r7, r0
- 8012cb4: 460d mov r5, r1
- *value = 0;
- 8012cb6: 2400 movs r4, #0
- 8012cb8: 600c str r4, [r1, #0]
- int multiplier = 1;
- 8012cba: 2601 movs r6, #1
- if (++len > MAX_NO_OF_REMAINING_LENGTH_BYTES)
- 8012cbc: 3401 adds r4, #1
- 8012cbe: 2c04 cmp r4, #4
- 8012cc0: dc11 bgt.n 8012ce6 <MQTTPacket_decode+0x38>
- rc = (*getcharfn)(&c, 1);
- 8012cc2: 2101 movs r1, #1
- 8012cc4: f10d 0007 add.w r0, sp, #7
- 8012cc8: 47b8 blx r7
- if (rc != 1)
- 8012cca: 2801 cmp r0, #1
- 8012ccc: d10b bne.n 8012ce6 <MQTTPacket_decode+0x38>
- *value += (c & 127) * multiplier;
- 8012cce: 682b ldr r3, [r5, #0]
- 8012cd0: f89d 2007 ldrb.w r2, [sp, #7]
- 8012cd4: f002 017f and.w r1, r2, #127 @ 0x7f
- 8012cd8: fb06 3301 mla r3, r6, r1, r3
- 8012cdc: 602b str r3, [r5, #0]
- multiplier *= 128;
- 8012cde: 01f6 lsls r6, r6, #7
- } while ((c & 128) != 0);
- 8012ce0: f012 0f80 tst.w r2, #128 @ 0x80
- 8012ce4: d1ea bne.n 8012cbc <MQTTPacket_decode+0xe>
- }
- 8012ce6: 4620 mov r0, r4
- 8012ce8: b003 add sp, #12
- 8012cea: bdf0 pop {r4, r5, r6, r7, pc}
- 08012cec <MQTTPacket_len>:
- rem_len += 1; /* header byte */
- 8012cec: 1c43 adds r3, r0, #1
- if (rem_len < 128)
- 8012cee: 2b7f cmp r3, #127 @ 0x7f
- 8012cf0: dc01 bgt.n 8012cf6 <MQTTPacket_len+0xa>
- rem_len += 1;
- 8012cf2: 3002 adds r0, #2
- 8012cf4: 4770 bx lr
- else if (rem_len < 16384)
- 8012cf6: f5b3 4f80 cmp.w r3, #16384 @ 0x4000
- 8012cfa: da01 bge.n 8012d00 <MQTTPacket_len+0x14>
- rem_len += 2;
- 8012cfc: 3003 adds r0, #3
- 8012cfe: 4770 bx lr
- else if (rem_len < 2097151)
- 8012d00: 4a03 ldr r2, [pc, #12] @ (8012d10 <MQTTPacket_len+0x24>)
- 8012d02: 4293 cmp r3, r2
- 8012d04: dc01 bgt.n 8012d0a <MQTTPacket_len+0x1e>
- rem_len += 3;
- 8012d06: 3004 adds r0, #4
- 8012d08: 4770 bx lr
- rem_len += 4;
- 8012d0a: 3005 adds r0, #5
- }
- 8012d0c: 4770 bx lr
- 8012d0e: bf00 nop
- 8012d10: 001ffffe .word 0x001ffffe
- 08012d14 <MQTTPacket_decodeBuf>:
- int MQTTPacket_decodeBuf(unsigned char* buf, int* value)
- {
- 8012d14: b508 push {r3, lr}
- bufptr = buf;
- 8012d16: 4b03 ldr r3, [pc, #12] @ (8012d24 <MQTTPacket_decodeBuf+0x10>)
- 8012d18: 6018 str r0, [r3, #0]
- return MQTTPacket_decode(bufchar, value);
- 8012d1a: 4803 ldr r0, [pc, #12] @ (8012d28 <MQTTPacket_decodeBuf+0x14>)
- 8012d1c: f7ff ffc7 bl 8012cae <MQTTPacket_decode>
- }
- 8012d20: bd08 pop {r3, pc}
- 8012d22: bf00 nop
- 8012d24: 24019c4c .word 0x24019c4c
- 8012d28: 08012c3d .word 0x08012c3d
- 08012d2c <readInt>:
- * @param pptr pointer to the input buffer - incremented by the number of bytes used & returned
- * @return the integer value calculated
- */
- int readInt(unsigned char** pptr)
- {
- unsigned char* ptr = *pptr;
- 8012d2c: 6803 ldr r3, [r0, #0]
- int len = 256*(*ptr) + (*(ptr+1));
- 8012d2e: 7819 ldrb r1, [r3, #0]
- 8012d30: 785a ldrb r2, [r3, #1]
- *pptr += 2;
- 8012d32: 3302 adds r3, #2
- 8012d34: 6003 str r3, [r0, #0]
- return len;
- }
- 8012d36: eb02 2001 add.w r0, r2, r1, lsl #8
- 8012d3a: 4770 bx lr
- 08012d3c <readChar>:
- * Reads one character from the input buffer.
- * @param pptr pointer to the input buffer - incremented by the number of bytes used & returned
- * @return the character read
- */
- char readChar(unsigned char** pptr)
- {
- 8012d3c: 4603 mov r3, r0
- char c = **pptr;
- 8012d3e: 6802 ldr r2, [r0, #0]
- 8012d40: f812 0b01 ldrb.w r0, [r2], #1
- (*pptr)++;
- 8012d44: 601a str r2, [r3, #0]
- return c;
- }
- 8012d46: 4770 bx lr
- 08012d48 <writeChar>:
- * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned
- * @param c the character to write
- */
- void writeChar(unsigned char** pptr, char c)
- {
- **pptr = c;
- 8012d48: 6803 ldr r3, [r0, #0]
- 8012d4a: 7019 strb r1, [r3, #0]
- (*pptr)++;
- 8012d4c: 6803 ldr r3, [r0, #0]
- 8012d4e: 3301 adds r3, #1
- 8012d50: 6003 str r3, [r0, #0]
- }
- 8012d52: 4770 bx lr
- 08012d54 <writeInt>:
- * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned
- * @param anInt the integer to write
- */
- void writeInt(unsigned char** pptr, int anInt)
- {
- **pptr = (unsigned char)(anInt / 256);
- 8012d54: 460b mov r3, r1
- 8012d56: 2900 cmp r1, #0
- 8012d58: db10 blt.n 8012d7c <writeInt+0x28>
- 8012d5a: 6802 ldr r2, [r0, #0]
- 8012d5c: f3c3 2307 ubfx r3, r3, #8, #8
- 8012d60: 7013 strb r3, [r2, #0]
- (*pptr)++;
- 8012d62: 6802 ldr r2, [r0, #0]
- 8012d64: 1c53 adds r3, r2, #1
- 8012d66: 6003 str r3, [r0, #0]
- **pptr = (unsigned char)(anInt % 256);
- 8012d68: 424b negs r3, r1
- 8012d6a: b2c9 uxtb r1, r1
- 8012d6c: b2db uxtb r3, r3
- 8012d6e: bf58 it pl
- 8012d70: 4259 negpl r1, r3
- 8012d72: 7051 strb r1, [r2, #1]
- (*pptr)++;
- 8012d74: 6803 ldr r3, [r0, #0]
- 8012d76: 3301 adds r3, #1
- 8012d78: 6003 str r3, [r0, #0]
- }
- 8012d7a: 4770 bx lr
- **pptr = (unsigned char)(anInt / 256);
- 8012d7c: f101 03ff add.w r3, r1, #255 @ 0xff
- 8012d80: e7eb b.n 8012d5a <writeInt+0x6>
- 08012d82 <writeCString>:
- * Writes a "UTF" string to an output buffer. Converts C string to length-delimited.
- * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned
- * @param string the C string to write
- */
- void writeCString(unsigned char** pptr, const char* string)
- {
- 8012d82: b570 push {r4, r5, r6, lr}
- 8012d84: 4604 mov r4, r0
- 8012d86: 460e mov r6, r1
- int len = strlen(string);
- 8012d88: 4608 mov r0, r1
- 8012d8a: f7ed fab3 bl 80002f4 <strlen>
- 8012d8e: 4605 mov r5, r0
- writeInt(pptr, len);
- 8012d90: 4601 mov r1, r0
- 8012d92: 4620 mov r0, r4
- 8012d94: f7ff ffde bl 8012d54 <writeInt>
- memcpy(*pptr, string, len);
- 8012d98: 462a mov r2, r5
- 8012d9a: 4631 mov r1, r6
- 8012d9c: 6820 ldr r0, [r4, #0]
- 8012d9e: f000 fd70 bl 8013882 <memcpy>
- *pptr += len;
- 8012da2: 6823 ldr r3, [r4, #0]
- 8012da4: 442b add r3, r5
- 8012da6: 6023 str r3, [r4, #0]
- }
- 8012da8: bd70 pop {r4, r5, r6, pc}
- 08012daa <writeMQTTString>:
- return len;
- }
- void writeMQTTString(unsigned char** pptr, MQTTString mqttstring)
- {
- 8012daa: b530 push {r4, r5, lr}
- 8012dac: b085 sub sp, #20
- 8012dae: 4604 mov r4, r0
- 8012db0: a804 add r0, sp, #16
- 8012db2: e900 000e stmdb r0, {r1, r2, r3}
- if (mqttstring.lenstring.len > 0)
- 8012db6: 2a00 cmp r2, #0
- 8012db8: dc05 bgt.n 8012dc6 <writeMQTTString+0x1c>
- {
- writeInt(pptr, mqttstring.lenstring.len);
- memcpy(*pptr, mqttstring.lenstring.data, mqttstring.lenstring.len);
- *pptr += mqttstring.lenstring.len;
- }
- else if (mqttstring.cstring)
- 8012dba: 9901 ldr r1, [sp, #4]
- 8012dbc: b191 cbz r1, 8012de4 <writeMQTTString+0x3a>
- writeCString(pptr, mqttstring.cstring);
- 8012dbe: 4620 mov r0, r4
- 8012dc0: f7ff ffdf bl 8012d82 <writeCString>
- 8012dc4: e00c b.n 8012de0 <writeMQTTString+0x36>
- 8012dc6: 4615 mov r5, r2
- writeInt(pptr, mqttstring.lenstring.len);
- 8012dc8: 4611 mov r1, r2
- 8012dca: 4620 mov r0, r4
- 8012dcc: f7ff ffc2 bl 8012d54 <writeInt>
- memcpy(*pptr, mqttstring.lenstring.data, mqttstring.lenstring.len);
- 8012dd0: 462a mov r2, r5
- 8012dd2: 9903 ldr r1, [sp, #12]
- 8012dd4: 6820 ldr r0, [r4, #0]
- 8012dd6: f000 fd54 bl 8013882 <memcpy>
- *pptr += mqttstring.lenstring.len;
- 8012dda: 6823 ldr r3, [r4, #0]
- 8012ddc: 442b add r3, r5
- 8012dde: 6023 str r3, [r4, #0]
- else
- writeInt(pptr, 0);
- }
- 8012de0: b005 add sp, #20
- 8012de2: bd30 pop {r4, r5, pc}
- writeInt(pptr, 0);
- 8012de4: 2100 movs r1, #0
- 8012de6: 4620 mov r0, r4
- 8012de8: f7ff ffb4 bl 8012d54 <writeInt>
- }
- 8012dec: e7f8 b.n 8012de0 <writeMQTTString+0x36>
- 08012dee <readMQTTLenString>:
- * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned
- * @param enddata pointer to the end of the data: do not read beyond
- * @return 1 if successful, 0 if not
- */
- int readMQTTLenString(MQTTString* mqttstring, unsigned char** pptr, unsigned char* enddata)
- {
- 8012dee: b570 push {r4, r5, r6, lr}
- 8012df0: 4605 mov r5, r0
- int rc = 0;
- FUNC_ENTRY;
- /* the first two bytes are the length of the string */
- if (enddata - (*pptr) > 1) /* enough length to read the integer? */
- 8012df2: 680b ldr r3, [r1, #0]
- 8012df4: 1ad3 subs r3, r2, r3
- 8012df6: 2b01 cmp r3, #1
- 8012df8: dc03 bgt.n 8012e02 <readMQTTLenString+0x14>
- int rc = 0;
- 8012dfa: 2000 movs r0, #0
- mqttstring->lenstring.data = (char*)*pptr;
- *pptr += mqttstring->lenstring.len;
- rc = 1;
- }
- }
- mqttstring->cstring = NULL;
- 8012dfc: 2300 movs r3, #0
- 8012dfe: 602b str r3, [r5, #0]
- FUNC_EXIT_RC(rc);
- return rc;
- }
- 8012e00: bd70 pop {r4, r5, r6, pc}
- 8012e02: 460c mov r4, r1
- 8012e04: 4616 mov r6, r2
- mqttstring->lenstring.len = readInt(pptr); /* increments pptr to point past length */
- 8012e06: 4608 mov r0, r1
- 8012e08: f7ff ff90 bl 8012d2c <readInt>
- 8012e0c: 6068 str r0, [r5, #4]
- if (&(*pptr)[mqttstring->lenstring.len] <= enddata)
- 8012e0e: 6823 ldr r3, [r4, #0]
- 8012e10: 4418 add r0, r3
- 8012e12: 42b0 cmp r0, r6
- 8012e14: d803 bhi.n 8012e1e <readMQTTLenString+0x30>
- mqttstring->lenstring.data = (char*)*pptr;
- 8012e16: 60ab str r3, [r5, #8]
- *pptr += mqttstring->lenstring.len;
- 8012e18: 6020 str r0, [r4, #0]
- rc = 1;
- 8012e1a: 2001 movs r0, #1
- 8012e1c: e7ee b.n 8012dfc <readMQTTLenString+0xe>
- int rc = 0;
- 8012e1e: 2000 movs r0, #0
- 8012e20: e7ec b.n 8012dfc <readMQTTLenString+0xe>
- 08012e22 <MQTTstrlen>:
- * Return the length of the MQTTstring - C string if there is one, otherwise the length delimited string
- * @param mqttstring the string to return the length of
- * @return the length of the string
- */
- int MQTTstrlen(MQTTString mqttstring)
- {
- 8012e22: b500 push {lr}
- 8012e24: b085 sub sp, #20
- 8012e26: ab04 add r3, sp, #16
- 8012e28: e903 0007 stmdb r3, {r0, r1, r2}
- int rc = 0;
- if (mqttstring.cstring)
- 8012e2c: b120 cbz r0, 8012e38 <MQTTstrlen+0x16>
- rc = strlen(mqttstring.cstring);
- 8012e2e: f7ed fa61 bl 80002f4 <strlen>
- else
- rc = mqttstring.lenstring.len;
- return rc;
- }
- 8012e32: b005 add sp, #20
- 8012e34: f85d fb04 ldr.w pc, [sp], #4
- rc = mqttstring.lenstring.len;
- 8012e38: 9802 ldr r0, [sp, #8]
- return rc;
- 8012e3a: e7fa b.n 8012e32 <MQTTstrlen+0x10>
- 08012e3c <MQTTPacket_equals>:
- * @param a the MQTTString to compare
- * @param bptr the C string to compare
- * @return boolean - equal or not
- */
- int MQTTPacket_equals(MQTTString* a, char* bptr)
- {
- 8012e3c: b570 push {r4, r5, r6, lr}
- 8012e3e: 460c mov r4, r1
- int alen = 0,
- blen = 0;
- char *aptr;
-
- if (a->cstring)
- 8012e40: 6806 ldr r6, [r0, #0]
- 8012e42: b156 cbz r6, 8012e5a <MQTTPacket_equals+0x1e>
- {
- aptr = a->cstring;
- alen = strlen(a->cstring);
- 8012e44: 4630 mov r0, r6
- 8012e46: f7ed fa55 bl 80002f4 <strlen>
- 8012e4a: 4605 mov r5, r0
- else
- {
- aptr = a->lenstring.data;
- alen = a->lenstring.len;
- }
- blen = strlen(bptr);
- 8012e4c: 4620 mov r0, r4
- 8012e4e: f7ed fa51 bl 80002f4 <strlen>
-
- return (alen == blen) && (strncmp(aptr, bptr, alen) == 0);
- 8012e52: 4285 cmp r5, r0
- 8012e54: d004 beq.n 8012e60 <MQTTPacket_equals+0x24>
- 8012e56: 2000 movs r0, #0
- }
- 8012e58: bd70 pop {r4, r5, r6, pc}
- aptr = a->lenstring.data;
- 8012e5a: 6886 ldr r6, [r0, #8]
- alen = a->lenstring.len;
- 8012e5c: 6845 ldr r5, [r0, #4]
- 8012e5e: e7f5 b.n 8012e4c <MQTTPacket_equals+0x10>
- return (alen == blen) && (strncmp(aptr, bptr, alen) == 0);
- 8012e60: 462a mov r2, r5
- 8012e62: 4621 mov r1, r4
- 8012e64: 4630 mov r0, r6
- 8012e66: f000 fc2f bl 80136c8 <strncmp>
- 8012e6a: b108 cbz r0, 8012e70 <MQTTPacket_equals+0x34>
- 8012e6c: 2000 movs r0, #0
- 8012e6e: e7f3 b.n 8012e58 <MQTTPacket_equals+0x1c>
- 8012e70: 2001 movs r0, #1
- 8012e72: e7f1 b.n 8012e58 <MQTTPacket_equals+0x1c>
- 08012e74 <MQTTSerialize_publishLength>:
- * @param topicName the topic name to be used in the publish
- * @param payloadlen the length of the payload to be sent
- * @return the length of buffer needed to contain the serialized version of the packet
- */
- int MQTTSerialize_publishLength(int qos, MQTTString topicName, int payloadlen)
- {
- 8012e74: b510 push {r4, lr}
- 8012e76: b084 sub sp, #16
- 8012e78: 4604 mov r4, r0
- 8012e7a: f10d 0c04 add.w ip, sp, #4
- 8012e7e: e88c 000e stmia.w ip, {r1, r2, r3}
- int len = 0;
- len += 2 + MQTTstrlen(topicName) + payloadlen;
- 8012e82: e89c 0007 ldmia.w ip, {r0, r1, r2}
- 8012e86: f7ff ffcc bl 8012e22 <MQTTstrlen>
- 8012e8a: 1c83 adds r3, r0, #2
- 8012e8c: 9a06 ldr r2, [sp, #24]
- 8012e8e: 1898 adds r0, r3, r2
- if (qos > 0)
- 8012e90: 2c00 cmp r4, #0
- 8012e92: dd00 ble.n 8012e96 <MQTTSerialize_publishLength+0x22>
- len += 2; /* packetid */
- 8012e94: 3002 adds r0, #2
- return len;
- }
- 8012e96: b004 add sp, #16
- 8012e98: bd10 pop {r4, pc}
- 08012e9a <MQTTSerialize_publish>:
- * @param payloadlen integer - the length of the MQTT payload
- * @return the length of the serialized data. <= 0 indicates error
- */
- int MQTTSerialize_publish(unsigned char* buf, int buflen, unsigned char dup, int qos, unsigned char retained, unsigned short packetid,
- MQTTString topicName, unsigned char* payload, int payloadlen)
- {
- 8012e9a: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
- 8012e9e: b084 sub sp, #16
- 8012ea0: 4606 mov r6, r0
- 8012ea2: 460f mov r7, r1
- 8012ea4: 4690 mov r8, r2
- 8012ea6: 461c mov r4, r3
- 8012ea8: f8dd 9048 ldr.w r9, [sp, #72] @ 0x48
- unsigned char *ptr = buf;
- 8012eac: 9003 str r0, [sp, #12]
- MQTTHeader header = {0};
- int rem_len = 0;
- int rc = 0;
- FUNC_ENTRY;
- if (MQTTPacket_len(rem_len = MQTTSerialize_publishLength(qos, topicName, payloadlen)) > buflen)
- 8012eae: f8cd 9000 str.w r9, [sp]
- 8012eb2: ab0e add r3, sp, #56 @ 0x38
- 8012eb4: cb0e ldmia r3, {r1, r2, r3}
- 8012eb6: 4620 mov r0, r4
- 8012eb8: f7ff ffdc bl 8012e74 <MQTTSerialize_publishLength>
- 8012ebc: 4682 mov sl, r0
- 8012ebe: f7ff ff15 bl 8012cec <MQTTPacket_len>
- 8012ec2: 42b8 cmp r0, r7
- 8012ec4: dc2f bgt.n 8012f26 <MQTTSerialize_publish+0x8c>
- 8012ec6: 2500 movs r5, #0
- {
- rc = MQTTPACKET_BUFFER_TOO_SHORT;
- goto exit;
- }
- header.bits.type = PUBLISH;
- 8012ec8: 2303 movs r3, #3
- 8012eca: f363 1507 bfi r5, r3, #4, #4
- header.bits.dup = dup;
- 8012ece: f368 05c3 bfi r5, r8, #3, #1
- header.bits.qos = qos;
- 8012ed2: f364 0542 bfi r5, r4, #1, #2
- header.bits.retain = retained;
- 8012ed6: f89d 3030 ldrb.w r3, [sp, #48] @ 0x30
- 8012eda: f363 0500 bfi r5, r3, #0, #1
- writeChar(&ptr, header.byte); /* write header */
- 8012ede: b2e9 uxtb r1, r5
- 8012ee0: a803 add r0, sp, #12
- 8012ee2: f7ff ff31 bl 8012d48 <writeChar>
- ptr += MQTTPacket_encode(ptr, rem_len); /* write remaining length */;
- 8012ee6: 4651 mov r1, sl
- 8012ee8: 9803 ldr r0, [sp, #12]
- 8012eea: f7ff febd bl 8012c68 <MQTTPacket_encode>
- 8012eee: 9b03 ldr r3, [sp, #12]
- 8012ef0: 4403 add r3, r0
- 8012ef2: 9303 str r3, [sp, #12]
- writeMQTTString(&ptr, topicName);
- 8012ef4: ab0e add r3, sp, #56 @ 0x38
- 8012ef6: cb0e ldmia r3, {r1, r2, r3}
- 8012ef8: a803 add r0, sp, #12
- 8012efa: f7ff ff56 bl 8012daa <writeMQTTString>
- if (qos > 0)
- 8012efe: 2c00 cmp r4, #0
- 8012f00: dc0b bgt.n 8012f1a <MQTTSerialize_publish+0x80>
- writeInt(&ptr, packetid);
- memcpy(ptr, payload, payloadlen);
- 8012f02: 464a mov r2, r9
- 8012f04: 9911 ldr r1, [sp, #68] @ 0x44
- 8012f06: 9803 ldr r0, [sp, #12]
- 8012f08: f000 fcbb bl 8013882 <memcpy>
- ptr += payloadlen;
- 8012f0c: 9a03 ldr r2, [sp, #12]
- 8012f0e: 444a add r2, r9
- 8012f10: 9203 str r2, [sp, #12]
- rc = ptr - buf;
- 8012f12: 1b90 subs r0, r2, r6
- exit:
- FUNC_EXIT_RC(rc);
- return rc;
- }
- 8012f14: b004 add sp, #16
- 8012f16: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
- writeInt(&ptr, packetid);
- 8012f1a: f8bd 1034 ldrh.w r1, [sp, #52] @ 0x34
- 8012f1e: a803 add r0, sp, #12
- 8012f20: f7ff ff18 bl 8012d54 <writeInt>
- 8012f24: e7ed b.n 8012f02 <MQTTSerialize_publish+0x68>
- rc = MQTTPACKET_BUFFER_TOO_SHORT;
- 8012f26: f06f 0001 mvn.w r0, #1
- return rc;
- 8012f2a: e7f3 b.n 8012f14 <MQTTSerialize_publish+0x7a>
- 08012f2c <MQTTSerialize_ack>:
- * @param dup the MQTT dup flag
- * @param packetid the MQTT packet identifier
- * @return serialized length, or error if 0
- */
- int MQTTSerialize_ack(unsigned char* buf, int buflen, unsigned char packettype, unsigned char dup, unsigned short packetid)
- {
- 8012f2c: b510 push {r4, lr}
- 8012f2e: b082 sub sp, #8
- 8012f30: 4604 mov r4, r0
- MQTTHeader header = {0};
- int rc = 0;
- unsigned char *ptr = buf;
- 8012f32: 9001 str r0, [sp, #4]
- FUNC_ENTRY;
- if (buflen < 4)
- 8012f34: 2903 cmp r1, #3
- 8012f36: dd1e ble.n 8012f76 <MQTTSerialize_ack+0x4a>
- 8012f38: 2000 movs r0, #0
- {
- rc = MQTTPACKET_BUFFER_TOO_SHORT;
- goto exit;
- }
- header.bits.type = packettype;
- 8012f3a: f362 1007 bfi r0, r2, #4, #4
- header.bits.dup = dup;
- 8012f3e: f363 00c3 bfi r0, r3, #3, #1
- header.bits.qos = (packettype == PUBREL) ? 1 : 0;
- 8012f42: 2a06 cmp r2, #6
- 8012f44: bf14 ite ne
- 8012f46: 2200 movne r2, #0
- 8012f48: 2201 moveq r2, #1
- 8012f4a: f362 0042 bfi r0, r2, #1, #2
- writeChar(&ptr, header.byte); /* write header */
- 8012f4e: b2c1 uxtb r1, r0
- 8012f50: a801 add r0, sp, #4
- 8012f52: f7ff fef9 bl 8012d48 <writeChar>
- ptr += MQTTPacket_encode(ptr, 2); /* write remaining length */
- 8012f56: 2102 movs r1, #2
- 8012f58: 9801 ldr r0, [sp, #4]
- 8012f5a: f7ff fe85 bl 8012c68 <MQTTPacket_encode>
- 8012f5e: 9b01 ldr r3, [sp, #4]
- 8012f60: 4403 add r3, r0
- 8012f62: 9301 str r3, [sp, #4]
- writeInt(&ptr, packetid);
- 8012f64: f8bd 1010 ldrh.w r1, [sp, #16]
- 8012f68: a801 add r0, sp, #4
- 8012f6a: f7ff fef3 bl 8012d54 <writeInt>
- rc = ptr - buf;
- 8012f6e: 9801 ldr r0, [sp, #4]
- 8012f70: 1b00 subs r0, r0, r4
- exit:
- FUNC_EXIT_RC(rc);
- return rc;
- }
- 8012f72: b002 add sp, #8
- 8012f74: bd10 pop {r4, pc}
- rc = MQTTPACKET_BUFFER_TOO_SHORT;
- 8012f76: f06f 0001 mvn.w r0, #1
- return rc;
- 8012f7a: e7fa b.n 8012f72 <MQTTSerialize_ack+0x46>
- 08012f7c <MQTTSerialize_subscribeLength>:
- * @param count the number of topic filter strings in topicFilters
- * @param topicFilters the array of topic filter strings to be used in the publish
- * @return the length of buffer needed to contain the serialized version of the packet
- */
- int MQTTSerialize_subscribeLength(int count, MQTTString topicFilters[])
- {
- 8012f7c: b5f8 push {r3, r4, r5, r6, r7, lr}
- 8012f7e: 4606 mov r6, r0
- 8012f80: 460f mov r7, r1
- int i;
- int len = 2; /* packetid */
- 8012f82: 2502 movs r5, #2
- for (i = 0; i < count; ++i)
- 8012f84: 2400 movs r4, #0
- 8012f86: e00a b.n 8012f9e <MQTTSerialize_subscribeLength+0x22>
- len += 2 + MQTTstrlen(topicFilters[i]) + 1; /* length + topic + req_qos */
- 8012f88: eb04 0344 add.w r3, r4, r4, lsl #1
- 8012f8c: eb07 0383 add.w r3, r7, r3, lsl #2
- 8012f90: e893 0007 ldmia.w r3, {r0, r1, r2}
- 8012f94: f7ff ff45 bl 8012e22 <MQTTstrlen>
- 8012f98: 3003 adds r0, #3
- 8012f9a: 4405 add r5, r0
- for (i = 0; i < count; ++i)
- 8012f9c: 3401 adds r4, #1
- 8012f9e: 42b4 cmp r4, r6
- 8012fa0: dbf2 blt.n 8012f88 <MQTTSerialize_subscribeLength+0xc>
- return len;
- }
- 8012fa2: 4628 mov r0, r5
- 8012fa4: bdf8 pop {r3, r4, r5, r6, r7, pc}
- 08012fa6 <MQTTSerialize_subscribe>:
- * @param requestedQoSs - array of requested QoS
- * @return the length of the serialized data. <= 0 indicates error
- */
- int MQTTSerialize_subscribe(unsigned char* buf, int buflen, unsigned char dup, unsigned short packetid, int count,
- MQTTString topicFilters[], int requestedQoSs[])
- {
- 8012fa6: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 8012faa: b085 sub sp, #20
- 8012fac: 4607 mov r7, r0
- 8012fae: 4689 mov r9, r1
- 8012fb0: 4692 mov sl, r2
- 8012fb2: 9301 str r3, [sp, #4]
- 8012fb4: 9c0e ldr r4, [sp, #56] @ 0x38
- 8012fb6: 9d0f ldr r5, [sp, #60] @ 0x3c
- 8012fb8: 9e10 ldr r6, [sp, #64] @ 0x40
- unsigned char *ptr = buf;
- 8012fba: 9003 str r0, [sp, #12]
- int rem_len = 0;
- int rc = 0;
- int i = 0;
- FUNC_ENTRY;
- if (MQTTPacket_len(rem_len = MQTTSerialize_subscribeLength(count, topicFilters)) > buflen)
- 8012fbc: 4629 mov r1, r5
- 8012fbe: 4620 mov r0, r4
- 8012fc0: f7ff ffdc bl 8012f7c <MQTTSerialize_subscribeLength>
- 8012fc4: 4683 mov fp, r0
- 8012fc6: f7ff fe91 bl 8012cec <MQTTPacket_len>
- 8012fca: 4548 cmp r0, r9
- 8012fcc: dc32 bgt.n 8013034 <MQTTSerialize_subscribe+0x8e>
- 8012fce: f04f 0800 mov.w r8, #0
- rc = MQTTPACKET_BUFFER_TOO_SHORT;
- goto exit;
- }
- header.byte = 0;
- header.bits.type = SUBSCRIBE;
- 8012fd2: 2308 movs r3, #8
- 8012fd4: f363 1807 bfi r8, r3, #4, #4
- header.bits.dup = dup;
- 8012fd8: f36a 08c3 bfi r8, sl, #3, #1
- header.bits.qos = 1;
- 8012fdc: 2301 movs r3, #1
- 8012fde: f363 0842 bfi r8, r3, #1, #2
- writeChar(&ptr, header.byte); /* write header */
- 8012fe2: fa5f f188 uxtb.w r1, r8
- 8012fe6: a803 add r0, sp, #12
- 8012fe8: f7ff feae bl 8012d48 <writeChar>
- ptr += MQTTPacket_encode(ptr, rem_len); /* write remaining length */;
- 8012fec: 4659 mov r1, fp
- 8012fee: 9803 ldr r0, [sp, #12]
- 8012ff0: f7ff fe3a bl 8012c68 <MQTTPacket_encode>
- 8012ff4: 9b03 ldr r3, [sp, #12]
- 8012ff6: 4403 add r3, r0
- 8012ff8: 9303 str r3, [sp, #12]
- writeInt(&ptr, packetid);
- 8012ffa: 9901 ldr r1, [sp, #4]
- 8012ffc: a803 add r0, sp, #12
- 8012ffe: f7ff fea9 bl 8012d54 <writeInt>
- for (i = 0; i < count; ++i)
- 8013002: f04f 0800 mov.w r8, #0
- 8013006: e00e b.n 8013026 <MQTTSerialize_subscribe+0x80>
- {
- writeMQTTString(&ptr, topicFilters[i]);
- 8013008: eb08 0348 add.w r3, r8, r8, lsl #1
- 801300c: eb05 0383 add.w r3, r5, r3, lsl #2
- 8013010: cb0e ldmia r3, {r1, r2, r3}
- 8013012: a803 add r0, sp, #12
- 8013014: f7ff fec9 bl 8012daa <writeMQTTString>
- writeChar(&ptr, requestedQoSs[i]);
- 8013018: f816 1028 ldrb.w r1, [r6, r8, lsl #2]
- 801301c: a803 add r0, sp, #12
- 801301e: f7ff fe93 bl 8012d48 <writeChar>
- for (i = 0; i < count; ++i)
- 8013022: f108 0801 add.w r8, r8, #1
- 8013026: 45a0 cmp r8, r4
- 8013028: dbee blt.n 8013008 <MQTTSerialize_subscribe+0x62>
- }
- rc = ptr - buf;
- 801302a: 9803 ldr r0, [sp, #12]
- 801302c: 1bc0 subs r0, r0, r7
- exit:
- FUNC_EXIT_RC(rc);
- return rc;
- }
- 801302e: b005 add sp, #20
- 8013030: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
- rc = MQTTPACKET_BUFFER_TOO_SHORT;
- 8013034: f06f 0001 mvn.w r0, #1
- return rc;
- 8013038: e7f9 b.n 801302e <MQTTSerialize_subscribe+0x88>
- 0801303a <MQTTDeserialize_suback>:
- * @param buf the raw buffer data, of the correct length determined by the remaining length field
- * @param buflen the length in bytes of the data in the supplied buffer
- * @return error code. 1 is success, 0 is failure
- */
- int MQTTDeserialize_suback(unsigned short* packetid, int maxcount, int* count, int grantedQoSs[], unsigned char* buf, int buflen)
- {
- 801303a: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 801303e: b082 sub sp, #8
- 8013040: 4680 mov r8, r0
- 8013042: 460d mov r5, r1
- 8013044: 4614 mov r4, r2
- 8013046: 461e mov r6, r3
- MQTTHeader header = {0};
- unsigned char* curdata = buf;
- 8013048: 9b08 ldr r3, [sp, #32]
- 801304a: 9301 str r3, [sp, #4]
- unsigned char* enddata = NULL;
- int rc = 0;
- int mylen;
- FUNC_ENTRY;
- header.byte = readChar(&curdata);
- 801304c: a801 add r0, sp, #4
- 801304e: f7ff fe75 bl 8012d3c <readChar>
- if (header.bits.type != SUBACK)
- 8013052: f000 03f0 and.w r3, r0, #240 @ 0xf0
- 8013056: 2b90 cmp r3, #144 @ 0x90
- 8013058: d003 beq.n 8013062 <MQTTDeserialize_suback+0x28>
- int rc = 0;
- 801305a: 2000 movs r0, #0
- rc = 1;
- exit:
- FUNC_EXIT_RC(rc);
- return rc;
- }
- 801305c: b002 add sp, #8
- 801305e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */
- 8013062: 4669 mov r1, sp
- 8013064: 9801 ldr r0, [sp, #4]
- 8013066: f7ff fe55 bl 8012d14 <MQTTPacket_decodeBuf>
- 801306a: 9f01 ldr r7, [sp, #4]
- 801306c: 4407 add r7, r0
- 801306e: 9701 str r7, [sp, #4]
- enddata = curdata + mylen;
- 8013070: 9b00 ldr r3, [sp, #0]
- 8013072: 441f add r7, r3
- if (enddata - curdata < 2)
- 8013074: 2b01 cmp r3, #1
- 8013076: ddf1 ble.n 801305c <MQTTDeserialize_suback+0x22>
- *packetid = readInt(&curdata);
- 8013078: a801 add r0, sp, #4
- 801307a: f7ff fe57 bl 8012d2c <readInt>
- 801307e: f8a8 0000 strh.w r0, [r8]
- *count = 0;
- 8013082: 2300 movs r3, #0
- 8013084: 6023 str r3, [r4, #0]
- while (curdata < enddata)
- 8013086: 9b01 ldr r3, [sp, #4]
- 8013088: 42bb cmp r3, r7
- 801308a: d20b bcs.n 80130a4 <MQTTDeserialize_suback+0x6a>
- if (*count > maxcount)
- 801308c: 6823 ldr r3, [r4, #0]
- 801308e: 42ab cmp r3, r5
- 8013090: dc0a bgt.n 80130a8 <MQTTDeserialize_suback+0x6e>
- grantedQoSs[(*count)++] = readChar(&curdata);
- 8013092: a801 add r0, sp, #4
- 8013094: f7ff fe52 bl 8012d3c <readChar>
- 8013098: 6822 ldr r2, [r4, #0]
- 801309a: 1c53 adds r3, r2, #1
- 801309c: 6023 str r3, [r4, #0]
- 801309e: f846 0022 str.w r0, [r6, r2, lsl #2]
- 80130a2: e7f0 b.n 8013086 <MQTTDeserialize_suback+0x4c>
- rc = 1;
- 80130a4: 2001 movs r0, #1
- 80130a6: e7d9 b.n 801305c <MQTTDeserialize_suback+0x22>
- rc = -1;
- 80130a8: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- return rc;
- 80130ac: e7d6 b.n 801305c <MQTTDeserialize_suback+0x22>
- ...
- 080130b0 <rand>:
- 80130b0: 4b16 ldr r3, [pc, #88] @ (801310c <rand+0x5c>)
- 80130b2: b510 push {r4, lr}
- 80130b4: 681c ldr r4, [r3, #0]
- 80130b6: 6b23 ldr r3, [r4, #48] @ 0x30
- 80130b8: b9b3 cbnz r3, 80130e8 <rand+0x38>
- 80130ba: 2018 movs r0, #24
- 80130bc: f000 fc58 bl 8013970 <malloc>
- 80130c0: 4602 mov r2, r0
- 80130c2: 6320 str r0, [r4, #48] @ 0x30
- 80130c4: b920 cbnz r0, 80130d0 <rand+0x20>
- 80130c6: 4b12 ldr r3, [pc, #72] @ (8013110 <rand+0x60>)
- 80130c8: 4812 ldr r0, [pc, #72] @ (8013114 <rand+0x64>)
- 80130ca: 2152 movs r1, #82 @ 0x52
- 80130cc: f000 fbe8 bl 80138a0 <__assert_func>
- 80130d0: 4911 ldr r1, [pc, #68] @ (8013118 <rand+0x68>)
- 80130d2: 4b12 ldr r3, [pc, #72] @ (801311c <rand+0x6c>)
- 80130d4: e9c0 1300 strd r1, r3, [r0]
- 80130d8: 4b11 ldr r3, [pc, #68] @ (8013120 <rand+0x70>)
- 80130da: 6083 str r3, [r0, #8]
- 80130dc: 230b movs r3, #11
- 80130de: 8183 strh r3, [r0, #12]
- 80130e0: 2100 movs r1, #0
- 80130e2: 2001 movs r0, #1
- 80130e4: e9c2 0104 strd r0, r1, [r2, #16]
- 80130e8: 6b21 ldr r1, [r4, #48] @ 0x30
- 80130ea: 480e ldr r0, [pc, #56] @ (8013124 <rand+0x74>)
- 80130ec: 690b ldr r3, [r1, #16]
- 80130ee: 694c ldr r4, [r1, #20]
- 80130f0: 4a0d ldr r2, [pc, #52] @ (8013128 <rand+0x78>)
- 80130f2: 4358 muls r0, r3
- 80130f4: fb02 0004 mla r0, r2, r4, r0
- 80130f8: fba3 3202 umull r3, r2, r3, r2
- 80130fc: 3301 adds r3, #1
- 80130fe: eb40 0002 adc.w r0, r0, r2
- 8013102: e9c1 3004 strd r3, r0, [r1, #16]
- 8013106: f020 4000 bic.w r0, r0, #2147483648 @ 0x80000000
- 801310a: bd10 pop {r4, pc}
- 801310c: 2400003c .word 0x2400003c
- 8013110: 08017edb .word 0x08017edb
- 8013114: 08017ef2 .word 0x08017ef2
- 8013118: abcd330e .word 0xabcd330e
- 801311c: e66d1234 .word 0xe66d1234
- 8013120: 0005deec .word 0x0005deec
- 8013124: 5851f42d .word 0x5851f42d
- 8013128: 4c957f2d .word 0x4c957f2d
- 0801312c <__sflush_r>:
- 801312c: f9b1 200c ldrsh.w r2, [r1, #12]
- 8013130: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 8013134: 0716 lsls r6, r2, #28
- 8013136: 4605 mov r5, r0
- 8013138: 460c mov r4, r1
- 801313a: d454 bmi.n 80131e6 <__sflush_r+0xba>
- 801313c: 684b ldr r3, [r1, #4]
- 801313e: 2b00 cmp r3, #0
- 8013140: dc02 bgt.n 8013148 <__sflush_r+0x1c>
- 8013142: 6c0b ldr r3, [r1, #64] @ 0x40
- 8013144: 2b00 cmp r3, #0
- 8013146: dd48 ble.n 80131da <__sflush_r+0xae>
- 8013148: 6ae6 ldr r6, [r4, #44] @ 0x2c
- 801314a: 2e00 cmp r6, #0
- 801314c: d045 beq.n 80131da <__sflush_r+0xae>
- 801314e: 2300 movs r3, #0
- 8013150: f412 5280 ands.w r2, r2, #4096 @ 0x1000
- 8013154: 682f ldr r7, [r5, #0]
- 8013156: 6a21 ldr r1, [r4, #32]
- 8013158: 602b str r3, [r5, #0]
- 801315a: d030 beq.n 80131be <__sflush_r+0x92>
- 801315c: 6d62 ldr r2, [r4, #84] @ 0x54
- 801315e: 89a3 ldrh r3, [r4, #12]
- 8013160: 0759 lsls r1, r3, #29
- 8013162: d505 bpl.n 8013170 <__sflush_r+0x44>
- 8013164: 6863 ldr r3, [r4, #4]
- 8013166: 1ad2 subs r2, r2, r3
- 8013168: 6b63 ldr r3, [r4, #52] @ 0x34
- 801316a: b10b cbz r3, 8013170 <__sflush_r+0x44>
- 801316c: 6c23 ldr r3, [r4, #64] @ 0x40
- 801316e: 1ad2 subs r2, r2, r3
- 8013170: 2300 movs r3, #0
- 8013172: 6ae6 ldr r6, [r4, #44] @ 0x2c
- 8013174: 6a21 ldr r1, [r4, #32]
- 8013176: 4628 mov r0, r5
- 8013178: 47b0 blx r6
- 801317a: 1c43 adds r3, r0, #1
- 801317c: 89a3 ldrh r3, [r4, #12]
- 801317e: d106 bne.n 801318e <__sflush_r+0x62>
- 8013180: 6829 ldr r1, [r5, #0]
- 8013182: 291d cmp r1, #29
- 8013184: d82b bhi.n 80131de <__sflush_r+0xb2>
- 8013186: 4a2a ldr r2, [pc, #168] @ (8013230 <__sflush_r+0x104>)
- 8013188: 410a asrs r2, r1
- 801318a: 07d6 lsls r6, r2, #31
- 801318c: d427 bmi.n 80131de <__sflush_r+0xb2>
- 801318e: 2200 movs r2, #0
- 8013190: 6062 str r2, [r4, #4]
- 8013192: 04d9 lsls r1, r3, #19
- 8013194: 6922 ldr r2, [r4, #16]
- 8013196: 6022 str r2, [r4, #0]
- 8013198: d504 bpl.n 80131a4 <__sflush_r+0x78>
- 801319a: 1c42 adds r2, r0, #1
- 801319c: d101 bne.n 80131a2 <__sflush_r+0x76>
- 801319e: 682b ldr r3, [r5, #0]
- 80131a0: b903 cbnz r3, 80131a4 <__sflush_r+0x78>
- 80131a2: 6560 str r0, [r4, #84] @ 0x54
- 80131a4: 6b61 ldr r1, [r4, #52] @ 0x34
- 80131a6: 602f str r7, [r5, #0]
- 80131a8: b1b9 cbz r1, 80131da <__sflush_r+0xae>
- 80131aa: f104 0344 add.w r3, r4, #68 @ 0x44
- 80131ae: 4299 cmp r1, r3
- 80131b0: d002 beq.n 80131b8 <__sflush_r+0x8c>
- 80131b2: 4628 mov r0, r5
- 80131b4: f000 fb92 bl 80138dc <_free_r>
- 80131b8: 2300 movs r3, #0
- 80131ba: 6363 str r3, [r4, #52] @ 0x34
- 80131bc: e00d b.n 80131da <__sflush_r+0xae>
- 80131be: 2301 movs r3, #1
- 80131c0: 4628 mov r0, r5
- 80131c2: 47b0 blx r6
- 80131c4: 4602 mov r2, r0
- 80131c6: 1c50 adds r0, r2, #1
- 80131c8: d1c9 bne.n 801315e <__sflush_r+0x32>
- 80131ca: 682b ldr r3, [r5, #0]
- 80131cc: 2b00 cmp r3, #0
- 80131ce: d0c6 beq.n 801315e <__sflush_r+0x32>
- 80131d0: 2b1d cmp r3, #29
- 80131d2: d001 beq.n 80131d8 <__sflush_r+0xac>
- 80131d4: 2b16 cmp r3, #22
- 80131d6: d11e bne.n 8013216 <__sflush_r+0xea>
- 80131d8: 602f str r7, [r5, #0]
- 80131da: 2000 movs r0, #0
- 80131dc: e022 b.n 8013224 <__sflush_r+0xf8>
- 80131de: f043 0340 orr.w r3, r3, #64 @ 0x40
- 80131e2: b21b sxth r3, r3
- 80131e4: e01b b.n 801321e <__sflush_r+0xf2>
- 80131e6: 690f ldr r7, [r1, #16]
- 80131e8: 2f00 cmp r7, #0
- 80131ea: d0f6 beq.n 80131da <__sflush_r+0xae>
- 80131ec: 0793 lsls r3, r2, #30
- 80131ee: 680e ldr r6, [r1, #0]
- 80131f0: bf08 it eq
- 80131f2: 694b ldreq r3, [r1, #20]
- 80131f4: 600f str r7, [r1, #0]
- 80131f6: bf18 it ne
- 80131f8: 2300 movne r3, #0
- 80131fa: eba6 0807 sub.w r8, r6, r7
- 80131fe: 608b str r3, [r1, #8]
- 8013200: f1b8 0f00 cmp.w r8, #0
- 8013204: dde9 ble.n 80131da <__sflush_r+0xae>
- 8013206: 6a21 ldr r1, [r4, #32]
- 8013208: 6aa6 ldr r6, [r4, #40] @ 0x28
- 801320a: 4643 mov r3, r8
- 801320c: 463a mov r2, r7
- 801320e: 4628 mov r0, r5
- 8013210: 47b0 blx r6
- 8013212: 2800 cmp r0, #0
- 8013214: dc08 bgt.n 8013228 <__sflush_r+0xfc>
- 8013216: f9b4 300c ldrsh.w r3, [r4, #12]
- 801321a: f043 0340 orr.w r3, r3, #64 @ 0x40
- 801321e: 81a3 strh r3, [r4, #12]
- 8013220: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8013224: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
- 8013228: 4407 add r7, r0
- 801322a: eba8 0800 sub.w r8, r8, r0
- 801322e: e7e7 b.n 8013200 <__sflush_r+0xd4>
- 8013230: dfbffffe .word 0xdfbffffe
- 08013234 <_fflush_r>:
- 8013234: b538 push {r3, r4, r5, lr}
- 8013236: 690b ldr r3, [r1, #16]
- 8013238: 4605 mov r5, r0
- 801323a: 460c mov r4, r1
- 801323c: b913 cbnz r3, 8013244 <_fflush_r+0x10>
- 801323e: 2500 movs r5, #0
- 8013240: 4628 mov r0, r5
- 8013242: bd38 pop {r3, r4, r5, pc}
- 8013244: b118 cbz r0, 801324e <_fflush_r+0x1a>
- 8013246: 6a03 ldr r3, [r0, #32]
- 8013248: b90b cbnz r3, 801324e <_fflush_r+0x1a>
- 801324a: f000 f8a7 bl 801339c <__sinit>
- 801324e: f9b4 300c ldrsh.w r3, [r4, #12]
- 8013252: 2b00 cmp r3, #0
- 8013254: d0f3 beq.n 801323e <_fflush_r+0xa>
- 8013256: 6e62 ldr r2, [r4, #100] @ 0x64
- 8013258: 07d0 lsls r0, r2, #31
- 801325a: d404 bmi.n 8013266 <_fflush_r+0x32>
- 801325c: 0599 lsls r1, r3, #22
- 801325e: d402 bmi.n 8013266 <_fflush_r+0x32>
- 8013260: 6da0 ldr r0, [r4, #88] @ 0x58
- 8013262: f000 fb04 bl 801386e <__retarget_lock_acquire_recursive>
- 8013266: 4628 mov r0, r5
- 8013268: 4621 mov r1, r4
- 801326a: f7ff ff5f bl 801312c <__sflush_r>
- 801326e: 6e63 ldr r3, [r4, #100] @ 0x64
- 8013270: 07da lsls r2, r3, #31
- 8013272: 4605 mov r5, r0
- 8013274: d4e4 bmi.n 8013240 <_fflush_r+0xc>
- 8013276: 89a3 ldrh r3, [r4, #12]
- 8013278: 059b lsls r3, r3, #22
- 801327a: d4e1 bmi.n 8013240 <_fflush_r+0xc>
- 801327c: 6da0 ldr r0, [r4, #88] @ 0x58
- 801327e: f000 faf7 bl 8013870 <__retarget_lock_release_recursive>
- 8013282: e7dd b.n 8013240 <_fflush_r+0xc>
- 08013284 <std>:
- 8013284: 2300 movs r3, #0
- 8013286: b510 push {r4, lr}
- 8013288: 4604 mov r4, r0
- 801328a: e9c0 3300 strd r3, r3, [r0]
- 801328e: e9c0 3304 strd r3, r3, [r0, #16]
- 8013292: 6083 str r3, [r0, #8]
- 8013294: 8181 strh r1, [r0, #12]
- 8013296: 6643 str r3, [r0, #100] @ 0x64
- 8013298: 81c2 strh r2, [r0, #14]
- 801329a: 6183 str r3, [r0, #24]
- 801329c: 4619 mov r1, r3
- 801329e: 2208 movs r2, #8
- 80132a0: 305c adds r0, #92 @ 0x5c
- 80132a2: f000 fa09 bl 80136b8 <memset>
- 80132a6: 4b0d ldr r3, [pc, #52] @ (80132dc <std+0x58>)
- 80132a8: 6263 str r3, [r4, #36] @ 0x24
- 80132aa: 4b0d ldr r3, [pc, #52] @ (80132e0 <std+0x5c>)
- 80132ac: 62a3 str r3, [r4, #40] @ 0x28
- 80132ae: 4b0d ldr r3, [pc, #52] @ (80132e4 <std+0x60>)
- 80132b0: 62e3 str r3, [r4, #44] @ 0x2c
- 80132b2: 4b0d ldr r3, [pc, #52] @ (80132e8 <std+0x64>)
- 80132b4: 6323 str r3, [r4, #48] @ 0x30
- 80132b6: 4b0d ldr r3, [pc, #52] @ (80132ec <std+0x68>)
- 80132b8: 6224 str r4, [r4, #32]
- 80132ba: 429c cmp r4, r3
- 80132bc: d006 beq.n 80132cc <std+0x48>
- 80132be: f103 0268 add.w r2, r3, #104 @ 0x68
- 80132c2: 4294 cmp r4, r2
- 80132c4: d002 beq.n 80132cc <std+0x48>
- 80132c6: 33d0 adds r3, #208 @ 0xd0
- 80132c8: 429c cmp r4, r3
- 80132ca: d105 bne.n 80132d8 <std+0x54>
- 80132cc: f104 0058 add.w r0, r4, #88 @ 0x58
- 80132d0: e8bd 4010 ldmia.w sp!, {r4, lr}
- 80132d4: f000 baca b.w 801386c <__retarget_lock_init_recursive>
- 80132d8: bd10 pop {r4, pc}
- 80132da: bf00 nop
- 80132dc: 080134e9 .word 0x080134e9
- 80132e0: 0801350b .word 0x0801350b
- 80132e4: 08013543 .word 0x08013543
- 80132e8: 08013567 .word 0x08013567
- 80132ec: 24019c50 .word 0x24019c50
- 080132f0 <stdio_exit_handler>:
- 80132f0: 4a02 ldr r2, [pc, #8] @ (80132fc <stdio_exit_handler+0xc>)
- 80132f2: 4903 ldr r1, [pc, #12] @ (8013300 <stdio_exit_handler+0x10>)
- 80132f4: 4803 ldr r0, [pc, #12] @ (8013304 <stdio_exit_handler+0x14>)
- 80132f6: f000 b869 b.w 80133cc <_fwalk_sglue>
- 80132fa: bf00 nop
- 80132fc: 24000030 .word 0x24000030
- 8013300: 08013235 .word 0x08013235
- 8013304: 24000040 .word 0x24000040
- 08013308 <cleanup_stdio>:
- 8013308: 6841 ldr r1, [r0, #4]
- 801330a: 4b0c ldr r3, [pc, #48] @ (801333c <cleanup_stdio+0x34>)
- 801330c: 4299 cmp r1, r3
- 801330e: b510 push {r4, lr}
- 8013310: 4604 mov r4, r0
- 8013312: d001 beq.n 8013318 <cleanup_stdio+0x10>
- 8013314: f7ff ff8e bl 8013234 <_fflush_r>
- 8013318: 68a1 ldr r1, [r4, #8]
- 801331a: 4b09 ldr r3, [pc, #36] @ (8013340 <cleanup_stdio+0x38>)
- 801331c: 4299 cmp r1, r3
- 801331e: d002 beq.n 8013326 <cleanup_stdio+0x1e>
- 8013320: 4620 mov r0, r4
- 8013322: f7ff ff87 bl 8013234 <_fflush_r>
- 8013326: 68e1 ldr r1, [r4, #12]
- 8013328: 4b06 ldr r3, [pc, #24] @ (8013344 <cleanup_stdio+0x3c>)
- 801332a: 4299 cmp r1, r3
- 801332c: d004 beq.n 8013338 <cleanup_stdio+0x30>
- 801332e: 4620 mov r0, r4
- 8013330: e8bd 4010 ldmia.w sp!, {r4, lr}
- 8013334: f7ff bf7e b.w 8013234 <_fflush_r>
- 8013338: bd10 pop {r4, pc}
- 801333a: bf00 nop
- 801333c: 24019c50 .word 0x24019c50
- 8013340: 24019cb8 .word 0x24019cb8
- 8013344: 24019d20 .word 0x24019d20
- 08013348 <global_stdio_init.part.0>:
- 8013348: b510 push {r4, lr}
- 801334a: 4b0b ldr r3, [pc, #44] @ (8013378 <global_stdio_init.part.0+0x30>)
- 801334c: 4c0b ldr r4, [pc, #44] @ (801337c <global_stdio_init.part.0+0x34>)
- 801334e: 4a0c ldr r2, [pc, #48] @ (8013380 <global_stdio_init.part.0+0x38>)
- 8013350: 601a str r2, [r3, #0]
- 8013352: 4620 mov r0, r4
- 8013354: 2200 movs r2, #0
- 8013356: 2104 movs r1, #4
- 8013358: f7ff ff94 bl 8013284 <std>
- 801335c: f104 0068 add.w r0, r4, #104 @ 0x68
- 8013360: 2201 movs r2, #1
- 8013362: 2109 movs r1, #9
- 8013364: f7ff ff8e bl 8013284 <std>
- 8013368: f104 00d0 add.w r0, r4, #208 @ 0xd0
- 801336c: 2202 movs r2, #2
- 801336e: e8bd 4010 ldmia.w sp!, {r4, lr}
- 8013372: 2112 movs r1, #18
- 8013374: f7ff bf86 b.w 8013284 <std>
- 8013378: 24019d88 .word 0x24019d88
- 801337c: 24019c50 .word 0x24019c50
- 8013380: 080132f1 .word 0x080132f1
- 08013384 <__sfp_lock_acquire>:
- 8013384: 4801 ldr r0, [pc, #4] @ (801338c <__sfp_lock_acquire+0x8>)
- 8013386: f000 ba72 b.w 801386e <__retarget_lock_acquire_recursive>
- 801338a: bf00 nop
- 801338c: 24019d91 .word 0x24019d91
- 08013390 <__sfp_lock_release>:
- 8013390: 4801 ldr r0, [pc, #4] @ (8013398 <__sfp_lock_release+0x8>)
- 8013392: f000 ba6d b.w 8013870 <__retarget_lock_release_recursive>
- 8013396: bf00 nop
- 8013398: 24019d91 .word 0x24019d91
- 0801339c <__sinit>:
- 801339c: b510 push {r4, lr}
- 801339e: 4604 mov r4, r0
- 80133a0: f7ff fff0 bl 8013384 <__sfp_lock_acquire>
- 80133a4: 6a23 ldr r3, [r4, #32]
- 80133a6: b11b cbz r3, 80133b0 <__sinit+0x14>
- 80133a8: e8bd 4010 ldmia.w sp!, {r4, lr}
- 80133ac: f7ff bff0 b.w 8013390 <__sfp_lock_release>
- 80133b0: 4b04 ldr r3, [pc, #16] @ (80133c4 <__sinit+0x28>)
- 80133b2: 6223 str r3, [r4, #32]
- 80133b4: 4b04 ldr r3, [pc, #16] @ (80133c8 <__sinit+0x2c>)
- 80133b6: 681b ldr r3, [r3, #0]
- 80133b8: 2b00 cmp r3, #0
- 80133ba: d1f5 bne.n 80133a8 <__sinit+0xc>
- 80133bc: f7ff ffc4 bl 8013348 <global_stdio_init.part.0>
- 80133c0: e7f2 b.n 80133a8 <__sinit+0xc>
- 80133c2: bf00 nop
- 80133c4: 08013309 .word 0x08013309
- 80133c8: 24019d88 .word 0x24019d88
- 080133cc <_fwalk_sglue>:
- 80133cc: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
- 80133d0: 4607 mov r7, r0
- 80133d2: 4688 mov r8, r1
- 80133d4: 4614 mov r4, r2
- 80133d6: 2600 movs r6, #0
- 80133d8: e9d4 9501 ldrd r9, r5, [r4, #4]
- 80133dc: f1b9 0901 subs.w r9, r9, #1
- 80133e0: d505 bpl.n 80133ee <_fwalk_sglue+0x22>
- 80133e2: 6824 ldr r4, [r4, #0]
- 80133e4: 2c00 cmp r4, #0
- 80133e6: d1f7 bne.n 80133d8 <_fwalk_sglue+0xc>
- 80133e8: 4630 mov r0, r6
- 80133ea: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
- 80133ee: 89ab ldrh r3, [r5, #12]
- 80133f0: 2b01 cmp r3, #1
- 80133f2: d907 bls.n 8013404 <_fwalk_sglue+0x38>
- 80133f4: f9b5 300e ldrsh.w r3, [r5, #14]
- 80133f8: 3301 adds r3, #1
- 80133fa: d003 beq.n 8013404 <_fwalk_sglue+0x38>
- 80133fc: 4629 mov r1, r5
- 80133fe: 4638 mov r0, r7
- 8013400: 47c0 blx r8
- 8013402: 4306 orrs r6, r0
- 8013404: 3568 adds r5, #104 @ 0x68
- 8013406: e7e9 b.n 80133dc <_fwalk_sglue+0x10>
- 08013408 <iprintf>:
- 8013408: b40f push {r0, r1, r2, r3}
- 801340a: b507 push {r0, r1, r2, lr}
- 801340c: 4906 ldr r1, [pc, #24] @ (8013428 <iprintf+0x20>)
- 801340e: ab04 add r3, sp, #16
- 8013410: 6808 ldr r0, [r1, #0]
- 8013412: f853 2b04 ldr.w r2, [r3], #4
- 8013416: 6881 ldr r1, [r0, #8]
- 8013418: 9301 str r3, [sp, #4]
- 801341a: f000 fb89 bl 8013b30 <_vfiprintf_r>
- 801341e: b003 add sp, #12
- 8013420: f85d eb04 ldr.w lr, [sp], #4
- 8013424: b004 add sp, #16
- 8013426: 4770 bx lr
- 8013428: 2400003c .word 0x2400003c
- 0801342c <_puts_r>:
- 801342c: 6a03 ldr r3, [r0, #32]
- 801342e: b570 push {r4, r5, r6, lr}
- 8013430: 6884 ldr r4, [r0, #8]
- 8013432: 4605 mov r5, r0
- 8013434: 460e mov r6, r1
- 8013436: b90b cbnz r3, 801343c <_puts_r+0x10>
- 8013438: f7ff ffb0 bl 801339c <__sinit>
- 801343c: 6e63 ldr r3, [r4, #100] @ 0x64
- 801343e: 07db lsls r3, r3, #31
- 8013440: d405 bmi.n 801344e <_puts_r+0x22>
- 8013442: 89a3 ldrh r3, [r4, #12]
- 8013444: 0598 lsls r0, r3, #22
- 8013446: d402 bmi.n 801344e <_puts_r+0x22>
- 8013448: 6da0 ldr r0, [r4, #88] @ 0x58
- 801344a: f000 fa10 bl 801386e <__retarget_lock_acquire_recursive>
- 801344e: 89a3 ldrh r3, [r4, #12]
- 8013450: 0719 lsls r1, r3, #28
- 8013452: d502 bpl.n 801345a <_puts_r+0x2e>
- 8013454: 6923 ldr r3, [r4, #16]
- 8013456: 2b00 cmp r3, #0
- 8013458: d135 bne.n 80134c6 <_puts_r+0x9a>
- 801345a: 4621 mov r1, r4
- 801345c: 4628 mov r0, r5
- 801345e: f000 f8c5 bl 80135ec <__swsetup_r>
- 8013462: b380 cbz r0, 80134c6 <_puts_r+0x9a>
- 8013464: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
- 8013468: 6e63 ldr r3, [r4, #100] @ 0x64
- 801346a: 07da lsls r2, r3, #31
- 801346c: d405 bmi.n 801347a <_puts_r+0x4e>
- 801346e: 89a3 ldrh r3, [r4, #12]
- 8013470: 059b lsls r3, r3, #22
- 8013472: d402 bmi.n 801347a <_puts_r+0x4e>
- 8013474: 6da0 ldr r0, [r4, #88] @ 0x58
- 8013476: f000 f9fb bl 8013870 <__retarget_lock_release_recursive>
- 801347a: 4628 mov r0, r5
- 801347c: bd70 pop {r4, r5, r6, pc}
- 801347e: 2b00 cmp r3, #0
- 8013480: da04 bge.n 801348c <_puts_r+0x60>
- 8013482: 69a2 ldr r2, [r4, #24]
- 8013484: 429a cmp r2, r3
- 8013486: dc17 bgt.n 80134b8 <_puts_r+0x8c>
- 8013488: 290a cmp r1, #10
- 801348a: d015 beq.n 80134b8 <_puts_r+0x8c>
- 801348c: 6823 ldr r3, [r4, #0]
- 801348e: 1c5a adds r2, r3, #1
- 8013490: 6022 str r2, [r4, #0]
- 8013492: 7019 strb r1, [r3, #0]
- 8013494: 68a3 ldr r3, [r4, #8]
- 8013496: f816 1f01 ldrb.w r1, [r6, #1]!
- 801349a: 3b01 subs r3, #1
- 801349c: 60a3 str r3, [r4, #8]
- 801349e: 2900 cmp r1, #0
- 80134a0: d1ed bne.n 801347e <_puts_r+0x52>
- 80134a2: 2b00 cmp r3, #0
- 80134a4: da11 bge.n 80134ca <_puts_r+0x9e>
- 80134a6: 4622 mov r2, r4
- 80134a8: 210a movs r1, #10
- 80134aa: 4628 mov r0, r5
- 80134ac: f000 f85f bl 801356e <__swbuf_r>
- 80134b0: 3001 adds r0, #1
- 80134b2: d0d7 beq.n 8013464 <_puts_r+0x38>
- 80134b4: 250a movs r5, #10
- 80134b6: e7d7 b.n 8013468 <_puts_r+0x3c>
- 80134b8: 4622 mov r2, r4
- 80134ba: 4628 mov r0, r5
- 80134bc: f000 f857 bl 801356e <__swbuf_r>
- 80134c0: 3001 adds r0, #1
- 80134c2: d1e7 bne.n 8013494 <_puts_r+0x68>
- 80134c4: e7ce b.n 8013464 <_puts_r+0x38>
- 80134c6: 3e01 subs r6, #1
- 80134c8: e7e4 b.n 8013494 <_puts_r+0x68>
- 80134ca: 6823 ldr r3, [r4, #0]
- 80134cc: 1c5a adds r2, r3, #1
- 80134ce: 6022 str r2, [r4, #0]
- 80134d0: 220a movs r2, #10
- 80134d2: 701a strb r2, [r3, #0]
- 80134d4: e7ee b.n 80134b4 <_puts_r+0x88>
- ...
- 080134d8 <puts>:
- 80134d8: 4b02 ldr r3, [pc, #8] @ (80134e4 <puts+0xc>)
- 80134da: 4601 mov r1, r0
- 80134dc: 6818 ldr r0, [r3, #0]
- 80134de: f7ff bfa5 b.w 801342c <_puts_r>
- 80134e2: bf00 nop
- 80134e4: 2400003c .word 0x2400003c
- 080134e8 <__sread>:
- 80134e8: b510 push {r4, lr}
- 80134ea: 460c mov r4, r1
- 80134ec: f9b1 100e ldrsh.w r1, [r1, #14]
- 80134f0: f000 f974 bl 80137dc <_read_r>
- 80134f4: 2800 cmp r0, #0
- 80134f6: bfab itete ge
- 80134f8: 6d63 ldrge r3, [r4, #84] @ 0x54
- 80134fa: 89a3 ldrhlt r3, [r4, #12]
- 80134fc: 181b addge r3, r3, r0
- 80134fe: f423 5380 biclt.w r3, r3, #4096 @ 0x1000
- 8013502: bfac ite ge
- 8013504: 6563 strge r3, [r4, #84] @ 0x54
- 8013506: 81a3 strhlt r3, [r4, #12]
- 8013508: bd10 pop {r4, pc}
- 0801350a <__swrite>:
- 801350a: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
- 801350e: 461f mov r7, r3
- 8013510: 898b ldrh r3, [r1, #12]
- 8013512: 05db lsls r3, r3, #23
- 8013514: 4605 mov r5, r0
- 8013516: 460c mov r4, r1
- 8013518: 4616 mov r6, r2
- 801351a: d505 bpl.n 8013528 <__swrite+0x1e>
- 801351c: f9b1 100e ldrsh.w r1, [r1, #14]
- 8013520: 2302 movs r3, #2
- 8013522: 2200 movs r2, #0
- 8013524: f000 f948 bl 80137b8 <_lseek_r>
- 8013528: 89a3 ldrh r3, [r4, #12]
- 801352a: f9b4 100e ldrsh.w r1, [r4, #14]
- 801352e: f423 5380 bic.w r3, r3, #4096 @ 0x1000
- 8013532: 81a3 strh r3, [r4, #12]
- 8013534: 4632 mov r2, r6
- 8013536: 463b mov r3, r7
- 8013538: 4628 mov r0, r5
- 801353a: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr}
- 801353e: f000 b95f b.w 8013800 <_write_r>
- 08013542 <__sseek>:
- 8013542: b510 push {r4, lr}
- 8013544: 460c mov r4, r1
- 8013546: f9b1 100e ldrsh.w r1, [r1, #14]
- 801354a: f000 f935 bl 80137b8 <_lseek_r>
- 801354e: 1c43 adds r3, r0, #1
- 8013550: 89a3 ldrh r3, [r4, #12]
- 8013552: bf15 itete ne
- 8013554: 6560 strne r0, [r4, #84] @ 0x54
- 8013556: f423 5380 biceq.w r3, r3, #4096 @ 0x1000
- 801355a: f443 5380 orrne.w r3, r3, #4096 @ 0x1000
- 801355e: 81a3 strheq r3, [r4, #12]
- 8013560: bf18 it ne
- 8013562: 81a3 strhne r3, [r4, #12]
- 8013564: bd10 pop {r4, pc}
- 08013566 <__sclose>:
- 8013566: f9b1 100e ldrsh.w r1, [r1, #14]
- 801356a: f000 b8bf b.w 80136ec <_close_r>
- 0801356e <__swbuf_r>:
- 801356e: b5f8 push {r3, r4, r5, r6, r7, lr}
- 8013570: 460e mov r6, r1
- 8013572: 4614 mov r4, r2
- 8013574: 4605 mov r5, r0
- 8013576: b118 cbz r0, 8013580 <__swbuf_r+0x12>
- 8013578: 6a03 ldr r3, [r0, #32]
- 801357a: b90b cbnz r3, 8013580 <__swbuf_r+0x12>
- 801357c: f7ff ff0e bl 801339c <__sinit>
- 8013580: 69a3 ldr r3, [r4, #24]
- 8013582: 60a3 str r3, [r4, #8]
- 8013584: 89a3 ldrh r3, [r4, #12]
- 8013586: 071a lsls r2, r3, #28
- 8013588: d501 bpl.n 801358e <__swbuf_r+0x20>
- 801358a: 6923 ldr r3, [r4, #16]
- 801358c: b943 cbnz r3, 80135a0 <__swbuf_r+0x32>
- 801358e: 4621 mov r1, r4
- 8013590: 4628 mov r0, r5
- 8013592: f000 f82b bl 80135ec <__swsetup_r>
- 8013596: b118 cbz r0, 80135a0 <__swbuf_r+0x32>
- 8013598: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff
- 801359c: 4638 mov r0, r7
- 801359e: bdf8 pop {r3, r4, r5, r6, r7, pc}
- 80135a0: 6823 ldr r3, [r4, #0]
- 80135a2: 6922 ldr r2, [r4, #16]
- 80135a4: 1a98 subs r0, r3, r2
- 80135a6: 6963 ldr r3, [r4, #20]
- 80135a8: b2f6 uxtb r6, r6
- 80135aa: 4283 cmp r3, r0
- 80135ac: 4637 mov r7, r6
- 80135ae: dc05 bgt.n 80135bc <__swbuf_r+0x4e>
- 80135b0: 4621 mov r1, r4
- 80135b2: 4628 mov r0, r5
- 80135b4: f7ff fe3e bl 8013234 <_fflush_r>
- 80135b8: 2800 cmp r0, #0
- 80135ba: d1ed bne.n 8013598 <__swbuf_r+0x2a>
- 80135bc: 68a3 ldr r3, [r4, #8]
- 80135be: 3b01 subs r3, #1
- 80135c0: 60a3 str r3, [r4, #8]
- 80135c2: 6823 ldr r3, [r4, #0]
- 80135c4: 1c5a adds r2, r3, #1
- 80135c6: 6022 str r2, [r4, #0]
- 80135c8: 701e strb r6, [r3, #0]
- 80135ca: 6962 ldr r2, [r4, #20]
- 80135cc: 1c43 adds r3, r0, #1
- 80135ce: 429a cmp r2, r3
- 80135d0: d004 beq.n 80135dc <__swbuf_r+0x6e>
- 80135d2: 89a3 ldrh r3, [r4, #12]
- 80135d4: 07db lsls r3, r3, #31
- 80135d6: d5e1 bpl.n 801359c <__swbuf_r+0x2e>
- 80135d8: 2e0a cmp r6, #10
- 80135da: d1df bne.n 801359c <__swbuf_r+0x2e>
- 80135dc: 4621 mov r1, r4
- 80135de: 4628 mov r0, r5
- 80135e0: f7ff fe28 bl 8013234 <_fflush_r>
- 80135e4: 2800 cmp r0, #0
- 80135e6: d0d9 beq.n 801359c <__swbuf_r+0x2e>
- 80135e8: e7d6 b.n 8013598 <__swbuf_r+0x2a>
- ...
- 080135ec <__swsetup_r>:
- 80135ec: b538 push {r3, r4, r5, lr}
- 80135ee: 4b29 ldr r3, [pc, #164] @ (8013694 <__swsetup_r+0xa8>)
- 80135f0: 4605 mov r5, r0
- 80135f2: 6818 ldr r0, [r3, #0]
- 80135f4: 460c mov r4, r1
- 80135f6: b118 cbz r0, 8013600 <__swsetup_r+0x14>
- 80135f8: 6a03 ldr r3, [r0, #32]
- 80135fa: b90b cbnz r3, 8013600 <__swsetup_r+0x14>
- 80135fc: f7ff fece bl 801339c <__sinit>
- 8013600: f9b4 300c ldrsh.w r3, [r4, #12]
- 8013604: 0719 lsls r1, r3, #28
- 8013606: d422 bmi.n 801364e <__swsetup_r+0x62>
- 8013608: 06da lsls r2, r3, #27
- 801360a: d407 bmi.n 801361c <__swsetup_r+0x30>
- 801360c: 2209 movs r2, #9
- 801360e: 602a str r2, [r5, #0]
- 8013610: f043 0340 orr.w r3, r3, #64 @ 0x40
- 8013614: 81a3 strh r3, [r4, #12]
- 8013616: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 801361a: e033 b.n 8013684 <__swsetup_r+0x98>
- 801361c: 0758 lsls r0, r3, #29
- 801361e: d512 bpl.n 8013646 <__swsetup_r+0x5a>
- 8013620: 6b61 ldr r1, [r4, #52] @ 0x34
- 8013622: b141 cbz r1, 8013636 <__swsetup_r+0x4a>
- 8013624: f104 0344 add.w r3, r4, #68 @ 0x44
- 8013628: 4299 cmp r1, r3
- 801362a: d002 beq.n 8013632 <__swsetup_r+0x46>
- 801362c: 4628 mov r0, r5
- 801362e: f000 f955 bl 80138dc <_free_r>
- 8013632: 2300 movs r3, #0
- 8013634: 6363 str r3, [r4, #52] @ 0x34
- 8013636: 89a3 ldrh r3, [r4, #12]
- 8013638: f023 0324 bic.w r3, r3, #36 @ 0x24
- 801363c: 81a3 strh r3, [r4, #12]
- 801363e: 2300 movs r3, #0
- 8013640: 6063 str r3, [r4, #4]
- 8013642: 6923 ldr r3, [r4, #16]
- 8013644: 6023 str r3, [r4, #0]
- 8013646: 89a3 ldrh r3, [r4, #12]
- 8013648: f043 0308 orr.w r3, r3, #8
- 801364c: 81a3 strh r3, [r4, #12]
- 801364e: 6923 ldr r3, [r4, #16]
- 8013650: b94b cbnz r3, 8013666 <__swsetup_r+0x7a>
- 8013652: 89a3 ldrh r3, [r4, #12]
- 8013654: f403 7320 and.w r3, r3, #640 @ 0x280
- 8013658: f5b3 7f00 cmp.w r3, #512 @ 0x200
- 801365c: d003 beq.n 8013666 <__swsetup_r+0x7a>
- 801365e: 4621 mov r1, r4
- 8013660: 4628 mov r0, r5
- 8013662: f000 fd43 bl 80140ec <__smakebuf_r>
- 8013666: f9b4 300c ldrsh.w r3, [r4, #12]
- 801366a: f013 0201 ands.w r2, r3, #1
- 801366e: d00a beq.n 8013686 <__swsetup_r+0x9a>
- 8013670: 2200 movs r2, #0
- 8013672: 60a2 str r2, [r4, #8]
- 8013674: 6962 ldr r2, [r4, #20]
- 8013676: 4252 negs r2, r2
- 8013678: 61a2 str r2, [r4, #24]
- 801367a: 6922 ldr r2, [r4, #16]
- 801367c: b942 cbnz r2, 8013690 <__swsetup_r+0xa4>
- 801367e: f013 0080 ands.w r0, r3, #128 @ 0x80
- 8013682: d1c5 bne.n 8013610 <__swsetup_r+0x24>
- 8013684: bd38 pop {r3, r4, r5, pc}
- 8013686: 0799 lsls r1, r3, #30
- 8013688: bf58 it pl
- 801368a: 6962 ldrpl r2, [r4, #20]
- 801368c: 60a2 str r2, [r4, #8]
- 801368e: e7f4 b.n 801367a <__swsetup_r+0x8e>
- 8013690: 2000 movs r0, #0
- 8013692: e7f7 b.n 8013684 <__swsetup_r+0x98>
- 8013694: 2400003c .word 0x2400003c
- 08013698 <memcmp>:
- 8013698: b510 push {r4, lr}
- 801369a: 3901 subs r1, #1
- 801369c: 4402 add r2, r0
- 801369e: 4290 cmp r0, r2
- 80136a0: d101 bne.n 80136a6 <memcmp+0xe>
- 80136a2: 2000 movs r0, #0
- 80136a4: e005 b.n 80136b2 <memcmp+0x1a>
- 80136a6: 7803 ldrb r3, [r0, #0]
- 80136a8: f811 4f01 ldrb.w r4, [r1, #1]!
- 80136ac: 42a3 cmp r3, r4
- 80136ae: d001 beq.n 80136b4 <memcmp+0x1c>
- 80136b0: 1b18 subs r0, r3, r4
- 80136b2: bd10 pop {r4, pc}
- 80136b4: 3001 adds r0, #1
- 80136b6: e7f2 b.n 801369e <memcmp+0x6>
- 080136b8 <memset>:
- 80136b8: 4402 add r2, r0
- 80136ba: 4603 mov r3, r0
- 80136bc: 4293 cmp r3, r2
- 80136be: d100 bne.n 80136c2 <memset+0xa>
- 80136c0: 4770 bx lr
- 80136c2: f803 1b01 strb.w r1, [r3], #1
- 80136c6: e7f9 b.n 80136bc <memset+0x4>
- 080136c8 <strncmp>:
- 80136c8: b510 push {r4, lr}
- 80136ca: b16a cbz r2, 80136e8 <strncmp+0x20>
- 80136cc: 3901 subs r1, #1
- 80136ce: 1884 adds r4, r0, r2
- 80136d0: f810 2b01 ldrb.w r2, [r0], #1
- 80136d4: f811 3f01 ldrb.w r3, [r1, #1]!
- 80136d8: 429a cmp r2, r3
- 80136da: d103 bne.n 80136e4 <strncmp+0x1c>
- 80136dc: 42a0 cmp r0, r4
- 80136de: d001 beq.n 80136e4 <strncmp+0x1c>
- 80136e0: 2a00 cmp r2, #0
- 80136e2: d1f5 bne.n 80136d0 <strncmp+0x8>
- 80136e4: 1ad0 subs r0, r2, r3
- 80136e6: bd10 pop {r4, pc}
- 80136e8: 4610 mov r0, r2
- 80136ea: e7fc b.n 80136e6 <strncmp+0x1e>
- 080136ec <_close_r>:
- 80136ec: b538 push {r3, r4, r5, lr}
- 80136ee: 4d06 ldr r5, [pc, #24] @ (8013708 <_close_r+0x1c>)
- 80136f0: 2300 movs r3, #0
- 80136f2: 4604 mov r4, r0
- 80136f4: 4608 mov r0, r1
- 80136f6: 602b str r3, [r5, #0]
- 80136f8: f7ed fa4a bl 8000b90 <_close>
- 80136fc: 1c43 adds r3, r0, #1
- 80136fe: d102 bne.n 8013706 <_close_r+0x1a>
- 8013700: 682b ldr r3, [r5, #0]
- 8013702: b103 cbz r3, 8013706 <_close_r+0x1a>
- 8013704: 6023 str r3, [r4, #0]
- 8013706: bd38 pop {r3, r4, r5, pc}
- 8013708: 24019d8c .word 0x24019d8c
- 0801370c <_reclaim_reent>:
- 801370c: 4b29 ldr r3, [pc, #164] @ (80137b4 <_reclaim_reent+0xa8>)
- 801370e: 681b ldr r3, [r3, #0]
- 8013710: 4283 cmp r3, r0
- 8013712: b570 push {r4, r5, r6, lr}
- 8013714: 4604 mov r4, r0
- 8013716: d04b beq.n 80137b0 <_reclaim_reent+0xa4>
- 8013718: 69c3 ldr r3, [r0, #28]
- 801371a: b1ab cbz r3, 8013748 <_reclaim_reent+0x3c>
- 801371c: 68db ldr r3, [r3, #12]
- 801371e: b16b cbz r3, 801373c <_reclaim_reent+0x30>
- 8013720: 2500 movs r5, #0
- 8013722: 69e3 ldr r3, [r4, #28]
- 8013724: 68db ldr r3, [r3, #12]
- 8013726: 5959 ldr r1, [r3, r5]
- 8013728: 2900 cmp r1, #0
- 801372a: d13b bne.n 80137a4 <_reclaim_reent+0x98>
- 801372c: 3504 adds r5, #4
- 801372e: 2d80 cmp r5, #128 @ 0x80
- 8013730: d1f7 bne.n 8013722 <_reclaim_reent+0x16>
- 8013732: 69e3 ldr r3, [r4, #28]
- 8013734: 4620 mov r0, r4
- 8013736: 68d9 ldr r1, [r3, #12]
- 8013738: f000 f8d0 bl 80138dc <_free_r>
- 801373c: 69e3 ldr r3, [r4, #28]
- 801373e: 6819 ldr r1, [r3, #0]
- 8013740: b111 cbz r1, 8013748 <_reclaim_reent+0x3c>
- 8013742: 4620 mov r0, r4
- 8013744: f000 f8ca bl 80138dc <_free_r>
- 8013748: 6961 ldr r1, [r4, #20]
- 801374a: b111 cbz r1, 8013752 <_reclaim_reent+0x46>
- 801374c: 4620 mov r0, r4
- 801374e: f000 f8c5 bl 80138dc <_free_r>
- 8013752: 69e1 ldr r1, [r4, #28]
- 8013754: b111 cbz r1, 801375c <_reclaim_reent+0x50>
- 8013756: 4620 mov r0, r4
- 8013758: f000 f8c0 bl 80138dc <_free_r>
- 801375c: 6b21 ldr r1, [r4, #48] @ 0x30
- 801375e: b111 cbz r1, 8013766 <_reclaim_reent+0x5a>
- 8013760: 4620 mov r0, r4
- 8013762: f000 f8bb bl 80138dc <_free_r>
- 8013766: 6b61 ldr r1, [r4, #52] @ 0x34
- 8013768: b111 cbz r1, 8013770 <_reclaim_reent+0x64>
- 801376a: 4620 mov r0, r4
- 801376c: f000 f8b6 bl 80138dc <_free_r>
- 8013770: 6ba1 ldr r1, [r4, #56] @ 0x38
- 8013772: b111 cbz r1, 801377a <_reclaim_reent+0x6e>
- 8013774: 4620 mov r0, r4
- 8013776: f000 f8b1 bl 80138dc <_free_r>
- 801377a: 6ca1 ldr r1, [r4, #72] @ 0x48
- 801377c: b111 cbz r1, 8013784 <_reclaim_reent+0x78>
- 801377e: 4620 mov r0, r4
- 8013780: f000 f8ac bl 80138dc <_free_r>
- 8013784: 6c61 ldr r1, [r4, #68] @ 0x44
- 8013786: b111 cbz r1, 801378e <_reclaim_reent+0x82>
- 8013788: 4620 mov r0, r4
- 801378a: f000 f8a7 bl 80138dc <_free_r>
- 801378e: 6ae1 ldr r1, [r4, #44] @ 0x2c
- 8013790: b111 cbz r1, 8013798 <_reclaim_reent+0x8c>
- 8013792: 4620 mov r0, r4
- 8013794: f000 f8a2 bl 80138dc <_free_r>
- 8013798: 6a23 ldr r3, [r4, #32]
- 801379a: b14b cbz r3, 80137b0 <_reclaim_reent+0xa4>
- 801379c: 4620 mov r0, r4
- 801379e: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr}
- 80137a2: 4718 bx r3
- 80137a4: 680e ldr r6, [r1, #0]
- 80137a6: 4620 mov r0, r4
- 80137a8: f000 f898 bl 80138dc <_free_r>
- 80137ac: 4631 mov r1, r6
- 80137ae: e7bb b.n 8013728 <_reclaim_reent+0x1c>
- 80137b0: bd70 pop {r4, r5, r6, pc}
- 80137b2: bf00 nop
- 80137b4: 2400003c .word 0x2400003c
- 080137b8 <_lseek_r>:
- 80137b8: b538 push {r3, r4, r5, lr}
- 80137ba: 4d07 ldr r5, [pc, #28] @ (80137d8 <_lseek_r+0x20>)
- 80137bc: 4604 mov r4, r0
- 80137be: 4608 mov r0, r1
- 80137c0: 4611 mov r1, r2
- 80137c2: 2200 movs r2, #0
- 80137c4: 602a str r2, [r5, #0]
- 80137c6: 461a mov r2, r3
- 80137c8: f7ed f9ec bl 8000ba4 <_lseek>
- 80137cc: 1c43 adds r3, r0, #1
- 80137ce: d102 bne.n 80137d6 <_lseek_r+0x1e>
- 80137d0: 682b ldr r3, [r5, #0]
- 80137d2: b103 cbz r3, 80137d6 <_lseek_r+0x1e>
- 80137d4: 6023 str r3, [r4, #0]
- 80137d6: bd38 pop {r3, r4, r5, pc}
- 80137d8: 24019d8c .word 0x24019d8c
- 080137dc <_read_r>:
- 80137dc: b538 push {r3, r4, r5, lr}
- 80137de: 4d07 ldr r5, [pc, #28] @ (80137fc <_read_r+0x20>)
- 80137e0: 4604 mov r4, r0
- 80137e2: 4608 mov r0, r1
- 80137e4: 4611 mov r1, r2
- 80137e6: 2200 movs r2, #0
- 80137e8: 602a str r2, [r5, #0]
- 80137ea: 461a mov r2, r3
- 80137ec: f7ed f9b2 bl 8000b54 <_read>
- 80137f0: 1c43 adds r3, r0, #1
- 80137f2: d102 bne.n 80137fa <_read_r+0x1e>
- 80137f4: 682b ldr r3, [r5, #0]
- 80137f6: b103 cbz r3, 80137fa <_read_r+0x1e>
- 80137f8: 6023 str r3, [r4, #0]
- 80137fa: bd38 pop {r3, r4, r5, pc}
- 80137fc: 24019d8c .word 0x24019d8c
- 08013800 <_write_r>:
- 8013800: b538 push {r3, r4, r5, lr}
- 8013802: 4d07 ldr r5, [pc, #28] @ (8013820 <_write_r+0x20>)
- 8013804: 4604 mov r4, r0
- 8013806: 4608 mov r0, r1
- 8013808: 4611 mov r1, r2
- 801380a: 2200 movs r2, #0
- 801380c: 602a str r2, [r5, #0]
- 801380e: 461a mov r2, r3
- 8013810: f7ed f9b0 bl 8000b74 <_write>
- 8013814: 1c43 adds r3, r0, #1
- 8013816: d102 bne.n 801381e <_write_r+0x1e>
- 8013818: 682b ldr r3, [r5, #0]
- 801381a: b103 cbz r3, 801381e <_write_r+0x1e>
- 801381c: 6023 str r3, [r4, #0]
- 801381e: bd38 pop {r3, r4, r5, pc}
- 8013820: 24019d8c .word 0x24019d8c
- 08013824 <__libc_init_array>:
- 8013824: b570 push {r4, r5, r6, lr}
- 8013826: 4d0d ldr r5, [pc, #52] @ (801385c <__libc_init_array+0x38>)
- 8013828: 4c0d ldr r4, [pc, #52] @ (8013860 <__libc_init_array+0x3c>)
- 801382a: 1b64 subs r4, r4, r5
- 801382c: 10a4 asrs r4, r4, #2
- 801382e: 2600 movs r6, #0
- 8013830: 42a6 cmp r6, r4
- 8013832: d109 bne.n 8013848 <__libc_init_array+0x24>
- 8013834: 4d0b ldr r5, [pc, #44] @ (8013864 <__libc_init_array+0x40>)
- 8013836: 4c0c ldr r4, [pc, #48] @ (8013868 <__libc_init_array+0x44>)
- 8013838: f000 fd12 bl 8014260 <_init>
- 801383c: 1b64 subs r4, r4, r5
- 801383e: 10a4 asrs r4, r4, #2
- 8013840: 2600 movs r6, #0
- 8013842: 42a6 cmp r6, r4
- 8013844: d105 bne.n 8013852 <__libc_init_array+0x2e>
- 8013846: bd70 pop {r4, r5, r6, pc}
- 8013848: f855 3b04 ldr.w r3, [r5], #4
- 801384c: 4798 blx r3
- 801384e: 3601 adds r6, #1
- 8013850: e7ee b.n 8013830 <__libc_init_array+0xc>
- 8013852: f855 3b04 ldr.w r3, [r5], #4
- 8013856: 4798 blx r3
- 8013858: 3601 adds r6, #1
- 801385a: e7f2 b.n 8013842 <__libc_init_array+0x1e>
- 801385c: 080180c4 .word 0x080180c4
- 8013860: 080180c4 .word 0x080180c4
- 8013864: 080180c4 .word 0x080180c4
- 8013868: 080180c8 .word 0x080180c8
- 0801386c <__retarget_lock_init_recursive>:
- 801386c: 4770 bx lr
- 0801386e <__retarget_lock_acquire_recursive>:
- 801386e: 4770 bx lr
- 08013870 <__retarget_lock_release_recursive>:
- 8013870: 4770 bx lr
- 08013872 <strcpy>:
- 8013872: 4603 mov r3, r0
- 8013874: f811 2b01 ldrb.w r2, [r1], #1
- 8013878: f803 2b01 strb.w r2, [r3], #1
- 801387c: 2a00 cmp r2, #0
- 801387e: d1f9 bne.n 8013874 <strcpy+0x2>
- 8013880: 4770 bx lr
- 08013882 <memcpy>:
- 8013882: 440a add r2, r1
- 8013884: 4291 cmp r1, r2
- 8013886: f100 33ff add.w r3, r0, #4294967295 @ 0xffffffff
- 801388a: d100 bne.n 801388e <memcpy+0xc>
- 801388c: 4770 bx lr
- 801388e: b510 push {r4, lr}
- 8013890: f811 4b01 ldrb.w r4, [r1], #1
- 8013894: f803 4f01 strb.w r4, [r3, #1]!
- 8013898: 4291 cmp r1, r2
- 801389a: d1f9 bne.n 8013890 <memcpy+0xe>
- 801389c: bd10 pop {r4, pc}
- ...
- 080138a0 <__assert_func>:
- 80138a0: b51f push {r0, r1, r2, r3, r4, lr}
- 80138a2: 4614 mov r4, r2
- 80138a4: 461a mov r2, r3
- 80138a6: 4b09 ldr r3, [pc, #36] @ (80138cc <__assert_func+0x2c>)
- 80138a8: 681b ldr r3, [r3, #0]
- 80138aa: 4605 mov r5, r0
- 80138ac: 68d8 ldr r0, [r3, #12]
- 80138ae: b954 cbnz r4, 80138c6 <__assert_func+0x26>
- 80138b0: 4b07 ldr r3, [pc, #28] @ (80138d0 <__assert_func+0x30>)
- 80138b2: 461c mov r4, r3
- 80138b4: e9cd 3401 strd r3, r4, [sp, #4]
- 80138b8: 9100 str r1, [sp, #0]
- 80138ba: 462b mov r3, r5
- 80138bc: 4905 ldr r1, [pc, #20] @ (80138d4 <__assert_func+0x34>)
- 80138be: f000 fbdd bl 801407c <fiprintf>
- 80138c2: f000 fc81 bl 80141c8 <abort>
- 80138c6: 4b04 ldr r3, [pc, #16] @ (80138d8 <__assert_func+0x38>)
- 80138c8: e7f4 b.n 80138b4 <__assert_func+0x14>
- 80138ca: bf00 nop
- 80138cc: 2400003c .word 0x2400003c
- 80138d0: 08018086 .word 0x08018086
- 80138d4: 08018058 .word 0x08018058
- 80138d8: 0801804b .word 0x0801804b
- 080138dc <_free_r>:
- 80138dc: b538 push {r3, r4, r5, lr}
- 80138de: 4605 mov r5, r0
- 80138e0: 2900 cmp r1, #0
- 80138e2: d041 beq.n 8013968 <_free_r+0x8c>
- 80138e4: f851 3c04 ldr.w r3, [r1, #-4]
- 80138e8: 1f0c subs r4, r1, #4
- 80138ea: 2b00 cmp r3, #0
- 80138ec: bfb8 it lt
- 80138ee: 18e4 addlt r4, r4, r3
- 80138f0: f000 f8e8 bl 8013ac4 <__malloc_lock>
- 80138f4: 4a1d ldr r2, [pc, #116] @ (801396c <_free_r+0x90>)
- 80138f6: 6813 ldr r3, [r2, #0]
- 80138f8: b933 cbnz r3, 8013908 <_free_r+0x2c>
- 80138fa: 6063 str r3, [r4, #4]
- 80138fc: 6014 str r4, [r2, #0]
- 80138fe: 4628 mov r0, r5
- 8013900: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr}
- 8013904: f000 b8e4 b.w 8013ad0 <__malloc_unlock>
- 8013908: 42a3 cmp r3, r4
- 801390a: d908 bls.n 801391e <_free_r+0x42>
- 801390c: 6820 ldr r0, [r4, #0]
- 801390e: 1821 adds r1, r4, r0
- 8013910: 428b cmp r3, r1
- 8013912: bf01 itttt eq
- 8013914: 6819 ldreq r1, [r3, #0]
- 8013916: 685b ldreq r3, [r3, #4]
- 8013918: 1809 addeq r1, r1, r0
- 801391a: 6021 streq r1, [r4, #0]
- 801391c: e7ed b.n 80138fa <_free_r+0x1e>
- 801391e: 461a mov r2, r3
- 8013920: 685b ldr r3, [r3, #4]
- 8013922: b10b cbz r3, 8013928 <_free_r+0x4c>
- 8013924: 42a3 cmp r3, r4
- 8013926: d9fa bls.n 801391e <_free_r+0x42>
- 8013928: 6811 ldr r1, [r2, #0]
- 801392a: 1850 adds r0, r2, r1
- 801392c: 42a0 cmp r0, r4
- 801392e: d10b bne.n 8013948 <_free_r+0x6c>
- 8013930: 6820 ldr r0, [r4, #0]
- 8013932: 4401 add r1, r0
- 8013934: 1850 adds r0, r2, r1
- 8013936: 4283 cmp r3, r0
- 8013938: 6011 str r1, [r2, #0]
- 801393a: d1e0 bne.n 80138fe <_free_r+0x22>
- 801393c: 6818 ldr r0, [r3, #0]
- 801393e: 685b ldr r3, [r3, #4]
- 8013940: 6053 str r3, [r2, #4]
- 8013942: 4408 add r0, r1
- 8013944: 6010 str r0, [r2, #0]
- 8013946: e7da b.n 80138fe <_free_r+0x22>
- 8013948: d902 bls.n 8013950 <_free_r+0x74>
- 801394a: 230c movs r3, #12
- 801394c: 602b str r3, [r5, #0]
- 801394e: e7d6 b.n 80138fe <_free_r+0x22>
- 8013950: 6820 ldr r0, [r4, #0]
- 8013952: 1821 adds r1, r4, r0
- 8013954: 428b cmp r3, r1
- 8013956: bf04 itt eq
- 8013958: 6819 ldreq r1, [r3, #0]
- 801395a: 685b ldreq r3, [r3, #4]
- 801395c: 6063 str r3, [r4, #4]
- 801395e: bf04 itt eq
- 8013960: 1809 addeq r1, r1, r0
- 8013962: 6021 streq r1, [r4, #0]
- 8013964: 6054 str r4, [r2, #4]
- 8013966: e7ca b.n 80138fe <_free_r+0x22>
- 8013968: bd38 pop {r3, r4, r5, pc}
- 801396a: bf00 nop
- 801396c: 24019d98 .word 0x24019d98
- 08013970 <malloc>:
- 8013970: 4b02 ldr r3, [pc, #8] @ (801397c <malloc+0xc>)
- 8013972: 4601 mov r1, r0
- 8013974: 6818 ldr r0, [r3, #0]
- 8013976: f000 b825 b.w 80139c4 <_malloc_r>
- 801397a: bf00 nop
- 801397c: 2400003c .word 0x2400003c
- 08013980 <sbrk_aligned>:
- 8013980: b570 push {r4, r5, r6, lr}
- 8013982: 4e0f ldr r6, [pc, #60] @ (80139c0 <sbrk_aligned+0x40>)
- 8013984: 460c mov r4, r1
- 8013986: 6831 ldr r1, [r6, #0]
- 8013988: 4605 mov r5, r0
- 801398a: b911 cbnz r1, 8013992 <sbrk_aligned+0x12>
- 801398c: f000 fc0c bl 80141a8 <_sbrk_r>
- 8013990: 6030 str r0, [r6, #0]
- 8013992: 4621 mov r1, r4
- 8013994: 4628 mov r0, r5
- 8013996: f000 fc07 bl 80141a8 <_sbrk_r>
- 801399a: 1c43 adds r3, r0, #1
- 801399c: d103 bne.n 80139a6 <sbrk_aligned+0x26>
- 801399e: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
- 80139a2: 4620 mov r0, r4
- 80139a4: bd70 pop {r4, r5, r6, pc}
- 80139a6: 1cc4 adds r4, r0, #3
- 80139a8: f024 0403 bic.w r4, r4, #3
- 80139ac: 42a0 cmp r0, r4
- 80139ae: d0f8 beq.n 80139a2 <sbrk_aligned+0x22>
- 80139b0: 1a21 subs r1, r4, r0
- 80139b2: 4628 mov r0, r5
- 80139b4: f000 fbf8 bl 80141a8 <_sbrk_r>
- 80139b8: 3001 adds r0, #1
- 80139ba: d1f2 bne.n 80139a2 <sbrk_aligned+0x22>
- 80139bc: e7ef b.n 801399e <sbrk_aligned+0x1e>
- 80139be: bf00 nop
- 80139c0: 24019d94 .word 0x24019d94
- 080139c4 <_malloc_r>:
- 80139c4: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
- 80139c8: 1ccd adds r5, r1, #3
- 80139ca: f025 0503 bic.w r5, r5, #3
- 80139ce: 3508 adds r5, #8
- 80139d0: 2d0c cmp r5, #12
- 80139d2: bf38 it cc
- 80139d4: 250c movcc r5, #12
- 80139d6: 2d00 cmp r5, #0
- 80139d8: 4606 mov r6, r0
- 80139da: db01 blt.n 80139e0 <_malloc_r+0x1c>
- 80139dc: 42a9 cmp r1, r5
- 80139de: d904 bls.n 80139ea <_malloc_r+0x26>
- 80139e0: 230c movs r3, #12
- 80139e2: 6033 str r3, [r6, #0]
- 80139e4: 2000 movs r0, #0
- 80139e6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
- 80139ea: f8df 80d4 ldr.w r8, [pc, #212] @ 8013ac0 <_malloc_r+0xfc>
- 80139ee: f000 f869 bl 8013ac4 <__malloc_lock>
- 80139f2: f8d8 3000 ldr.w r3, [r8]
- 80139f6: 461c mov r4, r3
- 80139f8: bb44 cbnz r4, 8013a4c <_malloc_r+0x88>
- 80139fa: 4629 mov r1, r5
- 80139fc: 4630 mov r0, r6
- 80139fe: f7ff ffbf bl 8013980 <sbrk_aligned>
- 8013a02: 1c43 adds r3, r0, #1
- 8013a04: 4604 mov r4, r0
- 8013a06: d158 bne.n 8013aba <_malloc_r+0xf6>
- 8013a08: f8d8 4000 ldr.w r4, [r8]
- 8013a0c: 4627 mov r7, r4
- 8013a0e: 2f00 cmp r7, #0
- 8013a10: d143 bne.n 8013a9a <_malloc_r+0xd6>
- 8013a12: 2c00 cmp r4, #0
- 8013a14: d04b beq.n 8013aae <_malloc_r+0xea>
- 8013a16: 6823 ldr r3, [r4, #0]
- 8013a18: 4639 mov r1, r7
- 8013a1a: 4630 mov r0, r6
- 8013a1c: eb04 0903 add.w r9, r4, r3
- 8013a20: f000 fbc2 bl 80141a8 <_sbrk_r>
- 8013a24: 4581 cmp r9, r0
- 8013a26: d142 bne.n 8013aae <_malloc_r+0xea>
- 8013a28: 6821 ldr r1, [r4, #0]
- 8013a2a: 1a6d subs r5, r5, r1
- 8013a2c: 4629 mov r1, r5
- 8013a2e: 4630 mov r0, r6
- 8013a30: f7ff ffa6 bl 8013980 <sbrk_aligned>
- 8013a34: 3001 adds r0, #1
- 8013a36: d03a beq.n 8013aae <_malloc_r+0xea>
- 8013a38: 6823 ldr r3, [r4, #0]
- 8013a3a: 442b add r3, r5
- 8013a3c: 6023 str r3, [r4, #0]
- 8013a3e: f8d8 3000 ldr.w r3, [r8]
- 8013a42: 685a ldr r2, [r3, #4]
- 8013a44: bb62 cbnz r2, 8013aa0 <_malloc_r+0xdc>
- 8013a46: f8c8 7000 str.w r7, [r8]
- 8013a4a: e00f b.n 8013a6c <_malloc_r+0xa8>
- 8013a4c: 6822 ldr r2, [r4, #0]
- 8013a4e: 1b52 subs r2, r2, r5
- 8013a50: d420 bmi.n 8013a94 <_malloc_r+0xd0>
- 8013a52: 2a0b cmp r2, #11
- 8013a54: d917 bls.n 8013a86 <_malloc_r+0xc2>
- 8013a56: 1961 adds r1, r4, r5
- 8013a58: 42a3 cmp r3, r4
- 8013a5a: 6025 str r5, [r4, #0]
- 8013a5c: bf18 it ne
- 8013a5e: 6059 strne r1, [r3, #4]
- 8013a60: 6863 ldr r3, [r4, #4]
- 8013a62: bf08 it eq
- 8013a64: f8c8 1000 streq.w r1, [r8]
- 8013a68: 5162 str r2, [r4, r5]
- 8013a6a: 604b str r3, [r1, #4]
- 8013a6c: 4630 mov r0, r6
- 8013a6e: f000 f82f bl 8013ad0 <__malloc_unlock>
- 8013a72: f104 000b add.w r0, r4, #11
- 8013a76: 1d23 adds r3, r4, #4
- 8013a78: f020 0007 bic.w r0, r0, #7
- 8013a7c: 1ac2 subs r2, r0, r3
- 8013a7e: bf1c itt ne
- 8013a80: 1a1b subne r3, r3, r0
- 8013a82: 50a3 strne r3, [r4, r2]
- 8013a84: e7af b.n 80139e6 <_malloc_r+0x22>
- 8013a86: 6862 ldr r2, [r4, #4]
- 8013a88: 42a3 cmp r3, r4
- 8013a8a: bf0c ite eq
- 8013a8c: f8c8 2000 streq.w r2, [r8]
- 8013a90: 605a strne r2, [r3, #4]
- 8013a92: e7eb b.n 8013a6c <_malloc_r+0xa8>
- 8013a94: 4623 mov r3, r4
- 8013a96: 6864 ldr r4, [r4, #4]
- 8013a98: e7ae b.n 80139f8 <_malloc_r+0x34>
- 8013a9a: 463c mov r4, r7
- 8013a9c: 687f ldr r7, [r7, #4]
- 8013a9e: e7b6 b.n 8013a0e <_malloc_r+0x4a>
- 8013aa0: 461a mov r2, r3
- 8013aa2: 685b ldr r3, [r3, #4]
- 8013aa4: 42a3 cmp r3, r4
- 8013aa6: d1fb bne.n 8013aa0 <_malloc_r+0xdc>
- 8013aa8: 2300 movs r3, #0
- 8013aaa: 6053 str r3, [r2, #4]
- 8013aac: e7de b.n 8013a6c <_malloc_r+0xa8>
- 8013aae: 230c movs r3, #12
- 8013ab0: 6033 str r3, [r6, #0]
- 8013ab2: 4630 mov r0, r6
- 8013ab4: f000 f80c bl 8013ad0 <__malloc_unlock>
- 8013ab8: e794 b.n 80139e4 <_malloc_r+0x20>
- 8013aba: 6005 str r5, [r0, #0]
- 8013abc: e7d6 b.n 8013a6c <_malloc_r+0xa8>
- 8013abe: bf00 nop
- 8013ac0: 24019d98 .word 0x24019d98
- 08013ac4 <__malloc_lock>:
- 8013ac4: 4801 ldr r0, [pc, #4] @ (8013acc <__malloc_lock+0x8>)
- 8013ac6: f7ff bed2 b.w 801386e <__retarget_lock_acquire_recursive>
- 8013aca: bf00 nop
- 8013acc: 24019d90 .word 0x24019d90
- 08013ad0 <__malloc_unlock>:
- 8013ad0: 4801 ldr r0, [pc, #4] @ (8013ad8 <__malloc_unlock+0x8>)
- 8013ad2: f7ff becd b.w 8013870 <__retarget_lock_release_recursive>
- 8013ad6: bf00 nop
- 8013ad8: 24019d90 .word 0x24019d90
- 08013adc <__sfputc_r>:
- 8013adc: 6893 ldr r3, [r2, #8]
- 8013ade: 3b01 subs r3, #1
- 8013ae0: 2b00 cmp r3, #0
- 8013ae2: b410 push {r4}
- 8013ae4: 6093 str r3, [r2, #8]
- 8013ae6: da08 bge.n 8013afa <__sfputc_r+0x1e>
- 8013ae8: 6994 ldr r4, [r2, #24]
- 8013aea: 42a3 cmp r3, r4
- 8013aec: db01 blt.n 8013af2 <__sfputc_r+0x16>
- 8013aee: 290a cmp r1, #10
- 8013af0: d103 bne.n 8013afa <__sfputc_r+0x1e>
- 8013af2: f85d 4b04 ldr.w r4, [sp], #4
- 8013af6: f7ff bd3a b.w 801356e <__swbuf_r>
- 8013afa: 6813 ldr r3, [r2, #0]
- 8013afc: 1c58 adds r0, r3, #1
- 8013afe: 6010 str r0, [r2, #0]
- 8013b00: 7019 strb r1, [r3, #0]
- 8013b02: 4608 mov r0, r1
- 8013b04: f85d 4b04 ldr.w r4, [sp], #4
- 8013b08: 4770 bx lr
- 08013b0a <__sfputs_r>:
- 8013b0a: b5f8 push {r3, r4, r5, r6, r7, lr}
- 8013b0c: 4606 mov r6, r0
- 8013b0e: 460f mov r7, r1
- 8013b10: 4614 mov r4, r2
- 8013b12: 18d5 adds r5, r2, r3
- 8013b14: 42ac cmp r4, r5
- 8013b16: d101 bne.n 8013b1c <__sfputs_r+0x12>
- 8013b18: 2000 movs r0, #0
- 8013b1a: e007 b.n 8013b2c <__sfputs_r+0x22>
- 8013b1c: f814 1b01 ldrb.w r1, [r4], #1
- 8013b20: 463a mov r2, r7
- 8013b22: 4630 mov r0, r6
- 8013b24: f7ff ffda bl 8013adc <__sfputc_r>
- 8013b28: 1c43 adds r3, r0, #1
- 8013b2a: d1f3 bne.n 8013b14 <__sfputs_r+0xa>
- 8013b2c: bdf8 pop {r3, r4, r5, r6, r7, pc}
- ...
- 08013b30 <_vfiprintf_r>:
- 8013b30: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 8013b34: 460d mov r5, r1
- 8013b36: b09d sub sp, #116 @ 0x74
- 8013b38: 4614 mov r4, r2
- 8013b3a: 4698 mov r8, r3
- 8013b3c: 4606 mov r6, r0
- 8013b3e: b118 cbz r0, 8013b48 <_vfiprintf_r+0x18>
- 8013b40: 6a03 ldr r3, [r0, #32]
- 8013b42: b90b cbnz r3, 8013b48 <_vfiprintf_r+0x18>
- 8013b44: f7ff fc2a bl 801339c <__sinit>
- 8013b48: 6e6b ldr r3, [r5, #100] @ 0x64
- 8013b4a: 07d9 lsls r1, r3, #31
- 8013b4c: d405 bmi.n 8013b5a <_vfiprintf_r+0x2a>
- 8013b4e: 89ab ldrh r3, [r5, #12]
- 8013b50: 059a lsls r2, r3, #22
- 8013b52: d402 bmi.n 8013b5a <_vfiprintf_r+0x2a>
- 8013b54: 6da8 ldr r0, [r5, #88] @ 0x58
- 8013b56: f7ff fe8a bl 801386e <__retarget_lock_acquire_recursive>
- 8013b5a: 89ab ldrh r3, [r5, #12]
- 8013b5c: 071b lsls r3, r3, #28
- 8013b5e: d501 bpl.n 8013b64 <_vfiprintf_r+0x34>
- 8013b60: 692b ldr r3, [r5, #16]
- 8013b62: b99b cbnz r3, 8013b8c <_vfiprintf_r+0x5c>
- 8013b64: 4629 mov r1, r5
- 8013b66: 4630 mov r0, r6
- 8013b68: f7ff fd40 bl 80135ec <__swsetup_r>
- 8013b6c: b170 cbz r0, 8013b8c <_vfiprintf_r+0x5c>
- 8013b6e: 6e6b ldr r3, [r5, #100] @ 0x64
- 8013b70: 07dc lsls r4, r3, #31
- 8013b72: d504 bpl.n 8013b7e <_vfiprintf_r+0x4e>
- 8013b74: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8013b78: b01d add sp, #116 @ 0x74
- 8013b7a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
- 8013b7e: 89ab ldrh r3, [r5, #12]
- 8013b80: 0598 lsls r0, r3, #22
- 8013b82: d4f7 bmi.n 8013b74 <_vfiprintf_r+0x44>
- 8013b84: 6da8 ldr r0, [r5, #88] @ 0x58
- 8013b86: f7ff fe73 bl 8013870 <__retarget_lock_release_recursive>
- 8013b8a: e7f3 b.n 8013b74 <_vfiprintf_r+0x44>
- 8013b8c: 2300 movs r3, #0
- 8013b8e: 9309 str r3, [sp, #36] @ 0x24
- 8013b90: 2320 movs r3, #32
- 8013b92: f88d 3029 strb.w r3, [sp, #41] @ 0x29
- 8013b96: f8cd 800c str.w r8, [sp, #12]
- 8013b9a: 2330 movs r3, #48 @ 0x30
- 8013b9c: f8df 81ac ldr.w r8, [pc, #428] @ 8013d4c <_vfiprintf_r+0x21c>
- 8013ba0: f88d 302a strb.w r3, [sp, #42] @ 0x2a
- 8013ba4: f04f 0901 mov.w r9, #1
- 8013ba8: 4623 mov r3, r4
- 8013baa: 469a mov sl, r3
- 8013bac: f813 2b01 ldrb.w r2, [r3], #1
- 8013bb0: b10a cbz r2, 8013bb6 <_vfiprintf_r+0x86>
- 8013bb2: 2a25 cmp r2, #37 @ 0x25
- 8013bb4: d1f9 bne.n 8013baa <_vfiprintf_r+0x7a>
- 8013bb6: ebba 0b04 subs.w fp, sl, r4
- 8013bba: d00b beq.n 8013bd4 <_vfiprintf_r+0xa4>
- 8013bbc: 465b mov r3, fp
- 8013bbe: 4622 mov r2, r4
- 8013bc0: 4629 mov r1, r5
- 8013bc2: 4630 mov r0, r6
- 8013bc4: f7ff ffa1 bl 8013b0a <__sfputs_r>
- 8013bc8: 3001 adds r0, #1
- 8013bca: f000 80a7 beq.w 8013d1c <_vfiprintf_r+0x1ec>
- 8013bce: 9a09 ldr r2, [sp, #36] @ 0x24
- 8013bd0: 445a add r2, fp
- 8013bd2: 9209 str r2, [sp, #36] @ 0x24
- 8013bd4: f89a 3000 ldrb.w r3, [sl]
- 8013bd8: 2b00 cmp r3, #0
- 8013bda: f000 809f beq.w 8013d1c <_vfiprintf_r+0x1ec>
- 8013bde: 2300 movs r3, #0
- 8013be0: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff
- 8013be4: e9cd 2305 strd r2, r3, [sp, #20]
- 8013be8: f10a 0a01 add.w sl, sl, #1
- 8013bec: 9304 str r3, [sp, #16]
- 8013bee: 9307 str r3, [sp, #28]
- 8013bf0: f88d 3053 strb.w r3, [sp, #83] @ 0x53
- 8013bf4: 931a str r3, [sp, #104] @ 0x68
- 8013bf6: 4654 mov r4, sl
- 8013bf8: 2205 movs r2, #5
- 8013bfa: f814 1b01 ldrb.w r1, [r4], #1
- 8013bfe: 4853 ldr r0, [pc, #332] @ (8013d4c <_vfiprintf_r+0x21c>)
- 8013c00: f7ec fb86 bl 8000310 <memchr>
- 8013c04: 9a04 ldr r2, [sp, #16]
- 8013c06: b9d8 cbnz r0, 8013c40 <_vfiprintf_r+0x110>
- 8013c08: 06d1 lsls r1, r2, #27
- 8013c0a: bf44 itt mi
- 8013c0c: 2320 movmi r3, #32
- 8013c0e: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53
- 8013c12: 0713 lsls r3, r2, #28
- 8013c14: bf44 itt mi
- 8013c16: 232b movmi r3, #43 @ 0x2b
- 8013c18: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53
- 8013c1c: f89a 3000 ldrb.w r3, [sl]
- 8013c20: 2b2a cmp r3, #42 @ 0x2a
- 8013c22: d015 beq.n 8013c50 <_vfiprintf_r+0x120>
- 8013c24: 9a07 ldr r2, [sp, #28]
- 8013c26: 4654 mov r4, sl
- 8013c28: 2000 movs r0, #0
- 8013c2a: f04f 0c0a mov.w ip, #10
- 8013c2e: 4621 mov r1, r4
- 8013c30: f811 3b01 ldrb.w r3, [r1], #1
- 8013c34: 3b30 subs r3, #48 @ 0x30
- 8013c36: 2b09 cmp r3, #9
- 8013c38: d94b bls.n 8013cd2 <_vfiprintf_r+0x1a2>
- 8013c3a: b1b0 cbz r0, 8013c6a <_vfiprintf_r+0x13a>
- 8013c3c: 9207 str r2, [sp, #28]
- 8013c3e: e014 b.n 8013c6a <_vfiprintf_r+0x13a>
- 8013c40: eba0 0308 sub.w r3, r0, r8
- 8013c44: fa09 f303 lsl.w r3, r9, r3
- 8013c48: 4313 orrs r3, r2
- 8013c4a: 9304 str r3, [sp, #16]
- 8013c4c: 46a2 mov sl, r4
- 8013c4e: e7d2 b.n 8013bf6 <_vfiprintf_r+0xc6>
- 8013c50: 9b03 ldr r3, [sp, #12]
- 8013c52: 1d19 adds r1, r3, #4
- 8013c54: 681b ldr r3, [r3, #0]
- 8013c56: 9103 str r1, [sp, #12]
- 8013c58: 2b00 cmp r3, #0
- 8013c5a: bfbb ittet lt
- 8013c5c: 425b neglt r3, r3
- 8013c5e: f042 0202 orrlt.w r2, r2, #2
- 8013c62: 9307 strge r3, [sp, #28]
- 8013c64: 9307 strlt r3, [sp, #28]
- 8013c66: bfb8 it lt
- 8013c68: 9204 strlt r2, [sp, #16]
- 8013c6a: 7823 ldrb r3, [r4, #0]
- 8013c6c: 2b2e cmp r3, #46 @ 0x2e
- 8013c6e: d10a bne.n 8013c86 <_vfiprintf_r+0x156>
- 8013c70: 7863 ldrb r3, [r4, #1]
- 8013c72: 2b2a cmp r3, #42 @ 0x2a
- 8013c74: d132 bne.n 8013cdc <_vfiprintf_r+0x1ac>
- 8013c76: 9b03 ldr r3, [sp, #12]
- 8013c78: 1d1a adds r2, r3, #4
- 8013c7a: 681b ldr r3, [r3, #0]
- 8013c7c: 9203 str r2, [sp, #12]
- 8013c7e: ea43 73e3 orr.w r3, r3, r3, asr #31
- 8013c82: 3402 adds r4, #2
- 8013c84: 9305 str r3, [sp, #20]
- 8013c86: f8df a0d4 ldr.w sl, [pc, #212] @ 8013d5c <_vfiprintf_r+0x22c>
- 8013c8a: 7821 ldrb r1, [r4, #0]
- 8013c8c: 2203 movs r2, #3
- 8013c8e: 4650 mov r0, sl
- 8013c90: f7ec fb3e bl 8000310 <memchr>
- 8013c94: b138 cbz r0, 8013ca6 <_vfiprintf_r+0x176>
- 8013c96: 9b04 ldr r3, [sp, #16]
- 8013c98: eba0 000a sub.w r0, r0, sl
- 8013c9c: 2240 movs r2, #64 @ 0x40
- 8013c9e: 4082 lsls r2, r0
- 8013ca0: 4313 orrs r3, r2
- 8013ca2: 3401 adds r4, #1
- 8013ca4: 9304 str r3, [sp, #16]
- 8013ca6: f814 1b01 ldrb.w r1, [r4], #1
- 8013caa: 4829 ldr r0, [pc, #164] @ (8013d50 <_vfiprintf_r+0x220>)
- 8013cac: f88d 1028 strb.w r1, [sp, #40] @ 0x28
- 8013cb0: 2206 movs r2, #6
- 8013cb2: f7ec fb2d bl 8000310 <memchr>
- 8013cb6: 2800 cmp r0, #0
- 8013cb8: d03f beq.n 8013d3a <_vfiprintf_r+0x20a>
- 8013cba: 4b26 ldr r3, [pc, #152] @ (8013d54 <_vfiprintf_r+0x224>)
- 8013cbc: bb1b cbnz r3, 8013d06 <_vfiprintf_r+0x1d6>
- 8013cbe: 9b03 ldr r3, [sp, #12]
- 8013cc0: 3307 adds r3, #7
- 8013cc2: f023 0307 bic.w r3, r3, #7
- 8013cc6: 3308 adds r3, #8
- 8013cc8: 9303 str r3, [sp, #12]
- 8013cca: 9b09 ldr r3, [sp, #36] @ 0x24
- 8013ccc: 443b add r3, r7
- 8013cce: 9309 str r3, [sp, #36] @ 0x24
- 8013cd0: e76a b.n 8013ba8 <_vfiprintf_r+0x78>
- 8013cd2: fb0c 3202 mla r2, ip, r2, r3
- 8013cd6: 460c mov r4, r1
- 8013cd8: 2001 movs r0, #1
- 8013cda: e7a8 b.n 8013c2e <_vfiprintf_r+0xfe>
- 8013cdc: 2300 movs r3, #0
- 8013cde: 3401 adds r4, #1
- 8013ce0: 9305 str r3, [sp, #20]
- 8013ce2: 4619 mov r1, r3
- 8013ce4: f04f 0c0a mov.w ip, #10
- 8013ce8: 4620 mov r0, r4
- 8013cea: f810 2b01 ldrb.w r2, [r0], #1
- 8013cee: 3a30 subs r2, #48 @ 0x30
- 8013cf0: 2a09 cmp r2, #9
- 8013cf2: d903 bls.n 8013cfc <_vfiprintf_r+0x1cc>
- 8013cf4: 2b00 cmp r3, #0
- 8013cf6: d0c6 beq.n 8013c86 <_vfiprintf_r+0x156>
- 8013cf8: 9105 str r1, [sp, #20]
- 8013cfa: e7c4 b.n 8013c86 <_vfiprintf_r+0x156>
- 8013cfc: fb0c 2101 mla r1, ip, r1, r2
- 8013d00: 4604 mov r4, r0
- 8013d02: 2301 movs r3, #1
- 8013d04: e7f0 b.n 8013ce8 <_vfiprintf_r+0x1b8>
- 8013d06: ab03 add r3, sp, #12
- 8013d08: 9300 str r3, [sp, #0]
- 8013d0a: 462a mov r2, r5
- 8013d0c: 4b12 ldr r3, [pc, #72] @ (8013d58 <_vfiprintf_r+0x228>)
- 8013d0e: a904 add r1, sp, #16
- 8013d10: 4630 mov r0, r6
- 8013d12: f3af 8000 nop.w
- 8013d16: 4607 mov r7, r0
- 8013d18: 1c78 adds r0, r7, #1
- 8013d1a: d1d6 bne.n 8013cca <_vfiprintf_r+0x19a>
- 8013d1c: 6e6b ldr r3, [r5, #100] @ 0x64
- 8013d1e: 07d9 lsls r1, r3, #31
- 8013d20: d405 bmi.n 8013d2e <_vfiprintf_r+0x1fe>
- 8013d22: 89ab ldrh r3, [r5, #12]
- 8013d24: 059a lsls r2, r3, #22
- 8013d26: d402 bmi.n 8013d2e <_vfiprintf_r+0x1fe>
- 8013d28: 6da8 ldr r0, [r5, #88] @ 0x58
- 8013d2a: f7ff fda1 bl 8013870 <__retarget_lock_release_recursive>
- 8013d2e: 89ab ldrh r3, [r5, #12]
- 8013d30: 065b lsls r3, r3, #25
- 8013d32: f53f af1f bmi.w 8013b74 <_vfiprintf_r+0x44>
- 8013d36: 9809 ldr r0, [sp, #36] @ 0x24
- 8013d38: e71e b.n 8013b78 <_vfiprintf_r+0x48>
- 8013d3a: ab03 add r3, sp, #12
- 8013d3c: 9300 str r3, [sp, #0]
- 8013d3e: 462a mov r2, r5
- 8013d40: 4b05 ldr r3, [pc, #20] @ (8013d58 <_vfiprintf_r+0x228>)
- 8013d42: a904 add r1, sp, #16
- 8013d44: 4630 mov r0, r6
- 8013d46: f000 f879 bl 8013e3c <_printf_i>
- 8013d4a: e7e4 b.n 8013d16 <_vfiprintf_r+0x1e6>
- 8013d4c: 08018087 .word 0x08018087
- 8013d50: 08018091 .word 0x08018091
- 8013d54: 00000000 .word 0x00000000
- 8013d58: 08013b0b .word 0x08013b0b
- 8013d5c: 0801808d .word 0x0801808d
- 08013d60 <_printf_common>:
- 8013d60: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
- 8013d64: 4616 mov r6, r2
- 8013d66: 4698 mov r8, r3
- 8013d68: 688a ldr r2, [r1, #8]
- 8013d6a: 690b ldr r3, [r1, #16]
- 8013d6c: f8dd 9020 ldr.w r9, [sp, #32]
- 8013d70: 4293 cmp r3, r2
- 8013d72: bfb8 it lt
- 8013d74: 4613 movlt r3, r2
- 8013d76: 6033 str r3, [r6, #0]
- 8013d78: f891 2043 ldrb.w r2, [r1, #67] @ 0x43
- 8013d7c: 4607 mov r7, r0
- 8013d7e: 460c mov r4, r1
- 8013d80: b10a cbz r2, 8013d86 <_printf_common+0x26>
- 8013d82: 3301 adds r3, #1
- 8013d84: 6033 str r3, [r6, #0]
- 8013d86: 6823 ldr r3, [r4, #0]
- 8013d88: 0699 lsls r1, r3, #26
- 8013d8a: bf42 ittt mi
- 8013d8c: 6833 ldrmi r3, [r6, #0]
- 8013d8e: 3302 addmi r3, #2
- 8013d90: 6033 strmi r3, [r6, #0]
- 8013d92: 6825 ldr r5, [r4, #0]
- 8013d94: f015 0506 ands.w r5, r5, #6
- 8013d98: d106 bne.n 8013da8 <_printf_common+0x48>
- 8013d9a: f104 0a19 add.w sl, r4, #25
- 8013d9e: 68e3 ldr r3, [r4, #12]
- 8013da0: 6832 ldr r2, [r6, #0]
- 8013da2: 1a9b subs r3, r3, r2
- 8013da4: 42ab cmp r3, r5
- 8013da6: dc26 bgt.n 8013df6 <_printf_common+0x96>
- 8013da8: f894 3043 ldrb.w r3, [r4, #67] @ 0x43
- 8013dac: 6822 ldr r2, [r4, #0]
- 8013dae: 3b00 subs r3, #0
- 8013db0: bf18 it ne
- 8013db2: 2301 movne r3, #1
- 8013db4: 0692 lsls r2, r2, #26
- 8013db6: d42b bmi.n 8013e10 <_printf_common+0xb0>
- 8013db8: f104 0243 add.w r2, r4, #67 @ 0x43
- 8013dbc: 4641 mov r1, r8
- 8013dbe: 4638 mov r0, r7
- 8013dc0: 47c8 blx r9
- 8013dc2: 3001 adds r0, #1
- 8013dc4: d01e beq.n 8013e04 <_printf_common+0xa4>
- 8013dc6: 6823 ldr r3, [r4, #0]
- 8013dc8: 6922 ldr r2, [r4, #16]
- 8013dca: f003 0306 and.w r3, r3, #6
- 8013dce: 2b04 cmp r3, #4
- 8013dd0: bf02 ittt eq
- 8013dd2: 68e5 ldreq r5, [r4, #12]
- 8013dd4: 6833 ldreq r3, [r6, #0]
- 8013dd6: 1aed subeq r5, r5, r3
- 8013dd8: 68a3 ldr r3, [r4, #8]
- 8013dda: bf0c ite eq
- 8013ddc: ea25 75e5 biceq.w r5, r5, r5, asr #31
- 8013de0: 2500 movne r5, #0
- 8013de2: 4293 cmp r3, r2
- 8013de4: bfc4 itt gt
- 8013de6: 1a9b subgt r3, r3, r2
- 8013de8: 18ed addgt r5, r5, r3
- 8013dea: 2600 movs r6, #0
- 8013dec: 341a adds r4, #26
- 8013dee: 42b5 cmp r5, r6
- 8013df0: d11a bne.n 8013e28 <_printf_common+0xc8>
- 8013df2: 2000 movs r0, #0
- 8013df4: e008 b.n 8013e08 <_printf_common+0xa8>
- 8013df6: 2301 movs r3, #1
- 8013df8: 4652 mov r2, sl
- 8013dfa: 4641 mov r1, r8
- 8013dfc: 4638 mov r0, r7
- 8013dfe: 47c8 blx r9
- 8013e00: 3001 adds r0, #1
- 8013e02: d103 bne.n 8013e0c <_printf_common+0xac>
- 8013e04: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8013e08: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
- 8013e0c: 3501 adds r5, #1
- 8013e0e: e7c6 b.n 8013d9e <_printf_common+0x3e>
- 8013e10: 18e1 adds r1, r4, r3
- 8013e12: 1c5a adds r2, r3, #1
- 8013e14: 2030 movs r0, #48 @ 0x30
- 8013e16: f881 0043 strb.w r0, [r1, #67] @ 0x43
- 8013e1a: 4422 add r2, r4
- 8013e1c: f894 1045 ldrb.w r1, [r4, #69] @ 0x45
- 8013e20: f882 1043 strb.w r1, [r2, #67] @ 0x43
- 8013e24: 3302 adds r3, #2
- 8013e26: e7c7 b.n 8013db8 <_printf_common+0x58>
- 8013e28: 2301 movs r3, #1
- 8013e2a: 4622 mov r2, r4
- 8013e2c: 4641 mov r1, r8
- 8013e2e: 4638 mov r0, r7
- 8013e30: 47c8 blx r9
- 8013e32: 3001 adds r0, #1
- 8013e34: d0e6 beq.n 8013e04 <_printf_common+0xa4>
- 8013e36: 3601 adds r6, #1
- 8013e38: e7d9 b.n 8013dee <_printf_common+0x8e>
- ...
- 08013e3c <_printf_i>:
- 8013e3c: e92d 47ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr}
- 8013e40: 7e0f ldrb r7, [r1, #24]
- 8013e42: 9e0c ldr r6, [sp, #48] @ 0x30
- 8013e44: 2f78 cmp r7, #120 @ 0x78
- 8013e46: 4691 mov r9, r2
- 8013e48: 4680 mov r8, r0
- 8013e4a: 460c mov r4, r1
- 8013e4c: 469a mov sl, r3
- 8013e4e: f101 0243 add.w r2, r1, #67 @ 0x43
- 8013e52: d807 bhi.n 8013e64 <_printf_i+0x28>
- 8013e54: 2f62 cmp r7, #98 @ 0x62
- 8013e56: d80a bhi.n 8013e6e <_printf_i+0x32>
- 8013e58: 2f00 cmp r7, #0
- 8013e5a: f000 80d2 beq.w 8014002 <_printf_i+0x1c6>
- 8013e5e: 2f58 cmp r7, #88 @ 0x58
- 8013e60: f000 80b9 beq.w 8013fd6 <_printf_i+0x19a>
- 8013e64: f104 0642 add.w r6, r4, #66 @ 0x42
- 8013e68: f884 7042 strb.w r7, [r4, #66] @ 0x42
- 8013e6c: e03a b.n 8013ee4 <_printf_i+0xa8>
- 8013e6e: f1a7 0363 sub.w r3, r7, #99 @ 0x63
- 8013e72: 2b15 cmp r3, #21
- 8013e74: d8f6 bhi.n 8013e64 <_printf_i+0x28>
- 8013e76: a101 add r1, pc, #4 @ (adr r1, 8013e7c <_printf_i+0x40>)
- 8013e78: f851 f023 ldr.w pc, [r1, r3, lsl #2]
- 8013e7c: 08013ed5 .word 0x08013ed5
- 8013e80: 08013ee9 .word 0x08013ee9
- 8013e84: 08013e65 .word 0x08013e65
- 8013e88: 08013e65 .word 0x08013e65
- 8013e8c: 08013e65 .word 0x08013e65
- 8013e90: 08013e65 .word 0x08013e65
- 8013e94: 08013ee9 .word 0x08013ee9
- 8013e98: 08013e65 .word 0x08013e65
- 8013e9c: 08013e65 .word 0x08013e65
- 8013ea0: 08013e65 .word 0x08013e65
- 8013ea4: 08013e65 .word 0x08013e65
- 8013ea8: 08013fe9 .word 0x08013fe9
- 8013eac: 08013f13 .word 0x08013f13
- 8013eb0: 08013fa3 .word 0x08013fa3
- 8013eb4: 08013e65 .word 0x08013e65
- 8013eb8: 08013e65 .word 0x08013e65
- 8013ebc: 0801400b .word 0x0801400b
- 8013ec0: 08013e65 .word 0x08013e65
- 8013ec4: 08013f13 .word 0x08013f13
- 8013ec8: 08013e65 .word 0x08013e65
- 8013ecc: 08013e65 .word 0x08013e65
- 8013ed0: 08013fab .word 0x08013fab
- 8013ed4: 6833 ldr r3, [r6, #0]
- 8013ed6: 1d1a adds r2, r3, #4
- 8013ed8: 681b ldr r3, [r3, #0]
- 8013eda: 6032 str r2, [r6, #0]
- 8013edc: f104 0642 add.w r6, r4, #66 @ 0x42
- 8013ee0: f884 3042 strb.w r3, [r4, #66] @ 0x42
- 8013ee4: 2301 movs r3, #1
- 8013ee6: e09d b.n 8014024 <_printf_i+0x1e8>
- 8013ee8: 6833 ldr r3, [r6, #0]
- 8013eea: 6820 ldr r0, [r4, #0]
- 8013eec: 1d19 adds r1, r3, #4
- 8013eee: 6031 str r1, [r6, #0]
- 8013ef0: 0606 lsls r6, r0, #24
- 8013ef2: d501 bpl.n 8013ef8 <_printf_i+0xbc>
- 8013ef4: 681d ldr r5, [r3, #0]
- 8013ef6: e003 b.n 8013f00 <_printf_i+0xc4>
- 8013ef8: 0645 lsls r5, r0, #25
- 8013efa: d5fb bpl.n 8013ef4 <_printf_i+0xb8>
- 8013efc: f9b3 5000 ldrsh.w r5, [r3]
- 8013f00: 2d00 cmp r5, #0
- 8013f02: da03 bge.n 8013f0c <_printf_i+0xd0>
- 8013f04: 232d movs r3, #45 @ 0x2d
- 8013f06: 426d negs r5, r5
- 8013f08: f884 3043 strb.w r3, [r4, #67] @ 0x43
- 8013f0c: 4859 ldr r0, [pc, #356] @ (8014074 <_printf_i+0x238>)
- 8013f0e: 230a movs r3, #10
- 8013f10: e011 b.n 8013f36 <_printf_i+0xfa>
- 8013f12: 6821 ldr r1, [r4, #0]
- 8013f14: 6833 ldr r3, [r6, #0]
- 8013f16: 0608 lsls r0, r1, #24
- 8013f18: f853 5b04 ldr.w r5, [r3], #4
- 8013f1c: d402 bmi.n 8013f24 <_printf_i+0xe8>
- 8013f1e: 0649 lsls r1, r1, #25
- 8013f20: bf48 it mi
- 8013f22: b2ad uxthmi r5, r5
- 8013f24: 2f6f cmp r7, #111 @ 0x6f
- 8013f26: 4853 ldr r0, [pc, #332] @ (8014074 <_printf_i+0x238>)
- 8013f28: 6033 str r3, [r6, #0]
- 8013f2a: bf14 ite ne
- 8013f2c: 230a movne r3, #10
- 8013f2e: 2308 moveq r3, #8
- 8013f30: 2100 movs r1, #0
- 8013f32: f884 1043 strb.w r1, [r4, #67] @ 0x43
- 8013f36: 6866 ldr r6, [r4, #4]
- 8013f38: 60a6 str r6, [r4, #8]
- 8013f3a: 2e00 cmp r6, #0
- 8013f3c: bfa2 ittt ge
- 8013f3e: 6821 ldrge r1, [r4, #0]
- 8013f40: f021 0104 bicge.w r1, r1, #4
- 8013f44: 6021 strge r1, [r4, #0]
- 8013f46: b90d cbnz r5, 8013f4c <_printf_i+0x110>
- 8013f48: 2e00 cmp r6, #0
- 8013f4a: d04b beq.n 8013fe4 <_printf_i+0x1a8>
- 8013f4c: 4616 mov r6, r2
- 8013f4e: fbb5 f1f3 udiv r1, r5, r3
- 8013f52: fb03 5711 mls r7, r3, r1, r5
- 8013f56: 5dc7 ldrb r7, [r0, r7]
- 8013f58: f806 7d01 strb.w r7, [r6, #-1]!
- 8013f5c: 462f mov r7, r5
- 8013f5e: 42bb cmp r3, r7
- 8013f60: 460d mov r5, r1
- 8013f62: d9f4 bls.n 8013f4e <_printf_i+0x112>
- 8013f64: 2b08 cmp r3, #8
- 8013f66: d10b bne.n 8013f80 <_printf_i+0x144>
- 8013f68: 6823 ldr r3, [r4, #0]
- 8013f6a: 07df lsls r7, r3, #31
- 8013f6c: d508 bpl.n 8013f80 <_printf_i+0x144>
- 8013f6e: 6923 ldr r3, [r4, #16]
- 8013f70: 6861 ldr r1, [r4, #4]
- 8013f72: 4299 cmp r1, r3
- 8013f74: bfde ittt le
- 8013f76: 2330 movle r3, #48 @ 0x30
- 8013f78: f806 3c01 strble.w r3, [r6, #-1]
- 8013f7c: f106 36ff addle.w r6, r6, #4294967295 @ 0xffffffff
- 8013f80: 1b92 subs r2, r2, r6
- 8013f82: 6122 str r2, [r4, #16]
- 8013f84: f8cd a000 str.w sl, [sp]
- 8013f88: 464b mov r3, r9
- 8013f8a: aa03 add r2, sp, #12
- 8013f8c: 4621 mov r1, r4
- 8013f8e: 4640 mov r0, r8
- 8013f90: f7ff fee6 bl 8013d60 <_printf_common>
- 8013f94: 3001 adds r0, #1
- 8013f96: d14a bne.n 801402e <_printf_i+0x1f2>
- 8013f98: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 8013f9c: b004 add sp, #16
- 8013f9e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
- 8013fa2: 6823 ldr r3, [r4, #0]
- 8013fa4: f043 0320 orr.w r3, r3, #32
- 8013fa8: 6023 str r3, [r4, #0]
- 8013faa: 4833 ldr r0, [pc, #204] @ (8014078 <_printf_i+0x23c>)
- 8013fac: 2778 movs r7, #120 @ 0x78
- 8013fae: f884 7045 strb.w r7, [r4, #69] @ 0x45
- 8013fb2: 6823 ldr r3, [r4, #0]
- 8013fb4: 6831 ldr r1, [r6, #0]
- 8013fb6: 061f lsls r7, r3, #24
- 8013fb8: f851 5b04 ldr.w r5, [r1], #4
- 8013fbc: d402 bmi.n 8013fc4 <_printf_i+0x188>
- 8013fbe: 065f lsls r7, r3, #25
- 8013fc0: bf48 it mi
- 8013fc2: b2ad uxthmi r5, r5
- 8013fc4: 6031 str r1, [r6, #0]
- 8013fc6: 07d9 lsls r1, r3, #31
- 8013fc8: bf44 itt mi
- 8013fca: f043 0320 orrmi.w r3, r3, #32
- 8013fce: 6023 strmi r3, [r4, #0]
- 8013fd0: b11d cbz r5, 8013fda <_printf_i+0x19e>
- 8013fd2: 2310 movs r3, #16
- 8013fd4: e7ac b.n 8013f30 <_printf_i+0xf4>
- 8013fd6: 4827 ldr r0, [pc, #156] @ (8014074 <_printf_i+0x238>)
- 8013fd8: e7e9 b.n 8013fae <_printf_i+0x172>
- 8013fda: 6823 ldr r3, [r4, #0]
- 8013fdc: f023 0320 bic.w r3, r3, #32
- 8013fe0: 6023 str r3, [r4, #0]
- 8013fe2: e7f6 b.n 8013fd2 <_printf_i+0x196>
- 8013fe4: 4616 mov r6, r2
- 8013fe6: e7bd b.n 8013f64 <_printf_i+0x128>
- 8013fe8: 6833 ldr r3, [r6, #0]
- 8013fea: 6825 ldr r5, [r4, #0]
- 8013fec: 6961 ldr r1, [r4, #20]
- 8013fee: 1d18 adds r0, r3, #4
- 8013ff0: 6030 str r0, [r6, #0]
- 8013ff2: 062e lsls r6, r5, #24
- 8013ff4: 681b ldr r3, [r3, #0]
- 8013ff6: d501 bpl.n 8013ffc <_printf_i+0x1c0>
- 8013ff8: 6019 str r1, [r3, #0]
- 8013ffa: e002 b.n 8014002 <_printf_i+0x1c6>
- 8013ffc: 0668 lsls r0, r5, #25
- 8013ffe: d5fb bpl.n 8013ff8 <_printf_i+0x1bc>
- 8014000: 8019 strh r1, [r3, #0]
- 8014002: 2300 movs r3, #0
- 8014004: 6123 str r3, [r4, #16]
- 8014006: 4616 mov r6, r2
- 8014008: e7bc b.n 8013f84 <_printf_i+0x148>
- 801400a: 6833 ldr r3, [r6, #0]
- 801400c: 1d1a adds r2, r3, #4
- 801400e: 6032 str r2, [r6, #0]
- 8014010: 681e ldr r6, [r3, #0]
- 8014012: 6862 ldr r2, [r4, #4]
- 8014014: 2100 movs r1, #0
- 8014016: 4630 mov r0, r6
- 8014018: f7ec f97a bl 8000310 <memchr>
- 801401c: b108 cbz r0, 8014022 <_printf_i+0x1e6>
- 801401e: 1b80 subs r0, r0, r6
- 8014020: 6060 str r0, [r4, #4]
- 8014022: 6863 ldr r3, [r4, #4]
- 8014024: 6123 str r3, [r4, #16]
- 8014026: 2300 movs r3, #0
- 8014028: f884 3043 strb.w r3, [r4, #67] @ 0x43
- 801402c: e7aa b.n 8013f84 <_printf_i+0x148>
- 801402e: 6923 ldr r3, [r4, #16]
- 8014030: 4632 mov r2, r6
- 8014032: 4649 mov r1, r9
- 8014034: 4640 mov r0, r8
- 8014036: 47d0 blx sl
- 8014038: 3001 adds r0, #1
- 801403a: d0ad beq.n 8013f98 <_printf_i+0x15c>
- 801403c: 6823 ldr r3, [r4, #0]
- 801403e: 079b lsls r3, r3, #30
- 8014040: d413 bmi.n 801406a <_printf_i+0x22e>
- 8014042: 68e0 ldr r0, [r4, #12]
- 8014044: 9b03 ldr r3, [sp, #12]
- 8014046: 4298 cmp r0, r3
- 8014048: bfb8 it lt
- 801404a: 4618 movlt r0, r3
- 801404c: e7a6 b.n 8013f9c <_printf_i+0x160>
- 801404e: 2301 movs r3, #1
- 8014050: 4632 mov r2, r6
- 8014052: 4649 mov r1, r9
- 8014054: 4640 mov r0, r8
- 8014056: 47d0 blx sl
- 8014058: 3001 adds r0, #1
- 801405a: d09d beq.n 8013f98 <_printf_i+0x15c>
- 801405c: 3501 adds r5, #1
- 801405e: 68e3 ldr r3, [r4, #12]
- 8014060: 9903 ldr r1, [sp, #12]
- 8014062: 1a5b subs r3, r3, r1
- 8014064: 42ab cmp r3, r5
- 8014066: dcf2 bgt.n 801404e <_printf_i+0x212>
- 8014068: e7eb b.n 8014042 <_printf_i+0x206>
- 801406a: 2500 movs r5, #0
- 801406c: f104 0619 add.w r6, r4, #25
- 8014070: e7f5 b.n 801405e <_printf_i+0x222>
- 8014072: bf00 nop
- 8014074: 08018098 .word 0x08018098
- 8014078: 080180a9 .word 0x080180a9
- 0801407c <fiprintf>:
- 801407c: b40e push {r1, r2, r3}
- 801407e: b503 push {r0, r1, lr}
- 8014080: 4601 mov r1, r0
- 8014082: ab03 add r3, sp, #12
- 8014084: 4805 ldr r0, [pc, #20] @ (801409c <fiprintf+0x20>)
- 8014086: f853 2b04 ldr.w r2, [r3], #4
- 801408a: 6800 ldr r0, [r0, #0]
- 801408c: 9301 str r3, [sp, #4]
- 801408e: f7ff fd4f bl 8013b30 <_vfiprintf_r>
- 8014092: b002 add sp, #8
- 8014094: f85d eb04 ldr.w lr, [sp], #4
- 8014098: b003 add sp, #12
- 801409a: 4770 bx lr
- 801409c: 2400003c .word 0x2400003c
- 080140a0 <__swhatbuf_r>:
- 80140a0: b570 push {r4, r5, r6, lr}
- 80140a2: 460c mov r4, r1
- 80140a4: f9b1 100e ldrsh.w r1, [r1, #14]
- 80140a8: 2900 cmp r1, #0
- 80140aa: b096 sub sp, #88 @ 0x58
- 80140ac: 4615 mov r5, r2
- 80140ae: 461e mov r6, r3
- 80140b0: da0d bge.n 80140ce <__swhatbuf_r+0x2e>
- 80140b2: 89a3 ldrh r3, [r4, #12]
- 80140b4: f013 0f80 tst.w r3, #128 @ 0x80
- 80140b8: f04f 0100 mov.w r1, #0
- 80140bc: bf14 ite ne
- 80140be: 2340 movne r3, #64 @ 0x40
- 80140c0: f44f 6380 moveq.w r3, #1024 @ 0x400
- 80140c4: 2000 movs r0, #0
- 80140c6: 6031 str r1, [r6, #0]
- 80140c8: 602b str r3, [r5, #0]
- 80140ca: b016 add sp, #88 @ 0x58
- 80140cc: bd70 pop {r4, r5, r6, pc}
- 80140ce: 466a mov r2, sp
- 80140d0: f000 f848 bl 8014164 <_fstat_r>
- 80140d4: 2800 cmp r0, #0
- 80140d6: dbec blt.n 80140b2 <__swhatbuf_r+0x12>
- 80140d8: 9901 ldr r1, [sp, #4]
- 80140da: f401 4170 and.w r1, r1, #61440 @ 0xf000
- 80140de: f5a1 5300 sub.w r3, r1, #8192 @ 0x2000
- 80140e2: 4259 negs r1, r3
- 80140e4: 4159 adcs r1, r3
- 80140e6: f44f 6380 mov.w r3, #1024 @ 0x400
- 80140ea: e7eb b.n 80140c4 <__swhatbuf_r+0x24>
- 080140ec <__smakebuf_r>:
- 80140ec: 898b ldrh r3, [r1, #12]
- 80140ee: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr}
- 80140f0: 079d lsls r5, r3, #30
- 80140f2: 4606 mov r6, r0
- 80140f4: 460c mov r4, r1
- 80140f6: d507 bpl.n 8014108 <__smakebuf_r+0x1c>
- 80140f8: f104 0347 add.w r3, r4, #71 @ 0x47
- 80140fc: 6023 str r3, [r4, #0]
- 80140fe: 6123 str r3, [r4, #16]
- 8014100: 2301 movs r3, #1
- 8014102: 6163 str r3, [r4, #20]
- 8014104: b003 add sp, #12
- 8014106: bdf0 pop {r4, r5, r6, r7, pc}
- 8014108: ab01 add r3, sp, #4
- 801410a: 466a mov r2, sp
- 801410c: f7ff ffc8 bl 80140a0 <__swhatbuf_r>
- 8014110: 9f00 ldr r7, [sp, #0]
- 8014112: 4605 mov r5, r0
- 8014114: 4639 mov r1, r7
- 8014116: 4630 mov r0, r6
- 8014118: f7ff fc54 bl 80139c4 <_malloc_r>
- 801411c: b948 cbnz r0, 8014132 <__smakebuf_r+0x46>
- 801411e: f9b4 300c ldrsh.w r3, [r4, #12]
- 8014122: 059a lsls r2, r3, #22
- 8014124: d4ee bmi.n 8014104 <__smakebuf_r+0x18>
- 8014126: f023 0303 bic.w r3, r3, #3
- 801412a: f043 0302 orr.w r3, r3, #2
- 801412e: 81a3 strh r3, [r4, #12]
- 8014130: e7e2 b.n 80140f8 <__smakebuf_r+0xc>
- 8014132: 89a3 ldrh r3, [r4, #12]
- 8014134: 6020 str r0, [r4, #0]
- 8014136: f043 0380 orr.w r3, r3, #128 @ 0x80
- 801413a: 81a3 strh r3, [r4, #12]
- 801413c: 9b01 ldr r3, [sp, #4]
- 801413e: e9c4 0704 strd r0, r7, [r4, #16]
- 8014142: b15b cbz r3, 801415c <__smakebuf_r+0x70>
- 8014144: f9b4 100e ldrsh.w r1, [r4, #14]
- 8014148: 4630 mov r0, r6
- 801414a: f000 f81d bl 8014188 <_isatty_r>
- 801414e: b128 cbz r0, 801415c <__smakebuf_r+0x70>
- 8014150: 89a3 ldrh r3, [r4, #12]
- 8014152: f023 0303 bic.w r3, r3, #3
- 8014156: f043 0301 orr.w r3, r3, #1
- 801415a: 81a3 strh r3, [r4, #12]
- 801415c: 89a3 ldrh r3, [r4, #12]
- 801415e: 431d orrs r5, r3
- 8014160: 81a5 strh r5, [r4, #12]
- 8014162: e7cf b.n 8014104 <__smakebuf_r+0x18>
- 08014164 <_fstat_r>:
- 8014164: b538 push {r3, r4, r5, lr}
- 8014166: 4d07 ldr r5, [pc, #28] @ (8014184 <_fstat_r+0x20>)
- 8014168: 2300 movs r3, #0
- 801416a: 4604 mov r4, r0
- 801416c: 4608 mov r0, r1
- 801416e: 4611 mov r1, r2
- 8014170: 602b str r3, [r5, #0]
- 8014172: f7ec fd10 bl 8000b96 <_fstat>
- 8014176: 1c43 adds r3, r0, #1
- 8014178: d102 bne.n 8014180 <_fstat_r+0x1c>
- 801417a: 682b ldr r3, [r5, #0]
- 801417c: b103 cbz r3, 8014180 <_fstat_r+0x1c>
- 801417e: 6023 str r3, [r4, #0]
- 8014180: bd38 pop {r3, r4, r5, pc}
- 8014182: bf00 nop
- 8014184: 24019d8c .word 0x24019d8c
- 08014188 <_isatty_r>:
- 8014188: b538 push {r3, r4, r5, lr}
- 801418a: 4d06 ldr r5, [pc, #24] @ (80141a4 <_isatty_r+0x1c>)
- 801418c: 2300 movs r3, #0
- 801418e: 4604 mov r4, r0
- 8014190: 4608 mov r0, r1
- 8014192: 602b str r3, [r5, #0]
- 8014194: f7ec fd04 bl 8000ba0 <_isatty>
- 8014198: 1c43 adds r3, r0, #1
- 801419a: d102 bne.n 80141a2 <_isatty_r+0x1a>
- 801419c: 682b ldr r3, [r5, #0]
- 801419e: b103 cbz r3, 80141a2 <_isatty_r+0x1a>
- 80141a0: 6023 str r3, [r4, #0]
- 80141a2: bd38 pop {r3, r4, r5, pc}
- 80141a4: 24019d8c .word 0x24019d8c
- 080141a8 <_sbrk_r>:
- 80141a8: b538 push {r3, r4, r5, lr}
- 80141aa: 4d06 ldr r5, [pc, #24] @ (80141c4 <_sbrk_r+0x1c>)
- 80141ac: 2300 movs r3, #0
- 80141ae: 4604 mov r4, r0
- 80141b0: 4608 mov r0, r1
- 80141b2: 602b str r3, [r5, #0]
- 80141b4: f7ec fcf8 bl 8000ba8 <_sbrk>
- 80141b8: 1c43 adds r3, r0, #1
- 80141ba: d102 bne.n 80141c2 <_sbrk_r+0x1a>
- 80141bc: 682b ldr r3, [r5, #0]
- 80141be: b103 cbz r3, 80141c2 <_sbrk_r+0x1a>
- 80141c0: 6023 str r3, [r4, #0]
- 80141c2: bd38 pop {r3, r4, r5, pc}
- 80141c4: 24019d8c .word 0x24019d8c
- 080141c8 <abort>:
- 80141c8: b508 push {r3, lr}
- 80141ca: 2006 movs r0, #6
- 80141cc: f000 f82c bl 8014228 <raise>
- 80141d0: 2001 movs r0, #1
- 80141d2: f7ec fcb9 bl 8000b48 <_exit>
- 080141d6 <_raise_r>:
- 80141d6: 291f cmp r1, #31
- 80141d8: b538 push {r3, r4, r5, lr}
- 80141da: 4605 mov r5, r0
- 80141dc: 460c mov r4, r1
- 80141de: d904 bls.n 80141ea <_raise_r+0x14>
- 80141e0: 2316 movs r3, #22
- 80141e2: 6003 str r3, [r0, #0]
- 80141e4: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
- 80141e8: bd38 pop {r3, r4, r5, pc}
- 80141ea: 6bc2 ldr r2, [r0, #60] @ 0x3c
- 80141ec: b112 cbz r2, 80141f4 <_raise_r+0x1e>
- 80141ee: f852 3021 ldr.w r3, [r2, r1, lsl #2]
- 80141f2: b94b cbnz r3, 8014208 <_raise_r+0x32>
- 80141f4: 4628 mov r0, r5
- 80141f6: f000 f831 bl 801425c <_getpid_r>
- 80141fa: 4622 mov r2, r4
- 80141fc: 4601 mov r1, r0
- 80141fe: 4628 mov r0, r5
- 8014200: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr}
- 8014204: f000 b818 b.w 8014238 <_kill_r>
- 8014208: 2b01 cmp r3, #1
- 801420a: d00a beq.n 8014222 <_raise_r+0x4c>
- 801420c: 1c59 adds r1, r3, #1
- 801420e: d103 bne.n 8014218 <_raise_r+0x42>
- 8014210: 2316 movs r3, #22
- 8014212: 6003 str r3, [r0, #0]
- 8014214: 2001 movs r0, #1
- 8014216: e7e7 b.n 80141e8 <_raise_r+0x12>
- 8014218: 2100 movs r1, #0
- 801421a: f842 1024 str.w r1, [r2, r4, lsl #2]
- 801421e: 4620 mov r0, r4
- 8014220: 4798 blx r3
- 8014222: 2000 movs r0, #0
- 8014224: e7e0 b.n 80141e8 <_raise_r+0x12>
- ...
- 08014228 <raise>:
- 8014228: 4b02 ldr r3, [pc, #8] @ (8014234 <raise+0xc>)
- 801422a: 4601 mov r1, r0
- 801422c: 6818 ldr r0, [r3, #0]
- 801422e: f7ff bfd2 b.w 80141d6 <_raise_r>
- 8014232: bf00 nop
- 8014234: 2400003c .word 0x2400003c
- 08014238 <_kill_r>:
- 8014238: b538 push {r3, r4, r5, lr}
- 801423a: 4d07 ldr r5, [pc, #28] @ (8014258 <_kill_r+0x20>)
- 801423c: 2300 movs r3, #0
- 801423e: 4604 mov r4, r0
- 8014240: 4608 mov r0, r1
- 8014242: 4611 mov r1, r2
- 8014244: 602b str r3, [r5, #0]
- 8014246: f7ec fc77 bl 8000b38 <_kill>
- 801424a: 1c43 adds r3, r0, #1
- 801424c: d102 bne.n 8014254 <_kill_r+0x1c>
- 801424e: 682b ldr r3, [r5, #0]
- 8014250: b103 cbz r3, 8014254 <_kill_r+0x1c>
- 8014252: 6023 str r3, [r4, #0]
- 8014254: bd38 pop {r3, r4, r5, pc}
- 8014256: bf00 nop
- 8014258: 24019d8c .word 0x24019d8c
- 0801425c <_getpid_r>:
- 801425c: f7ec bc6a b.w 8000b34 <_getpid>
- 08014260 <_init>:
- 8014260: b5f8 push {r3, r4, r5, r6, r7, lr}
- 8014262: bf00 nop
- 8014264: bcf8 pop {r3, r4, r5, r6, r7}
- 8014266: bc08 pop {r3}
- 8014268: 469e mov lr, r3
- 801426a: 4770 bx lr
- 0801426c <_fini>:
- 801426c: b5f8 push {r3, r4, r5, r6, r7, lr}
- 801426e: bf00 nop
- 8014270: bcf8 pop {r3, r4, r5, r6, r7}
- 8014272: bc08 pop {r3}
- 8014274: 469e mov lr, r3
- 8014276: 4770 bx lr
|