From: "David Mentr\\'e" <David.Mentre@irisa.fr>
To: Petko Manolov <petkan@varel.bg>
Cc: linux-mm@kvack.org
Subject: Re: 4M kernel pages
Date: 16 Nov 1998 16:27:52 +0100 [thread overview]
Message-ID: <wd8zp9rwtc7.fsf@parate.irisa.fr> (raw)
In-Reply-To: Petko Manolov's message of "Mon, 16 Nov 1998 17:06:46 +0200"
Petko Manolov <petkan@varel.bg> writes:
> Yes, i know that. I took a look at
> linux/arch/i386/mm/init.c - paging_init().
> Yes we rise PSE bit in cr4 but don't rise the PS bit in
> the pade directory entry for the kernel - which means the
> kernel is in 4K pages.
Not exactly. 4MB pages for kernel are setted up _before_ the kernel is
started.
Look at arch/i386/kernel/head.S:
(around line 55 -- for the first CPU I suppose):
/*
* New page tables may be in 4Mbyte page mode and may
* be using the global pages.
*
* NOTE! We have to correct for the fact that we're
* not yet offset PAGE_OFFSET..
*/
#define cr4_bits mmu_cr4_features-__PAGE_OFFSET
movl %cr4,%eax # Turn on 4Mb pages
orl cr4_bits,%eax
movl %eax,%cr4
#endif
(around line 214 -- for other SMP CPUs I suppose):
movb ready,%al # First CPU if 0
orb %al,%al
jz 4f # First CPU skip this stuff
-----> movl %cr4,%eax # Turn on 4Mb pages <------
orl $16,%eax
movl %eax,%cr4
movl %cr3,%eax # Intel specification clarification says
movl %eax,%cr3 # to do this. Maybe it makes a difference.
# Who knows ?
To be honest, I'm not sure that this is done here, but I'm *sure* that
kernel uses 4Mb pages.
Best regards,
d.
--
David.Mentre@irisa.fr -- http://www.irisa.fr/prive/dmentre/
Opinions expressed here are only mine.
--
This is a majordomo managed list. To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org
next prev parent reply other threads:[~1998-11-16 15:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-11-13 12:04 May be stupid question ;-) Petko Manolov
1998-11-13 14:12 ` Rik van Riel
1998-11-16 7:44 ` Petko Manolov
1998-11-16 8:30 ` 4M kernel pages Petko Manolov
[not found] ` <wd8emr3yfeu.fsf@parate.irisa.fr>
1998-11-16 15:06 ` Petko Manolov
1998-11-16 15:27 ` David Mentr\'e [this message]
1998-11-16 16:50 ` Petko Manolov
1998-11-16 18:18 ` David Mentr\'e
1998-11-17 9:30 ` Petko Manolov
1998-11-16 18:43 ` Rik van Riel
1998-11-17 9:34 ` Petko Manolov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wd8zp9rwtc7.fsf@parate.irisa.fr \
--to=david.mentre@irisa.fr \
--cc=linux-mm@kvack.org \
--cc=petkan@varel.bg \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox