- Nov 26, 2018
-
-
Lukas Auer authored
Store the hart ID and device tree passed by the prior boot stage (in a0 and a1) in registers s0 and s1. Replace one use of s1 in start.S to avoid overwriting it. The device tree is also stored in memory to make it available to U-Boot with the configuration CONFIG_OF_PRIOR_STAGE. Signed-off-by:
Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Rick Chen <rick@andestech.com>
-
Lukas Auer authored
The mstatus CSR includes WPRI (writes preserve values, reads ignore values) fields and must therefore not be set to zero without preserving these fields. It is not apparent why mstatus is set to zero here since it is not required for U-Boot to run. Remove it. This instruction and others encode 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 <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Rick Chen <rick@andestech.com>
-
Lukas Auer authored
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 <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Bin Meng authored
This is now deprecated and no board is using it. Drop it. Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Signed-off-by:
Lukas Auer <lukas.auer@aisec.fraunhofer.de>
-
Lukas Auer authored
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 <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Lukas Auer authored
start.S uses both tabs and spaces after instructions. Fix this by only using tabs after instructions. Signed-off-by:
Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Rick Chen <rick@andestech.com>
-
Lukas Auer authored
Implement the functions invalidate_icache_range() and invalidate_icache_all(). RISC-V does not have instructions for explicit cache-control. The functions in this patch are implemented with the memory ordering instruction for synchronizing the instruction and data streams. This may be implemented as a cache flush or invalidate on simple processors, others may only invalidate the relevant cache lines. Signed-off-by:
Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Rick Chen <rick@andestech.com>
-
Lukas Auer authored
Hang on unhandled exceptions to prevent execution in a faulty state. Signed-off-by:
Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Rick Chen <rick@andestech.com>
-
Lukas Auer authored
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 <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Rick Chen <rick@andestech.com>
-
Lukas Auer authored
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 <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Rick Chen <rick@andestech.com>
-
Lukas Auer authored
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 <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Rick Chen <rick@andestech.com>
-
Lukas Auer authored
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 <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Rick Chen <rick@andestech.com>
-
Lukas Auer authored
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 <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Lukas Auer authored
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 <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Rick Chen <rick@andestech.com>
-
Lukas Auer authored
Use the new Kconfig entries to construct the ISA string for the -march compiler flag. The -mabi compiler flag is selected based on the base integer instruction set. With this change, the C (compressed instructions) ISA extension is now enabled for all boards with CONFIG_RISCV_ISA_C set. Buildman reports a decrease in binary size of 71590 bytes. Signed-off-by:
Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Lukas Auer authored
Add Kconfig entries for the C (compressed instructions) and A (atomic instructions) ISA extensions. Only the C ISA extension is selectable. This matches the configuration in Linux. The Kconfig entries are not used yet. A follow-up patch will select the appropriate compiler flags based on the Kconfig configuration. Signed-off-by:
Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Lukas Auer authored
CONFIG_PHYS_64BIT should be enabled on RV64I systems. Select it. Signed-off-by:
Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Rick Chen <rick@andestech.com>
-
Lukas Auer authored
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 <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Rick Chen <rick@andestech.com>
-
Lukas Auer authored
Signed-off-by:
Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Rick Chen <rick@andestech.com>
-
Lukas Auer authored
Ignore tools/prelink-riscv. Signed-off-by:
Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Rick Chen <rick@andestech.com>
-
- Nov 23, 2018
-
-
git://git.denx.de/u-boot-dmTom Rini authored
Various minor sandbox improvements Better buildman warning handling Misc other things
-
- Nov 21, 2018
-
-
Simon Glass authored
It is useful to obtain the block-protect setting of the SPI flash, so we know whether it is fully open or (perhaps partially) write-protected. Add a method for this. Update the sandbox driver to process this operation and add a test. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
The current test is a functional test, covering all the way from the command line to the sandbox SPI driver. This is useful, but it is easier to diagnose failures with a smaller test. Add a simple test which reads and writes data and checks that it is stored and retrieved correctly. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
At present these functions return 0 on success. For some devices we want to know how many bytes were transferred. It seems useful to adjust the API to be more like the POSIX read() and write() functions. Update these two methods, a test and all users. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Patrick Delaunay <patrick.delaunay@st.com>
-
Simon Glass authored
At present the config header is not included in this file, but it does use a CONFIG option. Fix it. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
It is useful to be able to invert the colours in some cases so that the text matches the background colour. Add a parameter to the function to support this. It is strange that function takes a private data structure from another driver as an argument. It seems better to pass the device and have the function internally work out how to find its required information. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
At present, stripped files don't have the right pathname which means that blob compression cannot be used. Fix this. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This comma is not needed. Drop it. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
When the build fails due to something wrong in binman it is sometimes useful to get a full backtrace showing the location of the failure. Add a BINMAN_DEBUG environment variable to support this along with some documentation. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
In some cases U-Boot is compressed and it is useful to be able to decompress it in SPL. Add a Kconfig and Makefile change to allow this. Note that this does not actually implement decompression. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
At present these features are supported in SPL but not TPL. Update the Kconfig and Makefile to allow this. Also add a few Makefile comments to make earier to track what is going on. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
At present sandbox drivers are mostly not used before relocation. Some of these are needed by Chromium OS verified boot, since it uses sandbox TPL, so update them accordingly. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This function is really just a call to uclass_get_device() and there is no reason why the caller cannot do it. Update sandbox and snow accordingly. Signed-off-by:
Simon Glass <sjg@chromium.org> Acked-by:
Minkyu Kang <mk7.kang@samsung.com>
-
Simon Glass authored
Add a way to read a file from the host filesystem. This can be useful for reading test data, for example. Also fix up the writing function which was not the right version, and drop the debugging lines. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
It seems useful to make sandbox its own log category since it is used for so much testing. Add this as a new category. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This is not normally useful, so change the code to avoid writing out every data package. This can be enabled with #define DEBUG. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This adds new commands to the EC related to setting and clearing events as well as controlling power-related settings. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
The LPC driver expects its buffer to be word-aligned. Add the required flag to the uclass driver to ensure this. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This value is required for flashing to work correctly. Add a check for it. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add some more logging to provide more information on failures. Signed-off-by:
Simon Glass <sjg@chromium.org>
-