diff options
| author | Tom Rini <[email protected]> | 2025-11-22 08:44:38 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-11-22 08:44:38 -0600 |
| commit | 74c68b54977447e97b98b12c3ca7fe2a7f4a3803 (patch) | |
| tree | 949504975745ed37bc3d60535b9ce17fb984c2d8 /test/cmd | |
| parent | 2bc0715b558fa1ac5c88b11e250740b16a905837 (diff) | |
| parent | fff78d3bb25dc0c4b20b4ab9908cb355f5808178 (diff) | |
Merge tag 'efi-2026-01-rc3-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2026-01-rc3-2
CIL https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/28454
Documentation:
* board: ti: am6254atl_sk: correct value of PRELOADED_BL33_BASE
* pytest: fix u-boot-test-flash typo
* samsung: Fix PXE description for the E850-96 board
* board: ti: k3: Update TI firmware repository URL to GitHub
* add missing macro descriptions to include/test/ut.h and add it to
the API documenation
* rearrange the description of DM tests and describe return values
Testing:
* Enable CI testing ACPI on qemu-riscv64_smode_acpi_defconfig
* Add qemu-riscv64_smode_defconfig to the CI tests
* Generalize tests such that they can run on RISC-V QEMU
- fdt_test_apply requires CONFIG_OF_LIBFDT_OVERLAY
- cmd/fdt: do not assume RNG device exists
- cmd/bdinfo: make no flash assumption
- cmd/bdinfo: consider arch_print_bdinfo() output
- common/print: do not use fixed buffer addresses
- cmd/fdt: do not use fixed buffer addresses
- raise CONFIG_CONSOLE_RECORD_OUT_SIZE default to 0x6000
* enable CONFIG_CONSOLE_RECORD=y on qemu-riscv64_smode_acpi
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmkg1IsACgkQxIHbvCwF
# GsQVLA//dmiApob+J9FUhD8joD+DaKSNfLYmv8zwfIFL2xRxx7D+CQT+r+I9FJYI
# KojiLyn4PE/5VOm+wrsvAoYoMLJwAHvg5nmYJLLzvm6V//DLd1AEopP/+Uh8gEVW
# xYGLcvDyGgZpraAhcmqRnAS89py3SigwGzhcUMbT6ZC6pgMVEsBpg8XeMpY7N05c
# rwyqFAAPD8RcF7veQCpry87NiK5o+9YuM1zKl5sDFOpEWKq5ToNwhQ00bnux9lUd
# HWz9X6ge58iFiMXRqUCnOaPeXeChn9ejyEiKtfQ0JtykOf9NT2WMdD2VKe9PCYsd
# f7OynJTGG2OXTKBhon/xj75itiTm7EELc/FHwHEdtZIIHgpi/C33yQgKxLf9mtUo
# Z7DKYpPoaTCbJhs9LCK942KPtshbtAJLKTVqyBPo7Jn0mneeCQUsbaQRU7JruJTK
# hKluUjsAry3Do3wv/w6B8R6MMgfpBktPkqjg9e/maSdhYdkNAYpjajtORgpqmJRV
# HTGJXfL3qFC50jlenlMYOm4Qake33MIMzubaxoM3j5ENDUJ7KAbWADEoWDpve8Tu
# b/fX8uuW+g2T18Y/M9Bsk/jaUjDTx0xtZUSYNIIQJFDaJMzUxGYWlmtXhLZwFU8g
# 7S5pBmgxoSAtQSMAeoJPJp9FSgXYqiGLUeSwcOH2NaPn0lLFvK0=
# =D0Yy
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 21 Nov 2025 03:07:23 PM CST
# gpg: using RSA key 6DC4F9C71F29A6FA06B76D33C481DBBC2C051AC4
# gpg: Good signature from "Heinrich Schuchardt <[email protected]>" [unknown]
# gpg: aka "[jpeg image of size 1389]" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 6DC4 F9C7 1F29 A6FA 06B7 6D33 C481 DBBC 2C05 1AC4
Diffstat (limited to 'test/cmd')
| -rw-r--r-- | test/cmd/bdinfo.c | 15 | ||||
| -rw-r--r-- | test/cmd/fdt.c | 31 |
2 files changed, 36 insertions, 10 deletions
diff --git a/test/cmd/bdinfo.c b/test/cmd/bdinfo.c index 09f44ee41ed..28d448a0866 100644 --- a/test/cmd/bdinfo.c +++ b/test/cmd/bdinfo.c @@ -161,9 +161,9 @@ static int bdinfo_test_all(struct unit_test_state *uts) ut_assertok(bdinfo_check_mem(uts)); /* CONFIG_SYS_HAS_SRAM testing not supported */ - ut_assertok(test_num_l(uts, "flashstart", 0)); - ut_assertok(test_num_l(uts, "flashsize", 0)); - ut_assertok(test_num_l(uts, "flashoffset", 0)); + ut_check_console_linen(uts, "flashstart"); + ut_check_console_linen(uts, "flashsize"); + ut_check_console_linen(uts, "flashoffset"); ut_assert_nextline("baudrate = %lu bps", env_get_ulong("baudrate", 10, 1234)); ut_assertok(test_num_l(uts, "relocaddr", gd->relocaddr)); @@ -215,8 +215,15 @@ static int bdinfo_test_all(struct unit_test_state *uts) ut_assertok(test_num_l(uts, "malloc base", gd_malloc_start())); } + /* Check arch_print_bdinfo() output */ if (IS_ENABLED(CONFIG_X86)) - ut_check_skip_to_linen(uts, " high end ="); + ut_check_skip_to_linen(uts, "tsc"); + +#ifdef CONFIG_RISCV + ut_check_console_linen(uts, "boot hart"); + if (gd->arch.firmware_fdt_addr) + ut_check_console_linen(uts, "firmware fdt"); +#endif return 0; } diff --git a/test/cmd/fdt.c b/test/cmd/fdt.c index 96a8488e172..4c3c6308ab4 100644 --- a/test/cmd/fdt.c +++ b/test/cmd/fdt.c @@ -10,6 +10,7 @@ #include <fdt_support.h> #include <mapmem.h> #include <asm/global_data.h> +#include <dm/uclass.h> #include <linux/libfdt.h> #include <test/ut.h> @@ -264,7 +265,7 @@ FDT_TEST(fdt_test_addr_resize, UTF_CONSOLE); static int fdt_test_move(struct unit_test_state *uts) { char fdt[256]; - ulong addr, newaddr = 0x10000; + ulong addr, newaddr; const int size = sizeof(fdt); uint32_t ts; void *buf; @@ -274,8 +275,10 @@ static int fdt_test_move(struct unit_test_state *uts) ts = fdt_totalsize(fdt); /* Moved target DT location */ - buf = map_sysmem(newaddr, size); + buf = memalign(8, size); + ut_assertnonnull(buf); memset(buf, 0, size); + newaddr = map_to_sysmem(buf); /* Test moving the working FDT to a new location */ ut_assertok(run_commandf("fdt move %08lx %08lx %x", addr, newaddr, ts)); @@ -287,6 +290,8 @@ static int fdt_test_move(struct unit_test_state *uts) ut_assert_nextline("Total of %d byte(s) were the same", ts); ut_assert_console_end(); + free(buf); + return 0; } FDT_TEST(fdt_test_move, UTF_CONSOLE); @@ -1267,6 +1272,7 @@ static int fdt_test_chosen(struct unit_test_state *uts) { const char *env_bootargs = env_get("bootargs"); char fdt[8192]; + struct udevice *dev; ulong addr; ut_assertok(make_test_fdt(uts, fdt, sizeof(fdt), &addr)); @@ -1280,11 +1286,16 @@ static int fdt_test_chosen(struct unit_test_state *uts) /* Test add new chosen node without initrd */ ut_assertok(run_commandf("fdt chosen")); ut_assertok(run_commandf("fdt print /chosen")); - ut_assert_nextline("chosen {"); + ut_assert(0 < console_record_readline(uts->actual_str, + sizeof(uts->actual_str))); + if (!strcmp("No RNG device", uts->actual_str)) + ut_assert(0 < console_record_readline(uts->actual_str, + sizeof(uts->actual_str))); + ut_asserteq_str("chosen {", uts->actual_str); ut_assert_nextlinen("\tu-boot,version = "); /* Ignore the version string */ if (env_bootargs) ut_assert_nextline("\tbootargs = \"%s\";", env_bootargs); - if (IS_ENABLED(CONFIG_DM_RNG) && + if (!uclass_get_device(UCLASS_RNG, 0, &dev) && !IS_ENABLED(CONFIG_MEASURED_BOOT) && !IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT)) ut_assert_nextlinen("\tkaslr-seed = "); @@ -1294,7 +1305,12 @@ static int fdt_test_chosen(struct unit_test_state *uts) /* Test add new chosen node with initrd */ ut_assertok(run_commandf("fdt chosen 0x1234 0x5678")); ut_assertok(run_commandf("fdt print /chosen")); - ut_assert_nextline("chosen {"); + ut_assert(0 < console_record_readline(uts->actual_str, + sizeof(uts->actual_str))); + if (!strcmp("No RNG device", uts->actual_str)) + ut_assert(0 < console_record_readline(uts->actual_str, + sizeof(uts->actual_str))); + ut_asserteq_str("chosen {", uts->actual_str); ut_assert_nextline("\tlinux,initrd-end = <0x%08x 0x%08x>;", upper_32_bits(0x1234 + 0x5678 - 1), lower_32_bits(0x1234 + 0x5678 - 1)); @@ -1303,7 +1319,7 @@ static int fdt_test_chosen(struct unit_test_state *uts) ut_assert_nextlinen("\tu-boot,version = "); /* Ignore the version string */ if (env_bootargs) ut_assert_nextline("\tbootargs = \"%s\";", env_bootargs); - if (IS_ENABLED(CONFIG_DM_RNG) && + if (!uclass_get_device(UCLASS_RNG, 0, &dev) && !IS_ENABLED(CONFIG_MEASURED_BOOT) && !IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT)) ut_assert_nextlinen("\tkaslr-seed = "); @@ -1319,6 +1335,9 @@ static int fdt_test_apply(struct unit_test_state *uts) char fdt[8192], fdto[8192]; ulong addr, addro; + if (!IS_ENABLED(CONFIG_OF_LIBFDT_OVERLAY)) + return -EAGAIN; + /* Create base DT with __symbols__ node */ ut_assertok(fdt_create(fdt, sizeof(fdt))); ut_assertok(fdt_finish_reservemap(fdt)); |
