发新话题
打印

请问陈老师一个中断时的问题

请问陈老师一个中断时的问题

新手在学习linux kernel的问题:
  在中断或异常发生的时候,若CPL和DPL不相等的情况下,会改变堆栈来切换到新的privilege的堆栈下
  但是ULK3上面说的是先取出新的ss和esp,然后在新的堆栈下面保存以前的ss和esp,但是既然ss和esp已经变了,怎么还能保存以前的呢?
请陈老师解释一下~谢谢
把原文帖过来看看
透析真谛,似拨云穿雾;共享智慧,如春风沐浴
http://www.kerneltravel.net
ULK3中 第142页
   Loads the ss and esp registers with the proper values for the stack segment and stack pointer associated with the new privilege level. These values are found in the TSs
  In the new stack,it saves the previous values of ss and esp,which define the logical address of the stack associated with the old privilege level
谢谢陈老师解答
对照上下文,仔细推敲新特权级和旧特权级各指什么,它们对应的堆栈是什么,然后这个问题就清楚了
透析真谛,似拨云穿雾;共享智慧,如春风沐浴
http://www.kerneltravel.net
好的,我仔细看看书,如果还不明白再请教陈老师。
发新话题