Janne Grunau
66f4d625b8
experiments/dcp.py: Use t8103/t600x specific code paths
...
MMIO space differes between t8103 and t600x so the hardcoded RegMonitor
addresses make only sens on the former.
set_display_device difference is taken from macOS trace on t6001.
Signed-off-by: Janne Grunau <j@jannau.net>
2022-03-11 12:05:21 +09:00
Janne Grunau
d1d93eb2b5
m1n1.fw.dcp: Add callbacks used by t600x-dcp
...
Signed-off-by: Janne Grunau <j@jannau.net>
2022-03-11 12:05:21 +09:00
Janne Grunau
7028f3e2d8
m1n1.fw.dcp: Zero dcpep's shared memeory
...
Fixes a crash of DCP with experiments/dcp.py after chainloading m1n1 on
j314c.
Signed-off-by: Janne Grunau <j@jannau.net>
2022-03-11 12:05:21 +09:00
Ferdinand Bachmann
5983d997d8
rust: do not assume realloc preserves alignment
...
Signed-off-by: Ferdinand Bachmann <theferdi265@gmail.com>
2022-03-11 12:02:36 +09:00
Hector Martin
d161de0037
nvme: Stop CPU properly on shutdown
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-10 04:01:15 +09:00
Hector Martin
82ec1695ba
payload: Fix broken chosen var handling
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-10 00:30:31 +09:00
Hector Martin
99124a41fe
tools/chainload.py: Support chainloading raw binaries
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-10 00:30:15 +09:00
Hector Martin
ca04d8c9f4
Makefile: Generate build_cfg.h without echo -ne
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-09 22:15:09 +09:00
Hector Martin
24b1fd9b22
Makefile: Add mkdir build
where it was missing
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-09 22:01:42 +09:00
Hector Martin
cfbaac1eac
dts: Remove
...
We're building these from the U-Boot tree, this is long obsolete. Just nuke it.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-09 22:01:42 +09:00
Hector Martin
4575b35479
rust: Initial Rust-based EFI FAT32 chainloader
...
This code is gated behind the CHAINLOADING define. To build a
release-style m1n1 with chainloading for use with the installer
or kmutil, use:
make CHAINLOADING=1 RELEASE=1
To tell m1n1 to chainload another binary, use this var payload:
chainload=<ESP partition UUID>;<file path>
e.g.
chainload=a17b7e46-e950-bb4f-bc82-8ab1047a058e;m1n1/m1n1.bin
Closes : #154
Co-authored-by: Finn Behrens <me@kloenk.dev>
Co-authored-by: Joey Gouly <joey.gouly@arm.com>
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-09 22:01:42 +09:00
Hector Martin
e386e17550
chainload: Add new m1n1-side chainloader (raw images only)
...
This basically duplicates the chainload.py logic, minus the mach-o
handling.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-09 20:55:34 +09:00
Hector Martin
0a8a593cdc
payload: Support passing arbitrary /chosen arguments
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-09 20:55:34 +09:00
Hector Martin
78c8c4d7d6
payload: Skip hypothetical m1n1 signatures
...
Tentative header format: 'm1n1_sig' followed by u32 total size (inclusive).
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-09 20:55:34 +09:00
Hector Martin
6a1a9bfc3c
utils: Expand vector_args from 4 to 5 arguments
...
This also expands the usual call/next stage functions to match.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-09 20:55:34 +09:00
Hector Martin
963b74765c
adt: Add adt_setprop()
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-09 20:55:34 +09:00
Hector Martin
123d1df1a7
kboot: Replace kboot_set_bootargs with kboot_set_chosen
...
This allows setting arbitrary /chosen string props
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-09 20:55:34 +09:00
Hector Martin
adb1cb943e
proxy: Export smp_set_wfe_mode
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-08 00:02:06 +09:00
Hector Martin
a2944fa123
clk: Initialize MCA clock muxes
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-08 00:02:06 +09:00
Hector Martin
616fedaf62
nvme: Shut down the controller cleanly
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-07 23:59:25 +09:00
Hector Martin
bb7c7dd0ce
proxy: Pass through nvme retvals properly
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-07 23:59:25 +09:00
Hector Martin
191cb157fb
rtkit: Better error handling
...
Now failures during init/shutdown won't cause a hang.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-07 23:59:25 +09:00
Hector Martin
1429c2a6e3
LICENSE: Fix copyright line
...
No years, please.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-07 23:59:25 +09:00
Janne Grunau
d76f3a6631
m1n1.hw.DART: coalesce continuos l2 ptes
...
Signed-off-by: Janne Grunau <j@jannau.net>
2022-02-24 23:55:46 +09:00
Janne Grunau
e1c5df5037
experiments/dart_dump.py: Use DART.from_adt()
...
The label of the ADT node is easier to use. Uses the proper DART type on
t600x SoCs.
Signed-off-by: Janne Grunau <j@jannau.net>
2022-02-24 23:55:46 +09:00
Janne Grunau
a57696366f
hv/trace_dcp.py: Update to macOS 12.x API
...
DCP API seems to be mostly unchanged from 12 beta to 12.2.
Signed-off-by: Janne Grunau <j@jannau.net>
2022-02-24 23:55:46 +09:00
Janne Grunau
fb49d88d90
m1n1.fw.dcp.ipc: annotate swap_complete_intent_gated
...
Signed-off-by: Janne Grunau <j@jannau.net>
2022-02-24 23:55:46 +09:00
Sven Peter
53af416b07
hv.py: Add helper to break on symbols
...
We already have breakpoints and symbols, let's make our life easier
by also allowing to break on symbols.
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-02-24 23:55:25 +09:00
Hector Martin
287a963bcc
kboot: Hide the notch
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-22 01:04:55 +09:00
Hector Martin
5531b9ae32
display: statify local functions
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-22 00:54:17 +09:00
Hector Martin
5aaedef975
main: Add RELEASE mode features
...
- Hide console by default unless booting in verbose mode.
- In verbose mode, enable USB early and poll for connection before
launching payloads.
- Show console on fallback to proxy.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-22 00:30:54 +09:00
Hector Martin
a9088e2278
fb: Add the ability to defer FB console activation
...
This differs from removing the IODEV usage in that console contents
are still buffered.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-21 16:06:14 +09:00
Hector Martin
d1dcf16c66
display: Update boot args in place for HV guests
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-21 16:03:23 +09:00
Hector Martin
08b77c2b1b
m1n1.adt: Handle underscores in properties as __
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-21 15:31:31 +09:00
Hector Martin
5bf8c5ac83
m1n1.hv: Use p.mcc_hv_unmap_carveouts()
...
Fixes random SErrors due to the guest issuing speculative instruction
fetches into TZ regions.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-21 15:30:25 +09:00
Hector Martin
50a9593034
mcc: Add mcc_hv_unmap_carveouts() and proxy op
...
This is necessary to stop the guest from speculating into carveouts.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-21 15:30:21 +09:00
Hector Martin
a8a93a3b5f
hv/trace_smc.py: Add GetKeyByIndex decoding
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-15 14:05:13 +09:00
Hector Martin
ec126bb16a
experiments/smc.py: Turn into SMC key dumper
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-15 14:05:13 +09:00
Hector Martin
d381341865
m1n1.trace.asc: Add missing power control messages
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-15 14:05:13 +09:00
Hector Martin
45c3682f60
m1n1.fw.smc: Handle notifications
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-15 14:05:13 +09:00
Hector Martin
a0680a2678
m1n1.adt: Better parse PMU props
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-15 14:05:13 +09:00
Martin Povišer
7bab3d0fc3
exception: Fix silent mode
...
Do not forget to clear the L2C_ERR flags in silent mode also. This is
necessary for proper recovery.
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-14 11:47:04 +09:00
Martin Povišer
41f0874f99
experiments/audio_capture.py: Demonstrate audio capture
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-08 14:18:20 +09:00
Martin Povišer
78aa55f0bc
experiments/speaker_amp.py: Revamp hardware setup
...
Use register definitions where they are now available. Start from full
AUDIO_P reset and set NCO ourselves (instead of relying on iBoot
values).
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-08 14:18:20 +09:00
Martin Povišer
0d4c7af26b
m1n1.hw.mca: Add MCA register definitions
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-08 14:18:20 +09:00
Martin Povišer
90c4a1ae46
m1n1.hw.admac: Improve polling
...
Make sure we read any reports before we start submitting new
descriptors. Also put sleep in busy-wait loop and make speaker_amp.py
exit once EOF is reached.
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-08 14:18:20 +09:00
Martin Povišer
9bd84dfbb9
experiments/speaker_amp.py: Drop 'polling console'
...
Drop the 'polling console' code as there are now better ways to achieve
the same. (One can use USB_VUART for second proxy session, see 85ee2f24)
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-08 14:18:20 +09:00
Martin Povišer
532f260fae
m1n1.hw.admac: Label burst size, buswidth registers
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-08 14:18:20 +09:00
Martin Povišer
3a8ae74907
m1n1.hw.admac: Introduce RX channels
...
Fill in register definitions and extend the driver code to introduce
support for RX channels. This involves change of channel numbering.
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-08 14:18:20 +09:00
Martin Povišer
590722b29d
m1n1.hw.admac: Use stderr for debug prints
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-08 14:18:20 +09:00