davidmetz
efc32d0cab
Fix CPI calcualtion for -s option ( #192 )
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
6 years ago
Andrew Waterman
6fa3555cc5
Enable vector unit if present (continuation of 77a5df5694)
6 years ago
Luís Marques
92d3a34a9b
Add --help ( #179 )
7 years ago
Luís Marques
43969b149e
Implement dup3 syscall ( #162 )
7 years ago
Luís Marques
99d6d0a93f
Make performance counters always 64 bits wide ( #178 )
This prevents the counters from easily overflowing for a 32-bit pk.
7 years ago
Luís Marques
099c99482f
Only accept statically linked binaries ( #176 )
7 years ago
Gabriel L. Somlo
ff71b88278
configure: Add option to set physical memory start address
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>
7 years ago
Andrew Waterman
cb253a3f97
Allow up to 2 KiB of arguments
Closes #161
7 years ago
Andrew Waterman
97b683ed3c
Fix build with newer newlib
7 years ago
Luís Marques
a1c125dde7
Stub out madvise syscall ( #145 )
7 years ago
Luís Marques
31e531b2b4
Implement clock_gettime syscall ( #139 )
7 years ago
Andrew Waterman
dca89b7e45
Page-align the writable data section
For eventual PMP purposes
7 years ago
Andrew Waterman
474d787f1b
Clean up linker scripts a bit
7 years ago
wxjstz
41ff94a84c
Add some exception handling functions to s-mode to handle exception return from m-mode. ( #117 )
8 years ago
Andrew Waterman
16476bd821
Properly license all nontrivial files
8 years ago
Andrew Waterman
f2aaee46b9
Enable FPU in PK, regardless of FPU presence
Otherwise, the emulation code will refuse to emulate FP instructions.
8 years ago
Andrew Waterman
e5846a2bc7
Bump the Linux version PK claims to support
This makes it more compatible with recent glibc.
8 years ago
Andrew Waterman
3d921d3c76
Bump encoding.h
8 years ago
Palmer Dabbelt
d1849cb5e3
Remove the platform interface
We now automatically detect everything that the platform interface used
to be used for, so it's now obsolete!
9 years ago
Palmer Dabbelt
9204785053
Detect harts that can't boot Linux instead of hard-coding them
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.
9 years ago
Andrew Waterman
4c64de3213
Order __page_alloc before writing vmrs
9 years ago
Andrew Waterman
fb4e31229f
Stub out sys_prlimit64
9 years ago
Palmer Dabbelt
9037b1d9f2
Add a platform interface
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.
9 years ago
Andrew Waterman
0f0ac647fe
Increase PK stack size to 3% of memory, up to 8 MiB
9 years ago
Andrew Waterman
3473915b3a
Separate page faults from physical memory access exceptions
9 years ago
Wesley W. Terpstra
96965a8cc6
pk: does not use dtb
9 years ago
Wesley W. Terpstra
23ab37ad78
SBI: a0+a1 hold hartid+dtb pointer between boot loader stages
9 years ago
Andrew Waterman
7d60c5904f
Allow PK access to user memory
9 years ago
Andrew Waterman
34979b9345
Fix PK boot
9 years ago
Andrew Waterman
f6bca6e35b
Don't block for acks on console writes
9 years ago
Andrew Waterman
926b360655
WIP towards ECALL interface for SBI
9 years ago
Andrew Waterman
611290ccde
Cleanly separate HTIF code; don't poll keyboard on timer interrupt
9 years ago
Andrew Waterman
f6b2274af4
avoid non-standard predefined macros
9 years ago
Andrew Waterman
e5ed1d115c
Add ability to hard-code an initial environment
10 years ago
Andrew Waterman
8039c6cacb
For RV32, mmap offset is in 4 KiB increments
10 years ago
Andrew Waterman
55ce524e74
Cap pk memory size to 2 GiB for RV32
10 years ago
Andrew Waterman
ff807a20bd
Fix ld.so load address at 4 KiB
10 years ago
Andrew Waterman
558039d546
Add syscall stubs to get through libpthread initializers
10 years ago
Andrew Waterman
c6b55ce3a8
Acquire write permissions before zeroing page in ELF loader
f81b722bf0 is a regression. If a
read-only segment does not begin on a page boundary, it would cause
the ELF loader to blow up.
10 years ago
Howard Mao
f81b722bf0
make sure pages for ELF sections have correct protection ( #40 )
10 years ago
Andrew Waterman
4a6b20595a
Add -p flag to pk to disable demand paging
10 years ago
Sagar Karandikar
f73dee6f2c
add htif section in linker script, with ALIGNs to prevent MMIO and data from being placed on same page ( #32 )
10 years ago
Andrew Waterman
0a7862c79f
when -s is passed, print time, instret, cycle, and CPI
10 years ago
Andrew Waterman
7520a47419
Disallow execution of RVC binaries on non-RVC pk
10 years ago
Andrew Waterman
55982bd019
Align pk trap_entry for RVC
10 years ago
Andrew Waterman
6bead31951
zero-extend RV32 physical addresses for HTIF
10 years ago
Andrew Waterman
d88671efdf
Remove uarch counters
We'll re-add support for the generic performance counter facility once
it exists.
10 years ago
Andrew Waterman
f6eff20106
Udpate to new PTE format
10 years ago
Andrew Waterman
7389e46cd0
Move DRAM to high addresses
10 years ago
Garret Kelly
1baf122e28
pk: proxy chdir syscall to fesvr
10 years ago