06499e6b | 08-Mar-2023 |
Eddie James <eajames@linux.ibm.com> |
bootm: Support boot measurement
Add a configuration option to measure the boot through the bootm function. Add the measurement state to the booti and bootz paths as well.
Signed-off-by: Eddie James
bootm: Support boot measurement
Add a configuration option to measure the boot through the bootm function. Add the measurement state to the booti and bootz paths as well.
Signed-off-by: Eddie James <eajames@linux.ibm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Link: https://lore.kernel.org/r/20230308212537.1725343-5-eajames@linux.ibm.com Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
223bb744 | 02-Aug-2021 |
Pali Rohár <pali@kernel.org> |
Remove including timestamp.h in version.h
Header file version.h does not use anything from timestamp.h. Including of timestamp.h has side effect which cause recompiling object file at every make run
Remove including timestamp.h in version.h
Header file version.h does not use anything from timestamp.h. Including of timestamp.h has side effect which cause recompiling object file at every make run because timestamp.h changes at every run.
So remove timestamp.h from version.h and include timestamp.h in files which needs it.
This change reduce recompilation time of final U-Boot binary when U-Boot source files were not changed as less source files needs to be recompiled.
Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Add in lib/acpi/acpi_table.c and test/dm/acpi.c, rework a few others] Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
f486b9d0 | 02-Aug-2021 |
Pali Rohár <pali@kernel.org> |
version: Move version_string[] from version.h to version_string.h
More C files do not use compile time timestamp macros and do not have to be recompiled every time when SOURCE_DATE_EPOCH changes.
T
version: Move version_string[] from version.h to version_string.h
More C files do not use compile time timestamp macros and do not have to be recompiled every time when SOURCE_DATE_EPOCH changes.
This patch moves version_string[] from version.h to version_string.h and updates other C files which only needs version_string[] string to include version_string.h instead of version.h. After applying this patch these files are not recompiled every time when SOURCE_DATE_EPOCH changes.
Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
b7d9107f | 26-Mar-2023 |
Chia-Wei Wang <chiawei_wang@aspeedtech.com> |
common: fit: Update board_fit_image_post_process() to pass fit and node_offset
board_fit_image_post_process() passes only start and size of the image, but type of the image is not passed. So pass fi
common: fit: Update board_fit_image_post_process() to pass fit and node_offset
board_fit_image_post_process() passes only start and size of the image, but type of the image is not passed. So pass fit and node_offset, to derive information about image to be processed.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Tero Kristo <kristo@kernel.org> Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com> (cherry picked from commit 481d394e77915201e4ecc2d98e9cc2fbc3224991) Change-Id: Idbc2e274d1f5a26434e42715014f0b16c29237a2
show more ...
|
f7de9e82 | 07-Feb-2022 |
Eddie James <eajames@linux.ibm.com> |
gpio: Enable hogging support in SPL
Use the CONFIG macros to conditionally build the GPIO hogging support in either the SPL or U-Boot, or both, depending on the configuration. Also call the GPIO hog
gpio: Enable hogging support in SPL
Use the CONFIG macros to conditionally build the GPIO hogging support in either the SPL or U-Boot, or both, depending on the configuration. Also call the GPIO hog probe function in the common SPL board initialization as an equivalent to adding it to the U-Boot init sequence functions.
Signed-off-by: Eddie James <eajames@linux.ibm.com> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Link: https://lore.kernel.org/r/20220207231334.59845-5-eajames@linux.ibm.com Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
dab778a2 | 07-Feb-2022 |
Heiko Schocher <hs@denx.de> |
gpio: fixes for gpio-hog support
recently added gpio hog patch was "in discussion" state with Simon Glass. This patch now adds most of comments from Simon Glass.
(cherry-picked from 49b10cb4926285b
gpio: fixes for gpio-hog support
recently added gpio hog patch was "in discussion" state with Simon Glass. This patch now adds most of comments from Simon Glass.
(cherry-picked from 49b10cb4926285b856b207c1f5bb40c75487f08b)
Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Eddie James <eajames@linux.ibm.com> Link: https://lore.kernel.org/r/20220207231334.59845-4-eajames@linux.ibm.com Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
04c095b2 | 07-Feb-2022 |
Heiko Schocher <hs@denx.de> |
gpio: add gpio-hog support
add gpio-hog support. GPIO hogging is a mechanism providing automatic GPIO request and configuration as part of the gpio-controller's driver probe function.
for more info
gpio: add gpio-hog support
add gpio-hog support. GPIO hogging is a mechanism providing automatic GPIO request and configuration as part of the gpio-controller's driver probe function.
for more infos see: doc/device-tree-bindings/gpio/gpio.txt
(cherry-picked from 5fc7cf8c8e268590f3b0037eecea7f6798209f78)
Signed-off-by: Heiko Schocher <hs@denx.de> Tested-by: Michal Simek <michal.simek@xilinx.com> (zcu102) Tested-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Eddie James <eajames@linux.ibm.com> Link: https://lore.kernel.org/r/20220207231334.59845-3-eajames@linux.ibm.com Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
685cdc14 | 15-Aug-2019 |
Andreas Dannenberg <dannenberg@ti.com> |
spl: ymodem: Fix FIT loading termination handling
During FIT reading through ymodem_read_fit() the function xyzModem_stream_read() is being used which returns zero once the end of a stream has been
spl: ymodem: Fix FIT loading termination handling
During FIT reading through ymodem_read_fit() the function xyzModem_stream_read() is being used which returns zero once the end of a stream has been reached. This could lead to an premature exit from ymodem_read_fit() with certain-sized FIT images reporting that zero bytes overall were read. Such a premature exit would then result in an -EIO failure being triggered within the spl_load_simple_fit() caller function and ultimately lead to a boot failure.
Fix this logic by simply aborting the stream read loops and continuing with the regular code flow which ultimately would lead to returning the number of bytes to be read ('size') as expected by the callers of ymodem_read_fit().
Fixes: fa715193c083 ("spl: Add an option to load a FIT containing U-Boot from UART") Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Change-Id: I5ce34ba8c30541c649aa6c62af40f6fdffe05d79
show more ...
|
21426358 | 30-Jul-2021 |
Jamin Lin <jamin_lin@aspeedtech.com> |
Support RSA3072
So far, u-boot verified boot only support RSA2048 and RSA4096. Add table to support RSA3072
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Change-Id: I98a8b2fabc2d64e5e3c7e04bc
Support RSA3072
So far, u-boot verified boot only support RSA2048 and RSA4096. Add table to support RSA3072
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Change-Id: I98a8b2fabc2d64e5e3c7e04bc7ba78b9f10cee35
show more ...
|
8e7d5f47 | 16-Feb-2021 |
Joel Stanley <joel@jms.id.au> |
fit: Use hash.c to call SHA code
Currently the FIT hashing will call directly into the SHA algorithms to get a hash.
This moves the fit code to use hash_lookup_algo, giving a common entrypoint into
fit: Use hash.c to call SHA code
Currently the FIT hashing will call directly into the SHA algorithms to get a hash.
This moves the fit code to use hash_lookup_algo, giving a common entrypoint into the hashing code and removing the duplicated algorithm look up. It also allows the use of hardware acceleration if configured.
Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
45e7dfa9 | 16-Feb-2021 |
Joel Stanley <joel@jms.id.au> |
hash: Allow for SHA512 hardware implementations
Similar to support for SHA1 and SHA256, allow the use of hardware hashing engine by enabling the algorithm and setting CONFIG_SHA_HW_ACCEL / CONFIG_S
hash: Allow for SHA512 hardware implementations
Similar to support for SHA1 and SHA256, allow the use of hardware hashing engine by enabling the algorithm and setting CONFIG_SHA_HW_ACCEL / CONFIG_SHA_PROG_HW_ACCEL.
(cherry picked from commit a479f103dc1c801d0c6fe90bbaf99ae1700a84dc) Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
47cd0118 | 22-Oct-2019 |
Jean-Jacques Hiblot <jjhiblot@ti.com> |
spl: fit: don't load the firmware twice
When u-boot.img is a FIT image generated automatically by mkimage, the configuration node has the following structure: conf-1 { description = "k3-am654-bas
spl: fit: don't load the firmware twice
When u-boot.img is a FIT image generated automatically by mkimage, the configuration node has the following structure: conf-1 { description = "k3-am654-base-board"; firmware = "firmware-1"; loadables = "firmware-1"; fdt = "fdt-1"; };
The firmware is referenced twice. Once by the 'firmware' property and once by the 'loadables' property. Currently this result in the firmware being loaded twice. This is not a big problem but has an impact on the boot time. Fixing it by not loading a loadable image if it is also the firmware image.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Andreas Dannenberg <dannenberg@ti.com> (cherry picked from commit 6b8b98d54d8e74c8b4c6cfe431e88c90efcea72d) Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
a7fc7ebf | 12-Jan-2021 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
image-fit: fit_check_format check for valid FDT
fit_check_format() must check that the buffer contains a flattened device tree before calling any device tree library functions.
Failure to do may ca
image-fit: fit_check_format check for valid FDT
fit_check_format() must check that the buffer contains a flattened device tree before calling any device tree library functions.
Failure to do may cause segmentation faults.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> (cherry picked from commit ea1a9ec5f430359720d9a0621ed1acfbba6a142a) Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
1b8e2cf1 | 15-Jun-2020 |
Harald Seiler <hws@denx.de> |
common: hash: Remove a debug printf statement
Remove a left-over debug printf that was introduced with SHA512 support.
Fixes: d16b38f42704 ("Add support for SHA384 and SHA512") Signed-off-by: Haral
common: hash: Remove a debug printf statement
Remove a left-over debug printf that was introduced with SHA512 support.
Fixes: d16b38f42704 ("Add support for SHA384 and SHA512") Signed-off-by: Harald Seiler <hws@denx.de> (cherry picked from commit 7a81989b7b04bd87d1e684f2bafdc92a9c16fecc) Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
e9221d03 | 16-Apr-2020 |
Reuben Dowle <reubendowle0@gmail.com> |
Add support for SHA384 and SHA512
The current recommendation for best security practice from the US government is to use SHA384 for TOP SECRET [1].
This patch adds support for SHA384 and SHA512 in
Add support for SHA384 and SHA512
The current recommendation for best security practice from the US government is to use SHA384 for TOP SECRET [1].
This patch adds support for SHA384 and SHA512 in the hash command, and also allows FIT images to be hashed with these algorithms, and signed with sha384,rsaXXXX and sha512,rsaXXXX
The SHA implementation is adapted from the linux kernel implementation.
[1] Commercial National Security Algorithm Suite http://www.iad.gov/iad/programs/iad-initiatives/cnsa-suite.cfm
Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com> (cherry picked from commit d16b38f42704fe3cc94fbee1601be96045013151) Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
5e0d068c | 18-Mar-2020 |
Simon Glass <sjg@chromium.org> |
image: Check hash-nodes when checking configurations
It is currently possible to use a different configuration's signature and thus bypass the configuration check. Make sure that the configuration n
image: Check hash-nodes when checking configurations
It is currently possible to use a different configuration's signature and thus bypass the configuration check. Make sure that the configuration node that was hashed matches the one being checked, to catch this problem.
Also add a proper function comment to fit_config_check_sig() and make it static.
Signed-off-by: Simon Glass <sjg@chromium.org> (cherry picked from commit 67acad3db71bb372458fbb8a77749f5eb88aa324) Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
e452a527 | 18-Mar-2020 |
Simon Glass <sjg@chromium.org> |
image: Return an error message from fit_config_verify_sig()
This function only returns an error message sometimes. Update it to always return an error message if one is available. This makes it easi
image: Return an error message from fit_config_verify_sig()
This function only returns an error message sometimes. Update it to always return an error message if one is available. This makes it easier to see what went wrong.
Signed-off-by: Simon Glass <sjg@chromium.org> (cherry picked from commit 472f9113dbbbed88345f3d38de3ff37ca163508e) Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
d7d71113 | 18-Mar-2020 |
Simon Glass <sjg@chromium.org> |
image: Be a little more verbose when checking signatures
It is useful to be a little more specific about what is being checked. Update a few messages to help with this.
Signed-off-by: Simon Glass <
image: Be a little more verbose when checking signatures
It is useful to be a little more specific about what is being checked. Update a few messages to help with this.
Signed-off-by: Simon Glass <sjg@chromium.org> (cherry picked from commit 382cf62039f775a1aec771645e3cbc32e1e2f0e3) Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
c294112e | 14-Jun-2019 |
Patrick Doyle <wpdster@gmail.com> |
rsa: reject images with unknown padding
Previously we would store NULL in info->padding and jump to an illegal instruction if an unknown value for "padding" was specified in the device tree.
Signed
rsa: reject images with unknown padding
Previously we would store NULL in info->padding and jump to an illegal instruction if an unknown value for "padding" was specified in the device tree.
Signed-off-by: Patrick Doyle <pdoyle@irobot.com> (cherry picked from commit 19495dd9b6f5f4e893b56b0c73e14b2e671c3780) Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
c50c63b2 | 11-Mar-2020 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
fit: check return value of fit_image_get_data_size()
GCC-10 reports:
In file included from tools/common/image-fit.c:1: include/image.h: In function ‘fit_image_get_data_and_size’: ./tools/../common/
fit: check return value of fit_image_get_data_size()
GCC-10 reports:
In file included from tools/common/image-fit.c:1: include/image.h: In function ‘fit_image_get_data_and_size’: ./tools/../common/image-fit.c:1015:9: warning: ‘len’ may be used uninitialized in this function [-Wmaybe-uninitialized] 1015 | *size = len; | ~~~~~~^~~~~ ./tools/../common/image-fit.c:996:6: note: ‘len’ was declared here 996 | int len; | ^~~
Add the missing check of the return value of fit_image_get_data_size().
Fixes: c3c863880479 ("add FIT data-position & data-offset property support") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> (cherry picked from commit 183780491f9b45da6bec9627304b2c26169e8801) Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
cc2ae64d | 02-Dec-2020 |
Hongwei Zhang <hongweiz@ami.com> |
common: fdt: Check for error return value
Check for negative return value of fdt_noffset from calling boot_get_fdt_fit().
Signed-off-by: Hongwei Zhang <hongweiz@ami.com> Reviewed-by: Simon Glass <s
common: fdt: Check for error return value
Check for negative return value of fdt_noffset from calling boot_get_fdt_fit().
Signed-off-by: Hongwei Zhang <hongweiz@ami.com> Reviewed-by: Simon Glass <sjg@chromium.org> Link: https://patchwork.ozlabs.org/project/uboot/patch/20201202194703.8793-2-hongweiz@ami.com/ Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
0d1d4e81 | 23-Jun-2020 |
Chia-Wei, Wang <chiawei_wang@aspeedtech.com> |
ARM: spl: Add SPL relocation support |
65f2e689 | 04-Jun-2019 |
Andreas Dannenberg <dannenberg@ti.com> |
spl: Make image loader infrastructure more universal
The current U-Boot SPL image loader infrastructure is very powerful, able to initialize and load from a variety of boot media however it is stron
spl: Make image loader infrastructure more universal
The current U-Boot SPL image loader infrastructure is very powerful, able to initialize and load from a variety of boot media however it is strongly geared towards loading specific types of images in a very specific way. To address the need being able to use this infrastructure to load arbitrary image files go ahead and refactor it as follows:
- Refactor existing spl_mmc_load_image function into superset function, accepting additional arguments such as filenames and media load offset (same concept can also be applied toother spl_XXX_load_image functions) - Extend the loader function to "remember" their peripheral initialization status so that the init is only done once during the boot process, - Extend the FIT image loading function to allow skipping the parsing/ processing of the FIT contents (so that this can be done separately in a more customized fashion) - Populate the SPL_LOAD_IMAGE_METHOD() list with a trampoline function, invoking the newly refactored superset functions in a way to maintain compatibility with the existing behavior
This refactoring initially covers MMC/SD card loading (RAW and FS-based).
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
6b2936f2 | 08-Apr-2020 |
Chia-Wei, Wang <chiawei_wang@aspeedtech.com> |
Revert "spl: fit: Separate FIT image load and processing"
This reverts commit 7e52eee802b06bbe118e8e0e47d673a4a1ba7cf1. |
7e52eee8 | 07-Apr-2020 |
Chia-Wei, Wang <chiawei_wang@aspeedtech.com> |
spl: fit: Separate FIT image load and processing
SPL puts FIT image load and processing in the same function, where the flexibility of customized loading and processing is limited.
This patch separ
spl: fit: Separate FIT image load and processing
SPL puts FIT image load and processing in the same function, where the flexibility of customized loading and processing is limited.
This patch separates the FIT image load and content processing into individual functions. The processing function is made as weak implementation for better customization convenience.
show more ...
|