InvestorsHub Logo
Followers 2
Posts 522
Boards Moderated 0
Alias Born 09/19/2003

Re: sgolds post# 27750

Monday, 03/01/2004 12:27:52 PM

Monday, March 01, 2004 12:27:52 PM

Post# of 97555
sgolds- I see we have made progress! A couple of points:

in Compatibility Mode, the processor puts an emulation layer on top of the 64-bit flat mode addressing

Emulation conjures up a picture that requires no hardware support, but that is not the case. It is in fact a complete hardware implementation of segmentation in compatibility mode.

2. The emulation works as follows: 32-bit (and 16-bit, if supported by OS) apps go through an emulation layer which uses a descriptor table to translate the segmented address to a virtual address.

Again I wouldn't use the word emulation. Segmentation is handled by the processor in dedicated hardware.

3. Compatibility Mode differs from Legacy Mode in this way: In Legacy Mode, the virtual address is the physical address.

You are referring to the legacy mode "real addressing" used in Real Mode. That can in fact be dropped when Legacy Mode goes away. That is a plus. See page 12 of Volume 2 for a diagram on how real mode addressing uses the segment registers in a different way than normal segmentation.

In Compatibility Mode, the virtual address is then put through the 64-bit logic of paged memory to convert to a physical address. This is what I mean by 'emulation layer' - the underlying processor mechanism is the paged memory system, the segmented memory is converted first into a virtual address fed through the 64-bit logic.

I see. You were talking about virtual address translation to physical memory (paging), and I was talking about the segmentation logic. I didn't touch on the paging mechanism because that is not changing other than the o/s can map a 32-bit application's 32-bit address space to anywhere in 52-bit physical space. This does not affect segmentation in any way. Take a look at Volume 1 pages 14-15. It has a nice set of diagrams showing the memory management in each mode. The only difference between compatibility mode and protected mode is in the virtual address to physical address translation.

First, Legacy Mode can be removed. Second, Compatibility Mode can be removed (although this will take a number of years). Then segmentation is gone.

I thought your original argument was that segmentation would be gone when Legacy Mode was dropped. Compatibility mode is going to be around for a long, long time.

Then the hardware will have no segmentation at all.

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.

HailMary

Volume:
Day Range:
Bid:
Ask:
Last Trade Time:
Total Trades:
  • 1D
  • 1M
  • 3M
  • 6M
  • 1Y
  • 5Y
Recent AMD News