Commit graph

89 commits

Author SHA1 Message Date
Eileen Yoon
1077e78195 isp: tmp - Add t8020 ISP DART workaround
Signed-off-by: Eileen Yoon <eyn@gmx.com>
2023-09-07 20:48:53 +09:00
Martin Povišer
39f4919fc1 sio: Set up auxiliary SIO data in FDT
On kboot, parse the ADT for SIO firmware parameters, set up the expected
data structures for SIO consumption in reserved memory, and pass those
in properties of the SIO FDT node.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Asahi Lina
af85202b58 math: Add powf()
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-06-27 18:35:00 +09:00
Hector Martin
9e9693eb6c rust: Switch to RUSTC_BOOTSTRAP=1 backdoor instead of nightly
Nightly is messing around with alloc_error_handler and they can't seem
to make up their mind about it, breaking our CI. Just switch to stable
rust with the usual backdoor to enable unstable features (same as the
kernel does).

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-25 23:58:05 +09:00
Martin Povišer
6661ab14d0 hv: Add 9P virtio peripheral
Add some minimal implementation of virtio peripherals. At the level
of on-target hypervisor code we implement the MMIO layout and
maintain virtqueues. Once a buffer is available, we break into the
host proxyclient to deal with it.

Specific device-classes of the virtio spec ought to be implemented in
the proxyclient. Here the one device implemented is 9P transport,
exporting the m1n1 source directory.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-01-13 17:25:25 +09:00
Hector Martin
c19303dc87 firmware: New module to detect firmware version
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-12-04 16:06:27 +09:00
Hector Martin
7782944808 Makefile: Fix CC FP log message alignment
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-12-04 15:07:16 +09:00
Hector Martin
4c2c4085f1 Makefile: Add multiple methods of determining the version number
This fixes m1n1 stage2 version numbers (for .tar.gz downloads) as long
as the directory name is left intact, and also supports packagers
passing their own version number if needed.

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-12-04 14:59:47 +09:00
Asahi Lina
e6ffbb018b kboot_gpu: Add proper max-power and leakage calculations for t600x/t8103
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-12-04 13:17:10 +09:00
Asahi Lina
057151cb21 math: Add expf() implementation from musl
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-12-04 13:17:10 +09:00
Asahi Lina
4a6a4c0376 kboot: Add initial GPU property forwarding
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-12-04 13:15:55 +09:00
Janne Grunau
d27ca705c1 devicetree: Add dt utils for "ranges" based address translation
Signed-off-by: Janne Grunau <j@jannau.net>
2022-10-23 17:21:26 +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
Hector Martin
29a85d6857 Makefile, asm.py: Work on native arm64 by default
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-08-29 17:03:01 +09:00
Hector Martin
4555cc5148 dapf: Initialize DAPFs from the ADT
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-03 23:27:50 +09:00
Hector Martin
22adc922f7 chickens: Add T8112 chickens
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-28 01:41:23 +09:00
Hector Martin
b16a19715a chickens: Split off core sequences into separate files
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-28 01:41:23 +09:00
Martin Povišer
72c6170ee8 m1n1.loadobjs: Support loading of inline C snippets
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-05-30 23:26:31 +09:00
Thomas Watson
753f48e929 keep binary versions of boot logo in repo
Signed-off-by: Thomas Watson <twatson52@icloud.com>
2022-05-30 22:54:33 +09:00
Sven Peter
4e5a949382 sep: add simple SEP TRNG API
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-03-19 02:33:54 +09:00
Hector Martin
b64a6b9321 Makefile: git-describe using --tags
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-17 16:22:13 +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
a2944fa123 clk: Initialize MCA clock muxes
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-08 00:02:06 +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
1c2a2db1dd display: Add logic to initialize the Mac Mini HDMI display
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
eaadc43fbb dcp: Add DCP and iBoot protocol support
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
3f9bd38b6f afk: Add AFK/EPIC subsystem
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Sven Peter
2307e756d3 nvme: Add stub ANS NVMe driver
Right now it only initializes the co-processor and makes sure
the firmware has booted successfully.

Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-01-16 18:53:29 +09:00
Sven Peter
734f8cc1b4 rtkit: Add RTKit library
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-01-16 18:53:29 +09:00
Sven Peter
c0cc000ce3 iova: Add a simple IOVA allocator
Not well tested because I realized too late that NVMe doesn't
actually need any DART support...

Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-01-16 18:53:29 +09:00
Sven Peter
2b792ffc34 sart: Add SART support
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-01-16 18:53:29 +09:00
Sven Peter
65816f1bd8 asc: Add ASC mailbox driver
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-01-16 18:53:29 +09:00
Hector Martin
0d4fb00ceb Makefile: Add a m1n1.bin target that builds a raw binary
This is to be used for the non-macho boot support in 12.1+ kmutil.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-12-17 21:46:55 +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
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
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
ef83f62d0e cpufreq: New module to initialize CPU p-states
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-10-18 17:34:40 +09:00
Hector Martin
e08457aaa9 Makefile, m1n1.ld: Build with debug info
This allows addr2line to work. The Mach-O output should be unchanged.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-21 17:13:03 +09:00
Hector Martin
56e279fe64 Makefile: Add -Wstack-usage=1024
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 21:58:14 +09:00
Hector Martin
395c072a75 Makefile: Keep build_tag up to date
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-31 23:18:49 +09:00
Hector Martin
4b4ae3ab90 aic: Add trivial AIC scaffolding, move regs to aic_regs.h
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-23 17:01:33 +09:00
Hector Martin
3bdf036161 Revert "cpio: add functions to create cpio images"
This reverts commit cd4b563a31.
2021-08-23 15:27:37 +09:00
Sven Peter
cd4b563a31 cpio: add functions to create cpio images
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-07-09 15:40:11 +09:00
Janne Grunau
88275b5cb5 hv: add AIC interrupt tracing
Implemented by MMIO tracing of AIC's event register. Proposed by pipcet.

Signed-off-by: Janne Grunau <j@jannau.net>
2021-06-10 15:41:02 +09:00
Sven Peter
d2b619957c tps6598x: add support for the USB PD chip
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-06-09 19:45:38 +09:00
Sven Peter
103100bb42 i2c: add i2c support
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-06-09 19:45:38 +09:00