mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-27 09:25:38 +00:00
Correctly detect CET IBT
According to Intel, EDX[bit 20] corresponds to IBT feature, *not* ECX. Fixes half of https://github.com/fwupd/fwupd/issues/4960
This commit is contained in:
parent
1f7526cce1
commit
cc30929339
@ -250,8 +250,9 @@ fu_cpu_device_probe_extended_features(FuDevice *device, GError **error)
|
||||
FuCpuDevice *self = FU_CPU_DEVICE(device);
|
||||
guint32 ebx = 0;
|
||||
guint32 ecx = 0;
|
||||
guint32 edx = 0;
|
||||
|
||||
if (!fu_cpuid(0x7, NULL, &ebx, &ecx, NULL, error))
|
||||
if (!fu_cpuid(0x7, NULL, &ebx, &ecx, &edx, error))
|
||||
return FALSE;
|
||||
if ((ebx >> 20) & 0x1)
|
||||
self->flags |= FU_CPU_DEVICE_FLAG_SMAP;
|
||||
@ -259,7 +260,7 @@ fu_cpu_device_probe_extended_features(FuDevice *device, GError **error)
|
||||
self->flags |= FU_CPU_DEVICE_FLAG_SHSTK;
|
||||
if ((ecx >> 13) & 0x1)
|
||||
self->flags |= FU_CPU_DEVICE_FLAG_TME;
|
||||
if ((ecx >> 20) & 0x1)
|
||||
if ((edx >> 20) & 0x1)
|
||||
self->flags |= FU_CPU_DEVICE_FLAG_IBT;
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user