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:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user