We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b70868 commit 8fcfd28Copy full SHA for 8fcfd28
src/soc/sifive/fu540/src/bootblock.S
@@ -26,6 +26,20 @@ _boot:
26
# some hardware configurations, but is always set in QEMU.
27
csrr a0, mhartid
28
29
+ # Reset the mtimecmp to some absurdly large number.
30
+ # The mtimecmp register is memory mapped at 0x2004000 + 0x8 * mhartid
31
+ # TODO: Move to Rust
32
+ li t0, 0x2004000
33
+ slli t1, a0, 3
34
+ add t1, t1, t0
35
+ li t0, 0xffffffffffffffff
36
+ sd t0, (t1)
37
+
38
+ # Clear all interrupt enable and pending bits.
39
40
+ csrwi mie, 0x0
41
+ csrwi mip, 0x0
42
43
# Layout of L2-LIM (address 0x08000000):
44
# 0x00000-0x0ffff: .bss segment (64K bytes)
45
# 0x10000-0x1ffff: stack of boot hart (64K bytes)
0 commit comments