Commit graph

85037 commits

Author SHA1 Message Date
Marek Vasut
ed4dcb1f9b cmd: fdt: Drop the 0x prefix
The 'fdt get addr' is always assumed to be hex value, drop the prefix.
Since this might break existing users who depend on the existing
behavior with 0x prefix, this is a separate patch. Revert if this
breaks anything.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-14 16:08:51 -06:00
Marek Vasut
97d6d7e360 console: Use only 0x00 as line separator for console recording
In case character 0x20 (space) is used as line separator,
character 0x9 (tab) is treated end of line. Commands which
output a lot of tabs, i.e. various tree printing commands
like 'fdt print' then end up generating a lot of newlines
in the recorded output, and the recorded output is corrupted.

Use character 0x00 (NUL) as separator instead to treat the
tabs as valid part of recorded line.

Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-14 16:08:51 -06:00
Marek Vasut
a96dea2569 test: cmd: fdt: Drop new unneeded curly brackets
Drop no longer needed { } around ut_assert*() functions in FDT test.
No functional change.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-14 16:08:51 -06:00
Marek Vasut
fa847bb409 test: Wrap assert macros in ({ ... }) and fix missing semicolons
Wrap the assert macros in ({ ... }) so they can be safely used both as
right side argument as well as in conditionals without curly brackets
around them. In the process, find a bunch of missing semicolons, fix
them.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-14 16:08:51 -06:00
Tom Rini
20aaff677d Merge branch '2023-03-14-revert-two-TI-patches' into next
Per request of the author, these two patches weren't quite ready to be
applied yet, so revert them.
2023-03-14 10:53:50 -04:00
Tom Rini
c4e4fd2916 Revert "configs: j721s2: merge HS and non-HS defconfigs"
This reverts commit c714045cc3.

Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-14 10:53:44 -04:00
Tom Rini
db160b47d8 Revert "configs: j7200: Merge HS and non-HS defconfigs"
This reverts commit e352e1061f.

Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-14 10:53:38 -04:00
Tom Rini
2684aad483 Pull request efi-next-20230313
UEFI:
 
 * Improve graphics support in EFI app
 
 Others:
 
 * x86: Add a few more items to bdinfo
 * video: Remove duplicate cursor-positioning function
 * video: Clear the vidconsole rather than the video
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmQPNQsACgkQxIHbvCwF
 GsTDcQ//V1UUQWmZGgWtref6cbG6RlVV4SZjvaVosfWazQY8fK3TC5LEV6dXjs2L
 gJZpHBAU8unCwsnQueYy2HumgEb/9ruyTVLCeO7s7Mqc7jBrHVEaFQf7E+FxAPOg
 ibQ5bx5MI36KaqcQ7fZmQtEIOvOIJXkxbdrlFPh/b3oE08GzVDnkryLXC9xykW2Z
 Y4HJxNhchz2labGuTInuGnst6qnhy3Oo8WHUSBdOJW04Dd0GVLyY11qjBsy4lttt
 uDmb48WouTfLBz6JquDZX9EY97KZA0ThVu6GDAr2BNqVmF/f0/Js5+5KdKYSBy44
 jYR8MTG+BOQ2luIwy+YvLKcANOMYXB2HeN5pIemUOkrJA9cEAv4ru1yPR7fp4sse
 2u+XZ7P9BosCyOpTErH4GMIdz4kYsT9lhiusVD2QyBgSco6vTD+7atRwH1pEptoS
 Hthqn5dnlQvGmMUlrlG4tCRGhu7tCEzPc6Z4MBzxUiOWkWxPvNg3nzjdK/OhSm62
 zkznU8xOeoq2XwE6PA29vXAaXlVoPyfOVwTE7s1Zdq/tpZcIGeZqj5DtOqRYiufw
 YYWTb667rAcSEM0t/YfnzkuU1xA+rqSd2KrmjXhM6TfGRnyLWRnInr3e6FKaFcmE
 Q/bHfzdHHGl5WRfyBd6F0Bg5BIEuyDNew+pSfxXKPLoyJkvNJOg=
 =7BR5
 -----END PGP SIGNATURE-----

