summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-02-18lib: Send IPI for all harts to hang on system shutdownNick Kossifidis
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 <[email protected]>
2019-02-17Makefile: Fix the assignment of OPENSBI_CC_XLENAlistair Francis
Previously OPENSBI_CC_XLEN was not being correctly assigned either 32 or 64. It also was not assigned before config.mk was parsed. Ensure that it will always be assigned. Signed-off-by: Alistair Francis <[email protected]>
2019-02-15Merge pull request #59 from avpatel/make-runAlistair Francis
Add 'make run' command for platform specific run
2019-02-15Makefile: Add 'make run' command for platform specific runOlof Johansson
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]>
2019-02-15docs: fu540: Add steps for the Microsemi Expansion boardAlistair Francis
Signed-off-by: Alistair Francis <[email protected]>
2019-02-15platform: fu540: Initial commit of Microsemi device treeAlistair Francis
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]>
2019-02-15platform: fu540: Fix missing newlineAlistair Francis
Signed-off-by: Alistair Francis <[email protected]>
2019-02-15firmware: Ensure the payloads are 4 bit allignedAlistair Francis
We expect the payloads to be 4 bit alligned as we later AND them with ~0xf. As most of the addresses are manually specified we don't really need this, but better to be over cautious. Signed-off-by: Alistair Francis <[email protected]>
2019-02-15Makefile: Make sure ld is always aware of the target abi/emulationNick Kossifidis
On Makefile merge_objs calls ld without providing any hints on the target so on a multilib toolchain for example it will always pick the default one (elf64-littleriscv) which will then result a failure when compiling on RV32 since the objects will be 32bits and the target will be 64bits. The same happens on compile_ld that calls gcc without CFLAGS so it doesn't get mabi/march. With this patch OpenSBI compiles on RV32 (PLATFORM_RISCV_XLEN=32), I tested fw_jump.elf on qemu (but it doesn't boot the kernel yet -bbl also doesn't boot the kernel so it may be something else). Signed-off-by: Nick Kossifidis <[email protected]>
2019-02-14firmware: Use CSR_<FOO> instead of <foo> for csr*Atish Patra
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. Signed-off-by: Atish Patra <[email protected]>
2019-02-14platform: Use CSR_<FOO> instead of <foo> for csr_*()Atish Patra
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]>
2019-02-14lib: Use CSR_<FOO> instead of <foo> for csr_*()Atish Patra
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]>
2019-02-14docs: Use normal hyphen instead of non-breaking hyphenAtish Patra
Usage non-breaking hyphen breaks make docs as doxygen doesn't know how to handle this. Signed-off-by: Atish Patra <[email protected]>
2019-02-12Makefile: Set ABI, ISA and Code Model in top-level makeAnup Patel
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]>
2019-02-12platform: qemu: Set FW_JUMP_ADDR and FW_PAYLOAD_OFFSET as-per XLENAnup Patel
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]>
2019-02-12platform: template: Improve comments for FW_JUMP_ADDR and FW_PAYLOAD_OFFSETAnup Patel
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]>
2019-02-08docs: improve library usage documentDamien Le Moal
Clarify the libraries descriptions. Signed-off-by: Damien Le Moal <[email protected]>
2019-02-08docs: platform guide updatesDamien Le Moal
Clarify platform support description. Also fix some Typos, grammar and document style. Signed-off-by: Damien Le Moal <[email protected]>
2019-02-08top: README.md updatesDamien Le Moal
Clarify OpenSBI components explanation. Signed-off-by: Damien Le Moal <[email protected]>
2019-02-08Makefile: Ensure lgcc is includedAlistair Francis
This fixes errors like this: undefined reference to `__umoddi3' when buildilng for 32-bit systems Signed-off-by: Alistair Francis <[email protected]>
2019-02-08firmware: Use lw instead of lwu for 32-bit architecturesAlistair Francis
Signed-off-by: Alistair Francis <[email protected]>
2019-02-08platform: clint: Allow running on 32-bit systemsAlistair Francis
Signed-off-by: Alistair Francis <[email protected]>
2019-02-08sbi_emulate_csr: Shift sbi_timer_value directlyAlistair Francis
csr_val is a tartget length based variable, so on 32-bit devices it's only 32-bits. To avoid clearing the entire register perform both steps in a single line. Signed-off-by: Alistair Francis <[email protected]>
2019-02-08platform: qemu/virt: Move kernel start address to 4MB allignedAlistair Francis
In order to support 32-bit guests move the start address to a 4MB allignment. As 64-bit kernels have a requirement on being 2MB alligned let's just make this the default for both 32 and 64 bit kernels. Signed-off-by: Alistair Francis <[email protected]>
2019-02-08platform: template: Move kernel start address to 4MB allignedAlistair Francis
In order to support 32-bit guests move the start address to a 4MB allignment. As 64-bit kernels have a requirement on being 2MB alligned let's just make this the default for both 32 and 64 bit kernels. Signed-off-by: Alistair Francis <[email protected]>
2019-02-08platform/qemu/virt: Dynamically calculate xlenAlistair Francis
The QEMU virt machine can be either 32 or 66 bit. Don't hard code the CPU bit length and instead let the compiler determine it. Signed-off-by: Alistair Francis <[email protected]>
2019-02-08sbi_ecall: Fix logical OR to be bitwise ORAlistair Francis
Signed-off-by: Alistair Francis <[email protected]>
2019-02-06firwmare: don't expand macros in FW_PAYLOAD_PATHAndreas Schwab
Signed-off-by: Andreas Schwab <[email protected]>
2019-02-06Makefile: don't disable built-in variablesAndreas Schwab
Signed-off-by: Andreas Schwab <[email protected]>
2019-02-05Makefile: Don't rely on "echo -n"Olof Johansson
Turns out it doesn't behave as expected on MacOS, it doesn't honor -n and echoes that to the file instead. Add a slash and just let the newline be there instead. Signed-off-by: Olof Johansson <[email protected]>
2019-02-05riscv_asm.h: Use CSR_<FOO> instead of <foo> for csr_read()Olof Johansson
Some toolchains might not have all the CSRs available (as seen with GCC 7.2). So, instead use the defined CSR_ values. Signed-off-by: Olof Johansson <[email protected]>
2019-01-30docs: Update doxygen config filev0.1Anup Patel
This patch updates doxygen config file to include docs/platform_guide.md and docs/library_usage.md in generated PDF document. Signed-off-by: Anup Patel <[email protected]>
2019-01-30docs: Add library usage guideAnup Patel
This patch adds static library usage guide (i.e. docs/library_usage.md). Signed-off-by: Anup Patel <[email protected]>
2019-01-30docs: Add platform support guideAnup Patel
This patch adds initial platform support guide (i.e. docs/platform_guide.md). Signed-off-by: Anup Patel <[email protected]>
2019-01-30top: Fix typo in README.mdAnup Patel
This patch renames <platform_sub_dir> to <platform_subdir> to be consistent everywhere. Signed-off-by: Anup Patel <[email protected]>
2019-01-29docs: Add a fu540 document.Atish Patra
Add a readme guide for fu540 with different types of build & booting steps. Signed-off-by: Atish Patra <[email protected]>
2019-01-29docs: Typo fixesAtish Patra
Signed-off-by: Atish Patra <[email protected]>
2019-01-29platform: fu540: Provide a compile time option selective hart booting.Atish Patra
Currently, only hart 1 is enabled for fu540 platform to support U-boot. Introduce a compile time FU540_ENABLED_HART_MASK option so that specific harts can be selected for booting. As fu540 is a multicore, we should boot all cores by default except hart 0. Signed-off-by: Atish Patra <[email protected]>
2019-01-25include: Add separate header for OpenSBI versionAnup Patel
Currently, the OpenSBI version is in top-level Makefile so firmware linking to OpenSBI static library have no-way to know OpenSBI version. This patch moves OpenSBI version from top-level Makefile to sbi/sbi_version.h header which provides OPENSBI_VERSION_MAJOR and OPENSBI_VERSION_MINOR defines. NOTE: the SBI spec (or SBI ecall interface) version is different. The SBI spec version is provided by functions sbi_ecall_version_major() and sbi_ecall_version_minor(). Signed-off-by: Anup Patel <[email protected]>
2019-01-24docs: README.md updateDamien Le Moal
Reformat to fit lines within 80 chars, fix hyperlinks, etc. Signed-off-by: Damien Le Moal <[email protected]>
2019-01-24docs/platform: Update QEMU platforms documentationDamien Le Moal
Mostly reformating. Some minor edits. Signed-off-by: Damien Le Moal <[email protected]>
2019-01-24docs/platform: Add top level document fileDamien Le Moal
List supported platforms and point to the platform specific document. Signed-off-by: Damien Le Moal <[email protected]>
2019-01-24docs/firmware: Update FW_PAYLOAD documentationDamien Le Moal
Reformatting, typos, and various corrections. Signed-off-by: Damien Le Moal <[email protected]>
2019-01-24docs/firmware: Update FW_JUMP documentationDamien Le Moal
Reformatting, typos, and various corrections. Signed-off-by: Damien Le Moal <[email protected]>
2019-01-24docs/firmware: Add top level document fileDamien Le Moal
Provide an overview of all supported firmware files and point to each firmware type documentation file. Signed-off-by: Damien Le Moal <[email protected]>
2019-01-24docs: Contribution guideline updateDamien Le Moal
Explicitely mention that this project adheres to the Developer Certificate of Origin (DCO) and include this short text. Also reformat the file to have lines bounded at 80 chars and add some more details regarding the expected commit message format. Signed-off-by: Damien Le Moal <[email protected]>
2019-01-24top: Rename LICENSE file to COPYING.BSDDamien Le Moal
Also make sure that this file contains only the official BSD 2-clause license text, nothing else. Signed-off-by: Damien Le Moal <[email protected]>
2019-01-24platform: add template platform filesDamien Le Moal
Create commented template files to use as a base for new platforms support implementation. Signed-off-by: Damien Le Moal <[email protected]>
2019-01-24all: Update copyright header in all filesAnup patel
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 <[email protected]>
2019-01-23include: Use TRUE/FALSE as return values in sbi_platform_hart_disabled()Anup Patel
The sbi_platform_hart_disabled() returns bool hence explicitly return TRUE or FALSE instead of 1 or 0. Signed-off-by: Anup Patel <[email protected]>