summaryrefslogtreecommitdiff
path: root/sys/arch/i386/apm_init/apm_segments.h
blob: 5e5fcdbe7e49d1102a40ef974bf57da229202382 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * LP (Laptop Package)
 *
 * Copyright (C) 1994 by HOSOKAWA Tatsumi <hosokawa@mt.cs.keio.ac.jp>
 *
 * This software may be used, modified, copied, and distributed, in
 * both source and binary form provided that the above copyright and
 * these terms are retained. Under no circumstances is the author 
 * responsible for the proper functioning of this software, nor does 
 * the author assume any responsibility for damages incurred with its 
 * use.
 *
 * Sep., 1994	Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
 */

#define SIZEOF_GDT		8
#define BOOTSTRAP_GDT_NUM	9

#define APM_INIT_CS_INDEX	(BOOTSTRAP_GDT_NUM - 3)
#define APM_INIT_DS_INDEX	(BOOTSTRAP_GDT_NUM - 2)
#define APM_INIT_CS16_INDEX	(BOOTSTRAP_GDT_NUM - 1)
#define APM_INIT_CS_SEL		(APM_INIT_CS_INDEX << 3)
#define APM_INIT_DS_SEL		(APM_INIT_DS_INDEX << 3)
#define APM_INIT_CS16_SEL	(APM_INIT_CS16_INDEX << 3)

#define CS32_ATTRIB		0x4F9e
#define CS16_ATTRIB		0x009e
#define DS32_ATTRIB		0x4F92

#define BOOTSTRAP_DS_SEL	0x10