[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Problem with non 4gb CS and TSS
From: |
Sylvain Dupont |
Subject: |
[Qemu-devel] Problem with non 4gb CS and TSS |
Date: |
Mon, 22 May 2006 03:25:59 +0200 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] Problem with non 4gb CS and TSS,
Sylvain Dupont <=