Questions tagged [protected-mode]

x86 protected mode allows system software to support virtual memory, paging and preemptive multi-tasking.

x86 protected mode allows system software to support virtual memory, paging and preemptive multi-tasking.

  • Protected mode was first added to the x86 architecture in 1982, with the release of Intel's 80286 processor, and later extended with the release of the 80386 processor in 1985.
  • To maintain backward compatibility, x86 processors begins executing instructions in real mode.

To enter protected mode:

  • The Global Descriptor Table (GDT) must first be created with a minimum of three entries: a null descriptor, a code segment descriptor and data segment descriptor.
  • In an IBM-compatible machine, the A20 line (21st address line) also must be enabled to allow the use of all the address lines so that the CPU can access beyond 1 megabyte of memory.
  • Then the PE bit must be set in the CR0 register and a far jump must be made to clear the prefetch input queue:
; set PE bit
mov eax, cr0
or eax, 1
mov cr0, eax

; far jump (cs = selector of code segment)
jmp cs:@pm

@pm:
; Now we are in PM.
214 questions
1
vote
1 answer

Constant reboot after setting up the Global Descriptor Table and protected mode

I must have done something wrong with the GDT setup and the switch to protected mode because it keeps constantly rebooting. Here is my kernel.asm that should setup the GDT and switch to protected mode: bits 16 jmp main %include…
user7329614
1
vote
0 answers

Excel - .xlsm opens in Protected View, but crashes in regular view upon opening

I have an Excel file that crashes when I try to open it regularly, but it somehow opens in protected view. It's strange because it was working fine yesterday. Then I restarted my computer, and reopened the sheet, and it crashed upon opening. I can…
user3685285
  • 6,066
  • 13
  • 54
  • 95
1
vote
1 answer

Assembly compare one bit of register

I need to compare one bit of register e.g. lets say AH is equal to 0b010010>1<0, and I need to check is 2nd bit (to make sure we are talking about the same bit I put this bit between arrows) is 1 or 0. If this may help my code suppose to run on…
vakus
  • 732
  • 1
  • 10
  • 24
1
vote
1 answer

C# - Programmatically allow Excel cell formatting on Protected Mode

By default, the .xlsx file we generated from my server will be openned in Protected Mode on user's computers. On that mode, I noticed many cells with formulas will not be activated so nothing will be displayed on those cells. Everything is fine on…
Lê Sỹ Hoàng
  • 409
  • 1
  • 3
  • 15
1
vote
1 answer

64 bit registers in Protected Mode x86

I was wondering am I able to use 64 bit registers on 64 bit processor when staying in 32 bit Protected mode. I cannot test this myself as my virtual machines doesn't support 64 bit long mode. I also couldn't found this anywhere in Internet. I…
vakus
  • 732
  • 1
  • 10
  • 24
1
vote
1 answer

Can't understand x86 Protected Mode

Why was this mode invented? Why didn't they just enlarge the bus from 20 to 32 bits and stick to Real Mode?
1
vote
1 answer

Trouble printing to network printer via command line with Adobe Reader "protected mode" enabled

We are finding it nearly impossible to print to a network printer via Adobe Reader command line switches, with Adobe "protected mode" enabled. These troubles arise when attempting to use the command line arguments provided in the Adobe docs, to…
1
vote
1 answer

INFORMIX-SQL (SE) 4.10DC1 Protected Mode problem loading PSTARTSQL.EXE

I am attempting to fire up ISQL 4.10DC1 on MS-DOS 6.22, but cant seem to get PSTARTSQL.EXE to load, it says DOS16M Error[6]: Not enough memory.. I have DEVICE=C:\DOS\HIMEM.SYS as my first line in CONFIG.SYS and properly set all environment…
Joe R.
  • 2,032
  • 4
  • 36
  • 72
1
vote
1 answer

Entering protected mode reboots

For understanding the working of the operating system I have made a simpel bootloader which loads a small test application for testing protected mode etc. After the bootsector has been loaded at 0x7c00 the bootloader loads the test code at segment…
1
vote
1 answer

This can be run in protected mode or real-address mode, how do I change which it is running in?

Another question about my programming class, well actually a few. To begin with the program has already been written and the code can be found below. Question #1: Now, in the instructions it explicitly states that the program can be done in…
Mr.Kruel
  • 29
  • 1
  • 9
1
vote
1 answer

Segment Offset Pair bs Segment Descripter

I am little confused to understand the difference between a segment offset pair in 8088 for physical address calculation as compared to segment descriptors in 32 bit processor. Any explanation would be highly appreciated.
1
vote
2 answers

How do I find out the contents of GDT

I am analyzing a disassembled dll and got stuck on the line mov ebx,fs:[00000004h] I want to find out the exact physical address of the data that is written into ebx with this instruction. gdb tells me that fs = 0x53. I already found out that the…
Nukualofa
  • 11
  • 2
1
vote
2 answers

Type-1 VMM and Ring 1

Recently, I am doing homework about Virtualization. My question is, how VMM transfer control to the guest kernel and run that code in Ring 1? Type-1 VMM: This is the classical trap-and-emulate VMM. The VMM runs directly on hardware, acts as a "host…
Steinway Wu
  • 1,288
  • 1
  • 12
  • 18
1
vote
1 answer

Cannot jump without error

I've problem. Last days I'm playing with GDT, A20 and protected mode. I have this simple code for GDT: gdt_start: gdt_null: dd 00000000h dd 00000000h gdt_code: dw 0xFFFF dw 0 db 0 db 10011010b db 11001111b db…
user35443
  • 6,309
  • 12
  • 52
  • 75
1
vote
3 answers

Selenium IEDriverServer unable to configure protected mode due to security policy

The IEDriverServer Wiki page has the following listed as a requirement: On IE 7 or higher on Windows Vista or Windows 7, you must set the Protected Mode settings for each zone to be the same value. The value can be on or off, as long as it is…