Merge tag 'efi-next-20230313' of https://source.denx.de/u-boot/custodians/u-boot-efi into next

Pull request efi-next-20230313

UEFI:

* Improve graphics support in EFI app

Others:

* x86: Add a few more items to bdinfo
* video: Remove duplicate cursor-positioning function
* video: Clear the vidconsole rather than the video
2023-03-13 15:36:52 -04:00
Simon Glass
61a6210541 video: Add a note about the broken implementation
The cls command is broken. Previous discussion about this was at [1] and
[2]. For now, add a note to the source code.

[1] https://patchwork.ozlabs.org/project/uboot/patch/
       20221022092058.106052-1-heinrich.schuchardt@canonical.com/
[2] https://patchwork.ozlabs.org/project/uboot/patch/
       20230106145243.411626-12-sjg@chromium.org/

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-13 13:53:01 +01:00
Simon Glass
b7adb69e9a efi: Add dhrystone, dcache and scroll lines to app
Add these options to provide some performance measurement, see cache
status and slightly speed up the appallingly slow console.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-13 13:53:01 +01:00
Simon Glass
a76b60f820 video: Clear the vidconsole rather than the video
It is better to clear the console device rather than the video device,
since the console has the text display. We also need to reset the cursor
position with the console, but not with the video device.

Add a new function to handle this and update the 'cls' command to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-13 13:53:01 +01:00
Simon Glass
9f62a472df video: Remove duplicate cursor-positioning function
There are two functions for positioning the cursor on the console. Remove
one of them.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-13 13:53:01 +01:00
Simon Glass
1f0cf89227 efi: Adjust script to show pre-relocation output on terminal
When running with video enabled, the pre-relocation output of U-Boot is
currently lost. Add a -serial flag to show it on the terminal.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-13 13:53:01 +01:00
Simon Glass
38191594df bbinfo: Show the size of the copy framebuffer
If the copy framebuffer is enabled, show its size.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-13 13:53:01 +01:00
Simon Glass
315e367977 video: Allow a copy framebuffer with pre-allocated fb
At present it is not possible for the video driver to use a pre-allocated
frame buffer (such as is done with EFI) with the copy framebuffer. This
can be useful to speed up the display.

Adjust the implementation so that copy_size can be set to the required
size, with this being allocated if the normal framebuffer size is 0.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-13 13:53:01 +01:00
Simon Glass
f62229227c efi: Support copy framebuffer
Add support for this to EFI in case it becomes useful. At present it just
slows things down. You can enable CONFIG_VIDEO_COPY to turn it on.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-13 13:53:01 +01:00
Simon Glass
4f9a8f33f0 efi: Use a fixed value for the timer clock
It is not yet clear how to read the timer via EFI. The current value seems
much too high on a Framework laptop I tried. Adjust it to a lower
hard-coded value for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-13 13:53:01 +01:00
Simon Glass
40b8afe6f6 x86: Add a few more items to bdinfo
Add the timer and vendor/model information.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-13 13:53:01 +01:00
Simon Glass
644e61448c efi: Support a 64-bit frame buffer address
The current vesa structure only provides a 32-bit value for the frame
buffer. Many modern machines use an address outside the range.

It is still useful to have this common struct, but add a separate
frame-buffer address as well.

