Merge pull request #3265 from SparkiDev/cpuid_set

Allow the CPU Id flags to be programmatically set
This commit is contained in:
toddouska
2020-09-16 15:00:30 -07:00
committed by GitHub
2 changed files with 20 additions and 0 deletions

View File

@ -108,4 +108,19 @@
cpuid_set_flags();
return cpuid_flags;
}
void cpuid_select_flags(word32 flags)
{
cpuid_flags = flags;
}
void cpuid_set_flag(word32 flag)
{
cpuid_flags |= flag;
}
void cpuid_clear_flag(word32 flag)
{
cpuid_flags &= ~flag;
}
#endif

View File

@ -54,6 +54,11 @@
void cpuid_set_flags(void);
word32 cpuid_get_flags(void);
/* Public APIs to modify flags. */
WOLFSSL_API void cpuid_select_flags(word32 flags);
WOLFSSL_API void cpuid_set_flag(word32 flag);
WOLFSSL_API void cpuid_clear_flag(word32 flag);
#endif
#ifdef __cplusplus