aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-08-14Mark PK as version 1.0.0v1.0.0Palmer Dabbelt2-26/+14
Why not? Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
2019-08-14Merge pull request #171 from ipatix/masterAndrew Waterman3-14/+54
allow additional ns16550a config via device tree
2019-08-12allow additional ns16550a config via device treeMichael Panzlaff3-14/+54
This commit makes bbl read some additional fields from the device tree if it detects an ns16550a: - reg-shift - reg-offset - clock-frequency For explanation of these check out the Linux Kernel doc: https://www.kernel.org/doc/Documentation/devicetree/bindings/serial/8250.txt In particular this allows the Xilinx AXI UART 16550 to act as serial console with bbl and the Linux early boot console. This also fixes a bug in which bbl will ignore any other than the first "compatible" string when iterating over the nodes. Previously this line would not have worked: compatible = "xlnx,xps-uart16550-2.00.a", "ns16550a"; Before bbl would have just checked the first field instead of checking all strings in the list.
2019-08-12Prevent memset from calling itselfAndrew Waterman1-0/+5
With -ftree-loop-distribute-patterns, GCC detects that the body of memset is equivalent to memset, and so turns it into a call to memset, causing infinite recursion. Closes #170.
2019-07-17Merge pull request #168 from riscv/fix-code-above-4gAndrew Waterman3-96/+96
Fix bbl/pk living above 4 GiB
2019-07-17Make illegal-instruction jump table entries relative to their baseAndrew Waterman2-77/+77
This supports bbl living above 4 GiB.
2019-07-17Use pointer-sized entries in trap tableAndrew Waterman1-19/+19
This allows bbl to be loaded above 4 GiB on RV64.
2019-07-05Report correct scause when faulting while fetching emulated instructionAndrew Waterman2-7/+26
2019-06-11Merge pull request #163 from gsomlo/gls-litexAndrew Waterman6-4/+30
Building BBL for the LiteX/Rocket SoC
2019-06-11configure: Add option to set physical memory start addressGabriel L. Somlo5-3/+28
For systems where physical memory is mapped to a start address different from 0x80000000, allow the default to be overridden using the --with-mem-start argument to the configure script. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2019-06-11Check for 'U' extension before accessing 'mcounteren' CSRGabriel L. Somlo1-1/+2
On 64-bit Rocket with 'DefaultFPGAConfig' (using 'WithNSmallCores'), the 'U' extension is not supported, and accessing 'mcounteren' would trigger an 'Illegal Instruction' trap. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2019-05-09Allow up to 2 KiB of argumentsAndrew Waterman1-1/+4
Closes #161
2019-04-15bbl/bbl.ac: use = instead of == for comparing equality (#158)maxice81-2/+2
== is not defined in POSIX and will fail when configure is called with shells that adhere strictly to POSIX like dash
2019-04-14configure.ac: use = instead of == to check for equality (#157)maxice81-1/+1
== is not specified by POSIX and will fail if a POSIX shell is called which is done by the configure script. Related to: https://github.com/void-linux/void-packages/issues/10949
2019-04-14Update configure option for 32-bit (#156)ak-fau1-1/+1
configure script does not support --enable-32bit option since June 2018 (commit c3cf29a8f2f5f6a0b793bd1f24b083a759370a01). The right step to enable 32-bit support in pk is to provide '--with-arch=rv32i' option to configure.
2019-03-24Fix build with newer newlibAndrew Waterman2-2/+3
2019-02-28Stub out madvise syscall (#145)Luís Marques2-0/+2
2019-02-04Merge pull request #143 from hakrdinesh/masterAndrew Waterman2-1/+10
openbsd related adjustments
2019-02-04openbsd build stepsDinesh Thirumurthy1-0/+9
2019-02-04openbsd has bash in /usr/local/binDinesh Thirumurthy1-1/+1
2019-01-25Protect BBL data, not just textAndrew Waterman1-2/+2
h/t @michaeljclark
2019-01-15Revert "Don't require a RISC-V libc and crt when configuring (#132)" (#140)Andrew Waterman3-3/+1
This reverts commit a02257a861a4d13f31868a27c197cfc5576101e1.
2019-01-04Don't require a RISC-V libc and crt when configuring (#132)James Clarke3-1/+3
2019-01-04Implement clock_gettime syscall (#139)Luís Marques1-1/+10
2019-01-04Protect M-mode memory from S-modeAndrew Waterman1-0/+47
2019-01-04Set up PMP earlier, so it can be overridden laterAndrew Waterman2-5/+3
2019-01-04Page-align the writable data sectionAndrew Waterman2-4/+6
For eventual PMP purposes
2019-01-04Clean up linker scripts a bitAndrew Waterman2-14/+3
2018-12-02Delegate misaligned AMOs as access exceptions, not misalignedAndrew Waterman1-2/+8
This indicates the access is actually invalid, i.e., should not be emulated.
2018-12-02Revert "Avoid writing reserved values to pmpaddr CSR"Andrew Waterman1-2/+1
This reverts commit 7bee30c1ff56975041ffc67cd0170d7477aba865. All ones is no longer "reserved", so the old code is OK.
2018-11-21Merge pull request #134 from lsgunth/ie_words_fixPalmer Dabbelt1-1/+2
Fix the calculation for the number of interrupt enable words
2018-11-20Fix the calculation for the number of interrupt enable wordsLogan Gunthorpe1-1/+2
The number of interrupt enable words should be the number of devices divided by the number of bits per word (not the number of bytes per word) and it should round up. Without this fix, when using a larger number of interrupts, the user will see a number of errors in qemu of the form: plic: invalid register write: %08x Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
2018-11-07Merge pull request #114 from zongbox/mabiPalmer Dabbelt1-6/+3
Fix stubs-lp64.h/stubs-lp64d.h/stubs-ilp32.h/stubs-ilp32d.h not found
2018-09-23Avoid writing reserved values to pmpaddr CSRAndrew Waterman1-1/+2
2018-09-17Fix git-submodule fatal error for berkeley-softfloat-3Michael Clark1-0/+0
A portend from git-submodule: $ git submodule update --init --recursive fatal: No url found for submodule path 'softfloat/berkeley-softfloat-3' in .gitmodules
2018-09-17Add softfloat/README.md detailing sourceMichael Clark1-0/+10
2018-08-15Fix printm on RV32 (#119)Andrew Waterman1-0/+16
Use a proxy syscall instead of a blocking character write. Resolves #84
2018-08-06Add some exception handling functions to s-mode to handle exception return ↵wxjstz1-0/+28
from m-mode. (#117)
2018-08-03Merge pull request #104 from heshamelmatary/disable_vmPalmer Dabbelt7-1/+57
bbl: boot payload in machine mode on --enable-boot-machine
2018-07-26Fix stubs-lp64.h/stubs-lp64d.h/stubs-ilp32.h/stubs-ilp32d.h not foundZong Li1-6/+3
For now, we always compile files with -mabi option by using soft-fp ABI. But there are some files use the header which in toolchain, like unistd.h, stdint.h and so on. Finally, these header files include other header files which existing depend on ABI such as stubs-lp64.h or stubs-lp64d.h. So it causes the header file not found when using the double-float toolchain with soft-float ABI. Fix up by compiling files with -march and -mabi options only if there is specifying the --with-arch option at configure time. If use the --with-arch option at configure time, that means your toolchain has multi-lib support, so always building riscv-pk by soft-float ABI is fine. Otherwise, we don't compile files with specifying march and mabi options explicitly
2018-07-12minit: Move pmp setup code to a separate function to avoid duplicating codeHesham Almatary1-11/+7
Currently it's being used by both enter_supervisor_mode and enter_machine_mode
2018-07-12bbl: boot payload in machine mode when --enable-boot-machine is passedHesham Almatary4-0/+37
2018-07-12configure: Add --enable-boot-machine in BBLHesham Almatary3-0/+23
If --enable-boot-machine is passed, BBL disables VM and runs the payload in machine mode. This is useful for payloads (e.g. RTOSes or other OSes) that want to run only in machine mode while still relying on bbl/pk for system calls and emulation
2018-07-11Merge pull request #113 from riscv/licensePalmer Dabbelt394-5549/+33859
Upgrade SoftFloat
2018-07-11Merge pull request #91 from bukinr/masterPalmer Dabbelt1-1/+1
Include .bss section to the binary so dtb_output() gets full size of payload
2018-07-11Merge pull request #103 from zongbox/commentPalmer Dabbelt1-1/+1
Correct the comment of timer interrupt
2018-07-11Upgrade to SoftFloat 3eAndrew Waterman388-5544/+33807
2018-07-10Fix license on f32_classify and f64_classify (I wrote them)Andrew Waterman2-2/+2
2018-07-10Don't look for riscv_logo.txt if logo is not enabledAndrew Waterman3-3/+19
2018-07-10License my ASCII RISC-V logoAndrew Waterman1-0/+31