免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 7737 | 回复: 1
打印 上一主题 下一主题

[内存管理] 关于DMA zone的疑问 [复制链接]

论坛徽章:
0
1 [报告]
发表于 2013-04-21 17:58 |显示全部楼层
回复 4# chishanmingshen
在C0001000 - C0FFFFFF吧,物理内存的前16M(除起始的0x1000之外)作为DMA区域,一一映射后就到C0000000之后的16M位置了,但内核使用它的方式不是访问这块虚拟地址,而是基于ZONE_DMA的页分配进行管理的,而且除了一些ISA设备需要使用这块内存作为DMA内存,现在的设备一般都支持全地址的DMA访问


   

论坛徽章:
0
2 [报告]
发表于 2013-04-21 22:05 |显示全部楼层
内核代码段的加载位置是PAGE_OFFSET + CONFIG_PHYSICAL_START吧
  1. config PHYSICAL_START
  2.         hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
  3.         default "0x1000000"
  4.         ---help---
  5.           This gives the physical address where the kernel is loaded.

  6.           If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then
  7.           bzImage will decompress itself to above physical address and
  8.           run from there. Otherwise, bzImage will run from the address where
  9.           it has been loaded by the boot loader and will ignore above physical
  10.           address.

  11.           In normal kdump cases one does not have to set/change this option
  12.           as now bzImage can be compiled as a completely relocatable image
  13.           (CONFIG_RELOCATABLE=y) and be used to load and run from a different
  14.           address. This option is mainly useful for the folks who don't want
  15.           to use a bzImage for capturing the crash dump and want to use a
  16.           vmlinux instead. vmlinux is not relocatable hence a kernel needs
  17.           to be specifically compiled to run from a specific memory area
  18.           (normally a reserved region) and this option comes handy.

  19.           So if you are using bzImage for capturing the crash dump,
  20.           leave the value here unchanged to 0x1000000 and set
  21.           CONFIG_RELOCATABLE=y.  Otherwise if you plan to use vmlinux
  22.           for capturing the crash dump change this value to start of
  23.           the reserved region.  In other words, it can be set based on
  24.           the "X" value as specified in the "crashkernel=YM@XM"
  25.           command line boot parameter passed to the panic-ed
  26.           kernel. Please take a look at Documentation/kdump/kdump.txt
  27.           for more details about crash dumps.

  28.           Usage of bzImage for capturing the crash dump is recommended as
  29.           one does not have to build two kernels. Same kernel can be used
  30.           as production kernel and capture kernel. Above option should have
  31.           gone away after relocatable bzImage support is introduced. But it
  32.           is present because there are users out there who continue to use
  33.           vmlinux for dump capture. This option should go away down the
  34.           line.

  35.           Don't change this unless you know what you are doing.
复制代码
详见http://bbs.chinaunix.net/thread-2029114-1-1.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP