- Dec 03, 2020
-
-
A capsule tagged with the guid, EFI_FIRMWARE_MANAGEMENT_CAPSULE_ID_GUID, is handled as a firmware update object. What efi_update_capsule() basically does is to load any firmware management protocol (or fmp) drivers contained in a capsule, find out an appropriate fmp driver and then invoke its set_image() interface against each binary in a capsule. In this commit, however, loading drivers is not supported. The result of applying a capsule is set to be stored in "CapsuleXXXX" variable, but its implementation is deferred to a fmp driver. Signed-off-by:
AKASHI Takahiro <takahiro.akashi@linaro.org>
-
Memory range capsule gives us a way to notify that some memory regions should be left untouched across the next reset. See UEFI specification, section 8.5.3. Since how we should handle this kind of capsule is totally up to the system, no implementation will be added in this commit. Signed-off-by:
AKASHI Takahiro <takahiro.akashi@linaro.org>
-
Capsule data can be loaded into the system either via UpdateCapsule runtime service or files on a file system (of boot device). The latter case is called "capsules on disk", and actual updates will take place at the next boot time. In this commit, we will support capsule on disk mechanism. Please note that U-Boot itself has no notion of "boot device" and all the capsule files to be executed will be detected only if they are located in a specific directory, \EFI\UpdateCapsule, on a device that is identified as a boot device by "BootXXXX" variables. Signed-off-by:
AKASHI Takahiro <takahiro.akashi@linaro.org>
-
In this commit, skeleton functions for capsule-related API's are added under CONFIG_EFI_UPDATE_CAPSULE configuration. Detailed implementation for a specific capsule type will be added in the succeeding patches. Signed-off-by:
AKASHI Takahiro <takahiro.akashi@linaro.org>
-
Since update_flash() is used only in update_tftp(), it should be guarded with appropriate config options. After the commit 3149e524, common/update.c will be built under either CONFIG_UDATE_TFTP, CONFIG_DFU_TFTP or CONFIG_UPDATE_FIT. Since CONFIG_UPDATE_FIT, hence fit_update(), doesn't rely on update_flash(), the compiler may cause an "unused" warning if CONFIG_UPDATE_FIT=y and CONFIG_UPDATE_TFTP=n and CONFIG_DFU_TFTP=n. This is, for example, the case for sandbox defconfig where EFI_CAPSULE_FIRMWARE_FIT is enabled for test purpose. Fixes: 3149e524 ("common: update: add a generic interface for FIT image") Signed-off-by:
AKASHI Takahiro <takahiro.akashi@linaro.org>
-
A previous commit is adding EFI_TCG2_PROTOCOL, which in it's eventlog support registers an EFI configuration table. Let's add the necessary GUID so 'efidebug table' command can display table names properly. Signed-off-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
In the previous patches we only introduced a minimal subset of the EFI_TCG2_PROTOCOL protocol implementing GetCapability(). So let's continue adding features to it, introducing the GetEventLog() and HashLogExtendEvent() functions. In order to do that we first need to construct the eventlog in memory, specifically in EFI_BOOT_SERVICES_DATA memory and a configuration table from EFI_ACPI_MEMORY_NVS. U-Boot won't currently add any events to the log or measure any components, but will expose the necessary EFI APIs for applications to do so. Signed-off-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
A following patch introduces support for the EFI_TCG2_PROTOCOL eventlog management. Introduce the necessary tpm related headers Signed-off-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
The current tpm2_pcr_extend is hardcoded using SHA256. Let's make the actual command to the TPM2 configurable so we can support a wider range of algorithms and keep the current command line as-is i.e limited to SHA256 only Signed-off-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Heinrich Schuchardt authored
Use logging functions instead of printf() and debug(). Change logging messages for uclass creation and destruction to log_debug(). Reported-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Dec 02, 2020
-
-
Tom Rini authored
- More IPQ40xx improvements - Add string support to setexpr (and tests) - ProxyDHCP support - Assorted cleanups
-
- Dec 01, 2020
-
-
Address most of the checkpatch issues we found in km_arm and common km code. CC: Stefan Roese <sr@denx.de> CC: Valentin Longchamp <valentin.longchamp@hitachi-powergrids.com> Signed-off-by:
Holger Brunck <holger.brunck@hitachi-powergrids.com> Reviewed-by:
Stefan Roese <sr@denx.de>
-
This commit add the support of signature check for config node in spl/tpl when the function spl_load_simple_fit is used. Signed-off-by:
Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
USB clocks were completely forgotten as driver would always return 0 even if clock ID was unknown. This behaviour changed with "IPQ40xx: clk: dont always return 0" and this will now causes the USB-s to fail probing as clock enable will return -EINVAL. So to fix that lets add all of the USB clocks to the driver. Fixes: 430e1dcf ("IPQ40xx: Add USB nodes") Signed-off-by:
Robert Marko <robert.marko@sartura.hr> Cc: Luka Perkov <luka.perkov@sartura.hr>
-
Currently the driver will go through the clock ID-s and set/enable them as needed. But if the ID is unknown it will fall through the switch case to the default case which will always return 0. This is not correct and default cases should return a error code since clock ID is unknown. So lets return -EINVAL instead. Signed-off-by:
Robert Marko <robert.marko@sartura.hr> Cc: Luka Perkov <luka.perkov@sartura.hr>
-
There is no point in having break statements in the switch case as there is already a return before break. So lets drop them from the driver. Signed-off-by:
Robert Marko <robert.marko@sartura.hr> Cc: Luka Perkov <luka.perkov@sartura.hr>
-
Lets convert the driver to use dev_read_addr() instead of the devfdt_get_addr(). While we are here, lets also alphabetise the includes. Signed-off-by:
Robert Marko <robert.marko@sartura.hr> Cc: Luka Perkov <luka.perkov@sartura.hr>
-
Move CONFIG_SYS_PROMPT_HUSH_PS2 in Kconfig, depending on CONFIG_HUSH_PARSER, and remove the default value defined in cli_hush.c under __U_BOOT__. Signed-off-by:
Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
There is no reason to define default option for this macro which is already done in common/cli_hush.c. 87 #ifndef CONFIG_SYS_PROMPT_HUSH_PS2 88 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " 89 #endif Signed-off-by:
Patrick Delaunay <patrick.delaunay@st.com> Acked-by:
Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
-
CONFIG_TIMESTAMP is not related to the RTC drivers. It does not make any sense to let the updating of the RTC by the sntp command depend on it. Drop the CONFIG_TIMESTAMP checks. Furthermore function dm_rtc_set() is enabled by CONFIG_DM_RTC. There is no reason to require CONFIG_CMD_DATE when using a driver model RTC. The UEFI sub-system can consume the RTC functions even if there is not date command. Only check CONFIG_CMD_DATE when using a non-driver model RTC. Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
Add support for dealing with string operands, including reading a string from memory into an environment variable and concatenating two strings. Signed-off-by:
Simon Glass <sjg@chromium.org> Acked-by:
Marek Behún <marek.behun@nic.cz>
-
At present a ulong is used to hold operand values. This means that strings cannot be used. While most operations are not useful for strings, concatenation is. As a starting point to supporting strings, convert the code to use a struct instead of a ulong for operands. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
At present when more than one substitution is made this function overwrites its buffers. Fix this bug and update the tests now that they can pass. Also update the debug code to show all substrings, since at present it omits the final one. Fixes: 855f18ea ("setexpr: add regex substring matching and substitution") Signed-off-by:
Simon Glass <sjg@chromium.org>
-
At present the 'nlen' variable increases with each loop. If the previous loop had back references, then subsequent loops without back references use the wrong value of nlen. The value is larger, meaning that the string terminator from nbuf is copied along to the main buffer, thus terminating the string prematurely. This leads to the final result being truncated, e.g. missing the last (unmatched) part of the string. So "match match tail" become "replaced replaced" instead of "replaced replaced tail". Fix this by resetting nlen to the correct value each time around the lop. Fixes: 855f18ea ("setexpr: add regex substring matching and substitution") Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
At present this function always allocates a large amount of stack, and selects its own size for buffers. This makes it hard to test the code for buffer overflow. Separate out the inner logic of the substitution so that tests can call this directly. This will allow checking that the algorithm does not overflow the buffer. Fix up one of the error lines at the same time, since it should be printing nbuf_size, not data_size. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Add tests for the setexpr regex commands. Note that these tests currently crash on sandbox due to an existing bug in the setexpr implementation, so two of the tests are commented out. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
At present this function assumes that a size of 4 refers to a ulong. This is true on 32-bit machines but not commonly on 64-bit machines. This means that the 'l' specify does not work correctly with setexpr. Add an explicit case for 32-bit values so that 64-bit machines can still use the 'l' specifier. On 32-bit machines, 64-bit is still not supported. This corrects the operation of the default size (which is 4 for setexpr), so update the tests accordingly. The original code for reading from memory was included in 47ab5ad1 ("cmd_setexpr: allow memory addresses in expressions") but I am not adding a Fixes: tag since that code was not written with 64-bit machines in mind. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by:
Simon Glass <sjg@chromium.org>
-
This command currently has no tests. Add some for basic assignment and the integer operations. Note that the default size for setexpr is ulong, which varies depending on the build machine. So for sandbox on a 64-bit host, this means that the default size is 64 bits. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
On more places is used pattern 'command > $@ || rm -f $@'. But it does not propagate failure from 'command' as 'rm -f' returns success. Fix it by calling 'false' to correctly propagate failure after 'rm -f'. Signed-off-by:
Pali Rohár <pali@kernel.org> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Use ofnode_ or dev_ APIs instead of fdt_ and fdtdec_ APIs so that the driver can support live DT. Signed-off-by:
Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
- ProxyDHCP allows a second DHCP server to exist alongside your main DHCP server and supply additional BOOTP related options - When u-boot sends out a DHCP request, the real DHCP server will respond with a normal response containing the new client IP address while simultaneously the ProxyDHCP server will respond with a blank client IP address and a `bootfile` option - This patch adds CONFIG_SERVERIP_FROM_PROXYDHCP (default false) to enable this behavior and CONFIG_SERVERIP_FROM_PROXYDHCP_DELAY_MS (default 100) which tells u-boot to wait additional time after receiving the main DHCP response to give the ProxyDHCP response time to arrive - The PXE spec for ProxyDHCP is more complicated than the solution added here as diagramed on page 16: http://www.pix.net/software/pxeboot/archive/pxespec.pdf : ``` DHCP Discover will be retried four times. The four timeouts are 4, 8, 16 and 32 seconds respectively. If a DHCPOFFER is received without an Option timeouts in an attempt to receive a PXE response. ``` - Adding a simple delay worked for my purposes but let me know if a more robust solution is required Signed-off-by:
Lyle Franklin <lylejfranklin@gmail.com>
-
As FDTDIR label doesn't specify exact file to be loaded, it should not fail if no file exists in the directory. In this case try to boot with internal FDT if it exists. Signed-off-by:
Anton Leontiev <aleontiev@elvees.com>
-
- Nov 30, 2020
-
-
Tom Rini authored
Signed-off-by:
Tom Rini <trini@konsulko.com>
-
Tom Rini authored
Rsync all defconfig files using moveconfig.py Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Nov 29, 2020
-
-
https://gitlab.denx.de/u-boot/custodians/u-boot-mmcTom Rini authored
- mmc minor update for better debug and error check - fsl_esdhc sysctl set and make sure delay check for HS400
-
https://gitlab.denx.de/u-boot/custodians/u-boot-efiTom Rini authored
Pull request for UEFI sub-system for efi-2021-01-rc3 (3) The following errors are corrected: * Linux crash when accessing UEFI variables at runtime. * UEFI variable using standalone MM on 32 bit systems not working due to missing packing of communication structure * NULL dereference when FAT16 root directory is full * FAT files with a short file name starting with 0xE5 (0x05 in directory entry) where treated as deleted. The UEFI SetTime() service is enabled on ARM QEMU.
-
commit 1fabfeef506c ("efi_loader: parameter check in GetNextVariableName()") introduces a check using u16_strnlen(). This code is used on EFI runtime variables as well, so unless we mark it as runtime, the kernel will crash trying to access it. Fixes: 1fabfeef506c ("efi_loader: parameter check in GetNextVariableName()") Signed-off-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
Pack struct efi_mm_communicate_header as done in EDK2 as seen in release 201808 [1]. If not packed sizeof() for the structure adds 4 additional bytes on 32bit targets which breaks the ABI. Link: [1] https://github.com/tianocore/edk2/blob/edk2-stable201808/MdePkg/Include/Protocol/MmCommunication.h#L21 Fixes: 23a397d2 ("efi_loader: Add headers for EDK2 StandAloneMM communication") Signed-off-by:
Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-