From patchwork Wed Aug 12 10:42:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1343615 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=jxAXGriL; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BRRBT6RKQz9sTN for ; Wed, 12 Aug 2020 20:43:29 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A87CB819E8; Wed, 12 Aug 2020 12:43:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="jxAXGriL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 903F9812FE; Wed, 12 Aug 2020 12:43:03 +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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6A874812FE for ; Wed, 12 Aug 2020 12:43:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-wm1-x343.google.com with SMTP id 3so1473069wmi.1 for ; Wed, 12 Aug 2020 03:43:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KVhwUvpA/pWlbojrmf+cqyabV2HoQokdvFPTRvNd0co=; b=jxAXGriLMw4OlW59wLsS0Y+TwCTf7SddwIKkVamsVFGA/tWh2UdiI1CSATB6nNTp8J LmLyzAcopCYH4vIwhRI3HsaXDKrerVdj3dY6L1jhTTfXzheryeCMdZ8m7d3lDDvAitkO z8M4OJWAOsvb1Hld80iQejKw7frkliq/RqCgt080QIIWC6qsiN1UBj8C/jG2yDLu/uwm z9pVXA5MbOCFQHdbdXl53NgpngUC4TyN0Qu9Fo3O9rWyGmdpNGTPI4Xc/vxK78SNzo5w gZpXB5nm1rI8dQ550Sm45TBlGGA3Eh7IrYeoSjuF+PFxYyuqqb5myWC5IJu1hpHaCm/j Cd6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=KVhwUvpA/pWlbojrmf+cqyabV2HoQokdvFPTRvNd0co=; b=pe2B+VWqZUs1NJ/qkyXFXpwkZeTlOBxm7YGk+2MRQsUqR9BHzRNZ6NJ4GN61eBB9T5 /qhO+Eri4G/HdgjvC1t1YjFs2Uib1yomlr2Z0UvwdKGANVEnRrjOWdpxKn3snZvPn3Sx 3OKa0SNpuipUGDjXWqj6oinC3BnPFkgAif3vN/KT/04+n7MQ63/JoenpNtOOCqznRaZg AwW1OVM4/I+BzMAEXPrBZRlX1Eya2VH5BNx+bmvobyOKrGsOetFuu4AaM6B+JzGOI3+6 UPmgRHUpZcSV/AKQ74ZTPetIE2a5ZV+Q1hCXrVXWVBcWpakoHW4g7Q0tXofWuU9idmE0 112A== X-Gm-Message-State: AOAM532ENTT8Xy5J41DMtr9F/s8eGzcOSoNpgfhhAj/9Vs67xDvna6zw OsKRe+N3y8VYGHzqeEfwopXDyteFwqZXNA== X-Google-Smtp-Source: ABdhPJxGxZzq/Am76DoCJUKBWQvk9ui9R95pVLpYKoCxa4qQFfwhivVWgsU1x9PFsmNq3N7+M2lGkw== X-Received: by 2002:a1c:720d:: with SMTP id n13mr7975522wmc.103.1597228979708; Wed, 12 Aug 2020 03:42:59 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id h11sm3604554wrb.68.2020.08.12.03.42.59 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Aug 2020 03:42:59 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Subject: [PATCH 1/4] xilinx: common: Get rid of fdt_high variable Date: Wed, 12 Aug 2020 12:42:50 +0200 Message-Id: <68761a7fa86fa5fe6ce85c7fddd86ef03008cd3f.1597228970.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean There is no need to setup this variable if bootm_low and bootm_size variable are properly setup. If fdt_high variable is missing U-Boot is asking LMB to return free memory which is not used. Signed-off-by: Michal Simek --- include/configs/xilinx_versal.h | 1 - include/configs/xilinx_zynqmp.h | 1 - include/configs/zynq-common.h | 1 - 3 files changed, 3 deletions(-) diff --git a/include/configs/xilinx_versal.h b/include/configs/xilinx_versal.h index 32cd5b21f7b7..d7255a05dff1 100644 --- a/include/configs/xilinx_versal.h +++ b/include/configs/xilinx_versal.h @@ -79,7 +79,6 @@ #define CONFIG_CLOCKS #define ENV_MEM_LAYOUT_SETTINGS \ - "fdt_high=10000000\0" \ "fdt_addr_r=0x40000000\0" \ "fdt_size_r=0x400000\0" \ "pxefile_addr_r=0x10000000\0" \ diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index 7c24bf632e3f..15ad4198a6be 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -101,7 +101,6 @@ #define CONFIG_CLOCKS #define ENV_MEM_LAYOUT_SETTINGS \ - "fdt_high=10000000\0" \ "fdt_addr_r=0x40000000\0" \ "fdt_size_r=0x400000\0" \ "pxefile_addr_r=0x10000000\0" \ diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h index 79c75784f2bf..1607a8d06518 100644 --- a/include/configs/zynq-common.h +++ b/include/configs/zynq-common.h @@ -196,7 +196,6 @@ /* Default environment */ #ifndef CONFIG_EXTRA_ENV_SETTINGS #define CONFIG_EXTRA_ENV_SETTINGS \ - "fdt_high=0x20000000\0" \ "scriptaddr=0x20000\0" \ "script_size_f=0x40000\0" \ "fdt_addr_r=0x1f00000\0" \ From patchwork Wed Aug 12 10:42:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1343617 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=g4hR4UbA; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BRRBt0B6fz9sTN for ; Wed, 12 Aug 2020 20:43:49 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C42E0821E0; Wed, 12 Aug 2020 12:43:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="g4hR4UbA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 30F2B81F7C; Wed, 12 Aug 2020 12:43:07 +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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id F4174808B2 for ; Wed, 12 Aug 2020 12:43:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-wm1-x343.google.com with SMTP id p14so1366552wmg.1 for ; Wed, 12 Aug 2020 03:43:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uxXBZHJ2jwD2robXFQtRJW9Jml7FPAoE5/zifmYB+vM=; b=g4hR4UbAZQMoVDOcaE+HmK4Jr0pG4ZbyMXAhzZt1PA/00YkXIS/ES0+AFvY/f6wbEQ S3U0tDWx0ofYlo+CmgGq9hLFoaBXjfLdIK2QIdkL2gDyVNl+rl6GAroeyhe0Fc29Eh9j pa+GQw0cRJa9FEykMakogYmTtggsBSwyenlW/rAgDsjGGypZHW/D7+4QokkFmqwBAEhf 0Cq59MGagkAMtRLMUNYD+cwpWln/1CFYnIKOzSCJYisJuouXVHI+jppe/dpMIEAVGMb7 7OuppVC92I4s4k6Y5ZQrtrhMDJL9zsid0IZcJBDOPOQ5ZOU79vEVA09SsUp/sScbN56B 1JJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=uxXBZHJ2jwD2robXFQtRJW9Jml7FPAoE5/zifmYB+vM=; b=bUnBt7dmHSRLL5BVStj9J5QT/9ADiH48eWQjAGGYt2cSHNXE9PRsAyQjT32jLElOaQ 5/vawQbOB252nSMT7CkwKx4ok7pTydZc4D8y5byCLh5eYfwiQtLJUnXMtkurn99AoH9E yZ6FbdyR8II3DhdRmjEBnl2p7aLTpF8koTs/dZscJ5gQkYq+/IsIeAWJq5SoL3xJfRz4 MHdlWHg2snfK3QLXBYrrOGeBJ58PFtSvbIMEp/IVq35E3QfvQv+jTNzl3kd2lb1W4nXi 69VRN3gyhiz78dDapa0hpmx0Sv0JOZzc4TBs9MPKFclIJzeIN7GoQ6ticmEaZJMSMAg2 IPGQ== X-Gm-Message-State: AOAM533qYq619WJSnPfgsKntOw35cKGnsaZN1IjZGYlipDeKnry7tGJD m5b+r5U5+WB/Yugwl1WiFd7623DWGsl6qw== X-Google-Smtp-Source: ABdhPJz30yliGBg4T7llyUKM9ku58caRRCPIn51ttxtFCIOvkNbSmGgyeJD4l9lS5CdyvOOlZ675HQ== X-Received: by 2002:a1c:7702:: with SMTP id t2mr7859523wmi.169.1597228981320; Wed, 12 Aug 2020 03:43:01 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id z7sm3007420wmk.6.2020.08.12.03.43.00 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Aug 2020 03:43:00 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Ibai Erkiaga , Michal Simek , Simon Glass Subject: [PATCH 2/4] xilinx: common: Get rid of initrd_high variable setup Date: Wed, 12 Aug 2020 12:42:51 +0200 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean When bootm_low/bootm_size are setup properly there is no need to setup any initrd_high address. Location for initrd is determined through LMB. Signed-off-by: Michal Simek --- board/xilinx/common/board.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index 0782d08ee3fe..901591ba2a85 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -77,14 +77,8 @@ void *board_fdt_blob_setup(void) int board_late_init_xilinx(void) { - ulong initrd_hi; - env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET); - initrd_hi = gd->start_addr_sp - CONFIG_STACK_SIZE; - initrd_hi = round_down(initrd_hi, SZ_16M); - env_set_addr("initrd_high", (void *)initrd_hi); - env_set_addr("bootm_low", (void *)gd->ram_base); env_set_addr("bootm_size", (void *)gd->ram_size); From patchwork Wed Aug 12 10:42:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1343616 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=m5PpnvWM; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BRRBd49f1z9sTN for ; Wed, 12 Aug 2020 20:43:37 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6F29581F7C; Wed, 12 Aug 2020 12:43:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="m5PpnvWM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 557DB81B5E; Wed, 12 Aug 2020 12:43:07 +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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 880B1819E8 for ; Wed, 12 Aug 2020 12:43:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-wm1-x344.google.com with SMTP id t14so1466591wmi.3 for ; Wed, 12 Aug 2020 03:43:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qbvBlDNfozEkb24b1ZN6t1rUgwHOsth70cpqaPo+wWQ=; b=m5PpnvWMFRKjt6mimkXYFKUlCq1IeI+VA1qV7DUGpZbhQf1udxlksqKUvDOQJbQtB5 dcvtw1BSbxjMCnVJq8Zy4HvAIewMTyiskNoo2+im30tdVah3r5bTOVKlGlwP8mE59rZC XfdUl8cja0zlshvTVy0UPXUVpwCMCwGzcHOk9WmHCfXbpYbD4N0S/lglsZ4RF3ueuZhe nfiHTn1rgV8nUB0bpHSc9Uxh9/mDugrhT/F0yFOSNz0ijeIbeeRmffIUQmHH5Y92q/dX QU5lfNJso7B4WcItOltA9TvLaq8Wl/VmQmXUgI6yMkE7PUiV5ClblXOZFHHD/WWYUUQS +kfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=qbvBlDNfozEkb24b1ZN6t1rUgwHOsth70cpqaPo+wWQ=; b=BMuk0n57A7mVv2Rz4YgVaf9aoZ0blaMKksVLVVz3n++61j+z6z12CbpaY+WA//25Sv 3MMAx01dj5K21BJv1v21qm/0K5ebJtIlWEMe+F//lWLJIgru/smLajeUpMei8kVZUPwN AMJeYDiWoNPhZGjKVO1OVnDltUF1XF1ejqSqb6Xu0+cPRE4hLxxSgr+1O4Wbf1Fuu7pM tJJ5sJx8/wR7knfJPflYpaQlC7s0w133xAwSDh5wJCzICdy59sQ2rdzwPG9iLjrbYedg JBpWtJbXfNhU6XR47gr4vBO3VgRn019RJzU6kUTecGi8S1KtNp76obERBHrCmeN3vHUm diMw== X-Gm-Message-State: AOAM532o/3UjvlNtPz5w+/Ij85mOURB1PMVBmDpIFb+Sp/jafxU7BIcq 8+lq4c5E2JZJ76R/jEqCORpq2Rma4XcxFQ== X-Google-Smtp-Source: ABdhPJxo2PjT7wCP3vJDE9gJ4xpLD2hPGaEm2eDoWBt8KTcTmoq6fO+SQEiqOCt+3fJaZk7azdTqAQ== X-Received: by 2002:a1c:6289:: with SMTP id w131mr8341401wmb.41.1597228982912; Wed, 12 Aug 2020 03:43:02 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id g70sm3280153wmg.24.2020.08.12.03.43.02 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Aug 2020 03:43:02 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Ibai Erkiaga , Michal Simek , Simon Glass Subject: [PATCH 3/4] xilinx: common: Check return value from variable setup Date: Wed, 12 Aug 2020 12:42:52 +0200 Message-Id: <97d5f6f7a74f8fc409dbff8395110746dbc4d096.1597228970.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean env_set..() can failed that's why check return status and report it back to make sure that user is aware that's something went wrong. Signed-off-by: Michal Simek --- Change type to u32 to have defined bit operations (mentioned by Marek) Origin patch sent as https://lists.denx.de/pipermail/u-boot/2020-August/422508.html --- board/xilinx/common/board.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index 901591ba2a85..581c88ad49a4 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -77,10 +77,15 @@ void *board_fdt_blob_setup(void) int board_late_init_xilinx(void) { - env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET); + u32 ret = 0; - env_set_addr("bootm_low", (void *)gd->ram_base); - env_set_addr("bootm_size", (void *)gd->ram_size); + ret |= env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET); + + ret |= env_set_addr("bootm_low", (void *)gd->ram_base); + ret |= env_set_addr("bootm_size", (void *)gd->ram_size); + + if (ret) + printf("%s: Saving run time variables FAILED\n", __func__); return 0; } From patchwork Wed Aug 12 10:42:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1343618 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=cxxmVEFq; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BRRC432gYz9sTN for ; Wed, 12 Aug 2020 20:44:00 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 716CA821B7; Wed, 12 Aug 2020 12:43:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="cxxmVEFq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D6AA1819E8; Wed, 12 Aug 2020 12:43:08 +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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 366C781E39 for ; Wed, 12 Aug 2020 12:43:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-wm1-x342.google.com with SMTP id 3so1473292wmi.1 for ; Wed, 12 Aug 2020 03:43:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=T/Lr6swCiQmEPphb/QexA4D3Gx7wsQZCZYfDLHwCib0=; b=cxxmVEFqtQ/iSinE2pEwb5sMymjCNvozyqkJFnxgwisWCh6ggJxCXuUgA30HZhxp5S YgXEdDZrk46zFjIiF+AXp0u6b/+hIyRStBsC/upzXUhJhsmTskqXqlJpuKw5FSmID03D enCGQEMwAdoxCIi9C6Rg4LJPOb4FmRKi0N/htdGQpOFRGd4aHuF6sVYFfw2quEasYJhh RP85IvP2srtNzdbXvHh8plAg8jGT3xQPo0B2ou2T1bQrWoVq3k1TFmbv6gdvfkiWcBVo NSiVWBOsZzFL+4kVf134FUZc4+EOUNvRQuHOiTrbZ6hB8o+sd0Y9UMGmH24F2+l9pYfs zRJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=T/Lr6swCiQmEPphb/QexA4D3Gx7wsQZCZYfDLHwCib0=; b=ZpPymnWUys6iGj1OJsCLzbJbDccjJfx9556ec9s/4ujRN09fE2016Jw9WxZap+G6HJ S4M2s5bhWkw3eF/boyPLQyYPYmN+KPp3Iy/dL9DBMZaovm0Na8xDbcJhCJB8sEfW6dnZ P3XR6I0dpBGlyTbWv7mW29rew9JNuX1F5hl4/G++a0ccrqQ6haPn87/OWAvsIHOstVxm vVkzJFlq54cKM7Tuc1b8sNYiXTRM9a0QiscnPmttS7l9U4QTxPtDulGZWbql4AW3prhe HoqDRcf/deqRVlV4spLrvIcHd6WoMjmxqCMAAym72dkEwA+QBlaNN4xj1RpYHI95b8/d yfHA== X-Gm-Message-State: AOAM533n3CXNsHtxMfgCKJjKCoqghbnOZuDSH+JZ+uSNMzVxkWijQD7T gpkBPL9XtT84ToxhSVcNO3Zm/a92DHVPSQ== X-Google-Smtp-Source: ABdhPJxPUaYGqyMJ8irkYpwbeDEvmgwOB8cmzyk4mi2QqsIbHG6re84rlz1NSeQmzp7cOXdvtLG0jw== X-Received: by 2002:a1c:c345:: with SMTP id t66mr7929169wmf.0.1597228984470; Wed, 12 Aug 2020 03:43:04 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id 126sm3368265wme.42.2020.08.12.03.43.03 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Aug 2020 03:43:04 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Ibai Erkiaga , Michal Simek , Simon Glass Subject: [PATCH 4/4] xilinx: common: Change bootm_size variable setting Date: Wed, 12 Aug 2020 12:42:53 +0200 Message-Id: <7cc83209f1d7af045e7574990bf3d0296d9d943c.1597228970.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Linux kernel for arm32 requires dtb and initrd to be placed in low memory to work properly. This requirement is described in chapter 4b) and 5) in Linux documentation (Documentation/arm/booting.rst). There is an issue on arm32 with 2GB of memory that bootm_size is bigger than Linux lowmem (for example with VMSPLIT_3G). That's why limit bootm size on these systems not to be above 768MB. Signed-off-by: Michal Simek --- board/xilinx/common/board.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index 581c88ad49a4..eab389d049f2 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -78,11 +78,15 @@ void *board_fdt_blob_setup(void) int board_late_init_xilinx(void) { u32 ret = 0; + phys_size_t bootm_size = gd->ram_size; + + if (CONFIG_IS_ENABLED(ARCH_ZYNQ)) + bootm_size = min(bootm_size, (phys_size_t)(SZ_512M + SZ_256M)); ret |= env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET); ret |= env_set_addr("bootm_low", (void *)gd->ram_base); - ret |= env_set_addr("bootm_size", (void *)gd->ram_size); + ret |= env_set_addr("bootm_size", (void *)bootm_size); if (ret) printf("%s: Saving run time variables FAILED\n", __func__);