Go to the documentation of this file.
29 #ifndef __SRC_MEM_VMA_HH__
30 #define __SRC_MEM_VMA_HH__
37 #include "debug/Vma.hh"
46 int fd=-1, off_t off=0)
49 DPRINTF(Vma,
"Creating vma start %#x len %llu end %#x\n",
50 r.start(),
r.size(),
r.end());
54 std::make_shared<MappedFileBuffer>(
fd,
r.size(), off);
198 #endif // __SRC_MEM_VMA_HH__
bool contains(const Addr &a) const
uint64_t getLength() const
void sliceRegionLeft(Addr slice_addr)
Remove the address range to the left of slice_addr.
void remap(Addr new_start)
Remap the virtual memory area starting at new_start.
bool contains(const Addr &a) const
Determine if the range contains an address.
Addr end() const
Get the end address of the range.
uint64_t _hostBufLen
Length of host buffer for this virtual memory area.
std::shared_ptr< MappedFileBuffer > _origHostBuf
The host file backing will be chopped up and reassigned as pages are mapped, remapped,...
void sliceRegionRight(Addr slice_addr)
Remove the address range to the right of slice_addr.
VMA(AddrRange r, Addr page_bytes, const std::string &vma_name="anon", int fd=-1, off_t off=0)
bool hasHostBuf() const
Check if the virtual memory area has an equivalent buffer on the host machine.
void * _hostBuf
Host buffer ptr for this virtual memory area.
bool mergesWith(const AddrRange &r) const
bool isSubset(const AddrRange &r) const
std::string _vmaName
Human-readable name associated with the virtual memory area.
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
Addr size()
Defer AddrRange related calls to the AddrRange.
MappedFileBuffer is a wrapper around a region of host memory backed by a file.
bool intersects(const AddrRange &r) const
Determine if another range intersects this one, i.e.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const std::string & getName()
This object is a proxy for a port or other object which implements the functional response protocol,...
Addr start() const
Get the start address of the range.
AddrRange _addrRange
Address range for this virtual memory area.
bool isStrictSuperset(const AddrRange &range) const
Returns true if desired range exists within this virtual memory area and does not include the start a...
MappedFileBuffer(int fd, size_t length, off_t offset)
bool mergesWith(const AddrRange &r) const
Determine if another range merges with the current one, i.e.
bool isSubset(const AddrRange &r) const
Determine if this range is a subset of another range, i.e.
void fillMemPages(Addr start, Addr size, PortProxy &port) const
Copy memory from a buffer which resides on the host machine into a section of memory on the target.
bool intersects(const AddrRange &r) const
Addr size() const
Get the size of the address range.
Addr _pageBytes
Number of bytes in an OS page.
Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17