Message ID | 20250828020732.981415-1-sjg@u-boot.org |
---|---|
Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756346869; bh=e8+BHdps1zyQZHSKqC0gdGAoXs0ZkOxohZrUNl21Goo=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=fJdVGVV18orRd905l811u0Jnl/UvrHy24DUh2Extzl1F9mwIX4YW0w7Mb8uQH8QC1 VJmV2r0ND5R4qYZascqsyiS1OZwCeMPcwwxFF4mf1W2NwSm9GgmNDvtIjb7YwBSNuj DI8/VQ6niOcO4zXa9D6zyqg9o99qmkEcDg1qzPppnIvhtHdvrM3TC1R81/5k74zWWR s2we9uUjGFpC3Tjlp0TAwFrQ9MRnKnNpmKp23tRGS/xrtHvZknrC+pPImFdk3DCRbQ HmJJQYS+mu6CL3FIWYvXcOAar2gpQDJbact0dPuCziKjsCQfUSWsuqrcitnW7ZGF5l Jy5wjFIdoU4sw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A7AC767809 for <u-boot-concept@u-boot.org>; Wed, 27 Aug 2025 20:07:49 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id KxFQqA2Ot3ct for <u-boot-concept@u-boot.org>; Wed, 27 Aug 2025 20:07:49 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756346869; bh=e8+BHdps1zyQZHSKqC0gdGAoXs0ZkOxohZrUNl21Goo=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=fJdVGVV18orRd905l811u0Jnl/UvrHy24DUh2Extzl1F9mwIX4YW0w7Mb8uQH8QC1 VJmV2r0ND5R4qYZascqsyiS1OZwCeMPcwwxFF4mf1W2NwSm9GgmNDvtIjb7YwBSNuj DI8/VQ6niOcO4zXa9D6zyqg9o99qmkEcDg1qzPppnIvhtHdvrM3TC1R81/5k74zWWR s2we9uUjGFpC3Tjlp0TAwFrQ9MRnKnNpmKp23tRGS/xrtHvZknrC+pPImFdk3DCRbQ HmJJQYS+mu6CL3FIWYvXcOAar2gpQDJbact0dPuCziKjsCQfUSWsuqrcitnW7ZGF5l Jy5wjFIdoU4sw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 95BB567732 for <u-boot-concept@u-boot.org>; Wed, 27 Aug 2025 20:07:49 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756346863; bh=v+CjnsxaPhVD+1ulcyCqulffKOf4Y1lEw7dDf3sTNbw=; h=From:To:Cc:Subject:Date:From; b=fCXthoRz5c9npDOWgPSYT5smmHZPw2x37C7eixurA9xeP2Y0ZzXEl2ZeeMnYnuLlN z7nWL8iqReb7byE/xn41njR+WsVI7ZtTPadTL0E82RKS/uU6OHkwLBsdMvSUmdE6hB JFmt5PWay1XGUJPpI0mK2TV2biQCAf9qA4DaBfN3I7zjATkjlr+wQTImm0NECURGQd 4tmoZuetdvoSp/30uHAcLRClSa+MMDTmBWC+XjXOBGQPAqUqoIEWrLlma2BR8IphsT Q5nrCVl2urzUoPfDXz/WQYXD6ZxLlUHZwH3Dh0Wo6a93PqqM7d6SDyiBUK+TcbEpjM WxhwRkZSCJ0lA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AF3DF67732; Wed, 27 Aug 2025 20:07:43 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id eqcvPub3-Kq5; Wed, 27 Aug 2025 20:07:43 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756346860; bh=3ap2DYvKJ2/ylUkGEc6HeTgpkh8rROBHhnQhwqMV3VU=; h=From:To:Cc:Subject:Date:From; b=iQG3UOUC53i2mhXKZtlevk6CSrRa/W90QpgBapyvgxG7P7hoH3TcQaxDA3RKVuQBA JnnmvwhXKWjLgccy1JigdQq4QKgiKwxU+iP17uLEzE2vWBD51e2ry7ISXKo8+hlO6n jIZL9vuAzrv+1UDThMFkYdbXK/w3ToOI+9iM7o5c0YBZP5cktREJmBY48Guy8Cg613 1PzkzzkzwkgUXT9cazXsaCGRG7qPEv4TXSqoTpDlYl3VcJT6FGQmf/aYMb49oaySjm oAW9vMyyAa2HsiO8WxqXr4cwopxfqEd7rk7GvkXMoRXJnub/DIcrvH9jyQ0/bKqw5Z mZo0FMxk/9SPQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id BD84B6743E; Wed, 27 Aug 2025 20:07:39 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Wed, 27 Aug 2025 20:07:03 -0600 Message-ID: <20250828020732.981415-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: HQ6AY27QJWKPYSF7MXS2K5RFEZA6PYTE X-Message-ID-Hash: HQ6AY27QJWKPYSF7MXS2K5RFEZA6PYTE X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt <xypron.glpk@gmx.de>, Simon Glass <sjg@chromium.org> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 00/20] efi: App and devicetree improvements List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/HQ6AY27QJWKPYSF7MXS2K5RFEZA6PYTE/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
Series |
efi: App and devicetree improvements
|
|
Message
Simon Glass
Aug. 28, 2025, 2:07 a.m. UTC
From: Simon Glass <sjg@chromium.org>
This series improves U-Boot's EFI app support and adds new functionality
for managing devicetree reserved-memory regions.
The main focus is on enhancing memory management when running as an EFI
application. A new mechanism is introduced to sync EFI reserved-memory
regions (such as runtime services and ACPI tables) with the devicetree's
/reserved-memory nodes. This ensures that Linux doesn't inadvertently use
memory regions that EFI firmware has reserved.
The main improvements are:
- New 'fdt reserved' command to display devicetree reserved-memory regions
- New 'efi memsync' command to synchronize EFI memory map with devicetree
- Enhance EFI application support with better memory region handling
- Improve EFI debugging commands and device path handling
- Better integrate EFI boot services and devicetree setup
There are a few other minor thigns:
- Enhance efidebug commands with media device and driver information
- Expose EFI device-paths in a few places in bootstd
- Improve bootflow device reporting
- ARM-specific fixes for exception level handling
This series addresses many of the issues found in booting Linux on
Qualcomm X-Elite laptops using the EFI app.
Simon Glass (20):
efi: Set the efi_media device name when binding
efi: app: Avoid switching exception levels on ARM
efi: app: Avoid freeing memory on exit
efi: Add a way to show media devices
efi: Add all messaging types for device paths
efi: Convert a device-path to a uclass and name
efi: Add a uclass column to efidebug media command
efi: Implement efidebug show drivers in the app
boot: Correct filename in bootmeth_common_read_file()
boot: Show the device path for EFI bootflows
boot: Show the underlying bootflow device in the app
efi: Use abuf when reading EFI variables
efi: Add a command to help with shim
efi: Add an efi subcommand to show the loaded image
fdt: Add a function to show the reserved-memory nodes
fdt: Add a command to show reserved-memory regions
efi: Provide a way to sync EFI reserved-memory to fdt
fdt: Provide a command to sync the reserve-memory node
efi: app: Add a simple-framebuffer node if enabled
efi: app: Sync EFI reserved-memory to the devicetree
boot/bootmeth-uclass.c | 2 +-
boot/fdt_support.c | 54 ++++++++
cmd/Kconfig | 9 ++
cmd/Makefile | 1 +
cmd/bootflow.c | 38 +++++-
cmd/efi.c | 37 ++++-
cmd/efidebug.c | 73 +++++++---
cmd/fdt.c | 7 +-
cmd/nvedit_efi.c | 62 ++++++---
cmd/shim.c | 65 +++++++++
doc/usage/cmd/efi.rst | 50 +++++++
doc/usage/cmd/efidebug.rst | 24 +++-
doc/usage/cmd/fdt.rst | 26 ++++
doc/usage/cmd/shim.rst | 101 ++++++++++++++
doc/usage/index.rst | 1 +
include/efi.h | 51 +++++++
include/efi_api.h | 20 ++-
include/efi_device_path.h | 25 ++++
include/fdt_support.h | 7 +
include/shim.h | 13 ++
lib/efi/device_path.c | 125 +++++++++++++++++
lib/efi_client/app_run.c | 21 ++-
lib/efi_client/efi.c | 249 +++++++++++++++++++++++++++++++++-
lib/efi_client/efi_app.c | 12 +-
lib/efi_client/efi_app_init.c | 21 ++-
test/cmd/fdt.c | 40 ++++++
26 files changed, 1072 insertions(+), 62 deletions(-)
create mode 100644 cmd/shim.c
create mode 100644 doc/usage/cmd/shim.rst
create mode 100644 include/shim.h