* early stage boot progress indication
@ 2002-04-12 10:15 Krzysztof Jankowski
2002-04-13 9:43 ` Greg Griffes
0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Jankowski @ 2002-04-12 10:15 UTC (permalink / raw)
To: linuxppc-embedded
Hi,
I'm pretty new to PPC but I was following this newsgroup for some time.
I've got PPC405 on a custom design board and I'd like to debug the reason why my
linux kernel doesn't work on it. I've downloaded the latest kernel sources
(2.4-devel) so there is no problem with missing or broken 405 support on it.
I wanted to use UART0 for debugging purposes, so I've created simple C function
sending a character to a physical PLB address of UART0 (this function doesn't use
stack for sure, a character to be send is being passed via R3). I'm accessing
physical memory using writel() and readl() macros. The idea seems to be OK.
I put a few my function calls into head_4xx.S file and everything seems to work (I
could see characters on minicom) till the kernel started to execute after
'start_here' label. I know that at this stage kernel's addresses were remapped
from 0x0000xxxx to 0xc000xxxx (am I right?) due MMU being enabled by
'turn_on_mmu'. So I remapped UART's memory space by 'io_block_mapping' - but this
didn't help.
What's going on ? Why I'm not seeing characters now ? Did the kernel hang
somewhere in the middle or am I tottaly wrong in the early debugging idea ?
Thanks for any help,
Krzysztof
--
Encyklopedia multimedialna w prezencie!
http://www.e-mail.onet.pl
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: early stage boot progress indication
2002-04-12 10:15 early stage boot progress indication Krzysztof Jankowski
@ 2002-04-13 9:43 ` Greg Griffes
0 siblings, 0 replies; 2+ messages in thread
From: Greg Griffes @ 2002-04-13 9:43 UTC (permalink / raw)
To: Krzysztof Jankowski; +Cc: linuxppc-embedded
Krzysztof ,
> I know that at this stage kernel's addresses were remapped
> from 0x0000xxxx to 0xc000xxxx (am I right?) due MMU being enabled by
Yes, you are right.
> 'turn_on_mmu'. So I remapped UART's memory space by 'io_block_mapping' - but
this
> didn't help.
You need to map this IO above the kernel. Mine was mapped at 0xEC00_0000.
I was advised to use ioremap instead of io_block_mapping (which limits the
kernels
mapping ability later on.)
>
> What's going on ? Why I'm not seeing characters now ? Did the kernel hang
> somewhere in the middle or am I tottaly wrong in the early debugging idea ?
>
You are not wrong. I did the exact same thing, however, it took some debugging
to get it to work. The kernel probably hung because you have a memory access
violation from the MMU. You can tell by looking in the log_buf area of memory
(you need a jtag debugger to do that.) It will give you the location you were
running
in when the violation occurred, the address you tried to access and all the ppc
registers. It's very nice if you can get to it.
Greg
** 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:[~2002-04-13 9:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-12 10:15 early stage boot progress indication Krzysztof Jankowski
2002-04-13 9:43 ` Greg Griffes
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).