Page 2 of 2

Re:tss and ltr?

Posted: Sun Aug 07, 2005 6:04 pm
by calpis
Hey, I had that problem too, but it worked now, I can't remember exactly, but I think you need to check the GDT, and make sure that you have the TSS entry that. something like gdt[3] for TSS. Then it should be ok i think.

also you might want to check the gdtr as well. I forgot to update the gdtr to 4, and it just keeps on rebooting or something. AR spotted that.

Which code did you use from me? I didn't post all of the code.

But may be you need these lines 2 in your gdt.

Code: Select all

gdtr[0].limit = (sizeof(struct gdt_descriptor)*4)-1; //changed from 3 to 4 
gdtr[0].base = (int) gdt;
gdt_flush(); //to flush out the old GDT and install new changes.
Hope that will solve your problems~!

Re:tss and ltr?

Posted: Mon Aug 08, 2005 8:45 am
by calpis
oh, may be its these code to get tss running.:

Code: Select all

tss[0].esp0 = getesp();
tss[0].cr3 = getcr3();
settr(24); call it from c that is.