1*96076493Sguenther /* $OpenBSD: psl.h,v 1.5 2018/07/09 19:20:29 guenther Exp $ */ 2f5df1827Smickey /* $NetBSD: psl.h,v 1.1 2003/02/26 21:26:11 fvdl Exp $ */ 3f5df1827Smickey 4f5df1827Smickey /*- 5f5df1827Smickey * Copyright (c) 1990 The Regents of the University of California. 6f5df1827Smickey * All rights reserved. 7f5df1827Smickey * 8f5df1827Smickey * This code is derived from software contributed to Berkeley by 9f5df1827Smickey * William Jolitz. 10f5df1827Smickey * 11f5df1827Smickey * Redistribution and use in source and binary forms, with or without 12f5df1827Smickey * modification, are permitted provided that the following conditions 13f5df1827Smickey * are met: 14f5df1827Smickey * 1. Redistributions of source code must retain the above copyright 15f5df1827Smickey * notice, this list of conditions and the following disclaimer. 16f5df1827Smickey * 2. Redistributions in binary form must reproduce the above copyright 17f5df1827Smickey * notice, this list of conditions and the following disclaimer in the 18f5df1827Smickey * documentation and/or other materials provided with the distribution. 19c5217b0aSjsg * 3. Neither the name of the University nor the names of its contributors 20f5df1827Smickey * may be used to endorse or promote products derived from this software 21f5df1827Smickey * without specific prior written permission. 22f5df1827Smickey * 23f5df1827Smickey * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24f5df1827Smickey * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25f5df1827Smickey * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26f5df1827Smickey * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27f5df1827Smickey * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28f5df1827Smickey * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29f5df1827Smickey * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30f5df1827Smickey * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31f5df1827Smickey * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32f5df1827Smickey * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33f5df1827Smickey * SUCH DAMAGE. 34f5df1827Smickey * 35f5df1827Smickey * @(#)psl.h 5.2 (Berkeley) 1/18/91 36f5df1827Smickey */ 37f5df1827Smickey 382fa72412Spirofti #ifndef _MACHINE_PSL_H_ 392fa72412Spirofti #define _MACHINE_PSL_H_ 40f5df1827Smickey 41f5df1827Smickey /* 42f5df1827Smickey * 386 processor status longword. 43f5df1827Smickey */ 44f5df1827Smickey #define PSL_C 0x00000001 /* carry flag */ 45f5df1827Smickey #define PSL_PF 0x00000004 /* parity flag */ 46f5df1827Smickey #define PSL_AF 0x00000010 /* auxiliary carry flag */ 47f5df1827Smickey #define PSL_Z 0x00000040 /* zero flag */ 48f5df1827Smickey #define PSL_N 0x00000080 /* sign flag */ 49f5df1827Smickey #define PSL_T 0x00000100 /* trap flag */ 50f5df1827Smickey #define PSL_I 0x00000200 /* interrupt enable flag */ 51f5df1827Smickey #define PSL_D 0x00000400 /* direction flag */ 52f5df1827Smickey #define PSL_V 0x00000800 /* overflow flag */ 53f5df1827Smickey #define PSL_IOPL 0x00003000 /* i/o privilege level */ 54f5df1827Smickey #define PSL_NT 0x00004000 /* nested task */ 55f5df1827Smickey #define PSL_RF 0x00010000 /* resume flag */ 56f5df1827Smickey #define PSL_VM 0x00020000 /* virtual 8086 mode */ 57f5df1827Smickey #define PSL_AC 0x00040000 /* alignment check flag */ 58f5df1827Smickey #define PSL_VIF 0x00080000 /* virtual interrupt enable flag */ 59f5df1827Smickey #define PSL_VIP 0x00100000 /* virtual interrupt pending flag */ 60f5df1827Smickey #define PSL_ID 0x00200000 /* identification flag */ 61f5df1827Smickey 62f5df1827Smickey #define PSL_MBO 0x00000002 /* must be one bits */ 63f5df1827Smickey #define PSL_MBZ 0xffc08028 /* must be zero bits */ 64f5df1827Smickey 65f5df1827Smickey #define PSL_USERSET (PSL_MBO | PSL_I) 66f5df1827Smickey #define PSL_USERSTATIC (PSL_MBO | PSL_MBZ | PSL_I | PSL_IOPL | PSL_NT | PSL_VM | PSL_VIF | PSL_VIP) 67f5df1827Smickey #define PSL_USER (PSL_C | PSL_MBO | PSL_PF | PSL_AF | PSL_Z | PSL_N | PSL_V) 68f5df1827Smickey 69f5df1827Smickey /* 70f5df1827Smickey * ??? 71f5df1827Smickey */ 72f5df1827Smickey #ifdef _KERNEL 73f5df1827Smickey #include <machine/intr.h> 74f5df1827Smickey #endif 75f5df1827Smickey 762fa72412Spirofti #endif /* !_MACHINE_PSL_H_ */ 77