From: Scott Lurndal on
Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups(a)NTLWorld.COM> writes:
>>
>>>>>
>>>>> x86_64 doesn't even support segmentation.
>>>>>
>>>> And good riddance!!! What took them so long?! :-)
>>>>
>>> Trying to do things the "right" way (as I suspect many people in this
>>> thread would label it) with IA64 and having most of the world
>>> (possibly also including many people in this thread) ignore the
>>> results. (-:
>>>
>> No. AMD designed the 64-bit extensions, not Intel. So IA64 had nothing
>> to do with it.
>>
>You make the point for me, would you but realize it. Intel was spending
>its time and effort doing things the "right" way, which is why it took
>"so long" for x86-64 to become widespread across the board.
>
>> And segmentation hasn't been used by any production operating system
>> on ia32 since the 386; [...]
>>
>Untrue. It has been used on all of them. In addition to the obvious
>requirements at the systems programming level, some of them permit (or
>even require!) applications softwares to know of it. Multithreaded
>applications programming on 32-bit OS/2 and (x86) Win32 can involve the
>explicit use of the FS register by applications softwares, for example.
>

They're using FS (and GS) as base registers, not technically as segments,
since the storage referred to by FS is also visible via DS and CS (which
both flat map the entire 4GB).

scott
From: George Neuner on
On 22 Mar 2010 23:09:34 GMT, Seebs <usenet-nospam(a)seebs.net> wrote:

>On 2010-03-22, Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups(a)NTLWorld.COM> wrote:
>> You make the point for me, would you but realize it. Intel was spending
>> its time and effort doing things the "right" way, which is why it took
>> "so long" for x86-64 to become widespread across the board.
>
>Time from first distribution of x86-64 to at least two major
>vendors shipping parts in large quantities: ???
>
>Time from first distribution of IA64 to at least two major
>vendors shipping parts in large quantities: ???
>
>I wouldn't say that x86-64 took long to become widespread, compared with
>IA64. I'm also not at all sure that IA64 counts as doing things the "right"
>way.
>
>So far, the largest impact I've seen from IA64 is that it's increased
>confusion because people keep thinking it means x86-64.
>
>> Untrue. It has been used on all of them. In addition to the obvious
>> requirements at the systems programming level, some of them permit (or
>> even require!) applications softwares to know of it. Multithreaded
>> applications programming on 32-bit OS/2 and (x86) Win32 can involve the
>> explicit use of the FS register by applications softwares, for example.
>
>I was not aware of any remaining uses of the segmented address space stuff
>in modern BSD or Linux on x86. So far as I can tell, they jump into the
>flat memory model and stay there.

Most 32-bit x86 OS's defined 2 segments representing user and kernel
mode spaces. This was done because the x86's protection ring traps
were based on the ring bits in the segment selector.

x86-64 still has protection rings although it only implements rings 0
and 2 (the others being rarely, if ever, used). Ring traps are now
triggered on a kernel mode bit in the page address.

32-bit Linux and Windows use the FS register to point to thread
information blocks. FS still works in compatibility mode on x86-64.
In long mode the GS register is used for this purpose although the
segment selector is not checked and the value is simply used as a
pointer.

George
From: Jonathan de Boyne Pollard on
>
>>
>> You make the point for me, would you but realize it. Intel was
>> spending its time and effort doing things the "right" way, which is
>> why it took "so long" for x86-64 to become widespread across the board.
>>
> Time from first distribution of x86-64 to at least two major vendors
> shipping parts in large quantities: ???
>
> Time from first distribution of IA64 to at least two major vendors
> shipping parts in large quantities: ???
>
Both irrelevant to this discussion.

> So far, the largest impact I've seen from IA64 is that it's increased
> confusion because people keep thinking it means x86-64.
>
You've not understood the question that was asked. It was a fairly
simple one. M. Richmond's question, once again, was "what took them so
long" between the x86 architecture and the x86-64 architecture. And the
simple answer is: a decade of working on IA64 instead.

>>> And segmentation hasn't been used by any production operating system
>>> on ia32 since the 386; [...]
>>
>> Untrue. It has been used on all of them. In addition to the obvious
>> requirements at the systems programming level, some of them permit
>> (or even require!) applications softwares to know of it.
>> Multithreaded applications programming on 32-bit OS/2 and (x86) Win32
>> can involve the explicit use of the FS register by applications
>> softwares, for example.
>>
> I was not aware of any remaining uses of the segmented address space
> stuff in modern BSD or Linux on x86. [...]
>
Then perhaps the aforementioned obvious x86 system programming
requirements are not as obvious to some. That just means that you
aren't familiar enough with it, though. There are places where one has
to use segmentation, since the architecture requires it. It is by
segmentation that one tells an x86 system whether it is executing in
user or supervisor mode, for example.

From: Jonathan de Boyne Pollard on
>
>>>
>>> And segmentation hasn't been used by any production operating
>>> system on ia32 since the 386; [...]
>>>
>> Untrue. It has been used on all of them. In addition to the obvious
>> requirements at the systems programming level, some of them permit
>> (or even require!) applications softwares to know of it.
>> Multithreaded applications programming on 32-bit OS/2 and (x86) Win32
>> can involve the explicit use of the FS register by applications
>> softwares, for example.
>>
> They're using FS (and GS) as base registers, not technically as
> segments, since the storage referred to by FS is also visible via DS
> and CS (which both flat map the entire 4GB).
>
That's a fairly weaselly distinction. "Using segmentation" isn't
restricted to segments never overlapping or aliasing one another.
Indeed, that's a common thing that production x86 operating systems do
with segmentation, from the aforementioned TIB segments in 32-bit OS/2
and Win32 to creating data selector aliases for code segments via DPMI
in DOS-Windows 3.1/9x/ME.

From: Scott Lurndal on
Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups(a)NTLWorld.COM> writes:
>>
>>>>
>>>> And segmentation hasn't been used by any production operating
>>>> system on ia32 since the 386; [...]
>>>>
>>> Untrue. It has been used on all of them. In addition to the obvious
>>> requirements at the systems programming level, some of them permit
>>> (or even require!) applications softwares to know of it.
>>> Multithreaded applications programming on 32-bit OS/2 and (x86) Win32
>>> can involve the explicit use of the FS register by applications
>>> softwares, for example.
>>>
>> They're using FS (and GS) as base registers, not technically as
>> segments, since the storage referred to by FS is also visible via DS
>> and CS (which both flat map the entire 4GB).
>>
>That's a fairly weaselly distinction. "Using segmentation" isn't
>restricted to segments never overlapping or aliasing one another.
>Indeed, that's a common thing that production x86 operating systems do
>with segmentation, from the aforementioned TIB segments in 32-bit OS/2
>and Win32 to creating data selector aliases for code segments via DPMI
>in DOS-Windows 3.1/9x/ME.
>

Granted, although I'd not call either OS/2 or Win32 running DOS as
modern operating systems.

But fundamentally, in both Windows (NT4+) and Linux, segmentation is only
used insofar as the legacy architecture requires it (e.g. CPL changes)
transitioning from real-mode through protected mode to paging, then long mode;
Were other methods available or if they're added, segmentation would be relgated to the
junk heap of history.

scott