Skip to content
This repository was archived by the owner on Jun 29, 2023. It is now read-only.

Commit 1d74e96

Browse files
author
Kai M. Wetlesen
committed
inserting no-ops between lw and branch to try to solve a race condition
1 parent 62a5804 commit 1d74e96

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

srprojsw/system.asm

+2-2
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,7 @@ PROC_TASK_AES:
927927
addi $t2, $zero, 0x1
928928
SPINLOCK_1:
929929
lw $t1, AES_DONE($zero)
930+
nop
930931
bne $t1, $t2, SPINLOCK_1
931932
sw $zero, AES_DONE($zero) # Reset AES done flag
932933

@@ -956,6 +957,7 @@ PROC_TASK_AES:
956957
addi $t2, $zero, 0x1
957958
SPINLOCK_2:
958959
lw $t1, AES_DONE($zero)
960+
nop
959961
bne $t1, $t2, SPINLOCK_2
960962
sw $zero, AES_DONE($zero) # Reset AES done flag
961963

@@ -1348,8 +1350,6 @@ nop
13481350
nop
13491351
nop
13501352
nop
1351-
nop
1352-
nop
13531353

13541354
## Trying to start these tasks will halt the CPU. If you want to use these tasks
13551355
## then take a label and position it above your task and adjust the scheduler config.

srprojsw/system.mem

+5-5
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,8 @@ afa80000
625625
00000000
626626
200a0001
627627
8c097028
628-
152afffe
628+
00000000
629+
152afffd
629630
ac007028
630631
48900800
631632
20090060
@@ -635,7 +636,8 @@ ac007028
635636
00000000
636637
200a0001
637638
8c097028
638-
152afffe
639+
00000000
640+
152afffd
639641
ac007028
640642
00104820
641643
212affd0
@@ -646,7 +648,7 @@ ac0b7000
646648
ac127000
647649
ac127000
648650
ac007000
649-
1000ff61
651+
1000ff5f
650652
03e00008
651653
00000000
652654
00000000
@@ -1018,6 +1020,4 @@ ac007000
10181020
00000000
10191021
00000000
10201022
00000000
1021-
00000000
1022-
00000000
10231023
080003fe

0 commit comments

Comments
 (0)