Figure out how we support real realmode codegen #2
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#1 Support bios that expect a BPB being present
chalk-os/rustboot
Reference
chalk-os/rustboot#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently the code generated by the rust target for the bootsector of bios boots is using size prefixed 32bit instructions to work in 16bit CPU mode. This should be changed.
For this there are two ideas:
processing bytes; this would be fairly complex since it also would either involve detection of pointers to itself and modifing those. We theoretically could our (already existing) custom toolchain definition to use an custom linker binary that modifies the elf before the linking step, but ELF has no notation of 16 bit code so a linker wouldn't work here. And thats just for the non-inlined functions. So we're back at square one for all inlined stuff.
processing asm; better, but would force us to actually parse and assemble 16 bit assembly; could look for one out there tho...
changing llvm and rustc; completly out of scope. I tried it, it works (somehow) but I'm just to unknowladged in llvm internals, it's tablegen and instruction selection etc. Also rust needs to be recompiled and this takes a LOT of space and time. Not to mention how to integrate it with the CI... so its a hard no unfortunately.