Commit Graph

1038 Commits

Author SHA1 Message Date
Sanjay Sheth
8e32b6a353 New plugin for Logitech Whiteboard camera 2022-11-17 16:42:04 +00:00
Richard Hughes
c79e14d63d Flip around the FuDeviceInstanceFlags logic
Opt-ing 'in' to each both behaviours requires less mental gymnastics compared
to having one flag inverted.
2022-11-04 13:44:23 +00:00
Richard Hughes
32e3241578 Do not add duplicate quirk instance IDs
It's pointless, and just wastes RSS.
2022-11-04 13:44:23 +00:00
Richard Hughes
26e1b7c49b Never hang in g_udev_device_get_parent() if there is never a busnum
Spotted by Coverity.
2022-11-03 23:51:00 -05:00
Richard Hughes
e79f0f23cb trivial: Do not show a critical warning without a request ID
If using old metadata (or when the device does not hard-require an update
message) just use something generic that cannot be replaced client-side.
2022-11-03 15:33:46 +00:00
Richard Hughes
1fafa92218 Ignored root partitions when getting the list of ESPs
Fixes the other half of https://github.com/fwupd/fwupd/issues/5211
2022-11-02 12:27:21 +00:00
Richard Hughes
3e1ce58560 Do not follow symlinks when uing fu_path_get_files()
Fixes half of https://github.com/fwupd/fwupd/issues/5211
2022-11-02 12:27:21 +00:00
Richard Hughes
064da70916 trivial: Fix docs warning for fu_udev_device_find_usb_device() 2022-11-01 16:23:17 +00:00
Richard Hughes
2b64a41dd6 trivial: Don't use _NO_AUTO_INSTANCE_IDS for MEI devices
This doesn't do what we thought it does.
2022-11-01 16:21:39 +00:00
Richard Hughes
6117f88b31 Do not hardcode mei0 for mei_me children 2022-11-01 16:19:27 +00:00
Richard Hughes
7222cafbb1 trivial: Ensure all private MEI instance data is incorporated 2022-11-01 16:19:27 +00:00
Richard Hughes
1f97275a33 Add fu_mei_device_get_fw_status() for future usage
All MEI devices support these attributes, and this API addition will allow us
to support new Intel GPUs and also modernize other plugins.
2022-11-01 16:19:27 +00:00
Richard Hughes
ae99b57b2a trivial: Fix over-constification in fu_udev_device_get_siblings_with_subsystem() 2022-11-01 16:19:27 +00:00
Richard Hughes
ee03652200 trivial: Allow specifying NULL for fu_udev_device_get_parent_with_subsystem() 2022-11-01 16:19:27 +00:00
Mario Limonciello
60c01af01c trivial: add missing log domain for efi signature list
Noticed this missing in https://github.com/fwupd/fwupd/issues/5211
2022-10-28 13:18:48 -05:00
Richard Hughes
912a578411 trivial: Be less verbose when parsing IHEX files 2022-10-27 15:29:45 +01:00
Richard Hughes
7a481183ee trivial: interpolate correctly when the old value is exactly zero 2022-10-27 15:29:32 +01:00
Richard Hughes
6547696efb trivial: Only ignore progress steps when they are all nonzero 2022-10-27 15:29:32 +01:00
Richard Hughes
b50b67107f Add fu_progress_to_string() to make debugging easier 2022-10-27 15:29:32 +01:00
Richard Hughes
577a512ce1 trivial: Fix the dell self tests with the new GUsb installed 2022-10-27 14:49:55 +01:00
Richard Hughes
ac48c865a0 Add a helper to get a GUsbDevice from a FuUdevDevice 2022-10-26 23:27:50 +01:00
Richard Hughes
2c321ac29b Emit a critical warning if a plugin tries to use HWIDs in ->init()
The HWIDs are only available for ->setup() and ->coldplug().
2022-10-25 10:46:29 -05:00
Richard Hughes
e8eaca0051 Save the ONLY_QUIRK instance IDs to fix incorporation of i2c
The baseclass is calling fu_device_build_instance_id_quirk() and when we
incorporate the device we were only copying the 'proper' instance IDs and not
the ones used for quirk matching -- which we need to match the devices that use
keys containing MODALIAS for the Plugin key to be set.
2022-10-25 15:39:30 +01:00
Richard Hughes
7c4398615e trivial: Watch the plugin config even if there's no ->startup() 2022-10-25 06:54:08 -05:00
Richard Hughes
5987a9691a Ensure the configure file is correct for built-in plugins
The fu_plugin_open() function is only called for modular plugins.
2022-10-25 06:54:08 -05:00
Richard Hughes
5a2ef166ee Support loading COSWID when only one role has been set
CBOR supports removing the array for only one base element, which the python
uSWID tools now support; allow parsing this in fwupd.
2022-10-24 16:12:00 +01:00
Richard Hughes
d1c6acd752 trivial: Return an error from fu_context_get_smbios_data() 2022-10-24 13:58:00 +01:00
Richard Hughes
06800069d4 Split out FuUefiPkDevice as a device for future use
This does not serve much purpose now, but would be useful if we need to know
more about the installed PK from other plugins. If nothing else it makes the
`--verbose` output more helpful.
2022-10-20 13:52:22 +01:00
Richard Hughes
5fcfe7f0fc Only count the Microsoft hashes when getting the dbx version
HP include extra keys that means the version is higher than expected.
2022-10-17 16:31:37 +01:00
Richard Hughes
0f8ec55f46 Add a new plugin to get more Intel ME MCA data
This allows us to get the OEM Public Key BootGuard hashes.

