aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@dabbelt.com>2017-07-27 13:23:49 -0700
committerPalmer Dabbelt <palmer@dabbelt.com>2017-08-02 12:32:45 -0700
commit9037b1d9f2130770228be62c66b88b47fccd99b6 (patch)
tree56998a7ab91d5da423452fec410d32479cec34b1 /platform
parent8b80f2ea28c0167f9dc75462147447b144ed4ea9 (diff)
downloadriscv-pk-9037b1d9f2130770228be62c66b88b47fccd99b6.zip
riscv-pk-9037b1d9f2130770228be62c66b88b47fccd99b6.tar.gz
riscv-pk-9037b1d9f2130770228be62c66b88b47fccd99b6.tar.bz2
Add a platform interface
SiFive's pk fork is the second one I've had to maintain, and it's a huge pain because people keep just leaving changes all over the tree. I want to introduce an interface that the platform-specific details can live behind so I don't have to keep doing these painful merges.
Diffstat (limited to 'platform')
-rw-r--r--platform/platform.ac0
-rw-r--r--platform/platform.mk.in9
-rw-r--r--platform/platform_interface.h14
-rw-r--r--platform/spike.c1
4 files changed, 24 insertions, 0 deletions
diff --git a/platform/platform.ac b/platform/platform.ac
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/platform/platform.ac
diff --git a/platform/platform.mk.in b/platform/platform.mk.in
new file mode 100644
index 0000000..90ee269
--- /dev/null
+++ b/platform/platform.mk.in
@@ -0,0 +1,9 @@
+platform_subproject_deps =
+
+platform_hdrs = \
+ platform_interface.h
+
+platform_c_srcs = \
+ spike.c
+
+platform_asm_srcs =
diff --git a/platform/platform_interface.h b/platform/platform_interface.h
new file mode 100644
index 0000000..0f49056
--- /dev/null
+++ b/platform/platform_interface.h
@@ -0,0 +1,14 @@
+#ifndef PLATFORM__PLATFORM_H
+#define PLATFORM__PLATFORM_H
+
+/* This interface is designed to allow BBL/PK to be portable to multiple target
+ * platforms. The current interface has been hacked up based on SiFive's fork
+ * of pk that runs on our FPGA boards. The idea here is that rather than
+ * forking pk and touching things all over the tree, changes should be local to
+ * the target directory.
+ *
+ * This interface isn't meant to be stable or sane, just better than what we
+ * had before.
+ */
+
+#endif
diff --git a/platform/spike.c b/platform/spike.c
new file mode 100644
index 0000000..9764057
--- /dev/null
+++ b/platform/spike.c
@@ -0,0 +1 @@
+#include "platform_interface.h"