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 clean_data_cache_all and stabilize Raspberry Pi 4B SMP Support #13

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

PG-MANA
Copy link
Collaborator

@PG-MANA PG-MANA commented Sep 3, 2023

This PR adds clean_data_cache_all to common/src/cpu.rs.
This function will flush the data caches of each level by set/way.

After writing boot information to memory, flush data cache and synchronise memory data by calling clean_data_cache_all.

This PR seems to fix #10 .

This commit add clean_data_cache_all into common/src/cpu.rs
This function flush each Level's data caches by set/way.

Signed-off-by: Manami Mori <[email protected]>
@PG-MANA PG-MANA added the bug Something isn't working label Sep 3, 2023
@PG-MANA PG-MANA self-assigned this Sep 3, 2023

for set in 0..num_sets {
for way in 0..associativity {
/* C5.3.13 DC CISW, Data or unified Cache line Clean and Invalidate by Set/Way (ARM DDI 0487G.a ID011921)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: This information looks a little bit old. The latest manual version is ARM DDI 0487J.a (ID042523), and the section number of DC CISW is C5.3.15.

Copy link
Contributor

@fukai-t fukai-t left a comment

Choose a reason for hiding this comment

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

LGTM.

@fukai-t fukai-t merged commit b24573b into main Sep 5, 2023
1 check passed
@PG-MANA PG-MANA deleted the fix/clean_cache branch September 5, 2023 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Booting linux on Raspberry pi4 B with multiple cores fails probabilistically.
3 participants