sr.h revision 90643
190643Sbenno/* 290643Sbenno * Copyright (C) 2002 Benno Rice. 390643Sbenno * All rights reserved. 490643Sbenno * 590643Sbenno * Redistribution and use in source and binary forms, with or without 690643Sbenno * modification, are permitted provided that the following conditions 790643Sbenno * are met: 890643Sbenno * 1. Redistributions of source code must retain the above copyright 990643Sbenno * notice, this list of conditions and the following disclaimer. 1090643Sbenno * 2. Redistributions in binary form must reproduce the above copyright 1190643Sbenno * notice, this list of conditions and the following disclaimer in the 1290643Sbenno * documentation and/or other materials provided with the distribution. 1390643Sbenno * 1490643Sbenno * THIS SOFTWARE IS PROVIDED BY Benno Rice ``AS IS'' AND ANY EXPRESS OR 1590643Sbenno * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1690643Sbenno * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1790643Sbenno * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1890643Sbenno * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 1990643Sbenno * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 2090643Sbenno * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 2190643Sbenno * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 2290643Sbenno * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 2390643Sbenno * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2490643Sbenno * 2590643Sbenno * $FreeBSD: head/sys/powerpc/include/sr.h 90643 2002-02-14 01:39:11Z benno $ 2690643Sbenno */ 2790643Sbenno 2890643Sbenno#ifndef _MACHINE_SR_H_ 2990643Sbenno#define _MACHINE_SR_H_ 3090643Sbenno 3190643Sbenno/* 3290643Sbenno * Bit definitions for segment registers. 3390643Sbenno * 3490643Sbenno * PowerPC Microprocessor Family: The Programming Environments for 32-bit 3590643Sbenno * Microprocessors, section 2.3.5 3690643Sbenno */ 3790643Sbenno 3890643Sbenno#define SR_TYPE 0x80000000 /* Type selector */ 3990643Sbenno#define SR_KS 0x40000000 /* Supervisor-state protection key */ 4090643Sbenno#define SR_KP 0x20000000 /* User-state protection key */ 4190643Sbenno#define SR_N 0x10000000 /* No-execute protection */ 4290643Sbenno#define SR_VSID_MASK 0x00ffffff /* Virtual Segment ID mask */ 4390643Sbenno 4490643Sbenno#endif /* !_MACHINE_SR_H_ */ 45