Frage

I work on Atom-32bit-intel, I have to port MicroC OS II, so there is no code to make any configuration on the Atom (No GDT, no LDT...):

my question is more about the state of the Atom-32bit after a reset, is the Atom in protecte mode or not ? and the most important how do i check which mode is it (which registers have to be checked nad how)?

Remark: The CR0.PE = 1 (I checked it), is that enough to prove that the Atom is in protected mode ?

************ UPDATE : *****************

    /*Read the IDTR*/
    sidt (idt_ptr)

    /*Read the GDTR*/
    sgdt (gdt_ptr)

So I tried just to use IDT's address to link my ISR to the IDT :

fill_interrupt(ISR_Nbr,(unsigned int) isr33, 0x08, 0x8E);

static void fill_interrupt(unsigned char num, unsigned int base, unsigned short sel, unsigned char flags)
{
    unsigned short *Interrupt_Address;

    /*address = idt_ptr.base + num * 8 byte*/
    Interrupt_Address = (unsigned short *)(idt_ptr.base + num*8);

    *(Interrupt_Address) = base&0xFFFF;
    *(Interrupt_Address+1) = sel;
    *(Interrupt_Address+1) = (flags>>8)&0xFF00;
    *(Interrupt_Address+1) = (base>>16)&0xFFFF;

}

my ISR a imple one :

isr33:
nop
nop
cli
push %ebp   //save the context to swith back
mov %esp,%ebp




pop %ebp //Return to the calling function
sti
ret
War es hilfreich?

Lösung 3

Resolved, I use N450 Atom board, it has already a BIOS, the BIOS configures the board in Protected Mode.

Andere Tipps

Chapter 9 of volume 3 of the Intel Software Developer's Manual says that the reset value of CR0 is 60000010H. As you can see, bit 0, aka PE, is clear.

Regardless, you can setup the descriptor tables in Protected Mode as well as in Real Mode. You just have to be more careful about it.


I suggest you check if the BIOS or OS are setting this bit at a stage before you read it.

Atom is x86 instruction set, and as such, should be starting in real mode for compatibility. I don't have one on hand to test with though.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top