1
0
mirror of https://github.com/momo5502/hypervisor.git synced 2025-07-05 10:41:50 +00:00

More irp implementation

This commit is contained in:
momo5502
2022-04-03 19:10:04 +02:00
parent 01ed54e8a2
commit 42c7f649f9
12 changed files with 271 additions and 4 deletions

View File

@ -1,6 +1,7 @@
#include "std_include.hpp"
#include "memory.hpp"
#include "string.hpp"
#include "process.hpp"
namespace memory
{
@ -103,4 +104,15 @@ namespace memory
ExFreePool(memory);
}
}
uint64_t query_process_physical_page(const uint32_t process_id, void* address,
uint8_t buffer[PAGE_SIZE])
{
const auto process_handle = process::find_process_by_id(process_id);
process::scoped_process_attacher attacher{process_handle};
memcpy(buffer, address, PAGE_SIZE);
return get_physical_address(address);
}
}