Hello, rocky.<br>Mostly zeropage is needed to catch NULL-dereferencing.<br><br>Regards.<br>-- Dima<br><br><div class="gmail_quote">2009/10/30 胡杨树 <span dir="ltr"><<a href="mailto:914059751@qq.com">914059751@qq.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi, guys<br>
<br>
In paging_int, after setting up bootmem allocator, why zero page is needed? i cannot see any things usefull resides on that page, something i missing obviously?<br>
<br>
thanks<br>
----rocky<br>
<br>
---------------------Linux-2.6.30/arch/arm/mm/mmu.c-----------------------<br>
<br>
void __init paging_init(struct machine_desc *mdesc)<br>
{<br>
void *zero_page;<br>
<br>
build_mem_type_table();<br>
sanity_check_meminfo();<br>
prepare_page_table();<br>
bootmem_init();<br>
devicemaps_init(mdesc);<br>
kmap_init();/*DF: most embedded system do NOT have any HIGH MEM */<br>
top_pmd = pmd_off_k(0xffff0000);<br>
<br>
<br>
/*<br>
* allocate the zero page. Note that this always succeeds and<br>
* returns a zeroed result.<br>
*/<br>
zero_page = alloc_bootmem_low_pages(PAGE_SIZE); /* DF: what’s this for? */<br>
empty_zero_page = virt_to_page(zero_page);<br>
flush_dcache_page(empty_zero_page);<br>
<br>
}<br>
_______________________________________________<br>
linux-arm-kernel mailing list<br>
<a href="mailto:linux-arm-kernel@lists.infradead.org">linux-arm-kernel@lists.infradead.org</a><br>
<a href="http://lists.infradead.org/mailman/listinfo/linux-arm-kernel" target="_blank">http://lists.infradead.org/mailman/listinfo/linux-arm-kernel</a><br>
</blockquote></div><br>