fwupd/plugins/cpu/fu-cpu-device.h
Richard Hughes 8307bd603e cpu: Directly probe the CPUID data to improve startup speed
This is much more efficient than parsing hundreds of lines of /proc/cpuinfo
and also causes hundreds of thousands less allocations at startup. For systems
with dozens of virtual CPUs the deduplication of device objects was increasing
start up time considerably.

Use the msr plugin to read the microcode version as this is not obtained using
CPUID, as it is instead being provided in an MSR.
2020-08-24 16:37:27 +01:00

25 lines
623 B
C

/*
* Copyright (C) 2020 Mario Limonciello <mario.limonciello@dell.com>
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#pragma once
#include "fu-plugin.h"
#define FU_TYPE_CPU_DEVICE (fu_cpu_device_get_type ())
G_DECLARE_FINAL_TYPE (FuCpuDevice, fu_cpu_device, FU, CPU_DEVICE, FuDevice)
typedef enum {
FU_CPU_DEVICE_FLAG_NONE = 0,
FU_CPU_DEVICE_FLAG_SHSTK = 1 << 0,
FU_CPU_DEVICE_FLAG_IBT = 1 << 1,
FU_CPU_DEVICE_FLAG_TME = 1 << 2,
FU_CPU_DEVICE_FLAG_SMAP = 1 << 3,
} FuCpuDeviceFlag;
FuCpuDevice *fu_cpu_device_new (void);
gboolean fu_cpu_device_has_flag (FuCpuDevice *self,
FuCpuDeviceFlag flag);