72 uint64_t
base()
const {
return base_; }
78 uint32_t
limit()
const {
return limit_; }
89 uint8_t
dpl()
const {
return dpl_; }
91 bool s()
const {
return s_; }
93 uint8_t
type()
const {
return type_; }
132 return (type_ & 0x8);
151 bool db,
bool s,
bool l,
bool g,
bool avl)
152 : selector_(sel), base_(
base), limit_(
limit), type_(
type), p_(p), dpl_(
dpl), db_(
db), s_(
s),
153 l_(l), g_(g), avl_(
avl) {}
156 void verify_s()
const {
161 void verify_code()
const {
167 void verify_data()
const {
170 throw InvalidMethodException();
174 const SegmentSelector selector_;
175 const uint64_t base_;
176 const uint32_t limit_;
Thrown when the wrong method is called.
Definition InvalidMethodException.hh:29
SegmentSelector(uint16_t value)
Definition Segment.hh:57
uint16_t rpl() const
Get the requester privilege level.
Definition Segment.hh:48
const uint16_t value_
Definition Segment.hh:60
uint16_t index() const
Get the index into the descriptor table.
Definition Segment.hh:33
uint16_t value() const
Get the raw value of the selector.
Definition Segment.hh:55
bool table_indicator() const
Check if the selector is for the GDT or LDT.
Definition Segment.hh:41
Class to represent an x86 segment register.
Definition Segment.hh:66
uint8_t type() const
Definition Segment.hh:93
bool long_mode() const
Definition Segment.hh:105
bool readable() const
Definition Segment.hh:140
uint32_t limit() const
Get the size of the segment.
Definition Segment.hh:78
uint8_t dpl() const
Definition Segment.hh:89
bool present() const
Definition Segment.hh:87
bool granularity() const
Definition Segment.hh:95
bool accessed() const
Definition Segment.hh:145
bool s() const
Definition Segment.hh:91
bool data() const
Definition Segment.hh:115
bool expand_down() const
Definition Segment.hh:120
bool avl() const
Definition Segment.hh:110
SegmentSelector selector() const
Get the segment selector.
Definition Segment.hh:85
bool db() const
Definition Segment.hh:100
Segment(SegmentSelector sel, uint64_t base, uint32_t limit, uint8_t type, bool p, uint8_t dpl, bool db, bool s, bool l, bool g, bool avl)
Definition Segment.hh:150
bool conforming() const
Definition Segment.hh:135
uint64_t base() const
Get the base address of the segment.
Definition Segment.hh:72
bool writable() const
Definition Segment.hh:125
bool code() const
Definition Segment.hh:130
#define unlikely(x)
Definition compiler.hh:27
Core IntroVirt classes.
Definition Cr0.hh:20