fwupd/plugins/dell/fu-plugin-dell.h
Richard Hughes e87fc05ab9 Speed up the daemon startup by ~2% by doing dlsym much less
We were calling g_module_symbol() 2703 times, which is actually more
expensive than you'd think.

It also means the plugins are actually what we tell people they are:
A set of vfuncs that get run. The reality before that they were dlsym'd
functions that get called at pretty random times.
2021-11-09 12:02:07 +00:00

48 lines
979 B
C

/*
* Copyright (C) 2016 Mario Limonciello <mario.limonciello@dell.com>
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#pragma once
#include <fwupdplugin.h>
#include "fu-dell-smi.h"
struct FuPluginData {
FuDellSmiObj *smi_obj;
guint16 fake_vid;
guint16 fake_pid;
gboolean can_switch_modes;
gboolean capsule_supported;
};
void
fu_plugin_dell_inject_fake_data(FuPlugin *plugin,
guint32 *output,
guint16 vid,
guint16 pid,
guint8 *buf,
gboolean can_switch_modes);
gboolean
fu_plugin_dell_detect_tpm(FuPlugin *plugin, GError **error);
gboolean
fu_plugin_dell_backend_device_added(FuPlugin *plugin, FuDevice *device, GError **error);
/* These are nodes that will indicate information about
* the TPM status
*/
struct tpm_status {
guint32 ret;
guint32 fw_version;
guint32 status;
guint32 flashes_left;
};
#define TPM_EN_MASK 0x0001
#define TPM_OWN_MASK 0x0004
#define TPM_TYPE_MASK 0x0F00
#define TPM_1_2_MODE 0x0001
#define TPM_2_0_MODE 0x0002