aboutsummaryrefslogtreecommitdiff
path: root/pk/pk.c
AgeCommit message (Collapse)AuthorFilesLines
2021-05-18Add 2-stage translation (for debugging purposes only)remapAndrew Waterman1-0/+3
2021-04-28pk: Fix __clear_cache() compilation issue with recent compilers (#240)Christoph Müllner1-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-26pk: don't init files until VM setup is completeAndrew Waterman1-2/+2
2021-03-25pk: refactor vm free list managementAndrew Waterman1-2/+7
2021-03-25pk: support >2 GiB of user memory for RV64Andrew Waterman1-9/+27
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-25pk: only access user memory through explicit accessorsAndrew Waterman1-6/+8
Enforced with sstatus.SUM.
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-01-13Enable vector unit if present (continuation of ↵Andrew Waterman1-1/+1
77a5df569451571d608650a34183d53df99790ec)
2019-10-23Add --help (#179)Luís Marques1-14/+35
2019-10-22Make performance counters always 64 bits wide (#178)Luís Marques1-3/+3
This prevents the counters from easily overflowing for a 32-bit pk.
2019-05-09Allow up to 2 KiB of argumentsAndrew Waterman1-1/+4
Closes #161
2018-07-09Properly license all nontrivial filesAndrew Waterman1-0/+2
2018-04-24Enable FPU in PK, regardless of FPU presenceAndrew Waterman1-1/+1
Otherwise, the emulation code will refuse to emulate FP instructions.
2017-11-02Detect harts that can't boot Linux instead of hard-coding themPalmer Dabbelt1-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-03-23pk: does not use dtbWesley W. Terpstra1-1/+1
2017-03-22SBI: a0+a1 hold hartid+dtb pointer between boot loader stagesfdtWesley W. Terpstra1-3/+3
2017-03-21Allow PK access to user memoryAndrew Waterman1-0/+1
2017-02-17WIP towards ECALL interface for SBIAndrew Waterman1-1/+1
2016-11-13Add ability to hard-code an initial environmentAndrew Waterman1-2/+18
2016-09-09Add -p flag to pk to disable demand pagingAndrew Waterman1-0/+4
2016-08-10when -s is passed, print time, instret, cycle, and CPIAndrew Waterman1-3/+6
2016-07-12Remove uarch countersAndrew Waterman1-42/+0
We'll re-add support for the generic performance counter facility once it exists.
2016-04-30Move DRAM to high addressesAndrew Waterman1-1/+1
2016-04-06Don't assume existence of uarch countersAndrew Waterman1-20/+37
2016-03-09Refactor pk, bbl, machine into separate librariesAndrew Waterman1-13/+82
Yuck.
2016-03-05get rid of struct mainvarsAndrew Waterman1-10/+10
2016-03-05Disentangle PK and BBL a bitAndrew Waterman1-0/+1
2016-02-19WIP on priv spec v1.9Andrew Waterman1-0/+2
2016-02-19Remove incorrect code supporting ELF32 on RV64 and vice-versaAndrew Waterman1-5/+2
This is technically possible by running an RV32 supervisor on an RV64 machine, but the M-mode and S-mode code would need to be compiled and linked separately.
2015-05-29Make boot loader/SBI changes to support SMP LinuxAndrew Waterman1-0/+7
2015-05-10Split pk functionality into pk and bblAndrew Waterman1-0/+99
pk is now an AEE only (i.e. it can only execute user programs). bbl is now an SEE only (i.e. it can only host kernels).
2013-01-25rename binary to pk; change argv handlingAndrew Waterman1-185/+0
the new fesvr approach makes argv[0] = pk, rather than user program's name
2012-03-24new supervisor modeAndrew Waterman1-2/+2
2011-11-11Synced up PK with supervisor changes/asm syntaxAndrew Waterman1-3/+9
You must upgrade to the latest compiler and ISA simulator to build and run this version of the PK.
2011-06-19temporary undoing of renamingAndrew Waterman1-0/+179
2011-06-19Renamed packagesAndrew Waterman1-179/+0
2011-04-15[pk] limit programs to 2GB (for RV32 simplicity)Andrew Waterman1-6/+9
2011-04-15[pk] load pk at addr 0; user stack top = MEMSIZEAndrew Waterman1-6/+5
2011-04-12[pk] add cache flush after program loadAndrew Waterman1-0/+1
2011-04-09[sim,pk] reorganized status registerAndrew Waterman1-1/+1
2011-04-09[xcc,pk,sim,opcodes] added first RVC instructionAndrew Waterman1-3/+4
2011-04-08[pk,fesvr] pk now loads elfs itselfAndrew Waterman1-10/+26
this allows it to detect 32b binaries
2010-12-29[pk] send stdout/stderr to both fesvr and debug consoleAndrew Waterman1-1/+1
2010-11-21[opcodes, pk, sim, xcc] Tweaked FP encodingAndrew Waterman1-1/+0
2010-11-21[pk] various PK cleanups/speedupsAndrew Waterman1-0/+1
2010-11-21[xcc, sim, pk] link register is now x1Andrew Waterman1-2/+2
2010-10-26[pk,sim,xcc] get rid of at register, introduce tp registerYunsup Lee1-5/+5
2010-10-18[pk] improved performance of fp emulationAndrew Waterman1-18/+4
2010-10-17[pk] zero out fp regsYunsup Lee1-0/+13
2010-10-15[pk, sim] added FPU emulation support to proxy kernelAndrew Waterman1-2/+4