| Age | Commit message (Collapse) | Author |
|
|
|
+ Can be used to pass contiguous memory regions to things like virtio
block devices for implementing disk drivers etc.
|
|
+ Effectively means that all executables can be called into, but if an
exe doesn't want to deal with anyone else it should just set a flag
like `not_really_a_server` or whatever
|
|
+ Align kernel to 2MiB boundary in u-boot
+ Optimize alignment functions a little bit, should still have to check
on real hardware but 'feels' more clean
+ Add early boot debugging
+ Put extra cores we aren't ready to account for to sleep if/when they
boot.
+ Make BASE_PAGE_SIZE constant on riscv64/32, helps the compiler with
some alignment checks among other things.
|
|
+ No real point having multiple different levels of assertions, just say
you assert something and be done with it
|
|
+ Had some minor issues with a wraparound of size_t that effectively
meant that some regions were allocated twice. Also, booting should be
a bit more reliable now, turned out that the previous iteration of the
booting was just accidentally working due to the kernel being placed
'close enough' in RAM to where it was linked to. Fixed by allocating a
vmem of O1 that maps the kernel to a 2MiB boundary at boot, pretty
nifty.
|
|
+ Apparently dbg_fdt() itself wasn't buggy, but for whatever reason GCC
produced an absolute load to the prefix string in __print_prefix()
which caused all the issues. Unclear why, seems like a compiler bug.
This commit is more of a workaround, I'd still like to investigate
this further.
|
|
+ dbg_fdt() is apparently broken, possibly due to UB or something, but
it causes some issues with optimizations enabled. Remove it
temporarily
|
|
+ Slightly more overhead but will help track down possible memory leaks
in the future. Could also add in a flag for turning off/on but I don't
think the difference in performance is that significant.
|
|
|
|
|
|
|
|
+ The system is now a bit simpler and hopefully easier to understand, while also
extending the shared memory to be 1:N, where there is one owner who
may become a zombie while waiting for the N to die.
|
|
+ Start out using big kernel lock, apparently seL4 thinks its good
enough. I might have a go at using a more fair lock, and possibly
moving to more fine-grained locks if I really feel the need to get
scalability up.
|
|
|
|
+ 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.
|
|
+ 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
|
|
|
|
+ Allow threads to make themselves become orphants
|
|
|
|
+ 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.
|
|
|
|
+ Also swap checks if thread is running
|
|
+ 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
|
|
+ Terminology is still a bit poor, and will still have to write
documentation + implement ipis properly
|
|
|
|
+ Sets the current core to sleep
|
|
|
|
+ I keep starting to type src and wondering why autocomplete won't work,
I guess src is just uncounciously a better name
|