0

不同类型的细分如何被识别为不同?维基百科指出:

段可以定义为代码、数据或系统段

它还指出:

第 12 位清除的描述符是“系统描述符”,用于特殊目的。

所以,我推测这个“系统位”是用来识别系统段的,但是代码和数据段呢?此外,由于这些标识符是单独存储的,而不是作为单个 2 位值存储的,您能否获得组合类型,如系统代码和系统数据段?

4

1 回答 1

3

The Type field of a segment descriptor is not one bit but four.

Format of a segment descriptor with 1 bit for the system/non-system type and 4 bit of sub type

The S field defines if the descriptor is a system descriptor (bit is clear) or not.
The interpretation of the Type field depends on the value of S.

Non system descriptors

Non system descriptors

System descriptors

System descriptors


To better understand how protected/long mode segmentation works I advice you dropping Wikipedia in favour of the Intel manuals.

于 2018-09-05T08:19:48.080 回答