X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/b4c24cb9d3df001f2892dc4ed451bc769ff28a9f..d7e50217d7adf6e52786a38bcaa4cd698cb9a79e:/osfmk/ppc/thread_act.h diff --git a/osfmk/ppc/thread_act.h b/osfmk/ppc/thread_act.h index 9d0a0cbb1..2aaa57da4 100644 --- a/osfmk/ppc/thread_act.h +++ b/osfmk/ppc/thread_act.h @@ -3,19 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -58,9 +61,11 @@ struct facility_context { savearea_fpu *FPUsave; /* The floating point savearea */ savearea *FPUlevel; /* The floating point context level */ unsigned int FPUcpu; /* The last processor to enable floating point */ + unsigned int FPUsync; /* Sync lock */ savearea_vec *VMXsave; /* The VMX savearea */ savearea *VMXlevel; /* The VMX context level */ unsigned int VMXcpu; /* The last processor to enable vector */ + unsigned int VMXsync; /* Sync lock */ struct thread_activation *facAct; /* Activation associated with context */ }; @@ -90,7 +95,12 @@ typedef struct MachineThrAct { struct vmmCntrlEntry *vmmCEntry; /* Pointer current emulation context or 0 */ struct vmmCntrlTable *vmmControl; /* Pointer to virtual machine monitor control table */ uint64_t qactTimer; /* Time thread needs to interrupt. This is a single-shot timer. Zero is unset */ + unsigned int cioSpace; /* Address space ID for in progress copyin/out */ +#define cioSwitchAway 0x80000000 /* Context switched away from thread since MapUserAddressSpace */ +#define cioSwitchAwayb 0 + addr64_t cioRelo; /* Relocation value for in progress copyin/out */ unsigned int ksp; /* points to TOP OF STACK or zero */ + unsigned int preemption_count; /* preemption count */ unsigned int bbDescAddr; /* Points to Blue Box Trap descriptor area in kernel (page aligned) */ unsigned int bbUserDA; /* Points to Blue Box Trap descriptor area in user (page aligned) */ unsigned int bbTableStart; /* Points to Blue Box Trap dispatch area in user */ @@ -98,6 +108,8 @@ typedef struct MachineThrAct { unsigned int bbTaskID; /* Opaque task ID for Blue Box threads */ unsigned int bbTaskEnv; /* Opaque task data reference for Blue Box threads */ unsigned int specFlags; /* Special flags */ + unsigned int pmcovfl[8]; /* PMC overflow count */ + unsigned int perfmonFlags; /* Perfmon facility flags */ /* special flags bits */ @@ -109,27 +121,33 @@ typedef struct MachineThrAct { #define vectorCngbit 6 #define timerPopbit 7 #define userProtKeybit 8 -#define trapUnalignbit 9 -#define notifyUnalignbit 10 +#define FamVMenabit 11 +#define FamVMmodebit 12 +#define perfMonitorbit 13 /* NOTE: Do not move or assign bit 31 without changing exception vector ultra fast path code */ #define bbThreadbit 28 #define bbNoMachSCbit 29 #define bbPreemptivebit 30 #define spfReserved1 31 /* See note above */ -#define ignoreZeroFault (1<<(31-ignoreZeroFaultbit)) -#define floatUsed (1<<(31-floatUsedbit)) -#define vectorUsed (1<<(31-vectorUsedbit)) -#define runningVM (1<<(31-runningVMbit)) -#define floatCng (1<<(31-floatCngbit)) -#define vectorCng (1<<(31-vectorCngbit)) -#define timerPop (1<<(31-timerPopbit)) -#define userProtKey (1<<(31-userProtKeybit)) -#define trapUnalign (1<<(31-trapUnalignbit)) -#define notifyUnalign (1<<(31-notifyUnalignbit)) -#define bbThread (1<<(31-bbThreadbit)) -#define bbNoMachSC (1<<(31-bbNoMachSCbit)) -#define bbPreemptive (1<<(31-bbPreemptivebit)) +#define ignoreZeroFault 0x80000000 /* (1<<(31-ignoreZeroFaultbit)) */ +#define floatUsed 0x40000000 /* (1<<(31-floatUsedbit)) */ +#define vectorUsed 0x20000000 /* (1<<(31-vectorUsedbit)) */ + +#define runningVM 0x08000000 /* (1<<(31-runningVMbit)) */ +#define floatCng 0x04000000 /* (1<<(31-floatCngbit)) */ +#define vectorCng 0x02000000 /* (1<<(31-vectorCngbit)) */ +#define timerPop 0x01000000 /* (1<<(31-timerPopbit)) */ + +#define userProtKey 0x00800000 /* (1<<(31-userProtKeybit)) */ + +#define FamVMena 0x00100000 /* (1<<(31-FamVMenabit)) */ +#define FamVMmode 0x00080000 /* (1<<(31-FamVMmodebit)) */ +#define perfMonitor 0x00040000 /* (1<<(31-perfMonitorbit)) */ + +#define bbThread 0x00000008 /* (1<<(31-bbThreadbit)) */ +#define bbNoMachSC 0x00000004 /* (1<<(31-bbNoMachSCbit)) */ +#define bbPreemptive 0x00000002 /* (1<<(31-bbPreemptivebit)) */ #define fvChkb 0 #define fvChk 0x80000000