Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=390cbb56a731546edc0f35fbc4c5045676467581
Commit:     390cbb56a731546edc0f35fbc4c5045676467581
Parent:     0727702a3a6a9e33db4a4f9a038327d014753b6e
Author:     Paul Mackerras <[EMAIL PROTECTED]>
AuthorDate: Fri Apr 13 10:46:21 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Fri Apr 13 10:46:21 2007 +1000

    [POWERPC] Fix detection of loader-supplied initrd on OF platforms
    
    Commit 79c8541924a220964f9f2cbed31eaa9fdb042eab 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 <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/of.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/boot/of.c b/arch/powerpc/boot/of.c
index 2cec5c1..8fb42b6 100644
--- a/arch/powerpc/boot/of.c
+++ b/arch/powerpc/boot/of.c
@@ -282,6 +282,8 @@ void platform_init(unsigned long a1, unsigned long a2, void 
*promptr)
 
        prom = (int (*)(void *))promptr;
        loader_info.promptr = promptr;
-       loader_info.initrd_addr = a1;
-       loader_info.initrd_size = a2;
+       if (a1 && a2 && a2 != 0xdeadbeef) {
+               loader_info.initrd_addr = a1;
+               loader_info.initrd_size = a2;
+       }
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to