summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-10-21i2c: muxes: pca954x: Add MAX735x/MAX736x supportMaksim Kiselev
Add support for the following Maxim chips using the existing PCA954x driver: - MAX7356 - MAX7357 - MAX7358 - MAX7367 - MAX7368 - MAX7369 All added Maxim chips behave like the PCA954x, where a single SMBUS byte write selects up to 8 channels to be bridged to the primary bus. Tested using the MAX7358. Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2024-10-20Merge tag 'efi-2025-01-rc1-2' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request efi-2025-01-rc1-2 CI: https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/22810 Documentation: * Add document describing Ethernet boot on AM62x SoC * Fix typo in blkmap command example UEFI: * Avoid #ifdef in efi_setup.c * Reduce message noisiness if ESP is missing * Remove ERROR:, WARNING: prefixes in messages * Use blk_create_devicef() in block device driver Others: * Let CONFIG_CMD_WGET depend on CONFIG_CMD_NET
2024-10-18Merge tag 'dm-pull-17oct24-take2' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-dm A few new x86 commands and minor improvements expo improvements binman support for signing FIT images
2024-10-18mtd: spi-nor: Move SR3 WPS bit definition in the correct locationMarek Vasut
Move the SR3 bit definition in the right place. Fix what is likely a rebase artifact. No functional change. Fixes: 215f1d5794c6 ("mtd: spi-nor: Clear Winbond SR3 WPS bit on boot") Signed-off-by: Marek Vasut <marex@denx.de>
2024-10-18mbedtls: fix defects in coverity scanRaymond Mao
Fixes of unreleased buffer, deadcode and wrong variable type detected by coverity scan. Addresses-Coverity-ID: 510809: Resource leaks (RESOURCE_LEAK) Addresses-Coverity-ID: 510806: Control flow issues (DEADCODE) Addresses-Coverity-ID: 510794 Control flow issues (NO_EFFECT) Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
2024-10-18cmd: upl: correct printf codeHeinrich Schuchardt
Building on 32-bit results in a build failure: cmd/upl.c:75:51: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] 75 | printf("UPL handoff written to %lx size %lx\n", addr, abuf_size(&buf)); | ~~^ ~~~~~~~~~~~~~~~ | | | | | size_t {aka unsigned int} | long unsigned int | %x Fixes: 264f4b0b34c0 ("upl: Add a command") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-18lmb: notify when adjacent regions are addedCaleb Connolly
lmb_add_region() returns a positive integer if the added regions causes existing regions to be coalesced. We still want to notify the EFI subsystem about these added regions though, so adjust lmb_add() to only bail on errors. This fixes EFI memory allocation on boards with adjacent memory banks as is the case on several Qualcomm boards like the RB3 Gen 2. Fixes: 2f6191526a13 (lmb: notify of any changes to the LMB memory map) Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-10-18x86: cpu: Add missing header inclusionAndy Shevchenko
Without asm/cpu_x86.h inclusion a compiler is not happy: arch/x86/cpu/cpu_x86.c:14:5: warning: no previous prototype for ‘cpu_x86_bind’ [-Wmissing-prototypes] arch/x86/cpu/cpu_x86.c:29:5: warning: no previous prototype for ‘cpu_x86_get_vendor’ [-Wmissing-prototypes] arch/x86/cpu/cpu_x86.c:41:5: warning: no previous prototype for ‘cpu_x86_get_desc’ [-Wmissing-prototypes] arch/x86/cpu/cpu_x86.c:55:5: warning: no previous prototype for ‘cpu_x86_get_count’ [-Wmissing-prototypes] Add missing header inclusion. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-18x86: cpu: Add a few prototypes to the header fileAndy Shevchenko
The compiler is not happy to have no prototypes for the functions that are not defined static. Add them. This helps avoiding the compiler warnings: arch/x86/cpu/cpu.c:197:13: warning: no previous prototype for ‘board_final_init’ [-Wmissing-prototypes] arch/x86/cpu/cpu.c:205:13: warning: no previous prototype for ‘board_final_cleanup’ [-Wmissing-prototypes] arch/x86/cpu/cpu.c:307:5: warning: no previous prototype for ‘reserve_arch’ [-Wmissing-prototypes] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-18x86: cpu: Mark a few functions staticAndy Shevchenko
Some functions are not used anywhere except the same file where they are defined. Mark them static. This helps avoiding the compiler warnings: arch/x86/cpu/cpu.c:343:6: warning: no previous prototype for ‘detect_coreboot_table_at’ [-Wmissing-prototypes] arch/x86/cpu/mtrr.c:90:6: warning: no previous prototype for ‘mtrr_write_all’ [-Wmissing-prototypes] arch/x86/cpu/i386/interrupt.c:240:6: warning: no previous prototype for ‘__do_irq’ [-Wmissing-prototypes] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-18x86: cpu: Use default print_cpuinfo() for allAndy Shevchenko
Most of the copies of the print_cpuinfo() call the default method. Remove all of those in order to have only the default one when no `cpu` command is compiled. This also helps avoiding compiler warning, e.g.: arch/x86/cpu/tangier/tangier.c:23:5: warning: no previous prototype for ‘print_cpuinfo’ [-Wmissing-prototypes] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-18x86: Enable RTC command by defaultSimon Glass
The real-time clock is needed for most X86 systems and it is useful to be able to read from it. Enable the rtc command by default. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18doc: Update coreboot's CI informationSimon Glass
This is in the Dockerfile now, so update this section of the docs. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18docker: Update corebootSimon Glass
Update to a newer version which supports settings in CMOS RAM and linear framebuffer. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-10-18expo: Add forward declaration for udevice to ceditSimon Glass
Some files may include this header file without first including dm.h so add a forward declaration. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18expo: Drop scene_title_set()Simon Glass
This function is really just an assignment, so serves no useful purpose. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18expo: Drop unneceesary calls to expo_str()Simon Glass
The scene_txt_str() function calls expo_str() so there is no need to call it beforehand. Drop this unnecessary code. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18expo: Support menu-item values in ceditSimon Glass
Update the cedit read/write functions to support menu items with values. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18expo: Add a little more cedit CMOS loggingSimon Glass
Add some more logging in the CMOS read/write code. Tidy up a few comments while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18expo: Allow menu items to have valuesSimon Glass
At present menu items are stored according to their sequence number in the menu. In some cases we may want to have holes in that sequence, or not use a sequence at all. Add a new 'value' property for menu items. This will be used for reading and writing, if present. If there is no 'value' property, then the normal sequence number will be used instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18expo: Use standard numbering for save and discardSimon Glass
Set aside some expo IDs for 'save' and 'discard' buttons. This avoids needing to store the IDs for these. Adjust the documentation and expo tool for the new EXPOID_BASE_ID value. Ignore these objects when saving and loading the cedit, since they do not contain real data. Adjust 'cedit run' to return failure when the user exits the expo without saving. Update the test for this change as well. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18expo: Set the initial next_id to 1Simon Glass
If expo_set_dynamic_start() is never called, the first scene created will have an ID of 0, which is invalid. Correct this by setting a default value. Add a test to check this. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18expo: Place menu items to the right of all labelsSimon Glass
At present a fixed position is used for menu items, 200 pixels to the right of the left side of the labels. This means that a menu item with a very long label may overlap the items. It seems better to calculate the maximum label width and then place the items to the right of all of them. To implement this, add a new struct to containing arrangement information. Calculate it before doing the actual arrangement. Add a new style item which sets the amount of space from the right side of the labels to left side of the items. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18video: Avoid starting a new line to close to the bottomSimon Glass
When starting a new text line, an assumption is made that the current vertical position is a multiple of the character height. When this is not true, characters can be written after the end of the framebuffer. This can causes crashes and strange errors from QEMU. Adjust the scrolling check when processing a newline character, to avoid any problems. Add some comments to make things a little clearer. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18video: Add a dark-grey console colourSimon Glass
This is useful for highlighting something with a black background, as is needed with cedit when using a white-on-black console. Add this as a new colour. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18sandbox: dts: Add missing sandbox, emul phandle to sandbox-pmicMarek Vasut
This phandle was missing in the sandbox DT, add it, otherwise sandbox-i2c driver cannot look up the emulator via i2c_emul_find(). This fixes the following i2c_emul_find() error: " $ ./u-boot -Dc "" ... i2c_emul_find() No emulators for device 'sandbox_pmic' sandbox_pmic_write() write error to device: 0000000018c568d0 register: 0x0! out_set_value() PMIC write failed: -5 i2c_emul_find() No emulators for device 'sandbox_pmic' sandbox_pmic_write() write error to device: 0000000018c568d0 register: 0x0! out_set_value() PMIC write failed: -5 ... " Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-18binman: Add a tutorial on resolving test-coverage bugsSimon Glass
Provide a short description of how tests work, why they are so critical and how to resolve gaps in Binman's test coverage. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-10-18binman: Support getting test-coverage on just one testSimon Glass
Pass the arguments through to test_util so that a single test can be used. Update the docs and add some missing backquotes in the same section. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18u_boot_pylib: Support running coverage on selected functionsSimon Glass
At present run_test_coverage() assumes you want code coverage for the entire code base. This is the normal situation, but sometimes it is useful to see the coverage provided by just a single test. Add support for this. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18sandbox_spl: Restrict use of UPL when not enabledSimon Glass
With sandbox_spl we want to use the file-based boot in CI, so that this flow is tested. The recent UPL change enabled booting via that method, thus overriding the file-based boot. Correct this by using UPL only when the --upl flag is given. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 91fde8e1764 ("sandbox: Add an SPL loader for UPL")
2024-10-18buildman: Correct some warnings about regex stringsSimon Glass
With Python 3.12 some warnings have cropped up. Fix them. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18binman: implement signing FIT images during image buildAlexander Kochetkov
The patch implement new property 'fit,sign' that can be declared at the top-level 'fit' node. If that option is declared, fit tryies to detect private keys directory among binman include directories. That directory than passed to mkimage using '-k' flag and that enable signing of FIT. Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Renumbered files, moved new tests to end: Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18image-host: fix 'unknown error' error messageAlexander Kochetkov
Fix error message like this: Can't add verification data for node 'fdt-1' (<unknown error>) We get unknown error because we decode error as fdt error but actually it is system error. Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-18binman: fix passing loadables to mkimage on first runAlexander Kochetkov
FIT use mkimage from BuildSectionData() to build FIT entry contents. BuildSectionData() get called several times during building FIT image. Currently when fit inserts loadables, it use self._loadables property that contain loadables computed during previuos BuildSectionData() invocation. So for the first run it use empty list and pass no loadables to mkimage. That makes problem for adding signature to FIT image because mkimage fails to add signature and aborts building FIT if no loadables provided. The patch fixes described behaviour in a way that BuildSectionData() uses recently calculated loadables value, not previosly calculated. Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-18bootstd: Avoid calling unavailable block functionsSimon Glass
When BLK is not enabled but BOOTSTD is, some features of standard boot become unavailable. Add a check for this in the only site that is currently apparent. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18blk: Make functions available unconditionallySimon Glass
Some boards still don't enable BLK but we want to be able to at least compile the code which relies on this. For example, bootstd includes calls to blk_...() functions, albeit with a check for BLK so that the code is eliminated by the compiler. Reduce the scope of the BLK #ifdef to help with this. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18x86: coreboot: Enable receiving timestamps from corebootSimon Glass
Bring this information into bootstage. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18x86: coreboot: Add timestamps from coreboot to bootstageSimon Glass
Receiving timestamps from coreboot was unceremoniously dropped some time ago. Add it back. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 8ad01ce36f7 ("x86: Remove x86 specific GD flags as they are...")
2024-10-18x86: coreboot: Update the timestamp code to use sysinfoSimon Glass
Rather than using a special variable, get the timestamp info from the coreboot sysinfo struct. Return a proper error as well. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18x86: Add msr commandSimon Glass
It is useful to obtain the results of MSR queries as well as to update MSR registers, so add a command these tasks. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18x86: Add a cpuid commandSimon Glass
It is useful to obtain the results of cpuid queries, so add a command for this. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18x86: Sync up tsc_timer with LinuxSimon Glass
Since we are using the code from Linux, update it to the newer version in v6.11 Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18x86: Avoid timer-clock overflowSimon Glass
When the clock speed is above about 4GHz, e.g. on modern PC hardware, the timer overflows, resulting in a much lower frequency than expected. Deal with this by capping the clock speed. It would be possible to move to a 64-bit value for the clock, but that is a pain to deal with. A better approach might be to express the clock in MHz but that is left for later consideration. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18x86: Ensure the CPU identity exists for timer initSimon Glass
When bootstage is used the timer can be inited before the CPU identity is set up, resulting in the checks for the vendor not working. Add a special call to work around this. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18x86: Show the CPU vendor in bdinfoSimon Glass
Refactor the cpu code and use it to show the CPU vendor, e.g. AuthenticAMD or GenuineIntel Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18virtio: blk: introduce virtio-block erase supportDmitrii Merkurev
Co-developed-by: Cody Schuffelen <schuffelen@google.com> Signed-off-by: Cody Schuffelen <schuffelen@google.com> Signed-off-by: Dmitrii Merkurev <dimorinny@google.com> Cc: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Cc: Simon Glass <sjg@chromium.org> Cc: Mattijs Korpershoek <mkorpershoek@baylibre.com> Cc: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # sandbox
2024-10-18x86: Make default_print_cpuinfo be a weak alias for print_cpuinfoTom Rini
While a few SoCs have a unique print_cpuinfo function, a number of them just use default_print_cpuinfo. Make default_print_cpuinfo have a weak alias to provie print_cpuinfo. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-10-18coreboot: Switch to a monospaced fontSimon Glass
The default font is proportional, with different character widths. Select a monospace font for coreboot so that the 'dm tree' output lines up correctly. Update the coreboot tests to match. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18video: Allow querying the font sizeSimon Glass
All the font size to be queried using the 'font size' command. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18efi_driver: use blk_create_devicef()Heinrich Schuchardt
The EFI block device driver is the only user of blk_create_device() outside the block device uclass. Use blk_create_devicef() instead like other block device drivers. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>