Commit graph

2037 commits

Author SHA1 Message Date
R
970b2789d0 jpeg: Implement encoding subsampling modes
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
45876d09a1 jpeg: Import working encode experiment
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
9fca773c8f jpeg: Implement decoding into planar formats
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
3a18075d89 jpeg: Decode linear YUV
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
4c8807fcca jpeg: Add RGB565 to decoder
Note that dithering does not get configured

Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
7350baf58b jpeg: Implement decoding other subsampling modes
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
0c1f89d1f9 jpeg: Import working basic decode experiment
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
49cdf7fe22 jpeg: probe registers more thoroughly
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
c6169c1c15 jpeg: Import register definitions
This comes from experiments that were performed out-of-tree

Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
0f6991ccbc dart-t8110: fill in more details from poking
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
R
96b2d584fe dart-t8110: Import more stuff pulled from symbols
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
R
ce5e5fe476 dart-t8110: Add other seen registers; poke protect
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
R
18535a2385 dart-t8110: uncomment helper functions
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
R
25ebf8adb1 dart-t8110: map/translate
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
R
5b07956e43 dart-t8110: flush/init
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
R
ecb9d1210c dart-t8110: dumping appears to work completely
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
R
16028224f9 dart-t8110: dump first-level translation tables
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
R
4a09eca74a dart-t8110: Initial commit
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
Kyle Evans
0ba2027e5e proxyclient: tools: add a FreeBSD loader
The differences are documented in the script itself, but the main odd
bit is that we pass the provided kernel as an initramfs.  Our modified
loader will probe for the initramfs start/end props in FDT and put up
a memdisk that we load the kernel from.  This choice was made for two
reasons:

1.) Avoid ad-hoc interpretations of a memory region in m1n1, it doesn't
    care if we actually passed it an initramfs or not anyways.

2.) We already had some code on hand to do this in our loader, so I
    suspect we've done similar shenanigans elsewhere anyways.

This also requires a U-Boot change to allow bootefi of an arbitrary
location, as long the size is provided.

The alignment constraints for loader/kernel were kept arbitrarily.  The
kernel will be bounced anyways by loader. I don't recall what
alignment requirements UEFI payloads have, but 2M seems reasonable.

Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
2022-04-16 19:22:55 +09:00
Sven Peter
e9f36ad8b2 kboot: disable phys nodes as well
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-04-16 19:22:28 +09:00
Sven Peter
28103d9003 kboot: propagate ATC tunables to the FDT
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-04-16 19:22:28 +09:00
Kyle Evans
3b68165900 proxyclient: tools: fix linux U-Boot support
-t is optional, we may not have a tty_dev, so we can avoid trying to
grab the baudrate from it if it's unspecified.

We don't want to use dtb_addr for booti; this is the unmodified payload.
m1n1 will load it and add bits to it at a separate address for passing
on to U-Boot.  For booti purposes, we actually want the augmented FDT
rather than the user-specified.

Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
2022-04-16 19:18:06 +09:00
Davide Cavalca
eeebd9dad3 Make scripts executable
Signed-off-by: Davide Cavalca <davide@cavalca.name>
2022-04-16 19:17:33 +09:00
Janne Grunau
d0ce92a284 pcie: Set correct link speed for 10gb ethernet
The PCIe 4 link speed is only described as "target-link-speed" in the
"lan-10gb". This changed in macos 12.3 or earlier. Verified on Mac
Studio and with the template Mac Mini ADT.

Reported-by: Jeff Geerling <geerlingguy@mac.com>
Signed-off-by: Janne Grunau <j@jannau.net>
2022-04-16 19:14:00 +09:00
Janne Grunau
d05f92b18a hv: Hibernate DCP in hv_init
DCP will otherwise not be useable from the guest system.

Signed-off-by: Janne Grunau <j@jannau.net>
2022-04-16 19:12:23 +09:00
Asahi Lina
87a849287a m1n1.utils.Reloadable: Add force argument to _reloadcls()
Useful to force reload classes that haven't changed when their
dependencies might have.

Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-04-16 19:06:22 +09:00
Asahi Lina
8b10324815 m1n1.trace: Add space after CPU number in PrintTracer logs
This makes the logs align properly with other trace logs.

Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-04-16 19:06:22 +09:00
Asahi Lina
6c57d3ded9 m1n1.proxyutils.RegMonitor: Add support for custom log function
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-04-16 19:06:22 +09:00
Asahi Lina
e2f63a07b2 hv: Improve VM emulation for tracer
Adds support for up to 64-byte ops and more SIMD/paired operations.
This is good enough to trace a lot of GPU VM address space.

Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-04-16 19:06:22 +09:00
Asahi Lina
cf8be42aa9 hv: Fix bug when unmapping IO ranges
Sometimes ranges were not properly unmapped if they did not overlap the
currently defined range maps.

Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-04-16 19:06:22 +09:00
Asahi Lina
302a9ec4c0 m1n1.hv: Add BYPASS trace mode
Forces SW mapping but does not do any hooking. This can be useful for
testing the emulation or to work around issues with HW/SW map
differences.

Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-04-16 19:06:22 +09:00
Hector Martin
9af9e834bf chainload.py: Pad image to terminate payloads
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-27 18:34:53 +09:00
Hector Martin
1d19e74ca8 display: Implement mode selection
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-27 17:57:37 +09:00
Hector Martin
550e39913f string: Add atol
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-27 17:23:50 +09:00
Hector Martin
ebf1cf3aa3 display: Reinit FB if resolution changed 2022-03-27 17:02:00 +09:00
Hector Martin
d937483067 fb: Add fb_reinit() 2022-03-27 17:01:42 +09:00
Hector Martin
3248c91aef display: Allow forcing re-config via payload (WIP)
Doesn't actually let you specify a mode yet.

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-27 16:46:53 +09:00
Hector Martin
780c0644d4 display: Fix HPD detection bug
Turns out it's just an 8-bit bool, not 32 bits, and when cast to int
the top bits can cause it to be interpreted as an error randomly...

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-27 16:46:23 +09:00
Hector Martin
8af401ade1 display: Also prefer <4K modes in the vertical dimension
Apparently 2:1 scaled modes like 1920x2160 are a thing?

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-27 16:08:39 +09:00
Janne Grunau
df53f16f76 m1n1.hv: Copy /chosen/memory-map/preoslog if it exists
preoslog was added in macos 12.3 and seems to contain iBootStage1 log
output. Since macos 12.3 accesses it it has to be copied to after the
guest image.

Signed-off-by: Janne Grunau <j@jannau.net>
2022-03-20 03:04:13 +09:00
Sven Peter
0a1a9348c3 kboot: try SEPROM for the random seeds first
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-03-19 02:33:54 +09:00
Sven Peter
4c62ef47ad kboot: split off dt_set_rng_seed
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-03-19 02:33:54 +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
bad5aebc7d kboot: Forward kblang code to asahi,kblang-code
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-18 06:56:57 +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
d4635f60e2 chainload: Properly reserve memory for everything up to bootargs
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-16 01:56:57 +09:00
Hector Martin
3331d9e1e1 kboot: Properly prune cpu-map and IRQ affinities for missing CPUs
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-14 21:09:20 +09:00
Hector Martin
94d640aa20 tools/run_guest.py: Support restricting CPU list available to guest
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-14 21:08:23 +09:00
Hector Martin
d580963043 smp: Guard CPU indexes > MAX_CPUS
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-14 21:08:07 +09:00
Hector Martin
be1421d2ad m1n1.hw.spi: Update register definitions
This had been sitting in my worktree...

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-11 22:14:46 +09:00