MCPcopy Create free account
hub / github.com/Compiled-Code/eac-mapper / PhysicalMemoryPage

Class PhysicalMemoryPage

dependencies/vdm/util/util.hpp:25–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24#pragma pack (push, 1)
25 struct PhysicalMemoryPage//CM_PARTIAL_RESOURCE_DESCRIPTOR
26 {
27 uint8_t type;
28 uint8_t shareDisposition;
29 uint16_t flags;
30 uint64_t pBegin;
31 uint32_t sizeButNotExactly;
32 uint32_t pad;
33
34 static constexpr uint16_t cm_resource_memory_large_40{ 0x200 };
35 static constexpr uint16_t cm_resource_memory_large_48{ 0x400 };
36 static constexpr uint16_t cm_resource_memory_large_64{ 0x800 };
37
38 uint64_t size()const noexcept
39 {
40 if (flags & cm_resource_memory_large_40)
41 return uint64_t{ sizeButNotExactly } << 8;
42 else if (flags & cm_resource_memory_large_48)
43 return uint64_t{ sizeButNotExactly } << 16;
44 else if (flags & cm_resource_memory_large_64)
45 return uint64_t{ sizeButNotExactly } << 32;
46 else
47 return uint64_t{ sizeButNotExactly };
48 }
49 };
50 static_assert(sizeof(PhysicalMemoryPage) == 20);
51#pragma pack (pop)
52

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected