Skip to content

make tile 0 be the only tile clearing .bss#8

Open
marchioa wants to merge 1 commit intopulp-platform:mainfrom
marchioa:am/deeploy
Open

make tile 0 be the only tile clearing .bss#8
marchioa wants to merge 1 commit intopulp-platform:mainfrom
marchioa:am/deeploy

Conversation

@marchioa
Copy link

@marchioa marchioa commented Mar 2, 2026

At the moment all tiles clear the .bss section in crt0.S. This may cause issues when reading a vector allocated in .bss, since a slower tile might overwrite its contents when starting its routine.
This PR solves the issue by having the only tile 0 clearing the .bss.

@Dequino
Copy link
Member

Dequino commented Mar 5, 2026

This change as-is will trigger some errors in the current test folder (for example, in test_mm_is_2).

This is mostly due to the fact that there is no initial barrier in most of the tests, which may result in the core 0 cleaning up one of the static vectors of one of the faster cores.

Two possible solutions would be:

Option 1 - Modify all tests to have an initial barrier
Naive solution as from now on all the tests would require a barrier too.

Option 2 - Add a barrier inside the crt0 itself
This can be done using a spinlock mechanism or similar.

UNFORTUNATELY atm cv32e40p does NOT support the atomic extension, so this mechanism would have to be somehow done without using atomic instructions.

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