Now keeps track of the requested MMIO maps in a DictRangeMap, which is
then flattened to HV page table updates.
TODO: HOOK/SYNC codepaths
Signed-off-by: Hector Martin <marcan@marcan.st>
This metaclass voodoo allows us to define register maps like this:
class SomeDevice(RegMap):
FOO = 0x0000, Register32
BAR = 0x0004, Register32
# Register array
BAZ = range(0x100, 0x200, 4), Register32
Signed-off-by: Hector Martin <marcan@marcan.st>
* Fix correctness issues (ranges could end up overlapping)
* Split ranges instead of merging them on overlap (previously a single
range overlapping everything would reduce the lookup to a linear
search over all ranges)
* Support removal and generic mutations by splitting out a generic
RangeMap class that can be used with arbitrary values/collections
Signed-off-by: Hector Martin <marcan@marcan.st>
-m <script>
Run a script in hypervisor context prior to starting the guest.
This is essentially the same as the shell context.
-c <code>
Run a literal string of code prior to starting the guest.
-S
Start a shell instead of directly starting the guest. Use `start` to
actually begin guest execution.
This also adds a couple example scripts under hv/.
Signed-off-by: Hector Martin <marcan@marcan.st>
All the common/importable stuff now lives in the 'm1n1' module.
General use tools are in tools/
Reverse engineering experiments are in experiments/
Signed-off-by: Hector Martin <marcan@marcan.st>