Also add a new HSI test for leaked bootguard keys.
2022-10-13 18:34:00 +01:00
Richard Hughes
ef04d0578f trivial: Fix a critical warning when using old kernel versions 2022-10-13 18:34:00 +01:00
Richard Hughes
6894f67dc5 Do not use GKeyFile to parse quirk files
There are two reasons for this. First is that GKeyFile is quite inefficient,
using a large amount of heap memory when loading. Given we don't actually use
the merge and replace functionality of GKeyFile and we only need line-by-line
access we can parse this ourselves and reduce the peak RSS considerably.

This also accidentally fixes another bug. Moving from multiple quirk files to
a single builtin.quirk meant that multiple subsystem plugins were deduped --
which isn't really what we wanted. For example, this now works:

    [MEI]
    Plugin = one
    [MEI]
    Plugin = two
2022-10-12 15:12:56 +01:00
Richard Hughes
2dea742004 Match the MEI UUID in quirk files
This allows us to be more specific when matching devices, and also means we get
more attributes 'for free' from the FuUdevDevice->probe().

This would allow us to have multiple device GTypes handling multiple MEI
interfaces in the same plugin., for instance, PTHI and MKHI.

The slight fly in the ointment is that the kernel does not set the 'dev' for
the mei_me devices, but it's always going to be just /dev/mei0, so hardcode it.
2022-10-12 13:17:42 +01:00
Richard Hughes
48557a428e Add fwupd_device_has_checksum() for future usage 2022-10-12 13:02:44 +01:00
Richard Hughes
366e3a5668 trivial: Define the HECI GUIDs in a central place 2022-10-11 16:17:20 +01:00
Richard Hughes
14e7e1b587 Use EFI-style GUIDs when connecting the MEI interface
This means the GUID matches what the kernel exports in sysfs.
2022-10-11 16:17:20 +01:00
Richard Hughes
a92a33f522 Add the correct instance ID for HUB devices 2022-10-08 08:47:08 +01:00
Richard Hughes
112e26e33d Make the CoSWID parser more full-featured 2022-10-07 16:25:31 +01:00
Richard Hughes
0110a3ebdf Fix a regression when getting the i2c bus number
When I replaced the regex with a fu_strtoull() in bb548f15 I missed that the
regex looked at the 2nd-to-last sysfs path element, e.g. the i2c bus number for
/sys/devices/pci0000:00/0000:00:15.2/i2c_designware.1/i2c-1/i2c-1AF80175:00 is
actually '1'.

This fixes enumerating the parade-lspcon on a Puff ChromeBox.
2022-10-07 16:24:55 +01:00
Richard Hughes
fb764b5187 trivial: Support writing compressed uSWID payloads 2022-10-07 14:52:31 +01:00
Richard Hughes
2fef67db3b trivial: Fix writing uSWIDv2 payloads
The optional flags come last in the header.
2022-10-07 14:52:31 +01:00
Richard Hughes
a01379f835 trivial: Use fu_strtobool() to parse the uSWID compressed attr 2022-10-07 14:52:31 +01:00
Richard Hughes
617137922d Add some more profiling to debug custom device GType creation
It turns out using tss2_esys is slow (200ms) -- and now we know.
2022-10-07 14:41:48 +01:00
Kai Michaelis
6054d09f35
redfish: Implement updates for Supermicro machines 2022-10-06 12:49:49 +01:00
Richard Hughes
f579c03223 trivial: Only show the DS20 debug output when debugging 2022-10-06 12:44:36 +01:00
Richard Hughes
ac27638878 Only request the BOS descriptor for newer libgusb versions
This fixes a deadlock only recently debugged and fixed in GUsb.
2022-10-06 12:44:36 +01:00
Richard Hughes
423637ef80 Use LVFS::UpdateRequestId to create a translated FwupdRequest 2022-10-06 10:30:31 +01:00
Richard Hughes
1b6438e8ff trivial: Only set the fallback builtin plugin name when required
We only want to use the gtype-generated name if the plugin has not already used
fu_plugin_set_name() to set a custom name.
2022-10-04 08:32:18 +01:00
Richard Hughes
a69341b228 trivial: Add a new env var to show MEI reads and writes 2022-10-01 13:10:21 +01:00
Richard Hughes
1f261ba283 Rename the source file and private data of modular plugins
This would allow us to convert more easily to a built-in plugin in the future
and means we match the source style used in 97% of the other plugins.

No logic changes.
2022-09-30 15:20:23 +01:00