diff options
-rwxr-xr-x | configure | 14 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | platform/platform.mk.in | 2 | ||||
-rw-r--r-- | platform/sifive-vc707-devkit.c | 41 |
4 files changed, 62 insertions, 1 deletions
@@ -592,6 +592,7 @@ subprojects_enabled subprojects BBL_PAYLOAD install_subdir +PLATFORM_NAME RISCV EGREP GREP @@ -669,6 +670,7 @@ ac_user_opts=' enable_option_checking enable_stow enable_32bit +with_platform enable_optional_subprojects enable_vm enable_logo @@ -1325,6 +1327,7 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-platform=spike Select the target platform --with-payload Set ELF payload for bbl Some influential environment variables: @@ -4090,6 +4093,17 @@ case "${BUILD_32BIT}" in esac +# Check whether --with-platform was given. +if test "${with_platform+set}" = set; then : + withval=$with_platform; PLATFORM_NAME=$withval +else + PLATFORM_NAME=spike +fi + +PLATFORM_NAME=$PLATFORM_NAME + + + LIBS="-lgcc" diff --git a/configure.ac b/configure.ac index d4db795..5813f3b 100644 --- a/configure.ac +++ b/configure.ac @@ -99,6 +99,12 @@ case "${BUILD_32BIT}" in ;; esac +AC_ARG_WITH([platform], + AS_HELP_STRING([--with-platform=spike], [Select the target platform]), + PLATFORM_NAME=$withval, + PLATFORM_NAME=spike) +AC_SUBST(PLATFORM_NAME, $PLATFORM_NAME) + AC_SUBST(CFLAGS) AC_SUBST(LDFLAGS) AC_SUBST([LIBS], ["-lgcc"]) diff --git a/platform/platform.mk.in b/platform/platform.mk.in index 90ee269..eded238 100644 --- a/platform/platform.mk.in +++ b/platform/platform.mk.in @@ -4,6 +4,6 @@ platform_hdrs = \ platform_interface.h platform_c_srcs = \ - spike.c + @PLATFORM_NAME@.c platform_asm_srcs = diff --git a/platform/sifive-vc707-devkit.c b/platform/sifive-vc707-devkit.c new file mode 100644 index 0000000..cc0e0f1 --- /dev/null +++ b/platform/sifive-vc707-devkit.c @@ -0,0 +1,41 @@ +#include "platform_interface.h" + +static const char logo[] = +"\r\n" +" SIFIVE, INC.\r\n" +"\r\n" +" 5555555555555555555555555\r\n" +" 5555 5555\r\n" +" 5555 5555\r\n" +" 5555 5555\r\n" +" 5555 5555555555555555555555\r\n" +" 5555 555555555555555555555555\r\n" +" 5555 5555\r\n" +" 5555 5555\r\n" +" 5555 5555\r\n" +"5555555555555555555555555555 55555\r\n" +" 55555 555555555 55555\r\n" +" 55555 55555 55555\r\n" +" 55555 5 55555\r\n" +" 55555 55555\r\n" +" 55555 55555\r\n" +" 55555 55555\r\n" +" 55555 55555\r\n" +" 55555 55555\r\n" +" 555555555\r\n" +" 55555\r\n" +" 5\r\n" +"\r\n" +" SiFive RISC-V Coreplex\r\n"; + +long platform__disabled_hart_mask = 0x1; + +const char *platform__get_logo(void) +{ + return logo; +} + +int platform__use_htif(void) +{ + return 0; +} |