Annotation of sys/arch/amd64/include/pcb.h, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: pcb.h,v 1.3 2006/05/10 01:39:04 krw Exp $ */
! 2: /* $NetBSD: pcb.h,v 1.1 2003/04/26 18:39:45 fvdl Exp $ */
! 3:
! 4: /*-
! 5: * Copyright (c) 1998 The NetBSD Foundation, Inc.
! 6: * All rights reserved.
! 7: *
! 8: * This code is derived from software contributed to The NetBSD Foundation
! 9: * by Charles M. Hannum.
! 10: *
! 11: * Redistribution and use in source and binary forms, with or without
! 12: * modification, are permitted provided that the following conditions
! 13: * are met:
! 14: * 1. Redistributions of source code must retain the above copyright
! 15: * notice, this list of conditions and the following disclaimer.
! 16: * 2. Redistributions in binary form must reproduce the above copyright
! 17: * notice, this list of conditions and the following disclaimer in the
! 18: * documentation and/or other materials provided with the distribution.
! 19: * 3. All advertising materials mentioning features or use of this software
! 20: * must display the following acknowledgement:
! 21: * This product includes software developed by the NetBSD
! 22: * Foundation, Inc. and its contributors.
! 23: * 4. Neither the name of The NetBSD Foundation nor the names of its
! 24: * contributors may be used to endorse or promote products derived
! 25: * from this software without specific prior written permission.
! 26: *
! 27: * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
! 28: * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
! 29: * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
! 30: * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
! 31: * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
! 32: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
! 33: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
! 34: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
! 35: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
! 36: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! 37: * POSSIBILITY OF SUCH DAMAGE.
! 38: */
! 39:
! 40: /*-
! 41: * Copyright (c) 1990 The Regents of the University of California.
! 42: * All rights reserved.
! 43: *
! 44: * This code is derived from software contributed to Berkeley by
! 45: * William Jolitz.
! 46: *
! 47: * Redistribution and use in source and binary forms, with or without
! 48: * modification, are permitted provided that the following conditions
! 49: * are met:
! 50: * 1. Redistributions of source code must retain the above copyright
! 51: * notice, this list of conditions and the following disclaimer.
! 52: * 2. Redistributions in binary form must reproduce the above copyright
! 53: * notice, this list of conditions and the following disclaimer in the
! 54: * documentation and/or other materials provided with the distribution.
! 55: * 3. Neither the name of the University nor the names of its contributors
! 56: * may be used to endorse or promote products derived from this software
! 57: * without specific prior written permission.
! 58: *
! 59: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
! 60: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
! 61: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! 62: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
! 63: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
! 64: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
! 65: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
! 66: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
! 67: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
! 68: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! 69: * SUCH DAMAGE.
! 70: *
! 71: * @(#)pcb.h 5.10 (Berkeley) 5/12/91
! 72: */
! 73:
! 74: /*
! 75: * XXXfvdl these copyrights don't really match anymore
! 76: */
! 77:
! 78: #ifndef _AMD64_PCB_H_
! 79: #define _AMD64_PCB_H_
! 80:
! 81: #include <sys/signal.h>
! 82:
! 83: #include <machine/segments.h>
! 84: #include <machine/tss.h>
! 85: #include <machine/fpu.h>
! 86: #include <machine/sysarch.h>
! 87:
! 88: #define NIOPORTS 1024 /* # of ports we allow to be mapped */
! 89:
! 90: /*
! 91: * Please note that the pcb_savefpu field in struct below must be
! 92: * on a 16-byte boundary.
! 93: */
! 94: struct pcb {
! 95: /*
! 96: * XXXfvdl
! 97: * It's overkill to have a TSS here, as it's only needed
! 98: * for compatibility processes who use an I/O permission map.
! 99: * The pcb fields below are not in the TSS anymore (and there's
! 100: * not enough room in the TSS to store them all)
! 101: * Should just make this a pointer and allocate.
! 102: */
! 103: struct x86_64_tss pcb_tss;
! 104: u_int64_t pcb_cr3;
! 105: u_int64_t pcb_rsp;
! 106: u_int64_t pcb_rbp;
! 107: u_int64_t pcb_usersp;
! 108: u_int64_t pcb_ldt_sel;
! 109: struct savefpu pcb_savefpu; /* floating point state */
! 110: int pcb_cr0; /* saved image of CR0 */
! 111: int pcb_flags;
! 112: #define PCB_USER_LDT 0x01 /* has user-set LDT */
! 113: caddr_t pcb_onfault; /* copyin/out fault recovery */
! 114: struct cpu_info *pcb_fpcpu; /* cpu holding our fp state. */
! 115: unsigned pcb_iomap[NIOPORTS/32]; /* I/O bitmap */
! 116: struct pmap *pcb_pmap; /* back pointer to our pmap */
! 117: };
! 118:
! 119: /*
! 120: * The pcb is augmented with machine-dependent additional data for
! 121: * core dumps. For the i386, there is nothing to add.
! 122: */
! 123: struct md_coredump {
! 124: long md_pad[8];
! 125: };
! 126:
! 127: #endif /* _AMD64_PCB_H_ */
CVSweb