Commit graph

14 commits

Author SHA1 Message Date
Hector Martin
b077c08181 dart: Add dart,t8110 support
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-28 01:41:24 +09:00
Hector Martin
9748b5525e dart: Only allocate a max of 2 L2 tables
This is what iBoot normally does, and >2 will panic macOS

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-01 01:49:59 +09:00
Janne Grunau
1ea31ae996 dart: Add setup of pre-allocated L2 tables for dcp/disp0
DART nodes for dcp and disp0 have pre-allocated L1 and L2 tables which
are annotated in the ADT. The pre-allocated memory is specified in
"pt-region-${DEVICE}". The first page is used as L1 table and the
following pages are used as L2 tables. The number of valid L2 tables is
specified in "l2-tt-${DEVICE}". The first entry identifies the region
and the second entry is the number of valid L2 tables.

iboot (macOS 12.3) inits just 2 L2 tables. Larger framebuffers require
more. By using the pre-allocated page tables we do not have worry about
keeping the memory mapped after m1n1 executes the next target.

Signed-off-by: Janne Grunau <j@jannau.net>
2022-05-30 23:01:01 +09:00
Janne Grunau
d08793a456 dcp: Free iovad_dcp including dart L2 tables on shutdown
Signed-off-by: Janne Grunau <j@jannau.net>
2022-05-30 23:01:01 +09:00
Janne Grunau
645152e849 dart: Make dart translation error logs more informative
Signed-off-by: Janne Grunau <j@jannau.net>
2022-05-30 23:01:01 +09:00
Hector Martin
3020e26e00 dart: Announce real-time DARTs
Mostly just for reference.

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-04-19 23:42:22 +09:00
Janne Grunau
0104abbea7 dart: Add dart_find_iova() to find unused IOVA space
Signed-off-by: Janne Grunau <j@jannau.net>
2022-04-19 21:29:30 +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
84902062c9 dart: T6000 support
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-01 21:00:56 +09:00
Sven Peter
3e807d6686 dart: shutdown to bypass mode
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>
2021-06-10 00:00:37 +09:00
Hector Martin
26c4ab3888 formatting: Sort main include first
clang-format is supposed to do this, but for some reason it's "sticky"
and doesn't...

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-01 18:31:58 +09:00
Hector Martin
45a0054f63 Add build-time printf() argument checking and fix warnings
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-01 18:23:44 +09:00
Sven Peter
8efff1b0ab dart: add code to setup the DART iommu
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-14 17:40:07 +09:00