From patchwork Tue Sep 2 15:21:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 172 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=1756826538; bh=kfcVighx6xCdlrqUKpP+Pw85nyAVMfzAe7Isa7nlv3w=; 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=iMT+NM6UondCf4B4PlzjI+BxSy66AIpRNu0I2ZE6oIMQfVbyuWl20c5urLN/GVwi4 jlTqmO2ApCHJkoJhaJJGooVptZTY73W9reYs/xI5y0RdfWFjZR2BCdIEqvV1U186zr YzhPZwKmzwboCS3A5D2LSbFTKdiVgQTtmvahk748HdN+mkL76eHmFyVnzXmH73/9kc qnvPf593Hyniu++K9MG6d7uATUayVB6C50Ih8+ChiZKzerKQ7O/m9994mBEr/xKS15 7HwdFZlFyEpMR/Y+LAR11cm4DY2C9otW6STdgZZ/BWYXXsTr8/8Dh9DUqYQX/TwM70 slSk04VzyTFhA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0E6A5678F0 for ; Tue, 2 Sep 2025 09:22:18 -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 5AoUvocMFtCg for ; Tue, 2 Sep 2025 09:22:17 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756826536; bh=kfcVighx6xCdlrqUKpP+Pw85nyAVMfzAe7Isa7nlv3w=; 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=UVp9O0mpVBdSV76cJcsWbNcE2HaRhEyaXHJU4kLfuLC2ToiCbE0ArojC4R3w4EWQW GVNxZd4S2Kw7CyRZAl9qg1d6eyAGh6fuVegaiKvVrn12J7K4UhZTkoOhhPt37ZZ46V Y2dSwQVtx3KZtzvpsTKQStT8D4uSuvNR982dSQmStjBD51/qocVaXsPTHP7Y8CA//M D73qo+HU8XOvLuNDh9PhT7w3jfqxhUBrCbLc9nde2Mx6ZdVKlkXFK5V8845f38h9Fn sruCIzB+B4CwTqnDXShrtAv01zXlwb1LhMpsOWqVPgk6GCg6/9KZsvMmwowkaUXTW9 UZ5a6z8Ci2uTg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7B1306788A for ; Tue, 2 Sep 2025 09:22:16 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756826531; bh=DJfbNLfAolVDMGCM9hsPnt6s01KVCKDFsqI5F2dKyPw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NmMJbBtPyQB7OTPXn9494KRuy3kB31KxhtQ+LN1s9knCsE/dSCEyz05Naq3DGU8JZ f1SnjNE7VaU5BrQWl/qE3wt4Spmb27As9BBl25Oyr6QdrpTXvboUfBGr8xGNzWatP4 zdJaW95mcYi+aLKYGW4h1keAbIAtJCRI5GP7sgYNFm0rW4Wb89MKCS1jQweyLL0Y4d 7hSaG4uRlV6kmrnUl2XWbtgEkA7VvKuNdZn/ROKY8bsvIotSHj5LooKFEgQ7ciuFSv fjdeLna8B0ptRHfgFztLL2+cSmiGuCUh8+onFmSKrbWfaxJnGDTd/RSrMSIFbZnTRD /rlH9O1zWzPPQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 67B3C5FE1B; Tue, 2 Sep 2025 09:22:11 -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 Tv8Niu5-qFxh; Tue, 2 Sep 2025 09:22:11 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756826530; bh=E4spLM9o5d+VKe8cMcf1Rp2nj2j4H56z8bPMC4jbx10=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WkWwoDnAycW6ggvVq5wYqynhDPFbukkLS3LsANrkS+LKIznz6Wo3vHN/Uk2sD/hAi 41CLGctJkJnS/unwMeoIlIs4hc6OCI3mwNflGA1FKfIhK2c3eecTtHa0b8fe6XtfoR W054/eczAdkVMbYItGRZGNZhwGFKQNDVDr+k9UCIoHBND3iA6RXkZjwoiDUXDDS1KI Bh4j8RnQUeZWD8lnyhSG1KP/XpnCyhjL48MyE4tWDyN5M37InKHqBh9uOigy7B11Nq AKzGcP0iDY1hu82+7DawwOAG6TlnRS+YLEfPtTqW6L2Oh0AxmyTHHRuzPiJ2Vb3oFf IV0PQdFoxipnQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 7A1B9677F7; Tue, 2 Sep 2025 09:22:10 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Tue, 2 Sep 2025 09:21:33 -0600 Message-ID: <20250902152158.2285264-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250902152158.2285264-1-sjg@u-boot.org> References: <20250902152158.2285264-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: HNOSU5VKXW6PPCVA2JGFJJAOQREBGUMB X-Message-ID-Hash: HNOSU5VKXW6PPCVA2JGFJJAOQREBGUMB 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 01/18] efi: Correct calculate_paths() when an image is used 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 device path is updated if an image is used, so move the setting of *device_pathp lower, to take account of this. Signed-off-by: Simon Glass Fixes: 73ad2d99093 ("efi: Move efi_bootflow_run() to a common file") --- lib/efi/run.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi/run.c b/lib/efi/run.c index 4f47743476d..1903d6f0b9a 100644 --- a/lib/efi/run.c +++ b/lib/efi/run.c @@ -46,7 +46,6 @@ efi_status_t calculate_paths(const char *dev, const char *devnr, if (ret != EFI_SUCCESS) return ret; - *device_pathp = device; if (image) { /* FIXME: image should not contain device */ struct efi_device_path *image_tmp = image; @@ -54,6 +53,7 @@ efi_status_t calculate_paths(const char *dev, const char *devnr, efi_dp_split_file_path(image, &device, &image); efi_free_pool(image_tmp); } + *device_pathp = device; *image_pathp = image; log_debug("- boot device %pD\n", device); if (image)