<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kmi/include/arch/vmem.h, branch master</title>
<subtitle>ACTIVE - Kernel with migrating threads as IPC</subtitle>
<id>https://metanimi.dy.fi/cgit/kmi/atom?h=master</id>
<link rel='self' href='https://metanimi.dy.fi/cgit/kmi/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/'/>
<updated>2024-10-30T00:32:02Z</updated>
<entry>
<title>bookkeeping</title>
<updated>2024-10-30T00:32:02Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-10-30T00:32:02Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=7a23d95b6e432170d6575f515616e5936d53c85e'/>
<id>urn:sha1:7a23d95b6e432170d6575f515616e5936d53c85e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests pass</title>
<updated>2024-10-30T00:18:12Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-10-30T00:18:12Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=e7b5881903ad81efee63966e7d2c42524d465dfc'/>
<id>urn:sha1:e7b5881903ad81efee63966e7d2c42524d465dfc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>start moving towards threads always being in rpc</title>
<updated>2024-10-29T19:17:31Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-10-29T19:17:31Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=5976ad390a15726c3ddfacf8c8b282c8350f9554'/>
<id>urn:sha1:5976ad390a15726c3ddfacf8c8b282c8350f9554</id>
<content type='text'>
</content>
</entry>
<entry>
<title>allow mapping null page</title>
<updated>2024-07-09T14:35:56Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-09T14:35:56Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=298636079d912d0936f8156a609fe74b839c547b'/>
<id>urn:sha1:298636079d912d0936f8156a609fe74b839c547b</id>
<content type='text'>
+ User has to 'free' the 0 page before it becomes accessible to mapping.
  Probably worth noting that this is likely VERY niche and mainly
  concerns stuff like certain kinds of emulators that I'm still
  eons from implementing, but still.

  Unbacked pages can also be useful for some kinds of notifications,
  like 'if someone writes to this page, please report it to me with this
  ID' or whatever, I remember seeing some discussion about it somewhere
  but that's also not really relevant for the moment.

  Most significantly, at least with the current design,
  after the null page is freed it becomes available for use to regular req_mem()
  calls, so users should probably using locks around memory requests.
  That's probably a good idea anyway as internally the kernal has to
  lock the virtual memory, and without a scheduler it might cause
  threads to spin for a while in the kernel which is rather bad.
</content>
</entry>
<entry>
<title>fix LLVM</title>
<updated>2024-07-08T15:04:03Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-08T14:43:59Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=e134202611a50b358c147c92bfb8a7f443030b8b'/>
<id>urn:sha1:e134202611a50b358c147c92bfb8a7f443030b8b</id>
<content type='text'>
+ Anything extern is right out as LLVM doesn't produce correct code for
  them. Maybe if I added some extra attributes but I'm skeptical.
  Replaced with static variables and getters/setters.

+ Inline ASM is apparently a bit buggy, so use an assembly stub when jumping to init.

+ Minimize work done in main() to minimize chance of LLVM doing something silly.
  Still not 100% certain that I shouldn't just write the main() as an assembly stub
  in arch/riscv64 to be absolutely sure everything works as intended.

+ Make .kernel.start section SHF_ALLOC, otherwise lld complains about
  pc-relative addressing

Probably some other stuff as well that I'm forgetting right now. But at least with
LLVM14 LTO seems to work, which is pretty cool?
</content>
</entry>
<entry>
<title>smp now seems to work</title>
<updated>2024-07-07T04:00:43Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-07T04:00:43Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=122374c362ba8bb9082385da3c82e264ab594f15'/>
<id>urn:sha1:122374c362ba8bb9082385da3c82e264ab594f15</id>
<content type='text'>
+ 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.
</content>
</entry>
<entry>
<title>prefer __riscv_xlen over riscv64</title>
<updated>2024-07-06T16:31:13Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-06T16:31:13Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=f810f1583725b84d3538adfe2aab6dea00f5ae87'/>
<id>urn:sha1:f810f1583725b84d3538adfe2aab6dea00f5ae87</id>
<content type='text'>
</content>
</entry>
<entry>
<title>pretty massive virtual memory rewrite</title>
<updated>2024-07-06T15:14:04Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-06T15:14:04Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=76517486919657ecadda9867125dc6730f29a5b7'/>
<id>urn:sha1:76517486919657ecadda9867125dc6730f29a5b7</id>
<content type='text'>
+ 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.
</content>
</entry>
<entry>
<title>formatting and documentation</title>
<updated>2024-07-05T17:14:46Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-05T17:14:46Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=83a6fc687cab3ee87c6cae1324728521f9877ad0'/>
<id>urn:sha1:83a6fc687cab3ee87c6cae1324728521f9877ad0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>allow booting with Qemu's -kernel flag directly</title>
<updated>2024-07-05T16:38:11Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-05T16:38:11Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=e09edb5d54e39bd9509a1dc450df5ab320759f97'/>
<id>urn:sha1:e09edb5d54e39bd9509a1dc450df5ab320759f97</id>
<content type='text'>
+ 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.
</content>
</entry>
</feed>
