* bug in early_uart_init()? linuxppc_2_4_devel
@ 2002-12-18 1:01 Brad Parker
2002-12-19 0:14 ` After Uncompresseing Linux..., what's next Prakash kanthi
0 siblings, 1 reply; 16+ messages in thread
From: Brad Parker @ 2002-12-18 1:01 UTC (permalink / raw)
To: LinuxPPC
I think there's a bug in early_uart_init() from linuxppc_2_4_devel.
It sets up a structure and calls early_serial_setup() which crashes
because "req->line" is huge.
early_uart_init() does
...
serial_req.line = rs_table[0].port;
...
and then calls early_serial_setup() in drivers/char/serial.c, which
uses "line" as an index into rs_table. I'm not sure how that's
supposed to work, since in my case port is 0xf40005f0 :-) As a hack I
changed it to
...
serial_req.line = rs_table[0].magic;
...
since the magic # is zero (and seems to be often an index). And that
works, but it's a hack. Seems like "port" will always be a rather
largish hex number.
What's up with ocp_uart? Is there a document which describes what the
ocp code is trying to do?
This is a for a ibm 403GCX, so the following are defined
CONFIG_40x=y
CONFIG_4xx=y
CONFIG_403GCX=y
-brad
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 16+ messages in thread
* After Uncompresseing Linux..., what's next
2002-12-18 1:01 bug in early_uart_init()? linuxppc_2_4_devel Brad Parker
@ 2002-12-19 0:14 ` Prakash kanthi
2002-12-19 1:09 ` Jim Potter
2002-12-19 15:46 ` Tom Rini
0 siblings, 2 replies; 16+ messages in thread
From: Prakash kanthi @ 2002-12-19 0:14 UTC (permalink / raw)
To: LinuxPPC
Hi there,
I was trying to load linuxppc_2_4_devel onto my board.
It goes through the board info read, UART init and
Uncompressing the linux kernel. But after that, i do
not see any messages and board hangs.
Here is the UART output:
------------------------------------
OS Booting...
loaded at: 00400000 0060D1CC
board data at: 00000030 00000044
relocated to: 00405C24 00405C38
zimage at: 00406290 004A08FF
initrd at: 004A1000 006097CA
avail ram: 0060E000 007F8000
Linux/PPC load: console=ttyS0,9600 console=tty1 ip=on
root=/dev/xsysace/disc0/pa
rt3 rw
Uncompressing Linux...done.
Now booting the kernel
-------------------------------------------
After the last line, it hangs. I get a feeling that,
the uncompressing process is not writing in the memory
starting from 0x00000000 and, after uncompressing, it
is jumping into 0x00000000 and is not able to find
anything.
My questions are,
1. How can i make sure that, the uncompressing process
is going to start writing the data from 0x00000000.
2. How big a space this uncompressing process needs?
And also how much overall memory is required for
running linux. I just have 8MB SDRAM.
3. What is the next step in the booting process? Which
Device (eth, pci, ide, ???) Initialization?
Your help is appreciated.
thanks,
Prakash
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-19 0:14 ` After Uncompresseing Linux..., what's next Prakash kanthi
@ 2002-12-19 1:09 ` Jim Potter
2002-12-19 15:46 ` Tom Rini
1 sibling, 0 replies; 16+ messages in thread
From: Jim Potter @ 2002-12-19 1:09 UTC (permalink / raw)
To: Prakash kanthi; +Cc: LinuxPPC
What hardware are you booting?
What bootloader are you using (PPCboot, DINK, etc)?
Do you have a BDI2000 -- you could look at the target memory to see what's
happening. Alternatively, you could throw in some print statements dumping
the target memory before jumping to it. Also some print statements to show
what's happening when you're uncompressing the kernel might be helpful.
You might want to have a look at your caches, making sure they're flushed
(etc).
> Hi there,
>
> I was trying to load linuxppc_2_4_devel onto my board.
> It goes through the board info read, UART init and
> Uncompressing the linux kernel. But after that, i do
> not see any messages and board hangs.
>
> Here is the UART output:
> ------------------------------------
> OS Booting...
>
> loaded at: 00400000 0060D1CC
> board data at: 00000030 00000044
> relocated to: 00405C24 00405C38
> zimage at: 00406290 004A08FF
> initrd at: 004A1000 006097CA
> avail ram: 0060E000 007F8000
>
> Linux/PPC load: console=ttyS0,9600 console=tty1 ip=on
> root=/dev/xsysace/disc0/pa
> rt3 rw
> Uncompressing Linux...done.
> Now booting the kernel
> -------------------------------------------
>
> After the last line, it hangs. I get a feeling that,
> the uncompressing process is not writing in the memory
> starting from 0x00000000 and, after uncompressing, it
> is jumping into 0x00000000 and is not able to find
> anything.
>
> My questions are,
> 1. How can i make sure that, the uncompressing process
> is going to start writing the data from 0x00000000.
>
> 2. How big a space this uncompressing process needs?
> And also how much overall memory is required for
> running linux. I just have 8MB SDRAM.
>
> 3. What is the next step in the booting process? Which
> Device (eth, pci, ide, ???) Initialization?
>
> Your help is appreciated.
>
> thanks,
> Prakash
>
--
Sincerely,
Jim Potter
45th Parallel Processing
Firefighting: Bustin' ours, Savin' yours.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-19 0:14 ` After Uncompresseing Linux..., what's next Prakash kanthi
2002-12-19 1:09 ` Jim Potter
@ 2002-12-19 15:46 ` Tom Rini
1 sibling, 0 replies; 16+ messages in thread
From: Tom Rini @ 2002-12-19 15:46 UTC (permalink / raw)
To: Prakash kanthi; +Cc: LinuxPPC
On Wed, Dec 18, 2002 at 04:14:23PM -0800, Prakash kanthi wrote:
> I was trying to load linuxppc_2_4_devel onto my board.
> It goes through the board info read, UART init and
> Uncompressing the linux kernel. But after that, i do
> not see any messages and board hangs.
>
> Here is the UART output:
> ------------------------------------
> OS Booting...
>
> loaded at: 00400000 0060D1CC
> board data at: 00000030 00000044
> relocated to: 00405C24 00405C38
> zimage at: 00406290 004A08FF
> initrd at: 004A1000 006097CA
> avail ram: 0060E000 007F8000
>
> Linux/PPC load: console=ttyS0,9600 console=tty1 ip=on
> root=/dev/xsysace/disc0/pa
> rt3 rw
> Uncompressing Linux...done.
> Now booting the kernel
[snip]
> 2. How big a space this uncompressing process needs?
> And also how much overall memory is required for
> running linux. I just have 8MB SDRAM.
"Not too much". And the zlib uncompress code will error out if there
are any problems (corruption, lack of memory, etc). So if you got that
far, uncompression worked.
> 3. What is the next step in the booting process? Which
> Device (eth, pci, ide, ???) Initialization?
'???'. Try enabling CONFIG_SERIAL_TEXT_DEBUG, as that will print out
some information prior to printk being usable.
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: After Uncompresseing Linux..., what's next
@ 2002-12-19 16:10 James Don
2002-12-19 16:39 ` Tom Rini
2002-12-20 16:14 ` Prakash kanthi
0 siblings, 2 replies; 16+ messages in thread
From: James Don @ 2002-12-19 16:10 UTC (permalink / raw)
To: 'Prakash kanthi', LinuxPPC
I just went thru this myself ... ;-)
1.) Get a BDM/JTAG tool look halt the processor after you see " Now booting
the kernel" and look for valid asm at 0x0 ... make sure it mathes your
start.s file ...
2.) Veryfy you have your mem map from ppcboot matching requirements for the
kernel i.e ram (physical=0x0, virtual=0xc0000000) and immr (phys 0xff000000
virtual 0xff000000) ... I had my immr in ppc boot at 0x02200000 this screwed
me for quite a while ... otherwise you have no printk ... the memory map is
very important not to screw with some things depend on it (unless your
careful) ...
3.) verify you SMC1 (uart) is getting proper clocking config ... i.e
bus->brg1 and brg1 is 16 times baud rate ... otherwise you have no printk
4.) and always always keep in mind your RAM refesh could be wrong ...
everyone will tell you this even when it has nothing to do with your problem
... try not to ignore them if you are still stuck ;-) But verifying step 1
should prove your ok ...
Best of luck,
Jim
-----Original Message-----
From: Prakash kanthi [mailto:pkanthi@yahoo.com]
Sent: Wednesday, December 18, 2002 7:14 PM
To: LinuxPPC
Subject: After Uncompresseing Linux..., what's next
Hi there,
I was trying to load linuxppc_2_4_devel onto my board.
It goes through the board info read, UART init and
Uncompressing the linux kernel. But after that, i do
not see any messages and board hangs.
Here is the UART output:
------------------------------------
OS Booting...
loaded at: 00400000 0060D1CC
board data at: 00000030 00000044
relocated to: 00405C24 00405C38
zimage at: 00406290 004A08FF
initrd at: 004A1000 006097CA
avail ram: 0060E000 007F8000
Linux/PPC load: console=ttyS0,9600 console=tty1 ip=on
root=/dev/xsysace/disc0/pa
rt3 rw
Uncompressing Linux...done.
Now booting the kernel
-------------------------------------------
After the last line, it hangs. I get a feeling that,
the uncompressing process is not writing in the memory
starting from 0x00000000 and, after uncompressing, it
is jumping into 0x00000000 and is not able to find
anything.
My questions are,
1. How can i make sure that, the uncompressing process
is going to start writing the data from 0x00000000.
2. How big a space this uncompressing process needs?
And also how much overall memory is required for
running linux. I just have 8MB SDRAM.
3. What is the next step in the booting process? Which
Device (eth, pci, ide, ???) Initialization?
Your help is appreciated.
thanks,
Prakash
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-19 16:10 James Don
@ 2002-12-19 16:39 ` Tom Rini
2002-12-20 16:14 ` Prakash kanthi
1 sibling, 0 replies; 16+ messages in thread
From: Tom Rini @ 2002-12-19 16:39 UTC (permalink / raw)
To: James Don; +Cc: 'Prakash kanthi', LinuxPPC
On Thu, Dec 19, 2002 at 11:10:41AM -0500, James Don wrote:
> 2.) Veryfy you have your mem map from ppcboot matching requirements for the
> kernel i.e ram (physical=0x0, virtual=0xc0000000) and immr (phys 0xff000000
> virtual 0xff000000) ... I had my immr in ppc boot at 0x02200000 this screwed
> me for quite a while ... otherwise you have no printk ... the memory map is
> very important not to screw with some things depend on it (unless your
> careful) ...
>
> 3.) verify you SMC1 (uart) is getting proper clocking config ... i.e
> bus->brg1 and brg1 is 16 times baud rate ... otherwise you have no printk
That's all 8xx-specific isn't it 'tho? It looks like this is a Xilinx
ML300 board, and thus a '40x'.
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 16+ messages in thread
* After Uncompresseing Linux..., what's next
2002-12-19 16:10 James Don
2002-12-19 16:39 ` Tom Rini
@ 2002-12-20 16:14 ` Prakash kanthi
2002-12-20 16:32 ` Prakash kanthi
` (2 more replies)
1 sibling, 3 replies; 16+ messages in thread
From: Prakash kanthi @ 2002-12-20 16:14 UTC (permalink / raw)
To: LinuxPPC
Folks,
I just wanted to provide more info on my env. I have
PPC405 based board with no network support forcing me
to use zImage.initrd.elf.
Can you suggest more on my problem described below? I
saw the memory values at 0x00000000 onwards after
uncompressing linux and they have changed. But when
the control jumps to 0x0, my board hangs. I see that
ESR is showing a value of 0x80000000, meaning either
illegal instruction or Machine Check.
Can you tell what's going on? What happens next after
uncompressing? I am thinking it executes start_kernel
function which calls lock_kernel. Let me know if i am
wrong.
thanks,
Prakash
--- James Don <JDon@spacebridge.com> wrote:
> I just went thru this myself ... ;-)
>
> 1.) Get a BDM/JTAG tool look halt the processor
> after you see " Now booting
> the kernel" and look for valid asm at 0x0 ... make
> sure it mathes your
> start.s file ...
>
> 2.) Veryfy you have your mem map from ppcboot
> matching requirements for the
> kernel i.e ram (physical=0x0, virtual=0xc0000000)
> and immr (phys 0xff000000
> virtual 0xff000000) ... I had my immr in ppc boot at
> 0x02200000 this screwed
> me for quite a while ... otherwise you have no
> printk ... the memory map is
> very important not to screw with some things depend
> on it (unless your
> careful) ...
>
> 3.) verify you SMC1 (uart) is getting proper
> clocking config ... i.e
> bus->brg1 and brg1 is 16 times baud rate ...
> otherwise you have no printk
>
> 4.) and always always keep in mind your RAM refesh
> could be wrong ...
> everyone will tell you this even when it has nothing
> to do with your problem
> ... try not to ignore them if you are still stuck
> ;-) But verifying step 1
> should prove your ok ...
>
> Best of luck,
> Jim
>
>
> -----Original Message-----
> From: Prakash kanthi [mailto:pkanthi@yahoo.com]
> Sent: Wednesday, December 18, 2002 7:14 PM
> To: LinuxPPC
> Subject: After Uncompresseing Linux..., what's next
>
>
> Hi there,
>
> I was trying to load linuxppc_2_4_devel onto my
> board.
> It goes through the board info read, UART init and
> Uncompressing the linux kernel. But after that, i do
> not see any messages and board hangs.
>
> Here is the UART output:
> ------------------------------------
> OS Booting...
>
> loaded at: 00400000 0060D1CC
> board data at: 00000030 00000044
> relocated to: 00405C24 00405C38
> zimage at: 00406290 004A08FF
> initrd at: 004A1000 006097CA
> avail ram: 0060E000 007F8000
>
> Linux/PPC load: console=ttyS0,9600 console=tty1
> ip=on
> root=/dev/xsysace/disc0/pa
> rt3 rw
> Uncompressing Linux...done.
> Now booting the kernel
> -------------------------------------------
>
> After the last line, it hangs. I get a feeling that,
> the uncompressing process is not writing in the
> memory
> starting from 0x00000000 and, after uncompressing,
> it
> is jumping into 0x00000000 and is not able to find
> anything.
>
> My questions are,
> 1. How can i make sure that, the uncompressing
> process
> is going to start writing the data from 0x00000000.
>
> 2. How big a space this uncompressing process needs?
> And also how much overall memory is required for
> running linux. I just have 8MB SDRAM.
>
> 3. What is the next step in the booting process?
> Which
> Device (eth, pci, ide, ???) Initialization?
>
> Your help is appreciated.
>
> thanks,
> Prakash
>
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: After Uncompresseing Linux..., what's next
2002-12-20 16:14 ` Prakash kanthi
@ 2002-12-20 16:32 ` Prakash kanthi
2002-12-20 16:49 ` Jim Potter
2002-12-20 16:38 ` Gary Thomas
2002-12-20 16:47 ` Jim Potter
2 siblings, 1 reply; 16+ messages in thread
From: Prakash kanthi @ 2002-12-20 16:32 UTC (permalink / raw)
To: LinuxPPC
I found the correct exception guys. It means
Privileged Instruction Exception.
--- Prakash kanthi <pkanthi@yahoo.com> wrote:
>
> Folks,
>
> I just wanted to provide more info on my env. I have
> PPC405 based board with no network support forcing
> me
> to use zImage.initrd.elf.
>
> Can you suggest more on my problem described below?
> I
> saw the memory values at 0x00000000 onwards after
> uncompressing linux and they have changed. But when
> the control jumps to 0x0, my board hangs. I see that
> ESR is showing a value of 0x80000000, meaning either
> illegal instruction or Machine Check.
>
> Can you tell what's going on? What happens next
> after
> uncompressing? I am thinking it executes
> start_kernel
> function which calls lock_kernel. Let me know if i
> am
> wrong.
>
> thanks,
> Prakash
>
>
>
>
> --- James Don <JDon@spacebridge.com> wrote:
> > I just went thru this myself ... ;-)
> >
> > 1.) Get a BDM/JTAG tool look halt the processor
> > after you see " Now booting
> > the kernel" and look for valid asm at 0x0 ... make
> > sure it mathes your
> > start.s file ...
> >
> > 2.) Veryfy you have your mem map from ppcboot
> > matching requirements for the
> > kernel i.e ram (physical=0x0, virtual=0xc0000000)
> > and immr (phys 0xff000000
> > virtual 0xff000000) ... I had my immr in ppc boot
> at
> > 0x02200000 this screwed
> > me for quite a while ... otherwise you have no
> > printk ... the memory map is
> > very important not to screw with some things
> depend
> > on it (unless your
> > careful) ...
> >
> > 3.) verify you SMC1 (uart) is getting proper
> > clocking config ... i.e
> > bus->brg1 and brg1 is 16 times baud rate ...
> > otherwise you have no printk
> >
> > 4.) and always always keep in mind your RAM refesh
> > could be wrong ...
> > everyone will tell you this even when it has
> nothing
> > to do with your problem
> > ... try not to ignore them if you are still stuck
> > ;-) But verifying step 1
> > should prove your ok ...
> >
> > Best of luck,
> > Jim
> >
> >
> > -----Original Message-----
> > From: Prakash kanthi [mailto:pkanthi@yahoo.com]
> > Sent: Wednesday, December 18, 2002 7:14 PM
> > To: LinuxPPC
> > Subject: After Uncompresseing Linux..., what's
> next
> >
> >
> > Hi there,
> >
> > I was trying to load linuxppc_2_4_devel onto my
> > board.
> > It goes through the board info read, UART init and
> > Uncompressing the linux kernel. But after that, i
> do
> > not see any messages and board hangs.
> >
> > Here is the UART output:
> > ------------------------------------
> > OS Booting...
> >
> > loaded at: 00400000 0060D1CC
> > board data at: 00000030 00000044
> > relocated to: 00405C24 00405C38
> > zimage at: 00406290 004A08FF
> > initrd at: 004A1000 006097CA
> > avail ram: 0060E000 007F8000
> >
> > Linux/PPC load: console=ttyS0,9600 console=tty1
> > ip=on
> > root=/dev/xsysace/disc0/pa
> > rt3 rw
> > Uncompressing Linux...done.
> > Now booting the kernel
> > -------------------------------------------
> >
> > After the last line, it hangs. I get a feeling
> that,
> > the uncompressing process is not writing in the
> > memory
> > starting from 0x00000000 and, after uncompressing,
> > it
> > is jumping into 0x00000000 and is not able to find
> > anything.
> >
> > My questions are,
> > 1. How can i make sure that, the uncompressing
> > process
> > is going to start writing the data from
> 0x00000000.
> >
> > 2. How big a space this uncompressing process
> needs?
> > And also how much overall memory is required for
> > running linux. I just have 8MB SDRAM.
> >
> > 3. What is the next step in the booting process?
> > Which
> > Device (eth, pci, ide, ???) Initialization?
> >
> > Your help is appreciated.
> >
> > thanks,
> > Prakash
> >
> >
>
>
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-20 16:32 ` Prakash kanthi
@ 2002-12-20 16:49 ` Jim Potter
2002-12-20 17:02 ` Jim Potter
0 siblings, 1 reply; 16+ messages in thread
From: Jim Potter @ 2002-12-20 16:49 UTC (permalink / raw)
To: Prakash kanthi; +Cc: LinuxPPC
The early code needs to perform many privileged instructions; make sure that
you aren't restricting the cpu to only user instructions.
> I found the correct exception guys. It means
> Privileged Instruction Exception.
>
> --- Prakash kanthi <pkanthi@yahoo.com> wrote:
> >
> > Folks,
> >
> > I just wanted to provide more info on my env. I have
> > PPC405 based board with no network support forcing
> > me
> > to use zImage.initrd.elf.
> >
> > Can you suggest more on my problem described below?
> > I
> > saw the memory values at 0x00000000 onwards after
> > uncompressing linux and they have changed. But when
> > the control jumps to 0x0, my board hangs. I see that
> > ESR is showing a value of 0x80000000, meaning either
> > illegal instruction or Machine Check.
> >
> > Can you tell what's going on? What happens next
> > after
> > uncompressing? I am thinking it executes
> > start_kernel
> > function which calls lock_kernel. Let me know if i
> > am
> > wrong.
> >
> > thanks,
> > Prakash
> >
> >
> >
> >
> > --- James Don <JDon@spacebridge.com> wrote:
> > > I just went thru this myself ... ;-)
> > >
> > > 1.) Get a BDM/JTAG tool look halt the processor
> > > after you see " Now booting
> > > the kernel" and look for valid asm at 0x0 ... make
> > > sure it mathes your
> > > start.s file ...
> > >
> > > 2.) Veryfy you have your mem map from ppcboot
> > > matching requirements for the
> > > kernel i.e ram (physical=0x0, virtual=0xc0000000)
> > > and immr (phys 0xff000000
> > > virtual 0xff000000) ... I had my immr in ppc boot
> > at
> > > 0x02200000 this screwed
> > > me for quite a while ... otherwise you have no
> > > printk ... the memory map is
> > > very important not to screw with some things
> > depend
> > > on it (unless your
> > > careful) ...
> > >
> > > 3.) verify you SMC1 (uart) is getting proper
> > > clocking config ... i.e
> > > bus->brg1 and brg1 is 16 times baud rate ...
> > > otherwise you have no printk
> > >
> > > 4.) and always always keep in mind your RAM refesh
> > > could be wrong ...
> > > everyone will tell you this even when it has
> > nothing
> > > to do with your problem
> > > ... try not to ignore them if you are still stuck
> > > ;-) But verifying step 1
> > > should prove your ok ...
> > >
> > > Best of luck,
> > > Jim
> > >
> > >
> > > -----Original Message-----
> > > From: Prakash kanthi [mailto:pkanthi@yahoo.com]
> > > Sent: Wednesday, December 18, 2002 7:14 PM
> > > To: LinuxPPC
> > > Subject: After Uncompresseing Linux..., what's
> > next
> > >
> > >
> > > Hi there,
> > >
> > > I was trying to load linuxppc_2_4_devel onto my
> > > board.
> > > It goes through the board info read, UART init and
> > > Uncompressing the linux kernel. But after that, i
> > do
> > > not see any messages and board hangs.
> > >
> > > Here is the UART output:
> > > ------------------------------------
> > > OS Booting...
> > >
> > > loaded at: 00400000 0060D1CC
> > > board data at: 00000030 00000044
> > > relocated to: 00405C24 00405C38
> > > zimage at: 00406290 004A08FF
> > > initrd at: 004A1000 006097CA
> > > avail ram: 0060E000 007F8000
> > >
> > > Linux/PPC load: console=ttyS0,9600 console=tty1
> > > ip=on
> > > root=/dev/xsysace/disc0/pa
> > > rt3 rw
> > > Uncompressing Linux...done.
> > > Now booting the kernel
> > > -------------------------------------------
> > >
> > > After the last line, it hangs. I get a feeling
> > that,
> > > the uncompressing process is not writing in the
> > > memory
> > > starting from 0x00000000 and, after uncompressing,
> > > it
> > > is jumping into 0x00000000 and is not able to find
> > > anything.
> > >
> > > My questions are,
> > > 1. How can i make sure that, the uncompressing
> > > process
> > > is going to start writing the data from
> > 0x00000000.
> > >
> > > 2. How big a space this uncompressing process
> > needs?
> > > And also how much overall memory is required for
> > > running linux. I just have 8MB SDRAM.
> > >
> > > 3. What is the next step in the booting process?
> > > Which
> > > Device (eth, pci, ide, ???) Initialization?
> > >
> > > Your help is appreciated.
> > >
> > > thanks,
> > > Prakash
> > >
> > >
> >
> >
> >
>
--
Sincerely,
Jim Potter
45th Parallel Processing
Firefighting: Bustin' ours, Savin' yours.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-20 16:49 ` Jim Potter
@ 2002-12-20 17:02 ` Jim Potter
0 siblings, 0 replies; 16+ messages in thread
From: Jim Potter @ 2002-12-20 17:02 UTC (permalink / raw)
To: Prakash kanthi, LinuxPPC
I'm not especially familiar with the 4xx cpus, but on the 74xx cpus the MSR
register has the "privilege level" bit, which determines if the processor can
execute both user- and supervisor-level instructions, or only user-level
instructions.
This needs to be setup by the bootloader to allow supervisor-level instructions
to be executed, else you'll see some errors.
> The early code needs to perform many privileged instructions; make sure that
> you aren't restricting the cpu to only user instructions.
>
> > I found the correct exception guys. It means
> > Privileged Instruction Exception.
> >
> > --- Prakash kanthi <pkanthi@yahoo.com> wrote:
> > >
> > > Folks,
> > >
> > > I just wanted to provide more info on my env. I have
> > > PPC405 based board with no network support forcing
> > > me
> > > to use zImage.initrd.elf.
> > >
> > > Can you suggest more on my problem described below?
> > > I
> > > saw the memory values at 0x00000000 onwards after
> > > uncompressing linux and they have changed. But when
> > > the control jumps to 0x0, my board hangs. I see that
> > > ESR is showing a value of 0x80000000, meaning either
> > > illegal instruction or Machine Check.
> > >
> > > Can you tell what's going on? What happens next
> > > after
> > > uncompressing? I am thinking it executes
> > > start_kernel
> > > function which calls lock_kernel. Let me know if i
> > > am
> > > wrong.
> > >
> > > thanks,
> > > Prakash
> > >
> > >
> > >
> > >
> > > --- James Don <JDon@spacebridge.com> wrote:
> > > > I just went thru this myself ... ;-)
> > > >
> > > > 1.) Get a BDM/JTAG tool look halt the processor
> > > > after you see " Now booting
> > > > the kernel" and look for valid asm at 0x0 ... make
> > > > sure it mathes your
> > > > start.s file ...
> > > >
> > > > 2.) Veryfy you have your mem map from ppcboot
> > > > matching requirements for the
> > > > kernel i.e ram (physical=0x0, virtual=0xc0000000)
> > > > and immr (phys 0xff000000
> > > > virtual 0xff000000) ... I had my immr in ppc boot
> > > at
> > > > 0x02200000 this screwed
> > > > me for quite a while ... otherwise you have no
> > > > printk ... the memory map is
> > > > very important not to screw with some things
> > > depend
> > > > on it (unless your
> > > > careful) ...
> > > >
> > > > 3.) verify you SMC1 (uart) is getting proper
> > > > clocking config ... i.e
> > > > bus->brg1 and brg1 is 16 times baud rate ...
> > > > otherwise you have no printk
> > > >
> > > > 4.) and always always keep in mind your RAM refesh
> > > > could be wrong ...
> > > > everyone will tell you this even when it has
> > > nothing
> > > > to do with your problem
> > > > ... try not to ignore them if you are still stuck
> > > > ;-) But verifying step 1
> > > > should prove your ok ...
> > > >
> > > > Best of luck,
> > > > Jim
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Prakash kanthi [mailto:pkanthi@yahoo.com]
> > > > Sent: Wednesday, December 18, 2002 7:14 PM
> > > > To: LinuxPPC
> > > > Subject: After Uncompresseing Linux..., what's
> > > next
> > > >
> > > >
> > > > Hi there,
> > > >
> > > > I was trying to load linuxppc_2_4_devel onto my
> > > > board.
> > > > It goes through the board info read, UART init and
> > > > Uncompressing the linux kernel. But after that, i
> > > do
> > > > not see any messages and board hangs.
> > > >
> > > > Here is the UART output:
> > > > ------------------------------------
> > > > OS Booting...
> > > >
> > > > loaded at: 00400000 0060D1CC
> > > > board data at: 00000030 00000044
> > > > relocated to: 00405C24 00405C38
> > > > zimage at: 00406290 004A08FF
> > > > initrd at: 004A1000 006097CA
> > > > avail ram: 0060E000 007F8000
> > > >
> > > > Linux/PPC load: console=ttyS0,9600 console=tty1
> > > > ip=on
> > > > root=/dev/xsysace/disc0/pa
> > > > rt3 rw
> > > > Uncompressing Linux...done.
> > > > Now booting the kernel
> > > > -------------------------------------------
> > > >
> > > > After the last line, it hangs. I get a feeling
> > > that,
> > > > the uncompressing process is not writing in the
> > > > memory
> > > > starting from 0x00000000 and, after uncompressing,
> > > > it
> > > > is jumping into 0x00000000 and is not able to find
> > > > anything.
> > > >
> > > > My questions are,
> > > > 1. How can i make sure that, the uncompressing
> > > > process
> > > > is going to start writing the data from
> > > 0x00000000.
> > > >
> > > > 2. How big a space this uncompressing process
> > > needs?
> > > > And also how much overall memory is required for
> > > > running linux. I just have 8MB SDRAM.
> > > >
> > > > 3. What is the next step in the booting process?
> > > > Which
> > > > Device (eth, pci, ide, ???) Initialization?
> > > >
> > > > Your help is appreciated.
> > > >
> > > > thanks,
> > > > Prakash
> > > >
> > > >
> > >
> > >
> > >
> >
>
> --
> Sincerely,
>
> Jim Potter
> 45th Parallel Processing
>
> Firefighting: Bustin' ours, Savin' yours.
>
--
Sincerely,
Jim Potter
45th Parallel Processing
Firefighting: Bustin' ours, Savin' yours.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-20 16:14 ` Prakash kanthi
2002-12-20 16:32 ` Prakash kanthi
@ 2002-12-20 16:38 ` Gary Thomas
2002-12-20 16:48 ` Prakash kanthi
2002-12-20 16:47 ` Jim Potter
2 siblings, 1 reply; 16+ messages in thread
From: Gary Thomas @ 2002-12-20 16:38 UTC (permalink / raw)
To: Prakash kanthi; +Cc: linuxppc embedded
On Fri, 2002-12-20 at 09:14, Prakash kanthi wrote:
>
> Folks,
>
> I just wanted to provide more info on my env. I have
> PPC405 based board with no network support forcing me
> to use zImage.initrd.elf.
>
> Can you suggest more on my problem described below? I
> saw the memory values at 0x00000000 onwards after
> uncompressing linux and they have changed. But when
> the control jumps to 0x0, my board hangs. I see that
> ESR is showing a value of 0x80000000, meaning either
> illegal instruction or Machine Check.
>
> Can you tell what's going on? What happens next after
> uncompressing? I am thinking it executes start_kernel
> function which calls lock_kernel. Let me know if i am
> wrong.
>
A *lot* happens, even before the first "printk"!
At the point where the kernel is being started, all that
has happened is the basic image has been loaded to low
memory. The kernel then needs to set up the memory management
(to map things the way it wants to), then perform quite a
lot of initialization, then start up the generic kernel
which will then do things like initialize devices, etc.
Since you just say you have a board (and don't name it),
I assume that you are porting Linux yourself. In this case,
you'll either need some tools (like the BDI already mentioned)
or a lot of patience. You'll need to look at how the kernel
is trying to do its work, at least to the point where you can
get to the first "printk" (which comes during the memory 'find'
sequence on the PPC in arch/ppc/mm/ppc_mmu.c). Once you get
this far, and printk is working, you can then move on and find
out what else needs to be done.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-20 16:38 ` Gary Thomas
@ 2002-12-20 16:48 ` Prakash kanthi
2002-12-20 16:52 ` Gary Thomas
0 siblings, 1 reply; 16+ messages in thread
From: Prakash kanthi @ 2002-12-20 16:48 UTC (permalink / raw)
To: Gary Thomas; +Cc: linuxppc embedded
I do have xilinx tools and i am working with their V2P
product. I completely understands what you are said.
But the problem is, right after the uncompression and
cpy to 0x00000000, i loose total control because i
don't have any clue what is getting executed.
And also, i have my boot monitor code at 0x00000000,
before uncompress process overwrites it. I see that
some of that code is getting executed after jump to
0x0. I reason i am overwriting 0x0 is because, i only
have 8MB RAM.
thanks,
Prakash
--- Gary Thomas <gary@chez-thomas.org> wrote:
> On Fri, 2002-12-20 at 09:14, Prakash kanthi wrote:
> >
> > Folks,
> >
> > I just wanted to provide more info on my env. I
> have
> > PPC405 based board with no network support forcing
> me
> > to use zImage.initrd.elf.
> >
> > Can you suggest more on my problem described
> below? I
> > saw the memory values at 0x00000000 onwards after
> > uncompressing linux and they have changed. But
> when
> > the control jumps to 0x0, my board hangs. I see
> that
> > ESR is showing a value of 0x80000000, meaning
> either
> > illegal instruction or Machine Check.
> >
> > Can you tell what's going on? What happens next
> after
> > uncompressing? I am thinking it executes
> start_kernel
> > function which calls lock_kernel. Let me know if i
> am
> > wrong.
> >
>
> A *lot* happens, even before the first "printk"!
>
> At the point where the kernel is being started, all
> that
> has happened is the basic image has been loaded to
> low
> memory. The kernel then needs to set up the memory
> management
> (to map things the way it wants to), then perform
> quite a
> lot of initialization, then start up the generic
> kernel
> which will then do things like initialize devices,
> etc.
>
> Since you just say you have a board (and don't name
> it),
> I assume that you are porting Linux yourself. In
> this case,
> you'll either need some tools (like the BDI already
> mentioned)
> or a lot of patience. You'll need to look at how
> the kernel
> is trying to do its work, at least to the point
> where you can
> get to the first "printk" (which comes during the
> memory 'find'
> sequence on the PPC in arch/ppc/mm/ppc_mmu.c). Once
> you get
> this far, and printk is working, you can then move
> on and find
> out what else needs to be done.
>
>
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-20 16:48 ` Prakash kanthi
@ 2002-12-20 16:52 ` Gary Thomas
2002-12-20 17:06 ` Prakash kanthi
0 siblings, 1 reply; 16+ messages in thread
From: Gary Thomas @ 2002-12-20 16:52 UTC (permalink / raw)
To: Prakash kanthi; +Cc: linuxppc embedded
On Fri, 2002-12-20 at 09:48, Prakash kanthi wrote:
> I do have xilinx tools and i am working with their V2P
> product. I completely understands what you are said.
> But the problem is, right after the uncompression and
> cpy to 0x00000000, i loose total control because i
> don't have any clue what is getting executed.
>
What sort of things can you do with the Xilinx tools? Is
there any way to set [hardware] breakpoints or single step?
> And also, i have my boot monitor code at 0x00000000,
> before uncompress process overwrites it. I see that
> some of that code is getting executed after jump to
> 0x0. I reason i am overwriting 0x0 is because, i only
> have 8MB RAM.
>
8M should be plenty of RAM.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-20 16:52 ` Gary Thomas
@ 2002-12-20 17:06 ` Prakash kanthi
2002-12-20 17:22 ` Gary Thomas
0 siblings, 1 reply; 16+ messages in thread
From: Prakash kanthi @ 2002-12-20 17:06 UTC (permalink / raw)
To: Gary Thomas; +Cc: linuxppc embedded
Gary,
I really appreciate your help. Here is what i am
doing. Sorry it is little long. But was necessasry.
1. I have a boot loader(xrom.elf) of size around 400KB
which basically have menu driven tests along with an
option to jump to linux kernel(zImage.initrd.elf).
2. xrom.elf is compiled to start at 0xfffffffc and
jump to 0x00000000 to have rest of functionality.
zImage.initrd.elf is compiled to start at 0x00400000.
3. I load zImage.initrd.elf first and then xrom.elf
(xilinx tool makes sure that they are loaded to
corresponding locations based on ELF header).
4. After loading both, i start running xrom.elf and it
shows up a menu in my UART terminal. I jump to linux
(0x00400000).
5. I see that linux is basically reading the board
info, setting UART, prints some boot messages onto it
and then performs uncompression (gunzip function takes
the rest of linux image and puts the uncompressed code
starting from 0x0).
6. Up untill, everything is ok. After this, control
jumps to 0x0 and starts executing.
My problems are,
a. Once the uncompression process is done, i am not
sure if the image is copied to 0x0 (i do see value
changes in memory starting from 0x0).
b. As uncompression process is embedded into
zImage.initrd.elf, i do not objdump does not tell me
which function it is going to execute after
uncompression.
Please suggest.
Thanks,
Prakash
--- Gary Thomas <gary@chez-thomas.org> wrote:
> On Fri, 2002-12-20 at 09:48, Prakash kanthi wrote:
> > I do have xilinx tools and i am working with their
> V2P
> > product. I completely understands what you are
> said.
> > But the problem is, right after the uncompression
> and
> > cpy to 0x00000000, i loose total control because i
> > don't have any clue what is getting executed.
> >
>
> What sort of things can you do with the Xilinx
> tools? Is
> there any way to set [hardware] breakpoints or
> single step?
>
> > And also, i have my boot monitor code at
> 0x00000000,
> > before uncompress process overwrites it. I see
> that
> > some of that code is getting executed after jump
> to
> > 0x0. I reason i am overwriting 0x0 is because, i
> only
> > have 8MB RAM.
> >
>
> 8M should be plenty of RAM.
>
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-20 17:06 ` Prakash kanthi
@ 2002-12-20 17:22 ` Gary Thomas
0 siblings, 0 replies; 16+ messages in thread
From: Gary Thomas @ 2002-12-20 17:22 UTC (permalink / raw)
To: Prakash kanthi; +Cc: linuxppc embedded
On Fri, 2002-12-20 at 10:06, Prakash kanthi wrote:
>
> Gary,
>
> I really appreciate your help. Here is what i am
> doing. Sorry it is little long. But was necessasry.
>
> 1. I have a boot loader(xrom.elf) of size around 400KB
> which basically have menu driven tests along with an
> option to jump to linux kernel(zImage.initrd.elf).
>
> 2. xrom.elf is compiled to start at 0xfffffffc and
> jump to 0x00000000 to have rest of functionality.
> zImage.initrd.elf is compiled to start at 0x00400000.
>
> 3. I load zImage.initrd.elf first and then xrom.elf
> (xilinx tool makes sure that they are loaded to
> corresponding locations based on ELF header).
>
> 4. After loading both, i start running xrom.elf and it
> shows up a menu in my UART terminal. I jump to linux
> (0x00400000).
>
> 5. I see that linux is basically reading the board
> info, setting UART, prints some boot messages onto it
> and then performs uncompression (gunzip function takes
> the rest of linux image and puts the uncompressed code
> starting from 0x0).
>
This is just the secondary bootstrap, whose job is to
unpack the kernel image and put it at location 0x0.
> 6. Up untill, everything is ok. After this, control
> jumps to 0x0 and starts executing.
>
> My problems are,
>
> a. Once the uncompression process is done, i am not
> sure if the image is copied to 0x0 (i do see value
> changes in memory starting from 0x0).
> b. As uncompression process is embedded into
> zImage.initrd.elf, i do not objdump does not tell me
> which function it is going to execute after
> uncompression.
>
The code that executes first is found in arch/ppc/kernel/head.S
Try looking at it, and tracing the execution. If your hardware
(debug environment) can't do things like set breakpoints and
single step, then you're probably limited to very simple
debug techniques like leaving breadcrumbs (write some number
or pattern to a known location which hopefully you can look
at when it dies).
Also, as Jim Potter pointed out, the kernel needs to be started in
the most privileged execution mode since it will be taking
over the CPU completely.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-20 16:14 ` Prakash kanthi
2002-12-20 16:32 ` Prakash kanthi
2002-12-20 16:38 ` Gary Thomas
@ 2002-12-20 16:47 ` Jim Potter
2 siblings, 0 replies; 16+ messages in thread
From: Jim Potter @ 2002-12-20 16:47 UTC (permalink / raw)
To: Prakash kanthi; +Cc: LinuxPPC
Actually it executes quite a lot of code in head.S, before it gets to
start_kernel. Check to see if you can find out exactly where the problem
occurs (for example, on the 74xx cpus, registers SRR0 & SRR1 have this info).
> Folks,
>
> I just wanted to provide more info on my env. I have
> PPC405 based board with no network support forcing me
> to use zImage.initrd.elf.
>
> Can you suggest more on my problem described below? I
> saw the memory values at 0x00000000 onwards after
> uncompressing linux and they have changed. But when
> the control jumps to 0x0, my board hangs. I see that
> ESR is showing a value of 0x80000000, meaning either
> illegal instruction or Machine Check.
>
> Can you tell what's going on? What happens next after
> uncompressing? I am thinking it executes start_kernel
> function which calls lock_kernel. Let me know if i am
> wrong.
>
> thanks,
> Prakash
>
> --- James Don <JDon@spacebridge.com> wrote:
> > I just went thru this myself ... ;-)
> >
> > 1.) Get a BDM/JTAG tool look halt the processor
> > after you see " Now booting
> > the kernel" and look for valid asm at 0x0 ... make
> > sure it mathes your
> > start.s file ...
> >
> > 2.) Veryfy you have your mem map from ppcboot
> > matching requirements for the
> > kernel i.e ram (physical=0x0, virtual=0xc0000000)
> > and immr (phys 0xff000000
> > virtual 0xff000000) ... I had my immr in ppc boot at
> > 0x02200000 this screwed
> > me for quite a while ... otherwise you have no
> > printk ... the memory map is
> > very important not to screw with some things depend
> > on it (unless your
> > careful) ...
> >
> > 3.) verify you SMC1 (uart) is getting proper
> > clocking config ... i.e
> > bus->brg1 and brg1 is 16 times baud rate ...
> > otherwise you have no printk
> >
> > 4.) and always always keep in mind your RAM refesh
> > could be wrong ...
> > everyone will tell you this even when it has nothing
> > to do with your problem
> > ... try not to ignore them if you are still stuck
> > ;-) But verifying step 1
> > should prove your ok ...
> >
> > Best of luck,
> > Jim
> >
> >
> > -----Original Message-----
> > From: Prakash kanthi [mailto:pkanthi@yahoo.com]
> > Sent: Wednesday, December 18, 2002 7:14 PM
> > To: LinuxPPC
> > Subject: After Uncompresseing Linux..., what's next
> >
> >
> > Hi there,
> >
> > I was trying to load linuxppc_2_4_devel onto my
> > board.
> > It goes through the board info read, UART init and
> > Uncompressing the linux kernel. But after that, i do
> > not see any messages and board hangs.
> >
> > Here is the UART output:
> > ------------------------------------
> > OS Booting...
> >
> > loaded at: 00400000 0060D1CC
> > board data at: 00000030 00000044
> > relocated to: 00405C24 00405C38
> > zimage at: 00406290 004A08FF
> > initrd at: 004A1000 006097CA
> > avail ram: 0060E000 007F8000
> >
> > Linux/PPC load: console=ttyS0,9600 console=tty1
> > ip=on
> > root=/dev/xsysace/disc0/pa
> > rt3 rw
> > Uncompressing Linux...done.
> > Now booting the kernel
> > -------------------------------------------
> >
> > After the last line, it hangs. I get a feeling that,
> > the uncompressing process is not writing in the
> > memory
> > starting from 0x00000000 and, after uncompressing,
> > it
> > is jumping into 0x00000000 and is not able to find
> > anything.
> >
> > My questions are,
> > 1. How can i make sure that, the uncompressing
> > process
> > is going to start writing the data from 0x00000000.
> >
> > 2. How big a space this uncompressing process needs?
> > And also how much overall memory is required for
> > running linux. I just have 8MB SDRAM.
> >
> > 3. What is the next step in the booting process?
> > Which
> > Device (eth, pci, ide, ???) Initialization?
> >
> > Your help is appreciated.
> >
> > thanks,
> > Prakash
> >
> >
>
--
Sincerely,
Jim Potter
45th Parallel Processing
Firefighting: Bustin' ours, Savin' yours.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2002-12-20 17:22 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-18 1:01 bug in early_uart_init()? linuxppc_2_4_devel Brad Parker
2002-12-19 0:14 ` After Uncompresseing Linux..., what's next Prakash kanthi
2002-12-19 1:09 ` Jim Potter
2002-12-19 15:46 ` Tom Rini
-- strict thread matches above, loose matches on Subject: below --
2002-12-19 16:10 James Don
2002-12-19 16:39 ` Tom Rini
2002-12-20 16:14 ` Prakash kanthi
2002-12-20 16:32 ` Prakash kanthi
2002-12-20 16:49 ` Jim Potter
2002-12-20 17:02 ` Jim Potter
2002-12-20 16:38 ` Gary Thomas
2002-12-20 16:48 ` Prakash kanthi
2002-12-20 16:52 ` Gary Thomas
2002-12-20 17:06 ` Prakash kanthi
2002-12-20 17:22 ` Gary Thomas
2002-12-20 16:47 ` Jim Potter
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).