- Jun 05, 2020
-
-
Anup Patel authored
The make rule for builtin DTB compilation does not consider out-of-tree platforms so this patch fixes it. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
- May 23, 2020
-
-
Anup Patel authored
We can have multiple matching DT nodes of the same FDT timer driver so in this case we should call cold_init() for all matching DT nodes instead of just first matching DT node. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
We can have multiple matching DT nodes of the same FDT ipi driver so in this case we should call cold_init() for all matching DT nodes instead of just first matching DT node. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
We add fdt_parse_clint_node() function which will be used by fdt_ipi_clint and fdt_timer_clint drivers to parse CLINT details from DT node. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
We extend CLINT cold init function to have a "struct clint_data *" parameter pointing to CLINT details. This allows platforms to use CLINT functions for multiple CLINT instances. When multiple CLINTs are present, the platform can also provide one of the CLINT as reference CLINT for other CLINTs. This will help CLINTs to sync their time value with reference CLINT using a time_delta computed in warm init function. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
We can have multiple matching DT nodes of the same FDT irqchip driver so in this case we should call cold_init() for all matching DT nodes instead of just first matching DT node. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
We extend fdt_find_match() implementation by adding node offset parameter which represents the first node to match from. The improved fdt_find_match() can be used to find multiple match nodes. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
We extend all PLIC functions to have a "struct plic_data *" parameter pointing to PLIC details. This allows platforms to use these functions for multiple PLIC instances. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
The "target_hart" and "hart_count" parameters of PLIC cold and warm init functions are only used for sanity checks and not required in PLIC initialization. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
- May 19, 2020
-
-
Daniel Schaefer authored
Cc: Abner Chang <abner.chang@hpe.com> Signed-off-by:
Daniel Schaefer <git@danielschaefer.me> Reviewed-by:
Anup Patel <anup.patel@wdc.com>
-
Anup Patel authored
It is not mandatory for a RISC-V systems to implement all PMP regions so we have to check all PMPADDRx CSRs to determine excat number of supported PMP regions. Signed-off-by:Anup Patel <anup.patel@wdc.com>
-
Anup Patel authored
This patch does few cosmetic improvements to HART feature detection: 1. Remove sbi_ perfix from HART feature detection functions because all local/static functions in sbi_hart.c don't have sbi_ prefix 2. Remove sbi_hart_set_feature() because it's quite small and local/static in sbi_hart.c Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
It makes more sense to have scratch pointer as parameter in HART feature APIs because: 1. We already have scratch pointer at places where these APIs are used. 2. This is consistent with lot of other APIs in sbi_hart.h Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
On platforms with continuous HART ids starting from zero: 0 <= boot HART id < platform HART count The above co-relation of boot HART id and platform HART count is true for most RISC-V platfors so it's better to print platform HART count just before boot HART id. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
We remove extra spaces from boot time prints. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
We do following improvements for get_feature_str(): 1. We should return "none" from get_feature_str() no features available instead of sbi_boot_prints() explicitly handling failure. 2. We don't need to return failure (just like misa_xlen()) because we are returning "none" for no features and we are truncating output when space is not available. 3. Based on 1 and 2, the sbi_boot_prints() can be further simplified. 4. No need for two char[] in sbi_boot_prints() Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
We should detect HART features in sbi_hart_init() before mstatus_init(), delegate_traps() and pmp_init(). Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
- May 18, 2020
-
-
Daniel Schaefer authored
Signed-off-by:
Daniel Schaefer <git@danielschaefer.me> Reviewed-by:
Anup Patel <anup.patel@wdc.com>
-
- May 16, 2020
-
-
Atish Patra authored
Currently, unprivileged access functions uses few additional instructions which are redundant. It also uses specific registers which are not necessary. Remove those additional instructions and let the compiler choose the registers. Signed-off-by:
Atish Patra <atish.patra@wdc.com> Reviewed-by:
Anup Patel <anup.patel@wdc.com>
-
- May 10, 2020
-
-
Atish Patra authored
We have now clear distinction between platform and hart features. Modify the boot print messages to print hart specific features in a string format. Signed-off-by:
Atish Patra <atish.patra@wdc.com> Tested-by:
Jonathan Balkind <jbalkind@cs.princeton.edu> Reviewed-by:
Anup Patel <anup.patel@wdc.com>
-
Atish Patra authored
We have now clear distinction between platform and hart features. Modify the boot print messages to print platform features in a string format. In the process, this patch moved relatively larger functions to its own file from platform.h header file. Signed-off-by:
Atish Patra <atish.patra@wdc.com> Tested-by:
Jonathan Balkind <jbalkind@cs.princeton.edu> Reviewed-by:
Anup Patel <anup.patel@wdc.com>
-
Atish Patra authored
As per the RISC-V specification, time value can be obtained from a time CSR implemented in hardware or a MMIO based IP block. Qemu virt machine already supports timer csr while CLINT provides the timer for other platforms. Implement a hart specific timer feature that can be detected at runtime. As CSR based timer implementation are faster than MMIO address based, it is always preferred over MMIO based one. Signed-off-by:
Atish Patra <atish.patra@wdc.com> Tested-by:
Jonathan Balkind <jbalkind@cs.princeton.edu> Reviewed-by:
Anup Patel <anup.patel@wdc.com>
-
Atish Patra authored
Any platform feature that belongs to a hart, have already been moved to hart features and are detected at run time. The remaining platform features are identical to platform default features. Use the platform default features instead of defining a separate copy of it. Signed-off-by:
Atish Patra <atish.patra@wdc.com> Tested-by:
Jonathan Balkind <jbalkind@cs.princeton.edu> Reviewed-by:
Anup Patel <anup.patel@wdc.com>
-
Atish Patra authored
PMP & performance counters belong to a hart rather than a platform. In addition to that, these features enable reading/writing from a particular csr. Thus, they can be detected and set at runtime rather than compile time. Move PMP/MCOUNTEREN/SCOUNTEREN features to hart and detect them at runtime. Signed-off-by:
Atish Patra <atish.patra@wdc.com> Tested-by:
Jonathan Balkind <jbalkind@cs.princeton.edu> Reviewed-by:
Anup Patel <anup.patel@wdc.com>
-
Atish Patra authored
There may be some features which are hart specific rather than a platform specific feature. Add a framework to support that. Signed-off-by:
Atish Patra <atish.patra@wdc.com> Tested-by:
Jonathan Balkind <jbalkind@cs.princeton.edu> Reviewed-by:
Anup Patel <anup.patel@wdc.com>
-
Atish Patra authored
As per RISC-V ISA, pmp is not mandatory. Currently, we only add reserved memory node in DT only if PMP is present. That allows supervisor to access the memory where OpenSBI continue to exist without realizing it for non-pmp based platforms. It may result in corrupting OpenSBI. That's why OpenSBI should at least let the supervisor know where it continue to exist. This a best effort service provided by OpenSBI expecting that supervisor software is not buggy and properly sets up its memory after parsing the reserved-memory device tree node. Signed-off-by:
Atish Patra <atish.patra@wdc.com> Reviewed-by:
Anup Patel <anup.patel@wdc.com>
-
Atish Patra authored
There may be few common mathematics helper functions which can be used anywhere in OpenSBI project. Add a separate math helper function file to add these functions. Signed-off-by:
Atish Patra <atish.patra@wdc.com> Reviewed-by:
Anup Patel <anup.patel@wdc.com>
-
Atish Patra authored
As RISC-V ISA allows many CSRs such as pmp, s/mcounteren to be optional in hardware, OpenSBI should provide an option to dynamically detect these csr access capability at run time. Implement a csr read/write access check helper macros. Signed-off-by:
Atish Patra <atish.patra@wdc.com> Tested-by:
Jonathan Balkind <jbalkind@cs.princeton.edu> Reviewed-by:
Anup Patel <anup.patel@wdc.com>
-
Atish Patra authored
Unprivileged trap handler can be reused for any cases where the executing code expects a trap. Rename it to "expected" trap handler as it will be used in other cases in future. Signed-off-by:
Atish Patra <atish.patra@wdc.com> Tested-by:
Jonathan Balkind <jbalkind@cs.princeton.edu> Reviewed-by:
Anup Patel <anup.patel@wdc.com>
-
- May 07, 2020
-
-
Anup Patel authored
Doxygen does not support italic text in page title so fix some of the markdown files accordingly. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
Currently, all markdown pages are randomly arranged in table of contents so to fix this we treat top-level README.md as mainpage and enable Doxygen TREEVIEW. Also, there should not be any text before title of a markdown page so we move project copyright as separate section in top-level README.md. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
We add platform requirements document to clarify OpenSBI expectations from a RISC-V platform. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com> Reviewed-by:
Bin Meng <bin.meng@windriver.com>
-
Anup Patel authored
The generic platform provides IPI and timer functionality based on DT node provided in the FDT passed by previous booting stage. This patch updates generic platform documentation about IPI and timer expectations. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Bin Meng <bin.meng@windriver.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
The generic platform will try to select serial console based on the stdout-path DT property in /chosen DT node hence we document this. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Bin Meng <bin.meng@windriver.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
The RISC-V ISA string does not follow alphabetical order. Instead, we have a RISC-V specific ordering of extensions in the RISC-V ISA string. This patch improves misa_string() implementation to return a valid RISC-V ISA string. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
The HFENCE VVMA instructions flushes TLB based on the VMID present in HGATP CSR. To handle this, we get the current VMID for SBI HFENCE VVMA call and we use this current VMID to do remote TLB HFENCE VVMA on desired set of HARTs. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
Anup Patel authored
We don't have page table programming in OpenSBI so let's remove redundant page table related defines from riscv_encoding.h. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Atish Patra <atish.patra@wdc.com>
-
- May 04, 2020
-
-
Anup Patel authored
The links to some of the platforms were missing in platform.md file hence this patch. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Bin Meng <bin.meng@windriver.com> Reviewed-by:
Alistair Francis <alistair.francis@wdc.com>
-
Anup Patel authored
The OpenSBI generic platform works perfectly fine on the QEMU spike machine and Spike emulator so let's remove dedicated Spike platform from OpenSBI. All Spike platform related documentation in OpenSBI will now suggest using OpenSBI generic platform. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Bin Meng <bin.meng@windriver.com> Reviewed-by:
Alistair Francis <alistair.francis@wdc.com>
-
Anup Patel authored
The OpenSBI generic platform works perfectly fine on the QEMU virt machine so let's remove dedicated QEMU virt machine platform from OpenSBI. All QEMU virt machine related documentation in OpenSBI will now suggest using OpenSBI generic platform. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Bin Meng <bin.meng@windriver.com> Reviewed-by:
Alistair Francis <alistair.francis@wdc.com>
-