Problem with POPF

Problem with POPF

Post by Gerrit van » Sat, 25 Mar 2006 04:10:29


To protect portions of code from interrupts, I use PUSHF and CLI to be
certain interrupts are disabled and POPF to re-enable them. This used to
work without a problem until I started writing a comms port handler. As soon
as I initialize the comms port, the next POPF causes a SIGTRAP. GDB tells
me it is a Trace/breakpoint trap.

This probably has more to do with the 80x86 architecture than DJGPP, but
perhaps somebody can point me in the right direction.
 
 
 

1. minor nit with decoding popf instruction - was ptrace single-stepping change breaks Wine

2. [PATCH 103/104] KVM: x86 emulator: popf

From: Nitin A Kamble < XXXX@XXXXX.COM >

Implement emulation of instruction:
popf
opcode: 0x9d

Signed-off-by: Nitin A Kamble < XXXX@XXXXX.COM >
Signed-off-by: Avi Kivity < XXXX@XXXXX.COM >
---
drivers/kvm/x86_emulate.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 7360a71..9737c3b 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -127,7 +127,7 @@ static u8 opcode_table[256] = {
ByteOp | DstReg | SrcMem | ModRM | Mov, DstReg | SrcMem | ModRM | Mov,
0, ModRM | DstReg, 0, DstMem | SrcNone | ModRM | Mov,
/* 0x90 - 0x9F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ImplicitOps, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ImplicitOps, ImplicitOps, 0, 0,
/* 0xA0 - 0xA7 */
ByteOp | DstReg | SrcMem | Mov, DstReg | SrcMem | Mov,
ByteOp | DstMem | SrcReg | Mov, DstMem | SrcReg | Mov,
@@ -1293,6 +1293,9 @@ special_insn:
case 0x9c: /* pushf */
src.val = (unsigned long) _eflags;
goto push;
+ case 0x9d: /* popf */
+ dst.ptr = (unsigned long *) &_eflags;
+ goto pop_instruction;
case 0xc3: /* ret */
dst.ptr = &_eip;
goto pop_instruction;
--
1.5.3

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/

3. minor nit with decoding popf instruction - was ptrace single-stepping change breaks Wine

4. popf

5. [patch 076/198] x86_64: Handle programs that set TF in user space using popf while single stepping

6. SATA problems, problems, problem - Okay, so I have solved my SATA problems . . .

7. 2.6.32-git9 kernel problem , ipr problem , kaweth problem , xd out-of-memory problem

8. Problems, problems, problems...Access 2002 into Access 2000

9. [Wrong group] IE7 Problem/Vista Problem/IFrame Problem

10. problems problems problems

11. problems problems problems IE6

12. SATA problems, problems problem . . .

13. IE7 Problem/Vista Problem/IFrame Problem

14. Problems problems problems...

15. problems problems problems