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 <xypron.glpk@gmx.de>" [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
This commit is contained in:
@@ -22,10 +22,14 @@ static int qemu_fwcfg_cmd_list_firmware(void)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
printf(" Addr Size Sel Name\n");
|
||||
printf("---------------- -------- --- ------------\n");
|
||||
for (file = qfw_file_iter_init(qfw_dev, &iter);
|
||||
!qfw_file_iter_end(&iter);
|
||||
file = qfw_file_iter_next(&iter)) {
|
||||
printf("%08lx %-56s\n", file->addr, file->cfg.name);
|
||||
printf("%16lx %8x %3x %-48s\n", file->addr,
|
||||
be32_to_cpu(file->cfg.size),
|
||||
be16_to_cpu(file->cfg.select), file->cfg.name);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -252,6 +252,9 @@ Various environment variables are used by standard boot. These allow the board
|
||||
to control where things are placed when booting the OS. You should ensure that
|
||||
your boards sets values for these.
|
||||
|
||||
extension_overlay_addr (needed if extension is used)
|
||||
Address at which to load the extension FDT overlays, e.g. 0x02000000
|
||||
|
||||
fdtfile
|
||||
Name of the flattened device tree (FDT) file to load, e.g.
|
||||
"rockchip/rk3399-rockpro64.dtb"
|
||||
@@ -868,7 +871,6 @@ To do
|
||||
|
||||
Some things that need to be done to completely replace the distro-boot scripts:
|
||||
|
||||
- implement extensions (devicetree overlays with add-on boards)
|
||||
- implement legacy (boot image v2) android boot flow
|
||||
|
||||
Other ideas:
|
||||
|
||||
+15
-12
@@ -44,18 +44,21 @@ QEMU firmware files are listed via the *qfw list* command:
|
||||
::
|
||||
|
||||
=> qfw list
|
||||
00000000 bios-geometry
|
||||
00000000 bootorder
|
||||
000f0060 etc/acpi/rsdp
|
||||
bed14040 etc/acpi/tables
|
||||
00000000 etc/boot-fail-wait
|
||||
00000000 etc/e820
|
||||
00000000 etc/smbios/smbios-anchor
|
||||
00000000 etc/smbios/smbios-tables
|
||||
00000000 etc/system-states
|
||||
00000000 etc/table-loader
|
||||
00000000 etc/tpm/log
|
||||
00000000 genroms/kvmvapic.bin
|
||||
Addr Size Sel Name
|
||||
---------------- -------- --- ------------
|
||||
0 0 20 bios-geometry
|
||||
0 0 21 bootorder
|
||||
1fc6c000 14 22 etc/acpi/rsdp
|
||||
1fc6c040 20000 23 etc/acpi/tables
|
||||
0 4 24 etc/boot-fail-wait
|
||||
0 28 25 etc/e820
|
||||
0 8 26 etc/msr_feature_control
|
||||
0 18 27 etc/smbios/smbios-anchor
|
||||
0 151 28 etc/smbios/smbios-tables
|
||||
0 6 29 etc/system-states
|
||||
0 1000 2a etc/table-loader
|
||||
0 0 2b etc/tpm/log
|
||||
0 2400 2c genroms/kvmvapic.bin
|
||||
|
||||
Where an address is shown, it indicates where the data is available for
|
||||
inspection, e.g. using the :doc:`md`.
|
||||
|
||||
@@ -265,7 +265,6 @@ out:
|
||||
struct acpi_rsdp *rsdp = ctx->rsdp;
|
||||
|
||||
rsdp->length = sizeof(*rsdp);
|
||||
rsdp->xsdt_address = 0;
|
||||
rsdp->ext_checksum = table_compute_checksum((u8 *)rsdp, sizeof(*rsdp));
|
||||
|
||||
gd_set_acpi_start(acpi_get_rsdp_addr());
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ static int get_mode_info(struct vesa_mode_info *vesa, u64 *fbp,
|
||||
static int get_mode_from_entry(struct vesa_mode_info *vesa, u64 *fbp,
|
||||
struct efi_gop_mode_info **infop)
|
||||
{
|
||||
struct efi_gop_mode *mode;
|
||||
struct efi_entry_gopmode *mode;
|
||||
int size;
|
||||
int ret;
|
||||
|
||||
|
||||
+24
-14
@@ -385,6 +385,28 @@ struct efi_entry_memmap {
|
||||
struct efi_mem_desc desc[];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct efi_gop_mode_info - graphics output mode information
|
||||
*/
|
||||
struct efi_gop_mode_info {
|
||||
/** @version: version of the data structure (use zero) */
|
||||
u32 version;
|
||||
/** @width: horizontal screen size */
|
||||
u32 width;
|
||||
/** @height: vertical screen size */
|
||||
u32 height;
|
||||
/** @pixel_format: enum that specifies the storage format of pixels */
|
||||
u32 pixel_format;
|
||||
/**
|
||||
* @pixel_bitmask: bitmasks used with PixelPixelBitMask
|
||||
*
|
||||
* The values which bits are used for red, green, blue, and alpha.
|
||||
*/
|
||||
u32 pixel_bitmask[4];
|
||||
/** @pixels_per_scanline: pixels per video memory line */
|
||||
u32 pixels_per_scanline;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct efi_entry_gopmode - a GOP mode table passed to U-Boot
|
||||
*
|
||||
@@ -404,19 +426,7 @@ struct efi_entry_gopmode {
|
||||
*/
|
||||
u64 fb_size;
|
||||
u64 info_size;
|
||||
/*
|
||||
* We cannot directly use 'struct efi_gop_mode_info info[]' here as
|
||||
* it causes compiler to complain: array type has incomplete element
|
||||
* type 'struct efi_gop_mode_info'.
|
||||
*/
|
||||
struct /* efi_gop_mode_info */ {
|
||||
u32 version;
|
||||
u32 width;
|
||||
u32 height;
|
||||
u32 pixel_format;
|
||||
u32 pixel_bitmask[4];
|
||||
u32 pixels_per_scanline;
|
||||
} info[];
|
||||
struct efi_gop_mode_info info[];
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -444,7 +454,7 @@ static inline struct efi_mem_desc *efi_get_next_mem_desc(
|
||||
* @memmap_key: Key returned from get_memory_map()
|
||||
* @memmap_desc: List of memory-map records
|
||||
* @memmap_alloc: Amount of memory allocated for memory map list
|
||||
* @memmap_size Size of memory-map list in bytes
|
||||
* @memmap_size: Size of memory-map list in bytes
|
||||
* @memmap_desc_size: Size of an individual memory-map record, in bytes
|
||||
* @memmap_version: Memory-map version
|
||||
*
|
||||
|
||||
@@ -1490,15 +1490,6 @@ struct efi_hii_config_access_protocol {
|
||||
#define EFI_GOT_BGRA8 1
|
||||
#define EFI_GOT_BITMASK 2
|
||||
|
||||
struct efi_gop_mode_info {
|
||||
u32 version;
|
||||
u32 width;
|
||||
u32 height;
|
||||
u32 pixel_format;
|
||||
u32 pixel_bitmask[4];
|
||||
u32 pixels_per_scanline;
|
||||
};
|
||||
|
||||
struct efi_gop_mode {
|
||||
u32 max_mode;
|
||||
u32 mode;
|
||||
|
||||
@@ -155,7 +155,7 @@ int efi_store_memory_map(struct efi_priv *priv)
|
||||
putc(' ');
|
||||
printhex2(ret);
|
||||
puts(" No memory map\n");
|
||||
return ret;
|
||||
return -EFAULT;
|
||||
}
|
||||
/*
|
||||
* Since doing a malloc() may change the memory map and also we want to
|
||||
@@ -168,7 +168,7 @@ int efi_store_memory_map(struct efi_priv *priv)
|
||||
if (!priv->memmap_desc) {
|
||||
printhex2(ret);
|
||||
puts(" No memory for memory descriptor\n");
|
||||
return ret;
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
ret = boot->get_memory_map(&priv->memmap_size, priv->memmap_desc,
|
||||
@@ -177,7 +177,7 @@ int efi_store_memory_map(struct efi_priv *priv)
|
||||
if (ret) {
|
||||
printhex2(ret);
|
||||
puts(" Can't get memory map\n");
|
||||
return ret;
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -84,7 +84,7 @@ static ulong efi_bl_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
|
||||
* efi_bl_write() - write to block device
|
||||
*
|
||||
* @dev: device
|
||||
* @blknr: first block to be write
|
||||
* @blknr: first block to write
|
||||
* @blkcnt: number of blocks to write
|
||||
* @buffer: input buffer
|
||||
* Return: number of blocks transferred
|
||||
@@ -124,7 +124,7 @@ efi_bl_create_block_device(efi_handle_t handle, void *interface)
|
||||
efi_status_t ret;
|
||||
int r;
|
||||
int devnum;
|
||||
char *name;
|
||||
char name[18]; /* strlen("efiblk#2147483648") + 1 */
|
||||
struct efi_block_io *io = interface;
|
||||
struct efi_blk_plat *plat;
|
||||
|
||||
@@ -136,9 +136,6 @@ efi_bl_create_block_device(efi_handle_t handle, void *interface)
|
||||
if (devnum < 0)
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
|
||||
name = calloc(1, 18); /* strlen("efiblk#2147483648") + 1 */
|
||||
if (!name)
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
sprintf(name, "efiblk#%d", devnum);
|
||||
|
||||
/* Create driver model udevice for the EFI block io device */
|
||||
@@ -146,7 +143,6 @@ efi_bl_create_block_device(efi_handle_t handle, void *interface)
|
||||
devnum, io->media->block_size,
|
||||
(lbaint_t)io->media->last_block, &bdev)) {
|
||||
ret = EFI_OUT_OF_RESOURCES;
|
||||
free(name);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ static efi_status_t EFIAPI efi_uc_stop(
|
||||
goto out;
|
||||
}
|
||||
ret = EFI_SUCCESS;
|
||||
goto out;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Destroy all children */
|
||||
|
||||
@@ -372,7 +372,7 @@ out:
|
||||
}
|
||||
|
||||
/*
|
||||
* efi_net_receive_filters() - mange multicast receive filters
|
||||
* efi_net_receive_filters() - manage multicast receive filters
|
||||
*
|
||||
* This function implements the ReceiveFilters service of the
|
||||
* EFI_SIMPLE_NETWORK_PROTOCOL. See the Unified Extensible Firmware Interface
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
@@ -0,0 +1,40 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Tests for qfw command
|
||||
*
|
||||
* Copyright 2025 Simon Glass <sjg@chromium.org>
|
||||
*/
|
||||
|
||||
#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);
|
||||
Reference in New Issue
Block a user