clamor has quit [Read error: Connection reset by peer]
clamor has joined #u-boot
ungeskriptet has quit [Ping timeout: 244 seconds]
ungeskriptet has joined #u-boot
mmu_man has quit [Read error: Connection reset by peer]
enok has joined #u-boot
teejay has joined #u-boot
ungeskriptet_ has joined #u-boot
ungeskriptet has quit [Ping timeout: 252 seconds]
ungeskriptet_ is now known as ungeskriptet
prabhakalad has joined #u-boot
naoki1 has joined #u-boot
naoki has quit [Quit: naoki]
naoki1 is now known as naoki
pbergin has quit [Ping timeout: 248 seconds]
goliath has joined #u-boot
naoki1 has joined #u-boot
naoki has quit [Quit: naoki]
naoki1 is now known as naoki
naoki has quit [Client Quit]
naoki1 has joined #u-boot
<marex>
qschulz: the R-Car TFA BL31 board code already passes that DT+DTO combo to the BL31 blob before booting kernel, does it not ?
naoki1 is now known as naoki
naoki has quit [Client Quit]
naoki has joined #u-boot
<qschulz>
marex: I guess? It's still a bit obscure to me this part of the boot. But it would make sense since you want changes made by TF-A to make it to the kernel DT... That might make it a bit trickier since we don't have much storage in DRAM for the DTB in TF-A right now (256KiB; which is kinda tight with DT symbols)
clamor has quit [Ping timeout: 248 seconds]
pbergin has joined #u-boot
<marex>
qschulz: where does the 256 kiB figure come from ?
pbergin has quit [Remote host closed the connection]
Peng_Fan has quit [Quit: Connection closed for inactivity]
clamor has quit [Ping timeout: 268 seconds]
clamor has joined #u-boot
clamor has quit [Ping timeout: 252 seconds]
<marex>
qschulz: sounds rockchip specific ?
clamor has joined #u-boot
<qschulz>
marex: yes, thought I had mentioned that but forgot to :)
<marex>
qschulz: so ... time to write BL31 hooks for rockchip ? :)
<qschulz>
marex: well, the timing is bad because if we really pass the kernel DT to TF-A with the TF-A in kernel fit, then it'll be a disaster
<qschulz>
because the DT are already above the size limit :/
<qschulz>
so before this patch gets merged, it makes it risky for people to use it
<qschulz>
well at least it shouldn't crash TF-A if it's too big :)
<qschulz>
(as opposed to Rockchip's TF-A, which may or may not since it predates the upstream version which fixed those issues)
pbergin has joined #u-boot
monstr has quit [Ping timeout: 252 seconds]
ikarso has quit [Quit: Connection closed for inactivity]
rvalue has quit [Read error: Connection reset by peer]
mmu_man has joined #u-boot
rvalue has joined #u-boot
<marex>
qschulz: but this is rockchip only problem, right ?
<marex>
qschulz: and ... does the rockchip TFA even support use of external DT right now , or does it ignore it ?
<qschulz>
marex: there's probably a size limit for all architectures in TF-A
<qschulz>
but the limit is architecture-specific
<marex>
qschulz: and ... cant the rockchip TFA simply parse the external DT and configure itself accordingly ? Or does it always hold references to that external DT even during runtime (i.e. during its PSCI providering) ? I don't think it does ...
<qschulz>
Rockchip's TF-A blob accepts external DT but it's so unreliable you better not do it
<qschulz>
upstream TF-A for Rockchip works fine, in the 128KiB limit
<marex>
qschulz: isnt that 128kiB internal DT limit ? Or does that really apply to external DT too ?
<qschulz>
it keeps a copy of the external DT
<qschulz>
don't know what you mean by internal/external DT
<qschulz>
you pass a DT to TF-A and TF-A copies it
<qschulz>
this copy is limited to 128KiB
<qschulz>
right now
<marex>
oh hum
<qschulz>
i haven't checked bloblists, but I assume this could be a better way to handle things
ikarso has joined #u-boot
<marex>
qschulz: maybe some bootph-* to reduce the DT passed to TFA might help too ?
<marex>
qschulz: or just fix TFA and up the limit
<marex>
that's likely the easiest way
<qschulz>
we're trying to up the limit but you know things take a long time to land in TF-A
<qschulz>
not sure what bootph-* properties would help with
<calebccff>
marex: i still think re-executing U-Boot at a lower EL (and passing DT via a well-known address without a copy?) is the more generic way to go
<calebccff>
especially if you're doing EFI
<calebccff>
it can even be the same binary you loaded in EL3
<qschulz>
calebccff: it's not that easy, if you don't want to copy the DT, you need to have the address reserved to avoid a lower EL modify it
<xypron>
calebccff: UEFI is expected to run at EL2 or S-mode depending on the architecture. A U-Boot in EL3 would not fit here.
<calebccff>
xypron: that's exactly my point
<qschulz>
calebccff: also, you need enough space to be able to modify (read add stuff to) the DT
<xypron>
But SPL could be running at EL3 or M-mode.
<calebccff>
qschulz: if u-boot is the first thing running at a lower EL then it can presumably just not nuke your FDT?
<qschulz>
calebccff: not sure what you mean here? U-Boot also fixups the DT, possibly the one provided by TF-A
<xypron>
qschulz: Why do you want to take a DTB from a FIT image for TF-A? Why can't it be loaded at a later stage in your use case?
<calebccff>
xypron: qshulz: bake a full-fat U-Boot with an embedded FIT containing the FDT, TF-A, and OP-TEE if you like. Launch it in EL3, it goes "oh im in EL3, loader-mode activate!" and then adjusts the default boot path to launch TF-A with the normal world entrypoint targeting it's own _start address. Then after TF-A/OP-TEE init they re-start u-boot at a
<calebccff>
lower EL, which still finds the same FIT image (containing its DTB), but triggers a different bootflow because it's now at a lower EL
<calebccff>
if you want TF-A to mess with your DT you could feed it a stub, or just patch TF-A to not have such a ridiculous size limit i guess
<calebccff>
but this way you get u-boot in el3 which you can stop at and do anything you like (full fat u-boot woo), otherwise it boots through to normal u-boot at a lower el, it just happens to be the same binary
<qschulz>
sorry, I don't follow. Seems like we have multiple topics in parallel and I just cannot comprehend what we're talking about and what I should answer to
monstr has joined #u-boot
tlwoerner has joined #u-boot
MyNetAz has quit [Remote host closed the connection]
naoki has quit [Quit: naoki]
mmu_man has quit [Ping timeout: 272 seconds]
MyNetAz has joined #u-boot
monstr has quit [Remote host closed the connection]
<calebccff>
sorry, i guess marex' fosdem talk and our prior discussions here and on list are kinda necessary context
clamor has quit [Ping timeout: 244 seconds]
clamor has joined #u-boot
<marex>
calebccff: btw starting U-Boot again in EL2 is an option if you don't care about boot time optimization
<marex>
calebccff: basically ... SPL -> U-Boot (EL3) -> TFA BL31 -> U-Boot (EL2) -> Linux ... this works, and is easy to do with the board specific hook, but it will add to your boot time
<marex>
calebccff: for security deployments ... SPL -> TFA BL31 -> Linux ... seems the best alternative
<marex>
calebccff: for development purposes, ... SPL -> U-Boot (EL3) -> TFA BL31 -> Linux ...
<marex>
... and the plumbing is now in place to implement them all ...
<Tartarus>
marex, calebccff, on the EL/etc stuff, I think it was the arm EFI app series from sjg1 that I was hoping for more feedback from someone else on, wrt some of the "we're in EL$X and so ..." parts of.
<xypron>
Tartarus: The EFI App will start on top of an UEFI implementation. So it should already be in EL2 or S-Mode. do_bootefi_exec() calls switch_to_non_secure_mode() which on ARM will get us into EL2 if we aren't yet. A call outside the EFI sub-system does not exist.
enok71 has joined #u-boot
mmu_man has joined #u-boot
<xypron>
Tartarus: EFI spec 2.11 has in chapter 2.3.6 AArch64 Platforms the requirement: Use the highest 64 bit non secure privilege level available; Non-secure EL2 (Hyp) or Non-secure EL1(Kernel).
enok has quit [Ping timeout: 252 seconds]
<Tartarus>
xypron: OK. But I think it was more of the "how is this coded" part because there was in my mind similar issues that marex was needing to have solved
enok has joined #u-boot
<marex>
xypron: in that case , if U-Boot is in EL3, do_bootefi_exec() may need to inform user to either switch or start the PSCI provider if needed ?
<xypron>
See switch_to_non_secure_mode()
<marex>
and then switch to EL2
enok71 has quit [Ping timeout: 248 seconds]
<xypron>
I would not assume that a user starts PSCI manually. If TF-A does not offer a PSCI implementation, U-Boot would have to carry the implementation as a runtime driver.
enok has quit [Ping timeout: 268 seconds]
mmu_man has quit [Ping timeout: 268 seconds]
GNUtoo has quit [Remote host closed the connection]
<marex>
Tartarus: besides the fact that 940135eea5df ("Kconfig: Move CONFIG_BOOTCOUNT_ALTBOOTCMD to Kconfig")
<marex>
breaks multiple boards and introduces duplication ... why is the symbol called CONFIG_BOOTCOUNT_* ?
<marex>
altbootcmd has nothing to do with bootcount ?
<Tartarus>
marex: I'm unaware that it breaks multiple boards, and because when the bootcount is exceeded is when altbootcmd is run?
<Tartarus>
I thought I had checked before/after migrating the values, but that is indeed an annoyingly tricky kind to do
<marex>
Tartarus: if I had a chance to review it (as it does touch multiple devices I care about), I could point it out ... currently I am fixing the damage
<Tartarus>
So what'd I break?
mmu_man has joined #u-boot
GNUtoo has joined #u-boot
<marex>
at least imx8mp edm sbc
<marex>
err ... imx8mm edm sbc
<marex>
I actually wanted to focus on something entirely different, but now I have to deal with this first ... sigh