Commit e7e039de authored by LIU Yu's avatar LIU Yu
Browse files

Support per-device arguments and device factory reuse

As proposed in #1652, we made the following changes to MMIO device (factory)
plugin API, to mitigate current limitations and facilitate factory reuse.

- removed `sargs` from `device_factory_t`, and introduced a new type alias
  `device_factory_sargs_t` to capture `<device_factory_t *, sargs>` pairs,
  this is used to instantiate sim_t instances;
- changed the signature of `device_factory_t::generate_fdt` and
  `device_factory_t::parse_from_fdt` to take on an extra `sargs` argument,
  for instantiating devices with per-device arguments;
- made `device_factory_t` const and potentially resuable across multiple
  `sim_t` instances.
parent d39cbb3a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment