The id1 field used on oder SoCs is not constant 0 for all devices on
t8122. Instead just compare the id1 fields of the two first devices.
Fixes "pmgr: Failed to find parent #36 for IOA0\n" errors in
pmgr_init().
Fixes: fb59dc03ca ("pmgr: Fix struct for older SoCs")
Signed-off-by: Janne Grunau <j@jannau.net>
At some point Apple ran out of bits and have to widen the device field
to 16-bit. This adds support for the old 8-bit layout.
Signed-off-by: Nick Chan <towinchenmi@gmail.com>
Account for the differences between the iOS ADT and macOS ADT, and also
some physical differences between Apple Silicon Macs and A7-A11 devoces,
reflected in the ADT.
Signed-off-by: Nick Chan <towinchenmi@gmail.com>
This includes:
- Do not treat iPhone 5 buffer as dummy on 5s
- Added support for 24-bit framebuffer
- When we have a vertical display, use whole fb as console
Signed-off-by: Nick Chan <towinchenmi@gmail.com>
Add support for 4K page sizes, supported by A7-A8X.
Co-developed-by: fenfenS <104295404+fenfenS@users.noreply.github.com>
Signed-off-by: fenfenS <104295404+fenfenS@users.noreply.github.com>
Signed-off-by: Nick Chan <towinchenmi@gmail.com>
This includes
- GXF
- SPRR
- PAN (A7-A9)
- Atomics (A7-A10)
- FIPI (A7-A10)
- DCP
SPRR on T8030 seems to be quite different from M1 (at least according to
qemu-t8030), so keep it disabled for those CPU parts.
Signed-off-by: Nick Chan <towinchenmi@gmail.com>
Cyclone and Typhoon are similar enough to share a file.
Hurricane and Zephyr are the physical cores on A10 backing the
Hurricane-Zephyr logical core.
Signed-off-by: Nick Chan <towinchenmi@gmail.com>
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>
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>