Do not forget to clear the L2C_ERR flags in silent mode also. This is
necessary for proper recovery.
Signed-off-by: Martin Povišer <povik@protonmail.com>
Use register definitions where they are now available. Start from full
AUDIO_P reset and set NCO ourselves (instead of relying on iBoot
values).
Signed-off-by: Martin Povišer <povik@protonmail.com>
Make sure we read any reports before we start submitting new
descriptors. Also put sleep in busy-wait loop and make speaker_amp.py
exit once EOF is reached.
Signed-off-by: Martin Povišer <povik@protonmail.com>
Drop the 'polling console' code as there are now better ways to achieve
the same. (One can use USB_VUART for second proxy session, see 85ee2f24)
Signed-off-by: Martin Povišer <povik@protonmail.com>
Fill in register definitions and extend the driver code to introduce
support for RX channels. This involves change of channel numbering.
Signed-off-by: Martin Povišer <povik@protonmail.com>
For those of us who can't write assembly but still need to run code on
the other side.
>>> from m1n1.loadobjs import *
>>> lp = LinkedProgram(u)
>>> lp.debug_printf("hello from the other side (%d)\n", 42)
TTY> hello from the other side (42)
0x1f
>>> lp.load_obj("build/test.o")
>>> lp.test()
TTY> hello from loaded object
0x19
>>> lp.clear_objs()
Signed-off-by: Martin Povišer <povik@protonmail.com>
This works around a wraparound issue when the virt base ends up causing
the ADT address to go negative, when on 12.1+ using a dummy virt base.
Fixes: #155
Signed-off-by: Hector Martin <marcan@marcan.st>
This should not be required but it looks like the 12.1 ANS2 firmware
complains when NVME_CC.EN is cleared before the IO queues have been
deleted.
Signed-off-by: Sven Peter <sven@svenpeter.dev>
Looks like Apple decided to change the compatible to sart,coastguard and rely
on the sart-version ADT property to differentiate between M1 and M1 Pro/Max
instead. sart-version is already present in the 11.x ADT so let's just
always decide based on that.
Signed-off-by: Sven Peter <sven@svenpeter.dev>
When loading m1n1.bin, SEPFW follows m1n1 and thus will show up at
the payload offset if there are no payloads.
Fixes: #158
Signed-off-by: Hector Martin <marcan@marcan.st>
ehexdump is similar to chexdump, and uses CP437 control characters
and Braille to improve eyeballability of character output.
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
These properties are needed such that U-Boot can enable the
serial port in its early pre-relocation phase.
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
This drops the tx/rxcookie and accepts TYPE_NOTIFY in addition to
TYPE_REPLY for command replies to make the DCP code also work on 11.x.
It'll still complain about an unexpected message during init but work.
Signed-off-by: Sven Peter <sven@svenpeter.dev>