Annotation of sys/arch/alpha/include/pcb.h, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: pcb.h,v 1.8 2005/10/30 20:55:50 miod Exp $ */
! 2: /* $NetBSD: pcb.h,v 1.5 1996/11/13 22:21:00 cgd Exp $ */
! 3:
! 4: /*
! 5: * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
! 6: * All rights reserved.
! 7: *
! 8: * Author: Chris G. Demetriou
! 9: *
! 10: * Permission to use, copy, modify and distribute this software and
! 11: * its documentation is hereby granted, provided that both the copyright
! 12: * notice and this permission notice appear in all copies of the
! 13: * software, derivative works or modified versions, and any portions
! 14: * thereof, and that both notices appear in supporting documentation.
! 15: *
! 16: * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
! 17: * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
! 18: * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
! 19: *
! 20: * Carnegie Mellon requests users of this software to return to
! 21: *
! 22: * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
! 23: * School of Computer Science
! 24: * Carnegie Mellon University
! 25: * Pittsburgh PA 15213-3890
! 26: *
! 27: * any improvements or extensions that they make and grant Carnegie the
! 28: * rights to redistribute these changes.
! 29: */
! 30:
! 31: #ifndef _ALPHA_PCB_H_
! 32: #define _ALPHA_PCB_H_
! 33:
! 34: #include <machine/frame.h>
! 35: #include <machine/reg.h>
! 36:
! 37: #include <machine/alpha_cpu.h>
! 38:
! 39: /*
! 40: * PCB: process control block
! 41: *
! 42: * In this case, the hardware structure that is the defining element
! 43: * for a process, and the additional state that must be saved by software
! 44: * on a context switch. Fields marked [HW] are mandated by hardware; fields
! 45: * marked [SW] are for the software.
! 46: *
! 47: * It's said in the VMS PALcode section of the AARM that the pcb address
! 48: * passed to the swpctx PALcode call has to be a physical address. Not
! 49: * knowing this (and trying a virtual) address proved this correct.
! 50: * So we cache the physical address of the pcb in the md_proc struct.
! 51: */
! 52: struct pcb {
! 53: struct alpha_pcb pcb_hw; /* PALcode defined */
! 54: unsigned long pcb_context[9]; /* s[0-6], ra, ps [SW] */
! 55: struct fpreg pcb_fp; /* FP registers [SW] */
! 56: unsigned long pcb_onfault; /* for copy faults [SW] */
! 57: struct cpu_info *__volatile pcb_fpcpu; /* CPU with our FP state[SW] */
! 58: };
! 59:
! 60: /*
! 61: * The pcb is augmented with machine-dependent additional data for
! 62: * core dumps. For the Alpha, that's a trap frame and the floating
! 63: * point registers.
! 64: */
! 65: struct md_coredump {
! 66: struct trapframe md_tf;
! 67: struct fpreg md_fpstate;
! 68: };
! 69:
! 70: #ifdef _KERNEL
! 71: void savectx(struct pcb *);
! 72: #endif
! 73:
! 74: #endif /* _ALPHA_PCB_H_ */
CVSweb