Okay! got that!
VMALLOC_END is a define, it is decided staticly when compile.
but VMALLOC_START is a dynamic value, which is calculated when running.
VMALLOC_START depends on the "vmalloc=XXX" parameter which is passed by
bootloader(u-boot). so if you specify a large vmalloc size in bootloader, for example
"vmalloc=512M", the VMALLOC_START will be reduced accordingly.
the rough formula is as below:
1. define VMALLOC_END = 0xF0000000
2. pass in parameter "vmalloc=256M" in u-boot.
3. in kernel SW, a global variable VMALLOC_MIN = VMALLOC_END - vmalloc_size =
0xF0000000 - 256M = 0xE0000000
4. calculate total size of "mem=" which is passed by u-boot, for example total memory size is 1GB.
5. global variable high_memory = VMALLOC_MIN = 0xE0000000, so lowmem is from 0xC0000000 ~
0xE0000000, totoal 512MB, and total high memory is 512MB.
6. VMALLOC_START = high_memory + 8MB = 0xE0800000.
at last , the vmalloc region will be 0xE0800000 ~ 0xF0000000
|
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies