Toshiba 64M limit and slram (was Toshiba ToPIC developer info)

Jörn Engel joern at wohnheim.fh-wedel.de
Wed Jun 22 17:21:14 EDT 2005


On Wed, 22 June 2005 21:10:13 +0100, Russell King wrote:
> 
> Consider what's happening - you're telling the system that you have
> less memory than it actually has, so it only reserves (say) the first
> 512MB of memory.  It then scans the PCI bus and reserves those
> resources.
> 
> When it comes to allocate a new resource for a PCI device, how does
> the kernel know that you _actually_ had (eg) 1GB of RAM - it doesn't
> because you told it you only had 512MB.  So it merrily hands out a
> new resource at, say, 768MB.
> 
> When that happens, it's hardly surprising that the kernel can't
> access the PCI device properly.

I have to agree that slram is a hack.  A proper solution might be to
turn mm/* into a user of the memory address space.  Then we could
explicitly tell mm/* not to use some area and have slram (or rather
phram) take it instead.  Ignoring the stupid names, maybe something
like:

 +----------------------------------------+
 |virtual address space                   |
 |+---------------------------+-----+     |
 ||memory space               | PCI |     |
 ||+-------+-------+          |     |     |
 |||  mm/* | phram |          |     |     |
 ||+-------+-------+          |     |     |
 |+---------------------------+-----+     |
 +----------------------------------------+

Telling mm/* to ignore some space is basically the same operation as
passing mem=.  But the ignored memory is still allocated into the
memory space and cannot be handed out to PCI devices or similar stuff.

Sure, this is major surgery and likely won't happen soon.  But would
it work in principle?

Jörn

-- 
tglx1 thinks that joern should get a (TM) for "Thinking Is Hard"
-- Thomas Gleixner




More information about the linux-mtd mailing list