From black__phantom@hotmail.com Wed Dec 11 13:13:28 2002
Path: news.execpc.com!newsops.execpc.com!infeed1-nwblwi.newsops.execpc.com!spool1-milwwi.newsops.execpc.com!newsfeeds.sol.net!priapus.visi.com!news-out.visi.com!hermes.visi.com!news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!news.crayne.org!clax86!robomod!not-for-mail
From: black__phantom@hotmail.com (Black Phantom)
Newsgroups: comp.lang.asm.x86
Subject: Re: Paging question
Approved: CLAX86 Moderators <ccrayne@crayne.org>
Date: Wed, 11 Dec 2002 19:13:28 +0000 (UTC)
Organization: http://groups.google.com/
Message-ID: <8dc5d4e5.0212110350.610cefb7@posting.google.com>
Sender: clax86@odin.asgard
References: <at1rhn$jm2$1@eol.dd.chalmers.se>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-CLAX86-Policy: http://www.pacificsites.com/~ccrayne/clax86.html
X-CLAX86-Faq: http://www2.dgsys.com/~raymoon/x86faqs.html
X-CLAX86-Info-1: Send submissions to             comp-lang-asm-x86@moderators.isc.org
X-CLAX86-Info-2: Send technical complaints to    ccrayne@crayne.org
X-CLAX86-Info-3: Send complaints about policy to ccrayne@crayne.org
X-Comment: moderators do not necessarily agree or disagree with this article.
X-MailScanner: Found to be clean
X-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (score=-0.8,
	required 5, EMAIL_ATTRIBUTION, FORGED_HOTMAIL_RCVD, NOSPAM_INC,
	QUOTED_EMAIL_TEXT, REFERENCES, SPAM_PHRASE_00_01)
X-UIDL: m9n!!KH["!~hb!!gZp!!
X-Complaints-To: abuse@supernews.com
Lines: 22
Xref: news.execpc.com comp.lang.asm.x86:121185

pethul@dd.chalmers.se (Peter Hultqvist) wrote:

> Hi
> 
> I have written a code that starts PMode and after that enables paging.
> I found out that the computer(bochs simulator, and my own computer) starts using paging the next instruction.
> 
> Example:
> mov	cr0, eax ;enable Pmode and paging
> jmp	sel:offset	<- this instruction is fetched through paging
> 
> Is there some way i can make the cpu remember the next instruction?
> When I start protection it doesn't load Pmode descriptors until I load any segment register, I must do a jmp before i have "real"Pmode. Can I do something similar in paging?

   No. You enable paging with MOV to CR0, which is a serializing
instruction. It is defined to commit all results of the previous
instrutions and flush all buffers, including prefetch queue prior to
fetching the next instruction.


/BP


