openwrtv4/target/linux/brcm63xx/image/lzma-loader/src
John Crispin 01ca7a34f0 brcm63xx/lzma-loader: fix O32 ABI conformance
According to the calling convention of the o32 ABI the caller
function must reserve stack space for $a0-$a3 registers in case
the callee needs to save its arguments.

The assembly code of the loader does not reserve stack space for
these registers thus when the 'loader_main' function needs to save
its arguments, those will be stored in the 'workspace' area instead
of the stack.

Because the workspace area is also used by other part of the code, the
saved register values gets overwritten and this often leads to failed
kernel boots.

Fix the code to reserve stack space for the registers to avoid this
error.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
[noltari: apply the fix for brcm63xx too]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

SVN-Revision: 48979
2016-03-10 19:10:54 +00:00
..
board.c brcm63xx: lzma-loader: add BCM3380 support 2015-11-04 11:33:07 +00:00
cache.c brcm63xx: add working lzma-loader and use it for initramfs 2014-08-01 21:56:31 +00:00
cache.h brcm63xx: add working lzma-loader and use it for initramfs 2014-08-01 21:56:31 +00:00
cacheops.h brcm63xx: add working lzma-loader and use it for initramfs 2014-08-01 21:56:31 +00:00
config.h brcm63xx: add working lzma-loader and use it for initramfs 2014-08-01 21:56:31 +00:00
cp0regdef.h brcm63xx: add working lzma-loader and use it for initramfs 2014-08-01 21:56:31 +00:00
head.S brcm63xx/lzma-loader: fix O32 ABI conformance 2016-03-10 19:10:54 +00:00
loader.c brcm63xx: add working lzma-loader and use it for initramfs 2014-08-01 21:56:31 +00:00
loader.lds brcm63xx: add working lzma-loader and use it for initramfs 2014-08-01 21:56:31 +00:00
loader2.lds brcm63xx: add working lzma-loader and use it for initramfs 2014-08-01 21:56:31 +00:00
lzma-data.lds brcm63xx: add working lzma-loader and use it for initramfs 2014-08-01 21:56:31 +00:00
LzmaDecode.c brcm63xx: add working lzma-loader and use it for initramfs 2014-08-01 21:56:31 +00:00
LzmaDecode.h brcm63xx: add working lzma-loader and use it for initramfs 2014-08-01 21:56:31 +00:00
LzmaTypes.h brcm63xx: add working lzma-loader and use it for initramfs 2014-08-01 21:56:31 +00:00
Makefile brcm63xx: fix build of lzma-loader with binutils 2.25.1 2016-01-24 12:36:10 +00:00
printf.c brcm63xx: add working lzma-loader and use it for initramfs 2014-08-01 21:56:31 +00:00
printf.h brcm63xx: add working lzma-loader and use it for initramfs 2014-08-01 21:56:31 +00:00