libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
Cr0.hh
Go to the documentation of this file.
1/*
2 * Copyright 2021 Assured Information Security, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17
18#include <cstdint>
19
20namespace introvirt {
21namespace x86 {
22
26class Cr0 {
27 public:
34 bool pe() const;
35
42 bool mp() const;
43
50 bool em() const;
51
58 bool ts() const;
59
66 bool et() const;
67
74 bool ne() const;
75
82 bool wp() const;
83
90 bool am() const;
91
98 bool nw() const;
99
106 bool cd() const;
107
114 bool pg() const;
115
121 uint64_t value() const;
122
128 explicit Cr0(uint64_t cr0);
129
130 private:
131 const uint64_t cr0_;
132};
133
134} // namespace x86
135} // namespace introvirt
The x86 Control Register 0.
Definition Cr0.hh:26
bool pe() const
Get the PE (Protected-Mode Enable) bit.
uint64_t value() const
Get the raw value.
bool nw() const
Get the NW (Not-write through) bit.
bool am() const
Get the AM (Alignment mask) bit.
bool et() const
Get the ET (Extension type) bit.
bool em() const
Get the EM (Emulation) bit.
bool ne() const
Get the NE (Numeric error) bit.
bool pg() const
Get the PG (Paging) bit.
bool mp() const
Get the MP (Monitor co-processor) bit.
bool wp() const
Get the WP (Write protect) bit.
Cr0(uint64_t cr0)
Construct a new Cr0 object.
bool cd() const
Get the CD (Cache disable) bit.
bool ts() const
Get the TS (Task switched) bit.
Core IntroVirt classes.
Definition Cr0.hh:20