It seems this model does not need it *and* it somehow causes
nondeterministic problems.
Also add a delay to the poweroff/on sequence to be more conservative.
Fixes: #406
Signed-off-by: Hector Martin <marcan@marcan.st>
Unlike gcc, clang enforces -mgeneral-regs-only when used as the assembler so
this removes that flag to fix the error in #393. This is only needed for
utils_asm.S which has code saving/restoring SIMD state, but this commit applies
it to all asm files for simplicity since code for fp regs shouldn't be generated
unless they're explicitly used anyway.
Signed-off-by: Ayrton Munoz <a.munoz3327@gmail.com>
This registers a log buffer IODEV similar to the frame buffer IODEV. It
is using a console IODEV to allow writing to the buffer until m1n1 jumps
to the next stage. This allows also to increase the buffer size without
increasing m1n1's size. The current CONSOLE_BUFFER_SIZE of 8k is not
large enough to hold the entire log of executing m1n1 under the
hypervisor on the M1 Ultra Mac Studio.
Signed-off-by: Janne Grunau <j@jannau.net>
fb_console_reserve_lines() in mmu_shutdown() was causing a blit from the
freed framebuffer, putting heap metadata junk at the top left corner.
Signed-off-by: Hector Martin <marcan@marcan.st>
t8103 and t600x use "asc-dram-mask" in iop-dcp-nub to mask bits out of
DMA addresses. This needs to be used in the firmware mappings
check/remap since the segments have maskable bits sets.
Fixes: 8332e24 ("dcp: Undo carnage from bad stage1 DART code")
Signed-off-by: Janne Grunau <j@jannau.net>
A bug in our DART code was wiping and aliasing page tables. Go through
the segment ranges for DCP and redo any missing mappings. If we redid
any mappings, then PMGR reset DCP so it can recover from having faulted
on the previous boot.
Signed-off-by: Hector Martin <marcan@marcan.st>
We were assuming L2 tables were always allocated consecutively at low
IOVAs. 14.5 broke this, causing all kinds of explosions.
The new code looks for the first unused L2 PT, and also checks whether
the first 2 entries are aliased to latter entries (which is what the old
code caused). If so, it clears them and reallocates them. This doesn't
undo the PT wipe from stage1 though, so downstream code has to redo any
missing mappings...
Signed-off-by: Hector Martin <marcan@marcan.st>
Use a struct instead of global variable to hold the necessary setup
information. This allows executing the setup for both sio instances.
In addition change the status to "okay" so that sio can remain disabled
if the setup fails.
Signed-off-by: Janne Grunau <j@jannau.net>
Not much to see here, most of the juice is over at:
https://github.com/eiln/avd.git
The kernel driver (m1n1.fw.avd) only really pipes the instruction stream
into the respective hardware FIFOs and then hushes the interrupt lines.
Most of the work (bitstream syntax parsing and instruction generation)
is done in the avid repo above.
I'm hoping to keep this userland-kernel separation in the very imminent
actual driver.
experiments/avd.py: Decode on the command line. Read file for usage.
experiments/avd_e.py: Decode via emulated instruction stream.
experiments/avd_f.py: Decode via Cortex-M3 firmware (for debugging).
hv/trace_avd.py: Tracer. Read file for usage.
m1n1/fw/avd/__init__.py: Driver base class (power, tunables, etc).
m1n1/fw/avd/decoder.py: Codec-specific decode logic + mini media player.
Signed-off-by: Eileen Yoon <eyn@gmx.com>