Support Mapping Multiple Physical Memory with one VA and Bug Fix

- Added support for mapping any portion of a virtual allocation to a
physical mapping with a lookup function for reserved virtual addresses.
- Added support for multiple mappings linked to the same virtual
reservation.
- Fixed bug with 64 bit addresses on windows with invalid addresses
passed to the user.

Related-To: LOCI-3904, LOCI-3914, LOCI-3931

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
This commit is contained in:
Spruit, Neil R
2023-01-21 00:37:25 +00:00
committed by Compute-Runtime-Automation
parent b4f04a800b
commit b5692c04cd
5 changed files with 308 additions and 34 deletions

View File

@@ -59,9 +59,16 @@ struct AddressRange {
size_t size;
};
struct MemoryMappedRange {
const void *ptr;
size_t size;
struct PhysicalMemoryAllocation *mappedAllocation;
};
struct VirtualMemoryReservation {
AddressRange virtualAddressRange;
MemoryFlags flags;
std::map<void *, MemoryMappedRange *> mappedAllocations;
struct PhysicalMemoryAllocation *mappedAllocation;
uint32_t rootDeviceIndex;
};