lkml.org 
[lkml]   [2004]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject40x PPC relocation issue during boot
Looking at the current 2.6 tree, there's an issue when one tries to boot a
zImage image (with or without an attached initrd). This is present in the -benh
tree as well.

In ~/arch/ppc/boot/simple/relocate.S the following snip is present:

..
li r9,0xc
mtlr r9
#ifdef CONFIG_PPC_MULTIPLATFORM
/* tell kernel we're prep, by putting 0xdeadc0de at KERNELLOAD,
* and tell the kernel to start on the 4th instruction since we
* overwrite the first 3 sometimes (which are 'nop').
*/
lis r10,0xdeadc0de@h
ori r10,r10,0xdeadc0de@l
li r9,0
stw r10,0(r9)
#endif
blr


We jump to the 4th instruction, but for the 40x class of cpu's this inst being
taken into account anymore. 3 nop's are missing from head_4xx.S:

.text
_GLOBAL(_stext)
_GLOBAL(_start)

/* Save parameters we are passed.
*/
mr r31,r3
mr r30,r4
...
...

The requirements of the 3 nops is silly anyway, but the relocation code needs
to be fixed. I haven't done the patch as I'm not sure if any other code will
overwrite the first 3 instructions. I hit this bug on an IBM 405EP dev
platform.

Torben
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.030 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site