29 #ifndef __BASE_LOADER_MEMORY_IMAGE_HH__
30 #define __BASE_LOADER_MEMORY_IMAGE_HH__
34 #include <initializer_list>
59 const uint8_t *_data,
size_t _size) :
72 "Segment outside the bounds of the image data");
83 const uint8_t *
data =
nullptr;
119 for (
auto &
seg: segs)
140 max = std::max(max,
seg.base +
seg.size);
149 min = std::min(min,
seg.base);
166 static inline std::ostream &
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
This object is a proxy for a port or other object which implements the functional response protocol,...
MemoryImage & offset(Addr by)
MemoryImage(const Segment &seg)
void addSegments(std::initializer_list< Segment > segs)
MemoryImage & mask(Addr m)
std::vector< Segment > _segments
const std::vector< Segment > & segments() const
void addSegment(const Segment &seg)
bool contains(Addr addr) const
bool write(const PortProxy &proxy) const
bool writeSegment(const Segment &seg, const PortProxy &proxy) const
MemoryImage(std::initializer_list< Segment > segs)
MemoryImage & move(std::function< Addr(Addr)> mapper)
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
static std::ostream & operator<<(std::ostream &os, const MemoryImage::Segment &seg)
std::shared_ptr< ImageFileData > ImageFileDataPtr
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void ccprintf(cp::Print &print)
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)
Segment(const std::string &_name, Addr _base, size_t _size)
Segment(const std::string &_name, const ImageFileDataPtr &_ifd)
Segment(const std::string &_name, Addr _base, const ImageFileDataPtr &_ifd, Addr offset, size_t _size)
Segment(const std::string &_name, Addr _base, const uint8_t *_data, size_t _size)