Commit Graph

6955 Commits

Author SHA1 Message Date
Mario Limonciello
55af9a8238 trivial: return an error string rather than HSI number for missing data 2022-04-03 09:06:00 -05:00
Mario Limonciello
fc59a9bce1 trivial: linux-lockdown: Check kernel supports lockdown
There is no use making a file monitor on a missing path and
running on an older kernel should cause HSI to show missing data.
2022-04-03 09:06:00 -05:00
Mario Limonciello
ee4d369860 fu-util/fu-tool: Drop the --force on every run
--force was there because HSI specification was incomplete.  However
now we have the ability for plugins to report when not enough data
was gathered to make a calculation.  So change it to instead only
run if enough data was gathered.
2022-04-03 09:06:00 -05:00
Mario Limonciello
26349d0f28 cpu: Add a new attribute for CPU supported by HSI
On supported CPUs this will show up at HSI level 1 meaning that HSI
should be supported and trusted on this CPU if all plugins provided
enough data.

On non-Intel CPUs this will show up as missing data, meaning
that not enough plugins provide data for HSI to be trusted by default.
2022-04-03 09:06:00 -05:00
Mario Limonciello
2f086c2bbc Add a new security attribute flag of "missing data"
This attribute flag will be used to determine whether or not enough
data has been provided to make a security level calculation.
2022-04-03 09:06:00 -05:00
Mario Limonciello
0df2b57ae9 Add a new plugin for the ACPI IVRS table
This ACPI table contains a flag that is used for indicating pre-boot
DMA protection on AMD systems.
2022-04-03 09:05:49 -05:00
Mario Limonciello
a93feda72b trivial: rename the DMAR attribute to be vendor agnostic
The DMAR attribute is for Intel only, but AMD has the same feature in
the IVRS table.  Rename the attribute to clarify this.
2022-04-03 09:05:49 -05:00
Mario Limonciello
3c48cf464b trivial: linux-swap: Don't create attribute unless kernel has support 2022-04-02 15:08:16 -05:00
Gaël PORTAY
31dc35f9e3 genesys: usbhub: Fix test for static_tool_string value
Additionally, this regroups the call of a function and the test for the
returned value.
2022-04-02 09:51:04 +01:00
Gaël PORTAY
1d8956de6e cfi: Add Macronix MX25V2033F and MX25L3236F 2022-04-02 07:28:58 +01:00
Gaël PORTAY
90a9c0de27 cfi: Add GigaDevice GD25Q20C and GD25Q32C 2022-04-02 07:28:58 +01:00
Gaël PORTAY
fcf436d0d0 cfi: Add Fudan FM25F01 and FM25W04 2022-04-02 07:28:58 +01:00
Richard Hughes
0c052d4417 trivial: Be more selective when choosing devices to update 2022-04-01 21:46:04 -05:00
Richard Hughes
35417dcebd trivial: Be more selective when choosing devices to detach 2022-04-01 21:46:04 -05:00
Richard Hughes
481301a39d trivial: Convert more things to fu_progress_step_done()
This allows the front end client to know ahead-of-time how many steps
there are going to be.
2022-04-01 21:46:04 -05:00
Richard Hughes
7dc34ff02e Mark more devices as CAN_VERIFY_IMAGE
This allows us to filter the devices when showing what we can dump.
2022-04-01 21:46:04 -05:00
Richard Hughes
18f3b927e0 Add some default size values to the CFI device 2022-04-01 19:35:36 +01:00
Mario Limonciello
47920197a4 trivial: fix behavior when running on old json-glib
older json-glib versions can't work with saving or retrieving
HSI security events.  Rather than showing non-sensical errors
about too old of a json glib version that are out of context,
just compile this stuff out on the older versions.

This fixes HSI security events showing up too as a result.
2022-04-01 12:46:41 -05:00
Jeremy Soller
09f3a627c2 trivial: Add HP Dev One quirk with no-ux-capsule flag 2022-04-01 11:18:12 -05:00
Gaël PORTAY
e71df0d494 genesys: usbhub: Rename function to _get_code_size()
This renames the function `fu_genesys_usbhub_device_get_fw_size()` to
`fu_genesys_usbhub_device_get_code_size()` which set the attribute
`code_size`.
2022-04-01 15:47:14 +01:00
Gaël PORTAY
9213a51d4a genesys: usbhub: Set extended size for devices with public-key only
This conditionizes the extended size for devices that has public-key
support (i.e. has the private flag has-public-key; GL3523 only).
2022-04-01 15:47:14 +01:00
Gaël PORTAY
e22eaf0726 genesys: usbhub: Fix firmware max size regression
This fixes commit 1ade02e944.

Fixes:

	firmware too large, got 0x6312, expected <= 0x6000
