public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@nxp.com>
To: u-boot@lists.denx.de
Subject: [PATCH 01/10] imx: imx8qm/qxp: reserving DDR memory for M4
Date: Tue,  5 May 2020 20:28:37 +0800	[thread overview]
Message-ID: <20200505122846.15992-2-peng.fan@nxp.com> (raw)
In-Reply-To: <20200505122846.15992-1-peng.fan@nxp.com>

The DDR memory from 0x88000000 to 0x8FFFFFFF is assigned to M4 on
QM and QXP. The M4 can allocate this memory by two ways,
in SCD or u-boot.

In this patch, u-boot addes the memory reserve node to DTB to pass
the info to kernel, no matter the M4 memory is reserved in SCD
or u-boot. So kernel won't access M4 reserved memory.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/mach-imx/imx8/Kconfig |  8 ++++++++
 arch/arm/mach-imx/imx8/fdt.c   | 10 ++++++++++
 2 files changed, 18 insertions(+)

diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig
index 1f8add015f..69149d3cd5 100644
--- a/arch/arm/mach-imx/imx8/Kconfig
+++ b/arch/arm/mach-imx/imx8/Kconfig
@@ -41,6 +41,14 @@ config IMX_CONTAINER_CFG
 	  This is to specific the cfg file for generating container
 	  image which will be loaded by SPL.
 
+config BOOTAUX_RESERVED_MEM_BASE
+	hex "i.MX auxiliary core dram memory base"
+	default 0
+
+config BOOTAUX_RESERVED_MEM_SIZE
+	hex "i.MX auxiliary core dram memory size"
+	default 0
+
 choice
 	prompt "i.MX8 board select"
 	optional
diff --git a/arch/arm/mach-imx/imx8/fdt.c b/arch/arm/mach-imx/imx8/fdt.c
index 65c8ac1a7e..5993645378 100644
--- a/arch/arm/mach-imx/imx8/fdt.c
+++ b/arch/arm/mach-imx/imx8/fdt.c
@@ -8,6 +8,7 @@
 #include <asm/arch/sys_proto.h>
 #include <dm/ofnode.h>
 #include <fdt_support.h>
+#include <linux/libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -279,6 +280,15 @@ static int ft_add_optee_node(void *fdt, bd_t *bd)
 int ft_system_setup(void *blob, bd_t *bd)
 {
 	int ret;
+	int off;
+
+	if (CONFIG_BOOTAUX_RESERVED_MEM_BASE) {
+		off = fdt_add_mem_rsv(blob, CONFIG_BOOTAUX_RESERVED_MEM_BASE,
+				      CONFIG_BOOTAUX_RESERVED_MEM_SIZE);
+		if (off < 0)
+			printf("Failed	to reserve memory for bootaux: %s\n",
+			       fdt_strerror(off));
+	}
 
 	update_fdt_with_owned_resources(blob);
 
-- 
2.16.4

  reply	other threads:[~2020-05-05 12:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 12:28 [PATCH 00/10] imx: imx8qm/qxp update Peng Fan
2020-05-05 12:28 ` Peng Fan [this message]
2020-05-11 10:15   ` [PATCH 01/10] imx: imx8qm/qxp: reserving DDR memory for M4 sbabic at denx.de
2020-05-05 12:28 ` [PATCH 02/10] imx: imx8qm/qxp: Fix issue in get_effective_memsize Peng Fan
2020-05-11 10:17   ` sbabic at denx.de
2020-05-05 12:28 ` [PATCH 03/10] imx: imx8qm/qxp: add get_board_serial Peng Fan
2020-05-11 10:15   ` sbabic at denx.de
2020-05-05 12:28 ` [PATCH 04/10] imx: imx8qm/imx8qxp: Power down the resources before SPL jump to u-boot Peng Fan
2020-05-11 10:16   ` sbabic at denx.de
2020-05-05 12:28 ` [PATCH 05/10] imx: imx8qm/qxp: Recover SPL data section for partition reboot Peng Fan
2020-05-11 10:17   ` sbabic at denx.de
2020-05-05 12:28 ` [PATCH 06/10] imx8: Select boot device dynamically Peng Fan
2020-05-11 10:17   ` sbabic at denx.de
2020-05-05 12:28 ` [PATCH 07/10] imx: imx8qm/qxp: check whether m4 partition booted Peng Fan
2020-05-11 10:18   ` sbabic at denx.de
2020-05-05 12:28 ` [PATCH 08/10] imx: imx8qm: update fdt_file according to m4 state Peng Fan
2020-05-11 10:18   ` sbabic at denx.de
2020-05-05 12:28 ` [PATCH 09/10] imx: imx8qxp: " Peng Fan
2020-05-11 10:15   ` sbabic at denx.de
2020-05-05 12:28 ` [PATCH 10/10] imx8: cpu: check resource owned after sid fail Peng Fan
2020-05-11 10:18   ` sbabic at denx.de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200505122846.15992-2-peng.fan@nxp.com \
    --to=peng.fan@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox