Transition from x86 to x86-64
Posted: Thu Jul 02, 2020 1:07 am
Hi, I have a basic x86 OS with most of the core features (memory managment/multitasking/interrupts/etc) working.
However, I recently started considering making the transition to 64 bit, since 32 bit feels too old and limited.
I wanted to do it from the beginning but I was barely familiar with x86 and x86-64 seemed too far away and scary, now that I'm 3 months in I feel more confident.
Here are a few questions that I have:
- How expensive is the transition gonna be? How many things do I have to scrap? Does any of the old stuff stop working on 64 bit? (like PIT and other legacy hardware)
- Should I consider keeping compatibility with 32 bit mode? If so, do I just put thousands of ifdefs to make it work both ways?
- Since I have my own tool to make MBR FAT32 formatted virtual hard disks as well as a bootloader, I would have to rewrite them to do GPT and create EFI partitions, and my bootloader would have to become a PE executable right? Is this mandatory for x64?
- Is using legacy BIOS for booting even a sane thing to do for x64?
Rewriting all of my tools to support the modern x64 stuff seems like the most expensive thing out of all of these, so maybe I can stick with MBR and BIOS for now? idk...
(and I don't wanna use 3rd party stuff because thats just not how I roll )
Thanks
However, I recently started considering making the transition to 64 bit, since 32 bit feels too old and limited.
I wanted to do it from the beginning but I was barely familiar with x86 and x86-64 seemed too far away and scary, now that I'm 3 months in I feel more confident.
Here are a few questions that I have:
- How expensive is the transition gonna be? How many things do I have to scrap? Does any of the old stuff stop working on 64 bit? (like PIT and other legacy hardware)
- Should I consider keeping compatibility with 32 bit mode? If so, do I just put thousands of ifdefs to make it work both ways?
- Since I have my own tool to make MBR FAT32 formatted virtual hard disks as well as a bootloader, I would have to rewrite them to do GPT and create EFI partitions, and my bootloader would have to become a PE executable right? Is this mandatory for x64?
- Is using legacy BIOS for booting even a sane thing to do for x64?
Rewriting all of my tools to support the modern x64 stuff seems like the most expensive thing out of all of these, so maybe I can stick with MBR and BIOS for now? idk...
(and I don't wanna use 3rd party stuff because thats just not how I roll )
Thanks