- Feb 19, 2023
-
-
Adds CONFIG_EFI_CAPSULE_MAX to configure the max index value used in EFI capsule reports. Prior to this change is the hard coded value was 65535 which would exceed available storage for variables. Now the default value is 15 which should work fine with most systems. Signed-off-by:
Etienne Carriere <etienne.carriere@linaro.org>
-
Measures the DTB passed to the EFI application upon new boolean config switch CONFIG_EFI_TCG2_PROTOCOL_MEASURE_DTB. For platforms where the content of the DTB passed to the OS can change across reboots, there is not point measuring it hence the config switch to allow platform to not embed this feature. Co-developed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by:
Etienne Carriere <etienne.carriere@linaro.org> Tested-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
QueryVariableInfo with EFI_VARIABLE_HARDWARE_ERROR_RECORD is accepted, remove wrong attribute check. Fixes: 454a9442 ("efi_loader: update attribute check for QueryVariableInfo()") Signed-off-by:
Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
Heinrich Schuchardt authored
We should not scan beyond the end of string name. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
- Feb 12, 2023
-
-
In various cases logical memory blocks are coalesced; As a result doing a strict check whether memory blocks are the same doesn't necessarily work as a previous addition of a given block might have been merged into a bigger block. Fix this by considering a block is already registered if it's a pure subset of one of the existing blocks. Signed-off-by:
Sjoerd Simons <sjoerd@collabora.com>
-
- Feb 11, 2023
-
-
If something is wrong with a board's timer function such that it calls functions not marked with notrace, U-Boot will hang. Detect this, print a message and disable the trace. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
When the early trace buffer overflows it leaves a gap in the trace buffer between where the actual data finished and where it would have finished if there were enough buffer space. This results in corrupted output. Adjust the logic to resolve this and add a message when the buffer overflows. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Add a few more useful items into the output. Update the buffers to use hex consistently. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
The trace does not necessarily start at the top level, so we can see it go negative. Track this so that we can show an accurate value for the stack depth. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Given that the compiler adds two function calls into each function, the current spacing is overkill. Drop it down to 16 bytes per function, which is still plenty. This saves some space in the trace buffer. Also move the calculation into a function, so it is common code. Add a check for gd->mon_len being unset, which breaks tracing. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
It seems better to put the TEXT_BASE value in the file header rather than in an entry record. While it is true that there is a separate base for pre-relocation, this can be handled by using offsets in the file. It is useful to have a version number in case we need to change the trace format again. Update the header to make these changes. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Update the code slightly so that abuf can be used in U-Boot tools. It will soon be needed for proftool. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
This is a silly value at present, since U-Boot's call depth never reaches 200. Fix it. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Avoid using the preprocessor with TIMER_EARLY. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Feb 10, 2023
-
-
Heinrich Schuchardt authored
This function is not used externally and hence should be static. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
Heinrich Schuchardt authored
This function is not used externally. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
Heinrich Schuchardt authored
Add missing include. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
Heinrich Schuchardt authored
Functions that are not used externally should be static. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
Heinrich Schuchardt authored
Define function set_shift_mask() as static as it is not used externally. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
Heinrich Schuchardt authored
Make functions that are no used externally static. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
Heinrich Schuchardt authored
Make functions that are not used externally static. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
Heinrich Schuchardt authored
num_entries should be unsigned to avoid warnings. As the target field is u16 we should use this type. lib/efi_loader/efi_conformance.c: In function ‘efi_ecpt_register’: lib/efi_loader/efi_conformance.c:30:33: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion] 30 | ecpt_size = num_entries * sizeof(efi_guid_t) | ^ lib/efi_loader/efi_conformance.c:46:36: warning: conversion from ‘int’ to ‘u16’ {aka ‘short unsigned int’} may change value [-Wconversion] 46 | ecpt->number_of_profiles = num_entries; | ^~~~~~~~~~~ Fixes: 6b92c173 ("efi: Create ECPT table") Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
Heinrich Schuchardt authored
In program initrddump.efi function get_load_options() can be static. This avoids a warning when building with 'make W=1': lib/efi_loader/initrddump.c:442:6: warning: no previous prototype for ‘get_load_options’ [-Wmissing-prototypes] 442 | u16 *get_load_options(void) | ^~~~~~~~~~~~~~~~ Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
Current U-Boot supports two EFI variable service, U-Boot own implementation and op-tee based StMM variable service. With ACS Security Interface Extension(SIE) v22.10_SIE_REL1.1.0, there are several failure items of QueryVariableInfo(). Current attribute check for QueryVariableInfo() was implemented based on the Self Certification Test (SCT) II Case Specification, June 2017, chapter 4.1.4 QueryVariableInfo(). This test case specification is outdated and don't align at all with the SCT test case code, and UEFI specification v2.10 does not clearly define the priority of the attribute check. For U-Boot standard case that EFI variables are stored in a file in the ESP, this commit modifies the attribute check to get align to the EDK2 implementation. For latter case(op-tee based StMM variable service), parameter check should be delegated to StMM. Now all ACS SIE QueryVariableInfo() test cases passed both EFI variable storage implementations. Signed-off-by:
Masahisa Kojima <masahisa.kojima@linaro.org> Acked-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
- Feb 09, 2023
-
-
This converts 1 usage of this option to the non-SPL form, since there is no SPL_ENV_WRITEABLE_LIST defined in Kconfig Signed-off-by:
Simon Glass <sjg@chromium.org>
-
This converts 1 usage of this option to the non-SPL form, since there is no SPL_EFI_UNICODE_COLLATION_PROTOCOL2 defined in Kconfig Signed-off-by:
Simon Glass <sjg@chromium.org>
-
This converts 1 usage of this option to the non-SPL form, since there is no SPL_EFI_TCG2_PROTOCOL defined in Kconfig Signed-off-by:
Simon Glass <sjg@chromium.org>
-
This converts 1 usage of this option to the non-SPL form, since there is no SPL_EFI_LOADER_HII defined in Kconfig Signed-off-by:
Simon Glass <sjg@chromium.org>
-
This converts 1 usage of this option to the non-SPL form, since there is no SPL_EFI_DEVICE_PATH_UTIL defined in Kconfig Signed-off-by:
Simon Glass <sjg@chromium.org>
-
This converts 1 usage of this option to the non-SPL form, since there is no SPL_EFI_APP defined in Kconfig Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Feb 08, 2023
-
-
Since commit 06d514d7 ("lmb: consider EFI memory map") the EFI regions are also pushed into the lmb if EFI_LOADER is enabled (which is by default on most system). Which can cause the number of entries to go over the maximum as it's default is only 8. Specifically i ran into this case on an TI am62 which has an fdt with 4 reserved regions (in practice 3 lmb entries due to adjecent ranges). As this is likely to impact more devices bump the default max regions to 16 so there is a bit more slack. Fixes: 06d514d7 ("lmb: consider EFI memory map") Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1207562 Reviewed-by:
Francesco Dolcini <francesco.dolcini@toradex.com> Signed-off-by:
Sjoerd Simons <sjoerd@collabora.com> Signed-off-by:
Michal Suchanek <msuchanek@suse.de> [trini: collect tags from the other equivalent patch]
-
Tom Rini authored
As explained by Philippe Schenker, I was misinterpreting what happened in the case where we do not set LMB_USE_MAX_REGIONS and so had re-introduced the problem I was attempting to more widely resolve. This reverts commit 007ae5d1. Reported-by:
Philippe Schenker <philippe.schenker@toradex.com> Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Feb 06, 2023
-
-
When adding reserved memory areas from the EFI memory map set the NOMAP flag when applicable. When this isn't done adding "no-map" flagged entries from the fdt after receiving the same from the EFI memory map fails due to non-matching flags. Signed-off-by:
Sjoerd Simons <sjoerd@collabora.com>
-
Tom Rini authored
The LMB code allows for picking a hard limit on the number of regions it can know of, or to dynamically allocate these regions. The reason for this choice is to allow for the compiler to perform a size optimization in the common case. This optimization however, is very small, ranging from 196 bytes to 15 bytes saved, or in some cases, being larger. Now that we also have more regions covered by LMB (in order to protect various parts of our self at run time), the default of 8 is also much easier to hit and leads to non-obvious error messages (which imply that an area is protected, not that we're out of areas to add to the list). Switch to the dynamic use as the default. Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Jan 27, 2023
-
-
Heinrich Schuchardt authored
HandleProtocol() is deprecrated. According to the UEFI specification it should be implemented as a call to OpenProtocolInterface() with a hard coded agent handle. This implies that we would have to call CloseProtocolInterfaces() after usage with the same handle. Getting rid of an EFI_CALL() is also appreciated. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Acked-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
Heinrich Schuchardt authored
There is no variable num_pages in function efi_esrt_allocate_install(). Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
- Jan 23, 2023
-
-
When this fails it can be time-consuming to debug. Add some debugging to help with this. Also try to return error codes instead of just using -1. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
It is often useful to show an error code to give the user a clue as to what went wrong. When error strings are compiled into U-Boot it is possible to show a message as well. But at present it is not very convenient, since code must check if the error strings are present, then obtain the error string and use it in a printf() string. Add a %dE option which shows an error code along with an error string, if available. This makes it easy to show one or both. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Some environment variables provide a space-separated list of strings. It is easier to process these when they are broken out into an array of strings. Add a utility function to handle this. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Jan 20, 2023
-
-
Tom Rini authored
At this point, the remaining places where we have a symbol that is defined as CONFIG_... are in fairly odd locations. While as much dead code has been removed as possible, some of these locations are simply less obvious at first. In other cases, this code is used, but was defined in such a way as to have been missed by earlier checks. Perform a rename of all such remaining symbols to be CFG_... rather than CONFIG_... Signed-off-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-