I'm using 32bit linux 4.1.8 with Yocto environment on the P4080DS SoC and noticed that the last 256MB of the 32bit addresses space are reserved for some purpose.
from arch/powerpc/mm/init_32.c:
/*The amount of lowmem must be within 0xF0000000 - KERNELBASE. */
# if (CONFIG_LOWMEM_SIZE > (0xF0000000 - PAGE_OFFSET))
# error "You must adjust CONFIG_LOWMEM_SIZE or CONFIG_KERNEL_START"
# endif
I wanted to use addresses 0XF0000000 - 0XFFFFFFFF for lowmemory but I can't.
What are they reserved for? maybe vmalloc area? and is it possible to resize this reserved area (shrink it)?
thanks..
Linux can only access 768M bytes memory which is defined by CONFIG_LOWMEM_SIZE.
CONFIG_LOWMEM_SIZE=0x30000000
CONFIG_PAGE_OFFSET=0xc0000000
CONFIG_KERNEL_START=0xc0000000
CONFIG_PHYSICAL_START=0x00000000
CONFIG_TASK_SIZE=0xc000000
You could adjust CONFIG_KERNEL_START as 0xd0000000 to assign 0XF0000000 - 0XFFFFFFFF as low memory.
thanks for your reply but my situation is different:
I have 1.5GB RAM and disabled the highmem support.
In order to utilize the full RAM I increased the LOWMEM size to 0X60000000 and reduced the task size to 0x90000000.
My configuration:
CONFIG_LOWMEM_SIZE=0x60000000
CONFIG_PAGE_OFFSET=0x90000000
CONFIG_KERNEL_START=0x90000000
CONFIG_PHYSICAL_START - disabled.
CONFIG_TASK_SIZE=0x90000000
The 4GB of virtual address space is divided: 2.25 - User space (tasks) , 1.75 - Kernel space (low memory + reserved memory)
My question is how can I decrease the kernel reserved memory region (from 256MB to128MB) and increase the TASK_SIZE accordingly without changing the LOWMEM_SIZE.
If I'll move kernel_start the way you suggested , I'll face the same problem - user space 2.25 , kernel reserved region 0.25 , kernel lowmem 1.5. It will just change the locations of kernel start and reserved area...
You could define CONFIG_KERNEL_START as 0x98000000.
thanks for your reply!
just to completly understand:
4GB virtual space:
1. 0x0 - 0x9 : user apps
2. 0x9 - 0x98: ???
3. 0x98 - 0xE8 : kernels lowmem
4. 0xE8 - 0xF: ???
5. 0xF - 0xFFFFFFFF: ???
can you help me filling the blanks?