qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Sylvain Dupont" <sylvain@truevision3D.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Problem with non 4gb CS and TSS
Date: Mon, 22 May 2006 03:25:59 +0200	[thread overview]
Message-ID: <00b401c67d3e$b01d9190$0100a8c0@PC4> (raw)

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 

                 reply	other threads:[~2006-05-22  1:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='00b401c67d3e$b01d9190$0100a8c0@PC4' \
    --to=sylvain@truevision3d.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).