- 论坛徽章:
- 0
|
近日看了ULK3的前几章有以下几个问题:
1:2.3. Segmentation in Linux中的一段英文如下:
When saving a pointer to an instruction or to a data structure, the kernel does not need to store the Segment Selector component of the logical address, because the ss register contains the current Segment Selector. As an example, when the kernel invokes a function, it executes a call assembly language instruction specifying just the Offset component of its logical address; the Segment Selector is implicitly selected as the one referred to by the cs register. Because there is just one segment of type "executable in Kernel Mode," namely the code segment identified by __KERNEL_CS, it is sufficient to load __KERNEL_CS into cs whenever the CPU switches to Kernel Mode. The same argument goes for pointers to kernel data structures (implicitly using the ds register), as well as for pointers to user data structures (the kernel explicitly uses the es register).
这段的意思是说当进入内核模式时,内核使用USER MODE的数据段选择符(使用ES)来传递SS中保存的指向用户数据的指针,是这个意识吗?我看不太明白.
2.该章的图Figure 2-6. The Global Descriptor Table中的段描述符应该是8字节的但他图上的连续的几个描述如kernel code的地址是0x60 kernel data是0x68,而user code就是0x73,user data是0x7b,TSS 0x80这之间根本不相差8个字节啊,是图错了吗?
[ 本帖最后由 MyStar_api 于 2007-4-26 07:34 编辑 ] |
|