From: Stas U <drop.bash@gmail.com>
To: barebox@lists.infradead.org
Subject: Booting optee
Date: Sun, 5 Apr 2020 19:01:58 +0200 [thread overview]
Message-ID: <CAEFqijwo5iHKz_F+qmGQ4_K9RtMAovnhXw47-kv+WTQ399X9ug@mail.gmail.com> (raw)
Hey guys,
I'm facing a problem trying to boot first optee and then the linux
kernel on a custom board based around an i.MX6q SoM. Besides some
information about overlapped physical memory optee boots fine and
hands over to the normal world where the kernel is being decompressed.
According to the comments in the optee source, memory regions of the
same type can overlap and will be merged. A longfile of the boot
process can be found at: https://pastebin.com/6PtttRPW
Afterwards, 1 in 10 times the kernel would boot. I suspect that optee
configures the memory somehow funny so after relocation of the kernel
it can't execute the kernel code. I suspect, since the relocation is
happening randomly once in a while it will boot. As suggested in the
IRC channel, I should use early boot for optee.
Sadly, I can't figure out where and how to tell the barebox pbl to
first boot optee. I found the early boot option in the config of
barebox. As far as I understand, the PBL will first boot optee instead
of barebox. As soon as optee hands over to the normal world, barebox
will execute and start the kernel.
The documentation (https://www.barebox.org/doc/latest/user/optee.html)
tells me, my board needs to call start_optee_early() with a valid tee
and fdt. I don't quite get where the transition between PBL and
barebox happens thus where this call should happen. Also I can't wrap
my head around at where to put optee and the FDT. Right now they are
located on the emmc, obviously I can't access the fs at this stage, so
I'd need to link them to the barebox binary and pass the relative
addresses?
Could someone pls give me some hints at where to look next since I'm
completely out of useful ideas.
Thank you
BS
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2020-04-05 19:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-05 17:01 Stas U [this message]
2020-04-06 8:39 ` Rouven Czerwinski
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=CAEFqijwo5iHKz_F+qmGQ4_K9RtMAovnhXw47-kv+WTQ399X9ug@mail.gmail.com \
--to=drop.bash@gmail.com \
--cc=barebox@lists.infradead.org \
/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