Janne Grunau
d12e4e4277
m1n1.fw.dcp.ipc: Fix and annotate unmap_buf's arguments
...
Signed-off-by: Janne Grunau <j@jannau.net>
2022-09-27 06:04:41 +09:00
Janne Grunau
302dc0a0b5
kboot: Transfer display related memory regions from ADT to FDT
...
DCP firmware, frame buffer and other unidentified memory is mapped by
iboot in dart-dcp and dart-disp0. The mappings have to be maintained to
use DCP from an operating system.
For dart-disp a switch to new page tables containing the same mappings
works. Since dart-dcp is locked (its TTBR registers are unwritable)
we can only switch the L2 tables. This appears risky but since DCP is
shutdown or quiesced it will not use dart-dcp during this switch.
Bindings based on
Based on https://lore.kernel.org/linux-iommu/20220512190052.1152377-1-thierry.reding@gmail.com/
Signed-off-by: Janne Grunau <j@jannau.net>
2022-09-27 06:04:41 +09:00
Janne Grunau
233264cda2
dart: add dart_init_fdt()
...
Used to intialize by FDT phandle.
Signed-off-by: Janne Grunau <j@jannau.net>
2022-09-27 06:04:41 +09:00
Janne Grunau
3c5b0fdd52
dart: Add DART_PTR_ERR to indicate failures for IOVA returning functions
...
0 is a valid and used device virtual address. Daart functions returning
device address can not use 0 to indicate errors.
Signed-off-by: Janne Grunau <j@jannau.net>
2022-09-27 06:04:41 +09:00
Asahi Lina
fe0d3e8e34
tunables_static: New module to set up static tunables
...
This is for things that xnu hard-codes. This first one for AGX is
required to make coprocessor TLB coherency work properly...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:04:41 +09:00
Asahi Lina
a15eb0919d
hv_vm: Support LDAR/STLR instructions
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:04:41 +09:00
Asahi Lina
63345c43ac
m1n1.fw.agx.channels: Map the specific size for each state field type
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
13cfe5028f
m1n1.fw.agx.initdata: Replace padding with explicit fields
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
202781f4f1
m1n1.fw.agx.initdata: Fix number of buffer managers
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
35b33fdd28
m1n1.trace.agx: Fix number of UAT contexts
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
d1a3b8c7fa
experiments/agx_dumpstructs.py: Dump microsequence
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
88603e153c
hv/trace_agx_defer.py: Add another tracer variant
...
This one configures it to stop tracing after init, good for
self-contained tests
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
d6d17b6b2d
m1n1.fw.asc.crash: Gracefully handle faulting code dumps
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
83b9d5c13f
m1n1.agx.initdata: Add a field
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
cb9f7cd685
m1n1.proxyutils: Fix instruction cache
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
0aed256416
m1n1.fw.agx: Add Halt message (maybe?)
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
0d3ed156a1
m1n1.constructutils: Add offsetof()
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
7889f056f9
m1n1.agx.cmdqueue: Rename Timestamp to TimeStamp
...
This avoids a conflict with Construct
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
8a222a1346
m1n1.agx.context: Print address in hex
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
65d4f7ab80
m1n1.fw.agx.channels & co: Add some KTrace support
...
This is quite handy to see what the firmware is doing
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
7a38d14a0c
m1n1.agx.channels: Complain if the ring pointer overflows
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
0e8a522845
experiments/agx_renderframe.py: Rework based on the other demos
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
fddb8d63e0
m1n1.trace.agx: Allow configurable user/kernel map tracing
...
Also improve the general handling of all this... the logic is still
broken in places.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
35a5e2a838
m1n1.trace.agx: Handle new queue pointer resets properly
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
5dfbd5216c
m1n1.trace.agx: Disable handoff tracer
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
cc29042f97
m1n1.trace.agx: Don't trace Stats/KTrace
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
70b08f6eb3
m1n1.trace.agx: Disable buffermanager dumping
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
01fbc9be41
m1n1.fw.agx.cmdqueue: Fix tail
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
3fa023a0d9
m1n1.hw.uat: Only clear out kernel PTs on init()
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
77a00eb5b3
m1n1.hw.uat: Decode permissions properly
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
da9ceddeac
memory: Map lowmem using 16K pages only
...
Turns out CTRR does not like working with huge pages, and just throws up
its hands in the air with an L2 address size fault if a huge page
overlaps the CTRR region.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
6feceef2b0
hv_vm: Retry mapped page faults
...
This is usually a race that happens when the Python side has just
removed a hook, but there was already a CPU core faulting on an access.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Hector Martin
50f02bb58a
hv/trace_wlan.py: Add WLAN tracer
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-09-19 19:24:15 +09:00
Hector Martin
6461488450
m1n1.trace.pcie: New module
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-09-19 19:23:53 +09:00
Hector Martin
83fc313611
m1n1.proxyutils: Support split 64-bit read/write
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-09-19 19:23:22 +09:00
Hector Martin
c0b1dbea20
kboot: Fix chosen arg setting with >1 var
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-09-18 20:17:51 +09:00
Hector Martin
ddb3497794
hv/trace_codecs.py: Disable time stealing
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-09-14 11:55:35 +09:00
Hector Martin
6da0301d6b
m1n1.adt: Add amp-dcblocker-config decoding
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-09-13 00:26:15 +09:00
Hector Martin
8a44f1ddb2
m1n1.adt: Add speaker-config decoding
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-09-13 00:18:21 +09:00
Hector Martin
5e26ae26f8
tools/run_guest_kernel.sh: Allow overriding $TMPDIR
...
Also use $XDG_RUNTIME_DIR by default if set
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-09-12 17:46:31 +09:00
Hector Martin
281784d48e
experiments/dcpext_iboot.py: displayRequest() works now
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-08-31 02:32:35 +09:00
Hector Martin
501a367310
m1n1.fw.afk.rbep: Update rptr after each packet
...
This seems to unblock things for some reason.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-08-31 02:29:31 +09:00
Hector Martin
270f864ae9
m1n1.fw.afk.epic: Implement system endpoint & debug enable
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-08-31 02:14:54 +09:00
Hector Martin
7d999ddf11
m1n1.fw.afk.epic: s/send_cmd/call/ for higher level messages
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-08-31 02:14:54 +09:00
Hector Martin
2c528baf2d
m1n1.fw.common: Implement OSSerialize build
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-08-31 02:14:54 +09:00
Hector Martin
041e07b56b
m1n1.fw.afk.epic: Ack notifies (maybe)
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-08-31 02:14:54 +09:00
Sven Peter
76b878a350
proxyclient/m1n1/hv: Support loading additional symbols from kexts
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-08-30 22:41:58 +09:00
Sven Peter
0f87d79a61
proxyclient/m1n1/macho: Support demangling symbols
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-08-30 22:41:58 +09:00
Javier Alvarez
8a544a8b27
m1n1 entrypoint args for raw binary images ( #240 )
...
* tools/run_guest.py: Allow specifying entrypoint for raw images
This allows running images other than m1n1 that don't have the
entrypoint at 0x800. If unspecified, it defaults to 0x800 for m1n1.
Signed-off-by: Javier Alvarez <javier.alvarez@allthingsembedded.net>
2022-08-30 22:39:20 +09:00
Javier Alvarez
6836e8a72f
tools/chainload.py: Allow specifying entrypoint for raw images
...
This allows running images other than m1n1 that don't have the
entrypoint at 0x800. If unspecified, it defaults to 0x800 for m1n1.
Signed-off-by: Javier Alvarez <javier.alvarez@allthingsembedded.net>
2022-08-30 22:38:38 +09:00