md.jamal
md.jamal

Reputation: 4567

On 32-bit ARM Linux, how 2 GB RAM is addressed

Virtual address ranges 0xc0000000 (PAGE_OFFSET) .. 0xffffffff is mapped to physical memory.

If RAM is 1024 MB, then 0xc0000000 .. 0xffffffff is mapped to physical memory 0x00000000 to 0x40000000

How it is handled when we have 2GB of RAM on ARM based boards?

Upvotes: 1

Views: 212

Answers (1)

solidpixel
solidpixel

Reputation: 12239

Only pages in the low memory region (below highmem_start_page()) are directly-mapped in the kernel after PAGE_OFFSET. The rest can be dynamically mapped on demand using kmap() and kunmap() if a kernel mapping is needed, and should be unmapped when not needed to avoid running out of virtual address range.

Note that many use cases don't need a kernel memory mapping, as you can directly access the user address space of the running process.

Upvotes: 2

Related Questions