]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 8893/1: boot: Explain the 8 nops
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 16 Jul 2019 11:32:37 +0000 (12:32 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Fri, 23 Aug 2019 10:39:29 +0000 (11:39 +0100)
commit1cb2b9dfb1c6eecd2d7c13c52640bb51ab8a6ce4
tree9228950881f670704a85453fd584b4bddc6f9ff4
parente17405154eb9ccd0fc7b2b57aed2c7cb927a59db
ARM: 8893/1: boot: Explain the 8 nops

This was unclear to me until Russell explained the obvious
that 8 nops are added to offset an a.out image. Reading
git history reveals that thumb kernels first removed the
nops and then kept 7 of them (the last instruction being
a switch to thumb mode) as it turns out that some boot
loaders were using this as a "patch area". Also the magic
numbers after the initial nops and the jump of course
need to stay in the same offset for kernel file
detection.

Make the code easier to understand with a comment.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Acked-by: Roy Franz <rfranz@marvell.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/boot/compressed/head.S