Commit graph

478 commits

Author SHA1 Message Date
Martin Povišer
53be0ec40d speaker_amp.py: Note down TAS2770 as best match
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
8833696c69 m1n1.hw.admac: Fix descriptor deserialization
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
301ba75b6b m1n1.utils: Remove dead formatting
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
145b1101c9 m1n1.utils: Add Register32.fields property
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
d65526d326 m1n1.hw.admac: Clear underflow counters on reset
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
570107629a m1n1.hw.admac: Fix and extend register defs
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
2cebfaab73 m1n1.hw.i2c: Reset status before transaction
Reset the status register before each transaction. This is necessary if
we are taking over the peripheral after the Linux driver (e.g. in paused
hypervisor).

Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
a40840f13c proxy: Expose usb_iodev_vuart_setup
Expose the usb_iodev_vuart_setup function in uartproxy. This opens
the secondary ACM pipe to new uses outside the hypervisor. E.g. it can
be set up as another stream for sending proxy requests.

Sample usage from proxyclient:

    p.usb_iodev_vuart_setup(p.iodev_whoami())
    p.iodev_set_usage(IODEV.USB_VUART, USAGE.UARTPROXY)
    # the second virtual serial now also serves proxy

Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 15:31:21 +09:00
Hector Martin
98d6e9bb4f tools/chainload.py: Fix 8b/16b copy confusion
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-26 13:58:39 +09:00
Hector Martin
b86574e410 tools/pmgr_adt2dt.py: New script to convert ADT PMGR devs to DT nodes
This still requires manual editing to fix up some issues, since our idea
of always-on devices and parent-child relationships doesn't always match
Apple's.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-24 16:19:01 +09:00
Hector Martin
0e3ee31254 m1n1.fw.asc.kdebug: Handle prealloc messages (partially)
Not sure if these need a reply...

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-23 17:27:37 +09:00
Hector Martin
99acc2675b m1n1.fw.asc: Add support for shutting down RTKit links
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-23 17:20:09 +09:00
Hector Martin
0446838460 m1n1.fw.asc.crash: Add a basic crashlog parser
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-23 17:19:38 +09:00
Hector Martin
10dda2550d m1n1.hv: Automatically lower BRKs
This makes Linux BUG()s work out of the box without breaking into the
HV.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-23 14:05:26 +09:00
Jean-Marc Ranger
45a62144ff Set missing execute bits in proxyclient/{experiments|tools}/*.py
Currently, only some scripts in proxyclient/experiments and
proxyclient/tools have their execute bit set. Set it for those
that miss it.

Signed-off-by: Jean-Marc Ranger <jmranger@hotmail.com>
2021-11-23 01:23:11 +09:00
Jean-Marc Ranger
d4f750cb22 experiments/smc.py: Adapt to API change in SMCEndpoint
Update experiments/smc.py to use fw/smc.py's new API.

Fixes: b9ddd74c02 ("hv/trace_smc.py: Add SMC tracer")

Signed-off-by: Jean-Marc Ranger <jmranger@hotmail.com>
2021-11-23 01:22:57 +09:00
Hector Martin
6906af06cc experiments/dcp.py: Use new ADT DART constructor
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-22 18:13:51 +09:00
Hector Martin
8778819831 m1n1.hw.dart: Fix typo
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-22 18:13:32 +09:00
Hector Martin
c8a8946e82 m1n1.hw.dart: Add a constructor that figures out DART type from the ADT
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-22 18:13:10 +09:00
Hector Martin
4027c34c7a proxy: Add proxy ops for pcie_init/shutdown
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-22 16:04:35 +09:00
Hector Martin
660d7482b9 hv/trace_pmgr.py: New script
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-22 07:21:07 +09:00
Hector Martin
5d214606df m1n1.hv: Add flag to hide the CPU prefix in hv.log()
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-16 17:20:47 +09:00
Hector Martin
06975c8b87 m1n1.hv: Add TraceMode.WSYNC to make writes synchronous, but not reads
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-16 17:20:21 +09:00
Hector Martin
ccbe181d75 m1n1.adt: Improve PMGR props parsing, add to dump_pmgr.py
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-16 17:19:42 +09:00
Janne Grunau
46c945ac95 usb: use dynamic paths for usb related ADT nodes
Adds support for the 3rd USB-C port on 2021 Macbook Pros.
Currently up to 8 USB-C ports are supported which should be sufficient
for expected future devices.

Tested on Macbook Pro 14" and Mac Mini.

Signed-off-by: Janne Grunau <j@jannau.net>
2021-11-12 23:48:32 +09:00
Janne Grunau
2724d69f4c iodev: usb: replace secondary usb iodevs with single vuart iodev
Signed-off-by: Janne Grunau <j@jannau.net>
2021-11-12 23:48:32 +09:00
Janne Grunau
3a2446c53b m1n1.proxy: remove trailing whitespace
Signed-off-by: Janne Grunau <j@jannau.net>
2021-11-12 23:48:32 +09:00
Hector Martin
c947f6aec3 m1n1.trace.asc: Add support for tracing DARTless ASCs
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-11 15:22:25 +09:00
Hector Martin
9d2be299a4 tools/smccli.py: Simple shell for an instantiated SMCClient
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-10 20:43:51 +09:00
Hector Martin
eaa72c7a91 m1n1.fw.smc: Improve and add more functions
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-10 20:43:51 +09:00
Hector Martin
198fc24f14 m1n1.adt: Fix ranges prop decoding
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-10 20:43:51 +09:00
Hector Martin
927c12ad53 hv/trace_all.py: Trace all I/O ranges using the arm-io prop
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-10 20:43:51 +09:00
Hector Martin
ae7228f398 m1n1.asm: Fix bad objdump variable
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-10 20:43:51 +09:00
Hector Martin
b9ddd74c02 hv/trace_smc.py: Add SMC tracer
Also fix up a bunch of stuff in m1n1.fw.smc, but it's untested as a
client.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-10 20:43:51 +09:00
Vincent Duvert
407663b73d bootstrap_port: Improve UART baud setting
Rework the serial port bootstrap so it works correctly if the target is already
at 1500000 baud.

No baud adjustment is made if the proxy is using the serial-USB interface.

Tested with the Mac-to-Mac serial connection (macvdmtool) and the serial-USB
connection.

Signed-off-by: Vincent Duvert <vincent@duvert.net>
2021-11-10 16:02:44 +09:00
Hector Martin
8e0ca1a39c m1n1.hv: Print diagnostic info when MMIO forwarding fails
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-08 19:55:16 +09:00
Hector Martin
e19e74be8b m1n1.asm: Make work on macOS/clang
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-08 14:41:24 +09:00
Hector Martin
a4e922ecaf m1n1.hv: Map vUART IRQ properly
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 04:03:50 +09:00
Hector Martin
ff1b668a5d m1n1.hv: Fix broken cpu# in SYNC tracers
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 04:03:50 +09:00
Hector Martin
74dece703e m1n1.hv: Add support for dumping MMIO accesses in Python syntax to a log
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 04:03:50 +09:00
Hector Martin
bfc91be170 m1n1.hv: Keep track of started CPUs
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 04:03:50 +09:00
Hector Martin
3d3d5ea5ad m1n1.hv: Forward more sysregs properly to EL12
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 04:03:50 +09:00
Hector Martin
85ca5b94cb m1n1.hv: Do map low RAM
Apparently this is still necessary

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 03:52:43 +09:00
Hector Martin
49858b6d2c m1n1.hv: Fix cpustart for >2 clusters
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 03:52:43 +09:00
Hector Martin
f2975c7e34 m1n1.utils: Fix bug in RangeMap
Adding a zero-length range was breaking things.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 03:52:43 +09:00
Hector Martin
075168c233 m1n1.hv: Handle MMIO/PMGR hooks dynamically
This makes m1n1 boot all the way on t6000

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 03:52:43 +09:00
Hector Martin
08f90e6dd6 m1n1.hv: Fix bug for sync tracing 64-bit writes
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 03:52:43 +09:00
Hector Martin
77074b9098 hv_aic: Support AICv2
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 03:52:42 +09:00
Hector Martin
339bd37077 m1n1.hv: Compute RAM base from bootargs
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-02 02:22:47 +09:00
Hector Martin
e3f0836eae m1n1.hv: Use vUART base from ADT
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-02 02:22:17 +09:00