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

Seperate out unmatched from generic SM platform somewhat #403

Closed
wants to merge 1 commit into from

Conversation

grg-haas
Copy link
Collaborator

@grg-haas grg-haas commented Jan 6, 2024

When compiling the SM for generic. I noticed recently that the unmatched platform files are also included in the build. While this is mostly harmless at runtime (besides increasing the binary size of the SM somewhat), it does sometimes lead to unnecessary and unrelated compilation failures when only attempting to work with the generic platform. This PR separates out the unmatched SM platform a bit more, leveraging the insight that we (again) only added a small patch to fu740.c which calls sm_init at the appropriate time. We can accomplish the same thing without copying a source file by #include-ing fu740.c and adding a small platform wrapper around it.

@grg-haas
Copy link
Collaborator Author

grg-haas commented Jan 6, 2024

@Nanamiiiii could you take a look at this patch? I believe it should work, but unfortunately don't have access to a hifive unmatched board right now to test it.

@Nanamiiiii
Copy link
Contributor

@grg-haas Sorry. I just noticed your mention.
Would you like me to test it now?

@grg-haas
Copy link
Collaborator Author

If you could, that would be great! I landed a version of this as part of the CVA6 support a week or so back, so you should be able to try the latest master with KEYSTONE_PLATFORM=hifive_unmatched -- I'm pretty sure it should work but sadly don't have the hardware to test it myself

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