All of lore.kernel.org
 help / color / mirror / Atom feed
* kernel ported from ELDK 3.0 hangs (loops in idled()) on my custom MPC870 Board
@ 2005-06-03 23:10 Edward Hong
  2005-06-04  1:17 ` Wolfgang Denk
  0 siblings, 1 reply; 9+ messages in thread
From: Edward Hong @ 2005-06-03 23:10 UTC (permalink / raw)
  To: linuxppc-embedded

I am trying to bring up Linux on a custom MPC870 Board using ELDK 3.0.=20

The ported kernel from ELDK 3.0 hangs (loops in idled()) and the kernel_thr=
ead=20
init never gets started!???

The board boots with the following messages:

U-Boot 1.0.2 (May 12 2005 - 15:05:46)

CPU:   MPC885ZPnn at 132 MHz: 8 kB I-Cache 8 kB D-Cache FEC present
Board: Custom MPC870
I2C:   ready
DRAM:  64 MB
FLASH: 64 MB
In:    serial
Out:   serial
Err:   serial
Net:   FEC ETHERNET, FEC2 ETHERNET


Hit any key to stop autoboot:  0=20
=3D> run net_nfs
Using FEC ETHERNET device
TFTP from server 10.15.10.170; our IP address is 10.15.2.101
Filename 'vmlinux.UBoot'.
Load address: 0x200000
Loading: #################################################################
         #################################################################
         ######
done
Bytes transferred =3D 691764 (a8e34 hex)
## Booting image at 00200000 ...
   Image Name:   Linux-2.4.24-pre2
   Created:      2005-06-03  16:17:44 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    691700 Bytes =3D 675.5 kB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
Linux version 2.4.24-pre2 (ehong@chico) (gcc version 3.2.2 20030217 (Yellow=
=20
Dog Linux 3.0 3.2.2-2a_1)) #8 Fri Jun 3 10:13:10 MDT 2005 On node 0=20
totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=3D/dev/nfs rw nfsroot=3D10.15.10.170:/opt/eldk/pp=
c_8xx=20
ip=3D10.15.2.101:10.15.10.170::::eth0:off panic=3D1
Decrementer Frequency =3D 495000000/60
Calibrating delay loop... 131.48 BogoMIPS
Memory: 63132k available (1204k kernel code, 360k data, 60k init, 0k highme=
m)
Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX


(kernel loops in idled() after kernel_thread(init, ...) in rest_init().)=20

Here is the board info printed under u-boot:
=3D> bdinfo
memstart    =3D 0x00000000
memsize     =3D 0x04000000
flashstart  =3D 0xF0000000
flashsize   =3D 0x04000000
flashoffset =3D 0x0001F100
sramstart   =3D 0x00000000
sramsize    =3D 0x00000000
immr_base   =3D 0xFFF00000
bootflags   =3D 0x00000001
intfreq     =3D    132 MHz
busfreq     =3D     66 MHz
ethaddr     =3D 00:D0:1C:01:02:00
IP addr     =3D 10.15.2.101
baudrate    =3D  38400 bps

The bd_info of kernel is copied from u-boot. The IMAP_ADDR of kernel uses=
=20
the same value as the U-Boot CFG_IMMR.=20


Thanks in advance for your help!

Edward

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

* Re: kernel ported from ELDK 3.0 hangs (loops in idled()) on my custom MPC870 Board
  2005-06-03 23:10 kernel ported from ELDK 3.0 hangs (loops in idled()) on my custom MPC870 Board Edward Hong
@ 2005-06-04  1:17 ` Wolfgang Denk
  2005-06-04 23:40   ` Edward Hong
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2005-06-04  1:17 UTC (permalink / raw)
  To: Edward Hong; +Cc: linuxppc-embedded

In message <21fb73bc05060316102325f94d@mail.gmail.com> you wrote:
> I am trying to bring up Linux on a custom MPC870 Board using ELDK 3.0. 

Why are you using old (not to say ancient) tools?

> The ported kernel from ELDK 3.0 hangs (loops in idled()) and the kernel_thread 
> init never gets started!???

How do you know that init didn't  run?  Runningthe  idle  loop  is  a
perfectly normal situation.

> Linux version 2.4.24-pre2 (ehong@chico) (gcc version 3.2.2 20030217 (Yellow
> Dog Linux 3.0 3.2.2-2a_1)) #8 Fri Jun 3 10:13:10 MDT 2005 On node 0 
> totalpages: 16384
> zone(0): 16384 pages.
> zone(1): 0 pages.
> zone(2): 0 pages.
> Kernel command line: root=/dev/nfs rw nfsroot=10.15.10.170:/opt/eldk/pp
> c_8xx 
> ip=10.15.2.101:10.15.10.170::::eth0:off panic=1
> Decrementer Frequency = 495000000/60
> Calibrating delay loop... 131.48 BogoMIPS
> Memory: 63132k available (1204k kernel code, 360k data, 60k init, 0k highme
> m)
> Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
> Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
> Mount cache hash table entries: 512 (order: 0, 4096 bytes)
> Buffer cache hash table entries: 4096 (order: 2, 16384 bytes)
> Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
> POSIX conformance testing by UNIFIX
> 
> 
> (kernel loops in idled() after kernel_thread(init, ...) in rest_init().) 

Are you sure that your kernel configuration is sensible? For example,
did you configure a console port that matches your hardware? Did  you
configure the serial ports (SMC / SCC) at all?

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
I read part of it all the way through.

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

* Re: kernel ported from ELDK 3.0 hangs (loops in idled()) on my custom MPC870 Board
  2005-06-04  1:17 ` Wolfgang Denk
