| Age | Commit message (Collapse) | Author |
|
extension_get_list() will return NULL if there is no extension device.
Check for this situation.
Addresses-Coverity-ID: 638557 - Null pointer dereferences (NULL_RETURNS)
Fixes: 2d12958ee71b ("boot: Remove legacy extension board support")
Signed-off-by: Heinrich Schuchardt <[email protected]>
Acked-by: Kory Maincent <[email protected]>
|
|
As was noted by Heinrich Schuchardt, some SoCs may not support 64-bit
divisions. Fix an issue by using lldiv() instead.
The code assumes that the benchmark never takes more than 4294 seconds
and thus the difference will be less than U32_MAX.
Also replace (speed / 1024) by (speed >> 10) to avoid potential 64-bit
division.
Signed-off-by: Mikhail Kshevetskiy <[email protected]>
|
|
Update the command to show the size and selected file, since this is
useful information at times. Add a heading so it is clear what each
field refers to.
Add a simple test as well.
Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
|
|
Anshul Dalal <[email protected]> says:
Hi all,
We currently make use of CMD_BOOTI and CMD_BOOTZ in the SPL boot flow in
falcon mode, this isn't correct since all CMD_* configs are only meant
for U-Boot proper and not the SPL.
Therefore this patch set adds new LIB_BOOT[IMZ] configs that allow for
more granular selection of their respective compilation targets.
Additionally, this also allows us to more easily disable support for
raw images from secure falcon mode (SPL_OS_BOOT_SECURE) by doing the
following:
config LIB_SPL_BOOTI
...
depends on SPL_OS_BOOT && !SPL_OS_BOOT_SECURE
...
Link: https://lore.kernel.org/r/[email protected]
|
|
Using CMD_* configs from spl doesn't make logical sense. Therefore
this patch replaces the checks for CMD_BOOTx with newly added library
symbols LIB_BOOT[IMZ] and SPL_LIB_BOOT[IMZ] which are enabled by their
respective CMD_* or SPL_* counterparts.
On platforms with non-secure falcon mode, SPL_BOOTZ is enabled by
default for 32-bit ARM systems and SPL_BOOTI is enabled by default for
64-bit ARM and RISCV.
The respective C files (image.c/zimage.c) are compiled based on library
symbols $(PHASE_)LIB_BOOTx instead which are in turn selected by both
CMD_BOOTx and SPL_BOOTx as required.
Signed-off-by: Anshul Dalal <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
|
|
to boot flows"
Kory Maincent (TI.com) <[email protected]> says:
This series converts the extension board framework to use UCLASS as
requested by Simon Glass, then adds extension support to pxe_utils
and bootmeth_efi (not tested) to enable extension boards devicetree load
in the standard boot process.
I can't test the imx8 extension scan enabled by the
imx8mm-cl-iot-gate_defconfig as I don't have this board.
I also can't test the efi bootmeth change as I don't have such board.
Link: https://lore.kernel.org/r/20251030-feature_sysboot_extension_board-v5-0-cfb77672fc68@bootlin.com
|
|
The extension_overlay_cmd environment variable approach is specific to
the U-Boot extension_board command, while other boot flows (pxe_utils,
bootstd) handle overlay loading differently.
Move the extension_overlay_cmd execution out of the core extension
framework to the command level. This decouples the framework from
command-specific behavior and prepares for future extension support
in other boot flows.
Signed-off-by: Kory Maincent (TI.com) <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Remove the legacy extension board implementation now that all boards
have been converted to use the new UCLASS-based framework. This
eliminates lines of legacy code while preserving functionality
through the modern driver model approach.
Update the bootstd tests, due to the removal of extension hunter.
Signed-off-by: Kory Maincent (TI.com) <[email protected]>
|
|
Introduce UCLASS-based extension board support to enable more
standardized and automatic loading of extension board device tree
overlays in preparation for integration with bootstd and pxe_utils.
Several #if CONFIG_IS_ENABLED are used in cmd/extension_board.c to ease the
development but don't worry they are removed later in the series.
Signed-off-by: Kory Maincent (TI.com) <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Relocate extension board support from cmd/ to boot/ directory in
preparation for converting the extension framework to use UCLASS.
Also improve code style by applying reverse xmas tree ordering.
Signed-off-by: Kory Maincent (TI.com) <[email protected]>
|
|
ret maybe used uninitialised in some cases so instead
initialise it first to prevent this.
This issue was found by Smatch.
Fixes: 9671243e8d10 (cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands)
Signed-off-by: Andrew Goodbody <[email protected]>
Reviewed-by: Quentin Schulz <[email protected]>
|
|
When editing eficonfig "optional data" (typically cmdline arguments)
it's useful to be able to edit the string rather than having to re-type
the entire thing. Implement support for editing buffers to make this a
whole lot nicer. Specifically, add support for moving the cursor with
the arrow keys and End key as well as deleting backwards with the delete
key.
Signed-off-by: Casey Connolly <[email protected]>
Acked-by: Ilias Apalodimas <[email protected]>
Tested-by: Ilias Apalodimas <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
|
|
There are currently two implementations of dhcp_run(): one in cmd/net.c
for NET and one in net/lwip/dhcp.c for NET_LWIP. There is no
justification for that. Therefore, move the NET version into
net/net-common.c to be used by both stacks, and drop the NET_LWIP
version which by the way does not look totally correct.
Signed-off-by: Jerome Forissier <[email protected]>
Suggested-by: Tom Rini <[email protected]>
Acked-by: Benjamin Hahn <[email protected]>
|
|
It has been over a decade since we had a platform that implemented the
bootp vendor extension support hook. Remove this option due to lack of
use.
Signed-off-by: Tom Rini <[email protected]>
Acked-by: Jerome Forissier <[email protected]>
|
|
Introduce a new version of the Keystone-II "ddr" command for testing the
inline ECC support in the DDRSS bridge available on K3 devices. The ECC
hardware support in K3's DDRSS and the test method differ substantially
from what we support in the K2 variant of the command. This K3 DDRSS
command currently supports only single controller testing.
The ECC error injection procedure follows these steps:
1) Flush and disable the data cache.
2) Disable the protected ECC Rx range.
3) Flip a bit in the address.
4) Restore the range to original.
5) Read the modified value (corrected).
6) Re-enable the data cache.
This will cause the 1-bit ECC error count to increase while the read
will return the corrected value.
The K3 version of the command extends the syntax for the "ecc_err"
argument by also introducing an argument for range which specifies which
range (0, 1, 2) the address is located in.
Multi-bit ECC errors are uncorrectable and will lead to a synchronous
abort.
Signed-off-by: Georgi Vlaev <[email protected]>
Signed-off-by: Santhosh Kumar K <[email protected]>
[[email protected]: Add J7 and multiple-region support, simplify logic]
Signed-off-by: Neha Malcom Francis <[email protected]>
Reviewed-by: Udit Kumar <[email protected]>
|
|
Align erase and write on erase block boundary in line with how read was
aligned in commit 622b5d35613 ("cmd: sf: Handle unaligned 'update' start
offset").
Fixes: 622b5d35613 ("cmd: sf: Handle unaligned 'update' start offset")
Signed-off-by: Viorel Suman <[email protected]>
Signed-off-by: Ye Li <[email protected]>
Reviewed-by: Peng Fan <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
Tested-by: Marek Vasut <[email protected]> # R-Car V4H
|
|
A "Synchronous Abort" CPU exception happens on an attempt to run the
"bootflow info" command for a global boot method (e.g. efi_mgr):
=> bootflow select 0
=> bootflow info
"Synchronous Abort" handler, esr 0x96000006, far 0x8
It happens because do_bootflow_info() tries to dereference bflow->dev,
which is NULL in case of efi_mgr. Add the corresponding check to prevent
this NULL pointer dereference and make "bootflow info" command work
properly for global boot methods.
Fixes: 2d653f686b6d ("bootstd: Add a bootflow command")
Signed-off-by: Sam Protsenko <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Mattijs Korpershoek <[email protected]>
|
|
When I migrated this to Kconfig in commit 68e54040ccc3 ("sandbox: Move
CONFIG_IO_TRACE to Kconfig") I didn't look hard enough for other
details. As explained in the README, this is valid for ARM too. So start
by making this be a prompted question and CMD_IOTRACE depend on IO_TRACE
being enabled. Next, migrate the information out of README and in to
the appropriate help text for existing options in Kconfig. Finally, make
this option be default y on SANDBOX but not selected as it's valid to
build without it.
Signed-off-by: Tom Rini <[email protected]>
|
|
https://source.denx.de/u-boot/custodians/u-boot-nand-flash
This series adds significant and valuable work by Mikhail Kshevetskiy to
align spi-mem with Linux 6.16. It also includes contributions to the mtd
performance patches, a work started by Miquel Raynal and improved by
Mikhail Kshevetskiy. Additionally, two patches tighten dependencies on
the Atmel driver.
The patches pass the pipeline CI:
https://source.denx.de/u-boot/custodians/u-boot-nand-flash/-/pipelines/27873
|
|
Peng Fan (OSS) <[email protected]> says:
Misc update on firmware scmi:
- Typo fix
- Use io helpers
- Use PAGE_SIZE for arm64
- Add IN_USE error code
- Add more error info
- Support scmi max rx timeout in mailbox
- Add myself as scmi maintainer, AKASHI contributed most code, but
seems he is not invovled in the developement anymore, I volunteer to
help here.
Some items on list that I am thinking to add:
- align with linux kernel to use cpu_to_le32 and le32_to_cpu, but have not find
a good way to use the helpers.
- Add SCMI version negotiation as Linux Kernel
Link: https://lore.kernel.org/r/[email protected]
|
|
Pin control protocol name was not added into 'protocol_name' array,
however Pin control was supported on i.MX95. So add it.
Signed-off-by: Peng Fan <[email protected]>
|
|
https://source.denx.de/u-boot/custodians/u-boot-ubi
UBI updates for 2025.10
- ubi fixes found by Andrew with Smatch
- mtd: ubi: Remove test that always fails
- fs: ubifs: Ensure buf is freed before return
- fs: ubifs: Need to check return for being an error pointer
-fs: ubifs: Fix and rework error handling in ubifs_finddir
- fix: limit copy size in ubispl found by Benedikt
- extend support for LED activity (use the LED activity also on ubi reads)
from Yegor
|
|
For CMD_IRQ to function, we need enable/disable_interrupt functions as
well as do_irqinfo functions to be defined. Only NIOS2, PowerPC and X86
implement the latter, so correct dependencies to be opt-in not out-out
here.
Signed-off-by: Tom Rini <[email protected]>
|
|
The CMD_MP (and cmd/mp.c) command provide a "cpu" command which is
mutually exclusive from the "cpu" command provided by cmd/cpu.c and the
CPU framework. Make CMD_MP depend on CPU not being enabled.
Signed-off-by: Tom Rini <[email protected]>
|
|
We have a large number of library symbols that should not be prompted
for by the user really but rather selected by the platform (or SoC) as
needed. To start with however, make these depend on !COMPILE_TEST.
Signed-off-by: Tom Rini <[email protected]>
|
|
Linux kernel .get_temp() callback reports values in millicelsius,
U-Boot currently reports them in celsius. Align the two and report
in millicelsius. Update drivers accordingly. Update callsites that
use thermal_get_temp() as well.
The 'temperature' command now reports temperature in millicelsius
as well, with additional accuracy. This changes command line ABI
slightly.
Signed-off-by: Marek Vasut <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Quentin Schulz <[email protected]>
Reviewed-by: David Zang <[email protected]>
[trini: Update test/cmd/temperature.c]
Signed-off-by: Tom Rini <[email protected]>
|
|
Add LED activity for ubi_dev_scan() and ubi_volume_read() routines.
Signed-off-by: Yegor Yefremov <[email protected]>
|
|
This adds a new U-Boot command 'c5_pl330_dma' for Cyclone V SoCDK
boards. It provides access to the Reset Manager's Per2ModRst register
to release the reset for ARM PrimeCell PL330 DMA channels. This allows
software to initialize and use the PL330 DMA controller properly after
reset.
Signed-off-by: Brian Sune <[email protected]>
[trini: Minor style fixes]
Signed-off-by: Tom Rini <[email protected]>
|
|
The patch adds benchmark option to the help of mtd command. For the
'mtd write' case the help line exceed 80 characters. Ignore this issue
as modern terminals are capable to handle more characters.
The patch also formats other command to make sure all device names
starts on the same collumn.
Fixes: d246e70cf81d0 ("cmd: mtd: Enable speed benchmarking")
Signed-off-by: Mikhail Kshevetskiy <[email protected]>
Reviewed-by: Miquel Raynal <[email protected]>
Signed-off-by: Michael Trimarchi <[email protected]>
|
|
The shown speed is inversely proportional to the data size.
See the output:
spi-nand: spi_nand nand@0: Micron SPI NAND was found.
spi-nand: spi_nand nand@0: 256 MiB, block size: 128 KiB, page size: 2048, OOB size: 128
...
=> mtd read.benchmark spi-nand0 $loadaddr 0 0x40000
Reading 262144 byte(s) (128 page(s)) at offset 0x00000000
Read speed: 63kiB/s
=> mtd read.benchmark spi-nand0 $loadaddr 0 0x20000
Reading 131072 byte(s) (64 page(s)) at offset 0x00000000
Read speed: 127kiB/s
=> mtd read.benchmark spi-nand0 $loadaddr 0 0x10000
Reading 65536 byte(s) (32 page(s)) at offset 0x00000000
Read speed: 254kiB/s
In the spi-nand case 'io_op.len' is not always the same as 'len', thus
we are using the wrong amount of data to derive the speed.
Also make sure we are using 64-bit calculation to get a more precise
results.
Fixes: d246e70cf81d0 ("cmd: mtd: Enable speed benchmarking")
Signed-off-by: Mikhail Kshevetskiy <[email protected]>
Reviewed-by: Miquel Raynal <[email protected]>
Signed-off-by: Michael Trimarchi <[email protected]>
|
|
This patch implements read-only test of nand flash devices.
Test reads blocks of NAND flash in normal and raw modes and compares
results. The following statuses can be returned for a block:
* non-ecc reading failed,
* ecc reading failed,
* block is bad,
* bitflips is above maximum,
* actual number of biflips above reported one,
* bitflips reached it maximum value,
* bitflips above threshold,
* block is ok.
Signed-off-by: Mikhail Kshevetskiy <[email protected]>
Signed-off-by: Michael Trimarchi <[email protected]>
|
|
Some nand flashes (like spi-nand one) are registered with mtd
subsystem only, thus nand command can't be used to work with
such flashes. As result some functionality is missing.
This patch implements 'nand torture' functionality for mtd command.
Signed-off-by: Mikhail Kshevetskiy <[email protected]>
Reviewed-by: Miquel Raynal <[email protected]>
Signed-off-by: Michael Trimarchi <[email protected]>
|
|
Some nand flashes (like spi-nand one) are registered with mtd
subsystem only, thus nand command can't be used to work with
such flashes. As result some functionality is missing.
This patch implements 'nand markbad' functionality for mtd command.
Signed-off-by: Mikhail Kshevetskiy <[email protected]>
Reviewed-by: Miquel Raynal <[email protected]>
Signed-off-by: Michael Trimarchi <[email protected]>
|
|
While we continue to have some systems which support extremely legacy
OS booting methods, we do not have use cases for supporting this in
Falcon mode anymore. Remove this support and references from the
documentation.
Co-developed-by: Anshul Dalal <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
|
|
return is not a function, parentheses are not required
Signed-off-by: Osama Abdelkader <[email protected]>
|
|
serial_reinit_all() is only available when CONFIG DM_SERIAL is disabled
and CONFIG_SERIAL is enabled.
Signed-off-by: Aditya Dutt <[email protected]>
|
|
Hiding a qualifier such as "volatile" inside a typedef makes the code
much harder to understand. Since addr and dummy being
volatile-qualified are important for the correctness of the test code,
make it more obvious by spelling it out as "volatile ulong".
Signed-off-by: Rasmus Villemoes <[email protected]>
Tested-by: Anshul Dalal <[email protected]>
|
|
A function call itself for every word written or read+written in these
loops is bad enough. But since the memory test must be run with dcache
disabled, the schedule() call, traversing the linked list of
registered cyclic clients, and accessing the 'struct cyclic_info' for
each to see if any are due for a callback, is quite expensive. On a
beagleboneblack, testing a modest 16MiB region takes 2.5 minutes:
=> dcache off
=> time mtest 0x81000000 0x82000000 0 1
Testing 81000000 ... 82000000:
Iteration: 1
Tested 1 iteration(s) with 0 errors.
time: 2 minutes, 28.946 seconds
There is really no need for calling schedule() so frequently. It is
quite easy to limit the calls to once for every 256 words by using a
u8 variable. With that, the same test as above becomes 37 times
faster:
=> dcache off
=> time mtest 0x81000000 0x82000000 0 1
Testing 81000000 ... 82000000:
Iteration: 1
Tested 1 iteration(s) with 0 errors.
time: 4.052 seconds
Note that we are still making a total of
3 loops * (4 * 2^20 words/loop) / (256 words/call) = 49152 calls
during those ~4000 milliseconds, so the schedule() calls are still
done less than 0.1ms apart.
These numbers are just for a beagleboneblack, other boards may have a
slower memory, but we are _two orders of magnitude_ away from
schedule() "only" being called at 100Hz, which is still more than
enough to ensure any watchdog is kept happy.
Signed-off-by: Rasmus Villemoes <[email protected]>
Tested-by: Anshul Dalal <[email protected]>
|
|
It is obviously important that the addr pointer used to access the
memory region being tested is volatile-qualified, to prevent the
compiler from optimizing out the "write this value, read it back,
check that it is what we expect".
However, none of these auxiliary variables have any such need for,
effectively, being forced to live on the stack and cause each and
every reference to them to do a memory access.
This makes the memtest about 15% faster on a beagleboneblack.
Before:
=> dcache off
=> time mtest 0x81000000 0x81100000 0 1
Testing 81000000 ... 81100000:
Iteration: 1
Tested 1 iteration(s) with 0 errors.
time: 10.868 seconds
After:
=> dcache off
=> time mtest 0x81000000 0x81100000 0 1
Testing 81000000 ... 81100000:
Iteration: 1
Tested 1 iteration(s) with 0 errors.
time: 9.209 seconds
[Without the 'dcache off', there's no difference in the time, about
0.6s, but the memtest cannot usefully be done with dcache enabled.]
Signed-off-by: Rasmus Villemoes <[email protected]>
Tested-by: Anshul Dalal <[email protected]>
|
|
Linux features a flash_speed speed test from the mtd-utils suite, U-Boot
does not. Benchmarks are useful for speed improvement developments as
well as troubleshooting or regression testing sometimes.
Enable a benchmark option to enable this feature.
Example of output on a Nuvoton platform:
MA35D1> mtd read nor0 0x81000000 0 0x10000
Reading 65536 byte(s) at offset 0x00000000
MA35D1> mtd read.benchmark nor0 0x81000000 0 0x10000
Reading 65536 byte(s) at offset 0x00000000
Read speed: 3752kiB/s
Signed-off-by: Miquel Raynal <[email protected]>
Signed-off-by: Michael Trimarchi <[email protected]>
|
|
option to show nand dump data ecc corrected as opposed to just raw
Signed-off-by: david regan <[email protected]>
Signed-off-by: Michael Trimarchi <[email protected]>
|
|
show characters with nand dump similar to md
along with offset into NAND
Signed-off-by: david regan <[email protected]>
Signed-off-by: Michael Trimarchi <[email protected]>
|
|
nand read/write raw change 'count' to 'pages' since count is ambiguous
Signed-off-by: david regan <[email protected]>
Signed-off-by: Michael Trimarchi <[email protected]>
|
|
bug fix MTD_OOB_AUTO to MTD_OPS_AUTO_OOB since MTD_OOB_AUTO does not exist
Fixes: dfe64e2c8973 ("mtd: resync with Linux-3.7.1")
Signed-off-by: david regan <[email protected]>
Signed-off-by: Michael Trimarchi <[email protected]>
|
|
The legacy network stack sets net_try_count to 1 at the beginning of the
net_loop() function. This is required for net_start_again() to work
properly. Therefore, set the variable accordingly in the do_ping()
function when NET_LWIP=y. This fixes an issue where a ping to an
unreachable destination would run twice on the same network device. For
example with qemu_arm64_lwip_defconfig:
=> dhcp
DHCP client bound to address 10.0.2.15 (3 ms)
=> ping 10.0.0.1
Using virtio-net#32 device
ping failed; host 10.0.0.1 is not alive
Using virtio-net#32 device
ping failed; host 10.0.0.1 is not alive
=> QEMU: Terminated
Signed-off-by: Jerome Forissier <[email protected]>
|
|
Now that sys_check_timeouts() is called in net_lwip_rx(), there is no
need to call it from the SNTP receive loop. Remove the redundant call.
Signed-off-by: Jerome Forissier <[email protected]>
|
|
Introduce the DNS Kconfig symbol so that various network commands may
use host names without the dns command (CMD_DNS) being selected.
Signed-off-by: Jerome Forissier <[email protected]>
CC: E Shattow <[email protected]>
|
|
It is sometimes useful to be able to boot via EFI using a Linux initrd.
Add support for this.
Fix a 'specifiy' typo while here.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Mark Kettenis <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
|
|
The size of free memory should be $lmb_base - $ram_base.
Signed-off-by: Shiji Yang <[email protected]>
|
|
Add i3c command file to support select, get i3c device
target list, read and write operation.
Signed-off-by: Dinesh Maniyam <[email protected]>
|