mirror of
https://github.com/acidanthera/audk.git
synced 2025-09-22 01:07:44 +02:00
MdePkg/X86UnitTestHost: set rdrand cpuid bit
Set the rdrand feature bit when faking cpuid for host test cases. Needed to make the CryptoPkg test cases work. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
94961b8817
commit
5e776299a2
@ -66,6 +66,15 @@ UnitTestHostBaseLibAsmCpuid (
|
|||||||
OUT UINT32 *Edx OPTIONAL
|
OUT UINT32 *Edx OPTIONAL
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
UINT32 RetEcx;
|
||||||
|
|
||||||
|
RetEcx = 0;
|
||||||
|
switch (Index) {
|
||||||
|
case 1:
|
||||||
|
RetEcx |= BIT30; /* RdRand */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (Eax != NULL) {
|
if (Eax != NULL) {
|
||||||
*Eax = 0;
|
*Eax = 0;
|
||||||
}
|
}
|
||||||
@ -75,7 +84,7 @@ UnitTestHostBaseLibAsmCpuid (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Ecx != NULL) {
|
if (Ecx != NULL) {
|
||||||
*Ecx = 0;
|
*Ecx = RetEcx;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Edx != NULL) {
|
if (Edx != NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user