linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* kernel hangs in copy_and_flush while `lwzx` instruction
@ 2003-01-25 16:12 Omanakuttan
  2003-01-25 18:01 ` Dan Malek
  0 siblings, 1 reply; 2+ messages in thread
From: Omanakuttan @ 2003-01-25 16:12 UTC (permalink / raw)
  To: linuxppc-embedded


Hi,
we are facing a problem in booting monta vista linux on mpc8260ads
board. kernel is

#define UTS_RELEASE "2.4.17_mvl21"

kernel hangs while executing the following lines in arch/ppc/kernel/head.S.

--code begins--
/*
  * Copy routine used to copy the kernel to start at physical address 0
  * and flush and invalidate the caches as needed.
  * r3 = dest addr, r4 = source addr, r5 = copy limit, r6 = start offset
  * on exit, r3, r4, r5 are unchanged, r6 is updated to be >= r5.
  */
copy_and_flush:
         addi    r5,r5,-4
         addi    r6,r6,-4
4:      li      r0,L1_CACHE_LINE_SIZE/4
         mtctr   r0
3:      addi    r6,r6,4                 /* copy a cache line */

/** execution hangs in the next instruction */
         lwzx    r0,r6,r4
/* never reaches here */
         stwx    r0,r6,r3
         bdnz    3b
         dcbst   r6,r3                   /* write it to memory */
         sync
         icbi    r6,r3                   /* flush the icache line */
         cmplw   0,r6,r5
         blt     4b
         sync                      /* additional sync needed on g4 */
         isync
         addi    r5,r5,4
         addi    r6,r6,4
         blr

--code ends--
Instruction `lwzx` tries to load from 0xc0100000 which is the r4
content. This is out of our memory limits and in turn cpu hangs (run led
goes off). We tried with bdi2000, but unable to set any breakpoints. We
found out it by debugging using programmable sl1 and sl0 leds in the code.

Any help is appreciated.
Thanks and regards,
Om and kamal


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

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

* Re: kernel hangs in copy_and_flush while `lwzx` instruction
  2003-01-25 16:12 kernel hangs in copy_and_flush while `lwzx` instruction Omanakuttan
@ 2003-01-25 18:01 ` Dan Malek
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Malek @ 2003-01-25 18:01 UTC (permalink / raw)
  To: Omanakuttan; +Cc: linuxppc-embedded


Omanakuttan wrote:

> kernel hangs while executing the following lines in arch/ppc/kernel/head.S.

You shouldn't be executing that code at all for this board/processor combination.
The conditions that get you into this indicate the kernel isn't built or
loaded properly.


	-- Dan


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

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

end of thread, other threads:[~2003-01-25 18:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-25 16:12 kernel hangs in copy_and_flush while `lwzx` instruction Omanakuttan
2003-01-25 18:01 ` Dan Malek

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).