Subject: memory settings

From: Clive Davies <[email-masked]>
Date: Fri, 2 Jun 2000 08:27:15 -0700

Can anyone tell me what the #defines TASK_SIZE, PAGE_OFFSET and PHYS_OFFSET
in include/asm/arch/memory.h refer to and how they are determined for
different memory maps? If could tell me where to look for this information
that would be even better.

TIA
Clive

unsubscribe: body of `unsubscribe linux-arm-kernel' to [email-masked]

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Fri, 2 Jun 2000 18:20:43 +0100 (BST)

> that would be even better.

  Virtual memory map
0xffffffff +--------+
           |  I/O   |
           |        |
           | Kernel |
0xc0000000 +--------+ ------------ PAGE_OFFSET
           |        | - TASK_SIZE  ^
           |        |   ^          |
           |        |   |          |
           |        |   |          |
           |        |   |          |
           | User   |   |          |
           |        |   |          |
           |        |   |          |
           |        |   |          |
           |        |   |          |
           |        |   |          |
0x00000000 +--------+   -          -

TASK_SIZE defines the top of user memory.
PAGE_OFFSET defines the virtual address at which the kernels view of
memory starts.
PHYS_OFFSET is the physical start of memory.

The 3GB/1GB split between user and kernel space is the best situation.
What I tend to do when porting a new architecture is allocate RAM from
0xc0000000 upwards, and IO from 0xffffffff downwards.

Note that large areas of dynamically allocated IO memory (eg, PCI
memory space) should not be mapped at boot time, but should be mapped
on an as-needed basis using the ioremap/iounmap calls, and accessed
using the {read[bwl],write[bwl]} calls.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |            http://www.arm.linux.org.uk/            /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |