Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2021-05-18 | Add 2-stage translation (for debugging purposes only)remap | Andrew Waterman | 5 | -0/+91 | |
2021-05-18 | Add __early_pgalloc_align; refactor __early_alloc to use it | Andrew Waterman | 1 | -3/+11 | |
2021-05-18 | Fix range check | Andrew Waterman | 1 | -2/+3 | |
2021-05-07 | pk: make breakpoints fatal | Andrew Waterman | 1 | -2/+1 | |
Resolves #216 | |||||
2021-05-05 | replace `spbtr` with `satp` (#241) | Saleem Abdulrasool | 1 | -1/+1 | |
The LLVM IAS currently does not support the older spelling for the CSR. Update the references to the modern name. | |||||
2021-05-05 | replace `sbadaddr` with `stval` (#243) | Saleem Abdulrasool | 1 | -1/+1 | |
This replaces use of the old `sbadaddr` CSR name with the current `stval` name. The old spelling is not supported by the LLVM IAS, however, the modern spelling is supported by both LLVM and binutils. | |||||
2021-04-28 | pk: Fix __clear_cache() compilation issue with recent compilers (#240) | Christoph Müllner | 1 | -1/+2 | |
Using recent compilers we get the following error message: ../pk/pk.c: In function 'run_loaded_program.constprop': ../pk/pk.c:177:3: error: both arguments to '__builtin___clear_cache' must be pointers 177 | __clear_cache(0, 0); | ^~~~~~~~~~~~~~~~~~~ Let's use the existing function __riscv_flush_icache(), give it a header with a prototype and use it to emits the FENCE.I instruction directly. See #239 Suggested-by: Andrew Waterman <andrew@sifive.com> Signed-off-by: Christoph Muellner <cmuellner@linux.com> | |||||
2021-03-29 | pk: vm cleanups; use narrower TLB flushes | Andrew Waterman | 1 | -9/+15 | |
2021-03-29 | pk: remove vestigial trapframe_t::insn field | Andrew Waterman | 4 | -14/+1 | |
This assumes that stval is populated with the opcode on illegal instruction exceptions. But since we're only using the opcode for error reporting, it's OK if this assumption is violated. | |||||
2021-03-29 | M-mode code doesn't need access to pk's page table | Andrew Waterman | 1 | -0/+2 | |
2021-03-29 | pk: correctly restore sstatus.SUM in strcpy_from_user | Andrew Waterman | 1 | -3/+7 | |
2021-03-26 | pk: support printk before file init | Andrew Waterman | 2 | -4/+3 | |
2021-03-26 | pk: don't init files until VM setup is complete | Andrew Waterman | 1 | -2/+2 | |
2021-03-25 | pk: refactor vm free list management | Andrew Waterman | 4 | -61/+115 | |
2021-03-25 | pk: support >2 GiB of user memory for RV64 | Andrew Waterman | 7 | -34/+76 | |
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. | |||||
2021-03-25 | Add some missing syscall stubs | Andrew Waterman | 2 | -0/+10 | |
2021-03-25 | pk: avoid assertion failures on brk syscalls | Andrew Waterman | 1 | -3/+5 | |
Return the old brk if mmap fails, rather than just asserting out | |||||
2021-03-25 | pk: avoid out-of-memory errors | Andrew Waterman | 2 | -50/+107 | |
Estimate available memory and return -1 from mmap if not enough is available, rather than assert-failing. | |||||
2021-03-25 | pk: remove linear VA mapping constraint | Andrew Waterman | 1 | -46/+83 | |
This will improve flexibility going forward. | |||||
2021-03-25 | pk: only access user memory through explicit accessors | Andrew Waterman | 9 | -77/+278 | |
Enforced with sstatus.SUM. | |||||
2021-03-25 | Add `statx` syscall (#234) | huaixv | 3 | -0/+23 | |
2020-11-29 | Remove unused file_stat, copy_stat functions | Andrew Waterman | 4 | -28/+0 | |
2020-11-29 | Remove use of copy_stat() from sys_fstat and sys_lstat (#228) | Marcus Comstedt | 1 | -2/+4 | |
2020-11-23 | use MEM_START, not DRAM_BASE, for pk mappings | Andrew Waterman | 2 | -3/+3 | |
2020-11-17 | Remove use of copy_stat() from sys_fstatat | Marcus Comstedt | 1 | -1/+1 | |
The system call should return the stat struct in kernel format, not libc format. | |||||
2020-11-11 | pk: Fix pushing of argc to match linux kernel behaviour | Marcus Comstedt | 1 | -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-03-16 | Fix CPI calcualtion for -s option (#192) | davidmetz | 1 | -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-01-13 | Enable vector unit if present (continuation of ↵ | Andrew Waterman | 1 | -1/+1 | |
77a5df569451571d608650a34183d53df99790ec) | |||||
2019-10-23 | Add --help (#179) | Luís Marques | 1 | -14/+35 | |
2019-10-22 | Implement dup3 syscall (#162) | Luís Marques | 4 | -0/+32 | |
2019-10-22 | Make performance counters always 64 bits wide (#178) | Luís Marques | 4 | -18/+77 | |
This prevents the counters from easily overflowing for a 32-bit pk. | |||||
2019-10-01 | Only accept statically linked binaries (#176) | Luís Marques | 2 | -0/+4 | |
2019-06-11 | configure: Add option to set physical memory start address | Gabriel L. Somlo | 1 | -1/+1 | |
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-05-09 | Allow up to 2 KiB of arguments | Andrew Waterman | 1 | -1/+4 | |
Closes #161 | |||||
2019-03-24 | Fix build with newer newlib | Andrew Waterman | 2 | -2/+3 | |
2019-02-28 | Stub out madvise syscall (#145) | Luís Marques | 2 | -0/+2 | |
2019-01-04 | Implement clock_gettime syscall (#139) | Luís Marques | 1 | -1/+10 | |
2019-01-04 | Page-align the writable data section | Andrew Waterman | 1 | -1/+2 | |
For eventual PMP purposes | |||||
2019-01-04 | Clean up linker scripts a bit | Andrew Waterman | 1 | -4/+1 | |
2018-08-06 | Add some exception handling functions to s-mode to handle exception return ↵ | wxjstz | 1 | -0/+28 | |
from m-mode. (#117) | |||||
2018-07-09 | Properly license all nontrivial files | Andrew Waterman | 7 | -0/+14 | |
2018-04-24 | Enable FPU in PK, regardless of FPU presence | Andrew Waterman | 1 | -1/+1 | |
Otherwise, the emulation code will refuse to emulate FP instructions. | |||||
2018-02-01 | Bump the Linux version PK claims to support | Andrew Waterman | 1 | -1/+1 | |
This makes it more compatible with recent glibc. | |||||
2017-12-12 | Bump encoding.h | Andrew Waterman | 1 | -1/+1 | |
2017-11-03 | Remove the platform interface | Palmer Dabbelt | 2 | -1/+1 | |
We now automatically detect everything that the platform interface used to be used for, so it's now obsolete! | |||||
2017-11-02 | Detect harts that can't boot Linux instead of hard-coding them | Palmer Dabbelt | 1 | -0/+1 | |
This checks to see if a hart can't boot Linux by looking for a compatible "mmu-type" field. If the hart can't boot Linux, then bbl masks it off. | |||||
2017-10-19 | Order __page_alloc before writing vmrs | Andrew Waterman | 1 | -2/+6 | |
2017-08-29 | Stub out sys_prlimit64 | Andrew Waterman | 2 | -0/+2 | |
2017-08-02 | Add a platform interface | Palmer Dabbelt | 1 | -0/+1 | |
SiFive's pk fork is the second one I've had to maintain, and it's a huge pain because people keep just leaving changes all over the tree. I want to introduce an interface that the platform-specific details can live behind so I don't have to keep doing these painful merges. | |||||
2017-04-18 | Increase PK stack size to 3% of memory, up to 8 MiB | Andrew Waterman | 1 | -1/+1 | |