2022-04-01 15:47:14 +01:00
Michał Kopeć
d3ce827f96 plugins/flashrom/flashrom.quirk: update NovaCustom GUIDs
Add NS5x GUID and missing NV4x guids for devices running older firmware versions.

Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2022-04-01 12:43:18 +01:00
Sean Rhodes
0ac171c452
plugins/flashrom: Move MaxSize quirk to GUID (#4468)
Move the quirk from HwID to GUID to the apply correctly.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2022-03-31 20:38:38 +01:00
Jeremy Soller
cffb432a24 Add System76 launch_lite_1 2022-03-31 19:01:11 +01:00
Richard Hughes
f042bbd42c Add fu_common_reverse_uint8() for future functionality 2022-03-31 16:34:27 +01:00
Richard Hughes
356bd2fa5e Use the CFI manufacturer ID to set the vendor 2022-03-31 15:44:54 +01:00
Richard Hughes
ea9dd851af trivial: Add a missing possible CFI quirk key 2022-03-31 15:44:54 +01:00
Richard Hughes
69624f4f33 vli: Do not set the serial number
This is always set as '00000000000000000000001' and thus is unhelpful.
2022-03-31 15:42:00 +01:00
Richard Hughes
dcd39d80a7 Add the CFI quirks in setup() so the device can be open 2022-03-31 12:47:13 +01:00
Richard Hughes
b3e1b74d21 trivial: Use the proxy physical ID automatically 2022-03-31 09:59:33 +01:00
adamgene
acc9e9fbe7 genesys: usbhub: Add instance IDs for generic hub
1. add and set FuGenesysVendorSupportToolString.
2. customized instance IDs  with follow,
- "IC"
- "BONDING"
- "VENDOR" - mask code unsupported
- "PORTNUM"  - mask code unsupported
- "VENDORSUP"  - mask code unsupported
2022-03-31 08:57:51 +01:00
adamgene
8f786b0818 genesys: usbhub: Get dynamic ts info from device
1. add FuGenesysDynamicToolString.
2. extract running_bank / bonding from dynamic_ts.
2022-03-31 08:57:51 +01:00
adamgene
2868c924bc genesys: usbhub: Unsupport without tool string
1. Legacy device unsupported.
2. add fu_genesys_tsdigit_value() to convert ts corretly.
3. delete wrong checking tool_string_version in 0xff.
2022-03-31 08:57:51 +01:00
adamgene
852b94bbe1 genesys: usbhub: Read firmware size from blob
This fixes the firmware size of for the GL3590 chips.
2022-03-31 08:57:51 +01:00
Gaël PORTAY
cfb75f0da4 genesys: usbhub: Add genuine Genesys Logic USB Hub 2022-03-31 08:57:51 +01:00
Ryan Lee
d512410734 ccgx: Add trigger code to support future hardware 2022-03-31 08:46:15 +01:00
Richard Hughes
691166d203 trivial: Use a short string form for the CFI commands 2022-03-30 18:45:49 +01:00
Richard Hughes
04f00e8a17 trivial: Never return the invalid value from fu_progress_get_percentage() 2022-03-30 18:42:01 +01:00
Richard Hughes
3ce161dfc2 Show the device serial number and instance IDs by default
This is a feature that seems useful, but one that no vendor has actually
asked for. It's also of limited use for peripheral devices.

Showing the instance IDs by default is also going to make it much easier
to explain to hardware vendors where the GUIDs come from.

Fixes https://github.com/fwupd/fwupd/issues/4445
2022-03-30 13:21:55 +01:00
Richard Hughes
474a57b6f7 Allow overriding the detected machine type
This makes developing HSI tests and UIs much easier when using VMs or
containers.
2022-03-30 13:17:31 +01:00
Richard Hughes
2aed732249 nvme: Add signed-payload for Western Digital hardware 2022-03-30 08:19:22 +01:00
Richard Hughes
0eeaad76ec Modernize and refactor the requirement checking code
Before we had FuInstallTask which represented the specific install
action (install foo on bar), FuEngineRequest which described why the
install task was created, and FuEngine. The latter being both reposible
for calling *into* FuInstallTask and also *from* FuInstallTask as well.

Depending on the code, we had XbNodes of component and release, *and*
FwupdReleases as releases and lots of duplicated code to marshall the
former into various forms of the latter.

Create a FuRelease wrapper around FwupdRelease to replace FuInstallTask
and to simplify the code. Make the FuRelease builder do the device
requirement checks, and then use the engine to do checks requiring
engine state and context.
2022-03-30 08:17:24 +01:00
Richard Hughes
16edfd345e Correctly probe USB-2 hubs with more than 7 ports
See https://github.com/fwupd/fwupd/pull/4426#discussion_r836155609
2022-03-30 07:09:26 +01:00
herman lin
efa880eb0a elanfp: Modify for BULK_RECV_TIMEOUT_MS to 3000 2022-03-30 07:08:23 +01:00
herman lin
392fe20397 elanfp: Add PID 0x0C82 2022-03-30 07:08:23 +01:00
Mario Limonciello
5618cf41e8 trivial: bump python black version to fix CI 2022-03-29 16:03:52 -05:00
Richard Hughes
a7fb1d354c trivial: Only set to IDLE after auth actions have completed 2022-03-29 20:04:26 +01:00
Richard Hughes
fc011b593e trivial: Try to avoid creating new progressbar lines harder 2022-03-29 20:04:26 +01:00
Richard Hughes
dd3fc46786 trivial: Add some missing g_return_val_if_fail() calls 2022-03-29 20:04:26 +01:00