test_pdpte_x64.cpp
Go to the documentation of this file.
1 //
2 // Bareflank Hypervisor
3 //
4 // Copyright (C) 2015 Assured Information Security, Inc.
5 // Author: Rian Quinn <quinnr@ainfosec.com>
6 // Author: Brendan Kerrigan <kerriganb@ainfosec.com>
7 // Author: Connor Davis <davisc@ainfosec.com>
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU Lesser General Public
11 // License as published by the Free Software Foundation; either
12 // version 2.1 of the License, or (at your option) any later version.
13 //
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // Lesser General Public License for more details.
18 //
19 // You should have received a copy of the GNU Lesser General Public
20 // License along with this library; if not, write to the Free Software
21 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 
23 #include <test.h>
24 #include <intrinsics/cpuid_x64.h>
25 #include <intrinsics/pdpte_x64.h>
26 
27 using namespace x64;
28 
29 extern std::map<cpuid::field_type, cpuid::value_type> g_eax_cpuid;
30 
31 void
32 intrinsics_ut::test_pdpte_x64_reserved_mask()
33 {
35  this->expect_true(pdpte::reserved::mask() == 0xFFFF0000000001E6ULL);
36 }
37 
38 void
39 intrinsics_ut::test_pdpte_x64_page_directory_addr_mask()
40 {
42  this->expect_true(pdpte::page_directory_addr::mask() == 0x0000FFFFFFFFF000ULL);
43 }
auto mask() noexcept
Definition: pdpte_x64.h:48
constexpr const auto addr
Definition: cpuid_x64.h:80
Definition: cache_x64.h:31
std::map< cpuid::field_type, cpuid::value_type > g_eax_cpuid
#define expect_true(a)