Implement HlReadTimeStampCounter() routine
ステータスチェックはすべて成功しました
ci/woodpecker/push/build Pipeline was successful

このコミットが含まれているのは:
Rafal Kupiec 2022-12-27 23:28:27 +01:00
コミット fcfa575bff
署名者: belliash
GPGキーID: 4E829243E0CFE6B4
4個のファイルの変更47行の追加0行の削除

ファイルの表示

@ -69,6 +69,10 @@ XTCDECL
ULONGLONG
HlReadModelSpecificRegister(IN ULONG Register);
XTCDECL
ULONGLONG
HlReadTimeStampCounter();
XTCDECL
VOID
HlSetInterruptFlag();

ファイルの表示

@ -69,6 +69,10 @@ XTCDECL
ULONGLONG
HlReadModelSpecificRegister(IN ULONG Register);
XTCDECL
ULONGLONG
HlReadTimeStampCounter();
XTCDECL
VOID
HlSetInterruptFlag();

ファイルの表示

@ -321,6 +321,26 @@ HlReadModelSpecificRegister(IN ULONG Register)
return ((ULONGLONG)High << 32) | Low;
}
/**
* 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 Low, High;
asm volatile("rdtsc"
:"=a"(Low),
"=d"(High));
return ((ULONGLONG)High << 32) | Low;
}
/**
* Instructs the processor to set the interrupt flag.
*

ファイルの表示

@ -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.
*