Support bios that expect a BPB being present #1

Open
opened 2025-05-06 18:15:13 +02:00 by mai-lapyst · 1 comment
Owner

Some bios variants expect a BIOSPparameterBlock being present, which they also happily write inside thus screwing with the assembly in our bootsector.

Some bios variants expect a [**B**IOS**P**parameter**B**lock](https://en.wikipedia.org/wiki/BIOS_parameter_block) being present, which they also happily write inside thus screwing with the assembly in our bootsector.
Author
Owner

Essentially blocked by the real realmode codegen problem since a BPB (or realisticly a EBPB) eats around 32 - 51 bytes (plus 3 bytes offset / initial jump), but currently we only have ~20 bytes wiggleroom.

Most of the bytes used tho are "useless" bc rust + LLVM try to encode everything in 32bit instructions where they perfectly fine could be 16bit ones (i.e. an 16bit value is mapped to an 32bit register and a 32bit move is used to load an 16bit immediate value into it...)

Essentially blocked by the real realmode codegen problem since a BPB (or realisticly a EBPB) eats around 32 - 51 bytes (plus 3 bytes offset / initial jump), but currently we only have ~20 bytes wiggleroom. Most of the bytes used tho are "useless" bc rust + LLVM try to encode everything in 32bit instructions where they perfectly fine could be 16bit ones (i.e. an 16bit value is mapped to an 32bit register and a 32bit move is used to load an 16bit immediate value into it...)
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: chalk-os/rustboot#1
No description provided.