]> git.baikalelectronics.ru Git - kernel.git/commit
x86/boot: Simplify calculation of output address
authorArvind Sankar <nivedita@alum.mit.edu>
Tue, 7 Jan 2020 19:44:34 +0000 (14:44 -0500)
committerBorislav Petkov <bp@suse.de>
Thu, 23 Jan 2020 10:58:43 +0000 (11:58 +0100)
commitb5524185537cff8a4605c0b4333c2d1d34a080ab
tree2d58db55eedf738b53bfefafa5bfd64757c41ae8
parent5e3a5f45a54ec78117c9da523a32602dd5d58d3d
x86/boot: Simplify calculation of output address

Condense the calculation of decompressed kernel start a little.

Committer notes:

before:

ebp = ebx - (init_size - _end)

after:

eax = (ebx + _end) - init_size

where in both ebx contains the temporary address the kernel is moved to
for in-place decompression.

The before and after difference in register state is %eax and %ebp
but that is immaterial because the compressed image is not built with
-mregparm, i.e., all arguments of the following extract_kernel() call
are passed on the stack.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200107194436.2166846-1-nivedita@alum.mit.edu
arch/x86/boot/compressed/head_32.S