1 /* 2 * Copyright (c) 1992 Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Ralph Campbell. 7 * 8 * %sccs.include.redist.c% 9 * 10 * @(#)psl.h 7.1 (Berkeley) 01/07/92 11 */ 12 13 #include "machConst.h" 14 15 #define PSL_LOWIPL (MACH_INT_MASK | MACH_SR_INT_ENA_CUR) 16 17 #define PSL_USERSET ( \ 18 MACH_SR_KU_OLD | \ 19 MACH_SR_INT_ENA_OLD | \ 20 MACH_SR_KU_PREV | \ 21 MACH_SR_INT_ENA_PREV | \ 22 MACH_INT_MASK) 23 24 #define PSL_USERCLR ( \ 25 MACH_SR_COP_USABILITY | \ 26 MACH_SR_BOOT_EXC_VEC | \ 27 MACH_SR_TLB_SHUTDOWN | \ 28 MACH_SR_PARITY_ERR | \ 29 MACH_SR_CACHE_MISS | \ 30 MACH_SR_PARITY_ZERO | \ 31 MACH_SR_SWAP_CACHES | \ 32 MACH_SR_ISOL_CACHES | \ 33 MACH_SR_KU_CUR | \ 34 MACH_SR_INT_ENA_CUR | \ 35 MACH_SR_MBZ) 36 37 /* 38 * Macros to decode processor status word. 39 */ 40 #define USERMODE(ps) ((ps) & MACH_SR_KU_PREV) 41 #define BASEPRI(ps) (((ps) & (MACH_INT_MASK | MACH_SR_INT_ENA_PREV)) \ 42 == (MACH_INT_MASK | MACH_SR_INT_ENA_PREV)) 43