From patchwork Sun Oct 13 10:55:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 835073 Delivered-To: patch@linaro.org Received: by 2002:adf:b352:0:b0:37d:45d0:187 with SMTP id k18csp1536723wrd; Sun, 13 Oct 2024 03:56:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXAmMDZcou1ZfAYdJMxgi5WISzaRcHBg1k6OhX1qwkc0nvxkLJVinmawtqU6DutWS10fMt4Bw==@linaro.org X-Google-Smtp-Source: AGHT+IHuiHqYupu8k8Pt9N5CWevOlQXY/ygZXfU57M0o8j/fjLIW0Rb/PHNFQDhrw4QmI3VFOJ0c X-Received: by 2002:a05:6e02:1786:b0:3a3:b1c4:8197 with SMTP id e9e14a558f8ab-3a3b6053e14mr59038565ab.23.1728817015286; Sun, 13 Oct 2024 03:56:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728817015; cv=none; d=google.com; s=arc-20240605; b=f8hzae5LI8qjRSY+nN7O1VivnREmgDK9DQVfTsheKaQMujT5JDii5ubGhdqjkBgKzQ 0bwD8CEnyPCrhWHPoe9+8Ko5mjQuKcILwR029/DfuueRVowb5yX9Lwy2z++Cmv8Oo2Ju SKkMOuv+fgX3BYVKkVeo0TfpYWUajUQaG/ZoULLh6xGfnLxaC6x2gAMN4hTRqRq4OIYr 3ICoaWK2h5YAKC9dnkgjZWuWjPfN+dUcPGMlcvbI/1hhmqOv2v9TCYcigEOmyAkY3rRY 5mv89OfPVDit7fEHbt+3+sDKYwTXRWq9t40NFZ8UAFGy0+yvD/WT2+DTyGnuWRPys55I P4Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=VshRzv1jIB03s2+pAVxUMWFpF9nITeXsGoA5eYGhIU4=; fh=DqKFq13hCy9hcb48ZltPVvgEKSF1g1c/m42wn0WwlIc=; b=MYjZkyG9KnD8GMxnVlquCGi3g/HkDBs3PSC0/pJ8I2SbAdLxwuNGBHPdBbnQbjV8uh W1FTXBdx3bAYfNsPVw1cYxO6henGTdAmr1u0A0/uGXIiH/dT2jRS8FxO6P+0OhdtxmRG N3cY/sI3dq/3/A1ecy6kapQi0zY84TBjA214B1+2yS+bceZVqpZeuesYsiydHTdvluB4 QX5HQllKIHtPBl6DsSAx+D9CO7xnac/fIa8VAWXPQOOayU0aeb0QX21Olc0AdTM0NtwA 11eNHXv0lfZ7zPbLa3wmShx1rnaOrKiQVfIArv/XjkEdfi193KxWFxE+9+aRse4Uv5XQ Rrtg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id 8926c6da1cb9f-4dbad9dadfcsi3643404173.78.2024.10.13.03.56.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Oct 2024 03:56:55 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 21A5F88F16; Sun, 13 Oct 2024 12:56:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id D371288F1E; Sun, 13 Oct 2024 12:56:05 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id D69BC88F0C for ; Sun, 13 Oct 2024 12:56:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C94991007; Sun, 13 Oct 2024 03:56:32 -0700 (PDT) Received: from a079122.blr.arm.com (a079122.arm.com [10.162.17.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A31933F71E; Sun, 13 Oct 2024 03:56:00 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Heinrich Schuchardt , Simon Glass , Tom Rini , Caleb Connolly , Jonas Karlman , Sughosh Ganu Subject: [PATCH v3 07/15] efi_memory: do not add U-Boot memory to the memory map Date: Sun, 13 Oct 2024 16:25:14 +0530 Message-Id: <20241013105522.391414-8-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241013105522.391414-1-sughosh.ganu@linaro.org> References: <20241013105522.391414-1-sughosh.ganu@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The memory region occupied by U-Boot is reserved by LMB, and gets added to the EFI memory map through a call from the LMB module. Remove this superfluous addition to the EFI memory map. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V2: New patch lib/efi_loader/efi_memory.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c index 41501e9d41..16e64987af 100644 --- a/lib/efi_loader/efi_memory.c +++ b/lib/efi_loader/efi_memory.c @@ -870,16 +870,6 @@ static void add_u_boot_and_runtime(void) { unsigned long runtime_start, runtime_end, runtime_pages; unsigned long runtime_mask = EFI_PAGE_MASK; - unsigned long uboot_start, uboot_pages; - unsigned long uboot_stack_size = CONFIG_STACK_SIZE; - - /* Add U-Boot */ - uboot_start = ((uintptr_t)map_sysmem(gd->start_addr_sp, 0) - - uboot_stack_size) & ~EFI_PAGE_MASK; - uboot_pages = ((uintptr_t)map_sysmem(gd->ram_top - 1, 0) - - uboot_start + EFI_PAGE_MASK) >> EFI_PAGE_SHIFT; - efi_add_memory_map_pg(uboot_start, uboot_pages, EFI_BOOT_SERVICES_CODE, - false); #if defined(__aarch64__) /*