Add a comment for vesa_setup_video_priv() while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-13 13:53:01 +01:00
Simon Glass
57fa418224 efi: video: Return mode info for app also
The mode info is currently not initialised for the app. Fix this by
returning it from the function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-13 13:53:01 +01:00
Simon Glass
88753816cf efi: video: Move payload code into a function
Put this into a function, as we have done for the app implementation.
Comment both functions. FOr now the app still does not access it
correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-13 13:53:01 +01:00
Tom Rini
bcf343146f binman x509, separate tools dir and other improvements
patman parallel patch generation
 fdt fixes and tests
 PyPi support for U-Boot tools
 buildman reproducible builds
 -----BEGIN PGP SIGNATURE-----
 
 iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAmQJCPcRHHNqZ0BjaHJv
 bWl1bS5vcmcACgkQfxc6PpAIrebrXwf/dmE3zx4JOYgcuwQzwSNSKXeq+XbSNcQB
 qzgzBQNuhx5A666pf1ZE3ZFiSwWeRy05tfmpKMB6WmxqrCayaVpGgueaRWRj7Y4u
 v52+DYHSccYCOOAJ1rXwcVNNg57echaX5kImJpwOW75//4jspQWZqpRZWyk0d5Pi
 E+SmBp09d48eukxA8K00BJhHm1SHegyl5TNxusiZnEpAuFou0GKmG4xV8VldGChF
 47IsnUk0VUUITnI0OV9Wr86BaECXWBggD42NtEiIIINN7T/p+CNir6yhkM/kavtL
 zc0qwovBEbIFQexduaxHczfZXHNKfC8I2ve8S8ZZo2G82RAr+q/IPw==
 =Tcf+
 -----END PGP SIGNATURE-----

Merge tag 'dm-next-9mar23' of https://source.denx.de/u-boot/custodians/u-boot-dm into next

binman x509, separate tools dir and other improvements
patman parallel patch generation
fdt fixes and tests
PyPi support for U-Boot tools
buildman reproducible builds
2023-03-09 11:22:50 -05:00
Simon Glass
953d4177af binman: Support generation of x509 certificates
And a new entry type which supports generation of x509 certificates.
This uses a new 'openssl' btool with just one operation so far.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-08 13:15:15 -08:00
Simon Glass
7caa372a5e binman: Support updating section contents
Implement this feature since it is useful for updating FITs within an
image.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-08 13:15:14 -08:00
Simon Glass
033828cf34 binman: Handle missing bintools correctly in fit
At present these are handled as if they are allowed to be missing, but
this is only true if the -M flag is provided. Fix this and add a test.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-08 13:15:14 -08:00
Simon Glass
e00197f92d binman: Allow preserving the output dir when replacing
Add these flags for the 'replace' subcommand too, to aid debugging.

Signed-off-by: Simon Glass <sjg@chromium.org>

44 2023 -0700
2023-03-08 13:15:14 -08:00
Simon Glass
bd0a548ad4 buildman: Correct CROSS_COMPILE output for sandbox
At present, 'buildman -A sandbox' adds the path containing the
toolchain at present. We can assume that this is in the path and
we don't want to set CROSS_COMPILE=/bin/ so change this to align
with what MakeEnvironment() does.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-08 13:15:14 -08:00
Simon Glass
00d54ae8f4 patman: Check patches in parallel
For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2023-03-08 13:15:14 -08:00
Simon Glass
27409e35d5 patman: Run get_maintainer.pl in parallel
This script can take ages on some series. Try to limit the time by
using threads. If a few stubborn patches remain, show progress so the
user has some idea what is going on.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2023-03-08 13:15:14 -08:00
Simon Glass
c524cd6139 patman: Refactor MakeCcFile() into two functions
This function is quite long. Moving the handling of a commit into a
separate function. This will make it easier to do the work in parallel.

Update function comments while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2023-03-08 13:15:14 -08:00
Simon Glass
98bc0b48bd patman: Drop an incorrect comment about git am
Patman does not do this anymore, as of this commit:

   7428dc14b0 ("patman: Remove the -a option")

Drop the comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2023-03-08 13:15:14 -08:00
Marek Vasut
3998b45e31 test: cmd: fdt: Add list of remaining missing tests
Add list of missing tests for the 'fdt' command, currently
the missing sandbox tests are only 'fdt boardsetup' and
'fdt checksign' .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 13:15:14 -08:00
Marek Vasut
26281517c6 test: cmd: fdt: Test fdt bootcpu
Add 'fdt bootcpu' test which works as follows:
- Create basic FDT, map it to sysmem
- Print the FDT bootcpu
- Set the FDT bootcpu and read the value back using 'fdt header get'
- Perform the previous step twice to validate bootcpu overwrite

