From 2e38dbe5f1a9db76cdf529679faee63fcb6a9c34 Mon Sep 17 00:00:00 2001 From: Xiang Wang Date: Tue, 28 Aug 2018 16:34:29 +0800 Subject: riscv: update mtime initialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a interface, which is implemented by SoC. Change-Id: I5524732f6eb3841e43afd176644119b03b5e5e27 Signed-off-by: Xiang Wang Reviewed-on: https://review.coreboot.org/28372 Tested-by: build bot (Jenkins) Reviewed-by: Jonathan Neuschäfer --- src/soc/lowrisc/lowrisc/Makefile.inc | 1 + src/soc/lowrisc/lowrisc/mtime.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 src/soc/lowrisc/lowrisc/mtime.c (limited to 'src/soc/lowrisc') diff --git a/src/soc/lowrisc/lowrisc/Makefile.inc b/src/soc/lowrisc/lowrisc/Makefile.inc index 343c909377..9fc52da776 100644 --- a/src/soc/lowrisc/lowrisc/Makefile.inc +++ b/src/soc/lowrisc/lowrisc/Makefile.inc @@ -1,5 +1,6 @@ ifeq ($(CONFIG_SOC_LOWRISC_LOWRISC),y) +bootblock-y += mtime.c romstage-y += cbmem.c ramstage-y += cbmem.c diff --git a/src/soc/lowrisc/lowrisc/mtime.c b/src/soc/lowrisc/lowrisc/mtime.c new file mode 100644 index 0000000000..f8c2717563 --- /dev/null +++ b/src/soc/lowrisc/lowrisc/mtime.c @@ -0,0 +1,22 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2018 HardenedLinux + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include + +/* FIXME: This is an empty implementation, please improve */ +/* This function is used to initialize HLS()->time/HLS()->timecmp */ +void mtime_init(void) +{ +} -- cgit v1.2.3