Page 1 of 1

What's the difference between amd64 and em6t

Posted: Sat Aug 08, 2009 12:22 am
by torshie
My 64-bit kernel runs on all emulators I have: qemu, bochs, vmware. But as long as I put it on my physical machine, it gets triple fault. My physical machine has a core 2 duo processor. So I think it might be the difference between amd64 and em64t.

Anyone knows what the difference exactly is? please help me.

Cheers.

Re: What's the difference between amd64 and em6t

Posted: Sat Aug 08, 2009 2:02 am
by stlw
torshie wrote:My 64-bit kernel runs on all emulators I have: qemu, bochs, vmware. But as long as I put it on my physical machine, it gets triple fault. My physical machine has a core 2 duo processor. So I think it might be the difference between amd64 and em64t.

Anyone knows what the difference exactly is? please help me.

Cheers.
bochs emulates em64t, not amd64.
I can't tell you exact and complete difference between them but could give you some examples:

FF /3 opcode CALL FAR. When used with REX prefix it becomes REX.W + FF /3 CALL m16:64, i.e. displacement becomes 64-bit instead of 32-bit.
AMD doesn't have such extension. The same is for few other similar instructions.

AMD prefers SYSCALL/SYSRET, SYSENTER/SYSEXIT on Intel is different than one on AMD.

In general EM64T is superset of AMD x86-64 instructions. All corner cases of AMD are copied to EM64T (most undocumented in Intel docs).

Stanislav

Re: What's the difference between amd64 and em6t

Posted: Sat Aug 08, 2009 2:30 am
by Brendan
Hi,
torshie wrote:My 64-bit kernel runs on all emulators I have: qemu, bochs, vmware. But as long as I put it on my physical machine, it gets triple fault. My physical machine has a core 2 duo processor. So I think it might be the difference between amd64 and em64t.

Anyone knows what the difference exactly is? please help me.
There's enough information on wikipedia about the differences (although some of the things that are listed are funny, like "MSRs are model specific!!!" ;) ).

Normally when an OS doesn't work on real machines it's because you're assuming RAM is zeroed (emulators do zero RAM before the OS uses it, while real machines don't), or you're not invalidating TLBs properly, or you've made some other assumption or mistake.


Cheers,

Brendan