On 11/28/23 08:35, Lendacky, Thomas via groups.io wrote:
On 11/6/23 17:15, Tom Lendacky wrote:
On 11/6/23 16:45, Lendacky, Thomas via groups.io wrote:
The CPUID_EXTENDED_TOPOLOGY CPUID leaf takes a subleaf as input when
returning CPUID information. However, the AsmCpuid() function does not
zero out ECX before the CPUID instruction, so the input leaf is used as
the sub-leaf for the CPUID request and returns erroneous/invalid CPUID
data, since the intent of the request was to get data related to sub-leaf
0. Instead, use AsmCpuidEx() for the CPUID_EXTENDED_TOPOLOGY leaf.

Alternatively, the AsmCpuid() function could be changed to XOR ECX before invoking the CPUID instruction. This would ensure that the 0 sub-leaf is returned for any CPUID leaves that support sub-leaves. Thoughts?

Adding some additional maintainers for their thoughts, too.

Any thoughts on this approach (as a separate, unrelated patch) to eliminate future issues that could pop up?

Seems like zeroing out ECX before calling CPUID would be an appropriate thing to do, but I'm not sure if that will have any impact on the existing code base... it shouldn't, but you never know.

Just a re-ping for thoughts on this.

Thanks,
Tom


Thanks,
Tom


Thanks,
Tom


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113959): https://edk2.groups.io/g/devel/message/113959
Mute This Topic: https://groups.io/mt/102432782/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to