From: Stephan Gerhold <stephan.gerhold@linaro.org>
To: Casey Connolly <casey.connolly@linaro.org>
Cc: u-boot@lists.denx.de, Sumit Garg <sumit.garg@kernel.org>,
u-boot-qcom@groups.io, Tom Rini <trini@konsulko.com>,
Simon Glass <sjg@chromium.org>, Peng Fan <peng.fan@nxp.com>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Alice Guo <alice.guo@nxp.com>,
Quentin Schulz <quentin.schulz@cherry.de>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Mattijs Korpershoek <mkorpershoek@kernel.org>,
Kuan-Wei Chiu <visitorckw@gmail.com>,
Raymond Mao <raymond.mao@riscstar.com>,
Stefan Roese <stefan.roese@mailbox.org>,
Philip Molloy <philip.molloy@analog.com>,
Jerome Forissier <jerome.forissier@arm.com>,
Marek Vasut <marek.vasut@mailbox.org>,
Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>,
Patrice Chotard <patrice.chotard@foss.st.com>,
Aswin Murugan <aswin.murugan@oss.qualcomm.com>,
Rasmus Villemoes <ravi@prevas.dk>,
Heiko Schocher <hs@nabladev.com>,
Michal Simek <michal.simek@amd.com>,
Sughosh Ganu <sughosh.ganu@arm.com>,
Antony Kurniawan Soemardi <linux@smankusors.com>,
Luca Weiss <luca.weiss@fairphone.com>,
Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Subject: Re: [PATCH v2 13/15] mach-snapdragon: support parsing memory map from SMEM
Date: Thu, 21 May 2026 15:36:10 +0200 [thread overview]
Message-ID: <ag8KSnFZLK0Ca66H@linaro.org> (raw)
In-Reply-To: <20260504-b4-modernise-smem-v2-13-c01ec2ff3886@linaro.org>
On Mon, May 04, 2026 at 08:57:41PM +0200, Casey Connolly wrote:
> It is possible to derive the memory map for a Qualcomm platform from the
> SMEM shared memory region. The memory map is populated by the preloader.
>
> Introduce support for parsing this data and using it to populate
> U-Boot's memory map. Since we aren't yet sure if this will work for
> every platform, it is not yet used in all cases, if U-Boot is booted
> with an internal FDT which has the memory map defined, this will
> be used instead.
>
> If the FDT is internal FDT with no memory map defined, then U-Boot will
> try to use SMEM. This should remove the need to define the memory map
> statically in a U-Boot overlay for boards that don't chainload.
>
> Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Thanks a lot for working on this!
On DragonBoard 410c with (qcom_)dragonboard410c_defconfig:
$ make qcom_dragonboard410c_defconfig
HOSTCC scripts/basic/fixdep
GEN Makefile
HOSTCC scripts/kconfig/conf.o
YACC scripts/kconfig/zconf.tab.[ch]
LEX scripts/kconfig/zconf.lex.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
WARNING: unmet direct dependencies detected for QCOM_SMEM
Depends on [n]: SOC_QCOM [=n]
Selected by [y]:
- ARCH_SNAPDRAGON [=y] && <choice>
WARNING: unmet direct dependencies detected for QCOM_SMEM
Depends on [n]: SOC_QCOM [=n]
Selected by [y]:
- ARCH_SNAPDRAGON [=y] && <choice>
I added CONFIG_SOC_QCOM=y in (qcom_)dragonboard410c_defconfig to
workaround this, but we probably should select SOC_QCOM for
ARCH_SNAPDRAGON to fix this properly.
Then:
$ make
aarch64-linux-gnu-ld: arch/arm/mach-snapdragon/dram.o: in function `qcom_configure_capsule_updates':
arch/arm/mach-snapdragon/qcom-priv.h:38: multiple definition of `qcom_configure_capsule_updates';
arch/arm/mach-snapdragon/board.o:arch/arm/mach-snapdragon/qcom-priv.h:38: first defined here
I added:
diff --git a/arch/arm/mach-snapdragon/qcom-priv.h b/arch/arm/mach-snapdragon/qcom-priv.h
index 39dc8fcc76a..27e5c54e512 100644
--- a/arch/arm/mach-snapdragon/qcom-priv.h
+++ b/arch/arm/mach-snapdragon/qcom-priv.h
@@ -35,7 +35,7 @@ extern enum qcom_memmap_source qcom_memmap_source;
#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)
void qcom_configure_capsule_updates(void);
#else
-void qcom_configure_capsule_updates(void) {}
+static inline void qcom_configure_capsule_updates(void) {}
#endif /* EFI_HAVE_CAPSULE_SUPPORT */
With that fixed:
U-Boot 2026.07-rc2-...
Qualcomm-DragonBoard 410C
DRAM: 1 GiB
...
U-Boot loaded from XBL
Memory map loaded from INTERNAL_FDT
Then I removed the /memory map in the internal FDT (delete
arch/arm/dts/apq8016-sbc-u-boot.dtsi), and it detects the correct 2 GiB
RAM on this board!
U-Boot 2026.07-rc2-...
Qualcomm-DragonBoard 410C
DRAM: 2 GiB
...
U-Boot loaded from XBL
Memory map loaded from SMEM
So feel free to add my Tested-by: # db410c if you fix the errors
mentioned above (also feel free to include a patch to delete
arch/arm/dts/apq8016-sbc-u-boot.dtsi, or I can do this myself later once
your series lands).
Thanks!
Stephan
next prev parent reply other threads:[~2026-05-21 13:36 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 18:57 [PATCH v2 00/15] qcom: smem: modernize SMEM in U-Boot Casey Connolly
2026-05-04 18:57 ` [PATCH v2 01/15] Revert "dm: SMEM (Shared memory) uclass" Casey Connolly
2026-05-05 10:15 ` Sumit Garg
2026-05-07 15:31 ` Simon Glass
2026-05-07 20:05 ` Casey Connolly
2026-05-18 14:34 ` Neil Armstrong
2026-05-04 18:57 ` [PATCH v2 02/15] smem: drop drivers/smem Casey Connolly
2026-05-18 14:34 ` Neil Armstrong
2026-05-04 18:57 ` [PATCH v2 03/15] Revert "test: smem: add basic smem test" Casey Connolly
2026-05-05 10:26 ` Sumit Garg
2026-05-18 14:34 ` Neil Armstrong
2026-05-04 18:57 ` [PATCH v2 04/15] Revert "drivers: smem: sandbox" Casey Connolly
2026-05-05 10:26 ` Sumit Garg
2026-05-18 14:34 ` Neil Armstrong
2026-05-18 15:51 ` Fabio Estevam
2026-05-04 18:57 ` [PATCH v2 05/15] mach-snapdragon: fix reserved memory carveout Casey Connolly
2026-05-05 12:25 ` Sumit Garg
2026-05-05 12:39 ` Casey Connolly
2026-05-07 7:45 ` Sumit Garg
2026-05-07 20:29 ` Casey Connolly
2026-05-04 18:57 ` [PATCH v2 06/15] soc: qcom: import smem from Linux 6.11-rc2 Casey Connolly
2026-05-05 12:40 ` Sumit Garg
2026-05-05 12:45 ` Casey Connolly
2026-05-18 14:36 ` Neil Armstrong
2026-05-04 18:57 ` [PATCH v2 07/15] soc: qcom: smem: adjust headers for U-Boot Casey Connolly
2026-05-05 12:43 ` Sumit Garg
2026-05-18 14:36 ` Neil Armstrong
2026-05-04 18:57 ` [PATCH v2 08/15] soc: qcom: smem: adjust " Casey Connolly
2026-05-08 10:43 ` Aswin Murugan
2026-05-11 12:22 ` Casey Connolly
2026-05-18 11:03 ` Sumit Garg
2026-05-04 18:57 ` [PATCH v2 09/15] soc: qcom: smem: get serial number from socinfo Casey Connolly
2026-05-18 12:49 ` Sumit Garg
2026-05-04 18:57 ` [PATCH v2 10/15] soc: qcom: smem: stub functions Casey Connolly
2026-05-18 14:37 ` Neil Armstrong
2026-05-04 18:57 ` [PATCH v2 11/15] soc: qcom: smem: add build infra Casey Connolly
2026-05-18 12:53 ` Sumit Garg
2026-05-18 14:38 ` Neil Armstrong
2026-05-04 18:57 ` [PATCH v2 12/15] mach-snapdragon: move memory parsing to its own file Casey Connolly
2026-05-18 12:54 ` Sumit Garg
2026-05-18 14:40 ` Neil Armstrong
2026-05-04 18:57 ` [PATCH v2 13/15] mach-snapdragon: support parsing memory map from SMEM Casey Connolly
2026-05-18 14:48 ` Neil Armstrong
2026-05-21 13:36 ` Stephan Gerhold [this message]
2026-05-04 18:57 ` [PATCH v2 14/15] mach-snapdragon: fetch serial# " Casey Connolly
2026-05-18 13:15 ` Sumit Garg
2026-05-04 18:57 ` [PATCH v2 15/15] configs: add qcom_sm8650_defconfig and debug fragment Casey Connolly
2026-05-05 6:45 ` Luca Weiss
2026-05-05 10:11 ` [PATCH v2 00/15] qcom: smem: modernize SMEM in U-Boot Sumit Garg
2026-05-05 12:25 ` Casey Connolly
2026-05-05 12:35 ` Sumit Garg
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=ag8KSnFZLK0Ca66H@linaro.org \
--to=stephan.gerhold@linaro.org \
--cc=alice.guo@nxp.com \
--cc=aswin.murugan@oss.qualcomm.com \
--cc=balaji.selvanathan@oss.qualcomm.com \
--cc=casey.connolly@linaro.org \
--cc=hs@nabladev.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jerome.forissier@arm.com \
--cc=linux@smankusors.com \
--cc=luca.weiss@fairphone.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=marek.vasut@mailbox.org \
--cc=michal.simek@amd.com \
--cc=mkorpershoek@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=patrice.chotard@foss.st.com \
--cc=peng.fan@nxp.com \
--cc=philip.molloy@analog.com \
--cc=quentin.schulz@cherry.de \
--cc=ravi@prevas.dk \
--cc=raymond.mao@riscstar.com \
--cc=sjg@chromium.org \
--cc=stefan.roese@mailbox.org \
--cc=sughosh.ganu@arm.com \
--cc=sumit.garg@kernel.org \
--cc=trini@konsulko.com \
--cc=u-boot-qcom@groups.io \
--cc=u-boot@lists.denx.de \
--cc=varadarajan.narayanan@oss.qualcomm.com \
--cc=visitorckw@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.