[ixp1200] Accessing SRAM in IXP2400

Romit Dasgupta romit at myrealbox.com
Wed Jan 14 23:48:49 EST 2004


Hi,
             I am using MVista IXDP2400 preview kit on
a Radisys board (IXP2400). 

The board has DRAM at 0x0x00000000-0x10000000 (256M).

SRAM Channel 0 (4M) : 0x80000000-0x80400000 
SRAM Channel 1 (4M) : 0x90000000-0x90400000


When I boot linux, it can be seen that the kernel is
loaded into 0xc0000000 and its alloted a total of 64M in DRAM space. 

I could not see SRAM at all. To enable SRAM I passed 
mem=64M mem=4M at 0x80000000 in the command line. After
compiling the image and loading it I could see that
the kernel has 68M but  before the root file
system could be enabled many of the ioremaps (used by network driver like eepro100) are
failing. This failures result in the inability to
activate some PCI devices (network card) and thus
cannot load the root file system over NFS. 


Here are the console logs. I have marked some relevant
messages by ^^^^^^

Memstart: c000000
Memsize: 4000000
^^^^^^^^^^^^^^^^^^
Node: 0
Memstart: 80000000
Memsize: 400000
^^^^^^^^^^^^^^^^^^
Node: 0
On node 0 totalpages: 17408
zone(0): 476160 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: console=ttyS0,57600 ip=bootp
root=nfs nohalt mem=64M mem=40
rtsched version <20030619.1708.46>
Calibrating delay loop... 599.65 BogoMIPS
Memory: 64MB 4MB = 68MB total
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Memory: 62812KB available (1168K code, 237K data, 196K
init)
XScale Cache/TLB Locking Copyright(c) 2001 MontaVista
Software, Inc.
XScale cache_lock_init called
   Calling consistent alloc
   low_level_page initialized
   low_level_page @ 0xf4800000
      icache_lock_fn @ 0xf4800080
      dcache_lock_fn @ 0xf48000a0
      icache_unlock_fn @ 0xf4800098
      dcache_unlock_fn @ 0xf48000f0
Initializing TLB locking
TLB locking initialized
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: 2048 (order: 2, 16384
bytes)
Buffer-cache hash table entries: 4096 (order: 2, 16384
bytes)
Page-cache hash table entries: 32768 (order: 5, 131072
bytes)
POSIX conformance testing by UNIFIX
Scanning bus 00
Found 00:00 [8086/9001] 000b40 00
Found 00:08 [8086/b555] 000680 00
Found 00:20 [104c/ac28] 000604 01
Fixups for bus 00
PCI: bus0: Fast back to back transfers enabled
Scanning behind PCI bridge 00:04.0, config 010100,
pass 0
Scanning bus 01
Found 01:00 [8086/1229] 000200 00
Fixups for bus 01
PCI: bus1: Fast back to back transfers enabled
Bus scan for 01 returning with max=01
Scanning behind PCI bridge 00:04.0, config 010100,
pass 1
Bus scan for 00 returning with max=01
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society
NET3.039
Initializing RT netlink socket
Starting kswapd
Disabling the Out Of Memory Killer
devfs: v1.10 (20020120) Richard Gooch
(rgooch at atnf.csiro.au)
devfs: boot_options: 0x1
JFFS2 version 2.1. (C) 2001, 2002 Red Hat, Inc.,
designed by Axis Communication.
Failed to allocate 401728 bytes for deflate workspace
JFFS2 error: Failed to initialise zlib workspaces
i2c-core.o: i2c core module version 2.6.2 (20011118)
i2c-dev.o: i2c /dev entries driver module version
2.6.2 (20011118)
i2c-algo-bit.o: i2c bit algorithm module version 2.6.2
(20011118)
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with
MANY_PORTS SHARE_IRQ SERIAL_PCI ed
ttyS00 at 0xfaffb003 (irq = 2) is a XScale UART
pci_window_address = 0x00000000

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ixpctl: unable to __ioremap PCI memory region

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
block: 128 slots per queue, batch=32
RAMDISK driver initialized: 16 RAM disks of 16384K
size 1024 blocksize
loop: loaded (max 8 devices)
eepro100.c:v1.09j-t 9/29/99 Donald Becker
http://www.scyld.com/network/eepro100l
eepro100.c: $Revision: 1.2 $ 2000/11/17 Modified by
Andrey V. Savochkin <saw at sas
eepro100: cannot remap MMIO region 1000 @ e0200000
Failed to ioremap

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind
8192)
IP-Config: No network devices available.
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: Couldn't find valid RAM disk image starting
at 0.
Freeing initrd memory: 4096K
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
request_module[block-major-2]: Root fs not mounted
VFS: Cannot open root device "nfs" or 02:00
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 02:00
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



My question is how do I enable SRAM? I understand the
memory locations SRAM & DRAM are discontiguos. I tried
doing ioremap and could access SRAM but I feel that
ioremap is only a temporary way to access SRAM. The
funny thing is that when I also try to enable SRAM
channel 1 by 
mem=64M mem=4M at 0x80000000 mem=4M at 0x90000000 the system
halts after saying 

Booting the kernel..



__ioremap(0x80000000, 4*1024*1024,0) and later
__iounmap

works. Not sure if this is the right way to do it. And
I havent digged into why ioremaps by PCI devices in
the eariler case fails. 


Any insight will be very useful. 

Thanks in advance,
-Romit


More information about the ixp1200 mailing list