Booting a 32 bit os on a 64 bit machine

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Jezze
Member
Member
Posts: 395
Joined: Thu Jul 26, 2007 1:53 am
Libera.chat IRC: jfu
Contact:

Booting a 32 bit os on a 64 bit machine

Post by Jezze »

Hi,

I finally tried running my os on real hardware. Something I should have done a long time ago. I was almost shocked that it worked directly without any changes on my netbook. It is a 32 bit machine, an ASUS EEE 900.

I thought I try it on my 64 bit machine as well and there it didn't work at all. Now to be honest I haven't started debugging it yet but wanted to ask if anyone from the top of their head knows if there is something special I need to do when booting a 32 bit os on a 64 bit machine in the terms of modifying some tables or registers or anything.
Fudge - Simplicity, clarity and speed.
http://github.com/Jezze/fudge/
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: Booting a 32 bit os on a 64 bit machine

Post by NickJohnson »

Not to my knowledge. x86-64 in 32 bit protected mode is precisely x86.
guyfawkes
Member
Member
Posts: 93
Joined: Mon Jul 18, 2011 9:47 am

Re: Booting a 32 bit os on a 64 bit machine

Post by guyfawkes »

There is no difference, i boot both 32 and 64 PC with out changes.
When you say it is not working, can say in what way.
Does it crash, blank screen, jump to normal OS ?.
User avatar
xenos
Member
Member
Posts: 1121
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

Re: Booting a 32 bit os on a 64 bit machine

Post by xenos »

NickJohnson wrote:Not to my knowledge. x86-64 in 32 bit protected mode is precisely x86.
Well, almost. If you use CPUID to check the "long mode available" flag, it will give you a 1. But that should not affect a 32 bit OS in any way, so it should boot in exactly the same way as on a 32 bit machine.

I've tested the 32 bit version of my OS on 64 bit hardware as well and it indeed boots the same way as on 32 bit hardware. (With one exception: It gives me warning telling me that something like: "64 bit CPU detected, OS level: 32 bit" simply because I check for the long mode available flag.)
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
Post Reply