27 #include <type_traits> 50 namespace access_rights
78 constexpr
const auto ring0 = 0x00000000U;
79 constexpr
const auto ring1 = 0x00000001U;
80 constexpr
const auto ring2 = 0x00000002U;
81 constexpr
const auto ring3 = 0x00000003U;
117 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
119 {
return ((addr <= 0x00007FFFFFFFFFFFUL) || (addr >= 0xFFFF800000000000UL)); }
121 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
125 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
129 auto mask = (0xFFFFFFFFFFFFFFFFUL >> bits) << bits;
131 return ((addr &
mask) == 0);
constexpr const auto overflow
constexpr const auto invalid_opcode
constexpr const auto ring0_cs_descriptor
constexpr const auto nmi_interrupt
constexpr const auto cache_line_size
constexpr const auto read_write_expand_down
constexpr const auto alignment_check
constexpr const auto double_fault
constexpr const auto execute_only_conforming
constexpr const auto mask
constexpr const auto coprocessor_segment_overrun
auto is_physical_address_valid(T addr)
constexpr const auto breakpoint
constexpr const auto read_execute_accessed
constexpr const auto read_write_expand_down_accessed
constexpr const auto read_only_expand_down_accessed
auto is_linear_address_valid(T addr)
constexpr const auto unusable
constexpr const auto device_not_available
constexpr const auto ring2
constexpr const auto read_write
constexpr const auto read_only_accessed
constexpr const auto simd_floating_point_exception
constexpr const auto read_write_accessed
constexpr const auto execute_only_accessed
constexpr const auto addr
constexpr const auto debug_exception
constexpr const auto virtualization_exception
constexpr const auto write_back
constexpr const auto page_shift
constexpr const auto read_execute
constexpr const auto ring0_tr_descriptor
constexpr const auto uncacheable_minus
constexpr const auto page_fault
constexpr const auto machine_check
constexpr const auto ring0
constexpr const auto segment_not_present
constexpr const auto read_execute_conforming_accessed
constexpr const auto floating_point_error
constexpr const auto ring0_gs_descriptor
constexpr const auto write_protected
constexpr const auto page_size
constexpr const auto uncacheable
constexpr const auto execute_only
constexpr const auto ring1
constexpr const auto cache_line_shift
constexpr const auto invalid_tss
constexpr const auto stack_segment_fault
constexpr const auto execute_only_conforming_accessed
constexpr const auto divide_error
constexpr const auto bound_range_exceeded
constexpr const auto ring0_ss_descriptor
auto is_address_canonical(T addr)
constexpr const auto tss_available
constexpr const auto general_protection
constexpr const auto write_through
constexpr const auto ring3
constexpr const auto ring0_fs_descriptor
constexpr const auto tss_busy
constexpr const auto read_execute_conforming
constexpr const auto read_only
constexpr const auto write_combining
constexpr const auto read_only_expand_down