Updates to Freedom SoCs
[freedom-sifive.git] / bootrom / sdboot / head.S
diff --git a/bootrom/sdboot/head.S b/bootrom/sdboot/head.S
new file mode 100644 (file)
index 0000000..88adfbb
--- /dev/null
@@ -0,0 +1,18 @@
+// See LICENSE for license details.
+#include <platform.h>
+#include "common.h"
+
+  .section .text.init
+  .option norvc
+  .globl _prog_start
+_prog_start:
+  li sp, (PAYLOAD_DEST + 0x7fff000)
+  call main
+  csrr a0, mhartid
+  la a1, dtb
+  li s1, PAYLOAD_DEST
+  jr s1
+
+  .section .rodata
+dtb:
+  .incbin DEVICE_TREE