summaryrefslogtreecommitdiffstats
path: root/sys/boot/powerpc
diff options
context:
space:
mode:
authorraj <raj@FreeBSD.org>2008-09-03 16:38:27 +0000
committerraj <raj@FreeBSD.org>2008-09-03 16:38:27 +0000
commit0750da1abccc9fdc1329cf5f7db99a4000bfd5bf (patch)
tree6c1771e795c5584f6411eccecb5f25f0cc484a0b /sys/boot/powerpc
parent96ab9f7e27219a4c78c8ea714fe01b029d3c3abf (diff)
downloadFreeBSD-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')
-rw-r--r--sys/boot/powerpc/uboot/start.S2
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
OpenPOWER on IntegriCloud