Commit graph

1058 commits

Author SHA1 Message Date
Mark Kettenis
30d6c6374d kboot: Add u-boot,dm-pre-reloc properties
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>
2022-01-26 15:37:47 +09:00
Sven Peter
2bd7bf4020 afk: use version 3 for epic_sub_hdr
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>
2022-01-19 03:24:20 +09:00
Sven Peter
6816c151bb proxyclient/epic: Add support for SubHeader.version = 3
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-01-19 03:24:20 +09:00
Hector Martin
f20a0fbcd5 rtkit: Do not ack prealloc'd buffers
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:23:42 +09:00
Hector Martin
e2b87b695f tools/smccli.py: Shut down cleanly, increase verbosity
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:22:33 +09:00
Hector Martin
434a3b6c78 hv/trace_smc.py: Support RW ops
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:22:16 +09:00
Hector Martin
07c695926d hv/trace_dcp.py: Fix typo
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:21:55 +09:00
Hector Martin
ce2f705b16 m1n1.trace.asc: Handle prealloc'd syslog buffers
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:21:30 +09:00
Hector Martin
293d78fd7f m1n1.hw.asc: Add verbose flag
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:21:15 +09:00
Hector Martin
a79200ef1e m1n1.fw.smc: Many improvements
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:21:04 +09:00
Hector Martin
c7d42837e4 m1n1.fw.asc.mgmt: Fix the IOP/AP power state stuff
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:19:48 +09:00
Hector Martin
db0eaa86ca experiments/dcp_iboot.py: Clean up after shell
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:19:08 +09:00
Hector Martin
9cdf2b5d06 experiments/dcp_iboot.py: Do not dump DART
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:18:55 +09:00
Hector Martin
e468e08603 m1n1.fw.asc.{crashlog,syslog}: Do not ack prealloced bufs
This is wrong and causes IOP crashes due to unacked crashlog msgs.

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:18:18 +09:00
Hector Martin
bacb19b301 m1n1.fw.asc: Make DVA_OFFSET dynamic
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:16:12 +09:00
Sven Peter
2c28e13d25 rtkit: add rtkit_{hibernate,sleep} and use them for DCP and ANS2
s/IDLE/HIBERNATE/ to keep in sync with the Linux driver and then
hibernate DCP but send ANS2 to sleep to allow reusing both.

Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-01-18 11:35:45 +09:00
Sven Peter
00404e9bc3 afk: propagate failures in afk_epic_rx correctly
If the co-processor crashes afk_epic_poll will always fail which results
in afk_epic_rx getting stuck in an infinite loop calling afk_epic_poll
again and again.
This happens with e.g. old/incompatible DCP firmware.
Make sure the m1n1 proxy still works in those cases by propagating the
error correctly.

Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-01-18 11:33:57 +09:00
Janne Grunau
b2cb605832 display: Retry dcp_ib_get_hpd() for up to 2 seconds
After boot DCP will need some time to detect connected displays.

Signed-off-by: Janne Grunau <j@jannau.net>
2022-01-17 23:12:49 +09:00
Vincent Duvert
6736368275 rtkit.c: Add config.h include
Needed for the RTKIT_SYSLOG optional define.

Signed-off-by: Vincent Duvert <vincent@duvert.net>
2022-01-17 23:11:27 +09:00
Hector Martin
b9a7827900 main: Drop copyright year from copyright statement
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 14:41:44 +09:00
Hector Martin
f1033a97b2 afk: Fix error return for bad queue entry
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 14:33:27 +09:00
Hector Martin
f98723bb81 m1n1.trace.dart: Prime register cache on startup
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
7969d2c689 m1n1.fw.dcp.iboot: Cleanup & fixes
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
323e163eb4 hv/trace_dcp.py: Fix reinitialization
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
1c2a2db1dd display: Add logic to initialize the Mac Mini HDMI display
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
eaadc43fbb dcp: Add DCP and iBoot protocol support
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
3f9bd38b6f afk: Add AFK/EPIC subsystem
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
ae1d7c4348 rtkit: Fix bug with version selection
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
476710410c rtkit: Change initial power state to 0x220
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
ca77566441 rtkit: Make rtkit_recv() return an int
This allows distinguishing between error and no message conditions.

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
15bce29775 rtkit: Add basic crashlog support
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
9b5cb569e4 rtkit: Buffer handling refactor
This adds support for using preallocated buffers & more

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
8f3118d99f rtkit: Add syslog support
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
94bc563433 rtkit: Add dummy OSLog support
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
7fc207eb35 iova: Add range arguments to iovad_init()
This allows restricting the IOVA range so as to not overlap with
prealloc'd ranges.

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
847036b2ce iodev: Bump console buffer to 8K
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
18ceb3b3ff asc: Use 0x8000 offset for mbox regs
Not sure where 0x4000 came from?

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
a4c5b64655 asc: Add asc_get_iop_node()
The IOP child node in the ADT contains properties that the RTKit driver
needs to handle it properly.

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
42c4334675 dart: Add dart_translate() & dart_search()
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
18408d37b1 dart: Handle locked DARTs & preserving page tables
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
2127de59c1 utils: Add is_heap()
This lets us mix iBoot-allocated and heap-allocated pointers and
distinguish them at cleanup time.

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:10:24 +09:00
Hector Martin
e3e2d05967 experiments/dcp_iboot.py: New experiment
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 20:23:01 +09:00
Hector Martin
d2535159a5 m1n1.fw.dcp.iboot: Add iBoot DCP interface client
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
17e0dfceab hv/trace_dcp.py: Add EPIC support and refactor
This now partially uses the scaffolding in m1n1.fw.afk.

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
1d79711e79 m1n1.fw.afk: Add AFK/EPIC endpoint support
These cover the non-dcpep endpoints of the DCP interface, including
the iBoot interface (disp0).

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
b2da9faac7 m1n1.fw.dcp.ipc: Add some more struct fields
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
0e326923cf m1n1.fw.common: Move some common defs here from m1n1.fw.dcp.ipc
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
23b9b45040 hv/trace_all.py: Use async tracing by default
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
72b7dfed5f m1n1.fw.asc: Stop endpoints on global stop
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
b388093d33 m1n1.hw.dart: Wait for invalidations to complete
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00