The test case can be triggered using:
"
./u-boot -Dc 'ut fdt'
"
To dump the full output from commands used during test, add '-v' flag.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 13:15:13 -08:00
Marek Vasut
e46a438c59 test: cmd: fdt: Test fdt rm
Add 'fdt rm' test which works as follows:
- Create fuller FDT, map it to sysmem
- Selectively delete nodes or properties by both path and aliases
- Verify created nodes or properties using fdt print command

The test case can be triggered using:
"
./u-boot -Dc 'ut fdt'
"
To dump the full output from commands used during test, add '-v' flag.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 13:14:29 -08:00
Marek Vasut
6c28594bf6 test: cmd: fdt: Test fdt mknode
Add 'fdt mknode' test which works as follows:
- Create fuller FDT, map it to sysmem
- Create node either in / or subnode
- Attempt to create node over existing node, which fails
- Attempt to create subnodes in non-existing nodes or aliases
- Verify created nodes using fdt list command

The test case can be triggered using:
"
./u-boot -Dc 'ut fdt'
"
To dump the full output from commands used during test, add '-v' flag.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 13:14:29 -08:00
Marek Vasut
8bd49a87d9 test: cmd: fdt: Test fdt set
Add 'fdt set' test which works as follows:
- Create fuller FDT, map it to sysmem
- Set either existing property to overwrite it, or new property
- Test setting both single properties as well as string and integer arrays
- Test setting to non-existent nodes and aliases
- Verify set values using 'fdt get value'

The test case can be triggered using:
"
./u-boot -Dc 'ut fdt'
"
To dump the full output from commands used during test, add '-v' flag.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 13:14:29 -08:00
Marek Vasut
66e975a23e test: cmd: fdt: Test fdt get size
Add 'fdt get size' test which works as follows:
- Create fuller FDT, map it to sysmem
- Get size of various properties
- Get node count of available nodes
- Test non-existent nodes and properties

The test case can be triggered using:
"
./u-boot -Dc 'ut fdt'
"
To dump the full output from commands used during test, add '-v' flag.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 13:14:29 -08:00
Marek Vasut
b6d1dece4f test: cmd: fdt: Test fdt get addr
Add 'fdt get addr' test which works as follows:
- Create fuller FDT, map it to sysmem
- Get address of various properties
- Compare addresses calculated by UT and fdt command

This test is special in that it has to go through gruesome remapping scheme
where the test calculates:
- pointer offsets of the generated FDT root and the property being tested
- map_sysmem() result of environment variable "fdtaddr" and the one set
  by the test matching address of property being tested
- difference between the later and the former, to obtain offset of the
  DT property from start of DT
The offsets must match in both the UT and the tested U-Boot, if they do
not, the test fails.

The test case can be triggered using:
"
./u-boot -Dc 'ut fdt'
"
To dump the full output from commands used during test, add '-v' flag.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 13:14:28 -08:00
Marek Vasut
890d3fcbed test: cmd: fdt: Test fdt get name
Add 'fdt get name' test which works as follows:
- Create fuller FDT, map it to sysmem
- Get name of / node 0, 1 and /clk-test node 0
- Compare output and validate the node name
- Get name of / node 2 and /clk-test node 1
- Compare output and validate the node is not present
- Get name of / node -1 and /clk-test node -1
- Compare output and validate the node name equals node 0 name
- Check nonexistent node, verify the command errors out

The test case can be triggered using:
"
./u-boot -Dc 'ut fdt'
"
To dump the full output from commands used during test, add '-v' flag.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 13:14:28 -08:00
Marek Vasut
8fa2835228 test: cmd: fdt: Test fdt resize
Add 'fdt resize' test which works as follows:
- Create simple FDT with extra size 0, map it to sysmem
- 'resize' the FDT by 0x2000 bytes
- Verify the new space has been added to the FDT

