MCPcopy Create free account
hub / github.com/Bareflank/hypervisor / platform_virt_to_phys

Function platform_virt_to_phys

loader/windows/src/platform.c:206–211  ·  view source on GitHub ↗

* <!-- description --> * @brief Given a virtual address, this function returns the virtual * address's physical address. Returns NULLPTR if the conversion failed. * * <!-- inputs/outputs --> * @param virt the virtual address to convert to a physical address * @return Given a virtual address, this function returns the virtual * address's physical address. Returns NULLPTR if the

Source from the content-addressed store, hash-verified

204 * address's physical address. Returns NULLPTR if the conversion failed.
205 */
206NODISCARD uintptr_t
207platform_virt_to_phys(void const *const virt) NOEXCEPT
208{
209 PHYSICAL_ADDRESS addr = MmGetPhysicalAddress((PVOID)virt);
210 return addr.QuadPart;
211}
212
213/**
214 * <!-- description -->

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected