32-bit or 64-bit x86?
32-bit or 64-bit x86?
Currently working on an x86 OS and made some progress (some basic paging, etc), but obviously not that deep in yet. I would like to know whether transitioning to x86-64 is a good idea, since that's more modern and "looks easier" to some degree. Thanks.
Re: 32-bit or 64-bit x86?
Assuming you are not targeting 32-bit only hardware, I would go for 64-bit. The virtually unlimited address space makes life much easier.
Re: 32-bit or 64-bit x86?
In 64-bit mode, you have a lot of advantages like a somewhat better interrupt system (though the IST interrupts somewhat ruin it), a virtual address space that is guaranteed to be larger than the physical one, and of course easier access to 64-bit physical addresses (yes, you can use PAE in 32-bit mode to get to those, but that has its own issues).
The only reason for 32-bit mode in this day and age is legacy support. Oh, and RDOS wants it for segmentation. Everyone else should start with 64-bit mode or transition to it very quickly.
The only reason for 32-bit mode in this day and age is legacy support. Oh, and RDOS wants it for segmentation. Everyone else should start with 64-bit mode or transition to it very quickly.
Carpe diem!
Re: 32-bit or 64-bit x86?
When x86 CPUs that cannot handle segmentation and protected mode dominate the market, I might consider x86_64, or I might stop doing OS development (most likely the latter).
Besides, I like challenging environments more than easy. Designing a 32-bit OS is more challenging, particularly if you want to be able to use 1TB of physical memory. After all, I could do Java development instead of OS development since the former is much easier and gives quicker results. The main challenge with an OS project is that you could write ALL of the code yourself, and not having to rely on anybody else. And you could solve all the design issues the way you want them to be solved rather than relying on other people's poor design choices.
Ah, and by the way, x86_64 doesn't allow you to run good-ole DOS applications natively.
Besides, I like challenging environments more than easy. Designing a 32-bit OS is more challenging, particularly if you want to be able to use 1TB of physical memory. After all, I could do Java development instead of OS development since the former is much easier and gives quicker results. The main challenge with an OS project is that you could write ALL of the code yourself, and not having to rely on anybody else. And you could solve all the design issues the way you want them to be solved rather than relying on other people's poor design choices.
Ah, and by the way, x86_64 doesn't allow you to run good-ole DOS applications natively.
-
- Member
- Posts: 70
- Joined: Fri Jun 28, 2013 1:48 am
- Contact:
Re: 32-bit or 64-bit x86?
Always prefer 64-bit. Since x86_64 has larger vmspace, no segments, compliant interrupt stack frame.
Reinventing the Wheel, code: https://github.com/songziming/wheel