The test case can be triggered using:
"
./u-boot -Dc 'ut fdt'
"
To dump the full output from commands used during test, add '-v' flag.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 11:40:57 -08:00
Marek Vasut
05728722dd test: cmd: fdt: Test fdt move
Add 'fdt move' test which works as follows:
- Create simple FDT, map it to sysmem
- 'move' the FDT into new zeroed out sysmem location
- Verify newly active FDT is in the new location
- Compare both locations

The test case can be triggered using:
"
./u-boot -Dc 'ut fdt'
"
To dump the full output from commands used during test, add '-v' flag.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 11:40:57 -08:00
Marek Vasut
f1df20a135 test: cmd: fdt: Test both string and integer arrays in 'fdt get value'
The 'fdt get value' subcommand now supports extraction of integer value
from integer arrays, add test for it, including a test for special case
unindexed integer array read, which is handled as hash and treated as a
long string instead of integer.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 11:40:57 -08:00
Marek Vasut
39e072701c test: cmd: fdt: Test alias resolution in 'fdt get value'
The 'fdt' command help contains the following note:
"
Dereference aliases by omitting the leading '/', e.g. fdt print ethernet0.
"
Add test for it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 11:40:57 -08:00
Marek Vasut
d6729765ff test: cmd: fdt: Generate fuller DT internally and switch fdt get value to it
Implement function to generate internal test DT fragment and switch
the 'fdt get value' test to this instead of depending on the sandbox
DT. Rename clk-test node to test-node node. This FDT fragment will be
reused by other tests. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 11:40:57 -08:00
Marek Vasut
025b9d8e47 test: cmd: fdt: Rename fdt_test_get() to fdt_test_get_value()
The 'fdt get' command has a 'get value' subcommand, rename the fdt_test_get()
to fdt_test_get_value() to avoid confusion about what it is testing. There is
currently no get 'get name', 'get addr', 'get size' subcommand test.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 11:40:57 -08:00
Marek Vasut
ab40fafe96 test: cmd: fdt: Rename fdt_test_resize() to fdt_test_addr_resize()
The 'fdt' command has a 'resize' subcommand, rename the fdt_test_resize()
to fdt_test_addr_resize() to avoid confusion about what it is testing.
There is currently no resize test.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 11:40:57 -08:00
Marek Vasut
8f4c9993c0 test: Add ut_assert_nextline_empty() empty line helper
Add helper macro to test for empty lines, which is an inobvious
wrapper around ut_assert_nextline("%s", "") .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 11:40:57 -08:00
Marek Vasut
95d85d0da4 cmd: fdt: Add support for integer arrays in fdt get value with index
Currently any integer array value is set as long up-to-40 character
hexadecimal string into environment variable when extracted from an
FDT using 'fdt get value path prop index', because the support for
handling integer arrays is not implemented, and fdt_value_env_set()
code falls back into the hash handling behavior instead.

Implement this support simply by checking whether user supplied any
index. If index is set and the property length is multiple of four,
then this is an integer array, and the code would extract value at
specified index.

There is a subtle change where default index is set to -1 instead of 0.
This is OK, since the only place which checks for index to be less or
equal zero is the string array handling code in fdt_value_env_set() and
that code would work perfectly well with index -1 too.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 11:40:57 -08:00
Marek Vasut
c2a5d10780 cmd: fdt: Map address returned from fdt get addr to sysmem
The address returned from 'fdt get addr' command must be mapped
into sysmem, as this is a working FDT. Access to this address
without mapping it would lead to crash e.g. in sandbox.

The following command triggers the crash:
"
./u-boot -Dc 'fdt addr $fdtcontroladdr ; fdt get addr var / compatible ; md $var'
"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 11:40:57 -08:00
Marek Vasut
22cbd654d3 cmd: fdt: Handle 64bit pointers in fdt get addr
The command assumed 32bit pointers so far, with 64bit pointer the
command would overwrite a piece of stack. Fix it by extending the
array size to cater for 64bit pointer, and use snprintf() to avoid
writing past the end of the array ever again.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-08 11:40:57 -08:00