qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Problem with non 4gb CS and TSS
@ 2006-05-22  1:25 Sylvain Dupont
  0 siblings, 0 replies; only message in thread
From: Sylvain Dupont @ 2006-05-22  1:25 UTC (permalink / raw)
  To: qemu-devel

Hello, I hope it's the good place to post this.

We've been developping a small OS for a school assignment.

There seems to be a problem if you switch tss on a non 4GB segment. It gives 
a General protection fault exception (0D)
I traced the exception in GDB and it appears to be raised here in switch_tss 
(helper.c) :

   /* check that EIP is in the CS segment limits */
    if (new_eip > env->segs[R_CS].limit) {
        /* XXX: different exception if CALL ? */
        raise_exception_err(EXCP0D_GPF, 0);
    }


Shouldnt that be something like :

    if (new_eip < env->segs[R_CS].base || new_eip > env->segs[R_CS].base + 
env->segs[R_CS].limit)

?

When limit is 4gb and base is 0, no problem (usually the case). But as soon 
as you use a EIP that is greater than the limit, the problem appears.

Is it normal or a bug ?

Thanks

Regards
Sylvain Dupont 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-05-22  1:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-22  1:25 [Qemu-devel] Problem with non 4gb CS and TSS Sylvain Dupont

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).