RTEMS 6.1-rc7
Loading...
Searching...
No Matches
registers.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
13/*
14 * COPYRIGHT (c) 1998 valette@crf.canon.fr
15 *
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
18 * are met:
19 * 1. Redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer.
21 * 2. Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
29 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 */
37
38#ifndef _RTEMS_SCORE_REGISTERS_H
39#define _RTEMS_SCORE_REGISTERS_H
40
41/*
42 * definition related to EFLAGS
43 */
44#define EFLAGS_CARRY 0x1
45#define EFLAGS_PARITY 0x4
46
47#define EFLAGS_AUX_CARRY 0x10
48#define EFLAGS_ZERO 0x40
49#define EFLAGS_SIGN 0x80
50
51#define EFLAGS_TRAP 0x100
52#define EFLAGS_INTR_ENABLE 0x200
53#define EFLAGS_DIRECTION 0x400
54#define EFLAGS_OVERFLOW 0x800
55
56#define EFLAGS_IOPL_MASK 0x3000
57#define EFLAGS_NESTED_TASK 0x8000
58
59#define EFLAGS_RESUME 0x10000
60#define EFLAGS_VIRTUAL_MODE 0x20000
61#define EFLAGS_ALIGN_CHECK 0x40000
62#define EFLAGS_VIRTUAL_INTR 0x80000
63
64#define EFLAGS_VIRTUAL_INTR_PEND 0x100000
65#define EFLAGS_ID 0x200000
66
67/*
68 * definitions related to CR0
69 */
70#define CR0_PROTECTION_ENABLE 0x1
71#define CR0_MONITOR_COPROC 0x2
72#define CR0_COPROC_SOFT_EMUL 0x4
73#define CR0_FLOATING_INSTR_EXCEPTION 0x8
74
75#define CR0_EXTENSION_TYPE 0x10
76#define CR0_NUMERIC_ERROR 0x20
77
78#define CR0_WRITE_PROTECT 0x10000
79#define CR0_ALIGMENT_MASK 0x40000
80
81#define CR0_NO_WRITE_THROUGH 0x20000000
82#define CR0_PAGE_LEVEL_CACHE_DISABLE 0x40000000
83#define CR0_PAGING 0x80000000
84
85/*
86 * definitions related to CR3
87 */
88
89#define CR3_PAGE_CACHE_DISABLE 0x10
90#define CR3_PAGE_WRITE_THROUGH 0x8
91#define CR3_PAGE_DIRECTORY_MASK 0xFFFFF000
92
93#endif