segments.h (268351) | segments.h (282274) |
---|---|
1/*- 2 * Copyright (c) 1989, 1990 William F. Jolitz 3 * Copyright (c) 1990 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * William Jolitz. 8 * --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * from: @(#)segments.h 7.1 (Berkeley) 5/9/91 | 1/*- 2 * Copyright (c) 1989, 1990 William F. Jolitz 3 * Copyright (c) 1990 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * William Jolitz. 8 * --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * from: @(#)segments.h 7.1 (Berkeley) 5/9/91 |
34 * $FreeBSD: head/sys/x86/include/segments.h 268351 2014-07-07 00:27:09Z marcel $ | 34 * $FreeBSD: head/sys/x86/include/segments.h 282274 2015-04-30 15:48:48Z jhb $ |
35 */ 36 37#ifndef _X86_SEGMENTS_H_ 38#define _X86_SEGMENTS_H_ 39 40/* 41 * X86 Segmentation Data Structures and definitions 42 */ 43 44/* 45 * Selectors 46 */ 47#define SEL_RPL_MASK 3 /* requester priv level */ 48#define ISPL(s) ((s)&3) /* priority level of a selector */ | 35 */ 36 37#ifndef _X86_SEGMENTS_H_ 38#define _X86_SEGMENTS_H_ 39 40/* 41 * X86 Segmentation Data Structures and definitions 42 */ 43 44/* 45 * Selectors 46 */ 47#define SEL_RPL_MASK 3 /* requester priv level */ 48#define ISPL(s) ((s)&3) /* priority level of a selector */ |
49#ifdef XEN 50#define SEL_KPL 1 /* kernel priority level */ 51#else | |
52#define SEL_KPL 0 /* kernel priority level */ | 49#define SEL_KPL 0 /* kernel priority level */ |
53#endif | |
54#define SEL_UPL 3 /* user priority level */ 55#define ISLDT(s) ((s)&SEL_LDT) /* is it local or global */ 56#define SEL_LDT 4 /* local descriptor table */ 57#define IDXSEL(s) (((s)>>3) & 0x1fff) /* index of selector */ 58#define LSEL(s,r) (((s)<<3) | SEL_LDT | r) /* a local selector */ 59#define GSEL(s,r) (((s)<<3) | r) /* a global selector */ 60 61/* --- 177 unchanged lines hidden (view full) --- 239#define GUSERLDT_SEL 11 /* User LDT */ 240#define GPANIC_SEL 12 /* Task state to consider panic from */ 241#define GBIOSCODE32_SEL 13 /* BIOS interface (32bit Code) */ 242#define GBIOSCODE16_SEL 14 /* BIOS interface (16bit Code) */ 243#define GBIOSDATA_SEL 15 /* BIOS interface (Data) */ 244#define GBIOSUTIL_SEL 16 /* BIOS interface (Utility) */ 245#define GBIOSARGS_SEL 17 /* BIOS interface (Arguments) */ 246#define GNDIS_SEL 18 /* For the NDIS layer */ | 50#define SEL_UPL 3 /* user priority level */ 51#define ISLDT(s) ((s)&SEL_LDT) /* is it local or global */ 52#define SEL_LDT 4 /* local descriptor table */ 53#define IDXSEL(s) (((s)>>3) & 0x1fff) /* index of selector */ 54#define LSEL(s,r) (((s)<<3) | SEL_LDT | r) /* a local selector */ 55#define GSEL(s,r) (((s)<<3) | r) /* a global selector */ 56 57/* --- 177 unchanged lines hidden (view full) --- 235#define GUSERLDT_SEL 11 /* User LDT */ 236#define GPANIC_SEL 12 /* Task state to consider panic from */ 237#define GBIOSCODE32_SEL 13 /* BIOS interface (32bit Code) */ 238#define GBIOSCODE16_SEL 14 /* BIOS interface (16bit Code) */ 239#define GBIOSDATA_SEL 15 /* BIOS interface (Data) */ 240#define GBIOSUTIL_SEL 16 /* BIOS interface (Utility) */ 241#define GBIOSARGS_SEL 17 /* BIOS interface (Arguments) */ 242#define GNDIS_SEL 18 /* For the NDIS layer */ |
247#ifdef XEN 248#define NGDT 9 249#else | |
250#define NGDT 19 | 243#define NGDT 19 |
251#endif | |
252 253/* 254 * Entries in the Local Descriptor Table (LDT) 255 */ 256#define LSYS5CALLS_SEL 0 /* forced by intel BCS */ 257#define LSYS5SIGR_SEL 1 258#define L43BSDCALLS_SEL 2 /* notyet */ 259#define LUCODE_SEL 3 --- 28 unchanged lines hidden --- | 244 245/* 246 * Entries in the Local Descriptor Table (LDT) 247 */ 248#define LSYS5CALLS_SEL 0 /* forced by intel BCS */ 249#define LSYS5SIGR_SEL 1 250#define L43BSDCALLS_SEL 2 /* notyet */ 251#define LUCODE_SEL 3 --- 28 unchanged lines hidden --- |