Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Previously, the pk would always run from virtual address MEM_START.
Instead, remap it into the negative virtual addresses, allowing user
processes to expand beyond MEM_START.
|
|
|
|
Return the old brk if mmap fails, rather than just asserting out
|
|
Estimate available memory and return -1 from mmap if not enough
is available, rather than assert-failing.
|
|
This will improve flexibility going forward.
|
|
Enforced with sstatus.SUM.
|
|
|
|
Tested using the RocketChip CPU option.
(see https://github.com/enjoy-digital/litex)
Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
|
|
|
|
|
|
|
|
|
|
Remove use of copy_stat() from sys_fstatat
|
|
The system call should return the stat struct in kernel format, not
libc format.
|
|
Big endian
|
|
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.
|