5

I have a dragonboard410c which is based on arm64 and when it boots , it shows the memory layout:

software IO TLB [mem 0xb6c00000-0xbac00000] (64MB) mapped at [ff]
Memory: 780212K/951296K available (9940K kernel code, 1294K rwda)
Virtual kernel memory layout:                                    
vmalloc : 0xffffff8000000000 - 0xffffffbdbfff0000   (   246 )
vmemmap : 0xffffffbdc0000000 - 0xffffffbfc0000000   (     8 )
          0xffffffbdc0000000 - 0xffffffbdc1000000   (    16 )
fixed   : 0xffffffbffa7fd000 - 0xffffffbffac00000   (  4108 )
PCI I/O : 0xffffffbffae00000 - 0xffffffbffbe00000   (    16 )
modules : 0xffffffbffc000000 - 0xffffffc000000000   (    64 )
memory  : 0xffffffc000000000 - 0xffffffc040000000   (  1024 )
.init : 0xffffffc000e49000 - 0xffffffc000f43000   (  1000 )
.text : 0xffffffc000080000 - 0xffffffc000e483e4   ( 14113 )

I could not find an explanation of the meaning of it. especialy what is the vmemmap region ? and why are there two address interval for it? Also, what are the "fixed" and the "memory" zones ?

I found out that whenever I use kmalloc no meter with what flag, I get an address that is from the memory region. Even if I use vmalloc , the address I receive is not from the vmalloc region. So is it possible to use regions other than the memory region in a kernel module ?

dafnahaktana
  • 837
  • 7
  • 21
  • 2
    See comment on top of `mm/sparse-vmemmap.c` file for explanation about `vmemmap`. For values meaning -- see `mem_init()` function in `arch/arm64/mm/init.c` (where those printings are actually occurred). For `fixed` region -- read comments in `arch/arm64/include/asm/fixmap.h` file. And `memory` zone is just the virtual addresses of DRAM. – Sam Protsenko Apr 16 '17 at 16:19
  • Try using procmap as well: https://github.com/kaiwan/procmap – kaiwan Jan 17 '23 at 03:15

0 Answers0