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!
On Thu, 07 Mar 2013 10:33:18 +0800, ishare said:
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.
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: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/... 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. Signed-off-by: Borislav Petkov <bp@alien8.de> LKML-Reference:<20101020070526.GA9588@liondog.tnic> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
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 ?
On Wed, Mar 06, 2013 at 11:00:36PM -0500, Valdis.Kletnieks@vt.edu wrote:
On Thu, 07 Mar 2013 11:43:43 +0800, ishare said:
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?
On Thu, 07 Mar 2013 12:48:06 +0800, ishare said:
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).
On Thu, Mar 07, 2013 at 12:34:27AM -0500, Valdis.Kletnieks@vt.edu wrote:
On Thu, 07 Mar 2013 12:48:06 +0800, ishare said:
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 .
participants (2)
-
ishare -
Valdis.Kletnieks@vt.edu