What's the difference between amd64 and em6t

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
torshie
Member
Member
Posts: 89
Joined: Sun Jan 11, 2009 7:41 pm

What's the difference between amd64 and em6t

Post 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.
stlw
Member
Member
Posts: 357
Joined: Fri Apr 04, 2008 6:43 am
Contact:

Re: What's the difference between amd64 and em6t

Post 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
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: What's the difference between amd64 and em6t

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Post Reply