]> git.baikalelectronics.ru Git - kernel.git/commit
[POWERPC] Fix detection of loader-supplied initrd on OF platforms
authorPaul Mackerras <paulus@samba.org>
Fri, 13 Apr 2007 00:46:21 +0000 (10:46 +1000)
committerPaul Mackerras <paulus@samba.org>
Fri, 13 Apr 2007 00:46:21 +0000 (10:46 +1000)
commitd51fdc7df994dbb02beceb4b72f852c4984f5791
tree04d9b93ef11262d5b22c5b31810f1cdcb17affe9
parent0e57daa2651d02e4099040fc4f8e40021c1c1fd5
[POWERPC] Fix detection of loader-supplied initrd on OF platforms

Commit c877f094756531224a8d54f706c671bab7aa6a0a introduced code to move
the initrd if it was in a place where it would get overwritten by the
kernel image.  Unfortunately this exposed the fact that the code that
checks whether the values passed in r3 and r4 are intended to indicate
the start address and size of an initrd image was not as thorough as the
kernel's checks.  The symptom is that on OF-based platforms, the
bootwrapper can cause an exception which causes the system to drop back
into OF.

Previously it didn't matter so much if the code incorrectly thought that
there was an initrd, since the values for start and size were just passed
through to the kernel.  Now the bootwrapper needs to apply the same checks
as the kernel since it is now using the initrd data itself (in the process
of copying it if necessary).  This adds the code to do that.

Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/boot/of.c