aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-07-05formatting and documentationKimplul
2024-07-05allow booting with Qemu's -kernel flag directlyKimplul
+ Took some fairly significant changes, for one the kernel is no longer relocated at the start of a boot, instead it sits wherever the user decides the kernel should sit. Similarly, the initial kernel stack and page table are stored within the binary, slightly bloating the size but making it much safer to boot since there's really no chance of us overwriting the fdt or initrd in memory.
2024-07-05fix some small build issuesKimplul
+ Compiling for size emits memcpy() calls after they've already been removed by LTO, so add __used attribute to counteract this. Newer versions of GCC seem to prefer `-flto=auto` to just `-flto`, so use that. printf format %d -> %ld
2024-07-04use notification framework for orphanizing threadsKimplul
2024-07-04generalize orphantsKimplul
+ Allow threads to make themselves become orphants
2024-07-04add note about orphaning running threadsKimplul
2024-07-04add zombie and orphan threadsKimplul
+ Should write this down somewhere but the idea is that when a process gets killed, it frees all the memory it can, making all threads within that process orphans. Orphaned threads are assigned to the init process, which will generally call exit() on each one. Zombie threads are threads that own some bit of shared data, and whose reference count is above zero. They may not be swapped to or called, even though they take up space in thread map and reserve their thread ID.
2024-07-03simplify notifications a littleKimplul
2024-07-02enable irqs when we sleep or swap threadsKimplul
+ Also swap checks if thread is running
2024-07-02more complete interrupt handling outlineKimplul
+ Still largely untested, should really try to come up with a proper testsuite, at the moment it's mostly me trying things out in the (as of yet unreleased) kmx repo
2024-07-01expand notifications into interrupt handlersKimplul
+ Terminology is still a bit poor, and will still have to write documentation + implement ipis properly
2024-06-01tunit_t is now uint64_tKimplul
+ Largely inconsequential, but might make more sense for 32 bit platforms
2024-06-01document sleepKimplul
2024-06-01add sleep syscallKimplul
+ Sets the current core to sleep
2024-06-01slight tweaks to sptree stuffKimplul
2024-05-24rename common to srcKimplul
+ I keep starting to type src and wondering why autocomplete won't work, I guess src is just uncounciously a better name
2024-05-23improve id handlingKimplul
+ The number of allowed threads running at the same time is limited to num_tids, but each thread's ID can be any larger than that. This should make ID reuse a lot more rare, and probably makes certain kinds of time-of-check-to-time-of-use attacks more difficult
2024-05-10implement faster page allocatorKimplul
2024-05-10update doxygen configKimplul
2024-05-10update formatting configKimplul
2024-01-10silence warningKimplul
2024-01-10some kmx alleviationsKimplul
2023-10-10fix enough_rpc_stackKimplul
+ Had a slight brainfart when refactoring
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-10-03fix fork return valuesKimplul
2023-08-04fix warnings in smp.cKimplul
+ Only occur with my version of riscv64-linux-gnu-gcc. Funny, that.
2023-08-04add initial smp bringupKimplul
2023-08-03add sbi_hart_startKimplul
2023-08-03fix cpu_send_ipiKimplul
2023-08-03dispatch doesn't have to worry about ipiKimplul
2023-07-31add copyright stuff to new filesKimplul
2023-07-31start working on irqsKimplul
2023-07-27use nifty variable argument count trickKimplul
+ Found it in newlib. This allows the compiler to more effectively optimize away unnecessary register operations. Applied to both kernel and init.c for a slight speed increase. I really should move init.c to some other repository though, the binary files are starting to get annoying
2023-07-27add ipc_kickKimplul
+ Tests will have to come later
2023-07-26allow tail call optimizations to happen easierKimplul
2023-07-26fix possible segfault with non-gig memory sizesKimplul
2023-07-25simplify fdt reg readingKimplul
2023-07-25simplify populate/probe pmapKimplul
2023-07-24split makefile into two partsKimplul
+ First part generates deps.mk, second part reads it. Allows us to use both bmake and gmake with the same makefiles. Only drawback seems to be that the first makefile considers all individual files as 'finished' targets, meaning that it's more difficult to do something like make kernel.elf though I haven't found this to be an issue.
2023-06-14move rpc check to ipc_respoKimplul
2023-06-11add some clarifications to rpc stack stuffKimplul
2023-06-08fix visionfive boot docsKimplul
2023-06-08skip saving registers when possibleKimplul
2023-06-08add fast userspace return to do_ipcKimplul
2023-06-07slightly improve paddingKimplul
2023-06-07add unlikely hint to leave_rpcKimplul
2023-06-07slight improvements to buildingKimplul
+ User can now specify debug, release and assert handling
2023-06-07fix root node get_reginfoKimplul
2023-06-07change register save/load to increasing orderKimplul