获取Linux中每个设备的内存映射 [英] Getting memory map of every device in linux

查看:271
本文介绍了获取Linux中每个设备的内存映射的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取Linux识别的所有物理设备的内存映射.我已经看过/proc/iomem和/proc/ioports.但是,我无法找到每个设备的内存映射.关于如何实现这一目标的任何想法?

How do I get memory map of all the physical devices that are recognized by Linux. I have already looked up at /proc/iomem and /proc/ioports. However, I was not able to find a per device memory maps. Any idea on how to achieve this?

推荐答案

据我所知,唯一的通用方法是/proc/iomem.这向您展示了将哪些内存范围分配给谁的内核.

As far as I know the only generic way is /proc/iomem. That shows you the kernels of view of what memory ranges are assigned to who.

如果您想了解更多细节,则需要查看每个单独的驱动程序.

If you want more detail you'll need to look at each individual driver.

您可能会从/proc/vmallocinfo获得更多信息,因为ioremap()使用vmalloc(尽管可能并非在所有体系结构上都如此).

You might get some more information from /proc/vmallocinfo because ioremap() uses vmalloc (though possibly not on all architectures).

这篇关于获取Linux中每个设备的内存映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