pcb.h revision 113023
1178476Sjb/*-
2178476Sjb * Copyright (c) 2001 Jake Burkholder.
3178476Sjb * All rights reserved.
4178476Sjb *
5178476Sjb * Redistribution and use in source and binary forms, with or without
6178476Sjb * modification, are permitted provided that the following conditions
7178476Sjb * are met:
8178476Sjb * 1. Redistributions of source code must retain the above copyright
9178476Sjb *    notice, this list of conditions and the following disclaimer.
10178476Sjb * 2. Redistributions in binary form must reproduce the above copyright
11178476Sjb *    notice, this list of conditions and the following disclaimer in the
12178476Sjb *    documentation and/or other materials provided with the distribution.
13178476Sjb *
14178476Sjb * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15178476Sjb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16178476Sjb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17178476Sjb * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18178476Sjb * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19178476Sjb * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20178476Sjb * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21178476Sjb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22178476Sjb * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23178476Sjb * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24178476Sjb * SUCH DAMAGE.
25178476Sjb *
26178476Sjb * $FreeBSD: head/sys/sparc64/include/pcb.h 113023 2003-04-03 18:28:03Z jake $
27178476Sjb */
28178476Sjb
29178476Sjb#ifndef	_MACHINE_PCB_H_
30178476Sjb#define	_MACHINE_PCB_H_
31178476Sjb
32178476Sjb#include <machine/frame.h>
33178534Sjb
34178534Sjb#define	MAXWIN	8
35178534Sjb
36178476Sjb#define	PCB_FEF	(1 << 0)
37178476Sjb
38178476Sjb/* NOTE: pcb_ufp must be aligned on a 64 byte boundary. */
39178476Sjbstruct pcb {
40178476Sjb	struct	rwindow pcb_rw[MAXWIN];
41178476Sjb	uint32_t pcb_kfp[64];
42178476Sjb	uint32_t pcb_ufp[64];
43178476Sjb	uint64_t pcb_rwsp[MAXWIN];
44178476Sjb	uint64_t pcb_flags;
45178476Sjb	uint64_t pcb_nsaved;
46178476Sjb	uint64_t pcb_pc;
47178476Sjb	uint64_t pcb_sp;
48178476Sjb	uint64_t pcb_pad[4];
49178476Sjb} __aligned(64);
50178476Sjb
51178476Sjb#ifdef _KERNEL
52178476Sjbint	savectx(struct pcb *pcb);
53178476Sjb#endif
54178476Sjb
55178476Sjb#endif /* !_MACHINE_PCB_H_ */
56178476Sjb