]> git.proxmox.com Git - mirror_edk2.git/blob - StdLib/Include/Ipf/machine/pcb.h
SourceLevelDebugPkg: Removing ipf from edk2.
[mirror_edk2.git] / StdLib / Include / Ipf / machine / pcb.h
1 /* $NetBSD: pcb.h,v 1.1 2006/04/07 14:21:18 cherry Exp $ */
2
3 /*-
4 * Copyright (c) 2003,2004 Marcel Moolenaar
5 * Copyright (c) 2000 Doug Rabson
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: src/sys/ia64/include/pcb.h,v 1.16 2004/08/16 19:05:08 marcel Exp $
30 */
31
32 #ifndef _IA64_PCB_H_
33 #define _IA64_PCB_H_
34
35 #include <machine/_regset.h>
36 #include <sys/lock.h>
37
38 /*
39 * PCB: process control block
40 */
41 struct pmap;
42 struct pcb {
43 struct _special pcb_special;
44 struct _callee_saved pcb_preserved;
45 struct _callee_saved_fp pcb_preserved_fp;
46 struct _high_fp pcb_high_fp;
47 struct pcpu *pcb_fpcpu;
48 struct simplelock pcb_fpcpu_slock;
49
50
51 /* IA32 specific registers. */
52 uint64_t pcb_ia32_cflg;
53 uint64_t pcb_ia32_eflag;
54 uint64_t pcb_ia32_fcr;
55 uint64_t pcb_ia32_fdr;
56 uint64_t pcb_ia32_fir;
57 uint64_t pcb_ia32_fsr;
58
59 uint64_t pcb_onfault; /* for copy faults */
60 // struct pmap *pcb_current_pmap;
61 };
62
63 #ifdef _KERNEL
64
65 #define savectx(p) swapctx(p, NULL)
66
67 struct trapframe;
68
69 void makectx(struct trapframe *, struct pcb *);
70 /*void restorectx(struct pcb *) __dead2;*/
71 int swapctx(struct pcb *old, struct pcb *new);
72
73 void ia32_restorectx(struct pcb *);
74 void ia32_savectx(struct pcb *);
75
76 #endif
77
78 #endif /* _IA64_PCB_H_ */