From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp12.mail.ru (smtp12.mail.ru [94.100.176.89]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 351242C0079 for ; Sun, 17 Feb 2013 22:40:16 +1100 (EST) Message-ID: <5120CFA4.7090005@mail.ru> Date: Sun, 17 Feb 2013 13:40:04 +0100 From: Phileas Fogg MIME-Version: 1.0 To: Geert Uytterhoeven Subject: Re: PS3: Strange issue with kexec and FreeBSD loader References: <1360365046.495584377@f356.mail.ru> <511F652F.4090508@mail.ru> <51201276.8020104@mail.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Cc: linuxppc-dev List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Geert Uytterhoeven wrote: > Hi Phileas, > > On Sun, Feb 17, 2013 at 12:12 AM, Phileas Fogg wrote: >> I found new clues about the problem. >> >> Normally the device tree memory segment is allocated at the top of the boot >> memory region. The boot memory size on the PS3 console is 128MB. >> >> >> root@ps3-linux:~# kexec -l loader.ps3 >> segment[0].mem:0x131d000 memsz:262144 >> segment[1].mem:0x135d000 memsz:36864 >> segment[2].mem:0x7fff000 memsz:4096 >> >> And the device tree is located at address 0x7fff000, it's the last page of >> the boot memory. >> >> I changed the kexec-tools and made it store the device tree just after the >> purgatory code which is located at address 0x135d000. Like here: >> >> >> root@ps3-linux:~# kexec -l loader.ps3 >> segment[0].mem:0x131d000 memsz:262144 >> segment[1].mem:0x135d000 memsz:36864 >> segment[2].mem:0x1366000 memsz:4096 <---- new address of device tree >> segment >> >> And now the sha256 verification is always successful for the FreeBSD loader >> too. >> But still no idea what actually corrupts the device tree segment when it's >> located at the top of the boot memory region. And why it happens on Linux >> 3.7 and Linux 3.8 but not on Linux 3.3.8. > > Have you looked at the actual data that ends up being written there? > It may give a clue... > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/linuxppc-dev > i was able to dump the device tree data from the purgatory code and compared the original DT which i dumped from kexec-tools and the one from purgatory. About 20 bytes at the end of the string table of the device tree were corrupted. Large part of the new data are 0s. regards