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

Support AIC version 3 #364

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

dberlin
Copy link
Contributor

@dberlin dberlin commented Dec 1, 2023

Support new version of AIC used by M3

@marcan
Copy link
Member

marcan commented Dec 3, 2023

Is the only relevant difference the MAX_DIE field width? Can't we just reuse all the rest of the code and make that conditional / part of the regs struct?

@dberlin
Copy link
Contributor Author

dberlin commented Dec 3, 2023

Yes.
The offsets are also now dynamic, and stored in the device tree, but they are the same between m2 and m3 max anyway.

So i could just add them to the struct and and make them -1, and we read the DT if they are -1.

Then we could share 2/3 init entirely.
Happy to go that way.

I'm also not positive they changed the max width for real. Or they have bugs.
I can see them always mask on the m2 with 0x7, and on the m3 it's 0xf.
But there are times they mask with 0x7 on the m3 as well (never on m2).

The max number of dies is 2 on m3 max, so if we left the field as-is, and left a comment, it would not break anything for now, since it fits easily in the field.

@marcan
Copy link
Member

marcan commented Dec 3, 2023

SGTM, let's go with that. I'm indifferent about the max dies thing, it's academic until a monster Mac Pro shows up (if ever), and that's guaranteed to need piles of code changes anyway.

@dberlin dberlin force-pushed the m3-work-aic branch 2 times, most recently from 445aca8 to 0838950 Compare December 3, 2023 17:52
@dberlin
Copy link
Contributor Author

dberlin commented Dec 3, 2023

This is a take at it. I'm gonna install it in a second and test it - i also noticed a kboot thing that needed to be updated for aic3 and added it.

@dberlin
Copy link
Contributor Author

dberlin commented Dec 3, 2023

This still works :)

@dberlin dberlin force-pushed the m3-work-aic branch 3 times, most recently from e5575c9 to 1f72c5b Compare December 6, 2023 03:10
Small changes, mostly some offsts are now available in the DT,
and a mask change.

Signed-off-by: Daniel Berlin <[email protected]>
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.

2 participants