Commit Graph

9633 Commits

Author SHA1 Message Date
Richard Hughes
0d60fa319f trivial: Fix two gi-docgen issues 2022-09-20 10:16:55 +01:00
Mario Limonciello
fe5d93f7d2 trivial: wait for network to be online to run fwupd-refresh.service 2022-09-19 14:52:42 -05:00
Mario Limonciello
8a90d9bed4 trivial: Add RELEASE steps for flatpak and snap
These are both requiring manual steps now, so document them in the
release process.
2022-09-19 14:32:57 -05:00
Mario Limonciello
8bb10ffaa7 Update the snap build
Use core22 and subsume a bunch of dependencies that can come from the
Ubuntu archive now during build instead.

This doesn't restore the CI functionality yet, but it at least builds
locally for me OK.
2022-09-19 13:33:54 -05:00
Mario Limonciello
4e130ea003 trivial: disable void ci for now 2022-09-19 13:33:54 -05:00
Mario Limonciello
e8ca440bad Add new plugin to display SMU firmware version on AMD APU/CPU
This plugin is read-only, but can be used to tell what version of
SMU firmware is installed.
2022-09-19 06:51:27 -05:00
Richard Hughes
aba96e4a4a pixart-rf: Fix the endianness of the magic
This was probably broken in 0c51630991

Mea culpa.
2022-09-18 12:40:33 +01:00
Richard Hughes
b4f2d10562 trivial: Add some links to the BDP and ESP defines 2022-09-17 13:43:22 +01:00
Richard Hughes
e72ed08b56 Always check the BDP partitions when getting all the possible ESPs
Fixes https://github.com/fwupd/fwupd/issues/5035
2022-09-17 13:41:36 +01:00
Richard Hughes
48beb87faf Copy backend tags to the GUsbDevice when possible.
This allows the backend to identify the specific device for a specific phase.

For instance, there might be a pre-update runtime, a bootloader and a
post-update runtime and allowing tags to be saved to the backend object allows
us to identify each version of the same physical device.

This takes us one step closer to emulating a complete byte-perfect end-to-end
update without actual hardware installed.
2022-09-14 16:54:55 +01:00
Richard Hughes
139188a5b0 Allow adding backend tags to devices
This allows the backend to identify the specific device for a specific phase.

For instance, there might be a pre-update runtime, a bootloader and a
post-update runtime and allowing tags to be saved to the backend object allows
us to identify each version of the same physical device.

This takes us one step closer to emulating a complete byte-perfect end-to-end
update without actual hardware installed.
2022-09-14 16:54:55 +01:00
Mario Limonciello
6ce4244edd trivial: fix reading the microcode version on AMD systems
The kernel will issue a CPUID of 0x1 before reading microcode.
Align this behavior with the MSR plugin.

AMD and Intel align their microcode diffrently in MSR 0x8b.
* Intel it's 4 bytes in.
* AMD it's at the start of the MSR.
2022-09-13 11:10:45 -05:00
Mario Limonciello
fbe9c6444e trivial: fu-util-common: RO devices w/ FW versions are interesting
Sometimes even if fwupd can't upgrade these devices they're
interesting to end users because they may show information that
can otherwise only be obtained by tearing apart firmware or
using extra arguments.

Amend the default behavior to let these show up.
2022-09-13 09:57:29 -05:00
Richard Hughes
891bae783c Show the USB4 NVM device ID in the debug output
Otherwise there's no way to find out what value the big-table-of-data needs.
2022-09-13 14:25:15 +01:00
Richard Hughes
404ab8e3e9 trivial: Rename the internal NvmProductId to NvmModelId to match Intel docs
This preserves sanity when comparing numbers from vendors.
2022-09-13 14:25:15 +01:00
Mario Limonciello
561c8661f8 trivial: convert pci-psp plugin to create and use a device
In general this is a cleanup, means less vfuncs that get called when
devices are added. Beyon the optimization functionally should be a
no-op for fwupd.  It will also potentially storing the version
to the newly created secure processor device in the future.
2022-09-13 07:14:22 -05:00
Richard Hughes
bfebede490 Add support for platform capability descriptors so devices can set quirks
This feature adds support for platform capability BOS descriptors which allows
the device itself to ship quirk data.

Use `sudo fwupdtool get-devices --save-backends=FILENAME` to save fake backend
devices to a file. This allows easy creation of self tests that do not require
physical hardware.
2022-09-13 12:07:35 +01:00
Dylan Van Assche
a8017e0a4f mtd: expose Pine64 PinePhone Pro MTD as Tow-Boot
Pine64 PinePhone Pro has an SPI device which is handled by the MTD
plugin and comes with Tow-Boot pre-installed from the factory.
Expose it as Tow-Boot and mark the firmware type with uSWID for version
extraction. However, it does not provide uSWID data so users have to manually
upgrade to a Tow-Boot version with uSWID data support first.
2022-09-12 14:51:14 +01:00
Richard Hughes
d0edac7b67 trivial: Move to macos-12 for CI 2022-09-12 14:47:51 +01:00
Richard Hughes
84a27ea8b9 Fix a fuzzing crash when parsing malicious FDT data 2022-09-12 13:48:45 +01:00
Richard Hughes
e358cc7bde Set the firmware contents even when subclassing ->parse() 2022-09-10 09:16:05 +01:00
Richard Hughes
e8684d9f65 Check for plugin conflicts slightly quicker 2022-09-09 19:23:29 +01:00
Richard Hughes
ee57012df2 trivial: Work around a clang checker false-positive 2022-09-09 19:23:29 +01:00
Richard Hughes
1dab4f67cf modem-manager: Fix debug format string
PVS: The size_t type argument is expected.
2022-09-09 19:23:29 +01:00
Richard Hughes
e17f41b638 rts54hid: Fix possible unsafe memcpy()
PVS: A call of the 'memcpy' function will lead to underflow of the buffer.
2022-09-09 19:23:29 +01:00
Richard Hughes
d8c464889a logitech-hidpp: Fix possible unsafe memcpy()
PVS: A call of the 'memcpy' function will lead to underflow of the buffer.
2022-09-09 19:23:29 +01:00
Richard Hughes
c19d7d8b9f trivial: Workaround PVS false-positive 2022-09-09 19:23:29 +01:00
Richard Hughes
824f634244 dfu-csr: Fix uploading to devices
This was due to an overzealous sed script running in 90254a5152.

PVS: A call of the 'memcmp' function will lead to underflow of the buffer.
2022-09-09 19:23:29 +01:00
Richard Hughes
f7b4f43744 Fix checking for invalid depth requirements
PVS: It's possible that the 'device_tmp' should be checked here.
2022-09-09 19:23:29 +01:00
Richard Hughes
4b16f66948 trivial: Check for impossible NULL child before dereferencing
PVS
2022-09-09 19:23:29 +01:00
Richard Hughes
af3d1116f6 parade-lspcon: Remove trivial dead init
PVS: The 'write_data[0]' variable was assigned the same value.
2022-09-09 19:23:29 +01:00
Richard Hughes
e6e476a0e7 emmc: Use struct init to set mmc_ioc_cmd
PVS: The 'idata.write_flag' variable was assigned the same value.
2022-09-09 19:23:29 +01:00
Richard Hughes
67a0812b92 logitech-hidpp: Fix debug text when getting a HIDPP error message
PVS: Two or more case-branches perform the same actions.
2022-09-09 19:23:29 +01:00
Richard Hughes
01994a993a trivial: Fix impossible crash when the firmware search path is NULL
PVS: The 'contents' pointer was used unsafely after it was verified against nullptr.
2022-09-09 19:23:29 +01:00
Richard Hughes
6bb1b1c81f trivial: Fix a BIOS setting self test value
PVS: The 'ret' variable is assigned but is not used by the end of the function.
2022-09-09 19:23:29 +01:00
Richard Hughes
9ab03d586e Fix aligning up addresses greater than 4GB
PVS: The size of the bit mask is less than the size of the first operand.
2022-09-09 19:23:29 +01:00
Richard Hughes
aa71485cc5 trivial: Fix a few theoretical memory leaks that can't happen in reality
PVS: The function was exited without releasing the 'str' pointer.
2022-09-09 19:23:29 +01:00
Richard Hughes
e84e8b6927 redfish: Use the passed offset when parsing SMBIOS tables
PVS: Parameter 'offset' is always rewritten in function body before being used.
2022-09-09 19:23:29 +01:00
Richard Hughes
c3851c82c8 trivial: Remove duplicate line
PVS: Two identical blocks of text were found.
2022-09-09 19:23:29 +01:00
Richard Hughes
a74e383f8d synaptics-cxaudio: Use fu_strtobool() to parse TRUE and FALSE
PVS: Converting type 'guint64' to type 'gboolean' can lead to a loss of high-order bits.
2022-09-09 19:23:29 +01:00
Richard Hughes
f49d5ed10c trivial: Fix invalid printf() usage
PVS: The line being passed could contain format specification.
2022-09-09 19:23:29 +01:00
Richard Hughes
76138349e2 Fix a potential critical warning when parsing firmware
PVS: The 'filename' pointer was utilized before it was verified against nullptr.
2022-09-09 19:23:29 +01:00
Richard Hughes
890a48045e trivial: Remove a duplicate line
The conditional expressions of the 'if' statements situated alongside each other are identical.
2022-09-09 19:23:29 +01:00
Richard Hughes
5014c87a2a trivial: Remove a condition that can never be non-valid
PVS: A part of conditional expression is always true: priv->children->len > 0.
2022-09-09 19:23:29 +01:00
Richard Hughes
72f6cc5a0a redfish: Fix a condition that can never be false
PVS: A part of conditional expression is always true: path != NULL.
2022-09-09 19:23:29 +01:00
Richard Hughes
08a9f02912 Use the correct JSON type for fwupd_bios_setting_from_json()
PVS: Converting type 'gint64' to type 'gboolean' can lead to a loss of high-order bits.
2022-09-09 19:23:29 +01:00
Richard Hughes
d88e6b4a1e trivial: Relax the requirement that fu_firmware_set_bytes() can only be called once
PVS: Expression 'priv->bytes != NULL' is always false.
2022-09-09 19:23:29 +01:00
Richard Hughes
5e3a601da9 trivial: Remove a useless g_return_val_if_fail()
PVS: Expression 'sender != NULL' is always true.
2022-09-09 19:23:29 +01:00
Richard Hughes
6a5eda0a44 trivial: Use G_GSSIZE_FORMAT in more places 2022-09-09 19:23:29 +01:00
Richard Hughes
908c1d8c02 modem-manager: Do not print (null)
PVS: Incorrect format. A null pointer is used.
2022-09-09 19:23:29 +01:00