Implement HlReadTimeStampCounter() routine

此提交包含在:
2022-12-27 23:28:27 +01:00
父節點 f46615f92c
當前提交 fcfa575bff
共有 4 個檔案被更改,包括 47 行新增 和 0 行删除
+19
查看文件
@@ -313,6 +313,25 @@ HlReadModelSpecificRegister(IN ULONG Register)
return Value;
}
/**
* Reads the current value of the CPU's time-stamp counter.
*
* @return This routine returns the current instruction cycle count since the processor was started.
*
* @since XT 1.0
*/
XTCDECL
ULONGLONG
HlReadTimeStampCounter()
{
ULONGLONG Value;
asm volatile("rdtsc"
: "=A"(Value));
return Value;
}
/**
* Instructs the processor to set the interrupt flag.
*