Commit Graph

2514 Commits

Author SHA1 Message Date
Richard Hughes
f86c6add5f trivial: Load SMBIOS when using fwupdate to avoid a warning 2021-09-28 13:00:22 +01:00
Richard Hughes
c598ad6434 trivial: Fix a typo causing fwupdate to crash 2021-09-28 13:00:22 +01:00
Richard Hughes
8bd5c55425 uefi-capsule: Use accurate FuProgress values 2021-09-27 19:51:26 +01:00
Richard Hughes
a3cd497bd1 flashrom: Ensure internal devices get an assigned context
This makes the quirks work correctly. Fixes a warning seen in the logs.
2021-09-27 11:06:13 +01:00
Simon Ho
471c3e0c36
synaptics-cape: Add interrupt endpoint support (#3798)
Add new flag can receive HID report over Interrupt In endpoint instead
of control endpoint.

This commit also fixes a false error within software reset function.
2021-09-27 16:53:08 +08:00
Sean Rhodes
2694abeb71 plugins/flashrom: Update StarBook GUID
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2021-09-27 08:24:26 +01:00
Richard Hughes
08f4040fc8
superio: Continue to add the SuperIO-IT8587 instance IDs (#3796)
The GUIDs are in use by old firmware, and so of course we have to
continue adding them.

See https://github.com/fwupd/fwupd/pull/3734#issuecomment-919829988
2021-09-25 22:11:43 +01:00
Richard Hughes
35fff9684e trivial: Export the CFU enum conversion functions
We need these in the CFU plugin too.
2021-09-25 21:16:18 +01:00
Richard Hughes
478e44bc19 trivial: Do not use g_assert() in self test code
Note that g_assert() should not be used in unit tests, since it is a
no-op when compiling with G_DISABLE_ASSERT. Use g_assert() in production
code, and g_assert_true() in unit tests.

See https://github.com/fwupd/fwupd/issues/3790
2021-09-24 22:20:21 +01:00
Richard Hughes
36757c3eff trivial: Remove some instances of 'slave' that crept in 2021-09-24 20:46:28 +01:00
Daniel Campello
a2129c05d1 thunderbolt: fix host controller probing 2021-09-24 14:25:16 -05:00
Richard Hughes
7f5b0c0b60 Rename the development branch from master to main
Fixes https://github.com/fwupd/fwupd/issues/3799
2021-09-24 14:20:24 -05:00
Richard Hughes
4b09701452 redfish: Fix a potential NULL dereference spotted by Coverity 2021-09-24 19:03:52 +01:00
Sean Rhodes
f8ff84404c plugins/intel-spi: Add Union Point to SPI quirk
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2021-09-24 15:21:24 +01:00
Richard Hughes
431dbee65a Lower the GUsb dep to allow compiling on RHEL-8
This is something that I keep being asked to do...
2021-09-24 06:50:59 -05:00
Richard Hughes
3a86c7e386 elantp: Use the recently added FuCfuOffer and FuCfuPayload
This increases the amount of parsing we do ahead-of-time.
2021-09-24 08:40:42 +01:00
michaelcheng04
10549674b1 Add a plugin to flash Elan fingerprint reader hardware 2021-09-23 10:41:00 +01:00
Richard Hughes
907a60573d bcm57xx: Fix a FuProgress thinko 2021-09-21 16:20:20 +01:00
Richard Hughes
ac1ae33b05 redfish: Install the config file readable only by root
It's got a password there, so this seems entirely appropriate.
2021-09-21 15:35:09 +01:00
Richard Hughes
0955e08a72 redfish: Do not hardcode the KCS user_id to be 0x4 2021-09-21 15:35:09 +01:00
Gaël PORTAY
a11ebbc03d plugin: fix URL to fu-device-metadata.h
The commit 6b0e66354b moved the header to
libfwupdplugin.
2021-09-21 10:27:55 +01:00
Richard Hughes
543ae52e23 Document some of the environment variables used by fwupd
Fixes https://github.com/fwupd/fwupd/issues/3760
2021-09-21 10:25:12 +01:00
Mario Limonciello
5bf2ec7136 synaptics-mst: inhibit updates when customer ID not set
Users can't do anything about this.  This will prevent it showing
up in fwupdtool/fwupdmgr output by default.

Fixes: #3776
2021-09-20 08:46:12 -05:00
Mario Limonciello
7c2e2a0fd1 synaptics-mst: fix naming error when device has a parent
commit f878a7bcba made a mistake to
take the name of the device not the parent.

Fixes #3776
2021-09-20 08:46:12 -05:00
Ricardo Cañuelo
b050d9870f logitech-hidpp: fix quirk entry for future device 2021-09-20 10:21:44 +02:00
Ricardo Cañuelo
e47de909c0 logitech-hidpp: adhere more closely to the specs
The restart message is supposed to be HIDPP_REPORT_ID_LONG according to
the specs, but it works just as well if we use
HIDPP_REPORT_ID_SHORT. We better stick to the specs, though.
2021-09-20 10:21:44 +02:00
Ricardo Cañuelo
ab5c38b679 trivial: logitech-hidpp: fix request message setting 2021-09-20 10:21:44 +02:00
Ricardo Cañuelo
297653f728 logitech-hidpp: remove user action message from Bolt receiver update 2021-09-20 10:21:44 +02:00
Ricardo Cañuelo
c198055a54 logitech-hidpp: remove unnecessary 'bolt-peripheral' private flag 2021-09-20 10:21:44 +02:00
Richard Hughes
1ff96eb4b3 Restore the ABI for fu_device_detach() and provide new symbols
Quite a few plugins are using a FuDeviceLocker to detach then attach in
the error path, and finding them isn't easy as we explicitly cast to a
FuDeviceLockerFunc.

For sanity, just provide both symbols so we can do the right thing in
both cases. It seems like a sensible thing to allow.

Fixes https://github.com/fwupd/fwupd/issues/3771
2021-09-17 16:35:21 +01:00
Richard Hughes
3162c8540d Add new API for splitting an untrusted string
Using fu_common_strnsplit() has the drawback that a malicious user (or
a fuzzer!) could create a file with 5,000,000 newlines, and then pass
that into any parser that tokenizes into lines. This causes millions of
tiny allocations and quickly dirties hundreds of megabytes of RSS due
to heap overheads.

Rather than splitting a huge array and then processing each line, set
up a callback to process each line and only allocate the next string if
the token was parsed correctly. This means that we don't even dup the
buffer before we start parsing, rather than allocating everything and
then failing at the first hurdle.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38696
2021-09-17 14:46:45 +01:00
Richard Hughes
e50d911a59 logitech-hidpp: Use accurate FuProgress steps 2021-09-17 14:45:39 +01:00
Mario Limonciello
c0f242258b Fix probing the Dell TPM (Fixes: #3759)
Since commit 078beaf, device de-duplication between plugins doesn't
work anymore.  Both the TPM and Dell plugin create a device with an
identical physical ID and no logical ID.  This makes the device list
think whichever plugin probes second is just updating the first.

To avoid this problem, set a logical ID in the Dell plugin, ensuring
that the device ID built from physical + logical is different from the
TPM plugin.

The side effect of this is that both devices will export into the device
list, but the TPM plugin's devices will not be upgradable.
2021-09-16 13:52:44 -05:00
Mario Limonciello
ab65ea5db7 trivial: uefi-recovery: only run the plugin if efivar is available
This will cause it to disable on systems that are definitely not
relevant.
2021-09-16 06:44:27 -05:00
Mario Limonciello
35f62e1c84 trivial: msr: only run if /dev/cpu is present
I'm finding errors in a crostini container that the MSR plugin tries
to run and fails later.  The plugin just shouldn't be passing startup
if /dev/cpu isn't present.
2021-09-16 06:44:11 -05:00
Richard Hughes
c5dd4d4d4a pixart-rf: Use the correct method to add an instance ID
We actually check for fu_device_add_guid() not being an actual GUID,
but in the future we'll be warning if we do this magic fallback as it
hides not-quite-GUID typos.

No behaviour change.
2021-09-15 19:40:14 +01:00
Ricardo Cañuelo
26a1ddf49d logitech-hidpp: fix logical id for radio devices 2021-09-15 10:19:37 +02:00
Ricardo Cañuelo
5675e16274 logitech-hidpp: fix logical ids for BLE and paired devices 2021-09-15 10:19:37 +02:00
Simon Ho
5e67108ab8
plugins: add new plugin for Synaptics CAPE devices (#3746)
CAPE family is Audio DSP for a board range of applications in IOT, PC
and mobile can be interfaced via I2C, UART or USB interface. This patch
is only for CX31993 and CX31988 chips, there is not immediate plans is
to add support to other CAPE devices.

CX31993 have two separate firmware .hid file for for each partition. It
need to convert two .hid files into a .fw file for fwupd tool to
consume.

Currently, this patch is only support for EPOS headsets with basic
firmware update feature. Either new code singing or manifest.xml are
unsupported yet.

The code has been tested with CX31993 EVK board.

A test firmware file is put at 'src/fuzzing/firmware/synaptics-cape.fw'

synaptics-cape: Port to new FuProgress API and style fixups

synaptics-cape: Fix compile errors and add missing test fw file

Signed-off-by: Simon Ho <simon.ho@synaptics.com>

synaptics-cape: Fix fuzzer test

Signed-off-by: Simon Ho <simon.ho@synaptics.com>

synaptics-cape: Fix progress bar number

Signed-off-by: Simon Ho <simon.ho@synaptics.com>

synaptics-cape: Mark the fuzzing target

trivial: Use a stable GLib branch for fuzzing

synaptics-cape: Fix progress bar number

Signed-off-by: Simon Ho <simon.ho@synaptics.com>

synaptics-cape: Fix readme

synaptics-cape: Style fixups

synaptics-cape: Fix progress bar percentage

synaptics-cape: Style fixups
2021-09-15 03:42:07 +08:00
Richard Hughes
6817648c6b wacom-usb: Fix a false positive in real world firmware
Some files have a newline inbetween the AB sections.
2021-09-14 14:04:51 +01:00
Sean Rhodes
5d4e70e9cc
plugins/superio: Fix detection of IT5570 for StarBook Mk V (#3747) 2021-09-14 10:41:24 +01:00
Richard Hughes
d8d26e1f97 superio: Make the ports and timeouts specific to the DMI model
The chipset doesn't define the port like I guessed, as Tuxedo and Star
Labs both want to use a 0x5570 with different values.
2021-09-13 17:42:32 +01:00
Richard Hughes
9a2a4a211a synaptics-cxaudio: Use accurate FuProgress steps 2021-09-13 14:28:15 +01:00
Richard Hughes
40cd18fa97 Allow using a per-device global percentage completion
It's actually quite hard to build a front-end for fwupd at the moment
as you're never sure when the progress bar is going to zip back to 0%
and start all over again. Some plugins go 0..100% for write, others
go 0..100% for erase, then again for write, then *again* for verify.

By creating a helper object we can easily split up the progress of the
specific task, e.g. write_firmware().

We can encode at the plugin level "the erase takes 50% of the time, the
write takes 40% and the read takes 10%". This means we can have a
progressbar which goes up just once at a consistent speed.
2021-09-13 14:28:15 +01:00
Sean Rhodes
f959b198d2 plugins/flashrom: Fix logic in reset cmos
ioperm returns -1 for an error and 0 for success
2021-09-13 12:09:37 +01:00
Ricardo Cañuelo
15a39b94ee logitech-hidpp: Add support for updating Bolt peripheral firmware
Also simplify the Instance IDs added by the Bolt hardware.
2021-09-13 11:28:55 +01:00
Sean Rhodes
8cc158bda4 plugins/flashrom: Add reset-cmos flag to Star Labs laptops 2021-09-11 07:47:14 -05:00
Richard Hughes
8a9aea267c wacom-usb: Abort on invalid SREC files early to avoid a fuzzing timeout
Half a million new-lines was taking a long time to parse.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38381
2021-09-10 18:56:02 +01:00
Sean Rhodes
af9d9b3ffd plugins/flashrom: Add private flag to reset CMOS
Reset the CMOS based on a private flag. Tested on coreboot using an
offset of 123. Required when a CMOS layout or default option has
changed as the resulting flash will have 0's for the modified option.
2021-09-10 16:25:32 +01:00
Richard Hughes
b3824c94fa Fix a regression in flashing the Dell dock
This fixes a regression caused by 15b668c, we should have been more careful.

Fixes https://github.com/fwupd/fwupd/issues/3732
2021-09-10 15:50:52 +01:00