All of lore.kernel.org
 help / color / mirror / Atom feed
From: jlight@srcit.stevens.edu (James Light)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Regarding enable paging code and swapper_pg_dir.
Date: Sat, 2 Apr 2011 12:31:54 -0400	[thread overview]
Message-ID: <20110402163154.GC7686@stevens.edu> (raw)
In-Reply-To: <20110402162534.GB7686@stevens.edu>

If you look at the 2.6.38 code for head.S, you may find the newer way it is
written to be a bit easier to read.

------------------------------------------------------------------------------
25 /* Physical address */
26 #define pa(X) ((X) - __PAGE_OFFSET)

...

345 /*
346 * Enable paging
347 */
348        movl $pa(initial_page_table), %eax
349        movl %eax,%cr3          /* set the page table pointer.. */
350        movl %cr0,%eax
351        orl  $X86_CR0_PG,%eax
352        movl %eax,%cr0          /* ..and set paging (PG) bit */
353        ljmp $__BOOT_CS,$1f     /* Clear prefetch and normalize %eip */

------------------------------------------------------------------------------

     -James

  reply	other threads:[~2011-04-02 16:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-01 20:07 Regarding enable paging code and swapper_pg_dir mindentropy
     [not found] ` <20110401211921.GH23673@stevens.edu>
     [not found]   ` <201104021333.21661.mindentropy@gmail.com>
2011-04-02 16:25     ` James Light
2011-04-02 16:31       ` James Light [this message]
2011-04-02 17:48       ` mindentropy
2011-04-02 20:52         ` James Light
2011-04-03 20:54           ` mindentropy
2011-04-04 21:07           ` mindentropy

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=20110402163154.GC7686@stevens.edu \
    --to=jlight@srcit.stevens.edu \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.