2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 20:53:53 +08:00
linux-next/arch/powerpc
Olaf Hering 6088857b16 [PATCH] correct the comment about stackpointer alignment in __boot_from_prom
The address of variable val in prom_init_stdout is passed to prom_getprop.
prom_getprop casts the pointer to u32 and passes it to call_prom in the hope
that OpenFirmware stores something there.
But the pointer is truncated in the lower bits and the expected value is
stored somewhere else.

In my testing I had a stackpointer of 0x0023e6b4. val was at offset 120,
wich has address 0x0023e72c. But the value passed to OF was 0x0023e728.

c00000000040b710:       3b 01 00 78     addi    r24,r1,120
...
c00000000040b754:       57 08 00 38     rlwinm  r8,r24,0,0,28
...
c00000000040b784:       80 01 00 78     lwz     r0,120(r1)
...
c00000000040b798:       90 1b 00 0c     stw     r0,12(r27)
...

The stackpointer came from 32bit code.
The chain was yaboot -> zImage -> vmlinux

PowerMac OpenFirmware does appearently not handle the ELF sections
correctly.  If yaboot was compiled in
/usr/src/packages/BUILD/lilo-10.1.1/yaboot, then the stackpointer is
unaligned. But the stackpointer is correct if yaboot is compiled in
/tmp/yaboot.

This bug triggered since 2.6.15, now prom_getprop is an inline
function. gcc clears the lower bits, instead of just clearing the
upper 32 bits.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-03-27 14:48:32 +11:00
..
boot Merge ../linux-2.6 2006-03-17 12:01:19 +11:00
configs [PATCH] powerpc: update cell defconfig 2006-03-27 14:48:16 +11:00
kernel [PATCH] correct the comment about stackpointer alignment in __boot_from_prom 2006-03-27 14:48:32 +11:00
lib [PATCH] powerpc: fix various sparse warnings 2006-03-27 14:48:08 +11:00
mm [PATCH] sem2mutex: misc static one-file mutexes 2006-03-26 08:56:55 -08:00
oprofile [PATCH] powerpc: Replace platform_is_lpar() with a firmware feature 2006-03-22 15:04:17 +11:00
platforms [PATCH] spufs: initialize context correctly 2006-03-27 14:48:30 +11:00
sysdev Merge ../powerpc-merge 2006-02-24 14:05:47 +11:00
xmon [PATCH] powerpc: add a raw dump command to xmon 2006-03-17 13:22:33 +11:00
Kconfig [PATCH] bitops: powerpc: use generic bitops 2006-03-26 08:57:14 -08:00
Kconfig.debug [PATCH] powerpc: Make early debugging configurable via Kconfig 2006-01-11 14:48:26 +11:00
Makefile Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild 2006-03-25 08:48:48 -08:00