IA-32e GDT

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
joke
Member
Member
Posts: 56
Joined: Sat Jul 22, 2006 6:20 am

IA-32e GDT

Post by joke »

Hi all,

my question is very simple. If there is no segmentation in IA-32e 64 bits mode then why is there a GDT (and LDT)? :(
I need someone to show me the things in life that I cant find
I cant see the things that make true happiness, I must be blind
User avatar
matthias
Member
Member
Posts: 158
Joined: Fri Oct 22, 2004 11:00 pm
Location: Vlaardingen, Holland
Contact:

Post by matthias »

Hmm, maybe you should read the Intel Manuals ;)
The source of my problems is in the source.
SpooK
Member
Member
Posts: 260
Joined: Sun Jun 18, 2006 7:21 pm

Post by SpooK »

Why the TSS is still required even though Hardware Task Switching is obsolete???

Why they build a clean 64-bit architecutre on top of a clumsy 32-bit one and a messy 16-bit one???

:!::!::!::!::!: COMPATIBILITY :!::!::!::!::!:
joke
Member
Member
Posts: 56
Joined: Sat Jul 22, 2006 6:20 am

Post by joke »

Another question: in ia-32e compatibility mode segmentation is still there Will programs in lmode's compatibility mode be able to access the RAX,RBX etc the 64 bit regs and the expanded memory ?


Second Question: is IA-64 able to boot and run ia-32 software and apps ?
I need someone to show me the things in life that I cant find
I cant see the things that make true happiness, I must be blind
User avatar
matthias
Member
Member
Posts: 158
Joined: Fri Oct 22, 2004 11:00 pm
Location: Vlaardingen, Holland
Contact:

Post by matthias »

joke wrote:Another question: in ia-32e compatibility mode segmentation is still there Will programs in lmode's compatibility mode be able to access the RAX,RBX etc the 64 bit regs and the expanded memory ?


Second Question: is IA-64 able to boot and run ia-32 software and apps ?
Again read the manual, but as for your second question, yes. How? You could read the manuals ;)
The source of my problems is in the source.
SpooK
Member
Member
Posts: 260
Joined: Sun Jun 18, 2006 7:21 pm

Post by SpooK »

I'd have to agree with matthias on this one. Some "OS Developers" think they can get away with just using online docs/forums without actually referencing the related technical manuals. Even worse is when people just don't even bother Googling something.

Survey says: RTFM :idea:
User avatar
hailstorm
Member
Member
Posts: 110
Joined: Wed Nov 02, 2005 12:00 am
Location: The Netherlands

Post by hailstorm »

Sorry for interrupting while you are spanking joke, :wink: but I don't find it strange at all that he is asking these questions. Although he could guess the compatibility question himself, I must be honest about the fact that Intel is sometimes very vague about the features of it's newest cpu's.
When I decided to do an OS for learning purposes, I didn't understand the intel386 document at all at some critical points. From the point where I stand now, I dare to say that finally understand it.

All right, Joke didn't RTFM, but who did? The only thing Intel does is updating the old FM and I can't say that they do a good job. The new Intel docs are one big mess. Intel should write two manuals, one for the new architecture and one for the old architecture. When you take a look at the instruction list (2A/2B) it's a pile of 32 bits and 64 bits operating modes. And IMHO it is to unclear.

@Spook: The other reason they build a 64-bit architecture on top of the 32 bits one is that they already tried a brand new design: The Itanium processor. It had one drawback: backward compatibily was needed and thus they build in an emulator for all 32-bit stuff. This emulator was a bit slow however. So I am kinda glad that they did 64-bit expansion. It's faster and is compatible with older architectures...
User avatar
hailstorm
Member
Member
Posts: 110
Joined: Wed Nov 02, 2005 12:00 am
Location: The Netherlands

Post by hailstorm »

