Linux 2.4.25 / MPC8280 / ram config vs Linux instability?

2005-07-11 Thread Wolfgang Denk
In message <20050711134713.D767067C13 at ozlabs.org> you wrote:
> 
> If I leave the SRAM mapped at higher addresses 0x1000 and SDRAM at
> 0x, like U-boot defaults to Linux works great. However, my goal is
> to map SRAM <8ns speeds> down to the address 0x, to map the vector
> table, so I can achieve a very fast interrupt response time.

How fast is your bus? 8 ns is not exactly very fast.

> I hacked U-boot a little bit to remap these addresses, after all the init

Hacked? No hack at all should have been necessary. This  is  standard
configuration stuff.

> reported to Linux, in the bd->memsize. However, now Linux crashes randomly
> all over the place, mostly sig11's task: swapper. I know this is not an

SO one or your memory banks does not work reliably.

> issue with SDRAM stability, and I can't imagine SRAM having problems seeing
> as its 8ns capable and we're running at 15ns at the moment (66mhz).

And what about the state of your hardware? Did you check the signals,
especially when the CPU is stressing the bus in burst mode?


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Let the programmers be many and the managers few -- then all will  be
productive.   -- Geoffrey James, "The Tao of Programming"



Linux 2.4.25 / MPC8280 / ram config vs Linux instability?

2005-07-11 Thread Dan Malek

On Jul 11, 2005, at 6:38 AM, Absolut Hunter wrote:

> . However, my goal is
> to map SRAM <8ns speeds> down to the address 0x, to map the 
> vector
> table, so I can achieve a very fast interrupt response time.

The things Linux does to cause interrupt latencies are going to ensure
you aren't going to see any differences to the "interrupt response 
time." :-)
 From a system perspective, you are going to be much better off using
your SRAM for CPM data buffering than for any general software use.

> Does anyone have any idea what would cause this instability?

Yeah, I can't find a way to actually map the memory as you have
described.  You actually have the SRAM and SDRAM multiply mapped
on top of one another, and depending upon which chip selects
are used and the values in their registers, you are selecting between
the two memories.  Several cases exist.  You are either mapping the
SRAM on top of the SDRAM, or vice versa.  You really have only 32M
of memory available, so any access to the "upper" 2M is wrapping
around to the lower memory.  Basically, you have a big mess ;-)

You need to map these memories to modulo their size, so to put
the 2M at low memory, you are going to have a hole up to a 32M
boundary before you can map the SDRAM.  It's possible to do
this, but not without some custom Linux modifications.

Thanks.

-- Dan




Linux 2.4.25 / MPC8280 / ram config vs Linux instability?

2005-07-11 Thread Michael Richardson
-BEGIN PGP SIGNED MESSAGE-


> "Absolut" == Absolut Hunter  writes:
Absolut> A useful piece to this might be that I am attempting to map
Absolut> these two memory regions contiguously, so that Linux
Absolut> doesn't see any memory holes.

Absolut> 0-2MB SRAM 2MB-34MB SDRAM

  Likely you can't do that, because you must map the blocks at a
multiple of their address. (I'm not an expert at PPC mappings, but this
is typically the case)

  So you can do:
 0x0   SRAM (has a hole from 2MB->32Mb)
 0x00200   SDRAM

  or:
 0x0   SDRAM
 0x00200   SRAM

Absolut> I would be open to any other ways that SRAM / SDRAM might
Absolut> be mapped to work, and still provide a performance increase
Absolut> for the kernel.

  I think that you would be better to lock the relevant interrupt code
into the cache, if that is possible.
   
- -- 
] Michael Richardson  Xelerance Corporation, Ottawa, ON |  firewalls  [
] mcr @ xelerance.com   Now doing IPsec training, see   |net architect[
] http://www.sandelman.ca/mcr/www.xelerance.com/training/   |device driver[
]I'm a dad: http://www.sandelman.ca/lrmr/ [
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Finger me for keys

