Skip to content

Commit

Permalink
Correct the event queue initialization.
Browse files Browse the repository at this point in the history
This fixes operation on Rocket Core.

Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
  • Loading branch information
bukinr committed Apr 22, 2016
1 parent 2d69831 commit 6c1838e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions sys/riscv/riscv/locore.S
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,19 @@
sd t1, 8(t0) /* zero used */
mv t2, t0
mv t3, t0
li t5, (HTIF_RING_SIZE - HTIF_RING_ENTRY_SZ)
li t5, (HTIF_RING_SIZE)
li t6, 0
add t4, t0, t5
1:
addi t3, t3, 24 /* pointer to next */
beq t3, t4, 2f /* finish */
sd t3, 16(t2) /* store pointer */
addi t2, t2, 24 /* next entry */
addi t6, t6, 1 /* counter */
addi t3, t3, HTIF_RING_ENTRY_SZ /* pointer to next */
beq t3, t4, 2f /* finish */
sd t3, 16(t2) /* store pointer */
addi t2, t2, HTIF_RING_ENTRY_SZ /* next entry */
addi t6, t6, 1 /* counter */
j 1b
2:
sd t0, 16(t3) /* last -> first */
addi t3, t3, -HTIF_RING_ENTRY_SZ
sd t0, 16(t3) /* last -> first */

li t2, (HTIF_RING_SIZE)
add s0, t0, t2
Expand Down

0 comments on commit 6c1838e

Please sign in to comment.