diff options
author | Anup Patel <anup.patel@wdc.com> | 2019-01-25 08:49:22 +0300 |
---|---|---|
committer | Atish Patra <atishp04@gmail.com> | 2019-01-25 22:05:49 +0300 |
commit | bd98d772983df829b78b7ba16bc2dce559c93fbc (patch) | |
tree | 9990396809c7ba44dbdeb3de8db2080617ef464b /lib | |
parent | fba7e7c3eaef7f256063fea3cfda829ccf75eab4 (diff) | |
download | opensbi-bd98d772983df829b78b7ba16bc2dce559c93fbc.tar.xz |
include: Add separate header for OpenSBI version
Currently, the OpenSBI version is in top-level Makefile so
firmware linking to OpenSBI static library have no-way to
know OpenSBI version.
This patch moves OpenSBI version from top-level Makefile to
sbi/sbi_version.h header which provides OPENSBI_VERSION_MAJOR
and OPENSBI_VERSION_MINOR defines.
NOTE: the SBI spec (or SBI ecall interface) version is
different. The SBI spec version is provided by functions
sbi_ecall_version_major() and sbi_ecall_version_minor().
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sbi_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sbi_init.c b/lib/sbi_init.c index a806b45..81feb56 100644 --- a/lib/sbi_init.c +++ b/lib/sbi_init.c @@ -16,6 +16,7 @@ #include <sbi/sbi_platform.h> #include <sbi/sbi_system.h> #include <sbi/sbi_timer.h> +#include <sbi/sbi_version.h> #define BANNER \ " ____ _____ ____ _____\n" \ @@ -63,7 +64,7 @@ static void __noreturn init_coldboot(struct sbi_scratch *scratch, u32 hartid) misa_string(str, sizeof(str)); sbi_printf("\nOpenSBI v%d.%d (%s %s)\n", - OPENSBI_MAJOR, OPENSBI_MINOR, + OPENSBI_VERSION_MAJOR, OPENSBI_VERSION_MINOR, __DATE__, __TIME__); sbi_printf(BANNER); |