Message ID | 20200327105906.2665-2-ardb@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ARM: simplify handover from UEFI to decompressor | expand |
Hi Ard, Thanks for your patch! On Fri, Mar 27, 2020 at 11:59 AM Ard Biesheuvel <ardb@kernel.org> wrote: > Before breaking up LC0 into different pieces, move out the variable > that is already place relative (given that it subtracts 'restart' in placed > the expression) and so its value does not need to be added to the > runtime address of the LC0 symbol itself. > > Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert
Hallo Geert, On Fri, 27 Mar 2020 at 14:23, Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > Hi Ard, > > Thanks for your patch! > > On Fri, Mar 27, 2020 at 11:59 AM Ard Biesheuvel <ardb@kernel.org> wrote: > > Before breaking up LC0 into different pieces, move out the variable > > that is already place relative (given that it subtracts 'restart' in > > placed > Actually, what I meant here was 'place-relative', i.e., the expression subtracts two symbol offsets, whereas the others are absolute, link time values that need to be fixed up according to the actual runtime location of the code. > > the expression) and so its value does not need to be added to the > > runtime address of the LC0 symbol itself. > > > > Signed-off-by: Ard Biesheuvel <ardb@kernel.org> > > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> > Thanks, Ard.
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 2d2a42865b39..bb674febf640 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -339,7 +339,7 @@ not_angel: */ mov r0, pc cmp r0, r4 - ldrcc r0, LC0+28 + ldrcc r0, .Lheadroom addcc r0, r0, pc cmpcc r4, r0 orrcc r4, r4, #1 @ remember we skipped cache_on @@ -716,9 +716,11 @@ LC0: .word LC0 @ r1 .word _got_start @ r11 .word _got_end @ ip .word .L_user_stack_end @ sp - .word _end - restart + 16384 + 1024*1024 .size LC0, . - LC0 +.Lheadroom: + .word _end - restart + 16384 + 1024*1024 + .Linflated_image_size_offset: .long (input_data_end - 4) - .
Before breaking up LC0 into different pieces, move out the variable that is already place relative (given that it subtracts 'restart' in the expression) and so its value does not need to be added to the runtime address of the LC0 symbol itself. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> --- arch/arm/boot/compressed/head.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)