MCPcopy Create free account
hub / github.com/ByteCorum/DragonBurn / GetPhysicalAddress

Method GetPhysicalAddress

DragonBurn-kernel/intel_driver.cpp:415–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413}
414
415bool intel_driver::GetPhysicalAddress(uint64_t address, uint64_t* out_physical_address) {
416 if (!address)
417 return 0;
418
419 GET_PHYS_ADDRESS_BUFFER_INFO get_phys_address_buffer = { 0 };
420
421 get_phys_address_buffer.case_number = 0x25;
422 get_phys_address_buffer.address_to_translate = address;
423
424 DWORD bytes_returned = 0;
425
426 if (!DeviceIoControl(hDevice, ioctl1, &get_phys_address_buffer, sizeof(get_phys_address_buffer), nullptr, 0, &bytes_returned, nullptr))
427 return false;
428
429 *out_physical_address = get_phys_address_buffer.return_physical_address;
430 return true;
431}
432
433uint64_t intel_driver::MapIoSpace(uint64_t physical_address, uint32_t size) {
434 if (!physical_address || !size)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected