<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kmi/arch/riscv64/conf/kernel-link.S, 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-07-08T15:04:03Z</updated>
<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>fixed crash with dbg_fdt()</title>
<updated>2024-07-06T21:49:55Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-06T21:49:55Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=03e12129927b0deba537a11bb5575bef93c57d0f'/>
<id>urn:sha1:03e12129927b0deba537a11bb5575bef93c57d0f</id>
<content type='text'>
+ 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.
</content>
</entry>
<entry>
<title>remove some unused macros</title>
<updated>2024-07-06T18:07:35Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-06T18:07:35Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=70afa4184544d244d804713fdee5836f4f20a9fe'/>
<id>urn:sha1:70afa4184544d244d804713fdee5836f4f20a9fe</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>
<entry>
<title>update license stuff</title>
<updated>2023-05-01T19:02:49Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2023-05-01T19:02:49Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=05d4244f68e35c1bef6488292bf9730df3636fd9'/>
<id>urn:sha1:05d4244f68e35c1bef6488292bf9730df3636fd9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>allow building with riscv64-linux-gnu</title>
<updated>2022-09-10T22:09:02Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2022-09-10T22:07:52Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=7101970b3cdb2a0190e69a98352275907ab935a4'/>
<id>urn:sha1:7101970b3cdb2a0190e69a98352275907ab935a4</id>
<content type='text'>
+ May warn about PHDR not being in LOAD, there is a flag to silence it
  (--no-warn-rwx-segment) but it doesn't seem to exist in
  riscv64-unknown-elf for some reason.
</content>
</entry>
<entry>
<title>add license texts</title>
<updated>2022-06-12T10:58:42Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2022-06-12T10:58:42Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=6c529c5c6c2d016d77b143171c5e27fbec0d2bfd'/>
<id>urn:sha1:6c529c5c6c2d016d77b143171c5e27fbec0d2bfd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Allow building with clang</title>
<updated>2022-01-07T12:05:06Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2022-01-06T21:39:12Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=9cc125fb3cfdc2c8ae7153b5ae0fe705980835fb'/>
<id>urn:sha1:9cc125fb3cfdc2c8ae7153b5ae0fe705980835fb</id>
<content type='text'>
+ 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)
</content>
</entry>
</feed>
