Read the MAC addresses from the ADT and store them in
"local-mac-address" properties on the relevant nodes in the FDT.
This relies on appropriate aliases in the provided FDT, which
matches how U-Boot provides MAC addresses on embedded targets.
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
-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>
This allows payloads to use DMA for anything that's not PCIe
even without a DART driver. It also restores the DART registers
the state the were left by iBoot.
Signed-off-by: Sven Peter <sven@svenpeter.dev>
Change the way the shell finds methods to add to the locals on startup: the
methods are queried on the object’s class, rather than the object itself. This
allows detecting if an object’s member is a property and ignore it, rather than
accessing the property.
Attributes whose name starts by ‘_’ are also now ignored, which avoids
importing private methods or Python magic methods in the shell namespace.
Fixes spurious accesses to ProxyUtils’s SIMD properties (b, h, etc) on shell
startup, which caused a ProxyCommandError if m1n1 is not recent enough.
Signed-off-by: Vincent Duvert <vincent@duvert.net>
The development Mac OS kernel panics if the PMCR0 sysreg is in an
unexpected state. To avoid that the hypervisor needs to shadow the
interrupt mode and interrupt active flag after it mask the PM FIQ.
Mac OS reads and writes frequently from PMCR0 and PMC 0/1 so handling
in m1n1 is preferred over Python.
Signed-off-by: Janne Grunau <j@jannau.net>
This allows to bringup the USB PHY and the HPM for the
payload without having to initialize the CDC ACM driver
at the same time.
Signed-off-by: Sven Peter <sven@svenpeter.dev>
* Introduce feature flags which allows the proxy and m1n1 to determine which
features they have in common.
* Add a feature flag that disables checksumming (by replacing checksums with
constant values) for the data packets exchanged by REQ_MEMREAD, REQ_MEMWRITE
and REQ_EVENT. The feature is enabled if m1n1 supports it; checksumming is kept
enabled for UART communication.
* To ensure no packet loss when checksumming is disabled, an extra sentinel
value is added after the exchanged data for memory read/write operations.
Signed-off-by: Vincent Duvert <vincent@duvert.net>