zap_low_mappings
kernel halts because the page mapping has been modified by zap_low_mappings ,
why we should do zap_low_mappings in init procedure ? this will disorder the page mapping.
thanks!
Quoted 5 lines · ishare
kernel halts because the page mapping has been modified by
zap_low_mappingswhy we should do
zap_low_mappingsin init procedure ? this will disorder the page mapping.
You might want to get yourself an up to date kernel, as the code you're asking about was removed almost 2 1/.2 years ago.
zap_low_mappings was removed in October 2010 by this commit:
x86-32, mm: Add an initial page table for core bootstrapping
This patch adds an initial page table with low mappings used exclusively for booting APs/resuming after ACPI suspend/machine restart. After this, there's no need to add low mappings to swapper_pg_dir and zap them later or create own swsusp PGD page solely for ACPI sleep needs - we have initial_page_table for that.
LKML-Reference:<[email protected]>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130306/2abb9c96/attachment-0001.bin
sorry for my outof date kernel .
In the zap_low_mappingd function.there is a selection for kernel,as below:
#ifdef CONFIG_X86_PAE
set_pgd(swapper_pg_dir+i, __pgd(1 + __pa(empty_zero_page)));
#else set_pgd(swapper_pg_dir+i, __pgd(0));
#endif
If I have not define CONFIG_X86_PAE ,then the low mem will be invalided all . so any addressing operation will cause a page_fault because that page is not present.
Am I right ?
Quoted 3 lines · ishare
set_pgd(swapper_pg_dir+i, __pgd(0));If I have not define
CONFIG_X86_PAE,then the low mem will be invalided all .
And what makes you think that call invalidates *all* the page
mappings?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130306/d0613e88/attachment.bin
Quoted 8 lines · Valdis.Kletnieks at vt.edu
Quoted 3 lines · ishare
set_pgd(swapper_pg_dir+i, __pgd(0));If I have not define
CONFIG_X86_PAE,then the low mem will be invalided all .And what makes you think that call invalidates *all* the page mappings?
because all the pde (0-768) are set to 0x0 ,so no phsical pages are mapping to these pde . isn't it?
Quoted 2 lines · ishare
because all the pde (0-768) are set to
0x0,so no phsical pages are mapping to these pde . isn't it?
The pdes don't end at 768. Think about what pde numbers the kernel gets when it loads at 0xc0000000 (which is where it lands with the default 3G/1G split).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130307/1318d572/attachment.bin
Quoted 7 lines · Valdis.Kletnieks at vt.edu
Quoted 2 lines · ishare
because all the pde (0-768) are set to
0x0,so no phsical pages are mapping to these pde . isn't it?The pdes don't end at 768. Think about what pde numbers the kernel gets when it loads at
0xc0000000(which is where it lands with the default 3G/1G split).
Of course , the mapping of address above 0xc0000000 have not been effected ever , think about address 0x5 there is no phsical address mapping it .