mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-16 17:43:11 +00:00
Detect tsx_force_abort presence and print to log
This commit is contained in:
parent
cafa4521ee
commit
f90f68d129
13
Utilities/sysinfo.cpp
Normal file → Executable file
13
Utilities/sysinfo.cpp
Normal file → Executable file
@ -44,6 +44,12 @@ bool utils::has_rtm()
|
|||||||
return g_value;
|
return g_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool utils::has_tsx_force_abort()
|
||||||
|
{
|
||||||
|
static const bool g_value = get_cpuid(0, 0)[0] >= 0x7 && (get_cpuid(7, 0)[3] & 0x2000) == 0x2000;
|
||||||
|
return g_value;
|
||||||
|
}
|
||||||
|
|
||||||
bool utils::has_mpx()
|
bool utils::has_mpx()
|
||||||
{
|
{
|
||||||
static const bool g_value = get_cpuid(0, 0)[0] >= 0x7 && (get_cpuid(7, 0)[1] & 0x4000) == 0x4000;
|
static const bool g_value = get_cpuid(0, 0)[0] >= 0x7 && (get_cpuid(7, 0)[1] & 0x4000) == 0x4000;
|
||||||
@ -127,10 +133,17 @@ std::string utils::get_system_info()
|
|||||||
if (has_rtm())
|
if (has_rtm())
|
||||||
{
|
{
|
||||||
result += " | TSX";
|
result += " | TSX";
|
||||||
|
|
||||||
|
if (has_tsx_force_abort())
|
||||||
|
{
|
||||||
|
result += "-FA";
|
||||||
|
}
|
||||||
|
|
||||||
if (!has_mpx())
|
if (!has_mpx())
|
||||||
{
|
{
|
||||||
result += " disabled by default";
|
result += " disabled by default";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
2
Utilities/sysinfo.h
Normal file → Executable file
2
Utilities/sysinfo.h
Normal file → Executable file
@ -37,6 +37,8 @@ namespace utils
|
|||||||
|
|
||||||
bool has_rtm();
|
bool has_rtm();
|
||||||
|
|
||||||
|
bool has_tsx_force_abort();
|
||||||
|
|
||||||
bool has_mpx();
|
bool has_mpx();
|
||||||
|
|
||||||
bool has_512();
|
bool has_512();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user