diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-10-03 07:51:27 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-10-03 07:51:27 +0000 |
commit | 742b13cb3dd8afd4e04cf22c3faaceb16ff28c58 (patch) | |
tree | 73ed2dc2620bf2a772152dd9ae8ae18033aa4eac /sys | |
parent | a86c5bc9bd4af827a0028e48843b2799471dd027 (diff) |
Add pcb_flags member to 'struct pcb', and set PCB_SAVECTX on contexts saved
by savectx().
ok art@, miod@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/i386/genassym.cf | 4 | ||||
-rw-r--r-- | sys/arch/i386/i386/locore.s | 6 | ||||
-rw-r--r-- | sys/arch/i386/include/pcb.h | 4 |
3 files changed, 11 insertions, 3 deletions
diff --git a/sys/arch/i386/i386/genassym.cf b/sys/arch/i386/i386/genassym.cf index e20ff580910..88c086d6526 100644 --- a/sys/arch/i386/i386/genassym.cf +++ b/sys/arch/i386/i386/genassym.cf @@ -1,4 +1,4 @@ -# $OpenBSD: genassym.cf,v 1.26 2007/04/03 10:14:47 art Exp $ +# $OpenBSD: genassym.cf,v 1.27 2007/10/03 07:51:26 kettenis Exp $ # # Copyright (c) 1982, 1990 The Regents of the University of California. # All rights reserved. @@ -115,6 +115,8 @@ member pcb_ldt member pcb_ldt_sel member pcb_onfault member pcb_fpcpu +member pcb_flags +export PCB_SAVECTX # frame definitions struct trapframe diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s index 5a39b580a5c..d8e379cb506 100644 --- a/sys/arch/i386/i386/locore.s +++ b/sys/arch/i386/i386/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.114 2007/05/29 23:02:02 tom Exp $ */ +/* $OpenBSD: locore.s,v 1.115 2007/10/03 07:51:26 kettenis Exp $ */ /* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */ /*- @@ -1770,6 +1770,10 @@ ENTRY(savectx) movl %esp,PCB_ESP(%edx) movl %ebp,PCB_EBP(%edx) + movl PCB_FLAGS(%edx),%ecx + orl $PCB_SAVECTX,%ecx + movl %ecx,PCB_FLAGS(%edx) + ret /*****************************************************************************/ diff --git a/sys/arch/i386/include/pcb.h b/sys/arch/i386/include/pcb.h index 0788135e06d..fa3623eafad 100644 --- a/sys/arch/i386/include/pcb.h +++ b/sys/arch/i386/include/pcb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcb.h,v 1.13 2004/07/02 16:29:55 niklas Exp $ */ +/* $OpenBSD: pcb.h,v 1.14 2007/10/03 07:51:26 kettenis Exp $ */ /* $NetBSD: pcb.h,v 1.21 1996/01/08 13:51:42 mycroft Exp $ */ /*- @@ -77,6 +77,8 @@ struct pcb { struct cpu_info *pcb_fpcpu; /* cpu holding our fpu state */ u_long pcb_iomap[NIOPORTS/32]; /* I/O bitmap */ u_char pcb_iomap_pad; /* required; must be 0xff, says intel */ + int pcb_flags; +#define PCB_SAVECTX 0x00000001 }; /* |