aboutsummaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* efi_loader: correct handling of EFI binary return codeHeinrich Schuchardt2024-03-211-5/+11
| | | | | | | | | | We should not try to remove protocol interfaces from a NULL handle. efi_run_image() should always return the return code of the executed EFI binary. Fixes: 6422820ac3e5 ("efi_loader: split unrelated code from efi_bootmgr.c") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* efi_loader: Don't carve out memory reservations too earlyMark Kettenis2024-03-131-4/+7
| | | | | | | | | | | | | | | | Moving the efi_carve_out_dt_rsv() call in commit 1be415b21b2d ("efi_loader: create memory reservations in ACPI case") broke boards that create additional memory reservations in ft_board_setup() since it is now called before those additional memory reservations are made. This is the case for the rk3588 boards and breaks booting OpenBSD on those boards. Move the call back to its original location and add a call in the code path used for ACPI. Fixes: 1be415b21b2d ("efi_loader: create memory reservations in ACPI case") Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* efi_loader: simplify error message in efi_disk_create_raw()Heinrich Schuchardt2024-02-121-1/+2
| | | | | | | | | | | | | | | | | | | The error message Adding disk for usb_mass_storage.lun0 failed (err=-9223372036854775788/0x8000000000000014) provides a decimal and a hexadecimal notation of the EFI status code EFI_ALREADY_STARTED which is defined as (EFI_ERROR_MASK | 20). The decimal output does not convey the value 20 clearly. With the patch we write Adding block device usb_mass_storage.lun0 failed, r = 20 similar to other EFI error messages. Fixes: 952018117ab4 ("dm: sandbox: Switch over to using the new host uclass") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* lib: sparse: Fix error checking for write_sparse_chunk_rawSean Anderson2024-02-091-1/+1
| | | | | | | | | | | | | | | The return value of write_sparse_chunk_raw is unsigned, so the existing check has no effect. Use IS_ERR_VALUE to detect error instead, which is what write_sparse_chunk_raw does itself. Fixes: 62649165cb0 ("lib: sparse: Make CHUNK_TYPE_RAW buffer aligned") Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/u-boot/1b323ec3-59b0-490b-a2f0-fd961dafcf49@moroto.mountain/ Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20240201181851.221701-1-sean.anderson@seco.com Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
* smbios: correctly name Structure Table Maximum Size fieldHeinrich Schuchardt2024-02-024-7/+7
| | | | | | | | | | In the SMBIOS 3 entry point the Structure Table Maximum Size field was incorrectly named max_struct_size. A Maximum Structure Size field only exists in the SMBIOS 2.1 entry point and has a different meaning. Call the Structure Table Length field table_maximum_size. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* smbios: do not determine maximum structure sizeHeinrich Schuchardt2024-02-021-6/+1
| | | | | | | | Only the SMBIOS 2.1 entry point has a field for the maximum structure size. As we have switched to an SMBIOS 3 entry point remove the superfluous calculation. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* smbios: correctly fill chassis handleHeinrich Schuchardt2024-02-021-0/+2
| | | | | | | | The chassis handle field in the type 2 structure must point to the handle of the type 3 structure. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* smbios: if a string value is unknown, use string number 0Heinrich Schuchardt2024-02-021-15/+18
| | | | | | | | | | | | | | | | | | The SMBIOS specification describes: "If a string field references no string, a null (0) is placed in that string field." Accordingly we should avoid writing a string "Unknown" to the SMBIOS table. dmidecode displays 'Not Specified' if the string number is 0. Commit 00a871d34e2f ("smbios: empty strings in smbios_add_string()") correctly identified that strings may not have length 0 as two consecutive NULs indentify the end of the string list. But the suggested solution did not match the intent of the SMBIOS specification. Fixes: 00a871d34e2f ("smbios: empty strings in smbios_add_string()") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* smbios: Fix table when no string is presentMatthias Brugger2024-02-021-0/+4
| | | | | | | | | | When no string is present in a table, next_ptr points to the same location as eos. When calculating the string table length, we would only reserve one \0. By spec a SMBIOS table has to end with two \0\0 when no strings a present. Signed-off-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* smbios: get_str_from_dt() - add sysinfo_id descriptionHeinrich Schuchardt2024-02-021-0/+1
| | | | | | | | Add description for parameter sysinfo_id of function get_str_from_dt(). Fixes: 07c9e683a484 ("smbios: Allow a few values to come from sysinfo") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* lib: smbios_entr() use logical or for booleansHeinrich Schuchardt2024-02-021-1/+1
| | | | | | | As a matter of programming style use logical or to combine two boolean results. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* efi_loader: check efi_get_variable_int return valueMasahisa Kojima2024-01-291-5/+5
| | | | | | | | efi_get_variable_int() may fail, the buffer should be cleared before using it. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Addresses-Coverity-ID: 478333 ("Error handling issues")
* efi_loader: replace find_smbios_table by library functionHeinrich Schuchardt2024-01-291-18/+1
| | | | | | | | The code in find_smbios_table() is redundant to efi_get_configuration_table(). Replace it. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* efi_loader: export efi_get_configuration_tableHeinrich Schuchardt2024-01-291-3/+3
| | | | | | | | In multiple places we need a function to find an EFI configuration table. Rename get_config_table() to efi_get_configuration_table() and export it. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* efi_selftest: add missing line feed in efi_selftest_miniapp_exitHeinrich Schuchardt2024-01-291-1/+1
| | | | | | | | | | | | | If an error occurs we may see an output like: EFI application calling Exit Could not open loaded image protocolLoaded image protocol missing Add the missing line feed. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* lib: support SMBIOS3 table in uuid_guid_get_str()Heinrich Schuchardt2024-01-261-0/+4
| | | | | | | | As we support installing SMBIOS3 tables in U-Boot we need to add this GUID to the translation table used buy uuid_guid_get_str(). Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
* efi_loader: migrate SMBIOS 3.0 entry point structure for measurementMasahisa Kojima2024-01-263-62/+63
| | | | | | | | | | | | | | Current U-Boot only supports the SMBIOS 3.0 entry point structure. TCG2 measurement code should migrate to SMBIOS 3.0 entry point structure. efi_selftest tcg2 test also needs to be updated, and expected PCR[1] result is changed since guid for SMBIOS EFI system table uses different guid SMBIOS3_TABLE_GUID instead of SMBIOS_TABLE_GUID. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* lib: add comment in utf8_to_utf32_stream()Heinrich Schuchardt2024-01-241-0/+4
| | | | | | | The logic of utf8_to_utf32_stream() is not easy to understand. Add a comment. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* efi_loader: return immediately in UCLASS_EFI_LOADER removalMasahisa Kojima2024-01-211-6/+10
| | | | | | | | In case of UCLASS_EFI_LOADER, EFI handles are managed by EFI application/driver, we must not delete EFI handles. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* efi_loader: create common function to free struct efi_disk_objMasahisa Kojima2024-01-211-7/+19
| | | | | | | | | | | | | | | | Current error handling of creating raw disk/partition has following issues. - duplicate free for EFI handle, EFI handle is already freed in efi_delete_handle() - missing free for struct efi_device_path and struct efi_simple_file_system_protocol in some error paths To address those issues, this commit creates the common function to free the struct efi_disk_obj resources and calls it in case of error. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* efi_loader: avoid pointer access after calling efi_delete_handleMasahisa Kojima2024-01-211-6/+14
| | | | | | | | | | | | | | | | | | | efi_delete_handle() calls efi_purge_handle(), then it finally frees the EFI handle. Both diskobj and handle variables in efi_disk_remove() have the same pointer, we can not access diskobj->dp after calling efi_delete_handle(). This commit saves the struct efi_device_path pointer before calling efi_delete_handle(). This commit also fixes the missing free for volume member in struct efi_disk_obj. This commit also removes the container_of() calls, and adds the TODO comment of missing efi_close_protocol() call for the parent EFI_BLOCK_IO_PROTOCOL. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* efi_loader: auto-generate removable media boot option firstMasahisa Kojima2024-01-211-7/+26
| | | | | | | | | This commit auto-generates the boot option for removable block io devices followed by fixed block io devices. This is what EDK II reference implementation does. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* efi_loader: auto-generate boot option for each blkio deviceMasahisa Kojima2024-01-211-26/+75
| | | | | | | | | | | | | Current efibootmgr auto-generates the boot option for all disks and partitions installing EFI_SIMPLE_FILE_SYSTEM_PROTOCOL, while EDK II reference implementation auto-generates the boot option for all devices installing EFI_BLOCK_IO_PROTOCOL with eliminating logical partitions. This commit modifies the efibootmgr to get aligned to EDK II. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* efi_loader: rename check_disk_has_default_file functionMasahisa Kojima2024-01-211-5/+8
| | | | | | | | | | | check_disk_has_default_file() function checks if the architecture-specific default file exists on the block device, and fills the default file device path if it exists. Rename the function name to fill_default_file_path(). Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* smbios: fix matching issues for table typesIlias Apalodimas2024-01-181-17/+28
| | | | | | | | | | | | commit 738b34668f28 ("smbios: Fallback to the default DT if sysinfo nodes are missing") allowed the code to fallback and fill in SMBIOS tables with properties from the compatible and product nodes of the DT, in case the 'smbios,sysinfo' node is missing. That works fine for Type1/2 tables, but for other types we need to match the smbios,sysinfo subnode name as well. So add it to the smbios_ctx and check it during the sysinfo <-> DT mathcing Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* smbios: shorten sysinfo_str declarations and useIlias Apalodimas2024-01-181-6/+6
| | | | | | | sysinfo_str is a bit too long and makes indentation weird. Shorten it to si_str. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* smbios: buffer overflow when zeroing entry pointHeinrich Schuchardt2024-01-181-2/+2
| | | | | | | | | | | A SMBIOS 3 entry point has a different length than an SMBIOS 2.1 entry point. Fixes: 70924294f375 ("smbios: Use SMBIOS 3.0 to support an address above 4GB") Fixes: 1c5f6fa3883d ("smbios: Drop support for SMBIOS2 tables") Addresses-Coverity-ID: 477212 ("Wrong sizeof argument") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* lib: rsa: Allow legacy URI specification without "pkcs11:"Csókás Bence2024-01-181-12/+30
| | | | | | | | | But emit a warning for it. Then we can remove support when everyone had time to update their scripts, docs, CI etc. Fixes: ece85cc020 rsa: use pkcs11 uri as defined in rfc7512 Signed-off-by: Csókás Bence <csokas.bence@prolan.hu>
* lib: rsa: Fix PKCS11 URI if one is not given in `keydir`Csókás Bence2024-01-181-2/+2
| | | | | | | | | If `keydir` is not present, we need to build a PKCS11 URI from just the key name. In this case, we *do* need 'pkcs11:' Fixes: ece85cc020 rsa: use pkcs11 uri as defined in rfc7512 Signed-off-by: Csókás Bence <csokas.bence@prolan.hu>
* Merge tag 'efi-2024-04-rc1-2' of ↵Tom Rini2024-01-176-491/+511
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-efi Documentation: * add generated index to table of contents * create index entries for commands * update Python packages used to build the documentation * fix typos in dfu documentation UEFI: * split unrelated code from efi_bootmgr.c * rename CONFIG_BOOTEFI_BOOTMGR to CONFIG_EFI_BOOTMGR * net: tftp: remove explicit EFI configuration dependency * fs: remove explicit EFI configuration dependency Other: * Add Goldfish RTC driver and make it available on RISC-V QEMU
| * efi_loader: rename BOOTEFI_BOOTMGR to EFI_BOOTMGRAKASHI Takahiro2024-01-172-2/+2
| | | | | | | | | | | | | | | | At this point, EFI boot manager interfaces is fully independent from bootefi command. So just rename the configuration parameter. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
| * efi_loader: split unrelated code from efi_bootmgr.cAKASHI Takahiro2024-01-176-489/+509
| | | | | | | | | | | | | | | | | | | | | | | | | | Some code moved from cmd/bootefi.c is actually necessary only for "bootefi <addr>" command (starting an image manually loaded by a user using U-Boot load commands or other methods (like JTAG debugger). The code will never been opted out as unused code by a compiler which doesn't know how EFI boot manager is implemented. So introduce a new configuration, CONFIG_EFI_BINARY_EXEC, to enforce them opted out explicitly. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
* | lib: smbios: remove redundant next_header()Heinrich Schuchardt2024-01-161-9/+2
| | | | | | | | | | | | | | | | | | 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>
* | smbios: copy QEMU tablesHeinrich Schuchardt2024-01-161-1/+3
|/ | | | | | | | | | | 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>
* efi_loader: support fmp versioning for multi bank updateMasahisa Kojima2024-01-131-15/+60
| | | | | | | | | | | | | 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>
* fwu: fix fwu_get_image_index interfaceMasahisa Kojima2024-01-132-22/+21
| | | | | | | | | | | | | 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>
* efi_loader: Clean up efi_dp_append and efi_dp_concatIlias Apalodimas2024-01-134-54/+26
| | | | | | | | | | | | | | | | | | 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>
* efi_loader: remove unused members from struct efi_disk_objMasahisa Kojima2024-01-131-12/+3
| | | | | | | | | | | 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>
* efi: Avoid using dm_scan_other()Simon Glass2024-01-133-188/+206
| | | | | | | | | | | 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>
* efi_loader: fix iteration of FMP protocolsMasahisa Kojima2024-01-131-6/+12
| | | | | | | | | | | | | | 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>
* Merge tag 'u-boot-dfu-20240111' of ↵Tom Rini2024-01-111-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-dfu u-boot-dfu-20240111 - Implement fastboot multi-response. This allows multi-line response and most importantly, finally adds support for fastboot getvar all command. - New 'fastboot oem console' command. Useful for debugging to send data the u-boot shell via fastboot - Console recording fixes
| * lib: membuff: fix readline not returning line in case of overflowIon Agorria2024-01-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | efi_loader: provide tool to dump SMBIOS tableHeinrich Schuchardt2024-01-092-0/+629
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | smbios: smbios.h should not import ofnode.hHeinrich Schuchardt2024-01-092-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | smbios: enable setting processor family > 0xffHeinrich Schuchardt2024-01-091-2/+2
| | | | | | | | | | | | | | | | | | | | 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>
* | lib: smbios: verify_checksum() is duplicateHeinrich Schuchardt2024-01-091-16/+2
| | | | | | | | | | | | | | | | | | | | The function verify_checksum() duplicates what table_compute_checksum() does. Replace it. table_compute_checksum() is always compiled. Fixes: 415eab0655a8 ("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>
* | lib: make table_compute_checksum() arguments constHeinrich Schuchardt2024-01-091-2/+2
|/ | | | | | | | | 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>
* acpi: Kconfig symbol CONFIG_QFW_ACPIHeinrich Schuchardt2024-01-072-3/+3
| | | | | | | | | | | | 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>
* acpi: support 64bit in acpi_find_table for DSDT and FACSHeinrich Schuchardt2024-01-071-5/+24
| | | | | | | | | 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>
* fdt: Allow the devicetree to come from a bloblistSimon Glass2024-01-071-10/+34
| | | | | | | | | | | | 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>