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
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
e763ce3f56
hv: Set SMP mode to WFE
...
This fixes early IRQs getting stuck in idle secondaries and breaking the
guest.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-08 19:57:02 +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
eb3af7daaf
Makefile: do not use -Wp to pass Makefile dep generation args
...
This doesn't seem to work properly with clang...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-08 13:53:04 +09:00
Hector Martin
84acf60c24
Fix warnings when building/linking with clang/llvm
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-08 13:53:04 +09:00
Hector Martin
1e6c856f5f
Makefile: Make it build out-of-the-box on macOS
...
This requires a few dependencies installed with Homebrew.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-08 13:52:59 +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
4e4335a6ea
chickens: Enable IRQs on t600x
...
This seems to be safe to do on M1 too.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 04:03:41 +09:00
Hector Martin
0c093521de
pcie: Basic t600x support
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 03:55:48 +09:00
Hector Martin
f5af1caee5
hv_exc: Forward more sysregs
...
We don't normally trap these, but for experiments using TIDCP they are
useful to avoid.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 03:55:09 +09:00
Hector Martin
a383ef0b5a
iodev: Protect iodevs with spinlocks
...
This makes SMP IRQ reports less flaky
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 03:53:39 +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
0005b6533b
hv_exc: Add more sysreg passthroughs for t600x spam
...
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