Commit graph

1637 commits

Author SHA1 Message Date
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
01e84ecef6 pcie: Document reg ranges better
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-22 16:43:22 +09:00
Hector Martin
555965e98a pcie: Calculate the number of reg entries per port
Turns out this isn't hardware-specific, but rather a change Apple made
retroactively in 12.0 RC. Doesn't look like there's a saner way than
this...

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-22 16:24:37 +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
23c3617cf2 payload: Complain loudly about devicetree platform mismatches.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-20 02:26:24 +09:00
Hector Martin
f4e11a78c6 i2c: Add explicit delay to the i2c_xfer_read timeout loop
We now set the timeout at 10ms without any bytes received.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-18 22:29:51 +09:00
Hector Martin
850a669436 tps6598x: Add a delay in the command poll loop
It seems that if we poll too fast, we DoS the poor thing...

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-18 22:15:38 +09:00
Hector Martin
cc1fa67ff2 i2c: Use Repeat-Start condition for SMBus reads
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-18 22:15:13 +09:00
Hector Martin
26f636dbbb fb: Use 128-bitwise copies to speed up FB updates
This makes it almost as fast as it was before the switch to an
uncached framebuffer, as far as I can tell.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-17 19:23:44 +09:00
Hector Martin
3b0d53d7b8 mcc: Guard against MCC count > max
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-17 10:14:15 +09:00
Hector Martin
0df392d0d3 mcc: Fix mcc_num_channels prop on t8103
Bad copy and paste...

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-17 01:45:49 +09:00
Hector Martin
4b80041d6d mcc: New module to initialize the MCC memory controller.
This turns on the system level cache. The carveout unmapping also moves
here, and now it handles T8103/T6000 properly.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-16 21:09:48 +09:00
Hector Martin
ecc80f4b32 kboot: Fix warning/bug introduced by ecb6c82e
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-16 21:09:12 +09:00
Hector Martin
b9ec73b019 smp: Leave the default boot stack for CPU#0 set in case it resets
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-16 17:26:52 +09:00
Hector Martin
33d09cc7c0 hv_exc: Filter out CYC_OVRD_DISABLE_WFI_RET
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-16 17:26:39 +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
Hector Martin
0f9c0f5dd3 startup: Add a UART print to the RVBAR entry path
This might make it easier to debug CPU sleep modes

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-16 17:18:52 +09:00
Hector Martin
4652ac2098 tools/reg_filter.py: Tool to add IMPDEF sysreg names to a disasm
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-16 17:18:09 +09:00
Hector Martin
ecb6c82e75 kboot: Delete CPU nodes instead of disabling them
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-15 22:48:28 +09:00
Hector Martin
7690fd730c iodev: Bypass locks on all funcs if no MMU
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-15 22:47:45 +09:00
Hector Martin
257f6443a6 kboot: Fix potential bug handling missing/disabled CPUs
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-15 14:52:10 +09:00
Jean-Francois Bortolotti
0131d16c0a Fix aic1 reg size
Signed-off-by: Jean-Francois Bortolotti <jeff@borto.fr>
2021-11-14 11:14:50 +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
b6ec7abc2b utils: replace sprintf with snprintf
Converts all current users.

Signed-off-by: Janne Grunau <j@jannau.net>
2021-11-12 23:48:32 +09:00
Janne Grunau
5064b93b2f usb: dynamically allocate and register usb iodevs
Preparation for devices with more than 2 USB-C ports.

Signed-off-by: Janne Grunau <j@jannau.net>
2021-11-12 23:48:32 +09:00
Janne Grunau
c40ef51084 usb_dwc3: robustness in usb_dwc3_write()
Signed-off-by: Janne Grunau <j@jannau.net>
2021-11-12 23:48:32 +09:00
Janne Grunau
91ff1ceb65 iodev: avoid direct access to iodev device array
Preparation for dynamically alloced iodevs.

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
b50a489f41 chickens: Update Firestorm chickens & complete t600x
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-11 01:20:03 +09:00
Hector Martin
efca793572 pcie: Only print the port init msg for existing ports
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-11 01:20:03 +09:00
Hector Martin
510dd53175 pcie: Add t6000 support
This one seems to need one extra magic poke

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-10 20:43:51 +09:00
Hector Martin
a83d0908e5 pcie: Add t6000 fuse bit map and fix fuse bit application
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-10 20:43:51 +09:00
Hector Martin
94a73a404c kboot: Disable USB dwc3 devices that are missing in the ADT
This passes through the hypervisor USB device disable to Linux, so we no
longer need to hack device trees.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-10 20:43:51 +09:00
Hector Martin
e689ceb263 usb: Add usb_idx_from_address() to find a dev by its MMIO addr
This will be used to match up ADT and FDT USB devices, to pass through
enable status.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-10 20:43:51 +09:00
Hector Martin
7e01af5144 kboot: Use _inplace setprop for the CPU release addr
This needs to happen in-place for the iterator to not be invalidated.
Explicitly request that and fail if it does not work.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-10 20:43:51 +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