aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-11-11pk: Fix pushing of argc to match linux kernel behaviourMarcus Comstedt1-3/+3
The linux kernel pushes argc as an int, not an uintptr_t. (The offset to the next element is still sizeof(uintptr_t).)
2020-11-11fdt: Skip byteorder swap on big endianMarcus Comstedt1-0/+5
2020-10-31Disable device tree filter when load a dts from file (#219)Yan7-1/+60
* add device tree in elf, using --with-dts to add the absolute path of device tree * Disable device tree filter * Remove *.dtb dependence, when the --with-dts option is not used
2020-10-30Revert "Disable device tree filter when load a dts from file (#217)"Andrew Waterman7-54/+1
This reverts commit a161e6f3ef31004e47a5b94b85c2e84b764f8637. Resolves #218
2020-10-29Disable device tree filter when load a dts from file (#217)Yan7-1/+54
* add device tree in elf, using --with-dts to add the absolute path of device tree * Disable device tree filter
2020-08-07make htif_poweroff thread-safe (#211)Howard Mao1-2/+3
2020-07-31Don't perform 64-bit accesses to the PLIC (#205)Alexander Richardson3-7/+7
Recent QEMU will fault for 8-byte accesses. Use a uint32_t instead of uintptr_t to avoid those problems.
2020-07-18Fix UART register map (#208)Nicholas O'Brien1-1/+3
While it's unused upstream, according to the SiFive FU540 document, the UART divisor register is at offset 0x18. This also maps the interrupt enable and interrupt pending register offsets.
2020-06-07Consistently use fdt_string_list for FDT compatible property (#202)Jessica Clarke3-3/+3
QEMU's finisher is "sifive,test1\0sifive,test0\0syscon" so we fail to detect it currently. Instead, search the entire list, and for completeness do the same with the HTIF and SiFive UART drivers.
2020-04-28Use correct offset for bbl.bin with non-default MEM_START (#187)Jessica Clarke1-1/+1
2020-04-28Support --without-payload for OpenSBI fw_jump-style booting (#186)Jessica Clarke3-6/+25
We expect the firmware to load the external payload at the second megapage, and that there is space to put the filtered FDT at 0x2200000 past the start of memory. With a default MEM_START of 0x80000000, this matches the standard OpenSBI values for FW_JUMP_ADDR and FW_JUMP_FDT_ADDR of 0x80400000/0x80200000 (RV32/RV64) and 0x82200000 respectively, so payloads linked for one should work with the other.
2020-03-29Update encoding.h from riscv-opcodes (#194)Kito Cheng1-246/+1573
- Update to riscv-opcodes/231c5d58940113b006aa9fa22f47c18d5fac4123
2020-03-16Fix CPI calcualtion for -s option (#192)davidmetz1-1/+1
This attempt at rounding leads to wrong results, for example: 314689951 cycles 314690101 instructions 0.90 CPI With my change results in: 314689951 cycles 314690101 instructions 0.99 CPI I think this was supposed to be part of rounding behaviour but it doesn't work if only the final digit does it and there is no carry... Instead I changed it to truncate after the second digit
2020-02-02Support manually zeroing out BSS when booting (#188)James Clarke4-1/+38
Some ELF loaders, in particular gdb's load command for dynamically loading files into memory, which is often used to load binaries onto FPGAs over JTAG, do not zero out BSS, leaving the memory in whatever state it was previously in. Thus, introduce a new --enable-zero-bss configure flag, which will include code to zero out BSS when booting.
2020-01-13Enable vector unit if present (continuation of ↵Andrew Waterman3-3/+8
77a5df569451571d608650a34183d53df99790ec)
2020-01-11Enable vector unit if presentAndrew Waterman2-0/+5
2019-12-09Added --with-abi configure option (#183)Nick Knight3-4/+27
* Added --with-abi configure option * Revised to preserve original semantics when user specifies --with-arch but not --with-abi or when the user specifies --with-arch but not --host.
2019-12-06Only prohibit float32-only when FP emulation is enabledAndrew Waterman3-7/+22
2019-11-06Support a subset of 16750 functionality, and improve baud rate selection (#182)Jonathan Kimmitt1-3/+15
2019-10-31fdt: allow mmu type "riscv,32" on rv32 systems (#177)Gokturk Yuksek1-0/+4
SV32 is presented in RISC-V Privileged Architecture Manual (version 20190608-Priv-MSU-Ratified) Section 4.3 for RV32 systems. However, BBL responds to sv32 with: hart_filter_mask saw unknown hart type: status="okay", mmu_type="riscv,sv32" and hangs. This patch is adopted from the original 'riscv-pk.diff' patch written by Fabrice Bellard, distributed as part of the following tarball: https://bellard.org/tinyemu/diskimage-linux-riscv-2018-09-23.tar.gz Closes: https://github.com/riscv/riscv-pk/issues/160
2019-10-23Add --help (#179)Luís Marques1-14/+35
2019-10-22Implement dup3 syscall (#162)Luís Marques4-0/+32
2019-10-22text-modification: delete a word 'and' in README.md (#115)dskwe1-1/+1
2019-10-22Merge pull request #150 from lsgunth/build_fixesAndrew Waterman2-5/+11
Build fixes
2019-10-22Make performance counters always 64 bits wide (#178)Luís Marques5-21/+93
This prevents the counters from easily overflowing for a 32-bit pk.
2019-10-18Add user write permissions to installed filesAndrew Waterman1-2/+2
2019-10-01Only accept statically linked binaries (#176)Luís Marques2-0/+4
2019-08-14Merge pull request #172 from riscv/versionPalmer Dabbelt2-26/+14
Mark PK as version 1.0.0
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-03-22Always build bbl.binLogan Gunthorpe2-3/+9
bbl.bin is necessary for booting on hardware and is created by a simple objcopy line. It's much more convienent for riscv-pk to create this file then to expect the user to know to do it or to dig through the SDK's makefile to learn that it's required. Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
2019-03-22Disable compiler protections featuresLogan Gunthorpe1-2/+2
The riscv compiler available in Ubuntu enables stack protection and FORTIFY source by default which breaks the build. Adding -fno-stack-protector and -U_FORTIFY_SOURCE to the tool flags fixes this without any side effects. The compiler available in debian do not have these protections enabled and work with or without the extra flag. Fixes: #105 Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
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