From patchwork Tue Aug 19 18:58:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 14 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=1755630052; bh=pmZZQvu2x6L5iuHeVxvgCm1bQg7+b4uPxywkXevWU2s=; 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=fkfPFXTXsC4kCwetO6tBXf8RCW4HZGxKZn+8dd7bX2rqVKlxN5lHq5e76xDJpTXW/ 8sLZN5ReZe20c1vH128cNYAzWx8stn5NCXSasu4rOtu72LaHUEI29nnmYIYuqxT3Xt HIR6Dc1FhmOphNe88CuMC6joniNdtNGnKfTpVr+mNTkzEFjnuJrcEXm9fkGKpA7n1w lIcrGxEaj5Ccn8HJcZHN3pGl2xcO8V91D0qovD8SDCg+R4TeJd9N0LD0SHO5fzAgs1 zcz0tRbbLonHA9IYW2B0hFc/CiQJyf2OcrAhZAkZvOoTCoTJ/pzTiCNwCwBW5skeJZ DKcACaEAAWnDg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B981067608 for ; Tue, 19 Aug 2025 13:00:52 -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 7ViWX-aQwkIZ for ; Tue, 19 Aug 2025 13:00:52 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755630052; bh=pmZZQvu2x6L5iuHeVxvgCm1bQg7+b4uPxywkXevWU2s=; 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=fkfPFXTXsC4kCwetO6tBXf8RCW4HZGxKZn+8dd7bX2rqVKlxN5lHq5e76xDJpTXW/ 8sLZN5ReZe20c1vH128cNYAzWx8stn5NCXSasu4rOtu72LaHUEI29nnmYIYuqxT3Xt HIR6Dc1FhmOphNe88CuMC6joniNdtNGnKfTpVr+mNTkzEFjnuJrcEXm9fkGKpA7n1w lIcrGxEaj5Ccn8HJcZHN3pGl2xcO8V91D0qovD8SDCg+R4TeJd9N0LD0SHO5fzAgs1 zcz0tRbbLonHA9IYW2B0hFc/CiQJyf2OcrAhZAkZvOoTCoTJ/pzTiCNwCwBW5skeJZ DKcACaEAAWnDg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A8C2867607 for ; Tue, 19 Aug 2025 13:00:52 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755630050; bh=2yJpcPGyvrmADR8VQMZLpg42nq8AeP+vREMrb84iEVU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AVGD/45bSg/wPEvq+jGffBtRGsnUj87HXaqZ01P1TdiSFhIaWHhpSb15ZZ4ubVAYU 8KFAWRVheFViEH+B5zE0YaEyy2FHvVKtjRmaWNjm8JwrhjYZatAOu4lGke6IRrpAQA P1/8dLQx4sDRS32w89WY3p7oJRPF8nV1wkpIVd+8QjcinynQukLIbXzw7SigEG5Pvw 3BycTCASM7QxUuQ0bvYGegDxoiAnKIIE2NvLJfP/GJNI5BC+L6pPZ5Q7ITfd0NL0dU BCK1sLnDGqRbZMh3zxXsv04uDDRL1ik4K6V/YMrW2eQ+uQFw81WzL2XM+GHe9Szwsa qB1avmixNoWWA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id ABE1C675DE; Tue, 19 Aug 2025 13:00:50 -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 V83XUAkzcsG6; Tue, 19 Aug 2025 13:00:50 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755630049; bh=W+dUUulFiq+YYVPC6WolLp/Bi1+stalAkUqwhfWAvto=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qLqCGJYfbhODFY0oppXEPfjutVdvETh+vTNFHDbAAV40TJ+Lkifn0qMhotdIeaZaT qePVWWiiBpPzA2hERD/wBas4Rq9wfKmHcsEX+0pr02fV7qmdfmhOCZb4A7BbXGOKYz ABijrOcahj78DKqNud7OHMxoIDu1CfFmiy3cN85mr5BBN+3yq2n2ylKqLd7Alz0qfM dGq0e7wl3DImJprkhYV7/9Vt2uY+99zL8e3wQtTEusxXbiMLaQK8y/a8Br5s8ITIi1 p8rETM6WC/k6awm2f9gONrmgFg27wz9JAnDlIlSdDZgnsPcKFLKs6O6tOkyQqjeSuc 6mbTDvsFX5vXA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id ED212675F3; Tue, 19 Aug 2025 13:00:48 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Tue, 19 Aug 2025 12:58:43 -0600 Message-ID: <20250819185900.835939-13-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250819185900.835939-1-sjg@u-boot.org> References: <20250819185900.835939-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: ZISARD4744AH6F4VWH2JMFDVGPY3SE7D X-Message-ID-Hash: ZISARD4744AH6F4VWH2JMFDVGPY3SE7D 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: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH v2 12/22] efi: app: Tidy up some stale comments in setup_memory() 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 A few comments are out of date. Drop the one about global_data_ptr and reword the one about memory above 4GB. Signed-off-by: Simon Glass --- (no changes since v1) lib/efi_client/efi_app.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/efi_client/efi_app.c b/lib/efi_client/efi_app.c index 75ebe3a9719..764e562692e 100644 --- a/lib/efi_client/efi_app.c +++ b/lib/efi_client/efi_app.c @@ -92,11 +92,6 @@ static efi_status_t setup_memory(struct efi_priv *priv) efi_status_t ret; int pages; - /* - * Use global_data_ptr instead of gd since it is an assignment. There - * are very few assignments to global_data in U-Boot and this makes - * it easier to find them. - */ ptr = efi_malloc(priv, sizeof(*ptr), &ret); if (!ptr) return ret; @@ -111,8 +106,8 @@ static efi_status_t setup_memory(struct efi_priv *priv) pages = CONFIG_EFI_RAM_SIZE >> 12; /* - * Don't allocate any memory above 4GB. U-Boot is a 32-bit application - * so we want it to load below 4GB. + * Try not to allocate any memory above 4GB, just for ease of looking at + * addresses. */ addr = 1ULL << 32; ret = boot->allocate_pages(EFI_ALLOCATE_MAX_ADDRESS,