[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[exelist] RDTSC in my brain



   Hi all!

 I must apologize for the last mystification.
RDTSC behaves on all CPUs (which support it) identically (I hope),
so it's NOT AMD bug.

 I made following mistakes:
1) I didn't test RDTSC in protected mode CPL3 (Win apps work FINE)
2) ROSEDIAG uses RDTSC and detects Windows, so I thought
   ROSE tested it (without problems) under Windows 9x.

 Anyway RDTSC is poorly documented (or better undocumented).
So I made more exact definition (+Interupt List):

Instruction: RDTSC
Description:
 IF [(CR4.TSD=0) or ((CR4.TSD=1) and (CPL=0))] and EFLAGS.VM=0  THEN
    {
    EDX:EAX <- TSC;
    }
     ELSE
    {
    General Protection Fault  INT 0DH (0)
    }
 END
-------------------

  You know there are (were) three groups of instructions:
A) privileged CPL0 or real mode only  (HLT)
 AA) trusted (CLI)
B) protected mode only (LSL)
C) all modes (NOP)

..but by introducing RDTSC (RDPMC ?) grew up new group:
D) not V86

 And now tell me what's the sense of this restriction:
Why is an instruction allowed in real mode and in protected mode CPL3
but disabled in V86 mode?
If you know the answer, you're king.

Moreover function of RDTSC is not crucial for supervising OS (no threat).

 If there is not good answer on the question above then
primary bug was in the design of instruction RDTSC (RDPMC).


  EliCZ

(because similar topics don't belong to EXElist, next time I will send
them to FFSElist)

(Letter written 31.12.98)



------------------------------------------------------------------------ZZZXXXZZZ
eGroup home: http://www.eGroups.com/list/exelist
Free Web-based e-mail groups by eGroups.com