Commit Graph

7678 Commits

Author SHA1 Message Date
Richard Hughes
c4bdc3ae30 trivial: Fix one -Wunused-variable warning 2022-08-25 11:55:03 +01:00
Josh Chen
fa7b6247bb Added support for absolute reporting (non-HID) devices 2022-08-25 11:53:30 +01:00
Richard Hughes
6710f360ec trivial: Fix search-replace typo 2022-08-25 10:09:58 +01:00
Mario Limonciello
9391deb2d7 trivial: only accept bios settings ending in .json 2022-08-25 10:08:39 +01:00
Mario Limonciello
03d1e22d74
trivial: add get-bios-setting command to simple-client (#4947) 2022-08-24 21:19:23 +00:00
Mario Limonciello
087a809a5a Add documentation for fwupd BIOS settings API 2022-08-24 14:10:11 -05:00
Mario Limonciello
0e9ea45d27 trivial: fu-util/fu-tool: fix json mode for programming bios settings 2022-08-24 14:10:11 -05:00
Mario Limonciello
b48710aac7 trivial: fu-util: make JSON mode silent
We don't want to be emitting errors in JSON mode, we should only use
return codes.
2022-08-24 14:10:11 -05:00
Mario Limonciello
04c2186edc Add support for loading default BIOS settings policy
A user can place a JSON file in /etc/fwupd/bios-settings.d/ with
the default desired policy for the machine.

fwupd will load this policy on startup to ensure BIOS settings
are set as desired by the system administrator.
2022-08-24 12:59:42 -05:00
Mario Limonciello
2f9cb74c59 trivial: don't assume we know about pending_reboot
The `pending_reboot` variable is tracked by the kernel, make sure
that it is updated from the kernel when BIOS settings are changed.
2022-08-24 12:59:42 -05:00
Mario Limonciello
e49c64553d trivial: return FWUPD_ERRROR_NOTHING_TO_DO if BIOS settings already set
This will prevent setting `pending_reboot` if the settings already match
those desired by the client.
2022-08-24 10:58:25 -05:00
kate
3d199058bb fu-engine: HSI prefix fixing for invalid chassis
The invalid HSI prefix should be "HSI:INVALID" not "HSI-INVALID".

Signed-off-by: Kate Hsuan <hpa@redhat.com>
2022-08-24 16:27:02 +01:00
Richard Hughes
fa2df1eed6 Use ID_VENDOR_ID and ID_MODEL_ID fallbacks
Some udev subsystems run probers to populate the values, rather than
just the kernel providing the sysfs files. Support reading these too.
2022-08-24 15:54:58 +01:00
Richard Hughes
07ab0a61a2 trivial: Update some translations 2022-08-24 14:37:45 +01:00
Richard Hughes
f970b3de23 Do not show HSI events where we changed the spec result value 2022-08-24 13:49:19 +01:00
Richard Hughes
b436bbee58 Only fail the kernel tainted HSI test for specific taint reasons
For example, working around a firmware bug in the kernel isn't really
what the HSI attribute was intended to measure.
2022-08-24 13:35:55 +01:00
Mario Limonciello
9549970285 trivial: bios-settings: shuffle the json output order
We want the name and description to be the first few keys
2022-08-24 07:20:01 -05:00
Mario Limonciello
b7b0ce533d trivial: Unify ambiguity between bios-attrs and bios-settings
These are currently used interchangeably since there was indecisiveness
which to use as the feature was being developed.

As outward facing it will be named with "settings", change all uses
in the code to match this.
2022-08-24 07:20:01 -05:00
Richard Hughes
8b63023aaf Only show *changed* events in the fwupdmgr security output
We do not want to show added or removed HSI tests in this UI.
2022-08-24 13:19:17 +01:00
Richard Hughes
1393a0bb8c trivial: Fix ppc64le Fedora RPM builds 2022-08-24 12:19:05 +01:00
Richard Hughes
4e5a928d91 pci-mei: Update vulnerable CMSE versions from CSMEVDT data 2022-08-24 10:30:39 +01:00
Richard Hughes
326042b9b2 pci-mei: Recognize CSME version 16
Fixes https://github.com/fwupd/fwupd/issues/4927
2022-08-24 10:30:39 +01:00
Mario Limonciello
826983b8a7 Add support to set BIOS settings using a JSON payload
The JSON payload is ideally generated from `fwupdmgr get-bios-settings --json`
with all attributes expected to be included as additional arguments.
2022-08-24 09:51:46 +01:00
Richard Hughes
c886fb8f71 Include vfat in the list of possible BDP partition types
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2119436
2022-08-24 09:41:46 +01:00
Mario Limonciello
2045578d20 trivial: add a debugging statement to indicate BIOS settings work 2022-08-22 09:29:08 -05:00
Mario Limonciello
01d120efda trivial: Make BIOS setting parsing errors less verbose by default
The `--verbose` output for getting BIOS setting info is very noisy
on Lenovo systems due to a mismatch for the driver behavior and
kernel API.

Hide most of it behind an optional environment variable
`FWUPD_BIOS_SETTING_VERBOSE`.
2022-08-22 09:29:08 -05:00
Richard Hughes
6aec72d58a Allow self tests to pass when run in LXC zones
Fixes https://github.com/fwupd/fwupd/issues/4684
2022-08-22 12:46:36 +01:00
Mario Limonciello
2705179117 Convert HSI into a meson tristate-feature
This allows us to disable it automatically on architectures that
aren't supported and OSes that aren't supported.

Link: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1987067
2022-08-22 06:03:38 -05:00
Mario Limonciello
c4fb8f5eb4 trivial: Add new modalias instance IDs for some elan touchpads 2022-08-22 06:03:19 -05:00
Mario Limonciello
82e2d613aa Add GUIDs using MODALIAS as well
This will allow targeting the same thing that kernel drivers use to load the hardware
2022-08-22 06:03:19 -05:00
Richard Hughes
2a5c27a094 Do not assert when running with no plugins
Fixes https://github.com/fwupd/fwupd/issues/4932
2022-08-22 11:50:56 +01:00
Richard Hughes
4af448af1a Actually parse AppStream issues
These are saved on the <release>, not the <component>.

Fixes half of https://github.com/fwupd/fwupd/issues/4929
2022-08-22 11:06:40 +01:00
hugh chao(hugh712)
8b0c057f8f Install all devices with the same composite id in fwupdtool 2022-08-18 09:32:40 -05:00
Richard Hughes
620726c47a Prompt users to fix BIOS configuration issues 2022-08-13 16:44:18 +01:00
Sean Rhodes
a4a1be569b
plugins/{superio,flashrom}: Add LabTop Mk III HwId (#4920)
Add the HwId for the Star LabTop Mk III when using coreboot firmware,
as this differs to AMI.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2022-08-12 14:00:50 +00:00
Mario Limonciello
088397618a Add bash-completion for BIOS settings 2022-08-11 09:52:26 -05:00
Mario Limonciello
2536bf462c Allow running get-bios-settings without root or PK
The only information that is secret is the `current_value`.
Augment the d-bus call to determine whether the caller needs this
information.

* If `fwupdmgr` is launched as root it will be provided.
* If `fwupdmgr` is launched with `--authenticate` it will be requested
  and PK will be engaged.
2022-08-11 09:52:26 -05:00
Boris Mittelberg
b48cd9fea6 cros-ec: adding stay-in-ro command if EC is in bootloader 2022-08-10 19:06:58 +01:00
Mario Limonciello
7ddbe5e0b3 trivial: don't let people try to turn off UEFI secure boot
The firmware from both Dell and Lenovo actually blocks this, but the
error message is pretty confusing.

```
$ sudo fwupdtool set-bios-setting SecureBoot Disable
17:39:40:0249 FuBiosAttrs          KERNEL BUG: thinklmi doesn't export a 'type' attribute
Loading…                 [-                                      ]
failed to write 7 bytes to 17: Invalid argument
```
2022-08-10 11:09:31 -05:00
Mario Limonciello
fa661c595d trivial: map common positive or negative keys to possible enumeration values
Dell and Lenovo use Enable or Enabled and Disable or Disabled which is confusing
to an end user.

Set up some heuristics to map positive values and negative values when passed
into the client.
2022-08-10 10:37:27 -05:00
Mario Limonciello
5f0bb3dc8f Add support for translation for the sample Dell BIOS setting strings 2022-08-10 10:17:25 -05:00
Mario Limonciello
3e5fce5ffa trivial: ignore strings files in directory with drivers not attributes 2022-08-10 10:17:25 -05:00
Mario Limonciello
d51364a8b1 trivial: don't set target BIOS attribute for read only attributes
If an attribute is read only, then we'll have a failure trying to
set it.  So don't offer a target value so clients won't try to set
an attribute.x
2022-08-10 08:20:49 -05:00
Richard Hughes
fc702c696b trivial: Don't use the security attr result in the title
Fixes some of https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1989
2022-08-10 13:02:03 +01:00
victor-cheng
28357f7528
usi-dock: Add support for ThinkPad Thunderbolt 4 and Universal Smart Dock
Use distinguishing displayed names by CID.
2022-08-10 09:31:16 +01:00
Mario Limonciello
fdfdaed911 trivial: bios-attrs: fix a logic bug in lenovo string extraction
Several enumeration attributes were missing their final values
2022-08-05 14:39:48 -05:00
Mario Limonciello
23b7495cbd trivial: add missing read_only BIOS attribute to GVariant
This fixes read_only attributes being advertised to clients as writable.
2022-08-05 14:08:55 -05:00
Mario Limonciello
a0eb3bc73d trivial: fix a docs directory check inversion
Fixes: a19b6f23e ("trivial: ci: debian: Use helper script to install dependencies instead. (#4906)")
2022-08-05 11:45:19 -05:00
Mario Limonciello
a19b6f23e5
trivial: ci: debian: Use helper script to install dependencies instead. (#4906)
* trivial: ci: debian: Use helper script to install dependencies instead.

Should fix building Debian stable containers
Fixes: #4901

* trivial: debian: ci: only populate fwupd-doc if dependencies are met

* trivial: ci: debian: generate control file using fwupd_setup_helpers
2022-08-05 08:43:13 +01:00
Sean Rhodes
639493259d
plugins/flashrom: Skip BC check for coreboot devices (#4892)
Set BcrAddr to 0x0 for all coreboot devices, so that the check of
BIOS Control is skipped as coreboot won't forcibly set this.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2022-08-02 10:11:55 -05:00