[转载]使用 task gate 进行任务切换

时间:2015-01-29 19:09:38   收藏:0   阅读:136

指令:

  call 0x20:00000000   jmp 0x20:00000000

-----------------------------------

selector 0x20 是个 task gate 的 selector


  这里使用 task gate 任务切换与使用 TSS selector 的情形基本一样。


值得注意的是,使用 task gate 在权限的 check 方面与 call gate 不同的是:

(1)call-gate 的权限 check 中:CPL <= DPLg && RPL <= DPLg  并且 CPL >= DPLs(或 CPL == DPLs)
(2)task-gate 的权限 check 中:CPL <= DPLg && RPL <= DPLg,忽略和 DPLs 的校验。


task-gate 的权限 check:
  CPL <= DPLg && RPL <= DPLg

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!