summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-01-22dm: core: Clarify behaviour of ofnode_name_eq()Simon Glass
This function is somewhat ambiguous, so expand the comments and add a test for the undefined behaviour. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22x86: emulation: Enable bloblistSimon Glass
Add bloblist support so that tables can be generated and placed in a bloblist, then passed to a payload using UPL Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22efi_loader: Avoid mapping the ACPI tables twiceSimon Glass
The add_u_boot_and_runtime() function paints with a broad brush, considering all of the memory from the top of U-Boot stack to gd->ram_top as EFI_RUNTIME_SERVICES_CODE This is fine, but we need to make sure we don't add a separate entry for any ACPI tables in this region (which happens when bloblist is used for tables). Otherwise the memory map looks strange and we get a test failure on qemu-x86 (only) for the 'virtual address map' test. Good map: Type Start End Attributes ================ ================ ================ ========== CONVENTIONAL 0000000000000000-00000000000a0000 WB RESERVED 00000000000a0000-00000000000f0000 WB RUNTIME DATA 00000000000f0000-00000000000f2000 WB|RT RESERVED 00000000000f2000-0000000000100000 WB CONVENTIONAL 0000000000100000-0000000005cc7000 WB BOOT DATA 0000000005cc7000-0000000005ccc000 WB RUNTIME DATA 0000000005ccc000-0000000005ccd000 WB|RT BOOT DATA 0000000005ccd000-0000000005cce000 WB RUNTIME DATA 0000000005cce000-0000000005cf0000 WB|RT BOOT DATA 0000000005cf0000-0000000006cf5000 WB RESERVED 0000000006cf5000-0000000006cfa000 WB ACPI RECLAIM MEM 0000000006cfa000-0000000006d1c000 WB RESERVED 0000000006d1c000-0000000006f35000 WB RUNTIME CODE 0000000006f35000-0000000006f37000 WB|RT RESERVED 0000000006f37000-0000000008000000 WB RESERVED 00000000e0000000-00000000f0000000 WB Bad map: (with BLOBLIST_TABLES but without this patch): Type Start End Attributes ================ ================ ================ ========== CONVENTIONAL 0000000000000000-00000000000a0000 WB RESERVED 00000000000a0000-00000000000f0000 WB ACPI RECLAIM MEM 00000000000f0000-00000000000f1000 WB RESERVED 00000000000f1000-0000000000100000 WB CONVENTIONAL 0000000000100000-0000000005ca5000 WB BOOT DATA 0000000005ca5000-0000000005caa000 WB RUNTIME DATA 0000000005caa000-0000000005cab000 WB|RT BOOT DATA 0000000005cab000-0000000005cac000 WB RUNTIME DATA 0000000005cac000-0000000005cce000 WB|RT BOOT DATA 0000000005cce000-0000000006cd3000 WB RUNTIME DATA 0000000006cd3000-0000000006cd5000 WB|RT BOOT DATA 0000000006cd5000-0000000006cf4000 WB RESERVED 0000000006cf4000-0000000006cf9000 WB ACPI RECLAIM MEM 0000000006cf9000-0000000006ce6000 WB Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22x86: Align the SMBIOS table to a 4K boundarySimon Glass
This isn't strictly needed, but with UPL we use the reserved-memory nodes to indicate where the SMBIOS table is. Tianocore requires 4KB alignment on these regions, so it is easier to adjust the alignment to match. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22x86: Move tables to use SZ macrosSimon Glass
Update the tables to use linux/sizes rather than open-coped values. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2025-01-22x86: Enable UPL handoff for SPLSimon Glass
Add the GD_FLG_UPL so that a UPL-handoff is created. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22x86: Support jumping to a UPL imageSimon Glass
Add a function to allow x86 boards to jump to a UPL images. Currently only 32-bit entry is supported. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22x86: Show an error if video failsSimon Glass
If video is enabled we expect it to work. Avoid silent failure by adding a panic if things go wrong. Expand the SPL malloc-area for qemu-x86_64 to avoid a panic. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22pci: video: Set up the pixel-format fieldSimon Glass
Add this information to the handoff structure so that it is available to U-Boot proper. Update bochs and the video handoff. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22x86: Create more space for SPL with qemu-x86_64Simon Glass
The space here is quite tight and there is plenty of room in the ROM. Move SPL earlier to allow for expansion. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22emulation: Use bloblist to hold tablesSimon Glass
QEMU can have its own internal ACPI and SMBIOS tables. At present U-Boot copies out the SMBIOS tables but points directly to the ACPI ones. The ACPI tables are not aligned on a 4KB boundary, which means that UPL cannot use them directly, since it uses a reserved-memory node for the tables and that it assumed (by EDK2) to be 4KB-aligned. On x86, QEMU provides the tables in a mapped memory region and U-Boot makes use of these directly, thus making it difficult to use any common code. Adjust the logic to fit within the existing table-generation code. Use a bloblist always and ensure that the ACPI tables is placed in an aligned region. Set a size of 8K for QEMU. This does not actually put all the tables in one place, for QEMU, since it currently adds a pointer to the tables in QFW. On ARM, enable bloblist so that SMBIOS tables can be added to the bloblist. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22emulation: fdt: Relax condition for OF_HAS_PRIOR_STAGESimon Glass
QEMU always gets its devicetree from the OF_BOARD mechanism so we should not depend on !BLOBLIST here. It's not clear why we need to have any relationship with BLOBLIST so let's remove the entire condition. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 2b71470628c dts: OF_HAS_PRIOR_STAGE should depend on !BLOBLIST Reviewed-by: Tom Rini <trini@konsulko.com>
2025-01-22test: Fix inpected typo in upl testSimon Glass
Fix a typo in the test comment. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22boot: Use fit_image_get_data() to get dataSimon Glass
Use this function instead of fit_image_get_emb_data() data, since it works will FITs that use external data. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22boot: Rename fit_image_get_data_and_size()Simon Glass
This function is really just getting the data. The size comes along for the ride. In fact this function is only reliable way to obtain the data for an image in a FIT, since the FIT may use external data. Rename it to fit_image_get_data() Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22boot: Rename fit_image_get_data()Simon Glass
This function can only be used with FITs that use embedded data. Rename it so this is clear. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2025-01-22ofnode: Update of_add_subnode() to indicate name is allocedSimon Glass
This function allocates memory for the node name, so mention this in the function comment. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22ofnode: Indicate when out of space in a few placesSimon Glass
Update ofnode_add_subnode() and ofnode_add_prop() to return a suitable error when space is exhausted in the FDT. This makes it easier to see what is going wrong. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-01-22ofnode: Use 4K for a default tree-sizeSimon Glass
At some point it would be nice to have the ofnode API automatically expand the tree as required, to accommodate new nodes. For now, expand the default size so that UPL can be supported. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22x86: Show the timestamp counter with bdinfoSimon Glass
Add a line to the 'bdinfo' command which shows the current value of the TSC. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22x86: Enable meminfo commandSimon Glass
Enable this command for x86 boards as it is quite useful for seeing where memory is. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22mkimage: Update map_to_sysmem() to match its prototypeSimon Glass
Update the version of this function in mkimage so that it uses a const pointer, as is done in the mapmem.h header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22serial: Support info() method in ns16550 xPL with UPLSimon Glass
UPL needs to pass the serial details onto the next stage, so adjust the condition to support this. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22cpu: Provide a way to get the physical-address sizeSimon Glass
This concept exists on x86. Declare it as a generic function so that the value can be accessed by UPL. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22abuf: Provide a constant bufferSimon Glass
Add a new initialiser which can accept a constant pointer. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22abuf: Allow use in host toolsSimon Glass
Some header files included on the host are moving to use abuf, so adjust the header-inclusion to bring in size_t correctly. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22abuf: Provide a way to get the buffer addressSimon Glass
In many cases it is useful to get the address of a buffer, e.g. when booting from it. Add a function to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22bloblist: Make BLOBLIST_ALLOC the defaultSimon Glass
We want to encourage people to use an allocated bloblist since it is more flexible than a fixed one. Make this the default, being sure not to change existing users. The unit tests require BLOBLIST_FIXED so add a dependency in the Makefile to avoid build errors. All sandbox builds require BLOBLIST_FIXED so make that the default for sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27hash: Plumb crc8 into the hash functionsSimon Glass
Add an entry for crc8, with watchdog handling. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2024-12-27boot: Imply CRC8 with VBESimon Glass
VBE uses a crc8 checksum to verify that the nvdata is valid, so make sure it is available if VBE is enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27lib: Allow crc8 in TPL and VPLSimon Glass
Provide options to enable the CRC8 feature in TPL and VPL builds. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27boot: Allow use of FIT in TPL and VPLSimon Glass
With VBE we want to use FIT in all phases of the boot. Add Kconfig options to support this. Disable the options for sandbox_vpl for now. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27spl: lib: Allow for decompression in any SPL buildSimon Glass
Add Kconfig symbols and update the Makefile rules so that decompression can be used in TPL and VPL Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27spl: Add some more debugging to load_simple_fit()Simon Glass
Add debugging of image-loading progress. Fix a stale comment in the function comment while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27spl: Drop a duplicate variable in boot_from_devices()Simon Glass
The variable 'ret' is defined twice, which is not intended. This may have been a local merge error. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 2eefeb6d893 ("spl: Report a loader failure")
2024-12-27spl: Drop use of uintptr_tSimon Glass
U-Boot uses ulong for addresses. It is confusing to use uintptr_t in a few places, since it makes people wonder if the types are compatible. Change the few occurences in SPL to use ulong Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27spl: Support a relocated stack in any XPL phaseSimon Glass
The current check looks only at SPL, but TPL or VPL might have a different setting. Update the condition. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27spl: Allow serial to be disabled in any XPL phaseSimon Glass
The current check looks only at SPL, but TPL or VPL might have a different setting. Update the condition. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27spl: Report a loader failureSimon Glass
If a loader returns an error code it is silently ignored. Show a message to at least provide some feedback to the user. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27Support setting a maximum size for the VPL imageSimon Glass
Add a size limit for VPL, to match those for SPL and TPL Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27malloc: Provide a simple malloc for VPLSimon Glass
The VPL phase may want to use the smaller malloc() implementation, so add an option for this. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27malloc: Show amount of used space when memory runs outSimon Glass
Show a bit more information when malloc() space is exhausted and debugging is enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27boot: Respect the load_op in fit_image_load()Simon Glass
Some code has crept in which ignores this parameter. Fix this and add a little debugging. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: b1307f884a9 ("fit: Support compression for non-kernel components (e.g. FDT)")
2024-12-27bootstd: Avoid sprintf() in SPL when creating bootdevsSimon Glass
The name of the bootdev device is not that important, particular in SPL. Save a little code space by using a simpler name. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27boot: Allow FIT to fall back from best-match optionSimon Glass
When the best-match feature fails to find something, use the provided config name as a fallback. The allows SPL to select a suitable config when best-match is enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27image: Add a prototype for fit_image_get_phase()Simon Glass
This function exists but is not exported. Add a prototype so it can be used elsewhere. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27spl: mmc: Avoid size growth in spl_mmc_find_device() debugSimon Glass
The for() loop ends up being in the code even if the log_debug() does nothing. Add a condition to fix this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2024-12-18powerpc: Support using upstream devicetreesJ. Neuschäfer
For new PowerPC developments, it will be useful to borrow devicetrees from Linux. This patch makes it possible. Signed-off-by: J. Neuschäfer <j.ne@posteo.net> Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
2024-12-18phy: don't spam console if phys property is absent in device nodeRoger Quadros
In generic_phy_get_bulk(), if 'phys' property is absent in the device node then it is not an error condition. Change print message verbosity to debug to avoid spamming console in such cases. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
2024-12-18verdin-am62: fix FASTBOOT_BUF_ADDR and FASTBOOT_BUF_SIZEHiago De Franco
The current value of CONFIG_FASTBOOT_BUF_ADDR is incorrect for hardware with 512MB and 1GB of RAM. The RAM address ranges for these devices are: - 512MB: - Start: 0x80000000 - End: 0xA0000000 - 1GB: - Start: 0x80000000 - End: 0xC0000000 The current buffer address makes fastboot downloads work only on hardware with 2GB of RAM. To fix this issue: 1. Lower CONFIG_FASTBOOT_BUF_ADDR to 0x88200000. This makes the buffer to be equal ot CONFIG_SYS_LOAD_ADDR, which is a safe address to download files using fastboot. 2. Reduce the size of the download buffer to 128MB, avoiding overlaps with RAMDISK_ADDR_R. This is a good enough value for individual downloads. These changes make fastboot downloads work with 512MB and 1GB devices. Fixes: defe30a78b76 ("verdin-am62: add DFU, USB and UUU fastboot support") Signed-off-by: Hiago De Franco <hiago.franco@toradex.com> Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>