Skip to contentSkip to conversation

Problem using more than 2 GB with my driver

DISCUSSION Patrice Martinez 4 participants 5 messages Sep 30, 2003 – Oct 1, 2003

lore
Share & tools
lore
#0 lore raw

Hello,

I've got a little problem:
I wrote a driver using the physical addresses of a buffer computed by the "ia64_tpa" function (but no using DMA) that works only on machines with 2Gb of RAM at most. With more RAM, the machine crashes very badly after a while, and even KDB is not usable...
If anybody has an a idea ;-)

Patrice

#1 lore raw
Quoted 6 lines

I've got a little problem:
I wrote a driver using the physical addresses of a buffer computed by the "ia64_tpa" function (but no using DMA) that works only on machines with 2Gb of RAM at most. With more RAM, the machine crashes very badly after a while, and even KDB is not usable...
If anybody has an a idea ;-)

What does your driver do with the physical address (if not for DMA, why does it need the physical address?)

-Tony

#2 lore raw
In reply to Patrice Martinez
Quoted 5 lines · Patrice Martinez

I wrote a driver using the physical addresses of a buffer computed by the "ia64_tpa" function (but no using DMA) that works only on machines with 2Gb of RAM at most. With more RAM, the machine crashes very badly after a while, and even KDB is not usable...
If anybody has an a idea ;-)

Which machine is this on?
rx2600/rx5670 has a memory hole from 2-4GB because of IO "stuff". ie memory > 2G ends up getting placed above 4GB physical.

Sounds like your code is using one or more of:
1) unsigned int
2) signed int -> signed long (automatic conversion for math).
3) linear addressing (not aware of memory holes)

And I'm curious as well what your driver does with physical addresses... It's obviously not DMA since that wouldn't work on most of the ia64 machines out there today.

grant

#3 lore raw
In reply to Patrice Martinez
Quoted 11 lines · Grant Grundler
Quoted 5 lines · Patrice Martinez

I wrote a driver using the physical addresses of a buffer computed by the "ia64_tpa" function (but no using DMA) that works only on machines with 2Gb of RAM at most. With more RAM, the machine crashes very badly after a while, and even KDB is not usable...
If anybody has an a idea ;-)

Which machine is this on?
rx2600/rx5670 has a memory hole from 2-4GB because of IO "stuff". ie memory > 2G ends up getting placed above 4GB physical.

Minor correction, on zx1, memory in the 1-4GB range is relocated. So
there's actually only 1GB of memory below 4GB.

Alex

Signature · 1 line
Alex Williamson                             HP Linux & Open Source Lab
#4 lore raw
In reply to Patrice Martinez

Hello,

In fact, Tony, I'm working on a driver that can copy data directly between user spaces using physical addresses for MPI applications.

And thank you, Grant, there was an integer expression lying between long ones in an address computation which causes losses of high order bits in addresses...

So it works far better now!

Bye ;-)