<div>Hi all,</div><div><br></div><div>In linux-2.6.35.4, the page size of kernel image is 2M, which means that the entity in pmd is PFN pointing to physical page.</div><div>For research, I want to change the page size of kernel image to 4K. I modified the content of pmd to make each entity of pmd point to a new page table.</div>
<div>Here is the my related code:</div><div>---------------------------------------------------------</div><div> 542 pte = alloc_low_page(&pte_phys); // allocate a new page for page table</div><div> 544 last_map_addr = phys_pte_init_remap(pte, address, end, new_prot); // initiate the entity of new page table</div>
<div> 545 unmap_low_page(pte);</div><div> 546 </div><div> 547 spin_lock(&init_mm.page_table_lock);</div><div> 548 pmd_populate_kernel(&init_mm, pmd, __va(pte_phys)); // modify this pmd entiity, make it point to the address of new page table.</div>
<div> 549 </div><div> 550 spin_unlock(&init_mm.page_table_lock);</div><div>------------------------------------------------------------------------------------</div><div>After adding those code to kernel source, I test the new complied kernel, but the kernel always reboot and can't work. </div>
<div>Thinking long time, I can't fix where the bug is.</div><div>Any suggestions for me?</div><div><br></div><div>Thanks,</div><div>Lee</div>