From patchwork Fri Aug 6 12:22:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1514329 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; 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=fQVz+2Lx; 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 4Gh4Pv5FRcz9sW5 for ; Fri, 6 Aug 2021 22:23:15 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 911B282E4C; Fri, 6 Aug 2021 14:23:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (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="fQVz+2Lx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E677F82E4C; Fri, 6 Aug 2021 14:23:02 +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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (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 A79EF82E4C for ; Fri, 6 Aug 2021 14:22:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-wm1-x331.google.com with SMTP id n11so5488982wmd.2 for ; Fri, 06 Aug 2021 05:22:58 -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:mime-version :content-transfer-encoding; bh=NvHgnGfZeCIXIF/tg+KQpOfWJRDtjKsbhzn8hGLL0RU=; b=fQVz+2Lxw44whgR2V8lipuW9BKj0UcpZBb2oYZL6gTZ2p5cgx22fHx0kHSohZlrKzG YinpaicMFviQDSeADcx8Vlsz3mNwHYOGi9Z4Id76/TH+KEVoy/l5s8lAc9mLtEp5RXet 8Ky4eHYssXpH5LYmq4wJKo+ZK8NG44PHo03PT2j6k+RnufGn2rixL/9LEheIHDWlhrts NYRY/fLFoe2sMaYzhJzjWuyy4U1Oeoq62A/6vGRQiWxbKQm1C65DoLdu4kg5U77T6jn7 0qMPVUF7hhr3idz9VQ9PK/oD500AZA+ZHx1tSqfyY3fpidA+EMezVBPIBmQgrdf1iNRq VSYw== 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 :mime-version:content-transfer-encoding; bh=NvHgnGfZeCIXIF/tg+KQpOfWJRDtjKsbhzn8hGLL0RU=; b=ksQ4P91U5u0U4HS78NXPaYaFLnOyJkI8dwAoR6DT/wkwdTb0sk4m2m8EetO7/B0hzB FqDHj1BN0SJFT9m6P96wupTd4ELK7CVOdoALEZNSfa9xz7lA7M7EyLY4EDpg4eG2Kwe8 RxTNALnR8jgP63JHsWEjPss3E68vyRV3zgUWhC4RXDMiexpjms7lAj0a5EyTG8oZppOR Yuaz4VgoexAUkG41jLjKRYsQIzgwlMHY/Yzs5Ffb5KhOhtPAVd9gZnShl3QKB3pShKc1 nv5i51kaqQVJ99NQY7VZ5/PW9XB7Td6bjv5t4LYSUikq5c4gY4O7af6sIKccgb/D165y vR8Q== X-Gm-Message-State: AOAM53316KR4RG5nprfs9E5L0cPErkXXfEFjbJNBlB2TcXVBDmj12bkd co1HPyaMYDipm5XWznkaQXOACrCLWuQsbxea X-Google-Smtp-Source: ABdhPJw1hJhgLTNEkF6Jr/z7XGUiO0fw4ki7Pbz7v+9RJ66PRNqByLd/e27sODy1eP4z22tQc78yew== X-Received: by 2002:a05:600c:4f42:: with SMTP id m2mr20681249wmq.47.1628252578006; Fri, 06 Aug 2021 05:22:58 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id c12sm9789679wrm.29.2021.08.06.05.22.57 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Aug 2021 05:22:57 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Alexandre GRIVEAUX , Ashok Reddy Soma , Aswath Govindraju , Ilias Apalodimas , Lukasz Majewski , Michal Simek , Simon Glass , T Karthik Reddy Subject: [PATCH] xilinx: Disable ARCH_FIXUP_FDT_MEMORY Date: Fri, 6 Aug 2021 14:22:56 +0200 Message-Id: <1f2589b334942bc5adeedd5df58e6af32ec31ce2.1628252571.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.32.0 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.103.2 at phobos.denx.de X-Virus-Status: Clean Based on DT spec you can have one memory node which multiple ranges or multiple nodes. fdt_fixup_memory_banks() is not implemented in a correct way when multiple memory nodes are present because all ranges are put it to the first memory node found. And next memory nodes are kept in DT which ends up in the same range specification in the same DT. Here is what it is happening. Origin DT. memory@0 { device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>; }; memory@800000000 { device_type = "memory"; reg = <0x8 0x00000000 0x0 0x80000000>; }; After fdt_fixup_memory_banks() memory@0 { device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>, <0x8 0x00000000 0x0 0x80000000>; }; memory@800000000 { device_type = "memory"; reg = <0x8 0x00000000 0x0 0x80000000>; }; As is visible memory@0 node got second range but there is still memory@800000000 node present and 2G range is listed twice. The solution can't be that second node is removed because it can be referenced already that's why it is better for us to disable this option for now. Signed-off-by: Michal Simek --- configs/xilinx_versal_virt_defconfig | 1 + configs/xilinx_zynq_virt_defconfig | 1 + configs/xilinx_zynqmp_virt_defconfig | 1 + 3 files changed, 3 insertions(+) diff --git a/configs/xilinx_versal_virt_defconfig b/configs/xilinx_versal_virt_defconfig index e67905178dee..c894d32a9259 100644 --- a/configs/xilinx_versal_virt_defconfig +++ b/configs/xilinx_versal_virt_defconfig @@ -13,6 +13,7 @@ CONFIG_COUNTER_FREQUENCY=100000000 CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y +# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set CONFIG_BOOTDELAY=5 CONFIG_USE_PREBOOT=y # CONFIG_DISPLAY_CPUINFO is not set diff --git a/configs/xilinx_zynq_virt_defconfig b/configs/xilinx_zynq_virt_defconfig index b4c7f11505c1..573a10fe221b 100644 --- a/configs/xilinx_zynq_virt_defconfig +++ b/configs/xilinx_zynq_virt_defconfig @@ -23,6 +23,7 @@ CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x10000000 # CONFIG_USE_SPL_FIT_GENERATOR is not set CONFIG_LEGACY_IMAGE_FORMAT=y +# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set CONFIG_USE_PREBOOT=y CONFIG_SPL_STACK_R=y CONFIG_SPL_FPGA=y diff --git a/configs/xilinx_zynqmp_virt_defconfig b/configs/xilinx_zynqmp_virt_defconfig index 623228053e47..2c888130fa59 100644 --- a/configs/xilinx_zynqmp_virt_defconfig +++ b/configs/xilinx_zynqmp_virt_defconfig @@ -21,6 +21,7 @@ CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x10000000 +# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="scsi reset;usb reset" # CONFIG_DISPLAY_CPUINFO is not set