Wednesday, December 27, 2023

80286 Protected Mode

 80286 has 5 system registers used to support protected mode.  When 80286 starts up, it is in real mode.  Real mode uses 24bit real address.  When in real mode, 80286 acts like 8086 but with higher throughput.  To enter protected mode, system program goes through 5 steps:

(1) Set up Global Descriptor in the real memory and load its address to GDTR. GDTR map the system pages that are shared by all processes

(2) Load the interrupt service routines in real memory and load its address to IDTR

(3) Set the PE bit in MSW (machine status word) to activate protected mode.  There is no way to go from protected mode back to real mode except by a hardware reset to 80286

80286 now acts in protected mode.  In other words, it will start translating virtual address and automatically switch tasks.   To complete the sequence, the system needs to load the task register and LDTR.


No comments: