Re: I386: Real Mode vs. Protected Mode

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <misc@...>
Date: Wednesday, February 14, 2007 - 10:08 am

Hello!

On Wed, Feb 14, 2007 at 01:19:04PM +0100, Markus Ritzer wrote:

>I would like to know when the CPU is switched into protected mode on i386?

>Before or after executing init386() ?

/usr/src/sys/arch/i386/stand/boot/srt0.S, around line 60:
popl %edx
cli
pushl %cs
popl %ds
addr32 data32 lgdt (Gdtr - LINKADDR)
movl %cr0, %eax
orl $CR0_PE, %eax
data32 movl %eax, %cr0
data32 ljmp $8, $1f
1:
.code32

>Markus

Kind regards,

Hannah.
--
Hannah Schrvter Entwicklung hannah@schlund.de
Bei Schlund + Partner AG Brauerstra_e 48 D-76135 Karlsruhe
"Our software isn't released - it escapes, leaving a trail of bloody testers
in its wake. We relish the wailing and gnashing of our customers' teeth!"

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
I386: Real Mode vs. Protected Mode, Markus Ritzer, (Wed Feb 14, 8:19 am)
Re: I386: Real Mode vs. Protected Mode, Hannah Schroeter, (Wed Feb 14, 10:08 am)