AMiLDA FORUM

You are not logged in.

Announcement

### Our Homepage is down at the moment...work in progress !! ###

#1 2006-05-31 03:52:55

HH
Developer
Registered: 2006-02-15
Last visit: 2007-03-12
Posts: 103

32 Meg memory

Does anyone else have a device with 32 MB of memory?  I do and I have a big problem trying to use it all.  I modified the prom startup to specify memory size 0x00200000.  It boots and runs but after a time it always ends up in a kernel oops or panic.  I looked through the linux-mips mailing list archives but there doesn't seem to be anything seriously wrong with memory init or paging on the 2.4 kernels.

Maybe it has something to do with the way the bootloader is setting up the adm5120 memory control and config registers.  I looked closely at the board and found that the 2 RAM chips share the same address lines and chip select signals.  I tested this with a dvm so I am sure of it.  The 16-output data lines are separate from each other, giving a combined 32-bit output when the RAM is accessed by the adm5120 on-chip memory controller.  I'm not sure if the controller is being set up properly.

When I first got the router with the original firmware on it, it used to crash and reboot several times a day.  I'm not 100% sure but I think this memory problem (cache or paging) was the cause.  After 2 updates to the firmware it became stable and stopped crashing.  I think this is the problem that Hawking somehow fixed.  They don't provide source code so it's impossible to say for sure.  I reported their GPL violation several months ago to http://www.gpl-violations.org/ but no response or action so far.

I've added debugging printk statements to the paging routines and tried many different setups of the memory controller.  Nothing seems to work.  Anybody have any ideas where to look?  Anybody have any experience setting up a gdbserver on their device that can be accessed remotely?  I really don't know what to try next.  I hate to have 32 MB of memory and half of it is unusable.  One of the things I want to do is use iptables to support a blacklist of IP address ranges that will not be permitted to send any packets through the router to any machine on my network.  It would really help if I could use that extra 16 MB of memory.

Offline

 

#2 2006-06-01 15:04:23

sergioag
Developer
Peru
From: Lima
Registered: 2006-02-16
Last visit: 2011-08-15
Posts: 166
Website

Re: 32 Meg memory

It's really quite bad that some manufacturers don't release the sources as needed by the GPL license. I can't help you much on this, 'cause i only have models with 16mb. Anyway i i'll check to see if there are any evident problems on the memory code.

Regards,

Sergio

Offline

 

#3 2006-06-02 00:31:08

HH
Developer
Registered: 2006-02-15
Last visit: 2007-03-12
Posts: 103

Re: 32 Meg memory

Thanks, Sergio.  I appreciate it very much.  I don't think it's my memory controller init that's bad because the same thing happens when I just use the regular bootloader from the vendor.  My problem, btw, is with a 2.4.18 kernel.  I will try Amilda and the 2.4.32 kernel next and see if the same problem exists.

Last edited by HH (2006-06-02 00:33:20)

Offline

 

#4 2006-06-07 11:05:56

HH
Developer
Registered: 2006-02-15
Last visit: 2007-03-12
Posts: 103

Re: 32 Meg memory

Updated information for AMiLDA...  in arch/mips/adm5120/prom.c I changed

char *adm5120_envp[2*ADM5120_ENVC] = {"memsize","0x01000000"};

to

char *adm5120_envp[2*ADM5120_ENVC] = {"memsize","0x02000000"};

AMiLDA boots and runs without crashing.

Code::

~ # cat /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:  31219712  9031680 22188032        0    94208  6897664
Swap:        0        0        0
MemTotal:        30488 kB
MemFree:         21668 kB
MemShared:           0 kB
Buffers:            92 kB
Cached:           6736 kB
SwapCached:          0 kB
Active:           1024 kB
Inactive:         5820 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        30488 kB
LowFree:         21668 kB
SwapTotal:           0 kB
SwapFree:            0 kB
~ #

There is only 1 problem.  Networking does not work.  I can't ping anything outside.

Code::

~ # ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:65:43:21:11:01
          inet addr:192.168.1.95  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:70 errors:0 dropped:0 overruns:0 frame:0
          TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:10947 (10.6 KiB)  TX bytes:1386 (1.3 KiB)
          Interrupt:9

~ # ip route show
192.168.1.0/24 dev eth0  src 192.168.1.95
default via 192.168.1.2 dev eth0
~ #

That all looks good.

Without the change to memsize all networking is normal.

Offline

 

#5 2006-06-08 09:48:20

ericandor
Member
Poland
Registered: 2006-02-17
Last visit: 2007-01-05
Posts: 16

Re: 32 Meg memory

Hi!

I am not really good at this stuff, but maybe ethernet driver use some hardcoded memory address
that is used for communication with ethernet hardware, and when You change the amount of memory
then it overlaps address space used for communication with ethernet driver.

That's just a guess smile

Best wishes

Ericandor

Offline

 

#6 2006-06-09 00:27:55

HH
Developer
Registered: 2006-02-15
Last visit: 2007-03-12
Posts: 103

Re: 32 Meg memory

I managed to get networking functional in AMiLDA with 32 MB.  My problem was vlan related, but once I got that straightened out it was OK.

I'm going to start looking at the ethernet drivers in 2.4.18 next.  This is all very frustrating.  I curse every vendor who refuses to distribute their GPL source code.  They are no better than software pirates IMO.  In this case I'm talking about Hawking and Inprocomm.  I also curse ADMTEK or whoever they are these days for lousy documentation.  There are a ton of features and registers that are simply not documented well enough.  Furthermore, the Linux code they made available - only through Edimax as far as I can tell - they put restrictive copyright notices in it so that the linux-mips project never accepted the adm5120 into their source tree, thus dooming all of us to wasting hours and hours trying to figure out how it's supposed to work.  Damn them all.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB