| Age | Commit message (Collapse) | Author |
|
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]>
|
|
Add 'make run' command for platform specific run
|
|
Makes for easy and quick build-run one-stop command.
For now only added for qemu targets. It can be added for
any platform having simulator/emulator (such as QEMU).
Signed-off-by: Olof Johansson <[email protected]>
Signed-off-by: Anup Patel <[email protected]>
|
|
Add a device tree for th HiFive Unleashed that includes the Microsemi
PCIe root complex.
Once we have support for u-boot and in tree Linux kernel device trees
this device tree should be removed.
Signed-off-by: Alistair Francis <[email protected]>
|
|
Signed-off-by: Alistair Francis <[email protected]>
|
|
Some older toolchains may not have all the csr's defined. Update all
the csr functions to use the CSR_ #define values instead of the
toolchain defined values.
Suggested-by: Olof Johansson <[email protected]>
Signed-off-by: Atish Patra <[email protected]>
|
|
This patch introduces following optional PLATFORM options:
PLATFORM_RISCV_XLEN -> RISC-V register width
PLATFORM_RISCV_ABI -> RISC-V GCC ABI
PLATFORM_RISCV_ISA -> RISC-V GCC ISA string
PLATFORM_RISCV_CODE_MODEL -> RISC-V GCC Code Model
If the above options are not provided by platform config.mk
or by command-line parameters then:
1. PLATFORM_RISCV_XLEN will be determined using toolchain
capability
2. PLATFORM_RISCV_ABI, PLATFORM_RISCV_ISA, and
PLATFORM_RISCV_CODE_MODEL is set to value best suited for
generic libsbi.a
As a result of these optional PLATFORM options, the
platform-cflags-y and platform-asflags-y is further
simplified for platform config.mk.
Signed-off-by: Anup Patel <[email protected]>
|
|
The current 4MB aligned FW_JUMP_ADDR and FW_PAYLOAD_OFFSET breaks
U-Boot on QEMU virt and sifive_u machines.
Instead of using 4MB aligned for both 32bit and 64bit systems, we
use different values based compiler XLEN. Another advantage of this
approach will be that our fw_payload.bin will smaller for 64bit
systems.
Signed-off-by: Anup Patel <[email protected]>
|
|
Both FW_JUMP_ADDR and FW_PAYLOAD_OFFSET, should be:
1. 4MB aligned for 32bit system
2. 2MB aligned for 64bit system
Explicitly specify the above details in config.mk comments
for template platform.
Signed-off-by: Anup Patel <[email protected]>
|
|
Signed-off-by: Alistair Francis <[email protected]>
|