Go to the documentation of this file.
29 #ifndef __BASE_LOADER_MEMORY_IMAGE_HH__
30 #define __BASE_LOADER_MEMORY_IMAGE_HH__
34 #include <initializer_list>
54 const uint8_t *_data,
size_t _size) :
67 "Segment outside the bounds of the image data");
78 const uint8_t *
data =
nullptr;
114 for (
auto &
seg: segs)
135 max = std::max(max,
seg.base +
seg.size);
144 min = std::min(min,
seg.base);
161 static inline std::ostream &
170 #endif // __BASE_LOADER_MEMORY_IMAGE_HH__
MemoryImage & offset(Addr by)
Segment(const std::string &_name, const ImageFileDataPtr &_ifd)
bool contains(Addr addr) const
bool write(const PortProxy &proxy) const
MemoryImage & move(std::function< Addr(Addr)> mapper)
MemoryImage(const Segment &seg)
Segment(const std::string &_name, Addr _base, size_t _size)
std::shared_ptr< ImageFileData > ImageFileDataPtr
std::vector< Segment > _segments
Segment(const std::string &_name, Addr _base, const uint8_t *_data, size_t _size)
void addSegments(std::initializer_list< Segment > segs)
MemoryImage(std::initializer_list< Segment > segs)
MemoryImage & mask(Addr m)
bool writeSegment(const Segment &seg, const PortProxy &proxy) const
Segment(const std::string &_name, Addr _base, const ImageFileDataPtr &_ifd, Addr offset, size_t _size)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
This object is a proxy for a port or other object which implements the functional response protocol,...
const std::vector< Segment > & segments() const
void ccprintf(cp::Print &print)
static std::ostream & operator<<(std::ostream &os, const MemoryImage::Segment &seg)
void addSegment(const Segment &seg)
Generated on Wed Sep 30 2020 14:02:07 for gem5 by doxygen 1.8.17