leilei wrote:
> I am writting a program for target board which have a 486 cpu, 512K
> ram(0x0 to 0x7ffff), 512k flash (0x80000 to 0xFFFFF).My program will
> be burned into flash.
> My program is to initialize the GDT, IDT, TSS, move them to memory.
> Now I can enter protected model and mov GDT, IDT correctly.But when I
> am about to mov TSS, some exception came out, and the CPU reset
> automaticly. The code casue the problem is like this:
> mov cx, gdt_idx
> mov gs, cx
> when cpu run to the instuction 'mov gs, cx', CPU will reset.
> i can assure the value in cx is correctly.
Your system appears to have a different opinion. Better show us how you
calculate "gdt_idx".
I wouldn't "expect" the system to reboot until you try to *use* gs. Does
it still reboot if you put "here: jmp here" right after "mov gs, cx"? I
suppose you've tried that... Only thing I can think of...
Best,
Frank


|