Commit Graph

140 Commits

Author SHA1 Message Date
Richard Hughes
cf9ebdb703 Add startup profiling functionality
Using `sudo FWUPD_PROFILE=10 ./src/fwupd --verbose` will print a
dump of startup times onto the console so that we can debug which
plugin is slowing down system startup. For example:

    ../src/fu-engine.c:5409:plugins-coldplug [108.55ms]:
        ../plugins/amt/fu-plugin-amt.c:437:amt [27.14ms]:
            :create-context [12.66ms]
            :get-version [8.44ms]
            :add-device [3.95ms]
2022-06-14 22:08:02 +01:00
Richard Hughes
7f86ffab6f Split out the dump helpers to a new source file 2022-06-14 14:36:52 -05:00
Richard Hughes
422d8cfa17 trivial: Fix FreeBSD CI build 2022-06-12 08:42:46 +01:00
Richard Hughes
06a2dcf62b Remove gtkdoc build option
We've seen that gi-docgen is active and other projects are switching to
it. Remove the legacy (and slow) gtk-doc build support.
2022-06-11 21:26:46 +01:00
Richard Hughes
e6b487e762 Add FuProgress to ->startup() and ->coldplug()
This allows us to profile the daemon startup so we can find any plugins
taking an inordinate amount of time to start.
2022-06-04 20:21:50 +01:00
Gaël PORTAY
7f7d2759a7 trivial: Update with recent steelseries changes
This fixes the commits 7eb053e97a and
9a5c69417a.
2022-05-23 14:09:03 +01:00
Mario Limonciello
7526d1b183 Add a new attribute for fused platform
Fused parts are unable to be tampered with.
2022-04-12 10:39:02 -05:00
Mario Limonciello
0e3e8ff610 trivial: change Intel debug attributes to generic
As other platforms have features with the same attribute, remove
the Intel generic one.
2022-04-12 10:39:02 -05:00
Mario Limonciello
9adb5380b3 Add a new HSI attributes for SPI protections 2022-04-12 10:39:02 -05:00
Mario Limonciello
04efb0b0cb Add a new HSI attribute for AMD rollback protection
This will be used by an upcoming AMD plugin
2022-04-12 10:39:02 -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
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
Mario Limonciello
6896e0ab52 trivial: switch from meson.source_root to meson.project_source_root
The former is deprecated in meson 0.56 or later.
2022-02-28 08:34:48 -06:00
Richard Hughes
bb1bcce863 Allow fwupd to operate without a D-Bus daemon
This adds support for optionally using a UNIX domain socket where a
D-Bus daemon may not be running.

To use this, launch the daemon and clients with something like
`FWUPD_DBUS_SOCKET=/var/run/fwupd.sock fwupdmgr get-devices`
2022-01-31 14:05:23 +00:00
Mario Limonciello
fa8bfc7f4a msr: make tsme security attribute match kernel doc more closely
The kernel documentation for AMD memory encryption includes information
on both SME and SEV, but they are separate attributes. Read the attributes
separately.

Link: https://www.kernel.org/doc/html/v5.16/x86/amd-memory-encryption.html
2022-01-20 06:52:51 -06:00
Richard Hughes
45673e7d9f trivial: Show results when using FWUPD_XMLB_VERBOSE 2022-01-12 16:16:52 +00:00
Ricardo Cañuelo
cdb924ba8d doc: add developers guidelines and howtos 2022-01-06 10:02:18 +01:00
Richard Hughes
3fec2d8ffb trivial: Add an HSI resolution hint about kernel params 2021-12-21 10:07:05 +00:00
Richard Hughes
e5198e543d trivial: Make the HSI docs reflect reality
Fixes https://github.com/fwupd/fwupd/issues/4111
2021-12-21 10:07:05 +00:00
Mario Limonciello
7188e5b335 Add support to show curl/wget output from fwupdmgr/fwupdtool 2021-12-15 06:46:27 -06:00
Richard Hughes
5f88043c4f trivial: Fix HSI swapped value descriptions
Fixes https://github.com/fwupd/fwupd/issues/4034
2021-11-26 14:25:49 +00:00
Richard Hughes
5e52b3527f trivial: Add two missing files to the gtkdoc manifest 2021-11-23 09:50:19 +00:00
Gabriel Kerneis
3e8f09a0f7 Add HSI check that PCR registers 0-7 are not empty
Some BIOSes forget add measurements to PCR registers, which results in
all-zero checksums and breaks measured boot guarantees.

