summaryrefslogtreecommitdiff
path: root/lib/sbi_system.c
AgeCommit message (Collapse)AuthorFilesLines
2019-06-19lib: Move sbi core library to lib/sbiAtish Patra1-45/+0
Signed-off-by: Atish Patra <atish.patra@wdc.com> Acked-by: Anup Patel <anup.patel@wdc.com>
2019-05-24lib: Handle page/access fault caused by unpriv load/storeAnup Patel1-1/+1
The unpriv load/store instruction from M-mode can cause page/access fault to M-mode if S-mode page table did not have mappings OR it did not have PMP access permission. To tackle this, we redirect trap back to S-mode if unpriv load/store instruction traps in M-mode. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
2019-04-24all: run clang-format and update checked-in filesOlof Johansson1-8/+6
Noisy commit, no functional changes. Generated with an current upstream clang-format and: clang-format -i $(find . -name \*.[ch]) Signed-off-by: Olof Johansson <olof@lixom.net>
2019-03-12lib: Implement sfence.vma correctly.Atish Patra1-1/+1
Currently, OpenSBI doesn't distinguish between sfence.vma and sfence.vm asid calls. Moreover, it ignores the page ranges and just flush entire TLB everytime. Fix the sfence implementation by keeping all the tlb flush info in scratch area. The relevant Linux kernel code was added by https://patchwork.kernel.org/project/linux-riscv/list/?series=89695 However, this patch is backward compatible with older version kernel that doesn't have the above patches as well. Fixes #87 Signed-off-by: Atish Patra <atish.patra@wdc.com>
2019-02-18lib: Send IPI for all harts to hang on system shutdownNick Kossifidis1-0/+8
In case the platform specific method for shutting down the system fails (or is not implemented), at least make sure that all harts hang instead of just the current hart. Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
2019-01-24all: Update copyright header in all filesAnup patel1-3/+3
This patch updates copyright header in all files as follows: 1. Makes "SPDX-License-Identifier: BSD-2-Clause" as first line 2. Change copyright year to 2019 for Western Digital Signed-off-by: Anup Patel <anup.patel@wdc.com>
2019-01-23lib: Remove hartid paramter from early_init() and final_init() callbacksAnup Patel1-6/+4
We simplify early_init() and final_init() callbacks of sbi_platform by removing "hartid" parameter. Signed-off-by: Anup Patel <anup.patel@wdc.com>
2018-12-27lib: Simplify sbi_platform early_init() and final_init() hooksAnup Patel1-14/+8
Instead of having separate early_init() and final_init() hooks for cold and warm boot, this patch updates struct sbi_platform to have just one early_init() and one final_init() hook. The type of boot (cold or warm) is now a boolean flag parameter for the updated early_init() and final_init() hooks. Signed-off-by: Anup Patel <anup.patel@wdc.com>
2018-12-11Initial commit.Anup Patel1-0/+47
Signed-off-by: Anup Patel <anup.patel@wdc.com>