xref: /freebsd/sys/i386/include/apm_segments.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
186cb007fSWarner Losh /*-
28321fda1SDavid Greenman  * LP (Laptop Package)
38321fda1SDavid Greenman  *
48321fda1SDavid Greenman  * Copyright (C) 1994 by HOSOKAWA Tatsumi <hosokawa@mt.cs.keio.ac.jp>
58321fda1SDavid Greenman  *
68321fda1SDavid Greenman  * This software may be used, modified, copied, and distributed, in
78321fda1SDavid Greenman  * both source and binary form provided that the above copyright and
88321fda1SDavid Greenman  * these terms are retained. Under no circumstances is the author
98321fda1SDavid Greenman  * responsible for the proper functioning of this software, nor does
108321fda1SDavid Greenman  * the author assume any responsibility for damages incurred with its
118321fda1SDavid Greenman  * use.
128321fda1SDavid Greenman  *
138321fda1SDavid Greenman  * Sep., 1994	Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
148321fda1SDavid Greenman  */
158321fda1SDavid Greenman 
168321fda1SDavid Greenman #ifndef _MACHINE_APM_SEGMENTS_H
178321fda1SDavid Greenman #define _MACHINE_APM_SEGMENTS_H
188321fda1SDavid Greenman 
198321fda1SDavid Greenman #define SIZEOF_GDT		8
208321fda1SDavid Greenman #define BOOTSTRAP_GDT_NUM	32
218321fda1SDavid Greenman 
22f42e1448SNate Williams #define APM_INIT_CS_INDEX	(BOOTSTRAP_GDT_NUM - 4)
23f42e1448SNate Williams #define APM_INIT_DS_INDEX	(BOOTSTRAP_GDT_NUM - 3)
24f42e1448SNate Williams #define APM_INIT_CS16_INDEX	(BOOTSTRAP_GDT_NUM - 2)
25f42e1448SNate Williams #define APM_INIT_DS16_INDEX	(BOOTSTRAP_GDT_NUM - 1)
268321fda1SDavid Greenman #define APM_INIT_CS_SEL		(APM_INIT_CS_INDEX << 3)
278321fda1SDavid Greenman #define APM_INIT_DS_SEL		(APM_INIT_DS_INDEX << 3)
288321fda1SDavid Greenman #define APM_INIT_CS16_SEL	(APM_INIT_CS16_INDEX << 3)
29f42e1448SNate Williams #define APM_INIT_DS16_SEL	(APM_INIT_DS16_INDEX << 3)
308321fda1SDavid Greenman 
318321fda1SDavid Greenman #define CS32_ATTRIB		0x409e
328321fda1SDavid Greenman #define DS32_ATTRIB		0x4092
33f42e1448SNate Williams #define CS16_ATTRIB		0x009e
34f42e1448SNate Williams #define DS16_ATTRIB		0x0092
358321fda1SDavid Greenman 
368321fda1SDavid Greenman #endif
37