By the way, an interesting document on the intel-site:
http://www.intel.com/technology/64bitex ... 083402.pdf
User avatar
gaf
Member
Member
Posts: 349
Joined: Thu Oct 21, 2004 11:00 pm
Location: Munich, Germany

Post by gaf »

The new Intel docs are one big mess. Intel should write two manuals, one for the new architecture and one for the old architecture. (snip) So I am kinda glad that they did 64-bit expansion. It's faster and is compatible with older architectures.
Well, you can't have it all: Either you start off with a brand new architecture (slick design and concise manual) or you keep on augmenting the x86 design (compatibity). There's also hardly any point in starting a new manual if all the information it contains still relies on the old architecture. You would just end up reading all manuals (old and new) as you otherwise couldn't understand the advanced topics.
When you take a look at the instruction list (2A/2B) it's a pile of 32 bits and 64 bits operating modes. And IMHO it is to unclear.
Don't forget that it already was some 16/32 bit mess before anybody even considered going 64 bits. The AMD64/IA32e architecture is based on the IA32 design, which in turn rooted in the IA16 protected-mode concepts. Unlike the progress from 16bit real-mode to 16bit protected-mode, this recent development does not mark the beginning of a new and independant architecture: It's rather a 64bit extension that augments the old design without fundametally changing it.
The Itanium processor had one drawback: backward compatibily was needed and thus they build in an emulator for all 32-bit stuff. This emulator was a bit slow however.
Unlike the hardware compatibility mode, software emulators do provide some decent performance. And even if it is a bit slow - So what ? Keep in mind that we're only talking about a transitional periode of some years, that will have to pass before the software industry has moved-on to the new platform. After that all recent programs should run nativly and the legacy stuff will be so out-dated, that it can be run on any emulator (no matter how slow) without really having to worry about performance.

A good example is the real-mode compatibility that even the most modern processors still have (native real-mode + virtual 8086 mode). Would the world be any different if Intel had just silently dropped its support for these modes a couple of years ago ? Actually I still run some old DOS games every now and then, but I would never bother to boot a real DOS system for that. It's just so much more convenient to use an emulator like dosbox to play the games in my normal windows/linux environment. Even microsoft has (more or less) removed v86 mode from their systems. While the console in win9x still provided some decent compatibility, the new WindowsNT VDM emulation is next to useless. It's just the sad remains of the old console, and - from what I've heard - they're actually going to scrape out the rest of it in the upcomming Vista release.

Although real-mode has been dead for so many years now, neither AMD nor Intel yet dared to remove it once and for all. It's still eating up transistors on every chip produced and makes the manuals (but also the booting process itself) more complex than actually necessary. Just like in 1982 it's backwards compatibility with existing software that keeps AMD/Intel from dropping their support: As soon as they touched real-mode, the whole booting process would change quite drastically, rendering todays operating systems and BIOS unfunctional. The problem of compatibility might have shifted over the years, but it's still there and it will never disappear as long as there's no clear break with the past.

In my opinion a really new architecture must thus be a radical new approach that incorporates all the developments of the last 20 years that the x86 somehow just missed. It shouldn't provide any hardware backwards compatibility, but software emulation must be available to run legacy programs. The IA64 could be such an architecture marking a new beginning. From what I've heard the recent sale-numbers haven't been as bad as they used to be and Intel also seems to have succeeded at incorporating microsoft and other important software publishers. I've not yet lost all hope that the IA64 will eventually make it: WindowsNT also had a hard time until it finally managed to replace the utter crap that Win9x was.

regards,
gaf
blackcatcoder
Member
Member
Posts: 132
Joined: Wed Nov 03, 2004 12:00 am
Location: Austria
Contact:

Post by blackcatcoder »

gaf already mentioned the main points.

I think it's an compatibility reason why they build up the 64-bit on the IA-32, because software emulation isn't as fast as hardware support and if you are going to use x86-64 cpu all old programs should run without any problems.
Post Reply