Richard Hughes
f3c64adb6c
intel-spi: Allow downloading the firmware image from the eSPI controller
...
Add the IFD regions as child devices and set the region access on the child
devices. Also add read-only SPI descriptor as an HSI attribute and require
FLOCKDN on Intel hardware.
Use the hidden PCI 00:1f.5 device to set the SPIBAR automatically and generate
the quirk file automatically to support more hardware.
2021-04-01 21:56:35 +01:00
Richard Hughes
b333e0045c
Split out a shared system context
...
There is a lot of code in fwupd that just assigns a shared object type to
a FuPlugin, and then for each device on that plugin assigns that same shared
object to each FuDevice.
Rather than proxy several kinds of information stores over two different levels
of abstraction create a 'context' which contains the shared *system* state
between the daemon, the plugins and the daemon.
This will allow us to hold other per-machine state in the future, for instance
the system battery level or AC state.
2021-04-01 21:11:29 +01:00
Richard Hughes
0d4255b589
vli: Remove deprecated quirk prefixes
2021-04-01 18:40:14 +01:00
Daniel Campello
f82ce6ecb6
flashrom: Update plugin to support multiple devices
...
This change moves many of the logic at the plugin level to the device
level in order to support multiple devices updatable via libflashrom.
2021-04-01 16:40:09 +01:00
Richard Hughes
74ac5ab86d
trivial: Add fu_device_remove_flag() as a proper symbol
...
This allows us to automatically uninhibit() like we do in fu_device_add_flag().
2021-03-31 19:19:46 +01:00
Richard Hughes
b9ac0bc029
Add fu_device_inhibit() to mark the device as non-updatable
...
We already have two things managing the UPDATABLE_HIDDEN->UPDATABLE transition,
and we're about to add a third.
Add a 'stackable' inhibit-style API so we do not accidentally mark a device as
updatable when it should remain hidden.
2021-03-31 19:19:46 +01:00
Richard Hughes
62a8b0c288
Add fu_device_set_battery_threshold() ( #3086 )
...
This allows a device to set a custom 'check battery level is X%' value from
either the plugin or from a quirk.
2021-03-31 16:43:36 +01:00
Richard Hughes
18dcb6f511
wacom-raw: Fix an impossible to hit overflow ( #3082 )
...
Spotted by Coverity.
2021-03-31 16:30:59 +01:00
memily
c255034574
vli: Add VL822 device+share-spi-pd
...
Co-authored-by: Emily Miller <m_emily@berkeley.com>
2021-03-30 13:06:49 +01:00
Richard Hughes
baf10157dd
pixart-rf: Retry the SetReport after a successfull firmware update
2021-03-29 10:23:16 +01:00
Richard Hughes
dd61689073
Add fu_device_add_security_attrs()
2021-03-28 17:54:19 +01:00
Steve McIntyre
50348e1104
Tweak the SBAT output for a vendor string
...
The format is meant to be "<project>.<vendor>" with a period as a
separator.
Signed-off-by: Steve McIntyre <93sam@debian.org>
2021-03-26 15:21:15 +00:00
Benson Leung
ef7262f19f
trivial: cros-ec: Fix error string to use inlen
...
Looks like this error message was copy/pasted from above.
Since we're testing whether actual != inlen, the error message should
output inlen.
2021-03-25 15:12:54 -07:00
Benson Leung
3dba442c1f
cros-ec: Fix call to fu_memdup_safe in fu_cros_ec_usb_device_do_xfer
...
outbuf == NULL is a valid condition in fu_cros_ec_usb_device_do_xfer. That's
how we use this function to specify a read with no outbound buffer, like the
reply at the end of sending a block.
Since 9b11af985f
("Add fu_memdup_safe()"), however, the call to fu_memdup_safe
always fails if outbuf, the dst, is NULL.
Fix this by moving this into the if (outbuf != NULL && outlen > 0) block below.
Fixes: 9b11af985f
("Add fu_memdup_safe()")
fixes #3064
2021-03-25 21:27:48 +00:00
Richard Hughes
f08491f727
synaptics-cxaudio: Retry GetReport to fix an enumeration failure
2021-03-25 14:30:07 +00:00
JimmyYu
af1e70ad92
pixart: Modify ota retransmit flow
2021-03-22 17:48:08 +01:00
David Chiu
98328679ab
synaptics-rmi: Force the hardware into IEP mode as required
2021-03-22 07:51:06 +00:00
David Chiu
02404b0797
synaptics-rmi: Fix regression when setting edpAuxStatusRequest
2021-03-22 07:51:06 +00:00
David Chiu
09ad3a7f93
synaptics-rmi: Allow failure when writing and erasing
2021-03-22 07:51:06 +00:00
David Chiu
f9a0b04389
synaptics-rmi: Validate the firmware signature correctly
2021-03-22 07:51:06 +00:00
David Chiu
b15f393494
synaptics-rmi: Reduce the idle wait time
2021-03-22 07:51:06 +00:00
Richard Hughes
ece778c83d
intel-spi: Fix a typo spotted by Coverity
2021-03-20 17:33:18 +00:00
Richard Hughes
276baf12f9
trivial: Rename spi to intel-spi as it's all Intel specific
...
If we need to export the EFI symbols into libfwupdplugin for other plugins we
can do that when we need them.
2021-03-20 12:24:27 +00:00
Richard Hughes
be83a8eeea
spi: Fix a oss-fuzz detected critical warning
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32249
2021-03-19 18:00:59 +00:00
Richard Hughes
a5966f7085
trivial: Codespell fixes
2021-03-19 16:42:33 +00:00
Benson Leung
aad1b98e2c
cros-ec: Add D501 Baklava device support
...
Baklava is based on Quiche and will work with cros-ec plugin.
fixes #3044
2021-03-18 14:29:42 -07:00
Richard Hughes
119d260bd2
trivial: Limit alignment to 2GB to fix a fuzzing crash
...
This meant defining alignment values in FuFirmware.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32131
2021-03-17 11:14:46 +00:00
Richard Hughes
f0e77fb2ab
trivial: Use fu_byte_array_append_bytes() in a few more places
2021-03-17 11:14:46 +00:00
Richard Hughes
220aa3ac42
spi: Only show the flash_master output when debugging
2021-03-17 11:12:52 +00:00
Sean Rhodes
e5c67b0cde
Removed PciBcr Quirk
2021-03-15 18:56:54 +00:00
Richard Hughes
aa95f30390
Allow reading the PciBcrAddr quirk from flashrom devices
2021-03-15 18:30:05 +00:00
JimmyYu
bc39faf4cf
pixart: Add check result in fw upgrade response
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2021-03-15 13:07:13 +00:00
Richard Hughes
52441f28a4
Allow objects to deserialize to XML
...
This makes a lot more sense; we can parse a firmware and export the same XML
we would use in a .builder.xml file. This allows us to two two things:
* Check we can round trip from XML -> binary -> XML
* Using a .builder.xml file we can check ->write() is endian safe
2021-03-15 12:07:30 +00:00
Richard Hughes
278c3998a5
Parse the IFD BIOS section into EFI FV and FFS2 sections
2021-03-15 10:46:39 +00:00
Richard Hughes
408b056984
trivial: Use fu_byte_array_append_bytes() in more places
2021-03-15 09:46:02 +00:00
Richard Hughes
664226a350
spi: Move all the IFD parsing to the new 'spi' plugin
...
We do not want to export this unfinished API, and it's probably best just to
not compile it by default until it is actually useful.
2021-03-15 09:45:17 +00:00
Richard Hughes
be527a8a60
trivial: Fix up the self test report for the bcm57xx binary
2021-03-13 16:16:27 +00:00
Benson Leung
f7832847f5
cros-ec: Allow a failure to write a section, do another write
...
The RO partition's USB endpoint has been observed to occasionally hiccup
(usb disconnect and reenumeration) upon reboot and initial attach, causing a
failure to update a section. Rather that making this fatal, let's set
ANOTHER_WRITE_REQUIRED and allow us to handle the new USB device after
this event.
fixes #3012
2021-03-13 07:58:05 -08:00
Richard Hughes
91324a13c0
pixart: Call finalize() on FuFirmware to avoid leaking
2021-03-12 15:51:25 +00:00
Richard Hughes
81d0502f1a
cros-ec: Fix up some uses of GError
2021-03-11 13:05:43 -08:00
Richard Hughes
42dcff32ca
wacom-usb: Add support for writing firmware
2021-03-11 15:48:02 +00:00
Richard Hughes
e574a942c8
wacom-usb: Fix firmware parse regression from FuFirmwareImage removal
2021-03-11 15:48:02 +00:00
Ricardo Cañuelo
2619442293
pixart: Detect multiple devices of the same type
...
Set the logical_id to the HID_UNIQ string instead of using the vendor,
device and model info.
2021-03-11 14:38:55 +01:00
Richard Hughes
ee48857806
pixart: Support building firmware with the model_name metadata
2021-03-11 12:04:00 +00:00
Richard Hughes
a910070570
bcm57xx: Allow the STAGE1_VERADDR to be unset
2021-03-11 10:14:29 +00:00
Richard Hughes
5f43586877
bcm57xx: Actually write the stage1 version into the file
2021-03-11 10:14:29 +00:00
Richard Hughes
50d05164d3
solokey: Add support for writing firmware
2021-03-11 10:13:46 +00:00
Richard Hughes
fecd3ae4ad
ebitdo: Add support for writing firmware
2021-03-10 21:33:28 -06:00
Richard Hughes
35a5962991
synaptics-mst: Add support for writing firmware
2021-03-10 16:35:43 -06:00
Richard Hughes
2667e4bdc1
synaptics-rmi: Never create a zero-sized v10 container
2021-03-10 21:00:18 +00:00