aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv64/kernel/vmem.c
AgeCommit message (Collapse)Author
2023-10-09experimenting with removing lists threads per procKimplul
+ Gives a very slight improvement to RPC speeds, but mostly cleans up code a little bit.
2023-10-09move rpc stack handling to arch-specific codeKimplul
+ Fairly considerable speedup, as we don't have to look up the rpc pte every time separately, instead cacheing them. Adds an architecture specific limitation to total rpc stack size, though.
2023-08-04add initial smp bringupKimplul
2023-06-04slight optimization and brainfart fixKimplul
2023-06-04visionfive2 bootsKimplul
+ Make 8250 serial driver more generic + Still TODO: write a tutorial on how to boot on the visionfive2
2023-06-04visionfive2 boots until debugging is initializedKimplul
2023-05-29start trying to boot on visionfive 2Kimplul
+ Not bootable quite yet. Among other things, I couldn't get the current starfive u-boot fork to boot, so try adding support for booting with precompiled u-boot via the `go` command. Initial testing with qemu shows that this should be possible, and if it works, might be useful in the (far) future with other slightly janky SBCs. Also, NS16550 is 8250-based, and I'm really only using the base 8250, so rename and add visionfive 2 uart to list of compatibles. Visionfive 2 is still completely untested.
2023-05-11arbitrary load address and RAM base detectionKimplul
+ Both kind of go hand in hand, made sense to do both at the same time. Some parts feel slightly hacky, the loader works by placing everything on the stack and avoiding global values. Still, seems to work?
2023-05-01update license stuffKimplul
2023-04-30rename to kmiKimplul
2022-11-21possible optimisationsKimplul
2022-11-13improve documentation on new featuresKimplul
2022-11-13~1.3M ipc requestsKimplul
+ The secret is using gravestones. I'll have to write up full documentation for the feature but essentially riscv lets us encode whatever we want into page table entries, as long as they're not active. We use this to encode highest user address that is not a zero, in that all entries in the top level are either active or gravestones. When an active entry is removed, it is either a gravestone (if there are other active entries above it) or it starts a cascade of removing entries that have been previously removed Slight runtime overhead to page mapping, pretty major advantage in rpc calls. Feature will need to be tested more thorougly, and the init program is sort of a best scenario with just one top level userspace page table entry active at a time, leading to incredibly fast context switches. Current implementation limits a process' max virtual memory to 248 GiB (in Sv39), but I don't think the missing 8 GiB is that big of a deal.
2022-11-13give uvmem_map more fitting nameKimplul
+ It really only works with Sv39, I suppose similar structures should be added for Sv4} etc. if I ever get around to it.
2022-11-13write init more sensiblyKimplul
+ Both easier to look at and now the userspace doesn't play as big of a role in the 'benchmarking' with optimizations turned on.
2022-11-12release mode, ~600k requestsKimplul
2022-11-12slight optimizationKimplul
2022-11-12initial rpc implementationsKimplul
2022-10-29rewrite pmemKimplul
2022-10-22start outlining ipcKimplul
2022-09-15change syscalls to take 5 params and return 6Kimplul
+ In total, a syscall is built up of 6 values, with the first being the syscall number. Symmetrically, the first value is now a status and the following five values return "values". This allows us to cram in more info into the ipc_* functions. The performance difference is absolutely minimal, at least from my testing in qemu.
2022-09-14riscv32 boots and advances as far as riscv64Kimplul
2022-06-12add license textsKimplul
2022-06-11continue documentationKimplul
2022-06-09use doxygen todoKimplul
2022-06-09continue documentationKimplul
2022-05-29continue documentation effortsKimplul
2022-05-24make process loading more genericKimplul
2022-05-23new include structure, make parse easier for doxyKimplul
2022-05-23switch from clang-format to uncrustifyKimplul
The output is close enough, and I like that uncrustify is a third-party tool, so people can install a single tool for formatting instead of having to lug around a whole toolchain. I fully expect to have to add settings to uncrustify.conf, but let's see how this goes.
2022-05-22add @file info to all filesKimplul
+ Next step, start documenting contents of each file.
2022-05-22rename vm_branch to vmemKimplul
+ Closer to what it's for rather than what it is.
2022-05-22improved tcb handling in preparation for processesKimplul
2022-05-21add status info to memory mappingsKimplul
+ next up would probably be to start working on process/thread relationships, largely as documented. Still not entirely sure about how I want to handle fork, but I suppose I might figure it out at some point.
2022-04-10add clang format and run itKimplul
2022-03-01make vmflags_t 16 bitsKimplul
lower 8 bits are reserved for arch-specific flags (but at least read/write/execute) and higher 8 bits are metadata, currently only for VM_VIRTUAL (to be used when the backing physical memory shouldn't be freed)
2022-01-07Use #if defined(...) when not guard clauseKimplul
2022-01-07Prefix static functions with __Kimplul
+ Probably completely unnecessary stylistic thing, but I'll roll with it
2022-01-07Steps towards better status/debugging controlKimplul
2022-01-07Improved header dependency treeKimplul
2022-01-07Allow building with clangKimplul
+ Release mode is sort of broken, as lto doesn't work with linker relaxation and turning the relaxation off causes issues with the jump from init to kernel (as I've currently implemented it, could probably be fixed with a manual jump from assembly, I'll add it to my TODO list)