From 9037b1d9f2130770228be62c66b88b47fccd99b6 Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Thu, 27 Jul 2017 13:23:49 -0700 Subject: 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. --- platform/platform.ac | 0 platform/platform.mk.in | 9 +++++++++ platform/platform_interface.h | 14 ++++++++++++++ platform/spike.c | 1 + 4 files changed, 24 insertions(+) create mode 100644 platform/platform.ac create mode 100644 platform/platform.mk.in create mode 100644 platform/platform_interface.h create mode 100644 platform/spike.c (limited to 'platform') diff --git a/platform/platform.ac b/platform/platform.ac new file mode 100644 index 0000000..e69de29 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" -- cgit v1.1