| Age | Commit message (Collapse) | Author |
|
It should be "aligned".
Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
|
|
For testing 32-bit SiFive specific drivers with QEMU riscv32, add
32-bit specific FW_JUMP_FDT_ADDR and FW_PAYLOAD_OFFSET.
Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
|
|
This patch removes stale options from config.mk files of
Ariane FPGA and QEMU virt platform support.
Signed-off-by: Anup Patel <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
|
|
This patch adds initial platform support Spike emulator.
Signed-off-by: James Clarke <[email protected]>
Signed-off-by: Anup Patel <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
|
|
This adds sifive/fu540 specific QEMU run command.
Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
|
|
With QEMU v4.2 RISC-V changes to improve the emulation fidelity
of 'sifive_u' machine, OpenSBI v0.4 / U-Boot v2019.10 / Linux
kernel v5.3 images built for the SiFive HiFive Unleashed board
can be used out of the box without any special hack. Hence there
is no need for us to continue supporting such a special target in
OpenSBI. Going forward, sifive/fu540 platform can be used on both
real hardware and QEMU 'sifive_u' machine.
Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
|
|
It was reported that tlb range flush is not working on fu540.
Only tlb full flush seems to work on fu540 probably due to some
hardware errata.
Set the tlb flush limit to zero so that all tlb flush requests
are converted to full flush.
Signed-off-by: Atish Patra <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
|
|
If a platform requires to perform a tlb full flush, they should set
the tlb_range_flush_limit value to zero. However, corresponding platform
API ignore the value and continue to return the default value.
Add a platform ops to retrieve platform specific tlb range flush limit.
The platform variable becomes redundant in presence of the platform ops.
Take this opportunity to remove the variable as well.
The default is still set to smallest page size in RISC-V (4KB), as there
is no way to figure out a best value for all platforms. Individual platform
should set it to the optimal value for their platform.
Signed-off-by: Atish Patra <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
|
|
In the QEMU [1] there was a change of the UART base addresses for
sifive_u machine to match the hardware. Make corresponding changes in
the opensbi for qemu/sifive_u platform.
[1] https://git.qemu.org/?p=qemu.git;a=commitdiff;h=4b55bc2b5f7ff065da5d2b813ee5153c598d3764
Signed-off-by: Nikita Ermakov <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
|
|
This patch does minor typo fix in system reboot/shutdown names
in platform operations.
Signed-off-by: Jiuyang Liu (Sequencer) <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Signed-off-by: Anup Patel <[email protected]>
|
|
Since all harts share the same plic/clint address now, setting
them during cold boot is just fine.
Signed-off-by: Liu Yibin <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
|
|
Since all harts share the same L2 cache now, there's
no need to Enable L2 cache in warm boot.
Signed-off-by: Liu Yibin <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
|
|
T-head c910 is a generic FPGA platform so we cannot
define PMP configuration for it in OpenSBI because
PMP configuration tend to be SOC specific.
Signed-off-by: Liu Yibin <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
|
|
This commit provides basic support for the Thead/C910 platform.
Signed-off-by: Liu Yibin <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
|
|
It is possible to have a CLINT implementation which supports
only 32bit MMIO accesses on RV64 system so this patch extends
our CLINT driver such that platform code can specify whether
CLINT supports 64bit MMIO access.
Signed-off-by: Anup Patel <[email protected]>
Reviewed-by: Atish Patra<[email protected]>
Reviewed-by: Zong Li <[email protected]>
|
|
Commit 9dfe72057957 ("kendryte/k210: remove sysctl code") missed
removing the file sysctl.c. Fix this here.
Fixes: 9dfe72057957 ("kendryte/k210: remove sysctl code")
Signed-off-by: Damien Le Moal <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
|
|
Currently, the tlb range flush threshold is fixed and set to 4k for
all platforms. However, it should be platform specific as it completely
depends upon how platform actually implements sfence instruction.
Define a platform feature that allows every individual platform to set
different values. If a platform doesn't define it, just use a page size as
the threshold.
Signed-off-by: Atish Patra <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
|
|
Directly implement frequency discovery, making the sysctl code
unnecessary. While at it, Move all macro definitions from platform.c
into platform.h and cleanup that file, removing the need for the
Apache 2.0 license and Canaan Inc copyright.
Signed-off-by: Damien Le Moal <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
|
|
The Kendryte K210 UARTHS is compatible with SiFive UART. So use the
sifive uart driver and remove the k210 uarths platform code.
Signed-off-by: Damien Le Moal <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
|
|
This commit provides basic support for the AE350 platform.
Signed-off-by: Zong Li <[email protected]>
Signed-off-by: Nylon Chen <[email protected]>
|
|
OpenSBI manages outstanding TLB flush requests by queueing
them in a fifo synchronously. An ipi sync which uses an
atomic operation on MMIO address is no longer required.
Remove the ipi sync method from platform header and all usage.
Signed-off-by: Atish Patra <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
|
|
We should expand the FDT size before any patching, otherwise it's
possible the "status" fix up might fail due to insufficient space.
Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
|
|
There are several places in the source tree that have:
32bit, 32 bit, 64bit, 64 bit
Fix by using the conventional names with a hyphen.
Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Lukas Auer <[email protected]>
Acked-by: Anup Patel <[email protected]>
|
|
This patch changes FW_xyz_FDT_ADDR to RAM_START+128MB (i.e. 0x88000000)
so that next stage bootloader (i.e. U-Boot) has enough space to unpack
bigger kernel images.
Reported-by: David Abdurachmanov <[email protected]>
Signed-off-by: Anup Patel <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: David Abdurachmanov <[email protected]>
Tested-by: David Abdurachmanov <[email protected]>
|
|
Per device tree spec, the standard value string for the "status"
property of a cpu node is either "okay" or "disabled". "masked"
was once used but it is unfortunately a spec violation.
Signed-off-by: Bin Meng <[email protected]>
Acked-by: Anup Patel <[email protected]>
|
|
The Linux kernel will maintain the device tree (DT) for HiFive Unleashed
from release v5.2-rc6. This DT is incompatible with previous DT
present for Microsemi expansion board in OpenSBI.
Since, OpenSBI will directly load the pre-built DTB from kernel now onwards,
no need to keep the out-of-date DT in openSBI. Remove this DT and
it's related documentation.
Signed-off-by: Atish Patra <[email protected]>
Acked-by: Anup Patel <[email protected]>
|
|
Add version control of sbi_platform structure
- Add opensbi_version, this gives information of opensbi revision on
which the sbi_platform table was created.
- Add platform_version field in sbi_platform structure for platform
level version control.
Signed-off-by: Abner Chang <[email protected]>
Acked-by: Anup Patel <[email protected]>
|
|
Move platform opensbi functions to sbi_platform_operations structure.
Both sbi_platform and sbi_platform_operations structures are maintained
by platform vendors.
Signed-off-by: Abner Chang <[email protected]>
Acked-by: Anup Patel <[email protected]>
|
|
This patch adds support for Ariane platform.
We needed to enable PLIC interrupts early(like on BBL) due to some issue of the design.
Otherwise, Linux would not get any external interrupts.
Signed-off-by: Panagiotis Peristerakis <[email protected]>
|
|
The drivers and libfdt are built as libsbiutils.a
instead of libplatsbi.a.
libsbiutils.a are not built per platform specific. Thus,
enable all drivers by default.
Signed-off-by: Atish Patra <[email protected]>
Acked-by: Anup Patel <[email protected]>
|
|
Currently, platform/common contains platform/non-platform specific
common minimal drivers and libraries. This is helpful is all platforms
are built within opensbi framework.
Move them to lib/utils so that any external platform code also can
reuse the minimalistic drivers or other common libraries.
This patch doesn't introduce any functional changes.
Signed-off-by: Atish Patra <[email protected]>
Acked-by: Anup Patel <[email protected]>
|
|
libsbi needs some of the custom libc functions. It should be directly
included in libsbi instead of platform specific libraries.
Signed-off-by: Atish Patra <[email protected]>
Acked-by: Anup Patel <[email protected]>
|
|
Since QEMU commit 8b1d0714bfdd
"riscv: sifive_u: Allow up to 4 CPUs to be created",
the maximum number of hart for sifive_u is 4.
Change our hart count to match that.
Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
|
|
This patch enables FW_DYNAMIC option (i.e. dynamic firmware) for
all appropriate/applicable platforms.
Signed-off-by: Anup Patel <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
|
|
Signed-off-by: Xiang Wang <[email protected]>
|
|
Noisy commit, no functional changes.
Generated with an current upstream clang-format and:
clang-format -i $(find . -name \*.[ch])
Signed-off-by: Olof Johansson <[email protected]>
|
|
One of the shortcomings of clang-format is that it doesn't allow
for aligned define tables, which is used for a number of constants.
Add annotation to disable the automatic formatting where needed.
Signed-off-by: Olof Johansson <[email protected]>
|
|
Add an empty clang-format to disable reformatting of imported code and
make it easier to merge in upstream changes of that project over time.
Signed-off-by: Olof Johansson <[email protected]>
|
|
This patch extends our current build-system for building platform
sources which are not part of OpenSBI sources.
For example:
Let's say we have out-of-tree ABC platform sources. We place these
sources under <XYZ>/ABC directory along with its config.mk and
objects.mk.
To build out-of-tree ABC platform from OpenSBI directory:
$ make PLATFORM_DIR=<XYZ>/ABC
OR
$ make PLATFORM_DIR=<XYZ> PLATFORM=ABC
To build out-of-tree ABC platform from <XYZ>/ABC directory:
$ make PLATFORM_DIR=<XYZ>/ABC -C <path_to_opensbi>
OR
$ make PLATFORM_DIR=<XYZ> PLATFORM=ABC -C <path_to_opensbi>
Signed-off-by: Anup Patel <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
|
|
Add missing SPDX and copyright information.
Signed-off-by: Damien Le Moal <[email protected]>
|
|
The codes that currently program the interrupt enable register for
S-mode disagrees with what the comments say. Fix the comments.
While we are here, add one line comment to describe what is done
for M-mode too.
Signed-off-by: Bin Meng <[email protected]>
|
|
Per PLIC spec, interrupt ID 0 is defined to mean "no interrupt".
We should bypass it.
Signed-off-by: Bin Meng <[email protected]>
|
|
At present plic_set_priority() ignores the 'source' and the priority
register to be programmed is constant. Fix it.
Signed-off-by: Bin Meng <[email protected]>
|
|
There are some spaces or mixed usage of spaces and tabs in the macro
definition. Change to use tab consistently.
Signed-off-by: Bin Meng <[email protected]>
|
|
platform should be a read-only variable, if it is placed in the data
segment, it may be exploited.
Signed-off-by: Xiang Wang <[email protected]>
|
|
As per the current SBI specification, sbi_getc should return
an int instead of char.
In case of FIFO is empty, return -1 as per the specification.
Reported-by: Sergi Granell <[email protected]>
Suggested-by:Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Atish Patra <[email protected]>
|
|
|
|
|
|
There was a space instead of '_' in the function `platform_final_init`.
|
|
In order for QEMU to be compatible with Spike, it implements
a simple protocol used for reporting back the simulation's
status, through the memory-mapped "test finisher" device. We
use that protocol to make QEMU exit on system shutdown.
Signed-off-by: Nick Kossifidis <[email protected]>
|