Kernel logical memory map

Catalin Marinas catalin.marinas at arm.com
Fri Aug 7 12:40:39 EDT 2020


On Wed, Aug 05, 2020 at 11:05:30AM -0400, Derrick McKee wrote:
> In the documentation,

Do you mean Documentation/arm64/memory.rst?

> the first 128TB above user space is marked as
> the kernel logical memory map, and I cannot find an explanation for
> what that is.  What is it used for? 

First of all, its not first above the user space. There is a very large
gap between user and kernel (see the end/start values).

> Can anyone point me towards further explanation of what it is used
> for? 

It's used by the kernel to map the entire RAM.

> I am looking to possibly repurpose some of that space for another use,
> and I want to know if that is even possible.

I wouldn't recommend it. If you need something in the kernel space
(addresses starting with 0xfff...) you can look at reserving some range
as we already do but you need to be a lot more specific. We have the
"vmalloc" space where the kernel does various mappings for itself (e.g.
ioremap).

If you want to repurpose it for user, it's not really possible. This
space is relies on being used in kernel space, it's not context switched
(page tables pointed at by TTBR1_EL1 rather than TTBR1_EL0). However,
you have enough user address space to add stuff in there.

-- 
Catalin



More information about the linux-arm-kernel mailing list