Subject: Re: memory mapping

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Tue, 1 Sep 1998 19:14:14 +0100 (BST)

Mark van Doesburg writes:
> I am a little confused about the memory mapping for the ebsa-285. The
> kernel is mapped at 0xc0000000, all memory mapped I/O is above that
> adres. Is there a reason the kernel is not mapped on its physical
> address ?

There is no segmentation of the memory space.  Hence, if you want the
kernel to be located at 0x10000000 (the SDRAM physical address), all
user binaries will be limited to 0x00008000 to 0x10000000, ie 250MB.

> The problem is that i need access to all the PCI memory space (4GB),
> therfore i would need to map the 2GB the 21285 has reserved for this
> somewhere.

Do you have a device that provides 2GB of memory at one time?  I'd think
that this is unlikely, and that you probably have a set of cards.  The
resulting PCI usage will generally be quite sparse.  Therefore, you
should be able to get away with mapping the areas that contain useful
information only.

> Can anyone tell if i can just do a ioremap and expect things to work.
> If not, why not, and more important what can i do about it ?

ioremap is not currently implemented on ARM yet, but it is in my pipeline
of things to do.  If you want to code it, please look at what the i386 
one does and send the relevent (tested) patches to my patch system.

> I've already registered another architecture to do all of this, since
> the virt_to_bus and bus_to_virt would be different for my board.

Are they significantly different?

> Finally, i would like to know how the user process sees the memory
> space.  Does the kernel appear in a non accessable part of the memory,
> and if so, where does it appear ?

You've already mentioned it!  The kernel appears at 0xc0000000 in all
current machines.

I would prefer that the memory structure is identical across all machines,
especially the user-space, to guarantee binary compatability.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.uk.linux.org/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]