Fixes #3901
2021-11-17 16:21:52 +00:00
Richard Hughes
e87fc05ab9 Speed up the daemon startup by ~2% by doing dlsym much less
We were calling g_module_symbol() 2703 times, which is actually more
expensive than you'd think.

It also means the plugins are actually what we tell people they are:
A set of vfuncs that get run. The reality before that they were dlsym'd
functions that get called at pretty random times.
2021-11-09 12:02:07 +00:00
Richard Hughes
54f1557a81 trivial: Add some Impact sections to HSI attributes 2021-11-05 16:54:17 +00:00
Richard Hughes
e452f46309 trivial: Fix version typo in HSI specification 2021-11-05 14:53:11 +00:00
Richard Hughes
15d41d10ed trivial: Use more standard English in the HSI specification 2021-11-05 14:53:11 +00:00
Richard Hughes
ebf1fe19e8 trivial: Fix several broken links in the HSI specification
Fixes https://github.com/fwupd/fwupd/issues/3941
2021-11-03 13:45:08 +00:00
Richard Hughes
3e9d3cd50f trivial: Correctly redirect a typo in the HSI docs 2021-11-01 08:22:29 +00:00
Richard Hughes
a17222f8a0 trivial: Add some more details to the HSI specification 2021-11-01 08:22:29 +00:00
Richard Hughes
01224b23e6 trivial: Fix the DCI links in the HSI specification
All the attributes have a 1:1 mapping except this one, and that broke
the Insights rules.
2021-10-30 19:33:11 +01:00
Richard Hughes
b3b5542246 Redirect the old HSI links to the correct place
Fixes https://github.com/fwupd/fwupd/issues/3893, harder
2021-10-27 12:49:27 +01:00
Richard Hughes
2a1ad986b8 trivial: Update the architecture plan to reflect reality 2021-10-25 15:39:38 +01:00
Kate Hsuan
ae2389104e docs: hsi: Give a readable name for each HSI number
Currently, HSI only has a numerical level, such as HSI 0~1 and each
number represents a security state from insecure to secure. If we
only show the number to the user, the user may confuse and try to
find the document to realize the meaning of the number or just ignore
them immediately. So, a readable name for each HSI level can catch
users' eyes and let them explicitly know the security status.

Signed-off-by: Kate Hsuan <hpa@redhat.com>
2021-10-25 15:38:38 +01:00
Mario Limonciello
d9ca1a7c53 trivial: fix anchors for markdown
fixes: #3893
2021-10-21 11:48:25 -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
dee928a012 doc: Add a valid front matter block to fix index title 2021-09-21 10:25:12 +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
Richard Hughes
450e8e1c17 Add FuCfuPayload and FuCfuOffer
We can use these in the future elantp plugin, and I'm sure we'll need
them again in the future for an *actual* CFU plugin.
2021-09-20 14:43:34 +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
Mario Limonciello
9d113822c9 trivial: create urlmap for each gi-docgen target rather than sharing 2021-09-07 21:54:40 -05:00
Richard Hughes
a5a978b3f6 Rename some confusing API
More than one person has asked about 'why call fu_plugin_update() for a
reinstall or downgrade' and I didn't have a very good answer.

The plugin API is not officially stable, and we should fix things to be
less confusing. Use the same verbs as the FuDevice vfuncs instead.
2021-08-06 19:49:53 +01:00
Mario Limonciello
798d1ed3ee trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
Mario Limonciello
f1db89ff35 trivial: set the version string for source code links properly 2021-06-15 07:03:05 -05:00
Mario Limonciello
0d0dfa6da0 trivial: set up links between libfwupd and libfwupdplugin 2021-06-14 09:25:07 +01:00
Richard Hughes
7df6368038 trivial: Add an index page to link to both sets of docs 2021-06-11 14:14:53 +01:00
Richard Hughes
bc9920ac54 trivial: Check for python3-markdown >= 3.3.3 for gi-docgen
The dep can be decreased - this matches what is in Debian
2021-06-11 14:14:53 +01:00
Richard Hughes
7b40a84f24 trivial: Check for python3-markdown >= 3.3.4 for gi-docgen 2021-06-11 09:39:11 +01:00
Richard Hughes
a02c1073f2 trivial: Fix up some of the developer docs
And add some missing content as requried.
2021-06-11 09:39:03 +01:00
Mario Limonciello
1e17457b16 Allow building the documentation with gi-docgen and gtk-doc
Until gi-docgen is declared stable support either of them.
This effectively means that hand builds and CI builds will use
gi-docgen, but distro builds use gtk-doc-tools.
2021-06-09 22:21:53 +01:00