From patchwork Thu Aug 28 22:16:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 164 Return-Path: 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=1756419459; bh=er1gtHJUz56J56dC6eV12bbOcMY+OP00ZbFyyrIDPFY=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=PTC+UZuF+bvjZDL7ID6USSDhPFVkIAQFx/uxK5sf1WukfQPokLJI8TnWMApZk8Nps 5XtFw43Gg/wDfWmAZJzeT+bzKK03WK1K19E7vCmyCWYReYBoRLHAOJwWXfmEvCUXgV 2kOXXis9lQcpkykh/1s/pgaLvb98dtYvYzmHvbpqw3N7+QQDmh1PXhFnQqk3M14nLT EhuUzeQo96GpQ23O2rixzhbTUQIo9BDbHixok5Ed5TGmCZmyhlvQ67PXHdWeixgR+v Ly1ECZM3hJzucObTkd9QdxxaiGAs2uYiP8hzPfAOEzqm/wZ1V5zUZGBzecNCUSqpeM U5EA9Ib8MuGCQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0E72E5FC79 for ; Thu, 28 Aug 2025 16:17:39 -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 WKX81k2wNPTc for ; Thu, 28 Aug 2025 16:17:38 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756419458; bh=er1gtHJUz56J56dC6eV12bbOcMY+OP00ZbFyyrIDPFY=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=M5urdEdV5neH5q+C7FAtGs7YqQYlPVoslOMGkV1WTMy3Zn4f1xIjoSI7Ti4B8tkrh 5a98kByjjH6hIQLN0c2ak1XBszJt9hh/ZGCWLiHpKU2iiExb/fGT5JGuXQy6Kspyyp UoCX1qdltle4Dq6FPldaFtshQ6T2uxO2FpyegUPz7JZADn8AEvtjKQhkAKGsR3no0T ShWmlVyDZ5DeeE/ifexI7xshbHxA/e09h38CsFZvW0M5t86SHaBFsI8vdHPZyMc2xi 5jHMHR+3eilVRbCSe0N2amsvVv+rCo/xElDAJn3cw/+WTD5Pg992OPOkGBYXttUuTk Bnj9STLQTHM3Q== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id F0B91675BB for ; Thu, 28 Aug 2025 16:17:38 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756419457; bh=lRLQOvLRfjLrILJnMvQZt3Ot9/ZjKlsLqGdTD6agemE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cOMZiGoTtLeSnnS/+qJDrnJkZCXAegFzkJdfQ/Y2T6xfszRC1A9Pbgq5dB43hCygG zxIWlutU2AotQi7x4tHUIaCCfxSE8AGl+w77IrN7aAMBfWU571woE+flqcgE3P74Ul DW6mODHt+Z6IaHHcm4dWxiVSMKywanEb1z3goyipAoj86WC+Cyjc3W27jRkXJViXaN IBYvsvljT3Yf7uPhGXZRPOoUtyatVudVQNubm5fHQglwnXVpKB3/8xTWjTsBRWQp49 mpa06QiriemLFK50PTh0F8ypQSaNFEm4d/DhlhtWwrtCm8iI18aq1Tq/iQnycGJA9h AuqcSbnN1x8nA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 43423675BB; Thu, 28 Aug 2025 16:17:37 -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 iQH_YGVsRMLp; Thu, 28 Aug 2025 16:17:37 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756419453; bh=CZXjnFDBVPSgL/AAfpdse4WmLkBTjusqu0cV1S9l7gA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n7+jB985J2uJKpnPhm8I0O/HfcVgJwLSStCOOlzJUmjw4JaMdGxjSZy0Maq+U+BSU HjyH4s2yIG6vO5Xj1fUDIGCUs/NzkeBPJFjJF8HAH3HZv1FITFjEgZAfiim+KgbrDV aS7NK73y6Yr8yAoTBIneIimJstbwMAFsSwaHZmKHDp90fM8UWCNKG6OFFudTrEGLpR nSfFNei7qEbVVBK4YYyq3TODpSxxbnkXAIEcZLW1eZ+C9Nkor4YTq184aD3EIcPMO3 v42Yhi0yS3OpPuqNz+5Pon2EPJt/zYEcvmSf5WictrICHPtTcXET4NQIxWwHcuU2zN dSPkJkFu7NdYQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id E2B8567764; Thu, 28 Aug 2025 16:17:32 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 28 Aug 2025 16:16:47 -0600 Message-ID: <20250828221713.3218908-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250828221713.3218908-1-sjg@u-boot.org> References: <20250828221713.3218908-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: RP5S2Z3HFTGXNANVLVXVZCMYJ6UEYYA3 X-Message-ID-Hash: RP5S2Z3HFTGXNANVLVXVZCMYJ6UEYYA3 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 , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 1/8] efi_loader: Drop unnecessary efi_dp_str() List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass This declaration already exists in efi.h so drop it from this header. Signed-off-by: Simon Glass --- include/efi_loader.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/efi_loader.h b/include/efi_loader.h index 52314c33533..57bf508adb9 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -302,8 +302,6 @@ extern const struct efi_hii_config_access_protocol efi_hii_config_access; extern const struct efi_hii_database_protocol efi_hii_database; extern const struct efi_hii_string_protocol efi_hii_string; -uint16_t *efi_dp_str(struct efi_device_path *dp); - /* GUID for the auto generated boot menu entry */ extern const efi_guid_t efi_guid_bootmenu_auto_generated; From patchwork Thu Aug 28 22:16:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 165 Return-Path: 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=1756419463; bh=knA5UzKNKyBdO0CK2kbUh7xe/8XPsvp2F6LHkYkRANg=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=rOUS+fgTz/2tpSpdpK3pOAY1flbKjJU3X+Dwz79uR1rg63FM7ih7QYPL4vHdGPWps XHcIeAU8ScngICbvY/UgqxuaO+wxHGcwpnXe87PJgpxdiFuxHzjT2qk6YsXyrY8zEl 6ePAW5lfKAkf8Co2nluVfz062RQx69adK4k8aFBu5gt84Fa93psbw8tnzxgmBU0nLE MvLioqLsaHRG/pY5ernhsSW1PqqST7t2kl3/9mRwEDs9Wes4Mh0yFMgRV3GD9B7e2q uakuAJ/b4ctIW0r3o8H0YE/sX4yo5ap52FCZSVRDwvzNaiH4B8+8tJamghFrvASGEg dOh78UMm2NMvw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CEDE9677FE for ; Thu, 28 Aug 2025 16:17: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 10024) with ESMTP id Zyy7KulVGPZ3 for ; Thu, 28 Aug 2025 16:17:43 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756419463; bh=knA5UzKNKyBdO0CK2kbUh7xe/8XPsvp2F6LHkYkRANg=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=rOUS+fgTz/2tpSpdpK3pOAY1flbKjJU3X+Dwz79uR1rg63FM7ih7QYPL4vHdGPWps XHcIeAU8ScngICbvY/UgqxuaO+wxHGcwpnXe87PJgpxdiFuxHzjT2qk6YsXyrY8zEl 6ePAW5lfKAkf8Co2nluVfz062RQx69adK4k8aFBu5gt84Fa93psbw8tnzxgmBU0nLE MvLioqLsaHRG/pY5ernhsSW1PqqST7t2kl3/9mRwEDs9Wes4Mh0yFMgRV3GD9B7e2q uakuAJ/b4ctIW0r3o8H0YE/sX4yo5ap52FCZSVRDwvzNaiH4B8+8tJamghFrvASGEg dOh78UMm2NMvw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B63FF6779A for ; Thu, 28 Aug 2025 16:17:43 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756419461; bh=Py2P7BtZOcTqliW/nOUdL1u45KI7pYIJqlgYGu/RMgQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AsA/0TkA+JujrFKPjTwjnnTHQ6VJgxg9hX8JXunz1vyUoUdFN75b5YwZ8NuYaVXxh M5/EHbVVoXqU4zg1BN4LgMj9mMWClxdwg/OAV9hGCxdeKbX5J5Le/a4Ti+2z0Cv1Es dLUm8rksj6gii5jqNd3DokFnb8h/8p6LrSngFoxEsaNim8bWP8L6gbsVd0YtvsTpJr lTi6cAQwPmp0tQU67jhYM7mSxEAIGnQBYt5rZRBCopatJMq0BTUS6bkxF3UdKfulg0 kAMMwqc8tbwl4gB74hSMdar5Oxx0SUS7gqcw5rUv5r2rW/HSjGSO8yke/bCjK2JxfM 8SHBKbEBgRZhQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4DAF1677FE; Thu, 28 Aug 2025 16:17:41 -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 g16RfWvrOXN0; Thu, 28 Aug 2025 16:17:41 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756419457; bh=74ppcKW0O3GVorGv8AhPuBvAT/nsWF36l1WE1ojbHmU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vBONv3Hhh56kewerAaQXU46nmLzwuOqHYlCjWBr8XlRsAyJ/opl8MhK+KPu8b06vz +EVK7mn3+GM8e3YvwW4L3NTkgY3JEFsGkmQbgDSKGV9Ui+jVFlmv75LRQSrfzq2jrt ehboK5kld8a0fbnDZKFpGalUB1tQ2BL5PkpGzflPi+XBpBfGvHCi8E3l3v3CB0Vvit xO93viTGtgTREFII4ZTVhStn3KCg69q+cU1TPwakj1+1JRr0XDYI7P+umR6gdny5n0 W8K8V6zpeWCENwrhca/ypY/lJHXk1szl6RuwP3l+wbr6D03CBar5U282ksbqmv1qch u60D/HXbt9pww== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 852F067764; Thu, 28 Aug 2025 16:17:37 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 28 Aug 2025 16:16:48 -0600 Message-ID: <20250828221713.3218908-3-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250828221713.3218908-1-sjg@u-boot.org> References: <20250828221713.3218908-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: UUDBQLHGP5HD4667GAP2K7UDB5WOEDUH X-Message-ID-Hash: UUDBQLHGP5HD4667GAP2K7UDB5WOEDUH 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 , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 2/8] efidebug: doc: Indent the media output correctly List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass The lines after the 'edidebug media' command are only intended three spaces, but it should be four. Fix it. Signed-off-by: Simon Glass --- doc/usage/cmd/efidebug.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/usage/cmd/efidebug.rst b/doc/usage/cmd/efidebug.rst index 29167dfa394..5dd68a689a6 100644 --- a/doc/usage/cmd/efidebug.rst +++ b/doc/usage/cmd/efidebug.rst @@ -49,11 +49,11 @@ Example This shows checking the EFI media devices:: - => efidebug media - Device Media type Device Path - ------------------- --------------- ----------- - efi_media_1 ahci PciRoot(0x0)/Pci(0x3,0x0)/Sata(0x0,0xFFFF,0x0) - efi_media_2 pci PciRoot(0x0)/Pci(0x5,0x0) + => efidebug media + Device Media type Device Path + ------------------- --------------- ----------- + efi_media_1 ahci PciRoot(0x0)/Pci(0x3,0x0)/Sata(0x0,0xFFFF,0x0) + efi_media_2 pci PciRoot(0x0)/Pci(0x5,0x0) This shows checking the log, then using 'efidebug tables' to fully set up the From patchwork Thu Aug 28 22:16:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 166 Return-Path: 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=1756419466; bh=butLb6FUxrc1ttTlkNzEw0T4j3j0fpuHfIud2/BKdMg=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=d9xlqQzHJqy+ixJwyZofgMwyHKlP9DaDARGnBgNuZLcSUdupRlFgi6vljvw900lq9 ZNQbsj4uVhTuBhrluKZyFNcNIhgZtOWXNHLS+tr9iF8AGxsX82wZVVXK0IJFNXTYbn mxTYGwhV3lce61pBNZWOXagoDBWaJsEUKKjHOKPYWmkSvClU4IQrpMoDRp9QwQV1Zt kLxA0cp5CKxCTMtMACXLeS1SnyYRw8DDXpDf1KSjYYA2epJzoAF3HLwxGkxpyOIj7e FQFRhvc9OVKhcsoGnwgxuzGoZhDsOWD1W6vAWcbnNs5wYi/t+P3gz1cixjvM7k+LnP KtGu+jkbH9KEw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2A7BF67853 for ; Thu, 28 Aug 2025 16:17:46 -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 JqXcnmeN1ovP for ; Thu, 28 Aug 2025 16:17:46 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756419464; bh=butLb6FUxrc1ttTlkNzEw0T4j3j0fpuHfIud2/BKdMg=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=r/VTUIDPPWWFwP2nMPZHy4iStp/P8a7h6QrhgIYq9CnCIPnMjE0V0YuzUS750gtPk gKtEKJGdt+/8yTyGSWRjpIheNW0MoNElwOX9mzL5sFOY0DmwW1EkVfXAQUwKVqfp9X nhDBvUPlcYAtpK7IFsl1d1xOHmy2maqBqTcl2goFpHXXpe5p6veloktnTJu1wWsceo HSvdD1lOhk1wV49fHZ2v6y0+YFnTGYrG62sFoZkl528W2kYu/wJpMNlRXuMtWlE6AY +kpPIyGSopqPHFFYLKDqZSRCvYa8EH9iWvDU6GQ/PNIDwAlkX570TV61m1uHwn7sQJ 8ZQk3u2ApEJ9g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2A87D6783F for ; Thu, 28 Aug 2025 16:17:44 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756419461; bh=kEJZUJ5oP4yKzMvCdtgrFqREXV4pPoA7js3DxpJn8ao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qsRoN2eniXhRuvUM0kZbjHJkdFbJWWu5iXXduRlbbC84SUWlytkAfa364/3pOS/hU znCUKzZs4LPBN/wrFSSXgKmzS4h52OQ2rmEKE2gg6FdYLkNy9sn7JFpalgIUpFUo3e 2LvqxzCVr3z0LAU8DySycppS4gpzuWHOmlzIpVJXqn3TEvd1Pvo60xq5jbdn1WtQXA RY3mRY4DcoPwc612+Wm73C2W7NtMaSPHWNz4KTgOYX9L+ex6v4IHA/EG5uwDgBqX2n Q5JBhW42pgt4+5+WtRgaKW5hZBkyg6Z0CDb680SyjIZ2Y4HNnpE+aA4a+TEWFHG4Nc aVCNdxqR3lJuA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5F0DD67764; Thu, 28 Aug 2025 16:17:41 -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 uP1To7l5Ltmb; Thu, 28 Aug 2025 16:17:41 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756419459; bh=wsh07aTKHJWSgNLkZWMd1K3DXOl0fVqp+ndk9F0axHc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PVsPpOw1WXFhR5DHaQfsvGZhudkh9+LgQhLbo3teOLUreqeaT/2aFl7+oAO+OsU4D XTqT4xwFK51neJYST+EVQpYeqzuDowbYUq2GOdUeb44FQBxoKBpbIc/IpmkMkNZKVH ws0rYfCNfENqlFjE5gRNY0gaP98l8Z1DcQYFzbKiInevWzB60Rih2++lHyQU83okLI VdV54VK/t/+LjaKThYkqLaUm0BclMktV3TBuyRkfpqBJF3HAgIAfrNeD4ix2xRQ4r3 wa2LCgDQ8RmUSv9oC4JRV+3YD54GvFMgURWhis123RU2XTdbN5ahmxspTSvkIexKDD 4vSY7eH+CSa1w== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 8BD9F675BB; Thu, 28 Aug 2025 16:17:39 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 28 Aug 2025 16:16:49 -0600 Message-ID: <20250828221713.3218908-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250828221713.3218908-1-sjg@u-boot.org> References: <20250828221713.3218908-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: R45I7LGRSX3HPK4BYZO23Z6KJQJ26EHE X-Message-ID-Hash: R45I7LGRSX3HPK4BYZO23Z6KJQJ26EHE 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 , Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 3/8] doc: efidebug: Support sorting with efidebug memmap List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Provide a -s option to sort the memory map in order of address. Add documentation while we are here. Also fix an errant extra line before do_efi_show_media() Co-developed-by: Claude Signed-off-by: Simon Glass --- cmd/efidebug.c | 50 +++++++++++++++++++-- doc/usage/cmd/efidebug.rst | 92 +++++++++++++++++++++++++++++++++++++- 2 files changed, 138 insertions(+), 4 deletions(-) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index f88da42c2c4..71b99f9c8d7 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -655,6 +656,25 @@ static void print_memory_attributes(u64 attributes) #define EFI_PHYS_ADDR_WIDTH (int)(sizeof(efi_physical_addr_t) * 2) +/** + * efi_memmap_sort_by_addr() - compare two memory descriptors by address + * + * @a: first memory descriptor + * @b: second memory descriptor + * Return: -1 if a < b, 0 if a == b, 1 if a > b + */ +static int efi_memmap_sort_by_addr(const void *a, const void *b) +{ + const struct efi_mem_desc *desc_a = a; + const struct efi_mem_desc *desc_b = b; + + if (desc_a->physical_start < desc_b->physical_start) + return -1; + else if (desc_a->physical_start > desc_b->physical_start) + return 1; + return 0; +} + /** * do_efi_show_memmap() - show UEFI memory map * @@ -676,6 +696,25 @@ static int do_efi_show_memmap(struct cmd_tbl *cmdtp, int flag, int desc_size, i; efi_status_t eret; int ret; + bool sort_by_addr = false; + int num_entries; + + /* Parse arguments */ + argc--; argv++; /* skip command name */ + while (argc > 0 && argv[0][0] == '-') { + if (!strcmp(argv[0], "-s")) { + sort_by_addr = true; + } else { + printf("Unknown option: %s\n", argv[0]); + return CMD_RET_USAGE; + } + argc--; argv++; + } + + if (argc > 0) { + printf("Too many arguments\n"); + return CMD_RET_USAGE; + } if (IS_ENABLED(CONFIG_EFI_APP)) { uint key, version; @@ -692,6 +731,12 @@ static int do_efi_show_memmap(struct cmd_tbl *cmdtp, int flag, desc_size = sizeof(*map); } + /* Sort entries by address if requested */ + if (sort_by_addr) { + num_entries = map_size / desc_size; + qsort(memmap, num_entries, desc_size, efi_memmap_sort_by_addr); + } + printf("Type Start%.*s End%.*s Attributes\n", EFI_PHYS_ADDR_WIDTH - 5, spc, EFI_PHYS_ADDR_WIDTH - 3, spc); printf("================ %.*s %.*s ==========\n", @@ -1594,7 +1639,6 @@ static int do_efi_test(struct cmd_tbl *cmdtp, int flag, return cp->cmd(cmdtp, flag, argc, argv); } - /** * do_efi_show_media() - show EFI media devices * @@ -1807,8 +1851,8 @@ U_BOOT_LONGHELP(efidebug, " - show UEFI log\n" "efidebug media\n" " - show EFI media devices\n" - "efidebug memmap\n" - " - show UEFI memory map\n" + "efidebug memmap [-s]\n" + " - show UEFI memory map (use -s to sort by address)\n" "efidebug tables\n" " - show UEFI configuration tables\n" #ifdef CONFIG_EFI_BOOTMGR diff --git a/doc/usage/cmd/efidebug.rst b/doc/usage/cmd/efidebug.rst index 5dd68a689a6..8c8a4895197 100644 --- a/doc/usage/cmd/efidebug.rst +++ b/doc/usage/cmd/efidebug.rst @@ -15,6 +15,7 @@ Synopsis efidebug log efidebug media + efidebug memmap [-s] Description ----------- @@ -22,7 +23,7 @@ Description The *efidebug* command provides access to debugging features for the EFI-loader subsystem. -Only two of the subcommands are documented at present. +Only three of the subcommands are documented at present. efidebug log ~~~~~~~~~~~~ @@ -43,6 +44,15 @@ driver subsystem would likely handle the device (e.g., "ahci" for SATA drives, device, which can be useful for debugging boot issues or understanding the system topology. +efidebug memmap +~~~~~~~~~~~~~~~ + +This shows the UEFI memory map, which displays all memory regions and their +types as known to the EFI loader subsystem. This includes information about +memory allocation, reserved regions, and available memory. + +The command supports an optional '-s' flag to sort the memory map entries by +address, making it easier to visualize the memory layout in ascending order. Example ------- @@ -55,6 +65,86 @@ This shows checking the EFI media devices:: efi_media_1 ahci PciRoot(0x0)/Pci(0x3,0x0)/Sata(0x0,0xFFFF,0x0) efi_media_2 pci PciRoot(0x0)/Pci(0x5,0x0) +This shows checking the UEFI memory map, first unsorted and then sorted by +address:: + + => efidebug mem + Type Start End Attributes + ================ ================ ================ ========== + CONVENTIONAL 0000000040000000-0000000044000000 WB + BOOT DATA 0000000044000000-0000000044020000 WB + CONVENTIONAL 0000000044020000-00000000475ee000 WB + BOOT DATA 00000000475ee000-0000000047610000 WB + BOOT CODE 0000000047610000-0000000047647000 WB + BOOT DATA 0000000047647000-0000000047ef2000 WB + BOOT CODE 0000000047ef2000-0000000047ef6000 WB + BOOT DATA 0000000047ef6000-0000000047ff7000 WB + BOOT CODE 0000000047ff7000-0000000047ffa000 WB + BOOT DATA 0000000047ffa000-0000000048000000 WB + CONVENTIONAL 0000000048000000-00000000e0000000 WB + LOADER DATA 00000000e0000000-0000000100000000 WB + CONVENTIONAL 0000000100000000-000000013c278000 WB + LOADER DATA 000000013c278000-000000013c27c000 WB + LOADER CODE 000000013c27c000-000000013c3e0000 WB + ACPI RECLAIM MEM 000000013c3e0000-000000013c3f0000 WB + RUNTIME CODE 000000013c3f0000-000000013c470000 WB|RT + RUNTIME DATA 000000013c470000-000000013c630000 WB|RT + RUNTIME CODE 000000013c630000-000000013c730000 WB|RT + CONVENTIONAL 000000013c730000-000000013dc2a000 WB + BOOT DATA 000000013dc2a000-000000013e9f1000 WB + CONVENTIONAL 000000013e9f1000-000000013e9fe000 WB + BOOT DATA 000000013e9fe000-000000013ea1c000 WB + CONVENTIONAL 000000013ea1c000-000000013ea1e000 WB + BOOT DATA 000000013ea1e000-000000013ea47000 WB + CONVENTIONAL 000000013ea47000-000000013ea48000 WB + BOOT DATA 000000013ea48000-000000013f624000 WB + CONVENTIONAL 000000013f624000-000000013f731000 WB + BOOT CODE 000000013f731000-000000013fc00000 WB + RUNTIME CODE 000000013fc00000-000000013fd90000 WB|RT + RUNTIME DATA 000000013fd90000-000000013ffe0000 WB|RT + CONVENTIONAL 000000013ffe0000-000000013ffff000 WB + BOOT DATA 000000013ffff000-0000000140000000 WB + IO 0000000004000000-0000000008000000 UC|RT + IO 0000000009010000-0000000009011000 UC|RT + => efidebug mem -s + Type Start End Attributes + ================ ================ ================ ========== + IO 0000000004000000-0000000008000000 UC|RT + IO 0000000009010000-0000000009011000 UC|RT + CONVENTIONAL 0000000040000000-0000000044000000 WB + BOOT DATA 0000000044000000-0000000044020000 WB + CONVENTIONAL 0000000044020000-00000000475ee000 WB + BOOT DATA 00000000475ee000-0000000047610000 WB + BOOT CODE 0000000047610000-0000000047647000 WB + BOOT DATA 0000000047647000-0000000047ef2000 WB + BOOT CODE 0000000047ef2000-0000000047ef6000 WB + BOOT DATA 0000000047ef6000-0000000047ff7000 WB + BOOT CODE 0000000047ff7000-0000000047ffa000 WB + BOOT DATA 0000000047ffa000-0000000048000000 WB + CONVENTIONAL 0000000048000000-00000000e0000000 WB + LOADER DATA 00000000e0000000-0000000100000000 WB + CONVENTIONAL 0000000100000000-000000013c278000 WB + LOADER DATA 000000013c278000-000000013c27c000 WB + LOADER CODE 000000013c27c000-000000013c3e0000 WB + ACPI RECLAIM MEM 000000013c3e0000-000000013c3f0000 WB + RUNTIME CODE 000000013c3f0000-000000013c470000 WB|RT + RUNTIME DATA 000000013c470000-000000013c630000 WB|RT + RUNTIME CODE 000000013c630000-000000013c730000 WB|RT + CONVENTIONAL 000000013c730000-000000013dc2a000 WB + BOOT DATA 000000013dc2a000-000000013e9f1000 WB + CONVENTIONAL 000000013e9f1000-000000013e9fe000 WB + BOOT DATA 000000013e9fe000-000000013ea1c000 WB + CONVENTIONAL 000000013ea1c000-000000013ea1e000 WB + BOOT DATA 000000013ea1e000-000000013ea47000 WB + CONVENTIONAL 000000013ea47000-000000013ea48000 WB + BOOT DATA 000000013ea48000-000000013f624000 WB + CONVENTIONAL 000000013f624000-000000013f731000 WB + BOOT CODE 000000013f731000-000000013fc00000 WB + RUNTIME CODE 000000013fc00000-000000013fd90000 WB|RT + RUNTIME DATA 000000013fd90000-000000013ffe0000 WB|RT + CONVENTIONAL 000000013ffe0000-000000013ffff000 WB + BOOT DATA 000000013ffff000-0000000140000000 WB + => This shows checking the log, then using 'efidebug tables' to fully set up the EFI-loader subsystem, then checking the log again:: From patchwork Thu Aug 28 22:16:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 167 Return-Path: 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=1756419466; bh=5AzB/ZwYGfPaeh3g4Wt5yuhC3y0gWuDbf6wd6PPiE9U=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=UVUYLtouq0LjVjitRJYpz0KCSqRPXnYCkvvessxetuJV+4DuRDQIJOmg8Q1UuD5Kj PHEjgFXk3OWZf9mVK4XMVo1FR6DFGSwL3MiUewiRvNnDTe2gquBcwSl1ABdpTc774x W7uBRI5Gfh84fexm934T/0hze6+0Kea9WxZ7IBifNyN34DiivqPwR5Cvl3qaTHlFQT nJJMRctZ2aDPuR4bTGWUtweVlOqUADdk382NwITBnMS9ongP1RldCeIJZtRWU/4Ttz w50O9EpFTzySPYlZKOjufTHXsl0P5vxc3UVQ/pd7STd9Ug+3Pudp7fQoA7LbK69H5f 8KNV/xSCDL/gA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 60DE36780C for ; Thu, 28 Aug 2025 16:17:46 -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 W7_YxdaJRf1M for ; Thu, 28 Aug 2025 16:17:46 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756419464; bh=5AzB/ZwYGfPaeh3g4Wt5yuhC3y0gWuDbf6wd6PPiE9U=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=TACv2uZSR1eFLQzboBuMyP6i3QfY4O3F0zHW0/3BtWp4FGnTEMUuzd/Nevt0v95mS qYgngQoKoQdEamAY3ZyQxwItNkivI7uP1yXf1Po+gc3w1ewn3duANMXQKkEGsyfNYh UTWSL8G2nAAclvZTHAeuDvz3jygiy32Hrd5ividJJ6m/4tbtf+ItbkAagfSo3YtI5B uoByB1DFgX+OmYKf201Jy/y7iS+Z3ZPQ8gfl93QcVenISmHzQJRZSUexWnoGowJ9TF AoseCIXy2cqDMrCgHi7yZNkM+VxtRqiU5Y7EzVH2WFsGv9tXhAtukhyPAlyZDQvUOY eyXovK6hjc6Ig== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 91C0467845 for ; Thu, 28 Aug 2025 16:17:44 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756419461; bh=4qtKfzHCrurzWpAUmFVfrxfFEmTndO26hGgk30gx3ZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BOMN/tPcJzRZ4NIhl2jIKfr/44nG6uiiYkwQ2PCdssJ6xddvAq48GSwUoq3IjVDIE eRRTtAK64oMOpR2SeUJsubp4IGfP6SJUI9pqJTYlpbuozuQD8cjbg3xWuAFrw+IXbZ /opptqn3uD2fwtTOnmxBM4JUi5cSn8QvIxhlb9ZYYKI6xI1SBvIjrXfH+o7xtbBxW/ /3D+UxoSszEeH4etCPo9FKmdMz9y0wb0q1ObkGmkMSKrBHhV5y7MenRu1BK4r1C8ur PXURyvyVDkQawtam+QMoncgb5ZKmMJ2KzS4mw1JGE5y4olqad/1gDqXDUjf7uaoNiz NXWJ8lkgg7MXw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6369B675BB; Thu, 28 Aug 2025 16:17:41 -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 4GC64U3NfEBO; Thu, 28 Aug 2025 16:17:41 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756419460; bh=sql918ssWRevMrFSo2h0G7tI7o4fewLignoXod4k1nw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lrvb5FOooZNwzZGgkAyaVzP2cbfKfKcyZtwLiNn5CT5jnWj6QLRiwwlmXxogG8HfJ Qx0BX4VpJiizIEyWM2eNy6w45kwqJylgxQPEQb6l/31ZRsirloA/36pF49URqxH+Xg sAcv5li+R0ThxQN0l6hxMNhT7axjXfm/voBdkRynr+6YPXHP7LRsLpd4gOtQkkX40w 8L0/ojAZx+vBKduyAusxlxG5PgpXz8epA5loF1gZTzlbakMlLpB/OfPnotYmFqUSEk zGqDyZ8dxnLrbiNDQLmWmbs1A8nzKe+i5B07UGYOVfWs8Vg7hyINRYHoop7gDuB0+e tJ25/iM9wS2DA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 910E35FC79; Thu, 28 Aug 2025 16:17:40 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 28 Aug 2025 16:16:50 -0600 Message-ID: <20250828221713.3218908-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250828221713.3218908-1-sjg@u-boot.org> References: <20250828221713.3218908-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 6K7VSJXFXMHRZAF6SVXO224EJCHEPZ6O X-Message-ID-Hash: 6K7VSJXFXMHRZAF6SVXO224EJCHEPZ6O 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 , Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 4/8] doc: Add documentation for about efidebug boot List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass So far this subcommand is undocumented. Provide some notes. Also show a better error when 'efidebug boot rm' fails. Co-developed-by: Claude Signed-off-by: Simon Glass --- cmd/efidebug.c | 7 ++- doc/usage/cmd/efidebug.rst | 97 +++++++++++++++++++++++++++++++++----- 2 files changed, 90 insertions(+), 14 deletions(-) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 71b99f9c8d7..3f956fea31a 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -1166,9 +1166,12 @@ static int do_efi_boot_rm(struct cmd_tbl *cmdtp, int flag, guid = efi_global_variable_guid; for (i = 1; i < argc; i++, argv++) { - id = (int)hextoul(argv[1], &endp); - if (*endp != '\0' || id > 0xffff) + id = (int)hextoul(argv[i], &endp); + if (*endp != '\0' || id > 0xffff) { + printf("Invalid ID '%s', use '0001' for example\n", + argv[i]); return CMD_RET_FAILURE; + } efi_create_indexed_name(var_name16, sizeof(var_name16), "Boot", id); diff --git a/doc/usage/cmd/efidebug.rst b/doc/usage/cmd/efidebug.rst index 8c8a4895197..a739f6b4e06 100644 --- a/doc/usage/cmd/efidebug.rst +++ b/doc/usage/cmd/efidebug.rst @@ -13,6 +13,11 @@ Synopsis :: + efidebug boot add -b