Skip to content

Commit f506d39

Browse files
committed
fu540 init: add a hack for broken rust riscv runtime
For now, rust runtime is broken as it demands 16 bit atomic load and store ops, which riscv can not do. Add a gross hack to get us building again until they fix their code. This allows me to run again. Arguably, this belongs in arch, but since it should not exist at all, and I don't want to add more .S files, it goes here. We'll revert it very soon. Signed-off-by: Ronald G. Minnich <[email protected]>
1 parent 0e04fe7 commit f506d39

File tree

1 file changed

+10
-0
lines changed
  • src/soc/sifive/fu540/src

1 file changed

+10
-0
lines changed

src/soc/sifive/fu540/src/init.S

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// This is a GROSS HACK until rust is fixed to not expect
2+
// atomic load store on 16 bit quantities, which riscv
3+
// can not do.
4+
.globl __atomic_store_16
5+
__atomic_store_16:
6+
ret
7+
.globl __atomic_load_16
8+
__atomic_load_16:
9+
ret
10+
// END GROSS HACK
111

212
.globl _stack_ptr
313
.section .rodata

0 commit comments

Comments
 (0)