understanding the physical and virtual memory layout in my kernel

大憨熊 提交于 2019-12-12 14:21:35

问题


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 ?

来源:https://stackoverflow.com/questions/43437315/understanding-the-physical-and-virtual-memory-layout-in-my-kernel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!