Page 1 of 1

Booting a 32 bit os on a 64 bit machine

Posted: Fri Dec 09, 2011 5:42 pm
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.

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

Posted: Fri Dec 09, 2011 7:02 pm
by NickJohnson
Not to my knowledge. x86-64 in 32 bit protected mode is precisely x86.

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

Posted: Fri Dec 09, 2011 8:12 pm
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 ?.

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

Posted: Sat Dec 10, 2011 2:00 am
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.)