FreeNOS
IntelConstant.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2009 Niek Linnenbank
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef __LIBARCH_INTEL_CONSTANT_H
19#define __LIBARCH_INTEL_CONSTANT_H
20
38#define CR0_PE 0x00000001
39
41#define CR0_PG 0x80000000
42
44#define CR4_TSD 0x00000004
45#define CR4_PSE (1 << 4)
46
48#define KERNEL_CS 1
49#define KERNEL_CS_SEL 0x8
50
52#define KERNEL_DS 2
53#define KERNEL_DS_SEL 0x10
54
56#define USER_CS 3
57#define USER_CS_SEL (0x18 | 3)
58
60#define USER_DS 4
61#define USER_DS_SEL (0x20 | 3)
62
64#define KERNEL_TSS 5
65#define KERNEL_TSS_SEL 0x28
66
77#define PAGESHIFT 12
78
80#define DIRSHIFT 22
81
83#define PAGESIZE 4096
84
86#define PAGEDIR_MAX 1024
87
89#define PAGETAB_MAX 1024
90
92#define PAGEMASK 0xfffff000
93
95#define SECTIONMASK 0xffc00000
96
98#define MEMALIGN 4
99
110#endif /* __LIBARCH_INTEL_CONSTANT_H */