iQCVAwUBQtKEkYqHRg3pndX9AQFm6wP8C6xu9Wwbbv/eCr3UaZDcn4mEx35F28s1
eAdYxTqKREhewSJZH1QGn2QGBXxHKMlnBWttgmSYb814aXDeEzEKm3pLg45cB9nj
kU49kcDuyJ8Ug62/dFg9iZn4udfuJJHeaDNGITEwj2ov0RCENdJLsnCO33tZOjEs
Mz9qUutzG4g=
=DGvh
-END PGP SIGNATURE-



Linux 2.4.25 / MPC8280 / ram config vs Linux instability?

2005-07-11 Thread Mark Chambers
> I am using U-boot to configure up the SDRAM and SRAM in our system before
we
> launch Linux. We have 32 Mb of SDRAM and 2 MB of SRAM in the system.
>
> If I leave the SRAM mapped at higher addresses 0x1000 and SDRAM at
> 0x, like U-boot defaults to Linux works great. However, my goal is
> to map SRAM <8ns speeds> down to the address 0x, to map the vector
> table, so I can achieve a very fast interrupt response time.
>

Your core is probably running at about 400MHz, so 66MHz SRAM is still slow.
This is what cache is for.  Maybe you should look into locking interrupt
code in
cache.  Probably, however, you will find that messing with the overall
optimizations
of the kernel will be a net slowdown.

Mark Chambers




Linux 2.4.25 / MPC8280 / ram config vs Linux instability?

2005-07-11 Thread Michael Richardson
-BEGIN PGP SIGNED MESSAGE-


> "Absolut" == Absolut Hunter  writes:
Absolut> If I leave the SRAM mapped at higher addresses 0x1000
Absolut> and SDRAM at 0x, like U-boot defaults to Linux
Absolut> works great. However, my goal is to map SRAM <8ns speeds>
Absolut> down to the address 0x, to map the vector table, so
Absolut> I can achieve a very fast interrupt response time.

  Are you mapping the SRAM *OVER* the lower 2MB of address space?

  If so, then you won't have 34Mb of ram, you'll have 32Mb, and Linux
may well be running off the end under stress.

  My memory is that you can move the vector table to another address.
Wouldn't that be easier?

- -- 
] Michael Richardson  Xelerance Corporation, Ottawa, ON |  firewalls  [
] mcr @ xelerance.com   Now doing IPsec training, see   |net architect[
] http://www.sandelman.ca/mcr/www.xelerance.com/training/   |device driver[
]I'm a dad: http://www.sandelman.ca/lrmr/ [
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Finger me for keys

iQCVAwUBQtJ7yoqHRg3pndX9AQF+eQQA0QBhaZAjq3vDQm8glqV0j+jmzO9+7U0m
aZvOt5FsXu2mv3lS/2FySIQf3UuRcl0lIR5zaNfyn+I11K0YlfZvXgY97U2TMcmu
1K5sod0j3DpaIrK/a+VyWa+tQFe9zoPktazinVoQm4+geNRlTZf9P5XyYwXE7knn
+TOTFRzLq7c=
=iPOS
-END PGP SIGNATURE-



Linux 2.4.25 / MPC8280 / ram config vs Linux instability?

2005-07-11 Thread Steven Blakeslee
> I am using U-boot to configure up the SDRAM and SRAM in our 
> system before we launch Linux. We have 32 Mb of SDRAM and 2 
> MB of SRAM in the system. 
> 

When I was working on an 8260 a while back I had to map PSDRAM at
address 0x and LSDRAM starting at the PSDRAM's end.  I found
that when I made the PSDRAM smaller than the LSDRAM then the LSDRAM was
not mapped properly.  This was due to the fact that the start address
for the memory bank needed to be a multiple of the bank size.  If the
LSDRAM was 32Meg then the start address of the bank needed to be on a
32Meg boundary.

