Skip to content

Commit

Permalink
[processor_check] add AMO fences
Browse files Browse the repository at this point in the history
required for up-coming cache updates
  • Loading branch information
stnolting committed Feb 29, 2024
1 parent 230dc53 commit f7ce626
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sw/example/processor_check/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1973,6 +1973,7 @@ int main() {
neorv32_cpu_invalidate_reservations(); // invalidate all current reservations

amo_var = 0x00cafe00; // initialize
asm volatile ("fence"); // flush/reload d-cache

tmp_a = neorv32_cpu_load_reservate_word((uint32_t)&amo_var);
amo_var = 0x10cafe00; // break reservation
Expand Down Expand Up @@ -2015,6 +2016,7 @@ int main() {
neorv32_cpu_invalidate_reservations(); // invalidate all current reservations

amo_var = 0x00abba00; // initialize
asm volatile ("fence"); // flush/reload d-cache

tmp_a = neorv32_cpu_load_reservate_word((uint32_t)&amo_var);
asm volatile ("fence"); // flush/reload d-cache
Expand Down

0 comments on commit f7ce626

Please sign in to comment.