- Jan 16, 2024
-
-
next_header() and get_next_header() only differ in how the const attribute is used. One function taking a const parameter and returning a non-const is good enough. Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
QEMU provides SMBIOS tables with detailed information. We should not try to replicate them in U-Boot. If we want to inform about U-Boot, we can add a Firmware Inventory Information (type 45) table in future. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Jan 13, 2024
-
-
This commit stores the firmware version into the array of fmp_state structure to support the fmp versioning for multi bank update. The index of the array is identified by the bank index. This modification keeps the backward compatibility with the existing versioning feature. Signed-off-by:
Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
The capsule update uses the DFU framework for updating storage. fwu_get_image_index() currently returns the image_index calculated by (dfu_alt_num + 1), but this is different from the image_index in UEFI terminology. Since capsule update implementation calls dfu_write_by_alt function, it is better that FWU returns the dfu_alt_num. Signed-off-by:
Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
Looking back at the initrd storing functionality, we introduced three functions, efi_dp_append_or_concatenate(), efi_dp_append/concat(). In hindsight we could have simplified that by a lot. First of all none of the functions append anything. They all allocate a new device path and concatenate the contents of two device paths in one. A boolean parameter controls the final device path -- if that's true an end node is injected between the two device paths. So let's rewrite this and make it a bit easier to read. Get rid of efi_dp_append(), efi_dp_concat() and rename efi_dp_append_or_concatenate() to efi_dp_concat(). This is far more intuitive and the only adjustment that is needed is an extra boolean argument on all callsites. Signed-off-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
part and dev_index in struct efi_disk_obj are not used, let's remove it. This commit also removes the invalid structure comment for @dev, it does not exist. Signed-off-by:
Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
This function is defined by bootstd so using it precludes using that feature. Use the board_early_init_r() feature instead. Nove the affected code into a new file, so that it is clear that this relates to board init. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
If one of the FMP protocols fails when calling GetImageInfo(), populating the ESRT ends up with failure and other FMP protocols are not added to the ESRT. We should still add all other FMP protocols to the ESRT. With this commit, iteration of all FMP protocols continues even though one of the FMP protocols fails. Signed-off-by:
Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
- Jan 09, 2024
-
-
If line overflows readline it will not be returned, fix this behavior, make it optional and documented properly. Signed-off-by:
Ion Agorria <ion@agorria.com> Signed-off-by:
Svyatoslav Ryhel <clamor95@gmail.com> Reviewed-by:
Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Link: https://lore.kernel.org/r/20240105072212.6615-6-clamor95@gmail.com Signed-off-by:
Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
Heinrich Schuchardt authored
An EFI binary smbiosdump.efi is provided that can be used to check the SMBIOS table for consistency and to dump it as a file. The tool provides the following commands: check Check the SMBIOS table for consistency. exit Leave the tool. help Show available commands. save Save the SMBIOS table to a file on the EFI system partition. The file can be further analyzed with the dmidecode command line tool:: dmidecode --from-dump <filename> Specifying 'nocolor' as load option data suppresses colored output and clearing of the screen. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Acked-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
Heinrich Schuchardt authored
The smbios.h include does not use any definitions from ofnode.h. So don't include it. As DECLARE_GLOBAL_DATA_PTR is no longer defined via dm/of.h we need to add it to efi_smbios.c. Add now missing includes to smbios-parser.c. Remove a superfluous check comparing the sizes of the SMBIOS 2.1 and SMBIOS 3.0 anchors. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Heinrich Schuchardt authored
Many value of processor type exceed 0xff and have to be stored as u16 value. In the type 4 table set processor_family = 0xfe signaling that field processor_family2 is used and write the actual value into the processor_family2 field. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Heinrich Schuchardt authored
The function verify_checksum() duplicates what table_compute_checksum() does. Replace it. table_compute_checksum() is always compiled. Fixes: 415eab06 ("smbios: add parsing API") Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
Heinrich Schuchardt authored
table_compute_checksum() does neither changes the content of the checksummed buffer nor the buffer length. Adding const to the definition makes the function wider usable. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
- Jan 07, 2024
-
-
We have two implementations of write_acpi_tables(). One for writing ACPI tables based on ACPI_WRITER() entries another based on copying tables from QEMU. Create a symbol CONFIG_QFW_ACPI that signifies copying ACPI tables from QEMU and use it consistently. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Use X_DSDT and X_FIRMWARE_CTRL if available. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Rebased on -next to use nomap: Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Standard passage provides for a bloblist to be passed from one firmware phase to the next. That can be used to pass the devicetree along as well. Add an option to support this. Tests for this will be added as part of the Universal Payload work. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
Simon Glass authored
At present this code allocates memory when writing the tables and then unnecessarily adds another memory map when installing it. Adjust the code to allocate the tables using the normal U-Boot mechanism. This avoids doing an EFI memory allocation early in U-Boot, which may use memory that would be overwritten by a 'load' command, for example. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Sandbox uses an API to map between addresses and pointers. This allows it to have (emulated) memory at zero and avoid arch-specific addressing details. It also allows memory-mapped peripherals to work. As an example, on many machines sandbox maps address 100 to pointer value 10000000. However this is not correct for ACPI, if sandbox starts another program (e.g EFI app) and passes it the tables. That app has no knowledge of sandbox's address mapping. So to make this work we want to store 10000000 as the value in the table. Add two new 'nomap' functions which clearly make this exeption to how sandbox works. This should allow EFI apps to access ACPI tables with sandbox, e.g. for testing purposes. Signed-off-by:
Simon Glass <sjg@chromium.org> Suggested-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
Simon Glass authored
Only the v3 table is supported now, so always use this when installing the EFI table. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
Simon Glass authored
These tables are a pain since there is no way to handle memory above 4GB. Use SMBIOS3 always. This should hopefully not create problems on x86 devices, since SMBIOS3 was released seven years ago (2015). Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by:
Peter Robinson <pbrobinson@gmail.com>
-
Simon Glass authored
All callers handle this alignment, so drop the unnecessary code. This simplifies things a little. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
Simon Glass authored
EFI does not use the 'anchor string' to determine the SMBIOS table version, instead preferring to have two separate GUIDs. Use the correct one, depending on the table version. Call unmap_system() to balance to the use of map_sysmem() Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
Simon Glass authored
This should access arch-specific properties. Fix it and update the existing usage. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
Simon Glass authored
When the SMBIOS table is written to an address above 4GB a 32-bit table address is not large enough. Use an SMBIOS3 table in that case. Note that we cannot use efi_allocate_pages() since this function has nothing to do with EFI. There is no equivalent function to allocate memory below 4GB in U-Boot. One solution would be to create a separate malloc() pool, or just always put the malloc() pool below 4GB. - Use log_debug() for warning - Rebase on Heinrich's smbios.h patch - Set the checksum for SMBIOS3 Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
Simon Glass authored
Move all of this logic into the else clause, since it will not be used for SMBIOS3 Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
Simon Glass authored
In preparation for adding support for SMBIOS3 move this code into an else statement. There is no functional change. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
- Dec 21, 2023
-
-
Signed-off-by:
Csókás Bence <csokas.bence@prolan.hu> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
Tom Rini authored
After some header file cleanups to add missing include files, remove common.h from all files in the lib directory. This primarily means just dropping the line but in a few cases we need to add in other header files now. Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Tom Rini <trini@konsulko.com>
-
Tom Rini authored
In include/display_options.h we cannot include ourself, but do need <linux/types.h> directly. Then in lib/display_options.c we further clean the list to remove common.h. Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Tom Rini <trini@konsulko.com>
-
Tom Rini authored
We largely do not need <common.h> in these files, so drop it. The only exception here is that efi_freestanding.c needs <linux/types.h> and had been getting that via <common.h>. Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Tom Rini <trini@konsulko.com>
-
Tom Rini authored
Cleanup the list of headers we include here. For the tools build we only need to exclude <cyclic.h> as that's used by the target build for the prototype for schedule(), and we don't need to get that via <watchdog.h>. We can also make use of our <string.h> intentionally existing as a redirection to <linux/string.h> to reduce ifdef'd lines. Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Tom Rini <trini@konsulko.com>
-
Tom Rini authored
In order to make it easier to move on to dropping common.h from code directly, remove common.h inclusion from the rest of the header file which had been including it. Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Tom Rini <trini@konsulko.com>
-
Tom Rini authored
In general terms, we -include include/linux/kconfig.h and so normal U-Boot code does not need to also #include it. However, for code which is shared with userspace we may need to add it so that either our full config is available or so that macros such as CONFIG_IS_ENABLED() can be evaluated. In this case make sure that we guard these includes with a test for USE_HOSTCC so that it clear as to why we're doing this. Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Dec 20, 2023
-
-
In order to fill in the SMBIOS tables U-Boot currently relies on a "u-boot,sysinfo-smbios" compatible node. This is fine for the boards that already include such nodes. However with some recent EFI changes, the majority of boards can boot up distros, which usually rely on things like dmidecode etc for their reporting. For boards that lack this special node the SMBIOS output looks like: System Information Manufacturer: Unknown Product Name: Unknown Version: Unknown Serial Number: Unknown UUID: Not Settable Wake-up Type: Reserved SKU Number: Unknown Family: Unknown This looks problematic since most of the info are "Unknown". The DT spec specifies standard properties containing relevant information like 'model' and 'compatible' for which the suggested format is <manufacturer,model>. Unfortunately the 'model' string found in DTs is usually lacking the manufacturer so we can't use it for both 'Manufacturer' and 'Product Name' SMBIOS entries reliably. So let's add a last resort to our current smbios parsing. If none of the sysinfo properties are found, scan for those information in the root node of the device tree. Use the 'model' to fill the 'Product Name' and the first value of 'compatible' for the 'Manufacturer', since that always contains one. pre-patch: Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: Unknown Product Name: Unknown Version: Unknown Serial Number: 100000000bb24ceb UUID: 30303031-3030-3030-3061-613234636435 Wake-up Type: Reserved SKU Number: Unknown Family: Unknown [...] and post patch: Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: raspberrypi Product Name: Raspberry Pi 4 Model B Rev 1.1 Version: Unknown Serial Number: 100000000bb24ceb UUID: 30303031-3030-3030-3061-613234636435 Wake-up Type: Reserved SKU Number: Unknown Family: Unknown [...] Signed-off-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by:
Peter Robinson <pbrobinson@gmail.com> Tested-by:
Peter Robinson <pbrobinson@gmail.com>
-
If a value is not valid during the DT or SYSINFO parsing, we explicitly set that to "Unknown Product" and "Unknown" for the product and manufacturer respectively. It's cleaner if we move the checks insisde smbios_add_prop_si() and provide an alternative string in case the primary is NULL or empty pre-patch dmidecode <snip> Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: Unknown Product Name: Unknown Product Version: Not Specified Serial Number: Not Specified UUID: Not Settable Wake-up Type: Reserved SKU Number: Not Specified Family: Not Specified [...] post-patch dmidecode: Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: Unknown Product Name: Unknown Version: Unknown Serial Number: Unknown UUID: Not Settable Wake-up Type: Reserved SKU Number: Unknown Family: Unknown [...] While at it make smbios_add_prop_si() add a string directly if the prop node is NULL and replace smbios_add_string() calls with smbios_add_prop_si(ctx, NULL, ....) Signed-off-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by:
Peter Robinson <pbrobinson@gmail.com> Tested-by:
Peter Robinson <pbrobinson@gmail.com>
-
pkcs11 : change engine uri to use full pk11-URI as defined in: https://www.rfc-editor.org/rfc/rfc7512.html Signed-off-by:
Ayoub Zaki <ayoub.zaki@embetrix.com>
-
- Dec 17, 2023
-
-
In the prior commits, interfaces for executing EFI binary and boot manager were carved out. Move them under efi_loader directory so that they can be called from other places without depending on bootefi command. Only efi_selftest-related code will be left in bootefi.c. Signed-off-by:
AKASHI Takahiro <takahiro.akashi@linaro.org>
-
- Dec 13, 2023
-
-
The RSDT table is deprecated and does not exist on all systems. By preference scan XSDT for the table to find. If no XSDT table exists, try to use the RSDT table. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
* Converting to void * is superfluous when calling memset(). * acpi_fill_header() already fills oem_table_id. Fixes: d9531375 ("x86: Move SSDT table to a writer function") Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-