From patchwork Thu May 28 08:46:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1299567 X-Patchwork-Delegate: uboot@andestech.com 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=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=mVtkdn7k; 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 49XhCH1Bwzz9sSF for ; Thu, 28 May 2020 18:47:03 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EFC2D813B3; Thu, 28 May 2020 10:46:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="mVtkdn7k"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0F4D281C95; Thu, 28 May 2020 10:46:55 +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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) (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 42F568120B for ; Thu, 28 May 2020 10:46:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bmeng.cn@gmail.com Received: by mail-pj1-x1044.google.com with SMTP id ci23so2827512pjb.5 for ; Thu, 28 May 2020 01:46:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Ke3sdz+Cqeo2c3SZf23uu3Jm6CzF2wgi/V8Ohz1bqUQ=; b=mVtkdn7kXB5FCRYwnDB9VKHuuu7Ge7Gq19zmgKvLCPZzsb370Nda+7nLtVOlJe0MvB 9GD4jViXlJoztuJ82plk+JvzX9HimajVlwFpHLv968Hl5s/Eb0LDEPenXSUTSCUURlIp 0x66tt94a2Jhxw7ATddXCRbT8mlfa7rrBnGKsV5xaBiNWqmkEqsXpoqptn8h0oyZELnR SEHeRdVpJk8t8H9j/7i7lqz5cxuI8CAkopaMoPNuWevV4qNBvxaYYIJ5xBg0H5uoEhad YNzD871AYPwllnmKEa7ZRS0srxiD33bqX1WoAMiARBsn9nl04N2GesZ5AIeAhNChBazb ZBJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Ke3sdz+Cqeo2c3SZf23uu3Jm6CzF2wgi/V8Ohz1bqUQ=; b=ozxGH2MYUEe2/ZQbA9nRshrogfeM7nl9YE0EN3Vkptk85IfORjfojguB4iJt7QqnZ5 tY++RQHhzDsO7pexr3MoABzzK4zhl6HEW3gM2/BqnSf6Gl1ke7wxDJ/zSbdfoic5D0QH vaFC2LYAZKOYcxIOrIOtSBOeHNnSVpisaXiprGDJXi42rk1j88J0OJpMF1bNdyjkPei5 nIBOmEbGr3sxo/Okr/eRF3Cxwc4d6KS8o1K2yW+VT65ys5K8JpOKXz4eEpDy/ByJplF+ kp2Jiquv9K8wuAkelDfcvS4eIXmMcdgnj+FONPfJSFYu7NDGrUzznyQi+2uHAIsK9Gf5 pRiQ== X-Gm-Message-State: AOAM530+p09jwsKYhA7cNhdywdQaBWryL5PT+jabvhN/Q4yMGwN+lrpS 1+ksNYPQQNRP/1XxcB+w4RQ= X-Google-Smtp-Source: ABdhPJxwwd5pdHv0N+7sLYkYHy9jrkvqN7wyzTR4zZBjZbxPRIDorgutqZOSUzDhKfogiVM3FMhRoQ== X-Received: by 2002:a17:90a:ad86:: with SMTP id s6mr424634pjq.193.1590655610537; Thu, 28 May 2020 01:46:50 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id z18sm4140200pfj.148.2020.05.28.01.46.49 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 28 May 2020 01:46:50 -0700 (PDT) From: Bin Meng To: Rick Chen , U-Boot Mailing List Cc: Bin Meng Subject: [PATCH v2 1/3] riscv: Avoid the reserved memory fixup if src and dst point to the same place Date: Thu, 28 May 2020 01:46:42 -0700 Message-Id: <1590655604-13704-1-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.2 at phobos.denx.de X-Virus-Status: Clean From: Bin Meng The copy of reserved memory node from source dtb to destination dtb can be avoided if they point to the same place. This is useful when OF_PRIOR_STAGE is used. Signed-off-by: Bin Meng Reviewed-by: Rick Chen --- arch/riscv/lib/fdt_fixup.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/riscv/lib/fdt_fixup.c b/arch/riscv/lib/fdt_fixup.c index 6db48ad..5f523f0 100644 --- a/arch/riscv/lib/fdt_fixup.c +++ b/arch/riscv/lib/fdt_fixup.c @@ -82,10 +82,9 @@ int riscv_fdt_copy_resv_mem_node(const void *src, void *dst) * @fdt: Pointer to the device tree in which reserved memory node needs to be * added. * - * In RISC-V, any board compiled with OF_SEPARATE needs to copy the reserved - * memory node from the device tree provided by the firmware to the device tree - * used by U-Boot. This is a common function that individual board fixup - * functions can invoke. + * In RISC-V, any board needs to copy the reserved memory node from the device + * tree provided by the firmware to the device tree used by U-Boot. This is a + * common function that individual board fixup functions can invoke. * * Return: 0 on success or error otherwise. */ @@ -95,6 +94,11 @@ int riscv_board_reserved_mem_fixup(void *fdt) void *src_fdt_addr; src_fdt_addr = map_sysmem(gd->arch.firmware_fdt_addr, 0); + + /* avoid the copy if we are using the same device tree */ + if (src_fdt_addr == fdt) + return 0; + err = riscv_fdt_copy_resv_mem_node(src_fdt_addr, fdt); if (err < 0) return err; From patchwork Thu May 28 08:46:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1299568 X-Patchwork-Delegate: uboot@andestech.com 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=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=HeAdcY6s; 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49XhCS30Xwz9sSF for ; Thu, 28 May 2020 18:47:16 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2E14F81CD7; Thu, 28 May 2020 10:46:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HeAdcY6s"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ACAA48179A; Thu, 28 May 2020 10:46:55 +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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) (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 1B5FF813B3 for ; Thu, 28 May 2020 10:46:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bmeng.cn@gmail.com Received: by mail-pf1-x444.google.com with SMTP id 131so4862841pfv.13 for ; Thu, 28 May 2020 01:46:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jvzapaF63ySIAfnhhxC7IbLsl2GWpKUmwjjlY6TpXSo=; b=HeAdcY6sEo1fk6pXNC4zJWlFT5CG/dLqEE0+PTpLg0YUq1gJYski9fQ/OX5jymTzXS DLXq6bTdw7XhUYlTwG8A6vWI9wx4Bb1uszHIb+sif0H4TLm4oP0LKv73bM4zfdo47crP 7GQc8BlXUOlxusCx1peEA1tqYYuECiZ9lPWUaDpS0IOxF9N+8sUhlo1/5pNNJbYF4XuB w8CWWgg/llst0mTeCp58GUbsVxZN5KUa5/y4qtjOM36s5UV2t0kSjaEoe+sgHacJOlFq 7s2eOrbMFL5ku80QSCy8cvr8/o+tCgcDcLS7ydHzmTjuIRiNf4EDYgfm8VIXLbi6uQSq CN+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jvzapaF63ySIAfnhhxC7IbLsl2GWpKUmwjjlY6TpXSo=; b=lMCI+lTzikZlWskWadpU0N3u4fDbqs58TMk+sHGn8hKVJWR51db1RAGfCLNrUQKlLx 2/Q3sdPnw/fXOFthsUs+7ADdigEw+H79RvhfoeGa4Tvn8fs3evyCAO3iYkAuVlpvUlsQ DdOasiVVVFXhgBCJstDcsjjkpTNgu+4K18nbTKq0klxWdd225HebaZm0Q8sJnUSA4PK2 663K53gowELzFGDjlM/cy4fIx6RgrhDHbRX35f+VyX8eWsTD4Emn4fc78CgMOShexe19 sA32NbfNKOPg7n3F9ciJNwC6xBfbP2xzm7iiMXLbZWvAx5IZzMouZ3sLfjC3IyXSXQlh Oyfw== X-Gm-Message-State: AOAM531FqQDlhTsL0U5xM5LwDis5MXbSG06q6uCPfTcf/eVRd2n92Puj RfwL385bxtz/6yb7nWog4u4= X-Google-Smtp-Source: ABdhPJxXa0yterpwhb4wAJCia6fvQ6VakTvuHauTA3rXaLEvr65c6bPkWi8sHCS6NK+NOo41SrjHwQ== X-Received: by 2002:a62:a504:: with SMTP id v4mr1962052pfm.117.1590655611368; Thu, 28 May 2020 01:46:51 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id z18sm4140200pfj.148.2020.05.28.01.46.50 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 28 May 2020 01:46:51 -0700 (PDT) From: Bin Meng To: Rick Chen , U-Boot Mailing List Cc: Bin Meng Subject: [PATCH v2 2/3] riscv: Expand the DT size before copy reserved memory node Date: Thu, 28 May 2020 01:46:43 -0700 Message-Id: <1590655604-13704-2-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1590655604-13704-1-git-send-email-bmeng.cn@gmail.com> References: <1590655604-13704-1-git-send-email-bmeng.cn@gmail.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.2 at phobos.denx.de X-Virus-Status: Clean From: Bin Meng The FDT blob might not have sufficient space to hold a copy of reserved memory node. Expand it before the copy. Reported-by: Rick Chen Signed-off-by: Bin Meng --- arch/riscv/lib/fdt_fixup.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/riscv/lib/fdt_fixup.c b/arch/riscv/lib/fdt_fixup.c index 5f523f0..1290a64 100644 --- a/arch/riscv/lib/fdt_fixup.c +++ b/arch/riscv/lib/fdt_fixup.c @@ -41,6 +41,12 @@ int riscv_fdt_copy_resv_mem_node(const void *src, void *dst) return 0; } + err = fdt_open_into(dst, dst, fdt_totalsize(dst) + 32); + if (err < 0) { + printf("Device Tree can't be expanded to accommodate new node"); + return err; + } + fdt_for_each_subnode(node, src, offset) { name = fdt_get_name(src, node, NULL); From patchwork Thu May 28 08:46:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1299570 X-Patchwork-Delegate: uboot@andestech.com 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=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=YC37AHKO; 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 49XhCh5VpTz9sSF for ; Thu, 28 May 2020 18:47:28 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4681881D47; Thu, 28 May 2020 10:47:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="YC37AHKO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0A97B813B8; Thu, 28 May 2020 10:46:58 +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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) (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 DB645813B8 for ; Thu, 28 May 2020 10:46:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bmeng.cn@gmail.com Received: by mail-pf1-x444.google.com with SMTP id n15so13262233pfd.0 for ; Thu, 28 May 2020 01:46:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=S5c9Prf+U9sT0FxoRxvjuBOQnw9RZRDloBCeOGV6IMU=; b=YC37AHKOi7sxVsYajXTgmkLgTjoBxZ8ixu6gHfqbLNXxsw0i7mna8m6uKWrsvyiD7y B6/1/CWyW4Tm9G22bJy/xMZS5UvUr5e9NXmflYQ+5HBTFPG7wSKhYEATUpc0xX+MB7GB gLFG8H2wcKARDCoAm6tRzoZjzGdmM0EVSzAxPtTRBg4kK3qS3ir21mSs7ZeAFE/Mx7fX /Sjfh+2RFCYh048g7VCPu+GeVnWk+13SXLerJZS4omjOQR/T69N8sMQ+OoVRpVfHnGD2 hHjpAHcjKhWm1+a+D4ETGhT+O2xyA0Gywfx3IGb0VjusvLLH5EGCuvc2wlP8NsK7w/ra S1wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=S5c9Prf+U9sT0FxoRxvjuBOQnw9RZRDloBCeOGV6IMU=; b=CivbtJ5Q8PZDjRr7uVnHa2T2q7GxWKSqjs4tbfVERNQqeTPB3ab9EYEVbOQSxsRsX3 bHZGB2tvzOtCIbkhyXCf1zjGFFNZ//jll1GBLhzJAKyKyCQH/anJziYvlWFZoRjTJ8T8 ujdX2VO4reubg38cxEumrbOQ6DLmsvNW4NlMGQbKW2BwpX2QGSXoxZTjUcJ4rLwThTG4 Jd7JSBTZAYrJ2+35xr3IVFTKNnoNKcODhYxSsBO3zdgaO4+OhL1s1mgdp0cyHB6gIES5 rXAsXFuvsT3imgX2BkIkjlIc66PgUXv9i3ei7ur6l6hfFKUN+AG25lkY/QpbVv9nn618 Y9IQ== X-Gm-Message-State: AOAM5337A0jJydG/iDz3uSe1B5yq6jKLqU+6Kr1rP+gzpwYxX08Gh1WA 6Ab7o5914cv0C2NXx4/HspQ= X-Google-Smtp-Source: ABdhPJxuXDYL2I0BzKXX2knOfl3WtXrlyBAEPk7ZuNxVEbxYuV8oi7S4i25ViLxrwTf09VBZ2kK2RA== X-Received: by 2002:a62:9119:: with SMTP id l25mr2090729pfe.246.1590655612420; Thu, 28 May 2020 01:46:52 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id z18sm4140200pfj.148.2020.05.28.01.46.51 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 28 May 2020 01:46:51 -0700 (PDT) From: Bin Meng To: Rick Chen , U-Boot Mailing List Cc: Bin Meng Subject: [PATCH v2 3/3] riscv: Enable CONFIG_OF_BOARD_FIXUP by default Date: Thu, 28 May 2020 01:46:44 -0700 Message-Id: <1590655604-13704-3-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1590655604-13704-1-git-send-email-bmeng.cn@gmail.com> References: <1590655604-13704-1-git-send-email-bmeng.cn@gmail.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.2 at phobos.denx.de X-Virus-Status: Clean From: Bin Meng Starting from OpenSBI v0.7, the SBI firmware inserts/fixes up the reserved memory node for PMP protected memory regions. All RISC-V boards needs to copy the reserved memory node from the device tree provided by the firmware to the device tree used by U-Boot. Turn on CONFIG_OF_BOARD_FIXUP by default. Signed-off-by: Bin Meng --- arch/riscv/Kconfig | 3 +++ configs/sifive_fu540_defconfig | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index fb5fe5a..5176b35 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -272,4 +272,7 @@ config STACK_SIZE_SHIFT int default 14 +config OF_BOARD_FIXUP + default y + endmenu diff --git a/configs/sifive_fu540_defconfig b/configs/sifive_fu540_defconfig index f805aac..6d61e6c 100644 --- a/configs/sifive_fu540_defconfig +++ b/configs/sifive_fu540_defconfig @@ -9,7 +9,6 @@ CONFIG_FIT=y CONFIG_MISC_INIT_R=y CONFIG_DISPLAY_CPUINFO=y CONFIG_DISPLAY_BOARDINFO=y -CONFIG_OF_BOARD_FIXUP=y CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM_MTD=y