InvestorsHub Logo
icon url

sgolds

03/01/04 1:41 PM

#27788 RE: HailMary #27779

HailMary, quick followup -

'Emulation' does not in itself specify hardware vs. software. Unless the context is very clear, one should say 'hardware emulation' or 'software emulation'. My bad for thinking the context was clear. I'm glad we cleared up that definition!

Another definition problem:

'Segmentation' refers to two very different things in x86, so that further confused things. In the older form, 'segmentation' meant shifting the segment register and adding the offset to generate the 8086 physical address.

This is different from Protected Mode segmentation. In that use of the word, the segment register holds a selector which is an offset (with some lower bits masked) into a descriptor table.

With these definitions in place I can make myself more clear:

Compatibility Mode does not support the older (8086) version of segments at all. It has hardware emulation to support the segmentation found in Protected Mode - the hardware converts the selector/offset to a virtual address for the page logic. Legacy Mode supports 8086 segmentation, it is not available to a 64-bit OS.

One more thing I picked up in reading. 64-bit mode still supports a form of user segmentation through the FS and GS registers, although it doesn't do any limit checking. I'm not sure why anyone would want to use this, but it is in there. See pages V2 86-87.

This supports direct sharing of memory between two (or more) processes. Since each process has its own 64-bit flat memory area (dependent on the page table), if one process wants to share a pointer to a memory area with another process then this enables that capability.

(It has uses in an SMP environment, I suspect it is even more useful in a NUMA environment. One processor's process can do complex manipulations on local memory and then send a pointer to another process who needs the results, running remotely.)