mastodontech.de ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Offen für alle (über 16) und bereitgestellt von Markus'Blog

Serverstatistik:

1,5 Tsd.
aktive Profile

#rustboot

0 Beiträge0 Beteiligte0 Beiträge heute
Mai :v_trans:<p>So im working again on <a href="https://codearq.net/chalk-os/rustboot" rel="nofollow noopener" target="_blank">rustboot</a> and now have the "problem" that the bootsector of it dosn't contain an BiosParameterBlock, which <strong>should</strong> be only needed for DOS but welp aparently there are BIOS'es out there that just <strong>write</strong> inside it, causing it to screw up the code inside it. -.-</p><p>It needs ~51 bytes or so, but my current implementation has only ~20 bytes of wiggleroom, mainly bc rust/llvm use 32bit-in-16bit code, which has the "problem" that an <code>mov</code> of an u16 immediate to a register occupies 6 instead of 3 bytes (2 zero bytes to pad u16 to u32 + the sizeprefix <code>0x66</code> to "temporarily" switch to 32bit).</p><p>Sooooooo yeah yk what I did. You tought of the sensible way of writing it simply entirely in assembly? Naaaaah; I'm gonna patch LLVM ofc!! :blobcat_coolio: Which works quite okayish currently; I got it to correctly emit 16bit <code>call</code> and <code>ret</code> instructions (another thing that was eating space even before and I had to do some very creative workarounds...); now I only need to <em>somehow</em> compile an own rust toolchain that uses the patched LLVM, but it dosn't get's it right and the extra cpu target (<code>i8086</code> instead of <code>i386</code>) dosn't get recognized as a valid target when rust tries to ask LLVM for it.... <em>sigh</em></p><p>Maybe I should rather work on the implementation of an realmode interrupt routine that's callable from 32bit so I can implement a basic disk interface.</p><p><a href="https://soc.saiyajin.space/tags/rust" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rust</span></a> <a href="https://soc.saiyajin.space/tags/osdev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>osdev</span></a> <a href="https://soc.saiyajin.space/tags/bootloader" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>bootloader</span></a> <a href="https://soc.saiyajin.space/tags/rustboot" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rustboot</span></a> <a href="https://soc.saiyajin.space/tags/development" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>development</span></a> <a href="https://soc.saiyajin.space/tags/programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>programming</span></a> <a href="https://soc.saiyajin.space/tags/software" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>software</span></a> <a href="https://soc.saiyajin.space/tags/floss" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>floss</span></a> <a href="https://soc.saiyajin.space/tags/oss" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>oss</span></a> <a href="https://soc.saiyajin.space/tags/opensource" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>opensource</span></a></p>
Mai :v_trans:<p>Yas! It finally works, <a href="https://soc.saiyajin.space/tags/rustboot" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rustboot</span></a> can load elf objects, resolve symbols and execute the the init method contained! Took me longer than I want to admit, mainly bc there was a 4byte bss segment I forgot to map correctly in the linker script that was messing with symbol locations of rustboot.</p><p><a href="https://codearq.net/chalk-os/rustboot" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">codearq.net/chalk-os/rustboot</span><span class="invisible"></span></a></p><p><a href="https://soc.saiyajin.space/tags/osdev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>osdev</span></a> <a href="https://soc.saiyajin.space/tags/bootloader" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>bootloader</span></a> <a href="https://soc.saiyajin.space/tags/floss" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>floss</span></a> <a href="https://soc.saiyajin.space/tags/foss" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>foss</span></a> <a href="https://soc.saiyajin.space/tags/oss" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>oss</span></a> <a href="https://soc.saiyajin.space/tags/opensource" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>opensource</span></a> <a href="https://soc.saiyajin.space/tags/rust" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rust</span></a> <a href="https://soc.saiyajin.space/tags/development" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>development</span></a> <a href="https://soc.saiyajin.space/tags/software" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>software</span></a> <a href="https://soc.saiyajin.space/tags/programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>programming</span></a></p>
Mai :v_trans:<p>Finished today stage2 of the bios bootprocess in <a href="https://soc.saiyajin.space/tags/rustboot" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rustboot</span></a> , which includes trying to enable the A20 gate so we can actually access RAM above 1MB, and also to switch to 32bit protected mode! Next thing is to finally bootstrap the core of the bootloader that will run in 32bit!</p><p><a href="https://codearq.net/chalk-os/rustboot" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">codearq.net/chalk-os/rustboot</span><span class="invisible"></span></a></p><p><a href="https://soc.saiyajin.space/tags/rust" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rust</span></a> <a href="https://soc.saiyajin.space/tags/osdev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>osdev</span></a> <a href="https://soc.saiyajin.space/tags/oss" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>oss</span></a> <a href="https://soc.saiyajin.space/tags/foss" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>foss</span></a> <a href="https://soc.saiyajin.space/tags/opensource" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>opensource</span></a> <a href="https://soc.saiyajin.space/tags/programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>programming</span></a> <a href="https://soc.saiyajin.space/tags/development" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>development</span></a> <a href="https://soc.saiyajin.space/tags/bootloader" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>bootloader</span></a> <a href="https://soc.saiyajin.space/tags/grub" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>grub</span></a> <a href="https://soc.saiyajin.space/tags/technology" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>technology</span></a></p>