코드 세그먼트의 데이터를 엑세스하기...
인텔 아키텍처 메뉴얼을 보고 있는데요, 답답한 구석이 있어서 그 답답한 마음을 풀어보고자..
volume 3에 4.6.1 Accessing Data in Code Segments
에서 다음과 같이 나와있습니다.
In some Instances it may be desirable to access data structures that are contained in a code segment. The following methods of accessing data in code segments are possible:- Load a data-segment register with a segment selector for a nonconforming, readable, code segment.
- Load a data-segment register with a segment selector for a conforming, readable, code segment.
- Use a code-segment override prefix (CS) to read a readable, code segment whose selector is already loaded in the CS register.The same rules for accessing data segments apply to method 1. Method 2 is always valid because the privilege level of a conforming code segment is effectively the same as the CPL, regardless of its DPL. Method 3 is always valid because the DPL of the code segment selected by the CS register is the same as the CPL
이렇게 나와있습니다.
여기서 궁금한 점은 1번 2번 룰이 왜 항상 valid한지 이해가 가질 않습니다. 중간에 나와있는 effectively same하다는 말도 이상하고요..
제가 이해하고 있는점은 데이터 세그먼트를 엑세스하기 위해서는 해당 DPL이 운영중인 프로세스(또는 태스크)의 CPL보다 권한이 같거나 낮아야 한다는 것과 콜게이트를 사용하지 않고 넌컨퍼밍(nonconforming) 코드 세그먼트를 엑세스하기 위해서는 권한(privilege)이 0이면 실행중인 태스크의 CPL도 0이어야 엑세스가 가능하다는것. 콜 게이트는 다른넘들이 써야되므로 권한이 낮아야 된다는것, 컨퍼밍 코드 세그먼트는 CPL보다 DPL의 권한이 높아야 엑세스 가능하다는것 이정도로 이해하고 있습니다.
제가 이해력이 떨어지는건지.. 인텔 아키텍처는 참 복잡기도 하군요.. :cry:
[/code]
댓글 달기