简体   繁体   English

段偏移对bs段描述符

[英]Segment Offset Pair bs Segment Descripter

I am little confused to understand the difference between a segment offset pair in 8088 for physical address calculation as compared to segment descriptors in 32 bit processor. 对于8088中用于物理地址计算的段偏移对与32位处理器中的段描述符之间的区别,我一点都不感到困惑。

Any explanation would be highly appreciated. 任何解释将不胜感激。

16 bit CPUs could only address 64kB of memory. 16位CPU只能寻址64kB的内存。 To extend the memory range, segments were introduced wich basically define the base adress of a 64KB window in the pchyscak available memory. 为了扩展内存范围,引入了一些段,这些段基本上定义了pchyscak可用内存中64KB窗口的基本地址。

To get the pyhscial address such a pointer is pointing to, you have to multiply the segment value with 10h (16) and add the offset adress. 要获取指针所指向的pyhscial地址,您必须将段值乘以10h(16),然后加上偏移量地址。 ie. 即。 If you have an adress like 如果你有这样的地址

145A:67B1

 145A0   (+10h or << 4)
+ 67B1
------
 1AD51   <- Physical memory address

A protected mode descriptor is similar to such a segment, but with additional information. 保护模式描述符类似于这种段,但是具有附加信息。 It has a length which can be up 1-64KB (x286), and information about the prvilige level and presence. 它的长度可以达到1-64KB(x286),并包含有关产品级别和状态的信息。 The privilege level is used to make the OS more secure and indipendent from the user space, the presence flag is for virtual memory. 特权级别用于使OS更加安全和独立于用户空间,状态标志用于虚拟内存。

On the 386 the ranges were extended so a segment can now be up to 1MB and a granularity was added so that a segment is now a multiple of a 4096 block, thus extending the segment size up to 4GB. 在386上,扩展了范围,因此段现在可以达到1MB,并添加了粒度,因此段现在是4096块的倍数,从而将段大小扩展到了4GB。

Another property in the descriptor is to set a segment to 16 or 32 bit mode, so that 16 code can still work. 描述符中的另一个属性是将段设置为16或32位模式,以便16代码仍然可以工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM