Protected Mode: Difference between revisions

m
Bot: Replace deprecated source tag with syntaxhighlight
[unchecked revision][unchecked revision]
No edit summary
m (Bot: Replace deprecated source tag with syntaxhighlight)
 
(6 intermediate revisions by 5 users not shown)
Line 1:
'''Protected mode''' is the main operating mode of modern Intel processors (and clones) since the 80286 (16 bit). On 80386s and later, the 32 bit Protected Mode allows working with several virtual address spaces, each of which has a maximum of 4GB of addressable memory; and enables the system to enforce strict memory and hardware I/O protection as well as restricting the available instruction set via. [[Security#Rings|Rings]].
 
A CPU that is initialized by the [[BIOS]] starts in [[Real Mode]]. Enabling Protected Mode unleashes the real power of your CPU. However, it will prevent you from using most of the BIOS interrupts, since these work in Real Mode (unless you have also written a [[Virtual 8086 Mode|V86]] monitor).
Line 13:
 
This example loads a descriptor table into the processor's GDTR register, and then sets the lowest bit of CR0:
<sourcesyntaxhighlight lang="asm">
cli ; disable interrupts
lgdt [gdtr] ; load GDT register with start address of Global Descriptor Table
Line 26:
PModeMain:
; load DS, ES, FS, GS, SS, ESP
</syntaxhighlight>
</source>
 
==See Also==
Line 34:
 
===External Links===
*http://www.osdever.net/tutorials/view/the-world-of-protected-mode - very good tutorial on how to enter protected mode
* [https://osdev.d0.cx/x86/ProtectedMode Dorper OSDev Wiki Article on Protected Mode]
* [http://www.osdevernondot.netorg/tutorialssabre/viewos/articles/ProtectedMode/the-world-of-protected-mode - very good tutorial how entry toOSRC: protected mode ]
* http://home.swipnet.se/smaffy/asm/info/embedded_pmode.pdf - pragmatic tutorial on protected mode ([http://web.archive.org/web/20030604185154/http://home.swipnet.se/smaffy/asm/info/embedded_pmode.pdf Cached copy])
* [http://www.nondot.org/sabre/os/articles/ProtectedMode/ OSRC: protected mode]
* http://www.brokenthorn.com/Resources/OSDev8.html
* http://home.swipnet.se/smaffy/asm/info/embedded_pmode.pdf - pragmatic tutorial on protected mode ([http://web.archive.org/web/20030604185154/http://home.swipnet.se/smaffy/asm/info/embedded_pmode.pdf Cached copy])
* [[Wikipedia:Protected_mode|Protected mode Wikipedia page]]
* http://www.brokenthorn.com/Resources/OSDev8.html
*http://members.tripod.com/protected_mode/alexfru/pmtuts.html - PMode tutorials in C & Asm
* [[Wikipedia:Protected_mode|Protected mode Wikipedia page]]
 
[[Category:X86 CPU]]