apm_segments.h revision 3263
13263Sdg/*
23263Sdg * LP (Laptop Package)
33263Sdg *
43263Sdg * Copyright (C) 1994 by HOSOKAWA Tatsumi <hosokawa@mt.cs.keio.ac.jp>
53263Sdg *
63263Sdg * This software may be used, modified, copied, and distributed, in
73263Sdg * both source and binary form provided that the above copyright and
83263Sdg * these terms are retained. Under no circumstances is the author
93263Sdg * responsible for the proper functioning of this software, nor does
103263Sdg * the author assume any responsibility for damages incurred with its
113263Sdg * use.
123263Sdg *
133263Sdg * Sep., 1994	Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
143263Sdg */
153263Sdg
163263Sdg#ifndef _MACHINE_APM_SEGMENTS_H
173263Sdg#define _MACHINE_APM_SEGMENTS_H
183263Sdg
193263Sdg#define SIZEOF_GDT		8
203263Sdg#define BOOTSTRAP_GDT_NUM	32
213263Sdg
223263Sdg#define APM_INIT_CS_INDEX	(BOOTSTRAP_GDT_NUM - 3)
233263Sdg#define APM_INIT_DS_INDEX	(BOOTSTRAP_GDT_NUM - 2)
243263Sdg#define APM_INIT_CS16_INDEX	(BOOTSTRAP_GDT_NUM - 1)
253263Sdg#define APM_INIT_CS_SEL		(APM_INIT_CS_INDEX << 3)
263263Sdg#define APM_INIT_DS_SEL		(APM_INIT_DS_INDEX << 3)
273263Sdg#define APM_INIT_CS16_SEL	(APM_INIT_CS16_INDEX << 3)
283263Sdg
293263Sdg#define CS32_ATTRIB		0x409e
303263Sdg#define CS16_ATTRIB		0x009e
313263Sdg#define DS32_ATTRIB		0x4092
323263Sdg
333263Sdg#define BOOTSTRAP_DS_SEL	0x10
343263Sdg
353263Sdg#endif
36