From: "Richard B. Johnson" <root@chaos.analogic.com>
To: ravikumar.chakaravarthy@amd.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: Unable to turn paging on!!
Date: Wed, 26 Mar 2003 15:36:22 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.53.0303261521030.2136@chaos> (raw)
In-Reply-To: <99F2150714F93F448942F9A9F112634CA54B3A@txexmtae.amd.com>
On Wed, 26 Mar 2003 ravikumar.chakaravarthy@amd.com wrote:
> I tweaked the kernel and boot loader to load the kernel at 0xdf000000,
> physical address. I did the following changes to setup the
> initial page table.
>
> However during boot, in arch/i386/kernel/head.S when the paging bit is set
> movl %eax,%cr0 /* ..and set paging (PG) bit */
>
> My computer hangs!!
>
> Any idea why??
>
> -Ravi
[SNIPPED...]
Because you can't just abitrarily change stuff around. For instance,
The PTE must be accessible as well as the GTD and the IDT when you
enable paging. In your code, you just mapped them out!
When you change the mapping, there MUST be a 1:1 physical to virtual
relationship for these descriptors. That's why they are in "low" memory.
To make this clear, let's assume you are running normally and you
want to turn the paging off. If you are at a normal virtual address,
you can't do that without crashing. You need to jump (or call) somewhere
that the physical and the virtual address are the same. Then you can
turn off paging (as long as you don't get any interrupts). Once
your EIP is at an address where there is a 1:1 correspondence
between a physical and virtual address, you can turn this off at
will. You need to turn it on before you "return".
There is nothing "magic" about low memory. You could build the GDT,
the IDT, and PTEs at 0xfff00000 and as long at the PTEs did a 1:1
mapping for this address __and__ your code that executed the mov CR0
instruction was up where there is a 1:1 mapping for the code, too.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
Why is the government concerned about the lunatic fringe? Think about it.
next prev parent reply other threads:[~2003-03-26 20:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-26 19:23 ravikumar.chakaravarthy
2003-03-26 20:11 ` Brian Gerst
2003-03-26 20:26 ` William Lee Irwin III
2003-03-26 20:36 ` Richard B. Johnson [this message]
2003-03-27 23:34 ravikumar.chakaravarthy
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=Pine.LNX.4.53.0303261521030.2136@chaos \
--to=root@chaos.analogic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ravikumar.chakaravarthy@amd.com \
/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
all inboxes | Powered by JetHome®