linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: ppc-linux still not booting on my virtexII board
@ 2008-04-25  3:18 yanlong wang
  0 siblings, 0 replies; 5+ messages in thread
From: yanlong wang @ 2008-04-25  3:18 UTC (permalink / raw)
  To: linuxppc-embedded@ozlabs.org

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

   Hi , guys , i meet the same problem as yours . when it  into the
early_init(), the system was hang up .  I see your solution , but i don't
known it clearly . Can you tell me detailly ??? Why it happened and the
solution .
   Waiting for your reply , thank you :)


Hi,

>* (...)arch/ppc/boot/simple/embed_config.c
*
Oops, I skipped that code because my bootloader executes the uncompressed
kernel image (loaded at 0x00000000) without doing that stuff in the first
place. All right ;)

Thanks again,
Patrick

[-- Attachment #2: Type: text/html, Size: 639 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread
* ppc-linux still not booting on my virtexII board
@ 2004-08-25 16:40 Patrick Huesmann
  2004-08-25 19:10 ` Scott Anderson
  0 siblings, 1 reply; 5+ messages in thread
From: Patrick Huesmann @ 2004-08-25 16:40 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: v2p


Hi,

I traced down the problem a little further. Apparently the machine crashes
on certain memory accesses.

early_init() in arch/ppc/kernel/setup.c calls
memset_io(PTRRELOC(&__bss_start), 0, _end - __bss_start) to zero out the BSS
section. I substituted memset_io with my own memset function and found out
that the given parameters are ok, according to the symbol table. I then made
up a "debug memset" like this:

void mymemset(char *ptr, int c, int len)
{
  while (len--) {
    <code that waits for uart rx>
    hexout((int)ptr); // print the current address
    *(ptr++) = c;
  }
}

then I found that the board crashes always at the same address (c00931c0),
that is 0x01c0 bytes in the BSS section (which begins at c0093000).

Then I incremented "ptr" by a fixed offset (0x80) at the beginning of
mymemset(), to find out that the cpu then crashes when writing to the exact
same location c00931c0 (therefore one could think that it depends on the
absolute address, not on the number of bytes written).

Now it's getting weird. Assuming that there is something wrong with the
memory bus or memory controller, I wrote to that address using my
(homegrown) ROM monitor. But that is no problem and I would read back the
correct values from that address. The only difference is that the ROM
monitor uses no MMU (therefore I used 0x000931c0 instead of 0xc00931c0).

One could argue that there is something wrong with the initial MMU, but then
I can't think of a reason why it should happen at such a "odd" address.

Then there is a possibility of cache problems. Someone on this list
suggested that I better flush the caches before booting, using a code
snippet like this:

for(i=0; i<16384; i+=32) {
  asm("dccci 0,%0" :: "r"(i));
}
asm("iccci 0,0");
asm("sync;isync");

Ok, i inserted this code snippet at the beginning of early_init(), and then
BANG! the board crashed immediately.

I reproduced the memset() thing with both the denx kernel tree and the
kernel port for memec V2P eval board, supplied by the kind people at
mind.be.

The kernel versions are 2.4.25 and 2.4.22, respectively. My toolchain is a
powerpc-405-linux-gnu- with gcc version 3.3.2, which I downloaded in binary
form at
http://developer.osdl.org/dev/plm/cross_compile/powerpc-405-linux-gnu.tar.bz2
(I suspect that it's a crosstool generated one).

Perhaps someone who knows this weird processor better than me, can shed some
light? I'm no dumbass when it comes to the low level stuff, but I only know
some ARMs and PICs in this detail and this is my very first PPC project.
Thank you very much.

Regards,
Patrick


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-04-25  3:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-25  3:18 ppc-linux still not booting on my virtexII board yanlong wang
  -- strict thread matches above, loose matches on Subject: below --
2004-08-25 16:40 Patrick Huesmann
2004-08-25 19:10 ` Scott Anderson
2004-08-25 19:25   ` Patrick Huesmann
2004-08-25 20:09   ` Patrick Huesmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).