mem: Support initializing a memory with an image file.

This is particularly useful for ROMs. It avoids forcing other components
of the simulation (the System object, the Workload object) from having
to know what ROMs exist, where they are, and what goes on them, and
leaves that to the config script.

Change-Id: Ibbcffffcb82e0d289f0b3942728c30b8f69d28ba
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27267
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: Gem5 Cloud Project GCB service account <345032938727@cloudbuild.gserviceaccount.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 files changed