diff options
author | Masahisa Kojima <masahisa.kojima@linaro.org> | 2023-06-07 14:41:57 +0900 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2023-06-08 09:20:36 +0200 |
commit | 83be41049b35056c3e0062743aa804671321597f (patch) | |
tree | 99079defb969db652bf9390a32e7c3b5f7cf146b /doc | |
parent | 000806f76b18262d456d98184592703a1bae016d (diff) | |
download | u-boot-83be41049b35056c3e0062743aa804671321597f.zip u-boot-83be41049b35056c3e0062743aa804671321597f.tar.gz u-boot-83be41049b35056c3e0062743aa804671321597f.tar.bz2 |
doc: uefi: add firmware versioning documentation
This commit describes the procedure to add the firmware version
into the capsule file.
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/develop/uefi/uefi.rst | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst index ffe25ca..30b90a0 100644 --- a/doc/develop/uefi/uefi.rst +++ b/doc/develop/uefi/uefi.rst @@ -318,6 +318,33 @@ Run the following command --guid <image GUID> \ <capsule_file_name> +The UEFI specification does not define the firmware versioning mechanism. +EDK II reference implementation inserts the FMP Payload Header right before +the payload. It coutains the fw_version and lowest supported version, +EDK II reference implementation uses these information to implement the +firmware versioning and anti-rollback protection, the firmware version and +lowest supported version is stored into EFI non-volatile variable. + +In U-Boot, the firmware versioning is implemented utilizing +the FMP Payload Header same as EDK II reference implementation, +reads the FMP Payload Header and stores the firmware version into +"FmpStateXXXX" EFI non-volatile variable. XXXX indicates the image index, +since FMP protocol handles multiple image indexes. + +To add the fw_version into the FMP Payload Header, +add --fw-version option in mkeficapsule tool. + +.. code-block:: console + + $ mkeficapsule \ + --index <index> --instance 0 \ + --guid <image GUID> \ + --fw-version 5 \ + <capsule_file_name> + +If the --fw-version option is not set, FMP Payload Header is not inserted +and fw_version is set as 0. + Performing the update ********************* |