diff options
| author | Tom Rini <[email protected]> | 2025-11-07 08:26:59 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-11-07 08:26:59 -0600 |
| commit | df786b4c57f582b4f875effe68d3ae22bbb478a9 (patch) | |
| tree | d58021af29a136ce4a9764ac31c2b91c15e868fb /test | |
| parent | b660df558545b42f7257899807b83cfc620b2983 (diff) | |
| parent | 6bb374b1a1226b964db8476b2939a280c7477e4a (diff) | |
Merge tag 'efi-2026-01-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2026-01-rc2
CI: https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/28208
Documentation:
* bootstd: Describe environment variable extension_overlay_addr
environment and remove extension support from TODO list
EFI:
* Correct the detection of the video mode in the EFI payload app:
- Use struct efi_gop_mode_info in the definition of struct
efi_entry_gopmode.
- In function get_mode_from_entry() use the correct type for the video
mode structure.
* Use a valid error code as return value in efi_store_memory_map().
* Avoid a memory leak for the variable name in efi_bl_create_block_device().
* Correct the code indentation in efi_uc_stop().
* Correct the description of struct efi_priv.
* Fix typos in code comments.
Other:
* qfw: Add more fields and a heading to qfw list
* Fix the support for ACPI pass-through on ARM and RISC-V:
Avoid zeroing out the XSDT address
* test: provide unit test for 'acpi list' command
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmkNj/kACgkQxIHbvCwF
# GsS8NQ/6Aj+Z54HJTIEfoXssvElLr5ATactrCxszq42i/yy6dLqa2Ym1afG6w1XS
# 1ZbCeU/bCXFke5Tsz+x89gEfckUm83oTwngwcID0WR1qn8mWjwR7tM5MuORq8NxU
# 7NwLuFs9O/QZihagKdz6hv1/Y+cBwiAYLY16EYVSuUlbLaKQo3QvxwWkqG3jdKWV
# Rm58/PolU+2h04MBwP0SxSduX4OyRF/tMOGjf5RGLyqCyj8kIgdu7PvUAPMM+Gps
# KemL59V0Bdv8hlF4JknmPz+idtZg2nHIDdNrBZvoxwzwGQeRZ1YXAMruRxZXqDYL
# tiuDp6HMv/GfIIGkz14tJtJMdboaAybAnluPWGalx8JQJqJzEPww0R+9s4KKQeWL
# mHgRyl6PxVV9p19f79Qq6q6ETwrFDX0YH3pdrGUk3DBa3lDt0UsEAnuW4FvaJ8tx
# 3PMrjKAxpxocT0hglsMVnptnfvDEigMsjwH/TWrau83mY+juxFQLjm+U4vye+qCa
# 4zXjjLas18+eRcrv2KxU7teakyi1Jp+WbqHq37L26YcQMaLq/RkBc0bTrsreKKLu
# jprYFpvc7EJpH2Fd1XWaZ2EnxXcVSJSvrY/iwRQqb6wbwQ6XGtMvSh3IFY8IzAoh
# N2Pj78oaYqyL1q/TftuZWhEHo3a0M/HfM4D+oMSHzJtWCb0wZHE=
# =OGcS
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 07 Nov 2025 12:21:45 AM 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')
| -rw-r--r-- | test/cmd/Makefile | 4 | ||||
| -rw-r--r-- | test/cmd/acpi.c | 52 | ||||
| -rw-r--r-- | test/cmd/qfw.c | 40 |
3 files changed, 96 insertions, 0 deletions
diff --git a/test/cmd/Makefile b/test/cmd/Makefile index e71c80a5b2e..841763fec02 100644 --- a/test/cmd/Makefile +++ b/test/cmd/Makefile @@ -13,6 +13,9 @@ endif obj-y += exit.o obj-$(CONFIG_X86) += cpuid.o msr.o obj-$(CONFIG_CMD_ADDRMAP) += addrmap.o +ifdef CONFIG_CONSOLE_RECORD +obj-$(CONFIG_CMD_ACPI) += acpi.o +endif obj-$(CONFIG_CMD_BDI) += bdinfo.o obj-$(CONFIG_COREBOOT_SYSINFO) += coreboot.o obj-$(CONFIG_CMD_FDT) += fdt.o @@ -27,6 +30,7 @@ obj-$(CONFIG_CMD_MEM_SEARCH) += mem_search.o ifdef CONFIG_CMD_PCI obj-$(CONFIG_CMD_PCI_MPS) += pci_mps.o endif +obj-$(CONFIG_CMD_QFW) += qfw.o obj-$(CONFIG_CMD_SEAMA) += seama.o ifdef CONFIG_SANDBOX obj-$(CONFIG_CMD_MBR) += mbr.o diff --git a/test/cmd/acpi.c b/test/cmd/acpi.c new file mode 100644 index 00000000000..3669060733a --- /dev/null +++ b/test/cmd/acpi.c @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Tests for acpi command + */ + +#include <linux/bitops.h> +#include <test/cmd.h> +#include <test/ut.h> + +#define HAVE_RSDP BIT(0) +#define HAVE_XSDT BIT(1) +#define HAVE_FADT BIT(2) +#define HAVE_ALL (HAVE_RSDP | HAVE_XSDT | HAVE_FADT) + +/** + * cmd_test_acpi() - test the acpi command + */ +static int cmd_test_acpi(struct unit_test_state *uts) +{ + unsigned int actual = 0; + int ret; + + /* + * Check that some mandatory ACPI tables exist: + * - RSDP + * - RSDT or XSDT + * - FADT + */ + ut_assertok(run_commandf("acpi list")); + ut_assert_nextline("Name Base Size Detail"); + ut_assert_nextline("---- ---------------- ----- ----------------------------"); + for (;;) { + ret = console_record_readline(uts->actual_str, sizeof(uts->actual_str)); + if (ret == -ENOENT) { + ut_asserteq(HAVE_ALL, actual); + + return 0; + } + if (ret < 0) + ut_asserteq(0, ret); + + if (!strncmp("RSDP", uts->actual_str, 4)) + actual |= HAVE_RSDP; + else if (!strncmp("RSDT", uts->actual_str, 4)) + actual |= HAVE_XSDT; + else if (!strncmp("XSDT", uts->actual_str, 4)) + actual |= HAVE_XSDT; + else if (!strncmp("FACP", uts->actual_str, 4)) + actual |= HAVE_FADT; + } +} +CMD_TEST(cmd_test_acpi, UTF_CONSOLE); diff --git a/test/cmd/qfw.c b/test/cmd/qfw.c new file mode 100644 index 00000000000..e615a82b31a --- /dev/null +++ b/test/cmd/qfw.c @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Tests for qfw command + * + * Copyright 2025 Simon Glass <[email protected]> + */ + +#include <console.h> +#include <dm.h> +#include <mapmem.h> +#include <qfw.h> +#include <dm/test.h> +#include <test/cmd.h> +#include <test/ut.h> + +/* Test 'qfw list' command */ +static int cmd_test_qfw_list(struct unit_test_state *uts) +{ + struct fw_cfg_file_iter iter; + struct fw_file *file; + struct udevice *dev; + + ut_assertok(uclass_first_device_err(UCLASS_QFW, &dev)); + + ut_assertok(run_command("qfw list", 0)); + ut_assert_nextline(" Addr Size Sel Name"); + ut_assert_nextlinen("--"); + + for (file = qfw_file_iter_init(dev, &iter); !qfw_file_iter_end(&iter); + file = qfw_file_iter_next(&iter)) { + ut_assert_nextline("%16lx %8x %3x %-48s", file->addr, + be32_to_cpu(file->cfg.size), + be16_to_cpu(file->cfg.select), + file->cfg.name); + } + ut_assert_console_end(); + + return 0; +} +CMD_TEST(cmd_test_qfw_list, UTF_CONSOLE); |
