Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for booting on T8012 (T2) SoC #425

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

asdfugil
Copy link
Contributor

@asdfugil asdfugil commented Dec 1, 2024

This PR contains the changes required to boot the kernel on T2 per this LKML submission:

https://lore.kernel.org/asahi/[email protected]/T/#t

Overall T2 is similar to A10, and this takes care of the remaining:

  • The ultra-narrow touch bar screen, or no screen at all
  • Some memory channels being unused on some devices
  • Some ADT oddities
  • Takes the memory intended for SSD cache and allow the kernel to use it (If a driver for booting x86 ever end up getting made that memory has to be described anyways)

P.S. T2 Boots on the P-core in Apple Fusion Architecture

Address some peculiarities specific to T2:

- Reserved memory at top is very large, either 512 MB or 1536 MB, and only
lowest 512 MB is for OS use.

- Some ranges in /arm-io/ranges is not aligned to the page size. We align
them ourselves instead.

- On models with a screen, the framebuffer is extremely narrow at 60 pixels
in width, so add a smaller logo.

Signed-off-by: Nick Chan <[email protected]>
- Some devices does not have a display internal or external, do not try to
prepare framebuffer on it.

- The SSD cache on T2 can be used as normal memory, so add it to /memory
in addition to the normal memory described by iBoot.

- Only half of the memory channels are used on T2 with 1 GB of memory,
and this fact must be learned at runtime because the amount of memory
depends on the storage configuration of the host Mac.

Signed-off-by: Nick Chan <[email protected]>
@asdfugil asdfugil marked this pull request as draft December 3, 2024 05:18
@asdfugil asdfugil marked this pull request as ready for review December 3, 2024 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant