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

sw: Runtime Fixes #166

Merged
merged 3 commits into from
Jul 19, 2024
Merged

sw: Runtime Fixes #166

merged 3 commits into from
Jul 19, 2024

Conversation

Xeratec
Copy link
Contributor

@Xeratec Xeratec commented Jul 18, 2024

This PR introduces two fixes to the Snitch runtime that are required for Deeploy.

The first issue is related to the location of the snrt_l1_allocator() which is calculated via the cls() function. This function uses the _cls_ptr which is placed at the beginning of the .cbss section. However, if the .cbss section is empty, this location is invalid.

The second fix statically allocated the buffers for multicore compatible printf() function. Without this fix, the buffers overlap with the L3 allocator, causing printf() call to overwrite the allocation structure.

Fixed

  • Ensure the .cbss section is not optimized away.
  • Statically allocate printf() buffers

@Xeratec Xeratec self-assigned this Jul 18, 2024
Copy link
Contributor

@fischeti fischeti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Collaborator

@colluca colluca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, in terms of equivalence. However, the putchar function was already broken to start with, see #13.

I will push a commit where I fixed this on top and we can merge this together.

@colluca colluca merged commit 8ad8ff8 into pulp-platform:main Jul 19, 2024
13 checks passed
@Xeratec Xeratec deleted the pr/fix_extern branch July 22, 2024 16:46
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.

3 participants