From 3b3c57996118008308e023d3f591fec2aa887bb7 Mon Sep 17 00:00:00 2001 From: trisz404 Date: Wed, 2 May 2018 16:00:53 +0200 Subject: [PATCH] change the params order of copy --- intermezzo.S | 20 ++++++++++---------- intermezzo.bin | Bin 92 -> 92 bytes intermezzo.elf | Bin 0 -> 62096 bytes intermezzo.o | Bin 0 -> 872 bytes 4 files changed, 10 insertions(+), 10 deletions(-) create mode 100755 intermezzo.elf create mode 100644 intermezzo.o diff --git a/intermezzo.S b/intermezzo.S index ccc3b59..30d01aa 100644 --- a/intermezzo.S +++ b/intermezzo.S @@ -9,10 +9,10 @@ _start: // First, we'll need to move ourselves _out_ of the target area. // We'll copy down into the start of the IRAM. - ldr r0, =post_relocation - ldr r1, =START_OF_IRAM + ldr r0, =START_OF_IRAM + ldr r1, =post_relocation ldr r2, =intermezzo_end - sub r2, r2, r0 + sub r2, r2, r1 bl copy // Jump to the start of RAM, which should now contain the post-relocation code. @@ -24,8 +24,8 @@ _start: post_relocation: // Next, we'll copy our payload down to the appropriate relocaiton address. - ldr r0, =LOAD_BLOCK_START - ldr r1, =RELOCATION_TARGET + ldr r0, =RELOCATION_TARGET + ldr r1, =LOAD_BLOCK_START ldr r2, =LOAD_BLOCK_LENGTH bl copy @@ -36,16 +36,16 @@ post_relocation: // // Simple block copy. -// r0 = source address -// r1 = destination address +// r0 = destination address +// r1 = source address // r2 = length in bytes -// Destroys r3. +// Destroys r0-r3. // copy: // Copy the word... - ldr r3, [r0], #4 - str r3, [r1], #4 + ldr r3, [r1], #4 + str r3, [r0], #4 // And continue while we have words left to copy. subs r2, r2, #4 diff --git a/intermezzo.bin b/intermezzo.bin index 755f4be45ca19aef9ea68693adf8bcd5c3d46d6e..b0f45127b4d68456fe7eadcf4943f1ef2fe6a89b 100755 GIT binary patch delta 45 zcma!v;bml8@Yq3M{!<5q`A-=q@+$MoFwB1{@L&HSi^0SvECvk|?Zw#`9T*sx8~|$V B4qyNP delta 45 zcma!v;dNn{|CCX1!D9!7`A-=p@+$Ky00jj8>px^MnDB(fpmCzTI2)4#0|TQ20BqL| AX8-^I diff --git a/intermezzo.elf b/intermezzo.elf new file mode 100755 index 0000000000000000000000000000000000000000..070de5aa37ae046bd55e5b6018acb8d8b67a6821 GIT binary patch literal 62096 zcmeIwK}%Fo6ae7!#!-?WrbR6(Vgd<+u!0ut8pDFX2wV#?+CV}&GQObN)L-Zq=uhY; zW$LPpu3Jp!s$(OxXdT~$bMHIno_F7SAMf+?#TQjo#b`8QHcqmms`EIDyT>^-V)Ajc zvpySBF>$(oazoXLs5;9>5hW&1YbUdb009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&U zAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C7 z2oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N z0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1pY69s@mP}v~~_V?VZD_{p|ath@Yj_ z8a~*I*xkDyJBRmkzcIVJU*+Dd%*$T$;n#!a!!HNT_R^1E!{LqFS!*9vo#l*(5{=IM zwY2K?x~uC^UCzs?#-(aH5Bcjjxi4ZOE;dX=<3gnw$HOb-fV2L5R$R@rJiC-jekbQA zWBJ|87sv8@nV-IAL@WEBWIj5th5Z;_26`UJG!cSAL^K! zUwSpyt?R-1>ifF4UEbp#$Ia|3a#N+heCttuW4S&Xt+Tb*Ohjyr>dV=8eU#)n(l4gj ucRn_bBOaY+fBH&)W2|21dEYXh%*cN!ni;K(>5TF7X7aq3SsRVfbAJOW0dau< literal 0 HcmV?d00001 diff --git a/intermezzo.o b/intermezzo.o new file mode 100644 index 0000000000000000000000000000000000000000..793e1216079fe1d3e35d262cdd1ee866ad0b478d GIT binary patch literal 872 zcma)4%}N4M6h7C#v^EA6{YVXDAS9DSi!{RZXbO|Dfpa=}a*f0aWGoaHiMinrTtIk!dJ5wSB21Bm3V{fbF)I?Z27Mavx1b9F zesm+>;aR$a+5Sh-Wa)e4_8mHnW|tV$)xEPEcA`Qnu+m2zw4 zdu4lQ@IUOKjE`R5z6E^)(@6Sa2b_RezW;(nJpU4m*YjD&VF$jiZ|4<$5M0YRgmL{} zb-8Ix6Ep$$+we7$?zal9dvW{&35$gfUB^8A^{0t<&>M_r;r;PGc+aeZ{i;}ajF^V* F_X98)S6l!9 literal 0 HcmV?d00001