diff options
author | raj <raj@FreeBSD.org> | 2008-09-03 16:38:27 +0000 |
---|---|---|
committer | raj <raj@FreeBSD.org> | 2008-09-03 16:38:27 +0000 |
commit | 0750da1abccc9fdc1329cf5f7db99a4000bfd5bf (patch) | |
tree | 6c1771e795c5584f6411eccecb5f25f0cc484a0b /sys/boot/powerpc/uboot/start.S | |
parent | 96ab9f7e27219a4c78c8ea714fe01b029d3c3abf (diff) | |
download | FreeBSD-src-0750da1abccc9fdc1329cf5f7db99a4000bfd5bf.zip FreeBSD-src-0750da1abccc9fdc1329cf5f7db99a4000bfd5bf.tar.gz |
Use current SP instead of global data ptr for the U-Boot API signature search hint.
Global data (pointed by R2 on PowerPC) in principle is not guaranteed to be in
proximity of U-Boot heap (where the API signature is placed) accross different
architectures and platforms. Instead, use U-Boot stack pointer as a hint for
the search instead of the global data; this method tends to be more uniform
accross different platforms.
Obtained from: Semihalf
Diffstat (limited to 'sys/boot/powerpc/uboot/start.S')
-rw-r--r-- | sys/boot/powerpc/uboot/start.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/boot/powerpc/uboot/start.S b/sys/boot/powerpc/uboot/start.S index cee6db7..3e80576 100644 --- a/sys/boot/powerpc/uboot/start.S +++ b/sys/boot/powerpc/uboot/start.S @@ -37,7 +37,7 @@ _start: /* Hint where to look for the API signature */ lis %r11, uboot_address@ha addi %r11, %r11, uboot_address@l - stw %r2, 0(%r11) + stw %r1, 0(%r11) /* Save U-Boot's r14 */ lis %r11, saved_regs@ha addi %r11, %r11, saved_regs@l |