I am not sure but if you are mapping a 2Meg SRAM at 0x followed
by a 32Meg SDRAM then the SDRAM is not on a 32Meg boundary.  This may
not be your issue but it may be worth looking in to.



Linux 2.4.25 / MPC8280 / ram config vs Linux instability?

2005-07-11 Thread Absolut Hunter

A useful piece to this might be that I am attempting to map these two memory
regions contiguously, so that Linux doesn't see any memory holes.

0-2MB SRAM
2MB-34MB SDRAM

I would be open to any other ways that SRAM / SDRAM might be mapped to work,
and still provide a performance increase for the kernel.

-Russell

-Original Message-
From: Absolut Hunter [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 11, 2005 6:38 AM
To: 'linuxppc-embedded at ozlabs.org'
Subject: Linux 2.4.25 / MPC8280 / ram config vs Linux instability?

Anybody,

I ran into a peculiar issue, though it could be user error. 

I am using U-boot to configure up the SDRAM and SRAM in our system before we
launch Linux. We have 32 Mb of SDRAM and 2 MB of SRAM in the system. 

If I leave the SRAM mapped at higher addresses 0x1000 and SDRAM at
0x, like U-boot defaults to Linux works great. However, my goal is
to map SRAM <8ns speeds> down to the address 0x, to map the vector
table, so I can achieve a very fast interrupt response time.

I hacked U-boot a little bit to remap these addresses, after all the init
code was finished. U-boot relocates itself to higher memory, i.e. the last
2MB's of SDRAM and all is well within U-boot. I ran a 14 hour test on the
memory area to proof it. Now we have 0x0220 <34M> memory size being
reported to Linux, in the bd->memsize. However, now Linux crashes randomly
all over the place, mostly sig11's task: swapper. I know this is not an
issue with SDRAM stability, and I can't imagine SRAM having problems seeing
as its 8ns capable and we're running at 15ns at the moment (66mhz).

Linux reports BAT mappings as BAT2=32Mb, BAT3=2MB when all 34 Megs are
presented via U-boot. 

Does anyone have any idea what would cause this instability? Physically all
memory seems to be great if used by itself. I know very little about how
Linux manages its pages, BATS, TBLs, etc... Are the limits on odd memory
sizes? Or certain configurations that it expects to see?

Thanks in advance.

-Russell McGuire




Linux 2.4.25 / MPC8280 / ram config vs Linux instability?

2005-07-11 Thread Absolut Hunter
Anybody,

I ran into a peculiar issue, though it could be user error. 

I am using U-boot to configure up the SDRAM and SRAM in our system before we
launch Linux. We have 32 Mb of SDRAM and 2 MB of SRAM in the system. 

If I leave the SRAM mapped at higher addresses 0x1000 and SDRAM at
0x, like U-boot defaults to Linux works great. However, my goal is
to map SRAM <8ns speeds> down to the address 0x, to map the vector
table, so I can achieve a very fast interrupt response time.

I hacked U-boot a little bit to remap these addresses, after all the init
code was finished. U-boot relocates itself to higher memory, i.e. the last
2MB's of SDRAM and all is well within U-boot. I ran a 14 hour test on the
memory area to proof it. Now we have 0x0220 <34M> memory size being
reported to Linux, in the bd->memsize. However, now Linux crashes randomly
all over the place, mostly sig11's task: swapper. I know this is not an
issue with SDRAM stability, and I can't imagine SRAM having problems seeing
as its 8ns capable and we're running at 15ns at the moment (66mhz).

Linux reports BAT mappings as BAT2=32Mb, BAT3=2MB when all 34 Megs are
presented via U-boot. 

Does anyone have any idea what would cause this instability? Physically all
memory seems to be great if used by itself. I know very little about how
Linux manages its pages, BATS, TBLs, etc... Are the limits on odd memory
sizes? Or certain configurations that it expects to see?

Thanks in advance.

-Russell McGuire