- Jan 09, 2023
-
-
Himanshu Chauhan authored
With the finer permission semantics, the region access permissions must be displayed separately for M and SU mode. Signed-off-by:
Himanshu Chauhan <hchauhan@ventanamicro.com> Reviewed-by:
Anup Patel <anup@brainfault.org> Tested-by:
Anup Patel <anup@brainfault.org>
-
Himanshu Chauhan authored
Use the fine grained permission bits to decide if the region permissions are to be enforced on all modes. Also use the new permission bits for deciding on R/W/X bits in pmpcfg register. Signed-off-by:
Himanshu Chauhan <hchauhan@ventanamicro.com> Reviewed-by:
Anup Patel <anup@brainfault.org> Tested-by:
Anup Patel <anup@brainfault.org>
-
Himanshu Chauhan authored
Change the zero flag to M-mode R/W/X flag for the firmware region. Signed-off-by:
Himanshu Chauhan <hchauhan@ventanamicro.com> Reviewed-by:
Anup Patel <anup@brainfault.org> Tested-by:
Anup Patel <anup@brainfault.org>
-
Himanshu Chauhan authored
Use the fine grained permisssion semantics for address validation of a given region. Signed-off-by:
Himanshu Chauhan <hchauhan@ventanamicro.com> Reviewed-by:
Anup Patel <anup@brainfault.org> Tested-by:
Anup Patel <anup@brainfault.org>
-
Himanshu Chauhan authored
Split the permissions for M-mode and SU-mode. This would help if different sections of OpenSBI need to be given different permissions and if M-mode has different permisssions than the SU-mode over a region. Signed-off-by:
Himanshu Chauhan <hchauhan@ventanamicro.com> Reviewed-by:
Anup Patel <anup@brainfault.org> Tested-by:
Anup Patel <anup@brainfault.org>
-
Bin Meng authored
The RISC-V convention for the privilege mode is capital letter, like 'M-mode', instead of 'm-mode'. Signed-off-by:
Bin Meng <bmeng@tinylab.org> Reviewed-by:
Atish Patra <atishp@rivosinc.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Bin Meng authored
'priv' argument of sbi_hsm_hart_start() and sbi_hsm_hart_suspend() may mislead people to think it stands for 'privilege mode', but it is not. Change it to 'arg1' to clearly indicate the a1 register. Signed-off-by:
Bin Meng <bmeng@tinylab.org> Reviewed-by:
Samuel Holland <samuel@sholland.org> Tested-by:
Samuel Holland <samuel@sholland.org> Reviewed-by:
Atish Patra <atishp@rivosinc.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
- Jan 07, 2023
-
-
Wei Liang Lim authored
Add Starfive JH7110 platform implementation Signed-off-by:
Wei Liang Lim <weiliang.lim@starfivetech.com> Reviewed-by:
Chee Hong Ang <cheehong.ang@starfivetech.com> Reviewed-by:
Jun Liang Tan <junliang.tan@starfivetech.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Wei Liang Lim authored
We add a generic platform override callback to allow platform specific firmware init. Signed-off-by:
Wei Liang Lim <weiliang.lim@starfivetech.com> Reviewed-by:
Chee Hong Ang <cheehong.ang@starfivetech.com> Reviewed-by:
Jun Liang Tan <junliang.tan@starfivetech.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Anup Patel authored
We add a generic platform override callback to allow platform specific selection of cold boot HART. Signed-off-by:Anup Patel <apatel@ventanamicro.com>
-
Anup Patel authored
We add an optional cold_boot_allowed() platform callback which allows platform support to decide which HARTs can do cold boot initialization. If this platform callback is not available then any HART can do cold boot initialization. Signed-off-by:Anup Patel <apatel@ventanamicro.com>
-
- Jan 06, 2023
-
-
Bin Meng authored
commit 6dde4358 ("lib: utils/sys: Extend HTIF library to allow custom base address") forgot to update do_tohost_fromhost() codes for RV32, which still accesses the HTIF registers using the ELF symbol address directly. Fixes: 6dde4358 ("lib: utils/sys: Extend HTIF library to allow custom base address") Signed-off-by:
Bin Meng <bmeng@tinylab.org> Tested-by:
Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Rahul Pathak authored
-N option coalesce all sections into single LOAD segment which causes data and other sections to have executable permission causing warning with new binutils ld 2.39. New ld emits warning when any segment have all three permissions RWX. ld.bfd: warning: test.elf has a LOAD segment with RWX permissions ld.bfd: warning: fw_dynamic.elf has a LOAD segment with RWX permissions ld.bfd: warning: fw_jump.elf has a LOAD segment with RWX permissions ld.bfd: warning: fw_payload.elf has a LOAD segment with RWX permissions This option was added in below commit - commit: eeab92f2 ("Makefile: Convert to a more standard format") Removing -N option allows to have text and rodata into one LOAD segment and other sections into separate LOAD segment which prevents RWX permissions on single LOAD segment. Here X == E Current LOAD 0x0000000000000120 0x0000000080000000 0x0000000080000000 0x000000000001d4d0 0x0000000000032ed8 RWE 0x10 -N removed LOAD 0x0000000000001000 0x0000000080000000 0x0000000080000000 0x00000000000198cc 0x00000000000198cc R E 0x1000 LOAD 0x000000000001b000 0x000000008001a000 0x000000008001a000 0x00000000000034d0 0x0000000000018ed8 RW 0x1000 Signed-off-by:
Rahul Pathak <rpathak@ventanamicro.com> Reviewed-by:
Anup Patel <anup@brainfault.org> Tested-by:
Samuel Holland <samuel@sholland.org>
-
Bin Meng authored
C language standard uses true/false for the boolean type. Let's switch to that for better language compatibility. Signed-off-by:
Bin Meng <bmeng@tinylab.org> Reviewed-by:
Anup Patel <anup@brainfault.org> Reviewed-by:
Samuel Holland <samuel@sholland.org> Tested-by:
Samuel Holland <samuel@sholland.org>
-
- Dec 24, 2022
-
-
Anup Patel authored
This patch updates OpenSBI version to 1.2 as part of release preparation. Signed-off-by:Anup Patel <apatel@ventanamicro.com>
-
Atish Patra authored
Since commit b28f0700 , it is possible for platforms to run perf monitoring even if mcountinhibit is not supported. Sampling still won't be possible though as it requires sscofpmf extension. Update the docs to remove the restriction. Signed-off-by:
Atish Patra <atishp@rivosinc.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Conor Dooley authored
event-to-mhpmevent was deprecated and replaced by riscv,event-to-mhpmevent, but a reference remains to the old name. Replace it with the new one. Signed-off-by:
Conor Dooley <conor.dooley@microchip.com> Reviewed-by:
Atish Patra <atishp@rivosinc.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Conor Dooley authored
The first PMU binding example does not terminate properties with a ;, which is invalid. Noticed while converting the binding to yaml. Signed-off-by:
Conor Dooley <conor.dooley@microchip.com> Reviewed-by:
Bin Meng <bmeng@tinylab.org> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
- Dec 17, 2022
-
-
Icenowy Zheng authored
As we already added the quirk for lacking mtime register to MTIMER driver, add T-Head C9xx CLINT compatible to it and wire the quirk. Signed-off-by:
Icenowy Zheng <uwu@icenowy.me> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Icenowy Zheng authored
T-Head developers surely have a different understanding of time CSR and CLINT's mtime register with SiFive ones, that they did not implement the mtime register at all -- as shown in openC906 source code, their time CSR value is just exposed at the top of their processor IP block and expects an external continous counter, which makes it not overrideable, and thus mtime register is not implemented, even not for reading. However, if CLINTEE is not enabled in T-Head's MXSTATUS extended CSR, these systems still rely on the mtimecmp registers to generate timer interrupts. This makes it necessary to implement T-Head C9xx CLINT support in OpenSBI MTIMER driver, which skips implementing reading mtime register and falls back to default code that reads time CSR. Add a quirk into MTIMER driver, which represents a mtime register is lacking and time CSR value should be used instead. Signed-off-by:
Icenowy Zheng <uwu@icenowy.me> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Icenowy Zheng authored
Althoug the MTIMER part of a C9xx CLINT differs from a SiFive one, the MSWI part is compliant. Add T-Head C9xx CLINT compatible string to fdt_ipi_mswi code, sharing the same codepath with SiFive CLINT. Signed-off-by:
Icenowy Zheng <uwu@icenowy.me> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Bin Meng authored
Currently the context save/restore helpers writes/reads the provided array using an index whose maximum value is determined by PLIC, which potentially may disagree with the caller to these helpers. Add a parameter to ask the caller to provide the size limit of the array to ensure no out-of-bound access happens. Signed-off-by:
Bin Meng <bmeng@tinylab.org> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Bin Meng authored
plic->num_src holds the number of interrupt sources without interrupt source 0 but the interrupt enable register includes a bit for the interrupt source 0 in the first word. Fixes: 415ecf28 ("lib: irqchip/plic: Add context save/restore helpers") Signed-off-by:
Bin Meng <bmeng@tinylab.org> Reviewed-by:
Anup Patel <anup@brainfault.org> Reviewed-by:
Samuel Holland <samuel@sholland.org>
-
Bin Meng authored
The number of interrupt enable register in words was once correct, but was wrongly changed to have an off-by-one error since commit 8c362e7d ("lib: irqchip/plic: Factor out a context init function"). Fixes: 8c362e7d ("lib: irqchip/plic: Factor out a context init function") Signed-off-by:
Bin Meng <bmeng@tinylab.org> Reviewed-by:
Anup Patel <anup@brainfault.org> Reviewed-by:
Samuel Holland <samuel@sholland.org>
-
Bin Meng authored
Currently the priority save/restore helpers writes/reads the provided array using an index whose maximum value is determined by PLIC, which potentially may disagree with the caller to these helpers. Add a parameter to ask the caller to provide the size limit of the array to ensure no out-of-bound access happens. Signed-off-by:
Bin Meng <bmeng@tinylab.org> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Bin Meng authored
Interrupt source 0 is reserved. Hence the irq should start from 1. Fixes: 2b79b694 ("lib: irqchip/plic: Add priority save/restore helpers") Signed-off-by:
Bin Meng <bmeng@tinylab.org> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
- Dec 12, 2022
-
-
Lad Prabhakar authored
This patch adds documentation to build Renesas RZ/Five (R9A07G043F) SoC. Signed-off-by:
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Lad Prabhakar authored
This commit provides basic support for the Renesas RZ/Five (R9A07G043F) SoC. The RZ/Five microprocessor includes a single RISC-V CPU Core (Andes AX45MP) 1.0 GHz, 16-bit DDR3L/DDR4 interface. Supported interfaces include: - Gigabit Ethernet 2ch - CAN interface (CAN-FD) 2ch - USB 2.0 interface 2ch - SD interface 2ch - AD converter 2ch Useful links: ------------- Links: https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-mpus/rzfive-risc-v-general-purpose-microprocessors-risc-v-cpu-core-andes-ax45mp-single-10-ghz-2ch-gigabit-ethernet Links: http://www.andestech.com/en/products-solutions/andescore-processors/riscv-ax45mp/ Signed-off-by:
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Lad Prabhakar authored
Add compatible string for Andestech NCEPLIC100 found on Renesas RZ/Five SoC which is equipped with AX45MP AndesCore. While at it drop the comma after the sentinel as it does not make sense to have a comma after a sentinel, as any new elements must be added before the sentinel. dts example (Single-core AX45MP): soc: soc { .... plic: interrupt-controller@12c00000 { compatible = "renesas,r9a07g043-plic", "andestech,nceplic100"; #interrupt-cells = <2>; #address-cells = <0>; riscv,ndev = <511>; interrupt-controller; reg = <0x0 0x12c00000 0 0x400000>; clocks = <&cpg CPG_MOD R9A07G043_NCEPLIC_ACLK>; power-domains = <&cpg>; resets = <&cpg R9A07G043_NCEPLIC_ARESETN>; interrupts-extended = <&cpu0_intc 11 &cpu0_intc 9>; }; .... }; Signed-off-by:Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by:
Anup Patel <anup@brainfault.org> Reviewed-by:
Bin Meng <bmeng@tinylab.org>
-
Lad Prabhakar authored
Add FDT driver for Renesas SCIF. dts example: soc: soc { .... scif0: serial@1004b800 { compatible = "renesas,scif-r9a07g043", "renesas,scif-r9a07g044"; reg = <0 0x1004b800 0 0x400>; interrupts = <412 IRQ_TYPE_LEVEL_HIGH>, <414 IRQ_TYPE_LEVEL_HIGH>, <415 IRQ_TYPE_LEVEL_HIGH>, <413 IRQ_TYPE_LEVEL_HIGH>, <416 IRQ_TYPE_LEVEL_HIGH>, <416 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "eri", "rxi", "txi", "bri", "dri", "tei"; clocks = <&cpg CPG_MOD R9A07G043_SCIF0_CLK_PCK>; clock-names = "fck"; power-domains = <&cpg>; resets = <&cpg R9A07G043_SCIF0_RST_SYSTEM_N>; status = "disabled"; }; .... }; Signed-off-by:Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Lad Prabhakar authored
Add Renesas SCIF driver. Based on a patch in the BSP by Takeki Hamada <takeki.hamada.ak@bp.renesas.com> Link: https://github.com/renesas-rz/rz_opensbi/commits/work/OpenSBI-PMA Signed-off-by:
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
- Dec 11, 2022
-
-
Himanshu Chauhan authored
Not all systems have bash at a fixed location like /bin/bash. FreeBSD, for example, would typically have it at /usr/local/bin/bash. When building OpenSBI on freebsd system, the build breaks. Its advisable to use: #!/usr/bin/env bash Signed-off-by:
Himanshu Chauhan <hchauhan@ventanamicro.com> Reviewed-by:
Xiang W <wxjstz@126.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
- Dec 09, 2022
-
-
Himanshu Chauhan authored
As per section 3.7.2 of RISC-V Privileged Specification, PMP settings must be synchronized with the virtual memory system after PMP settings have been written. Signed-off-by:
Himanshu Chauhan <hchauhan@ventanamicro.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Heinrich Schuchardt authored
After determining cpu_offset we have to check this value. Addresses-Coverity-ID: 1529706 ("Logically dead code") Signed-off-by:Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Xiang W <wxjstz@126.com> Reviewed-by:
Atish Patra <atishp@rivosinc.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Heinrich Schuchardt authored
If fdt_getprop() returns NULL, this indicates an error. In this case lenp is set to an error code. But even if lenp = 0 we should not continue. If fdt_getprop() returns a wider value than we expect this is a separate error condition. In both cases the device-tree is invalid. Addresses-Coverity-ID: 1529703 ("Dereference after null check") Signed-off-by:Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Xiang W <wxjstz@126.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Heinrich Schuchardt authored
For 'reg->order == __riscv_xlen' the term 'BIT(reg->order)' is undefined. Addresses-Coverity-ID: 1529706 ("Bad bit shift operation") Signed-off-by:Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Xiang W <wxjstz@126.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Lad Prabhakar authored
It makes sense to use fdt_match_node() instead of fdt_find_match() in fw_platform_lookup_special() as we already have the start offset to search from. Signed-off-by:
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
- Dec 05, 2022
-
-
Sergey Matyukevich authored
Update .gitignore for vim swap files. Signed-off-by:
Sergey Matyukevich <sergey.matyukevich@syntacore.com> Reviewed-by:
Bin Meng <bmeng@tinylab.org> Reviewed-by:
Xiang W <wxjstz@126.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Lad Prabhakar authored
Add a helper function fdt_fixup_node() based on the compatible string. This will avoid code duplication for every new node fixup being added. Signed-off-by:
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by:
Bin Meng <bmeng@tinylab.org> Reviewed-by:
Xiang W <wxjstz@126.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
-
Yu Chien Peter Lin authored
The andes-specific files have been moved to generic platform so we can drop this line. Signed-off-by:
Yu Chien Peter Lin <peterlin@andestech.com> Reviewed-by:
Bin Meng <bmeng@tinylab.org> Reviewed-by:
Anup Patel <anup@brainfault.org>
-