On Mon, 2020-03-02 at 10:43 -0500, Sean Anderson wrote:
> On 3/2/20 4:08 AM, Rick Chen wrote:
> > Hi Sean
> >
> > > The IPI code could have race conditions in several places.
> > > * Several harts could race on the value of gd->arch->clint/plic
> > > * Non-boot harts could race with the main hart
On Fri, 2020-02-28 at 16:05 -0500, Sean Anderson wrote:
> The IPI code could have race conditions in several places.
> * Several harts could race on the value of gd->arch->clint/plic
> * Non-boot harts could race with the main hart on the DM subsystem In
> addition, if an IPI was pending when U-
On Mon, 2020-03-02 at 18:43 -0500, Sean Anderson wrote:
> On 3/2/20 6:17 PM, Lukas Auer wrote:
> > On Fri, 2020-02-28 at 16:05 -0500, Sean Anderson wrote:
> >
> > > The IPI code could have race conditions in several places.
> > > * Several harts could race on
On Tue, 2020-03-03 at 16:57 -0500, Sean Anderson wrote:
> On 3/3/20 4:53 PM, Lukas Auer wrote:
> > On Mon, 2020-03-02 at 18:43 -0500, Sean Anderson wrote:
> > > On 3/2/20 6:17 PM, Lukas Auer wrote:
> > > > Don't move this. It is intended to be run before the IPI
nged, 2 insertions(+), 1 deletion(-)
>
Reviewed-by: Lukas Auer
t; Signed-off-by: Bin Meng
> ---
>
> arch/riscv/include/asm/sbi.h | 19 ---
> 1 file changed, 12 insertions(+), 7 deletions(-)
>
Reviewed-by: Lukas Auer
.
Signed-off-by: Lukas Auer
---
board/emulation/qemu-riscv/Kconfig | 1 -
board/emulation/qemu-riscv/qemu-riscv.c | 39 -
2 files changed, 40 deletions(-)
diff --git a/board/emulation/qemu-riscv/Kconfig
b/board/emulation/qemu-riscv/Kconfig
index 7ce12018e7
the secondary hart overwriting the return address in the stack frame of
the main hart with an address that does not include valid code.
Increase the default stack size of each hart to 16KiB to avoid this
problem.
Reported-by: Aurelien Jarno
Signed-off-by: Lukas Auer
Tested-by: David
ev_read_u32(dev, "clock-frequency", (u32 *)&info->cpu_freq);
> +
> + /* First try getting the frequency from the assigned clock */
> + err = clk_get_by_index(dev, 0, &clk);
Usually, ret is used as a variable name here. I think it would actually
make the code a bit
| 2 ++
> 1 file changed, 2 insertions(+)
>
Reviewed-by: Lukas Auer
Hi Sean,
On Wed, 2020-01-15 at 17:50 -0500, Sean Anderson wrote:
> This header depended on bd_t and ulong, but did not include the appropriate
> headers.
>
> Signed-off-by: Sean Anderson
> ---
> arch/riscv/include/asm/global_data.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/ar
+ Bin, Anup, Atish
On Wed, 2020-01-15 at 17:53 -0500, Sean Anderson wrote:
> On the kendryte k210, writes to mcounteren result in an illegal instruction
> exception.
>
> Signed-off-by: Sean Anderson
> ---
> Changes for v2:
> Moved forward in the patch series
>
> arch/riscv/Kconfig | 3 +++
Hi Sean,
On Wed, 2020-01-15 at 18:04 -0500, Sean Anderson wrote:
> The Sipeed Maix series is a collection of boards built around the RISC-V
> Kendryte K210 processor. This processor contains several peripherals to
> accelerate neural network processing and other "ai" tasks. This includes a
> "KP
On Sun, 2020-01-26 at 17:12 -0500, Sean Anderson wrote:
> On 1/26/20 5:04 PM, Lukas Auer wrote:
> > asm/u-boot.h is usually included with common.h. ulong is defined in
> > linux/types.h (also included in common.h). It should be sufficient to
> > include common.h
On Sun, 2020-01-26 at 13:20 -0500, Sean Anderson wrote:
> On 1/26/20 11:34 AM, Lukas Auer wrote:
> > Hi Sean,
> > Usually, ret is used as a variable name here. I think it would actually
> > make the code a bit nicer to read here, because the clock rate is not
> > read fr
On Sun, 2020-01-26 at 17:24 -0500, Sean Anderson wrote:
> On 1/26/20 5:09 PM, Lukas Auer wrote:
> > + Bin, Anup, Atish
> >
> >
> > On Wed, 2020-01-15 at 17:53 -0500, Sean Anderson wrote:
> > > On the kendryte k210, writes to mcounteren result in an illega
On Sun, 2020-01-26 at 20:09 -0500, Sean Anderson wrote:
> On 1/26/20 5:17 PM, Lukas Auer wrote:
> > Hi Sean,
> >
> >
> > On Wed, 2020-01-15 at 18:04 -0500, Sean Anderson wrote:
> > > The Sipeed Maix series is a collection of boards built around the RISC-V
+Troy
On Mon, 2020-01-13 at 14:32 +, Pragnesh Patel wrote:
> > > > +#include
> > > > +
> > > > +u32 DENALI_PHY_DATA[1215] = {
> > > > + DENALI_PHY_00_DATA, DENALI_PHY_01_DATA,
> > > DENALI_PHY_02_DATA,
> > > > + DENALI_PHY_03_DATA, DENALI_PHY_04_DATA,
> > > DENALI_PHY_05_DATA,
> >
On Tue, 2020-01-14 at 23:12 -0600, Troy Benjegerdes wrote:
> > On Jan 13, 2020, at 4:31 PM, Lukas Auer wrote:
> >
> > +Troy
> >
> > On Mon, 2020-01-13 at 14:32 +, Pragnesh Patel wrote:
> > > > > > +#include
>
://patchwork.ozlabs.org/project/uboot/list/?series=91125
[2]: https://patchwork.ozlabs.org/patch/1039493/
[3]: https://patchwork.ozlabs.org/patch/1039082/
Lukas Auer (7):
riscv: add infrastructure for calling functions on other harts
riscv: import the supervisor binary interface header file
riscv
has its
own data structure in global data. While this is not required at the
moment (all harts are expected to boot Linux), this does allow future
expansion, where other harts may be used for monitoring or other tasks.
Signed-off-by: Lukas Auer
---
arch/riscv/Kconfig | 19
Import the supervisor binary interface (SBI) header file from Linux
(arch/riscv/include/asm/sbi.h). The last change to it was in commit
6d60b6ee0c97 ("RISC-V: Device, timer, IRQs, and the SBI").
Signed-off-by: Lukas Auer
---
arch/riscv/include/asm/
mode is already
available for CPUs that include the SiFive CLINT.
Signed-off-by: Lukas Auer
---
arch/riscv/Kconfig | 5 +
arch/riscv/lib/Makefile | 1 +
arch/riscv/lib/sbi_ipi.c | 25 +
3 files changed, 31 insertions(+)
create mode 100644 arch/riscv/lib
Signed-off-by: Lukas Auer
---
board/emulation/qemu-riscv/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/board/emulation/qemu-riscv/Kconfig
b/board/emulation/qemu-riscv/Kconfig
index 0d865acf10..b3300c64a8 100644
--- a/board/emulation/qemu-riscv/Kconfig
+++ b/board/emulation/qemu
Signed-off-by: Lukas Auer
---
arch/riscv/lib/bootm.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c
index f36b8702ef..efbd3e23e7 100644
--- a/arch/riscv/lib/bootm.c
+++ b/arch/riscv/lib/bootm.c
@@ -13,6 +13,7
functions to them using smp_call_function().
Every hart has a valid pointer to the global data structure and a 8KiB
stack by default. The stack size is set with CONFIG_STACK_SIZE_SHIFT.
Signed-off-by: Lukas Auer
---
arch/riscv/Kconfig | 12 +
arch/riscv/cpu/start.S | 102
.
Signed-off-by: Lukas Auer
---
arch/riscv/cpu/start.S | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S
index 81ea52b170..a30f6f7194 100644
--- a/arch/riscv/cpu/start.S
+++ b/arch/riscv/cpu/start.S
@@ -45,10 +45,6
Hart 0 on the SiFive FU540 is meant for monitoring tasks. It is a E51
core, whereas all other cores are U54 cores. Select hart 1 as the main
hart to run U-Boot.
Signed-off-by: Lukas Auer
---
This patch depends on the SMP support [1] and the SiFive FU540 support
patch series [2].
I have submitted
it to run standalone
applications.
Lukas Auer (6):
riscv: clarify error message on undefined exceptions
riscv: remove invalid dcache flush implementation
riscv: remove RISC-V standalone linker script
riscv: replace use of callee-saved register in standalone
riscv: support standalone
implementation and its use in all dcache-specific
functions in lib/cache.c.
This also adds a missing new line between flush_dcache_all and
flush_dcache_range in lib/cache.c.
Signed-off-by: Lukas Auer
---
This patch only removes the implementation itself and its use in
dcache-specific functions in lib/cache.c
Undefined exceptions are treated as reserved. This is not clearly
communicated to the user. Adjust the error message to clarify that a
reserved exception has occurred and add additional details.
Fixes: e8b522b ("riscv: treat undefined exception codes as reserved")
Signed-off-by:
pointer to global data.
Signed-off-by: Lukas Auer
---
examples/standalone/stubs.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c
index fadde669fa..f37d209da6 100644
--- a/examples/standalone/stubs.c
+++ b
We need to define the standalone load address to use standalone
application on qemu-riscv. Define it and set it equal to
CONFIG_SYS_LOAD_ADDR.
To not overwrite it, change the assigned of CONFIG_STANDALONE_LOAD_ADDR
in arch/riscv/config.mk to a conditional one.
Signed-off-by: Lukas Auer
Add an implementation of EXPORT_FUNC() for RV64I systems to support them
in standalone applications.
Signed-off-by: Lukas Auer
---
examples/standalone/stubs.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c
index
Standalone applications do not require a separate linker script and can
use the default linker script of the compiler instead. Remove the RISC-V
standalone linker script.
Signed-off-by: Lukas Auer
---
arch/riscv/config.mk | 1 -
examples/standalone/riscv.lds | 40
Undefined exceptions are treated as reserved. This is not clearly
communicated to the user. Adjust the error message to clarify that a
reserved exception has occurred and add additional details.
Fixes: e8b522b ("riscv: treat undefined exception codes as reserved")
Signed-off-by:
it to run standalone
applications.
Changes in v2:
- Replace patch "riscv: remove invalid dcache flush implementation" with
new patch "riscv: move the AX25-specific implementation of
flush_dcache_all"
- New patch "riscv: use invalidate/flush_*cache_range functions i
implementation of the invalidate/flush_*cache_range() functions flush
the complete data and instruction caches. It is in preparation for CPUs
with the necessary functionality for flushing a selectable memory range.
Signed-off-by: Lukas Auer
---
Changes in v2:
- New patch "riscv: use invalidate/f
ystem coherent.
The implementation of flush_dcache_all in lib/cache.c is therefore
specific to the AX25. Move it into the AX25-specific cache.c in
cpu/ax25/.
This also adds a missing new line between flush_dcache_all and
flush_dcache_range in lib/cache.c.
Signed-off-by: Lukas Auer
---
Changes
pointer to global data.
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
Tested-by: Bin Meng
---
Changes in v2: None
examples/standalone/stubs.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c
index fadde669fa
Standalone applications do not require a separate linker script and can
use the default linker script of the compiler instead. Remove the RISC-V
standalone linker script.
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
Tested-by: Bin Meng
---
Changes in v2: None
arch/riscv/config.mk
Add an implementation of EXPORT_FUNC() for RV64I systems to support them
in standalone applications.
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
Tested-by: Bin Meng
---
Changes in v2: None
examples/standalone/stubs.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a
We need to define the standalone load address to use standalone
application on qemu-riscv. Define it and set it equal to
CONFIG_SYS_LOAD_ADDR.
To not overwrite it, change the assigned of CONFIG_STANDALONE_LOAD_ADDR
in arch/riscv/config.mk to a conditional one.
Signed-off-by: Lukas Auer
Reviewed
://github.com/riscv/riscv-qemu/pull/175
[2]: https://github.com/lukasauer/riscv-pk/tree/riscv-u-boot
Lukas Auer (30):
tools: .gitignore: add prelink-riscv
riscv: ignore device tree binaries
dts: riscv: update makefile to also clean the RISC-V dts directory
riscv: rename CPU_RISCV_32/64 to
Ignore tools/prelink-riscv.
Signed-off-by: Lukas Auer
---
tools/.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/.gitignore b/tools/.gitignore
index c8cdaef90c..e5ede22842 100644
--- a/tools/.gitignore
+++ b/tools/.gitignore
@@ -24,6 +24,7 @@
/mksunxiboot
/mxsboot
/ncb
Ignore all device tree binaries in arch/riscv/dts.
Signed-off-by: Lukas Auer
---
arch/riscv/dts/.gitignore | 1 +
1 file changed, 1 insertion(+)
create mode 100644 arch/riscv/dts/.gitignore
diff --git a/arch/riscv/dts/.gitignore b/arch/riscv/dts/.gitignore
new file mode 100644
index
RISC-V defines the base integer instruction sets as RV32I and RV64I.
Rename CPU_RISCV_32 and CPU_RISCV_64 to ARCH_RV32I and ARCH_64I to match
this convention.
Signed-off-by: Lukas Auer
---
arch/riscv/Kconfig | 16
arch/riscv/lib/setjmp.S | 2 +-
configs
Signed-off-by: Lukas Auer
---
dts/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dts/Makefile b/dts/Makefile
index 9a9a3d5c98..cd6e9a968e 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -61,4 +61,4 @@ dtbs: $(obj)/dt.dtb $(obj)/dt-spl.dtb
clean-files := dt.dtb.S
CONFIG_PHYS_64BIT should be enabled on RV64I systems. Select it.
Signed-off-by: Lukas Auer
---
arch/riscv/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 7c76b4d664..b81e0d990a 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
Kconfig configuration.
Signed-off-by: Lukas Auer
---
arch/riscv/Kconfig | 9 +
1 file changed, 9 insertions(+)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index b81e0d990a..e15329c35e 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -38,6 +38,15 @@ config ARCH_RV64I
RISC-V u-boot reimplements the generic io functions from
asm-generic/io.h. Remove the redundant implementation and include the
generic io.h instead.
Signed-off-by: Lukas Auer
---
arch/riscv/include/asm/io.h | 31 +++
1 file changed, 3 insertions(+), 28 deletions
reports a
decrease in binary size of 71590 bytes.
Signed-off-by: Lukas Auer
---
arch/riscv/Makefile | 13 +
arch/riscv/config.mk | 4
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 8fb6a889d8..6fb292d0b4 100644
Signed-off-by: Lukas Auer
---
arch/riscv/lib/bootm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c
index a7a9fb921b..bc1d4b2864 100644
--- a/arch/riscv/lib/bootm.c
+++ b/arch/riscv/lib/bootm.c
@@ -38,6 +38,7 @@ int do_bootm_linux(int flag
* Call the remove function on devices with the removal flag set before
booting Linux
* Force disconnect USB devices from the host before booting Linux
* Print and add bootstage information to the device tree before booting
Linux
Signed-off-by: Lukas Auer
---
arch/riscv/lib/bootm.c | 94
Enable the -fdata-sections compiler option for RISC-V. Buildman reports
the binary size decrease from this as 8365.3 bytes.
Signed-off-by: Lukas Auer
---
arch/riscv/config.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/config.mk b/arch/riscv/config.mk
index
Move the target selection into a separate file (Kconfig.board) to avoid
clutter once we support more boards.
Signed-off-by: Lukas Auer
---
arch/riscv/Kconfig | 17 ++---
arch/riscv/Kconfig.board | 14 ++
2 files changed, 16 insertions(+), 15 deletions(-)
create
Support booting Linux (as payload of BBL) from FIT images. For this, the
default CONFIG_SYS_BOOTM_LEN is increased to 16 MB, and the environment
variables fdt_high and initrd_high are set to mark the device tree and
initrd as in-place.
Signed-off-by: Lukas Auer
---
configs/qemu
The machine trap-vector base address (mtvec) must be aligned on a 4-byte
boundary. Add the necessary align directive to trap_entry.
This patch also removes the global directive for trap_entry, which is
not required.
Signed-off-by: Lukas Auer
---
arch/riscv/cpu/start.S | 2 +-
1 file changed
The RISC-V arch incorrectly uses 32-bit instead of 64-bit variables in
several places. Fix this.
In addition, BITS_PER_LONG is set to 64 on RV64I systems.
Signed-off-by: Lukas Auer
---
arch/riscv/include/asm/io.h | 6 +++---
arch/riscv/include/asm/posix_types.h | 6 +++---
arch
as a cache flush or invalidate on simple processors,
others may only invalidate the relevant cache lines.
Signed-off-by: Lukas Auer
---
arch/riscv/lib/cache.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/riscv/lib/cache.c b/arch/riscv/lib/cache.c
index 1d67c49c2c
Hang on unhandled exceptions to prevent execution in a faulty state.
Signed-off-by: Lukas Auer
---
arch/riscv/lib/interrupts.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib/interrupts.c
index 32d0598750..3b74b76c70 100644
--- a/arch/riscv
Only the first four exception codes are defined. Add the missing
exception codes from the definition in RISC-V Privileged Architecture
Version 1.10.
Signed-off-by: Lukas Auer
---
arch/riscv/lib/interrupts.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/arch
Undefined exception codes currently lead to an out-of-bounds array
access. Prevent this by treating undefined exception codes as
"reserved".
Signed-off-by: Lukas Auer
---
arch/riscv/lib/interrupts.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch
CONFIG_INIT_CRITICAL is deprecated and not used for RISC-V. Remove it.
Signed-off-by: Lukas Auer
---
arch/riscv/cpu/start.S | 11 ---
1 file changed, 11 deletions(-)
diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S
index 88b4aaa1c0..f375a9316e 100644
--- a/arch/riscv/cpu
and medany on 64-bit
systems. This matches the configuration in Linux.
The -mcmodel compiler flag is selected according to the Kconfig
configuration.
Signed-off-by: Lukas Auer
---
arch/riscv/Kconfig | 19 +++
arch/riscv/Makefile | 7 +--
2 files changed, 24 insertions(+), 2
QEMU embeds the location of the kernel image in the device tree. Store
this address in the environment as variable kernel_start and use it in
CONFIG_BOOTCOMMAND to boot the kernel.
Signed-off-by: Lukas Auer
---
board/emulation/qemu-riscv/Kconfig | 1 +
board/emulation/qemu-riscv/qemu
Start.S uses both tabs and spaces after instructions. Fix this by only
using tabs after instructions.
Signed-off-by: Lukas Auer
---
arch/riscv/cpu/start.S | 322 -
1 file changed, 161 insertions(+), 161 deletions(-)
diff --git a/arch/riscv/cpu/start.S b
QEMU provides a device tree, which is passed to u-boot using register
a1. We are now able to directly select the device tree with the
configuration CONFIG_OF_PRIOR_STAGE. Replace the hard-coded address in
qemu-riscv with it.
Signed-off-by: Lukas Auer
---
board/emulation/qemu-riscv/qemu-riscv.c
Signed-off-by: Lukas Auer
---
include/dm/ofnode.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index 2fc9fa39a3..a7b8609cf4 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -216,6 +216,16 @@ static inline int
zero as an immediate. RISC-V has the
zero register for this purpose. Replace the immediates with the zero
register.
Signed-off-by: Lukas Auer
---
arch/riscv/cpu/start.S | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S
index
: Lukas Auer
---
arch/riscv/cpu/cpu.c | 6 ++
arch/riscv/cpu/start.S | 12 ++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
index ae57fb8313..d9f820c44c 100644
--- a/arch/riscv/cpu/cpu.c
+++ b/arch/riscv/cpu/cpu.c
@@ -6,6
Print the address of the u-boot device tree.
Signed-off-by: Lukas Auer
---
cmd/bdinfo.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index 60b438766d..a9692f7662 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -430,6 +430,8 @@ int do_bdinfo(cmd_tbl_t *cmdtp
Replace the barrier functions in arch/riscv/include/asm/io.h with those
defined in barrier.h, which is imported from Linux. This version is
modified to remove the include statement of asm-generic/barrier.h, which
is not available in u-boot or required.
Signed-off-by: Lukas Auer
---
Checkpatch
is therefore no
reason for saving a2.
Signed-off-by: Lukas Auer
---
arch/riscv/cpu/start.S | 11 ---
1 file changed, 11 deletions(-)
diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S
index f375a9316e..851a1d0870 100644
--- a/arch/riscv/cpu/start.S
+++ b/arch/riscv/cpu/start.S
Ignore tools/prelink-riscv.
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
Reviewed-by: Rick Chen
---
Changes in v2: None
tools/.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/.gitignore b/tools/.gitignore
index c8cdaef90c..e5ede22842 100644
--- a/tools/.gitignore
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
Reviewed-by: Rick Chen
---
Changes in v2: None
dts/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dts/Makefile b/dts/Makefile
index 9a9a3d5c98..cd6e9a968e 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -61,4 +61,4
RISC-V defines the base integer instruction sets as RV32I and RV64I.
Rename CPU_RISCV_32 and CPU_RISCV_64 to ARCH_RV32I and ARCH_RV64I to
match this convention.
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
Reviewed-by: Rick Chen
---
Changes in v2: None
arch/riscv/Kconfig
CONFIG_PHYS_64BIT should be enabled on RV64I systems. Select it.
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
Reviewed-by: Rick Chen
---
Changes in v2: None
arch/riscv/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 7c76b4d664
From: Bin Meng
This is now deprecated and no board is using it. Drop it.
Signed-off-by: Bin Meng
Reviewed-by: Lukas Auer
Signed-off-by: Lukas Auer
---
Changes in v2:
- New patch to replace patch "riscv: remove CONFIG_INIT_CRITICAL"
arch/nds32/cpu/n1213/star
: Lukas Auer
Reviewed-by: Bin Meng
Reviewed-by: Rick Chen
---
Changes in v2: None
arch/riscv/cpu/cpu.c | 6 ++
arch/riscv/cpu/start.S | 12 ++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
index ae57fb8313..d9f820c44c
The RISC-V arch incorrectly uses 32-bit instead of 64-bit variables in
several places. Fix this.
In addition, BITS_PER_LONG is set to 64 on RV64I systems.
Signed-off-by: Lukas Auer
---
Changes in v2:
- Remove 0-padding in the format string to avoid printing 16 digits on
RV32I systems
arch
zero as an immediate. RISC-V has the
zero register for this purpose. Replace the immediates with the zero
register.
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
Reviewed-by: Rick Chen
---
Changes in v2: None
arch/riscv/cpu/start.S | 8
1 file changed, 4 insertions(+), 4 deletions
as a cache flush or invalidate on simple processors,
others may only invalidate the relevant cache lines.
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
Reviewed-by: Rick Chen
---
Changes in v2: None
arch/riscv/lib/cache.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch
QEMU provides a device tree, which is passed to U-Boot using register
a1. We are now able to directly select the device tree with the
configuration CONFIG_OF_PRIOR_STAGE. Replace the hard-coded address in
qemu-riscv with it.
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
Reviewed-by: Rick Chen
Hang on unhandled exceptions to prevent execution in a faulty state.
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
Reviewed-by: Rick Chen
---
Changes in v2: None
arch/riscv/lib/interrupts.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib
Enable the -fdata-sections compiler option for RISC-V. Buildman reports
the binary size decrease from this as 8365.3 bytes.
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
Reviewed-by: Rick Chen
---
Changes in v2: None
arch/riscv/config.mk | 3 ++-
1 file changed, 2 insertions(+), 1
Undefined exception codes currently lead to an out-of-bounds array
access. Prevent this by treating undefined exception codes as
"reserved".
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
Reviewed-by: Rick Chen
---
Changes in v2: None
arch/riscv/lib/interrupts.c | 8 ++
Support booting Linux (as payload of BBL) from FIT images. For this, the
default CONFIG_SYS_BOOTM_LEN is increased to 16 MB, and the environment
variables fdt_high and initrd_high are set to mark the device tree and
initrd as in-place.
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
The machine trap-vector base address (mtvec) must be aligned on a 4-byte
boundary. Add the necessary align directive to trap_entry.
This patch also removes the global directive for trap_entry, which is
not required.
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
---
Changes in v2: None
and medany on 64-bit
systems. This matches the configuration in Linux.
The -mcmodel compiler flag is selected according to the Kconfig
configuration.
Signed-off-by: Lukas Auer
---
Changes in v2:
- Change ISA string construction, as suggested by Bin Meng
arch/riscv/Kconfig | 19
Only the first four exception codes are defined. Add the missing
exception codes from the definition in RISC-V Privileged Architecture
Version 1.10.
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
Reviewed-by: Rick Chen
---
Changes in v2: None
arch/riscv/lib/interrupts.c | 13
RISC-V does not guarantee that stores to instruction memory are visible
to instruction fetches (i.e. incoherent instruction caches). Invalidate
the instruction cache to ensure the kernel function pointer points to
the correct memory location.
Signed-off-by: Lukas Auer
---
Changes in v2
reports a
decrease in binary size of 71590 bytes.
Signed-off-by: Lukas Auer
---
Changes in v2:
- Change ISA string construction, as suggested by Bin Meng
arch/riscv/Makefile | 20
arch/riscv/config.mk | 4
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git
* Call the remove function on devices with the removal flag set before
booting Linux
* Force disconnect USB devices from the host before booting Linux
* Print and add bootstage information to the device tree before booting
Linux
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
---
Changes in v2
Signed-off-by: Lukas Auer
---
Changes in v2:
- Move prototype location to match the location of the function in
ofnode.c
include/dm/ofnode.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index 2fc9fa39a3..92539b8b5f 100644
--- a
Kconfig configuration.
Signed-off-by: Lukas Auer
---
Changes in v2:
- Replace the description of RISCV_ISA_C with that of the Linux kernel,
as suggested by Bin Meng
arch/riscv/Kconfig | 11 +++
1 file changed, 11 insertions(+)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index
detects the kernel properties in the device
tree and ignores the Linux payload as a result.
Work around this issue by clearing the kernel properties in the device
tree before booting Linux.
Signed-off-by: Lukas Auer
---
Changes in v2:
- New patch
board/emulation/qemu-riscv/Kconfig | 1
RISC-V U-Boot reimplements the generic io functions from
asm-generic/io.h. Remove the redundant implementation and include the
generic io.h instead.
Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
Reviewed-by: Rick Chen
---
Changes in v2: None
arch/riscv/include/asm/io.h | 31
The labels nmi_vector, trap_vector and handle_reset in start.S are not
used for RISC-V. Remove them.
Signed-off-by: Lukas Auer
---
Changes in v2:
- Drop removal of code that stores the contents of a2; this broke the
board ax25-ae350. The code will be removed again in a future patch.
arch
QEMU embeds the location of the kernel image in the device tree. Store
this address in the environment as variable kernel_start and use it in
CONFIG_BOOTCOMMAND to boot the kernel. Use the device tree passed by the
prior boot stage to boot Linux.
Signed-off-by: Lukas Auer
---
Changes in v2
1 - 100 of 246 matches
Mail list logo