linux/arch/powerpc
Paul Mackerras fa3df07f52 powerpc: Fix COFF zImage booting on old powermacs
commit 5564597d51 upstream.

Commit 6975a783d7 ("powerpc/boot: Allow building the zImage wrapper
as a relocatable ET_DYN", 2011-04-12) changed the procedure descriptor
at the start of crt0.S to have a hard-coded start address of 0x500000
rather than a reference to _zimage_start, presumably because having
a reference to a symbol introduced a relocation which is awkward to
handle in a position-independent executable.  Unfortunately, what is
at 0x500000 in the COFF image is not the first instruction, but the
procedure descriptor itself, that is, a word containing 0x500000,
which is not a valid instruction.  Hence, booting a COFF zImage
results in a "DEFAULT CATCH!, code=FFF00700" message from Open
Firmware.

This fixes the problem by (a) putting the procedure descriptor in the
data section and (b) adding a branch to _zimage_start as the first
instruction in the program.

Fixes: 6975a783d7 ("powerpc/boot: Allow building the zImage wrapper as a relocatable ET_DYN")
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-02-11 17:54:13 +00:00
..
boot powerpc: Fix COFF zImage booting on old powermacs 2019-02-11 17:54:13 +00:00
configs powerpc: Remove platforms/wsp and associated pieces 2014-06-11 16:35:38 +10:00
crypto crypto: add missing crypto module aliases 2015-02-04 10:57:50 +00:00
include powerpc/fadump: handle crash memory ranges array index overflow 2018-12-16 22:08:41 +00:00
kernel powerpc/fadump: handle crash memory ranges array index overflow 2018-12-16 22:08:41 +00:00
kvm KVM: PPC: Book3S HV: Don't truncate HPTE index in xlate function 2018-12-16 22:08:49 +00:00
lib powerpc/lib: Fix the feature fixup tests to actually work 2018-11-20 18:04:53 +00:00
math-emu powerpc: Correct emulated mtfsf instruction 2014-04-07 10:33:11 +10:00
mm powerpc/pseries: Fix unitialized timer reset on migration 2018-12-16 22:09:25 +00:00
net net: filter: make JITs zero A for SKF_AD_ALU_XOR_X 2016-01-25 10:44:05 +00:00
oprofile cpufreq: remove unused notifier: CPUFREQ_{SUSPENDCHANGE|RESUMECHANGE} 2014-03-19 14:10:24 +01:00
perf powerpc/perf: Dereference BHRB entries safely 2018-03-03 15:51:58 +00:00
platforms powerpc/pseries: Fix how we iterate over the DTL entries 2019-02-11 17:53:26 +00:00
sysdev powerpc: Fix size calculation using resource_size() 2018-12-16 22:08:41 +00:00
xmon powerpc/xmon: Fix another endiannes issue in RTAS call from xmon 2015-02-04 10:58:05 +00:00
Kconfig powerpc/bpf/jit: Disable classic BPF JIT on ppc64le 2016-08-22 22:38:18 +01:00
Kconfig.debug powerpc/powernv: Remove OPAL v1 takeover 2014-06-25 13:10:47 +10:00
Makefile powerpc/e500mc: Set assembler machine type to e500mc 2018-11-20 18:05:17 +00:00
relocs_check.pl Fix warning typo "CONFIG_RELCOATABLE" 2013-05-29 15:11:30 +02:00