libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
Idt.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 <introvirt/core/fwd.hh>
20
21#include <cstdint>
22#include <memory>
23#include <vector>
24
25namespace introvirt {
26namespace x86 {
27
35
36class IdtEntry {
37 public:
38 virtual guest_ptr<void> entry_point() const = 0;
39 virtual bool present() const = 0;
40 virtual uint8_t dpl() const = 0;
41 virtual bool storage_segment() const = 0;
42 virtual IdtEntryType type() const = 0;
43 virtual uint16_t selector() const = 0;
44
45 virtual ~IdtEntry() = default;
46};
47
52class Idt {
53 public:
60 virtual std::unique_ptr<const IdtEntry> entry(size_t index) const = 0;
61
67 virtual uint count() const = 0;
68
69 virtual ~Idt() = default;
70};
71
72} // namespace x86
73} // namespace introvirt
Definition guest_ptr.hh:88
Definition Idt.hh:36
virtual guest_ptr< void > entry_point() const =0
virtual bool storage_segment() const =0
virtual uint8_t dpl() const =0
virtual ~IdtEntry()=default
virtual IdtEntryType type() const =0
virtual uint16_t selector() const =0
virtual bool present() const =0
Parser for the x86 interrupt descriptor table.
Definition Idt.hh:52
virtual ~Idt()=default
virtual uint count() const =0
Get the number of entries in the IDT.
virtual std::unique_ptr< const IdtEntry > entry(size_t index) const =0
Get an IDT entry.
Type-safe guest virtual address pointer and guest_ptr template.
IdtEntryType
Definition Idt.hh:28
@ TRAP_GATE_32
Definition Idt.hh:33
@ TRAP_GATE_16
Definition Idt.hh:31
@ TASK_GATE_32
Definition Idt.hh:29
@ INTERRUPT_GATE_16
Definition Idt.hh:30
@ INTERRUPT_GATE_32
Definition Idt.hh:32
Core IntroVirt classes.
Definition Cr0.hh:20