@ 2005-06-04 23:40   ` Edward Hong
  2005-06-05  0:28     ` Wolfgang Denk
  0 siblings, 1 reply; 9+ messages in thread
From: Edward Hong @ 2005-06-04 23:40 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: linuxppc-embedded

On 6/3/05, Wolfgang Denk <wd@denx.de> wrote:
> In message <21fb73bc05060316102325f94d@mail.gmail.com> you wrote:
> > I am trying to bring up Linux on a custom MPC870 Board using ELDK 3.0.
>=20
> Why are you using old (not to say ancient) tools?
>=20
I had the tool ready for a while. After porting u-boot, I realized
that there had been several new tool releases.

> > The ported kernel from ELDK 3.0 hangs (loops in idled()) and the kernel=
_thread
> > init never gets started!???
>=20
> How do you know that init didn't  run?  Runningthe  idle  loop  is  a
> perfectly normal situation.
>=20
My debug lines at the beginning of init never get printed on the
console or in the log_buf.

>=20
> Are you sure that your kernel configuration is sensible? For example,
> did you configure a console port that matches your hardware? Did  you
> configure the serial ports (SMC / SCC) at all?
>=20
I am positive about the kernel configuration. SMC1 was configured as my=20
console.

Any suggestions for debugging?

> Best regards,
>=20
> Wolfgang Denk
>=20
> --
> Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
> I read part of it all the way through.
>=20

Thank you!

Edward

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

* Re: kernel ported from ELDK 3.0 hangs (loops in idled()) on my custom MPC870 Board
  2005-06-04 23:40   ` Edward Hong
@ 2005-06-05  0:28     ` Wolfgang Denk
  2005-06-06  5:33       ` Edward Hong
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2005-06-05  0:28 UTC (permalink / raw)
  To: Edward Hong; +Cc: linuxppc-embedded

In message <21fb73bc0506041640736e3020@mail.gmail.com> you wrote:
>
> My debug lines at the beginning of init never get printed on the
> console or in the log_buf.

With "beginning of init" you mean init() in "init/main.c", right?
So gets rest_init() called?
Did you add a few printk's to start_kernel()?
How far does it get?

> Any suggestions for debugging?

Attach a BDI2000 and start GDB...

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
If something is different, it's either better or worse,  and  usually
both.                                                    - Larry Wall

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

* Re: kernel ported from ELDK 3.0 hangs (loops in idled()) on my custom MPC870 Board
  2005-06-05  0:28     ` Wolfgang Denk
@ 2005-06-06  5:33       ` Edward Hong
  2005-06-06  8:03         ` Wolfgang Denk
  2005-06-06 18:48         ` Randy Vinson
  0 siblings, 2 replies; 9+ messages in thread
From: Edward Hong @ 2005-06-06  5:33 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: linuxppc-embedded

On 6/4/05, Wolfgang Denk <wd@denx.de> wrote:
>=20
> With "beginning of init" you mean init() in "init/main.c", right?
> So gets rest_init() called?
> Did you add a few printk's to start_kernel()?
> How far does it get?
>=20
Yes. rest_init() got called and executed kernel_thread(init,...) ...
and got into cpu_idle().
> > Any suggestions for debugging?
>=20
> Attach a BDI2000 and start GDB...
>=20
I have a BDI2000. But I am not sure how to further debug in my
situation since I know the kernel execution was looping inside
idled().

Thank you!

Edward

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

* Re: kernel ported from ELDK 3.0 hangs (loops in idled()) on my custom MPC870 Board
  2005-06-06  5:33       ` Edward Hong
@ 2005-06-06  8:03         ` Wolfgang Denk
  2005-06-06 18:48         ` Randy Vinson
  1 sibling, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2005-06-06  8:03 UTC (permalink / raw)
  To: Edward Hong; +Cc: linuxppc-embedded

In message <21fb73bc050605223311af6408@mail.gmail.com> you wrote:
>
> I have a BDI2000. But I am not sure how to further debug in my
> situation since I know the kernel execution was looping inside
> idled().

Set a breakpoint earlier in the code and single step?

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
The C-shell doesn't parse. It adhoculates.
    - Casper.Dik@Holland.Sun.COM in <3ol96k$b2j@engnews2.Eng.Sun.COM>

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

* Re: kernel ported from ELDK 3.0 hangs (loops in idled()) on my custom MPC870 Board
  2005-06-06  5:33       ` Edward Hong
  2005-06-06  8:03         ` Wolfgang Denk
@ 2005-06-06 18:48         ` Randy Vinson
  2005-06-06 20:00           ` Edward Hong
  1 sibling, 1 reply; 9+ messages in thread
From: Randy Vinson @ 2005-06-06 18:48 UTC (permalink / raw)
  To: Edward Hong; +Cc: linuxppc-embedded

Edward Hong wrote:
> 
> Yes. rest_init() got called and executed kernel_thread(init,...) ...
> and got into cpu_idle().

Hi Edward,
   I've seen these symptoms before. The problem was traced to external 
interrupts being disabled (MSR[EE] not set). Without external 
interrupts, there is no decrementer interrupt (at least on 7xx 
processors). Without the decrementer, there in no system clock tick and 
without the clock tick, the scheduler won't run which means that the 
init task won't start. To verify that this is the problem, use mfmsr() 
to get the MSR and print it. I'd suggest that you add something like:

     printk("MSR = %x\n", mfmsr());

to rest_init just before call to cpu_idle. Or you can use:

     if (irqs_disabled()) printk(....

if you don't want to decode the MSR yourself.


			Randy Vinson

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

* Re: kernel ported from ELDK 3.0 hangs (loops in idled()) on my custom MPC870 Board
  2005-06-06 18:48         ` Randy Vinson
@ 2005-06-06 20:00           ` Edward Hong
  2005-06-10 21:43             ` Edward Hong
  0 siblings, 1 reply; 9+ messages in thread
From: Edward Hong @ 2005-06-06 20:00 UTC (permalink / raw)
  To: Randy Vinson; +Cc: linuxppc-embedded

On 6/6/05, Randy Vinson <rvinson@mvista.com> wrote:
>=20
> Hi Edward,
>   I've seen these symptoms before. The problem was traced to external
> interrupts being disabled (MSR[EE] not set). Without external
> interrupts, there is no decrementer interrupt (at least on 7xx
> processors). Without the decrementer, there in no system clock tick and
> without the clock tick, the scheduler won't run which means that the
> init task won't start. To verify that this is the problem, use mfmsr()
> to get the MSR and print it. I'd suggest that you add something like:
>=20
>     printk("MSR =3D %x\n", mfmsr());
>
I got  MSR =3D 9032 just before cpu_idle which means EE (the most
significant bit) was enabled.

Thank you!

Edward

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

* Re: kernel ported from ELDK 3.0 hangs (loops in idled()) on my custom MPC870 Board
  2005-06-06 20:00           ` Edward Hong
@ 2005-06-10 21:43             ` Edward Hong
  0 siblings, 0 replies; 9+ messages in thread
From: Edward Hong @ 2005-06-10 21:43 UTC (permalink / raw)
  To: Randy Vinson; +Cc: linuxppc-embedded

It looks like the BDI2000 debugger caused the problem. The kernel
boots fine after removing the debugger.

Thank you very much for all your replies!

Edward

On 6/6/05, Edward Hong <edward.qin.hong@gmail.com> wrote:
> On 6/6/05, Randy Vinson <rvinson@mvista.com> wrote:
> >
> > Hi Edward,
> >   I've seen these symptoms before. The problem was traced to external
> > interrupts being disabled (MSR[EE] not set). Without external
> > interrupts, there is no decrementer interrupt (at least on 7xx
> > processors). Without the decrementer, there in no system clock tick and
> > without the clock tick, the scheduler won't run which means that the
> > init task won't start. To verify that this is the problem, use mfmsr()
> > to get the MSR and print it. I'd suggest that you add something like:
> >
> >     printk("MSR =3D %x\n", mfmsr());
> >
> I got  MSR =3D 9032 just before cpu_idle which means EE (the most
> significant bit) was enabled.
>=20
> Thank you!
>=20
> Edward
>

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

end of thread, other threads:[~2005-06-10 21:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-03 23:10 kernel ported from ELDK 3.0 hangs (loops in idled()) on my custom MPC870 Board Edward Hong
2005-06-04  1:17 ` Wolfgang Denk
2005-06-04 23:40   ` Edward Hong
2005-06-05  0:28     ` Wolfgang Denk
2005-06-06  5:33       ` Edward Hong
2005-06-06  8:03         ` Wolfgang Denk
2005-06-06 18:48         ` Randy Vinson
2005-06-06 20:00           ` Edward Hong
2005-06-10 21:43             ` Edward Hong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.