From patchwork Tue Oct 15 15:37:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 835450 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c8f:0:b0:37d:45d0:187 with SMTP id z15csp300874wrs; Tue, 15 Oct 2024 08:38:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUbBH9ZGgOuO1OrmL7wOb3YyYalzRq7aqeY+UGVMhBlrDro1I5RSkFYHjxiL916GqHGKMY1tQ==@linaro.org X-Google-Smtp-Source: AGHT+IGKCOzkuvsie7Q2ElhAsXkEGXmNJOlSoyM4iP+ONDG1P1bZEUZJER38QqzOqrpcg2XetDIc X-Received: by 2002:a05:6e02:13a8:b0:3a3:ab8f:a280 with SMTP id e9e14a558f8ab-3a3b5f784aemr150678475ab.1.1729006721888; Tue, 15 Oct 2024 08:38:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729006721; cv=none; d=google.com; s=arc-20240605; b=k9ETau1KGN9HnefrE4MLfOfzUKJzgSfaMXQ1J6tmbCb9tKfc2qBaQGI6M4Gsw3GoI4 Uvx+4E8jeCQnyF1J8jJODSRE4KLU2jRk2t/Vok7WEtodWUtS1P2g/QCBDTnyl+Z6eIoe ZzbiOUvAjZ3H9ovx/1fF86DDa136pF/BRsGongb9CNPaTUOe8uU18HMIEAz1KIsqbZTA 42yrZtGmPza4HkvzFFyd33A6ljPrT58ZRAsstfTbXyJH+BiAaso5GnttMrTi+lQRU9Sl FguJ9XDtKKsirQnm/kpoelifSPza/wjZ/vJJ4960IxPXF8ELPBehoCWerbZTAeIF+VRt yJ3w== 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=25DWLhJvjU7OudoBFUXhMMylWqhqfeRZ7LxflYfhYxA=; fh=MYvlzMqd61VHJORtkCu1tTA+qP9jRMJFkVEqSzDEdy8=; b=LzCawequgdx6rEc2wGY7nyTd+z/iIKQrMEblM9siIsXVeMyyITEaoksQlBlVkKE/+/ vEQioUK8bEz9kEb1Dkj8+h2KSGKGEwYSohPnpw2JPPwgYoZPKr+oj4DMacTil5zuuulz Xa479uJ0UgvSo+ds2dE38QAZnnjK1DcnUW2A+F6PYhY/Cg4cN7IHrrFqNchU+QcepAmV ObP7Sarkt4QYYP1o7mYhiTAfFkJZlLp1TfWVQUjc969T3qJRS1HQKR8zBLkiLWkkSEhn Flq0u4FlaGc6nHwpRyWLcl4026IdPQWzcGEgCoYHkhUpMAkAFmRKdQDKmPyKwSfnB6/v D5+w==; 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 e9e14a558f8ab-3a3d70feb3csi7961595ab.34.2024.10.15.08.38.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 08:38:41 -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 1C47F88969; Tue, 15 Oct 2024 17:38:02 +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 72A6788730; Tue, 15 Oct 2024 17:38:01 +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_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_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 73CE2889C3 for ; Tue, 15 Oct 2024 17:37:59 +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 7C80D1692; Tue, 15 Oct 2024 08:38:28 -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 E25F73F528; Tue, 15 Oct 2024 08:37:55 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Heinrich Schuchardt , Simon Glass , Tom Rini , Caleb Connolly , Jonas Karlman , Mark Kettenis , Sughosh Ganu Subject: [PATCH v4 06/15] efi_memory: do not add U-Boot memory to the memory map Date: Tue, 15 Oct 2024 21:07:08 +0530 Message-Id: <20241015153717.401371-7-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241015153717.401371-1-sughosh.ganu@linaro.org> References: <20241015153717.401371-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 V3: None 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 41501e9d41b..16e64987af7 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__) /*