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

Re: sgolds post# 27712

Monday, 03/01/2004 1:34:44 AM

Monday, March 01, 2004 1:34:44 AM

Post# of 97595
sgolds-

Re: segmentation - maybe we should take this offline - I'm sure everyone else is bored with this...

From the operating-system viewpoint, however, address translation, interrupt and exception handling, and system data structures use the 64-bit long-mode mechanisms.

This statement refers to the o/s viewpoint, not the application or processor viewpoint. I think by "address translation" they mean virtual address and paging mechanisms, not segmentation. Remember the o/s isn't having to deal with this segmentation. This is all before the virtual address is calculated. A 32-bit app running in compatibility mode can set up its own segments if it wants to, as from the application standpoint, it looks as if it is running in 32-bit protected mode. It will be using processor support for segmentation (registers, descriptors, limit checking). Most 32-bit apps no longer use segmentation, but the support remains.

Please tell me if there is a specific section within that chapter which I should be looking at.

Sure. Check out these from Volume 2:

pg.6:
"The elimination of segmentation allows new 64-bit system software to be coded more simply, and it supports more efficient management of multi-processing than is possible in the legacy x86 architecture. Segmentation is, however, used in compatibility mode and legacy mode."

So the 64-bit o/s complexity goes down as it doesn't have to deal with segments, but an old 32-bit app might still use segmentation when running in compatibility mode under a 64-bit o/s.

"In compatibility and legacy modes, up to 16,383 unique segments can be defined."

Also refer to Figure 1-1 pg. 7. It shows what the hardware does to calculate the virtual address. The effective address from the application is added to the base address from the descriptor table, and then a limit check is performed to be sure the virtual address is within the segment. Fortunately the descriptor tables that are in memory are loaded into hidden registers on the chip to allow quick access (see pg 84 for details) for performing a virtual address calculation.

pg. 16:
"Compatibility mode, like 64-bit mode, is enabled by system software on an individual code-segment basis. Unlike 64-bit mode, however, segmentation functions the same as in the legacy-x86 architecture, ..."

pg. 77:
"In compatibility mode, segmentation functions just as it does in legacy mode, using legacy 16-bit or 32-bit protected mode semantics"

pg. 107:
"System software running in long mode can execute existing 16-bit and 32-bit applications by clearing hte L bit of the code-segment descriptor to 0. ... Segmentation is enabled when L=0."

pg. 138
"Except in 64-bit mode, limit checks are performed by all instructions that reference memory."

I don't know how much more clear I can make it. Compatibility mode uses all the legacy x86 hardware features that support segmentation, which include the segment registers, loading of hidden registers that save parts of the segment descriptor tables for quick access by the processor, and segment limit checking.

HailMary

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