2010-03-09

Slitaz -- iasl / acpi=ht -7


root=/dev/sda1 acpi=ht
please boot with early_ioremap_debug and report the dmesg.

/usr/src/linux-2.6.30.6-slitaz/arch/x86/mm/ioremap.c

[..]line#590
static int __init check_early_ioremap_leak(void)
{
int count = 0;
int i;

for (i = 0; i < FIX_BTMAPS_SLOTS; i++)
if (prev_map[i])
count++;

if (!count) return 0;
WARN(1, KERN_WARNING
"Debug warning: early ioremap leak of %d areas detected.\n",
count);
printk(KERN_WARNING
"please boot with early_ioremap_debug and report the dmesg.\n");

return 1;
}
late_initcall(check_early_ioremap_leak);
[..]


Extract From

http://ericxiao.cublog.cn/
linux引導分析
http://blog.chinaunix.net/u1/51562/showart_1018436.html

[.. #512]
Setup_arch() --à early_ioremap_init()代碼如下:

void __init early_ioremap_init(void)
{
pmd_t *pmd;

if (early_ioremap_debug)

printk(KERN_INFO "early_ioremap_init()\n");


pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN));

/*在這裡會將FIX_BTMAP_BEGIN 段的頁面表固定使用bm_pte*/
memset(bm_pte, 0, sizeof(bm_pte));

pmd_populate_kernel(&init_mm, pmd, bm_pte);

/*

* The boot-ioremap range spans multiple pmds, for which
* we are not prepared:
*/

if (pmd != early_ioremap_pmd(fix_to_virt(FIX_BTMAP_END))) {
WARN_ON(1);

printk(KERN_WARNING "pmd %p != %p\n",

pmd, early_ioremap_pmd(fix_to_virt(FIX_BTMAP_END)));

printk(KERN_WARNING "fix_to_virt(FIX_BTMAP_BEGIN): %08lx\n",
fix_to_virt(FIX_BTMAP_BEGIN));

printk(KERN_WARNING "fix_to_virt(FIX_BTMAP_END): %08lx\n",
fix_to_virt(FIX_BTMAP_END));


printk(KERN_WARNING "FIX_BTMAP_END: %d\n", FIX_BTMAP_END);

printk(KERN_WARNING "FIX_BTMAP_BEGIN: %d\n",
FIX_BTMAP_BEGIN);
}
}
上面的這段代碼,使FIX_BTMAP_BEGIN為起始地址對應的一個PMD對應映射的地址區間.即固定映射到bm_pte.
細心的讀者可以發現了.從FIX_BTMAP_BEGIN開始的一個PMD映射區間對應就是永久內存映射的線性地址段.沒錯,就是它.
一般說來,永久內存映射地址段只在一個PMD範圍內.若有超出一個PMD.則打印出警告信息.
[..]