* MPC8560 problem to launch user application like /sbin/init
@ 2004-10-13 17:07 Laurent Lagrange
2004-10-13 21:01 ` Dan Malek
0 siblings, 1 reply; 6+ messages in thread
From: Laurent Lagrange @ 2004-10-13 17:07 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 5183 bytes --]
Hi,
I port a Linux 2.4.25 kernel on a MPC8560 custom board.
I don't use uboot but a custom boot on the board.
The console is mapped on SCC1 port.
CCSRBAR is mapped at 0xF8000000 and immr at 0xF8080000.
I open 2 TLBs on memory and a big TLB for all IOs included CSSRBAR.
Due to IO TLB, I don't io_remap cpm2_immr.
All things run fine until I launch the /sbin/init file from a nfs networK.
The file is right downloaded but seems not to run.
But the board is alived because I can press keys on console and receive
the echo and I can ping the board. It works.
I tried to use other files like /bin/sh, other busybox version, ...
The NFS file system seems to be right and well tested on a 8260 board
ie : the file system is 60x compiled without any special options for E500
core.
I also replaced the nfs by a ramdisk. Same results.
I don't know if uboot sets other things than TLBs to access IOs
and if my own boot is incomplete.
I don't know if cpm must be io_remapped instead of using TLBs.
Any ideas would be welcome.
Thanks
Laurent
loaded at: 00800000 0088C2A4
board data at: 00889130 00889194
relocated to: 0080530C 00805370
zimage at: 00805878 008882AF
avail ram: 0088D000 08000000
Linux/PPC load: devfs=mount ip=bootp root=/dev/nfs rw console=ttyS0,9600
Uncompressing Linux...done.
Now booting the kernel
Memory CAM mapping: CAM0=64Mb, CAM1=64Mb, CAM2=0Mb residual: 0Mb
motobooke_mmu.c110 index=0 virt=c0000000 phys=00000000 size=04000000
flags=82f pid=0
motobooke_mmu.c110 index=1 virt=c4000000 phys=04000000 size=04000000
flags=82f pid=0
motobooke_mmu.c110 index=2 virt=f0000000 phys=f0000000 size=10000000
flags=aaf pid=0
Linux version 2.4.25 (version gcc 3.2.3) #8 mer oct 13 17:30:00 CEST 2004
CPM_MAP_ADDR=F8080000
cpm2_immr=F8080000
On node 0 totalpages: 32768
zone(0): 32768 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: devfs=mount ip=bootp root=/dev/nfs rw
console=ttyS0,9600
OpenPIC Version 1.2 (1 CPUs and 44 IRQ sources) at f8040000
OpenPIC timer frequency is 33.333333 MHz
time_init: decrementer frequency = 33.333333 MHz
Calibrating delay loop... 665.19 BogoMIPS
Memory: 128248k available (924k kernel code, 292k data, 52k init, 0k
highmem)
Dentry cache hash table entries: 16384 (order: 5, 131072 bytes)
Inode cache hash table entries: 8192 (order: 4, 65536 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 8192 (order: 3, 32768 bytes)
Page-cache hash table entries: 32768 (order: 5, 131072 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
CPM UART driver version 0.01
ttyS0 on SCC1 at 0x8000, BRG1
pty: 256 Unix98 ptys configured
loop: loaded (max 8 devices)
eth0: Gianfar Ethernet Controller Version 1.0, 00:10:cd:42:2e:08
eth0: Running with NAPI disabled
eth0: 64/64 RX/TX BD ring size
eth1: Gianfar Ethernet Controller Version 1.0, 00:10:cd:42:2e:09
eth1: Running with NAPI disabled
eth1: 64/64 RX/TX BD ring size
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 1024 buckets, 8Kbytes
TCP: Hash tables configured (established 8192 bind 16384)
eth0: PHY is Marvell 88E1111S (1410cc1)
eth0: Auto-negotiation done
eth0: Full Duplex
eth0: Speed 100BT
eth0: Link is up
eth1: PHY is Marvell 88E1111S (1410cc1)
eth1: No link detected
Sending BOOTP requests . OK
IP-Config: Got BOOTP answer from 192.168.1.65, my address is 192.168.1.98
IP-Config: Complete:
device=eth0, addr=192.168.1.98, mask=255.255.255.0,
gw=255.255.255.255,
host=192.168.1.98, domain=, nis-domain=(none),
bootserver=192.168.1.65, rootserver=192.168.1.65,
rootpath=/home/target/
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Looking up port of RPC 100003/2 on 192.168.1.65
Looking up port of RPC 100005/1 on 192.168.1.65
VFS: Mounted root (nfs filesystem).
Mounted devfs on /dev
Freeing unused kernel memory: 52k init
process.c619 sys_execve out error=0 filename=/sbin/init
free sibling
task PC stack pid father child younger older
init R current 0 1 0 7 (NOTLB)
[c0004510] [c000bf8c] [c0021650] [c002b51c] [c0169714] [c001e12c] [c001e2a8]
[c0
009ce0] [c02c9c30] [00000001]
keventd S 00000000 0 2 1 3 (L-TLB)
[c0004510] [c000bf8c] [c001c7b0] [c00042b8]
ksoftirqd_CPU S 00000000 0 3 1 4 2 (L-TLB)
[c0004510] [c000bf8c] [c0015324] [c00042b8]
kswapd S 00000000 0 4 1 5 3 (L-TLB)
[c0004510] [c000bf8c] [c002a044] [c00042b8]
bdflush S 00000000 0 5 1 6 4 (L-TLB)
[c0004510] [c000bf8c] [c000c61c] [c0037550] [c00042b8]
kupdated R 00000000 0 6 1 7 5 (L-TLB)
[c0004510] [c000bf8c] [c000bcd4] [c0037644] [c00042b8]
rpciod S 00000000 0 7 1 6 (L-TLB)
[c0004510] [c000bf8c] [c00de400] [c00042b8]
??? nothing more ???
[-- Attachment #2: Type: text/html, Size: 7783 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: MPC8560 problem to launch user application like /sbin/init
2004-10-13 17:07 MPC8560 problem to launch user application like /sbin/init Laurent Lagrange
@ 2004-10-13 21:01 ` Dan Malek
2004-10-14 3:13 ` Kumar Gala
0 siblings, 1 reply; 6+ messages in thread
From: Dan Malek @ 2004-10-13 21:01 UTC (permalink / raw)
To: Laurent Lagrange; +Cc: linuxppc-embedded
On Oct 13, 2004, at 1:07 PM, Laurent Lagrange wrote:
> The console is mapped on SCC1 port.
> CCSRBAR is mapped at 0xF8000000 and immr at 0xF8080000.
I would suggest using the standard memory map the rest of
us use for 8560. It makes the porting lots easier.
> I open 2 TLBs on memory and a big TLB for all IOs included CSSRBAR.
> Due to IO TLB, I don't io_remap cpm2_immr.
How do you to this? The linux ppc kernel already manages all
of this mapping for you.
> All things run fine until I launch the /sbin/init file from a nfs
> networK.
Seems like a memory mapping problem. If you are using an 8260
file system, have you also enabled the math emulation in the kernel?
> I don't know if uboot sets other things than TLBs to access IOs
> and if my own boot is incomplete.
> I don't know if cpm must be io_remapped instead of using TLBs.
The u-boot will configure all of the LAWs, and like your boot rom
will also configure some of the TLBs for main memory mapping.
The Linux kernel will change all of the TLBs using the boot rom
TLB maps as a hint.
> Any ideas would be welcome.
Download linuxppc-2.4 from BitKeeper, use one of the existing
85xx ports as a guide for your board. Keep things consistent
with the other board ports. Take a look at one of the board
ports for u-boot to see how it configures the LAWs and TLBs.
-- Dan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: MPC8560 problem to launch user application like /sbin/init
2004-10-13 21:01 ` Dan Malek
@ 2004-10-14 3:13 ` Kumar Gala
2004-10-14 9:49 ` Laurent Lagrange
2004-10-14 15:28 ` Jon Loeliger
0 siblings, 2 replies; 6+ messages in thread
From: Kumar Gala @ 2004-10-14 3:13 UTC (permalink / raw)
To: Laurent Lagrange; +Cc: <linuxppc-embedded@ozlabs.org>
Have you turned on emulation of FP in the kernel?
- kumar
On Oct 13, 2004, at 4:01 PM, Dan Malek wrote:
>
>
> On Oct 13, 2004, at 1:07 PM, Laurent Lagrange wrote:
>
> > The console is mapped on SCC1 port.
> > CCSRBAR is mapped at 0xF8000000 and immr at 0xF8080000.
>
> I would suggest using the standard memory map the rest of
> us use for 8560.=A0 It makes the porting lots easier.
>
> > I open 2 TLBs on memory and a big TLB for all IOs included CSSRBAR.
> > Due to IO TLB, I don't io_remap cpm2_immr.
>
> How do you to this?=A0 The linux ppc kernel already manages all
> of this mapping for you.
>
> > All things run fine until I launch the /sbin/init file from a nfs
> > networK.
>
> Seems like a memory mapping problem.=A0 If you are using an 8260
> file system, have you also enabled the math emulation in the kernel?
>
> > I don't know if uboot sets other things than TLBs to access IOs
> > and if my own boot is incomplete.
> > I don't know if cpm must be io_remapped instead of using TLBs.
>
> The u-boot will configure all of the LAWs, and like your boot rom
> will also configure some of the TLBs for main memory mapping.
> The Linux kernel will change all of the TLBs using the boot rom
> TLB maps as a hint.
>
> > Any ideas would be welcome.
>
> Download linuxppc-2.4 from BitKeeper, use one of the existing
> 85xx ports as a guide for your board.=A0 Keep things consistent
> with the other board ports.=A0 Take a look at one of the board
> ports for u-boot to see how it configures the LAWs and TLBs.
>
>
>
> =A0=A0=A0=A0=A0=A0=A0 -- Dan
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: MPC8560 problem to launch user application like /sbin/init
2004-10-14 3:13 ` Kumar Gala
@ 2004-10-14 9:49 ` Laurent Lagrange
2004-10-14 15:39 ` Jon Loeliger
2004-10-14 15:28 ` Jon Loeliger
1 sibling, 1 reply; 6+ messages in thread
From: Laurent Lagrange @ 2004-10-14 9:49 UTC (permalink / raw)
To: 'Kumar Gala', 'Dan Malek'; +Cc: linuxppc-embedded
Hi,
> Have you turned on emulation of FP in the kernel?
No I did not it, but with the FP emulation on, the Linux runs...
Many thanks for your help.
> > The console is mapped on SCC1 port.
> > CCSRBAR is mapped at 0xF8000000 and immr at 0xF8080000.
> I would suggest using the standard memory map the rest of
> us use for 8560. It makes the porting lots easier.
Sure. But where can I find the standard rules ?
Are the rules dependent on each demo board like 8560_ads ?
Do the custom boots respect some rules ?
> I open 2 TLBs on memory and a big TLB for all IOs included CSSRBAR.
> How do you to this? The linux ppc kernel already manages all
> of this mapping for you.
Right. I let the kernel configure the memory TLBs but I use
a call to io_block_mapping to open the IO space
io_block_mapping(0xf0000000, 0xf0000000, 0x10000000, _PAGE_IO);
Thanks again
Bye
Laurent
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: MPC8560 problem to launch user application like /sbin/init
2004-10-14 9:49 ` Laurent Lagrange
@ 2004-10-14 15:39 ` Jon Loeliger
0 siblings, 0 replies; 6+ messages in thread
From: Jon Loeliger @ 2004-10-14 15:39 UTC (permalink / raw)
To: linuxppc-embedded@ozlabs.org
On Thu, 2004-10-14 at 04:49, Laurent Lagrange wrote:
> Hi,
>
>
> > Have you turned on emulation of FP in the kernel?
> No I did not it, but with the FP emulation on, the Linux runs...
> Many thanks for your help.
Excellent!
> > > The console is mapped on SCC1 port.
> > > CCSRBAR is mapped at 0xF8000000 and immr at 0xF8080000.
> > I would suggest using the standard memory map the rest of
> > us use for 8560. It makes the porting lots easier.
> Sure. But where can I find the standard rules ?
> Are the rules dependent on each demo board like 8560_ads ?
> Do the custom boots respect some rules ?
Uh, rules? No, but in the U-Boot tree, you can find them
in the file u-boot/doc/README.mpc85xxads and, related,
README.mpc85xxcds. Relevant section here:
2. MEMORY MAP TO WORK WITH LINUX KERNEL
2.1. For the initial bringup, we adopted a consistent memory scheme
between u-boot and linux kernel, you can customize it based on your
system requirements:
0x0000_0000 0x7fff_ffff DDR 2G
0x8000_0000 0x9fff_ffff PCI MEM 512M
0xc000_0000 0xdfff_ffff Rapid IO 512M
0xe000_0000 0xe00f_ffff CCSR 1M
0xe200_0000 0xe2ff_ffff PCI IO 16M
0xf000_0000 0xf7ff_ffff SDRAM 128M
0xf800_0000 0xf80f_ffff BCSR 1M
0xff00_0000 0xffff_ffff FLASH (boot bank) 16M
and from the CDS README:
Memory Map
----------
The memory map for u-boot and linux has been extended w.r.t. the ADS
platform to allow for utilization of all 85xx CDS devices. The memory
map is setup for linux to operate properly. The linux source when
configured for MPC85xx CDS has been updated to reflect the new memory
map.
The mapping is:
0x0000_0000 0x7fff_ffff DDR 2G
0x8000_0000 0x9fff_ffff PCI1 MEM 512M
0xa000_0000 0xbfff_ffff PCI2 MEM 512M
0xe000_0000 0xe00f_ffff CCSR 1M
0xe200_0000 0xe2ff_ffff PCI1 IO 16M
0xe300_0000 0xe3ff_ffff PCI2 IO 16M
0xf000_0000 0xf7ff_ffff SDRAM 128M
0xf800_0000 0xf80f_ffff NVRAM/CADMUS (*) 1M
0xff00_0000 0xff7f_ffff FLASH (2nd bank) 8M
0xff80_0000 0xffff_ffff FLASH (boot bank) 8M
(*) The system control registers (CADMUS) start at offset 0xfdb0_4000
within the NVRAM/CADMUS region of memory.
You can get some of the details from the Linux code in the file
linuxppc-2.4/arch/ppc/platforms/mpc85xx_ads_common.h
HTH,
jdl
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: MPC8560 problem to launch user application like /sbin/init
2004-10-14 3:13 ` Kumar Gala
2004-10-14 9:49 ` Laurent Lagrange
@ 2004-10-14 15:28 ` Jon Loeliger
1 sibling, 0 replies; 6+ messages in thread
From: Jon Loeliger @ 2004-10-14 15:28 UTC (permalink / raw)
To: Laurent Lagrange, linuxppc-embedded
On Wed, 2004-10-13 at 22:13, Kumar Gala wrote:
> Have you turned on emulation of FP in the kernel?
>
> - kumar
>
> On Oct 13, 2004, at 4:01 PM, Dan Malek wrote:
>
> >
> >
> > On Oct 13, 2004, at 1:07 PM, Laurent Lagrange wrote:
> >
> > > The console is mapped on SCC1 port.
> > > CCSRBAR is mapped at 0xF8000000 and immr at 0xF8080000.
> >
> > I would suggest using the standard memory map the rest of
> > us use for 8560. It makes the porting lots easier.
Yeah, sticking with the standard memory map will likely help.
Are you using U-Boot to front this booting operation, or
just directly coding your own setup?
> > > All things run fine until I launch the /sbin/init file from a nfs
> > > networK.
Another popular failure mode of this step is the lack of
some library, file or permisssions on a file necessary to
run the init code. A workaround is to statically link the
init code and see if that works too.
HTH,
jdl
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-10-14 15:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-13 17:07 MPC8560 problem to launch user application like /sbin/init Laurent Lagrange
2004-10-13 21:01 ` Dan Malek
2004-10-14 3:13 ` Kumar Gala
2004-10-14 9:49 ` Laurent Lagrange
2004-10-14 15:39 ` Jon Loeliger
2004-10-14 15:28 ` Jon Loeliger
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.