From patchwork Tue Mar 10 02:35:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 243460 List-Id: U-Boot discussion From: bmeng.cn at gmail.com (Bin Meng) Date: Mon, 9 Mar 2020 19:35:26 -0700 Subject: [PATCH 0/5] riscv: Add new SBI v0.2 extensions support Message-ID: <1583807731-16484-1-git-send-email-bmeng.cn@gmail.com> The SBI v0.2 introduces a base extension which is backward compatible with v0.1. Implement all helper functions and minimum required SBI calls from v0.2 for now. All other base extension function will be added later as per need. As v0.2 calling convention is backward compatible with v0.1, remove the v0.1 helper functions and just use v0.2 calling convention. 2 new Kconfig options CONFIG_SBI and CONFIG_SBI_V01 are introduced and turned on by default for S-mode U-Boot. If you want to use SBI v0.2 calling convention, turn off CONFIG_SBI_V01. This series depends on http://patchwork.ozlabs.org/project/uboot/list/?series=162772 Bin Meng (5): riscv: Mark existing SBI as v0.1 SBI riscv: Add basic support for SBI v0.2 riscv: Add SBI v0.2 extension definitions riscv: Introduce a new config for SBI v0.1 riscv: Implement new SBI v0.2 extensions arch/riscv/Kconfig | 13 +++ arch/riscv/include/asm/sbi.h | 168 +++++++++++++++++++++----------------- arch/riscv/lib/Makefile | 1 + arch/riscv/lib/sbi.c | 187 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 297 insertions(+), 72 deletions(-) create mode 100644 arch/riscv/lib/sbi.c