Age | Commit message (Collapse) | Author | Files | Lines |
|
The linux kernel pushes argc as an int, not an uintptr_t.
(The offset to the next element is still sizeof(uintptr_t).)
|
|
|
|
* 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
|
|
This reverts commit a161e6f3ef31004e47a5b94b85c2e84b764f8637.
Resolves #218
|
|
* add device tree in elf, using --with-dts to add the absolute path of device tree
* Disable device tree filter
|
|
|
|
Recent QEMU will fault for 8-byte accesses. Use a uint32_t instead of
uintptr_t to avoid those problems.
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
- Update to riscv-opcodes/231c5d58940113b006aa9fa22f47c18d5fac4123
|
|
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
|
|
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.
|
|
77a5df569451571d608650a34183d53df99790ec)
|
|
|
|
* 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.
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
Build fixes
|
|
This prevents the counters from easily overflowing for a 32-bit pk.
|
|
|
|
|
|
Mark PK as version 1.0.0
|
|
Why not?
Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
|
|
allow additional ns16550a config via device tree
|
|
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.
|
|
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.
|
|
Fix bbl/pk living above 4 GiB
|
|
This supports bbl living above 4 GiB.
|
|
This allows bbl to be loaded above 4 GiB on RV64.
|
|
|
|
Building BBL for the LiteX/Rocket SoC
|
|
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>
|
|
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>
|
|
Closes #161
|
|
== is not defined in POSIX and will fail when configure
is called with shells that adhere strictly to POSIX like
dash
|
|
== 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
|
|
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.
|
|
|
|
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>
|
|
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>
|
|
|
|
openbsd related adjustments
|
|
|
|
|