* zap_low_mappings
@ 2013-03-07 2:33 ishare
2013-03-07 3:19 ` zap_low_mappings Valdis.Kletnieks at vt.edu
0 siblings, 1 reply; 7+ messages in thread
From: ishare @ 2013-03-07 2:33 UTC (permalink / raw)
To: kernelnewbies
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!
^ permalink raw reply [flat|nested] 7+ messages in thread
* zap_low_mappings
2013-03-07 2:33 zap_low_mappings ishare
@ 2013-03-07 3:19 ` Valdis.Kletnieks at vt.edu
2013-03-07 3:43 ` zap_low_mappings ishare
0 siblings, 1 reply; 7+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2013-03-07 3:19 UTC (permalink / raw)
To: kernelnewbies
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/mm/init_32.c?id=b40827fa7268fda8a62490728a61c2856f33830b
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>
-------------- 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* zap_low_mappings
2013-03-07 3:19 ` zap_low_mappings Valdis.Kletnieks at vt.edu
@ 2013-03-07 3:43 ` ishare
2013-03-07 4:00 ` zap_low_mappings Valdis.Kletnieks at vt.edu
0 siblings, 1 reply; 7+ messages in thread
From: ishare @ 2013-03-07 3:43 UTC (permalink / raw)
To: kernelnewbies
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 ?
^ permalink raw reply [flat|nested] 7+ messages in thread
* zap_low_mappings
2013-03-07 3:43 ` zap_low_mappings ishare
@ 2013-03-07 4:00 ` Valdis.Kletnieks at vt.edu
2013-03-07 4:48 ` zap_low_mappings ishare
0 siblings, 1 reply; 7+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2013-03-07 4:00 UTC (permalink / raw)
To: kernelnewbies
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?
-------------- 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* zap_low_mappings
2013-03-07 4:00 ` zap_low_mappings Valdis.Kletnieks at vt.edu
@ 2013-03-07 4:48 ` ishare
2013-03-07 5:34 ` zap_low_mappings Valdis.Kletnieks at vt.edu
0 siblings, 1 reply; 7+ messages in thread
From: ishare @ 2013-03-07 4:48 UTC (permalink / raw)
To: kernelnewbies
On Wed, Mar 06, 2013 at 11:00:36PM -0500, Valdis.Kletnieks at 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?
^ permalink raw reply [flat|nested] 7+ messages in thread
* zap_low_mappings
2013-03-07 4:48 ` zap_low_mappings ishare
@ 2013-03-07 5:34 ` Valdis.Kletnieks at vt.edu
2013-03-07 11:50 ` zap_low_mappings ishare
0 siblings, 1 reply; 7+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2013-03-07 5:34 UTC (permalink / raw)
To: kernelnewbies
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).
-------------- 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* zap_low_mappings
2013-03-07 5:34 ` zap_low_mappings Valdis.Kletnieks at vt.edu
@ 2013-03-07 11:50 ` ishare
0 siblings, 0 replies; 7+ messages in thread
From: ishare @ 2013-03-07 11:50 UTC (permalink / raw)
To: kernelnewbies
On Thu, Mar 07, 2013 at 12:34:27AM -0500, Valdis.Kletnieks at 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 .
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-03-07 11:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-07 2:33 zap_low_mappings ishare
2013-03-07 3:19 ` zap_low_mappings Valdis.Kletnieks at vt.edu
2013-03-07 3:43 ` zap_low_mappings ishare
2013-03-07 4:00 ` zap_low_mappings Valdis.Kletnieks at vt.edu
2013-03-07 4:48 ` zap_low_mappings ishare
2013-03-07 5:34 ` zap_low_mappings Valdis.Kletnieks at vt.edu
2013-03-07 11:50 ` zap_low_mappings ishare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).