From: Yuvraj Sakshith <yuvraj.kernel@gmail.com>
To: u-boot@lists.denx.de
Subject: [BUG] U-Boot qemu_arm64_defconfig CONFIG_CUSTOM_SYS_INIT_SP_ADDR collides with TF-A RMM granules
Date: Wed, 25 Jun 2025 19:34:38 +0530 [thread overview]
Message-ID: <aFwB9t7UYhslLqqL@raj> (raw)
Hi folks,
I have been experimenting with ARMv9 on QEMU.
Here is my configuration:
QEMU (8.2.2)
TF-A built with ENABLE_RME
U-Boot in Normal World (qemu_arm64_defconfig) + Linux Kernel Image passed to QEMU
TF-RMM built into TF-A
As mentioned in arm-trusted-firmware/plat/qemu/include/qemu_pas_def.h, TF-A reserves a region of
24MB starting from 0x40100000 for the RMM in L1 GPTs.
When control switches to normal world, U-Boot sets up its stack to CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x40200000.
During u-boot/arch/arm/lib/crt0_64.S:_main(), control jumps to u-boot/common/init/board_init.c:board_init_f_alloc_reserve().
I am not exactly sure what this method indends to do, but from the comments I understand it carves out some memory for the
"globals". This eventually ends up pushing the stack pointer to 0x401fde70. Which is inside the RMM PAS initialised by TF-A.
Post this, I get a Granule Protection Fault and the machine hangs up.
I wanted to know how this can be fixed and if my configuration is wrong.
Please let me know if there is any extra info that I need to provide for inspection.
R,
Yuvraj Sakshith
reply other threads:[~2025-06-25 17:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=aFwB9t7UYhslLqqL@raj \
--to=yuvraj.kernel@gmail.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