diff options
author | br <br@FreeBSD.org> | 2016-04-22 15:04:46 +0000 |
---|---|---|
committer | br <br@FreeBSD.org> | 2016-04-22 15:04:46 +0000 |
commit | 49a47991fb24943b2c775d4fdb74ddb1da796d27 (patch) | |
tree | 5869025575472974d2523d58e091920405dc1583 /sys/riscv | |
parent | ca977737ebfa6e91b8d68cabf47b0ade8d8f3ce2 (diff) | |
download | FreeBSD-src-49a47991fb24943b2c775d4fdb74ddb1da796d27.zip FreeBSD-src-49a47991fb24943b2c775d4fdb74ddb1da796d27.tar.gz |
Correct the event queue initialization.
This fixes operation on Rocket Core.
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Diffstat (limited to 'sys/riscv')
-rw-r--r-- | sys/riscv/riscv/locore.S | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/riscv/riscv/locore.S b/sys/riscv/riscv/locore.S index 9f32cac0..ef81686 100644 --- a/sys/riscv/riscv/locore.S +++ b/sys/riscv/riscv/locore.S @@ -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 |